libprelude-1.0.0/0000775000076400007640000000000011347715001010651 500000000000000libprelude-1.0.0/config.rpath0000775000076400007640000004401211322603367013106 00000000000000#! /bin/sh # Output a system dependent set of variables, describing how to set the # run time search path of shared libraries in an executable. # # Copyright 1996-2010 Free Software Foundation, Inc. # Taken from GNU libtool, 2001 # Originally by Gordon Matzigkeit , 1996 # # 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. # # The first argument passed to this file is the canonical host specification, # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM # or # CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM # The environment variables CC, GCC, LDFLAGS, LD, with_gnu_ld # should be set by the caller. # # The set of defined variables is at the end of this script. # Known limitations: # - On IRIX 6.5 with CC="cc", the run time search patch must not be longer # than 256 bytes, otherwise the compiler driver will dump core. The only # known workaround is to choose shorter directory names for the build # directory and/or the installation directory. # All known linkers require a `.a' archive for static linking (except MSVC, # which needs '.lib'). libext=a shrext=.so host="$1" host_cpu=`echo "$host" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` host_vendor=`echo "$host" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` host_os=`echo "$host" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` # Code taken from libtool.m4's _LT_CC_BASENAME. for cc_temp in $CC""; do case $cc_temp in compile | *[\\/]compile | ccache | *[\\/]ccache ) ;; distcc | *[\\/]distcc | purify | *[\\/]purify ) ;; \-*) ;; *) break;; esac done cc_basename=`echo "$cc_temp" | sed -e 's%^.*/%%'` # Code taken from libtool.m4's _LT_COMPILER_PIC. wl= if test "$GCC" = yes; then wl='-Wl,' else case "$host_os" in aix*) wl='-Wl,' ;; darwin*) case $cc_basename in xlc*) wl='-Wl,' ;; esac ;; mingw* | cygwin* | pw32* | os2* | cegcc*) ;; hpux9* | hpux10* | hpux11*) wl='-Wl,' ;; irix5* | irix6* | nonstopux*) wl='-Wl,' ;; newsos6) ;; linux* | k*bsd*-gnu) case $cc_basename in ecc*) wl='-Wl,' ;; icc* | ifort*) wl='-Wl,' ;; lf95*) wl='-Wl,' ;; pgcc | pgf77 | pgf90) wl='-Wl,' ;; ccc*) wl='-Wl,' ;; como) wl='-lopt=' ;; *) case `$CC -V 2>&1 | sed 5q` in *Sun\ C*) wl='-Wl,' ;; esac ;; esac ;; osf3* | osf4* | osf5*) wl='-Wl,' ;; rdos*) ;; solaris*) wl='-Wl,' ;; sunos4*) wl='-Qoption ld ' ;; sysv4 | sysv4.2uw2* | sysv4.3*) wl='-Wl,' ;; sysv4*MP*) ;; sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) wl='-Wl,' ;; unicos*) wl='-Wl,' ;; uts4*) ;; esac fi # Code taken from libtool.m4's _LT_LINKER_SHLIBS. hardcode_libdir_flag_spec= hardcode_libdir_separator= hardcode_direct=no hardcode_minus_L=no case "$host_os" in cygwin* | mingw* | pw32* | cegcc*) # 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 ;; interix*) # we just hope/assume this is gcc and not c89 (= MSVC++) with_gnu_ld=yes ;; openbsd*) with_gnu_ld=no ;; esac ld_shlibs=yes if test "$with_gnu_ld" = yes; then # Set some defaults for GNU ld with shared library support. These # are reset later if shared libraries are not supported. Putting them # here allows them to be overridden if necessary. # Unlike libtool, we use -rpath here, not --rpath, since the documented # option of GNU ld is called -rpath, not --rpath. hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' case "$host_os" in aix[3-9]*) # On AIX/PPC, the GNU linker is very broken if test "$host_cpu" != ia64; then ld_shlibs=no fi ;; amigaos*) hardcode_libdir_flag_spec='-L$libdir' hardcode_minus_L=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 cannot use # them. ld_shlibs=no ;; beos*) if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then : else ld_shlibs=no fi ;; cygwin* | mingw* | pw32* | cegcc*) # hardcode_libdir_flag_spec is actually meaningless, as there is # no search path for DLLs. hardcode_libdir_flag_spec='-L$libdir' if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then : else ld_shlibs=no fi ;; interix[3-9]*) hardcode_direct=no hardcode_libdir_flag_spec='${wl}-rpath,$libdir' ;; gnu* | linux* | k*bsd*-gnu) if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then : else ld_shlibs=no fi ;; netbsd*) ;; solaris*) if $LD -v 2>&1 | grep 'BFD 2\.8' > /dev/null; then ld_shlibs=no elif $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then : else ld_shlibs=no fi ;; sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*) case `$LD -v 2>&1` in *\ [01].* | *\ 2.[0-9].* | *\ 2.1[0-5].*) ld_shlibs=no ;; *) if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then hardcode_libdir_flag_spec='`test -z "$SCOABSPATH" && echo ${wl}-rpath,$libdir`' else ld_shlibs=no fi ;; esac ;; sunos4*) hardcode_direct=yes ;; *) if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then : else ld_shlibs=no fi ;; esac if test "$ld_shlibs" = no; then hardcode_libdir_flag_spec= fi else case "$host_os" in aix3*) # Note: this linker hardcodes the directories in LIBPATH if there # are no directories specified by -L. hardcode_minus_L=yes if test "$GCC" = yes; then # Neither direct hardcoding nor static linking is supported with a # broken collect2. hardcode_direct=unsupported fi ;; aix[4-9]*) 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 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].*|aix[5-9]*) 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 fi hardcode_direct=yes hardcode_libdir_separator=':' if test "$GCC" = yes; then case $host_os in aix4.[012]|aix4.[012].*) collect2name=`${CC} -print-prog-name=collect2` if test -f "$collect2name" && \ strings "$collect2name" | grep resolve_lib_name >/dev/null then # We have reworked collect2 : else # We have old collect2 hardcode_direct=unsupported hardcode_minus_L=yes hardcode_libdir_flag_spec='-L$libdir' hardcode_libdir_separator= fi ;; esac fi # Begin _LT_AC_SYS_LIBPATH_AIX. echo 'int main () { return 0; }' > conftest.c ${CC} ${LDFLAGS} conftest.c -o conftest aix_libpath=`dump -H conftest 2>/dev/null | sed -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } }'` if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest 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 rm -f conftest.c conftest # End _LT_AC_SYS_LIBPATH_AIX. if test "$aix_use_runtimelinking" = yes; then hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath" else if test "$host_cpu" = ia64; then hardcode_libdir_flag_spec='${wl}-R $libdir:/usr/lib:/lib' else hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath" fi fi ;; amigaos*) hardcode_libdir_flag_spec='-L$libdir' hardcode_minus_L=yes # see comment about different semantics on the GNU ld section ld_shlibs=no ;; bsdi[45]*) ;; cygwin* | mingw* | pw32* | cegcc*) # 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. hardcode_libdir_flag_spec=' ' libext=lib ;; darwin* | rhapsody*) hardcode_direct=no if test "$GCC" = yes ; then : else case $cc_basename in xlc*) ;; *) ld_shlibs=no ;; esac fi ;; dgux*) hardcode_libdir_flag_spec='-L$libdir' ;; freebsd1*) ld_shlibs=no ;; freebsd2.2*) hardcode_libdir_flag_spec='-R$libdir' hardcode_direct=yes ;; freebsd2*) hardcode_direct=yes hardcode_minus_L=yes ;; freebsd* | dragonfly*) hardcode_libdir_flag_spec='-R$libdir' hardcode_direct=yes ;; hpux9*) hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' hardcode_libdir_separator=: hardcode_direct=yes # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. hardcode_minus_L=yes ;; hpux10*) if test "$with_gnu_ld" = no; then hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' hardcode_libdir_separator=: hardcode_direct=yes # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. hardcode_minus_L=yes fi ;; hpux11*) if test "$with_gnu_ld" = no; then hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' hardcode_libdir_separator=: case $host_cpu in hppa*64*|ia64*) hardcode_direct=no ;; *) hardcode_direct=yes # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. hardcode_minus_L=yes ;; esac fi ;; irix5* | irix6* | nonstopux*) hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' hardcode_libdir_separator=: ;; netbsd*) hardcode_libdir_flag_spec='-R$libdir' hardcode_direct=yes ;; newsos6) hardcode_direct=yes hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' hardcode_libdir_separator=: ;; openbsd*) if test -f /usr/libexec/ld.so; then hardcode_direct=yes if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then hardcode_libdir_flag_spec='${wl}-rpath,$libdir' else case "$host_os" in openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*) hardcode_libdir_flag_spec='-R$libdir' ;; *) hardcode_libdir_flag_spec='${wl}-rpath,$libdir' ;; esac fi else ld_shlibs=no fi ;; os2*) hardcode_libdir_flag_spec='-L$libdir' hardcode_minus_L=yes ;; osf3*) hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' hardcode_libdir_separator=: ;; osf4* | osf5*) if test "$GCC" = yes; then hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' else # Both cc and cxx compiler support -rpath directly hardcode_libdir_flag_spec='-rpath $libdir' fi hardcode_libdir_separator=: ;; solaris*) hardcode_libdir_flag_spec='-R$libdir' ;; sunos4*) hardcode_libdir_flag_spec='-L$libdir' hardcode_direct=yes hardcode_minus_L=yes ;; sysv4) case $host_vendor in sni) hardcode_direct=yes # is this really true??? ;; siemens) hardcode_direct=no ;; motorola) hardcode_direct=no #Motorola manual says yes, but my tests say they lie ;; esac ;; sysv4.3*) ;; sysv4*MP*) if test -d /usr/nec; then ld_shlibs=yes fi ;; sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7* | sco3.2v5.0.[024]*) ;; sysv5* | sco3.2v5* | sco5v6*) hardcode_libdir_flag_spec='`test -z "$SCOABSPATH" && echo ${wl}-R,$libdir`' hardcode_libdir_separator=':' ;; uts4*) hardcode_libdir_flag_spec='-L$libdir' ;; *) ld_shlibs=no ;; esac fi # Check dynamic linker characteristics # Code taken from libtool.m4's _LT_SYS_DYNAMIC_LINKER. # Unlike libtool.m4, here we don't care about _all_ names of the library, but # only about the one the linker finds when passed -lNAME. This is the last # element of library_names_spec in libtool.m4, or possibly two of them if the # linker has special search rules. library_names_spec= # the last element of library_names_spec in libtool.m4 libname_spec='lib$name' case "$host_os" in aix3*) library_names_spec='$libname.a' ;; aix[4-9]*) library_names_spec='$libname$shrext' ;; amigaos*) library_names_spec='$libname.a' ;; beos*) library_names_spec='$libname$shrext' ;; bsdi[45]*) library_names_spec='$libname$shrext' ;; cygwin* | mingw* | pw32* | cegcc*) shrext=.dll library_names_spec='$libname.dll.a $libname.lib' ;; darwin* | rhapsody*) shrext=.dylib library_names_spec='$libname$shrext' ;; dgux*) library_names_spec='$libname$shrext' ;; freebsd1*) ;; freebsd* | dragonfly*) case "$host_os" in freebsd[123]*) library_names_spec='$libname$shrext$versuffix' ;; *) library_names_spec='$libname$shrext' ;; esac ;; gnu*) library_names_spec='$libname$shrext' ;; hpux9* | hpux10* | hpux11*) case $host_cpu in ia64*) shrext=.so ;; hppa*64*) shrext=.sl ;; *) shrext=.sl ;; esac library_names_spec='$libname$shrext' ;; interix[3-9]*) library_names_spec='$libname$shrext' ;; irix5* | irix6* | nonstopux*) library_names_spec='$libname$shrext' case "$host_os" in irix5* | nonstopux*) libsuff= shlibsuff= ;; *) case $LD in *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") libsuff= shlibsuff= ;; *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") libsuff=32 shlibsuff=N32 ;; *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") libsuff=64 shlibsuff=64 ;; *) libsuff= shlibsuff= ;; esac ;; esac ;; linux*oldld* | linux*aout* | linux*coff*) ;; linux* | k*bsd*-gnu) library_names_spec='$libname$shrext' ;; knetbsd*-gnu) library_names_spec='$libname$shrext' ;; netbsd*) library_names_spec='$libname$shrext' ;; newsos6) library_names_spec='$libname$shrext' ;; nto-qnx*) library_names_spec='$libname$shrext' ;; openbsd*) library_names_spec='$libname$shrext$versuffix' ;; os2*) libname_spec='$name' shrext=.dll library_names_spec='$libname.a' ;; osf3* | osf4* | osf5*) library_names_spec='$libname$shrext' ;; rdos*) ;; solaris*) library_names_spec='$libname$shrext' ;; sunos4*) library_names_spec='$libname$shrext$versuffix' ;; sysv4 | sysv4.3*) library_names_spec='$libname$shrext' ;; sysv4*MP*) library_names_spec='$libname$shrext' ;; sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) library_names_spec='$libname$shrext' ;; uts4*) library_names_spec='$libname$shrext' ;; esac sed_quote_subst='s/\(["`$\\]\)/\\\1/g' escaped_wl=`echo "X$wl" | sed -e 's/^X//' -e "$sed_quote_subst"` shlibext=`echo "$shrext" | sed -e 's,^\.,,'` escaped_libname_spec=`echo "X$libname_spec" | sed -e 's/^X//' -e "$sed_quote_subst"` escaped_library_names_spec=`echo "X$library_names_spec" | sed -e 's/^X//' -e "$sed_quote_subst"` escaped_hardcode_libdir_flag_spec=`echo "X$hardcode_libdir_flag_spec" | sed -e 's/^X//' -e "$sed_quote_subst"` LC_ALL=C sed -e 's/^\([a-zA-Z0-9_]*\)=/acl_cv_\1=/' < and include a ChangeLog # entry. # # This script attempts to guess a canonical system name similar to # config.sub. If it succeeds, it prints the system name on stdout, and # exits with 0. Otherwise, it exits with 1. # # You can get the latest version of this script from: # http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD me=`echo "$0" | sed -e 's,.*/,,'` usage="\ Usage: $0 [OPTION] Output the configuration name of the system \`$me' is run on. Operation modes: -h, --help print this help, then exit -t, --time-stamp print date of last modification, then exit -v, --version print version number, then exit Report bugs and patches to ." version="\ GNU config.guess ($timestamp) Originally written by Per Bothner. Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." help=" Try \`$me --help' for more information." # Parse command line while test $# -gt 0 ; do case $1 in --time-stamp | --time* | -t ) echo "$timestamp" ; exit ;; --version | -v ) echo "$version" ; exit ;; --help | --h* | -h ) echo "$usage"; exit ;; -- ) # Stop option processing shift; break ;; - ) # Use stdin as input. break ;; -* ) echo "$me: invalid option $1$help" >&2 exit 1 ;; * ) break ;; esac done if test $# != 0; then echo "$me: too many arguments$help" >&2 exit 1 fi trap 'exit 1' 1 2 15 # CC_FOR_BUILD -- compiler used by this script. Note that the use of a # compiler to aid in system detection is discouraged as it requires # temporary files to be created and, as you can see below, it is a # headache to deal with in a portable fashion. # Historically, `CC_FOR_BUILD' used to be named `HOST_CC'. We still # use `HOST_CC' if defined, but it is deprecated. # Portable tmp directory creation inspired by the Autoconf team. set_cc_for_build=' trap "exitcode=\$?; (rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null) && exit \$exitcode" 0 ; trap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" 1 2 13 15 ; : ${TMPDIR=/tmp} ; { tmp=`(umask 077 && mktemp -d "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } || { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir $tmp) ; } || { tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir $tmp) && echo "Warning: creating insecure temp directory" >&2 ; } || { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } ; dummy=$tmp/dummy ; tmpfiles="$dummy.c $dummy.o $dummy.rel $dummy" ; case $CC_FOR_BUILD,$HOST_CC,$CC in ,,) echo "int x;" > $dummy.c ; for c in cc gcc c89 c99 ; do if ($c -c -o $dummy.o $dummy.c) >/dev/null 2>&1 ; then CC_FOR_BUILD="$c"; break ; fi ; done ; if test x"$CC_FOR_BUILD" = x ; then CC_FOR_BUILD=no_compiler_found ; fi ;; ,,*) CC_FOR_BUILD=$CC ;; ,*,*) CC_FOR_BUILD=$HOST_CC ;; esac ; set_cc_for_build= ;' # This is needed to find uname on a Pyramid OSx when run in the BSD universe. # (ghazi@noc.rutgers.edu 1994-08-24) if (test -f /.attbin/uname) >/dev/null 2>&1 ; then PATH=$PATH:/.attbin ; export PATH fi UNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown # Note: order is significant - the case branches are not exclusive. case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in *:NetBSD:*:*) # NetBSD (nbsd) targets should (where applicable) match one or # more of the tupples: *-*-netbsdelf*, *-*-netbsdaout*, # *-*-netbsdecoff* and *-*-netbsd*. For targets that recently # switched to ELF, *-*-netbsd* would select the old # object file format. This provides both forward # compatibility and a consistent mechanism for selecting the # object file format. # # Note: NetBSD doesn't particularly care about the vendor # portion of the name. We always set it to "unknown". sysctl="sysctl -n hw.machine_arch" UNAME_MACHINE_ARCH=`(/sbin/$sysctl 2>/dev/null || \ /usr/sbin/$sysctl 2>/dev/null || echo unknown)` case "${UNAME_MACHINE_ARCH}" in armeb) machine=armeb-unknown ;; arm*) machine=arm-unknown ;; sh3el) machine=shl-unknown ;; sh3eb) machine=sh-unknown ;; sh5el) machine=sh5le-unknown ;; *) machine=${UNAME_MACHINE_ARCH}-unknown ;; esac # The Operating System including object format, if it has switched # to ELF recently, or will in the future. case "${UNAME_MACHINE_ARCH}" in arm*|i386|m68k|ns32k|sh3*|sparc|vax) eval $set_cc_for_build if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \ | grep -q __ELF__ then # Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout). # Return netbsd for either. FIX? os=netbsd else os=netbsdelf fi ;; *) os=netbsd ;; esac # The OS release # Debian GNU/NetBSD machines have a different userland, and # thus, need a distinct triplet. However, they do not need # kernel version information, so it can be replaced with a # suitable tag, in the style of linux-gnu. case "${UNAME_VERSION}" in Debian*) release='-gnu' ;; *) release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'` ;; esac # Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM: # contains redundant information, the shorter form: # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used. echo "${machine}-${os}${release}" exit ;; *:OpenBSD:*:*) UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'` echo ${UNAME_MACHINE_ARCH}-unknown-openbsd${UNAME_RELEASE} exit ;; *:ekkoBSD:*:*) echo ${UNAME_MACHINE}-unknown-ekkobsd${UNAME_RELEASE} exit ;; *:SolidBSD:*:*) echo ${UNAME_MACHINE}-unknown-solidbsd${UNAME_RELEASE} exit ;; macppc:MirBSD:*:*) echo powerpc-unknown-mirbsd${UNAME_RELEASE} exit ;; *:MirBSD:*:*) echo ${UNAME_MACHINE}-unknown-mirbsd${UNAME_RELEASE} exit ;; alpha:OSF1:*:*) case $UNAME_RELEASE in *4.0) UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'` ;; *5.*) UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'` ;; esac # According to Compaq, /usr/sbin/psrinfo has been available on # OSF/1 and Tru64 systems produced since 1995. I hope that # covers most systems running today. This code pipes the CPU # types through head -n 1, so we only detect the type of CPU 0. ALPHA_CPU_TYPE=`/usr/sbin/psrinfo -v | sed -n -e 's/^ The alpha \(.*\) processor.*$/\1/p' | head -n 1` case "$ALPHA_CPU_TYPE" in "EV4 (21064)") UNAME_MACHINE="alpha" ;; "EV4.5 (21064)") UNAME_MACHINE="alpha" ;; "LCA4 (21066/21068)") UNAME_MACHINE="alpha" ;; "EV5 (21164)") UNAME_MACHINE="alphaev5" ;; "EV5.6 (21164A)") UNAME_MACHINE="alphaev56" ;; "EV5.6 (21164PC)") UNAME_MACHINE="alphapca56" ;; "EV5.7 (21164PC)") UNAME_MACHINE="alphapca57" ;; "EV6 (21264)") UNAME_MACHINE="alphaev6" ;; "EV6.7 (21264A)") UNAME_MACHINE="alphaev67" ;; "EV6.8CB (21264C)") UNAME_MACHINE="alphaev68" ;; "EV6.8AL (21264B)") UNAME_MACHINE="alphaev68" ;; "EV6.8CX (21264D)") UNAME_MACHINE="alphaev68" ;; "EV6.9A (21264/EV69A)") UNAME_MACHINE="alphaev69" ;; "EV7 (21364)") UNAME_MACHINE="alphaev7" ;; "EV7.9 (21364A)") UNAME_MACHINE="alphaev79" ;; esac # A Pn.n version is a patched version. # A Vn.n version is a released version. # A Tn.n version is a released field test version. # A Xn.n version is an unreleased experimental baselevel. # 1.2 uses "1.2" for uname -r. echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` exit ;; Alpha\ *:Windows_NT*:*) # How do we know it's Interix rather than the generic POSIX subsystem? # Should we change UNAME_MACHINE based on the output of uname instead # of the specific Alpha model? echo alpha-pc-interix exit ;; 21064:Windows_NT:50:3) echo alpha-dec-winnt3.5 exit ;; Amiga*:UNIX_System_V:4.0:*) echo m68k-unknown-sysv4 exit ;; *:[Aa]miga[Oo][Ss]:*:*) echo ${UNAME_MACHINE}-unknown-amigaos exit ;; *:[Mm]orph[Oo][Ss]:*:*) echo ${UNAME_MACHINE}-unknown-morphos exit ;; *:OS/390:*:*) echo i370-ibm-openedition exit ;; *:z/VM:*:*) echo s390-ibm-zvmoe exit ;; *:OS400:*:*) echo powerpc-ibm-os400 exit ;; arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*) echo arm-acorn-riscix${UNAME_RELEASE} exit ;; arm:riscos:*:*|arm:RISCOS:*:*) echo arm-unknown-riscos exit ;; SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*) echo hppa1.1-hitachi-hiuxmpp exit ;; Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*) # akee@wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE. if test "`(/bin/universe) 2>/dev/null`" = att ; then echo pyramid-pyramid-sysv3 else echo pyramid-pyramid-bsd fi exit ;; NILE*:*:*:dcosx) echo pyramid-pyramid-svr4 exit ;; DRS?6000:unix:4.0:6*) echo sparc-icl-nx6 exit ;; DRS?6000:UNIX_SV:4.2*:7* | DRS?6000:isis:4.2*:7*) case `/usr/bin/uname -p` in sparc) echo sparc-icl-nx7; exit ;; esac ;; s390x:SunOS:*:*) echo ${UNAME_MACHINE}-ibm-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit ;; sun4H:SunOS:5.*:*) echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit ;; sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*) echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit ;; i86pc:AuroraUX:5.*:* | i86xen:AuroraUX:5.*:*) echo i386-pc-auroraux${UNAME_RELEASE} exit ;; i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*) eval $set_cc_for_build SUN_ARCH="i386" # If there is a compiler, see if it is configured for 64-bit objects. # Note that the Sun cc does not turn __LP64__ into 1 like gcc does. # This test works for both compilers. if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then if (echo '#ifdef __amd64'; echo IS_64BIT_ARCH; echo '#endif') | \ (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \ grep IS_64BIT_ARCH >/dev/null then SUN_ARCH="x86_64" fi fi echo ${SUN_ARCH}-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit ;; sun4*:SunOS:6*:*) # According to config.sub, this is the proper way to canonicalize # SunOS6. Hard to guess exactly what SunOS6 will be like, but # it's likely to be more like Solaris than SunOS4. echo sparc-sun-solaris3`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit ;; sun4*:SunOS:*:*) case "`/usr/bin/arch -k`" in Series*|S4*) UNAME_RELEASE=`uname -v` ;; esac # Japanese Language versions have a version number like `4.1.3-JL'. echo sparc-sun-sunos`echo ${UNAME_RELEASE}|sed -e 's/-/_/'` exit ;; sun3*:SunOS:*:*) echo m68k-sun-sunos${UNAME_RELEASE} exit ;; sun*:*:4.2BSD:*) UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null` test "x${UNAME_RELEASE}" = "x" && UNAME_RELEASE=3 case "`/bin/arch`" in sun3) echo m68k-sun-sunos${UNAME_RELEASE} ;; sun4) echo sparc-sun-sunos${UNAME_RELEASE} ;; esac exit ;; aushp:SunOS:*:*) echo sparc-auspex-sunos${UNAME_RELEASE} exit ;; # The situation for MiNT is a little confusing. The machine name # can be virtually everything (everything which is not # "atarist" or "atariste" at least should have a processor # > m68000). The system name ranges from "MiNT" over "FreeMiNT" # to the lowercase version "mint" (or "freemint"). Finally # the system name "TOS" denotes a system which is actually not # MiNT. But MiNT is downward compatible to TOS, so this should # be no problem. atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*) echo m68k-atari-mint${UNAME_RELEASE} exit ;; atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*) echo m68k-atari-mint${UNAME_RELEASE} exit ;; *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*) echo m68k-atari-mint${UNAME_RELEASE} exit ;; milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*) echo m68k-milan-mint${UNAME_RELEASE} exit ;; hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*) echo m68k-hades-mint${UNAME_RELEASE} exit ;; *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*) echo m68k-unknown-mint${UNAME_RELEASE} exit ;; m68k:machten:*:*) echo m68k-apple-machten${UNAME_RELEASE} exit ;; powerpc:machten:*:*) echo powerpc-apple-machten${UNAME_RELEASE} exit ;; RISC*:Mach:*:*) echo mips-dec-mach_bsd4.3 exit ;; RISC*:ULTRIX:*:*) echo mips-dec-ultrix${UNAME_RELEASE} exit ;; VAX*:ULTRIX*:*:*) echo vax-dec-ultrix${UNAME_RELEASE} exit ;; 2020:CLIX:*:* | 2430:CLIX:*:*) echo clipper-intergraph-clix${UNAME_RELEASE} exit ;; mips:*:*:UMIPS | mips:*:*:RISCos) eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #ifdef __cplusplus #include /* for printf() prototype */ int main (int argc, char *argv[]) { #else int main (argc, argv) int argc; char *argv[]; { #endif #if defined (host_mips) && defined (MIPSEB) #if defined (SYSTYPE_SYSV) printf ("mips-mips-riscos%ssysv\n", argv[1]); exit (0); #endif #if defined (SYSTYPE_SVR4) printf ("mips-mips-riscos%ssvr4\n", argv[1]); exit (0); #endif #if defined (SYSTYPE_BSD43) || defined(SYSTYPE_BSD) printf ("mips-mips-riscos%sbsd\n", argv[1]); exit (0); #endif #endif exit (-1); } EOF $CC_FOR_BUILD -o $dummy $dummy.c && dummyarg=`echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` && SYSTEM_NAME=`$dummy $dummyarg` && { echo "$SYSTEM_NAME"; exit; } echo mips-mips-riscos${UNAME_RELEASE} exit ;; Motorola:PowerMAX_OS:*:*) echo powerpc-motorola-powermax exit ;; Motorola:*:4.3:PL8-*) echo powerpc-harris-powermax exit ;; Night_Hawk:*:*:PowerMAX_OS | Synergy:PowerMAX_OS:*:*) echo powerpc-harris-powermax exit ;; Night_Hawk:Power_UNIX:*:*) echo powerpc-harris-powerunix exit ;; m88k:CX/UX:7*:*) echo m88k-harris-cxux7 exit ;; m88k:*:4*:R4*) echo m88k-motorola-sysv4 exit ;; m88k:*:3*:R3*) echo m88k-motorola-sysv3 exit ;; AViiON:dgux:*:*) # DG/UX returns AViiON for all architectures UNAME_PROCESSOR=`/usr/bin/uname -p` if [ $UNAME_PROCESSOR = mc88100 ] || [ $UNAME_PROCESSOR = mc88110 ] then if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx ] || \ [ ${TARGET_BINARY_INTERFACE}x = x ] then echo m88k-dg-dgux${UNAME_RELEASE} else echo m88k-dg-dguxbcs${UNAME_RELEASE} fi else echo i586-dg-dgux${UNAME_RELEASE} fi exit ;; M88*:DolphinOS:*:*) # DolphinOS (SVR3) echo m88k-dolphin-sysv3 exit ;; M88*:*:R3*:*) # Delta 88k system running SVR3 echo m88k-motorola-sysv3 exit ;; XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3) echo m88k-tektronix-sysv3 exit ;; Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD) echo m68k-tektronix-bsd exit ;; *:IRIX*:*:*) echo mips-sgi-irix`echo ${UNAME_RELEASE}|sed -e 's/-/_/g'` exit ;; ????????:AIX?:[12].1:2) # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX. echo romp-ibm-aix # uname -m gives an 8 hex-code CPU id exit ;; # Note that: echo "'`uname -s`'" gives 'AIX ' i*86:AIX:*:*) echo i386-ibm-aix exit ;; ia64:AIX:*:*) if [ -x /usr/bin/oslevel ] ; then IBM_REV=`/usr/bin/oslevel` else IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} fi echo ${UNAME_MACHINE}-ibm-aix${IBM_REV} exit ;; *:AIX:2:3) if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #include main() { if (!__power_pc()) exit(1); puts("powerpc-ibm-aix3.2.5"); exit(0); } EOF if $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` then echo "$SYSTEM_NAME" else echo rs6000-ibm-aix3.2.5 fi elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then echo rs6000-ibm-aix3.2.4 else echo rs6000-ibm-aix3.2 fi exit ;; *:AIX:*:[456]) IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'` if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then IBM_ARCH=rs6000 else IBM_ARCH=powerpc fi if [ -x /usr/bin/oslevel ] ; then IBM_REV=`/usr/bin/oslevel` else IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} fi echo ${IBM_ARCH}-ibm-aix${IBM_REV} exit ;; *:AIX:*:*) echo rs6000-ibm-aix exit ;; ibmrt:4.4BSD:*|romp-ibm:BSD:*) echo romp-ibm-bsd4.4 exit ;; ibmrt:*BSD:*|romp-ibm:BSD:*) # covers RT/PC BSD and echo romp-ibm-bsd${UNAME_RELEASE} # 4.3 with uname added to exit ;; # report: romp-ibm BSD 4.3 *:BOSX:*:*) echo rs6000-bull-bosx exit ;; DPX/2?00:B.O.S.:*:*) echo m68k-bull-sysv3 exit ;; 9000/[34]??:4.3bsd:1.*:*) echo m68k-hp-bsd exit ;; hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*) echo m68k-hp-bsd4.4 exit ;; 9000/[34678]??:HP-UX:*:*) HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` case "${UNAME_MACHINE}" in 9000/31? ) HP_ARCH=m68000 ;; 9000/[34]?? ) HP_ARCH=m68k ;; 9000/[678][0-9][0-9]) if [ -x /usr/bin/getconf ]; then sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null` sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null` case "${sc_cpu_version}" in 523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0 528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1 532) # CPU_PA_RISC2_0 case "${sc_kernel_bits}" in 32) HP_ARCH="hppa2.0n" ;; 64) HP_ARCH="hppa2.0w" ;; '') HP_ARCH="hppa2.0" ;; # HP-UX 10.20 esac ;; esac fi if [ "${HP_ARCH}" = "" ]; then eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #define _HPUX_SOURCE #include #include int main () { #if defined(_SC_KERNEL_BITS) long bits = sysconf(_SC_KERNEL_BITS); #endif long cpu = sysconf (_SC_CPU_VERSION); switch (cpu) { case CPU_PA_RISC1_0: puts ("hppa1.0"); break; case CPU_PA_RISC1_1: puts ("hppa1.1"); break; case CPU_PA_RISC2_0: #if defined(_SC_KERNEL_BITS) switch (bits) { case 64: puts ("hppa2.0w"); break; case 32: puts ("hppa2.0n"); break; default: puts ("hppa2.0"); break; } break; #else /* !defined(_SC_KERNEL_BITS) */ puts ("hppa2.0"); break; #endif default: puts ("hppa1.0"); break; } exit (0); } EOF (CCOPTS= $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy` test -z "$HP_ARCH" && HP_ARCH=hppa fi ;; esac if [ ${HP_ARCH} = "hppa2.0w" ] then eval $set_cc_for_build # hppa2.0w-hp-hpux* has a 64-bit kernel and a compiler generating # 32-bit code. hppa64-hp-hpux* has the same kernel and a compiler # generating 64-bit code. GNU and HP use different nomenclature: # # $ CC_FOR_BUILD=cc ./config.guess # => hppa2.0w-hp-hpux11.23 # $ CC_FOR_BUILD="cc +DA2.0w" ./config.guess # => hppa64-hp-hpux11.23 if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | grep -q __LP64__ then HP_ARCH="hppa2.0w" else HP_ARCH="hppa64" fi fi echo ${HP_ARCH}-hp-hpux${HPUX_REV} exit ;; ia64:HP-UX:*:*) HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` echo ia64-hp-hpux${HPUX_REV} exit ;; 3050*:HI-UX:*:*) eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #include int main () { long cpu = sysconf (_SC_CPU_VERSION); /* The order matters, because CPU_IS_HP_MC68K erroneously returns true for CPU_PA_RISC1_0. CPU_IS_PA_RISC returns correct results, however. */ if (CPU_IS_PA_RISC (cpu)) { switch (cpu) { case CPU_PA_RISC1_0: puts ("hppa1.0-hitachi-hiuxwe2"); break; case CPU_PA_RISC1_1: puts ("hppa1.1-hitachi-hiuxwe2"); break; case CPU_PA_RISC2_0: puts ("hppa2.0-hitachi-hiuxwe2"); break; default: puts ("hppa-hitachi-hiuxwe2"); break; } } else if (CPU_IS_HP_MC68K (cpu)) puts ("m68k-hitachi-hiuxwe2"); else puts ("unknown-hitachi-hiuxwe2"); exit (0); } EOF $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` && { echo "$SYSTEM_NAME"; exit; } echo unknown-hitachi-hiuxwe2 exit ;; 9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* ) echo hppa1.1-hp-bsd exit ;; 9000/8??:4.3bsd:*:*) echo hppa1.0-hp-bsd exit ;; *9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*) echo hppa1.0-hp-mpeix exit ;; hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* ) echo hppa1.1-hp-osf exit ;; hp8??:OSF1:*:*) echo hppa1.0-hp-osf exit ;; i*86:OSF1:*:*) if [ -x /usr/sbin/sysversion ] ; then echo ${UNAME_MACHINE}-unknown-osf1mk else echo ${UNAME_MACHINE}-unknown-osf1 fi exit ;; parisc*:Lites*:*:*) echo hppa1.1-hp-lites exit ;; C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*) echo c1-convex-bsd exit ;; C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*) if getsysinfo -f scalar_acc then echo c32-convex-bsd else echo c2-convex-bsd fi exit ;; C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*) echo c34-convex-bsd exit ;; C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*) echo c38-convex-bsd exit ;; C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*) echo c4-convex-bsd exit ;; CRAY*Y-MP:*:*:*) echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit ;; CRAY*[A-Z]90:*:*:*) echo ${UNAME_MACHINE}-cray-unicos${UNAME_RELEASE} \ | sed -e 's/CRAY.*\([A-Z]90\)/\1/' \ -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ \ -e 's/\.[^.]*$/.X/' exit ;; CRAY*TS:*:*:*) echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit ;; CRAY*T3E:*:*:*) echo alphaev5-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit ;; CRAY*SV1:*:*:*) echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit ;; *:UNICOS/mp:*:*) echo craynv-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit ;; F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*) FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'` echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" exit ;; 5000:UNIX_System_V:4.*:*) FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` FUJITSU_REL=`echo ${UNAME_RELEASE} | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/ /_/'` echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" exit ;; i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*) echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE} exit ;; sparc*:BSD/OS:*:*) echo sparc-unknown-bsdi${UNAME_RELEASE} exit ;; *:BSD/OS:*:*) echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE} exit ;; *:FreeBSD:*:*) case ${UNAME_MACHINE} in pc98) echo i386-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; amd64) echo x86_64-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; *) echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; esac exit ;; i*:CYGWIN*:*) echo ${UNAME_MACHINE}-pc-cygwin exit ;; *:MINGW*:*) echo ${UNAME_MACHINE}-pc-mingw32 exit ;; i*:windows32*:*) # uname -m includes "-pc" on this system. echo ${UNAME_MACHINE}-mingw32 exit ;; i*:PW*:*) echo ${UNAME_MACHINE}-pc-pw32 exit ;; *:Interix*:*) case ${UNAME_MACHINE} in x86) echo i586-pc-interix${UNAME_RELEASE} exit ;; authenticamd | genuineintel | EM64T) echo x86_64-unknown-interix${UNAME_RELEASE} exit ;; IA64) echo ia64-unknown-interix${UNAME_RELEASE} exit ;; esac ;; [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*) echo i${UNAME_MACHINE}-pc-mks exit ;; 8664:Windows_NT:*) echo x86_64-pc-mks exit ;; i*:Windows_NT*:* | Pentium*:Windows_NT*:*) # How do we know it's Interix rather than the generic POSIX subsystem? # It also conflicts with pre-2.0 versions of AT&T UWIN. Should we # UNAME_MACHINE based on the output of uname instead of i386? echo i586-pc-interix exit ;; i*:UWIN*:*) echo ${UNAME_MACHINE}-pc-uwin exit ;; amd64:CYGWIN*:*:* | x86_64:CYGWIN*:*:*) echo x86_64-unknown-cygwin exit ;; p*:CYGWIN*:*) echo powerpcle-unknown-cygwin exit ;; prep*:SunOS:5.*:*) echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit ;; *:GNU:*:*) # the GNU system echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'` exit ;; *:GNU/*:*:*) # other systems with GNU libc and userland echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-gnu exit ;; i*86:Minix:*:*) echo ${UNAME_MACHINE}-pc-minix exit ;; alpha:Linux:*:*) case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in EV5) UNAME_MACHINE=alphaev5 ;; EV56) UNAME_MACHINE=alphaev56 ;; PCA56) UNAME_MACHINE=alphapca56 ;; PCA57) UNAME_MACHINE=alphapca56 ;; EV6) UNAME_MACHINE=alphaev6 ;; EV67) UNAME_MACHINE=alphaev67 ;; EV68*) UNAME_MACHINE=alphaev68 ;; esac objdump --private-headers /bin/sh | grep -q ld.so.1 if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC} exit ;; arm*:Linux:*:*) eval $set_cc_for_build if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \ | grep -q __ARM_EABI__ then echo ${UNAME_MACHINE}-unknown-linux-gnu else echo ${UNAME_MACHINE}-unknown-linux-gnueabi fi exit ;; avr32*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; cris:Linux:*:*) echo cris-axis-linux-gnu exit ;; crisv32:Linux:*:*) echo crisv32-axis-linux-gnu exit ;; frv:Linux:*:*) echo frv-unknown-linux-gnu exit ;; i*86:Linux:*:*) LIBC=gnu eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #ifdef __dietlibc__ LIBC=dietlibc #endif EOF eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^LIBC'` echo "${UNAME_MACHINE}-pc-linux-${LIBC}" exit ;; ia64:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; m32r*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; m68*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; mips:Linux:*:* | mips64:Linux:*:*) eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #undef CPU #undef ${UNAME_MACHINE} #undef ${UNAME_MACHINE}el #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL) CPU=${UNAME_MACHINE}el #else #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB) CPU=${UNAME_MACHINE} #else CPU= #endif #endif EOF eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^CPU'` test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; } ;; or32:Linux:*:*) echo or32-unknown-linux-gnu exit ;; padre:Linux:*:*) echo sparc-unknown-linux-gnu exit ;; parisc64:Linux:*:* | hppa64:Linux:*:*) echo hppa64-unknown-linux-gnu exit ;; parisc:Linux:*:* | hppa:Linux:*:*) # Look for CPU level case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in PA7*) echo hppa1.1-unknown-linux-gnu ;; PA8*) echo hppa2.0-unknown-linux-gnu ;; *) echo hppa-unknown-linux-gnu ;; esac exit ;; ppc64:Linux:*:*) echo powerpc64-unknown-linux-gnu exit ;; ppc:Linux:*:*) echo powerpc-unknown-linux-gnu exit ;; s390:Linux:*:* | s390x:Linux:*:*) echo ${UNAME_MACHINE}-ibm-linux exit ;; sh64*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; sh*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; sparc:Linux:*:* | sparc64:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; vax:Linux:*:*) echo ${UNAME_MACHINE}-dec-linux-gnu exit ;; x86_64:Linux:*:*) echo x86_64-unknown-linux-gnu exit ;; xtensa*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; i*86:DYNIX/ptx:4*:*) # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there. # earlier versions are messed up and put the nodename in both # sysname and nodename. echo i386-sequent-sysv4 exit ;; i*86:UNIX_SV:4.2MP:2.*) # Unixware is an offshoot of SVR4, but it has its own version # number series starting with 2... # I am not positive that other SVR4 systems won't match this, # I just have to hope. -- rms. # Use sysv4.2uw... so that sysv4* matches it. echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION} exit ;; i*86:OS/2:*:*) # If we were able to find `uname', then EMX Unix compatibility # is probably installed. echo ${UNAME_MACHINE}-pc-os2-emx exit ;; i*86:XTS-300:*:STOP) echo ${UNAME_MACHINE}-unknown-stop exit ;; i*86:atheos:*:*) echo ${UNAME_MACHINE}-unknown-atheos exit ;; i*86:syllable:*:*) echo ${UNAME_MACHINE}-pc-syllable exit ;; i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.[02]*:*) echo i386-unknown-lynxos${UNAME_RELEASE} exit ;; i*86:*DOS:*:*) echo ${UNAME_MACHINE}-pc-msdosdjgpp exit ;; i*86:*:4.*:* | i*86:SYSTEM_V:4.*:*) UNAME_REL=`echo ${UNAME_RELEASE} | sed 's/\/MP$//'` if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then echo ${UNAME_MACHINE}-univel-sysv${UNAME_REL} else echo ${UNAME_MACHINE}-pc-sysv${UNAME_REL} fi exit ;; i*86:*:5:[678]*) # UnixWare 7.x, OpenUNIX and OpenServer 6. case `/bin/uname -X | grep "^Machine"` in *486*) UNAME_MACHINE=i486 ;; *Pentium) UNAME_MACHINE=i586 ;; *Pent*|*Celeron) UNAME_MACHINE=i686 ;; esac echo ${UNAME_MACHINE}-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION} exit ;; i*86:*:3.2:*) if test -f /usr/options/cb.name; then UNAME_REL=`sed -n 's/.*Version //p' /dev/null >/dev/null ; then UNAME_REL=`(/bin/uname -X|grep Release|sed -e 's/.*= //')` (/bin/uname -X|grep i80486 >/dev/null) && UNAME_MACHINE=i486 (/bin/uname -X|grep '^Machine.*Pentium' >/dev/null) \ && UNAME_MACHINE=i586 (/bin/uname -X|grep '^Machine.*Pent *II' >/dev/null) \ && UNAME_MACHINE=i686 (/bin/uname -X|grep '^Machine.*Pentium Pro' >/dev/null) \ && UNAME_MACHINE=i686 echo ${UNAME_MACHINE}-pc-sco$UNAME_REL else echo ${UNAME_MACHINE}-pc-sysv32 fi exit ;; pc:*:*:*) # Left here for compatibility: # uname -m prints for DJGPP always 'pc', but it prints nothing about # the processor, so we play safe by assuming i586. # Note: whatever this is, it MUST be the same as what config.sub # prints for the "djgpp" host, or else GDB configury will decide that # this is a cross-build. echo i586-pc-msdosdjgpp exit ;; Intel:Mach:3*:*) echo i386-pc-mach3 exit ;; paragon:*:*:*) echo i860-intel-osf1 exit ;; i860:*:4.*:*) # i860-SVR4 if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then echo i860-stardent-sysv${UNAME_RELEASE} # Stardent Vistra i860-SVR4 else # Add other i860-SVR4 vendors below as they are discovered. echo i860-unknown-sysv${UNAME_RELEASE} # Unknown i860-SVR4 fi exit ;; mini*:CTIX:SYS*5:*) # "miniframe" echo m68010-convergent-sysv exit ;; mc68k:UNIX:SYSTEM5:3.51m) echo m68k-convergent-sysv exit ;; M680?0:D-NIX:5.3:*) echo m68k-diab-dnix exit ;; M68*:*:R3V[5678]*:*) test -r /sysV68 && { echo 'm68k-motorola-sysv'; exit; } ;; 3[345]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 3[34]??/*:*:4.0:3.0 | 4400:*:4.0:3.0 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.0 | SDS2:*:4.0:3.0 | SHG2:*:4.0:3.0 | S7501*:*:4.0:3.0) OS_REL='' test -r /etc/.relid \ && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid` /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ && { echo i486-ncr-sysv4.3${OS_REL}; exit; } /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;; 3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*) /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ && { echo i486-ncr-sysv4; exit; } ;; NCR*:*:4.2:* | MPRAS*:*:4.2:*) OS_REL='.3' test -r /etc/.relid \ && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid` /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ && { echo i486-ncr-sysv4.3${OS_REL}; exit; } /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ && { echo i586-ncr-sysv4.3${OS_REL}; exit; } /bin/uname -p 2>/dev/null | /bin/grep pteron >/dev/null \ && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;; m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*) echo m68k-unknown-lynxos${UNAME_RELEASE} exit ;; mc68030:UNIX_System_V:4.*:*) echo m68k-atari-sysv4 exit ;; TSUNAMI:LynxOS:2.*:*) echo sparc-unknown-lynxos${UNAME_RELEASE} exit ;; rs6000:LynxOS:2.*:*) echo rs6000-unknown-lynxos${UNAME_RELEASE} exit ;; PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.[02]*:*) echo powerpc-unknown-lynxos${UNAME_RELEASE} exit ;; SM[BE]S:UNIX_SV:*:*) echo mips-dde-sysv${UNAME_RELEASE} exit ;; RM*:ReliantUNIX-*:*:*) echo mips-sni-sysv4 exit ;; RM*:SINIX-*:*:*) echo mips-sni-sysv4 exit ;; *:SINIX-*:*:*) if uname -p 2>/dev/null >/dev/null ; then UNAME_MACHINE=`(uname -p) 2>/dev/null` echo ${UNAME_MACHINE}-sni-sysv4 else echo ns32k-sni-sysv fi exit ;; PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort # says echo i586-unisys-sysv4 exit ;; *:UNIX_System_V:4*:FTX*) # From Gerald Hewes . # How about differentiating between stratus architectures? -djm echo hppa1.1-stratus-sysv4 exit ;; *:*:*:FTX*) # From seanf@swdc.stratus.com. echo i860-stratus-sysv4 exit ;; i*86:VOS:*:*) # From Paul.Green@stratus.com. echo ${UNAME_MACHINE}-stratus-vos exit ;; *:VOS:*:*) # From Paul.Green@stratus.com. echo hppa1.1-stratus-vos exit ;; mc68*:A/UX:*:*) echo m68k-apple-aux${UNAME_RELEASE} exit ;; news*:NEWS-OS:6*:*) echo mips-sony-newsos6 exit ;; R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*) if [ -d /usr/nec ]; then echo mips-nec-sysv${UNAME_RELEASE} else echo mips-unknown-sysv${UNAME_RELEASE} fi exit ;; BeBox:BeOS:*:*) # BeOS running on hardware made by Be, PPC only. echo powerpc-be-beos exit ;; BeMac:BeOS:*:*) # BeOS running on Mac or Mac clone, PPC only. echo powerpc-apple-beos exit ;; BePC:BeOS:*:*) # BeOS running on Intel PC compatible. echo i586-pc-beos exit ;; BePC:Haiku:*:*) # Haiku running on Intel PC compatible. echo i586-pc-haiku exit ;; SX-4:SUPER-UX:*:*) echo sx4-nec-superux${UNAME_RELEASE} exit ;; SX-5:SUPER-UX:*:*) echo sx5-nec-superux${UNAME_RELEASE} exit ;; SX-6:SUPER-UX:*:*) echo sx6-nec-superux${UNAME_RELEASE} exit ;; SX-7:SUPER-UX:*:*) echo sx7-nec-superux${UNAME_RELEASE} exit ;; SX-8:SUPER-UX:*:*) echo sx8-nec-superux${UNAME_RELEASE} exit ;; SX-8R:SUPER-UX:*:*) echo sx8r-nec-superux${UNAME_RELEASE} exit ;; Power*:Rhapsody:*:*) echo powerpc-apple-rhapsody${UNAME_RELEASE} exit ;; *:Rhapsody:*:*) echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE} exit ;; *:Darwin:*:*) UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown case $UNAME_PROCESSOR in i386) eval $set_cc_for_build if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \ (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \ grep IS_64BIT_ARCH >/dev/null then UNAME_PROCESSOR="x86_64" fi fi ;; unknown) UNAME_PROCESSOR=powerpc ;; esac echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE} exit ;; *:procnto*:*:* | *:QNX:[0123456789]*:*) UNAME_PROCESSOR=`uname -p` if test "$UNAME_PROCESSOR" = "x86"; then UNAME_PROCESSOR=i386 UNAME_MACHINE=pc fi echo ${UNAME_PROCESSOR}-${UNAME_MACHINE}-nto-qnx${UNAME_RELEASE} exit ;; *:QNX:*:4*) echo i386-pc-qnx exit ;; NSE-?:NONSTOP_KERNEL:*:*) echo nse-tandem-nsk${UNAME_RELEASE} exit ;; NSR-?:NONSTOP_KERNEL:*:*) echo nsr-tandem-nsk${UNAME_RELEASE} exit ;; *:NonStop-UX:*:*) echo mips-compaq-nonstopux exit ;; BS2000:POSIX*:*:*) echo bs2000-siemens-sysv exit ;; DS/*:UNIX_System_V:*:*) echo ${UNAME_MACHINE}-${UNAME_SYSTEM}-${UNAME_RELEASE} exit ;; *:Plan9:*:*) # "uname -m" is not consistent, so use $cputype instead. 386 # is converted to i386 for consistency with other x86 # operating systems. if test "$cputype" = "386"; then UNAME_MACHINE=i386 else UNAME_MACHINE="$cputype" fi echo ${UNAME_MACHINE}-unknown-plan9 exit ;; *:TOPS-10:*:*) echo pdp10-unknown-tops10 exit ;; *:TENEX:*:*) echo pdp10-unknown-tenex exit ;; KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*) echo pdp10-dec-tops20 exit ;; XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*) echo pdp10-xkl-tops20 exit ;; *:TOPS-20:*:*) echo pdp10-unknown-tops20 exit ;; *:ITS:*:*) echo pdp10-unknown-its exit ;; SEI:*:*:SEIUX) echo mips-sei-seiux${UNAME_RELEASE} exit ;; *:DragonFly:*:*) echo ${UNAME_MACHINE}-unknown-dragonfly`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` exit ;; *:*VMS:*:*) UNAME_MACHINE=`(uname -p) 2>/dev/null` case "${UNAME_MACHINE}" in A*) echo alpha-dec-vms ; exit ;; I*) echo ia64-dec-vms ; exit ;; V*) echo vax-dec-vms ; exit ;; esac ;; *:XENIX:*:SysV) echo i386-pc-xenix exit ;; i*86:skyos:*:*) echo ${UNAME_MACHINE}-pc-skyos`echo ${UNAME_RELEASE}` | sed -e 's/ .*$//' exit ;; i*86:rdos:*:*) echo ${UNAME_MACHINE}-pc-rdos exit ;; i*86:AROS:*:*) echo ${UNAME_MACHINE}-pc-aros exit ;; esac #echo '(No uname command or uname output not recognized.)' 1>&2 #echo "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" 1>&2 eval $set_cc_for_build cat >$dummy.c < # include #endif main () { #if defined (sony) #if defined (MIPSEB) /* BFD wants "bsd" instead of "newsos". Perhaps BFD should be changed, I don't know.... */ printf ("mips-sony-bsd\n"); exit (0); #else #include printf ("m68k-sony-newsos%s\n", #ifdef NEWSOS4 "4" #else "" #endif ); exit (0); #endif #endif #if defined (__arm) && defined (__acorn) && defined (__unix) printf ("arm-acorn-riscix\n"); exit (0); #endif #if defined (hp300) && !defined (hpux) printf ("m68k-hp-bsd\n"); exit (0); #endif #if defined (NeXT) #if !defined (__ARCHITECTURE__) #define __ARCHITECTURE__ "m68k" #endif int version; version=`(hostinfo | sed -n 's/.*NeXT Mach \([0-9]*\).*/\1/p') 2>/dev/null`; if (version < 4) printf ("%s-next-nextstep%d\n", __ARCHITECTURE__, version); else printf ("%s-next-openstep%d\n", __ARCHITECTURE__, version); exit (0); #endif #if defined (MULTIMAX) || defined (n16) #if defined (UMAXV) printf ("ns32k-encore-sysv\n"); exit (0); #else #if defined (CMU) printf ("ns32k-encore-mach\n"); exit (0); #else printf ("ns32k-encore-bsd\n"); exit (0); #endif #endif #endif #if defined (__386BSD__) printf ("i386-pc-bsd\n"); exit (0); #endif #if defined (sequent) #if defined (i386) printf ("i386-sequent-dynix\n"); exit (0); #endif #if defined (ns32000) printf ("ns32k-sequent-dynix\n"); exit (0); #endif #endif #if defined (_SEQUENT_) struct utsname un; uname(&un); if (strncmp(un.version, "V2", 2) == 0) { printf ("i386-sequent-ptx2\n"); exit (0); } if (strncmp(un.version, "V1", 2) == 0) { /* XXX is V1 correct? */ printf ("i386-sequent-ptx1\n"); exit (0); } printf ("i386-sequent-ptx\n"); exit (0); #endif #if defined (vax) # if !defined (ultrix) # include # if defined (BSD) # if BSD == 43 printf ("vax-dec-bsd4.3\n"); exit (0); # else # if BSD == 199006 printf ("vax-dec-bsd4.3reno\n"); exit (0); # else printf ("vax-dec-bsd\n"); exit (0); # endif # endif # else printf ("vax-dec-bsd\n"); exit (0); # endif # else printf ("vax-dec-ultrix\n"); exit (0); # endif #endif #if defined (alliant) && defined (i860) printf ("i860-alliant-bsd\n"); exit (0); #endif exit (1); } EOF $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null && SYSTEM_NAME=`$dummy` && { echo "$SYSTEM_NAME"; exit; } # Apollos put the system type in the environment. test -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit; } # Convex versions that predate uname can use getsysinfo(1) if [ -x /usr/convex/getsysinfo ] then case `getsysinfo -f cpu_type` in c1*) echo c1-convex-bsd exit ;; c2*) if getsysinfo -f scalar_acc then echo c32-convex-bsd else echo c2-convex-bsd fi exit ;; c34*) echo c34-convex-bsd exit ;; c38*) echo c38-convex-bsd exit ;; c4*) echo c4-convex-bsd exit ;; esac fi cat >&2 < in order to provide the needed information to handle your system. config.guess timestamp = $timestamp uname -m = `(uname -m) 2>/dev/null || echo unknown` uname -r = `(uname -r) 2>/dev/null || echo unknown` uname -s = `(uname -s) 2>/dev/null || echo unknown` uname -v = `(uname -v) 2>/dev/null || echo unknown` /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null` /bin/uname -X = `(/bin/uname -X) 2>/dev/null` hostinfo = `(hostinfo) 2>/dev/null` /bin/universe = `(/bin/universe) 2>/dev/null` /usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null` /bin/arch = `(/bin/arch) 2>/dev/null` /usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null` /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null` UNAME_MACHINE = ${UNAME_MACHINE} UNAME_RELEASE = ${UNAME_RELEASE} UNAME_SYSTEM = ${UNAME_SYSTEM} UNAME_VERSION = ${UNAME_VERSION} EOF exit 1 # Local variables: # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "timestamp='" # time-stamp-format: "%:y-%02m-%02d" # time-stamp-end: "'" # End: libprelude-1.0.0/configure.in0000664000076400007640000005601411345707162013117 00000000000000AC_INIT AC_CONFIG_SRCDIR([src]) AC_PREREQ(2.59) AC_CANONICAL_HOST AC_CANONICAL_TARGET dnl ********************************************************** dnl * Version and release information dnl ********************************************************** libprelude_major=1 libprelude_minor=0 libprelude_micro=0 libprelude_patchlevel= libprelude_version=$libprelude_major.$libprelude_minor.$libprelude_micro$libprelude_patchlevel dnl ********************************************************** dnl * Library soname (http://sources.redhat.com/autobook/autobook/autobook_91.html#SEC91) dnl ********************************************************** libprelude_current=21 libprelude_revision=1 libprelude_age=19 LIBPRELUDE_SONAME=$libprelude_current:$libprelude_revision:$libprelude_age libpreludecpp_current=3 libpreludecpp_revision=0 libpreludecpp_age=3 LIBPRELUDECPP_SONAME=$libpreludecpp_current:$libpreludecpp_revision:$libpreludecpp_age AM_INIT_AUTOMAKE(libprelude, $libprelude_version) AC_CONFIG_HEADER(config.h) AM_MAINTAINER_MODE dnl ********************************************************** dnl * Check required program. dnl ********************************************************** AC_PROG_CC AC_PROG_CXX AC_PROG_INSTALL AC_PROG_MAKE_SET AM_PROG_LEX AC_PROG_YACC AC_PATH_PROG(GREP, grep, no) # for prelude-config.h generation BINDINGS_CC="$CC" dnl ********************************************************** dnl * Setup GnuLib, libtool and libltdl. dnl ********************************************************** gl_EARLY LT_CONFIG_LTDL_DIR([libltdl]) AC_CONFIG_MACRO_DIR([m4]) LT_INIT([dlopen win32-dll disable-static]) LTDL_INIT([recursive]) dnl ********************************************************** dnl * When cross compiling, we need to compile and run a program on the build machine. dnl ********************************************************** AC_MSG_CHECKING(for cc for build) if test "$cross_compiling" = "yes"; then CC_FOR_BUILD="${CC_FOR_BUILD-cc}" else CC_FOR_BUILD="${CC_FOR_BUILD-$CC}" fi AC_MSG_RESULT($CC_FOR_BUILD) AC_ARG_VAR(CC_FOR_BUILD,[build system C compiler]) dnl ********************************************************** dnl * Checks to see if ANSI C99 CPP variable __func__ works. * dnl ********************************************************** dnl From http://lists.gnu.org/archive/html/bug-autoconf/2002-07/msg00028.html AC_DEFUN([AC_CPP_FUNC], [AC_REQUIRE([AC_PROG_CC_STDC])dnl AC_CACHE_CHECK([for an ANSI C99-conforming __func__], ac_cv_cpp_func, [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([], [[char *foo = __func__;]])], [ac_cv_cpp_func=yes], [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([], [[char *foo = __FUNCTION__;]])], [ac_cv_cpp_func=__FUNCTION__], [ac_cv_cpp_func=no])])]) if test $ac_cv_cpp_func = yes; then AC_DEFINE(__PRELUDE_FUNC__, __func__, [Define to __FUNCTION__ or "" if `__func__' does not conform to ANSI C.]) elif test $ac_cv_cpp_func = __FUNCTION__; then AC_DEFINE(__PRELUDE_FUNC__, __FUNCTION__, [Define to __FUNCTION__ or "" if `__func__' does not conform to ANSI C.]) elif test $ac_cv_cpp_func = no; then AC_DEFINE(__PRELUDE_FUNC__, "", [Define to __FUNCTION__ or "" if `__func__' does not conform to ANSI C.]) fi ]) AC_CPP_FUNC dnl ************************************************** dnl * Check for Pthread library * dnl ************************************************** PTHREAD_LIBS=@LTLIBMULTITHREAD@ PTHREAD_LDFLAGS="" PTHREAD_CFLAGS=$THREADCPPFLAGS AC_SUBST(PTHREAD_LDFLAGS) AC_SUBST(PTHREAD_CFLAGS) AC_SUBST(PTHREAD_LIBS) dnl *** dnl *** Can we use -Werror -Wmissing-braces for some checks ? *** AX_C_CHECK_FLAG(-Werror -Wmissing-braces, , , buggy_pthread_cppflags="-Werror -Wmissing-braces") old_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS $buggy_pthread_cppflags" AC_MSG_CHECKING(for buggy pthread mutex initializers) AC_TRY_COMPILE( [ #include ], [ static pthread_mutex_t mutex = PTHREAD_MUTEX_INITIALIZER; ], compile_ok="yes", compile_ok="no") CFLAGS="$old_CFLAGS" if test x$compile_ok = xyes; then AC_MSG_RESULT(no) else AC_MSG_RESULT(yes) buggy_pthread_initializers="yes" fi dnl ************************************************** dnl * Check endianess * dnl ************************************************** AC_C_BIGENDIAN(AC_DEFINE_UNQUOTED(PRELUDE_WORDS_BIGENDIAN, , Byte ordering)) dnl ************************************************** dnl * Check for GnuTLS. * dnl ************************************************** GNUTLS_MIN_VERSION=1.0.17 PKG_CHECK_MODULES([LIBGNUTLS], [gnutls >= $GNUTLS_MIN_VERSION], [], [AM_PATH_LIBGNUTLS($GNUTLS_MIN_VERSION, [], [AC_MSG_ERROR($LIBGNUTLS_PKG_ERRORS)])]) old_LIBS=$LIBS old_CPPFLAGS=$CPPFLAGS LIBS="$LIBGNUTLS_LIBS" CPPFLAGS="$LIBGNUTLS_CFLAGS" AC_CHECK_HEADER(gnutls/gnutls.h, , AC_MSG_ERROR("GnuTLS development headers are required to build libprelude")) dnl dnl Recent GnuTLS version moved SRP function from libgnutls-extra to libgnutls dnl AC_CHECK_LIB(gnutls, gnutls_srp_verifier, srp_available=yes, srp_available=no) AC_CHECK_LIB(gnutls, gnutls_x509_crt_list_import, AC_DEFINE_UNQUOTED(HAVE_GNUTLS_X509_CRT_LIST_IMPORT, , Define whether GnuTLS provides gnutls_x509_crt_list_import,)) AC_CHECK_LIB(gnutls, gnutls_priority_init, gnutls_string_priority=yes, gnutls_string_priority=no) if test x$gnutls_string_priority = xyes; then AC_CHECK_LIB(gnutls, gnutls_priority_set, AC_DEFINE_UNQUOTED(HAVE_GNUTLS_STRING_PRIORITY, , Define whether GnuTLS provide priority parsing),) fi LIBS=$old_LIBS CPPFLAGS=$old_CPPFLAGS AC_SUBST(PRELUDE_ADMIN_LIBS) AC_SUBST(PRELUDE_ADMIN_CFLAGS) if test x$srp_available = xno; then dnl ************************************************** dnl * Check for SRP function in GnuTLS extra. * dnl ************************************************** PKG_CHECK_MODULES([LIBGNUTLS_EXTRA], [gnutls-extra >= $GNUTLS_MIN_VERSION], [gnutls_extra=yes], [AM_PATH_LIBGNUTLS_EXTRA($GNUTLS_MIN_VERSION, gnutls_extra=yes, gnutls_extra=no)]) if test x$gnutls_extra = xyes; then old_LIBS=$LIBS LIBS="$LIBGNUTLS_EXTRA_LIBS" old_CPPFLAGS=$CPPFLAGS CPPFLAGS="$LIBGNUTLS_EXTRA_CFLAGS" AC_CHECK_HEADER(gnutls/extra.h, [AC_CHECK_LIB(gnutls-extra, gnutls_srp_verifier, srp_available=yes, srp_available=no)], srp_available=no) if test x$srp_available = xyes; then AC_DEFINE_UNQUOTED(GNUTLS_SRP_ENABLED, , Define whether SRP support is enabled) PRELUDE_ADMIN_CFLAGS="-DNEED_GNUTLS_EXTRA $LIBGNUTLS_EXTRA_CFLAGS" PRELUDE_ADMIN_LIBS="$LIBGNUTLS_EXTRA_LIBS" fi LIBS=$old_LIBS CPPFLAGS=$old_CPPFLAGS fi fi dnl ************************************************** dnl * Check for Gcrypt. * dnl ************************************************** AM_PATH_LIBGCRYPT(1:1.1.94,, AC_MSG_ERROR([[ *** *** libgcrypt was not found. You may want to get it from *** ftp://ftp.gnupg.org/gcrypt/libgcrypt/ *** ]])) LIBPRELUDE_LIBS="$LIBPRELUDE_LIBS $LIBGNUTLS_LIBS $LIBGCRYPT_LIBS" dnl ************************************************** dnl * Check for Ipv6. * dnl ************************************************** AC_CHECK_TYPES([struct sockaddr_in6], have_ipv6_type=yes,, [ #include #include #include ]) AC_CHECK_DECL(AF_INET6, have_ipv6_def=yes,, [ #include #include #include ]) if test x$have_ipv6_type = xyes && test x$have_ipv6_def = xyes; then AC_DEFINE_UNQUOTED(HAVE_IPV6, , Define whether Ipv6 is available on this system) fi dnl ************************************************** dnl * Check for variadic macros * dnl ************************************************** AC_MSG_CHECKING(whether variadic macros are supported) AC_TRY_COMPILE( [ #include #include #define print_me(...) printf(__VA_ARGS__) ], [ print_me("test __VA_ARGS__: %s, %d, %d", "a", 0, 1); return 0; ], have_variadic_macros=yes, have_variadic_macros=no) if test x$have_variadic_macros = xyes; then AC_MSG_RESULT(yes) AC_DEFINE_UNQUOTED(HAVE_VARIADIC_MACROS, 1, [Define whether variadic macros are supported]) else AC_MSG_RESULT(no) fi dnl ************************************************** dnl * Do we need aligned access ? (from tcpdump) * dnl ************************************************** AX_CHECK_ALIGNED_ACCESS_REQUIRED if test "$ax_cv_have_aligned_access_required" = yes; then AC_DEFINE_UNQUOTED(PRELUDE_ALIGNED_ACCESS, , Define wether we need to take care with alignment) fi dnl ************************************ dnl * va_copy checks (Thanks Glib!) * dnl ************************************ dnl dnl we currently check for all three va_copy possibilities, so we get dnl all results in config.log for bug reports. AC_CACHE_CHECK([for an implementation of va_copy()],prelude_cv_va_copy,[ AC_LINK_IFELSE([#include void f (int i, ...) { va_list args1, args2; va_start (args1, i); va_copy (args2, args1); if (va_arg (args2, int) != 42 || va_arg (args1, int) != 42) exit (1); va_end (args1); va_end (args2); } int main() { f (0, 42); return 0; }], [prelude_cv_va_copy=yes], [prelude_cv_va_copy=no]) ]) AC_CACHE_CHECK([for an implementation of __va_copy()],prelude_cv___va_copy,[ AC_LINK_IFELSE([#include void f (int i, ...) { va_list args1, args2; va_start (args1, i); __va_copy (args2, args1); if (va_arg (args2, int) != 42 || va_arg (args1, int) != 42) exit (1); va_end (args1); va_end (args2); } int main() { f (0, 42); return 0; }], [prelude_cv___va_copy=yes], [prelude_cv___va_copy=no]) ]) if test "x$prelude_cv_va_copy" = "xyes"; then g_va_copy_func=va_copy else if test "x$prelude_cv___va_copy" = "xyes"; then g_va_copy_func=__va_copy fi fi if test -n "$g_va_copy_func"; then AC_DEFINE_UNQUOTED(PRELUDE_VA_COPY,$g_va_copy_func,[A 'va_copy' style function]) fi AC_CACHE_CHECK([whether va_lists can be copied by value],prelude_cv_va_val_copy,[ AC_TRY_RUN([#include void f (int i, ...) { va_list args1, args2; va_start (args1, i); args2 = args1; if (va_arg (args2, int) != 42 || va_arg (args1, int) != 42) exit (1); va_end (args1); va_end (args2); } int main() { f (0, 42); return 0; }], [prelude_cv_va_val_copy=yes], [prelude_cv_va_val_copy=no], [prelude_cv_va_val_copy=yes]) ]) if test "x$prelude_cv_va_val_copy" = "xno"; then AC_DEFINE(PRELUDE_VA_COPY_AS_ARRAY,1, ['va_lists' cannot be copies as values]) fi dnl ************************************************** dnl * Swig support * dnl ************************************************** AC_ARG_WITH(swig, AC_HELP_STRING(--with-swig@<:@=PATH@:>@, Re-generate perl/python bindings sources @<:@default=auto@:>@), [swig_required=true; if test x$withval = xyes; then with_swig="swig"; fi], with_swig="swig") if test x$with_swig != xno; then AC_PATH_PROG(SWIG, `basename $with_swig`, no, `dirname $with_swig`:$PATH) if test x$SWIG = xno; then if test x$swig_required = xtrue; then AC_MSG_ERROR([Could not find $with_swig binary]) fi fi fi AM_CONDITIONAL(HAVE_SWIG, test x$SWIG != xno) dnl ************************************************** dnl * Perl support * dnl ************************************************** AC_ARG_WITH(perl, AC_HELP_STRING(--with-perl@<:@=PATH@:>@, Enable support for perl binding @<:@default=auto@:>@), [perl_required=true; if test x$withval = xyes; then with_perl="perl"; fi], with_perl="perl") if test x$with_perl != xno; then AC_PATH_PROG(PERL, `basename $with_perl`, no, `dirname $with_perl`:$PATH) if test x$PERL = xno; then if test x$perl_required = xtrue; then AC_MSG_ERROR([Could not find $with_perl binary]) fi with_perl=no else PERL_CFLAGS="-I`$PERL -e 'use Config; print $Config{archlib}'`/CORE" old_CPPFLAGS="$CPPFLAGS" CPPFLAGS="$CPPFLAGS $PERL_CFLAGS" AC_CHECK_HEADER(EXTERN.h, [AC_CHECK_HEADER(perl.h, with_perl=yes, with_perl=no, [#include ])], with_perl=no) CPPFLAGS="$old_CPPFLAGS" fi fi AM_CONDITIONAL(HAVE_PERL, test x$with_perl = xyes) PERL_INSTALLDIRS="site" AC_ARG_WITH(perl-installdirs, AC_HELP_STRING(--with-perl-installdirs=@<:@site|vendor@:>@, Specify where to install the Perl module @<:@default=site@:>@), PERL_INSTALLDIRS="$withval") if test x$PERL_INSTALLDIRS != xsite && test x$PERL_INSTALLDIRS != xvendor; then AC_MSG_ERROR(Invalid value for --with-perl-installdirs: only "site" or "vendor" supported.) fi PERL_EXTRA_PARAMS="INSTALLDIRS=$PERL_INSTALLDIRS" AC_SUBST(PERL_EXTRA_PARAMS) dnl ************************************************** dnl * Python support * dnl ************************************************** AC_ARG_WITH(python, AC_HELP_STRING(--with-python@<:@=PATH@:>@, Enable support for python binding @<:@default=auto@:>@), [python_required=true; if test x$withval = xyes; then with_python="python"; fi], with_python="python") if test x$with_python != xno; then AC_PATH_PROG(PYTHON, `basename $with_python`, no, `dirname $with_python`:$PATH) if test x$PYTHON = xno; then if test x$python_required = xtrue; then AC_MSG_ERROR([Could not find $with_python binary]) fi with_python=no else old_CPPFLAGS="$CPPFLAGS" CPPFLAGS="-I`$PYTHON -c 'from distutils.sysconfig import get_python_inc; print get_python_inc()'`" AC_CHECK_HEADER(Python.h, with_python=yes, with_python=no) CPPFLAGS="$old_CPPFLAGS" fi fi AM_CONDITIONAL(HAVE_PYTHON, test x$with_python = xyes) dnl ************************************************** dnl * Ruby support * dnl ************************************************** AM_PATH_RUBY(,with_ruby=yes, with_ruby=no) if test x$with_ruby != xno; then RUBY_ARCHDIR=`$RUBY -e 'require "rbconfig.rb"; puts Config::expand("\$(archdir)")'` RUBY_LIBRUBYARG=`$RUBY -e 'require "rbconfig.rb"; puts Config::expand("\$(LIBRUBYARG)")'` RUBY_LIBS="-L$RUBY_ARCHDIR $RUBY_LIBRUBYARG" AC_SUBST(RUBY_LIBS) RUBY_CCFLAGS=`$RUBY -rrbconfig -e "print Config::CONFIG[['CFLAGS']]"` AC_SUBST(RUBY_CCFLAGS) old_CPPFLAGS="$CPPFLAGS" CPPFLAGS="$RUBY_INCLUDES" AC_CHECK_HEADER(ruby.h, with_ruby=yes, with_ruby=no) CPPFLAGS="$old_CPPFLAGS" fi AM_CONDITIONAL([HAVE_RUBY], [test x$with_ruby = xyes]) dnl ************************************************** dnl * LUA support * dnl ************************************************** AC_ARG_WITH(lua, AC_HELP_STRING(--with-lua-config@<:@=PATH@:>@, Enable support for lua binding @<:@default=auto@:>@), [lua_required=true; if test x$withval = xyes; then with_lua="lua-config"; fi], with_lua="lua-config") if test x$with_lua != xno; then lua_pkg_found=0 PKG_CHECK_MODULES(LUA, lua >= 5.1, [ AC_DEFINE([HAVE_LUA], [1], [liblua]) AC_DEFINE([HAVE_LUA_H], [1], [lua.h]) lua_pkg_found=1 ],[ PKG_CHECK_MODULES(LUA, lua5.1 >= 5.1, [ AC_DEFINE([HAVE_LUA], [1], [liblua]) AC_DEFINE([HAVE_LUA_H], [1], [lua.h]) lua_pkg_found=1 ], [ AC_MSG_WARN([*** lua >= 5.1 not found]) ]) ]) if test x$lua_pkg_found = x1; then AC_SUBST(LUA_CFLAGS) AC_SUBST(LUA_LIBS) old_CPPFLAGS="$CPPFLAGS" CPPFLAGS="$LUA_CFLAGS" AC_CHECK_HEADERS([lua.h lauxlib.h], with_lua=yes, [with_lua=no; break]) CPPFLAGS="$old_CPPFLAGS" else dnl try lua 5.0 AC_PATH_PROG(LUA_CONFIG, `basename $with_lua`, no, `dirname $with_lua`:$PATH) if test x$LUA_CONFIG = xno; then if test x$lua_required = xtrue; then AC_MSG_ERROR([Could not find $with_lua binary]) fi with_lua=no else LUA_CFLAGS=`$LUA_CONFIG --include --vmonly` LUA_LIBS=`$LUA_CONFIG --libs --vmonly` AC_SUBST(LUA_CFLAGS) AC_SUBST(LUA_LIBS) old_CPPFLAGS="$CPPFLAGS" CPPFLAGS="$LUA_CFLAGS" AC_CHECK_HEADERS([lua.h lauxlib.h], with_lua=yes, [with_lua=no; break]) CPPFLAGS="$old_CPPFLAGS" fi fi fi AM_CONDITIONAL(HAVE_LUA, test x$with_lua = xyes) dnl ************************************************** dnl * Easy bindings support * dnl ************************************************** AC_ARG_ENABLE(easy-bindings, AC_HELP_STRING(--enable-easy-bindings, Enable support for high level binding @<:@default=yes@:>@), enable_easy_bindings=$enableval, enable_easy_bindings="yes") AM_CONDITIONAL(HAVE_EASY_BINDINGS, test x$enable_easy_bindings = xyes) if test x$enable_easy_bindings = xyes; then AC_CHECK_PROG(HAVE_CXX, $CXX, yes, no) if test x$HAVE_CXX != xyes; then AC_MSG_ERROR([Easybindings require a C++ compiler, but none were found.]) fi fi dnl ************************************************** dnl * Valgrind support * dnl ************************************************** AC_ARG_WITH(valgrind, AC_HELP_STRING(--with-python@<:@=PATH@:>@, Valgrind support for unit testing @<:@default=auto@:>@), [valgrind_required=true; if test x$withval = xyes; then with_valgrind="valgrind"; fi], with_valgrind="valgrind") if test x$with_valgrind != xno; then AC_PATH_PROG(VALGRIND, `basename $with_valgrind`, no, `dirname $with_valgrind`:$PATH) if test x$VALGRIND = xno; then if test x$valgrind_required = xtrue; then AC_MSG_ERROR([Could not find $with_valgrind binary]) fi with_valgrind=no else with_valgrind=yes fi fi AM_CONDITIONAL(HAVE_VALGRIND, test x$with_valgrind = xyes) dnl ************************************************** dnl * Typedefs, structures, compiler characteristics.* dnl ************************************************** dnl this need to be done before calling GnuLib, since dnl GnuLib might provide replacement for the different dnl types AC_C_CONST AC_TYPE_PID_T AC_TYPE_SIZE_T AC_CHECK_TYPES([uid_t, gid_t]) AC_HEADER_TIME AC_TYPE_LONG_LONG_INT AC_C_INLINE AC_SYS_LARGEFILE dnl ************************************************** dnl * Check for missing function replacement * dnl ************************************************** gl_SOURCE_BASE(libmissing) gl_M4_BASE(libmissing/m4) gl_INIT dnl ************************************************** dnl * Check for GTK-DOC * dnl ************************************************** GTK_DOC_CHECK(1.0) dnl ************************************************** dnl * Required headers / functions. * dnl ************************************************** dnl Needed for FIONREAD under solaris AC_CHECK_HEADERS_ONCE(sys/filio.h sys/un.h netinet/tcp.h) AC_CHECK_FUNCS(ftruncate chsize) AX_CREATE_PRELUDE_INTTYPES_H(src/include/prelude-inttypes.h) dnl ************************************************** dnl * Setup custom compiler flags * dnl ************************************************** AC_MSG_CHECKING(for cpu-specific compiler flags) if test "$host_cpu" == "x86_64" && test $enable_static = "yes"; then AC_MSG_RESULT(x86_64/static: adding -fPIC) AX_C_CHECK_FLAG(-fPIC, , , CPPFLAGS="$CPPFLAGS -fPIC") else AC_MSG_RESULT(none needed) fi AC_MSG_CHECKING(for platform-specific compiler flags) case "$host_os" in darwin*) # It may be called "cc", but it's really a GCC derivative # with a problematic special precompiler and precompiled # headers; turn off the special precompiler, as some # apparently-legal code won't compile with its precompiled # headers. AC_MSG_RESULT(Darwin: adding -no-cpp-precomp) AX_C_CHECK_FLAG(-no-cpp-precomp, , , PCFLAGS="$PCFLAGS -no-cpp-precomp") ;; *) AC_MSG_RESULT(none needed) ;; esac AX_LD_CHECK_FLAG(-z relro, , , LDFLAGS="$LDFLAGS -z relro") AX_LD_CHECK_FLAG(-z now, , , LDFLAGS="$LDFLAGS -z now") for i in -Wall -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations \ -Wbad-function-cast -Wcast-qual -Wcast-align -Wnested-externs -Wunused \ -Wformat -Wformat-security; do AX_C_CHECK_FLAG($i, , , PCFLAGS="$PCFLAGS $i") done if test x$buggy_pthread_initializers = xyes; then AX_C_CHECK_FLAG(-Wno-missing-braces, , , PCFLAGS="$PCFLAGS -Wno-missing-braces") fi dnl ************************************************** dnl * Setup build variable * dnl ************************************************** AC_SUBST(CFLAGS) AC_SUBST(PCFLAGS) AC_SUBST(CPPFLAGS) AC_SUBST(LDFLAGS) AC_SUBST(BINDINGS_CC) AC_SUBST(LIBPRELUDE_SONAME) AC_SUBST(LIBPRELUDECPP_SONAME) AC_SUBST(LIBPRELUDE_LIBS) AC_SUBST(LIBPRELUDE_CFLAGS) AC_SUBST(PRELUDE_ADMIN_LIBS) AC_SUBST(PRELUDE_SPOOL_DIR) AC_SUBST(PRELUDE_CONFIG_DIR) AS_AC_EXPAND(SYSCONFDIR, $sysconfdir) AS_AC_EXPAND(LOCALSTATEDIR, $localstatedir) AS_AC_EXPAND(LIBDIR, $libdir) AS_AC_EXPAND(BINDIR, $bindir) PRELUDE_SPOOL_DIR=$LOCALSTATEDIR/spool/prelude PRELUDE_CONFIG_DIR=$SYSCONFDIR/prelude AC_DEFINE_UNQUOTED(PRELUDE_SPOOL_DIR, "$PRELUDE_SPOOL_DIR", Prelude spool directory) AC_DEFINE_UNQUOTED(PRELUDE_CONFIG_DIR, "$PRELUDE_CONFIG_DIR", Prelude config directory) case "${host}" in i[[3456789]]86-*-mingw32*) WIN32="yes" ;; *cygwin*) WIN32="yes" ;; *) WIN32="no" ;; esac if test x$WIN32 = xyes; then AC_DEFINE_UNQUOTED(INSTALLDIR, "$BINDIR", Prelude library install directory) else AC_DEFINE_UNQUOTED(INSTALLDIR, "$LIBDIR", Prelude library install directory) fi AC_CONFIG_FILES([ Makefile client.conf global.conf idmef-client.conf libprelude-config libltdl/Makefile libmissing/Makefile libmissing/tests/Makefile m4/Makefile src/Makefile src/libprelude.pc src/libprelude-error/Makefile src/include/Makefile src/include/prelude.h src/include/prelude-inttypes.h prelude-admin/prelude-adduser prelude-admin/Makefile docs/Makefile docs/api/Makefile docs/manpages/Makefile bindings/Makefile bindings/low-level/Makefile bindings/low-level/perl/Makefile.PL bindings/low-level/python/Makefile bindings/low-level/python/setup.py bindings/c++/Makefile bindings/c++/include/Makefile bindings/lua/Makefile bindings/perl/Makefile.PL bindings/python/Makefile bindings/python/setup.py bindings/ruby/Makefile tests/Makefile ]) AC_CONFIG_COMMANDS([default],[[ chmod +x libprelude-config ]],[[]]) AC_OUTPUT echo echo "*** Dumping configuration ***" echo " - Generate documentation : $enable_gtk_doc" echo " - LUA binding : $with_lua" echo " - Perl binding : $with_perl" echo " - Python binding : $with_python" echo " - Ruby binding : $with_ruby" echo " - Easy bindings : $enable_easy_bindings" libprelude-1.0.0/missing0000755000076400007640000002623311347714452012205 00000000000000#! /bin/sh # Common stub for a few missing GNU programs while installing. scriptversion=2009-04-28.21; # UTC # Copyright (C) 1996, 1997, 1999, 2000, 2002, 2003, 2004, 2005, 2006, # 2008, 2009 Free Software Foundation, Inc. # Originally by Fran,cois Pinard , 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, 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, see . # 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. if test $# -eq 0; then echo 1>&2 "Try \`$0 --help' for more information" exit 1 fi run=: sed_output='s/.* --output[ =]\([^ ]*\).*/\1/p' sed_minuso='s/.* -o \([^ ]*\).*/\1/p' # In the cases where this matters, `missing' is being run in the # srcdir already. if test -f configure.ac; then configure_ac=configure.ac else configure_ac=configure.in fi msg="missing on your system" case $1 in --run) # Try to run requested program, and just exit if it succeeds. run= shift "$@" && exit 0 # Exit code 63 means version mismatch. This often happens # when the user try to use an ancient version of a tool on # a file that requires a minimum version. In this case we # we should proceed has if the program had been absent, or # if --run hadn't been passed. if test $? = 63; then run=: msg="probably too old" fi ;; -h|--h|--he|--hel|--help) echo "\ $0 [OPTION]... PROGRAM [ARGUMENT]... Handle \`PROGRAM [ARGUMENT]...' for when PROGRAM is missing, or return an error status if there is no known handling for PROGRAM. Options: -h, --help display this help and exit -v, --version output version information and exit --run try to run the given command, and emulate it if it fails Supported PROGRAM values: aclocal touch file \`aclocal.m4' autoconf touch file \`configure' autoheader touch file \`config.h.in' autom4te touch the output file, or create a stub one automake touch all \`Makefile.in' files bison create \`y.tab.[ch]', if possible, from existing .[ch] flex create \`lex.yy.c', if possible, from existing .c help2man touch the output file lex create \`lex.yy.c', if possible, from existing .c makeinfo touch the output file tar try tar, gnutar, gtar, then tar without non-portable flags yacc create \`y.tab.[ch]', if possible, from existing .[ch] Version suffixes to PROGRAM as well as the prefixes \`gnu-', \`gnu', and \`g' are ignored when checking the name. Send bug reports to ." exit $? ;; -v|--v|--ve|--ver|--vers|--versi|--versio|--version) echo "missing $scriptversion (GNU Automake)" exit $? ;; -*) echo 1>&2 "$0: Unknown \`$1' option" echo 1>&2 "Try \`$0 --help' for more information" exit 1 ;; esac # normalize program name to check for. program=`echo "$1" | sed ' s/^gnu-//; t s/^gnu//; t s/^g//; t'` # Now exit if we have it, but it failed. Also exit now if we # don't have it and --version was passed (most likely to detect # the program). This is about non-GNU programs, so use $1 not # $program. case $1 in lex*|yacc*) # Not GNU programs, they don't have --version. ;; tar*) if test -n "$run"; then echo 1>&2 "ERROR: \`tar' requires --run" exit 1 elif test "x$2" = "x--version" || test "x$2" = "x--help"; then exit 1 fi ;; *) if test -z "$run" && ($1 --version) > /dev/null 2>&1; then # We have it, but it failed. exit 1 elif test "x$2" = "x--version" || test "x$2" = "x--help"; then # Could not run --version or --help. This is probably someone # running `$TOOL --version' or `$TOOL --help' to check whether # $TOOL exists and not knowing $TOOL uses missing. exit 1 fi ;; esac # If it does not exist, or fails to run (possibly an outdated version), # try to emulate it. case $program in aclocal*) echo 1>&2 "\ WARNING: \`$1' is $msg. You should only need it if you modified \`acinclude.m4' or \`${configure_ac}'. You might want to install the \`Automake' and \`Perl' packages. Grab them from any GNU archive site." touch aclocal.m4 ;; autoconf*) echo 1>&2 "\ WARNING: \`$1' is $msg. You should only need it if you modified \`${configure_ac}'. You might want to install the \`Autoconf' and \`GNU m4' packages. Grab them from any GNU archive site." touch configure ;; autoheader*) echo 1>&2 "\ WARNING: \`$1' is $msg. You should only need it if you modified \`acconfig.h' or \`${configure_ac}'. You might want to install the \`Autoconf' and \`GNU m4' packages. Grab them from any GNU archive site." files=`sed -n 's/^[ ]*A[CM]_CONFIG_HEADER(\([^)]*\)).*/\1/p' ${configure_ac}` test -z "$files" && files="config.h" touch_files= for f in $files; do case $f in *:*) touch_files="$touch_files "`echo "$f" | sed -e 's/^[^:]*://' -e 's/:.*//'`;; *) touch_files="$touch_files $f.in";; esac done touch $touch_files ;; automake*) echo 1>&2 "\ WARNING: \`$1' is $msg. You should only need it if you modified \`Makefile.am', \`acinclude.m4' or \`${configure_ac}'. You might want to install the \`Automake' and \`Perl' packages. Grab them from any GNU archive site." find . -type f -name Makefile.am -print | sed 's/\.am$/.in/' | while read f; do touch "$f"; done ;; autom4te*) echo 1>&2 "\ WARNING: \`$1' is needed, but is $msg. You might have modified some files without having the proper tools for further handling them. You can get \`$1' as part of \`Autoconf' from any GNU archive site." file=`echo "$*" | sed -n "$sed_output"` test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"` if test -f "$file"; then touch $file else test -z "$file" || exec >$file echo "#! /bin/sh" echo "# Created by GNU Automake missing as a replacement of" echo "# $ $@" echo "exit 0" chmod +x $file exit 1 fi ;; bison*|yacc*) echo 1>&2 "\ WARNING: \`$1' $msg. You should only need it if you modified a \`.y' file. You may need the \`Bison' package in order for those modifications to take effect. You can get \`Bison' from any GNU archive site." rm -f y.tab.c y.tab.h if test $# -ne 1; then eval LASTARG="\${$#}" case $LASTARG in *.y) SRCFILE=`echo "$LASTARG" | sed 's/y$/c/'` if test -f "$SRCFILE"; then cp "$SRCFILE" y.tab.c fi SRCFILE=`echo "$LASTARG" | sed 's/y$/h/'` if test -f "$SRCFILE"; then cp "$SRCFILE" y.tab.h fi ;; esac fi if test ! -f y.tab.h; then echo >y.tab.h fi if test ! -f y.tab.c; then echo 'main() { return 0; }' >y.tab.c fi ;; lex*|flex*) echo 1>&2 "\ WARNING: \`$1' is $msg. You should only need it if you modified a \`.l' file. You may need the \`Flex' package in order for those modifications to take effect. You can get \`Flex' from any GNU archive site." rm -f lex.yy.c if test $# -ne 1; then eval LASTARG="\${$#}" case $LASTARG in *.l) SRCFILE=`echo "$LASTARG" | sed 's/l$/c/'` if test -f "$SRCFILE"; then cp "$SRCFILE" lex.yy.c fi ;; esac fi if test ! -f lex.yy.c; then echo 'main() { return 0; }' >lex.yy.c fi ;; help2man*) echo 1>&2 "\ WARNING: \`$1' is $msg. You should only need it if you modified a dependency of a manual page. You may need the \`Help2man' package in order for those modifications to take effect. You can get \`Help2man' from any GNU archive site." file=`echo "$*" | sed -n "$sed_output"` test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"` if test -f "$file"; then touch $file else test -z "$file" || exec >$file echo ".ab help2man is required to generate this page" exit $? fi ;; makeinfo*) echo 1>&2 "\ WARNING: \`$1' is $msg. You should only need it if you modified a \`.texi' or \`.texinfo' file, or any other file indirectly affecting the aspect of the manual. The spurious call might also be the consequence of using a buggy \`make' (AIX, DU, IRIX). You might want to install the \`Texinfo' package or the \`GNU make' package. Grab either from any GNU archive site." # The file to touch is that specified with -o ... file=`echo "$*" | sed -n "$sed_output"` test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"` if test -z "$file"; then # ... or it is the one specified with @setfilename ... infile=`echo "$*" | sed 's/.* \([^ ]*\) *$/\1/'` file=`sed -n ' /^@setfilename/{ s/.* \([^ ]*\) *$/\1/ p q }' $infile` # ... or it is derived from the source name (dir/f.texi becomes f.info) test -z "$file" && file=`echo "$infile" | sed 's,.*/,,;s,.[^.]*$,,'`.info fi # If the file does not exist, the user really needs makeinfo; # let's fail without touching anything. test -f $file || exit 1 touch $file ;; tar*) shift # We have already tried tar in the generic part. # Look for gnutar/gtar before invocation to avoid ugly error # messages. if (gnutar --version > /dev/null 2>&1); then gnutar "$@" && exit 0 fi if (gtar --version > /dev/null 2>&1); then gtar "$@" && exit 0 fi firstarg="$1" if shift; then case $firstarg in *o*) firstarg=`echo "$firstarg" | sed s/o//` tar "$firstarg" "$@" && exit 0 ;; esac case $firstarg in *h*) firstarg=`echo "$firstarg" | sed s/h//` tar "$firstarg" "$@" && exit 0 ;; esac fi echo 1>&2 "\ WARNING: I can't seem to be able to run \`tar' with the given arguments. You may want to install GNU tar or Free paxutils, or check the command line arguments." exit 1 ;; *) echo 1>&2 "\ WARNING: \`$1' is needed, and is $msg. You might have modified some files without having the proper tools for further handling them. Check the \`README' file, it often tells you about the needed prerequisites for installing this package. You may also peek at any GNU archive site, in case some other package would contain this missing \`$1' program." exit 1 ;; esac exit 0 # Local variables: # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "scriptversion=" # time-stamp-format: "%:y-%02m-%02d.%02H" # time-stamp-time-zone: "UTC" # time-stamp-end: "; # UTC" # End: libprelude-1.0.0/install-sh0000755000076400007640000003253711347714452012616 00000000000000#!/bin/sh # install - install a program, script, or datafile scriptversion=2009-04-28.21; # UTC # This originates from X11R5 (mit/util/scripts/install.sh), which was # later released in X11R6 (xc/config/util/install.sh) with the # following copyright and license. # # Copyright (C) 1994 X Consortium # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to # deal in the Software without restriction, including without limitation the # rights to use, copy, modify, merge, publish, distribute, sublicense, and/or # sell copies of the Software, and to permit persons to whom the Software is # furnished to do so, subject to the following conditions: # # The above copyright notice and this permission notice shall be included in # all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE # X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN # AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNEC- # TION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. # # Except as contained in this notice, the name of the X Consortium shall not # be used in advertising or otherwise to promote the sale, use or other deal- # ings in this Software without prior written authorization from the X Consor- # tium. # # # FSF changes to this file are in the public domain. # # Calling this script install-sh is preferred over install.sh, to prevent # `make' implicit rules from creating a file called install from it # when there is no Makefile. # # This script is compatible with the BSD install script, but was written # from scratch. nl=' ' IFS=" "" $nl" # set DOITPROG to echo to test this script # Don't use :- since 4.3BSD and earlier shells don't like it. doit=${DOITPROG-} if test -z "$doit"; then doit_exec=exec else doit_exec=$doit fi # Put in absolute file names if you don't have them in your path; # or use environment vars. chgrpprog=${CHGRPPROG-chgrp} chmodprog=${CHMODPROG-chmod} chownprog=${CHOWNPROG-chown} cmpprog=${CMPPROG-cmp} cpprog=${CPPROG-cp} mkdirprog=${MKDIRPROG-mkdir} mvprog=${MVPROG-mv} rmprog=${RMPROG-rm} stripprog=${STRIPPROG-strip} posix_glob='?' initialize_posix_glob=' test "$posix_glob" != "?" || { if (set -f) 2>/dev/null; then posix_glob= else posix_glob=: fi } ' posix_mkdir= # Desired mode of installed file. mode=0755 chgrpcmd= chmodcmd=$chmodprog chowncmd= mvcmd=$mvprog rmcmd="$rmprog -f" stripcmd= src= dst= dir_arg= dst_arg= copy_on_change=false no_target_directory= usage="\ Usage: $0 [OPTION]... [-T] SRCFILE DSTFILE or: $0 [OPTION]... SRCFILES... DIRECTORY or: $0 [OPTION]... -t DIRECTORY SRCFILES... or: $0 [OPTION]... -d DIRECTORIES... In the 1st form, copy SRCFILE to DSTFILE. In the 2nd and 3rd, copy all SRCFILES to DIRECTORY. In the 4th, create DIRECTORIES. Options: --help display this help and exit. --version display version info and exit. -c (ignored) -C install only if different (preserve the last data modification time) -d create directories instead of installing files. -g GROUP $chgrpprog installed files to GROUP. -m MODE $chmodprog installed files to MODE. -o USER $chownprog installed files to USER. -s $stripprog installed files. -t DIRECTORY install into DIRECTORY. -T report an error if DSTFILE is a directory. Environment variables override the default commands: CHGRPPROG CHMODPROG CHOWNPROG CMPPROG CPPROG MKDIRPROG MVPROG RMPROG STRIPPROG " while test $# -ne 0; do case $1 in -c) ;; -C) copy_on_change=true;; -d) dir_arg=true;; -g) chgrpcmd="$chgrpprog $2" shift;; --help) echo "$usage"; exit $?;; -m) mode=$2 case $mode in *' '* | *' '* | *' '* | *'*'* | *'?'* | *'['*) echo "$0: invalid mode: $mode" >&2 exit 1;; esac shift;; -o) chowncmd="$chownprog $2" shift;; -s) stripcmd=$stripprog;; -t) dst_arg=$2 shift;; -T) no_target_directory=true;; --version) echo "$0 $scriptversion"; exit $?;; --) shift break;; -*) echo "$0: invalid option: $1" >&2 exit 1;; *) break;; esac shift done if test $# -ne 0 && test -z "$dir_arg$dst_arg"; then # When -d is used, all remaining arguments are directories to create. # When -t is used, the destination is already specified. # Otherwise, the last argument is the destination. Remove it from $@. for arg do if test -n "$dst_arg"; then # $@ is not empty: it contains at least $arg. set fnord "$@" "$dst_arg" shift # fnord fi shift # arg dst_arg=$arg done fi if test $# -eq 0; then if test -z "$dir_arg"; then echo "$0: no input file specified." >&2 exit 1 fi # It's OK to call `install-sh -d' without argument. # This can happen when creating conditional directories. exit 0 fi if test -z "$dir_arg"; then trap '(exit $?); exit' 1 2 13 15 # Set umask so as not to create temps with too-generous modes. # However, 'strip' requires both read and write access to temps. case $mode in # Optimize common cases. *644) cp_umask=133;; *755) cp_umask=22;; *[0-7]) if test -z "$stripcmd"; then u_plus_rw= else u_plus_rw='% 200' fi cp_umask=`expr '(' 777 - $mode % 1000 ')' $u_plus_rw`;; *) if test -z "$stripcmd"; then u_plus_rw= else u_plus_rw=,u+rw fi cp_umask=$mode$u_plus_rw;; esac fi for src do # Protect names starting with `-'. case $src in -*) src=./$src;; esac if test -n "$dir_arg"; then dst=$src dstdir=$dst test -d "$dstdir" dstdir_status=$? else # Waiting for this to be detected by the "$cpprog $src $dsttmp" command # might cause directories to be created, which would be especially bad # if $src (and thus $dsttmp) contains '*'. if test ! -f "$src" && test ! -d "$src"; then echo "$0: $src does not exist." >&2 exit 1 fi if test -z "$dst_arg"; then echo "$0: no destination specified." >&2 exit 1 fi dst=$dst_arg # Protect names starting with `-'. case $dst in -*) dst=./$dst;; esac # If destination is a directory, append the input filename; won't work # if double slashes aren't ignored. if test -d "$dst"; then if test -n "$no_target_directory"; then echo "$0: $dst_arg: Is a directory" >&2 exit 1 fi dstdir=$dst dst=$dstdir/`basename "$src"` dstdir_status=0 else # Prefer dirname, but fall back on a substitute if dirname fails. dstdir=` (dirname "$dst") 2>/dev/null || expr X"$dst" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$dst" : 'X\(//\)[^/]' \| \ X"$dst" : 'X\(//\)$' \| \ X"$dst" : 'X\(/\)' \| . 2>/dev/null || echo X"$dst" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q' ` test -d "$dstdir" dstdir_status=$? fi fi obsolete_mkdir_used=false if test $dstdir_status != 0; then case $posix_mkdir in '') # Create intermediate dirs using mode 755 as modified by the umask. # This is like FreeBSD 'install' as of 1997-10-28. umask=`umask` case $stripcmd.$umask in # Optimize common cases. *[2367][2367]) mkdir_umask=$umask;; .*0[02][02] | .[02][02] | .[02]) mkdir_umask=22;; *[0-7]) mkdir_umask=`expr $umask + 22 \ - $umask % 100 % 40 + $umask % 20 \ - $umask % 10 % 4 + $umask % 2 `;; *) mkdir_umask=$umask,go-w;; esac # With -d, create the new directory with the user-specified mode. # Otherwise, rely on $mkdir_umask. if test -n "$dir_arg"; then mkdir_mode=-m$mode else mkdir_mode= fi posix_mkdir=false case $umask in *[123567][0-7][0-7]) # POSIX mkdir -p sets u+wx bits regardless of umask, which # is incompatible with FreeBSD 'install' when (umask & 300) != 0. ;; *) tmpdir=${TMPDIR-/tmp}/ins$RANDOM-$$ trap 'ret=$?; rmdir "$tmpdir/d" "$tmpdir" 2>/dev/null; exit $ret' 0 if (umask $mkdir_umask && exec $mkdirprog $mkdir_mode -p -- "$tmpdir/d") >/dev/null 2>&1 then if test -z "$dir_arg" || { # Check for POSIX incompatibilities with -m. # HP-UX 11.23 and IRIX 6.5 mkdir -m -p sets group- or # other-writeable bit of parent directory when it shouldn't. # FreeBSD 6.1 mkdir -m -p sets mode of existing directory. ls_ld_tmpdir=`ls -ld "$tmpdir"` case $ls_ld_tmpdir in d????-?r-*) different_mode=700;; d????-?--*) different_mode=755;; *) false;; esac && $mkdirprog -m$different_mode -p -- "$tmpdir" && { ls_ld_tmpdir_1=`ls -ld "$tmpdir"` test "$ls_ld_tmpdir" = "$ls_ld_tmpdir_1" } } then posix_mkdir=: fi rmdir "$tmpdir/d" "$tmpdir" else # Remove any dirs left behind by ancient mkdir implementations. rmdir ./$mkdir_mode ./-p ./-- 2>/dev/null fi trap '' 0;; esac;; esac if $posix_mkdir && ( umask $mkdir_umask && $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir" ) then : else # The umask is ridiculous, or mkdir does not conform to POSIX, # or it failed possibly due to a race condition. Create the # directory the slow way, step by step, checking for races as we go. case $dstdir in /*) prefix='/';; -*) prefix='./';; *) prefix='';; esac eval "$initialize_posix_glob" oIFS=$IFS IFS=/ $posix_glob set -f set fnord $dstdir shift $posix_glob set +f IFS=$oIFS prefixes= for d do test -z "$d" && continue prefix=$prefix$d if test -d "$prefix"; then prefixes= else if $posix_mkdir; then (umask=$mkdir_umask && $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir") && break # Don't fail if two instances are running concurrently. test -d "$prefix" || exit 1 else case $prefix in *\'*) qprefix=`echo "$prefix" | sed "s/'/'\\\\\\\\''/g"`;; *) qprefix=$prefix;; esac prefixes="$prefixes '$qprefix'" fi fi prefix=$prefix/ done if test -n "$prefixes"; then # Don't fail if two instances are running concurrently. (umask $mkdir_umask && eval "\$doit_exec \$mkdirprog $prefixes") || test -d "$dstdir" || exit 1 obsolete_mkdir_used=true fi fi fi if test -n "$dir_arg"; then { test -z "$chowncmd" || $doit $chowncmd "$dst"; } && { test -z "$chgrpcmd" || $doit $chgrpcmd "$dst"; } && { test "$obsolete_mkdir_used$chowncmd$chgrpcmd" = false || test -z "$chmodcmd" || $doit $chmodcmd $mode "$dst"; } || exit 1 else # Make a couple of temp file names in the proper directory. dsttmp=$dstdir/_inst.$$_ rmtmp=$dstdir/_rm.$$_ # Trap to clean up those temp files at exit. trap 'ret=$?; rm -f "$dsttmp" "$rmtmp" && exit $ret' 0 # Copy the file name to the temp name. (umask $cp_umask && $doit_exec $cpprog "$src" "$dsttmp") && # and set any options; do chmod last to preserve setuid bits. # # If any of these fail, we abort the whole thing. If we want to # ignore errors from any of these, just make sure not to ignore # errors from the above "$doit $cpprog $src $dsttmp" command. # { test -z "$chowncmd" || $doit $chowncmd "$dsttmp"; } && { test -z "$chgrpcmd" || $doit $chgrpcmd "$dsttmp"; } && { test -z "$stripcmd" || $doit $stripcmd "$dsttmp"; } && { test -z "$chmodcmd" || $doit $chmodcmd $mode "$dsttmp"; } && # If -C, don't bother to copy if it wouldn't change the file. if $copy_on_change && old=`LC_ALL=C ls -dlL "$dst" 2>/dev/null` && new=`LC_ALL=C ls -dlL "$dsttmp" 2>/dev/null` && eval "$initialize_posix_glob" && $posix_glob set -f && set X $old && old=:$2:$4:$5:$6 && set X $new && new=:$2:$4:$5:$6 && $posix_glob set +f && test "$old" = "$new" && $cmpprog "$dst" "$dsttmp" >/dev/null 2>&1 then rm -f "$dsttmp" else # Rename the file to the real destination. $doit $mvcmd -f "$dsttmp" "$dst" 2>/dev/null || # The rename failed, perhaps because mv can't rename something else # to itself, or perhaps because mv is so ancient that it does not # support -f. { # Now remove or move aside any old file at destination location. # We try this two ways since rm can't unlink itself on some # systems and the destination file might be busy for other # reasons. In this case, the final cleanup might fail but the new # file should still install successfully. { test ! -f "$dst" || $doit $rmcmd -f "$dst" 2>/dev/null || { $doit $mvcmd -f "$dst" "$rmtmp" 2>/dev/null && { $doit $rmcmd -f "$rmtmp" 2>/dev/null; :; } } || { echo "$0: cannot unlink or rename $dst" >&2 (exit 1); exit 1 } } && # Now rename the file to the real destination. $doit $mvcmd "$dsttmp" "$dst" } fi || exit 1 trap '' 0 fi done # Local variables: # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "scriptversion=" # time-stamp-format: "%:y-%02m-%02d.%02H" # time-stamp-time-zone: "UTC" # time-stamp-end: "; # UTC" # End: libprelude-1.0.0/warn-on-use.h0000664000076400007640000000717711325635004013131 00000000000000/* A C macro for emitting warnings if a function is used. Copyright (C) 2010 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 3 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 Lesser General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see . */ /* _GL_WARN_ON_USE(function, "literal string") issues a declaration for FUNCTION which will then trigger a compiler warning containing the text of "literal string" anywhere that function is called, if supported by the compiler. If the compiler does not support this feature, the macro expands to an unused extern declaration. This macro is useful for marking a function as a potential portability trap, with the intent that "literal string" include instructions on the replacement function that should be used instead. However, one of the reasons that a function is a portability trap is if it has the wrong signature. Declaring FUNCTION with a different signature in C is a compilation error, so this macro must use the same type as any existing declaration so that programs that avoid the problematic FUNCTION do not fail to compile merely because they included a header that poisoned the function. But this implies that _GL_WARN_ON_USE is only safe to use if FUNCTION is known to already have a declaration. Use of this macro implies that there must not be any other macro hiding the declaration of FUNCTION; but undefining FUNCTION first is part of the poisoning process anyway (although for symbols that are provided only via a macro, the result is a compilation error rather than a warning containing "literal string"). Also note that in C++, it is only safe to use if FUNCTION has no overloads. For an example, it is possible to poison 'getline' by: - adding a call to gl_WARN_ON_USE_PREPARE([[#include ]], [getline]) in configure.ac, which potentially defines HAVE_RAW_DECL_GETLINE - adding this code to a header that wraps the system : #undef getline #if HAVE_RAW_DECL_GETLINE _GL_WARN_ON_USE (getline, "getline is required by POSIX 2008, but" "not universally present; use the gnulib module getline"); #endif It is not possible to directly poison global variables. But it is possible to write a wrapper accessor function, and poison that (less common usage, like &environ, will cause a compilation error rather than issue the nice warning, but the end result of informing the developer about their portability problem is still achieved): #if HAVE_RAW_DECL_ENVIRON static inline char ***rpl_environ (void) { return &environ; } _GL_WARN_ON_USE (rpl_environ, "environ is not always properly declared"); # undef environ # define environ (*rpl_environ ()) #endif */ #ifndef _GL_WARN_ON_USE # if 4 < __GNUC__ || (__GNUC__ == 4 && 3 <= __GNUC_MINOR__) /* A compiler attribute is available in gcc versions 4.3.0 and later. */ # define _GL_WARN_ON_USE(function, message) \ extern __typeof__ (function) function __attribute__ ((__warning__ (message))) # else /* Unsupported. */ # define _GL_WARN_ON_USE(function, message) \ extern int _gl_warn_on_use # endif #endif libprelude-1.0.0/LICENSE.README0000664000076400007640000000163211202225026012525 00000000000000This directory and its children contain LibPrelude, a library for using the Prelude framework. Copyright (C) 2005 PreludeIDS Technologies SARL. All rights reserved. This library is made available under a dual licensing scheme. If you link LibPrelude against other code all of which is itself licensed under the terms of the GNU General Public License version 2 dated June 1991 ("GPL v2") or compatible, then you may use LibPrelude under the terms of the GPL v2,as appearing in the file COPYING. If the file COPYING is missing, you can obtain a copy of the GPL v2 from the Free Software Foundation Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. For any other uses of LibPrelude, you must first obtain a commercial license from PreludeIDS Technologies SARL. Please contact info@prelude-ids.com for information about commercial licensing. Please also read the information in the file HACKING.README. libprelude-1.0.0/idmef-client.conf.in0000664000076400007640000000014611202225026014377 00000000000000include = @PRELUDE_CONFIG_DIR@/default/global.conf include = @PRELUDE_CONFIG_DIR@/default/client.conf libprelude-1.0.0/depcomp0000755000076400007640000004426711347714460012171 00000000000000#! /bin/sh # depcomp - compile a program generating dependencies as side-effects scriptversion=2009-04-28.21; # UTC # Copyright (C) 1999, 2000, 2003, 2004, 2005, 2006, 2007, 2009 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, see . # 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. # Originally written by Alexandre Oliva . case $1 in '') echo "$0: No command. Try \`$0 --help' for more information." 1>&2 exit 1; ;; -h | --h*) cat <<\EOF Usage: depcomp [--help] [--version] PROGRAM [ARGS] Run PROGRAMS ARGS to compile a file, generating dependencies as side-effects. Environment variables: depmode Dependency tracking mode. source Source file read by `PROGRAMS ARGS'. object Object file output by `PROGRAMS ARGS'. DEPDIR directory where to store dependencies. depfile Dependency file to output. tmpdepfile Temporary file to use when outputing dependencies. libtool Whether libtool is used (yes/no). Report bugs to . EOF exit $? ;; -v | --v*) echo "depcomp $scriptversion" exit $? ;; esac if test -z "$depmode" || test -z "$source" || test -z "$object"; then echo "depcomp: Variables source, object and depmode must be set" 1>&2 exit 1 fi # Dependencies for sub/bar.o or sub/bar.obj go into sub/.deps/bar.Po. depfile=${depfile-`echo "$object" | sed 's|[^\\/]*$|'${DEPDIR-.deps}'/&|;s|\.\([^.]*\)$|.P\1|;s|Pobj$|Po|'`} tmpdepfile=${tmpdepfile-`echo "$depfile" | sed 's/\.\([^.]*\)$/.T\1/'`} rm -f "$tmpdepfile" # Some modes work just like other modes, but use different flags. We # parameterize here, but still list the modes in the big case below, # to make depend.m4 easier to write. Note that we *cannot* use a case # here, because this file can only contain one case statement. if test "$depmode" = hp; then # HP compiler uses -M and no extra arg. gccflag=-M depmode=gcc fi if test "$depmode" = dashXmstdout; then # This is just like dashmstdout with a different argument. dashmflag=-xM depmode=dashmstdout fi cygpath_u="cygpath -u -f -" if test "$depmode" = msvcmsys; then # This is just like msvisualcpp but w/o cygpath translation. # Just convert the backslash-escaped backslashes to single forward # slashes to satisfy depend.m4 cygpath_u="sed s,\\\\\\\\,/,g" depmode=msvisualcpp fi case "$depmode" in gcc3) ## gcc 3 implements dependency tracking that does exactly what ## we want. Yay! Note: for some reason libtool 1.4 doesn't like ## it if -MD -MP comes after the -MF stuff. Hmm. ## Unfortunately, FreeBSD c89 acceptance of flags depends upon ## the command line argument order; so add the flags where they ## appear in depend2.am. Note that the slowdown incurred here ## affects only configure: in makefiles, %FASTDEP% shortcuts this. for arg do case $arg in -c) set fnord "$@" -MT "$object" -MD -MP -MF "$tmpdepfile" "$arg" ;; *) set fnord "$@" "$arg" ;; esac shift # fnord shift # $arg done "$@" stat=$? if test $stat -eq 0; then : else rm -f "$tmpdepfile" exit $stat fi mv "$tmpdepfile" "$depfile" ;; gcc) ## There are various ways to get dependency output from gcc. Here's ## why we pick this rather obscure method: ## - Don't want to use -MD because we'd like the dependencies to end ## up in a subdir. Having to rename by hand is ugly. ## (We might end up doing this anyway to support other compilers.) ## - The DEPENDENCIES_OUTPUT environment variable makes gcc act like ## -MM, not -M (despite what the docs say). ## - Using -M directly means running the compiler twice (even worse ## than renaming). if test -z "$gccflag"; then gccflag=-MD, fi "$@" -Wp,"$gccflag$tmpdepfile" stat=$? if test $stat -eq 0; then : else rm -f "$tmpdepfile" exit $stat fi rm -f "$depfile" echo "$object : \\" > "$depfile" alpha=ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz ## The second -e expression handles DOS-style file names with drive letters. sed -e 's/^[^:]*: / /' \ -e 's/^['$alpha']:\/[^:]*: / /' < "$tmpdepfile" >> "$depfile" ## This next piece of magic avoids the `deleted header file' problem. ## The problem is that when a header file which appears in a .P file ## is deleted, the dependency causes make to die (because there is ## typically no way to rebuild the header). We avoid this by adding ## dummy dependencies for each header file. Too bad gcc doesn't do ## this for us directly. tr ' ' ' ' < "$tmpdepfile" | ## Some versions of gcc put a space before the `:'. On the theory ## that the space means something, we add a space to the output as ## well. ## Some versions of the HPUX 10.20 sed can't process this invocation ## correctly. Breaking it into two sed invocations is a workaround. sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile" rm -f "$tmpdepfile" ;; hp) # This case exists only to let depend.m4 do its work. It works by # looking at the text of this script. This case will never be run, # since it is checked for above. exit 1 ;; sgi) if test "$libtool" = yes; then "$@" "-Wp,-MDupdate,$tmpdepfile" else "$@" -MDupdate "$tmpdepfile" fi stat=$? if test $stat -eq 0; then : else rm -f "$tmpdepfile" exit $stat fi rm -f "$depfile" if test -f "$tmpdepfile"; then # yes, the sourcefile depend on other files echo "$object : \\" > "$depfile" # Clip off the initial element (the dependent). Don't try to be # clever and replace this with sed code, as IRIX sed won't handle # lines with more than a fixed number of characters (4096 in # IRIX 6.2 sed, 8192 in IRIX 6.5). We also remove comment lines; # the IRIX cc adds comments like `#:fec' to the end of the # dependency line. tr ' ' ' ' < "$tmpdepfile" \ | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' | \ tr ' ' ' ' >> "$depfile" echo >> "$depfile" # The second pass generates a dummy entry for each header file. tr ' ' ' ' < "$tmpdepfile" \ | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' -e 's/$/:/' \ >> "$depfile" else # The sourcefile does not contain any dependencies, so just # store a dummy comment line, to avoid errors with the Makefile # "include basename.Plo" scheme. echo "#dummy" > "$depfile" fi rm -f "$tmpdepfile" ;; aix) # The C for AIX Compiler uses -M and outputs the dependencies # in a .u file. In older versions, this file always lives in the # current directory. Also, the AIX compiler puts `$object:' at the # start of each line; $object doesn't have directory information. # Version 6 uses the directory in both cases. dir=`echo "$object" | sed -e 's|/[^/]*$|/|'` test "x$dir" = "x$object" && dir= base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'` if test "$libtool" = yes; then tmpdepfile1=$dir$base.u tmpdepfile2=$base.u tmpdepfile3=$dir.libs/$base.u "$@" -Wc,-M else tmpdepfile1=$dir$base.u tmpdepfile2=$dir$base.u tmpdepfile3=$dir$base.u "$@" -M fi stat=$? if test $stat -eq 0; then : else rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" exit $stat fi for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" do test -f "$tmpdepfile" && break done if test -f "$tmpdepfile"; then # Each line is of the form `foo.o: dependent.h'. # Do two passes, one to just change these to # `$object: dependent.h' and one to simply `dependent.h:'. sed -e "s,^.*\.[a-z]*:,$object:," < "$tmpdepfile" > "$depfile" # That's a tab and a space in the []. sed -e 's,^.*\.[a-z]*:[ ]*,,' -e 's,$,:,' < "$tmpdepfile" >> "$depfile" else # The sourcefile does not contain any dependencies, so just # store a dummy comment line, to avoid errors with the Makefile # "include basename.Plo" scheme. echo "#dummy" > "$depfile" fi rm -f "$tmpdepfile" ;; icc) # Intel's C compiler understands `-MD -MF file'. However on # icc -MD -MF foo.d -c -o sub/foo.o sub/foo.c # ICC 7.0 will fill foo.d with something like # foo.o: sub/foo.c # foo.o: sub/foo.h # which is wrong. We want: # sub/foo.o: sub/foo.c # sub/foo.o: sub/foo.h # sub/foo.c: # sub/foo.h: # ICC 7.1 will output # foo.o: sub/foo.c sub/foo.h # and will wrap long lines using \ : # foo.o: sub/foo.c ... \ # sub/foo.h ... \ # ... "$@" -MD -MF "$tmpdepfile" stat=$? if test $stat -eq 0; then : else rm -f "$tmpdepfile" exit $stat fi rm -f "$depfile" # Each line is of the form `foo.o: dependent.h', # or `foo.o: dep1.h dep2.h \', or ` dep3.h dep4.h \'. # Do two passes, one to just change these to # `$object: dependent.h' and one to simply `dependent.h:'. sed "s,^[^:]*:,$object :," < "$tmpdepfile" > "$depfile" # Some versions of the HPUX 10.20 sed can't process this invocation # correctly. Breaking it into two sed invocations is a workaround. sed 's,^[^:]*: \(.*\)$,\1,;s/^\\$//;/^$/d;/:$/d' < "$tmpdepfile" | sed -e 's/$/ :/' >> "$depfile" rm -f "$tmpdepfile" ;; hp2) # The "hp" stanza above does not work with aCC (C++) and HP's ia64 # compilers, which have integrated preprocessors. The correct option # to use with these is +Maked; it writes dependencies to a file named # 'foo.d', which lands next to the object file, wherever that # happens to be. # Much of this is similar to the tru64 case; see comments there. dir=`echo "$object" | sed -e 's|/[^/]*$|/|'` test "x$dir" = "x$object" && dir= base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'` if test "$libtool" = yes; then tmpdepfile1=$dir$base.d tmpdepfile2=$dir.libs/$base.d "$@" -Wc,+Maked else tmpdepfile1=$dir$base.d tmpdepfile2=$dir$base.d "$@" +Maked fi stat=$? if test $stat -eq 0; then : else rm -f "$tmpdepfile1" "$tmpdepfile2" exit $stat fi for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" do test -f "$tmpdepfile" && break done if test -f "$tmpdepfile"; then sed -e "s,^.*\.[a-z]*:,$object:," "$tmpdepfile" > "$depfile" # Add `dependent.h:' lines. sed -ne '2,${ s/^ *// s/ \\*$// s/$/:/ p }' "$tmpdepfile" >> "$depfile" else echo "#dummy" > "$depfile" fi rm -f "$tmpdepfile" "$tmpdepfile2" ;; tru64) # The Tru64 compiler uses -MD to generate dependencies as a side # effect. `cc -MD -o foo.o ...' puts the dependencies into `foo.o.d'. # At least on Alpha/Redhat 6.1, Compaq CCC V6.2-504 seems to put # dependencies in `foo.d' instead, so we check for that too. # Subdirectories are respected. dir=`echo "$object" | sed -e 's|/[^/]*$|/|'` test "x$dir" = "x$object" && dir= base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'` if test "$libtool" = yes; then # With Tru64 cc, shared objects can also be used to make a # static library. This mechanism is used in libtool 1.4 series to # handle both shared and static libraries in a single compilation. # With libtool 1.4, dependencies were output in $dir.libs/$base.lo.d. # # With libtool 1.5 this exception was removed, and libtool now # generates 2 separate objects for the 2 libraries. These two # compilations output dependencies in $dir.libs/$base.o.d and # in $dir$base.o.d. We have to check for both files, because # one of the two compilations can be disabled. We should prefer # $dir$base.o.d over $dir.libs/$base.o.d because the latter is # automatically cleaned when .libs/ is deleted, while ignoring # the former would cause a distcleancheck panic. tmpdepfile1=$dir.libs/$base.lo.d # libtool 1.4 tmpdepfile2=$dir$base.o.d # libtool 1.5 tmpdepfile3=$dir.libs/$base.o.d # libtool 1.5 tmpdepfile4=$dir.libs/$base.d # Compaq CCC V6.2-504 "$@" -Wc,-MD else tmpdepfile1=$dir$base.o.d tmpdepfile2=$dir$base.d tmpdepfile3=$dir$base.d tmpdepfile4=$dir$base.d "$@" -MD fi stat=$? if test $stat -eq 0; then : else rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" "$tmpdepfile4" exit $stat fi for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" "$tmpdepfile4" do test -f "$tmpdepfile" && break done if test -f "$tmpdepfile"; then sed -e "s,^.*\.[a-z]*:,$object:," < "$tmpdepfile" > "$depfile" # That's a tab and a space in the []. sed -e 's,^.*\.[a-z]*:[ ]*,,' -e 's,$,:,' < "$tmpdepfile" >> "$depfile" else echo "#dummy" > "$depfile" fi rm -f "$tmpdepfile" ;; #nosideeffect) # This comment above is used by automake to tell side-effect # dependency tracking mechanisms from slower ones. dashmstdout) # Important note: in order to support this mode, a compiler *must* # always write the preprocessed file to stdout, regardless of -o. "$@" || exit $? # Remove the call to Libtool. if test "$libtool" = yes; then while test "X$1" != 'X--mode=compile'; do shift done shift fi # Remove `-o $object'. IFS=" " for arg do case $arg in -o) shift ;; $object) shift ;; *) set fnord "$@" "$arg" shift # fnord shift # $arg ;; esac done test -z "$dashmflag" && dashmflag=-M # Require at least two characters before searching for `:' # in the target name. This is to cope with DOS-style filenames: # a dependency such as `c:/foo/bar' could be seen as target `c' otherwise. "$@" $dashmflag | sed 's:^[ ]*[^: ][^:][^:]*\:[ ]*:'"$object"'\: :' > "$tmpdepfile" rm -f "$depfile" cat < "$tmpdepfile" > "$depfile" tr ' ' ' ' < "$tmpdepfile" | \ ## Some versions of the HPUX 10.20 sed can't process this invocation ## correctly. Breaking it into two sed invocations is a workaround. sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile" rm -f "$tmpdepfile" ;; dashXmstdout) # This case only exists to satisfy depend.m4. It is never actually # run, as this mode is specially recognized in the preamble. exit 1 ;; makedepend) "$@" || exit $? # Remove any Libtool call if test "$libtool" = yes; then while test "X$1" != 'X--mode=compile'; do shift done shift fi # X makedepend shift cleared=no eat=no for arg do case $cleared in no) set ""; shift cleared=yes ;; esac if test $eat = yes; then eat=no continue fi case "$arg" in -D*|-I*) set fnord "$@" "$arg"; shift ;; # Strip any option that makedepend may not understand. Remove # the object too, otherwise makedepend will parse it as a source file. -arch) eat=yes ;; -*|$object) ;; *) set fnord "$@" "$arg"; shift ;; esac done obj_suffix=`echo "$object" | sed 's/^.*\././'` touch "$tmpdepfile" ${MAKEDEPEND-makedepend} -o"$obj_suffix" -f"$tmpdepfile" "$@" rm -f "$depfile" cat < "$tmpdepfile" > "$depfile" sed '1,2d' "$tmpdepfile" | tr ' ' ' ' | \ ## Some versions of the HPUX 10.20 sed can't process this invocation ## correctly. Breaking it into two sed invocations is a workaround. sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile" rm -f "$tmpdepfile" "$tmpdepfile".bak ;; cpp) # Important note: in order to support this mode, a compiler *must* # always write the preprocessed file to stdout. "$@" || exit $? # Remove the call to Libtool. if test "$libtool" = yes; then while test "X$1" != 'X--mode=compile'; do shift done shift fi # Remove `-o $object'. IFS=" " for arg do case $arg in -o) shift ;; $object) shift ;; *) set fnord "$@" "$arg" shift # fnord shift # $arg ;; esac done "$@" -E | sed -n -e '/^# [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' \ -e '/^#line [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' | sed '$ s: \\$::' > "$tmpdepfile" rm -f "$depfile" echo "$object : \\" > "$depfile" cat < "$tmpdepfile" >> "$depfile" sed < "$tmpdepfile" '/^$/d;s/^ //;s/ \\$//;s/$/ :/' >> "$depfile" rm -f "$tmpdepfile" ;; msvisualcpp) # Important note: in order to support this mode, a compiler *must* # always write the preprocessed file to stdout. "$@" || exit $? # Remove the call to Libtool. if test "$libtool" = yes; then while test "X$1" != 'X--mode=compile'; do shift done shift fi IFS=" " for arg do case "$arg" in -o) shift ;; $object) shift ;; "-Gm"|"/Gm"|"-Gi"|"/Gi"|"-ZI"|"/ZI") set fnord "$@" shift shift ;; *) set fnord "$@" "$arg" shift shift ;; esac done "$@" -E 2>/dev/null | sed -n '/^#line [0-9][0-9]* "\([^"]*\)"/ s::\1:p' | $cygpath_u | sort -u > "$tmpdepfile" rm -f "$depfile" echo "$object : \\" > "$depfile" sed < "$tmpdepfile" -n -e 's% %\\ %g' -e '/^\(.*\)$/ s:: \1 \\:p' >> "$depfile" echo " " >> "$depfile" sed < "$tmpdepfile" -n -e 's% %\\ %g' -e '/^\(.*\)$/ s::\1\::p' >> "$depfile" rm -f "$tmpdepfile" ;; msvcmsys) # This case exists only to let depend.m4 do its work. It works by # looking at the text of this script. This case will never be run, # since it is checked for above. exit 1 ;; none) exec "$@" ;; *) echo "Unknown depmode $depmode" 1>&2 exit 1 ;; esac exit 0 # Local Variables: # mode: shell-script # sh-indentation: 2 # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "scriptversion=" # time-stamp-format: "%:y-%02m-%02d.%02H" # time-stamp-time-zone: "UTC" # time-stamp-end: "; # UTC" # End: libprelude-1.0.0/docs/0000775000076400007640000000000011347714755011620 500000000000000libprelude-1.0.0/docs/api/0000775000076400007640000000000011347714756012372 500000000000000libprelude-1.0.0/docs/api/libprelude-overrides.txt0000664000076400007640000000000011202312570017142 00000000000000libprelude-1.0.0/docs/api/tmpl/0000775000076400007640000000000011347714755013345 500000000000000libprelude-1.0.0/docs/api/tmpl/prelude-ident.sgml0000664000076400007640000000124611347714755016715 00000000000000 prelude-ident @ident: @Returns: @ident: @out: @Returns: @ident: @ret: @Returns: libprelude-1.0.0/docs/api/tmpl/prelude-io.sgml0000664000076400007640000000431711347714755016223 00000000000000 prelude-io @ret: @Returns: @pio: @pio: @fd: @pio: @tls: @pio: @fd: @pio: @Returns: @pio: @ptr: @pio: @pending: @pio: @read: @pio: @write: @pio: @Returns: @pio: @buf: @count: @Returns: @pio: @buf: @count: @Returns: @pio: @buf: @Returns: @pio: @buf: @count: @Returns: @pio: @buf: @count: @Returns: @dst: @src: @count: @Returns: @pio: @Returns: @pio: @Returns: @pio: @Returns: @pio: @error: @Returns: libprelude-1.0.0/docs/api/tmpl/prelude-failover.sgml0000664000076400007640000000266111347714755017423 00000000000000 prelude-failover @failover: @ret: @dirname: @Returns: @failover: @limit: @failover: @msg: @Returns: @failover: @out: @Returns: @failover: @Returns: @failover: @Returns: @failover: @msg: @Returns: @failover: @failover: @failover: @msg: @Returns: libprelude-1.0.0/docs/api/tmpl/idmef.sgml0000664000076400007640000000040011347714755015227 00000000000000 idmef libprelude-1.0.0/docs/api/tmpl/prelude-list.sgml0000664000076400007640000000240411347714755016562 00000000000000 prelude-list @item: @next: @prev: @item: @type: @member: @list: @pos: @list: @pos: @bkp: @list: @pos: @list: @pos: @bkp: @list: @pos: @list: @pos: @bkp: @list: @pos: @class: @member: @list: @pos: @bkp: @class: @member: libprelude-1.0.0/docs/api/tmpl/prelude-msgbuf.sgml0000664000076400007640000000251411347714755017074 00000000000000 prelude-msgbuf @PRELUDE_MSGBUF_FLAGS_ASYNC: @msgbuf: @Returns: @msgbuf: @msgbuf: @msgbuf: @tag: @len: @data: @Returns: @msgbuf: @Returns: @msgbuf: @send_msg: @msgbuf: @data: @msgbuf: @Returns: @msgbuf: @flags: @msgbuf: @Returns: libprelude-1.0.0/docs/api/tmpl/prelude-timer.sgml0000664000076400007640000000273411347714755016735 00000000000000 prelude-timer @list: @expire: @start_time: @data: @function: @timer: @timer: @timer: @timer: @x: @timer: @x: @timer: @x: @timer: @timer: @timer: @timer: libprelude-1.0.0/docs/api/tmpl/prelude-client.sgml0000664000076400007640000002134011347714755017065 00000000000000 prelude-client Creating a Prelude Client In order to send or to read data from a Prelude collector (prelude-manager), you will need to create a #prelude_client_t object. This object will be necessary for most of the work you are going to do with prelude. Creating the client int ret; prelude_client_t *client; ret = prelude_client_new(&client, "my-analyzer"); if ( ! client ) { prelude_perror(ret, "Unable to create a prelude client object"); return -1; } This will create a new client object, whose default profile is my-analyzer. This default profile might be overriden using the --prelude --profile profile_name option on your command line as parsed by prelude_init(). Additionally, prelude specific option might be overriden using a Prelude specific configuration file, like the template file created within each profile, or a configuration file specified using prelude_client_set_config_filename() before prelude_client_start() is called. The default required permission for the created client are set to PRELUDE_CONNECTION_PERMISSION_IDMEF_WRITE and PRELUDE_CONNECTION_PERMISSION_ADMIN_READ, which mean the client will reject any certificate where permission are set to anything less than this. You can change the default required permission using the prelude_client_set_required_permission() function. As an example, if you want to create a client that will read alert from a Manager, and accept administrative option request you should use: prelude_client_set_required_permission(client, PRELUDE_CONNECTION_PERMISSION_IDMEF_READ|PRELUDE_CONNECTION_PERMISSION_ADMIN_WRITE); Once the client is created and you have everything setup, you will need to start your client. The prelude_client_start() function is responsible for this, and will trigger the connection to the configured manager, and send the initial client heartbeat. ret = prelude_client_start(client); if ( ret < 0 ) { prelude_log(ret, "Unable to start prelude client"); return -1; } Additionally, it is possible to set additional client flags, however, you should be careful since some of theses flags (marked asynchronous) will result in creating an internal thread, which should only be done after an eventual fork of the program since threads are not copied accross a fork call. The prelude library will also register an internal timer in order to send heartbeat message at the defined interval. Timer registered by the library itself or by the program will either be called automatically if the #PRELUDE_CLIENT_FLAGS_ASYNC_TIMER flags is set, otherwise, the program is responsible for calling the prelude_timer_wake_up() function every second from it's main loop, in order to check the registered timer. #PRELUDE_CLIENT_FLAGS_CONNECT - Used for a client to connect to a manager (this is the default). #PRELUDE_CLIENT_FLAGS_HEARTBEAT - Used for client to send heartbeat (this is the default). #PRELUDE_CLIENT_FLAGS_ASYNC_SEND - Used if you want message to be sent asynchronously. #PRELUDE_CLIENT_FLAGS_ASYNC_TIMER - Used if you want timer to be automatically called from the asynchronous thread. See #prelude_client_flags_t for a list of available flags. ret = prelude_client_set_flags(client, PRELUDE_CLIENT_FLAGS_ASYNC_SEND|PRELUDE_CLIENT_FLAGS_ASYNC_TIMER); if ( ret < 0 ) { fprintf(stderr, "Unable to set asynchronous send and timer.\n"); return -1; } Sending IDMEF message For documentation on how to create IDMEF message, please see #idmef_message_t or #idmef_path_t. Once you created and IDMEF message, you should use the prelude_client_send_idmef() function in order to send it to the collector you are connected to. prelude_client_send_idmef(client, idmef); Destroying the client In case the analyzer you are developing is not a persistant analyzer (meaning an analyzer that is not supposed to exit), it is important that you call the prelude_client_destroy() function prior to exiting. This function have the side effect of sending an heartbeat to the remote manager, as well as an information regarding the analyzer state. This state information is important since an analyzer not reporting a successful exit status, or an analyzer which stop sending heartbeat at all will be reported as having a problem. PRELUDE_CLIENT_STATUS_EXIT_SUCCESS - Exiting the sensor is the expected behavior. PRELUDE_CLIENT_STATUS_EXIT_FAILED - There is something wrong going on, notice the security analyst. prelude_client_destroy(client, PRELUDE_CLIENT_STATUS_EXIT_SUCCESS); As a side note, please remember that a persistant sensor should never use this function (except maybe if it is working in batch mode), unless it want to report the PRELUDE_CLIENT_STATUS_EXIT_FAILED exit status. This is also the case if your persistant sensor is interrupted by a signal. #idmef_message_t #idmef_path_t @PRELUDE_CLIENT_EXIT_STATUS_SUCCESS: @PRELUDE_CLIENT_EXIT_STATUS_FAILURE: @PRELUDE_CLIENT_FLAGS_ASYNC_SEND: @PRELUDE_CLIENT_FLAGS_ASYNC_TIMER: @PRELUDE_CLIENT_FLAGS_HEARTBEAT: @PRELUDE_CLIENT_FLAGS_CONNECT: @PRELUDE_CLIENT_FLAGS_AUTOCONFIG: @client: @Returns: @client: @pool: @client: @Returns: @client: @Returns: @client: @Returns: @client: @profile: @Returns: @client: @Returns: @client: @Returns: @client: @Returns: @client: @permission: @client: @Returns: @client: @msg: @client: @timeout: @msg: @Returns: @client: @cb: @client: @msg: @client: @timeout: @idmef: @Returns: @client: @status: @client: @flags: @Returns: @client: @filename: @Returns: @client: @Returns: @error: @Returns: @client: @Returns: @client: @msgbuf: @Returns: @client: @msg: @msgbuf: @Returns: @client: @Returns: @client: libprelude-1.0.0/docs/api/tmpl/prelude-plugin.sgml0000664000076400007640000000705311347714755017112 00000000000000 prelude-plugin @prefix: @type: @name: @p: @p: @str: @p: @func: @pe: @pl: @pe: @opt: @commit: @Returns: @pi: @Returns: @pi: @Returns: @pi: @plugin: @name: @data: @Returns: @head: @name: @Returns: @head: @pname: @iname: @Returns: @pi: @data: @pi: @Returns: @pi: @data: @pi: @Returns: @pi: @Returns: @pi: @Returns: @head: @dirname: @symbol: @ptr: @subscribe: @unsubscribe: @Returns: @pi: @h: @Returns: @pi: @pi: @start: @end: @pi: @err: @Returns: @pi: @Returns: @symlist: @head: @iter: @Returns: @plugin: @pi: @func: @pi: @type: @member: @...: libprelude-1.0.0/docs/api/tmpl/idmef-criterion-value.sgml0000664000076400007640000000400311347714755020340 00000000000000 idmef-criterion-value @IDMEF_CRITERION_VALUE_TYPE_ERROR: @IDMEF_CRITERION_VALUE_TYPE_VALUE: @IDMEF_CRITERION_VALUE_TYPE_REGEX: @IDMEF_CRITERION_VALUE_TYPE_BROKEN_DOWN_TIME: @cv: @Returns: @cv: @regex: @op: @Returns: @cv: @value: @op: @Returns: @cv: @path: @value: @op: @Returns: @cv: @time: @op: @Returns: @src: @dst: @Returns: @value: @value: @fd: @Returns: @value: @out: @Returns: @cv: @value: @op: @Returns: @cv: @Returns: @cv: @Returns: @cv: @Returns: @cv: @Returns: libprelude-1.0.0/docs/api/tmpl/prelude-inttypes.sgml0000664000076400007640000000672311347714755017476 00000000000000 prelude-inttypes @PRELUDE_BOOL_TRUE: @PRELUDE_BOOL_FALSE: libprelude-1.0.0/docs/api/tmpl/prelude-error.sgml0000664000076400007640000001761011347714755016745 00000000000000 prelude-error @PRELUDE_ERROR_SOURCE_UNKNOWN: @PRELUDE_ERROR_SOURCE_IO: @PRELUDE_ERROR_SOURCE_MESSAGE: @PRELUDE_ERROR_SOURCE_FAILOVER: @PRELUDE_ERROR_SOURCE_CLIENT: @PRELUDE_ERROR_SOURCE_CLIENT_PROFILE: @PRELUDE_ERROR_SOURCE_EXTRACT: @PRELUDE_ERROR_SOURCE_CONNECTION: @PRELUDE_ERROR_SOURCE_CONNECTION_POOL: @PRELUDE_ERROR_SOURCE_CONFIG_ENGINE: @PRELUDE_ERROR_SOURCE_STRING: @PRELUDE_ERROR_SOURCE_IDMEF_TREE_WRAP: @PRELUDE_ERROR_SOURCE_IDMEF_PATH: @PRELUDE_ERROR_SOURCE_IDMEF_TYPE: @PRELUDE_ERROR_SOURCE_IDMEF_MESSAGE_READ: @PRELUDE_ERROR_SOURCE_IDMEF_CRITERIA: @PRELUDE_ERROR_SOURCE_IDMEF_VALUE_TYPE: @PRELUDE_ERROR_SOURCE_PRELUDEDB: @PRELUDE_ERROR_NO_ERROR: @PRELUDE_ERROR_GENERIC: @PRELUDE_ERROR_TLS: @PRELUDE_ERROR_INVAL_LENGTH: @PRELUDE_ERROR_INVAL_MESSAGE: @PRELUDE_ERROR_PROTOCOL_VERSION: @PRELUDE_ERROR_EOF: @PRELUDE_ERROR_PROFILE: @PRELUDE_ERROR_TLS_AUTH_REJECTED: @PRELUDE_ERROR_INVAL_INT8: @PRELUDE_ERROR_INVAL_INT16: @PRELUDE_ERROR_INVAL_INT32: @PRELUDE_ERROR_INVAL_INT64: @PRELUDE_ERROR_INVAL_FLOAT: @PRELUDE_ERROR_INVAL_CHAR: @PRELUDE_ERROR_INVAL_IDMEF_TIME: @PRELUDE_ERROR_CONNECTION_STRING: @PRELUDE_ERROR_IDMEF_VALUE_TYPE_UNKNOWN: @PRELUDE_ERROR_IDMEF_VALUE_TYPE_COPY_UNAVAILABLE: @PRELUDE_ERROR_IDMEF_VALUE_TYPE_CLONE_UNAVAILABLE: @PRELUDE_ERROR_IDMEF_VALUE_TYPE_COMPARE_UNAVAILABLE: @PRELUDE_ERROR_IDMEF_VALUE_TYPE_READ_UNAVAILABLE: @PRELUDE_ERROR_IDMEF_VALUE_TYPE_WRITE_UNAVAILABLE: @PRELUDE_ERROR_IDMEF_VALUE_TYPE_COMPARE_MISMATCH: @PRELUDE_ERROR_IDMEF_VALUE_TYPE_PARSE: @PRELUDE_ERROR_IDMEF_CLASS_UNKNOWN: @PRELUDE_ERROR_IDMEF_CLASS_UNKNOWN_CHILD: @PRELUDE_ERROR_IDMEF_CLASS_UNKNOWN_NAME: @PRELUDE_ERROR_IDMEF_PATH_LENGTH: @PRELUDE_ERROR_IDMEF_PATH_DEPTH: @PRELUDE_ERROR_IDMEF_PATH_PARENT_ROOT: @PRELUDE_ERROR_IDMEF_PATH_NTH: @PRELUDE_ERROR_IDMEF_PATH_MISS_INDEX: @PRELUDE_ERROR_IDMEF_PATH_INTEGRITY: @PRELUDE_ERROR_IDMEF_PATH_INDEX_RESERVED: @PRELUDE_ERROR_IDMEF_PATH_INDEX_FORBIDDEN: @PRELUDE_ERROR_IDMEF_PATH_INDEX_UNDEFINED: @PRELUDE_ERROR_IDMEF_TREE_INDEX_UNDEFINED: @PRELUDE_ERROR_IDMEF_UNKNOWN_ENUM_STRING: @PRELUDE_ERROR_IDMEF_UNKNOWN_TAG: @PRELUDE_ERROR_DAEMONIZE_LOCK_HELD: @PRELUDE_ERROR_PLUGIN_LTDL_INIT: @PRELUDE_ERROR_STRING_NOT_NULL_TERMINATED: @PRELUDE_ERROR_CANT_RESOLVE: @PRELUDE_ERROR_UNKNOWN_PERMISSION_TYPE: @PRELUDE_ERROR_UNKNOWN_PERMISSION_BIT: @PRELUDE_ERROR_IDMEF_CRITERIA_PARSE: @PRELUDE_ERROR_IDMEF_CRITERION_UNSUPPORTED_OPERATOR: @PRELUDE_ERROR_IDMEF_CRITERION_INVALID_REGEX: @PRELUDE_ERROR_TLS_WARNING_ALERT: @PRELUDE_ERROR_TLS_FATAL_ALERT: @PRELUDE_ERROR_IDMEF_CLASS_CHILD_NOT_CLASS: @PRELUDE_ERROR_ASSERTION: @PRELUDE_ERROR_IDMEF_VALUE_TYPE_REF_UNAVAILABLE: @PRELUDE_ERROR_UNKNOWN_ERRNO: @PRELUDE_ERROR_E2BIG: @PRELUDE_ERROR_EACCES: @PRELUDE_ERROR_EADDRINUSE: @PRELUDE_ERROR_EADDRNOTAVAIL: @PRELUDE_ERROR_EADV: @PRELUDE_ERROR_EAFNOSUPPORT: @PRELUDE_ERROR_EAGAIN: @PRELUDE_ERROR_EALREADY: @PRELUDE_ERROR_EAUTH: @PRELUDE_ERROR_EBACKGROUND: @PRELUDE_ERROR_EBADE: @PRELUDE_ERROR_EBADF: @PRELUDE_ERROR_EBADFD: @PRELUDE_ERROR_EBADMSG: @PRELUDE_ERROR_EBADR: @PRELUDE_ERROR_EBADRPC: @PRELUDE_ERROR_EBADRQC: @PRELUDE_ERROR_EBADSLT: @PRELUDE_ERROR_EBFONT: @PRELUDE_ERROR_EBUSY: @PRELUDE_ERROR_ECANCELED: @PRELUDE_ERROR_ECHILD: @PRELUDE_ERROR_ECHRNG: @PRELUDE_ERROR_ECOMM: @PRELUDE_ERROR_ECONNABORTED: @PRELUDE_ERROR_ECONNREFUSED: @PRELUDE_ERROR_ECONNRESET: @PRELUDE_ERROR_ED: @PRELUDE_ERROR_EDEADLK: @PRELUDE_ERROR_EDEADLOCK: @PRELUDE_ERROR_EDESTADDRREQ: @PRELUDE_ERROR_EDIED: @PRELUDE_ERROR_EDOM: @PRELUDE_ERROR_EDOTDOT: @PRELUDE_ERROR_EDQUOT: @PRELUDE_ERROR_EEXIST: @PRELUDE_ERROR_EFAULT: @PRELUDE_ERROR_EFBIG: @PRELUDE_ERROR_EFTYPE: @PRELUDE_ERROR_EGRATUITOUS: @PRELUDE_ERROR_EGREGIOUS: @PRELUDE_ERROR_EHOSTDOWN: @PRELUDE_ERROR_EHOSTUNREACH: @PRELUDE_ERROR_EIDRM: @PRELUDE_ERROR_EIEIO: @PRELUDE_ERROR_EILSEQ: @PRELUDE_ERROR_EINPROGRESS: @PRELUDE_ERROR_EINTR: @PRELUDE_ERROR_EINVAL: @PRELUDE_ERROR_EIO: @PRELUDE_ERROR_EISCONN: @PRELUDE_ERROR_EISDIR: @PRELUDE_ERROR_EISNAM: @PRELUDE_ERROR_EL2HLT: @PRELUDE_ERROR_EL2NSYNC: @PRELUDE_ERROR_EL3HLT: @PRELUDE_ERROR_EL3RST: @PRELUDE_ERROR_ELIBACC: @PRELUDE_ERROR_ELIBBAD: @PRELUDE_ERROR_ELIBEXEC: @PRELUDE_ERROR_ELIBMAX: @PRELUDE_ERROR_ELIBSCN: @PRELUDE_ERROR_ELNRNG: @PRELUDE_ERROR_ELOOP: @PRELUDE_ERROR_EMEDIUMTYPE: @PRELUDE_ERROR_EMFILE: @PRELUDE_ERROR_EMLINK: @PRELUDE_ERROR_EMSGSIZE: @PRELUDE_ERROR_EMULTIHOP: @PRELUDE_ERROR_ENAMETOOLONG: @PRELUDE_ERROR_ENAVAIL: @PRELUDE_ERROR_ENEEDAUTH: @PRELUDE_ERROR_ENETDOWN: @PRELUDE_ERROR_ENETRESET: @PRELUDE_ERROR_ENETUNREACH: @PRELUDE_ERROR_ENFILE: @PRELUDE_ERROR_ENOANO: @PRELUDE_ERROR_ENOBUFS: @PRELUDE_ERROR_ENOCSI: @PRELUDE_ERROR_ENODATA: @PRELUDE_ERROR_ENODEV: @PRELUDE_ERROR_ENOENT: @PRELUDE_ERROR_ENOEXEC: @PRELUDE_ERROR_ENOLCK: @PRELUDE_ERROR_ENOLINK: @PRELUDE_ERROR_ENOMEDIUM: @PRELUDE_ERROR_ENOMEM: @PRELUDE_ERROR_ENOMSG: @PRELUDE_ERROR_ENONET: @PRELUDE_ERROR_ENOPKG: @PRELUDE_ERROR_ENOPROTOOPT: @PRELUDE_ERROR_ENOSPC: @PRELUDE_ERROR_ENOSR: @PRELUDE_ERROR_ENOSTR: @PRELUDE_ERROR_ENOSYS: @PRELUDE_ERROR_ENOTBLK: @PRELUDE_ERROR_ENOTCONN: @PRELUDE_ERROR_ENOTDIR: @PRELUDE_ERROR_ENOTEMPTY: @PRELUDE_ERROR_ENOTNAM: @PRELUDE_ERROR_ENOTSOCK: @PRELUDE_ERROR_ENOTSUP: @PRELUDE_ERROR_ENOTTY: @PRELUDE_ERROR_ENOTUNIQ: @PRELUDE_ERROR_ENXIO: @PRELUDE_ERROR_EOPNOTSUPP: @PRELUDE_ERROR_EOVERFLOW: @PRELUDE_ERROR_EPERM: @PRELUDE_ERROR_EPFNOSUPPORT: @PRELUDE_ERROR_EPIPE: @PRELUDE_ERROR_EPROCLIM: @PRELUDE_ERROR_EPROCUNAVAIL: @PRELUDE_ERROR_EPROGMISMATCH: @PRELUDE_ERROR_EPROGUNAVAIL: @PRELUDE_ERROR_EPROTO: @PRELUDE_ERROR_EPROTONOSUPPORT: @PRELUDE_ERROR_EPROTOTYPE: @PRELUDE_ERROR_ERANGE: @PRELUDE_ERROR_EREMCHG: @PRELUDE_ERROR_EREMOTE: @PRELUDE_ERROR_EREMOTEIO: @PRELUDE_ERROR_ERESTART: @PRELUDE_ERROR_EROFS: @PRELUDE_ERROR_ERPCMISMATCH: @PRELUDE_ERROR_ESHUTDOWN: @PRELUDE_ERROR_ESOCKTNOSUPPORT: @PRELUDE_ERROR_ESPIPE: @PRELUDE_ERROR_ESRCH: @PRELUDE_ERROR_ESRMNT: @PRELUDE_ERROR_ESTALE: @PRELUDE_ERROR_ESTRPIPE: @PRELUDE_ERROR_ETIME: @PRELUDE_ERROR_ETIMEDOUT: @PRELUDE_ERROR_ETOOMANYREFS: @PRELUDE_ERROR_ETXTBSY: @PRELUDE_ERROR_EUCLEAN: @PRELUDE_ERROR_EUNATCH: @PRELUDE_ERROR_EUSERS: @PRELUDE_ERROR_EWOULDBLOCK: @PRELUDE_ERROR_EXDEV: @PRELUDE_ERROR_EXFULL: @error: @Returns: @error: @Returns: @error: @fmt: @Varargs: @err: @Returns: @err: @Returns: @err: @Returns: @source: @code: @Returns: @source: @err: @Returns: @source: @code: @fmt: @Varargs: @Returns: @source: @code: @fmt: @ap: @Returns: @code: @Returns: @error: @Returns: libprelude-1.0.0/docs/api/tmpl/idmef-additional-data.sgml0000664000076400007640000000577011347714755020263 00000000000000 idmef-additional-data @ret: @data: @Returns: @ret: @byte: @Returns: @ret: @data: @Returns: @ret: @data: @Returns: @ret: @data: @Returns: @ptr: @data: @ptr: @byte: @ptr: @data: @ptr: @data: @ptr: @data: @ad: @data: @len: @Returns: @ad: @data: @len: @Returns: @ad: @data: @len: @Returns: @ad: @data: @len: @Returns: @ad: @data: @len: @Returns: @ad: @data: @len: @Returns: @src: @dst: @Returns: @src: @dst: @Returns: @data: @Returns: @data: @Returns: @data: @Returns: @data: @Returns: @data: @Returns: @data: @Returns: @data: @Returns: @ad: @out: @Returns: libprelude-1.0.0/docs/api/tmpl/idmef-message-write.sgml0000664000076400007640000001020211347714755020002 00000000000000 idmef-message-write Writing IDMEF class to a message buffer If you're not willing to use the prelude_client_send_idmef() function, because for example you want more control over how a message is sent, you can use the idmef-message-write API to send your message manually. The functions defined in this API all take an IDMEF object as an argument and dump this object in a format suitable for writing it to a socket or a file (covering, for example, convertion from host byte order to network byte order), to the provided #prelude_msgbuf_t buffer. The #prelude_msgbuf_t object is just a buffer holding a #prelude_msg_t object. When the buffer is full, the user defined function for #prelude_msgbuf_t will be called, and the user can write his message using the prelude_msg_write() function. idmef_message_write(message, msgbuf); #prelude_msgbuf_t #prelude_msg_t @additional_data: @msg: @Returns: @reference: @msg: @Returns: @classification: @msg: @Returns: @user_id: @msg: @Returns: @user: @msg: @Returns: @address: @msg: @Returns: @process: @msg: @Returns: @web_service: @msg: @Returns: @snmp_service: @msg: @Returns: @service: @msg: @Returns: @node: @msg: @Returns: @source: @msg: @Returns: @file_access: @msg: @Returns: @inode: @msg: @Returns: @checksum: @msg: @Returns: @file: @msg: @Returns: @linkage: @msg: @Returns: @target: @msg: @Returns: @analyzer: @msg: @Returns: @alertident: @msg: @Returns: @impact: @msg: @Returns: @action: @msg: @Returns: @confidence: @msg: @Returns: @assessment: @msg: @Returns: @tool_alert: @msg: @Returns: @correlation_alert: @msg: @Returns: @overflow_alert: @msg: @Returns: @alert: @msg: @Returns: @heartbeat: @msg: @Returns: @message: @msg: @Returns: libprelude-1.0.0/docs/api/tmpl/prelude-linked-object.sgml0000664000076400007640000000076311347714755020327 00000000000000 prelude-linked-object @object: libprelude-1.0.0/docs/api/tmpl/prelude-connection.sgml0000664000076400007640000000670711347714755017760 00000000000000 prelude-connection @PRELUDE_CONNECTION_PERMISSION_IDMEF_READ: @PRELUDE_CONNECTION_PERMISSION_ADMIN_READ: @PRELUDE_CONNECTION_PERMISSION_IDMEF_WRITE: @PRELUDE_CONNECTION_PERMISSION_ADMIN_WRITE: @PRELUDE_CONNECTION_STATE_ESTABLISHED: @conn: @cnx: @msg: @Returns: @cnx: @outmsg: @Returns: @con: @idmef: @Returns: @cnx: @profile: @permission: @Returns: @cnx: @src: @count: @Returns: @cnx: @Returns: @cnx: @Returns: @cnx: @Returns: @cnx: @Returns: @cnx: @Returns: @cnx: @Returns: @cnx: @Returns: @cnx: @fd: @cnx: @fd: @cnx: @state: @cnx: @Returns: @cnx: @data: @cnx: @Returns: @Returns: @conn: @Returns: @cnx: @Returns: @cnx: @analyzerid: @ret: @addr: @Returns: @conn: @Returns: @connection: @msgbuf: @Returns: @perm: @out: @Returns: @out: @buf: @Returns: libprelude-1.0.0/docs/api/tmpl/prelude-hash.sgml0000664000076400007640000000211611347714755016532 00000000000000 prelude-hash @hash: @hash_func: @key_cmp_func: @key_destroy_func: @value_destroy_func: @Returns: @hash: @size: @hash_func: @key_cmp_func: @key_destroy_func: @value_destroy_func: @Returns: @hash: @hash: @key: @value: @Returns: @hash: @key: @Returns: @hash: @key: @Returns: @hash: @cb: libprelude-1.0.0/docs/api/tmpl/idmef-criteria.sgml0000664000076400007640000000754511347714755017050 00000000000000 idmef-criteria @IDMEF_CRITERION_OPERATOR_NOT: @IDMEF_CRITERION_OPERATOR_NOCASE: @IDMEF_CRITERION_OPERATOR_EQUAL: @IDMEF_CRITERION_OPERATOR_EQUAL_NOCASE: @IDMEF_CRITERION_OPERATOR_NOT_EQUAL: @IDMEF_CRITERION_OPERATOR_NOT_EQUAL_NOCASE: @IDMEF_CRITERION_OPERATOR_LESSER: @IDMEF_CRITERION_OPERATOR_LESSER_OR_EQUAL: @IDMEF_CRITERION_OPERATOR_GREATER: @IDMEF_CRITERION_OPERATOR_GREATER_OR_EQUAL: @IDMEF_CRITERION_OPERATOR_SUBSTR: @IDMEF_CRITERION_OPERATOR_SUBSTR_NOCASE: @IDMEF_CRITERION_OPERATOR_NOT_SUBSTR: @IDMEF_CRITERION_OPERATOR_NOT_SUBSTR_NOCASE: @IDMEF_CRITERION_OPERATOR_REGEX: @IDMEF_CRITERION_OPERATOR_REGEX_NOCASE: @IDMEF_CRITERION_OPERATOR_NOT_REGEX: @IDMEF_CRITERION_OPERATOR_NOT_REGEX_NOCASE: @IDMEF_CRITERION_OPERATOR_NULL: @IDMEF_CRITERION_OPERATOR_NOT_NULL: @op: @Returns: @criterion: @path: @value: @op: @Returns: @criterion: @criterion: @dst: @Returns: @criterion: @fd: @Returns: @criterion: @out: @Returns: @criterion: @Returns: @criterion: @Returns: @criterion: @Returns: @criterion: @message: @Returns: @criteria: @Returns: @criteria: @Returns: @criteria: @src: @dst: @Returns: @criteria: @fd: @Returns: @criteria: @out: @Returns: @criteria: @Returns: @criteria: @Returns: @criteria: @criterion: @criteria: @criteria2: @criteria: @criteria2: @Returns: @criteria: @message: @Returns: @criteria: @Returns: @criteria: @Returns: @criteria: @str: @Returns: @criteria: @Returns: @criteria: @negate: libprelude-1.0.0/docs/api/tmpl/idmef-message-print.sgml0000664000076400007640000000611711347714755020016 00000000000000 idmef-message-print Dumping an IDMEF message as a string This API provide method for dumping any IDMEF object as a string of characters. When dumping an object, the object and all of it's children are dumped to the provided #prelude_io_t object. The #prelude_io_t object might be a buffer, a file, or even a socket. Check the #prelude_io_t API for more information. #prelude_io_t @ptr: @fd: @ptr: @fd: @ptr: @fd: @ptr: @fd: @ptr: @fd: @ptr: @fd: @ptr: @fd: @ptr: @fd: @ptr: @fd: @ptr: @fd: @ptr: @fd: @ptr: @fd: @ptr: @fd: @ptr: @fd: @ptr: @fd: @ptr: @fd: @ptr: @fd: @ptr: @fd: @ptr: @fd: @ptr: @fd: @ptr: @fd: @ptr: @fd: @ptr: @fd: @ptr: @fd: @ptr: @fd: @ptr: @fd: @ptr: @fd: @ptr: @fd: @ptr: @fd: @ptr: @fd: libprelude-1.0.0/docs/api/tmpl/idmef-message-read.sgml0000664000076400007640000000776011347714755017602 00000000000000 idmef-message-read Reading a message from a #prelude_msg_t buffer Once you read a #prelude_msg_t object, you need to decode this message. In case this is an IDMEF style message, the following API allow to read the relevant IDMEF fields from the #prelude_msg_t object, and create the IDMEF object from it's content. The function you're most probably looking to use is idmef_message_read(), and here is an example on how to use it: int ret; prelude_msg_t *pmsg; idmef_message_t *message; pmsg = whatever_method_to_get_a_prelude_msg(); ret = idmef_message_new(&message); if ( ret < 0 ) return ret; ret = idmef_message_read(message, pmsg); This will decode the full IDMEF message stored within pmsg into the #idmef_message_t IDMEF object and it's childrens. @additional_data: @msg: @Returns: @reference: @msg: @Returns: @classification: @msg: @Returns: @user_id: @msg: @Returns: @user: @msg: @Returns: @address: @msg: @Returns: @process: @msg: @Returns: @web_service: @msg: @Returns: @snmp_service: @msg: @Returns: @service: @msg: @Returns: @node: @msg: @Returns: @source: @msg: @Returns: @file_access: @msg: @Returns: @inode: @msg: @Returns: @checksum: @msg: @Returns: @file: @msg: @Returns: @linkage: @msg: @Returns: @target: @msg: @Returns: @analyzer: @msg: @Returns: @alertident: @msg: @Returns: @impact: @msg: @Returns: @action: @msg: @Returns: @confidence: @msg: @Returns: @assessment: @msg: @Returns: @tool_alert: @msg: @Returns: @correlation_alert: @msg: @Returns: @overflow_alert: @msg: @Returns: @alert: @msg: @Returns: @heartbeat: @msg: @Returns: @message: @msg: @Returns: libprelude-1.0.0/docs/api/tmpl/libprelude-unused.sgml0000664000076400007640000000046611347714755017607 00000000000000 idmef-tree libprelude-1.0.0/docs/api/tmpl/prelude-option.sgml0000664000076400007640000001572611347714755017132 00000000000000 prelude-option @PRELUDE_OPTION_TYPE_CLI: @PRELUDE_OPTION_TYPE_CFG: @PRELUDE_OPTION_TYPE_WIDE: @PRELUDE_OPTION_TYPE_CONTEXT: @PRELUDE_OPTION_TYPE_ROOT: @PRELUDE_OPTION_TYPE_DESTROY: @PRELUDE_OPTION_INPUT_TYPE_STRING: @PRELUDE_OPTION_INPUT_TYPE_INTEGER: @PRELUDE_OPTION_INPUT_TYPE_BOOLEAN: @opt: @out: @context: @Returns: @opt: @out: @context: @Returns: @opt: @out: @context: @Returns: @opt: @optarg: @err: @context: @Returns: @PRELUDE_OPTION_ARGUMENT_REQUIRED: @PRELUDE_OPTION_ARGUMENT_OPTIONAL: @PRELUDE_OPTION_ARGUMENT_NONE: @PRELUDE_OPTION_PRIORITY_IMMEDIATE: @PRELUDE_OPTION_PRIORITY_FIRST: @PRELUDE_OPTION_PRIORITY_NONE: @PRELUDE_OPTION_PRIORITY_LAST: @PRELUDE_OPTION_WARNING_OPTION: @PRELUDE_OPTION_WARNING_ARG: @option: @priority: @opt: @type: @descoff: @fd: @msgbuf: @context: @Returns: @option: @option: @filename: @argc: @argv: @err: @context: @Returns: @parent: @retopt: @type: @shortopt: @longopt: @desc: @has_arg: @set: @get: @Returns: @opt: @type: @opt: @Returns: @new_warnings: @old_warnings: @opt: @Returns: @opt: @Returns: @opt: @data: @opt: @Returns: @oc: @Returns: @oc: @data: @opt: @ctname: @value: @context: @Returns: @opt: @ctname: @value: @context: @Returns: @opt: @ctname: @value: @context: @Returns: @opt: @ctname: @value: @context: @Returns: @retopt: @Returns: @parent: @retopt: @Returns: @opt: @longopt: @opt: @Returns: @opt: @description: @opt: @Returns: @opt: @has_arg: @opt: @Returns: @opt: @value: @opt: @Returns: @opt: @help: @opt: @Returns: @opt: @regex: @opt: @Returns: @opt: @input_type: @opt: @Returns: @opt: @Returns: @start: @cur: @Returns: @opt: @Returns: @opt: @Returns: @opt: @destroy: @opt: @Returns: @opt: @set: @opt: @Returns: @opt: @get: @opt: @Returns: @opt: @commit: @opt: @Returns: @opt: @context: @opt: @ctx: @name: @data: @Returns: @oc: @parent: @name: @type: @walk_children: @Returns: @opt: @name: @Returns: libprelude-1.0.0/docs/api/tmpl/prelude-string.sgml0000664000076400007640000000671711347714755017130 00000000000000 prelude-string @string: @Returns: @string: @str: @Returns: @string: @str: @Returns: @string: @str: @Returns: @string: @str: @len: @Returns: @string: @string: @string: @str: @len: @Returns: @string: @str: @len: @Returns: @string: @buf: @len: @Returns: @string: @buf: @Returns: @string: @buf: @len: @Returns: @string: @buf: @Returns: @string: @buf: @len: @Returns: @string: @buf: @Returns: @src: @dst: @Returns: @src: @dst: @Returns: @string: @Returns: @src: @dst: @Returns: @string: @Returns: @string: @def: @Returns: @string: @Returns: @string: @outptr: @Returns: @string: @Returns: @string: @dst: @str: @Returns: @dst: @str: @len: @Returns: @string: @fmt: @Varargs: @Returns: @string: @fmt: @ap: @Returns: @string: @str: @string: @str: @str1: @str2: @Returns: libprelude-1.0.0/docs/api/tmpl/prelude-log.sgml0000664000076400007640000000302211347714755016365 00000000000000 prelude-log @PRELUDE_LOG_CRIT: @PRELUDE_LOG_ERR: @PRELUDE_LOG_WARN: @PRELUDE_LOG_INFO: @PRELUDE_LOG_DEBUG: @PRELUDE_LOG_FLAGS_QUIET: @PRELUDE_LOG_FLAGS_SYSLOG: @level: @fmt: @Varargs: @level: @fmt: @Varargs: @level: @fmt: @ap: @level: @fmt: @ap: @level: @level: @Returns: @flags: @Returns: @prefix: @filename: @Returns: libprelude-1.0.0/docs/api/tmpl/prelude-option-wide.sgml0000664000076400007640000000205511347714755020047 00000000000000 prelude-option-wide @msg: @type: @request: @Returns: @msgbuf: @request_id: @target_id: @size: @Returns: @client: @msg: @reply: @Returns: @msg: @source_id: @request_id: @value: @Returns: libprelude-1.0.0/docs/api/tmpl/idmef-tree-wrap.sgml0000664000076400007640000024461011347714755017150 00000000000000 idmef-tree-wrap Generating events using the low level IDMEF API The IDMEF API is used by a sensor in order to generate events. IDMEF is an alert description format allowing almost any alert information to fit within an IDMEF alert, independantly of the type of analyzer used. Here is real world example taken from the Snort Prelude sensors. The top level IDMEF object is always of type #idmef_message_t. You should refer to the IDMEF draft, or to the Prelude API documentation in order to get a complete listing of theses objects, or a description of what information an object may carry. void snort_alert_prelude(Packet *p, char *msg, void *data, Event *event) { int ret; idmef_time_t *time; idmef_alert_t *alert; prelude_string_t *str; idmef_message_t *idmef; idmef_classification_t *class; prelude_client_t *client = data; ret = idmef_message_new(&idmef); if ( ret < 0 ) return; ret = idmef_message_new_alert(idmef, &alert); if ( ret < 0 ) goto err; ret = idmef_alert_new_classification(alert, &class); if ( ret < 0 ) goto err; ret = idmef_classification_new_text(class, &str); if ( ret < 0 ) goto err; prelude_string_set_ref(str, msg); ret = event_to_impact(event, alert); if ( ret < 0 ) goto err; ret = event_to_reference(event, class); if ( ret < 0 ) goto err; ret = event_to_source_target(p, alert); if ( ret < 0 ) goto err; ret = packet_to_data(p, event, alert); if ( ret < 0 ) goto err; ret = idmef_alert_new_detect_time(alert, &time); if ( ret < 0 ) goto err; idmef_time_set_from_timeval(time, &p->pkth->ts); ret = idmef_time_new_from_gettimeofday(&time); if ( ret < 0 ) goto err; idmef_alert_set_create_time(alert, time); idmef_alert_set_analyzer(alert, idmef_analyzer_ref(prelude_client_get_analyzer(client)), 0); prelude_client_send_idmef(client, idmef); err: idmef_message_destroy(idmef); prelude_perror(ret, "Unable to create IDMEF alert"); } #idmef_path_t for the high level IDMEF API. @message: @path: @data: @size: @Returns: @message: @path: @result: @Returns: @message: @path: @result: @Returns: @message: @path: @value: @Returns: @message: @path: @data: @size: @Returns: @message: @path: @number: @Returns: @message: @path: @value: @Returns: @message: @path: @value: @Returns: @IDMEF_ADDITIONAL_DATA_TYPE_ERROR: @IDMEF_ADDITIONAL_DATA_TYPE_STRING: @IDMEF_ADDITIONAL_DATA_TYPE_BYTE: @IDMEF_ADDITIONAL_DATA_TYPE_CHARACTER: @IDMEF_ADDITIONAL_DATA_TYPE_DATE_TIME: @IDMEF_ADDITIONAL_DATA_TYPE_INTEGER: @IDMEF_ADDITIONAL_DATA_TYPE_NTPSTAMP: @IDMEF_ADDITIONAL_DATA_TYPE_PORTLIST: @IDMEF_ADDITIONAL_DATA_TYPE_REAL: @IDMEF_ADDITIONAL_DATA_TYPE_BOOLEAN: @IDMEF_ADDITIONAL_DATA_TYPE_BYTE_STRING: @IDMEF_ADDITIONAL_DATA_TYPE_XML: @name: @Returns: @val: @Returns: @ret: @Returns: @src: @dst: @Returns: @src: @dst: @Returns: @additional_data: @Returns: @ptr: @ptr: @Returns: @ptr: @type: @ptr: @ret: @Returns: @ptr: @Returns: @ptr: @meaning: @ptr: @ret: @Returns: @ptr: @Returns: @ptr: @data: @ptr: @ret: @Returns: @IDMEF_REFERENCE_ORIGIN_ERROR: @IDMEF_REFERENCE_ORIGIN_UNKNOWN: @IDMEF_REFERENCE_ORIGIN_VENDOR_SPECIFIC: @IDMEF_REFERENCE_ORIGIN_USER_SPECIFIC: @IDMEF_REFERENCE_ORIGIN_BUGTRAQID: @IDMEF_REFERENCE_ORIGIN_CVE: @IDMEF_REFERENCE_ORIGIN_OSVDB: @name: @Returns: @val: @Returns: @ret: @Returns: @src: @dst: @Returns: @src: @dst: @Returns: @reference: @Returns: @ptr: @ptr: @Returns: @ptr: @origin: @ptr: @ret: @Returns: @ptr: @Returns: @ptr: @name: @ptr: @ret: @Returns: @ptr: @Returns: @ptr: @url: @ptr: @ret: @Returns: @ptr: @Returns: @ptr: @meaning: @ptr: @ret: @Returns: @ret: @Returns: @src: @dst: @Returns: @src: @dst: @Returns: @classification: @Returns: @ptr: @ptr: @Returns: @ptr: @ident: @ptr: @ret: @Returns: @ptr: @Returns: @ptr: @text: @ptr: @ret: @Returns: @classification: @reference_cur: @Returns: @ptr: @object: @pos: @ptr: @ret: @pos: @Returns: @IDMEF_USER_ID_TYPE_ORIGINAL_ERROR: @IDMEF_USER_ID_TYPE_ORIGINAL_USER: @IDMEF_USER_ID_TYPE_CURRENT_USER: @IDMEF_USER_ID_TYPE_TARGET_USER: @IDMEF_USER_ID_TYPE_USER_PRIVS: @IDMEF_USER_ID_TYPE_CURRENT_GROUP: @IDMEF_USER_ID_TYPE_GROUP_PRIVS: @IDMEF_USER_ID_TYPE_OTHER_PRIVS: @name: @Returns: @val: @Returns: @ret: @Returns: @src: @dst: @Returns: @src: @dst: @Returns: @user_id: @Returns: @ptr: @ptr: @Returns: @ptr: @ident: @ptr: @ret: @Returns: @ptr: @Returns: @ptr: @type: @ptr: @ret: @Returns: @ptr: @Returns: @ptr: @tty: @ptr: @ret: @Returns: @ptr: @Returns: @ptr: @name: @ptr: @ret: @Returns: @ptr: @ptr: @Returns: @ptr: @number: @ptr: @ret: @Returns: @IDMEF_USER_CATEGORY_ERROR: @IDMEF_USER_CATEGORY_UNKNOWN: @IDMEF_USER_CATEGORY_APPLICATION: @IDMEF_USER_CATEGORY_OS_DEVICE: @name: @Returns: @val: @Returns: @ret: @Returns: @src: @dst: @Returns: @src: @dst: @Returns: @user: @Returns: @ptr: @ptr: @Returns: @ptr: @ident: @ptr: @ret: @Returns: @ptr: @Returns: @ptr: @category: @ptr: @ret: @Returns: @user: @user_id_cur: @Returns: @ptr: @object: @pos: @ptr: @ret: @pos: @Returns: @IDMEF_ADDRESS_CATEGORY_ERROR: @IDMEF_ADDRESS_CATEGORY_UNKNOWN: @IDMEF_ADDRESS_CATEGORY_ATM: @IDMEF_ADDRESS_CATEGORY_E_MAIL: @IDMEF_ADDRESS_CATEGORY_LOTUS_NOTES: @IDMEF_ADDRESS_CATEGORY_MAC: @IDMEF_ADDRESS_CATEGORY_SNA: @IDMEF_ADDRESS_CATEGORY_VM: @IDMEF_ADDRESS_CATEGORY_IPV4_ADDR: @IDMEF_ADDRESS_CATEGORY_IPV4_ADDR_HEX: @IDMEF_ADDRESS_CATEGORY_IPV4_NET: @IDMEF_ADDRESS_CATEGORY_IPV4_NET_MASK: @IDMEF_ADDRESS_CATEGORY_IPV6_ADDR: @IDMEF_ADDRESS_CATEGORY_IPV6_ADDR_HEX: @IDMEF_ADDRESS_CATEGORY_IPV6_NET: @IDMEF_ADDRESS_CATEGORY_IPV6_NET_MASK: @name: @Returns: @val: @Returns: @ret: @Returns: @src: @dst: @Returns: @src: @dst: @Returns: @address: @Returns: @ptr: @ptr: @Returns: @ptr: @ident: @ptr: @ret: @Returns: @ptr: @Returns: @ptr: @category: @ptr: @ret: @Returns: @ptr: @Returns: @ptr: @vlan_name: @ptr: @ret: @Returns: @ptr: @ptr: @Returns: @ptr: @vlan_num: @ptr: @ret: @Returns: @ptr: @Returns: @ptr: @address: @ptr: @ret: @Returns: @ptr: @Returns: @ptr: @netmask: @ptr: @ret: @Returns: @ret: @Returns: @src: @dst: @Returns: @src: @dst: @Returns: @process: @Returns: @ptr: @ptr: @Returns: @ptr: @ident: @ptr: @ret: @Returns: @ptr: @Returns: @ptr: @name: @ptr: @ret: @Returns: @ptr: @ptr: @Returns: @ptr: @pid: @ptr: @ret: @Returns: @ptr: @Returns: @ptr: @path: @ptr: @ret: @Returns: @process: @prelude_string_cur: @Returns: @ptr: @object: @pos: @ptr: @ret: @pos: @Returns: @process: @prelude_string_cur: @Returns: @ptr: @object: @pos: @ptr: @ret: @pos: @Returns: @ret: @Returns: @src: @dst: @Returns: @src: @dst: @Returns: @web_service: @Returns: @ptr: @ptr: @Returns: @ptr: @url: @ptr: @ret: @Returns: @ptr: @Returns: @ptr: @cgi: @ptr: @ret: @Returns: @ptr: @Returns: @ptr: @http_method: @ptr: @ret: @Returns: @web_service: @prelude_string_cur: @Returns: @ptr: @object: @pos: @ptr: @ret: @pos: @Returns: @ret: @Returns: @src: @dst: @Returns: @src: @dst: @Returns: @snmp_service: @Returns: @ptr: @ptr: @Returns: @ptr: @oid: @ptr: @ret: @Returns: @ptr: @ptr: @Returns: @ptr: @message_processing_model: @ptr: @ret: @Returns: @ptr: @ptr: @Returns: @ptr: @security_model: @ptr: @ret: @Returns: @ptr: @Returns: @ptr: @security_name: @ptr: @ret: @Returns: @ptr: @ptr: @Returns: @ptr: @security_level: @ptr: @ret: @Returns: @ptr: @Returns: @ptr: @context_name: @ptr: @ret: @Returns: @ptr: @Returns: @ptr: @context_engine_id: @ptr: @ret: @Returns: @ptr: @Returns: @ptr: @command: @ptr: @ret: @Returns: @ptr: @Returns: @ptr: @community: @ptr: @ret: @Returns: @IDMEF_SERVICE_TYPE_ERROR: @IDMEF_SERVICE_TYPE_DEFAULT: @IDMEF_SERVICE_TYPE_WEB: @IDMEF_SERVICE_TYPE_SNMP: @name: @Returns: @val: @Returns: @ret: @Returns: @src: @dst: @Returns: @src: @dst: @Returns: @service: @Returns: @ptr: @ptr: @Returns: @ptr: @ident: @ptr: @ret: @Returns: @ptr: @ptr: @Returns: @ptr: @ip_version: @ptr: @ret: @Returns: @ptr: @ptr: @Returns: @ptr: @iana_protocol_number: @ptr: @ret: @Returns: @ptr: @Returns: @ptr: @iana_protocol_name: @ptr: @ret: @Returns: @ptr: @Returns: @ptr: @name: @ptr: @ret: @Returns: @ptr: @ptr: @Returns: @ptr: @port: @ptr: @ret: @Returns: @ptr: @Returns: @ptr: @portlist: @ptr: @ret: @Returns: @ptr: @Returns: @ptr: @protocol: @ptr: @ret: @Returns: @ptr: @Returns: @ptr: @Returns: @ptr: @web_service: @ptr: @ret: @Returns: @ptr: @Returns: @ptr: @snmp_service: @ptr: @ret: @Returns: @IDMEF_NODE_CATEGORY_ERROR: @IDMEF_NODE_CATEGORY_UNKNOWN: @IDMEF_NODE_CATEGORY_ADS: @IDMEF_NODE_CATEGORY_AFS: @IDMEF_NODE_CATEGORY_CODA: @IDMEF_NODE_CATEGORY_DFS: @IDMEF_NODE_CATEGORY_DNS: @IDMEF_NODE_CATEGORY_HOSTS: @IDMEF_NODE_CATEGORY_KERBEROS: @IDMEF_NODE_CATEGORY_NDS: @IDMEF_NODE_CATEGORY_NIS: @IDMEF_NODE_CATEGORY_NISPLUS: @IDMEF_NODE_CATEGORY_NT: @IDMEF_NODE_CATEGORY_WFW: @name: @Returns: @val: @Returns: @ret: @Returns: @src: @dst: @Returns: @src: @dst: @Returns: @node: @Returns: @ptr: @ptr: @Returns: @ptr: @ident: @ptr: @ret: @Returns: @ptr: @Returns: @ptr: @category: @ptr: @ret: @Returns: @ptr: @Returns: @ptr: @location: @ptr: @ret: @Returns: @ptr: @Returns: @ptr: @name: @ptr: @ret: @Returns: @node: @address_cur: @Returns: @ptr: @object: @pos: @ptr: @ret: @pos: @Returns: @IDMEF_SOURCE_SPOOFED_ERROR: @IDMEF_SOURCE_SPOOFED_UNKNOWN: @IDMEF_SOURCE_SPOOFED_YES: @IDMEF_SOURCE_SPOOFED_NO: @name: @Returns: @val: @Returns: @ret: @Returns: @src: @dst: @Returns: @src: @dst: @Returns: @source: @Returns: @ptr: @ptr: @Returns: @ptr: @ident: @ptr: @ret: @Returns: @ptr: @Returns: @ptr: @spoofed: @ptr: @ret: @Returns: @ptr: @Returns: @ptr: @interface: @ptr: @ret: @Returns: @ptr: @Returns: @ptr: @node: @ptr: @ret: @Returns: @ptr: @Returns: @ptr: @user: @ptr: @ret: @Returns: @ptr: @Returns: @ptr: @process: @ptr: @ret: @Returns: @ptr: @Returns: @ptr: @service: @ptr: @ret: @Returns: @ret: @Returns: @src: @dst: @Returns: @src: @dst: @Returns: @file_access: @Returns: @ptr: @ptr: @Returns: @ptr: @user_id: @ptr: @ret: @Returns: @file_access: @prelude_string_cur: @Returns: @ptr: @object: @pos: @ptr: @ret: @pos: @Returns: @ret: @Returns: @src: @dst: @Returns: @src: @dst: @Returns: @inode: @Returns: @ptr: @ptr: @Returns: @ptr: @change_time: @ptr: @ret: @Returns: @ptr: @ptr: @Returns: @ptr: @number: @ptr: @ret: @Returns: @ptr: @ptr: @Returns: @ptr: @major_device: @ptr: @ret: @Returns: @ptr: @ptr: @Returns: @ptr: @minor_device: @ptr: @ret: @Returns: @ptr: @ptr: @Returns: @ptr: @c_major_device: @ptr: @ret: @Returns: @ptr: @ptr: @Returns: @ptr: @c_minor_device: @ptr: @ret: @Returns: @IDMEF_CHECKSUM_ALGORITHM_ERROR: @IDMEF_CHECKSUM_ALGORITHM_MD4: @IDMEF_CHECKSUM_ALGORITHM_MD5: @IDMEF_CHECKSUM_ALGORITHM_SHA1: @IDMEF_CHECKSUM_ALGORITHM_SHA2_256: @IDMEF_CHECKSUM_ALGORITHM_SHA2_384: @IDMEF_CHECKSUM_ALGORITHM_SHA2_512: @IDMEF_CHECKSUM_ALGORITHM_CRC_32: @IDMEF_CHECKSUM_ALGORITHM_HAVAL: @IDMEF_CHECKSUM_ALGORITHM_TIGER: @IDMEF_CHECKSUM_ALGORITHM_GOST: @name: @Returns: @val: @Returns: @ret: @Returns: @src: @dst: @Returns: @src: @dst: @Returns: @checksum: @Returns: @ptr: @ptr: @Returns: @ptr: @value: @ptr: @ret: @Returns: @ptr: @Returns: @ptr: @key: @ptr: @ret: @Returns: @ptr: @Returns: @ptr: @algorithm: @ptr: @ret: @Returns: @IDMEF_FILE_CATEGORY_ERROR: @IDMEF_FILE_CATEGORY_CURRENT: @IDMEF_FILE_CATEGORY_ORIGINAL: @name: @Returns: @val: @Returns: @IDMEF_FILE_FSTYPE_ERROR: @IDMEF_FILE_FSTYPE_UFS: @IDMEF_FILE_FSTYPE_EFS: @IDMEF_FILE_FSTYPE_NFS: @IDMEF_FILE_FSTYPE_AFS: @IDMEF_FILE_FSTYPE_NTFS: @IDMEF_FILE_FSTYPE_FAT16: @IDMEF_FILE_FSTYPE_FAT32: @IDMEF_FILE_FSTYPE_PCFS: @IDMEF_FILE_FSTYPE_JOLIET: @IDMEF_FILE_FSTYPE_ISO9660: @name: @Returns: @val: @Returns: @ret: @Returns: @src: @dst: @Returns: @src: @dst: @Returns: @file: @Returns: @ptr: @ptr: @Returns: @ptr: @ident: @ptr: @ret: @Returns: @ptr: @Returns: @ptr: @name: @ptr: @ret: @Returns: @ptr: @Returns: @ptr: @path: @ptr: @ret: @Returns: @ptr: @Returns: @ptr: @create_time: @ptr: @ret: @Returns: @ptr: @Returns: @ptr: @modify_time: @ptr: @ret: @Returns: @ptr: @Returns: @ptr: @access_time: @ptr: @ret: @Returns: @ptr: @ptr: @Returns: @ptr: @data_size: @ptr: @ret: @Returns: @ptr: @ptr: @Returns: @ptr: @disk_size: @ptr: @ret: @Returns: @file: @file_access_cur: @Returns: @ptr: @object: @pos: @ptr: @ret: @pos: @Returns: @file: @linkage_cur: @Returns: @ptr: @object: @pos: @ptr: @ret: @pos: @Returns: @ptr: @Returns: @ptr: @inode: @ptr: @ret: @Returns: @file: @checksum_cur: @Returns: @ptr: @object: @pos: @ptr: @ret: @pos: @Returns: @ptr: @Returns: @ptr: @category: @ptr: @ret: @Returns: @ptr: @ptr: @Returns: @ptr: @fstype: @ptr: @ret: @Returns: @ptr: @Returns: @ptr: @file_type: @ptr: @ret: @Returns: @IDMEF_LINKAGE_CATEGORY_ERROR: @IDMEF_LINKAGE_CATEGORY_HARD_LINK: @IDMEF_LINKAGE_CATEGORY_MOUNT_POINT: @IDMEF_LINKAGE_CATEGORY_REPARSE_POINT: @IDMEF_LINKAGE_CATEGORY_SHORTCUT: @IDMEF_LINKAGE_CATEGORY_STREAM: @IDMEF_LINKAGE_CATEGORY_SYMBOLIC_LINK: @name: @Returns: @val: @Returns: @ret: @Returns: @src: @dst: @Returns: @src: @dst: @Returns: @linkage: @Returns: @ptr: @ptr: @Returns: @ptr: @category: @ptr: @ret: @Returns: @ptr: @Returns: @ptr: @name: @ptr: @ret: @Returns: @ptr: @Returns: @ptr: @path: @ptr: @ret: @Returns: @ptr: @Returns: @ptr: @file: @ptr: @ret: @Returns: @IDMEF_TARGET_DECOY_ERROR: @IDMEF_TARGET_DECOY_UNKNOWN: @IDMEF_TARGET_DECOY_YES: @IDMEF_TARGET_DECOY_NO: @name: @Returns: @val: @Returns: @ret: @Returns: @src: @dst: @Returns: @src: @dst: @Returns: @target: @Returns: @ptr: @ptr: @Returns: @ptr: @ident: @ptr: @ret: @Returns: @ptr: @Returns: @ptr: @decoy: @ptr: @ret: @Returns: @ptr: @Returns: @ptr: @interface: @ptr: @ret: @Returns: @ptr: @Returns: @ptr: @node: @ptr: @ret: @Returns: @ptr: @Returns: @ptr: @user: @ptr: @ret: @Returns: @ptr: @Returns: @ptr: @process: @ptr: @ret: @Returns: @ptr: @Returns: @ptr: @service: @ptr: @ret: @Returns: @target: @file_cur: @Returns: @ptr: @object: @pos: @ptr: @ret: @pos: @Returns: @ret: @Returns: @src: @dst: @Returns: @src: @dst: @Returns: @analyzer: @Returns: @ptr: @ptr: @Returns: @ptr: @analyzerid: @ptr: @ret: @Returns: @ptr: @Returns: @ptr: @name: @ptr: @ret: @Returns: @ptr: @Returns: @ptr: @manufacturer: @ptr: @ret: @Returns: @ptr: @Returns: @ptr: @model: @ptr: @ret: @Returns: @ptr: @Returns: @ptr: @version: @ptr: @ret: @Returns: @ptr: @Returns: @ptr: @class_str: @ptr: @ret: @Returns: @ptr: @Returns: @ptr: @ostype: @ptr: @ret: @Returns: @ptr: @Returns: @ptr: @osversion: @ptr: @ret: @Returns: @ptr: @Returns: @ptr: @node: @ptr: @ret: @Returns: @ptr: @Returns: @ptr: @process: @ptr: @ret: @Returns: @ret: @Returns: @src: @dst: @Returns: @src: @dst: @Returns: @alertident: @Returns: @ptr: @ptr: @Returns: @ptr: @alertident: @ptr: @ret: @Returns: @ptr: @Returns: @ptr: @analyzerid: @ptr: @ret: @Returns: @IDMEF_IMPACT_SEVERITY_ERROR: @IDMEF_IMPACT_SEVERITY_INFO: @IDMEF_IMPACT_SEVERITY_LOW: @IDMEF_IMPACT_SEVERITY_MEDIUM: @IDMEF_IMPACT_SEVERITY_HIGH: @name: @Returns: @val: @Returns: @IDMEF_IMPACT_COMPLETION_ERROR: @IDMEF_IMPACT_COMPLETION_FAILED: @IDMEF_IMPACT_COMPLETION_SUCCEEDED: @name: @Returns: @val: @Returns: @IDMEF_IMPACT_TYPE_ERROR: @IDMEF_IMPACT_TYPE_OTHER: @IDMEF_IMPACT_TYPE_ADMIN: @IDMEF_IMPACT_TYPE_DOS: @IDMEF_IMPACT_TYPE_FILE: @IDMEF_IMPACT_TYPE_RECON: @IDMEF_IMPACT_TYPE_USER: @name: @Returns: @val: @Returns: @ret: @Returns: @src: @dst: @Returns: @src: @dst: @Returns: @impact: @Returns: @ptr: @ptr: @ptr: @Returns: @ptr: @severity: @ptr: @ret: @Returns: @ptr: @ptr: @Returns: @ptr: @completion: @ptr: @ret: @Returns: @ptr: @Returns: @ptr: @type: @ptr: @ret: @Returns: @ptr: @Returns: @ptr: @description: @ptr: @ret: @Returns: @IDMEF_ACTION_CATEGORY_ERROR: @IDMEF_ACTION_CATEGORY_OTHER: @IDMEF_ACTION_CATEGORY_BLOCK_INSTALLED: @IDMEF_ACTION_CATEGORY_NOTIFICATION_SENT: @IDMEF_ACTION_CATEGORY_TAKEN_OFFLINE: @name: @Returns: @val: @Returns: @ret: @Returns: @src: @dst: @Returns: @src: @dst: @Returns: @action: @Returns: @ptr: @ptr: @Returns: @ptr: @category: @ptr: @ret: @Returns: @ptr: @Returns: @ptr: @description: @ptr: @ret: @Returns: @IDMEF_CONFIDENCE_RATING_ERROR: @IDMEF_CONFIDENCE_RATING_NUMERIC: @IDMEF_CONFIDENCE_RATING_LOW: @IDMEF_CONFIDENCE_RATING_MEDIUM: @IDMEF_CONFIDENCE_RATING_HIGH: @name: @Returns: @val: @Returns: @ret: @Returns: @src: @dst: @Returns: @src: @dst: @Returns: @confidence: @Returns: @ptr: @ptr: @Returns: @ptr: @rating: @ptr: @ret: @Returns: @ptr: @Returns: @ptr: @confidence: @ptr: @ret: @Returns: @ret: @Returns: @src: @dst: @Returns: @src: @dst: @Returns: @assessment: @Returns: @ptr: @ptr: @Returns: @ptr: @impact: @ptr: @ret: @Returns: @assessment: @action_cur: @Returns: @ptr: @object: @pos: @ptr: @ret: @pos: @Returns: @ptr: @Returns: @ptr: @confidence: @ptr: @ret: @Returns: @ret: @Returns: @src: @dst: @Returns: @src: @dst: @Returns: @tool_alert: @Returns: @ptr: @ptr: @Returns: @ptr: @name: @ptr: @ret: @Returns: @ptr: @Returns: @ptr: @command: @ptr: @ret: @Returns: @tool_alert: @alertident_cur: @Returns: @ptr: @object: @pos: @ptr: @ret: @pos: @Returns: @ret: @Returns: @src: @dst: @Returns: @src: @dst: @Returns: @correlation_alert: @Returns: @ptr: @ptr: @Returns: @ptr: @name: @ptr: @ret: @Returns: @correlation_alert: @alertident_cur: @Returns: @ptr: @object: @pos: @ptr: @ret: @pos: @Returns: @ret: @Returns: @src: @dst: @Returns: @src: @dst: @Returns: @overflow_alert: @Returns: @ptr: @ptr: @Returns: @ptr: @program: @ptr: @ret: @Returns: @ptr: @ptr: @Returns: @ptr: @size: @ptr: @ret: @Returns: @ptr: @Returns: @ptr: @buffer: @ptr: @ret: @Returns: @IDMEF_ALERT_TYPE_ERROR: @IDMEF_ALERT_TYPE_DEFAULT: @IDMEF_ALERT_TYPE_TOOL: @IDMEF_ALERT_TYPE_CORRELATION: @IDMEF_ALERT_TYPE_OVERFLOW: @name: @Returns: @val: @Returns: @ret: @Returns: @src: @dst: @Returns: @src: @dst: @Returns: @alert: @Returns: @ptr: @ptr: @Returns: @ptr: @messageid: @ptr: @ret: @Returns: @alert: @analyzer_cur: @Returns: @ptr: @object: @pos: @ptr: @ret: @pos: @Returns: @ptr: @Returns: @ptr: @create_time: @ptr: @ret: @Returns: @ptr: @Returns: @ptr: @classification: @ptr: @ret: @Returns: @ptr: @Returns: @ptr: @detect_time: @ptr: @ret: @Returns: @ptr: @Returns: @ptr: @analyzer_time: @ptr: @ret: @Returns: @alert: @source_cur: @Returns: @ptr: @object: @pos: @ptr: @ret: @pos: @Returns: @alert: @target_cur: @Returns: @ptr: @object: @pos: @ptr: @ret: @pos: @Returns: @ptr: @Returns: @ptr: @assessment: @ptr: @ret: @Returns: @alert: @additional_data_cur: @Returns: @ptr: @object: @pos: @ptr: @ret: @pos: @Returns: @ptr: @Returns: @ptr: @Returns: @ptr: @tool_alert: @ptr: @ret: @Returns: @ptr: @Returns: @ptr: @correlation_alert: @ptr: @ret: @Returns: @ptr: @Returns: @ptr: @overflow_alert: @ptr: @ret: @Returns: @ret: @Returns: @src: @dst: @Returns: @src: @dst: @Returns: @heartbeat: @Returns: @ptr: @ptr: @Returns: @ptr: @messageid: @ptr: @ret: @Returns: @heartbeat: @analyzer_cur: @Returns: @ptr: @object: @pos: @ptr: @ret: @pos: @Returns: @ptr: @Returns: @ptr: @create_time: @ptr: @ret: @Returns: @ptr: @Returns: @ptr: @analyzer_time: @ptr: @ret: @Returns: @ptr: @ptr: @Returns: @ptr: @heartbeat_interval: @ptr: @ret: @Returns: @heartbeat: @additional_data_cur: @Returns: @ptr: @object: @pos: @ptr: @ret: @pos: @Returns: @IDMEF_MESSAGE_TYPE_ERROR: @IDMEF_MESSAGE_TYPE_ALERT: @IDMEF_MESSAGE_TYPE_HEARTBEAT: @name: @Returns: @val: @Returns: @ret: @Returns: @src: @dst: @Returns: @src: @dst: @Returns: @message: @Returns: @ptr: @ptr: @Returns: @ptr: @version: @ptr: @ret: @Returns: @ptr: @Returns: @ptr: @Returns: @ptr: @alert: @ptr: @ret: @Returns: @ptr: @Returns: @ptr: @heartbeat: @ptr: @ret: @Returns: @message: @msg: @message: @Returns: @obj1: @obj2: @Returns: @obj1: @obj2: @Returns: @obj1: @obj2: @Returns: @obj1: @obj2: @Returns: @obj1: @obj2: @Returns: @obj1: @obj2: @Returns: @obj1: @obj2: @Returns: @obj1: @obj2: @Returns: @obj1: @obj2: @Returns: @obj1: @obj2: @Returns: @obj1: @obj2: @Returns: @data1: @data2: @Returns: @obj1: @obj2: @Returns: @obj1: @obj2: @Returns: @obj1: @obj2: @Returns: @obj1: @obj2: @Returns: @obj1: @obj2: @Returns: @obj1: @obj2: @Returns: @obj1: @obj2: @Returns: @obj1: @obj2: @Returns: @obj1: @obj2: @Returns: @obj1: @obj2: @Returns: @obj1: @obj2: @Returns: @obj1: @obj2: @Returns: @obj1: @obj2: @Returns: @obj1: @obj2: @Returns: @obj1: @obj2: @Returns: @time1: @time2: @Returns: @obj1: @obj2: @Returns: @obj1: @obj2: @Returns: @obj1: @obj2: @Returns: @obj1: @obj2: @Returns: libprelude-1.0.0/docs/api/tmpl/idmef-data.sgml0000664000076400007640000001363211347714755016151 00000000000000 idmef-data @IDMEF_DATA_TYPE_UNKNOWN: @IDMEF_DATA_TYPE_CHAR: @IDMEF_DATA_TYPE_BYTE: @IDMEF_DATA_TYPE_UINT32: @IDMEF_DATA_TYPE_UINT64: @IDMEF_DATA_TYPE_FLOAT: @IDMEF_DATA_TYPE_CHAR_STRING: @IDMEF_DATA_TYPE_BYTE_STRING: @refcount: @flags: @type: @len: @data: @Returns: @data: @Returns: @data: @c: @Returns: @data: @i: @Returns: @data: @i: @Returns: @data: @i: @Returns: @data: @f: @Returns: @data: @c: @data: @i: @data: @i: @data: @i: @data: @f: @data: @type: @ptr: @len: @Returns: @data: @type: @ptr: @len: @Returns: @data: @type: @ptr: @len: @Returns: @data: @type: @ptr: @len: @Returns: @data: @type: @ptr: @len: @Returns: @data: @type: @ptr: @len: @Returns: @data: @str: @len: @Returns: @data: @str: @len: @Returns: @data: @ptr: @len: @Returns: @data: @ptr: @len: @Returns: @data: @ptr: @len: @Returns: @data: @ptr: @len: @Returns: @data: @ptr: @Returns: @data: @ptr: @Returns: @data: @ptr: @Returns: @data: @ptr: @Returns: @data: @ptr: @Returns: @data: @ptr: @Returns: @string: @str: @data: @ptr: @len: @Returns: @data: @ptr: @len: @Returns: @data: @ptr: @len: @Returns: @data: @ptr: @len: @Returns: @data: @ptr: @len: @Returns: @data: @ptr: @len: @Returns: @data: @src: @dst: @Returns: @src: @dst: @Returns: @src: @dst: @Returns: @data: @Returns: @data: @Returns: @data: @Returns: @data: @Returns: @data: @Returns: @data: @Returns: @data: @Returns: @data: @Returns: @data: @Returns: @data: @Returns: @data: @Returns: @data: @out: @Returns: @data: libprelude-1.0.0/docs/api/tmpl/prelude-msg.sgml0000664000076400007640000001007111347714755016374 00000000000000 prelude-msg Prelude Messaging API This Mesaging API is used for differents Prelude program to communicate together. It feature compatibility between version, and use a way to describe data similar to XML. The Message header contain the protocol version, which is only to be used in case the main protocol structure change (compatibility break), The tag describe the kind of message, The fragment field may be used if a message is sent in several time, The priority may be used by the receiving end to priorityze task, The datalen contain the size of the whole message in network byte order 8bits 8bits 8bits 8bits 32bits +--------+--------+--------+----------+------------------------------+ |version | tag |priority| fragment | datalen | +--------+--------+--------+----------+------------------------------+ Then the message itself contain submessage composed of : A tag describing the kind of payload, the len of the payload (in network byte order), the payload itself, and an end of message byte (0xff) in order to resynchronize in case of problem. 8bits 32bits 8bits +--------+--------------------------------+-----------------+--------+ | tag | len | payload | 0xff | +--------+--------------------------------+-----------------+--------+ prelude-msgbuf @PRELUDE_MSG_PRIORITY_NONE: @PRELUDE_MSG_PRIORITY_LOW: @PRELUDE_MSG_PRIORITY_MID: @PRELUDE_MSG_PRIORITY_HIGH: @msg: @pio: @Returns: @msg: @dst: @src: @Returns: @msg: @tag: @len: @buf: @Returns: @msg: @msg: @ret: @flush_msg_cb: @data: @Returns: @ret: @msgcount: @msglen: @tag: @priority: @Returns: @msg: @tag: @len: @data: @Returns: @msg: @dst: @Returns: @msg: @tag: @msg: @priority: @msg: @Returns: @msg: @Returns: @msg: @Returns: @msg: @Returns: @msg: @msg: @tv: @Returns: @msg: @Returns: @msg: @Returns: @msg: @Returns: @msg: @flush_msg_cb: @msg: @data: @msg: @Returns: libprelude-1.0.0/docs/api/tmpl/prelude.sgml0000664000076400007640000000230411347714755015610 00000000000000 prelude Initializing the library Before any operation are done using the prelude library, the user first need to initialize it using the prelude_init() function. int ret; ret = prelude_init(&argc, argv); if ( ret < 0 ) { prelude_perror(ret, "unable to initialize the prelude library"); return -1; } @argc: @argv: @Returns: @req_version: @Returns: @nil: @Returns: libprelude-1.0.0/docs/api/tmpl/prelude-connection-pool.sgml0000664000076400007640000001141711347714755020721 00000000000000 prelude-connection-pool Pool of connection handling This API handle pool of connection, allowing to address a set of connection using only one object. AND & OR of connection are supported, so that it is possible to address several connection at once, or to only address a set of connection if another connection went down. Additionally it provide failover in case one of the connection in the pool goes down, and automatic reconnection and flushing of the information that could not be sent due to the connection status. It is usually not necessary to access this API directly, however if you are looking at how to read events from a pool of connection, you're most probably looking for the prelude_connection_pool_check_event() function. If this is the case, use prelude_connection_pool_check_event() for polling the pool or prelude_connection_set_event_handler() / prelude_connection_set_global_event_handler() if you want asynchronous notification of event. Note that prelude_connection_set_event_handler() and prelude_connection_set_global_event_handler() are only asynchronous if timer are running in asynchronous mode. Otherwise, the callback for theses function might be called when you call the prelude_timer_wake_up() function. In the provided callback, you might use prelude_connection_recv() to retrieve an event of type #PRELUDE_CONNECTION_POOL_EVENT_INPUT. And, you could, for example, if the retrieved message has the #PRELUDE_MSG_ID_IDMEF tag, provide the returned #prelude_msg_t object to idmef_message_read() in order to convert the received message to a #idmef_message_t object. #prelude_connection_t idmef_message_read() @PRELUDE_CONNECTION_POOL_FLAGS_RECONNECT: @PRELUDE_CONNECTION_POOL_FLAGS_FAILOVER: @PRELUDE_CONNECTION_POOL_EVENT_INPUT: @PRELUDE_CONNECTION_POOL_EVENT_DEAD: @PRELUDE_CONNECTION_POOL_EVENT_ALIVE: @pool: @msg: @pool: @msg: @pool: @Returns: @ret: @cp: @permission: @Returns: @pool: @Returns: @pool: @Returns: @pool: @cnx: @Returns: @pool: @cnx: @Returns: @pool: @cnx: @Returns: @pool: @cnx: @Returns: @pool: @cfgstr: @Returns: @pool: @Returns: @pool: @pool: @Returns: @pool: @flags: @pool: @req_perm: @pool: @data: @pool: @Returns: @pool: @timeout: @outcon: @outmsg: @Returns: @pool: @timeout: @event_cb: @extra: @Returns: @pool: @wanted_events: @callback: @pool: @wanted_events: @callback: libprelude-1.0.0/docs/api/tmpl/idmef-tree.sgml0000664000076400007640000000032611347714755016173 00000000000000 idmef-tree libprelude-1.0.0/docs/api/tmpl/idmef-value.sgml0000664000076400007640000001644611347714755016362 00000000000000 idmef-value @value: @val: @Returns: @value: @val: @Returns: @value: @val: @Returns: @value: @val: @Returns: @value: @val: @Returns: @value: @val: @Returns: @value: @val: @Returns: @value: @val: @Returns: @value: @val: @Returns: @value: @val: @Returns: @value: @string: @Returns: @value: @time: @Returns: @value: @data: @Returns: @value: @classid: @ptr: @Returns: @value: @Returns: @value: @classid: @buf: @Returns: @value: @classid: @buf: @Returns: @value: @classid: @val: @Returns: @value: @type: @ptr: @Returns: @value: @path: @buf: @Returns: @value: @type: @buf: @Returns: @value: @classid: @ptr: @Returns: @value: @data: @Returns: @value: @val: @Returns: @value: @classid: @buf: @Returns: @value: @classid: @no: @Returns: @value: @classid: @buf: @Returns: @value: @val: @Returns: @value: @val: @Returns: @value: @val: @Returns: @value: @val: @Returns: @value: @val: @Returns: @value: @string: @Returns: @value: @time: @Returns: @value: @val: @Returns: @value: @val: @Returns: @value: @val: @Returns: @value: @val: @Returns: @val: @Returns: @val: @Returns: @val: @Returns: @val: @Returns: @val: @Returns: @val: @Returns: @val: @Returns: @val: @Returns: @val: @Returns: @val: @Returns: @val: @Returns: @val: @Returns: @val: @Returns: @val: @Returns: @list: @item: @Returns: @list: @Returns: @list: @Returns: @value: @Returns: @value: @Returns: @value: @Returns: @value: @Returns: @value: @Returns: @value: @callback: @extra: @Returns: @value: @callback: @extra: @Returns: @val: @n: @Returns: @val: @Returns: @val: @dst: @Returns: @val: @Returns: @val: @fd: @Returns: @val: @out: @Returns: @val: @res: @Returns: @val1: @val2: @op: @Returns: @value: @op: @Returns: @value: @result: @Returns: @val: libprelude-1.0.0/docs/api/tmpl/idmef-time.sgml0000664000076400007640000001120411347714755016167 00000000000000 idmef-time Time representation in IDMEF message The #idmef_time_t type is used in order to represent a time value in an IDMEF message. This object contain information such as the number of seconds since the Epoch, the local GMT offset, the number of micro second (if applicable). When creating an IDMEF message, you need to insert a timestamp in it. IDMEF provide differents time field to be used for this: AnalyzerTimeThe AnalyzerTime class is used to indicate the current date and time on the analyzer. Its values should be filled in as late as possible in the message transmission process, ideally immediately before placing the message "on the wire." CreateTimeThe CreateTime class is used to indicate the date and time the alert or heartbeat was created by the analyzer. DetectTimeThe DetectTime class is used to indicate the date and time the event(s) producing an alert was detected by the analyzer. In the case of more than one event, the time the first event was detected. (This may or may not be the same time as CreateTime; analyzers are not required to send alerts immediately upon detection). You don't need to take care of the AnalyzerTime field, since in Prelude, once an events is handed to the library, and if the sending of the message fail, there will be a fallback to backuping the event for later retransmission. Thus the library has to take care of setting the AnalyzerTime for you (since the message might not be emited immediatly in this specific case. Several helper are available in order to create #idmef_time_t object. Most probably, the function that you will need are the one bellow: idmef_time_new_from_gettimeofday() and idmef_time_set_from_gettimeofday() idmef_time_new_from_timeval() and idmef_time_set_from_timeval() idmef_time_new_from_time() and idmef_time_set_from_time() idmef_time_new_from_string() and idmef_time_set_from_string() @time: @Returns: @time: @Returns: @time: @t: @Returns: @time: @Returns: @time: @buf: @Returns: @time: @buf: @Returns: @time: @tv: @Returns: @time: @t: @time: @Returns: @time: @buf: @Returns: @time: @buf: @Returns: @time: @tv: @Returns: @time: @time: @src: @dst: @Returns: @src: @dst: @Returns: @time: @sec: @time: @usec: @time: @gmtoff: @time: @Returns: @time: @Returns: @time: @Returns: @time: @out: @Returns: @time: @out: @Returns: libprelude-1.0.0/docs/api/tmpl/idmef-path.sgml0000664000076400007640000001300511347714755016166 00000000000000 idmef-path The High level IDMEF API. The IDMEF path API provide a methodes to define a "path" in the IDMEF tree. Once this path is defined, the user might set or retrieve this path. Here is an example of how to use this API in order to set a given path within a #idmef_message_t root object: First, we need to create a path to the object we want to create. If for example, we wish to create the alert.classification.text path within our message, we will use: int ret; idmef_path_t *path; ret = idmef_path_new(&path, "alert.classification.text"); if ( ret < 0 ) return ret; Using the above, we just created a "pointer" to a given path in our #idmef_message_t. This path doesn't yet exist, but might be used to read, or to write a value. int ret; idmef_value_t *value; ret = idmef_value_new_from_path(&value, path, "A value"); if ( ret < 0 ) return ret; Here we just created a value applicable to the previously created path. That is, if our path is pointing to a value of type string, the created #idmef_value_t object will be of this type. idmef_message_t *idmef; /* * create our top message */ ret = idmef_message_new(&idmef); /* * Set the previously defined path to the previously created value * in the top level idmef message 'idmef'. */ ret = idmef_path_set(path, idmef, value); And finally, we create our top level #idmef_message_t object and set the created #idmef_value_t as the value for our created #idmef_path_t. Given our previous example, we can write the following function: static int set_idmef_path(idmef_message_t *message, const char *pathname, const char *value) { int ret; idmef_value_t *val; idmef_path_t *path; ret = idmef_path_new(&path, pathname); if ( ret < 0 ) return ret; ret = idmef_value_new_from_path(&val, path, value); if ( ret < 0 ) { idmef_path_destroy(path); return ret; } ret = idmef_path_set(path, message, val); idmef_value_destroy(val); idmef_path_destroy(path); return ret; } You will then be able to set any field of the IDMEF message using: idmef_message_t *idmef; ret = idmef_message_new(&idmef); if ( ret < 0 ) return ret; set_idmef_path(idmef, "alert.classification.text", "My classification text"); set_idmef_path(idmef, "alert.classification.reference(0).name", "OSVDB-XXXX"); set_idmef_path(idmef, "alert.classification.reference(0).origin", "osvdb"); set_idmef_path(idmef, "alert.classification.reference(0).url", "http://my.url/"); set_idmef_path(idmef, "alert.source(0).node.address(0).address", "127.0.0.1"); #idmef_value_t for setting #idmef_path_t value. @path: @message: @ret: @Returns: @path: @message: @value: @Returns: @path: @format: @Varargs: @Returns: @path: @format: @args: @Returns: @path: @buffer: @Returns: @path: @depth: @Returns: @path: @depth: @Returns: @path: @depth: @index: @Returns: @path: @depth: @Returns: @path: @depth: @Returns: @path: @child_name: @index: @Returns: @path: @Returns: @path: @p1: @p2: @depth: @Returns: @p1: @p2: @Returns: @src: @dst: @Returns: @path: @Returns: @path: @depth: @Returns: @path: @Returns: @path: @Returns: @path: @depth: @Returns: @path: @Returns: @path: @op: @Returns: @path: @result: @Returns: libprelude-1.0.0/docs/api/tmpl/prelude-async.sgml0000664000076400007640000000203511347714755016724 00000000000000 prelude-async @PRELUDE_ASYNC_FLAGS_TIMER: @object: @data: @Returns: @Returns: @flags: @obj: @obj: libprelude-1.0.0/docs/api/tmpl/prelude-client-profile.sgml0000664000076400007640000000617011347714755020527 00000000000000 prelude-client-profile @ret: @name: @Returns: @cp: @Returns: @cp: @cp: @buf: @size: @cp: @buf: @size: @cp: @buf: @size: @cp: @buf: @size: @cp: @buf: @size: @cp: @buf: @size: @cp: @buf: @size: @cp: @buf: @size: @cp: @buf: @size: @cp: @buf: @size: @cp: @buf: @size: @cp: @prefix: @Returns: @cp: @buf: @size: @cp: @uid: @cp: @Returns: @cp: @gid: @cp: @Returns: @cp: @name: @Returns: @cp: @Returns: @cp: @Returns: @cp: @analyzerid: @cp: @credentials: @Returns: libprelude-1.0.0/docs/api/Makefile.am0000664000076400007640000000534011225122036014323 00000000000000## Process this file with automake to produce Makefile.in # We require automake 1.6 at least. AUTOMAKE_OPTIONS = 1.6 # This is a blank Makefile.am for using gtk-doc. # Copy this to your project's API docs directory and modify the variables to # suit your project. See the GTK+ Makefiles in gtk+/docs/reference for examples # of using the various options. # The name of the module, e.g. 'glib'. DOC_MODULE=libprelude # The top-level SGML file. You can change this if you want to. DOC_MAIN_SGML_FILE=$(DOC_MODULE)-docs.sgml # The directory containing the source code. Relative to $(srcdir). # gtk-doc will search all .c & .h files beneath here for inline comments # documenting the functions and macros. DOC_SOURCE_DIR=$(top_srcdir)/src # Extra options to pass to gtkdoc-scangobj. Not normally needed. SCANGOBJ_OPTIONS= # Extra options to supply to gtkdoc-scan. # e.g. SCAN_OPTIONS=--deprecated-guards="GTK_DISABLE_DEPRECATED" SCAN_OPTIONS=--deprecated-guards="PRELUDE_DISABLE_DEPRECATED" # Extra options to supply to gtkdoc-mkdb. # e.g. MKDB_OPTIONS=--sgml-mode --output-format=xml MKDB_OPTIONS=--sgml-mode --output-format=xml --ignore-files=idmef-criteria-string.lex.c # Extra options to supply to gtkdoc-fixref. Not normally needed. # e.g. FIXXREF_OPTIONS=--extra-dir=../gdk-pixbuf/html --extra-dir=../gdk/html FIXXREF_OPTIONS= # Used for dependencies. The docs will be rebuilt if any of these change. # e.g. HFILE_GLOB=$(top_srcdir)/gtk/*.h # e.g. CFILE_GLOB=$(top_srcdir)/gtk/*.c HFILE_GLOB= CFILE_GLOB= # Header files to ignore when scanning. # e.g. IGNORE_HFILES=gtkdebug.h gtkintl.h IGNORE_HFILES=config-engine.h libmissing.h idmef-tree-data.h ntp.h tls-auth.h tls-util.h code-from-errno.h code-to-errno.h err-codes-sym.h err-codes.h err-sources-sym.h err-sources.h errnos-sym.h gettext.h mkerrcodes.h idmef-criteria-string.yac.h idmef-tree.h prelude-extract.h prelude-message-id.h idmef-message-id.h idmef-class.h idmef-value-type.h daemonize.h common.h variable.h # Images to copy into HTML directory. # e.g. HTML_IMAGES=$(top_srcdir)/gtk/stock-icons/stock_about_24.png HTML_IMAGES= # Extra SGML files that are included by $(DOC_MAIN_SGML_FILE). # e.g. content_files=running.sgml building.sgml changes-2.0.sgml content_files= # CFLAGS and LDFLAGS for compiling gtkdoc-scangobj with your library. # Only needed if you are using gtkdoc-scangobj to dynamically query widget # signals and properties. # e.g. INCLUDES=-I$(top_srcdir) -I$(top_builddir) $(GTK_DEBUG_FLAGS) # e.g. GTKDOC_LIBS=$(top_builddir)/gtk/$(gtktargetlib) INCLUDES= GTKDOC_LIBS= # This includes the standard gtk-doc make rules, copied by gtkdocize. include $(top_srcdir)/gtk-doc.make # Other files to distribute # e.g. EXTRA_DIST += version.xml.in EXTRA_DIST += -include $(top_srcdir)/git.mk libprelude-1.0.0/docs/api/Makefile.in0000664000076400007640000014476011347714454014366 00000000000000# Makefile.in generated by automake 1.11.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, # Inc. # This Makefile.in 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. @SET_MAKE@ # -*- mode: makefile -*- #################################### # Everything below here is generic # #################################### VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ target_triplet = @target@ DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in \ $(top_srcdir)/gtk-doc.make subdir = docs/api ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/libmissing/m4/00gnulib.m4 \ $(top_srcdir)/libmissing/m4/alloca.m4 \ $(top_srcdir)/libmissing/m4/arpa_inet_h.m4 \ $(top_srcdir)/libmissing/m4/btowc.m4 \ $(top_srcdir)/libmissing/m4/close.m4 \ $(top_srcdir)/libmissing/m4/codeset.m4 \ $(top_srcdir)/libmissing/m4/cond.m4 \ $(top_srcdir)/libmissing/m4/dos.m4 \ $(top_srcdir)/libmissing/m4/dup2.m4 \ $(top_srcdir)/libmissing/m4/errno_h.m4 \ $(top_srcdir)/libmissing/m4/exponentd.m4 \ $(top_srcdir)/libmissing/m4/exponentf.m4 \ $(top_srcdir)/libmissing/m4/exponentl.m4 \ $(top_srcdir)/libmissing/m4/extensions.m4 \ $(top_srcdir)/libmissing/m4/fclose.m4 \ $(top_srcdir)/libmissing/m4/fcntl-o.m4 \ $(top_srcdir)/libmissing/m4/fcntl_h.m4 \ $(top_srcdir)/libmissing/m4/float_h.m4 \ $(top_srcdir)/libmissing/m4/fopen.m4 \ $(top_srcdir)/libmissing/m4/fpieee.m4 \ $(top_srcdir)/libmissing/m4/frexp.m4 \ $(top_srcdir)/libmissing/m4/frexpl.m4 \ $(top_srcdir)/libmissing/m4/fseeko.m4 \ $(top_srcdir)/libmissing/m4/ftw.m4 \ $(top_srcdir)/libmissing/m4/getaddrinfo.m4 \ $(top_srcdir)/libmissing/m4/getdelim.m4 \ $(top_srcdir)/libmissing/m4/gethostname.m4 \ $(top_srcdir)/libmissing/m4/getline.m4 \ $(top_srcdir)/libmissing/m4/getpagesize.m4 \ $(top_srcdir)/libmissing/m4/getpass.m4 \ $(top_srcdir)/libmissing/m4/gettimeofday.m4 \ $(top_srcdir)/libmissing/m4/glibc21.m4 \ $(top_srcdir)/libmissing/m4/gnulib-common.m4 \ $(top_srcdir)/libmissing/m4/gnulib-comp.m4 \ $(top_srcdir)/libmissing/m4/gnulib-tool.m4 \ $(top_srcdir)/libmissing/m4/hostent.m4 \ $(top_srcdir)/libmissing/m4/include_next.m4 \ $(top_srcdir)/libmissing/m4/inet_ntop.m4 \ $(top_srcdir)/libmissing/m4/inet_pton.m4 \ $(top_srcdir)/libmissing/m4/intmax_t.m4 \ $(top_srcdir)/libmissing/m4/inttypes_h.m4 \ $(top_srcdir)/libmissing/m4/isnand.m4 \ $(top_srcdir)/libmissing/m4/isnanf.m4 \ $(top_srcdir)/libmissing/m4/isnanl.m4 \ $(top_srcdir)/libmissing/m4/langinfo_h.m4 \ $(top_srcdir)/libmissing/m4/ldexpl.m4 \ $(top_srcdir)/libmissing/m4/lib-ld.m4 \ $(top_srcdir)/libmissing/m4/lib-link.m4 \ $(top_srcdir)/libmissing/m4/lib-prefix.m4 \ $(top_srcdir)/libmissing/m4/localcharset.m4 \ $(top_srcdir)/libmissing/m4/locale-fr.m4 \ $(top_srcdir)/libmissing/m4/locale-ja.m4 \ $(top_srcdir)/libmissing/m4/locale-tr.m4 \ $(top_srcdir)/libmissing/m4/locale-zh.m4 \ $(top_srcdir)/libmissing/m4/lock.m4 \ $(top_srcdir)/libmissing/m4/longlong.m4 \ $(top_srcdir)/libmissing/m4/lseek.m4 \ $(top_srcdir)/libmissing/m4/lstat.m4 \ $(top_srcdir)/libmissing/m4/malloc.m4 \ $(top_srcdir)/libmissing/m4/math_h.m4 \ $(top_srcdir)/libmissing/m4/mbrtowc.m4 \ $(top_srcdir)/libmissing/m4/mbsinit.m4 \ $(top_srcdir)/libmissing/m4/mbstate_t.m4 \ $(top_srcdir)/libmissing/m4/memchr.m4 \ $(top_srcdir)/libmissing/m4/memmem.m4 \ $(top_srcdir)/libmissing/m4/minmax.m4 \ $(top_srcdir)/libmissing/m4/mktime.m4 \ $(top_srcdir)/libmissing/m4/mmap-anon.m4 \ $(top_srcdir)/libmissing/m4/mode_t.m4 \ $(top_srcdir)/libmissing/m4/multiarch.m4 \ $(top_srcdir)/libmissing/m4/netdb_h.m4 \ $(top_srcdir)/libmissing/m4/netinet_in_h.m4 \ $(top_srcdir)/libmissing/m4/nl_langinfo.m4 \ $(top_srcdir)/libmissing/m4/nocrash.m4 \ $(top_srcdir)/libmissing/m4/onceonly.m4 \ $(top_srcdir)/libmissing/m4/open.m4 \ $(top_srcdir)/libmissing/m4/pathmax.m4 \ $(top_srcdir)/libmissing/m4/perror.m4 \ $(top_srcdir)/libmissing/m4/poll.m4 \ $(top_srcdir)/libmissing/m4/printf-frexp.m4 \ $(top_srcdir)/libmissing/m4/printf-frexpl.m4 \ $(top_srcdir)/libmissing/m4/printf.m4 \ $(top_srcdir)/libmissing/m4/realloc.m4 \ $(top_srcdir)/libmissing/m4/regex.m4 \ $(top_srcdir)/libmissing/m4/relocatable-lib.m4 \ $(top_srcdir)/libmissing/m4/select.m4 \ $(top_srcdir)/libmissing/m4/servent.m4 \ $(top_srcdir)/libmissing/m4/signal_h.m4 \ $(top_srcdir)/libmissing/m4/signalblocking.m4 \ $(top_srcdir)/libmissing/m4/signbit.m4 \ $(top_srcdir)/libmissing/m4/size_max.m4 \ $(top_srcdir)/libmissing/m4/sleep.m4 \ $(top_srcdir)/libmissing/m4/snprintf-posix.m4 \ $(top_srcdir)/libmissing/m4/snprintf.m4 \ $(top_srcdir)/libmissing/m4/sockets.m4 \ $(top_srcdir)/libmissing/m4/socklen.m4 \ $(top_srcdir)/libmissing/m4/sockpfaf.m4 \ $(top_srcdir)/libmissing/m4/ssize_t.m4 \ $(top_srcdir)/libmissing/m4/stat.m4 \ $(top_srcdir)/libmissing/m4/stdbool.m4 \ $(top_srcdir)/libmissing/m4/stddef_h.m4 \ $(top_srcdir)/libmissing/m4/stdint.m4 \ $(top_srcdir)/libmissing/m4/stdint_h.m4 \ $(top_srcdir)/libmissing/m4/stdio_h.m4 \ $(top_srcdir)/libmissing/m4/stdlib_h.m4 \ $(top_srcdir)/libmissing/m4/strcase.m4 \ $(top_srcdir)/libmissing/m4/strcasestr.m4 \ $(top_srcdir)/libmissing/m4/strdup.m4 \ $(top_srcdir)/libmissing/m4/strerror.m4 \ $(top_srcdir)/libmissing/m4/string_h.m4 \ $(top_srcdir)/libmissing/m4/strings_h.m4 \ $(top_srcdir)/libmissing/m4/strndup.m4 \ $(top_srcdir)/libmissing/m4/strnlen.m4 \ $(top_srcdir)/libmissing/m4/strptime.m4 \ $(top_srcdir)/libmissing/m4/strsep.m4 \ $(top_srcdir)/libmissing/m4/symlink.m4 \ $(top_srcdir)/libmissing/m4/sys_ioctl_h.m4 \ $(top_srcdir)/libmissing/m4/sys_select_h.m4 \ $(top_srcdir)/libmissing/m4/sys_socket_h.m4 \ $(top_srcdir)/libmissing/m4/sys_stat_h.m4 \ $(top_srcdir)/libmissing/m4/sys_time_h.m4 \ $(top_srcdir)/libmissing/m4/sys_utsname_h.m4 \ $(top_srcdir)/libmissing/m4/thread.m4 \ $(top_srcdir)/libmissing/m4/threadlib.m4 \ $(top_srcdir)/libmissing/m4/time_h.m4 \ $(top_srcdir)/libmissing/m4/time_r.m4 \ $(top_srcdir)/libmissing/m4/timegm.m4 \ $(top_srcdir)/libmissing/m4/tls.m4 \ $(top_srcdir)/libmissing/m4/tm_gmtoff.m4 \ $(top_srcdir)/libmissing/m4/uname.m4 \ $(top_srcdir)/libmissing/m4/ungetc.m4 \ $(top_srcdir)/libmissing/m4/unistd_h.m4 \ $(top_srcdir)/libmissing/m4/vasnprintf.m4 \ $(top_srcdir)/libmissing/m4/vsnprintf-posix.m4 \ $(top_srcdir)/libmissing/m4/vsnprintf.m4 \ $(top_srcdir)/libmissing/m4/warn-on-use.m4 \ $(top_srcdir)/libmissing/m4/wchar.m4 \ $(top_srcdir)/libmissing/m4/wchar_t.m4 \ $(top_srcdir)/libmissing/m4/wcrtomb.m4 \ $(top_srcdir)/libmissing/m4/wctob.m4 \ $(top_srcdir)/libmissing/m4/wctype.m4 \ $(top_srcdir)/libmissing/m4/wint_t.m4 \ $(top_srcdir)/libmissing/m4/write.m4 \ $(top_srcdir)/libmissing/m4/xsize.m4 \ $(top_srcdir)/libmissing/m4/yield.m4 \ $(top_srcdir)/m4/ac_compile_check_sizeof.m4 \ $(top_srcdir)/m4/am_path_ruby.m4 $(top_srcdir)/m4/argz.m4 \ $(top_srcdir)/m4/as-ac-expand.m4 \ $(top_srcdir)/m4/ax_c_check_flag.m4 \ $(top_srcdir)/m4/ax_check_aligned_access_required.m4 \ $(top_srcdir)/m4/ax_create_prelude_inttypes_h.m4 \ $(top_srcdir)/m4/ax_ld_check_flag.m4 \ $(top_srcdir)/m4/gtk-doc.m4 $(top_srcdir)/m4/libgcrypt.m4 \ $(top_srcdir)/m4/libgnutls-extra.m4 \ $(top_srcdir)/m4/libgnutls.m4 $(top_srcdir)/m4/libtool.m4 \ $(top_srcdir)/m4/ltdl.m4 $(top_srcdir)/m4/ltoptions.m4 \ $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/m4/pkg.m4 \ $(top_srcdir)/configure.in am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = SOURCES = DIST_SOURCES = DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ ALLOCA = @ALLOCA@ ALLOCA_H = @ALLOCA_H@ AMTAR = @AMTAR@ APPLE_UNIVERSAL_BUILD = @APPLE_UNIVERSAL_BUILD@ AR = @AR@ ARGZ_H = @ARGZ_H@ AS = @AS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ BINDINGS_CC = @BINDINGS_CC@ BINDIR = @BINDIR@ BITSIZEOF_PTRDIFF_T = @BITSIZEOF_PTRDIFF_T@ BITSIZEOF_SIG_ATOMIC_T = @BITSIZEOF_SIG_ATOMIC_T@ BITSIZEOF_SIZE_T = @BITSIZEOF_SIZE_T@ BITSIZEOF_WCHAR_T = @BITSIZEOF_WCHAR_T@ BITSIZEOF_WINT_T = @BITSIZEOF_WINT_T@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CC_FOR_BUILD = @CC_FOR_BUILD@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EMULTIHOP_HIDDEN = @EMULTIHOP_HIDDEN@ EMULTIHOP_VALUE = @EMULTIHOP_VALUE@ ENOLINK_HIDDEN = @ENOLINK_HIDDEN@ ENOLINK_VALUE = @ENOLINK_VALUE@ EOVERFLOW_HIDDEN = @EOVERFLOW_HIDDEN@ EOVERFLOW_VALUE = @EOVERFLOW_VALUE@ ERRNO_H = @ERRNO_H@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ FLOAT_H = @FLOAT_H@ GETADDRINFO_LIB = @GETADDRINFO_LIB@ GETHOSTNAME_LIB = @GETHOSTNAME_LIB@ GLIBC21 = @GLIBC21@ GNULIB_ACCEPT = @GNULIB_ACCEPT@ GNULIB_ACCEPT4 = @GNULIB_ACCEPT4@ GNULIB_ACOSL = @GNULIB_ACOSL@ GNULIB_ASINL = @GNULIB_ASINL@ GNULIB_ATANL = @GNULIB_ATANL@ GNULIB_ATOLL = @GNULIB_ATOLL@ GNULIB_BIND = @GNULIB_BIND@ GNULIB_BTOWC = @GNULIB_BTOWC@ GNULIB_CALLOC_POSIX = @GNULIB_CALLOC_POSIX@ GNULIB_CANONICALIZE_FILE_NAME = @GNULIB_CANONICALIZE_FILE_NAME@ GNULIB_CEILF = @GNULIB_CEILF@ GNULIB_CEILL = @GNULIB_CEILL@ GNULIB_CHOWN = @GNULIB_CHOWN@ GNULIB_CLOSE = @GNULIB_CLOSE@ GNULIB_CONNECT = @GNULIB_CONNECT@ GNULIB_COSL = @GNULIB_COSL@ GNULIB_DPRINTF = @GNULIB_DPRINTF@ GNULIB_DUP2 = @GNULIB_DUP2@ GNULIB_DUP3 = @GNULIB_DUP3@ GNULIB_ENVIRON = @GNULIB_ENVIRON@ GNULIB_EUIDACCESS = @GNULIB_EUIDACCESS@ GNULIB_EXPL = @GNULIB_EXPL@ GNULIB_FACCESSAT = @GNULIB_FACCESSAT@ GNULIB_FCHDIR = @GNULIB_FCHDIR@ GNULIB_FCHMODAT = @GNULIB_FCHMODAT@ GNULIB_FCHOWNAT = @GNULIB_FCHOWNAT@ GNULIB_FCLOSE = @GNULIB_FCLOSE@ GNULIB_FCNTL = @GNULIB_FCNTL@ GNULIB_FFLUSH = @GNULIB_FFLUSH@ GNULIB_FLOORF = @GNULIB_FLOORF@ GNULIB_FLOORL = @GNULIB_FLOORL@ GNULIB_FOPEN = @GNULIB_FOPEN@ GNULIB_FPRINTF = @GNULIB_FPRINTF@ GNULIB_FPRINTF_POSIX = @GNULIB_FPRINTF_POSIX@ GNULIB_FPURGE = @GNULIB_FPURGE@ GNULIB_FPUTC = @GNULIB_FPUTC@ GNULIB_FPUTS = @GNULIB_FPUTS@ GNULIB_FREOPEN = @GNULIB_FREOPEN@ GNULIB_FREXP = @GNULIB_FREXP@ GNULIB_FREXPL = @GNULIB_FREXPL@ GNULIB_FSEEK = @GNULIB_FSEEK@ GNULIB_FSEEKO = @GNULIB_FSEEKO@ GNULIB_FSTATAT = @GNULIB_FSTATAT@ GNULIB_FSYNC = @GNULIB_FSYNC@ GNULIB_FTELL = @GNULIB_FTELL@ GNULIB_FTELLO = @GNULIB_FTELLO@ GNULIB_FTRUNCATE = @GNULIB_FTRUNCATE@ GNULIB_FUTIMENS = @GNULIB_FUTIMENS@ GNULIB_FWRITE = @GNULIB_FWRITE@ GNULIB_GETADDRINFO = @GNULIB_GETADDRINFO@ GNULIB_GETCWD = @GNULIB_GETCWD@ GNULIB_GETDELIM = @GNULIB_GETDELIM@ GNULIB_GETDOMAINNAME = @GNULIB_GETDOMAINNAME@ GNULIB_GETDTABLESIZE = @GNULIB_GETDTABLESIZE@ GNULIB_GETGROUPS = @GNULIB_GETGROUPS@ GNULIB_GETHOSTNAME = @GNULIB_GETHOSTNAME@ GNULIB_GETLINE = @GNULIB_GETLINE@ GNULIB_GETLOADAVG = @GNULIB_GETLOADAVG@ GNULIB_GETLOGIN = @GNULIB_GETLOGIN@ GNULIB_GETLOGIN_R = @GNULIB_GETLOGIN_R@ GNULIB_GETPAGESIZE = @GNULIB_GETPAGESIZE@ GNULIB_GETPEERNAME = @GNULIB_GETPEERNAME@ GNULIB_GETSOCKNAME = @GNULIB_GETSOCKNAME@ GNULIB_GETSOCKOPT = @GNULIB_GETSOCKOPT@ GNULIB_GETSUBOPT = @GNULIB_GETSUBOPT@ GNULIB_GETTIMEOFDAY = @GNULIB_GETTIMEOFDAY@ GNULIB_GETUSERSHELL = @GNULIB_GETUSERSHELL@ GNULIB_INET_NTOP = @GNULIB_INET_NTOP@ GNULIB_INET_PTON = @GNULIB_INET_PTON@ GNULIB_IOCTL = @GNULIB_IOCTL@ GNULIB_ISFINITE = @GNULIB_ISFINITE@ GNULIB_ISINF = @GNULIB_ISINF@ GNULIB_ISNAN = @GNULIB_ISNAN@ GNULIB_ISNAND = @GNULIB_ISNAND@ GNULIB_ISNANF = @GNULIB_ISNANF@ GNULIB_ISNANL = @GNULIB_ISNANL@ GNULIB_LCHMOD = @GNULIB_LCHMOD@ GNULIB_LCHOWN = @GNULIB_LCHOWN@ GNULIB_LDEXPL = @GNULIB_LDEXPL@ GNULIB_LINK = @GNULIB_LINK@ GNULIB_LINKAT = @GNULIB_LINKAT@ GNULIB_LISTEN = @GNULIB_LISTEN@ GNULIB_LOGL = @GNULIB_LOGL@ GNULIB_LSEEK = @GNULIB_LSEEK@ GNULIB_LSTAT = @GNULIB_LSTAT@ GNULIB_MALLOC_POSIX = @GNULIB_MALLOC_POSIX@ GNULIB_MBRLEN = @GNULIB_MBRLEN@ GNULIB_MBRTOWC = @GNULIB_MBRTOWC@ GNULIB_MBSCASECMP = @GNULIB_MBSCASECMP@ GNULIB_MBSCASESTR = @GNULIB_MBSCASESTR@ GNULIB_MBSCHR = @GNULIB_MBSCHR@ GNULIB_MBSCSPN = @GNULIB_MBSCSPN@ GNULIB_MBSINIT = @GNULIB_MBSINIT@ GNULIB_MBSLEN = @GNULIB_MBSLEN@ GNULIB_MBSNCASECMP = @GNULIB_MBSNCASECMP@ GNULIB_MBSNLEN = @GNULIB_MBSNLEN@ GNULIB_MBSNRTOWCS = @GNULIB_MBSNRTOWCS@ GNULIB_MBSPBRK = @GNULIB_MBSPBRK@ GNULIB_MBSPCASECMP = @GNULIB_MBSPCASECMP@ GNULIB_MBSRCHR = @GNULIB_MBSRCHR@ GNULIB_MBSRTOWCS = @GNULIB_MBSRTOWCS@ GNULIB_MBSSEP = @GNULIB_MBSSEP@ GNULIB_MBSSPN = @GNULIB_MBSSPN@ GNULIB_MBSSTR = @GNULIB_MBSSTR@ GNULIB_MBSTOK_R = @GNULIB_MBSTOK_R@ GNULIB_MEMCHR = @GNULIB_MEMCHR@ GNULIB_MEMMEM = @GNULIB_MEMMEM@ GNULIB_MEMPCPY = @GNULIB_MEMPCPY@ GNULIB_MEMRCHR = @GNULIB_MEMRCHR@ GNULIB_MKDIRAT = @GNULIB_MKDIRAT@ GNULIB_MKDTEMP = @GNULIB_MKDTEMP@ GNULIB_MKFIFO = @GNULIB_MKFIFO@ GNULIB_MKFIFOAT = @GNULIB_MKFIFOAT@ GNULIB_MKNOD = @GNULIB_MKNOD@ GNULIB_MKNODAT = @GNULIB_MKNODAT@ GNULIB_MKOSTEMP = @GNULIB_MKOSTEMP@ GNULIB_MKOSTEMPS = @GNULIB_MKOSTEMPS@ GNULIB_MKSTEMP = @GNULIB_MKSTEMP@ GNULIB_MKSTEMPS = @GNULIB_MKSTEMPS@ GNULIB_NL_LANGINFO = @GNULIB_NL_LANGINFO@ GNULIB_OBSTACK_PRINTF = @GNULIB_OBSTACK_PRINTF@ GNULIB_OBSTACK_PRINTF_POSIX = @GNULIB_OBSTACK_PRINTF_POSIX@ GNULIB_OPEN = @GNULIB_OPEN@ GNULIB_OPENAT = @GNULIB_OPENAT@ GNULIB_PERROR = @GNULIB_PERROR@ GNULIB_PIPE2 = @GNULIB_PIPE2@ GNULIB_POPEN = @GNULIB_POPEN@ GNULIB_PREAD = @GNULIB_PREAD@ GNULIB_PRINTF = @GNULIB_PRINTF@ GNULIB_PRINTF_POSIX = @GNULIB_PRINTF_POSIX@ GNULIB_PUTC = @GNULIB_PUTC@ GNULIB_PUTCHAR = @GNULIB_PUTCHAR@ GNULIB_PUTENV = @GNULIB_PUTENV@ GNULIB_PUTS = @GNULIB_PUTS@ GNULIB_RANDOM_R = @GNULIB_RANDOM_R@ GNULIB_RAWMEMCHR = @GNULIB_RAWMEMCHR@ GNULIB_READLINK = @GNULIB_READLINK@ GNULIB_READLINKAT = @GNULIB_READLINKAT@ GNULIB_REALLOC_POSIX = @GNULIB_REALLOC_POSIX@ GNULIB_REALPATH = @GNULIB_REALPATH@ GNULIB_RECV = @GNULIB_RECV@ GNULIB_RECVFROM = @GNULIB_RECVFROM@ GNULIB_REMOVE = @GNULIB_REMOVE@ GNULIB_RENAME = @GNULIB_RENAME@ GNULIB_RENAMEAT = @GNULIB_RENAMEAT@ GNULIB_RMDIR = @GNULIB_RMDIR@ GNULIB_ROUND = @GNULIB_ROUND@ GNULIB_ROUNDF = @GNULIB_ROUNDF@ GNULIB_ROUNDL = @GNULIB_ROUNDL@ GNULIB_RPMATCH = @GNULIB_RPMATCH@ GNULIB_SELECT = @GNULIB_SELECT@ GNULIB_SEND = @GNULIB_SEND@ GNULIB_SENDTO = @GNULIB_SENDTO@ GNULIB_SETENV = @GNULIB_SETENV@ GNULIB_SETSOCKOPT = @GNULIB_SETSOCKOPT@ GNULIB_SHUTDOWN = @GNULIB_SHUTDOWN@ GNULIB_SIGACTION = @GNULIB_SIGACTION@ GNULIB_SIGNAL_H_SIGPIPE = @GNULIB_SIGNAL_H_SIGPIPE@ GNULIB_SIGNBIT = @GNULIB_SIGNBIT@ GNULIB_SIGPROCMASK = @GNULIB_SIGPROCMASK@ GNULIB_SINL = @GNULIB_SINL@ GNULIB_SLEEP = @GNULIB_SLEEP@ GNULIB_SNPRINTF = @GNULIB_SNPRINTF@ GNULIB_SOCKET = @GNULIB_SOCKET@ GNULIB_SPRINTF_POSIX = @GNULIB_SPRINTF_POSIX@ GNULIB_SQRTL = @GNULIB_SQRTL@ GNULIB_STAT = @GNULIB_STAT@ GNULIB_STDIO_H_SIGPIPE = @GNULIB_STDIO_H_SIGPIPE@ GNULIB_STPCPY = @GNULIB_STPCPY@ GNULIB_STPNCPY = @GNULIB_STPNCPY@ GNULIB_STRCASESTR = @GNULIB_STRCASESTR@ GNULIB_STRCHRNUL = @GNULIB_STRCHRNUL@ GNULIB_STRDUP = @GNULIB_STRDUP@ GNULIB_STRERROR = @GNULIB_STRERROR@ GNULIB_STRNDUP = @GNULIB_STRNDUP@ GNULIB_STRNLEN = @GNULIB_STRNLEN@ GNULIB_STRPBRK = @GNULIB_STRPBRK@ GNULIB_STRSEP = @GNULIB_STRSEP@ GNULIB_STRSIGNAL = @GNULIB_STRSIGNAL@ GNULIB_STRSTR = @GNULIB_STRSTR@ GNULIB_STRTOD = @GNULIB_STRTOD@ GNULIB_STRTOK_R = @GNULIB_STRTOK_R@ GNULIB_STRTOLL = @GNULIB_STRTOLL@ GNULIB_STRTOULL = @GNULIB_STRTOULL@ GNULIB_STRVERSCMP = @GNULIB_STRVERSCMP@ GNULIB_SYMLINK = @GNULIB_SYMLINK@ GNULIB_SYMLINKAT = @GNULIB_SYMLINKAT@ GNULIB_TANL = @GNULIB_TANL@ GNULIB_TRUNC = @GNULIB_TRUNC@ GNULIB_TRUNCF = @GNULIB_TRUNCF@ GNULIB_TRUNCL = @GNULIB_TRUNCL@ GNULIB_UNAME = @GNULIB_UNAME@ GNULIB_UNISTD_H_GETOPT = @GNULIB_UNISTD_H_GETOPT@ GNULIB_UNISTD_H_SIGPIPE = @GNULIB_UNISTD_H_SIGPIPE@ GNULIB_UNLINK = @GNULIB_UNLINK@ GNULIB_UNLINKAT = @GNULIB_UNLINKAT@ GNULIB_UNSETENV = @GNULIB_UNSETENV@ GNULIB_USLEEP = @GNULIB_USLEEP@ GNULIB_UTIMENSAT = @GNULIB_UTIMENSAT@ GNULIB_VASPRINTF = @GNULIB_VASPRINTF@ GNULIB_VDPRINTF = @GNULIB_VDPRINTF@ GNULIB_VFPRINTF = @GNULIB_VFPRINTF@ GNULIB_VFPRINTF_POSIX = @GNULIB_VFPRINTF_POSIX@ GNULIB_VPRINTF = @GNULIB_VPRINTF@ GNULIB_VPRINTF_POSIX = @GNULIB_VPRINTF_POSIX@ GNULIB_VSNPRINTF = @GNULIB_VSNPRINTF@ GNULIB_VSPRINTF_POSIX = @GNULIB_VSPRINTF_POSIX@ GNULIB_WCRTOMB = @GNULIB_WCRTOMB@ GNULIB_WCSNRTOMBS = @GNULIB_WCSNRTOMBS@ GNULIB_WCSRTOMBS = @GNULIB_WCSRTOMBS@ GNULIB_WCTOB = @GNULIB_WCTOB@ GNULIB_WCWIDTH = @GNULIB_WCWIDTH@ GNULIB_WRITE = @GNULIB_WRITE@ GREP = @GREP@ GTKDOC_CHECK = @GTKDOC_CHECK@ HAVE_ACCEPT4 = @HAVE_ACCEPT4@ HAVE_ACOSL = @HAVE_ACOSL@ HAVE_ARPA_INET_H = @HAVE_ARPA_INET_H@ HAVE_ASINL = @HAVE_ASINL@ HAVE_ATANL = @HAVE_ATANL@ HAVE_ATOLL = @HAVE_ATOLL@ HAVE_BTOWC = @HAVE_BTOWC@ HAVE_CALLOC_POSIX = @HAVE_CALLOC_POSIX@ HAVE_CANONICALIZE_FILE_NAME = @HAVE_CANONICALIZE_FILE_NAME@ HAVE_CHOWN = @HAVE_CHOWN@ HAVE_COSL = @HAVE_COSL@ HAVE_CXX = @HAVE_CXX@ HAVE_DECL_ACOSL = @HAVE_DECL_ACOSL@ HAVE_DECL_ASINL = @HAVE_DECL_ASINL@ HAVE_DECL_ATANL = @HAVE_DECL_ATANL@ HAVE_DECL_COSL = @HAVE_DECL_COSL@ HAVE_DECL_ENVIRON = @HAVE_DECL_ENVIRON@ HAVE_DECL_EXPL = @HAVE_DECL_EXPL@ HAVE_DECL_FPURGE = @HAVE_DECL_FPURGE@ HAVE_DECL_FREEADDRINFO = @HAVE_DECL_FREEADDRINFO@ HAVE_DECL_FREXPL = @HAVE_DECL_FREXPL@ HAVE_DECL_GAI_STRERROR = @HAVE_DECL_GAI_STRERROR@ HAVE_DECL_GETADDRINFO = @HAVE_DECL_GETADDRINFO@ HAVE_DECL_GETDELIM = @HAVE_DECL_GETDELIM@ HAVE_DECL_GETLINE = @HAVE_DECL_GETLINE@ HAVE_DECL_GETLOADAVG = @HAVE_DECL_GETLOADAVG@ HAVE_DECL_GETLOGIN_R = @HAVE_DECL_GETLOGIN_R@ HAVE_DECL_GETNAMEINFO = @HAVE_DECL_GETNAMEINFO@ HAVE_DECL_INET_NTOP = @HAVE_DECL_INET_NTOP@ HAVE_DECL_INET_PTON = @HAVE_DECL_INET_PTON@ HAVE_DECL_LDEXPL = @HAVE_DECL_LDEXPL@ HAVE_DECL_LOGL = @HAVE_DECL_LOGL@ HAVE_DECL_MEMMEM = @HAVE_DECL_MEMMEM@ HAVE_DECL_MEMRCHR = @HAVE_DECL_MEMRCHR@ HAVE_DECL_OBSTACK_PRINTF = @HAVE_DECL_OBSTACK_PRINTF@ HAVE_DECL_SINL = @HAVE_DECL_SINL@ HAVE_DECL_SNPRINTF = @HAVE_DECL_SNPRINTF@ HAVE_DECL_SQRTL = @HAVE_DECL_SQRTL@ HAVE_DECL_STRDUP = @HAVE_DECL_STRDUP@ HAVE_DECL_STRERROR = @HAVE_DECL_STRERROR@ HAVE_DECL_STRNCASECMP = @HAVE_DECL_STRNCASECMP@ HAVE_DECL_STRNDUP = @HAVE_DECL_STRNDUP@ HAVE_DECL_STRNLEN = @HAVE_DECL_STRNLEN@ HAVE_DECL_STRSIGNAL = @HAVE_DECL_STRSIGNAL@ HAVE_DECL_STRTOK_R = @HAVE_DECL_STRTOK_R@ HAVE_DECL_TANL = @HAVE_DECL_TANL@ HAVE_DECL_TRUNC = @HAVE_DECL_TRUNC@ HAVE_DECL_TRUNCF = @HAVE_DECL_TRUNCF@ HAVE_DECL_VSNPRINTF = @HAVE_DECL_VSNPRINTF@ HAVE_DECL_WCTOB = @HAVE_DECL_WCTOB@ HAVE_DECL_WCWIDTH = @HAVE_DECL_WCWIDTH@ HAVE_DPRINTF = @HAVE_DPRINTF@ HAVE_DUP2 = @HAVE_DUP2@ HAVE_DUP3 = @HAVE_DUP3@ HAVE_EUIDACCESS = @HAVE_EUIDACCESS@ HAVE_EXPL = @HAVE_EXPL@ HAVE_FACCESSAT = @HAVE_FACCESSAT@ HAVE_FCHMODAT = @HAVE_FCHMODAT@ HAVE_FCHOWNAT = @HAVE_FCHOWNAT@ HAVE_FCNTL = @HAVE_FCNTL@ HAVE_FSTATAT = @HAVE_FSTATAT@ HAVE_FSYNC = @HAVE_FSYNC@ HAVE_FTRUNCATE = @HAVE_FTRUNCATE@ HAVE_FUTIMENS = @HAVE_FUTIMENS@ HAVE_GETDOMAINNAME = @HAVE_GETDOMAINNAME@ HAVE_GETDTABLESIZE = @HAVE_GETDTABLESIZE@ HAVE_GETGROUPS = @HAVE_GETGROUPS@ HAVE_GETHOSTNAME = @HAVE_GETHOSTNAME@ HAVE_GETLOGIN = @HAVE_GETLOGIN@ HAVE_GETPAGESIZE = @HAVE_GETPAGESIZE@ HAVE_GETSUBOPT = @HAVE_GETSUBOPT@ HAVE_GETUSERSHELL = @HAVE_GETUSERSHELL@ HAVE_INTTYPES_H = @HAVE_INTTYPES_H@ HAVE_ISNAND = @HAVE_ISNAND@ HAVE_ISNANF = @HAVE_ISNANF@ HAVE_ISNANL = @HAVE_ISNANL@ HAVE_ISWCNTRL = @HAVE_ISWCNTRL@ HAVE_LANGINFO_CODESET = @HAVE_LANGINFO_CODESET@ HAVE_LANGINFO_ERA = @HAVE_LANGINFO_ERA@ HAVE_LANGINFO_H = @HAVE_LANGINFO_H@ HAVE_LCHMOD = @HAVE_LCHMOD@ HAVE_LCHOWN = @HAVE_LCHOWN@ HAVE_LINK = @HAVE_LINK@ HAVE_LINKAT = @HAVE_LINKAT@ HAVE_LOGL = @HAVE_LOGL@ HAVE_LONG_LONG_INT = @HAVE_LONG_LONG_INT@ HAVE_LSTAT = @HAVE_LSTAT@ HAVE_MALLOC_POSIX = @HAVE_MALLOC_POSIX@ HAVE_MBRLEN = @HAVE_MBRLEN@ HAVE_MBRTOWC = @HAVE_MBRTOWC@ HAVE_MBSINIT = @HAVE_MBSINIT@ HAVE_MBSLEN = @HAVE_MBSLEN@ HAVE_MBSNRTOWCS = @HAVE_MBSNRTOWCS@ HAVE_MBSRTOWCS = @HAVE_MBSRTOWCS@ HAVE_MEMPCPY = @HAVE_MEMPCPY@ HAVE_MKDIRAT = @HAVE_MKDIRAT@ HAVE_MKDTEMP = @HAVE_MKDTEMP@ HAVE_MKFIFO = @HAVE_MKFIFO@ HAVE_MKFIFOAT = @HAVE_MKFIFOAT@ HAVE_MKNOD = @HAVE_MKNOD@ HAVE_MKNODAT = @HAVE_MKNODAT@ HAVE_MKOSTEMP = @HAVE_MKOSTEMP@ HAVE_MKOSTEMPS = @HAVE_MKOSTEMPS@ HAVE_MKSTEMPS = @HAVE_MKSTEMPS@ HAVE_NETDB_H = @HAVE_NETDB_H@ HAVE_NETINET_IN_H = @HAVE_NETINET_IN_H@ HAVE_NL_LANGINFO = @HAVE_NL_LANGINFO@ HAVE_OPENAT = @HAVE_OPENAT@ HAVE_OS_H = @HAVE_OS_H@ HAVE_PIPE2 = @HAVE_PIPE2@ HAVE_POSIX_SIGNALBLOCKING = @HAVE_POSIX_SIGNALBLOCKING@ HAVE_PREAD = @HAVE_PREAD@ HAVE_RANDOM_H = @HAVE_RANDOM_H@ HAVE_RANDOM_R = @HAVE_RANDOM_R@ HAVE_RAWMEMCHR = @HAVE_RAWMEMCHR@ HAVE_READLINK = @HAVE_READLINK@ HAVE_READLINKAT = @HAVE_READLINKAT@ HAVE_REALLOC_POSIX = @HAVE_REALLOC_POSIX@ HAVE_REALPATH = @HAVE_REALPATH@ HAVE_RENAMEAT = @HAVE_RENAMEAT@ HAVE_RPMATCH = @HAVE_RPMATCH@ HAVE_SA_FAMILY_T = @HAVE_SA_FAMILY_T@ HAVE_SETENV = @HAVE_SETENV@ HAVE_SIGACTION = @HAVE_SIGACTION@ HAVE_SIGINFO_T = @HAVE_SIGINFO_T@ HAVE_SIGNED_SIG_ATOMIC_T = @HAVE_SIGNED_SIG_ATOMIC_T@ HAVE_SIGNED_WCHAR_T = @HAVE_SIGNED_WCHAR_T@ HAVE_SIGNED_WINT_T = @HAVE_SIGNED_WINT_T@ HAVE_SIGSET_T = @HAVE_SIGSET_T@ HAVE_SINL = @HAVE_SINL@ HAVE_SLEEP = @HAVE_SLEEP@ HAVE_SQRTL = @HAVE_SQRTL@ HAVE_STDINT_H = @HAVE_STDINT_H@ HAVE_STPCPY = @HAVE_STPCPY@ HAVE_STPNCPY = @HAVE_STPNCPY@ HAVE_STRCASECMP = @HAVE_STRCASECMP@ HAVE_STRCASESTR = @HAVE_STRCASESTR@ HAVE_STRCHRNUL = @HAVE_STRCHRNUL@ HAVE_STRPBRK = @HAVE_STRPBRK@ HAVE_STRSEP = @HAVE_STRSEP@ HAVE_STRTOD = @HAVE_STRTOD@ HAVE_STRTOLL = @HAVE_STRTOLL@ HAVE_STRTOULL = @HAVE_STRTOULL@ HAVE_STRUCT_ADDRINFO = @HAVE_STRUCT_ADDRINFO@ HAVE_STRUCT_RANDOM_DATA = @HAVE_STRUCT_RANDOM_DATA@ HAVE_STRUCT_SIGACTION_SA_SIGACTION = @HAVE_STRUCT_SIGACTION_SA_SIGACTION@ HAVE_STRUCT_SOCKADDR_STORAGE = @HAVE_STRUCT_SOCKADDR_STORAGE@ HAVE_STRUCT_TIMEVAL = @HAVE_STRUCT_TIMEVAL@ HAVE_STRUCT_UTSNAME = @HAVE_STRUCT_UTSNAME@ HAVE_STRVERSCMP = @HAVE_STRVERSCMP@ HAVE_SYMLINK = @HAVE_SYMLINK@ HAVE_SYMLINKAT = @HAVE_SYMLINKAT@ HAVE_SYS_BITYPES_H = @HAVE_SYS_BITYPES_H@ HAVE_SYS_INTTYPES_H = @HAVE_SYS_INTTYPES_H@ HAVE_SYS_IOCTL_H = @HAVE_SYS_IOCTL_H@ HAVE_SYS_LOADAVG_H = @HAVE_SYS_LOADAVG_H@ HAVE_SYS_PARAM_H = @HAVE_SYS_PARAM_H@ HAVE_SYS_SELECT_H = @HAVE_SYS_SELECT_H@ HAVE_SYS_SOCKET_H = @HAVE_SYS_SOCKET_H@ HAVE_SYS_TIME_H = @HAVE_SYS_TIME_H@ HAVE_SYS_TYPES_H = @HAVE_SYS_TYPES_H@ HAVE_SYS_UTSNAME_H = @HAVE_SYS_UTSNAME_H@ HAVE_TANL = @HAVE_TANL@ HAVE_TYPE_VOLATILE_SIG_ATOMIC_T = @HAVE_TYPE_VOLATILE_SIG_ATOMIC_T@ HAVE_UNAME = @HAVE_UNAME@ HAVE_UNISTD_H = @HAVE_UNISTD_H@ HAVE_UNLINKAT = @HAVE_UNLINKAT@ HAVE_UNSETENV = @HAVE_UNSETENV@ HAVE_UNSIGNED_LONG_LONG_INT = @HAVE_UNSIGNED_LONG_LONG_INT@ HAVE_USLEEP = @HAVE_USLEEP@ HAVE_UTIMENSAT = @HAVE_UTIMENSAT@ HAVE_VASPRINTF = @HAVE_VASPRINTF@ HAVE_VDPRINTF = @HAVE_VDPRINTF@ HAVE_WCHAR_H = @HAVE_WCHAR_H@ HAVE_WCHAR_T = @HAVE_WCHAR_T@ HAVE_WCRTOMB = @HAVE_WCRTOMB@ HAVE_WCSNRTOMBS = @HAVE_WCSNRTOMBS@ HAVE_WCSRTOMBS = @HAVE_WCSRTOMBS@ HAVE_WCTYPE_H = @HAVE_WCTYPE_H@ HAVE_WINSOCK2_H = @HAVE_WINSOCK2_H@ HAVE_WINT_T = @HAVE_WINT_T@ HAVE_WS2TCPIP_H = @HAVE_WS2TCPIP_H@ HAVE__BOOL = @HAVE__BOOL@ HOSTENT_LIB = @HOSTENT_LIB@ HTML_DIR = @HTML_DIR@ INCLTDL = @INCLTDL@ INCLUDE_NEXT = @INCLUDE_NEXT@ INCLUDE_NEXT_AS_FIRST_DIRECTIVE = @INCLUDE_NEXT_AS_FIRST_DIRECTIVE@ INET_NTOP_LIB = @INET_NTOP_LIB@ INET_PTON_LIB = @INET_PTON_LIB@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LD = @LD@ LDFLAGS = @LDFLAGS@ LEX = @LEX@ LEXLIB = @LEXLIB@ LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@ LIBADD_DL = @LIBADD_DL@ LIBADD_DLD_LINK = @LIBADD_DLD_LINK@ LIBADD_DLOPEN = @LIBADD_DLOPEN@ LIBADD_SHL_LOAD = @LIBADD_SHL_LOAD@ LIBDIR = @LIBDIR@ LIBGCRYPT_CFLAGS = @LIBGCRYPT_CFLAGS@ LIBGCRYPT_CONFIG = @LIBGCRYPT_CONFIG@ LIBGCRYPT_LIBS = @LIBGCRYPT_LIBS@ LIBGNUTLS_CFLAGS = @LIBGNUTLS_CFLAGS@ LIBGNUTLS_CONFIG = @LIBGNUTLS_CONFIG@ LIBGNUTLS_EXTRA_CFLAGS = @LIBGNUTLS_EXTRA_CFLAGS@ LIBGNUTLS_EXTRA_CONFIG = @LIBGNUTLS_EXTRA_CONFIG@ LIBGNUTLS_EXTRA_LIBS = @LIBGNUTLS_EXTRA_LIBS@ LIBGNUTLS_LIBS = @LIBGNUTLS_LIBS@ LIBINTL = @LIBINTL@ LIBLTDL = @LIBLTDL@ LIBMULTITHREAD = @LIBMULTITHREAD@ LIBOBJS = @LIBOBJS@ LIBPRELUDECPP_SONAME = @LIBPRELUDECPP_SONAME@ LIBPRELUDE_CFLAGS = @LIBPRELUDE_CFLAGS@ LIBPRELUDE_LIBS = @LIBPRELUDE_LIBS@ LIBPRELUDE_SONAME = @LIBPRELUDE_SONAME@ LIBPTH = @LIBPTH@ LIBPTH_PREFIX = @LIBPTH_PREFIX@ LIBS = @LIBS@ LIBSOCKET = @LIBSOCKET@ LIBTESTS_LIBDEPS = @LIBTESTS_LIBDEPS@ LIBTHREAD = @LIBTHREAD@ LIBTOOL = @LIBTOOL@ LIPO = @LIPO@ LN_S = @LN_S@ LOCALCHARSET_TESTS_ENVIRONMENT = @LOCALCHARSET_TESTS_ENVIRONMENT@ LOCALE_FR = @LOCALE_FR@ LOCALE_FR_UTF8 = @LOCALE_FR_UTF8@ LOCALE_JA = @LOCALE_JA@ LOCALE_TR_UTF8 = @LOCALE_TR_UTF8@ LOCALE_ZH_CN = @LOCALE_ZH_CN@ LOCALSTATEDIR = @LOCALSTATEDIR@ LTALLOCA = @LTALLOCA@ LTDLDEPS = @LTDLDEPS@ LTDLINCL = @LTDLINCL@ LTDLOPEN = @LTDLOPEN@ LTLIBINTL = @LTLIBINTL@ LTLIBMULTITHREAD = @LTLIBMULTITHREAD@ LTLIBOBJS = @LTLIBOBJS@ LTLIBPTH = @LTLIBPTH@ LTLIBTHREAD = @LTLIBTHREAD@ LT_CONFIG_H = @LT_CONFIG_H@ LT_DLLOADERS = @LT_DLLOADERS@ LT_DLPREOPEN = @LT_DLPREOPEN@ LUA_CFLAGS = @LUA_CFLAGS@ LUA_CONFIG = @LUA_CONFIG@ LUA_LIBS = @LUA_LIBS@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MKDIR_P = @MKDIR_P@ NETDB_H = @NETDB_H@ NETINET_IN_H = @NETINET_IN_H@ NEXT_ARPA_INET_H = @NEXT_ARPA_INET_H@ NEXT_AS_FIRST_DIRECTIVE_ARPA_INET_H = @NEXT_AS_FIRST_DIRECTIVE_ARPA_INET_H@ NEXT_AS_FIRST_DIRECTIVE_ERRNO_H = @NEXT_AS_FIRST_DIRECTIVE_ERRNO_H@ NEXT_AS_FIRST_DIRECTIVE_FCNTL_H = @NEXT_AS_FIRST_DIRECTIVE_FCNTL_H@ NEXT_AS_FIRST_DIRECTIVE_FLOAT_H = @NEXT_AS_FIRST_DIRECTIVE_FLOAT_H@ NEXT_AS_FIRST_DIRECTIVE_LANGINFO_H = @NEXT_AS_FIRST_DIRECTIVE_LANGINFO_H@ NEXT_AS_FIRST_DIRECTIVE_MATH_H = @NEXT_AS_FIRST_DIRECTIVE_MATH_H@ NEXT_AS_FIRST_DIRECTIVE_NETDB_H = @NEXT_AS_FIRST_DIRECTIVE_NETDB_H@ NEXT_AS_FIRST_DIRECTIVE_NETINET_IN_H = @NEXT_AS_FIRST_DIRECTIVE_NETINET_IN_H@ NEXT_AS_FIRST_DIRECTIVE_SIGNAL_H = @NEXT_AS_FIRST_DIRECTIVE_SIGNAL_H@ NEXT_AS_FIRST_DIRECTIVE_STDDEF_H = @NEXT_AS_FIRST_DIRECTIVE_STDDEF_H@ NEXT_AS_FIRST_DIRECTIVE_STDINT_H = @NEXT_AS_FIRST_DIRECTIVE_STDINT_H@ NEXT_AS_FIRST_DIRECTIVE_STDIO_H = @NEXT_AS_FIRST_DIRECTIVE_STDIO_H@ NEXT_AS_FIRST_DIRECTIVE_STDLIB_H = @NEXT_AS_FIRST_DIRECTIVE_STDLIB_H@ NEXT_AS_FIRST_DIRECTIVE_STRINGS_H = @NEXT_AS_FIRST_DIRECTIVE_STRINGS_H@ NEXT_AS_FIRST_DIRECTIVE_STRING_H = @NEXT_AS_FIRST_DIRECTIVE_STRING_H@ NEXT_AS_FIRST_DIRECTIVE_SYS_IOCTL_H = @NEXT_AS_FIRST_DIRECTIVE_SYS_IOCTL_H@ NEXT_AS_FIRST_DIRECTIVE_SYS_SELECT_H = @NEXT_AS_FIRST_DIRECTIVE_SYS_SELECT_H@ NEXT_AS_FIRST_DIRECTIVE_SYS_SOCKET_H = @NEXT_AS_FIRST_DIRECTIVE_SYS_SOCKET_H@ NEXT_AS_FIRST_DIRECTIVE_SYS_STAT_H = @NEXT_AS_FIRST_DIRECTIVE_SYS_STAT_H@ NEXT_AS_FIRST_DIRECTIVE_SYS_TIME_H = @NEXT_AS_FIRST_DIRECTIVE_SYS_TIME_H@ NEXT_AS_FIRST_DIRECTIVE_SYS_UTSNAME_H = @NEXT_AS_FIRST_DIRECTIVE_SYS_UTSNAME_H@ NEXT_AS_FIRST_DIRECTIVE_TIME_H = @NEXT_AS_FIRST_DIRECTIVE_TIME_H@ NEXT_AS_FIRST_DIRECTIVE_UNISTD_H = @NEXT_AS_FIRST_DIRECTIVE_UNISTD_H@ NEXT_AS_FIRST_DIRECTIVE_WCHAR_H = @NEXT_AS_FIRST_DIRECTIVE_WCHAR_H@ NEXT_AS_FIRST_DIRECTIVE_WCTYPE_H = @NEXT_AS_FIRST_DIRECTIVE_WCTYPE_H@ NEXT_ERRNO_H = @NEXT_ERRNO_H@ NEXT_FCNTL_H = @NEXT_FCNTL_H@ NEXT_FLOAT_H = @NEXT_FLOAT_H@ NEXT_LANGINFO_H = @NEXT_LANGINFO_H@ NEXT_MATH_H = @NEXT_MATH_H@ NEXT_NETDB_H = @NEXT_NETDB_H@ NEXT_NETINET_IN_H = @NEXT_NETINET_IN_H@ NEXT_SIGNAL_H = @NEXT_SIGNAL_H@ NEXT_STDDEF_H = @NEXT_STDDEF_H@ NEXT_STDINT_H = @NEXT_STDINT_H@ NEXT_STDIO_H = @NEXT_STDIO_H@ NEXT_STDLIB_H = @NEXT_STDLIB_H@ NEXT_STRINGS_H = @NEXT_STRINGS_H@ NEXT_STRING_H = @NEXT_STRING_H@ NEXT_SYS_IOCTL_H = @NEXT_SYS_IOCTL_H@ NEXT_SYS_SELECT_H = @NEXT_SYS_SELECT_H@ NEXT_SYS_SOCKET_H = @NEXT_SYS_SOCKET_H@ NEXT_SYS_STAT_H = @NEXT_SYS_STAT_H@ NEXT_SYS_TIME_H = @NEXT_SYS_TIME_H@ NEXT_SYS_UTSNAME_H = @NEXT_SYS_UTSNAME_H@ NEXT_TIME_H = @NEXT_TIME_H@ NEXT_UNISTD_H = @NEXT_UNISTD_H@ NEXT_WCHAR_H = @NEXT_WCHAR_H@ NEXT_WCTYPE_H = @NEXT_WCTYPE_H@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PCFLAGS = @PCFLAGS@ PERL = @PERL@ PERL_EXTRA_PARAMS = @PERL_EXTRA_PARAMS@ PKG_CONFIG = @PKG_CONFIG@ POLL_H = @POLL_H@ PRAGMA_SYSTEM_HEADER = @PRAGMA_SYSTEM_HEADER@ PRELUDE_ADMIN_CFLAGS = @PRELUDE_ADMIN_CFLAGS@ PRELUDE_ADMIN_LIBS = @PRELUDE_ADMIN_LIBS@ PRELUDE_CONFIG_DIR = @PRELUDE_CONFIG_DIR@ PRELUDE_SPOOL_DIR = @PRELUDE_SPOOL_DIR@ PTHREAD_CFLAGS = @PTHREAD_CFLAGS@ PTHREAD_LDFLAGS = @PTHREAD_LDFLAGS@ PTHREAD_LIBS = @PTHREAD_LIBS@ PTRDIFF_T_SUFFIX = @PTRDIFF_T_SUFFIX@ PYTHON = @PYTHON@ RANLIB = @RANLIB@ RELOCATABLE = @RELOCATABLE@ REPLACE_BTOWC = @REPLACE_BTOWC@ REPLACE_CANONICALIZE_FILE_NAME = @REPLACE_CANONICALIZE_FILE_NAME@ REPLACE_CEILF = @REPLACE_CEILF@ REPLACE_CEILL = @REPLACE_CEILL@ REPLACE_CHOWN = @REPLACE_CHOWN@ REPLACE_CLOSE = @REPLACE_CLOSE@ REPLACE_DPRINTF = @REPLACE_DPRINTF@ REPLACE_DUP = @REPLACE_DUP@ REPLACE_DUP2 = @REPLACE_DUP2@ REPLACE_FCHDIR = @REPLACE_FCHDIR@ REPLACE_FCHOWNAT = @REPLACE_FCHOWNAT@ REPLACE_FCLOSE = @REPLACE_FCLOSE@ REPLACE_FCNTL = @REPLACE_FCNTL@ REPLACE_FFLUSH = @REPLACE_FFLUSH@ REPLACE_FLOORF = @REPLACE_FLOORF@ REPLACE_FLOORL = @REPLACE_FLOORL@ REPLACE_FOPEN = @REPLACE_FOPEN@ REPLACE_FPRINTF = @REPLACE_FPRINTF@ REPLACE_FPURGE = @REPLACE_FPURGE@ REPLACE_FREOPEN = @REPLACE_FREOPEN@ REPLACE_FREXP = @REPLACE_FREXP@ REPLACE_FREXPL = @REPLACE_FREXPL@ REPLACE_FSEEK = @REPLACE_FSEEK@ REPLACE_FSEEKO = @REPLACE_FSEEKO@ REPLACE_FSTAT = @REPLACE_FSTAT@ REPLACE_FSTATAT = @REPLACE_FSTATAT@ REPLACE_FTELL = @REPLACE_FTELL@ REPLACE_FTELLO = @REPLACE_FTELLO@ REPLACE_FUTIMENS = @REPLACE_FUTIMENS@ REPLACE_GETCWD = @REPLACE_GETCWD@ REPLACE_GETDELIM = @REPLACE_GETDELIM@ REPLACE_GETGROUPS = @REPLACE_GETGROUPS@ REPLACE_GETLINE = @REPLACE_GETLINE@ REPLACE_GETPAGESIZE = @REPLACE_GETPAGESIZE@ REPLACE_GETTIMEOFDAY = @REPLACE_GETTIMEOFDAY@ REPLACE_HUGE_VAL = @REPLACE_HUGE_VAL@ REPLACE_ISFINITE = @REPLACE_ISFINITE@ REPLACE_ISINF = @REPLACE_ISINF@ REPLACE_ISNAN = @REPLACE_ISNAN@ REPLACE_ISWCNTRL = @REPLACE_ISWCNTRL@ REPLACE_LCHOWN = @REPLACE_LCHOWN@ REPLACE_LDEXPL = @REPLACE_LDEXPL@ REPLACE_LINK = @REPLACE_LINK@ REPLACE_LINKAT = @REPLACE_LINKAT@ REPLACE_LOCALTIME_R = @REPLACE_LOCALTIME_R@ REPLACE_LSEEK = @REPLACE_LSEEK@ REPLACE_LSTAT = @REPLACE_LSTAT@ REPLACE_MBRLEN = @REPLACE_MBRLEN@ REPLACE_MBRTOWC = @REPLACE_MBRTOWC@ REPLACE_MBSINIT = @REPLACE_MBSINIT@ REPLACE_MBSNRTOWCS = @REPLACE_MBSNRTOWCS@ REPLACE_MBSRTOWCS = @REPLACE_MBSRTOWCS@ REPLACE_MBSTATE_T = @REPLACE_MBSTATE_T@ REPLACE_MEMCHR = @REPLACE_MEMCHR@ REPLACE_MEMMEM = @REPLACE_MEMMEM@ REPLACE_MKDIR = @REPLACE_MKDIR@ REPLACE_MKFIFO = @REPLACE_MKFIFO@ REPLACE_MKNOD = @REPLACE_MKNOD@ REPLACE_MKSTEMP = @REPLACE_MKSTEMP@ REPLACE_MKTIME = @REPLACE_MKTIME@ REPLACE_NAN = @REPLACE_NAN@ REPLACE_NANOSLEEP = @REPLACE_NANOSLEEP@ REPLACE_NL_LANGINFO = @REPLACE_NL_LANGINFO@ REPLACE_NULL = @REPLACE_NULL@ REPLACE_OBSTACK_PRINTF = @REPLACE_OBSTACK_PRINTF@ REPLACE_OPEN = @REPLACE_OPEN@ REPLACE_OPENAT = @REPLACE_OPENAT@ REPLACE_PERROR = @REPLACE_PERROR@ REPLACE_POPEN = @REPLACE_POPEN@ REPLACE_PREAD = @REPLACE_PREAD@ REPLACE_PRINTF = @REPLACE_PRINTF@ REPLACE_PUTENV = @REPLACE_PUTENV@ REPLACE_READLINK = @REPLACE_READLINK@ REPLACE_REALPATH = @REPLACE_REALPATH@ REPLACE_REMOVE = @REPLACE_REMOVE@ REPLACE_RENAME = @REPLACE_RENAME@ REPLACE_RENAMEAT = @REPLACE_RENAMEAT@ REPLACE_RMDIR = @REPLACE_RMDIR@ REPLACE_ROUND = @REPLACE_ROUND@ REPLACE_ROUNDF = @REPLACE_ROUNDF@ REPLACE_ROUNDL = @REPLACE_ROUNDL@ REPLACE_SELECT = @REPLACE_SELECT@ REPLACE_SETENV = @REPLACE_SETENV@ REPLACE_SIGNBIT = @REPLACE_SIGNBIT@ REPLACE_SIGNBIT_USING_GCC = @REPLACE_SIGNBIT_USING_GCC@ REPLACE_SLEEP = @REPLACE_SLEEP@ REPLACE_SNPRINTF = @REPLACE_SNPRINTF@ REPLACE_SPRINTF = @REPLACE_SPRINTF@ REPLACE_STAT = @REPLACE_STAT@ REPLACE_STDIO_WRITE_FUNCS = @REPLACE_STDIO_WRITE_FUNCS@ REPLACE_STRCASESTR = @REPLACE_STRCASESTR@ REPLACE_STRDUP = @REPLACE_STRDUP@ REPLACE_STRERROR = @REPLACE_STRERROR@ REPLACE_STRNDUP = @REPLACE_STRNDUP@ REPLACE_STRPTIME = @REPLACE_STRPTIME@ REPLACE_STRSIGNAL = @REPLACE_STRSIGNAL@ REPLACE_STRSTR = @REPLACE_STRSTR@ REPLACE_STRTOD = @REPLACE_STRTOD@ REPLACE_STRTOK_R = @REPLACE_STRTOK_R@ REPLACE_SYMLINK = @REPLACE_SYMLINK@ REPLACE_TIMEGM = @REPLACE_TIMEGM@ REPLACE_TRUNCL = @REPLACE_TRUNCL@ REPLACE_UNLINK = @REPLACE_UNLINK@ REPLACE_UNLINKAT = @REPLACE_UNLINKAT@ REPLACE_UNSETENV = @REPLACE_UNSETENV@ REPLACE_USLEEP = @REPLACE_USLEEP@ REPLACE_UTIMENSAT = @REPLACE_UTIMENSAT@ REPLACE_VASPRINTF = @REPLACE_VASPRINTF@ REPLACE_VDPRINTF = @REPLACE_VDPRINTF@ REPLACE_VFPRINTF = @REPLACE_VFPRINTF@ REPLACE_VPRINTF = @REPLACE_VPRINTF@ REPLACE_VSNPRINTF = @REPLACE_VSNPRINTF@ REPLACE_VSPRINTF = @REPLACE_VSPRINTF@ REPLACE_WCRTOMB = @REPLACE_WCRTOMB@ REPLACE_WCSNRTOMBS = @REPLACE_WCSNRTOMBS@ REPLACE_WCSRTOMBS = @REPLACE_WCSRTOMBS@ REPLACE_WCTOB = @REPLACE_WCTOB@ REPLACE_WCWIDTH = @REPLACE_WCWIDTH@ REPLACE_WRITE = @REPLACE_WRITE@ RUBY = @RUBY@ RUBY_CCFLAGS = @RUBY_CCFLAGS@ RUBY_EXEC_PREFIX = @RUBY_EXEC_PREFIX@ RUBY_INCLUDES = @RUBY_INCLUDES@ RUBY_LIBS = @RUBY_LIBS@ RUBY_PLATFORM = @RUBY_PLATFORM@ RUBY_PREFIX = @RUBY_PREFIX@ RUBY_VERSION = @RUBY_VERSION@ SED = @SED@ SERVENT_LIB = @SERVENT_LIB@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ SIG_ATOMIC_T_SUFFIX = @SIG_ATOMIC_T_SUFFIX@ SIZE_T_SUFFIX = @SIZE_T_SUFFIX@ STDBOOL_H = @STDBOOL_H@ STDDEF_H = @STDDEF_H@ STDINT_H = @STDINT_H@ STRIP = @STRIP@ SWIG = @SWIG@ SYSCONFDIR = @SYSCONFDIR@ SYS_IOCTL_H_HAVE_WINSOCK2_H = @SYS_IOCTL_H_HAVE_WINSOCK2_H@ SYS_IOCTL_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS = @SYS_IOCTL_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS@ SYS_SOCKET_H = @SYS_SOCKET_H@ SYS_TIME_H_DEFINES_STRUCT_TIMESPEC = @SYS_TIME_H_DEFINES_STRUCT_TIMESPEC@ TIME_H_DEFINES_STRUCT_TIMESPEC = @TIME_H_DEFINES_STRUCT_TIMESPEC@ UNDEFINE_STRTOK_R = @UNDEFINE_STRTOK_R@ UNISTD_H_HAVE_WINSOCK2_H = @UNISTD_H_HAVE_WINSOCK2_H@ UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS = @UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS@ VALGRIND = @VALGRIND@ VERSION = @VERSION@ WCHAR_T_SUFFIX = @WCHAR_T_SUFFIX@ WCTYPE_H = @WCTYPE_H@ WINT_T_SUFFIX = @WINT_T_SUFFIX@ YACC = @YACC@ YFLAGS = @YFLAGS@ YIELD_LIB = @YIELD_LIB@ __PRELUDE_64BIT_FORMAT_PREFIX = @__PRELUDE_64BIT_FORMAT_PREFIX@ __PRELUDE_HAVE_64BIT_LONG = @__PRELUDE_HAVE_64BIT_LONG@ __PRELUDE_HAVE_INTTYPES_H = @__PRELUDE_HAVE_INTTYPES_H@ __PRELUDE_HAVE_STDINT_H = @__PRELUDE_HAVE_STDINT_H@ __PRELUDE_STDINT_HAVE_UINT16 = @__PRELUDE_STDINT_HAVE_UINT16@ __PRELUDE_STDINT_HAVE_UINT32 = @__PRELUDE_STDINT_HAVE_UINT32@ __PRELUDE_STDINT_HAVE_UINT64 = @__PRELUDE_STDINT_HAVE_UINT64@ __PRELUDE_STDINT_HAVE_UINT8 = @__PRELUDE_STDINT_HAVE_UINT8@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ gl_LIBOBJS = @gl_LIBOBJS@ gl_LTLIBOBJS = @gl_LTLIBOBJS@ gltests_LIBOBJS = @gltests_LIBOBJS@ gltests_LTLIBOBJS = @gltests_LTLIBOBJS@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ lt_ECHO = @lt_ECHO@ ltdl_LIBOBJS = @ltdl_LIBOBJS@ ltdl_LTLIBOBJS = @ltdl_LTLIBOBJS@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ pkgrbexecdir = @pkgrbexecdir@ pkgrubydir = @pkgrubydir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ rbexecdir = @rbexecdir@ rubydir = @rubydir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sys_symbol_underscore = @sys_symbol_underscore@ sysconfdir = @sysconfdir@ target = @target@ target_alias = @target_alias@ target_cpu = @target_cpu@ target_os = @target_os@ target_vendor = @target_vendor@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ # We require automake 1.6 at least. AUTOMAKE_OPTIONS = 1.6 # This is a blank Makefile.am for using gtk-doc. # Copy this to your project's API docs directory and modify the variables to # suit your project. See the GTK+ Makefiles in gtk+/docs/reference for examples # of using the various options. # The name of the module, e.g. 'glib'. DOC_MODULE = libprelude # The top-level SGML file. You can change this if you want to. DOC_MAIN_SGML_FILE = $(DOC_MODULE)-docs.sgml # The directory containing the source code. Relative to $(srcdir). # gtk-doc will search all .c & .h files beneath here for inline comments # documenting the functions and macros. DOC_SOURCE_DIR = $(top_srcdir)/src # Extra options to pass to gtkdoc-scangobj. Not normally needed. SCANGOBJ_OPTIONS = # Extra options to supply to gtkdoc-scan. # e.g. SCAN_OPTIONS=--deprecated-guards="GTK_DISABLE_DEPRECATED" SCAN_OPTIONS = --deprecated-guards="PRELUDE_DISABLE_DEPRECATED" # Extra options to supply to gtkdoc-mkdb. # e.g. MKDB_OPTIONS=--sgml-mode --output-format=xml MKDB_OPTIONS = --sgml-mode --output-format=xml --ignore-files=idmef-criteria-string.lex.c # Extra options to supply to gtkdoc-fixref. Not normally needed. # e.g. FIXXREF_OPTIONS=--extra-dir=../gdk-pixbuf/html --extra-dir=../gdk/html FIXXREF_OPTIONS = # Used for dependencies. The docs will be rebuilt if any of these change. # e.g. HFILE_GLOB=$(top_srcdir)/gtk/*.h # e.g. CFILE_GLOB=$(top_srcdir)/gtk/*.c HFILE_GLOB = CFILE_GLOB = # Header files to ignore when scanning. # e.g. IGNORE_HFILES=gtkdebug.h gtkintl.h IGNORE_HFILES = config-engine.h libmissing.h idmef-tree-data.h ntp.h tls-auth.h tls-util.h code-from-errno.h code-to-errno.h err-codes-sym.h err-codes.h err-sources-sym.h err-sources.h errnos-sym.h gettext.h mkerrcodes.h idmef-criteria-string.yac.h idmef-tree.h prelude-extract.h prelude-message-id.h idmef-message-id.h idmef-class.h idmef-value-type.h daemonize.h common.h variable.h # Images to copy into HTML directory. # e.g. HTML_IMAGES=$(top_srcdir)/gtk/stock-icons/stock_about_24.png HTML_IMAGES = # Extra SGML files that are included by $(DOC_MAIN_SGML_FILE). # e.g. content_files=running.sgml building.sgml changes-2.0.sgml content_files = # CFLAGS and LDFLAGS for compiling gtkdoc-scangobj with your library. # Only needed if you are using gtkdoc-scangobj to dynamically query widget # signals and properties. # e.g. INCLUDES=-I$(top_srcdir) -I$(top_builddir) $(GTK_DEBUG_FLAGS) # e.g. GTKDOC_LIBS=$(top_builddir)/gtk/$(gtktargetlib) INCLUDES = GTKDOC_LIBS = @GTK_DOC_USE_LIBTOOL_FALSE@GTKDOC_CC = $(CC) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) @GTK_DOC_USE_LIBTOOL_TRUE@GTKDOC_CC = $(LIBTOOL) --mode=compile $(CC) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) @GTK_DOC_USE_LIBTOOL_FALSE@GTKDOC_LD = $(CC) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) @GTK_DOC_USE_LIBTOOL_TRUE@GTKDOC_LD = $(LIBTOOL) --mode=link $(CC) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) @GTK_DOC_USE_LIBTOOL_FALSE@GTKDOC_RUN = sh -c @GTK_DOC_USE_LIBTOOL_TRUE@GTKDOC_RUN = $(LIBTOOL) --mode=execute # We set GPATH here; this gives us semantics for GNU make # which are more like other make's VPATH, when it comes to # whether a source that is a target of one rule is then # searched for in VPATH/GPATH. # GPATH = $(srcdir) TARGET_DIR = $(HTML_DIR)/$(DOC_MODULE) # This includes the standard gtk-doc make rules, copied by gtkdocize. # Other files to distribute # e.g. EXTRA_DIST += version.xml.in EXTRA_DIST = $(content_files) $(HTML_IMAGES) $(DOC_MAIN_SGML_FILE) \ $(DOC_MODULE)-sections.txt $(DOC_MODULE)-overrides.txt DOC_STAMPS = scan-build.stamp tmpl-build.stamp sgml-build.stamp html-build.stamp \ $(srcdir)/tmpl.stamp $(srcdir)/sgml.stamp $(srcdir)/html.stamp SCANOBJ_FILES = \ $(DOC_MODULE).args \ $(DOC_MODULE).hierarchy \ $(DOC_MODULE).interfaces \ $(DOC_MODULE).prerequisites \ $(DOC_MODULE).signals REPORT_FILES = \ $(DOC_MODULE)-undocumented.txt \ $(DOC_MODULE)-undeclared.txt \ $(DOC_MODULE)-unused.txt CLEANFILES = $(SCANOBJ_FILES) $(REPORT_FILES) $(DOC_STAMPS) all: all-am .SUFFIXES: $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(top_srcdir)/gtk-doc.make $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu docs/api/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu docs/api/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs tags: TAGS TAGS: ctags: CTAGS CTAGS: distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done $(MAKE) $(AM_MAKEFLAGS) \ top_distdir="$(top_distdir)" distdir="$(distdir)" \ dist-hook check-am: all-am check: check-am all-am: Makefile all-local installdirs: install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES) distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic clean-libtool clean-local mostlyclean-am distclean: distclean-am -rm -f Makefile distclean-am: clean-am distclean-generic distclean-local dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-data-local install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic \ maintainer-clean-local mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-generic mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-local .MAKE: install-am install-strip .PHONY: all all-am all-local check check-am clean clean-generic \ clean-libtool clean-local dist-hook distclean \ distclean-generic distclean-libtool distclean-local distdir \ dvi dvi-am html html-am info info-am install install-am \ install-data install-data-am install-data-local install-dvi \ install-dvi-am install-exec install-exec-am install-html \ install-html-am install-info install-info-am install-man \ install-pdf install-pdf-am install-ps install-ps-am \ install-strip installcheck installcheck-am installdirs \ maintainer-clean maintainer-clean-generic \ maintainer-clean-local mostlyclean mostlyclean-generic \ mostlyclean-libtool pdf pdf-am ps ps-am uninstall uninstall-am \ uninstall-local @ENABLE_GTK_DOC_TRUE@all-local: html-build.stamp @ENABLE_GTK_DOC_FALSE@all-local: docs: html-build.stamp $(REPORT_FILES): sgml-build.stamp #### scan #### scan-build.stamp: $(HFILE_GLOB) $(CFILE_GLOB) @echo 'gtk-doc: Scanning header files' @-chmod -R u+w $(srcdir) cd $(srcdir) && \ gtkdoc-scan --module=$(DOC_MODULE) --source-dir=$(DOC_SOURCE_DIR) --ignore-headers="$(IGNORE_HFILES)" $(SCAN_OPTIONS) $(EXTRA_HFILES) if grep -l '^..*$$' $(srcdir)/$(DOC_MODULE).types > /dev/null 2>&1 ; then \ CC="$(GTKDOC_CC)" LD="$(GTKDOC_LD)" RUN="$(GTKDOC_RUN)" CFLAGS="$(GTKDOC_CFLAGS) $(CFLAGS)" LDFLAGS="$(GTKDOC_LIBS) $(LDFLAGS)" gtkdoc-scangobj $(SCANGOBJ_OPTIONS) --module=$(DOC_MODULE) --output-dir=$(srcdir) ; \ else \ cd $(srcdir) ; \ for i in $(SCANOBJ_FILES) ; do \ test -f $$i || touch $$i ; \ done \ fi touch scan-build.stamp $(DOC_MODULE)-decl.txt $(SCANOBJ_FILES) $(DOC_MODULE)-sections.txt $(DOC_MODULE)-overrides.txt: scan-build.stamp @true #### templates #### tmpl-build.stamp: $(DOC_MODULE)-decl.txt $(SCANOBJ_FILES) $(DOC_MODULE)-sections.txt $(DOC_MODULE)-overrides.txt @echo 'gtk-doc: Rebuilding template files' @-chmod -R u+w $(srcdir) cd $(srcdir) && gtkdoc-mktmpl --module=$(DOC_MODULE) $(MKTMPL_OPTIONS) touch tmpl-build.stamp tmpl.stamp: tmpl-build.stamp @true tmpl/*.sgml: @true #### xml #### sgml-build.stamp: tmpl.stamp $(HFILE_GLOB) $(CFILE_GLOB) $(DOC_MODULE)-sections.txt $(srcdir)/tmpl/*.sgml $(expand_content_files) @echo 'gtk-doc: Building XML' @-chmod -R u+w $(srcdir) cd $(srcdir) && \ gtkdoc-mkdb --module=$(DOC_MODULE) --source-dir=$(DOC_SOURCE_DIR) --output-format=xml --expand-content-files="$(expand_content_files)" --main-sgml-file=$(DOC_MAIN_SGML_FILE) $(MKDB_OPTIONS) touch sgml-build.stamp sgml.stamp: sgml-build.stamp @true #### html #### html-build.stamp: sgml.stamp $(DOC_MAIN_SGML_FILE) $(content_files) @echo 'gtk-doc: Building HTML' @-chmod -R u+w $(srcdir) rm -rf $(srcdir)/html mkdir $(srcdir)/html mkhtml_options=""; \ gtkdoc-mkhtml 2>&1 --help | grep >/dev/null "\-\-path"; \ if test "$(?)" = "0"; then \ mkhtml_options=--path="$(srcdir)"; \ fi cd $(srcdir)/html && gtkdoc-mkhtml $(mkhtml_options) $(MKHTML_OPTIONS) $(DOC_MODULE) ../$(DOC_MAIN_SGML_FILE) test "x$(HTML_IMAGES)" = "x" || ( cd $(srcdir) && cp $(HTML_IMAGES) html ) @echo 'gtk-doc: Fixing cross-references' cd $(srcdir) && gtkdoc-fixxref --module-dir=html --html-dir=$(HTML_DIR) $(FIXXREF_OPTIONS) touch html-build.stamp ############## clean-local: rm -f *~ *.bak rm -rf .libs distclean-local: cd $(srcdir) && \ rm -rf xml $(REPORT_FILES) \ $(DOC_MODULE)-decl-list.txt $(DOC_MODULE)-decl.txt maintainer-clean-local: clean cd $(srcdir) && rm -rf xml html install-data-local: installfiles=`echo $(srcdir)/html/*`; \ if test "$$installfiles" = '$(srcdir)/html/*'; \ then echo '-- Nothing to install' ; \ else \ if test -n "$(DOC_MODULE_VERSION)"; then \ installdir="$(DESTDIR)$(TARGET_DIR)-$(DOC_MODULE_VERSION)"; \ else \ installdir="$(DESTDIR)$(TARGET_DIR)"; \ fi; \ $(mkinstalldirs) $${installdir} ; \ for i in $$installfiles; do \ echo '-- Installing '$$i ; \ $(INSTALL_DATA) $$i $${installdir}; \ done; \ if test -n "$(DOC_MODULE_VERSION)"; then \ mv -f $${installdir}/$(DOC_MODULE).devhelp2 \ $${installdir}/$(DOC_MODULE)-$(DOC_MODULE_VERSION).devhelp2; \ mv -f $${installdir}/$(DOC_MODULE).devhelp \ $${installdir}/$(DOC_MODULE)-$(DOC_MODULE_VERSION).devhelp; \ fi; \ ! which gtkdoc-rebase >/dev/null 2>&1 || \ gtkdoc-rebase --relative --dest-dir=$(DESTDIR) --html-dir=$${installdir} ; \ fi uninstall-local: if test -n "$(DOC_MODULE_VERSION)"; then \ installdir="$(DESTDIR)$(TARGET_DIR)-$(DOC_MODULE_VERSION)"; \ else \ installdir="$(DESTDIR)$(TARGET_DIR)"; \ fi; \ rm -rf $${installdir} # # Require gtk-doc when making dist # @ENABLE_GTK_DOC_TRUE@dist-check-gtkdoc: @ENABLE_GTK_DOC_FALSE@dist-check-gtkdoc: @ENABLE_GTK_DOC_FALSE@ @echo "*** gtk-doc must be installed and enabled in order to make dist" @ENABLE_GTK_DOC_FALSE@ @false dist-hook: dist-check-gtkdoc dist-hook-local mkdir $(distdir)/tmpl mkdir $(distdir)/xml mkdir $(distdir)/html -cp $(srcdir)/tmpl/*.sgml $(distdir)/tmpl -cp $(srcdir)/xml/*.xml $(distdir)/xml cp $(srcdir)/html/* $(distdir)/html -cp $(srcdir)/$(DOC_MODULE).types $(distdir)/ -cp $(srcdir)/$(DOC_MODULE)-sections.txt $(distdir)/ cd $(distdir) && rm -f $(DISTCLEANFILES) ! which gtkdoc-rebase >/dev/null 2>&1 || \ gtkdoc-rebase --online --relative --html-dir=$(distdir)/html .PHONY : dist-hook-local docs -include $(top_srcdir)/git.mk # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: libprelude-1.0.0/docs/api/xml/0000775000076400007640000000000011347714756013172 500000000000000libprelude-1.0.0/docs/api/xml/idmef-criteria.xml0000664000076400007640000012030711347714755016522 00000000000000 idmef-criteria 3 LIBPRELUDE Library idmef-criteria Synopsis enum idmef_criterion_operator_t; typedef idmef_criteria_t; typedef idmef_criterion_t; const char * idmef_criterion_operator_to_string (idmef_criterion_operator_t op); int idmef_criterion_new (idmef_criterion_t **criterion, idmef_path_t *path, idmef_criterion_value_t *value, idmef_criterion_operator_t op); void idmef_criterion_destroy (idmef_criterion_t *criterion); int idmef_criterion_clone (const idmef_criterion_t *criterion, idmef_criterion_t **dst); int idmef_criterion_print (const idmef_criterion_t *criterion, prelude_io_t *fd); int idmef_criterion_to_string (const idmef_criterion_t *criterion, prelude_string_t *out); idmef_path_t * idmef_criterion_get_path (const idmef_criterion_t *criterion); idmef_criterion_value_t * idmef_criterion_get_value (const idmef_criterion_t *criterion); idmef_criterion_operator_t idmef_criterion_get_operator (const idmef_criterion_t *criterion); int idmef_criterion_match (const idmef_criterion_t *criterion, idmef_message_t *message); int idmef_criteria_new (idmef_criteria_t **criteria); idmef_criteria_t * idmef_criteria_ref (idmef_criteria_t *criteria); void idmef_criteria_destroy (idmef_criteria_t *criteria); int idmef_criteria_clone (idmef_criteria_t *src, idmef_criteria_t **dst); int idmef_criteria_print (const idmef_criteria_t *criteria, prelude_io_t *fd); int idmef_criteria_to_string (const idmef_criteria_t *criteria, prelude_string_t *out); prelude_bool_t idmef_criteria_is_criterion (const idmef_criteria_t *criteria); idmef_criterion_t * idmef_criteria_get_criterion (const idmef_criteria_t *criteria); void idmef_criteria_set_criterion (idmef_criteria_t *criteria, idmef_criterion_t *criterion); void idmef_criteria_or_criteria (idmef_criteria_t *criteria, idmef_criteria_t *criteria2); int idmef_criteria_and_criteria (idmef_criteria_t *criteria, idmef_criteria_t *criteria2); int idmef_criteria_match (const idmef_criteria_t *criteria, idmef_message_t *message); idmef_criteria_t * idmef_criteria_get_or (const idmef_criteria_t *criteria); idmef_criteria_t * idmef_criteria_get_and (const idmef_criteria_t *criteria); int idmef_criteria_new_from_string (idmef_criteria_t **criteria, const char *str); prelude_bool_t idmef_criteria_get_negation (const idmef_criteria_t *criteria); void idmef_criteria_set_negation (idmef_criteria_t *criteria, prelude_bool_t negate); Description Details enum idmef_criterion_operator_t idmef_criterion_operator_ttypedef enum { IDMEF_CRITERION_OPERATOR_NOT = 0x8000, IDMEF_CRITERION_OPERATOR_NOCASE = 0x4000, IDMEF_CRITERION_OPERATOR_EQUAL = 0x0001, IDMEF_CRITERION_OPERATOR_EQUAL_NOCASE = IDMEF_CRITERION_OPERATOR_EQUAL|IDMEF_CRITERION_OPERATOR_NOCASE, IDMEF_CRITERION_OPERATOR_NOT_EQUAL = IDMEF_CRITERION_OPERATOR_NOT|IDMEF_CRITERION_OPERATOR_EQUAL, IDMEF_CRITERION_OPERATOR_NOT_EQUAL_NOCASE = IDMEF_CRITERION_OPERATOR_NOT_EQUAL|IDMEF_CRITERION_OPERATOR_EQUAL_NOCASE, IDMEF_CRITERION_OPERATOR_LESSER = 0x0002, IDMEF_CRITERION_OPERATOR_LESSER_OR_EQUAL = IDMEF_CRITERION_OPERATOR_LESSER|IDMEF_CRITERION_OPERATOR_EQUAL, IDMEF_CRITERION_OPERATOR_GREATER = 0x0004, IDMEF_CRITERION_OPERATOR_GREATER_OR_EQUAL = IDMEF_CRITERION_OPERATOR_GREATER|IDMEF_CRITERION_OPERATOR_EQUAL, IDMEF_CRITERION_OPERATOR_SUBSTR = 0x0008, IDMEF_CRITERION_OPERATOR_SUBSTR_NOCASE = IDMEF_CRITERION_OPERATOR_SUBSTR|IDMEF_CRITERION_OPERATOR_NOCASE, IDMEF_CRITERION_OPERATOR_NOT_SUBSTR = IDMEF_CRITERION_OPERATOR_NOT|IDMEF_CRITERION_OPERATOR_SUBSTR, IDMEF_CRITERION_OPERATOR_NOT_SUBSTR_NOCASE = IDMEF_CRITERION_OPERATOR_NOT|IDMEF_CRITERION_OPERATOR_SUBSTR_NOCASE, IDMEF_CRITERION_OPERATOR_REGEX = 0x0010, IDMEF_CRITERION_OPERATOR_REGEX_NOCASE = IDMEF_CRITERION_OPERATOR_REGEX|IDMEF_CRITERION_OPERATOR_NOCASE, IDMEF_CRITERION_OPERATOR_NOT_REGEX = IDMEF_CRITERION_OPERATOR_NOT|IDMEF_CRITERION_OPERATOR_REGEX, IDMEF_CRITERION_OPERATOR_NOT_REGEX_NOCASE = IDMEF_CRITERION_OPERATOR_NOT|IDMEF_CRITERION_OPERATOR_REGEX_NOCASE, IDMEF_CRITERION_OPERATOR_NULL = 0x0020, IDMEF_CRITERION_OPERATOR_NOT_NULL = IDMEF_CRITERION_OPERATOR_NULL|IDMEF_CRITERION_OPERATOR_NOT } idmef_criterion_operator_t; idmef_criteria_t idmef_criteria_ttypedef struct idmef_criteria idmef_criteria_t; idmef_criterion_t idmef_criterion_ttypedef struct idmef_criterion idmef_criterion_t; idmef_criterion_operator_to_string () idmef_criterion_operator_to_stringconst char * idmef_criterion_operator_to_string (idmef_criterion_operator_t op); Transforms op to string. op : idmef_criterion_operator_t type. Returns : A pointer to an operator string or NULL. idmef_criterion_new () idmef_criterion_newint idmef_criterion_new (idmef_criterion_t **criterion, idmef_path_t *path, idmef_criterion_value_t *value, idmef_criterion_operator_t op); Creates a new idmef_criterion_t object and store it in criterion. Matching this criterion will result in comparing the object value pointed by path against the provided value, using op. criterion : Address where to store the created idmef_criterion_t object. path : Pointer to an idmef_path_t object. value : Pointer to an idmef_criterion_value_t object. op : idmef_criterion_operator_t to use for matching this criterion. Returns : 0 on success, a negative value if an error occured. idmef_criterion_destroy () idmef_criterion_destroyvoid idmef_criterion_destroy (idmef_criterion_t *criterion); Destroys criterion and its content. criterion : Pointer to a idmef_criterion_t object. idmef_criterion_clone () idmef_criterion_cloneint idmef_criterion_clone (const idmef_criterion_t *criterion, idmef_criterion_t **dst); Clones criterion and stores the cloned criterion within dst. criterion : Pointer to a idmef_criterion_t object to clone. dst : Address where to store the cloned idmef_criterion_t object. Returns : 0 on success, a negative value if an error occured. idmef_criterion_print () idmef_criterion_printint idmef_criterion_print (const idmef_criterion_t *criterion, prelude_io_t *fd); Dump criterion to fd in the form of: [path] [operator] [value] Or if there is no value associated with the criterion: [operator] [path] criterion : Pointer to a idmef_criterion_t object. fd : Pointer to a prelude_io_t object. Returns : 0 on success, a negative value if an error occured. idmef_criterion_to_string () idmef_criterion_to_stringint idmef_criterion_to_string (const idmef_criterion_t *criterion, prelude_string_t *out); Dump criterion as a string to the out buffer in the form of: [path] [operator] [value] Or if there is no value associated with the criterion: [operator] [path] criterion : Pointer to a idmef_criterion_t object. out : Pointer to a prelude_string_t object. Returns : 0 on success, a negative value if an error occured. idmef_criterion_get_path () idmef_criterion_get_pathidmef_path_t * idmef_criterion_get_path (const idmef_criterion_t *criterion); Used to access the idmef_path_t object associated with criterion. criterion : Pointer to a idmef_criterion_t object. Returns : the idmef_path_t object associated with criterion. idmef_criterion_get_value () idmef_criterion_get_valueidmef_criterion_value_t * idmef_criterion_get_value (const idmef_criterion_t *criterion); Used to access the idmef_criterion_value_t associated with criterion. There might be no value specifically if the provided idmef_criterion_operator_t was IDMEF_CRITERION_OPERATOR_NULL or IDMEF_CRITERION_OPERATOR_NOT_NULL. criterion : Pointer to a idmef_criterion_t object. Returns : the idmef_criterion_value_t object associated with criterion. idmef_criterion_get_operator () idmef_criterion_get_operatoridmef_criterion_operator_t idmef_criterion_get_operator (const idmef_criterion_t *criterion); Used to access the idmef_criterion_operator_t enumeration associated with criterion. criterion : Pointer to a idmef_criterion_t object. Returns : the idmef_criterion_operator_t associated with criterion. idmef_criterion_match () idmef_criterion_matchint idmef_criterion_match (const idmef_criterion_t *criterion, idmef_message_t *message); Matches message against the provided criterion. This implies retrieving the value associated with criterion path, and matching it with the idmef_criterion_value_t object within criterion. criterion : Pointer to a idmef_criterion_t object. message : Pointer to a idmef_message_t object to match against criterion. Returns : 1 for a match, 0 for no match, or a negative value if an error occured. idmef_criteria_new () idmef_criteria_newint idmef_criteria_new (idmef_criteria_t **criteria); Creates a new idmef_criteria_t object and store it into criteria. criteria : Address where to store the created idmef_criteria_t object. Returns : 0 on success, a negative value if an error occured. idmef_criteria_ref () idmef_criteria_refidmef_criteria_t * idmef_criteria_ref (idmef_criteria_t *criteria); Increases criteria reference count. idmef_criteria_destroy() will decrease the refcount until it reaches 0, at which point criteria will be destroyed. criteria : Pointer to a idmef_criteria_t object to reference. Returns : criteria. idmef_criteria_destroy () idmef_criteria_destroyvoid idmef_criteria_destroy (idmef_criteria_t *criteria); Destroys criteria and its content. criteria : Pointer to a idmef_criteria_t object. idmef_criteria_clone () idmef_criteria_cloneint idmef_criteria_clone (idmef_criteria_t *src, idmef_criteria_t **dst); Clones src and stores the cloned criteria within dst. src : Pointer to a idmef_criteria_t object to clone. dst : Address where to store the cloned idmef_criteria_t object. Returns : 0 on success, a negative value if an error occured. idmef_criteria_print () idmef_criteria_printint idmef_criteria_print (const idmef_criteria_t *criteria, prelude_io_t *fd); criteria : fd : Returns : idmef_criteria_to_string () idmef_criteria_to_stringint idmef_criteria_to_string (const idmef_criteria_t *criteria, prelude_string_t *out); criteria : out : Returns : idmef_criteria_is_criterion () idmef_criteria_is_criterionprelude_bool_t idmef_criteria_is_criterion (const idmef_criteria_t *criteria); criteria : Returns : idmef_criteria_get_criterion () idmef_criteria_get_criterionidmef_criterion_t * idmef_criteria_get_criterion (const idmef_criteria_t *criteria); criteria : Returns : idmef_criteria_set_criterion () idmef_criteria_set_criterionvoid idmef_criteria_set_criterion (idmef_criteria_t *criteria, idmef_criterion_t *criterion); criteria : criterion : idmef_criteria_or_criteria () idmef_criteria_or_criteriavoid idmef_criteria_or_criteria (idmef_criteria_t *criteria, idmef_criteria_t *criteria2); criteria : criteria2 : idmef_criteria_and_criteria () idmef_criteria_and_criteriaint idmef_criteria_and_criteria (idmef_criteria_t *criteria, idmef_criteria_t *criteria2); criteria : criteria2 : Returns : idmef_criteria_match () idmef_criteria_matchint idmef_criteria_match (const idmef_criteria_t *criteria, idmef_message_t *message); Matches message against the provided criteria. criteria : Pointer to a idmef_criteria_t object. message : Pointer to a idmef_message_t message. Returns : 1 if criteria match, 0 if it did not, a negative value if an error occured. idmef_criteria_get_or () idmef_criteria_get_oridmef_criteria_t * idmef_criteria_get_or (const idmef_criteria_t *criteria); criteria : Returns : idmef_criteria_get_and () idmef_criteria_get_andidmef_criteria_t * idmef_criteria_get_and (const idmef_criteria_t *criteria); criteria : Returns : idmef_criteria_new_from_string () idmef_criteria_new_from_stringint idmef_criteria_new_from_string (idmef_criteria_t **criteria, const char *str); criteria : str : Returns : idmef_criteria_get_negation () idmef_criteria_get_negationprelude_bool_t idmef_criteria_get_negation (const idmef_criteria_t *criteria); criteria : Returns : idmef_criteria_set_negation () idmef_criteria_set_negationvoid idmef_criteria_set_negation (idmef_criteria_t *criteria, prelude_bool_t negate); criteria : negate : libprelude-1.0.0/docs/api/xml/api-index-deprecated.xml0000664000076400007640000000107711347714755017614 00000000000000 P prelude_client_get_setup_error prelude_client_is_setup_needed libprelude-1.0.0/docs/api/xml/prelude-ident.xml0000664000076400007640000001347411347714756016406 00000000000000 prelude-ident 3 LIBPRELUDE Library prelude-ident Synopsis typedef prelude_ident_t; uint64_t prelude_ident_inc (prelude_ident_t *ident); int prelude_ident_generate (prelude_ident_t *ident, prelude_string_t *out); void prelude_ident_destroy (prelude_ident_t *ident); int prelude_ident_new (prelude_ident_t **ret); Description Details prelude_ident_t prelude_ident_ttypedef struct prelude_ident prelude_ident_t; prelude_ident_inc () prelude_ident_incuint64_t prelude_ident_inc (prelude_ident_t *ident); Deprecated. ident : Pointer to a prelude_ident_t object. Returns : A new ident. prelude_ident_generate () prelude_ident_generateint prelude_ident_generate (prelude_ident_t *ident, prelude_string_t *out); Generate an UUID and store it in out. ident : Pointer to a prelude_ident_t object. out : prelude_string_t where the ident will be generated. Returns : A negative value if an error occur. prelude_ident_destroy () prelude_ident_destroyvoid prelude_ident_destroy (prelude_ident_t *ident); Destroy a prelude_ident_t object. ident : Pointer to a prelude_ident_t object. prelude_ident_new () prelude_ident_newint prelude_ident_new (prelude_ident_t **ret); Create a new prelude_ident_t object with an unique value. ret : Pointer where to store the created object. Returns : 0 on success, or a negative value if an error occured. libprelude-1.0.0/docs/api/xml/prelude-inttypes.xml0000664000076400007640000004674511347714756017171 00000000000000 prelude-inttypes 3 LIBPRELUDE Library prelude-inttypes Synopsis #define PRELUDE_INT8_MIN #define PRELUDE_INT16_MIN #define PRELUDE_INT32_MIN #define PRELUDE_INT64_MIN #define PRELUDE_INT8_MAX #define PRELUDE_INT16_MAX #define PRELUDE_INT32_MAX #define PRELUDE_INT64_MAX #define PRELUDE_UINT8_MAX #define PRELUDE_UINT16_MAX #define PRELUDE_UINT32_MAX #define PRELUDE_UINT64_MAX #define PRELUDE_INTMAX_MIN #define PRELUDE_INTMAX_MAX #define PRELUDE_UINTMAX_MAX #define PRELUDE_PRId64 #define PRELUDE_PRIi64 #define PRELUDE_PRIo64 #define PRELUDE_PRIx64 #define PRELUDE_PRIX64 #define PRELUDE_PRIu64 #define PRELUDE_PRId32 #define PRELUDE_PRIi32 #define PRELUDE_PRIo32 #define PRELUDE_PRIx32 #define PRELUDE_PRIX32 #define PRELUDE_PRIu32 #define PRELUDE_PRId16 #define PRELUDE_PRIi16 #define PRELUDE_PRIo16 #define PRELUDE_PRIx16 #define PRELUDE_PRIX16 #define PRELUDE_PRIu16 #define PRELUDE_PRId8 #define PRELUDE_PRIi8 #define PRELUDE_PRIo8 #define PRELUDE_PRIx8 #define PRELUDE_PRIX8 #define PRELUDE_PRIu8 #define PRELUDE_SCNd64 #define PRELUDE_SCNi64 #define PRELUDE_SCNo64 #define PRELUDE_SCNx64 #define PRELUDE_SCNu64 enum prelude_bool_t; typedef int8_t; typedef uint8_t; typedef int16_t; typedef uint16_t; typedef int32_t; typedef uint32_t; typedef int64_t; typedef uint64_t; Description Details PRELUDE_INT8_MIN PRELUDE_INT8_MIN#define PRELUDE_INT8_MIN (-128) PRELUDE_INT16_MIN PRELUDE_INT16_MIN#define PRELUDE_INT16_MIN (-32767 - 1) PRELUDE_INT32_MIN PRELUDE_INT32_MIN#define PRELUDE_INT32_MIN (-2147483647 - 1) PRELUDE_INT64_MIN PRELUDE_INT64_MIN#define PRELUDE_INT64_MIN (-__PRELUDE_INT64_SUFFIX(9223372036854775807) - 1) PRELUDE_INT8_MAX PRELUDE_INT8_MAX#define PRELUDE_INT8_MAX (127) PRELUDE_INT16_MAX PRELUDE_INT16_MAX#define PRELUDE_INT16_MAX (32767) PRELUDE_INT32_MAX PRELUDE_INT32_MAX#define PRELUDE_INT32_MAX (2147483647) PRELUDE_INT64_MAX PRELUDE_INT64_MAX#define PRELUDE_INT64_MAX (__PRELUDE_INT64_SUFFIX(9223372036854775807)) PRELUDE_UINT8_MAX PRELUDE_UINT8_MAX#define PRELUDE_UINT8_MAX (255) PRELUDE_UINT16_MAX PRELUDE_UINT16_MAX#define PRELUDE_UINT16_MAX (65535) PRELUDE_UINT32_MAX PRELUDE_UINT32_MAX#define PRELUDE_UINT32_MAX (4294967295U) PRELUDE_UINT64_MAX PRELUDE_UINT64_MAX#define PRELUDE_UINT64_MAX (__PRELUDE_UINT64_SUFFIX(18446744073709551615)) PRELUDE_INTMAX_MIN PRELUDE_INTMAX_MIN#define PRELUDE_INTMAX_MIN INT64_MIN PRELUDE_INTMAX_MAX PRELUDE_INTMAX_MAX#define PRELUDE_INTMAX_MAX INT64_MAX PRELUDE_UINTMAX_MAX PRELUDE_UINTMAX_MAX#define PRELUDE_UINTMAX_MAX UINT64_MAX PRELUDE_PRId64 PRELUDE_PRId64#define PRELUDE_PRId64 __PRELUDE_64BIT_FORMAT_PREFIX "d" PRELUDE_PRIi64 PRELUDE_PRIi64#define PRELUDE_PRIi64 __PRELUDE_64BIT_FORMAT_PREFIX "i" PRELUDE_PRIo64 PRELUDE_PRIo64#define PRELUDE_PRIo64 __PRELUDE_64BIT_FORMAT_PREFIX "o" PRELUDE_PRIx64 PRELUDE_PRIx64#define PRELUDE_PRIx64 __PRELUDE_64BIT_FORMAT_PREFIX "x" PRELUDE_PRIX64 PRELUDE_PRIX64#define PRELUDE_PRIX64 __PRELUDE_64BIT_FORMAT_PREFIX "X" PRELUDE_PRIu64 PRELUDE_PRIu64#define PRELUDE_PRIu64 __PRELUDE_64BIT_FORMAT_PREFIX "u" PRELUDE_PRId32 PRELUDE_PRId32#define PRELUDE_PRId32 "d" PRELUDE_PRIi32 PRELUDE_PRIi32#define PRELUDE_PRIi32 "i" PRELUDE_PRIo32 PRELUDE_PRIo32#define PRELUDE_PRIo32 "o" PRELUDE_PRIx32 PRELUDE_PRIx32#define PRELUDE_PRIx32 "x" PRELUDE_PRIX32 PRELUDE_PRIX32#define PRELUDE_PRIX32 "X" PRELUDE_PRIu32 PRELUDE_PRIu32#define PRELUDE_PRIu32 "u" PRELUDE_PRId16 PRELUDE_PRId16#define PRELUDE_PRId16 "d" PRELUDE_PRIi16 PRELUDE_PRIi16#define PRELUDE_PRIi16 "i" PRELUDE_PRIo16 PRELUDE_PRIo16#define PRELUDE_PRIo16 "o" PRELUDE_PRIx16 PRELUDE_PRIx16#define PRELUDE_PRIx16 "x" PRELUDE_PRIX16 PRELUDE_PRIX16#define PRELUDE_PRIX16 "X" PRELUDE_PRIu16 PRELUDE_PRIu16#define PRELUDE_PRIu16 "u" PRELUDE_PRId8 PRELUDE_PRId8#define PRELUDE_PRId8 "d" PRELUDE_PRIi8 PRELUDE_PRIi8#define PRELUDE_PRIi8 "i" PRELUDE_PRIo8 PRELUDE_PRIo8#define PRELUDE_PRIo8 "o" PRELUDE_PRIx8 PRELUDE_PRIx8#define PRELUDE_PRIx8 "x" PRELUDE_PRIX8 PRELUDE_PRIX8#define PRELUDE_PRIX8 "X" PRELUDE_PRIu8 PRELUDE_PRIu8#define PRELUDE_PRIu8 "u" PRELUDE_SCNd64 PRELUDE_SCNd64#define PRELUDE_SCNd64 __PRELUDE_64BIT_FORMAT_PREFIX "d" PRELUDE_SCNi64 PRELUDE_SCNi64#define PRELUDE_SCNi64 __PRELUDE_64BIT_FORMAT_PREFIX "i" PRELUDE_SCNo64 PRELUDE_SCNo64#define PRELUDE_SCNo64 __PRELUDE_64BIT_FORMAT_PREFIX "o" PRELUDE_SCNx64 PRELUDE_SCNx64#define PRELUDE_SCNx64 __PRELUDE_64BIT_FORMAT_PREFIX "x" PRELUDE_SCNu64 PRELUDE_SCNu64#define PRELUDE_SCNu64 __PRELUDE_64BIT_FORMAT_PREFIX "u" enum prelude_bool_t prelude_bool_ttypedef enum { PRELUDE_BOOL_TRUE = TRUE, PRELUDE_BOOL_FALSE = FALSE } prelude_bool_t; int8_t int8_t typedef signed char int8_t; uint8_t uint8_t typedef unsigned char uint8_t; int16_t int16_t typedef short int16_t; uint16_t uint16_t typedef unsigned short uint16_t; int32_t int32_t typedef int int32_t; uint32_t uint32_t typedef unsigned int uint32_t; int64_t int64_t uint64_t uint64_t libprelude-1.0.0/docs/api/xml/prelude-log.xml0000664000076400007640000003030311347714756016052 00000000000000 prelude-log 3 LIBPRELUDE Library prelude-log Synopsis enum prelude_log_t; enum prelude_log_flags_t; void prelude_log (prelude_log_t level, const char *fmt, ...); void prelude_log_debug (prelude_log_t level, const char *fmt, ...); #define prelude_log_v (level, fmt, ap) #define prelude_log_debug_v (level, fmt, ap) void prelude_log_set_level (prelude_log_t level); void prelude_log_set_debug_level (int level); prelude_log_flags_t prelude_log_get_flags (void); void prelude_log_set_flags (prelude_log_flags_t flags); char * prelude_log_get_prefix (void); void prelude_log_set_prefix (char *prefix); void prelude_log_set_callback (); int prelude_log_set_logfile (const char *filename); Description Details enum prelude_log_t prelude_log_ttypedef enum { PRELUDE_LOG_CRIT = -1, PRELUDE_LOG_ERR = 0, PRELUDE_LOG_WARN = 1, PRELUDE_LOG_INFO = 2, PRELUDE_LOG_DEBUG = 3 } prelude_log_t; enum prelude_log_flags_t prelude_log_flags_ttypedef enum { PRELUDE_LOG_FLAGS_QUIET = 0x01, /* Drop PRELUDE_LOG_PRIORITY_INFO */ PRELUDE_LOG_FLAGS_SYSLOG = 0x02 } prelude_log_flags_t; prelude_log () prelude_logvoid prelude_log (prelude_log_t level, const char *fmt, ...); level : fmt : ... : prelude_log_debug () prelude_log_debugvoid prelude_log_debug (prelude_log_t level, const char *fmt, ...); level : fmt : ... : prelude_log_v() prelude_log_v#define prelude_log_v(level, fmt, ap) level : fmt : ap : prelude_log_debug_v() prelude_log_debug_v#define prelude_log_debug_v(level, fmt, ap) level : fmt : ap : prelude_log_set_level () prelude_log_set_levelvoid prelude_log_set_level (prelude_log_t level); level : prelude_log_set_debug_level () prelude_log_set_debug_levelvoid prelude_log_set_debug_level (int level); level : prelude_log_get_flags () prelude_log_get_flagsprelude_log_flags_t prelude_log_get_flags (void); Returns : prelude_log_set_flags () prelude_log_set_flagsvoid prelude_log_set_flags (prelude_log_flags_t flags); flags : prelude_log_get_prefix () prelude_log_get_prefixchar * prelude_log_get_prefix (void); Returns : prelude_log_set_prefix () prelude_log_set_prefixvoid prelude_log_set_prefix (char *prefix); Tell the Prelude standard logger to add prefix before logging a line. prefix : Pointer to the prefix to use. prelude_log_set_callback () prelude_log_set_callbackvoid prelude_log_set_callback (); @log_cb() will be called in place of the prelude function usally used for loging. log_cb : Callback function. prelude_log_set_logfile () prelude_log_set_logfileint prelude_log_set_logfile (const char *filename); filename : Returns : libprelude-1.0.0/docs/api/xml/prelude-hash.xml0000664000076400007640000002756611347714756016235 00000000000000 prelude-hash 3 LIBPRELUDE Library prelude-hash Synopsis typedef prelude_hash_t; int prelude_hash_new (prelude_hash_t **hash, unsigned int (hash_funcconst void *) (), int (key_cmp_funcconst void *, const void *) (), void (key_destroy_funcvoid *) (), void (value_destroy_funcvoid *) ()); int prelude_hash_new2 (prelude_hash_t **hash, size_t size, unsigned int (hash_funcconst void *) (), int (key_cmp_funcconst void *, const void *) (), void (key_destroy_funcvoid *) (), void (value_destroy_funcvoid *) ()); void prelude_hash_destroy (prelude_hash_t *hash); int prelude_hash_set (prelude_hash_t *hash, void *key, void *value); void * prelude_hash_get (prelude_hash_t *hash, const void *key); int prelude_hash_elem_destroy (prelude_hash_t *hash, const void *key); void prelude_hash_iterate (prelude_hash_t *hash, void (cbvoid *data) ()); Description Details prelude_hash_t prelude_hash_ttypedef struct prelude_hash prelude_hash_t; prelude_hash_new () prelude_hash_newint prelude_hash_new (prelude_hash_t **hash, unsigned int (hash_funcconst void *) (), int (key_cmp_funcconst void *, const void *) (), void (key_destroy_funcvoid *) (), void (value_destroy_funcvoid *) ()); hash : hash_func : key_cmp_func : key_destroy_func : value_destroy_func : Returns : prelude_hash_new2 () prelude_hash_new2int prelude_hash_new2 (prelude_hash_t **hash, size_t size, unsigned int (hash_funcconst void *) (), int (key_cmp_funcconst void *, const void *) (), void (key_destroy_funcvoid *) (), void (value_destroy_funcvoid *) ()); hash : size : hash_func : key_cmp_func : key_destroy_func : value_destroy_func : Returns : prelude_hash_destroy () prelude_hash_destroyvoid prelude_hash_destroy (prelude_hash_t *hash); hash : prelude_hash_set () prelude_hash_setint prelude_hash_set (prelude_hash_t *hash, void *key, void *value); hash : key : value : Returns : prelude_hash_get () prelude_hash_getvoid * prelude_hash_get (prelude_hash_t *hash, const void *key); hash : key : Returns : prelude_hash_elem_destroy () prelude_hash_elem_destroyint prelude_hash_elem_destroy (prelude_hash_t *hash, const void *key); hash : key : Returns : prelude_hash_iterate () prelude_hash_iteratevoid prelude_hash_iterate (prelude_hash_t *hash, void (cbvoid *data) ()); hash : cb : libprelude-1.0.0/docs/api/xml/prelude-msg.xml0000664000076400007640000011371211347714756016065 00000000000000 prelude-msg 3 LIBPRELUDE Library prelude-msg Prelude Messaging API Synopsis typedef prelude_msg_t; enum prelude_msg_priority_t; int prelude_msg_read (prelude_msg_t **msg, prelude_io_t *pio); int prelude_msg_forward (prelude_msg_t *msg, prelude_io_t *dst, prelude_io_t *src); int prelude_msg_get (prelude_msg_t *msg, uint8_t *tag, uint32_t *len, void **buf); void prelude_msg_recycle (prelude_msg_t *msg); void prelude_msg_mark_end (prelude_msg_t *msg); int prelude_msg_dynamic_new (prelude_msg_t **ret, int (flush_msg_cbprelude_msg_t **msg, void *data) (), void *data); int prelude_msg_new (prelude_msg_t **ret, size_t msgcount, size_t msglen, uint8_t tag, prelude_msg_priority_t priority); int prelude_msg_set (prelude_msg_t *msg, uint8_t tag, uint32_t len, const void *data); int prelude_msg_write (prelude_msg_t *msg, prelude_io_t *dst); void prelude_msg_set_tag (prelude_msg_t *msg, uint8_t tag); void prelude_msg_set_priority (prelude_msg_t *msg, prelude_msg_priority_t priority); uint8_t prelude_msg_get_tag (prelude_msg_t *msg); prelude_msg_priority_t prelude_msg_get_priority (prelude_msg_t *msg); uint32_t prelude_msg_get_len (prelude_msg_t *msg); uint32_t prelude_msg_get_datalen (prelude_msg_t *msg); void prelude_msg_destroy (prelude_msg_t *msg); struct timeval * prelude_msg_get_time (prelude_msg_t *msg, struct timeval *tv); int prelude_msg_is_empty (prelude_msg_t *msg); int prelude_msg_is_fragment (prelude_msg_t *msg); prelude_msg_t * prelude_msg_ref (prelude_msg_t *msg); void prelude_msg_set_callback (prelude_msg_t *msg, int (flush_msg_cbprelude_msg_t **msg, void *data) ()); void prelude_msg_set_data (prelude_msg_t *msg, void *data); const unsigned char * prelude_msg_get_message_data (prelude_msg_t *msg); Description This Mesaging API is used for differents Prelude program to communicate together. It feature compatibility between version, and use a way to describe data similar to XML. The Message header contain the protocol version, which is only to be used in case the main protocol structure change (compatibility break), The tag describe the kind of message, The fragment field may be used if a message is sent in several time, The priority may be used by the receiving end to priorityze task, The datalen contain the size of the whole message in network byte order 8bits 8bits 8bits 8bits 32bits +--------+--------+--------+----------+------------------------------+ |version | tag |priority| fragment | datalen | +--------+--------+--------+----------+------------------------------+ Then the message itself contain submessage composed of : A tag describing the kind of payload, the len of the payload (in network byte order), the payload itself, and an end of message byte (0xff) in order to resynchronize in case of problem. 8bits 32bits 8bits +--------+--------------------------------+-----------------+--------+ | tag | len | payload | 0xff | +--------+--------------------------------+-----------------+--------+ Details prelude_msg_t prelude_msg_ttypedef struct prelude_msg prelude_msg_t; enum prelude_msg_priority_t prelude_msg_priority_ttypedef enum { PRELUDE_MSG_PRIORITY_NONE = 0, PRELUDE_MSG_PRIORITY_LOW = 1, PRELUDE_MSG_PRIORITY_MID = 2, PRELUDE_MSG_PRIORITY_HIGH = 3 } prelude_msg_priority_t; prelude_msg_read () prelude_msg_readint prelude_msg_read (prelude_msg_t **msg, prelude_io_t *pio); Read a message on pio into msg. If msg is NULL, it is allocated. This function will never block. msg : Pointer on a prelude_msg_t object address. pio : Pointer on a prelude_io_t object. Returns : 0 if reading the message is complete, or a prelude_error_t error if an error occured. Take particular attention to PRELUDE_ERROR_EAGAIN and PRELUDE_ERROR_EOF. prelude_msg_forward () prelude_msg_forwardint prelude_msg_forward (prelude_msg_t *msg, prelude_io_t *dst, prelude_io_t *src); prelude_msg_forward() read the message corresponding to the msg object containing the message header previously gathered using prelude_msg_read_header() from the src object, and transfer it to dst. The header is also transfered. msg : Pointer on a prelude_msg_t object containing a message header. dst : Pointer on a prelude_io_t object to send message to. src : Pointer on a prelude_io_t object to read message from. Returns : 0 on success, or a negative value if an error occured. prelude_msg_get () prelude_msg_getint prelude_msg_get (prelude_msg_t *msg, uint8_t *tag, uint32_t *len, void **buf); prelude_msg_get() read the next data chunk contained in the message. tag is updated to contain the kind of data the chunk contain. len is updated to contain the len of the data chunk. buf is updated to point on the data chunk. msg : Pointer on a prelude_msg_t object representing the message to get data from. tag : Pointer on a 8 bits unsigned integer to store the message tag. len : Pointer on a 32 bits unsigned integer to store the message len to. buf : Address of a pointer to store the buffer starting address. Returns : 0 on success, or a prelude_error_t value on error. prelude_msg_recycle () prelude_msg_recyclevoid prelude_msg_recycle (prelude_msg_t *msg); Recycle msg so you can write at it again, even thought it was written. msg : Pointer on prelude_msg_t object. prelude_msg_mark_end () prelude_msg_mark_endvoid prelude_msg_mark_end (prelude_msg_t *msg); Mark end of message in the msg buffer, so you can continue adding different message in the same buffer. msg : Pointer on prelude_msg_t object. prelude_msg_dynamic_new () prelude_msg_dynamic_newint prelude_msg_dynamic_new (prelude_msg_t **ret, int (flush_msg_cbprelude_msg_t **msg, void *data) (), void *data); Allocate a new prelude_msg_t object. prelude_msg_set() can then be used to add chunk of data to the message, and prelude_msg_mark_start() to separate different message in the same buffer. This function use memory chunk of static size to store the message in. If the size of the data you want to store is bigger than the actual chunk size, flush_msg_cb callback will be called for the current message to be flushed, and the returned message will be used in order to store remaining data. ret : Pointer where to store the create prelude_msg_t. flush_msg_cb : Callback function to call when the buffer need to be flushed. data : Data to pass to the flush_msg_cb callback function. Returns : 0 on success, a negative value if an error occured. prelude_msg_new () prelude_msg_newint prelude_msg_new (prelude_msg_t **ret, size_t msgcount, size_t msglen, uint8_t tag, prelude_msg_priority_t priority); Allocate a new prelude_msg_t object and store it into ret. prelude_msg_set() can then be used to add chunk of data to the message, and prelude_msg_write() to send it. ret : Pointer where to store the created prelude_msg_t. msgcount : Number of chunk of data the created object can accept. msglen : Maximum number of bytes the object should handle for all the chunks. tag : A tag identifying the kind of message. priority : The priority of this message. Returns : 0 on success, a negative value if an error occured. prelude_msg_set () prelude_msg_setint prelude_msg_set (prelude_msg_t *msg, uint8_t tag, uint32_t len, const void *data); prelude_msg_set() append len bytes of data from the data buffer to the msg object representing a message. The data is tagged with tag. msg : Pointer on a prelude_msg_t object to store the data to. tag : 8 bits unsigned integer describing the kind of data. len : len of the data chunk. data : Pointer to the starting address of the data. Returns : 0 on success, or a negative value if the remaining space is not available. You might check the return value mostly if using a dynamic message through prelude_msg_dynamic_new() prelude_msg_write () prelude_msg_writeint prelude_msg_write (prelude_msg_t *msg, prelude_io_t *dst); prelude_msg_write() write the message corresponding to the msg object to dst. The message should have been created using the prelude_msg_new() and prelude_msg_set() functions. msg : Pointer on a prelude_msg_t object containing the message. dst : Pointer on a prelude_io_t object to send the message to. Returns : 0 on success, or a negative value if an error occured. prelude_msg_set_tag () prelude_msg_set_tagvoid prelude_msg_set_tag (prelude_msg_t *msg, uint8_t tag); Tag msg. msg : Pointer on a prelude_msg_t object. tag : Tag to associate with msg. prelude_msg_set_priority () prelude_msg_set_priorityvoid prelude_msg_set_priority (prelude_msg_t *msg, prelude_msg_priority_t priority); Associate priority with msg. msg : Pointer on a prelude_msg_t object. priority : Priority to associate with msg. prelude_msg_get_tag () prelude_msg_get_taguint8_t prelude_msg_get_tag (prelude_msg_t *msg); prelude_msg_get_tag() return the tag contained in the msg header. msg : Pointer on a prelude_msg_t object. Returns : A tag. prelude_msg_get_priority () prelude_msg_get_priorityprelude_msg_priority_t prelude_msg_get_priority (prelude_msg_t *msg); prelude_msg_get_priority() return the priority contained in the msg header. msg : Pointer on a prelude_msg_t object. Returns : A priority. prelude_msg_get_len () prelude_msg_get_lenuint32_t prelude_msg_get_len (prelude_msg_t *msg); prelude_msg_get_len() return the currently used len for the msg message. msg : Pointer on a prelude_msg_t object. Returns : Len of the message. prelude_msg_get_datalen () prelude_msg_get_datalenuint32_t prelude_msg_get_datalen (prelude_msg_t *msg); prelude_msg_get_datalen() return the len of the whole message contained in the msg header. msg : Pointer on a prelude_msg_t object. Returns : Len of the message. prelude_msg_destroy () prelude_msg_destroyvoid prelude_msg_destroy (prelude_msg_t *msg); prelude_msg_destroy() destroy the prelude_msg_t object pointed to by msg. All the ressources for this message are freed. msg : Pointer on a prelude_msg_t object. prelude_msg_get_time () prelude_msg_get_timestruct timeval * prelude_msg_get_time (prelude_msg_t *msg, struct timeval *tv); msg : tv : Returns : prelude_msg_is_empty () prelude_msg_is_emptyint prelude_msg_is_empty (prelude_msg_t *msg); msg : Pointer on a prelude_msg_t object. Returns : true if msg doesn't contain any data to send. prelude_msg_is_fragment () prelude_msg_is_fragmentint prelude_msg_is_fragment (prelude_msg_t *msg); msg : Pointer on a prelude_msg_t object. Returns : true if msg only contain a fragment of message. prelude_msg_ref () prelude_msg_refprelude_msg_t * prelude_msg_ref (prelude_msg_t *msg); msg : Returns : prelude_msg_set_callback () prelude_msg_set_callbackvoid prelude_msg_set_callback (prelude_msg_t *msg, int (flush_msg_cbprelude_msg_t **msg, void *data) ()); prelude_msg_set_callback() allow to change the callback used to flush a message created with prelude_msg_dynamic_new(). msg : Pointer on a prelude_msg_t object. flush_msg_cb : Pointer on a function responssible of sending the message. prelude_msg_set_data () prelude_msg_set_datavoid prelude_msg_set_data (prelude_msg_t *msg, void *data); prelude_msg_set_data() allow to change the data passed to the message sending callback. msg : Pointer on a prelude_msg_t object. data : Pointer on the data to associate to this message. prelude_msg_get_message_data () prelude_msg_get_message_dataconst unsigned char * prelude_msg_get_message_data (prelude_msg_t *msg); msg : Returns : See Also prelude-msgbuf libprelude-1.0.0/docs/api/xml/idmef-path.xml0000664000076400007640000012500111347714755015650 00000000000000 idmef-path 3 LIBPRELUDE Library idmef-path The High level IDMEF API. Synopsis typedef idmef_path_t; int idmef_path_get (const idmef_path_t *path, idmef_message_t *message, idmef_value_t **ret); int idmef_path_set (const idmef_path_t *path, idmef_message_t *message, idmef_value_t *value); int idmef_path_new (idmef_path_t **path, const char *format, ...); int idmef_path_new_v (idmef_path_t **path, const char *format, va_list args); int idmef_path_new_fast (idmef_path_t **path, const char *buffer); idmef_class_id_t idmef_path_get_class (const idmef_path_t *path, int depth); idmef_value_type_id_t idmef_path_get_value_type (const idmef_path_t *path, int depth); int idmef_path_set_index (idmef_path_t *path, unsigned int depth, int index); int idmef_path_undefine_index (idmef_path_t *path, unsigned int depth); int idmef_path_get_index (const idmef_path_t *path, unsigned int depth); int idmef_path_make_child (idmef_path_t *path, const char *child_name, int index); int idmef_path_make_parent (idmef_path_t *path); void idmef_path_destroy (idmef_path_t *path); int idmef_path_ncompare (const idmef_path_t *p1, const idmef_path_t *p2, unsigned int depth); int idmef_path_compare (const idmef_path_t *p1, const idmef_path_t *p2); int idmef_path_clone (const idmef_path_t *src, idmef_path_t **dst); idmef_path_t * idmef_path_ref (idmef_path_t *path); const char * idmef_path_get_name (const idmef_path_t *path, int depth); prelude_bool_t idmef_path_is_ambiguous (const idmef_path_t *path); int idmef_path_has_lists (const idmef_path_t *path); prelude_bool_t idmef_path_is_list (const idmef_path_t *path, int depth); unsigned int idmef_path_get_depth (const idmef_path_t *path); int idmef_path_check_operator (const idmef_path_t *path, idmef_criterion_operator_t op); int idmef_path_get_applicable_operators (const idmef_path_t *path, idmef_criterion_operator_t *result); Description The IDMEF path API provide a methodes to define a "path" in the IDMEF tree. Once this path is defined, the user might set or retrieve this path. Here is an example of how to use this API in order to set a given path within a idmef_message_t root object: First, we need to create a path to the object we want to create. If for example, we wish to create the alert.classification.text path within our message, we will use: int ret; idmef_path_t *path; ret = idmef_path_new(&path, "alert.classification.text"); if ( ret < 0 ) return ret; Using the above, we just created a "pointer" to a given path in our idmef_message_t. This path doesn't yet exist, but might be used to read, or to write a value. int ret; idmef_value_t *value; ret = idmef_value_new_from_path(&value, path, "A value"); if ( ret < 0 ) return ret; Here we just created a value applicable to the previously created path. That is, if our path is pointing to a value of type string, the created idmef_value_t object will be of this type. idmef_message_t *idmef; /* * create our top message */ ret = idmef_message_new(&idmef); /* * Set the previously defined path to the previously created value * in the top level idmef message 'idmef'. */ ret = idmef_path_set(path, idmef, value); And finally, we create our top level idmef_message_t object and set the created idmef_value_t as the value for our created idmef_path_t. Given our previous example, we can write the following function: static int set_idmef_path(idmef_message_t *message, const char *pathname, const char *value) { int ret; idmef_value_t *val; idmef_path_t *path; ret = idmef_path_new(&path, pathname); if ( ret < 0 ) return ret; ret = idmef_value_new_from_path(&val, path, value); if ( ret < 0 ) { idmef_path_destroy(path); return ret; } ret = idmef_path_set(path, message, val); idmef_value_destroy(val); idmef_path_destroy(path); return ret; } You will then be able to set any field of the IDMEF message using: idmef_message_t *idmef; ret = idmef_message_new(&idmef); if ( ret < 0 ) return ret; set_idmef_path(idmef, "alert.classification.text", "My classification text"); set_idmef_path(idmef, "alert.classification.reference(0).name", "OSVDB-XXXX"); set_idmef_path(idmef, "alert.classification.reference(0).origin", "osvdb"); set_idmef_path(idmef, "alert.classification.reference(0).url", "http://my.url/"); set_idmef_path(idmef, "alert.source(0).node.address(0).address", "127.0.0.1"); Details idmef_path_t idmef_path_ttypedef struct idmef_path idmef_path_t; idmef_path_get () idmef_path_getint idmef_path_get (const idmef_path_t *path, idmef_message_t *message, idmef_value_t **ret); This function retrieves the value for path within message, and stores it into the provided ret address of type idmef_value_t. path : Pointer to a idmef_path_t object. message : Pointer to a idmef_message_t object. ret : Address where to store the retrieved idmef_value_t. Returns : The number of element retrieved, or a negative value if an error occured. idmef_path_set () idmef_path_setint idmef_path_set (const idmef_path_t *path, idmef_message_t *message, idmef_value_t *value); This function sets the provided value for path within message. path : Pointer to a idmef_path_t object. message : Pointer to a idmef_message_t object. value : Pointer to a idmef_value_t object. Returns : 0 on success, a negative value if an error occured. idmef_path_new () idmef_path_newint idmef_path_new (idmef_path_t **path, const char *format, ...); Creates an idmef_path_t object pointing to the provided format string format and @..., and stores it within path. path : Address where to store the created idmef_path_t object. format : Format string. ... : Arguments list. Returns : 0 on success, or a negative value if an error occured. idmef_path_new_v () idmef_path_new_vint idmef_path_new_v (idmef_path_t **path, const char *format, va_list args); Creates an idmef_path_t object pointing to the provided format string format and args, and stores it within path. path : Address where to store the created idmef_path_t object. format : Format string. args : Pointer to a variable argument list. Returns : 0 on success, or a negative value if an error occured. idmef_path_new_fast () idmef_path_new_fastint idmef_path_new_fast (idmef_path_t **path, const char *buffer); Creates a idmef_path_t object pointing to buffer, and stores it within path. path : Address where to store the created idmef_path_t object. buffer : Name of the path to create. Returns : 0 on success, or a negative value if an error occured. idmef_path_get_class () idmef_path_get_classidmef_class_id_t idmef_path_get_class (const idmef_path_t *path, int depth); Retrieves the idmef_class_id_t value for the element of path located at depth. If depth is -1, the last element depth is addressed. path : Pointer to an idmef_path_t object. depth : Depth of path to retrieve the idmef_class_id_t from. Returns : The idmef_class_id_t for the elemnt, or a negative value if an error occured. idmef_path_get_value_type () idmef_path_get_value_typeidmef_value_type_id_t idmef_path_get_value_type (const idmef_path_t *path, int depth); Retrieves the idmef_value_type_id_t identifying the type of value acceptable for this path element, for the path element located at depth. If depth is -1, the last element depth is addressed. path : Pointer to an idmef_path_t object. depth : Depth of path to retrieve the idmef_value_type_id_t from. Returns : The idmef_value_type_id_t for the element, or a negative value if an error occured. idmef_path_set_index () idmef_path_set_indexint idmef_path_set_index (idmef_path_t *path, unsigned int depth, int index); Modifies index for the element located at depth of provided path. This function is only applicable for element that accept listed value. path : Pointer to an idmef_path_t object. depth : Depth of path to set index for. index : Index for the provided element depth. Returns : 0 on success, a negative value if an error occured. idmef_path_undefine_index () idmef_path_undefine_indexint idmef_path_undefine_index (idmef_path_t *path, unsigned int depth); Modifies the element located at depth of provided path so that it's index is undefined. This function is only applicable for element that accept listed value. path : Pointer to an idmef_path_t object. depth : Depth of path to undefine the index for. Returns : 0 on success, a negative value if an error occured. idmef_path_get_index () idmef_path_get_indexint idmef_path_get_index (const idmef_path_t *path, unsigned int depth); Gets the current index for element located at depth of path. This function is only applicable for element that accepts listed value. path : Pointer to an idmef_path_t object. depth : Depth of path to retrieve the index from. Returns : The element index, or a negative value if an error occured. idmef_path_make_child () idmef_path_make_childint idmef_path_make_child (idmef_path_t *path, const char *child_name, int index); Modifies path so that it points to the child node identified by child_name, children of the current path. That is if the path is currently pointing to alert.classification, and child_name is set to "text", path will be modified to point to alert.classification.text. path : Pointer to an idmef_path_t object. child_name : Name of the child element to create. index : Index for child_name, if applicable. Returns : 0 on success, or a negative value if an error occured. idmef_path_make_parent () idmef_path_make_parentint idmef_path_make_parent (idmef_path_t *path); Removes the last element of the path. That is, if path is currently pointing to alert.classification, path will be modified to point to alert. path : Pointer to an idmef_path_t object. Returns : 0 on success, or a negative value if an error occured. idmef_path_destroy () idmef_path_destroyvoid idmef_path_destroy (idmef_path_t *path); Destroys the provided path object. path : Pointer to an idmef_path_t object. idmef_path_ncompare () idmef_path_ncompareint idmef_path_ncompare (const idmef_path_t *p1, const idmef_path_t *p2, unsigned int depth); Compares p1 and p2 elements up to depth. p1 : Pointer to an idmef_path_t object. p2 : Pointer to another idmef_path_t object. depth : Maximum depth to use for path comparison. Returns : 0 if both element match, a negative value otherwise. idmef_path_compare () idmef_path_compareint idmef_path_compare (const idmef_path_t *p1, const idmef_path_t *p2); Compares p1 and p2 elements. p1 : Pointer to an idmef_path_t object. p2 : Pointer to another idmef_path_t object. Returns : 0 if both element match, a negative value otherwise. idmef_path_clone () idmef_path_cloneint idmef_path_clone (const idmef_path_t *src, idmef_path_t **dst); Clones src and stores the result in the provided dst address. src : Pointer to an idmef_path_t object. dst : Address where to store the copy of src. Returns : 0 on success, a negative value otherwise. idmef_path_ref () idmef_path_refidmef_path_t * idmef_path_ref (idmef_path_t *path); Increases path reference count. idmef_path_destroy() will destroy the refcount until it reaches 0, at which point the path will be destroyed. path : Pointer to an idmef_path_t object. Returns : The provided path is returned. idmef_path_get_name () idmef_path_get_nameconst char * idmef_path_get_name (const idmef_path_t *path, int depth); Returns the full path name if the provided depth is -1, or the specific element name if depth is set. That is, for a path pointing to "alert.classification.text": A depth of -1 would return "alert.classification.text"; a depth of 0 would return "alert"; a depth of 1 would return "classification"; and a depth of 2 would return "text". path : Pointer to an idmef_path_t object. depth : Depth of the path element to get the name from. Returns : path name relative to the provided dept. idmef_path_is_ambiguous () idmef_path_is_ambiguousprelude_bool_t idmef_path_is_ambiguous (const idmef_path_t *path); Returns TRUE if path contain elements that are supposed to be listed, but for which no index were provided. path : Pointer to an idmef_path_t object. Returns : TRUE if the object is ambiguous, FALSE otherwise. idmef_path_has_lists () idmef_path_has_listsint idmef_path_has_lists (const idmef_path_t *path); path : Pointer to an idmef_path_t object. Returns : the number of listed element within path. idmef_path_is_list () idmef_path_is_listprelude_bool_t idmef_path_is_list (const idmef_path_t *path, int depth); path : depth : Returns : idmef_path_get_depth () idmef_path_get_depthunsigned int idmef_path_get_depth (const idmef_path_t *path); path : Pointer to an idmef_path_t object. Returns : depth number of elements. idmef_path_check_operator () idmef_path_check_operatorint idmef_path_check_operator (const idmef_path_t *path, idmef_criterion_operator_t op); Check whether op can apply to value pointed to by path. path : Pointer to a idmef_path_t object. op : Operator to check compatibility with. Returns : 0 on success, a negative value if an error occured. idmef_path_get_applicable_operators () idmef_path_get_applicable_operatorsint idmef_path_get_applicable_operators (const idmef_path_t *path, idmef_criterion_operator_t *result); Retrieve all applicable operator that might be used by the type of value pointed to by path. path : Pointer to a idmef_path_t object. result : Pointer to storage for applicable operator. Returns : 0 on success, a negative value if an error occured. See Also idmef_value_t for setting idmef_path_t value. libprelude-1.0.0/docs/api/xml/idmef-time.xml0000664000076400007640000011450411347714755015660 00000000000000 idmef-time 3 LIBPRELUDE Library idmef-time Time representation in IDMEF message Synopsis typedef idmef_time_t; idmef_time_t * idmef_time_ref (idmef_time_t *time); int idmef_time_new (idmef_time_t **time); int idmef_time_new_from_time (idmef_time_t **time, const time_t *t); int idmef_time_new_from_gettimeofday (idmef_time_t **time); int idmef_time_new_from_string (idmef_time_t **time, const char *buf); int idmef_time_new_from_ntpstamp (idmef_time_t **time, const char *buf); int idmef_time_new_from_timeval (idmef_time_t **time, const struct timeval *tv); void idmef_time_set_from_time (idmef_time_t *time, const time_t *t); int idmef_time_set_from_gettimeofday (idmef_time_t *time); int idmef_time_set_from_string (idmef_time_t *time, const char *buf); int idmef_time_set_from_ntpstamp (idmef_time_t *time, const char *buf); int idmef_time_set_from_timeval (idmef_time_t *time, const struct timeval *tv); void idmef_time_destroy_internal (idmef_time_t *time); void idmef_time_destroy (idmef_time_t *time); int idmef_time_clone (const idmef_time_t *src, idmef_time_t **dst); int idmef_time_copy (const idmef_time_t *src, idmef_time_t *dst); void idmef_time_set_sec (idmef_time_t *time, uint32_t sec); void idmef_time_set_usec (idmef_time_t *time, uint32_t usec); void idmef_time_set_gmt_offset (idmef_time_t *time, int32_t gmtoff); uint32_t idmef_time_get_sec (const idmef_time_t *time); uint32_t idmef_time_get_usec (const idmef_time_t *time); int32_t idmef_time_get_gmt_offset (const idmef_time_t *time); int idmef_time_to_string (const idmef_time_t *time, prelude_string_t *out); int idmef_time_to_ntpstamp (const idmef_time_t *time, prelude_string_t *out); Description The idmef_time_t type is used in order to represent a time value in an IDMEF message. This object contain information such as the number of seconds since the Epoch, the local GMT offset, the number of micro second (if applicable). When creating an IDMEF message, you need to insert a timestamp in it. IDMEF provide differents time field to be used for this: AnalyzerTimeThe AnalyzerTime class is used to indicate the current date and time on the analyzer. Its values should be filled in as late as possible in the message transmission process, ideally immediately before placing the message "on the wire." CreateTimeThe CreateTime class is used to indicate the date and time the alert or heartbeat was created by the analyzer. DetectTimeThe DetectTime class is used to indicate the date and time the event(s) producing an alert was detected by the analyzer. In the case of more than one event, the time the first event was detected. (This may or may not be the same time as CreateTime; analyzers are not required to send alerts immediately upon detection). You don't need to take care of the AnalyzerTime field, since in Prelude, once an events is handed to the library, and if the sending of the message fail, there will be a fallback to backuping the event for later retransmission. Thus the library has to take care of setting the AnalyzerTime for you (since the message might not be emited immediatly in this specific case. Several helper are available in order to create idmef_time_t object. Most probably, the function that you will need are the one bellow: idmef_time_new_from_gettimeofday() and idmef_time_set_from_gettimeofday() idmef_time_new_from_timeval() and idmef_time_set_from_timeval() idmef_time_new_from_time() and idmef_time_set_from_time() idmef_time_new_from_string() and idmef_time_set_from_string() Details idmef_time_t idmef_time_ttypedef struct idmef_time idmef_time_t; idmef_time_ref () idmef_time_refidmef_time_t * idmef_time_ref (idmef_time_t *time); Increases time reference count. idmef_time_destroy() won't destroy time until the refcount reach 0. time : Pointer to an idmef_time_t object. Returns : The time provided argument. idmef_time_new () idmef_time_newint idmef_time_new (idmef_time_t **time); Creates an empty idmef_time_t object and store it in time. time : Address where to store the created idmef_time_t object. Returns : 0 on success, a negative value if an error occured. idmef_time_new_from_time () idmef_time_new_from_timeint idmef_time_new_from_time (idmef_time_t **time, const time_t *t); Creates a new idmef_time_t object and store it in time. This object will be filled with information available in t. The created time won't contain micro seconds information, since theses are not available within t. time : Address where to store the created idmef_time_t object. t : Pointer to a time_t. Returns : 0 on success, a negative value if an error occured. idmef_time_new_from_gettimeofday () idmef_time_new_from_gettimeofdayint idmef_time_new_from_gettimeofday (idmef_time_t **time); Creates an idmef_time_t object filled with information retrieved using gettimeofday(), and stores it in time. time : Address where to store the created idmef_time_t object. Returns : 0 on success, a negative value if an error occured. idmef_time_new_from_string () idmef_time_new_from_stringint idmef_time_new_from_string (idmef_time_t **time, const char *buf); Creates an idmef_time_t object filled with information retrieved from the user provided buf, containing a string describing a time in a format conforming to the IDMEF definition (v. 0.10, section 3.2.6). Additionally, the provided time might be separated with white spaces, instead of the IDMEF define 'T' character. The format might not specify a timezone (will assume UTC in this case). The resulting idmef_time_t object is stored in time. time : Address where to store the created idmef_time_t object. buf : Pointer to a string describing a time in an IDMEF conforming format. Returns : 0 on success, a negative value if an error occured. idmef_time_new_from_ntpstamp () idmef_time_new_from_ntpstampint idmef_time_new_from_ntpstamp (idmef_time_t **time, const char *buf); Creates an idmef_time_t object filled with information provided from the buf NTP timestamp, and stores it in time. time : Address where to store the created idmef_time_t object. buf : Pointer to a string containing an NTP timestamp. Returns : 0 on success, a negative value if an error occured. idmef_time_new_from_timeval () idmef_time_new_from_timevalint idmef_time_new_from_timeval (idmef_time_t **time, const struct timeval *tv); Creates an idmef_time_t object filled with information provided within the tv structure. time : Address where to store the created idmef_time_t object. tv : Pointer to a struct timeval (see gettimeofday()). Returns : 0 on success, a negative value if an error occured. idmef_time_set_from_time () idmef_time_set_from_timevoid idmef_time_set_from_time (idmef_time_t *time, const time_t *t); Fills time from the information described by t. time won't contain micro seconds information, since theses are not available within t. time : Pointer to an idmef_time_t object. t : Pointer to a time_t. idmef_time_set_from_gettimeofday () idmef_time_set_from_gettimeofdayint idmef_time_set_from_gettimeofday (idmef_time_t *time); Fills time with information retrieved using gettimeofday(). time : Pointer to an idmef_time_t object. Returns : 0 on success, a negative value if an error occured. idmef_time_set_from_string () idmef_time_set_from_stringint idmef_time_set_from_string (idmef_time_t *time, const char *buf); Fills time object with information retrieved from the user provided buf, containing a string describing a time in a format conforming to the IDMEF definition (v. 0.10, section 3.2.6). Additionally, the provided time might be separated with white spaces, instead of the IDMEF defined 'T' character. If there is no UTC offset specified, we assume that the provided time is local, and compute the GMT offset by ourselve. time : Pointer to an idmef_time_t object. buf : Pointer to a string describing a time in an IDMEF conforming format. Returns : 0 on success, a negative value if an error occured. idmef_time_set_from_ntpstamp () idmef_time_set_from_ntpstampint idmef_time_set_from_ntpstamp (idmef_time_t *time, const char *buf); Fills the time object with information provided within the buf NTP timestamp. time : Pointer to a idmef_time_t object. buf : Pointer to a string containing an NTP timestamp. Returns : 0 on success, a negative value if an error occured. idmef_time_set_from_timeval () idmef_time_set_from_timevalint idmef_time_set_from_timeval (idmef_time_t *time, const struct timeval *tv); Fills time object filled with information provided within the tv structure. time : Pointer to an idmef_time_t object. tv : Pointer to a struct timeval (see gettimeofday()). Returns : 0 on success, a negative value if an error occured. idmef_time_destroy_internal () idmef_time_destroy_internalvoid idmef_time_destroy_internal (idmef_time_t *time); time : idmef_time_destroy () idmef_time_destroyvoid idmef_time_destroy (idmef_time_t *time); Destroys time if refcount reach 0. time : Pointer to an idmef_time_t object. idmef_time_clone () idmef_time_cloneint idmef_time_clone (const idmef_time_t *src, idmef_time_t **dst); Clones src and stores the result in the dst address. src : Pointer to a idmef_time_t to clone. dst : Address where to store the cloned src object. Returns : 0 on success, a negative value if an error occured. idmef_time_copy () idmef_time_copyint idmef_time_copy (const idmef_time_t *src, idmef_time_t *dst); Copies src internal to dst. src : Pointer to a idmef_time_t to copy data from. dst : Pointer to a idmef_time_t to copy data to. Returns : 0 on success, a negative value if an error occured. idmef_time_set_sec () idmef_time_set_secvoid idmef_time_set_sec (idmef_time_t *time, uint32_t sec); Sets the number of second from the Epoch to sec within time. WARNING: this is just an accessor function, and using it to set time current time also requires the use of idmef_time_set_usec() and idmef_time_set_gmt_offset(). time : Pointer to a idmef_time_t. sec : Number of seconds since the Epoch. idmef_time_set_usec () idmef_time_set_usecvoid idmef_time_set_usec (idmef_time_t *time, uint32_t usec); Sets the number of micro second to usec within time. WARNING: this is just an accessor function, and using it to set time current time also requires the use of idmef_time_set_sec() and idmef_time_set_gmt_offset(). time : Pointer to a idmef_time_t. usec : Number of micro seconds to set within time. idmef_time_set_gmt_offset () idmef_time_set_gmt_offsetvoid idmef_time_set_gmt_offset (idmef_time_t *time, int32_t gmtoff); Sets the GMT offset gmtoff, in seconds, within time. WARNING: this is just an accessor function, and using it to set time current time also requires the use of idmef_time_set_sec() and idmef_time_set_usec(). time : Pointer to a idmef_time_t. gmtoff : GMT offset for time, in seconds. idmef_time_get_sec () idmef_time_get_secuint32_t idmef_time_get_sec (const idmef_time_t *time); Returns the number of second since the Epoch (00:00:00 UTC, January 1, 1970), previously set within time. time : Pointer to a idmef_time_t. Returns : The number of seconds. idmef_time_get_usec () idmef_time_get_usecuint32_t idmef_time_get_usec (const idmef_time_t *time); Returns the u-second member of time. time : Pointer to a idmef_time_t. Returns : The number of u-seconds. idmef_time_get_gmt_offset () idmef_time_get_gmt_offsetint32_t idmef_time_get_gmt_offset (const idmef_time_t *time); Returns the GMT offset that applies to time. time : Pointer to a idmef_time_t. Returns : The GMT offset, in seconds. idmef_time_to_string () idmef_time_to_stringint idmef_time_to_string (const idmef_time_t *time, prelude_string_t *out); Translates time to an user readable string conforming to the IDMEF defined time format. time : Pointer to an IDMEF time structure. out : Pointer to a prelude_string_t output buffer. Returns : number of bytes written on success, a negative value if an error occured. idmef_time_to_ntpstamp () idmef_time_to_ntpstampint idmef_time_to_ntpstamp (const idmef_time_t *time, prelude_string_t *out); Translates time to an user readable NTP timestamp string, conforming to the IDMEF defined time format. time : Pointer to an IDMEF time structure. out : Pointer to a prelude_string_t output buffer. Returns : number of bytes written on success, a negative value if an error occured. libprelude-1.0.0/docs/api/xml/prelude-linked-object.xml0000664000076400007640000000474211347714756020013 00000000000000 prelude-linked-object 3 LIBPRELUDE Library prelude-linked-object Synopsis #define PRELUDE_LINKED_OBJECT prelude_linked_object_t; #define prelude_linked_object_get_object (object) Description Details PRELUDE_LINKED_OBJECT PRELUDE_LINKED_OBJECT#define PRELUDE_LINKED_OBJECT prelude_linked_object_t prelude_linked_object_ttypedef struct { PRELUDE_LINKED_OBJECT; } prelude_linked_object_t; prelude_linked_object_get_object() prelude_linked_object_get_object#define prelude_linked_object_get_object(object) object : libprelude-1.0.0/docs/api/xml/idmef-message-print.xml0000664000076400007640000013041511347714755017477 00000000000000 idmef-message-print 3 LIBPRELUDE Library idmef-message-print Dumping an IDMEF message as a string Synopsis void idmef_additional_data_print (idmef_additional_data_t *ptr, prelude_io_t *fd); void idmef_reference_print (idmef_reference_t *ptr, prelude_io_t *fd); void idmef_classification_print (idmef_classification_t *ptr, prelude_io_t *fd); void idmef_user_id_print (idmef_user_id_t *ptr, prelude_io_t *fd); void idmef_user_print (idmef_user_t *ptr, prelude_io_t *fd); void idmef_address_print (idmef_address_t *ptr, prelude_io_t *fd); void idmef_process_print (idmef_process_t *ptr, prelude_io_t *fd); void idmef_web_service_print (idmef_web_service_t *ptr, prelude_io_t *fd); void idmef_snmp_service_print (idmef_snmp_service_t *ptr, prelude_io_t *fd); void idmef_service_print (idmef_service_t *ptr, prelude_io_t *fd); void idmef_node_print (idmef_node_t *ptr, prelude_io_t *fd); void idmef_source_print (idmef_source_t *ptr, prelude_io_t *fd); void idmef_file_access_print (idmef_file_access_t *ptr, prelude_io_t *fd); void idmef_inode_print (idmef_inode_t *ptr, prelude_io_t *fd); void idmef_checksum_print (idmef_checksum_t *ptr, prelude_io_t *fd); void idmef_file_print (idmef_file_t *ptr, prelude_io_t *fd); void idmef_linkage_print (idmef_linkage_t *ptr, prelude_io_t *fd); void idmef_target_print (idmef_target_t *ptr, prelude_io_t *fd); void idmef_analyzer_print (idmef_analyzer_t *ptr, prelude_io_t *fd); void idmef_alertident_print (idmef_alertident_t *ptr, prelude_io_t *fd); void idmef_impact_print (idmef_impact_t *ptr, prelude_io_t *fd); void idmef_action_print (idmef_action_t *ptr, prelude_io_t *fd); void idmef_confidence_print (idmef_confidence_t *ptr, prelude_io_t *fd); void idmef_assessment_print (idmef_assessment_t *ptr, prelude_io_t *fd); void idmef_tool_alert_print (idmef_tool_alert_t *ptr, prelude_io_t *fd); void idmef_correlation_alert_print (idmef_correlation_alert_t *ptr, prelude_io_t *fd); void idmef_overflow_alert_print (idmef_overflow_alert_t *ptr, prelude_io_t *fd); void idmef_alert_print (idmef_alert_t *ptr, prelude_io_t *fd); void idmef_heartbeat_print (idmef_heartbeat_t *ptr, prelude_io_t *fd); void idmef_message_print (idmef_message_t *ptr, prelude_io_t *fd); Description This API provide method for dumping any IDMEF object as a string of characters. When dumping an object, the object and all of it's children are dumped to the provided prelude_io_t object. The prelude_io_t object might be a buffer, a file, or even a socket. Check the prelude_io_t API for more information. Details idmef_additional_data_print () idmef_additional_data_printvoid idmef_additional_data_print (idmef_additional_data_t *ptr, prelude_io_t *fd); This function will convert ptr to a string suitable for writing, and write it to the provided fd descriptor. ptr : Pointer to an idmef_additional_data_t object. fd : Pointer to a prelude_io_t object where to print ptr to. idmef_reference_print () idmef_reference_printvoid idmef_reference_print (idmef_reference_t *ptr, prelude_io_t *fd); This function will convert ptr to a string suitable for writing, and write it to the provided fd descriptor. ptr : Pointer to an idmef_reference_t object. fd : Pointer to a prelude_io_t object where to print ptr to. idmef_classification_print () idmef_classification_printvoid idmef_classification_print (idmef_classification_t *ptr, prelude_io_t *fd); This function will convert ptr to a string suitable for writing, and write it to the provided fd descriptor. ptr : Pointer to an idmef_classification_t object. fd : Pointer to a prelude_io_t object where to print ptr to. idmef_user_id_print () idmef_user_id_printvoid idmef_user_id_print (idmef_user_id_t *ptr, prelude_io_t *fd); This function will convert ptr to a string suitable for writing, and write it to the provided fd descriptor. ptr : Pointer to an idmef_user_id_t object. fd : Pointer to a prelude_io_t object where to print ptr to. idmef_user_print () idmef_user_printvoid idmef_user_print (idmef_user_t *ptr, prelude_io_t *fd); This function will convert ptr to a string suitable for writing, and write it to the provided fd descriptor. ptr : Pointer to an idmef_user_t object. fd : Pointer to a prelude_io_t object where to print ptr to. idmef_address_print () idmef_address_printvoid idmef_address_print (idmef_address_t *ptr, prelude_io_t *fd); This function will convert ptr to a string suitable for writing, and write it to the provided fd descriptor. ptr : Pointer to an idmef_address_t object. fd : Pointer to a prelude_io_t object where to print ptr to. idmef_process_print () idmef_process_printvoid idmef_process_print (idmef_process_t *ptr, prelude_io_t *fd); This function will convert ptr to a string suitable for writing, and write it to the provided fd descriptor. ptr : Pointer to an idmef_process_t object. fd : Pointer to a prelude_io_t object where to print ptr to. idmef_web_service_print () idmef_web_service_printvoid idmef_web_service_print (idmef_web_service_t *ptr, prelude_io_t *fd); This function will convert ptr to a string suitable for writing, and write it to the provided fd descriptor. ptr : Pointer to an idmef_web_service_t object. fd : Pointer to a prelude_io_t object where to print ptr to. idmef_snmp_service_print () idmef_snmp_service_printvoid idmef_snmp_service_print (idmef_snmp_service_t *ptr, prelude_io_t *fd); This function will convert ptr to a string suitable for writing, and write it to the provided fd descriptor. ptr : Pointer to an idmef_snmp_service_t object. fd : Pointer to a prelude_io_t object where to print ptr to. idmef_service_print () idmef_service_printvoid idmef_service_print (idmef_service_t *ptr, prelude_io_t *fd); This function will convert ptr to a string suitable for writing, and write it to the provided fd descriptor. ptr : Pointer to an idmef_service_t object. fd : Pointer to a prelude_io_t object where to print ptr to. idmef_node_print () idmef_node_printvoid idmef_node_print (idmef_node_t *ptr, prelude_io_t *fd); This function will convert ptr to a string suitable for writing, and write it to the provided fd descriptor. ptr : Pointer to an idmef_node_t object. fd : Pointer to a prelude_io_t object where to print ptr to. idmef_source_print () idmef_source_printvoid idmef_source_print (idmef_source_t *ptr, prelude_io_t *fd); This function will convert ptr to a string suitable for writing, and write it to the provided fd descriptor. ptr : Pointer to an idmef_source_t object. fd : Pointer to a prelude_io_t object where to print ptr to. idmef_file_access_print () idmef_file_access_printvoid idmef_file_access_print (idmef_file_access_t *ptr, prelude_io_t *fd); This function will convert ptr to a string suitable for writing, and write it to the provided fd descriptor. ptr : Pointer to an idmef_file_access_t object. fd : Pointer to a prelude_io_t object where to print ptr to. idmef_inode_print () idmef_inode_printvoid idmef_inode_print (idmef_inode_t *ptr, prelude_io_t *fd); This function will convert ptr to a string suitable for writing, and write it to the provided fd descriptor. ptr : Pointer to an idmef_inode_t object. fd : Pointer to a prelude_io_t object where to print ptr to. idmef_checksum_print () idmef_checksum_printvoid idmef_checksum_print (idmef_checksum_t *ptr, prelude_io_t *fd); This function will convert ptr to a string suitable for writing, and write it to the provided fd descriptor. ptr : Pointer to an idmef_checksum_t object. fd : Pointer to a prelude_io_t object where to print ptr to. idmef_file_print () idmef_file_printvoid idmef_file_print (idmef_file_t *ptr, prelude_io_t *fd); This function will convert ptr to a string suitable for writing, and write it to the provided fd descriptor. ptr : Pointer to an idmef_file_t object. fd : Pointer to a prelude_io_t object where to print ptr to. idmef_linkage_print () idmef_linkage_printvoid idmef_linkage_print (idmef_linkage_t *ptr, prelude_io_t *fd); This function will convert ptr to a string suitable for writing, and write it to the provided fd descriptor. ptr : Pointer to an idmef_linkage_t object. fd : Pointer to a prelude_io_t object where to print ptr to. idmef_target_print () idmef_target_printvoid idmef_target_print (idmef_target_t *ptr, prelude_io_t *fd); This function will convert ptr to a string suitable for writing, and write it to the provided fd descriptor. ptr : Pointer to an idmef_target_t object. fd : Pointer to a prelude_io_t object where to print ptr to. idmef_analyzer_print () idmef_analyzer_printvoid idmef_analyzer_print (idmef_analyzer_t *ptr, prelude_io_t *fd); This function will convert ptr to a string suitable for writing, and write it to the provided fd descriptor. ptr : Pointer to an idmef_analyzer_t object. fd : Pointer to a prelude_io_t object where to print ptr to. idmef_alertident_print () idmef_alertident_printvoid idmef_alertident_print (idmef_alertident_t *ptr, prelude_io_t *fd); This function will convert ptr to a string suitable for writing, and write it to the provided fd descriptor. ptr : Pointer to an idmef_alertident_t object. fd : Pointer to a prelude_io_t object where to print ptr to. idmef_impact_print () idmef_impact_printvoid idmef_impact_print (idmef_impact_t *ptr, prelude_io_t *fd); This function will convert ptr to a string suitable for writing, and write it to the provided fd descriptor. ptr : Pointer to an idmef_impact_t object. fd : Pointer to a prelude_io_t object where to print ptr to. idmef_action_print () idmef_action_printvoid idmef_action_print (idmef_action_t *ptr, prelude_io_t *fd); This function will convert ptr to a string suitable for writing, and write it to the provided fd descriptor. ptr : Pointer to an idmef_action_t object. fd : Pointer to a prelude_io_t object where to print ptr to. idmef_confidence_print () idmef_confidence_printvoid idmef_confidence_print (idmef_confidence_t *ptr, prelude_io_t *fd); This function will convert ptr to a string suitable for writing, and write it to the provided fd descriptor. ptr : Pointer to an idmef_confidence_t object. fd : Pointer to a prelude_io_t object where to print ptr to. idmef_assessment_print () idmef_assessment_printvoid idmef_assessment_print (idmef_assessment_t *ptr, prelude_io_t *fd); This function will convert ptr to a string suitable for writing, and write it to the provided fd descriptor. ptr : Pointer to an idmef_assessment_t object. fd : Pointer to a prelude_io_t object where to print ptr to. idmef_tool_alert_print () idmef_tool_alert_printvoid idmef_tool_alert_print (idmef_tool_alert_t *ptr, prelude_io_t *fd); This function will convert ptr to a string suitable for writing, and write it to the provided fd descriptor. ptr : Pointer to an idmef_tool_alert_t object. fd : Pointer to a prelude_io_t object where to print ptr to. idmef_correlation_alert_print () idmef_correlation_alert_printvoid idmef_correlation_alert_print (idmef_correlation_alert_t *ptr, prelude_io_t *fd); This function will convert ptr to a string suitable for writing, and write it to the provided fd descriptor. ptr : Pointer to an idmef_correlation_alert_t object. fd : Pointer to a prelude_io_t object where to print ptr to. idmef_overflow_alert_print () idmef_overflow_alert_printvoid idmef_overflow_alert_print (idmef_overflow_alert_t *ptr, prelude_io_t *fd); This function will convert ptr to a string suitable for writing, and write it to the provided fd descriptor. ptr : Pointer to an idmef_overflow_alert_t object. fd : Pointer to a prelude_io_t object where to print ptr to. idmef_alert_print () idmef_alert_printvoid idmef_alert_print (idmef_alert_t *ptr, prelude_io_t *fd); This function will convert ptr to a string suitable for writing, and write it to the provided fd descriptor. ptr : Pointer to an idmef_alert_t object. fd : Pointer to a prelude_io_t object where to print ptr to. idmef_heartbeat_print () idmef_heartbeat_printvoid idmef_heartbeat_print (idmef_heartbeat_t *ptr, prelude_io_t *fd); This function will convert ptr to a string suitable for writing, and write it to the provided fd descriptor. ptr : Pointer to an idmef_heartbeat_t object. fd : Pointer to a prelude_io_t object where to print ptr to. idmef_message_print () idmef_message_printvoid idmef_message_print (idmef_message_t *ptr, prelude_io_t *fd); This function will convert ptr to a string suitable for writing, and write it to the provided fd descriptor. ptr : Pointer to an idmef_message_t object. fd : Pointer to a prelude_io_t object where to print ptr to. See Also prelude_io_t libprelude-1.0.0/docs/api/xml/idmef-data.xml0000664000076400007640000021626311347714755015640 00000000000000 idmef-data 3 LIBPRELUDE Library idmef-data Synopsis enum idmef_data_type_t; data; int idmef_data_new (idmef_data_t **data); idmef_data_t * idmef_data_ref (idmef_data_t *data); int idmef_data_new_char (idmef_data_t **data, char c); int idmef_data_new_byte (idmef_data_t **data, uint8_t i); int idmef_data_new_uint32 (idmef_data_t **data, uint32_t i); int idmef_data_new_uint64 (idmef_data_t **data, uint64_t i); int idmef_data_new_float (idmef_data_t **data, float f); void idmef_data_set_char (idmef_data_t *data, char c); void idmef_data_set_byte (idmef_data_t *data, uint8_t i); void idmef_data_set_uint32 (idmef_data_t *data, uint32_t i); void idmef_data_set_uint64 (idmef_data_t *data, uint64_t i); void idmef_data_set_float (idmef_data_t *data, float f); int idmef_data_set_ptr_dup_fast (idmef_data_t *data, idmef_data_type_t type, const void *ptr, size_t len); int idmef_data_set_ptr_ref_fast (idmef_data_t *data, idmef_data_type_t type, const void *ptr, size_t len); int idmef_data_set_ptr_nodup_fast (idmef_data_t *data, idmef_data_type_t type, void *ptr, size_t len); int idmef_data_new_ptr_dup_fast (idmef_data_t **data, idmef_data_type_t type, const void *ptr, size_t len); int idmef_data_new_ptr_ref_fast (idmef_data_t **data, idmef_data_type_t type, const void *ptr, size_t len); int idmef_data_new_ptr_nodup_fast (idmef_data_t **data, idmef_data_type_t type, void *ptr, size_t len); int idmef_data_set_char_string_dup_fast (idmef_data_t *data, const char *str, size_t len); int idmef_data_new_char_string_dup_fast (idmef_data_t **data, const char *str, size_t len); int idmef_data_new_char_string_ref_fast (idmef_data_t **data, const char *ptr, size_t len); int idmef_data_new_char_string_nodup_fast (idmef_data_t **data, char *ptr, size_t len); int idmef_data_set_char_string_ref_fast (idmef_data_t *data, const char *ptr, size_t len); int idmef_data_set_char_string_nodup_fast (idmef_data_t *data, char *ptr, size_t len); int idmef_data_new_char_string_ref (idmef_data_t **data, const char *ptr); int idmef_data_new_char_string_dup (idmef_data_t **data, const char *ptr); int idmef_data_new_char_string_nodup (idmef_data_t **data, char *ptr); int idmef_data_set_char_string_ref (idmef_data_t *data, const char *ptr); int idmef_data_set_char_string_dup (idmef_data_t *data, const char *ptr); int idmef_data_set_char_string_nodup (idmef_data_t *data, char *ptr); #define idmef_data_set_char_string_constant (string, str) int idmef_data_new_byte_string_ref (idmef_data_t **data, unsigned char *ptr, size_t len); int idmef_data_new_byte_string_dup (idmef_data_t **data, unsigned char *ptr, size_t len); int idmef_data_new_byte_string_nodup (idmef_data_t **data, unsigned char *ptr, size_t len); int idmef_data_set_byte_string_ref (idmef_data_t *data, unsigned char *ptr, size_t len); int idmef_data_set_byte_string_dup (idmef_data_t *data, unsigned char *ptr, size_t len); int idmef_data_set_byte_string_nodup (idmef_data_t *data, unsigned char *ptr, size_t len); void idmef_data_destroy (idmef_data_t *data); int idmef_data_copy_ref (const idmef_data_t *src, idmef_data_t *dst); int idmef_data_copy_dup (const idmef_data_t *src, idmef_data_t *dst); int idmef_data_clone (const idmef_data_t *src, idmef_data_t **dst); idmef_data_type_t idmef_data_get_type (const idmef_data_t *data); size_t idmef_data_get_len (const idmef_data_t *data); const void * idmef_data_get_data (const idmef_data_t *data); char idmef_data_get_char (const idmef_data_t *data); uint8_t idmef_data_get_byte (const idmef_data_t *data); uint32_t idmef_data_get_uint32 (const idmef_data_t *data); uint64_t idmef_data_get_uint64 (const idmef_data_t *data); float idmef_data_get_float (const idmef_data_t *data); const char * idmef_data_get_char_string (const idmef_data_t *data); const unsigned char * idmef_data_get_byte_string (const idmef_data_t *data); prelude_bool_t idmef_data_is_empty (const idmef_data_t *data); int idmef_data_to_string (const idmef_data_t *data, prelude_string_t *out); void idmef_data_destroy_internal (idmef_data_t *data); Description Details enum idmef_data_type_t idmef_data_type_ttypedef enum { IDMEF_DATA_TYPE_UNKNOWN = 0, IDMEF_DATA_TYPE_CHAR = 1, IDMEF_DATA_TYPE_BYTE = 2, IDMEF_DATA_TYPE_UINT32 = 3, IDMEF_DATA_TYPE_UINT64 = 4, IDMEF_DATA_TYPE_FLOAT = 5, IDMEF_DATA_TYPE_CHAR_STRING = 6, IDMEF_DATA_TYPE_BYTE_STRING = 7 } idmef_data_type_t; data datatypedef struct { int refcount; int flags; idmef_data_type_t type; size_t len; union { char char_data; uint8_t byte_data; uint32_t uint32_data; uint64_t uint64_data; float float_data; void *rw_data; const void *ro_data; } data; idmef_data_new () idmef_data_newint idmef_data_new (idmef_data_t **data); data : Returns : idmef_data_ref () idmef_data_refidmef_data_t * idmef_data_ref (idmef_data_t *data); data : Returns : idmef_data_new_char () idmef_data_new_charint idmef_data_new_char (idmef_data_t **data, char c); data : c : Returns : idmef_data_new_byte () idmef_data_new_byteint idmef_data_new_byte (idmef_data_t **data, uint8_t i); data : i : Returns : idmef_data_new_uint32 () idmef_data_new_uint32int idmef_data_new_uint32 (idmef_data_t **data, uint32_t i); data : i : Returns : idmef_data_new_uint64 () idmef_data_new_uint64int idmef_data_new_uint64 (idmef_data_t **data, uint64_t i); data : i : Returns : idmef_data_new_float () idmef_data_new_floatint idmef_data_new_float (idmef_data_t **data, float f); data : f : Returns : idmef_data_set_char () idmef_data_set_charvoid idmef_data_set_char (idmef_data_t *data, char c); data : c : idmef_data_set_byte () idmef_data_set_bytevoid idmef_data_set_byte (idmef_data_t *data, uint8_t i); data : i : idmef_data_set_uint32 () idmef_data_set_uint32void idmef_data_set_uint32 (idmef_data_t *data, uint32_t i); data : i : idmef_data_set_uint64 () idmef_data_set_uint64void idmef_data_set_uint64 (idmef_data_t *data, uint64_t i); data : i : idmef_data_set_float () idmef_data_set_floatvoid idmef_data_set_float (idmef_data_t *data, float f); data : f : idmef_data_set_ptr_dup_fast () idmef_data_set_ptr_dup_fastint idmef_data_set_ptr_dup_fast (idmef_data_t *data, idmef_data_type_t type, const void *ptr, size_t len); data : type : ptr : len : Returns : idmef_data_set_ptr_ref_fast () idmef_data_set_ptr_ref_fastint idmef_data_set_ptr_ref_fast (idmef_data_t *data, idmef_data_type_t type, const void *ptr, size_t len); data : type : ptr : len : Returns : idmef_data_set_ptr_nodup_fast () idmef_data_set_ptr_nodup_fastint idmef_data_set_ptr_nodup_fast (idmef_data_t *data, idmef_data_type_t type, void *ptr, size_t len); data : type : ptr : len : Returns : idmef_data_new_ptr_dup_fast () idmef_data_new_ptr_dup_fastint idmef_data_new_ptr_dup_fast (idmef_data_t **data, idmef_data_type_t type, const void *ptr, size_t len); data : type : ptr : len : Returns : idmef_data_new_ptr_ref_fast () idmef_data_new_ptr_ref_fastint idmef_data_new_ptr_ref_fast (idmef_data_t **data, idmef_data_type_t type, const void *ptr, size_t len); data : type : ptr : len : Returns : idmef_data_new_ptr_nodup_fast () idmef_data_new_ptr_nodup_fastint idmef_data_new_ptr_nodup_fast (idmef_data_t **data, idmef_data_type_t type, void *ptr, size_t len); data : type : ptr : len : Returns : idmef_data_set_char_string_dup_fast () idmef_data_set_char_string_dup_fastint idmef_data_set_char_string_dup_fast (idmef_data_t *data, const char *str, size_t len); data : str : len : Returns : idmef_data_new_char_string_dup_fast () idmef_data_new_char_string_dup_fastint idmef_data_new_char_string_dup_fast (idmef_data_t **data, const char *str, size_t len); data : str : len : Returns : idmef_data_new_char_string_ref_fast () idmef_data_new_char_string_ref_fastint idmef_data_new_char_string_ref_fast (idmef_data_t **data, const char *ptr, size_t len); data : ptr : len : Returns : idmef_data_new_char_string_nodup_fast () idmef_data_new_char_string_nodup_fastint idmef_data_new_char_string_nodup_fast (idmef_data_t **data, char *ptr, size_t len); data : ptr : len : Returns : idmef_data_set_char_string_ref_fast () idmef_data_set_char_string_ref_fastint idmef_data_set_char_string_ref_fast (idmef_data_t *data, const char *ptr, size_t len); data : ptr : len : Returns : idmef_data_set_char_string_nodup_fast () idmef_data_set_char_string_nodup_fastint idmef_data_set_char_string_nodup_fast (idmef_data_t *data, char *ptr, size_t len); data : ptr : len : Returns : idmef_data_new_char_string_ref () idmef_data_new_char_string_refint idmef_data_new_char_string_ref (idmef_data_t **data, const char *ptr); data : ptr : Returns : idmef_data_new_char_string_dup () idmef_data_new_char_string_dupint idmef_data_new_char_string_dup (idmef_data_t **data, const char *ptr); data : ptr : Returns : idmef_data_new_char_string_nodup () idmef_data_new_char_string_nodupint idmef_data_new_char_string_nodup (idmef_data_t **data, char *ptr); data : ptr : Returns : idmef_data_set_char_string_ref () idmef_data_set_char_string_refint idmef_data_set_char_string_ref (idmef_data_t *data, const char *ptr); data : ptr : Returns : idmef_data_set_char_string_dup () idmef_data_set_char_string_dupint idmef_data_set_char_string_dup (idmef_data_t *data, const char *ptr); data : ptr : Returns : idmef_data_set_char_string_nodup () idmef_data_set_char_string_nodupint idmef_data_set_char_string_nodup (idmef_data_t *data, char *ptr); data : ptr : Returns : idmef_data_set_char_string_constant() idmef_data_set_char_string_constant#define idmef_data_set_char_string_constant(string, str) string : str : idmef_data_new_byte_string_ref () idmef_data_new_byte_string_refint idmef_data_new_byte_string_ref (idmef_data_t **data, unsigned char *ptr, size_t len); data : ptr : len : Returns : idmef_data_new_byte_string_dup () idmef_data_new_byte_string_dupint idmef_data_new_byte_string_dup (idmef_data_t **data, unsigned char *ptr, size_t len); data : ptr : len : Returns : idmef_data_new_byte_string_nodup () idmef_data_new_byte_string_nodupint idmef_data_new_byte_string_nodup (idmef_data_t **data, unsigned char *ptr, size_t len); data : ptr : len : Returns : idmef_data_set_byte_string_ref () idmef_data_set_byte_string_refint idmef_data_set_byte_string_ref (idmef_data_t *data, unsigned char *ptr, size_t len); data : ptr : len : Returns : idmef_data_set_byte_string_dup () idmef_data_set_byte_string_dupint idmef_data_set_byte_string_dup (idmef_data_t *data, unsigned char *ptr, size_t len); data : ptr : len : Returns : idmef_data_set_byte_string_nodup () idmef_data_set_byte_string_nodupint idmef_data_set_byte_string_nodup (idmef_data_t *data, unsigned char *ptr, size_t len); data : ptr : len : Returns : idmef_data_destroy () idmef_data_destroyvoid idmef_data_destroy (idmef_data_t *data); Frees data. The buffer pointed by data will be freed if the data object is marked as _dup or _nodup. data : Pointer to an idmef_data_t object. idmef_data_copy_ref () idmef_data_copy_refint idmef_data_copy_ref (const idmef_data_t *src, idmef_data_t *dst); Makes dst reference the same buffer as src. src : Source idmef_data_t object. dst : Destination idmef_data_t object. Returns : 0 on success, a negative value if an error occured. idmef_data_copy_dup () idmef_data_copy_dupint idmef_data_copy_dup (const idmef_data_t *src, idmef_data_t *dst); Copies src to dst, including the associated buffer. This is an alternative to idmef_data_clone(). src : Source idmef_data_t object. dst : Destination idmef_data_t object. Returns : 0 on success, a negative value if an error occured. idmef_data_clone () idmef_data_cloneint idmef_data_clone (const idmef_data_t *src, idmef_data_t **dst); src : dst : Returns : idmef_data_get_type () idmef_data_get_typeidmef_data_type_t idmef_data_get_type (const idmef_data_t *data); data : Pointer to an idmef_data_t object. Returns : the type of the embedded data. idmef_data_get_len () idmef_data_get_lensize_t idmef_data_get_len (const idmef_data_t *data); data : Pointer to an idmef_data_t object. Returns : the length of data contained within data object. idmef_data_get_data () idmef_data_get_dataconst void * idmef_data_get_data (const idmef_data_t *data); data : Pointer to an idmef_data_t object. Returns : the data contained within data object. idmef_data_get_char () idmef_data_get_charchar idmef_data_get_char (const idmef_data_t *data); data : Returns : idmef_data_get_byte () idmef_data_get_byteuint8_t idmef_data_get_byte (const idmef_data_t *data); data : Returns : idmef_data_get_uint32 () idmef_data_get_uint32uint32_t idmef_data_get_uint32 (const idmef_data_t *data); data : Returns : idmef_data_get_uint64 () idmef_data_get_uint64uint64_t idmef_data_get_uint64 (const idmef_data_t *data); data : Returns : idmef_data_get_float () idmef_data_get_floatfloat idmef_data_get_float (const idmef_data_t *data); data : Returns : idmef_data_get_char_string () idmef_data_get_char_stringconst char * idmef_data_get_char_string (const idmef_data_t *data); data : Returns : idmef_data_get_byte_string () idmef_data_get_byte_stringconst unsigned char * idmef_data_get_byte_string (const idmef_data_t *data); data : Returns : idmef_data_is_empty () idmef_data_is_emptyprelude_bool_t idmef_data_is_empty (const idmef_data_t *data); data : Pointer to an idmef_data_t object. Returns : TRUE if empty, FALSE otherwise. idmef_data_to_string () idmef_data_to_stringint idmef_data_to_string (const idmef_data_t *data, prelude_string_t *out); Formats data contained within data to be printable, and stores the result in the provided out buffer. data : Pointer to an idmef_data_t object. out : Pointer to a prelude_string_t to store the formated data into. Returns : 0 on success, a negative value if an error occured. idmef_data_destroy_internal () idmef_data_destroy_internalvoid idmef_data_destroy_internal (idmef_data_t *data); data : libprelude-1.0.0/docs/api/xml/idmef-value.xml0000664000076400007640000025650111347714755016042 00000000000000 idmef-value 3 LIBPRELUDE Library idmef-value Synopsis typedef idmef_value_t; int idmef_value_new_int8 (idmef_value_t **value, int8_t val); int idmef_value_new_uint8 (idmef_value_t **value, uint8_t val); int idmef_value_new_int16 (idmef_value_t **value, int16_t val); int idmef_value_new_uint16 (idmef_value_t **value, uint16_t val); int idmef_value_new_int32 (idmef_value_t **value, int32_t val); int idmef_value_new_uint32 (idmef_value_t **value, uint32_t val); int idmef_value_new_int64 (idmef_value_t **value, int64_t val); int idmef_value_new_uint64 (idmef_value_t **value, uint64_t val); int idmef_value_new_float (idmef_value_t **value, float val); int idmef_value_new_double (idmef_value_t **value, double val); int idmef_value_new_string (idmef_value_t **value, prelude_string_t *string); int idmef_value_new_time (idmef_value_t **value, idmef_time_t *time); int idmef_value_new_data (idmef_value_t **value, idmef_data_t *data); int idmef_value_new_class (idmef_value_t **value, idmef_class_id_t classid, void *ptr); int idmef_value_new_list (idmef_value_t **value); int idmef_value_new_enum (idmef_value_t **value, idmef_class_id_t classid, const char *buf); int idmef_value_new_enum_from_string (idmef_value_t **value, idmef_class_id_t classid, const char *buf); int idmef_value_new_enum_from_numeric (idmef_value_t **value, idmef_class_id_t classid, int val); int idmef_value_new (idmef_value_t **value, idmef_value_type_id_t type, void *ptr); int idmef_value_new_from_path (idmef_value_t **value, idmef_path_t *path, const char *buf); int idmef_value_new_from_string (idmef_value_t **value, idmef_value_type_id_t type, const char *buf); int idmef_value_set_class (idmef_value_t *value, idmef_class_id_t classid, void *ptr); int idmef_value_set_data (idmef_value_t *value, idmef_data_t *data); int idmef_value_set_double (idmef_value_t *value, double val); int idmef_value_set_enum (idmef_value_t *value, idmef_class_id_t classid, const char *buf); int idmef_value_set_enum_from_numeric (idmef_value_t *value, idmef_class_id_t classid, int no); int idmef_value_set_enum_from_string (idmef_value_t *value, idmef_class_id_t classid, const char *buf); int idmef_value_set_float (idmef_value_t *value, float val); int idmef_value_set_int16 (idmef_value_t *value, int16_t val); int idmef_value_set_int32 (idmef_value_t *value, int32_t val); int idmef_value_set_int64 (idmef_value_t *value, int64_t val); int idmef_value_set_int8 (idmef_value_t *value, int8_t val); int idmef_value_set_string (idmef_value_t *value, prelude_string_t *string); int idmef_value_set_time (idmef_value_t *value, idmef_time_t *time); int idmef_value_set_uint16 (idmef_value_t *value, uint16_t val); int idmef_value_set_uint32 (idmef_value_t *value, uint32_t val); int idmef_value_set_uint64 (idmef_value_t *value, uint64_t val); int idmef_value_set_uint8 (idmef_value_t *value, uint8_t val); int8_t idmef_value_get_int8 (const idmef_value_t *val); uint8_t idmef_value_get_uint8 (const idmef_value_t *val); int16_t idmef_value_get_int16 (const idmef_value_t *val); uint16_t idmef_value_get_uint16 (const idmef_value_t *val); int32_t idmef_value_get_int32 (const idmef_value_t *val); uint32_t idmef_value_get_uint32 (const idmef_value_t *val); int64_t idmef_value_get_int64 (const idmef_value_t *val); uint64_t idmef_value_get_uint64 (const idmef_value_t *val); int idmef_value_get_enum (const idmef_value_t *val); float idmef_value_get_float (const idmef_value_t *val); double idmef_value_get_double (const idmef_value_t *val); idmef_time_t * idmef_value_get_time (const idmef_value_t *val); idmef_data_t * idmef_value_get_data (const idmef_value_t *val); prelude_string_t * idmef_value_get_string (const idmef_value_t *val); int idmef_value_list_add (idmef_value_t *list, idmef_value_t *item); prelude_bool_t idmef_value_is_list (const idmef_value_t *list); prelude_bool_t idmef_value_list_is_empty (const idmef_value_t *list); int idmef_value_have_own_data (idmef_value_t *value); int idmef_value_dont_have_own_data (idmef_value_t *value); idmef_value_type_id_t idmef_value_get_type (const idmef_value_t *value); idmef_class_id_t idmef_value_get_class (const idmef_value_t *value); void * idmef_value_get_object (const idmef_value_t *value); int idmef_value_iterate (const idmef_value_t *value, int (callbackidmef_value_t *ptr, void *extra) (), void *extra); int idmef_value_iterate_reversed (const idmef_value_t *value, int (callbackidmef_value_t *ptr, void *extra) (), void *extra); idmef_value_t * idmef_value_get_nth (const idmef_value_t *val, int n); int idmef_value_get_count (const idmef_value_t *val); int idmef_value_clone (const idmef_value_t *val, idmef_value_t **dst); idmef_value_t * idmef_value_ref (idmef_value_t *val); int idmef_value_print (const idmef_value_t *val, prelude_io_t *fd); int idmef_value_to_string (const idmef_value_t *val, prelude_string_t *out); int idmef_value_get (const idmef_value_t *val, void *res); int idmef_value_match (idmef_value_t *val1, idmef_value_t *val2, idmef_criterion_operator_t op); int idmef_value_check_operator (const idmef_value_t *value, idmef_criterion_operator_t op); int idmef_value_get_applicable_operators (const idmef_value_t *value, idmef_criterion_operator_t *result); void idmef_value_destroy (idmef_value_t *val); Description Details idmef_value_t idmef_value_ttypedef struct idmef_value idmef_value_t; idmef_value_new_int8 () idmef_value_new_int8int idmef_value_new_int8 (idmef_value_t **value, int8_t val); value : val : Returns : idmef_value_new_uint8 () idmef_value_new_uint8int idmef_value_new_uint8 (idmef_value_t **value, uint8_t val); value : val : Returns : idmef_value_new_int16 () idmef_value_new_int16int idmef_value_new_int16 (idmef_value_t **value, int16_t val); value : val : Returns : idmef_value_new_uint16 () idmef_value_new_uint16int idmef_value_new_uint16 (idmef_value_t **value, uint16_t val); value : val : Returns : idmef_value_new_int32 () idmef_value_new_int32int idmef_value_new_int32 (idmef_value_t **value, int32_t val); value : val : Returns : idmef_value_new_uint32 () idmef_value_new_uint32int idmef_value_new_uint32 (idmef_value_t **value, uint32_t val); value : val : Returns : idmef_value_new_int64 () idmef_value_new_int64int idmef_value_new_int64 (idmef_value_t **value, int64_t val); value : val : Returns : idmef_value_new_uint64 () idmef_value_new_uint64int idmef_value_new_uint64 (idmef_value_t **value, uint64_t val); value : val : Returns : idmef_value_new_float () idmef_value_new_floatint idmef_value_new_float (idmef_value_t **value, float val); value : val : Returns : idmef_value_new_double () idmef_value_new_doubleint idmef_value_new_double (idmef_value_t **value, double val); value : val : Returns : idmef_value_new_string () idmef_value_new_stringint idmef_value_new_string (idmef_value_t **value, prelude_string_t *string); value : string : Returns : idmef_value_new_time () idmef_value_new_timeint idmef_value_new_time (idmef_value_t **value, idmef_time_t *time); value : time : Returns : idmef_value_new_data () idmef_value_new_dataint idmef_value_new_data (idmef_value_t **value, idmef_data_t *data); value : data : Returns : idmef_value_new_class () idmef_value_new_classint idmef_value_new_class (idmef_value_t **value, idmef_class_id_t classid, void *ptr); value : classid : ptr : Returns : idmef_value_new_list () idmef_value_new_listint idmef_value_new_list (idmef_value_t **value); value : Returns : idmef_value_new_enum () idmef_value_new_enumint idmef_value_new_enum (idmef_value_t **value, idmef_class_id_t classid, const char *buf); value : classid : buf : Returns : idmef_value_new_enum_from_string () idmef_value_new_enum_from_stringint idmef_value_new_enum_from_string (idmef_value_t **value, idmef_class_id_t classid, const char *buf); value : classid : buf : Returns : idmef_value_new_enum_from_numeric () idmef_value_new_enum_from_numericint idmef_value_new_enum_from_numeric (idmef_value_t **value, idmef_class_id_t classid, int val); value : classid : val : Returns : idmef_value_new () idmef_value_newint idmef_value_new (idmef_value_t **value, idmef_value_type_id_t type, void *ptr); value : type : ptr : Returns : idmef_value_new_from_path () idmef_value_new_from_pathint idmef_value_new_from_path (idmef_value_t **value, idmef_path_t *path, const char *buf); value : path : buf : Returns : idmef_value_new_from_string () idmef_value_new_from_stringint idmef_value_new_from_string (idmef_value_t **value, idmef_value_type_id_t type, const char *buf); value : type : buf : Returns : idmef_value_set_class () idmef_value_set_classint idmef_value_set_class (idmef_value_t *value, idmef_class_id_t classid, void *ptr); value : classid : ptr : Returns : idmef_value_set_data () idmef_value_set_dataint idmef_value_set_data (idmef_value_t *value, idmef_data_t *data); value : data : Returns : idmef_value_set_double () idmef_value_set_doubleint idmef_value_set_double (idmef_value_t *value, double val); value : val : Returns : idmef_value_set_enum () idmef_value_set_enumint idmef_value_set_enum (idmef_value_t *value, idmef_class_id_t classid, const char *buf); value : classid : buf : Returns : idmef_value_set_enum_from_numeric () idmef_value_set_enum_from_numericint idmef_value_set_enum_from_numeric (idmef_value_t *value, idmef_class_id_t classid, int no); value : classid : no : Returns : idmef_value_set_enum_from_string () idmef_value_set_enum_from_stringint idmef_value_set_enum_from_string (idmef_value_t *value, idmef_class_id_t classid, const char *buf); value : classid : buf : Returns : idmef_value_set_float () idmef_value_set_floatint idmef_value_set_float (idmef_value_t *value, float val); value : val : Returns : idmef_value_set_int16 () idmef_value_set_int16int idmef_value_set_int16 (idmef_value_t *value, int16_t val); value : val : Returns : idmef_value_set_int32 () idmef_value_set_int32int idmef_value_set_int32 (idmef_value_t *value, int32_t val); value : val : Returns : idmef_value_set_int64 () idmef_value_set_int64int idmef_value_set_int64 (idmef_value_t *value, int64_t val); value : val : Returns : idmef_value_set_int8 () idmef_value_set_int8int idmef_value_set_int8 (idmef_value_t *value, int8_t val); value : val : Returns : idmef_value_set_string () idmef_value_set_stringint idmef_value_set_string (idmef_value_t *value, prelude_string_t *string); value : string : Returns : idmef_value_set_time () idmef_value_set_timeint idmef_value_set_time (idmef_value_t *value, idmef_time_t *time); value : time : Returns : idmef_value_set_uint16 () idmef_value_set_uint16int idmef_value_set_uint16 (idmef_value_t *value, uint16_t val); value : val : Returns : idmef_value_set_uint32 () idmef_value_set_uint32int idmef_value_set_uint32 (idmef_value_t *value, uint32_t val); value : val : Returns : idmef_value_set_uint64 () idmef_value_set_uint64int idmef_value_set_uint64 (idmef_value_t *value, uint64_t val); value : val : Returns : idmef_value_set_uint8 () idmef_value_set_uint8int idmef_value_set_uint8 (idmef_value_t *value, uint8_t val); value : val : Returns : idmef_value_get_int8 () idmef_value_get_int8int8_t idmef_value_get_int8 (const idmef_value_t *val); val : Returns : idmef_value_get_uint8 () idmef_value_get_uint8uint8_t idmef_value_get_uint8 (const idmef_value_t *val); val : Returns : idmef_value_get_int16 () idmef_value_get_int16int16_t idmef_value_get_int16 (const idmef_value_t *val); val : Returns : idmef_value_get_uint16 () idmef_value_get_uint16uint16_t idmef_value_get_uint16 (const idmef_value_t *val); val : Returns : idmef_value_get_int32 () idmef_value_get_int32int32_t idmef_value_get_int32 (const idmef_value_t *val); val : Returns : idmef_value_get_uint32 () idmef_value_get_uint32uint32_t idmef_value_get_uint32 (const idmef_value_t *val); val : Returns : idmef_value_get_int64 () idmef_value_get_int64int64_t idmef_value_get_int64 (const idmef_value_t *val); val : Returns : idmef_value_get_uint64 () idmef_value_get_uint64uint64_t idmef_value_get_uint64 (const idmef_value_t *val); val : Returns : idmef_value_get_enum () idmef_value_get_enumint idmef_value_get_enum (const idmef_value_t *val); val : Returns : idmef_value_get_float () idmef_value_get_floatfloat idmef_value_get_float (const idmef_value_t *val); val : Returns : idmef_value_get_double () idmef_value_get_doubledouble idmef_value_get_double (const idmef_value_t *val); val : Returns : idmef_value_get_time () idmef_value_get_timeidmef_time_t * idmef_value_get_time (const idmef_value_t *val); val : Returns : idmef_value_get_data () idmef_value_get_dataidmef_data_t * idmef_value_get_data (const idmef_value_t *val); val : Returns : idmef_value_get_string () idmef_value_get_stringprelude_string_t * idmef_value_get_string (const idmef_value_t *val); val : Returns : idmef_value_list_add () idmef_value_list_addint idmef_value_list_add (idmef_value_t *list, idmef_value_t *item); list : item : Returns : idmef_value_is_list () idmef_value_is_listprelude_bool_t idmef_value_is_list (const idmef_value_t *list); list : Returns : idmef_value_list_is_empty () idmef_value_list_is_emptyprelude_bool_t idmef_value_list_is_empty (const idmef_value_t *list); list : Returns : idmef_value_have_own_data () idmef_value_have_own_dataint idmef_value_have_own_data (idmef_value_t *value); value : Returns : idmef_value_dont_have_own_data () idmef_value_dont_have_own_dataint idmef_value_dont_have_own_data (idmef_value_t *value); value : Returns : idmef_value_get_type () idmef_value_get_typeidmef_value_type_id_t idmef_value_get_type (const idmef_value_t *value); value : Returns : idmef_value_get_class () idmef_value_get_classidmef_class_id_t idmef_value_get_class (const idmef_value_t *value); value : Returns : idmef_value_get_object () idmef_value_get_objectvoid * idmef_value_get_object (const idmef_value_t *value); value : Returns : idmef_value_iterate () idmef_value_iterateint idmef_value_iterate (const idmef_value_t *value, int (callbackidmef_value_t *ptr, void *extra) (), void *extra); value : callback : extra : Returns : idmef_value_iterate_reversed () idmef_value_iterate_reversedint idmef_value_iterate_reversed (const idmef_value_t *value, int (callbackidmef_value_t *ptr, void *extra) (), void *extra); value : callback : extra : Returns : idmef_value_get_nth () idmef_value_get_nthidmef_value_t * idmef_value_get_nth (const idmef_value_t *val, int n); val : n : Returns : idmef_value_get_count () idmef_value_get_countint idmef_value_get_count (const idmef_value_t *val); val : Returns : idmef_value_clone () idmef_value_cloneint idmef_value_clone (const idmef_value_t *val, idmef_value_t **dst); val : dst : Returns : idmef_value_ref () idmef_value_refidmef_value_t * idmef_value_ref (idmef_value_t *val); val : Returns : idmef_value_print () idmef_value_printint idmef_value_print (const idmef_value_t *val, prelude_io_t *fd); val : fd : Returns : idmef_value_to_string () idmef_value_to_stringint idmef_value_to_string (const idmef_value_t *val, prelude_string_t *out); val : out : Returns : idmef_value_get () idmef_value_getint idmef_value_get (const idmef_value_t *val, void *res); val : res : Returns : idmef_value_match () idmef_value_matchint idmef_value_match (idmef_value_t *val1, idmef_value_t *val2, idmef_criterion_operator_t op); Match val1 and val2 using op. val1 : Pointer to a idmef_value_t object. val2 : Pointer to a idmef_value_t object. op : operator to use for matching. Returns : the number of match, 0 for none, a negative value if an error occured. idmef_value_check_operator () idmef_value_check_operatorint idmef_value_check_operator (const idmef_value_t *value, idmef_criterion_operator_t op); Check whether op can apply to value. value : Pointer to a idmef_value_t object. op : Type of operator to check value for. Returns : 0 on success, a negative value if an error occured. idmef_value_get_applicable_operators () idmef_value_get_applicable_operatorsint idmef_value_get_applicable_operators (const idmef_value_t *value, idmef_criterion_operator_t *result); Store all operator supported by value in result. value : Pointer to a idmef_value_t object. result : Pointer where the result will be stored. Returns : 0 on success, a negative value if an error occured. idmef_value_destroy () idmef_value_destroyvoid idmef_value_destroy (idmef_value_t *val); Decrement refcount and destroy value if it reach 0. val : Pointer to a idmef_value_t object. libprelude-1.0.0/docs/api/xml/prelude-client.xml0000664000076400007640000014201711347714755016554 00000000000000 prelude-client 3 LIBPRELUDE Library prelude-client Creating a Prelude Client Synopsis enum prelude_client_exit_status_t; enum prelude_client_flags_t; typedef prelude_client_t; prelude_ident_t * prelude_client_get_unique_ident (prelude_client_t *client); void prelude_client_set_connection_pool (prelude_client_t *client, prelude_connection_pool_t *pool); prelude_connection_pool_t * prelude_client_get_connection_pool (prelude_client_t *client); int prelude_client_start (prelude_client_t *client); int prelude_client_init (prelude_client_t *client); int prelude_client_new (prelude_client_t **client, const char *profile); prelude_client_t * prelude_client_ref (prelude_client_t *client); idmef_analyzer_t * prelude_client_get_analyzer (prelude_client_t *client); prelude_client_flags_t prelude_client_get_flags (prelude_client_t *client); void prelude_client_set_required_permission (prelude_client_t *client, prelude_connection_permission_t permission); prelude_connection_permission_t prelude_client_get_required_permission (prelude_client_t *client); void prelude_client_send_msg (prelude_client_t *client, prelude_msg_t *msg); int prelude_client_recv_msg (prelude_client_t *client, int timeout, prelude_msg_t **msg); void prelude_client_set_heartbeat_cb (prelude_client_t *client, void (cbprelude_client_t *client, idmef_message_t *hb) ()); void prelude_client_send_idmef (prelude_client_t *client, idmef_message_t *msg); int prelude_client_recv_idmef (prelude_client_t *client, int timeout, idmef_message_t **idmef); void prelude_client_destroy (prelude_client_t *client, prelude_client_exit_status_t status); int prelude_client_set_flags (prelude_client_t *client, prelude_client_flags_t flags); int prelude_client_set_config_filename (prelude_client_t *client, const char *filename); const char * prelude_client_get_config_filename (prelude_client_t *client); prelude_bool_t prelude_client_is_setup_needed (int error); prelude_client_profile_t * prelude_client_get_profile (prelude_client_t *client); int prelude_client_new_msgbuf (prelude_client_t *client, prelude_msgbuf_t **msgbuf); int prelude_client_handle_msg_default (prelude_client_t *client, prelude_msg_t *msg, prelude_msgbuf_t *msgbuf); const char * prelude_client_get_setup_error (prelude_client_t *client); void prelude_client_print_setup_error (prelude_client_t *client); Description In order to send or to read data from a Prelude collector (prelude-manager), you will need to create a prelude_client_t object. This object will be necessary for most of the work you are going to do with prelude. Creating the client int ret; prelude_client_t *client; ret = prelude_client_new(&client, "my-analyzer"); if ( ! client ) { prelude_perror(ret, "Unable to create a prelude client object"); return -1; } This will create a new client object, whose default profile is my-analyzer. This default profile might be overriden using the --prelude --profile profile_name option on your command line as parsed by prelude_init(). Additionally, prelude specific option might be overriden using a Prelude specific configuration file, like the template file created within each profile, or a configuration file specified using prelude_client_set_config_filename() before prelude_client_start() is called. The default required permission for the created client are set to PRELUDE_CONNECTION_PERMISSION_IDMEF_WRITE and PRELUDE_CONNECTION_PERMISSION_ADMIN_READ, which mean the client will reject any certificate where permission are set to anything less than this. You can change the default required permission using the prelude_client_set_required_permission() function. As an example, if you want to create a client that will read alert from a Manager, and accept administrative option request you should use: prelude_client_set_required_permission(client, PRELUDE_CONNECTION_PERMISSION_IDMEF_READ|PRELUDE_CONNECTION_PERMISSION_ADMIN_WRITE); Once the client is created and you have everything setup, you will need to start your client. The prelude_client_start() function is responsible for this, and will trigger the connection to the configured manager, and send the initial client heartbeat. ret = prelude_client_start(client); if ( ret < 0 ) { prelude_log(ret, "Unable to start prelude client"); return -1; } Additionally, it is possible to set additional client flags, however, you should be careful since some of theses flags (marked asynchronous) will result in creating an internal thread, which should only be done after an eventual fork of the program since threads are not copied accross a fork call. The prelude library will also register an internal timer in order to send heartbeat message at the defined interval. Timer registered by the library itself or by the program will either be called automatically if the PRELUDE_CLIENT_FLAGS_ASYNC_TIMER flags is set, otherwise, the program is responsible for calling the prelude_timer_wake_up() function every second from it's main loop, in order to check the registered timer. PRELUDE_CLIENT_FLAGS_CONNECT - Used for a client to connect to a manager (this is the default). PRELUDE_CLIENT_FLAGS_HEARTBEAT - Used for client to send heartbeat (this is the default). PRELUDE_CLIENT_FLAGS_ASYNC_SEND - Used if you want message to be sent asynchronously. PRELUDE_CLIENT_FLAGS_ASYNC_TIMER - Used if you want timer to be automatically called from the asynchronous thread. See prelude_client_flags_t for a list of available flags. ret = prelude_client_set_flags(client, PRELUDE_CLIENT_FLAGS_ASYNC_SEND|PRELUDE_CLIENT_FLAGS_ASYNC_TIMER); if ( ret < 0 ) { fprintf(stderr, "Unable to set asynchronous send and timer.\n"); return -1; } Sending IDMEF message For documentation on how to create IDMEF message, please see idmef_message_t or idmef_path_t. Once you created and IDMEF message, you should use the prelude_client_send_idmef() function in order to send it to the collector you are connected to. prelude_client_send_idmef(client, idmef); Destroying the client In case the analyzer you are developing is not a persistant analyzer (meaning an analyzer that is not supposed to exit), it is important that you call the prelude_client_destroy() function prior to exiting. This function have the side effect of sending an heartbeat to the remote manager, as well as an information regarding the analyzer state. This state information is important since an analyzer not reporting a successful exit status, or an analyzer which stop sending heartbeat at all will be reported as having a problem. PRELUDE_CLIENT_STATUS_EXIT_SUCCESS - Exiting the sensor is the expected behavior. PRELUDE_CLIENT_STATUS_EXIT_FAILED - There is something wrong going on, notice the security analyst. prelude_client_destroy(client, PRELUDE_CLIENT_STATUS_EXIT_SUCCESS); As a side note, please remember that a persistant sensor should never use this function (except maybe if it is working in batch mode), unless it want to report the PRELUDE_CLIENT_STATUS_EXIT_FAILED exit status. This is also the case if your persistant sensor is interrupted by a signal. Details enum prelude_client_exit_status_t prelude_client_exit_status_ttypedef enum { PRELUDE_CLIENT_EXIT_STATUS_SUCCESS = 0, PRELUDE_CLIENT_EXIT_STATUS_FAILURE = -1 } prelude_client_exit_status_t; enum prelude_client_flags_t prelude_client_flags_ttypedef enum { PRELUDE_CLIENT_FLAGS_ASYNC_SEND = 0x01, PRELUDE_CLIENT_FLAGS_ASYNC_TIMER = 0x02, PRELUDE_CLIENT_FLAGS_HEARTBEAT = 0x04, PRELUDE_CLIENT_FLAGS_CONNECT = 0x08, PRELUDE_CLIENT_FLAGS_AUTOCONFIG = 0x10 } prelude_client_flags_t; prelude_client_t prelude_client_ttypedef struct prelude_client prelude_client_t; prelude_client_get_unique_ident () prelude_client_get_unique_identprelude_ident_t * prelude_client_get_unique_ident (prelude_client_t *client); client : Returns : prelude_client_set_connection_pool () prelude_client_set_connection_poolvoid prelude_client_set_connection_pool (prelude_client_t *client, prelude_connection_pool_t *pool); Use this function in order to set your own list of peer that client should send message too. This might be usefull in case you don't want this to be automated by prelude_client_init(). client : pointer to a prelude_client_t object. pool : pointer to a prelude_client_pool_t object. prelude_client_get_connection_pool () prelude_client_get_connection_poolprelude_connection_pool_t * prelude_client_get_connection_pool (prelude_client_t *client); Return a pointer to the prelude_connection_pool_t object used by client to send messages. client : pointer to a prelude_client_t object. Returns : a pointer to a prelude_connection_pool_t object. prelude_client_start () prelude_client_startint prelude_client_start (prelude_client_t *client); This function start the client object, triggering a connection from the client to it's server if any were specified, and sending the initial client heartbeat. If client was not initialized, then prelude_client_init() will be called and thus this function might fail if the client was not registered. client : Pointer to a client object to initialize. Returns : 0 on success, -1 if an error occured. prelude_client_init () prelude_client_initint prelude_client_init (prelude_client_t *client); This function initialize the client object, meaning reading generic options from the prelude_client_new() provided configuration file and the array of arguments specified through prelude_init(). Calling this function is optional and should be done only if you need more granularity between prelude_client_new() and prelude_client_start(): prelude_client_start() will call prelude_client_init() for you if needed. client : Pointer to a prelude_client_t object to initialize. Returns : 0 on success, -1 if an error occured. prelude_client_new () prelude_client_newint prelude_client_new (prelude_client_t **client, const char *profile); This function initialize the client object. client : Pointer to a client object to initialize. profile : Default profile name for this analyzer. Returns : 0 on success or a negative value if an error occur. prelude_client_ref () prelude_client_refprelude_client_t * prelude_client_ref (prelude_client_t *client); client : Returns : prelude_client_get_analyzer () prelude_client_get_analyzeridmef_analyzer_t * prelude_client_get_analyzer (prelude_client_t *client); Provide access to the idmef_analyzer_t object associated to client. This analyzer object is sent along with every alerts and heartbeats emited by this client. The analyzer object is created by prelude_client_init(). client : Pointer to a prelude_client_t object. Returns : the idmef_analyzer_t object associated with client. prelude_client_get_flags () prelude_client_get_flagsprelude_client_flags_t prelude_client_get_flags (prelude_client_t *client); Get flags set through prelude_client_set_flags(). client : Pointer on a prelude_client_t object. Returns : an or'ed list of prelude_client_flags_t. prelude_client_set_required_permission () prelude_client_set_required_permissionvoid prelude_client_set_required_permission (prelude_client_t *client, prelude_connection_permission_t permission); Set the required permission for client. The default is PRELUDE_CONNECTION_PERMISSION_IDMEF_WRITE | PRELUDE_CONNECTION_PERMISSION_ADMIN_READ. Value set through this function should be set before prelude_client_start(). If the client certificate for connecting to one of the specified manager doesn't have theses permission the client will reject the certificate and ask for registration. client : Pointer on a prelude_client_t object. permission : Required permission for client. prelude_client_get_required_permission () prelude_client_get_required_permissionprelude_connection_permission_t prelude_client_get_required_permission (prelude_client_t *client); client : Pointer on a prelude_client_t object. Returns : client permission as set with prelude_client_set_required_permission() prelude_client_send_msg () prelude_client_send_msgvoid prelude_client_send_msg (prelude_client_t *client, prelude_msg_t *msg); Send msg to the peers client is communicating with. The message will be sent asynchronously if PRELUDE_CLIENT_FLAGS_ASYNC_SEND was set using prelude_client_set_flags() in which case the caller should not call prelude_msg_destroy() on msg. client : Pointer to a prelude_client_t object. msg : pointer to a message that client should send. prelude_client_recv_msg () prelude_client_recv_msgint prelude_client_recv_msg (prelude_client_t *client, int timeout, prelude_msg_t **msg); Wait timeout second for a message on client connection pool. A timeout of -1, mean prelude_client_recv_msg() will block until a message is received. A timeout of 0 mean that it will return immediatly. client : Pointer to a prelude_client_t object. timeout : Number of millisecond to wait for a message. msg : Pointer where the received prelude_msg_t should be stored. Returns : 0 on timeout, a negative value on error, 1 on success. prelude_client_set_heartbeat_cb () prelude_client_set_heartbeat_cbvoid prelude_client_set_heartbeat_cb (prelude_client_t *client, void (cbprelude_client_t *client, idmef_message_t *hb) ()); Use if you want to override the default function used to automatically send heartbeat to client peers. client : pointer to a prelude_client_t object. cb : pointer to a function handling heartbeat sending. prelude_client_send_idmef () prelude_client_send_idmefvoid prelude_client_send_idmef (prelude_client_t *client, idmef_message_t *msg); Send msg to the peers client is communicating with. The message will be sent asynchronously if PRELUDE_CLIENT_FLAGS_ASYNC_SEND was set using prelude_client_set_flags(). client : Pointer to a prelude_client_t object. msg : pointer to an IDMEF message to be sent to client peers. prelude_client_recv_idmef () prelude_client_recv_idmefint prelude_client_recv_idmef (prelude_client_t *client, int timeout, idmef_message_t **idmef); Wait timeout second for a message on client connection pool. A timeout of -1, mean prelude_client_recv_idmef() will block until a message is received. A timeout of 0 mean that it will return immediatly. client : Pointer to a prelude_client_t object. timeout : Number of second to wait for a message. idmef : Pointer where the received idmef_message_t should be stored. Returns : 0 on timeout, a negative value on error, 1 on success. prelude_client_destroy () prelude_client_destroyvoid prelude_client_destroy (prelude_client_t *client, prelude_client_exit_status_t status); Destroy client, and send an heartbeat containing the 'exiting' status in case status is PRELUDE_CLIENT_EXIT_STATUS_SUCCESS. This is useful for analyzer expected to be running periodically, and that shouldn't be treated as behaving anormaly in case no heartbeat is sent. Please note that your are not supposed to run this function from a signal handler. client : Pointer on a client object. status : Exit status for the client. prelude_client_set_flags () prelude_client_set_flagsint prelude_client_set_flags (prelude_client_t *client, prelude_client_flags_t flags); Set specific flags in the client structure. This function can be called anytime after the creation of the client object. When settings asynchronous flags such as PRELUDE_CLIENT_FLAGS_ASYNC_SEND or PRELUDE_CLIENT_FLAGS_ASYNC_TIMER, be carefull to call prelude_client_set_flags() in the same process you want to use the asynchronous API from. Threads aren't copied accross fork(). client : Pointer on a prelude_client_t object. flags : Or'd list of flags used by client. Returns : 0 if setting flags succeed, -1 otherwise. prelude_client_set_config_filename () prelude_client_set_config_filenameint prelude_client_set_config_filename (prelude_client_t *client, const char *filename); The default for a client is to use a template configuration file (idmef-client.conf). By using this function you might override the default and provide your own configuration file to use for client. The format of the configuration file need to be compatible with the Prelude format. client : pointer on a prelude_client_t object. filename : Configuration file to use for this client. Returns : 0 on success, -1 if an error occured. prelude_client_get_config_filename () prelude_client_get_config_filenameconst char * prelude_client_get_config_filename (prelude_client_t *client); Return the filename where client configuration is stored. This filename is originally set by the prelude_client_new() function. client : pointer on a prelude_client_t object. Returns : a pointer to client configuration filename. prelude_client_is_setup_needed () prelude_client_is_setup_neededprelude_bool_t prelude_client_is_setup_needed (int error); prelude_client_is_setup_needed is deprecated and should not be used in newly-written code. use standard error API. This function should be called as a result of an error by the prelude_client_start() function, to know if the analyzer need to be registered. error : Error returned by prelude_client_start(). Returns : TRUE if setup is needed, FALSE otherwise. prelude_client_get_profile () prelude_client_get_profileprelude_client_profile_t * prelude_client_get_profile (prelude_client_t *client); client : Returns : prelude_client_new_msgbuf () prelude_client_new_msgbufint prelude_client_new_msgbuf (prelude_client_t *client, prelude_msgbuf_t **msgbuf); client : msgbuf : Returns : prelude_client_handle_msg_default () prelude_client_handle_msg_defaultint prelude_client_handle_msg_default (prelude_client_t *client, prelude_msg_t *msg, prelude_msgbuf_t *msgbuf); client : msg : msgbuf : Returns : prelude_client_get_setup_error () prelude_client_get_setup_errorconst char * prelude_client_get_setup_error (prelude_client_t *client); prelude_client_get_setup_error is deprecated and should not be used in newly-written code. client : Returns : prelude_client_print_setup_error () prelude_client_print_setup_errorvoid prelude_client_print_setup_error (prelude_client_t *client); client : See Also idmef_message_t idmef_path_t libprelude-1.0.0/docs/api/xml/idmef-criterion-value.xml0000664000076400007640000005177011347714755020037 00000000000000 idmef-criterion-value 3 LIBPRELUDE Library idmef-criterion-value Synopsis typedef idmef_criterion_value_t; enum idmef_criterion_value_type_t; int idmef_criterion_value_new (idmef_criterion_value_t **cv); int idmef_criterion_value_new_regex (idmef_criterion_value_t **cv, const char *regex, idmef_criterion_operator_t op); int idmef_criterion_value_new_value (idmef_criterion_value_t **cv, idmef_value_t *value, idmef_criterion_operator_t op); int idmef_criterion_value_new_from_string (idmef_criterion_value_t **cv, idmef_path_t *path, const char *value, idmef_criterion_operator_t op); int idmef_criterion_value_new_broken_down_time (idmef_criterion_value_t **cv, const char *time, idmef_criterion_operator_t op); int idmef_criterion_value_clone (const idmef_criterion_value_t *src, idmef_criterion_value_t **dst); void idmef_criterion_value_destroy (idmef_criterion_value_t *value); int idmef_criterion_value_print (idmef_criterion_value_t *value, prelude_io_t *fd); int idmef_criterion_value_to_string (idmef_criterion_value_t *value, prelude_string_t *out); int idmef_criterion_value_match (idmef_criterion_value_t *cv, idmef_value_t *value, idmef_criterion_operator_t op); const idmef_value_t * idmef_criterion_value_get_value (idmef_criterion_value_t *cv); const char * idmef_criterion_value_get_regex (idmef_criterion_value_t *cv); const struct tm * idmef_criterion_value_get_broken_down_time (idmef_criterion_value_t *cv); idmef_criterion_value_type_t idmef_criterion_value_get_type (idmef_criterion_value_t *cv); Description Details idmef_criterion_value_t idmef_criterion_value_ttypedef struct idmef_criterion_value idmef_criterion_value_t; enum idmef_criterion_value_type_t idmef_criterion_value_type_ttypedef enum { IDMEF_CRITERION_VALUE_TYPE_ERROR = -1, IDMEF_CRITERION_VALUE_TYPE_VALUE = 0, IDMEF_CRITERION_VALUE_TYPE_REGEX = 1, IDMEF_CRITERION_VALUE_TYPE_BROKEN_DOWN_TIME = 2 } idmef_criterion_value_type_t; idmef_criterion_value_new () idmef_criterion_value_newint idmef_criterion_value_new (idmef_criterion_value_t **cv); cv : Returns : idmef_criterion_value_new_regex () idmef_criterion_value_new_regexint idmef_criterion_value_new_regex (idmef_criterion_value_t **cv, const char *regex, idmef_criterion_operator_t op); cv : regex : op : Returns : idmef_criterion_value_new_value () idmef_criterion_value_new_valueint idmef_criterion_value_new_value (idmef_criterion_value_t **cv, idmef_value_t *value, idmef_criterion_operator_t op); cv : value : op : Returns : idmef_criterion_value_new_from_string () idmef_criterion_value_new_from_stringint idmef_criterion_value_new_from_string (idmef_criterion_value_t **cv, idmef_path_t *path, const char *value, idmef_criterion_operator_t op); cv : path : value : op : Returns : idmef_criterion_value_new_broken_down_time () idmef_criterion_value_new_broken_down_timeint idmef_criterion_value_new_broken_down_time (idmef_criterion_value_t **cv, const char *time, idmef_criterion_operator_t op); cv : time : op : Returns : idmef_criterion_value_clone () idmef_criterion_value_cloneint idmef_criterion_value_clone (const idmef_criterion_value_t *src, idmef_criterion_value_t **dst); src : dst : Returns : idmef_criterion_value_destroy () idmef_criterion_value_destroyvoid idmef_criterion_value_destroy (idmef_criterion_value_t *value); value : idmef_criterion_value_print () idmef_criterion_value_printint idmef_criterion_value_print (idmef_criterion_value_t *value, prelude_io_t *fd); value : fd : Returns : idmef_criterion_value_to_string () idmef_criterion_value_to_stringint idmef_criterion_value_to_string (idmef_criterion_value_t *value, prelude_string_t *out); value : out : Returns : idmef_criterion_value_match () idmef_criterion_value_matchint idmef_criterion_value_match (idmef_criterion_value_t *cv, idmef_value_t *value, idmef_criterion_operator_t op); cv : value : op : Returns : idmef_criterion_value_get_value () idmef_criterion_value_get_valueconst idmef_value_t * idmef_criterion_value_get_value (idmef_criterion_value_t *cv); cv : Returns : idmef_criterion_value_get_regex () idmef_criterion_value_get_regexconst char * idmef_criterion_value_get_regex (idmef_criterion_value_t *cv); cv : Returns : idmef_criterion_value_get_broken_down_time () idmef_criterion_value_get_broken_down_timeconst struct tm * idmef_criterion_value_get_broken_down_time (idmef_criterion_value_t *cv); cv : Returns : idmef_criterion_value_get_type () idmef_criterion_value_get_typeidmef_criterion_value_type_t idmef_criterion_value_get_type (idmef_criterion_value_t *cv); cv : Returns : libprelude-1.0.0/docs/api/xml/prelude-error.xml0000664000076400007640000007602311347714755016432 00000000000000 prelude-error 3 LIBPRELUDE Library prelude-error Synopsis #define PRELUDE_ERROR_SOURCE_DEFAULT #define PRELUDE_ERROR_SYSTEM_ERROR enum prelude_error_source_t; enum prelude_error_code_t; typedef prelude_error_t; prelude_error_code_t prelude_error_get_code (prelude_error_t error); prelude_error_source_t prelude_error_get_source (prelude_error_t error); void prelude_perror (prelude_error_t error, const char *fmt, ...); const char * prelude_strerror (prelude_error_t err); const char * prelude_strsource (prelude_error_t err); prelude_error_code_t prelude_error_code_from_errno (int err); prelude_error_t prelude_error_make (prelude_error_source_t source, prelude_error_code_t code); prelude_error_t prelude_error_make_from_errno (prelude_error_source_t source, int err); prelude_error_t prelude_error_verbose_make (prelude_error_source_t source, prelude_error_code_t code, const char *fmt, ...); prelude_error_t prelude_error_verbose_make_v (prelude_error_source_t source, prelude_error_code_t code, const char *fmt, va_list ap); int prelude_error_code_to_errno (prelude_error_code_t code); prelude_bool_t prelude_error_is_verbose (prelude_error_t error); Description Details PRELUDE_ERROR_SOURCE_DEFAULT PRELUDE_ERROR_SOURCE_DEFAULT #define PRELUDE_ERROR_SOURCE_DEFAULT PRELUDE_ERROR_SOURCE_UNKNOWN PRELUDE_ERROR_SYSTEM_ERROR PRELUDE_ERROR_SYSTEM_ERROR#define PRELUDE_ERROR_SYSTEM_ERROR (1 << 15) enum prelude_error_source_t prelude_error_source_ttypedef enum { PRELUDE_ERROR_SOURCE_UNKNOWN = 0, PRELUDE_ERROR_SOURCE_IO = 1, PRELUDE_ERROR_SOURCE_MESSAGE = 2, PRELUDE_ERROR_SOURCE_FAILOVER = 3, PRELUDE_ERROR_SOURCE_CLIENT = 4, PRELUDE_ERROR_SOURCE_CLIENT_PROFILE = 5, PRELUDE_ERROR_SOURCE_EXTRACT = 6, PRELUDE_ERROR_SOURCE_CONNECTION = 7, PRELUDE_ERROR_SOURCE_CONNECTION_POOL = 8, PRELUDE_ERROR_SOURCE_CONFIG_ENGINE = 9, PRELUDE_ERROR_SOURCE_STRING = 10, PRELUDE_ERROR_SOURCE_IDMEF_TREE_WRAP = 11, PRELUDE_ERROR_SOURCE_IDMEF_PATH = 12, PRELUDE_ERROR_SOURCE_IDMEF_TYPE = 13, PRELUDE_ERROR_SOURCE_IDMEF_MESSAGE_READ = 14, PRELUDE_ERROR_SOURCE_IDMEF_CRITERIA = 15, PRELUDE_ERROR_SOURCE_IDMEF_VALUE_TYPE = 16, PRELUDE_ERROR_SOURCE_PRELUDEDB = 255, } prelude_error_source_t; enum prelude_error_code_t prelude_error_code_ttypedef enum { PRELUDE_ERROR_NO_ERROR = 0, PRELUDE_ERROR_GENERIC = 1, PRELUDE_ERROR_TLS = 2, PRELUDE_ERROR_INVAL_LENGTH = 3, PRELUDE_ERROR_INVAL_MESSAGE = 4, PRELUDE_ERROR_PROTOCOL_VERSION = 5, PRELUDE_ERROR_EOF = 6, PRELUDE_ERROR_PROFILE = 8, PRELUDE_ERROR_TLS_AUTH_REJECTED = 16, PRELUDE_ERROR_INVAL_INT8 = 17, PRELUDE_ERROR_INVAL_INT16 = 18, PRELUDE_ERROR_INVAL_INT32 = 19, PRELUDE_ERROR_INVAL_INT64 = 20, PRELUDE_ERROR_INVAL_FLOAT = 21, PRELUDE_ERROR_INVAL_CHAR = 22, PRELUDE_ERROR_INVAL_IDMEF_TIME = 23, PRELUDE_ERROR_CONNECTION_STRING = 24, PRELUDE_ERROR_IDMEF_VALUE_TYPE_UNKNOWN = 25, PRELUDE_ERROR_IDMEF_VALUE_TYPE_COPY_UNAVAILABLE = 26, PRELUDE_ERROR_IDMEF_VALUE_TYPE_CLONE_UNAVAILABLE = 27, PRELUDE_ERROR_IDMEF_VALUE_TYPE_COMPARE_UNAVAILABLE = 28, PRELUDE_ERROR_IDMEF_VALUE_TYPE_READ_UNAVAILABLE = 29, PRELUDE_ERROR_IDMEF_VALUE_TYPE_WRITE_UNAVAILABLE = 30, PRELUDE_ERROR_IDMEF_VALUE_TYPE_COMPARE_MISMATCH = 31, PRELUDE_ERROR_IDMEF_VALUE_TYPE_PARSE = 32, PRELUDE_ERROR_IDMEF_CLASS_UNKNOWN = 33, PRELUDE_ERROR_IDMEF_CLASS_UNKNOWN_CHILD = 34, PRELUDE_ERROR_IDMEF_CLASS_UNKNOWN_NAME = 35, PRELUDE_ERROR_IDMEF_PATH_LENGTH = 36, PRELUDE_ERROR_IDMEF_PATH_DEPTH = 37, PRELUDE_ERROR_IDMEF_PATH_PARENT_ROOT = 38, PRELUDE_ERROR_IDMEF_PATH_NTH = 39, PRELUDE_ERROR_IDMEF_PATH_MISS_INDEX = 40, PRELUDE_ERROR_IDMEF_PATH_INTEGRITY = 41, PRELUDE_ERROR_IDMEF_PATH_INDEX_RESERVED = 42, PRELUDE_ERROR_IDMEF_PATH_INDEX_FORBIDDEN = 43, PRELUDE_ERROR_IDMEF_PATH_INDEX_UNDEFINED = 44, PRELUDE_ERROR_IDMEF_TREE_INDEX_UNDEFINED = 45, PRELUDE_ERROR_IDMEF_UNKNOWN_ENUM_STRING = 46, PRELUDE_ERROR_IDMEF_UNKNOWN_TAG = 47, PRELUDE_ERROR_DAEMONIZE_LOCK_HELD = 48, PRELUDE_ERROR_PLUGIN_LTDL_INIT = 49, PRELUDE_ERROR_STRING_NOT_NULL_TERMINATED = 50, PRELUDE_ERROR_CANT_RESOLVE = 51, PRELUDE_ERROR_UNKNOWN_PERMISSION_TYPE = 52, PRELUDE_ERROR_UNKNOWN_PERMISSION_BIT = 53, PRELUDE_ERROR_IDMEF_CRITERIA_PARSE = 55, PRELUDE_ERROR_IDMEF_CRITERION_UNSUPPORTED_OPERATOR = 56, PRELUDE_ERROR_IDMEF_CRITERION_INVALID_REGEX = 57, PRELUDE_ERROR_TLS_WARNING_ALERT = 58, PRELUDE_ERROR_TLS_FATAL_ALERT = 59, PRELUDE_ERROR_IDMEF_CLASS_CHILD_NOT_CLASS = 60, PRELUDE_ERROR_ASSERTION = 61, PRELUDE_ERROR_IDMEF_VALUE_TYPE_REF_UNAVAILABLE = 62, PRELUDE_ERROR_UNKNOWN_ERRNO = 16382, PRELUDE_ERROR_E2BIG = PRELUDE_ERROR_SYSTEM_ERROR | 0, PRELUDE_ERROR_EACCES = PRELUDE_ERROR_SYSTEM_ERROR | 1, PRELUDE_ERROR_EADDRINUSE = PRELUDE_ERROR_SYSTEM_ERROR | 2, PRELUDE_ERROR_EADDRNOTAVAIL = PRELUDE_ERROR_SYSTEM_ERROR | 3, PRELUDE_ERROR_EADV = PRELUDE_ERROR_SYSTEM_ERROR | 4, PRELUDE_ERROR_EAFNOSUPPORT = PRELUDE_ERROR_SYSTEM_ERROR | 5, PRELUDE_ERROR_EAGAIN = PRELUDE_ERROR_SYSTEM_ERROR | 6, PRELUDE_ERROR_EALREADY = PRELUDE_ERROR_SYSTEM_ERROR | 7, PRELUDE_ERROR_EAUTH = PRELUDE_ERROR_SYSTEM_ERROR | 8, PRELUDE_ERROR_EBACKGROUND = PRELUDE_ERROR_SYSTEM_ERROR | 9, PRELUDE_ERROR_EBADE = PRELUDE_ERROR_SYSTEM_ERROR | 10, PRELUDE_ERROR_EBADF = PRELUDE_ERROR_SYSTEM_ERROR | 11, PRELUDE_ERROR_EBADFD = PRELUDE_ERROR_SYSTEM_ERROR | 12, PRELUDE_ERROR_EBADMSG = PRELUDE_ERROR_SYSTEM_ERROR | 13, PRELUDE_ERROR_EBADR = PRELUDE_ERROR_SYSTEM_ERROR | 14, PRELUDE_ERROR_EBADRPC = PRELUDE_ERROR_SYSTEM_ERROR | 15, PRELUDE_ERROR_EBADRQC = PRELUDE_ERROR_SYSTEM_ERROR | 16, PRELUDE_ERROR_EBADSLT = PRELUDE_ERROR_SYSTEM_ERROR | 17, PRELUDE_ERROR_EBFONT = PRELUDE_ERROR_SYSTEM_ERROR | 18, PRELUDE_ERROR_EBUSY = PRELUDE_ERROR_SYSTEM_ERROR | 19, PRELUDE_ERROR_ECANCELED = PRELUDE_ERROR_SYSTEM_ERROR | 20, PRELUDE_ERROR_ECHILD = PRELUDE_ERROR_SYSTEM_ERROR | 21, PRELUDE_ERROR_ECHRNG = PRELUDE_ERROR_SYSTEM_ERROR | 22, PRELUDE_ERROR_ECOMM = PRELUDE_ERROR_SYSTEM_ERROR | 23, PRELUDE_ERROR_ECONNABORTED = PRELUDE_ERROR_SYSTEM_ERROR | 24, PRELUDE_ERROR_ECONNREFUSED = PRELUDE_ERROR_SYSTEM_ERROR | 25, PRELUDE_ERROR_ECONNRESET = PRELUDE_ERROR_SYSTEM_ERROR | 26, PRELUDE_ERROR_ED = PRELUDE_ERROR_SYSTEM_ERROR | 27, PRELUDE_ERROR_EDEADLK = PRELUDE_ERROR_SYSTEM_ERROR | 28, PRELUDE_ERROR_EDEADLOCK = PRELUDE_ERROR_SYSTEM_ERROR | 29, PRELUDE_ERROR_EDESTADDRREQ = PRELUDE_ERROR_SYSTEM_ERROR | 30, PRELUDE_ERROR_EDIED = PRELUDE_ERROR_SYSTEM_ERROR | 31, PRELUDE_ERROR_EDOM = PRELUDE_ERROR_SYSTEM_ERROR | 32, PRELUDE_ERROR_EDOTDOT = PRELUDE_ERROR_SYSTEM_ERROR | 33, PRELUDE_ERROR_EDQUOT = PRELUDE_ERROR_SYSTEM_ERROR | 34, PRELUDE_ERROR_EEXIST = PRELUDE_ERROR_SYSTEM_ERROR | 35, PRELUDE_ERROR_EFAULT = PRELUDE_ERROR_SYSTEM_ERROR | 36, PRELUDE_ERROR_EFBIG = PRELUDE_ERROR_SYSTEM_ERROR | 37, PRELUDE_ERROR_EFTYPE = PRELUDE_ERROR_SYSTEM_ERROR | 38, PRELUDE_ERROR_EGRATUITOUS = PRELUDE_ERROR_SYSTEM_ERROR | 39, PRELUDE_ERROR_EGREGIOUS = PRELUDE_ERROR_SYSTEM_ERROR | 40, PRELUDE_ERROR_EHOSTDOWN = PRELUDE_ERROR_SYSTEM_ERROR | 41, PRELUDE_ERROR_EHOSTUNREACH = PRELUDE_ERROR_SYSTEM_ERROR | 42, PRELUDE_ERROR_EIDRM = PRELUDE_ERROR_SYSTEM_ERROR | 43, PRELUDE_ERROR_EIEIO = PRELUDE_ERROR_SYSTEM_ERROR | 44, PRELUDE_ERROR_EILSEQ = PRELUDE_ERROR_SYSTEM_ERROR | 45, PRELUDE_ERROR_EINPROGRESS = PRELUDE_ERROR_SYSTEM_ERROR | 46, PRELUDE_ERROR_EINTR = PRELUDE_ERROR_SYSTEM_ERROR | 47, PRELUDE_ERROR_EINVAL = PRELUDE_ERROR_SYSTEM_ERROR | 48, PRELUDE_ERROR_EIO = PRELUDE_ERROR_SYSTEM_ERROR | 49, PRELUDE_ERROR_EISCONN = PRELUDE_ERROR_SYSTEM_ERROR | 50, PRELUDE_ERROR_EISDIR = PRELUDE_ERROR_SYSTEM_ERROR | 51, PRELUDE_ERROR_EISNAM = PRELUDE_ERROR_SYSTEM_ERROR | 52, PRELUDE_ERROR_EL2HLT = PRELUDE_ERROR_SYSTEM_ERROR | 53, PRELUDE_ERROR_EL2NSYNC = PRELUDE_ERROR_SYSTEM_ERROR | 54, PRELUDE_ERROR_EL3HLT = PRELUDE_ERROR_SYSTEM_ERROR | 55, PRELUDE_ERROR_EL3RST = PRELUDE_ERROR_SYSTEM_ERROR | 56, PRELUDE_ERROR_ELIBACC = PRELUDE_ERROR_SYSTEM_ERROR | 57, PRELUDE_ERROR_ELIBBAD = PRELUDE_ERROR_SYSTEM_ERROR | 58, PRELUDE_ERROR_ELIBEXEC = PRELUDE_ERROR_SYSTEM_ERROR | 59, PRELUDE_ERROR_ELIBMAX = PRELUDE_ERROR_SYSTEM_ERROR | 60, PRELUDE_ERROR_ELIBSCN = PRELUDE_ERROR_SYSTEM_ERROR | 61, PRELUDE_ERROR_ELNRNG = PRELUDE_ERROR_SYSTEM_ERROR | 62, PRELUDE_ERROR_ELOOP = PRELUDE_ERROR_SYSTEM_ERROR | 63, PRELUDE_ERROR_EMEDIUMTYPE = PRELUDE_ERROR_SYSTEM_ERROR | 64, PRELUDE_ERROR_EMFILE = PRELUDE_ERROR_SYSTEM_ERROR | 65, PRELUDE_ERROR_EMLINK = PRELUDE_ERROR_SYSTEM_ERROR | 66, PRELUDE_ERROR_EMSGSIZE = PRELUDE_ERROR_SYSTEM_ERROR | 67, PRELUDE_ERROR_EMULTIHOP = PRELUDE_ERROR_SYSTEM_ERROR | 68, PRELUDE_ERROR_ENAMETOOLONG = PRELUDE_ERROR_SYSTEM_ERROR | 69, PRELUDE_ERROR_ENAVAIL = PRELUDE_ERROR_SYSTEM_ERROR | 70, PRELUDE_ERROR_ENEEDAUTH = PRELUDE_ERROR_SYSTEM_ERROR | 71, PRELUDE_ERROR_ENETDOWN = PRELUDE_ERROR_SYSTEM_ERROR | 72, PRELUDE_ERROR_ENETRESET = PRELUDE_ERROR_SYSTEM_ERROR | 73, PRELUDE_ERROR_ENETUNREACH = PRELUDE_ERROR_SYSTEM_ERROR | 74, PRELUDE_ERROR_ENFILE = PRELUDE_ERROR_SYSTEM_ERROR | 75, PRELUDE_ERROR_ENOANO = PRELUDE_ERROR_SYSTEM_ERROR | 76, PRELUDE_ERROR_ENOBUFS = PRELUDE_ERROR_SYSTEM_ERROR | 77, PRELUDE_ERROR_ENOCSI = PRELUDE_ERROR_SYSTEM_ERROR | 78, PRELUDE_ERROR_ENODATA = PRELUDE_ERROR_SYSTEM_ERROR | 79, PRELUDE_ERROR_ENODEV = PRELUDE_ERROR_SYSTEM_ERROR | 80, PRELUDE_ERROR_ENOENT = PRELUDE_ERROR_SYSTEM_ERROR | 81, PRELUDE_ERROR_ENOEXEC = PRELUDE_ERROR_SYSTEM_ERROR | 82, PRELUDE_ERROR_ENOLCK = PRELUDE_ERROR_SYSTEM_ERROR | 83, PRELUDE_ERROR_ENOLINK = PRELUDE_ERROR_SYSTEM_ERROR | 84, PRELUDE_ERROR_ENOMEDIUM = PRELUDE_ERROR_SYSTEM_ERROR | 85, PRELUDE_ERROR_ENOMEM = PRELUDE_ERROR_SYSTEM_ERROR | 86, PRELUDE_ERROR_ENOMSG = PRELUDE_ERROR_SYSTEM_ERROR | 87, PRELUDE_ERROR_ENONET = PRELUDE_ERROR_SYSTEM_ERROR | 88, PRELUDE_ERROR_ENOPKG = PRELUDE_ERROR_SYSTEM_ERROR | 89, PRELUDE_ERROR_ENOPROTOOPT = PRELUDE_ERROR_SYSTEM_ERROR | 90, PRELUDE_ERROR_ENOSPC = PRELUDE_ERROR_SYSTEM_ERROR | 91, PRELUDE_ERROR_ENOSR = PRELUDE_ERROR_SYSTEM_ERROR | 92, PRELUDE_ERROR_ENOSTR = PRELUDE_ERROR_SYSTEM_ERROR | 93, PRELUDE_ERROR_ENOSYS = PRELUDE_ERROR_SYSTEM_ERROR | 94, PRELUDE_ERROR_ENOTBLK = PRELUDE_ERROR_SYSTEM_ERROR | 95, PRELUDE_ERROR_ENOTCONN = PRELUDE_ERROR_SYSTEM_ERROR | 96, PRELUDE_ERROR_ENOTDIR = PRELUDE_ERROR_SYSTEM_ERROR | 97, PRELUDE_ERROR_ENOTEMPTY = PRELUDE_ERROR_SYSTEM_ERROR | 98, PRELUDE_ERROR_ENOTNAM = PRELUDE_ERROR_SYSTEM_ERROR | 99, PRELUDE_ERROR_ENOTSOCK = PRELUDE_ERROR_SYSTEM_ERROR | 100, PRELUDE_ERROR_ENOTSUP = PRELUDE_ERROR_SYSTEM_ERROR | 101, PRELUDE_ERROR_ENOTTY = PRELUDE_ERROR_SYSTEM_ERROR | 102, PRELUDE_ERROR_ENOTUNIQ = PRELUDE_ERROR_SYSTEM_ERROR | 103, PRELUDE_ERROR_ENXIO = PRELUDE_ERROR_SYSTEM_ERROR | 104, PRELUDE_ERROR_EOPNOTSUPP = PRELUDE_ERROR_SYSTEM_ERROR | 105, PRELUDE_ERROR_EOVERFLOW = PRELUDE_ERROR_SYSTEM_ERROR | 106, PRELUDE_ERROR_EPERM = PRELUDE_ERROR_SYSTEM_ERROR | 107, PRELUDE_ERROR_EPFNOSUPPORT = PRELUDE_ERROR_SYSTEM_ERROR | 108, PRELUDE_ERROR_EPIPE = PRELUDE_ERROR_SYSTEM_ERROR | 109, PRELUDE_ERROR_EPROCLIM = PRELUDE_ERROR_SYSTEM_ERROR | 110, PRELUDE_ERROR_EPROCUNAVAIL = PRELUDE_ERROR_SYSTEM_ERROR | 111, PRELUDE_ERROR_EPROGMISMATCH = PRELUDE_ERROR_SYSTEM_ERROR | 112, PRELUDE_ERROR_EPROGUNAVAIL = PRELUDE_ERROR_SYSTEM_ERROR | 113, PRELUDE_ERROR_EPROTO = PRELUDE_ERROR_SYSTEM_ERROR | 114, PRELUDE_ERROR_EPROTONOSUPPORT = PRELUDE_ERROR_SYSTEM_ERROR | 115, PRELUDE_ERROR_EPROTOTYPE = PRELUDE_ERROR_SYSTEM_ERROR | 116, PRELUDE_ERROR_ERANGE = PRELUDE_ERROR_SYSTEM_ERROR | 117, PRELUDE_ERROR_EREMCHG = PRELUDE_ERROR_SYSTEM_ERROR | 118, PRELUDE_ERROR_EREMOTE = PRELUDE_ERROR_SYSTEM_ERROR | 119, PRELUDE_ERROR_EREMOTEIO = PRELUDE_ERROR_SYSTEM_ERROR | 120, PRELUDE_ERROR_ERESTART = PRELUDE_ERROR_SYSTEM_ERROR | 121, PRELUDE_ERROR_EROFS = PRELUDE_ERROR_SYSTEM_ERROR | 122, PRELUDE_ERROR_ERPCMISMATCH = PRELUDE_ERROR_SYSTEM_ERROR | 123, PRELUDE_ERROR_ESHUTDOWN = PRELUDE_ERROR_SYSTEM_ERROR | 124, PRELUDE_ERROR_ESOCKTNOSUPPORT = PRELUDE_ERROR_SYSTEM_ERROR | 125, PRELUDE_ERROR_ESPIPE = PRELUDE_ERROR_SYSTEM_ERROR | 126, PRELUDE_ERROR_ESRCH = PRELUDE_ERROR_SYSTEM_ERROR | 127, PRELUDE_ERROR_ESRMNT = PRELUDE_ERROR_SYSTEM_ERROR | 128, PRELUDE_ERROR_ESTALE = PRELUDE_ERROR_SYSTEM_ERROR | 129, PRELUDE_ERROR_ESTRPIPE = PRELUDE_ERROR_SYSTEM_ERROR | 130, PRELUDE_ERROR_ETIME = PRELUDE_ERROR_SYSTEM_ERROR | 131, PRELUDE_ERROR_ETIMEDOUT = PRELUDE_ERROR_SYSTEM_ERROR | 132, PRELUDE_ERROR_ETOOMANYREFS = PRELUDE_ERROR_SYSTEM_ERROR | 133, PRELUDE_ERROR_ETXTBSY = PRELUDE_ERROR_SYSTEM_ERROR | 134, PRELUDE_ERROR_EUCLEAN = PRELUDE_ERROR_SYSTEM_ERROR | 135, PRELUDE_ERROR_EUNATCH = PRELUDE_ERROR_SYSTEM_ERROR | 136, PRELUDE_ERROR_EUSERS = PRELUDE_ERROR_SYSTEM_ERROR | 137, PRELUDE_ERROR_EWOULDBLOCK = PRELUDE_ERROR_SYSTEM_ERROR | 138, PRELUDE_ERROR_EXDEV = PRELUDE_ERROR_SYSTEM_ERROR | 139, PRELUDE_ERROR_EXFULL = PRELUDE_ERROR_SYSTEM_ERROR | 140, } prelude_error_code_t; prelude_error_t prelude_error_ttypedef signed int prelude_error_t; prelude_error_get_code () prelude_error_get_codeprelude_error_code_t prelude_error_get_code (prelude_error_t error); error : A prelude_error_t return value. Returns : the prelude_code_t code contained within the prelude_error_t integer. prelude_error_get_source () prelude_error_get_sourceprelude_error_source_t prelude_error_get_source (prelude_error_t error); error : A prelude_error_t return value. Returns : the prelude_source_t source contained within the prelude_error_t integer. prelude_perror () prelude_perrorvoid prelude_perror (prelude_error_t error, const char *fmt, ...); Print the error to stderr, or to syslog() in case stderr is unavailable. error : A prelude_error_t return value. fmt : Format string. ... : Argument list. prelude_strerror () prelude_strerrorconst char * prelude_strerror (prelude_error_t err); err : Returns : prelude_strsource () prelude_strsourceconst char * prelude_strsource (prelude_error_t err); err : Returns : prelude_error_code_from_errno () prelude_error_code_from_errnoprelude_error_code_t prelude_error_code_from_errno (int err); err : errno value. Returns : the prelude_error_code_t value corresponding to err. prelude_error_make () prelude_error_makeprelude_error_t prelude_error_make (prelude_error_source_t source, prelude_error_code_t code); Create a new prelude_error_t error using source and code. source : Error source. code : Error code. Returns : The created prelude_error_t integer. prelude_error_make_from_errno () prelude_error_make_from_errnoprelude_error_t prelude_error_make_from_errno (prelude_error_source_t source, int err); Create a new prelude_error_t error using source and errno. source : Error source. err : errno value. Returns : The created prelude_error_t integer. prelude_error_verbose_make () prelude_error_verbose_makeprelude_error_t prelude_error_verbose_make (prelude_error_source_t source, prelude_error_code_t code, const char *fmt, ...); Create a new error using source and code, using the detailed error message specified within fmt. source : Error source. code : Error code. fmt : Format string. ... : Argument list. Returns : The created prelude_error_t integer. prelude_error_verbose_make_v () prelude_error_verbose_make_vprelude_error_t prelude_error_verbose_make_v (prelude_error_source_t source, prelude_error_code_t code, const char *fmt, va_list ap); Create a new error using source and code, using the detailed error message specified within fmt. source : Error source. code : Error code. fmt : Format string. ap : Argument list. Returns : The created prelude_error_t integer. prelude_error_code_to_errno () prelude_error_code_to_errnoint prelude_error_code_to_errno (prelude_error_code_t code); code : Error code. Returns : the errno value corresponding to code. prelude_error_is_verbose () prelude_error_is_verboseprelude_bool_t prelude_error_is_verbose (prelude_error_t error); error : A prelude_error_t return value. Returns : PRELUDE_BOOL_TRUE if there is a detailed message for this error, PRELUDE_BOOL_FALSE otherwise. libprelude-1.0.0/docs/api/xml/prelude-list.xml0000664000076400007640000003464011347714756016254 00000000000000 prelude-list 3 LIBPRELUDE Library prelude-list Synopsis #define PRELUDE_LIST (item) prelude_list_t; #define prelude_list_entry (item, type, member) #define prelude_list_for_each (list, pos) #define prelude_list_for_each_safe (list, pos, bkp) #define prelude_list_for_each_reversed (list, pos) #define prelude_list_for_each_reversed_safe (list, pos, bkp) #define prelude_list_for_each_continue (list, pos) #define prelude_list_for_each_continue_safe (list, pos, bkp) #define prelude_list_get_next (list, pos, class, member) #define prelude_list_get_next_safe (list, pos, bkp, class, member) Description Details PRELUDE_LIST() PRELUDE_LIST#define PRELUDE_LIST(item) prelude_list_t (item) = { &(item), &(item) } item : prelude_list_t prelude_list_ttypedef struct { struct prelude_list *next; struct prelude_list *prev; } prelude_list_t; prelude_list_entry() prelude_list_entry#define prelude_list_entry(item, type, member) Retrieve the entry of type type from the prelude_list_t object tmp, using the item list member member. Returns the entry associated with item. item : Pointer to a prelude_list_t object to retrieve the entry from. type : Type of the entry to retrieve. member : List member in type used to link it to a list. prelude_list_for_each() prelude_list_for_each#define prelude_list_for_each(list, pos) Iterate through all list entry. prelude_list_entry() can be used to retrieve and entry from the pos pointer. It is not safe to call prelude_list_del() while iterating using this function, see prelude_list_for_each_safe(). list : Pointer to a prelude_list_t list. pos : Pointer to a prelude_list_t object pointing to the current list member. prelude_list_for_each_safe() prelude_list_for_each_safe#define prelude_list_for_each_safe(list, pos, bkp) Iterate through all list entry. prelude_list_entry() can be used to retrieve and entry from the pos pointer. Calling prelude_list_del() while iterating the list is safe. list : Pointer to a prelude_list_t list. pos : Pointer to a prelude_list_t object pointing to the current list member. bkp : Pointer to a prelude_list_t object pointing to the next list member. prelude_list_for_each_reversed() prelude_list_for_each_reversed#define prelude_list_for_each_reversed(list, pos) Iterate through all list entry in reverse order. prelude_list_entry() can be used to retrieve and entry from the pos pointer. It is not safe to call prelude_list_del() while iterating using this function, see prelude_list_for_each_reversed_safe(). list : Pointer to a prelude_list_t list. pos : Pointer to a prelude_list_t object pointing to the current list member. prelude_list_for_each_reversed_safe() prelude_list_for_each_reversed_safe#define prelude_list_for_each_reversed_safe(list, pos, bkp) Iterate through all list entry in reverse order. prelude_list_entry() can be used to retrieve and entry from the pos pointer. Calling prelude_list_del() while iterating the list is safe. list : Pointer to a prelude_list_t list. pos : Pointer to a prelude_list_t object pointing to the current list member. bkp : Pointer to a prelude_list_t object pointing to the next list member. prelude_list_for_each_continue() prelude_list_for_each_continue#define prelude_list_for_each_continue(list, pos) Iterate through all list entry starting from pos if it is not NULL, or from the start of list if it is. prelude_list_entry() can be used to retrieve and entry from the pos pointer. Calling prelude_list_del() while iterating the list is not safe. list : Pointer to a prelude_list_t list. pos : Pointer to a prelude_list_t object pointing to the current list member. prelude_list_for_each_continue_safe() prelude_list_for_each_continue_safe#define prelude_list_for_each_continue_safe(list, pos, bkp) Iterate through all list entry starting from pos if it is not NULL, or from the start of list if it is. prelude_list_entry() can be used to retrieve and entry from the pos pointer. Calling prelude_list_del() while iterating the list is safe. list : Pointer to a prelude_list_t list. pos : Pointer to a prelude_list_t object pointing to the current list member. bkp : Pointer to a prelude_list_t object pointing to the next list member. prelude_list_get_next() prelude_list_get_next#define prelude_list_get_next(list, pos, class, member) list : pos : class : member : prelude_list_get_next_safe() prelude_list_get_next_safe#define prelude_list_get_next_safe(list, pos, bkp, class, member) list : pos : bkp : class : member : libprelude-1.0.0/docs/api/xml/prelude-failover.xml0000664000076400007640000003317711347714755017113 00000000000000 prelude-failover 3 LIBPRELUDE Library prelude-failover Synopsis typedef prelude_failover_t; void prelude_failover_destroy (prelude_failover_t *failover); int prelude_failover_new (prelude_failover_t **ret, const char *dirname); void prelude_failover_set_quota (prelude_failover_t *failover, size_t limit); int prelude_failover_save_msg (prelude_failover_t *failover, prelude_msg_t *msg); ssize_t prelude_failover_get_saved_msg (prelude_failover_t *failover, prelude_msg_t **out); unsigned long prelude_failover_get_deleted_msg_count (prelude_failover_t *failover); unsigned long prelude_failover_get_available_msg_count (prelude_failover_t *failover); int prelude_failover_commit (prelude_failover_t *failover, prelude_msg_t *msg); void prelude_failover_disable_transaction (prelude_failover_t *failover); void prelude_failover_enable_transaction (prelude_failover_t *failover); int prelude_failover_rollback (prelude_failover_t *failover, prelude_msg_t *msg); Description Details prelude_failover_t prelude_failover_ttypedef struct prelude_failover prelude_failover_t; prelude_failover_destroy () prelude_failover_destroyvoid prelude_failover_destroy (prelude_failover_t *failover); failover : prelude_failover_new () prelude_failover_newint prelude_failover_new (prelude_failover_t **ret, const char *dirname); ret : dirname : Returns : prelude_failover_set_quota () prelude_failover_set_quotavoid prelude_failover_set_quota (prelude_failover_t *failover, size_t limit); failover : limit : prelude_failover_save_msg () prelude_failover_save_msgint prelude_failover_save_msg (prelude_failover_t *failover, prelude_msg_t *msg); failover : msg : Returns : prelude_failover_get_saved_msg () prelude_failover_get_saved_msgssize_t prelude_failover_get_saved_msg (prelude_failover_t *failover, prelude_msg_t **out); failover : out : Returns : prelude_failover_get_deleted_msg_count () prelude_failover_get_deleted_msg_countunsigned long prelude_failover_get_deleted_msg_count (prelude_failover_t *failover); failover : Returns : prelude_failover_get_available_msg_count () prelude_failover_get_available_msg_countunsigned long prelude_failover_get_available_msg_count (prelude_failover_t *failover); failover : Returns : prelude_failover_commit () prelude_failover_commitint prelude_failover_commit (prelude_failover_t *failover, prelude_msg_t *msg); failover : msg : Returns : prelude_failover_disable_transaction () prelude_failover_disable_transactionvoid prelude_failover_disable_transaction (prelude_failover_t *failover); failover : prelude_failover_enable_transaction () prelude_failover_enable_transactionvoid prelude_failover_enable_transaction (prelude_failover_t *failover); failover : prelude_failover_rollback () prelude_failover_rollbackint prelude_failover_rollback (prelude_failover_t *failover, prelude_msg_t *msg); failover : msg : Returns : libprelude-1.0.0/docs/api/xml/idmef-tree-wrap.xml0000664000076400007640000426603111347714755016637 00000000000000 idmef-tree-wrap 3 LIBPRELUDE Library idmef-tree-wrap Generating events using the low level IDMEF API Synopsis #define IDMEF_LIST_APPEND #define IDMEF_LIST_PREPEND int idmef_message_get_data (idmef_message_t *message, const char *path, unsigned char **data, size_t *size); int idmef_message_get_number (idmef_message_t *message, const char *path, double *result); int idmef_message_get_string (idmef_message_t *message, const char *path, char **result); int idmef_message_get_value (idmef_message_t *message, const char *path, idmef_value_t **value); int idmef_message_set_data (idmef_message_t *message, const char *path, unsigned char *data, size_t size); int idmef_message_set_number (idmef_message_t *message, const char *path, double number); int idmef_message_set_string (idmef_message_t *message, const char *path, const char *value); int idmef_message_set_value (idmef_message_t *message, const char *path, idmef_value_t *value); enum idmef_additional_data_type_t; idmef_additional_data_type_t idmef_additional_data_type_to_numeric (const char *name); const char * idmef_additional_data_type_to_string (idmef_additional_data_type_t val); typedef idmef_additional_data_t; int idmef_additional_data_new (idmef_additional_data_t **ret); int idmef_additional_data_copy (const idmef_additional_data_t *src, idmef_additional_data_t *dst); int idmef_additional_data_clone (idmef_additional_data_t *src, idmef_additional_data_t **dst); idmef_additional_data_t * idmef_additional_data_ref (idmef_additional_data_t *additional_data); void idmef_additional_data_destroy (idmef_additional_data_t *ptr); idmef_additional_data_type_t idmef_additional_data_get_type (idmef_additional_data_t *ptr); void idmef_additional_data_set_type (idmef_additional_data_t *ptr, idmef_additional_data_type_t type); int idmef_additional_data_new_type (idmef_additional_data_t *ptr, idmef_additional_data_type_t **ret); prelude_string_t * idmef_additional_data_get_meaning (idmef_additional_data_t *ptr); void idmef_additional_data_set_meaning (idmef_additional_data_t *ptr, prelude_string_t *meaning); int idmef_additional_data_new_meaning (idmef_additional_data_t *ptr, prelude_string_t **ret); idmef_data_t * idmef_additional_data_get_data (idmef_additional_data_t *ptr); void idmef_additional_data_set_data (idmef_additional_data_t *ptr, idmef_data_t *data); int idmef_additional_data_new_data (idmef_additional_data_t *ptr, idmef_data_t **ret); enum idmef_reference_origin_t; idmef_reference_origin_t idmef_reference_origin_to_numeric (const char *name); const char * idmef_reference_origin_to_string (idmef_reference_origin_t val); typedef idmef_reference_t; int idmef_reference_new (idmef_reference_t **ret); int idmef_reference_copy (const idmef_reference_t *src, idmef_reference_t *dst); int idmef_reference_clone (idmef_reference_t *src, idmef_reference_t **dst); idmef_reference_t * idmef_reference_ref (idmef_reference_t *reference); void idmef_reference_destroy (idmef_reference_t *ptr); idmef_reference_origin_t idmef_reference_get_origin (idmef_reference_t *ptr); void idmef_reference_set_origin (idmef_reference_t *ptr, idmef_reference_origin_t origin); int idmef_reference_new_origin (idmef_reference_t *ptr, idmef_reference_origin_t **ret); prelude_string_t * idmef_reference_get_name (idmef_reference_t *ptr); void idmef_reference_set_name (idmef_reference_t *ptr, prelude_string_t *name); int idmef_reference_new_name (idmef_reference_t *ptr, prelude_string_t **ret); prelude_string_t * idmef_reference_get_url (idmef_reference_t *ptr); void idmef_reference_set_url (idmef_reference_t *ptr, prelude_string_t *url); int idmef_reference_new_url (idmef_reference_t *ptr, prelude_string_t **ret); prelude_string_t * idmef_reference_get_meaning (idmef_reference_t *ptr); void idmef_reference_set_meaning (idmef_reference_t *ptr, prelude_string_t *meaning); int idmef_reference_new_meaning (idmef_reference_t *ptr, prelude_string_t **ret); typedef idmef_classification_t; int idmef_classification_new (idmef_classification_t **ret); int idmef_classification_copy (const idmef_classification_t *src, idmef_classification_t *dst); int idmef_classification_clone (idmef_classification_t *src, idmef_classification_t **dst); idmef_classification_t * idmef_classification_ref (idmef_classification_t *classification); void idmef_classification_destroy (idmef_classification_t *ptr); prelude_string_t * idmef_classification_get_ident (idmef_classification_t *ptr); void idmef_classification_set_ident (idmef_classification_t *ptr, prelude_string_t *ident); int idmef_classification_new_ident (idmef_classification_t *ptr, prelude_string_t **ret); prelude_string_t * idmef_classification_get_text (idmef_classification_t *ptr); void idmef_classification_set_text (idmef_classification_t *ptr, prelude_string_t *text); int idmef_classification_new_text (idmef_classification_t *ptr, prelude_string_t **ret); idmef_reference_t * idmef_classification_get_next_reference (idmef_classification_t *classification, idmef_reference_t *reference_cur); void idmef_classification_set_reference (idmef_classification_t *ptr, idmef_reference_t *object, int pos); int idmef_classification_new_reference (idmef_classification_t *ptr, idmef_reference_t **ret, int pos); enum idmef_user_id_type_t; idmef_user_id_type_t idmef_user_id_type_to_numeric (const char *name); const char * idmef_user_id_type_to_string (idmef_user_id_type_t val); typedef idmef_user_id_t; int idmef_user_id_new (idmef_user_id_t **ret); int idmef_user_id_copy (const idmef_user_id_t *src, idmef_user_id_t *dst); int idmef_user_id_clone (idmef_user_id_t *src, idmef_user_id_t **dst); idmef_user_id_t * idmef_user_id_ref (idmef_user_id_t *user_id); void idmef_user_id_destroy (idmef_user_id_t *ptr); prelude_string_t * idmef_user_id_get_ident (idmef_user_id_t *ptr); void idmef_user_id_set_ident (idmef_user_id_t *ptr, prelude_string_t *ident); int idmef_user_id_new_ident (idmef_user_id_t *ptr, prelude_string_t **ret); idmef_user_id_type_t idmef_user_id_get_type (idmef_user_id_t *ptr); void idmef_user_id_set_type (idmef_user_id_t *ptr, idmef_user_id_type_t type); int idmef_user_id_new_type (idmef_user_id_t *ptr, idmef_user_id_type_t **ret); prelude_string_t * idmef_user_id_get_tty (idmef_user_id_t *ptr); void idmef_user_id_set_tty (idmef_user_id_t *ptr, prelude_string_t *tty); int idmef_user_id_new_tty (idmef_user_id_t *ptr, prelude_string_t **ret); prelude_string_t * idmef_user_id_get_name (idmef_user_id_t *ptr); void idmef_user_id_set_name (idmef_user_id_t *ptr, prelude_string_t *name); int idmef_user_id_new_name (idmef_user_id_t *ptr, prelude_string_t **ret); void idmef_user_id_unset_number (idmef_user_id_t *ptr); uint32_t * idmef_user_id_get_number (idmef_user_id_t *ptr); void idmef_user_id_set_number (idmef_user_id_t *ptr, uint32_t number); int idmef_user_id_new_number (idmef_user_id_t *ptr, uint32_t **ret); enum idmef_user_category_t; idmef_user_category_t idmef_user_category_to_numeric (const char *name); const char * idmef_user_category_to_string (idmef_user_category_t val); typedef idmef_user_t; int idmef_user_new (idmef_user_t **ret); int idmef_user_copy (const idmef_user_t *src, idmef_user_t *dst); int idmef_user_clone (idmef_user_t *src, idmef_user_t **dst); idmef_user_t * idmef_user_ref (idmef_user_t *user); void idmef_user_destroy (idmef_user_t *ptr); prelude_string_t * idmef_user_get_ident (idmef_user_t *ptr); void idmef_user_set_ident (idmef_user_t *ptr, prelude_string_t *ident); int idmef_user_new_ident (idmef_user_t *ptr, prelude_string_t **ret); idmef_user_category_t idmef_user_get_category (idmef_user_t *ptr); void idmef_user_set_category (idmef_user_t *ptr, idmef_user_category_t category); int idmef_user_new_category (idmef_user_t *ptr, idmef_user_category_t **ret); idmef_user_id_t * idmef_user_get_next_user_id (idmef_user_t *user, idmef_user_id_t *user_id_cur); void idmef_user_set_user_id (idmef_user_t *ptr, idmef_user_id_t *object, int pos); int idmef_user_new_user_id (idmef_user_t *ptr, idmef_user_id_t **ret, int pos); enum idmef_address_category_t; idmef_address_category_t idmef_address_category_to_numeric (const char *name); const char * idmef_address_category_to_string (idmef_address_category_t val); typedef idmef_address_t; int idmef_address_new (idmef_address_t **ret); int idmef_address_copy (const idmef_address_t *src, idmef_address_t *dst); int idmef_address_clone (idmef_address_t *src, idmef_address_t **dst); idmef_address_t * idmef_address_ref (idmef_address_t *address); void idmef_address_destroy (idmef_address_t *ptr); prelude_string_t * idmef_address_get_ident (idmef_address_t *ptr); void idmef_address_set_ident (idmef_address_t *ptr, prelude_string_t *ident); int idmef_address_new_ident (idmef_address_t *ptr, prelude_string_t **ret); idmef_address_category_t idmef_address_get_category (idmef_address_t *ptr); void idmef_address_set_category (idmef_address_t *ptr, idmef_address_category_t category); int idmef_address_new_category (idmef_address_t *ptr, idmef_address_category_t **ret); prelude_string_t * idmef_address_get_vlan_name (idmef_address_t *ptr); void idmef_address_set_vlan_name (idmef_address_t *ptr, prelude_string_t *vlan_name); int idmef_address_new_vlan_name (idmef_address_t *ptr, prelude_string_t **ret); void idmef_address_unset_vlan_num (idmef_address_t *ptr); int32_t * idmef_address_get_vlan_num (idmef_address_t *ptr); void idmef_address_set_vlan_num (idmef_address_t *ptr, int32_t vlan_num); int idmef_address_new_vlan_num (idmef_address_t *ptr, int32_t **ret); prelude_string_t * idmef_address_get_address (idmef_address_t *ptr); void idmef_address_set_address (idmef_address_t *ptr, prelude_string_t *address); int idmef_address_new_address (idmef_address_t *ptr, prelude_string_t **ret); prelude_string_t * idmef_address_get_netmask (idmef_address_t *ptr); void idmef_address_set_netmask (idmef_address_t *ptr, prelude_string_t *netmask); int idmef_address_new_netmask (idmef_address_t *ptr, prelude_string_t **ret); typedef idmef_process_t; int idmef_process_new (idmef_process_t **ret); int idmef_process_copy (const idmef_process_t *src, idmef_process_t *dst); int idmef_process_clone (idmef_process_t *src, idmef_process_t **dst); idmef_process_t * idmef_process_ref (idmef_process_t *process); void idmef_process_destroy (idmef_process_t *ptr); prelude_string_t * idmef_process_get_ident (idmef_process_t *ptr); void idmef_process_set_ident (idmef_process_t *ptr, prelude_string_t *ident); int idmef_process_new_ident (idmef_process_t *ptr, prelude_string_t **ret); prelude_string_t * idmef_process_get_name (idmef_process_t *ptr); void idmef_process_set_name (idmef_process_t *ptr, prelude_string_t *name); int idmef_process_new_name (idmef_process_t *ptr, prelude_string_t **ret); void idmef_process_unset_pid (idmef_process_t *ptr); uint32_t * idmef_process_get_pid (idmef_process_t *ptr); void idmef_process_set_pid (idmef_process_t *ptr, uint32_t pid); int idmef_process_new_pid (idmef_process_t *ptr, uint32_t **ret); prelude_string_t * idmef_process_get_path (idmef_process_t *ptr); void idmef_process_set_path (idmef_process_t *ptr, prelude_string_t *path); int idmef_process_new_path (idmef_process_t *ptr, prelude_string_t **ret); prelude_string_t * idmef_process_get_next_arg (idmef_process_t *process, prelude_string_t *prelude_string_cur); void idmef_process_set_arg (idmef_process_t *ptr, prelude_string_t *object, int pos); int idmef_process_new_arg (idmef_process_t *ptr, prelude_string_t **ret, int pos); prelude_string_t * idmef_process_get_next_env (idmef_process_t *process, prelude_string_t *prelude_string_cur); void idmef_process_set_env (idmef_process_t *ptr, prelude_string_t *object, int pos); int idmef_process_new_env (idmef_process_t *ptr, prelude_string_t **ret, int pos); typedef idmef_web_service_t; int idmef_web_service_new (idmef_web_service_t **ret); int idmef_web_service_copy (const idmef_web_service_t *src, idmef_web_service_t *dst); int idmef_web_service_clone (idmef_web_service_t *src, idmef_web_service_t **dst); idmef_web_service_t * idmef_web_service_ref (idmef_web_service_t *web_service); void idmef_web_service_destroy (idmef_web_service_t *ptr); prelude_string_t * idmef_web_service_get_url (idmef_web_service_t *ptr); void idmef_web_service_set_url (idmef_web_service_t *ptr, prelude_string_t *url); int idmef_web_service_new_url (idmef_web_service_t *ptr, prelude_string_t **ret); prelude_string_t * idmef_web_service_get_cgi (idmef_web_service_t *ptr); void idmef_web_service_set_cgi (idmef_web_service_t *ptr, prelude_string_t *cgi); int idmef_web_service_new_cgi (idmef_web_service_t *ptr, prelude_string_t **ret); prelude_string_t * idmef_web_service_get_http_method (idmef_web_service_t *ptr); void idmef_web_service_set_http_method (idmef_web_service_t *ptr, prelude_string_t *http_method); int idmef_web_service_new_http_method (idmef_web_service_t *ptr, prelude_string_t **ret); prelude_string_t * idmef_web_service_get_next_arg (idmef_web_service_t *web_service, prelude_string_t *prelude_string_cur); void idmef_web_service_set_arg (idmef_web_service_t *ptr, prelude_string_t *object, int pos); int idmef_web_service_new_arg (idmef_web_service_t *ptr, prelude_string_t **ret, int pos); typedef idmef_snmp_service_t; int idmef_snmp_service_new (idmef_snmp_service_t **ret); int idmef_snmp_service_copy (const idmef_snmp_service_t *src, idmef_snmp_service_t *dst); int idmef_snmp_service_clone (idmef_snmp_service_t *src, idmef_snmp_service_t **dst); idmef_snmp_service_t * idmef_snmp_service_ref (idmef_snmp_service_t *snmp_service); void idmef_snmp_service_destroy (idmef_snmp_service_t *ptr); prelude_string_t * idmef_snmp_service_get_oid (idmef_snmp_service_t *ptr); void idmef_snmp_service_set_oid (idmef_snmp_service_t *ptr, prelude_string_t *oid); int idmef_snmp_service_new_oid (idmef_snmp_service_t *ptr, prelude_string_t **ret); void idmef_snmp_service_unset_message_processing_model (idmef_snmp_service_t *ptr); uint32_t * idmef_snmp_service_get_message_processing_model (idmef_snmp_service_t *ptr); void idmef_snmp_service_set_message_processing_model (idmef_snmp_service_t *ptr, uint32_t message_processing_model); int idmef_snmp_service_new_message_processing_model (idmef_snmp_service_t *ptr, uint32_t **ret); void idmef_snmp_service_unset_security_model (idmef_snmp_service_t *ptr); uint32_t * idmef_snmp_service_get_security_model (idmef_snmp_service_t *ptr); void idmef_snmp_service_set_security_model (idmef_snmp_service_t *ptr, uint32_t security_model); int idmef_snmp_service_new_security_model (idmef_snmp_service_t *ptr, uint32_t **ret); prelude_string_t * idmef_snmp_service_get_security_name (idmef_snmp_service_t *ptr); void idmef_snmp_service_set_security_name (idmef_snmp_service_t *ptr, prelude_string_t *security_name); int idmef_snmp_service_new_security_name (idmef_snmp_service_t *ptr, prelude_string_t **ret); void idmef_snmp_service_unset_security_level (idmef_snmp_service_t *ptr); uint32_t * idmef_snmp_service_get_security_level (idmef_snmp_service_t *ptr); void idmef_snmp_service_set_security_level (idmef_snmp_service_t *ptr, uint32_t security_level); int idmef_snmp_service_new_security_level (idmef_snmp_service_t *ptr, uint32_t **ret); prelude_string_t * idmef_snmp_service_get_context_name (idmef_snmp_service_t *ptr); void idmef_snmp_service_set_context_name (idmef_snmp_service_t *ptr, prelude_string_t *context_name); int idmef_snmp_service_new_context_name (idmef_snmp_service_t *ptr, prelude_string_t **ret); prelude_string_t * idmef_snmp_service_get_context_engine_id (idmef_snmp_service_t *ptr); void idmef_snmp_service_set_context_engine_id (idmef_snmp_service_t *ptr, prelude_string_t *context_engine_id); int idmef_snmp_service_new_context_engine_id (idmef_snmp_service_t *ptr, prelude_string_t **ret); prelude_string_t * idmef_snmp_service_get_command (idmef_snmp_service_t *ptr); void idmef_snmp_service_set_command (idmef_snmp_service_t *ptr, prelude_string_t *command); int idmef_snmp_service_new_command (idmef_snmp_service_t *ptr, prelude_string_t **ret); prelude_string_t * idmef_snmp_service_get_community (idmef_snmp_service_t *ptr); void idmef_snmp_service_set_community (idmef_snmp_service_t *ptr, prelude_string_t *community); int idmef_snmp_service_new_community (idmef_snmp_service_t *ptr, prelude_string_t **ret); enum idmef_service_type_t; idmef_service_type_t idmef_service_type_to_numeric (const char *name); const char * idmef_service_type_to_string (idmef_service_type_t val); typedef idmef_service_t; int idmef_service_new (idmef_service_t **ret); int idmef_service_copy (const idmef_service_t *src, idmef_service_t *dst); int idmef_service_clone (idmef_service_t *src, idmef_service_t **dst); idmef_service_t * idmef_service_ref (idmef_service_t *service); void idmef_service_destroy (idmef_service_t *ptr); prelude_string_t * idmef_service_get_ident (idmef_service_t *ptr); void idmef_service_set_ident (idmef_service_t *ptr, prelude_string_t *ident); int idmef_service_new_ident (idmef_service_t *ptr, prelude_string_t **ret); void idmef_service_unset_ip_version (idmef_service_t *ptr); uint8_t * idmef_service_get_ip_version (idmef_service_t *ptr); void idmef_service_set_ip_version (idmef_service_t *ptr, uint8_t ip_version); int idmef_service_new_ip_version (idmef_service_t *ptr, uint8_t **ret); void idmef_service_unset_iana_protocol_number (idmef_service_t *ptr); uint8_t * idmef_service_get_iana_protocol_number (idmef_service_t *ptr); void idmef_service_set_iana_protocol_number (idmef_service_t *ptr, uint8_t iana_protocol_number); int idmef_service_new_iana_protocol_number (idmef_service_t *ptr, uint8_t **ret); prelude_string_t * idmef_service_get_iana_protocol_name (idmef_service_t *ptr); void idmef_service_set_iana_protocol_name (idmef_service_t *ptr, prelude_string_t *iana_protocol_name); int idmef_service_new_iana_protocol_name (idmef_service_t *ptr, prelude_string_t **ret); prelude_string_t * idmef_service_get_name (idmef_service_t *ptr); void idmef_service_set_name (idmef_service_t *ptr, prelude_string_t *name); int idmef_service_new_name (idmef_service_t *ptr, prelude_string_t **ret); void idmef_service_unset_port (idmef_service_t *ptr); uint16_t * idmef_service_get_port (idmef_service_t *ptr); void idmef_service_set_port (idmef_service_t *ptr, uint16_t port); int idmef_service_new_port (idmef_service_t *ptr, uint16_t **ret); prelude_string_t * idmef_service_get_portlist (idmef_service_t *ptr); void idmef_service_set_portlist (idmef_service_t *ptr, prelude_string_t *portlist); int idmef_service_new_portlist (idmef_service_t *ptr, prelude_string_t **ret); prelude_string_t * idmef_service_get_protocol (idmef_service_t *ptr); void idmef_service_set_protocol (idmef_service_t *ptr, prelude_string_t *protocol); int idmef_service_new_protocol (idmef_service_t *ptr, prelude_string_t **ret); idmef_service_type_t idmef_service_get_type (idmef_service_t *ptr); idmef_web_service_t * idmef_service_get_web_service (idmef_service_t *ptr); void idmef_service_set_web_service (idmef_service_t *ptr, idmef_web_service_t *web_service); int idmef_service_new_web_service (idmef_service_t *ptr, idmef_web_service_t **ret); idmef_snmp_service_t * idmef_service_get_snmp_service (idmef_service_t *ptr); void idmef_service_set_snmp_service (idmef_service_t *ptr, idmef_snmp_service_t *snmp_service); int idmef_service_new_snmp_service (idmef_service_t *ptr, idmef_snmp_service_t **ret); enum idmef_node_category_t; idmef_node_category_t idmef_node_category_to_numeric (const char *name); const char * idmef_node_category_to_string (idmef_node_category_t val); typedef idmef_node_t; int idmef_node_new (idmef_node_t **ret); int idmef_node_copy (const idmef_node_t *src, idmef_node_t *dst); int idmef_node_clone (idmef_node_t *src, idmef_node_t **dst); idmef_node_t * idmef_node_ref (idmef_node_t *node); void idmef_node_destroy (idmef_node_t *ptr); prelude_string_t * idmef_node_get_ident (idmef_node_t *ptr); void idmef_node_set_ident (idmef_node_t *ptr, prelude_string_t *ident); int idmef_node_new_ident (idmef_node_t *ptr, prelude_string_t **ret); idmef_node_category_t idmef_node_get_category (idmef_node_t *ptr); void idmef_node_set_category (idmef_node_t *ptr, idmef_node_category_t category); int idmef_node_new_category (idmef_node_t *ptr, idmef_node_category_t **ret); prelude_string_t * idmef_node_get_location (idmef_node_t *ptr); void idmef_node_set_location (idmef_node_t *ptr, prelude_string_t *location); int idmef_node_new_location (idmef_node_t *ptr, prelude_string_t **ret); prelude_string_t * idmef_node_get_name (idmef_node_t *ptr); void idmef_node_set_name (idmef_node_t *ptr, prelude_string_t *name); int idmef_node_new_name (idmef_node_t *ptr, prelude_string_t **ret); idmef_address_t * idmef_node_get_next_address (idmef_node_t *node, idmef_address_t *address_cur); void idmef_node_set_address (idmef_node_t *ptr, idmef_address_t *object, int pos); int idmef_node_new_address (idmef_node_t *ptr, idmef_address_t **ret, int pos); enum idmef_source_spoofed_t; idmef_source_spoofed_t idmef_source_spoofed_to_numeric (const char *name); const char * idmef_source_spoofed_to_string (idmef_source_spoofed_t val); typedef idmef_source_t; int idmef_source_new (idmef_source_t **ret); int idmef_source_copy (const idmef_source_t *src, idmef_source_t *dst); int idmef_source_clone (idmef_source_t *src, idmef_source_t **dst); idmef_source_t * idmef_source_ref (idmef_source_t *source); void idmef_source_destroy (idmef_source_t *ptr); prelude_string_t * idmef_source_get_ident (idmef_source_t *ptr); void idmef_source_set_ident (idmef_source_t *ptr, prelude_string_t *ident); int idmef_source_new_ident (idmef_source_t *ptr, prelude_string_t **ret); idmef_source_spoofed_t idmef_source_get_spoofed (idmef_source_t *ptr); void idmef_source_set_spoofed (idmef_source_t *ptr, idmef_source_spoofed_t spoofed); int idmef_source_new_spoofed (idmef_source_t *ptr, idmef_source_spoofed_t **ret); prelude_string_t * idmef_source_get_interface (idmef_source_t *ptr); void idmef_source_set_interface (idmef_source_t *ptr, prelude_string_t *interface); int idmef_source_new_interface (idmef_source_t *ptr, prelude_string_t **ret); idmef_node_t * idmef_source_get_node (idmef_source_t *ptr); void idmef_source_set_node (idmef_source_t *ptr, idmef_node_t *node); int idmef_source_new_node (idmef_source_t *ptr, idmef_node_t **ret); idmef_user_t * idmef_source_get_user (idmef_source_t *ptr); void idmef_source_set_user (idmef_source_t *ptr, idmef_user_t *user); int idmef_source_new_user (idmef_source_t *ptr, idmef_user_t **ret); idmef_process_t * idmef_source_get_process (idmef_source_t *ptr); void idmef_source_set_process (idmef_source_t *ptr, idmef_process_t *process); int idmef_source_new_process (idmef_source_t *ptr, idmef_process_t **ret); idmef_service_t * idmef_source_get_service (idmef_source_t *ptr); void idmef_source_set_service (idmef_source_t *ptr, idmef_service_t *service); int idmef_source_new_service (idmef_source_t *ptr, idmef_service_t **ret); typedef idmef_file_access_t; int idmef_file_access_new (idmef_file_access_t **ret); int idmef_file_access_copy (const idmef_file_access_t *src, idmef_file_access_t *dst); int idmef_file_access_clone (idmef_file_access_t *src, idmef_file_access_t **dst); idmef_file_access_t * idmef_file_access_ref (idmef_file_access_t *file_access); void idmef_file_access_destroy (idmef_file_access_t *ptr); idmef_user_id_t * idmef_file_access_get_user_id (idmef_file_access_t *ptr); void idmef_file_access_set_user_id (idmef_file_access_t *ptr, idmef_user_id_t *user_id); int idmef_file_access_new_user_id (idmef_file_access_t *ptr, idmef_user_id_t **ret); prelude_string_t * idmef_file_access_get_next_permission (idmef_file_access_t *file_access, prelude_string_t *prelude_string_cur); void idmef_file_access_set_permission (idmef_file_access_t *ptr, prelude_string_t *object, int pos); int idmef_file_access_new_permission (idmef_file_access_t *ptr, prelude_string_t **ret, int pos); typedef idmef_inode_t; int idmef_inode_new (idmef_inode_t **ret); int idmef_inode_copy (const idmef_inode_t *src, idmef_inode_t *dst); int idmef_inode_clone (idmef_inode_t *src, idmef_inode_t **dst); idmef_inode_t * idmef_inode_ref (idmef_inode_t *inode); void idmef_inode_destroy (idmef_inode_t *ptr); idmef_time_t * idmef_inode_get_change_time (idmef_inode_t *ptr); void idmef_inode_set_change_time (idmef_inode_t *ptr, idmef_time_t *change_time); int idmef_inode_new_change_time (idmef_inode_t *ptr, idmef_time_t **ret); void idmef_inode_unset_number (idmef_inode_t *ptr); uint32_t * idmef_inode_get_number (idmef_inode_t *ptr); void idmef_inode_set_number (idmef_inode_t *ptr, uint32_t number); int idmef_inode_new_number (idmef_inode_t *ptr, uint32_t **ret); void idmef_inode_unset_major_device (idmef_inode_t *ptr); uint32_t * idmef_inode_get_major_device (idmef_inode_t *ptr); void idmef_inode_set_major_device (idmef_inode_t *ptr, uint32_t major_device); int idmef_inode_new_major_device (idmef_inode_t *ptr, uint32_t **ret); void idmef_inode_unset_minor_device (idmef_inode_t *ptr); uint32_t * idmef_inode_get_minor_device (idmef_inode_t *ptr); void idmef_inode_set_minor_device (idmef_inode_t *ptr, uint32_t minor_device); int idmef_inode_new_minor_device (idmef_inode_t *ptr, uint32_t **ret); void idmef_inode_unset_c_major_device (idmef_inode_t *ptr); uint32_t * idmef_inode_get_c_major_device (idmef_inode_t *ptr); void idmef_inode_set_c_major_device (idmef_inode_t *ptr, uint32_t c_major_device); int idmef_inode_new_c_major_device (idmef_inode_t *ptr, uint32_t **ret); void idmef_inode_unset_c_minor_device (idmef_inode_t *ptr); uint32_t * idmef_inode_get_c_minor_device (idmef_inode_t *ptr); void idmef_inode_set_c_minor_device (idmef_inode_t *ptr, uint32_t c_minor_device); int idmef_inode_new_c_minor_device (idmef_inode_t *ptr, uint32_t **ret); typedef idmef_linkage_t; enum idmef_checksum_algorithm_t; idmef_checksum_algorithm_t idmef_checksum_algorithm_to_numeric (const char *name); const char * idmef_checksum_algorithm_to_string (idmef_checksum_algorithm_t val); typedef idmef_checksum_t; int idmef_checksum_new (idmef_checksum_t **ret); int idmef_checksum_copy (const idmef_checksum_t *src, idmef_checksum_t *dst); int idmef_checksum_clone (idmef_checksum_t *src, idmef_checksum_t **dst); idmef_checksum_t * idmef_checksum_ref (idmef_checksum_t *checksum); void idmef_checksum_destroy (idmef_checksum_t *ptr); prelude_string_t * idmef_checksum_get_value (idmef_checksum_t *ptr); void idmef_checksum_set_value (idmef_checksum_t *ptr, prelude_string_t *value); int idmef_checksum_new_value (idmef_checksum_t *ptr, prelude_string_t **ret); prelude_string_t * idmef_checksum_get_key (idmef_checksum_t *ptr); void idmef_checksum_set_key (idmef_checksum_t *ptr, prelude_string_t *key); int idmef_checksum_new_key (idmef_checksum_t *ptr, prelude_string_t **ret); idmef_checksum_algorithm_t idmef_checksum_get_algorithm (idmef_checksum_t *ptr); void idmef_checksum_set_algorithm (idmef_checksum_t *ptr, idmef_checksum_algorithm_t algorithm); int idmef_checksum_new_algorithm (idmef_checksum_t *ptr, idmef_checksum_algorithm_t **ret); enum idmef_file_category_t; idmef_file_category_t idmef_file_category_to_numeric (const char *name); const char * idmef_file_category_to_string (idmef_file_category_t val); enum idmef_file_fstype_t; idmef_file_fstype_t idmef_file_fstype_to_numeric (const char *name); const char * idmef_file_fstype_to_string (idmef_file_fstype_t val); typedef idmef_file_t; int idmef_file_new (idmef_file_t **ret); int idmef_file_copy (const idmef_file_t *src, idmef_file_t *dst); int idmef_file_clone (idmef_file_t *src, idmef_file_t **dst); idmef_file_t * idmef_file_ref (idmef_file_t *file); void idmef_file_destroy (idmef_file_t *ptr); prelude_string_t * idmef_file_get_ident (idmef_file_t *ptr); void idmef_file_set_ident (idmef_file_t *ptr, prelude_string_t *ident); int idmef_file_new_ident (idmef_file_t *ptr, prelude_string_t **ret); prelude_string_t * idmef_file_get_name (idmef_file_t *ptr); void idmef_file_set_name (idmef_file_t *ptr, prelude_string_t *name); int idmef_file_new_name (idmef_file_t *ptr, prelude_string_t **ret); prelude_string_t * idmef_file_get_path (idmef_file_t *ptr); void idmef_file_set_path (idmef_file_t *ptr, prelude_string_t *path); int idmef_file_new_path (idmef_file_t *ptr, prelude_string_t **ret); idmef_time_t * idmef_file_get_create_time (idmef_file_t *ptr); void idmef_file_set_create_time (idmef_file_t *ptr, idmef_time_t *create_time); int idmef_file_new_create_time (idmef_file_t *ptr, idmef_time_t **ret); idmef_time_t * idmef_file_get_modify_time (idmef_file_t *ptr); void idmef_file_set_modify_time (idmef_file_t *ptr, idmef_time_t *modify_time); int idmef_file_new_modify_time (idmef_file_t *ptr, idmef_time_t **ret); idmef_time_t * idmef_file_get_access_time (idmef_file_t *ptr); void idmef_file_set_access_time (idmef_file_t *ptr, idmef_time_t *access_time); int idmef_file_new_access_time (idmef_file_t *ptr, idmef_time_t **ret); void idmef_file_unset_data_size (idmef_file_t *ptr); uint64_t * idmef_file_get_data_size (idmef_file_t *ptr); void idmef_file_set_data_size (idmef_file_t *ptr, uint64_t data_size); int idmef_file_new_data_size (idmef_file_t *ptr, uint64_t **ret); void idmef_file_unset_disk_size (idmef_file_t *ptr); uint64_t * idmef_file_get_disk_size (idmef_file_t *ptr); void idmef_file_set_disk_size (idmef_file_t *ptr, uint64_t disk_size); int idmef_file_new_disk_size (idmef_file_t *ptr, uint64_t **ret); idmef_file_access_t * idmef_file_get_next_file_access (idmef_file_t *file, idmef_file_access_t *file_access_cur); void idmef_file_set_file_access (idmef_file_t *ptr, idmef_file_access_t *object, int pos); int idmef_file_new_file_access (idmef_file_t *ptr, idmef_file_access_t **ret, int pos); idmef_linkage_t * idmef_file_get_next_linkage (idmef_file_t *file, idmef_linkage_t *linkage_cur); void idmef_file_set_linkage (idmef_file_t *ptr, idmef_linkage_t *object, int pos); int idmef_file_new_linkage (idmef_file_t *ptr, idmef_linkage_t **ret, int pos); idmef_inode_t * idmef_file_get_inode (idmef_file_t *ptr); void idmef_file_set_inode (idmef_file_t *ptr, idmef_inode_t *inode); int idmef_file_new_inode (idmef_file_t *ptr, idmef_inode_t **ret); idmef_checksum_t * idmef_file_get_next_checksum (idmef_file_t *file, idmef_checksum_t *checksum_cur); void idmef_file_set_checksum (idmef_file_t *ptr, idmef_checksum_t *object, int pos); int idmef_file_new_checksum (idmef_file_t *ptr, idmef_checksum_t **ret, int pos); idmef_file_category_t idmef_file_get_category (idmef_file_t *ptr); void idmef_file_set_category (idmef_file_t *ptr, idmef_file_category_t category); int idmef_file_new_category (idmef_file_t *ptr, idmef_file_category_t **ret); void idmef_file_unset_fstype (idmef_file_t *ptr); idmef_file_fstype_t * idmef_file_get_fstype (idmef_file_t *ptr); void idmef_file_set_fstype (idmef_file_t *ptr, idmef_file_fstype_t fstype); int idmef_file_new_fstype (idmef_file_t *ptr, idmef_file_fstype_t **ret); prelude_string_t * idmef_file_get_file_type (idmef_file_t *ptr); void idmef_file_set_file_type (idmef_file_t *ptr, prelude_string_t *file_type); int idmef_file_new_file_type (idmef_file_t *ptr, prelude_string_t **ret); enum idmef_linkage_category_t; idmef_linkage_category_t idmef_linkage_category_to_numeric (const char *name); const char * idmef_linkage_category_to_string (idmef_linkage_category_t val); int idmef_linkage_new (idmef_linkage_t **ret); int idmef_linkage_copy (const idmef_linkage_t *src, idmef_linkage_t *dst); int idmef_linkage_clone (idmef_linkage_t *src, idmef_linkage_t **dst); idmef_linkage_t * idmef_linkage_ref (idmef_linkage_t *linkage); void idmef_linkage_destroy (idmef_linkage_t *ptr); idmef_linkage_category_t idmef_linkage_get_category (idmef_linkage_t *ptr); void idmef_linkage_set_category (idmef_linkage_t *ptr, idmef_linkage_category_t category); int idmef_linkage_new_category (idmef_linkage_t *ptr, idmef_linkage_category_t **ret); prelude_string_t * idmef_linkage_get_name (idmef_linkage_t *ptr); void idmef_linkage_set_name (idmef_linkage_t *ptr, prelude_string_t *name); int idmef_linkage_new_name (idmef_linkage_t *ptr, prelude_string_t **ret); prelude_string_t * idmef_linkage_get_path (idmef_linkage_t *ptr); void idmef_linkage_set_path (idmef_linkage_t *ptr, prelude_string_t *path); int idmef_linkage_new_path (idmef_linkage_t *ptr, prelude_string_t **ret); idmef_file_t * idmef_linkage_get_file (idmef_linkage_t *ptr); void idmef_linkage_set_file (idmef_linkage_t *ptr, idmef_file_t *file); int idmef_linkage_new_file (idmef_linkage_t *ptr, idmef_file_t **ret); enum idmef_target_decoy_t; idmef_target_decoy_t idmef_target_decoy_to_numeric (const char *name); const char * idmef_target_decoy_to_string (idmef_target_decoy_t val); typedef idmef_target_t; int idmef_target_new (idmef_target_t **ret); int idmef_target_copy (const idmef_target_t *src, idmef_target_t *dst); int idmef_target_clone (idmef_target_t *src, idmef_target_t **dst); idmef_target_t * idmef_target_ref (idmef_target_t *target); void idmef_target_destroy (idmef_target_t *ptr); prelude_string_t * idmef_target_get_ident (idmef_target_t *ptr); void idmef_target_set_ident (idmef_target_t *ptr, prelude_string_t *ident); int idmef_target_new_ident (idmef_target_t *ptr, prelude_string_t **ret); idmef_target_decoy_t idmef_target_get_decoy (idmef_target_t *ptr); void idmef_target_set_decoy (idmef_target_t *ptr, idmef_target_decoy_t decoy); int idmef_target_new_decoy (idmef_target_t *ptr, idmef_target_decoy_t **ret); prelude_string_t * idmef_target_get_interface (idmef_target_t *ptr); void idmef_target_set_interface (idmef_target_t *ptr, prelude_string_t *interface); int idmef_target_new_interface (idmef_target_t *ptr, prelude_string_t **ret); idmef_node_t * idmef_target_get_node (idmef_target_t *ptr); void idmef_target_set_node (idmef_target_t *ptr, idmef_node_t *node); int idmef_target_new_node (idmef_target_t *ptr, idmef_node_t **ret); idmef_user_t * idmef_target_get_user (idmef_target_t *ptr); void idmef_target_set_user (idmef_target_t *ptr, idmef_user_t *user); int idmef_target_new_user (idmef_target_t *ptr, idmef_user_t **ret); idmef_process_t * idmef_target_get_process (idmef_target_t *ptr); void idmef_target_set_process (idmef_target_t *ptr, idmef_process_t *process); int idmef_target_new_process (idmef_target_t *ptr, idmef_process_t **ret); idmef_service_t * idmef_target_get_service (idmef_target_t *ptr); void idmef_target_set_service (idmef_target_t *ptr, idmef_service_t *service); int idmef_target_new_service (idmef_target_t *ptr, idmef_service_t **ret); idmef_file_t * idmef_target_get_next_file (idmef_target_t *target, idmef_file_t *file_cur); void idmef_target_set_file (idmef_target_t *ptr, idmef_file_t *object, int pos); int idmef_target_new_file (idmef_target_t *ptr, idmef_file_t **ret, int pos); typedef idmef_analyzer_t; int idmef_analyzer_new (idmef_analyzer_t **ret); int idmef_analyzer_copy (const idmef_analyzer_t *src, idmef_analyzer_t *dst); int idmef_analyzer_clone (idmef_analyzer_t *src, idmef_analyzer_t **dst); idmef_analyzer_t * idmef_analyzer_ref (idmef_analyzer_t *analyzer); void idmef_analyzer_destroy (idmef_analyzer_t *ptr); prelude_string_t * idmef_analyzer_get_analyzerid (idmef_analyzer_t *ptr); void idmef_analyzer_set_analyzerid (idmef_analyzer_t *ptr, prelude_string_t *analyzerid); int idmef_analyzer_new_analyzerid (idmef_analyzer_t *ptr, prelude_string_t **ret); prelude_string_t * idmef_analyzer_get_name (idmef_analyzer_t *ptr); void idmef_analyzer_set_name (idmef_analyzer_t *ptr, prelude_string_t *name); int idmef_analyzer_new_name (idmef_analyzer_t *ptr, prelude_string_t **ret); prelude_string_t * idmef_analyzer_get_manufacturer (idmef_analyzer_t *ptr); void idmef_analyzer_set_manufacturer (idmef_analyzer_t *ptr, prelude_string_t *manufacturer); int idmef_analyzer_new_manufacturer (idmef_analyzer_t *ptr, prelude_string_t **ret); prelude_string_t * idmef_analyzer_get_model (idmef_analyzer_t *ptr); void idmef_analyzer_set_model (idmef_analyzer_t *ptr, prelude_string_t *model); int idmef_analyzer_new_model (idmef_analyzer_t *ptr, prelude_string_t **ret); prelude_string_t * idmef_analyzer_get_version (idmef_analyzer_t *ptr); void idmef_analyzer_set_version (idmef_analyzer_t *ptr, prelude_string_t *version); int idmef_analyzer_new_version (idmef_analyzer_t *ptr, prelude_string_t **ret); prelude_string_t * idmef_analyzer_get_class (idmef_analyzer_t *ptr); void idmef_analyzer_set_class (idmef_analyzer_t *ptr, prelude_string_t *class_str); int idmef_analyzer_new_class (idmef_analyzer_t *ptr, prelude_string_t **ret); prelude_string_t * idmef_analyzer_get_ostype (idmef_analyzer_t *ptr); void idmef_analyzer_set_ostype (idmef_analyzer_t *ptr, prelude_string_t *ostype); int idmef_analyzer_new_ostype (idmef_analyzer_t *ptr, prelude_string_t **ret); prelude_string_t * idmef_analyzer_get_osversion (idmef_analyzer_t *ptr); void idmef_analyzer_set_osversion (idmef_analyzer_t *ptr, prelude_string_t *osversion); int idmef_analyzer_new_osversion (idmef_analyzer_t *ptr, prelude_string_t **ret); idmef_node_t * idmef_analyzer_get_node (idmef_analyzer_t *ptr); void idmef_analyzer_set_node (idmef_analyzer_t *ptr, idmef_node_t *node); int idmef_analyzer_new_node (idmef_analyzer_t *ptr, idmef_node_t **ret); idmef_process_t * idmef_analyzer_get_process (idmef_analyzer_t *ptr); void idmef_analyzer_set_process (idmef_analyzer_t *ptr, idmef_process_t *process); int idmef_analyzer_new_process (idmef_analyzer_t *ptr, idmef_process_t **ret); typedef idmef_alertident_t; int idmef_alertident_new (idmef_alertident_t **ret); int idmef_alertident_copy (const idmef_alertident_t *src, idmef_alertident_t *dst); int idmef_alertident_clone (idmef_alertident_t *src, idmef_alertident_t **dst); idmef_alertident_t * idmef_alertident_ref (idmef_alertident_t *alertident); void idmef_alertident_destroy (idmef_alertident_t *ptr); prelude_string_t * idmef_alertident_get_alertident (idmef_alertident_t *ptr); void idmef_alertident_set_alertident (idmef_alertident_t *ptr, prelude_string_t *alertident); int idmef_alertident_new_alertident (idmef_alertident_t *ptr, prelude_string_t **ret); prelude_string_t * idmef_alertident_get_analyzerid (idmef_alertident_t *ptr); void idmef_alertident_set_analyzerid (idmef_alertident_t *ptr, prelude_string_t *analyzerid); int idmef_alertident_new_analyzerid (idmef_alertident_t *ptr, prelude_string_t **ret); enum idmef_impact_severity_t; idmef_impact_severity_t idmef_impact_severity_to_numeric (const char *name); const char * idmef_impact_severity_to_string (idmef_impact_severity_t val); enum idmef_impact_completion_t; idmef_impact_completion_t idmef_impact_completion_to_numeric (const char *name); const char * idmef_impact_completion_to_string (idmef_impact_completion_t val); enum idmef_impact_type_t; idmef_impact_type_t idmef_impact_type_to_numeric (const char *name); const char * idmef_impact_type_to_string (idmef_impact_type_t val); typedef idmef_impact_t; int idmef_impact_new (idmef_impact_t **ret); int idmef_impact_copy (const idmef_impact_t *src, idmef_impact_t *dst); int idmef_impact_clone (idmef_impact_t *src, idmef_impact_t **dst); idmef_impact_t * idmef_impact_ref (idmef_impact_t *impact); void idmef_impact_destroy (idmef_impact_t *ptr); void idmef_impact_unset_severity (idmef_impact_t *ptr); idmef_impact_severity_t * idmef_impact_get_severity (idmef_impact_t *ptr); void idmef_impact_set_severity (idmef_impact_t *ptr, idmef_impact_severity_t severity); int idmef_impact_new_severity (idmef_impact_t *ptr, idmef_impact_severity_t **ret); void idmef_impact_unset_completion (idmef_impact_t *ptr); idmef_impact_completion_t * idmef_impact_get_completion (idmef_impact_t *ptr); void idmef_impact_set_completion (idmef_impact_t *ptr, idmef_impact_completion_t completion); int idmef_impact_new_completion (idmef_impact_t *ptr, idmef_impact_completion_t **ret); idmef_impact_type_t idmef_impact_get_type (idmef_impact_t *ptr); void idmef_impact_set_type (idmef_impact_t *ptr, idmef_impact_type_t type); int idmef_impact_new_type (idmef_impact_t *ptr, idmef_impact_type_t **ret); prelude_string_t * idmef_impact_get_description (idmef_impact_t *ptr); void idmef_impact_set_description (idmef_impact_t *ptr, prelude_string_t *description); int idmef_impact_new_description (idmef_impact_t *ptr, prelude_string_t **ret); enum idmef_action_category_t; idmef_action_category_t idmef_action_category_to_numeric (const char *name); const char * idmef_action_category_to_string (idmef_action_category_t val); typedef idmef_action_t; int idmef_action_new (idmef_action_t **ret); int idmef_action_copy (const idmef_action_t *src, idmef_action_t *dst); int idmef_action_clone (idmef_action_t *src, idmef_action_t **dst); idmef_action_t * idmef_action_ref (idmef_action_t *action); void idmef_action_destroy (idmef_action_t *ptr); idmef_action_category_t idmef_action_get_category (idmef_action_t *ptr); void idmef_action_set_category (idmef_action_t *ptr, idmef_action_category_t category); int idmef_action_new_category (idmef_action_t *ptr, idmef_action_category_t **ret); prelude_string_t * idmef_action_get_description (idmef_action_t *ptr); void idmef_action_set_description (idmef_action_t *ptr, prelude_string_t *description); int idmef_action_new_description (idmef_action_t *ptr, prelude_string_t **ret); enum idmef_confidence_rating_t; idmef_confidence_rating_t idmef_confidence_rating_to_numeric (const char *name); const char * idmef_confidence_rating_to_string (idmef_confidence_rating_t val); typedef idmef_confidence_t; int idmef_confidence_new (idmef_confidence_t **ret); int idmef_confidence_copy (const idmef_confidence_t *src, idmef_confidence_t *dst); int idmef_confidence_clone (idmef_confidence_t *src, idmef_confidence_t **dst); idmef_confidence_t * idmef_confidence_ref (idmef_confidence_t *confidence); void idmef_confidence_destroy (idmef_confidence_t *ptr); idmef_confidence_rating_t idmef_confidence_get_rating (idmef_confidence_t *ptr); void idmef_confidence_set_rating (idmef_confidence_t *ptr, idmef_confidence_rating_t rating); int idmef_confidence_new_rating (idmef_confidence_t *ptr, idmef_confidence_rating_t **ret); float idmef_confidence_get_confidence (idmef_confidence_t *ptr); void idmef_confidence_set_confidence (idmef_confidence_t *ptr, float confidence); int idmef_confidence_new_confidence (idmef_confidence_t *ptr, float **ret); typedef idmef_assessment_t; int idmef_assessment_new (idmef_assessment_t **ret); int idmef_assessment_copy (const idmef_assessment_t *src, idmef_assessment_t *dst); int idmef_assessment_clone (idmef_assessment_t *src, idmef_assessment_t **dst); idmef_assessment_t * idmef_assessment_ref (idmef_assessment_t *assessment); void idmef_assessment_destroy (idmef_assessment_t *ptr); idmef_impact_t * idmef_assessment_get_impact (idmef_assessment_t *ptr); void idmef_assessment_set_impact (idmef_assessment_t *ptr, idmef_impact_t *impact); int idmef_assessment_new_impact (idmef_assessment_t *ptr, idmef_impact_t **ret); idmef_action_t * idmef_assessment_get_next_action (idmef_assessment_t *assessment, idmef_action_t *action_cur); void idmef_assessment_set_action (idmef_assessment_t *ptr, idmef_action_t *object, int pos); int idmef_assessment_new_action (idmef_assessment_t *ptr, idmef_action_t **ret, int pos); idmef_confidence_t * idmef_assessment_get_confidence (idmef_assessment_t *ptr); void idmef_assessment_set_confidence (idmef_assessment_t *ptr, idmef_confidence_t *confidence); int idmef_assessment_new_confidence (idmef_assessment_t *ptr, idmef_confidence_t **ret); typedef idmef_tool_alert_t; int idmef_tool_alert_new (idmef_tool_alert_t **ret); int idmef_tool_alert_copy (const idmef_tool_alert_t *src, idmef_tool_alert_t *dst); int idmef_tool_alert_clone (idmef_tool_alert_t *src, idmef_tool_alert_t **dst); idmef_tool_alert_t * idmef_tool_alert_ref (idmef_tool_alert_t *tool_alert); void idmef_tool_alert_destroy (idmef_tool_alert_t *ptr); prelude_string_t * idmef_tool_alert_get_name (idmef_tool_alert_t *ptr); void idmef_tool_alert_set_name (idmef_tool_alert_t *ptr, prelude_string_t *name); int idmef_tool_alert_new_name (idmef_tool_alert_t *ptr, prelude_string_t **ret); prelude_string_t * idmef_tool_alert_get_command (idmef_tool_alert_t *ptr); void idmef_tool_alert_set_command (idmef_tool_alert_t *ptr, prelude_string_t *command); int idmef_tool_alert_new_command (idmef_tool_alert_t *ptr, prelude_string_t **ret); idmef_alertident_t * idmef_tool_alert_get_next_alertident (idmef_tool_alert_t *tool_alert, idmef_alertident_t *alertident_cur); void idmef_tool_alert_set_alertident (idmef_tool_alert_t *ptr, idmef_alertident_t *object, int pos); int idmef_tool_alert_new_alertident (idmef_tool_alert_t *ptr, idmef_alertident_t **ret, int pos); typedef idmef_correlation_alert_t; int idmef_correlation_alert_new (idmef_correlation_alert_t **ret); int idmef_correlation_alert_copy (const idmef_correlation_alert_t *src, idmef_correlation_alert_t *dst); int idmef_correlation_alert_clone (idmef_correlation_alert_t *src, idmef_correlation_alert_t **dst); idmef_correlation_alert_t * idmef_correlation_alert_ref (idmef_correlation_alert_t *correlation_alert); void idmef_correlation_alert_destroy (idmef_correlation_alert_t *ptr); prelude_string_t * idmef_correlation_alert_get_name (idmef_correlation_alert_t *ptr); void idmef_correlation_alert_set_name (idmef_correlation_alert_t *ptr, prelude_string_t *name); int idmef_correlation_alert_new_name (idmef_correlation_alert_t *ptr, prelude_string_t **ret); idmef_alertident_t * idmef_correlation_alert_get_next_alertident (idmef_correlation_alert_t *correlation_alert, idmef_alertident_t *alertident_cur); void idmef_correlation_alert_set_alertident (idmef_correlation_alert_t *ptr, idmef_alertident_t *object, int pos); int idmef_correlation_alert_new_alertident (idmef_correlation_alert_t *ptr, idmef_alertident_t **ret, int pos); typedef idmef_overflow_alert_t; int idmef_overflow_alert_new (idmef_overflow_alert_t **ret); int idmef_overflow_alert_copy (const idmef_overflow_alert_t *src, idmef_overflow_alert_t *dst); int idmef_overflow_alert_clone (idmef_overflow_alert_t *src, idmef_overflow_alert_t **dst); idmef_overflow_alert_t * idmef_overflow_alert_ref (idmef_overflow_alert_t *overflow_alert); void idmef_overflow_alert_destroy (idmef_overflow_alert_t *ptr); prelude_string_t * idmef_overflow_alert_get_program (idmef_overflow_alert_t *ptr); void idmef_overflow_alert_set_program (idmef_overflow_alert_t *ptr, prelude_string_t *program); int idmef_overflow_alert_new_program (idmef_overflow_alert_t *ptr, prelude_string_t **ret); void idmef_overflow_alert_unset_size (idmef_overflow_alert_t *ptr); uint32_t * idmef_overflow_alert_get_size (idmef_overflow_alert_t *ptr); void idmef_overflow_alert_set_size (idmef_overflow_alert_t *ptr, uint32_t size); int idmef_overflow_alert_new_size (idmef_overflow_alert_t *ptr, uint32_t **ret); idmef_data_t * idmef_overflow_alert_get_buffer (idmef_overflow_alert_t *ptr); void idmef_overflow_alert_set_buffer (idmef_overflow_alert_t *ptr, idmef_data_t *buffer); int idmef_overflow_alert_new_buffer (idmef_overflow_alert_t *ptr, idmef_data_t **ret); enum idmef_alert_type_t; idmef_alert_type_t idmef_alert_type_to_numeric (const char *name); const char * idmef_alert_type_to_string (idmef_alert_type_t val); typedef idmef_alert_t; int idmef_alert_new (idmef_alert_t **ret); int idmef_alert_copy (const idmef_alert_t *src, idmef_alert_t *dst); int idmef_alert_clone (idmef_alert_t *src, idmef_alert_t **dst); idmef_alert_t * idmef_alert_ref (idmef_alert_t *alert); void idmef_alert_destroy (idmef_alert_t *ptr); prelude_string_t * idmef_alert_get_messageid (idmef_alert_t *ptr); void idmef_alert_set_messageid (idmef_alert_t *ptr, prelude_string_t *messageid); int idmef_alert_new_messageid (idmef_alert_t *ptr, prelude_string_t **ret); idmef_analyzer_t * idmef_alert_get_next_analyzer (idmef_alert_t *alert, idmef_analyzer_t *analyzer_cur); void idmef_alert_set_analyzer (idmef_alert_t *ptr, idmef_analyzer_t *object, int pos); int idmef_alert_new_analyzer (idmef_alert_t *ptr, idmef_analyzer_t **ret, int pos); idmef_time_t * idmef_alert_get_create_time (idmef_alert_t *ptr); void idmef_alert_set_create_time (idmef_alert_t *ptr, idmef_time_t *create_time); int idmef_alert_new_create_time (idmef_alert_t *ptr, idmef_time_t **ret); idmef_classification_t * idmef_alert_get_classification (idmef_alert_t *ptr); void idmef_alert_set_classification (idmef_alert_t *ptr, idmef_classification_t *classification); int idmef_alert_new_classification (idmef_alert_t *ptr, idmef_classification_t **ret); idmef_time_t * idmef_alert_get_detect_time (idmef_alert_t *ptr); void idmef_alert_set_detect_time (idmef_alert_t *ptr, idmef_time_t *detect_time); int idmef_alert_new_detect_time (idmef_alert_t *ptr, idmef_time_t **ret); idmef_time_t * idmef_alert_get_analyzer_time (idmef_alert_t *ptr); void idmef_alert_set_analyzer_time (idmef_alert_t *ptr, idmef_time_t *analyzer_time); int idmef_alert_new_analyzer_time (idmef_alert_t *ptr, idmef_time_t **ret); idmef_source_t * idmef_alert_get_next_source (idmef_alert_t *alert, idmef_source_t *source_cur); void idmef_alert_set_source (idmef_alert_t *ptr, idmef_source_t *object, int pos); int idmef_alert_new_source (idmef_alert_t *ptr, idmef_source_t **ret, int pos); idmef_target_t * idmef_alert_get_next_target (idmef_alert_t *alert, idmef_target_t *target_cur); void idmef_alert_set_target (idmef_alert_t *ptr, idmef_target_t *object, int pos); int idmef_alert_new_target (idmef_alert_t *ptr, idmef_target_t **ret, int pos); idmef_assessment_t * idmef_alert_get_assessment (idmef_alert_t *ptr); void idmef_alert_set_assessment (idmef_alert_t *ptr, idmef_assessment_t *assessment); int idmef_alert_new_assessment (idmef_alert_t *ptr, idmef_assessment_t **ret); idmef_additional_data_t * idmef_alert_get_next_additional_data (idmef_alert_t *alert, idmef_additional_data_t *additional_data_cur); void idmef_alert_set_additional_data (idmef_alert_t *ptr, idmef_additional_data_t *object, int pos); int idmef_alert_new_additional_data (idmef_alert_t *ptr, idmef_additional_data_t **ret, int pos); idmef_alert_type_t idmef_alert_get_type (idmef_alert_t *ptr); idmef_tool_alert_t * idmef_alert_get_tool_alert (idmef_alert_t *ptr); void idmef_alert_set_tool_alert (idmef_alert_t *ptr, idmef_tool_alert_t *tool_alert); int idmef_alert_new_tool_alert (idmef_alert_t *ptr, idmef_tool_alert_t **ret); idmef_correlation_alert_t * idmef_alert_get_correlation_alert (idmef_alert_t *ptr); void idmef_alert_set_correlation_alert (idmef_alert_t *ptr, idmef_correlation_alert_t *correlation_alert); int idmef_alert_new_correlation_alert (idmef_alert_t *ptr, idmef_correlation_alert_t **ret); idmef_overflow_alert_t * idmef_alert_get_overflow_alert (idmef_alert_t *ptr); void idmef_alert_set_overflow_alert (idmef_alert_t *ptr, idmef_overflow_alert_t *overflow_alert); int idmef_alert_new_overflow_alert (idmef_alert_t *ptr, idmef_overflow_alert_t **ret); typedef idmef_heartbeat_t; int idmef_heartbeat_new (idmef_heartbeat_t **ret); int idmef_heartbeat_copy (const idmef_heartbeat_t *src, idmef_heartbeat_t *dst); int idmef_heartbeat_clone (idmef_heartbeat_t *src, idmef_heartbeat_t **dst); idmef_heartbeat_t * idmef_heartbeat_ref (idmef_heartbeat_t *heartbeat); void idmef_heartbeat_destroy (idmef_heartbeat_t *ptr); prelude_string_t * idmef_heartbeat_get_messageid (idmef_heartbeat_t *ptr); void idmef_heartbeat_set_messageid (idmef_heartbeat_t *ptr, prelude_string_t *messageid); int idmef_heartbeat_new_messageid (idmef_heartbeat_t *ptr, prelude_string_t **ret); idmef_analyzer_t * idmef_heartbeat_get_next_analyzer (idmef_heartbeat_t *heartbeat, idmef_analyzer_t *analyzer_cur); void idmef_heartbeat_set_analyzer (idmef_heartbeat_t *ptr, idmef_analyzer_t *object, int pos); int idmef_heartbeat_new_analyzer (idmef_heartbeat_t *ptr, idmef_analyzer_t **ret, int pos); idmef_time_t * idmef_heartbeat_get_create_time (idmef_heartbeat_t *ptr); void idmef_heartbeat_set_create_time (idmef_heartbeat_t *ptr, idmef_time_t *create_time); int idmef_heartbeat_new_create_time (idmef_heartbeat_t *ptr, idmef_time_t **ret); idmef_time_t * idmef_heartbeat_get_analyzer_time (idmef_heartbeat_t *ptr); void idmef_heartbeat_set_analyzer_time (idmef_heartbeat_t *ptr, idmef_time_t *analyzer_time); int idmef_heartbeat_new_analyzer_time (idmef_heartbeat_t *ptr, idmef_time_t **ret); void idmef_heartbeat_unset_heartbeat_interval (idmef_heartbeat_t *ptr); uint32_t * idmef_heartbeat_get_heartbeat_interval (idmef_heartbeat_t *ptr); void idmef_heartbeat_set_heartbeat_interval (idmef_heartbeat_t *ptr, uint32_t heartbeat_interval); int idmef_heartbeat_new_heartbeat_interval (idmef_heartbeat_t *ptr, uint32_t **ret); idmef_additional_data_t * idmef_heartbeat_get_next_additional_data (idmef_heartbeat_t *heartbeat, idmef_additional_data_t *additional_data_cur); void idmef_heartbeat_set_additional_data (idmef_heartbeat_t *ptr, idmef_additional_data_t *object, int pos); int idmef_heartbeat_new_additional_data (idmef_heartbeat_t *ptr, idmef_additional_data_t **ret, int pos); enum idmef_message_type_t; idmef_message_type_t idmef_message_type_to_numeric (const char *name); const char * idmef_message_type_to_string (idmef_message_type_t val); typedef idmef_message_t; int idmef_message_new (idmef_message_t **ret); int idmef_message_copy (const idmef_message_t *src, idmef_message_t *dst); int idmef_message_clone (idmef_message_t *src, idmef_message_t **dst); idmef_message_t * idmef_message_ref (idmef_message_t *message); void idmef_message_destroy (idmef_message_t *ptr); prelude_string_t * idmef_message_get_version (idmef_message_t *ptr); void idmef_message_set_version (idmef_message_t *ptr, prelude_string_t *version); int idmef_message_new_version (idmef_message_t *ptr, prelude_string_t **ret); idmef_message_type_t idmef_message_get_type (idmef_message_t *ptr); idmef_alert_t * idmef_message_get_alert (idmef_message_t *ptr); void idmef_message_set_alert (idmef_message_t *ptr, idmef_alert_t *alert); int idmef_message_new_alert (idmef_message_t *ptr, idmef_alert_t **ret); idmef_heartbeat_t * idmef_message_get_heartbeat (idmef_message_t *ptr); void idmef_message_set_heartbeat (idmef_message_t *ptr, idmef_heartbeat_t *heartbeat); int idmef_message_new_heartbeat (idmef_message_t *ptr, idmef_heartbeat_t **ret); void idmef_message_set_pmsg (idmef_message_t *message, prelude_msg_t *msg); prelude_msg_t * idmef_message_get_pmsg (idmef_message_t *message); int idmef_action_compare (const idmef_action_t *obj1, const idmef_action_t *obj2); int idmef_additional_data_compare (const idmef_additional_data_t *obj1, const idmef_additional_data_t *obj2); int idmef_address_compare (const idmef_address_t *obj1, const idmef_address_t *obj2); int idmef_alert_compare (const idmef_alert_t *obj1, const idmef_alert_t *obj2); int idmef_alertident_compare (const idmef_alertident_t *obj1, const idmef_alertident_t *obj2); int idmef_analyzer_compare (const idmef_analyzer_t *obj1, const idmef_analyzer_t *obj2); int idmef_assessment_compare (const idmef_assessment_t *obj1, const idmef_assessment_t *obj2); int idmef_checksum_compare (const idmef_checksum_t *obj1, const idmef_checksum_t *obj2); int idmef_classification_compare (const idmef_classification_t *obj1, const idmef_classification_t *obj2); int idmef_confidence_compare (const idmef_confidence_t *obj1, const idmef_confidence_t *obj2); int idmef_correlation_alert_compare (const idmef_correlation_alert_t *obj1, const idmef_correlation_alert_t *obj2); int idmef_data_compare (const idmef_data_t *data1, const idmef_data_t *data2); int idmef_file_access_compare (const idmef_file_access_t *obj1, const idmef_file_access_t *obj2); int idmef_file_compare (const idmef_file_t *obj1, const idmef_file_t *obj2); int idmef_heartbeat_compare (const idmef_heartbeat_t *obj1, const idmef_heartbeat_t *obj2); int idmef_impact_compare (const idmef_impact_t *obj1, const idmef_impact_t *obj2); int idmef_inode_compare (const idmef_inode_t *obj1, const idmef_inode_t *obj2); int idmef_linkage_compare (const idmef_linkage_t *obj1, const idmef_linkage_t *obj2); int idmef_message_compare (const idmef_message_t *obj1, const idmef_message_t *obj2); int idmef_node_compare (const idmef_node_t *obj1, const idmef_node_t *obj2); int idmef_overflow_alert_compare (const idmef_overflow_alert_t *obj1, const idmef_overflow_alert_t *obj2); int idmef_process_compare (const idmef_process_t *obj1, const idmef_process_t *obj2); int idmef_reference_compare (const idmef_reference_t *obj1, const idmef_reference_t *obj2); int idmef_service_compare (const idmef_service_t *obj1, const idmef_service_t *obj2); int idmef_snmp_service_compare (const idmef_snmp_service_t *obj1, const idmef_snmp_service_t *obj2); int idmef_source_compare (const idmef_source_t *obj1, const idmef_source_t *obj2); int idmef_target_compare (const idmef_target_t *obj1, const idmef_target_t *obj2); int idmef_time_compare (const idmef_time_t *time1, const idmef_time_t *time2); int idmef_tool_alert_compare (const idmef_tool_alert_t *obj1, const idmef_tool_alert_t *obj2); int idmef_user_compare (const idmef_user_t *obj1, const idmef_user_t *obj2); int idmef_user_id_compare (const idmef_user_id_t *obj1, const idmef_user_id_t *obj2); int idmef_web_service_compare (const idmef_web_service_t *obj1, const idmef_web_service_t *obj2); #define IDMEF_CLASS_ID_ADDITIONAL_DATA_TYPE #define IDMEF_CLASS_ID_ADDITIONAL_DATA #define IDMEF_CLASS_ID_REFERENCE_ORIGIN #define IDMEF_CLASS_ID_REFERENCE #define IDMEF_CLASS_ID_CLASSIFICATION #define IDMEF_CLASS_ID_USER_ID_TYPE #define IDMEF_CLASS_ID_USER_ID #define IDMEF_CLASS_ID_USER_CATEGORY #define IDMEF_CLASS_ID_USER #define IDMEF_CLASS_ID_ADDRESS_CATEGORY #define IDMEF_CLASS_ID_ADDRESS #define IDMEF_CLASS_ID_PROCESS #define IDMEF_CLASS_ID_WEB_SERVICE #define IDMEF_CLASS_ID_SNMP_SERVICE #define IDMEF_CLASS_ID_SERVICE_TYPE #define IDMEF_CLASS_ID_SERVICE #define IDMEF_CLASS_ID_NODE_CATEGORY #define IDMEF_CLASS_ID_NODE #define IDMEF_CLASS_ID_SOURCE_SPOOFED #define IDMEF_CLASS_ID_SOURCE #define IDMEF_CLASS_ID_FILE_ACCESS #define IDMEF_CLASS_ID_INODE #define IDMEF_CLASS_ID_CHECKSUM_ALGORITHM #define IDMEF_CLASS_ID_CHECKSUM #define IDMEF_CLASS_ID_FILE_CATEGORY #define IDMEF_CLASS_ID_FILE_FSTYPE #define IDMEF_CLASS_ID_FILE #define IDMEF_CLASS_ID_LINKAGE_CATEGORY #define IDMEF_CLASS_ID_LINKAGE #define IDMEF_CLASS_ID_TARGET_DECOY #define IDMEF_CLASS_ID_TARGET #define IDMEF_CLASS_ID_ANALYZER #define IDMEF_CLASS_ID_ALERTIDENT #define IDMEF_CLASS_ID_IMPACT_SEVERITY #define IDMEF_CLASS_ID_IMPACT_COMPLETION #define IDMEF_CLASS_ID_IMPACT_TYPE #define IDMEF_CLASS_ID_IMPACT #define IDMEF_CLASS_ID_ACTION_CATEGORY #define IDMEF_CLASS_ID_ACTION #define IDMEF_CLASS_ID_CONFIDENCE_RATING #define IDMEF_CLASS_ID_CONFIDENCE #define IDMEF_CLASS_ID_ASSESSMENT #define IDMEF_CLASS_ID_TOOL_ALERT #define IDMEF_CLASS_ID_CORRELATION_ALERT #define IDMEF_CLASS_ID_OVERFLOW_ALERT #define IDMEF_CLASS_ID_ALERT_TYPE #define IDMEF_CLASS_ID_ALERT #define IDMEF_CLASS_ID_HEARTBEAT #define IDMEF_CLASS_ID_MESSAGE_TYPE #define IDMEF_CLASS_ID_MESSAGE Description The IDMEF API is used by a sensor in order to generate events. IDMEF is an alert description format allowing almost any alert information to fit within an IDMEF alert, independantly of the type of analyzer used. Here is real world example taken from the Snort Prelude sensors. The top level IDMEF object is always of type idmef_message_t. You should refer to the IDMEF draft, or to the Prelude API documentation in order to get a complete listing of theses objects, or a description of what information an object may carry. void snort_alert_prelude(Packet *p, char *msg, void *data, Event *event) { int ret; idmef_time_t *time; idmef_alert_t *alert; prelude_string_t *str; idmef_message_t *idmef; idmef_classification_t *class; prelude_client_t *client = data; ret = idmef_message_new(&idmef); if ( ret < 0 ) return; ret = idmef_message_new_alert(idmef, &alert); if ( ret < 0 ) goto err; ret = idmef_alert_new_classification(alert, &class); if ( ret < 0 ) goto err; ret = idmef_classification_new_text(class, &str); if ( ret < 0 ) goto err; prelude_string_set_ref(str, msg); ret = event_to_impact(event, alert); if ( ret < 0 ) goto err; ret = event_to_reference(event, class); if ( ret < 0 ) goto err; ret = event_to_source_target(p, alert); if ( ret < 0 ) goto err; ret = packet_to_data(p, event, alert); if ( ret < 0 ) goto err; ret = idmef_alert_new_detect_time(alert, &time); if ( ret < 0 ) goto err; idmef_time_set_from_timeval(time, &p->pkth->ts); ret = idmef_time_new_from_gettimeofday(&time); if ( ret < 0 ) goto err; idmef_alert_set_create_time(alert, time); idmef_alert_set_analyzer(alert, idmef_analyzer_ref(prelude_client_get_analyzer(client)), 0); prelude_client_send_idmef(client, idmef); err: idmef_message_destroy(idmef); prelude_perror(ret, "Unable to create IDMEF alert"); } Details IDMEF_LIST_APPEND IDMEF_LIST_APPEND#define IDMEF_LIST_APPEND INT_MAX IDMEF_LIST_PREPEND IDMEF_LIST_PREPEND#define IDMEF_LIST_PREPEND (INT_MAX - 1) idmef_message_get_data () idmef_message_get_dataint idmef_message_get_data (idmef_message_t *message, const char *path, unsigned char **data, size_t *size); message : path : data : size : Returns : idmef_message_get_number () idmef_message_get_numberint idmef_message_get_number (idmef_message_t *message, const char *path, double *result); Retrieve the number stored within path of message and store it in the user provided result. message : Pointer to an idmef_message_t object. path : Path to retrieve the number from within message. result : Pointer where the result should be stored. Returns : A positive value in case path was successfully retrieved 0 if the path is empty, or a negative value if an error occured. idmef_message_get_string () idmef_message_get_stringint idmef_message_get_string (idmef_message_t *message, const char *path, char **result); Retrieve the string stored within path of message and store it in the user provided result. The caller is responssible for freeing result. message : Pointer to an idmef_message_t object. path : Path to retrieve the string from within message. result : Pointer where the result should be stored. Returns : A positive value in case path was successfully retrieved 0 if the path is empty, or a negative value if an error occured. idmef_message_get_value () idmef_message_get_valueint idmef_message_get_value (idmef_message_t *message, const char *path, idmef_value_t **value); Retrieve the value stored within path of message and store it in the user provided value. message : Pointer to an idmef_message_t object. path : Path to retrieve the value from within message. value : Pointer where the result should be stored. Returns : A positive value in case path was successfully retrieved 0 if the path is empty, or a negative value if an error occured. idmef_message_set_data () idmef_message_set_dataint idmef_message_set_data (idmef_message_t *message, const char *path, unsigned char *data, size_t size); This function will set the path member within message to the provided data of size size. message : Pointer to an idmef_message_t object. path : Path to be set within message. data : Pointer to data to associate message[path] with. size : Size of the data pointed to by data. Returns : 0 on success, or a negative value if an error occured. idmef_message_set_number () idmef_message_set_numberint idmef_message_set_number (idmef_message_t *message, const char *path, double number); This function will set the path member within message to the provided value, which will be converted to the path value type. Example: idmef_message_set_number(message, "alert.assessment.confidence.confidence", 0.123456); idmef_message_set_number(message, "alert.source(0).service.port", 1024); message : Pointer to an idmef_message_t object. path : Path to be set within message. number : Value to associate message[path] with. Returns : 0 on success, or a negative value if an error occured. idmef_message_set_string () idmef_message_set_stringint idmef_message_set_string (idmef_message_t *message, const char *path, const char *value); This function will set the path member within message to the provided value, which will be converted to the corresponding path value type. Example: idmef_message_set_string(message, "alert.classification.text", "MyText"); idmef_message_set_string(message, "alert.source(0).service.port", "1024"); message : Pointer to an idmef_message_t object. path : Path to be set within message. value : Value to associate message[path] with. Returns : 0 on success, or a negative value if an error occured. idmef_message_set_value () idmef_message_set_valueint idmef_message_set_value (idmef_message_t *message, const char *path, idmef_value_t *value); This function will set the path member within message to the provided value. message : Pointer to an idmef_message_t object. path : Path to be set within message. value : Value to associate message[path] with. Returns : 0 on success, or a negative value if an error occured. enum idmef_additional_data_type_t idmef_additional_data_type_ttypedef enum { IDMEF_ADDITIONAL_DATA_TYPE_ERROR = -1, IDMEF_ADDITIONAL_DATA_TYPE_STRING = 0, IDMEF_ADDITIONAL_DATA_TYPE_BYTE = 1, IDMEF_ADDITIONAL_DATA_TYPE_CHARACTER = 2, IDMEF_ADDITIONAL_DATA_TYPE_DATE_TIME = 3, IDMEF_ADDITIONAL_DATA_TYPE_INTEGER = 4, IDMEF_ADDITIONAL_DATA_TYPE_NTPSTAMP = 5, IDMEF_ADDITIONAL_DATA_TYPE_PORTLIST = 6, IDMEF_ADDITIONAL_DATA_TYPE_REAL = 7, IDMEF_ADDITIONAL_DATA_TYPE_BOOLEAN = 8, IDMEF_ADDITIONAL_DATA_TYPE_BYTE_STRING = 9, IDMEF_ADDITIONAL_DATA_TYPE_XML = 10 } idmef_additional_data_type_t; idmef_additional_data_type_to_numeric () idmef_additional_data_type_to_numericidmef_additional_data_type_t idmef_additional_data_type_to_numeric (const char *name); name : pointer to an IDMEF string representation of a idmef_additional_data_type_t value. Returns : the numeric equivalent of name, or -1 if name is not valid. idmef_additional_data_type_to_string () idmef_additional_data_type_to_stringconst char * idmef_additional_data_type_to_string (idmef_additional_data_type_t val); Return the IDMEF string equivalent of val provided idmef_additional_data_type_t value. val : an enumeration value for idmef_additional_data_type_t. Returns : a pointer to the string describing val, or NULL if val is invalid. idmef_additional_data_t idmef_additional_data_ttypedef struct idmef_additional_data idmef_additional_data_t; idmef_additional_data_new () idmef_additional_data_newint idmef_additional_data_new (idmef_additional_data_t **ret); Create a new idmef_additional_data_t object. ret : Pointer where to store the created idmef_additional_data_t object. Returns : 0 on success, a negative value if an error occured. idmef_additional_data_copy () idmef_additional_data_copyint idmef_additional_data_copy (const idmef_additional_data_t *src, idmef_additional_data_t *dst); Copy a new idmef_additional_data_t object from src to dst. src : Source of the copy. dst : Where to copy the object. Returns : 0 on success, a negative value if an error occured. idmef_additional_data_clone () idmef_additional_data_cloneint idmef_additional_data_clone (idmef_additional_data_t *src, idmef_additional_data_t **dst); Create a copy of src, and store it in dst. src : Object to be cloned. dst : Address where to store the pointer to the cloned object. Returns : 0 on success, a negative value if an error occured. idmef_additional_data_ref () idmef_additional_data_refidmef_additional_data_t * idmef_additional_data_ref (idmef_additional_data_t *additional_data); Increase additional_data reference count, so that it can be referenced multiple time. additional_data : pointer to a idmef_additional_data_t object. Returns : a pointer to additional_data. idmef_additional_data_destroy () idmef_additional_data_destroyvoid idmef_additional_data_destroy (idmef_additional_data_t *ptr); Destroy ptr and all of it's children. The objects are only destroyed if their reference count reach zero. ptr : pointer to a idmef_additional_data_t object. idmef_additional_data_get_type () idmef_additional_data_get_typeidmef_additional_data_type_t idmef_additional_data_get_type (idmef_additional_data_t *ptr); Get type children of the idmef_additional_data_t object. ptr : pointer to a idmef_additional_data_t object. Returns : a pointer to a idmef_additional_data_type_t object, or NULL if the children object is not set. idmef_additional_data_set_type () idmef_additional_data_set_typevoid idmef_additional_data_set_type (idmef_additional_data_t *ptr, idmef_additional_data_type_t type); Set type object as a children of ptr. if ptr already contain an type object, then it is destroyed, and updated to point to the provided type object. ptr : pointer to a idmef_additional_data_t object. type : pointer to a idmef_additional_data_type_t object. idmef_additional_data_new_type () idmef_additional_data_new_typeint idmef_additional_data_new_type (idmef_additional_data_t *ptr, idmef_additional_data_type_t **ret); Create a new type object, children of idmef_additional_data_t. If ptr already contain a idmef_additional_data_type_t object, then it is destroyed. ptr : pointer to a idmef_additional_data_t object. ret : pointer to an address where to store the created idmef_additional_data_type_t object. Returns : 0 on success, or a negative value if an error occured. idmef_additional_data_get_meaning () idmef_additional_data_get_meaningprelude_string_t * idmef_additional_data_get_meaning (idmef_additional_data_t *ptr); ptr : Returns : idmef_additional_data_set_meaning () idmef_additional_data_set_meaningvoid idmef_additional_data_set_meaning (idmef_additional_data_t *ptr, prelude_string_t *meaning); Set meaning object as a children of ptr. if ptr already contain an meaning object, then it is destroyed, and updated to point to the provided meaning object. ptr : pointer to a idmef_additional_data_t object. meaning : pointer to a prelude_string_t object. idmef_additional_data_new_meaning () idmef_additional_data_new_meaningint idmef_additional_data_new_meaning (idmef_additional_data_t *ptr, prelude_string_t **ret); Create a new meaning object, children of idmef_additional_data_t. If ptr already contain a prelude_string_t object, then it is destroyed. ptr : pointer to a idmef_additional_data_t object. ret : pointer to an address where to store the created prelude_string_t object. Returns : 0 on success, or a negative value if an error occured. idmef_additional_data_get_data () idmef_additional_data_get_dataidmef_data_t * idmef_additional_data_get_data (idmef_additional_data_t *ptr); ptr : Returns : idmef_additional_data_set_data () idmef_additional_data_set_datavoid idmef_additional_data_set_data (idmef_additional_data_t *ptr, idmef_data_t *data); Set data object as a children of ptr. if ptr already contain an data object, then it is destroyed, and updated to point to the provided data object. ptr : pointer to a idmef_additional_data_t object. data : pointer to a idmef_data_t object. idmef_additional_data_new_data () idmef_additional_data_new_dataint idmef_additional_data_new_data (idmef_additional_data_t *ptr, idmef_data_t **ret); Create a new data object, children of idmef_additional_data_t. If ptr already contain a idmef_data_t object, then it is destroyed. ptr : pointer to a idmef_additional_data_t object. ret : pointer to an address where to store the created idmef_data_t object. Returns : 0 on success, or a negative value if an error occured. enum idmef_reference_origin_t idmef_reference_origin_ttypedef enum { IDMEF_REFERENCE_ORIGIN_ERROR = -1, IDMEF_REFERENCE_ORIGIN_UNKNOWN = 0, IDMEF_REFERENCE_ORIGIN_VENDOR_SPECIFIC = 1, IDMEF_REFERENCE_ORIGIN_USER_SPECIFIC = 2, IDMEF_REFERENCE_ORIGIN_BUGTRAQID = 3, IDMEF_REFERENCE_ORIGIN_CVE = 4, IDMEF_REFERENCE_ORIGIN_OSVDB = 5 } idmef_reference_origin_t; idmef_reference_origin_to_numeric () idmef_reference_origin_to_numericidmef_reference_origin_t idmef_reference_origin_to_numeric (const char *name); name : pointer to an IDMEF string representation of a idmef_reference_origin_t value. Returns : the numeric equivalent of name, or -1 if name is not valid. idmef_reference_origin_to_string () idmef_reference_origin_to_stringconst char * idmef_reference_origin_to_string (idmef_reference_origin_t val); Return the IDMEF string equivalent of val provided idmef_reference_origin_t value. val : an enumeration value for idmef_reference_origin_t. Returns : a pointer to the string describing val, or NULL if val is invalid. idmef_reference_t idmef_reference_ttypedef struct idmef_reference idmef_reference_t; idmef_reference_new () idmef_reference_newint idmef_reference_new (idmef_reference_t **ret); Create a new idmef_reference_t object. ret : Pointer where to store the created idmef_reference_t object. Returns : 0 on success, a negative value if an error occured. idmef_reference_copy () idmef_reference_copyint idmef_reference_copy (const idmef_reference_t *src, idmef_reference_t *dst); Copy a new idmef_reference_t object from src to dst. src : Source of the copy. dst : Where to copy the object. Returns : 0 on success, a negative value if an error occured. idmef_reference_clone () idmef_reference_cloneint idmef_reference_clone (idmef_reference_t *src, idmef_reference_t **dst); Create a copy of src, and store it in dst. src : Object to be cloned. dst : Address where to store the pointer to the cloned object. Returns : 0 on success, a negative value if an error occured. idmef_reference_ref () idmef_reference_refidmef_reference_t * idmef_reference_ref (idmef_reference_t *reference); Increase reference reference count, so that it can be referenced multiple time. reference : pointer to a idmef_reference_t object. Returns : a pointer to reference. idmef_reference_destroy () idmef_reference_destroyvoid idmef_reference_destroy (idmef_reference_t *ptr); Destroy ptr and all of it's children. The objects are only destroyed if their reference count reach zero. ptr : pointer to a idmef_reference_t object. idmef_reference_get_origin () idmef_reference_get_originidmef_reference_origin_t idmef_reference_get_origin (idmef_reference_t *ptr); Get origin children of the idmef_reference_t object. ptr : pointer to a idmef_reference_t object. Returns : a pointer to a idmef_reference_origin_t object, or NULL if the children object is not set. idmef_reference_set_origin () idmef_reference_set_originvoid idmef_reference_set_origin (idmef_reference_t *ptr, idmef_reference_origin_t origin); Set origin object as a children of ptr. if ptr already contain an origin object, then it is destroyed, and updated to point to the provided origin object. ptr : pointer to a idmef_reference_t object. origin : pointer to a idmef_reference_origin_t object. idmef_reference_new_origin () idmef_reference_new_originint idmef_reference_new_origin (idmef_reference_t *ptr, idmef_reference_origin_t **ret); Create a new origin object, children of idmef_reference_t. If ptr already contain a idmef_reference_origin_t object, then it is destroyed. ptr : pointer to a idmef_reference_t object. ret : pointer to an address where to store the created idmef_reference_origin_t object. Returns : 0 on success, or a negative value if an error occured. idmef_reference_get_name () idmef_reference_get_nameprelude_string_t * idmef_reference_get_name (idmef_reference_t *ptr); ptr : Returns : idmef_reference_set_name () idmef_reference_set_namevoid idmef_reference_set_name (idmef_reference_t *ptr, prelude_string_t *name); Set name object as a children of ptr. if ptr already contain an name object, then it is destroyed, and updated to point to the provided name object. ptr : pointer to a idmef_reference_t object. name : pointer to a prelude_string_t object. idmef_reference_new_name () idmef_reference_new_nameint idmef_reference_new_name (idmef_reference_t *ptr, prelude_string_t **ret); Create a new name object, children of idmef_reference_t. If ptr already contain a prelude_string_t object, then it is destroyed. ptr : pointer to a idmef_reference_t object. ret : pointer to an address where to store the created prelude_string_t object. Returns : 0 on success, or a negative value if an error occured. idmef_reference_get_url () idmef_reference_get_urlprelude_string_t * idmef_reference_get_url (idmef_reference_t *ptr); ptr : Returns : idmef_reference_set_url () idmef_reference_set_urlvoid idmef_reference_set_url (idmef_reference_t *ptr, prelude_string_t *url); Set url object as a children of ptr. if ptr already contain an url object, then it is destroyed, and updated to point to the provided url object. ptr : pointer to a idmef_reference_t object. url : pointer to a prelude_string_t object. idmef_reference_new_url () idmef_reference_new_urlint idmef_reference_new_url (idmef_reference_t *ptr, prelude_string_t **ret); Create a new url object, children of idmef_reference_t. If ptr already contain a prelude_string_t object, then it is destroyed. ptr : pointer to a idmef_reference_t object. ret : pointer to an address where to store the created prelude_string_t object. Returns : 0 on success, or a negative value if an error occured. idmef_reference_get_meaning () idmef_reference_get_meaningprelude_string_t * idmef_reference_get_meaning (idmef_reference_t *ptr); ptr : Returns : idmef_reference_set_meaning () idmef_reference_set_meaningvoid idmef_reference_set_meaning (idmef_reference_t *ptr, prelude_string_t *meaning); Set meaning object as a children of ptr. if ptr already contain an meaning object, then it is destroyed, and updated to point to the provided meaning object. ptr : pointer to a idmef_reference_t object. meaning : pointer to a prelude_string_t object. idmef_reference_new_meaning () idmef_reference_new_meaningint idmef_reference_new_meaning (idmef_reference_t *ptr, prelude_string_t **ret); Create a new meaning object, children of idmef_reference_t. If ptr already contain a prelude_string_t object, then it is destroyed. ptr : pointer to a idmef_reference_t object. ret : pointer to an address where to store the created prelude_string_t object. Returns : 0 on success, or a negative value if an error occured. idmef_classification_t idmef_classification_ttypedef struct idmef_classification idmef_classification_t; idmef_classification_new () idmef_classification_newint idmef_classification_new (idmef_classification_t **ret); Create a new idmef_classification_t object. ret : Pointer where to store the created idmef_classification_t object. Returns : 0 on success, a negative value if an error occured. idmef_classification_copy () idmef_classification_copyint idmef_classification_copy (const idmef_classification_t *src, idmef_classification_t *dst); Copy a new idmef_classification_t object from src to dst. src : Source of the copy. dst : Where to copy the object. Returns : 0 on success, a negative value if an error occured. idmef_classification_clone () idmef_classification_cloneint idmef_classification_clone (idmef_classification_t *src, idmef_classification_t **dst); Create a copy of src, and store it in dst. src : Object to be cloned. dst : Address where to store the pointer to the cloned object. Returns : 0 on success, a negative value if an error occured. idmef_classification_ref () idmef_classification_refidmef_classification_t * idmef_classification_ref (idmef_classification_t *classification); Increase classification reference count, so that it can be referenced multiple time. classification : pointer to a idmef_classification_t object. Returns : a pointer to classification. idmef_classification_destroy () idmef_classification_destroyvoid idmef_classification_destroy (idmef_classification_t *ptr); Destroy ptr and all of it's children. The objects are only destroyed if their reference count reach zero. ptr : pointer to a idmef_classification_t object. idmef_classification_get_ident () idmef_classification_get_identprelude_string_t * idmef_classification_get_ident (idmef_classification_t *ptr); ptr : Returns : idmef_classification_set_ident () idmef_classification_set_identvoid idmef_classification_set_ident (idmef_classification_t *ptr, prelude_string_t *ident); Set ident object as a children of ptr. if ptr already contain an ident object, then it is destroyed, and updated to point to the provided ident object. ptr : pointer to a idmef_classification_t object. ident : pointer to a prelude_string_t object. idmef_classification_new_ident () idmef_classification_new_identint idmef_classification_new_ident (idmef_classification_t *ptr, prelude_string_t **ret); Create a new ident object, children of idmef_classification_t. If ptr already contain a prelude_string_t object, then it is destroyed. ptr : pointer to a idmef_classification_t object. ret : pointer to an address where to store the created prelude_string_t object. Returns : 0 on success, or a negative value if an error occured. idmef_classification_get_text () idmef_classification_get_textprelude_string_t * idmef_classification_get_text (idmef_classification_t *ptr); ptr : Returns : idmef_classification_set_text () idmef_classification_set_textvoid idmef_classification_set_text (idmef_classification_t *ptr, prelude_string_t *text); Set text object as a children of ptr. if ptr already contain an text object, then it is destroyed, and updated to point to the provided text object. ptr : pointer to a idmef_classification_t object. text : pointer to a prelude_string_t object. idmef_classification_new_text () idmef_classification_new_textint idmef_classification_new_text (idmef_classification_t *ptr, prelude_string_t **ret); Create a new text object, children of idmef_classification_t. If ptr already contain a prelude_string_t object, then it is destroyed. ptr : pointer to a idmef_classification_t object. ret : pointer to an address where to store the created prelude_string_t object. Returns : 0 on success, or a negative value if an error occured. idmef_classification_get_next_reference () idmef_classification_get_next_referenceidmef_reference_t * idmef_classification_get_next_reference (idmef_classification_t *classification, idmef_reference_t *reference_cur); Get the next idmef_reference_t object listed in ptr. When iterating over the idmef_reference_t object listed in ptr, object should be set to the latest returned idmef_reference_t object. classification : pointer to a idmef_classification_t object. reference_cur : pointer to a idmef_reference_t object. Returns : the next idmef_reference_t in the list. idmef_classification_set_reference () idmef_classification_set_referencevoid idmef_classification_set_reference (idmef_classification_t *ptr, idmef_reference_t *object, int pos); Add object to position pos of ptr list of idmef_reference_t object. If pos is IDMEF_LIST_APPEND, object will be inserted at the tail of the list. If pos is IDMEF_LIST_PREPEND, object will be inserted at the head of the list. ptr : pointer to a idmef_classification_t object. object : pointer to a idmef_reference_t object. pos : Position in the list. idmef_classification_new_reference () idmef_classification_new_referenceint idmef_classification_new_reference (idmef_classification_t *ptr, idmef_reference_t **ret, int pos); Create a new idmef_reference_t children of ptr, and add it to position pos of ptr list of idmef_reference_t object. The created idmef_reference_t object is stored in ret. If pos is IDMEF_LIST_APPEND, object will be inserted at the tail of the list. If pos is IDMEF_LIST_PREPEND, object will be inserted at the head of the list. ptr : pointer to a idmef_classification_t object. ret : pointer to an address where to store the created idmef_reference_t object. pos : position in the list. Returns : 0 on success, or a negative value if an error occured. enum idmef_user_id_type_t idmef_user_id_type_ttypedef enum { IDMEF_USER_ID_TYPE_ORIGINAL_ERROR = -1, IDMEF_USER_ID_TYPE_ORIGINAL_USER = 0, IDMEF_USER_ID_TYPE_CURRENT_USER = 1, IDMEF_USER_ID_TYPE_TARGET_USER = 2, IDMEF_USER_ID_TYPE_USER_PRIVS = 3, IDMEF_USER_ID_TYPE_CURRENT_GROUP = 4, IDMEF_USER_ID_TYPE_GROUP_PRIVS = 5, IDMEF_USER_ID_TYPE_OTHER_PRIVS = 6 } idmef_user_id_type_t; idmef_user_id_type_to_numeric () idmef_user_id_type_to_numericidmef_user_id_type_t idmef_user_id_type_to_numeric (const char *name); name : pointer to an IDMEF string representation of a idmef_user_id_type_t value. Returns : the numeric equivalent of name, or -1 if name is not valid. idmef_user_id_type_to_string () idmef_user_id_type_to_stringconst char * idmef_user_id_type_to_string (idmef_user_id_type_t val); Return the IDMEF string equivalent of val provided idmef_user_id_type_t value. val : an enumeration value for idmef_user_id_type_t. Returns : a pointer to the string describing val, or NULL if val is invalid. idmef_user_id_t idmef_user_id_ttypedef struct idmef_user_id idmef_user_id_t; idmef_user_id_new () idmef_user_id_newint idmef_user_id_new (idmef_user_id_t **ret); Create a new idmef_user_id_t object. ret : Pointer where to store the created idmef_user_id_t object. Returns : 0 on success, a negative value if an error occured. idmef_user_id_copy () idmef_user_id_copyint idmef_user_id_copy (const idmef_user_id_t *src, idmef_user_id_t *dst); Copy a new idmef_user_id_t object from src to dst. src : Source of the copy. dst : Where to copy the object. Returns : 0 on success, a negative value if an error occured. idmef_user_id_clone () idmef_user_id_cloneint idmef_user_id_clone (idmef_user_id_t *src, idmef_user_id_t **dst); Create a copy of src, and store it in dst. src : Object to be cloned. dst : Address where to store the pointer to the cloned object. Returns : 0 on success, a negative value if an error occured. idmef_user_id_ref () idmef_user_id_refidmef_user_id_t * idmef_user_id_ref (idmef_user_id_t *user_id); Increase user_id reference count, so that it can be referenced multiple time. user_id : pointer to a idmef_user_id_t object. Returns : a pointer to user_id. idmef_user_id_destroy () idmef_user_id_destroyvoid idmef_user_id_destroy (idmef_user_id_t *ptr); Destroy ptr and all of it's children. The objects are only destroyed if their reference count reach zero. ptr : pointer to a idmef_user_id_t object. idmef_user_id_get_ident () idmef_user_id_get_identprelude_string_t * idmef_user_id_get_ident (idmef_user_id_t *ptr); ptr : Returns : idmef_user_id_set_ident () idmef_user_id_set_identvoid idmef_user_id_set_ident (idmef_user_id_t *ptr, prelude_string_t *ident); Set ident object as a children of ptr. if ptr already contain an ident object, then it is destroyed, and updated to point to the provided ident object. ptr : pointer to a idmef_user_id_t object. ident : pointer to a prelude_string_t object. idmef_user_id_new_ident () idmef_user_id_new_identint idmef_user_id_new_ident (idmef_user_id_t *ptr, prelude_string_t **ret); Create a new ident object, children of idmef_user_id_t. If ptr already contain a prelude_string_t object, then it is destroyed. ptr : pointer to a idmef_user_id_t object. ret : pointer to an address where to store the created prelude_string_t object. Returns : 0 on success, or a negative value if an error occured. idmef_user_id_get_type () idmef_user_id_get_typeidmef_user_id_type_t idmef_user_id_get_type (idmef_user_id_t *ptr); Get type children of the idmef_user_id_t object. ptr : pointer to a idmef_user_id_t object. Returns : a pointer to a idmef_user_id_type_t object, or NULL if the children object is not set. idmef_user_id_set_type () idmef_user_id_set_typevoid idmef_user_id_set_type (idmef_user_id_t *ptr, idmef_user_id_type_t type); Set type object as a children of ptr. if ptr already contain an type object, then it is destroyed, and updated to point to the provided type object. ptr : pointer to a idmef_user_id_t object. type : pointer to a idmef_user_id_type_t object. idmef_user_id_new_type () idmef_user_id_new_typeint idmef_user_id_new_type (idmef_user_id_t *ptr, idmef_user_id_type_t **ret); Create a new type object, children of idmef_user_id_t. If ptr already contain a idmef_user_id_type_t object, then it is destroyed. ptr : pointer to a idmef_user_id_t object. ret : pointer to an address where to store the created idmef_user_id_type_t object. Returns : 0 on success, or a negative value if an error occured. idmef_user_id_get_tty () idmef_user_id_get_ttyprelude_string_t * idmef_user_id_get_tty (idmef_user_id_t *ptr); ptr : Returns : idmef_user_id_set_tty () idmef_user_id_set_ttyvoid idmef_user_id_set_tty (idmef_user_id_t *ptr, prelude_string_t *tty); Set tty object as a children of ptr. if ptr already contain an tty object, then it is destroyed, and updated to point to the provided tty object. ptr : pointer to a idmef_user_id_t object. tty : pointer to a prelude_string_t object. idmef_user_id_new_tty () idmef_user_id_new_ttyint idmef_user_id_new_tty (idmef_user_id_t *ptr, prelude_string_t **ret); Create a new tty object, children of idmef_user_id_t. If ptr already contain a prelude_string_t object, then it is destroyed. ptr : pointer to a idmef_user_id_t object. ret : pointer to an address where to store the created prelude_string_t object. Returns : 0 on success, or a negative value if an error occured. idmef_user_id_get_name () idmef_user_id_get_nameprelude_string_t * idmef_user_id_get_name (idmef_user_id_t *ptr); ptr : Returns : idmef_user_id_set_name () idmef_user_id_set_namevoid idmef_user_id_set_name (idmef_user_id_t *ptr, prelude_string_t *name); Set name object as a children of ptr. if ptr already contain an name object, then it is destroyed, and updated to point to the provided name object. ptr : pointer to a idmef_user_id_t object. name : pointer to a prelude_string_t object. idmef_user_id_new_name () idmef_user_id_new_nameint idmef_user_id_new_name (idmef_user_id_t *ptr, prelude_string_t **ret); Create a new name object, children of idmef_user_id_t. If ptr already contain a prelude_string_t object, then it is destroyed. ptr : pointer to a idmef_user_id_t object. ret : pointer to an address where to store the created prelude_string_t object. Returns : 0 on success, or a negative value if an error occured. idmef_user_id_unset_number () idmef_user_id_unset_numbervoid idmef_user_id_unset_number (idmef_user_id_t *ptr); ptr : idmef_user_id_get_number () idmef_user_id_get_numberuint32_t * idmef_user_id_get_number (idmef_user_id_t *ptr); ptr : Returns : idmef_user_id_set_number () idmef_user_id_set_numbervoid idmef_user_id_set_number (idmef_user_id_t *ptr, uint32_t number); Set number object as a children of ptr. if ptr already contain an number object, then it is destroyed, and updated to point to the provided number object. ptr : pointer to a idmef_user_id_t object. number : pointer to a uint32_t object. idmef_user_id_new_number () idmef_user_id_new_numberint idmef_user_id_new_number (idmef_user_id_t *ptr, uint32_t **ret); Create a new number object, children of idmef_user_id_t. If ptr already contain a uint32_t object, then it is destroyed. ptr : pointer to a idmef_user_id_t object. ret : pointer to an address where to store the created uint32_t object. Returns : 0 on success, or a negative value if an error occured. enum idmef_user_category_t idmef_user_category_ttypedef enum { IDMEF_USER_CATEGORY_ERROR = -1, IDMEF_USER_CATEGORY_UNKNOWN = 0, IDMEF_USER_CATEGORY_APPLICATION = 1, IDMEF_USER_CATEGORY_OS_DEVICE = 2 } idmef_user_category_t; idmef_user_category_to_numeric () idmef_user_category_to_numericidmef_user_category_t idmef_user_category_to_numeric (const char *name); name : pointer to an IDMEF string representation of a idmef_user_category_t value. Returns : the numeric equivalent of name, or -1 if name is not valid. idmef_user_category_to_string () idmef_user_category_to_stringconst char * idmef_user_category_to_string (idmef_user_category_t val); Return the IDMEF string equivalent of val provided idmef_user_category_t value. val : an enumeration value for idmef_user_category_t. Returns : a pointer to the string describing val, or NULL if val is invalid. idmef_user_t idmef_user_ttypedef struct idmef_user idmef_user_t; idmef_user_new () idmef_user_newint idmef_user_new (idmef_user_t **ret); Create a new idmef_user_t object. ret : Pointer where to store the created idmef_user_t object. Returns : 0 on success, a negative value if an error occured. idmef_user_copy () idmef_user_copyint idmef_user_copy (const idmef_user_t *src, idmef_user_t *dst); Copy a new idmef_user_t object from src to dst. src : Source of the copy. dst : Where to copy the object. Returns : 0 on success, a negative value if an error occured. idmef_user_clone () idmef_user_cloneint idmef_user_clone (idmef_user_t *src, idmef_user_t **dst); Create a copy of src, and store it in dst. src : Object to be cloned. dst : Address where to store the pointer to the cloned object. Returns : 0 on success, a negative value if an error occured. idmef_user_ref () idmef_user_refidmef_user_t * idmef_user_ref (idmef_user_t *user); Increase user reference count, so that it can be referenced multiple time. user : pointer to a idmef_user_t object. Returns : a pointer to user. idmef_user_destroy () idmef_user_destroyvoid idmef_user_destroy (idmef_user_t *ptr); Destroy ptr and all of it's children. The objects are only destroyed if their reference count reach zero. ptr : pointer to a idmef_user_t object. idmef_user_get_ident () idmef_user_get_identprelude_string_t * idmef_user_get_ident (idmef_user_t *ptr); ptr : Returns : idmef_user_set_ident () idmef_user_set_identvoid idmef_user_set_ident (idmef_user_t *ptr, prelude_string_t *ident); Set ident object as a children of ptr. if ptr already contain an ident object, then it is destroyed, and updated to point to the provided ident object. ptr : pointer to a idmef_user_t object. ident : pointer to a prelude_string_t object. idmef_user_new_ident () idmef_user_new_identint idmef_user_new_ident (idmef_user_t *ptr, prelude_string_t **ret); Create a new ident object, children of idmef_user_t. If ptr already contain a prelude_string_t object, then it is destroyed. ptr : pointer to a idmef_user_t object. ret : pointer to an address where to store the created prelude_string_t object. Returns : 0 on success, or a negative value if an error occured. idmef_user_get_category () idmef_user_get_categoryidmef_user_category_t idmef_user_get_category (idmef_user_t *ptr); Get category children of the idmef_user_t object. ptr : pointer to a idmef_user_t object. Returns : a pointer to a idmef_user_category_t object, or NULL if the children object is not set. idmef_user_set_category () idmef_user_set_categoryvoid idmef_user_set_category (idmef_user_t *ptr, idmef_user_category_t category); Set category object as a children of ptr. if ptr already contain an category object, then it is destroyed, and updated to point to the provided category object. ptr : pointer to a idmef_user_t object. category : pointer to a idmef_user_category_t object. idmef_user_new_category () idmef_user_new_categoryint idmef_user_new_category (idmef_user_t *ptr, idmef_user_category_t **ret); Create a new category object, children of idmef_user_t. If ptr already contain a idmef_user_category_t object, then it is destroyed. ptr : pointer to a idmef_user_t object. ret : pointer to an address where to store the created idmef_user_category_t object. Returns : 0 on success, or a negative value if an error occured. idmef_user_get_next_user_id () idmef_user_get_next_user_ididmef_user_id_t * idmef_user_get_next_user_id (idmef_user_t *user, idmef_user_id_t *user_id_cur); Get the next idmef_user_id_t object listed in ptr. When iterating over the idmef_user_id_t object listed in ptr, object should be set to the latest returned idmef_user_id_t object. user : pointer to a idmef_user_t object. user_id_cur : pointer to a idmef_user_id_t object. Returns : the next idmef_user_id_t in the list. idmef_user_set_user_id () idmef_user_set_user_idvoid idmef_user_set_user_id (idmef_user_t *ptr, idmef_user_id_t *object, int pos); Add object to position pos of ptr list of idmef_user_id_t object. If pos is IDMEF_LIST_APPEND, object will be inserted at the tail of the list. If pos is IDMEF_LIST_PREPEND, object will be inserted at the head of the list. ptr : pointer to a idmef_user_t object. object : pointer to a idmef_user_id_t object. pos : Position in the list. idmef_user_new_user_id () idmef_user_new_user_idint idmef_user_new_user_id (idmef_user_t *ptr, idmef_user_id_t **ret, int pos); Create a new idmef_user_id_t children of ptr, and add it to position pos of ptr list of idmef_user_id_t object. The created idmef_user_id_t object is stored in ret. If pos is IDMEF_LIST_APPEND, object will be inserted at the tail of the list. If pos is IDMEF_LIST_PREPEND, object will be inserted at the head of the list. ptr : pointer to a idmef_user_t object. ret : pointer to an address where to store the created idmef_user_id_t object. pos : position in the list. Returns : 0 on success, or a negative value if an error occured. enum idmef_address_category_t idmef_address_category_ttypedef enum { IDMEF_ADDRESS_CATEGORY_ERROR = -1, IDMEF_ADDRESS_CATEGORY_UNKNOWN = 0, IDMEF_ADDRESS_CATEGORY_ATM = 1, IDMEF_ADDRESS_CATEGORY_E_MAIL = 2, IDMEF_ADDRESS_CATEGORY_LOTUS_NOTES = 3, IDMEF_ADDRESS_CATEGORY_MAC = 4, IDMEF_ADDRESS_CATEGORY_SNA = 5, IDMEF_ADDRESS_CATEGORY_VM = 6, IDMEF_ADDRESS_CATEGORY_IPV4_ADDR = 7, IDMEF_ADDRESS_CATEGORY_IPV4_ADDR_HEX = 8, IDMEF_ADDRESS_CATEGORY_IPV4_NET = 9, IDMEF_ADDRESS_CATEGORY_IPV4_NET_MASK = 10, IDMEF_ADDRESS_CATEGORY_IPV6_ADDR = 11, IDMEF_ADDRESS_CATEGORY_IPV6_ADDR_HEX = 12, IDMEF_ADDRESS_CATEGORY_IPV6_NET = 13, IDMEF_ADDRESS_CATEGORY_IPV6_NET_MASK = 14 } idmef_address_category_t; idmef_address_category_to_numeric () idmef_address_category_to_numericidmef_address_category_t idmef_address_category_to_numeric (const char *name); name : pointer to an IDMEF string representation of a idmef_address_category_t value. Returns : the numeric equivalent of name, or -1 if name is not valid. idmef_address_category_to_string () idmef_address_category_to_stringconst char * idmef_address_category_to_string (idmef_address_category_t val); Return the IDMEF string equivalent of val provided idmef_address_category_t value. val : an enumeration value for idmef_address_category_t. Returns : a pointer to the string describing val, or NULL if val is invalid. idmef_address_t idmef_address_ttypedef struct idmef_address idmef_address_t; idmef_address_new () idmef_address_newint idmef_address_new (idmef_address_t **ret); Create a new idmef_address_t object. ret : Pointer where to store the created idmef_address_t object. Returns : 0 on success, a negative value if an error occured. idmef_address_copy () idmef_address_copyint idmef_address_copy (const idmef_address_t *src, idmef_address_t *dst); Copy a new idmef_address_t object from src to dst. src : Source of the copy. dst : Where to copy the object. Returns : 0 on success, a negative value if an error occured. idmef_address_clone () idmef_address_cloneint idmef_address_clone (idmef_address_t *src, idmef_address_t **dst); Create a copy of src, and store it in dst. src : Object to be cloned. dst : Address where to store the pointer to the cloned object. Returns : 0 on success, a negative value if an error occured. idmef_address_ref () idmef_address_refidmef_address_t * idmef_address_ref (idmef_address_t *address); Increase address reference count, so that it can be referenced multiple time. address : pointer to a idmef_address_t object. Returns : a pointer to address. idmef_address_destroy () idmef_address_destroyvoid idmef_address_destroy (idmef_address_t *ptr); Destroy ptr and all of it's children. The objects are only destroyed if their reference count reach zero. ptr : pointer to a idmef_address_t object. idmef_address_get_ident () idmef_address_get_identprelude_string_t * idmef_address_get_ident (idmef_address_t *ptr); ptr : Returns : idmef_address_set_ident () idmef_address_set_identvoid idmef_address_set_ident (idmef_address_t *ptr, prelude_string_t *ident); Set ident object as a children of ptr. if ptr already contain an ident object, then it is destroyed, and updated to point to the provided ident object. ptr : pointer to a idmef_address_t object. ident : pointer to a prelude_string_t object. idmef_address_new_ident () idmef_address_new_identint idmef_address_new_ident (idmef_address_t *ptr, prelude_string_t **ret); Create a new ident object, children of idmef_address_t. If ptr already contain a prelude_string_t object, then it is destroyed. ptr : pointer to a idmef_address_t object. ret : pointer to an address where to store the created prelude_string_t object. Returns : 0 on success, or a negative value if an error occured. idmef_address_get_category () idmef_address_get_categoryidmef_address_category_t idmef_address_get_category (idmef_address_t *ptr); Get category children of the idmef_address_t object. ptr : pointer to a idmef_address_t object. Returns : a pointer to a idmef_address_category_t object, or NULL if the children object is not set. idmef_address_set_category () idmef_address_set_categoryvoid idmef_address_set_category (idmef_address_t *ptr, idmef_address_category_t category); Set category object as a children of ptr. if ptr already contain an category object, then it is destroyed, and updated to point to the provided category object. ptr : pointer to a idmef_address_t object. category : pointer to a idmef_address_category_t object. idmef_address_new_category () idmef_address_new_categoryint idmef_address_new_category (idmef_address_t *ptr, idmef_address_category_t **ret); Create a new category object, children of idmef_address_t. If ptr already contain a idmef_address_category_t object, then it is destroyed. ptr : pointer to a idmef_address_t object. ret : pointer to an address where to store the created idmef_address_category_t object. Returns : 0 on success, or a negative value if an error occured. idmef_address_get_vlan_name () idmef_address_get_vlan_nameprelude_string_t * idmef_address_get_vlan_name (idmef_address_t *ptr); ptr : Returns : idmef_address_set_vlan_name () idmef_address_set_vlan_namevoid idmef_address_set_vlan_name (idmef_address_t *ptr, prelude_string_t *vlan_name); Set vlan_name object as a children of ptr. if ptr already contain an vlan_name object, then it is destroyed, and updated to point to the provided vlan_name object. ptr : pointer to a idmef_address_t object. vlan_name : pointer to a prelude_string_t object. idmef_address_new_vlan_name () idmef_address_new_vlan_nameint idmef_address_new_vlan_name (idmef_address_t *ptr, prelude_string_t **ret); Create a new vlan_name object, children of idmef_address_t. If ptr already contain a prelude_string_t object, then it is destroyed. ptr : pointer to a idmef_address_t object. ret : pointer to an address where to store the created prelude_string_t object. Returns : 0 on success, or a negative value if an error occured. idmef_address_unset_vlan_num () idmef_address_unset_vlan_numvoid idmef_address_unset_vlan_num (idmef_address_t *ptr); ptr : idmef_address_get_vlan_num () idmef_address_get_vlan_numint32_t * idmef_address_get_vlan_num (idmef_address_t *ptr); ptr : Returns : idmef_address_set_vlan_num () idmef_address_set_vlan_numvoid idmef_address_set_vlan_num (idmef_address_t *ptr, int32_t vlan_num); Set vlan_num object as a children of ptr. if ptr already contain an vlan_num object, then it is destroyed, and updated to point to the provided vlan_num object. ptr : pointer to a idmef_address_t object. vlan_num : pointer to a int32_t object. idmef_address_new_vlan_num () idmef_address_new_vlan_numint idmef_address_new_vlan_num (idmef_address_t *ptr, int32_t **ret); Create a new vlan_num object, children of idmef_address_t. If ptr already contain a int32_t object, then it is destroyed. ptr : pointer to a idmef_address_t object. ret : pointer to an address where to store the created int32_t object. Returns : 0 on success, or a negative value if an error occured. idmef_address_get_address () idmef_address_get_addressprelude_string_t * idmef_address_get_address (idmef_address_t *ptr); ptr : Returns : idmef_address_set_address () idmef_address_set_addressvoid idmef_address_set_address (idmef_address_t *ptr, prelude_string_t *address); Set address object as a children of ptr. if ptr already contain an address object, then it is destroyed, and updated to point to the provided address object. ptr : pointer to a idmef_address_t object. address : pointer to a prelude_string_t object. idmef_address_new_address () idmef_address_new_addressint idmef_address_new_address (idmef_address_t *ptr, prelude_string_t **ret); Create a new address object, children of idmef_address_t. If ptr already contain a prelude_string_t object, then it is destroyed. ptr : pointer to a idmef_address_t object. ret : pointer to an address where to store the created prelude_string_t object. Returns : 0 on success, or a negative value if an error occured. idmef_address_get_netmask () idmef_address_get_netmaskprelude_string_t * idmef_address_get_netmask (idmef_address_t *ptr); ptr : Returns : idmef_address_set_netmask () idmef_address_set_netmaskvoid idmef_address_set_netmask (idmef_address_t *ptr, prelude_string_t *netmask); Set netmask object as a children of ptr. if ptr already contain an netmask object, then it is destroyed, and updated to point to the provided netmask object. ptr : pointer to a idmef_address_t object. netmask : pointer to a prelude_string_t object. idmef_address_new_netmask () idmef_address_new_netmaskint idmef_address_new_netmask (idmef_address_t *ptr, prelude_string_t **ret); Create a new netmask object, children of idmef_address_t. If ptr already contain a prelude_string_t object, then it is destroyed. ptr : pointer to a idmef_address_t object. ret : pointer to an address where to store the created prelude_string_t object. Returns : 0 on success, or a negative value if an error occured. idmef_process_t idmef_process_ttypedef struct idmef_process idmef_process_t; idmef_process_new () idmef_process_newint idmef_process_new (idmef_process_t **ret); Create a new idmef_process_t object. ret : Pointer where to store the created idmef_process_t object. Returns : 0 on success, a negative value if an error occured. idmef_process_copy () idmef_process_copyint idmef_process_copy (const idmef_process_t *src, idmef_process_t *dst); Copy a new idmef_process_t object from src to dst. src : Source of the copy. dst : Where to copy the object. Returns : 0 on success, a negative value if an error occured. idmef_process_clone () idmef_process_cloneint idmef_process_clone (idmef_process_t *src, idmef_process_t **dst); Create a copy of src, and store it in dst. src : Object to be cloned. dst : Address where to store the pointer to the cloned object. Returns : 0 on success, a negative value if an error occured. idmef_process_ref () idmef_process_refidmef_process_t * idmef_process_ref (idmef_process_t *process); Increase process reference count, so that it can be referenced multiple time. process : pointer to a idmef_process_t object. Returns : a pointer to process. idmef_process_destroy () idmef_process_destroyvoid idmef_process_destroy (idmef_process_t *ptr); Destroy ptr and all of it's children. The objects are only destroyed if their reference count reach zero. ptr : pointer to a idmef_process_t object. idmef_process_get_ident () idmef_process_get_identprelude_string_t * idmef_process_get_ident (idmef_process_t *ptr); ptr : Returns : idmef_process_set_ident () idmef_process_set_identvoid idmef_process_set_ident (idmef_process_t *ptr, prelude_string_t *ident); Set ident object as a children of ptr. if ptr already contain an ident object, then it is destroyed, and updated to point to the provided ident object. ptr : pointer to a idmef_process_t object. ident : pointer to a prelude_string_t object. idmef_process_new_ident () idmef_process_new_identint idmef_process_new_ident (idmef_process_t *ptr, prelude_string_t **ret); Create a new ident object, children of idmef_process_t. If ptr already contain a prelude_string_t object, then it is destroyed. ptr : pointer to a idmef_process_t object. ret : pointer to an address where to store the created prelude_string_t object. Returns : 0 on success, or a negative value if an error occured. idmef_process_get_name () idmef_process_get_nameprelude_string_t * idmef_process_get_name (idmef_process_t *ptr); ptr : Returns : idmef_process_set_name () idmef_process_set_namevoid idmef_process_set_name (idmef_process_t *ptr, prelude_string_t *name); Set name object as a children of ptr. if ptr already contain an name object, then it is destroyed, and updated to point to the provided name object. ptr : pointer to a idmef_process_t object. name : pointer to a prelude_string_t object. idmef_process_new_name () idmef_process_new_nameint idmef_process_new_name (idmef_process_t *ptr, prelude_string_t **ret); Create a new name object, children of idmef_process_t. If ptr already contain a prelude_string_t object, then it is destroyed. ptr : pointer to a idmef_process_t object. ret : pointer to an address where to store the created prelude_string_t object. Returns : 0 on success, or a negative value if an error occured. idmef_process_unset_pid () idmef_process_unset_pidvoid idmef_process_unset_pid (idmef_process_t *ptr); ptr : idmef_process_get_pid () idmef_process_get_piduint32_t * idmef_process_get_pid (idmef_process_t *ptr); ptr : Returns : idmef_process_set_pid () idmef_process_set_pidvoid idmef_process_set_pid (idmef_process_t *ptr, uint32_t pid); Set pid object as a children of ptr. if ptr already contain an pid object, then it is destroyed, and updated to point to the provided pid object. ptr : pointer to a idmef_process_t object. pid : pointer to a uint32_t object. idmef_process_new_pid () idmef_process_new_pidint idmef_process_new_pid (idmef_process_t *ptr, uint32_t **ret); Create a new pid object, children of idmef_process_t. If ptr already contain a uint32_t object, then it is destroyed. ptr : pointer to a idmef_process_t object. ret : pointer to an address where to store the created uint32_t object. Returns : 0 on success, or a negative value if an error occured. idmef_process_get_path () idmef_process_get_pathprelude_string_t * idmef_process_get_path (idmef_process_t *ptr); ptr : Returns : idmef_process_set_path () idmef_process_set_pathvoid idmef_process_set_path (idmef_process_t *ptr, prelude_string_t *path); Set path object as a children of ptr. if ptr already contain an path object, then it is destroyed, and updated to point to the provided path object. ptr : pointer to a idmef_process_t object. path : pointer to a prelude_string_t object. idmef_process_new_path () idmef_process_new_pathint idmef_process_new_path (idmef_process_t *ptr, prelude_string_t **ret); Create a new path object, children of idmef_process_t. If ptr already contain a prelude_string_t object, then it is destroyed. ptr : pointer to a idmef_process_t object. ret : pointer to an address where to store the created prelude_string_t object. Returns : 0 on success, or a negative value if an error occured. idmef_process_get_next_arg () idmef_process_get_next_argprelude_string_t * idmef_process_get_next_arg (idmef_process_t *process, prelude_string_t *prelude_string_cur); Get the next prelude_string_t object listed in ptr. When iterating over the prelude_string_t object listed in ptr, object should be set to the latest returned prelude_string_t object. process : pointer to a idmef_process_t object. prelude_string_cur : pointer to a prelude_string_t object. Returns : the next prelude_string_t in the list. idmef_process_set_arg () idmef_process_set_argvoid idmef_process_set_arg (idmef_process_t *ptr, prelude_string_t *object, int pos); Add object to position pos of ptr list of prelude_string_t object. If pos is IDMEF_LIST_APPEND, object will be inserted at the tail of the list. If pos is IDMEF_LIST_PREPEND, object will be inserted at the head of the list. ptr : pointer to a idmef_process_t object. object : pointer to a prelude_string_t object. pos : Position in the list. idmef_process_new_arg () idmef_process_new_argint idmef_process_new_arg (idmef_process_t *ptr, prelude_string_t **ret, int pos); Create a new prelude_string_t children of ptr, and add it to position pos of ptr list of prelude_string_t object. The created prelude_string_t object is stored in ret. If pos is IDMEF_LIST_APPEND, object will be inserted at the tail of the list. If pos is IDMEF_LIST_PREPEND, object will be inserted at the head of the list. ptr : pointer to a idmef_process_t object. ret : pointer to an address where to store the created prelude_string_t object. pos : position in the list. Returns : 0 on success, or a negative value if an error occured. idmef_process_get_next_env () idmef_process_get_next_envprelude_string_t * idmef_process_get_next_env (idmef_process_t *process, prelude_string_t *prelude_string_cur); Get the next prelude_string_t object listed in ptr. When iterating over the prelude_string_t object listed in ptr, object should be set to the latest returned prelude_string_t object. process : pointer to a idmef_process_t object. prelude_string_cur : pointer to a prelude_string_t object. Returns : the next prelude_string_t in the list. idmef_process_set_env () idmef_process_set_envvoid idmef_process_set_env (idmef_process_t *ptr, prelude_string_t *object, int pos); Add object to position pos of ptr list of prelude_string_t object. If pos is IDMEF_LIST_APPEND, object will be inserted at the tail of the list. If pos is IDMEF_LIST_PREPEND, object will be inserted at the head of the list. ptr : pointer to a idmef_process_t object. object : pointer to a prelude_string_t object. pos : Position in the list. idmef_process_new_env () idmef_process_new_envint idmef_process_new_env (idmef_process_t *ptr, prelude_string_t **ret, int pos); Create a new prelude_string_t children of ptr, and add it to position pos of ptr list of prelude_string_t object. The created prelude_string_t object is stored in ret. If pos is IDMEF_LIST_APPEND, object will be inserted at the tail of the list. If pos is IDMEF_LIST_PREPEND, object will be inserted at the head of the list. ptr : pointer to a idmef_process_t object. ret : pointer to an address where to store the created prelude_string_t object. pos : position in the list. Returns : 0 on success, or a negative value if an error occured. idmef_web_service_t idmef_web_service_ttypedef struct idmef_web_service idmef_web_service_t; idmef_web_service_new () idmef_web_service_newint idmef_web_service_new (idmef_web_service_t **ret); Create a new idmef_web_service_t object. ret : Pointer where to store the created idmef_web_service_t object. Returns : 0 on success, a negative value if an error occured. idmef_web_service_copy () idmef_web_service_copyint idmef_web_service_copy (const idmef_web_service_t *src, idmef_web_service_t *dst); Copy a new idmef_web_service_t object from src to dst. src : Source of the copy. dst : Where to copy the object. Returns : 0 on success, a negative value if an error occured. idmef_web_service_clone () idmef_web_service_cloneint idmef_web_service_clone (idmef_web_service_t *src, idmef_web_service_t **dst); Create a copy of src, and store it in dst. src : Object to be cloned. dst : Address where to store the pointer to the cloned object. Returns : 0 on success, a negative value if an error occured. idmef_web_service_ref () idmef_web_service_refidmef_web_service_t * idmef_web_service_ref (idmef_web_service_t *web_service); Increase web_service reference count, so that it can be referenced multiple time. web_service : pointer to a idmef_web_service_t object. Returns : a pointer to web_service. idmef_web_service_destroy () idmef_web_service_destroyvoid idmef_web_service_destroy (idmef_web_service_t *ptr); Destroy ptr and all of it's children. The objects are only destroyed if their reference count reach zero. ptr : pointer to a idmef_web_service_t object. idmef_web_service_get_url () idmef_web_service_get_urlprelude_string_t * idmef_web_service_get_url (idmef_web_service_t *ptr); ptr : Returns : idmef_web_service_set_url () idmef_web_service_set_urlvoid idmef_web_service_set_url (idmef_web_service_t *ptr, prelude_string_t *url); Set url object as a children of ptr. if ptr already contain an url object, then it is destroyed, and updated to point to the provided url object. ptr : pointer to a idmef_web_service_t object. url : pointer to a prelude_string_t object. idmef_web_service_new_url () idmef_web_service_new_urlint idmef_web_service_new_url (idmef_web_service_t *ptr, prelude_string_t **ret); Create a new url object, children of idmef_web_service_t. If ptr already contain a prelude_string_t object, then it is destroyed. ptr : pointer to a idmef_web_service_t object. ret : pointer to an address where to store the created prelude_string_t object. Returns : 0 on success, or a negative value if an error occured. idmef_web_service_get_cgi () idmef_web_service_get_cgiprelude_string_t * idmef_web_service_get_cgi (idmef_web_service_t *ptr); ptr : Returns : idmef_web_service_set_cgi () idmef_web_service_set_cgivoid idmef_web_service_set_cgi (idmef_web_service_t *ptr, prelude_string_t *cgi); Set cgi object as a children of ptr. if ptr already contain an cgi object, then it is destroyed, and updated to point to the provided cgi object. ptr : pointer to a idmef_web_service_t object. cgi : pointer to a prelude_string_t object. idmef_web_service_new_cgi () idmef_web_service_new_cgiint idmef_web_service_new_cgi (idmef_web_service_t *ptr, prelude_string_t **ret); Create a new cgi object, children of idmef_web_service_t. If ptr already contain a prelude_string_t object, then it is destroyed. ptr : pointer to a idmef_web_service_t object. ret : pointer to an address where to store the created prelude_string_t object. Returns : 0 on success, or a negative value if an error occured. idmef_web_service_get_http_method () idmef_web_service_get_http_methodprelude_string_t * idmef_web_service_get_http_method (idmef_web_service_t *ptr); ptr : Returns : idmef_web_service_set_http_method () idmef_web_service_set_http_methodvoid idmef_web_service_set_http_method (idmef_web_service_t *ptr, prelude_string_t *http_method); Set http_method object as a children of ptr. if ptr already contain an http_method object, then it is destroyed, and updated to point to the provided http_method object. ptr : pointer to a idmef_web_service_t object. http_method : pointer to a prelude_string_t object. idmef_web_service_new_http_method () idmef_web_service_new_http_methodint idmef_web_service_new_http_method (idmef_web_service_t *ptr, prelude_string_t **ret); Create a new http_method object, children of idmef_web_service_t. If ptr already contain a prelude_string_t object, then it is destroyed. ptr : pointer to a idmef_web_service_t object. ret : pointer to an address where to store the created prelude_string_t object. Returns : 0 on success, or a negative value if an error occured. idmef_web_service_get_next_arg () idmef_web_service_get_next_argprelude_string_t * idmef_web_service_get_next_arg (idmef_web_service_t *web_service, prelude_string_t *prelude_string_cur); Get the next prelude_string_t object listed in ptr. When iterating over the prelude_string_t object listed in ptr, object should be set to the latest returned prelude_string_t object. web_service : pointer to a idmef_web_service_t object. prelude_string_cur : pointer to a prelude_string_t object. Returns : the next prelude_string_t in the list. idmef_web_service_set_arg () idmef_web_service_set_argvoid idmef_web_service_set_arg (idmef_web_service_t *ptr, prelude_string_t *object, int pos); Add object to position pos of ptr list of prelude_string_t object. If pos is IDMEF_LIST_APPEND, object will be inserted at the tail of the list. If pos is IDMEF_LIST_PREPEND, object will be inserted at the head of the list. ptr : pointer to a idmef_web_service_t object. object : pointer to a prelude_string_t object. pos : Position in the list. idmef_web_service_new_arg () idmef_web_service_new_argint idmef_web_service_new_arg (idmef_web_service_t *ptr, prelude_string_t **ret, int pos); Create a new prelude_string_t children of ptr, and add it to position pos of ptr list of prelude_string_t object. The created prelude_string_t object is stored in ret. If pos is IDMEF_LIST_APPEND, object will be inserted at the tail of the list. If pos is IDMEF_LIST_PREPEND, object will be inserted at the head of the list. ptr : pointer to a idmef_web_service_t object. ret : pointer to an address where to store the created prelude_string_t object. pos : position in the list. Returns : 0 on success, or a negative value if an error occured. idmef_snmp_service_t idmef_snmp_service_ttypedef struct idmef_snmp_service idmef_snmp_service_t; idmef_snmp_service_new () idmef_snmp_service_newint idmef_snmp_service_new (idmef_snmp_service_t **ret); Create a new idmef_snmp_service_t object. ret : Pointer where to store the created idmef_snmp_service_t object. Returns : 0 on success, a negative value if an error occured. idmef_snmp_service_copy () idmef_snmp_service_copyint idmef_snmp_service_copy (const idmef_snmp_service_t *src, idmef_snmp_service_t *dst); Copy a new idmef_snmp_service_t object from src to dst. src : Source of the copy. dst : Where to copy the object. Returns : 0 on success, a negative value if an error occured. idmef_snmp_service_clone () idmef_snmp_service_cloneint idmef_snmp_service_clone (idmef_snmp_service_t *src, idmef_snmp_service_t **dst); Create a copy of src, and store it in dst. src : Object to be cloned. dst : Address where to store the pointer to the cloned object. Returns : 0 on success, a negative value if an error occured. idmef_snmp_service_ref () idmef_snmp_service_refidmef_snmp_service_t * idmef_snmp_service_ref (idmef_snmp_service_t *snmp_service); Increase snmp_service reference count, so that it can be referenced multiple time. snmp_service : pointer to a idmef_snmp_service_t object. Returns : a pointer to snmp_service. idmef_snmp_service_destroy () idmef_snmp_service_destroyvoid idmef_snmp_service_destroy (idmef_snmp_service_t *ptr); Destroy ptr and all of it's children. The objects are only destroyed if their reference count reach zero. ptr : pointer to a idmef_snmp_service_t object. idmef_snmp_service_get_oid () idmef_snmp_service_get_oidprelude_string_t * idmef_snmp_service_get_oid (idmef_snmp_service_t *ptr); ptr : Returns : idmef_snmp_service_set_oid () idmef_snmp_service_set_oidvoid idmef_snmp_service_set_oid (idmef_snmp_service_t *ptr, prelude_string_t *oid); Set oid object as a children of ptr. if ptr already contain an oid object, then it is destroyed, and updated to point to the provided oid object. ptr : pointer to a idmef_snmp_service_t object. oid : pointer to a prelude_string_t object. idmef_snmp_service_new_oid () idmef_snmp_service_new_oidint idmef_snmp_service_new_oid (idmef_snmp_service_t *ptr, prelude_string_t **ret); Create a new oid object, children of idmef_snmp_service_t. If ptr already contain a prelude_string_t object, then it is destroyed. ptr : pointer to a idmef_snmp_service_t object. ret : pointer to an address where to store the created prelude_string_t object. Returns : 0 on success, or a negative value if an error occured. idmef_snmp_service_unset_message_processing_model () idmef_snmp_service_unset_message_processing_modelvoid idmef_snmp_service_unset_message_processing_model (idmef_snmp_service_t *ptr); ptr : idmef_snmp_service_get_message_processing_model () idmef_snmp_service_get_message_processing_modeluint32_t * idmef_snmp_service_get_message_processing_model (idmef_snmp_service_t *ptr); ptr : Returns : idmef_snmp_service_set_message_processing_model () idmef_snmp_service_set_message_processing_modelvoid idmef_snmp_service_set_message_processing_model (idmef_snmp_service_t *ptr, uint32_t message_processing_model); Set message_processing_model object as a children of ptr. if ptr already contain an message_processing_model object, then it is destroyed, and updated to point to the provided message_processing_model object. ptr : pointer to a idmef_snmp_service_t object. message_processing_model : pointer to a uint32_t object. idmef_snmp_service_new_message_processing_model () idmef_snmp_service_new_message_processing_modelint idmef_snmp_service_new_message_processing_model (idmef_snmp_service_t *ptr, uint32_t **ret); Create a new message_processing_model object, children of idmef_snmp_service_t. If ptr already contain a uint32_t object, then it is destroyed. ptr : pointer to a idmef_snmp_service_t object. ret : pointer to an address where to store the created uint32_t object. Returns : 0 on success, or a negative value if an error occured. idmef_snmp_service_unset_security_model () idmef_snmp_service_unset_security_modelvoid idmef_snmp_service_unset_security_model (idmef_snmp_service_t *ptr); ptr : idmef_snmp_service_get_security_model () idmef_snmp_service_get_security_modeluint32_t * idmef_snmp_service_get_security_model (idmef_snmp_service_t *ptr); ptr : Returns : idmef_snmp_service_set_security_model () idmef_snmp_service_set_security_modelvoid idmef_snmp_service_set_security_model (idmef_snmp_service_t *ptr, uint32_t security_model); Set security_model object as a children of ptr. if ptr already contain an security_model object, then it is destroyed, and updated to point to the provided security_model object. ptr : pointer to a idmef_snmp_service_t object. security_model : pointer to a uint32_t object. idmef_snmp_service_new_security_model () idmef_snmp_service_new_security_modelint idmef_snmp_service_new_security_model (idmef_snmp_service_t *ptr, uint32_t **ret); Create a new security_model object, children of idmef_snmp_service_t. If ptr already contain a uint32_t object, then it is destroyed. ptr : pointer to a idmef_snmp_service_t object. ret : pointer to an address where to store the created uint32_t object. Returns : 0 on success, or a negative value if an error occured. idmef_snmp_service_get_security_name () idmef_snmp_service_get_security_nameprelude_string_t * idmef_snmp_service_get_security_name (idmef_snmp_service_t *ptr); ptr : Returns : idmef_snmp_service_set_security_name () idmef_snmp_service_set_security_namevoid idmef_snmp_service_set_security_name (idmef_snmp_service_t *ptr, prelude_string_t *security_name); Set security_name object as a children of ptr. if ptr already contain an security_name object, then it is destroyed, and updated to point to the provided security_name object. ptr : pointer to a idmef_snmp_service_t object. security_name : pointer to a prelude_string_t object. idmef_snmp_service_new_security_name () idmef_snmp_service_new_security_nameint idmef_snmp_service_new_security_name (idmef_snmp_service_t *ptr, prelude_string_t **ret); Create a new security_name object, children of idmef_snmp_service_t. If ptr already contain a prelude_string_t object, then it is destroyed. ptr : pointer to a idmef_snmp_service_t object. ret : pointer to an address where to store the created prelude_string_t object. Returns : 0 on success, or a negative value if an error occured. idmef_snmp_service_unset_security_level () idmef_snmp_service_unset_security_levelvoid idmef_snmp_service_unset_security_level (idmef_snmp_service_t *ptr); ptr : idmef_snmp_service_get_security_level () idmef_snmp_service_get_security_leveluint32_t * idmef_snmp_service_get_security_level (idmef_snmp_service_t *ptr); ptr : Returns : idmef_snmp_service_set_security_level () idmef_snmp_service_set_security_levelvoid idmef_snmp_service_set_security_level (idmef_snmp_service_t *ptr, uint32_t security_level); Set security_level object as a children of ptr. if ptr already contain an security_level object, then it is destroyed, and updated to point to the provided security_level object. ptr : pointer to a idmef_snmp_service_t object. security_level : pointer to a uint32_t object. idmef_snmp_service_new_security_level () idmef_snmp_service_new_security_levelint idmef_snmp_service_new_security_level (idmef_snmp_service_t *ptr, uint32_t **ret); Create a new security_level object, children of idmef_snmp_service_t. If ptr already contain a uint32_t object, then it is destroyed. ptr : pointer to a idmef_snmp_service_t object. ret : pointer to an address where to store the created uint32_t object. Returns : 0 on success, or a negative value if an error occured. idmef_snmp_service_get_context_name () idmef_snmp_service_get_context_nameprelude_string_t * idmef_snmp_service_get_context_name (idmef_snmp_service_t *ptr); ptr : Returns : idmef_snmp_service_set_context_name () idmef_snmp_service_set_context_namevoid idmef_snmp_service_set_context_name (idmef_snmp_service_t *ptr, prelude_string_t *context_name); Set context_name object as a children of ptr. if ptr already contain an context_name object, then it is destroyed, and updated to point to the provided context_name object. ptr : pointer to a idmef_snmp_service_t object. context_name : pointer to a prelude_string_t object. idmef_snmp_service_new_context_name () idmef_snmp_service_new_context_nameint idmef_snmp_service_new_context_name (idmef_snmp_service_t *ptr, prelude_string_t **ret); Create a new context_name object, children of idmef_snmp_service_t. If ptr already contain a prelude_string_t object, then it is destroyed. ptr : pointer to a idmef_snmp_service_t object. ret : pointer to an address where to store the created prelude_string_t object. Returns : 0 on success, or a negative value if an error occured. idmef_snmp_service_get_context_engine_id () idmef_snmp_service_get_context_engine_idprelude_string_t * idmef_snmp_service_get_context_engine_id (idmef_snmp_service_t *ptr); ptr : Returns : idmef_snmp_service_set_context_engine_id () idmef_snmp_service_set_context_engine_idvoid idmef_snmp_service_set_context_engine_id (idmef_snmp_service_t *ptr, prelude_string_t *context_engine_id); Set context_engine_id object as a children of ptr. if ptr already contain an context_engine_id object, then it is destroyed, and updated to point to the provided context_engine_id object. ptr : pointer to a idmef_snmp_service_t object. context_engine_id : pointer to a prelude_string_t object. idmef_snmp_service_new_context_engine_id () idmef_snmp_service_new_context_engine_idint idmef_snmp_service_new_context_engine_id (idmef_snmp_service_t *ptr, prelude_string_t **ret); Create a new context_engine_id object, children of idmef_snmp_service_t. If ptr already contain a prelude_string_t object, then it is destroyed. ptr : pointer to a idmef_snmp_service_t object. ret : pointer to an address where to store the created prelude_string_t object. Returns : 0 on success, or a negative value if an error occured. idmef_snmp_service_get_command () idmef_snmp_service_get_commandprelude_string_t * idmef_snmp_service_get_command (idmef_snmp_service_t *ptr); ptr : Returns : idmef_snmp_service_set_command () idmef_snmp_service_set_commandvoid idmef_snmp_service_set_command (idmef_snmp_service_t *ptr, prelude_string_t *command); Set command object as a children of ptr. if ptr already contain an command object, then it is destroyed, and updated to point to the provided command object. ptr : pointer to a idmef_snmp_service_t object. command : pointer to a prelude_string_t object. idmef_snmp_service_new_command () idmef_snmp_service_new_commandint idmef_snmp_service_new_command (idmef_snmp_service_t *ptr, prelude_string_t **ret); Create a new command object, children of idmef_snmp_service_t. If ptr already contain a prelude_string_t object, then it is destroyed. ptr : pointer to a idmef_snmp_service_t object. ret : pointer to an address where to store the created prelude_string_t object. Returns : 0 on success, or a negative value if an error occured. idmef_snmp_service_get_community () idmef_snmp_service_get_communityprelude_string_t * idmef_snmp_service_get_community (idmef_snmp_service_t *ptr); ptr : Returns : idmef_snmp_service_set_community () idmef_snmp_service_set_communityvoid idmef_snmp_service_set_community (idmef_snmp_service_t *ptr, prelude_string_t *community); Set community object as a children of ptr. if ptr already contain an community object, then it is destroyed, and updated to point to the provided community object. ptr : pointer to a idmef_snmp_service_t object. community : pointer to a prelude_string_t object. idmef_snmp_service_new_community () idmef_snmp_service_new_communityint idmef_snmp_service_new_community (idmef_snmp_service_t *ptr, prelude_string_t **ret); Create a new community object, children of idmef_snmp_service_t. If ptr already contain a prelude_string_t object, then it is destroyed. ptr : pointer to a idmef_snmp_service_t object. ret : pointer to an address where to store the created prelude_string_t object. Returns : 0 on success, or a negative value if an error occured. enum idmef_service_type_t idmef_service_type_ttypedef enum { IDMEF_SERVICE_TYPE_ERROR = -1, IDMEF_SERVICE_TYPE_DEFAULT = 0, IDMEF_SERVICE_TYPE_WEB = 1, IDMEF_SERVICE_TYPE_SNMP = 2 } idmef_service_type_t; idmef_service_type_to_numeric () idmef_service_type_to_numericidmef_service_type_t idmef_service_type_to_numeric (const char *name); name : pointer to an IDMEF string representation of a idmef_service_type_t value. Returns : the numeric equivalent of name, or -1 if name is not valid. idmef_service_type_to_string () idmef_service_type_to_stringconst char * idmef_service_type_to_string (idmef_service_type_t val); Return the IDMEF string equivalent of val provided idmef_service_type_t value. val : an enumeration value for idmef_service_type_t. Returns : a pointer to the string describing val, or NULL if val is invalid. idmef_service_t idmef_service_ttypedef struct idmef_service idmef_service_t; idmef_service_new () idmef_service_newint idmef_service_new (idmef_service_t **ret); Create a new idmef_service_t object. ret : Pointer where to store the created idmef_service_t object. Returns : 0 on success, a negative value if an error occured. idmef_service_copy () idmef_service_copyint idmef_service_copy (const idmef_service_t *src, idmef_service_t *dst); Copy a new idmef_service_t object from src to dst. src : Source of the copy. dst : Where to copy the object. Returns : 0 on success, a negative value if an error occured. idmef_service_clone () idmef_service_cloneint idmef_service_clone (idmef_service_t *src, idmef_service_t **dst); Create a copy of src, and store it in dst. src : Object to be cloned. dst : Address where to store the pointer to the cloned object. Returns : 0 on success, a negative value if an error occured. idmef_service_ref () idmef_service_refidmef_service_t * idmef_service_ref (idmef_service_t *service); Increase service reference count, so that it can be referenced multiple time. service : pointer to a idmef_service_t object. Returns : a pointer to service. idmef_service_destroy () idmef_service_destroyvoid idmef_service_destroy (idmef_service_t *ptr); Destroy ptr and all of it's children. The objects are only destroyed if their reference count reach zero. ptr : pointer to a idmef_service_t object. idmef_service_get_ident () idmef_service_get_identprelude_string_t * idmef_service_get_ident (idmef_service_t *ptr); ptr : Returns : idmef_service_set_ident () idmef_service_set_identvoid idmef_service_set_ident (idmef_service_t *ptr, prelude_string_t *ident); Set ident object as a children of ptr. if ptr already contain an ident object, then it is destroyed, and updated to point to the provided ident object. ptr : pointer to a idmef_service_t object. ident : pointer to a prelude_string_t object. idmef_service_new_ident () idmef_service_new_identint idmef_service_new_ident (idmef_service_t *ptr, prelude_string_t **ret); Create a new ident object, children of idmef_service_t. If ptr already contain a prelude_string_t object, then it is destroyed. ptr : pointer to a idmef_service_t object. ret : pointer to an address where to store the created prelude_string_t object. Returns : 0 on success, or a negative value if an error occured. idmef_service_unset_ip_version () idmef_service_unset_ip_versionvoid idmef_service_unset_ip_version (idmef_service_t *ptr); ptr : idmef_service_get_ip_version () idmef_service_get_ip_versionuint8_t * idmef_service_get_ip_version (idmef_service_t *ptr); ptr : Returns : idmef_service_set_ip_version () idmef_service_set_ip_versionvoid idmef_service_set_ip_version (idmef_service_t *ptr, uint8_t ip_version); Set ip_version object as a children of ptr. if ptr already contain an ip_version object, then it is destroyed, and updated to point to the provided ip_version object. ptr : pointer to a idmef_service_t object. ip_version : pointer to a uint8_t object. idmef_service_new_ip_version () idmef_service_new_ip_versionint idmef_service_new_ip_version (idmef_service_t *ptr, uint8_t **ret); Create a new ip_version object, children of idmef_service_t. If ptr already contain a uint8_t object, then it is destroyed. ptr : pointer to a idmef_service_t object. ret : pointer to an address where to store the created uint8_t object. Returns : 0 on success, or a negative value if an error occured. idmef_service_unset_iana_protocol_number () idmef_service_unset_iana_protocol_numbervoid idmef_service_unset_iana_protocol_number (idmef_service_t *ptr); ptr : idmef_service_get_iana_protocol_number () idmef_service_get_iana_protocol_numberuint8_t * idmef_service_get_iana_protocol_number (idmef_service_t *ptr); ptr : Returns : idmef_service_set_iana_protocol_number () idmef_service_set_iana_protocol_numbervoid idmef_service_set_iana_protocol_number (idmef_service_t *ptr, uint8_t iana_protocol_number); Set iana_protocol_number object as a children of ptr. if ptr already contain an iana_protocol_number object, then it is destroyed, and updated to point to the provided iana_protocol_number object. ptr : pointer to a idmef_service_t object. iana_protocol_number : pointer to a uint8_t object. idmef_service_new_iana_protocol_number () idmef_service_new_iana_protocol_numberint idmef_service_new_iana_protocol_number (idmef_service_t *ptr, uint8_t **ret); Create a new iana_protocol_number object, children of idmef_service_t. If ptr already contain a uint8_t object, then it is destroyed. ptr : pointer to a idmef_service_t object. ret : pointer to an address where to store the created uint8_t object. Returns : 0 on success, or a negative value if an error occured. idmef_service_get_iana_protocol_name () idmef_service_get_iana_protocol_nameprelude_string_t * idmef_service_get_iana_protocol_name (idmef_service_t *ptr); ptr : Returns : idmef_service_set_iana_protocol_name () idmef_service_set_iana_protocol_namevoid idmef_service_set_iana_protocol_name (idmef_service_t *ptr, prelude_string_t *iana_protocol_name); Set iana_protocol_name object as a children of ptr. if ptr already contain an iana_protocol_name object, then it is destroyed, and updated to point to the provided iana_protocol_name object. ptr : pointer to a idmef_service_t object. iana_protocol_name : pointer to a prelude_string_t object. idmef_service_new_iana_protocol_name () idmef_service_new_iana_protocol_nameint idmef_service_new_iana_protocol_name (idmef_service_t *ptr, prelude_string_t **ret); Create a new iana_protocol_name object, children of idmef_service_t. If ptr already contain a prelude_string_t object, then it is destroyed. ptr : pointer to a idmef_service_t object. ret : pointer to an address where to store the created prelude_string_t object. Returns : 0 on success, or a negative value if an error occured. idmef_service_get_name () idmef_service_get_nameprelude_string_t * idmef_service_get_name (idmef_service_t *ptr); ptr : Returns : idmef_service_set_name () idmef_service_set_namevoid idmef_service_set_name (idmef_service_t *ptr, prelude_string_t *name); Set name object as a children of ptr. if ptr already contain an name object, then it is destroyed, and updated to point to the provided name object. ptr : pointer to a idmef_service_t object. name : pointer to a prelude_string_t object. idmef_service_new_name () idmef_service_new_nameint idmef_service_new_name (idmef_service_t *ptr, prelude_string_t **ret); Create a new name object, children of idmef_service_t. If ptr already contain a prelude_string_t object, then it is destroyed. ptr : pointer to a idmef_service_t object. ret : pointer to an address where to store the created prelude_string_t object. Returns : 0 on success, or a negative value if an error occured. idmef_service_unset_port () idmef_service_unset_portvoid idmef_service_unset_port (idmef_service_t *ptr); ptr : idmef_service_get_port () idmef_service_get_portuint16_t * idmef_service_get_port (idmef_service_t *ptr); ptr : Returns : idmef_service_set_port () idmef_service_set_portvoid idmef_service_set_port (idmef_service_t *ptr, uint16_t port); Set port object as a children of ptr. if ptr already contain an port object, then it is destroyed, and updated to point to the provided port object. ptr : pointer to a idmef_service_t object. port : pointer to a uint16_t object. idmef_service_new_port () idmef_service_new_portint idmef_service_new_port (idmef_service_t *ptr, uint16_t **ret); Create a new port object, children of idmef_service_t. If ptr already contain a uint16_t object, then it is destroyed. ptr : pointer to a idmef_service_t object. ret : pointer to an address where to store the created uint16_t object. Returns : 0 on success, or a negative value if an error occured. idmef_service_get_portlist () idmef_service_get_portlistprelude_string_t * idmef_service_get_portlist (idmef_service_t *ptr); ptr : Returns : idmef_service_set_portlist () idmef_service_set_portlistvoid idmef_service_set_portlist (idmef_service_t *ptr, prelude_string_t *portlist); Set portlist object as a children of ptr. if ptr already contain an portlist object, then it is destroyed, and updated to point to the provided portlist object. ptr : pointer to a idmef_service_t object. portlist : pointer to a prelude_string_t object. idmef_service_new_portlist () idmef_service_new_portlistint idmef_service_new_portlist (idmef_service_t *ptr, prelude_string_t **ret); Create a new portlist object, children of idmef_service_t. If ptr already contain a prelude_string_t object, then it is destroyed. ptr : pointer to a idmef_service_t object. ret : pointer to an address where to store the created prelude_string_t object. Returns : 0 on success, or a negative value if an error occured. idmef_service_get_protocol () idmef_service_get_protocolprelude_string_t * idmef_service_get_protocol (idmef_service_t *ptr); ptr : Returns : idmef_service_set_protocol () idmef_service_set_protocolvoid idmef_service_set_protocol (idmef_service_t *ptr, prelude_string_t *protocol); Set protocol object as a children of ptr. if ptr already contain an protocol object, then it is destroyed, and updated to point to the provided protocol object. ptr : pointer to a idmef_service_t object. protocol : pointer to a prelude_string_t object. idmef_service_new_protocol () idmef_service_new_protocolint idmef_service_new_protocol (idmef_service_t *ptr, prelude_string_t **ret); Create a new protocol object, children of idmef_service_t. If ptr already contain a prelude_string_t object, then it is destroyed. ptr : pointer to a idmef_service_t object. ret : pointer to an address where to store the created prelude_string_t object. Returns : 0 on success, or a negative value if an error occured. idmef_service_get_type () idmef_service_get_typeidmef_service_type_t idmef_service_get_type (idmef_service_t *ptr); Access the type children of ptr. ptr : pointer to a idmef_service_t object. Returns : a pointer to the idmef_service_type_t children, or NULL if it is not set. idmef_service_get_web_service () idmef_service_get_web_serviceidmef_web_service_t * idmef_service_get_web_service (idmef_service_t *ptr); Access the web_service children of ptr. ptr : pointer to a idmef_service_t object. Returns : a pointer to the idmef_web_service_t children, or NULL if it is not set. idmef_service_set_web_service () idmef_service_set_web_servicevoid idmef_service_set_web_service (idmef_service_t *ptr, idmef_web_service_t *web_service); Set web_service object as a children of ptr. if ptr already contain a web_service object, then it is destroyed, and updated to point to the provided web_service object. ptr : pointer to a idmef_service_t object. web_service : pointer to a idmef_web_service_t object. idmef_service_new_web_service () idmef_service_new_web_serviceint idmef_service_new_web_service (idmef_service_t *ptr, idmef_web_service_t **ret); Create a new idmef_web_service_t object, children of idmef_service_t. If ptr already contain a idmef_web_service_t object, then it is destroyed. ptr : pointer to a idmef_service_t object. ret : pointer where to store the created idmef_web_service_t object. Returns : 0 on success, or a negative value if an error occured. idmef_service_get_snmp_service () idmef_service_get_snmp_serviceidmef_snmp_service_t * idmef_service_get_snmp_service (idmef_service_t *ptr); Access the snmp_service children of ptr. ptr : pointer to a idmef_service_t object. Returns : a pointer to the idmef_snmp_service_t children, or NULL if it is not set. idmef_service_set_snmp_service () idmef_service_set_snmp_servicevoid idmef_service_set_snmp_service (idmef_service_t *ptr, idmef_snmp_service_t *snmp_service); Set snmp_service object as a children of ptr. if ptr already contain a snmp_service object, then it is destroyed, and updated to point to the provided snmp_service object. ptr : pointer to a idmef_service_t object. snmp_service : pointer to a idmef_snmp_service_t object. idmef_service_new_snmp_service () idmef_service_new_snmp_serviceint idmef_service_new_snmp_service (idmef_service_t *ptr, idmef_snmp_service_t **ret); Create a new idmef_snmp_service_t object, children of idmef_service_t. If ptr already contain a idmef_snmp_service_t object, then it is destroyed. ptr : pointer to a idmef_service_t object. ret : pointer where to store the created idmef_snmp_service_t object. Returns : 0 on success, or a negative value if an error occured. enum idmef_node_category_t idmef_node_category_ttypedef enum { IDMEF_NODE_CATEGORY_ERROR = -1, IDMEF_NODE_CATEGORY_UNKNOWN = 0, IDMEF_NODE_CATEGORY_ADS = 1, IDMEF_NODE_CATEGORY_AFS = 2, IDMEF_NODE_CATEGORY_CODA = 3, IDMEF_NODE_CATEGORY_DFS = 4, IDMEF_NODE_CATEGORY_DNS = 5, IDMEF_NODE_CATEGORY_HOSTS = 6, IDMEF_NODE_CATEGORY_KERBEROS = 7, IDMEF_NODE_CATEGORY_NDS = 8, IDMEF_NODE_CATEGORY_NIS = 9, IDMEF_NODE_CATEGORY_NISPLUS = 10, IDMEF_NODE_CATEGORY_NT = 11, IDMEF_NODE_CATEGORY_WFW = 12 } idmef_node_category_t; idmef_node_category_to_numeric () idmef_node_category_to_numericidmef_node_category_t idmef_node_category_to_numeric (const char *name); name : pointer to an IDMEF string representation of a idmef_node_category_t value. Returns : the numeric equivalent of name, or -1 if name is not valid. idmef_node_category_to_string () idmef_node_category_to_stringconst char * idmef_node_category_to_string (idmef_node_category_t val); Return the IDMEF string equivalent of val provided idmef_node_category_t value. val : an enumeration value for idmef_node_category_t. Returns : a pointer to the string describing val, or NULL if val is invalid. idmef_node_t idmef_node_ttypedef struct idmef_node idmef_node_t; idmef_node_new () idmef_node_newint idmef_node_new (idmef_node_t **ret); Create a new idmef_node_t object. ret : Pointer where to store the created idmef_node_t object. Returns : 0 on success, a negative value if an error occured. idmef_node_copy () idmef_node_copyint idmef_node_copy (const idmef_node_t *src, idmef_node_t *dst); Copy a new idmef_node_t object from src to dst. src : Source of the copy. dst : Where to copy the object. Returns : 0 on success, a negative value if an error occured. idmef_node_clone () idmef_node_cloneint idmef_node_clone (idmef_node_t *src, idmef_node_t **dst); Create a copy of src, and store it in dst. src : Object to be cloned. dst : Address where to store the pointer to the cloned object. Returns : 0 on success, a negative value if an error occured. idmef_node_ref () idmef_node_refidmef_node_t * idmef_node_ref (idmef_node_t *node); Increase node reference count, so that it can be referenced multiple time. node : pointer to a idmef_node_t object. Returns : a pointer to node. idmef_node_destroy () idmef_node_destroyvoid idmef_node_destroy (idmef_node_t *ptr); Destroy ptr and all of it's children. The objects are only destroyed if their reference count reach zero. ptr : pointer to a idmef_node_t object. idmef_node_get_ident () idmef_node_get_identprelude_string_t * idmef_node_get_ident (idmef_node_t *ptr); ptr : Returns : idmef_node_set_ident () idmef_node_set_identvoid idmef_node_set_ident (idmef_node_t *ptr, prelude_string_t *ident); Set ident object as a children of ptr. if ptr already contain an ident object, then it is destroyed, and updated to point to the provided ident object. ptr : pointer to a idmef_node_t object. ident : pointer to a prelude_string_t object. idmef_node_new_ident () idmef_node_new_identint idmef_node_new_ident (idmef_node_t *ptr, prelude_string_t **ret); Create a new ident object, children of idmef_node_t. If ptr already contain a prelude_string_t object, then it is destroyed. ptr : pointer to a idmef_node_t object. ret : pointer to an address where to store the created prelude_string_t object. Returns : 0 on success, or a negative value if an error occured. idmef_node_get_category () idmef_node_get_categoryidmef_node_category_t idmef_node_get_category (idmef_node_t *ptr); Get category children of the idmef_node_t object. ptr : pointer to a idmef_node_t object. Returns : a pointer to a idmef_node_category_t object, or NULL if the children object is not set. idmef_node_set_category () idmef_node_set_categoryvoid idmef_node_set_category (idmef_node_t *ptr, idmef_node_category_t category); Set category object as a children of ptr. if ptr already contain an category object, then it is destroyed, and updated to point to the provided category object. ptr : pointer to a idmef_node_t object. category : pointer to a idmef_node_category_t object. idmef_node_new_category () idmef_node_new_categoryint idmef_node_new_category (idmef_node_t *ptr, idmef_node_category_t **ret); Create a new category object, children of idmef_node_t. If ptr already contain a idmef_node_category_t object, then it is destroyed. ptr : pointer to a idmef_node_t object. ret : pointer to an address where to store the created idmef_node_category_t object. Returns : 0 on success, or a negative value if an error occured. idmef_node_get_location () idmef_node_get_locationprelude_string_t * idmef_node_get_location (idmef_node_t *ptr); ptr : Returns : idmef_node_set_location () idmef_node_set_locationvoid idmef_node_set_location (idmef_node_t *ptr, prelude_string_t *location); Set location object as a children of ptr. if ptr already contain an location object, then it is destroyed, and updated to point to the provided location object. ptr : pointer to a idmef_node_t object. location : pointer to a prelude_string_t object. idmef_node_new_location () idmef_node_new_locationint idmef_node_new_location (idmef_node_t *ptr, prelude_string_t **ret); Create a new location object, children of idmef_node_t. If ptr already contain a prelude_string_t object, then it is destroyed. ptr : pointer to a idmef_node_t object. ret : pointer to an address where to store the created prelude_string_t object. Returns : 0 on success, or a negative value if an error occured. idmef_node_get_name () idmef_node_get_nameprelude_string_t * idmef_node_get_name (idmef_node_t *ptr); ptr : Returns : idmef_node_set_name () idmef_node_set_namevoid idmef_node_set_name (idmef_node_t *ptr, prelude_string_t *name); Set name object as a children of ptr. if ptr already contain an name object, then it is destroyed, and updated to point to the provided name object. ptr : pointer to a idmef_node_t object. name : pointer to a prelude_string_t object. idmef_node_new_name () idmef_node_new_nameint idmef_node_new_name (idmef_node_t *ptr, prelude_string_t **ret); Create a new name object, children of idmef_node_t. If ptr already contain a prelude_string_t object, then it is destroyed. ptr : pointer to a idmef_node_t object. ret : pointer to an address where to store the created prelude_string_t object. Returns : 0 on success, or a negative value if an error occured. idmef_node_get_next_address () idmef_node_get_next_addressidmef_address_t * idmef_node_get_next_address (idmef_node_t *node, idmef_address_t *address_cur); Get the next idmef_address_t object listed in ptr. When iterating over the idmef_address_t object listed in ptr, object should be set to the latest returned idmef_address_t object. node : pointer to a idmef_node_t object. address_cur : pointer to a idmef_address_t object. Returns : the next idmef_address_t in the list. idmef_node_set_address () idmef_node_set_addressvoid idmef_node_set_address (idmef_node_t *ptr, idmef_address_t *object, int pos); Add object to position pos of ptr list of idmef_address_t object. If pos is IDMEF_LIST_APPEND, object will be inserted at the tail of the list. If pos is IDMEF_LIST_PREPEND, object will be inserted at the head of the list. ptr : pointer to a idmef_node_t object. object : pointer to a idmef_address_t object. pos : Position in the list. idmef_node_new_address () idmef_node_new_addressint idmef_node_new_address (idmef_node_t *ptr, idmef_address_t **ret, int pos); Create a new idmef_address_t children of ptr, and add it to position pos of ptr list of idmef_address_t object. The created idmef_address_t object is stored in ret. If pos is IDMEF_LIST_APPEND, object will be inserted at the tail of the list. If pos is IDMEF_LIST_PREPEND, object will be inserted at the head of the list. ptr : pointer to a idmef_node_t object. ret : pointer to an address where to store the created idmef_address_t object. pos : position in the list. Returns : 0 on success, or a negative value if an error occured. enum idmef_source_spoofed_t idmef_source_spoofed_ttypedef enum { IDMEF_SOURCE_SPOOFED_ERROR = -1, IDMEF_SOURCE_SPOOFED_UNKNOWN = 0, IDMEF_SOURCE_SPOOFED_YES = 1, IDMEF_SOURCE_SPOOFED_NO = 2 } idmef_source_spoofed_t; idmef_source_spoofed_to_numeric () idmef_source_spoofed_to_numericidmef_source_spoofed_t idmef_source_spoofed_to_numeric (const char *name); name : pointer to an IDMEF string representation of a idmef_source_spoofed_t value. Returns : the numeric equivalent of name, or -1 if name is not valid. idmef_source_spoofed_to_string () idmef_source_spoofed_to_stringconst char * idmef_source_spoofed_to_string (idmef_source_spoofed_t val); Return the IDMEF string equivalent of val provided idmef_source_spoofed_t value. val : an enumeration value for idmef_source_spoofed_t. Returns : a pointer to the string describing val, or NULL if val is invalid. idmef_source_t idmef_source_ttypedef struct idmef_source idmef_source_t; idmef_source_new () idmef_source_newint idmef_source_new (idmef_source_t **ret); Create a new idmef_source_t object. ret : Pointer where to store the created idmef_source_t object. Returns : 0 on success, a negative value if an error occured. idmef_source_copy () idmef_source_copyint idmef_source_copy (const idmef_source_t *src, idmef_source_t *dst); Copy a new idmef_source_t object from src to dst. src : Source of the copy. dst : Where to copy the object. Returns : 0 on success, a negative value if an error occured. idmef_source_clone () idmef_source_cloneint idmef_source_clone (idmef_source_t *src, idmef_source_t **dst); Create a copy of src, and store it in dst. src : Object to be cloned. dst : Address where to store the pointer to the cloned object. Returns : 0 on success, a negative value if an error occured. idmef_source_ref () idmef_source_refidmef_source_t * idmef_source_ref (idmef_source_t *source); Increase source reference count, so that it can be referenced multiple time. source : pointer to a idmef_source_t object. Returns : a pointer to source. idmef_source_destroy () idmef_source_destroyvoid idmef_source_destroy (idmef_source_t *ptr); Destroy ptr and all of it's children. The objects are only destroyed if their reference count reach zero. ptr : pointer to a idmef_source_t object. idmef_source_get_ident () idmef_source_get_identprelude_string_t * idmef_source_get_ident (idmef_source_t *ptr); ptr : Returns : idmef_source_set_ident () idmef_source_set_identvoid idmef_source_set_ident (idmef_source_t *ptr, prelude_string_t *ident); Set ident object as a children of ptr. if ptr already contain an ident object, then it is destroyed, and updated to point to the provided ident object. ptr : pointer to a idmef_source_t object. ident : pointer to a prelude_string_t object. idmef_source_new_ident () idmef_source_new_identint idmef_source_new_ident (idmef_source_t *ptr, prelude_string_t **ret); Create a new ident object, children of idmef_source_t. If ptr already contain a prelude_string_t object, then it is destroyed. ptr : pointer to a idmef_source_t object. ret : pointer to an address where to store the created prelude_string_t object. Returns : 0 on success, or a negative value if an error occured. idmef_source_get_spoofed () idmef_source_get_spoofedidmef_source_spoofed_t idmef_source_get_spoofed (idmef_source_t *ptr); Get spoofed children of the idmef_source_t object. ptr : pointer to a idmef_source_t object. Returns : a pointer to a idmef_source_spoofed_t object, or NULL if the children object is not set. idmef_source_set_spoofed () idmef_source_set_spoofedvoid idmef_source_set_spoofed (idmef_source_t *ptr, idmef_source_spoofed_t spoofed); Set spoofed object as a children of ptr. if ptr already contain an spoofed object, then it is destroyed, and updated to point to the provided spoofed object. ptr : pointer to a idmef_source_t object. spoofed : pointer to a idmef_source_spoofed_t object. idmef_source_new_spoofed () idmef_source_new_spoofedint idmef_source_new_spoofed (idmef_source_t *ptr, idmef_source_spoofed_t **ret); Create a new spoofed object, children of idmef_source_t. If ptr already contain a idmef_source_spoofed_t object, then it is destroyed. ptr : pointer to a idmef_source_t object. ret : pointer to an address where to store the created idmef_source_spoofed_t object. Returns : 0 on success, or a negative value if an error occured. idmef_source_get_interface () idmef_source_get_interfaceprelude_string_t * idmef_source_get_interface (idmef_source_t *ptr); ptr : Returns : idmef_source_set_interface () idmef_source_set_interfacevoid idmef_source_set_interface (idmef_source_t *ptr, prelude_string_t *interface); Set interface object as a children of ptr. if ptr already contain an interface object, then it is destroyed, and updated to point to the provided interface object. ptr : pointer to a idmef_source_t object. interface : pointer to a prelude_string_t object. idmef_source_new_interface () idmef_source_new_interfaceint idmef_source_new_interface (idmef_source_t *ptr, prelude_string_t **ret); Create a new interface object, children of idmef_source_t. If ptr already contain a prelude_string_t object, then it is destroyed. ptr : pointer to a idmef_source_t object. ret : pointer to an address where to store the created prelude_string_t object. Returns : 0 on success, or a negative value if an error occured. idmef_source_get_node () idmef_source_get_nodeidmef_node_t * idmef_source_get_node (idmef_source_t *ptr); ptr : Returns : idmef_source_set_node () idmef_source_set_nodevoid idmef_source_set_node (idmef_source_t *ptr, idmef_node_t *node); Set node object as a children of ptr. if ptr already contain an node object, then it is destroyed, and updated to point to the provided node object. ptr : pointer to a idmef_source_t object. node : pointer to a idmef_node_t object. idmef_source_new_node () idmef_source_new_nodeint idmef_source_new_node (idmef_source_t *ptr, idmef_node_t **ret); Create a new node object, children of idmef_source_t. If ptr already contain a idmef_node_t object, then it is destroyed. ptr : pointer to a idmef_source_t object. ret : pointer to an address where to store the created idmef_node_t object. Returns : 0 on success, or a negative value if an error occured. idmef_source_get_user () idmef_source_get_useridmef_user_t * idmef_source_get_user (idmef_source_t *ptr); ptr : Returns : idmef_source_set_user () idmef_source_set_uservoid idmef_source_set_user (idmef_source_t *ptr, idmef_user_t *user); Set user object as a children of ptr. if ptr already contain an user object, then it is destroyed, and updated to point to the provided user object. ptr : pointer to a idmef_source_t object. user : pointer to a idmef_user_t object. idmef_source_new_user () idmef_source_new_userint idmef_source_new_user (idmef_source_t *ptr, idmef_user_t **ret); Create a new user object, children of idmef_source_t. If ptr already contain a idmef_user_t object, then it is destroyed. ptr : pointer to a idmef_source_t object. ret : pointer to an address where to store the created idmef_user_t object. Returns : 0 on success, or a negative value if an error occured. idmef_source_get_process () idmef_source_get_processidmef_process_t * idmef_source_get_process (idmef_source_t *ptr); ptr : Returns : idmef_source_set_process () idmef_source_set_processvoid idmef_source_set_process (idmef_source_t *ptr, idmef_process_t *process); Set process object as a children of ptr. if ptr already contain an process object, then it is destroyed, and updated to point to the provided process object. ptr : pointer to a idmef_source_t object. process : pointer to a idmef_process_t object. idmef_source_new_process () idmef_source_new_processint idmef_source_new_process (idmef_source_t *ptr, idmef_process_t **ret); Create a new process object, children of idmef_source_t. If ptr already contain a idmef_process_t object, then it is destroyed. ptr : pointer to a idmef_source_t object. ret : pointer to an address where to store the created idmef_process_t object. Returns : 0 on success, or a negative value if an error occured. idmef_source_get_service () idmef_source_get_serviceidmef_service_t * idmef_source_get_service (idmef_source_t *ptr); ptr : Returns : idmef_source_set_service () idmef_source_set_servicevoid idmef_source_set_service (idmef_source_t *ptr, idmef_service_t *service); Set service object as a children of ptr. if ptr already contain an service object, then it is destroyed, and updated to point to the provided service object. ptr : pointer to a idmef_source_t object. service : pointer to a idmef_service_t object. idmef_source_new_service () idmef_source_new_serviceint idmef_source_new_service (idmef_source_t *ptr, idmef_service_t **ret); Create a new service object, children of idmef_source_t. If ptr already contain a idmef_service_t object, then it is destroyed. ptr : pointer to a idmef_source_t object. ret : pointer to an address where to store the created idmef_service_t object. Returns : 0 on success, or a negative value if an error occured. idmef_file_access_t idmef_file_access_ttypedef struct idmef_file_access idmef_file_access_t; idmef_file_access_new () idmef_file_access_newint idmef_file_access_new (idmef_file_access_t **ret); Create a new idmef_file_access_t object. ret : Pointer where to store the created idmef_file_access_t object. Returns : 0 on success, a negative value if an error occured. idmef_file_access_copy () idmef_file_access_copyint idmef_file_access_copy (const idmef_file_access_t *src, idmef_file_access_t *dst); Copy a new idmef_file_access_t object from src to dst. src : Source of the copy. dst : Where to copy the object. Returns : 0 on success, a negative value if an error occured. idmef_file_access_clone () idmef_file_access_cloneint idmef_file_access_clone (idmef_file_access_t *src, idmef_file_access_t **dst); Create a copy of src, and store it in dst. src : Object to be cloned. dst : Address where to store the pointer to the cloned object. Returns : 0 on success, a negative value if an error occured. idmef_file_access_ref () idmef_file_access_refidmef_file_access_t * idmef_file_access_ref (idmef_file_access_t *file_access); Increase file_access reference count, so that it can be referenced multiple time. file_access : pointer to a idmef_file_access_t object. Returns : a pointer to file_access. idmef_file_access_destroy () idmef_file_access_destroyvoid idmef_file_access_destroy (idmef_file_access_t *ptr); Destroy ptr and all of it's children. The objects are only destroyed if their reference count reach zero. ptr : pointer to a idmef_file_access_t object. idmef_file_access_get_user_id () idmef_file_access_get_user_ididmef_user_id_t * idmef_file_access_get_user_id (idmef_file_access_t *ptr); ptr : Returns : idmef_file_access_set_user_id () idmef_file_access_set_user_idvoid idmef_file_access_set_user_id (idmef_file_access_t *ptr, idmef_user_id_t *user_id); Set user_id object as a children of ptr. if ptr already contain an user_id object, then it is destroyed, and updated to point to the provided user_id object. ptr : pointer to a idmef_file_access_t object. user_id : pointer to a idmef_user_id_t object. idmef_file_access_new_user_id () idmef_file_access_new_user_idint idmef_file_access_new_user_id (idmef_file_access_t *ptr, idmef_user_id_t **ret); Create a new user_id object, children of idmef_file_access_t. If ptr already contain a idmef_user_id_t object, then it is destroyed. ptr : pointer to a idmef_file_access_t object. ret : pointer to an address where to store the created idmef_user_id_t object. Returns : 0 on success, or a negative value if an error occured. idmef_file_access_get_next_permission () idmef_file_access_get_next_permissionprelude_string_t * idmef_file_access_get_next_permission (idmef_file_access_t *file_access, prelude_string_t *prelude_string_cur); Get the next prelude_string_t object listed in ptr. When iterating over the prelude_string_t object listed in ptr, object should be set to the latest returned prelude_string_t object. file_access : pointer to a idmef_file_access_t object. prelude_string_cur : pointer to a prelude_string_t object. Returns : the next prelude_string_t in the list. idmef_file_access_set_permission () idmef_file_access_set_permissionvoid idmef_file_access_set_permission (idmef_file_access_t *ptr, prelude_string_t *object, int pos); Add object to position pos of ptr list of prelude_string_t object. If pos is IDMEF_LIST_APPEND, object will be inserted at the tail of the list. If pos is IDMEF_LIST_PREPEND, object will be inserted at the head of the list. ptr : pointer to a idmef_file_access_t object. object : pointer to a prelude_string_t object. pos : Position in the list. idmef_file_access_new_permission () idmef_file_access_new_permissionint idmef_file_access_new_permission (idmef_file_access_t *ptr, prelude_string_t **ret, int pos); Create a new prelude_string_t children of ptr, and add it to position pos of ptr list of prelude_string_t object. The created prelude_string_t object is stored in ret. If pos is IDMEF_LIST_APPEND, object will be inserted at the tail of the list. If pos is IDMEF_LIST_PREPEND, object will be inserted at the head of the list. ptr : pointer to a idmef_file_access_t object. ret : pointer to an address where to store the created prelude_string_t object. pos : position in the list. Returns : 0 on success, or a negative value if an error occured. idmef_inode_t idmef_inode_ttypedef struct idmef_inode idmef_inode_t; idmef_inode_new () idmef_inode_newint idmef_inode_new (idmef_inode_t **ret); Create a new idmef_inode_t object. ret : Pointer where to store the created idmef_inode_t object. Returns : 0 on success, a negative value if an error occured. idmef_inode_copy () idmef_inode_copyint idmef_inode_copy (const idmef_inode_t *src, idmef_inode_t *dst); Copy a new idmef_inode_t object from src to dst. src : Source of the copy. dst : Where to copy the object. Returns : 0 on success, a negative value if an error occured. idmef_inode_clone () idmef_inode_cloneint idmef_inode_clone (idmef_inode_t *src, idmef_inode_t **dst); Create a copy of src, and store it in dst. src : Object to be cloned. dst : Address where to store the pointer to the cloned object. Returns : 0 on success, a negative value if an error occured. idmef_inode_ref () idmef_inode_refidmef_inode_t * idmef_inode_ref (idmef_inode_t *inode); Increase inode reference count, so that it can be referenced multiple time. inode : pointer to a idmef_inode_t object. Returns : a pointer to inode. idmef_inode_destroy () idmef_inode_destroyvoid idmef_inode_destroy (idmef_inode_t *ptr); Destroy ptr and all of it's children. The objects are only destroyed if their reference count reach zero. ptr : pointer to a idmef_inode_t object. idmef_inode_get_change_time () idmef_inode_get_change_timeidmef_time_t * idmef_inode_get_change_time (idmef_inode_t *ptr); ptr : Returns : idmef_inode_set_change_time () idmef_inode_set_change_timevoid idmef_inode_set_change_time (idmef_inode_t *ptr, idmef_time_t *change_time); Set change_time object as a children of ptr. if ptr already contain an change_time object, then it is destroyed, and updated to point to the provided change_time object. ptr : pointer to a idmef_inode_t object. change_time : pointer to a idmef_time_t object. idmef_inode_new_change_time () idmef_inode_new_change_timeint idmef_inode_new_change_time (idmef_inode_t *ptr, idmef_time_t **ret); Create a new change_time object, children of idmef_inode_t. If ptr already contain a idmef_time_t object, then it is destroyed. ptr : pointer to a idmef_inode_t object. ret : pointer to an address where to store the created idmef_time_t object. Returns : 0 on success, or a negative value if an error occured. idmef_inode_unset_number () idmef_inode_unset_numbervoid idmef_inode_unset_number (idmef_inode_t *ptr); ptr : idmef_inode_get_number () idmef_inode_get_numberuint32_t * idmef_inode_get_number (idmef_inode_t *ptr); ptr : Returns : idmef_inode_set_number () idmef_inode_set_numbervoid idmef_inode_set_number (idmef_inode_t *ptr, uint32_t number); Set number object as a children of ptr. if ptr already contain an number object, then it is destroyed, and updated to point to the provided number object. ptr : pointer to a idmef_inode_t object. number : pointer to a uint32_t object. idmef_inode_new_number () idmef_inode_new_numberint idmef_inode_new_number (idmef_inode_t *ptr, uint32_t **ret); Create a new number object, children of idmef_inode_t. If ptr already contain a uint32_t object, then it is destroyed. ptr : pointer to a idmef_inode_t object. ret : pointer to an address where to store the created uint32_t object. Returns : 0 on success, or a negative value if an error occured. idmef_inode_unset_major_device () idmef_inode_unset_major_devicevoid idmef_inode_unset_major_device (idmef_inode_t *ptr); ptr : idmef_inode_get_major_device () idmef_inode_get_major_deviceuint32_t * idmef_inode_get_major_device (idmef_inode_t *ptr); ptr : Returns : idmef_inode_set_major_device () idmef_inode_set_major_devicevoid idmef_inode_set_major_device (idmef_inode_t *ptr, uint32_t major_device); Set major_device object as a children of ptr. if ptr already contain an major_device object, then it is destroyed, and updated to point to the provided major_device object. ptr : pointer to a idmef_inode_t object. major_device : pointer to a uint32_t object. idmef_inode_new_major_device () idmef_inode_new_major_deviceint idmef_inode_new_major_device (idmef_inode_t *ptr, uint32_t **ret); Create a new major_device object, children of idmef_inode_t. If ptr already contain a uint32_t object, then it is destroyed. ptr : pointer to a idmef_inode_t object. ret : pointer to an address where to store the created uint32_t object. Returns : 0 on success, or a negative value if an error occured. idmef_inode_unset_minor_device () idmef_inode_unset_minor_devicevoid idmef_inode_unset_minor_device (idmef_inode_t *ptr); ptr : idmef_inode_get_minor_device () idmef_inode_get_minor_deviceuint32_t * idmef_inode_get_minor_device (idmef_inode_t *ptr); ptr : Returns : idmef_inode_set_minor_device () idmef_inode_set_minor_devicevoid idmef_inode_set_minor_device (idmef_inode_t *ptr, uint32_t minor_device); Set minor_device object as a children of ptr. if ptr already contain an minor_device object, then it is destroyed, and updated to point to the provided minor_device object. ptr : pointer to a idmef_inode_t object. minor_device : pointer to a uint32_t object. idmef_inode_new_minor_device () idmef_inode_new_minor_deviceint idmef_inode_new_minor_device (idmef_inode_t *ptr, uint32_t **ret); Create a new minor_device object, children of idmef_inode_t. If ptr already contain a uint32_t object, then it is destroyed. ptr : pointer to a idmef_inode_t object. ret : pointer to an address where to store the created uint32_t object. Returns : 0 on success, or a negative value if an error occured. idmef_inode_unset_c_major_device () idmef_inode_unset_c_major_devicevoid idmef_inode_unset_c_major_device (idmef_inode_t *ptr); ptr : idmef_inode_get_c_major_device () idmef_inode_get_c_major_deviceuint32_t * idmef_inode_get_c_major_device (idmef_inode_t *ptr); ptr : Returns : idmef_inode_set_c_major_device () idmef_inode_set_c_major_devicevoid idmef_inode_set_c_major_device (idmef_inode_t *ptr, uint32_t c_major_device); Set c_major_device object as a children of ptr. if ptr already contain an c_major_device object, then it is destroyed, and updated to point to the provided c_major_device object. ptr : pointer to a idmef_inode_t object. c_major_device : pointer to a uint32_t object. idmef_inode_new_c_major_device () idmef_inode_new_c_major_deviceint idmef_inode_new_c_major_device (idmef_inode_t *ptr, uint32_t **ret); Create a new c_major_device object, children of idmef_inode_t. If ptr already contain a uint32_t object, then it is destroyed. ptr : pointer to a idmef_inode_t object. ret : pointer to an address where to store the created uint32_t object. Returns : 0 on success, or a negative value if an error occured. idmef_inode_unset_c_minor_device () idmef_inode_unset_c_minor_devicevoid idmef_inode_unset_c_minor_device (idmef_inode_t *ptr); ptr : idmef_inode_get_c_minor_device () idmef_inode_get_c_minor_deviceuint32_t * idmef_inode_get_c_minor_device (idmef_inode_t *ptr); ptr : Returns : idmef_inode_set_c_minor_device () idmef_inode_set_c_minor_devicevoid idmef_inode_set_c_minor_device (idmef_inode_t *ptr, uint32_t c_minor_device); Set c_minor_device object as a children of ptr. if ptr already contain an c_minor_device object, then it is destroyed, and updated to point to the provided c_minor_device object. ptr : pointer to a idmef_inode_t object. c_minor_device : pointer to a uint32_t object. idmef_inode_new_c_minor_device () idmef_inode_new_c_minor_deviceint idmef_inode_new_c_minor_device (idmef_inode_t *ptr, uint32_t **ret); Create a new c_minor_device object, children of idmef_inode_t. If ptr already contain a uint32_t object, then it is destroyed. ptr : pointer to a idmef_inode_t object. ret : pointer to an address where to store the created uint32_t object. Returns : 0 on success, or a negative value if an error occured. idmef_linkage_t idmef_linkage_ttypedef struct idmef_linkage idmef_linkage_t; enum idmef_checksum_algorithm_t idmef_checksum_algorithm_ttypedef enum { IDMEF_CHECKSUM_ALGORITHM_ERROR = -1, IDMEF_CHECKSUM_ALGORITHM_MD4 = 1, IDMEF_CHECKSUM_ALGORITHM_MD5 = 2, IDMEF_CHECKSUM_ALGORITHM_SHA1 = 3, IDMEF_CHECKSUM_ALGORITHM_SHA2_256 = 4, IDMEF_CHECKSUM_ALGORITHM_SHA2_384 = 5, IDMEF_CHECKSUM_ALGORITHM_SHA2_512 = 6, IDMEF_CHECKSUM_ALGORITHM_CRC_32 = 7, IDMEF_CHECKSUM_ALGORITHM_HAVAL = 8, IDMEF_CHECKSUM_ALGORITHM_TIGER = 9, IDMEF_CHECKSUM_ALGORITHM_GOST = 11 } idmef_checksum_algorithm_t; idmef_checksum_algorithm_to_numeric () idmef_checksum_algorithm_to_numericidmef_checksum_algorithm_t idmef_checksum_algorithm_to_numeric (const char *name); name : pointer to an IDMEF string representation of a idmef_checksum_algorithm_t value. Returns : the numeric equivalent of name, or -1 if name is not valid. idmef_checksum_algorithm_to_string () idmef_checksum_algorithm_to_stringconst char * idmef_checksum_algorithm_to_string (idmef_checksum_algorithm_t val); Return the IDMEF string equivalent of val provided idmef_checksum_algorithm_t value. val : an enumeration value for idmef_checksum_algorithm_t. Returns : a pointer to the string describing val, or NULL if val is invalid. idmef_checksum_t idmef_checksum_ttypedef struct idmef_checksum idmef_checksum_t; idmef_checksum_new () idmef_checksum_newint idmef_checksum_new (idmef_checksum_t **ret); Create a new idmef_checksum_t object. ret : Pointer where to store the created idmef_checksum_t object. Returns : 0 on success, a negative value if an error occured. idmef_checksum_copy () idmef_checksum_copyint idmef_checksum_copy (const idmef_checksum_t *src, idmef_checksum_t *dst); Copy a new idmef_checksum_t object from src to dst. src : Source of the copy. dst : Where to copy the object. Returns : 0 on success, a negative value if an error occured. idmef_checksum_clone () idmef_checksum_cloneint idmef_checksum_clone (idmef_checksum_t *src, idmef_checksum_t **dst); Create a copy of src, and store it in dst. src : Object to be cloned. dst : Address where to store the pointer to the cloned object. Returns : 0 on success, a negative value if an error occured. idmef_checksum_ref () idmef_checksum_refidmef_checksum_t * idmef_checksum_ref (idmef_checksum_t *checksum); Increase checksum reference count, so that it can be referenced multiple time. checksum : pointer to a idmef_checksum_t object. Returns : a pointer to checksum. idmef_checksum_destroy () idmef_checksum_destroyvoid idmef_checksum_destroy (idmef_checksum_t *ptr); Destroy ptr and all of it's children. The objects are only destroyed if their reference count reach zero. ptr : pointer to a idmef_checksum_t object. idmef_checksum_get_value () idmef_checksum_get_valueprelude_string_t * idmef_checksum_get_value (idmef_checksum_t *ptr); ptr : Returns : idmef_checksum_set_value () idmef_checksum_set_valuevoid idmef_checksum_set_value (idmef_checksum_t *ptr, prelude_string_t *value); Set value object as a children of ptr. if ptr already contain an value object, then it is destroyed, and updated to point to the provided value object. ptr : pointer to a idmef_checksum_t object. value : pointer to a prelude_string_t object. idmef_checksum_new_value () idmef_checksum_new_valueint idmef_checksum_new_value (idmef_checksum_t *ptr, prelude_string_t **ret); Create a new value object, children of idmef_checksum_t. If ptr already contain a prelude_string_t object, then it is destroyed. ptr : pointer to a idmef_checksum_t object. ret : pointer to an address where to store the created prelude_string_t object. Returns : 0 on success, or a negative value if an error occured. idmef_checksum_get_key () idmef_checksum_get_keyprelude_string_t * idmef_checksum_get_key (idmef_checksum_t *ptr); ptr : Returns : idmef_checksum_set_key () idmef_checksum_set_keyvoid idmef_checksum_set_key (idmef_checksum_t *ptr, prelude_string_t *key); Set key object as a children of ptr. if ptr already contain an key object, then it is destroyed, and updated to point to the provided key object. ptr : pointer to a idmef_checksum_t object. key : pointer to a prelude_string_t object. idmef_checksum_new_key () idmef_checksum_new_keyint idmef_checksum_new_key (idmef_checksum_t *ptr, prelude_string_t **ret); Create a new key object, children of idmef_checksum_t. If ptr already contain a prelude_string_t object, then it is destroyed. ptr : pointer to a idmef_checksum_t object. ret : pointer to an address where to store the created prelude_string_t object. Returns : 0 on success, or a negative value if an error occured. idmef_checksum_get_algorithm () idmef_checksum_get_algorithmidmef_checksum_algorithm_t idmef_checksum_get_algorithm (idmef_checksum_t *ptr); Get algorithm children of the idmef_checksum_t object. ptr : pointer to a idmef_checksum_t object. Returns : a pointer to a idmef_checksum_algorithm_t object, or NULL if the children object is not set. idmef_checksum_set_algorithm () idmef_checksum_set_algorithmvoid idmef_checksum_set_algorithm (idmef_checksum_t *ptr, idmef_checksum_algorithm_t algorithm); Set algorithm object as a children of ptr. if ptr already contain an algorithm object, then it is destroyed, and updated to point to the provided algorithm object. ptr : pointer to a idmef_checksum_t object. algorithm : pointer to a idmef_checksum_algorithm_t object. idmef_checksum_new_algorithm () idmef_checksum_new_algorithmint idmef_checksum_new_algorithm (idmef_checksum_t *ptr, idmef_checksum_algorithm_t **ret); Create a new algorithm object, children of idmef_checksum_t. If ptr already contain a idmef_checksum_algorithm_t object, then it is destroyed. ptr : pointer to a idmef_checksum_t object. ret : pointer to an address where to store the created idmef_checksum_algorithm_t object. Returns : 0 on success, or a negative value if an error occured. enum idmef_file_category_t idmef_file_category_ttypedef enum { IDMEF_FILE_CATEGORY_ERROR = -1, IDMEF_FILE_CATEGORY_CURRENT = 1, IDMEF_FILE_CATEGORY_ORIGINAL = 2 } idmef_file_category_t; idmef_file_category_to_numeric () idmef_file_category_to_numericidmef_file_category_t idmef_file_category_to_numeric (const char *name); name : pointer to an IDMEF string representation of a idmef_file_category_t value. Returns : the numeric equivalent of name, or -1 if name is not valid. idmef_file_category_to_string () idmef_file_category_to_stringconst char * idmef_file_category_to_string (idmef_file_category_t val); Return the IDMEF string equivalent of val provided idmef_file_category_t value. val : an enumeration value for idmef_file_category_t. Returns : a pointer to the string describing val, or NULL if val is invalid. enum idmef_file_fstype_t idmef_file_fstype_ttypedef enum { IDMEF_FILE_FSTYPE_ERROR = -1, IDMEF_FILE_FSTYPE_UFS = 1, IDMEF_FILE_FSTYPE_EFS = 2, IDMEF_FILE_FSTYPE_NFS = 3, IDMEF_FILE_FSTYPE_AFS = 4, IDMEF_FILE_FSTYPE_NTFS = 5, IDMEF_FILE_FSTYPE_FAT16 = 6, IDMEF_FILE_FSTYPE_FAT32 = 7, IDMEF_FILE_FSTYPE_PCFS = 8, IDMEF_FILE_FSTYPE_JOLIET = 9, IDMEF_FILE_FSTYPE_ISO9660 = 10 } idmef_file_fstype_t; idmef_file_fstype_to_numeric () idmef_file_fstype_to_numericidmef_file_fstype_t idmef_file_fstype_to_numeric (const char *name); name : pointer to an IDMEF string representation of a idmef_file_fstype_t value. Returns : the numeric equivalent of name, or -1 if name is not valid. idmef_file_fstype_to_string () idmef_file_fstype_to_stringconst char * idmef_file_fstype_to_string (idmef_file_fstype_t val); Return the IDMEF string equivalent of val provided idmef_file_fstype_t value. val : an enumeration value for idmef_file_fstype_t. Returns : a pointer to the string describing val, or NULL if val is invalid. idmef_file_t idmef_file_ttypedef struct idmef_file idmef_file_t; idmef_file_new () idmef_file_newint idmef_file_new (idmef_file_t **ret); Create a new idmef_file_t object. ret : Pointer where to store the created idmef_file_t object. Returns : 0 on success, a negative value if an error occured. idmef_file_copy () idmef_file_copyint idmef_file_copy (const idmef_file_t *src, idmef_file_t *dst); Copy a new idmef_file_t object from src to dst. src : Source of the copy. dst : Where to copy the object. Returns : 0 on success, a negative value if an error occured. idmef_file_clone () idmef_file_cloneint idmef_file_clone (idmef_file_t *src, idmef_file_t **dst); Create a copy of src, and store it in dst. src : Object to be cloned. dst : Address where to store the pointer to the cloned object. Returns : 0 on success, a negative value if an error occured. idmef_file_ref () idmef_file_refidmef_file_t * idmef_file_ref (idmef_file_t *file); Increase file reference count, so that it can be referenced multiple time. file : pointer to a idmef_file_t object. Returns : a pointer to file. idmef_file_destroy () idmef_file_destroyvoid idmef_file_destroy (idmef_file_t *ptr); Destroy ptr and all of it's children. The objects are only destroyed if their reference count reach zero. ptr : pointer to a idmef_file_t object. idmef_file_get_ident () idmef_file_get_identprelude_string_t * idmef_file_get_ident (idmef_file_t *ptr); ptr : Returns : idmef_file_set_ident () idmef_file_set_identvoid idmef_file_set_ident (idmef_file_t *ptr, prelude_string_t *ident); Set ident object as a children of ptr. if ptr already contain an ident object, then it is destroyed, and updated to point to the provided ident object. ptr : pointer to a idmef_file_t object. ident : pointer to a prelude_string_t object. idmef_file_new_ident () idmef_file_new_identint idmef_file_new_ident (idmef_file_t *ptr, prelude_string_t **ret); Create a new ident object, children of idmef_file_t. If ptr already contain a prelude_string_t object, then it is destroyed. ptr : pointer to a idmef_file_t object. ret : pointer to an address where to store the created prelude_string_t object. Returns : 0 on success, or a negative value if an error occured. idmef_file_get_name () idmef_file_get_nameprelude_string_t * idmef_file_get_name (idmef_file_t *ptr); ptr : Returns : idmef_file_set_name () idmef_file_set_namevoid idmef_file_set_name (idmef_file_t *ptr, prelude_string_t *name); Set name object as a children of ptr. if ptr already contain an name object, then it is destroyed, and updated to point to the provided name object. ptr : pointer to a idmef_file_t object. name : pointer to a prelude_string_t object. idmef_file_new_name () idmef_file_new_nameint idmef_file_new_name (idmef_file_t *ptr, prelude_string_t **ret); Create a new name object, children of idmef_file_t. If ptr already contain a prelude_string_t object, then it is destroyed. ptr : pointer to a idmef_file_t object. ret : pointer to an address where to store the created prelude_string_t object. Returns : 0 on success, or a negative value if an error occured. idmef_file_get_path () idmef_file_get_pathprelude_string_t * idmef_file_get_path (idmef_file_t *ptr); ptr : Returns : idmef_file_set_path () idmef_file_set_pathvoid idmef_file_set_path (idmef_file_t *ptr, prelude_string_t *path); Set path object as a children of ptr. if ptr already contain an path object, then it is destroyed, and updated to point to the provided path object. ptr : pointer to a idmef_file_t object. path : pointer to a prelude_string_t object. idmef_file_new_path () idmef_file_new_pathint idmef_file_new_path (idmef_file_t *ptr, prelude_string_t **ret); Create a new path object, children of idmef_file_t. If ptr already contain a prelude_string_t object, then it is destroyed. ptr : pointer to a idmef_file_t object. ret : pointer to an address where to store the created prelude_string_t object. Returns : 0 on success, or a negative value if an error occured. idmef_file_get_create_time () idmef_file_get_create_timeidmef_time_t * idmef_file_get_create_time (idmef_file_t *ptr); ptr : Returns : idmef_file_set_create_time () idmef_file_set_create_timevoid idmef_file_set_create_time (idmef_file_t *ptr, idmef_time_t *create_time); Set create_time object as a children of ptr. if ptr already contain an create_time object, then it is destroyed, and updated to point to the provided create_time object. ptr : pointer to a idmef_file_t object. create_time : pointer to a idmef_time_t object. idmef_file_new_create_time () idmef_file_new_create_timeint idmef_file_new_create_time (idmef_file_t *ptr, idmef_time_t **ret); Create a new create_time object, children of idmef_file_t. If ptr already contain a idmef_time_t object, then it is destroyed. ptr : pointer to a idmef_file_t object. ret : pointer to an address where to store the created idmef_time_t object. Returns : 0 on success, or a negative value if an error occured. idmef_file_get_modify_time () idmef_file_get_modify_timeidmef_time_t * idmef_file_get_modify_time (idmef_file_t *ptr); ptr : Returns : idmef_file_set_modify_time () idmef_file_set_modify_timevoid idmef_file_set_modify_time (idmef_file_t *ptr, idmef_time_t *modify_time); Set modify_time object as a children of ptr. if ptr already contain an modify_time object, then it is destroyed, and updated to point to the provided modify_time object. ptr : pointer to a idmef_file_t object. modify_time : pointer to a idmef_time_t object. idmef_file_new_modify_time () idmef_file_new_modify_timeint idmef_file_new_modify_time (idmef_file_t *ptr, idmef_time_t **ret); Create a new modify_time object, children of idmef_file_t. If ptr already contain a idmef_time_t object, then it is destroyed. ptr : pointer to a idmef_file_t object. ret : pointer to an address where to store the created idmef_time_t object. Returns : 0 on success, or a negative value if an error occured. idmef_file_get_access_time () idmef_file_get_access_timeidmef_time_t * idmef_file_get_access_time (idmef_file_t *ptr); ptr : Returns : idmef_file_set_access_time () idmef_file_set_access_timevoid idmef_file_set_access_time (idmef_file_t *ptr, idmef_time_t *access_time); Set access_time object as a children of ptr. if ptr already contain an access_time object, then it is destroyed, and updated to point to the provided access_time object. ptr : pointer to a idmef_file_t object. access_time : pointer to a idmef_time_t object. idmef_file_new_access_time () idmef_file_new_access_timeint idmef_file_new_access_time (idmef_file_t *ptr, idmef_time_t **ret); Create a new access_time object, children of idmef_file_t. If ptr already contain a idmef_time_t object, then it is destroyed. ptr : pointer to a idmef_file_t object. ret : pointer to an address where to store the created idmef_time_t object. Returns : 0 on success, or a negative value if an error occured. idmef_file_unset_data_size () idmef_file_unset_data_sizevoid idmef_file_unset_data_size (idmef_file_t *ptr); ptr : idmef_file_get_data_size () idmef_file_get_data_sizeuint64_t * idmef_file_get_data_size (idmef_file_t *ptr); ptr : Returns : idmef_file_set_data_size () idmef_file_set_data_sizevoid idmef_file_set_data_size (idmef_file_t *ptr, uint64_t data_size); Set data_size object as a children of ptr. if ptr already contain an data_size object, then it is destroyed, and updated to point to the provided data_size object. ptr : pointer to a idmef_file_t object. data_size : pointer to a uint64_t object. idmef_file_new_data_size () idmef_file_new_data_sizeint idmef_file_new_data_size (idmef_file_t *ptr, uint64_t **ret); Create a new data_size object, children of idmef_file_t. If ptr already contain a uint64_t object, then it is destroyed. ptr : pointer to a idmef_file_t object. ret : pointer to an address where to store the created uint64_t object. Returns : 0 on success, or a negative value if an error occured. idmef_file_unset_disk_size () idmef_file_unset_disk_sizevoid idmef_file_unset_disk_size (idmef_file_t *ptr); ptr : idmef_file_get_disk_size () idmef_file_get_disk_sizeuint64_t * idmef_file_get_disk_size (idmef_file_t *ptr); ptr : Returns : idmef_file_set_disk_size () idmef_file_set_disk_sizevoid idmef_file_set_disk_size (idmef_file_t *ptr, uint64_t disk_size); Set disk_size object as a children of ptr. if ptr already contain an disk_size object, then it is destroyed, and updated to point to the provided disk_size object. ptr : pointer to a idmef_file_t object. disk_size : pointer to a uint64_t object. idmef_file_new_disk_size () idmef_file_new_disk_sizeint idmef_file_new_disk_size (idmef_file_t *ptr, uint64_t **ret); Create a new disk_size object, children of idmef_file_t. If ptr already contain a uint64_t object, then it is destroyed. ptr : pointer to a idmef_file_t object. ret : pointer to an address where to store the created uint64_t object. Returns : 0 on success, or a negative value if an error occured. idmef_file_get_next_file_access () idmef_file_get_next_file_accessidmef_file_access_t * idmef_file_get_next_file_access (idmef_file_t *file, idmef_file_access_t *file_access_cur); Get the next idmef_file_access_t object listed in ptr. When iterating over the idmef_file_access_t object listed in ptr, object should be set to the latest returned idmef_file_access_t object. file : pointer to a idmef_file_t object. file_access_cur : pointer to a idmef_file_access_t object. Returns : the next idmef_file_access_t in the list. idmef_file_set_file_access () idmef_file_set_file_accessvoid idmef_file_set_file_access (idmef_file_t *ptr, idmef_file_access_t *object, int pos); Add object to position pos of ptr list of idmef_file_access_t object. If pos is IDMEF_LIST_APPEND, object will be inserted at the tail of the list. If pos is IDMEF_LIST_PREPEND, object will be inserted at the head of the list. ptr : pointer to a idmef_file_t object. object : pointer to a idmef_file_access_t object. pos : Position in the list. idmef_file_new_file_access () idmef_file_new_file_accessint idmef_file_new_file_access (idmef_file_t *ptr, idmef_file_access_t **ret, int pos); Create a new idmef_file_access_t children of ptr, and add it to position pos of ptr list of idmef_file_access_t object. The created idmef_file_access_t object is stored in ret. If pos is IDMEF_LIST_APPEND, object will be inserted at the tail of the list. If pos is IDMEF_LIST_PREPEND, object will be inserted at the head of the list. ptr : pointer to a idmef_file_t object. ret : pointer to an address where to store the created idmef_file_access_t object. pos : position in the list. Returns : 0 on success, or a negative value if an error occured. idmef_file_get_next_linkage () idmef_file_get_next_linkageidmef_linkage_t * idmef_file_get_next_linkage (idmef_file_t *file, idmef_linkage_t *linkage_cur); Get the next idmef_linkage_t object listed in ptr. When iterating over the idmef_linkage_t object listed in ptr, object should be set to the latest returned idmef_linkage_t object. file : pointer to a idmef_file_t object. linkage_cur : pointer to a idmef_linkage_t object. Returns : the next idmef_linkage_t in the list. idmef_file_set_linkage () idmef_file_set_linkagevoid idmef_file_set_linkage (idmef_file_t *ptr, idmef_linkage_t *object, int pos); Add object to position pos of ptr list of idmef_linkage_t object. If pos is IDMEF_LIST_APPEND, object will be inserted at the tail of the list. If pos is IDMEF_LIST_PREPEND, object will be inserted at the head of the list. ptr : pointer to a idmef_file_t object. object : pointer to a idmef_linkage_t object. pos : Position in the list. idmef_file_new_linkage () idmef_file_new_linkageint idmef_file_new_linkage (idmef_file_t *ptr, idmef_linkage_t **ret, int pos); Create a new idmef_linkage_t children of ptr, and add it to position pos of ptr list of idmef_linkage_t object. The created idmef_linkage_t object is stored in ret. If pos is IDMEF_LIST_APPEND, object will be inserted at the tail of the list. If pos is IDMEF_LIST_PREPEND, object will be inserted at the head of the list. ptr : pointer to a idmef_file_t object. ret : pointer to an address where to store the created idmef_linkage_t object. pos : position in the list. Returns : 0 on success, or a negative value if an error occured. idmef_file_get_inode () idmef_file_get_inodeidmef_inode_t * idmef_file_get_inode (idmef_file_t *ptr); ptr : Returns : idmef_file_set_inode () idmef_file_set_inodevoid idmef_file_set_inode (idmef_file_t *ptr, idmef_inode_t *inode); Set inode object as a children of ptr. if ptr already contain an inode object, then it is destroyed, and updated to point to the provided inode object. ptr : pointer to a idmef_file_t object. inode : pointer to a idmef_inode_t object. idmef_file_new_inode () idmef_file_new_inodeint idmef_file_new_inode (idmef_file_t *ptr, idmef_inode_t **ret); Create a new inode object, children of idmef_file_t. If ptr already contain a idmef_inode_t object, then it is destroyed. ptr : pointer to a idmef_file_t object. ret : pointer to an address where to store the created idmef_inode_t object. Returns : 0 on success, or a negative value if an error occured. idmef_file_get_next_checksum () idmef_file_get_next_checksumidmef_checksum_t * idmef_file_get_next_checksum (idmef_file_t *file, idmef_checksum_t *checksum_cur); Get the next idmef_checksum_t object listed in ptr. When iterating over the idmef_checksum_t object listed in ptr, object should be set to the latest returned idmef_checksum_t object. file : pointer to a idmef_file_t object. checksum_cur : pointer to a idmef_checksum_t object. Returns : the next idmef_checksum_t in the list. idmef_file_set_checksum () idmef_file_set_checksumvoid idmef_file_set_checksum (idmef_file_t *ptr, idmef_checksum_t *object, int pos); Add object to position pos of ptr list of idmef_checksum_t object. If pos is IDMEF_LIST_APPEND, object will be inserted at the tail of the list. If pos is IDMEF_LIST_PREPEND, object will be inserted at the head of the list. ptr : pointer to a idmef_file_t object. object : pointer to a idmef_checksum_t object. pos : Position in the list. idmef_file_new_checksum () idmef_file_new_checksumint idmef_file_new_checksum (idmef_file_t *ptr, idmef_checksum_t **ret, int pos); Create a new idmef_checksum_t children of ptr, and add it to position pos of ptr list of idmef_checksum_t object. The created idmef_checksum_t object is stored in ret. If pos is IDMEF_LIST_APPEND, object will be inserted at the tail of the list. If pos is IDMEF_LIST_PREPEND, object will be inserted at the head of the list. ptr : pointer to a idmef_file_t object. ret : pointer to an address where to store the created idmef_checksum_t object. pos : position in the list. Returns : 0 on success, or a negative value if an error occured. idmef_file_get_category () idmef_file_get_categoryidmef_file_category_t idmef_file_get_category (idmef_file_t *ptr); Get category children of the idmef_file_t object. ptr : pointer to a idmef_file_t object. Returns : a pointer to a idmef_file_category_t object, or NULL if the children object is not set. idmef_file_set_category () idmef_file_set_categoryvoid idmef_file_set_category (idmef_file_t *ptr, idmef_file_category_t category); Set category object as a children of ptr. if ptr already contain an category object, then it is destroyed, and updated to point to the provided category object. ptr : pointer to a idmef_file_t object. category : pointer to a idmef_file_category_t object. idmef_file_new_category () idmef_file_new_categoryint idmef_file_new_category (idmef_file_t *ptr, idmef_file_category_t **ret); Create a new category object, children of idmef_file_t. If ptr already contain a idmef_file_category_t object, then it is destroyed. ptr : pointer to a idmef_file_t object. ret : pointer to an address where to store the created idmef_file_category_t object. Returns : 0 on success, or a negative value if an error occured. idmef_file_unset_fstype () idmef_file_unset_fstypevoid idmef_file_unset_fstype (idmef_file_t *ptr); ptr : idmef_file_get_fstype () idmef_file_get_fstypeidmef_file_fstype_t * idmef_file_get_fstype (idmef_file_t *ptr); ptr : Returns : idmef_file_set_fstype () idmef_file_set_fstypevoid idmef_file_set_fstype (idmef_file_t *ptr, idmef_file_fstype_t fstype); Set fstype object as a children of ptr. if ptr already contain an fstype object, then it is destroyed, and updated to point to the provided fstype object. ptr : pointer to a idmef_file_t object. fstype : pointer to a idmef_file_fstype_t object. idmef_file_new_fstype () idmef_file_new_fstypeint idmef_file_new_fstype (idmef_file_t *ptr, idmef_file_fstype_t **ret); Create a new fstype object, children of idmef_file_t. If ptr already contain a idmef_file_fstype_t object, then it is destroyed. ptr : pointer to a idmef_file_t object. ret : pointer to an address where to store the created idmef_file_fstype_t object. Returns : 0 on success, or a negative value if an error occured. idmef_file_get_file_type () idmef_file_get_file_typeprelude_string_t * idmef_file_get_file_type (idmef_file_t *ptr); ptr : Returns : idmef_file_set_file_type () idmef_file_set_file_typevoid idmef_file_set_file_type (idmef_file_t *ptr, prelude_string_t *file_type); Set file_type object as a children of ptr. if ptr already contain an file_type object, then it is destroyed, and updated to point to the provided file_type object. ptr : pointer to a idmef_file_t object. file_type : pointer to a prelude_string_t object. idmef_file_new_file_type () idmef_file_new_file_typeint idmef_file_new_file_type (idmef_file_t *ptr, prelude_string_t **ret); Create a new file_type object, children of idmef_file_t. If ptr already contain a prelude_string_t object, then it is destroyed. ptr : pointer to a idmef_file_t object. ret : pointer to an address where to store the created prelude_string_t object. Returns : 0 on success, or a negative value if an error occured. enum idmef_linkage_category_t idmef_linkage_category_ttypedef enum { IDMEF_LINKAGE_CATEGORY_ERROR = -1, IDMEF_LINKAGE_CATEGORY_HARD_LINK = 1, IDMEF_LINKAGE_CATEGORY_MOUNT_POINT = 2, IDMEF_LINKAGE_CATEGORY_REPARSE_POINT = 3, IDMEF_LINKAGE_CATEGORY_SHORTCUT = 4, IDMEF_LINKAGE_CATEGORY_STREAM = 5, IDMEF_LINKAGE_CATEGORY_SYMBOLIC_LINK = 6 } idmef_linkage_category_t; idmef_linkage_category_to_numeric () idmef_linkage_category_to_numericidmef_linkage_category_t idmef_linkage_category_to_numeric (const char *name); name : pointer to an IDMEF string representation of a idmef_linkage_category_t value. Returns : the numeric equivalent of name, or -1 if name is not valid. idmef_linkage_category_to_string () idmef_linkage_category_to_stringconst char * idmef_linkage_category_to_string (idmef_linkage_category_t val); Return the IDMEF string equivalent of val provided idmef_linkage_category_t value. val : an enumeration value for idmef_linkage_category_t. Returns : a pointer to the string describing val, or NULL if val is invalid. idmef_linkage_new () idmef_linkage_newint idmef_linkage_new (idmef_linkage_t **ret); Create a new idmef_linkage_t object. ret : Pointer where to store the created idmef_linkage_t object. Returns : 0 on success, a negative value if an error occured. idmef_linkage_copy () idmef_linkage_copyint idmef_linkage_copy (const idmef_linkage_t *src, idmef_linkage_t *dst); Copy a new idmef_linkage_t object from src to dst. src : Source of the copy. dst : Where to copy the object. Returns : 0 on success, a negative value if an error occured. idmef_linkage_clone () idmef_linkage_cloneint idmef_linkage_clone (idmef_linkage_t *src, idmef_linkage_t **dst); Create a copy of src, and store it in dst. src : Object to be cloned. dst : Address where to store the pointer to the cloned object. Returns : 0 on success, a negative value if an error occured. idmef_linkage_ref () idmef_linkage_refidmef_linkage_t * idmef_linkage_ref (idmef_linkage_t *linkage); Increase linkage reference count, so that it can be referenced multiple time. linkage : pointer to a idmef_linkage_t object. Returns : a pointer to linkage. idmef_linkage_destroy () idmef_linkage_destroyvoid idmef_linkage_destroy (idmef_linkage_t *ptr); Destroy ptr and all of it's children. The objects are only destroyed if their reference count reach zero. ptr : pointer to a idmef_linkage_t object. idmef_linkage_get_category () idmef_linkage_get_categoryidmef_linkage_category_t idmef_linkage_get_category (idmef_linkage_t *ptr); Get category children of the idmef_linkage_t object. ptr : pointer to a idmef_linkage_t object. Returns : a pointer to a idmef_linkage_category_t object, or NULL if the children object is not set. idmef_linkage_set_category () idmef_linkage_set_categoryvoid idmef_linkage_set_category (idmef_linkage_t *ptr, idmef_linkage_category_t category); Set category object as a children of ptr. if ptr already contain an category object, then it is destroyed, and updated to point to the provided category object. ptr : pointer to a idmef_linkage_t object. category : pointer to a idmef_linkage_category_t object. idmef_linkage_new_category () idmef_linkage_new_categoryint idmef_linkage_new_category (idmef_linkage_t *ptr, idmef_linkage_category_t **ret); Create a new category object, children of idmef_linkage_t. If ptr already contain a idmef_linkage_category_t object, then it is destroyed. ptr : pointer to a idmef_linkage_t object. ret : pointer to an address where to store the created idmef_linkage_category_t object. Returns : 0 on success, or a negative value if an error occured. idmef_linkage_get_name () idmef_linkage_get_nameprelude_string_t * idmef_linkage_get_name (idmef_linkage_t *ptr); ptr : Returns : idmef_linkage_set_name () idmef_linkage_set_namevoid idmef_linkage_set_name (idmef_linkage_t *ptr, prelude_string_t *name); Set name object as a children of ptr. if ptr already contain an name object, then it is destroyed, and updated to point to the provided name object. ptr : pointer to a idmef_linkage_t object. name : pointer to a prelude_string_t object. idmef_linkage_new_name () idmef_linkage_new_nameint idmef_linkage_new_name (idmef_linkage_t *ptr, prelude_string_t **ret); Create a new name object, children of idmef_linkage_t. If ptr already contain a prelude_string_t object, then it is destroyed. ptr : pointer to a idmef_linkage_t object. ret : pointer to an address where to store the created prelude_string_t object. Returns : 0 on success, or a negative value if an error occured. idmef_linkage_get_path () idmef_linkage_get_pathprelude_string_t * idmef_linkage_get_path (idmef_linkage_t *ptr); ptr : Returns : idmef_linkage_set_path () idmef_linkage_set_pathvoid idmef_linkage_set_path (idmef_linkage_t *ptr, prelude_string_t *path); Set path object as a children of ptr. if ptr already contain an path object, then it is destroyed, and updated to point to the provided path object. ptr : pointer to a idmef_linkage_t object. path : pointer to a prelude_string_t object. idmef_linkage_new_path () idmef_linkage_new_pathint idmef_linkage_new_path (idmef_linkage_t *ptr, prelude_string_t **ret); Create a new path object, children of idmef_linkage_t. If ptr already contain a prelude_string_t object, then it is destroyed. ptr : pointer to a idmef_linkage_t object. ret : pointer to an address where to store the created prelude_string_t object. Returns : 0 on success, or a negative value if an error occured. idmef_linkage_get_file () idmef_linkage_get_fileidmef_file_t * idmef_linkage_get_file (idmef_linkage_t *ptr); ptr : Returns : idmef_linkage_set_file () idmef_linkage_set_filevoid idmef_linkage_set_file (idmef_linkage_t *ptr, idmef_file_t *file); Set file object as a children of ptr. if ptr already contain an file object, then it is destroyed, and updated to point to the provided file object. ptr : pointer to a idmef_linkage_t object. file : pointer to a idmef_file_t object. idmef_linkage_new_file () idmef_linkage_new_fileint idmef_linkage_new_file (idmef_linkage_t *ptr, idmef_file_t **ret); Create a new file object, children of idmef_linkage_t. If ptr already contain a idmef_file_t object, then it is destroyed. ptr : pointer to a idmef_linkage_t object. ret : pointer to an address where to store the created idmef_file_t object. Returns : 0 on success, or a negative value if an error occured. enum idmef_target_decoy_t idmef_target_decoy_ttypedef enum { IDMEF_TARGET_DECOY_ERROR = -1, IDMEF_TARGET_DECOY_UNKNOWN = 0, IDMEF_TARGET_DECOY_YES = 1, IDMEF_TARGET_DECOY_NO = 2 } idmef_target_decoy_t; idmef_target_decoy_to_numeric () idmef_target_decoy_to_numericidmef_target_decoy_t idmef_target_decoy_to_numeric (const char *name); name : pointer to an IDMEF string representation of a idmef_target_decoy_t value. Returns : the numeric equivalent of name, or -1 if name is not valid. idmef_target_decoy_to_string () idmef_target_decoy_to_stringconst char * idmef_target_decoy_to_string (idmef_target_decoy_t val); Return the IDMEF string equivalent of val provided idmef_target_decoy_t value. val : an enumeration value for idmef_target_decoy_t. Returns : a pointer to the string describing val, or NULL if val is invalid. idmef_target_t idmef_target_ttypedef struct idmef_target idmef_target_t; idmef_target_new () idmef_target_newint idmef_target_new (idmef_target_t **ret); Create a new idmef_target_t object. ret : Pointer where to store the created idmef_target_t object. Returns : 0 on success, a negative value if an error occured. idmef_target_copy () idmef_target_copyint idmef_target_copy (const idmef_target_t *src, idmef_target_t *dst); Copy a new idmef_target_t object from src to dst. src : Source of the copy. dst : Where to copy the object. Returns : 0 on success, a negative value if an error occured. idmef_target_clone () idmef_target_cloneint idmef_target_clone (idmef_target_t *src, idmef_target_t **dst); Create a copy of src, and store it in dst. src : Object to be cloned. dst : Address where to store the pointer to the cloned object. Returns : 0 on success, a negative value if an error occured. idmef_target_ref () idmef_target_refidmef_target_t * idmef_target_ref (idmef_target_t *target); Increase target reference count, so that it can be referenced multiple time. target : pointer to a idmef_target_t object. Returns : a pointer to target. idmef_target_destroy () idmef_target_destroyvoid idmef_target_destroy (idmef_target_t *ptr); Destroy ptr and all of it's children. The objects are only destroyed if their reference count reach zero. ptr : pointer to a idmef_target_t object. idmef_target_get_ident () idmef_target_get_identprelude_string_t * idmef_target_get_ident (idmef_target_t *ptr); ptr : Returns : idmef_target_set_ident () idmef_target_set_identvoid idmef_target_set_ident (idmef_target_t *ptr, prelude_string_t *ident); Set ident object as a children of ptr. if ptr already contain an ident object, then it is destroyed, and updated to point to the provided ident object. ptr : pointer to a idmef_target_t object. ident : pointer to a prelude_string_t object. idmef_target_new_ident () idmef_target_new_identint idmef_target_new_ident (idmef_target_t *ptr, prelude_string_t **ret); Create a new ident object, children of idmef_target_t. If ptr already contain a prelude_string_t object, then it is destroyed. ptr : pointer to a idmef_target_t object. ret : pointer to an address where to store the created prelude_string_t object. Returns : 0 on success, or a negative value if an error occured. idmef_target_get_decoy () idmef_target_get_decoyidmef_target_decoy_t idmef_target_get_decoy (idmef_target_t *ptr); Get decoy children of the idmef_target_t object. ptr : pointer to a idmef_target_t object. Returns : a pointer to a idmef_target_decoy_t object, or NULL if the children object is not set. idmef_target_set_decoy () idmef_target_set_decoyvoid idmef_target_set_decoy (idmef_target_t *ptr, idmef_target_decoy_t decoy); Set decoy object as a children of ptr. if ptr already contain an decoy object, then it is destroyed, and updated to point to the provided decoy object. ptr : pointer to a idmef_target_t object. decoy : pointer to a idmef_target_decoy_t object. idmef_target_new_decoy () idmef_target_new_decoyint idmef_target_new_decoy (idmef_target_t *ptr, idmef_target_decoy_t **ret); Create a new decoy object, children of idmef_target_t. If ptr already contain a idmef_target_decoy_t object, then it is destroyed. ptr : pointer to a idmef_target_t object. ret : pointer to an address where to store the created idmef_target_decoy_t object. Returns : 0 on success, or a negative value if an error occured. idmef_target_get_interface () idmef_target_get_interfaceprelude_string_t * idmef_target_get_interface (idmef_target_t *ptr); ptr : Returns : idmef_target_set_interface () idmef_target_set_interfacevoid idmef_target_set_interface (idmef_target_t *ptr, prelude_string_t *interface); Set interface object as a children of ptr. if ptr already contain an interface object, then it is destroyed, and updated to point to the provided interface object. ptr : pointer to a idmef_target_t object. interface : pointer to a prelude_string_t object. idmef_target_new_interface () idmef_target_new_interfaceint idmef_target_new_interface (idmef_target_t *ptr, prelude_string_t **ret); Create a new interface object, children of idmef_target_t. If ptr already contain a prelude_string_t object, then it is destroyed. ptr : pointer to a idmef_target_t object. ret : pointer to an address where to store the created prelude_string_t object. Returns : 0 on success, or a negative value if an error occured. idmef_target_get_node () idmef_target_get_nodeidmef_node_t * idmef_target_get_node (idmef_target_t *ptr); ptr : Returns : idmef_target_set_node () idmef_target_set_nodevoid idmef_target_set_node (idmef_target_t *ptr, idmef_node_t *node); Set node object as a children of ptr. if ptr already contain an node object, then it is destroyed, and updated to point to the provided node object. ptr : pointer to a idmef_target_t object. node : pointer to a idmef_node_t object. idmef_target_new_node () idmef_target_new_nodeint idmef_target_new_node (idmef_target_t *ptr, idmef_node_t **ret); Create a new node object, children of idmef_target_t. If ptr already contain a idmef_node_t object, then it is destroyed. ptr : pointer to a idmef_target_t object. ret : pointer to an address where to store the created idmef_node_t object. Returns : 0 on success, or a negative value if an error occured. idmef_target_get_user () idmef_target_get_useridmef_user_t * idmef_target_get_user (idmef_target_t *ptr); ptr : Returns : idmef_target_set_user () idmef_target_set_uservoid idmef_target_set_user (idmef_target_t *ptr, idmef_user_t *user); Set user object as a children of ptr. if ptr already contain an user object, then it is destroyed, and updated to point to the provided user object. ptr : pointer to a idmef_target_t object. user : pointer to a idmef_user_t object. idmef_target_new_user () idmef_target_new_userint idmef_target_new_user (idmef_target_t *ptr, idmef_user_t **ret); Create a new user object, children of idmef_target_t. If ptr already contain a idmef_user_t object, then it is destroyed. ptr : pointer to a idmef_target_t object. ret : pointer to an address where to store the created idmef_user_t object. Returns : 0 on success, or a negative value if an error occured. idmef_target_get_process () idmef_target_get_processidmef_process_t * idmef_target_get_process (idmef_target_t *ptr); ptr : Returns : idmef_target_set_process () idmef_target_set_processvoid idmef_target_set_process (idmef_target_t *ptr, idmef_process_t *process); Set process object as a children of ptr. if ptr already contain an process object, then it is destroyed, and updated to point to the provided process object. ptr : pointer to a idmef_target_t object. process : pointer to a idmef_process_t object. idmef_target_new_process () idmef_target_new_processint idmef_target_new_process (idmef_target_t *ptr, idmef_process_t **ret); Create a new process object, children of idmef_target_t. If ptr already contain a idmef_process_t object, then it is destroyed. ptr : pointer to a idmef_target_t object. ret : pointer to an address where to store the created idmef_process_t object. Returns : 0 on success, or a negative value if an error occured. idmef_target_get_service () idmef_target_get_serviceidmef_service_t * idmef_target_get_service (idmef_target_t *ptr); ptr : Returns : idmef_target_set_service () idmef_target_set_servicevoid idmef_target_set_service (idmef_target_t *ptr, idmef_service_t *service); Set service object as a children of ptr. if ptr already contain an service object, then it is destroyed, and updated to point to the provided service object. ptr : pointer to a idmef_target_t object. service : pointer to a idmef_service_t object. idmef_target_new_service () idmef_target_new_serviceint idmef_target_new_service (idmef_target_t *ptr, idmef_service_t **ret); Create a new service object, children of idmef_target_t. If ptr already contain a idmef_service_t object, then it is destroyed. ptr : pointer to a idmef_target_t object. ret : pointer to an address where to store the created idmef_service_t object. Returns : 0 on success, or a negative value if an error occured. idmef_target_get_next_file () idmef_target_get_next_fileidmef_file_t * idmef_target_get_next_file (idmef_target_t *target, idmef_file_t *file_cur); Get the next idmef_file_t object listed in ptr. When iterating over the idmef_file_t object listed in ptr, object should be set to the latest returned idmef_file_t object. target : pointer to a idmef_target_t object. file_cur : pointer to a idmef_file_t object. Returns : the next idmef_file_t in the list. idmef_target_set_file () idmef_target_set_filevoid idmef_target_set_file (idmef_target_t *ptr, idmef_file_t *object, int pos); Add object to position pos of ptr list of idmef_file_t object. If pos is IDMEF_LIST_APPEND, object will be inserted at the tail of the list. If pos is IDMEF_LIST_PREPEND, object will be inserted at the head of the list. ptr : pointer to a idmef_target_t object. object : pointer to a idmef_file_t object. pos : Position in the list. idmef_target_new_file () idmef_target_new_fileint idmef_target_new_file (idmef_target_t *ptr, idmef_file_t **ret, int pos); Create a new idmef_file_t children of ptr, and add it to position pos of ptr list of idmef_file_t object. The created idmef_file_t object is stored in ret. If pos is IDMEF_LIST_APPEND, object will be inserted at the tail of the list. If pos is IDMEF_LIST_PREPEND, object will be inserted at the head of the list. ptr : pointer to a idmef_target_t object. ret : pointer to an address where to store the created idmef_file_t object. pos : position in the list. Returns : 0 on success, or a negative value if an error occured. idmef_analyzer_t idmef_analyzer_ttypedef struct idmef_analyzer idmef_analyzer_t; idmef_analyzer_new () idmef_analyzer_newint idmef_analyzer_new (idmef_analyzer_t **ret); Create a new idmef_analyzer_t object. ret : Pointer where to store the created idmef_analyzer_t object. Returns : 0 on success, a negative value if an error occured. idmef_analyzer_copy () idmef_analyzer_copyint idmef_analyzer_copy (const idmef_analyzer_t *src, idmef_analyzer_t *dst); Copy a new idmef_analyzer_t object from src to dst. src : Source of the copy. dst : Where to copy the object. Returns : 0 on success, a negative value if an error occured. idmef_analyzer_clone () idmef_analyzer_cloneint idmef_analyzer_clone (idmef_analyzer_t *src, idmef_analyzer_t **dst); Create a copy of src, and store it in dst. src : Object to be cloned. dst : Address where to store the pointer to the cloned object. Returns : 0 on success, a negative value if an error occured. idmef_analyzer_ref () idmef_analyzer_refidmef_analyzer_t * idmef_analyzer_ref (idmef_analyzer_t *analyzer); Increase analyzer reference count, so that it can be referenced multiple time. analyzer : pointer to a idmef_analyzer_t object. Returns : a pointer to analyzer. idmef_analyzer_destroy () idmef_analyzer_destroyvoid idmef_analyzer_destroy (idmef_analyzer_t *ptr); Destroy ptr and all of it's children. The objects are only destroyed if their reference count reach zero. ptr : pointer to a idmef_analyzer_t object. idmef_analyzer_get_analyzerid () idmef_analyzer_get_analyzeridprelude_string_t * idmef_analyzer_get_analyzerid (idmef_analyzer_t *ptr); ptr : Returns : idmef_analyzer_set_analyzerid () idmef_analyzer_set_analyzeridvoid idmef_analyzer_set_analyzerid (idmef_analyzer_t *ptr, prelude_string_t *analyzerid); Set analyzerid object as a children of ptr. if ptr already contain an analyzerid object, then it is destroyed, and updated to point to the provided analyzerid object. ptr : pointer to a idmef_analyzer_t object. analyzerid : pointer to a prelude_string_t object. idmef_analyzer_new_analyzerid () idmef_analyzer_new_analyzeridint idmef_analyzer_new_analyzerid (idmef_analyzer_t *ptr, prelude_string_t **ret); Create a new analyzerid object, children of idmef_analyzer_t. If ptr already contain a prelude_string_t object, then it is destroyed. ptr : pointer to a idmef_analyzer_t object. ret : pointer to an address where to store the created prelude_string_t object. Returns : 0 on success, or a negative value if an error occured. idmef_analyzer_get_name () idmef_analyzer_get_nameprelude_string_t * idmef_analyzer_get_name (idmef_analyzer_t *ptr); ptr : Returns : idmef_analyzer_set_name () idmef_analyzer_set_namevoid idmef_analyzer_set_name (idmef_analyzer_t *ptr, prelude_string_t *name); Set name object as a children of ptr. if ptr already contain an name object, then it is destroyed, and updated to point to the provided name object. ptr : pointer to a idmef_analyzer_t object. name : pointer to a prelude_string_t object. idmef_analyzer_new_name () idmef_analyzer_new_nameint idmef_analyzer_new_name (idmef_analyzer_t *ptr, prelude_string_t **ret); Create a new name object, children of idmef_analyzer_t. If ptr already contain a prelude_string_t object, then it is destroyed. ptr : pointer to a idmef_analyzer_t object. ret : pointer to an address where to store the created prelude_string_t object. Returns : 0 on success, or a negative value if an error occured. idmef_analyzer_get_manufacturer () idmef_analyzer_get_manufacturerprelude_string_t * idmef_analyzer_get_manufacturer (idmef_analyzer_t *ptr); ptr : Returns : idmef_analyzer_set_manufacturer () idmef_analyzer_set_manufacturervoid idmef_analyzer_set_manufacturer (idmef_analyzer_t *ptr, prelude_string_t *manufacturer); Set manufacturer object as a children of ptr. if ptr already contain an manufacturer object, then it is destroyed, and updated to point to the provided manufacturer object. ptr : pointer to a idmef_analyzer_t object. manufacturer : pointer to a prelude_string_t object. idmef_analyzer_new_manufacturer () idmef_analyzer_new_manufacturerint idmef_analyzer_new_manufacturer (idmef_analyzer_t *ptr, prelude_string_t **ret); Create a new manufacturer object, children of idmef_analyzer_t. If ptr already contain a prelude_string_t object, then it is destroyed. ptr : pointer to a idmef_analyzer_t object. ret : pointer to an address where to store the created prelude_string_t object. Returns : 0 on success, or a negative value if an error occured. idmef_analyzer_get_model () idmef_analyzer_get_modelprelude_string_t * idmef_analyzer_get_model (idmef_analyzer_t *ptr); ptr : Returns : idmef_analyzer_set_model () idmef_analyzer_set_modelvoid idmef_analyzer_set_model (idmef_analyzer_t *ptr, prelude_string_t *model); Set model object as a children of ptr. if ptr already contain an model object, then it is destroyed, and updated to point to the provided model object. ptr : pointer to a idmef_analyzer_t object. model : pointer to a prelude_string_t object. idmef_analyzer_new_model () idmef_analyzer_new_modelint idmef_analyzer_new_model (idmef_analyzer_t *ptr, prelude_string_t **ret); Create a new model object, children of idmef_analyzer_t. If ptr already contain a prelude_string_t object, then it is destroyed. ptr : pointer to a idmef_analyzer_t object. ret : pointer to an address where to store the created prelude_string_t object. Returns : 0 on success, or a negative value if an error occured. idmef_analyzer_get_version () idmef_analyzer_get_versionprelude_string_t * idmef_analyzer_get_version (idmef_analyzer_t *ptr); ptr : Returns : idmef_analyzer_set_version () idmef_analyzer_set_versionvoid idmef_analyzer_set_version (idmef_analyzer_t *ptr, prelude_string_t *version); Set version object as a children of ptr. if ptr already contain an version object, then it is destroyed, and updated to point to the provided version object. ptr : pointer to a idmef_analyzer_t object. version : pointer to a prelude_string_t object. idmef_analyzer_new_version () idmef_analyzer_new_versionint idmef_analyzer_new_version (idmef_analyzer_t *ptr, prelude_string_t **ret); Create a new version object, children of idmef_analyzer_t. If ptr already contain a prelude_string_t object, then it is destroyed. ptr : pointer to a idmef_analyzer_t object. ret : pointer to an address where to store the created prelude_string_t object. Returns : 0 on success, or a negative value if an error occured. idmef_analyzer_get_class () idmef_analyzer_get_classprelude_string_t * idmef_analyzer_get_class (idmef_analyzer_t *ptr); ptr : Returns : idmef_analyzer_set_class () idmef_analyzer_set_classvoid idmef_analyzer_set_class (idmef_analyzer_t *ptr, prelude_string_t *class_str); Set class_str object as a children of ptr. if ptr already contain an class_str object, then it is destroyed, and updated to point to the provided class_str object. ptr : pointer to a idmef_analyzer_t object. class_str : pointer to a prelude_string_t object. idmef_analyzer_new_class () idmef_analyzer_new_classint idmef_analyzer_new_class (idmef_analyzer_t *ptr, prelude_string_t **ret); Create a new class object, children of idmef_analyzer_t. If ptr already contain a prelude_string_t object, then it is destroyed. ptr : pointer to a idmef_analyzer_t object. ret : pointer to an address where to store the created prelude_string_t object. Returns : 0 on success, or a negative value if an error occured. idmef_analyzer_get_ostype () idmef_analyzer_get_ostypeprelude_string_t * idmef_analyzer_get_ostype (idmef_analyzer_t *ptr); ptr : Returns : idmef_analyzer_set_ostype () idmef_analyzer_set_ostypevoid idmef_analyzer_set_ostype (idmef_analyzer_t *ptr, prelude_string_t *ostype); Set ostype object as a children of ptr. if ptr already contain an ostype object, then it is destroyed, and updated to point to the provided ostype object. ptr : pointer to a idmef_analyzer_t object. ostype : pointer to a prelude_string_t object. idmef_analyzer_new_ostype () idmef_analyzer_new_ostypeint idmef_analyzer_new_ostype (idmef_analyzer_t *ptr, prelude_string_t **ret); Create a new ostype object, children of idmef_analyzer_t. If ptr already contain a prelude_string_t object, then it is destroyed. ptr : pointer to a idmef_analyzer_t object. ret : pointer to an address where to store the created prelude_string_t object. Returns : 0 on success, or a negative value if an error occured. idmef_analyzer_get_osversion () idmef_analyzer_get_osversionprelude_string_t * idmef_analyzer_get_osversion (idmef_analyzer_t *ptr); ptr : Returns : idmef_analyzer_set_osversion () idmef_analyzer_set_osversionvoid idmef_analyzer_set_osversion (idmef_analyzer_t *ptr, prelude_string_t *osversion); Set osversion object as a children of ptr. if ptr already contain an osversion object, then it is destroyed, and updated to point to the provided osversion object. ptr : pointer to a idmef_analyzer_t object. osversion : pointer to a prelude_string_t object. idmef_analyzer_new_osversion () idmef_analyzer_new_osversionint idmef_analyzer_new_osversion (idmef_analyzer_t *ptr, prelude_string_t **ret); Create a new osversion object, children of idmef_analyzer_t. If ptr already contain a prelude_string_t object, then it is destroyed. ptr : pointer to a idmef_analyzer_t object. ret : pointer to an address where to store the created prelude_string_t object. Returns : 0 on success, or a negative value if an error occured. idmef_analyzer_get_node () idmef_analyzer_get_nodeidmef_node_t * idmef_analyzer_get_node (idmef_analyzer_t *ptr); ptr : Returns : idmef_analyzer_set_node () idmef_analyzer_set_nodevoid idmef_analyzer_set_node (idmef_analyzer_t *ptr, idmef_node_t *node); Set node object as a children of ptr. if ptr already contain an node object, then it is destroyed, and updated to point to the provided node object. ptr : pointer to a idmef_analyzer_t object. node : pointer to a idmef_node_t object. idmef_analyzer_new_node () idmef_analyzer_new_nodeint idmef_analyzer_new_node (idmef_analyzer_t *ptr, idmef_node_t **ret); Create a new node object, children of idmef_analyzer_t. If ptr already contain a idmef_node_t object, then it is destroyed. ptr : pointer to a idmef_analyzer_t object. ret : pointer to an address where to store the created idmef_node_t object. Returns : 0 on success, or a negative value if an error occured. idmef_analyzer_get_process () idmef_analyzer_get_processidmef_process_t * idmef_analyzer_get_process (idmef_analyzer_t *ptr); ptr : Returns : idmef_analyzer_set_process () idmef_analyzer_set_processvoid idmef_analyzer_set_process (idmef_analyzer_t *ptr, idmef_process_t *process); Set process object as a children of ptr. if ptr already contain an process object, then it is destroyed, and updated to point to the provided process object. ptr : pointer to a idmef_analyzer_t object. process : pointer to a idmef_process_t object. idmef_analyzer_new_process () idmef_analyzer_new_processint idmef_analyzer_new_process (idmef_analyzer_t *ptr, idmef_process_t **ret); Create a new process object, children of idmef_analyzer_t. If ptr already contain a idmef_process_t object, then it is destroyed. ptr : pointer to a idmef_analyzer_t object. ret : pointer to an address where to store the created idmef_process_t object. Returns : 0 on success, or a negative value if an error occured. idmef_alertident_t idmef_alertident_ttypedef struct idmef_alertident idmef_alertident_t; idmef_alertident_new () idmef_alertident_newint idmef_alertident_new (idmef_alertident_t **ret); Create a new idmef_alertident_t object. ret : Pointer where to store the created idmef_alertident_t object. Returns : 0 on success, a negative value if an error occured. idmef_alertident_copy () idmef_alertident_copyint idmef_alertident_copy (const idmef_alertident_t *src, idmef_alertident_t *dst); Copy a new idmef_alertident_t object from src to dst. src : Source of the copy. dst : Where to copy the object. Returns : 0 on success, a negative value if an error occured. idmef_alertident_clone () idmef_alertident_cloneint idmef_alertident_clone (idmef_alertident_t *src, idmef_alertident_t **dst); Create a copy of src, and store it in dst. src : Object to be cloned. dst : Address where to store the pointer to the cloned object. Returns : 0 on success, a negative value if an error occured. idmef_alertident_ref () idmef_alertident_refidmef_alertident_t * idmef_alertident_ref (idmef_alertident_t *alertident); Increase alertident reference count, so that it can be referenced multiple time. alertident : pointer to a idmef_alertident_t object. Returns : a pointer to alertident. idmef_alertident_destroy () idmef_alertident_destroyvoid idmef_alertident_destroy (idmef_alertident_t *ptr); Destroy ptr and all of it's children. The objects are only destroyed if their reference count reach zero. ptr : pointer to a idmef_alertident_t object. idmef_alertident_get_alertident () idmef_alertident_get_alertidentprelude_string_t * idmef_alertident_get_alertident (idmef_alertident_t *ptr); ptr : Returns : idmef_alertident_set_alertident () idmef_alertident_set_alertidentvoid idmef_alertident_set_alertident (idmef_alertident_t *ptr, prelude_string_t *alertident); Set alertident object as a children of ptr. if ptr already contain an alertident object, then it is destroyed, and updated to point to the provided alertident object. ptr : pointer to a idmef_alertident_t object. alertident : pointer to a prelude_string_t object. idmef_alertident_new_alertident () idmef_alertident_new_alertidentint idmef_alertident_new_alertident (idmef_alertident_t *ptr, prelude_string_t **ret); Create a new alertident object, children of idmef_alertident_t. If ptr already contain a prelude_string_t object, then it is destroyed. ptr : pointer to a idmef_alertident_t object. ret : pointer to an address where to store the created prelude_string_t object. Returns : 0 on success, or a negative value if an error occured. idmef_alertident_get_analyzerid () idmef_alertident_get_analyzeridprelude_string_t * idmef_alertident_get_analyzerid (idmef_alertident_t *ptr); ptr : Returns : idmef_alertident_set_analyzerid () idmef_alertident_set_analyzeridvoid idmef_alertident_set_analyzerid (idmef_alertident_t *ptr, prelude_string_t *analyzerid); Set analyzerid object as a children of ptr. if ptr already contain an analyzerid object, then it is destroyed, and updated to point to the provided analyzerid object. ptr : pointer to a idmef_alertident_t object. analyzerid : pointer to a prelude_string_t object. idmef_alertident_new_analyzerid () idmef_alertident_new_analyzeridint idmef_alertident_new_analyzerid (idmef_alertident_t *ptr, prelude_string_t **ret); Create a new analyzerid object, children of idmef_alertident_t. If ptr already contain a prelude_string_t object, then it is destroyed. ptr : pointer to a idmef_alertident_t object. ret : pointer to an address where to store the created prelude_string_t object. Returns : 0 on success, or a negative value if an error occured. enum idmef_impact_severity_t idmef_impact_severity_ttypedef enum { IDMEF_IMPACT_SEVERITY_ERROR = -1, IDMEF_IMPACT_SEVERITY_INFO = 1, IDMEF_IMPACT_SEVERITY_LOW = 2, IDMEF_IMPACT_SEVERITY_MEDIUM = 3, IDMEF_IMPACT_SEVERITY_HIGH = 4 } idmef_impact_severity_t; idmef_impact_severity_to_numeric () idmef_impact_severity_to_numericidmef_impact_severity_t idmef_impact_severity_to_numeric (const char *name); name : pointer to an IDMEF string representation of a idmef_impact_severity_t value. Returns : the numeric equivalent of name, or -1 if name is not valid. idmef_impact_severity_to_string () idmef_impact_severity_to_stringconst char * idmef_impact_severity_to_string (idmef_impact_severity_t val); Return the IDMEF string equivalent of val provided idmef_impact_severity_t value. val : an enumeration value for idmef_impact_severity_t. Returns : a pointer to the string describing val, or NULL if val is invalid. enum idmef_impact_completion_t idmef_impact_completion_ttypedef enum { IDMEF_IMPACT_COMPLETION_ERROR = -1, IDMEF_IMPACT_COMPLETION_FAILED = 1, IDMEF_IMPACT_COMPLETION_SUCCEEDED = 2 } idmef_impact_completion_t; idmef_impact_completion_to_numeric () idmef_impact_completion_to_numericidmef_impact_completion_t idmef_impact_completion_to_numeric (const char *name); name : pointer to an IDMEF string representation of a idmef_impact_completion_t value. Returns : the numeric equivalent of name, or -1 if name is not valid. idmef_impact_completion_to_string () idmef_impact_completion_to_stringconst char * idmef_impact_completion_to_string (idmef_impact_completion_t val); Return the IDMEF string equivalent of val provided idmef_impact_completion_t value. val : an enumeration value for idmef_impact_completion_t. Returns : a pointer to the string describing val, or NULL if val is invalid. enum idmef_impact_type_t idmef_impact_type_ttypedef enum { IDMEF_IMPACT_TYPE_ERROR = -1, IDMEF_IMPACT_TYPE_OTHER = 0, IDMEF_IMPACT_TYPE_ADMIN = 1, IDMEF_IMPACT_TYPE_DOS = 2, IDMEF_IMPACT_TYPE_FILE = 3, IDMEF_IMPACT_TYPE_RECON = 4, IDMEF_IMPACT_TYPE_USER = 5 } idmef_impact_type_t; idmef_impact_type_to_numeric () idmef_impact_type_to_numericidmef_impact_type_t idmef_impact_type_to_numeric (const char *name); name : pointer to an IDMEF string representation of a idmef_impact_type_t value. Returns : the numeric equivalent of name, or -1 if name is not valid. idmef_impact_type_to_string () idmef_impact_type_to_stringconst char * idmef_impact_type_to_string (idmef_impact_type_t val); Return the IDMEF string equivalent of val provided idmef_impact_type_t value. val : an enumeration value for idmef_impact_type_t. Returns : a pointer to the string describing val, or NULL if val is invalid. idmef_impact_t idmef_impact_ttypedef struct idmef_impact idmef_impact_t; idmef_impact_new () idmef_impact_newint idmef_impact_new (idmef_impact_t **ret); Create a new idmef_impact_t object. ret : Pointer where to store the created idmef_impact_t object. Returns : 0 on success, a negative value if an error occured. idmef_impact_copy () idmef_impact_copyint idmef_impact_copy (const idmef_impact_t *src, idmef_impact_t *dst); Copy a new idmef_impact_t object from src to dst. src : Source of the copy. dst : Where to copy the object. Returns : 0 on success, a negative value if an error occured. idmef_impact_clone () idmef_impact_cloneint idmef_impact_clone (idmef_impact_t *src, idmef_impact_t **dst); Create a copy of src, and store it in dst. src : Object to be cloned. dst : Address where to store the pointer to the cloned object. Returns : 0 on success, a negative value if an error occured. idmef_impact_ref () idmef_impact_refidmef_impact_t * idmef_impact_ref (idmef_impact_t *impact); Increase impact reference count, so that it can be referenced multiple time. impact : pointer to a idmef_impact_t object. Returns : a pointer to impact. idmef_impact_destroy () idmef_impact_destroyvoid idmef_impact_destroy (idmef_impact_t *ptr); Destroy ptr and all of it's children. The objects are only destroyed if their reference count reach zero. ptr : pointer to a idmef_impact_t object. idmef_impact_unset_severity () idmef_impact_unset_severityvoid idmef_impact_unset_severity (idmef_impact_t *ptr); ptr : idmef_impact_get_severity () idmef_impact_get_severityidmef_impact_severity_t * idmef_impact_get_severity (idmef_impact_t *ptr); ptr : Returns : idmef_impact_set_severity () idmef_impact_set_severityvoid idmef_impact_set_severity (idmef_impact_t *ptr, idmef_impact_severity_t severity); Set severity object as a children of ptr. if ptr already contain an severity object, then it is destroyed, and updated to point to the provided severity object. ptr : pointer to a idmef_impact_t object. severity : pointer to a idmef_impact_severity_t object. idmef_impact_new_severity () idmef_impact_new_severityint idmef_impact_new_severity (idmef_impact_t *ptr, idmef_impact_severity_t **ret); Create a new severity object, children of idmef_impact_t. If ptr already contain a idmef_impact_severity_t object, then it is destroyed. ptr : pointer to a idmef_impact_t object. ret : pointer to an address where to store the created idmef_impact_severity_t object. Returns : 0 on success, or a negative value if an error occured. idmef_impact_unset_completion () idmef_impact_unset_completionvoid idmef_impact_unset_completion (idmef_impact_t *ptr); ptr : idmef_impact_get_completion () idmef_impact_get_completionidmef_impact_completion_t * idmef_impact_get_completion (idmef_impact_t *ptr); ptr : Returns : idmef_impact_set_completion () idmef_impact_set_completionvoid idmef_impact_set_completion (idmef_impact_t *ptr, idmef_impact_completion_t completion); Set completion object as a children of ptr. if ptr already contain an completion object, then it is destroyed, and updated to point to the provided completion object. ptr : pointer to a idmef_impact_t object. completion : pointer to a idmef_impact_completion_t object. idmef_impact_new_completion () idmef_impact_new_completionint idmef_impact_new_completion (idmef_impact_t *ptr, idmef_impact_completion_t **ret); Create a new completion object, children of idmef_impact_t. If ptr already contain a idmef_impact_completion_t object, then it is destroyed. ptr : pointer to a idmef_impact_t object. ret : pointer to an address where to store the created idmef_impact_completion_t object. Returns : 0 on success, or a negative value if an error occured. idmef_impact_get_type () idmef_impact_get_typeidmef_impact_type_t idmef_impact_get_type (idmef_impact_t *ptr); Get type children of the idmef_impact_t object. ptr : pointer to a idmef_impact_t object. Returns : a pointer to a idmef_impact_type_t object, or NULL if the children object is not set. idmef_impact_set_type () idmef_impact_set_typevoid idmef_impact_set_type (idmef_impact_t *ptr, idmef_impact_type_t type); Set type object as a children of ptr. if ptr already contain an type object, then it is destroyed, and updated to point to the provided type object. ptr : pointer to a idmef_impact_t object. type : pointer to a idmef_impact_type_t object. idmef_impact_new_type () idmef_impact_new_typeint idmef_impact_new_type (idmef_impact_t *ptr, idmef_impact_type_t **ret); Create a new type object, children of idmef_impact_t. If ptr already contain a idmef_impact_type_t object, then it is destroyed. ptr : pointer to a idmef_impact_t object. ret : pointer to an address where to store the created idmef_impact_type_t object. Returns : 0 on success, or a negative value if an error occured. idmef_impact_get_description () idmef_impact_get_descriptionprelude_string_t * idmef_impact_get_description (idmef_impact_t *ptr); ptr : Returns : idmef_impact_set_description () idmef_impact_set_descriptionvoid idmef_impact_set_description (idmef_impact_t *ptr, prelude_string_t *description); Set description object as a children of ptr. if ptr already contain an description object, then it is destroyed, and updated to point to the provided description object. ptr : pointer to a idmef_impact_t object. description : pointer to a prelude_string_t object. idmef_impact_new_description () idmef_impact_new_descriptionint idmef_impact_new_description (idmef_impact_t *ptr, prelude_string_t **ret); Create a new description object, children of idmef_impact_t. If ptr already contain a prelude_string_t object, then it is destroyed. ptr : pointer to a idmef_impact_t object. ret : pointer to an address where to store the created prelude_string_t object. Returns : 0 on success, or a negative value if an error occured. enum idmef_action_category_t idmef_action_category_ttypedef enum { IDMEF_ACTION_CATEGORY_ERROR = -1, IDMEF_ACTION_CATEGORY_OTHER = 0, IDMEF_ACTION_CATEGORY_BLOCK_INSTALLED = 1, IDMEF_ACTION_CATEGORY_NOTIFICATION_SENT = 2, IDMEF_ACTION_CATEGORY_TAKEN_OFFLINE = 3 } idmef_action_category_t; idmef_action_category_to_numeric () idmef_action_category_to_numericidmef_action_category_t idmef_action_category_to_numeric (const char *name); name : pointer to an IDMEF string representation of a idmef_action_category_t value. Returns : the numeric equivalent of name, or -1 if name is not valid. idmef_action_category_to_string () idmef_action_category_to_stringconst char * idmef_action_category_to_string (idmef_action_category_t val); Return the IDMEF string equivalent of val provided idmef_action_category_t value. val : an enumeration value for idmef_action_category_t. Returns : a pointer to the string describing val, or NULL if val is invalid. idmef_action_t idmef_action_ttypedef struct idmef_action idmef_action_t; idmef_action_new () idmef_action_newint idmef_action_new (idmef_action_t **ret); Create a new idmef_action_t object. ret : Pointer where to store the created idmef_action_t object. Returns : 0 on success, a negative value if an error occured. idmef_action_copy () idmef_action_copyint idmef_action_copy (const idmef_action_t *src, idmef_action_t *dst); Copy a new idmef_action_t object from src to dst. src : Source of the copy. dst : Where to copy the object. Returns : 0 on success, a negative value if an error occured. idmef_action_clone () idmef_action_cloneint idmef_action_clone (idmef_action_t *src, idmef_action_t **dst); Create a copy of src, and store it in dst. src : Object to be cloned. dst : Address where to store the pointer to the cloned object. Returns : 0 on success, a negative value if an error occured. idmef_action_ref () idmef_action_refidmef_action_t * idmef_action_ref (idmef_action_t *action); Increase action reference count, so that it can be referenced multiple time. action : pointer to a idmef_action_t object. Returns : a pointer to action. idmef_action_destroy () idmef_action_destroyvoid idmef_action_destroy (idmef_action_t *ptr); Destroy ptr and all of it's children. The objects are only destroyed if their reference count reach zero. ptr : pointer to a idmef_action_t object. idmef_action_get_category () idmef_action_get_categoryidmef_action_category_t idmef_action_get_category (idmef_action_t *ptr); Get category children of the idmef_action_t object. ptr : pointer to a idmef_action_t object. Returns : a pointer to a idmef_action_category_t object, or NULL if the children object is not set. idmef_action_set_category () idmef_action_set_categoryvoid idmef_action_set_category (idmef_action_t *ptr, idmef_action_category_t category); Set category object as a children of ptr. if ptr already contain an category object, then it is destroyed, and updated to point to the provided category object. ptr : pointer to a idmef_action_t object. category : pointer to a idmef_action_category_t object. idmef_action_new_category () idmef_action_new_categoryint idmef_action_new_category (idmef_action_t *ptr, idmef_action_category_t **ret); Create a new category object, children of idmef_action_t. If ptr already contain a idmef_action_category_t object, then it is destroyed. ptr : pointer to a idmef_action_t object. ret : pointer to an address where to store the created idmef_action_category_t object. Returns : 0 on success, or a negative value if an error occured. idmef_action_get_description () idmef_action_get_descriptionprelude_string_t * idmef_action_get_description (idmef_action_t *ptr); ptr : Returns : idmef_action_set_description () idmef_action_set_descriptionvoid idmef_action_set_description (idmef_action_t *ptr, prelude_string_t *description); Set description object as a children of ptr. if ptr already contain an description object, then it is destroyed, and updated to point to the provided description object. ptr : pointer to a idmef_action_t object. description : pointer to a prelude_string_t object. idmef_action_new_description () idmef_action_new_descriptionint idmef_action_new_description (idmef_action_t *ptr, prelude_string_t **ret); Create a new description object, children of idmef_action_t. If ptr already contain a prelude_string_t object, then it is destroyed. ptr : pointer to a idmef_action_t object. ret : pointer to an address where to store the created prelude_string_t object. Returns : 0 on success, or a negative value if an error occured. enum idmef_confidence_rating_t idmef_confidence_rating_ttypedef enum { IDMEF_CONFIDENCE_RATING_ERROR = -1, IDMEF_CONFIDENCE_RATING_NUMERIC = 0, IDMEF_CONFIDENCE_RATING_LOW = 1, IDMEF_CONFIDENCE_RATING_MEDIUM = 2, IDMEF_CONFIDENCE_RATING_HIGH = 3 } idmef_confidence_rating_t; idmef_confidence_rating_to_numeric () idmef_confidence_rating_to_numericidmef_confidence_rating_t idmef_confidence_rating_to_numeric (const char *name); name : pointer to an IDMEF string representation of a idmef_confidence_rating_t value. Returns : the numeric equivalent of name, or -1 if name is not valid. idmef_confidence_rating_to_string () idmef_confidence_rating_to_stringconst char * idmef_confidence_rating_to_string (idmef_confidence_rating_t val); Return the IDMEF string equivalent of val provided idmef_confidence_rating_t value. val : an enumeration value for idmef_confidence_rating_t. Returns : a pointer to the string describing val, or NULL if val is invalid. idmef_confidence_t idmef_confidence_ttypedef struct idmef_confidence idmef_confidence_t; idmef_confidence_new () idmef_confidence_newint idmef_confidence_new (idmef_confidence_t **ret); Create a new idmef_confidence_t object. ret : Pointer where to store the created idmef_confidence_t object. Returns : 0 on success, a negative value if an error occured. idmef_confidence_copy () idmef_confidence_copyint idmef_confidence_copy (const idmef_confidence_t *src, idmef_confidence_t *dst); Copy a new idmef_confidence_t object from src to dst. src : Source of the copy. dst : Where to copy the object. Returns : 0 on success, a negative value if an error occured. idmef_confidence_clone () idmef_confidence_cloneint idmef_confidence_clone (idmef_confidence_t *src, idmef_confidence_t **dst); Create a copy of src, and store it in dst. src : Object to be cloned. dst : Address where to store the pointer to the cloned object. Returns : 0 on success, a negative value if an error occured. idmef_confidence_ref () idmef_confidence_refidmef_confidence_t * idmef_confidence_ref (idmef_confidence_t *confidence); Increase confidence reference count, so that it can be referenced multiple time. confidence : pointer to a idmef_confidence_t object. Returns : a pointer to confidence. idmef_confidence_destroy () idmef_confidence_destroyvoid idmef_confidence_destroy (idmef_confidence_t *ptr); Destroy ptr and all of it's children. The objects are only destroyed if their reference count reach zero. ptr : pointer to a idmef_confidence_t object. idmef_confidence_get_rating () idmef_confidence_get_ratingidmef_confidence_rating_t idmef_confidence_get_rating (idmef_confidence_t *ptr); Get rating children of the idmef_confidence_t object. ptr : pointer to a idmef_confidence_t object. Returns : a pointer to a idmef_confidence_rating_t object, or NULL if the children object is not set. idmef_confidence_set_rating () idmef_confidence_set_ratingvoid idmef_confidence_set_rating (idmef_confidence_t *ptr, idmef_confidence_rating_t rating); Set rating object as a children of ptr. if ptr already contain an rating object, then it is destroyed, and updated to point to the provided rating object. ptr : pointer to a idmef_confidence_t object. rating : pointer to a idmef_confidence_rating_t object. idmef_confidence_new_rating () idmef_confidence_new_ratingint idmef_confidence_new_rating (idmef_confidence_t *ptr, idmef_confidence_rating_t **ret); Create a new rating object, children of idmef_confidence_t. If ptr already contain a idmef_confidence_rating_t object, then it is destroyed. ptr : pointer to a idmef_confidence_t object. ret : pointer to an address where to store the created idmef_confidence_rating_t object. Returns : 0 on success, or a negative value if an error occured. idmef_confidence_get_confidence () idmef_confidence_get_confidencefloat idmef_confidence_get_confidence (idmef_confidence_t *ptr); Get confidence children of the idmef_confidence_t object. ptr : pointer to a idmef_confidence_t object. Returns : a pointer to a float object, or NULL if the children object is not set. idmef_confidence_set_confidence () idmef_confidence_set_confidencevoid idmef_confidence_set_confidence (idmef_confidence_t *ptr, float confidence); Set confidence object as a children of ptr. if ptr already contain an confidence object, then it is destroyed, and updated to point to the provided confidence object. ptr : pointer to a idmef_confidence_t object. confidence : pointer to a float object. idmef_confidence_new_confidence () idmef_confidence_new_confidenceint idmef_confidence_new_confidence (idmef_confidence_t *ptr, float **ret); Create a new confidence object, children of idmef_confidence_t. If ptr already contain a float object, then it is destroyed. ptr : pointer to a idmef_confidence_t object. ret : pointer to an address where to store the created float object. Returns : 0 on success, or a negative value if an error occured. idmef_assessment_t idmef_assessment_ttypedef struct idmef_assessment idmef_assessment_t; idmef_assessment_new () idmef_assessment_newint idmef_assessment_new (idmef_assessment_t **ret); Create a new idmef_assessment_t object. ret : Pointer where to store the created idmef_assessment_t object. Returns : 0 on success, a negative value if an error occured. idmef_assessment_copy () idmef_assessment_copyint idmef_assessment_copy (const idmef_assessment_t *src, idmef_assessment_t *dst); Copy a new idmef_assessment_t object from src to dst. src : Source of the copy. dst : Where to copy the object. Returns : 0 on success, a negative value if an error occured. idmef_assessment_clone () idmef_assessment_cloneint idmef_assessment_clone (idmef_assessment_t *src, idmef_assessment_t **dst); Create a copy of src, and store it in dst. src : Object to be cloned. dst : Address where to store the pointer to the cloned object. Returns : 0 on success, a negative value if an error occured. idmef_assessment_ref () idmef_assessment_refidmef_assessment_t * idmef_assessment_ref (idmef_assessment_t *assessment); Increase assessment reference count, so that it can be referenced multiple time. assessment : pointer to a idmef_assessment_t object. Returns : a pointer to assessment. idmef_assessment_destroy () idmef_assessment_destroyvoid idmef_assessment_destroy (idmef_assessment_t *ptr); Destroy ptr and all of it's children. The objects are only destroyed if their reference count reach zero. ptr : pointer to a idmef_assessment_t object. idmef_assessment_get_impact () idmef_assessment_get_impactidmef_impact_t * idmef_assessment_get_impact (idmef_assessment_t *ptr); ptr : Returns : idmef_assessment_set_impact () idmef_assessment_set_impactvoid idmef_assessment_set_impact (idmef_assessment_t *ptr, idmef_impact_t *impact); Set impact object as a children of ptr. if ptr already contain an impact object, then it is destroyed, and updated to point to the provided impact object. ptr : pointer to a idmef_assessment_t object. impact : pointer to a idmef_impact_t object. idmef_assessment_new_impact () idmef_assessment_new_impactint idmef_assessment_new_impact (idmef_assessment_t *ptr, idmef_impact_t **ret); Create a new impact object, children of idmef_assessment_t. If ptr already contain a idmef_impact_t object, then it is destroyed. ptr : pointer to a idmef_assessment_t object. ret : pointer to an address where to store the created idmef_impact_t object. Returns : 0 on success, or a negative value if an error occured. idmef_assessment_get_next_action () idmef_assessment_get_next_actionidmef_action_t * idmef_assessment_get_next_action (idmef_assessment_t *assessment, idmef_action_t *action_cur); Get the next idmef_action_t object listed in ptr. When iterating over the idmef_action_t object listed in ptr, object should be set to the latest returned idmef_action_t object. assessment : pointer to a idmef_assessment_t object. action_cur : pointer to a idmef_action_t object. Returns : the next idmef_action_t in the list. idmef_assessment_set_action () idmef_assessment_set_actionvoid idmef_assessment_set_action (idmef_assessment_t *ptr, idmef_action_t *object, int pos); Add object to position pos of ptr list of idmef_action_t object. If pos is IDMEF_LIST_APPEND, object will be inserted at the tail of the list. If pos is IDMEF_LIST_PREPEND, object will be inserted at the head of the list. ptr : pointer to a idmef_assessment_t object. object : pointer to a idmef_action_t object. pos : Position in the list. idmef_assessment_new_action () idmef_assessment_new_actionint idmef_assessment_new_action (idmef_assessment_t *ptr, idmef_action_t **ret, int pos); Create a new idmef_action_t children of ptr, and add it to position pos of ptr list of idmef_action_t object. The created idmef_action_t object is stored in ret. If pos is IDMEF_LIST_APPEND, object will be inserted at the tail of the list. If pos is IDMEF_LIST_PREPEND, object will be inserted at the head of the list. ptr : pointer to a idmef_assessment_t object. ret : pointer to an address where to store the created idmef_action_t object. pos : position in the list. Returns : 0 on success, or a negative value if an error occured. idmef_assessment_get_confidence () idmef_assessment_get_confidenceidmef_confidence_t * idmef_assessment_get_confidence (idmef_assessment_t *ptr); ptr : Returns : idmef_assessment_set_confidence () idmef_assessment_set_confidencevoid idmef_assessment_set_confidence (idmef_assessment_t *ptr, idmef_confidence_t *confidence); Set confidence object as a children of ptr. if ptr already contain an confidence object, then it is destroyed, and updated to point to the provided confidence object. ptr : pointer to a idmef_assessment_t object. confidence : pointer to a idmef_confidence_t object. idmef_assessment_new_confidence () idmef_assessment_new_confidenceint idmef_assessment_new_confidence (idmef_assessment_t *ptr, idmef_confidence_t **ret); Create a new confidence object, children of idmef_assessment_t. If ptr already contain a idmef_confidence_t object, then it is destroyed. ptr : pointer to a idmef_assessment_t object. ret : pointer to an address where to store the created idmef_confidence_t object. Returns : 0 on success, or a negative value if an error occured. idmef_tool_alert_t idmef_tool_alert_ttypedef struct idmef_tool_alert idmef_tool_alert_t; idmef_tool_alert_new () idmef_tool_alert_newint idmef_tool_alert_new (idmef_tool_alert_t **ret); Create a new idmef_tool_alert_t object. ret : Pointer where to store the created idmef_tool_alert_t object. Returns : 0 on success, a negative value if an error occured. idmef_tool_alert_copy () idmef_tool_alert_copyint idmef_tool_alert_copy (const idmef_tool_alert_t *src, idmef_tool_alert_t *dst); Copy a new idmef_tool_alert_t object from src to dst. src : Source of the copy. dst : Where to copy the object. Returns : 0 on success, a negative value if an error occured. idmef_tool_alert_clone () idmef_tool_alert_cloneint idmef_tool_alert_clone (idmef_tool_alert_t *src, idmef_tool_alert_t **dst); Create a copy of src, and store it in dst. src : Object to be cloned. dst : Address where to store the pointer to the cloned object. Returns : 0 on success, a negative value if an error occured. idmef_tool_alert_ref () idmef_tool_alert_refidmef_tool_alert_t * idmef_tool_alert_ref (idmef_tool_alert_t *tool_alert); Increase tool_alert reference count, so that it can be referenced multiple time. tool_alert : pointer to a idmef_tool_alert_t object. Returns : a pointer to tool_alert. idmef_tool_alert_destroy () idmef_tool_alert_destroyvoid idmef_tool_alert_destroy (idmef_tool_alert_t *ptr); Destroy ptr and all of it's children. The objects are only destroyed if their reference count reach zero. ptr : pointer to a idmef_tool_alert_t object. idmef_tool_alert_get_name () idmef_tool_alert_get_nameprelude_string_t * idmef_tool_alert_get_name (idmef_tool_alert_t *ptr); ptr : Returns : idmef_tool_alert_set_name () idmef_tool_alert_set_namevoid idmef_tool_alert_set_name (idmef_tool_alert_t *ptr, prelude_string_t *name); Set name object as a children of ptr. if ptr already contain an name object, then it is destroyed, and updated to point to the provided name object. ptr : pointer to a idmef_tool_alert_t object. name : pointer to a prelude_string_t object. idmef_tool_alert_new_name () idmef_tool_alert_new_nameint idmef_tool_alert_new_name (idmef_tool_alert_t *ptr, prelude_string_t **ret); Create a new name object, children of idmef_tool_alert_t. If ptr already contain a prelude_string_t object, then it is destroyed. ptr : pointer to a idmef_tool_alert_t object. ret : pointer to an address where to store the created prelude_string_t object. Returns : 0 on success, or a negative value if an error occured. idmef_tool_alert_get_command () idmef_tool_alert_get_commandprelude_string_t * idmef_tool_alert_get_command (idmef_tool_alert_t *ptr); ptr : Returns : idmef_tool_alert_set_command () idmef_tool_alert_set_commandvoid idmef_tool_alert_set_command (idmef_tool_alert_t *ptr, prelude_string_t *command); Set command object as a children of ptr. if ptr already contain an command object, then it is destroyed, and updated to point to the provided command object. ptr : pointer to a idmef_tool_alert_t object. command : pointer to a prelude_string_t object. idmef_tool_alert_new_command () idmef_tool_alert_new_commandint idmef_tool_alert_new_command (idmef_tool_alert_t *ptr, prelude_string_t **ret); Create a new command object, children of idmef_tool_alert_t. If ptr already contain a prelude_string_t object, then it is destroyed. ptr : pointer to a idmef_tool_alert_t object. ret : pointer to an address where to store the created prelude_string_t object. Returns : 0 on success, or a negative value if an error occured. idmef_tool_alert_get_next_alertident () idmef_tool_alert_get_next_alertidentidmef_alertident_t * idmef_tool_alert_get_next_alertident (idmef_tool_alert_t *tool_alert, idmef_alertident_t *alertident_cur); Get the next idmef_alertident_t object listed in ptr. When iterating over the idmef_alertident_t object listed in ptr, object should be set to the latest returned idmef_alertident_t object. tool_alert : pointer to a idmef_tool_alert_t object. alertident_cur : pointer to a idmef_alertident_t object. Returns : the next idmef_alertident_t in the list. idmef_tool_alert_set_alertident () idmef_tool_alert_set_alertidentvoid idmef_tool_alert_set_alertident (idmef_tool_alert_t *ptr, idmef_alertident_t *object, int pos); Add object to position pos of ptr list of idmef_alertident_t object. If pos is IDMEF_LIST_APPEND, object will be inserted at the tail of the list. If pos is IDMEF_LIST_PREPEND, object will be inserted at the head of the list. ptr : pointer to a idmef_tool_alert_t object. object : pointer to a idmef_alertident_t object. pos : Position in the list. idmef_tool_alert_new_alertident () idmef_tool_alert_new_alertidentint idmef_tool_alert_new_alertident (idmef_tool_alert_t *ptr, idmef_alertident_t **ret, int pos); Create a new idmef_alertident_t children of ptr, and add it to position pos of ptr list of idmef_alertident_t object. The created idmef_alertident_t object is stored in ret. If pos is IDMEF_LIST_APPEND, object will be inserted at the tail of the list. If pos is IDMEF_LIST_PREPEND, object will be inserted at the head of the list. ptr : pointer to a idmef_tool_alert_t object. ret : pointer to an address where to store the created idmef_alertident_t object. pos : position in the list. Returns : 0 on success, or a negative value if an error occured. idmef_correlation_alert_t idmef_correlation_alert_ttypedef struct idmef_correlation_alert idmef_correlation_alert_t; idmef_correlation_alert_new () idmef_correlation_alert_newint idmef_correlation_alert_new (idmef_correlation_alert_t **ret); Create a new idmef_correlation_alert_t object. ret : Pointer where to store the created idmef_correlation_alert_t object. Returns : 0 on success, a negative value if an error occured. idmef_correlation_alert_copy () idmef_correlation_alert_copyint idmef_correlation_alert_copy (const idmef_correlation_alert_t *src, idmef_correlation_alert_t *dst); Copy a new idmef_correlation_alert_t object from src to dst. src : Source of the copy. dst : Where to copy the object. Returns : 0 on success, a negative value if an error occured. idmef_correlation_alert_clone () idmef_correlation_alert_cloneint idmef_correlation_alert_clone (idmef_correlation_alert_t *src, idmef_correlation_alert_t **dst); Create a copy of src, and store it in dst. src : Object to be cloned. dst : Address where to store the pointer to the cloned object. Returns : 0 on success, a negative value if an error occured. idmef_correlation_alert_ref () idmef_correlation_alert_refidmef_correlation_alert_t * idmef_correlation_alert_ref (idmef_correlation_alert_t *correlation_alert); Increase correlation_alert reference count, so that it can be referenced multiple time. correlation_alert : pointer to a idmef_correlation_alert_t object. Returns : a pointer to correlation_alert. idmef_correlation_alert_destroy () idmef_correlation_alert_destroyvoid idmef_correlation_alert_destroy (idmef_correlation_alert_t *ptr); Destroy ptr and all of it's children. The objects are only destroyed if their reference count reach zero. ptr : pointer to a idmef_correlation_alert_t object. idmef_correlation_alert_get_name () idmef_correlation_alert_get_nameprelude_string_t * idmef_correlation_alert_get_name (idmef_correlation_alert_t *ptr); ptr : Returns : idmef_correlation_alert_set_name () idmef_correlation_alert_set_namevoid idmef_correlation_alert_set_name (idmef_correlation_alert_t *ptr, prelude_string_t *name); Set name object as a children of ptr. if ptr already contain an name object, then it is destroyed, and updated to point to the provided name object. ptr : pointer to a idmef_correlation_alert_t object. name : pointer to a prelude_string_t object. idmef_correlation_alert_new_name () idmef_correlation_alert_new_nameint idmef_correlation_alert_new_name (idmef_correlation_alert_t *ptr, prelude_string_t **ret); Create a new name object, children of idmef_correlation_alert_t. If ptr already contain a prelude_string_t object, then it is destroyed. ptr : pointer to a idmef_correlation_alert_t object. ret : pointer to an address where to store the created prelude_string_t object. Returns : 0 on success, or a negative value if an error occured. idmef_correlation_alert_get_next_alertident () idmef_correlation_alert_get_next_alertidentidmef_alertident_t * idmef_correlation_alert_get_next_alertident (idmef_correlation_alert_t *correlation_alert, idmef_alertident_t *alertident_cur); Get the next idmef_alertident_t object listed in ptr. When iterating over the idmef_alertident_t object listed in ptr, object should be set to the latest returned idmef_alertident_t object. correlation_alert : pointer to a idmef_correlation_alert_t object. alertident_cur : pointer to a idmef_alertident_t object. Returns : the next idmef_alertident_t in the list. idmef_correlation_alert_set_alertident () idmef_correlation_alert_set_alertidentvoid idmef_correlation_alert_set_alertident (idmef_correlation_alert_t *ptr, idmef_alertident_t *object, int pos); Add object to position pos of ptr list of idmef_alertident_t object. If pos is IDMEF_LIST_APPEND, object will be inserted at the tail of the list. If pos is IDMEF_LIST_PREPEND, object will be inserted at the head of the list. ptr : pointer to a idmef_correlation_alert_t object. object : pointer to a idmef_alertident_t object. pos : Position in the list. idmef_correlation_alert_new_alertident () idmef_correlation_alert_new_alertidentint idmef_correlation_alert_new_alertident (idmef_correlation_alert_t *ptr, idmef_alertident_t **ret, int pos); Create a new idmef_alertident_t children of ptr, and add it to position pos of ptr list of idmef_alertident_t object. The created idmef_alertident_t object is stored in ret. If pos is IDMEF_LIST_APPEND, object will be inserted at the tail of the list. If pos is IDMEF_LIST_PREPEND, object will be inserted at the head of the list. ptr : pointer to a idmef_correlation_alert_t object. ret : pointer to an address where to store the created idmef_alertident_t object. pos : position in the list. Returns : 0 on success, or a negative value if an error occured. idmef_overflow_alert_t idmef_overflow_alert_ttypedef struct idmef_overflow_alert idmef_overflow_alert_t; idmef_overflow_alert_new () idmef_overflow_alert_newint idmef_overflow_alert_new (idmef_overflow_alert_t **ret); Create a new idmef_overflow_alert_t object. ret : Pointer where to store the created idmef_overflow_alert_t object. Returns : 0 on success, a negative value if an error occured. idmef_overflow_alert_copy () idmef_overflow_alert_copyint idmef_overflow_alert_copy (const idmef_overflow_alert_t *src, idmef_overflow_alert_t *dst); Copy a new idmef_overflow_alert_t object from src to dst. src : Source of the copy. dst : Where to copy the object. Returns : 0 on success, a negative value if an error occured. idmef_overflow_alert_clone () idmef_overflow_alert_cloneint idmef_overflow_alert_clone (idmef_overflow_alert_t *src, idmef_overflow_alert_t **dst); Create a copy of src, and store it in dst. src : Object to be cloned. dst : Address where to store the pointer to the cloned object. Returns : 0 on success, a negative value if an error occured. idmef_overflow_alert_ref () idmef_overflow_alert_refidmef_overflow_alert_t * idmef_overflow_alert_ref (idmef_overflow_alert_t *overflow_alert); Increase overflow_alert reference count, so that it can be referenced multiple time. overflow_alert : pointer to a idmef_overflow_alert_t object. Returns : a pointer to overflow_alert. idmef_overflow_alert_destroy () idmef_overflow_alert_destroyvoid idmef_overflow_alert_destroy (idmef_overflow_alert_t *ptr); Destroy ptr and all of it's children. The objects are only destroyed if their reference count reach zero. ptr : pointer to a idmef_overflow_alert_t object. idmef_overflow_alert_get_program () idmef_overflow_alert_get_programprelude_string_t * idmef_overflow_alert_get_program (idmef_overflow_alert_t *ptr); ptr : Returns : idmef_overflow_alert_set_program () idmef_overflow_alert_set_programvoid idmef_overflow_alert_set_program (idmef_overflow_alert_t *ptr, prelude_string_t *program); Set program object as a children of ptr. if ptr already contain an program object, then it is destroyed, and updated to point to the provided program object. ptr : pointer to a idmef_overflow_alert_t object. program : pointer to a prelude_string_t object. idmef_overflow_alert_new_program () idmef_overflow_alert_new_programint idmef_overflow_alert_new_program (idmef_overflow_alert_t *ptr, prelude_string_t **ret); Create a new program object, children of idmef_overflow_alert_t. If ptr already contain a prelude_string_t object, then it is destroyed. ptr : pointer to a idmef_overflow_alert_t object. ret : pointer to an address where to store the created prelude_string_t object. Returns : 0 on success, or a negative value if an error occured. idmef_overflow_alert_unset_size () idmef_overflow_alert_unset_sizevoid idmef_overflow_alert_unset_size (idmef_overflow_alert_t *ptr); ptr : idmef_overflow_alert_get_size () idmef_overflow_alert_get_sizeuint32_t * idmef_overflow_alert_get_size (idmef_overflow_alert_t *ptr); ptr : Returns : idmef_overflow_alert_set_size () idmef_overflow_alert_set_sizevoid idmef_overflow_alert_set_size (idmef_overflow_alert_t *ptr, uint32_t size); Set size object as a children of ptr. if ptr already contain an size object, then it is destroyed, and updated to point to the provided size object. ptr : pointer to a idmef_overflow_alert_t object. size : pointer to a uint32_t object. idmef_overflow_alert_new_size () idmef_overflow_alert_new_sizeint idmef_overflow_alert_new_size (idmef_overflow_alert_t *ptr, uint32_t **ret); Create a new size object, children of idmef_overflow_alert_t. If ptr already contain a uint32_t object, then it is destroyed. ptr : pointer to a idmef_overflow_alert_t object. ret : pointer to an address where to store the created uint32_t object. Returns : 0 on success, or a negative value if an error occured. idmef_overflow_alert_get_buffer () idmef_overflow_alert_get_bufferidmef_data_t * idmef_overflow_alert_get_buffer (idmef_overflow_alert_t *ptr); ptr : Returns : idmef_overflow_alert_set_buffer () idmef_overflow_alert_set_buffervoid idmef_overflow_alert_set_buffer (idmef_overflow_alert_t *ptr, idmef_data_t *buffer); Set buffer object as a children of ptr. if ptr already contain an buffer object, then it is destroyed, and updated to point to the provided buffer object. ptr : pointer to a idmef_overflow_alert_t object. buffer : pointer to a idmef_data_t object. idmef_overflow_alert_new_buffer () idmef_overflow_alert_new_bufferint idmef_overflow_alert_new_buffer (idmef_overflow_alert_t *ptr, idmef_data_t **ret); Create a new buffer object, children of idmef_overflow_alert_t. If ptr already contain a idmef_data_t object, then it is destroyed. ptr : pointer to a idmef_overflow_alert_t object. ret : pointer to an address where to store the created idmef_data_t object. Returns : 0 on success, or a negative value if an error occured. enum idmef_alert_type_t idmef_alert_type_ttypedef enum { IDMEF_ALERT_TYPE_ERROR = -1, IDMEF_ALERT_TYPE_DEFAULT = 0, IDMEF_ALERT_TYPE_TOOL = 1, IDMEF_ALERT_TYPE_CORRELATION = 2, IDMEF_ALERT_TYPE_OVERFLOW = 3 } idmef_alert_type_t; idmef_alert_type_to_numeric () idmef_alert_type_to_numericidmef_alert_type_t idmef_alert_type_to_numeric (const char *name); name : pointer to an IDMEF string representation of a idmef_alert_type_t value. Returns : the numeric equivalent of name, or -1 if name is not valid. idmef_alert_type_to_string () idmef_alert_type_to_stringconst char * idmef_alert_type_to_string (idmef_alert_type_t val); Return the IDMEF string equivalent of val provided idmef_alert_type_t value. val : an enumeration value for idmef_alert_type_t. Returns : a pointer to the string describing val, or NULL if val is invalid. idmef_alert_t idmef_alert_ttypedef struct idmef_alert idmef_alert_t; idmef_alert_new () idmef_alert_newint idmef_alert_new (idmef_alert_t **ret); Create a new idmef_alert_t object. ret : Pointer where to store the created idmef_alert_t object. Returns : 0 on success, a negative value if an error occured. idmef_alert_copy () idmef_alert_copyint idmef_alert_copy (const idmef_alert_t *src, idmef_alert_t *dst); Copy a new idmef_alert_t object from src to dst. src : Source of the copy. dst : Where to copy the object. Returns : 0 on success, a negative value if an error occured. idmef_alert_clone () idmef_alert_cloneint idmef_alert_clone (idmef_alert_t *src, idmef_alert_t **dst); Create a copy of src, and store it in dst. src : Object to be cloned. dst : Address where to store the pointer to the cloned object. Returns : 0 on success, a negative value if an error occured. idmef_alert_ref () idmef_alert_refidmef_alert_t * idmef_alert_ref (idmef_alert_t *alert); Increase alert reference count, so that it can be referenced multiple time. alert : pointer to a idmef_alert_t object. Returns : a pointer to alert. idmef_alert_destroy () idmef_alert_destroyvoid idmef_alert_destroy (idmef_alert_t *ptr); Destroy ptr and all of it's children. The objects are only destroyed if their reference count reach zero. ptr : pointer to a idmef_alert_t object. idmef_alert_get_messageid () idmef_alert_get_messageidprelude_string_t * idmef_alert_get_messageid (idmef_alert_t *ptr); ptr : Returns : idmef_alert_set_messageid () idmef_alert_set_messageidvoid idmef_alert_set_messageid (idmef_alert_t *ptr, prelude_string_t *messageid); Set messageid object as a children of ptr. if ptr already contain an messageid object, then it is destroyed, and updated to point to the provided messageid object. ptr : pointer to a idmef_alert_t object. messageid : pointer to a prelude_string_t object. idmef_alert_new_messageid () idmef_alert_new_messageidint idmef_alert_new_messageid (idmef_alert_t *ptr, prelude_string_t **ret); Create a new messageid object, children of idmef_alert_t. If ptr already contain a prelude_string_t object, then it is destroyed. ptr : pointer to a idmef_alert_t object. ret : pointer to an address where to store the created prelude_string_t object. Returns : 0 on success, or a negative value if an error occured. idmef_alert_get_next_analyzer () idmef_alert_get_next_analyzeridmef_analyzer_t * idmef_alert_get_next_analyzer (idmef_alert_t *alert, idmef_analyzer_t *analyzer_cur); Get the next idmef_analyzer_t object listed in ptr. When iterating over the idmef_analyzer_t object listed in ptr, object should be set to the latest returned idmef_analyzer_t object. alert : pointer to a idmef_alert_t object. analyzer_cur : pointer to a idmef_analyzer_t object. Returns : the next idmef_analyzer_t in the list. idmef_alert_set_analyzer () idmef_alert_set_analyzervoid idmef_alert_set_analyzer (idmef_alert_t *ptr, idmef_analyzer_t *object, int pos); Add object to position pos of ptr list of idmef_analyzer_t object. If pos is IDMEF_LIST_APPEND, object will be inserted at the tail of the list. If pos is IDMEF_LIST_PREPEND, object will be inserted at the head of the list. ptr : pointer to a idmef_alert_t object. object : pointer to a idmef_analyzer_t object. pos : Position in the list. idmef_alert_new_analyzer () idmef_alert_new_analyzerint idmef_alert_new_analyzer (idmef_alert_t *ptr, idmef_analyzer_t **ret, int pos); Create a new idmef_analyzer_t children of ptr, and add it to position pos of ptr list of idmef_analyzer_t object. The created idmef_analyzer_t object is stored in ret. If pos is IDMEF_LIST_APPEND, object will be inserted at the tail of the list. If pos is IDMEF_LIST_PREPEND, object will be inserted at the head of the list. ptr : pointer to a idmef_alert_t object. ret : pointer to an address where to store the created idmef_analyzer_t object. pos : position in the list. Returns : 0 on success, or a negative value if an error occured. idmef_alert_get_create_time () idmef_alert_get_create_timeidmef_time_t * idmef_alert_get_create_time (idmef_alert_t *ptr); ptr : Returns : idmef_alert_set_create_time () idmef_alert_set_create_timevoid idmef_alert_set_create_time (idmef_alert_t *ptr, idmef_time_t *create_time); Set create_time object as a children of ptr. if ptr already contain an create_time object, then it is destroyed, and updated to point to the provided create_time object. ptr : pointer to a idmef_alert_t object. create_time : pointer to a idmef_time_t object. idmef_alert_new_create_time () idmef_alert_new_create_timeint idmef_alert_new_create_time (idmef_alert_t *ptr, idmef_time_t **ret); Create a new create_time object, children of idmef_alert_t. If ptr already contain a idmef_time_t object, then it is destroyed. ptr : pointer to a idmef_alert_t object. ret : pointer to an address where to store the created idmef_time_t object. Returns : 0 on success, or a negative value if an error occured. idmef_alert_get_classification () idmef_alert_get_classificationidmef_classification_t * idmef_alert_get_classification (idmef_alert_t *ptr); ptr : Returns : idmef_alert_set_classification () idmef_alert_set_classificationvoid idmef_alert_set_classification (idmef_alert_t *ptr, idmef_classification_t *classification); Set classification object as a children of ptr. if ptr already contain an classification object, then it is destroyed, and updated to point to the provided classification object. ptr : pointer to a idmef_alert_t object. classification : pointer to a idmef_classification_t object. idmef_alert_new_classification () idmef_alert_new_classificationint idmef_alert_new_classification (idmef_alert_t *ptr, idmef_classification_t **ret); Create a new classification object, children of idmef_alert_t. If ptr already contain a idmef_classification_t object, then it is destroyed. ptr : pointer to a idmef_alert_t object. ret : pointer to an address where to store the created idmef_classification_t object. Returns : 0 on success, or a negative value if an error occured. idmef_alert_get_detect_time () idmef_alert_get_detect_timeidmef_time_t * idmef_alert_get_detect_time (idmef_alert_t *ptr); ptr : Returns : idmef_alert_set_detect_time () idmef_alert_set_detect_timevoid idmef_alert_set_detect_time (idmef_alert_t *ptr, idmef_time_t *detect_time); Set detect_time object as a children of ptr. if ptr already contain an detect_time object, then it is destroyed, and updated to point to the provided detect_time object. ptr : pointer to a idmef_alert_t object. detect_time : pointer to a idmef_time_t object. idmef_alert_new_detect_time () idmef_alert_new_detect_timeint idmef_alert_new_detect_time (idmef_alert_t *ptr, idmef_time_t **ret); Create a new detect_time object, children of idmef_alert_t. If ptr already contain a idmef_time_t object, then it is destroyed. ptr : pointer to a idmef_alert_t object. ret : pointer to an address where to store the created idmef_time_t object. Returns : 0 on success, or a negative value if an error occured. idmef_alert_get_analyzer_time () idmef_alert_get_analyzer_timeidmef_time_t * idmef_alert_get_analyzer_time (idmef_alert_t *ptr); ptr : Returns : idmef_alert_set_analyzer_time () idmef_alert_set_analyzer_timevoid idmef_alert_set_analyzer_time (idmef_alert_t *ptr, idmef_time_t *analyzer_time); Set analyzer_time object as a children of ptr. if ptr already contain an analyzer_time object, then it is destroyed, and updated to point to the provided analyzer_time object. ptr : pointer to a idmef_alert_t object. analyzer_time : pointer to a idmef_time_t object. idmef_alert_new_analyzer_time () idmef_alert_new_analyzer_timeint idmef_alert_new_analyzer_time (idmef_alert_t *ptr, idmef_time_t **ret); Create a new analyzer_time object, children of idmef_alert_t. If ptr already contain a idmef_time_t object, then it is destroyed. ptr : pointer to a idmef_alert_t object. ret : pointer to an address where to store the created idmef_time_t object. Returns : 0 on success, or a negative value if an error occured. idmef_alert_get_next_source () idmef_alert_get_next_sourceidmef_source_t * idmef_alert_get_next_source (idmef_alert_t *alert, idmef_source_t *source_cur); Get the next idmef_source_t object listed in ptr. When iterating over the idmef_source_t object listed in ptr, object should be set to the latest returned idmef_source_t object. alert : pointer to a idmef_alert_t object. source_cur : pointer to a idmef_source_t object. Returns : the next idmef_source_t in the list. idmef_alert_set_source () idmef_alert_set_sourcevoid idmef_alert_set_source (idmef_alert_t *ptr, idmef_source_t *object, int pos); Add object to position pos of ptr list of idmef_source_t object. If pos is IDMEF_LIST_APPEND, object will be inserted at the tail of the list. If pos is IDMEF_LIST_PREPEND, object will be inserted at the head of the list. ptr : pointer to a idmef_alert_t object. object : pointer to a idmef_source_t object. pos : Position in the list. idmef_alert_new_source () idmef_alert_new_sourceint idmef_alert_new_source (idmef_alert_t *ptr, idmef_source_t **ret, int pos); Create a new idmef_source_t children of ptr, and add it to position pos of ptr list of idmef_source_t object. The created idmef_source_t object is stored in ret. If pos is IDMEF_LIST_APPEND, object will be inserted at the tail of the list. If pos is IDMEF_LIST_PREPEND, object will be inserted at the head of the list. ptr : pointer to a idmef_alert_t object. ret : pointer to an address where to store the created idmef_source_t object. pos : position in the list. Returns : 0 on success, or a negative value if an error occured. idmef_alert_get_next_target () idmef_alert_get_next_targetidmef_target_t * idmef_alert_get_next_target (idmef_alert_t *alert, idmef_target_t *target_cur); Get the next idmef_target_t object listed in ptr. When iterating over the idmef_target_t object listed in ptr, object should be set to the latest returned idmef_target_t object. alert : pointer to a idmef_alert_t object. target_cur : pointer to a idmef_target_t object. Returns : the next idmef_target_t in the list. idmef_alert_set_target () idmef_alert_set_targetvoid idmef_alert_set_target (idmef_alert_t *ptr, idmef_target_t *object, int pos); Add object to position pos of ptr list of idmef_target_t object. If pos is IDMEF_LIST_APPEND, object will be inserted at the tail of the list. If pos is IDMEF_LIST_PREPEND, object will be inserted at the head of the list. ptr : pointer to a idmef_alert_t object. object : pointer to a idmef_target_t object. pos : Position in the list. idmef_alert_new_target () idmef_alert_new_targetint idmef_alert_new_target (idmef_alert_t *ptr, idmef_target_t **ret, int pos); Create a new idmef_target_t children of ptr, and add it to position pos of ptr list of idmef_target_t object. The created idmef_target_t object is stored in ret. If pos is IDMEF_LIST_APPEND, object will be inserted at the tail of the list. If pos is IDMEF_LIST_PREPEND, object will be inserted at the head of the list. ptr : pointer to a idmef_alert_t object. ret : pointer to an address where to store the created idmef_target_t object. pos : position in the list. Returns : 0 on success, or a negative value if an error occured. idmef_alert_get_assessment () idmef_alert_get_assessmentidmef_assessment_t * idmef_alert_get_assessment (idmef_alert_t *ptr); ptr : Returns : idmef_alert_set_assessment () idmef_alert_set_assessmentvoid idmef_alert_set_assessment (idmef_alert_t *ptr, idmef_assessment_t *assessment); Set assessment object as a children of ptr. if ptr already contain an assessment object, then it is destroyed, and updated to point to the provided assessment object. ptr : pointer to a idmef_alert_t object. assessment : pointer to a idmef_assessment_t object. idmef_alert_new_assessment () idmef_alert_new_assessmentint idmef_alert_new_assessment (idmef_alert_t *ptr, idmef_assessment_t **ret); Create a new assessment object, children of idmef_alert_t. If ptr already contain a idmef_assessment_t object, then it is destroyed. ptr : pointer to a idmef_alert_t object. ret : pointer to an address where to store the created idmef_assessment_t object. Returns : 0 on success, or a negative value if an error occured. idmef_alert_get_next_additional_data () idmef_alert_get_next_additional_dataidmef_additional_data_t * idmef_alert_get_next_additional_data (idmef_alert_t *alert, idmef_additional_data_t *additional_data_cur); Get the next idmef_additional_data_t object listed in ptr. When iterating over the idmef_additional_data_t object listed in ptr, object should be set to the latest returned idmef_additional_data_t object. alert : pointer to a idmef_alert_t object. additional_data_cur : pointer to a idmef_additional_data_t object. Returns : the next idmef_additional_data_t in the list. idmef_alert_set_additional_data () idmef_alert_set_additional_datavoid idmef_alert_set_additional_data (idmef_alert_t *ptr, idmef_additional_data_t *object, int pos); Add object to position pos of ptr list of idmef_additional_data_t object. If pos is IDMEF_LIST_APPEND, object will be inserted at the tail of the list. If pos is IDMEF_LIST_PREPEND, object will be inserted at the head of the list. ptr : pointer to a idmef_alert_t object. object : pointer to a idmef_additional_data_t object. pos : Position in the list. idmef_alert_new_additional_data () idmef_alert_new_additional_dataint idmef_alert_new_additional_data (idmef_alert_t *ptr, idmef_additional_data_t **ret, int pos); Create a new idmef_additional_data_t children of ptr, and add it to position pos of ptr list of idmef_additional_data_t object. The created idmef_additional_data_t object is stored in ret. If pos is IDMEF_LIST_APPEND, object will be inserted at the tail of the list. If pos is IDMEF_LIST_PREPEND, object will be inserted at the head of the list. ptr : pointer to a idmef_alert_t object. ret : pointer to an address where to store the created idmef_additional_data_t object. pos : position in the list. Returns : 0 on success, or a negative value if an error occured. idmef_alert_get_type () idmef_alert_get_typeidmef_alert_type_t idmef_alert_get_type (idmef_alert_t *ptr); Access the type children of ptr. ptr : pointer to a idmef_alert_t object. Returns : a pointer to the idmef_alert_type_t children, or NULL if it is not set. idmef_alert_get_tool_alert () idmef_alert_get_tool_alertidmef_tool_alert_t * idmef_alert_get_tool_alert (idmef_alert_t *ptr); Access the tool_alert children of ptr. ptr : pointer to a idmef_alert_t object. Returns : a pointer to the idmef_tool_alert_t children, or NULL if it is not set. idmef_alert_set_tool_alert () idmef_alert_set_tool_alertvoid idmef_alert_set_tool_alert (idmef_alert_t *ptr, idmef_tool_alert_t *tool_alert); Set tool_alert object as a children of ptr. if ptr already contain a tool_alert object, then it is destroyed, and updated to point to the provided tool_alert object. ptr : pointer to a idmef_alert_t object. tool_alert : pointer to a idmef_tool_alert_t object. idmef_alert_new_tool_alert () idmef_alert_new_tool_alertint idmef_alert_new_tool_alert (idmef_alert_t *ptr, idmef_tool_alert_t **ret); Create a new idmef_tool_alert_t object, children of idmef_alert_t. If ptr already contain a idmef_tool_alert_t object, then it is destroyed. ptr : pointer to a idmef_alert_t object. ret : pointer where to store the created idmef_tool_alert_t object. Returns : 0 on success, or a negative value if an error occured. idmef_alert_get_correlation_alert () idmef_alert_get_correlation_alertidmef_correlation_alert_t * idmef_alert_get_correlation_alert (idmef_alert_t *ptr); Access the correlation_alert children of ptr. ptr : pointer to a idmef_alert_t object. Returns : a pointer to the idmef_correlation_alert_t children, or NULL if it is not set. idmef_alert_set_correlation_alert () idmef_alert_set_correlation_alertvoid idmef_alert_set_correlation_alert (idmef_alert_t *ptr, idmef_correlation_alert_t *correlation_alert); Set correlation_alert object as a children of ptr. if ptr already contain a correlation_alert object, then it is destroyed, and updated to point to the provided correlation_alert object. ptr : pointer to a idmef_alert_t object. correlation_alert : pointer to a idmef_correlation_alert_t object. idmef_alert_new_correlation_alert () idmef_alert_new_correlation_alertint idmef_alert_new_correlation_alert (idmef_alert_t *ptr, idmef_correlation_alert_t **ret); Create a new idmef_correlation_alert_t object, children of idmef_alert_t. If ptr already contain a idmef_correlation_alert_t object, then it is destroyed. ptr : pointer to a idmef_alert_t object. ret : pointer where to store the created idmef_correlation_alert_t object. Returns : 0 on success, or a negative value if an error occured. idmef_alert_get_overflow_alert () idmef_alert_get_overflow_alertidmef_overflow_alert_t * idmef_alert_get_overflow_alert (idmef_alert_t *ptr); Access the overflow_alert children of ptr. ptr : pointer to a idmef_alert_t object. Returns : a pointer to the idmef_overflow_alert_t children, or NULL if it is not set. idmef_alert_set_overflow_alert () idmef_alert_set_overflow_alertvoid idmef_alert_set_overflow_alert (idmef_alert_t *ptr, idmef_overflow_alert_t *overflow_alert); Set overflow_alert object as a children of ptr. if ptr already contain a overflow_alert object, then it is destroyed, and updated to point to the provided overflow_alert object. ptr : pointer to a idmef_alert_t object. overflow_alert : pointer to a idmef_overflow_alert_t object. idmef_alert_new_overflow_alert () idmef_alert_new_overflow_alertint idmef_alert_new_overflow_alert (idmef_alert_t *ptr, idmef_overflow_alert_t **ret); Create a new idmef_overflow_alert_t object, children of idmef_alert_t. If ptr already contain a idmef_overflow_alert_t object, then it is destroyed. ptr : pointer to a idmef_alert_t object. ret : pointer where to store the created idmef_overflow_alert_t object. Returns : 0 on success, or a negative value if an error occured. idmef_heartbeat_t idmef_heartbeat_ttypedef struct idmef_heartbeat idmef_heartbeat_t; idmef_heartbeat_new () idmef_heartbeat_newint idmef_heartbeat_new (idmef_heartbeat_t **ret); Create a new idmef_heartbeat_t object. ret : Pointer where to store the created idmef_heartbeat_t object. Returns : 0 on success, a negative value if an error occured. idmef_heartbeat_copy () idmef_heartbeat_copyint idmef_heartbeat_copy (const idmef_heartbeat_t *src, idmef_heartbeat_t *dst); Copy a new idmef_heartbeat_t object from src to dst. src : Source of the copy. dst : Where to copy the object. Returns : 0 on success, a negative value if an error occured. idmef_heartbeat_clone () idmef_heartbeat_cloneint idmef_heartbeat_clone (idmef_heartbeat_t *src, idmef_heartbeat_t **dst); Create a copy of src, and store it in dst. src : Object to be cloned. dst : Address where to store the pointer to the cloned object. Returns : 0 on success, a negative value if an error occured. idmef_heartbeat_ref () idmef_heartbeat_refidmef_heartbeat_t * idmef_heartbeat_ref (idmef_heartbeat_t *heartbeat); Increase heartbeat reference count, so that it can be referenced multiple time. heartbeat : pointer to a idmef_heartbeat_t object. Returns : a pointer to heartbeat. idmef_heartbeat_destroy () idmef_heartbeat_destroyvoid idmef_heartbeat_destroy (idmef_heartbeat_t *ptr); Destroy ptr and all of it's children. The objects are only destroyed if their reference count reach zero. ptr : pointer to a idmef_heartbeat_t object. idmef_heartbeat_get_messageid () idmef_heartbeat_get_messageidprelude_string_t * idmef_heartbeat_get_messageid (idmef_heartbeat_t *ptr); ptr : Returns : idmef_heartbeat_set_messageid () idmef_heartbeat_set_messageidvoid idmef_heartbeat_set_messageid (idmef_heartbeat_t *ptr, prelude_string_t *messageid); Set messageid object as a children of ptr. if ptr already contain an messageid object, then it is destroyed, and updated to point to the provided messageid object. ptr : pointer to a idmef_heartbeat_t object. messageid : pointer to a prelude_string_t object. idmef_heartbeat_new_messageid () idmef_heartbeat_new_messageidint idmef_heartbeat_new_messageid (idmef_heartbeat_t *ptr, prelude_string_t **ret); Create a new messageid object, children of idmef_heartbeat_t. If ptr already contain a prelude_string_t object, then it is destroyed. ptr : pointer to a idmef_heartbeat_t object. ret : pointer to an address where to store the created prelude_string_t object. Returns : 0 on success, or a negative value if an error occured. idmef_heartbeat_get_next_analyzer () idmef_heartbeat_get_next_analyzeridmef_analyzer_t * idmef_heartbeat_get_next_analyzer (idmef_heartbeat_t *heartbeat, idmef_analyzer_t *analyzer_cur); Get the next idmef_analyzer_t object listed in ptr. When iterating over the idmef_analyzer_t object listed in ptr, object should be set to the latest returned idmef_analyzer_t object. heartbeat : pointer to a idmef_heartbeat_t object. analyzer_cur : pointer to a idmef_analyzer_t object. Returns : the next idmef_analyzer_t in the list. idmef_heartbeat_set_analyzer () idmef_heartbeat_set_analyzervoid idmef_heartbeat_set_analyzer (idmef_heartbeat_t *ptr, idmef_analyzer_t *object, int pos); Add object to position pos of ptr list of idmef_analyzer_t object. If pos is IDMEF_LIST_APPEND, object will be inserted at the tail of the list. If pos is IDMEF_LIST_PREPEND, object will be inserted at the head of the list. ptr : pointer to a idmef_heartbeat_t object. object : pointer to a idmef_analyzer_t object. pos : Position in the list. idmef_heartbeat_new_analyzer () idmef_heartbeat_new_analyzerint idmef_heartbeat_new_analyzer (idmef_heartbeat_t *ptr, idmef_analyzer_t **ret, int pos); Create a new idmef_analyzer_t children of ptr, and add it to position pos of ptr list of idmef_analyzer_t object. The created idmef_analyzer_t object is stored in ret. If pos is IDMEF_LIST_APPEND, object will be inserted at the tail of the list. If pos is IDMEF_LIST_PREPEND, object will be inserted at the head of the list. ptr : pointer to a idmef_heartbeat_t object. ret : pointer to an address where to store the created idmef_analyzer_t object. pos : position in the list. Returns : 0 on success, or a negative value if an error occured. idmef_heartbeat_get_create_time () idmef_heartbeat_get_create_timeidmef_time_t * idmef_heartbeat_get_create_time (idmef_heartbeat_t *ptr); ptr : Returns : idmef_heartbeat_set_create_time () idmef_heartbeat_set_create_timevoid idmef_heartbeat_set_create_time (idmef_heartbeat_t *ptr, idmef_time_t *create_time); Set create_time object as a children of ptr. if ptr already contain an create_time object, then it is destroyed, and updated to point to the provided create_time object. ptr : pointer to a idmef_heartbeat_t object. create_time : pointer to a idmef_time_t object. idmef_heartbeat_new_create_time () idmef_heartbeat_new_create_timeint idmef_heartbeat_new_create_time (idmef_heartbeat_t *ptr, idmef_time_t **ret); Create a new create_time object, children of idmef_heartbeat_t. If ptr already contain a idmef_time_t object, then it is destroyed. ptr : pointer to a idmef_heartbeat_t object. ret : pointer to an address where to store the created idmef_time_t object. Returns : 0 on success, or a negative value if an error occured. idmef_heartbeat_get_analyzer_time () idmef_heartbeat_get_analyzer_timeidmef_time_t * idmef_heartbeat_get_analyzer_time (idmef_heartbeat_t *ptr); ptr : Returns : idmef_heartbeat_set_analyzer_time () idmef_heartbeat_set_analyzer_timevoid idmef_heartbeat_set_analyzer_time (idmef_heartbeat_t *ptr, idmef_time_t *analyzer_time); Set analyzer_time object as a children of ptr. if ptr already contain an analyzer_time object, then it is destroyed, and updated to point to the provided analyzer_time object. ptr : pointer to a idmef_heartbeat_t object. analyzer_time : pointer to a idmef_time_t object. idmef_heartbeat_new_analyzer_time () idmef_heartbeat_new_analyzer_timeint idmef_heartbeat_new_analyzer_time (idmef_heartbeat_t *ptr, idmef_time_t **ret); Create a new analyzer_time object, children of idmef_heartbeat_t. If ptr already contain a idmef_time_t object, then it is destroyed. ptr : pointer to a idmef_heartbeat_t object. ret : pointer to an address where to store the created idmef_time_t object. Returns : 0 on success, or a negative value if an error occured. idmef_heartbeat_unset_heartbeat_interval () idmef_heartbeat_unset_heartbeat_intervalvoid idmef_heartbeat_unset_heartbeat_interval (idmef_heartbeat_t *ptr); ptr : idmef_heartbeat_get_heartbeat_interval () idmef_heartbeat_get_heartbeat_intervaluint32_t * idmef_heartbeat_get_heartbeat_interval (idmef_heartbeat_t *ptr); ptr : Returns : idmef_heartbeat_set_heartbeat_interval () idmef_heartbeat_set_heartbeat_intervalvoid idmef_heartbeat_set_heartbeat_interval (idmef_heartbeat_t *ptr, uint32_t heartbeat_interval); Set heartbeat_interval object as a children of ptr. if ptr already contain an heartbeat_interval object, then it is destroyed, and updated to point to the provided heartbeat_interval object. ptr : pointer to a idmef_heartbeat_t object. heartbeat_interval : pointer to a uint32_t object. idmef_heartbeat_new_heartbeat_interval () idmef_heartbeat_new_heartbeat_intervalint idmef_heartbeat_new_heartbeat_interval (idmef_heartbeat_t *ptr, uint32_t **ret); Create a new heartbeat_interval object, children of idmef_heartbeat_t. If ptr already contain a uint32_t object, then it is destroyed. ptr : pointer to a idmef_heartbeat_t object. ret : pointer to an address where to store the created uint32_t object. Returns : 0 on success, or a negative value if an error occured. idmef_heartbeat_get_next_additional_data () idmef_heartbeat_get_next_additional_dataidmef_additional_data_t * idmef_heartbeat_get_next_additional_data (idmef_heartbeat_t *heartbeat, idmef_additional_data_t *additional_data_cur); Get the next idmef_additional_data_t object listed in ptr. When iterating over the idmef_additional_data_t object listed in ptr, object should be set to the latest returned idmef_additional_data_t object. heartbeat : pointer to a idmef_heartbeat_t object. additional_data_cur : pointer to a idmef_additional_data_t object. Returns : the next idmef_additional_data_t in the list. idmef_heartbeat_set_additional_data () idmef_heartbeat_set_additional_datavoid idmef_heartbeat_set_additional_data (idmef_heartbeat_t *ptr, idmef_additional_data_t *object, int pos); Add object to position pos of ptr list of idmef_additional_data_t object. If pos is IDMEF_LIST_APPEND, object will be inserted at the tail of the list. If pos is IDMEF_LIST_PREPEND, object will be inserted at the head of the list. ptr : pointer to a idmef_heartbeat_t object. object : pointer to a idmef_additional_data_t object. pos : Position in the list. idmef_heartbeat_new_additional_data () idmef_heartbeat_new_additional_dataint idmef_heartbeat_new_additional_data (idmef_heartbeat_t *ptr, idmef_additional_data_t **ret, int pos); Create a new idmef_additional_data_t children of ptr, and add it to position pos of ptr list of idmef_additional_data_t object. The created idmef_additional_data_t object is stored in ret. If pos is IDMEF_LIST_APPEND, object will be inserted at the tail of the list. If pos is IDMEF_LIST_PREPEND, object will be inserted at the head of the list. ptr : pointer to a idmef_heartbeat_t object. ret : pointer to an address where to store the created idmef_additional_data_t object. pos : position in the list. Returns : 0 on success, or a negative value if an error occured. enum idmef_message_type_t idmef_message_type_ttypedef enum { IDMEF_MESSAGE_TYPE_ERROR = -1, IDMEF_MESSAGE_TYPE_ALERT = 1, IDMEF_MESSAGE_TYPE_HEARTBEAT = 2 } idmef_message_type_t; idmef_message_type_to_numeric () idmef_message_type_to_numericidmef_message_type_t idmef_message_type_to_numeric (const char *name); name : pointer to an IDMEF string representation of a idmef_message_type_t value. Returns : the numeric equivalent of name, or -1 if name is not valid. idmef_message_type_to_string () idmef_message_type_to_stringconst char * idmef_message_type_to_string (idmef_message_type_t val); Return the IDMEF string equivalent of val provided idmef_message_type_t value. val : an enumeration value for idmef_message_type_t. Returns : a pointer to the string describing val, or NULL if val is invalid. idmef_message_t idmef_message_ttypedef struct idmef_message idmef_message_t; idmef_message_new () idmef_message_newint idmef_message_new (idmef_message_t **ret); Create a new idmef_message_t object. ret : Pointer where to store the created idmef_message_t object. Returns : 0 on success, a negative value if an error occured. idmef_message_copy () idmef_message_copyint idmef_message_copy (const idmef_message_t *src, idmef_message_t *dst); Copy a new idmef_message_t object from src to dst. src : Source of the copy. dst : Where to copy the object. Returns : 0 on success, a negative value if an error occured. idmef_message_clone () idmef_message_cloneint idmef_message_clone (idmef_message_t *src, idmef_message_t **dst); Create a copy of src, and store it in dst. src : Object to be cloned. dst : Address where to store the pointer to the cloned object. Returns : 0 on success, a negative value if an error occured. idmef_message_ref () idmef_message_refidmef_message_t * idmef_message_ref (idmef_message_t *message); Increase message reference count, so that it can be referenced multiple time. message : pointer to a idmef_message_t object. Returns : a pointer to message. idmef_message_destroy () idmef_message_destroyvoid idmef_message_destroy (idmef_message_t *ptr); Destroy ptr and all of it's children. The objects are only destroyed if their reference count reach zero. ptr : pointer to a idmef_message_t object. idmef_message_get_version () idmef_message_get_versionprelude_string_t * idmef_message_get_version (idmef_message_t *ptr); ptr : Returns : idmef_message_set_version () idmef_message_set_versionvoid idmef_message_set_version (idmef_message_t *ptr, prelude_string_t *version); Set version object as a children of ptr. if ptr already contain an version object, then it is destroyed, and updated to point to the provided version object. ptr : pointer to a idmef_message_t object. version : pointer to a prelude_string_t object. idmef_message_new_version () idmef_message_new_versionint idmef_message_new_version (idmef_message_t *ptr, prelude_string_t **ret); Create a new version object, children of idmef_message_t. If ptr already contain a prelude_string_t object, then it is destroyed. ptr : pointer to a idmef_message_t object. ret : pointer to an address where to store the created prelude_string_t object. Returns : 0 on success, or a negative value if an error occured. idmef_message_get_type () idmef_message_get_typeidmef_message_type_t idmef_message_get_type (idmef_message_t *ptr); Access the type children of ptr. ptr : pointer to a idmef_message_t object. Returns : a pointer to the idmef_message_type_t children, or NULL if it is not set. idmef_message_get_alert () idmef_message_get_alertidmef_alert_t * idmef_message_get_alert (idmef_message_t *ptr); Access the alert children of ptr. ptr : pointer to a idmef_message_t object. Returns : a pointer to the idmef_alert_t children, or NULL if it is not set. idmef_message_set_alert () idmef_message_set_alertvoid idmef_message_set_alert (idmef_message_t *ptr, idmef_alert_t *alert); Set alert object as a children of ptr. if ptr already contain a alert object, then it is destroyed, and updated to point to the provided alert object. ptr : pointer to a idmef_message_t object. alert : pointer to a idmef_alert_t object. idmef_message_new_alert () idmef_message_new_alertint idmef_message_new_alert (idmef_message_t *ptr, idmef_alert_t **ret); Create a new idmef_alert_t object, children of idmef_message_t. If ptr already contain a idmef_alert_t object, then it is destroyed. ptr : pointer to a idmef_message_t object. ret : pointer where to store the created idmef_alert_t object. Returns : 0 on success, or a negative value if an error occured. idmef_message_get_heartbeat () idmef_message_get_heartbeatidmef_heartbeat_t * idmef_message_get_heartbeat (idmef_message_t *ptr); Access the heartbeat children of ptr. ptr : pointer to a idmef_message_t object. Returns : a pointer to the idmef_heartbeat_t children, or NULL if it is not set. idmef_message_set_heartbeat () idmef_message_set_heartbeatvoid idmef_message_set_heartbeat (idmef_message_t *ptr, idmef_heartbeat_t *heartbeat); Set heartbeat object as a children of ptr. if ptr already contain a heartbeat object, then it is destroyed, and updated to point to the provided heartbeat object. ptr : pointer to a idmef_message_t object. heartbeat : pointer to a idmef_heartbeat_t object. idmef_message_new_heartbeat () idmef_message_new_heartbeatint idmef_message_new_heartbeat (idmef_message_t *ptr, idmef_heartbeat_t **ret); Create a new idmef_heartbeat_t object, children of idmef_message_t. If ptr already contain a idmef_heartbeat_t object, then it is destroyed. ptr : pointer to a idmef_message_t object. ret : pointer where to store the created idmef_heartbeat_t object. Returns : 0 on success, or a negative value if an error occured. idmef_message_set_pmsg () idmef_message_set_pmsgvoid idmef_message_set_pmsg (idmef_message_t *message, prelude_msg_t *msg); message : msg : idmef_message_get_pmsg () idmef_message_get_pmsgprelude_msg_t * idmef_message_get_pmsg (idmef_message_t *message); message : Returns : idmef_action_compare () idmef_action_compareint idmef_action_compare (const idmef_action_t *obj1, const idmef_action_t *obj2); Compare obj1 with obj2. obj1 : Object to compare with obj2. obj2 : Object to compare with obj1. Returns : 0 on match, a negative value on comparison failure. idmef_additional_data_compare () idmef_additional_data_compareint idmef_additional_data_compare (const idmef_additional_data_t *obj1, const idmef_additional_data_t *obj2); Compare obj1 with obj2. obj1 : Object to compare with obj2. obj2 : Object to compare with obj1. Returns : 0 on match, a negative value on comparison failure. idmef_address_compare () idmef_address_compareint idmef_address_compare (const idmef_address_t *obj1, const idmef_address_t *obj2); Compare obj1 with obj2. obj1 : Object to compare with obj2. obj2 : Object to compare with obj1. Returns : 0 on match, a negative value on comparison failure. idmef_alert_compare () idmef_alert_compareint idmef_alert_compare (const idmef_alert_t *obj1, const idmef_alert_t *obj2); Compare obj1 with obj2. obj1 : Object to compare with obj2. obj2 : Object to compare with obj1. Returns : 0 on match, a negative value on comparison failure. idmef_alertident_compare () idmef_alertident_compareint idmef_alertident_compare (const idmef_alertident_t *obj1, const idmef_alertident_t *obj2); Compare obj1 with obj2. obj1 : Object to compare with obj2. obj2 : Object to compare with obj1. Returns : 0 on match, a negative value on comparison failure. idmef_analyzer_compare () idmef_analyzer_compareint idmef_analyzer_compare (const idmef_analyzer_t *obj1, const idmef_analyzer_t *obj2); Compare obj1 with obj2. obj1 : Object to compare with obj2. obj2 : Object to compare with obj1. Returns : 0 on match, a negative value on comparison failure. idmef_assessment_compare () idmef_assessment_compareint idmef_assessment_compare (const idmef_assessment_t *obj1, const idmef_assessment_t *obj2); Compare obj1 with obj2. obj1 : Object to compare with obj2. obj2 : Object to compare with obj1. Returns : 0 on match, a negative value on comparison failure. idmef_checksum_compare () idmef_checksum_compareint idmef_checksum_compare (const idmef_checksum_t *obj1, const idmef_checksum_t *obj2); Compare obj1 with obj2. obj1 : Object to compare with obj2. obj2 : Object to compare with obj1. Returns : 0 on match, a negative value on comparison failure. idmef_classification_compare () idmef_classification_compareint idmef_classification_compare (const idmef_classification_t *obj1, const idmef_classification_t *obj2); Compare obj1 with obj2. obj1 : Object to compare with obj2. obj2 : Object to compare with obj1. Returns : 0 on match, a negative value on comparison failure. idmef_confidence_compare () idmef_confidence_compareint idmef_confidence_compare (const idmef_confidence_t *obj1, const idmef_confidence_t *obj2); Compare obj1 with obj2. obj1 : Object to compare with obj2. obj2 : Object to compare with obj1. Returns : 0 on match, a negative value on comparison failure. idmef_correlation_alert_compare () idmef_correlation_alert_compareint idmef_correlation_alert_compare (const idmef_correlation_alert_t *obj1, const idmef_correlation_alert_t *obj2); Compare obj1 with obj2. obj1 : Object to compare with obj2. obj2 : Object to compare with obj1. Returns : 0 on match, a negative value on comparison failure. idmef_data_compare () idmef_data_compareint idmef_data_compare (const idmef_data_t *data1, const idmef_data_t *data2); data1 : data2 : Returns : idmef_file_access_compare () idmef_file_access_compareint idmef_file_access_compare (const idmef_file_access_t *obj1, const idmef_file_access_t *obj2); Compare obj1 with obj2. obj1 : Object to compare with obj2. obj2 : Object to compare with obj1. Returns : 0 on match, a negative value on comparison failure. idmef_file_compare () idmef_file_compareint idmef_file_compare (const idmef_file_t *obj1, const idmef_file_t *obj2); Compare obj1 with obj2. obj1 : Object to compare with obj2. obj2 : Object to compare with obj1. Returns : 0 on match, a negative value on comparison failure. idmef_heartbeat_compare () idmef_heartbeat_compareint idmef_heartbeat_compare (const idmef_heartbeat_t *obj1, const idmef_heartbeat_t *obj2); Compare obj1 with obj2. obj1 : Object to compare with obj2. obj2 : Object to compare with obj1. Returns : 0 on match, a negative value on comparison failure. idmef_impact_compare () idmef_impact_compareint idmef_impact_compare (const idmef_impact_t *obj1, const idmef_impact_t *obj2); Compare obj1 with obj2. obj1 : Object to compare with obj2. obj2 : Object to compare with obj1. Returns : 0 on match, a negative value on comparison failure. idmef_inode_compare () idmef_inode_compareint idmef_inode_compare (const idmef_inode_t *obj1, const idmef_inode_t *obj2); Compare obj1 with obj2. obj1 : Object to compare with obj2. obj2 : Object to compare with obj1. Returns : 0 on match, a negative value on comparison failure. idmef_linkage_compare () idmef_linkage_compareint idmef_linkage_compare (const idmef_linkage_t *obj1, const idmef_linkage_t *obj2); Compare obj1 with obj2. obj1 : Object to compare with obj2. obj2 : Object to compare with obj1. Returns : 0 on match, a negative value on comparison failure. idmef_message_compare () idmef_message_compareint idmef_message_compare (const idmef_message_t *obj1, const idmef_message_t *obj2); Compare obj1 with obj2. obj1 : Object to compare with obj2. obj2 : Object to compare with obj1. Returns : 0 on match, a negative value on comparison failure. idmef_node_compare () idmef_node_compareint idmef_node_compare (const idmef_node_t *obj1, const idmef_node_t *obj2); Compare obj1 with obj2. obj1 : Object to compare with obj2. obj2 : Object to compare with obj1. Returns : 0 on match, a negative value on comparison failure. idmef_overflow_alert_compare () idmef_overflow_alert_compareint idmef_overflow_alert_compare (const idmef_overflow_alert_t *obj1, const idmef_overflow_alert_t *obj2); Compare obj1 with obj2. obj1 : Object to compare with obj2. obj2 : Object to compare with obj1. Returns : 0 on match, a negative value on comparison failure. idmef_process_compare () idmef_process_compareint idmef_process_compare (const idmef_process_t *obj1, const idmef_process_t *obj2); Compare obj1 with obj2. obj1 : Object to compare with obj2. obj2 : Object to compare with obj1. Returns : 0 on match, a negative value on comparison failure. idmef_reference_compare () idmef_reference_compareint idmef_reference_compare (const idmef_reference_t *obj1, const idmef_reference_t *obj2); Compare obj1 with obj2. obj1 : Object to compare with obj2. obj2 : Object to compare with obj1. Returns : 0 on match, a negative value on comparison failure. idmef_service_compare () idmef_service_compareint idmef_service_compare (const idmef_service_t *obj1, const idmef_service_t *obj2); Compare obj1 with obj2. obj1 : Object to compare with obj2. obj2 : Object to compare with obj1. Returns : 0 on match, a negative value on comparison failure. idmef_snmp_service_compare () idmef_snmp_service_compareint idmef_snmp_service_compare (const idmef_snmp_service_t *obj1, const idmef_snmp_service_t *obj2); Compare obj1 with obj2. obj1 : Object to compare with obj2. obj2 : Object to compare with obj1. Returns : 0 on match, a negative value on comparison failure. idmef_source_compare () idmef_source_compareint idmef_source_compare (const idmef_source_t *obj1, const idmef_source_t *obj2); Compare obj1 with obj2. obj1 : Object to compare with obj2. obj2 : Object to compare with obj1. Returns : 0 on match, a negative value on comparison failure. idmef_target_compare () idmef_target_compareint idmef_target_compare (const idmef_target_t *obj1, const idmef_target_t *obj2); Compare obj1 with obj2. obj1 : Object to compare with obj2. obj2 : Object to compare with obj1. Returns : 0 on match, a negative value on comparison failure. idmef_time_compare () idmef_time_compareint idmef_time_compare (const idmef_time_t *time1, const idmef_time_t *time2); time1 : Pointer to an idmef_time_t object to compare with time2. time2 : Pointer to an idmef_time_t object to compare with time1. Returns : 0 if time1 and time2 match, 1 if time1 is greater than time2, -1 if time1 is lesser than time2. idmef_tool_alert_compare () idmef_tool_alert_compareint idmef_tool_alert_compare (const idmef_tool_alert_t *obj1, const idmef_tool_alert_t *obj2); Compare obj1 with obj2. obj1 : Object to compare with obj2. obj2 : Object to compare with obj1. Returns : 0 on match, a negative value on comparison failure. idmef_user_compare () idmef_user_compareint idmef_user_compare (const idmef_user_t *obj1, const idmef_user_t *obj2); Compare obj1 with obj2. obj1 : Object to compare with obj2. obj2 : Object to compare with obj1. Returns : 0 on match, a negative value on comparison failure. idmef_user_id_compare () idmef_user_id_compareint idmef_user_id_compare (const idmef_user_id_t *obj1, const idmef_user_id_t *obj2); Compare obj1 with obj2. obj1 : Object to compare with obj2. obj2 : Object to compare with obj1. Returns : 0 on match, a negative value on comparison failure. idmef_web_service_compare () idmef_web_service_compareint idmef_web_service_compare (const idmef_web_service_t *obj1, const idmef_web_service_t *obj2); Compare obj1 with obj2. obj1 : Object to compare with obj2. obj2 : Object to compare with obj1. Returns : 0 on match, a negative value on comparison failure. IDMEF_CLASS_ID_ADDITIONAL_DATA_TYPE IDMEF_CLASS_ID_ADDITIONAL_DATA_TYPE#define IDMEF_CLASS_ID_ADDITIONAL_DATA_TYPE 3 IDMEF_CLASS_ID_ADDITIONAL_DATA IDMEF_CLASS_ID_ADDITIONAL_DATA#define IDMEF_CLASS_ID_ADDITIONAL_DATA 4 IDMEF_CLASS_ID_REFERENCE_ORIGIN IDMEF_CLASS_ID_REFERENCE_ORIGIN#define IDMEF_CLASS_ID_REFERENCE_ORIGIN 5 IDMEF_CLASS_ID_REFERENCE IDMEF_CLASS_ID_REFERENCE#define IDMEF_CLASS_ID_REFERENCE 50 IDMEF_CLASS_ID_CLASSIFICATION IDMEF_CLASS_ID_CLASSIFICATION#define IDMEF_CLASS_ID_CLASSIFICATION 6 IDMEF_CLASS_ID_USER_ID_TYPE IDMEF_CLASS_ID_USER_ID_TYPE#define IDMEF_CLASS_ID_USER_ID_TYPE 7 IDMEF_CLASS_ID_USER_ID IDMEF_CLASS_ID_USER_ID#define IDMEF_CLASS_ID_USER_ID 8 IDMEF_CLASS_ID_USER_CATEGORY IDMEF_CLASS_ID_USER_CATEGORY#define IDMEF_CLASS_ID_USER_CATEGORY 9 IDMEF_CLASS_ID_USER IDMEF_CLASS_ID_USER#define IDMEF_CLASS_ID_USER 10 IDMEF_CLASS_ID_ADDRESS_CATEGORY IDMEF_CLASS_ID_ADDRESS_CATEGORY#define IDMEF_CLASS_ID_ADDRESS_CATEGORY 11 IDMEF_CLASS_ID_ADDRESS IDMEF_CLASS_ID_ADDRESS#define IDMEF_CLASS_ID_ADDRESS 12 IDMEF_CLASS_ID_PROCESS IDMEF_CLASS_ID_PROCESS#define IDMEF_CLASS_ID_PROCESS 13 IDMEF_CLASS_ID_WEB_SERVICE IDMEF_CLASS_ID_WEB_SERVICE#define IDMEF_CLASS_ID_WEB_SERVICE 14 IDMEF_CLASS_ID_SNMP_SERVICE IDMEF_CLASS_ID_SNMP_SERVICE#define IDMEF_CLASS_ID_SNMP_SERVICE 15 IDMEF_CLASS_ID_SERVICE_TYPE IDMEF_CLASS_ID_SERVICE_TYPE#define IDMEF_CLASS_ID_SERVICE_TYPE 16 IDMEF_CLASS_ID_SERVICE IDMEF_CLASS_ID_SERVICE#define IDMEF_CLASS_ID_SERVICE 17 IDMEF_CLASS_ID_NODE_CATEGORY IDMEF_CLASS_ID_NODE_CATEGORY#define IDMEF_CLASS_ID_NODE_CATEGORY 18 IDMEF_CLASS_ID_NODE IDMEF_CLASS_ID_NODE#define IDMEF_CLASS_ID_NODE 19 IDMEF_CLASS_ID_SOURCE_SPOOFED IDMEF_CLASS_ID_SOURCE_SPOOFED#define IDMEF_CLASS_ID_SOURCE_SPOOFED 20 IDMEF_CLASS_ID_SOURCE IDMEF_CLASS_ID_SOURCE#define IDMEF_CLASS_ID_SOURCE 21 IDMEF_CLASS_ID_FILE_ACCESS IDMEF_CLASS_ID_FILE_ACCESS#define IDMEF_CLASS_ID_FILE_ACCESS 22 IDMEF_CLASS_ID_INODE IDMEF_CLASS_ID_INODE#define IDMEF_CLASS_ID_INODE 23 IDMEF_CLASS_ID_CHECKSUM_ALGORITHM IDMEF_CLASS_ID_CHECKSUM_ALGORITHM#define IDMEF_CLASS_ID_CHECKSUM_ALGORITHM 53 IDMEF_CLASS_ID_CHECKSUM IDMEF_CLASS_ID_CHECKSUM#define IDMEF_CLASS_ID_CHECKSUM 52 IDMEF_CLASS_ID_FILE_CATEGORY IDMEF_CLASS_ID_FILE_CATEGORY#define IDMEF_CLASS_ID_FILE_CATEGORY 24 IDMEF_CLASS_ID_FILE_FSTYPE IDMEF_CLASS_ID_FILE_FSTYPE#define IDMEF_CLASS_ID_FILE_FSTYPE 25 IDMEF_CLASS_ID_FILE IDMEF_CLASS_ID_FILE#define IDMEF_CLASS_ID_FILE 26 IDMEF_CLASS_ID_LINKAGE_CATEGORY IDMEF_CLASS_ID_LINKAGE_CATEGORY#define IDMEF_CLASS_ID_LINKAGE_CATEGORY 27 IDMEF_CLASS_ID_LINKAGE IDMEF_CLASS_ID_LINKAGE#define IDMEF_CLASS_ID_LINKAGE 28 IDMEF_CLASS_ID_TARGET_DECOY IDMEF_CLASS_ID_TARGET_DECOY#define IDMEF_CLASS_ID_TARGET_DECOY 29 IDMEF_CLASS_ID_TARGET IDMEF_CLASS_ID_TARGET#define IDMEF_CLASS_ID_TARGET 30 IDMEF_CLASS_ID_ANALYZER IDMEF_CLASS_ID_ANALYZER#define IDMEF_CLASS_ID_ANALYZER 31 IDMEF_CLASS_ID_ALERTIDENT IDMEF_CLASS_ID_ALERTIDENT#define IDMEF_CLASS_ID_ALERTIDENT 32 IDMEF_CLASS_ID_IMPACT_SEVERITY IDMEF_CLASS_ID_IMPACT_SEVERITY#define IDMEF_CLASS_ID_IMPACT_SEVERITY 33 IDMEF_CLASS_ID_IMPACT_COMPLETION IDMEF_CLASS_ID_IMPACT_COMPLETION#define IDMEF_CLASS_ID_IMPACT_COMPLETION 34 IDMEF_CLASS_ID_IMPACT_TYPE IDMEF_CLASS_ID_IMPACT_TYPE#define IDMEF_CLASS_ID_IMPACT_TYPE 35 IDMEF_CLASS_ID_IMPACT IDMEF_CLASS_ID_IMPACT#define IDMEF_CLASS_ID_IMPACT 36 IDMEF_CLASS_ID_ACTION_CATEGORY IDMEF_CLASS_ID_ACTION_CATEGORY#define IDMEF_CLASS_ID_ACTION_CATEGORY 37 IDMEF_CLASS_ID_ACTION IDMEF_CLASS_ID_ACTION#define IDMEF_CLASS_ID_ACTION 38 IDMEF_CLASS_ID_CONFIDENCE_RATING IDMEF_CLASS_ID_CONFIDENCE_RATING#define IDMEF_CLASS_ID_CONFIDENCE_RATING 39 IDMEF_CLASS_ID_CONFIDENCE IDMEF_CLASS_ID_CONFIDENCE#define IDMEF_CLASS_ID_CONFIDENCE 40 IDMEF_CLASS_ID_ASSESSMENT IDMEF_CLASS_ID_ASSESSMENT#define IDMEF_CLASS_ID_ASSESSMENT 41 IDMEF_CLASS_ID_TOOL_ALERT IDMEF_CLASS_ID_TOOL_ALERT#define IDMEF_CLASS_ID_TOOL_ALERT 42 IDMEF_CLASS_ID_CORRELATION_ALERT IDMEF_CLASS_ID_CORRELATION_ALERT#define IDMEF_CLASS_ID_CORRELATION_ALERT 43 IDMEF_CLASS_ID_OVERFLOW_ALERT IDMEF_CLASS_ID_OVERFLOW_ALERT#define IDMEF_CLASS_ID_OVERFLOW_ALERT 44 IDMEF_CLASS_ID_ALERT_TYPE IDMEF_CLASS_ID_ALERT_TYPE#define IDMEF_CLASS_ID_ALERT_TYPE 45 IDMEF_CLASS_ID_ALERT IDMEF_CLASS_ID_ALERT#define IDMEF_CLASS_ID_ALERT 46 IDMEF_CLASS_ID_HEARTBEAT IDMEF_CLASS_ID_HEARTBEAT#define IDMEF_CLASS_ID_HEARTBEAT 47 IDMEF_CLASS_ID_MESSAGE_TYPE IDMEF_CLASS_ID_MESSAGE_TYPE#define IDMEF_CLASS_ID_MESSAGE_TYPE 48 IDMEF_CLASS_ID_MESSAGE IDMEF_CLASS_ID_MESSAGE#define IDMEF_CLASS_ID_MESSAGE 49 See Also idmef_path_t for the high level IDMEF API. libprelude-1.0.0/docs/api/xml/prelude-string.xml0000664000076400007640000014617311347714756016614 00000000000000 prelude-string 3 LIBPRELUDE Library prelude-string Synopsis typedef prelude_string_t; int prelude_string_new (prelude_string_t **string); int prelude_string_new_nodup (prelude_string_t **string, char *str); int prelude_string_new_ref (prelude_string_t **string, const char *str); int prelude_string_new_dup (prelude_string_t **string, const char *str); int prelude_string_new_dup_fast (prelude_string_t **string, const char *str, size_t len); void prelude_string_destroy (prelude_string_t *string); void prelude_string_destroy_internal (prelude_string_t *string); int prelude_string_new_nodup_fast (prelude_string_t **string, char *str, size_t len); int prelude_string_new_ref_fast (prelude_string_t **string, const char *str, size_t len); int prelude_string_set_dup_fast (prelude_string_t *string, const char *buf, size_t len); int prelude_string_set_dup (prelude_string_t *string, const char *buf); int prelude_string_set_nodup_fast (prelude_string_t *string, char *buf, size_t len); int prelude_string_set_nodup (prelude_string_t *string, char *buf); int prelude_string_set_ref_fast (prelude_string_t *string, const char *buf, size_t len); int prelude_string_set_ref (prelude_string_t *string, const char *buf); int prelude_string_copy_ref (const prelude_string_t *src, prelude_string_t *dst); int prelude_string_copy_dup (const prelude_string_t *src, prelude_string_t *dst); prelude_string_t * prelude_string_ref (prelude_string_t *string); int prelude_string_clone (const prelude_string_t *src, prelude_string_t **dst); size_t prelude_string_get_len (const prelude_string_t *string); const char * prelude_string_get_string_or_default (const prelude_string_t *string, const char *def); const char * prelude_string_get_string (const prelude_string_t *string); int prelude_string_get_string_released (prelude_string_t *string, char **outptr); prelude_bool_t prelude_string_is_empty (const prelude_string_t *string); void prelude_string_clear (prelude_string_t *string); int prelude_string_cat (prelude_string_t *dst, const char *str); int prelude_string_ncat (prelude_string_t *dst, const char *str, size_t len); int prelude_string_sprintf (prelude_string_t *string, const char *fmt, ...); int prelude_string_vprintf (prelude_string_t *string, const char *fmt, va_list ap); #define prelude_string_set_constant (string, str) #define prelude_string_new_constant (string, str) int prelude_string_compare (const prelude_string_t *str1, const prelude_string_t *str2); Description Details prelude_string_t prelude_string_ttypedef struct prelude_string prelude_string_t; prelude_string_new () prelude_string_newint prelude_string_new (prelude_string_t **string); Create a new prelude_string_t object, and store in in string. string : Pointer where to store the created prelude_string_t. Returns : 0 on success, or a negative value if an error occured. prelude_string_new_nodup () prelude_string_new_nodupint prelude_string_new_nodup (prelude_string_t **string, char *str); Create a new prelude_string_t object with a reference to str as initial value. str is owned by string and will be freed upon prelude_string_destroy(). string : Pointer where to store the created prelude_string_t object. str : Initial string value. Returns : 0 on success, a negative value if an error occured. prelude_string_new_ref () prelude_string_new_refint prelude_string_new_ref (prelude_string_t **string, const char *str); Create a new prelude_string_t object with a reference to str as initial value. str won't be freed upon prelude_string_destroy(). string : Pointer where to store the created prelude_string_t object. str : Initial string value. Returns : 0 on success, a negative value if an error occured. prelude_string_new_dup () prelude_string_new_dupint prelude_string_new_dup (prelude_string_t **string, const char *str); Create a new prelude_string_t object with a copy of str as it's initial value. The copy is owned by the string and will be freed upon prelude_string_destroy(). string : Pointer where to store the created prelude_string_t object. str : Initial string value. Returns : 0 on success, a negative value if an error occured. prelude_string_new_dup_fast () prelude_string_new_dup_fastint prelude_string_new_dup_fast (prelude_string_t **string, const char *str, size_t len); Create a new prelude_string_t object with a copy of str as it's initial value. The copy is owned by the string and will be freed upon prelude_string_destroy(). string : Pointer where to store the created prelude_string_t object. str : Initial string value. len : Lenght of str. Returns : 0 on success, a negative value if an error occured. prelude_string_destroy () prelude_string_destroyvoid prelude_string_destroy (prelude_string_t *string); Decrease refcount and destroy string. string content content is destroyed if applicable (dup and nodup, or a referenced string that have been modified. string : Pointer to a prelude_string_t object. prelude_string_destroy_internal () prelude_string_destroy_internalvoid prelude_string_destroy_internal (prelude_string_t *string); string : prelude_string_new_nodup_fast () prelude_string_new_nodup_fastint prelude_string_new_nodup_fast (prelude_string_t **string, char *str, size_t len); Create a new prelude_string_t object with a reference to str as initial value. str is owned by string and will be freed upon prelude_string_destroy(). string : Pointer where to store the created prelude_string_t object. str : Initial string value. len : Lenght of str. Returns : 0 on success, a negative value if an error occured. prelude_string_new_ref_fast () prelude_string_new_ref_fastint prelude_string_new_ref_fast (prelude_string_t **string, const char *str, size_t len); Create a new prelude_string_t object with a reference to str as initial value. str won't be freed upon prelude_string_destroy(). string : Pointer where to store the created prelude_string_t object. str : Initial string value. len : Length of str. Returns : 0 on success, a negative value if an error occured. prelude_string_set_dup_fast () prelude_string_set_dup_fastint prelude_string_set_dup_fast (prelude_string_t *string, const char *buf, size_t len); Store a copy of the string pointed by buf in string. The buf copy will be freed upon prelude_string_destroy(). string : Pointer to a prelude_string_t object. buf : String to store in string. len : Lenght of buf. Returns : 0 on success, or a negative value if an error occured. prelude_string_set_dup () prelude_string_set_dupint prelude_string_set_dup (prelude_string_t *string, const char *buf); Store a copy of the string pointed by buf in string. The buf copy will be freed upon prelude_string_destroy(). string : Pointer to a prelude_string_t object. buf : String to store in string. Returns : 0 on success, or a negative value if an error occured. prelude_string_set_nodup_fast () prelude_string_set_nodup_fastint prelude_string_set_nodup_fast (prelude_string_t *string, char *buf, size_t len); Store a reference to the string pointed by buf in string. The referenced buf will be freed upon prelude_string_destroy(). string : Pointer to a prelude_string_t object. buf : String to store in string. len : Lenght of buf. Returns : 0 on success, or a negative value if an error occured. prelude_string_set_nodup () prelude_string_set_nodupint prelude_string_set_nodup (prelude_string_t *string, char *buf); Store a reference to the string pointed by buf in string. The referenced buf will be freed upon prelude_string_destroy(). string : Pointer to a prelude_string_t object. buf : String to store in string. Returns : 0 on success, or a negative value if an error occured. prelude_string_set_ref_fast () prelude_string_set_ref_fastint prelude_string_set_ref_fast (prelude_string_t *string, const char *buf, size_t len); Store a reference to the string pointed by buf in string. The referenced buf value won't be modified or freed. string : Pointer to a prelude_string_t object. buf : String to store in string. len : Lenght of buf. Returns : 0 on success, or a negative value if an error occured. prelude_string_set_ref () prelude_string_set_refint prelude_string_set_ref (prelude_string_t *string, const char *buf); Store a reference to the string pointed by buf in string. The referenced buf value won't be modified or freed. string : Pointer to a prelude_string_t object. buf : String to store in string. Returns : 0 on success, or a negative value if an error occured. prelude_string_copy_ref () prelude_string_copy_refint prelude_string_copy_ref (const prelude_string_t *src, prelude_string_t *dst); Reference src content within dst. The referenced content won't be modified or freed. src : Pointer to a prelude_string_t object to copy data from. dst : Pointer to a prelude_string_t object to copy data to. Returns : 0 on success, or a negative value if an error occured. prelude_string_copy_dup () prelude_string_copy_dupint prelude_string_copy_dup (const prelude_string_t *src, prelude_string_t *dst); Copy src content within dst. The content is owned by src and independent of dst. src : Pointer to a prelude_string_t object to copy data from. dst : Pointer to a prelude_string_t object to copy data to. Returns : 0 on success, or a negative value if an error occured. prelude_string_ref () prelude_string_refprelude_string_t * prelude_string_ref (prelude_string_t *string); Increase string reference count. string : Pointer to a prelude_string_t object to reference. Returns : string. prelude_string_clone () prelude_string_cloneint prelude_string_clone (const prelude_string_t *src, prelude_string_t **dst); Clone src within a new prelude_string_t object stored into dst. Data carried by dst and src are independant. src : Pointer to an existing prelude_string_t object. dst : Pointer to an address where to store the created prelude_string_t object. Returns : 0 on success, or a negative value if an error occured. prelude_string_get_len () prelude_string_get_lensize_t prelude_string_get_len (const prelude_string_t *string); Return the length of the string carried by string object. string : Pointer to a prelude_string_t object. Returns : The length of the string owned by string. prelude_string_get_string_or_default () prelude_string_get_string_or_defaultconst char * prelude_string_get_string_or_default (const prelude_string_t *string, const char *def); Return the string carried on by string object, or def if it is empty. There should be no operation done on the returned string since it is still owned by string. string : Pointer to a prelude_string_t object. def : Default value to a return in case string is empty. Returns : The string owned by string or def. prelude_string_get_string () prelude_string_get_stringconst char * prelude_string_get_string (const prelude_string_t *string); Return the string carried on by string object. There should be no operation done on the returned string since it is still owned by string. string : Pointer to a prelude_string_t object. Returns : The string owned by string if any. prelude_string_get_string_released () prelude_string_get_string_releasedint prelude_string_get_string_released (prelude_string_t *string, char **outptr); Get string content, and release it so that further operation on string won't modify the returned content. string : Pointer to a prelude_string_t object. outptr : Pointer to an address where to store the released string. Returns : 0 on success, or a negative value if an error occured. prelude_string_is_empty () prelude_string_is_emptyprelude_bool_t prelude_string_is_empty (const prelude_string_t *string); Check whether string is empty. string : Pointer to a prelude_string_t object. Returns : TRUE if string is empty, FALSE otherwise. prelude_string_clear () prelude_string_clearvoid prelude_string_clear (prelude_string_t *string); Reset string content to zero. string : Pointer to a prelude_string_t object. prelude_string_cat () prelude_string_catint prelude_string_cat (prelude_string_t *dst, const char *str); The prelude_string_cat() function appends the str string to the dst prelude_string_t object over-writing the `\0' character at the end of dst, and then adds a termi-nating `\0' character. dst : Pointer to a prelude_string_t object. str : Pointer to a string. Returns : len, or a negative value if an error occured. prelude_string_ncat () prelude_string_ncatint prelude_string_ncat (prelude_string_t *dst, const char *str, size_t len); dst : str : len : Returns : prelude_string_sprintf () prelude_string_sprintfint prelude_string_sprintf (prelude_string_t *string, const char *fmt, ...); Produce output according to fmt, and write output to the given string. See snprintf(3) to learn more about fmt format. string : Pointer to a prelude_string_t object. fmt : Format string to use. ... : Variable argument list. Returns : The number of characters written, or a negative value if an error occured. prelude_string_vprintf () prelude_string_vprintfint prelude_string_vprintf (prelude_string_t *string, const char *fmt, va_list ap); Produce output according to fmt, storing argument provided in ap variable argument list, and write the output to the given string. See sprintf(3) for more information on fmt format. string : Pointer to a prelude_string_t object. fmt : Format string to use. ap : Variable argument list. Returns : The number of characters written, or a negative value if an error occured. prelude_string_set_constant() prelude_string_set_constant#define prelude_string_set_constant(string, str) string : str : prelude_string_new_constant() prelude_string_new_constant#define prelude_string_new_constant(string, str) string : str : prelude_string_compare () prelude_string_compareint prelude_string_compare (const prelude_string_t *str1, const prelude_string_t *str2); str1 : Pointer to a prelude_string_t object to compare with str2. str2 : Pointer to a prelude_string_t object to compare with str1. Returns : 0 if str1 and str2 value are equal, a negative value otherwise. libprelude-1.0.0/docs/api/xml/prelude-option-wide.xml0000664000076400007640000002343711347714756017541 00000000000000 prelude-option-wide 3 LIBPRELUDE Library prelude-option-wide Synopsis #define PRELUDE_OPTION_REPLY_TYPE_SET #define PRELUDE_OPTION_REPLY_TYPE_GET #define PRELUDE_OPTION_REPLY_TYPE_LIST #define PRELUDE_OPTION_REPLY_TYPE_ERROR int prelude_option_push_request (prelude_msgbuf_t *msg, int type, const char *request); int prelude_option_new_request (prelude_msgbuf_t *msgbuf, uint32_t request_id, uint64_t *target_id, size_t size); int prelude_option_process_request (prelude_client_t *client, prelude_msg_t *msg, prelude_msgbuf_t *reply); int prelude_option_recv_reply (prelude_msg_t *msg, uint64_t *source_id, uint32_t *request_id, void **value); Description Details PRELUDE_OPTION_REPLY_TYPE_SET PRELUDE_OPTION_REPLY_TYPE_SET#define PRELUDE_OPTION_REPLY_TYPE_SET 0x01 PRELUDE_OPTION_REPLY_TYPE_GET PRELUDE_OPTION_REPLY_TYPE_GET#define PRELUDE_OPTION_REPLY_TYPE_GET 0x02 PRELUDE_OPTION_REPLY_TYPE_LIST PRELUDE_OPTION_REPLY_TYPE_LIST#define PRELUDE_OPTION_REPLY_TYPE_LIST 0x04 PRELUDE_OPTION_REPLY_TYPE_ERROR PRELUDE_OPTION_REPLY_TYPE_ERROR#define PRELUDE_OPTION_REPLY_TYPE_ERROR 0x08 prelude_option_push_request () prelude_option_push_requestint prelude_option_push_request (prelude_msgbuf_t *msg, int type, const char *request); msg : type : request : Returns : prelude_option_new_request () prelude_option_new_requestint prelude_option_new_request (prelude_msgbuf_t *msgbuf, uint32_t request_id, uint64_t *target_id, size_t size); msgbuf : request_id : target_id : size : Returns : prelude_option_process_request () prelude_option_process_requestint prelude_option_process_request (prelude_client_t *client, prelude_msg_t *msg, prelude_msgbuf_t *reply); client : msg : reply : Returns : prelude_option_recv_reply () prelude_option_recv_replyint prelude_option_recv_reply (prelude_msg_t *msg, uint64_t *source_id, uint32_t *request_id, void **value); msg : source_id : request_id : value : Returns : libprelude-1.0.0/docs/api/xml/prelude-timer.xml0000664000076400007640000002754511347714756016427 00000000000000 prelude-timer 3 LIBPRELUDE Library prelude-timer Synopsis prelude_timer_t; #define prelude_timer_get_expire (timer) #define prelude_timer_get_data (timer) #define prelude_timer_get_callback (timer) #define prelude_timer_set_expire (timer, x) #define prelude_timer_set_data (timer, x) #define prelude_timer_set_callback (timer, x) void prelude_timer_init (prelude_timer_t *timer); void prelude_timer_init_list (prelude_timer_t *timer); void prelude_timer_reset (prelude_timer_t *timer); void prelude_timer_destroy (prelude_timer_t *timer); void prelude_timer_wake_up (void); void prelude_timer_flush (void); void prelude_timer_lock_critical_region (void); void prelude_timer_unlock_critical_region (void); Description Details prelude_timer_t prelude_timer_ttypedef struct { prelude_list_t list; int expire; time_t start_time; void *data; void (*function)(void *data); } prelude_timer_t; prelude_timer_get_expire() prelude_timer_get_expire#define prelude_timer_get_expire(timer) (timer)->expire timer : prelude_timer_get_data() prelude_timer_get_data#define prelude_timer_get_data(timer) (timer)->data timer : prelude_timer_get_callback() prelude_timer_get_callback#define prelude_timer_get_callback(timer) (timer)->function timer : prelude_timer_set_expire() prelude_timer_set_expire#define prelude_timer_set_expire(timer, x) prelude_timer_get_expire((timer)) = (x) timer : x : prelude_timer_set_data() prelude_timer_set_data#define prelude_timer_set_data(timer, x) prelude_timer_get_data((timer)) = (x) timer : x : prelude_timer_set_callback() prelude_timer_set_callback#define prelude_timer_set_callback(timer, x) prelude_timer_get_callback((timer)) = (x) timer : x : prelude_timer_init () prelude_timer_initvoid prelude_timer_init (prelude_timer_t *timer); Initialize a timer (add it to the timer list). timer : timer to initialize. prelude_timer_init_list () prelude_timer_init_listvoid prelude_timer_init_list (prelude_timer_t *timer); Initialize timer list member. This is useful if you're going to call prelude_timer_destroy() on timer for which prelude_timer_init() was never called. timer : Pointer to a prelude_timer_t object. prelude_timer_reset () prelude_timer_resetvoid prelude_timer_reset (prelude_timer_t *timer); Reset timer 'timer', as if it was just started. timer : the timer to reset. prelude_timer_destroy () prelude_timer_destroyvoid prelude_timer_destroy (prelude_timer_t *timer); Destroy the timer 'timer', this remove it from the active timer list. timer : the timer to destroy. prelude_timer_wake_up () prelude_timer_wake_upvoid prelude_timer_wake_up (void); Wake up timer that need it. This function should be called every second to work properly. prelude_timer_flush () prelude_timer_flushvoid prelude_timer_flush (void); Expire every timer. prelude_timer_lock_critical_region () prelude_timer_lock_critical_regionvoid prelude_timer_lock_critical_region (void); Deactivate timer wake-up until timer_unlock_critical_region() is called. prelude_timer_unlock_critical_region () prelude_timer_unlock_critical_regionvoid prelude_timer_unlock_critical_region (void); Reactivate timer wake-up after timer_lock_critical_regions() has been called. libprelude-1.0.0/docs/api/xml/prelude.xml0000664000076400007640000001676411347714756015312 00000000000000 prelude 3 LIBPRELUDE Library prelude Initializing the library Synopsis #define LIBPRELUDE_VERSION int prelude_init (int *argc, char **argv); void prelude_deinit (void); const char * prelude_check_version (const char *req_version); int prelude_thread_init (void *nil); void prelude_fork_child (void); void prelude_fork_parent (void); void prelude_fork_prepare (void); Description Before any operation are done using the prelude library, the user first need to initialize it using the prelude_init() function. int ret; ret = prelude_init(&argc, argv); if ( ret < 0 ) { prelude_perror(ret, "unable to initialize the prelude library"); return -1; } Details LIBPRELUDE_VERSION LIBPRELUDE_VERSION#define LIBPRELUDE_VERSION "1.0.0" prelude_init () prelude_initint prelude_init (int *argc, char **argv); Call this function before using any other Prelude functions in your applications. It will initialize everything needed to operate the library and parses some standard command line options. argc and argv are adjusted accordingly so your own code will never see those standard arguments. argc : Address of the argc parameter of your main() function. argv : Address of the argv parameter of your main() function. Returns : 0 on success, a negative value if an error occured. prelude_deinit () prelude_deinitvoid prelude_deinit (void); Call this function if you're done using the library and want to free global shared ressource allocated by libprelude. prelude_check_version () prelude_check_versionconst char * prelude_check_version (const char *req_version); If req_version is NULL this function will return the version of the library. Otherwise, req_version will be compared to the current library version. If the library version is higher or equal, this function will return the current library version. Otherwise, NULL is returned. req_version : The minimum acceptable version number. Returns : The current library version, or NULL if req_version doesn't match. prelude_thread_init () prelude_thread_initint prelude_thread_init (void *nil); nil : Returns : prelude_fork_child () prelude_fork_childvoid prelude_fork_child (void); prelude_fork_parent () prelude_fork_parentvoid prelude_fork_parent (void); prelude_fork_prepare () prelude_fork_preparevoid prelude_fork_prepare (void); libprelude-1.0.0/docs/api/xml/prelude-option.xml0000664000076400007640000024153211347714756016611 00000000000000 prelude-option 3 LIBPRELUDE Library prelude-option Synopsis enum prelude_option_type_t; enum prelude_option_input_type_t; typedef prelude_option_t; typedef prelude_option_context_t; int (*prelude_option_destroy_callback_t) (prelude_option_t *opt, prelude_string_t *out, void *context); int (*prelude_option_commit_callback_t) (prelude_option_t *opt, prelude_string_t *out, void *context); int (*prelude_option_get_callback_t) (prelude_option_t *opt, prelude_string_t *out, void *context); int (*prelude_option_set_callback_t) (prelude_option_t *opt, const char *optarg, prelude_string_t *err, void *context); enum prelude_option_argument_t; enum prelude_option_priority_t; enum prelude_option_warning_t; void prelude_option_set_priority (prelude_option_t *option, prelude_option_priority_t priority); void prelude_option_print (prelude_option_t *opt, prelude_option_type_t type, int descoff, FILE *fd); int prelude_option_wide_send_msg (prelude_msgbuf_t *msgbuf, void *context); void prelude_option_destroy (prelude_option_t *option); int prelude_option_read (prelude_option_t *option, const char **filename, int *argc, char **argv, prelude_string_t **err, void *context); int prelude_option_add (prelude_option_t *parent, prelude_option_t **retopt, prelude_option_type_t type, char shortopt, const char *longopt, const char *desc, prelude_option_argument_t has_arg, int (setprelude_option_t *opt, const char *optarg, prelude_string_t *err, void *context) (), int (getprelude_option_t *opt, prelude_string_t *out, void *context) ()); void prelude_option_set_type (prelude_option_t *opt, prelude_option_type_t type); prelude_option_type_t prelude_option_get_type (prelude_option_t *opt); void prelude_option_set_warnings (prelude_option_warning_t new_warnings, prelude_option_warning_t *old_warnings); char prelude_option_get_shortname (prelude_option_t *opt); const char * prelude_option_get_longname (prelude_option_t *opt); void prelude_option_set_data (prelude_option_t *opt, void *data); void * prelude_option_get_data (prelude_option_t *opt); void * prelude_option_context_get_data (prelude_option_context_t *oc); void prelude_option_context_set_data (prelude_option_context_t *oc, void *data); int prelude_option_invoke_commit (prelude_option_t *opt, const char *ctname, prelude_string_t *value, void *context); int prelude_option_invoke_set (prelude_option_t *opt, const char *ctname, prelude_string_t *value, void **context); int prelude_option_invoke_get (prelude_option_t *opt, const char *ctname, prelude_string_t *value, void *context); int prelude_option_invoke_destroy (prelude_option_t *opt, const char *ctname, prelude_string_t *value, void *context); int prelude_option_new_root (prelude_option_t **retopt); int prelude_option_new (prelude_option_t *parent, prelude_option_t **retopt); void prelude_option_set_longopt (prelude_option_t *opt, const char *longopt); const char * prelude_option_get_longopt (prelude_option_t *opt); void prelude_option_set_description (prelude_option_t *opt, const char *description); const char * prelude_option_get_description (prelude_option_t *opt); void prelude_option_set_has_arg (prelude_option_t *opt, prelude_option_argument_t has_arg); prelude_option_argument_t prelude_option_get_has_arg (prelude_option_t *opt); void prelude_option_set_value (prelude_option_t *opt, const char *value); const char * prelude_option_get_value (prelude_option_t *opt); void prelude_option_set_help (prelude_option_t *opt, const char *help); const char * prelude_option_get_help (prelude_option_t *opt); void prelude_option_set_input_validation_regex (prelude_option_t *opt, const char *regex); const char * prelude_option_get_input_validation_regex (prelude_option_t *opt); void prelude_option_set_input_type (prelude_option_t *opt, prelude_option_input_type_t input_type); prelude_option_input_type_t prelude_option_get_input_type (prelude_option_t *opt); prelude_list_t * prelude_option_get_optlist (prelude_option_t *opt); prelude_option_t * prelude_option_get_next (prelude_option_t *start, prelude_option_t *cur); prelude_bool_t prelude_option_has_optlist (prelude_option_t *opt); prelude_option_t * prelude_option_get_parent (prelude_option_t *opt); void prelude_option_set_destroy_callback (prelude_option_t *opt, prelude_option_destroy_callback_t destroy); prelude_option_destroy_callback_t prelude_option_get_destroy_callback (prelude_option_t *opt); void prelude_option_set_set_callback (prelude_option_t *opt, prelude_option_set_callback_t set); prelude_option_set_callback_t prelude_option_get_set_callback (prelude_option_t *opt); void prelude_option_set_get_callback (prelude_option_t *opt, int (getprelude_option_t *opt, prelude_string_t *out, void *context) ()); prelude_option_get_callback_t prelude_option_get_get_callback (prelude_option_t *opt); void prelude_option_set_commit_callback (prelude_option_t *opt, prelude_option_commit_callback_t commit); prelude_option_commit_callback_t prelude_option_get_commit_callback (prelude_option_t *opt); void prelude_option_set_default_context (prelude_option_t *opt, void *context); int prelude_option_new_context (prelude_option_t *opt, prelude_option_context_t **ctx, const char *name, void *data); void prelude_option_context_destroy (prelude_option_context_t *oc); prelude_option_t * prelude_option_search (prelude_option_t *parent, const char *name, prelude_option_type_t type, prelude_bool_t walk_children); prelude_option_context_t * prelude_option_search_context (prelude_option_t *opt, const char *name); Description Details enum prelude_option_type_t prelude_option_type_ttypedef enum { PRELUDE_OPTION_TYPE_CLI = 0x01, PRELUDE_OPTION_TYPE_CFG = 0x02, PRELUDE_OPTION_TYPE_WIDE = 0x04, PRELUDE_OPTION_TYPE_CONTEXT = 0x08, PRELUDE_OPTION_TYPE_ROOT = 0x10, PRELUDE_OPTION_TYPE_DESTROY = 0x20 } prelude_option_type_t; enum prelude_option_input_type_t prelude_option_input_type_ttypedef enum { PRELUDE_OPTION_INPUT_TYPE_STRING = 1, PRELUDE_OPTION_INPUT_TYPE_INTEGER = 2, PRELUDE_OPTION_INPUT_TYPE_BOOLEAN = 3 } prelude_option_input_type_t; prelude_option_t prelude_option_ttypedef struct prelude_option prelude_option_t; prelude_option_context_t prelude_option_context_ttypedef struct prelude_option_context prelude_option_context_t; prelude_option_destroy_callback_t () prelude_option_destroy_callback_tint (*prelude_option_destroy_callback_t) (prelude_option_t *opt, prelude_string_t *out, void *context); opt : out : context : Returns : prelude_option_commit_callback_t () prelude_option_commit_callback_tint (*prelude_option_commit_callback_t) (prelude_option_t *opt, prelude_string_t *out, void *context); opt : out : context : Returns : prelude_option_get_callback_t () prelude_option_get_callback_tint (*prelude_option_get_callback_t) (prelude_option_t *opt, prelude_string_t *out, void *context); opt : out : context : Returns : prelude_option_set_callback_t () prelude_option_set_callback_tint (*prelude_option_set_callback_t) (prelude_option_t *opt, const char *optarg, prelude_string_t *err, void *context); opt : optarg : err : context : Returns : enum prelude_option_argument_t prelude_option_argument_ttypedef enum { PRELUDE_OPTION_ARGUMENT_REQUIRED = 1, PRELUDE_OPTION_ARGUMENT_OPTIONAL = 2, PRELUDE_OPTION_ARGUMENT_NONE = 3 } prelude_option_argument_t; enum prelude_option_priority_t prelude_option_priority_ttypedef enum { PRELUDE_OPTION_PRIORITY_IMMEDIATE = -2, PRELUDE_OPTION_PRIORITY_FIRST = -1, PRELUDE_OPTION_PRIORITY_NONE = 0, PRELUDE_OPTION_PRIORITY_LAST = 2 } prelude_option_priority_t; enum prelude_option_warning_t prelude_option_warning_ttypedef enum { PRELUDE_OPTION_WARNING_OPTION = 0x1, PRELUDE_OPTION_WARNING_ARG = 0x2 } prelude_option_warning_t; prelude_option_set_priority () prelude_option_set_priorityvoid prelude_option_set_priority (prelude_option_t *option, prelude_option_priority_t priority); prelude_option_set_priority() can be used to associate a priority with an option. This can be used to solve dependancies problem within differents options. A priority of -1 mean an option will always be executed last (with all other option with a -1 priority). The default priority for an option is 0, the caller is responssible for the way it assign priority (knowing that highest priority are always executed first). option : Pointer on an option object. priority : Priority of the option object. prelude_option_print () prelude_option_printvoid prelude_option_print (prelude_option_t *opt, prelude_option_type_t type, int descoff, FILE *fd); Dump option available in opt and hooked to the given types. If opt is NULL, then the root of the option list is used. opt : Option(s) to print out. type : Only option with specified types will be printed. descoff : offset from the begining of the line where the description should start. fd : File descriptor where the option should be dumped. prelude_option_wide_send_msg () prelude_option_wide_send_msgint prelude_option_wide_send_msg (prelude_msgbuf_t *msgbuf, void *context); msgbuf : context : Returns : prelude_option_destroy () prelude_option_destroyvoid prelude_option_destroy (prelude_option_t *option); Destroy a prelude_option_t object and all data associated with it (including all suboption). option : Pointer on an option object. prelude_option_read () prelude_option_readint prelude_option_read (prelude_option_t *option, const char **filename, int *argc, char **argv, prelude_string_t **err, void *context); prelude_option_read(), parse the given argument and try to match them against option in option. If an option match, it's associated callback function is called with the eventual option argument if any. Option not matched on the command line are searched in the configuration file specified by filename. if option is NULL, all system option will be matched against argc, and argv. option : A pointer on an option (list). filename : Pointer to the config filename. argc : Number of argument. argv : Argument list. err : Pointer to a prelude_string_t object where to store an error string. context : Pointer to an optional option context. Returns : The index of the first unhandled parameter if option parsing succeeded, or a negative value if an error occured. prelude_option_add () prelude_option_addint prelude_option_add (prelude_option_t *parent, prelude_option_t **retopt, prelude_option_type_t type, char shortopt, const char *longopt, const char *desc, prelude_option_argument_t has_arg, int (setprelude_option_t *opt, const char *optarg, prelude_string_t *err, void *context) (), int (getprelude_option_t *opt, prelude_string_t *out, void *context) ()); prelude_option_add() create a new option. The option is set to be the child of parent, unless it is NULL. In this case the option is a root option. The type parameters can be set to PRELUDE_OPTION_TYPE_CLI (telling the option may be searched on the command line), PRELUDE_OPTION_TYPE_CFG (telling the option may be searched in the configuration file) or both. parent : Pointer on a parent option. retopt : Pointer where to store the created option. type : bitfields. shortopt : Short option name. longopt : Long option name. desc : Description of the option. has_arg : Define if the option has argument. set : Callback to be called when the value for this option change. get : Callback to be called to get the value for this option. Returns : Pointer on the option object, or NULL if an error occured. prelude_option_set_type () prelude_option_set_typevoid prelude_option_set_type (prelude_option_t *opt, prelude_option_type_t type); opt : type : prelude_option_get_type () prelude_option_get_typeprelude_option_type_t prelude_option_get_type (prelude_option_t *opt); opt : Returns : prelude_option_set_warnings () prelude_option_set_warningsvoid prelude_option_set_warnings (prelude_option_warning_t new_warnings, prelude_option_warning_t *old_warnings); Set current warnings flags to new_warnings. Uppon return, if not NULL, the pointer to old_warnings is updated to contain the old warnings. new_warnings : bitwise OR of prelude_option_warning_t. old_warnings : Pointer where to store the old prelude_option_warning_t to. prelude_option_get_shortname () prelude_option_get_shortnamechar prelude_option_get_shortname (prelude_option_t *opt); opt : Returns : prelude_option_get_longname () prelude_option_get_longnameconst char * prelude_option_get_longname (prelude_option_t *opt); opt : Returns : prelude_option_set_data () prelude_option_set_datavoid prelude_option_set_data (prelude_option_t *opt, void *data); opt : data : prelude_option_get_data () prelude_option_get_datavoid * prelude_option_get_data (prelude_option_t *opt); opt : Returns : prelude_option_context_get_data () prelude_option_context_get_datavoid * prelude_option_context_get_data (prelude_option_context_t *oc); oc : Returns : prelude_option_context_set_data () prelude_option_context_set_datavoid prelude_option_context_set_data (prelude_option_context_t *oc, void *data); oc : data : prelude_option_invoke_commit () prelude_option_invoke_commitint prelude_option_invoke_commit (prelude_option_t *opt, const char *ctname, prelude_string_t *value, void *context); opt : ctname : value : context : Returns : prelude_option_invoke_set () prelude_option_invoke_setint prelude_option_invoke_set (prelude_option_t *opt, const char *ctname, prelude_string_t *value, void **context); opt : ctname : value : context : Returns : prelude_option_invoke_get () prelude_option_invoke_getint prelude_option_invoke_get (prelude_option_t *opt, const char *ctname, prelude_string_t *value, void *context); opt : ctname : value : context : Returns : prelude_option_invoke_destroy () prelude_option_invoke_destroyint prelude_option_invoke_destroy (prelude_option_t *opt, const char *ctname, prelude_string_t *value, void *context); opt : ctname : value : context : Returns : prelude_option_new_root () prelude_option_new_rootint prelude_option_new_root (prelude_option_t **retopt); retopt : Returns : prelude_option_new () prelude_option_newint prelude_option_new (prelude_option_t *parent, prelude_option_t **retopt); parent : retopt : Returns : prelude_option_set_longopt () prelude_option_set_longoptvoid prelude_option_set_longopt (prelude_option_t *opt, const char *longopt); opt : longopt : prelude_option_get_longopt () prelude_option_get_longoptconst char * prelude_option_get_longopt (prelude_option_t *opt); opt : Returns : prelude_option_set_description () prelude_option_set_descriptionvoid prelude_option_set_description (prelude_option_t *opt, const char *description); opt : description : prelude_option_get_description () prelude_option_get_descriptionconst char * prelude_option_get_description (prelude_option_t *opt); opt : Returns : prelude_option_set_has_arg () prelude_option_set_has_argvoid prelude_option_set_has_arg (prelude_option_t *opt, prelude_option_argument_t has_arg); opt : has_arg : prelude_option_get_has_arg () prelude_option_get_has_argprelude_option_argument_t prelude_option_get_has_arg (prelude_option_t *opt); opt : Returns : prelude_option_set_value () prelude_option_set_valuevoid prelude_option_set_value (prelude_option_t *opt, const char *value); opt : value : prelude_option_get_value () prelude_option_get_valueconst char * prelude_option_get_value (prelude_option_t *opt); opt : Returns : prelude_option_set_help () prelude_option_set_helpvoid prelude_option_set_help (prelude_option_t *opt, const char *help); opt : help : prelude_option_get_help () prelude_option_get_helpconst char * prelude_option_get_help (prelude_option_t *opt); opt : Returns : prelude_option_set_input_validation_regex () prelude_option_set_input_validation_regexvoid prelude_option_set_input_validation_regex (prelude_option_t *opt, const char *regex); opt : regex : prelude_option_get_input_validation_regex () prelude_option_get_input_validation_regexconst char * prelude_option_get_input_validation_regex (prelude_option_t *opt); opt : Returns : prelude_option_set_input_type () prelude_option_set_input_typevoid prelude_option_set_input_type (prelude_option_t *opt, prelude_option_input_type_t input_type); opt : input_type : prelude_option_get_input_type () prelude_option_get_input_typeprelude_option_input_type_t prelude_option_get_input_type (prelude_option_t *opt); opt : Returns : prelude_option_get_optlist () prelude_option_get_optlistprelude_list_t * prelude_option_get_optlist (prelude_option_t *opt); opt : Returns : prelude_option_get_next () prelude_option_get_nextprelude_option_t * prelude_option_get_next (prelude_option_t *start, prelude_option_t *cur); start : cur : Returns : prelude_option_has_optlist () prelude_option_has_optlistprelude_bool_t prelude_option_has_optlist (prelude_option_t *opt); opt : Returns : prelude_option_get_parent () prelude_option_get_parentprelude_option_t * prelude_option_get_parent (prelude_option_t *opt); opt : Returns : prelude_option_set_destroy_callback () prelude_option_set_destroy_callbackvoid prelude_option_set_destroy_callback (prelude_option_t *opt, prelude_option_destroy_callback_t destroy); opt : destroy : prelude_option_get_destroy_callback () prelude_option_get_destroy_callbackprelude_option_destroy_callback_t prelude_option_get_destroy_callback (prelude_option_t *opt); opt : Returns : prelude_option_set_set_callback () prelude_option_set_set_callbackvoid prelude_option_set_set_callback (prelude_option_t *opt, prelude_option_set_callback_t set); opt : set : prelude_option_get_set_callback () prelude_option_get_set_callbackprelude_option_set_callback_t prelude_option_get_set_callback (prelude_option_t *opt); opt : Returns : prelude_option_set_get_callback () prelude_option_set_get_callbackvoid prelude_option_set_get_callback (prelude_option_t *opt, int (getprelude_option_t *opt, prelude_string_t *out, void *context) ()); opt : get : prelude_option_get_get_callback () prelude_option_get_get_callbackprelude_option_get_callback_t prelude_option_get_get_callback (prelude_option_t *opt); opt : Returns : prelude_option_set_commit_callback () prelude_option_set_commit_callbackvoid prelude_option_set_commit_callback (prelude_option_t *opt, prelude_option_commit_callback_t commit); opt : commit : prelude_option_get_commit_callback () prelude_option_get_commit_callbackprelude_option_commit_callback_t prelude_option_get_commit_callback (prelude_option_t *opt); opt : Returns : prelude_option_set_default_context () prelude_option_set_default_contextvoid prelude_option_set_default_context (prelude_option_t *opt, void *context); opt : context : prelude_option_new_context () prelude_option_new_contextint prelude_option_new_context (prelude_option_t *opt, prelude_option_context_t **ctx, const char *name, void *data); opt : ctx : name : data : Returns : prelude_option_context_destroy () prelude_option_context_destroyvoid prelude_option_context_destroy (prelude_option_context_t *oc); oc : prelude_option_search () prelude_option_searchprelude_option_t * prelude_option_search (prelude_option_t *parent, const char *name, prelude_option_type_t type, prelude_bool_t walk_children); parent : name : type : walk_children : Returns : prelude_option_search_context () prelude_option_search_contextprelude_option_context_t * prelude_option_search_context (prelude_option_t *opt, const char *name); opt : name : Returns : libprelude-1.0.0/docs/api/xml/prelude-msgbuf.xml0000664000076400007640000003415511347714756016565 00000000000000 prelude-msgbuf 3 LIBPRELUDE Library prelude-msgbuf Synopsis typedef prelude_msgbuf_t; enum prelude_msgbuf_flags_t; int prelude_msgbuf_new (prelude_msgbuf_t **msgbuf); void prelude_msgbuf_destroy (prelude_msgbuf_t *msgbuf); void prelude_msgbuf_mark_end (prelude_msgbuf_t *msgbuf); int prelude_msgbuf_set (prelude_msgbuf_t *msgbuf, uint8_t tag, uint32_t len, const void *data); prelude_msg_t * prelude_msgbuf_get_msg (prelude_msgbuf_t *msgbuf); void prelude_msgbuf_set_callback (prelude_msgbuf_t *msgbuf, int (send_msgprelude_msgbuf_t *msgbuf, prelude_msg_t *msg) ()); void prelude_msgbuf_set_data (prelude_msgbuf_t *msgbuf, void *data); void * prelude_msgbuf_get_data (prelude_msgbuf_t *msgbuf); void prelude_msgbuf_set_flags (prelude_msgbuf_t *msgbuf, prelude_msgbuf_flags_t flags); prelude_msgbuf_flags_t prelude_msgbuf_get_flags (prelude_msgbuf_t *msgbuf); Description Details prelude_msgbuf_t prelude_msgbuf_ttypedef struct prelude_msgbuf prelude_msgbuf_t; enum prelude_msgbuf_flags_t prelude_msgbuf_flags_ttypedef enum { PRELUDE_MSGBUF_FLAGS_ASYNC = 0x01 } prelude_msgbuf_flags_t; prelude_msgbuf_new () prelude_msgbuf_newint prelude_msgbuf_new (prelude_msgbuf_t **msgbuf); Create a new prelude_msgbuf_t object and store it into msgbuf. You can then write data to msgbuf using the prelude_msgbuf_set() function. When the message buffer is full, the message will be flushed using the user provided callback. msgbuf : Pointer where to store the created prelude_msgbuf_t object. Returns : 0 on success, or a negative value if an error occured. prelude_msgbuf_destroy () prelude_msgbuf_destroyvoid prelude_msgbuf_destroy (prelude_msgbuf_t *msgbuf); Destroy msgbuf, all data remaining will be flushed. msgbuf : Pointer on a prelude_msgbuf_t object. prelude_msgbuf_mark_end () prelude_msgbuf_mark_endvoid prelude_msgbuf_mark_end (prelude_msgbuf_t *msgbuf); This function should be called to tell the msgbuf subsystem that you finished writing your message. msgbuf : Pointer on prelude_msgbuf_t object. prelude_msgbuf_set () prelude_msgbuf_setint prelude_msgbuf_set (prelude_msgbuf_t *msgbuf, uint8_t tag, uint32_t len, const void *data); prelude_msgbuf_set() append len bytes of data from the data buffer to the msgbuf object representing a message. The data is tagged with tag. msgbuf : Pointer on a prelude_msgbuf_t object to store the data to. tag : 8 bits unsigned integer describing the kind of data. len : len of the data chunk. data : Pointer to the data. Returns : 0 on success, a negative value if an error occured. prelude_msgbuf_get_msg () prelude_msgbuf_get_msgprelude_msg_t * prelude_msgbuf_get_msg (prelude_msgbuf_t *msgbuf); msgbuf : Pointer on a prelude_msgbuf_t object. Returns : This function return the current message associated with the message buffer. prelude_msgbuf_set_callback () prelude_msgbuf_set_callbackvoid prelude_msgbuf_set_callback (prelude_msgbuf_t *msgbuf, int (send_msgprelude_msgbuf_t *msgbuf, prelude_msg_t *msg) ()); Associate an application specific callback to this msgbuf. msgbuf : Pointer on a prelude_msgbuf_t object. send_msg : Pointer to a function for sending a message. prelude_msgbuf_set_data () prelude_msgbuf_set_datavoid prelude_msgbuf_set_data (prelude_msgbuf_t *msgbuf, void *data); msgbuf : data : prelude_msgbuf_get_data () prelude_msgbuf_get_datavoid * prelude_msgbuf_get_data (prelude_msgbuf_t *msgbuf); msgbuf : Returns : prelude_msgbuf_set_flags () prelude_msgbuf_set_flagsvoid prelude_msgbuf_set_flags (prelude_msgbuf_t *msgbuf, prelude_msgbuf_flags_t flags); msgbuf : flags : prelude_msgbuf_get_flags () prelude_msgbuf_get_flagsprelude_msgbuf_flags_t prelude_msgbuf_get_flags (prelude_msgbuf_t *msgbuf); msgbuf : Returns : libprelude-1.0.0/docs/api/xml/prelude-async.xml0000664000076400007640000002102411347714755016405 00000000000000 prelude-async 3 LIBPRELUDE Library prelude-async Synopsis enum prelude_async_flags_t; void (*prelude_async_callback_t) (void *object, void *data); #define PRELUDE_ASYNC_OBJECT prelude_async_object_t; int prelude_async_init (void); prelude_async_flags_t prelude_async_get_flags (void); void prelude_async_set_flags (prelude_async_flags_t flags); void prelude_async_add (prelude_async_object_t *obj); void prelude_async_del (prelude_async_object_t *obj); void prelude_async_exit (void); Description Details enum prelude_async_flags_t prelude_async_flags_ttypedef enum { PRELUDE_ASYNC_FLAGS_TIMER = 0x01 } prelude_async_flags_t; This provides asynchronous timer. When enabled, the heartbeat function (and user specified callback, if any) will be called automatically, from an asynchronous thread. If you use this flags, you won't need to call prelude_wake_up_timer() anymore. PRELUDE_ASYNC_FLAGS_TIMER Enable asynchronous timer. prelude_async_callback_t () prelude_async_callback_tvoid (*prelude_async_callback_t) (void *object, void *data); object : data : PRELUDE_ASYNC_OBJECT PRELUDE_ASYNC_OBJECT#define PRELUDE_ASYNC_OBJECT prelude_async_object_t prelude_async_object_ttypedef struct { PRELUDE_ASYNC_OBJECT; } prelude_async_object_t; prelude_async_init () prelude_async_initint prelude_async_init (void); Initialize the asynchronous subsystem. Returns : 0 on success, -1 if an error occured. prelude_async_get_flags () prelude_async_get_flagsprelude_async_flags_t prelude_async_get_flags (void); Retrieves flags from the asynchronous subsystem Returns : asynchronous flags prelude_async_set_flags () prelude_async_set_flagsvoid prelude_async_set_flags (prelude_async_flags_t flags); Sets flags to the asynchronous subsystem. flags : flags you want to set prelude_async_add () prelude_async_addvoid prelude_async_add (prelude_async_object_t *obj); Adds obj to the asynchronous processing list. obj : Pointer to a prelude_async_t object. prelude_async_del () prelude_async_delvoid prelude_async_del (prelude_async_object_t *obj); Deletes obj from the asynchronous processing list. obj : Pointer to a prelude_async_t object. prelude_async_exit () prelude_async_exitvoid prelude_async_exit (void); libprelude-1.0.0/docs/api/xml/prelude-connection.xml0000664000076400007640000011123611347714755017434 00000000000000 prelude-connection 3 LIBPRELUDE Library prelude-connection Synopsis enum prelude_connection_permission_t; enum prelude_connection_state_t; typedef prelude_connection_t; void prelude_connection_destroy (prelude_connection_t *conn); int prelude_connection_send (prelude_connection_t *cnx, prelude_msg_t *msg); int prelude_connection_recv (prelude_connection_t *cnx, prelude_msg_t **outmsg); int prelude_connection_recv_idmef (prelude_connection_t *con, idmef_message_t **idmef); int prelude_connection_connect (prelude_connection_t *cnx, prelude_client_profile_t *profile, prelude_connection_permission_t permission); ssize_t prelude_connection_forward (prelude_connection_t *cnx, prelude_io_t *src, size_t count); const char * prelude_connection_get_local_addr (prelude_connection_t *cnx); unsigned int prelude_connection_get_local_port (prelude_connection_t *cnx); const char * prelude_connection_get_peer_addr (prelude_connection_t *cnx); unsigned int prelude_connection_get_peer_port (prelude_connection_t *cnx); prelude_bool_t prelude_connection_is_alive (prelude_connection_t *cnx); prelude_io_t * prelude_connection_get_fd (prelude_connection_t *cnx); int prelude_connection_close (prelude_connection_t *cnx); void prelude_connection_set_fd_ref (prelude_connection_t *cnx, prelude_io_t *fd); void prelude_connection_set_fd_nodup (prelude_connection_t *cnx, prelude_io_t *fd); void prelude_connection_set_state (prelude_connection_t *cnx, prelude_connection_state_t state); prelude_connection_state_t prelude_connection_get_state (prelude_connection_t *cnx); void prelude_connection_set_data (prelude_connection_t *cnx, void *data); void * prelude_connection_get_data (prelude_connection_t *cnx); const char * prelude_connection_get_default_socket_filename (void); prelude_connection_permission_t prelude_connection_get_permission (prelude_connection_t *conn); uint64_t prelude_connection_get_peer_analyzerid (prelude_connection_t *cnx); void prelude_connection_set_peer_analyzerid (prelude_connection_t *cnx, uint64_t analyzerid); int prelude_connection_new (prelude_connection_t **ret, const char *addr); prelude_connection_t * prelude_connection_ref (prelude_connection_t *conn); int prelude_connection_new_msgbuf (prelude_connection_t *connection, prelude_msgbuf_t **msgbuf); int prelude_connection_permission_to_string (prelude_connection_permission_t perm, prelude_string_t *out); int prelude_connection_permission_new_from_string (prelude_connection_permission_t *out, const char *buf); Description Details enum prelude_connection_permission_t prelude_connection_permission_ttypedef enum { PRELUDE_CONNECTION_PERMISSION_IDMEF_READ = 0x01, /* client might read received IDMEF message */ PRELUDE_CONNECTION_PERMISSION_ADMIN_READ = 0x02, /* client might read received ADMIN message */ PRELUDE_CONNECTION_PERMISSION_IDMEF_WRITE = 0x04, /* client might send IDMEF message */ PRELUDE_CONNECTION_PERMISSION_ADMIN_WRITE = 0x08 /* client might issue OPTION request */ } prelude_connection_permission_t; enum prelude_connection_state_t prelude_connection_state_ttypedef enum { PRELUDE_CONNECTION_STATE_ESTABLISHED = 0x01 } prelude_connection_state_t; prelude_connection_t prelude_connection_ttypedef struct prelude_connection prelude_connection_t; prelude_connection_destroy () prelude_connection_destroyvoid prelude_connection_destroy (prelude_connection_t *conn); Destroy the connection referenced by conn. In case the connection is still alive, it is closed in a blocking manner. Use prelude_connection_close() if you want to close the connection in a non blocking manner prior prelude_connection_destroy(). conn : Pointer to a prelude_connection_t object. prelude_connection_send () prelude_connection_sendint prelude_connection_send (prelude_connection_t *cnx, prelude_msg_t *msg); cnx : msg : Returns : prelude_connection_recv () prelude_connection_recvint prelude_connection_recv (prelude_connection_t *cnx, prelude_msg_t **outmsg); cnx : outmsg : Returns : prelude_connection_recv_idmef () prelude_connection_recv_idmefint prelude_connection_recv_idmef (prelude_connection_t *con, idmef_message_t **idmef); con : idmef : Returns : prelude_connection_connect () prelude_connection_connectint prelude_connection_connect (prelude_connection_t *cnx, prelude_client_profile_t *profile, prelude_connection_permission_t permission); cnx : profile : permission : Returns : prelude_connection_forward () prelude_connection_forwardssize_t prelude_connection_forward (prelude_connection_t *cnx, prelude_io_t *src, size_t count); cnx : src : count : Returns : prelude_connection_get_local_addr () prelude_connection_get_local_addrconst char * prelude_connection_get_local_addr (prelude_connection_t *cnx); cnx : Pointer to a prelude_connection_t object. Returns : the local address used to connect. prelude_connection_get_local_port () prelude_connection_get_local_portunsigned int prelude_connection_get_local_port (prelude_connection_t *cnx); cnx : Pointer to a prelude_connection_t object. Returns : the local port used to connect. prelude_connection_get_peer_addr () prelude_connection_get_peer_addrconst char * prelude_connection_get_peer_addr (prelude_connection_t *cnx); cnx : Returns : prelude_connection_get_peer_port () prelude_connection_get_peer_portunsigned int prelude_connection_get_peer_port (prelude_connection_t *cnx); cnx : Returns : prelude_connection_is_alive () prelude_connection_is_aliveprelude_bool_t prelude_connection_is_alive (prelude_connection_t *cnx); cnx : Pointer to a prelude_connection_t object. Returns : 0 if the connection associated with cnx is alive, -1 otherwise. prelude_connection_get_fd () prelude_connection_get_fdprelude_io_t * prelude_connection_get_fd (prelude_connection_t *cnx); cnx : Pointer to a prelude_connection_t object. Returns : A pointer to the prelude_io_t object used for communicating with the peer. prelude_connection_close () prelude_connection_closeint prelude_connection_close (prelude_connection_t *cnx); cnx : Returns : prelude_connection_set_fd_ref () prelude_connection_set_fd_refvoid prelude_connection_set_fd_ref (prelude_connection_t *cnx, prelude_io_t *fd); cnx : fd : prelude_connection_set_fd_nodup () prelude_connection_set_fd_nodupvoid prelude_connection_set_fd_nodup (prelude_connection_t *cnx, prelude_io_t *fd); cnx : fd : prelude_connection_set_state () prelude_connection_set_statevoid prelude_connection_set_state (prelude_connection_t *cnx, prelude_connection_state_t state); cnx : state : prelude_connection_get_state () prelude_connection_get_stateprelude_connection_state_t prelude_connection_get_state (prelude_connection_t *cnx); cnx : Returns : prelude_connection_set_data () prelude_connection_set_datavoid prelude_connection_set_data (prelude_connection_t *cnx, void *data); cnx : data : prelude_connection_get_data () prelude_connection_get_datavoid * prelude_connection_get_data (prelude_connection_t *cnx); cnx : Returns : prelude_connection_get_default_socket_filename () prelude_connection_get_default_socket_filenameconst char * prelude_connection_get_default_socket_filename (void); Returns : prelude_connection_get_permission () prelude_connection_get_permissionprelude_connection_permission_t prelude_connection_get_permission (prelude_connection_t *conn); conn : Returns : prelude_connection_get_peer_analyzerid () prelude_connection_get_peer_analyzeriduint64_t prelude_connection_get_peer_analyzerid (prelude_connection_t *cnx); cnx : Returns : prelude_connection_set_peer_analyzerid () prelude_connection_set_peer_analyzeridvoid prelude_connection_set_peer_analyzerid (prelude_connection_t *cnx, uint64_t analyzerid); cnx : analyzerid : prelude_connection_new () prelude_connection_newint prelude_connection_new (prelude_connection_t **ret, const char *addr); ret : addr : Returns : prelude_connection_ref () prelude_connection_refprelude_connection_t * prelude_connection_ref (prelude_connection_t *conn); Increases conn reference count. prelude_connection_destroy() will decrease the refcount until it reaches 0, at which point conn will be destroyed. conn : Pointer to a prelude_connection_t object to reference. Returns : conn. prelude_connection_new_msgbuf () prelude_connection_new_msgbufint prelude_connection_new_msgbuf (prelude_connection_t *connection, prelude_msgbuf_t **msgbuf); connection : msgbuf : Returns : prelude_connection_permission_to_string () prelude_connection_permission_to_stringint prelude_connection_permission_to_string (prelude_connection_permission_t perm, prelude_string_t *out); perm : out : Returns : prelude_connection_permission_new_from_string () prelude_connection_permission_new_from_stringint prelude_connection_permission_new_from_string (prelude_connection_permission_t *out, const char *buf); out : buf : Returns : libprelude-1.0.0/docs/api/xml/idmef-message-read.xml0000664000076400007640000014403711347714755017263 00000000000000 idmef-message-read 3 LIBPRELUDE Library idmef-message-read Reading a message from a prelude_msg_t buffer Synopsis int idmef_additional_data_read (idmef_additional_data_t *additional_data, prelude_msg_t *msg); int idmef_reference_read (idmef_reference_t *reference, prelude_msg_t *msg); int idmef_classification_read (idmef_classification_t *classification, prelude_msg_t *msg); int idmef_user_id_read (idmef_user_id_t *user_id, prelude_msg_t *msg); int idmef_user_read (idmef_user_t *user, prelude_msg_t *msg); int idmef_address_read (idmef_address_t *address, prelude_msg_t *msg); int idmef_process_read (idmef_process_t *process, prelude_msg_t *msg); int idmef_web_service_read (idmef_web_service_t *web_service, prelude_msg_t *msg); int idmef_snmp_service_read (idmef_snmp_service_t *snmp_service, prelude_msg_t *msg); int idmef_service_read (idmef_service_t *service, prelude_msg_t *msg); int idmef_node_read (idmef_node_t *node, prelude_msg_t *msg); int idmef_source_read (idmef_source_t *source, prelude_msg_t *msg); int idmef_file_access_read (idmef_file_access_t *file_access, prelude_msg_t *msg); int idmef_inode_read (idmef_inode_t *inode, prelude_msg_t *msg); int idmef_checksum_read (idmef_checksum_t *checksum, prelude_msg_t *msg); int idmef_file_read (idmef_file_t *file, prelude_msg_t *msg); int idmef_linkage_read (idmef_linkage_t *linkage, prelude_msg_t *msg); int idmef_target_read (idmef_target_t *target, prelude_msg_t *msg); int idmef_analyzer_read (idmef_analyzer_t *analyzer, prelude_msg_t *msg); int idmef_alertident_read (idmef_alertident_t *alertident, prelude_msg_t *msg); int idmef_impact_read (idmef_impact_t *impact, prelude_msg_t *msg); int idmef_action_read (idmef_action_t *action, prelude_msg_t *msg); int idmef_confidence_read (idmef_confidence_t *confidence, prelude_msg_t *msg); int idmef_assessment_read (idmef_assessment_t *assessment, prelude_msg_t *msg); int idmef_tool_alert_read (idmef_tool_alert_t *tool_alert, prelude_msg_t *msg); int idmef_correlation_alert_read (idmef_correlation_alert_t *correlation_alert, prelude_msg_t *msg); int idmef_overflow_alert_read (idmef_overflow_alert_t *overflow_alert, prelude_msg_t *msg); int idmef_alert_read (idmef_alert_t *alert, prelude_msg_t *msg); int idmef_heartbeat_read (idmef_heartbeat_t *heartbeat, prelude_msg_t *msg); int idmef_message_read (idmef_message_t *message, prelude_msg_t *msg); Description Once you read a prelude_msg_t object, you need to decode this message. In case this is an IDMEF style message, the following API allow to read the relevant IDMEF fields from the prelude_msg_t object, and create the IDMEF object from it's content. The function you're most probably looking to use is idmef_message_read(), and here is an example on how to use it: int ret; prelude_msg_t *pmsg; idmef_message_t *message; pmsg = whatever_method_to_get_a_prelude_msg(); ret = idmef_message_new(&message); if ( ret < 0 ) return ret; ret = idmef_message_read(message, pmsg); This will decode the full IDMEF message stored within pmsg into the idmef_message_t IDMEF object and it's childrens. Details idmef_additional_data_read () idmef_additional_data_readint idmef_additional_data_read (idmef_additional_data_t *additional_data, prelude_msg_t *msg); Read an idmef_additional_data from the msg message, and store it into additional_data. additional_data : Pointer to a idmef_additional_data_t object. msg : Pointer to a prelude_msg_t object, containing a message. Returns : 0 on success, a negative value if an error occured. idmef_reference_read () idmef_reference_readint idmef_reference_read (idmef_reference_t *reference, prelude_msg_t *msg); Read an idmef_reference from the msg message, and store it into reference. reference : Pointer to a idmef_reference_t object. msg : Pointer to a prelude_msg_t object, containing a message. Returns : 0 on success, a negative value if an error occured. idmef_classification_read () idmef_classification_readint idmef_classification_read (idmef_classification_t *classification, prelude_msg_t *msg); Read an idmef_classification from the msg message, and store it into classification. classification : Pointer to a idmef_classification_t object. msg : Pointer to a prelude_msg_t object, containing a message. Returns : 0 on success, a negative value if an error occured. idmef_user_id_read () idmef_user_id_readint idmef_user_id_read (idmef_user_id_t *user_id, prelude_msg_t *msg); Read an idmef_user_id from the msg message, and store it into user_id. user_id : Pointer to a idmef_user_id_t object. msg : Pointer to a prelude_msg_t object, containing a message. Returns : 0 on success, a negative value if an error occured. idmef_user_read () idmef_user_readint idmef_user_read (idmef_user_t *user, prelude_msg_t *msg); Read an idmef_user from the msg message, and store it into user. user : Pointer to a idmef_user_t object. msg : Pointer to a prelude_msg_t object, containing a message. Returns : 0 on success, a negative value if an error occured. idmef_address_read () idmef_address_readint idmef_address_read (idmef_address_t *address, prelude_msg_t *msg); Read an idmef_address from the msg message, and store it into address. address : Pointer to a idmef_address_t object. msg : Pointer to a prelude_msg_t object, containing a message. Returns : 0 on success, a negative value if an error occured. idmef_process_read () idmef_process_readint idmef_process_read (idmef_process_t *process, prelude_msg_t *msg); Read an idmef_process from the msg message, and store it into process. process : Pointer to a idmef_process_t object. msg : Pointer to a prelude_msg_t object, containing a message. Returns : 0 on success, a negative value if an error occured. idmef_web_service_read () idmef_web_service_readint idmef_web_service_read (idmef_web_service_t *web_service, prelude_msg_t *msg); Read an idmef_web_service from the msg message, and store it into web_service. web_service : Pointer to a idmef_web_service_t object. msg : Pointer to a prelude_msg_t object, containing a message. Returns : 0 on success, a negative value if an error occured. idmef_snmp_service_read () idmef_snmp_service_readint idmef_snmp_service_read (idmef_snmp_service_t *snmp_service, prelude_msg_t *msg); Read an idmef_snmp_service from the msg message, and store it into snmp_service. snmp_service : Pointer to a idmef_snmp_service_t object. msg : Pointer to a prelude_msg_t object, containing a message. Returns : 0 on success, a negative value if an error occured. idmef_service_read () idmef_service_readint idmef_service_read (idmef_service_t *service, prelude_msg_t *msg); Read an idmef_service from the msg message, and store it into service. service : Pointer to a idmef_service_t object. msg : Pointer to a prelude_msg_t object, containing a message. Returns : 0 on success, a negative value if an error occured. idmef_node_read () idmef_node_readint idmef_node_read (idmef_node_t *node, prelude_msg_t *msg); Read an idmef_node from the msg message, and store it into node. node : Pointer to a idmef_node_t object. msg : Pointer to a prelude_msg_t object, containing a message. Returns : 0 on success, a negative value if an error occured. idmef_source_read () idmef_source_readint idmef_source_read (idmef_source_t *source, prelude_msg_t *msg); Read an idmef_source from the msg message, and store it into source. source : Pointer to a idmef_source_t object. msg : Pointer to a prelude_msg_t object, containing a message. Returns : 0 on success, a negative value if an error occured. idmef_file_access_read () idmef_file_access_readint idmef_file_access_read (idmef_file_access_t *file_access, prelude_msg_t *msg); Read an idmef_file_access from the msg message, and store it into file_access. file_access : Pointer to a idmef_file_access_t object. msg : Pointer to a prelude_msg_t object, containing a message. Returns : 0 on success, a negative value if an error occured. idmef_inode_read () idmef_inode_readint idmef_inode_read (idmef_inode_t *inode, prelude_msg_t *msg); Read an idmef_inode from the msg message, and store it into inode. inode : Pointer to a idmef_inode_t object. msg : Pointer to a prelude_msg_t object, containing a message. Returns : 0 on success, a negative value if an error occured. idmef_checksum_read () idmef_checksum_readint idmef_checksum_read (idmef_checksum_t *checksum, prelude_msg_t *msg); Read an idmef_checksum from the msg message, and store it into checksum. checksum : Pointer to a idmef_checksum_t object. msg : Pointer to a prelude_msg_t object, containing a message. Returns : 0 on success, a negative value if an error occured. idmef_file_read () idmef_file_readint idmef_file_read (idmef_file_t *file, prelude_msg_t *msg); Read an idmef_file from the msg message, and store it into file. file : Pointer to a idmef_file_t object. msg : Pointer to a prelude_msg_t object, containing a message. Returns : 0 on success, a negative value if an error occured. idmef_linkage_read () idmef_linkage_readint idmef_linkage_read (idmef_linkage_t *linkage, prelude_msg_t *msg); Read an idmef_linkage from the msg message, and store it into linkage. linkage : Pointer to a idmef_linkage_t object. msg : Pointer to a prelude_msg_t object, containing a message. Returns : 0 on success, a negative value if an error occured. idmef_target_read () idmef_target_readint idmef_target_read (idmef_target_t *target, prelude_msg_t *msg); Read an idmef_target from the msg message, and store it into target. target : Pointer to a idmef_target_t object. msg : Pointer to a prelude_msg_t object, containing a message. Returns : 0 on success, a negative value if an error occured. idmef_analyzer_read () idmef_analyzer_readint idmef_analyzer_read (idmef_analyzer_t *analyzer, prelude_msg_t *msg); Read an idmef_analyzer from the msg message, and store it into analyzer. analyzer : Pointer to a idmef_analyzer_t object. msg : Pointer to a prelude_msg_t object, containing a message. Returns : 0 on success, a negative value if an error occured. idmef_alertident_read () idmef_alertident_readint idmef_alertident_read (idmef_alertident_t *alertident, prelude_msg_t *msg); Read an idmef_alertident from the msg message, and store it into alertident. alertident : Pointer to a idmef_alertident_t object. msg : Pointer to a prelude_msg_t object, containing a message. Returns : 0 on success, a negative value if an error occured. idmef_impact_read () idmef_impact_readint idmef_impact_read (idmef_impact_t *impact, prelude_msg_t *msg); Read an idmef_impact from the msg message, and store it into impact. impact : Pointer to a idmef_impact_t object. msg : Pointer to a prelude_msg_t object, containing a message. Returns : 0 on success, a negative value if an error occured. idmef_action_read () idmef_action_readint idmef_action_read (idmef_action_t *action, prelude_msg_t *msg); Read an idmef_action from the msg message, and store it into action. action : Pointer to a idmef_action_t object. msg : Pointer to a prelude_msg_t object, containing a message. Returns : 0 on success, a negative value if an error occured. idmef_confidence_read () idmef_confidence_readint idmef_confidence_read (idmef_confidence_t *confidence, prelude_msg_t *msg); Read an idmef_confidence from the msg message, and store it into confidence. confidence : Pointer to a idmef_confidence_t object. msg : Pointer to a prelude_msg_t object, containing a message. Returns : 0 on success, a negative value if an error occured. idmef_assessment_read () idmef_assessment_readint idmef_assessment_read (idmef_assessment_t *assessment, prelude_msg_t *msg); Read an idmef_assessment from the msg message, and store it into assessment. assessment : Pointer to a idmef_assessment_t object. msg : Pointer to a prelude_msg_t object, containing a message. Returns : 0 on success, a negative value if an error occured. idmef_tool_alert_read () idmef_tool_alert_readint idmef_tool_alert_read (idmef_tool_alert_t *tool_alert, prelude_msg_t *msg); Read an idmef_tool_alert from the msg message, and store it into tool_alert. tool_alert : Pointer to a idmef_tool_alert_t object. msg : Pointer to a prelude_msg_t object, containing a message. Returns : 0 on success, a negative value if an error occured. idmef_correlation_alert_read () idmef_correlation_alert_readint idmef_correlation_alert_read (idmef_correlation_alert_t *correlation_alert, prelude_msg_t *msg); Read an idmef_correlation_alert from the msg message, and store it into correlation_alert. correlation_alert : Pointer to a idmef_correlation_alert_t object. msg : Pointer to a prelude_msg_t object, containing a message. Returns : 0 on success, a negative value if an error occured. idmef_overflow_alert_read () idmef_overflow_alert_readint idmef_overflow_alert_read (idmef_overflow_alert_t *overflow_alert, prelude_msg_t *msg); Read an idmef_overflow_alert from the msg message, and store it into overflow_alert. overflow_alert : Pointer to a idmef_overflow_alert_t object. msg : Pointer to a prelude_msg_t object, containing a message. Returns : 0 on success, a negative value if an error occured. idmef_alert_read () idmef_alert_readint idmef_alert_read (idmef_alert_t *alert, prelude_msg_t *msg); Read an idmef_alert from the msg message, and store it into alert. alert : Pointer to a idmef_alert_t object. msg : Pointer to a prelude_msg_t object, containing a message. Returns : 0 on success, a negative value if an error occured. idmef_heartbeat_read () idmef_heartbeat_readint idmef_heartbeat_read (idmef_heartbeat_t *heartbeat, prelude_msg_t *msg); Read an idmef_heartbeat from the msg message, and store it into heartbeat. heartbeat : Pointer to a idmef_heartbeat_t object. msg : Pointer to a prelude_msg_t object, containing a message. Returns : 0 on success, a negative value if an error occured. idmef_message_read () idmef_message_readint idmef_message_read (idmef_message_t *message, prelude_msg_t *msg); Read an idmef_message from the msg message, and store it into message. message : Pointer to a idmef_message_t object. msg : Pointer to a prelude_msg_t object, containing a message. Returns : 0 on success, a negative value if an error occured. libprelude-1.0.0/docs/api/xml/prelude-plugin.xml0000664000076400007640000011757511347714756016610 00000000000000 prelude-plugin 3 LIBPRELUDE Library prelude-plugin Synopsis #define lt_preloaded_symbols #define PRELUDE_PLUGIN_API_VERSION typedef prelude_plugin_entry_t; typedef prelude_plugin_instance_t; #define PRELUDE_PLUGIN_GENERIC prelude_plugin_generic_t; #define PRELUDE_PLUGIN_SET_PRELOADED_SYMBOLS() #define PRELUDE_PLUGIN_OPTION_DECLARE_STRING_CB(prefix, type, name) #define prelude_plugin_get_name (p) #define prelude_plugin_set_name (p, str) #define prelude_plugin_set_destroy_func (p, func) void prelude_plugin_entry_set_plugin (prelude_plugin_entry_t *pe, prelude_plugin_generic_t *pl); int prelude_plugin_set_activation_option (prelude_plugin_entry_t *pe, prelude_option_t *opt, int (commitprelude_plugin_instance_t *pi, prelude_string_t *err) ()); int prelude_plugin_instance_subscribe (prelude_plugin_instance_t *pi); int prelude_plugin_instance_unsubscribe (prelude_plugin_instance_t *pi); int prelude_plugin_new_instance (prelude_plugin_instance_t **pi, prelude_plugin_generic_t *plugin, const char *name, void *data); prelude_plugin_generic_t * prelude_plugin_search_by_name (prelude_list_t *head, const char *name); prelude_plugin_instance_t * prelude_plugin_search_instance_by_name (prelude_list_t *head, const char *pname, const char *iname); void prelude_plugin_instance_set_data (prelude_plugin_instance_t *pi, void *data); void * prelude_plugin_instance_get_data (prelude_plugin_instance_t *pi); void prelude_plugin_instance_set_plugin_data (prelude_plugin_instance_t *pi, void *data); void * prelude_plugin_instance_get_plugin_data (prelude_plugin_instance_t *pi); const char * prelude_plugin_instance_get_name (prelude_plugin_instance_t *pi); prelude_plugin_generic_t * prelude_plugin_instance_get_plugin (prelude_plugin_instance_t *pi); int prelude_plugin_load_from_dir (prelude_list_t *head, const char *dirname, const char *symbol, void *ptr, int (subscribeprelude_plugin_instance_t *p) (), void (unsubscribeprelude_plugin_instance_t *pi) ()); int prelude_plugin_instance_add (prelude_plugin_instance_t *pi, prelude_list_t *h); void prelude_plugin_instance_del (prelude_plugin_instance_t *pi); void prelude_plugin_instance_compute_time (prelude_plugin_instance_t *pi, struct timeval *start, struct timeval *end); int prelude_plugin_instance_call_commit_func (prelude_plugin_instance_t *pi, prelude_string_t *err); prelude_bool_t prelude_plugin_instance_has_commit_func (prelude_plugin_instance_t *pi); void prelude_plugin_set_preloaded_symbols (void *symlist); prelude_plugin_generic_t * prelude_plugin_get_next (prelude_list_t *head, prelude_list_t **iter); void prelude_plugin_unload (prelude_plugin_generic_t *plugin); #define prelude_plugin_compute_stats (pi, func) #define prelude_plugin_run (pi, type, member, ...) Description Details lt_preloaded_symbols lt_preloaded_symbols# define lt_preloaded_symbols lt__PROGRAM__LTX_preloaded_symbols PRELUDE_PLUGIN_API_VERSION PRELUDE_PLUGIN_API_VERSION#define PRELUDE_PLUGIN_API_VERSION 1 prelude_plugin_entry_t prelude_plugin_entry_ttypedef struct prelude_plugin_entry prelude_plugin_entry_t; prelude_plugin_instance_t prelude_plugin_instance_ttypedef struct prelude_plugin_instance prelude_plugin_instance_t; PRELUDE_PLUGIN_GENERIC PRELUDE_PLUGIN_GENERIC#define PRELUDE_PLUGIN_GENERIC prelude_plugin_generic_t prelude_plugin_generic_ttypedef struct { PRELUDE_PLUGIN_GENERIC; } prelude_plugin_generic_t; PRELUDE_PLUGIN_SET_PRELOADED_SYMBOLS() PRELUDE_PLUGIN_SET_PRELOADED_SYMBOLS#define PRELUDE_PLUGIN_SET_PRELOADED_SYMBOLS() PRELUDE_PLUGIN_OPTION_DECLARE_STRING_CB() PRELUDE_PLUGIN_OPTION_DECLARE_STRING_CB#define PRELUDE_PLUGIN_OPTION_DECLARE_STRING_CB(prefix, type, name) prefix : type : name : prelude_plugin_get_name() prelude_plugin_get_name#define prelude_plugin_get_name(p) (p)->name p : prelude_plugin_set_name() prelude_plugin_set_name#define prelude_plugin_set_name(p, str) (p)->name = (str) p : str : prelude_plugin_set_destroy_func() prelude_plugin_set_destroy_func#define prelude_plugin_set_destroy_func(p, func) (p)->destroy = func p : func : prelude_plugin_entry_set_plugin () prelude_plugin_entry_set_pluginvoid prelude_plugin_entry_set_plugin (prelude_plugin_entry_t *pe, prelude_plugin_generic_t *pl); pe : pl : prelude_plugin_set_activation_option () prelude_plugin_set_activation_optionint prelude_plugin_set_activation_option (prelude_plugin_entry_t *pe, prelude_option_t *opt, int (commitprelude_plugin_instance_t *pi, prelude_string_t *err) ()); pe : opt : commit : Returns : prelude_plugin_instance_subscribe () prelude_plugin_instance_subscribeint prelude_plugin_instance_subscribe (prelude_plugin_instance_t *pi); pi : Returns : prelude_plugin_instance_unsubscribe () prelude_plugin_instance_unsubscribeint prelude_plugin_instance_unsubscribe (prelude_plugin_instance_t *pi); Set pi to be inactive. The unsubscribe function specified in plugin_load_from_dir() is called for plugin un-registration and the instance for this plugin is freed. pi : Pointer to a plugin instance. Returns : 0 on success, -1 if an error occured. prelude_plugin_new_instance () prelude_plugin_new_instanceint prelude_plugin_new_instance (prelude_plugin_instance_t **pi, prelude_plugin_generic_t *plugin, const char *name, void *data); pi : plugin : name : data : Returns : prelude_plugin_search_by_name () prelude_plugin_search_by_nameprelude_plugin_generic_t * prelude_plugin_search_by_name (prelude_list_t *head, const char *name); Search head list of plugin for a plugin with name name. head : List where to search the plugin from. name : Name of the plugin to search. Returns : the a prelude_plugin_t on success, or NULL if the plugin does not exist. prelude_plugin_search_instance_by_name () prelude_plugin_search_instance_by_nameprelude_plugin_instance_t * prelude_plugin_search_instance_by_name (prelude_list_t *head, const char *pname, const char *iname); head : pname : iname : Returns : prelude_plugin_instance_set_data () prelude_plugin_instance_set_datavoid prelude_plugin_instance_set_data (prelude_plugin_instance_t *pi, void *data); pi : data : prelude_plugin_instance_get_data () prelude_plugin_instance_get_datavoid * prelude_plugin_instance_get_data (prelude_plugin_instance_t *pi); pi : Returns : prelude_plugin_instance_set_plugin_data () prelude_plugin_instance_set_plugin_datavoid prelude_plugin_instance_set_plugin_data (prelude_plugin_instance_t *pi, void *data); pi : data : prelude_plugin_instance_get_plugin_data () prelude_plugin_instance_get_plugin_datavoid * prelude_plugin_instance_get_plugin_data (prelude_plugin_instance_t *pi); pi : Returns : prelude_plugin_instance_get_name () prelude_plugin_instance_get_nameconst char * prelude_plugin_instance_get_name (prelude_plugin_instance_t *pi); pi : Returns : prelude_plugin_instance_get_plugin () prelude_plugin_instance_get_pluginprelude_plugin_generic_t * prelude_plugin_instance_get_plugin (prelude_plugin_instance_t *pi); pi : Returns : prelude_plugin_load_from_dir () prelude_plugin_load_from_dirint prelude_plugin_load_from_dir (prelude_list_t *head, const char *dirname, const char *symbol, void *ptr, int (subscribeprelude_plugin_instance_t *p) (), void (unsubscribeprelude_plugin_instance_t *pi) ()); Load all plugins in directory 'dirname', using symbol entry point. Each plugin have a subscribe and unsubscribe callback associated with it. The plugins are loaded, but not active, until someone call prelude_plugin_subscribe() on one of the plugin. Which'll call subscribe in order to register it. ptr is an extra argument provided to the plugin at initialization time. head : List where the loaded plugin should be added. dirname : The directory to load the plugin from. symbol : Symbol to lookup within loaded plugin. ptr : Extra pointer to provide to the plugin initialization function. subscribe : Pointer to a callback function for plugin subscribtion. unsubscribe : Pointer to a callback function for plugin un-subscribtion. Returns : The number of loaded plugins on success, -1 on error. prelude_plugin_instance_add () prelude_plugin_instance_addint prelude_plugin_instance_add (prelude_plugin_instance_t *pi, prelude_list_t *h); This function add the plugin instance associated with pi to the linked list specified by h. If this instance is already used somewhere else, a copy is made, since instance does not share information). pi : Pointer to a plugin instance h : Pointer to a linked list Returns : 0 on success or -1 if an error occured. prelude_plugin_instance_del () prelude_plugin_instance_delvoid prelude_plugin_instance_del (prelude_plugin_instance_t *pi); Delete pi from the list specified at prelude_plugin_instance_add() time. pi : Pointer to a plugin instance. prelude_plugin_instance_compute_time () prelude_plugin_instance_compute_timevoid prelude_plugin_instance_compute_time (prelude_plugin_instance_t *pi, struct timeval *start, struct timeval *end); pi : start : end : prelude_plugin_instance_call_commit_func () prelude_plugin_instance_call_commit_funcint prelude_plugin_instance_call_commit_func (prelude_plugin_instance_t *pi, prelude_string_t *err); pi : err : Returns : prelude_plugin_instance_has_commit_func () prelude_plugin_instance_has_commit_funcprelude_bool_t prelude_plugin_instance_has_commit_func (prelude_plugin_instance_t *pi); pi : Returns : prelude_plugin_set_preloaded_symbols () prelude_plugin_set_preloaded_symbolsvoid prelude_plugin_set_preloaded_symbols (void *symlist); symlist : prelude_plugin_get_next () prelude_plugin_get_nextprelude_plugin_generic_t * prelude_plugin_get_next (prelude_list_t *head, prelude_list_t **iter); head : iter : Returns : prelude_plugin_unload () prelude_plugin_unloadvoid prelude_plugin_unload (prelude_plugin_generic_t *plugin); plugin : prelude_plugin_compute_stats() prelude_plugin_compute_stats#define prelude_plugin_compute_stats(pi, func) pi : func : prelude_plugin_run() prelude_plugin_run#define prelude_plugin_run(pi, type, member, ...) pi : type : member : ... : libprelude-1.0.0/docs/api/xml/idmef-message-write.xml0000664000076400007640000015544111347714755017503 00000000000000 idmef-message-write 3 LIBPRELUDE Library idmef-message-write Writing IDMEF class to a message buffer Synopsis int idmef_additional_data_write (idmef_additional_data_t *additional_data, prelude_msgbuf_t *msg); int idmef_reference_write (idmef_reference_t *reference, prelude_msgbuf_t *msg); int idmef_classification_write (idmef_classification_t *classification, prelude_msgbuf_t *msg); int idmef_user_id_write (idmef_user_id_t *user_id, prelude_msgbuf_t *msg); int idmef_user_write (idmef_user_t *user, prelude_msgbuf_t *msg); int idmef_address_write (idmef_address_t *address, prelude_msgbuf_t *msg); int idmef_process_write (idmef_process_t *process, prelude_msgbuf_t *msg); int idmef_web_service_write (idmef_web_service_t *web_service, prelude_msgbuf_t *msg); int idmef_snmp_service_write (idmef_snmp_service_t *snmp_service, prelude_msgbuf_t *msg); int idmef_service_write (idmef_service_t *service, prelude_msgbuf_t *msg); int idmef_node_write (idmef_node_t *node, prelude_msgbuf_t *msg); int idmef_source_write (idmef_source_t *source, prelude_msgbuf_t *msg); int idmef_file_access_write (idmef_file_access_t *file_access, prelude_msgbuf_t *msg); int idmef_inode_write (idmef_inode_t *inode, prelude_msgbuf_t *msg); int idmef_checksum_write (idmef_checksum_t *checksum, prelude_msgbuf_t *msg); int idmef_file_write (idmef_file_t *file, prelude_msgbuf_t *msg); int idmef_linkage_write (idmef_linkage_t *linkage, prelude_msgbuf_t *msg); int idmef_target_write (idmef_target_t *target, prelude_msgbuf_t *msg); int idmef_analyzer_write (idmef_analyzer_t *analyzer, prelude_msgbuf_t *msg); int idmef_alertident_write (idmef_alertident_t *alertident, prelude_msgbuf_t *msg); int idmef_impact_write (idmef_impact_t *impact, prelude_msgbuf_t *msg); int idmef_action_write (idmef_action_t *action, prelude_msgbuf_t *msg); int idmef_confidence_write (idmef_confidence_t *confidence, prelude_msgbuf_t *msg); int idmef_assessment_write (idmef_assessment_t *assessment, prelude_msgbuf_t *msg); int idmef_tool_alert_write (idmef_tool_alert_t *tool_alert, prelude_msgbuf_t *msg); int idmef_correlation_alert_write (idmef_correlation_alert_t *correlation_alert, prelude_msgbuf_t *msg); int idmef_overflow_alert_write (idmef_overflow_alert_t *overflow_alert, prelude_msgbuf_t *msg); int idmef_alert_write (idmef_alert_t *alert, prelude_msgbuf_t *msg); int idmef_heartbeat_write (idmef_heartbeat_t *heartbeat, prelude_msgbuf_t *msg); int idmef_message_write (idmef_message_t *message, prelude_msgbuf_t *msg); Description If you're not willing to use the prelude_client_send_idmef() function, because for example you want more control over how a message is sent, you can use the idmef-message-write API to send your message manually. The functions defined in this API all take an IDMEF object as an argument and dump this object in a format suitable for writing it to a socket or a file (covering, for example, convertion from host byte order to network byte order), to the provided prelude_msgbuf_t buffer. The prelude_msgbuf_t object is just a buffer holding a prelude_msg_t object. When the buffer is full, the user defined function for prelude_msgbuf_t will be called, and the user can write his message using the prelude_msg_write() function. idmef_message_write(message, msgbuf); Details idmef_additional_data_write () idmef_additional_data_writeint idmef_additional_data_write (idmef_additional_data_t *additional_data, prelude_msgbuf_t *msg); Write additional_data within msg message buffer. The buffer is associated with a prelude_io_t file descriptor where the data will be written. additional_data : Pointer to a idmef_additional_data_t object. msg : Pointer to a prelude_msgbuf_t object, where the message should be written. Returns : 0 on success, a negative value if an error occured. idmef_reference_write () idmef_reference_writeint idmef_reference_write (idmef_reference_t *reference, prelude_msgbuf_t *msg); Write reference within msg message buffer. The buffer is associated with a prelude_io_t file descriptor where the data will be written. reference : Pointer to a idmef_reference_t object. msg : Pointer to a prelude_msgbuf_t object, where the message should be written. Returns : 0 on success, a negative value if an error occured. idmef_classification_write () idmef_classification_writeint idmef_classification_write (idmef_classification_t *classification, prelude_msgbuf_t *msg); Write classification within msg message buffer. The buffer is associated with a prelude_io_t file descriptor where the data will be written. classification : Pointer to a idmef_classification_t object. msg : Pointer to a prelude_msgbuf_t object, where the message should be written. Returns : 0 on success, a negative value if an error occured. idmef_user_id_write () idmef_user_id_writeint idmef_user_id_write (idmef_user_id_t *user_id, prelude_msgbuf_t *msg); Write user_id within msg message buffer. The buffer is associated with a prelude_io_t file descriptor where the data will be written. user_id : Pointer to a idmef_user_id_t object. msg : Pointer to a prelude_msgbuf_t object, where the message should be written. Returns : 0 on success, a negative value if an error occured. idmef_user_write () idmef_user_writeint idmef_user_write (idmef_user_t *user, prelude_msgbuf_t *msg); Write user within msg message buffer. The buffer is associated with a prelude_io_t file descriptor where the data will be written. user : Pointer to a idmef_user_t object. msg : Pointer to a prelude_msgbuf_t object, where the message should be written. Returns : 0 on success, a negative value if an error occured. idmef_address_write () idmef_address_writeint idmef_address_write (idmef_address_t *address, prelude_msgbuf_t *msg); Write address within msg message buffer. The buffer is associated with a prelude_io_t file descriptor where the data will be written. address : Pointer to a idmef_address_t object. msg : Pointer to a prelude_msgbuf_t object, where the message should be written. Returns : 0 on success, a negative value if an error occured. idmef_process_write () idmef_process_writeint idmef_process_write (idmef_process_t *process, prelude_msgbuf_t *msg); Write process within msg message buffer. The buffer is associated with a prelude_io_t file descriptor where the data will be written. process : Pointer to a idmef_process_t object. msg : Pointer to a prelude_msgbuf_t object, where the message should be written. Returns : 0 on success, a negative value if an error occured. idmef_web_service_write () idmef_web_service_writeint idmef_web_service_write (idmef_web_service_t *web_service, prelude_msgbuf_t *msg); Write web_service within msg message buffer. The buffer is associated with a prelude_io_t file descriptor where the data will be written. web_service : Pointer to a idmef_web_service_t object. msg : Pointer to a prelude_msgbuf_t object, where the message should be written. Returns : 0 on success, a negative value if an error occured. idmef_snmp_service_write () idmef_snmp_service_writeint idmef_snmp_service_write (idmef_snmp_service_t *snmp_service, prelude_msgbuf_t *msg); Write snmp_service within msg message buffer. The buffer is associated with a prelude_io_t file descriptor where the data will be written. snmp_service : Pointer to a idmef_snmp_service_t object. msg : Pointer to a prelude_msgbuf_t object, where the message should be written. Returns : 0 on success, a negative value if an error occured. idmef_service_write () idmef_service_writeint idmef_service_write (idmef_service_t *service, prelude_msgbuf_t *msg); Write service within msg message buffer. The buffer is associated with a prelude_io_t file descriptor where the data will be written. service : Pointer to a idmef_service_t object. msg : Pointer to a prelude_msgbuf_t object, where the message should be written. Returns : 0 on success, a negative value if an error occured. idmef_node_write () idmef_node_writeint idmef_node_write (idmef_node_t *node, prelude_msgbuf_t *msg); Write node within msg message buffer. The buffer is associated with a prelude_io_t file descriptor where the data will be written. node : Pointer to a idmef_node_t object. msg : Pointer to a prelude_msgbuf_t object, where the message should be written. Returns : 0 on success, a negative value if an error occured. idmef_source_write () idmef_source_writeint idmef_source_write (idmef_source_t *source, prelude_msgbuf_t *msg); Write source within msg message buffer. The buffer is associated with a prelude_io_t file descriptor where the data will be written. source : Pointer to a idmef_source_t object. msg : Pointer to a prelude_msgbuf_t object, where the message should be written. Returns : 0 on success, a negative value if an error occured. idmef_file_access_write () idmef_file_access_writeint idmef_file_access_write (idmef_file_access_t *file_access, prelude_msgbuf_t *msg); Write file_access within msg message buffer. The buffer is associated with a prelude_io_t file descriptor where the data will be written. file_access : Pointer to a idmef_file_access_t object. msg : Pointer to a prelude_msgbuf_t object, where the message should be written. Returns : 0 on success, a negative value if an error occured. idmef_inode_write () idmef_inode_writeint idmef_inode_write (idmef_inode_t *inode, prelude_msgbuf_t *msg); Write inode within msg message buffer. The buffer is associated with a prelude_io_t file descriptor where the data will be written. inode : Pointer to a idmef_inode_t object. msg : Pointer to a prelude_msgbuf_t object, where the message should be written. Returns : 0 on success, a negative value if an error occured. idmef_checksum_write () idmef_checksum_writeint idmef_checksum_write (idmef_checksum_t *checksum, prelude_msgbuf_t *msg); Write checksum within msg message buffer. The buffer is associated with a prelude_io_t file descriptor where the data will be written. checksum : Pointer to a idmef_checksum_t object. msg : Pointer to a prelude_msgbuf_t object, where the message should be written. Returns : 0 on success, a negative value if an error occured. idmef_file_write () idmef_file_writeint idmef_file_write (idmef_file_t *file, prelude_msgbuf_t *msg); Write file within msg message buffer. The buffer is associated with a prelude_io_t file descriptor where the data will be written. file : Pointer to a idmef_file_t object. msg : Pointer to a prelude_msgbuf_t object, where the message should be written. Returns : 0 on success, a negative value if an error occured. idmef_linkage_write () idmef_linkage_writeint idmef_linkage_write (idmef_linkage_t *linkage, prelude_msgbuf_t *msg); Write linkage within msg message buffer. The buffer is associated with a prelude_io_t file descriptor where the data will be written. linkage : Pointer to a idmef_linkage_t object. msg : Pointer to a prelude_msgbuf_t object, where the message should be written. Returns : 0 on success, a negative value if an error occured. idmef_target_write () idmef_target_writeint idmef_target_write (idmef_target_t *target, prelude_msgbuf_t *msg); Write target within msg message buffer. The buffer is associated with a prelude_io_t file descriptor where the data will be written. target : Pointer to a idmef_target_t object. msg : Pointer to a prelude_msgbuf_t object, where the message should be written. Returns : 0 on success, a negative value if an error occured. idmef_analyzer_write () idmef_analyzer_writeint idmef_analyzer_write (idmef_analyzer_t *analyzer, prelude_msgbuf_t *msg); Write analyzer within msg message buffer. The buffer is associated with a prelude_io_t file descriptor where the data will be written. analyzer : Pointer to a idmef_analyzer_t object. msg : Pointer to a prelude_msgbuf_t object, where the message should be written. Returns : 0 on success, a negative value if an error occured. idmef_alertident_write () idmef_alertident_writeint idmef_alertident_write (idmef_alertident_t *alertident, prelude_msgbuf_t *msg); Write alertident within msg message buffer. The buffer is associated with a prelude_io_t file descriptor where the data will be written. alertident : Pointer to a idmef_alertident_t object. msg : Pointer to a prelude_msgbuf_t object, where the message should be written. Returns : 0 on success, a negative value if an error occured. idmef_impact_write () idmef_impact_writeint idmef_impact_write (idmef_impact_t *impact, prelude_msgbuf_t *msg); Write impact within msg message buffer. The buffer is associated with a prelude_io_t file descriptor where the data will be written. impact : Pointer to a idmef_impact_t object. msg : Pointer to a prelude_msgbuf_t object, where the message should be written. Returns : 0 on success, a negative value if an error occured. idmef_action_write () idmef_action_writeint idmef_action_write (idmef_action_t *action, prelude_msgbuf_t *msg); Write action within msg message buffer. The buffer is associated with a prelude_io_t file descriptor where the data will be written. action : Pointer to a idmef_action_t object. msg : Pointer to a prelude_msgbuf_t object, where the message should be written. Returns : 0 on success, a negative value if an error occured. idmef_confidence_write () idmef_confidence_writeint idmef_confidence_write (idmef_confidence_t *confidence, prelude_msgbuf_t *msg); Write confidence within msg message buffer. The buffer is associated with a prelude_io_t file descriptor where the data will be written. confidence : Pointer to a idmef_confidence_t object. msg : Pointer to a prelude_msgbuf_t object, where the message should be written. Returns : 0 on success, a negative value if an error occured. idmef_assessment_write () idmef_assessment_writeint idmef_assessment_write (idmef_assessment_t *assessment, prelude_msgbuf_t *msg); Write assessment within msg message buffer. The buffer is associated with a prelude_io_t file descriptor where the data will be written. assessment : Pointer to a idmef_assessment_t object. msg : Pointer to a prelude_msgbuf_t object, where the message should be written. Returns : 0 on success, a negative value if an error occured. idmef_tool_alert_write () idmef_tool_alert_writeint idmef_tool_alert_write (idmef_tool_alert_t *tool_alert, prelude_msgbuf_t *msg); Write tool_alert within msg message buffer. The buffer is associated with a prelude_io_t file descriptor where the data will be written. tool_alert : Pointer to a idmef_tool_alert_t object. msg : Pointer to a prelude_msgbuf_t object, where the message should be written. Returns : 0 on success, a negative value if an error occured. idmef_correlation_alert_write () idmef_correlation_alert_writeint idmef_correlation_alert_write (idmef_correlation_alert_t *correlation_alert, prelude_msgbuf_t *msg); Write correlation_alert within msg message buffer. The buffer is associated with a prelude_io_t file descriptor where the data will be written. correlation_alert : Pointer to a idmef_correlation_alert_t object. msg : Pointer to a prelude_msgbuf_t object, where the message should be written. Returns : 0 on success, a negative value if an error occured. idmef_overflow_alert_write () idmef_overflow_alert_writeint idmef_overflow_alert_write (idmef_overflow_alert_t *overflow_alert, prelude_msgbuf_t *msg); Write overflow_alert within msg message buffer. The buffer is associated with a prelude_io_t file descriptor where the data will be written. overflow_alert : Pointer to a idmef_overflow_alert_t object. msg : Pointer to a prelude_msgbuf_t object, where the message should be written. Returns : 0 on success, a negative value if an error occured. idmef_alert_write () idmef_alert_writeint idmef_alert_write (idmef_alert_t *alert, prelude_msgbuf_t *msg); Write alert within msg message buffer. The buffer is associated with a prelude_io_t file descriptor where the data will be written. alert : Pointer to a idmef_alert_t object. msg : Pointer to a prelude_msgbuf_t object, where the message should be written. Returns : 0 on success, a negative value if an error occured. idmef_heartbeat_write () idmef_heartbeat_writeint idmef_heartbeat_write (idmef_heartbeat_t *heartbeat, prelude_msgbuf_t *msg); Write heartbeat within msg message buffer. The buffer is associated with a prelude_io_t file descriptor where the data will be written. heartbeat : Pointer to a idmef_heartbeat_t object. msg : Pointer to a prelude_msgbuf_t object, where the message should be written. Returns : 0 on success, a negative value if an error occured. idmef_message_write () idmef_message_writeint idmef_message_write (idmef_message_t *message, prelude_msgbuf_t *msg); Write message within msg message buffer. The buffer is associated with a prelude_io_t file descriptor where the data will be written. message : Pointer to a idmef_message_t object. msg : Pointer to a prelude_msgbuf_t object, where the message should be written. Returns : 0 on success, a negative value if an error occured. See Also prelude_msgbuf_t prelude_msg_t libprelude-1.0.0/docs/api/xml/prelude-client-profile.xml0000664000076400007640000012621611347714755020215 00000000000000 prelude-client-profile 3 LIBPRELUDE Library prelude-client-profile Synopsis typedef prelude_gid_t; typedef prelude_uid_t; typedef prelude_client_profile_t; int prelude_client_profile_new (prelude_client_profile_t **ret, const char *name); prelude_client_profile_t * prelude_client_profile_ref (prelude_client_profile_t *cp); void prelude_client_profile_destroy (prelude_client_profile_t *cp); void prelude_client_profile_get_config_filename (const prelude_client_profile_t *cp, char *buf, size_t size); void prelude_client_profile_get_analyzerid_filename (const prelude_client_profile_t *cp, char *buf, size_t size); void prelude_client_profile_get_tls_key_filename (const prelude_client_profile_t *cp, char *buf, size_t size); void prelude_client_profile_get_tls_server_ca_cert_filename (const prelude_client_profile_t *cp, char *buf, size_t size); void prelude_client_profile_get_tls_server_keycert_filename (const prelude_client_profile_t *cp, char *buf, size_t size); void prelude_client_profile_get_tls_server_crl_filename (const prelude_client_profile_t *cp, char *buf, size_t size); void prelude_client_profile_get_tls_client_keycert_filename (const prelude_client_profile_t *cp, char *buf, size_t size); void prelude_client_profile_get_tls_client_trusted_cert_filename (const prelude_client_profile_t *cp, char *buf, size_t size); void prelude_client_profile_get_backup_dirname (const prelude_client_profile_t *cp, char *buf, size_t size); void prelude_client_profile_get_profile_dirname (const prelude_client_profile_t *cp, char *buf, size_t size); void prelude_client_profile_get_default_config_dirname (const prelude_client_profile_t *cp, char *buf, size_t size); int prelude_client_profile_set_prefix (prelude_client_profile_t *cp, const char *prefix); void prelude_client_profile_get_prefix (const prelude_client_profile_t *cp, char *buf, size_t size); void prelude_client_profile_set_uid (prelude_client_profile_t *cp, prelude_uid_t uid); prelude_uid_t prelude_client_profile_get_uid (const prelude_client_profile_t *cp); void prelude_client_profile_set_gid (prelude_client_profile_t *cp, prelude_uid_t gid); prelude_gid_t prelude_client_profile_get_gid (const prelude_client_profile_t *cp); int prelude_client_profile_set_name (prelude_client_profile_t *cp, const char *name); const char * prelude_client_profile_get_name (const prelude_client_profile_t *cp); uint64_t prelude_client_profile_get_analyzerid (const prelude_client_profile_t *cp); void prelude_client_profile_set_analyzerid (prelude_client_profile_t *cp, uint64_t analyzerid); int prelude_client_profile_get_credentials (prelude_client_profile_t *cp, void **credentials); Description Details prelude_gid_t prelude_gid_t prelude_uid_t prelude_uid_t prelude_client_profile_t prelude_client_profile_ttypedef struct prelude_client_profile prelude_client_profile_t; prelude_client_profile_new () prelude_client_profile_newint prelude_client_profile_new (prelude_client_profile_t **ret, const char *name); Creates a new prelude_client_profile_t object and store its address into ret. ret : Pointer where to store the address of the created object. name : Name for this profile. Returns : 0 on success or a negative value if an error occured. prelude_client_profile_ref () prelude_client_profile_refprelude_client_profile_t * prelude_client_profile_ref (prelude_client_profile_t *cp); cp : Returns : prelude_client_profile_destroy () prelude_client_profile_destroyvoid prelude_client_profile_destroy (prelude_client_profile_t *cp); Destroys cp. cp : Pointer to a prelude_client_profile_t. prelude_client_profile_get_config_filename () prelude_client_profile_get_config_filenamevoid prelude_client_profile_get_config_filename (const prelude_client_profile_t *cp, char *buf, size_t size); Writes the filename used to store cp configuration template. cp : pointer on a prelude_client_profile_t object. buf : buffer to write the returned filename to. size : size of buf. prelude_client_profile_get_analyzerid_filename () prelude_client_profile_get_analyzerid_filenamevoid prelude_client_profile_get_analyzerid_filename (const prelude_client_profile_t *cp, char *buf, size_t size); Writes the filename used to store cp unique and permanent analyzer ident. cp : pointer on a prelude_client_profile_t object. buf : buffer to write the returned filename to. size : size of buf. prelude_client_profile_get_tls_key_filename () prelude_client_profile_get_tls_key_filenamevoid prelude_client_profile_get_tls_key_filename (const prelude_client_profile_t *cp, char *buf, size_t size); Writes the filename used to store cp private key. cp : pointer on a prelude_client_profile_t object. buf : buffer to write the returned filename to. size : size of buf. prelude_client_profile_get_tls_server_ca_cert_filename () prelude_client_profile_get_tls_server_ca_cert_filenamevoid prelude_client_profile_get_tls_server_ca_cert_filename (const prelude_client_profile_t *cp, char *buf, size_t size); Writes the filename used to store cp related CA certificate. This only apply to cp receiving connection from analyzer (server). cp : pointer on a prelude_client_profile_t object. buf : buffer to write the returned filename to. size : size of buf. prelude_client_profile_get_tls_server_keycert_filename () prelude_client_profile_get_tls_server_keycert_filenamevoid prelude_client_profile_get_tls_server_keycert_filename (const prelude_client_profile_t *cp, char *buf, size_t size); Writes the filename used to store certificate for cp server. This only apply to cp receiving connection from analyzer (server). cp : pointer on a prelude_client_profile_t object. buf : buffer to write the returned filename to. size : size of buf. prelude_client_profile_get_tls_server_crl_filename () prelude_client_profile_get_tls_server_crl_filenamevoid prelude_client_profile_get_tls_server_crl_filename (const prelude_client_profile_t *cp, char *buf, size_t size); Writes the filename used to store CRL for cp server. This only apply to cp receiving connection from analyzer (server). cp : pointer on a prelude_client_profile_t object. buf : buffer to write the returned filename to. size : size of buf. prelude_client_profile_get_tls_client_keycert_filename () prelude_client_profile_get_tls_client_keycert_filenamevoid prelude_client_profile_get_tls_client_keycert_filename (const prelude_client_profile_t *cp, char *buf, size_t size); Writes the filename used to store public certificate for cp private key. This only apply to client connecting to a peer. cp : pointer on a prelude_client_profile_t object. buf : buffer to write the returned filename to. size : size of buf. prelude_client_profile_get_tls_client_trusted_cert_filename () prelude_client_profile_get_tls_client_trusted_cert_filenamevoid prelude_client_profile_get_tls_client_trusted_cert_filename (const prelude_client_profile_t *cp, char *buf, size_t size); Writes the filename used to store peers public certificates that cp trust. This only apply to client connecting to a peer. cp : pointer on a prelude_client_profile_t object. buf : buffer to write the returned filename to. size : size of buf. prelude_client_profile_get_backup_dirname () prelude_client_profile_get_backup_dirnamevoid prelude_client_profile_get_backup_dirname (const prelude_client_profile_t *cp, char *buf, size_t size); Writes the directory name where the profile for cp is stored. If cp is NULL or has no name, then this function will provide the main profile directory. cp : pointer on a prelude_client_profile_t object. buf : buffer to write the returned filename to. size : size of buf. prelude_client_profile_get_profile_dirname () prelude_client_profile_get_profile_dirnamevoid prelude_client_profile_get_profile_dirname (const prelude_client_profile_t *cp, char *buf, size_t size); cp : buf : size : prelude_client_profile_get_default_config_dirname () prelude_client_profile_get_default_config_dirnamevoid prelude_client_profile_get_default_config_dirname (const prelude_client_profile_t *cp, char *buf, size_t size); cp : buf : size : prelude_client_profile_set_prefix () prelude_client_profile_set_prefixint prelude_client_profile_set_prefix (prelude_client_profile_t *cp, const char *prefix); This function allow to dynamically change the prefix used to acess libprelude related file. This is particularly usefull in case of application running under certain condition (chroot). cp : pointer on a prelude_client_profile_t object. prefix : Prefix to use for various libprelude files. Returns : 0 on success, a negative value if an error occured. prelude_client_profile_get_prefix () prelude_client_profile_get_prefixvoid prelude_client_profile_get_prefix (const prelude_client_profile_t *cp, char *buf, size_t size); Retrieve current prefix used with this profile. cp : pointer on a prelude_client_profile_t object. buf : buffer to write the returned filename to. size : size of buf. prelude_client_profile_set_uid () prelude_client_profile_set_uidvoid prelude_client_profile_set_uid (prelude_client_profile_t *cp, prelude_uid_t uid); Sets the UID used by cp to uid. cp : Pointer to a prelude_client_profile_t object. uid : UID to be used by cp. prelude_client_profile_get_uid () prelude_client_profile_get_uidprelude_uid_t prelude_client_profile_get_uid (const prelude_client_profile_t *cp); Gets the UID associated with cp. cp : Pointer to a prelude_client_profile_t object. Returns : the UID associated used by cp. prelude_client_profile_set_gid () prelude_client_profile_set_gidvoid prelude_client_profile_set_gid (prelude_client_profile_t *cp, prelude_uid_t gid); Sets the GID used by cp to gid. cp : Pointer to a prelude_client_profile_t object. gid : GID to be used by cp. prelude_client_profile_get_gid () prelude_client_profile_get_gidprelude_gid_t prelude_client_profile_get_gid (const prelude_client_profile_t *cp); Gets the GID associated with cp. cp : Pointer to a prelude_client_profile_t object. Returns : the GID associated used by cp. prelude_client_profile_set_name () prelude_client_profile_set_nameint prelude_client_profile_set_name (prelude_client_profile_t *cp, const char *name); Sets the prelude client profile name. cp : Pointer to a prelude_client_profile_t object. name : Name to associate the profile with. Returns : 0 on success or a negative value if an error occured. prelude_client_profile_get_name () prelude_client_profile_get_nameconst char * prelude_client_profile_get_name (const prelude_client_profile_t *cp); Gets the name of cp client profile. cp : Pointer to a prelude_client_profile_t object. Returns : the name used by cp. prelude_client_profile_get_analyzerid () prelude_client_profile_get_analyzeriduint64_t prelude_client_profile_get_analyzerid (const prelude_client_profile_t *cp); Gets the unique and permanent analyzer ident associated with cp. cp : Pointer to a prelude_client_profile_t object. Returns : the analyzer ident used by cp. prelude_client_profile_set_analyzerid () prelude_client_profile_set_analyzeridvoid prelude_client_profile_set_analyzerid (prelude_client_profile_t *cp, uint64_t analyzerid); Sets the Analyzer ID used by cp to analyzerid. cp : Pointer to a prelude_client_profile_t object. analyzerid : Analyzer ID to be used by cp. prelude_client_profile_get_credentials () prelude_client_profile_get_credentialsint prelude_client_profile_get_credentials (prelude_client_profile_t *cp, void **credentials); cp : credentials : Returns : libprelude-1.0.0/docs/api/xml/idmef-additional-data.xml0000664000076400007640000010565311347714755017746 00000000000000 idmef-additional-data 3 LIBPRELUDE Library idmef-additional-data Synopsis int idmef_additional_data_new_real (idmef_additional_data_t **ret, float data); int idmef_additional_data_new_byte (idmef_additional_data_t **ret, uint8_t byte); int idmef_additional_data_new_integer (idmef_additional_data_t **ret, uint32_t data); int idmef_additional_data_new_boolean (idmef_additional_data_t **ret, prelude_bool_t data); int idmef_additional_data_new_character (idmef_additional_data_t **ret, char data); void idmef_additional_data_set_real (idmef_additional_data_t *ptr, float data); void idmef_additional_data_set_byte (idmef_additional_data_t *ptr, uint8_t byte); void idmef_additional_data_set_integer (idmef_additional_data_t *ptr, uint32_t data); void idmef_additional_data_set_boolean (idmef_additional_data_t *ptr, prelude_bool_t data); void idmef_additional_data_set_character (idmef_additional_data_t *ptr, char data); int idmef_additional_data_new_byte_string_ref (idmef_additional_data_t **ad, unsigned char *data, size_t len); int idmef_additional_data_set_byte_string_ref (idmef_additional_data_t *ad, unsigned char *data, size_t len); int idmef_additional_data_new_byte_string_dup (idmef_additional_data_t **ad, unsigned char *data, size_t len); int idmef_additional_data_set_byte_string_dup (idmef_additional_data_t *ad, unsigned char *data, size_t len); int idmef_additional_data_new_byte_string_nodup (idmef_additional_data_t **ad, unsigned char *data, size_t len); int idmef_additional_data_set_byte_string_nodup (idmef_additional_data_t *ad, unsigned char *data, size_t len); int idmef_additional_data_copy_ref (idmef_additional_data_t *src, idmef_additional_data_t *dst); int idmef_additional_data_copy_dup (idmef_additional_data_t *src, idmef_additional_data_t *dst); float idmef_additional_data_get_real (idmef_additional_data_t *data); uint32_t idmef_additional_data_get_integer (idmef_additional_data_t *data); prelude_bool_t idmef_additional_data_get_boolean (idmef_additional_data_t *data); char idmef_additional_data_get_character (idmef_additional_data_t *data); uint8_t idmef_additional_data_get_byte (idmef_additional_data_t *data); size_t idmef_additional_data_get_len (idmef_additional_data_t *data); prelude_bool_t idmef_additional_data_is_empty (idmef_additional_data_t *data); int idmef_additional_data_data_to_string (idmef_additional_data_t *ad, prelude_string_t *out); Description Details idmef_additional_data_new_real () idmef_additional_data_new_realint idmef_additional_data_new_real (idmef_additional_data_t **ret, float data); ret : data : Returns : idmef_additional_data_new_byte () idmef_additional_data_new_byteint idmef_additional_data_new_byte (idmef_additional_data_t **ret, uint8_t byte); ret : byte : Returns : idmef_additional_data_new_integer () idmef_additional_data_new_integerint idmef_additional_data_new_integer (idmef_additional_data_t **ret, uint32_t data); ret : data : Returns : idmef_additional_data_new_boolean () idmef_additional_data_new_booleanint idmef_additional_data_new_boolean (idmef_additional_data_t **ret, prelude_bool_t data); ret : data : Returns : idmef_additional_data_new_character () idmef_additional_data_new_characterint idmef_additional_data_new_character (idmef_additional_data_t **ret, char data); ret : data : Returns : idmef_additional_data_set_real () idmef_additional_data_set_realvoid idmef_additional_data_set_real (idmef_additional_data_t *ptr, float data); ptr : data : idmef_additional_data_set_byte () idmef_additional_data_set_bytevoid idmef_additional_data_set_byte (idmef_additional_data_t *ptr, uint8_t byte); ptr : byte : idmef_additional_data_set_integer () idmef_additional_data_set_integervoid idmef_additional_data_set_integer (idmef_additional_data_t *ptr, uint32_t data); ptr : data : idmef_additional_data_set_boolean () idmef_additional_data_set_booleanvoid idmef_additional_data_set_boolean (idmef_additional_data_t *ptr, prelude_bool_t data); ptr : data : idmef_additional_data_set_character () idmef_additional_data_set_charactervoid idmef_additional_data_set_character (idmef_additional_data_t *ptr, char data); ptr : data : idmef_additional_data_new_byte_string_ref () idmef_additional_data_new_byte_string_refint idmef_additional_data_new_byte_string_ref (idmef_additional_data_t **ad, unsigned char *data, size_t len); ad : data : len : Returns : idmef_additional_data_set_byte_string_ref () idmef_additional_data_set_byte_string_refint idmef_additional_data_set_byte_string_ref (idmef_additional_data_t *ad, unsigned char *data, size_t len); ad : data : len : Returns : idmef_additional_data_new_byte_string_dup () idmef_additional_data_new_byte_string_dupint idmef_additional_data_new_byte_string_dup (idmef_additional_data_t **ad, unsigned char *data, size_t len); ad : data : len : Returns : idmef_additional_data_set_byte_string_dup () idmef_additional_data_set_byte_string_dupint idmef_additional_data_set_byte_string_dup (idmef_additional_data_t *ad, unsigned char *data, size_t len); ad : data : len : Returns : idmef_additional_data_new_byte_string_nodup () idmef_additional_data_new_byte_string_nodupint idmef_additional_data_new_byte_string_nodup (idmef_additional_data_t **ad, unsigned char *data, size_t len); ad : data : len : Returns : idmef_additional_data_set_byte_string_nodup () idmef_additional_data_set_byte_string_nodupint idmef_additional_data_set_byte_string_nodup (idmef_additional_data_t *ad, unsigned char *data, size_t len); ad : data : len : Returns : idmef_additional_data_copy_ref () idmef_additional_data_copy_refint idmef_additional_data_copy_ref (idmef_additional_data_t *src, idmef_additional_data_t *dst); src : dst : Returns : idmef_additional_data_copy_dup () idmef_additional_data_copy_dupint idmef_additional_data_copy_dup (idmef_additional_data_t *src, idmef_additional_data_t *dst); src : dst : Returns : idmef_additional_data_get_real () idmef_additional_data_get_realfloat idmef_additional_data_get_real (idmef_additional_data_t *data); data : Returns : idmef_additional_data_get_integer () idmef_additional_data_get_integeruint32_t idmef_additional_data_get_integer (idmef_additional_data_t *data); data : Returns : idmef_additional_data_get_boolean () idmef_additional_data_get_booleanprelude_bool_t idmef_additional_data_get_boolean (idmef_additional_data_t *data); data : Returns : idmef_additional_data_get_character () idmef_additional_data_get_characterchar idmef_additional_data_get_character (idmef_additional_data_t *data); data : Returns : idmef_additional_data_get_byte () idmef_additional_data_get_byteuint8_t idmef_additional_data_get_byte (idmef_additional_data_t *data); data : Returns : idmef_additional_data_get_len () idmef_additional_data_get_lensize_t idmef_additional_data_get_len (idmef_additional_data_t *data); data : Returns : idmef_additional_data_is_empty () idmef_additional_data_is_emptyprelude_bool_t idmef_additional_data_is_empty (idmef_additional_data_t *data); data : Returns : idmef_additional_data_data_to_string () idmef_additional_data_data_to_stringint idmef_additional_data_data_to_string (idmef_additional_data_t *ad, prelude_string_t *out); ad : out : Returns : libprelude-1.0.0/docs/api/xml/api-index-full.xml0000664000076400007640000077531011347714755016466 00000000000000 D data I idmef_action_category_t idmef_action_category_to_numeric idmef_action_category_to_string idmef_action_clone idmef_action_compare idmef_action_copy idmef_action_destroy idmef_action_get_category idmef_action_get_description idmef_action_new idmef_action_new_category idmef_action_new_description idmef_action_print idmef_action_read idmef_action_ref idmef_action_set_category idmef_action_set_description idmef_action_t idmef_action_write idmef_additional_data_clone idmef_additional_data_compare idmef_additional_data_copy idmef_additional_data_copy_dup idmef_additional_data_copy_ref idmef_additional_data_data_to_string idmef_additional_data_destroy idmef_additional_data_get_boolean idmef_additional_data_get_byte idmef_additional_data_get_character idmef_additional_data_get_data idmef_additional_data_get_integer idmef_additional_data_get_len idmef_additional_data_get_meaning idmef_additional_data_get_real idmef_additional_data_get_type idmef_additional_data_is_empty idmef_additional_data_new idmef_additional_data_new_boolean idmef_additional_data_new_byte idmef_additional_data_new_byte_string_dup idmef_additional_data_new_byte_string_nodup idmef_additional_data_new_byte_string_ref idmef_additional_data_new_character idmef_additional_data_new_data idmef_additional_data_new_integer idmef_additional_data_new_meaning idmef_additional_data_new_real idmef_additional_data_new_type idmef_additional_data_print idmef_additional_data_read idmef_additional_data_ref idmef_additional_data_set_boolean idmef_additional_data_set_byte idmef_additional_data_set_byte_string_dup idmef_additional_data_set_byte_string_nodup idmef_additional_data_set_byte_string_ref idmef_additional_data_set_character idmef_additional_data_set_data idmef_additional_data_set_integer idmef_additional_data_set_meaning idmef_additional_data_set_real idmef_additional_data_set_type idmef_additional_data_t idmef_additional_data_type_t idmef_additional_data_type_to_numeric idmef_additional_data_type_to_string idmef_additional_data_write idmef_address_category_t idmef_address_category_to_numeric idmef_address_category_to_string idmef_address_clone idmef_address_compare idmef_address_copy idmef_address_destroy idmef_address_get_address idmef_address_get_category idmef_address_get_ident idmef_address_get_netmask idmef_address_get_vlan_name idmef_address_get_vlan_num idmef_address_new idmef_address_new_address idmef_address_new_category idmef_address_new_ident idmef_address_new_netmask idmef_address_new_vlan_name idmef_address_new_vlan_num idmef_address_print idmef_address_read idmef_address_ref idmef_address_set_address idmef_address_set_category idmef_address_set_ident idmef_address_set_netmask idmef_address_set_vlan_name idmef_address_set_vlan_num idmef_address_t idmef_address_unset_vlan_num idmef_address_write idmef_alertident_clone idmef_alertident_compare idmef_alertident_copy idmef_alertident_destroy idmef_alertident_get_alertident idmef_alertident_get_analyzerid idmef_alertident_new idmef_alertident_new_alertident idmef_alertident_new_analyzerid idmef_alertident_print idmef_alertident_read idmef_alertident_ref idmef_alertident_set_alertident idmef_alertident_set_analyzerid idmef_alertident_t idmef_alertident_write idmef_alert_clone idmef_alert_compare idmef_alert_copy idmef_alert_destroy idmef_alert_get_analyzer_time idmef_alert_get_assessment idmef_alert_get_classification idmef_alert_get_correlation_alert idmef_alert_get_create_time idmef_alert_get_detect_time idmef_alert_get_messageid idmef_alert_get_next_additional_data idmef_alert_get_next_analyzer idmef_alert_get_next_source idmef_alert_get_next_target idmef_alert_get_overflow_alert idmef_alert_get_tool_alert idmef_alert_get_type idmef_alert_new idmef_alert_new_additional_data idmef_alert_new_analyzer idmef_alert_new_analyzer_time idmef_alert_new_assessment idmef_alert_new_classification idmef_alert_new_correlation_alert idmef_alert_new_create_time idmef_alert_new_detect_time idmef_alert_new_messageid idmef_alert_new_overflow_alert idmef_alert_new_source idmef_alert_new_target idmef_alert_new_tool_alert idmef_alert_print idmef_alert_read idmef_alert_ref idmef_alert_set_additional_data idmef_alert_set_analyzer idmef_alert_set_analyzer_time idmef_alert_set_assessment idmef_alert_set_classification idmef_alert_set_correlation_alert idmef_alert_set_create_time idmef_alert_set_detect_time idmef_alert_set_messageid idmef_alert_set_overflow_alert idmef_alert_set_source idmef_alert_set_target idmef_alert_set_tool_alert idmef_alert_t idmef_alert_type_t idmef_alert_type_to_numeric idmef_alert_type_to_string idmef_alert_write idmef_analyzer_clone idmef_analyzer_compare idmef_analyzer_copy idmef_analyzer_destroy idmef_analyzer_get_analyzerid idmef_analyzer_get_class idmef_analyzer_get_manufacturer idmef_analyzer_get_model idmef_analyzer_get_name idmef_analyzer_get_node idmef_analyzer_get_ostype idmef_analyzer_get_osversion idmef_analyzer_get_process idmef_analyzer_get_version idmef_analyzer_new idmef_analyzer_new_analyzerid idmef_analyzer_new_class idmef_analyzer_new_manufacturer idmef_analyzer_new_model idmef_analyzer_new_name idmef_analyzer_new_node idmef_analyzer_new_ostype idmef_analyzer_new_osversion idmef_analyzer_new_process idmef_analyzer_new_version idmef_analyzer_print idmef_analyzer_read idmef_analyzer_ref idmef_analyzer_set_analyzerid idmef_analyzer_set_class idmef_analyzer_set_manufacturer idmef_analyzer_set_model idmef_analyzer_set_name idmef_analyzer_set_node idmef_analyzer_set_ostype idmef_analyzer_set_osversion idmef_analyzer_set_process idmef_analyzer_set_version idmef_analyzer_t idmef_analyzer_write idmef_assessment_clone idmef_assessment_compare idmef_assessment_copy idmef_assessment_destroy idmef_assessment_get_confidence idmef_assessment_get_impact idmef_assessment_get_next_action idmef_assessment_new idmef_assessment_new_action idmef_assessment_new_confidence idmef_assessment_new_impact idmef_assessment_print idmef_assessment_read idmef_assessment_ref idmef_assessment_set_action idmef_assessment_set_confidence idmef_assessment_set_impact idmef_assessment_t idmef_assessment_write idmef_checksum_algorithm_t idmef_checksum_algorithm_to_numeric idmef_checksum_algorithm_to_string idmef_checksum_clone idmef_checksum_compare idmef_checksum_copy idmef_checksum_destroy idmef_checksum_get_algorithm idmef_checksum_get_key idmef_checksum_get_value idmef_checksum_new idmef_checksum_new_algorithm idmef_checksum_new_key idmef_checksum_new_value idmef_checksum_print idmef_checksum_read idmef_checksum_ref idmef_checksum_set_algorithm idmef_checksum_set_key idmef_checksum_set_value idmef_checksum_t idmef_checksum_write idmef_classification_clone idmef_classification_compare idmef_classification_copy idmef_classification_destroy idmef_classification_get_ident idmef_classification_get_next_reference idmef_classification_get_text idmef_classification_new idmef_classification_new_ident idmef_classification_new_reference idmef_classification_new_text idmef_classification_print idmef_classification_read idmef_classification_ref idmef_classification_set_ident idmef_classification_set_reference idmef_classification_set_text idmef_classification_t idmef_classification_write IDMEF_CLASS_ID_ACTION IDMEF_CLASS_ID_ACTION_CATEGORY IDMEF_CLASS_ID_ADDITIONAL_DATA IDMEF_CLASS_ID_ADDITIONAL_DATA_TYPE IDMEF_CLASS_ID_ADDRESS IDMEF_CLASS_ID_ADDRESS_CATEGORY IDMEF_CLASS_ID_ALERT IDMEF_CLASS_ID_ALERTIDENT IDMEF_CLASS_ID_ALERT_TYPE IDMEF_CLASS_ID_ANALYZER IDMEF_CLASS_ID_ASSESSMENT IDMEF_CLASS_ID_CHECKSUM IDMEF_CLASS_ID_CHECKSUM_ALGORITHM IDMEF_CLASS_ID_CLASSIFICATION IDMEF_CLASS_ID_CONFIDENCE IDMEF_CLASS_ID_CONFIDENCE_RATING IDMEF_CLASS_ID_CORRELATION_ALERT IDMEF_CLASS_ID_FILE IDMEF_CLASS_ID_FILE_ACCESS IDMEF_CLASS_ID_FILE_CATEGORY IDMEF_CLASS_ID_FILE_FSTYPE IDMEF_CLASS_ID_HEARTBEAT IDMEF_CLASS_ID_IMPACT IDMEF_CLASS_ID_IMPACT_COMPLETION IDMEF_CLASS_ID_IMPACT_SEVERITY IDMEF_CLASS_ID_IMPACT_TYPE IDMEF_CLASS_ID_INODE IDMEF_CLASS_ID_LINKAGE IDMEF_CLASS_ID_LINKAGE_CATEGORY IDMEF_CLASS_ID_MESSAGE IDMEF_CLASS_ID_MESSAGE_TYPE IDMEF_CLASS_ID_NODE IDMEF_CLASS_ID_NODE_CATEGORY IDMEF_CLASS_ID_OVERFLOW_ALERT IDMEF_CLASS_ID_PROCESS IDMEF_CLASS_ID_REFERENCE IDMEF_CLASS_ID_REFERENCE_ORIGIN IDMEF_CLASS_ID_SERVICE IDMEF_CLASS_ID_SERVICE_TYPE IDMEF_CLASS_ID_SNMP_SERVICE IDMEF_CLASS_ID_SOURCE IDMEF_CLASS_ID_SOURCE_SPOOFED IDMEF_CLASS_ID_TARGET IDMEF_CLASS_ID_TARGET_DECOY IDMEF_CLASS_ID_TOOL_ALERT IDMEF_CLASS_ID_USER IDMEF_CLASS_ID_USER_CATEGORY IDMEF_CLASS_ID_USER_ID IDMEF_CLASS_ID_USER_ID_TYPE IDMEF_CLASS_ID_WEB_SERVICE idmef_confidence_clone idmef_confidence_compare idmef_confidence_copy idmef_confidence_destroy idmef_confidence_get_confidence idmef_confidence_get_rating idmef_confidence_new idmef_confidence_new_confidence idmef_confidence_new_rating idmef_confidence_print idmef_confidence_rating_t idmef_confidence_rating_to_numeric idmef_confidence_rating_to_string idmef_confidence_read idmef_confidence_ref idmef_confidence_set_confidence idmef_confidence_set_rating idmef_confidence_t idmef_confidence_write idmef_correlation_alert_clone idmef_correlation_alert_compare idmef_correlation_alert_copy idmef_correlation_alert_destroy idmef_correlation_alert_get_name idmef_correlation_alert_get_next_alertident idmef_correlation_alert_new idmef_correlation_alert_new_alertident idmef_correlation_alert_new_name idmef_correlation_alert_print idmef_correlation_alert_read idmef_correlation_alert_ref idmef_correlation_alert_set_alertident idmef_correlation_alert_set_name idmef_correlation_alert_t idmef_correlation_alert_write idmef_criteria_and_criteria idmef_criteria_clone idmef_criteria_destroy idmef_criteria_get_and idmef_criteria_get_criterion idmef_criteria_get_negation idmef_criteria_get_or idmef_criteria_is_criterion idmef_criteria_match idmef_criteria_new idmef_criteria_new_from_string idmef_criteria_or_criteria idmef_criteria_print idmef_criteria_ref idmef_criteria_set_criterion idmef_criteria_set_negation idmef_criteria_t idmef_criteria_to_string idmef_criterion_clone idmef_criterion_destroy idmef_criterion_get_operator idmef_criterion_get_path idmef_criterion_get_value idmef_criterion_match idmef_criterion_new idmef_criterion_operator_t idmef_criterion_operator_to_string idmef_criterion_print idmef_criterion_t idmef_criterion_to_string idmef_criterion_value_clone idmef_criterion_value_destroy idmef_criterion_value_get_broken_down_time idmef_criterion_value_get_regex idmef_criterion_value_get_type idmef_criterion_value_get_value idmef_criterion_value_match idmef_criterion_value_new idmef_criterion_value_new_broken_down_time idmef_criterion_value_new_from_string idmef_criterion_value_new_regex idmef_criterion_value_new_value idmef_criterion_value_print idmef_criterion_value_t idmef_criterion_value_to_string idmef_criterion_value_type_t idmef_data_clone idmef_data_compare idmef_data_copy_dup idmef_data_copy_ref idmef_data_destroy idmef_data_destroy_internal idmef_data_get_byte idmef_data_get_byte_string idmef_data_get_char idmef_data_get_char_string idmef_data_get_data idmef_data_get_float idmef_data_get_len idmef_data_get_type idmef_data_get_uint32 idmef_data_get_uint64 idmef_data_is_empty idmef_data_new idmef_data_new_byte idmef_data_new_byte_string_dup idmef_data_new_byte_string_nodup idmef_data_new_byte_string_ref idmef_data_new_char idmef_data_new_char_string_dup idmef_data_new_char_string_dup_fast idmef_data_new_char_string_nodup idmef_data_new_char_string_nodup_fast idmef_data_new_char_string_ref idmef_data_new_char_string_ref_fast idmef_data_new_float idmef_data_new_ptr_dup_fast idmef_data_new_ptr_nodup_fast idmef_data_new_ptr_ref_fast idmef_data_new_uint32 idmef_data_new_uint64 idmef_data_ref idmef_data_set_byte idmef_data_set_byte_string_dup idmef_data_set_byte_string_nodup idmef_data_set_byte_string_ref idmef_data_set_char idmef_data_set_char_string_constant idmef_data_set_char_string_dup idmef_data_set_char_string_dup_fast idmef_data_set_char_string_nodup idmef_data_set_char_string_nodup_fast idmef_data_set_char_string_ref idmef_data_set_char_string_ref_fast idmef_data_set_float idmef_data_set_ptr_dup_fast idmef_data_set_ptr_nodup_fast idmef_data_set_ptr_ref_fast idmef_data_set_uint32 idmef_data_set_uint64 idmef_data_to_string idmef_data_type_t idmef_file_access_clone idmef_file_access_compare idmef_file_access_copy idmef_file_access_destroy idmef_file_access_get_next_permission idmef_file_access_get_user_id idmef_file_access_new idmef_file_access_new_permission idmef_file_access_new_user_id idmef_file_access_print idmef_file_access_read idmef_file_access_ref idmef_file_access_set_permission idmef_file_access_set_user_id idmef_file_access_t idmef_file_access_write idmef_file_category_t idmef_file_category_to_numeric idmef_file_category_to_string idmef_file_clone idmef_file_compare idmef_file_copy idmef_file_destroy idmef_file_fstype_t idmef_file_fstype_to_numeric idmef_file_fstype_to_string idmef_file_get_access_time idmef_file_get_category idmef_file_get_create_time idmef_file_get_data_size idmef_file_get_disk_size idmef_file_get_file_type idmef_file_get_fstype idmef_file_get_ident idmef_file_get_inode idmef_file_get_modify_time idmef_file_get_name idmef_file_get_next_checksum idmef_file_get_next_file_access idmef_file_get_next_linkage idmef_file_get_path idmef_file_new idmef_file_new_access_time idmef_file_new_category idmef_file_new_checksum idmef_file_new_create_time idmef_file_new_data_size idmef_file_new_disk_size idmef_file_new_file_access idmef_file_new_file_type idmef_file_new_fstype idmef_file_new_ident idmef_file_new_inode idmef_file_new_linkage idmef_file_new_modify_time idmef_file_new_name idmef_file_new_path idmef_file_print idmef_file_read idmef_file_ref idmef_file_set_access_time idmef_file_set_category idmef_file_set_checksum idmef_file_set_create_time idmef_file_set_data_size idmef_file_set_disk_size idmef_file_set_file_access idmef_file_set_file_type idmef_file_set_fstype idmef_file_set_ident idmef_file_set_inode idmef_file_set_linkage idmef_file_set_modify_time idmef_file_set_name idmef_file_set_path idmef_file_t idmef_file_unset_data_size idmef_file_unset_disk_size idmef_file_unset_fstype idmef_file_write idmef_heartbeat_clone idmef_heartbeat_compare idmef_heartbeat_copy idmef_heartbeat_destroy idmef_heartbeat_get_analyzer_time idmef_heartbeat_get_create_time idmef_heartbeat_get_heartbeat_interval idmef_heartbeat_get_messageid idmef_heartbeat_get_next_additional_data idmef_heartbeat_get_next_analyzer idmef_heartbeat_new idmef_heartbeat_new_additional_data idmef_heartbeat_new_analyzer idmef_heartbeat_new_analyzer_time idmef_heartbeat_new_create_time idmef_heartbeat_new_heartbeat_interval idmef_heartbeat_new_messageid idmef_heartbeat_print idmef_heartbeat_read idmef_heartbeat_ref idmef_heartbeat_set_additional_data idmef_heartbeat_set_analyzer idmef_heartbeat_set_analyzer_time idmef_heartbeat_set_create_time idmef_heartbeat_set_heartbeat_interval idmef_heartbeat_set_messageid idmef_heartbeat_t idmef_heartbeat_unset_heartbeat_interval idmef_heartbeat_write idmef_impact_clone idmef_impact_compare idmef_impact_completion_t idmef_impact_completion_to_numeric idmef_impact_completion_to_string idmef_impact_copy idmef_impact_destroy idmef_impact_get_completion idmef_impact_get_description idmef_impact_get_severity idmef_impact_get_type idmef_impact_new idmef_impact_new_completion idmef_impact_new_description idmef_impact_new_severity idmef_impact_new_type idmef_impact_print idmef_impact_read idmef_impact_ref idmef_impact_set_completion idmef_impact_set_description idmef_impact_set_severity idmef_impact_set_type idmef_impact_severity_t idmef_impact_severity_to_numeric idmef_impact_severity_to_string idmef_impact_t idmef_impact_type_t idmef_impact_type_to_numeric idmef_impact_type_to_string idmef_impact_unset_completion idmef_impact_unset_severity idmef_impact_write idmef_inode_clone idmef_inode_compare idmef_inode_copy idmef_inode_destroy idmef_inode_get_change_time idmef_inode_get_c_major_device idmef_inode_get_c_minor_device idmef_inode_get_major_device idmef_inode_get_minor_device idmef_inode_get_number idmef_inode_new idmef_inode_new_change_time idmef_inode_new_c_major_device idmef_inode_new_c_minor_device idmef_inode_new_major_device idmef_inode_new_minor_device idmef_inode_new_number idmef_inode_print idmef_inode_read idmef_inode_ref idmef_inode_set_change_time idmef_inode_set_c_major_device idmef_inode_set_c_minor_device idmef_inode_set_major_device idmef_inode_set_minor_device idmef_inode_set_number idmef_inode_t idmef_inode_unset_c_major_device idmef_inode_unset_c_minor_device idmef_inode_unset_major_device idmef_inode_unset_minor_device idmef_inode_unset_number idmef_inode_write idmef_linkage_category_t idmef_linkage_category_to_numeric idmef_linkage_category_to_string idmef_linkage_clone idmef_linkage_compare idmef_linkage_copy idmef_linkage_destroy idmef_linkage_get_category idmef_linkage_get_file idmef_linkage_get_name idmef_linkage_get_path idmef_linkage_new idmef_linkage_new_category idmef_linkage_new_file idmef_linkage_new_name idmef_linkage_new_path idmef_linkage_print idmef_linkage_read idmef_linkage_ref idmef_linkage_set_category idmef_linkage_set_file idmef_linkage_set_name idmef_linkage_set_path idmef_linkage_t idmef_linkage_write IDMEF_LIST_APPEND IDMEF_LIST_PREPEND idmef_message_clone idmef_message_compare idmef_message_copy idmef_message_destroy idmef_message_get_alert idmef_message_get_data idmef_message_get_heartbeat idmef_message_get_number idmef_message_get_pmsg idmef_message_get_string idmef_message_get_type idmef_message_get_value idmef_message_get_version idmef_message_new idmef_message_new_alert idmef_message_new_heartbeat idmef_message_new_version idmef_message_print idmef_message_read idmef_message_ref idmef_message_set_alert idmef_message_set_data idmef_message_set_heartbeat idmef_message_set_number idmef_message_set_pmsg idmef_message_set_string idmef_message_set_value idmef_message_set_version idmef_message_t idmef_message_type_t idmef_message_type_to_numeric idmef_message_type_to_string idmef_message_write idmef_node_category_t idmef_node_category_to_numeric idmef_node_category_to_string idmef_node_clone idmef_node_compare idmef_node_copy idmef_node_destroy idmef_node_get_category idmef_node_get_ident idmef_node_get_location idmef_node_get_name idmef_node_get_next_address idmef_node_new idmef_node_new_address idmef_node_new_category idmef_node_new_ident idmef_node_new_location idmef_node_new_name idmef_node_print idmef_node_read idmef_node_ref idmef_node_set_address idmef_node_set_category idmef_node_set_ident idmef_node_set_location idmef_node_set_name idmef_node_t idmef_node_write idmef_overflow_alert_clone idmef_overflow_alert_compare idmef_overflow_alert_copy idmef_overflow_alert_destroy idmef_overflow_alert_get_buffer idmef_overflow_alert_get_program idmef_overflow_alert_get_size idmef_overflow_alert_new idmef_overflow_alert_new_buffer idmef_overflow_alert_new_program idmef_overflow_alert_new_size idmef_overflow_alert_print idmef_overflow_alert_read idmef_overflow_alert_ref idmef_overflow_alert_set_buffer idmef_overflow_alert_set_program idmef_overflow_alert_set_size idmef_overflow_alert_t idmef_overflow_alert_unset_size idmef_overflow_alert_write idmef_path_check_operator idmef_path_clone idmef_path_compare idmef_path_destroy idmef_path_get idmef_path_get_applicable_operators idmef_path_get_class idmef_path_get_depth idmef_path_get_index idmef_path_get_name idmef_path_get_value_type idmef_path_has_lists idmef_path_is_ambiguous idmef_path_is_list idmef_path_make_child idmef_path_make_parent idmef_path_ncompare idmef_path_new idmef_path_new_fast idmef_path_new_v idmef_path_ref idmef_path_set idmef_path_set_index idmef_path_t idmef_path_undefine_index idmef_process_clone idmef_process_compare idmef_process_copy idmef_process_destroy idmef_process_get_ident idmef_process_get_name idmef_process_get_next_arg idmef_process_get_next_env idmef_process_get_path idmef_process_get_pid idmef_process_new idmef_process_new_arg idmef_process_new_env idmef_process_new_ident idmef_process_new_name idmef_process_new_path idmef_process_new_pid idmef_process_print idmef_process_read idmef_process_ref idmef_process_set_arg idmef_process_set_env idmef_process_set_ident idmef_process_set_name idmef_process_set_path idmef_process_set_pid idmef_process_t idmef_process_unset_pid idmef_process_write idmef_reference_clone idmef_reference_compare idmef_reference_copy idmef_reference_destroy idmef_reference_get_meaning idmef_reference_get_name idmef_reference_get_origin idmef_reference_get_url idmef_reference_new idmef_reference_new_meaning idmef_reference_new_name idmef_reference_new_origin idmef_reference_new_url idmef_reference_origin_t idmef_reference_origin_to_numeric idmef_reference_origin_to_string idmef_reference_print idmef_reference_read idmef_reference_ref idmef_reference_set_meaning idmef_reference_set_name idmef_reference_set_origin idmef_reference_set_url idmef_reference_t idmef_reference_write idmef_service_clone idmef_service_compare idmef_service_copy idmef_service_destroy idmef_service_get_iana_protocol_name idmef_service_get_iana_protocol_number idmef_service_get_ident idmef_service_get_ip_version idmef_service_get_name idmef_service_get_port idmef_service_get_portlist idmef_service_get_protocol idmef_service_get_snmp_service idmef_service_get_type idmef_service_get_web_service idmef_service_new idmef_service_new_iana_protocol_name idmef_service_new_iana_protocol_number idmef_service_new_ident idmef_service_new_ip_version idmef_service_new_name idmef_service_new_port idmef_service_new_portlist idmef_service_new_protocol idmef_service_new_snmp_service idmef_service_new_web_service idmef_service_print idmef_service_read idmef_service_ref idmef_service_set_iana_protocol_name idmef_service_set_iana_protocol_number idmef_service_set_ident idmef_service_set_ip_version idmef_service_set_name idmef_service_set_port idmef_service_set_portlist idmef_service_set_protocol idmef_service_set_snmp_service idmef_service_set_web_service idmef_service_t idmef_service_type_t idmef_service_type_to_numeric idmef_service_type_to_string idmef_service_unset_iana_protocol_number idmef_service_unset_ip_version idmef_service_unset_port idmef_service_write idmef_snmp_service_clone idmef_snmp_service_compare idmef_snmp_service_copy idmef_snmp_service_destroy idmef_snmp_service_get_command idmef_snmp_service_get_community idmef_snmp_service_get_context_engine_id idmef_snmp_service_get_context_name idmef_snmp_service_get_message_processing_model idmef_snmp_service_get_oid idmef_snmp_service_get_security_level idmef_snmp_service_get_security_model idmef_snmp_service_get_security_name idmef_snmp_service_new idmef_snmp_service_new_command idmef_snmp_service_new_community idmef_snmp_service_new_context_engine_id idmef_snmp_service_new_context_name idmef_snmp_service_new_message_processing_model idmef_snmp_service_new_oid idmef_snmp_service_new_security_level idmef_snmp_service_new_security_model idmef_snmp_service_new_security_name idmef_snmp_service_print idmef_snmp_service_read idmef_snmp_service_ref idmef_snmp_service_set_command idmef_snmp_service_set_community idmef_snmp_service_set_context_engine_id idmef_snmp_service_set_context_name idmef_snmp_service_set_message_processing_model idmef_snmp_service_set_oid idmef_snmp_service_set_security_level idmef_snmp_service_set_security_model idmef_snmp_service_set_security_name idmef_snmp_service_t idmef_snmp_service_unset_message_processing_model idmef_snmp_service_unset_security_level idmef_snmp_service_unset_security_model idmef_snmp_service_write idmef_source_clone idmef_source_compare idmef_source_copy idmef_source_destroy idmef_source_get_ident idmef_source_get_interface idmef_source_get_node idmef_source_get_process idmef_source_get_service idmef_source_get_spoofed idmef_source_get_user idmef_source_new idmef_source_new_ident idmef_source_new_interface idmef_source_new_node idmef_source_new_process idmef_source_new_service idmef_source_new_spoofed idmef_source_new_user idmef_source_print idmef_source_read idmef_source_ref idmef_source_set_ident idmef_source_set_interface idmef_source_set_node idmef_source_set_process idmef_source_set_service idmef_source_set_spoofed idmef_source_set_user idmef_source_spoofed_t idmef_source_spoofed_to_numeric idmef_source_spoofed_to_string idmef_source_t idmef_source_write idmef_target_clone idmef_target_compare idmef_target_copy idmef_target_decoy_t idmef_target_decoy_to_numeric idmef_target_decoy_to_string idmef_target_destroy idmef_target_get_decoy idmef_target_get_ident idmef_target_get_interface idmef_target_get_next_file idmef_target_get_node idmef_target_get_process idmef_target_get_service idmef_target_get_user idmef_target_new idmef_target_new_decoy idmef_target_new_file idmef_target_new_ident idmef_target_new_interface idmef_target_new_node idmef_target_new_process idmef_target_new_service idmef_target_new_user idmef_target_print idmef_target_read idmef_target_ref idmef_target_set_decoy idmef_target_set_file idmef_target_set_ident idmef_target_set_interface idmef_target_set_node idmef_target_set_process idmef_target_set_service idmef_target_set_user idmef_target_t idmef_target_write idmef_time_clone idmef_time_compare idmef_time_copy idmef_time_destroy idmef_time_destroy_internal idmef_time_get_gmt_offset idmef_time_get_sec idmef_time_get_usec idmef_time_new idmef_time_new_from_gettimeofday idmef_time_new_from_ntpstamp idmef_time_new_from_string idmef_time_new_from_time idmef_time_new_from_timeval idmef_time_ref idmef_time_set_from_gettimeofday idmef_time_set_from_ntpstamp idmef_time_set_from_string idmef_time_set_from_time idmef_time_set_from_timeval idmef_time_set_gmt_offset idmef_time_set_sec idmef_time_set_usec idmef_time_t idmef_time_to_ntpstamp idmef_time_to_string idmef_tool_alert_clone idmef_tool_alert_compare idmef_tool_alert_copy idmef_tool_alert_destroy idmef_tool_alert_get_command idmef_tool_alert_get_name idmef_tool_alert_get_next_alertident idmef_tool_alert_new idmef_tool_alert_new_alertident idmef_tool_alert_new_command idmef_tool_alert_new_name idmef_tool_alert_print idmef_tool_alert_read idmef_tool_alert_ref idmef_tool_alert_set_alertident idmef_tool_alert_set_command idmef_tool_alert_set_name idmef_tool_alert_t idmef_tool_alert_write idmef_user_category_t idmef_user_category_to_numeric idmef_user_category_to_string idmef_user_clone idmef_user_compare idmef_user_copy idmef_user_destroy idmef_user_get_category idmef_user_get_ident idmef_user_get_next_user_id idmef_user_id_clone idmef_user_id_compare idmef_user_id_copy idmef_user_id_destroy idmef_user_id_get_ident idmef_user_id_get_name idmef_user_id_get_number idmef_user_id_get_tty idmef_user_id_get_type idmef_user_id_new idmef_user_id_new_ident idmef_user_id_new_name idmef_user_id_new_number idmef_user_id_new_tty idmef_user_id_new_type idmef_user_id_print idmef_user_id_read idmef_user_id_ref idmef_user_id_set_ident idmef_user_id_set_name idmef_user_id_set_number idmef_user_id_set_tty idmef_user_id_set_type idmef_user_id_t idmef_user_id_type_t idmef_user_id_type_to_numeric idmef_user_id_type_to_string idmef_user_id_unset_number idmef_user_id_write idmef_user_new idmef_user_new_category idmef_user_new_ident idmef_user_new_user_id idmef_user_print idmef_user_read idmef_user_ref idmef_user_set_category idmef_user_set_ident idmef_user_set_user_id idmef_user_t idmef_user_write idmef_value_check_operator idmef_value_clone idmef_value_destroy idmef_value_dont_have_own_data idmef_value_get idmef_value_get_applicable_operators idmef_value_get_class idmef_value_get_count idmef_value_get_data idmef_value_get_double idmef_value_get_enum idmef_value_get_float idmef_value_get_int16 idmef_value_get_int32 idmef_value_get_int64 idmef_value_get_int8 idmef_value_get_nth idmef_value_get_object idmef_value_get_string idmef_value_get_time idmef_value_get_type idmef_value_get_uint16 idmef_value_get_uint32 idmef_value_get_uint64 idmef_value_get_uint8 idmef_value_have_own_data idmef_value_is_list idmef_value_iterate idmef_value_iterate_reversed idmef_value_list_add idmef_value_list_is_empty idmef_value_match idmef_value_new idmef_value_new_class idmef_value_new_data idmef_value_new_double idmef_value_new_enum idmef_value_new_enum_from_numeric idmef_value_new_enum_from_string idmef_value_new_float idmef_value_new_from_path idmef_value_new_from_string idmef_value_new_int16 idmef_value_new_int32 idmef_value_new_int64 idmef_value_new_int8 idmef_value_new_list idmef_value_new_string idmef_value_new_time idmef_value_new_uint16 idmef_value_new_uint32 idmef_value_new_uint64 idmef_value_new_uint8 idmef_value_print idmef_value_ref idmef_value_set_class idmef_value_set_data idmef_value_set_double idmef_value_set_enum idmef_value_set_enum_from_numeric idmef_value_set_enum_from_string idmef_value_set_float idmef_value_set_int16 idmef_value_set_int32 idmef_value_set_int64 idmef_value_set_int8 idmef_value_set_string idmef_value_set_time idmef_value_set_uint16 idmef_value_set_uint32 idmef_value_set_uint64 idmef_value_set_uint8 idmef_value_t idmef_value_to_string idmef_web_service_clone idmef_web_service_compare idmef_web_service_copy idmef_web_service_destroy idmef_web_service_get_cgi idmef_web_service_get_http_method idmef_web_service_get_next_arg idmef_web_service_get_url idmef_web_service_new idmef_web_service_new_arg idmef_web_service_new_cgi idmef_web_service_new_http_method idmef_web_service_new_url idmef_web_service_print idmef_web_service_read idmef_web_service_ref idmef_web_service_set_arg idmef_web_service_set_cgi idmef_web_service_set_http_method idmef_web_service_set_url idmef_web_service_t idmef_web_service_write int16_t int32_t int64_t int8_t L LIBPRELUDE_VERSION lt_preloaded_symbols P prelude_async_add prelude_async_callback_t prelude_async_del prelude_async_exit prelude_async_flags_t prelude_async_get_flags prelude_async_init PRELUDE_ASYNC_OBJECT prelude_async_object_t prelude_async_set_flags prelude_bool_t prelude_check_version prelude_client_destroy prelude_client_exit_status_t prelude_client_flags_t prelude_client_get_analyzer prelude_client_get_config_filename prelude_client_get_connection_pool prelude_client_get_flags prelude_client_get_profile prelude_client_get_required_permission prelude_client_get_setup_error prelude_client_get_unique_ident prelude_client_handle_msg_default prelude_client_init prelude_client_is_setup_needed prelude_client_new prelude_client_new_msgbuf prelude_client_print_setup_error prelude_client_profile_destroy prelude_client_profile_get_analyzerid prelude_client_profile_get_analyzerid_filename prelude_client_profile_get_backup_dirname prelude_client_profile_get_config_filename prelude_client_profile_get_credentials prelude_client_profile_get_default_config_dirname prelude_client_profile_get_gid prelude_client_profile_get_name prelude_client_profile_get_prefix prelude_client_profile_get_profile_dirname prelude_client_profile_get_tls_client_keycert_filename prelude_client_profile_get_tls_client_trusted_cert_filename prelude_client_profile_get_tls_key_filename prelude_client_profile_get_tls_server_ca_cert_filename prelude_client_profile_get_tls_server_crl_filename prelude_client_profile_get_tls_server_keycert_filename prelude_client_profile_get_uid prelude_client_profile_new prelude_client_profile_ref prelude_client_profile_set_analyzerid prelude_client_profile_set_gid prelude_client_profile_set_name prelude_client_profile_set_prefix prelude_client_profile_set_uid prelude_client_profile_t prelude_client_recv_idmef prelude_client_recv_msg prelude_client_ref prelude_client_send_idmef prelude_client_send_msg prelude_client_set_config_filename prelude_client_set_connection_pool prelude_client_set_flags prelude_client_set_heartbeat_cb prelude_client_set_required_permission prelude_client_start prelude_client_t prelude_connection_close prelude_connection_connect prelude_connection_destroy prelude_connection_forward prelude_connection_get_data prelude_connection_get_default_socket_filename prelude_connection_get_fd prelude_connection_get_local_addr prelude_connection_get_local_port prelude_connection_get_peer_addr prelude_connection_get_peer_analyzerid prelude_connection_get_peer_port prelude_connection_get_permission prelude_connection_get_state prelude_connection_is_alive prelude_connection_new prelude_connection_new_msgbuf prelude_connection_permission_new_from_string prelude_connection_permission_t prelude_connection_permission_to_string prelude_connection_pool_add_connection prelude_connection_pool_broadcast prelude_connection_pool_broadcast_async prelude_connection_pool_check_event prelude_connection_pool_del_connection prelude_connection_pool_destroy prelude_connection_pool_event_t prelude_connection_pool_flags_t prelude_connection_pool_get_connection_list prelude_connection_pool_get_connection_string prelude_connection_pool_get_data prelude_connection_pool_get_flags prelude_connection_pool_init prelude_connection_pool_new prelude_connection_pool_recv prelude_connection_pool_ref prelude_connection_pool_set_connection_alive prelude_connection_pool_set_connection_dead prelude_connection_pool_set_connection_string prelude_connection_pool_set_data prelude_connection_pool_set_event_handler prelude_connection_pool_set_flags prelude_connection_pool_set_global_event_handler prelude_connection_pool_set_required_permission prelude_connection_pool_t prelude_connection_recv prelude_connection_recv_idmef prelude_connection_ref prelude_connection_send prelude_connection_set_data prelude_connection_set_fd_nodup prelude_connection_set_fd_ref prelude_connection_set_peer_analyzerid prelude_connection_set_state prelude_connection_state_t prelude_connection_t prelude_deinit prelude_error_code_from_errno prelude_error_code_t prelude_error_code_to_errno prelude_error_get_code prelude_error_get_source prelude_error_is_verbose prelude_error_make prelude_error_make_from_errno PRELUDE_ERROR_SOURCE_DEFAULT prelude_error_source_t PRELUDE_ERROR_SYSTEM_ERROR prelude_error_t prelude_error_verbose_make prelude_error_verbose_make_v prelude_failover_commit prelude_failover_destroy prelude_failover_disable_transaction prelude_failover_enable_transaction prelude_failover_get_available_msg_count prelude_failover_get_deleted_msg_count prelude_failover_get_saved_msg prelude_failover_new prelude_failover_rollback prelude_failover_save_msg prelude_failover_set_quota prelude_failover_t prelude_fork_child prelude_fork_parent prelude_fork_prepare prelude_gid_t prelude_hash_destroy prelude_hash_elem_destroy prelude_hash_get prelude_hash_iterate prelude_hash_new prelude_hash_new2 prelude_hash_set prelude_hash_t prelude_ident_destroy prelude_ident_generate prelude_ident_inc prelude_ident_new prelude_ident_t prelude_init PRELUDE_INT16_MAX PRELUDE_INT16_MIN PRELUDE_INT32_MAX PRELUDE_INT32_MIN PRELUDE_INT64_MAX PRELUDE_INT64_MIN PRELUDE_INT8_MAX PRELUDE_INT8_MIN PRELUDE_INTMAX_MAX PRELUDE_INTMAX_MIN prelude_io_close prelude_io_destroy prelude_io_forward prelude_io_get_fd prelude_io_get_fdptr prelude_io_is_error_fatal prelude_io_new prelude_io_pending prelude_io_read prelude_io_read_delimited prelude_io_read_wait prelude_io_set_buffer_io prelude_io_set_fdptr prelude_io_set_file_io prelude_io_set_pending_callback prelude_io_set_read_callback prelude_io_set_sys_io prelude_io_set_tls_io prelude_io_set_write_callback prelude_io_t prelude_io_write prelude_io_write_delimited PRELUDE_LINKED_OBJECT prelude_linked_object_get_object prelude_linked_object_t PRELUDE_LIST prelude_list_entry prelude_list_for_each prelude_list_for_each_continue prelude_list_for_each_continue_safe prelude_list_for_each_reversed prelude_list_for_each_reversed_safe prelude_list_for_each_safe prelude_list_get_next prelude_list_get_next_safe prelude_list_t prelude_log prelude_log_debug prelude_log_debug_v prelude_log_flags_t prelude_log_get_flags prelude_log_get_prefix prelude_log_set_callback prelude_log_set_debug_level prelude_log_set_flags prelude_log_set_level prelude_log_set_logfile prelude_log_set_prefix prelude_log_t prelude_log_v prelude_msgbuf_destroy prelude_msgbuf_flags_t prelude_msgbuf_get_data prelude_msgbuf_get_flags prelude_msgbuf_get_msg prelude_msgbuf_mark_end prelude_msgbuf_new prelude_msgbuf_set prelude_msgbuf_set_callback prelude_msgbuf_set_data prelude_msgbuf_set_flags prelude_msgbuf_t prelude_msg_destroy prelude_msg_dynamic_new prelude_msg_forward prelude_msg_get prelude_msg_get_datalen prelude_msg_get_len prelude_msg_get_message_data prelude_msg_get_priority prelude_msg_get_tag prelude_msg_get_time prelude_msg_is_empty prelude_msg_is_fragment prelude_msg_mark_end prelude_msg_new prelude_msg_priority_t prelude_msg_read prelude_msg_recycle prelude_msg_ref prelude_msg_set prelude_msg_set_callback prelude_msg_set_data prelude_msg_set_priority prelude_msg_set_tag prelude_msg_t prelude_msg_write prelude_option_add prelude_option_argument_t prelude_option_commit_callback_t prelude_option_context_destroy prelude_option_context_get_data prelude_option_context_set_data prelude_option_context_t prelude_option_destroy prelude_option_destroy_callback_t prelude_option_get_callback_t prelude_option_get_commit_callback prelude_option_get_data prelude_option_get_description prelude_option_get_destroy_callback prelude_option_get_get_callback prelude_option_get_has_arg prelude_option_get_help prelude_option_get_input_type prelude_option_get_input_validation_regex prelude_option_get_longname prelude_option_get_longopt prelude_option_get_next prelude_option_get_optlist prelude_option_get_parent prelude_option_get_set_callback prelude_option_get_shortname prelude_option_get_type prelude_option_get_value prelude_option_has_optlist prelude_option_input_type_t prelude_option_invoke_commit prelude_option_invoke_destroy prelude_option_invoke_get prelude_option_invoke_set prelude_option_new prelude_option_new_context prelude_option_new_request prelude_option_new_root prelude_option_print prelude_option_priority_t prelude_option_process_request prelude_option_push_request prelude_option_read prelude_option_recv_reply PRELUDE_OPTION_REPLY_TYPE_ERROR PRELUDE_OPTION_REPLY_TYPE_GET PRELUDE_OPTION_REPLY_TYPE_LIST PRELUDE_OPTION_REPLY_TYPE_SET prelude_option_search prelude_option_search_context prelude_option_set_callback_t prelude_option_set_commit_callback prelude_option_set_data prelude_option_set_default_context prelude_option_set_description prelude_option_set_destroy_callback prelude_option_set_get_callback prelude_option_set_has_arg prelude_option_set_help prelude_option_set_input_type prelude_option_set_input_validation_regex prelude_option_set_longopt prelude_option_set_priority prelude_option_set_set_callback prelude_option_set_type prelude_option_set_value prelude_option_set_warnings prelude_option_t prelude_option_type_t prelude_option_warning_t prelude_option_wide_send_msg prelude_perror PRELUDE_PLUGIN_API_VERSION prelude_plugin_compute_stats prelude_plugin_entry_set_plugin prelude_plugin_entry_t PRELUDE_PLUGIN_GENERIC prelude_plugin_generic_t prelude_plugin_get_name prelude_plugin_get_next prelude_plugin_instance_add prelude_plugin_instance_call_commit_func prelude_plugin_instance_compute_time prelude_plugin_instance_del prelude_plugin_instance_get_data prelude_plugin_instance_get_name prelude_plugin_instance_get_plugin prelude_plugin_instance_get_plugin_data prelude_plugin_instance_has_commit_func prelude_plugin_instance_set_data prelude_plugin_instance_set_plugin_data prelude_plugin_instance_subscribe prelude_plugin_instance_t prelude_plugin_instance_unsubscribe prelude_plugin_load_from_dir prelude_plugin_new_instance PRELUDE_PLUGIN_OPTION_DECLARE_STRING_CB prelude_plugin_run prelude_plugin_search_by_name prelude_plugin_search_instance_by_name prelude_plugin_set_activation_option prelude_plugin_set_destroy_func prelude_plugin_set_name prelude_plugin_set_preloaded_symbols PRELUDE_PLUGIN_SET_PRELOADED_SYMBOLS prelude_plugin_unload PRELUDE_PRId16 PRELUDE_PRId32 PRELUDE_PRId64 PRELUDE_PRId8 PRELUDE_PRIi16 PRELUDE_PRIi32 PRELUDE_PRIi64 PRELUDE_PRIi8 PRELUDE_PRIo16 PRELUDE_PRIo32 PRELUDE_PRIo64 PRELUDE_PRIo8 PRELUDE_PRIu16 PRELUDE_PRIu32 PRELUDE_PRIu64 PRELUDE_PRIu8 PRELUDE_PRIX16 PRELUDE_PRIx16 PRELUDE_PRIX32 PRELUDE_PRIx32 PRELUDE_PRIx64 PRELUDE_PRIX64 PRELUDE_PRIX8 PRELUDE_PRIx8 PRELUDE_SCNd64 PRELUDE_SCNi64 PRELUDE_SCNo64 PRELUDE_SCNu64 PRELUDE_SCNx64 prelude_strerror prelude_string_cat prelude_string_clear prelude_string_clone prelude_string_compare prelude_string_copy_dup prelude_string_copy_ref prelude_string_destroy prelude_string_destroy_internal prelude_string_get_len prelude_string_get_string prelude_string_get_string_or_default prelude_string_get_string_released prelude_string_is_empty prelude_string_ncat prelude_string_new prelude_string_new_constant prelude_string_new_dup prelude_string_new_dup_fast prelude_string_new_nodup prelude_string_new_nodup_fast prelude_string_new_ref prelude_string_new_ref_fast prelude_string_ref prelude_string_set_constant prelude_string_set_dup prelude_string_set_dup_fast prelude_string_set_nodup prelude_string_set_nodup_fast prelude_string_set_ref prelude_string_set_ref_fast prelude_string_sprintf prelude_string_t prelude_string_vprintf prelude_strsource prelude_thread_init prelude_timer_destroy prelude_timer_flush prelude_timer_get_callback prelude_timer_get_data prelude_timer_get_expire prelude_timer_init prelude_timer_init_list prelude_timer_lock_critical_region prelude_timer_reset prelude_timer_set_callback prelude_timer_set_data prelude_timer_set_expire prelude_timer_t prelude_timer_unlock_critical_region prelude_timer_wake_up prelude_uid_t PRELUDE_UINT16_MAX PRELUDE_UINT32_MAX PRELUDE_UINT64_MAX PRELUDE_UINT8_MAX PRELUDE_UINTMAX_MAX U uint16_t uint32_t uint64_t uint8_t libprelude-1.0.0/docs/api/xml/prelude-io.xml0000664000076400007640000010703311347714756015705 00000000000000 prelude-io 3 LIBPRELUDE Library prelude-io Synopsis typedef prelude_io_t; int prelude_io_new (prelude_io_t **ret); void prelude_io_destroy (prelude_io_t *pio); void prelude_io_set_file_io (prelude_io_t *pio, FILE *fd); void prelude_io_set_tls_io (prelude_io_t *pio, void *tls); void prelude_io_set_sys_io (prelude_io_t *pio, int fd); int prelude_io_set_buffer_io (prelude_io_t *pio); void prelude_io_set_fdptr (prelude_io_t *pio, void *ptr); void prelude_io_set_pending_callback (prelude_io_t *pio, ssize_t (pendingprelude_io_t *io) ()); void prelude_io_set_read_callback (prelude_io_t *pio, ssize_t (readprelude_io_t *io, void *buf, size_t count) ()); void prelude_io_set_write_callback (prelude_io_t *pio, ssize_t (writeprelude_io_t *io, const void *buf, size_t count) ()); int prelude_io_close (prelude_io_t *pio); ssize_t prelude_io_read (prelude_io_t *pio, void *buf, size_t count); ssize_t prelude_io_read_wait (prelude_io_t *pio, void *buf, size_t count); ssize_t prelude_io_read_delimited (prelude_io_t *pio, unsigned char **buf); ssize_t prelude_io_write (prelude_io_t *pio, const void *buf, size_t count); ssize_t prelude_io_write_delimited (prelude_io_t *pio, const void *buf, uint16_t count); ssize_t prelude_io_forward (prelude_io_t *dst, prelude_io_t *src, size_t count); int prelude_io_get_fd (prelude_io_t *pio); void * prelude_io_get_fdptr (prelude_io_t *pio); ssize_t prelude_io_pending (prelude_io_t *pio); prelude_bool_t prelude_io_is_error_fatal (prelude_io_t *pio, int error); Description Details prelude_io_t prelude_io_ttypedef struct prelude_io prelude_io_t; prelude_io_new () prelude_io_newint prelude_io_new (prelude_io_t **ret); Create a new prelude IO object. ret : Pointer where to store the created prelude_io_t object. Returns : 0 on success, or a negative value if an error occur. prelude_io_destroy () prelude_io_destroyvoid prelude_io_destroy (prelude_io_t *pio); Destroy the pio object. pio : Pointer to a prelude_io_t object. prelude_io_set_file_io () prelude_io_set_file_iovoid prelude_io_set_file_io (prelude_io_t *pio, FILE *fd); Setup the pio object to work with file I/O function. The pio object is then associated with fd. pio : A pointer on the prelude_io_t object. fd : File descriptor identifying a file. prelude_io_set_tls_io () prelude_io_set_tls_iovoid prelude_io_set_tls_io (prelude_io_t *pio, void *tls); Setup the pio object to work with TLS based I/O function. The pio object is then associated with tls. pio : A pointer on the prelude_io_t object. tls : Pointer on the TLS structure holding the TLS connection data. prelude_io_set_sys_io () prelude_io_set_sys_iovoid prelude_io_set_sys_io (prelude_io_t *pio, int fd); Setup the pio object to work with system based I/O function. The pio object is then associated with fd. pio : A pointer on the prelude_io_t object. fd : A file descriptor. prelude_io_set_buffer_io () prelude_io_set_buffer_ioint prelude_io_set_buffer_io (prelude_io_t *pio); pio : Returns : prelude_io_set_fdptr () prelude_io_set_fdptrvoid prelude_io_set_fdptr (prelude_io_t *pio, void *ptr); Set an user defined pointer that might be retrieved using prelude_io_get_fdptr(). pio : Pointer to a prelude_io_t object. ptr : Pointer to user defined data. prelude_io_set_pending_callback () prelude_io_set_pending_callbackvoid prelude_io_set_pending_callback (prelude_io_t *pio, ssize_t (pendingprelude_io_t *io) ()); Set an user defined read callback function to be called on prelude_io_pending(). pio : Pointer to a prelude_io_t object. pending : Callback function to be called on prelude_io_pending(). prelude_io_set_read_callback () prelude_io_set_read_callbackvoid prelude_io_set_read_callback (prelude_io_t *pio, ssize_t (readprelude_io_t *io, void *buf, size_t count) ()); Set an user defined read callback function to be called on prelude_io_read(). pio : Pointer to a prelude_io_t object. read : Callback function to be called on prelude_io_read(). prelude_io_set_write_callback () prelude_io_set_write_callbackvoid prelude_io_set_write_callback (prelude_io_t *pio, ssize_t (writeprelude_io_t *io, const void *buf, size_t count) ()); Set an user defined write callback function to be called on prelude_io_write(). pio : Pointer to a prelude_io_t object. write : Callback function to be called on prelude_io_write(). prelude_io_close () prelude_io_closeint prelude_io_close (prelude_io_t *pio); prelude_io_close() closes the file descriptor indentified by pio, The case where the close() function would be interrupted by a signal is handled internally. So you don't have to check for EINTR. However, and especially when the underlaying layer is TLS, prelude_io_close() might return error. If this happen, you should continue calling the function until it return zero. pio : Pointer to a prelude_io_t object. Returns : zero on success, or -1 if an error occurred. prelude_io_read () prelude_io_readssize_t prelude_io_read (prelude_io_t *pio, void *buf, size_t count); prelude_io_read() attempts to read up to count bytes from the file descriptor identified by pio into the buffer starting at buf. If count is zero, prelude_io_read() returns zero and has no other results. If count is greater than SSIZE_MAX, the result is unspecified. The case where the read function would be interrupted by a signal is handled internally. So you don't have to check for EINTR. pio : Pointer to a prelude_io_t object. buf : Pointer to the buffer to store data into. count : Number of bytes to read. Returns : On success, the number of bytes read is returned (zero indicates end of file). It is not an error if this number is smaller than the number of bytes requested; this may happen for example because fewer bytes are actually available right now or because read() was interrupted by a signal. On error, a negative value is returned. In this case it is left unspecified whether the file position (if any) changes. prelude_io_read_wait () prelude_io_read_waitssize_t prelude_io_read_wait (prelude_io_t *pio, void *buf, size_t count); prelude_io_read_wait() attempts to read up to count bytes from the file descriptor identified by pio into the buffer starting at buf. If count is zero, prelude_io_read() returns zero and has no other results. If count is greater than SSIZE_MAX, the result is unspecified. The case where the read function would be interrupted by a signal is handled internally. So you don't have to check for EINTR. prelude_io_read_wait() always return the number of bytes requested. Be carefull that this function is blocking. pio : Pointer to a prelude_io_t object. buf : Pointer to the buffer to store data into. count : Number of bytes to read. Returns : On success, the number of bytes read is returned (zero indicates end of file). On error, -1 is returned, and errno is set appropriately. In this case it is left unspecified whether the file position (if any) changes. prelude_io_read_delimited () prelude_io_read_delimitedssize_t prelude_io_read_delimited (prelude_io_t *pio, unsigned char **buf); prelude_io_read_delimited() read message written by prelude_write_delimited(). Theses messages are sents along with the len of the message. Uppon return the buf argument is updated to point on a newly allocated buffer containing the data read. The count argument is set to the number of bytes the message was containing. The case where the read function would be interrupted by a signal is handled internally. So you don't have to check for EINTR. pio : Pointer to a prelude_io_t object. buf : Pointer to the address of a buffer to store address of data into. Returns : On success, the number of bytes read is returned (zero indicates end of file). On error, -1 is returned, and errno is set appropriately. In this case it is left unspecified whether the file position (if any) changes. prelude_io_write () prelude_io_writessize_t prelude_io_write (prelude_io_t *pio, const void *buf, size_t count); prelude_io_write() writes up to count bytes to the file descriptor identified by pio from the buffer starting at buf. POSIX requires that a read() which can be proved to occur after a write() has returned returns the new data. Note that not all file systems are POSIX conforming. The case where the write() function would be interrupted by a signal is handled internally. So you don't have to check for EINTR. pio : Pointer to a prelude_io_t object. buf : Pointer to the buffer to write data from. count : Number of bytes to write. Returns : On success, the number of bytes written are returned (zero indicates nothing was written). On error, -1 is returned, and errno is set appropriately. If count is zero and the file descriptor refers to a regular file, 0 will be returned without causing any other effect. For a special file, the results are not portable. prelude_io_write_delimited () prelude_io_write_delimitedssize_t prelude_io_write_delimited (prelude_io_t *pio, const void *buf, uint16_t count); prelude_io_write_delimited() writes up to count bytes to the file descriptor identified by pio from the buffer starting at buf. POSIX requires that a read() which can be proved to occur after a write() has returned returns the new data. Note that not all file systems are POSIX conforming. prelude_io_write_delimited() also write the len of the data to be sent. which allow prelude_io_read_delimited() to safely know if it got all the data a given write contain. The case where the write() function would be interrupted by a signal is handled internally. So you don't have to check for EINTR. pio : Pointer to a prelude_io_t object. buf : Pointer to the buffer to write data from. count : Number of bytes to write. Returns : On success, the number of bytes written are returned (zero indicates nothing was written). On error, -1 is returned, and errno is set appropriately. prelude_io_forward () prelude_io_forwardssize_t prelude_io_forward (prelude_io_t *dst, prelude_io_t *src, size_t count); prelude_io_forward() attempts to transfer up to count bytes from the file descriptor identified by src into the file descriptor identified by dst. dst : Pointer to a prelude_io_t object. src : Pointer to a prelude_io_t object. count : Number of byte to forward from src to dst. Returns : If the transfer was successful, the number of bytes written to dst is returned. On error, -1 is returned, and errno is set appropriately. prelude_io_get_fd () prelude_io_get_fdint prelude_io_get_fd (prelude_io_t *pio); pio : A pointer on a prelude_io_t object. Returns : The FD associated with this object. prelude_io_get_fdptr () prelude_io_get_fdptrvoid * prelude_io_get_fdptr (prelude_io_t *pio); pio : A pointer on a prelude_io_t object. Returns : Pointer associated with this object (file, tls, buffer, or NULL). prelude_io_pending () prelude_io_pendingssize_t prelude_io_pending (prelude_io_t *pio); prelude_io_pending return the number of bytes waiting to be read on an TLS or socket fd. pio : Pointer to a prelude_io_t object. Returns : Number of byte waiting to be read on pio, or -1 if pio is not of type TLS or socket. prelude_io_is_error_fatal () prelude_io_is_error_fatalprelude_bool_t prelude_io_is_error_fatal (prelude_io_t *pio, int error); Check whether the returned error is fatal, or not. pio : Pointer to a prelude_io_t object. error : Error returned by one of the prelude_io_t function. Returns : TRUE if error is fatal, FALSE if it is not. libprelude-1.0.0/docs/api/xml/prelude-connection-pool.xml0000664000076400007640000013606011347714755020405 00000000000000 prelude-connection-pool 3 LIBPRELUDE Library prelude-connection-pool Pool of connection handling Synopsis enum prelude_connection_pool_flags_t; enum prelude_connection_pool_event_t; typedef prelude_connection_pool_t; void prelude_connection_pool_broadcast (prelude_connection_pool_t *pool, prelude_msg_t *msg); void prelude_connection_pool_broadcast_async (prelude_connection_pool_t *pool, prelude_msg_t *msg); int prelude_connection_pool_init (prelude_connection_pool_t *pool); int prelude_connection_pool_new (prelude_connection_pool_t **ret, prelude_client_profile_t *cp, prelude_connection_permission_t permission); prelude_connection_pool_t * prelude_connection_pool_ref (prelude_connection_pool_t *pool); prelude_list_t * prelude_connection_pool_get_connection_list (prelude_connection_pool_t *pool); int prelude_connection_pool_add_connection (prelude_connection_pool_t *pool, prelude_connection_t *cnx); int prelude_connection_pool_del_connection (prelude_connection_pool_t *pool, prelude_connection_t *cnx); int prelude_connection_pool_set_connection_dead (prelude_connection_pool_t *pool, prelude_connection_t *cnx); int prelude_connection_pool_set_connection_alive (prelude_connection_pool_t *pool, prelude_connection_t *cnx); int prelude_connection_pool_set_connection_string (prelude_connection_pool_t *pool, const char *cfgstr); const char * prelude_connection_pool_get_connection_string (prelude_connection_pool_t *pool); void prelude_connection_pool_destroy (prelude_connection_pool_t *pool); prelude_connection_pool_flags_t prelude_connection_pool_get_flags (prelude_connection_pool_t *pool); void prelude_connection_pool_set_flags (prelude_connection_pool_t *pool, prelude_connection_pool_flags_t flags); void prelude_connection_pool_set_required_permission (prelude_connection_pool_t *pool, prelude_connection_permission_t req_perm); void prelude_connection_pool_set_data (prelude_connection_pool_t *pool, void *data); void * prelude_connection_pool_get_data (prelude_connection_pool_t *pool); int prelude_connection_pool_recv (prelude_connection_pool_t *pool, int timeout, prelude_connection_t **outcon, prelude_msg_t **outmsg); int prelude_connection_pool_check_event (prelude_connection_pool_t *pool, int timeout, int (event_cbprelude_connection_pool_t *pool,prelude_connection_pool_event_t event,prelude_connection_t *cnx, void *extra) (), void *extra); void prelude_connection_pool_set_global_event_handler (prelude_connection_pool_t *pool, prelude_connection_pool_event_t wanted_events, int (callbackprelude_connection_pool_t *pool,prelude_connection_pool_event_t events) ()); void prelude_connection_pool_set_event_handler (prelude_connection_pool_t *pool, prelude_connection_pool_event_t wanted_events, int (callbackprelude_connection_pool_t *pool,prelude_connection_pool_event_t events,prelude_connection_t *cnx) ()); Description This API handle pool of connection, allowing to address a set of connection using only one object. AND & OR of connection are supported, so that it is possible to address several connection at once, or to only address a set of connection if another connection went down. Additionally it provide failover in case one of the connection in the pool goes down, and automatic reconnection and flushing of the information that could not be sent due to the connection status. It is usually not necessary to access this API directly, however if you are looking at how to read events from a pool of connection, you're most probably looking for the prelude_connection_pool_check_event() function. If this is the case, use prelude_connection_pool_check_event() for polling the pool or prelude_connection_set_event_handler() / prelude_connection_set_global_event_handler() if you want asynchronous notification of event. Note that prelude_connection_set_event_handler() and prelude_connection_set_global_event_handler() are only asynchronous if timer are running in asynchronous mode. Otherwise, the callback for theses function might be called when you call the prelude_timer_wake_up() function. In the provided callback, you might use prelude_connection_recv() to retrieve an event of type PRELUDE_CONNECTION_POOL_EVENT_INPUT. And, you could, for example, if the retrieved message has the PRELUDE_MSG_ID_IDMEF tag, provide the returned prelude_msg_t object to idmef_message_read() in order to convert the received message to a idmef_message_t object. Details enum prelude_connection_pool_flags_t prelude_connection_pool_flags_ttypedef enum { PRELUDE_CONNECTION_POOL_FLAGS_RECONNECT = 0x01, PRELUDE_CONNECTION_POOL_FLAGS_FAILOVER = 0x02 } prelude_connection_pool_flags_t; enum prelude_connection_pool_event_t prelude_connection_pool_event_ttypedef enum { PRELUDE_CONNECTION_POOL_EVENT_INPUT = 0x01, PRELUDE_CONNECTION_POOL_EVENT_DEAD = 0x02, PRELUDE_CONNECTION_POOL_EVENT_ALIVE = 0x04 } prelude_connection_pool_event_t; prelude_connection_pool_t prelude_connection_pool_ttypedef struct prelude_connection_pool prelude_connection_pool_t; prelude_connection_pool_broadcast () prelude_connection_pool_broadcastvoid prelude_connection_pool_broadcast (prelude_connection_pool_t *pool, prelude_msg_t *msg); Sends the message contained in msg to all the connection in pool. pool : Pointer to a prelude_connection_pool_t object. msg : Pointer on a prelude_msg_t object. prelude_connection_pool_broadcast_async () prelude_connection_pool_broadcast_asyncvoid prelude_connection_pool_broadcast_async (prelude_connection_pool_t *pool, prelude_msg_t *msg); Sends the message contained in msg to all connections in pool asynchronously. After the request is processed, the msg message will be freed. pool : Pointer to a prelude_connection_pool_t object msg : Pointer on a prelude_msg_t object. prelude_connection_pool_init () prelude_connection_pool_initint prelude_connection_pool_init (prelude_connection_pool_t *pool); Initializes pool. This means that connection associated with pool using prelude_connection_pool_set_connection_string() will be established. pool : Pointer to a prelude_connection_pool_t object. Returns : 0 on success, a negative value on error. prelude_connection_pool_new () prelude_connection_pool_newint prelude_connection_pool_new (prelude_connection_pool_t **ret, prelude_client_profile_t *cp, prelude_connection_permission_t permission); prelude_connection_pool_new() initializes a new Connection Manager object. ret : Pointer to an address where to store the created prelude_connection_pool_t object. cp : The prelude_client_profile_t to use for connection. permission : Permission the connection in this connection-pool will require. Returns : 0 on success or a negative value if an error occured. prelude_connection_pool_ref () prelude_connection_pool_refprelude_connection_pool_t * prelude_connection_pool_ref (prelude_connection_pool_t *pool); Increases pool reference count. prelude_connection_pool_destroy() will decrease the refcount until it reaches 0, at which point the pool will be destroyed. pool : Pointer to a prelude_connection_pool_t object. Returns : The provided pool is returned. prelude_connection_pool_get_connection_list () prelude_connection_pool_get_connection_listprelude_list_t * prelude_connection_pool_get_connection_list (prelude_connection_pool_t *pool); pool : Pointer to a prelude_connection_pool_t object. Returns : The list of connections handled by pool. prelude_connection_pool_add_connection () prelude_connection_pool_add_connectionint prelude_connection_pool_add_connection (prelude_connection_pool_t *pool, prelude_connection_t *cnx); Adds cnx to pool set of connections. If pool is already initialized (prelude_connection_pool_init() called) and cnx is not alive, it will attempt a reconnection. pool : Pointer to a prelude_connection_pool_t object. cnx : Pointer to a prelude_connection_t object to add to pool. Returns : 0 on success, a negative value if an error occured. prelude_connection_pool_del_connection () prelude_connection_pool_del_connectionint prelude_connection_pool_del_connection (prelude_connection_pool_t *pool, prelude_connection_t *cnx); Remove cnx from pool of connections. pool : Pointer to a prelude_connection_pool_t object. cnx : Pointer to a prelude_connection_t object to remove from pool. Returns : 0 on success, a negative value if an error occured. prelude_connection_pool_set_connection_dead () prelude_connection_pool_set_connection_deadint prelude_connection_pool_set_connection_dead (prelude_connection_pool_t *pool, prelude_connection_t *cnx); Notifies pool that the connection identified by cnx is dead. Usually, this function should not be used since pool is self sufficient, and handles connections issues internally. However, it is sometime useful when the user has several mechanisms using the connection, and that its own mechanism detects a connection problem before pool notice. pool : Pointer to a prelude_connection_pool_t object. cnx : Pointer to a prelude_connection_t object used within pool. Returns : 0 on success, a negative value if an error occured. prelude_connection_pool_set_connection_alive () prelude_connection_pool_set_connection_aliveint prelude_connection_pool_set_connection_alive (prelude_connection_pool_t *pool, prelude_connection_t *cnx); Notifies pool that the connection identified by cnx went back alive. Usually, this function should not be used since pool is self sufficient, and handles connection issues internally. However, it is sometime useful when the user has several mechanisms using the connection, and that its own mechanism detects a connection problem before pool notice. pool : Pointer to a prelude_connection_pool_t object. cnx : Pointer to a prelude_connection_t object used within pool. Returns : 0 on success, a negative value if an error occured. prelude_connection_pool_set_connection_string () prelude_connection_pool_set_connection_stringint prelude_connection_pool_set_connection_string (prelude_connection_pool_t *pool, const char *cfgstr); Sets the connection string for pool. The connection string should be in the form of : "address". Special operand like || (OR) and && (AND), are also accepted: "address && address". Where && means that alert sent using pool will go to both configured addresses, and || means that if the left address fails, the right address will be used. prelude_connection_pool_init() should be used to initiates the connection. pool : Pointer to a prelude_connection_pool_t object. cfgstr : Connection string. Returns : 0 on success, a negative value if an error occured. prelude_connection_pool_get_connection_string () prelude_connection_pool_get_connection_stringconst char * prelude_connection_pool_get_connection_string (prelude_connection_pool_t *pool); Used to query the connection string used by pool. pool : Pointer to a prelude_connection_pool_t object. Returns : The connection string. prelude_connection_pool_destroy () prelude_connection_pool_destroyvoid prelude_connection_pool_destroy (prelude_connection_pool_t *pool); Destroys pool and all connections handled. pool : Pointer to a prelude_connection_pool_t object. prelude_connection_pool_get_flags () prelude_connection_pool_get_flagsprelude_connection_pool_flags_t prelude_connection_pool_get_flags (prelude_connection_pool_t *pool); pool : Pointer to a prelude_connection_pool_t object. Returns : the prelude_connection_pool_flags_t used in pool. prelude_connection_pool_set_flags () prelude_connection_pool_set_flagsvoid prelude_connection_pool_set_flags (prelude_connection_pool_t *pool, prelude_connection_pool_flags_t flags); Sets flags within pools. pool : Pointer to a prelude_connection_pool_t object. flags : Flags to use for pool. prelude_connection_pool_set_required_permission () prelude_connection_pool_set_required_permissionvoid prelude_connection_pool_set_required_permission (prelude_connection_pool_t *pool, prelude_connection_permission_t req_perm); pool : req_perm : prelude_connection_pool_set_data () prelude_connection_pool_set_datavoid prelude_connection_pool_set_data (prelude_connection_pool_t *pool, void *data); The user might use this function to associate data with pool. The data associated might be retrieved using prelude_connection_pool_get_data(). pool : Pointer to a prelude_connection_pool_t object. data : Pointer to user specific data. prelude_connection_pool_get_data () prelude_connection_pool_get_datavoid * prelude_connection_pool_get_data (prelude_connection_pool_t *pool); The user might use this function to query data associated with pool using prelude_connection_pool_set_data(). pool : Pointer to a prelude_connection_pool_t object. Returns : the user data associated to pool. prelude_connection_pool_recv () prelude_connection_pool_recvint prelude_connection_pool_recv (prelude_connection_pool_t *pool, int timeout, prelude_connection_t **outcon, prelude_msg_t **outmsg); This function queries the set of connections available in pool to see if events are waiting to be handled. If timeout is zero, then this function will return immediatly in case there is no event to be handled. If timeout is -1, this function won't return until an event is available. Otherwise this function will return if there is no event after the specified number of second. If an event is available, it will be read and store the prelude_connection_t object in the outcon pointer. If outmsg was specified, the message will be read and stored in there. pool : Pointer to a prelude_connection_pool_t object. timeout : Time to wait for an event. outcon : Pointer where the connection where an event happened should be stored. outmsg : Pointer where the next message that will be read should be stored. Returns : The number of handled events (0 or 1) or a negative value if an error occured. prelude_connection_pool_check_event () prelude_connection_pool_check_eventint prelude_connection_pool_check_event (prelude_connection_pool_t *pool, int timeout, int (event_cbprelude_connection_pool_t *pool,prelude_connection_pool_event_t event,prelude_connection_t *cnx, void *extra) (), void *extra); This function queries the set of connections available in pool to see if events are waiting to be handled. If timeout is zero, then this function will return immediatly in case there is no event to be handled. If timeout is -1, this function won't return until an event is available. Otherwise this function will return if there is no event after the specified number of second. For each event, event_cb is called with the concerned pool, the provided extra data, and the cnx where an event has occured. pool : Pointer to a prelude_connection_pool_t object. timeout : Time to wait for an event. event_cb : User provided callback function to call on received events. extra : Pointer to user specific data provided to event_cb. Returns : The number of handled events, or a negative value if an error occured. prelude_connection_pool_set_global_event_handler () prelude_connection_pool_set_global_event_handlervoid prelude_connection_pool_set_global_event_handler (prelude_connection_pool_t *pool, prelude_connection_pool_event_t wanted_events, int (callbackprelude_connection_pool_t *pool,prelude_connection_pool_event_t events) ()); callback will be called each time one of the event specified in wanted_events happen to pool. However, contrary to prelude_connection_pool_set_event_handler(), the callback will be called only once per set of event. pool : Pointer to a prelude_connection_pool_t object. wanted_events : Event the user want to be notified about. callback : User specific callback to call when an event is available. prelude_connection_pool_set_event_handler () prelude_connection_pool_set_event_handlervoid prelude_connection_pool_set_event_handler (prelude_connection_pool_t *pool, prelude_connection_pool_event_t wanted_events, int (callbackprelude_connection_pool_t *pool,prelude_connection_pool_event_t events,prelude_connection_t *cnx) ()); callback will be called each time one of the event specified in wanted_events happens to pool. pool : Pointer to a prelude_connection_pool_t object. wanted_events : Event the user want to be notified about. callback : User specific callback to call when an event is available. See Also prelude_connection_t idmef_message_read() libprelude-1.0.0/docs/api/html/0000775000076400007640000000000011347714757013337 500000000000000libprelude-1.0.0/docs/api/html/libprelude-prelude.html0000664000076400007640000002215611347714757017740 00000000000000 prelude

prelude

prelude — Initializing the library

Synopsis

#define             LIBPRELUDE_VERSION
int                 prelude_init                        (int *argc,
                                                         char **argv);
void                prelude_deinit                      (void);
const char *        prelude_check_version               (const char *req_version);
int                 prelude_thread_init                 (void *nil);
void                prelude_fork_child                  (void);
void                prelude_fork_parent                 (void);
void                prelude_fork_prepare                (void);

Description

Before any operation are done using the prelude library, the user first need to initialize it using the prelude_init() function.

int ret;
ret = prelude_init(&argc, argv);
if ( ret < 0 ) {
        prelude_perror(ret, "unable to initialize the prelude library");
        return -1;
}

Details

LIBPRELUDE_VERSION

#define LIBPRELUDE_VERSION "1.0.0"


prelude_init ()

int                 prelude_init                        (int *argc,
                                                         char **argv);

Call this function before using any other Prelude functions in your applications. It will initialize everything needed to operate the library and parses some standard command line options. argc and argv are adjusted accordingly so your own code will never see those standard arguments.

argc :

Address of the argc parameter of your main() function.

argv :

Address of the argv parameter of your main() function.

Returns :

0 on success, a negative value if an error occured.

prelude_deinit ()

void                prelude_deinit                      (void);

Call this function if you're done using the library and want to free global shared ressource allocated by libprelude.


prelude_check_version ()

const char *        prelude_check_version               (const char *req_version);

If req_version is NULL this function will return the version of the library. Otherwise, req_version will be compared to the current library version. If the library version is higher or equal, this function will return the current library version. Otherwise, NULL is returned.

req_version :

The minimum acceptable version number.

Returns :

The current library version, or NULL if req_version doesn't match.

prelude_thread_init ()

int                 prelude_thread_init                 (void *nil);

nil :

Returns :


prelude_fork_child ()

void                prelude_fork_child                  (void);


prelude_fork_parent ()

void                prelude_fork_parent                 (void);


prelude_fork_prepare ()

void                prelude_fork_prepare                (void);

libprelude-1.0.0/docs/api/html/libprelude-idmef-data.html0000664000076400007640000020546111347714757020275 00000000000000 idmef-data

idmef-data

idmef-data

Synopsis

enum                idmef_data_type_t;
                    data;
int                 idmef_data_new                      (idmef_data_t **data);
idmef_data_t *      idmef_data_ref                      (idmef_data_t *data);
int                 idmef_data_new_char                 (idmef_data_t **data,
                                                         char c);
int                 idmef_data_new_byte                 (idmef_data_t **data,
                                                         uint8_t i);
int                 idmef_data_new_uint32               (idmef_data_t **data,
                                                         uint32_t i);
int                 idmef_data_new_uint64               (idmef_data_t **data,
                                                         uint64_t i);
int                 idmef_data_new_float                (idmef_data_t **data,
                                                         float f);
void                idmef_data_set_char                 (idmef_data_t *data,
                                                         char c);
void                idmef_data_set_byte                 (idmef_data_t *data,
                                                         uint8_t i);
void                idmef_data_set_uint32               (idmef_data_t *data,
                                                         uint32_t i);
void                idmef_data_set_uint64               (idmef_data_t *data,
                                                         uint64_t i);
void                idmef_data_set_float                (idmef_data_t *data,
                                                         float f);
int                 idmef_data_set_ptr_dup_fast         (idmef_data_t *data,
                                                         idmef_data_type_t type,
                                                         const void *ptr,
                                                         size_t len);
int                 idmef_data_set_ptr_ref_fast         (idmef_data_t *data,
                                                         idmef_data_type_t type,
                                                         const void *ptr,
                                                         size_t len);
int                 idmef_data_set_ptr_nodup_fast       (idmef_data_t *data,
                                                         idmef_data_type_t type,
                                                         void *ptr,
                                                         size_t len);
int                 idmef_data_new_ptr_dup_fast         (idmef_data_t **data,
                                                         idmef_data_type_t type,
                                                         const void *ptr,
                                                         size_t len);
int                 idmef_data_new_ptr_ref_fast         (idmef_data_t **data,
                                                         idmef_data_type_t type,
                                                         const void *ptr,
                                                         size_t len);
int                 idmef_data_new_ptr_nodup_fast       (idmef_data_t **data,
                                                         idmef_data_type_t type,
                                                         void *ptr,
                                                         size_t len);
int                 idmef_data_set_char_string_dup_fast (idmef_data_t *data,
                                                         const char *str,
                                                         size_t len);
int                 idmef_data_new_char_string_dup_fast (idmef_data_t **data,
                                                         const char *str,
                                                         size_t len);
int                 idmef_data_new_char_string_ref_fast (idmef_data_t **data,
                                                         const char *ptr,
                                                         size_t len);
int                 idmef_data_new_char_string_nodup_fast
                                                        (idmef_data_t **data,
                                                         char *ptr,
                                                         size_t len);
int                 idmef_data_set_char_string_ref_fast (idmef_data_t *data,
                                                         const char *ptr,
                                                         size_t len);
int                 idmef_data_set_char_string_nodup_fast
                                                        (idmef_data_t *data,
                                                         char *ptr,
                                                         size_t len);
int                 idmef_data_new_char_string_ref      (idmef_data_t **data,
                                                         const char *ptr);
int                 idmef_data_new_char_string_dup      (idmef_data_t **data,
                                                         const char *ptr);
int                 idmef_data_new_char_string_nodup    (idmef_data_t **data,
                                                         char *ptr);
int                 idmef_data_set_char_string_ref      (idmef_data_t *data,
                                                         const char *ptr);
int                 idmef_data_set_char_string_dup      (idmef_data_t *data,
                                                         const char *ptr);
int                 idmef_data_set_char_string_nodup    (idmef_data_t *data,
                                                         char *ptr);
#define             idmef_data_set_char_string_constant (string, str)
int                 idmef_data_new_byte_string_ref      (idmef_data_t **data,
                                                         unsigned char *ptr,
                                                         size_t len);
int                 idmef_data_new_byte_string_dup      (idmef_data_t **data,
                                                         unsigned char *ptr,
                                                         size_t len);
int                 idmef_data_new_byte_string_nodup    (idmef_data_t **data,
                                                         unsigned char *ptr,
                                                         size_t len);
int                 idmef_data_set_byte_string_ref      (idmef_data_t *data,
                                                         unsigned char *ptr,
                                                         size_t len);
int                 idmef_data_set_byte_string_dup      (idmef_data_t *data,
                                                         unsigned char *ptr,
                                                         size_t len);
int                 idmef_data_set_byte_string_nodup    (idmef_data_t *data,
                                                         unsigned char *ptr,
                                                         size_t len);
void                idmef_data_destroy                  (idmef_data_t *data);
int                 idmef_data_copy_ref                 (const idmef_data_t *src,
                                                         idmef_data_t *dst);
int                 idmef_data_copy_dup                 (const idmef_data_t *src,
                                                         idmef_data_t *dst);
int                 idmef_data_clone                    (const idmef_data_t *src,
                                                         idmef_data_t **dst);
idmef_data_type_t   idmef_data_get_type                 (const idmef_data_t *data);
size_t              idmef_data_get_len                  (const idmef_data_t *data);
const void *        idmef_data_get_data                 (const idmef_data_t *data);
char                idmef_data_get_char                 (const idmef_data_t *data);
uint8_t             idmef_data_get_byte                 (const idmef_data_t *data);
uint32_t            idmef_data_get_uint32               (const idmef_data_t *data);
uint64_t            idmef_data_get_uint64               (const idmef_data_t *data);
float               idmef_data_get_float                (const idmef_data_t *data);
const char *        idmef_data_get_char_string          (const idmef_data_t *data);
const unsigned char * idmef_data_get_byte_string        (const idmef_data_t *data);
prelude_bool_t      idmef_data_is_empty                 (const idmef_data_t *data);
int                 idmef_data_to_string                (const idmef_data_t *data,
                                                         prelude_string_t *out);
void                idmef_data_destroy_internal         (idmef_data_t *data);

Description

Details

enum idmef_data_type_t

typedef enum {
	IDMEF_DATA_TYPE_UNKNOWN      = 0,
	IDMEF_DATA_TYPE_CHAR         = 1,
	IDMEF_DATA_TYPE_BYTE         = 2,
	IDMEF_DATA_TYPE_UINT32       = 3,
	IDMEF_DATA_TYPE_UINT64       = 4,
	IDMEF_DATA_TYPE_FLOAT        = 5,
	IDMEF_DATA_TYPE_CHAR_STRING  = 6,
	IDMEF_DATA_TYPE_BYTE_STRING  = 7
} idmef_data_type_t;


data

typedef struct {
        int refcount;

        int flags;
        idmef_data_type_t type;
        size_t len;

        union {
		char char_data;
		uint8_t byte_data;
		uint32_t uint32_data;
		uint64_t uint64_data;
		float float_data;
		void *rw_data;
		const void *ro_data;
} data;


idmef_data_new ()

int                 idmef_data_new                      (idmef_data_t **data);

data :

Returns :


idmef_data_ref ()

idmef_data_t *      idmef_data_ref                      (idmef_data_t *data);

data :

Returns :


idmef_data_new_char ()

int                 idmef_data_new_char                 (idmef_data_t **data,
                                                         char c);

data :

c :

Returns :


idmef_data_new_byte ()

int                 idmef_data_new_byte                 (idmef_data_t **data,
                                                         uint8_t i);

data :

i :

Returns :


idmef_data_new_uint32 ()

int                 idmef_data_new_uint32               (idmef_data_t **data,
                                                         uint32_t i);

data :

i :

Returns :


idmef_data_new_uint64 ()

int                 idmef_data_new_uint64               (idmef_data_t **data,
                                                         uint64_t i);

data :

i :

Returns :


idmef_data_new_float ()

int                 idmef_data_new_float                (idmef_data_t **data,
                                                         float f);

data :

f :

Returns :


idmef_data_set_char ()

void                idmef_data_set_char                 (idmef_data_t *data,
                                                         char c);

data :

c :


idmef_data_set_byte ()

void                idmef_data_set_byte                 (idmef_data_t *data,
                                                         uint8_t i);

data :

i :


idmef_data_set_uint32 ()

void                idmef_data_set_uint32               (idmef_data_t *data,
                                                         uint32_t i);

data :

i :


idmef_data_set_uint64 ()

void                idmef_data_set_uint64               (idmef_data_t *data,
                                                         uint64_t i);

data :

i :


idmef_data_set_float ()

void                idmef_data_set_float                (idmef_data_t *data,
                                                         float f);

data :

f :


idmef_data_set_ptr_dup_fast ()

int                 idmef_data_set_ptr_dup_fast         (idmef_data_t *data,
                                                         idmef_data_type_t type,
                                                         const void *ptr,
                                                         size_t len);

data :

type :

ptr :

len :

Returns :


idmef_data_set_ptr_ref_fast ()

int                 idmef_data_set_ptr_ref_fast         (idmef_data_t *data,
                                                         idmef_data_type_t type,
                                                         const void *ptr,
                                                         size_t len);

data :

type :

ptr :

len :

Returns :


idmef_data_set_ptr_nodup_fast ()

int                 idmef_data_set_ptr_nodup_fast       (idmef_data_t *data,
                                                         idmef_data_type_t type,
                                                         void *ptr,
                                                         size_t len);

data :

type :

ptr :

len :

Returns :


idmef_data_new_ptr_dup_fast ()

int                 idmef_data_new_ptr_dup_fast         (idmef_data_t **data,
                                                         idmef_data_type_t type,
                                                         const void *ptr,
                                                         size_t len);

data :

type :

ptr :

len :

Returns :


idmef_data_new_ptr_ref_fast ()

int                 idmef_data_new_ptr_ref_fast         (idmef_data_t **data,
                                                         idmef_data_type_t type,
                                                         const void *ptr,
                                                         size_t len);

data :

type :

ptr :

len :

Returns :


idmef_data_new_ptr_nodup_fast ()

int                 idmef_data_new_ptr_nodup_fast       (idmef_data_t **data,
                                                         idmef_data_type_t type,
                                                         void *ptr,
                                                         size_t len);

data :

type :

ptr :

len :

Returns :


idmef_data_set_char_string_dup_fast ()

int                 idmef_data_set_char_string_dup_fast (idmef_data_t *data,
                                                         const char *str,
                                                         size_t len);

data :

str :

len :

Returns :


idmef_data_new_char_string_dup_fast ()

int                 idmef_data_new_char_string_dup_fast (idmef_data_t **data,
                                                         const char *str,
                                                         size_t len);

data :

str :

len :

Returns :


idmef_data_new_char_string_ref_fast ()

int                 idmef_data_new_char_string_ref_fast (idmef_data_t **data,
                                                         const char *ptr,
                                                         size_t len);

data :

ptr :

len :

Returns :


idmef_data_new_char_string_nodup_fast ()

int                 idmef_data_new_char_string_nodup_fast
                                                        (idmef_data_t **data,
                                                         char *ptr,
                                                         size_t len);

data :

ptr :

len :

Returns :


idmef_data_set_char_string_ref_fast ()

int                 idmef_data_set_char_string_ref_fast (idmef_data_t *data,
                                                         const char *ptr,
                                                         size_t len);

data :

ptr :

len :

Returns :


idmef_data_set_char_string_nodup_fast ()

int                 idmef_data_set_char_string_nodup_fast
                                                        (idmef_data_t *data,
                                                         char *ptr,
                                                         size_t len);

data :

ptr :

len :

Returns :


idmef_data_new_char_string_ref ()

int                 idmef_data_new_char_string_ref      (idmef_data_t **data,
                                                         const char *ptr);

data :

ptr :

Returns :


idmef_data_new_char_string_dup ()

int                 idmef_data_new_char_string_dup      (idmef_data_t **data,
                                                         const char *ptr);

data :

ptr :

Returns :


idmef_data_new_char_string_nodup ()

int                 idmef_data_new_char_string_nodup    (idmef_data_t **data,
                                                         char *ptr);

data :

ptr :

Returns :


idmef_data_set_char_string_ref ()

int                 idmef_data_set_char_string_ref      (idmef_data_t *data,
                                                         const char *ptr);

data :

ptr :

Returns :


idmef_data_set_char_string_dup ()

int                 idmef_data_set_char_string_dup      (idmef_data_t *data,
                                                         const char *ptr);

data :

ptr :

Returns :


idmef_data_set_char_string_nodup ()

int                 idmef_data_set_char_string_nodup    (idmef_data_t *data,
                                                         char *ptr);

data :

ptr :

Returns :


idmef_data_set_char_string_constant()

#define             idmef_data_set_char_string_constant(string, str)

string :

str :


idmef_data_new_byte_string_ref ()

int                 idmef_data_new_byte_string_ref      (idmef_data_t **data,
                                                         unsigned char *ptr,
                                                         size_t len);

data :

ptr :

len :

Returns :


idmef_data_new_byte_string_dup ()

int                 idmef_data_new_byte_string_dup      (idmef_data_t **data,
                                                         unsigned char *ptr,
                                                         size_t len);

data :

ptr :

len :

Returns :


idmef_data_new_byte_string_nodup ()

int                 idmef_data_new_byte_string_nodup    (idmef_data_t **data,
                                                         unsigned char *ptr,
                                                         size_t len);

data :

ptr :

len :

Returns :


idmef_data_set_byte_string_ref ()

int                 idmef_data_set_byte_string_ref      (idmef_data_t *data,
                                                         unsigned char *ptr,
                                                         size_t len);

data :

ptr :

len :

Returns :


idmef_data_set_byte_string_dup ()

int                 idmef_data_set_byte_string_dup      (idmef_data_t *data,
                                                         unsigned char *ptr,
                                                         size_t len);

data :

ptr :

len :

Returns :


idmef_data_set_byte_string_nodup ()

int                 idmef_data_set_byte_string_nodup    (idmef_data_t *data,
                                                         unsigned char *ptr,
                                                         size_t len);

data :

ptr :

len :

Returns :


idmef_data_destroy ()

void                idmef_data_destroy                  (idmef_data_t *data);

Frees data. The buffer pointed by data will be freed if the data object is marked as _dup or _nodup.

data :

Pointer to an idmef_data_t object.

idmef_data_copy_ref ()

int                 idmef_data_copy_ref                 (const idmef_data_t *src,
                                                         idmef_data_t *dst);

Makes dst reference the same buffer as src.

src :

Source idmef_data_t object.

dst :

Destination idmef_data_t object.

Returns :

0 on success, a negative value if an error occured.

idmef_data_copy_dup ()

int                 idmef_data_copy_dup                 (const idmef_data_t *src,
                                                         idmef_data_t *dst);

Copies src to dst, including the associated buffer. This is an alternative to idmef_data_clone().

src :

Source idmef_data_t object.

dst :

Destination idmef_data_t object.

Returns :

0 on success, a negative value if an error occured.

idmef_data_clone ()

int                 idmef_data_clone                    (const idmef_data_t *src,
                                                         idmef_data_t **dst);

src :

dst :

Returns :


idmef_data_get_type ()

idmef_data_type_t   idmef_data_get_type                 (const idmef_data_t *data);

data :

Pointer to an idmef_data_t object.

Returns :

the type of the embedded data.

idmef_data_get_len ()

size_t              idmef_data_get_len                  (const idmef_data_t *data);

data :

Pointer to an idmef_data_t object.

Returns :

the length of data contained within data object.

idmef_data_get_data ()

const void *        idmef_data_get_data                 (const idmef_data_t *data);

data :

Pointer to an idmef_data_t object.

Returns :

the data contained within data object.

idmef_data_get_char ()

char                idmef_data_get_char                 (const idmef_data_t *data);

data :

Returns :


idmef_data_get_byte ()

uint8_t             idmef_data_get_byte                 (const idmef_data_t *data);

data :

Returns :


idmef_data_get_uint32 ()

uint32_t            idmef_data_get_uint32               (const idmef_data_t *data);

data :

Returns :


idmef_data_get_uint64 ()

uint64_t            idmef_data_get_uint64               (const idmef_data_t *data);

data :

Returns :


idmef_data_get_float ()

float               idmef_data_get_float                (const idmef_data_t *data);

data :

Returns :


idmef_data_get_char_string ()

const char *        idmef_data_get_char_string          (const idmef_data_t *data);

data :

Returns :


idmef_data_get_byte_string ()

const unsigned char * idmef_data_get_byte_string        (const idmef_data_t *data);

data :

Returns :


idmef_data_is_empty ()

prelude_bool_t      idmef_data_is_empty                 (const idmef_data_t *data);

data :

Pointer to an idmef_data_t object.

Returns :

TRUE if empty, FALSE otherwise.

idmef_data_to_string ()

int                 idmef_data_to_string                (const idmef_data_t *data,
                                                         prelude_string_t *out);

Formats data contained within data to be printable, and stores the result in the provided out buffer.

data :

Pointer to an idmef_data_t object.

out :

Pointer to a prelude_string_t to store the formated data into.

Returns :

0 on success, a negative value if an error occured.

idmef_data_destroy_internal ()

void                idmef_data_destroy_internal         (idmef_data_t *data);

data :

libprelude-1.0.0/docs/api/html/pt02.html0000664000076400007640000000666711347714757014751 00000000000000 Part II. Sending events with libprelude

Part II. Sending events with libprelude

Table of Contents

The low level IDMEF API
idmef-tree-wrap — Generating events using the low level IDMEF API
idmef-additional-data
idmef-time — Time representation in IDMEF message
idmef-data
The high level IDMEF API
idmef-path — The High level IDMEF API.
idmef-value
libprelude-1.0.0/docs/api/html/home.png0000644000076400007640000000121611347714756014712 00000000000000PNG  IHDRw=bKGD pHYs  ~tIME1KvIDATxՕkq?rCp ~CnpCAAJ .B-\'G]:ܠC -(8 Ԁ!fDғklbRoyxwpðIJ<of_-@RHf֟t^ښ$Q|pgv;X^^&s(bwwZF9&3඙ ^IRZUE.0Z]]U PYM8HGIekqqҀ! $۬3n e{-/seeeÌXOͷ$8==USQRR'9-s+B^ Cەs+%<7W :2IENDB`libprelude-1.0.0/docs/api/html/libprelude-idmef-value.html0000664000076400007640000030423711347714757020501 00000000000000 idmef-value

idmef-value

idmef-value

Synopsis

typedef             idmef_value_t;
int                 idmef_value_new_int8                (idmef_value_t **value,
                                                         int8_t val);
int                 idmef_value_new_uint8               (idmef_value_t **value,
                                                         uint8_t val);
int                 idmef_value_new_int16               (idmef_value_t **value,
                                                         int16_t val);
int                 idmef_value_new_uint16              (idmef_value_t **value,
                                                         uint16_t val);
int                 idmef_value_new_int32               (idmef_value_t **value,
                                                         int32_t val);
int                 idmef_value_new_uint32              (idmef_value_t **value,
                                                         uint32_t val);
int                 idmef_value_new_int64               (idmef_value_t **value,
                                                         int64_t val);
int                 idmef_value_new_uint64              (idmef_value_t **value,
                                                         uint64_t val);
int                 idmef_value_new_float               (idmef_value_t **value,
                                                         float val);
int                 idmef_value_new_double              (idmef_value_t **value,
                                                         double val);
int                 idmef_value_new_string              (idmef_value_t **value,
                                                         prelude_string_t *string);
int                 idmef_value_new_time                (idmef_value_t **value,
                                                         idmef_time_t *time);
int                 idmef_value_new_data                (idmef_value_t **value,
                                                         idmef_data_t *data);
int                 idmef_value_new_class               (idmef_value_t **value,
                                                         idmef_class_id_t classid,
                                                         void *ptr);
int                 idmef_value_new_list                (idmef_value_t **value);
int                 idmef_value_new_enum                (idmef_value_t **value,
                                                         idmef_class_id_t classid,
                                                         const char *buf);
int                 idmef_value_new_enum_from_string    (idmef_value_t **value,
                                                         idmef_class_id_t classid,
                                                         const char *buf);
int                 idmef_value_new_enum_from_numeric   (idmef_value_t **value,
                                                         idmef_class_id_t classid,
                                                         int val);
int                 idmef_value_new                     (idmef_value_t **value,
                                                         idmef_value_type_id_t type,
                                                         void *ptr);
int                 idmef_value_new_from_path           (idmef_value_t **value,
                                                         idmef_path_t *path,
                                                         const char *buf);
int                 idmef_value_new_from_string         (idmef_value_t **value,
                                                         idmef_value_type_id_t type,
                                                         const char *buf);
int                 idmef_value_set_class               (idmef_value_t *value,
                                                         idmef_class_id_t classid,
                                                         void *ptr);
int                 idmef_value_set_data                (idmef_value_t *value,
                                                         idmef_data_t *data);
int                 idmef_value_set_double              (idmef_value_t *value,
                                                         double val);
int                 idmef_value_set_enum                (idmef_value_t *value,
                                                         idmef_class_id_t classid,
                                                         const char *buf);
int                 idmef_value_set_enum_from_numeric   (idmef_value_t *value,
                                                         idmef_class_id_t classid,
                                                         int no);
int                 idmef_value_set_enum_from_string    (idmef_value_t *value,
                                                         idmef_class_id_t classid,
                                                         const char *buf);
int                 idmef_value_set_float               (idmef_value_t *value,
                                                         float val);
int                 idmef_value_set_int16               (idmef_value_t *value,
                                                         int16_t val);
int                 idmef_value_set_int32               (idmef_value_t *value,
                                                         int32_t val);
int                 idmef_value_set_int64               (idmef_value_t *value,
                                                         int64_t val);
int                 idmef_value_set_int8                (idmef_value_t *value,
                                                         int8_t val);
int                 idmef_value_set_string              (idmef_value_t *value,
                                                         prelude_string_t *string);
int                 idmef_value_set_time                (idmef_value_t *value,
                                                         idmef_time_t *time);
int                 idmef_value_set_uint16              (idmef_value_t *value,
                                                         uint16_t val);
int                 idmef_value_set_uint32              (idmef_value_t *value,
                                                         uint32_t val);
int                 idmef_value_set_uint64              (idmef_value_t *value,
                                                         uint64_t val);
int                 idmef_value_set_uint8               (idmef_value_t *value,
                                                         uint8_t val);
int8_t              idmef_value_get_int8                (const idmef_value_t *val);
uint8_t             idmef_value_get_uint8               (const idmef_value_t *val);
int16_t             idmef_value_get_int16               (const idmef_value_t *val);
uint16_t            idmef_value_get_uint16              (const idmef_value_t *val);
int32_t             idmef_value_get_int32               (const idmef_value_t *val);
uint32_t            idmef_value_get_uint32              (const idmef_value_t *val);
int64_t             idmef_value_get_int64               (const idmef_value_t *val);
uint64_t            idmef_value_get_uint64              (const idmef_value_t *val);
int                 idmef_value_get_enum                (const idmef_value_t *val);
float               idmef_value_get_float               (const idmef_value_t *val);
double              idmef_value_get_double              (const idmef_value_t *val);
idmef_time_t *      idmef_value_get_time                (const idmef_value_t *val);
idmef_data_t *      idmef_value_get_data                (const idmef_value_t *val);
prelude_string_t *  idmef_value_get_string              (const idmef_value_t *val);
int                 idmef_value_list_add                (idmef_value_t *list,
                                                         idmef_value_t *item);
prelude_bool_t      idmef_value_is_list                 (const idmef_value_t *list);
prelude_bool_t      idmef_value_list_is_empty           (const idmef_value_t *list);
int                 idmef_value_have_own_data           (idmef_value_t *value);
int                 idmef_value_dont_have_own_data      (idmef_value_t *value);
idmef_value_type_id_t  idmef_value_get_type             (const idmef_value_t *value);
idmef_class_id_t    idmef_value_get_class               (const idmef_value_t *value);
void *              idmef_value_get_object              (const idmef_value_t *value);
int                 idmef_value_iterate                 (const idmef_value_t *value,
                                                         int (callbackidmef_value_t *ptr, void *extra) (),
                                                         void *extra);
int                 idmef_value_iterate_reversed        (const idmef_value_t *value,
                                                         int (callbackidmef_value_t *ptr, void *extra) (),
                                                         void *extra);
idmef_value_t *     idmef_value_get_nth                 (const idmef_value_t *val,
                                                         int n);
int                 idmef_value_get_count               (const idmef_value_t *val);
int                 idmef_value_clone                   (const idmef_value_t *val,
                                                         idmef_value_t **dst);
idmef_value_t *     idmef_value_ref                     (idmef_value_t *val);
int                 idmef_value_print                   (const idmef_value_t *val,
                                                         prelude_io_t *fd);
int                 idmef_value_to_string               (const idmef_value_t *val,
                                                         prelude_string_t *out);
int                 idmef_value_get                     (const idmef_value_t *val,
                                                         void *res);
int                 idmef_value_match                   (idmef_value_t *val1,
                                                         idmef_value_t *val2,
                                                         idmef_criterion_operator_t op);
int                 idmef_value_check_operator          (const idmef_value_t *value,
                                                         idmef_criterion_operator_t op);
int                 idmef_value_get_applicable_operators
                                                        (const idmef_value_t *value,
                                                         idmef_criterion_operator_t *result);
void                idmef_value_destroy                 (idmef_value_t *val);

Description

Details

idmef_value_t

typedef struct idmef_value idmef_value_t;


idmef_value_new_int8 ()

int                 idmef_value_new_int8                (idmef_value_t **value,
                                                         int8_t val);

value :

val :

Returns :


idmef_value_new_uint8 ()

int                 idmef_value_new_uint8               (idmef_value_t **value,
                                                         uint8_t val);

value :

val :

Returns :


idmef_value_new_int16 ()

int                 idmef_value_new_int16               (idmef_value_t **value,
                                                         int16_t val);

value :

val :

Returns :


idmef_value_new_uint16 ()

int                 idmef_value_new_uint16              (idmef_value_t **value,
                                                         uint16_t val);

value :

val :

Returns :


idmef_value_new_int32 ()

int                 idmef_value_new_int32               (idmef_value_t **value,
                                                         int32_t val);

value :

val :

Returns :


idmef_value_new_uint32 ()

int                 idmef_value_new_uint32              (idmef_value_t **value,
                                                         uint32_t val);

value :

val :

Returns :


idmef_value_new_int64 ()

int                 idmef_value_new_int64               (idmef_value_t **value,
                                                         int64_t val);

value :

val :

Returns :


idmef_value_new_uint64 ()

int                 idmef_value_new_uint64              (idmef_value_t **value,
                                                         uint64_t val);

value :

val :

Returns :


idmef_value_new_float ()

int                 idmef_value_new_float               (idmef_value_t **value,
                                                         float val);

value :

val :

Returns :


idmef_value_new_double ()

int                 idmef_value_new_double              (idmef_value_t **value,
                                                         double val);

value :

val :

Returns :


idmef_value_new_string ()

int                 idmef_value_new_string              (idmef_value_t **value,
                                                         prelude_string_t *string);

value :

string :

Returns :


idmef_value_new_time ()

int                 idmef_value_new_time                (idmef_value_t **value,
                                                         idmef_time_t *time);

value :

time :

Returns :


idmef_value_new_data ()

int                 idmef_value_new_data                (idmef_value_t **value,
                                                         idmef_data_t *data);

value :

data :

Returns :


idmef_value_new_class ()

int                 idmef_value_new_class               (idmef_value_t **value,
                                                         idmef_class_id_t classid,
                                                         void *ptr);

value :

classid :

ptr :

Returns :


idmef_value_new_list ()

int                 idmef_value_new_list                (idmef_value_t **value);

value :

Returns :


idmef_value_new_enum ()

int                 idmef_value_new_enum                (idmef_value_t **value,
                                                         idmef_class_id_t classid,
                                                         const char *buf);

value :

classid :

buf :

Returns :


idmef_value_new_enum_from_string ()

int                 idmef_value_new_enum_from_string    (idmef_value_t **value,
                                                         idmef_class_id_t classid,
                                                         const char *buf);

value :

classid :

buf :

Returns :


idmef_value_new_enum_from_numeric ()

int                 idmef_value_new_enum_from_numeric   (idmef_value_t **value,
                                                         idmef_class_id_t classid,
                                                         int val);

value :

classid :

val :

Returns :


idmef_value_new ()

int                 idmef_value_new                     (idmef_value_t **value,
                                                         idmef_value_type_id_t type,
                                                         void *ptr);

value :

type :

ptr :

Returns :


idmef_value_new_from_path ()

int                 idmef_value_new_from_path           (idmef_value_t **value,
                                                         idmef_path_t *path,
                                                         const char *buf);

value :

path :

buf :

Returns :


idmef_value_new_from_string ()

int                 idmef_value_new_from_string         (idmef_value_t **value,
                                                         idmef_value_type_id_t type,
                                                         const char *buf);

value :

type :

buf :

Returns :


idmef_value_set_class ()

int                 idmef_value_set_class               (idmef_value_t *value,
                                                         idmef_class_id_t classid,
                                                         void *ptr);

value :

classid :

ptr :

Returns :


idmef_value_set_data ()

int                 idmef_value_set_data                (idmef_value_t *value,
                                                         idmef_data_t *data);

value :

data :

Returns :


idmef_value_set_double ()

int                 idmef_value_set_double              (idmef_value_t *value,
                                                         double val);

value :

val :

Returns :


idmef_value_set_enum ()

int                 idmef_value_set_enum                (idmef_value_t *value,
                                                         idmef_class_id_t classid,
                                                         const char *buf);

value :

classid :

buf :

Returns :


idmef_value_set_enum_from_numeric ()

int                 idmef_value_set_enum_from_numeric   (idmef_value_t *value,
                                                         idmef_class_id_t classid,
                                                         int no);

value :

classid :

no :

Returns :


idmef_value_set_enum_from_string ()

int                 idmef_value_set_enum_from_string    (idmef_value_t *value,
                                                         idmef_class_id_t classid,
                                                         const char *buf);

value :

classid :

buf :

Returns :


idmef_value_set_float ()

int                 idmef_value_set_float               (idmef_value_t *value,
                                                         float val);

value :

val :

Returns :


idmef_value_set_int16 ()

int                 idmef_value_set_int16               (idmef_value_t *value,
                                                         int16_t val);

value :

val :

Returns :


idmef_value_set_int32 ()

int                 idmef_value_set_int32               (idmef_value_t *value,
                                                         int32_t val);

value :

val :

Returns :


idmef_value_set_int64 ()

int                 idmef_value_set_int64               (idmef_value_t *value,
                                                         int64_t val);

value :

val :

Returns :


idmef_value_set_int8 ()

int                 idmef_value_set_int8                (idmef_value_t *value,
                                                         int8_t val);

value :

val :

Returns :


idmef_value_set_string ()

int                 idmef_value_set_string              (idmef_value_t *value,
                                                         prelude_string_t *string);

value :

string :

Returns :


idmef_value_set_time ()

int                 idmef_value_set_time                (idmef_value_t *value,
                                                         idmef_time_t *time);

value :

time :

Returns :


idmef_value_set_uint16 ()

int                 idmef_value_set_uint16              (idmef_value_t *value,
                                                         uint16_t val);

value :

val :

Returns :


idmef_value_set_uint32 ()

int                 idmef_value_set_uint32              (idmef_value_t *value,
                                                         uint32_t val);

value :

val :

Returns :


idmef_value_set_uint64 ()

int                 idmef_value_set_uint64              (idmef_value_t *value,
                                                         uint64_t val);

value :

val :

Returns :


idmef_value_set_uint8 ()

int                 idmef_value_set_uint8               (idmef_value_t *value,
                                                         uint8_t val);

value :

val :

Returns :


idmef_value_get_int8 ()

int8_t              idmef_value_get_int8                (const idmef_value_t *val);

val :

Returns :


idmef_value_get_uint8 ()

uint8_t             idmef_value_get_uint8               (const idmef_value_t *val);

val :

Returns :


idmef_value_get_int16 ()

int16_t             idmef_value_get_int16               (const idmef_value_t *val);

val :

Returns :


idmef_value_get_uint16 ()

uint16_t            idmef_value_get_uint16              (const idmef_value_t *val);

val :

Returns :


idmef_value_get_int32 ()

int32_t             idmef_value_get_int32               (const idmef_value_t *val);

val :

Returns :


idmef_value_get_uint32 ()

uint32_t            idmef_value_get_uint32              (const idmef_value_t *val);

val :

Returns :


idmef_value_get_int64 ()

int64_t             idmef_value_get_int64               (const idmef_value_t *val);

val :

Returns :


idmef_value_get_uint64 ()

uint64_t            idmef_value_get_uint64              (const idmef_value_t *val);

val :

Returns :


idmef_value_get_enum ()

int                 idmef_value_get_enum                (const idmef_value_t *val);

val :

Returns :


idmef_value_get_float ()

float               idmef_value_get_float               (const idmef_value_t *val);

val :

Returns :


idmef_value_get_double ()

double              idmef_value_get_double              (const idmef_value_t *val);

val :

Returns :


idmef_value_get_time ()

idmef_time_t *      idmef_value_get_time                (const idmef_value_t *val);

val :

Returns :


idmef_value_get_data ()

idmef_data_t *      idmef_value_get_data                (const idmef_value_t *val);

val :

Returns :


idmef_value_get_string ()

prelude_string_t *  idmef_value_get_string              (const idmef_value_t *val);

val :

Returns :


idmef_value_list_add ()

int                 idmef_value_list_add                (idmef_value_t *list,
                                                         idmef_value_t *item);

list :

item :

Returns :


idmef_value_is_list ()

prelude_bool_t      idmef_value_is_list                 (const idmef_value_t *list);

list :

Returns :


idmef_value_list_is_empty ()

prelude_bool_t      idmef_value_list_is_empty           (const idmef_value_t *list);

list :

Returns :


idmef_value_have_own_data ()

int                 idmef_value_have_own_data           (idmef_value_t *value);

value :

Returns :


idmef_value_dont_have_own_data ()

int                 idmef_value_dont_have_own_data      (idmef_value_t *value);

value :

Returns :


idmef_value_get_type ()

idmef_value_type_id_t  idmef_value_get_type             (const idmef_value_t *value);

value :

Returns :


idmef_value_get_class ()

idmef_class_id_t    idmef_value_get_class               (const idmef_value_t *value);

value :

Returns :


idmef_value_get_object ()

void *              idmef_value_get_object              (const idmef_value_t *value);

value :

Returns :


idmef_value_iterate ()

int                 idmef_value_iterate                 (const idmef_value_t *value,
                                                         int (callbackidmef_value_t *ptr, void *extra) (),
                                                         void *extra);

value :

callback :

extra :

Returns :


idmef_value_iterate_reversed ()

int                 idmef_value_iterate_reversed        (const idmef_value_t *value,
                                                         int (callbackidmef_value_t *ptr, void *extra) (),
                                                         void *extra);

value :

callback :

extra :

Returns :


idmef_value_get_nth ()

idmef_value_t *     idmef_value_get_nth                 (const idmef_value_t *val,
                                                         int n);

val :

n :

Returns :


idmef_value_get_count ()

int                 idmef_value_get_count               (const idmef_value_t *val);

val :

Returns :


idmef_value_clone ()

int                 idmef_value_clone                   (const idmef_value_t *val,
                                                         idmef_value_t **dst);

val :

dst :

Returns :


idmef_value_ref ()

idmef_value_t *     idmef_value_ref                     (idmef_value_t *val);

val :

Returns :


idmef_value_print ()

int                 idmef_value_print                   (const idmef_value_t *val,
                                                         prelude_io_t *fd);

val :

fd :

Returns :


idmef_value_to_string ()

int                 idmef_value_to_string               (const idmef_value_t *val,
                                                         prelude_string_t *out);

val :

out :

Returns :


idmef_value_get ()

int                 idmef_value_get                     (const idmef_value_t *val,
                                                         void *res);

val :

res :

Returns :


idmef_value_match ()

int                 idmef_value_match                   (idmef_value_t *val1,
                                                         idmef_value_t *val2,
                                                         idmef_criterion_operator_t op);

Match val1 and val2 using op.

val1 :

Pointer to a idmef_value_t object.

val2 :

Pointer to a idmef_value_t object.

op :

operator to use for matching.

Returns :

the number of match, 0 for none, a negative value if an error occured.

idmef_value_check_operator ()

int                 idmef_value_check_operator          (const idmef_value_t *value,
                                                         idmef_criterion_operator_t op);

Check whether op can apply to value.

value :

Pointer to a idmef_value_t object.

op :

Type of operator to check value for.

Returns :

0 on success, a negative value if an error occured.

idmef_value_get_applicable_operators ()

int                 idmef_value_get_applicable_operators
                                                        (const idmef_value_t *value,
                                                         idmef_criterion_operator_t *result);

Store all operator supported by value in result.

value :

Pointer to a idmef_value_t object.

result :

Pointer where the result will be stored.

Returns :

0 on success, a negative value if an error occured.

idmef_value_destroy ()

void                idmef_value_destroy                 (idmef_value_t *val);

Decrement refcount and destroy value if it reach 0.

val :

Pointer to a idmef_value_t object.
libprelude-1.0.0/docs/api/html/libprelude-prelude-io.html0000664000076400007640000012266311347714757020351 00000000000000 prelude-io

prelude-io

prelude-io

Synopsis

typedef             prelude_io_t;
int                 prelude_io_new                      (prelude_io_t **ret);
void                prelude_io_destroy                  (prelude_io_t *pio);
void                prelude_io_set_file_io              (prelude_io_t *pio,
                                                         FILE *fd);
void                prelude_io_set_tls_io               (prelude_io_t *pio,
                                                         void *tls);
void                prelude_io_set_sys_io               (prelude_io_t *pio,
                                                         int fd);
int                 prelude_io_set_buffer_io            (prelude_io_t *pio);
void                prelude_io_set_fdptr                (prelude_io_t *pio,
                                                         void *ptr);
void                prelude_io_set_pending_callback     (prelude_io_t *pio,
                                                         ssize_t (pendingprelude_io_t *io) ());
void                prelude_io_set_read_callback        (prelude_io_t *pio,
                                                         ssize_t (readprelude_io_t *io, void *buf, size_t count) ());
void                prelude_io_set_write_callback       (prelude_io_t *pio,
                                                         ssize_t (writeprelude_io_t *io, const void *buf, size_t count) ());
int                 prelude_io_close                    (prelude_io_t *pio);
ssize_t             prelude_io_read                     (prelude_io_t *pio,
                                                         void *buf,
                                                         size_t count);
ssize_t             prelude_io_read_wait                (prelude_io_t *pio,
                                                         void *buf,
                                                         size_t count);
ssize_t             prelude_io_read_delimited           (prelude_io_t *pio,
                                                         unsigned char **buf);
ssize_t             prelude_io_write                    (prelude_io_t *pio,
                                                         const void *buf,
                                                         size_t count);
ssize_t             prelude_io_write_delimited          (prelude_io_t *pio,
                                                         const void *buf,
                                                         uint16_t count);
ssize_t             prelude_io_forward                  (prelude_io_t *dst,
                                                         prelude_io_t *src,
                                                         size_t count);
int                 prelude_io_get_fd                   (prelude_io_t *pio);
void *              prelude_io_get_fdptr                (prelude_io_t *pio);
ssize_t             prelude_io_pending                  (prelude_io_t *pio);
prelude_bool_t      prelude_io_is_error_fatal           (prelude_io_t *pio,
                                                         int error);

Description

Details

prelude_io_t

typedef struct prelude_io prelude_io_t;


prelude_io_new ()

int                 prelude_io_new                      (prelude_io_t **ret);

Create a new prelude IO object.

ret :

Pointer where to store the created prelude_io_t object.

Returns :

0 on success, or a negative value if an error occur.

prelude_io_destroy ()

void                prelude_io_destroy                  (prelude_io_t *pio);

Destroy the pio object.

pio :

Pointer to a prelude_io_t object.

prelude_io_set_file_io ()

void                prelude_io_set_file_io              (prelude_io_t *pio,
                                                         FILE *fd);

Setup the pio object to work with file I/O function. The pio object is then associated with fd.

pio :

A pointer on the prelude_io_t object.

fd :

File descriptor identifying a file.

prelude_io_set_tls_io ()

void                prelude_io_set_tls_io               (prelude_io_t *pio,
                                                         void *tls);

Setup the pio object to work with TLS based I/O function. The pio object is then associated with tls.

pio :

A pointer on the prelude_io_t object.

tls :

Pointer on the TLS structure holding the TLS connection data.

prelude_io_set_sys_io ()

void                prelude_io_set_sys_io               (prelude_io_t *pio,
                                                         int fd);

Setup the pio object to work with system based I/O function. The pio object is then associated with fd.

pio :

A pointer on the prelude_io_t object.

fd :

A file descriptor.

prelude_io_set_buffer_io ()

int                 prelude_io_set_buffer_io            (prelude_io_t *pio);

pio :

Returns :


prelude_io_set_fdptr ()

void                prelude_io_set_fdptr                (prelude_io_t *pio,
                                                         void *ptr);

Set an user defined pointer that might be retrieved using prelude_io_get_fdptr().

pio :

Pointer to a prelude_io_t object.

ptr :

Pointer to user defined data.

prelude_io_set_pending_callback ()

void                prelude_io_set_pending_callback     (prelude_io_t *pio,
                                                         ssize_t (pendingprelude_io_t *io) ());

Set an user defined read callback function to be called on prelude_io_pending().

pio :

Pointer to a prelude_io_t object.

pending :

Callback function to be called on prelude_io_pending().

prelude_io_set_read_callback ()

void                prelude_io_set_read_callback        (prelude_io_t *pio,
                                                         ssize_t (readprelude_io_t *io, void *buf, size_t count) ());

Set an user defined read callback function to be called on prelude_io_read().

pio :

Pointer to a prelude_io_t object.

read :

Callback function to be called on prelude_io_read().

prelude_io_set_write_callback ()

void                prelude_io_set_write_callback       (prelude_io_t *pio,
                                                         ssize_t (writeprelude_io_t *io, const void *buf, size_t count) ());

Set an user defined write callback function to be called on prelude_io_write().

pio :

Pointer to a prelude_io_t object.

write :

Callback function to be called on prelude_io_write().

prelude_io_close ()

int                 prelude_io_close                    (prelude_io_t *pio);

prelude_io_close() closes the file descriptor indentified by pio,

The case where the close() function would be interrupted by a signal is handled internally. So you don't have to check for EINTR.

However, and especially when the underlaying layer is TLS, prelude_io_close() might return error. If this happen, you should continue calling the function until it return zero.

pio :

Pointer to a prelude_io_t object.

Returns :

zero on success, or -1 if an error occurred.

prelude_io_read ()

ssize_t             prelude_io_read                     (prelude_io_t *pio,
                                                         void *buf,
                                                         size_t count);

prelude_io_read() attempts to read up to count bytes from the file descriptor identified by pio into the buffer starting at buf.

If count is zero, prelude_io_read() returns zero and has no other results. If count is greater than SSIZE_MAX, the result is unspecified.

The case where the read function would be interrupted by a signal is handled internally. So you don't have to check for EINTR.

pio :

Pointer to a prelude_io_t object.

buf :

Pointer to the buffer to store data into.

count :

Number of bytes to read.

Returns :

On success, the number of bytes read is returned (zero indicates end of file). It is not an error if this number is smaller than the number of bytes requested; this may happen for example because fewer bytes are actually available right now or because read() was interrupted by a signal. On error, a negative value is returned. In this case it is left unspecified whether the file position (if any) changes.

prelude_io_read_wait ()

ssize_t             prelude_io_read_wait                (prelude_io_t *pio,
                                                         void *buf,
                                                         size_t count);

prelude_io_read_wait() attempts to read up to count bytes from the file descriptor identified by pio into the buffer starting at buf.

If count is zero, prelude_io_read() returns zero and has no other results. If count is greater than SSIZE_MAX, the result is unspecified.

The case where the read function would be interrupted by a signal is handled internally. So you don't have to check for EINTR.

prelude_io_read_wait() always return the number of bytes requested. Be carefull that this function is blocking.

pio :

Pointer to a prelude_io_t object.

buf :

Pointer to the buffer to store data into.

count :

Number of bytes to read.

Returns :

On success, the number of bytes read is returned (zero indicates end of file). On error, -1 is returned, and errno is set appropriately. In this case it is left unspecified whether the file position (if any) changes.

prelude_io_read_delimited ()

ssize_t             prelude_io_read_delimited           (prelude_io_t *pio,
                                                         unsigned char **buf);

prelude_io_read_delimited() read message written by prelude_write_delimited(). Theses messages are sents along with the len of the message.

Uppon return the buf argument is updated to point on a newly allocated buffer containing the data read. The count argument is set to the number of bytes the message was containing.

The case where the read function would be interrupted by a signal is handled internally. So you don't have to check for EINTR.

pio :

Pointer to a prelude_io_t object.

buf :

Pointer to the address of a buffer to store address of data into.

Returns :

On success, the number of bytes read is returned (zero indicates end of file). On error, -1 is returned, and errno is set appropriately. In this case it is left unspecified whether the file position (if any) changes.

prelude_io_write ()

ssize_t             prelude_io_write                    (prelude_io_t *pio,
                                                         const void *buf,
                                                         size_t count);

prelude_io_write() writes up to count bytes to the file descriptor identified by pio from the buffer starting at buf. POSIX requires that a read() which can be proved to occur after a write() has returned returns the new data. Note that not all file systems are POSIX conforming.

The case where the write() function would be interrupted by a signal is handled internally. So you don't have to check for EINTR.

pio :

Pointer to a prelude_io_t object.

buf :

Pointer to the buffer to write data from.

count :

Number of bytes to write.

Returns :

On success, the number of bytes written are returned (zero indicates nothing was written). On error, -1 is returned, and errno is set appropriately. If count is zero and the file descriptor refers to a regular file, 0 will be returned without causing any other effect. For a special file, the results are not portable.

prelude_io_write_delimited ()

ssize_t             prelude_io_write_delimited          (prelude_io_t *pio,
                                                         const void *buf,
                                                         uint16_t count);

prelude_io_write_delimited() writes up to count bytes to the file descriptor identified by pio from the buffer starting at buf. POSIX requires that a read() which can be proved to occur after a write() has returned returns the new data. Note that not all file systems are POSIX conforming.

prelude_io_write_delimited() also write the len of the data to be sent. which allow prelude_io_read_delimited() to safely know if it got all the data a given write contain.

The case where the write() function would be interrupted by a signal is handled internally. So you don't have to check for EINTR.

pio :

Pointer to a prelude_io_t object.

buf :

Pointer to the buffer to write data from.

count :

Number of bytes to write.

Returns :

On success, the number of bytes written are returned (zero indicates nothing was written). On error, -1 is returned, and errno is set appropriately.

prelude_io_forward ()

ssize_t             prelude_io_forward                  (prelude_io_t *dst,
                                                         prelude_io_t *src,
                                                         size_t count);

prelude_io_forward() attempts to transfer up to count bytes from the file descriptor identified by src into the file descriptor identified by dst.

dst :

Pointer to a prelude_io_t object.

src :

Pointer to a prelude_io_t object.

count :

Number of byte to forward from src to dst.

Returns :

If the transfer was successful, the number of bytes written to dst is returned. On error, -1 is returned, and errno is set appropriately.

prelude_io_get_fd ()

int                 prelude_io_get_fd                   (prelude_io_t *pio);

pio :

A pointer on a prelude_io_t object.

Returns :

The FD associated with this object.

prelude_io_get_fdptr ()

void *              prelude_io_get_fdptr                (prelude_io_t *pio);

pio :

A pointer on a prelude_io_t object.

Returns :

Pointer associated with this object (file, tls, buffer, or NULL).

prelude_io_pending ()

ssize_t             prelude_io_pending                  (prelude_io_t *pio);

prelude_io_pending return the number of bytes waiting to be read on an TLS or socket fd.

pio :

Pointer to a prelude_io_t object.

Returns :

Number of byte waiting to be read on pio, or -1 if pio is not of type TLS or socket.

prelude_io_is_error_fatal ()

prelude_bool_t      prelude_io_is_error_fatal           (prelude_io_t *pio,
                                                         int error);

Check whether the returned error is fatal, or not.

pio :

Pointer to a prelude_io_t object.

error :

Error returned by one of the prelude_io_t function.

Returns :

TRUE if error is fatal, FALSE if it is not.
libprelude-1.0.0/docs/api/html/libprelude-prelude-linked-object.html0000664000076400007640000001120711347714757022443 00000000000000 prelude-linked-object

prelude-linked-object

prelude-linked-object

Description

Details

PRELUDE_LINKED_OBJECT

#define             PRELUDE_LINKED_OBJECT


prelude_linked_object_t

typedef struct {
        PRELUDE_LINKED_OBJECT;
} prelude_linked_object_t;


prelude_linked_object_get_object()

#define             prelude_linked_object_get_object(object)

object :

libprelude-1.0.0/docs/api/html/libprelude-prelude-failover.html0000664000076400007640000004205311347714757021543 00000000000000 prelude-failover

prelude-failover

prelude-failover

Description

Details

prelude_failover_t

typedef struct prelude_failover prelude_failover_t;


prelude_failover_destroy ()

void                prelude_failover_destroy            (prelude_failover_t *failover);

failover :


prelude_failover_new ()

int                 prelude_failover_new                (prelude_failover_t **ret,
                                                         const char *dirname);

ret :

dirname :

Returns :


prelude_failover_set_quota ()

void                prelude_failover_set_quota          (prelude_failover_t *failover,
                                                         size_t limit);

failover :

limit :


prelude_failover_save_msg ()

int                 prelude_failover_save_msg           (prelude_failover_t *failover,
                                                         prelude_msg_t *msg);

failover :

msg :

Returns :


prelude_failover_get_saved_msg ()

ssize_t             prelude_failover_get_saved_msg      (prelude_failover_t *failover,
                                                         prelude_msg_t **out);

failover :

out :

Returns :


prelude_failover_get_deleted_msg_count ()

unsigned long       prelude_failover_get_deleted_msg_count
                                                        (prelude_failover_t *failover);

failover :

Returns :


prelude_failover_get_available_msg_count ()

unsigned long       prelude_failover_get_available_msg_count
                                                        (prelude_failover_t *failover);

failover :

Returns :


prelude_failover_commit ()

int                 prelude_failover_commit             (prelude_failover_t *failover,
                                                         prelude_msg_t *msg);

failover :

msg :

Returns :


prelude_failover_disable_transaction ()

void                prelude_failover_disable_transaction
                                                        (prelude_failover_t *failover);

failover :


prelude_failover_enable_transaction ()

void                prelude_failover_enable_transaction (prelude_failover_t *failover);

failover :


prelude_failover_rollback ()

int                 prelude_failover_rollback           (prelude_failover_t *failover,
                                                         prelude_msg_t *msg);

failover :

msg :

Returns :

libprelude-1.0.0/docs/api/html/libprelude-prelude-timer.html0000664000076400007640000003405711347714757021061 00000000000000 prelude-timer

prelude-timer

prelude-timer

Description

Details

prelude_timer_t

typedef struct {
        prelude_list_t list;

        int expire;
        time_t start_time;

        void *data;
        void (*function)(void *data);
} prelude_timer_t;


prelude_timer_get_expire()

#define prelude_timer_get_expire(timer) (timer)->expire

timer :


prelude_timer_get_data()

#define prelude_timer_get_data(timer) (timer)->data

timer :


prelude_timer_get_callback()

#define prelude_timer_get_callback(timer) (timer)->function

timer :


prelude_timer_set_expire()

#define prelude_timer_set_expire(timer, x) prelude_timer_get_expire((timer)) = (x)

timer :

x :


prelude_timer_set_data()

#define prelude_timer_set_data(timer, x) prelude_timer_get_data((timer)) = (x)

timer :

x :


prelude_timer_set_callback()

#define prelude_timer_set_callback(timer, x) prelude_timer_get_callback((timer)) = (x)

timer :

x :


prelude_timer_init ()

void                prelude_timer_init                  (prelude_timer_t *timer);

Initialize a timer (add it to the timer list).

timer :

timer to initialize.

prelude_timer_init_list ()

void                prelude_timer_init_list             (prelude_timer_t *timer);

Initialize timer list member. This is useful if you're going to call prelude_timer_destroy() on timer for which prelude_timer_init() was never called.

timer :

Pointer to a prelude_timer_t object.

prelude_timer_reset ()

void                prelude_timer_reset                 (prelude_timer_t *timer);

Reset timer 'timer', as if it was just started.

timer :

the timer to reset.

prelude_timer_destroy ()

void                prelude_timer_destroy               (prelude_timer_t *timer);

Destroy the timer 'timer', this remove it from the active timer list.

timer :

the timer to destroy.

prelude_timer_wake_up ()

void                prelude_timer_wake_up               (void);

Wake up timer that need it. This function should be called every second to work properly.


prelude_timer_flush ()

void                prelude_timer_flush                 (void);

Expire every timer.


prelude_timer_lock_critical_region ()

void                prelude_timer_lock_critical_region  (void);

Deactivate timer wake-up until timer_unlock_critical_region() is called.


prelude_timer_unlock_critical_region ()

void                prelude_timer_unlock_critical_region
                                                        (void);

Reactivate timer wake-up after timer_lock_critical_regions() has been called.

libprelude-1.0.0/docs/api/html/libprelude-idmef-criteria.html0000664000076400007640000014564311347714757021173 00000000000000 idmef-criteria

idmef-criteria

idmef-criteria

Synopsis

enum                idmef_criterion_operator_t;
typedef             idmef_criteria_t;
typedef             idmef_criterion_t;
const char *        idmef_criterion_operator_to_string  (idmef_criterion_operator_t op);
int                 idmef_criterion_new                 (idmef_criterion_t **criterion,
                                                         idmef_path_t *path,
                                                         idmef_criterion_value_t *value,
                                                         idmef_criterion_operator_t op);
void                idmef_criterion_destroy             (idmef_criterion_t *criterion);
int                 idmef_criterion_clone               (const idmef_criterion_t *criterion,
                                                         idmef_criterion_t **dst);
int                 idmef_criterion_print               (const idmef_criterion_t *criterion,
                                                         prelude_io_t *fd);
int                 idmef_criterion_to_string           (const idmef_criterion_t *criterion,
                                                         prelude_string_t *out);
idmef_path_t *      idmef_criterion_get_path            (const idmef_criterion_t *criterion);
idmef_criterion_value_t * idmef_criterion_get_value     (const idmef_criterion_t *criterion);
idmef_criterion_operator_t  idmef_criterion_get_operator
                                                        (const idmef_criterion_t *criterion);
int                 idmef_criterion_match               (const idmef_criterion_t *criterion,
                                                         idmef_message_t *message);
int                 idmef_criteria_new                  (idmef_criteria_t **criteria);
idmef_criteria_t *  idmef_criteria_ref                  (idmef_criteria_t *criteria);
void                idmef_criteria_destroy              (idmef_criteria_t *criteria);
int                 idmef_criteria_clone                (idmef_criteria_t *src,
                                                         idmef_criteria_t **dst);
int                 idmef_criteria_print                (const idmef_criteria_t *criteria,
                                                         prelude_io_t *fd);
int                 idmef_criteria_to_string            (const idmef_criteria_t *criteria,
                                                         prelude_string_t *out);
prelude_bool_t      idmef_criteria_is_criterion         (const idmef_criteria_t *criteria);
idmef_criterion_t * idmef_criteria_get_criterion        (const idmef_criteria_t *criteria);
void                idmef_criteria_set_criterion        (idmef_criteria_t *criteria,
                                                         idmef_criterion_t *criterion);
void                idmef_criteria_or_criteria          (idmef_criteria_t *criteria,
                                                         idmef_criteria_t *criteria2);
int                 idmef_criteria_and_criteria         (idmef_criteria_t *criteria,
                                                         idmef_criteria_t *criteria2);
int                 idmef_criteria_match                (const idmef_criteria_t *criteria,
                                                         idmef_message_t *message);
idmef_criteria_t *  idmef_criteria_get_or               (const idmef_criteria_t *criteria);
idmef_criteria_t *  idmef_criteria_get_and              (const idmef_criteria_t *criteria);
int                 idmef_criteria_new_from_string      (idmef_criteria_t **criteria,
                                                         const char *str);
prelude_bool_t      idmef_criteria_get_negation         (const idmef_criteria_t *criteria);
void                idmef_criteria_set_negation         (idmef_criteria_t *criteria,
                                                         prelude_bool_t negate);

Description

Details

enum idmef_criterion_operator_t

typedef enum {
        IDMEF_CRITERION_OPERATOR_NOT               = 0x8000,
        IDMEF_CRITERION_OPERATOR_NOCASE            = 0x4000,

        IDMEF_CRITERION_OPERATOR_EQUAL             = 0x0001,
        IDMEF_CRITERION_OPERATOR_EQUAL_NOCASE      = IDMEF_CRITERION_OPERATOR_EQUAL|IDMEF_CRITERION_OPERATOR_NOCASE,
        IDMEF_CRITERION_OPERATOR_NOT_EQUAL         = IDMEF_CRITERION_OPERATOR_NOT|IDMEF_CRITERION_OPERATOR_EQUAL,
        IDMEF_CRITERION_OPERATOR_NOT_EQUAL_NOCASE  = IDMEF_CRITERION_OPERATOR_NOT_EQUAL|IDMEF_CRITERION_OPERATOR_EQUAL_NOCASE,

        IDMEF_CRITERION_OPERATOR_LESSER            = 0x0002,
        IDMEF_CRITERION_OPERATOR_LESSER_OR_EQUAL   = IDMEF_CRITERION_OPERATOR_LESSER|IDMEF_CRITERION_OPERATOR_EQUAL,

        IDMEF_CRITERION_OPERATOR_GREATER           = 0x0004,
        IDMEF_CRITERION_OPERATOR_GREATER_OR_EQUAL  = IDMEF_CRITERION_OPERATOR_GREATER|IDMEF_CRITERION_OPERATOR_EQUAL,

        IDMEF_CRITERION_OPERATOR_SUBSTR            = 0x0008,
        IDMEF_CRITERION_OPERATOR_SUBSTR_NOCASE     = IDMEF_CRITERION_OPERATOR_SUBSTR|IDMEF_CRITERION_OPERATOR_NOCASE,
        IDMEF_CRITERION_OPERATOR_NOT_SUBSTR        = IDMEF_CRITERION_OPERATOR_NOT|IDMEF_CRITERION_OPERATOR_SUBSTR,
        IDMEF_CRITERION_OPERATOR_NOT_SUBSTR_NOCASE = IDMEF_CRITERION_OPERATOR_NOT|IDMEF_CRITERION_OPERATOR_SUBSTR_NOCASE,

        IDMEF_CRITERION_OPERATOR_REGEX             = 0x0010,
        IDMEF_CRITERION_OPERATOR_REGEX_NOCASE      = IDMEF_CRITERION_OPERATOR_REGEX|IDMEF_CRITERION_OPERATOR_NOCASE,
        IDMEF_CRITERION_OPERATOR_NOT_REGEX         = IDMEF_CRITERION_OPERATOR_NOT|IDMEF_CRITERION_OPERATOR_REGEX,
        IDMEF_CRITERION_OPERATOR_NOT_REGEX_NOCASE  = IDMEF_CRITERION_OPERATOR_NOT|IDMEF_CRITERION_OPERATOR_REGEX_NOCASE,

        IDMEF_CRITERION_OPERATOR_NULL              = 0x0020,
        IDMEF_CRITERION_OPERATOR_NOT_NULL          = IDMEF_CRITERION_OPERATOR_NULL|IDMEF_CRITERION_OPERATOR_NOT
} idmef_criterion_operator_t;


idmef_criteria_t

typedef struct idmef_criteria idmef_criteria_t;


idmef_criterion_t

typedef struct idmef_criterion idmef_criterion_t;


idmef_criterion_operator_to_string ()

const char *        idmef_criterion_operator_to_string  (idmef_criterion_operator_t op);

Transforms op to string.

op :

idmef_criterion_operator_t type.

Returns :

A pointer to an operator string or NULL.

idmef_criterion_new ()

int                 idmef_criterion_new                 (idmef_criterion_t **criterion,
                                                         idmef_path_t *path,
                                                         idmef_criterion_value_t *value,
                                                         idmef_criterion_operator_t op);

Creates a new idmef_criterion_t object and store it in criterion. Matching this criterion will result in comparing the object value pointed by path against the provided value, using op.

criterion :

Address where to store the created idmef_criterion_t object.

path :

Pointer to an idmef_path_t object.

value :

Pointer to an idmef_criterion_value_t object.

op :

idmef_criterion_operator_t to use for matching this criterion.

Returns :

0 on success, a negative value if an error occured.

idmef_criterion_destroy ()

void                idmef_criterion_destroy             (idmef_criterion_t *criterion);

Destroys criterion and its content.

criterion :

Pointer to a idmef_criterion_t object.

idmef_criterion_clone ()

int                 idmef_criterion_clone               (const idmef_criterion_t *criterion,
                                                         idmef_criterion_t **dst);

Clones criterion and stores the cloned criterion within dst.

criterion :

Pointer to a idmef_criterion_t object to clone.

dst :

Address where to store the cloned idmef_criterion_t object.

Returns :

0 on success, a negative value if an error occured.

idmef_criterion_print ()

int                 idmef_criterion_print               (const idmef_criterion_t *criterion,
                                                         prelude_io_t *fd);

Dump criterion to fd in the form of: [path] [operator] [value]

Or if there is no value associated with the criterion: [operator] [path]

criterion :

Pointer to a idmef_criterion_t object.

fd :

Pointer to a prelude_io_t object.

Returns :

0 on success, a negative value if an error occured.

idmef_criterion_to_string ()

int                 idmef_criterion_to_string           (const idmef_criterion_t *criterion,
                                                         prelude_string_t *out);

Dump criterion as a string to the out buffer in the form of: [path] [operator] [value]

Or if there is no value associated with the criterion: [operator] [path]

criterion :

Pointer to a idmef_criterion_t object.

out :

Pointer to a prelude_string_t object.

Returns :

0 on success, a negative value if an error occured.

idmef_criterion_get_path ()

idmef_path_t *      idmef_criterion_get_path            (const idmef_criterion_t *criterion);

Used to access the idmef_path_t object associated with criterion.

criterion :

Pointer to a idmef_criterion_t object.

Returns :

the idmef_path_t object associated with criterion.

idmef_criterion_get_value ()

idmef_criterion_value_t * idmef_criterion_get_value     (const idmef_criterion_t *criterion);

Used to access the idmef_criterion_value_t associated with criterion. There might be no value specifically if the provided idmef_criterion_operator_t was IDMEF_CRITERION_OPERATOR_NULL or IDMEF_CRITERION_OPERATOR_NOT_NULL.

criterion :

Pointer to a idmef_criterion_t object.

Returns :

the idmef_criterion_value_t object associated with criterion.

idmef_criterion_get_operator ()

idmef_criterion_operator_t  idmef_criterion_get_operator
                                                        (const idmef_criterion_t *criterion);

Used to access the idmef_criterion_operator_t enumeration associated with criterion.

criterion :

Pointer to a idmef_criterion_t object.

Returns :

the idmef_criterion_operator_t associated with criterion.

idmef_criterion_match ()

int                 idmef_criterion_match               (const idmef_criterion_t *criterion,
                                                         idmef_message_t *message);

Matches message against the provided criterion. This implies retrieving the value associated with criterion path, and matching it with the idmef_criterion_value_t object within criterion.

criterion :

Pointer to a idmef_criterion_t object.

message :

Pointer to a idmef_message_t object to match against criterion.

Returns :

1 for a match, 0 for no match, or a negative value if an error occured.

idmef_criteria_new ()

int                 idmef_criteria_new                  (idmef_criteria_t **criteria);

Creates a new idmef_criteria_t object and store it into criteria.

criteria :

Address where to store the created idmef_criteria_t object.

Returns :

0 on success, a negative value if an error occured.

idmef_criteria_ref ()

idmef_criteria_t *  idmef_criteria_ref                  (idmef_criteria_t *criteria);

Increases criteria reference count.

idmef_criteria_destroy() will decrease the refcount until it reaches 0, at which point criteria will be destroyed.

criteria :

Pointer to a idmef_criteria_t object to reference.

Returns :

criteria.

idmef_criteria_destroy ()

void                idmef_criteria_destroy              (idmef_criteria_t *criteria);

Destroys criteria and its content.

criteria :

Pointer to a idmef_criteria_t object.

idmef_criteria_clone ()

int                 idmef_criteria_clone                (idmef_criteria_t *src,
                                                         idmef_criteria_t **dst);

Clones src and stores the cloned criteria within dst.

src :

Pointer to a idmef_criteria_t object to clone.

dst :

Address where to store the cloned idmef_criteria_t object.

Returns :

0 on success, a negative value if an error occured.

idmef_criteria_print ()

int                 idmef_criteria_print                (const idmef_criteria_t *criteria,
                                                         prelude_io_t *fd);

criteria :

fd :

Returns :


idmef_criteria_to_string ()

int                 idmef_criteria_to_string            (const idmef_criteria_t *criteria,
                                                         prelude_string_t *out);

criteria :

out :

Returns :


idmef_criteria_is_criterion ()

prelude_bool_t      idmef_criteria_is_criterion         (const idmef_criteria_t *criteria);

criteria :

Returns :


idmef_criteria_get_criterion ()

idmef_criterion_t * idmef_criteria_get_criterion        (const idmef_criteria_t *criteria);

criteria :

Returns :


idmef_criteria_set_criterion ()

void                idmef_criteria_set_criterion        (idmef_criteria_t *criteria,
                                                         idmef_criterion_t *criterion);

criteria :

criterion :


idmef_criteria_or_criteria ()

void                idmef_criteria_or_criteria          (idmef_criteria_t *criteria,
                                                         idmef_criteria_t *criteria2);

criteria :

criteria2 :


idmef_criteria_and_criteria ()

int                 idmef_criteria_and_criteria         (idmef_criteria_t *criteria,
                                                         idmef_criteria_t *criteria2);

criteria :

criteria2 :

Returns :


idmef_criteria_match ()

int                 idmef_criteria_match                (const idmef_criteria_t *criteria,
                                                         idmef_message_t *message);

Matches message against the provided criteria.

criteria :

Pointer to a idmef_criteria_t object.

message :

Pointer to a idmef_message_t message.

Returns :

1 if criteria match, 0 if it did not, a negative value if an error occured.

idmef_criteria_get_or ()

idmef_criteria_t *  idmef_criteria_get_or               (const idmef_criteria_t *criteria);

criteria :

Returns :


idmef_criteria_get_and ()

idmef_criteria_t *  idmef_criteria_get_and              (const idmef_criteria_t *criteria);

criteria :

Returns :


idmef_criteria_new_from_string ()

int                 idmef_criteria_new_from_string      (idmef_criteria_t **criteria,
                                                         const char *str);

criteria :

str :

Returns :


idmef_criteria_get_negation ()

prelude_bool_t      idmef_criteria_get_negation         (const idmef_criteria_t *criteria);

criteria :

Returns :


idmef_criteria_set_negation ()

void                idmef_criteria_set_negation         (idmef_criteria_t *criteria,
                                                         prelude_bool_t negate);

criteria :

negate :

libprelude-1.0.0/docs/api/html/ch04.html0000664000076400007640000001201211347714757014677 00000000000000 Others libprelude-1.0.0/docs/api/html/libprelude-prelude-async.html0000664000076400007640000002544611347714757021060 00000000000000 prelude-async

prelude-async

prelude-async

Description

Details

enum prelude_async_flags_t

typedef enum {
        PRELUDE_ASYNC_FLAGS_TIMER   = 0x01
} prelude_async_flags_t;

This provides asynchronous timer. When enabled, the heartbeat function (and user specified callback, if any) will be called automatically, from an asynchronous thread.

If you use this flags, you won't need to call prelude_wake_up_timer() anymore.

PRELUDE_ASYNC_FLAGS_TIMER

Enable asynchronous timer.

prelude_async_callback_t ()

void                (*prelude_async_callback_t)         (void *object,
                                                         void *data);

object :

data :


PRELUDE_ASYNC_OBJECT

#define             PRELUDE_ASYNC_OBJECT


prelude_async_object_t

typedef struct {
        PRELUDE_ASYNC_OBJECT;
} prelude_async_object_t;


prelude_async_init ()

int                 prelude_async_init                  (void);

Initialize the asynchronous subsystem.

Returns :

0 on success, -1 if an error occured.

prelude_async_get_flags ()

prelude_async_flags_t  prelude_async_get_flags          (void);

Retrieves flags from the asynchronous subsystem

Returns :

asynchronous flags

prelude_async_set_flags ()

void                prelude_async_set_flags             (prelude_async_flags_t flags);

Sets flags to the asynchronous subsystem.

flags :

flags you want to set

prelude_async_add ()

void                prelude_async_add                   (prelude_async_object_t *obj);

Adds obj to the asynchronous processing list.

obj :

Pointer to a prelude_async_t object.

prelude_async_del ()

void                prelude_async_del                   (prelude_async_object_t *obj);

Deletes obj from the asynchronous processing list.

obj :

Pointer to a prelude_async_t object.

prelude_async_exit ()

void                prelude_async_exit                  (void);

libprelude-1.0.0/docs/api/html/libprelude-prelude-connection.html0000664000076400007640000013107511347714757022076 00000000000000 prelude-connection

prelude-connection

prelude-connection

Synopsis

enum                prelude_connection_permission_t;
enum                prelude_connection_state_t;
typedef             prelude_connection_t;
void                prelude_connection_destroy          (prelude_connection_t *conn);
int                 prelude_connection_send             (prelude_connection_t *cnx,
                                                         prelude_msg_t *msg);
int                 prelude_connection_recv             (prelude_connection_t *cnx,
                                                         prelude_msg_t **outmsg);
int                 prelude_connection_recv_idmef       (prelude_connection_t *con,
                                                         idmef_message_t **idmef);
int                 prelude_connection_connect          (prelude_connection_t *cnx,
                                                         prelude_client_profile_t *profile,
                                                         prelude_connection_permission_t permission);
ssize_t             prelude_connection_forward          (prelude_connection_t *cnx,
                                                         prelude_io_t *src,
                                                         size_t count);
const char *        prelude_connection_get_local_addr   (prelude_connection_t *cnx);
unsigned int        prelude_connection_get_local_port   (prelude_connection_t *cnx);
const char *        prelude_connection_get_peer_addr    (prelude_connection_t *cnx);
unsigned int        prelude_connection_get_peer_port    (prelude_connection_t *cnx);
prelude_bool_t      prelude_connection_is_alive         (prelude_connection_t *cnx);
prelude_io_t *      prelude_connection_get_fd           (prelude_connection_t *cnx);
int                 prelude_connection_close            (prelude_connection_t *cnx);
void                prelude_connection_set_fd_ref       (prelude_connection_t *cnx,
                                                         prelude_io_t *fd);
void                prelude_connection_set_fd_nodup     (prelude_connection_t *cnx,
                                                         prelude_io_t *fd);
void                prelude_connection_set_state        (prelude_connection_t *cnx,
                                                         prelude_connection_state_t state);
prelude_connection_state_t  prelude_connection_get_state
                                                        (prelude_connection_t *cnx);
void                prelude_connection_set_data         (prelude_connection_t *cnx,
                                                         void *data);
void *              prelude_connection_get_data         (prelude_connection_t *cnx);
const char *        prelude_connection_get_default_socket_filename
                                                        (void);
prelude_connection_permission_t  prelude_connection_get_permission
                                                        (prelude_connection_t *conn);
uint64_t            prelude_connection_get_peer_analyzerid
                                                        (prelude_connection_t *cnx);
void                prelude_connection_set_peer_analyzerid
                                                        (prelude_connection_t *cnx,
                                                         uint64_t analyzerid);
int                 prelude_connection_new              (prelude_connection_t **ret,
                                                         const char *addr);
prelude_connection_t * prelude_connection_ref           (prelude_connection_t *conn);
int                 prelude_connection_new_msgbuf       (prelude_connection_t *connection,
                                                         prelude_msgbuf_t **msgbuf);
int                 prelude_connection_permission_to_string
                                                        (prelude_connection_permission_t perm,
                                                         prelude_string_t *out);
int                 prelude_connection_permission_new_from_string
                                                        (prelude_connection_permission_t *out,
                                                         const char *buf);

Description

Details

enum prelude_connection_permission_t

typedef enum {
        PRELUDE_CONNECTION_PERMISSION_IDMEF_READ      = 0x01, /* client might read received IDMEF message */
        PRELUDE_CONNECTION_PERMISSION_ADMIN_READ      = 0x02, /* client might read received ADMIN message */
        PRELUDE_CONNECTION_PERMISSION_IDMEF_WRITE     = 0x04, /* client might send IDMEF message          */
        PRELUDE_CONNECTION_PERMISSION_ADMIN_WRITE     = 0x08  /* client might issue OPTION request        */
} prelude_connection_permission_t;


enum prelude_connection_state_t

typedef enum {
        PRELUDE_CONNECTION_STATE_ESTABLISHED     = 0x01
} prelude_connection_state_t;


prelude_connection_t

typedef struct prelude_connection prelude_connection_t;


prelude_connection_destroy ()

void                prelude_connection_destroy          (prelude_connection_t *conn);

Destroy the connection referenced by conn.

In case the connection is still alive, it is closed in a blocking manner. Use prelude_connection_close() if you want to close the connection in a non blocking manner prior prelude_connection_destroy().

conn :

Pointer to a prelude_connection_t object.

prelude_connection_send ()

int                 prelude_connection_send             (prelude_connection_t *cnx,
                                                         prelude_msg_t *msg);

cnx :

msg :

Returns :


prelude_connection_recv ()

int                 prelude_connection_recv             (prelude_connection_t *cnx,
                                                         prelude_msg_t **outmsg);

cnx :

outmsg :

Returns :


prelude_connection_recv_idmef ()

int                 prelude_connection_recv_idmef       (prelude_connection_t *con,
                                                         idmef_message_t **idmef);

con :

idmef :

Returns :


prelude_connection_connect ()

int                 prelude_connection_connect          (prelude_connection_t *cnx,
                                                         prelude_client_profile_t *profile,
                                                         prelude_connection_permission_t permission);

cnx :

profile :

permission :

Returns :


prelude_connection_forward ()

ssize_t             prelude_connection_forward          (prelude_connection_t *cnx,
                                                         prelude_io_t *src,
                                                         size_t count);

cnx :

src :

count :

Returns :


prelude_connection_get_local_addr ()

const char *        prelude_connection_get_local_addr   (prelude_connection_t *cnx);

cnx :

Pointer to a prelude_connection_t object.

Returns :

the local address used to connect.

prelude_connection_get_local_port ()

unsigned int        prelude_connection_get_local_port   (prelude_connection_t *cnx);

cnx :

Pointer to a prelude_connection_t object.

Returns :

the local port used to connect.

prelude_connection_get_peer_addr ()

const char *        prelude_connection_get_peer_addr    (prelude_connection_t *cnx);

cnx :

Returns :


prelude_connection_get_peer_port ()

unsigned int        prelude_connection_get_peer_port    (prelude_connection_t *cnx);

cnx :

Returns :


prelude_connection_is_alive ()

prelude_bool_t      prelude_connection_is_alive         (prelude_connection_t *cnx);

cnx :

Pointer to a prelude_connection_t object.

Returns :

0 if the connection associated with cnx is alive, -1 otherwise.

prelude_connection_get_fd ()

prelude_io_t *      prelude_connection_get_fd           (prelude_connection_t *cnx);

cnx :

Pointer to a prelude_connection_t object.

Returns :

A pointer to the prelude_io_t object used for communicating with the peer.

prelude_connection_close ()

int                 prelude_connection_close            (prelude_connection_t *cnx);

cnx :

Returns :


prelude_connection_set_fd_ref ()

void                prelude_connection_set_fd_ref       (prelude_connection_t *cnx,
                                                         prelude_io_t *fd);

cnx :

fd :


prelude_connection_set_fd_nodup ()

void                prelude_connection_set_fd_nodup     (prelude_connection_t *cnx,
                                                         prelude_io_t *fd);

cnx :

fd :


prelude_connection_set_state ()

void                prelude_connection_set_state        (prelude_connection_t *cnx,
                                                         prelude_connection_state_t state);

cnx :

state :


prelude_connection_get_state ()

prelude_connection_state_t  prelude_connection_get_state
                                                        (prelude_connection_t *cnx);

cnx :

Returns :


prelude_connection_set_data ()

void                prelude_connection_set_data         (prelude_connection_t *cnx,
                                                         void *data);

cnx :

data :


prelude_connection_get_data ()

void *              prelude_connection_get_data         (prelude_connection_t *cnx);

cnx :

Returns :


prelude_connection_get_default_socket_filename ()

const char *        prelude_connection_get_default_socket_filename
                                                        (void);

Returns :


prelude_connection_get_permission ()

prelude_connection_permission_t  prelude_connection_get_permission
                                                        (prelude_connection_t *conn);

conn :

Returns :


prelude_connection_get_peer_analyzerid ()

uint64_t            prelude_connection_get_peer_analyzerid
                                                        (prelude_connection_t *cnx);

cnx :

Returns :


prelude_connection_set_peer_analyzerid ()

void                prelude_connection_set_peer_analyzerid
                                                        (prelude_connection_t *cnx,
                                                         uint64_t analyzerid);

cnx :

analyzerid :


prelude_connection_new ()

int                 prelude_connection_new              (prelude_connection_t **ret,
                                                         const char *addr);

ret :

addr :

Returns :


prelude_connection_ref ()

prelude_connection_t * prelude_connection_ref           (prelude_connection_t *conn);

Increases conn reference count.

prelude_connection_destroy() will decrease the refcount until it reaches 0, at which point conn will be destroyed.

conn :

Pointer to a prelude_connection_t object to reference.

Returns :

conn.

prelude_connection_new_msgbuf ()

int                 prelude_connection_new_msgbuf       (prelude_connection_t *connection,
                                                         prelude_msgbuf_t **msgbuf);

connection :

msgbuf :

Returns :


prelude_connection_permission_to_string ()

int                 prelude_connection_permission_to_string
                                                        (prelude_connection_permission_t perm,
                                                         prelude_string_t *out);

perm :

out :

Returns :


prelude_connection_permission_new_from_string ()

int                 prelude_connection_permission_new_from_string
                                                        (prelude_connection_permission_t *out,
                                                         const char *buf);

out :

buf :

Returns :

libprelude-1.0.0/docs/api/html/libprelude-prelude-msgbuf.html0000664000076400007640000004460011347714757021217 00000000000000 prelude-msgbuf

prelude-msgbuf

prelude-msgbuf

Description

Details

prelude_msgbuf_t

typedef struct prelude_msgbuf prelude_msgbuf_t;


enum prelude_msgbuf_flags_t

typedef enum {
        PRELUDE_MSGBUF_FLAGS_ASYNC = 0x01
} prelude_msgbuf_flags_t;


prelude_msgbuf_new ()

int                 prelude_msgbuf_new                  (prelude_msgbuf_t **msgbuf);

Create a new prelude_msgbuf_t object and store it into msgbuf. You can then write data to msgbuf using the prelude_msgbuf_set() function.

When the message buffer is full, the message will be flushed using the user provided callback.

msgbuf :

Pointer where to store the created prelude_msgbuf_t object.

Returns :

0 on success, or a negative value if an error occured.

prelude_msgbuf_destroy ()

void                prelude_msgbuf_destroy              (prelude_msgbuf_t *msgbuf);

Destroy msgbuf, all data remaining will be flushed.

msgbuf :

Pointer on a prelude_msgbuf_t object.

prelude_msgbuf_mark_end ()

void                prelude_msgbuf_mark_end             (prelude_msgbuf_t *msgbuf);

This function should be called to tell the msgbuf subsystem that you finished writing your message.

msgbuf :

Pointer on prelude_msgbuf_t object.

prelude_msgbuf_set ()

int                 prelude_msgbuf_set                  (prelude_msgbuf_t *msgbuf,
                                                         uint8_t tag,
                                                         uint32_t len,
                                                         const void *data);

prelude_msgbuf_set() append len bytes of data from the data buffer to the msgbuf object representing a message. The data is tagged with tag.

msgbuf :

Pointer on a prelude_msgbuf_t object to store the data to.

tag :

8 bits unsigned integer describing the kind of data.

len :

len of the data chunk.

data :

Pointer to the data.

Returns :

0 on success, a negative value if an error occured.

prelude_msgbuf_get_msg ()

prelude_msg_t *     prelude_msgbuf_get_msg              (prelude_msgbuf_t *msgbuf);

msgbuf :

Pointer on a prelude_msgbuf_t object.

Returns :

This function return the current message associated with the message buffer.

prelude_msgbuf_set_callback ()

void                prelude_msgbuf_set_callback         (prelude_msgbuf_t *msgbuf,
                                                         int (send_msgprelude_msgbuf_t *msgbuf, prelude_msg_t *msg) ());

Associate an application specific callback to this msgbuf.

msgbuf :

Pointer on a prelude_msgbuf_t object.

send_msg :

Pointer to a function for sending a message.

prelude_msgbuf_set_data ()

void                prelude_msgbuf_set_data             (prelude_msgbuf_t *msgbuf,
                                                         void *data);

msgbuf :

data :


prelude_msgbuf_get_data ()

void *              prelude_msgbuf_get_data             (prelude_msgbuf_t *msgbuf);

msgbuf :

Returns :


prelude_msgbuf_set_flags ()

void                prelude_msgbuf_set_flags            (prelude_msgbuf_t *msgbuf,
                                                         prelude_msgbuf_flags_t flags);

msgbuf :

flags :


prelude_msgbuf_get_flags ()

prelude_msgbuf_flags_t  prelude_msgbuf_get_flags        (prelude_msgbuf_t *msgbuf);

msgbuf :

Returns :

libprelude-1.0.0/docs/api/html/libprelude-idmef-message-read.html0000664000076400007640000017700011347714757021716 00000000000000 idmef-message-read

idmef-message-read

idmef-message-read — Reading a message from a prelude_msg_t buffer

Synopsis

int                 idmef_additional_data_read          (idmef_additional_data_t *additional_data,
                                                         prelude_msg_t *msg);
int                 idmef_reference_read                (idmef_reference_t *reference,
                                                         prelude_msg_t *msg);
int                 idmef_classification_read           (idmef_classification_t *classification,
                                                         prelude_msg_t *msg);
int                 idmef_user_id_read                  (idmef_user_id_t *user_id,
                                                         prelude_msg_t *msg);
int                 idmef_user_read                     (idmef_user_t *user,
                                                         prelude_msg_t *msg);
int                 idmef_address_read                  (idmef_address_t *address,
                                                         prelude_msg_t *msg);
int                 idmef_process_read                  (idmef_process_t *process,
                                                         prelude_msg_t *msg);
int                 idmef_web_service_read              (idmef_web_service_t *web_service,
                                                         prelude_msg_t *msg);
int                 idmef_snmp_service_read             (idmef_snmp_service_t *snmp_service,
                                                         prelude_msg_t *msg);
int                 idmef_service_read                  (idmef_service_t *service,
                                                         prelude_msg_t *msg);
int                 idmef_node_read                     (idmef_node_t *node,
                                                         prelude_msg_t *msg);
int                 idmef_source_read                   (idmef_source_t *source,
                                                         prelude_msg_t *msg);
int                 idmef_file_access_read              (idmef_file_access_t *file_access,
                                                         prelude_msg_t *msg);
int                 idmef_inode_read                    (idmef_inode_t *inode,
                                                         prelude_msg_t *msg);
int                 idmef_checksum_read                 (idmef_checksum_t *checksum,
                                                         prelude_msg_t *msg);
int                 idmef_file_read                     (idmef_file_t *file,
                                                         prelude_msg_t *msg);
int                 idmef_linkage_read                  (idmef_linkage_t *linkage,
                                                         prelude_msg_t *msg);
int                 idmef_target_read                   (idmef_target_t *target,
                                                         prelude_msg_t *msg);
int                 idmef_analyzer_read                 (idmef_analyzer_t *analyzer,
                                                         prelude_msg_t *msg);
int                 idmef_alertident_read               (idmef_alertident_t *alertident,
                                                         prelude_msg_t *msg);
int                 idmef_impact_read                   (idmef_impact_t *impact,
                                                         prelude_msg_t *msg);
int                 idmef_action_read                   (idmef_action_t *action,
                                                         prelude_msg_t *msg);
int                 idmef_confidence_read               (idmef_confidence_t *confidence,
                                                         prelude_msg_t *msg);
int                 idmef_assessment_read               (idmef_assessment_t *assessment,
                                                         prelude_msg_t *msg);
int                 idmef_tool_alert_read               (idmef_tool_alert_t *tool_alert,
                                                         prelude_msg_t *msg);
int                 idmef_correlation_alert_read        (idmef_correlation_alert_t *correlation_alert,
                                                         prelude_msg_t *msg);
int                 idmef_overflow_alert_read           (idmef_overflow_alert_t *overflow_alert,
                                                         prelude_msg_t *msg);
int                 idmef_alert_read                    (idmef_alert_t *alert,
                                                         prelude_msg_t *msg);
int                 idmef_heartbeat_read                (idmef_heartbeat_t *heartbeat,
                                                         prelude_msg_t *msg);
int                 idmef_message_read                  (idmef_message_t *message,
                                                         prelude_msg_t *msg);

Description

Once you read a prelude_msg_t object, you need to decode this message. In case this is an IDMEF style message, the following API allow to read the relevant IDMEF fields from the prelude_msg_t object, and create the IDMEF object from it's content.

The function you're most probably looking to use is idmef_message_read(), and here is an example on how to use it:

int ret;
prelude_msg_t *pmsg;
idmef_message_t *message;
pmsg = whatever_method_to_get_a_prelude_msg();
ret = idmef_message_new(&message);
if ( ret < 0 )
        return ret;
ret = idmef_message_read(message, pmsg);

This will decode the full IDMEF message stored within pmsg into the idmef_message_t IDMEF object and it's childrens.

Details

idmef_additional_data_read ()

int                 idmef_additional_data_read          (idmef_additional_data_t *additional_data,
                                                         prelude_msg_t *msg);

Read an idmef_additional_data from the msg message, and store it into additional_data.

additional_data :

Pointer to a idmef_additional_data_t object.

msg :

Pointer to a prelude_msg_t object, containing a message.

Returns :

0 on success, a negative value if an error occured.

idmef_reference_read ()

int                 idmef_reference_read                (idmef_reference_t *reference,
                                                         prelude_msg_t *msg);

Read an idmef_reference from the msg message, and store it into reference.

reference :

Pointer to a idmef_reference_t object.

msg :

Pointer to a prelude_msg_t object, containing a message.

Returns :

0 on success, a negative value if an error occured.

idmef_classification_read ()

int                 idmef_classification_read           (idmef_classification_t *classification,
                                                         prelude_msg_t *msg);

Read an idmef_classification from the msg message, and store it into classification.

classification :

Pointer to a idmef_classification_t object.

msg :

Pointer to a prelude_msg_t object, containing a message.

Returns :

0 on success, a negative value if an error occured.

idmef_user_id_read ()

int                 idmef_user_id_read                  (idmef_user_id_t *user_id,
                                                         prelude_msg_t *msg);

Read an idmef_user_id from the msg message, and store it into user_id.

user_id :

Pointer to a idmef_user_id_t object.

msg :

Pointer to a prelude_msg_t object, containing a message.

Returns :

0 on success, a negative value if an error occured.

idmef_user_read ()

int                 idmef_user_read                     (idmef_user_t *user,
                                                         prelude_msg_t *msg);

Read an idmef_user from the msg message, and store it into user.

user :

Pointer to a idmef_user_t object.

msg :

Pointer to a prelude_msg_t object, containing a message.

Returns :

0 on success, a negative value if an error occured.

idmef_address_read ()

int                 idmef_address_read                  (idmef_address_t *address,
                                                         prelude_msg_t *msg);

Read an idmef_address from the msg message, and store it into address.

address :

Pointer to a idmef_address_t object.

msg :

Pointer to a prelude_msg_t object, containing a message.

Returns :

0 on success, a negative value if an error occured.

idmef_process_read ()

int                 idmef_process_read                  (idmef_process_t *process,
                                                         prelude_msg_t *msg);

Read an idmef_process from the msg message, and store it into process.

process :

Pointer to a idmef_process_t object.

msg :

Pointer to a prelude_msg_t object, containing a message.

Returns :

0 on success, a negative value if an error occured.

idmef_web_service_read ()

int                 idmef_web_service_read              (idmef_web_service_t *web_service,
                                                         prelude_msg_t *msg);

Read an idmef_web_service from the msg message, and store it into web_service.

web_service :

Pointer to a idmef_web_service_t object.

msg :

Pointer to a prelude_msg_t object, containing a message.

Returns :

0 on success, a negative value if an error occured.

idmef_snmp_service_read ()

int                 idmef_snmp_service_read             (idmef_snmp_service_t *snmp_service,
                                                         prelude_msg_t *msg);

Read an idmef_snmp_service from the msg message, and store it into snmp_service.

snmp_service :

Pointer to a idmef_snmp_service_t object.

msg :

Pointer to a prelude_msg_t object, containing a message.

Returns :

0 on success, a negative value if an error occured.

idmef_service_read ()

int                 idmef_service_read                  (idmef_service_t *service,
                                                         prelude_msg_t *msg);

Read an idmef_service from the msg message, and store it into service.

service :

Pointer to a idmef_service_t object.

msg :

Pointer to a prelude_msg_t object, containing a message.

Returns :

0 on success, a negative value if an error occured.

idmef_node_read ()

int                 idmef_node_read                     (idmef_node_t *node,
                                                         prelude_msg_t *msg);

Read an idmef_node from the msg message, and store it into node.

node :

Pointer to a idmef_node_t object.

msg :

Pointer to a prelude_msg_t object, containing a message.

Returns :

0 on success, a negative value if an error occured.

idmef_source_read ()

int                 idmef_source_read                   (idmef_source_t *source,
                                                         prelude_msg_t *msg);

Read an idmef_source from the msg message, and store it into source.

source :

Pointer to a idmef_source_t object.

msg :

Pointer to a prelude_msg_t object, containing a message.

Returns :

0 on success, a negative value if an error occured.

idmef_file_access_read ()

int                 idmef_file_access_read              (idmef_file_access_t *file_access,
                                                         prelude_msg_t *msg);

Read an idmef_file_access from the msg message, and store it into file_access.

file_access :

Pointer to a idmef_file_access_t object.

msg :

Pointer to a prelude_msg_t object, containing a message.

Returns :

0 on success, a negative value if an error occured.

idmef_inode_read ()

int                 idmef_inode_read                    (idmef_inode_t *inode,
                                                         prelude_msg_t *msg);

Read an idmef_inode from the msg message, and store it into inode.

inode :

Pointer to a idmef_inode_t object.

msg :

Pointer to a prelude_msg_t object, containing a message.

Returns :

0 on success, a negative value if an error occured.

idmef_checksum_read ()

int                 idmef_checksum_read                 (idmef_checksum_t *checksum,
                                                         prelude_msg_t *msg);

Read an idmef_checksum from the msg message, and store it into checksum.

checksum :

Pointer to a idmef_checksum_t object.

msg :

Pointer to a prelude_msg_t object, containing a message.

Returns :

0 on success, a negative value if an error occured.

idmef_file_read ()

int                 idmef_file_read                     (idmef_file_t *file,
                                                         prelude_msg_t *msg);

Read an idmef_file from the msg message, and store it into file.

file :

Pointer to a idmef_file_t object.

msg :

Pointer to a prelude_msg_t object, containing a message.

Returns :

0 on success, a negative value if an error occured.

idmef_linkage_read ()

int                 idmef_linkage_read                  (idmef_linkage_t *linkage,
                                                         prelude_msg_t *msg);

Read an idmef_linkage from the msg message, and store it into linkage.

linkage :

Pointer to a idmef_linkage_t object.

msg :

Pointer to a prelude_msg_t object, containing a message.

Returns :

0 on success, a negative value if an error occured.

idmef_target_read ()

int                 idmef_target_read                   (idmef_target_t *target,
                                                         prelude_msg_t *msg);

Read an idmef_target from the msg message, and store it into target.

target :

Pointer to a idmef_target_t object.

msg :

Pointer to a prelude_msg_t object, containing a message.

Returns :

0 on success, a negative value if an error occured.

idmef_analyzer_read ()

int                 idmef_analyzer_read                 (idmef_analyzer_t *analyzer,
                                                         prelude_msg_t *msg);

Read an idmef_analyzer from the msg message, and store it into analyzer.

analyzer :

Pointer to a idmef_analyzer_t object.

msg :

Pointer to a prelude_msg_t object, containing a message.

Returns :

0 on success, a negative value if an error occured.

idmef_alertident_read ()

int                 idmef_alertident_read               (idmef_alertident_t *alertident,
                                                         prelude_msg_t *msg);

Read an idmef_alertident from the msg message, and store it into alertident.

alertident :

Pointer to a idmef_alertident_t object.

msg :

Pointer to a prelude_msg_t object, containing a message.

Returns :

0 on success, a negative value if an error occured.

idmef_impact_read ()

int                 idmef_impact_read                   (idmef_impact_t *impact,
                                                         prelude_msg_t *msg);

Read an idmef_impact from the msg message, and store it into impact.

impact :

Pointer to a idmef_impact_t object.

msg :

Pointer to a prelude_msg_t object, containing a message.

Returns :

0 on success, a negative value if an error occured.

idmef_action_read ()

int                 idmef_action_read                   (idmef_action_t *action,
                                                         prelude_msg_t *msg);

Read an idmef_action from the msg message, and store it into action.

action :

Pointer to a idmef_action_t object.

msg :

Pointer to a prelude_msg_t object, containing a message.

Returns :

0 on success, a negative value if an error occured.

idmef_confidence_read ()

int                 idmef_confidence_read               (idmef_confidence_t *confidence,
                                                         prelude_msg_t *msg);

Read an idmef_confidence from the msg message, and store it into confidence.

confidence :

Pointer to a idmef_confidence_t object.

msg :

Pointer to a prelude_msg_t object, containing a message.

Returns :

0 on success, a negative value if an error occured.

idmef_assessment_read ()

int                 idmef_assessment_read               (idmef_assessment_t *assessment,
                                                         prelude_msg_t *msg);

Read an idmef_assessment from the msg message, and store it into assessment.

assessment :

Pointer to a idmef_assessment_t object.

msg :

Pointer to a prelude_msg_t object, containing a message.

Returns :

0 on success, a negative value if an error occured.

idmef_tool_alert_read ()

int                 idmef_tool_alert_read               (idmef_tool_alert_t *tool_alert,
                                                         prelude_msg_t *msg);

Read an idmef_tool_alert from the msg message, and store it into tool_alert.

tool_alert :

Pointer to a idmef_tool_alert_t object.

msg :

Pointer to a prelude_msg_t object, containing a message.

Returns :

0 on success, a negative value if an error occured.

idmef_correlation_alert_read ()

int                 idmef_correlation_alert_read        (idmef_correlation_alert_t *correlation_alert,
                                                         prelude_msg_t *msg);

Read an idmef_correlation_alert from the msg message, and store it into correlation_alert.

correlation_alert :

Pointer to a idmef_correlation_alert_t object.

msg :

Pointer to a prelude_msg_t object, containing a message.

Returns :

0 on success, a negative value if an error occured.

idmef_overflow_alert_read ()

int                 idmef_overflow_alert_read           (idmef_overflow_alert_t *overflow_alert,
                                                         prelude_msg_t *msg);

Read an idmef_overflow_alert from the msg message, and store it into overflow_alert.

overflow_alert :

Pointer to a idmef_overflow_alert_t object.

msg :

Pointer to a prelude_msg_t object, containing a message.

Returns :

0 on success, a negative value if an error occured.

idmef_alert_read ()

int                 idmef_alert_read                    (idmef_alert_t *alert,
                                                         prelude_msg_t *msg);

Read an idmef_alert from the msg message, and store it into alert.

alert :

Pointer to a idmef_alert_t object.

msg :

Pointer to a prelude_msg_t object, containing a message.

Returns :

0 on success, a negative value if an error occured.

idmef_heartbeat_read ()

int                 idmef_heartbeat_read                (idmef_heartbeat_t *heartbeat,
                                                         prelude_msg_t *msg);

Read an idmef_heartbeat from the msg message, and store it into heartbeat.

heartbeat :

Pointer to a idmef_heartbeat_t object.

msg :

Pointer to a prelude_msg_t object, containing a message.

Returns :

0 on success, a negative value if an error occured.

idmef_message_read ()

int                 idmef_message_read                  (idmef_message_t *message,
                                                         prelude_msg_t *msg);

Read an idmef_message from the msg message, and store it into message.

message :

Pointer to a idmef_message_t object.

msg :

Pointer to a prelude_msg_t object, containing a message.

Returns :

0 on success, a negative value if an error occured.
libprelude-1.0.0/docs/api/html/libprelude-idmef-path.html0000664000076400007640000014446511347714757020326 00000000000000 idmef-path

idmef-path

idmef-path — The High level IDMEF API.

Synopsis

typedef             idmef_path_t;
int                 idmef_path_get                      (const idmef_path_t *path,
                                                         idmef_message_t *message,
                                                         idmef_value_t **ret);
int                 idmef_path_set                      (const idmef_path_t *path,
                                                         idmef_message_t *message,
                                                         idmef_value_t *value);
int                 idmef_path_new                      (idmef_path_t **path,
                                                         const char *format,
                                                         ...);
int                 idmef_path_new_v                    (idmef_path_t **path,
                                                         const char *format,
                                                         va_list args);
int                 idmef_path_new_fast                 (idmef_path_t **path,
                                                         const char *buffer);
idmef_class_id_t    idmef_path_get_class                (const idmef_path_t *path,
                                                         int depth);
idmef_value_type_id_t  idmef_path_get_value_type        (const idmef_path_t *path,
                                                         int depth);
int                 idmef_path_set_index                (idmef_path_t *path,
                                                         unsigned int depth,
                                                         int index);
int                 idmef_path_undefine_index           (idmef_path_t *path,
                                                         unsigned int depth);
int                 idmef_path_get_index                (const idmef_path_t *path,
                                                         unsigned int depth);
int                 idmef_path_make_child               (idmef_path_t *path,
                                                         const char *child_name,
                                                         int index);
int                 idmef_path_make_parent              (idmef_path_t *path);
void                idmef_path_destroy                  (idmef_path_t *path);
int                 idmef_path_ncompare                 (const idmef_path_t *p1,
                                                         const idmef_path_t *p2,
                                                         unsigned int depth);
int                 idmef_path_compare                  (const idmef_path_t *p1,
                                                         const idmef_path_t *p2);
int                 idmef_path_clone                    (const idmef_path_t *src,
                                                         idmef_path_t **dst);
idmef_path_t *      idmef_path_ref                      (idmef_path_t *path);
const char *        idmef_path_get_name                 (const idmef_path_t *path,
                                                         int depth);
prelude_bool_t      idmef_path_is_ambiguous             (const idmef_path_t *path);
int                 idmef_path_has_lists                (const idmef_path_t *path);
prelude_bool_t      idmef_path_is_list                  (const idmef_path_t *path,
                                                         int depth);
unsigned int        idmef_path_get_depth                (const idmef_path_t *path);
int                 idmef_path_check_operator           (const idmef_path_t *path,
                                                         idmef_criterion_operator_t op);
int                 idmef_path_get_applicable_operators (const idmef_path_t *path,
                                                         idmef_criterion_operator_t *result);

Description

The IDMEF path API provide a methodes to define a "path" in the IDMEF tree. Once this path is defined, the user might set or retrieve this path.

Here is an example of how to use this API in order to set a given path within a idmef_message_t root object:

First, we need to create a path to the object we want to create. If for example, we wish to create the alert.classification.text path within our message, we will use:

int ret;
idmef_path_t *path;
ret = idmef_path_new(&path, "alert.classification.text");
if ( ret < 0 )
        return ret;

Using the above, we just created a "pointer" to a given path in our idmef_message_t. This path doesn't yet exist, but might be used to read, or to write a value.

int ret;
idmef_value_t *value;
ret = idmef_value_new_from_path(&value, path, "A value");
if ( ret < 0 )
        return ret;

Here we just created a value applicable to the previously created path. That is, if our path is pointing to a value of type string, the created idmef_value_t object will be of this type.

idmef_message_t *idmef;
/*
 * create our top message
 */
ret = idmef_message_new(&idmef);
/*
 * Set the previously defined path to the previously created value
 * in the top level idmef message 'idmef'.
 */
ret = idmef_path_set(path, idmef, value);

And finally, we create our top level idmef_message_t object and set the created idmef_value_t as the value for our created idmef_path_t.

Given our previous example, we can write the following function:

static int set_idmef_path(idmef_message_t *message, const char *pathname, const char *value)
{
        int ret;
        idmef_value_t *val;
        idmef_path_t *path;
        ret = idmef_path_new(&path, pathname);
        if ( ret < 0 )
                return ret;
        ret = idmef_value_new_from_path(&val, path, value);
        if ( ret < 0 ) {
                idmef_path_destroy(path);
                return ret;
        }
        ret = idmef_path_set(path, message, val);
        idmef_value_destroy(val);
        idmef_path_destroy(path);
        return ret;
}

You will then be able to set any field of the IDMEF message using:

idmef_message_t *idmef;
ret = idmef_message_new(&idmef);
if ( ret < 0 )
        return ret;
set_idmef_path(idmef, "alert.classification.text", "My classification text");
set_idmef_path(idmef, "alert.classification.reference(0).name", "OSVDB-XXXX");
set_idmef_path(idmef, "alert.classification.reference(0).origin", "osvdb");
set_idmef_path(idmef, "alert.classification.reference(0).url", "http://my.url/");
set_idmef_path(idmef, "alert.source(0).node.address(0).address", "127.0.0.1");

Details

idmef_path_t

typedef struct idmef_path idmef_path_t;


idmef_path_get ()

int                 idmef_path_get                      (const idmef_path_t *path,
                                                         idmef_message_t *message,
                                                         idmef_value_t **ret);

This function retrieves the value for path within message, and stores it into the provided ret address of type idmef_value_t.

path :

Pointer to a idmef_path_t object.

message :

Pointer to a idmef_message_t object.

ret :

Address where to store the retrieved idmef_value_t.

Returns :

The number of element retrieved, or a negative value if an error occured.

idmef_path_set ()

int                 idmef_path_set                      (const idmef_path_t *path,
                                                         idmef_message_t *message,
                                                         idmef_value_t *value);

This function sets the provided value for path within message.

path :

Pointer to a idmef_path_t object.

message :

Pointer to a idmef_message_t object.

value :

Pointer to a idmef_value_t object.

Returns :

0 on success, a negative value if an error occured.

idmef_path_new ()

int                 idmef_path_new                      (idmef_path_t **path,
                                                         const char *format,
                                                         ...);

Creates an idmef_path_t object pointing to the provided format string format and @..., and stores it within path.

path :

Address where to store the created idmef_path_t object.

format :

Format string.

... :

Arguments list.

Returns :

0 on success, or a negative value if an error occured.

idmef_path_new_v ()

int                 idmef_path_new_v                    (idmef_path_t **path,
                                                         const char *format,
                                                         va_list args);

Creates an idmef_path_t object pointing to the provided format string format and args, and stores it within path.

path :

Address where to store the created idmef_path_t object.

format :

Format string.

args :

Pointer to a variable argument list.

Returns :

0 on success, or a negative value if an error occured.

idmef_path_new_fast ()

int                 idmef_path_new_fast                 (idmef_path_t **path,
                                                         const char *buffer);

Creates a idmef_path_t object pointing to buffer, and stores it within path.

path :

Address where to store the created idmef_path_t object.

buffer :

Name of the path to create.

Returns :

0 on success, or a negative value if an error occured.

idmef_path_get_class ()

idmef_class_id_t    idmef_path_get_class                (const idmef_path_t *path,
                                                         int depth);

Retrieves the idmef_class_id_t value for the element of path located at depth. If depth is -1, the last element depth is addressed.

path :

Pointer to an idmef_path_t object.

depth :

Depth of path to retrieve the idmef_class_id_t from.

Returns :

The idmef_class_id_t for the elemnt, or a negative value if an error occured.

idmef_path_get_value_type ()

idmef_value_type_id_t  idmef_path_get_value_type        (const idmef_path_t *path,
                                                         int depth);

Retrieves the idmef_value_type_id_t identifying the type of value acceptable for this path element, for the path element located at depth. If depth is -1, the last element depth is addressed.

path :

Pointer to an idmef_path_t object.

depth :

Depth of path to retrieve the idmef_value_type_id_t from.

Returns :

The idmef_value_type_id_t for the element, or a negative value if an error occured.

idmef_path_set_index ()

int                 idmef_path_set_index                (idmef_path_t *path,
                                                         unsigned int depth,
                                                         int index);

Modifies index for the element located at depth of provided path. This function is only applicable for element that accept listed value.

path :

Pointer to an idmef_path_t object.

depth :

Depth of path to set index for.

index :

Index for the provided element depth.

Returns :

0 on success, a negative value if an error occured.

idmef_path_undefine_index ()

int                 idmef_path_undefine_index           (idmef_path_t *path,
                                                         unsigned int depth);

Modifies the element located at depth of provided path so that it's index is undefined.

This function is only applicable for element that accept listed value.

path :

Pointer to an idmef_path_t object.

depth :

Depth of path to undefine the index for.

Returns :

0 on success, a negative value if an error occured.

idmef_path_get_index ()

int                 idmef_path_get_index                (const idmef_path_t *path,
                                                         unsigned int depth);

Gets the current index for element located at depth of path. This function is only applicable for element that accepts listed value.

path :

Pointer to an idmef_path_t object.

depth :

Depth of path to retrieve the index from.

Returns :

The element index, or a negative value if an error occured.

idmef_path_make_child ()

int                 idmef_path_make_child               (idmef_path_t *path,
                                                         const char *child_name,
                                                         int index);

Modifies path so that it points to the child node identified by child_name, children of the current path. That is if the path is currently pointing to alert.classification, and child_name is set to "text", path will be modified to point to alert.classification.text.

path :

Pointer to an idmef_path_t object.

child_name :

Name of the child element to create.

index :

Index for child_name, if applicable.

Returns :

0 on success, or a negative value if an error occured.

idmef_path_make_parent ()

int                 idmef_path_make_parent              (idmef_path_t *path);

Removes the last element of the path. That is, if path is currently pointing to alert.classification, path will be modified to point to alert.

path :

Pointer to an idmef_path_t object.

Returns :

0 on success, or a negative value if an error occured.

idmef_path_destroy ()

void                idmef_path_destroy                  (idmef_path_t *path);

Destroys the provided path object.

path :

Pointer to an idmef_path_t object.

idmef_path_ncompare ()

int                 idmef_path_ncompare                 (const idmef_path_t *p1,
                                                         const idmef_path_t *p2,
                                                         unsigned int depth);

Compares p1 and p2 elements up to depth.

p1 :

Pointer to an idmef_path_t object.

p2 :

Pointer to another idmef_path_t object.

depth :

Maximum depth to use for path comparison.

Returns :

0 if both element match, a negative value otherwise.

idmef_path_compare ()

int                 idmef_path_compare                  (const idmef_path_t *p1,
                                                         const idmef_path_t *p2);

Compares p1 and p2 elements.

p1 :

Pointer to an idmef_path_t object.

p2 :

Pointer to another idmef_path_t object.

Returns :

0 if both element match, a negative value otherwise.

idmef_path_clone ()

int                 idmef_path_clone                    (const idmef_path_t *src,
                                                         idmef_path_t **dst);

Clones src and stores the result in the provided dst address.

src :

Pointer to an idmef_path_t object.

dst :

Address where to store the copy of src.

Returns :

0 on success, a negative value otherwise.

idmef_path_ref ()

idmef_path_t *      idmef_path_ref                      (idmef_path_t *path);

Increases path reference count.

idmef_path_destroy() will destroy the refcount until it reaches 0, at which point the path will be destroyed.

path :

Pointer to an idmef_path_t object.

Returns :

The provided path is returned.

idmef_path_get_name ()

const char *        idmef_path_get_name                 (const idmef_path_t *path,
                                                         int depth);

Returns the full path name if the provided depth is -1, or the specific element name if depth is set. That is, for a path pointing to "alert.classification.text": A depth of -1 would return "alert.classification.text"; a depth of 0 would return "alert"; a depth of 1 would return "classification"; and a depth of 2 would return "text".

path :

Pointer to an idmef_path_t object.

depth :

Depth of the path element to get the name from.

Returns :

path name relative to the provided dept.

idmef_path_is_ambiguous ()

prelude_bool_t      idmef_path_is_ambiguous             (const idmef_path_t *path);

Returns TRUE if path contain elements that are supposed to be listed, but for which no index were provided.

path :

Pointer to an idmef_path_t object.

Returns :

TRUE if the object is ambiguous, FALSE otherwise.

idmef_path_has_lists ()

int                 idmef_path_has_lists                (const idmef_path_t *path);

path :

Pointer to an idmef_path_t object.

Returns :

the number of listed element within path.

idmef_path_is_list ()

prelude_bool_t      idmef_path_is_list                  (const idmef_path_t *path,
                                                         int depth);

path :

depth :

Returns :


idmef_path_get_depth ()

unsigned int        idmef_path_get_depth                (const idmef_path_t *path);

path :

Pointer to an idmef_path_t object.

Returns :

depth number of elements.

idmef_path_check_operator ()

int                 idmef_path_check_operator           (const idmef_path_t *path,
                                                         idmef_criterion_operator_t op);

Check whether op can apply to value pointed to by path.

path :

Pointer to a idmef_path_t object.

op :

Operator to check compatibility with.

Returns :

0 on success, a negative value if an error occured.

idmef_path_get_applicable_operators ()

int                 idmef_path_get_applicable_operators (const idmef_path_t *path,
                                                         idmef_criterion_operator_t *result);

Retrieve all applicable operator that might be used by the type of value pointed to by path.

path :

Pointer to a idmef_path_t object.

result :

Pointer to storage for applicable operator.

Returns :

0 on success, a negative value if an error occured.

See Also

idmef_value_t for setting idmef_path_t value.

libprelude-1.0.0/docs/api/html/libprelude-prelude-client-profile.html0000664000076400007640000014346011347714757022654 00000000000000 prelude-client-profile

prelude-client-profile

prelude-client-profile

Synopsis

typedef             prelude_gid_t;
typedef             prelude_uid_t;
typedef             prelude_client_profile_t;
int                 prelude_client_profile_new          (prelude_client_profile_t **ret,
                                                         const char *name);
prelude_client_profile_t * prelude_client_profile_ref   (prelude_client_profile_t *cp);
void                prelude_client_profile_destroy      (prelude_client_profile_t *cp);
void                prelude_client_profile_get_config_filename
                                                        (const prelude_client_profile_t *cp,
                                                         char *buf,
                                                         size_t size);
void                prelude_client_profile_get_analyzerid_filename
                                                        (const prelude_client_profile_t *cp,
                                                         char *buf,
                                                         size_t size);
void                prelude_client_profile_get_tls_key_filename
                                                        (const prelude_client_profile_t *cp,
                                                         char *buf,
                                                         size_t size);
void                prelude_client_profile_get_tls_server_ca_cert_filename
                                                        (const prelude_client_profile_t *cp,
                                                         char *buf,
                                                         size_t size);
void                prelude_client_profile_get_tls_server_keycert_filename
                                                        (const prelude_client_profile_t *cp,
                                                         char *buf,
                                                         size_t size);
void                prelude_client_profile_get_tls_server_crl_filename
                                                        (const prelude_client_profile_t *cp,
                                                         char *buf,
                                                         size_t size);
void                prelude_client_profile_get_tls_client_keycert_filename
                                                        (const prelude_client_profile_t *cp,
                                                         char *buf,
                                                         size_t size);
void                prelude_client_profile_get_tls_client_trusted_cert_filename
                                                        (const prelude_client_profile_t *cp,
                                                         char *buf,
                                                         size_t size);
void                prelude_client_profile_get_backup_dirname
                                                        (const prelude_client_profile_t *cp,
                                                         char *buf,
                                                         size_t size);
void                prelude_client_profile_get_profile_dirname
                                                        (const prelude_client_profile_t *cp,
                                                         char *buf,
                                                         size_t size);
void                prelude_client_profile_get_default_config_dirname
                                                        (const prelude_client_profile_t *cp,
                                                         char *buf,
                                                         size_t size);
int                 prelude_client_profile_set_prefix   (prelude_client_profile_t *cp,
                                                         const char *prefix);
void                prelude_client_profile_get_prefix   (const prelude_client_profile_t *cp,
                                                         char *buf,
                                                         size_t size);
void                prelude_client_profile_set_uid      (prelude_client_profile_t *cp,
                                                         prelude_uid_t uid);
prelude_uid_t       prelude_client_profile_get_uid      (const prelude_client_profile_t *cp);
void                prelude_client_profile_set_gid      (prelude_client_profile_t *cp,
                                                         prelude_uid_t gid);
prelude_gid_t       prelude_client_profile_get_gid      (const prelude_client_profile_t *cp);
int                 prelude_client_profile_set_name     (prelude_client_profile_t *cp,
                                                         const char *name);
const char *        prelude_client_profile_get_name     (const prelude_client_profile_t *cp);
uint64_t            prelude_client_profile_get_analyzerid
                                                        (const prelude_client_profile_t *cp);
void                prelude_client_profile_set_analyzerid
                                                        (prelude_client_profile_t *cp,
                                                         uint64_t analyzerid);
int                 prelude_client_profile_get_credentials
                                                        (prelude_client_profile_t *cp,
                                                         void **credentials);

Description

Details

prelude_gid_t


prelude_uid_t


prelude_client_profile_t

typedef struct prelude_client_profile prelude_client_profile_t;


prelude_client_profile_new ()

int                 prelude_client_profile_new          (prelude_client_profile_t **ret,
                                                         const char *name);

Creates a new prelude_client_profile_t object and store its address into ret.

ret :

Pointer where to store the address of the created object.

name :

Name for this profile.

Returns :

0 on success or a negative value if an error occured.

prelude_client_profile_ref ()

prelude_client_profile_t * prelude_client_profile_ref   (prelude_client_profile_t *cp);

cp :

Returns :


prelude_client_profile_destroy ()

void                prelude_client_profile_destroy      (prelude_client_profile_t *cp);

Destroys cp.

cp :

Pointer to a prelude_client_profile_t.

prelude_client_profile_get_config_filename ()

void                prelude_client_profile_get_config_filename
                                                        (const prelude_client_profile_t *cp,
                                                         char *buf,
                                                         size_t size);

Writes the filename used to store cp configuration template.

cp :

pointer on a prelude_client_profile_t object.

buf :

buffer to write the returned filename to.

size :

size of buf.

prelude_client_profile_get_analyzerid_filename ()

void                prelude_client_profile_get_analyzerid_filename
                                                        (const prelude_client_profile_t *cp,
                                                         char *buf,
                                                         size_t size);

Writes the filename used to store cp unique and permanent analyzer ident.

cp :

pointer on a prelude_client_profile_t object.

buf :

buffer to write the returned filename to.

size :

size of buf.

prelude_client_profile_get_tls_key_filename ()

void                prelude_client_profile_get_tls_key_filename
                                                        (const prelude_client_profile_t *cp,
                                                         char *buf,
                                                         size_t size);

Writes the filename used to store cp private key.

cp :

pointer on a prelude_client_profile_t object.

buf :

buffer to write the returned filename to.

size :

size of buf.

prelude_client_profile_get_tls_server_ca_cert_filename ()

void                prelude_client_profile_get_tls_server_ca_cert_filename
                                                        (const prelude_client_profile_t *cp,
                                                         char *buf,
                                                         size_t size);

Writes the filename used to store cp related CA certificate. This only apply to cp receiving connection from analyzer (server).

cp :

pointer on a prelude_client_profile_t object.

buf :

buffer to write the returned filename to.

size :

size of buf.

prelude_client_profile_get_tls_server_keycert_filename ()

void                prelude_client_profile_get_tls_server_keycert_filename
                                                        (const prelude_client_profile_t *cp,
                                                         char *buf,
                                                         size_t size);

Writes the filename used to store certificate for cp server. This only apply to cp receiving connection from analyzer (server).

cp :

pointer on a prelude_client_profile_t object.

buf :

buffer to write the returned filename to.

size :

size of buf.

prelude_client_profile_get_tls_server_crl_filename ()

void                prelude_client_profile_get_tls_server_crl_filename
                                                        (const prelude_client_profile_t *cp,
                                                         char *buf,
                                                         size_t size);

Writes the filename used to store CRL for cp server. This only apply to cp receiving connection from analyzer (server).

cp :

pointer on a prelude_client_profile_t object.

buf :

buffer to write the returned filename to.

size :

size of buf.

prelude_client_profile_get_tls_client_keycert_filename ()

void                prelude_client_profile_get_tls_client_keycert_filename
                                                        (const prelude_client_profile_t *cp,
                                                         char *buf,
                                                         size_t size);

Writes the filename used to store public certificate for cp private key. This only apply to client connecting to a peer.

cp :

pointer on a prelude_client_profile_t object.

buf :

buffer to write the returned filename to.

size :

size of buf.

prelude_client_profile_get_tls_client_trusted_cert_filename ()

void                prelude_client_profile_get_tls_client_trusted_cert_filename
                                                        (const prelude_client_profile_t *cp,
                                                         char *buf,
                                                         size_t size);

Writes the filename used to store peers public certificates that cp trust. This only apply to client connecting to a peer.

cp :

pointer on a prelude_client_profile_t object.

buf :

buffer to write the returned filename to.

size :

size of buf.

prelude_client_profile_get_backup_dirname ()

void                prelude_client_profile_get_backup_dirname
                                                        (const prelude_client_profile_t *cp,
                                                         char *buf,
                                                         size_t size);

Writes the directory name where the profile for cp is stored. If cp is NULL or has no name, then this function will provide the main profile directory.

cp :

pointer on a prelude_client_profile_t object.

buf :

buffer to write the returned filename to.

size :

size of buf.

prelude_client_profile_get_profile_dirname ()

void                prelude_client_profile_get_profile_dirname
                                                        (const prelude_client_profile_t *cp,
                                                         char *buf,
                                                         size_t size);

cp :

buf :

size :


prelude_client_profile_get_default_config_dirname ()

void                prelude_client_profile_get_default_config_dirname
                                                        (const prelude_client_profile_t *cp,
                                                         char *buf,
                                                         size_t size);

cp :

buf :

size :


prelude_client_profile_set_prefix ()

int                 prelude_client_profile_set_prefix   (prelude_client_profile_t *cp,
                                                         const char *prefix);

This function allow to dynamically change the prefix used to acess libprelude related file. This is particularly usefull in case of application running under certain condition (chroot).

cp :

pointer on a prelude_client_profile_t object.

prefix :

Prefix to use for various libprelude files.

Returns :

0 on success, a negative value if an error occured.

prelude_client_profile_get_prefix ()

void                prelude_client_profile_get_prefix   (const prelude_client_profile_t *cp,
                                                         char *buf,
                                                         size_t size);

Retrieve current prefix used with this profile.

cp :

pointer on a prelude_client_profile_t object.

buf :

buffer to write the returned filename to.

size :

size of buf.

prelude_client_profile_set_uid ()

void                prelude_client_profile_set_uid      (prelude_client_profile_t *cp,
                                                         prelude_uid_t uid);

Sets the UID used by cp to uid.

cp :

Pointer to a prelude_client_profile_t object.

uid :

UID to be used by cp.

prelude_client_profile_get_uid ()

prelude_uid_t       prelude_client_profile_get_uid      (const prelude_client_profile_t *cp);

Gets the UID associated with cp.

cp :

Pointer to a prelude_client_profile_t object.

Returns :

the UID associated used by cp.

prelude_client_profile_set_gid ()

void                prelude_client_profile_set_gid      (prelude_client_profile_t *cp,
                                                         prelude_uid_t gid);

Sets the GID used by cp to gid.

cp :

Pointer to a prelude_client_profile_t object.

gid :

GID to be used by cp.

prelude_client_profile_get_gid ()

prelude_gid_t       prelude_client_profile_get_gid      (const prelude_client_profile_t *cp);

Gets the GID associated with cp.

cp :

Pointer to a prelude_client_profile_t object.

Returns :

the GID associated used by cp.

prelude_client_profile_set_name ()

int                 prelude_client_profile_set_name     (prelude_client_profile_t *cp,
                                                         const char *name);

Sets the prelude client profile name.

cp :

Pointer to a prelude_client_profile_t object.

name :

Name to associate the profile with.

Returns :

0 on success or a negative value if an error occured.

prelude_client_profile_get_name ()

const char *        prelude_client_profile_get_name     (const prelude_client_profile_t *cp);

Gets the name of cp client profile.

cp :

Pointer to a prelude_client_profile_t object.

Returns :

the name used by cp.

prelude_client_profile_get_analyzerid ()

uint64_t            prelude_client_profile_get_analyzerid
                                                        (const prelude_client_profile_t *cp);

Gets the unique and permanent analyzer ident associated with cp.

cp :

Pointer to a prelude_client_profile_t object.

Returns :

the analyzer ident used by cp.

prelude_client_profile_set_analyzerid ()

void                prelude_client_profile_set_analyzerid
                                                        (prelude_client_profile_t *cp,
                                                         uint64_t analyzerid);

Sets the Analyzer ID used by cp to analyzerid.

cp :

Pointer to a prelude_client_profile_t object.

analyzerid :

Analyzer ID to be used by cp.

prelude_client_profile_get_credentials ()

int                 prelude_client_profile_get_credentials
                                                        (prelude_client_profile_t *cp,
                                                         void **credentials);

cp :

credentials :

Returns :

libprelude-1.0.0/docs/api/html/libprelude-idmef-time.html0000664000076400007640000013542711347714757020326 00000000000000 idmef-time

idmef-time

idmef-time — Time representation in IDMEF message

Synopsis

typedef             idmef_time_t;
idmef_time_t *      idmef_time_ref                      (idmef_time_t *time);
int                 idmef_time_new                      (idmef_time_t **time);
int                 idmef_time_new_from_time            (idmef_time_t **time,
                                                         const time_t *t);
int                 idmef_time_new_from_gettimeofday    (idmef_time_t **time);
int                 idmef_time_new_from_string          (idmef_time_t **time,
                                                         const char *buf);
int                 idmef_time_new_from_ntpstamp        (idmef_time_t **time,
                                                         const char *buf);
int                 idmef_time_new_from_timeval         (idmef_time_t **time,
                                                         const struct timeval *tv);
void                idmef_time_set_from_time            (idmef_time_t *time,
                                                         const time_t *t);
int                 idmef_time_set_from_gettimeofday    (idmef_time_t *time);
int                 idmef_time_set_from_string          (idmef_time_t *time,
                                                         const char *buf);
int                 idmef_time_set_from_ntpstamp        (idmef_time_t *time,
                                                         const char *buf);
int                 idmef_time_set_from_timeval         (idmef_time_t *time,
                                                         const struct timeval *tv);
void                idmef_time_destroy_internal         (idmef_time_t *time);
void                idmef_time_destroy                  (idmef_time_t *time);
int                 idmef_time_clone                    (const idmef_time_t *src,
                                                         idmef_time_t **dst);
int                 idmef_time_copy                     (const idmef_time_t *src,
                                                         idmef_time_t *dst);
void                idmef_time_set_sec                  (idmef_time_t *time,
                                                         uint32_t sec);
void                idmef_time_set_usec                 (idmef_time_t *time,
                                                         uint32_t usec);
void                idmef_time_set_gmt_offset           (idmef_time_t *time,
                                                         int32_t gmtoff);
uint32_t            idmef_time_get_sec                  (const idmef_time_t *time);
uint32_t            idmef_time_get_usec                 (const idmef_time_t *time);
int32_t             idmef_time_get_gmt_offset           (const idmef_time_t *time);
int                 idmef_time_to_string                (const idmef_time_t *time,
                                                         prelude_string_t *out);
int                 idmef_time_to_ntpstamp              (const idmef_time_t *time,
                                                         prelude_string_t *out);

Description

The idmef_time_t type is used in order to represent a time value in an IDMEF message. This object contain information such as the number of seconds since the Epoch, the local GMT offset, the number of micro second (if applicable).

When creating an IDMEF message, you need to insert a timestamp in it. IDMEF provide differents time field to be used for this:

  • AnalyzerTime

    The AnalyzerTime class is used to indicate the current date and time on the analyzer. Its values should be filled in as late as possible in the message transmission process, ideally immediately before placing the message "on the wire."

  • CreateTime

    The CreateTime class is used to indicate the date and time the alert or heartbeat was created by the analyzer.

  • DetectTime

    The DetectTime class is used to indicate the date and time the event(s) producing an alert was detected by the analyzer. In the case of more than one event, the time the first event was detected. (This may or may not be the same time as CreateTime; analyzers are not required to send alerts immediately upon detection).

You don't need to take care of the AnalyzerTime field, since in Prelude, once an events is handed to the library, and if the sending of the message fail, there will be a fallback to backuping the event for later retransmission. Thus the library has to take care of setting the AnalyzerTime for you (since the message might not be emited immediatly in this specific case.

Several helper are available in order to create idmef_time_t object. Most probably, the function that you will need are the one bellow:

Details

idmef_time_t

typedef struct idmef_time idmef_time_t;


idmef_time_ref ()

idmef_time_t *      idmef_time_ref                      (idmef_time_t *time);

Increases time reference count. idmef_time_destroy() won't destroy time until the refcount reach 0.

time :

Pointer to an idmef_time_t object.

Returns :

The time provided argument.

idmef_time_new ()

int                 idmef_time_new                      (idmef_time_t **time);

Creates an empty idmef_time_t object and store it in time.

time :

Address where to store the created idmef_time_t object.

Returns :

0 on success, a negative value if an error occured.

idmef_time_new_from_time ()

int                 idmef_time_new_from_time            (idmef_time_t **time,
                                                         const time_t *t);

Creates a new idmef_time_t object and store it in time. This object will be filled with information available in t. The created time won't contain micro seconds information, since theses are not available within t.

time :

Address where to store the created idmef_time_t object.

t :

Pointer to a time_t.

Returns :

0 on success, a negative value if an error occured.

idmef_time_new_from_gettimeofday ()

int                 idmef_time_new_from_gettimeofday    (idmef_time_t **time);

Creates an idmef_time_t object filled with information retrieved using gettimeofday(), and stores it in time.

time :

Address where to store the created idmef_time_t object.

Returns :

0 on success, a negative value if an error occured.

idmef_time_new_from_string ()

int                 idmef_time_new_from_string          (idmef_time_t **time,
                                                         const char *buf);

Creates an idmef_time_t object filled with information retrieved from the user provided buf, containing a string describing a time in a format conforming to the IDMEF definition (v. 0.10, section 3.2.6).

Additionally, the provided time might be separated with white spaces, instead of the IDMEF define 'T' character. The format might not specify a timezone (will assume UTC in this case).

The resulting idmef_time_t object is stored in time.

time :

Address where to store the created idmef_time_t object.

buf :

Pointer to a string describing a time in an IDMEF conforming format.

Returns :

0 on success, a negative value if an error occured.

idmef_time_new_from_ntpstamp ()

int                 idmef_time_new_from_ntpstamp        (idmef_time_t **time,
                                                         const char *buf);

Creates an idmef_time_t object filled with information provided from the buf NTP timestamp, and stores it in time.

time :

Address where to store the created idmef_time_t object.

buf :

Pointer to a string containing an NTP timestamp.

Returns :

0 on success, a negative value if an error occured.

idmef_time_new_from_timeval ()

int                 idmef_time_new_from_timeval         (idmef_time_t **time,
                                                         const struct timeval *tv);

Creates an idmef_time_t object filled with information provided within the tv structure.

time :

Address where to store the created idmef_time_t object.

tv :

Pointer to a struct timeval (see gettimeofday()).

Returns :

0 on success, a negative value if an error occured.

idmef_time_set_from_time ()

void                idmef_time_set_from_time            (idmef_time_t *time,
                                                         const time_t *t);

Fills time from the information described by t. time won't contain micro seconds information, since theses are not available within t.

time :

Pointer to an idmef_time_t object.

t :

Pointer to a time_t.

idmef_time_set_from_gettimeofday ()

int                 idmef_time_set_from_gettimeofday    (idmef_time_t *time);

Fills time with information retrieved using gettimeofday().

time :

Pointer to an idmef_time_t object.

Returns :

0 on success, a negative value if an error occured.

idmef_time_set_from_string ()

int                 idmef_time_set_from_string          (idmef_time_t *time,
                                                         const char *buf);

Fills time object with information retrieved from the user provided buf, containing a string describing a time in a format conforming to the IDMEF definition (v. 0.10, section 3.2.6).

Additionally, the provided time might be separated with white spaces, instead of the IDMEF defined 'T' character.

If there is no UTC offset specified, we assume that the provided time is local, and compute the GMT offset by ourselve.

time :

Pointer to an idmef_time_t object.

buf :

Pointer to a string describing a time in an IDMEF conforming format.

Returns :

0 on success, a negative value if an error occured.

idmef_time_set_from_ntpstamp ()

int                 idmef_time_set_from_ntpstamp        (idmef_time_t *time,
                                                         const char *buf);

Fills the time object with information provided within the buf NTP timestamp.

time :

Pointer to a idmef_time_t object.

buf :

Pointer to a string containing an NTP timestamp.

Returns :

0 on success, a negative value if an error occured.

idmef_time_set_from_timeval ()

int                 idmef_time_set_from_timeval         (idmef_time_t *time,
                                                         const struct timeval *tv);

Fills time object filled with information provided within the tv structure.

time :

Pointer to an idmef_time_t object.

tv :

Pointer to a struct timeval (see gettimeofday()).

Returns :

0 on success, a negative value if an error occured.

idmef_time_destroy_internal ()

void                idmef_time_destroy_internal         (idmef_time_t *time);

time :


idmef_time_destroy ()

void                idmef_time_destroy                  (idmef_time_t *time);

Destroys time if refcount reach 0.

time :

Pointer to an idmef_time_t object.

idmef_time_clone ()

int                 idmef_time_clone                    (const idmef_time_t *src,
                                                         idmef_time_t **dst);

Clones src and stores the result in the dst address.

src :

Pointer to a idmef_time_t to clone.

dst :

Address where to store the cloned src object.

Returns :

0 on success, a negative value if an error occured.

idmef_time_copy ()

int                 idmef_time_copy                     (const idmef_time_t *src,
                                                         idmef_time_t *dst);

Copies src internal to dst.

src :

Pointer to a idmef_time_t to copy data from.

dst :

Pointer to a idmef_time_t to copy data to.

Returns :

0 on success, a negative value if an error occured.

idmef_time_set_sec ()

void                idmef_time_set_sec                  (idmef_time_t *time,
                                                         uint32_t sec);

Sets the number of second from the Epoch to sec within time.

WARNING: this is just an accessor function, and using it to set time current time also requires the use of idmef_time_set_usec() and idmef_time_set_gmt_offset().

time :

Pointer to a idmef_time_t.

sec :

Number of seconds since the Epoch.

idmef_time_set_usec ()

void                idmef_time_set_usec                 (idmef_time_t *time,
                                                         uint32_t usec);

Sets the number of micro second to usec within time.

WARNING: this is just an accessor function, and using it to set time current time also requires the use of idmef_time_set_sec() and idmef_time_set_gmt_offset().

time :

Pointer to a idmef_time_t.

usec :

Number of micro seconds to set within time.

idmef_time_set_gmt_offset ()

void                idmef_time_set_gmt_offset           (idmef_time_t *time,
                                                         int32_t gmtoff);

Sets the GMT offset gmtoff, in seconds, within time.

WARNING: this is just an accessor function, and using it to set time current time also requires the use of idmef_time_set_sec() and idmef_time_set_usec().

time :

Pointer to a idmef_time_t.

gmtoff :

GMT offset for time, in seconds.

idmef_time_get_sec ()

uint32_t            idmef_time_get_sec                  (const idmef_time_t *time);

Returns the number of second since the Epoch (00:00:00 UTC, January 1, 1970), previously set within time.

time :

Pointer to a idmef_time_t.

Returns :

The number of seconds.

idmef_time_get_usec ()

uint32_t            idmef_time_get_usec                 (const idmef_time_t *time);

Returns the u-second member of time.

time :

Pointer to a idmef_time_t.

Returns :

The number of u-seconds.

idmef_time_get_gmt_offset ()

int32_t             idmef_time_get_gmt_offset           (const idmef_time_t *time);

Returns the GMT offset that applies to time.

time :

Pointer to a idmef_time_t.

Returns :

The GMT offset, in seconds.

idmef_time_to_string ()

int                 idmef_time_to_string                (const idmef_time_t *time,
                                                         prelude_string_t *out);

Translates time to an user readable string conforming to the IDMEF defined time format.

time :

Pointer to an IDMEF time structure.

out :

Pointer to a prelude_string_t output buffer.

Returns :

number of bytes written on success, a negative value if an error occured.

idmef_time_to_ntpstamp ()

int                 idmef_time_to_ntpstamp              (const idmef_time_t *time,
                                                         prelude_string_t *out);

Translates time to an user readable NTP timestamp string, conforming to the IDMEF defined time format.

time :

Pointer to an IDMEF time structure.

out :

Pointer to a prelude_string_t output buffer.

Returns :

number of bytes written on success, a negative value if an error occured.
libprelude-1.0.0/docs/api/html/libprelude-idmef-criterion-value.html0000664000076400007640000006442611347714757022500 00000000000000 idmef-criterion-value

idmef-criterion-value

idmef-criterion-value

Description

Details

idmef_criterion_value_t

typedef struct idmef_criterion_value idmef_criterion_value_t;


enum idmef_criterion_value_type_t

typedef enum {
        IDMEF_CRITERION_VALUE_TYPE_ERROR            = -1,
        IDMEF_CRITERION_VALUE_TYPE_VALUE            =  0,
        IDMEF_CRITERION_VALUE_TYPE_REGEX            =  1,
        IDMEF_CRITERION_VALUE_TYPE_BROKEN_DOWN_TIME =  2
} idmef_criterion_value_type_t;


idmef_criterion_value_new ()

int                 idmef_criterion_value_new           (idmef_criterion_value_t **cv);

cv :

Returns :


idmef_criterion_value_new_regex ()

int                 idmef_criterion_value_new_regex     (idmef_criterion_value_t **cv,
                                                         const char *regex,
                                                         idmef_criterion_operator_t op);

cv :

regex :

op :

Returns :


idmef_criterion_value_new_value ()

int                 idmef_criterion_value_new_value     (idmef_criterion_value_t **cv,
                                                         idmef_value_t *value,
                                                         idmef_criterion_operator_t op);

cv :

value :

op :

Returns :


idmef_criterion_value_new_from_string ()

int                 idmef_criterion_value_new_from_string
                                                        (idmef_criterion_value_t **cv,
                                                         idmef_path_t *path,
                                                         const char *value,
                                                         idmef_criterion_operator_t op);

cv :

path :

value :

op :

Returns :


idmef_criterion_value_new_broken_down_time ()

int                 idmef_criterion_value_new_broken_down_time
                                                        (idmef_criterion_value_t **cv,
                                                         const char *time,
                                                         idmef_criterion_operator_t op);

cv :

time :

op :

Returns :


idmef_criterion_value_clone ()

int                 idmef_criterion_value_clone         (const idmef_criterion_value_t *src,
                                                         idmef_criterion_value_t **dst);

src :

dst :

Returns :


idmef_criterion_value_destroy ()

void                idmef_criterion_value_destroy       (idmef_criterion_value_t *value);

value :


idmef_criterion_value_print ()

int                 idmef_criterion_value_print         (idmef_criterion_value_t *value,
                                                         prelude_io_t *fd);

value :

fd :

Returns :


idmef_criterion_value_to_string ()

int                 idmef_criterion_value_to_string     (idmef_criterion_value_t *value,
                                                         prelude_string_t *out);

value :

out :

Returns :


idmef_criterion_value_match ()

int                 idmef_criterion_value_match         (idmef_criterion_value_t *cv,
                                                         idmef_value_t *value,
                                                         idmef_criterion_operator_t op);

cv :

value :

op :

Returns :


idmef_criterion_value_get_value ()

const idmef_value_t * idmef_criterion_value_get_value   (idmef_criterion_value_t *cv);

cv :

Returns :


idmef_criterion_value_get_regex ()

const char *        idmef_criterion_value_get_regex     (idmef_criterion_value_t *cv);

cv :

Returns :


idmef_criterion_value_get_broken_down_time ()

const struct tm *   idmef_criterion_value_get_broken_down_time
                                                        (idmef_criterion_value_t *cv);

cv :

Returns :


idmef_criterion_value_get_type ()

idmef_criterion_value_type_t  idmef_criterion_value_get_type
                                                        (idmef_criterion_value_t *cv);

cv :

Returns :

libprelude-1.0.0/docs/api/html/libprelude.devhelp20000664000076400007640000064767011347714756017064 00000000000000 libprelude-1.0.0/docs/api/html/libprelude-prelude-inttypes.html0000664000076400007640000005074311347714757021620 00000000000000 prelude-inttypes

prelude-inttypes

prelude-inttypes

Synopsis

#define             PRELUDE_INT8_MIN
#define             PRELUDE_INT16_MIN
#define             PRELUDE_INT32_MIN
#define             PRELUDE_INT64_MIN
#define             PRELUDE_INT8_MAX
#define             PRELUDE_INT16_MAX
#define             PRELUDE_INT32_MAX
#define             PRELUDE_INT64_MAX
#define             PRELUDE_UINT8_MAX
#define             PRELUDE_UINT16_MAX
#define             PRELUDE_UINT32_MAX
#define             PRELUDE_UINT64_MAX
#define             PRELUDE_INTMAX_MIN
#define             PRELUDE_INTMAX_MAX
#define             PRELUDE_UINTMAX_MAX
#define             PRELUDE_PRId64
#define             PRELUDE_PRIi64
#define             PRELUDE_PRIo64
#define             PRELUDE_PRIx64
#define             PRELUDE_PRIX64
#define             PRELUDE_PRIu64
#define             PRELUDE_PRId32
#define             PRELUDE_PRIi32
#define             PRELUDE_PRIo32
#define             PRELUDE_PRIx32
#define             PRELUDE_PRIX32
#define             PRELUDE_PRIu32
#define             PRELUDE_PRId16
#define             PRELUDE_PRIi16
#define             PRELUDE_PRIo16
#define             PRELUDE_PRIx16
#define             PRELUDE_PRIX16
#define             PRELUDE_PRIu16
#define             PRELUDE_PRId8
#define             PRELUDE_PRIi8
#define             PRELUDE_PRIo8
#define             PRELUDE_PRIx8
#define             PRELUDE_PRIX8
#define             PRELUDE_PRIu8
#define             PRELUDE_SCNd64
#define             PRELUDE_SCNi64
#define             PRELUDE_SCNo64
#define             PRELUDE_SCNx64
#define             PRELUDE_SCNu64
enum                prelude_bool_t;
typedef             int8_t;
typedef             uint8_t;
typedef             int16_t;
typedef             uint16_t;
typedef             int32_t;
typedef             uint32_t;
typedef             int64_t;
typedef             uint64_t;

Description

Details

PRELUDE_INT8_MIN

#define PRELUDE_INT8_MIN               (-128)


PRELUDE_INT16_MIN

#define PRELUDE_INT16_MIN              (-32767 - 1)


PRELUDE_INT32_MIN

#define PRELUDE_INT32_MIN              (-2147483647 - 1)


PRELUDE_INT64_MIN

#define PRELUDE_INT64_MIN              (-__PRELUDE_INT64_SUFFIX(9223372036854775807) - 1)


PRELUDE_INT8_MAX

#define PRELUDE_INT8_MAX               (127)


PRELUDE_INT16_MAX

#define PRELUDE_INT16_MAX              (32767)


PRELUDE_INT32_MAX

#define PRELUDE_INT32_MAX              (2147483647)


PRELUDE_INT64_MAX

#define PRELUDE_INT64_MAX              (__PRELUDE_INT64_SUFFIX(9223372036854775807))


PRELUDE_UINT8_MAX

#define PRELUDE_UINT8_MAX              (255)


PRELUDE_UINT16_MAX

#define PRELUDE_UINT16_MAX             (65535)


PRELUDE_UINT32_MAX

#define PRELUDE_UINT32_MAX             (4294967295U)


PRELUDE_UINT64_MAX

#define PRELUDE_UINT64_MAX             (__PRELUDE_UINT64_SUFFIX(18446744073709551615))


PRELUDE_INTMAX_MIN

#define PRELUDE_INTMAX_MIN             INT64_MIN


PRELUDE_INTMAX_MAX

#define PRELUDE_INTMAX_MAX             INT64_MAX


PRELUDE_UINTMAX_MAX

#define PRELUDE_UINTMAX_MAX            UINT64_MAX


PRELUDE_PRId64

#define PRELUDE_PRId64      __PRELUDE_64BIT_FORMAT_PREFIX "d"


PRELUDE_PRIi64

#define PRELUDE_PRIi64      __PRELUDE_64BIT_FORMAT_PREFIX "i"


PRELUDE_PRIo64

#define PRELUDE_PRIo64      __PRELUDE_64BIT_FORMAT_PREFIX "o"


PRELUDE_PRIx64

#define PRELUDE_PRIx64      __PRELUDE_64BIT_FORMAT_PREFIX "x"


PRELUDE_PRIX64

#define PRELUDE_PRIX64      __PRELUDE_64BIT_FORMAT_PREFIX "X"


PRELUDE_PRIu64

#define PRELUDE_PRIu64      __PRELUDE_64BIT_FORMAT_PREFIX "u"


PRELUDE_PRId32

#define PRELUDE_PRId32      "d"


PRELUDE_PRIi32

#define PRELUDE_PRIi32      "i"


PRELUDE_PRIo32

#define PRELUDE_PRIo32      "o"


PRELUDE_PRIx32

#define PRELUDE_PRIx32      "x"


PRELUDE_PRIX32

#define PRELUDE_PRIX32      "X"


PRELUDE_PRIu32

#define PRELUDE_PRIu32      "u"


PRELUDE_PRId16

#define PRELUDE_PRId16      "d"


PRELUDE_PRIi16

#define PRELUDE_PRIi16      "i"


PRELUDE_PRIo16

#define PRELUDE_PRIo16      "o"


PRELUDE_PRIx16

#define PRELUDE_PRIx16      "x"


PRELUDE_PRIX16

#define PRELUDE_PRIX16      "X"


PRELUDE_PRIu16

#define PRELUDE_PRIu16      "u"


PRELUDE_PRId8

#define PRELUDE_PRId8       "d"


PRELUDE_PRIi8

#define PRELUDE_PRIi8       "i"


PRELUDE_PRIo8

#define PRELUDE_PRIo8       "o"


PRELUDE_PRIx8

#define PRELUDE_PRIx8       "x"


PRELUDE_PRIX8

#define PRELUDE_PRIX8       "X"


PRELUDE_PRIu8

#define PRELUDE_PRIu8       "u"


PRELUDE_SCNd64

#define PRELUDE_SCNd64      __PRELUDE_64BIT_FORMAT_PREFIX "d"


PRELUDE_SCNi64

#define PRELUDE_SCNi64      __PRELUDE_64BIT_FORMAT_PREFIX "i"


PRELUDE_SCNo64

#define PRELUDE_SCNo64      __PRELUDE_64BIT_FORMAT_PREFIX "o"


PRELUDE_SCNx64

#define PRELUDE_SCNx64      __PRELUDE_64BIT_FORMAT_PREFIX "x"


PRELUDE_SCNu64

#define PRELUDE_SCNu64      __PRELUDE_64BIT_FORMAT_PREFIX "u"


enum prelude_bool_t

typedef enum { 
	PRELUDE_BOOL_TRUE = TRUE, 
	PRELUDE_BOOL_FALSE = FALSE 
} prelude_bool_t;


int8_t

 typedef signed char int8_t;


uint8_t

 typedef unsigned char uint8_t;


int16_t

 typedef short int16_t;


uint16_t

 typedef unsigned short uint16_t;


int32_t

 typedef int int32_t;


uint32_t

 typedef unsigned int uint32_t;


int64_t


uint64_t

libprelude-1.0.0/docs/api/html/pt04.html0000664000076400007640000000525411347714757014742 00000000000000 Part IV. Filtering operation on IDMEF messages

Part IV. Filtering operation on IDMEF messages

libprelude-1.0.0/docs/api/html/pt03.html0000664000076400007640000000553611347714757014744 00000000000000 Part III. Reading events from the collector

Part III. Reading events from the collector

Table of Contents

idmef-message-read — Reading a message from a prelude_msg_t buffer
prelude-connection-pool — Pool of connection handling
libprelude-1.0.0/docs/api/html/libprelude-prelude-client.html0000664000076400007640000017003111347714757021210 00000000000000 prelude-client

prelude-client

prelude-client — Creating a Prelude Client

Synopsis

enum                prelude_client_exit_status_t;
enum                prelude_client_flags_t;
typedef             prelude_client_t;
prelude_ident_t *   prelude_client_get_unique_ident     (prelude_client_t *client);
void                prelude_client_set_connection_pool  (prelude_client_t *client,
                                                         prelude_connection_pool_t *pool);
prelude_connection_pool_t * prelude_client_get_connection_pool
                                                        (prelude_client_t *client);
int                 prelude_client_start                (prelude_client_t *client);
int                 prelude_client_init                 (prelude_client_t *client);
int                 prelude_client_new                  (prelude_client_t **client,
                                                         const char *profile);
prelude_client_t *  prelude_client_ref                  (prelude_client_t *client);
idmef_analyzer_t *  prelude_client_get_analyzer         (prelude_client_t *client);
prelude_client_flags_t  prelude_client_get_flags        (prelude_client_t *client);
void                prelude_client_set_required_permission
                                                        (prelude_client_t *client,
                                                         prelude_connection_permission_t permission);
prelude_connection_permission_t  prelude_client_get_required_permission
                                                        (prelude_client_t *client);
void                prelude_client_send_msg             (prelude_client_t *client,
                                                         prelude_msg_t *msg);
int                 prelude_client_recv_msg             (prelude_client_t *client,
                                                         int timeout,
                                                         prelude_msg_t **msg);
void                prelude_client_set_heartbeat_cb     (prelude_client_t *client,
                                                         void (cbprelude_client_t *client, idmef_message_t *hb) ());
void                prelude_client_send_idmef           (prelude_client_t *client,
                                                         idmef_message_t *msg);
int                 prelude_client_recv_idmef           (prelude_client_t *client,
                                                         int timeout,
                                                         idmef_message_t **idmef);
void                prelude_client_destroy              (prelude_client_t *client,
                                                         prelude_client_exit_status_t status);
int                 prelude_client_set_flags            (prelude_client_t *client,
                                                         prelude_client_flags_t flags);
int                 prelude_client_set_config_filename  (prelude_client_t *client,
                                                         const char *filename);
const char *        prelude_client_get_config_filename  (prelude_client_t *client);
prelude_bool_t      prelude_client_is_setup_needed      (int error);
prelude_client_profile_t * prelude_client_get_profile   (prelude_client_t *client);
int                 prelude_client_new_msgbuf           (prelude_client_t *client,
                                                         prelude_msgbuf_t **msgbuf);
int                 prelude_client_handle_msg_default   (prelude_client_t *client,
                                                         prelude_msg_t *msg,
                                                         prelude_msgbuf_t *msgbuf);
const char *        prelude_client_get_setup_error      (prelude_client_t *client);
void                prelude_client_print_setup_error    (prelude_client_t *client);

Description

In order to send or to read data from a Prelude collector (prelude-manager), you will need to create a prelude_client_t object. This object will be necessary for most of the work you are going to do with prelude.

int ret;
prelude_client_t *client;
ret = prelude_client_new(&client, "my-analyzer");
if ( ! client ) {
        prelude_perror(ret, "Unable to create a prelude client object");
        return -1;
}

This will create a new client object, whose default profile is my-analyzer. This default profile might be overriden using the --prelude --profile profile_name option on your command line as parsed by prelude_init().

Additionally, prelude specific option might be overriden using a Prelude specific configuration file, like the template file created within each profile, or a configuration file specified using prelude_client_set_config_filename() before prelude_client_start() is called.

The default required permission for the created client are set to PRELUDE_CONNECTION_PERMISSION_IDMEF_WRITE and PRELUDE_CONNECTION_PERMISSION_ADMIN_READ, which mean the client will reject any certificate where permission are set to anything less than this. You can change the default required permission using the prelude_client_set_required_permission() function.

As an example, if you want to create a client that will read alert from a Manager, and accept administrative option request you should use:

prelude_client_set_required_permission(client, PRELUDE_CONNECTION_PERMISSION_IDMEF_READ|PRELUDE_CONNECTION_PERMISSION_ADMIN_WRITE);

Once the client is created and you have everything setup, you will need to start your client. The prelude_client_start() function is responsible for this, and will trigger the connection to the configured manager, and send the initial client heartbeat.

ret = prelude_client_start(client);
if ( ret < 0 ) {
       prelude_log(ret, "Unable to start prelude client");
       return -1;
}

Additionally, it is possible to set additional client flags, however, you should be careful since some of theses flags (marked asynchronous) will result in creating an internal thread, which should only be done after an eventual fork of the program since threads are not copied accross a fork call.

The prelude library will also register an internal timer in order to send heartbeat message at the defined interval. Timer registered by the library itself or by the program will either be called automatically if the PRELUDE_CLIENT_FLAGS_ASYNC_TIMER flags is set, otherwise, the program is responsible for calling the prelude_timer_wake_up() function every second from it's main loop, in order to check the registered timer.

  • PRELUDE_CLIENT_FLAGS_CONNECT - Used for a client to connect to a manager (this is the default).
  • PRELUDE_CLIENT_FLAGS_HEARTBEAT - Used for client to send heartbeat (this is the default).
  • PRELUDE_CLIENT_FLAGS_ASYNC_SEND - Used if you want message to be sent asynchronously.
  • PRELUDE_CLIENT_FLAGS_ASYNC_TIMER - Used if you want timer to be automatically called from the asynchronous thread.
  • See prelude_client_flags_t for a list of available flags.

ret = prelude_client_set_flags(client, PRELUDE_CLIENT_FLAGS_ASYNC_SEND|PRELUDE_CLIENT_FLAGS_ASYNC_TIMER);
if ( ret < 0 ) {
       fprintf(stderr, "Unable to set asynchronous send and timer.\n");
       return -1;
}

For documentation on how to create IDMEF message, please see idmef_message_t or idmef_path_t.

Once you created and IDMEF message, you should use the prelude_client_send_idmef() function in order to send it to the collector you are connected to.

prelude_client_send_idmef(client, idmef);

In case the analyzer you are developing is not a persistant analyzer (meaning an analyzer that is not supposed to exit), it is important that you call the prelude_client_destroy() function prior to exiting. This function have the side effect of sending an heartbeat to the remote manager, as well as an information regarding the analyzer state.

This state information is important since an analyzer not reporting a successful exit status, or an analyzer which stop sending heartbeat at all will be reported as having a problem.

  • PRELUDE_CLIENT_STATUS_EXIT_SUCCESS - Exiting the sensor is the expected behavior.
  • PRELUDE_CLIENT_STATUS_EXIT_FAILED - There is something wrong going on, notice the security analyst.

prelude_client_destroy(client, PRELUDE_CLIENT_STATUS_EXIT_SUCCESS);

As a side note, please remember that a persistant sensor should never use this function (except maybe if it is working in batch mode), unless it want to report the PRELUDE_CLIENT_STATUS_EXIT_FAILED exit status. This is also the case if your persistant sensor is interrupted by a signal.

Details

enum prelude_client_exit_status_t

typedef enum {
        PRELUDE_CLIENT_EXIT_STATUS_SUCCESS = 0,
        PRELUDE_CLIENT_EXIT_STATUS_FAILURE = -1
} prelude_client_exit_status_t;


enum prelude_client_flags_t

typedef enum {
        PRELUDE_CLIENT_FLAGS_ASYNC_SEND  = 0x01,
        PRELUDE_CLIENT_FLAGS_ASYNC_TIMER = 0x02,
        PRELUDE_CLIENT_FLAGS_HEARTBEAT   = 0x04,
        PRELUDE_CLIENT_FLAGS_CONNECT     = 0x08,
        PRELUDE_CLIENT_FLAGS_AUTOCONFIG  = 0x10
} prelude_client_flags_t;


prelude_client_t

typedef struct prelude_client prelude_client_t;


prelude_client_get_unique_ident ()

prelude_ident_t *   prelude_client_get_unique_ident     (prelude_client_t *client);

client :

Returns :


prelude_client_set_connection_pool ()

void                prelude_client_set_connection_pool  (prelude_client_t *client,
                                                         prelude_connection_pool_t *pool);

Use this function in order to set your own list of peer that client should send message too. This might be usefull in case you don't want this to be automated by prelude_client_init().

client :

pointer to a prelude_client_t object.

pool :

pointer to a prelude_client_pool_t object.

prelude_client_get_connection_pool ()

prelude_connection_pool_t * prelude_client_get_connection_pool
                                                        (prelude_client_t *client);

Return a pointer to the prelude_connection_pool_t object used by client to send messages.

client :

pointer to a prelude_client_t object.

Returns :

a pointer to a prelude_connection_pool_t object.

prelude_client_start ()

int                 prelude_client_start                (prelude_client_t *client);

This function start the client object, triggering a connection from the client to it's server if any were specified, and sending the initial client heartbeat.

If client was not initialized, then prelude_client_init() will be called and thus this function might fail if the client was not registered.

client :

Pointer to a client object to initialize.

Returns :

0 on success, -1 if an error occured.

prelude_client_init ()

int                 prelude_client_init                 (prelude_client_t *client);

This function initialize the client object, meaning reading generic options from the prelude_client_new() provided configuration file and the array of arguments specified through prelude_init().

Calling this function is optional and should be done only if you need more granularity between prelude_client_new() and prelude_client_start():

prelude_client_start() will call prelude_client_init() for you if needed.

client :

Pointer to a prelude_client_t object to initialize.

Returns :

0 on success, -1 if an error occured.

prelude_client_new ()

int                 prelude_client_new                  (prelude_client_t **client,
                                                         const char *profile);

This function initialize the client object.

client :

Pointer to a client object to initialize.

profile :

Default profile name for this analyzer.

Returns :

0 on success or a negative value if an error occur.

prelude_client_ref ()

prelude_client_t *  prelude_client_ref                  (prelude_client_t *client);

client :

Returns :


prelude_client_get_analyzer ()

idmef_analyzer_t *  prelude_client_get_analyzer         (prelude_client_t *client);

Provide access to the idmef_analyzer_t object associated to client. This analyzer object is sent along with every alerts and heartbeats emited by this client. The analyzer object is created by prelude_client_init().

client :

Pointer to a prelude_client_t object.

Returns :

the idmef_analyzer_t object associated with client.

prelude_client_get_flags ()

prelude_client_flags_t  prelude_client_get_flags        (prelude_client_t *client);

Get flags set through prelude_client_set_flags().

client :

Pointer on a prelude_client_t object.

Returns :

an or'ed list of prelude_client_flags_t.

prelude_client_set_required_permission ()

void                prelude_client_set_required_permission
                                                        (prelude_client_t *client,
                                                         prelude_connection_permission_t permission);

Set the required permission for client. The default is PRELUDE_CONNECTION_PERMISSION_IDMEF_WRITE | PRELUDE_CONNECTION_PERMISSION_ADMIN_READ. Value set through this function should be set before prelude_client_start().

If the client certificate for connecting to one of the specified manager doesn't have theses permission the client will reject the certificate and ask for registration.

client :

Pointer on a prelude_client_t object.

permission :

Required permission for client.

prelude_client_get_required_permission ()

prelude_connection_permission_t  prelude_client_get_required_permission
                                                        (prelude_client_t *client);

client :

Pointer on a prelude_client_t object.

Returns :

client permission as set with prelude_client_set_required_permission()

prelude_client_send_msg ()

void                prelude_client_send_msg             (prelude_client_t *client,
                                                         prelude_msg_t *msg);

Send msg to the peers client is communicating with.

The message will be sent asynchronously if PRELUDE_CLIENT_FLAGS_ASYNC_SEND was set using prelude_client_set_flags() in which case the caller should not call prelude_msg_destroy() on msg.

client :

Pointer to a prelude_client_t object.

msg :

pointer to a message that client should send.

prelude_client_recv_msg ()

int                 prelude_client_recv_msg             (prelude_client_t *client,
                                                         int timeout,
                                                         prelude_msg_t **msg);

Wait timeout second for a message on client connection pool.

A timeout of -1, mean prelude_client_recv_msg() will block until a message is received. A timeout of 0 mean that it will return immediatly.

client :

Pointer to a prelude_client_t object.

timeout :

Number of millisecond to wait for a message.

msg :

Pointer where the received prelude_msg_t should be stored.

Returns :

0 on timeout, a negative value on error, 1 on success.

prelude_client_set_heartbeat_cb ()

void                prelude_client_set_heartbeat_cb     (prelude_client_t *client,
                                                         void (cbprelude_client_t *client, idmef_message_t *hb) ());

Use if you want to override the default function used to automatically send heartbeat to client peers.

client :

pointer to a prelude_client_t object.

cb :

pointer to a function handling heartbeat sending.

prelude_client_send_idmef ()

void                prelude_client_send_idmef           (prelude_client_t *client,
                                                         idmef_message_t *msg);

Send msg to the peers client is communicating with.

The message will be sent asynchronously if PRELUDE_CLIENT_FLAGS_ASYNC_SEND was set using prelude_client_set_flags().

client :

Pointer to a prelude_client_t object.

msg :

pointer to an IDMEF message to be sent to client peers.

prelude_client_recv_idmef ()

int                 prelude_client_recv_idmef           (prelude_client_t *client,
                                                         int timeout,
                                                         idmef_message_t **idmef);

Wait timeout second for a message on client connection pool.

A timeout of -1, mean prelude_client_recv_idmef() will block until a message is received. A timeout of 0 mean that it will return immediatly.

client :

Pointer to a prelude_client_t object.

timeout :

Number of second to wait for a message.

idmef :

Pointer where the received idmef_message_t should be stored.

Returns :

0 on timeout, a negative value on error, 1 on success.

prelude_client_destroy ()

void                prelude_client_destroy              (prelude_client_t *client,
                                                         prelude_client_exit_status_t status);

Destroy client, and send an heartbeat containing the 'exiting' status in case status is PRELUDE_CLIENT_EXIT_STATUS_SUCCESS.

This is useful for analyzer expected to be running periodically, and that shouldn't be treated as behaving anormaly in case no heartbeat is sent.

Please note that your are not supposed to run this function from a signal handler.

client :

Pointer on a client object.

status :

Exit status for the client.

prelude_client_set_flags ()

int                 prelude_client_set_flags            (prelude_client_t *client,
                                                         prelude_client_flags_t flags);

Set specific flags in the client structure. This function can be called anytime after the creation of the client object.

When settings asynchronous flags such as PRELUDE_CLIENT_FLAGS_ASYNC_SEND or PRELUDE_CLIENT_FLAGS_ASYNC_TIMER, be carefull to call prelude_client_set_flags() in the same process you want to use the asynchronous API from. Threads aren't copied accross fork().

client :

Pointer on a prelude_client_t object.

flags :

Or'd list of flags used by client.

Returns :

0 if setting flags succeed, -1 otherwise.

prelude_client_set_config_filename ()

int                 prelude_client_set_config_filename  (prelude_client_t *client,
                                                         const char *filename);

The default for a client is to use a template configuration file (idmef-client.conf). By using this function you might override the default and provide your own configuration file to use for client. The format of the configuration file need to be compatible with the Prelude format.

client :

pointer on a prelude_client_t object.

filename :

Configuration file to use for this client.

Returns :

0 on success, -1 if an error occured.

prelude_client_get_config_filename ()

const char *        prelude_client_get_config_filename  (prelude_client_t *client);

Return the filename where client configuration is stored. This filename is originally set by the prelude_client_new() function.

client :

pointer on a prelude_client_t object.

Returns :

a pointer to client configuration filename.

prelude_client_is_setup_needed ()

prelude_bool_t      prelude_client_is_setup_needed      (int error);

Warning

prelude_client_is_setup_needed is deprecated and should not be used in newly-written code. use standard error API.

This function should be called as a result of an error by the prelude_client_start() function, to know if the analyzer need to be registered.

error :

Error returned by prelude_client_start().

Returns :

TRUE if setup is needed, FALSE otherwise.

prelude_client_get_profile ()

prelude_client_profile_t * prelude_client_get_profile   (prelude_client_t *client);

client :

Returns :


prelude_client_new_msgbuf ()

int                 prelude_client_new_msgbuf           (prelude_client_t *client,
                                                         prelude_msgbuf_t **msgbuf);

client :

msgbuf :

Returns :


prelude_client_handle_msg_default ()

int                 prelude_client_handle_msg_default   (prelude_client_t *client,
                                                         prelude_msg_t *msg,
                                                         prelude_msgbuf_t *msgbuf);

client :

msg :

msgbuf :

Returns :


prelude_client_get_setup_error ()

const char *        prelude_client_get_setup_error      (prelude_client_t *client);

Warning

prelude_client_get_setup_error is deprecated and should not be used in newly-written code.

client :

Returns :


prelude_client_print_setup_error ()

void                prelude_client_print_setup_error    (prelude_client_t *client);

client :

libprelude-1.0.0/docs/api/html/libprelude-prelude-option-wide.html0000664000076400007640000003103011347714757022163 00000000000000 prelude-option-wide

prelude-option-wide

prelude-option-wide

Synopsis

#define             PRELUDE_OPTION_REPLY_TYPE_SET
#define             PRELUDE_OPTION_REPLY_TYPE_GET
#define             PRELUDE_OPTION_REPLY_TYPE_LIST
#define             PRELUDE_OPTION_REPLY_TYPE_ERROR
int                 prelude_option_push_request         (prelude_msgbuf_t *msg,
                                                         int type,
                                                         const char *request);
int                 prelude_option_new_request          (prelude_msgbuf_t *msgbuf,
                                                         uint32_t request_id,
                                                         uint64_t *target_id,
                                                         size_t size);
int                 prelude_option_process_request      (prelude_client_t *client,
                                                         prelude_msg_t *msg,
                                                         prelude_msgbuf_t *reply);
int                 prelude_option_recv_reply           (prelude_msg_t *msg,
                                                         uint64_t *source_id,
                                                         uint32_t *request_id,
                                                         void **value);

Description

Details

PRELUDE_OPTION_REPLY_TYPE_SET

#define PRELUDE_OPTION_REPLY_TYPE_SET   0x01


PRELUDE_OPTION_REPLY_TYPE_GET

#define PRELUDE_OPTION_REPLY_TYPE_GET   0x02


PRELUDE_OPTION_REPLY_TYPE_LIST

#define PRELUDE_OPTION_REPLY_TYPE_LIST  0x04


PRELUDE_OPTION_REPLY_TYPE_ERROR

#define PRELUDE_OPTION_REPLY_TYPE_ERROR 0x08


prelude_option_push_request ()

int                 prelude_option_push_request         (prelude_msgbuf_t *msg,
                                                         int type,
                                                         const char *request);

msg :

type :

request :

Returns :


prelude_option_new_request ()

int                 prelude_option_new_request          (prelude_msgbuf_t *msgbuf,
                                                         uint32_t request_id,
                                                         uint64_t *target_id,
                                                         size_t size);

msgbuf :

request_id :

target_id :

size :

Returns :


prelude_option_process_request ()

int                 prelude_option_process_request      (prelude_client_t *client,
                                                         prelude_msg_t *msg,
                                                         prelude_msgbuf_t *reply);

client :

msg :

reply :

Returns :


prelude_option_recv_reply ()

int                 prelude_option_recv_reply           (prelude_msg_t *msg,
                                                         uint64_t *source_id,
                                                         uint32_t *request_id,
                                                         void **value);

msg :

source_id :

request_id :

value :

Returns :

libprelude-1.0.0/docs/api/html/libprelude-prelude-log.html0000664000076400007640000003461711347714757020524 00000000000000 prelude-log

prelude-log

prelude-log

Synopsis

enum                prelude_log_t;
enum                prelude_log_flags_t;
void                prelude_log                         (prelude_log_t level,
                                                         const char *fmt,
                                                         ...);
void                prelude_log_debug                   (prelude_log_t level,
                                                         const char *fmt,
                                                         ...);
#define             prelude_log_v                       (level, fmt, ap)
#define             prelude_log_debug_v                 (level, fmt, ap)
void                prelude_log_set_level               (prelude_log_t level);
void                prelude_log_set_debug_level         (int level);
prelude_log_flags_t  prelude_log_get_flags              (void);
void                prelude_log_set_flags               (prelude_log_flags_t flags);
char *              prelude_log_get_prefix              (void);
void                prelude_log_set_prefix              (char *prefix);
void                prelude_log_set_callback            ();
int                 prelude_log_set_logfile             (const char *filename);

Description

Details

enum prelude_log_t

typedef enum {
        PRELUDE_LOG_CRIT  = -1,
        PRELUDE_LOG_ERR   =  0,
        PRELUDE_LOG_WARN  =  1,
        PRELUDE_LOG_INFO  =  2,
        PRELUDE_LOG_DEBUG  = 3
} prelude_log_t;


enum prelude_log_flags_t

typedef enum {
        PRELUDE_LOG_FLAGS_QUIET  = 0x01, /* Drop PRELUDE_LOG_PRIORITY_INFO */
        PRELUDE_LOG_FLAGS_SYSLOG = 0x02
} prelude_log_flags_t;


prelude_log ()

void                prelude_log                         (prelude_log_t level,
                                                         const char *fmt,
                                                         ...);

level :

fmt :

... :


prelude_log_debug ()

void                prelude_log_debug                   (prelude_log_t level,
                                                         const char *fmt,
                                                         ...);

level :

fmt :

... :


prelude_log_v()

#define             prelude_log_v(level, fmt, ap)

level :

fmt :

ap :


prelude_log_debug_v()

#define             prelude_log_debug_v(level, fmt, ap)

level :

fmt :

ap :


prelude_log_set_level ()

void                prelude_log_set_level               (prelude_log_t level);

level :


prelude_log_set_debug_level ()

void                prelude_log_set_debug_level         (int level);

level :


prelude_log_get_flags ()

prelude_log_flags_t  prelude_log_get_flags              (void);

Returns :


prelude_log_set_flags ()

void                prelude_log_set_flags               (prelude_log_flags_t flags);

flags :


prelude_log_get_prefix ()

char *              prelude_log_get_prefix              (void);

Returns :


prelude_log_set_prefix ()

void                prelude_log_set_prefix              (char *prefix);

Tell the Prelude standard logger to add prefix before logging a line.

prefix :

Pointer to the prefix to use.

prelude_log_set_callback ()

void                prelude_log_set_callback            ();

@log_cb() will be called in place of the prelude function usally used for loging.

log_cb :

Callback function.

prelude_log_set_logfile ()

int                 prelude_log_set_logfile             (const char *filename);

filename :

Returns :

libprelude-1.0.0/docs/api/html/pt01.html0000664000076400007640000000526211347714757014736 00000000000000 Part I. Using libprelude to interoperate with prelude-manager

Part I. Using libprelude to interoperate with prelude-manager

Table of Contents

prelude — Initializing the library
prelude-client — Creating a Prelude Client
libprelude-1.0.0/docs/api/html/libprelude-idmef-message-write.html0000664000076400007640000021556011347714757022141 00000000000000 idmef-message-write

idmef-message-write

idmef-message-write — Writing IDMEF class to a message buffer

Synopsis

int                 idmef_additional_data_write         (idmef_additional_data_t *additional_data,
                                                         prelude_msgbuf_t *msg);
int                 idmef_reference_write               (idmef_reference_t *reference,
                                                         prelude_msgbuf_t *msg);
int                 idmef_classification_write          (idmef_classification_t *classification,
                                                         prelude_msgbuf_t *msg);
int                 idmef_user_id_write                 (idmef_user_id_t *user_id,
                                                         prelude_msgbuf_t *msg);
int                 idmef_user_write                    (idmef_user_t *user,
                                                         prelude_msgbuf_t *msg);
int                 idmef_address_write                 (idmef_address_t *address,
                                                         prelude_msgbuf_t *msg);
int                 idmef_process_write                 (idmef_process_t *process,
                                                         prelude_msgbuf_t *msg);
int                 idmef_web_service_write             (idmef_web_service_t *web_service,
                                                         prelude_msgbuf_t *msg);
int                 idmef_snmp_service_write            (idmef_snmp_service_t *snmp_service,
                                                         prelude_msgbuf_t *msg);
int                 idmef_service_write                 (idmef_service_t *service,
                                                         prelude_msgbuf_t *msg);
int                 idmef_node_write                    (idmef_node_t *node,
                                                         prelude_msgbuf_t *msg);
int                 idmef_source_write                  (idmef_source_t *source,
                                                         prelude_msgbuf_t *msg);
int                 idmef_file_access_write             (idmef_file_access_t *file_access,
                                                         prelude_msgbuf_t *msg);
int                 idmef_inode_write                   (idmef_inode_t *inode,
                                                         prelude_msgbuf_t *msg);
int                 idmef_checksum_write                (idmef_checksum_t *checksum,
                                                         prelude_msgbuf_t *msg);
int                 idmef_file_write                    (idmef_file_t *file,
                                                         prelude_msgbuf_t *msg);
int                 idmef_linkage_write                 (idmef_linkage_t *linkage,
                                                         prelude_msgbuf_t *msg);
int                 idmef_target_write                  (idmef_target_t *target,
                                                         prelude_msgbuf_t *msg);
int                 idmef_analyzer_write                (idmef_analyzer_t *analyzer,
                                                         prelude_msgbuf_t *msg);
int                 idmef_alertident_write              (idmef_alertident_t *alertident,
                                                         prelude_msgbuf_t *msg);
int                 idmef_impact_write                  (idmef_impact_t *impact,
                                                         prelude_msgbuf_t *msg);
int                 idmef_action_write                  (idmef_action_t *action,
                                                         prelude_msgbuf_t *msg);
int                 idmef_confidence_write              (idmef_confidence_t *confidence,
                                                         prelude_msgbuf_t *msg);
int                 idmef_assessment_write              (idmef_assessment_t *assessment,
                                                         prelude_msgbuf_t *msg);
int                 idmef_tool_alert_write              (idmef_tool_alert_t *tool_alert,
                                                         prelude_msgbuf_t *msg);
int                 idmef_correlation_alert_write       (idmef_correlation_alert_t *correlation_alert,
                                                         prelude_msgbuf_t *msg);
int                 idmef_overflow_alert_write          (idmef_overflow_alert_t *overflow_alert,
                                                         prelude_msgbuf_t *msg);
int                 idmef_alert_write                   (idmef_alert_t *alert,
                                                         prelude_msgbuf_t *msg);
int                 idmef_heartbeat_write               (idmef_heartbeat_t *heartbeat,
                                                         prelude_msgbuf_t *msg);
int                 idmef_message_write                 (idmef_message_t *message,
                                                         prelude_msgbuf_t *msg);

Description

If you're not willing to use the prelude_client_send_idmef() function, because for example you want more control over how a message is sent, you can use the idmef-message-write API to send your message manually.

The functions defined in this API all take an IDMEF object as an argument and dump this object in a format suitable for writing it to a socket or a file (covering, for example, convertion from host byte order to network byte order), to the provided prelude_msgbuf_t buffer.

The prelude_msgbuf_t object is just a buffer holding a prelude_msg_t object. When the buffer is full, the user defined function for prelude_msgbuf_t will be called, and the user can write his message using the prelude_msg_write() function.

idmef_message_write(message, msgbuf);

Details

idmef_additional_data_write ()

int                 idmef_additional_data_write         (idmef_additional_data_t *additional_data,
                                                         prelude_msgbuf_t *msg);

Write additional_data within msg message buffer. The buffer is associated with a prelude_io_t file descriptor where the data will be written.

additional_data :

Pointer to a idmef_additional_data_t object.

msg :

Pointer to a prelude_msgbuf_t object, where the message should be written.

Returns :

0 on success, a negative value if an error occured.

idmef_reference_write ()

int                 idmef_reference_write               (idmef_reference_t *reference,
                                                         prelude_msgbuf_t *msg);

Write reference within msg message buffer. The buffer is associated with a prelude_io_t file descriptor where the data will be written.

reference :

Pointer to a idmef_reference_t object.

msg :

Pointer to a prelude_msgbuf_t object, where the message should be written.

Returns :

0 on success, a negative value if an error occured.

idmef_classification_write ()

int                 idmef_classification_write          (idmef_classification_t *classification,
                                                         prelude_msgbuf_t *msg);

Write classification within msg message buffer. The buffer is associated with a prelude_io_t file descriptor where the data will be written.

classification :

Pointer to a idmef_classification_t object.

msg :

Pointer to a prelude_msgbuf_t object, where the message should be written.

Returns :

0 on success, a negative value if an error occured.

idmef_user_id_write ()

int                 idmef_user_id_write                 (idmef_user_id_t *user_id,
                                                         prelude_msgbuf_t *msg);

Write user_id within msg message buffer. The buffer is associated with a prelude_io_t file descriptor where the data will be written.

user_id :

Pointer to a idmef_user_id_t object.

msg :

Pointer to a prelude_msgbuf_t object, where the message should be written.

Returns :

0 on success, a negative value if an error occured.

idmef_user_write ()

int                 idmef_user_write                    (idmef_user_t *user,
                                                         prelude_msgbuf_t *msg);

Write user within msg message buffer. The buffer is associated with a prelude_io_t file descriptor where the data will be written.

user :

Pointer to a idmef_user_t object.

msg :

Pointer to a prelude_msgbuf_t object, where the message should be written.

Returns :

0 on success, a negative value if an error occured.

idmef_address_write ()

int                 idmef_address_write                 (idmef_address_t *address,
                                                         prelude_msgbuf_t *msg);

Write address within msg message buffer. The buffer is associated with a prelude_io_t file descriptor where the data will be written.

address :

Pointer to a idmef_address_t object.

msg :

Pointer to a prelude_msgbuf_t object, where the message should be written.

Returns :

0 on success, a negative value if an error occured.

idmef_process_write ()

int                 idmef_process_write                 (idmef_process_t *process,
                                                         prelude_msgbuf_t *msg);

Write process within msg message buffer. The buffer is associated with a prelude_io_t file descriptor where the data will be written.

process :

Pointer to a idmef_process_t object.

msg :

Pointer to a prelude_msgbuf_t object, where the message should be written.

Returns :

0 on success, a negative value if an error occured.

idmef_web_service_write ()

int                 idmef_web_service_write             (idmef_web_service_t *web_service,
                                                         prelude_msgbuf_t *msg);

Write web_service within msg message buffer. The buffer is associated with a prelude_io_t file descriptor where the data will be written.

web_service :

Pointer to a idmef_web_service_t object.

msg :

Pointer to a prelude_msgbuf_t object, where the message should be written.

Returns :

0 on success, a negative value if an error occured.

idmef_snmp_service_write ()

int                 idmef_snmp_service_write            (idmef_snmp_service_t *snmp_service,
                                                         prelude_msgbuf_t *msg);

Write snmp_service within msg message buffer. The buffer is associated with a prelude_io_t file descriptor where the data will be written.

snmp_service :

Pointer to a idmef_snmp_service_t object.

msg :

Pointer to a prelude_msgbuf_t object, where the message should be written.

Returns :

0 on success, a negative value if an error occured.

idmef_service_write ()

int                 idmef_service_write                 (idmef_service_t *service,
                                                         prelude_msgbuf_t *msg);

Write service within msg message buffer. The buffer is associated with a prelude_io_t file descriptor where the data will be written.

service :

Pointer to a idmef_service_t object.

msg :

Pointer to a prelude_msgbuf_t object, where the message should be written.

Returns :

0 on success, a negative value if an error occured.

idmef_node_write ()

int                 idmef_node_write                    (idmef_node_t *node,
                                                         prelude_msgbuf_t *msg);

Write node within msg message buffer. The buffer is associated with a prelude_io_t file descriptor where the data will be written.

node :

Pointer to a idmef_node_t object.

msg :

Pointer to a prelude_msgbuf_t object, where the message should be written.

Returns :

0 on success, a negative value if an error occured.

idmef_source_write ()

int                 idmef_source_write                  (idmef_source_t *source,
                                                         prelude_msgbuf_t *msg);

Write source within msg message buffer. The buffer is associated with a prelude_io_t file descriptor where the data will be written.

source :

Pointer to a idmef_source_t object.

msg :

Pointer to a prelude_msgbuf_t object, where the message should be written.

Returns :

0 on success, a negative value if an error occured.

idmef_file_access_write ()

int                 idmef_file_access_write             (idmef_file_access_t *file_access,
                                                         prelude_msgbuf_t *msg);

Write file_access within msg message buffer. The buffer is associated with a prelude_io_t file descriptor where the data will be written.

file_access :

Pointer to a idmef_file_access_t object.

msg :

Pointer to a prelude_msgbuf_t object, where the message should be written.

Returns :

0 on success, a negative value if an error occured.

idmef_inode_write ()

int                 idmef_inode_write                   (idmef_inode_t *inode,
                                                         prelude_msgbuf_t *msg);

Write inode within msg message buffer. The buffer is associated with a prelude_io_t file descriptor where the data will be written.

inode :

Pointer to a idmef_inode_t object.

msg :

Pointer to a prelude_msgbuf_t object, where the message should be written.

Returns :

0 on success, a negative value if an error occured.

idmef_checksum_write ()

int                 idmef_checksum_write                (idmef_checksum_t *checksum,
                                                         prelude_msgbuf_t *msg);

Write checksum within msg message buffer. The buffer is associated with a prelude_io_t file descriptor where the data will be written.

checksum :

Pointer to a idmef_checksum_t object.

msg :

Pointer to a prelude_msgbuf_t object, where the message should be written.

Returns :

0 on success, a negative value if an error occured.

idmef_file_write ()

int                 idmef_file_write                    (idmef_file_t *file,
                                                         prelude_msgbuf_t *msg);

Write file within msg message buffer. The buffer is associated with a prelude_io_t file descriptor where the data will be written.

file :

Pointer to a idmef_file_t object.

msg :

Pointer to a prelude_msgbuf_t object, where the message should be written.

Returns :

0 on success, a negative value if an error occured.

idmef_linkage_write ()

int                 idmef_linkage_write                 (idmef_linkage_t *linkage,
                                                         prelude_msgbuf_t *msg);

Write linkage within msg message buffer. The buffer is associated with a prelude_io_t file descriptor where the data will be written.

linkage :

Pointer to a idmef_linkage_t object.

msg :

Pointer to a prelude_msgbuf_t object, where the message should be written.

Returns :

0 on success, a negative value if an error occured.

idmef_target_write ()

int                 idmef_target_write                  (idmef_target_t *target,
                                                         prelude_msgbuf_t *msg);

Write target within msg message buffer. The buffer is associated with a prelude_io_t file descriptor where the data will be written.

target :

Pointer to a idmef_target_t object.

msg :

Pointer to a prelude_msgbuf_t object, where the message should be written.

Returns :

0 on success, a negative value if an error occured.

idmef_analyzer_write ()

int                 idmef_analyzer_write                (idmef_analyzer_t *analyzer,
                                                         prelude_msgbuf_t *msg);

Write analyzer within msg message buffer. The buffer is associated with a prelude_io_t file descriptor where the data will be written.

analyzer :

Pointer to a idmef_analyzer_t object.

msg :

Pointer to a prelude_msgbuf_t object, where the message should be written.

Returns :

0 on success, a negative value if an error occured.

idmef_alertident_write ()

int                 idmef_alertident_write              (idmef_alertident_t *alertident,
                                                         prelude_msgbuf_t *msg);

Write alertident within msg message buffer. The buffer is associated with a prelude_io_t file descriptor where the data will be written.

alertident :

Pointer to a idmef_alertident_t object.

msg :

Pointer to a prelude_msgbuf_t object, where the message should be written.

Returns :

0 on success, a negative value if an error occured.

idmef_impact_write ()

int                 idmef_impact_write                  (idmef_impact_t *impact,
                                                         prelude_msgbuf_t *msg);

Write impact within msg message buffer. The buffer is associated with a prelude_io_t file descriptor where the data will be written.

impact :

Pointer to a idmef_impact_t object.

msg :

Pointer to a prelude_msgbuf_t object, where the message should be written.

Returns :

0 on success, a negative value if an error occured.

idmef_action_write ()

int                 idmef_action_write                  (idmef_action_t *action,
                                                         prelude_msgbuf_t *msg);

Write action within msg message buffer. The buffer is associated with a prelude_io_t file descriptor where the data will be written.

action :

Pointer to a idmef_action_t object.

msg :

Pointer to a prelude_msgbuf_t object, where the message should be written.

Returns :

0 on success, a negative value if an error occured.

idmef_confidence_write ()

int                 idmef_confidence_write              (idmef_confidence_t *confidence,
                                                         prelude_msgbuf_t *msg);

Write confidence within msg message buffer. The buffer is associated with a prelude_io_t file descriptor where the data will be written.

confidence :

Pointer to a idmef_confidence_t object.

msg :

Pointer to a prelude_msgbuf_t object, where the message should be written.

Returns :

0 on success, a negative value if an error occured.

idmef_assessment_write ()

int                 idmef_assessment_write              (idmef_assessment_t *assessment,
                                                         prelude_msgbuf_t *msg);

Write assessment within msg message buffer. The buffer is associated with a prelude_io_t file descriptor where the data will be written.

assessment :

Pointer to a idmef_assessment_t object.

msg :

Pointer to a prelude_msgbuf_t object, where the message should be written.

Returns :

0 on success, a negative value if an error occured.

idmef_tool_alert_write ()

int                 idmef_tool_alert_write              (idmef_tool_alert_t *tool_alert,
                                                         prelude_msgbuf_t *msg);

Write tool_alert within msg message buffer. The buffer is associated with a prelude_io_t file descriptor where the data will be written.

tool_alert :

Pointer to a idmef_tool_alert_t object.

msg :

Pointer to a prelude_msgbuf_t object, where the message should be written.

Returns :

0 on success, a negative value if an error occured.

idmef_correlation_alert_write ()

int                 idmef_correlation_alert_write       (idmef_correlation_alert_t *correlation_alert,
                                                         prelude_msgbuf_t *msg);

Write correlation_alert within msg message buffer. The buffer is associated with a prelude_io_t file descriptor where the data will be written.

correlation_alert :

Pointer to a idmef_correlation_alert_t object.

msg :

Pointer to a prelude_msgbuf_t object, where the message should be written.

Returns :

0 on success, a negative value if an error occured.

idmef_overflow_alert_write ()

int                 idmef_overflow_alert_write          (idmef_overflow_alert_t *overflow_alert,
                                                         prelude_msgbuf_t *msg);

Write overflow_alert within msg message buffer. The buffer is associated with a prelude_io_t file descriptor where the data will be written.

overflow_alert :

Pointer to a idmef_overflow_alert_t object.

msg :

Pointer to a prelude_msgbuf_t object, where the message should be written.

Returns :

0 on success, a negative value if an error occured.

idmef_alert_write ()

int                 idmef_alert_write                   (idmef_alert_t *alert,
                                                         prelude_msgbuf_t *msg);

Write alert within msg message buffer. The buffer is associated with a prelude_io_t file descriptor where the data will be written.

alert :

Pointer to a idmef_alert_t object.

msg :

Pointer to a prelude_msgbuf_t object, where the message should be written.

Returns :

0 on success, a negative value if an error occured.

idmef_heartbeat_write ()

int                 idmef_heartbeat_write               (idmef_heartbeat_t *heartbeat,
                                                         prelude_msgbuf_t *msg);

Write heartbeat within msg message buffer. The buffer is associated with a prelude_io_t file descriptor where the data will be written.

heartbeat :

Pointer to a idmef_heartbeat_t object.

msg :

Pointer to a prelude_msgbuf_t object, where the message should be written.

Returns :

0 on success, a negative value if an error occured.

idmef_message_write ()

int                 idmef_message_write                 (idmef_message_t *message,
                                                         prelude_msgbuf_t *msg);

Write message within msg message buffer. The buffer is associated with a prelude_io_t file descriptor where the data will be written.

message :

Pointer to a idmef_message_t object.

msg :

Pointer to a prelude_msgbuf_t object, where the message should be written.

Returns :

0 on success, a negative value if an error occured.
libprelude-1.0.0/docs/api/html/libprelude-idmef-additional-data.html0000664000076400007640000012057611347714757022406 00000000000000 idmef-additional-data

idmef-additional-data

idmef-additional-data

Synopsis

int                 idmef_additional_data_new_real      (idmef_additional_data_t **ret,
                                                         float data);
int                 idmef_additional_data_new_byte      (idmef_additional_data_t **ret,
                                                         uint8_t byte);
int                 idmef_additional_data_new_integer   (idmef_additional_data_t **ret,
                                                         uint32_t data);
int                 idmef_additional_data_new_boolean   (idmef_additional_data_t **ret,
                                                         prelude_bool_t data);
int                 idmef_additional_data_new_character (idmef_additional_data_t **ret,
                                                         char data);
void                idmef_additional_data_set_real      (idmef_additional_data_t *ptr,
                                                         float data);
void                idmef_additional_data_set_byte      (idmef_additional_data_t *ptr,
                                                         uint8_t byte);
void                idmef_additional_data_set_integer   (idmef_additional_data_t *ptr,
                                                         uint32_t data);
void                idmef_additional_data_set_boolean   (idmef_additional_data_t *ptr,
                                                         prelude_bool_t data);
void                idmef_additional_data_set_character (idmef_additional_data_t *ptr,
                                                         char data);
int                 idmef_additional_data_new_byte_string_ref
                                                        (idmef_additional_data_t **ad,
                                                         unsigned char *data,
                                                         size_t len);
int                 idmef_additional_data_set_byte_string_ref
                                                        (idmef_additional_data_t *ad,
                                                         unsigned char *data,
                                                         size_t len);
int                 idmef_additional_data_new_byte_string_dup
                                                        (idmef_additional_data_t **ad,
                                                         unsigned char *data,
                                                         size_t len);
int                 idmef_additional_data_set_byte_string_dup
                                                        (idmef_additional_data_t *ad,
                                                         unsigned char *data,
                                                         size_t len);
int                 idmef_additional_data_new_byte_string_nodup
                                                        (idmef_additional_data_t **ad,
                                                         unsigned char *data,
                                                         size_t len);
int                 idmef_additional_data_set_byte_string_nodup
                                                        (idmef_additional_data_t *ad,
                                                         unsigned char *data,
                                                         size_t len);
int                 idmef_additional_data_copy_ref      (idmef_additional_data_t *src,
                                                         idmef_additional_data_t *dst);
int                 idmef_additional_data_copy_dup      (idmef_additional_data_t *src,
                                                         idmef_additional_data_t *dst);
float               idmef_additional_data_get_real      (idmef_additional_data_t *data);
uint32_t            idmef_additional_data_get_integer   (idmef_additional_data_t *data);
prelude_bool_t      idmef_additional_data_get_boolean   (idmef_additional_data_t *data);
char                idmef_additional_data_get_character (idmef_additional_data_t *data);
uint8_t             idmef_additional_data_get_byte      (idmef_additional_data_t *data);
size_t              idmef_additional_data_get_len       (idmef_additional_data_t *data);
prelude_bool_t      idmef_additional_data_is_empty      (idmef_additional_data_t *data);
int                 idmef_additional_data_data_to_string
                                                        (idmef_additional_data_t *ad,
                                                         prelude_string_t *out);

Description

Details

idmef_additional_data_new_real ()

int                 idmef_additional_data_new_real      (idmef_additional_data_t **ret,
                                                         float data);

ret :

data :

Returns :


idmef_additional_data_new_byte ()

int                 idmef_additional_data_new_byte      (idmef_additional_data_t **ret,
                                                         uint8_t byte);

ret :

byte :

Returns :


idmef_additional_data_new_integer ()

int                 idmef_additional_data_new_integer   (idmef_additional_data_t **ret,
                                                         uint32_t data);

ret :

data :

Returns :


idmef_additional_data_new_boolean ()

int                 idmef_additional_data_new_boolean   (idmef_additional_data_t **ret,
                                                         prelude_bool_t data);

ret :

data :

Returns :


idmef_additional_data_new_character ()

int                 idmef_additional_data_new_character (idmef_additional_data_t **ret,
                                                         char data);

ret :

data :

Returns :


idmef_additional_data_set_real ()

void                idmef_additional_data_set_real      (idmef_additional_data_t *ptr,
                                                         float data);

ptr :

data :


idmef_additional_data_set_byte ()

void                idmef_additional_data_set_byte      (idmef_additional_data_t *ptr,
                                                         uint8_t byte);

ptr :

byte :


idmef_additional_data_set_integer ()

void                idmef_additional_data_set_integer   (idmef_additional_data_t *ptr,
                                                         uint32_t data);

ptr :

data :


idmef_additional_data_set_boolean ()

void                idmef_additional_data_set_boolean   (idmef_additional_data_t *ptr,
                                                         prelude_bool_t data);

ptr :

data :


idmef_additional_data_set_character ()

void                idmef_additional_data_set_character (idmef_additional_data_t *ptr,
                                                         char data);

ptr :

data :


idmef_additional_data_new_byte_string_ref ()

int                 idmef_additional_data_new_byte_string_ref
                                                        (idmef_additional_data_t **ad,
                                                         unsigned char *data,
                                                         size_t len);

ad :

data :

len :

Returns :


idmef_additional_data_set_byte_string_ref ()

int                 idmef_additional_data_set_byte_string_ref
                                                        (idmef_additional_data_t *ad,
                                                         unsigned char *data,
                                                         size_t len);

ad :

data :

len :

Returns :


idmef_additional_data_new_byte_string_dup ()

int                 idmef_additional_data_new_byte_string_dup
                                                        (idmef_additional_data_t **ad,
                                                         unsigned char *data,
                                                         size_t len);

ad :

data :

len :

Returns :


idmef_additional_data_set_byte_string_dup ()

int                 idmef_additional_data_set_byte_string_dup
                                                        (idmef_additional_data_t *ad,
                                                         unsigned char *data,
                                                         size_t len);

ad :

data :

len :

Returns :


idmef_additional_data_new_byte_string_nodup ()

int                 idmef_additional_data_new_byte_string_nodup
                                                        (idmef_additional_data_t **ad,
                                                         unsigned char *data,
                                                         size_t len);

ad :

data :

len :

Returns :


idmef_additional_data_set_byte_string_nodup ()

int                 idmef_additional_data_set_byte_string_nodup
                                                        (idmef_additional_data_t *ad,
                                                         unsigned char *data,
                                                         size_t len);

ad :

data :

len :

Returns :


idmef_additional_data_copy_ref ()

int                 idmef_additional_data_copy_ref      (idmef_additional_data_t *src,
                                                         idmef_additional_data_t *dst);

src :

dst :

Returns :


idmef_additional_data_copy_dup ()

int                 idmef_additional_data_copy_dup      (idmef_additional_data_t *src,
                                                         idmef_additional_data_t *dst);

src :

dst :

Returns :


idmef_additional_data_get_real ()

float               idmef_additional_data_get_real      (idmef_additional_data_t *data);

data :

Returns :


idmef_additional_data_get_integer ()

uint32_t            idmef_additional_data_get_integer   (idmef_additional_data_t *data);

data :

Returns :


idmef_additional_data_get_boolean ()

prelude_bool_t      idmef_additional_data_get_boolean   (idmef_additional_data_t *data);

data :

Returns :


idmef_additional_data_get_character ()

char                idmef_additional_data_get_character (idmef_additional_data_t *data);

data :

Returns :


idmef_additional_data_get_byte ()

uint8_t             idmef_additional_data_get_byte      (idmef_additional_data_t *data);

data :

Returns :


idmef_additional_data_get_len ()

size_t              idmef_additional_data_get_len       (idmef_additional_data_t *data);

data :

Returns :


idmef_additional_data_is_empty ()

prelude_bool_t      idmef_additional_data_is_empty      (idmef_additional_data_t *data);

data :

Returns :


idmef_additional_data_data_to_string ()

int                 idmef_additional_data_data_to_string
                                                        (idmef_additional_data_t *ad,
                                                         prelude_string_t *out);

ad :

out :

Returns :

libprelude-1.0.0/docs/api/html/libprelude-prelude-connection-pool.html0000664000076400007640000016453011347714757023047 00000000000000 prelude-connection-pool

prelude-connection-pool

prelude-connection-pool — Pool of connection handling

Synopsis

enum                prelude_connection_pool_flags_t;
enum                prelude_connection_pool_event_t;
typedef             prelude_connection_pool_t;
void                prelude_connection_pool_broadcast   (prelude_connection_pool_t *pool,
                                                         prelude_msg_t *msg);
void                prelude_connection_pool_broadcast_async
                                                        (prelude_connection_pool_t *pool,
                                                         prelude_msg_t *msg);
int                 prelude_connection_pool_init        (prelude_connection_pool_t *pool);
int                 prelude_connection_pool_new         (prelude_connection_pool_t **ret,
                                                         prelude_client_profile_t *cp,
                                                         prelude_connection_permission_t permission);
prelude_connection_pool_t * prelude_connection_pool_ref (prelude_connection_pool_t *pool);
prelude_list_t *    prelude_connection_pool_get_connection_list
                                                        (prelude_connection_pool_t *pool);
int                 prelude_connection_pool_add_connection
                                                        (prelude_connection_pool_t *pool,
                                                         prelude_connection_t *cnx);
int                 prelude_connection_pool_del_connection
                                                        (prelude_connection_pool_t *pool,
                                                         prelude_connection_t *cnx);
int                 prelude_connection_pool_set_connection_dead
                                                        (prelude_connection_pool_t *pool,
                                                         prelude_connection_t *cnx);
int                 prelude_connection_pool_set_connection_alive
                                                        (prelude_connection_pool_t *pool,
                                                         prelude_connection_t *cnx);
int                 prelude_connection_pool_set_connection_string
                                                        (prelude_connection_pool_t *pool,
                                                         const char *cfgstr);
const char *        prelude_connection_pool_get_connection_string
                                                        (prelude_connection_pool_t *pool);
void                prelude_connection_pool_destroy     (prelude_connection_pool_t *pool);
prelude_connection_pool_flags_t  prelude_connection_pool_get_flags
                                                        (prelude_connection_pool_t *pool);
void                prelude_connection_pool_set_flags   (prelude_connection_pool_t *pool,
                                                         prelude_connection_pool_flags_t flags);
void                prelude_connection_pool_set_required_permission
                                                        (prelude_connection_pool_t *pool,
                                                         prelude_connection_permission_t req_perm);
void                prelude_connection_pool_set_data    (prelude_connection_pool_t *pool,
                                                         void *data);
void *              prelude_connection_pool_get_data    (prelude_connection_pool_t *pool);
int                 prelude_connection_pool_recv        (prelude_connection_pool_t *pool,
                                                         int timeout,
                                                         prelude_connection_t **outcon,
                                                         prelude_msg_t **outmsg);
int                 prelude_connection_pool_check_event (prelude_connection_pool_t *pool,
                                                         int timeout,
                                                         int (event_cbprelude_connection_pool_t *pool,prelude_connection_pool_event_t event,prelude_connection_t *cnx, void *extra) (),
                                                         void *extra);
void                prelude_connection_pool_set_global_event_handler
                                                        (prelude_connection_pool_t *pool,
                                                         prelude_connection_pool_event_t wanted_events,
                                                         int (callbackprelude_connection_pool_t *pool,prelude_connection_pool_event_t events) ());
void                prelude_connection_pool_set_event_handler
                                                        (prelude_connection_pool_t *pool,
                                                         prelude_connection_pool_event_t wanted_events,
                                                         int (callbackprelude_connection_pool_t *pool,prelude_connection_pool_event_t events,prelude_connection_t *cnx) ());

Description

This API handle pool of connection, allowing to address a set of connection using only one object.

AND & OR of connection are supported, so that it is possible to address several connection at once, or to only address a set of connection if another connection went down.

Additionally it provide failover in case one of the connection in the pool goes down, and automatic reconnection and flushing of the information that could not be sent due to the connection status.

It is usually not necessary to access this API directly, however if you are looking at how to read events from a pool of connection, you're most probably looking for the prelude_connection_pool_check_event() function.

If this is the case, use prelude_connection_pool_check_event() for polling the pool or prelude_connection_set_event_handler() / prelude_connection_set_global_event_handler() if you want asynchronous notification of event.

Note that prelude_connection_set_event_handler() and prelude_connection_set_global_event_handler() are only asynchronous if timer are running in asynchronous mode. Otherwise, the callback for theses function might be called when you call the prelude_timer_wake_up() function.

In the provided callback, you might use prelude_connection_recv() to retrieve an event of type PRELUDE_CONNECTION_POOL_EVENT_INPUT. And, you could, for example, if the retrieved message has the PRELUDE_MSG_ID_IDMEF tag, provide the returned prelude_msg_t object to idmef_message_read() in order to convert the received message to a idmef_message_t object.

Details

enum prelude_connection_pool_flags_t

typedef enum {
        PRELUDE_CONNECTION_POOL_FLAGS_RECONNECT        = 0x01,
        PRELUDE_CONNECTION_POOL_FLAGS_FAILOVER         = 0x02
} prelude_connection_pool_flags_t;


enum prelude_connection_pool_event_t

typedef enum {
        PRELUDE_CONNECTION_POOL_EVENT_INPUT            = 0x01,
        PRELUDE_CONNECTION_POOL_EVENT_DEAD             = 0x02,
        PRELUDE_CONNECTION_POOL_EVENT_ALIVE            = 0x04
} prelude_connection_pool_event_t;


prelude_connection_pool_t

typedef struct prelude_connection_pool prelude_connection_pool_t;


prelude_connection_pool_broadcast ()

void                prelude_connection_pool_broadcast   (prelude_connection_pool_t *pool,
                                                         prelude_msg_t *msg);

Sends the message contained in msg to all the connection in pool.

pool :

Pointer to a prelude_connection_pool_t object.

msg :

Pointer on a prelude_msg_t object.

prelude_connection_pool_broadcast_async ()

void                prelude_connection_pool_broadcast_async
                                                        (prelude_connection_pool_t *pool,
                                                         prelude_msg_t *msg);

Sends the message contained in msg to all connections in pool asynchronously. After the request is processed, the msg message will be freed.

pool :

Pointer to a prelude_connection_pool_t object

msg :

Pointer on a prelude_msg_t object.

prelude_connection_pool_init ()

int                 prelude_connection_pool_init        (prelude_connection_pool_t *pool);

Initializes pool. This means that connection associated with pool using prelude_connection_pool_set_connection_string() will be established.

pool :

Pointer to a prelude_connection_pool_t object.

Returns :

0 on success, a negative value on error.

prelude_connection_pool_new ()

int                 prelude_connection_pool_new         (prelude_connection_pool_t **ret,
                                                         prelude_client_profile_t *cp,
                                                         prelude_connection_permission_t permission);

prelude_connection_pool_new() initializes a new Connection Manager object.

ret :

Pointer to an address where to store the created prelude_connection_pool_t object.

cp :

The prelude_client_profile_t to use for connection.

permission :

Permission the connection in this connection-pool will require.

Returns :

0 on success or a negative value if an error occured.

prelude_connection_pool_ref ()

prelude_connection_pool_t * prelude_connection_pool_ref (prelude_connection_pool_t *pool);

Increases pool reference count.

prelude_connection_pool_destroy() will decrease the refcount until it reaches 0, at which point the pool will be destroyed.

pool :

Pointer to a prelude_connection_pool_t object.

Returns :

The provided pool is returned.

prelude_connection_pool_get_connection_list ()

prelude_list_t *    prelude_connection_pool_get_connection_list
                                                        (prelude_connection_pool_t *pool);

pool :

Pointer to a prelude_connection_pool_t object.

Returns :

The list of connections handled by pool.

prelude_connection_pool_add_connection ()

int                 prelude_connection_pool_add_connection
                                                        (prelude_connection_pool_t *pool,
                                                         prelude_connection_t *cnx);

Adds cnx to pool set of connections.

If pool is already initialized (prelude_connection_pool_init() called) and cnx is not alive, it will attempt a reconnection.

pool :

Pointer to a prelude_connection_pool_t object.

cnx :

Pointer to a prelude_connection_t object to add to pool.

Returns :

0 on success, a negative value if an error occured.

prelude_connection_pool_del_connection ()

int                 prelude_connection_pool_del_connection
                                                        (prelude_connection_pool_t *pool,
                                                         prelude_connection_t *cnx);

Remove cnx from pool of connections.

pool :

Pointer to a prelude_connection_pool_t object.

cnx :

Pointer to a prelude_connection_t object to remove from pool.

Returns :

0 on success, a negative value if an error occured.

prelude_connection_pool_set_connection_dead ()

int                 prelude_connection_pool_set_connection_dead
                                                        (prelude_connection_pool_t *pool,
                                                         prelude_connection_t *cnx);

Notifies pool that the connection identified by cnx is dead.

Usually, this function should not be used since pool is self sufficient, and handles connections issues internally. However, it is sometime useful when the user has several mechanisms using the connection, and that its own mechanism detects a connection problem before pool notice.

pool :

Pointer to a prelude_connection_pool_t object.

cnx :

Pointer to a prelude_connection_t object used within pool.

Returns :

0 on success, a negative value if an error occured.

prelude_connection_pool_set_connection_alive ()

int                 prelude_connection_pool_set_connection_alive
                                                        (prelude_connection_pool_t *pool,
                                                         prelude_connection_t *cnx);

Notifies pool that the connection identified by cnx went back alive.

Usually, this function should not be used since pool is self sufficient, and handles connection issues internally. However, it is sometime useful when the user has several mechanisms using the connection, and that its own mechanism detects a connection problem before pool notice.

pool :

Pointer to a prelude_connection_pool_t object.

cnx :

Pointer to a prelude_connection_t object used within pool.

Returns :

0 on success, a negative value if an error occured.

prelude_connection_pool_set_connection_string ()

int                 prelude_connection_pool_set_connection_string
                                                        (prelude_connection_pool_t *pool,
                                                         const char *cfgstr);

Sets the connection string for pool. The connection string should be in the form of : "address". Special operand like || (OR) and && (AND), are also accepted: "address && address".

Where && means that alert sent using pool will go to both configured addresses, and || means that if the left address fails, the right address will be used.

prelude_connection_pool_init() should be used to initiates the connection.

pool :

Pointer to a prelude_connection_pool_t object.

cfgstr :

Connection string.

Returns :

0 on success, a negative value if an error occured.

prelude_connection_pool_get_connection_string ()

const char *        prelude_connection_pool_get_connection_string
                                                        (prelude_connection_pool_t *pool);

Used to query the connection string used by pool.

pool :

Pointer to a prelude_connection_pool_t object.

Returns :

The connection string.

prelude_connection_pool_destroy ()

void                prelude_connection_pool_destroy     (prelude_connection_pool_t *pool);

Destroys pool and all connections handled.

pool :

Pointer to a prelude_connection_pool_t object.

prelude_connection_pool_get_flags ()

prelude_connection_pool_flags_t  prelude_connection_pool_get_flags
                                                        (prelude_connection_pool_t *pool);

pool :

Pointer to a prelude_connection_pool_t object.

Returns :

the prelude_connection_pool_flags_t used in pool.

prelude_connection_pool_set_flags ()

void                prelude_connection_pool_set_flags   (prelude_connection_pool_t *pool,
                                                         prelude_connection_pool_flags_t flags);

Sets flags within pools.

pool :

Pointer to a prelude_connection_pool_t object.

flags :

Flags to use for pool.

prelude_connection_pool_set_required_permission ()

void                prelude_connection_pool_set_required_permission
                                                        (prelude_connection_pool_t *pool,
                                                         prelude_connection_permission_t req_perm);

pool :

req_perm :


prelude_connection_pool_set_data ()

void                prelude_connection_pool_set_data    (prelude_connection_pool_t *pool,
                                                         void *data);

The user might use this function to associate data with pool. The data associated might be retrieved using prelude_connection_pool_get_data().

pool :

Pointer to a prelude_connection_pool_t object.

data :

Pointer to user specific data.

prelude_connection_pool_get_data ()

void *              prelude_connection_pool_get_data    (prelude_connection_pool_t *pool);

The user might use this function to query data associated with pool using prelude_connection_pool_set_data().

pool :

Pointer to a prelude_connection_pool_t object.

Returns :

the user data associated to pool.

prelude_connection_pool_recv ()

int                 prelude_connection_pool_recv        (prelude_connection_pool_t *pool,
                                                         int timeout,
                                                         prelude_connection_t **outcon,
                                                         prelude_msg_t **outmsg);

This function queries the set of connections available in pool to see if events are waiting to be handled. If timeout is zero, then this function will return immediatly in case there is no event to be handled.

If timeout is -1, this function won't return until an event is available. Otherwise this function will return if there is no event after the specified number of second.

If an event is available, it will be read and store the prelude_connection_t object in the outcon pointer. If outmsg was specified, the message will be read and stored in there.

pool :

Pointer to a prelude_connection_pool_t object.

timeout :

Time to wait for an event.

outcon :

Pointer where the connection where an event happened should be stored.

outmsg :

Pointer where the next message that will be read should be stored.

Returns :

The number of handled events (0 or 1) or a negative value if an error occured.

prelude_connection_pool_check_event ()

int                 prelude_connection_pool_check_event (prelude_connection_pool_t *pool,
                                                         int timeout,
                                                         int (event_cbprelude_connection_pool_t *pool,prelude_connection_pool_event_t event,prelude_connection_t *cnx, void *extra) (),
                                                         void *extra);

This function queries the set of connections available in pool to see if events are waiting to be handled. If timeout is zero, then this function will return immediatly in case there is no event to be handled.

If timeout is -1, this function won't return until an event is available. Otherwise this function will return if there is no event after the specified number of second.

For each event, event_cb is called with the concerned pool, the provided extra data, and the cnx where an event has occured.

pool :

Pointer to a prelude_connection_pool_t object.

timeout :

Time to wait for an event.

event_cb :

User provided callback function to call on received events.

extra :

Pointer to user specific data provided to event_cb.

Returns :

The number of handled events, or a negative value if an error occured.

prelude_connection_pool_set_global_event_handler ()

void                prelude_connection_pool_set_global_event_handler
                                                        (prelude_connection_pool_t *pool,
                                                         prelude_connection_pool_event_t wanted_events,
                                                         int (callbackprelude_connection_pool_t *pool,prelude_connection_pool_event_t events) ());

callback will be called each time one of the event specified in wanted_events happen to pool. However, contrary to prelude_connection_pool_set_event_handler(), the callback will be called only once per set of event.

pool :

Pointer to a prelude_connection_pool_t object.

wanted_events :

Event the user want to be notified about.

callback :

User specific callback to call when an event is available.

prelude_connection_pool_set_event_handler ()

void                prelude_connection_pool_set_event_handler
                                                        (prelude_connection_pool_t *pool,
                                                         prelude_connection_pool_event_t wanted_events,
                                                         int (callbackprelude_connection_pool_t *pool,prelude_connection_pool_event_t events,prelude_connection_t *cnx) ());

callback will be called each time one of the event specified in wanted_events happens to pool.

pool :

Pointer to a prelude_connection_pool_t object.

wanted_events :

Event the user want to be notified about.

callback :

User specific callback to call when an event is available.
libprelude-1.0.0/docs/api/html/libprelude-prelude-option.html0000664000076400007640000026711011347714757021247 00000000000000 prelude-option

prelude-option

prelude-option

Synopsis

enum                prelude_option_type_t;
enum                prelude_option_input_type_t;
typedef             prelude_option_t;
typedef             prelude_option_context_t;
int                 (*prelude_option_destroy_callback_t)
                                                        (prelude_option_t *opt,
                                                         prelude_string_t *out,
                                                         void *context);
int                 (*prelude_option_commit_callback_t) (prelude_option_t *opt,
                                                         prelude_string_t *out,
                                                         void *context);
int                 (*prelude_option_get_callback_t)    (prelude_option_t *opt,
                                                         prelude_string_t *out,
                                                         void *context);
int                 (*prelude_option_set_callback_t)    (prelude_option_t *opt,
                                                         const char *optarg,
                                                         prelude_string_t *err,
                                                         void *context);
enum                prelude_option_argument_t;
enum                prelude_option_priority_t;
enum                prelude_option_warning_t;
void                prelude_option_set_priority         (prelude_option_t *option,
                                                         prelude_option_priority_t priority);
void                prelude_option_print                (prelude_option_t *opt,
                                                         prelude_option_type_t type,
                                                         int descoff,
                                                         FILE *fd);
int                 prelude_option_wide_send_msg        (prelude_msgbuf_t *msgbuf,
                                                         void *context);
void                prelude_option_destroy              (prelude_option_t *option);
int                 prelude_option_read                 (prelude_option_t *option,
                                                         const char **filename,
                                                         int *argc,
                                                         char **argv,
                                                         prelude_string_t **err,
                                                         void *context);
int                 prelude_option_add                  (prelude_option_t *parent,
                                                         prelude_option_t **retopt,
                                                         prelude_option_type_t type,
                                                         char shortopt,
                                                         const char *longopt,
                                                         const char *desc,
                                                         prelude_option_argument_t has_arg,
                                                         int (setprelude_option_t *opt, const char *optarg, prelude_string_t *err, void *context) (),
                                                         int (getprelude_option_t *opt, prelude_string_t *out, void *context) ());
void                prelude_option_set_type             (prelude_option_t *opt,
                                                         prelude_option_type_t type);
prelude_option_type_t  prelude_option_get_type          (prelude_option_t *opt);
void                prelude_option_set_warnings         (prelude_option_warning_t new_warnings,
                                                         prelude_option_warning_t *old_warnings);
char                prelude_option_get_shortname        (prelude_option_t *opt);
const char *        prelude_option_get_longname         (prelude_option_t *opt);
void                prelude_option_set_data             (prelude_option_t *opt,
                                                         void *data);
void *              prelude_option_get_data             (prelude_option_t *opt);
void *              prelude_option_context_get_data     (prelude_option_context_t *oc);
void                prelude_option_context_set_data     (prelude_option_context_t *oc,
                                                         void *data);
int                 prelude_option_invoke_commit        (prelude_option_t *opt,
                                                         const char *ctname,
                                                         prelude_string_t *value,
                                                         void *context);
int                 prelude_option_invoke_set           (prelude_option_t *opt,
                                                         const char *ctname,
                                                         prelude_string_t *value,
                                                         void **context);
int                 prelude_option_invoke_get           (prelude_option_t *opt,
                                                         const char *ctname,
                                                         prelude_string_t *value,
                                                         void *context);
int                 prelude_option_invoke_destroy       (prelude_option_t *opt,
                                                         const char *ctname,
                                                         prelude_string_t *value,
                                                         void *context);
int                 prelude_option_new_root             (prelude_option_t **retopt);
int                 prelude_option_new                  (prelude_option_t *parent,
                                                         prelude_option_t **retopt);
void                prelude_option_set_longopt          (prelude_option_t *opt,
                                                         const char *longopt);
const char *        prelude_option_get_longopt          (prelude_option_t *opt);
void                prelude_option_set_description      (prelude_option_t *opt,
                                                         const char *description);
const char *        prelude_option_get_description      (prelude_option_t *opt);
void                prelude_option_set_has_arg          (prelude_option_t *opt,
                                                         prelude_option_argument_t has_arg);
prelude_option_argument_t  prelude_option_get_has_arg   (prelude_option_t *opt);
void                prelude_option_set_value            (prelude_option_t *opt,
                                                         const char *value);
const char *        prelude_option_get_value            (prelude_option_t *opt);
void                prelude_option_set_help             (prelude_option_t *opt,
                                                         const char *help);
const char *        prelude_option_get_help             (prelude_option_t *opt);
void                prelude_option_set_input_validation_regex
                                                        (prelude_option_t *opt,
                                                         const char *regex);
const char *        prelude_option_get_input_validation_regex
                                                        (prelude_option_t *opt);
void                prelude_option_set_input_type       (prelude_option_t *opt,
                                                         prelude_option_input_type_t input_type);
prelude_option_input_type_t  prelude_option_get_input_type
                                                        (prelude_option_t *opt);
prelude_list_t *    prelude_option_get_optlist          (prelude_option_t *opt);
prelude_option_t *  prelude_option_get_next             (prelude_option_t *start,
                                                         prelude_option_t *cur);
prelude_bool_t      prelude_option_has_optlist          (prelude_option_t *opt);
prelude_option_t *  prelude_option_get_parent           (prelude_option_t *opt);
void                prelude_option_set_destroy_callback (prelude_option_t *opt,
                                                         prelude_option_destroy_callback_t destroy);
prelude_option_destroy_callback_t  prelude_option_get_destroy_callback
                                                        (prelude_option_t *opt);
void                prelude_option_set_set_callback     (prelude_option_t *opt,
                                                         prelude_option_set_callback_t set);
prelude_option_set_callback_t  prelude_option_get_set_callback
                                                        (prelude_option_t *opt);
void                prelude_option_set_get_callback     (prelude_option_t *opt,
                                                         int (getprelude_option_t *opt, prelude_string_t *out, void *context) ());
prelude_option_get_callback_t  prelude_option_get_get_callback
                                                        (prelude_option_t *opt);
void                prelude_option_set_commit_callback  (prelude_option_t *opt,
                                                         prelude_option_commit_callback_t commit);
prelude_option_commit_callback_t  prelude_option_get_commit_callback
                                                        (prelude_option_t *opt);
void                prelude_option_set_default_context  (prelude_option_t *opt,
                                                         void *context);
int                 prelude_option_new_context          (prelude_option_t *opt,
                                                         prelude_option_context_t **ctx,
                                                         const char *name,
                                                         void *data);
void                prelude_option_context_destroy      (prelude_option_context_t *oc);
prelude_option_t *  prelude_option_search               (prelude_option_t *parent,
                                                         const char *name,
                                                         prelude_option_type_t type,
                                                         prelude_bool_t walk_children);
prelude_option_context_t * prelude_option_search_context
                                                        (prelude_option_t *opt,
                                                         const char *name);

Description

Details

enum prelude_option_type_t

typedef enum {
        PRELUDE_OPTION_TYPE_CLI  = 0x01,
        PRELUDE_OPTION_TYPE_CFG  = 0x02,
        PRELUDE_OPTION_TYPE_WIDE = 0x04,
        PRELUDE_OPTION_TYPE_CONTEXT = 0x08,
        PRELUDE_OPTION_TYPE_ROOT    = 0x10,
        PRELUDE_OPTION_TYPE_DESTROY = 0x20
} prelude_option_type_t;


enum prelude_option_input_type_t

typedef enum {
        PRELUDE_OPTION_INPUT_TYPE_STRING   = 1,
        PRELUDE_OPTION_INPUT_TYPE_INTEGER  = 2,
        PRELUDE_OPTION_INPUT_TYPE_BOOLEAN  = 3
} prelude_option_input_type_t;


prelude_option_t

typedef struct prelude_option prelude_option_t;


prelude_option_context_t

typedef struct prelude_option_context prelude_option_context_t;


prelude_option_destroy_callback_t ()

int                 (*prelude_option_destroy_callback_t)
                                                        (prelude_option_t *opt,
                                                         prelude_string_t *out,
                                                         void *context);

opt :

out :

context :

Returns :


prelude_option_commit_callback_t ()

int                 (*prelude_option_commit_callback_t) (prelude_option_t *opt,
                                                         prelude_string_t *out,
                                                         void *context);

opt :

out :

context :

Returns :


prelude_option_get_callback_t ()

int                 (*prelude_option_get_callback_t)    (prelude_option_t *opt,
                                                         prelude_string_t *out,
                                                         void *context);

opt :

out :

context :

Returns :


prelude_option_set_callback_t ()

int                 (*prelude_option_set_callback_t)    (prelude_option_t *opt,
                                                         const char *optarg,
                                                         prelude_string_t *err,
                                                         void *context);

opt :

optarg :

err :

context :

Returns :


enum prelude_option_argument_t

typedef enum {
        PRELUDE_OPTION_ARGUMENT_REQUIRED = 1,
        PRELUDE_OPTION_ARGUMENT_OPTIONAL = 2,
        PRELUDE_OPTION_ARGUMENT_NONE     = 3
} prelude_option_argument_t;


enum prelude_option_priority_t

typedef enum {
        PRELUDE_OPTION_PRIORITY_IMMEDIATE = -2,
        PRELUDE_OPTION_PRIORITY_FIRST     = -1,
        PRELUDE_OPTION_PRIORITY_NONE      =  0,
        PRELUDE_OPTION_PRIORITY_LAST      =  2
} prelude_option_priority_t;


enum prelude_option_warning_t

typedef enum {
        PRELUDE_OPTION_WARNING_OPTION    = 0x1,
        PRELUDE_OPTION_WARNING_ARG       = 0x2
} prelude_option_warning_t;


prelude_option_set_priority ()

void                prelude_option_set_priority         (prelude_option_t *option,
                                                         prelude_option_priority_t priority);

prelude_option_set_priority() can be used to associate a priority with an option. This can be used to solve dependancies problem within differents options.

A priority of -1 mean an option will always be executed last (with all other option with a -1 priority).

The default priority for an option is 0, the caller is responssible for the way it assign priority (knowing that highest priority are always executed first).

option :

Pointer on an option object.

priority :

Priority of the option object.

prelude_option_print ()

void                prelude_option_print                (prelude_option_t *opt,
                                                         prelude_option_type_t type,
                                                         int descoff,
                                                         FILE *fd);

Dump option available in opt and hooked to the given types. If opt is NULL, then the root of the option list is used.

opt :

Option(s) to print out.

type :

Only option with specified types will be printed.

descoff :

offset from the begining of the line where the description should start.

fd :

File descriptor where the option should be dumped.

prelude_option_wide_send_msg ()

int                 prelude_option_wide_send_msg        (prelude_msgbuf_t *msgbuf,
                                                         void *context);

msgbuf :

context :

Returns :


prelude_option_destroy ()

void                prelude_option_destroy              (prelude_option_t *option);

Destroy a prelude_option_t object and all data associated with it (including all suboption).

option :

Pointer on an option object.

prelude_option_read ()

int                 prelude_option_read                 (prelude_option_t *option,
                                                         const char **filename,
                                                         int *argc,
                                                         char **argv,
                                                         prelude_string_t **err,
                                                         void *context);

prelude_option_read(), parse the given argument and try to match them against option in option. If an option match, it's associated callback function is called with the eventual option argument if any.

Option not matched on the command line are searched in the configuration file specified by filename.

if option is NULL, all system option will be matched against argc, and argv.

option :

A pointer on an option (list).

filename :

Pointer to the config filename.

argc :

Number of argument.

argv :

Argument list.

err :

Pointer to a prelude_string_t object where to store an error string.

context :

Pointer to an optional option context.

Returns :

The index of the first unhandled parameter if option parsing succeeded, or a negative value if an error occured.

prelude_option_add ()

int                 prelude_option_add                  (prelude_option_t *parent,
                                                         prelude_option_t **retopt,
                                                         prelude_option_type_t type,
                                                         char shortopt,
                                                         const char *longopt,
                                                         const char *desc,
                                                         prelude_option_argument_t has_arg,
                                                         int (setprelude_option_t *opt, const char *optarg, prelude_string_t *err, void *context) (),
                                                         int (getprelude_option_t *opt, prelude_string_t *out, void *context) ());

prelude_option_add() create a new option. The option is set to be the child of parent, unless it is NULL. In this case the option is a root option.

The type parameters can be set to PRELUDE_OPTION_TYPE_CLI (telling the option may be searched on the command line), PRELUDE_OPTION_TYPE_CFG (telling the option may be searched in the configuration file) or both.

parent :

Pointer on a parent option.

retopt :

Pointer where to store the created option.

type :

bitfields.

shortopt :

Short option name.

longopt :

Long option name.

desc :

Description of the option.

has_arg :

Define if the option has argument.

set :

Callback to be called when the value for this option change.

get :

Callback to be called to get the value for this option.

Returns :

Pointer on the option object, or NULL if an error occured.

prelude_option_set_type ()

void                prelude_option_set_type             (prelude_option_t *opt,
                                                         prelude_option_type_t type);

opt :

type :


prelude_option_get_type ()

prelude_option_type_t  prelude_option_get_type          (prelude_option_t *opt);

opt :

Returns :


prelude_option_set_warnings ()

void                prelude_option_set_warnings         (prelude_option_warning_t new_warnings,
                                                         prelude_option_warning_t *old_warnings);

Set current warnings flags to new_warnings.

Uppon return, if not NULL, the pointer to old_warnings is updated to contain the old warnings.

new_warnings :

bitwise OR of prelude_option_warning_t.

old_warnings :

Pointer where to store the old prelude_option_warning_t to.

prelude_option_get_shortname ()

char                prelude_option_get_shortname        (prelude_option_t *opt);

opt :

Returns :


prelude_option_get_longname ()

const char *        prelude_option_get_longname         (prelude_option_t *opt);

opt :

Returns :


prelude_option_set_data ()

void                prelude_option_set_data             (prelude_option_t *opt,
                                                         void *data);

opt :

data :


prelude_option_get_data ()

void *              prelude_option_get_data             (prelude_option_t *opt);

opt :

Returns :


prelude_option_context_get_data ()

void *              prelude_option_context_get_data     (prelude_option_context_t *oc);

oc :

Returns :


prelude_option_context_set_data ()

void                prelude_option_context_set_data     (prelude_option_context_t *oc,
                                                         void *data);

oc :

data :


prelude_option_invoke_commit ()

int                 prelude_option_invoke_commit        (prelude_option_t *opt,
                                                         const char *ctname,
                                                         prelude_string_t *value,
                                                         void *context);

opt :

ctname :

value :

context :

Returns :


prelude_option_invoke_set ()

int                 prelude_option_invoke_set           (prelude_option_t *opt,
                                                         const char *ctname,
                                                         prelude_string_t *value,
                                                         void **context);

opt :

ctname :

value :

context :

Returns :


prelude_option_invoke_get ()

int                 prelude_option_invoke_get           (prelude_option_t *opt,
                                                         const char *ctname,
                                                         prelude_string_t *value,
                                                         void *context);

opt :

ctname :

value :

context :

Returns :


prelude_option_invoke_destroy ()

int                 prelude_option_invoke_destroy       (prelude_option_t *opt,
                                                         const char *ctname,
                                                         prelude_string_t *value,
                                                         void *context);

opt :

ctname :

value :

context :

Returns :


prelude_option_new_root ()

int                 prelude_option_new_root             (prelude_option_t **retopt);

retopt :

Returns :


prelude_option_new ()

int                 prelude_option_new                  (prelude_option_t *parent,
                                                         prelude_option_t **retopt);

parent :

retopt :

Returns :


prelude_option_set_longopt ()

void                prelude_option_set_longopt          (prelude_option_t *opt,
                                                         const char *longopt);

opt :

longopt :


prelude_option_get_longopt ()

const char *        prelude_option_get_longopt          (prelude_option_t *opt);

opt :

Returns :


prelude_option_set_description ()

void                prelude_option_set_description      (prelude_option_t *opt,
                                                         const char *description);

opt :

description :


prelude_option_get_description ()

const char *        prelude_option_get_description      (prelude_option_t *opt);

opt :

Returns :


prelude_option_set_has_arg ()

void                prelude_option_set_has_arg          (prelude_option_t *opt,
                                                         prelude_option_argument_t has_arg);

opt :

has_arg :


prelude_option_get_has_arg ()

prelude_option_argument_t  prelude_option_get_has_arg   (prelude_option_t *opt);

opt :

Returns :


prelude_option_set_value ()

void                prelude_option_set_value            (prelude_option_t *opt,
                                                         const char *value);

opt :

value :


prelude_option_get_value ()

const char *        prelude_option_get_value            (prelude_option_t *opt);

opt :

Returns :


prelude_option_set_help ()

void                prelude_option_set_help             (prelude_option_t *opt,
                                                         const char *help);

opt :

help :


prelude_option_get_help ()

const char *        prelude_option_get_help             (prelude_option_t *opt);

opt :

Returns :


prelude_option_set_input_validation_regex ()

void                prelude_option_set_input_validation_regex
                                                        (prelude_option_t *opt,
                                                         const char *regex);

opt :

regex :


prelude_option_get_input_validation_regex ()

const char *        prelude_option_get_input_validation_regex
                                                        (prelude_option_t *opt);

opt :

Returns :


prelude_option_set_input_type ()

void                prelude_option_set_input_type       (prelude_option_t *opt,
                                                         prelude_option_input_type_t input_type);

opt :

input_type :


prelude_option_get_input_type ()

prelude_option_input_type_t  prelude_option_get_input_type
                                                        (prelude_option_t *opt);

opt :

Returns :


prelude_option_get_optlist ()

prelude_list_t *    prelude_option_get_optlist          (prelude_option_t *opt);

opt :

Returns :


prelude_option_get_next ()

prelude_option_t *  prelude_option_get_next             (prelude_option_t *start,
                                                         prelude_option_t *cur);

start :

cur :

Returns :


prelude_option_has_optlist ()

prelude_bool_t      prelude_option_has_optlist          (prelude_option_t *opt);

opt :

Returns :


prelude_option_get_parent ()

prelude_option_t *  prelude_option_get_parent           (prelude_option_t *opt);

opt :

Returns :


prelude_option_set_destroy_callback ()

void                prelude_option_set_destroy_callback (prelude_option_t *opt,
                                                         prelude_option_destroy_callback_t destroy);

opt :

destroy :


prelude_option_get_destroy_callback ()

prelude_option_destroy_callback_t  prelude_option_get_destroy_callback
                                                        (prelude_option_t *opt);

opt :

Returns :


prelude_option_set_set_callback ()

void                prelude_option_set_set_callback     (prelude_option_t *opt,
                                                         prelude_option_set_callback_t set);

opt :

set :


prelude_option_get_set_callback ()

prelude_option_set_callback_t  prelude_option_get_set_callback
                                                        (prelude_option_t *opt);

opt :

Returns :


prelude_option_set_get_callback ()

void                prelude_option_set_get_callback     (prelude_option_t *opt,
                                                         int (getprelude_option_t *opt, prelude_string_t *out, void *context) ());

opt :

get :


prelude_option_get_get_callback ()

prelude_option_get_callback_t  prelude_option_get_get_callback
                                                        (prelude_option_t *opt);

opt :

Returns :


prelude_option_set_commit_callback ()

void                prelude_option_set_commit_callback  (prelude_option_t *opt,
                                                         prelude_option_commit_callback_t commit);

opt :

commit :


prelude_option_get_commit_callback ()

prelude_option_commit_callback_t  prelude_option_get_commit_callback
                                                        (prelude_option_t *opt);

opt :

Returns :


prelude_option_set_default_context ()

void                prelude_option_set_default_context  (prelude_option_t *opt,
                                                         void *context);

opt :

context :


prelude_option_new_context ()

int                 prelude_option_new_context          (prelude_option_t *opt,
                                                         prelude_option_context_t **ctx,
                                                         const char *name,
                                                         void *data);

opt :

ctx :

name :

data :

Returns :


prelude_option_context_destroy ()

void                prelude_option_context_destroy      (prelude_option_context_t *oc);

oc :


prelude_option_search ()

prelude_option_t *  prelude_option_search               (prelude_option_t *parent,
                                                         const char *name,
                                                         prelude_option_type_t type,
                                                         prelude_bool_t walk_children);

parent :

name :

type :

walk_children :

Returns :


prelude_option_search_context ()

prelude_option_context_t * prelude_option_search_context
                                                        (prelude_option_t *opt,
                                                         const char *name);

opt :

name :

Returns :

libprelude-1.0.0/docs/api/html/ch01.html0000664000076400007640000000574711347714757014715 00000000000000 The low level IDMEF API

The low level IDMEF API

idmef-tree-wrap — Generating events using the low level IDMEF API
idmef-additional-data
idmef-time — Time representation in IDMEF message
idmef-data
libprelude-1.0.0/docs/api/html/libprelude-prelude-plugin.html0000664000076400007640000013076411347714757021241 00000000000000 prelude-plugin

prelude-plugin

prelude-plugin

Synopsis

#define             lt_preloaded_symbols
#define             PRELUDE_PLUGIN_API_VERSION
typedef             prelude_plugin_entry_t;
typedef             prelude_plugin_instance_t;
#define             PRELUDE_PLUGIN_GENERIC
                    prelude_plugin_generic_t;
#define             PRELUDE_PLUGIN_SET_PRELOADED_SYMBOLS()
#define             PRELUDE_PLUGIN_OPTION_DECLARE_STRING_CB(prefix, type, name)
#define             prelude_plugin_get_name             (p)
#define             prelude_plugin_set_name             (p, str)
#define             prelude_plugin_set_destroy_func     (p, func)
void                prelude_plugin_entry_set_plugin     (prelude_plugin_entry_t *pe,
                                                         prelude_plugin_generic_t *pl);
int                 prelude_plugin_set_activation_option
                                                        (prelude_plugin_entry_t *pe,
                                                         prelude_option_t *opt,
                                                         int (commitprelude_plugin_instance_t *pi, prelude_string_t *err) ());
int                 prelude_plugin_instance_subscribe   (prelude_plugin_instance_t *pi);
int                 prelude_plugin_instance_unsubscribe (prelude_plugin_instance_t *pi);
int                 prelude_plugin_new_instance         (prelude_plugin_instance_t **pi,
                                                         prelude_plugin_generic_t *plugin,
                                                         const char *name,
                                                         void *data);
prelude_plugin_generic_t * prelude_plugin_search_by_name
                                                        (prelude_list_t *head,
                                                         const char *name);
prelude_plugin_instance_t * prelude_plugin_search_instance_by_name
                                                        (prelude_list_t *head,
                                                         const char *pname,
                                                         const char *iname);
void                prelude_plugin_instance_set_data    (prelude_plugin_instance_t *pi,
                                                         void *data);
void *              prelude_plugin_instance_get_data    (prelude_plugin_instance_t *pi);
void                prelude_plugin_instance_set_plugin_data
                                                        (prelude_plugin_instance_t *pi,
                                                         void *data);
void *              prelude_plugin_instance_get_plugin_data
                                                        (prelude_plugin_instance_t *pi);
const char *        prelude_plugin_instance_get_name    (prelude_plugin_instance_t *pi);
prelude_plugin_generic_t * prelude_plugin_instance_get_plugin
                                                        (prelude_plugin_instance_t *pi);
int                 prelude_plugin_load_from_dir        (prelude_list_t *head,
                                                         const char *dirname,
                                                         const char *symbol,
                                                         void *ptr,
                                                         int (subscribeprelude_plugin_instance_t *p) (),
                                                         void (unsubscribeprelude_plugin_instance_t *pi) ());
int                 prelude_plugin_instance_add         (prelude_plugin_instance_t *pi,
                                                         prelude_list_t *h);
void                prelude_plugin_instance_del         (prelude_plugin_instance_t *pi);
void                prelude_plugin_instance_compute_time
                                                        (prelude_plugin_instance_t *pi,
                                                         struct timeval *start,
                                                         struct timeval *end);
int                 prelude_plugin_instance_call_commit_func
                                                        (prelude_plugin_instance_t *pi,
                                                         prelude_string_t *err);
prelude_bool_t      prelude_plugin_instance_has_commit_func
                                                        (prelude_plugin_instance_t *pi);
void                prelude_plugin_set_preloaded_symbols
                                                        (void *symlist);
prelude_plugin_generic_t * prelude_plugin_get_next      (prelude_list_t *head,
                                                         prelude_list_t **iter);
void                prelude_plugin_unload               (prelude_plugin_generic_t *plugin);
#define             prelude_plugin_compute_stats        (pi, func)
#define             prelude_plugin_run                  (pi, type, member, ...)

Description

Details

lt_preloaded_symbols

# define lt_preloaded_symbols lt__PROGRAM__LTX_preloaded_symbols


PRELUDE_PLUGIN_API_VERSION

#define PRELUDE_PLUGIN_API_VERSION 1


prelude_plugin_entry_t

typedef struct prelude_plugin_entry prelude_plugin_entry_t;


prelude_plugin_instance_t

typedef struct prelude_plugin_instance prelude_plugin_instance_t;


PRELUDE_PLUGIN_GENERIC

#define             PRELUDE_PLUGIN_GENERIC


prelude_plugin_generic_t

typedef struct {
        PRELUDE_PLUGIN_GENERIC;
} prelude_plugin_generic_t;


PRELUDE_PLUGIN_SET_PRELOADED_SYMBOLS()

#define             PRELUDE_PLUGIN_SET_PRELOADED_SYMBOLS()


PRELUDE_PLUGIN_OPTION_DECLARE_STRING_CB()

#define             PRELUDE_PLUGIN_OPTION_DECLARE_STRING_CB(prefix, type, name)

prefix :

type :

name :


prelude_plugin_get_name()

#define prelude_plugin_get_name(p) (p)->name

p :


prelude_plugin_set_name()

#define prelude_plugin_set_name(p, str) (p)->name = (str)

p :

str :


prelude_plugin_set_destroy_func()

#define prelude_plugin_set_destroy_func(p, func) (p)->destroy = func

p :

func :


prelude_plugin_entry_set_plugin ()

void                prelude_plugin_entry_set_plugin     (prelude_plugin_entry_t *pe,
                                                         prelude_plugin_generic_t *pl);

pe :

pl :


prelude_plugin_set_activation_option ()

int                 prelude_plugin_set_activation_option
                                                        (prelude_plugin_entry_t *pe,
                                                         prelude_option_t *opt,
                                                         int (commitprelude_plugin_instance_t *pi, prelude_string_t *err) ());

pe :

opt :

commit :

Returns :


prelude_plugin_instance_subscribe ()

int                 prelude_plugin_instance_subscribe   (prelude_plugin_instance_t *pi);

pi :

Returns :


prelude_plugin_instance_unsubscribe ()

int                 prelude_plugin_instance_unsubscribe (prelude_plugin_instance_t *pi);

Set pi to be inactive.

The unsubscribe function specified in plugin_load_from_dir() is called for plugin un-registration and the instance for this plugin is freed.

pi :

Pointer to a plugin instance.

Returns :

0 on success, -1 if an error occured.

prelude_plugin_new_instance ()

int                 prelude_plugin_new_instance         (prelude_plugin_instance_t **pi,
                                                         prelude_plugin_generic_t *plugin,
                                                         const char *name,
                                                         void *data);

pi :

plugin :

name :

data :

Returns :


prelude_plugin_search_by_name ()

prelude_plugin_generic_t * prelude_plugin_search_by_name
                                                        (prelude_list_t *head,
                                                         const char *name);

Search head list of plugin for a plugin with name name.

head :

List where to search the plugin from.

name :

Name of the plugin to search.

Returns :

the a prelude_plugin_t on success, or NULL if the plugin does not exist.

prelude_plugin_search_instance_by_name ()

prelude_plugin_instance_t * prelude_plugin_search_instance_by_name
                                                        (prelude_list_t *head,
                                                         const char *pname,
                                                         const char *iname);

head :

pname :

iname :

Returns :


prelude_plugin_instance_set_data ()

void                prelude_plugin_instance_set_data    (prelude_plugin_instance_t *pi,
                                                         void *data);

pi :

data :


prelude_plugin_instance_get_data ()

void *              prelude_plugin_instance_get_data    (prelude_plugin_instance_t *pi);

pi :

Returns :


prelude_plugin_instance_set_plugin_data ()

void                prelude_plugin_instance_set_plugin_data
                                                        (prelude_plugin_instance_t *pi,
                                                         void *data);

pi :

data :


prelude_plugin_instance_get_plugin_data ()

void *              prelude_plugin_instance_get_plugin_data
                                                        (prelude_plugin_instance_t *pi);

pi :

Returns :


prelude_plugin_instance_get_name ()

const char *        prelude_plugin_instance_get_name    (prelude_plugin_instance_t *pi);

pi :

Returns :


prelude_plugin_instance_get_plugin ()

prelude_plugin_generic_t * prelude_plugin_instance_get_plugin
                                                        (prelude_plugin_instance_t *pi);

pi :

Returns :


prelude_plugin_load_from_dir ()

int                 prelude_plugin_load_from_dir        (prelude_list_t *head,
                                                         const char *dirname,
                                                         const char *symbol,
                                                         void *ptr,
                                                         int (subscribeprelude_plugin_instance_t *p) (),
                                                         void (unsubscribeprelude_plugin_instance_t *pi) ());

Load all plugins in directory 'dirname', using symbol entry point. Each plugin have a subscribe and unsubscribe callback associated with it.

The plugins are loaded, but not active, until someone call prelude_plugin_subscribe() on one of the plugin. Which'll call subscribe in order to register it.

ptr is an extra argument provided to the plugin at initialization time.

head :

List where the loaded plugin should be added.

dirname :

The directory to load the plugin from.

symbol :

Symbol to lookup within loaded plugin.

ptr :

Extra pointer to provide to the plugin initialization function.

subscribe :

Pointer to a callback function for plugin subscribtion.

unsubscribe :

Pointer to a callback function for plugin un-subscribtion.

Returns :

The number of loaded plugins on success, -1 on error.

prelude_plugin_instance_add ()

int                 prelude_plugin_instance_add         (prelude_plugin_instance_t *pi,
                                                         prelude_list_t *h);

This function add the plugin instance associated with pi to the linked list specified by h. If this instance is already used somewhere else, a copy is made, since instance does not share information).

pi :

Pointer to a plugin instance

h :

Pointer to a linked list

Returns :

0 on success or -1 if an error occured.

prelude_plugin_instance_del ()

void                prelude_plugin_instance_del         (prelude_plugin_instance_t *pi);

Delete pi from the list specified at prelude_plugin_instance_add() time.

pi :

Pointer to a plugin instance.

prelude_plugin_instance_compute_time ()

void                prelude_plugin_instance_compute_time
                                                        (prelude_plugin_instance_t *pi,
                                                         struct timeval *start,
                                                         struct timeval *end);

pi :

start :

end :


prelude_plugin_instance_call_commit_func ()

int                 prelude_plugin_instance_call_commit_func
                                                        (prelude_plugin_instance_t *pi,
                                                         prelude_string_t *err);

pi :

err :

Returns :


prelude_plugin_instance_has_commit_func ()

prelude_bool_t      prelude_plugin_instance_has_commit_func
                                                        (prelude_plugin_instance_t *pi);

pi :

Returns :


prelude_plugin_set_preloaded_symbols ()

void                prelude_plugin_set_preloaded_symbols
                                                        (void *symlist);

symlist :


prelude_plugin_get_next ()

prelude_plugin_generic_t * prelude_plugin_get_next      (prelude_list_t *head,
                                                         prelude_list_t **iter);

head :

iter :

Returns :


prelude_plugin_unload ()

void                prelude_plugin_unload               (prelude_plugin_generic_t *plugin);

plugin :


prelude_plugin_compute_stats()

#define             prelude_plugin_compute_stats(pi, func)

pi :

func :


prelude_plugin_run()

#define             prelude_plugin_run(pi, type, member, ...)

pi :

type :

member :

... :

libprelude-1.0.0/docs/api/html/libprelude-prelude-ident.html0000664000076400007640000002202511347714757021034 00000000000000 prelude-ident

prelude-ident

prelude-ident

Description

Details

prelude_ident_t

typedef struct prelude_ident prelude_ident_t;


prelude_ident_inc ()

uint64_t            prelude_ident_inc                   (prelude_ident_t *ident);

Deprecated.

ident :

Pointer to a prelude_ident_t object.

Returns :

A new ident.

prelude_ident_generate ()

int                 prelude_ident_generate              (prelude_ident_t *ident,
                                                         prelude_string_t *out);

Generate an UUID and store it in out.

ident :

Pointer to a prelude_ident_t object.

out :

prelude_string_t where the ident will be generated.

Returns :

A negative value if an error occur.

prelude_ident_destroy ()

void                prelude_ident_destroy               (prelude_ident_t *ident);

Destroy a prelude_ident_t object.

ident :

Pointer to a prelude_ident_t object.

prelude_ident_new ()

int                 prelude_ident_new                   (prelude_ident_t **ret);

Create a new prelude_ident_t object with an unique value.

ret :

Pointer where to store the created object.

Returns :

0 on success, or a negative value if an error occured.
libprelude-1.0.0/docs/api/html/index.html0000664000076400007640000001701111347714757015254 00000000000000 Prelude library Reference Manual libprelude-1.0.0/docs/api/html/libprelude-prelude-msg.html0000664000076400007640000013541211347714757020524 00000000000000 prelude-msg

prelude-msg

prelude-msg — Prelude Messaging API

Synopsis

typedef             prelude_msg_t;
enum                prelude_msg_priority_t;
int                 prelude_msg_read                    (prelude_msg_t **msg,
                                                         prelude_io_t *pio);
int                 prelude_msg_forward                 (prelude_msg_t *msg,
                                                         prelude_io_t *dst,
                                                         prelude_io_t *src);
int                 prelude_msg_get                     (prelude_msg_t *msg,
                                                         uint8_t *tag,
                                                         uint32_t *len,
                                                         void **buf);
void                prelude_msg_recycle                 (prelude_msg_t *msg);
void                prelude_msg_mark_end                (prelude_msg_t *msg);
int                 prelude_msg_dynamic_new             (prelude_msg_t **ret,
                                                         int (flush_msg_cbprelude_msg_t **msg, void *data) (),
                                                         void *data);
int                 prelude_msg_new                     (prelude_msg_t **ret,
                                                         size_t msgcount,
                                                         size_t msglen,
                                                         uint8_t tag,
                                                         prelude_msg_priority_t priority);
int                 prelude_msg_set                     (prelude_msg_t *msg,
                                                         uint8_t tag,
                                                         uint32_t len,
                                                         const void *data);
int                 prelude_msg_write                   (prelude_msg_t *msg,
                                                         prelude_io_t *dst);
void                prelude_msg_set_tag                 (prelude_msg_t *msg,
                                                         uint8_t tag);
void                prelude_msg_set_priority            (prelude_msg_t *msg,
                                                         prelude_msg_priority_t priority);
uint8_t             prelude_msg_get_tag                 (prelude_msg_t *msg);
prelude_msg_priority_t  prelude_msg_get_priority        (prelude_msg_t *msg);
uint32_t            prelude_msg_get_len                 (prelude_msg_t *msg);
uint32_t            prelude_msg_get_datalen             (prelude_msg_t *msg);
void                prelude_msg_destroy                 (prelude_msg_t *msg);
struct timeval *    prelude_msg_get_time                (prelude_msg_t *msg,
                                                         struct timeval *tv);
int                 prelude_msg_is_empty                (prelude_msg_t *msg);
int                 prelude_msg_is_fragment             (prelude_msg_t *msg);
prelude_msg_t *     prelude_msg_ref                     (prelude_msg_t *msg);
void                prelude_msg_set_callback            (prelude_msg_t *msg,
                                                         int (flush_msg_cbprelude_msg_t **msg, void *data) ());
void                prelude_msg_set_data                (prelude_msg_t *msg,
                                                         void *data);
const unsigned char * prelude_msg_get_message_data      (prelude_msg_t *msg);

Description

This Mesaging API is used for differents Prelude program to communicate together. It feature compatibility between version, and use a way to describe data similar to XML.

The Message header contain the protocol version, which is only to be used in case the main protocol structure change (compatibility break), The tag describe the kind of message, The fragment field may be used if a message is sent in several time, The priority may be used by the receiving end to priorityze task, The datalen contain the size of the whole message in network byte order

   8bits    8bits   8bits     8bits                32bits
+--------+--------+--------+----------+------------------------------+
|version |   tag  |priority| fragment |            datalen           |
+--------+--------+--------+----------+------------------------------+

Then the message itself contain submessage composed of : A tag describing the kind of payload, the len of the payload (in network byte order), the payload itself, and an end of message byte (0xff) in order to resynchronize in case of problem.

  8bits              32bits                                   8bits
+--------+--------------------------------+-----------------+--------+
|  tag   |             len                |     payload     |  0xff  |
+--------+--------------------------------+-----------------+--------+

Details

prelude_msg_t

typedef struct prelude_msg prelude_msg_t;


enum prelude_msg_priority_t

typedef enum {
        PRELUDE_MSG_PRIORITY_NONE = 0,
        PRELUDE_MSG_PRIORITY_LOW  = 1,
        PRELUDE_MSG_PRIORITY_MID  = 2,
        PRELUDE_MSG_PRIORITY_HIGH = 3
} prelude_msg_priority_t;


prelude_msg_read ()

int                 prelude_msg_read                    (prelude_msg_t **msg,
                                                         prelude_io_t *pio);

Read a message on pio into msg. If msg is NULL, it is allocated. This function will never block.

msg :

Pointer on a prelude_msg_t object address.

pio :

Pointer on a prelude_io_t object.

Returns :

0 if reading the message is complete, or a prelude_error_t error if an error occured. Take particular attention to PRELUDE_ERROR_EAGAIN and PRELUDE_ERROR_EOF.

prelude_msg_forward ()

int                 prelude_msg_forward                 (prelude_msg_t *msg,
                                                         prelude_io_t *dst,
                                                         prelude_io_t *src);

prelude_msg_forward() read the message corresponding to the msg object containing the message header previously gathered using prelude_msg_read_header() from the src object, and transfer it to dst. The header is also transfered.

msg :

Pointer on a prelude_msg_t object containing a message header.

dst :

Pointer on a prelude_io_t object to send message to.

src :

Pointer on a prelude_io_t object to read message from.

Returns :

0 on success, or a negative value if an error occured.

prelude_msg_get ()

int                 prelude_msg_get                     (prelude_msg_t *msg,
                                                         uint8_t *tag,
                                                         uint32_t *len,
                                                         void **buf);

prelude_msg_get() read the next data chunk contained in the message. tag is updated to contain the kind of data the chunk contain. len is updated to contain the len of the data chunk. buf is updated to point on the data chunk.

msg :

Pointer on a prelude_msg_t object representing the message to get data from.

tag :

Pointer on a 8 bits unsigned integer to store the message tag.

len :

Pointer on a 32 bits unsigned integer to store the message len to.

buf :

Address of a pointer to store the buffer starting address.

Returns :

0 on success, or a prelude_error_t value on error.

prelude_msg_recycle ()

void                prelude_msg_recycle                 (prelude_msg_t *msg);

Recycle msg so you can write at it again, even thought it was written.

msg :

Pointer on prelude_msg_t object.

prelude_msg_mark_end ()

void                prelude_msg_mark_end                (prelude_msg_t *msg);

Mark end of message in the msg buffer, so you can continue adding different message in the same buffer.

msg :

Pointer on prelude_msg_t object.

prelude_msg_dynamic_new ()

int                 prelude_msg_dynamic_new             (prelude_msg_t **ret,
                                                         int (flush_msg_cbprelude_msg_t **msg, void *data) (),
                                                         void *data);

Allocate a new prelude_msg_t object. prelude_msg_set() can then be used to add chunk of data to the message, and prelude_msg_mark_start() to separate different message in the same buffer.

This function use memory chunk of static size to store the message in. If the size of the data you want to store is bigger than the actual chunk size, flush_msg_cb callback will be called for the current message to be flushed, and the returned message will be used in order to store remaining data.

ret :

Pointer where to store the create prelude_msg_t.

flush_msg_cb :

Callback function to call when the buffer need to be flushed.

data :

Data to pass to the flush_msg_cb callback function.

Returns :

0 on success, a negative value if an error occured.

prelude_msg_new ()

int                 prelude_msg_new                     (prelude_msg_t **ret,
                                                         size_t msgcount,
                                                         size_t msglen,
                                                         uint8_t tag,
                                                         prelude_msg_priority_t priority);

Allocate a new prelude_msg_t object and store it into ret. prelude_msg_set() can then be used to add chunk of data to the message, and prelude_msg_write() to send it.

ret :

Pointer where to store the created prelude_msg_t.

msgcount :

Number of chunk of data the created object can accept.

msglen :

Maximum number of bytes the object should handle for all the chunks.

tag :

A tag identifying the kind of message.

priority :

The priority of this message.

Returns :

0 on success, a negative value if an error occured.

prelude_msg_set ()

int                 prelude_msg_set                     (prelude_msg_t *msg,
                                                         uint8_t tag,
                                                         uint32_t len,
                                                         const void *data);

prelude_msg_set() append len bytes of data from the data buffer to the msg object representing a message. The data is tagged with tag.

msg :

Pointer on a prelude_msg_t object to store the data to.

tag :

8 bits unsigned integer describing the kind of data.

len :

len of the data chunk.

data :

Pointer to the starting address of the data.

Returns :

0 on success, or a negative value if the remaining space is not available. You might check the return value mostly if using a dynamic message through prelude_msg_dynamic_new()

prelude_msg_write ()

int                 prelude_msg_write                   (prelude_msg_t *msg,
                                                         prelude_io_t *dst);

prelude_msg_write() write the message corresponding to the msg object to dst. The message should have been created using the prelude_msg_new() and prelude_msg_set() functions.

msg :

Pointer on a prelude_msg_t object containing the message.

dst :

Pointer on a prelude_io_t object to send the message to.

Returns :

0 on success, or a negative value if an error occured.

prelude_msg_set_tag ()

void                prelude_msg_set_tag                 (prelude_msg_t *msg,
                                                         uint8_t tag);

Tag msg.

msg :

Pointer on a prelude_msg_t object.

tag :

Tag to associate with msg.

prelude_msg_set_priority ()

void                prelude_msg_set_priority            (prelude_msg_t *msg,
                                                         prelude_msg_priority_t priority);

Associate priority with msg.

msg :

Pointer on a prelude_msg_t object.

priority :

Priority to associate with msg.

prelude_msg_get_tag ()

uint8_t             prelude_msg_get_tag                 (prelude_msg_t *msg);

prelude_msg_get_tag() return the tag contained in the msg header.

msg :

Pointer on a prelude_msg_t object.

Returns :

A tag.

prelude_msg_get_priority ()

prelude_msg_priority_t  prelude_msg_get_priority        (prelude_msg_t *msg);

prelude_msg_get_priority() return the priority contained in the msg header.

msg :

Pointer on a prelude_msg_t object.

Returns :

A priority.

prelude_msg_get_len ()

uint32_t            prelude_msg_get_len                 (prelude_msg_t *msg);

prelude_msg_get_len() return the currently used len for the msg message.

msg :

Pointer on a prelude_msg_t object.

Returns :

Len of the message.

prelude_msg_get_datalen ()

uint32_t            prelude_msg_get_datalen             (prelude_msg_t *msg);

prelude_msg_get_datalen() return the len of the whole message contained in the msg header.

msg :

Pointer on a prelude_msg_t object.

Returns :

Len of the message.

prelude_msg_destroy ()

void                prelude_msg_destroy                 (prelude_msg_t *msg);

prelude_msg_destroy() destroy the prelude_msg_t object pointed to by msg. All the ressources for this message are freed.

msg :

Pointer on a prelude_msg_t object.

prelude_msg_get_time ()

struct timeval *    prelude_msg_get_time                (prelude_msg_t *msg,
                                                         struct timeval *tv);

msg :

tv :

Returns :


prelude_msg_is_empty ()

int                 prelude_msg_is_empty                (prelude_msg_t *msg);

msg :

Pointer on a prelude_msg_t object.

Returns :

true if msg doesn't contain any data to send.

prelude_msg_is_fragment ()

int                 prelude_msg_is_fragment             (prelude_msg_t *msg);

msg :

Pointer on a prelude_msg_t object.

Returns :

true if msg only contain a fragment of message.

prelude_msg_ref ()

prelude_msg_t *     prelude_msg_ref                     (prelude_msg_t *msg);

msg :

Returns :


prelude_msg_set_callback ()

void                prelude_msg_set_callback            (prelude_msg_t *msg,
                                                         int (flush_msg_cbprelude_msg_t **msg, void *data) ());

prelude_msg_set_callback() allow to change the callback used to flush a message created with prelude_msg_dynamic_new().

msg :

Pointer on a prelude_msg_t object.

flush_msg_cb :

Pointer on a function responssible of sending the message.

prelude_msg_set_data ()

void                prelude_msg_set_data                (prelude_msg_t *msg,
                                                         void *data);

prelude_msg_set_data() allow to change the data passed to the message sending callback.

msg :

Pointer on a prelude_msg_t object.

data :

Pointer on the data to associate to this message.

prelude_msg_get_message_data ()

const unsigned char * prelude_msg_get_message_data      (prelude_msg_t *msg);

msg :

Returns :

See Also

prelude-msgbuf

libprelude-1.0.0/docs/api/html/up.png0000644000076400007640000000062611347714756014412 00000000000000PNG  IHDRw=bKGD pHYs  ~tIME2.E#IDATx=J@Fo] !+2[Z<@/9|t$D9nnBjBRIsI:H8UPN1fcsN95M㧖ɵ 束1~pEe$I 7nrDf!;`'ykI䲤sI_]y^^I>O>?YBIENDB`libprelude-1.0.0/docs/api/html/right.png0000644000076400007640000000073011347714756015077 00000000000000PNG  IHDRw=bKGD pHYs  ~tIME2 I%=eIDATx!o@.'**M0$$?1~vIeEuLl&4䝠Bݛ|>$ݶoc The high level IDMEF API

The high level IDMEF API

idmef-path — The High level IDMEF API.
idmef-value
libprelude-1.0.0/docs/api/html/left.png0000644000076400007640000000071311347714756014715 00000000000000PNG  IHDRw=bKGD pHYs  ~tIME1&[(XIDATx!OPE*ID%~ꊯ"p'ŏ`sܖrKf hmiIz}ܯI.p\`x l?l[,Hk<#c%\AUx[S7n6rzEs1j@NL$ݤi0 5/}\EKIo͓$a0jdFbkIAh>WlC'?tk;|/t*INZ^`y4Nr]׮ J<ڐt`X1@p䀸dZ')hK $V?%]+LsgUK"w53OIENDB`libprelude-1.0.0/docs/api/html/libprelude-prelude-list.html0000664000076400007640000004502711347714757020713 00000000000000 prelude-list

prelude-list

prelude-list

Synopsis

#define             PRELUDE_LIST                        (item)
                    prelude_list_t;
#define             prelude_list_entry                  (item, type, member)
#define             prelude_list_for_each               (list, pos)
#define             prelude_list_for_each_safe          (list, pos, bkp)
#define             prelude_list_for_each_reversed      (list, pos)
#define             prelude_list_for_each_reversed_safe (list, pos, bkp)
#define             prelude_list_for_each_continue      (list, pos)
#define             prelude_list_for_each_continue_safe (list, pos, bkp)
#define             prelude_list_get_next               (list, pos, class, member)
#define             prelude_list_get_next_safe          (list, pos, bkp, class, member)

Description

Details

PRELUDE_LIST()

#define PRELUDE_LIST(item) prelude_list_t (item) = { &(item), &(item) }

item :


prelude_list_t

typedef struct {
        struct prelude_list *next;
        struct prelude_list *prev;
} prelude_list_t;


prelude_list_entry()

#define             prelude_list_entry(item, type, member)

Retrieve the entry of type type from the prelude_list_t object tmp, using the item list member member. Returns the entry associated with item.

item :

Pointer to a prelude_list_t object to retrieve the entry from.

type :

Type of the entry to retrieve.

member :

List member in type used to link it to a list.

prelude_list_for_each()

#define             prelude_list_for_each(list, pos)

Iterate through all list entry. prelude_list_entry() can be used to retrieve and entry from the pos pointer. It is not safe to call prelude_list_del() while iterating using this function, see prelude_list_for_each_safe().

list :

Pointer to a prelude_list_t list.

pos :

Pointer to a prelude_list_t object pointing to the current list member.

prelude_list_for_each_safe()

#define             prelude_list_for_each_safe(list, pos, bkp)

Iterate through all list entry. prelude_list_entry() can be used to retrieve and entry from the pos pointer. Calling prelude_list_del() while iterating the list is safe.

list :

Pointer to a prelude_list_t list.

pos :

Pointer to a prelude_list_t object pointing to the current list member.

bkp :

Pointer to a prelude_list_t object pointing to the next list member.

prelude_list_for_each_reversed()

#define             prelude_list_for_each_reversed(list, pos)

Iterate through all list entry in reverse order. prelude_list_entry() can be used to retrieve and entry from the pos pointer. It is not safe to call prelude_list_del() while iterating using this function, see prelude_list_for_each_reversed_safe().

list :

Pointer to a prelude_list_t list.

pos :

Pointer to a prelude_list_t object pointing to the current list member.

prelude_list_for_each_reversed_safe()

#define             prelude_list_for_each_reversed_safe(list, pos, bkp)

Iterate through all list entry in reverse order. prelude_list_entry() can be used to retrieve and entry from the pos pointer. Calling prelude_list_del() while iterating the list is safe.

list :

Pointer to a prelude_list_t list.

pos :

Pointer to a prelude_list_t object pointing to the current list member.

bkp :

Pointer to a prelude_list_t object pointing to the next list member.

prelude_list_for_each_continue()

#define             prelude_list_for_each_continue(list, pos)

Iterate through all list entry starting from pos if it is not NULL, or from the start of list if it is. prelude_list_entry() can be used to retrieve and entry from the pos pointer. Calling prelude_list_del() while iterating the list is not safe.

list :

Pointer to a prelude_list_t list.

pos :

Pointer to a prelude_list_t object pointing to the current list member.

prelude_list_for_each_continue_safe()

#define             prelude_list_for_each_continue_safe(list, pos, bkp)

Iterate through all list entry starting from pos if it is not NULL, or from the start of list if it is. prelude_list_entry() can be used to retrieve and entry from the pos pointer. Calling prelude_list_del() while iterating the list is safe.

list :

Pointer to a prelude_list_t list.

pos :

Pointer to a prelude_list_t object pointing to the current list member.

bkp :

Pointer to a prelude_list_t object pointing to the next list member.

prelude_list_get_next()

#define             prelude_list_get_next(list, pos, class, member)

list :

pos :

class :

member :


prelude_list_get_next_safe()

#define             prelude_list_get_next_safe(list, pos, bkp, class, member)

list :

pos :

bkp :

class :

member :

libprelude-1.0.0/docs/api/html/index.sgml0000664000076400007640000062306311347714756015263 00000000000000 libprelude-1.0.0/docs/api/html/libprelude-idmef-message-print.html0000664000076400007640000015740411347714757022145 00000000000000 idmef-message-print

idmef-message-print

idmef-message-print — Dumping an IDMEF message as a string

Synopsis

void                idmef_additional_data_print         (idmef_additional_data_t *ptr,
                                                         prelude_io_t *fd);
void                idmef_reference_print               (idmef_reference_t *ptr,
                                                         prelude_io_t *fd);
void                idmef_classification_print          (idmef_classification_t *ptr,
                                                         prelude_io_t *fd);
void                idmef_user_id_print                 (idmef_user_id_t *ptr,
                                                         prelude_io_t *fd);
void                idmef_user_print                    (idmef_user_t *ptr,
                                                         prelude_io_t *fd);
void                idmef_address_print                 (idmef_address_t *ptr,
                                                         prelude_io_t *fd);
void                idmef_process_print                 (idmef_process_t *ptr,
                                                         prelude_io_t *fd);
void                idmef_web_service_print             (idmef_web_service_t *ptr,
                                                         prelude_io_t *fd);
void                idmef_snmp_service_print            (idmef_snmp_service_t *ptr,
                                                         prelude_io_t *fd);
void                idmef_service_print                 (idmef_service_t *ptr,
                                                         prelude_io_t *fd);
void                idmef_node_print                    (idmef_node_t *ptr,
                                                         prelude_io_t *fd);
void                idmef_source_print                  (idmef_source_t *ptr,
                                                         prelude_io_t *fd);
void                idmef_file_access_print             (idmef_file_access_t *ptr,
                                                         prelude_io_t *fd);
void                idmef_inode_print                   (idmef_inode_t *ptr,
                                                         prelude_io_t *fd);
void                idmef_checksum_print                (idmef_checksum_t *ptr,
                                                         prelude_io_t *fd);
void                idmef_file_print                    (idmef_file_t *ptr,
                                                         prelude_io_t *fd);
void                idmef_linkage_print                 (idmef_linkage_t *ptr,
                                                         prelude_io_t *fd);
void                idmef_target_print                  (idmef_target_t *ptr,
                                                         prelude_io_t *fd);
void                idmef_analyzer_print                (idmef_analyzer_t *ptr,
                                                         prelude_io_t *fd);
void                idmef_alertident_print              (idmef_alertident_t *ptr,
                                                         prelude_io_t *fd);
void                idmef_impact_print                  (idmef_impact_t *ptr,
                                                         prelude_io_t *fd);
void                idmef_action_print                  (idmef_action_t *ptr,
                                                         prelude_io_t *fd);
void                idmef_confidence_print              (idmef_confidence_t *ptr,
                                                         prelude_io_t *fd);
void                idmef_assessment_print              (idmef_assessment_t *ptr,
                                                         prelude_io_t *fd);
void                idmef_tool_alert_print              (idmef_tool_alert_t *ptr,
                                                         prelude_io_t *fd);
void                idmef_correlation_alert_print       (idmef_correlation_alert_t *ptr,
                                                         prelude_io_t *fd);
void                idmef_overflow_alert_print          (idmef_overflow_alert_t *ptr,
                                                         prelude_io_t *fd);
void                idmef_alert_print                   (idmef_alert_t *ptr,
                                                         prelude_io_t *fd);
void                idmef_heartbeat_print               (idmef_heartbeat_t *ptr,
                                                         prelude_io_t *fd);
void                idmef_message_print                 (idmef_message_t *ptr,
                                                         prelude_io_t *fd);

Description

This API provide method for dumping any IDMEF object as a string of characters. When dumping an object, the object and all of it's children are dumped to the provided prelude_io_t object.

The prelude_io_t object might be a buffer, a file, or even a socket. Check the prelude_io_t API for more information.

Details

idmef_additional_data_print ()

void                idmef_additional_data_print         (idmef_additional_data_t *ptr,
                                                         prelude_io_t *fd);

This function will convert ptr to a string suitable for writing, and write it to the provided fd descriptor.

ptr :

Pointer to an idmef_additional_data_t object.

fd :

Pointer to a prelude_io_t object where to print ptr to.

idmef_reference_print ()

void                idmef_reference_print               (idmef_reference_t *ptr,
                                                         prelude_io_t *fd);

This function will convert ptr to a string suitable for writing, and write it to the provided fd descriptor.

ptr :

Pointer to an idmef_reference_t object.

fd :

Pointer to a prelude_io_t object where to print ptr to.

idmef_classification_print ()

void                idmef_classification_print          (idmef_classification_t *ptr,
                                                         prelude_io_t *fd);

This function will convert ptr to a string suitable for writing, and write it to the provided fd descriptor.

ptr :

Pointer to an idmef_classification_t object.

fd :

Pointer to a prelude_io_t object where to print ptr to.

idmef_user_id_print ()

void                idmef_user_id_print                 (idmef_user_id_t *ptr,
                                                         prelude_io_t *fd);

This function will convert ptr to a string suitable for writing, and write it to the provided fd descriptor.

ptr :

Pointer to an idmef_user_id_t object.

fd :

Pointer to a prelude_io_t object where to print ptr to.

idmef_user_print ()

void                idmef_user_print                    (idmef_user_t *ptr,
                                                         prelude_io_t *fd);

This function will convert ptr to a string suitable for writing, and write it to the provided fd descriptor.

ptr :

Pointer to an idmef_user_t object.

fd :

Pointer to a prelude_io_t object where to print ptr to.

idmef_address_print ()

void                idmef_address_print                 (idmef_address_t *ptr,
                                                         prelude_io_t *fd);

This function will convert ptr to a string suitable for writing, and write it to the provided fd descriptor.

ptr :

Pointer to an idmef_address_t object.

fd :

Pointer to a prelude_io_t object where to print ptr to.

idmef_process_print ()

void                idmef_process_print                 (idmef_process_t *ptr,
                                                         prelude_io_t *fd);

This function will convert ptr to a string suitable for writing, and write it to the provided fd descriptor.

ptr :

Pointer to an idmef_process_t object.

fd :

Pointer to a prelude_io_t object where to print ptr to.

idmef_web_service_print ()

void                idmef_web_service_print             (idmef_web_service_t *ptr,
                                                         prelude_io_t *fd);

This function will convert ptr to a string suitable for writing, and write it to the provided fd descriptor.

ptr :

Pointer to an idmef_web_service_t object.

fd :

Pointer to a prelude_io_t object where to print ptr to.

idmef_snmp_service_print ()

void                idmef_snmp_service_print            (idmef_snmp_service_t *ptr,
                                                         prelude_io_t *fd);

This function will convert ptr to a string suitable for writing, and write it to the provided fd descriptor.

ptr :

Pointer to an idmef_snmp_service_t object.

fd :

Pointer to a prelude_io_t object where to print ptr to.

idmef_service_print ()

void                idmef_service_print                 (idmef_service_t *ptr,
                                                         prelude_io_t *fd);

This function will convert ptr to a string suitable for writing, and write it to the provided fd descriptor.

ptr :

Pointer to an idmef_service_t object.

fd :

Pointer to a prelude_io_t object where to print ptr to.

idmef_node_print ()

void                idmef_node_print                    (idmef_node_t *ptr,
                                                         prelude_io_t *fd);

This function will convert ptr to a string suitable for writing, and write it to the provided fd descriptor.

ptr :

Pointer to an idmef_node_t object.

fd :

Pointer to a prelude_io_t object where to print ptr to.

idmef_source_print ()

void                idmef_source_print                  (idmef_source_t *ptr,
                                                         prelude_io_t *fd);

This function will convert ptr to a string suitable for writing, and write it to the provided fd descriptor.

ptr :

Pointer to an idmef_source_t object.

fd :

Pointer to a prelude_io_t object where to print ptr to.

idmef_file_access_print ()

void                idmef_file_access_print             (idmef_file_access_t *ptr,
                                                         prelude_io_t *fd);

This function will convert ptr to a string suitable for writing, and write it to the provided fd descriptor.

ptr :

Pointer to an idmef_file_access_t object.

fd :

Pointer to a prelude_io_t object where to print ptr to.

idmef_inode_print ()

void                idmef_inode_print                   (idmef_inode_t *ptr,
                                                         prelude_io_t *fd);

This function will convert ptr to a string suitable for writing, and write it to the provided fd descriptor.

ptr :

Pointer to an idmef_inode_t object.

fd :

Pointer to a prelude_io_t object where to print ptr to.

idmef_checksum_print ()

void                idmef_checksum_print                (idmef_checksum_t *ptr,
                                                         prelude_io_t *fd);

This function will convert ptr to a string suitable for writing, and write it to the provided fd descriptor.

ptr :

Pointer to an idmef_checksum_t object.

fd :

Pointer to a prelude_io_t object where to print ptr to.

idmef_file_print ()

void                idmef_file_print                    (idmef_file_t *ptr,
                                                         prelude_io_t *fd);

This function will convert ptr to a string suitable for writing, and write it to the provided fd descriptor.

ptr :

Pointer to an idmef_file_t object.

fd :

Pointer to a prelude_io_t object where to print ptr to.

idmef_linkage_print ()

void                idmef_linkage_print                 (idmef_linkage_t *ptr,
                                                         prelude_io_t *fd);

This function will convert ptr to a string suitable for writing, and write it to the provided fd descriptor.

ptr :

Pointer to an idmef_linkage_t object.

fd :

Pointer to a prelude_io_t object where to print ptr to.

idmef_target_print ()

void                idmef_target_print                  (idmef_target_t *ptr,
                                                         prelude_io_t *fd);

This function will convert ptr to a string suitable for writing, and write it to the provided fd descriptor.

ptr :

Pointer to an idmef_target_t object.

fd :

Pointer to a prelude_io_t object where to print ptr to.

idmef_analyzer_print ()

void                idmef_analyzer_print                (idmef_analyzer_t *ptr,
                                                         prelude_io_t *fd);

This function will convert ptr to a string suitable for writing, and write it to the provided fd descriptor.

ptr :

Pointer to an idmef_analyzer_t object.

fd :

Pointer to a prelude_io_t object where to print ptr to.

idmef_alertident_print ()

void                idmef_alertident_print              (idmef_alertident_t *ptr,
                                                         prelude_io_t *fd);

This function will convert ptr to a string suitable for writing, and write it to the provided fd descriptor.

ptr :

Pointer to an idmef_alertident_t object.

fd :

Pointer to a prelude_io_t object where to print ptr to.

idmef_impact_print ()

void                idmef_impact_print                  (idmef_impact_t *ptr,
                                                         prelude_io_t *fd);

This function will convert ptr to a string suitable for writing, and write it to the provided fd descriptor.

ptr :

Pointer to an idmef_impact_t object.

fd :

Pointer to a prelude_io_t object where to print ptr to.

idmef_action_print ()

void                idmef_action_print                  (idmef_action_t *ptr,
                                                         prelude_io_t *fd);

This function will convert ptr to a string suitable for writing, and write it to the provided fd descriptor.

ptr :

Pointer to an idmef_action_t object.

fd :

Pointer to a prelude_io_t object where to print ptr to.

idmef_confidence_print ()

void                idmef_confidence_print              (idmef_confidence_t *ptr,
                                                         prelude_io_t *fd);

This function will convert ptr to a string suitable for writing, and write it to the provided fd descriptor.

ptr :

Pointer to an idmef_confidence_t object.

fd :

Pointer to a prelude_io_t object where to print ptr to.

idmef_assessment_print ()

void                idmef_assessment_print              (idmef_assessment_t *ptr,
                                                         prelude_io_t *fd);

This function will convert ptr to a string suitable for writing, and write it to the provided fd descriptor.

ptr :

Pointer to an idmef_assessment_t object.

fd :

Pointer to a prelude_io_t object where to print ptr to.

idmef_tool_alert_print ()

void                idmef_tool_alert_print              (idmef_tool_alert_t *ptr,
                                                         prelude_io_t *fd);

This function will convert ptr to a string suitable for writing, and write it to the provided fd descriptor.

ptr :

Pointer to an idmef_tool_alert_t object.

fd :

Pointer to a prelude_io_t object where to print ptr to.

idmef_correlation_alert_print ()

void                idmef_correlation_alert_print       (idmef_correlation_alert_t *ptr,
                                                         prelude_io_t *fd);

This function will convert ptr to a string suitable for writing, and write it to the provided fd descriptor.

ptr :

Pointer to an idmef_correlation_alert_t object.

fd :

Pointer to a prelude_io_t object where to print ptr to.

idmef_overflow_alert_print ()

void                idmef_overflow_alert_print          (idmef_overflow_alert_t *ptr,
                                                         prelude_io_t *fd);

This function will convert ptr to a string suitable for writing, and write it to the provided fd descriptor.

ptr :

Pointer to an idmef_overflow_alert_t object.

fd :

Pointer to a prelude_io_t object where to print ptr to.

idmef_alert_print ()

void                idmef_alert_print                   (idmef_alert_t *ptr,
                                                         prelude_io_t *fd);

This function will convert ptr to a string suitable for writing, and write it to the provided fd descriptor.

ptr :

Pointer to an idmef_alert_t object.

fd :

Pointer to a prelude_io_t object where to print ptr to.

idmef_heartbeat_print ()

void                idmef_heartbeat_print               (idmef_heartbeat_t *ptr,
                                                         prelude_io_t *fd);

This function will convert ptr to a string suitable for writing, and write it to the provided fd descriptor.

ptr :

Pointer to an idmef_heartbeat_t object.

fd :

Pointer to a prelude_io_t object where to print ptr to.

idmef_message_print ()

void                idmef_message_print                 (idmef_message_t *ptr,
                                                         prelude_io_t *fd);

This function will convert ptr to a string suitable for writing, and write it to the provided fd descriptor.

ptr :

Pointer to an idmef_message_t object.

fd :

Pointer to a prelude_io_t object where to print ptr to.

See Also

prelude_io_t

libprelude-1.0.0/docs/api/html/libprelude-idmef-tree-wrap.html0000664000076400007640000531153411347714757021276 00000000000000 idmef-tree-wrap

idmef-tree-wrap

idmef-tree-wrap — Generating events using the low level IDMEF API

Synopsis

#define             IDMEF_LIST_APPEND
#define             IDMEF_LIST_PREPEND
int                 idmef_message_get_data              (idmef_message_t *message,
                                                         const char *path,
                                                         unsigned char **data,
                                                         size_t *size);
int                 idmef_message_get_number            (idmef_message_t *message,
                                                         const char *path,
                                                         double *result);
int                 idmef_message_get_string            (idmef_message_t *message,
                                                         const char *path,
                                                         char **result);
int                 idmef_message_get_value             (idmef_message_t *message,
                                                         const char *path,
                                                         idmef_value_t **value);
int                 idmef_message_set_data              (idmef_message_t *message,
                                                         const char *path,
                                                         unsigned char *data,
                                                         size_t size);
int                 idmef_message_set_number            (idmef_message_t *message,
                                                         const char *path,
                                                         double number);
int                 idmef_message_set_string            (idmef_message_t *message,
                                                         const char *path,
                                                         const char *value);
int                 idmef_message_set_value             (idmef_message_t *message,
                                                         const char *path,
                                                         idmef_value_t *value);
enum                idmef_additional_data_type_t;
idmef_additional_data_type_t  idmef_additional_data_type_to_numeric
                                                        (const char *name);
const char *        idmef_additional_data_type_to_string
                                                        (idmef_additional_data_type_t val);
typedef             idmef_additional_data_t;
int                 idmef_additional_data_new           (idmef_additional_data_t **ret);
int                 idmef_additional_data_copy          (const idmef_additional_data_t *src,
                                                         idmef_additional_data_t *dst);
int                 idmef_additional_data_clone         (idmef_additional_data_t *src,
                                                         idmef_additional_data_t **dst);
idmef_additional_data_t * idmef_additional_data_ref     (idmef_additional_data_t *additional_data);
void                idmef_additional_data_destroy       (idmef_additional_data_t *ptr);
idmef_additional_data_type_t  idmef_additional_data_get_type
                                                        (idmef_additional_data_t *ptr);
void                idmef_additional_data_set_type      (idmef_additional_data_t *ptr,
                                                         idmef_additional_data_type_t type);
int                 idmef_additional_data_new_type      (idmef_additional_data_t *ptr,
                                                         idmef_additional_data_type_t **ret);
prelude_string_t *  idmef_additional_data_get_meaning   (idmef_additional_data_t *ptr);
void                idmef_additional_data_set_meaning   (idmef_additional_data_t *ptr,
                                                         prelude_string_t *meaning);
int                 idmef_additional_data_new_meaning   (idmef_additional_data_t *ptr,
                                                         prelude_string_t **ret);
idmef_data_t *      idmef_additional_data_get_data      (idmef_additional_data_t *ptr);
void                idmef_additional_data_set_data      (idmef_additional_data_t *ptr,
                                                         idmef_data_t *data);
int                 idmef_additional_data_new_data      (idmef_additional_data_t *ptr,
                                                         idmef_data_t **ret);
enum                idmef_reference_origin_t;
idmef_reference_origin_t  idmef_reference_origin_to_numeric
                                                        (const char *name);
const char *        idmef_reference_origin_to_string    (idmef_reference_origin_t val);
typedef             idmef_reference_t;
int                 idmef_reference_new                 (idmef_reference_t **ret);
int                 idmef_reference_copy                (const idmef_reference_t *src,
                                                         idmef_reference_t *dst);
int                 idmef_reference_clone               (idmef_reference_t *src,
                                                         idmef_reference_t **dst);
idmef_reference_t * idmef_reference_ref                 (idmef_reference_t *reference);
void                idmef_reference_destroy             (idmef_reference_t *ptr);
idmef_reference_origin_t  idmef_reference_get_origin    (idmef_reference_t *ptr);
void                idmef_reference_set_origin          (idmef_reference_t *ptr,
                                                         idmef_reference_origin_t origin);
int                 idmef_reference_new_origin          (idmef_reference_t *ptr,
                                                         idmef_reference_origin_t **ret);
prelude_string_t *  idmef_reference_get_name            (idmef_reference_t *ptr);
void                idmef_reference_set_name            (idmef_reference_t *ptr,
                                                         prelude_string_t *name);
int                 idmef_reference_new_name            (idmef_reference_t *ptr,
                                                         prelude_string_t **ret);
prelude_string_t *  idmef_reference_get_url             (idmef_reference_t *ptr);
void                idmef_reference_set_url             (idmef_reference_t *ptr,
                                                         prelude_string_t *url);
int                 idmef_reference_new_url             (idmef_reference_t *ptr,
                                                         prelude_string_t **ret);
prelude_string_t *  idmef_reference_get_meaning         (idmef_reference_t *ptr);
void                idmef_reference_set_meaning         (idmef_reference_t *ptr,
                                                         prelude_string_t *meaning);
int                 idmef_reference_new_meaning         (idmef_reference_t *ptr,
                                                         prelude_string_t **ret);
typedef             idmef_classification_t;
int                 idmef_classification_new            (idmef_classification_t **ret);
int                 idmef_classification_copy           (const idmef_classification_t *src,
                                                         idmef_classification_t *dst);
int                 idmef_classification_clone          (idmef_classification_t *src,
                                                         idmef_classification_t **dst);
idmef_classification_t * idmef_classification_ref       (idmef_classification_t *classification);
void                idmef_classification_destroy        (idmef_classification_t *ptr);
prelude_string_t *  idmef_classification_get_ident      (idmef_classification_t *ptr);
void                idmef_classification_set_ident      (idmef_classification_t *ptr,
                                                         prelude_string_t *ident);
int                 idmef_classification_new_ident      (idmef_classification_t *ptr,
                                                         prelude_string_t **ret);
prelude_string_t *  idmef_classification_get_text       (idmef_classification_t *ptr);
void                idmef_classification_set_text       (idmef_classification_t *ptr,
                                                         prelude_string_t *text);
int                 idmef_classification_new_text       (idmef_classification_t *ptr,
                                                         prelude_string_t **ret);
idmef_reference_t * idmef_classification_get_next_reference
                                                        (idmef_classification_t *classification,
                                                         idmef_reference_t *reference_cur);
void                idmef_classification_set_reference  (idmef_classification_t *ptr,
                                                         idmef_reference_t *object,
                                                         int pos);
int                 idmef_classification_new_reference  (idmef_classification_t *ptr,
                                                         idmef_reference_t **ret,
                                                         int pos);
enum                idmef_user_id_type_t;
idmef_user_id_type_t  idmef_user_id_type_to_numeric     (const char *name);
const char *        idmef_user_id_type_to_string        (idmef_user_id_type_t val);
typedef             idmef_user_id_t;
int                 idmef_user_id_new                   (idmef_user_id_t **ret);
int                 idmef_user_id_copy                  (const idmef_user_id_t *src,
                                                         idmef_user_id_t *dst);
int                 idmef_user_id_clone                 (idmef_user_id_t *src,
                                                         idmef_user_id_t **dst);
idmef_user_id_t *   idmef_user_id_ref                   (idmef_user_id_t *user_id);
void                idmef_user_id_destroy               (idmef_user_id_t *ptr);
prelude_string_t *  idmef_user_id_get_ident             (idmef_user_id_t *ptr);
void                idmef_user_id_set_ident             (idmef_user_id_t *ptr,
                                                         prelude_string_t *ident);
int                 idmef_user_id_new_ident             (idmef_user_id_t *ptr,
                                                         prelude_string_t **ret);
idmef_user_id_type_t  idmef_user_id_get_type            (idmef_user_id_t *ptr);
void                idmef_user_id_set_type              (idmef_user_id_t *ptr,
                                                         idmef_user_id_type_t type);
int                 idmef_user_id_new_type              (idmef_user_id_t *ptr,
                                                         idmef_user_id_type_t **ret);
prelude_string_t *  idmef_user_id_get_tty               (idmef_user_id_t *ptr);
void                idmef_user_id_set_tty               (idmef_user_id_t *ptr,
                                                         prelude_string_t *tty);
int                 idmef_user_id_new_tty               (idmef_user_id_t *ptr,
                                                         prelude_string_t **ret);
prelude_string_t *  idmef_user_id_get_name              (idmef_user_id_t *ptr);
void                idmef_user_id_set_name              (idmef_user_id_t *ptr,
                                                         prelude_string_t *name);
int                 idmef_user_id_new_name              (idmef_user_id_t *ptr,
                                                         prelude_string_t **ret);
void                idmef_user_id_unset_number          (idmef_user_id_t *ptr);
uint32_t *          idmef_user_id_get_number            (idmef_user_id_t *ptr);
void                idmef_user_id_set_number            (idmef_user_id_t *ptr,
                                                         uint32_t number);
int                 idmef_user_id_new_number            (idmef_user_id_t *ptr,
                                                         uint32_t **ret);
enum                idmef_user_category_t;
idmef_user_category_t  idmef_user_category_to_numeric   (const char *name);
const char *        idmef_user_category_to_string       (idmef_user_category_t val);
typedef             idmef_user_t;
int                 idmef_user_new                      (idmef_user_t **ret);
int                 idmef_user_copy                     (const idmef_user_t *src,
                                                         idmef_user_t *dst);
int                 idmef_user_clone                    (idmef_user_t *src,
                                                         idmef_user_t **dst);
idmef_user_t *      idmef_user_ref                      (idmef_user_t *user);
void                idmef_user_destroy                  (idmef_user_t *ptr);
prelude_string_t *  idmef_user_get_ident                (idmef_user_t *ptr);
void                idmef_user_set_ident                (idmef_user_t *ptr,
                                                         prelude_string_t *ident);
int                 idmef_user_new_ident                (idmef_user_t *ptr,
                                                         prelude_string_t **ret);
idmef_user_category_t  idmef_user_get_category          (idmef_user_t *ptr);
void                idmef_user_set_category             (idmef_user_t *ptr,
                                                         idmef_user_category_t category);
int                 idmef_user_new_category             (idmef_user_t *ptr,
                                                         idmef_user_category_t **ret);
idmef_user_id_t *   idmef_user_get_next_user_id         (idmef_user_t *user,
                                                         idmef_user_id_t *user_id_cur);
void                idmef_user_set_user_id              (idmef_user_t *ptr,
                                                         idmef_user_id_t *object,
                                                         int pos);
int                 idmef_user_new_user_id              (idmef_user_t *ptr,
                                                         idmef_user_id_t **ret,
                                                         int pos);
enum                idmef_address_category_t;
idmef_address_category_t  idmef_address_category_to_numeric
                                                        (const char *name);
const char *        idmef_address_category_to_string    (idmef_address_category_t val);
typedef             idmef_address_t;
int                 idmef_address_new                   (idmef_address_t **ret);
int                 idmef_address_copy                  (const idmef_address_t *src,
                                                         idmef_address_t *dst);
int                 idmef_address_clone                 (idmef_address_t *src,
                                                         idmef_address_t **dst);
idmef_address_t *   idmef_address_ref                   (idmef_address_t *address);
void                idmef_address_destroy               (idmef_address_t *ptr);
prelude_string_t *  idmef_address_get_ident             (idmef_address_t *ptr);
void                idmef_address_set_ident             (idmef_address_t *ptr,
                                                         prelude_string_t *ident);
int                 idmef_address_new_ident             (idmef_address_t *ptr,
                                                         prelude_string_t **ret);
idmef_address_category_t  idmef_address_get_category    (idmef_address_t *ptr);
void                idmef_address_set_category          (idmef_address_t *ptr,
                                                         idmef_address_category_t category);
int                 idmef_address_new_category          (idmef_address_t *ptr,
                                                         idmef_address_category_t **ret);
prelude_string_t *  idmef_address_get_vlan_name         (idmef_address_t *ptr);
void                idmef_address_set_vlan_name         (idmef_address_t *ptr,
                                                         prelude_string_t *vlan_name);
int                 idmef_address_new_vlan_name         (idmef_address_t *ptr,
                                                         prelude_string_t **ret);
void                idmef_address_unset_vlan_num        (idmef_address_t *ptr);
int32_t *           idmef_address_get_vlan_num          (idmef_address_t *ptr);
void                idmef_address_set_vlan_num          (idmef_address_t *ptr,
                                                         int32_t vlan_num);
int                 idmef_address_new_vlan_num          (idmef_address_t *ptr,
                                                         int32_t **ret);
prelude_string_t *  idmef_address_get_address           (idmef_address_t *ptr);
void                idmef_address_set_address           (idmef_address_t *ptr,
                                                         prelude_string_t *address);
int                 idmef_address_new_address           (idmef_address_t *ptr,
                                                         prelude_string_t **ret);
prelude_string_t *  idmef_address_get_netmask           (idmef_address_t *ptr);
void                idmef_address_set_netmask           (idmef_address_t *ptr,
                                                         prelude_string_t *netmask);
int                 idmef_address_new_netmask           (idmef_address_t *ptr,
                                                         prelude_string_t **ret);
typedef             idmef_process_t;
int                 idmef_process_new                   (idmef_process_t **ret);
int                 idmef_process_copy                  (const idmef_process_t *src,
                                                         idmef_process_t *dst);
int                 idmef_process_clone                 (idmef_process_t *src,
                                                         idmef_process_t **dst);
idmef_process_t *   idmef_process_ref                   (idmef_process_t *process);
void                idmef_process_destroy               (idmef_process_t *ptr);
prelude_string_t *  idmef_process_get_ident             (idmef_process_t *ptr);
void                idmef_process_set_ident             (idmef_process_t *ptr,
                                                         prelude_string_t *ident);
int                 idmef_process_new_ident             (idmef_process_t *ptr,
                                                         prelude_string_t **ret);
prelude_string_t *  idmef_process_get_name              (idmef_process_t *ptr);
void                idmef_process_set_name              (idmef_process_t *ptr,
                                                         prelude_string_t *name);
int                 idmef_process_new_name              (idmef_process_t *ptr,
                                                         prelude_string_t **ret);
void                idmef_process_unset_pid             (idmef_process_t *ptr);
uint32_t *          idmef_process_get_pid               (idmef_process_t *ptr);
void                idmef_process_set_pid               (idmef_process_t *ptr,
                                                         uint32_t pid);
int                 idmef_process_new_pid               (idmef_process_t *ptr,
                                                         uint32_t **ret);
prelude_string_t *  idmef_process_get_path              (idmef_process_t *ptr);
void                idmef_process_set_path              (idmef_process_t *ptr,
                                                         prelude_string_t *path);
int                 idmef_process_new_path              (idmef_process_t *ptr,
                                                         prelude_string_t **ret);
prelude_string_t *  idmef_process_get_next_arg          (idmef_process_t *process,
                                                         prelude_string_t *prelude_string_cur);
void                idmef_process_set_arg               (idmef_process_t *ptr,
                                                         prelude_string_t *object,
                                                         int pos);
int                 idmef_process_new_arg               (idmef_process_t *ptr,
                                                         prelude_string_t **ret,
                                                         int pos);
prelude_string_t *  idmef_process_get_next_env          (idmef_process_t *process,
                                                         prelude_string_t *prelude_string_cur);
void                idmef_process_set_env               (idmef_process_t *ptr,
                                                         prelude_string_t *object,
                                                         int pos);
int                 idmef_process_new_env               (idmef_process_t *ptr,
                                                         prelude_string_t **ret,
                                                         int pos);
typedef             idmef_web_service_t;
int                 idmef_web_service_new               (idmef_web_service_t **ret);
int                 idmef_web_service_copy              (const idmef_web_service_t *src,
                                                         idmef_web_service_t *dst);
int                 idmef_web_service_clone             (idmef_web_service_t *src,
                                                         idmef_web_service_t **dst);
idmef_web_service_t * idmef_web_service_ref             (idmef_web_service_t *web_service);
void                idmef_web_service_destroy           (idmef_web_service_t *ptr);
prelude_string_t *  idmef_web_service_get_url           (idmef_web_service_t *ptr);
void                idmef_web_service_set_url           (idmef_web_service_t *ptr,
                                                         prelude_string_t *url);
int                 idmef_web_service_new_url           (idmef_web_service_t *ptr,
                                                         prelude_string_t **ret);
prelude_string_t *  idmef_web_service_get_cgi           (idmef_web_service_t *ptr);
void                idmef_web_service_set_cgi           (idmef_web_service_t *ptr,
                                                         prelude_string_t *cgi);
int                 idmef_web_service_new_cgi           (idmef_web_service_t *ptr,
                                                         prelude_string_t **ret);
prelude_string_t *  idmef_web_service_get_http_method   (idmef_web_service_t *ptr);
void                idmef_web_service_set_http_method   (idmef_web_service_t *ptr,
                                                         prelude_string_t *http_method);
int                 idmef_web_service_new_http_method   (idmef_web_service_t *ptr,
                                                         prelude_string_t **ret);
prelude_string_t *  idmef_web_service_get_next_arg      (idmef_web_service_t *web_service,
                                                         prelude_string_t *prelude_string_cur);
void                idmef_web_service_set_arg           (idmef_web_service_t *ptr,
                                                         prelude_string_t *object,
                                                         int pos);
int                 idmef_web_service_new_arg           (idmef_web_service_t *ptr,
                                                         prelude_string_t **ret,
                                                         int pos);
typedef             idmef_snmp_service_t;
int                 idmef_snmp_service_new              (idmef_snmp_service_t **ret);
int                 idmef_snmp_service_copy             (const idmef_snmp_service_t *src,
                                                         idmef_snmp_service_t *dst);
int                 idmef_snmp_service_clone            (idmef_snmp_service_t *src,
                                                         idmef_snmp_service_t **dst);
idmef_snmp_service_t * idmef_snmp_service_ref           (idmef_snmp_service_t *snmp_service);
void                idmef_snmp_service_destroy          (idmef_snmp_service_t *ptr);
prelude_string_t *  idmef_snmp_service_get_oid          (idmef_snmp_service_t *ptr);
void                idmef_snmp_service_set_oid          (idmef_snmp_service_t *ptr,
                                                         prelude_string_t *oid);
int                 idmef_snmp_service_new_oid          (idmef_snmp_service_t *ptr,
                                                         prelude_string_t **ret);
void                idmef_snmp_service_unset_message_processing_model
                                                        (idmef_snmp_service_t *ptr);
uint32_t *          idmef_snmp_service_get_message_processing_model
                                                        (idmef_snmp_service_t *ptr);
void                idmef_snmp_service_set_message_processing_model
                                                        (idmef_snmp_service_t *ptr,
                                                         uint32_t message_processing_model);
int                 idmef_snmp_service_new_message_processing_model
                                                        (idmef_snmp_service_t *ptr,
                                                         uint32_t **ret);
void                idmef_snmp_service_unset_security_model
                                                        (idmef_snmp_service_t *ptr);
uint32_t *          idmef_snmp_service_get_security_model
                                                        (idmef_snmp_service_t *ptr);
void                idmef_snmp_service_set_security_model
                                                        (idmef_snmp_service_t *ptr,
                                                         uint32_t security_model);
int                 idmef_snmp_service_new_security_model
                                                        (idmef_snmp_service_t *ptr,
                                                         uint32_t **ret);
prelude_string_t *  idmef_snmp_service_get_security_name
                                                        (idmef_snmp_service_t *ptr);
void                idmef_snmp_service_set_security_name
                                                        (idmef_snmp_service_t *ptr,
                                                         prelude_string_t *security_name);
int                 idmef_snmp_service_new_security_name
                                                        (idmef_snmp_service_t *ptr,
                                                         prelude_string_t **ret);
void                idmef_snmp_service_unset_security_level
                                                        (idmef_snmp_service_t *ptr);
uint32_t *          idmef_snmp_service_get_security_level
                                                        (idmef_snmp_service_t *ptr);
void                idmef_snmp_service_set_security_level
                                                        (idmef_snmp_service_t *ptr,
                                                         uint32_t security_level);
int                 idmef_snmp_service_new_security_level
                                                        (idmef_snmp_service_t *ptr,
                                                         uint32_t **ret);
prelude_string_t *  idmef_snmp_service_get_context_name (idmef_snmp_service_t *ptr);
void                idmef_snmp_service_set_context_name (idmef_snmp_service_t *ptr,
                                                         prelude_string_t *context_name);
int                 idmef_snmp_service_new_context_name (idmef_snmp_service_t *ptr,
                                                         prelude_string_t **ret);
prelude_string_t *  idmef_snmp_service_get_context_engine_id
                                                        (idmef_snmp_service_t *ptr);
void                idmef_snmp_service_set_context_engine_id
                                                        (idmef_snmp_service_t *ptr,
                                                         prelude_string_t *context_engine_id);
int                 idmef_snmp_service_new_context_engine_id
                                                        (idmef_snmp_service_t *ptr,
                                                         prelude_string_t **ret);
prelude_string_t *  idmef_snmp_service_get_command      (idmef_snmp_service_t *ptr);
void                idmef_snmp_service_set_command      (idmef_snmp_service_t *ptr,
                                                         prelude_string_t *command);
int                 idmef_snmp_service_new_command      (idmef_snmp_service_t *ptr,
                                                         prelude_string_t **ret);
prelude_string_t *  idmef_snmp_service_get_community    (idmef_snmp_service_t *ptr);
void                idmef_snmp_service_set_community    (idmef_snmp_service_t *ptr,
                                                         prelude_string_t *community);
int                 idmef_snmp_service_new_community    (idmef_snmp_service_t *ptr,
                                                         prelude_string_t **ret);
enum                idmef_service_type_t;
idmef_service_type_t  idmef_service_type_to_numeric     (const char *name);
const char *        idmef_service_type_to_string        (idmef_service_type_t val);
typedef             idmef_service_t;
int                 idmef_service_new                   (idmef_service_t **ret);
int                 idmef_service_copy                  (const idmef_service_t *src,
                                                         idmef_service_t *dst);
int                 idmef_service_clone                 (idmef_service_t *src,
                                                         idmef_service_t **dst);
idmef_service_t *   idmef_service_ref                   (idmef_service_t *service);
void                idmef_service_destroy               (idmef_service_t *ptr);
prelude_string_t *  idmef_service_get_ident             (idmef_service_t *ptr);
void                idmef_service_set_ident             (idmef_service_t *ptr,
                                                         prelude_string_t *ident);
int                 idmef_service_new_ident             (idmef_service_t *ptr,
                                                         prelude_string_t **ret);
void                idmef_service_unset_ip_version      (idmef_service_t *ptr);
uint8_t *           idmef_service_get_ip_version        (idmef_service_t *ptr);
void                idmef_service_set_ip_version        (idmef_service_t *ptr,
                                                         uint8_t ip_version);
int                 idmef_service_new_ip_version        (idmef_service_t *ptr,
                                                         uint8_t **ret);
void                idmef_service_unset_iana_protocol_number
                                                        (idmef_service_t *ptr);
uint8_t *           idmef_service_get_iana_protocol_number
                                                        (idmef_service_t *ptr);
void                idmef_service_set_iana_protocol_number
                                                        (idmef_service_t *ptr,
                                                         uint8_t iana_protocol_number);
int                 idmef_service_new_iana_protocol_number
                                                        (idmef_service_t *ptr,
                                                         uint8_t **ret);
prelude_string_t *  idmef_service_get_iana_protocol_name
                                                        (idmef_service_t *ptr);
void                idmef_service_set_iana_protocol_name
                                                        (idmef_service_t *ptr,
                                                         prelude_string_t *iana_protocol_name);
int                 idmef_service_new_iana_protocol_name
                                                        (idmef_service_t *ptr,
                                                         prelude_string_t **ret);
prelude_string_t *  idmef_service_get_name              (idmef_service_t *ptr);
void                idmef_service_set_name              (idmef_service_t *ptr,
                                                         prelude_string_t *name);
int                 idmef_service_new_name              (idmef_service_t *ptr,
                                                         prelude_string_t **ret);
void                idmef_service_unset_port            (idmef_service_t *ptr);
uint16_t *          idmef_service_get_port              (idmef_service_t *ptr);
void                idmef_service_set_port              (idmef_service_t *ptr,
                                                         uint16_t port);
int                 idmef_service_new_port              (idmef_service_t *ptr,
                                                         uint16_t **ret);
prelude_string_t *  idmef_service_get_portlist          (idmef_service_t *ptr);
void                idmef_service_set_portlist          (idmef_service_t *ptr,
                                                         prelude_string_t *portlist);
int                 idmef_service_new_portlist          (idmef_service_t *ptr,
                                                         prelude_string_t **ret);
prelude_string_t *  idmef_service_get_protocol          (idmef_service_t *ptr);
void                idmef_service_set_protocol          (idmef_service_t *ptr,
                                                         prelude_string_t *protocol);
int                 idmef_service_new_protocol          (idmef_service_t *ptr,
                                                         prelude_string_t **ret);
idmef_service_type_t  idmef_service_get_type            (idmef_service_t *ptr);
idmef_web_service_t * idmef_service_get_web_service     (idmef_service_t *ptr);
void                idmef_service_set_web_service       (idmef_service_t *ptr,
                                                         idmef_web_service_t *web_service);
int                 idmef_service_new_web_service       (idmef_service_t *ptr,
                                                         idmef_web_service_t **ret);
idmef_snmp_service_t * idmef_service_get_snmp_service   (idmef_service_t *ptr);
void                idmef_service_set_snmp_service      (idmef_service_t *ptr,
                                                         idmef_snmp_service_t *snmp_service);
int                 idmef_service_new_snmp_service      (idmef_service_t *ptr,
                                                         idmef_snmp_service_t **ret);
enum                idmef_node_category_t;
idmef_node_category_t  idmef_node_category_to_numeric   (const char *name);
const char *        idmef_node_category_to_string       (idmef_node_category_t val);
typedef             idmef_node_t;
int                 idmef_node_new                      (idmef_node_t **ret);
int                 idmef_node_copy                     (const idmef_node_t *src,
                                                         idmef_node_t *dst);
int                 idmef_node_clone                    (idmef_node_t *src,
                                                         idmef_node_t **dst);
idmef_node_t *      idmef_node_ref                      (idmef_node_t *node);
void                idmef_node_destroy                  (idmef_node_t *ptr);
prelude_string_t *  idmef_node_get_ident                (idmef_node_t *ptr);
void                idmef_node_set_ident                (idmef_node_t *ptr,
                                                         prelude_string_t *ident);
int                 idmef_node_new_ident                (idmef_node_t *ptr,
                                                         prelude_string_t **ret);
idmef_node_category_t  idmef_node_get_category          (idmef_node_t *ptr);
void                idmef_node_set_category             (idmef_node_t *ptr,
                                                         idmef_node_category_t category);
int                 idmef_node_new_category             (idmef_node_t *ptr,
                                                         idmef_node_category_t **ret);
prelude_string_t *  idmef_node_get_location             (idmef_node_t *ptr);
void                idmef_node_set_location             (idmef_node_t *ptr,
                                                         prelude_string_t *location);
int                 idmef_node_new_location             (idmef_node_t *ptr,
                                                         prelude_string_t **ret);
prelude_string_t *  idmef_node_get_name                 (idmef_node_t *ptr);
void                idmef_node_set_name                 (idmef_node_t *ptr,
                                                         prelude_string_t *name);
int                 idmef_node_new_name                 (idmef_node_t *ptr,
                                                         prelude_string_t **ret);
idmef_address_t *   idmef_node_get_next_address         (idmef_node_t *node,
                                                         idmef_address_t *address_cur);
void                idmef_node_set_address              (idmef_node_t *ptr,
                                                         idmef_address_t *object,
                                                         int pos);
int                 idmef_node_new_address              (idmef_node_t *ptr,
                                                         idmef_address_t **ret,
                                                         int pos);
enum                idmef_source_spoofed_t;
idmef_source_spoofed_t  idmef_source_spoofed_to_numeric (const char *name);
const char *        idmef_source_spoofed_to_string      (idmef_source_spoofed_t val);
typedef             idmef_source_t;
int                 idmef_source_new                    (idmef_source_t **ret);
int                 idmef_source_copy                   (const idmef_source_t *src,
                                                         idmef_source_t *dst);
int                 idmef_source_clone                  (idmef_source_t *src,
                                                         idmef_source_t **dst);
idmef_source_t *    idmef_source_ref                    (idmef_source_t *source);
void                idmef_source_destroy                (idmef_source_t *ptr);
prelude_string_t *  idmef_source_get_ident              (idmef_source_t *ptr);
void                idmef_source_set_ident              (idmef_source_t *ptr,
                                                         prelude_string_t *ident);
int                 idmef_source_new_ident              (idmef_source_t *ptr,
                                                         prelude_string_t **ret);
idmef_source_spoofed_t  idmef_source_get_spoofed        (idmef_source_t *ptr);
void                idmef_source_set_spoofed            (idmef_source_t *ptr,
                                                         idmef_source_spoofed_t spoofed);
int                 idmef_source_new_spoofed            (idmef_source_t *ptr,
                                                         idmef_source_spoofed_t **ret);
prelude_string_t *  idmef_source_get_interface          (idmef_source_t *ptr);
void                idmef_source_set_interface          (idmef_source_t *ptr,
                                                         prelude_string_t *interface);
int                 idmef_source_new_interface          (idmef_source_t *ptr,
                                                         prelude_string_t **ret);
idmef_node_t *      idmef_source_get_node               (idmef_source_t *ptr);
void                idmef_source_set_node               (idmef_source_t *ptr,
                                                         idmef_node_t *node);
int                 idmef_source_new_node               (idmef_source_t *ptr,
                                                         idmef_node_t **ret);
idmef_user_t *      idmef_source_get_user               (idmef_source_t *ptr);
void                idmef_source_set_user               (idmef_source_t *ptr,
                                                         idmef_user_t *user);
int                 idmef_source_new_user               (idmef_source_t *ptr,
                                                         idmef_user_t **ret);
idmef_process_t *   idmef_source_get_process            (idmef_source_t *ptr);
void                idmef_source_set_process            (idmef_source_t *ptr,
                                                         idmef_process_t *process);
int                 idmef_source_new_process            (idmef_source_t *ptr,
                                                         idmef_process_t **ret);
idmef_service_t *   idmef_source_get_service            (idmef_source_t *ptr);
void                idmef_source_set_service            (idmef_source_t *ptr,
                                                         idmef_service_t *service);
int                 idmef_source_new_service            (idmef_source_t *ptr,
                                                         idmef_service_t **ret);
typedef             idmef_file_access_t;
int                 idmef_file_access_new               (idmef_file_access_t **ret);
int                 idmef_file_access_copy              (const idmef_file_access_t *src,
                                                         idmef_file_access_t *dst);
int                 idmef_file_access_clone             (idmef_file_access_t *src,
                                                         idmef_file_access_t **dst);
idmef_file_access_t * idmef_file_access_ref             (idmef_file_access_t *file_access);
void                idmef_file_access_destroy           (idmef_file_access_t *ptr);
idmef_user_id_t *   idmef_file_access_get_user_id       (idmef_file_access_t *ptr);
void                idmef_file_access_set_user_id       (idmef_file_access_t *ptr,
                                                         idmef_user_id_t *user_id);
int                 idmef_file_access_new_user_id       (idmef_file_access_t *ptr,
                                                         idmef_user_id_t **ret);
prelude_string_t *  idmef_file_access_get_next_permission
                                                        (idmef_file_access_t *file_access,
                                                         prelude_string_t *prelude_string_cur);
void                idmef_file_access_set_permission    (idmef_file_access_t *ptr,
                                                         prelude_string_t *object,
                                                         int pos);
int                 idmef_file_access_new_permission    (idmef_file_access_t *ptr,
                                                         prelude_string_t **ret,
                                                         int pos);
typedef             idmef_inode_t;
int                 idmef_inode_new                     (idmef_inode_t **ret);
int                 idmef_inode_copy                    (const idmef_inode_t *src,
                                                         idmef_inode_t *dst);
int                 idmef_inode_clone                   (idmef_inode_t *src,
                                                         idmef_inode_t **dst);
idmef_inode_t *     idmef_inode_ref                     (idmef_inode_t *inode);
void                idmef_inode_destroy                 (idmef_inode_t *ptr);
idmef_time_t *      idmef_inode_get_change_time         (idmef_inode_t *ptr);
void                idmef_inode_set_change_time         (idmef_inode_t *ptr,
                                                         idmef_time_t *change_time);
int                 idmef_inode_new_change_time         (idmef_inode_t *ptr,
                                                         idmef_time_t **ret);
void                idmef_inode_unset_number            (idmef_inode_t *ptr);
uint32_t *          idmef_inode_get_number              (idmef_inode_t *ptr);
void                idmef_inode_set_number              (idmef_inode_t *ptr,
                                                         uint32_t number);
int                 idmef_inode_new_number              (idmef_inode_t *ptr,
                                                         uint32_t **ret);
void                idmef_inode_unset_major_device      (idmef_inode_t *ptr);
uint32_t *          idmef_inode_get_major_device        (idmef_inode_t *ptr);
void                idmef_inode_set_major_device        (idmef_inode_t *ptr,
                                                         uint32_t major_device);
int                 idmef_inode_new_major_device        (idmef_inode_t *ptr,
                                                         uint32_t **ret);
void                idmef_inode_unset_minor_device      (idmef_inode_t *ptr);
uint32_t *          idmef_inode_get_minor_device        (idmef_inode_t *ptr);
void                idmef_inode_set_minor_device        (idmef_inode_t *ptr,
                                                         uint32_t minor_device);
int                 idmef_inode_new_minor_device        (idmef_inode_t *ptr,
                                                         uint32_t **ret);
void                idmef_inode_unset_c_major_device    (idmef_inode_t *ptr);
uint32_t *          idmef_inode_get_c_major_device      (idmef_inode_t *ptr);
void                idmef_inode_set_c_major_device      (idmef_inode_t *ptr,
                                                         uint32_t c_major_device);
int                 idmef_inode_new_c_major_device      (idmef_inode_t *ptr,
                                                         uint32_t **ret);
void                idmef_inode_unset_c_minor_device    (idmef_inode_t *ptr);
uint32_t *          idmef_inode_get_c_minor_device      (idmef_inode_t *ptr);
void                idmef_inode_set_c_minor_device      (idmef_inode_t *ptr,
                                                         uint32_t c_minor_device);
int                 idmef_inode_new_c_minor_device      (idmef_inode_t *ptr,
                                                         uint32_t **ret);
typedef             idmef_linkage_t;
enum                idmef_checksum_algorithm_t;
idmef_checksum_algorithm_t  idmef_checksum_algorithm_to_numeric
                                                        (const char *name);
const char *        idmef_checksum_algorithm_to_string  (idmef_checksum_algorithm_t val);
typedef             idmef_checksum_t;
int                 idmef_checksum_new                  (idmef_checksum_t **ret);
int                 idmef_checksum_copy                 (const idmef_checksum_t *src,
                                                         idmef_checksum_t *dst);
int                 idmef_checksum_clone                (idmef_checksum_t *src,
                                                         idmef_checksum_t **dst);
idmef_checksum_t *  idmef_checksum_ref                  (idmef_checksum_t *checksum);
void                idmef_checksum_destroy              (idmef_checksum_t *ptr);
prelude_string_t *  idmef_checksum_get_value            (idmef_checksum_t *ptr);
void                idmef_checksum_set_value            (idmef_checksum_t *ptr,
                                                         prelude_string_t *value);
int                 idmef_checksum_new_value            (idmef_checksum_t *ptr,
                                                         prelude_string_t **ret);
prelude_string_t *  idmef_checksum_get_key              (idmef_checksum_t *ptr);
void                idmef_checksum_set_key              (idmef_checksum_t *ptr,
                                                         prelude_string_t *key);
int                 idmef_checksum_new_key              (idmef_checksum_t *ptr,
                                                         prelude_string_t **ret);
idmef_checksum_algorithm_t  idmef_checksum_get_algorithm
                                                        (idmef_checksum_t *ptr);
void                idmef_checksum_set_algorithm        (idmef_checksum_t *ptr,
                                                         idmef_checksum_algorithm_t algorithm);
int                 idmef_checksum_new_algorithm        (idmef_checksum_t *ptr,
                                                         idmef_checksum_algorithm_t **ret);
enum                idmef_file_category_t;
idmef_file_category_t  idmef_file_category_to_numeric   (const char *name);
const char *        idmef_file_category_to_string       (idmef_file_category_t val);
enum                idmef_file_fstype_t;
idmef_file_fstype_t  idmef_file_fstype_to_numeric       (const char *name);
const char *        idmef_file_fstype_to_string         (idmef_file_fstype_t val);
typedef             idmef_file_t;
int                 idmef_file_new                      (idmef_file_t **ret);
int                 idmef_file_copy                     (const idmef_file_t *src,
                                                         idmef_file_t *dst);
int                 idmef_file_clone                    (idmef_file_t *src,
                                                         idmef_file_t **dst);
idmef_file_t *      idmef_file_ref                      (idmef_file_t *file);
void                idmef_file_destroy                  (idmef_file_t *ptr);
prelude_string_t *  idmef_file_get_ident                (idmef_file_t *ptr);
void                idmef_file_set_ident                (idmef_file_t *ptr,
                                                         prelude_string_t *ident);
int                 idmef_file_new_ident                (idmef_file_t *ptr,
                                                         prelude_string_t **ret);
prelude_string_t *  idmef_file_get_name                 (idmef_file_t *ptr);
void                idmef_file_set_name                 (idmef_file_t *ptr,
                                                         prelude_string_t *name);
int                 idmef_file_new_name                 (idmef_file_t *ptr,
                                                         prelude_string_t **ret);
prelude_string_t *  idmef_file_get_path                 (idmef_file_t *ptr);
void                idmef_file_set_path                 (idmef_file_t *ptr,
                                                         prelude_string_t *path);
int                 idmef_file_new_path                 (idmef_file_t *ptr,
                                                         prelude_string_t **ret);
idmef_time_t *      idmef_file_get_create_time          (idmef_file_t *ptr);
void                idmef_file_set_create_time          (idmef_file_t *ptr,
                                                         idmef_time_t *create_time);
int                 idmef_file_new_create_time          (idmef_file_t *ptr,
                                                         idmef_time_t **ret);
idmef_time_t *      idmef_file_get_modify_time          (idmef_file_t *ptr);
void                idmef_file_set_modify_time          (idmef_file_t *ptr,
                                                         idmef_time_t *modify_time);
int                 idmef_file_new_modify_time          (idmef_file_t *ptr,
                                                         idmef_time_t **ret);
idmef_time_t *      idmef_file_get_access_time          (idmef_file_t *ptr);
void                idmef_file_set_access_time          (idmef_file_t *ptr,
                                                         idmef_time_t *access_time);
int                 idmef_file_new_access_time          (idmef_file_t *ptr,
                                                         idmef_time_t **ret);
void                idmef_file_unset_data_size          (idmef_file_t *ptr);
uint64_t *          idmef_file_get_data_size            (idmef_file_t *ptr);
void                idmef_file_set_data_size            (idmef_file_t *ptr,
                                                         uint64_t data_size);
int                 idmef_file_new_data_size            (idmef_file_t *ptr,
                                                         uint64_t **ret);
void                idmef_file_unset_disk_size          (idmef_file_t *ptr);
uint64_t *          idmef_file_get_disk_size            (idmef_file_t *ptr);
void                idmef_file_set_disk_size            (idmef_file_t *ptr,
                                                         uint64_t disk_size);
int                 idmef_file_new_disk_size            (idmef_file_t *ptr,
                                                         uint64_t **ret);
idmef_file_access_t * idmef_file_get_next_file_access   (idmef_file_t *file,
                                                         idmef_file_access_t *file_access_cur);
void                idmef_file_set_file_access          (idmef_file_t *ptr,
                                                         idmef_file_access_t *object,
                                                         int pos);
int                 idmef_file_new_file_access          (idmef_file_t *ptr,
                                                         idmef_file_access_t **ret,
                                                         int pos);
idmef_linkage_t *   idmef_file_get_next_linkage         (idmef_file_t *file,
                                                         idmef_linkage_t *linkage_cur);
void                idmef_file_set_linkage              (idmef_file_t *ptr,
                                                         idmef_linkage_t *object,
                                                         int pos);
int                 idmef_file_new_linkage              (idmef_file_t *ptr,
                                                         idmef_linkage_t **ret,
                                                         int pos);
idmef_inode_t *     idmef_file_get_inode                (idmef_file_t *ptr);
void                idmef_file_set_inode                (idmef_file_t *ptr,
                                                         idmef_inode_t *inode);
int                 idmef_file_new_inode                (idmef_file_t *ptr,
                                                         idmef_inode_t **ret);
idmef_checksum_t *  idmef_file_get_next_checksum        (idmef_file_t *file,
                                                         idmef_checksum_t *checksum_cur);
void                idmef_file_set_checksum             (idmef_file_t *ptr,
                                                         idmef_checksum_t *object,
                                                         int pos);
int                 idmef_file_new_checksum             (idmef_file_t *ptr,
                                                         idmef_checksum_t **ret,
                                                         int pos);
idmef_file_category_t  idmef_file_get_category          (idmef_file_t *ptr);
void                idmef_file_set_category             (idmef_file_t *ptr,
                                                         idmef_file_category_t category);
int                 idmef_file_new_category             (idmef_file_t *ptr,
                                                         idmef_file_category_t **ret);
void                idmef_file_unset_fstype             (idmef_file_t *ptr);
idmef_file_fstype_t * idmef_file_get_fstype             (idmef_file_t *ptr);
void                idmef_file_set_fstype               (idmef_file_t *ptr,
                                                         idmef_file_fstype_t fstype);
int                 idmef_file_new_fstype               (idmef_file_t *ptr,
                                                         idmef_file_fstype_t **ret);
prelude_string_t *  idmef_file_get_file_type            (idmef_file_t *ptr);
void                idmef_file_set_file_type            (idmef_file_t *ptr,
                                                         prelude_string_t *file_type);
int                 idmef_file_new_file_type            (idmef_file_t *ptr,
                                                         prelude_string_t **ret);
enum                idmef_linkage_category_t;
idmef_linkage_category_t  idmef_linkage_category_to_numeric
                                                        (const char *name);
const char *        idmef_linkage_category_to_string    (idmef_linkage_category_t val);
int                 idmef_linkage_new                   (idmef_linkage_t **ret);
int                 idmef_linkage_copy                  (const idmef_linkage_t *src,
                                                         idmef_linkage_t *dst);
int                 idmef_linkage_clone                 (idmef_linkage_t *src,
                                                         idmef_linkage_t **dst);
idmef_linkage_t *   idmef_linkage_ref                   (idmef_linkage_t *linkage);
void                idmef_linkage_destroy               (idmef_linkage_t *ptr);
idmef_linkage_category_t  idmef_linkage_get_category    (idmef_linkage_t *ptr);
void                idmef_linkage_set_category          (idmef_linkage_t *ptr,
                                                         idmef_linkage_category_t category);
int                 idmef_linkage_new_category          (idmef_linkage_t *ptr,
                                                         idmef_linkage_category_t **ret);
prelude_string_t *  idmef_linkage_get_name              (idmef_linkage_t *ptr);
void                idmef_linkage_set_name              (idmef_linkage_t *ptr,
                                                         prelude_string_t *name);
int                 idmef_linkage_new_name              (idmef_linkage_t *ptr,
                                                         prelude_string_t **ret);
prelude_string_t *  idmef_linkage_get_path              (idmef_linkage_t *ptr);
void                idmef_linkage_set_path              (idmef_linkage_t *ptr,
                                                         prelude_string_t *path);
int                 idmef_linkage_new_path              (idmef_linkage_t *ptr,
                                                         prelude_string_t **ret);
idmef_file_t *      idmef_linkage_get_file              (idmef_linkage_t *ptr);
void                idmef_linkage_set_file              (idmef_linkage_t *ptr,
                                                         idmef_file_t *file);
int                 idmef_linkage_new_file              (idmef_linkage_t *ptr,
                                                         idmef_file_t **ret);
enum                idmef_target_decoy_t;
idmef_target_decoy_t  idmef_target_decoy_to_numeric     (const char *name);
const char *        idmef_target_decoy_to_string        (idmef_target_decoy_t val);
typedef             idmef_target_t;
int                 idmef_target_new                    (idmef_target_t **ret);
int                 idmef_target_copy                   (const idmef_target_t *src,
                                                         idmef_target_t *dst);
int                 idmef_target_clone                  (idmef_target_t *src,
                                                         idmef_target_t **dst);
idmef_target_t *    idmef_target_ref                    (idmef_target_t *target);
void                idmef_target_destroy                (idmef_target_t *ptr);
prelude_string_t *  idmef_target_get_ident              (idmef_target_t *ptr);
void                idmef_target_set_ident              (idmef_target_t *ptr,
                                                         prelude_string_t *ident);
int                 idmef_target_new_ident              (idmef_target_t *ptr,
                                                         prelude_string_t **ret);
idmef_target_decoy_t  idmef_target_get_decoy            (idmef_target_t *ptr);
void                idmef_target_set_decoy              (idmef_target_t *ptr,
                                                         idmef_target_decoy_t decoy);
int                 idmef_target_new_decoy              (idmef_target_t *ptr,
                                                         idmef_target_decoy_t **ret);
prelude_string_t *  idmef_target_get_interface          (idmef_target_t *ptr);
void                idmef_target_set_interface          (idmef_target_t *ptr,
                                                         prelude_string_t *interface);
int                 idmef_target_new_interface          (idmef_target_t *ptr,
                                                         prelude_string_t **ret);
idmef_node_t *      idmef_target_get_node               (idmef_target_t *ptr);
void                idmef_target_set_node               (idmef_target_t *ptr,
                                                         idmef_node_t *node);
int                 idmef_target_new_node               (idmef_target_t *ptr,
                                                         idmef_node_t **ret);
idmef_user_t *      idmef_target_get_user               (idmef_target_t *ptr);
void                idmef_target_set_user               (idmef_target_t *ptr,
                                                         idmef_user_t *user);
int                 idmef_target_new_user               (idmef_target_t *ptr,
                                                         idmef_user_t **ret);
idmef_process_t *   idmef_target_get_process            (idmef_target_t *ptr);
void                idmef_target_set_process            (idmef_target_t *ptr,
                                                         idmef_process_t *process);
int                 idmef_target_new_process            (idmef_target_t *ptr,
                                                         idmef_process_t **ret);
idmef_service_t *   idmef_target_get_service            (idmef_target_t *ptr);
void                idmef_target_set_service            (idmef_target_t *ptr,
                                                         idmef_service_t *service);
int                 idmef_target_new_service            (idmef_target_t *ptr,
                                                         idmef_service_t **ret);
idmef_file_t *      idmef_target_get_next_file          (idmef_target_t *target,
                                                         idmef_file_t *file_cur);
void                idmef_target_set_file               (idmef_target_t *ptr,
                                                         idmef_file_t *object,
                                                         int pos);
int                 idmef_target_new_file               (idmef_target_t *ptr,
                                                         idmef_file_t **ret,
                                                         int pos);
typedef             idmef_analyzer_t;
int                 idmef_analyzer_new                  (idmef_analyzer_t **ret);
int                 idmef_analyzer_copy                 (const idmef_analyzer_t *src,
                                                         idmef_analyzer_t *dst);
int                 idmef_analyzer_clone                (idmef_analyzer_t *src,
                                                         idmef_analyzer_t **dst);
idmef_analyzer_t *  idmef_analyzer_ref                  (idmef_analyzer_t *analyzer);
void                idmef_analyzer_destroy              (idmef_analyzer_t *ptr);
prelude_string_t *  idmef_analyzer_get_analyzerid       (idmef_analyzer_t *ptr);
void                idmef_analyzer_set_analyzerid       (idmef_analyzer_t *ptr,
                                                         prelude_string_t *analyzerid);
int                 idmef_analyzer_new_analyzerid       (idmef_analyzer_t *ptr,
                                                         prelude_string_t **ret);
prelude_string_t *  idmef_analyzer_get_name             (idmef_analyzer_t *ptr);
void                idmef_analyzer_set_name             (idmef_analyzer_t *ptr,
                                                         prelude_string_t *name);
int                 idmef_analyzer_new_name             (idmef_analyzer_t *ptr,
                                                         prelude_string_t **ret);
prelude_string_t *  idmef_analyzer_get_manufacturer     (idmef_analyzer_t *ptr);
void                idmef_analyzer_set_manufacturer     (idmef_analyzer_t *ptr,
                                                         prelude_string_t *manufacturer);
int                 idmef_analyzer_new_manufacturer     (idmef_analyzer_t *ptr,
                                                         prelude_string_t **ret);
prelude_string_t *  idmef_analyzer_get_model            (idmef_analyzer_t *ptr);
void                idmef_analyzer_set_model            (idmef_analyzer_t *ptr,
                                                         prelude_string_t *model);
int                 idmef_analyzer_new_model            (idmef_analyzer_t *ptr,
                                                         prelude_string_t **ret);
prelude_string_t *  idmef_analyzer_get_version          (idmef_analyzer_t *ptr);
void                idmef_analyzer_set_version          (idmef_analyzer_t *ptr,
                                                         prelude_string_t *version);
int                 idmef_analyzer_new_version          (idmef_analyzer_t *ptr,
                                                         prelude_string_t **ret);
prelude_string_t *  idmef_analyzer_get_class            (idmef_analyzer_t *ptr);
void                idmef_analyzer_set_class            (idmef_analyzer_t *ptr,
                                                         prelude_string_t *class_str);
int                 idmef_analyzer_new_class            (idmef_analyzer_t *ptr,
                                                         prelude_string_t **ret);
prelude_string_t *  idmef_analyzer_get_ostype           (idmef_analyzer_t *ptr);
void                idmef_analyzer_set_ostype           (idmef_analyzer_t *ptr,
                                                         prelude_string_t *ostype);
int                 idmef_analyzer_new_ostype           (idmef_analyzer_t *ptr,
                                                         prelude_string_t **ret);
prelude_string_t *  idmef_analyzer_get_osversion        (idmef_analyzer_t *ptr);
void                idmef_analyzer_set_osversion        (idmef_analyzer_t *ptr,
                                                         prelude_string_t *osversion);
int                 idmef_analyzer_new_osversion        (idmef_analyzer_t *ptr,
                                                         prelude_string_t **ret);
idmef_node_t *      idmef_analyzer_get_node             (idmef_analyzer_t *ptr);
void                idmef_analyzer_set_node             (idmef_analyzer_t *ptr,
                                                         idmef_node_t *node);
int                 idmef_analyzer_new_node             (idmef_analyzer_t *ptr,
                                                         idmef_node_t **ret);
idmef_process_t *   idmef_analyzer_get_process          (idmef_analyzer_t *ptr);
void                idmef_analyzer_set_process          (idmef_analyzer_t *ptr,
                                                         idmef_process_t *process);
int                 idmef_analyzer_new_process          (idmef_analyzer_t *ptr,
                                                         idmef_process_t **ret);
typedef             idmef_alertident_t;
int                 idmef_alertident_new                (idmef_alertident_t **ret);
int                 idmef_alertident_copy               (const idmef_alertident_t *src,
                                                         idmef_alertident_t *dst);
int                 idmef_alertident_clone              (idmef_alertident_t *src,
                                                         idmef_alertident_t **dst);
idmef_alertident_t * idmef_alertident_ref               (idmef_alertident_t *alertident);
void                idmef_alertident_destroy            (idmef_alertident_t *ptr);
prelude_string_t *  idmef_alertident_get_alertident     (idmef_alertident_t *ptr);
void                idmef_alertident_set_alertident     (idmef_alertident_t *ptr,
                                                         prelude_string_t *alertident);
int                 idmef_alertident_new_alertident     (idmef_alertident_t *ptr,
                                                         prelude_string_t **ret);
prelude_string_t *  idmef_alertident_get_analyzerid     (idmef_alertident_t *ptr);
void                idmef_alertident_set_analyzerid     (idmef_alertident_t *ptr,
                                                         prelude_string_t *analyzerid);
int                 idmef_alertident_new_analyzerid     (idmef_alertident_t *ptr,
                                                         prelude_string_t **ret);
enum                idmef_impact_severity_t;
idmef_impact_severity_t  idmef_impact_severity_to_numeric
                                                        (const char *name);
const char *        idmef_impact_severity_to_string     (idmef_impact_severity_t val);
enum                idmef_impact_completion_t;
idmef_impact_completion_t  idmef_impact_completion_to_numeric
                                                        (const char *name);
const char *        idmef_impact_completion_to_string   (idmef_impact_completion_t val);
enum                idmef_impact_type_t;
idmef_impact_type_t  idmef_impact_type_to_numeric       (const char *name);
const char *        idmef_impact_type_to_string         (idmef_impact_type_t val);
typedef             idmef_impact_t;
int                 idmef_impact_new                    (idmef_impact_t **ret);
int                 idmef_impact_copy                   (const idmef_impact_t *src,
                                                         idmef_impact_t *dst);
int                 idmef_impact_clone                  (idmef_impact_t *src,
                                                         idmef_impact_t **dst);
idmef_impact_t *    idmef_impact_ref                    (idmef_impact_t *impact);
void                idmef_impact_destroy                (idmef_impact_t *ptr);
void                idmef_impact_unset_severity         (idmef_impact_t *ptr);
idmef_impact_severity_t * idmef_impact_get_severity     (idmef_impact_t *ptr);
void                idmef_impact_set_severity           (idmef_impact_t *ptr,
                                                         idmef_impact_severity_t severity);
int                 idmef_impact_new_severity           (idmef_impact_t *ptr,
                                                         idmef_impact_severity_t **ret);
void                idmef_impact_unset_completion       (idmef_impact_t *ptr);
idmef_impact_completion_t * idmef_impact_get_completion (idmef_impact_t *ptr);
void                idmef_impact_set_completion         (idmef_impact_t *ptr,
                                                         idmef_impact_completion_t completion);
int                 idmef_impact_new_completion         (idmef_impact_t *ptr,
                                                         idmef_impact_completion_t **ret);
idmef_impact_type_t  idmef_impact_get_type              (idmef_impact_t *ptr);
void                idmef_impact_set_type               (idmef_impact_t *ptr,
                                                         idmef_impact_type_t type);
int                 idmef_impact_new_type               (idmef_impact_t *ptr,
                                                         idmef_impact_type_t **ret);
prelude_string_t *  idmef_impact_get_description        (idmef_impact_t *ptr);
void                idmef_impact_set_description        (idmef_impact_t *ptr,
                                                         prelude_string_t *description);
int                 idmef_impact_new_description        (idmef_impact_t *ptr,
                                                         prelude_string_t **ret);
enum                idmef_action_category_t;
idmef_action_category_t  idmef_action_category_to_numeric
                                                        (const char *name);
const char *        idmef_action_category_to_string     (idmef_action_category_t val);
typedef             idmef_action_t;
int                 idmef_action_new                    (idmef_action_t **ret);
int                 idmef_action_copy                   (const idmef_action_t *src,
                                                         idmef_action_t *dst);
int                 idmef_action_clone                  (idmef_action_t *src,
                                                         idmef_action_t **dst);
idmef_action_t *    idmef_action_ref                    (idmef_action_t *action);
void                idmef_action_destroy                (idmef_action_t *ptr);
idmef_action_category_t  idmef_action_get_category      (idmef_action_t *ptr);
void                idmef_action_set_category           (idmef_action_t *ptr,
                                                         idmef_action_category_t category);
int                 idmef_action_new_category           (idmef_action_t *ptr,
                                                         idmef_action_category_t **ret);
prelude_string_t *  idmef_action_get_description        (idmef_action_t *ptr);
void                idmef_action_set_description        (idmef_action_t *ptr,
                                                         prelude_string_t *description);
int                 idmef_action_new_description        (idmef_action_t *ptr,
                                                         prelude_string_t **ret);
enum                idmef_confidence_rating_t;
idmef_confidence_rating_t  idmef_confidence_rating_to_numeric
                                                        (const char *name);
const char *        idmef_confidence_rating_to_string   (idmef_confidence_rating_t val);
typedef             idmef_confidence_t;
int                 idmef_confidence_new                (idmef_confidence_t **ret);
int                 idmef_confidence_copy               (const idmef_confidence_t *src,
                                                         idmef_confidence_t *dst);
int                 idmef_confidence_clone              (idmef_confidence_t *src,
                                                         idmef_confidence_t **dst);
idmef_confidence_t * idmef_confidence_ref               (idmef_confidence_t *confidence);
void                idmef_confidence_destroy            (idmef_confidence_t *ptr);
idmef_confidence_rating_t  idmef_confidence_get_rating  (idmef_confidence_t *ptr);
void                idmef_confidence_set_rating         (idmef_confidence_t *ptr,
                                                         idmef_confidence_rating_t rating);
int                 idmef_confidence_new_rating         (idmef_confidence_t *ptr,
                                                         idmef_confidence_rating_t **ret);
float               idmef_confidence_get_confidence     (idmef_confidence_t *ptr);
void                idmef_confidence_set_confidence     (idmef_confidence_t *ptr,
                                                         float confidence);
int                 idmef_confidence_new_confidence     (idmef_confidence_t *ptr,
                                                         float **ret);
typedef             idmef_assessment_t;
int                 idmef_assessment_new                (idmef_assessment_t **ret);
int                 idmef_assessment_copy               (const idmef_assessment_t *src,
                                                         idmef_assessment_t *dst);
int                 idmef_assessment_clone              (idmef_assessment_t *src,
                                                         idmef_assessment_t **dst);
idmef_assessment_t * idmef_assessment_ref               (idmef_assessment_t *assessment);
void                idmef_assessment_destroy            (idmef_assessment_t *ptr);
idmef_impact_t *    idmef_assessment_get_impact         (idmef_assessment_t *ptr);
void                idmef_assessment_set_impact         (idmef_assessment_t *ptr,
                                                         idmef_impact_t *impact);
int                 idmef_assessment_new_impact         (idmef_assessment_t *ptr,
                                                         idmef_impact_t **ret);
idmef_action_t *    idmef_assessment_get_next_action    (idmef_assessment_t *assessment,
                                                         idmef_action_t *action_cur);
void                idmef_assessment_set_action         (idmef_assessment_t *ptr,
                                                         idmef_action_t *object,
                                                         int pos);
int                 idmef_assessment_new_action         (idmef_assessment_t *ptr,
                                                         idmef_action_t **ret,
                                                         int pos);
idmef_confidence_t * idmef_assessment_get_confidence    (idmef_assessment_t *ptr);
void                idmef_assessment_set_confidence     (idmef_assessment_t *ptr,
                                                         idmef_confidence_t *confidence);
int                 idmef_assessment_new_confidence     (idmef_assessment_t *ptr,
                                                         idmef_confidence_t **ret);
typedef             idmef_tool_alert_t;
int                 idmef_tool_alert_new                (idmef_tool_alert_t **ret);
int                 idmef_tool_alert_copy               (const idmef_tool_alert_t *src,
                                                         idmef_tool_alert_t *dst);
int                 idmef_tool_alert_clone              (idmef_tool_alert_t *src,
                                                         idmef_tool_alert_t **dst);
idmef_tool_alert_t * idmef_tool_alert_ref               (idmef_tool_alert_t *tool_alert);
void                idmef_tool_alert_destroy            (idmef_tool_alert_t *ptr);
prelude_string_t *  idmef_tool_alert_get_name           (idmef_tool_alert_t *ptr);
void                idmef_tool_alert_set_name           (idmef_tool_alert_t *ptr,
                                                         prelude_string_t *name);
int                 idmef_tool_alert_new_name           (idmef_tool_alert_t *ptr,
                                                         prelude_string_t **ret);
prelude_string_t *  idmef_tool_alert_get_command        (idmef_tool_alert_t *ptr);
void                idmef_tool_alert_set_command        (idmef_tool_alert_t *ptr,
                                                         prelude_string_t *command);
int                 idmef_tool_alert_new_command        (idmef_tool_alert_t *ptr,
                                                         prelude_string_t **ret);
idmef_alertident_t * idmef_tool_alert_get_next_alertident
                                                        (idmef_tool_alert_t *tool_alert,
                                                         idmef_alertident_t *alertident_cur);
void                idmef_tool_alert_set_alertident     (idmef_tool_alert_t *ptr,
                                                         idmef_alertident_t *object,
                                                         int pos);
int                 idmef_tool_alert_new_alertident     (idmef_tool_alert_t *ptr,
                                                         idmef_alertident_t **ret,
                                                         int pos);
typedef             idmef_correlation_alert_t;
int                 idmef_correlation_alert_new         (idmef_correlation_alert_t **ret);
int                 idmef_correlation_alert_copy        (const idmef_correlation_alert_t *src,
                                                         idmef_correlation_alert_t *dst);
int                 idmef_correlation_alert_clone       (idmef_correlation_alert_t *src,
                                                         idmef_correlation_alert_t **dst);
idmef_correlation_alert_t * idmef_correlation_alert_ref (idmef_correlation_alert_t *correlation_alert);
void                idmef_correlation_alert_destroy     (idmef_correlation_alert_t *ptr);
prelude_string_t *  idmef_correlation_alert_get_name    (idmef_correlation_alert_t *ptr);
void                idmef_correlation_alert_set_name    (idmef_correlation_alert_t *ptr,
                                                         prelude_string_t *name);
int                 idmef_correlation_alert_new_name    (idmef_correlation_alert_t *ptr,
                                                         prelude_string_t **ret);
idmef_alertident_t * idmef_correlation_alert_get_next_alertident
                                                        (idmef_correlation_alert_t *correlation_alert,
                                                         idmef_alertident_t *alertident_cur);
void                idmef_correlation_alert_set_alertident
                                                        (idmef_correlation_alert_t *ptr,
                                                         idmef_alertident_t *object,
                                                         int pos);
int                 idmef_correlation_alert_new_alertident
                                                        (idmef_correlation_alert_t *ptr,
                                                         idmef_alertident_t **ret,
                                                         int pos);
typedef             idmef_overflow_alert_t;
int                 idmef_overflow_alert_new            (idmef_overflow_alert_t **ret);
int                 idmef_overflow_alert_copy           (const idmef_overflow_alert_t *src,
                                                         idmef_overflow_alert_t *dst);
int                 idmef_overflow_alert_clone          (idmef_overflow_alert_t *src,
                                                         idmef_overflow_alert_t **dst);
idmef_overflow_alert_t * idmef_overflow_alert_ref       (idmef_overflow_alert_t *overflow_alert);
void                idmef_overflow_alert_destroy        (idmef_overflow_alert_t *ptr);
prelude_string_t *  idmef_overflow_alert_get_program    (idmef_overflow_alert_t *ptr);
void                idmef_overflow_alert_set_program    (idmef_overflow_alert_t *ptr,
                                                         prelude_string_t *program);
int                 idmef_overflow_alert_new_program    (idmef_overflow_alert_t *ptr,
                                                         prelude_string_t **ret);
void                idmef_overflow_alert_unset_size     (idmef_overflow_alert_t *ptr);
uint32_t *          idmef_overflow_alert_get_size       (idmef_overflow_alert_t *ptr);
void                idmef_overflow_alert_set_size       (idmef_overflow_alert_t *ptr,
                                                         uint32_t size);
int                 idmef_overflow_alert_new_size       (idmef_overflow_alert_t *ptr,
                                                         uint32_t **ret);
idmef_data_t *      idmef_overflow_alert_get_buffer     (idmef_overflow_alert_t *ptr);
void                idmef_overflow_alert_set_buffer     (idmef_overflow_alert_t *ptr,
                                                         idmef_data_t *buffer);
int                 idmef_overflow_alert_new_buffer     (idmef_overflow_alert_t *ptr,
                                                         idmef_data_t **ret);
enum                idmef_alert_type_t;
idmef_alert_type_t  idmef_alert_type_to_numeric         (const char *name);
const char *        idmef_alert_type_to_string          (idmef_alert_type_t val);
typedef             idmef_alert_t;
int                 idmef_alert_new                     (idmef_alert_t **ret);
int                 idmef_alert_copy                    (const idmef_alert_t *src,
                                                         idmef_alert_t *dst);
int                 idmef_alert_clone                   (idmef_alert_t *src,
                                                         idmef_alert_t **dst);
idmef_alert_t *     idmef_alert_ref                     (idmef_alert_t *alert);
void                idmef_alert_destroy                 (idmef_alert_t *ptr);
prelude_string_t *  idmef_alert_get_messageid           (idmef_alert_t *ptr);
void                idmef_alert_set_messageid           (idmef_alert_t *ptr,
                                                         prelude_string_t *messageid);
int                 idmef_alert_new_messageid           (idmef_alert_t *ptr,
                                                         prelude_string_t **ret);
idmef_analyzer_t *  idmef_alert_get_next_analyzer       (idmef_alert_t *alert,
                                                         idmef_analyzer_t *analyzer_cur);
void                idmef_alert_set_analyzer            (idmef_alert_t *ptr,
                                                         idmef_analyzer_t *object,
                                                         int pos);
int                 idmef_alert_new_analyzer            (idmef_alert_t *ptr,
                                                         idmef_analyzer_t **ret,
                                                         int pos);
idmef_time_t *      idmef_alert_get_create_time         (idmef_alert_t *ptr);
void                idmef_alert_set_create_time         (idmef_alert_t *ptr,
                                                         idmef_time_t *create_time);
int                 idmef_alert_new_create_time         (idmef_alert_t *ptr,
                                                         idmef_time_t **ret);
idmef_classification_t * idmef_alert_get_classification (idmef_alert_t *ptr);
void                idmef_alert_set_classification      (idmef_alert_t *ptr,
                                                         idmef_classification_t *classification);
int                 idmef_alert_new_classification      (idmef_alert_t *ptr,
                                                         idmef_classification_t **ret);
idmef_time_t *      idmef_alert_get_detect_time         (idmef_alert_t *ptr);
void                idmef_alert_set_detect_time         (idmef_alert_t *ptr,
                                                         idmef_time_t *detect_time);
int                 idmef_alert_new_detect_time         (idmef_alert_t *ptr,
                                                         idmef_time_t **ret);
idmef_time_t *      idmef_alert_get_analyzer_time       (idmef_alert_t *ptr);
void                idmef_alert_set_analyzer_time       (idmef_alert_t *ptr,
                                                         idmef_time_t *analyzer_time);
int                 idmef_alert_new_analyzer_time       (idmef_alert_t *ptr,
                                                         idmef_time_t **ret);
idmef_source_t *    idmef_alert_get_next_source         (idmef_alert_t *alert,
                                                         idmef_source_t *source_cur);
void                idmef_alert_set_source              (idmef_alert_t *ptr,
                                                         idmef_source_t *object,
                                                         int pos);
int                 idmef_alert_new_source              (idmef_alert_t *ptr,
                                                         idmef_source_t **ret,
                                                         int pos);
idmef_target_t *    idmef_alert_get_next_target         (idmef_alert_t *alert,
                                                         idmef_target_t *target_cur);
void                idmef_alert_set_target              (idmef_alert_t *ptr,
                                                         idmef_target_t *object,
                                                         int pos);
int                 idmef_alert_new_target              (idmef_alert_t *ptr,
                                                         idmef_target_t **ret,
                                                         int pos);
idmef_assessment_t * idmef_alert_get_assessment         (idmef_alert_t *ptr);
void                idmef_alert_set_assessment          (idmef_alert_t *ptr,
                                                         idmef_assessment_t *assessment);
int                 idmef_alert_new_assessment          (idmef_alert_t *ptr,
                                                         idmef_assessment_t **ret);
idmef_additional_data_t * idmef_alert_get_next_additional_data
                                                        (idmef_alert_t *alert,
                                                         idmef_additional_data_t *additional_data_cur);
void                idmef_alert_set_additional_data     (idmef_alert_t *ptr,
                                                         idmef_additional_data_t *object,
                                                         int pos);
int                 idmef_alert_new_additional_data     (idmef_alert_t *ptr,
                                                         idmef_additional_data_t **ret,
                                                         int pos);
idmef_alert_type_t  idmef_alert_get_type                (idmef_alert_t *ptr);
idmef_tool_alert_t * idmef_alert_get_tool_alert         (idmef_alert_t *ptr);
void                idmef_alert_set_tool_alert          (idmef_alert_t *ptr,
                                                         idmef_tool_alert_t *tool_alert);
int                 idmef_alert_new_tool_alert          (idmef_alert_t *ptr,
                                                         idmef_tool_alert_t **ret);
idmef_correlation_alert_t * idmef_alert_get_correlation_alert
                                                        (idmef_alert_t *ptr);
void                idmef_alert_set_correlation_alert   (idmef_alert_t *ptr,
                                                         idmef_correlation_alert_t *correlation_alert);
int                 idmef_alert_new_correlation_alert   (idmef_alert_t *ptr,
                                                         idmef_correlation_alert_t **ret);
idmef_overflow_alert_t * idmef_alert_get_overflow_alert (idmef_alert_t *ptr);
void                idmef_alert_set_overflow_alert      (idmef_alert_t *ptr,
                                                         idmef_overflow_alert_t *overflow_alert);
int                 idmef_alert_new_overflow_alert      (idmef_alert_t *ptr,
                                                         idmef_overflow_alert_t **ret);
typedef             idmef_heartbeat_t;
int                 idmef_heartbeat_new                 (idmef_heartbeat_t **ret);
int                 idmef_heartbeat_copy                (const idmef_heartbeat_t *src,
                                                         idmef_heartbeat_t *dst);
int                 idmef_heartbeat_clone               (idmef_heartbeat_t *src,
                                                         idmef_heartbeat_t **dst);
idmef_heartbeat_t * idmef_heartbeat_ref                 (idmef_heartbeat_t *heartbeat);
void                idmef_heartbeat_destroy             (idmef_heartbeat_t *ptr);
prelude_string_t *  idmef_heartbeat_get_messageid       (idmef_heartbeat_t *ptr);
void                idmef_heartbeat_set_messageid       (idmef_heartbeat_t *ptr,
                                                         prelude_string_t *messageid);
int                 idmef_heartbeat_new_messageid       (idmef_heartbeat_t *ptr,
                                                         prelude_string_t **ret);
idmef_analyzer_t *  idmef_heartbeat_get_next_analyzer   (idmef_heartbeat_t *heartbeat,
                                                         idmef_analyzer_t *analyzer_cur);
void                idmef_heartbeat_set_analyzer        (idmef_heartbeat_t *ptr,
                                                         idmef_analyzer_t *object,
                                                         int pos);
int                 idmef_heartbeat_new_analyzer        (idmef_heartbeat_t *ptr,
                                                         idmef_analyzer_t **ret,
                                                         int pos);
idmef_time_t *      idmef_heartbeat_get_create_time     (idmef_heartbeat_t *ptr);
void                idmef_heartbeat_set_create_time     (idmef_heartbeat_t *ptr,
                                                         idmef_time_t *create_time);
int                 idmef_heartbeat_new_create_time     (idmef_heartbeat_t *ptr,
                                                         idmef_time_t **ret);
idmef_time_t *      idmef_heartbeat_get_analyzer_time   (idmef_heartbeat_t *ptr);
void                idmef_heartbeat_set_analyzer_time   (idmef_heartbeat_t *ptr,
                                                         idmef_time_t *analyzer_time);
int                 idmef_heartbeat_new_analyzer_time   (idmef_heartbeat_t *ptr,
                                                         idmef_time_t **ret);
void                idmef_heartbeat_unset_heartbeat_interval
                                                        (idmef_heartbeat_t *ptr);
uint32_t *          idmef_heartbeat_get_heartbeat_interval
                                                        (idmef_heartbeat_t *ptr);
void                idmef_heartbeat_set_heartbeat_interval
                                                        (idmef_heartbeat_t *ptr,
                                                         uint32_t heartbeat_interval);
int                 idmef_heartbeat_new_heartbeat_interval
                                                        (idmef_heartbeat_t *ptr,
                                                         uint32_t **ret);
idmef_additional_data_t * idmef_heartbeat_get_next_additional_data
                                                        (idmef_heartbeat_t *heartbeat,
                                                         idmef_additional_data_t *additional_data_cur);
void                idmef_heartbeat_set_additional_data (idmef_heartbeat_t *ptr,
                                                         idmef_additional_data_t *object,
                                                         int pos);
int                 idmef_heartbeat_new_additional_data (idmef_heartbeat_t *ptr,
                                                         idmef_additional_data_t **ret,
                                                         int pos);
enum                idmef_message_type_t;
idmef_message_type_t  idmef_message_type_to_numeric     (const char *name);
const char *        idmef_message_type_to_string        (idmef_message_type_t val);
typedef             idmef_message_t;
int                 idmef_message_new                   (idmef_message_t **ret);
int                 idmef_message_copy                  (const idmef_message_t *src,
                                                         idmef_message_t *dst);
int                 idmef_message_clone                 (idmef_message_t *src,
                                                         idmef_message_t **dst);
idmef_message_t *   idmef_message_ref                   (idmef_message_t *message);
void                idmef_message_destroy               (idmef_message_t *ptr);
prelude_string_t *  idmef_message_get_version           (idmef_message_t *ptr);
void                idmef_message_set_version           (idmef_message_t *ptr,
                                                         prelude_string_t *version);
int                 idmef_message_new_version           (idmef_message_t *ptr,
                                                         prelude_string_t **ret);
idmef_message_type_t  idmef_message_get_type            (idmef_message_t *ptr);
idmef_alert_t *     idmef_message_get_alert             (idmef_message_t *ptr);
void                idmef_message_set_alert             (idmef_message_t *ptr,
                                                         idmef_alert_t *alert);
int                 idmef_message_new_alert             (idmef_message_t *ptr,
                                                         idmef_alert_t **ret);
idmef_heartbeat_t * idmef_message_get_heartbeat         (idmef_message_t *ptr);
void                idmef_message_set_heartbeat         (idmef_message_t *ptr,
                                                         idmef_heartbeat_t *heartbeat);
int                 idmef_message_new_heartbeat         (idmef_message_t *ptr,
                                                         idmef_heartbeat_t **ret);
void                idmef_message_set_pmsg              (idmef_message_t *message,
                                                         prelude_msg_t *msg);
prelude_msg_t *     idmef_message_get_pmsg              (idmef_message_t *message);
int                 idmef_action_compare                (const idmef_action_t *obj1,
                                                         const idmef_action_t *obj2);
int                 idmef_additional_data_compare       (const idmef_additional_data_t *obj1,
                                                         const idmef_additional_data_t *obj2);
int                 idmef_address_compare               (const idmef_address_t *obj1,
                                                         const idmef_address_t *obj2);
int                 idmef_alert_compare                 (const idmef_alert_t *obj1,
                                                         const idmef_alert_t *obj2);
int                 idmef_alertident_compare            (const idmef_alertident_t *obj1,
                                                         const idmef_alertident_t *obj2);
int                 idmef_analyzer_compare              (const idmef_analyzer_t *obj1,
                                                         const idmef_analyzer_t *obj2);
int                 idmef_assessment_compare            (const idmef_assessment_t *obj1,
                                                         const idmef_assessment_t *obj2);
int                 idmef_checksum_compare              (const idmef_checksum_t *obj1,
                                                         const idmef_checksum_t *obj2);
int                 idmef_classification_compare        (const idmef_classification_t *obj1,
                                                         const idmef_classification_t *obj2);
int                 idmef_confidence_compare            (const idmef_confidence_t *obj1,
                                                         const idmef_confidence_t *obj2);
int                 idmef_correlation_alert_compare     (const idmef_correlation_alert_t *obj1,
                                                         const idmef_correlation_alert_t *obj2);
int                 idmef_data_compare                  (const idmef_data_t *data1,
                                                         const idmef_data_t *data2);
int                 idmef_file_access_compare           (const idmef_file_access_t *obj1,
                                                         const idmef_file_access_t *obj2);
int                 idmef_file_compare                  (const idmef_file_t *obj1,
                                                         const idmef_file_t *obj2);
int                 idmef_heartbeat_compare             (const idmef_heartbeat_t *obj1,
                                                         const idmef_heartbeat_t *obj2);
int                 idmef_impact_compare                (const idmef_impact_t *obj1,
                                                         const idmef_impact_t *obj2);
int                 idmef_inode_compare                 (const idmef_inode_t *obj1,
                                                         const idmef_inode_t *obj2);
int                 idmef_linkage_compare               (const idmef_linkage_t *obj1,
                                                         const idmef_linkage_t *obj2);
int                 idmef_message_compare               (const idmef_message_t *obj1,
                                                         const idmef_message_t *obj2);
int                 idmef_node_compare                  (const idmef_node_t *obj1,
                                                         const idmef_node_t *obj2);
int                 idmef_overflow_alert_compare        (const idmef_overflow_alert_t *obj1,
                                                         const idmef_overflow_alert_t *obj2);
int                 idmef_process_compare               (const idmef_process_t *obj1,
                                                         const idmef_process_t *obj2);
int                 idmef_reference_compare             (const idmef_reference_t *obj1,
                                                         const idmef_reference_t *obj2);
int                 idmef_service_compare               (const idmef_service_t *obj1,
                                                         const idmef_service_t *obj2);
int                 idmef_snmp_service_compare          (const idmef_snmp_service_t *obj1,
                                                         const idmef_snmp_service_t *obj2);
int                 idmef_source_compare                (const idmef_source_t *obj1,
                                                         const idmef_source_t *obj2);
int                 idmef_target_compare                (const idmef_target_t *obj1,
                                                         const idmef_target_t *obj2);
int                 idmef_time_compare                  (const idmef_time_t *time1,
                                                         const idmef_time_t *time2);
int                 idmef_tool_alert_compare            (const idmef_tool_alert_t *obj1,
                                                         const idmef_tool_alert_t *obj2);
int                 idmef_user_compare                  (const idmef_user_t *obj1,
                                                         const idmef_user_t *obj2);
int                 idmef_user_id_compare               (const idmef_user_id_t *obj1,
                                                         const idmef_user_id_t *obj2);
int                 idmef_web_service_compare           (const idmef_web_service_t *obj1,
                                                         const idmef_web_service_t *obj2);
#define             IDMEF_CLASS_ID_ADDITIONAL_DATA_TYPE
#define             IDMEF_CLASS_ID_ADDITIONAL_DATA
#define             IDMEF_CLASS_ID_REFERENCE_ORIGIN
#define             IDMEF_CLASS_ID_REFERENCE
#define             IDMEF_CLASS_ID_CLASSIFICATION
#define             IDMEF_CLASS_ID_USER_ID_TYPE
#define             IDMEF_CLASS_ID_USER_ID
#define             IDMEF_CLASS_ID_USER_CATEGORY
#define             IDMEF_CLASS_ID_USER
#define             IDMEF_CLASS_ID_ADDRESS_CATEGORY
#define             IDMEF_CLASS_ID_ADDRESS
#define             IDMEF_CLASS_ID_PROCESS
#define             IDMEF_CLASS_ID_WEB_SERVICE
#define             IDMEF_CLASS_ID_SNMP_SERVICE
#define             IDMEF_CLASS_ID_SERVICE_TYPE
#define             IDMEF_CLASS_ID_SERVICE
#define             IDMEF_CLASS_ID_NODE_CATEGORY
#define             IDMEF_CLASS_ID_NODE
#define             IDMEF_CLASS_ID_SOURCE_SPOOFED
#define             IDMEF_CLASS_ID_SOURCE
#define             IDMEF_CLASS_ID_FILE_ACCESS
#define             IDMEF_CLASS_ID_INODE
#define             IDMEF_CLASS_ID_CHECKSUM_ALGORITHM
#define             IDMEF_CLASS_ID_CHECKSUM
#define             IDMEF_CLASS_ID_FILE_CATEGORY
#define             IDMEF_CLASS_ID_FILE_FSTYPE
#define             IDMEF_CLASS_ID_FILE
#define             IDMEF_CLASS_ID_LINKAGE_CATEGORY
#define             IDMEF_CLASS_ID_LINKAGE
#define             IDMEF_CLASS_ID_TARGET_DECOY
#define             IDMEF_CLASS_ID_TARGET
#define             IDMEF_CLASS_ID_ANALYZER
#define             IDMEF_CLASS_ID_ALERTIDENT
#define             IDMEF_CLASS_ID_IMPACT_SEVERITY
#define             IDMEF_CLASS_ID_IMPACT_COMPLETION
#define             IDMEF_CLASS_ID_IMPACT_TYPE
#define             IDMEF_CLASS_ID_IMPACT
#define             IDMEF_CLASS_ID_ACTION_CATEGORY
#define             IDMEF_CLASS_ID_ACTION
#define             IDMEF_CLASS_ID_CONFIDENCE_RATING
#define             IDMEF_CLASS_ID_CONFIDENCE
#define             IDMEF_CLASS_ID_ASSESSMENT
#define             IDMEF_CLASS_ID_TOOL_ALERT
#define             IDMEF_CLASS_ID_CORRELATION_ALERT
#define             IDMEF_CLASS_ID_OVERFLOW_ALERT
#define             IDMEF_CLASS_ID_ALERT_TYPE
#define             IDMEF_CLASS_ID_ALERT
#define             IDMEF_CLASS_ID_HEARTBEAT
#define             IDMEF_CLASS_ID_MESSAGE_TYPE
#define             IDMEF_CLASS_ID_MESSAGE

Description

The IDMEF API is used by a sensor in order to generate events. IDMEF is an alert description format allowing almost any alert information to fit within an IDMEF alert, independantly of the type of analyzer used.

Here is real world example taken from the Snort Prelude sensors. The top level IDMEF object is always of type idmef_message_t. You should refer to the IDMEF draft, or to the Prelude API documentation in order to get a complete listing of theses objects, or a description of what information an object may carry.

void snort_alert_prelude(Packet *p, char *msg, void *data, Event *event)
{
        int ret;
        idmef_time_t *time;
        idmef_alert_t *alert;
        prelude_string_t *str;
        idmef_message_t *idmef;
        idmef_classification_t *class;
        prelude_client_t *client = data;
        ret = idmef_message_new(&idmef);
        if ( ret < 0 )
                return;
        ret = idmef_message_new_alert(idmef, &alert);
        if ( ret < 0 )
                goto err;
        ret = idmef_alert_new_classification(alert, &class);
        if ( ret < 0 )
                goto err;
        ret = idmef_classification_new_text(class, &str);
        if ( ret < 0 )
                goto err;
        prelude_string_set_ref(str, msg);
        ret = event_to_impact(event, alert);
        if ( ret < 0 )
                goto err;
        ret = event_to_reference(event, class);
        if ( ret < 0 )
                goto err;
        ret = event_to_source_target(p, alert);
        if ( ret < 0 )
                goto err;
        ret = packet_to_data(p, event, alert);
        if ( ret < 0 )
                goto err;
        ret = idmef_alert_new_detect_time(alert, &time);
        if ( ret < 0 )
                goto err;
        idmef_time_set_from_timeval(time, &p->pkth->ts);
        ret = idmef_time_new_from_gettimeofday(&time);
        if ( ret < 0 )
                goto err;
        idmef_alert_set_create_time(alert, time);
        idmef_alert_set_analyzer(alert, idmef_analyzer_ref(prelude_client_get_analyzer(client)), 0);
        prelude_client_send_idmef(client, idmef);
 err:
        idmef_message_destroy(idmef);
	prelude_perror(ret, "Unable to create IDMEF alert");
}

Details

IDMEF_LIST_APPEND

#define IDMEF_LIST_APPEND  INT_MAX


IDMEF_LIST_PREPEND

#define IDMEF_LIST_PREPEND (INT_MAX - 1)


idmef_message_get_data ()

int                 idmef_message_get_data              (idmef_message_t *message,
                                                         const char *path,
                                                         unsigned char **data,
                                                         size_t *size);

message :

path :

data :

size :

Returns :


idmef_message_get_number ()

int                 idmef_message_get_number            (idmef_message_t *message,
                                                         const char *path,
                                                         double *result);

Retrieve the number stored within path of message and store it in the user provided result.

message :

Pointer to an idmef_message_t object.

path :

Path to retrieve the number from within message.

result :

Pointer where the result should be stored.

Returns :

A positive value in case path was successfully retrieved 0 if the path is empty, or a negative value if an error occured.

idmef_message_get_string ()

int                 idmef_message_get_string            (idmef_message_t *message,
                                                         const char *path,
                                                         char **result);

Retrieve the string stored within path of message and store it in the user provided result.

The caller is responssible for freeing result.

message :

Pointer to an idmef_message_t object.

path :

Path to retrieve the string from within message.

result :

Pointer where the result should be stored.

Returns :

A positive value in case path was successfully retrieved 0 if the path is empty, or a negative value if an error occured.

idmef_message_get_value ()

int                 idmef_message_get_value             (idmef_message_t *message,
                                                         const char *path,
                                                         idmef_value_t **value);

Retrieve the value stored within path of message and store it in the user provided value.

message :

Pointer to an idmef_message_t object.

path :

Path to retrieve the value from within message.

value :

Pointer where the result should be stored.

Returns :

A positive value in case path was successfully retrieved 0 if the path is empty, or a negative value if an error occured.

idmef_message_set_data ()

int                 idmef_message_set_data              (idmef_message_t *message,
                                                         const char *path,
                                                         unsigned char *data,
                                                         size_t size);

This function will set the path member within message to the provided data of size size.

message :

Pointer to an idmef_message_t object.

path :

Path to be set within message.

data :

Pointer to data to associate message[path] with.

size :

Size of the data pointed to by data.

Returns :

0 on success, or a negative value if an error occured.

idmef_message_set_number ()

int                 idmef_message_set_number            (idmef_message_t *message,
                                                         const char *path,
                                                         double number);

This function will set the path member within message to the provided value, which will be converted to the path value type.

Example: idmef_message_set_number(message, "alert.assessment.confidence.confidence", 0.123456); idmef_message_set_number(message, "alert.source(0).service.port", 1024);

message :

Pointer to an idmef_message_t object.

path :

Path to be set within message.

number :

Value to associate message[path] with.

Returns :

0 on success, or a negative value if an error occured.

idmef_message_set_string ()

int                 idmef_message_set_string            (idmef_message_t *message,
                                                         const char *path,
                                                         const char *value);

This function will set the path member within message to the provided value, which will be converted to the corresponding path value type.

Example: idmef_message_set_string(message, "alert.classification.text", "MyText"); idmef_message_set_string(message, "alert.source(0).service.port", "1024");

message :

Pointer to an idmef_message_t object.

path :

Path to be set within message.

value :

Value to associate message[path] with.

Returns :

0 on success, or a negative value if an error occured.

idmef_message_set_value ()

int                 idmef_message_set_value             (idmef_message_t *message,
                                                         const char *path,
                                                         idmef_value_t *value);

This function will set the path member within message to the provided value.

message :

Pointer to an idmef_message_t object.

path :

Path to be set within message.

value :

Value to associate message[path] with.

Returns :

0 on success, or a negative value if an error occured.

enum idmef_additional_data_type_t

typedef enum {
        IDMEF_ADDITIONAL_DATA_TYPE_ERROR = -1,
        IDMEF_ADDITIONAL_DATA_TYPE_STRING = 0,
        IDMEF_ADDITIONAL_DATA_TYPE_BYTE = 1,
        IDMEF_ADDITIONAL_DATA_TYPE_CHARACTER = 2,
        IDMEF_ADDITIONAL_DATA_TYPE_DATE_TIME = 3,
        IDMEF_ADDITIONAL_DATA_TYPE_INTEGER = 4,
        IDMEF_ADDITIONAL_DATA_TYPE_NTPSTAMP = 5,
        IDMEF_ADDITIONAL_DATA_TYPE_PORTLIST = 6,
        IDMEF_ADDITIONAL_DATA_TYPE_REAL = 7,
        IDMEF_ADDITIONAL_DATA_TYPE_BOOLEAN = 8,
        IDMEF_ADDITIONAL_DATA_TYPE_BYTE_STRING = 9,
        IDMEF_ADDITIONAL_DATA_TYPE_XML = 10
} idmef_additional_data_type_t;


idmef_additional_data_type_to_numeric ()

idmef_additional_data_type_t  idmef_additional_data_type_to_numeric
                                                        (const char *name);

name :

pointer to an IDMEF string representation of a idmef_additional_data_type_t value.

Returns :

the numeric equivalent of name, or -1 if name is not valid.

idmef_additional_data_type_to_string ()

const char *        idmef_additional_data_type_to_string
                                                        (idmef_additional_data_type_t val);

Return the IDMEF string equivalent of val provided idmef_additional_data_type_t value.

val :

an enumeration value for idmef_additional_data_type_t.

Returns :

a pointer to the string describing val, or NULL if val is invalid.

idmef_additional_data_t

typedef struct idmef_additional_data idmef_additional_data_t;


idmef_additional_data_new ()

int                 idmef_additional_data_new           (idmef_additional_data_t **ret);

Create a new idmef_additional_data_t object.

ret :

Pointer where to store the created idmef_additional_data_t object.

Returns :

0 on success, a negative value if an error occured.

idmef_additional_data_copy ()

int                 idmef_additional_data_copy          (const idmef_additional_data_t *src,
                                                         idmef_additional_data_t *dst);

Copy a new idmef_additional_data_t object from src to dst.

src :

Source of the copy.

dst :

Where to copy the object.

Returns :

0 on success, a negative value if an error occured.

idmef_additional_data_clone ()

int                 idmef_additional_data_clone         (idmef_additional_data_t *src,
                                                         idmef_additional_data_t **dst);

Create a copy of src, and store it in dst.

src :

Object to be cloned.

dst :

Address where to store the pointer to the cloned object.

Returns :

0 on success, a negative value if an error occured.

idmef_additional_data_ref ()

idmef_additional_data_t * idmef_additional_data_ref     (idmef_additional_data_t *additional_data);

Increase additional_data reference count, so that it can be referenced multiple time.

additional_data :

pointer to a idmef_additional_data_t object.

Returns :

a pointer to additional_data.

idmef_additional_data_destroy ()

void                idmef_additional_data_destroy       (idmef_additional_data_t *ptr);

Destroy ptr and all of it's children. The objects are only destroyed if their reference count reach zero.

ptr :

pointer to a idmef_additional_data_t object.

idmef_additional_data_get_type ()

idmef_additional_data_type_t  idmef_additional_data_get_type
                                                        (idmef_additional_data_t *ptr);

Get type children of the idmef_additional_data_t object.

ptr :

pointer to a idmef_additional_data_t object.

Returns :

a pointer to a idmef_additional_data_type_t object, or NULL if the children object is not set.

idmef_additional_data_set_type ()

void                idmef_additional_data_set_type      (idmef_additional_data_t *ptr,
                                                         idmef_additional_data_type_t type);

Set type object as a children of ptr. if ptr already contain an type object, then it is destroyed, and updated to point to the provided type object.

ptr :

pointer to a idmef_additional_data_t object.

type :

pointer to a idmef_additional_data_type_t object.

idmef_additional_data_new_type ()

int                 idmef_additional_data_new_type      (idmef_additional_data_t *ptr,
                                                         idmef_additional_data_type_t **ret);

Create a new type object, children of idmef_additional_data_t. If ptr already contain a idmef_additional_data_type_t object, then it is destroyed.

ptr :

pointer to a idmef_additional_data_t object.

ret :

pointer to an address where to store the created idmef_additional_data_type_t object.

Returns :

0 on success, or a negative value if an error occured.

idmef_additional_data_get_meaning ()

prelude_string_t *  idmef_additional_data_get_meaning   (idmef_additional_data_t *ptr);

ptr :

Returns :


idmef_additional_data_set_meaning ()

void                idmef_additional_data_set_meaning   (idmef_additional_data_t *ptr,
                                                         prelude_string_t *meaning);

Set meaning object as a children of ptr. if ptr already contain an meaning object, then it is destroyed, and updated to point to the provided meaning object.

ptr :

pointer to a idmef_additional_data_t object.

meaning :

pointer to a prelude_string_t object.

idmef_additional_data_new_meaning ()

int                 idmef_additional_data_new_meaning   (idmef_additional_data_t *ptr,
                                                         prelude_string_t **ret);

Create a new meaning object, children of idmef_additional_data_t. If ptr already contain a prelude_string_t object, then it is destroyed.

ptr :

pointer to a idmef_additional_data_t object.

ret :

pointer to an address where to store the created prelude_string_t object.

Returns :

0 on success, or a negative value if an error occured.

idmef_additional_data_get_data ()

idmef_data_t *      idmef_additional_data_get_data      (idmef_additional_data_t *ptr);

ptr :

Returns :


idmef_additional_data_set_data ()

void                idmef_additional_data_set_data      (idmef_additional_data_t *ptr,
                                                         idmef_data_t *data);

Set data object as a children of ptr. if ptr already contain an data object, then it is destroyed, and updated to point to the provided data object.

ptr :

pointer to a idmef_additional_data_t object.

data :

pointer to a idmef_data_t object.

idmef_additional_data_new_data ()

int                 idmef_additional_data_new_data      (idmef_additional_data_t *ptr,
                                                         idmef_data_t **ret);

Create a new data object, children of idmef_additional_data_t. If ptr already contain a idmef_data_t object, then it is destroyed.

ptr :

pointer to a idmef_additional_data_t object.

ret :

pointer to an address where to store the created idmef_data_t object.

Returns :

0 on success, or a negative value if an error occured.

enum idmef_reference_origin_t

typedef enum {
        IDMEF_REFERENCE_ORIGIN_ERROR = -1,
        IDMEF_REFERENCE_ORIGIN_UNKNOWN = 0,
        IDMEF_REFERENCE_ORIGIN_VENDOR_SPECIFIC = 1,
        IDMEF_REFERENCE_ORIGIN_USER_SPECIFIC = 2,
        IDMEF_REFERENCE_ORIGIN_BUGTRAQID = 3,
        IDMEF_REFERENCE_ORIGIN_CVE = 4,
        IDMEF_REFERENCE_ORIGIN_OSVDB = 5
} idmef_reference_origin_t;


idmef_reference_origin_to_numeric ()

idmef_reference_origin_t  idmef_reference_origin_to_numeric
                                                        (const char *name);

name :

pointer to an IDMEF string representation of a idmef_reference_origin_t value.

Returns :

the numeric equivalent of name, or -1 if name is not valid.

idmef_reference_origin_to_string ()

const char *        idmef_reference_origin_to_string    (idmef_reference_origin_t val);

Return the IDMEF string equivalent of val provided idmef_reference_origin_t value.

val :

an enumeration value for idmef_reference_origin_t.

Returns :

a pointer to the string describing val, or NULL if val is invalid.

idmef_reference_t

typedef struct idmef_reference idmef_reference_t;


idmef_reference_new ()

int                 idmef_reference_new                 (idmef_reference_t **ret);

Create a new idmef_reference_t object.

ret :

Pointer where to store the created idmef_reference_t object.

Returns :

0 on success, a negative value if an error occured.

idmef_reference_copy ()

int                 idmef_reference_copy                (const idmef_reference_t *src,
                                                         idmef_reference_t *dst);

Copy a new idmef_reference_t object from src to dst.

src :

Source of the copy.

dst :

Where to copy the object.

Returns :

0 on success, a negative value if an error occured.

idmef_reference_clone ()

int                 idmef_reference_clone               (idmef_reference_t *src,
                                                         idmef_reference_t **dst);

Create a copy of src, and store it in dst.

src :

Object to be cloned.

dst :

Address where to store the pointer to the cloned object.

Returns :

0 on success, a negative value if an error occured.

idmef_reference_ref ()

idmef_reference_t * idmef_reference_ref                 (idmef_reference_t *reference);

Increase reference reference count, so that it can be referenced multiple time.

reference :

pointer to a idmef_reference_t object.

Returns :

a pointer to reference.

idmef_reference_destroy ()

void                idmef_reference_destroy             (idmef_reference_t *ptr);

Destroy ptr and all of it's children. The objects are only destroyed if their reference count reach zero.

ptr :

pointer to a idmef_reference_t object.

idmef_reference_get_origin ()

idmef_reference_origin_t  idmef_reference_get_origin    (idmef_reference_t *ptr);

Get origin children of the idmef_reference_t object.

ptr :

pointer to a idmef_reference_t object.

Returns :

a pointer to a idmef_reference_origin_t object, or NULL if the children object is not set.

idmef_reference_set_origin ()

void                idmef_reference_set_origin          (idmef_reference_t *ptr,
                                                         idmef_reference_origin_t origin);

Set origin object as a children of ptr. if ptr already contain an origin object, then it is destroyed, and updated to point to the provided origin object.

ptr :

pointer to a idmef_reference_t object.

origin :

pointer to a idmef_reference_origin_t object.

idmef_reference_new_origin ()

int                 idmef_reference_new_origin          (idmef_reference_t *ptr,
                                                         idmef_reference_origin_t **ret);

Create a new origin object, children of idmef_reference_t. If ptr already contain a idmef_reference_origin_t object, then it is destroyed.

ptr :

pointer to a idmef_reference_t object.

ret :

pointer to an address where to store the created idmef_reference_origin_t object.

Returns :

0 on success, or a negative value if an error occured.

idmef_reference_get_name ()

prelude_string_t *  idmef_reference_get_name            (idmef_reference_t *ptr);

ptr :

Returns :


idmef_reference_set_name ()

void                idmef_reference_set_name            (idmef_reference_t *ptr,
                                                         prelude_string_t *name);

Set name object as a children of ptr. if ptr already contain an name object, then it is destroyed, and updated to point to the provided name object.

ptr :

pointer to a idmef_reference_t object.

name :

pointer to a prelude_string_t object.

idmef_reference_new_name ()

int                 idmef_reference_new_name            (idmef_reference_t *ptr,
                                                         prelude_string_t **ret);

Create a new name object, children of idmef_reference_t. If ptr already contain a prelude_string_t object, then it is destroyed.

ptr :

pointer to a idmef_reference_t object.

ret :

pointer to an address where to store the created prelude_string_t object.

Returns :

0 on success, or a negative value if an error occured.

idmef_reference_get_url ()

prelude_string_t *  idmef_reference_get_url             (idmef_reference_t *ptr);

ptr :

Returns :


idmef_reference_set_url ()

void                idmef_reference_set_url             (idmef_reference_t *ptr,
                                                         prelude_string_t *url);

Set url object as a children of ptr. if ptr already contain an url object, then it is destroyed, and updated to point to the provided url object.

ptr :

pointer to a idmef_reference_t object.

url :

pointer to a prelude_string_t object.

idmef_reference_new_url ()

int                 idmef_reference_new_url             (idmef_reference_t *ptr,
                                                         prelude_string_t **ret);

Create a new url object, children of idmef_reference_t. If ptr already contain a prelude_string_t object, then it is destroyed.

ptr :

pointer to a idmef_reference_t object.

ret :

pointer to an address where to store the created prelude_string_t object.

Returns :

0 on success, or a negative value if an error occured.

idmef_reference_get_meaning ()

prelude_string_t *  idmef_reference_get_meaning         (idmef_reference_t *ptr);

ptr :

Returns :


idmef_reference_set_meaning ()

void                idmef_reference_set_meaning         (idmef_reference_t *ptr,
                                                         prelude_string_t *meaning);

Set meaning object as a children of ptr. if ptr already contain an meaning object, then it is destroyed, and updated to point to the provided meaning object.

ptr :

pointer to a idmef_reference_t object.

meaning :

pointer to a prelude_string_t object.

idmef_reference_new_meaning ()

int                 idmef_reference_new_meaning         (idmef_reference_t *ptr,
                                                         prelude_string_t **ret);

Create a new meaning object, children of idmef_reference_t. If ptr already contain a prelude_string_t object, then it is destroyed.

ptr :

pointer to a idmef_reference_t object.

ret :

pointer to an address where to store the created prelude_string_t object.

Returns :

0 on success, or a negative value if an error occured.

idmef_classification_t

typedef struct idmef_classification idmef_classification_t;


idmef_classification_new ()

int                 idmef_classification_new            (idmef_classification_t **ret);

Create a new idmef_classification_t object.

ret :

Pointer where to store the created idmef_classification_t object.

Returns :

0 on success, a negative value if an error occured.

idmef_classification_copy ()

int                 idmef_classification_copy           (const idmef_classification_t *src,
                                                         idmef_classification_t *dst);

Copy a new idmef_classification_t object from src to dst.

src :

Source of the copy.

dst :

Where to copy the object.

Returns :

0 on success, a negative value if an error occured.

idmef_classification_clone ()

int                 idmef_classification_clone          (idmef_classification_t *src,
                                                         idmef_classification_t **dst);

Create a copy of src, and store it in dst.

src :

Object to be cloned.

dst :

Address where to store the pointer to the cloned object.

Returns :

0 on success, a negative value if an error occured.

idmef_classification_ref ()

idmef_classification_t * idmef_classification_ref       (idmef_classification_t *classification);

Increase classification reference count, so that it can be referenced multiple time.

classification :

pointer to a idmef_classification_t object.

Returns :

a pointer to classification.

idmef_classification_destroy ()

void                idmef_classification_destroy        (idmef_classification_t *ptr);

Destroy ptr and all of it's children. The objects are only destroyed if their reference count reach zero.

ptr :

pointer to a idmef_classification_t object.

idmef_classification_get_ident ()

prelude_string_t *  idmef_classification_get_ident      (idmef_classification_t *ptr);

ptr :

Returns :


idmef_classification_set_ident ()

void                idmef_classification_set_ident      (idmef_classification_t *ptr,
                                                         prelude_string_t *ident);

Set ident object as a children of ptr. if ptr already contain an ident object, then it is destroyed, and updated to point to the provided ident object.

ptr :

pointer to a idmef_classification_t object.

ident :

pointer to a prelude_string_t object.

idmef_classification_new_ident ()

int                 idmef_classification_new_ident      (idmef_classification_t *ptr,
                                                         prelude_string_t **ret);

Create a new ident object, children of idmef_classification_t. If ptr already contain a prelude_string_t object, then it is destroyed.

ptr :

pointer to a idmef_classification_t object.

ret :

pointer to an address where to store the created prelude_string_t object.

Returns :

0 on success, or a negative value if an error occured.

idmef_classification_get_text ()

prelude_string_t *  idmef_classification_get_text       (idmef_classification_t *ptr);

ptr :

Returns :


idmef_classification_set_text ()

void                idmef_classification_set_text       (idmef_classification_t *ptr,
                                                         prelude_string_t *text);

Set text object as a children of ptr. if ptr already contain an text object, then it is destroyed, and updated to point to the provided text object.

ptr :

pointer to a idmef_classification_t object.

text :

pointer to a prelude_string_t object.

idmef_classification_new_text ()

int                 idmef_classification_new_text       (idmef_classification_t *ptr,
                                                         prelude_string_t **ret);

Create a new text object, children of idmef_classification_t. If ptr already contain a prelude_string_t object, then it is destroyed.

ptr :

pointer to a idmef_classification_t object.

ret :

pointer to an address where to store the created prelude_string_t object.

Returns :

0 on success, or a negative value if an error occured.

idmef_classification_get_next_reference ()

idmef_reference_t * idmef_classification_get_next_reference
                                                        (idmef_classification_t *classification,
                                                         idmef_reference_t *reference_cur);

Get the next idmef_reference_t object listed in ptr. When iterating over the idmef_reference_t object listed in ptr, object should be set to the latest returned idmef_reference_t object.

classification :

pointer to a idmef_classification_t object.

reference_cur :

pointer to a idmef_reference_t object.

Returns :

the next idmef_reference_t in the list.

idmef_classification_set_reference ()

void                idmef_classification_set_reference  (idmef_classification_t *ptr,
                                                         idmef_reference_t *object,
                                                         int pos);

Add object to position pos of ptr list of idmef_reference_t object.

If pos is IDMEF_LIST_APPEND, object will be inserted at the tail of the list. If pos is IDMEF_LIST_PREPEND, object will be inserted at the head of the list.

ptr :

pointer to a idmef_classification_t object.

object :

pointer to a idmef_reference_t object.

pos :

Position in the list.

idmef_classification_new_reference ()

int                 idmef_classification_new_reference  (idmef_classification_t *ptr,
                                                         idmef_reference_t **ret,
                                                         int pos);

Create a new idmef_reference_t children of ptr, and add it to position pos of ptr list of idmef_reference_t object. The created idmef_reference_t object is stored in ret.

If pos is IDMEF_LIST_APPEND, object will be inserted at the tail of the list. If pos is IDMEF_LIST_PREPEND, object will be inserted at the head of the list.

ptr :

pointer to a idmef_classification_t object.

ret :

pointer to an address where to store the created idmef_reference_t object.

pos :

position in the list.

Returns :

0 on success, or a negative value if an error occured.

enum idmef_user_id_type_t

typedef enum {
        IDMEF_USER_ID_TYPE_ORIGINAL_ERROR = -1,
        IDMEF_USER_ID_TYPE_ORIGINAL_USER = 0,
        IDMEF_USER_ID_TYPE_CURRENT_USER = 1,
        IDMEF_USER_ID_TYPE_TARGET_USER = 2,
        IDMEF_USER_ID_TYPE_USER_PRIVS = 3,
        IDMEF_USER_ID_TYPE_CURRENT_GROUP = 4,
        IDMEF_USER_ID_TYPE_GROUP_PRIVS = 5,
        IDMEF_USER_ID_TYPE_OTHER_PRIVS = 6
} idmef_user_id_type_t;


idmef_user_id_type_to_numeric ()

idmef_user_id_type_t  idmef_user_id_type_to_numeric     (const char *name);

name :

pointer to an IDMEF string representation of a idmef_user_id_type_t value.

Returns :

the numeric equivalent of name, or -1 if name is not valid.

idmef_user_id_type_to_string ()

const char *        idmef_user_id_type_to_string        (idmef_user_id_type_t val);

Return the IDMEF string equivalent of val provided idmef_user_id_type_t value.

val :

an enumeration value for idmef_user_id_type_t.

Returns :

a pointer to the string describing val, or NULL if val is invalid.

idmef_user_id_t

typedef struct idmef_user_id idmef_user_id_t;


idmef_user_id_new ()

int                 idmef_user_id_new                   (idmef_user_id_t **ret);

Create a new idmef_user_id_t object.

ret :

Pointer where to store the created idmef_user_id_t object.

Returns :

0 on success, a negative value if an error occured.

idmef_user_id_copy ()

int                 idmef_user_id_copy                  (const idmef_user_id_t *src,
                                                         idmef_user_id_t *dst);

Copy a new idmef_user_id_t object from src to dst.

src :

Source of the copy.

dst :

Where to copy the object.

Returns :

0 on success, a negative value if an error occured.

idmef_user_id_clone ()

int                 idmef_user_id_clone                 (idmef_user_id_t *src,
                                                         idmef_user_id_t **dst);

Create a copy of src, and store it in dst.

src :

Object to be cloned.

dst :

Address where to store the pointer to the cloned object.

Returns :

0 on success, a negative value if an error occured.

idmef_user_id_ref ()

idmef_user_id_t *   idmef_user_id_ref                   (idmef_user_id_t *user_id);

Increase user_id reference count, so that it can be referenced multiple time.

user_id :

pointer to a idmef_user_id_t object.

Returns :

a pointer to user_id.

idmef_user_id_destroy ()

void                idmef_user_id_destroy               (idmef_user_id_t *ptr);

Destroy ptr and all of it's children. The objects are only destroyed if their reference count reach zero.

ptr :

pointer to a idmef_user_id_t object.

idmef_user_id_get_ident ()

prelude_string_t *  idmef_user_id_get_ident             (idmef_user_id_t *ptr);

ptr :

Returns :


idmef_user_id_set_ident ()

void                idmef_user_id_set_ident             (idmef_user_id_t *ptr,
                                                         prelude_string_t *ident);

Set ident object as a children of ptr. if ptr already contain an ident object, then it is destroyed, and updated to point to the provided ident object.

ptr :

pointer to a idmef_user_id_t object.

ident :

pointer to a prelude_string_t object.

idmef_user_id_new_ident ()

int                 idmef_user_id_new_ident             (idmef_user_id_t *ptr,
                                                         prelude_string_t **ret);

Create a new ident object, children of idmef_user_id_t. If ptr already contain a prelude_string_t object, then it is destroyed.

ptr :

pointer to a idmef_user_id_t object.

ret :

pointer to an address where to store the created prelude_string_t object.

Returns :

0 on success, or a negative value if an error occured.

idmef_user_id_get_type ()

idmef_user_id_type_t  idmef_user_id_get_type            (idmef_user_id_t *ptr);

Get type children of the idmef_user_id_t object.

ptr :

pointer to a idmef_user_id_t object.

Returns :

a pointer to a idmef_user_id_type_t object, or NULL if the children object is not set.

idmef_user_id_set_type ()

void                idmef_user_id_set_type              (idmef_user_id_t *ptr,
                                                         idmef_user_id_type_t type);

Set type object as a children of ptr. if ptr already contain an type object, then it is destroyed, and updated to point to the provided type object.

ptr :

pointer to a idmef_user_id_t object.

type :

pointer to a idmef_user_id_type_t object.

idmef_user_id_new_type ()

int                 idmef_user_id_new_type              (idmef_user_id_t *ptr,
                                                         idmef_user_id_type_t **ret);

Create a new type object, children of idmef_user_id_t. If ptr already contain a idmef_user_id_type_t object, then it is destroyed.

ptr :

pointer to a idmef_user_id_t object.

ret :

pointer to an address where to store the created idmef_user_id_type_t object.

Returns :

0 on success, or a negative value if an error occured.

idmef_user_id_get_tty ()

prelude_string_t *  idmef_user_id_get_tty               (idmef_user_id_t *ptr);

ptr :

Returns :


idmef_user_id_set_tty ()

void                idmef_user_id_set_tty               (idmef_user_id_t *ptr,
                                                         prelude_string_t *tty);

Set tty object as a children of ptr. if ptr already contain an tty object, then it is destroyed, and updated to point to the provided tty object.

ptr :

pointer to a idmef_user_id_t object.

tty :

pointer to a prelude_string_t object.

idmef_user_id_new_tty ()

int                 idmef_user_id_new_tty               (idmef_user_id_t *ptr,
                                                         prelude_string_t **ret);

Create a new tty object, children of idmef_user_id_t. If ptr already contain a prelude_string_t object, then it is destroyed.

ptr :

pointer to a idmef_user_id_t object.

ret :

pointer to an address where to store the created prelude_string_t object.

Returns :

0 on success, or a negative value if an error occured.

idmef_user_id_get_name ()

prelude_string_t *  idmef_user_id_get_name              (idmef_user_id_t *ptr);

ptr :

Returns :


idmef_user_id_set_name ()

void                idmef_user_id_set_name              (idmef_user_id_t *ptr,
                                                         prelude_string_t *name);

Set name object as a children of ptr. if ptr already contain an name object, then it is destroyed, and updated to point to the provided name object.

ptr :

pointer to a idmef_user_id_t object.

name :

pointer to a prelude_string_t object.

idmef_user_id_new_name ()

int                 idmef_user_id_new_name              (idmef_user_id_t *ptr,
                                                         prelude_string_t **ret);

Create a new name object, children of idmef_user_id_t. If ptr already contain a prelude_string_t object, then it is destroyed.

ptr :

pointer to a idmef_user_id_t object.

ret :

pointer to an address where to store the created prelude_string_t object.

Returns :

0 on success, or a negative value if an error occured.

idmef_user_id_unset_number ()

void                idmef_user_id_unset_number          (idmef_user_id_t *ptr);

ptr :


idmef_user_id_get_number ()

uint32_t *          idmef_user_id_get_number            (idmef_user_id_t *ptr);

ptr :

Returns :


idmef_user_id_set_number ()

void                idmef_user_id_set_number            (idmef_user_id_t *ptr,
                                                         uint32_t number);

Set number object as a children of ptr. if ptr already contain an number object, then it is destroyed, and updated to point to the provided number object.

ptr :

pointer to a idmef_user_id_t object.

number :

pointer to a uint32_t object.

idmef_user_id_new_number ()

int                 idmef_user_id_new_number            (idmef_user_id_t *ptr,
                                                         uint32_t **ret);

Create a new number object, children of idmef_user_id_t. If ptr already contain a uint32_t object, then it is destroyed.

ptr :

pointer to a idmef_user_id_t object.

ret :

pointer to an address where to store the created uint32_t object.

Returns :

0 on success, or a negative value if an error occured.

enum idmef_user_category_t

typedef enum {
        IDMEF_USER_CATEGORY_ERROR = -1,
        IDMEF_USER_CATEGORY_UNKNOWN = 0,
        IDMEF_USER_CATEGORY_APPLICATION = 1,
        IDMEF_USER_CATEGORY_OS_DEVICE = 2
} idmef_user_category_t;


idmef_user_category_to_numeric ()

idmef_user_category_t  idmef_user_category_to_numeric   (const char *name);

name :

pointer to an IDMEF string representation of a idmef_user_category_t value.

Returns :

the numeric equivalent of name, or -1 if name is not valid.

idmef_user_category_to_string ()

const char *        idmef_user_category_to_string       (idmef_user_category_t val);

Return the IDMEF string equivalent of val provided idmef_user_category_t value.

val :

an enumeration value for idmef_user_category_t.

Returns :

a pointer to the string describing val, or NULL if val is invalid.

idmef_user_t

typedef struct idmef_user idmef_user_t;


idmef_user_new ()

int                 idmef_user_new                      (idmef_user_t **ret);

Create a new idmef_user_t object.

ret :

Pointer where to store the created idmef_user_t object.

Returns :

0 on success, a negative value if an error occured.

idmef_user_copy ()

int                 idmef_user_copy                     (const idmef_user_t *src,
                                                         idmef_user_t *dst);

Copy a new idmef_user_t object from src to dst.

src :

Source of the copy.

dst :

Where to copy the object.

Returns :

0 on success, a negative value if an error occured.

idmef_user_clone ()

int                 idmef_user_clone                    (idmef_user_t *src,
                                                         idmef_user_t **dst);

Create a copy of src, and store it in dst.

src :

Object to be cloned.

dst :

Address where to store the pointer to the cloned object.

Returns :

0 on success, a negative value if an error occured.

idmef_user_ref ()

idmef_user_t *      idmef_user_ref                      (idmef_user_t *user);

Increase user reference count, so that it can be referenced multiple time.

user :

pointer to a idmef_user_t object.

Returns :

a pointer to user.

idmef_user_destroy ()

void                idmef_user_destroy                  (idmef_user_t *ptr);

Destroy ptr and all of it's children. The objects are only destroyed if their reference count reach zero.

ptr :

pointer to a idmef_user_t object.

idmef_user_get_ident ()

prelude_string_t *  idmef_user_get_ident                (idmef_user_t *ptr);

ptr :

Returns :


idmef_user_set_ident ()

void                idmef_user_set_ident                (idmef_user_t *ptr,
                                                         prelude_string_t *ident);

Set ident object as a children of ptr. if ptr already contain an ident object, then it is destroyed, and updated to point to the provided ident object.

ptr :

pointer to a idmef_user_t object.

ident :

pointer to a prelude_string_t object.

idmef_user_new_ident ()

int                 idmef_user_new_ident                (idmef_user_t *ptr,
                                                         prelude_string_t **ret);

Create a new ident object, children of idmef_user_t. If ptr already contain a prelude_string_t object, then it is destroyed.

ptr :

pointer to a idmef_user_t object.

ret :

pointer to an address where to store the created prelude_string_t object.

Returns :

0 on success, or a negative value if an error occured.

idmef_user_get_category ()

idmef_user_category_t  idmef_user_get_category          (idmef_user_t *ptr);

Get category children of the idmef_user_t object.

ptr :

pointer to a idmef_user_t object.

Returns :

a pointer to a idmef_user_category_t object, or NULL if the children object is not set.

idmef_user_set_category ()

void                idmef_user_set_category             (idmef_user_t *ptr,
                                                         idmef_user_category_t category);

Set category object as a children of ptr. if ptr already contain an category object, then it is destroyed, and updated to point to the provided category object.

ptr :

pointer to a idmef_user_t object.

category :

pointer to a idmef_user_category_t object.

idmef_user_new_category ()

int                 idmef_user_new_category             (idmef_user_t *ptr,
                                                         idmef_user_category_t **ret);

Create a new category object, children of idmef_user_t. If ptr already contain a idmef_user_category_t object, then it is destroyed.

ptr :

pointer to a idmef_user_t object.

ret :

pointer to an address where to store the created idmef_user_category_t object.

Returns :

0 on success, or a negative value if an error occured.

idmef_user_get_next_user_id ()

idmef_user_id_t *   idmef_user_get_next_user_id         (idmef_user_t *user,
                                                         idmef_user_id_t *user_id_cur);

Get the next idmef_user_id_t object listed in ptr. When iterating over the idmef_user_id_t object listed in ptr, object should be set to the latest returned idmef_user_id_t object.

user :

pointer to a idmef_user_t object.

user_id_cur :

pointer to a idmef_user_id_t object.

Returns :

the next idmef_user_id_t in the list.

idmef_user_set_user_id ()

void                idmef_user_set_user_id              (idmef_user_t *ptr,
                                                         idmef_user_id_t *object,
                                                         int pos);

Add object to position pos of ptr list of idmef_user_id_t object.

If pos is IDMEF_LIST_APPEND, object will be inserted at the tail of the list. If pos is IDMEF_LIST_PREPEND, object will be inserted at the head of the list.

ptr :

pointer to a idmef_user_t object.

object :

pointer to a idmef_user_id_t object.

pos :

Position in the list.

idmef_user_new_user_id ()

int                 idmef_user_new_user_id              (idmef_user_t *ptr,
                                                         idmef_user_id_t **ret,
                                                         int pos);

Create a new idmef_user_id_t children of ptr, and add it to position pos of ptr list of idmef_user_id_t object. The created idmef_user_id_t object is stored in ret.

If pos is IDMEF_LIST_APPEND, object will be inserted at the tail of the list. If pos is IDMEF_LIST_PREPEND, object will be inserted at the head of the list.

ptr :

pointer to a idmef_user_t object.

ret :

pointer to an address where to store the created idmef_user_id_t object.

pos :

position in the list.

Returns :

0 on success, or a negative value if an error occured.

enum idmef_address_category_t

typedef enum {
        IDMEF_ADDRESS_CATEGORY_ERROR = -1,
        IDMEF_ADDRESS_CATEGORY_UNKNOWN = 0,
        IDMEF_ADDRESS_CATEGORY_ATM = 1,
        IDMEF_ADDRESS_CATEGORY_E_MAIL = 2,
        IDMEF_ADDRESS_CATEGORY_LOTUS_NOTES = 3,
        IDMEF_ADDRESS_CATEGORY_MAC = 4,
        IDMEF_ADDRESS_CATEGORY_SNA = 5,
        IDMEF_ADDRESS_CATEGORY_VM = 6,
        IDMEF_ADDRESS_CATEGORY_IPV4_ADDR = 7,
        IDMEF_ADDRESS_CATEGORY_IPV4_ADDR_HEX = 8,
        IDMEF_ADDRESS_CATEGORY_IPV4_NET = 9,
        IDMEF_ADDRESS_CATEGORY_IPV4_NET_MASK = 10,
        IDMEF_ADDRESS_CATEGORY_IPV6_ADDR = 11,
        IDMEF_ADDRESS_CATEGORY_IPV6_ADDR_HEX = 12,
        IDMEF_ADDRESS_CATEGORY_IPV6_NET = 13,
        IDMEF_ADDRESS_CATEGORY_IPV6_NET_MASK = 14
} idmef_address_category_t;


idmef_address_category_to_numeric ()

idmef_address_category_t  idmef_address_category_to_numeric
                                                        (const char *name);

name :

pointer to an IDMEF string representation of a idmef_address_category_t value.

Returns :

the numeric equivalent of name, or -1 if name is not valid.

idmef_address_category_to_string ()

const char *        idmef_address_category_to_string    (idmef_address_category_t val);

Return the IDMEF string equivalent of val provided idmef_address_category_t value.

val :

an enumeration value for idmef_address_category_t.

Returns :

a pointer to the string describing val, or NULL if val is invalid.

idmef_address_t

typedef struct idmef_address idmef_address_t;


idmef_address_new ()

int                 idmef_address_new                   (idmef_address_t **ret);

Create a new idmef_address_t object.

ret :

Pointer where to store the created idmef_address_t object.

Returns :

0 on success, a negative value if an error occured.

idmef_address_copy ()

int                 idmef_address_copy                  (const idmef_address_t *src,
                                                         idmef_address_t *dst);

Copy a new idmef_address_t object from src to dst.

src :

Source of the copy.

dst :

Where to copy the object.

Returns :

0 on success, a negative value if an error occured.

idmef_address_clone ()

int                 idmef_address_clone                 (idmef_address_t *src,
                                                         idmef_address_t **dst);

Create a copy of src, and store it in dst.

src :

Object to be cloned.

dst :

Address where to store the pointer to the cloned object.

Returns :

0 on success, a negative value if an error occured.

idmef_address_ref ()

idmef_address_t *   idmef_address_ref                   (idmef_address_t *address);

Increase address reference count, so that it can be referenced multiple time.

address :

pointer to a idmef_address_t object.

Returns :

a pointer to address.

idmef_address_destroy ()

void                idmef_address_destroy               (idmef_address_t *ptr);

Destroy ptr and all of it's children. The objects are only destroyed if their reference count reach zero.

ptr :

pointer to a idmef_address_t object.

idmef_address_get_ident ()

prelude_string_t *  idmef_address_get_ident             (idmef_address_t *ptr);

ptr :

Returns :


idmef_address_set_ident ()

void                idmef_address_set_ident             (idmef_address_t *ptr,
                                                         prelude_string_t *ident);

Set ident object as a children of ptr. if ptr already contain an ident object, then it is destroyed, and updated to point to the provided ident object.

ptr :

pointer to a idmef_address_t object.

ident :

pointer to a prelude_string_t object.

idmef_address_new_ident ()

int                 idmef_address_new_ident             (idmef_address_t *ptr,
                                                         prelude_string_t **ret);

Create a new ident object, children of idmef_address_t. If ptr already contain a prelude_string_t object, then it is destroyed.

ptr :

pointer to a idmef_address_t object.

ret :

pointer to an address where to store the created prelude_string_t object.

Returns :

0 on success, or a negative value if an error occured.

idmef_address_get_category ()

idmef_address_category_t  idmef_address_get_category    (idmef_address_t *ptr);

Get category children of the idmef_address_t object.

ptr :

pointer to a idmef_address_t object.

Returns :

a pointer to a idmef_address_category_t object, or NULL if the children object is not set.

idmef_address_set_category ()

void                idmef_address_set_category          (idmef_address_t *ptr,
                                                         idmef_address_category_t category);

Set category object as a children of ptr. if ptr already contain an category object, then it is destroyed, and updated to point to the provided category object.

ptr :

pointer to a idmef_address_t object.

category :

pointer to a idmef_address_category_t object.

idmef_address_new_category ()

int                 idmef_address_new_category          (idmef_address_t *ptr,
                                                         idmef_address_category_t **ret);

Create a new category object, children of idmef_address_t. If ptr already contain a idmef_address_category_t object, then it is destroyed.

ptr :

pointer to a idmef_address_t object.

ret :

pointer to an address where to store the created idmef_address_category_t object.

Returns :

0 on success, or a negative value if an error occured.

idmef_address_get_vlan_name ()

prelude_string_t *  idmef_address_get_vlan_name         (idmef_address_t *ptr);

ptr :

Returns :


idmef_address_set_vlan_name ()

void                idmef_address_set_vlan_name         (idmef_address_t *ptr,
                                                         prelude_string_t *vlan_name);

Set vlan_name object as a children of ptr. if ptr already contain an vlan_name object, then it is destroyed, and updated to point to the provided vlan_name object.

ptr :

pointer to a idmef_address_t object.

vlan_name :

pointer to a prelude_string_t object.

idmef_address_new_vlan_name ()

int                 idmef_address_new_vlan_name         (idmef_address_t *ptr,
                                                         prelude_string_t **ret);

Create a new vlan_name object, children of idmef_address_t. If ptr already contain a prelude_string_t object, then it is destroyed.

ptr :

pointer to a idmef_address_t object.

ret :

pointer to an address where to store the created prelude_string_t object.

Returns :

0 on success, or a negative value if an error occured.

idmef_address_unset_vlan_num ()

void                idmef_address_unset_vlan_num        (idmef_address_t *ptr);

ptr :


idmef_address_get_vlan_num ()

int32_t *           idmef_address_get_vlan_num          (idmef_address_t *ptr);

ptr :

Returns :


idmef_address_set_vlan_num ()

void                idmef_address_set_vlan_num          (idmef_address_t *ptr,
                                                         int32_t vlan_num);

Set vlan_num object as a children of ptr. if ptr already contain an vlan_num object, then it is destroyed, and updated to point to the provided vlan_num object.

ptr :

pointer to a idmef_address_t object.

vlan_num :

pointer to a int32_t object.

idmef_address_new_vlan_num ()

int                 idmef_address_new_vlan_num          (idmef_address_t *ptr,
                                                         int32_t **ret);

Create a new vlan_num object, children of idmef_address_t. If ptr already contain a int32_t object, then it is destroyed.

ptr :

pointer to a idmef_address_t object.

ret :

pointer to an address where to store the created int32_t object.

Returns :

0 on success, or a negative value if an error occured.

idmef_address_get_address ()

prelude_string_t *  idmef_address_get_address           (idmef_address_t *ptr);

ptr :

Returns :


idmef_address_set_address ()

void                idmef_address_set_address           (idmef_address_t *ptr,
                                                         prelude_string_t *address);

Set address object as a children of ptr. if ptr already contain an address object, then it is destroyed, and updated to point to the provided address object.

ptr :

pointer to a idmef_address_t object.

address :

pointer to a prelude_string_t object.

idmef_address_new_address ()

int                 idmef_address_new_address           (idmef_address_t *ptr,
                                                         prelude_string_t **ret);

Create a new address object, children of idmef_address_t. If ptr already contain a prelude_string_t object, then it is destroyed.

ptr :

pointer to a idmef_address_t object.

ret :

pointer to an address where to store the created prelude_string_t object.

Returns :

0 on success, or a negative value if an error occured.

idmef_address_get_netmask ()

prelude_string_t *  idmef_address_get_netmask           (idmef_address_t *ptr);

ptr :

Returns :


idmef_address_set_netmask ()

void                idmef_address_set_netmask           (idmef_address_t *ptr,
                                                         prelude_string_t *netmask);

Set netmask object as a children of ptr. if ptr already contain an netmask object, then it is destroyed, and updated to point to the provided netmask object.

ptr :

pointer to a idmef_address_t object.

netmask :

pointer to a prelude_string_t object.

idmef_address_new_netmask ()

int                 idmef_address_new_netmask           (idmef_address_t *ptr,
                                                         prelude_string_t **ret);

Create a new netmask object, children of idmef_address_t. If ptr already contain a prelude_string_t object, then it is destroyed.

ptr :

pointer to a idmef_address_t object.

ret :

pointer to an address where to store the created prelude_string_t object.

Returns :

0 on success, or a negative value if an error occured.

idmef_process_t

typedef struct idmef_process idmef_process_t;


idmef_process_new ()

int                 idmef_process_new                   (idmef_process_t **ret);

Create a new idmef_process_t object.

ret :

Pointer where to store the created idmef_process_t object.

Returns :

0 on success, a negative value if an error occured.

idmef_process_copy ()

int                 idmef_process_copy                  (const idmef_process_t *src,
                                                         idmef_process_t *dst);

Copy a new idmef_process_t object from src to dst.

src :

Source of the copy.

dst :

Where to copy the object.

Returns :

0 on success, a negative value if an error occured.

idmef_process_clone ()

int                 idmef_process_clone                 (idmef_process_t *src,
                                                         idmef_process_t **dst);

Create a copy of src, and store it in dst.

src :

Object to be cloned.

dst :

Address where to store the pointer to the cloned object.

Returns :

0 on success, a negative value if an error occured.

idmef_process_ref ()

idmef_process_t *   idmef_process_ref                   (idmef_process_t *process);

Increase process reference count, so that it can be referenced multiple time.

process :

pointer to a idmef_process_t object.

Returns :

a pointer to process.

idmef_process_destroy ()

void                idmef_process_destroy               (idmef_process_t *ptr);

Destroy ptr and all of it's children. The objects are only destroyed if their reference count reach zero.

ptr :

pointer to a idmef_process_t object.

idmef_process_get_ident ()

prelude_string_t *  idmef_process_get_ident             (idmef_process_t *ptr);

ptr :

Returns :


idmef_process_set_ident ()

void                idmef_process_set_ident             (idmef_process_t *ptr,
                                                         prelude_string_t *ident);

Set ident object as a children of ptr. if ptr already contain an ident object, then it is destroyed, and updated to point to the provided ident object.

ptr :

pointer to a idmef_process_t object.

ident :

pointer to a prelude_string_t object.

idmef_process_new_ident ()

int                 idmef_process_new_ident             (idmef_process_t *ptr,
                                                         prelude_string_t **ret);

Create a new ident object, children of idmef_process_t. If ptr already contain a prelude_string_t object, then it is destroyed.

ptr :

pointer to a idmef_process_t object.

ret :

pointer to an address where to store the created prelude_string_t object.

Returns :

0 on success, or a negative value if an error occured.

idmef_process_get_name ()

prelude_string_t *  idmef_process_get_name              (idmef_process_t *ptr);

ptr :

Returns :


idmef_process_set_name ()

void                idmef_process_set_name              (idmef_process_t *ptr,
                                                         prelude_string_t *name);

Set name object as a children of ptr. if ptr already contain an name object, then it is destroyed, and updated to point to the provided name object.

ptr :

pointer to a idmef_process_t object.

name :

pointer to a prelude_string_t object.

idmef_process_new_name ()

int                 idmef_process_new_name              (idmef_process_t *ptr,
                                                         prelude_string_t **ret);

Create a new name object, children of idmef_process_t. If ptr already contain a prelude_string_t object, then it is destroyed.

ptr :

pointer to a idmef_process_t object.

ret :

pointer to an address where to store the created prelude_string_t object.

Returns :

0 on success, or a negative value if an error occured.

idmef_process_unset_pid ()

void                idmef_process_unset_pid             (idmef_process_t *ptr);

ptr :


idmef_process_get_pid ()

uint32_t *          idmef_process_get_pid               (idmef_process_t *ptr);

ptr :

Returns :


idmef_process_set_pid ()

void                idmef_process_set_pid               (idmef_process_t *ptr,
                                                         uint32_t pid);

Set pid object as a children of ptr. if ptr already contain an pid object, then it is destroyed, and updated to point to the provided pid object.

ptr :

pointer to a idmef_process_t object.

pid :

pointer to a uint32_t object.

idmef_process_new_pid ()

int                 idmef_process_new_pid               (idmef_process_t *ptr,
                                                         uint32_t **ret);

Create a new pid object, children of idmef_process_t. If ptr already contain a uint32_t object, then it is destroyed.

ptr :

pointer to a idmef_process_t object.

ret :

pointer to an address where to store the created uint32_t object.

Returns :

0 on success, or a negative value if an error occured.

idmef_process_get_path ()

prelude_string_t *  idmef_process_get_path              (idmef_process_t *ptr);

ptr :

Returns :


idmef_process_set_path ()

void                idmef_process_set_path              (idmef_process_t *ptr,
                                                         prelude_string_t *path);

Set path object as a children of ptr. if ptr already contain an path object, then it is destroyed, and updated to point to the provided path object.

ptr :

pointer to a idmef_process_t object.

path :

pointer to a prelude_string_t object.

idmef_process_new_path ()

int                 idmef_process_new_path              (idmef_process_t *ptr,
                                                         prelude_string_t **ret);

Create a new path object, children of idmef_process_t. If ptr already contain a prelude_string_t object, then it is destroyed.

ptr :

pointer to a idmef_process_t object.

ret :

pointer to an address where to store the created prelude_string_t object.

Returns :

0 on success, or a negative value if an error occured.

idmef_process_get_next_arg ()

prelude_string_t *  idmef_process_get_next_arg          (idmef_process_t *process,
                                                         prelude_string_t *prelude_string_cur);

Get the next prelude_string_t object listed in ptr. When iterating over the prelude_string_t object listed in ptr, object should be set to the latest returned prelude_string_t object.

process :

pointer to a idmef_process_t object.

prelude_string_cur :

pointer to a prelude_string_t object.

Returns :

the next prelude_string_t in the list.

idmef_process_set_arg ()

void                idmef_process_set_arg               (idmef_process_t *ptr,
                                                         prelude_string_t *object,
                                                         int pos);

Add object to position pos of ptr list of prelude_string_t object.

If pos is IDMEF_LIST_APPEND, object will be inserted at the tail of the list. If pos is IDMEF_LIST_PREPEND, object will be inserted at the head of the list.

ptr :

pointer to a idmef_process_t object.

object :

pointer to a prelude_string_t object.

pos :

Position in the list.

idmef_process_new_arg ()

int                 idmef_process_new_arg               (idmef_process_t *ptr,
                                                         prelude_string_t **ret,
                                                         int pos);

Create a new prelude_string_t children of ptr, and add it to position pos of ptr list of prelude_string_t object. The created prelude_string_t object is stored in ret.

If pos is IDMEF_LIST_APPEND, object will be inserted at the tail of the list. If pos is IDMEF_LIST_PREPEND, object will be inserted at the head of the list.

ptr :

pointer to a idmef_process_t object.

ret :

pointer to an address where to store the created prelude_string_t object.

pos :

position in the list.

Returns :

0 on success, or a negative value if an error occured.

idmef_process_get_next_env ()

prelude_string_t *  idmef_process_get_next_env          (idmef_process_t *process,
                                                         prelude_string_t *prelude_string_cur);

Get the next prelude_string_t object listed in ptr. When iterating over the prelude_string_t object listed in ptr, object should be set to the latest returned prelude_string_t object.

process :

pointer to a idmef_process_t object.

prelude_string_cur :

pointer to a prelude_string_t object.

Returns :

the next prelude_string_t in the list.

idmef_process_set_env ()

void                idmef_process_set_env               (idmef_process_t *ptr,
                                                         prelude_string_t *object,
                                                         int pos);

Add object to position pos of ptr list of prelude_string_t object.

If pos is IDMEF_LIST_APPEND, object will be inserted at the tail of the list. If pos is IDMEF_LIST_PREPEND, object will be inserted at the head of the list.

ptr :

pointer to a idmef_process_t object.

object :

pointer to a prelude_string_t object.

pos :

Position in the list.

idmef_process_new_env ()

int                 idmef_process_new_env               (idmef_process_t *ptr,
                                                         prelude_string_t **ret,
                                                         int pos);

Create a new prelude_string_t children of ptr, and add it to position pos of ptr list of prelude_string_t object. The created prelude_string_t object is stored in ret.

If pos is IDMEF_LIST_APPEND, object will be inserted at the tail of the list. If pos is IDMEF_LIST_PREPEND, object will be inserted at the head of the list.

ptr :

pointer to a idmef_process_t object.

ret :

pointer to an address where to store the created prelude_string_t object.

pos :

position in the list.

Returns :

0 on success, or a negative value if an error occured.

idmef_web_service_t

typedef struct idmef_web_service idmef_web_service_t;


idmef_web_service_new ()

int                 idmef_web_service_new               (idmef_web_service_t **ret);

Create a new idmef_web_service_t object.

ret :

Pointer where to store the created idmef_web_service_t object.

Returns :

0 on success, a negative value if an error occured.

idmef_web_service_copy ()

int                 idmef_web_service_copy              (const idmef_web_service_t *src,
                                                         idmef_web_service_t *dst);

Copy a new idmef_web_service_t object from src to dst.

src :

Source of the copy.

dst :

Where to copy the object.

Returns :

0 on success, a negative value if an error occured.

idmef_web_service_clone ()

int                 idmef_web_service_clone             (idmef_web_service_t *src,
                                                         idmef_web_service_t **dst);

Create a copy of src, and store it in dst.

src :

Object to be cloned.

dst :

Address where to store the pointer to the cloned object.

Returns :

0 on success, a negative value if an error occured.

idmef_web_service_ref ()

idmef_web_service_t * idmef_web_service_ref             (idmef_web_service_t *web_service);

Increase web_service reference count, so that it can be referenced multiple time.

web_service :

pointer to a idmef_web_service_t object.

Returns :

a pointer to web_service.

idmef_web_service_destroy ()

void                idmef_web_service_destroy           (idmef_web_service_t *ptr);

Destroy ptr and all of it's children. The objects are only destroyed if their reference count reach zero.

ptr :

pointer to a idmef_web_service_t object.

idmef_web_service_get_url ()

prelude_string_t *  idmef_web_service_get_url           (idmef_web_service_t *ptr);

ptr :

Returns :


idmef_web_service_set_url ()

void                idmef_web_service_set_url           (idmef_web_service_t *ptr,
                                                         prelude_string_t *url);

Set url object as a children of ptr. if ptr already contain an url object, then it is destroyed, and updated to point to the provided url object.

ptr :

pointer to a idmef_web_service_t object.

url :

pointer to a prelude_string_t object.

idmef_web_service_new_url ()

int                 idmef_web_service_new_url           (idmef_web_service_t *ptr,
                                                         prelude_string_t **ret);

Create a new url object, children of idmef_web_service_t. If ptr already contain a prelude_string_t object, then it is destroyed.

ptr :

pointer to a idmef_web_service_t object.

ret :

pointer to an address where to store the created prelude_string_t object.

Returns :

0 on success, or a negative value if an error occured.

idmef_web_service_get_cgi ()

prelude_string_t *  idmef_web_service_get_cgi           (idmef_web_service_t *ptr);

ptr :

Returns :


idmef_web_service_set_cgi ()

void                idmef_web_service_set_cgi           (idmef_web_service_t *ptr,
                                                         prelude_string_t *cgi);

Set cgi object as a children of ptr. if ptr already contain an cgi object, then it is destroyed, and updated to point to the provided cgi object.

ptr :

pointer to a idmef_web_service_t object.

cgi :

pointer to a prelude_string_t object.

idmef_web_service_new_cgi ()

int                 idmef_web_service_new_cgi           (idmef_web_service_t *ptr,
                                                         prelude_string_t **ret);

Create a new cgi object, children of idmef_web_service_t. If ptr already contain a prelude_string_t object, then it is destroyed.

ptr :

pointer to a idmef_web_service_t object.

ret :

pointer to an address where to store the created prelude_string_t object.

Returns :

0 on success, or a negative value if an error occured.

idmef_web_service_get_http_method ()

prelude_string_t *  idmef_web_service_get_http_method   (idmef_web_service_t *ptr);

ptr :

Returns :


idmef_web_service_set_http_method ()

void                idmef_web_service_set_http_method   (idmef_web_service_t *ptr,
                                                         prelude_string_t *http_method);

Set http_method object as a children of ptr. if ptr already contain an http_method object, then it is destroyed, and updated to point to the provided http_method object.

ptr :

pointer to a idmef_web_service_t object.

http_method :

pointer to a prelude_string_t object.

idmef_web_service_new_http_method ()

int                 idmef_web_service_new_http_method   (idmef_web_service_t *ptr,
                                                         prelude_string_t **ret);

Create a new http_method object, children of idmef_web_service_t. If ptr already contain a prelude_string_t object, then it is destroyed.

ptr :

pointer to a idmef_web_service_t object.

ret :

pointer to an address where to store the created prelude_string_t object.

Returns :

0 on success, or a negative value if an error occured.

idmef_web_service_get_next_arg ()

prelude_string_t *  idmef_web_service_get_next_arg      (idmef_web_service_t *web_service,
                                                         prelude_string_t *prelude_string_cur);

Get the next prelude_string_t object listed in ptr. When iterating over the prelude_string_t object listed in ptr, object should be set to the latest returned prelude_string_t object.

web_service :

pointer to a idmef_web_service_t object.

prelude_string_cur :

pointer to a prelude_string_t object.

Returns :

the next prelude_string_t in the list.

idmef_web_service_set_arg ()

void                idmef_web_service_set_arg           (idmef_web_service_t *ptr,
                                                         prelude_string_t *object,
                                                         int pos);

Add object to position pos of ptr list of prelude_string_t object.

If pos is IDMEF_LIST_APPEND, object will be inserted at the tail of the list. If pos is IDMEF_LIST_PREPEND, object will be inserted at the head of the list.

ptr :

pointer to a idmef_web_service_t object.

object :

pointer to a prelude_string_t object.

pos :

Position in the list.

idmef_web_service_new_arg ()

int                 idmef_web_service_new_arg           (idmef_web_service_t *ptr,
                                                         prelude_string_t **ret,
                                                         int pos);

Create a new prelude_string_t children of ptr, and add it to position pos of ptr list of prelude_string_t object. The created prelude_string_t object is stored in ret.

If pos is IDMEF_LIST_APPEND, object will be inserted at the tail of the list. If pos is IDMEF_LIST_PREPEND, object will be inserted at the head of the list.

ptr :

pointer to a idmef_web_service_t object.

ret :

pointer to an address where to store the created prelude_string_t object.

pos :

position in the list.

Returns :

0 on success, or a negative value if an error occured.

idmef_snmp_service_t

typedef struct idmef_snmp_service idmef_snmp_service_t;


idmef_snmp_service_new ()

int                 idmef_snmp_service_new              (idmef_snmp_service_t **ret);

Create a new idmef_snmp_service_t object.

ret :

Pointer where to store the created idmef_snmp_service_t object.

Returns :

0 on success, a negative value if an error occured.

idmef_snmp_service_copy ()

int                 idmef_snmp_service_copy             (const idmef_snmp_service_t *src,
                                                         idmef_snmp_service_t *dst);

Copy a new idmef_snmp_service_t object from src to dst.

src :

Source of the copy.

dst :

Where to copy the object.

Returns :

0 on success, a negative value if an error occured.

idmef_snmp_service_clone ()

int                 idmef_snmp_service_clone            (idmef_snmp_service_t *src,
                                                         idmef_snmp_service_t **dst);

Create a copy of src, and store it in dst.

src :

Object to be cloned.

dst :

Address where to store the pointer to the cloned object.

Returns :

0 on success, a negative value if an error occured.

idmef_snmp_service_ref ()

idmef_snmp_service_t * idmef_snmp_service_ref           (idmef_snmp_service_t *snmp_service);

Increase snmp_service reference count, so that it can be referenced multiple time.

snmp_service :

pointer to a idmef_snmp_service_t object.

Returns :

a pointer to snmp_service.

idmef_snmp_service_destroy ()

void                idmef_snmp_service_destroy          (idmef_snmp_service_t *ptr);

Destroy ptr and all of it's children. The objects are only destroyed if their reference count reach zero.

ptr :

pointer to a idmef_snmp_service_t object.

idmef_snmp_service_get_oid ()

prelude_string_t *  idmef_snmp_service_get_oid          (idmef_snmp_service_t *ptr);

ptr :

Returns :


idmef_snmp_service_set_oid ()

void                idmef_snmp_service_set_oid          (idmef_snmp_service_t *ptr,
                                                         prelude_string_t *oid);

Set oid object as a children of ptr. if ptr already contain an oid object, then it is destroyed, and updated to point to the provided oid object.

ptr :

pointer to a idmef_snmp_service_t object.

oid :

pointer to a prelude_string_t object.

idmef_snmp_service_new_oid ()

int                 idmef_snmp_service_new_oid          (idmef_snmp_service_t *ptr,
                                                         prelude_string_t **ret);

Create a new oid object, children of idmef_snmp_service_t. If ptr already contain a prelude_string_t object, then it is destroyed.

ptr :

pointer to a idmef_snmp_service_t object.

ret :

pointer to an address where to store the created prelude_string_t object.

Returns :

0 on success, or a negative value if an error occured.

idmef_snmp_service_unset_message_processing_model ()

void                idmef_snmp_service_unset_message_processing_model
                                                        (idmef_snmp_service_t *ptr);

ptr :


idmef_snmp_service_get_message_processing_model ()

uint32_t *          idmef_snmp_service_get_message_processing_model
                                                        (idmef_snmp_service_t *ptr);

ptr :

Returns :


idmef_snmp_service_set_message_processing_model ()

void                idmef_snmp_service_set_message_processing_model
                                                        (idmef_snmp_service_t *ptr,
                                                         uint32_t message_processing_model);

Set message_processing_model object as a children of ptr. if ptr already contain an message_processing_model object, then it is destroyed, and updated to point to the provided message_processing_model object.

ptr :

pointer to a idmef_snmp_service_t object.

message_processing_model :

pointer to a uint32_t object.

idmef_snmp_service_new_message_processing_model ()

int                 idmef_snmp_service_new_message_processing_model
                                                        (idmef_snmp_service_t *ptr,
                                                         uint32_t **ret);

Create a new message_processing_model object, children of idmef_snmp_service_t. If ptr already contain a uint32_t object, then it is destroyed.

ptr :

pointer to a idmef_snmp_service_t object.

ret :

pointer to an address where to store the created uint32_t object.

Returns :

0 on success, or a negative value if an error occured.

idmef_snmp_service_unset_security_model ()

void                idmef_snmp_service_unset_security_model
                                                        (idmef_snmp_service_t *ptr);

ptr :


idmef_snmp_service_get_security_model ()

uint32_t *          idmef_snmp_service_get_security_model
                                                        (idmef_snmp_service_t *ptr);

ptr :

Returns :


idmef_snmp_service_set_security_model ()

void                idmef_snmp_service_set_security_model
                                                        (idmef_snmp_service_t *ptr,
                                                         uint32_t security_model);

Set security_model object as a children of ptr. if ptr already contain an security_model object, then it is destroyed, and updated to point to the provided security_model object.

ptr :

pointer to a idmef_snmp_service_t object.

security_model :

pointer to a uint32_t object.

idmef_snmp_service_new_security_model ()

int                 idmef_snmp_service_new_security_model
                                                        (idmef_snmp_service_t *ptr,
                                                         uint32_t **ret);

Create a new security_model object, children of idmef_snmp_service_t. If ptr already contain a uint32_t object, then it is destroyed.

ptr :

pointer to a idmef_snmp_service_t object.

ret :

pointer to an address where to store the created uint32_t object.

Returns :

0 on success, or a negative value if an error occured.

idmef_snmp_service_get_security_name ()

prelude_string_t *  idmef_snmp_service_get_security_name
                                                        (idmef_snmp_service_t *ptr);

ptr :

Returns :


idmef_snmp_service_set_security_name ()

void                idmef_snmp_service_set_security_name
                                                        (idmef_snmp_service_t *ptr,
                                                         prelude_string_t *security_name);

Set security_name object as a children of ptr. if ptr already contain an security_name object, then it is destroyed, and updated to point to the provided security_name object.

ptr :

pointer to a idmef_snmp_service_t object.

security_name :

pointer to a prelude_string_t object.

idmef_snmp_service_new_security_name ()

int                 idmef_snmp_service_new_security_name
                                                        (idmef_snmp_service_t *ptr,
                                                         prelude_string_t **ret);

Create a new security_name object, children of idmef_snmp_service_t. If ptr already contain a prelude_string_t object, then it is destroyed.

ptr :

pointer to a idmef_snmp_service_t object.

ret :

pointer to an address where to store the created prelude_string_t object.

Returns :

0 on success, or a negative value if an error occured.

idmef_snmp_service_unset_security_level ()

void                idmef_snmp_service_unset_security_level
                                                        (idmef_snmp_service_t *ptr);

ptr :


idmef_snmp_service_get_security_level ()

uint32_t *          idmef_snmp_service_get_security_level
                                                        (idmef_snmp_service_t *ptr);

ptr :

Returns :


idmef_snmp_service_set_security_level ()

void                idmef_snmp_service_set_security_level
                                                        (idmef_snmp_service_t *ptr,
                                                         uint32_t security_level);

Set security_level object as a children of ptr. if ptr already contain an security_level object, then it is destroyed, and updated to point to the provided security_level object.

ptr :

pointer to a idmef_snmp_service_t object.

security_level :

pointer to a uint32_t object.

idmef_snmp_service_new_security_level ()

int                 idmef_snmp_service_new_security_level
                                                        (idmef_snmp_service_t *ptr,
                                                         uint32_t **ret);

Create a new security_level object, children of idmef_snmp_service_t. If ptr already contain a uint32_t object, then it is destroyed.

ptr :

pointer to a idmef_snmp_service_t object.

ret :

pointer to an address where to store the created uint32_t object.

Returns :

0 on success, or a negative value if an error occured.

idmef_snmp_service_get_context_name ()

prelude_string_t *  idmef_snmp_service_get_context_name (idmef_snmp_service_t *ptr);

ptr :

Returns :


idmef_snmp_service_set_context_name ()

void                idmef_snmp_service_set_context_name (idmef_snmp_service_t *ptr,
                                                         prelude_string_t *context_name);

Set context_name object as a children of ptr. if ptr already contain an context_name object, then it is destroyed, and updated to point to the provided context_name object.

ptr :

pointer to a idmef_snmp_service_t object.

context_name :

pointer to a prelude_string_t object.

idmef_snmp_service_new_context_name ()

int                 idmef_snmp_service_new_context_name (idmef_snmp_service_t *ptr,
                                                         prelude_string_t **ret);

Create a new context_name object, children of idmef_snmp_service_t. If ptr already contain a prelude_string_t object, then it is destroyed.

ptr :

pointer to a idmef_snmp_service_t object.

ret :

pointer to an address where to store the created prelude_string_t object.

Returns :

0 on success, or a negative value if an error occured.

idmef_snmp_service_get_context_engine_id ()

prelude_string_t *  idmef_snmp_service_get_context_engine_id
                                                        (idmef_snmp_service_t *ptr);

ptr :

Returns :


idmef_snmp_service_set_context_engine_id ()

void                idmef_snmp_service_set_context_engine_id
                                                        (idmef_snmp_service_t *ptr,
                                                         prelude_string_t *context_engine_id);

Set context_engine_id object as a children of ptr. if ptr already contain an context_engine_id object, then it is destroyed, and updated to point to the provided context_engine_id object.

ptr :

pointer to a idmef_snmp_service_t object.

context_engine_id :

pointer to a prelude_string_t object.

idmef_snmp_service_new_context_engine_id ()

int                 idmef_snmp_service_new_context_engine_id
                                                        (idmef_snmp_service_t *ptr,
                                                         prelude_string_t **ret);

Create a new context_engine_id object, children of idmef_snmp_service_t. If ptr already contain a prelude_string_t object, then it is destroyed.

ptr :

pointer to a idmef_snmp_service_t object.

ret :

pointer to an address where to store the created prelude_string_t object.

Returns :

0 on success, or a negative value if an error occured.

idmef_snmp_service_get_command ()

prelude_string_t *  idmef_snmp_service_get_command      (idmef_snmp_service_t *ptr);

ptr :

Returns :


idmef_snmp_service_set_command ()

void                idmef_snmp_service_set_command      (idmef_snmp_service_t *ptr,
                                                         prelude_string_t *command);

Set command object as a children of ptr. if ptr already contain an command object, then it is destroyed, and updated to point to the provided command object.

ptr :

pointer to a idmef_snmp_service_t object.

command :

pointer to a prelude_string_t object.

idmef_snmp_service_new_command ()

int                 idmef_snmp_service_new_command      (idmef_snmp_service_t *ptr,
                                                         prelude_string_t **ret);

Create a new command object, children of idmef_snmp_service_t. If ptr already contain a prelude_string_t object, then it is destroyed.

ptr :

pointer to a idmef_snmp_service_t object.

ret :

pointer to an address where to store the created prelude_string_t object.

Returns :

0 on success, or a negative value if an error occured.

idmef_snmp_service_get_community ()

prelude_string_t *  idmef_snmp_service_get_community    (idmef_snmp_service_t *ptr);

ptr :

Returns :


idmef_snmp_service_set_community ()

void                idmef_snmp_service_set_community    (idmef_snmp_service_t *ptr,
                                                         prelude_string_t *community);

Set community object as a children of ptr. if ptr already contain an community object, then it is destroyed, and updated to point to the provided community object.

ptr :

pointer to a idmef_snmp_service_t object.

community :

pointer to a prelude_string_t object.

idmef_snmp_service_new_community ()

int                 idmef_snmp_service_new_community    (idmef_snmp_service_t *ptr,
                                                         prelude_string_t **ret);

Create a new community object, children of idmef_snmp_service_t. If ptr already contain a prelude_string_t object, then it is destroyed.

ptr :

pointer to a idmef_snmp_service_t object.

ret :

pointer to an address where to store the created prelude_string_t object.

Returns :

0 on success, or a negative value if an error occured.

enum idmef_service_type_t

typedef enum {
        IDMEF_SERVICE_TYPE_ERROR = -1,
        IDMEF_SERVICE_TYPE_DEFAULT = 0,
        IDMEF_SERVICE_TYPE_WEB = 1,
        IDMEF_SERVICE_TYPE_SNMP = 2
} idmef_service_type_t;


idmef_service_type_to_numeric ()

idmef_service_type_t  idmef_service_type_to_numeric     (const char *name);

name :

pointer to an IDMEF string representation of a idmef_service_type_t value.

Returns :

the numeric equivalent of name, or -1 if name is not valid.

idmef_service_type_to_string ()

const char *        idmef_service_type_to_string        (idmef_service_type_t val);

Return the IDMEF string equivalent of val provided idmef_service_type_t value.

val :

an enumeration value for idmef_service_type_t.

Returns :

a pointer to the string describing val, or NULL if val is invalid.

idmef_service_t

typedef struct idmef_service idmef_service_t;


idmef_service_new ()

int                 idmef_service_new                   (idmef_service_t **ret);

Create a new idmef_service_t object.

ret :

Pointer where to store the created idmef_service_t object.

Returns :

0 on success, a negative value if an error occured.

idmef_service_copy ()

int                 idmef_service_copy                  (const idmef_service_t *src,
                                                         idmef_service_t *dst);

Copy a new idmef_service_t object from src to dst.

src :

Source of the copy.

dst :

Where to copy the object.

Returns :

0 on success, a negative value if an error occured.

idmef_service_clone ()

int                 idmef_service_clone                 (idmef_service_t *src,
                                                         idmef_service_t **dst);

Create a copy of src, and store it in dst.

src :

Object to be cloned.

dst :

Address where to store the pointer to the cloned object.

Returns :

0 on success, a negative value if an error occured.

idmef_service_ref ()

idmef_service_t *   idmef_service_ref                   (idmef_service_t *service);

Increase service reference count, so that it can be referenced multiple time.

service :

pointer to a idmef_service_t object.

Returns :

a pointer to service.

idmef_service_destroy ()

void                idmef_service_destroy               (idmef_service_t *ptr);

Destroy ptr and all of it's children. The objects are only destroyed if their reference count reach zero.

ptr :

pointer to a idmef_service_t object.

idmef_service_get_ident ()

prelude_string_t *  idmef_service_get_ident             (idmef_service_t *ptr);

ptr :

Returns :


idmef_service_set_ident ()

void                idmef_service_set_ident             (idmef_service_t *ptr,
                                                         prelude_string_t *ident);

Set ident object as a children of ptr. if ptr already contain an ident object, then it is destroyed, and updated to point to the provided ident object.

ptr :

pointer to a idmef_service_t object.

ident :

pointer to a prelude_string_t object.

idmef_service_new_ident ()

int                 idmef_service_new_ident             (idmef_service_t *ptr,
                                                         prelude_string_t **ret);

Create a new ident object, children of idmef_service_t. If ptr already contain a prelude_string_t object, then it is destroyed.

ptr :

pointer to a idmef_service_t object.

ret :

pointer to an address where to store the created prelude_string_t object.

Returns :

0 on success, or a negative value if an error occured.

idmef_service_unset_ip_version ()

void                idmef_service_unset_ip_version      (idmef_service_t *ptr);

ptr :


idmef_service_get_ip_version ()

uint8_t *           idmef_service_get_ip_version        (idmef_service_t *ptr);

ptr :

Returns :


idmef_service_set_ip_version ()

void                idmef_service_set_ip_version        (idmef_service_t *ptr,
                                                         uint8_t ip_version);

Set ip_version object as a children of ptr. if ptr already contain an ip_version object, then it is destroyed, and updated to point to the provided ip_version object.

ptr :

pointer to a idmef_service_t object.

ip_version :

pointer to a uint8_t object.

idmef_service_new_ip_version ()

int                 idmef_service_new_ip_version        (idmef_service_t *ptr,
                                                         uint8_t **ret);

Create a new ip_version object, children of idmef_service_t. If ptr already contain a uint8_t object, then it is destroyed.

ptr :

pointer to a idmef_service_t object.

ret :

pointer to an address where to store the created uint8_t object.

Returns :

0 on success, or a negative value if an error occured.

idmef_service_unset_iana_protocol_number ()

void                idmef_service_unset_iana_protocol_number
                                                        (idmef_service_t *ptr);

ptr :


idmef_service_get_iana_protocol_number ()

uint8_t *           idmef_service_get_iana_protocol_number
                                                        (idmef_service_t *ptr);

ptr :

Returns :


idmef_service_set_iana_protocol_number ()

void                idmef_service_set_iana_protocol_number
                                                        (idmef_service_t *ptr,
                                                         uint8_t iana_protocol_number);

Set iana_protocol_number object as a children of ptr. if ptr already contain an iana_protocol_number object, then it is destroyed, and updated to point to the provided iana_protocol_number object.

ptr :

pointer to a idmef_service_t object.

iana_protocol_number :

pointer to a uint8_t object.

idmef_service_new_iana_protocol_number ()

int                 idmef_service_new_iana_protocol_number
                                                        (idmef_service_t *ptr,
                                                         uint8_t **ret);

Create a new iana_protocol_number object, children of idmef_service_t. If ptr already contain a uint8_t object, then it is destroyed.

ptr :

pointer to a idmef_service_t object.

ret :

pointer to an address where to store the created uint8_t object.

Returns :

0 on success, or a negative value if an error occured.

idmef_service_get_iana_protocol_name ()

prelude_string_t *  idmef_service_get_iana_protocol_name
                                                        (idmef_service_t *ptr);

ptr :

Returns :


idmef_service_set_iana_protocol_name ()

void                idmef_service_set_iana_protocol_name
                                                        (idmef_service_t *ptr,
                                                         prelude_string_t *iana_protocol_name);

Set iana_protocol_name object as a children of ptr. if ptr already contain an iana_protocol_name object, then it is destroyed, and updated to point to the provided iana_protocol_name object.

ptr :

pointer to a idmef_service_t object.

iana_protocol_name :

pointer to a prelude_string_t object.

idmef_service_new_iana_protocol_name ()

int                 idmef_service_new_iana_protocol_name
                                                        (idmef_service_t *ptr,
                                                         prelude_string_t **ret);

Create a new iana_protocol_name object, children of idmef_service_t. If ptr already contain a prelude_string_t object, then it is destroyed.

ptr :

pointer to a idmef_service_t object.

ret :

pointer to an address where to store the created prelude_string_t object.

Returns :

0 on success, or a negative value if an error occured.

idmef_service_get_name ()

prelude_string_t *  idmef_service_get_name              (idmef_service_t *ptr);

ptr :

Returns :


idmef_service_set_name ()

void                idmef_service_set_name              (idmef_service_t *ptr,
                                                         prelude_string_t *name);

Set name object as a children of ptr. if ptr already contain an name object, then it is destroyed, and updated to point to the provided name object.

ptr :

pointer to a idmef_service_t object.

name :

pointer to a prelude_string_t object.

idmef_service_new_name ()

int                 idmef_service_new_name              (idmef_service_t *ptr,
                                                         prelude_string_t **ret);

Create a new name object, children of idmef_service_t. If ptr already contain a prelude_string_t object, then it is destroyed.

ptr :

pointer to a idmef_service_t object.

ret :

pointer to an address where to store the created prelude_string_t object.

Returns :

0 on success, or a negative value if an error occured.

idmef_service_unset_port ()

void                idmef_service_unset_port            (idmef_service_t *ptr);

ptr :


idmef_service_get_port ()

uint16_t *          idmef_service_get_port              (idmef_service_t *ptr);

ptr :

Returns :


idmef_service_set_port ()

void                idmef_service_set_port              (idmef_service_t *ptr,
                                                         uint16_t port);

Set port object as a children of ptr. if ptr already contain an port object, then it is destroyed, and updated to point to the provided port object.

ptr :

pointer to a idmef_service_t object.

port :

pointer to a uint16_t object.

idmef_service_new_port ()

int                 idmef_service_new_port              (idmef_service_t *ptr,
                                                         uint16_t **ret);

Create a new port object, children of idmef_service_t. If ptr already contain a uint16_t object, then it is destroyed.

ptr :

pointer to a idmef_service_t object.

ret :

pointer to an address where to store the created uint16_t object.

Returns :

0 on success, or a negative value if an error occured.

idmef_service_get_portlist ()

prelude_string_t *  idmef_service_get_portlist          (idmef_service_t *ptr);

ptr :

Returns :


idmef_service_set_portlist ()

void                idmef_service_set_portlist          (idmef_service_t *ptr,
                                                         prelude_string_t *portlist);

Set portlist object as a children of ptr. if ptr already contain an portlist object, then it is destroyed, and updated to point to the provided portlist object.

ptr :

pointer to a idmef_service_t object.

portlist :

pointer to a prelude_string_t object.

idmef_service_new_portlist ()

int                 idmef_service_new_portlist          (idmef_service_t *ptr,
                                                         prelude_string_t **ret);

Create a new portlist object, children of idmef_service_t. If ptr already contain a prelude_string_t object, then it is destroyed.

ptr :

pointer to a idmef_service_t object.

ret :

pointer to an address where to store the created prelude_string_t object.

Returns :

0 on success, or a negative value if an error occured.

idmef_service_get_protocol ()

prelude_string_t *  idmef_service_get_protocol          (idmef_service_t *ptr);

ptr :

Returns :


idmef_service_set_protocol ()

void                idmef_service_set_protocol          (idmef_service_t *ptr,
                                                         prelude_string_t *protocol);

Set protocol object as a children of ptr. if ptr already contain an protocol object, then it is destroyed, and updated to point to the provided protocol object.

ptr :

pointer to a idmef_service_t object.

protocol :

pointer to a prelude_string_t object.

idmef_service_new_protocol ()

int                 idmef_service_new_protocol          (idmef_service_t *ptr,
                                                         prelude_string_t **ret);

Create a new protocol object, children of idmef_service_t. If ptr already contain a prelude_string_t object, then it is destroyed.

ptr :

pointer to a idmef_service_t object.

ret :

pointer to an address where to store the created prelude_string_t object.

Returns :

0 on success, or a negative value if an error occured.

idmef_service_get_type ()

idmef_service_type_t  idmef_service_get_type            (idmef_service_t *ptr);

Access the type children of ptr.

ptr :

pointer to a idmef_service_t object.

Returns :

a pointer to the idmef_service_type_t children, or NULL if it is not set.

idmef_service_get_web_service ()

idmef_web_service_t * idmef_service_get_web_service     (idmef_service_t *ptr);

Access the web_service children of ptr.

ptr :

pointer to a idmef_service_t object.

Returns :

a pointer to the idmef_web_service_t children, or NULL if it is not set.

idmef_service_set_web_service ()

void                idmef_service_set_web_service       (idmef_service_t *ptr,
                                                         idmef_web_service_t *web_service);

Set web_service object as a children of ptr. if ptr already contain a web_service object, then it is destroyed, and updated to point to the provided web_service object.

ptr :

pointer to a idmef_service_t object.

web_service :

pointer to a idmef_web_service_t object.

idmef_service_new_web_service ()

int                 idmef_service_new_web_service       (idmef_service_t *ptr,
                                                         idmef_web_service_t **ret);

Create a new idmef_web_service_t object, children of idmef_service_t. If ptr already contain a idmef_web_service_t object, then it is destroyed.

ptr :

pointer to a idmef_service_t object.

ret :

pointer where to store the created idmef_web_service_t object.

Returns :

0 on success, or a negative value if an error occured.

idmef_service_get_snmp_service ()

idmef_snmp_service_t * idmef_service_get_snmp_service   (idmef_service_t *ptr);

Access the snmp_service children of ptr.

ptr :

pointer to a idmef_service_t object.

Returns :

a pointer to the idmef_snmp_service_t children, or NULL if it is not set.

idmef_service_set_snmp_service ()

void                idmef_service_set_snmp_service      (idmef_service_t *ptr,
                                                         idmef_snmp_service_t *snmp_service);

Set snmp_service object as a children of ptr. if ptr already contain a snmp_service object, then it is destroyed, and updated to point to the provided snmp_service object.

ptr :

pointer to a idmef_service_t object.

snmp_service :

pointer to a idmef_snmp_service_t object.

idmef_service_new_snmp_service ()

int                 idmef_service_new_snmp_service      (idmef_service_t *ptr,
                                                         idmef_snmp_service_t **ret);

Create a new idmef_snmp_service_t object, children of idmef_service_t. If ptr already contain a idmef_snmp_service_t object, then it is destroyed.

ptr :

pointer to a idmef_service_t object.

ret :

pointer where to store the created idmef_snmp_service_t object.

Returns :

0 on success, or a negative value if an error occured.

enum idmef_node_category_t

typedef enum {
        IDMEF_NODE_CATEGORY_ERROR = -1,
        IDMEF_NODE_CATEGORY_UNKNOWN = 0,
        IDMEF_NODE_CATEGORY_ADS = 1,
        IDMEF_NODE_CATEGORY_AFS = 2,
        IDMEF_NODE_CATEGORY_CODA = 3,
        IDMEF_NODE_CATEGORY_DFS = 4,
        IDMEF_NODE_CATEGORY_DNS = 5,
        IDMEF_NODE_CATEGORY_HOSTS = 6,
        IDMEF_NODE_CATEGORY_KERBEROS = 7,
        IDMEF_NODE_CATEGORY_NDS = 8,
        IDMEF_NODE_CATEGORY_NIS = 9,
        IDMEF_NODE_CATEGORY_NISPLUS = 10,
        IDMEF_NODE_CATEGORY_NT = 11,
        IDMEF_NODE_CATEGORY_WFW = 12
} idmef_node_category_t;


idmef_node_category_to_numeric ()

idmef_node_category_t  idmef_node_category_to_numeric   (const char *name);

name :

pointer to an IDMEF string representation of a idmef_node_category_t value.

Returns :

the numeric equivalent of name, or -1 if name is not valid.

idmef_node_category_to_string ()

const char *        idmef_node_category_to_string       (idmef_node_category_t val);

Return the IDMEF string equivalent of val provided idmef_node_category_t value.

val :

an enumeration value for idmef_node_category_t.

Returns :

a pointer to the string describing val, or NULL if val is invalid.

idmef_node_t

typedef struct idmef_node idmef_node_t;


idmef_node_new ()

int                 idmef_node_new                      (idmef_node_t **ret);

Create a new idmef_node_t object.

ret :

Pointer where to store the created idmef_node_t object.

Returns :

0 on success, a negative value if an error occured.

idmef_node_copy ()

int                 idmef_node_copy                     (const idmef_node_t *src,
                                                         idmef_node_t *dst);

Copy a new idmef_node_t object from src to dst.

src :

Source of the copy.

dst :

Where to copy the object.

Returns :

0 on success, a negative value if an error occured.

idmef_node_clone ()

int                 idmef_node_clone                    (idmef_node_t *src,
                                                         idmef_node_t **dst);

Create a copy of src, and store it in dst.

src :

Object to be cloned.

dst :

Address where to store the pointer to the cloned object.

Returns :

0 on success, a negative value if an error occured.

idmef_node_ref ()

idmef_node_t *      idmef_node_ref                      (idmef_node_t *node);

Increase node reference count, so that it can be referenced multiple time.

node :

pointer to a idmef_node_t object.

Returns :

a pointer to node.

idmef_node_destroy ()

void                idmef_node_destroy                  (idmef_node_t *ptr);

Destroy ptr and all of it's children. The objects are only destroyed if their reference count reach zero.

ptr :

pointer to a idmef_node_t object.

idmef_node_get_ident ()

prelude_string_t *  idmef_node_get_ident                (idmef_node_t *ptr);

ptr :

Returns :


idmef_node_set_ident ()

void                idmef_node_set_ident                (idmef_node_t *ptr,
                                                         prelude_string_t *ident);

Set ident object as a children of ptr. if ptr already contain an ident object, then it is destroyed, and updated to point to the provided ident object.

ptr :

pointer to a idmef_node_t object.

ident :

pointer to a prelude_string_t object.

idmef_node_new_ident ()

int                 idmef_node_new_ident                (idmef_node_t *ptr,
                                                         prelude_string_t **ret);

Create a new ident object, children of idmef_node_t. If ptr already contain a prelude_string_t object, then it is destroyed.

ptr :

pointer to a idmef_node_t object.

ret :

pointer to an address where to store the created prelude_string_t object.

Returns :

0 on success, or a negative value if an error occured.

idmef_node_get_category ()

idmef_node_category_t  idmef_node_get_category          (idmef_node_t *ptr);

Get category children of the idmef_node_t object.

ptr :

pointer to a idmef_node_t object.

Returns :

a pointer to a idmef_node_category_t object, or NULL if the children object is not set.

idmef_node_set_category ()

void                idmef_node_set_category             (idmef_node_t *ptr,
                                                         idmef_node_category_t category);

Set category object as a children of ptr. if ptr already contain an category object, then it is destroyed, and updated to point to the provided category object.

ptr :

pointer to a idmef_node_t object.

category :

pointer to a idmef_node_category_t object.

idmef_node_new_category ()

int                 idmef_node_new_category             (idmef_node_t *ptr,
                                                         idmef_node_category_t **ret);

Create a new category object, children of idmef_node_t. If ptr already contain a idmef_node_category_t object, then it is destroyed.

ptr :

pointer to a idmef_node_t object.

ret :

pointer to an address where to store the created idmef_node_category_t object.

Returns :

0 on success, or a negative value if an error occured.

idmef_node_get_location ()

prelude_string_t *  idmef_node_get_location             (idmef_node_t *ptr);

ptr :

Returns :


idmef_node_set_location ()

void                idmef_node_set_location             (idmef_node_t *ptr,
                                                         prelude_string_t *location);

Set location object as a children of ptr. if ptr already contain an location object, then it is destroyed, and updated to point to the provided location object.

ptr :

pointer to a idmef_node_t object.

location :

pointer to a prelude_string_t object.

idmef_node_new_location ()

int                 idmef_node_new_location             (idmef_node_t *ptr,
                                                         prelude_string_t **ret);

Create a new location object, children of idmef_node_t. If ptr already contain a prelude_string_t object, then it is destroyed.

ptr :

pointer to a idmef_node_t object.

ret :

pointer to an address where to store the created prelude_string_t object.

Returns :

0 on success, or a negative value if an error occured.

idmef_node_get_name ()

prelude_string_t *  idmef_node_get_name                 (idmef_node_t *ptr);

ptr :

Returns :


idmef_node_set_name ()

void                idmef_node_set_name                 (idmef_node_t *ptr,
                                                         prelude_string_t *name);

Set name object as a children of ptr. if ptr already contain an name object, then it is destroyed, and updated to point to the provided name object.

ptr :

pointer to a idmef_node_t object.

name :

pointer to a prelude_string_t object.

idmef_node_new_name ()

int                 idmef_node_new_name                 (idmef_node_t *ptr,
                                                         prelude_string_t **ret);

Create a new name object, children of idmef_node_t. If ptr already contain a prelude_string_t object, then it is destroyed.

ptr :

pointer to a idmef_node_t object.

ret :

pointer to an address where to store the created prelude_string_t object.

Returns :

0 on success, or a negative value if an error occured.

idmef_node_get_next_address ()

idmef_address_t *   idmef_node_get_next_address         (idmef_node_t *node,
                                                         idmef_address_t *address_cur);

Get the next idmef_address_t object listed in ptr. When iterating over the idmef_address_t object listed in ptr, object should be set to the latest returned idmef_address_t object.

node :

pointer to a idmef_node_t object.

address_cur :

pointer to a idmef_address_t object.

Returns :

the next idmef_address_t in the list.

idmef_node_set_address ()

void                idmef_node_set_address              (idmef_node_t *ptr,
                                                         idmef_address_t *object,
                                                         int pos);

Add object to position pos of ptr list of idmef_address_t object.

If pos is IDMEF_LIST_APPEND, object will be inserted at the tail of the list. If pos is IDMEF_LIST_PREPEND, object will be inserted at the head of the list.

ptr :

pointer to a idmef_node_t object.

object :

pointer to a idmef_address_t object.

pos :

Position in the list.

idmef_node_new_address ()

int                 idmef_node_new_address              (idmef_node_t *ptr,
                                                         idmef_address_t **ret,
                                                         int pos);

Create a new idmef_address_t children of ptr, and add it to position pos of ptr list of idmef_address_t object. The created idmef_address_t object is stored in ret.

If pos is IDMEF_LIST_APPEND, object will be inserted at the tail of the list. If pos is IDMEF_LIST_PREPEND, object will be inserted at the head of the list.

ptr :

pointer to a idmef_node_t object.

ret :

pointer to an address where to store the created idmef_address_t object.

pos :

position in the list.

Returns :

0 on success, or a negative value if an error occured.

enum idmef_source_spoofed_t

typedef enum {
        IDMEF_SOURCE_SPOOFED_ERROR = -1,
        IDMEF_SOURCE_SPOOFED_UNKNOWN = 0,
        IDMEF_SOURCE_SPOOFED_YES = 1,
        IDMEF_SOURCE_SPOOFED_NO = 2
} idmef_source_spoofed_t;


idmef_source_spoofed_to_numeric ()

idmef_source_spoofed_t  idmef_source_spoofed_to_numeric (const char *name);

name :

pointer to an IDMEF string representation of a idmef_source_spoofed_t value.

Returns :

the numeric equivalent of name, or -1 if name is not valid.

idmef_source_spoofed_to_string ()

const char *        idmef_source_spoofed_to_string      (idmef_source_spoofed_t val);

Return the IDMEF string equivalent of val provided idmef_source_spoofed_t value.

val :

an enumeration value for idmef_source_spoofed_t.

Returns :

a pointer to the string describing val, or NULL if val is invalid.

idmef_source_t

typedef struct idmef_source idmef_source_t;


idmef_source_new ()

int                 idmef_source_new                    (idmef_source_t **ret);

Create a new idmef_source_t object.

ret :

Pointer where to store the created idmef_source_t object.

Returns :

0 on success, a negative value if an error occured.

idmef_source_copy ()

int                 idmef_source_copy                   (const idmef_source_t *src,
                                                         idmef_source_t *dst);

Copy a new idmef_source_t object from src to dst.

src :

Source of the copy.

dst :

Where to copy the object.

Returns :

0 on success, a negative value if an error occured.

idmef_source_clone ()

int                 idmef_source_clone                  (idmef_source_t *src,
                                                         idmef_source_t **dst);

Create a copy of src, and store it in dst.

src :

Object to be cloned.

dst :

Address where to store the pointer to the cloned object.

Returns :

0 on success, a negative value if an error occured.

idmef_source_ref ()

idmef_source_t *    idmef_source_ref                    (idmef_source_t *source);

Increase source reference count, so that it can be referenced multiple time.

source :

pointer to a idmef_source_t object.

Returns :

a pointer to source.

idmef_source_destroy ()

void                idmef_source_destroy                (idmef_source_t *ptr);

Destroy ptr and all of it's children. The objects are only destroyed if their reference count reach zero.

ptr :

pointer to a idmef_source_t object.

idmef_source_get_ident ()

prelude_string_t *  idmef_source_get_ident              (idmef_source_t *ptr);

ptr :

Returns :


idmef_source_set_ident ()

void                idmef_source_set_ident              (idmef_source_t *ptr,
                                                         prelude_string_t *ident);

Set ident object as a children of ptr. if ptr already contain an ident object, then it is destroyed, and updated to point to the provided ident object.

ptr :

pointer to a idmef_source_t object.

ident :

pointer to a prelude_string_t object.

idmef_source_new_ident ()

int                 idmef_source_new_ident              (idmef_source_t *ptr,
                                                         prelude_string_t **ret);

Create a new ident object, children of idmef_source_t. If ptr already contain a prelude_string_t object, then it is destroyed.

ptr :

pointer to a idmef_source_t object.

ret :

pointer to an address where to store the created prelude_string_t object.

Returns :

0 on success, or a negative value if an error occured.

idmef_source_get_spoofed ()

idmef_source_spoofed_t  idmef_source_get_spoofed        (idmef_source_t *ptr);

Get spoofed children of the idmef_source_t object.

ptr :

pointer to a idmef_source_t object.

Returns :

a pointer to a idmef_source_spoofed_t object, or NULL if the children object is not set.

idmef_source_set_spoofed ()

void                idmef_source_set_spoofed            (idmef_source_t *ptr,
                                                         idmef_source_spoofed_t spoofed);

Set spoofed object as a children of ptr. if ptr already contain an spoofed object, then it is destroyed, and updated to point to the provided spoofed object.

ptr :

pointer to a idmef_source_t object.

spoofed :

pointer to a idmef_source_spoofed_t object.

idmef_source_new_spoofed ()

int                 idmef_source_new_spoofed            (idmef_source_t *ptr,
                                                         idmef_source_spoofed_t **ret);

Create a new spoofed object, children of idmef_source_t. If ptr already contain a idmef_source_spoofed_t object, then it is destroyed.

ptr :

pointer to a idmef_source_t object.

ret :

pointer to an address where to store the created idmef_source_spoofed_t object.

Returns :

0 on success, or a negative value if an error occured.

idmef_source_get_interface ()

prelude_string_t *  idmef_source_get_interface          (idmef_source_t *ptr);

ptr :

Returns :


idmef_source_set_interface ()

void                idmef_source_set_interface          (idmef_source_t *ptr,
                                                         prelude_string_t *interface);

Set interface object as a children of ptr. if ptr already contain an interface object, then it is destroyed, and updated to point to the provided interface object.

ptr :

pointer to a idmef_source_t object.

interface :

pointer to a prelude_string_t object.

idmef_source_new_interface ()

int                 idmef_source_new_interface          (idmef_source_t *ptr,
                                                         prelude_string_t **ret);

Create a new interface object, children of idmef_source_t. If ptr already contain a prelude_string_t object, then it is destroyed.

ptr :

pointer to a idmef_source_t object.

ret :

pointer to an address where to store the created prelude_string_t object.

Returns :

0 on success, or a negative value if an error occured.

idmef_source_get_node ()

idmef_node_t *      idmef_source_get_node               (idmef_source_t *ptr);

ptr :

Returns :


idmef_source_set_node ()

void                idmef_source_set_node               (idmef_source_t *ptr,
                                                         idmef_node_t *node);

Set node object as a children of ptr. if ptr already contain an node object, then it is destroyed, and updated to point to the provided node object.

ptr :

pointer to a idmef_source_t object.

node :

pointer to a idmef_node_t object.

idmef_source_new_node ()

int                 idmef_source_new_node               (idmef_source_t *ptr,
                                                         idmef_node_t **ret);

Create a new node object, children of idmef_source_t. If ptr already contain a idmef_node_t object, then it is destroyed.

ptr :

pointer to a idmef_source_t object.

ret :

pointer to an address where to store the created idmef_node_t object.

Returns :

0 on success, or a negative value if an error occured.

idmef_source_get_user ()

idmef_user_t *      idmef_source_get_user               (idmef_source_t *ptr);

ptr :

Returns :


idmef_source_set_user ()

void                idmef_source_set_user               (idmef_source_t *ptr,
                                                         idmef_user_t *user);

Set user object as a children of ptr. if ptr already contain an user object, then it is destroyed, and updated to point to the provided user object.

ptr :

pointer to a idmef_source_t object.

user :

pointer to a idmef_user_t object.

idmef_source_new_user ()

int                 idmef_source_new_user               (idmef_source_t *ptr,
                                                         idmef_user_t **ret);

Create a new user object, children of idmef_source_t. If ptr already contain a idmef_user_t object, then it is destroyed.

ptr :

pointer to a idmef_source_t object.

ret :

pointer to an address where to store the created idmef_user_t object.

Returns :

0 on success, or a negative value if an error occured.

idmef_source_get_process ()

idmef_process_t *   idmef_source_get_process            (idmef_source_t *ptr);

ptr :

Returns :


idmef_source_set_process ()

void                idmef_source_set_process            (idmef_source_t *ptr,
                                                         idmef_process_t *process);

Set process object as a children of ptr. if ptr already contain an process object, then it is destroyed, and updated to point to the provided process object.

ptr :

pointer to a idmef_source_t object.

process :

pointer to a idmef_process_t object.

idmef_source_new_process ()

int                 idmef_source_new_process            (idmef_source_t *ptr,
                                                         idmef_process_t **ret);

Create a new process object, children of idmef_source_t. If ptr already contain a idmef_process_t object, then it is destroyed.

ptr :

pointer to a idmef_source_t object.

ret :

pointer to an address where to store the created idmef_process_t object.

Returns :

0 on success, or a negative value if an error occured.

idmef_source_get_service ()

idmef_service_t *   idmef_source_get_service            (idmef_source_t *ptr);

ptr :

Returns :


idmef_source_set_service ()

void                idmef_source_set_service            (idmef_source_t *ptr,
                                                         idmef_service_t *service);

Set service object as a children of ptr. if ptr already contain an service object, then it is destroyed, and updated to point to the provided service object.

ptr :

pointer to a idmef_source_t object.

service :

pointer to a idmef_service_t object.

idmef_source_new_service ()

int                 idmef_source_new_service            (idmef_source_t *ptr,
                                                         idmef_service_t **ret);

Create a new service object, children of idmef_source_t. If ptr already contain a idmef_service_t object, then it is destroyed.

ptr :

pointer to a idmef_source_t object.

ret :

pointer to an address where to store the created idmef_service_t object.

Returns :

0 on success, or a negative value if an error occured.

idmef_file_access_t

typedef struct idmef_file_access idmef_file_access_t;


idmef_file_access_new ()

int                 idmef_file_access_new               (idmef_file_access_t **ret);

Create a new idmef_file_access_t object.

ret :

Pointer where to store the created idmef_file_access_t object.

Returns :

0 on success, a negative value if an error occured.

idmef_file_access_copy ()

int                 idmef_file_access_copy              (const idmef_file_access_t *src,
                                                         idmef_file_access_t *dst);

Copy a new idmef_file_access_t object from src to dst.

src :

Source of the copy.

dst :

Where to copy the object.

Returns :

0 on success, a negative value if an error occured.

idmef_file_access_clone ()

int                 idmef_file_access_clone             (idmef_file_access_t *src,
                                                         idmef_file_access_t **dst);

Create a copy of src, and store it in dst.

src :

Object to be cloned.

dst :

Address where to store the pointer to the cloned object.

Returns :

0 on success, a negative value if an error occured.

idmef_file_access_ref ()

idmef_file_access_t * idmef_file_access_ref             (idmef_file_access_t *file_access);

Increase file_access reference count, so that it can be referenced multiple time.

file_access :

pointer to a idmef_file_access_t object.

Returns :

a pointer to file_access.

idmef_file_access_destroy ()

void                idmef_file_access_destroy           (idmef_file_access_t *ptr);

Destroy ptr and all of it's children. The objects are only destroyed if their reference count reach zero.

ptr :

pointer to a idmef_file_access_t object.

idmef_file_access_get_user_id ()

idmef_user_id_t *   idmef_file_access_get_user_id       (idmef_file_access_t *ptr);

ptr :

Returns :


idmef_file_access_set_user_id ()

void                idmef_file_access_set_user_id       (idmef_file_access_t *ptr,
                                                         idmef_user_id_t *user_id);

Set user_id object as a children of ptr. if ptr already contain an user_id object, then it is destroyed, and updated to point to the provided user_id object.

ptr :

pointer to a idmef_file_access_t object.

user_id :

pointer to a idmef_user_id_t object.

idmef_file_access_new_user_id ()

int                 idmef_file_access_new_user_id       (idmef_file_access_t *ptr,
                                                         idmef_user_id_t **ret);

Create a new user_id object, children of idmef_file_access_t. If ptr already contain a idmef_user_id_t object, then it is destroyed.

ptr :

pointer to a idmef_file_access_t object.

ret :

pointer to an address where to store the created idmef_user_id_t object.

Returns :

0 on success, or a negative value if an error occured.

idmef_file_access_get_next_permission ()

prelude_string_t *  idmef_file_access_get_next_permission
                                                        (idmef_file_access_t *file_access,
                                                         prelude_string_t *prelude_string_cur);

Get the next prelude_string_t object listed in ptr. When iterating over the prelude_string_t object listed in ptr, object should be set to the latest returned prelude_string_t object.

file_access :

pointer to a idmef_file_access_t object.

prelude_string_cur :

pointer to a prelude_string_t object.

Returns :

the next prelude_string_t in the list.

idmef_file_access_set_permission ()

void                idmef_file_access_set_permission    (idmef_file_access_t *ptr,
                                                         prelude_string_t *object,
                                                         int pos);

Add object to position pos of ptr list of prelude_string_t object.

If pos is IDMEF_LIST_APPEND, object will be inserted at the tail of the list. If pos is IDMEF_LIST_PREPEND, object will be inserted at the head of the list.

ptr :

pointer to a idmef_file_access_t object.

object :

pointer to a prelude_string_t object.

pos :

Position in the list.

idmef_file_access_new_permission ()

int                 idmef_file_access_new_permission    (idmef_file_access_t *ptr,
                                                         prelude_string_t **ret,
                                                         int pos);

Create a new prelude_string_t children of ptr, and add it to position pos of ptr list of prelude_string_t object. The created prelude_string_t object is stored in ret.

If pos is IDMEF_LIST_APPEND, object will be inserted at the tail of the list. If pos is IDMEF_LIST_PREPEND, object will be inserted at the head of the list.

ptr :

pointer to a idmef_file_access_t object.

ret :

pointer to an address where to store the created prelude_string_t object.

pos :

position in the list.

Returns :

0 on success, or a negative value if an error occured.

idmef_inode_t

typedef struct idmef_inode idmef_inode_t;


idmef_inode_new ()

int                 idmef_inode_new                     (idmef_inode_t **ret);

Create a new idmef_inode_t object.

ret :

Pointer where to store the created idmef_inode_t object.

Returns :

0 on success, a negative value if an error occured.

idmef_inode_copy ()

int                 idmef_inode_copy                    (const idmef_inode_t *src,
                                                         idmef_inode_t *dst);

Copy a new idmef_inode_t object from src to dst.

src :

Source of the copy.

dst :

Where to copy the object.

Returns :

0 on success, a negative value if an error occured.

idmef_inode_clone ()

int                 idmef_inode_clone                   (idmef_inode_t *src,
                                                         idmef_inode_t **dst);

Create a copy of src, and store it in dst.

src :

Object to be cloned.

dst :

Address where to store the pointer to the cloned object.

Returns :

0 on success, a negative value if an error occured.

idmef_inode_ref ()

idmef_inode_t *     idmef_inode_ref                     (idmef_inode_t *inode);

Increase inode reference count, so that it can be referenced multiple time.

inode :

pointer to a idmef_inode_t object.

Returns :

a pointer to inode.

idmef_inode_destroy ()

void                idmef_inode_destroy                 (idmef_inode_t *ptr);

Destroy ptr and all of it's children. The objects are only destroyed if their reference count reach zero.

ptr :

pointer to a idmef_inode_t object.

idmef_inode_get_change_time ()

idmef_time_t *      idmef_inode_get_change_time         (idmef_inode_t *ptr);

ptr :

Returns :


idmef_inode_set_change_time ()

void                idmef_inode_set_change_time         (idmef_inode_t *ptr,
                                                         idmef_time_t *change_time);

Set change_time object as a children of ptr. if ptr already contain an change_time object, then it is destroyed, and updated to point to the provided change_time object.

ptr :

pointer to a idmef_inode_t object.

change_time :

pointer to a idmef_time_t object.

idmef_inode_new_change_time ()

int                 idmef_inode_new_change_time         (idmef_inode_t *ptr,
                                                         idmef_time_t **ret);

Create a new change_time object, children of idmef_inode_t. If ptr already contain a idmef_time_t object, then it is destroyed.

ptr :

pointer to a idmef_inode_t object.

ret :

pointer to an address where to store the created idmef_time_t object.

Returns :

0 on success, or a negative value if an error occured.

idmef_inode_unset_number ()

void                idmef_inode_unset_number            (idmef_inode_t *ptr);

ptr :


idmef_inode_get_number ()

uint32_t *          idmef_inode_get_number              (idmef_inode_t *ptr);

ptr :

Returns :


idmef_inode_set_number ()

void                idmef_inode_set_number              (idmef_inode_t *ptr,
                                                         uint32_t number);

Set number object as a children of ptr. if ptr already contain an number object, then it is destroyed, and updated to point to the provided number object.

ptr :

pointer to a idmef_inode_t object.

number :

pointer to a uint32_t object.

idmef_inode_new_number ()

int                 idmef_inode_new_number              (idmef_inode_t *ptr,
                                                         uint32_t **ret);

Create a new number object, children of idmef_inode_t. If ptr already contain a uint32_t object, then it is destroyed.

ptr :

pointer to a idmef_inode_t object.

ret :

pointer to an address where to store the created uint32_t object.

Returns :

0 on success, or a negative value if an error occured.

idmef_inode_unset_major_device ()

void                idmef_inode_unset_major_device      (idmef_inode_t *ptr);

ptr :


idmef_inode_get_major_device ()

uint32_t *          idmef_inode_get_major_device        (idmef_inode_t *ptr);

ptr :

Returns :


idmef_inode_set_major_device ()

void                idmef_inode_set_major_device        (idmef_inode_t *ptr,
                                                         uint32_t major_device);

Set major_device object as a children of ptr. if ptr already contain an major_device object, then it is destroyed, and updated to point to the provided major_device object.

ptr :

pointer to a idmef_inode_t object.

major_device :

pointer to a uint32_t object.

idmef_inode_new_major_device ()

int                 idmef_inode_new_major_device        (idmef_inode_t *ptr,
                                                         uint32_t **ret);

Create a new major_device object, children of idmef_inode_t. If ptr already contain a uint32_t object, then it is destroyed.

ptr :

pointer to a idmef_inode_t object.

ret :

pointer to an address where to store the created uint32_t object.

Returns :

0 on success, or a negative value if an error occured.

idmef_inode_unset_minor_device ()

void                idmef_inode_unset_minor_device      (idmef_inode_t *ptr);

ptr :


idmef_inode_get_minor_device ()

uint32_t *          idmef_inode_get_minor_device        (idmef_inode_t *ptr);

ptr :

Returns :


idmef_inode_set_minor_device ()

void                idmef_inode_set_minor_device        (idmef_inode_t *ptr,
                                                         uint32_t minor_device);

Set minor_device object as a children of ptr. if ptr already contain an minor_device object, then it is destroyed, and updated to point to the provided minor_device object.

ptr :

pointer to a idmef_inode_t object.

minor_device :

pointer to a uint32_t object.

idmef_inode_new_minor_device ()

int                 idmef_inode_new_minor_device        (idmef_inode_t *ptr,
                                                         uint32_t **ret);

Create a new minor_device object, children of idmef_inode_t. If ptr already contain a uint32_t object, then it is destroyed.

ptr :

pointer to a idmef_inode_t object.

ret :

pointer to an address where to store the created uint32_t object.

Returns :

0 on success, or a negative value if an error occured.

idmef_inode_unset_c_major_device ()

void                idmef_inode_unset_c_major_device    (idmef_inode_t *ptr);

ptr :


idmef_inode_get_c_major_device ()

uint32_t *          idmef_inode_get_c_major_device      (idmef_inode_t *ptr);

ptr :

Returns :


idmef_inode_set_c_major_device ()

void                idmef_inode_set_c_major_device      (idmef_inode_t *ptr,
                                                         uint32_t c_major_device);

Set c_major_device object as a children of ptr. if ptr already contain an c_major_device object, then it is destroyed, and updated to point to the provided c_major_device object.

ptr :

pointer to a idmef_inode_t object.

c_major_device :

pointer to a uint32_t object.

idmef_inode_new_c_major_device ()

int                 idmef_inode_new_c_major_device      (idmef_inode_t *ptr,
                                                         uint32_t **ret);

Create a new c_major_device object, children of idmef_inode_t. If ptr already contain a uint32_t object, then it is destroyed.

ptr :

pointer to a idmef_inode_t object.

ret :

pointer to an address where to store the created uint32_t object.

Returns :

0 on success, or a negative value if an error occured.

idmef_inode_unset_c_minor_device ()

void                idmef_inode_unset_c_minor_device    (idmef_inode_t *ptr);

ptr :


idmef_inode_get_c_minor_device ()

uint32_t *          idmef_inode_get_c_minor_device      (idmef_inode_t *ptr);

ptr :

Returns :


idmef_inode_set_c_minor_device ()

void                idmef_inode_set_c_minor_device      (idmef_inode_t *ptr,
                                                         uint32_t c_minor_device);

Set c_minor_device object as a children of ptr. if ptr already contain an c_minor_device object, then it is destroyed, and updated to point to the provided c_minor_device object.

ptr :

pointer to a idmef_inode_t object.

c_minor_device :

pointer to a uint32_t object.

idmef_inode_new_c_minor_device ()

int                 idmef_inode_new_c_minor_device      (idmef_inode_t *ptr,
                                                         uint32_t **ret);

Create a new c_minor_device object, children of idmef_inode_t. If ptr already contain a uint32_t object, then it is destroyed.

ptr :

pointer to a idmef_inode_t object.

ret :

pointer to an address where to store the created uint32_t object.

Returns :

0 on success, or a negative value if an error occured.

idmef_linkage_t

typedef struct idmef_linkage idmef_linkage_t;


enum idmef_checksum_algorithm_t

typedef enum {
        IDMEF_CHECKSUM_ALGORITHM_ERROR = -1,
        IDMEF_CHECKSUM_ALGORITHM_MD4 = 1,
        IDMEF_CHECKSUM_ALGORITHM_MD5 = 2,
        IDMEF_CHECKSUM_ALGORITHM_SHA1 = 3,
        IDMEF_CHECKSUM_ALGORITHM_SHA2_256 = 4,
        IDMEF_CHECKSUM_ALGORITHM_SHA2_384 = 5,
        IDMEF_CHECKSUM_ALGORITHM_SHA2_512 = 6,
        IDMEF_CHECKSUM_ALGORITHM_CRC_32 = 7,
        IDMEF_CHECKSUM_ALGORITHM_HAVAL = 8,
        IDMEF_CHECKSUM_ALGORITHM_TIGER = 9,
        IDMEF_CHECKSUM_ALGORITHM_GOST = 11
} idmef_checksum_algorithm_t;


idmef_checksum_algorithm_to_numeric ()

idmef_checksum_algorithm_t  idmef_checksum_algorithm_to_numeric
                                                        (const char *name);

name :

pointer to an IDMEF string representation of a idmef_checksum_algorithm_t value.

Returns :

the numeric equivalent of name, or -1 if name is not valid.

idmef_checksum_algorithm_to_string ()

const char *        idmef_checksum_algorithm_to_string  (idmef_checksum_algorithm_t val);

Return the IDMEF string equivalent of val provided idmef_checksum_algorithm_t value.

val :

an enumeration value for idmef_checksum_algorithm_t.

Returns :

a pointer to the string describing val, or NULL if val is invalid.

idmef_checksum_t

typedef struct idmef_checksum idmef_checksum_t;


idmef_checksum_new ()

int                 idmef_checksum_new                  (idmef_checksum_t **ret);

Create a new idmef_checksum_t object.

ret :

Pointer where to store the created idmef_checksum_t object.

Returns :

0 on success, a negative value if an error occured.

idmef_checksum_copy ()

int                 idmef_checksum_copy                 (const idmef_checksum_t *src,
                                                         idmef_checksum_t *dst);

Copy a new idmef_checksum_t object from src to dst.

src :

Source of the copy.

dst :

Where to copy the object.

Returns :

0 on success, a negative value if an error occured.

idmef_checksum_clone ()

int                 idmef_checksum_clone                (idmef_checksum_t *src,
                                                         idmef_checksum_t **dst);

Create a copy of src, and store it in dst.

src :

Object to be cloned.

dst :

Address where to store the pointer to the cloned object.

Returns :

0 on success, a negative value if an error occured.

idmef_checksum_ref ()

idmef_checksum_t *  idmef_checksum_ref                  (idmef_checksum_t *checksum);

Increase checksum reference count, so that it can be referenced multiple time.

checksum :

pointer to a idmef_checksum_t object.

Returns :

a pointer to checksum.

idmef_checksum_destroy ()

void                idmef_checksum_destroy              (idmef_checksum_t *ptr);

Destroy ptr and all of it's children. The objects are only destroyed if their reference count reach zero.

ptr :

pointer to a idmef_checksum_t object.

idmef_checksum_get_value ()

prelude_string_t *  idmef_checksum_get_value            (idmef_checksum_t *ptr);

ptr :

Returns :


idmef_checksum_set_value ()

void                idmef_checksum_set_value            (idmef_checksum_t *ptr,
                                                         prelude_string_t *value);

Set value object as a children of ptr. if ptr already contain an value object, then it is destroyed, and updated to point to the provided value object.

ptr :

pointer to a idmef_checksum_t object.

value :

pointer to a prelude_string_t object.

idmef_checksum_new_value ()

int                 idmef_checksum_new_value            (idmef_checksum_t *ptr,
                                                         prelude_string_t **ret);

Create a new value object, children of idmef_checksum_t. If ptr already contain a prelude_string_t object, then it is destroyed.

ptr :

pointer to a idmef_checksum_t object.

ret :

pointer to an address where to store the created prelude_string_t object.

Returns :

0 on success, or a negative value if an error occured.

idmef_checksum_get_key ()

prelude_string_t *  idmef_checksum_get_key              (idmef_checksum_t *ptr);

ptr :

Returns :


idmef_checksum_set_key ()

void                idmef_checksum_set_key              (idmef_checksum_t *ptr,
                                                         prelude_string_t *key);

Set key object as a children of ptr. if ptr already contain an key object, then it is destroyed, and updated to point to the provided key object.

ptr :

pointer to a idmef_checksum_t object.

key :

pointer to a prelude_string_t object.

idmef_checksum_new_key ()

int                 idmef_checksum_new_key              (idmef_checksum_t *ptr,
                                                         prelude_string_t **ret);

Create a new key object, children of idmef_checksum_t. If ptr already contain a prelude_string_t object, then it is destroyed.

ptr :

pointer to a idmef_checksum_t object.

ret :

pointer to an address where to store the created prelude_string_t object.

Returns :

0 on success, or a negative value if an error occured.

idmef_checksum_get_algorithm ()

idmef_checksum_algorithm_t  idmef_checksum_get_algorithm
                                                        (idmef_checksum_t *ptr);

Get algorithm children of the idmef_checksum_t object.

ptr :

pointer to a idmef_checksum_t object.

Returns :

a pointer to a idmef_checksum_algorithm_t object, or NULL if the children object is not set.

idmef_checksum_set_algorithm ()

void                idmef_checksum_set_algorithm        (idmef_checksum_t *ptr,
                                                         idmef_checksum_algorithm_t algorithm);

Set algorithm object as a children of ptr. if ptr already contain an algorithm object, then it is destroyed, and updated to point to the provided algorithm object.

ptr :

pointer to a idmef_checksum_t object.

algorithm :

pointer to a idmef_checksum_algorithm_t object.

idmef_checksum_new_algorithm ()

int                 idmef_checksum_new_algorithm        (idmef_checksum_t *ptr,
                                                         idmef_checksum_algorithm_t **ret);

Create a new algorithm object, children of idmef_checksum_t. If ptr already contain a idmef_checksum_algorithm_t object, then it is destroyed.

ptr :

pointer to a idmef_checksum_t object.

ret :

pointer to an address where to store the created idmef_checksum_algorithm_t object.

Returns :

0 on success, or a negative value if an error occured.

enum idmef_file_category_t

typedef enum {
        IDMEF_FILE_CATEGORY_ERROR = -1,
        IDMEF_FILE_CATEGORY_CURRENT = 1,
        IDMEF_FILE_CATEGORY_ORIGINAL = 2
} idmef_file_category_t;


idmef_file_category_to_numeric ()

idmef_file_category_t  idmef_file_category_to_numeric   (const char *name);

name :

pointer to an IDMEF string representation of a idmef_file_category_t value.

Returns :

the numeric equivalent of name, or -1 if name is not valid.

idmef_file_category_to_string ()

const char *        idmef_file_category_to_string       (idmef_file_category_t val);

Return the IDMEF string equivalent of val provided idmef_file_category_t value.

val :

an enumeration value for idmef_file_category_t.

Returns :

a pointer to the string describing val, or NULL if val is invalid.

enum idmef_file_fstype_t

typedef enum {
        IDMEF_FILE_FSTYPE_ERROR = -1,
        IDMEF_FILE_FSTYPE_UFS = 1,
        IDMEF_FILE_FSTYPE_EFS = 2,
        IDMEF_FILE_FSTYPE_NFS = 3,
        IDMEF_FILE_FSTYPE_AFS = 4,
        IDMEF_FILE_FSTYPE_NTFS = 5,
        IDMEF_FILE_FSTYPE_FAT16 = 6,
        IDMEF_FILE_FSTYPE_FAT32 = 7,
        IDMEF_FILE_FSTYPE_PCFS = 8,
        IDMEF_FILE_FSTYPE_JOLIET = 9,
        IDMEF_FILE_FSTYPE_ISO9660 = 10
} idmef_file_fstype_t;


idmef_file_fstype_to_numeric ()

idmef_file_fstype_t  idmef_file_fstype_to_numeric       (const char *name);

name :

pointer to an IDMEF string representation of a idmef_file_fstype_t value.

Returns :

the numeric equivalent of name, or -1 if name is not valid.

idmef_file_fstype_to_string ()

const char *        idmef_file_fstype_to_string         (idmef_file_fstype_t val);

Return the IDMEF string equivalent of val provided idmef_file_fstype_t value.

val :

an enumeration value for idmef_file_fstype_t.

Returns :

a pointer to the string describing val, or NULL if val is invalid.

idmef_file_t

typedef struct idmef_file idmef_file_t;


idmef_file_new ()

int                 idmef_file_new                      (idmef_file_t **ret);

Create a new idmef_file_t object.

ret :

Pointer where to store the created idmef_file_t object.

Returns :

0 on success, a negative value if an error occured.

idmef_file_copy ()

int                 idmef_file_copy                     (const idmef_file_t *src,
                                                         idmef_file_t *dst);

Copy a new idmef_file_t object from src to dst.

src :

Source of the copy.

dst :

Where to copy the object.

Returns :

0 on success, a negative value if an error occured.

idmef_file_clone ()

int                 idmef_file_clone                    (idmef_file_t *src,
                                                         idmef_file_t **dst);

Create a copy of src, and store it in dst.

src :

Object to be cloned.

dst :

Address where to store the pointer to the cloned object.

Returns :

0 on success, a negative value if an error occured.

idmef_file_ref ()

idmef_file_t *      idmef_file_ref                      (idmef_file_t *file);

Increase file reference count, so that it can be referenced multiple time.

file :

pointer to a idmef_file_t object.

Returns :

a pointer to file.

idmef_file_destroy ()

void                idmef_file_destroy                  (idmef_file_t *ptr);

Destroy ptr and all of it's children. The objects are only destroyed if their reference count reach zero.

ptr :

pointer to a idmef_file_t object.

idmef_file_get_ident ()

prelude_string_t *  idmef_file_get_ident                (idmef_file_t *ptr);

ptr :

Returns :


idmef_file_set_ident ()

void                idmef_file_set_ident                (idmef_file_t *ptr,
                                                         prelude_string_t *ident);

Set ident object as a children of ptr. if ptr already contain an ident object, then it is destroyed, and updated to point to the provided ident object.

ptr :

pointer to a idmef_file_t object.

ident :

pointer to a prelude_string_t object.

idmef_file_new_ident ()

int                 idmef_file_new_ident                (idmef_file_t *ptr,
                                                         prelude_string_t **ret);

Create a new ident object, children of idmef_file_t. If ptr already contain a prelude_string_t object, then it is destroyed.

ptr :

pointer to a idmef_file_t object.

ret :

pointer to an address where to store the created prelude_string_t object.

Returns :

0 on success, or a negative value if an error occured.

idmef_file_get_name ()

prelude_string_t *  idmef_file_get_name                 (idmef_file_t *ptr);

ptr :

Returns :


idmef_file_set_name ()

void                idmef_file_set_name                 (idmef_file_t *ptr,
                                                         prelude_string_t *name);

Set name object as a children of ptr. if ptr already contain an name object, then it is destroyed, and updated to point to the provided name object.

ptr :

pointer to a idmef_file_t object.

name :

pointer to a prelude_string_t object.

idmef_file_new_name ()

int                 idmef_file_new_name                 (idmef_file_t *ptr,
                                                         prelude_string_t **ret);

Create a new name object, children of idmef_file_t. If ptr already contain a prelude_string_t object, then it is destroyed.

ptr :

pointer to a idmef_file_t object.

ret :

pointer to an address where to store the created prelude_string_t object.

Returns :

0 on success, or a negative value if an error occured.

idmef_file_get_path ()

prelude_string_t *  idmef_file_get_path                 (idmef_file_t *ptr);

ptr :

Returns :


idmef_file_set_path ()

void                idmef_file_set_path                 (idmef_file_t *ptr,
                                                         prelude_string_t *path);

Set path object as a children of ptr. if ptr already contain an path object, then it is destroyed, and updated to point to the provided path object.

ptr :

pointer to a idmef_file_t object.

path :

pointer to a prelude_string_t object.

idmef_file_new_path ()

int                 idmef_file_new_path                 (idmef_file_t *ptr,
                                                         prelude_string_t **ret);

Create a new path object, children of idmef_file_t. If ptr already contain a prelude_string_t object, then it is destroyed.

ptr :

pointer to a idmef_file_t object.

ret :

pointer to an address where to store the created prelude_string_t object.

Returns :

0 on success, or a negative value if an error occured.

idmef_file_get_create_time ()

idmef_time_t *      idmef_file_get_create_time          (idmef_file_t *ptr);

ptr :

Returns :


idmef_file_set_create_time ()

void                idmef_file_set_create_time          (idmef_file_t *ptr,
                                                         idmef_time_t *create_time);

Set create_time object as a children of ptr. if ptr already contain an create_time object, then it is destroyed, and updated to point to the provided create_time object.

ptr :

pointer to a idmef_file_t object.

create_time :

pointer to a idmef_time_t object.

idmef_file_new_create_time ()

int                 idmef_file_new_create_time          (idmef_file_t *ptr,
                                                         idmef_time_t **ret);

Create a new create_time object, children of idmef_file_t. If ptr already contain a idmef_time_t object, then it is destroyed.

ptr :

pointer to a idmef_file_t object.

ret :

pointer to an address where to store the created idmef_time_t object.

Returns :

0 on success, or a negative value if an error occured.

idmef_file_get_modify_time ()

idmef_time_t *      idmef_file_get_modify_time          (idmef_file_t *ptr);

ptr :

Returns :


idmef_file_set_modify_time ()

void                idmef_file_set_modify_time          (idmef_file_t *ptr,
                                                         idmef_time_t *modify_time);

Set modify_time object as a children of ptr. if ptr already contain an modify_time object, then it is destroyed, and updated to point to the provided modify_time object.

ptr :

pointer to a idmef_file_t object.

modify_time :

pointer to a idmef_time_t object.

idmef_file_new_modify_time ()

int                 idmef_file_new_modify_time          (idmef_file_t *ptr,
                                                         idmef_time_t **ret);

Create a new modify_time object, children of idmef_file_t. If ptr already contain a idmef_time_t object, then it is destroyed.

ptr :

pointer to a idmef_file_t object.

ret :

pointer to an address where to store the created idmef_time_t object.

Returns :

0 on success, or a negative value if an error occured.

idmef_file_get_access_time ()

idmef_time_t *      idmef_file_get_access_time          (idmef_file_t *ptr);

ptr :

Returns :


idmef_file_set_access_time ()

void                idmef_file_set_access_time          (idmef_file_t *ptr,
                                                         idmef_time_t *access_time);

Set access_time object as a children of ptr. if ptr already contain an access_time object, then it is destroyed, and updated to point to the provided access_time object.

ptr :

pointer to a idmef_file_t object.

access_time :

pointer to a idmef_time_t object.

idmef_file_new_access_time ()

int                 idmef_file_new_access_time          (idmef_file_t *ptr,
                                                         idmef_time_t **ret);

Create a new access_time object, children of idmef_file_t. If ptr already contain a idmef_time_t object, then it is destroyed.

ptr :

pointer to a idmef_file_t object.

ret :

pointer to an address where to store the created idmef_time_t object.

Returns :

0 on success, or a negative value if an error occured.

idmef_file_unset_data_size ()

void                idmef_file_unset_data_size          (idmef_file_t *ptr);

ptr :


idmef_file_get_data_size ()

uint64_t *          idmef_file_get_data_size            (idmef_file_t *ptr);

ptr :

Returns :


idmef_file_set_data_size ()

void                idmef_file_set_data_size            (idmef_file_t *ptr,
                                                         uint64_t data_size);

Set data_size object as a children of ptr. if ptr already contain an data_size object, then it is destroyed, and updated to point to the provided data_size object.

ptr :

pointer to a idmef_file_t object.

data_size :

pointer to a uint64_t object.

idmef_file_new_data_size ()

int                 idmef_file_new_data_size            (idmef_file_t *ptr,
                                                         uint64_t **ret);

Create a new data_size object, children of idmef_file_t. If ptr already contain a uint64_t object, then it is destroyed.

ptr :

pointer to a idmef_file_t object.

ret :

pointer to an address where to store the created uint64_t object.

Returns :

0 on success, or a negative value if an error occured.

idmef_file_unset_disk_size ()

void                idmef_file_unset_disk_size          (idmef_file_t *ptr);

ptr :


idmef_file_get_disk_size ()

uint64_t *          idmef_file_get_disk_size            (idmef_file_t *ptr);

ptr :

Returns :


idmef_file_set_disk_size ()

void                idmef_file_set_disk_size            (idmef_file_t *ptr,
                                                         uint64_t disk_size);

Set disk_size object as a children of ptr. if ptr already contain an disk_size object, then it is destroyed, and updated to point to the provided disk_size object.

ptr :

pointer to a idmef_file_t object.

disk_size :

pointer to a uint64_t object.

idmef_file_new_disk_size ()

int                 idmef_file_new_disk_size            (idmef_file_t *ptr,
                                                         uint64_t **ret);

Create a new disk_size object, children of idmef_file_t. If ptr already contain a uint64_t object, then it is destroyed.

ptr :

pointer to a idmef_file_t object.

ret :

pointer to an address where to store the created uint64_t object.

Returns :

0 on success, or a negative value if an error occured.

idmef_file_get_next_file_access ()

idmef_file_access_t * idmef_file_get_next_file_access   (idmef_file_t *file,
                                                         idmef_file_access_t *file_access_cur);

Get the next idmef_file_access_t object listed in ptr. When iterating over the idmef_file_access_t object listed in ptr, object should be set to the latest returned idmef_file_access_t object.

file :

pointer to a idmef_file_t object.

file_access_cur :

pointer to a idmef_file_access_t object.

Returns :

the next idmef_file_access_t in the list.

idmef_file_set_file_access ()

void                idmef_file_set_file_access          (idmef_file_t *ptr,
                                                         idmef_file_access_t *object,
                                                         int pos);

Add object to position pos of ptr list of idmef_file_access_t object.

If pos is IDMEF_LIST_APPEND, object will be inserted at the tail of the list. If pos is IDMEF_LIST_PREPEND, object will be inserted at the head of the list.

ptr :

pointer to a idmef_file_t object.

object :

pointer to a idmef_file_access_t object.

pos :

Position in the list.

idmef_file_new_file_access ()

int                 idmef_file_new_file_access          (idmef_file_t *ptr,
                                                         idmef_file_access_t **ret,
                                                         int pos);

Create a new idmef_file_access_t children of ptr, and add it to position pos of ptr list of idmef_file_access_t object. The created idmef_file_access_t object is stored in ret.

If pos is IDMEF_LIST_APPEND, object will be inserted at the tail of the list. If pos is IDMEF_LIST_PREPEND, object will be inserted at the head of the list.

ptr :

pointer to a idmef_file_t object.

ret :

pointer to an address where to store the created idmef_file_access_t object.

pos :

position in the list.

Returns :

0 on success, or a negative value if an error occured.

idmef_file_get_next_linkage ()

idmef_linkage_t *   idmef_file_get_next_linkage         (idmef_file_t *file,
                                                         idmef_linkage_t *linkage_cur);

Get the next idmef_linkage_t object listed in ptr. When iterating over the idmef_linkage_t object listed in ptr, object should be set to the latest returned idmef_linkage_t object.

file :

pointer to a idmef_file_t object.

linkage_cur :

pointer to a idmef_linkage_t object.

Returns :

the next idmef_linkage_t in the list.

idmef_file_set_linkage ()

void                idmef_file_set_linkage              (idmef_file_t *ptr,
                                                         idmef_linkage_t *object,
                                                         int pos);

Add object to position pos of ptr list of idmef_linkage_t object.

If pos is IDMEF_LIST_APPEND, object will be inserted at the tail of the list. If pos is IDMEF_LIST_PREPEND, object will be inserted at the head of the list.

ptr :

pointer to a idmef_file_t object.

object :

pointer to a idmef_linkage_t object.

pos :

Position in the list.

idmef_file_new_linkage ()

int                 idmef_file_new_linkage              (idmef_file_t *ptr,
                                                         idmef_linkage_t **ret,
                                                         int pos);

Create a new idmef_linkage_t children of ptr, and add it to position pos of ptr list of idmef_linkage_t object. The created idmef_linkage_t object is stored in ret.

If pos is IDMEF_LIST_APPEND, object will be inserted at the tail of the list. If pos is IDMEF_LIST_PREPEND, object will be inserted at the head of the list.

ptr :

pointer to a idmef_file_t object.

ret :

pointer to an address where to store the created idmef_linkage_t object.

pos :

position in the list.

Returns :

0 on success, or a negative value if an error occured.

idmef_file_get_inode ()

idmef_inode_t *     idmef_file_get_inode                (idmef_file_t *ptr);

ptr :

Returns :


idmef_file_set_inode ()

void                idmef_file_set_inode                (idmef_file_t *ptr,
                                                         idmef_inode_t *inode);

Set inode object as a children of ptr. if ptr already contain an inode object, then it is destroyed, and updated to point to the provided inode object.

ptr :

pointer to a idmef_file_t object.

inode :

pointer to a idmef_inode_t object.

idmef_file_new_inode ()

int                 idmef_file_new_inode                (idmef_file_t *ptr,
                                                         idmef_inode_t **ret);

Create a new inode object, children of idmef_file_t. If ptr already contain a idmef_inode_t object, then it is destroyed.

ptr :

pointer to a idmef_file_t object.

ret :

pointer to an address where to store the created idmef_inode_t object.

Returns :

0 on success, or a negative value if an error occured.

idmef_file_get_next_checksum ()

idmef_checksum_t *  idmef_file_get_next_checksum        (idmef_file_t *file,
                                                         idmef_checksum_t *checksum_cur);

Get the next idmef_checksum_t object listed in ptr. When iterating over the idmef_checksum_t object listed in ptr, object should be set to the latest returned idmef_checksum_t object.

file :

pointer to a idmef_file_t object.

checksum_cur :

pointer to a idmef_checksum_t object.

Returns :

the next idmef_checksum_t in the list.

idmef_file_set_checksum ()

void                idmef_file_set_checksum             (idmef_file_t *ptr,
                                                         idmef_checksum_t *object,
                                                         int pos);

Add object to position pos of ptr list of idmef_checksum_t object.

If pos is IDMEF_LIST_APPEND, object will be inserted at the tail of the list. If pos is IDMEF_LIST_PREPEND, object will be inserted at the head of the list.

ptr :

pointer to a idmef_file_t object.

object :

pointer to a idmef_checksum_t object.

pos :

Position in the list.

idmef_file_new_checksum ()

int                 idmef_file_new_checksum             (idmef_file_t *ptr,
                                                         idmef_checksum_t **ret,
                                                         int pos);

Create a new idmef_checksum_t children of ptr, and add it to position pos of ptr list of idmef_checksum_t object. The created idmef_checksum_t object is stored in ret.

If pos is IDMEF_LIST_APPEND, object will be inserted at the tail of the list. If pos is IDMEF_LIST_PREPEND, object will be inserted at the head of the list.

ptr :

pointer to a idmef_file_t object.

ret :

pointer to an address where to store the created idmef_checksum_t object.

pos :

position in the list.

Returns :

0 on success, or a negative value if an error occured.

idmef_file_get_category ()

idmef_file_category_t  idmef_file_get_category          (idmef_file_t *ptr);

Get category children of the idmef_file_t object.

ptr :

pointer to a idmef_file_t object.

Returns :

a pointer to a idmef_file_category_t object, or NULL if the children object is not set.

idmef_file_set_category ()

void                idmef_file_set_category             (idmef_file_t *ptr,
                                                         idmef_file_category_t category);

Set category object as a children of ptr. if ptr already contain an category object, then it is destroyed, and updated to point to the provided category object.

ptr :

pointer to a idmef_file_t object.

category :

pointer to a idmef_file_category_t object.

idmef_file_new_category ()

int                 idmef_file_new_category             (idmef_file_t *ptr,
                                                         idmef_file_category_t **ret);

Create a new category object, children of idmef_file_t. If ptr already contain a idmef_file_category_t object, then it is destroyed.

ptr :

pointer to a idmef_file_t object.

ret :

pointer to an address where to store the created idmef_file_category_t object.

Returns :

0 on success, or a negative value if an error occured.

idmef_file_unset_fstype ()

void                idmef_file_unset_fstype             (idmef_file_t *ptr);

ptr :


idmef_file_get_fstype ()

idmef_file_fstype_t * idmef_file_get_fstype             (idmef_file_t *ptr);

ptr :

Returns :


idmef_file_set_fstype ()

void                idmef_file_set_fstype               (idmef_file_t *ptr,
                                                         idmef_file_fstype_t fstype);

Set fstype object as a children of ptr. if ptr already contain an fstype object, then it is destroyed, and updated to point to the provided fstype object.

ptr :

pointer to a idmef_file_t object.

fstype :

pointer to a idmef_file_fstype_t object.

idmef_file_new_fstype ()

int                 idmef_file_new_fstype               (idmef_file_t *ptr,
                                                         idmef_file_fstype_t **ret);

Create a new fstype object, children of idmef_file_t. If ptr already contain a idmef_file_fstype_t object, then it is destroyed.

ptr :

pointer to a idmef_file_t object.

ret :

pointer to an address where to store the created idmef_file_fstype_t object.

Returns :

0 on success, or a negative value if an error occured.

idmef_file_get_file_type ()

prelude_string_t *  idmef_file_get_file_type            (idmef_file_t *ptr);

ptr :

Returns :


idmef_file_set_file_type ()

void                idmef_file_set_file_type            (idmef_file_t *ptr,
                                                         prelude_string_t *file_type);

Set file_type object as a children of ptr. if ptr already contain an file_type object, then it is destroyed, and updated to point to the provided file_type object.

ptr :

pointer to a idmef_file_t object.

file_type :

pointer to a prelude_string_t object.

idmef_file_new_file_type ()

int                 idmef_file_new_file_type            (idmef_file_t *ptr,
                                                         prelude_string_t **ret);

Create a new file_type object, children of idmef_file_t. If ptr already contain a prelude_string_t object, then it is destroyed.

ptr :

pointer to a idmef_file_t object.

ret :

pointer to an address where to store the created prelude_string_t object.

Returns :

0 on success, or a negative value if an error occured.

enum idmef_linkage_category_t

typedef enum {
        IDMEF_LINKAGE_CATEGORY_ERROR = -1,
        IDMEF_LINKAGE_CATEGORY_HARD_LINK = 1,
        IDMEF_LINKAGE_CATEGORY_MOUNT_POINT = 2,
        IDMEF_LINKAGE_CATEGORY_REPARSE_POINT = 3,
        IDMEF_LINKAGE_CATEGORY_SHORTCUT = 4,
        IDMEF_LINKAGE_CATEGORY_STREAM = 5,
        IDMEF_LINKAGE_CATEGORY_SYMBOLIC_LINK = 6
} idmef_linkage_category_t;


idmef_linkage_category_to_numeric ()

idmef_linkage_category_t  idmef_linkage_category_to_numeric
                                                        (const char *name);

name :

pointer to an IDMEF string representation of a idmef_linkage_category_t value.

Returns :

the numeric equivalent of name, or -1 if name is not valid.

idmef_linkage_category_to_string ()

const char *        idmef_linkage_category_to_string    (idmef_linkage_category_t val);

Return the IDMEF string equivalent of val provided idmef_linkage_category_t value.

val :

an enumeration value for idmef_linkage_category_t.

Returns :

a pointer to the string describing val, or NULL if val is invalid.

idmef_linkage_new ()

int                 idmef_linkage_new                   (idmef_linkage_t **ret);

Create a new idmef_linkage_t object.

ret :

Pointer where to store the created idmef_linkage_t object.

Returns :

0 on success, a negative value if an error occured.

idmef_linkage_copy ()

int                 idmef_linkage_copy                  (const idmef_linkage_t *src,
                                                         idmef_linkage_t *dst);

Copy a new idmef_linkage_t object from src to dst.

src :

Source of the copy.

dst :

Where to copy the object.

Returns :

0 on success, a negative value if an error occured.

idmef_linkage_clone ()

int                 idmef_linkage_clone                 (idmef_linkage_t *src,
                                                         idmef_linkage_t **dst);

Create a copy of src, and store it in dst.

src :

Object to be cloned.

dst :

Address where to store the pointer to the cloned object.

Returns :

0 on success, a negative value if an error occured.

idmef_linkage_ref ()

idmef_linkage_t *   idmef_linkage_ref                   (idmef_linkage_t *linkage);

Increase linkage reference count, so that it can be referenced multiple time.

linkage :

pointer to a idmef_linkage_t object.

Returns :

a pointer to linkage.

idmef_linkage_destroy ()

void                idmef_linkage_destroy               (idmef_linkage_t *ptr);

Destroy ptr and all of it's children. The objects are only destroyed if their reference count reach zero.

ptr :

pointer to a idmef_linkage_t object.

idmef_linkage_get_category ()

idmef_linkage_category_t  idmef_linkage_get_category    (idmef_linkage_t *ptr);

Get category children of the idmef_linkage_t object.

ptr :

pointer to a idmef_linkage_t object.

Returns :

a pointer to a idmef_linkage_category_t object, or NULL if the children object is not set.

idmef_linkage_set_category ()

void                idmef_linkage_set_category          (idmef_linkage_t *ptr,
                                                         idmef_linkage_category_t category);

Set category object as a children of ptr. if ptr already contain an category object, then it is destroyed, and updated to point to the provided category object.

ptr :

pointer to a idmef_linkage_t object.

category :

pointer to a idmef_linkage_category_t object.

idmef_linkage_new_category ()

int                 idmef_linkage_new_category          (idmef_linkage_t *ptr,
                                                         idmef_linkage_category_t **ret);

Create a new category object, children of idmef_linkage_t. If ptr already contain a idmef_linkage_category_t object, then it is destroyed.

ptr :

pointer to a idmef_linkage_t object.

ret :

pointer to an address where to store the created idmef_linkage_category_t object.

Returns :

0 on success, or a negative value if an error occured.

idmef_linkage_get_name ()

prelude_string_t *  idmef_linkage_get_name              (idmef_linkage_t *ptr);

ptr :

Returns :


idmef_linkage_set_name ()

void                idmef_linkage_set_name              (idmef_linkage_t *ptr,
                                                         prelude_string_t *name);

Set name object as a children of ptr. if ptr already contain an name object, then it is destroyed, and updated to point to the provided name object.

ptr :

pointer to a idmef_linkage_t object.

name :

pointer to a prelude_string_t object.

idmef_linkage_new_name ()

int                 idmef_linkage_new_name              (idmef_linkage_t *ptr,
                                                         prelude_string_t **ret);

Create a new name object, children of idmef_linkage_t. If ptr already contain a prelude_string_t object, then it is destroyed.

ptr :

pointer to a idmef_linkage_t object.

ret :

pointer to an address where to store the created prelude_string_t object.

Returns :

0 on success, or a negative value if an error occured.

idmef_linkage_get_path ()

prelude_string_t *  idmef_linkage_get_path              (idmef_linkage_t *ptr);

ptr :

Returns :


idmef_linkage_set_path ()

void                idmef_linkage_set_path              (idmef_linkage_t *ptr,
                                                         prelude_string_t *path);

Set path object as a children of ptr. if ptr already contain an path object, then it is destroyed, and updated to point to the provided path object.

ptr :

pointer to a idmef_linkage_t object.

path :

pointer to a prelude_string_t object.

idmef_linkage_new_path ()

int                 idmef_linkage_new_path              (idmef_linkage_t *ptr,
                                                         prelude_string_t **ret);

Create a new path object, children of idmef_linkage_t. If ptr already contain a prelude_string_t object, then it is destroyed.

ptr :

pointer to a idmef_linkage_t object.

ret :

pointer to an address where to store the created prelude_string_t object.

Returns :

0 on success, or a negative value if an error occured.

idmef_linkage_get_file ()

idmef_file_t *      idmef_linkage_get_file              (idmef_linkage_t *ptr);

ptr :

Returns :


idmef_linkage_set_file ()

void                idmef_linkage_set_file              (idmef_linkage_t *ptr,
                                                         idmef_file_t *file);

Set file object as a children of ptr. if ptr already contain an file object, then it is destroyed, and updated to point to the provided file object.

ptr :

pointer to a idmef_linkage_t object.

file :

pointer to a idmef_file_t object.

idmef_linkage_new_file ()

int                 idmef_linkage_new_file              (idmef_linkage_t *ptr,
                                                         idmef_file_t **ret);

Create a new file object, children of idmef_linkage_t. If ptr already contain a idmef_file_t object, then it is destroyed.

ptr :

pointer to a idmef_linkage_t object.

ret :

pointer to an address where to store the created idmef_file_t object.

Returns :

0 on success, or a negative value if an error occured.

enum idmef_target_decoy_t

typedef enum {
        IDMEF_TARGET_DECOY_ERROR = -1,
        IDMEF_TARGET_DECOY_UNKNOWN = 0,
        IDMEF_TARGET_DECOY_YES = 1,
        IDMEF_TARGET_DECOY_NO = 2
} idmef_target_decoy_t;


idmef_target_decoy_to_numeric ()

idmef_target_decoy_t  idmef_target_decoy_to_numeric     (const char *name);

name :

pointer to an IDMEF string representation of a idmef_target_decoy_t value.

Returns :

the numeric equivalent of name, or -1 if name is not valid.

idmef_target_decoy_to_string ()

const char *        idmef_target_decoy_to_string        (idmef_target_decoy_t val);

Return the IDMEF string equivalent of val provided idmef_target_decoy_t value.

val :

an enumeration value for idmef_target_decoy_t.

Returns :

a pointer to the string describing val, or NULL if val is invalid.

idmef_target_t

typedef struct idmef_target idmef_target_t;


idmef_target_new ()

int                 idmef_target_new                    (idmef_target_t **ret);

Create a new idmef_target_t object.

ret :

Pointer where to store the created idmef_target_t object.

Returns :

0 on success, a negative value if an error occured.

idmef_target_copy ()

int                 idmef_target_copy                   (const idmef_target_t *src,
                                                         idmef_target_t *dst);

Copy a new idmef_target_t object from src to dst.

src :

Source of the copy.

dst :

Where to copy the object.

Returns :

0 on success, a negative value if an error occured.

idmef_target_clone ()

int                 idmef_target_clone                  (idmef_target_t *src,
                                                         idmef_target_t **dst);

Create a copy of src, and store it in dst.

src :

Object to be cloned.

dst :

Address where to store the pointer to the cloned object.

Returns :

0 on success, a negative value if an error occured.

idmef_target_ref ()

idmef_target_t *    idmef_target_ref                    (idmef_target_t *target);

Increase target reference count, so that it can be referenced multiple time.

target :

pointer to a idmef_target_t object.

Returns :

a pointer to target.

idmef_target_destroy ()

void                idmef_target_destroy                (idmef_target_t *ptr);

Destroy ptr and all of it's children. The objects are only destroyed if their reference count reach zero.

ptr :

pointer to a idmef_target_t object.

idmef_target_get_ident ()

prelude_string_t *  idmef_target_get_ident              (idmef_target_t *ptr);

ptr :

Returns :


idmef_target_set_ident ()

void                idmef_target_set_ident              (idmef_target_t *ptr,
                                                         prelude_string_t *ident);

Set ident object as a children of ptr. if ptr already contain an ident object, then it is destroyed, and updated to point to the provided ident object.

ptr :

pointer to a idmef_target_t object.

ident :

pointer to a prelude_string_t object.

idmef_target_new_ident ()

int                 idmef_target_new_ident              (idmef_target_t *ptr,
                                                         prelude_string_t **ret);

Create a new ident object, children of idmef_target_t. If ptr already contain a prelude_string_t object, then it is destroyed.

ptr :

pointer to a idmef_target_t object.

ret :

pointer to an address where to store the created prelude_string_t object.

Returns :

0 on success, or a negative value if an error occured.

idmef_target_get_decoy ()

idmef_target_decoy_t  idmef_target_get_decoy            (idmef_target_t *ptr);

Get decoy children of the idmef_target_t object.

ptr :

pointer to a idmef_target_t object.

Returns :

a pointer to a idmef_target_decoy_t object, or NULL if the children object is not set.

idmef_target_set_decoy ()

void                idmef_target_set_decoy              (idmef_target_t *ptr,
                                                         idmef_target_decoy_t decoy);

Set decoy object as a children of ptr. if ptr already contain an decoy object, then it is destroyed, and updated to point to the provided decoy object.

ptr :

pointer to a idmef_target_t object.

decoy :

pointer to a idmef_target_decoy_t object.

idmef_target_new_decoy ()

int                 idmef_target_new_decoy              (idmef_target_t *ptr,
                                                         idmef_target_decoy_t **ret);

Create a new decoy object, children of idmef_target_t. If ptr already contain a idmef_target_decoy_t object, then it is destroyed.

ptr :

pointer to a idmef_target_t object.

ret :

pointer to an address where to store the created idmef_target_decoy_t object.

Returns :

0 on success, or a negative value if an error occured.

idmef_target_get_interface ()

prelude_string_t *  idmef_target_get_interface          (idmef_target_t *ptr);

ptr :

Returns :


idmef_target_set_interface ()

void                idmef_target_set_interface          (idmef_target_t *ptr,
                                                         prelude_string_t *interface);

Set interface object as a children of ptr. if ptr already contain an interface object, then it is destroyed, and updated to point to the provided interface object.

ptr :

pointer to a idmef_target_t object.

interface :

pointer to a prelude_string_t object.

idmef_target_new_interface ()

int                 idmef_target_new_interface          (idmef_target_t *ptr,
                                                         prelude_string_t **ret);

Create a new interface object, children of idmef_target_t. If ptr already contain a prelude_string_t object, then it is destroyed.

ptr :

pointer to a idmef_target_t object.

ret :

pointer to an address where to store the created prelude_string_t object.

Returns :

0 on success, or a negative value if an error occured.

idmef_target_get_node ()

idmef_node_t *      idmef_target_get_node               (idmef_target_t *ptr);

ptr :

Returns :


idmef_target_set_node ()

void                idmef_target_set_node               (idmef_target_t *ptr,
                                                         idmef_node_t *node);

Set node object as a children of ptr. if ptr already contain an node object, then it is destroyed, and updated to point to the provided node object.

ptr :

pointer to a idmef_target_t object.

node :

pointer to a idmef_node_t object.

idmef_target_new_node ()

int                 idmef_target_new_node               (idmef_target_t *ptr,
                                                         idmef_node_t **ret);

Create a new node object, children of idmef_target_t. If ptr already contain a idmef_node_t object, then it is destroyed.

ptr :

pointer to a idmef_target_t object.

ret :

pointer to an address where to store the created idmef_node_t object.

Returns :

0 on success, or a negative value if an error occured.

idmef_target_get_user ()

idmef_user_t *      idmef_target_get_user               (idmef_target_t *ptr);

ptr :

Returns :


idmef_target_set_user ()

void                idmef_target_set_user               (idmef_target_t *ptr,
                                                         idmef_user_t *user);

Set user object as a children of ptr. if ptr already contain an user object, then it is destroyed, and updated to point to the provided user object.

ptr :

pointer to a idmef_target_t object.

user :

pointer to a idmef_user_t object.

idmef_target_new_user ()

int                 idmef_target_new_user               (idmef_target_t *ptr,
                                                         idmef_user_t **ret);

Create a new user object, children of idmef_target_t. If ptr already contain a idmef_user_t object, then it is destroyed.

ptr :

pointer to a idmef_target_t object.

ret :

pointer to an address where to store the created idmef_user_t object.

Returns :

0 on success, or a negative value if an error occured.

idmef_target_get_process ()

idmef_process_t *   idmef_target_get_process            (idmef_target_t *ptr);

ptr :

Returns :


idmef_target_set_process ()

void                idmef_target_set_process            (idmef_target_t *ptr,
                                                         idmef_process_t *process);

Set process object as a children of ptr. if ptr already contain an process object, then it is destroyed, and updated to point to the provided process object.

ptr :

pointer to a idmef_target_t object.

process :

pointer to a idmef_process_t object.

idmef_target_new_process ()

int                 idmef_target_new_process            (idmef_target_t *ptr,
                                                         idmef_process_t **ret);

Create a new process object, children of idmef_target_t. If ptr already contain a idmef_process_t object, then it is destroyed.

ptr :

pointer to a idmef_target_t object.

ret :

pointer to an address where to store the created idmef_process_t object.

Returns :

0 on success, or a negative value if an error occured.

idmef_target_get_service ()

idmef_service_t *   idmef_target_get_service            (idmef_target_t *ptr);

ptr :

Returns :


idmef_target_set_service ()

void                idmef_target_set_service            (idmef_target_t *ptr,
                                                         idmef_service_t *service);

Set service object as a children of ptr. if ptr already contain an service object, then it is destroyed, and updated to point to the provided service object.

ptr :

pointer to a idmef_target_t object.

service :

pointer to a idmef_service_t object.

idmef_target_new_service ()

int                 idmef_target_new_service            (idmef_target_t *ptr,
                                                         idmef_service_t **ret);

Create a new service object, children of idmef_target_t. If ptr already contain a idmef_service_t object, then it is destroyed.

ptr :

pointer to a idmef_target_t object.

ret :

pointer to an address where to store the created idmef_service_t object.

Returns :

0 on success, or a negative value if an error occured.

idmef_target_get_next_file ()

idmef_file_t *      idmef_target_get_next_file          (idmef_target_t *target,
                                                         idmef_file_t *file_cur);

Get the next idmef_file_t object listed in ptr. When iterating over the idmef_file_t object listed in ptr, object should be set to the latest returned idmef_file_t object.

target :

pointer to a idmef_target_t object.

file_cur :

pointer to a idmef_file_t object.

Returns :

the next idmef_file_t in the list.

idmef_target_set_file ()

void                idmef_target_set_file               (idmef_target_t *ptr,
                                                         idmef_file_t *object,
                                                         int pos);

Add object to position pos of ptr list of idmef_file_t object.

If pos is IDMEF_LIST_APPEND, object will be inserted at the tail of the list. If pos is IDMEF_LIST_PREPEND, object will be inserted at the head of the list.

ptr :

pointer to a idmef_target_t object.

object :

pointer to a idmef_file_t object.

pos :

Position in the list.

idmef_target_new_file ()

int                 idmef_target_new_file               (idmef_target_t *ptr,
                                                         idmef_file_t **ret,
                                                         int pos);

Create a new idmef_file_t children of ptr, and add it to position pos of ptr list of idmef_file_t object. The created idmef_file_t object is stored in ret.

If pos is IDMEF_LIST_APPEND, object will be inserted at the tail of the list. If pos is IDMEF_LIST_PREPEND, object will be inserted at the head of the list.

ptr :

pointer to a idmef_target_t object.

ret :

pointer to an address where to store the created idmef_file_t object.

pos :

position in the list.

Returns :

0 on success, or a negative value if an error occured.

idmef_analyzer_t

typedef struct idmef_analyzer idmef_analyzer_t;


idmef_analyzer_new ()

int                 idmef_analyzer_new                  (idmef_analyzer_t **ret);

Create a new idmef_analyzer_t object.

ret :

Pointer where to store the created idmef_analyzer_t object.

Returns :

0 on success, a negative value if an error occured.

idmef_analyzer_copy ()

int                 idmef_analyzer_copy                 (const idmef_analyzer_t *src,
                                                         idmef_analyzer_t *dst);

Copy a new idmef_analyzer_t object from src to dst.

src :

Source of the copy.

dst :

Where to copy the object.

Returns :

0 on success, a negative value if an error occured.

idmef_analyzer_clone ()

int                 idmef_analyzer_clone                (idmef_analyzer_t *src,
                                                         idmef_analyzer_t **dst);

Create a copy of src, and store it in dst.

src :

Object to be cloned.

dst :

Address where to store the pointer to the cloned object.

Returns :

0 on success, a negative value if an error occured.

idmef_analyzer_ref ()

idmef_analyzer_t *  idmef_analyzer_ref                  (idmef_analyzer_t *analyzer);

Increase analyzer reference count, so that it can be referenced multiple time.

analyzer :

pointer to a idmef_analyzer_t object.

Returns :

a pointer to analyzer.

idmef_analyzer_destroy ()

void                idmef_analyzer_destroy              (idmef_analyzer_t *ptr);

Destroy ptr and all of it's children. The objects are only destroyed if their reference count reach zero.

ptr :

pointer to a idmef_analyzer_t object.

idmef_analyzer_get_analyzerid ()

prelude_string_t *  idmef_analyzer_get_analyzerid       (idmef_analyzer_t *ptr);

ptr :

Returns :


idmef_analyzer_set_analyzerid ()

void                idmef_analyzer_set_analyzerid       (idmef_analyzer_t *ptr,
                                                         prelude_string_t *analyzerid);

Set analyzerid object as a children of ptr. if ptr already contain an analyzerid object, then it is destroyed, and updated to point to the provided analyzerid object.

ptr :

pointer to a idmef_analyzer_t object.

analyzerid :

pointer to a prelude_string_t object.

idmef_analyzer_new_analyzerid ()

int                 idmef_analyzer_new_analyzerid       (idmef_analyzer_t *ptr,
                                                         prelude_string_t **ret);

Create a new analyzerid object, children of idmef_analyzer_t. If ptr already contain a prelude_string_t object, then it is destroyed.

ptr :

pointer to a idmef_analyzer_t object.

ret :

pointer to an address where to store the created prelude_string_t object.

Returns :

0 on success, or a negative value if an error occured.

idmef_analyzer_get_name ()

prelude_string_t *  idmef_analyzer_get_name             (idmef_analyzer_t *ptr);

ptr :

Returns :


idmef_analyzer_set_name ()

void                idmef_analyzer_set_name             (idmef_analyzer_t *ptr,
                                                         prelude_string_t *name);

Set name object as a children of ptr. if ptr already contain an name object, then it is destroyed, and updated to point to the provided name object.

ptr :

pointer to a idmef_analyzer_t object.

name :

pointer to a prelude_string_t object.

idmef_analyzer_new_name ()

int                 idmef_analyzer_new_name             (idmef_analyzer_t *ptr,
                                                         prelude_string_t **ret);

Create a new name object, children of idmef_analyzer_t. If ptr already contain a prelude_string_t object, then it is destroyed.

ptr :

pointer to a idmef_analyzer_t object.

ret :

pointer to an address where to store the created prelude_string_t object.

Returns :

0 on success, or a negative value if an error occured.

idmef_analyzer_get_manufacturer ()

prelude_string_t *  idmef_analyzer_get_manufacturer     (idmef_analyzer_t *ptr);

ptr :

Returns :


idmef_analyzer_set_manufacturer ()

void                idmef_analyzer_set_manufacturer     (idmef_analyzer_t *ptr,
                                                         prelude_string_t *manufacturer);

Set manufacturer object as a children of ptr. if ptr already contain an manufacturer object, then it is destroyed, and updated to point to the provided manufacturer object.

ptr :

pointer to a idmef_analyzer_t object.

manufacturer :

pointer to a prelude_string_t object.

idmef_analyzer_new_manufacturer ()

int                 idmef_analyzer_new_manufacturer     (idmef_analyzer_t *ptr,
                                                         prelude_string_t **ret);

Create a new manufacturer object, children of idmef_analyzer_t. If ptr already contain a prelude_string_t object, then it is destroyed.

ptr :

pointer to a idmef_analyzer_t object.

ret :

pointer to an address where to store the created prelude_string_t object.

Returns :

0 on success, or a negative value if an error occured.

idmef_analyzer_get_model ()

prelude_string_t *  idmef_analyzer_get_model            (idmef_analyzer_t *ptr);

ptr :

Returns :


idmef_analyzer_set_model ()

void                idmef_analyzer_set_model            (idmef_analyzer_t *ptr,
                                                         prelude_string_t *model);

Set model object as a children of ptr. if ptr already contain an model object, then it is destroyed, and updated to point to the provided model object.

ptr :

pointer to a idmef_analyzer_t object.

model :

pointer to a prelude_string_t object.

idmef_analyzer_new_model ()

int                 idmef_analyzer_new_model            (idmef_analyzer_t *ptr,
                                                         prelude_string_t **ret);

Create a new model object, children of idmef_analyzer_t. If ptr already contain a prelude_string_t object, then it is destroyed.

ptr :

pointer to a idmef_analyzer_t object.

ret :

pointer to an address where to store the created prelude_string_t object.

Returns :

0 on success, or a negative value if an error occured.

idmef_analyzer_get_version ()

prelude_string_t *  idmef_analyzer_get_version          (idmef_analyzer_t *ptr);

ptr :

Returns :


idmef_analyzer_set_version ()

void                idmef_analyzer_set_version          (idmef_analyzer_t *ptr,
                                                         prelude_string_t *version);

Set version object as a children of ptr. if ptr already contain an version object, then it is destroyed, and updated to point to the provided version object.

ptr :

pointer to a idmef_analyzer_t object.

version :

pointer to a prelude_string_t object.

idmef_analyzer_new_version ()

int                 idmef_analyzer_new_version          (idmef_analyzer_t *ptr,
                                                         prelude_string_t **ret);

Create a new version object, children of idmef_analyzer_t. If ptr already contain a prelude_string_t object, then it is destroyed.

ptr :

pointer to a idmef_analyzer_t object.

ret :

pointer to an address where to store the created prelude_string_t object.

Returns :

0 on success, or a negative value if an error occured.

idmef_analyzer_get_class ()

prelude_string_t *  idmef_analyzer_get_class            (idmef_analyzer_t *ptr);

ptr :

Returns :


idmef_analyzer_set_class ()

void                idmef_analyzer_set_class            (idmef_analyzer_t *ptr,
                                                         prelude_string_t *class_str);

Set class_str object as a children of ptr. if ptr already contain an class_str object, then it is destroyed, and updated to point to the provided class_str object.

ptr :

pointer to a idmef_analyzer_t object.

class_str :

pointer to a prelude_string_t object.

idmef_analyzer_new_class ()

int                 idmef_analyzer_new_class            (idmef_analyzer_t *ptr,
                                                         prelude_string_t **ret);

Create a new class object, children of idmef_analyzer_t. If ptr already contain a prelude_string_t object, then it is destroyed.

ptr :

pointer to a idmef_analyzer_t object.

ret :

pointer to an address where to store the created prelude_string_t object.

Returns :

0 on success, or a negative value if an error occured.

idmef_analyzer_get_ostype ()

prelude_string_t *  idmef_analyzer_get_ostype           (idmef_analyzer_t *ptr);

ptr :

Returns :


idmef_analyzer_set_ostype ()

void                idmef_analyzer_set_ostype           (idmef_analyzer_t *ptr,
                                                         prelude_string_t *ostype);

Set ostype object as a children of ptr. if ptr already contain an ostype object, then it is destroyed, and updated to point to the provided ostype object.

ptr :

pointer to a idmef_analyzer_t object.

ostype :

pointer to a prelude_string_t object.

idmef_analyzer_new_ostype ()

int                 idmef_analyzer_new_ostype           (idmef_analyzer_t *ptr,
                                                         prelude_string_t **ret);

Create a new ostype object, children of idmef_analyzer_t. If ptr already contain a prelude_string_t object, then it is destroyed.

ptr :

pointer to a idmef_analyzer_t object.

ret :

pointer to an address where to store the created prelude_string_t object.

Returns :

0 on success, or a negative value if an error occured.

idmef_analyzer_get_osversion ()

prelude_string_t *  idmef_analyzer_get_osversion        (idmef_analyzer_t *ptr);

ptr :

Returns :


idmef_analyzer_set_osversion ()

void                idmef_analyzer_set_osversion        (idmef_analyzer_t *ptr,
                                                         prelude_string_t *osversion);

Set osversion object as a children of ptr. if ptr already contain an osversion object, then it is destroyed, and updated to point to the provided osversion object.

ptr :

pointer to a idmef_analyzer_t object.

osversion :

pointer to a prelude_string_t object.

idmef_analyzer_new_osversion ()

int                 idmef_analyzer_new_osversion        (idmef_analyzer_t *ptr,
                                                         prelude_string_t **ret);

Create a new osversion object, children of idmef_analyzer_t. If ptr already contain a prelude_string_t object, then it is destroyed.

ptr :

pointer to a idmef_analyzer_t object.

ret :

pointer to an address where to store the created prelude_string_t object.

Returns :

0 on success, or a negative value if an error occured.

idmef_analyzer_get_node ()

idmef_node_t *      idmef_analyzer_get_node             (idmef_analyzer_t *ptr);

ptr :

Returns :


idmef_analyzer_set_node ()

void                idmef_analyzer_set_node             (idmef_analyzer_t *ptr,
                                                         idmef_node_t *node);

Set node object as a children of ptr. if ptr already contain an node object, then it is destroyed, and updated to point to the provided node object.

ptr :

pointer to a idmef_analyzer_t object.

node :

pointer to a idmef_node_t object.

idmef_analyzer_new_node ()

int                 idmef_analyzer_new_node             (idmef_analyzer_t *ptr,
                                                         idmef_node_t **ret);

Create a new node object, children of idmef_analyzer_t. If ptr already contain a idmef_node_t object, then it is destroyed.

ptr :

pointer to a idmef_analyzer_t object.

ret :

pointer to an address where to store the created idmef_node_t object.

Returns :

0 on success, or a negative value if an error occured.

idmef_analyzer_get_process ()

idmef_process_t *   idmef_analyzer_get_process          (idmef_analyzer_t *ptr);

ptr :

Returns :


idmef_analyzer_set_process ()

void                idmef_analyzer_set_process          (idmef_analyzer_t *ptr,
                                                         idmef_process_t *process);

Set process object as a children of ptr. if ptr already contain an process object, then it is destroyed, and updated to point to the provided process object.

ptr :

pointer to a idmef_analyzer_t object.

process :

pointer to a idmef_process_t object.

idmef_analyzer_new_process ()

int                 idmef_analyzer_new_process          (idmef_analyzer_t *ptr,
                                                         idmef_process_t **ret);

Create a new process object, children of idmef_analyzer_t. If ptr already contain a idmef_process_t object, then it is destroyed.

ptr :

pointer to a idmef_analyzer_t object.

ret :

pointer to an address where to store the created idmef_process_t object.

Returns :

0 on success, or a negative value if an error occured.

idmef_alertident_t

typedef struct idmef_alertident idmef_alertident_t;


idmef_alertident_new ()

int                 idmef_alertident_new                (idmef_alertident_t **ret);

Create a new idmef_alertident_t object.

ret :

Pointer where to store the created idmef_alertident_t object.

Returns :

0 on success, a negative value if an error occured.

idmef_alertident_copy ()

int                 idmef_alertident_copy               (const idmef_alertident_t *src,
                                                         idmef_alertident_t *dst);

Copy a new idmef_alertident_t object from src to dst.

src :

Source of the copy.

dst :

Where to copy the object.

Returns :

0 on success, a negative value if an error occured.

idmef_alertident_clone ()

int                 idmef_alertident_clone              (idmef_alertident_t *src,
                                                         idmef_alertident_t **dst);

Create a copy of src, and store it in dst.

src :

Object to be cloned.

dst :

Address where to store the pointer to the cloned object.

Returns :

0 on success, a negative value if an error occured.

idmef_alertident_ref ()

idmef_alertident_t * idmef_alertident_ref               (idmef_alertident_t *alertident);

Increase alertident reference count, so that it can be referenced multiple time.

alertident :

pointer to a idmef_alertident_t object.

Returns :

a pointer to alertident.

idmef_alertident_destroy ()

void                idmef_alertident_destroy            (idmef_alertident_t *ptr);

Destroy ptr and all of it's children. The objects are only destroyed if their reference count reach zero.

ptr :

pointer to a idmef_alertident_t object.

idmef_alertident_get_alertident ()

prelude_string_t *  idmef_alertident_get_alertident     (idmef_alertident_t *ptr);

ptr :

Returns :


idmef_alertident_set_alertident ()

void                idmef_alertident_set_alertident     (idmef_alertident_t *ptr,
                                                         prelude_string_t *alertident);

Set alertident object as a children of ptr. if ptr already contain an alertident object, then it is destroyed, and updated to point to the provided alertident object.

ptr :

pointer to a idmef_alertident_t object.

alertident :

pointer to a prelude_string_t object.

idmef_alertident_new_alertident ()

int                 idmef_alertident_new_alertident     (idmef_alertident_t *ptr,
                                                         prelude_string_t **ret);

Create a new alertident object, children of idmef_alertident_t. If ptr already contain a prelude_string_t object, then it is destroyed.

ptr :

pointer to a idmef_alertident_t object.

ret :

pointer to an address where to store the created prelude_string_t object.

Returns :

0 on success, or a negative value if an error occured.

idmef_alertident_get_analyzerid ()

prelude_string_t *  idmef_alertident_get_analyzerid     (idmef_alertident_t *ptr);

ptr :

Returns :


idmef_alertident_set_analyzerid ()

void                idmef_alertident_set_analyzerid     (idmef_alertident_t *ptr,
                                                         prelude_string_t *analyzerid);

Set analyzerid object as a children of ptr. if ptr already contain an analyzerid object, then it is destroyed, and updated to point to the provided analyzerid object.

ptr :

pointer to a idmef_alertident_t object.

analyzerid :

pointer to a prelude_string_t object.

idmef_alertident_new_analyzerid ()

int                 idmef_alertident_new_analyzerid     (idmef_alertident_t *ptr,
                                                         prelude_string_t **ret);

Create a new analyzerid object, children of idmef_alertident_t. If ptr already contain a prelude_string_t object, then it is destroyed.

ptr :

pointer to a idmef_alertident_t object.

ret :

pointer to an address where to store the created prelude_string_t object.

Returns :

0 on success, or a negative value if an error occured.

enum idmef_impact_severity_t

typedef enum {
        IDMEF_IMPACT_SEVERITY_ERROR = -1,
        IDMEF_IMPACT_SEVERITY_INFO = 1,
        IDMEF_IMPACT_SEVERITY_LOW = 2,
        IDMEF_IMPACT_SEVERITY_MEDIUM = 3,
        IDMEF_IMPACT_SEVERITY_HIGH = 4
} idmef_impact_severity_t;


idmef_impact_severity_to_numeric ()

idmef_impact_severity_t  idmef_impact_severity_to_numeric
                                                        (const char *name);

name :

pointer to an IDMEF string representation of a idmef_impact_severity_t value.

Returns :

the numeric equivalent of name, or -1 if name is not valid.

idmef_impact_severity_to_string ()

const char *        idmef_impact_severity_to_string     (idmef_impact_severity_t val);

Return the IDMEF string equivalent of val provided idmef_impact_severity_t value.

val :

an enumeration value for idmef_impact_severity_t.

Returns :

a pointer to the string describing val, or NULL if val is invalid.

enum idmef_impact_completion_t

typedef enum {
        IDMEF_IMPACT_COMPLETION_ERROR = -1,
        IDMEF_IMPACT_COMPLETION_FAILED = 1,
        IDMEF_IMPACT_COMPLETION_SUCCEEDED = 2
} idmef_impact_completion_t;


idmef_impact_completion_to_numeric ()

idmef_impact_completion_t  idmef_impact_completion_to_numeric
                                                        (const char *name);

name :

pointer to an IDMEF string representation of a idmef_impact_completion_t value.

Returns :

the numeric equivalent of name, or -1 if name is not valid.

idmef_impact_completion_to_string ()

const char *        idmef_impact_completion_to_string   (idmef_impact_completion_t val);

Return the IDMEF string equivalent of val provided idmef_impact_completion_t value.

val :

an enumeration value for idmef_impact_completion_t.

Returns :

a pointer to the string describing val, or NULL if val is invalid.

enum idmef_impact_type_t

typedef enum {
        IDMEF_IMPACT_TYPE_ERROR = -1,
        IDMEF_IMPACT_TYPE_OTHER = 0,
        IDMEF_IMPACT_TYPE_ADMIN = 1,
        IDMEF_IMPACT_TYPE_DOS = 2,
        IDMEF_IMPACT_TYPE_FILE = 3,
        IDMEF_IMPACT_TYPE_RECON = 4,
        IDMEF_IMPACT_TYPE_USER = 5
} idmef_impact_type_t;


idmef_impact_type_to_numeric ()

idmef_impact_type_t  idmef_impact_type_to_numeric       (const char *name);

name :

pointer to an IDMEF string representation of a idmef_impact_type_t value.

Returns :

the numeric equivalent of name, or -1 if name is not valid.

idmef_impact_type_to_string ()

const char *        idmef_impact_type_to_string         (idmef_impact_type_t val);

Return the IDMEF string equivalent of val provided idmef_impact_type_t value.

val :

an enumeration value for idmef_impact_type_t.

Returns :

a pointer to the string describing val, or NULL if val is invalid.

idmef_impact_t

typedef struct idmef_impact idmef_impact_t;


idmef_impact_new ()

int                 idmef_impact_new                    (idmef_impact_t **ret);

Create a new idmef_impact_t object.

ret :

Pointer where to store the created idmef_impact_t object.

Returns :

0 on success, a negative value if an error occured.

idmef_impact_copy ()

int                 idmef_impact_copy                   (const idmef_impact_t *src,
                                                         idmef_impact_t *dst);

Copy a new idmef_impact_t object from src to dst.

src :

Source of the copy.

dst :

Where to copy the object.

Returns :

0 on success, a negative value if an error occured.

idmef_impact_clone ()

int                 idmef_impact_clone                  (idmef_impact_t *src,
                                                         idmef_impact_t **dst);

Create a copy of src, and store it in dst.

src :

Object to be cloned.

dst :

Address where to store the pointer to the cloned object.

Returns :

0 on success, a negative value if an error occured.

idmef_impact_ref ()

idmef_impact_t *    idmef_impact_ref                    (idmef_impact_t *impact);

Increase impact reference count, so that it can be referenced multiple time.

impact :

pointer to a idmef_impact_t object.

Returns :

a pointer to impact.

idmef_impact_destroy ()

void                idmef_impact_destroy                (idmef_impact_t *ptr);

Destroy ptr and all of it's children. The objects are only destroyed if their reference count reach zero.

ptr :

pointer to a idmef_impact_t object.

idmef_impact_unset_severity ()

void                idmef_impact_unset_severity         (idmef_impact_t *ptr);

ptr :


idmef_impact_get_severity ()

idmef_impact_severity_t * idmef_impact_get_severity     (idmef_impact_t *ptr);

ptr :

Returns :


idmef_impact_set_severity ()

void                idmef_impact_set_severity           (idmef_impact_t *ptr,
                                                         idmef_impact_severity_t severity);

Set severity object as a children of ptr. if ptr already contain an severity object, then it is destroyed, and updated to point to the provided severity object.

ptr :

pointer to a idmef_impact_t object.

severity :

pointer to a idmef_impact_severity_t object.

idmef_impact_new_severity ()

int                 idmef_impact_new_severity           (idmef_impact_t *ptr,
                                                         idmef_impact_severity_t **ret);

Create a new severity object, children of idmef_impact_t. If ptr already contain a idmef_impact_severity_t object, then it is destroyed.

ptr :

pointer to a idmef_impact_t object.

ret :

pointer to an address where to store the created idmef_impact_severity_t object.

Returns :

0 on success, or a negative value if an error occured.

idmef_impact_unset_completion ()

void                idmef_impact_unset_completion       (idmef_impact_t *ptr);

ptr :


idmef_impact_get_completion ()

idmef_impact_completion_t * idmef_impact_get_completion (idmef_impact_t *ptr);

ptr :

Returns :


idmef_impact_set_completion ()

void                idmef_impact_set_completion         (idmef_impact_t *ptr,
                                                         idmef_impact_completion_t completion);

Set completion object as a children of ptr. if ptr already contain an completion object, then it is destroyed, and updated to point to the provided completion object.

ptr :

pointer to a idmef_impact_t object.

completion :

pointer to a idmef_impact_completion_t object.

idmef_impact_new_completion ()

int                 idmef_impact_new_completion         (idmef_impact_t *ptr,
                                                         idmef_impact_completion_t **ret);

Create a new completion object, children of idmef_impact_t. If ptr already contain a idmef_impact_completion_t object, then it is destroyed.

ptr :

pointer to a idmef_impact_t object.

ret :

pointer to an address where to store the created idmef_impact_completion_t object.

Returns :

0 on success, or a negative value if an error occured.

idmef_impact_get_type ()

idmef_impact_type_t  idmef_impact_get_type              (idmef_impact_t *ptr);

Get type children of the idmef_impact_t object.

ptr :

pointer to a idmef_impact_t object.

Returns :

a pointer to a idmef_impact_type_t object, or NULL if the children object is not set.

idmef_impact_set_type ()

void                idmef_impact_set_type               (idmef_impact_t *ptr,
                                                         idmef_impact_type_t type);

Set type object as a children of ptr. if ptr already contain an type object, then it is destroyed, and updated to point to the provided type object.

ptr :

pointer to a idmef_impact_t object.

type :

pointer to a idmef_impact_type_t object.

idmef_impact_new_type ()

int                 idmef_impact_new_type               (idmef_impact_t *ptr,
                                                         idmef_impact_type_t **ret);

Create a new type object, children of idmef_impact_t. If ptr already contain a idmef_impact_type_t object, then it is destroyed.

ptr :

pointer to a idmef_impact_t object.

ret :

pointer to an address where to store the created idmef_impact_type_t object.

Returns :

0 on success, or a negative value if an error occured.

idmef_impact_get_description ()

prelude_string_t *  idmef_impact_get_description        (idmef_impact_t *ptr);

ptr :

Returns :


idmef_impact_set_description ()

void                idmef_impact_set_description        (idmef_impact_t *ptr,
                                                         prelude_string_t *description);

Set description object as a children of ptr. if ptr already contain an description object, then it is destroyed, and updated to point to the provided description object.

ptr :

pointer to a idmef_impact_t object.

description :

pointer to a prelude_string_t object.

idmef_impact_new_description ()

int                 idmef_impact_new_description        (idmef_impact_t *ptr,
                                                         prelude_string_t **ret);

Create a new description object, children of idmef_impact_t. If ptr already contain a prelude_string_t object, then it is destroyed.

ptr :

pointer to a idmef_impact_t object.

ret :

pointer to an address where to store the created prelude_string_t object.

Returns :

0 on success, or a negative value if an error occured.

enum idmef_action_category_t

typedef enum {
        IDMEF_ACTION_CATEGORY_ERROR = -1,
        IDMEF_ACTION_CATEGORY_OTHER = 0,
        IDMEF_ACTION_CATEGORY_BLOCK_INSTALLED = 1,
        IDMEF_ACTION_CATEGORY_NOTIFICATION_SENT = 2,
        IDMEF_ACTION_CATEGORY_TAKEN_OFFLINE = 3
} idmef_action_category_t;


idmef_action_category_to_numeric ()

idmef_action_category_t  idmef_action_category_to_numeric
                                                        (const char *name);

name :

pointer to an IDMEF string representation of a idmef_action_category_t value.

Returns :

the numeric equivalent of name, or -1 if name is not valid.

idmef_action_category_to_string ()

const char *        idmef_action_category_to_string     (idmef_action_category_t val);

Return the IDMEF string equivalent of val provided idmef_action_category_t value.

val :

an enumeration value for idmef_action_category_t.

Returns :

a pointer to the string describing val, or NULL if val is invalid.

idmef_action_t

typedef struct idmef_action idmef_action_t;


idmef_action_new ()

int                 idmef_action_new                    (idmef_action_t **ret);

Create a new idmef_action_t object.

ret :

Pointer where to store the created idmef_action_t object.

Returns :

0 on success, a negative value if an error occured.

idmef_action_copy ()

int                 idmef_action_copy                   (const idmef_action_t *src,
                                                         idmef_action_t *dst);

Copy a new idmef_action_t object from src to dst.

src :

Source of the copy.

dst :

Where to copy the object.

Returns :

0 on success, a negative value if an error occured.

idmef_action_clone ()

int                 idmef_action_clone                  (idmef_action_t *src,
                                                         idmef_action_t **dst);

Create a copy of src, and store it in dst.

src :

Object to be cloned.

dst :

Address where to store the pointer to the cloned object.

Returns :

0 on success, a negative value if an error occured.

idmef_action_ref ()

idmef_action_t *    idmef_action_ref                    (idmef_action_t *action);

Increase action reference count, so that it can be referenced multiple time.

action :

pointer to a idmef_action_t object.

Returns :

a pointer to action.

idmef_action_destroy ()

void                idmef_action_destroy                (idmef_action_t *ptr);

Destroy ptr and all of it's children. The objects are only destroyed if their reference count reach zero.

ptr :

pointer to a idmef_action_t object.

idmef_action_get_category ()

idmef_action_category_t  idmef_action_get_category      (idmef_action_t *ptr);

Get category children of the idmef_action_t object.

ptr :

pointer to a idmef_action_t object.

Returns :

a pointer to a idmef_action_category_t object, or NULL if the children object is not set.

idmef_action_set_category ()

void                idmef_action_set_category           (idmef_action_t *ptr,
                                                         idmef_action_category_t category);

Set category object as a children of ptr. if ptr already contain an category object, then it is destroyed, and updated to point to the provided category object.

ptr :

pointer to a idmef_action_t object.

category :

pointer to a idmef_action_category_t object.

idmef_action_new_category ()

int                 idmef_action_new_category           (idmef_action_t *ptr,
                                                         idmef_action_category_t **ret);

Create a new category object, children of idmef_action_t. If ptr already contain a idmef_action_category_t object, then it is destroyed.

ptr :

pointer to a idmef_action_t object.

ret :

pointer to an address where to store the created idmef_action_category_t object.

Returns :

0 on success, or a negative value if an error occured.

idmef_action_get_description ()

prelude_string_t *  idmef_action_get_description        (idmef_action_t *ptr);

ptr :

Returns :


idmef_action_set_description ()

void                idmef_action_set_description        (idmef_action_t *ptr,
                                                         prelude_string_t *description);

Set description object as a children of ptr. if ptr already contain an description object, then it is destroyed, and updated to point to the provided description object.

ptr :

pointer to a idmef_action_t object.

description :

pointer to a prelude_string_t object.

idmef_action_new_description ()

int                 idmef_action_new_description        (idmef_action_t *ptr,
                                                         prelude_string_t **ret);

Create a new description object, children of idmef_action_t. If ptr already contain a prelude_string_t object, then it is destroyed.

ptr :

pointer to a idmef_action_t object.

ret :

pointer to an address where to store the created prelude_string_t object.

Returns :

0 on success, or a negative value if an error occured.

enum idmef_confidence_rating_t

typedef enum {
        IDMEF_CONFIDENCE_RATING_ERROR = -1,
        IDMEF_CONFIDENCE_RATING_NUMERIC = 0,
        IDMEF_CONFIDENCE_RATING_LOW = 1,
        IDMEF_CONFIDENCE_RATING_MEDIUM = 2,
        IDMEF_CONFIDENCE_RATING_HIGH = 3
} idmef_confidence_rating_t;


idmef_confidence_rating_to_numeric ()

idmef_confidence_rating_t  idmef_confidence_rating_to_numeric
                                                        (const char *name);

name :

pointer to an IDMEF string representation of a idmef_confidence_rating_t value.

Returns :

the numeric equivalent of name, or -1 if name is not valid.

idmef_confidence_rating_to_string ()

const char *        idmef_confidence_rating_to_string   (idmef_confidence_rating_t val);

Return the IDMEF string equivalent of val provided idmef_confidence_rating_t value.

val :

an enumeration value for idmef_confidence_rating_t.

Returns :

a pointer to the string describing val, or NULL if val is invalid.

idmef_confidence_t

typedef struct idmef_confidence idmef_confidence_t;


idmef_confidence_new ()

int                 idmef_confidence_new                (idmef_confidence_t **ret);

Create a new idmef_confidence_t object.

ret :

Pointer where to store the created idmef_confidence_t object.

Returns :

0 on success, a negative value if an error occured.

idmef_confidence_copy ()

int                 idmef_confidence_copy               (const idmef_confidence_t *src,
                                                         idmef_confidence_t *dst);

Copy a new idmef_confidence_t object from src to dst.

src :

Source of the copy.

dst :

Where to copy the object.

Returns :

0 on success, a negative value if an error occured.

idmef_confidence_clone ()

int                 idmef_confidence_clone              (idmef_confidence_t *src,
                                                         idmef_confidence_t **dst);

Create a copy of src, and store it in dst.

src :

Object to be cloned.

dst :

Address where to store the pointer to the cloned object.

Returns :

0 on success, a negative value if an error occured.

idmef_confidence_ref ()

idmef_confidence_t * idmef_confidence_ref               (idmef_confidence_t *confidence);

Increase confidence reference count, so that it can be referenced multiple time.

confidence :

pointer to a idmef_confidence_t object.

Returns :

a pointer to confidence.

idmef_confidence_destroy ()

void                idmef_confidence_destroy            (idmef_confidence_t *ptr);

Destroy ptr and all of it's children. The objects are only destroyed if their reference count reach zero.

ptr :

pointer to a idmef_confidence_t object.

idmef_confidence_get_rating ()

idmef_confidence_rating_t  idmef_confidence_get_rating  (idmef_confidence_t *ptr);

Get rating children of the idmef_confidence_t object.

ptr :

pointer to a idmef_confidence_t object.

Returns :

a pointer to a idmef_confidence_rating_t object, or NULL if the children object is not set.

idmef_confidence_set_rating ()

void                idmef_confidence_set_rating         (idmef_confidence_t *ptr,
                                                         idmef_confidence_rating_t rating);

Set rating object as a children of ptr. if ptr already contain an rating object, then it is destroyed, and updated to point to the provided rating object.

ptr :

pointer to a idmef_confidence_t object.

rating :

pointer to a idmef_confidence_rating_t object.

idmef_confidence_new_rating ()

int                 idmef_confidence_new_rating         (idmef_confidence_t *ptr,
                                                         idmef_confidence_rating_t **ret);

Create a new rating object, children of idmef_confidence_t. If ptr already contain a idmef_confidence_rating_t object, then it is destroyed.

ptr :

pointer to a idmef_confidence_t object.

ret :

pointer to an address where to store the created idmef_confidence_rating_t object.

Returns :

0 on success, or a negative value if an error occured.

idmef_confidence_get_confidence ()

float               idmef_confidence_get_confidence     (idmef_confidence_t *ptr);

Get confidence children of the idmef_confidence_t object.

ptr :

pointer to a idmef_confidence_t object.

Returns :

a pointer to a float object, or NULL if the children object is not set.

idmef_confidence_set_confidence ()

void                idmef_confidence_set_confidence     (idmef_confidence_t *ptr,
                                                         float confidence);

Set confidence object as a children of ptr. if ptr already contain an confidence object, then it is destroyed, and updated to point to the provided confidence object.

ptr :

pointer to a idmef_confidence_t object.

confidence :

pointer to a float object.

idmef_confidence_new_confidence ()

int                 idmef_confidence_new_confidence     (idmef_confidence_t *ptr,
                                                         float **ret);

Create a new confidence object, children of idmef_confidence_t. If ptr already contain a float object, then it is destroyed.

ptr :

pointer to a idmef_confidence_t object.

ret :

pointer to an address where to store the created float object.

Returns :

0 on success, or a negative value if an error occured.

idmef_assessment_t

typedef struct idmef_assessment idmef_assessment_t;


idmef_assessment_new ()

int                 idmef_assessment_new                (idmef_assessment_t **ret);

Create a new idmef_assessment_t object.

ret :

Pointer where to store the created idmef_assessment_t object.

Returns :

0 on success, a negative value if an error occured.

idmef_assessment_copy ()

int                 idmef_assessment_copy               (const idmef_assessment_t *src,
                                                         idmef_assessment_t *dst);

Copy a new idmef_assessment_t object from src to dst.

src :

Source of the copy.

dst :

Where to copy the object.

Returns :

0 on success, a negative value if an error occured.

idmef_assessment_clone ()

int                 idmef_assessment_clone              (idmef_assessment_t *src,
                                                         idmef_assessment_t **dst);

Create a copy of src, and store it in dst.

src :

Object to be cloned.

dst :

Address where to store the pointer to the cloned object.

Returns :

0 on success, a negative value if an error occured.

idmef_assessment_ref ()

idmef_assessment_t * idmef_assessment_ref               (idmef_assessment_t *assessment);

Increase assessment reference count, so that it can be referenced multiple time.

assessment :

pointer to a idmef_assessment_t object.

Returns :

a pointer to assessment.

idmef_assessment_destroy ()

void                idmef_assessment_destroy            (idmef_assessment_t *ptr);

Destroy ptr and all of it's children. The objects are only destroyed if their reference count reach zero.

ptr :

pointer to a idmef_assessment_t object.

idmef_assessment_get_impact ()

idmef_impact_t *    idmef_assessment_get_impact         (idmef_assessment_t *ptr);

ptr :

Returns :


idmef_assessment_set_impact ()

void                idmef_assessment_set_impact         (idmef_assessment_t *ptr,
                                                         idmef_impact_t *impact);

Set impact object as a children of ptr. if ptr already contain an impact object, then it is destroyed, and updated to point to the provided impact object.

ptr :

pointer to a idmef_assessment_t object.

impact :

pointer to a idmef_impact_t object.

idmef_assessment_new_impact ()

int                 idmef_assessment_new_impact         (idmef_assessment_t *ptr,
                                                         idmef_impact_t **ret);

Create a new impact object, children of idmef_assessment_t. If ptr already contain a idmef_impact_t object, then it is destroyed.

ptr :

pointer to a idmef_assessment_t object.

ret :

pointer to an address where to store the created idmef_impact_t object.

Returns :

0 on success, or a negative value if an error occured.

idmef_assessment_get_next_action ()

idmef_action_t *    idmef_assessment_get_next_action    (idmef_assessment_t *assessment,
                                                         idmef_action_t *action_cur);

Get the next idmef_action_t object listed in ptr. When iterating over the idmef_action_t object listed in ptr, object should be set to the latest returned idmef_action_t object.

assessment :

pointer to a idmef_assessment_t object.

action_cur :

pointer to a idmef_action_t object.

Returns :

the next idmef_action_t in the list.

idmef_assessment_set_action ()

void                idmef_assessment_set_action         (idmef_assessment_t *ptr,
                                                         idmef_action_t *object,
                                                         int pos);

Add object to position pos of ptr list of idmef_action_t object.

If pos is IDMEF_LIST_APPEND, object will be inserted at the tail of the list. If pos is IDMEF_LIST_PREPEND, object will be inserted at the head of the list.

ptr :

pointer to a idmef_assessment_t object.

object :

pointer to a idmef_action_t object.

pos :

Position in the list.

idmef_assessment_new_action ()

int                 idmef_assessment_new_action         (idmef_assessment_t *ptr,
                                                         idmef_action_t **ret,
                                                         int pos);

Create a new idmef_action_t children of ptr, and add it to position pos of ptr list of idmef_action_t object. The created idmef_action_t object is stored in ret.

If pos is IDMEF_LIST_APPEND, object will be inserted at the tail of the list. If pos is IDMEF_LIST_PREPEND, object will be inserted at the head of the list.

ptr :

pointer to a idmef_assessment_t object.

ret :

pointer to an address where to store the created idmef_action_t object.

pos :

position in the list.

Returns :

0 on success, or a negative value if an error occured.

idmef_assessment_get_confidence ()

idmef_confidence_t * idmef_assessment_get_confidence    (idmef_assessment_t *ptr);

ptr :

Returns :


idmef_assessment_set_confidence ()

void                idmef_assessment_set_confidence     (idmef_assessment_t *ptr,
                                                         idmef_confidence_t *confidence);

Set confidence object as a children of ptr. if ptr already contain an confidence object, then it is destroyed, and updated to point to the provided confidence object.

ptr :

pointer to a idmef_assessment_t object.

confidence :

pointer to a idmef_confidence_t object.

idmef_assessment_new_confidence ()

int                 idmef_assessment_new_confidence     (idmef_assessment_t *ptr,
                                                         idmef_confidence_t **ret);

Create a new confidence object, children of idmef_assessment_t. If ptr already contain a idmef_confidence_t object, then it is destroyed.

ptr :

pointer to a idmef_assessment_t object.

ret :

pointer to an address where to store the created idmef_confidence_t object.

Returns :

0 on success, or a negative value if an error occured.

idmef_tool_alert_t

typedef struct idmef_tool_alert idmef_tool_alert_t;


idmef_tool_alert_new ()

int                 idmef_tool_alert_new                (idmef_tool_alert_t **ret);

Create a new idmef_tool_alert_t object.

ret :

Pointer where to store the created idmef_tool_alert_t object.

Returns :

0 on success, a negative value if an error occured.

idmef_tool_alert_copy ()

int                 idmef_tool_alert_copy               (const idmef_tool_alert_t *src,
                                                         idmef_tool_alert_t *dst);

Copy a new idmef_tool_alert_t object from src to dst.

src :

Source of the copy.

dst :

Where to copy the object.

Returns :

0 on success, a negative value if an error occured.

idmef_tool_alert_clone ()

int                 idmef_tool_alert_clone              (idmef_tool_alert_t *src,
                                                         idmef_tool_alert_t **dst);

Create a copy of src, and store it in dst.

src :

Object to be cloned.

dst :

Address where to store the pointer to the cloned object.

Returns :

0 on success, a negative value if an error occured.

idmef_tool_alert_ref ()

idmef_tool_alert_t * idmef_tool_alert_ref               (idmef_tool_alert_t *tool_alert);

Increase tool_alert reference count, so that it can be referenced multiple time.

tool_alert :

pointer to a idmef_tool_alert_t object.

Returns :

a pointer to tool_alert.

idmef_tool_alert_destroy ()

void                idmef_tool_alert_destroy            (idmef_tool_alert_t *ptr);

Destroy ptr and all of it's children. The objects are only destroyed if their reference count reach zero.

ptr :

pointer to a idmef_tool_alert_t object.

idmef_tool_alert_get_name ()

prelude_string_t *  idmef_tool_alert_get_name           (idmef_tool_alert_t *ptr);

ptr :

Returns :


idmef_tool_alert_set_name ()

void                idmef_tool_alert_set_name           (idmef_tool_alert_t *ptr,
                                                         prelude_string_t *name);

Set name object as a children of ptr. if ptr already contain an name object, then it is destroyed, and updated to point to the provided name object.

ptr :

pointer to a idmef_tool_alert_t object.

name :

pointer to a prelude_string_t object.

idmef_tool_alert_new_name ()

int                 idmef_tool_alert_new_name           (idmef_tool_alert_t *ptr,
                                                         prelude_string_t **ret);

Create a new name object, children of idmef_tool_alert_t. If ptr already contain a prelude_string_t object, then it is destroyed.

ptr :

pointer to a idmef_tool_alert_t object.

ret :

pointer to an address where to store the created prelude_string_t object.

Returns :

0 on success, or a negative value if an error occured.

idmef_tool_alert_get_command ()

prelude_string_t *  idmef_tool_alert_get_command        (idmef_tool_alert_t *ptr);

ptr :

Returns :


idmef_tool_alert_set_command ()

void                idmef_tool_alert_set_command        (idmef_tool_alert_t *ptr,
                                                         prelude_string_t *command);

Set command object as a children of ptr. if ptr already contain an command object, then it is destroyed, and updated to point to the provided command object.

ptr :

pointer to a idmef_tool_alert_t object.

command :

pointer to a prelude_string_t object.

idmef_tool_alert_new_command ()

int                 idmef_tool_alert_new_command        (idmef_tool_alert_t *ptr,
                                                         prelude_string_t **ret);

Create a new command object, children of idmef_tool_alert_t. If ptr already contain a prelude_string_t object, then it is destroyed.

ptr :

pointer to a idmef_tool_alert_t object.

ret :

pointer to an address where to store the created prelude_string_t object.

Returns :

0 on success, or a negative value if an error occured.

idmef_tool_alert_get_next_alertident ()

idmef_alertident_t * idmef_tool_alert_get_next_alertident
                                                        (idmef_tool_alert_t *tool_alert,
                                                         idmef_alertident_t *alertident_cur);

Get the next idmef_alertident_t object listed in ptr. When iterating over the idmef_alertident_t object listed in ptr, object should be set to the latest returned idmef_alertident_t object.

tool_alert :

pointer to a idmef_tool_alert_t object.

alertident_cur :

pointer to a idmef_alertident_t object.

Returns :

the next idmef_alertident_t in the list.

idmef_tool_alert_set_alertident ()

void                idmef_tool_alert_set_alertident     (idmef_tool_alert_t *ptr,
                                                         idmef_alertident_t *object,
                                                         int pos);

Add object to position pos of ptr list of idmef_alertident_t object.

If pos is IDMEF_LIST_APPEND, object will be inserted at the tail of the list. If pos is IDMEF_LIST_PREPEND, object will be inserted at the head of the list.

ptr :

pointer to a idmef_tool_alert_t object.

object :

pointer to a idmef_alertident_t object.

pos :

Position in the list.

idmef_tool_alert_new_alertident ()

int                 idmef_tool_alert_new_alertident     (idmef_tool_alert_t *ptr,
                                                         idmef_alertident_t **ret,
                                                         int pos);

Create a new idmef_alertident_t children of ptr, and add it to position pos of ptr list of idmef_alertident_t object. The created idmef_alertident_t object is stored in ret.

If pos is IDMEF_LIST_APPEND, object will be inserted at the tail of the list. If pos is IDMEF_LIST_PREPEND, object will be inserted at the head of the list.

ptr :

pointer to a idmef_tool_alert_t object.

ret :

pointer to an address where to store the created idmef_alertident_t object.

pos :

position in the list.

Returns :

0 on success, or a negative value if an error occured.

idmef_correlation_alert_t

typedef struct idmef_correlation_alert idmef_correlation_alert_t;


idmef_correlation_alert_new ()

int                 idmef_correlation_alert_new         (idmef_correlation_alert_t **ret);

Create a new idmef_correlation_alert_t object.

ret :

Pointer where to store the created idmef_correlation_alert_t object.

Returns :

0 on success, a negative value if an error occured.

idmef_correlation_alert_copy ()

int                 idmef_correlation_alert_copy        (const idmef_correlation_alert_t *src,
                                                         idmef_correlation_alert_t *dst);

Copy a new idmef_correlation_alert_t object from src to dst.

src :

Source of the copy.

dst :

Where to copy the object.

Returns :

0 on success, a negative value if an error occured.

idmef_correlation_alert_clone ()

int                 idmef_correlation_alert_clone       (idmef_correlation_alert_t *src,
                                                         idmef_correlation_alert_t **dst);

Create a copy of src, and store it in dst.

src :

Object to be cloned.

dst :

Address where to store the pointer to the cloned object.

Returns :

0 on success, a negative value if an error occured.

idmef_correlation_alert_ref ()

idmef_correlation_alert_t * idmef_correlation_alert_ref (idmef_correlation_alert_t *correlation_alert);

Increase correlation_alert reference count, so that it can be referenced multiple time.

correlation_alert :

pointer to a idmef_correlation_alert_t object.

Returns :

a pointer to correlation_alert.

idmef_correlation_alert_destroy ()

void                idmef_correlation_alert_destroy     (idmef_correlation_alert_t *ptr);

Destroy ptr and all of it's children. The objects are only destroyed if their reference count reach zero.

ptr :

pointer to a idmef_correlation_alert_t object.

idmef_correlation_alert_get_name ()

prelude_string_t *  idmef_correlation_alert_get_name    (idmef_correlation_alert_t *ptr);

ptr :

Returns :


idmef_correlation_alert_set_name ()

void                idmef_correlation_alert_set_name    (idmef_correlation_alert_t *ptr,
                                                         prelude_string_t *name);

Set name object as a children of ptr. if ptr already contain an name object, then it is destroyed, and updated to point to the provided name object.

ptr :

pointer to a idmef_correlation_alert_t object.

name :

pointer to a prelude_string_t object.

idmef_correlation_alert_new_name ()

int                 idmef_correlation_alert_new_name    (idmef_correlation_alert_t *ptr,
                                                         prelude_string_t **ret);

Create a new name object, children of idmef_correlation_alert_t. If ptr already contain a prelude_string_t object, then it is destroyed.

ptr :

pointer to a idmef_correlation_alert_t object.

ret :

pointer to an address where to store the created prelude_string_t object.

Returns :

0 on success, or a negative value if an error occured.

idmef_correlation_alert_get_next_alertident ()

idmef_alertident_t * idmef_correlation_alert_get_next_alertident
                                                        (idmef_correlation_alert_t *correlation_alert,
                                                         idmef_alertident_t *alertident_cur);

Get the next idmef_alertident_t object listed in ptr. When iterating over the idmef_alertident_t object listed in ptr, object should be set to the latest returned idmef_alertident_t object.

correlation_alert :

pointer to a idmef_correlation_alert_t object.

alertident_cur :

pointer to a idmef_alertident_t object.

Returns :

the next idmef_alertident_t in the list.

idmef_correlation_alert_set_alertident ()

void                idmef_correlation_alert_set_alertident
                                                        (idmef_correlation_alert_t *ptr,
                                                         idmef_alertident_t *object,
                                                         int pos);

Add object to position pos of ptr list of idmef_alertident_t object.

If pos is IDMEF_LIST_APPEND, object will be inserted at the tail of the list. If pos is IDMEF_LIST_PREPEND, object will be inserted at the head of the list.

ptr :

pointer to a idmef_correlation_alert_t object.

object :

pointer to a idmef_alertident_t object.

pos :

Position in the list.

idmef_correlation_alert_new_alertident ()

int                 idmef_correlation_alert_new_alertident
                                                        (idmef_correlation_alert_t *ptr,
                                                         idmef_alertident_t **ret,
                                                         int pos);

Create a new idmef_alertident_t children of ptr, and add it to position pos of ptr list of idmef_alertident_t object. The created idmef_alertident_t object is stored in ret.

If pos is IDMEF_LIST_APPEND, object will be inserted at the tail of the list. If pos is IDMEF_LIST_PREPEND, object will be inserted at the head of the list.

ptr :

pointer to a idmef_correlation_alert_t object.

ret :

pointer to an address where to store the created idmef_alertident_t object.

pos :

position in the list.

Returns :

0 on success, or a negative value if an error occured.

idmef_overflow_alert_t

typedef struct idmef_overflow_alert idmef_overflow_alert_t;


idmef_overflow_alert_new ()

int                 idmef_overflow_alert_new            (idmef_overflow_alert_t **ret);

Create a new idmef_overflow_alert_t object.

ret :

Pointer where to store the created idmef_overflow_alert_t object.

Returns :

0 on success, a negative value if an error occured.

idmef_overflow_alert_copy ()

int                 idmef_overflow_alert_copy           (const idmef_overflow_alert_t *src,
                                                         idmef_overflow_alert_t *dst);

Copy a new idmef_overflow_alert_t object from src to dst.

src :

Source of the copy.

dst :

Where to copy the object.

Returns :

0 on success, a negative value if an error occured.

idmef_overflow_alert_clone ()

int                 idmef_overflow_alert_clone          (idmef_overflow_alert_t *src,
                                                         idmef_overflow_alert_t **dst);

Create a copy of src, and store it in dst.

src :

Object to be cloned.

dst :

Address where to store the pointer to the cloned object.

Returns :

0 on success, a negative value if an error occured.

idmef_overflow_alert_ref ()

idmef_overflow_alert_t * idmef_overflow_alert_ref       (idmef_overflow_alert_t *overflow_alert);

Increase overflow_alert reference count, so that it can be referenced multiple time.

overflow_alert :

pointer to a idmef_overflow_alert_t object.

Returns :

a pointer to overflow_alert.

idmef_overflow_alert_destroy ()

void                idmef_overflow_alert_destroy        (idmef_overflow_alert_t *ptr);

Destroy ptr and all of it's children. The objects are only destroyed if their reference count reach zero.

ptr :

pointer to a idmef_overflow_alert_t object.

idmef_overflow_alert_get_program ()

prelude_string_t *  idmef_overflow_alert_get_program    (idmef_overflow_alert_t *ptr);

ptr :

Returns :


idmef_overflow_alert_set_program ()

void                idmef_overflow_alert_set_program    (idmef_overflow_alert_t *ptr,
                                                         prelude_string_t *program);

Set program object as a children of ptr. if ptr already contain an program object, then it is destroyed, and updated to point to the provided program object.

ptr :

pointer to a idmef_overflow_alert_t object.

program :

pointer to a prelude_string_t object.

idmef_overflow_alert_new_program ()

int                 idmef_overflow_alert_new_program    (idmef_overflow_alert_t *ptr,
                                                         prelude_string_t **ret);

Create a new program object, children of idmef_overflow_alert_t. If ptr already contain a prelude_string_t object, then it is destroyed.

ptr :

pointer to a idmef_overflow_alert_t object.

ret :

pointer to an address where to store the created prelude_string_t object.

Returns :

0 on success, or a negative value if an error occured.

idmef_overflow_alert_unset_size ()

void                idmef_overflow_alert_unset_size     (idmef_overflow_alert_t *ptr);

ptr :


idmef_overflow_alert_get_size ()

uint32_t *          idmef_overflow_alert_get_size       (idmef_overflow_alert_t *ptr);

ptr :

Returns :


idmef_overflow_alert_set_size ()

void                idmef_overflow_alert_set_size       (idmef_overflow_alert_t *ptr,
                                                         uint32_t size);

Set size object as a children of ptr. if ptr already contain an size object, then it is destroyed, and updated to point to the provided size object.

ptr :

pointer to a idmef_overflow_alert_t object.

size :

pointer to a uint32_t object.

idmef_overflow_alert_new_size ()

int                 idmef_overflow_alert_new_size       (idmef_overflow_alert_t *ptr,
                                                         uint32_t **ret);

Create a new size object, children of idmef_overflow_alert_t. If ptr already contain a uint32_t object, then it is destroyed.

ptr :

pointer to a idmef_overflow_alert_t object.

ret :

pointer to an address where to store the created uint32_t object.

Returns :

0 on success, or a negative value if an error occured.

idmef_overflow_alert_get_buffer ()

idmef_data_t *      idmef_overflow_alert_get_buffer     (idmef_overflow_alert_t *ptr);

ptr :

Returns :


idmef_overflow_alert_set_buffer ()

void                idmef_overflow_alert_set_buffer     (idmef_overflow_alert_t *ptr,
                                                         idmef_data_t *buffer);

Set buffer object as a children of ptr. if ptr already contain an buffer object, then it is destroyed, and updated to point to the provided buffer object.

ptr :

pointer to a idmef_overflow_alert_t object.

buffer :

pointer to a idmef_data_t object.

idmef_overflow_alert_new_buffer ()

int                 idmef_overflow_alert_new_buffer     (idmef_overflow_alert_t *ptr,
                                                         idmef_data_t **ret);

Create a new buffer object, children of idmef_overflow_alert_t. If ptr already contain a idmef_data_t object, then it is destroyed.

ptr :

pointer to a idmef_overflow_alert_t object.

ret :

pointer to an address where to store the created idmef_data_t object.

Returns :

0 on success, or a negative value if an error occured.

enum idmef_alert_type_t

typedef enum {
        IDMEF_ALERT_TYPE_ERROR = -1,
        IDMEF_ALERT_TYPE_DEFAULT = 0,
        IDMEF_ALERT_TYPE_TOOL = 1,
        IDMEF_ALERT_TYPE_CORRELATION = 2,
        IDMEF_ALERT_TYPE_OVERFLOW = 3
} idmef_alert_type_t;


idmef_alert_type_to_numeric ()

idmef_alert_type_t  idmef_alert_type_to_numeric         (const char *name);

name :

pointer to an IDMEF string representation of a idmef_alert_type_t value.

Returns :

the numeric equivalent of name, or -1 if name is not valid.

idmef_alert_type_to_string ()

const char *        idmef_alert_type_to_string          (idmef_alert_type_t val);

Return the IDMEF string equivalent of val provided idmef_alert_type_t value.

val :

an enumeration value for idmef_alert_type_t.

Returns :

a pointer to the string describing val, or NULL if val is invalid.

idmef_alert_t

typedef struct idmef_alert idmef_alert_t;


idmef_alert_new ()

int                 idmef_alert_new                     (idmef_alert_t **ret);

Create a new idmef_alert_t object.

ret :

Pointer where to store the created idmef_alert_t object.

Returns :

0 on success, a negative value if an error occured.

idmef_alert_copy ()

int                 idmef_alert_copy                    (const idmef_alert_t *src,
                                                         idmef_alert_t *dst);

Copy a new idmef_alert_t object from src to dst.

src :

Source of the copy.

dst :

Where to copy the object.

Returns :

0 on success, a negative value if an error occured.

idmef_alert_clone ()

int                 idmef_alert_clone                   (idmef_alert_t *src,
                                                         idmef_alert_t **dst);

Create a copy of src, and store it in dst.

src :

Object to be cloned.

dst :

Address where to store the pointer to the cloned object.

Returns :

0 on success, a negative value if an error occured.

idmef_alert_ref ()

idmef_alert_t *     idmef_alert_ref                     (idmef_alert_t *alert);

Increase alert reference count, so that it can be referenced multiple time.

alert :

pointer to a idmef_alert_t object.

Returns :

a pointer to alert.

idmef_alert_destroy ()

void                idmef_alert_destroy                 (idmef_alert_t *ptr);

Destroy ptr and all of it's children. The objects are only destroyed if their reference count reach zero.

ptr :

pointer to a idmef_alert_t object.

idmef_alert_get_messageid ()

prelude_string_t *  idmef_alert_get_messageid           (idmef_alert_t *ptr);

ptr :

Returns :


idmef_alert_set_messageid ()

void                idmef_alert_set_messageid           (idmef_alert_t *ptr,
                                                         prelude_string_t *messageid);

Set messageid object as a children of ptr. if ptr already contain an messageid object, then it is destroyed, and updated to point to the provided messageid object.

ptr :

pointer to a idmef_alert_t object.

messageid :

pointer to a prelude_string_t object.

idmef_alert_new_messageid ()

int                 idmef_alert_new_messageid           (idmef_alert_t *ptr,
                                                         prelude_string_t **ret);

Create a new messageid object, children of idmef_alert_t. If ptr already contain a prelude_string_t object, then it is destroyed.

ptr :

pointer to a idmef_alert_t object.

ret :

pointer to an address where to store the created prelude_string_t object.

Returns :

0 on success, or a negative value if an error occured.

idmef_alert_get_next_analyzer ()

idmef_analyzer_t *  idmef_alert_get_next_analyzer       (idmef_alert_t *alert,
                                                         idmef_analyzer_t *analyzer_cur);

Get the next idmef_analyzer_t object listed in ptr. When iterating over the idmef_analyzer_t object listed in ptr, object should be set to the latest returned idmef_analyzer_t object.

alert :

pointer to a idmef_alert_t object.

analyzer_cur :

pointer to a idmef_analyzer_t object.

Returns :

the next idmef_analyzer_t in the list.

idmef_alert_set_analyzer ()

void                idmef_alert_set_analyzer            (idmef_alert_t *ptr,
                                                         idmef_analyzer_t *object,
                                                         int pos);

Add object to position pos of ptr list of idmef_analyzer_t object.

If pos is IDMEF_LIST_APPEND, object will be inserted at the tail of the list. If pos is IDMEF_LIST_PREPEND, object will be inserted at the head of the list.

ptr :

pointer to a idmef_alert_t object.

object :

pointer to a idmef_analyzer_t object.

pos :

Position in the list.

idmef_alert_new_analyzer ()

int                 idmef_alert_new_analyzer            (idmef_alert_t *ptr,
                                                         idmef_analyzer_t **ret,
                                                         int pos);

Create a new idmef_analyzer_t children of ptr, and add it to position pos of ptr list of idmef_analyzer_t object. The created idmef_analyzer_t object is stored in ret.

If pos is IDMEF_LIST_APPEND, object will be inserted at the tail of the list. If pos is IDMEF_LIST_PREPEND, object will be inserted at the head of the list.

ptr :

pointer to a idmef_alert_t object.

ret :

pointer to an address where to store the created idmef_analyzer_t object.

pos :

position in the list.

Returns :

0 on success, or a negative value if an error occured.

idmef_alert_get_create_time ()

idmef_time_t *      idmef_alert_get_create_time         (idmef_alert_t *ptr);

ptr :

Returns :


idmef_alert_set_create_time ()

void                idmef_alert_set_create_time         (idmef_alert_t *ptr,
                                                         idmef_time_t *create_time);

Set create_time object as a children of ptr. if ptr already contain an create_time object, then it is destroyed, and updated to point to the provided create_time object.

ptr :

pointer to a idmef_alert_t object.

create_time :

pointer to a idmef_time_t object.

idmef_alert_new_create_time ()

int                 idmef_alert_new_create_time         (idmef_alert_t *ptr,
                                                         idmef_time_t **ret);

Create a new create_time object, children of idmef_alert_t. If ptr already contain a idmef_time_t object, then it is destroyed.

ptr :

pointer to a idmef_alert_t object.

ret :

pointer to an address where to store the created idmef_time_t object.

Returns :

0 on success, or a negative value if an error occured.

idmef_alert_get_classification ()

idmef_classification_t * idmef_alert_get_classification (idmef_alert_t *ptr);

ptr :

Returns :


idmef_alert_set_classification ()

void                idmef_alert_set_classification      (idmef_alert_t *ptr,
                                                         idmef_classification_t *classification);

Set classification object as a children of ptr. if ptr already contain an classification object, then it is destroyed, and updated to point to the provided classification object.

ptr :

pointer to a idmef_alert_t object.

classification :

pointer to a idmef_classification_t object.

idmef_alert_new_classification ()

int                 idmef_alert_new_classification      (idmef_alert_t *ptr,
                                                         idmef_classification_t **ret);

Create a new classification object, children of idmef_alert_t. If ptr already contain a idmef_classification_t object, then it is destroyed.

ptr :

pointer to a idmef_alert_t object.

ret :

pointer to an address where to store the created idmef_classification_t object.

Returns :

0 on success, or a negative value if an error occured.

idmef_alert_get_detect_time ()

idmef_time_t *      idmef_alert_get_detect_time         (idmef_alert_t *ptr);

ptr :

Returns :


idmef_alert_set_detect_time ()

void                idmef_alert_set_detect_time         (idmef_alert_t *ptr,
                                                         idmef_time_t *detect_time);

Set detect_time object as a children of ptr. if ptr already contain an detect_time object, then it is destroyed, and updated to point to the provided detect_time object.

ptr :

pointer to a idmef_alert_t object.

detect_time :

pointer to a idmef_time_t object.

idmef_alert_new_detect_time ()

int                 idmef_alert_new_detect_time         (idmef_alert_t *ptr,
                                                         idmef_time_t **ret);

Create a new detect_time object, children of idmef_alert_t. If ptr already contain a idmef_time_t object, then it is destroyed.

ptr :

pointer to a idmef_alert_t object.

ret :

pointer to an address where to store the created idmef_time_t object.

Returns :

0 on success, or a negative value if an error occured.

idmef_alert_get_analyzer_time ()

idmef_time_t *      idmef_alert_get_analyzer_time       (idmef_alert_t *ptr);

ptr :

Returns :


idmef_alert_set_analyzer_time ()

void                idmef_alert_set_analyzer_time       (idmef_alert_t *ptr,
                                                         idmef_time_t *analyzer_time);

Set analyzer_time object as a children of ptr. if ptr already contain an analyzer_time object, then it is destroyed, and updated to point to the provided analyzer_time object.

ptr :

pointer to a idmef_alert_t object.

analyzer_time :

pointer to a idmef_time_t object.

idmef_alert_new_analyzer_time ()

int                 idmef_alert_new_analyzer_time       (idmef_alert_t *ptr,
                                                         idmef_time_t **ret);

Create a new analyzer_time object, children of idmef_alert_t. If ptr already contain a idmef_time_t object, then it is destroyed.

ptr :

pointer to a idmef_alert_t object.

ret :

pointer to an address where to store the created idmef_time_t object.

Returns :

0 on success, or a negative value if an error occured.

idmef_alert_get_next_source ()

idmef_source_t *    idmef_alert_get_next_source         (idmef_alert_t *alert,
                                                         idmef_source_t *source_cur);

Get the next idmef_source_t object listed in ptr. When iterating over the idmef_source_t object listed in ptr, object should be set to the latest returned idmef_source_t object.

alert :

pointer to a idmef_alert_t object.

source_cur :

pointer to a idmef_source_t object.

Returns :

the next idmef_source_t in the list.

idmef_alert_set_source ()

void                idmef_alert_set_source              (idmef_alert_t *ptr,
                                                         idmef_source_t *object,
                                                         int pos);

Add object to position pos of ptr list of idmef_source_t object.

If pos is IDMEF_LIST_APPEND, object will be inserted at the tail of the list. If pos is IDMEF_LIST_PREPEND, object will be inserted at the head of the list.

ptr :

pointer to a idmef_alert_t object.

object :

pointer to a idmef_source_t object.

pos :

Position in the list.

idmef_alert_new_source ()

int                 idmef_alert_new_source              (idmef_alert_t *ptr,
                                                         idmef_source_t **ret,
                                                         int pos);

Create a new idmef_source_t children of ptr, and add it to position pos of ptr list of idmef_source_t object. The created idmef_source_t object is stored in ret.

If pos is IDMEF_LIST_APPEND, object will be inserted at the tail of the list. If pos is IDMEF_LIST_PREPEND, object will be inserted at the head of the list.

ptr :

pointer to a idmef_alert_t object.

ret :

pointer to an address where to store the created idmef_source_t object.

pos :

position in the list.

Returns :

0 on success, or a negative value if an error occured.

idmef_alert_get_next_target ()

idmef_target_t *    idmef_alert_get_next_target         (idmef_alert_t *alert,
                                                         idmef_target_t *target_cur);

Get the next idmef_target_t object listed in ptr. When iterating over the idmef_target_t object listed in ptr, object should be set to the latest returned idmef_target_t object.

alert :

pointer to a idmef_alert_t object.

target_cur :

pointer to a idmef_target_t object.

Returns :

the next idmef_target_t in the list.

idmef_alert_set_target ()

void                idmef_alert_set_target              (idmef_alert_t *ptr,
                                                         idmef_target_t *object,
                                                         int pos);

Add object to position pos of ptr list of idmef_target_t object.

If pos is IDMEF_LIST_APPEND, object will be inserted at the tail of the list. If pos is IDMEF_LIST_PREPEND, object will be inserted at the head of the list.

ptr :

pointer to a idmef_alert_t object.

object :

pointer to a idmef_target_t object.

pos :

Position in the list.

idmef_alert_new_target ()

int                 idmef_alert_new_target              (idmef_alert_t *ptr,
                                                         idmef_target_t **ret,
                                                         int pos);

Create a new idmef_target_t children of ptr, and add it to position pos of ptr list of idmef_target_t object. The created idmef_target_t object is stored in ret.

If pos is IDMEF_LIST_APPEND, object will be inserted at the tail of the list. If pos is IDMEF_LIST_PREPEND, object will be inserted at the head of the list.

ptr :

pointer to a idmef_alert_t object.

ret :

pointer to an address where to store the created idmef_target_t object.

pos :

position in the list.

Returns :

0 on success, or a negative value if an error occured.

idmef_alert_get_assessment ()

idmef_assessment_t * idmef_alert_get_assessment         (idmef_alert_t *ptr);

ptr :

Returns :


idmef_alert_set_assessment ()

void                idmef_alert_set_assessment          (idmef_alert_t *ptr,
                                                         idmef_assessment_t *assessment);

Set assessment object as a children of ptr. if ptr already contain an assessment object, then it is destroyed, and updated to point to the provided assessment object.

ptr :

pointer to a idmef_alert_t object.

assessment :

pointer to a idmef_assessment_t object.

idmef_alert_new_assessment ()

int                 idmef_alert_new_assessment          (idmef_alert_t *ptr,
                                                         idmef_assessment_t **ret);

Create a new assessment object, children of idmef_alert_t. If ptr already contain a idmef_assessment_t object, then it is destroyed.

ptr :

pointer to a idmef_alert_t object.

ret :

pointer to an address where to store the created idmef_assessment_t object.

Returns :

0 on success, or a negative value if an error occured.

idmef_alert_get_next_additional_data ()

idmef_additional_data_t * idmef_alert_get_next_additional_data
                                                        (idmef_alert_t *alert,
                                                         idmef_additional_data_t *additional_data_cur);

Get the next idmef_additional_data_t object listed in ptr. When iterating over the idmef_additional_data_t object listed in ptr, object should be set to the latest returned idmef_additional_data_t object.

alert :

pointer to a idmef_alert_t object.

additional_data_cur :

pointer to a idmef_additional_data_t object.

Returns :

the next idmef_additional_data_t in the list.

idmef_alert_set_additional_data ()

void                idmef_alert_set_additional_data     (idmef_alert_t *ptr,
                                                         idmef_additional_data_t *object,
                                                         int pos);

Add object to position pos of ptr list of idmef_additional_data_t object.

If pos is IDMEF_LIST_APPEND, object will be inserted at the tail of the list. If pos is IDMEF_LIST_PREPEND, object will be inserted at the head of the list.

ptr :

pointer to a idmef_alert_t object.

object :

pointer to a idmef_additional_data_t object.

pos :

Position in the list.

idmef_alert_new_additional_data ()

int                 idmef_alert_new_additional_data     (idmef_alert_t *ptr,
                                                         idmef_additional_data_t **ret,
                                                         int pos);

Create a new idmef_additional_data_t children of ptr, and add it to position pos of ptr list of idmef_additional_data_t object. The created idmef_additional_data_t object is stored in ret.

If pos is IDMEF_LIST_APPEND, object will be inserted at the tail of the list. If pos is IDMEF_LIST_PREPEND, object will be inserted at the head of the list.

ptr :

pointer to a idmef_alert_t object.

ret :

pointer to an address where to store the created idmef_additional_data_t object.

pos :

position in the list.

Returns :

0 on success, or a negative value if an error occured.

idmef_alert_get_type ()

idmef_alert_type_t  idmef_alert_get_type                (idmef_alert_t *ptr);

Access the type children of ptr.

ptr :

pointer to a idmef_alert_t object.

Returns :

a pointer to the idmef_alert_type_t children, or NULL if it is not set.

idmef_alert_get_tool_alert ()

idmef_tool_alert_t * idmef_alert_get_tool_alert         (idmef_alert_t *ptr);

Access the tool_alert children of ptr.

ptr :

pointer to a idmef_alert_t object.

Returns :

a pointer to the idmef_tool_alert_t children, or NULL if it is not set.

idmef_alert_set_tool_alert ()

void                idmef_alert_set_tool_alert          (idmef_alert_t *ptr,
                                                         idmef_tool_alert_t *tool_alert);

Set tool_alert object as a children of ptr. if ptr already contain a tool_alert object, then it is destroyed, and updated to point to the provided tool_alert object.

ptr :

pointer to a idmef_alert_t object.

tool_alert :

pointer to a idmef_tool_alert_t object.

idmef_alert_new_tool_alert ()

int                 idmef_alert_new_tool_alert          (idmef_alert_t *ptr,
                                                         idmef_tool_alert_t **ret);

Create a new idmef_tool_alert_t object, children of idmef_alert_t. If ptr already contain a idmef_tool_alert_t object, then it is destroyed.

ptr :

pointer to a idmef_alert_t object.

ret :

pointer where to store the created idmef_tool_alert_t object.

Returns :

0 on success, or a negative value if an error occured.

idmef_alert_get_correlation_alert ()

idmef_correlation_alert_t * idmef_alert_get_correlation_alert
                                                        (idmef_alert_t *ptr);

Access the correlation_alert children of ptr.

ptr :

pointer to a idmef_alert_t object.

Returns :

a pointer to the idmef_correlation_alert_t children, or NULL if it is not set.

idmef_alert_set_correlation_alert ()

void                idmef_alert_set_correlation_alert   (idmef_alert_t *ptr,
                                                         idmef_correlation_alert_t *correlation_alert);

Set correlation_alert object as a children of ptr. if ptr already contain a correlation_alert object, then it is destroyed, and updated to point to the provided correlation_alert object.

ptr :

pointer to a idmef_alert_t object.

correlation_alert :

pointer to a idmef_correlation_alert_t object.

idmef_alert_new_correlation_alert ()

int                 idmef_alert_new_correlation_alert   (idmef_alert_t *ptr,
                                                         idmef_correlation_alert_t **ret);

Create a new idmef_correlation_alert_t object, children of idmef_alert_t. If ptr already contain a idmef_correlation_alert_t object, then it is destroyed.

ptr :

pointer to a idmef_alert_t object.

ret :

pointer where to store the created idmef_correlation_alert_t object.

Returns :

0 on success, or a negative value if an error occured.

idmef_alert_get_overflow_alert ()

idmef_overflow_alert_t * idmef_alert_get_overflow_alert (idmef_alert_t *ptr);

Access the overflow_alert children of ptr.

ptr :

pointer to a idmef_alert_t object.

Returns :

a pointer to the idmef_overflow_alert_t children, or NULL if it is not set.

idmef_alert_set_overflow_alert ()

void                idmef_alert_set_overflow_alert      (idmef_alert_t *ptr,
                                                         idmef_overflow_alert_t *overflow_alert);

Set overflow_alert object as a children of ptr. if ptr already contain a overflow_alert object, then it is destroyed, and updated to point to the provided overflow_alert object.

ptr :

pointer to a idmef_alert_t object.

overflow_alert :

pointer to a idmef_overflow_alert_t object.

idmef_alert_new_overflow_alert ()

int                 idmef_alert_new_overflow_alert      (idmef_alert_t *ptr,
                                                         idmef_overflow_alert_t **ret);

Create a new idmef_overflow_alert_t object, children of idmef_alert_t. If ptr already contain a idmef_overflow_alert_t object, then it is destroyed.

ptr :

pointer to a idmef_alert_t object.

ret :

pointer where to store the created idmef_overflow_alert_t object.

Returns :

0 on success, or a negative value if an error occured.

idmef_heartbeat_t

typedef struct idmef_heartbeat idmef_heartbeat_t;


idmef_heartbeat_new ()

int                 idmef_heartbeat_new                 (idmef_heartbeat_t **ret);

Create a new idmef_heartbeat_t object.

ret :

Pointer where to store the created idmef_heartbeat_t object.

Returns :

0 on success, a negative value if an error occured.

idmef_heartbeat_copy ()

int                 idmef_heartbeat_copy                (const idmef_heartbeat_t *src,
                                                         idmef_heartbeat_t *dst);

Copy a new idmef_heartbeat_t object from src to dst.

src :

Source of the copy.

dst :

Where to copy the object.

Returns :

0 on success, a negative value if an error occured.

idmef_heartbeat_clone ()

int                 idmef_heartbeat_clone               (idmef_heartbeat_t *src,
                                                         idmef_heartbeat_t **dst);

Create a copy of src, and store it in dst.

src :

Object to be cloned.

dst :

Address where to store the pointer to the cloned object.

Returns :

0 on success, a negative value if an error occured.

idmef_heartbeat_ref ()

idmef_heartbeat_t * idmef_heartbeat_ref                 (idmef_heartbeat_t *heartbeat);

Increase heartbeat reference count, so that it can be referenced multiple time.

heartbeat :

pointer to a idmef_heartbeat_t object.

Returns :

a pointer to heartbeat.

idmef_heartbeat_destroy ()

void                idmef_heartbeat_destroy             (idmef_heartbeat_t *ptr);

Destroy ptr and all of it's children. The objects are only destroyed if their reference count reach zero.

ptr :

pointer to a idmef_heartbeat_t object.

idmef_heartbeat_get_messageid ()

prelude_string_t *  idmef_heartbeat_get_messageid       (idmef_heartbeat_t *ptr);

ptr :

Returns :


idmef_heartbeat_set_messageid ()

void                idmef_heartbeat_set_messageid       (idmef_heartbeat_t *ptr,
                                                         prelude_string_t *messageid);

Set messageid object as a children of ptr. if ptr already contain an messageid object, then it is destroyed, and updated to point to the provided messageid object.

ptr :

pointer to a idmef_heartbeat_t object.

messageid :

pointer to a prelude_string_t object.

idmef_heartbeat_new_messageid ()

int                 idmef_heartbeat_new_messageid       (idmef_heartbeat_t *ptr,
                                                         prelude_string_t **ret);

Create a new messageid object, children of idmef_heartbeat_t. If ptr already contain a prelude_string_t object, then it is destroyed.

ptr :

pointer to a idmef_heartbeat_t object.

ret :

pointer to an address where to store the created prelude_string_t object.

Returns :

0 on success, or a negative value if an error occured.

idmef_heartbeat_get_next_analyzer ()

idmef_analyzer_t *  idmef_heartbeat_get_next_analyzer   (idmef_heartbeat_t *heartbeat,
                                                         idmef_analyzer_t *analyzer_cur);

Get the next idmef_analyzer_t object listed in ptr. When iterating over the idmef_analyzer_t object listed in ptr, object should be set to the latest returned idmef_analyzer_t object.

heartbeat :

pointer to a idmef_heartbeat_t object.

analyzer_cur :

pointer to a idmef_analyzer_t object.

Returns :

the next idmef_analyzer_t in the list.

idmef_heartbeat_set_analyzer ()

void                idmef_heartbeat_set_analyzer        (idmef_heartbeat_t *ptr,
                                                         idmef_analyzer_t *object,
                                                         int pos);

Add object to position pos of ptr list of idmef_analyzer_t object.

If pos is IDMEF_LIST_APPEND, object will be inserted at the tail of the list. If pos is IDMEF_LIST_PREPEND, object will be inserted at the head of the list.

ptr :

pointer to a idmef_heartbeat_t object.

object :

pointer to a idmef_analyzer_t object.

pos :

Position in the list.

idmef_heartbeat_new_analyzer ()

int                 idmef_heartbeat_new_analyzer        (idmef_heartbeat_t *ptr,
                                                         idmef_analyzer_t **ret,
                                                         int pos);

Create a new idmef_analyzer_t children of ptr, and add it to position pos of ptr list of idmef_analyzer_t object. The created idmef_analyzer_t object is stored in ret.

If pos is IDMEF_LIST_APPEND, object will be inserted at the tail of the list. If pos is IDMEF_LIST_PREPEND, object will be inserted at the head of the list.

ptr :

pointer to a idmef_heartbeat_t object.

ret :

pointer to an address where to store the created idmef_analyzer_t object.

pos :

position in the list.

Returns :

0 on success, or a negative value if an error occured.

idmef_heartbeat_get_create_time ()

idmef_time_t *      idmef_heartbeat_get_create_time     (idmef_heartbeat_t *ptr);

ptr :

Returns :


idmef_heartbeat_set_create_time ()

void                idmef_heartbeat_set_create_time     (idmef_heartbeat_t *ptr,
                                                         idmef_time_t *create_time);

Set create_time object as a children of ptr. if ptr already contain an create_time object, then it is destroyed, and updated to point to the provided create_time object.

ptr :

pointer to a idmef_heartbeat_t object.

create_time :

pointer to a idmef_time_t object.

idmef_heartbeat_new_create_time ()

int                 idmef_heartbeat_new_create_time     (idmef_heartbeat_t *ptr,
                                                         idmef_time_t **ret);

Create a new create_time object, children of idmef_heartbeat_t. If ptr already contain a idmef_time_t object, then it is destroyed.

ptr :

pointer to a idmef_heartbeat_t object.

ret :

pointer to an address where to store the created idmef_time_t object.

Returns :

0 on success, or a negative value if an error occured.

idmef_heartbeat_get_analyzer_time ()

idmef_time_t *      idmef_heartbeat_get_analyzer_time   (idmef_heartbeat_t *ptr);

ptr :

Returns :


idmef_heartbeat_set_analyzer_time ()

void                idmef_heartbeat_set_analyzer_time   (idmef_heartbeat_t *ptr,
                                                         idmef_time_t *analyzer_time);

Set analyzer_time object as a children of ptr. if ptr already contain an analyzer_time object, then it is destroyed, and updated to point to the provided analyzer_time object.

ptr :

pointer to a idmef_heartbeat_t object.

analyzer_time :

pointer to a idmef_time_t object.

idmef_heartbeat_new_analyzer_time ()

int                 idmef_heartbeat_new_analyzer_time   (idmef_heartbeat_t *ptr,
                                                         idmef_time_t **ret);

Create a new analyzer_time object, children of idmef_heartbeat_t. If ptr already contain a idmef_time_t object, then it is destroyed.

ptr :

pointer to a idmef_heartbeat_t object.

ret :

pointer to an address where to store the created idmef_time_t object.

Returns :

0 on success, or a negative value if an error occured.

idmef_heartbeat_unset_heartbeat_interval ()

void                idmef_heartbeat_unset_heartbeat_interval
                                                        (idmef_heartbeat_t *ptr);

ptr :


idmef_heartbeat_get_heartbeat_interval ()

uint32_t *          idmef_heartbeat_get_heartbeat_interval
                                                        (idmef_heartbeat_t *ptr);

ptr :

Returns :


idmef_heartbeat_set_heartbeat_interval ()

void                idmef_heartbeat_set_heartbeat_interval
                                                        (idmef_heartbeat_t *ptr,
                                                         uint32_t heartbeat_interval);

Set heartbeat_interval object as a children of ptr. if ptr already contain an heartbeat_interval object, then it is destroyed, and updated to point to the provided heartbeat_interval object.

ptr :

pointer to a idmef_heartbeat_t object.

heartbeat_interval :

pointer to a uint32_t object.

idmef_heartbeat_new_heartbeat_interval ()

int                 idmef_heartbeat_new_heartbeat_interval
                                                        (idmef_heartbeat_t *ptr,
                                                         uint32_t **ret);

Create a new heartbeat_interval object, children of idmef_heartbeat_t. If ptr already contain a uint32_t object, then it is destroyed.

ptr :

pointer to a idmef_heartbeat_t object.

ret :

pointer to an address where to store the created uint32_t object.

Returns :

0 on success, or a negative value if an error occured.

idmef_heartbeat_get_next_additional_data ()

idmef_additional_data_t * idmef_heartbeat_get_next_additional_data
                                                        (idmef_heartbeat_t *heartbeat,
                                                         idmef_additional_data_t *additional_data_cur);

Get the next idmef_additional_data_t object listed in ptr. When iterating over the idmef_additional_data_t object listed in ptr, object should be set to the latest returned idmef_additional_data_t object.

heartbeat :

pointer to a idmef_heartbeat_t object.

additional_data_cur :

pointer to a idmef_additional_data_t object.

Returns :

the next idmef_additional_data_t in the list.

idmef_heartbeat_set_additional_data ()

void                idmef_heartbeat_set_additional_data (idmef_heartbeat_t *ptr,
                                                         idmef_additional_data_t *object,
                                                         int pos);

Add object to position pos of ptr list of idmef_additional_data_t object.

If pos is IDMEF_LIST_APPEND, object will be inserted at the tail of the list. If pos is IDMEF_LIST_PREPEND, object will be inserted at the head of the list.

ptr :

pointer to a idmef_heartbeat_t object.

object :

pointer to a idmef_additional_data_t object.

pos :

Position in the list.

idmef_heartbeat_new_additional_data ()

int                 idmef_heartbeat_new_additional_data (idmef_heartbeat_t *ptr,
                                                         idmef_additional_data_t **ret,
                                                         int pos);

Create a new idmef_additional_data_t children of ptr, and add it to position pos of ptr list of idmef_additional_data_t object. The created idmef_additional_data_t object is stored in ret.

If pos is IDMEF_LIST_APPEND, object will be inserted at the tail of the list. If pos is IDMEF_LIST_PREPEND, object will be inserted at the head of the list.

ptr :

pointer to a idmef_heartbeat_t object.

ret :

pointer to an address where to store the created idmef_additional_data_t object.

pos :

position in the list.

Returns :

0 on success, or a negative value if an error occured.

enum idmef_message_type_t

typedef enum {
        IDMEF_MESSAGE_TYPE_ERROR = -1,
        IDMEF_MESSAGE_TYPE_ALERT = 1,
        IDMEF_MESSAGE_TYPE_HEARTBEAT = 2
} idmef_message_type_t;


idmef_message_type_to_numeric ()

idmef_message_type_t  idmef_message_type_to_numeric     (const char *name);

name :

pointer to an IDMEF string representation of a idmef_message_type_t value.

Returns :

the numeric equivalent of name, or -1 if name is not valid.

idmef_message_type_to_string ()

const char *        idmef_message_type_to_string        (idmef_message_type_t val);

Return the IDMEF string equivalent of val provided idmef_message_type_t value.

val :

an enumeration value for idmef_message_type_t.

Returns :

a pointer to the string describing val, or NULL if val is invalid.

idmef_message_t

typedef struct idmef_message idmef_message_t;


idmef_message_new ()

int                 idmef_message_new                   (idmef_message_t **ret);

Create a new idmef_message_t object.

ret :

Pointer where to store the created idmef_message_t object.

Returns :

0 on success, a negative value if an error occured.

idmef_message_copy ()

int                 idmef_message_copy                  (const idmef_message_t *src,
                                                         idmef_message_t *dst);

Copy a new idmef_message_t object from src to dst.

src :

Source of the copy.

dst :

Where to copy the object.

Returns :

0 on success, a negative value if an error occured.

idmef_message_clone ()

int                 idmef_message_clone                 (idmef_message_t *src,
                                                         idmef_message_t **dst);

Create a copy of src, and store it in dst.

src :

Object to be cloned.

dst :

Address where to store the pointer to the cloned object.

Returns :

0 on success, a negative value if an error occured.

idmef_message_ref ()

idmef_message_t *   idmef_message_ref                   (idmef_message_t *message);

Increase message reference count, so that it can be referenced multiple time.

message :

pointer to a idmef_message_t object.

Returns :

a pointer to message.

idmef_message_destroy ()

void                idmef_message_destroy               (idmef_message_t *ptr);

Destroy ptr and all of it's children. The objects are only destroyed if their reference count reach zero.

ptr :

pointer to a idmef_message_t object.

idmef_message_get_version ()

prelude_string_t *  idmef_message_get_version           (idmef_message_t *ptr);

ptr :

Returns :


idmef_message_set_version ()

void                idmef_message_set_version           (idmef_message_t *ptr,
                                                         prelude_string_t *version);

Set version object as a children of ptr. if ptr already contain an version object, then it is destroyed, and updated to point to the provided version object.

ptr :

pointer to a idmef_message_t object.

version :

pointer to a prelude_string_t object.

idmef_message_new_version ()

int                 idmef_message_new_version           (idmef_message_t *ptr,
                                                         prelude_string_t **ret);

Create a new version object, children of idmef_message_t. If ptr already contain a prelude_string_t object, then it is destroyed.

ptr :

pointer to a idmef_message_t object.

ret :

pointer to an address where to store the created prelude_string_t object.

Returns :

0 on success, or a negative value if an error occured.

idmef_message_get_type ()

idmef_message_type_t  idmef_message_get_type            (idmef_message_t *ptr);

Access the type children of ptr.

ptr :

pointer to a idmef_message_t object.

Returns :

a pointer to the idmef_message_type_t children, or NULL if it is not set.

idmef_message_get_alert ()

idmef_alert_t *     idmef_message_get_alert             (idmef_message_t *ptr);

Access the alert children of ptr.

ptr :

pointer to a idmef_message_t object.

Returns :

a pointer to the idmef_alert_t children, or NULL if it is not set.

idmef_message_set_alert ()

void                idmef_message_set_alert             (idmef_message_t *ptr,
                                                         idmef_alert_t *alert);

Set alert object as a children of ptr. if ptr already contain a alert object, then it is destroyed, and updated to point to the provided alert object.

ptr :

pointer to a idmef_message_t object.

alert :

pointer to a idmef_alert_t object.

idmef_message_new_alert ()

int                 idmef_message_new_alert             (idmef_message_t *ptr,
                                                         idmef_alert_t **ret);

Create a new idmef_alert_t object, children of idmef_message_t. If ptr already contain a idmef_alert_t object, then it is destroyed.

ptr :

pointer to a idmef_message_t object.

ret :

pointer where to store the created idmef_alert_t object.

Returns :

0 on success, or a negative value if an error occured.

idmef_message_get_heartbeat ()

idmef_heartbeat_t * idmef_message_get_heartbeat         (idmef_message_t *ptr);

Access the heartbeat children of ptr.

ptr :

pointer to a idmef_message_t object.

Returns :

a pointer to the idmef_heartbeat_t children, or NULL if it is not set.

idmef_message_set_heartbeat ()

void                idmef_message_set_heartbeat         (idmef_message_t *ptr,
                                                         idmef_heartbeat_t *heartbeat);

Set heartbeat object as a children of ptr. if ptr already contain a heartbeat object, then it is destroyed, and updated to point to the provided heartbeat object.

ptr :

pointer to a idmef_message_t object.

heartbeat :

pointer to a idmef_heartbeat_t object.

idmef_message_new_heartbeat ()

int                 idmef_message_new_heartbeat         (idmef_message_t *ptr,
                                                         idmef_heartbeat_t **ret);

Create a new idmef_heartbeat_t object, children of idmef_message_t. If ptr already contain a idmef_heartbeat_t object, then it is destroyed.

ptr :

pointer to a idmef_message_t object.

ret :

pointer where to store the created idmef_heartbeat_t object.

Returns :

0 on success, or a negative value if an error occured.

idmef_message_set_pmsg ()

void                idmef_message_set_pmsg              (idmef_message_t *message,
                                                         prelude_msg_t *msg);

message :

msg :


idmef_message_get_pmsg ()

prelude_msg_t *     idmef_message_get_pmsg              (idmef_message_t *message);

message :

Returns :


idmef_action_compare ()

int                 idmef_action_compare                (const idmef_action_t *obj1,
                                                         const idmef_action_t *obj2);

Compare obj1 with obj2.

obj1 :

Object to compare with obj2.

obj2 :

Object to compare with obj1.

Returns :

0 on match, a negative value on comparison failure.

idmef_additional_data_compare ()

int                 idmef_additional_data_compare       (const idmef_additional_data_t *obj1,
                                                         const idmef_additional_data_t *obj2);

Compare obj1 with obj2.

obj1 :

Object to compare with obj2.

obj2 :

Object to compare with obj1.

Returns :

0 on match, a negative value on comparison failure.

idmef_address_compare ()

int                 idmef_address_compare               (const idmef_address_t *obj1,
                                                         const idmef_address_t *obj2);

Compare obj1 with obj2.

obj1 :

Object to compare with obj2.

obj2 :

Object to compare with obj1.

Returns :

0 on match, a negative value on comparison failure.

idmef_alert_compare ()

int                 idmef_alert_compare                 (const idmef_alert_t *obj1,
                                                         const idmef_alert_t *obj2);

Compare obj1 with obj2.

obj1 :

Object to compare with obj2.

obj2 :

Object to compare with obj1.

Returns :

0 on match, a negative value on comparison failure.

idmef_alertident_compare ()

int                 idmef_alertident_compare            (const idmef_alertident_t *obj1,
                                                         const idmef_alertident_t *obj2);

Compare obj1 with obj2.

obj1 :

Object to compare with obj2.

obj2 :

Object to compare with obj1.

Returns :

0 on match, a negative value on comparison failure.

idmef_analyzer_compare ()

int                 idmef_analyzer_compare              (const idmef_analyzer_t *obj1,
                                                         const idmef_analyzer_t *obj2);

Compare obj1 with obj2.

obj1 :

Object to compare with obj2.

obj2 :

Object to compare with obj1.

Returns :

0 on match, a negative value on comparison failure.

idmef_assessment_compare ()

int                 idmef_assessment_compare            (const idmef_assessment_t *obj1,
                                                         const idmef_assessment_t *obj2);

Compare obj1 with obj2.

obj1 :

Object to compare with obj2.

obj2 :

Object to compare with obj1.

Returns :

0 on match, a negative value on comparison failure.

idmef_checksum_compare ()

int                 idmef_checksum_compare              (const idmef_checksum_t *obj1,
                                                         const idmef_checksum_t *obj2);

Compare obj1 with obj2.

obj1 :

Object to compare with obj2.

obj2 :

Object to compare with obj1.

Returns :

0 on match, a negative value on comparison failure.

idmef_classification_compare ()

int                 idmef_classification_compare        (const idmef_classification_t *obj1,
                                                         const idmef_classification_t *obj2);

Compare obj1 with obj2.

obj1 :

Object to compare with obj2.

obj2 :

Object to compare with obj1.

Returns :

0 on match, a negative value on comparison failure.

idmef_confidence_compare ()

int                 idmef_confidence_compare            (const idmef_confidence_t *obj1,
                                                         const idmef_confidence_t *obj2);

Compare obj1 with obj2.

obj1 :

Object to compare with obj2.

obj2 :

Object to compare with obj1.

Returns :

0 on match, a negative value on comparison failure.

idmef_correlation_alert_compare ()

int                 idmef_correlation_alert_compare     (const idmef_correlation_alert_t *obj1,
                                                         const idmef_correlation_alert_t *obj2);

Compare obj1 with obj2.

obj1 :

Object to compare with obj2.

obj2 :

Object to compare with obj1.

Returns :

0 on match, a negative value on comparison failure.

idmef_data_compare ()

int                 idmef_data_compare                  (const idmef_data_t *data1,
                                                         const idmef_data_t *data2);

data1 :

data2 :

Returns :


idmef_file_access_compare ()

int                 idmef_file_access_compare           (const idmef_file_access_t *obj1,
                                                         const idmef_file_access_t *obj2);

Compare obj1 with obj2.

obj1 :

Object to compare with obj2.

obj2 :

Object to compare with obj1.

Returns :

0 on match, a negative value on comparison failure.

idmef_file_compare ()

int                 idmef_file_compare                  (const idmef_file_t *obj1,
                                                         const idmef_file_t *obj2);

Compare obj1 with obj2.

obj1 :

Object to compare with obj2.

obj2 :

Object to compare with obj1.

Returns :

0 on match, a negative value on comparison failure.

idmef_heartbeat_compare ()

int                 idmef_heartbeat_compare             (const idmef_heartbeat_t *obj1,
                                                         const idmef_heartbeat_t *obj2);

Compare obj1 with obj2.

obj1 :

Object to compare with obj2.

obj2 :

Object to compare with obj1.

Returns :

0 on match, a negative value on comparison failure.

idmef_impact_compare ()

int                 idmef_impact_compare                (const idmef_impact_t *obj1,
                                                         const idmef_impact_t *obj2);

Compare obj1 with obj2.

obj1 :

Object to compare with obj2.

obj2 :

Object to compare with obj1.

Returns :

0 on match, a negative value on comparison failure.

idmef_inode_compare ()

int                 idmef_inode_compare                 (const idmef_inode_t *obj1,
                                                         const idmef_inode_t *obj2);

Compare obj1 with obj2.

obj1 :

Object to compare with obj2.

obj2 :

Object to compare with obj1.

Returns :

0 on match, a negative value on comparison failure.

idmef_linkage_compare ()

int                 idmef_linkage_compare               (const idmef_linkage_t *obj1,
                                                         const idmef_linkage_t *obj2);

Compare obj1 with obj2.

obj1 :

Object to compare with obj2.

obj2 :

Object to compare with obj1.

Returns :

0 on match, a negative value on comparison failure.

idmef_message_compare ()

int                 idmef_message_compare               (const idmef_message_t *obj1,
                                                         const idmef_message_t *obj2);

Compare obj1 with obj2.

obj1 :

Object to compare with obj2.

obj2 :

Object to compare with obj1.

Returns :

0 on match, a negative value on comparison failure.

idmef_node_compare ()

int                 idmef_node_compare                  (const idmef_node_t *obj1,
                                                         const idmef_node_t *obj2);

Compare obj1 with obj2.

obj1 :

Object to compare with obj2.

obj2 :

Object to compare with obj1.

Returns :

0 on match, a negative value on comparison failure.

idmef_overflow_alert_compare ()

int                 idmef_overflow_alert_compare        (const idmef_overflow_alert_t *obj1,
                                                         const idmef_overflow_alert_t *obj2);

Compare obj1 with obj2.

obj1 :

Object to compare with obj2.

obj2 :

Object to compare with obj1.

Returns :

0 on match, a negative value on comparison failure.

idmef_process_compare ()

int                 idmef_process_compare               (const idmef_process_t *obj1,
                                                         const idmef_process_t *obj2);

Compare obj1 with obj2.

obj1 :

Object to compare with obj2.

obj2 :

Object to compare with obj1.

Returns :

0 on match, a negative value on comparison failure.

idmef_reference_compare ()

int                 idmef_reference_compare             (const idmef_reference_t *obj1,
                                                         const idmef_reference_t *obj2);

Compare obj1 with obj2.

obj1 :

Object to compare with obj2.

obj2 :

Object to compare with obj1.

Returns :

0 on match, a negative value on comparison failure.

idmef_service_compare ()

int                 idmef_service_compare               (const idmef_service_t *obj1,
                                                         const idmef_service_t *obj2);

Compare obj1 with obj2.

obj1 :

Object to compare with obj2.

obj2 :

Object to compare with obj1.

Returns :

0 on match, a negative value on comparison failure.

idmef_snmp_service_compare ()

int                 idmef_snmp_service_compare          (const idmef_snmp_service_t *obj1,
                                                         const idmef_snmp_service_t *obj2);

Compare obj1 with obj2.

obj1 :

Object to compare with obj2.

obj2 :

Object to compare with obj1.

Returns :

0 on match, a negative value on comparison failure.

idmef_source_compare ()

int                 idmef_source_compare                (const idmef_source_t *obj1,
                                                         const idmef_source_t *obj2);

Compare obj1 with obj2.

obj1 :

Object to compare with obj2.

obj2 :

Object to compare with obj1.

Returns :

0 on match, a negative value on comparison failure.

idmef_target_compare ()

int                 idmef_target_compare                (const idmef_target_t *obj1,
                                                         const idmef_target_t *obj2);

Compare obj1 with obj2.

obj1 :

Object to compare with obj2.

obj2 :

Object to compare with obj1.

Returns :

0 on match, a negative value on comparison failure.

idmef_time_compare ()

int                 idmef_time_compare                  (const idmef_time_t *time1,
                                                         const idmef_time_t *time2);

time1 :

Pointer to an idmef_time_t object to compare with time2.

time2 :

Pointer to an idmef_time_t object to compare with time1.

Returns :

0 if time1 and time2 match, 1 if time1 is greater than time2, -1 if time1 is lesser than time2.

idmef_tool_alert_compare ()

int                 idmef_tool_alert_compare            (const idmef_tool_alert_t *obj1,
                                                         const idmef_tool_alert_t *obj2);

Compare obj1 with obj2.

obj1 :

Object to compare with obj2.

obj2 :

Object to compare with obj1.

Returns :

0 on match, a negative value on comparison failure.

idmef_user_compare ()

int                 idmef_user_compare                  (const idmef_user_t *obj1,
                                                         const idmef_user_t *obj2);

Compare obj1 with obj2.

obj1 :

Object to compare with obj2.

obj2 :

Object to compare with obj1.

Returns :

0 on match, a negative value on comparison failure.

idmef_user_id_compare ()

int                 idmef_user_id_compare               (const idmef_user_id_t *obj1,
                                                         const idmef_user_id_t *obj2);

Compare obj1 with obj2.

obj1 :

Object to compare with obj2.

obj2 :

Object to compare with obj1.

Returns :

0 on match, a negative value on comparison failure.

idmef_web_service_compare ()

int                 idmef_web_service_compare           (const idmef_web_service_t *obj1,
                                                         const idmef_web_service_t *obj2);

Compare obj1 with obj2.

obj1 :

Object to compare with obj2.

obj2 :

Object to compare with obj1.

Returns :

0 on match, a negative value on comparison failure.

IDMEF_CLASS_ID_ADDITIONAL_DATA_TYPE

#define IDMEF_CLASS_ID_ADDITIONAL_DATA_TYPE 3


IDMEF_CLASS_ID_ADDITIONAL_DATA

#define IDMEF_CLASS_ID_ADDITIONAL_DATA 4


IDMEF_CLASS_ID_REFERENCE_ORIGIN

#define IDMEF_CLASS_ID_REFERENCE_ORIGIN 5


IDMEF_CLASS_ID_REFERENCE

#define IDMEF_CLASS_ID_REFERENCE 50


IDMEF_CLASS_ID_CLASSIFICATION

#define IDMEF_CLASS_ID_CLASSIFICATION 6


IDMEF_CLASS_ID_USER_ID_TYPE

#define IDMEF_CLASS_ID_USER_ID_TYPE 7


IDMEF_CLASS_ID_USER_ID

#define IDMEF_CLASS_ID_USER_ID 8


IDMEF_CLASS_ID_USER_CATEGORY

#define IDMEF_CLASS_ID_USER_CATEGORY 9


IDMEF_CLASS_ID_USER

#define IDMEF_CLASS_ID_USER 10


IDMEF_CLASS_ID_ADDRESS_CATEGORY

#define IDMEF_CLASS_ID_ADDRESS_CATEGORY 11


IDMEF_CLASS_ID_ADDRESS

#define IDMEF_CLASS_ID_ADDRESS 12


IDMEF_CLASS_ID_PROCESS

#define IDMEF_CLASS_ID_PROCESS 13


IDMEF_CLASS_ID_WEB_SERVICE

#define IDMEF_CLASS_ID_WEB_SERVICE 14


IDMEF_CLASS_ID_SNMP_SERVICE

#define IDMEF_CLASS_ID_SNMP_SERVICE 15


IDMEF_CLASS_ID_SERVICE_TYPE

#define IDMEF_CLASS_ID_SERVICE_TYPE 16


IDMEF_CLASS_ID_SERVICE

#define IDMEF_CLASS_ID_SERVICE 17


IDMEF_CLASS_ID_NODE_CATEGORY

#define IDMEF_CLASS_ID_NODE_CATEGORY 18


IDMEF_CLASS_ID_NODE

#define IDMEF_CLASS_ID_NODE 19


IDMEF_CLASS_ID_SOURCE_SPOOFED

#define IDMEF_CLASS_ID_SOURCE_SPOOFED 20


IDMEF_CLASS_ID_SOURCE

#define IDMEF_CLASS_ID_SOURCE 21


IDMEF_CLASS_ID_FILE_ACCESS

#define IDMEF_CLASS_ID_FILE_ACCESS 22


IDMEF_CLASS_ID_INODE

#define IDMEF_CLASS_ID_INODE 23


IDMEF_CLASS_ID_CHECKSUM_ALGORITHM

#define IDMEF_CLASS_ID_CHECKSUM_ALGORITHM 53


IDMEF_CLASS_ID_CHECKSUM

#define IDMEF_CLASS_ID_CHECKSUM 52


IDMEF_CLASS_ID_FILE_CATEGORY

#define IDMEF_CLASS_ID_FILE_CATEGORY 24


IDMEF_CLASS_ID_FILE_FSTYPE

#define IDMEF_CLASS_ID_FILE_FSTYPE 25


IDMEF_CLASS_ID_FILE

#define IDMEF_CLASS_ID_FILE 26


IDMEF_CLASS_ID_LINKAGE_CATEGORY

#define IDMEF_CLASS_ID_LINKAGE_CATEGORY 27


IDMEF_CLASS_ID_LINKAGE

#define IDMEF_CLASS_ID_LINKAGE 28


IDMEF_CLASS_ID_TARGET_DECOY

#define IDMEF_CLASS_ID_TARGET_DECOY 29


IDMEF_CLASS_ID_TARGET

#define IDMEF_CLASS_ID_TARGET 30


IDMEF_CLASS_ID_ANALYZER

#define IDMEF_CLASS_ID_ANALYZER 31


IDMEF_CLASS_ID_ALERTIDENT

#define IDMEF_CLASS_ID_ALERTIDENT 32


IDMEF_CLASS_ID_IMPACT_SEVERITY

#define IDMEF_CLASS_ID_IMPACT_SEVERITY 33


IDMEF_CLASS_ID_IMPACT_COMPLETION

#define IDMEF_CLASS_ID_IMPACT_COMPLETION 34


IDMEF_CLASS_ID_IMPACT_TYPE

#define IDMEF_CLASS_ID_IMPACT_TYPE 35


IDMEF_CLASS_ID_IMPACT

#define IDMEF_CLASS_ID_IMPACT 36


IDMEF_CLASS_ID_ACTION_CATEGORY

#define IDMEF_CLASS_ID_ACTION_CATEGORY 37


IDMEF_CLASS_ID_ACTION

#define IDMEF_CLASS_ID_ACTION 38


IDMEF_CLASS_ID_CONFIDENCE_RATING

#define IDMEF_CLASS_ID_CONFIDENCE_RATING 39


IDMEF_CLASS_ID_CONFIDENCE

#define IDMEF_CLASS_ID_CONFIDENCE 40


IDMEF_CLASS_ID_ASSESSMENT

#define IDMEF_CLASS_ID_ASSESSMENT 41


IDMEF_CLASS_ID_TOOL_ALERT

#define IDMEF_CLASS_ID_TOOL_ALERT 42


IDMEF_CLASS_ID_CORRELATION_ALERT

#define IDMEF_CLASS_ID_CORRELATION_ALERT 43


IDMEF_CLASS_ID_OVERFLOW_ALERT

#define IDMEF_CLASS_ID_OVERFLOW_ALERT 44


IDMEF_CLASS_ID_ALERT_TYPE

#define IDMEF_CLASS_ID_ALERT_TYPE 45


IDMEF_CLASS_ID_ALERT

#define IDMEF_CLASS_ID_ALERT 46


IDMEF_CLASS_ID_HEARTBEAT

#define IDMEF_CLASS_ID_HEARTBEAT 47


IDMEF_CLASS_ID_MESSAGE_TYPE

#define IDMEF_CLASS_ID_MESSAGE_TYPE 48


IDMEF_CLASS_ID_MESSAGE

#define IDMEF_CLASS_ID_MESSAGE 49

See Also

idmef_path_t for the high level IDMEF API.

libprelude-1.0.0/docs/api/html/libprelude-prelude-hash.html0000664000076400007640000003336111347714757020661 00000000000000 prelude-hash

prelude-hash

prelude-hash

Synopsis

typedef             prelude_hash_t;
int                 prelude_hash_new                    (prelude_hash_t **hash,
                                                         unsigned int (hash_funcconst void *) (),
                                                         int (key_cmp_funcconst void *, const void *) (),
                                                         void (key_destroy_funcvoid *) (),
                                                         void (value_destroy_funcvoid *) ());
int                 prelude_hash_new2                   (prelude_hash_t **hash,
                                                         size_t size,
                                                         unsigned int (hash_funcconst void *) (),
                                                         int (key_cmp_funcconst void *, const void *) (),
                                                         void (key_destroy_funcvoid *) (),
                                                         void (value_destroy_funcvoid *) ());
void                prelude_hash_destroy                (prelude_hash_t *hash);
int                 prelude_hash_set                    (prelude_hash_t *hash,
                                                         void *key,
                                                         void *value);
void *              prelude_hash_get                    (prelude_hash_t *hash,
                                                         const void *key);
int                 prelude_hash_elem_destroy           (prelude_hash_t *hash,
                                                         const void *key);
void                prelude_hash_iterate                (prelude_hash_t *hash,
                                                         void (cbvoid *data) ());

Description

Details

prelude_hash_t

typedef struct prelude_hash prelude_hash_t;


prelude_hash_new ()

int                 prelude_hash_new                    (prelude_hash_t **hash,
                                                         unsigned int (hash_funcconst void *) (),
                                                         int (key_cmp_funcconst void *, const void *) (),
                                                         void (key_destroy_funcvoid *) (),
                                                         void (value_destroy_funcvoid *) ());

hash :

hash_func :

key_cmp_func :

key_destroy_func :

value_destroy_func :

Returns :


prelude_hash_new2 ()

int                 prelude_hash_new2                   (prelude_hash_t **hash,
                                                         size_t size,
                                                         unsigned int (hash_funcconst void *) (),
                                                         int (key_cmp_funcconst void *, const void *) (),
                                                         void (key_destroy_funcvoid *) (),
                                                         void (value_destroy_funcvoid *) ());

hash :

size :

hash_func :

key_cmp_func :

key_destroy_func :

value_destroy_func :

Returns :


prelude_hash_destroy ()

void                prelude_hash_destroy                (prelude_hash_t *hash);

hash :


prelude_hash_set ()

int                 prelude_hash_set                    (prelude_hash_t *hash,
                                                         void *key,
                                                         void *value);

hash :

key :

value :

Returns :


prelude_hash_get ()

void *              prelude_hash_get                    (prelude_hash_t *hash,
                                                         const void *key);

hash :

key :

Returns :


prelude_hash_elem_destroy ()

int                 prelude_hash_elem_destroy           (prelude_hash_t *hash,
                                                         const void *key);

hash :

key :

Returns :


prelude_hash_iterate ()

void                prelude_hash_iterate                (prelude_hash_t *hash,
                                                         void (cbvoid *data) ());

hash :

cb :

libprelude-1.0.0/docs/api/html/libprelude-prelude-error.html0000664000076400007640000011034411347714757021064 00000000000000 prelude-error

prelude-error

prelude-error

Description

Details

PRELUDE_ERROR_SOURCE_DEFAULT

 #define PRELUDE_ERROR_SOURCE_DEFAULT  PRELUDE_ERROR_SOURCE_UNKNOWN


PRELUDE_ERROR_SYSTEM_ERROR

#define PRELUDE_ERROR_SYSTEM_ERROR    (1 << 15)


enum prelude_error_source_t

typedef enum {
    PRELUDE_ERROR_SOURCE_UNKNOWN = 0,
    PRELUDE_ERROR_SOURCE_IO = 1,
    PRELUDE_ERROR_SOURCE_MESSAGE = 2,
    PRELUDE_ERROR_SOURCE_FAILOVER = 3,
    PRELUDE_ERROR_SOURCE_CLIENT = 4,
    PRELUDE_ERROR_SOURCE_CLIENT_PROFILE = 5,
    PRELUDE_ERROR_SOURCE_EXTRACT = 6,
    PRELUDE_ERROR_SOURCE_CONNECTION = 7,
    PRELUDE_ERROR_SOURCE_CONNECTION_POOL = 8,
    PRELUDE_ERROR_SOURCE_CONFIG_ENGINE = 9,
    PRELUDE_ERROR_SOURCE_STRING = 10,
    PRELUDE_ERROR_SOURCE_IDMEF_TREE_WRAP = 11,
    PRELUDE_ERROR_SOURCE_IDMEF_PATH = 12,
    PRELUDE_ERROR_SOURCE_IDMEF_TYPE = 13,
    PRELUDE_ERROR_SOURCE_IDMEF_MESSAGE_READ = 14,
    PRELUDE_ERROR_SOURCE_IDMEF_CRITERIA = 15,
    PRELUDE_ERROR_SOURCE_IDMEF_VALUE_TYPE = 16,
    PRELUDE_ERROR_SOURCE_PRELUDEDB = 255,
} prelude_error_source_t;


enum prelude_error_code_t

typedef enum {
    PRELUDE_ERROR_NO_ERROR = 0,
    PRELUDE_ERROR_GENERIC = 1,
    PRELUDE_ERROR_TLS = 2,
    PRELUDE_ERROR_INVAL_LENGTH = 3,
    PRELUDE_ERROR_INVAL_MESSAGE = 4,
    PRELUDE_ERROR_PROTOCOL_VERSION = 5,
    PRELUDE_ERROR_EOF = 6,
    PRELUDE_ERROR_PROFILE = 8,
    PRELUDE_ERROR_TLS_AUTH_REJECTED = 16,
    PRELUDE_ERROR_INVAL_INT8 = 17,
    PRELUDE_ERROR_INVAL_INT16 = 18,
    PRELUDE_ERROR_INVAL_INT32 = 19,
    PRELUDE_ERROR_INVAL_INT64 = 20,
    PRELUDE_ERROR_INVAL_FLOAT = 21,
    PRELUDE_ERROR_INVAL_CHAR = 22,
    PRELUDE_ERROR_INVAL_IDMEF_TIME = 23,
    PRELUDE_ERROR_CONNECTION_STRING = 24,
    PRELUDE_ERROR_IDMEF_VALUE_TYPE_UNKNOWN = 25,
    PRELUDE_ERROR_IDMEF_VALUE_TYPE_COPY_UNAVAILABLE = 26,
    PRELUDE_ERROR_IDMEF_VALUE_TYPE_CLONE_UNAVAILABLE = 27,
    PRELUDE_ERROR_IDMEF_VALUE_TYPE_COMPARE_UNAVAILABLE = 28,
    PRELUDE_ERROR_IDMEF_VALUE_TYPE_READ_UNAVAILABLE = 29,
    PRELUDE_ERROR_IDMEF_VALUE_TYPE_WRITE_UNAVAILABLE = 30,
    PRELUDE_ERROR_IDMEF_VALUE_TYPE_COMPARE_MISMATCH = 31,
    PRELUDE_ERROR_IDMEF_VALUE_TYPE_PARSE = 32,
    PRELUDE_ERROR_IDMEF_CLASS_UNKNOWN = 33,
    PRELUDE_ERROR_IDMEF_CLASS_UNKNOWN_CHILD = 34,
    PRELUDE_ERROR_IDMEF_CLASS_UNKNOWN_NAME = 35,
    PRELUDE_ERROR_IDMEF_PATH_LENGTH = 36,
    PRELUDE_ERROR_IDMEF_PATH_DEPTH = 37,
    PRELUDE_ERROR_IDMEF_PATH_PARENT_ROOT = 38,
    PRELUDE_ERROR_IDMEF_PATH_NTH = 39,
    PRELUDE_ERROR_IDMEF_PATH_MISS_INDEX = 40,
    PRELUDE_ERROR_IDMEF_PATH_INTEGRITY = 41,
    PRELUDE_ERROR_IDMEF_PATH_INDEX_RESERVED = 42,
    PRELUDE_ERROR_IDMEF_PATH_INDEX_FORBIDDEN = 43,
    PRELUDE_ERROR_IDMEF_PATH_INDEX_UNDEFINED = 44,
    PRELUDE_ERROR_IDMEF_TREE_INDEX_UNDEFINED = 45,
    PRELUDE_ERROR_IDMEF_UNKNOWN_ENUM_STRING = 46,
    PRELUDE_ERROR_IDMEF_UNKNOWN_TAG = 47,
    PRELUDE_ERROR_DAEMONIZE_LOCK_HELD = 48,
    PRELUDE_ERROR_PLUGIN_LTDL_INIT = 49,
    PRELUDE_ERROR_STRING_NOT_NULL_TERMINATED = 50,
    PRELUDE_ERROR_CANT_RESOLVE = 51,
    PRELUDE_ERROR_UNKNOWN_PERMISSION_TYPE = 52,
    PRELUDE_ERROR_UNKNOWN_PERMISSION_BIT = 53,
    PRELUDE_ERROR_IDMEF_CRITERIA_PARSE = 55,
    PRELUDE_ERROR_IDMEF_CRITERION_UNSUPPORTED_OPERATOR = 56,
    PRELUDE_ERROR_IDMEF_CRITERION_INVALID_REGEX = 57,
    PRELUDE_ERROR_TLS_WARNING_ALERT = 58,
    PRELUDE_ERROR_TLS_FATAL_ALERT = 59,
    PRELUDE_ERROR_IDMEF_CLASS_CHILD_NOT_CLASS = 60,
    PRELUDE_ERROR_ASSERTION = 61,
    PRELUDE_ERROR_IDMEF_VALUE_TYPE_REF_UNAVAILABLE = 62,
    PRELUDE_ERROR_UNKNOWN_ERRNO = 16382,
    PRELUDE_ERROR_E2BIG = PRELUDE_ERROR_SYSTEM_ERROR | 0,
    PRELUDE_ERROR_EACCES = PRELUDE_ERROR_SYSTEM_ERROR | 1,
    PRELUDE_ERROR_EADDRINUSE = PRELUDE_ERROR_SYSTEM_ERROR | 2,
    PRELUDE_ERROR_EADDRNOTAVAIL = PRELUDE_ERROR_SYSTEM_ERROR | 3,
    PRELUDE_ERROR_EADV = PRELUDE_ERROR_SYSTEM_ERROR | 4,
    PRELUDE_ERROR_EAFNOSUPPORT = PRELUDE_ERROR_SYSTEM_ERROR | 5,
    PRELUDE_ERROR_EAGAIN = PRELUDE_ERROR_SYSTEM_ERROR | 6,
    PRELUDE_ERROR_EALREADY = PRELUDE_ERROR_SYSTEM_ERROR | 7,
    PRELUDE_ERROR_EAUTH = PRELUDE_ERROR_SYSTEM_ERROR | 8,
    PRELUDE_ERROR_EBACKGROUND = PRELUDE_ERROR_SYSTEM_ERROR | 9,
    PRELUDE_ERROR_EBADE = PRELUDE_ERROR_SYSTEM_ERROR | 10,
    PRELUDE_ERROR_EBADF = PRELUDE_ERROR_SYSTEM_ERROR | 11,
    PRELUDE_ERROR_EBADFD = PRELUDE_ERROR_SYSTEM_ERROR | 12,
    PRELUDE_ERROR_EBADMSG = PRELUDE_ERROR_SYSTEM_ERROR | 13,
    PRELUDE_ERROR_EBADR = PRELUDE_ERROR_SYSTEM_ERROR | 14,
    PRELUDE_ERROR_EBADRPC = PRELUDE_ERROR_SYSTEM_ERROR | 15,
    PRELUDE_ERROR_EBADRQC = PRELUDE_ERROR_SYSTEM_ERROR | 16,
    PRELUDE_ERROR_EBADSLT = PRELUDE_ERROR_SYSTEM_ERROR | 17,
    PRELUDE_ERROR_EBFONT = PRELUDE_ERROR_SYSTEM_ERROR | 18,
    PRELUDE_ERROR_EBUSY = PRELUDE_ERROR_SYSTEM_ERROR | 19,
    PRELUDE_ERROR_ECANCELED = PRELUDE_ERROR_SYSTEM_ERROR | 20,
    PRELUDE_ERROR_ECHILD = PRELUDE_ERROR_SYSTEM_ERROR | 21,
    PRELUDE_ERROR_ECHRNG = PRELUDE_ERROR_SYSTEM_ERROR | 22,
    PRELUDE_ERROR_ECOMM = PRELUDE_ERROR_SYSTEM_ERROR | 23,
    PRELUDE_ERROR_ECONNABORTED = PRELUDE_ERROR_SYSTEM_ERROR | 24,
    PRELUDE_ERROR_ECONNREFUSED = PRELUDE_ERROR_SYSTEM_ERROR | 25,
    PRELUDE_ERROR_ECONNRESET = PRELUDE_ERROR_SYSTEM_ERROR | 26,
    PRELUDE_ERROR_ED = PRELUDE_ERROR_SYSTEM_ERROR | 27,
    PRELUDE_ERROR_EDEADLK = PRELUDE_ERROR_SYSTEM_ERROR | 28,
    PRELUDE_ERROR_EDEADLOCK = PRELUDE_ERROR_SYSTEM_ERROR | 29,
    PRELUDE_ERROR_EDESTADDRREQ = PRELUDE_ERROR_SYSTEM_ERROR | 30,
    PRELUDE_ERROR_EDIED = PRELUDE_ERROR_SYSTEM_ERROR | 31,
    PRELUDE_ERROR_EDOM = PRELUDE_ERROR_SYSTEM_ERROR | 32,
    PRELUDE_ERROR_EDOTDOT = PRELUDE_ERROR_SYSTEM_ERROR | 33,
    PRELUDE_ERROR_EDQUOT = PRELUDE_ERROR_SYSTEM_ERROR | 34,
    PRELUDE_ERROR_EEXIST = PRELUDE_ERROR_SYSTEM_ERROR | 35,
    PRELUDE_ERROR_EFAULT = PRELUDE_ERROR_SYSTEM_ERROR | 36,
    PRELUDE_ERROR_EFBIG = PRELUDE_ERROR_SYSTEM_ERROR | 37,
    PRELUDE_ERROR_EFTYPE = PRELUDE_ERROR_SYSTEM_ERROR | 38,
    PRELUDE_ERROR_EGRATUITOUS = PRELUDE_ERROR_SYSTEM_ERROR | 39,
    PRELUDE_ERROR_EGREGIOUS = PRELUDE_ERROR_SYSTEM_ERROR | 40,
    PRELUDE_ERROR_EHOSTDOWN = PRELUDE_ERROR_SYSTEM_ERROR | 41,
    PRELUDE_ERROR_EHOSTUNREACH = PRELUDE_ERROR_SYSTEM_ERROR | 42,
    PRELUDE_ERROR_EIDRM = PRELUDE_ERROR_SYSTEM_ERROR | 43,
    PRELUDE_ERROR_EIEIO = PRELUDE_ERROR_SYSTEM_ERROR | 44,
    PRELUDE_ERROR_EILSEQ = PRELUDE_ERROR_SYSTEM_ERROR | 45,
    PRELUDE_ERROR_EINPROGRESS = PRELUDE_ERROR_SYSTEM_ERROR | 46,
    PRELUDE_ERROR_EINTR = PRELUDE_ERROR_SYSTEM_ERROR | 47,
    PRELUDE_ERROR_EINVAL = PRELUDE_ERROR_SYSTEM_ERROR | 48,
    PRELUDE_ERROR_EIO = PRELUDE_ERROR_SYSTEM_ERROR | 49,
    PRELUDE_ERROR_EISCONN = PRELUDE_ERROR_SYSTEM_ERROR | 50,
    PRELUDE_ERROR_EISDIR = PRELUDE_ERROR_SYSTEM_ERROR | 51,
    PRELUDE_ERROR_EISNAM = PRELUDE_ERROR_SYSTEM_ERROR | 52,
    PRELUDE_ERROR_EL2HLT = PRELUDE_ERROR_SYSTEM_ERROR | 53,
    PRELUDE_ERROR_EL2NSYNC = PRELUDE_ERROR_SYSTEM_ERROR | 54,
    PRELUDE_ERROR_EL3HLT = PRELUDE_ERROR_SYSTEM_ERROR | 55,
    PRELUDE_ERROR_EL3RST = PRELUDE_ERROR_SYSTEM_ERROR | 56,
    PRELUDE_ERROR_ELIBACC = PRELUDE_ERROR_SYSTEM_ERROR | 57,
    PRELUDE_ERROR_ELIBBAD = PRELUDE_ERROR_SYSTEM_ERROR | 58,
    PRELUDE_ERROR_ELIBEXEC = PRELUDE_ERROR_SYSTEM_ERROR | 59,
    PRELUDE_ERROR_ELIBMAX = PRELUDE_ERROR_SYSTEM_ERROR | 60,
    PRELUDE_ERROR_ELIBSCN = PRELUDE_ERROR_SYSTEM_ERROR | 61,
    PRELUDE_ERROR_ELNRNG = PRELUDE_ERROR_SYSTEM_ERROR | 62,
    PRELUDE_ERROR_ELOOP = PRELUDE_ERROR_SYSTEM_ERROR | 63,
    PRELUDE_ERROR_EMEDIUMTYPE = PRELUDE_ERROR_SYSTEM_ERROR | 64,
    PRELUDE_ERROR_EMFILE = PRELUDE_ERROR_SYSTEM_ERROR | 65,
    PRELUDE_ERROR_EMLINK = PRELUDE_ERROR_SYSTEM_ERROR | 66,
    PRELUDE_ERROR_EMSGSIZE = PRELUDE_ERROR_SYSTEM_ERROR | 67,
    PRELUDE_ERROR_EMULTIHOP = PRELUDE_ERROR_SYSTEM_ERROR | 68,
    PRELUDE_ERROR_ENAMETOOLONG = PRELUDE_ERROR_SYSTEM_ERROR | 69,
    PRELUDE_ERROR_ENAVAIL = PRELUDE_ERROR_SYSTEM_ERROR | 70,
    PRELUDE_ERROR_ENEEDAUTH = PRELUDE_ERROR_SYSTEM_ERROR | 71,
    PRELUDE_ERROR_ENETDOWN = PRELUDE_ERROR_SYSTEM_ERROR | 72,
    PRELUDE_ERROR_ENETRESET = PRELUDE_ERROR_SYSTEM_ERROR | 73,
    PRELUDE_ERROR_ENETUNREACH = PRELUDE_ERROR_SYSTEM_ERROR | 74,
    PRELUDE_ERROR_ENFILE = PRELUDE_ERROR_SYSTEM_ERROR | 75,
    PRELUDE_ERROR_ENOANO = PRELUDE_ERROR_SYSTEM_ERROR | 76,
    PRELUDE_ERROR_ENOBUFS = PRELUDE_ERROR_SYSTEM_ERROR | 77,
    PRELUDE_ERROR_ENOCSI = PRELUDE_ERROR_SYSTEM_ERROR | 78,
    PRELUDE_ERROR_ENODATA = PRELUDE_ERROR_SYSTEM_ERROR | 79,
    PRELUDE_ERROR_ENODEV = PRELUDE_ERROR_SYSTEM_ERROR | 80,
    PRELUDE_ERROR_ENOENT = PRELUDE_ERROR_SYSTEM_ERROR | 81,
    PRELUDE_ERROR_ENOEXEC = PRELUDE_ERROR_SYSTEM_ERROR | 82,
    PRELUDE_ERROR_ENOLCK = PRELUDE_ERROR_SYSTEM_ERROR | 83,
    PRELUDE_ERROR_ENOLINK = PRELUDE_ERROR_SYSTEM_ERROR | 84,
    PRELUDE_ERROR_ENOMEDIUM = PRELUDE_ERROR_SYSTEM_ERROR | 85,
    PRELUDE_ERROR_ENOMEM = PRELUDE_ERROR_SYSTEM_ERROR | 86,
    PRELUDE_ERROR_ENOMSG = PRELUDE_ERROR_SYSTEM_ERROR | 87,
    PRELUDE_ERROR_ENONET = PRELUDE_ERROR_SYSTEM_ERROR | 88,
    PRELUDE_ERROR_ENOPKG = PRELUDE_ERROR_SYSTEM_ERROR | 89,
    PRELUDE_ERROR_ENOPROTOOPT = PRELUDE_ERROR_SYSTEM_ERROR | 90,
    PRELUDE_ERROR_ENOSPC = PRELUDE_ERROR_SYSTEM_ERROR | 91,
    PRELUDE_ERROR_ENOSR = PRELUDE_ERROR_SYSTEM_ERROR | 92,
    PRELUDE_ERROR_ENOSTR = PRELUDE_ERROR_SYSTEM_ERROR | 93,
    PRELUDE_ERROR_ENOSYS = PRELUDE_ERROR_SYSTEM_ERROR | 94,
    PRELUDE_ERROR_ENOTBLK = PRELUDE_ERROR_SYSTEM_ERROR | 95,
    PRELUDE_ERROR_ENOTCONN = PRELUDE_ERROR_SYSTEM_ERROR | 96,
    PRELUDE_ERROR_ENOTDIR = PRELUDE_ERROR_SYSTEM_ERROR | 97,
    PRELUDE_ERROR_ENOTEMPTY = PRELUDE_ERROR_SYSTEM_ERROR | 98,
    PRELUDE_ERROR_ENOTNAM = PRELUDE_ERROR_SYSTEM_ERROR | 99,
    PRELUDE_ERROR_ENOTSOCK = PRELUDE_ERROR_SYSTEM_ERROR | 100,
    PRELUDE_ERROR_ENOTSUP = PRELUDE_ERROR_SYSTEM_ERROR | 101,
    PRELUDE_ERROR_ENOTTY = PRELUDE_ERROR_SYSTEM_ERROR | 102,
    PRELUDE_ERROR_ENOTUNIQ = PRELUDE_ERROR_SYSTEM_ERROR | 103,
    PRELUDE_ERROR_ENXIO = PRELUDE_ERROR_SYSTEM_ERROR | 104,
    PRELUDE_ERROR_EOPNOTSUPP = PRELUDE_ERROR_SYSTEM_ERROR | 105,
    PRELUDE_ERROR_EOVERFLOW = PRELUDE_ERROR_SYSTEM_ERROR | 106,
    PRELUDE_ERROR_EPERM = PRELUDE_ERROR_SYSTEM_ERROR | 107,
    PRELUDE_ERROR_EPFNOSUPPORT = PRELUDE_ERROR_SYSTEM_ERROR | 108,
    PRELUDE_ERROR_EPIPE = PRELUDE_ERROR_SYSTEM_ERROR | 109,
    PRELUDE_ERROR_EPROCLIM = PRELUDE_ERROR_SYSTEM_ERROR | 110,
    PRELUDE_ERROR_EPROCUNAVAIL = PRELUDE_ERROR_SYSTEM_ERROR | 111,
    PRELUDE_ERROR_EPROGMISMATCH = PRELUDE_ERROR_SYSTEM_ERROR | 112,
    PRELUDE_ERROR_EPROGUNAVAIL = PRELUDE_ERROR_SYSTEM_ERROR | 113,
    PRELUDE_ERROR_EPROTO = PRELUDE_ERROR_SYSTEM_ERROR | 114,
    PRELUDE_ERROR_EPROTONOSUPPORT = PRELUDE_ERROR_SYSTEM_ERROR | 115,
    PRELUDE_ERROR_EPROTOTYPE = PRELUDE_ERROR_SYSTEM_ERROR | 116,
    PRELUDE_ERROR_ERANGE = PRELUDE_ERROR_SYSTEM_ERROR | 117,
    PRELUDE_ERROR_EREMCHG = PRELUDE_ERROR_SYSTEM_ERROR | 118,
    PRELUDE_ERROR_EREMOTE = PRELUDE_ERROR_SYSTEM_ERROR | 119,
    PRELUDE_ERROR_EREMOTEIO = PRELUDE_ERROR_SYSTEM_ERROR | 120,
    PRELUDE_ERROR_ERESTART = PRELUDE_ERROR_SYSTEM_ERROR | 121,
    PRELUDE_ERROR_EROFS = PRELUDE_ERROR_SYSTEM_ERROR | 122,
    PRELUDE_ERROR_ERPCMISMATCH = PRELUDE_ERROR_SYSTEM_ERROR | 123,
    PRELUDE_ERROR_ESHUTDOWN = PRELUDE_ERROR_SYSTEM_ERROR | 124,
    PRELUDE_ERROR_ESOCKTNOSUPPORT = PRELUDE_ERROR_SYSTEM_ERROR | 125,
    PRELUDE_ERROR_ESPIPE = PRELUDE_ERROR_SYSTEM_ERROR | 126,
    PRELUDE_ERROR_ESRCH = PRELUDE_ERROR_SYSTEM_ERROR | 127,
    PRELUDE_ERROR_ESRMNT = PRELUDE_ERROR_SYSTEM_ERROR | 128,
    PRELUDE_ERROR_ESTALE = PRELUDE_ERROR_SYSTEM_ERROR | 129,
    PRELUDE_ERROR_ESTRPIPE = PRELUDE_ERROR_SYSTEM_ERROR | 130,
    PRELUDE_ERROR_ETIME = PRELUDE_ERROR_SYSTEM_ERROR | 131,
    PRELUDE_ERROR_ETIMEDOUT = PRELUDE_ERROR_SYSTEM_ERROR | 132,
    PRELUDE_ERROR_ETOOMANYREFS = PRELUDE_ERROR_SYSTEM_ERROR | 133,
    PRELUDE_ERROR_ETXTBSY = PRELUDE_ERROR_SYSTEM_ERROR | 134,
    PRELUDE_ERROR_EUCLEAN = PRELUDE_ERROR_SYSTEM_ERROR | 135,
    PRELUDE_ERROR_EUNATCH = PRELUDE_ERROR_SYSTEM_ERROR | 136,
    PRELUDE_ERROR_EUSERS = PRELUDE_ERROR_SYSTEM_ERROR | 137,
    PRELUDE_ERROR_EWOULDBLOCK = PRELUDE_ERROR_SYSTEM_ERROR | 138,
    PRELUDE_ERROR_EXDEV = PRELUDE_ERROR_SYSTEM_ERROR | 139,
    PRELUDE_ERROR_EXFULL = PRELUDE_ERROR_SYSTEM_ERROR | 140,
} prelude_error_code_t;


prelude_error_t

typedef signed int prelude_error_t;


prelude_error_get_code ()

prelude_error_code_t  prelude_error_get_code            (prelude_error_t error);

error :

A prelude_error_t return value.

Returns :

the prelude_code_t code contained within the prelude_error_t integer.

prelude_error_get_source ()

prelude_error_source_t  prelude_error_get_source        (prelude_error_t error);

error :

A prelude_error_t return value.

Returns :

the prelude_source_t source contained within the prelude_error_t integer.

prelude_perror ()

void                prelude_perror                      (prelude_error_t error,
                                                         const char *fmt,
                                                         ...);

Print the error to stderr, or to syslog() in case stderr is unavailable.

error :

A prelude_error_t return value.

fmt :

Format string.

... :

Argument list.

prelude_strerror ()

const char *        prelude_strerror                    (prelude_error_t err);

err :

Returns :


prelude_strsource ()

const char *        prelude_strsource                   (prelude_error_t err);

err :

Returns :


prelude_error_code_from_errno ()

prelude_error_code_t  prelude_error_code_from_errno     (int err);

err :

errno value.

Returns :

the prelude_error_code_t value corresponding to err.

prelude_error_make ()

prelude_error_t     prelude_error_make                  (prelude_error_source_t source,
                                                         prelude_error_code_t code);

Create a new prelude_error_t error using source and code.

source :

Error source.

code :

Error code.

Returns :

The created prelude_error_t integer.

prelude_error_make_from_errno ()

prelude_error_t     prelude_error_make_from_errno       (prelude_error_source_t source,
                                                         int err);

Create a new prelude_error_t error using source and errno.

source :

Error source.

err :

errno value.

Returns :

The created prelude_error_t integer.

prelude_error_verbose_make ()

prelude_error_t     prelude_error_verbose_make          (prelude_error_source_t source,
                                                         prelude_error_code_t code,
                                                         const char *fmt,
                                                         ...);

Create a new error using source and code, using the detailed error message specified within fmt.

source :

Error source.

code :

Error code.

fmt :

Format string.

... :

Argument list.

Returns :

The created prelude_error_t integer.

prelude_error_verbose_make_v ()

prelude_error_t     prelude_error_verbose_make_v        (prelude_error_source_t source,
                                                         prelude_error_code_t code,
                                                         const char *fmt,
                                                         va_list ap);

Create a new error using source and code, using the detailed error message specified within fmt.

source :

Error source.

code :

Error code.

fmt :

Format string.

ap :

Argument list.

Returns :

The created prelude_error_t integer.

prelude_error_code_to_errno ()

int                 prelude_error_code_to_errno         (prelude_error_code_t code);

code :

Error code.

Returns :

the errno value corresponding to code.

prelude_error_is_verbose ()

prelude_bool_t      prelude_error_is_verbose            (prelude_error_t error);

error :

A prelude_error_t return value.

Returns :

PRELUDE_BOOL_TRUE if there is a detailed message for this error, PRELUDE_BOOL_FALSE otherwise.
libprelude-1.0.0/docs/api/html/libprelude.devhelp0000664000076400007640000057064711347714756017001 00000000000000 libprelude-1.0.0/docs/api/html/style.css0000644000076400007640000000460111347714756015127 00000000000000.synopsis, .classsynopsis { background: #eeeeee; border: solid 1px #aaaaaa; padding: 0.5em; } .programlisting { background: #eeeeff; border: solid 1px #aaaaff; padding: 0.5em; } .variablelist { padding: 4px; margin-left: 3em; } .variablelist td:first-child { vertical-align: top; } /* this is needed so that the local anchors are displayed below the naviagtion */ @media screen { sup a.footnote { position: relative; top: 0em ! important; } div.refnamediv a[name], div.refsect1 a[name] { position: relative; top: -4.5em; } table.navigation#top { background: #ffeeee; border: solid 1px #ffaaaa; margin-top: 0; margin-bottom: 0; position: fixed; top: 0; left: 0; height: 2em; z-index: 1; } .navigation a { color: #770000; } .navigation a:visited { color: #550000; } td.shortcuts { color: #770000; font-size: 80%; white-space: nowrap; } div.refentry, div.chapter, div.reference, div.part, div.book, div.glossary, div.sect1, div.appendix, div.preface { position: relative; top: 3em; z-index: 0; } div.glossary, div.index { position: relative; top: 2em; z-index: 0; } div.refnamediv { margin-top: 2em; } body { padding-bottom: 20em; } } @media print { table.navigation { visibility: collapse; display: none; } div.titlepage table.navigation { visibility: visible; display: table; background: #ffeeee; border: solid 1px #ffaaaa; margin-top: 0; margin-bottom: 0; top: 0; left: 0; height: 2em; } } .navigation .title { font-size: 200%; } div.gallery-float { float: left; padding: 10px; } div.gallery-float img { border-style: none; } div.gallery-spacer { clear: both; } a { text-decoration: none; } a:hover { text-decoration: underline; color: #FF0000; } div.table table { border-collapse: collapse; border-spacing: 0px; border-style: solid; border-color: #777777; border-width: 1px; } div.table table td, div.table table th { border-style: solid; border-color: #777777; border-width: 1px; padding: 3px; vertical-align: top; } div.table table th { background-color: #eeeeee; } hr { color: #777777; background: #777777; border: 0; height: 1px; clear: both; } .footer { padding-top: 3.5em; color: #777777; text-align: center; font-size: 80%; } libprelude-1.0.0/docs/api/html/libprelude-prelude-string.html0000664000076400007640000017013111347714757021241 00000000000000 prelude-string

prelude-string

prelude-string

Synopsis

typedef             prelude_string_t;
int                 prelude_string_new                  (prelude_string_t **string);
int                 prelude_string_new_nodup            (prelude_string_t **string,
                                                         char *str);
int                 prelude_string_new_ref              (prelude_string_t **string,
                                                         const char *str);
int                 prelude_string_new_dup              (prelude_string_t **string,
                                                         const char *str);
int                 prelude_string_new_dup_fast         (prelude_string_t **string,
                                                         const char *str,
                                                         size_t len);
void                prelude_string_destroy              (prelude_string_t *string);
void                prelude_string_destroy_internal     (prelude_string_t *string);
int                 prelude_string_new_nodup_fast       (prelude_string_t **string,
                                                         char *str,
                                                         size_t len);
int                 prelude_string_new_ref_fast         (prelude_string_t **string,
                                                         const char *str,
                                                         size_t len);
int                 prelude_string_set_dup_fast         (prelude_string_t *string,
                                                         const char *buf,
                                                         size_t len);
int                 prelude_string_set_dup              (prelude_string_t *string,
                                                         const char *buf);
int                 prelude_string_set_nodup_fast       (prelude_string_t *string,
                                                         char *buf,
                                                         size_t len);
int                 prelude_string_set_nodup            (prelude_string_t *string,
                                                         char *buf);
int                 prelude_string_set_ref_fast         (prelude_string_t *string,
                                                         const char *buf,
                                                         size_t len);
int                 prelude_string_set_ref              (prelude_string_t *string,
                                                         const char *buf);
int                 prelude_string_copy_ref             (const prelude_string_t *src,
                                                         prelude_string_t *dst);
int                 prelude_string_copy_dup             (const prelude_string_t *src,
                                                         prelude_string_t *dst);
prelude_string_t *  prelude_string_ref                  (prelude_string_t *string);
int                 prelude_string_clone                (const prelude_string_t *src,
                                                         prelude_string_t **dst);
size_t              prelude_string_get_len              (const prelude_string_t *string);
const char *        prelude_string_get_string_or_default
                                                        (const prelude_string_t *string,
                                                         const char *def);
const char *        prelude_string_get_string           (const prelude_string_t *string);
int                 prelude_string_get_string_released  (prelude_string_t *string,
                                                         char **outptr);
prelude_bool_t      prelude_string_is_empty             (const prelude_string_t *string);
void                prelude_string_clear                (prelude_string_t *string);
int                 prelude_string_cat                  (prelude_string_t *dst,
                                                         const char *str);
int                 prelude_string_ncat                 (prelude_string_t *dst,
                                                         const char *str,
                                                         size_t len);
int                 prelude_string_sprintf              (prelude_string_t *string,
                                                         const char *fmt,
                                                         ...);
int                 prelude_string_vprintf              (prelude_string_t *string,
                                                         const char *fmt,
                                                         va_list ap);
#define             prelude_string_set_constant         (string, str)
#define             prelude_string_new_constant         (string, str)
int                 prelude_string_compare              (const prelude_string_t *str1,
                                                         const prelude_string_t *str2);

Description

Details

prelude_string_t

typedef struct prelude_string prelude_string_t;


prelude_string_new ()

int                 prelude_string_new                  (prelude_string_t **string);

Create a new prelude_string_t object, and store in in string.

string :

Pointer where to store the created prelude_string_t.

Returns :

0 on success, or a negative value if an error occured.

prelude_string_new_nodup ()

int                 prelude_string_new_nodup            (prelude_string_t **string,
                                                         char *str);

Create a new prelude_string_t object with a reference to str as initial value. str is owned by string and will be freed upon prelude_string_destroy().

string :

Pointer where to store the created prelude_string_t object.

str :

Initial string value.

Returns :

0 on success, a negative value if an error occured.

prelude_string_new_ref ()

int                 prelude_string_new_ref              (prelude_string_t **string,
                                                         const char *str);

Create a new prelude_string_t object with a reference to str as initial value. str won't be freed upon prelude_string_destroy().

string :

Pointer where to store the created prelude_string_t object.

str :

Initial string value.

Returns :

0 on success, a negative value if an error occured.

prelude_string_new_dup ()

int                 prelude_string_new_dup              (prelude_string_t **string,
                                                         const char *str);

Create a new prelude_string_t object with a copy of str as it's initial value. The copy is owned by the string and will be freed upon prelude_string_destroy().

string :

Pointer where to store the created prelude_string_t object.

str :

Initial string value.

Returns :

0 on success, a negative value if an error occured.

prelude_string_new_dup_fast ()

int                 prelude_string_new_dup_fast         (prelude_string_t **string,
                                                         const char *str,
                                                         size_t len);

Create a new prelude_string_t object with a copy of str as it's initial value. The copy is owned by the string and will be freed upon prelude_string_destroy().

string :

Pointer where to store the created prelude_string_t object.

str :

Initial string value.

len :

Lenght of str.

Returns :

0 on success, a negative value if an error occured.

prelude_string_destroy ()

void                prelude_string_destroy              (prelude_string_t *string);

Decrease refcount and destroy string. string content content is destroyed if applicable (dup and nodup, or a referenced string that have been modified.

string :

Pointer to a prelude_string_t object.

prelude_string_destroy_internal ()

void                prelude_string_destroy_internal     (prelude_string_t *string);

string :


prelude_string_new_nodup_fast ()

int                 prelude_string_new_nodup_fast       (prelude_string_t **string,
                                                         char *str,
                                                         size_t len);

Create a new prelude_string_t object with a reference to str as initial value. str is owned by string and will be freed upon prelude_string_destroy().

string :

Pointer where to store the created prelude_string_t object.

str :

Initial string value.

len :

Lenght of str.

Returns :

0 on success, a negative value if an error occured.

prelude_string_new_ref_fast ()

int                 prelude_string_new_ref_fast         (prelude_string_t **string,
                                                         const char *str,
                                                         size_t len);

Create a new prelude_string_t object with a reference to str as initial value. str won't be freed upon prelude_string_destroy().

string :

Pointer where to store the created prelude_string_t object.

str :

Initial string value.

len :

Length of str.

Returns :

0 on success, a negative value if an error occured.

prelude_string_set_dup_fast ()

int                 prelude_string_set_dup_fast         (prelude_string_t *string,
                                                         const char *buf,
                                                         size_t len);

Store a copy of the string pointed by buf in string. The buf copy will be freed upon prelude_string_destroy().

string :

Pointer to a prelude_string_t object.

buf :

String to store in string.

len :

Lenght of buf.

Returns :

0 on success, or a negative value if an error occured.

prelude_string_set_dup ()

int                 prelude_string_set_dup              (prelude_string_t *string,
                                                         const char *buf);

Store a copy of the string pointed by buf in string. The buf copy will be freed upon prelude_string_destroy().

string :

Pointer to a prelude_string_t object.

buf :

String to store in string.

Returns :

0 on success, or a negative value if an error occured.

prelude_string_set_nodup_fast ()

int                 prelude_string_set_nodup_fast       (prelude_string_t *string,
                                                         char *buf,
                                                         size_t len);

Store a reference to the string pointed by buf in string. The referenced buf will be freed upon prelude_string_destroy().

string :

Pointer to a prelude_string_t object.

buf :

String to store in string.

len :

Lenght of buf.

Returns :

0 on success, or a negative value if an error occured.

prelude_string_set_nodup ()

int                 prelude_string_set_nodup            (prelude_string_t *string,
                                                         char *buf);

Store a reference to the string pointed by buf in string. The referenced buf will be freed upon prelude_string_destroy().

string :

Pointer to a prelude_string_t object.

buf :

String to store in string.

Returns :

0 on success, or a negative value if an error occured.

prelude_string_set_ref_fast ()

int                 prelude_string_set_ref_fast         (prelude_string_t *string,
                                                         const char *buf,
                                                         size_t len);

Store a reference to the string pointed by buf in string. The referenced buf value won't be modified or freed.

string :

Pointer to a prelude_string_t object.

buf :

String to store in string.

len :

Lenght of buf.

Returns :

0 on success, or a negative value if an error occured.

prelude_string_set_ref ()

int                 prelude_string_set_ref              (prelude_string_t *string,
                                                         const char *buf);

Store a reference to the string pointed by buf in string. The referenced buf value won't be modified or freed.

string :

Pointer to a prelude_string_t object.

buf :

String to store in string.

Returns :

0 on success, or a negative value if an error occured.

prelude_string_copy_ref ()

int                 prelude_string_copy_ref             (const prelude_string_t *src,
                                                         prelude_string_t *dst);

Reference src content within dst. The referenced content won't be modified or freed.

src :

Pointer to a prelude_string_t object to copy data from.

dst :

Pointer to a prelude_string_t object to copy data to.

Returns :

0 on success, or a negative value if an error occured.

prelude_string_copy_dup ()

int                 prelude_string_copy_dup             (const prelude_string_t *src,
                                                         prelude_string_t *dst);

Copy src content within dst. The content is owned by src and independent of dst.

src :

Pointer to a prelude_string_t object to copy data from.

dst :

Pointer to a prelude_string_t object to copy data to.

Returns :

0 on success, or a negative value if an error occured.

prelude_string_ref ()

prelude_string_t *  prelude_string_ref                  (prelude_string_t *string);

Increase string reference count.

string :

Pointer to a prelude_string_t object to reference.

Returns :

string.

prelude_string_clone ()

int                 prelude_string_clone                (const prelude_string_t *src,
                                                         prelude_string_t **dst);

Clone src within a new prelude_string_t object stored into dst. Data carried by dst and src are independant.

src :

Pointer to an existing prelude_string_t object.

dst :

Pointer to an address where to store the created prelude_string_t object.

Returns :

0 on success, or a negative value if an error occured.

prelude_string_get_len ()

size_t              prelude_string_get_len              (const prelude_string_t *string);

Return the length of the string carried by string object.

string :

Pointer to a prelude_string_t object.

Returns :

The length of the string owned by string.

prelude_string_get_string_or_default ()

const char *        prelude_string_get_string_or_default
                                                        (const prelude_string_t *string,
                                                         const char *def);

Return the string carried on by string object, or def if it is empty. There should be no operation done on the returned string since it is still owned by string.

string :

Pointer to a prelude_string_t object.

def :

Default value to a return in case string is empty.

Returns :

The string owned by string or def.

prelude_string_get_string ()

const char *        prelude_string_get_string           (const prelude_string_t *string);

Return the string carried on by string object. There should be no operation done on the returned string since it is still owned by string.

string :

Pointer to a prelude_string_t object.

Returns :

The string owned by string if any.

prelude_string_get_string_released ()

int                 prelude_string_get_string_released  (prelude_string_t *string,
                                                         char **outptr);

Get string content, and release it so that further operation on string won't modify the returned content.

string :

Pointer to a prelude_string_t object.

outptr :

Pointer to an address where to store the released string.

Returns :

0 on success, or a negative value if an error occured.

prelude_string_is_empty ()

prelude_bool_t      prelude_string_is_empty             (const prelude_string_t *string);

Check whether string is empty.

string :

Pointer to a prelude_string_t object.

Returns :

TRUE if string is empty, FALSE otherwise.

prelude_string_clear ()

void                prelude_string_clear                (prelude_string_t *string);

Reset string content to zero.

string :

Pointer to a prelude_string_t object.

prelude_string_cat ()

int                 prelude_string_cat                  (prelude_string_t *dst,
                                                         const char *str);

The prelude_string_cat() function appends the str string to the dst prelude_string_t object over-writing the `\0' character at the end of dst, and then adds a termi-nating `\0' character.

dst :

Pointer to a prelude_string_t object.

str :

Pointer to a string.

Returns :

len, or a negative value if an error occured.

prelude_string_ncat ()

int                 prelude_string_ncat                 (prelude_string_t *dst,
                                                         const char *str,
                                                         size_t len);

dst :

str :

len :

Returns :


prelude_string_sprintf ()

int                 prelude_string_sprintf              (prelude_string_t *string,
                                                         const char *fmt,
                                                         ...);

Produce output according to fmt, and write output to the given string. See snprintf(3) to learn more about fmt format.

string :

Pointer to a prelude_string_t object.

fmt :

Format string to use.

... :

Variable argument list.

Returns :

The number of characters written, or a negative value if an error occured.

prelude_string_vprintf ()

int                 prelude_string_vprintf              (prelude_string_t *string,
                                                         const char *fmt,
                                                         va_list ap);

Produce output according to fmt, storing argument provided in ap variable argument list, and write the output to the given string. See sprintf(3) for more information on fmt format.

string :

Pointer to a prelude_string_t object.

fmt :

Format string to use.

ap :

Variable argument list.

Returns :

The number of characters written, or a negative value if an error occured.

prelude_string_set_constant()

#define             prelude_string_set_constant(string, str)

string :

str :


prelude_string_new_constant()

#define             prelude_string_new_constant(string, str)

string :

str :


prelude_string_compare ()

int                 prelude_string_compare              (const prelude_string_t *str1,
                                                         const prelude_string_t *str2);

str1 :

Pointer to a prelude_string_t object to compare with str2.

str2 :

Pointer to a prelude_string_t object to compare with str1.

Returns :

0 if str1 and str2 value are equal, a negative value otherwise.
libprelude-1.0.0/docs/api/html/ch03.html0000664000076400007640000000472211347714757014707 00000000000000 Utility functions

Utility functions

idmef-message-print — Dumping an IDMEF message as a string
libprelude-1.0.0/docs/api/libprelude.types0000664000076400007640000000000011347714756015515 00000000000000libprelude-1.0.0/docs/api/libprelude-docs.sgml0000664000076400007640000000471311202225026016231 00000000000000 Prelude library Reference Manual Using libprelude to interoperate with prelude-manager Sending events with libprelude The low level IDMEF API The high level IDMEF API Reading events from the collector Filtering operation on IDMEF messages Utility functions Others libprelude-1.0.0/docs/api/libprelude-sections.txt0000664000076400007640000012475011347714756017040 00000000000000
prelude-error PRELUDE_ERROR_SOURCE_DEFAULT PRELUDE_ERROR_SYSTEM_ERROR prelude_error_source_t prelude_error_code_t prelude_error_t prelude_error_get_code prelude_error_get_source prelude_perror prelude_strerror prelude_strsource prelude_error_code_from_errno prelude_error_make prelude_error_make_from_errno prelude_error_verbose_make prelude_error_verbose_make_v prelude_error_code_to_errno prelude_error_is_verbose
prelude-linked-object PRELUDE_LINKED_OBJECT prelude_linked_object_t prelude_linked_object_get_object
idmef-tree-wrap IDMEF_LIST_APPEND IDMEF_LIST_PREPEND idmef_message_get_data idmef_message_get_number idmef_message_get_string idmef_message_get_value idmef_message_set_data idmef_message_set_number idmef_message_set_string idmef_message_set_value idmef_additional_data_type_t idmef_additional_data_type_to_numeric idmef_additional_data_type_to_string idmef_additional_data_t idmef_additional_data_new idmef_additional_data_copy idmef_additional_data_clone idmef_additional_data_ref idmef_additional_data_destroy idmef_additional_data_get_type idmef_additional_data_set_type idmef_additional_data_new_type idmef_additional_data_get_meaning idmef_additional_data_set_meaning idmef_additional_data_new_meaning idmef_additional_data_get_data idmef_additional_data_set_data idmef_additional_data_new_data idmef_reference_origin_t idmef_reference_origin_to_numeric idmef_reference_origin_to_string idmef_reference_t idmef_reference_new idmef_reference_copy idmef_reference_clone idmef_reference_ref idmef_reference_destroy idmef_reference_get_origin idmef_reference_set_origin idmef_reference_new_origin idmef_reference_get_name idmef_reference_set_name idmef_reference_new_name idmef_reference_get_url idmef_reference_set_url idmef_reference_new_url idmef_reference_get_meaning idmef_reference_set_meaning idmef_reference_new_meaning idmef_classification_t idmef_classification_new idmef_classification_copy idmef_classification_clone idmef_classification_ref idmef_classification_destroy idmef_classification_get_ident idmef_classification_set_ident idmef_classification_new_ident idmef_classification_get_text idmef_classification_set_text idmef_classification_new_text idmef_classification_get_next_reference idmef_classification_set_reference idmef_classification_new_reference idmef_user_id_type_t idmef_user_id_type_to_numeric idmef_user_id_type_to_string idmef_user_id_t idmef_user_id_new idmef_user_id_copy idmef_user_id_clone idmef_user_id_ref idmef_user_id_destroy idmef_user_id_get_ident idmef_user_id_set_ident idmef_user_id_new_ident idmef_user_id_get_type idmef_user_id_set_type idmef_user_id_new_type idmef_user_id_get_tty idmef_user_id_set_tty idmef_user_id_new_tty idmef_user_id_get_name idmef_user_id_set_name idmef_user_id_new_name idmef_user_id_unset_number idmef_user_id_get_number idmef_user_id_set_number idmef_user_id_new_number idmef_user_category_t idmef_user_category_to_numeric idmef_user_category_to_string idmef_user_t idmef_user_new idmef_user_copy idmef_user_clone idmef_user_ref idmef_user_destroy idmef_user_get_ident idmef_user_set_ident idmef_user_new_ident idmef_user_get_category idmef_user_set_category idmef_user_new_category idmef_user_get_next_user_id idmef_user_set_user_id idmef_user_new_user_id idmef_address_category_t idmef_address_category_to_numeric idmef_address_category_to_string idmef_address_t idmef_address_new idmef_address_copy idmef_address_clone idmef_address_ref idmef_address_destroy idmef_address_get_ident idmef_address_set_ident idmef_address_new_ident idmef_address_get_category idmef_address_set_category idmef_address_new_category idmef_address_get_vlan_name idmef_address_set_vlan_name idmef_address_new_vlan_name idmef_address_unset_vlan_num idmef_address_get_vlan_num idmef_address_set_vlan_num idmef_address_new_vlan_num idmef_address_get_address idmef_address_set_address idmef_address_new_address idmef_address_get_netmask idmef_address_set_netmask idmef_address_new_netmask idmef_process_t idmef_process_new idmef_process_copy idmef_process_clone idmef_process_ref idmef_process_destroy idmef_process_get_ident idmef_process_set_ident idmef_process_new_ident idmef_process_get_name idmef_process_set_name idmef_process_new_name idmef_process_unset_pid idmef_process_get_pid idmef_process_set_pid idmef_process_new_pid idmef_process_get_path idmef_process_set_path idmef_process_new_path idmef_process_get_next_arg idmef_process_set_arg idmef_process_new_arg idmef_process_get_next_env idmef_process_set_env idmef_process_new_env idmef_web_service_t idmef_web_service_new idmef_web_service_copy idmef_web_service_clone idmef_web_service_ref idmef_web_service_destroy idmef_web_service_get_url idmef_web_service_set_url idmef_web_service_new_url idmef_web_service_get_cgi idmef_web_service_set_cgi idmef_web_service_new_cgi idmef_web_service_get_http_method idmef_web_service_set_http_method idmef_web_service_new_http_method idmef_web_service_get_next_arg idmef_web_service_set_arg idmef_web_service_new_arg idmef_snmp_service_t idmef_snmp_service_new idmef_snmp_service_copy idmef_snmp_service_clone idmef_snmp_service_ref idmef_snmp_service_destroy idmef_snmp_service_get_oid idmef_snmp_service_set_oid idmef_snmp_service_new_oid idmef_snmp_service_unset_message_processing_model idmef_snmp_service_get_message_processing_model idmef_snmp_service_set_message_processing_model idmef_snmp_service_new_message_processing_model idmef_snmp_service_unset_security_model idmef_snmp_service_get_security_model idmef_snmp_service_set_security_model idmef_snmp_service_new_security_model idmef_snmp_service_get_security_name idmef_snmp_service_set_security_name idmef_snmp_service_new_security_name idmef_snmp_service_unset_security_level idmef_snmp_service_get_security_level idmef_snmp_service_set_security_level idmef_snmp_service_new_security_level idmef_snmp_service_get_context_name idmef_snmp_service_set_context_name idmef_snmp_service_new_context_name idmef_snmp_service_get_context_engine_id idmef_snmp_service_set_context_engine_id idmef_snmp_service_new_context_engine_id idmef_snmp_service_get_command idmef_snmp_service_set_command idmef_snmp_service_new_command idmef_snmp_service_get_community idmef_snmp_service_set_community idmef_snmp_service_new_community idmef_service_type_t idmef_service_type_to_numeric idmef_service_type_to_string idmef_service_t idmef_service_new idmef_service_copy idmef_service_clone idmef_service_ref idmef_service_destroy idmef_service_get_ident idmef_service_set_ident idmef_service_new_ident idmef_service_unset_ip_version idmef_service_get_ip_version idmef_service_set_ip_version idmef_service_new_ip_version idmef_service_unset_iana_protocol_number idmef_service_get_iana_protocol_number idmef_service_set_iana_protocol_number idmef_service_new_iana_protocol_number idmef_service_get_iana_protocol_name idmef_service_set_iana_protocol_name idmef_service_new_iana_protocol_name idmef_service_get_name idmef_service_set_name idmef_service_new_name idmef_service_unset_port idmef_service_get_port idmef_service_set_port idmef_service_new_port idmef_service_get_portlist idmef_service_set_portlist idmef_service_new_portlist idmef_service_get_protocol idmef_service_set_protocol idmef_service_new_protocol idmef_service_get_type idmef_service_get_web_service idmef_service_set_web_service idmef_service_new_web_service idmef_service_get_snmp_service idmef_service_set_snmp_service idmef_service_new_snmp_service idmef_node_category_t idmef_node_category_to_numeric idmef_node_category_to_string idmef_node_t idmef_node_new idmef_node_copy idmef_node_clone idmef_node_ref idmef_node_destroy idmef_node_get_ident idmef_node_set_ident idmef_node_new_ident idmef_node_get_category idmef_node_set_category idmef_node_new_category idmef_node_get_location idmef_node_set_location idmef_node_new_location idmef_node_get_name idmef_node_set_name idmef_node_new_name idmef_node_get_next_address idmef_node_set_address idmef_node_new_address idmef_source_spoofed_t idmef_source_spoofed_to_numeric idmef_source_spoofed_to_string idmef_source_t idmef_source_new idmef_source_copy idmef_source_clone idmef_source_ref idmef_source_destroy idmef_source_get_ident idmef_source_set_ident idmef_source_new_ident idmef_source_get_spoofed idmef_source_set_spoofed idmef_source_new_spoofed idmef_source_get_interface idmef_source_set_interface idmef_source_new_interface idmef_source_get_node idmef_source_set_node idmef_source_new_node idmef_source_get_user idmef_source_set_user idmef_source_new_user idmef_source_get_process idmef_source_set_process idmef_source_new_process idmef_source_get_service idmef_source_set_service idmef_source_new_service idmef_file_access_t idmef_file_access_new idmef_file_access_copy idmef_file_access_clone idmef_file_access_ref idmef_file_access_destroy idmef_file_access_get_user_id idmef_file_access_set_user_id idmef_file_access_new_user_id idmef_file_access_get_next_permission idmef_file_access_set_permission idmef_file_access_new_permission idmef_inode_t idmef_inode_new idmef_inode_copy idmef_inode_clone idmef_inode_ref idmef_inode_destroy idmef_inode_get_change_time idmef_inode_set_change_time idmef_inode_new_change_time idmef_inode_unset_number idmef_inode_get_number idmef_inode_set_number idmef_inode_new_number idmef_inode_unset_major_device idmef_inode_get_major_device idmef_inode_set_major_device idmef_inode_new_major_device idmef_inode_unset_minor_device idmef_inode_get_minor_device idmef_inode_set_minor_device idmef_inode_new_minor_device idmef_inode_unset_c_major_device idmef_inode_get_c_major_device idmef_inode_set_c_major_device idmef_inode_new_c_major_device idmef_inode_unset_c_minor_device idmef_inode_get_c_minor_device idmef_inode_set_c_minor_device idmef_inode_new_c_minor_device idmef_linkage_t idmef_checksum_algorithm_t idmef_checksum_algorithm_to_numeric idmef_checksum_algorithm_to_string idmef_checksum_t idmef_checksum_new idmef_checksum_copy idmef_checksum_clone idmef_checksum_ref idmef_checksum_destroy idmef_checksum_get_value idmef_checksum_set_value idmef_checksum_new_value idmef_checksum_get_key idmef_checksum_set_key idmef_checksum_new_key idmef_checksum_get_algorithm idmef_checksum_set_algorithm idmef_checksum_new_algorithm idmef_file_category_t idmef_file_category_to_numeric idmef_file_category_to_string idmef_file_fstype_t idmef_file_fstype_to_numeric idmef_file_fstype_to_string idmef_file_t idmef_file_new idmef_file_copy idmef_file_clone idmef_file_ref idmef_file_destroy idmef_file_get_ident idmef_file_set_ident idmef_file_new_ident idmef_file_get_name idmef_file_set_name idmef_file_new_name idmef_file_get_path idmef_file_set_path idmef_file_new_path idmef_file_get_create_time idmef_file_set_create_time idmef_file_new_create_time idmef_file_get_modify_time idmef_file_set_modify_time idmef_file_new_modify_time idmef_file_get_access_time idmef_file_set_access_time idmef_file_new_access_time idmef_file_unset_data_size idmef_file_get_data_size idmef_file_set_data_size idmef_file_new_data_size idmef_file_unset_disk_size idmef_file_get_disk_size idmef_file_set_disk_size idmef_file_new_disk_size idmef_file_get_next_file_access idmef_file_set_file_access idmef_file_new_file_access idmef_file_get_next_linkage idmef_file_set_linkage idmef_file_new_linkage idmef_file_get_inode idmef_file_set_inode idmef_file_new_inode idmef_file_get_next_checksum idmef_file_set_checksum idmef_file_new_checksum idmef_file_get_category idmef_file_set_category idmef_file_new_category idmef_file_unset_fstype idmef_file_get_fstype idmef_file_set_fstype idmef_file_new_fstype idmef_file_get_file_type idmef_file_set_file_type idmef_file_new_file_type idmef_linkage_category_t idmef_linkage_category_to_numeric idmef_linkage_category_to_string idmef_linkage_new idmef_linkage_copy idmef_linkage_clone idmef_linkage_ref idmef_linkage_destroy idmef_linkage_get_category idmef_linkage_set_category idmef_linkage_new_category idmef_linkage_get_name idmef_linkage_set_name idmef_linkage_new_name idmef_linkage_get_path idmef_linkage_set_path idmef_linkage_new_path idmef_linkage_get_file idmef_linkage_set_file idmef_linkage_new_file idmef_target_decoy_t idmef_target_decoy_to_numeric idmef_target_decoy_to_string idmef_target_t idmef_target_new idmef_target_copy idmef_target_clone idmef_target_ref idmef_target_destroy idmef_target_get_ident idmef_target_set_ident idmef_target_new_ident idmef_target_get_decoy idmef_target_set_decoy idmef_target_new_decoy idmef_target_get_interface idmef_target_set_interface idmef_target_new_interface idmef_target_get_node idmef_target_set_node idmef_target_new_node idmef_target_get_user idmef_target_set_user idmef_target_new_user idmef_target_get_process idmef_target_set_process idmef_target_new_process idmef_target_get_service idmef_target_set_service idmef_target_new_service idmef_target_get_next_file idmef_target_set_file idmef_target_new_file idmef_analyzer_t idmef_analyzer_new idmef_analyzer_copy idmef_analyzer_clone idmef_analyzer_ref idmef_analyzer_destroy idmef_analyzer_get_analyzerid idmef_analyzer_set_analyzerid idmef_analyzer_new_analyzerid idmef_analyzer_get_name idmef_analyzer_set_name idmef_analyzer_new_name idmef_analyzer_get_manufacturer idmef_analyzer_set_manufacturer idmef_analyzer_new_manufacturer idmef_analyzer_get_model idmef_analyzer_set_model idmef_analyzer_new_model idmef_analyzer_get_version idmef_analyzer_set_version idmef_analyzer_new_version idmef_analyzer_get_class idmef_analyzer_set_class idmef_analyzer_new_class idmef_analyzer_get_ostype idmef_analyzer_set_ostype idmef_analyzer_new_ostype idmef_analyzer_get_osversion idmef_analyzer_set_osversion idmef_analyzer_new_osversion idmef_analyzer_get_node idmef_analyzer_set_node idmef_analyzer_new_node idmef_analyzer_get_process idmef_analyzer_set_process idmef_analyzer_new_process idmef_alertident_t idmef_alertident_new idmef_alertident_copy idmef_alertident_clone idmef_alertident_ref idmef_alertident_destroy idmef_alertident_get_alertident idmef_alertident_set_alertident idmef_alertident_new_alertident idmef_alertident_get_analyzerid idmef_alertident_set_analyzerid idmef_alertident_new_analyzerid idmef_impact_severity_t idmef_impact_severity_to_numeric idmef_impact_severity_to_string idmef_impact_completion_t idmef_impact_completion_to_numeric idmef_impact_completion_to_string idmef_impact_type_t idmef_impact_type_to_numeric idmef_impact_type_to_string idmef_impact_t idmef_impact_new idmef_impact_copy idmef_impact_clone idmef_impact_ref idmef_impact_destroy idmef_impact_unset_severity idmef_impact_get_severity idmef_impact_set_severity idmef_impact_new_severity idmef_impact_unset_completion idmef_impact_get_completion idmef_impact_set_completion idmef_impact_new_completion idmef_impact_get_type idmef_impact_set_type idmef_impact_new_type idmef_impact_get_description idmef_impact_set_description idmef_impact_new_description idmef_action_category_t idmef_action_category_to_numeric idmef_action_category_to_string idmef_action_t idmef_action_new idmef_action_copy idmef_action_clone idmef_action_ref idmef_action_destroy idmef_action_get_category idmef_action_set_category idmef_action_new_category idmef_action_get_description idmef_action_set_description idmef_action_new_description idmef_confidence_rating_t idmef_confidence_rating_to_numeric idmef_confidence_rating_to_string idmef_confidence_t idmef_confidence_new idmef_confidence_copy idmef_confidence_clone idmef_confidence_ref idmef_confidence_destroy idmef_confidence_get_rating idmef_confidence_set_rating idmef_confidence_new_rating idmef_confidence_get_confidence idmef_confidence_set_confidence idmef_confidence_new_confidence idmef_assessment_t idmef_assessment_new idmef_assessment_copy idmef_assessment_clone idmef_assessment_ref idmef_assessment_destroy idmef_assessment_get_impact idmef_assessment_set_impact idmef_assessment_new_impact idmef_assessment_get_next_action idmef_assessment_set_action idmef_assessment_new_action idmef_assessment_get_confidence idmef_assessment_set_confidence idmef_assessment_new_confidence idmef_tool_alert_t idmef_tool_alert_new idmef_tool_alert_copy idmef_tool_alert_clone idmef_tool_alert_ref idmef_tool_alert_destroy idmef_tool_alert_get_name idmef_tool_alert_set_name idmef_tool_alert_new_name idmef_tool_alert_get_command idmef_tool_alert_set_command idmef_tool_alert_new_command idmef_tool_alert_get_next_alertident idmef_tool_alert_set_alertident idmef_tool_alert_new_alertident idmef_correlation_alert_t idmef_correlation_alert_new idmef_correlation_alert_copy idmef_correlation_alert_clone idmef_correlation_alert_ref idmef_correlation_alert_destroy idmef_correlation_alert_get_name idmef_correlation_alert_set_name idmef_correlation_alert_new_name idmef_correlation_alert_get_next_alertident idmef_correlation_alert_set_alertident idmef_correlation_alert_new_alertident idmef_overflow_alert_t idmef_overflow_alert_new idmef_overflow_alert_copy idmef_overflow_alert_clone idmef_overflow_alert_ref idmef_overflow_alert_destroy idmef_overflow_alert_get_program idmef_overflow_alert_set_program idmef_overflow_alert_new_program idmef_overflow_alert_unset_size idmef_overflow_alert_get_size idmef_overflow_alert_set_size idmef_overflow_alert_new_size idmef_overflow_alert_get_buffer idmef_overflow_alert_set_buffer idmef_overflow_alert_new_buffer idmef_alert_type_t idmef_alert_type_to_numeric idmef_alert_type_to_string idmef_alert_t idmef_alert_new idmef_alert_copy idmef_alert_clone idmef_alert_ref idmef_alert_destroy idmef_alert_get_messageid idmef_alert_set_messageid idmef_alert_new_messageid idmef_alert_get_next_analyzer idmef_alert_set_analyzer idmef_alert_new_analyzer idmef_alert_get_create_time idmef_alert_set_create_time idmef_alert_new_create_time idmef_alert_get_classification idmef_alert_set_classification idmef_alert_new_classification idmef_alert_get_detect_time idmef_alert_set_detect_time idmef_alert_new_detect_time idmef_alert_get_analyzer_time idmef_alert_set_analyzer_time idmef_alert_new_analyzer_time idmef_alert_get_next_source idmef_alert_set_source idmef_alert_new_source idmef_alert_get_next_target idmef_alert_set_target idmef_alert_new_target idmef_alert_get_assessment idmef_alert_set_assessment idmef_alert_new_assessment idmef_alert_get_next_additional_data idmef_alert_set_additional_data idmef_alert_new_additional_data idmef_alert_get_type idmef_alert_get_tool_alert idmef_alert_set_tool_alert idmef_alert_new_tool_alert idmef_alert_get_correlation_alert idmef_alert_set_correlation_alert idmef_alert_new_correlation_alert idmef_alert_get_overflow_alert idmef_alert_set_overflow_alert idmef_alert_new_overflow_alert idmef_heartbeat_t idmef_heartbeat_new idmef_heartbeat_copy idmef_heartbeat_clone idmef_heartbeat_ref idmef_heartbeat_destroy idmef_heartbeat_get_messageid idmef_heartbeat_set_messageid idmef_heartbeat_new_messageid idmef_heartbeat_get_next_analyzer idmef_heartbeat_set_analyzer idmef_heartbeat_new_analyzer idmef_heartbeat_get_create_time idmef_heartbeat_set_create_time idmef_heartbeat_new_create_time idmef_heartbeat_get_analyzer_time idmef_heartbeat_set_analyzer_time idmef_heartbeat_new_analyzer_time idmef_heartbeat_unset_heartbeat_interval idmef_heartbeat_get_heartbeat_interval idmef_heartbeat_set_heartbeat_interval idmef_heartbeat_new_heartbeat_interval idmef_heartbeat_get_next_additional_data idmef_heartbeat_set_additional_data idmef_heartbeat_new_additional_data idmef_message_type_t idmef_message_type_to_numeric idmef_message_type_to_string idmef_message_t idmef_message_new idmef_message_copy idmef_message_clone idmef_message_ref idmef_message_destroy idmef_message_get_version idmef_message_set_version idmef_message_new_version idmef_message_get_type idmef_message_get_alert idmef_message_set_alert idmef_message_new_alert idmef_message_get_heartbeat idmef_message_set_heartbeat idmef_message_new_heartbeat idmef_message_set_pmsg idmef_message_get_pmsg idmef_action_compare idmef_additional_data_compare idmef_address_compare idmef_alert_compare idmef_alertident_compare idmef_analyzer_compare idmef_assessment_compare idmef_checksum_compare idmef_classification_compare idmef_confidence_compare idmef_correlation_alert_compare idmef_data_compare idmef_file_access_compare idmef_file_compare idmef_heartbeat_compare idmef_impact_compare idmef_inode_compare idmef_linkage_compare idmef_message_compare idmef_node_compare idmef_overflow_alert_compare idmef_process_compare idmef_reference_compare idmef_service_compare idmef_snmp_service_compare idmef_source_compare idmef_target_compare idmef_time_compare idmef_tool_alert_compare idmef_user_compare idmef_user_id_compare idmef_web_service_compare IDMEF_CLASS_ID_ADDITIONAL_DATA_TYPE IDMEF_CLASS_ID_ADDITIONAL_DATA IDMEF_CLASS_ID_REFERENCE_ORIGIN IDMEF_CLASS_ID_REFERENCE IDMEF_CLASS_ID_CLASSIFICATION IDMEF_CLASS_ID_USER_ID_TYPE IDMEF_CLASS_ID_USER_ID IDMEF_CLASS_ID_USER_CATEGORY IDMEF_CLASS_ID_USER IDMEF_CLASS_ID_ADDRESS_CATEGORY IDMEF_CLASS_ID_ADDRESS IDMEF_CLASS_ID_PROCESS IDMEF_CLASS_ID_WEB_SERVICE IDMEF_CLASS_ID_SNMP_SERVICE IDMEF_CLASS_ID_SERVICE_TYPE IDMEF_CLASS_ID_SERVICE IDMEF_CLASS_ID_NODE_CATEGORY IDMEF_CLASS_ID_NODE IDMEF_CLASS_ID_SOURCE_SPOOFED IDMEF_CLASS_ID_SOURCE IDMEF_CLASS_ID_FILE_ACCESS IDMEF_CLASS_ID_INODE IDMEF_CLASS_ID_CHECKSUM_ALGORITHM IDMEF_CLASS_ID_CHECKSUM IDMEF_CLASS_ID_FILE_CATEGORY IDMEF_CLASS_ID_FILE_FSTYPE IDMEF_CLASS_ID_FILE IDMEF_CLASS_ID_LINKAGE_CATEGORY IDMEF_CLASS_ID_LINKAGE IDMEF_CLASS_ID_TARGET_DECOY IDMEF_CLASS_ID_TARGET IDMEF_CLASS_ID_ANALYZER IDMEF_CLASS_ID_ALERTIDENT IDMEF_CLASS_ID_IMPACT_SEVERITY IDMEF_CLASS_ID_IMPACT_COMPLETION IDMEF_CLASS_ID_IMPACT_TYPE IDMEF_CLASS_ID_IMPACT IDMEF_CLASS_ID_ACTION_CATEGORY IDMEF_CLASS_ID_ACTION IDMEF_CLASS_ID_CONFIDENCE_RATING IDMEF_CLASS_ID_CONFIDENCE IDMEF_CLASS_ID_ASSESSMENT IDMEF_CLASS_ID_TOOL_ALERT IDMEF_CLASS_ID_CORRELATION_ALERT IDMEF_CLASS_ID_OVERFLOW_ALERT IDMEF_CLASS_ID_ALERT_TYPE IDMEF_CLASS_ID_ALERT IDMEF_CLASS_ID_HEARTBEAT IDMEF_CLASS_ID_MESSAGE_TYPE IDMEF_CLASS_ID_MESSAGE
prelude-io prelude_io_t prelude_io_new prelude_io_destroy prelude_io_set_file_io prelude_io_set_tls_io prelude_io_set_sys_io prelude_io_set_buffer_io prelude_io_set_fdptr prelude_io_set_pending_callback prelude_io_set_read_callback prelude_io_set_write_callback prelude_io_close prelude_io_read prelude_io_read_wait prelude_io_read_delimited prelude_io_write prelude_io_write_delimited prelude_io_forward prelude_io_get_fd prelude_io_get_fdptr prelude_io_pending prelude_io_is_error_fatal
prelude-log prelude_log_t prelude_log_flags_t prelude_log prelude_log_debug prelude_log_v prelude_log_debug_v prelude_log_set_level prelude_log_set_debug_level prelude_log_get_flags prelude_log_set_flags prelude_log_get_prefix prelude_log_set_prefix prelude_log_set_callback prelude_log_set_logfile
prelude-msg prelude_msg_t prelude_msg_priority_t prelude_msg_read prelude_msg_forward prelude_msg_get prelude_msg_recycle prelude_msg_mark_end prelude_msg_dynamic_new prelude_msg_new prelude_msg_set prelude_msg_write prelude_msg_set_tag prelude_msg_set_priority prelude_msg_get_tag prelude_msg_get_priority prelude_msg_get_len prelude_msg_get_datalen prelude_msg_destroy prelude_msg_get_time prelude_msg_is_empty prelude_msg_is_fragment prelude_msg_ref prelude_msg_set_callback prelude_msg_set_data prelude_msg_get_message_data
prelude-option prelude_option_type_t prelude_option_input_type_t prelude_option_t prelude_option_context_t prelude_option_destroy_callback_t prelude_option_commit_callback_t prelude_option_get_callback_t prelude_option_set_callback_t prelude_option_argument_t prelude_option_priority_t prelude_option_warning_t prelude_option_set_priority prelude_option_print prelude_option_wide_send_msg prelude_option_destroy prelude_option_read prelude_option_add prelude_option_set_type prelude_option_get_type prelude_option_set_warnings prelude_option_get_shortname prelude_option_get_longname prelude_option_set_data prelude_option_get_data prelude_option_context_get_data prelude_option_context_set_data prelude_option_invoke_commit prelude_option_invoke_set prelude_option_invoke_get prelude_option_invoke_destroy prelude_option_new_root prelude_option_new prelude_option_set_longopt prelude_option_get_longopt prelude_option_set_description prelude_option_get_description prelude_option_set_has_arg prelude_option_get_has_arg prelude_option_set_value prelude_option_get_value prelude_option_set_help prelude_option_get_help prelude_option_set_input_validation_regex prelude_option_get_input_validation_regex prelude_option_set_input_type prelude_option_get_input_type prelude_option_get_optlist prelude_option_get_next prelude_option_has_optlist prelude_option_get_parent prelude_option_set_destroy_callback prelude_option_get_destroy_callback prelude_option_set_set_callback prelude_option_get_set_callback prelude_option_set_get_callback prelude_option_get_get_callback prelude_option_set_commit_callback prelude_option_get_commit_callback prelude_option_set_default_context prelude_option_new_context prelude_option_context_destroy prelude_option_search prelude_option_search_context
prelude-connection prelude_connection_permission_t prelude_connection_state_t prelude_connection_t prelude_connection_destroy prelude_connection_send prelude_connection_recv prelude_connection_recv_idmef prelude_connection_connect prelude_connection_forward prelude_connection_get_local_addr prelude_connection_get_local_port prelude_connection_get_peer_addr prelude_connection_get_peer_port prelude_connection_is_alive prelude_connection_get_fd prelude_connection_close prelude_connection_set_fd_ref prelude_connection_set_fd_nodup prelude_connection_set_state prelude_connection_get_state prelude_connection_set_data prelude_connection_get_data prelude_connection_get_default_socket_filename prelude_connection_get_permission prelude_connection_get_peer_analyzerid prelude_connection_set_peer_analyzerid prelude_connection_new prelude_connection_ref prelude_connection_new_msgbuf prelude_connection_permission_to_string prelude_connection_permission_new_from_string
prelude-string prelude_string_t prelude_string_new prelude_string_new_nodup prelude_string_new_ref prelude_string_new_dup prelude_string_new_dup_fast prelude_string_destroy prelude_string_destroy_internal prelude_string_new_nodup_fast prelude_string_new_ref_fast prelude_string_set_dup_fast prelude_string_set_dup prelude_string_set_nodup_fast prelude_string_set_nodup prelude_string_set_ref_fast prelude_string_set_ref prelude_string_copy_ref prelude_string_copy_dup prelude_string_ref prelude_string_clone prelude_string_get_len prelude_string_get_string_or_default prelude_string_get_string prelude_string_get_string_released prelude_string_is_empty prelude_string_clear prelude_string_cat prelude_string_ncat prelude_string_sprintf prelude_string_vprintf prelude_string_set_constant prelude_string_new_constant prelude_string_compare
idmef-message-print idmef_additional_data_print idmef_reference_print idmef_classification_print idmef_user_id_print idmef_user_print idmef_address_print idmef_process_print idmef_web_service_print idmef_snmp_service_print idmef_service_print idmef_node_print idmef_source_print idmef_file_access_print idmef_inode_print idmef_checksum_print idmef_file_print idmef_linkage_print idmef_target_print idmef_analyzer_print idmef_alertident_print idmef_impact_print idmef_action_print idmef_confidence_print idmef_assessment_print idmef_tool_alert_print idmef_correlation_alert_print idmef_overflow_alert_print idmef_alert_print idmef_heartbeat_print idmef_message_print
prelude-msgbuf prelude_msgbuf_t prelude_msgbuf_flags_t prelude_msgbuf_new prelude_msgbuf_destroy prelude_msgbuf_mark_end prelude_msgbuf_set prelude_msgbuf_get_msg prelude_msgbuf_set_callback prelude_msgbuf_set_data prelude_msgbuf_get_data prelude_msgbuf_set_flags prelude_msgbuf_get_flags
idmef-message-write idmef_additional_data_write idmef_reference_write idmef_classification_write idmef_user_id_write idmef_user_write idmef_address_write idmef_process_write idmef_web_service_write idmef_snmp_service_write idmef_service_write idmef_node_write idmef_source_write idmef_file_access_write idmef_inode_write idmef_checksum_write idmef_file_write idmef_linkage_write idmef_target_write idmef_analyzer_write idmef_alertident_write idmef_impact_write idmef_action_write idmef_confidence_write idmef_assessment_write idmef_tool_alert_write idmef_correlation_alert_write idmef_overflow_alert_write idmef_alert_write idmef_heartbeat_write idmef_message_write
prelude-ident prelude_ident_t prelude_ident_inc prelude_ident_generate prelude_ident_destroy prelude_ident_new
prelude-client prelude_client_exit_status_t prelude_client_flags_t prelude_client_t prelude_client_get_unique_ident prelude_client_set_connection_pool prelude_client_get_connection_pool prelude_client_start prelude_client_init prelude_client_new prelude_client_ref prelude_client_get_analyzer prelude_client_get_flags prelude_client_set_required_permission prelude_client_get_required_permission prelude_client_send_msg prelude_client_recv_msg prelude_client_set_heartbeat_cb prelude_client_send_idmef prelude_client_recv_idmef prelude_client_destroy prelude_client_set_flags prelude_client_set_config_filename prelude_client_get_config_filename prelude_client_is_setup_needed prelude_client_get_profile prelude_client_new_msgbuf prelude_client_handle_msg_default prelude_client_get_setup_error prelude_client_print_setup_error
prelude-client-profile prelude_gid_t prelude_uid_t prelude_client_profile_t prelude_client_profile_new prelude_client_profile_ref prelude_client_profile_destroy prelude_client_profile_get_config_filename prelude_client_profile_get_analyzerid_filename prelude_client_profile_get_tls_key_filename prelude_client_profile_get_tls_server_ca_cert_filename prelude_client_profile_get_tls_server_keycert_filename prelude_client_profile_get_tls_server_crl_filename prelude_client_profile_get_tls_client_keycert_filename prelude_client_profile_get_tls_client_trusted_cert_filename prelude_client_profile_get_backup_dirname prelude_client_profile_get_profile_dirname prelude_client_profile_get_default_config_dirname prelude_client_profile_set_prefix prelude_client_profile_get_prefix prelude_client_profile_set_uid prelude_client_profile_get_uid prelude_client_profile_set_gid prelude_client_profile_get_gid prelude_client_profile_set_name prelude_client_profile_get_name prelude_client_profile_get_analyzerid prelude_client_profile_set_analyzerid prelude_client_profile_get_credentials
prelude-plugin lt_preloaded_symbols PRELUDE_PLUGIN_API_VERSION prelude_plugin_entry_t prelude_plugin_instance_t PRELUDE_PLUGIN_GENERIC prelude_plugin_generic_t PRELUDE_PLUGIN_SET_PRELOADED_SYMBOLS PRELUDE_PLUGIN_OPTION_DECLARE_STRING_CB prelude_plugin_get_name prelude_plugin_set_name prelude_plugin_set_destroy_func prelude_plugin_entry_set_plugin prelude_plugin_set_activation_option prelude_plugin_instance_subscribe prelude_plugin_instance_unsubscribe prelude_plugin_new_instance prelude_plugin_search_by_name prelude_plugin_search_instance_by_name prelude_plugin_instance_set_data prelude_plugin_instance_get_data prelude_plugin_instance_set_plugin_data prelude_plugin_instance_get_plugin_data prelude_plugin_instance_get_name prelude_plugin_instance_get_plugin prelude_plugin_load_from_dir prelude_plugin_instance_add prelude_plugin_instance_del prelude_plugin_instance_compute_time prelude_plugin_instance_call_commit_func prelude_plugin_instance_has_commit_func prelude_plugin_set_preloaded_symbols prelude_plugin_get_next prelude_plugin_unload prelude_plugin_compute_stats prelude_plugin_run
prelude-hash prelude_hash_t prelude_hash_new prelude_hash_new2 prelude_hash_destroy prelude_hash_set prelude_hash_get prelude_hash_elem_destroy prelude_hash_iterate
prelude-failover prelude_failover_t prelude_failover_destroy prelude_failover_new prelude_failover_set_quota prelude_failover_save_msg prelude_failover_get_saved_msg prelude_failover_get_deleted_msg_count prelude_failover_get_available_msg_count prelude_failover_commit prelude_failover_disable_transaction prelude_failover_enable_transaction prelude_failover_rollback
prelude-connection-pool prelude_connection_pool_flags_t prelude_connection_pool_event_t prelude_connection_pool_t prelude_connection_pool_broadcast prelude_connection_pool_broadcast_async prelude_connection_pool_init prelude_connection_pool_new prelude_connection_pool_ref prelude_connection_pool_get_connection_list prelude_connection_pool_add_connection prelude_connection_pool_del_connection prelude_connection_pool_set_connection_dead prelude_connection_pool_set_connection_alive prelude_connection_pool_set_connection_string prelude_connection_pool_get_connection_string prelude_connection_pool_destroy prelude_connection_pool_get_flags prelude_connection_pool_set_flags prelude_connection_pool_set_required_permission prelude_connection_pool_set_data prelude_connection_pool_get_data prelude_connection_pool_recv prelude_connection_pool_check_event prelude_connection_pool_set_global_event_handler prelude_connection_pool_set_event_handler
prelude-async prelude_async_flags_t prelude_async_callback_t PRELUDE_ASYNC_OBJECT prelude_async_object_t prelude_async_init prelude_async_get_flags prelude_async_set_flags prelude_async_add prelude_async_del prelude_async_exit
idmef-message-read idmef_additional_data_read idmef_reference_read idmef_classification_read idmef_user_id_read idmef_user_read idmef_address_read idmef_process_read idmef_web_service_read idmef_snmp_service_read idmef_service_read idmef_node_read idmef_source_read idmef_file_access_read idmef_inode_read idmef_checksum_read idmef_file_read idmef_linkage_read idmef_target_read idmef_analyzer_read idmef_alertident_read idmef_impact_read idmef_action_read idmef_confidence_read idmef_assessment_read idmef_tool_alert_read idmef_correlation_alert_read idmef_overflow_alert_read idmef_alert_read idmef_heartbeat_read idmef_message_read
prelude-list PRELUDE_LIST prelude_list_t prelude_list_entry prelude_list_for_each prelude_list_for_each_safe prelude_list_for_each_reversed prelude_list_for_each_reversed_safe prelude_list_for_each_continue prelude_list_for_each_continue_safe prelude_list_get_next prelude_list_get_next_safe
prelude-inttypes PRELUDE_INT8_MIN PRELUDE_INT16_MIN PRELUDE_INT32_MIN PRELUDE_INT64_MIN PRELUDE_INT8_MAX PRELUDE_INT16_MAX PRELUDE_INT32_MAX PRELUDE_INT64_MAX PRELUDE_UINT8_MAX PRELUDE_UINT16_MAX PRELUDE_UINT32_MAX PRELUDE_UINT64_MAX PRELUDE_INTMAX_MIN PRELUDE_INTMAX_MAX PRELUDE_UINTMAX_MAX PRELUDE_PRId64 PRELUDE_PRIi64 PRELUDE_PRIo64 PRELUDE_PRIx64 PRELUDE_PRIX64 PRELUDE_PRIu64 PRELUDE_PRId32 PRELUDE_PRIi32 PRELUDE_PRIo32 PRELUDE_PRIx32 PRELUDE_PRIX32 PRELUDE_PRIu32 PRELUDE_PRId16 PRELUDE_PRIi16 PRELUDE_PRIo16 PRELUDE_PRIx16 PRELUDE_PRIX16 PRELUDE_PRIu16 PRELUDE_PRId8 PRELUDE_PRIi8 PRELUDE_PRIo8 PRELUDE_PRIx8 PRELUDE_PRIX8 PRELUDE_PRIu8 PRELUDE_SCNd64 PRELUDE_SCNi64 PRELUDE_SCNo64 PRELUDE_SCNx64 PRELUDE_SCNu64 prelude_bool_t int8_t uint8_t int16_t uint16_t int32_t uint32_t int64_t uint64_t
prelude LIBPRELUDE_VERSION prelude_init prelude_deinit prelude_check_version prelude_thread_init prelude_fork_child prelude_fork_parent prelude_fork_prepare
prelude-option-wide PRELUDE_OPTION_REPLY_TYPE_SET PRELUDE_OPTION_REPLY_TYPE_GET PRELUDE_OPTION_REPLY_TYPE_LIST PRELUDE_OPTION_REPLY_TYPE_ERROR prelude_option_push_request prelude_option_new_request prelude_option_process_request prelude_option_recv_reply
idmef-criteria idmef_criterion_operator_t idmef_criteria_t idmef_criterion_t idmef_criterion_operator_to_string idmef_criterion_new idmef_criterion_destroy idmef_criterion_clone idmef_criterion_print idmef_criterion_to_string idmef_criterion_get_path idmef_criterion_get_value idmef_criterion_get_operator idmef_criterion_match idmef_criteria_new idmef_criteria_ref idmef_criteria_destroy idmef_criteria_clone idmef_criteria_print idmef_criteria_to_string idmef_criteria_is_criterion idmef_criteria_get_criterion idmef_criteria_set_criterion idmef_criteria_or_criteria idmef_criteria_and_criteria idmef_criteria_match idmef_criteria_get_or idmef_criteria_get_and idmef_criteria_new_from_string idmef_criteria_get_negation idmef_criteria_set_negation
idmef-data idmef_data_type_t data idmef_data_new idmef_data_ref idmef_data_new_char idmef_data_new_byte idmef_data_new_uint32 idmef_data_new_uint64 idmef_data_new_float idmef_data_set_char idmef_data_set_byte idmef_data_set_uint32 idmef_data_set_uint64 idmef_data_set_float idmef_data_set_ptr_dup_fast idmef_data_set_ptr_ref_fast idmef_data_set_ptr_nodup_fast idmef_data_new_ptr_dup_fast idmef_data_new_ptr_ref_fast idmef_data_new_ptr_nodup_fast idmef_data_set_char_string_dup_fast idmef_data_new_char_string_dup_fast idmef_data_new_char_string_ref_fast idmef_data_new_char_string_nodup_fast idmef_data_set_char_string_ref_fast idmef_data_set_char_string_nodup_fast idmef_data_new_char_string_ref idmef_data_new_char_string_dup idmef_data_new_char_string_nodup idmef_data_set_char_string_ref idmef_data_set_char_string_dup idmef_data_set_char_string_nodup idmef_data_set_char_string_constant idmef_data_new_byte_string_ref idmef_data_new_byte_string_dup idmef_data_new_byte_string_nodup idmef_data_set_byte_string_ref idmef_data_set_byte_string_dup idmef_data_set_byte_string_nodup idmef_data_destroy idmef_data_copy_ref idmef_data_copy_dup idmef_data_clone idmef_data_get_type idmef_data_get_len idmef_data_get_data idmef_data_get_char idmef_data_get_byte idmef_data_get_uint32 idmef_data_get_uint64 idmef_data_get_float idmef_data_get_char_string idmef_data_get_byte_string idmef_data_is_empty idmef_data_to_string idmef_data_destroy_internal
idmef-criterion-value idmef_criterion_value_t idmef_criterion_value_type_t idmef_criterion_value_new idmef_criterion_value_new_regex idmef_criterion_value_new_value idmef_criterion_value_new_from_string idmef_criterion_value_new_broken_down_time idmef_criterion_value_clone idmef_criterion_value_destroy idmef_criterion_value_print idmef_criterion_value_to_string idmef_criterion_value_match idmef_criterion_value_get_value idmef_criterion_value_get_regex idmef_criterion_value_get_broken_down_time idmef_criterion_value_get_type
idmef-path idmef_path_t idmef_path_get idmef_path_set idmef_path_new idmef_path_new_v idmef_path_new_fast idmef_path_get_class idmef_path_get_value_type idmef_path_set_index idmef_path_undefine_index idmef_path_get_index idmef_path_make_child idmef_path_make_parent idmef_path_destroy idmef_path_ncompare idmef_path_compare idmef_path_clone idmef_path_ref idmef_path_get_name idmef_path_is_ambiguous idmef_path_has_lists idmef_path_is_list idmef_path_get_depth idmef_path_check_operator idmef_path_get_applicable_operators
idmef-additional-data idmef_additional_data_new_real idmef_additional_data_new_byte idmef_additional_data_new_integer idmef_additional_data_new_boolean idmef_additional_data_new_character idmef_additional_data_set_real idmef_additional_data_set_byte idmef_additional_data_set_integer idmef_additional_data_set_boolean idmef_additional_data_set_character idmef_additional_data_new_byte_string_ref idmef_additional_data_set_byte_string_ref idmef_additional_data_new_byte_string_dup idmef_additional_data_set_byte_string_dup idmef_additional_data_new_byte_string_nodup idmef_additional_data_set_byte_string_nodup idmef_additional_data_copy_ref idmef_additional_data_copy_dup idmef_additional_data_get_real idmef_additional_data_get_integer idmef_additional_data_get_boolean idmef_additional_data_get_character idmef_additional_data_get_byte idmef_additional_data_get_len idmef_additional_data_is_empty idmef_additional_data_data_to_string
idmef
idmef-time idmef_time_t idmef_time_ref idmef_time_new idmef_time_new_from_time idmef_time_new_from_gettimeofday idmef_time_new_from_string idmef_time_new_from_ntpstamp idmef_time_new_from_timeval idmef_time_set_from_time idmef_time_set_from_gettimeofday idmef_time_set_from_string idmef_time_set_from_ntpstamp idmef_time_set_from_timeval idmef_time_destroy_internal idmef_time_destroy idmef_time_clone idmef_time_copy idmef_time_set_sec idmef_time_set_usec idmef_time_set_gmt_offset idmef_time_get_sec idmef_time_get_usec idmef_time_get_gmt_offset idmef_time_to_string idmef_time_to_ntpstamp
prelude-timer prelude_timer_t prelude_timer_get_expire prelude_timer_get_data prelude_timer_get_callback prelude_timer_set_expire prelude_timer_set_data prelude_timer_set_callback prelude_timer_init prelude_timer_init_list prelude_timer_reset prelude_timer_destroy prelude_timer_wake_up prelude_timer_flush prelude_timer_lock_critical_region prelude_timer_unlock_critical_region
idmef-value idmef_value_t idmef_value_new_int8 idmef_value_new_uint8 idmef_value_new_int16 idmef_value_new_uint16 idmef_value_new_int32 idmef_value_new_uint32 idmef_value_new_int64 idmef_value_new_uint64 idmef_value_new_float idmef_value_new_double idmef_value_new_string idmef_value_new_time idmef_value_new_data idmef_value_new_class idmef_value_new_list idmef_value_new_enum idmef_value_new_enum_from_string idmef_value_new_enum_from_numeric idmef_value_new idmef_value_new_from_path idmef_value_new_from_string idmef_value_set_class idmef_value_set_data idmef_value_set_double idmef_value_set_enum idmef_value_set_enum_from_numeric idmef_value_set_enum_from_string idmef_value_set_float idmef_value_set_int16 idmef_value_set_int32 idmef_value_set_int64 idmef_value_set_int8 idmef_value_set_string idmef_value_set_time idmef_value_set_uint16 idmef_value_set_uint32 idmef_value_set_uint64 idmef_value_set_uint8 idmef_value_get_int8 idmef_value_get_uint8 idmef_value_get_int16 idmef_value_get_uint16 idmef_value_get_int32 idmef_value_get_uint32 idmef_value_get_int64 idmef_value_get_uint64 idmef_value_get_enum idmef_value_get_float idmef_value_get_double idmef_value_get_time idmef_value_get_data idmef_value_get_string idmef_value_list_add idmef_value_is_list idmef_value_list_is_empty idmef_value_have_own_data idmef_value_dont_have_own_data idmef_value_get_type idmef_value_get_class idmef_value_get_object idmef_value_iterate idmef_value_iterate_reversed idmef_value_get_nth idmef_value_get_count idmef_value_clone idmef_value_ref idmef_value_print idmef_value_to_string idmef_value_get idmef_value_match idmef_value_check_operator idmef_value_get_applicable_operators idmef_value_destroy
libprelude-1.0.0/docs/Makefile.am0000664000076400007640000000006611202312110013537 00000000000000SUBDIRS = api manpages -include $(top_srcdir)/git.mk libprelude-1.0.0/docs/Makefile.in0000664000076400007640000014075211347714454013612 00000000000000# Makefile.in generated by automake 1.11.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, # Inc. # This Makefile.in 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. @SET_MAKE@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ target_triplet = @target@ subdir = docs DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/libmissing/m4/00gnulib.m4 \ $(top_srcdir)/libmissing/m4/alloca.m4 \ $(top_srcdir)/libmissing/m4/arpa_inet_h.m4 \ $(top_srcdir)/libmissing/m4/btowc.m4 \ $(top_srcdir)/libmissing/m4/close.m4 \ $(top_srcdir)/libmissing/m4/codeset.m4 \ $(top_srcdir)/libmissing/m4/cond.m4 \ $(top_srcdir)/libmissing/m4/dos.m4 \ $(top_srcdir)/libmissing/m4/dup2.m4 \ $(top_srcdir)/libmissing/m4/errno_h.m4 \ $(top_srcdir)/libmissing/m4/exponentd.m4 \ $(top_srcdir)/libmissing/m4/exponentf.m4 \ $(top_srcdir)/libmissing/m4/exponentl.m4 \ $(top_srcdir)/libmissing/m4/extensions.m4 \ $(top_srcdir)/libmissing/m4/fclose.m4 \ $(top_srcdir)/libmissing/m4/fcntl-o.m4 \ $(top_srcdir)/libmissing/m4/fcntl_h.m4 \ $(top_srcdir)/libmissing/m4/float_h.m4 \ $(top_srcdir)/libmissing/m4/fopen.m4 \ $(top_srcdir)/libmissing/m4/fpieee.m4 \ $(top_srcdir)/libmissing/m4/frexp.m4 \ $(top_srcdir)/libmissing/m4/frexpl.m4 \ $(top_srcdir)/libmissing/m4/fseeko.m4 \ $(top_srcdir)/libmissing/m4/ftw.m4 \ $(top_srcdir)/libmissing/m4/getaddrinfo.m4 \ $(top_srcdir)/libmissing/m4/getdelim.m4 \ $(top_srcdir)/libmissing/m4/gethostname.m4 \ $(top_srcdir)/libmissing/m4/getline.m4 \ $(top_srcdir)/libmissing/m4/getpagesize.m4 \ $(top_srcdir)/libmissing/m4/getpass.m4 \ $(top_srcdir)/libmissing/m4/gettimeofday.m4 \ $(top_srcdir)/libmissing/m4/glibc21.m4 \ $(top_srcdir)/libmissing/m4/gnulib-common.m4 \ $(top_srcdir)/libmissing/m4/gnulib-comp.m4 \ $(top_srcdir)/libmissing/m4/gnulib-tool.m4 \ $(top_srcdir)/libmissing/m4/hostent.m4 \ $(top_srcdir)/libmissing/m4/include_next.m4 \ $(top_srcdir)/libmissing/m4/inet_ntop.m4 \ $(top_srcdir)/libmissing/m4/inet_pton.m4 \ $(top_srcdir)/libmissing/m4/intmax_t.m4 \ $(top_srcdir)/libmissing/m4/inttypes_h.m4 \ $(top_srcdir)/libmissing/m4/isnand.m4 \ $(top_srcdir)/libmissing/m4/isnanf.m4 \ $(top_srcdir)/libmissing/m4/isnanl.m4 \ $(top_srcdir)/libmissing/m4/langinfo_h.m4 \ $(top_srcdir)/libmissing/m4/ldexpl.m4 \ $(top_srcdir)/libmissing/m4/lib-ld.m4 \ $(top_srcdir)/libmissing/m4/lib-link.m4 \ $(top_srcdir)/libmissing/m4/lib-prefix.m4 \ $(top_srcdir)/libmissing/m4/localcharset.m4 \ $(top_srcdir)/libmissing/m4/locale-fr.m4 \ $(top_srcdir)/libmissing/m4/locale-ja.m4 \ $(top_srcdir)/libmissing/m4/locale-tr.m4 \ $(top_srcdir)/libmissing/m4/locale-zh.m4 \ $(top_srcdir)/libmissing/m4/lock.m4 \ $(top_srcdir)/libmissing/m4/longlong.m4 \ $(top_srcdir)/libmissing/m4/lseek.m4 \ $(top_srcdir)/libmissing/m4/lstat.m4 \ $(top_srcdir)/libmissing/m4/malloc.m4 \ $(top_srcdir)/libmissing/m4/math_h.m4 \ $(top_srcdir)/libmissing/m4/mbrtowc.m4 \ $(top_srcdir)/libmissing/m4/mbsinit.m4 \ $(top_srcdir)/libmissing/m4/mbstate_t.m4 \ $(top_srcdir)/libmissing/m4/memchr.m4 \ $(top_srcdir)/libmissing/m4/memmem.m4 \ $(top_srcdir)/libmissing/m4/minmax.m4 \ $(top_srcdir)/libmissing/m4/mktime.m4 \ $(top_srcdir)/libmissing/m4/mmap-anon.m4 \ $(top_srcdir)/libmissing/m4/mode_t.m4 \ $(top_srcdir)/libmissing/m4/multiarch.m4 \ $(top_srcdir)/libmissing/m4/netdb_h.m4 \ $(top_srcdir)/libmissing/m4/netinet_in_h.m4 \ $(top_srcdir)/libmissing/m4/nl_langinfo.m4 \ $(top_srcdir)/libmissing/m4/nocrash.m4 \ $(top_srcdir)/libmissing/m4/onceonly.m4 \ $(top_srcdir)/libmissing/m4/open.m4 \ $(top_srcdir)/libmissing/m4/pathmax.m4 \ $(top_srcdir)/libmissing/m4/perror.m4 \ $(top_srcdir)/libmissing/m4/poll.m4 \ $(top_srcdir)/libmissing/m4/printf-frexp.m4 \ $(top_srcdir)/libmissing/m4/printf-frexpl.m4 \ $(top_srcdir)/libmissing/m4/printf.m4 \ $(top_srcdir)/libmissing/m4/realloc.m4 \ $(top_srcdir)/libmissing/m4/regex.m4 \ $(top_srcdir)/libmissing/m4/relocatable-lib.m4 \ $(top_srcdir)/libmissing/m4/select.m4 \ $(top_srcdir)/libmissing/m4/servent.m4 \ $(top_srcdir)/libmissing/m4/signal_h.m4 \ $(top_srcdir)/libmissing/m4/signalblocking.m4 \ $(top_srcdir)/libmissing/m4/signbit.m4 \ $(top_srcdir)/libmissing/m4/size_max.m4 \ $(top_srcdir)/libmissing/m4/sleep.m4 \ $(top_srcdir)/libmissing/m4/snprintf-posix.m4 \ $(top_srcdir)/libmissing/m4/snprintf.m4 \ $(top_srcdir)/libmissing/m4/sockets.m4 \ $(top_srcdir)/libmissing/m4/socklen.m4 \ $(top_srcdir)/libmissing/m4/sockpfaf.m4 \ $(top_srcdir)/libmissing/m4/ssize_t.m4 \ $(top_srcdir)/libmissing/m4/stat.m4 \ $(top_srcdir)/libmissing/m4/stdbool.m4 \ $(top_srcdir)/libmissing/m4/stddef_h.m4 \ $(top_srcdir)/libmissing/m4/stdint.m4 \ $(top_srcdir)/libmissing/m4/stdint_h.m4 \ $(top_srcdir)/libmissing/m4/stdio_h.m4 \ $(top_srcdir)/libmissing/m4/stdlib_h.m4 \ $(top_srcdir)/libmissing/m4/strcase.m4 \ $(top_srcdir)/libmissing/m4/strcasestr.m4 \ $(top_srcdir)/libmissing/m4/strdup.m4 \ $(top_srcdir)/libmissing/m4/strerror.m4 \ $(top_srcdir)/libmissing/m4/string_h.m4 \ $(top_srcdir)/libmissing/m4/strings_h.m4 \ $(top_srcdir)/libmissing/m4/strndup.m4 \ $(top_srcdir)/libmissing/m4/strnlen.m4 \ $(top_srcdir)/libmissing/m4/strptime.m4 \ $(top_srcdir)/libmissing/m4/strsep.m4 \ $(top_srcdir)/libmissing/m4/symlink.m4 \ $(top_srcdir)/libmissing/m4/sys_ioctl_h.m4 \ $(top_srcdir)/libmissing/m4/sys_select_h.m4 \ $(top_srcdir)/libmissing/m4/sys_socket_h.m4 \ $(top_srcdir)/libmissing/m4/sys_stat_h.m4 \ $(top_srcdir)/libmissing/m4/sys_time_h.m4 \ $(top_srcdir)/libmissing/m4/sys_utsname_h.m4 \ $(top_srcdir)/libmissing/m4/thread.m4 \ $(top_srcdir)/libmissing/m4/threadlib.m4 \ $(top_srcdir)/libmissing/m4/time_h.m4 \ $(top_srcdir)/libmissing/m4/time_r.m4 \ $(top_srcdir)/libmissing/m4/timegm.m4 \ $(top_srcdir)/libmissing/m4/tls.m4 \ $(top_srcdir)/libmissing/m4/tm_gmtoff.m4 \ $(top_srcdir)/libmissing/m4/uname.m4 \ $(top_srcdir)/libmissing/m4/ungetc.m4 \ $(top_srcdir)/libmissing/m4/unistd_h.m4 \ $(top_srcdir)/libmissing/m4/vasnprintf.m4 \ $(top_srcdir)/libmissing/m4/vsnprintf-posix.m4 \ $(top_srcdir)/libmissing/m4/vsnprintf.m4 \ $(top_srcdir)/libmissing/m4/warn-on-use.m4 \ $(top_srcdir)/libmissing/m4/wchar.m4 \ $(top_srcdir)/libmissing/m4/wchar_t.m4 \ $(top_srcdir)/libmissing/m4/wcrtomb.m4 \ $(top_srcdir)/libmissing/m4/wctob.m4 \ $(top_srcdir)/libmissing/m4/wctype.m4 \ $(top_srcdir)/libmissing/m4/wint_t.m4 \ $(top_srcdir)/libmissing/m4/write.m4 \ $(top_srcdir)/libmissing/m4/xsize.m4 \ $(top_srcdir)/libmissing/m4/yield.m4 \ $(top_srcdir)/m4/ac_compile_check_sizeof.m4 \ $(top_srcdir)/m4/am_path_ruby.m4 $(top_srcdir)/m4/argz.m4 \ $(top_srcdir)/m4/as-ac-expand.m4 \ $(top_srcdir)/m4/ax_c_check_flag.m4 \ $(top_srcdir)/m4/ax_check_aligned_access_required.m4 \ $(top_srcdir)/m4/ax_create_prelude_inttypes_h.m4 \ $(top_srcdir)/m4/ax_ld_check_flag.m4 \ $(top_srcdir)/m4/gtk-doc.m4 $(top_srcdir)/m4/libgcrypt.m4 \ $(top_srcdir)/m4/libgnutls-extra.m4 \ $(top_srcdir)/m4/libgnutls.m4 $(top_srcdir)/m4/libtool.m4 \ $(top_srcdir)/m4/ltdl.m4 $(top_srcdir)/m4/ltoptions.m4 \ $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/m4/pkg.m4 \ $(top_srcdir)/configure.in am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = SOURCES = DIST_SOURCES = RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \ html-recursive info-recursive install-data-recursive \ install-dvi-recursive install-exec-recursive \ install-html-recursive install-info-recursive \ install-pdf-recursive install-ps-recursive install-recursive \ installcheck-recursive installdirs-recursive pdf-recursive \ ps-recursive uninstall-recursive RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ distclean-recursive maintainer-clean-recursive AM_RECURSIVE_TARGETS = $(RECURSIVE_TARGETS:-recursive=) \ $(RECURSIVE_CLEAN_TARGETS:-recursive=) tags TAGS ctags CTAGS \ distdir ETAGS = etags CTAGS = ctags DIST_SUBDIRS = $(SUBDIRS) DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) am__relativize = \ dir0=`pwd`; \ sed_first='s,^\([^/]*\)/.*$$,\1,'; \ sed_rest='s,^[^/]*/*,,'; \ sed_last='s,^.*/\([^/]*\)$$,\1,'; \ sed_butlast='s,/*[^/]*$$,,'; \ while test -n "$$dir1"; do \ first=`echo "$$dir1" | sed -e "$$sed_first"`; \ if test "$$first" != "."; then \ if test "$$first" = ".."; then \ dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \ dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \ else \ first2=`echo "$$dir2" | sed -e "$$sed_first"`; \ if test "$$first2" = "$$first"; then \ dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \ else \ dir2="../$$dir2"; \ fi; \ dir0="$$dir0"/"$$first"; \ fi; \ fi; \ dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \ done; \ reldir="$$dir2" ACLOCAL = @ACLOCAL@ ALLOCA = @ALLOCA@ ALLOCA_H = @ALLOCA_H@ AMTAR = @AMTAR@ APPLE_UNIVERSAL_BUILD = @APPLE_UNIVERSAL_BUILD@ AR = @AR@ ARGZ_H = @ARGZ_H@ AS = @AS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ BINDINGS_CC = @BINDINGS_CC@ BINDIR = @BINDIR@ BITSIZEOF_PTRDIFF_T = @BITSIZEOF_PTRDIFF_T@ BITSIZEOF_SIG_ATOMIC_T = @BITSIZEOF_SIG_ATOMIC_T@ BITSIZEOF_SIZE_T = @BITSIZEOF_SIZE_T@ BITSIZEOF_WCHAR_T = @BITSIZEOF_WCHAR_T@ BITSIZEOF_WINT_T = @BITSIZEOF_WINT_T@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CC_FOR_BUILD = @CC_FOR_BUILD@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EMULTIHOP_HIDDEN = @EMULTIHOP_HIDDEN@ EMULTIHOP_VALUE = @EMULTIHOP_VALUE@ ENOLINK_HIDDEN = @ENOLINK_HIDDEN@ ENOLINK_VALUE = @ENOLINK_VALUE@ EOVERFLOW_HIDDEN = @EOVERFLOW_HIDDEN@ EOVERFLOW_VALUE = @EOVERFLOW_VALUE@ ERRNO_H = @ERRNO_H@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ FLOAT_H = @FLOAT_H@ GETADDRINFO_LIB = @GETADDRINFO_LIB@ GETHOSTNAME_LIB = @GETHOSTNAME_LIB@ GLIBC21 = @GLIBC21@ GNULIB_ACCEPT = @GNULIB_ACCEPT@ GNULIB_ACCEPT4 = @GNULIB_ACCEPT4@ GNULIB_ACOSL = @GNULIB_ACOSL@ GNULIB_ASINL = @GNULIB_ASINL@ GNULIB_ATANL = @GNULIB_ATANL@ GNULIB_ATOLL = @GNULIB_ATOLL@ GNULIB_BIND = @GNULIB_BIND@ GNULIB_BTOWC = @GNULIB_BTOWC@ GNULIB_CALLOC_POSIX = @GNULIB_CALLOC_POSIX@ GNULIB_CANONICALIZE_FILE_NAME = @GNULIB_CANONICALIZE_FILE_NAME@ GNULIB_CEILF = @GNULIB_CEILF@ GNULIB_CEILL = @GNULIB_CEILL@ GNULIB_CHOWN = @GNULIB_CHOWN@ GNULIB_CLOSE = @GNULIB_CLOSE@ GNULIB_CONNECT = @GNULIB_CONNECT@ GNULIB_COSL = @GNULIB_COSL@ GNULIB_DPRINTF = @GNULIB_DPRINTF@ GNULIB_DUP2 = @GNULIB_DUP2@ GNULIB_DUP3 = @GNULIB_DUP3@ GNULIB_ENVIRON = @GNULIB_ENVIRON@ GNULIB_EUIDACCESS = @GNULIB_EUIDACCESS@ GNULIB_EXPL = @GNULIB_EXPL@ GNULIB_FACCESSAT = @GNULIB_FACCESSAT@ GNULIB_FCHDIR = @GNULIB_FCHDIR@ GNULIB_FCHMODAT = @GNULIB_FCHMODAT@ GNULIB_FCHOWNAT = @GNULIB_FCHOWNAT@ GNULIB_FCLOSE = @GNULIB_FCLOSE@ GNULIB_FCNTL = @GNULIB_FCNTL@ GNULIB_FFLUSH = @GNULIB_FFLUSH@ GNULIB_FLOORF = @GNULIB_FLOORF@ GNULIB_FLOORL = @GNULIB_FLOORL@ GNULIB_FOPEN = @GNULIB_FOPEN@ GNULIB_FPRINTF = @GNULIB_FPRINTF@ GNULIB_FPRINTF_POSIX = @GNULIB_FPRINTF_POSIX@ GNULIB_FPURGE = @GNULIB_FPURGE@ GNULIB_FPUTC = @GNULIB_FPUTC@ GNULIB_FPUTS = @GNULIB_FPUTS@ GNULIB_FREOPEN = @GNULIB_FREOPEN@ GNULIB_FREXP = @GNULIB_FREXP@ GNULIB_FREXPL = @GNULIB_FREXPL@ GNULIB_FSEEK = @GNULIB_FSEEK@ GNULIB_FSEEKO = @GNULIB_FSEEKO@ GNULIB_FSTATAT = @GNULIB_FSTATAT@ GNULIB_FSYNC = @GNULIB_FSYNC@ GNULIB_FTELL = @GNULIB_FTELL@ GNULIB_FTELLO = @GNULIB_FTELLO@ GNULIB_FTRUNCATE = @GNULIB_FTRUNCATE@ GNULIB_FUTIMENS = @GNULIB_FUTIMENS@ GNULIB_FWRITE = @GNULIB_FWRITE@ GNULIB_GETADDRINFO = @GNULIB_GETADDRINFO@ GNULIB_GETCWD = @GNULIB_GETCWD@ GNULIB_GETDELIM = @GNULIB_GETDELIM@ GNULIB_GETDOMAINNAME = @GNULIB_GETDOMAINNAME@ GNULIB_GETDTABLESIZE = @GNULIB_GETDTABLESIZE@ GNULIB_GETGROUPS = @GNULIB_GETGROUPS@ GNULIB_GETHOSTNAME = @GNULIB_GETHOSTNAME@ GNULIB_GETLINE = @GNULIB_GETLINE@ GNULIB_GETLOADAVG = @GNULIB_GETLOADAVG@ GNULIB_GETLOGIN = @GNULIB_GETLOGIN@ GNULIB_GETLOGIN_R = @GNULIB_GETLOGIN_R@ GNULIB_GETPAGESIZE = @GNULIB_GETPAGESIZE@ GNULIB_GETPEERNAME = @GNULIB_GETPEERNAME@ GNULIB_GETSOCKNAME = @GNULIB_GETSOCKNAME@ GNULIB_GETSOCKOPT = @GNULIB_GETSOCKOPT@ GNULIB_GETSUBOPT = @GNULIB_GETSUBOPT@ GNULIB_GETTIMEOFDAY = @GNULIB_GETTIMEOFDAY@ GNULIB_GETUSERSHELL = @GNULIB_GETUSERSHELL@ GNULIB_INET_NTOP = @GNULIB_INET_NTOP@ GNULIB_INET_PTON = @GNULIB_INET_PTON@ GNULIB_IOCTL = @GNULIB_IOCTL@ GNULIB_ISFINITE = @GNULIB_ISFINITE@ GNULIB_ISINF = @GNULIB_ISINF@ GNULIB_ISNAN = @GNULIB_ISNAN@ GNULIB_ISNAND = @GNULIB_ISNAND@ GNULIB_ISNANF = @GNULIB_ISNANF@ GNULIB_ISNANL = @GNULIB_ISNANL@ GNULIB_LCHMOD = @GNULIB_LCHMOD@ GNULIB_LCHOWN = @GNULIB_LCHOWN@ GNULIB_LDEXPL = @GNULIB_LDEXPL@ GNULIB_LINK = @GNULIB_LINK@ GNULIB_LINKAT = @GNULIB_LINKAT@ GNULIB_LISTEN = @GNULIB_LISTEN@ GNULIB_LOGL = @GNULIB_LOGL@ GNULIB_LSEEK = @GNULIB_LSEEK@ GNULIB_LSTAT = @GNULIB_LSTAT@ GNULIB_MALLOC_POSIX = @GNULIB_MALLOC_POSIX@ GNULIB_MBRLEN = @GNULIB_MBRLEN@ GNULIB_MBRTOWC = @GNULIB_MBRTOWC@ GNULIB_MBSCASECMP = @GNULIB_MBSCASECMP@ GNULIB_MBSCASESTR = @GNULIB_MBSCASESTR@ GNULIB_MBSCHR = @GNULIB_MBSCHR@ GNULIB_MBSCSPN = @GNULIB_MBSCSPN@ GNULIB_MBSINIT = @GNULIB_MBSINIT@ GNULIB_MBSLEN = @GNULIB_MBSLEN@ GNULIB_MBSNCASECMP = @GNULIB_MBSNCASECMP@ GNULIB_MBSNLEN = @GNULIB_MBSNLEN@ GNULIB_MBSNRTOWCS = @GNULIB_MBSNRTOWCS@ GNULIB_MBSPBRK = @GNULIB_MBSPBRK@ GNULIB_MBSPCASECMP = @GNULIB_MBSPCASECMP@ GNULIB_MBSRCHR = @GNULIB_MBSRCHR@ GNULIB_MBSRTOWCS = @GNULIB_MBSRTOWCS@ GNULIB_MBSSEP = @GNULIB_MBSSEP@ GNULIB_MBSSPN = @GNULIB_MBSSPN@ GNULIB_MBSSTR = @GNULIB_MBSSTR@ GNULIB_MBSTOK_R = @GNULIB_MBSTOK_R@ GNULIB_MEMCHR = @GNULIB_MEMCHR@ GNULIB_MEMMEM = @GNULIB_MEMMEM@ GNULIB_MEMPCPY = @GNULIB_MEMPCPY@ GNULIB_MEMRCHR = @GNULIB_MEMRCHR@ GNULIB_MKDIRAT = @GNULIB_MKDIRAT@ GNULIB_MKDTEMP = @GNULIB_MKDTEMP@ GNULIB_MKFIFO = @GNULIB_MKFIFO@ GNULIB_MKFIFOAT = @GNULIB_MKFIFOAT@ GNULIB_MKNOD = @GNULIB_MKNOD@ GNULIB_MKNODAT = @GNULIB_MKNODAT@ GNULIB_MKOSTEMP = @GNULIB_MKOSTEMP@ GNULIB_MKOSTEMPS = @GNULIB_MKOSTEMPS@ GNULIB_MKSTEMP = @GNULIB_MKSTEMP@ GNULIB_MKSTEMPS = @GNULIB_MKSTEMPS@ GNULIB_NL_LANGINFO = @GNULIB_NL_LANGINFO@ GNULIB_OBSTACK_PRINTF = @GNULIB_OBSTACK_PRINTF@ GNULIB_OBSTACK_PRINTF_POSIX = @GNULIB_OBSTACK_PRINTF_POSIX@ GNULIB_OPEN = @GNULIB_OPEN@ GNULIB_OPENAT = @GNULIB_OPENAT@ GNULIB_PERROR = @GNULIB_PERROR@ GNULIB_PIPE2 = @GNULIB_PIPE2@ GNULIB_POPEN = @GNULIB_POPEN@ GNULIB_PREAD = @GNULIB_PREAD@ GNULIB_PRINTF = @GNULIB_PRINTF@ GNULIB_PRINTF_POSIX = @GNULIB_PRINTF_POSIX@ GNULIB_PUTC = @GNULIB_PUTC@ GNULIB_PUTCHAR = @GNULIB_PUTCHAR@ GNULIB_PUTENV = @GNULIB_PUTENV@ GNULIB_PUTS = @GNULIB_PUTS@ GNULIB_RANDOM_R = @GNULIB_RANDOM_R@ GNULIB_RAWMEMCHR = @GNULIB_RAWMEMCHR@ GNULIB_READLINK = @GNULIB_READLINK@ GNULIB_READLINKAT = @GNULIB_READLINKAT@ GNULIB_REALLOC_POSIX = @GNULIB_REALLOC_POSIX@ GNULIB_REALPATH = @GNULIB_REALPATH@ GNULIB_RECV = @GNULIB_RECV@ GNULIB_RECVFROM = @GNULIB_RECVFROM@ GNULIB_REMOVE = @GNULIB_REMOVE@ GNULIB_RENAME = @GNULIB_RENAME@ GNULIB_RENAMEAT = @GNULIB_RENAMEAT@ GNULIB_RMDIR = @GNULIB_RMDIR@ GNULIB_ROUND = @GNULIB_ROUND@ GNULIB_ROUNDF = @GNULIB_ROUNDF@ GNULIB_ROUNDL = @GNULIB_ROUNDL@ GNULIB_RPMATCH = @GNULIB_RPMATCH@ GNULIB_SELECT = @GNULIB_SELECT@ GNULIB_SEND = @GNULIB_SEND@ GNULIB_SENDTO = @GNULIB_SENDTO@ GNULIB_SETENV = @GNULIB_SETENV@ GNULIB_SETSOCKOPT = @GNULIB_SETSOCKOPT@ GNULIB_SHUTDOWN = @GNULIB_SHUTDOWN@ GNULIB_SIGACTION = @GNULIB_SIGACTION@ GNULIB_SIGNAL_H_SIGPIPE = @GNULIB_SIGNAL_H_SIGPIPE@ GNULIB_SIGNBIT = @GNULIB_SIGNBIT@ GNULIB_SIGPROCMASK = @GNULIB_SIGPROCMASK@ GNULIB_SINL = @GNULIB_SINL@ GNULIB_SLEEP = @GNULIB_SLEEP@ GNULIB_SNPRINTF = @GNULIB_SNPRINTF@ GNULIB_SOCKET = @GNULIB_SOCKET@ GNULIB_SPRINTF_POSIX = @GNULIB_SPRINTF_POSIX@ GNULIB_SQRTL = @GNULIB_SQRTL@ GNULIB_STAT = @GNULIB_STAT@ GNULIB_STDIO_H_SIGPIPE = @GNULIB_STDIO_H_SIGPIPE@ GNULIB_STPCPY = @GNULIB_STPCPY@ GNULIB_STPNCPY = @GNULIB_STPNCPY@ GNULIB_STRCASESTR = @GNULIB_STRCASESTR@ GNULIB_STRCHRNUL = @GNULIB_STRCHRNUL@ GNULIB_STRDUP = @GNULIB_STRDUP@ GNULIB_STRERROR = @GNULIB_STRERROR@ GNULIB_STRNDUP = @GNULIB_STRNDUP@ GNULIB_STRNLEN = @GNULIB_STRNLEN@ GNULIB_STRPBRK = @GNULIB_STRPBRK@ GNULIB_STRSEP = @GNULIB_STRSEP@ GNULIB_STRSIGNAL = @GNULIB_STRSIGNAL@ GNULIB_STRSTR = @GNULIB_STRSTR@ GNULIB_STRTOD = @GNULIB_STRTOD@ GNULIB_STRTOK_R = @GNULIB_STRTOK_R@ GNULIB_STRTOLL = @GNULIB_STRTOLL@ GNULIB_STRTOULL = @GNULIB_STRTOULL@ GNULIB_STRVERSCMP = @GNULIB_STRVERSCMP@ GNULIB_SYMLINK = @GNULIB_SYMLINK@ GNULIB_SYMLINKAT = @GNULIB_SYMLINKAT@ GNULIB_TANL = @GNULIB_TANL@ GNULIB_TRUNC = @GNULIB_TRUNC@ GNULIB_TRUNCF = @GNULIB_TRUNCF@ GNULIB_TRUNCL = @GNULIB_TRUNCL@ GNULIB_UNAME = @GNULIB_UNAME@ GNULIB_UNISTD_H_GETOPT = @GNULIB_UNISTD_H_GETOPT@ GNULIB_UNISTD_H_SIGPIPE = @GNULIB_UNISTD_H_SIGPIPE@ GNULIB_UNLINK = @GNULIB_UNLINK@ GNULIB_UNLINKAT = @GNULIB_UNLINKAT@ GNULIB_UNSETENV = @GNULIB_UNSETENV@ GNULIB_USLEEP = @GNULIB_USLEEP@ GNULIB_UTIMENSAT = @GNULIB_UTIMENSAT@ GNULIB_VASPRINTF = @GNULIB_VASPRINTF@ GNULIB_VDPRINTF = @GNULIB_VDPRINTF@ GNULIB_VFPRINTF = @GNULIB_VFPRINTF@ GNULIB_VFPRINTF_POSIX = @GNULIB_VFPRINTF_POSIX@ GNULIB_VPRINTF = @GNULIB_VPRINTF@ GNULIB_VPRINTF_POSIX = @GNULIB_VPRINTF_POSIX@ GNULIB_VSNPRINTF = @GNULIB_VSNPRINTF@ GNULIB_VSPRINTF_POSIX = @GNULIB_VSPRINTF_POSIX@ GNULIB_WCRTOMB = @GNULIB_WCRTOMB@ GNULIB_WCSNRTOMBS = @GNULIB_WCSNRTOMBS@ GNULIB_WCSRTOMBS = @GNULIB_WCSRTOMBS@ GNULIB_WCTOB = @GNULIB_WCTOB@ GNULIB_WCWIDTH = @GNULIB_WCWIDTH@ GNULIB_WRITE = @GNULIB_WRITE@ GREP = @GREP@ GTKDOC_CHECK = @GTKDOC_CHECK@ HAVE_ACCEPT4 = @HAVE_ACCEPT4@ HAVE_ACOSL = @HAVE_ACOSL@ HAVE_ARPA_INET_H = @HAVE_ARPA_INET_H@ HAVE_ASINL = @HAVE_ASINL@ HAVE_ATANL = @HAVE_ATANL@ HAVE_ATOLL = @HAVE_ATOLL@ HAVE_BTOWC = @HAVE_BTOWC@ HAVE_CALLOC_POSIX = @HAVE_CALLOC_POSIX@ HAVE_CANONICALIZE_FILE_NAME = @HAVE_CANONICALIZE_FILE_NAME@ HAVE_CHOWN = @HAVE_CHOWN@ HAVE_COSL = @HAVE_COSL@ HAVE_CXX = @HAVE_CXX@ HAVE_DECL_ACOSL = @HAVE_DECL_ACOSL@ HAVE_DECL_ASINL = @HAVE_DECL_ASINL@ HAVE_DECL_ATANL = @HAVE_DECL_ATANL@ HAVE_DECL_COSL = @HAVE_DECL_COSL@ HAVE_DECL_ENVIRON = @HAVE_DECL_ENVIRON@ HAVE_DECL_EXPL = @HAVE_DECL_EXPL@ HAVE_DECL_FPURGE = @HAVE_DECL_FPURGE@ HAVE_DECL_FREEADDRINFO = @HAVE_DECL_FREEADDRINFO@ HAVE_DECL_FREXPL = @HAVE_DECL_FREXPL@ HAVE_DECL_GAI_STRERROR = @HAVE_DECL_GAI_STRERROR@ HAVE_DECL_GETADDRINFO = @HAVE_DECL_GETADDRINFO@ HAVE_DECL_GETDELIM = @HAVE_DECL_GETDELIM@ HAVE_DECL_GETLINE = @HAVE_DECL_GETLINE@ HAVE_DECL_GETLOADAVG = @HAVE_DECL_GETLOADAVG@ HAVE_DECL_GETLOGIN_R = @HAVE_DECL_GETLOGIN_R@ HAVE_DECL_GETNAMEINFO = @HAVE_DECL_GETNAMEINFO@ HAVE_DECL_INET_NTOP = @HAVE_DECL_INET_NTOP@ HAVE_DECL_INET_PTON = @HAVE_DECL_INET_PTON@ HAVE_DECL_LDEXPL = @HAVE_DECL_LDEXPL@ HAVE_DECL_LOGL = @HAVE_DECL_LOGL@ HAVE_DECL_MEMMEM = @HAVE_DECL_MEMMEM@ HAVE_DECL_MEMRCHR = @HAVE_DECL_MEMRCHR@ HAVE_DECL_OBSTACK_PRINTF = @HAVE_DECL_OBSTACK_PRINTF@ HAVE_DECL_SINL = @HAVE_DECL_SINL@ HAVE_DECL_SNPRINTF = @HAVE_DECL_SNPRINTF@ HAVE_DECL_SQRTL = @HAVE_DECL_SQRTL@ HAVE_DECL_STRDUP = @HAVE_DECL_STRDUP@ HAVE_DECL_STRERROR = @HAVE_DECL_STRERROR@ HAVE_DECL_STRNCASECMP = @HAVE_DECL_STRNCASECMP@ HAVE_DECL_STRNDUP = @HAVE_DECL_STRNDUP@ HAVE_DECL_STRNLEN = @HAVE_DECL_STRNLEN@ HAVE_DECL_STRSIGNAL = @HAVE_DECL_STRSIGNAL@ HAVE_DECL_STRTOK_R = @HAVE_DECL_STRTOK_R@ HAVE_DECL_TANL = @HAVE_DECL_TANL@ HAVE_DECL_TRUNC = @HAVE_DECL_TRUNC@ HAVE_DECL_TRUNCF = @HAVE_DECL_TRUNCF@ HAVE_DECL_VSNPRINTF = @HAVE_DECL_VSNPRINTF@ HAVE_DECL_WCTOB = @HAVE_DECL_WCTOB@ HAVE_DECL_WCWIDTH = @HAVE_DECL_WCWIDTH@ HAVE_DPRINTF = @HAVE_DPRINTF@ HAVE_DUP2 = @HAVE_DUP2@ HAVE_DUP3 = @HAVE_DUP3@ HAVE_EUIDACCESS = @HAVE_EUIDACCESS@ HAVE_EXPL = @HAVE_EXPL@ HAVE_FACCESSAT = @HAVE_FACCESSAT@ HAVE_FCHMODAT = @HAVE_FCHMODAT@ HAVE_FCHOWNAT = @HAVE_FCHOWNAT@ HAVE_FCNTL = @HAVE_FCNTL@ HAVE_FSTATAT = @HAVE_FSTATAT@ HAVE_FSYNC = @HAVE_FSYNC@ HAVE_FTRUNCATE = @HAVE_FTRUNCATE@ HAVE_FUTIMENS = @HAVE_FUTIMENS@ HAVE_GETDOMAINNAME = @HAVE_GETDOMAINNAME@ HAVE_GETDTABLESIZE = @HAVE_GETDTABLESIZE@ HAVE_GETGROUPS = @HAVE_GETGROUPS@ HAVE_GETHOSTNAME = @HAVE_GETHOSTNAME@ HAVE_GETLOGIN = @HAVE_GETLOGIN@ HAVE_GETPAGESIZE = @HAVE_GETPAGESIZE@ HAVE_GETSUBOPT = @HAVE_GETSUBOPT@ HAVE_GETUSERSHELL = @HAVE_GETUSERSHELL@ HAVE_INTTYPES_H = @HAVE_INTTYPES_H@ HAVE_ISNAND = @HAVE_ISNAND@ HAVE_ISNANF = @HAVE_ISNANF@ HAVE_ISNANL = @HAVE_ISNANL@ HAVE_ISWCNTRL = @HAVE_ISWCNTRL@ HAVE_LANGINFO_CODESET = @HAVE_LANGINFO_CODESET@ HAVE_LANGINFO_ERA = @HAVE_LANGINFO_ERA@ HAVE_LANGINFO_H = @HAVE_LANGINFO_H@ HAVE_LCHMOD = @HAVE_LCHMOD@ HAVE_LCHOWN = @HAVE_LCHOWN@ HAVE_LINK = @HAVE_LINK@ HAVE_LINKAT = @HAVE_LINKAT@ HAVE_LOGL = @HAVE_LOGL@ HAVE_LONG_LONG_INT = @HAVE_LONG_LONG_INT@ HAVE_LSTAT = @HAVE_LSTAT@ HAVE_MALLOC_POSIX = @HAVE_MALLOC_POSIX@ HAVE_MBRLEN = @HAVE_MBRLEN@ HAVE_MBRTOWC = @HAVE_MBRTOWC@ HAVE_MBSINIT = @HAVE_MBSINIT@ HAVE_MBSLEN = @HAVE_MBSLEN@ HAVE_MBSNRTOWCS = @HAVE_MBSNRTOWCS@ HAVE_MBSRTOWCS = @HAVE_MBSRTOWCS@ HAVE_MEMPCPY = @HAVE_MEMPCPY@ HAVE_MKDIRAT = @HAVE_MKDIRAT@ HAVE_MKDTEMP = @HAVE_MKDTEMP@ HAVE_MKFIFO = @HAVE_MKFIFO@ HAVE_MKFIFOAT = @HAVE_MKFIFOAT@ HAVE_MKNOD = @HAVE_MKNOD@ HAVE_MKNODAT = @HAVE_MKNODAT@ HAVE_MKOSTEMP = @HAVE_MKOSTEMP@ HAVE_MKOSTEMPS = @HAVE_MKOSTEMPS@ HAVE_MKSTEMPS = @HAVE_MKSTEMPS@ HAVE_NETDB_H = @HAVE_NETDB_H@ HAVE_NETINET_IN_H = @HAVE_NETINET_IN_H@ HAVE_NL_LANGINFO = @HAVE_NL_LANGINFO@ HAVE_OPENAT = @HAVE_OPENAT@ HAVE_OS_H = @HAVE_OS_H@ HAVE_PIPE2 = @HAVE_PIPE2@ HAVE_POSIX_SIGNALBLOCKING = @HAVE_POSIX_SIGNALBLOCKING@ HAVE_PREAD = @HAVE_PREAD@ HAVE_RANDOM_H = @HAVE_RANDOM_H@ HAVE_RANDOM_R = @HAVE_RANDOM_R@ HAVE_RAWMEMCHR = @HAVE_RAWMEMCHR@ HAVE_READLINK = @HAVE_READLINK@ HAVE_READLINKAT = @HAVE_READLINKAT@ HAVE_REALLOC_POSIX = @HAVE_REALLOC_POSIX@ HAVE_REALPATH = @HAVE_REALPATH@ HAVE_RENAMEAT = @HAVE_RENAMEAT@ HAVE_RPMATCH = @HAVE_RPMATCH@ HAVE_SA_FAMILY_T = @HAVE_SA_FAMILY_T@ HAVE_SETENV = @HAVE_SETENV@ HAVE_SIGACTION = @HAVE_SIGACTION@ HAVE_SIGINFO_T = @HAVE_SIGINFO_T@ HAVE_SIGNED_SIG_ATOMIC_T = @HAVE_SIGNED_SIG_ATOMIC_T@ HAVE_SIGNED_WCHAR_T = @HAVE_SIGNED_WCHAR_T@ HAVE_SIGNED_WINT_T = @HAVE_SIGNED_WINT_T@ HAVE_SIGSET_T = @HAVE_SIGSET_T@ HAVE_SINL = @HAVE_SINL@ HAVE_SLEEP = @HAVE_SLEEP@ HAVE_SQRTL = @HAVE_SQRTL@ HAVE_STDINT_H = @HAVE_STDINT_H@ HAVE_STPCPY = @HAVE_STPCPY@ HAVE_STPNCPY = @HAVE_STPNCPY@ HAVE_STRCASECMP = @HAVE_STRCASECMP@ HAVE_STRCASESTR = @HAVE_STRCASESTR@ HAVE_STRCHRNUL = @HAVE_STRCHRNUL@ HAVE_STRPBRK = @HAVE_STRPBRK@ HAVE_STRSEP = @HAVE_STRSEP@ HAVE_STRTOD = @HAVE_STRTOD@ HAVE_STRTOLL = @HAVE_STRTOLL@ HAVE_STRTOULL = @HAVE_STRTOULL@ HAVE_STRUCT_ADDRINFO = @HAVE_STRUCT_ADDRINFO@ HAVE_STRUCT_RANDOM_DATA = @HAVE_STRUCT_RANDOM_DATA@ HAVE_STRUCT_SIGACTION_SA_SIGACTION = @HAVE_STRUCT_SIGACTION_SA_SIGACTION@ HAVE_STRUCT_SOCKADDR_STORAGE = @HAVE_STRUCT_SOCKADDR_STORAGE@ HAVE_STRUCT_TIMEVAL = @HAVE_STRUCT_TIMEVAL@ HAVE_STRUCT_UTSNAME = @HAVE_STRUCT_UTSNAME@ HAVE_STRVERSCMP = @HAVE_STRVERSCMP@ HAVE_SYMLINK = @HAVE_SYMLINK@ HAVE_SYMLINKAT = @HAVE_SYMLINKAT@ HAVE_SYS_BITYPES_H = @HAVE_SYS_BITYPES_H@ HAVE_SYS_INTTYPES_H = @HAVE_SYS_INTTYPES_H@ HAVE_SYS_IOCTL_H = @HAVE_SYS_IOCTL_H@ HAVE_SYS_LOADAVG_H = @HAVE_SYS_LOADAVG_H@ HAVE_SYS_PARAM_H = @HAVE_SYS_PARAM_H@ HAVE_SYS_SELECT_H = @HAVE_SYS_SELECT_H@ HAVE_SYS_SOCKET_H = @HAVE_SYS_SOCKET_H@ HAVE_SYS_TIME_H = @HAVE_SYS_TIME_H@ HAVE_SYS_TYPES_H = @HAVE_SYS_TYPES_H@ HAVE_SYS_UTSNAME_H = @HAVE_SYS_UTSNAME_H@ HAVE_TANL = @HAVE_TANL@ HAVE_TYPE_VOLATILE_SIG_ATOMIC_T = @HAVE_TYPE_VOLATILE_SIG_ATOMIC_T@ HAVE_UNAME = @HAVE_UNAME@ HAVE_UNISTD_H = @HAVE_UNISTD_H@ HAVE_UNLINKAT = @HAVE_UNLINKAT@ HAVE_UNSETENV = @HAVE_UNSETENV@ HAVE_UNSIGNED_LONG_LONG_INT = @HAVE_UNSIGNED_LONG_LONG_INT@ HAVE_USLEEP = @HAVE_USLEEP@ HAVE_UTIMENSAT = @HAVE_UTIMENSAT@ HAVE_VASPRINTF = @HAVE_VASPRINTF@ HAVE_VDPRINTF = @HAVE_VDPRINTF@ HAVE_WCHAR_H = @HAVE_WCHAR_H@ HAVE_WCHAR_T = @HAVE_WCHAR_T@ HAVE_WCRTOMB = @HAVE_WCRTOMB@ HAVE_WCSNRTOMBS = @HAVE_WCSNRTOMBS@ HAVE_WCSRTOMBS = @HAVE_WCSRTOMBS@ HAVE_WCTYPE_H = @HAVE_WCTYPE_H@ HAVE_WINSOCK2_H = @HAVE_WINSOCK2_H@ HAVE_WINT_T = @HAVE_WINT_T@ HAVE_WS2TCPIP_H = @HAVE_WS2TCPIP_H@ HAVE__BOOL = @HAVE__BOOL@ HOSTENT_LIB = @HOSTENT_LIB@ HTML_DIR = @HTML_DIR@ INCLTDL = @INCLTDL@ INCLUDE_NEXT = @INCLUDE_NEXT@ INCLUDE_NEXT_AS_FIRST_DIRECTIVE = @INCLUDE_NEXT_AS_FIRST_DIRECTIVE@ INET_NTOP_LIB = @INET_NTOP_LIB@ INET_PTON_LIB = @INET_PTON_LIB@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LD = @LD@ LDFLAGS = @LDFLAGS@ LEX = @LEX@ LEXLIB = @LEXLIB@ LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@ LIBADD_DL = @LIBADD_DL@ LIBADD_DLD_LINK = @LIBADD_DLD_LINK@ LIBADD_DLOPEN = @LIBADD_DLOPEN@ LIBADD_SHL_LOAD = @LIBADD_SHL_LOAD@ LIBDIR = @LIBDIR@ LIBGCRYPT_CFLAGS = @LIBGCRYPT_CFLAGS@ LIBGCRYPT_CONFIG = @LIBGCRYPT_CONFIG@ LIBGCRYPT_LIBS = @LIBGCRYPT_LIBS@ LIBGNUTLS_CFLAGS = @LIBGNUTLS_CFLAGS@ LIBGNUTLS_CONFIG = @LIBGNUTLS_CONFIG@ LIBGNUTLS_EXTRA_CFLAGS = @LIBGNUTLS_EXTRA_CFLAGS@ LIBGNUTLS_EXTRA_CONFIG = @LIBGNUTLS_EXTRA_CONFIG@ LIBGNUTLS_EXTRA_LIBS = @LIBGNUTLS_EXTRA_LIBS@ LIBGNUTLS_LIBS = @LIBGNUTLS_LIBS@ LIBINTL = @LIBINTL@ LIBLTDL = @LIBLTDL@ LIBMULTITHREAD = @LIBMULTITHREAD@ LIBOBJS = @LIBOBJS@ LIBPRELUDECPP_SONAME = @LIBPRELUDECPP_SONAME@ LIBPRELUDE_CFLAGS = @LIBPRELUDE_CFLAGS@ LIBPRELUDE_LIBS = @LIBPRELUDE_LIBS@ LIBPRELUDE_SONAME = @LIBPRELUDE_SONAME@ LIBPTH = @LIBPTH@ LIBPTH_PREFIX = @LIBPTH_PREFIX@ LIBS = @LIBS@ LIBSOCKET = @LIBSOCKET@ LIBTESTS_LIBDEPS = @LIBTESTS_LIBDEPS@ LIBTHREAD = @LIBTHREAD@ LIBTOOL = @LIBTOOL@ LIPO = @LIPO@ LN_S = @LN_S@ LOCALCHARSET_TESTS_ENVIRONMENT = @LOCALCHARSET_TESTS_ENVIRONMENT@ LOCALE_FR = @LOCALE_FR@ LOCALE_FR_UTF8 = @LOCALE_FR_UTF8@ LOCALE_JA = @LOCALE_JA@ LOCALE_TR_UTF8 = @LOCALE_TR_UTF8@ LOCALE_ZH_CN = @LOCALE_ZH_CN@ LOCALSTATEDIR = @LOCALSTATEDIR@ LTALLOCA = @LTALLOCA@ LTDLDEPS = @LTDLDEPS@ LTDLINCL = @LTDLINCL@ LTDLOPEN = @LTDLOPEN@ LTLIBINTL = @LTLIBINTL@ LTLIBMULTITHREAD = @LTLIBMULTITHREAD@ LTLIBOBJS = @LTLIBOBJS@ LTLIBPTH = @LTLIBPTH@ LTLIBTHREAD = @LTLIBTHREAD@ LT_CONFIG_H = @LT_CONFIG_H@ LT_DLLOADERS = @LT_DLLOADERS@ LT_DLPREOPEN = @LT_DLPREOPEN@ LUA_CFLAGS = @LUA_CFLAGS@ LUA_CONFIG = @LUA_CONFIG@ LUA_LIBS = @LUA_LIBS@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MKDIR_P = @MKDIR_P@ NETDB_H = @NETDB_H@ NETINET_IN_H = @NETINET_IN_H@ NEXT_ARPA_INET_H = @NEXT_ARPA_INET_H@ NEXT_AS_FIRST_DIRECTIVE_ARPA_INET_H = @NEXT_AS_FIRST_DIRECTIVE_ARPA_INET_H@ NEXT_AS_FIRST_DIRECTIVE_ERRNO_H = @NEXT_AS_FIRST_DIRECTIVE_ERRNO_H@ NEXT_AS_FIRST_DIRECTIVE_FCNTL_H = @NEXT_AS_FIRST_DIRECTIVE_FCNTL_H@ NEXT_AS_FIRST_DIRECTIVE_FLOAT_H = @NEXT_AS_FIRST_DIRECTIVE_FLOAT_H@ NEXT_AS_FIRST_DIRECTIVE_LANGINFO_H = @NEXT_AS_FIRST_DIRECTIVE_LANGINFO_H@ NEXT_AS_FIRST_DIRECTIVE_MATH_H = @NEXT_AS_FIRST_DIRECTIVE_MATH_H@ NEXT_AS_FIRST_DIRECTIVE_NETDB_H = @NEXT_AS_FIRST_DIRECTIVE_NETDB_H@ NEXT_AS_FIRST_DIRECTIVE_NETINET_IN_H = @NEXT_AS_FIRST_DIRECTIVE_NETINET_IN_H@ NEXT_AS_FIRST_DIRECTIVE_SIGNAL_H = @NEXT_AS_FIRST_DIRECTIVE_SIGNAL_H@ NEXT_AS_FIRST_DIRECTIVE_STDDEF_H = @NEXT_AS_FIRST_DIRECTIVE_STDDEF_H@ NEXT_AS_FIRST_DIRECTIVE_STDINT_H = @NEXT_AS_FIRST_DIRECTIVE_STDINT_H@ NEXT_AS_FIRST_DIRECTIVE_STDIO_H = @NEXT_AS_FIRST_DIRECTIVE_STDIO_H@ NEXT_AS_FIRST_DIRECTIVE_STDLIB_H = @NEXT_AS_FIRST_DIRECTIVE_STDLIB_H@ NEXT_AS_FIRST_DIRECTIVE_STRINGS_H = @NEXT_AS_FIRST_DIRECTIVE_STRINGS_H@ NEXT_AS_FIRST_DIRECTIVE_STRING_H = @NEXT_AS_FIRST_DIRECTIVE_STRING_H@ NEXT_AS_FIRST_DIRECTIVE_SYS_IOCTL_H = @NEXT_AS_FIRST_DIRECTIVE_SYS_IOCTL_H@ NEXT_AS_FIRST_DIRECTIVE_SYS_SELECT_H = @NEXT_AS_FIRST_DIRECTIVE_SYS_SELECT_H@ NEXT_AS_FIRST_DIRECTIVE_SYS_SOCKET_H = @NEXT_AS_FIRST_DIRECTIVE_SYS_SOCKET_H@ NEXT_AS_FIRST_DIRECTIVE_SYS_STAT_H = @NEXT_AS_FIRST_DIRECTIVE_SYS_STAT_H@ NEXT_AS_FIRST_DIRECTIVE_SYS_TIME_H = @NEXT_AS_FIRST_DIRECTIVE_SYS_TIME_H@ NEXT_AS_FIRST_DIRECTIVE_SYS_UTSNAME_H = @NEXT_AS_FIRST_DIRECTIVE_SYS_UTSNAME_H@ NEXT_AS_FIRST_DIRECTIVE_TIME_H = @NEXT_AS_FIRST_DIRECTIVE_TIME_H@ NEXT_AS_FIRST_DIRECTIVE_UNISTD_H = @NEXT_AS_FIRST_DIRECTIVE_UNISTD_H@ NEXT_AS_FIRST_DIRECTIVE_WCHAR_H = @NEXT_AS_FIRST_DIRECTIVE_WCHAR_H@ NEXT_AS_FIRST_DIRECTIVE_WCTYPE_H = @NEXT_AS_FIRST_DIRECTIVE_WCTYPE_H@ NEXT_ERRNO_H = @NEXT_ERRNO_H@ NEXT_FCNTL_H = @NEXT_FCNTL_H@ NEXT_FLOAT_H = @NEXT_FLOAT_H@ NEXT_LANGINFO_H = @NEXT_LANGINFO_H@ NEXT_MATH_H = @NEXT_MATH_H@ NEXT_NETDB_H = @NEXT_NETDB_H@ NEXT_NETINET_IN_H = @NEXT_NETINET_IN_H@ NEXT_SIGNAL_H = @NEXT_SIGNAL_H@ NEXT_STDDEF_H = @NEXT_STDDEF_H@ NEXT_STDINT_H = @NEXT_STDINT_H@ NEXT_STDIO_H = @NEXT_STDIO_H@ NEXT_STDLIB_H = @NEXT_STDLIB_H@ NEXT_STRINGS_H = @NEXT_STRINGS_H@ NEXT_STRING_H = @NEXT_STRING_H@ NEXT_SYS_IOCTL_H = @NEXT_SYS_IOCTL_H@ NEXT_SYS_SELECT_H = @NEXT_SYS_SELECT_H@ NEXT_SYS_SOCKET_H = @NEXT_SYS_SOCKET_H@ NEXT_SYS_STAT_H = @NEXT_SYS_STAT_H@ NEXT_SYS_TIME_H = @NEXT_SYS_TIME_H@ NEXT_SYS_UTSNAME_H = @NEXT_SYS_UTSNAME_H@ NEXT_TIME_H = @NEXT_TIME_H@ NEXT_UNISTD_H = @NEXT_UNISTD_H@ NEXT_WCHAR_H = @NEXT_WCHAR_H@ NEXT_WCTYPE_H = @NEXT_WCTYPE_H@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PCFLAGS = @PCFLAGS@ PERL = @PERL@ PERL_EXTRA_PARAMS = @PERL_EXTRA_PARAMS@ PKG_CONFIG = @PKG_CONFIG@ POLL_H = @POLL_H@ PRAGMA_SYSTEM_HEADER = @PRAGMA_SYSTEM_HEADER@ PRELUDE_ADMIN_CFLAGS = @PRELUDE_ADMIN_CFLAGS@ PRELUDE_ADMIN_LIBS = @PRELUDE_ADMIN_LIBS@ PRELUDE_CONFIG_DIR = @PRELUDE_CONFIG_DIR@ PRELUDE_SPOOL_DIR = @PRELUDE_SPOOL_DIR@ PTHREAD_CFLAGS = @PTHREAD_CFLAGS@ PTHREAD_LDFLAGS = @PTHREAD_LDFLAGS@ PTHREAD_LIBS = @PTHREAD_LIBS@ PTRDIFF_T_SUFFIX = @PTRDIFF_T_SUFFIX@ PYTHON = @PYTHON@ RANLIB = @RANLIB@ RELOCATABLE = @RELOCATABLE@ REPLACE_BTOWC = @REPLACE_BTOWC@ REPLACE_CANONICALIZE_FILE_NAME = @REPLACE_CANONICALIZE_FILE_NAME@ REPLACE_CEILF = @REPLACE_CEILF@ REPLACE_CEILL = @REPLACE_CEILL@ REPLACE_CHOWN = @REPLACE_CHOWN@ REPLACE_CLOSE = @REPLACE_CLOSE@ REPLACE_DPRINTF = @REPLACE_DPRINTF@ REPLACE_DUP = @REPLACE_DUP@ REPLACE_DUP2 = @REPLACE_DUP2@ REPLACE_FCHDIR = @REPLACE_FCHDIR@ REPLACE_FCHOWNAT = @REPLACE_FCHOWNAT@ REPLACE_FCLOSE = @REPLACE_FCLOSE@ REPLACE_FCNTL = @REPLACE_FCNTL@ REPLACE_FFLUSH = @REPLACE_FFLUSH@ REPLACE_FLOORF = @REPLACE_FLOORF@ REPLACE_FLOORL = @REPLACE_FLOORL@ REPLACE_FOPEN = @REPLACE_FOPEN@ REPLACE_FPRINTF = @REPLACE_FPRINTF@ REPLACE_FPURGE = @REPLACE_FPURGE@ REPLACE_FREOPEN = @REPLACE_FREOPEN@ REPLACE_FREXP = @REPLACE_FREXP@ REPLACE_FREXPL = @REPLACE_FREXPL@ REPLACE_FSEEK = @REPLACE_FSEEK@ REPLACE_FSEEKO = @REPLACE_FSEEKO@ REPLACE_FSTAT = @REPLACE_FSTAT@ REPLACE_FSTATAT = @REPLACE_FSTATAT@ REPLACE_FTELL = @REPLACE_FTELL@ REPLACE_FTELLO = @REPLACE_FTELLO@ REPLACE_FUTIMENS = @REPLACE_FUTIMENS@ REPLACE_GETCWD = @REPLACE_GETCWD@ REPLACE_GETDELIM = @REPLACE_GETDELIM@ REPLACE_GETGROUPS = @REPLACE_GETGROUPS@ REPLACE_GETLINE = @REPLACE_GETLINE@ REPLACE_GETPAGESIZE = @REPLACE_GETPAGESIZE@ REPLACE_GETTIMEOFDAY = @REPLACE_GETTIMEOFDAY@ REPLACE_HUGE_VAL = @REPLACE_HUGE_VAL@ REPLACE_ISFINITE = @REPLACE_ISFINITE@ REPLACE_ISINF = @REPLACE_ISINF@ REPLACE_ISNAN = @REPLACE_ISNAN@ REPLACE_ISWCNTRL = @REPLACE_ISWCNTRL@ REPLACE_LCHOWN = @REPLACE_LCHOWN@ REPLACE_LDEXPL = @REPLACE_LDEXPL@ REPLACE_LINK = @REPLACE_LINK@ REPLACE_LINKAT = @REPLACE_LINKAT@ REPLACE_LOCALTIME_R = @REPLACE_LOCALTIME_R@ REPLACE_LSEEK = @REPLACE_LSEEK@ REPLACE_LSTAT = @REPLACE_LSTAT@ REPLACE_MBRLEN = @REPLACE_MBRLEN@ REPLACE_MBRTOWC = @REPLACE_MBRTOWC@ REPLACE_MBSINIT = @REPLACE_MBSINIT@ REPLACE_MBSNRTOWCS = @REPLACE_MBSNRTOWCS@ REPLACE_MBSRTOWCS = @REPLACE_MBSRTOWCS@ REPLACE_MBSTATE_T = @REPLACE_MBSTATE_T@ REPLACE_MEMCHR = @REPLACE_MEMCHR@ REPLACE_MEMMEM = @REPLACE_MEMMEM@ REPLACE_MKDIR = @REPLACE_MKDIR@ REPLACE_MKFIFO = @REPLACE_MKFIFO@ REPLACE_MKNOD = @REPLACE_MKNOD@ REPLACE_MKSTEMP = @REPLACE_MKSTEMP@ REPLACE_MKTIME = @REPLACE_MKTIME@ REPLACE_NAN = @REPLACE_NAN@ REPLACE_NANOSLEEP = @REPLACE_NANOSLEEP@ REPLACE_NL_LANGINFO = @REPLACE_NL_LANGINFO@ REPLACE_NULL = @REPLACE_NULL@ REPLACE_OBSTACK_PRINTF = @REPLACE_OBSTACK_PRINTF@ REPLACE_OPEN = @REPLACE_OPEN@ REPLACE_OPENAT = @REPLACE_OPENAT@ REPLACE_PERROR = @REPLACE_PERROR@ REPLACE_POPEN = @REPLACE_POPEN@ REPLACE_PREAD = @REPLACE_PREAD@ REPLACE_PRINTF = @REPLACE_PRINTF@ REPLACE_PUTENV = @REPLACE_PUTENV@ REPLACE_READLINK = @REPLACE_READLINK@ REPLACE_REALPATH = @REPLACE_REALPATH@ REPLACE_REMOVE = @REPLACE_REMOVE@ REPLACE_RENAME = @REPLACE_RENAME@ REPLACE_RENAMEAT = @REPLACE_RENAMEAT@ REPLACE_RMDIR = @REPLACE_RMDIR@ REPLACE_ROUND = @REPLACE_ROUND@ REPLACE_ROUNDF = @REPLACE_ROUNDF@ REPLACE_ROUNDL = @REPLACE_ROUNDL@ REPLACE_SELECT = @REPLACE_SELECT@ REPLACE_SETENV = @REPLACE_SETENV@ REPLACE_SIGNBIT = @REPLACE_SIGNBIT@ REPLACE_SIGNBIT_USING_GCC = @REPLACE_SIGNBIT_USING_GCC@ REPLACE_SLEEP = @REPLACE_SLEEP@ REPLACE_SNPRINTF = @REPLACE_SNPRINTF@ REPLACE_SPRINTF = @REPLACE_SPRINTF@ REPLACE_STAT = @REPLACE_STAT@ REPLACE_STDIO_WRITE_FUNCS = @REPLACE_STDIO_WRITE_FUNCS@ REPLACE_STRCASESTR = @REPLACE_STRCASESTR@ REPLACE_STRDUP = @REPLACE_STRDUP@ REPLACE_STRERROR = @REPLACE_STRERROR@ REPLACE_STRNDUP = @REPLACE_STRNDUP@ REPLACE_STRPTIME = @REPLACE_STRPTIME@ REPLACE_STRSIGNAL = @REPLACE_STRSIGNAL@ REPLACE_STRSTR = @REPLACE_STRSTR@ REPLACE_STRTOD = @REPLACE_STRTOD@ REPLACE_STRTOK_R = @REPLACE_STRTOK_R@ REPLACE_SYMLINK = @REPLACE_SYMLINK@ REPLACE_TIMEGM = @REPLACE_TIMEGM@ REPLACE_TRUNCL = @REPLACE_TRUNCL@ REPLACE_UNLINK = @REPLACE_UNLINK@ REPLACE_UNLINKAT = @REPLACE_UNLINKAT@ REPLACE_UNSETENV = @REPLACE_UNSETENV@ REPLACE_USLEEP = @REPLACE_USLEEP@ REPLACE_UTIMENSAT = @REPLACE_UTIMENSAT@ REPLACE_VASPRINTF = @REPLACE_VASPRINTF@ REPLACE_VDPRINTF = @REPLACE_VDPRINTF@ REPLACE_VFPRINTF = @REPLACE_VFPRINTF@ REPLACE_VPRINTF = @REPLACE_VPRINTF@ REPLACE_VSNPRINTF = @REPLACE_VSNPRINTF@ REPLACE_VSPRINTF = @REPLACE_VSPRINTF@ REPLACE_WCRTOMB = @REPLACE_WCRTOMB@ REPLACE_WCSNRTOMBS = @REPLACE_WCSNRTOMBS@ REPLACE_WCSRTOMBS = @REPLACE_WCSRTOMBS@ REPLACE_WCTOB = @REPLACE_WCTOB@ REPLACE_WCWIDTH = @REPLACE_WCWIDTH@ REPLACE_WRITE = @REPLACE_WRITE@ RUBY = @RUBY@ RUBY_CCFLAGS = @RUBY_CCFLAGS@ RUBY_EXEC_PREFIX = @RUBY_EXEC_PREFIX@ RUBY_INCLUDES = @RUBY_INCLUDES@ RUBY_LIBS = @RUBY_LIBS@ RUBY_PLATFORM = @RUBY_PLATFORM@ RUBY_PREFIX = @RUBY_PREFIX@ RUBY_VERSION = @RUBY_VERSION@ SED = @SED@ SERVENT_LIB = @SERVENT_LIB@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ SIG_ATOMIC_T_SUFFIX = @SIG_ATOMIC_T_SUFFIX@ SIZE_T_SUFFIX = @SIZE_T_SUFFIX@ STDBOOL_H = @STDBOOL_H@ STDDEF_H = @STDDEF_H@ STDINT_H = @STDINT_H@ STRIP = @STRIP@ SWIG = @SWIG@ SYSCONFDIR = @SYSCONFDIR@ SYS_IOCTL_H_HAVE_WINSOCK2_H = @SYS_IOCTL_H_HAVE_WINSOCK2_H@ SYS_IOCTL_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS = @SYS_IOCTL_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS@ SYS_SOCKET_H = @SYS_SOCKET_H@ SYS_TIME_H_DEFINES_STRUCT_TIMESPEC = @SYS_TIME_H_DEFINES_STRUCT_TIMESPEC@ TIME_H_DEFINES_STRUCT_TIMESPEC = @TIME_H_DEFINES_STRUCT_TIMESPEC@ UNDEFINE_STRTOK_R = @UNDEFINE_STRTOK_R@ UNISTD_H_HAVE_WINSOCK2_H = @UNISTD_H_HAVE_WINSOCK2_H@ UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS = @UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS@ VALGRIND = @VALGRIND@ VERSION = @VERSION@ WCHAR_T_SUFFIX = @WCHAR_T_SUFFIX@ WCTYPE_H = @WCTYPE_H@ WINT_T_SUFFIX = @WINT_T_SUFFIX@ YACC = @YACC@ YFLAGS = @YFLAGS@ YIELD_LIB = @YIELD_LIB@ __PRELUDE_64BIT_FORMAT_PREFIX = @__PRELUDE_64BIT_FORMAT_PREFIX@ __PRELUDE_HAVE_64BIT_LONG = @__PRELUDE_HAVE_64BIT_LONG@ __PRELUDE_HAVE_INTTYPES_H = @__PRELUDE_HAVE_INTTYPES_H@ __PRELUDE_HAVE_STDINT_H = @__PRELUDE_HAVE_STDINT_H@ __PRELUDE_STDINT_HAVE_UINT16 = @__PRELUDE_STDINT_HAVE_UINT16@ __PRELUDE_STDINT_HAVE_UINT32 = @__PRELUDE_STDINT_HAVE_UINT32@ __PRELUDE_STDINT_HAVE_UINT64 = @__PRELUDE_STDINT_HAVE_UINT64@ __PRELUDE_STDINT_HAVE_UINT8 = @__PRELUDE_STDINT_HAVE_UINT8@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ gl_LIBOBJS = @gl_LIBOBJS@ gl_LTLIBOBJS = @gl_LTLIBOBJS@ gltests_LIBOBJS = @gltests_LIBOBJS@ gltests_LTLIBOBJS = @gltests_LTLIBOBJS@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ lt_ECHO = @lt_ECHO@ ltdl_LIBOBJS = @ltdl_LIBOBJS@ ltdl_LTLIBOBJS = @ltdl_LTLIBOBJS@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ pkgrbexecdir = @pkgrbexecdir@ pkgrubydir = @pkgrubydir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ rbexecdir = @rbexecdir@ rubydir = @rubydir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sys_symbol_underscore = @sys_symbol_underscore@ sysconfdir = @sysconfdir@ target = @target@ target_alias = @target_alias@ target_cpu = @target_cpu@ target_os = @target_os@ target_vendor = @target_vendor@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ SUBDIRS = api manpages all: all-recursive .SUFFIXES: $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu docs/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu docs/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs # This directory's subdirectories are mostly independent; you can cd # into them and run `make' without going through this Makefile. # To change the values of `make' variables: instead of editing Makefiles, # (1) if the variable is set in `config.status', edit `config.status' # (which will cause the Makefiles to be regenerated when you run `make'); # (2) otherwise, pass the desired values on the `make' command line. $(RECURSIVE_TARGETS): @fail= failcom='exit 1'; \ for f in x $$MAKEFLAGS; do \ case $$f in \ *=* | --[!k]*);; \ *k*) failcom='fail=yes';; \ esac; \ done; \ dot_seen=no; \ target=`echo $@ | sed s/-recursive//`; \ list='$(SUBDIRS)'; for subdir in $$list; do \ echo "Making $$target in $$subdir"; \ if test "$$subdir" = "."; then \ dot_seen=yes; \ local_target="$$target-am"; \ else \ local_target="$$target"; \ fi; \ ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ || eval $$failcom; \ done; \ if test "$$dot_seen" = "no"; then \ $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ fi; test -z "$$fail" $(RECURSIVE_CLEAN_TARGETS): @fail= failcom='exit 1'; \ for f in x $$MAKEFLAGS; do \ case $$f in \ *=* | --[!k]*);; \ *k*) failcom='fail=yes';; \ esac; \ done; \ dot_seen=no; \ case "$@" in \ distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ *) list='$(SUBDIRS)' ;; \ esac; \ rev=''; for subdir in $$list; do \ if test "$$subdir" = "."; then :; else \ rev="$$subdir $$rev"; \ fi; \ done; \ rev="$$rev ."; \ target=`echo $@ | sed s/-recursive//`; \ for subdir in $$rev; do \ echo "Making $$target in $$subdir"; \ if test "$$subdir" = "."; then \ local_target="$$target-am"; \ else \ local_target="$$target"; \ fi; \ ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ || eval $$failcom; \ done && test -z "$$fail" tags-recursive: list='$(SUBDIRS)'; for subdir in $$list; do \ test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \ done ctags-recursive: list='$(SUBDIRS)'; for subdir in $$list; do \ test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \ done ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ mkid -fID $$unique tags: TAGS TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) set x; \ here=`pwd`; \ if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ include_option=--etags-include; \ empty_fix=.; \ else \ include_option=--include; \ empty_fix=; \ fi; \ list='$(SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ test ! -f $$subdir/TAGS || \ set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \ fi; \ done; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: CTAGS CTAGS: ctags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ test -d "$(distdir)/$$subdir" \ || $(MKDIR_P) "$(distdir)/$$subdir" \ || exit 1; \ fi; \ done @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ dir1=$$subdir; dir2="$(distdir)/$$subdir"; \ $(am__relativize); \ new_distdir=$$reldir; \ dir1=$$subdir; dir2="$(top_distdir)"; \ $(am__relativize); \ new_top_distdir=$$reldir; \ echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \ echo " am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \ ($(am__cd) $$subdir && \ $(MAKE) $(AM_MAKEFLAGS) \ top_distdir="$$new_top_distdir" \ distdir="$$new_distdir" \ am__remove_distdir=: \ am__skip_length_check=: \ am__skip_mode_fix=: \ distdir) \ || exit 1; \ fi; \ done check-am: all-am check: check-recursive all-am: Makefile installdirs: installdirs-recursive installdirs-am: install: install-recursive install-exec: install-exec-recursive install-data: install-data-recursive uninstall: uninstall-recursive install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-recursive install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-recursive clean-am: clean-generic clean-libtool mostlyclean-am distclean: distclean-recursive -rm -f Makefile distclean-am: clean-am distclean-generic distclean-tags dvi: dvi-recursive dvi-am: html: html-recursive html-am: info: info-recursive info-am: install-data-am: install-dvi: install-dvi-recursive install-dvi-am: install-exec-am: install-html: install-html-recursive install-html-am: install-info: install-info-recursive install-info-am: install-man: install-pdf: install-pdf-recursive install-pdf-am: install-ps: install-ps-recursive install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-recursive -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-recursive mostlyclean-am: mostlyclean-generic mostlyclean-libtool pdf: pdf-recursive pdf-am: ps: ps-recursive ps-am: uninstall-am: .MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) ctags-recursive \ install-am install-strip tags-recursive .PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \ all all-am check check-am clean clean-generic clean-libtool \ ctags ctags-recursive distclean distclean-generic \ distclean-libtool distclean-tags distdir dvi dvi-am html \ html-am info info-am install install-am install-data \ install-data-am install-dvi install-dvi-am install-exec \ install-exec-am install-html install-html-am install-info \ install-info-am install-man install-pdf install-pdf-am \ install-ps install-ps-am install-strip installcheck \ installcheck-am installdirs installdirs-am maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-generic \ mostlyclean-libtool pdf pdf-am ps ps-am tags tags-recursive \ uninstall uninstall-am -include $(top_srcdir)/git.mk # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: libprelude-1.0.0/docs/manpages/0000775000076400007640000000000011347714757013415 500000000000000libprelude-1.0.0/docs/manpages/prelude-admin.10000664000076400007640000001225311202225026016120 00000000000000.TH "prelude-admin" 1 "19 June 2007" .SH NAME prelude-admin \- Manage agents accounts .SH SYNOPSIS .B prelude-admin [options] [args] .B prelude-admin add [--uid UID] [--gid GID] .B prelude-admin chown [--uid UID] [--gid GID] .B prelude-admin del .B prelude-admin rename .B prelude-admin register [--uid UID] [--gid GID] [--passwd=PASSWD>] [--passwd-file=] .B prelude-admin registration-server [--uid UID] [--gid GID] [--prompt] [--passwd=PASSWD>] [--passwd-file=] [--keepalive] [--no-confirm] [--listen] .B prelude-admin revoke [--uid UID] [--gid GID] .SH DESCRIPTION In order for an agent to communicate with a manager, it must be registered. Registration involves several steps: - Allocating an unique identity for the agent - Creating directory to be used by the agent (example: failover purpose) - Registering to a remote 'prelude-manager': get a signed X509 certificate that will allow communication between agent and manager using the specified permissions. All these informations are stored in an agent profile. An agent profile is identified by its name. When an agent is started, it will load the profile of the same name as the program itself, that is, if your agent is named "prelude-lml", the agent will load the profile named "prelude-lml". The name of the profile can be overriden using the '--prelude --profile name_of_my_profile' command line option. It is possible to define the profile name so that you can have several instances of one agent running with different permissions, using different profiles. Note that profiles are not specific to agents, but are used in all programs of the Prelude suite (agents, managers, etc). If you are not sure which permission your agent should get, just start it and default permissions will be displayed. .SH OPTIONS .B is the default name of the agent you are installing or your own defined name. If you start your agent without prior registration, a warning is displayed including the default profile name on how to register the agent. .B is the permission your agent needs. It is composed of permission attributes (idmef or admin) and access type: read/write (r/w). By default, an agent need permissions for writing IDMEF to a manager, and reading administrative command sent to it. That is : "idmef:w admin:r". .B is the address of the prelude-manager you wish to register. this can either be its IP address or its hostname. If you made a local installation, you can write localhost to connect via unix socket. Remember to use the correct uid/gid when registering your agent. For instance, if you want to register snort (running with snort euid / egid), use --uid snort --gid snort. .TP 5 .B add Setup a new agent user. .B --uid=UID UID or user to use to setup agent files. .B --gid=GID GID or group to use to setup agent files. .TP .B chown Change analyzer owner. .B --uid=UID UID or user to use to setup agent files. .B --gid=GID GID or group to use to setup agent files. .TP .B del The delete command will remove the agent files created through "add" command. Once this is done, the analyzer can't be used unless "register" or "add" is called again. .TP .B rename Rename an existing analyzer. .TP .B register Register an analyzer. Register and create the analyzer basic setup if needed. It will also configure communication of this analyzer with a receiving analyzer (like a Manager) through the specified registration-server. .B --uid=UID UID or user to use to setup analyzer files. .B --gid=GID GID or group to use to setup analyzer files. .B --passwd=PASSWD Use provided password instead of prompting it. .B --passwd-file=-|FILE Read password from file instead of prompting it (- for stdin). .TP .B registration-server Start a registration server to register agents. This is used in order to register 'sending' analyzer to 'receiving' analyzer. should be set to the profile name of the 'receiving' analyzer, the one where 'sending' analyzer will register to. .B --uid=UID UID or user to use to setup 'receiving' analyzer files. .B --gid=GID GID or group to use to setup 'receiving' analyzer files. .B --prompt Prompt for a password instead of auto generating it. .B --passwd=PASSWD Use provided password instead of auto generating it. .B --passwd-file=-|FILE Read password from file instead of auto generating it (- for stdin). .B --keepalive Register analyzer in an infinite loop. .B --no-confirm Do not ask for confirmation on agent registration. .B --listen Address to listen on for registration request (default is any:5553). .TP .B revoke Revoke access to for the given analyzerID. .B --uid=UID UID or user to use to setup analyzer files. .B --gid=GID GID to group to use to setup analyzer files. .TP .B --help Print help .SH AUTHOR This man page has been written by Frederic Motte libprelude-1.0.0/docs/manpages/Makefile.am0000664000076400007640000000010011202312107015325 00000000000000dist_man_MANS = prelude-admin.1 -include $(top_srcdir)/git.mk libprelude-1.0.0/docs/manpages/Makefile.in0000664000076400007640000013167111347714455015406 00000000000000# Makefile.in generated by automake 1.11.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, # Inc. # This Makefile.in 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. @SET_MAKE@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ target_triplet = @target@ subdir = docs/manpages DIST_COMMON = $(dist_man_MANS) $(srcdir)/Makefile.am \ $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/libmissing/m4/00gnulib.m4 \ $(top_srcdir)/libmissing/m4/alloca.m4 \ $(top_srcdir)/libmissing/m4/arpa_inet_h.m4 \ $(top_srcdir)/libmissing/m4/btowc.m4 \ $(top_srcdir)/libmissing/m4/close.m4 \ $(top_srcdir)/libmissing/m4/codeset.m4 \ $(top_srcdir)/libmissing/m4/cond.m4 \ $(top_srcdir)/libmissing/m4/dos.m4 \ $(top_srcdir)/libmissing/m4/dup2.m4 \ $(top_srcdir)/libmissing/m4/errno_h.m4 \ $(top_srcdir)/libmissing/m4/exponentd.m4 \ $(top_srcdir)/libmissing/m4/exponentf.m4 \ $(top_srcdir)/libmissing/m4/exponentl.m4 \ $(top_srcdir)/libmissing/m4/extensions.m4 \ $(top_srcdir)/libmissing/m4/fclose.m4 \ $(top_srcdir)/libmissing/m4/fcntl-o.m4 \ $(top_srcdir)/libmissing/m4/fcntl_h.m4 \ $(top_srcdir)/libmissing/m4/float_h.m4 \ $(top_srcdir)/libmissing/m4/fopen.m4 \ $(top_srcdir)/libmissing/m4/fpieee.m4 \ $(top_srcdir)/libmissing/m4/frexp.m4 \ $(top_srcdir)/libmissing/m4/frexpl.m4 \ $(top_srcdir)/libmissing/m4/fseeko.m4 \ $(top_srcdir)/libmissing/m4/ftw.m4 \ $(top_srcdir)/libmissing/m4/getaddrinfo.m4 \ $(top_srcdir)/libmissing/m4/getdelim.m4 \ $(top_srcdir)/libmissing/m4/gethostname.m4 \ $(top_srcdir)/libmissing/m4/getline.m4 \ $(top_srcdir)/libmissing/m4/getpagesize.m4 \ $(top_srcdir)/libmissing/m4/getpass.m4 \ $(top_srcdir)/libmissing/m4/gettimeofday.m4 \ $(top_srcdir)/libmissing/m4/glibc21.m4 \ $(top_srcdir)/libmissing/m4/gnulib-common.m4 \ $(top_srcdir)/libmissing/m4/gnulib-comp.m4 \ $(top_srcdir)/libmissing/m4/gnulib-tool.m4 \ $(top_srcdir)/libmissing/m4/hostent.m4 \ $(top_srcdir)/libmissing/m4/include_next.m4 \ $(top_srcdir)/libmissing/m4/inet_ntop.m4 \ $(top_srcdir)/libmissing/m4/inet_pton.m4 \ $(top_srcdir)/libmissing/m4/intmax_t.m4 \ $(top_srcdir)/libmissing/m4/inttypes_h.m4 \ $(top_srcdir)/libmissing/m4/isnand.m4 \ $(top_srcdir)/libmissing/m4/isnanf.m4 \ $(top_srcdir)/libmissing/m4/isnanl.m4 \ $(top_srcdir)/libmissing/m4/langinfo_h.m4 \ $(top_srcdir)/libmissing/m4/ldexpl.m4 \ $(top_srcdir)/libmissing/m4/lib-ld.m4 \ $(top_srcdir)/libmissing/m4/lib-link.m4 \ $(top_srcdir)/libmissing/m4/lib-prefix.m4 \ $(top_srcdir)/libmissing/m4/localcharset.m4 \ $(top_srcdir)/libmissing/m4/locale-fr.m4 \ $(top_srcdir)/libmissing/m4/locale-ja.m4 \ $(top_srcdir)/libmissing/m4/locale-tr.m4 \ $(top_srcdir)/libmissing/m4/locale-zh.m4 \ $(top_srcdir)/libmissing/m4/lock.m4 \ $(top_srcdir)/libmissing/m4/longlong.m4 \ $(top_srcdir)/libmissing/m4/lseek.m4 \ $(top_srcdir)/libmissing/m4/lstat.m4 \ $(top_srcdir)/libmissing/m4/malloc.m4 \ $(top_srcdir)/libmissing/m4/math_h.m4 \ $(top_srcdir)/libmissing/m4/mbrtowc.m4 \ $(top_srcdir)/libmissing/m4/mbsinit.m4 \ $(top_srcdir)/libmissing/m4/mbstate_t.m4 \ $(top_srcdir)/libmissing/m4/memchr.m4 \ $(top_srcdir)/libmissing/m4/memmem.m4 \ $(top_srcdir)/libmissing/m4/minmax.m4 \ $(top_srcdir)/libmissing/m4/mktime.m4 \ $(top_srcdir)/libmissing/m4/mmap-anon.m4 \ $(top_srcdir)/libmissing/m4/mode_t.m4 \ $(top_srcdir)/libmissing/m4/multiarch.m4 \ $(top_srcdir)/libmissing/m4/netdb_h.m4 \ $(top_srcdir)/libmissing/m4/netinet_in_h.m4 \ $(top_srcdir)/libmissing/m4/nl_langinfo.m4 \ $(top_srcdir)/libmissing/m4/nocrash.m4 \ $(top_srcdir)/libmissing/m4/onceonly.m4 \ $(top_srcdir)/libmissing/m4/open.m4 \ $(top_srcdir)/libmissing/m4/pathmax.m4 \ $(top_srcdir)/libmissing/m4/perror.m4 \ $(top_srcdir)/libmissing/m4/poll.m4 \ $(top_srcdir)/libmissing/m4/printf-frexp.m4 \ $(top_srcdir)/libmissing/m4/printf-frexpl.m4 \ $(top_srcdir)/libmissing/m4/printf.m4 \ $(top_srcdir)/libmissing/m4/realloc.m4 \ $(top_srcdir)/libmissing/m4/regex.m4 \ $(top_srcdir)/libmissing/m4/relocatable-lib.m4 \ $(top_srcdir)/libmissing/m4/select.m4 \ $(top_srcdir)/libmissing/m4/servent.m4 \ $(top_srcdir)/libmissing/m4/signal_h.m4 \ $(top_srcdir)/libmissing/m4/signalblocking.m4 \ $(top_srcdir)/libmissing/m4/signbit.m4 \ $(top_srcdir)/libmissing/m4/size_max.m4 \ $(top_srcdir)/libmissing/m4/sleep.m4 \ $(top_srcdir)/libmissing/m4/snprintf-posix.m4 \ $(top_srcdir)/libmissing/m4/snprintf.m4 \ $(top_srcdir)/libmissing/m4/sockets.m4 \ $(top_srcdir)/libmissing/m4/socklen.m4 \ $(top_srcdir)/libmissing/m4/sockpfaf.m4 \ $(top_srcdir)/libmissing/m4/ssize_t.m4 \ $(top_srcdir)/libmissing/m4/stat.m4 \ $(top_srcdir)/libmissing/m4/stdbool.m4 \ $(top_srcdir)/libmissing/m4/stddef_h.m4 \ $(top_srcdir)/libmissing/m4/stdint.m4 \ $(top_srcdir)/libmissing/m4/stdint_h.m4 \ $(top_srcdir)/libmissing/m4/stdio_h.m4 \ $(top_srcdir)/libmissing/m4/stdlib_h.m4 \ $(top_srcdir)/libmissing/m4/strcase.m4 \ $(top_srcdir)/libmissing/m4/strcasestr.m4 \ $(top_srcdir)/libmissing/m4/strdup.m4 \ $(top_srcdir)/libmissing/m4/strerror.m4 \ $(top_srcdir)/libmissing/m4/string_h.m4 \ $(top_srcdir)/libmissing/m4/strings_h.m4 \ $(top_srcdir)/libmissing/m4/strndup.m4 \ $(top_srcdir)/libmissing/m4/strnlen.m4 \ $(top_srcdir)/libmissing/m4/strptime.m4 \ $(top_srcdir)/libmissing/m4/strsep.m4 \ $(top_srcdir)/libmissing/m4/symlink.m4 \ $(top_srcdir)/libmissing/m4/sys_ioctl_h.m4 \ $(top_srcdir)/libmissing/m4/sys_select_h.m4 \ $(top_srcdir)/libmissing/m4/sys_socket_h.m4 \ $(top_srcdir)/libmissing/m4/sys_stat_h.m4 \ $(top_srcdir)/libmissing/m4/sys_time_h.m4 \ $(top_srcdir)/libmissing/m4/sys_utsname_h.m4 \ $(top_srcdir)/libmissing/m4/thread.m4 \ $(top_srcdir)/libmissing/m4/threadlib.m4 \ $(top_srcdir)/libmissing/m4/time_h.m4 \ $(top_srcdir)/libmissing/m4/time_r.m4 \ $(top_srcdir)/libmissing/m4/timegm.m4 \ $(top_srcdir)/libmissing/m4/tls.m4 \ $(top_srcdir)/libmissing/m4/tm_gmtoff.m4 \ $(top_srcdir)/libmissing/m4/uname.m4 \ $(top_srcdir)/libmissing/m4/ungetc.m4 \ $(top_srcdir)/libmissing/m4/unistd_h.m4 \ $(top_srcdir)/libmissing/m4/vasnprintf.m4 \ $(top_srcdir)/libmissing/m4/vsnprintf-posix.m4 \ $(top_srcdir)/libmissing/m4/vsnprintf.m4 \ $(top_srcdir)/libmissing/m4/warn-on-use.m4 \ $(top_srcdir)/libmissing/m4/wchar.m4 \ $(top_srcdir)/libmissing/m4/wchar_t.m4 \ $(top_srcdir)/libmissing/m4/wcrtomb.m4 \ $(top_srcdir)/libmissing/m4/wctob.m4 \ $(top_srcdir)/libmissing/m4/wctype.m4 \ $(top_srcdir)/libmissing/m4/wint_t.m4 \ $(top_srcdir)/libmissing/m4/write.m4 \ $(top_srcdir)/libmissing/m4/xsize.m4 \ $(top_srcdir)/libmissing/m4/yield.m4 \ $(top_srcdir)/m4/ac_compile_check_sizeof.m4 \ $(top_srcdir)/m4/am_path_ruby.m4 $(top_srcdir)/m4/argz.m4 \ $(top_srcdir)/m4/as-ac-expand.m4 \ $(top_srcdir)/m4/ax_c_check_flag.m4 \ $(top_srcdir)/m4/ax_check_aligned_access_required.m4 \ $(top_srcdir)/m4/ax_create_prelude_inttypes_h.m4 \ $(top_srcdir)/m4/ax_ld_check_flag.m4 \ $(top_srcdir)/m4/gtk-doc.m4 $(top_srcdir)/m4/libgcrypt.m4 \ $(top_srcdir)/m4/libgnutls-extra.m4 \ $(top_srcdir)/m4/libgnutls.m4 $(top_srcdir)/m4/libtool.m4 \ $(top_srcdir)/m4/ltdl.m4 $(top_srcdir)/m4/ltoptions.m4 \ $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/m4/pkg.m4 \ $(top_srcdir)/configure.in am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = SOURCES = DIST_SOURCES = am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; am__install_max = 40 am__nobase_strip_setup = \ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` am__nobase_strip = \ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" am__nobase_list = $(am__nobase_strip_setup); \ for p in $$list; do echo "$$p $$p"; done | \ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ if (++n[$$2] == $(am__install_max)) \ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ END { for (dir in files) print dir, files[dir] }' am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' man1dir = $(mandir)/man1 am__installdirs = "$(DESTDIR)$(man1dir)" NROFF = nroff MANS = $(dist_man_MANS) DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ ALLOCA = @ALLOCA@ ALLOCA_H = @ALLOCA_H@ AMTAR = @AMTAR@ APPLE_UNIVERSAL_BUILD = @APPLE_UNIVERSAL_BUILD@ AR = @AR@ ARGZ_H = @ARGZ_H@ AS = @AS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ BINDINGS_CC = @BINDINGS_CC@ BINDIR = @BINDIR@ BITSIZEOF_PTRDIFF_T = @BITSIZEOF_PTRDIFF_T@ BITSIZEOF_SIG_ATOMIC_T = @BITSIZEOF_SIG_ATOMIC_T@ BITSIZEOF_SIZE_T = @BITSIZEOF_SIZE_T@ BITSIZEOF_WCHAR_T = @BITSIZEOF_WCHAR_T@ BITSIZEOF_WINT_T = @BITSIZEOF_WINT_T@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CC_FOR_BUILD = @CC_FOR_BUILD@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EMULTIHOP_HIDDEN = @EMULTIHOP_HIDDEN@ EMULTIHOP_VALUE = @EMULTIHOP_VALUE@ ENOLINK_HIDDEN = @ENOLINK_HIDDEN@ ENOLINK_VALUE = @ENOLINK_VALUE@ EOVERFLOW_HIDDEN = @EOVERFLOW_HIDDEN@ EOVERFLOW_VALUE = @EOVERFLOW_VALUE@ ERRNO_H = @ERRNO_H@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ FLOAT_H = @FLOAT_H@ GETADDRINFO_LIB = @GETADDRINFO_LIB@ GETHOSTNAME_LIB = @GETHOSTNAME_LIB@ GLIBC21 = @GLIBC21@ GNULIB_ACCEPT = @GNULIB_ACCEPT@ GNULIB_ACCEPT4 = @GNULIB_ACCEPT4@ GNULIB_ACOSL = @GNULIB_ACOSL@ GNULIB_ASINL = @GNULIB_ASINL@ GNULIB_ATANL = @GNULIB_ATANL@ GNULIB_ATOLL = @GNULIB_ATOLL@ GNULIB_BIND = @GNULIB_BIND@ GNULIB_BTOWC = @GNULIB_BTOWC@ GNULIB_CALLOC_POSIX = @GNULIB_CALLOC_POSIX@ GNULIB_CANONICALIZE_FILE_NAME = @GNULIB_CANONICALIZE_FILE_NAME@ GNULIB_CEILF = @GNULIB_CEILF@ GNULIB_CEILL = @GNULIB_CEILL@ GNULIB_CHOWN = @GNULIB_CHOWN@ GNULIB_CLOSE = @GNULIB_CLOSE@ GNULIB_CONNECT = @GNULIB_CONNECT@ GNULIB_COSL = @GNULIB_COSL@ GNULIB_DPRINTF = @GNULIB_DPRINTF@ GNULIB_DUP2 = @GNULIB_DUP2@ GNULIB_DUP3 = @GNULIB_DUP3@ GNULIB_ENVIRON = @GNULIB_ENVIRON@ GNULIB_EUIDACCESS = @GNULIB_EUIDACCESS@ GNULIB_EXPL = @GNULIB_EXPL@ GNULIB_FACCESSAT = @GNULIB_FACCESSAT@ GNULIB_FCHDIR = @GNULIB_FCHDIR@ GNULIB_FCHMODAT = @GNULIB_FCHMODAT@ GNULIB_FCHOWNAT = @GNULIB_FCHOWNAT@ GNULIB_FCLOSE = @GNULIB_FCLOSE@ GNULIB_FCNTL = @GNULIB_FCNTL@ GNULIB_FFLUSH = @GNULIB_FFLUSH@ GNULIB_FLOORF = @GNULIB_FLOORF@ GNULIB_FLOORL = @GNULIB_FLOORL@ GNULIB_FOPEN = @GNULIB_FOPEN@ GNULIB_FPRINTF = @GNULIB_FPRINTF@ GNULIB_FPRINTF_POSIX = @GNULIB_FPRINTF_POSIX@ GNULIB_FPURGE = @GNULIB_FPURGE@ GNULIB_FPUTC = @GNULIB_FPUTC@ GNULIB_FPUTS = @GNULIB_FPUTS@ GNULIB_FREOPEN = @GNULIB_FREOPEN@ GNULIB_FREXP = @GNULIB_FREXP@ GNULIB_FREXPL = @GNULIB_FREXPL@ GNULIB_FSEEK = @GNULIB_FSEEK@ GNULIB_FSEEKO = @GNULIB_FSEEKO@ GNULIB_FSTATAT = @GNULIB_FSTATAT@ GNULIB_FSYNC = @GNULIB_FSYNC@ GNULIB_FTELL = @GNULIB_FTELL@ GNULIB_FTELLO = @GNULIB_FTELLO@ GNULIB_FTRUNCATE = @GNULIB_FTRUNCATE@ GNULIB_FUTIMENS = @GNULIB_FUTIMENS@ GNULIB_FWRITE = @GNULIB_FWRITE@ GNULIB_GETADDRINFO = @GNULIB_GETADDRINFO@ GNULIB_GETCWD = @GNULIB_GETCWD@ GNULIB_GETDELIM = @GNULIB_GETDELIM@ GNULIB_GETDOMAINNAME = @GNULIB_GETDOMAINNAME@ GNULIB_GETDTABLESIZE = @GNULIB_GETDTABLESIZE@ GNULIB_GETGROUPS = @GNULIB_GETGROUPS@ GNULIB_GETHOSTNAME = @GNULIB_GETHOSTNAME@ GNULIB_GETLINE = @GNULIB_GETLINE@ GNULIB_GETLOADAVG = @GNULIB_GETLOADAVG@ GNULIB_GETLOGIN = @GNULIB_GETLOGIN@ GNULIB_GETLOGIN_R = @GNULIB_GETLOGIN_R@ GNULIB_GETPAGESIZE = @GNULIB_GETPAGESIZE@ GNULIB_GETPEERNAME = @GNULIB_GETPEERNAME@ GNULIB_GETSOCKNAME = @GNULIB_GETSOCKNAME@ GNULIB_GETSOCKOPT = @GNULIB_GETSOCKOPT@ GNULIB_GETSUBOPT = @GNULIB_GETSUBOPT@ GNULIB_GETTIMEOFDAY = @GNULIB_GETTIMEOFDAY@ GNULIB_GETUSERSHELL = @GNULIB_GETUSERSHELL@ GNULIB_INET_NTOP = @GNULIB_INET_NTOP@ GNULIB_INET_PTON = @GNULIB_INET_PTON@ GNULIB_IOCTL = @GNULIB_IOCTL@ GNULIB_ISFINITE = @GNULIB_ISFINITE@ GNULIB_ISINF = @GNULIB_ISINF@ GNULIB_ISNAN = @GNULIB_ISNAN@ GNULIB_ISNAND = @GNULIB_ISNAND@ GNULIB_ISNANF = @GNULIB_ISNANF@ GNULIB_ISNANL = @GNULIB_ISNANL@ GNULIB_LCHMOD = @GNULIB_LCHMOD@ GNULIB_LCHOWN = @GNULIB_LCHOWN@ GNULIB_LDEXPL = @GNULIB_LDEXPL@ GNULIB_LINK = @GNULIB_LINK@ GNULIB_LINKAT = @GNULIB_LINKAT@ GNULIB_LISTEN = @GNULIB_LISTEN@ GNULIB_LOGL = @GNULIB_LOGL@ GNULIB_LSEEK = @GNULIB_LSEEK@ GNULIB_LSTAT = @GNULIB_LSTAT@ GNULIB_MALLOC_POSIX = @GNULIB_MALLOC_POSIX@ GNULIB_MBRLEN = @GNULIB_MBRLEN@ GNULIB_MBRTOWC = @GNULIB_MBRTOWC@ GNULIB_MBSCASECMP = @GNULIB_MBSCASECMP@ GNULIB_MBSCASESTR = @GNULIB_MBSCASESTR@ GNULIB_MBSCHR = @GNULIB_MBSCHR@ GNULIB_MBSCSPN = @GNULIB_MBSCSPN@ GNULIB_MBSINIT = @GNULIB_MBSINIT@ GNULIB_MBSLEN = @GNULIB_MBSLEN@ GNULIB_MBSNCASECMP = @GNULIB_MBSNCASECMP@ GNULIB_MBSNLEN = @GNULIB_MBSNLEN@ GNULIB_MBSNRTOWCS = @GNULIB_MBSNRTOWCS@ GNULIB_MBSPBRK = @GNULIB_MBSPBRK@ GNULIB_MBSPCASECMP = @GNULIB_MBSPCASECMP@ GNULIB_MBSRCHR = @GNULIB_MBSRCHR@ GNULIB_MBSRTOWCS = @GNULIB_MBSRTOWCS@ GNULIB_MBSSEP = @GNULIB_MBSSEP@ GNULIB_MBSSPN = @GNULIB_MBSSPN@ GNULIB_MBSSTR = @GNULIB_MBSSTR@ GNULIB_MBSTOK_R = @GNULIB_MBSTOK_R@ GNULIB_MEMCHR = @GNULIB_MEMCHR@ GNULIB_MEMMEM = @GNULIB_MEMMEM@ GNULIB_MEMPCPY = @GNULIB_MEMPCPY@ GNULIB_MEMRCHR = @GNULIB_MEMRCHR@ GNULIB_MKDIRAT = @GNULIB_MKDIRAT@ GNULIB_MKDTEMP = @GNULIB_MKDTEMP@ GNULIB_MKFIFO = @GNULIB_MKFIFO@ GNULIB_MKFIFOAT = @GNULIB_MKFIFOAT@ GNULIB_MKNOD = @GNULIB_MKNOD@ GNULIB_MKNODAT = @GNULIB_MKNODAT@ GNULIB_MKOSTEMP = @GNULIB_MKOSTEMP@ GNULIB_MKOSTEMPS = @GNULIB_MKOSTEMPS@ GNULIB_MKSTEMP = @GNULIB_MKSTEMP@ GNULIB_MKSTEMPS = @GNULIB_MKSTEMPS@ GNULIB_NL_LANGINFO = @GNULIB_NL_LANGINFO@ GNULIB_OBSTACK_PRINTF = @GNULIB_OBSTACK_PRINTF@ GNULIB_OBSTACK_PRINTF_POSIX = @GNULIB_OBSTACK_PRINTF_POSIX@ GNULIB_OPEN = @GNULIB_OPEN@ GNULIB_OPENAT = @GNULIB_OPENAT@ GNULIB_PERROR = @GNULIB_PERROR@ GNULIB_PIPE2 = @GNULIB_PIPE2@ GNULIB_POPEN = @GNULIB_POPEN@ GNULIB_PREAD = @GNULIB_PREAD@ GNULIB_PRINTF = @GNULIB_PRINTF@ GNULIB_PRINTF_POSIX = @GNULIB_PRINTF_POSIX@ GNULIB_PUTC = @GNULIB_PUTC@ GNULIB_PUTCHAR = @GNULIB_PUTCHAR@ GNULIB_PUTENV = @GNULIB_PUTENV@ GNULIB_PUTS = @GNULIB_PUTS@ GNULIB_RANDOM_R = @GNULIB_RANDOM_R@ GNULIB_RAWMEMCHR = @GNULIB_RAWMEMCHR@ GNULIB_READLINK = @GNULIB_READLINK@ GNULIB_READLINKAT = @GNULIB_READLINKAT@ GNULIB_REALLOC_POSIX = @GNULIB_REALLOC_POSIX@ GNULIB_REALPATH = @GNULIB_REALPATH@ GNULIB_RECV = @GNULIB_RECV@ GNULIB_RECVFROM = @GNULIB_RECVFROM@ GNULIB_REMOVE = @GNULIB_REMOVE@ GNULIB_RENAME = @GNULIB_RENAME@ GNULIB_RENAMEAT = @GNULIB_RENAMEAT@ GNULIB_RMDIR = @GNULIB_RMDIR@ GNULIB_ROUND = @GNULIB_ROUND@ GNULIB_ROUNDF = @GNULIB_ROUNDF@ GNULIB_ROUNDL = @GNULIB_ROUNDL@ GNULIB_RPMATCH = @GNULIB_RPMATCH@ GNULIB_SELECT = @GNULIB_SELECT@ GNULIB_SEND = @GNULIB_SEND@ GNULIB_SENDTO = @GNULIB_SENDTO@ GNULIB_SETENV = @GNULIB_SETENV@ GNULIB_SETSOCKOPT = @GNULIB_SETSOCKOPT@ GNULIB_SHUTDOWN = @GNULIB_SHUTDOWN@ GNULIB_SIGACTION = @GNULIB_SIGACTION@ GNULIB_SIGNAL_H_SIGPIPE = @GNULIB_SIGNAL_H_SIGPIPE@ GNULIB_SIGNBIT = @GNULIB_SIGNBIT@ GNULIB_SIGPROCMASK = @GNULIB_SIGPROCMASK@ GNULIB_SINL = @GNULIB_SINL@ GNULIB_SLEEP = @GNULIB_SLEEP@ GNULIB_SNPRINTF = @GNULIB_SNPRINTF@ GNULIB_SOCKET = @GNULIB_SOCKET@ GNULIB_SPRINTF_POSIX = @GNULIB_SPRINTF_POSIX@ GNULIB_SQRTL = @GNULIB_SQRTL@ GNULIB_STAT = @GNULIB_STAT@ GNULIB_STDIO_H_SIGPIPE = @GNULIB_STDIO_H_SIGPIPE@ GNULIB_STPCPY = @GNULIB_STPCPY@ GNULIB_STPNCPY = @GNULIB_STPNCPY@ GNULIB_STRCASESTR = @GNULIB_STRCASESTR@ GNULIB_STRCHRNUL = @GNULIB_STRCHRNUL@ GNULIB_STRDUP = @GNULIB_STRDUP@ GNULIB_STRERROR = @GNULIB_STRERROR@ GNULIB_STRNDUP = @GNULIB_STRNDUP@ GNULIB_STRNLEN = @GNULIB_STRNLEN@ GNULIB_STRPBRK = @GNULIB_STRPBRK@ GNULIB_STRSEP = @GNULIB_STRSEP@ GNULIB_STRSIGNAL = @GNULIB_STRSIGNAL@ GNULIB_STRSTR = @GNULIB_STRSTR@ GNULIB_STRTOD = @GNULIB_STRTOD@ GNULIB_STRTOK_R = @GNULIB_STRTOK_R@ GNULIB_STRTOLL = @GNULIB_STRTOLL@ GNULIB_STRTOULL = @GNULIB_STRTOULL@ GNULIB_STRVERSCMP = @GNULIB_STRVERSCMP@ GNULIB_SYMLINK = @GNULIB_SYMLINK@ GNULIB_SYMLINKAT = @GNULIB_SYMLINKAT@ GNULIB_TANL = @GNULIB_TANL@ GNULIB_TRUNC = @GNULIB_TRUNC@ GNULIB_TRUNCF = @GNULIB_TRUNCF@ GNULIB_TRUNCL = @GNULIB_TRUNCL@ GNULIB_UNAME = @GNULIB_UNAME@ GNULIB_UNISTD_H_GETOPT = @GNULIB_UNISTD_H_GETOPT@ GNULIB_UNISTD_H_SIGPIPE = @GNULIB_UNISTD_H_SIGPIPE@ GNULIB_UNLINK = @GNULIB_UNLINK@ GNULIB_UNLINKAT = @GNULIB_UNLINKAT@ GNULIB_UNSETENV = @GNULIB_UNSETENV@ GNULIB_USLEEP = @GNULIB_USLEEP@ GNULIB_UTIMENSAT = @GNULIB_UTIMENSAT@ GNULIB_VASPRINTF = @GNULIB_VASPRINTF@ GNULIB_VDPRINTF = @GNULIB_VDPRINTF@ GNULIB_VFPRINTF = @GNULIB_VFPRINTF@ GNULIB_VFPRINTF_POSIX = @GNULIB_VFPRINTF_POSIX@ GNULIB_VPRINTF = @GNULIB_VPRINTF@ GNULIB_VPRINTF_POSIX = @GNULIB_VPRINTF_POSIX@ GNULIB_VSNPRINTF = @GNULIB_VSNPRINTF@ GNULIB_VSPRINTF_POSIX = @GNULIB_VSPRINTF_POSIX@ GNULIB_WCRTOMB = @GNULIB_WCRTOMB@ GNULIB_WCSNRTOMBS = @GNULIB_WCSNRTOMBS@ GNULIB_WCSRTOMBS = @GNULIB_WCSRTOMBS@ GNULIB_WCTOB = @GNULIB_WCTOB@ GNULIB_WCWIDTH = @GNULIB_WCWIDTH@ GNULIB_WRITE = @GNULIB_WRITE@ GREP = @GREP@ GTKDOC_CHECK = @GTKDOC_CHECK@ HAVE_ACCEPT4 = @HAVE_ACCEPT4@ HAVE_ACOSL = @HAVE_ACOSL@ HAVE_ARPA_INET_H = @HAVE_ARPA_INET_H@ HAVE_ASINL = @HAVE_ASINL@ HAVE_ATANL = @HAVE_ATANL@ HAVE_ATOLL = @HAVE_ATOLL@ HAVE_BTOWC = @HAVE_BTOWC@ HAVE_CALLOC_POSIX = @HAVE_CALLOC_POSIX@ HAVE_CANONICALIZE_FILE_NAME = @HAVE_CANONICALIZE_FILE_NAME@ HAVE_CHOWN = @HAVE_CHOWN@ HAVE_COSL = @HAVE_COSL@ HAVE_CXX = @HAVE_CXX@ HAVE_DECL_ACOSL = @HAVE_DECL_ACOSL@ HAVE_DECL_ASINL = @HAVE_DECL_ASINL@ HAVE_DECL_ATANL = @HAVE_DECL_ATANL@ HAVE_DECL_COSL = @HAVE_DECL_COSL@ HAVE_DECL_ENVIRON = @HAVE_DECL_ENVIRON@ HAVE_DECL_EXPL = @HAVE_DECL_EXPL@ HAVE_DECL_FPURGE = @HAVE_DECL_FPURGE@ HAVE_DECL_FREEADDRINFO = @HAVE_DECL_FREEADDRINFO@ HAVE_DECL_FREXPL = @HAVE_DECL_FREXPL@ HAVE_DECL_GAI_STRERROR = @HAVE_DECL_GAI_STRERROR@ HAVE_DECL_GETADDRINFO = @HAVE_DECL_GETADDRINFO@ HAVE_DECL_GETDELIM = @HAVE_DECL_GETDELIM@ HAVE_DECL_GETLINE = @HAVE_DECL_GETLINE@ HAVE_DECL_GETLOADAVG = @HAVE_DECL_GETLOADAVG@ HAVE_DECL_GETLOGIN_R = @HAVE_DECL_GETLOGIN_R@ HAVE_DECL_GETNAMEINFO = @HAVE_DECL_GETNAMEINFO@ HAVE_DECL_INET_NTOP = @HAVE_DECL_INET_NTOP@ HAVE_DECL_INET_PTON = @HAVE_DECL_INET_PTON@ HAVE_DECL_LDEXPL = @HAVE_DECL_LDEXPL@ HAVE_DECL_LOGL = @HAVE_DECL_LOGL@ HAVE_DECL_MEMMEM = @HAVE_DECL_MEMMEM@ HAVE_DECL_MEMRCHR = @HAVE_DECL_MEMRCHR@ HAVE_DECL_OBSTACK_PRINTF = @HAVE_DECL_OBSTACK_PRINTF@ HAVE_DECL_SINL = @HAVE_DECL_SINL@ HAVE_DECL_SNPRINTF = @HAVE_DECL_SNPRINTF@ HAVE_DECL_SQRTL = @HAVE_DECL_SQRTL@ HAVE_DECL_STRDUP = @HAVE_DECL_STRDUP@ HAVE_DECL_STRERROR = @HAVE_DECL_STRERROR@ HAVE_DECL_STRNCASECMP = @HAVE_DECL_STRNCASECMP@ HAVE_DECL_STRNDUP = @HAVE_DECL_STRNDUP@ HAVE_DECL_STRNLEN = @HAVE_DECL_STRNLEN@ HAVE_DECL_STRSIGNAL = @HAVE_DECL_STRSIGNAL@ HAVE_DECL_STRTOK_R = @HAVE_DECL_STRTOK_R@ HAVE_DECL_TANL = @HAVE_DECL_TANL@ HAVE_DECL_TRUNC = @HAVE_DECL_TRUNC@ HAVE_DECL_TRUNCF = @HAVE_DECL_TRUNCF@ HAVE_DECL_VSNPRINTF = @HAVE_DECL_VSNPRINTF@ HAVE_DECL_WCTOB = @HAVE_DECL_WCTOB@ HAVE_DECL_WCWIDTH = @HAVE_DECL_WCWIDTH@ HAVE_DPRINTF = @HAVE_DPRINTF@ HAVE_DUP2 = @HAVE_DUP2@ HAVE_DUP3 = @HAVE_DUP3@ HAVE_EUIDACCESS = @HAVE_EUIDACCESS@ HAVE_EXPL = @HAVE_EXPL@ HAVE_FACCESSAT = @HAVE_FACCESSAT@ HAVE_FCHMODAT = @HAVE_FCHMODAT@ HAVE_FCHOWNAT = @HAVE_FCHOWNAT@ HAVE_FCNTL = @HAVE_FCNTL@ HAVE_FSTATAT = @HAVE_FSTATAT@ HAVE_FSYNC = @HAVE_FSYNC@ HAVE_FTRUNCATE = @HAVE_FTRUNCATE@ HAVE_FUTIMENS = @HAVE_FUTIMENS@ HAVE_GETDOMAINNAME = @HAVE_GETDOMAINNAME@ HAVE_GETDTABLESIZE = @HAVE_GETDTABLESIZE@ HAVE_GETGROUPS = @HAVE_GETGROUPS@ HAVE_GETHOSTNAME = @HAVE_GETHOSTNAME@ HAVE_GETLOGIN = @HAVE_GETLOGIN@ HAVE_GETPAGESIZE = @HAVE_GETPAGESIZE@ HAVE_GETSUBOPT = @HAVE_GETSUBOPT@ HAVE_GETUSERSHELL = @HAVE_GETUSERSHELL@ HAVE_INTTYPES_H = @HAVE_INTTYPES_H@ HAVE_ISNAND = @HAVE_ISNAND@ HAVE_ISNANF = @HAVE_ISNANF@ HAVE_ISNANL = @HAVE_ISNANL@ HAVE_ISWCNTRL = @HAVE_ISWCNTRL@ HAVE_LANGINFO_CODESET = @HAVE_LANGINFO_CODESET@ HAVE_LANGINFO_ERA = @HAVE_LANGINFO_ERA@ HAVE_LANGINFO_H = @HAVE_LANGINFO_H@ HAVE_LCHMOD = @HAVE_LCHMOD@ HAVE_LCHOWN = @HAVE_LCHOWN@ HAVE_LINK = @HAVE_LINK@ HAVE_LINKAT = @HAVE_LINKAT@ HAVE_LOGL = @HAVE_LOGL@ HAVE_LONG_LONG_INT = @HAVE_LONG_LONG_INT@ HAVE_LSTAT = @HAVE_LSTAT@ HAVE_MALLOC_POSIX = @HAVE_MALLOC_POSIX@ HAVE_MBRLEN = @HAVE_MBRLEN@ HAVE_MBRTOWC = @HAVE_MBRTOWC@ HAVE_MBSINIT = @HAVE_MBSINIT@ HAVE_MBSLEN = @HAVE_MBSLEN@ HAVE_MBSNRTOWCS = @HAVE_MBSNRTOWCS@ HAVE_MBSRTOWCS = @HAVE_MBSRTOWCS@ HAVE_MEMPCPY = @HAVE_MEMPCPY@ HAVE_MKDIRAT = @HAVE_MKDIRAT@ HAVE_MKDTEMP = @HAVE_MKDTEMP@ HAVE_MKFIFO = @HAVE_MKFIFO@ HAVE_MKFIFOAT = @HAVE_MKFIFOAT@ HAVE_MKNOD = @HAVE_MKNOD@ HAVE_MKNODAT = @HAVE_MKNODAT@ HAVE_MKOSTEMP = @HAVE_MKOSTEMP@ HAVE_MKOSTEMPS = @HAVE_MKOSTEMPS@ HAVE_MKSTEMPS = @HAVE_MKSTEMPS@ HAVE_NETDB_H = @HAVE_NETDB_H@ HAVE_NETINET_IN_H = @HAVE_NETINET_IN_H@ HAVE_NL_LANGINFO = @HAVE_NL_LANGINFO@ HAVE_OPENAT = @HAVE_OPENAT@ HAVE_OS_H = @HAVE_OS_H@ HAVE_PIPE2 = @HAVE_PIPE2@ HAVE_POSIX_SIGNALBLOCKING = @HAVE_POSIX_SIGNALBLOCKING@ HAVE_PREAD = @HAVE_PREAD@ HAVE_RANDOM_H = @HAVE_RANDOM_H@ HAVE_RANDOM_R = @HAVE_RANDOM_R@ HAVE_RAWMEMCHR = @HAVE_RAWMEMCHR@ HAVE_READLINK = @HAVE_READLINK@ HAVE_READLINKAT = @HAVE_READLINKAT@ HAVE_REALLOC_POSIX = @HAVE_REALLOC_POSIX@ HAVE_REALPATH = @HAVE_REALPATH@ HAVE_RENAMEAT = @HAVE_RENAMEAT@ HAVE_RPMATCH = @HAVE_RPMATCH@ HAVE_SA_FAMILY_T = @HAVE_SA_FAMILY_T@ HAVE_SETENV = @HAVE_SETENV@ HAVE_SIGACTION = @HAVE_SIGACTION@ HAVE_SIGINFO_T = @HAVE_SIGINFO_T@ HAVE_SIGNED_SIG_ATOMIC_T = @HAVE_SIGNED_SIG_ATOMIC_T@ HAVE_SIGNED_WCHAR_T = @HAVE_SIGNED_WCHAR_T@ HAVE_SIGNED_WINT_T = @HAVE_SIGNED_WINT_T@ HAVE_SIGSET_T = @HAVE_SIGSET_T@ HAVE_SINL = @HAVE_SINL@ HAVE_SLEEP = @HAVE_SLEEP@ HAVE_SQRTL = @HAVE_SQRTL@ HAVE_STDINT_H = @HAVE_STDINT_H@ HAVE_STPCPY = @HAVE_STPCPY@ HAVE_STPNCPY = @HAVE_STPNCPY@ HAVE_STRCASECMP = @HAVE_STRCASECMP@ HAVE_STRCASESTR = @HAVE_STRCASESTR@ HAVE_STRCHRNUL = @HAVE_STRCHRNUL@ HAVE_STRPBRK = @HAVE_STRPBRK@ HAVE_STRSEP = @HAVE_STRSEP@ HAVE_STRTOD = @HAVE_STRTOD@ HAVE_STRTOLL = @HAVE_STRTOLL@ HAVE_STRTOULL = @HAVE_STRTOULL@ HAVE_STRUCT_ADDRINFO = @HAVE_STRUCT_ADDRINFO@ HAVE_STRUCT_RANDOM_DATA = @HAVE_STRUCT_RANDOM_DATA@ HAVE_STRUCT_SIGACTION_SA_SIGACTION = @HAVE_STRUCT_SIGACTION_SA_SIGACTION@ HAVE_STRUCT_SOCKADDR_STORAGE = @HAVE_STRUCT_SOCKADDR_STORAGE@ HAVE_STRUCT_TIMEVAL = @HAVE_STRUCT_TIMEVAL@ HAVE_STRUCT_UTSNAME = @HAVE_STRUCT_UTSNAME@ HAVE_STRVERSCMP = @HAVE_STRVERSCMP@ HAVE_SYMLINK = @HAVE_SYMLINK@ HAVE_SYMLINKAT = @HAVE_SYMLINKAT@ HAVE_SYS_BITYPES_H = @HAVE_SYS_BITYPES_H@ HAVE_SYS_INTTYPES_H = @HAVE_SYS_INTTYPES_H@ HAVE_SYS_IOCTL_H = @HAVE_SYS_IOCTL_H@ HAVE_SYS_LOADAVG_H = @HAVE_SYS_LOADAVG_H@ HAVE_SYS_PARAM_H = @HAVE_SYS_PARAM_H@ HAVE_SYS_SELECT_H = @HAVE_SYS_SELECT_H@ HAVE_SYS_SOCKET_H = @HAVE_SYS_SOCKET_H@ HAVE_SYS_TIME_H = @HAVE_SYS_TIME_H@ HAVE_SYS_TYPES_H = @HAVE_SYS_TYPES_H@ HAVE_SYS_UTSNAME_H = @HAVE_SYS_UTSNAME_H@ HAVE_TANL = @HAVE_TANL@ HAVE_TYPE_VOLATILE_SIG_ATOMIC_T = @HAVE_TYPE_VOLATILE_SIG_ATOMIC_T@ HAVE_UNAME = @HAVE_UNAME@ HAVE_UNISTD_H = @HAVE_UNISTD_H@ HAVE_UNLINKAT = @HAVE_UNLINKAT@ HAVE_UNSETENV = @HAVE_UNSETENV@ HAVE_UNSIGNED_LONG_LONG_INT = @HAVE_UNSIGNED_LONG_LONG_INT@ HAVE_USLEEP = @HAVE_USLEEP@ HAVE_UTIMENSAT = @HAVE_UTIMENSAT@ HAVE_VASPRINTF = @HAVE_VASPRINTF@ HAVE_VDPRINTF = @HAVE_VDPRINTF@ HAVE_WCHAR_H = @HAVE_WCHAR_H@ HAVE_WCHAR_T = @HAVE_WCHAR_T@ HAVE_WCRTOMB = @HAVE_WCRTOMB@ HAVE_WCSNRTOMBS = @HAVE_WCSNRTOMBS@ HAVE_WCSRTOMBS = @HAVE_WCSRTOMBS@ HAVE_WCTYPE_H = @HAVE_WCTYPE_H@ HAVE_WINSOCK2_H = @HAVE_WINSOCK2_H@ HAVE_WINT_T = @HAVE_WINT_T@ HAVE_WS2TCPIP_H = @HAVE_WS2TCPIP_H@ HAVE__BOOL = @HAVE__BOOL@ HOSTENT_LIB = @HOSTENT_LIB@ HTML_DIR = @HTML_DIR@ INCLTDL = @INCLTDL@ INCLUDE_NEXT = @INCLUDE_NEXT@ INCLUDE_NEXT_AS_FIRST_DIRECTIVE = @INCLUDE_NEXT_AS_FIRST_DIRECTIVE@ INET_NTOP_LIB = @INET_NTOP_LIB@ INET_PTON_LIB = @INET_PTON_LIB@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LD = @LD@ LDFLAGS = @LDFLAGS@ LEX = @LEX@ LEXLIB = @LEXLIB@ LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@ LIBADD_DL = @LIBADD_DL@ LIBADD_DLD_LINK = @LIBADD_DLD_LINK@ LIBADD_DLOPEN = @LIBADD_DLOPEN@ LIBADD_SHL_LOAD = @LIBADD_SHL_LOAD@ LIBDIR = @LIBDIR@ LIBGCRYPT_CFLAGS = @LIBGCRYPT_CFLAGS@ LIBGCRYPT_CONFIG = @LIBGCRYPT_CONFIG@ LIBGCRYPT_LIBS = @LIBGCRYPT_LIBS@ LIBGNUTLS_CFLAGS = @LIBGNUTLS_CFLAGS@ LIBGNUTLS_CONFIG = @LIBGNUTLS_CONFIG@ LIBGNUTLS_EXTRA_CFLAGS = @LIBGNUTLS_EXTRA_CFLAGS@ LIBGNUTLS_EXTRA_CONFIG = @LIBGNUTLS_EXTRA_CONFIG@ LIBGNUTLS_EXTRA_LIBS = @LIBGNUTLS_EXTRA_LIBS@ LIBGNUTLS_LIBS = @LIBGNUTLS_LIBS@ LIBINTL = @LIBINTL@ LIBLTDL = @LIBLTDL@ LIBMULTITHREAD = @LIBMULTITHREAD@ LIBOBJS = @LIBOBJS@ LIBPRELUDECPP_SONAME = @LIBPRELUDECPP_SONAME@ LIBPRELUDE_CFLAGS = @LIBPRELUDE_CFLAGS@ LIBPRELUDE_LIBS = @LIBPRELUDE_LIBS@ LIBPRELUDE_SONAME = @LIBPRELUDE_SONAME@ LIBPTH = @LIBPTH@ LIBPTH_PREFIX = @LIBPTH_PREFIX@ LIBS = @LIBS@ LIBSOCKET = @LIBSOCKET@ LIBTESTS_LIBDEPS = @LIBTESTS_LIBDEPS@ LIBTHREAD = @LIBTHREAD@ LIBTOOL = @LIBTOOL@ LIPO = @LIPO@ LN_S = @LN_S@ LOCALCHARSET_TESTS_ENVIRONMENT = @LOCALCHARSET_TESTS_ENVIRONMENT@ LOCALE_FR = @LOCALE_FR@ LOCALE_FR_UTF8 = @LOCALE_FR_UTF8@ LOCALE_JA = @LOCALE_JA@ LOCALE_TR_UTF8 = @LOCALE_TR_UTF8@ LOCALE_ZH_CN = @LOCALE_ZH_CN@ LOCALSTATEDIR = @LOCALSTATEDIR@ LTALLOCA = @LTALLOCA@ LTDLDEPS = @LTDLDEPS@ LTDLINCL = @LTDLINCL@ LTDLOPEN = @LTDLOPEN@ LTLIBINTL = @LTLIBINTL@ LTLIBMULTITHREAD = @LTLIBMULTITHREAD@ LTLIBOBJS = @LTLIBOBJS@ LTLIBPTH = @LTLIBPTH@ LTLIBTHREAD = @LTLIBTHREAD@ LT_CONFIG_H = @LT_CONFIG_H@ LT_DLLOADERS = @LT_DLLOADERS@ LT_DLPREOPEN = @LT_DLPREOPEN@ LUA_CFLAGS = @LUA_CFLAGS@ LUA_CONFIG = @LUA_CONFIG@ LUA_LIBS = @LUA_LIBS@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MKDIR_P = @MKDIR_P@ NETDB_H = @NETDB_H@ NETINET_IN_H = @NETINET_IN_H@ NEXT_ARPA_INET_H = @NEXT_ARPA_INET_H@ NEXT_AS_FIRST_DIRECTIVE_ARPA_INET_H = @NEXT_AS_FIRST_DIRECTIVE_ARPA_INET_H@ NEXT_AS_FIRST_DIRECTIVE_ERRNO_H = @NEXT_AS_FIRST_DIRECTIVE_ERRNO_H@ NEXT_AS_FIRST_DIRECTIVE_FCNTL_H = @NEXT_AS_FIRST_DIRECTIVE_FCNTL_H@ NEXT_AS_FIRST_DIRECTIVE_FLOAT_H = @NEXT_AS_FIRST_DIRECTIVE_FLOAT_H@ NEXT_AS_FIRST_DIRECTIVE_LANGINFO_H = @NEXT_AS_FIRST_DIRECTIVE_LANGINFO_H@ NEXT_AS_FIRST_DIRECTIVE_MATH_H = @NEXT_AS_FIRST_DIRECTIVE_MATH_H@ NEXT_AS_FIRST_DIRECTIVE_NETDB_H = @NEXT_AS_FIRST_DIRECTIVE_NETDB_H@ NEXT_AS_FIRST_DIRECTIVE_NETINET_IN_H = @NEXT_AS_FIRST_DIRECTIVE_NETINET_IN_H@ NEXT_AS_FIRST_DIRECTIVE_SIGNAL_H = @NEXT_AS_FIRST_DIRECTIVE_SIGNAL_H@ NEXT_AS_FIRST_DIRECTIVE_STDDEF_H = @NEXT_AS_FIRST_DIRECTIVE_STDDEF_H@ NEXT_AS_FIRST_DIRECTIVE_STDINT_H = @NEXT_AS_FIRST_DIRECTIVE_STDINT_H@ NEXT_AS_FIRST_DIRECTIVE_STDIO_H = @NEXT_AS_FIRST_DIRECTIVE_STDIO_H@ NEXT_AS_FIRST_DIRECTIVE_STDLIB_H = @NEXT_AS_FIRST_DIRECTIVE_STDLIB_H@ NEXT_AS_FIRST_DIRECTIVE_STRINGS_H = @NEXT_AS_FIRST_DIRECTIVE_STRINGS_H@ NEXT_AS_FIRST_DIRECTIVE_STRING_H = @NEXT_AS_FIRST_DIRECTIVE_STRING_H@ NEXT_AS_FIRST_DIRECTIVE_SYS_IOCTL_H = @NEXT_AS_FIRST_DIRECTIVE_SYS_IOCTL_H@ NEXT_AS_FIRST_DIRECTIVE_SYS_SELECT_H = @NEXT_AS_FIRST_DIRECTIVE_SYS_SELECT_H@ NEXT_AS_FIRST_DIRECTIVE_SYS_SOCKET_H = @NEXT_AS_FIRST_DIRECTIVE_SYS_SOCKET_H@ NEXT_AS_FIRST_DIRECTIVE_SYS_STAT_H = @NEXT_AS_FIRST_DIRECTIVE_SYS_STAT_H@ NEXT_AS_FIRST_DIRECTIVE_SYS_TIME_H = @NEXT_AS_FIRST_DIRECTIVE_SYS_TIME_H@ NEXT_AS_FIRST_DIRECTIVE_SYS_UTSNAME_H = @NEXT_AS_FIRST_DIRECTIVE_SYS_UTSNAME_H@ NEXT_AS_FIRST_DIRECTIVE_TIME_H = @NEXT_AS_FIRST_DIRECTIVE_TIME_H@ NEXT_AS_FIRST_DIRECTIVE_UNISTD_H = @NEXT_AS_FIRST_DIRECTIVE_UNISTD_H@ NEXT_AS_FIRST_DIRECTIVE_WCHAR_H = @NEXT_AS_FIRST_DIRECTIVE_WCHAR_H@ NEXT_AS_FIRST_DIRECTIVE_WCTYPE_H = @NEXT_AS_FIRST_DIRECTIVE_WCTYPE_H@ NEXT_ERRNO_H = @NEXT_ERRNO_H@ NEXT_FCNTL_H = @NEXT_FCNTL_H@ NEXT_FLOAT_H = @NEXT_FLOAT_H@ NEXT_LANGINFO_H = @NEXT_LANGINFO_H@ NEXT_MATH_H = @NEXT_MATH_H@ NEXT_NETDB_H = @NEXT_NETDB_H@ NEXT_NETINET_IN_H = @NEXT_NETINET_IN_H@ NEXT_SIGNAL_H = @NEXT_SIGNAL_H@ NEXT_STDDEF_H = @NEXT_STDDEF_H@ NEXT_STDINT_H = @NEXT_STDINT_H@ NEXT_STDIO_H = @NEXT_STDIO_H@ NEXT_STDLIB_H = @NEXT_STDLIB_H@ NEXT_STRINGS_H = @NEXT_STRINGS_H@ NEXT_STRING_H = @NEXT_STRING_H@ NEXT_SYS_IOCTL_H = @NEXT_SYS_IOCTL_H@ NEXT_SYS_SELECT_H = @NEXT_SYS_SELECT_H@ NEXT_SYS_SOCKET_H = @NEXT_SYS_SOCKET_H@ NEXT_SYS_STAT_H = @NEXT_SYS_STAT_H@ NEXT_SYS_TIME_H = @NEXT_SYS_TIME_H@ NEXT_SYS_UTSNAME_H = @NEXT_SYS_UTSNAME_H@ NEXT_TIME_H = @NEXT_TIME_H@ NEXT_UNISTD_H = @NEXT_UNISTD_H@ NEXT_WCHAR_H = @NEXT_WCHAR_H@ NEXT_WCTYPE_H = @NEXT_WCTYPE_H@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PCFLAGS = @PCFLAGS@ PERL = @PERL@ PERL_EXTRA_PARAMS = @PERL_EXTRA_PARAMS@ PKG_CONFIG = @PKG_CONFIG@ POLL_H = @POLL_H@ PRAGMA_SYSTEM_HEADER = @PRAGMA_SYSTEM_HEADER@ PRELUDE_ADMIN_CFLAGS = @PRELUDE_ADMIN_CFLAGS@ PRELUDE_ADMIN_LIBS = @PRELUDE_ADMIN_LIBS@ PRELUDE_CONFIG_DIR = @PRELUDE_CONFIG_DIR@ PRELUDE_SPOOL_DIR = @PRELUDE_SPOOL_DIR@ PTHREAD_CFLAGS = @PTHREAD_CFLAGS@ PTHREAD_LDFLAGS = @PTHREAD_LDFLAGS@ PTHREAD_LIBS = @PTHREAD_LIBS@ PTRDIFF_T_SUFFIX = @PTRDIFF_T_SUFFIX@ PYTHON = @PYTHON@ RANLIB = @RANLIB@ RELOCATABLE = @RELOCATABLE@ REPLACE_BTOWC = @REPLACE_BTOWC@ REPLACE_CANONICALIZE_FILE_NAME = @REPLACE_CANONICALIZE_FILE_NAME@ REPLACE_CEILF = @REPLACE_CEILF@ REPLACE_CEILL = @REPLACE_CEILL@ REPLACE_CHOWN = @REPLACE_CHOWN@ REPLACE_CLOSE = @REPLACE_CLOSE@ REPLACE_DPRINTF = @REPLACE_DPRINTF@ REPLACE_DUP = @REPLACE_DUP@ REPLACE_DUP2 = @REPLACE_DUP2@ REPLACE_FCHDIR = @REPLACE_FCHDIR@ REPLACE_FCHOWNAT = @REPLACE_FCHOWNAT@ REPLACE_FCLOSE = @REPLACE_FCLOSE@ REPLACE_FCNTL = @REPLACE_FCNTL@ REPLACE_FFLUSH = @REPLACE_FFLUSH@ REPLACE_FLOORF = @REPLACE_FLOORF@ REPLACE_FLOORL = @REPLACE_FLOORL@ REPLACE_FOPEN = @REPLACE_FOPEN@ REPLACE_FPRINTF = @REPLACE_FPRINTF@ REPLACE_FPURGE = @REPLACE_FPURGE@ REPLACE_FREOPEN = @REPLACE_FREOPEN@ REPLACE_FREXP = @REPLACE_FREXP@ REPLACE_FREXPL = @REPLACE_FREXPL@ REPLACE_FSEEK = @REPLACE_FSEEK@ REPLACE_FSEEKO = @REPLACE_FSEEKO@ REPLACE_FSTAT = @REPLACE_FSTAT@ REPLACE_FSTATAT = @REPLACE_FSTATAT@ REPLACE_FTELL = @REPLACE_FTELL@ REPLACE_FTELLO = @REPLACE_FTELLO@ REPLACE_FUTIMENS = @REPLACE_FUTIMENS@ REPLACE_GETCWD = @REPLACE_GETCWD@ REPLACE_GETDELIM = @REPLACE_GETDELIM@ REPLACE_GETGROUPS = @REPLACE_GETGROUPS@ REPLACE_GETLINE = @REPLACE_GETLINE@ REPLACE_GETPAGESIZE = @REPLACE_GETPAGESIZE@ REPLACE_GETTIMEOFDAY = @REPLACE_GETTIMEOFDAY@ REPLACE_HUGE_VAL = @REPLACE_HUGE_VAL@ REPLACE_ISFINITE = @REPLACE_ISFINITE@ REPLACE_ISINF = @REPLACE_ISINF@ REPLACE_ISNAN = @REPLACE_ISNAN@ REPLACE_ISWCNTRL = @REPLACE_ISWCNTRL@ REPLACE_LCHOWN = @REPLACE_LCHOWN@ REPLACE_LDEXPL = @REPLACE_LDEXPL@ REPLACE_LINK = @REPLACE_LINK@ REPLACE_LINKAT = @REPLACE_LINKAT@ REPLACE_LOCALTIME_R = @REPLACE_LOCALTIME_R@ REPLACE_LSEEK = @REPLACE_LSEEK@ REPLACE_LSTAT = @REPLACE_LSTAT@ REPLACE_MBRLEN = @REPLACE_MBRLEN@ REPLACE_MBRTOWC = @REPLACE_MBRTOWC@ REPLACE_MBSINIT = @REPLACE_MBSINIT@ REPLACE_MBSNRTOWCS = @REPLACE_MBSNRTOWCS@ REPLACE_MBSRTOWCS = @REPLACE_MBSRTOWCS@ REPLACE_MBSTATE_T = @REPLACE_MBSTATE_T@ REPLACE_MEMCHR = @REPLACE_MEMCHR@ REPLACE_MEMMEM = @REPLACE_MEMMEM@ REPLACE_MKDIR = @REPLACE_MKDIR@ REPLACE_MKFIFO = @REPLACE_MKFIFO@ REPLACE_MKNOD = @REPLACE_MKNOD@ REPLACE_MKSTEMP = @REPLACE_MKSTEMP@ REPLACE_MKTIME = @REPLACE_MKTIME@ REPLACE_NAN = @REPLACE_NAN@ REPLACE_NANOSLEEP = @REPLACE_NANOSLEEP@ REPLACE_NL_LANGINFO = @REPLACE_NL_LANGINFO@ REPLACE_NULL = @REPLACE_NULL@ REPLACE_OBSTACK_PRINTF = @REPLACE_OBSTACK_PRINTF@ REPLACE_OPEN = @REPLACE_OPEN@ REPLACE_OPENAT = @REPLACE_OPENAT@ REPLACE_PERROR = @REPLACE_PERROR@ REPLACE_POPEN = @REPLACE_POPEN@ REPLACE_PREAD = @REPLACE_PREAD@ REPLACE_PRINTF = @REPLACE_PRINTF@ REPLACE_PUTENV = @REPLACE_PUTENV@ REPLACE_READLINK = @REPLACE_READLINK@ REPLACE_REALPATH = @REPLACE_REALPATH@ REPLACE_REMOVE = @REPLACE_REMOVE@ REPLACE_RENAME = @REPLACE_RENAME@ REPLACE_RENAMEAT = @REPLACE_RENAMEAT@ REPLACE_RMDIR = @REPLACE_RMDIR@ REPLACE_ROUND = @REPLACE_ROUND@ REPLACE_ROUNDF = @REPLACE_ROUNDF@ REPLACE_ROUNDL = @REPLACE_ROUNDL@ REPLACE_SELECT = @REPLACE_SELECT@ REPLACE_SETENV = @REPLACE_SETENV@ REPLACE_SIGNBIT = @REPLACE_SIGNBIT@ REPLACE_SIGNBIT_USING_GCC = @REPLACE_SIGNBIT_USING_GCC@ REPLACE_SLEEP = @REPLACE_SLEEP@ REPLACE_SNPRINTF = @REPLACE_SNPRINTF@ REPLACE_SPRINTF = @REPLACE_SPRINTF@ REPLACE_STAT = @REPLACE_STAT@ REPLACE_STDIO_WRITE_FUNCS = @REPLACE_STDIO_WRITE_FUNCS@ REPLACE_STRCASESTR = @REPLACE_STRCASESTR@ REPLACE_STRDUP = @REPLACE_STRDUP@ REPLACE_STRERROR = @REPLACE_STRERROR@ REPLACE_STRNDUP = @REPLACE_STRNDUP@ REPLACE_STRPTIME = @REPLACE_STRPTIME@ REPLACE_STRSIGNAL = @REPLACE_STRSIGNAL@ REPLACE_STRSTR = @REPLACE_STRSTR@ REPLACE_STRTOD = @REPLACE_STRTOD@ REPLACE_STRTOK_R = @REPLACE_STRTOK_R@ REPLACE_SYMLINK = @REPLACE_SYMLINK@ REPLACE_TIMEGM = @REPLACE_TIMEGM@ REPLACE_TRUNCL = @REPLACE_TRUNCL@ REPLACE_UNLINK = @REPLACE_UNLINK@ REPLACE_UNLINKAT = @REPLACE_UNLINKAT@ REPLACE_UNSETENV = @REPLACE_UNSETENV@ REPLACE_USLEEP = @REPLACE_USLEEP@ REPLACE_UTIMENSAT = @REPLACE_UTIMENSAT@ REPLACE_VASPRINTF = @REPLACE_VASPRINTF@ REPLACE_VDPRINTF = @REPLACE_VDPRINTF@ REPLACE_VFPRINTF = @REPLACE_VFPRINTF@ REPLACE_VPRINTF = @REPLACE_VPRINTF@ REPLACE_VSNPRINTF = @REPLACE_VSNPRINTF@ REPLACE_VSPRINTF = @REPLACE_VSPRINTF@ REPLACE_WCRTOMB = @REPLACE_WCRTOMB@ REPLACE_WCSNRTOMBS = @REPLACE_WCSNRTOMBS@ REPLACE_WCSRTOMBS = @REPLACE_WCSRTOMBS@ REPLACE_WCTOB = @REPLACE_WCTOB@ REPLACE_WCWIDTH = @REPLACE_WCWIDTH@ REPLACE_WRITE = @REPLACE_WRITE@ RUBY = @RUBY@ RUBY_CCFLAGS = @RUBY_CCFLAGS@ RUBY_EXEC_PREFIX = @RUBY_EXEC_PREFIX@ RUBY_INCLUDES = @RUBY_INCLUDES@ RUBY_LIBS = @RUBY_LIBS@ RUBY_PLATFORM = @RUBY_PLATFORM@ RUBY_PREFIX = @RUBY_PREFIX@ RUBY_VERSION = @RUBY_VERSION@ SED = @SED@ SERVENT_LIB = @SERVENT_LIB@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ SIG_ATOMIC_T_SUFFIX = @SIG_ATOMIC_T_SUFFIX@ SIZE_T_SUFFIX = @SIZE_T_SUFFIX@ STDBOOL_H = @STDBOOL_H@ STDDEF_H = @STDDEF_H@ STDINT_H = @STDINT_H@ STRIP = @STRIP@ SWIG = @SWIG@ SYSCONFDIR = @SYSCONFDIR@ SYS_IOCTL_H_HAVE_WINSOCK2_H = @SYS_IOCTL_H_HAVE_WINSOCK2_H@ SYS_IOCTL_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS = @SYS_IOCTL_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS@ SYS_SOCKET_H = @SYS_SOCKET_H@ SYS_TIME_H_DEFINES_STRUCT_TIMESPEC = @SYS_TIME_H_DEFINES_STRUCT_TIMESPEC@ TIME_H_DEFINES_STRUCT_TIMESPEC = @TIME_H_DEFINES_STRUCT_TIMESPEC@ UNDEFINE_STRTOK_R = @UNDEFINE_STRTOK_R@ UNISTD_H_HAVE_WINSOCK2_H = @UNISTD_H_HAVE_WINSOCK2_H@ UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS = @UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS@ VALGRIND = @VALGRIND@ VERSION = @VERSION@ WCHAR_T_SUFFIX = @WCHAR_T_SUFFIX@ WCTYPE_H = @WCTYPE_H@ WINT_T_SUFFIX = @WINT_T_SUFFIX@ YACC = @YACC@ YFLAGS = @YFLAGS@ YIELD_LIB = @YIELD_LIB@ __PRELUDE_64BIT_FORMAT_PREFIX = @__PRELUDE_64BIT_FORMAT_PREFIX@ __PRELUDE_HAVE_64BIT_LONG = @__PRELUDE_HAVE_64BIT_LONG@ __PRELUDE_HAVE_INTTYPES_H = @__PRELUDE_HAVE_INTTYPES_H@ __PRELUDE_HAVE_STDINT_H = @__PRELUDE_HAVE_STDINT_H@ __PRELUDE_STDINT_HAVE_UINT16 = @__PRELUDE_STDINT_HAVE_UINT16@ __PRELUDE_STDINT_HAVE_UINT32 = @__PRELUDE_STDINT_HAVE_UINT32@ __PRELUDE_STDINT_HAVE_UINT64 = @__PRELUDE_STDINT_HAVE_UINT64@ __PRELUDE_STDINT_HAVE_UINT8 = @__PRELUDE_STDINT_HAVE_UINT8@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ gl_LIBOBJS = @gl_LIBOBJS@ gl_LTLIBOBJS = @gl_LTLIBOBJS@ gltests_LIBOBJS = @gltests_LIBOBJS@ gltests_LTLIBOBJS = @gltests_LTLIBOBJS@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ lt_ECHO = @lt_ECHO@ ltdl_LIBOBJS = @ltdl_LIBOBJS@ ltdl_LTLIBOBJS = @ltdl_LTLIBOBJS@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ pkgrbexecdir = @pkgrbexecdir@ pkgrubydir = @pkgrubydir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ rbexecdir = @rbexecdir@ rubydir = @rubydir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sys_symbol_underscore = @sys_symbol_underscore@ sysconfdir = @sysconfdir@ target = @target@ target_alias = @target_alias@ target_cpu = @target_cpu@ target_os = @target_os@ target_vendor = @target_vendor@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ dist_man_MANS = prelude-admin.1 all: all-am .SUFFIXES: $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu docs/manpages/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu docs/manpages/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs install-man1: $(dist_man_MANS) @$(NORMAL_INSTALL) test -z "$(man1dir)" || $(MKDIR_P) "$(DESTDIR)$(man1dir)" @list=''; test -n "$(man1dir)" || exit 0; \ { for i in $$list; do echo "$$i"; done; \ l2='$(dist_man_MANS)'; for i in $$l2; do echo "$$i"; done | \ sed -n '/\.1[a-z]*$$/p'; \ } | while read p; do \ if test -f $$p; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; echo "$$p"; \ done | \ sed -e 'n;s,.*/,,;p;h;s,.*\.,,;s,^[^1][0-9a-z]*$$,1,;x' \ -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,' | \ sed 'N;N;s,\n, ,g' | { \ list=; while read file base inst; do \ if test "$$base" = "$$inst"; then list="$$list $$file"; else \ echo " $(INSTALL_DATA) '$$file' '$(DESTDIR)$(man1dir)/$$inst'"; \ $(INSTALL_DATA) "$$file" "$(DESTDIR)$(man1dir)/$$inst" || exit $$?; \ fi; \ done; \ for i in $$list; do echo "$$i"; done | $(am__base_list) | \ while read files; do \ test -z "$$files" || { \ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(man1dir)'"; \ $(INSTALL_DATA) $$files "$(DESTDIR)$(man1dir)" || exit $$?; }; \ done; } uninstall-man1: @$(NORMAL_UNINSTALL) @list=''; test -n "$(man1dir)" || exit 0; \ files=`{ for i in $$list; do echo "$$i"; done; \ l2='$(dist_man_MANS)'; for i in $$l2; do echo "$$i"; done | \ sed -n '/\.1[a-z]*$$/p'; \ } | sed -e 's,.*/,,;h;s,.*\.,,;s,^[^1][0-9a-z]*$$,1,;x' \ -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,'`; \ test -z "$$files" || { \ echo " ( cd '$(DESTDIR)$(man1dir)' && rm -f" $$files ")"; \ cd "$(DESTDIR)$(man1dir)" && rm -f $$files; } tags: TAGS TAGS: ctags: CTAGS CTAGS: distdir: $(DISTFILES) @list='$(MANS)'; if test -n "$$list"; then \ list=`for p in $$list; do \ if test -f $$p; then d=; else d="$(srcdir)/"; fi; \ if test -f "$$d$$p"; then echo "$$d$$p"; else :; fi; done`; \ if test -n "$$list" && \ grep 'ab help2man is required to generate this page' $$list >/dev/null; then \ echo "error: found man pages containing the \`missing help2man' replacement text:" >&2; \ grep -l 'ab help2man is required to generate this page' $$list | sed 's/^/ /' >&2; \ echo " to fix them, install help2man, remove and regenerate the man pages;" >&2; \ echo " typically \`make maintainer-clean' will remove them" >&2; \ exit 1; \ else :; fi; \ else :; fi @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(MANS) installdirs: for dir in "$(DESTDIR)$(man1dir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic clean-libtool mostlyclean-am distclean: distclean-am -rm -f Makefile distclean-am: clean-am distclean-generic dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-man install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-man1 install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-generic mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-man uninstall-man: uninstall-man1 .MAKE: install-am install-strip .PHONY: all all-am check check-am clean clean-generic clean-libtool \ distclean distclean-generic distclean-libtool distdir dvi \ dvi-am html html-am info info-am install install-am \ install-data install-data-am install-dvi install-dvi-am \ install-exec install-exec-am install-html install-html-am \ install-info install-info-am install-man install-man1 \ install-pdf install-pdf-am install-ps install-ps-am \ install-strip installcheck installcheck-am installdirs \ maintainer-clean maintainer-clean-generic mostlyclean \ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ uninstall uninstall-am uninstall-man uninstall-man1 -include $(top_srcdir)/git.mk # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: libprelude-1.0.0/global.conf.in0000664000076400007640000000504111202225026013276 00000000000000[prelude] # This is the default configuration for all program # (sensors, agents, and manager) using libprelude. # # Entry in this configuration file might be overriden by entry directly # provided by the respective program configuration file. # # Set heartbeat interval, the default value is 600 seconds (10 minutes). # # heartbeat-interval = 600 # # Optionnal data carried with alert/heartbeats. # # analyzer-name = Name for the analyzer # node-name = Name of the equipment # node-location = Location of the equipment # node-category = Type of node: # # unknown Domain unknown or not relevant # ads Windows 2000 Advanced Directory Services # afs Andrew File System (Transarc) # coda Coda Distributed File System # dfs Distributed File System (IBM) # dns Domain Name System # hosts Local hosts file # kerberos Kerberos realm # nds Novell Directory Services # nis Network Information Services (Sun) # nisplus Network Information Services Plus (Sun) # nt Windows NT domain # wfw Windows for Workgroups # Address contained by this Node, # You may have several address. # # [Node-Address] # # address = Address of the equipment # netmask = Netmask for this address # vlan-name = Name of the Virtual LAN to which the address belongs # vlan-num = Number of the Virtual LAN to which the address belongs # # category = Type of address represented # # Permitted values for category are (default to unknown) : # # unknown Address type unknown # atm Asynchronous Transfer Mode network address # e-mail Electronic mail address (RFC 822) # lotus-notes Lotus Notes e-mail address # mac Media Access Control (MAC) address # sna IBM Shared Network Architecture (SNA) address # vm IBM VM ("PROFS") e-mail address # ipv4-addr IPv4 host address in dotted-decimal notation (a.b.c.d) # ipv4-addr-hex IPv4 host address in hexadecimal notation # ipv4-net IPv4 network address in dotted-decimal notation, slash, significant bits (a.b.c.d/nn) # ipv4-net-mask IPv4 network address in dotted-decimal notation, slash, network mask in dotted-decimal notation (a.b.c.d/w.x.y.z) # ipv6-addr IPv6 host address # ipv6-addr-hex IPv6 host address in hexadecimal notation # ipv6-net IPv6 network address, slash, significant bits # ipv6-net-mask IPv6 network address, slash, network mask libprelude-1.0.0/bindings/0000775000076400007640000000000011347714754012464 500000000000000libprelude-1.0.0/bindings/c++/0000775000076400007640000000000011347714754013034 500000000000000libprelude-1.0.0/bindings/c++/idmef-criteria.cxx0000664000076400007640000000707711324463744016372 00000000000000/***** * * Copyright (C) 2008 PreludeIDS Technologies. All Rights Reserved. * Author: Yoann Vandoorselaere * * This file is part of the Prelude library. * * 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; see the file COPYING. If not, write to * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. * *****/ #include "idmef.hxx" #include "idmef-criteria.hxx" #include "prelude-error.hxx" using namespace Prelude; IDMEFCriteria::~IDMEFCriteria() { if ( _criteria ) idmef_criteria_destroy(_criteria); } IDMEFCriteria::IDMEFCriteria(const IDMEFCriteria &criteria) { _criteria = (criteria._criteria) ? idmef_criteria_ref(criteria._criteria) : NULL; } IDMEFCriteria::IDMEFCriteria(idmef_criteria_t *criteria) { _criteria = criteria; } IDMEFCriteria::IDMEFCriteria(const char *criteria) { int ret; ret = idmef_criteria_new_from_string(&_criteria, criteria); if ( ret < 0 ) throw PreludeError(ret); } IDMEFCriteria::IDMEFCriteria(const std::string &criteria) { int ret; ret = idmef_criteria_new_from_string(&_criteria, criteria.c_str()); if ( ret < 0 ) throw PreludeError(ret); } IDMEFCriteria::IDMEFCriteria() { int ret; ret = idmef_criteria_new(&_criteria); if ( ret < 0 ) throw PreludeError(ret); } IDMEFCriteria IDMEFCriteria::Clone() { int ret; idmef_criteria_t *cl; ret = idmef_criteria_clone(this->_criteria, &cl); if ( ret < 0 ) throw PreludeError(ret); return IDMEFCriteria(cl); } void IDMEFCriteria::ANDCriteria(const IDMEFCriteria &criteria) { idmef_criteria_and_criteria(this->_criteria, criteria._criteria); } void IDMEFCriteria::ORCriteria(const IDMEFCriteria &criteria) { idmef_criteria_or_criteria(this->_criteria, criteria._criteria); } int IDMEFCriteria::Match(IDMEF *message) { int ret; ret = idmef_criteria_match(this->_criteria, *message); if ( ret < 0 ) throw PreludeError(ret); return ret; } const std::string IDMEFCriteria::ToString() const { int ret; std::string s; prelude_string_t *str; ret = prelude_string_new(&str); if ( ret < 0 ) throw PreludeError(ret); ret = idmef_criteria_to_string(_criteria, str); if ( ret < 0 ) { prelude_string_destroy(str); throw PreludeError(ret); } s = prelude_string_get_string(str); prelude_string_destroy(str); return s; } IDMEFCriteria::operator const std::string() const { return ToString(); } IDMEFCriteria &IDMEFCriteria::operator=(const IDMEFCriteria &criteria) { if ( this != &criteria && _criteria != criteria._criteria ) { if ( _criteria ) idmef_criteria_destroy(_criteria); _criteria = (criteria._criteria) ? idmef_criteria_ref(criteria._criteria) : NULL; } return *this; } libprelude-1.0.0/bindings/c++/prelude-client.cxx0000664000076400007640000000667311202225026016403 00000000000000#include "idmef.hxx" #include "prelude-error.hxx" #include "prelude-client.hxx" #include "prelude-client-profile.hxx" using namespace Prelude; Client::Client(const char *profile) : _recv_timeout(-1) { int ret; ret = prelude_client_new(&_client, profile); if ( ret < 0 ) throw PreludeError(ret); _profile = prelude_client_get_profile(_client); _pool = ConnectionPool(prelude_connection_pool_ref(prelude_client_get_connection_pool(_client))); } Client::Client(const Client &client) { _client = (client._client) ? prelude_client_ref(client._client) : NULL; } Client::~Client() { _profile = NULL; prelude_client_destroy(_client, PRELUDE_CLIENT_EXIT_STATUS_SUCCESS); } void Client::Start() { int ret; Init(); ret = prelude_client_start(_client); if ( ret < 0 ) throw PreludeError(ret); } void Client::Init() { int ret; ret = prelude_client_init(_client); if ( ret < 0 ) throw PreludeError(ret); _profile = prelude_client_get_profile(_client); } prelude_client_t *Client::GetClient() { return _client; } void Client::SendIDMEF(const IDMEF &message) { prelude_client_send_idmef(_client, message); } int Client::RecvIDMEF(Prelude::IDMEF &idmef, int timeout) { int ret; idmef_message_t *idmef_p; ret = prelude_client_recv_idmef(_client, timeout, &idmef_p); if ( ret < 0 ) throw PreludeError(ret); else if ( ret == 0 ) return 0; idmef = IDMEF(idmef_p); return 1; } int Client::GetFlags() { return prelude_client_get_flags(_client); } void Client::SetFlags(int flags) { int ret; ret = prelude_client_set_flags(_client, (prelude_client_flags_t) flags); if ( ret < 0 ) throw PreludeError(ret); } int Client::GetRequiredPermission() { return prelude_client_get_required_permission(_client); } void Client::SetRequiredPermission(int permission) { prelude_client_set_required_permission(_client, (prelude_connection_permission_t) permission); } const char *Client::GetConfigFilename() { return prelude_client_get_config_filename(_client); } void Client::SetConfigFilename(const char *name) { int ret; ret = prelude_client_set_config_filename(_client, name); if ( ret < 0 ) throw PreludeError(ret); } ConnectionPool &Client::GetConnectionPool() { return _pool; } void Client::SetConnectionPool(ConnectionPool pool) { _pool = pool; prelude_client_set_connection_pool(_client, prelude_connection_pool_ref(pool)); } Client &Client::operator << (IDMEF &idmef) { SendIDMEF(idmef); return *this; } Client &Client::operator >> (IDMEF &idmef) { int ret; ret = RecvIDMEF(idmef, _recv_timeout); if ( ret <= 0 ) throw PreludeError(ret); return *this; } Client &Client::SetRecvTimeout(Client &c, int timeout) { c._recv_timeout = timeout; return c; } Client &Client::operator=(const Client &c) { if ( this != &c && _client != c._client ) { if ( _client ) prelude_client_destroy(_client, PRELUDE_CLIENT_EXIT_STATUS_SUCCESS); _client = (c._client) ? prelude_client_ref(c._client) : NULL; } return *this; } libprelude-1.0.0/bindings/c++/idmef-value.cxx0000664000076400007640000002557511324402502015670 00000000000000/***** * * Copyright (C) 2008 PreludeIDS Technologies. All Rights Reserved. * Author: Yoann Vandoorselaere * * This file is part of the Prelude library. * * 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; see the file COPYING. If not, write to * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. * *****/ #include #include "prelude-error.hxx" #include "idmef.hxx" #include "idmef-value.hxx" using namespace Prelude; IDMEFValue::~IDMEFValue() { if ( _value ) idmef_value_destroy(_value); } idmef_value_type_id_t IDMEFValue::GetType() const { return idmef_value_get_type(_value); } bool IDMEFValue::IsNull() const { return (! _value) ? TRUE : FALSE; } IDMEFValue::IDMEFValue() { _value = NULL; } IDMEFValue::IDMEFValue(const IDMEFValue &value) { idmef_value_t *v = NULL; if ( value._value ) v = idmef_value_ref(value._value); _value = v; } void IDMEFValue::_InitFromString(const char *value) { int ret; prelude_string_t *str; ret = prelude_string_new_dup(&str, value); if ( ret < 0 ) throw PreludeError(ret); ret = idmef_value_new_string(&_value, str); if ( ret < 0 ) { prelude_string_destroy(str); throw PreludeError(ret); } } IDMEFValue::IDMEFValue(const char *value) { _InitFromString(value); } IDMEFValue::IDMEFValue(std::string value) { _InitFromString(value.c_str()); } IDMEFValue::IDMEFValue(int8_t value) { int ret = idmef_value_new_int8(&_value, value); if ( ret < 0 ) throw PreludeError(ret); } IDMEFValue::IDMEFValue(uint8_t value) { int ret = idmef_value_new_uint8(&_value, value); if ( ret < 0 ) throw PreludeError(ret); } IDMEFValue::IDMEFValue(int16_t value) { int ret = idmef_value_new_int16(&_value, value); if ( ret < 0 ) throw PreludeError(ret); } IDMEFValue::IDMEFValue(uint16_t value) { int ret = idmef_value_new_uint16(&_value, value); if ( ret < 0 ) throw PreludeError(ret); } IDMEFValue::IDMEFValue(int32_t value) { int ret = idmef_value_new_int32(&_value, value); if ( ret < 0 ) throw PreludeError(ret); } IDMEFValue::IDMEFValue(uint32_t value) { int ret = idmef_value_new_uint32(&_value, value); if ( ret < 0 ) throw PreludeError(ret); } IDMEFValue::IDMEFValue(int64_t value) { int ret = idmef_value_new_int64(&_value, value); if ( ret < 0 ) throw PreludeError(ret); } IDMEFValue::IDMEFValue(uint64_t value) { int ret = idmef_value_new_uint64(&_value, value); if ( ret < 0 ) throw PreludeError(ret); } IDMEFValue::IDMEFValue(float value) { int ret = idmef_value_new_float(&_value, value); if ( ret < 0 ) throw PreludeError(ret); } IDMEFValue::IDMEFValue(double value) { int ret = idmef_value_new_double(&_value, value); if ( ret < 0 ) throw PreludeError(ret); } IDMEFValue::IDMEFValue(IDMEFTime &time) { int ret = idmef_value_new_time(&_value, idmef_time_ref(time)); if ( ret < 0 ) throw PreludeError(ret); } IDMEFValue::IDMEFValue(std::vector value) { int ret; std::vector::const_iterator i; ret = idmef_value_new_list(&_value); if ( ret < 0 ) throw PreludeError(ret); for ( i = value.begin(); i != value.end(); i++ ) idmef_value_list_add(_value, idmef_value_ref(*i)); } IDMEFValue::IDMEFValue(idmef_value_t *value) { _value = value; } int IDMEFValue::Match(const IDMEFValue &value, int op) { return idmef_value_match(this->_value, value._value, (idmef_criterion_operator_t) op); } IDMEFValue IDMEFValue::Clone() const { int ret; idmef_value_t *clone; ret = idmef_value_clone(_value, &clone); if ( ret < 0 ) throw PreludeError(ret); return IDMEFValue(clone); } static int iterate_cb(idmef_value_t *value, void *extra) { std::vector *vlist = (std::vector *) extra; vlist->push_back(IDMEFValue(idmef_value_ref(value))); return 0; } IDMEFValue::operator std::vector () const { std::vector vlist; if ( ! _value ) return vlist; if ( GetType() != IDMEF_VALUE_TYPE_LIST ) { std::stringstream s; s << "Left value doesn't fit '" << idmef_value_type_to_string(GetType()) << "' requirement"; throw PreludeError(s.str()); } idmef_value_iterate(_value, iterate_cb, &vlist); return vlist; } IDMEFValue::operator IDMEFTime () const { prelude_except_if_fail(_value); if ( GetType() != IDMEF_VALUE_TYPE_TIME ) { std::stringstream s; s << "Left value doesn't fit '" << idmef_value_type_to_string(GetType()) << "' requirement"; throw PreludeError(s.str()); } return IDMEFTime(idmef_time_ref(idmef_value_get_time(_value))); } IDMEFValue::operator int32_t () const { idmef_value_type_id_t vtype; prelude_except_if_fail(_value); vtype = GetType(); if ( vtype == IDMEF_VALUE_TYPE_INT8 ) return idmef_value_get_int8(_value); else if ( vtype == IDMEF_VALUE_TYPE_UINT8 ) return idmef_value_get_uint8(_value); else if ( vtype == IDMEF_VALUE_TYPE_INT16 ) return idmef_value_get_int16(_value); else if ( vtype == IDMEF_VALUE_TYPE_UINT16 ) return idmef_value_get_uint16(_value); else if ( vtype == IDMEF_VALUE_TYPE_INT32 ) return idmef_value_get_int32(_value); else if ( vtype == IDMEF_VALUE_TYPE_ENUM ) return idmef_value_get_enum(_value); std::stringstream s; s << "Left value doesn't fit '" << idmef_value_type_to_string(vtype) << "' requirement"; throw PreludeError(s.str()); } IDMEFValue::operator uint32_t () const { idmef_value_type_id_t vtype; prelude_except_if_fail(_value); vtype = GetType(); if ( vtype == IDMEF_VALUE_TYPE_UINT32 ) return idmef_value_get_uint32(_value); else return (int32_t) *this; } IDMEFValue::operator int64_t () const { idmef_value_type_id_t vtype; prelude_except_if_fail(_value); vtype = GetType(); if ( vtype == IDMEF_VALUE_TYPE_INT64 ) return idmef_value_get_int64(_value); else return (uint32_t) *this; } IDMEFValue::operator uint64_t () const { idmef_value_type_id_t vtype; prelude_except_if_fail(_value); vtype = GetType(); if ( vtype == IDMEF_VALUE_TYPE_UINT64 ) return idmef_value_get_uint64(_value); else return (int64_t) *this; } IDMEFValue::operator float () const { idmef_value_type_id_t vtype; prelude_except_if_fail(_value); vtype = GetType(); if ( vtype == IDMEF_VALUE_TYPE_FLOAT ) return idmef_value_get_float(_value); else if ( vtype == IDMEF_VALUE_TYPE_DATA ) { idmef_data_t *d = idmef_value_get_data(_value); if ( idmef_data_get_type(d) == IDMEF_DATA_TYPE_FLOAT ) return idmef_data_get_float(d); } std::stringstream s; s << "Left value doesn't fit '" << idmef_value_type_to_string(vtype) << "' requirement"; throw PreludeError(s.str()); } IDMEFValue::operator double () const { idmef_value_type_id_t vtype; prelude_except_if_fail(_value); vtype = GetType(); if ( vtype == IDMEF_VALUE_TYPE_DOUBLE ) return idmef_value_get_double(_value); else return (float) *this; } std::string IDMEFValue::convert_string() const { std::stringstream s; prelude_except_if_fail(_value); if ( GetType() == IDMEF_VALUE_TYPE_STRING ) return prelude_string_get_string(idmef_value_get_string(_value)); else if ( GetType() == IDMEF_VALUE_TYPE_TIME ) return IDMEFTime(idmef_time_ref(idmef_value_get_time(_value))); else if ( GetType() == IDMEF_VALUE_TYPE_ENUM ) return idmef_class_enum_to_string(idmef_value_get_class(_value), idmef_value_get_enum(_value)); else if ( GetType() == IDMEF_VALUE_TYPE_DATA ) { idmef_data_t *d = idmef_value_get_data(_value); idmef_data_type_t t = idmef_data_get_type(d); if ( t == IDMEF_DATA_TYPE_CHAR_STRING ) return (const char *) idmef_data_get_char_string(d); else if ( t == IDMEF_DATA_TYPE_CHAR ) { s << idmef_data_get_char(d); return s.str(); } else if ( t == IDMEF_DATA_TYPE_FLOAT ) { s << idmef_data_get_float(d); return s.str(); } else if ( t == IDMEF_DATA_TYPE_UINT32 ) { s << idmef_data_get_uint32(d); return s.str(); } else if ( t == IDMEF_DATA_TYPE_UINT64 ) { s << idmef_data_get_uint64(d); return s.str(); } else { s << "Left value doesn't fit 'data' type '" << t << "' requirement"; throw PreludeError(s.str()); } } s << "Left value doesn't fit '" << idmef_value_type_to_string(GetType()) << "' requirement"; throw PreludeError(s.str()); } IDMEFValue &IDMEFValue::operator=(const IDMEFValue &p) { if ( this != &p && _value != p._value ) { if ( _value ) idmef_value_destroy(_value); _value = (p._value) ? idmef_value_ref(p._value) : NULL; } return *this; } IDMEFValue::operator const char*() const { static std::string t; t = this->convert_string(); return t.c_str(); } IDMEFValue::operator idmef_value_t *() const { return _value; } libprelude-1.0.0/bindings/c++/idmef-time.cxx0000664000076400007640000001177311320773207015516 00000000000000/***** * * Copyright (C) 2008 PreludeIDS Technologies. All Rights Reserved. * Author: Yoann Vandoorselaere * * This file is part of the Prelude library. * * 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; see the file COPYING. If not, write to * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. * *****/ #include "prelude-error.hxx" #include "idmef-time.hxx" using namespace Prelude; IDMEFTime::~IDMEFTime() { if ( _time ) idmef_time_destroy(_time); } IDMEFTime::IDMEFTime(const IDMEFTime &time) { _time = (time._time) ? idmef_time_ref(time._time) : NULL; } IDMEFTime::IDMEFTime() { int ret; ret = idmef_time_new_from_gettimeofday(&_time); if ( ret < 0 ) throw PreludeError(ret); } IDMEFTime::IDMEFTime(idmef_time_t *time) { _time = time; } IDMEFTime::IDMEFTime(const time_t *time) { int ret; ret = idmef_time_new_from_time(&_time, time); if ( ret < 0 ) throw PreludeError(ret); } IDMEFTime::IDMEFTime(const char *str) { int ret; ret = idmef_time_new_from_string(&_time, str); if ( ret < 0 ) throw PreludeError(ret); } IDMEFTime::IDMEFTime(const struct timeval *tv) { int ret; ret = idmef_time_new_from_timeval(&_time, tv); if ( ret < 0 ) throw PreludeError(ret); } void IDMEFTime::Set(const time_t *t) { idmef_time_set_from_time(_time, t); } void IDMEFTime::Set(const struct timeval *tv) { int ret; ret = idmef_time_set_from_timeval(_time, tv); if ( ret < 0 ) throw PreludeError(ret); } void IDMEFTime::Set(const char *str) { int ret; ret = idmef_time_set_from_string(_time, str); if ( ret < 0 ) throw PreludeError(ret); } void IDMEFTime::Set() { int ret; ret = idmef_time_set_from_gettimeofday(_time); if ( ret < 0 ) throw PreludeError(ret); } void IDMEFTime::SetSec(uint32_t sec) { idmef_time_set_sec(_time, sec); } void IDMEFTime::SetUSec(uint32_t usec) { idmef_time_set_usec(_time, usec); } void IDMEFTime::SetGmtOffset(int32_t gmtoff) { idmef_time_set_gmt_offset(_time, gmtoff); } uint32_t IDMEFTime::GetSec() const { return idmef_time_get_sec(_time); } uint32_t IDMEFTime::GetUSec() const { return idmef_time_get_usec(_time); } int32_t IDMEFTime::GetGmtOffset() const { return idmef_time_get_gmt_offset(_time); } IDMEFTime IDMEFTime::Clone() { int ret; idmef_time_t *clone; ret = idmef_time_clone(_time, &clone); if ( ret < 0 ) throw PreludeError(ret); return IDMEFTime(clone); } const std::string IDMEFTime::ToString() const { int ret; std::string cs; prelude_string_t *str = NULL; ret = prelude_string_new(&str); if ( ret < 0 ) throw PreludeError(ret); ret = idmef_time_to_string(_time, str); if ( ret < 0 ) throw PreludeError(ret); cs = prelude_string_get_string(str); prelude_string_destroy(str); return cs; } bool IDMEFTime::operator <= (const IDMEFTime &time) { return ( (double) *this <= (double) time ); } bool IDMEFTime::operator < (const IDMEFTime &time) { return ( (double) *this < (double) time ); } bool IDMEFTime::operator >= (const IDMEFTime &time) { return ( (double) *this >= (double) time ); } bool IDMEFTime::operator > (const IDMEFTime &time) { return ( (double) *this > (double) time ); } bool IDMEFTime::operator != (const IDMEFTime &time) { return ( (double) *this != (double) time ); } bool IDMEFTime::operator == (const IDMEFTime &time) { return ( (double) *this == (double) time ); } IDMEFTime::operator int() const { return GetSec(); } IDMEFTime::operator long() const { return GetSec(); } IDMEFTime::operator double() const { return GetSec() + (GetUSec() * 1e-6); } IDMEFTime::operator const std::string() const { return ToString(); } IDMEFTime::operator idmef_time_t *() const { return _time; } IDMEFTime &IDMEFTime::operator=(const IDMEFTime &time) { if ( this != &time && _time != time._time ) { if ( _time ) idmef_time_destroy(_time); _time = (time._time) ? idmef_time_ref(time._time) : NULL; } return *this; } libprelude-1.0.0/bindings/c++/prelude-connection.cxx0000664000076400007640000000754411202225026017262 00000000000000/***** * * Copyright (C) 2008 PreludeIDS Technologies. All Rights Reserved. * Author: Yoann Vandoorselaere * * This file is part of the Prelude library. * * 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; see the file COPYING. If not, write to * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. * *****/ #include #include "prelude.h" #include "prelude-connection-pool.h" #include "prelude-connection-pool.hxx" #include "prelude-client.hxx" #include "prelude-error.hxx" using namespace Prelude; Connection::~Connection() { if ( _con ) prelude_connection_destroy(_con); } Connection::Connection() { _con = NULL; } Connection::Connection(const Connection &con) { _con = (con._con) ? prelude_connection_ref(con._con) : NULL; } Connection::Connection(const char *addr) { int ret; ret = prelude_connection_new(&_con, addr); if ( ret < 0 ) throw PreludeError(ret); } Connection::Connection(prelude_connection_t *con, bool own_data) { _con = con; } prelude_connection_t *Connection::GetConnection() { return _con; } void Connection::Close() { prelude_connection_close(_con); } void Connection::Connect(ClientProfile &cp, int permission) { int ret; ret = prelude_connection_connect(_con, cp, (prelude_connection_permission_t) permission); if ( ret < 0 ) throw PreludeError(ret); } void Connection::SetState(int state) { prelude_connection_set_state(_con, (prelude_connection_state_t) state); } int Connection::GetState() { return prelude_connection_get_state(_con); } void Connection::SetData(void *data) { prelude_connection_set_data(_con, data); } void *Connection::GetData() { return prelude_connection_get_data(_con); } int Connection::GetPermission() { return prelude_connection_get_permission(_con); } void Connection::SetPeerAnalyzerid(uint64_t analyzerid) { prelude_connection_set_peer_analyzerid(_con, analyzerid); } uint64_t Connection::GetPeerAnalyzerid() { return prelude_connection_get_peer_analyzerid(_con); } const char *Connection::GetLocalAddr() { return prelude_connection_get_local_addr(_con); } unsigned int Connection::GetLocalPort() { return prelude_connection_get_local_port(_con); } const char *Connection::GetPeerAddr() { return prelude_connection_get_peer_addr(_con); } unsigned int Connection::GetPeerPort() { return prelude_connection_get_peer_port(_con); } int Connection::GetFd() { return prelude_io_get_fd(prelude_connection_get_fd(_con)); } Prelude::IDMEF Connection::RecvIDMEF() { int ret; idmef_message_t *idmef; ret = prelude_connection_recv_idmef(_con, &idmef); if ( ret < 0 ) throw PreludeError(ret); return IDMEF(idmef); } bool Connection::IsAlive() { return prelude_connection_is_alive(_con); } Connection &Connection::operator=(const Connection &con) { if ( this != &con && _con != con._con ) { if ( _con ) prelude_connection_destroy(_con); _con = (con._con) ? prelude_connection_ref(con._con) : NULL; } return *this; } Connection::operator prelude_connection_t *() { return _con; } libprelude-1.0.0/bindings/c++/prelude-error.cxx0000664000076400007640000000267711202225026016256 00000000000000/***** * * Copyright (C) 2008 PreludeIDS Technologies. All Rights Reserved. * Author: Yoann Vandoorselaere * * This file is part of the Prelude library. * * 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; see the file COPYING. If not, write to * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. * *****/ #include #include #include "prelude-error.hxx" #include using namespace Prelude; PreludeError::PreludeError(const std::string message) throw() { _error = -1; _message = message; } PreludeError::PreludeError(int error) throw() { _error = error; _message = prelude_strerror(error); } const char *PreludeError::what() const throw() { return _message.c_str(); } PreludeError::operator const char *() { return _message.c_str(); } PreludeError::operator const std::string() const { return _message; } libprelude-1.0.0/bindings/c++/prelude-log.cxx0000664000076400007640000000130611225122036015674 00000000000000#include #include using namespace Prelude; void PreludeLog::SetLevel(int level) { prelude_log_set_level((prelude_log_t) level); } void PreludeLog::SetDebugLevel(int level) { prelude_log_set_debug_level(level); } void PreludeLog::SetFlags(int flags) { prelude_log_set_flags((prelude_log_flags_t) flags); } int PreludeLog::GetFlags() { return prelude_log_get_flags(); } void PreludeLog::SetLogfile(const char *filename) { prelude_log_set_logfile(filename); } void PreludeLog::SetCallback(void (*log_cb)(int level, const char *log)) { prelude_log_set_callback((void (*)(prelude_log_t level, const char *log)) log_cb); } libprelude-1.0.0/bindings/c++/idmef.cxx0000664000076400007640000001307111324402502014542 00000000000000#include #include #include #include #include #include "prelude-error.hxx" #include "idmef-path.hxx" #include "idmef.hxx" using namespace Prelude; IDMEF::IDMEF() : _message(NULL) { int ret; ret = idmef_message_new(&_message); if ( ret < 0 ) throw PreludeError(ret); } IDMEF::IDMEF(const IDMEF &idmef) { _message = (idmef._message) ? idmef_message_ref(idmef._message) : NULL; } IDMEF::IDMEF(idmef_message_t *message) { _message = message; } IDMEF::~IDMEF() { if ( _message ) idmef_message_destroy(_message); } void IDMEF::Set(const char *path, std::vector value) { IDMEFPath(path).Set(*this, value); } void IDMEF::Set(const char *path, IDMEFValue *value) { IDMEFPath(path).Set(*this, value); } void IDMEF::Set(const char *path, IDMEFValue &value) { IDMEFPath(path).Set(*this, &value); } void IDMEF::Set(const char *path, std::string value) { IDMEFPath(path).Set(*this, value); } void IDMEF::Set(const char *path, const char *value) { IDMEFPath(path).Set(*this, value); } void IDMEF::Set(const char *path, int8_t value) { IDMEFPath(path).Set(*this, value); } void IDMEF::Set(const char *path, uint8_t value) { IDMEFPath(path).Set(*this, value); } void IDMEF::Set(const char *path, int16_t value) { IDMEFPath(path).Set(*this, value); } void IDMEF::Set(const char *path, uint16_t value) { IDMEFPath(path).Set(*this, value); } void IDMEF::Set(const char *path, int32_t value) { IDMEFPath(path).Set(*this, value); } void IDMEF::Set(const char *path, uint32_t value) { IDMEFPath(path).Set(*this, value); } void IDMEF::Set(const char *path, int64_t value) { IDMEFPath(path).Set(*this, value); } void IDMEF::Set(const char *path, uint64_t value) { IDMEFPath(path).Set(*this, value); } void IDMEF::Set(const char *path, float value) { IDMEFPath(path).Set(*this, value); } void IDMEF::Set(const char *path, double value) { IDMEFPath(path).Set(*this, value); } void IDMEF::Set(const char *path, IDMEFTime &value) { IDMEFPath(path).Set(*this, value); } IDMEFValue IDMEF::Get(const char *path) { return IDMEFPath(path).Get(*this); } IDMEF IDMEF::Clone(const IDMEF &idmef) { int ret; idmef_message_t *clone; ret = idmef_message_clone(idmef._message, &clone); if ( ret < 0 ) throw PreludeError(ret); return IDMEF(clone); } const std::string IDMEF::ToString() const { int ret; std::string str; prelude_io_t *fd; ret = prelude_io_new(&fd); if ( ret < 0 ) throw PreludeError(ret); prelude_io_set_buffer_io(fd); idmef_message_print(_message, fd); str.assign((const char *) prelude_io_get_fdptr(fd), prelude_io_pending(fd)); prelude_io_close(fd); prelude_io_destroy(fd); return str; } static int ostream_write(prelude_msgbuf_t *fd, prelude_msg_t *msg) { std::ostream *os = (std::ostream *) prelude_msgbuf_get_data(fd); os->write((const char *)prelude_msg_get_message_data(msg), prelude_msg_get_len(msg)); prelude_msg_recycle(msg); return 0; } static ssize_t istream_read(prelude_io_t *fd, void *buf, size_t size) { std::istream *is = (std::istream *) prelude_io_get_fdptr(fd); is->read((char *) buf, size); return is->gcount(); } void IDMEF::_genericRead(ssize_t (read_cb)(prelude_io_t *fd, void *buf, size_t size), void *fd_data) { int ret; prelude_io_t *fd; prelude_msg_t *msg = NULL; ret = prelude_io_new(&fd); if ( ret < 0 ) throw PreludeError(ret); prelude_io_set_fdptr(fd, fd_data); prelude_io_set_read_callback(fd, read_cb); ret = prelude_msg_read(&msg, fd); prelude_io_destroy(fd); if ( ret < 0 ) throw PreludeError(ret); ret = idmef_message_read(this->_message, msg); if ( ret < 0 ) { prelude_msg_destroy(msg); throw PreludeError(ret); } idmef_message_set_pmsg(this->_message, msg); } std::istream &operator >>(std::istream &is, Prelude::IDMEF &idmef) { idmef._genericRead(istream_read, &is); return is; } size_t IDMEF::_genericWrite(int (write_cb)(prelude_msgbuf_t *msgbuf, prelude_msg_t *msg), void *fd_data) const { int ret; prelude_msgbuf_t *fd; ret = prelude_msgbuf_new(&fd); if ( ret < 0 ) throw PreludeError(ret); prelude_msgbuf_set_data(fd, fd_data); prelude_msgbuf_set_callback(fd, write_cb); ret = idmef_message_write(this->_message, fd); if ( ret < 0 ) { prelude_msgbuf_destroy(fd); throw PreludeError(ret); } prelude_msgbuf_destroy(fd); return ret; } std::ostream &operator <<(std::ostream &os, const IDMEF &idmef) { idmef._genericWrite(ostream_write, &os); return os; } IDMEF::operator const std::string() const { return ToString(); } IDMEF::operator idmef_message_t *() const { return _message; } IDMEF &IDMEF::operator = (const IDMEF &idmef) { if ( this != &idmef && _message != idmef._message ) { if ( _message ) idmef_message_destroy(_message); _message = (idmef._message) ? idmef_message_ref(idmef._message) : NULL; } return *this; } libprelude-1.0.0/bindings/c++/Makefile.am0000664000076400007640000000147111225122036014770 00000000000000if HAVE_EASY_BINDINGS SUBDIRS = include lib_LTLIBRARIES = libpreludecpp.la libpreludecpp_ladir = ${prefix}/lib libpreludecpp_la_SOURCES = \ prelude-error.cxx \ idmef.cxx \ idmef-criteria.cxx \ idmef-path.cxx \ idmef-time.cxx \ idmef-value.cxx \ prelude.cxx \ prelude-client.cxx \ prelude-client-easy.cxx \ prelude-client-profile.cxx \ prelude-connection.cxx \ prelude-connection-pool.cxx \ prelude-log.cxx libpreludecpp_la_LDFLAGS = -no-undefined -version-info @LIBPRELUDECPP_SONAME@ libpreludecpp_la_LIBADD = $(top_builddir)/src/.libs/libprelude.la libpreludecpp_la_CPPFLAGS = -I$(top_builddir) -I$(top_builddir)/src/include -I$(top_srcdir)/src/include -I$(top_builddir)/src/libprelude-error -I$(top_builddir)/bindings/c++/include -I$(top_srcdir)/bindings/c++/include endif -include $(top_srcdir)/git.mk libprelude-1.0.0/bindings/c++/prelude.cxx0000664000076400007640000000177211216540135015130 00000000000000/***** * * Copyright (C) 2009 PreludeIDS Technologies. All Rights Reserved. * Author: Yoann Vandoorselaere * * This file is part of the Prelude library. * * 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; see the file COPYING. If not, write to * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. * *****/ #include #include "prelude.hxx" const char *CheckVersion(const char *version) { return prelude_check_version(version); } libprelude-1.0.0/bindings/c++/Makefile.in0000664000076400007640000021732111347714453015023 00000000000000# Makefile.in generated by automake 1.11.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, # Inc. # This Makefile.in 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. @SET_MAKE@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ target_triplet = @target@ subdir = bindings/c++ DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/libmissing/m4/00gnulib.m4 \ $(top_srcdir)/libmissing/m4/alloca.m4 \ $(top_srcdir)/libmissing/m4/arpa_inet_h.m4 \ $(top_srcdir)/libmissing/m4/btowc.m4 \ $(top_srcdir)/libmissing/m4/close.m4 \ $(top_srcdir)/libmissing/m4/codeset.m4 \ $(top_srcdir)/libmissing/m4/cond.m4 \ $(top_srcdir)/libmissing/m4/dos.m4 \ $(top_srcdir)/libmissing/m4/dup2.m4 \ $(top_srcdir)/libmissing/m4/errno_h.m4 \ $(top_srcdir)/libmissing/m4/exponentd.m4 \ $(top_srcdir)/libmissing/m4/exponentf.m4 \ $(top_srcdir)/libmissing/m4/exponentl.m4 \ $(top_srcdir)/libmissing/m4/extensions.m4 \ $(top_srcdir)/libmissing/m4/fclose.m4 \ $(top_srcdir)/libmissing/m4/fcntl-o.m4 \ $(top_srcdir)/libmissing/m4/fcntl_h.m4 \ $(top_srcdir)/libmissing/m4/float_h.m4 \ $(top_srcdir)/libmissing/m4/fopen.m4 \ $(top_srcdir)/libmissing/m4/fpieee.m4 \ $(top_srcdir)/libmissing/m4/frexp.m4 \ $(top_srcdir)/libmissing/m4/frexpl.m4 \ $(top_srcdir)/libmissing/m4/fseeko.m4 \ $(top_srcdir)/libmissing/m4/ftw.m4 \ $(top_srcdir)/libmissing/m4/getaddrinfo.m4 \ $(top_srcdir)/libmissing/m4/getdelim.m4 \ $(top_srcdir)/libmissing/m4/gethostname.m4 \ $(top_srcdir)/libmissing/m4/getline.m4 \ $(top_srcdir)/libmissing/m4/getpagesize.m4 \ $(top_srcdir)/libmissing/m4/getpass.m4 \ $(top_srcdir)/libmissing/m4/gettimeofday.m4 \ $(top_srcdir)/libmissing/m4/glibc21.m4 \ $(top_srcdir)/libmissing/m4/gnulib-common.m4 \ $(top_srcdir)/libmissing/m4/gnulib-comp.m4 \ $(top_srcdir)/libmissing/m4/gnulib-tool.m4 \ $(top_srcdir)/libmissing/m4/hostent.m4 \ $(top_srcdir)/libmissing/m4/include_next.m4 \ $(top_srcdir)/libmissing/m4/inet_ntop.m4 \ $(top_srcdir)/libmissing/m4/inet_pton.m4 \ $(top_srcdir)/libmissing/m4/intmax_t.m4 \ $(top_srcdir)/libmissing/m4/inttypes_h.m4 \ $(top_srcdir)/libmissing/m4/isnand.m4 \ $(top_srcdir)/libmissing/m4/isnanf.m4 \ $(top_srcdir)/libmissing/m4/isnanl.m4 \ $(top_srcdir)/libmissing/m4/langinfo_h.m4 \ $(top_srcdir)/libmissing/m4/ldexpl.m4 \ $(top_srcdir)/libmissing/m4/lib-ld.m4 \ $(top_srcdir)/libmissing/m4/lib-link.m4 \ $(top_srcdir)/libmissing/m4/lib-prefix.m4 \ $(top_srcdir)/libmissing/m4/localcharset.m4 \ $(top_srcdir)/libmissing/m4/locale-fr.m4 \ $(top_srcdir)/libmissing/m4/locale-ja.m4 \ $(top_srcdir)/libmissing/m4/locale-tr.m4 \ $(top_srcdir)/libmissing/m4/locale-zh.m4 \ $(top_srcdir)/libmissing/m4/lock.m4 \ $(top_srcdir)/libmissing/m4/longlong.m4 \ $(top_srcdir)/libmissing/m4/lseek.m4 \ $(top_srcdir)/libmissing/m4/lstat.m4 \ $(top_srcdir)/libmissing/m4/malloc.m4 \ $(top_srcdir)/libmissing/m4/math_h.m4 \ $(top_srcdir)/libmissing/m4/mbrtowc.m4 \ $(top_srcdir)/libmissing/m4/mbsinit.m4 \ $(top_srcdir)/libmissing/m4/mbstate_t.m4 \ $(top_srcdir)/libmissing/m4/memchr.m4 \ $(top_srcdir)/libmissing/m4/memmem.m4 \ $(top_srcdir)/libmissing/m4/minmax.m4 \ $(top_srcdir)/libmissing/m4/mktime.m4 \ $(top_srcdir)/libmissing/m4/mmap-anon.m4 \ $(top_srcdir)/libmissing/m4/mode_t.m4 \ $(top_srcdir)/libmissing/m4/multiarch.m4 \ $(top_srcdir)/libmissing/m4/netdb_h.m4 \ $(top_srcdir)/libmissing/m4/netinet_in_h.m4 \ $(top_srcdir)/libmissing/m4/nl_langinfo.m4 \ $(top_srcdir)/libmissing/m4/nocrash.m4 \ $(top_srcdir)/libmissing/m4/onceonly.m4 \ $(top_srcdir)/libmissing/m4/open.m4 \ $(top_srcdir)/libmissing/m4/pathmax.m4 \ $(top_srcdir)/libmissing/m4/perror.m4 \ $(top_srcdir)/libmissing/m4/poll.m4 \ $(top_srcdir)/libmissing/m4/printf-frexp.m4 \ $(top_srcdir)/libmissing/m4/printf-frexpl.m4 \ $(top_srcdir)/libmissing/m4/printf.m4 \ $(top_srcdir)/libmissing/m4/realloc.m4 \ $(top_srcdir)/libmissing/m4/regex.m4 \ $(top_srcdir)/libmissing/m4/relocatable-lib.m4 \ $(top_srcdir)/libmissing/m4/select.m4 \ $(top_srcdir)/libmissing/m4/servent.m4 \ $(top_srcdir)/libmissing/m4/signal_h.m4 \ $(top_srcdir)/libmissing/m4/signalblocking.m4 \ $(top_srcdir)/libmissing/m4/signbit.m4 \ $(top_srcdir)/libmissing/m4/size_max.m4 \ $(top_srcdir)/libmissing/m4/sleep.m4 \ $(top_srcdir)/libmissing/m4/snprintf-posix.m4 \ $(top_srcdir)/libmissing/m4/snprintf.m4 \ $(top_srcdir)/libmissing/m4/sockets.m4 \ $(top_srcdir)/libmissing/m4/socklen.m4 \ $(top_srcdir)/libmissing/m4/sockpfaf.m4 \ $(top_srcdir)/libmissing/m4/ssize_t.m4 \ $(top_srcdir)/libmissing/m4/stat.m4 \ $(top_srcdir)/libmissing/m4/stdbool.m4 \ $(top_srcdir)/libmissing/m4/stddef_h.m4 \ $(top_srcdir)/libmissing/m4/stdint.m4 \ $(top_srcdir)/libmissing/m4/stdint_h.m4 \ $(top_srcdir)/libmissing/m4/stdio_h.m4 \ $(top_srcdir)/libmissing/m4/stdlib_h.m4 \ $(top_srcdir)/libmissing/m4/strcase.m4 \ $(top_srcdir)/libmissing/m4/strcasestr.m4 \ $(top_srcdir)/libmissing/m4/strdup.m4 \ $(top_srcdir)/libmissing/m4/strerror.m4 \ $(top_srcdir)/libmissing/m4/string_h.m4 \ $(top_srcdir)/libmissing/m4/strings_h.m4 \ $(top_srcdir)/libmissing/m4/strndup.m4 \ $(top_srcdir)/libmissing/m4/strnlen.m4 \ $(top_srcdir)/libmissing/m4/strptime.m4 \ $(top_srcdir)/libmissing/m4/strsep.m4 \ $(top_srcdir)/libmissing/m4/symlink.m4 \ $(top_srcdir)/libmissing/m4/sys_ioctl_h.m4 \ $(top_srcdir)/libmissing/m4/sys_select_h.m4 \ $(top_srcdir)/libmissing/m4/sys_socket_h.m4 \ $(top_srcdir)/libmissing/m4/sys_stat_h.m4 \ $(top_srcdir)/libmissing/m4/sys_time_h.m4 \ $(top_srcdir)/libmissing/m4/sys_utsname_h.m4 \ $(top_srcdir)/libmissing/m4/thread.m4 \ $(top_srcdir)/libmissing/m4/threadlib.m4 \ $(top_srcdir)/libmissing/m4/time_h.m4 \ $(top_srcdir)/libmissing/m4/time_r.m4 \ $(top_srcdir)/libmissing/m4/timegm.m4 \ $(top_srcdir)/libmissing/m4/tls.m4 \ $(top_srcdir)/libmissing/m4/tm_gmtoff.m4 \ $(top_srcdir)/libmissing/m4/uname.m4 \ $(top_srcdir)/libmissing/m4/ungetc.m4 \ $(top_srcdir)/libmissing/m4/unistd_h.m4 \ $(top_srcdir)/libmissing/m4/vasnprintf.m4 \ $(top_srcdir)/libmissing/m4/vsnprintf-posix.m4 \ $(top_srcdir)/libmissing/m4/vsnprintf.m4 \ $(top_srcdir)/libmissing/m4/warn-on-use.m4 \ $(top_srcdir)/libmissing/m4/wchar.m4 \ $(top_srcdir)/libmissing/m4/wchar_t.m4 \ $(top_srcdir)/libmissing/m4/wcrtomb.m4 \ $(top_srcdir)/libmissing/m4/wctob.m4 \ $(top_srcdir)/libmissing/m4/wctype.m4 \ $(top_srcdir)/libmissing/m4/wint_t.m4 \ $(top_srcdir)/libmissing/m4/write.m4 \ $(top_srcdir)/libmissing/m4/xsize.m4 \ $(top_srcdir)/libmissing/m4/yield.m4 \ $(top_srcdir)/m4/ac_compile_check_sizeof.m4 \ $(top_srcdir)/m4/am_path_ruby.m4 $(top_srcdir)/m4/argz.m4 \ $(top_srcdir)/m4/as-ac-expand.m4 \ $(top_srcdir)/m4/ax_c_check_flag.m4 \ $(top_srcdir)/m4/ax_check_aligned_access_required.m4 \ $(top_srcdir)/m4/ax_create_prelude_inttypes_h.m4 \ $(top_srcdir)/m4/ax_ld_check_flag.m4 \ $(top_srcdir)/m4/gtk-doc.m4 $(top_srcdir)/m4/libgcrypt.m4 \ $(top_srcdir)/m4/libgnutls-extra.m4 \ $(top_srcdir)/m4/libgnutls.m4 $(top_srcdir)/m4/libtool.m4 \ $(top_srcdir)/m4/ltdl.m4 $(top_srcdir)/m4/ltoptions.m4 \ $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/m4/pkg.m4 \ $(top_srcdir)/configure.in am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; am__install_max = 40 am__nobase_strip_setup = \ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` am__nobase_strip = \ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" am__nobase_list = $(am__nobase_strip_setup); \ for p in $$list; do echo "$$p $$p"; done | \ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ if (++n[$$2] == $(am__install_max)) \ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ END { for (dir in files) print dir, files[dir] }' am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' am__installdirs = "$(DESTDIR)$(libdir)" LTLIBRARIES = $(lib_LTLIBRARIES) @HAVE_EASY_BINDINGS_TRUE@libpreludecpp_la_DEPENDENCIES = $(top_builddir)/src/.libs/libprelude.la am__libpreludecpp_la_SOURCES_DIST = prelude-error.cxx idmef.cxx \ idmef-criteria.cxx idmef-path.cxx idmef-time.cxx \ idmef-value.cxx prelude.cxx prelude-client.cxx \ prelude-client-easy.cxx prelude-client-profile.cxx \ prelude-connection.cxx prelude-connection-pool.cxx \ prelude-log.cxx @HAVE_EASY_BINDINGS_TRUE@am_libpreludecpp_la_OBJECTS = \ @HAVE_EASY_BINDINGS_TRUE@ libpreludecpp_la-prelude-error.lo \ @HAVE_EASY_BINDINGS_TRUE@ libpreludecpp_la-idmef.lo \ @HAVE_EASY_BINDINGS_TRUE@ libpreludecpp_la-idmef-criteria.lo \ @HAVE_EASY_BINDINGS_TRUE@ libpreludecpp_la-idmef-path.lo \ @HAVE_EASY_BINDINGS_TRUE@ libpreludecpp_la-idmef-time.lo \ @HAVE_EASY_BINDINGS_TRUE@ libpreludecpp_la-idmef-value.lo \ @HAVE_EASY_BINDINGS_TRUE@ libpreludecpp_la-prelude.lo \ @HAVE_EASY_BINDINGS_TRUE@ libpreludecpp_la-prelude-client.lo \ @HAVE_EASY_BINDINGS_TRUE@ libpreludecpp_la-prelude-client-easy.lo \ @HAVE_EASY_BINDINGS_TRUE@ libpreludecpp_la-prelude-client-profile.lo \ @HAVE_EASY_BINDINGS_TRUE@ libpreludecpp_la-prelude-connection.lo \ @HAVE_EASY_BINDINGS_TRUE@ libpreludecpp_la-prelude-connection-pool.lo \ @HAVE_EASY_BINDINGS_TRUE@ libpreludecpp_la-prelude-log.lo libpreludecpp_la_OBJECTS = $(am_libpreludecpp_la_OBJECTS) libpreludecpp_la_LINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CXXLD) $(AM_CXXFLAGS) \ $(CXXFLAGS) $(libpreludecpp_la_LDFLAGS) $(LDFLAGS) -o $@ @HAVE_EASY_BINDINGS_TRUE@am_libpreludecpp_la_rpath = -rpath $(libdir) DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles am__mv = mv -f CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) LTCXXCOMPILE = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) CXXLD = $(CXX) CXXLINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=link $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) \ $(LDFLAGS) -o $@ SOURCES = $(libpreludecpp_la_SOURCES) DIST_SOURCES = $(am__libpreludecpp_la_SOURCES_DIST) RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \ html-recursive info-recursive install-data-recursive \ install-dvi-recursive install-exec-recursive \ install-html-recursive install-info-recursive \ install-pdf-recursive install-ps-recursive install-recursive \ installcheck-recursive installdirs-recursive pdf-recursive \ ps-recursive uninstall-recursive RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ distclean-recursive maintainer-clean-recursive AM_RECURSIVE_TARGETS = $(RECURSIVE_TARGETS:-recursive=) \ $(RECURSIVE_CLEAN_TARGETS:-recursive=) tags TAGS ctags CTAGS \ distdir ETAGS = etags CTAGS = ctags DIST_SUBDIRS = include DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) am__relativize = \ dir0=`pwd`; \ sed_first='s,^\([^/]*\)/.*$$,\1,'; \ sed_rest='s,^[^/]*/*,,'; \ sed_last='s,^.*/\([^/]*\)$$,\1,'; \ sed_butlast='s,/*[^/]*$$,,'; \ while test -n "$$dir1"; do \ first=`echo "$$dir1" | sed -e "$$sed_first"`; \ if test "$$first" != "."; then \ if test "$$first" = ".."; then \ dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \ dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \ else \ first2=`echo "$$dir2" | sed -e "$$sed_first"`; \ if test "$$first2" = "$$first"; then \ dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \ else \ dir2="../$$dir2"; \ fi; \ dir0="$$dir0"/"$$first"; \ fi; \ fi; \ dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \ done; \ reldir="$$dir2" ACLOCAL = @ACLOCAL@ ALLOCA = @ALLOCA@ ALLOCA_H = @ALLOCA_H@ AMTAR = @AMTAR@ APPLE_UNIVERSAL_BUILD = @APPLE_UNIVERSAL_BUILD@ AR = @AR@ ARGZ_H = @ARGZ_H@ AS = @AS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ BINDINGS_CC = @BINDINGS_CC@ BINDIR = @BINDIR@ BITSIZEOF_PTRDIFF_T = @BITSIZEOF_PTRDIFF_T@ BITSIZEOF_SIG_ATOMIC_T = @BITSIZEOF_SIG_ATOMIC_T@ BITSIZEOF_SIZE_T = @BITSIZEOF_SIZE_T@ BITSIZEOF_WCHAR_T = @BITSIZEOF_WCHAR_T@ BITSIZEOF_WINT_T = @BITSIZEOF_WINT_T@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CC_FOR_BUILD = @CC_FOR_BUILD@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EMULTIHOP_HIDDEN = @EMULTIHOP_HIDDEN@ EMULTIHOP_VALUE = @EMULTIHOP_VALUE@ ENOLINK_HIDDEN = @ENOLINK_HIDDEN@ ENOLINK_VALUE = @ENOLINK_VALUE@ EOVERFLOW_HIDDEN = @EOVERFLOW_HIDDEN@ EOVERFLOW_VALUE = @EOVERFLOW_VALUE@ ERRNO_H = @ERRNO_H@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ FLOAT_H = @FLOAT_H@ GETADDRINFO_LIB = @GETADDRINFO_LIB@ GETHOSTNAME_LIB = @GETHOSTNAME_LIB@ GLIBC21 = @GLIBC21@ GNULIB_ACCEPT = @GNULIB_ACCEPT@ GNULIB_ACCEPT4 = @GNULIB_ACCEPT4@ GNULIB_ACOSL = @GNULIB_ACOSL@ GNULIB_ASINL = @GNULIB_ASINL@ GNULIB_ATANL = @GNULIB_ATANL@ GNULIB_ATOLL = @GNULIB_ATOLL@ GNULIB_BIND = @GNULIB_BIND@ GNULIB_BTOWC = @GNULIB_BTOWC@ GNULIB_CALLOC_POSIX = @GNULIB_CALLOC_POSIX@ GNULIB_CANONICALIZE_FILE_NAME = @GNULIB_CANONICALIZE_FILE_NAME@ GNULIB_CEILF = @GNULIB_CEILF@ GNULIB_CEILL = @GNULIB_CEILL@ GNULIB_CHOWN = @GNULIB_CHOWN@ GNULIB_CLOSE = @GNULIB_CLOSE@ GNULIB_CONNECT = @GNULIB_CONNECT@ GNULIB_COSL = @GNULIB_COSL@ GNULIB_DPRINTF = @GNULIB_DPRINTF@ GNULIB_DUP2 = @GNULIB_DUP2@ GNULIB_DUP3 = @GNULIB_DUP3@ GNULIB_ENVIRON = @GNULIB_ENVIRON@ GNULIB_EUIDACCESS = @GNULIB_EUIDACCESS@ GNULIB_EXPL = @GNULIB_EXPL@ GNULIB_FACCESSAT = @GNULIB_FACCESSAT@ GNULIB_FCHDIR = @GNULIB_FCHDIR@ GNULIB_FCHMODAT = @GNULIB_FCHMODAT@ GNULIB_FCHOWNAT = @GNULIB_FCHOWNAT@ GNULIB_FCLOSE = @GNULIB_FCLOSE@ GNULIB_FCNTL = @GNULIB_FCNTL@ GNULIB_FFLUSH = @GNULIB_FFLUSH@ GNULIB_FLOORF = @GNULIB_FLOORF@ GNULIB_FLOORL = @GNULIB_FLOORL@ GNULIB_FOPEN = @GNULIB_FOPEN@ GNULIB_FPRINTF = @GNULIB_FPRINTF@ GNULIB_FPRINTF_POSIX = @GNULIB_FPRINTF_POSIX@ GNULIB_FPURGE = @GNULIB_FPURGE@ GNULIB_FPUTC = @GNULIB_FPUTC@ GNULIB_FPUTS = @GNULIB_FPUTS@ GNULIB_FREOPEN = @GNULIB_FREOPEN@ GNULIB_FREXP = @GNULIB_FREXP@ GNULIB_FREXPL = @GNULIB_FREXPL@ GNULIB_FSEEK = @GNULIB_FSEEK@ GNULIB_FSEEKO = @GNULIB_FSEEKO@ GNULIB_FSTATAT = @GNULIB_FSTATAT@ GNULIB_FSYNC = @GNULIB_FSYNC@ GNULIB_FTELL = @GNULIB_FTELL@ GNULIB_FTELLO = @GNULIB_FTELLO@ GNULIB_FTRUNCATE = @GNULIB_FTRUNCATE@ GNULIB_FUTIMENS = @GNULIB_FUTIMENS@ GNULIB_FWRITE = @GNULIB_FWRITE@ GNULIB_GETADDRINFO = @GNULIB_GETADDRINFO@ GNULIB_GETCWD = @GNULIB_GETCWD@ GNULIB_GETDELIM = @GNULIB_GETDELIM@ GNULIB_GETDOMAINNAME = @GNULIB_GETDOMAINNAME@ GNULIB_GETDTABLESIZE = @GNULIB_GETDTABLESIZE@ GNULIB_GETGROUPS = @GNULIB_GETGROUPS@ GNULIB_GETHOSTNAME = @GNULIB_GETHOSTNAME@ GNULIB_GETLINE = @GNULIB_GETLINE@ GNULIB_GETLOADAVG = @GNULIB_GETLOADAVG@ GNULIB_GETLOGIN = @GNULIB_GETLOGIN@ GNULIB_GETLOGIN_R = @GNULIB_GETLOGIN_R@ GNULIB_GETPAGESIZE = @GNULIB_GETPAGESIZE@ GNULIB_GETPEERNAME = @GNULIB_GETPEERNAME@ GNULIB_GETSOCKNAME = @GNULIB_GETSOCKNAME@ GNULIB_GETSOCKOPT = @GNULIB_GETSOCKOPT@ GNULIB_GETSUBOPT = @GNULIB_GETSUBOPT@ GNULIB_GETTIMEOFDAY = @GNULIB_GETTIMEOFDAY@ GNULIB_GETUSERSHELL = @GNULIB_GETUSERSHELL@ GNULIB_INET_NTOP = @GNULIB_INET_NTOP@ GNULIB_INET_PTON = @GNULIB_INET_PTON@ GNULIB_IOCTL = @GNULIB_IOCTL@ GNULIB_ISFINITE = @GNULIB_ISFINITE@ GNULIB_ISINF = @GNULIB_ISINF@ GNULIB_ISNAN = @GNULIB_ISNAN@ GNULIB_ISNAND = @GNULIB_ISNAND@ GNULIB_ISNANF = @GNULIB_ISNANF@ GNULIB_ISNANL = @GNULIB_ISNANL@ GNULIB_LCHMOD = @GNULIB_LCHMOD@ GNULIB_LCHOWN = @GNULIB_LCHOWN@ GNULIB_LDEXPL = @GNULIB_LDEXPL@ GNULIB_LINK = @GNULIB_LINK@ GNULIB_LINKAT = @GNULIB_LINKAT@ GNULIB_LISTEN = @GNULIB_LISTEN@ GNULIB_LOGL = @GNULIB_LOGL@ GNULIB_LSEEK = @GNULIB_LSEEK@ GNULIB_LSTAT = @GNULIB_LSTAT@ GNULIB_MALLOC_POSIX = @GNULIB_MALLOC_POSIX@ GNULIB_MBRLEN = @GNULIB_MBRLEN@ GNULIB_MBRTOWC = @GNULIB_MBRTOWC@ GNULIB_MBSCASECMP = @GNULIB_MBSCASECMP@ GNULIB_MBSCASESTR = @GNULIB_MBSCASESTR@ GNULIB_MBSCHR = @GNULIB_MBSCHR@ GNULIB_MBSCSPN = @GNULIB_MBSCSPN@ GNULIB_MBSINIT = @GNULIB_MBSINIT@ GNULIB_MBSLEN = @GNULIB_MBSLEN@ GNULIB_MBSNCASECMP = @GNULIB_MBSNCASECMP@ GNULIB_MBSNLEN = @GNULIB_MBSNLEN@ GNULIB_MBSNRTOWCS = @GNULIB_MBSNRTOWCS@ GNULIB_MBSPBRK = @GNULIB_MBSPBRK@ GNULIB_MBSPCASECMP = @GNULIB_MBSPCASECMP@ GNULIB_MBSRCHR = @GNULIB_MBSRCHR@ GNULIB_MBSRTOWCS = @GNULIB_MBSRTOWCS@ GNULIB_MBSSEP = @GNULIB_MBSSEP@ GNULIB_MBSSPN = @GNULIB_MBSSPN@ GNULIB_MBSSTR = @GNULIB_MBSSTR@ GNULIB_MBSTOK_R = @GNULIB_MBSTOK_R@ GNULIB_MEMCHR = @GNULIB_MEMCHR@ GNULIB_MEMMEM = @GNULIB_MEMMEM@ GNULIB_MEMPCPY = @GNULIB_MEMPCPY@ GNULIB_MEMRCHR = @GNULIB_MEMRCHR@ GNULIB_MKDIRAT = @GNULIB_MKDIRAT@ GNULIB_MKDTEMP = @GNULIB_MKDTEMP@ GNULIB_MKFIFO = @GNULIB_MKFIFO@ GNULIB_MKFIFOAT = @GNULIB_MKFIFOAT@ GNULIB_MKNOD = @GNULIB_MKNOD@ GNULIB_MKNODAT = @GNULIB_MKNODAT@ GNULIB_MKOSTEMP = @GNULIB_MKOSTEMP@ GNULIB_MKOSTEMPS = @GNULIB_MKOSTEMPS@ GNULIB_MKSTEMP = @GNULIB_MKSTEMP@ GNULIB_MKSTEMPS = @GNULIB_MKSTEMPS@ GNULIB_NL_LANGINFO = @GNULIB_NL_LANGINFO@ GNULIB_OBSTACK_PRINTF = @GNULIB_OBSTACK_PRINTF@ GNULIB_OBSTACK_PRINTF_POSIX = @GNULIB_OBSTACK_PRINTF_POSIX@ GNULIB_OPEN = @GNULIB_OPEN@ GNULIB_OPENAT = @GNULIB_OPENAT@ GNULIB_PERROR = @GNULIB_PERROR@ GNULIB_PIPE2 = @GNULIB_PIPE2@ GNULIB_POPEN = @GNULIB_POPEN@ GNULIB_PREAD = @GNULIB_PREAD@ GNULIB_PRINTF = @GNULIB_PRINTF@ GNULIB_PRINTF_POSIX = @GNULIB_PRINTF_POSIX@ GNULIB_PUTC = @GNULIB_PUTC@ GNULIB_PUTCHAR = @GNULIB_PUTCHAR@ GNULIB_PUTENV = @GNULIB_PUTENV@ GNULIB_PUTS = @GNULIB_PUTS@ GNULIB_RANDOM_R = @GNULIB_RANDOM_R@ GNULIB_RAWMEMCHR = @GNULIB_RAWMEMCHR@ GNULIB_READLINK = @GNULIB_READLINK@ GNULIB_READLINKAT = @GNULIB_READLINKAT@ GNULIB_REALLOC_POSIX = @GNULIB_REALLOC_POSIX@ GNULIB_REALPATH = @GNULIB_REALPATH@ GNULIB_RECV = @GNULIB_RECV@ GNULIB_RECVFROM = @GNULIB_RECVFROM@ GNULIB_REMOVE = @GNULIB_REMOVE@ GNULIB_RENAME = @GNULIB_RENAME@ GNULIB_RENAMEAT = @GNULIB_RENAMEAT@ GNULIB_RMDIR = @GNULIB_RMDIR@ GNULIB_ROUND = @GNULIB_ROUND@ GNULIB_ROUNDF = @GNULIB_ROUNDF@ GNULIB_ROUNDL = @GNULIB_ROUNDL@ GNULIB_RPMATCH = @GNULIB_RPMATCH@ GNULIB_SELECT = @GNULIB_SELECT@ GNULIB_SEND = @GNULIB_SEND@ GNULIB_SENDTO = @GNULIB_SENDTO@ GNULIB_SETENV = @GNULIB_SETENV@ GNULIB_SETSOCKOPT = @GNULIB_SETSOCKOPT@ GNULIB_SHUTDOWN = @GNULIB_SHUTDOWN@ GNULIB_SIGACTION = @GNULIB_SIGACTION@ GNULIB_SIGNAL_H_SIGPIPE = @GNULIB_SIGNAL_H_SIGPIPE@ GNULIB_SIGNBIT = @GNULIB_SIGNBIT@ GNULIB_SIGPROCMASK = @GNULIB_SIGPROCMASK@ GNULIB_SINL = @GNULIB_SINL@ GNULIB_SLEEP = @GNULIB_SLEEP@ GNULIB_SNPRINTF = @GNULIB_SNPRINTF@ GNULIB_SOCKET = @GNULIB_SOCKET@ GNULIB_SPRINTF_POSIX = @GNULIB_SPRINTF_POSIX@ GNULIB_SQRTL = @GNULIB_SQRTL@ GNULIB_STAT = @GNULIB_STAT@ GNULIB_STDIO_H_SIGPIPE = @GNULIB_STDIO_H_SIGPIPE@ GNULIB_STPCPY = @GNULIB_STPCPY@ GNULIB_STPNCPY = @GNULIB_STPNCPY@ GNULIB_STRCASESTR = @GNULIB_STRCASESTR@ GNULIB_STRCHRNUL = @GNULIB_STRCHRNUL@ GNULIB_STRDUP = @GNULIB_STRDUP@ GNULIB_STRERROR = @GNULIB_STRERROR@ GNULIB_STRNDUP = @GNULIB_STRNDUP@ GNULIB_STRNLEN = @GNULIB_STRNLEN@ GNULIB_STRPBRK = @GNULIB_STRPBRK@ GNULIB_STRSEP = @GNULIB_STRSEP@ GNULIB_STRSIGNAL = @GNULIB_STRSIGNAL@ GNULIB_STRSTR = @GNULIB_STRSTR@ GNULIB_STRTOD = @GNULIB_STRTOD@ GNULIB_STRTOK_R = @GNULIB_STRTOK_R@ GNULIB_STRTOLL = @GNULIB_STRTOLL@ GNULIB_STRTOULL = @GNULIB_STRTOULL@ GNULIB_STRVERSCMP = @GNULIB_STRVERSCMP@ GNULIB_SYMLINK = @GNULIB_SYMLINK@ GNULIB_SYMLINKAT = @GNULIB_SYMLINKAT@ GNULIB_TANL = @GNULIB_TANL@ GNULIB_TRUNC = @GNULIB_TRUNC@ GNULIB_TRUNCF = @GNULIB_TRUNCF@ GNULIB_TRUNCL = @GNULIB_TRUNCL@ GNULIB_UNAME = @GNULIB_UNAME@ GNULIB_UNISTD_H_GETOPT = @GNULIB_UNISTD_H_GETOPT@ GNULIB_UNISTD_H_SIGPIPE = @GNULIB_UNISTD_H_SIGPIPE@ GNULIB_UNLINK = @GNULIB_UNLINK@ GNULIB_UNLINKAT = @GNULIB_UNLINKAT@ GNULIB_UNSETENV = @GNULIB_UNSETENV@ GNULIB_USLEEP = @GNULIB_USLEEP@ GNULIB_UTIMENSAT = @GNULIB_UTIMENSAT@ GNULIB_VASPRINTF = @GNULIB_VASPRINTF@ GNULIB_VDPRINTF = @GNULIB_VDPRINTF@ GNULIB_VFPRINTF = @GNULIB_VFPRINTF@ GNULIB_VFPRINTF_POSIX = @GNULIB_VFPRINTF_POSIX@ GNULIB_VPRINTF = @GNULIB_VPRINTF@ GNULIB_VPRINTF_POSIX = @GNULIB_VPRINTF_POSIX@ GNULIB_VSNPRINTF = @GNULIB_VSNPRINTF@ GNULIB_VSPRINTF_POSIX = @GNULIB_VSPRINTF_POSIX@ GNULIB_WCRTOMB = @GNULIB_WCRTOMB@ GNULIB_WCSNRTOMBS = @GNULIB_WCSNRTOMBS@ GNULIB_WCSRTOMBS = @GNULIB_WCSRTOMBS@ GNULIB_WCTOB = @GNULIB_WCTOB@ GNULIB_WCWIDTH = @GNULIB_WCWIDTH@ GNULIB_WRITE = @GNULIB_WRITE@ GREP = @GREP@ GTKDOC_CHECK = @GTKDOC_CHECK@ HAVE_ACCEPT4 = @HAVE_ACCEPT4@ HAVE_ACOSL = @HAVE_ACOSL@ HAVE_ARPA_INET_H = @HAVE_ARPA_INET_H@ HAVE_ASINL = @HAVE_ASINL@ HAVE_ATANL = @HAVE_ATANL@ HAVE_ATOLL = @HAVE_ATOLL@ HAVE_BTOWC = @HAVE_BTOWC@ HAVE_CALLOC_POSIX = @HAVE_CALLOC_POSIX@ HAVE_CANONICALIZE_FILE_NAME = @HAVE_CANONICALIZE_FILE_NAME@ HAVE_CHOWN = @HAVE_CHOWN@ HAVE_COSL = @HAVE_COSL@ HAVE_CXX = @HAVE_CXX@ HAVE_DECL_ACOSL = @HAVE_DECL_ACOSL@ HAVE_DECL_ASINL = @HAVE_DECL_ASINL@ HAVE_DECL_ATANL = @HAVE_DECL_ATANL@ HAVE_DECL_COSL = @HAVE_DECL_COSL@ HAVE_DECL_ENVIRON = @HAVE_DECL_ENVIRON@ HAVE_DECL_EXPL = @HAVE_DECL_EXPL@ HAVE_DECL_FPURGE = @HAVE_DECL_FPURGE@ HAVE_DECL_FREEADDRINFO = @HAVE_DECL_FREEADDRINFO@ HAVE_DECL_FREXPL = @HAVE_DECL_FREXPL@ HAVE_DECL_GAI_STRERROR = @HAVE_DECL_GAI_STRERROR@ HAVE_DECL_GETADDRINFO = @HAVE_DECL_GETADDRINFO@ HAVE_DECL_GETDELIM = @HAVE_DECL_GETDELIM@ HAVE_DECL_GETLINE = @HAVE_DECL_GETLINE@ HAVE_DECL_GETLOADAVG = @HAVE_DECL_GETLOADAVG@ HAVE_DECL_GETLOGIN_R = @HAVE_DECL_GETLOGIN_R@ HAVE_DECL_GETNAMEINFO = @HAVE_DECL_GETNAMEINFO@ HAVE_DECL_INET_NTOP = @HAVE_DECL_INET_NTOP@ HAVE_DECL_INET_PTON = @HAVE_DECL_INET_PTON@ HAVE_DECL_LDEXPL = @HAVE_DECL_LDEXPL@ HAVE_DECL_LOGL = @HAVE_DECL_LOGL@ HAVE_DECL_MEMMEM = @HAVE_DECL_MEMMEM@ HAVE_DECL_MEMRCHR = @HAVE_DECL_MEMRCHR@ HAVE_DECL_OBSTACK_PRINTF = @HAVE_DECL_OBSTACK_PRINTF@ HAVE_DECL_SINL = @HAVE_DECL_SINL@ HAVE_DECL_SNPRINTF = @HAVE_DECL_SNPRINTF@ HAVE_DECL_SQRTL = @HAVE_DECL_SQRTL@ HAVE_DECL_STRDUP = @HAVE_DECL_STRDUP@ HAVE_DECL_STRERROR = @HAVE_DECL_STRERROR@ HAVE_DECL_STRNCASECMP = @HAVE_DECL_STRNCASECMP@ HAVE_DECL_STRNDUP = @HAVE_DECL_STRNDUP@ HAVE_DECL_STRNLEN = @HAVE_DECL_STRNLEN@ HAVE_DECL_STRSIGNAL = @HAVE_DECL_STRSIGNAL@ HAVE_DECL_STRTOK_R = @HAVE_DECL_STRTOK_R@ HAVE_DECL_TANL = @HAVE_DECL_TANL@ HAVE_DECL_TRUNC = @HAVE_DECL_TRUNC@ HAVE_DECL_TRUNCF = @HAVE_DECL_TRUNCF@ HAVE_DECL_VSNPRINTF = @HAVE_DECL_VSNPRINTF@ HAVE_DECL_WCTOB = @HAVE_DECL_WCTOB@ HAVE_DECL_WCWIDTH = @HAVE_DECL_WCWIDTH@ HAVE_DPRINTF = @HAVE_DPRINTF@ HAVE_DUP2 = @HAVE_DUP2@ HAVE_DUP3 = @HAVE_DUP3@ HAVE_EUIDACCESS = @HAVE_EUIDACCESS@ HAVE_EXPL = @HAVE_EXPL@ HAVE_FACCESSAT = @HAVE_FACCESSAT@ HAVE_FCHMODAT = @HAVE_FCHMODAT@ HAVE_FCHOWNAT = @HAVE_FCHOWNAT@ HAVE_FCNTL = @HAVE_FCNTL@ HAVE_FSTATAT = @HAVE_FSTATAT@ HAVE_FSYNC = @HAVE_FSYNC@ HAVE_FTRUNCATE = @HAVE_FTRUNCATE@ HAVE_FUTIMENS = @HAVE_FUTIMENS@ HAVE_GETDOMAINNAME = @HAVE_GETDOMAINNAME@ HAVE_GETDTABLESIZE = @HAVE_GETDTABLESIZE@ HAVE_GETGROUPS = @HAVE_GETGROUPS@ HAVE_GETHOSTNAME = @HAVE_GETHOSTNAME@ HAVE_GETLOGIN = @HAVE_GETLOGIN@ HAVE_GETPAGESIZE = @HAVE_GETPAGESIZE@ HAVE_GETSUBOPT = @HAVE_GETSUBOPT@ HAVE_GETUSERSHELL = @HAVE_GETUSERSHELL@ HAVE_INTTYPES_H = @HAVE_INTTYPES_H@ HAVE_ISNAND = @HAVE_ISNAND@ HAVE_ISNANF = @HAVE_ISNANF@ HAVE_ISNANL = @HAVE_ISNANL@ HAVE_ISWCNTRL = @HAVE_ISWCNTRL@ HAVE_LANGINFO_CODESET = @HAVE_LANGINFO_CODESET@ HAVE_LANGINFO_ERA = @HAVE_LANGINFO_ERA@ HAVE_LANGINFO_H = @HAVE_LANGINFO_H@ HAVE_LCHMOD = @HAVE_LCHMOD@ HAVE_LCHOWN = @HAVE_LCHOWN@ HAVE_LINK = @HAVE_LINK@ HAVE_LINKAT = @HAVE_LINKAT@ HAVE_LOGL = @HAVE_LOGL@ HAVE_LONG_LONG_INT = @HAVE_LONG_LONG_INT@ HAVE_LSTAT = @HAVE_LSTAT@ HAVE_MALLOC_POSIX = @HAVE_MALLOC_POSIX@ HAVE_MBRLEN = @HAVE_MBRLEN@ HAVE_MBRTOWC = @HAVE_MBRTOWC@ HAVE_MBSINIT = @HAVE_MBSINIT@ HAVE_MBSLEN = @HAVE_MBSLEN@ HAVE_MBSNRTOWCS = @HAVE_MBSNRTOWCS@ HAVE_MBSRTOWCS = @HAVE_MBSRTOWCS@ HAVE_MEMPCPY = @HAVE_MEMPCPY@ HAVE_MKDIRAT = @HAVE_MKDIRAT@ HAVE_MKDTEMP = @HAVE_MKDTEMP@ HAVE_MKFIFO = @HAVE_MKFIFO@ HAVE_MKFIFOAT = @HAVE_MKFIFOAT@ HAVE_MKNOD = @HAVE_MKNOD@ HAVE_MKNODAT = @HAVE_MKNODAT@ HAVE_MKOSTEMP = @HAVE_MKOSTEMP@ HAVE_MKOSTEMPS = @HAVE_MKOSTEMPS@ HAVE_MKSTEMPS = @HAVE_MKSTEMPS@ HAVE_NETDB_H = @HAVE_NETDB_H@ HAVE_NETINET_IN_H = @HAVE_NETINET_IN_H@ HAVE_NL_LANGINFO = @HAVE_NL_LANGINFO@ HAVE_OPENAT = @HAVE_OPENAT@ HAVE_OS_H = @HAVE_OS_H@ HAVE_PIPE2 = @HAVE_PIPE2@ HAVE_POSIX_SIGNALBLOCKING = @HAVE_POSIX_SIGNALBLOCKING@ HAVE_PREAD = @HAVE_PREAD@ HAVE_RANDOM_H = @HAVE_RANDOM_H@ HAVE_RANDOM_R = @HAVE_RANDOM_R@ HAVE_RAWMEMCHR = @HAVE_RAWMEMCHR@ HAVE_READLINK = @HAVE_READLINK@ HAVE_READLINKAT = @HAVE_READLINKAT@ HAVE_REALLOC_POSIX = @HAVE_REALLOC_POSIX@ HAVE_REALPATH = @HAVE_REALPATH@ HAVE_RENAMEAT = @HAVE_RENAMEAT@ HAVE_RPMATCH = @HAVE_RPMATCH@ HAVE_SA_FAMILY_T = @HAVE_SA_FAMILY_T@ HAVE_SETENV = @HAVE_SETENV@ HAVE_SIGACTION = @HAVE_SIGACTION@ HAVE_SIGINFO_T = @HAVE_SIGINFO_T@ HAVE_SIGNED_SIG_ATOMIC_T = @HAVE_SIGNED_SIG_ATOMIC_T@ HAVE_SIGNED_WCHAR_T = @HAVE_SIGNED_WCHAR_T@ HAVE_SIGNED_WINT_T = @HAVE_SIGNED_WINT_T@ HAVE_SIGSET_T = @HAVE_SIGSET_T@ HAVE_SINL = @HAVE_SINL@ HAVE_SLEEP = @HAVE_SLEEP@ HAVE_SQRTL = @HAVE_SQRTL@ HAVE_STDINT_H = @HAVE_STDINT_H@ HAVE_STPCPY = @HAVE_STPCPY@ HAVE_STPNCPY = @HAVE_STPNCPY@ HAVE_STRCASECMP = @HAVE_STRCASECMP@ HAVE_STRCASESTR = @HAVE_STRCASESTR@ HAVE_STRCHRNUL = @HAVE_STRCHRNUL@ HAVE_STRPBRK = @HAVE_STRPBRK@ HAVE_STRSEP = @HAVE_STRSEP@ HAVE_STRTOD = @HAVE_STRTOD@ HAVE_STRTOLL = @HAVE_STRTOLL@ HAVE_STRTOULL = @HAVE_STRTOULL@ HAVE_STRUCT_ADDRINFO = @HAVE_STRUCT_ADDRINFO@ HAVE_STRUCT_RANDOM_DATA = @HAVE_STRUCT_RANDOM_DATA@ HAVE_STRUCT_SIGACTION_SA_SIGACTION = @HAVE_STRUCT_SIGACTION_SA_SIGACTION@ HAVE_STRUCT_SOCKADDR_STORAGE = @HAVE_STRUCT_SOCKADDR_STORAGE@ HAVE_STRUCT_TIMEVAL = @HAVE_STRUCT_TIMEVAL@ HAVE_STRUCT_UTSNAME = @HAVE_STRUCT_UTSNAME@ HAVE_STRVERSCMP = @HAVE_STRVERSCMP@ HAVE_SYMLINK = @HAVE_SYMLINK@ HAVE_SYMLINKAT = @HAVE_SYMLINKAT@ HAVE_SYS_BITYPES_H = @HAVE_SYS_BITYPES_H@ HAVE_SYS_INTTYPES_H = @HAVE_SYS_INTTYPES_H@ HAVE_SYS_IOCTL_H = @HAVE_SYS_IOCTL_H@ HAVE_SYS_LOADAVG_H = @HAVE_SYS_LOADAVG_H@ HAVE_SYS_PARAM_H = @HAVE_SYS_PARAM_H@ HAVE_SYS_SELECT_H = @HAVE_SYS_SELECT_H@ HAVE_SYS_SOCKET_H = @HAVE_SYS_SOCKET_H@ HAVE_SYS_TIME_H = @HAVE_SYS_TIME_H@ HAVE_SYS_TYPES_H = @HAVE_SYS_TYPES_H@ HAVE_SYS_UTSNAME_H = @HAVE_SYS_UTSNAME_H@ HAVE_TANL = @HAVE_TANL@ HAVE_TYPE_VOLATILE_SIG_ATOMIC_T = @HAVE_TYPE_VOLATILE_SIG_ATOMIC_T@ HAVE_UNAME = @HAVE_UNAME@ HAVE_UNISTD_H = @HAVE_UNISTD_H@ HAVE_UNLINKAT = @HAVE_UNLINKAT@ HAVE_UNSETENV = @HAVE_UNSETENV@ HAVE_UNSIGNED_LONG_LONG_INT = @HAVE_UNSIGNED_LONG_LONG_INT@ HAVE_USLEEP = @HAVE_USLEEP@ HAVE_UTIMENSAT = @HAVE_UTIMENSAT@ HAVE_VASPRINTF = @HAVE_VASPRINTF@ HAVE_VDPRINTF = @HAVE_VDPRINTF@ HAVE_WCHAR_H = @HAVE_WCHAR_H@ HAVE_WCHAR_T = @HAVE_WCHAR_T@ HAVE_WCRTOMB = @HAVE_WCRTOMB@ HAVE_WCSNRTOMBS = @HAVE_WCSNRTOMBS@ HAVE_WCSRTOMBS = @HAVE_WCSRTOMBS@ HAVE_WCTYPE_H = @HAVE_WCTYPE_H@ HAVE_WINSOCK2_H = @HAVE_WINSOCK2_H@ HAVE_WINT_T = @HAVE_WINT_T@ HAVE_WS2TCPIP_H = @HAVE_WS2TCPIP_H@ HAVE__BOOL = @HAVE__BOOL@ HOSTENT_LIB = @HOSTENT_LIB@ HTML_DIR = @HTML_DIR@ INCLTDL = @INCLTDL@ INCLUDE_NEXT = @INCLUDE_NEXT@ INCLUDE_NEXT_AS_FIRST_DIRECTIVE = @INCLUDE_NEXT_AS_FIRST_DIRECTIVE@ INET_NTOP_LIB = @INET_NTOP_LIB@ INET_PTON_LIB = @INET_PTON_LIB@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LD = @LD@ LDFLAGS = @LDFLAGS@ LEX = @LEX@ LEXLIB = @LEXLIB@ LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@ LIBADD_DL = @LIBADD_DL@ LIBADD_DLD_LINK = @LIBADD_DLD_LINK@ LIBADD_DLOPEN = @LIBADD_DLOPEN@ LIBADD_SHL_LOAD = @LIBADD_SHL_LOAD@ LIBDIR = @LIBDIR@ LIBGCRYPT_CFLAGS = @LIBGCRYPT_CFLAGS@ LIBGCRYPT_CONFIG = @LIBGCRYPT_CONFIG@ LIBGCRYPT_LIBS = @LIBGCRYPT_LIBS@ LIBGNUTLS_CFLAGS = @LIBGNUTLS_CFLAGS@ LIBGNUTLS_CONFIG = @LIBGNUTLS_CONFIG@ LIBGNUTLS_EXTRA_CFLAGS = @LIBGNUTLS_EXTRA_CFLAGS@ LIBGNUTLS_EXTRA_CONFIG = @LIBGNUTLS_EXTRA_CONFIG@ LIBGNUTLS_EXTRA_LIBS = @LIBGNUTLS_EXTRA_LIBS@ LIBGNUTLS_LIBS = @LIBGNUTLS_LIBS@ LIBINTL = @LIBINTL@ LIBLTDL = @LIBLTDL@ LIBMULTITHREAD = @LIBMULTITHREAD@ LIBOBJS = @LIBOBJS@ LIBPRELUDECPP_SONAME = @LIBPRELUDECPP_SONAME@ LIBPRELUDE_CFLAGS = @LIBPRELUDE_CFLAGS@ LIBPRELUDE_LIBS = @LIBPRELUDE_LIBS@ LIBPRELUDE_SONAME = @LIBPRELUDE_SONAME@ LIBPTH = @LIBPTH@ LIBPTH_PREFIX = @LIBPTH_PREFIX@ LIBS = @LIBS@ LIBSOCKET = @LIBSOCKET@ LIBTESTS_LIBDEPS = @LIBTESTS_LIBDEPS@ LIBTHREAD = @LIBTHREAD@ LIBTOOL = @LIBTOOL@ LIPO = @LIPO@ LN_S = @LN_S@ LOCALCHARSET_TESTS_ENVIRONMENT = @LOCALCHARSET_TESTS_ENVIRONMENT@ LOCALE_FR = @LOCALE_FR@ LOCALE_FR_UTF8 = @LOCALE_FR_UTF8@ LOCALE_JA = @LOCALE_JA@ LOCALE_TR_UTF8 = @LOCALE_TR_UTF8@ LOCALE_ZH_CN = @LOCALE_ZH_CN@ LOCALSTATEDIR = @LOCALSTATEDIR@ LTALLOCA = @LTALLOCA@ LTDLDEPS = @LTDLDEPS@ LTDLINCL = @LTDLINCL@ LTDLOPEN = @LTDLOPEN@ LTLIBINTL = @LTLIBINTL@ LTLIBMULTITHREAD = @LTLIBMULTITHREAD@ LTLIBOBJS = @LTLIBOBJS@ LTLIBPTH = @LTLIBPTH@ LTLIBTHREAD = @LTLIBTHREAD@ LT_CONFIG_H = @LT_CONFIG_H@ LT_DLLOADERS = @LT_DLLOADERS@ LT_DLPREOPEN = @LT_DLPREOPEN@ LUA_CFLAGS = @LUA_CFLAGS@ LUA_CONFIG = @LUA_CONFIG@ LUA_LIBS = @LUA_LIBS@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MKDIR_P = @MKDIR_P@ NETDB_H = @NETDB_H@ NETINET_IN_H = @NETINET_IN_H@ NEXT_ARPA_INET_H = @NEXT_ARPA_INET_H@ NEXT_AS_FIRST_DIRECTIVE_ARPA_INET_H = @NEXT_AS_FIRST_DIRECTIVE_ARPA_INET_H@ NEXT_AS_FIRST_DIRECTIVE_ERRNO_H = @NEXT_AS_FIRST_DIRECTIVE_ERRNO_H@ NEXT_AS_FIRST_DIRECTIVE_FCNTL_H = @NEXT_AS_FIRST_DIRECTIVE_FCNTL_H@ NEXT_AS_FIRST_DIRECTIVE_FLOAT_H = @NEXT_AS_FIRST_DIRECTIVE_FLOAT_H@ NEXT_AS_FIRST_DIRECTIVE_LANGINFO_H = @NEXT_AS_FIRST_DIRECTIVE_LANGINFO_H@ NEXT_AS_FIRST_DIRECTIVE_MATH_H = @NEXT_AS_FIRST_DIRECTIVE_MATH_H@ NEXT_AS_FIRST_DIRECTIVE_NETDB_H = @NEXT_AS_FIRST_DIRECTIVE_NETDB_H@ NEXT_AS_FIRST_DIRECTIVE_NETINET_IN_H = @NEXT_AS_FIRST_DIRECTIVE_NETINET_IN_H@ NEXT_AS_FIRST_DIRECTIVE_SIGNAL_H = @NEXT_AS_FIRST_DIRECTIVE_SIGNAL_H@ NEXT_AS_FIRST_DIRECTIVE_STDDEF_H = @NEXT_AS_FIRST_DIRECTIVE_STDDEF_H@ NEXT_AS_FIRST_DIRECTIVE_STDINT_H = @NEXT_AS_FIRST_DIRECTIVE_STDINT_H@ NEXT_AS_FIRST_DIRECTIVE_STDIO_H = @NEXT_AS_FIRST_DIRECTIVE_STDIO_H@ NEXT_AS_FIRST_DIRECTIVE_STDLIB_H = @NEXT_AS_FIRST_DIRECTIVE_STDLIB_H@ NEXT_AS_FIRST_DIRECTIVE_STRINGS_H = @NEXT_AS_FIRST_DIRECTIVE_STRINGS_H@ NEXT_AS_FIRST_DIRECTIVE_STRING_H = @NEXT_AS_FIRST_DIRECTIVE_STRING_H@ NEXT_AS_FIRST_DIRECTIVE_SYS_IOCTL_H = @NEXT_AS_FIRST_DIRECTIVE_SYS_IOCTL_H@ NEXT_AS_FIRST_DIRECTIVE_SYS_SELECT_H = @NEXT_AS_FIRST_DIRECTIVE_SYS_SELECT_H@ NEXT_AS_FIRST_DIRECTIVE_SYS_SOCKET_H = @NEXT_AS_FIRST_DIRECTIVE_SYS_SOCKET_H@ NEXT_AS_FIRST_DIRECTIVE_SYS_STAT_H = @NEXT_AS_FIRST_DIRECTIVE_SYS_STAT_H@ NEXT_AS_FIRST_DIRECTIVE_SYS_TIME_H = @NEXT_AS_FIRST_DIRECTIVE_SYS_TIME_H@ NEXT_AS_FIRST_DIRECTIVE_SYS_UTSNAME_H = @NEXT_AS_FIRST_DIRECTIVE_SYS_UTSNAME_H@ NEXT_AS_FIRST_DIRECTIVE_TIME_H = @NEXT_AS_FIRST_DIRECTIVE_TIME_H@ NEXT_AS_FIRST_DIRECTIVE_UNISTD_H = @NEXT_AS_FIRST_DIRECTIVE_UNISTD_H@ NEXT_AS_FIRST_DIRECTIVE_WCHAR_H = @NEXT_AS_FIRST_DIRECTIVE_WCHAR_H@ NEXT_AS_FIRST_DIRECTIVE_WCTYPE_H = @NEXT_AS_FIRST_DIRECTIVE_WCTYPE_H@ NEXT_ERRNO_H = @NEXT_ERRNO_H@ NEXT_FCNTL_H = @NEXT_FCNTL_H@ NEXT_FLOAT_H = @NEXT_FLOAT_H@ NEXT_LANGINFO_H = @NEXT_LANGINFO_H@ NEXT_MATH_H = @NEXT_MATH_H@ NEXT_NETDB_H = @NEXT_NETDB_H@ NEXT_NETINET_IN_H = @NEXT_NETINET_IN_H@ NEXT_SIGNAL_H = @NEXT_SIGNAL_H@ NEXT_STDDEF_H = @NEXT_STDDEF_H@ NEXT_STDINT_H = @NEXT_STDINT_H@ NEXT_STDIO_H = @NEXT_STDIO_H@ NEXT_STDLIB_H = @NEXT_STDLIB_H@ NEXT_STRINGS_H = @NEXT_STRINGS_H@ NEXT_STRING_H = @NEXT_STRING_H@ NEXT_SYS_IOCTL_H = @NEXT_SYS_IOCTL_H@ NEXT_SYS_SELECT_H = @NEXT_SYS_SELECT_H@ NEXT_SYS_SOCKET_H = @NEXT_SYS_SOCKET_H@ NEXT_SYS_STAT_H = @NEXT_SYS_STAT_H@ NEXT_SYS_TIME_H = @NEXT_SYS_TIME_H@ NEXT_SYS_UTSNAME_H = @NEXT_SYS_UTSNAME_H@ NEXT_TIME_H = @NEXT_TIME_H@ NEXT_UNISTD_H = @NEXT_UNISTD_H@ NEXT_WCHAR_H = @NEXT_WCHAR_H@ NEXT_WCTYPE_H = @NEXT_WCTYPE_H@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PCFLAGS = @PCFLAGS@ PERL = @PERL@ PERL_EXTRA_PARAMS = @PERL_EXTRA_PARAMS@ PKG_CONFIG = @PKG_CONFIG@ POLL_H = @POLL_H@ PRAGMA_SYSTEM_HEADER = @PRAGMA_SYSTEM_HEADER@ PRELUDE_ADMIN_CFLAGS = @PRELUDE_ADMIN_CFLAGS@ PRELUDE_ADMIN_LIBS = @PRELUDE_ADMIN_LIBS@ PRELUDE_CONFIG_DIR = @PRELUDE_CONFIG_DIR@ PRELUDE_SPOOL_DIR = @PRELUDE_SPOOL_DIR@ PTHREAD_CFLAGS = @PTHREAD_CFLAGS@ PTHREAD_LDFLAGS = @PTHREAD_LDFLAGS@ PTHREAD_LIBS = @PTHREAD_LIBS@ PTRDIFF_T_SUFFIX = @PTRDIFF_T_SUFFIX@ PYTHON = @PYTHON@ RANLIB = @RANLIB@ RELOCATABLE = @RELOCATABLE@ REPLACE_BTOWC = @REPLACE_BTOWC@ REPLACE_CANONICALIZE_FILE_NAME = @REPLACE_CANONICALIZE_FILE_NAME@ REPLACE_CEILF = @REPLACE_CEILF@ REPLACE_CEILL = @REPLACE_CEILL@ REPLACE_CHOWN = @REPLACE_CHOWN@ REPLACE_CLOSE = @REPLACE_CLOSE@ REPLACE_DPRINTF = @REPLACE_DPRINTF@ REPLACE_DUP = @REPLACE_DUP@ REPLACE_DUP2 = @REPLACE_DUP2@ REPLACE_FCHDIR = @REPLACE_FCHDIR@ REPLACE_FCHOWNAT = @REPLACE_FCHOWNAT@ REPLACE_FCLOSE = @REPLACE_FCLOSE@ REPLACE_FCNTL = @REPLACE_FCNTL@ REPLACE_FFLUSH = @REPLACE_FFLUSH@ REPLACE_FLOORF = @REPLACE_FLOORF@ REPLACE_FLOORL = @REPLACE_FLOORL@ REPLACE_FOPEN = @REPLACE_FOPEN@ REPLACE_FPRINTF = @REPLACE_FPRINTF@ REPLACE_FPURGE = @REPLACE_FPURGE@ REPLACE_FREOPEN = @REPLACE_FREOPEN@ REPLACE_FREXP = @REPLACE_FREXP@ REPLACE_FREXPL = @REPLACE_FREXPL@ REPLACE_FSEEK = @REPLACE_FSEEK@ REPLACE_FSEEKO = @REPLACE_FSEEKO@ REPLACE_FSTAT = @REPLACE_FSTAT@ REPLACE_FSTATAT = @REPLACE_FSTATAT@ REPLACE_FTELL = @REPLACE_FTELL@ REPLACE_FTELLO = @REPLACE_FTELLO@ REPLACE_FUTIMENS = @REPLACE_FUTIMENS@ REPLACE_GETCWD = @REPLACE_GETCWD@ REPLACE_GETDELIM = @REPLACE_GETDELIM@ REPLACE_GETGROUPS = @REPLACE_GETGROUPS@ REPLACE_GETLINE = @REPLACE_GETLINE@ REPLACE_GETPAGESIZE = @REPLACE_GETPAGESIZE@ REPLACE_GETTIMEOFDAY = @REPLACE_GETTIMEOFDAY@ REPLACE_HUGE_VAL = @REPLACE_HUGE_VAL@ REPLACE_ISFINITE = @REPLACE_ISFINITE@ REPLACE_ISINF = @REPLACE_ISINF@ REPLACE_ISNAN = @REPLACE_ISNAN@ REPLACE_ISWCNTRL = @REPLACE_ISWCNTRL@ REPLACE_LCHOWN = @REPLACE_LCHOWN@ REPLACE_LDEXPL = @REPLACE_LDEXPL@ REPLACE_LINK = @REPLACE_LINK@ REPLACE_LINKAT = @REPLACE_LINKAT@ REPLACE_LOCALTIME_R = @REPLACE_LOCALTIME_R@ REPLACE_LSEEK = @REPLACE_LSEEK@ REPLACE_LSTAT = @REPLACE_LSTAT@ REPLACE_MBRLEN = @REPLACE_MBRLEN@ REPLACE_MBRTOWC = @REPLACE_MBRTOWC@ REPLACE_MBSINIT = @REPLACE_MBSINIT@ REPLACE_MBSNRTOWCS = @REPLACE_MBSNRTOWCS@ REPLACE_MBSRTOWCS = @REPLACE_MBSRTOWCS@ REPLACE_MBSTATE_T = @REPLACE_MBSTATE_T@ REPLACE_MEMCHR = @REPLACE_MEMCHR@ REPLACE_MEMMEM = @REPLACE_MEMMEM@ REPLACE_MKDIR = @REPLACE_MKDIR@ REPLACE_MKFIFO = @REPLACE_MKFIFO@ REPLACE_MKNOD = @REPLACE_MKNOD@ REPLACE_MKSTEMP = @REPLACE_MKSTEMP@ REPLACE_MKTIME = @REPLACE_MKTIME@ REPLACE_NAN = @REPLACE_NAN@ REPLACE_NANOSLEEP = @REPLACE_NANOSLEEP@ REPLACE_NL_LANGINFO = @REPLACE_NL_LANGINFO@ REPLACE_NULL = @REPLACE_NULL@ REPLACE_OBSTACK_PRINTF = @REPLACE_OBSTACK_PRINTF@ REPLACE_OPEN = @REPLACE_OPEN@ REPLACE_OPENAT = @REPLACE_OPENAT@ REPLACE_PERROR = @REPLACE_PERROR@ REPLACE_POPEN = @REPLACE_POPEN@ REPLACE_PREAD = @REPLACE_PREAD@ REPLACE_PRINTF = @REPLACE_PRINTF@ REPLACE_PUTENV = @REPLACE_PUTENV@ REPLACE_READLINK = @REPLACE_READLINK@ REPLACE_REALPATH = @REPLACE_REALPATH@ REPLACE_REMOVE = @REPLACE_REMOVE@ REPLACE_RENAME = @REPLACE_RENAME@ REPLACE_RENAMEAT = @REPLACE_RENAMEAT@ REPLACE_RMDIR = @REPLACE_RMDIR@ REPLACE_ROUND = @REPLACE_ROUND@ REPLACE_ROUNDF = @REPLACE_ROUNDF@ REPLACE_ROUNDL = @REPLACE_ROUNDL@ REPLACE_SELECT = @REPLACE_SELECT@ REPLACE_SETENV = @REPLACE_SETENV@ REPLACE_SIGNBIT = @REPLACE_SIGNBIT@ REPLACE_SIGNBIT_USING_GCC = @REPLACE_SIGNBIT_USING_GCC@ REPLACE_SLEEP = @REPLACE_SLEEP@ REPLACE_SNPRINTF = @REPLACE_SNPRINTF@ REPLACE_SPRINTF = @REPLACE_SPRINTF@ REPLACE_STAT = @REPLACE_STAT@ REPLACE_STDIO_WRITE_FUNCS = @REPLACE_STDIO_WRITE_FUNCS@ REPLACE_STRCASESTR = @REPLACE_STRCASESTR@ REPLACE_STRDUP = @REPLACE_STRDUP@ REPLACE_STRERROR = @REPLACE_STRERROR@ REPLACE_STRNDUP = @REPLACE_STRNDUP@ REPLACE_STRPTIME = @REPLACE_STRPTIME@ REPLACE_STRSIGNAL = @REPLACE_STRSIGNAL@ REPLACE_STRSTR = @REPLACE_STRSTR@ REPLACE_STRTOD = @REPLACE_STRTOD@ REPLACE_STRTOK_R = @REPLACE_STRTOK_R@ REPLACE_SYMLINK = @REPLACE_SYMLINK@ REPLACE_TIMEGM = @REPLACE_TIMEGM@ REPLACE_TRUNCL = @REPLACE_TRUNCL@ REPLACE_UNLINK = @REPLACE_UNLINK@ REPLACE_UNLINKAT = @REPLACE_UNLINKAT@ REPLACE_UNSETENV = @REPLACE_UNSETENV@ REPLACE_USLEEP = @REPLACE_USLEEP@ REPLACE_UTIMENSAT = @REPLACE_UTIMENSAT@ REPLACE_VASPRINTF = @REPLACE_VASPRINTF@ REPLACE_VDPRINTF = @REPLACE_VDPRINTF@ REPLACE_VFPRINTF = @REPLACE_VFPRINTF@ REPLACE_VPRINTF = @REPLACE_VPRINTF@ REPLACE_VSNPRINTF = @REPLACE_VSNPRINTF@ REPLACE_VSPRINTF = @REPLACE_VSPRINTF@ REPLACE_WCRTOMB = @REPLACE_WCRTOMB@ REPLACE_WCSNRTOMBS = @REPLACE_WCSNRTOMBS@ REPLACE_WCSRTOMBS = @REPLACE_WCSRTOMBS@ REPLACE_WCTOB = @REPLACE_WCTOB@ REPLACE_WCWIDTH = @REPLACE_WCWIDTH@ REPLACE_WRITE = @REPLACE_WRITE@ RUBY = @RUBY@ RUBY_CCFLAGS = @RUBY_CCFLAGS@ RUBY_EXEC_PREFIX = @RUBY_EXEC_PREFIX@ RUBY_INCLUDES = @RUBY_INCLUDES@ RUBY_LIBS = @RUBY_LIBS@ RUBY_PLATFORM = @RUBY_PLATFORM@ RUBY_PREFIX = @RUBY_PREFIX@ RUBY_VERSION = @RUBY_VERSION@ SED = @SED@ SERVENT_LIB = @SERVENT_LIB@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ SIG_ATOMIC_T_SUFFIX = @SIG_ATOMIC_T_SUFFIX@ SIZE_T_SUFFIX = @SIZE_T_SUFFIX@ STDBOOL_H = @STDBOOL_H@ STDDEF_H = @STDDEF_H@ STDINT_H = @STDINT_H@ STRIP = @STRIP@ SWIG = @SWIG@ SYSCONFDIR = @SYSCONFDIR@ SYS_IOCTL_H_HAVE_WINSOCK2_H = @SYS_IOCTL_H_HAVE_WINSOCK2_H@ SYS_IOCTL_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS = @SYS_IOCTL_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS@ SYS_SOCKET_H = @SYS_SOCKET_H@ SYS_TIME_H_DEFINES_STRUCT_TIMESPEC = @SYS_TIME_H_DEFINES_STRUCT_TIMESPEC@ TIME_H_DEFINES_STRUCT_TIMESPEC = @TIME_H_DEFINES_STRUCT_TIMESPEC@ UNDEFINE_STRTOK_R = @UNDEFINE_STRTOK_R@ UNISTD_H_HAVE_WINSOCK2_H = @UNISTD_H_HAVE_WINSOCK2_H@ UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS = @UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS@ VALGRIND = @VALGRIND@ VERSION = @VERSION@ WCHAR_T_SUFFIX = @WCHAR_T_SUFFIX@ WCTYPE_H = @WCTYPE_H@ WINT_T_SUFFIX = @WINT_T_SUFFIX@ YACC = @YACC@ YFLAGS = @YFLAGS@ YIELD_LIB = @YIELD_LIB@ __PRELUDE_64BIT_FORMAT_PREFIX = @__PRELUDE_64BIT_FORMAT_PREFIX@ __PRELUDE_HAVE_64BIT_LONG = @__PRELUDE_HAVE_64BIT_LONG@ __PRELUDE_HAVE_INTTYPES_H = @__PRELUDE_HAVE_INTTYPES_H@ __PRELUDE_HAVE_STDINT_H = @__PRELUDE_HAVE_STDINT_H@ __PRELUDE_STDINT_HAVE_UINT16 = @__PRELUDE_STDINT_HAVE_UINT16@ __PRELUDE_STDINT_HAVE_UINT32 = @__PRELUDE_STDINT_HAVE_UINT32@ __PRELUDE_STDINT_HAVE_UINT64 = @__PRELUDE_STDINT_HAVE_UINT64@ __PRELUDE_STDINT_HAVE_UINT8 = @__PRELUDE_STDINT_HAVE_UINT8@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ gl_LIBOBJS = @gl_LIBOBJS@ gl_LTLIBOBJS = @gl_LTLIBOBJS@ gltests_LIBOBJS = @gltests_LIBOBJS@ gltests_LTLIBOBJS = @gltests_LTLIBOBJS@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ lt_ECHO = @lt_ECHO@ ltdl_LIBOBJS = @ltdl_LIBOBJS@ ltdl_LTLIBOBJS = @ltdl_LTLIBOBJS@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ pkgrbexecdir = @pkgrbexecdir@ pkgrubydir = @pkgrubydir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ rbexecdir = @rbexecdir@ rubydir = @rubydir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sys_symbol_underscore = @sys_symbol_underscore@ sysconfdir = @sysconfdir@ target = @target@ target_alias = @target_alias@ target_cpu = @target_cpu@ target_os = @target_os@ target_vendor = @target_vendor@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ @HAVE_EASY_BINDINGS_TRUE@SUBDIRS = include @HAVE_EASY_BINDINGS_TRUE@lib_LTLIBRARIES = libpreludecpp.la @HAVE_EASY_BINDINGS_TRUE@libpreludecpp_ladir = ${prefix}/lib @HAVE_EASY_BINDINGS_TRUE@libpreludecpp_la_SOURCES = \ @HAVE_EASY_BINDINGS_TRUE@ prelude-error.cxx \ @HAVE_EASY_BINDINGS_TRUE@ idmef.cxx \ @HAVE_EASY_BINDINGS_TRUE@ idmef-criteria.cxx \ @HAVE_EASY_BINDINGS_TRUE@ idmef-path.cxx \ @HAVE_EASY_BINDINGS_TRUE@ idmef-time.cxx \ @HAVE_EASY_BINDINGS_TRUE@ idmef-value.cxx \ @HAVE_EASY_BINDINGS_TRUE@ prelude.cxx \ @HAVE_EASY_BINDINGS_TRUE@ prelude-client.cxx \ @HAVE_EASY_BINDINGS_TRUE@ prelude-client-easy.cxx \ @HAVE_EASY_BINDINGS_TRUE@ prelude-client-profile.cxx \ @HAVE_EASY_BINDINGS_TRUE@ prelude-connection.cxx \ @HAVE_EASY_BINDINGS_TRUE@ prelude-connection-pool.cxx \ @HAVE_EASY_BINDINGS_TRUE@ prelude-log.cxx @HAVE_EASY_BINDINGS_TRUE@libpreludecpp_la_LDFLAGS = -no-undefined -version-info @LIBPRELUDECPP_SONAME@ @HAVE_EASY_BINDINGS_TRUE@libpreludecpp_la_LIBADD = $(top_builddir)/src/.libs/libprelude.la @HAVE_EASY_BINDINGS_TRUE@libpreludecpp_la_CPPFLAGS = -I$(top_builddir) -I$(top_builddir)/src/include -I$(top_srcdir)/src/include -I$(top_builddir)/src/libprelude-error -I$(top_builddir)/bindings/c++/include -I$(top_srcdir)/bindings/c++/include all: all-recursive .SUFFIXES: .SUFFIXES: .cxx .lo .o .obj $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu bindings/c++/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu bindings/c++/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): install-libLTLIBRARIES: $(lib_LTLIBRARIES) @$(NORMAL_INSTALL) test -z "$(libdir)" || $(MKDIR_P) "$(DESTDIR)$(libdir)" @list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \ list2=; for p in $$list; do \ if test -f $$p; then \ list2="$$list2 $$p"; \ else :; fi; \ done; \ test -z "$$list2" || { \ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(libdir)'"; \ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(libdir)"; \ } uninstall-libLTLIBRARIES: @$(NORMAL_UNINSTALL) @list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \ for p in $$list; do \ $(am__strip_dir) \ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(libdir)/$$f'"; \ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(libdir)/$$f"; \ done clean-libLTLIBRARIES: -test -z "$(lib_LTLIBRARIES)" || rm -f $(lib_LTLIBRARIES) @list='$(lib_LTLIBRARIES)'; for p in $$list; do \ dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ test "$$dir" != "$$p" || dir=.; \ echo "rm -f \"$${dir}/so_locations\""; \ rm -f "$${dir}/so_locations"; \ done libpreludecpp.la: $(libpreludecpp_la_OBJECTS) $(libpreludecpp_la_DEPENDENCIES) $(libpreludecpp_la_LINK) $(am_libpreludecpp_la_rpath) $(libpreludecpp_la_OBJECTS) $(libpreludecpp_la_LIBADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libpreludecpp_la-idmef-criteria.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libpreludecpp_la-idmef-path.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libpreludecpp_la-idmef-time.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libpreludecpp_la-idmef-value.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libpreludecpp_la-idmef.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libpreludecpp_la-prelude-client-easy.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libpreludecpp_la-prelude-client-profile.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libpreludecpp_la-prelude-client.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libpreludecpp_la-prelude-connection-pool.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libpreludecpp_la-prelude-connection.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libpreludecpp_la-prelude-error.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libpreludecpp_la-prelude-log.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libpreludecpp_la-prelude.Plo@am__quote@ .cxx.o: @am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ $< .cxx.obj: @am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'` .cxx.lo: @am__fastdepCXX_TRUE@ $(LTCXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(LTCXXCOMPILE) -c -o $@ $< libpreludecpp_la-prelude-error.lo: prelude-error.cxx @am__fastdepCXX_TRUE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libpreludecpp_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libpreludecpp_la-prelude-error.lo -MD -MP -MF $(DEPDIR)/libpreludecpp_la-prelude-error.Tpo -c -o libpreludecpp_la-prelude-error.lo `test -f 'prelude-error.cxx' || echo '$(srcdir)/'`prelude-error.cxx @am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/libpreludecpp_la-prelude-error.Tpo $(DEPDIR)/libpreludecpp_la-prelude-error.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='prelude-error.cxx' object='libpreludecpp_la-prelude-error.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libpreludecpp_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libpreludecpp_la-prelude-error.lo `test -f 'prelude-error.cxx' || echo '$(srcdir)/'`prelude-error.cxx libpreludecpp_la-idmef.lo: idmef.cxx @am__fastdepCXX_TRUE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libpreludecpp_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libpreludecpp_la-idmef.lo -MD -MP -MF $(DEPDIR)/libpreludecpp_la-idmef.Tpo -c -o libpreludecpp_la-idmef.lo `test -f 'idmef.cxx' || echo '$(srcdir)/'`idmef.cxx @am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/libpreludecpp_la-idmef.Tpo $(DEPDIR)/libpreludecpp_la-idmef.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='idmef.cxx' object='libpreludecpp_la-idmef.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libpreludecpp_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libpreludecpp_la-idmef.lo `test -f 'idmef.cxx' || echo '$(srcdir)/'`idmef.cxx libpreludecpp_la-idmef-criteria.lo: idmef-criteria.cxx @am__fastdepCXX_TRUE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libpreludecpp_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libpreludecpp_la-idmef-criteria.lo -MD -MP -MF $(DEPDIR)/libpreludecpp_la-idmef-criteria.Tpo -c -o libpreludecpp_la-idmef-criteria.lo `test -f 'idmef-criteria.cxx' || echo '$(srcdir)/'`idmef-criteria.cxx @am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/libpreludecpp_la-idmef-criteria.Tpo $(DEPDIR)/libpreludecpp_la-idmef-criteria.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='idmef-criteria.cxx' object='libpreludecpp_la-idmef-criteria.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libpreludecpp_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libpreludecpp_la-idmef-criteria.lo `test -f 'idmef-criteria.cxx' || echo '$(srcdir)/'`idmef-criteria.cxx libpreludecpp_la-idmef-path.lo: idmef-path.cxx @am__fastdepCXX_TRUE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libpreludecpp_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libpreludecpp_la-idmef-path.lo -MD -MP -MF $(DEPDIR)/libpreludecpp_la-idmef-path.Tpo -c -o libpreludecpp_la-idmef-path.lo `test -f 'idmef-path.cxx' || echo '$(srcdir)/'`idmef-path.cxx @am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/libpreludecpp_la-idmef-path.Tpo $(DEPDIR)/libpreludecpp_la-idmef-path.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='idmef-path.cxx' object='libpreludecpp_la-idmef-path.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libpreludecpp_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libpreludecpp_la-idmef-path.lo `test -f 'idmef-path.cxx' || echo '$(srcdir)/'`idmef-path.cxx libpreludecpp_la-idmef-time.lo: idmef-time.cxx @am__fastdepCXX_TRUE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libpreludecpp_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libpreludecpp_la-idmef-time.lo -MD -MP -MF $(DEPDIR)/libpreludecpp_la-idmef-time.Tpo -c -o libpreludecpp_la-idmef-time.lo `test -f 'idmef-time.cxx' || echo '$(srcdir)/'`idmef-time.cxx @am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/libpreludecpp_la-idmef-time.Tpo $(DEPDIR)/libpreludecpp_la-idmef-time.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='idmef-time.cxx' object='libpreludecpp_la-idmef-time.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libpreludecpp_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libpreludecpp_la-idmef-time.lo `test -f 'idmef-time.cxx' || echo '$(srcdir)/'`idmef-time.cxx libpreludecpp_la-idmef-value.lo: idmef-value.cxx @am__fastdepCXX_TRUE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libpreludecpp_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libpreludecpp_la-idmef-value.lo -MD -MP -MF $(DEPDIR)/libpreludecpp_la-idmef-value.Tpo -c -o libpreludecpp_la-idmef-value.lo `test -f 'idmef-value.cxx' || echo '$(srcdir)/'`idmef-value.cxx @am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/libpreludecpp_la-idmef-value.Tpo $(DEPDIR)/libpreludecpp_la-idmef-value.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='idmef-value.cxx' object='libpreludecpp_la-idmef-value.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libpreludecpp_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libpreludecpp_la-idmef-value.lo `test -f 'idmef-value.cxx' || echo '$(srcdir)/'`idmef-value.cxx libpreludecpp_la-prelude.lo: prelude.cxx @am__fastdepCXX_TRUE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libpreludecpp_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libpreludecpp_la-prelude.lo -MD -MP -MF $(DEPDIR)/libpreludecpp_la-prelude.Tpo -c -o libpreludecpp_la-prelude.lo `test -f 'prelude.cxx' || echo '$(srcdir)/'`prelude.cxx @am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/libpreludecpp_la-prelude.Tpo $(DEPDIR)/libpreludecpp_la-prelude.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='prelude.cxx' object='libpreludecpp_la-prelude.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libpreludecpp_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libpreludecpp_la-prelude.lo `test -f 'prelude.cxx' || echo '$(srcdir)/'`prelude.cxx libpreludecpp_la-prelude-client.lo: prelude-client.cxx @am__fastdepCXX_TRUE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libpreludecpp_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libpreludecpp_la-prelude-client.lo -MD -MP -MF $(DEPDIR)/libpreludecpp_la-prelude-client.Tpo -c -o libpreludecpp_la-prelude-client.lo `test -f 'prelude-client.cxx' || echo '$(srcdir)/'`prelude-client.cxx @am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/libpreludecpp_la-prelude-client.Tpo $(DEPDIR)/libpreludecpp_la-prelude-client.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='prelude-client.cxx' object='libpreludecpp_la-prelude-client.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libpreludecpp_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libpreludecpp_la-prelude-client.lo `test -f 'prelude-client.cxx' || echo '$(srcdir)/'`prelude-client.cxx libpreludecpp_la-prelude-client-easy.lo: prelude-client-easy.cxx @am__fastdepCXX_TRUE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libpreludecpp_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libpreludecpp_la-prelude-client-easy.lo -MD -MP -MF $(DEPDIR)/libpreludecpp_la-prelude-client-easy.Tpo -c -o libpreludecpp_la-prelude-client-easy.lo `test -f 'prelude-client-easy.cxx' || echo '$(srcdir)/'`prelude-client-easy.cxx @am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/libpreludecpp_la-prelude-client-easy.Tpo $(DEPDIR)/libpreludecpp_la-prelude-client-easy.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='prelude-client-easy.cxx' object='libpreludecpp_la-prelude-client-easy.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libpreludecpp_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libpreludecpp_la-prelude-client-easy.lo `test -f 'prelude-client-easy.cxx' || echo '$(srcdir)/'`prelude-client-easy.cxx libpreludecpp_la-prelude-client-profile.lo: prelude-client-profile.cxx @am__fastdepCXX_TRUE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libpreludecpp_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libpreludecpp_la-prelude-client-profile.lo -MD -MP -MF $(DEPDIR)/libpreludecpp_la-prelude-client-profile.Tpo -c -o libpreludecpp_la-prelude-client-profile.lo `test -f 'prelude-client-profile.cxx' || echo '$(srcdir)/'`prelude-client-profile.cxx @am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/libpreludecpp_la-prelude-client-profile.Tpo $(DEPDIR)/libpreludecpp_la-prelude-client-profile.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='prelude-client-profile.cxx' object='libpreludecpp_la-prelude-client-profile.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libpreludecpp_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libpreludecpp_la-prelude-client-profile.lo `test -f 'prelude-client-profile.cxx' || echo '$(srcdir)/'`prelude-client-profile.cxx libpreludecpp_la-prelude-connection.lo: prelude-connection.cxx @am__fastdepCXX_TRUE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libpreludecpp_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libpreludecpp_la-prelude-connection.lo -MD -MP -MF $(DEPDIR)/libpreludecpp_la-prelude-connection.Tpo -c -o libpreludecpp_la-prelude-connection.lo `test -f 'prelude-connection.cxx' || echo '$(srcdir)/'`prelude-connection.cxx @am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/libpreludecpp_la-prelude-connection.Tpo $(DEPDIR)/libpreludecpp_la-prelude-connection.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='prelude-connection.cxx' object='libpreludecpp_la-prelude-connection.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libpreludecpp_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libpreludecpp_la-prelude-connection.lo `test -f 'prelude-connection.cxx' || echo '$(srcdir)/'`prelude-connection.cxx libpreludecpp_la-prelude-connection-pool.lo: prelude-connection-pool.cxx @am__fastdepCXX_TRUE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libpreludecpp_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libpreludecpp_la-prelude-connection-pool.lo -MD -MP -MF $(DEPDIR)/libpreludecpp_la-prelude-connection-pool.Tpo -c -o libpreludecpp_la-prelude-connection-pool.lo `test -f 'prelude-connection-pool.cxx' || echo '$(srcdir)/'`prelude-connection-pool.cxx @am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/libpreludecpp_la-prelude-connection-pool.Tpo $(DEPDIR)/libpreludecpp_la-prelude-connection-pool.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='prelude-connection-pool.cxx' object='libpreludecpp_la-prelude-connection-pool.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libpreludecpp_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libpreludecpp_la-prelude-connection-pool.lo `test -f 'prelude-connection-pool.cxx' || echo '$(srcdir)/'`prelude-connection-pool.cxx libpreludecpp_la-prelude-log.lo: prelude-log.cxx @am__fastdepCXX_TRUE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libpreludecpp_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libpreludecpp_la-prelude-log.lo -MD -MP -MF $(DEPDIR)/libpreludecpp_la-prelude-log.Tpo -c -o libpreludecpp_la-prelude-log.lo `test -f 'prelude-log.cxx' || echo '$(srcdir)/'`prelude-log.cxx @am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/libpreludecpp_la-prelude-log.Tpo $(DEPDIR)/libpreludecpp_la-prelude-log.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='prelude-log.cxx' object='libpreludecpp_la-prelude-log.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libpreludecpp_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libpreludecpp_la-prelude-log.lo `test -f 'prelude-log.cxx' || echo '$(srcdir)/'`prelude-log.cxx mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs # This directory's subdirectories are mostly independent; you can cd # into them and run `make' without going through this Makefile. # To change the values of `make' variables: instead of editing Makefiles, # (1) if the variable is set in `config.status', edit `config.status' # (which will cause the Makefiles to be regenerated when you run `make'); # (2) otherwise, pass the desired values on the `make' command line. $(RECURSIVE_TARGETS): @fail= failcom='exit 1'; \ for f in x $$MAKEFLAGS; do \ case $$f in \ *=* | --[!k]*);; \ *k*) failcom='fail=yes';; \ esac; \ done; \ dot_seen=no; \ target=`echo $@ | sed s/-recursive//`; \ list='$(SUBDIRS)'; for subdir in $$list; do \ echo "Making $$target in $$subdir"; \ if test "$$subdir" = "."; then \ dot_seen=yes; \ local_target="$$target-am"; \ else \ local_target="$$target"; \ fi; \ ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ || eval $$failcom; \ done; \ if test "$$dot_seen" = "no"; then \ $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ fi; test -z "$$fail" $(RECURSIVE_CLEAN_TARGETS): @fail= failcom='exit 1'; \ for f in x $$MAKEFLAGS; do \ case $$f in \ *=* | --[!k]*);; \ *k*) failcom='fail=yes';; \ esac; \ done; \ dot_seen=no; \ case "$@" in \ distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ *) list='$(SUBDIRS)' ;; \ esac; \ rev=''; for subdir in $$list; do \ if test "$$subdir" = "."; then :; else \ rev="$$subdir $$rev"; \ fi; \ done; \ rev="$$rev ."; \ target=`echo $@ | sed s/-recursive//`; \ for subdir in $$rev; do \ echo "Making $$target in $$subdir"; \ if test "$$subdir" = "."; then \ local_target="$$target-am"; \ else \ local_target="$$target"; \ fi; \ ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ || eval $$failcom; \ done && test -z "$$fail" tags-recursive: list='$(SUBDIRS)'; for subdir in $$list; do \ test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \ done ctags-recursive: list='$(SUBDIRS)'; for subdir in $$list; do \ test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \ done ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ mkid -fID $$unique tags: TAGS TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) set x; \ here=`pwd`; \ if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ include_option=--etags-include; \ empty_fix=.; \ else \ include_option=--include; \ empty_fix=; \ fi; \ list='$(SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ test ! -f $$subdir/TAGS || \ set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \ fi; \ done; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: CTAGS CTAGS: ctags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ test -d "$(distdir)/$$subdir" \ || $(MKDIR_P) "$(distdir)/$$subdir" \ || exit 1; \ fi; \ done @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ dir1=$$subdir; dir2="$(distdir)/$$subdir"; \ $(am__relativize); \ new_distdir=$$reldir; \ dir1=$$subdir; dir2="$(top_distdir)"; \ $(am__relativize); \ new_top_distdir=$$reldir; \ echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \ echo " am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \ ($(am__cd) $$subdir && \ $(MAKE) $(AM_MAKEFLAGS) \ top_distdir="$$new_top_distdir" \ distdir="$$new_distdir" \ am__remove_distdir=: \ am__skip_length_check=: \ am__skip_mode_fix=: \ distdir) \ || exit 1; \ fi; \ done check-am: all-am check: check-recursive all-am: Makefile $(LTLIBRARIES) installdirs: installdirs-recursive installdirs-am: for dir in "$(DESTDIR)$(libdir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-recursive install-exec: install-exec-recursive install-data: install-data-recursive uninstall: uninstall-recursive install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-recursive install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-recursive clean-am: clean-generic clean-libLTLIBRARIES clean-libtool \ mostlyclean-am distclean: distclean-recursive -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-recursive dvi-am: html: html-recursive html-am: info: info-recursive info-am: install-data-am: install-dvi: install-dvi-recursive install-dvi-am: install-exec-am: install-libLTLIBRARIES install-html: install-html-recursive install-html-am: install-info: install-info-recursive install-info-am: install-man: install-pdf: install-pdf-recursive install-pdf-am: install-ps: install-ps-recursive install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-recursive -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-recursive mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-recursive pdf-am: ps: ps-recursive ps-am: uninstall-am: uninstall-libLTLIBRARIES .MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) ctags-recursive \ install-am install-strip tags-recursive .PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \ all all-am check check-am clean clean-generic \ clean-libLTLIBRARIES clean-libtool ctags ctags-recursive \ distclean distclean-compile distclean-generic \ distclean-libtool distclean-tags distdir dvi dvi-am html \ html-am info info-am install install-am install-data \ install-data-am install-dvi install-dvi-am install-exec \ install-exec-am install-html install-html-am install-info \ install-info-am install-libLTLIBRARIES install-man install-pdf \ install-pdf-am install-ps install-ps-am install-strip \ installcheck installcheck-am installdirs installdirs-am \ maintainer-clean maintainer-clean-generic mostlyclean \ mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ pdf pdf-am ps ps-am tags tags-recursive uninstall uninstall-am \ uninstall-libLTLIBRARIES -include $(top_srcdir)/git.mk # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: libprelude-1.0.0/bindings/c++/include/0000775000076400007640000000000011347714754014457 500000000000000libprelude-1.0.0/bindings/c++/include/prelude-connection-pool.hxx0000664000076400007640000000444611212160615021662 00000000000000/***** * * Copyright (C) 2008 PreludeIDS Technologies. All Rights Reserved. * Author: Yoann Vandoorselaere * * This file is part of the Prelude library. * * 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; see the file COPYING. If not, write to * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. * *****/ #ifndef _LIBPRELUDE_PRELUDE_CONNECTION_POOL_HXX #define _LIBPRELUDE_PRELUDE_CONNECTION_POOL_HXX #include "prelude.h" #include "prelude-client-profile.hxx" #include "prelude-connection.hxx" namespace Prelude { class ConnectionPool { private: prelude_connection_pool_t *_pool; public: ~ConnectionPool(); ConnectionPool(); ConnectionPool(prelude_connection_pool_t *pool); ConnectionPool(const ConnectionPool &pool); ConnectionPool(Prelude::ClientProfile &cp, int permission); void Init(); void SetConnectionString(const char *str); const char *GetConnectionString(); std::vector GetConnectionList(); void SetFlags(int flags); int GetFlags(); void SetData(void *data); void *GetData(); void AddConnection(Prelude::Connection con); void DelConnection(Prelude::Connection con); void SetConnectionAlive(Prelude::Connection &con); void SetConnectionDead(Prelude::Connection &con); void SetRequiredPermission(int permission); ConnectionPool &operator=(const ConnectionPool &pool); operator prelude_connection_pool_t *(); }; }; #endif /* __PRELUDE_CONNECTION_POOL__ */ libprelude-1.0.0/bindings/c++/include/prelude-connection.hxx0000664000076400007640000000442211202225026020702 00000000000000/***** * * Copyright (C) 2008 PreludeIDS Technologies. All Rights Reserved. * Author: Yoann Vandoorselaere * * This file is part of the Prelude library. * * 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; see the file COPYING. If not, write to * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. * *****/ #ifndef _LIBPRELUDE_PRELUDE_CONNECTION_HXX #define _LIBPRELUDE_PRELUDE_CONNECTION_HXX #include "prelude-connection.h" #include "prelude-client-profile.hxx" #include "idmef.hxx" namespace Prelude { class IDMEF; class Connection { private: prelude_connection_t *_con; public: ~Connection(); Connection(); Connection(const char *addr); Connection(const Connection &con); Connection(prelude_connection_t *con, bool own_data=FALSE); prelude_connection_t *GetConnection(); void Close(); void Connect(Prelude::ClientProfile &cp, int permission); void SetState(int state); int GetState(); void SetData(void *data); void *GetData(); int GetPermission(); void SetPeerAnalyzerid(uint64_t analyzerid); uint64_t GetPeerAnalyzerid(); const char *GetLocalAddr(); unsigned int GetLocalPort(); const char *GetPeerAddr(); unsigned int GetPeerPort(); bool IsAlive(); int GetFd(); Prelude::IDMEF RecvIDMEF(); Connection & operator=(const Connection &con); operator prelude_connection_t *(); }; }; #endif libprelude-1.0.0/bindings/c++/include/idmef-value.hxx0000664000076400007640000000547011324402502017310 00000000000000/***** * * Copyright (C) 2008 PreludeIDS Technologies. All Rights Reserved. * Author: Yoann Vandoorselaere * * This file is part of the Prelude library. * * 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; see the file COPYING. If not, write to * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. * *****/ #ifndef _LIBPRELUDE_IDMEF_VALUE_HXX #define _LIBPRELUDE_IDMEF_VALUE_HXX #include #include "idmef-time.hxx" namespace Prelude { class IDMEFValue { private: void _InitFromString(const char *value); std::string convert_string() const; protected: idmef_value_t *_value; std::string _myconv; public: idmef_value_type_id_t GetType() const; bool IsNull() const; IDMEFValue(); ~IDMEFValue(); IDMEFValue(const IDMEFValue &value); IDMEFValue(std::vector value); IDMEFValue(idmef_value_t *value); IDMEFValue(std::string value); IDMEFValue(const char *value); IDMEFValue(int8_t value); IDMEFValue(uint8_t value); IDMEFValue(int16_t value); IDMEFValue(uint16_t value); IDMEFValue(int32_t value); IDMEFValue(uint32_t value); IDMEFValue(int64_t value); IDMEFValue(uint64_t value); IDMEFValue(float value); IDMEFValue(double value); IDMEFValue(Prelude::IDMEFTime &time); int Match(const IDMEFValue &value, int op); IDMEFValue Clone() const; operator int32_t() const; operator uint32_t() const; operator int64_t() const; operator uint64_t() const; operator double() const; //operator std::string(); operator std::vector() const; operator const char*() const; operator float() const; operator Prelude::IDMEFTime() const; operator idmef_value_t *() const; IDMEFValue & operator=(const IDMEFValue &p); }; }; #endif libprelude-1.0.0/bindings/c++/include/idmef-path.hxx0000664000076400007640000000665111324402502017132 00000000000000/***** * * Copyright (C) 2008 PreludeIDS Technologies. All Rights Reserved. * Author: Yoann Vandoorselaere * * This file is part of the Prelude library. * * 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; see the file COPYING. If not, write to * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. * *****/ #ifndef _LIBPRELUDE_IDMEF_PATH_HXX #define _LIBPRELUDE_IDMEF_PATH_HXX #include "prelude.h" #include "idmef-path.h" #include "idmef.hxx" #include "prelude-error.hxx" #include "idmef-value.hxx" namespace Prelude { class IDMEFPath { private: idmef_path_t *_path; public: IDMEFPath(const char *buffer); IDMEFPath(idmef_path_t *path); IDMEFPath(const IDMEFPath &path); ~IDMEFPath(); Prelude::IDMEFValue Get(Prelude::IDMEF &message); void Set(Prelude::IDMEF &message, std::vector value); void Set(Prelude::IDMEF &message, Prelude::IDMEFValue *value); void Set(Prelude::IDMEF &message, Prelude::IDMEFValue &value); void Set(Prelude::IDMEF &message, Prelude::IDMEFTime &time); void Set(Prelude::IDMEF &message, std::string value); void Set(Prelude::IDMEF &message, const char *value); void Set(Prelude::IDMEF &message, int8_t value); void Set(Prelude::IDMEF &message, uint8_t value); void Set(Prelude::IDMEF &message, int16_t value); void Set(Prelude::IDMEF &message, uint16_t value); void Set(Prelude::IDMEF &message, int32_t value); void Set(Prelude::IDMEF &message, uint32_t value); void Set(Prelude::IDMEF &message, int64_t value); void Set(Prelude::IDMEF &message, uint64_t value); void Set(Prelude::IDMEF &message, float value); void Set(Prelude::IDMEF &message, double value); idmef_class_id_t GetClass(int depth=-1); idmef_value_type_id_t GetValueType(int depth=-1); int SetIndex(unsigned int index, int depth=-1); int UndefineIndex(int depth=-1); int GetIndex(int depth=-1); int MakeChild(const char *child_name, unsigned int index); int MakeParent(); int Compare(IDMEFPath *path, int depth=-1); IDMEFPath Clone(); int CheckOperator(idmef_criterion_operator_t op); idmef_criterion_operator_t GetApplicableOperators(); //ref ? const char *GetName(int depth=-1); bool IsAmbiguous(); int HasLists(); bool IsList(int depth=-1); unsigned int GetDepth(); IDMEFPath &operator = (const IDMEFPath &path); }; }; #endif libprelude-1.0.0/bindings/c++/include/Makefile.am0000664000076400007640000000056611225122036016417 00000000000000includedir = $(prefix)/include/libprelude include_HEADERS = \ prelude-error.hxx \ idmef.hxx \ idmef-criteria.hxx \ idmef-path.hxx \ idmef-time.hxx \ idmef-value.hxx \ prelude.hxx \ prelude-client.hxx \ prelude-client-easy.hxx \ prelude-client-profile.hxx \ prelude-connection.hxx \ prelude-connection-pool.hxx \ prelude-log.hxx -include $(top_srcdir)/git.mk libprelude-1.0.0/bindings/c++/include/prelude-client-easy.hxx0000664000076400007640000000172111202225026020757 00000000000000#ifndef _LIBPRELUDE_PRELUDE_CLIENT_EASY_HXX #define _LIBPRELUDE_PRELUDE_CLIENT_EASY_HXX #include "prelude.h" #include "idmef.hxx" #include "prelude-client.hxx" namespace Prelude { class ClientEasy : public Client { private: void setup_analyzer(idmef_analyzer *analyzer, const char *_model, const char *_class, const char *_manufacturer, const char *version); public: ClientEasy(const char *profile, int permission = Client::IDMEF_WRITE, const char *_model = "Unknown model", const char *_class = "Unknown class", const char *_manufacturer = "Unknown manufacturer", const char *_version = "Unknown version"); }; }; #endif libprelude-1.0.0/bindings/c++/include/prelude.hxx0000664000076400007640000000236211322600650016551 00000000000000/***** * * Copyright (C) 2008 PreludeIDS Technologies. All Rights Reserved. * Author: Yoann Vandoorselaere * * This file is part of the Prelude library. * * 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; see the file COPYING. If not, write to * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. * *****/ #include #ifndef _LIBPRELUDE_PRELUDE_HXX #define _LIBPRELUDE_PRELUDE_HXX #include "prelude-client.hxx" #include "prelude-client-easy.hxx" #include "prelude-connection.hxx" #include "prelude-connection-pool.hxx" #include "idmef.hxx" #include "idmef-path.hxx" #include "idmef-value.hxx" #include "idmef-criteria.hxx" const char *CheckVersion(const char *version = NULL); #endif libprelude-1.0.0/bindings/c++/include/prelude-log.hxx0000664000076400007640000000373011330537773017346 00000000000000/***** * * Copyright (C) 2009 PreludeIDS Technologies. All Rights Reserved. * Author: Yoann Vandoorselaere * * This file is part of the Prelude library. * * 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; see the file COPYING. If not, write to * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. * *****/ #ifndef _LIBPRELUDE_PRELUDE_LOG_HXX #define _LIBPRELUDE_PRELUDE_LOG_HXX #include "prelude.h" #include "idmef-path.h" #if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__ # undef ERROR #endif namespace Prelude { class PreludeLog { public: enum LogLevelEnum { DEBUG = PRELUDE_LOG_DEBUG, INFO = PRELUDE_LOG_INFO, WARNING = PRELUDE_LOG_WARN, ERROR = PRELUDE_LOG_ERR, CRITICAL = PRELUDE_LOG_CRIT }; enum LogFlagsEnum { QUIET = PRELUDE_LOG_FLAGS_QUIET, SYSLOG = PRELUDE_LOG_FLAGS_SYSLOG }; static void SetLevel(int level); static void SetDebugLevel(int level); static void SetFlags(int flags); static int GetFlags(void); static void SetLogfile(const char *filename); static void SetCallback(void (*log_cb)(int level, const char *log)); }; }; #endif libprelude-1.0.0/bindings/c++/include/Makefile.in0000664000076400007640000013277611347714453016460 00000000000000# Makefile.in generated by automake 1.11.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, # Inc. # This Makefile.in 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. @SET_MAKE@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ target_triplet = @target@ subdir = bindings/c++/include DIST_COMMON = $(include_HEADERS) $(srcdir)/Makefile.am \ $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/libmissing/m4/00gnulib.m4 \ $(top_srcdir)/libmissing/m4/alloca.m4 \ $(top_srcdir)/libmissing/m4/arpa_inet_h.m4 \ $(top_srcdir)/libmissing/m4/btowc.m4 \ $(top_srcdir)/libmissing/m4/close.m4 \ $(top_srcdir)/libmissing/m4/codeset.m4 \ $(top_srcdir)/libmissing/m4/cond.m4 \ $(top_srcdir)/libmissing/m4/dos.m4 \ $(top_srcdir)/libmissing/m4/dup2.m4 \ $(top_srcdir)/libmissing/m4/errno_h.m4 \ $(top_srcdir)/libmissing/m4/exponentd.m4 \ $(top_srcdir)/libmissing/m4/exponentf.m4 \ $(top_srcdir)/libmissing/m4/exponentl.m4 \ $(top_srcdir)/libmissing/m4/extensions.m4 \ $(top_srcdir)/libmissing/m4/fclose.m4 \ $(top_srcdir)/libmissing/m4/fcntl-o.m4 \ $(top_srcdir)/libmissing/m4/fcntl_h.m4 \ $(top_srcdir)/libmissing/m4/float_h.m4 \ $(top_srcdir)/libmissing/m4/fopen.m4 \ $(top_srcdir)/libmissing/m4/fpieee.m4 \ $(top_srcdir)/libmissing/m4/frexp.m4 \ $(top_srcdir)/libmissing/m4/frexpl.m4 \ $(top_srcdir)/libmissing/m4/fseeko.m4 \ $(top_srcdir)/libmissing/m4/ftw.m4 \ $(top_srcdir)/libmissing/m4/getaddrinfo.m4 \ $(top_srcdir)/libmissing/m4/getdelim.m4 \ $(top_srcdir)/libmissing/m4/gethostname.m4 \ $(top_srcdir)/libmissing/m4/getline.m4 \ $(top_srcdir)/libmissing/m4/getpagesize.m4 \ $(top_srcdir)/libmissing/m4/getpass.m4 \ $(top_srcdir)/libmissing/m4/gettimeofday.m4 \ $(top_srcdir)/libmissing/m4/glibc21.m4 \ $(top_srcdir)/libmissing/m4/gnulib-common.m4 \ $(top_srcdir)/libmissing/m4/gnulib-comp.m4 \ $(top_srcdir)/libmissing/m4/gnulib-tool.m4 \ $(top_srcdir)/libmissing/m4/hostent.m4 \ $(top_srcdir)/libmissing/m4/include_next.m4 \ $(top_srcdir)/libmissing/m4/inet_ntop.m4 \ $(top_srcdir)/libmissing/m4/inet_pton.m4 \ $(top_srcdir)/libmissing/m4/intmax_t.m4 \ $(top_srcdir)/libmissing/m4/inttypes_h.m4 \ $(top_srcdir)/libmissing/m4/isnand.m4 \ $(top_srcdir)/libmissing/m4/isnanf.m4 \ $(top_srcdir)/libmissing/m4/isnanl.m4 \ $(top_srcdir)/libmissing/m4/langinfo_h.m4 \ $(top_srcdir)/libmissing/m4/ldexpl.m4 \ $(top_srcdir)/libmissing/m4/lib-ld.m4 \ $(top_srcdir)/libmissing/m4/lib-link.m4 \ $(top_srcdir)/libmissing/m4/lib-prefix.m4 \ $(top_srcdir)/libmissing/m4/localcharset.m4 \ $(top_srcdir)/libmissing/m4/locale-fr.m4 \ $(top_srcdir)/libmissing/m4/locale-ja.m4 \ $(top_srcdir)/libmissing/m4/locale-tr.m4 \ $(top_srcdir)/libmissing/m4/locale-zh.m4 \ $(top_srcdir)/libmissing/m4/lock.m4 \ $(top_srcdir)/libmissing/m4/longlong.m4 \ $(top_srcdir)/libmissing/m4/lseek.m4 \ $(top_srcdir)/libmissing/m4/lstat.m4 \ $(top_srcdir)/libmissing/m4/malloc.m4 \ $(top_srcdir)/libmissing/m4/math_h.m4 \ $(top_srcdir)/libmissing/m4/mbrtowc.m4 \ $(top_srcdir)/libmissing/m4/mbsinit.m4 \ $(top_srcdir)/libmissing/m4/mbstate_t.m4 \ $(top_srcdir)/libmissing/m4/memchr.m4 \ $(top_srcdir)/libmissing/m4/memmem.m4 \ $(top_srcdir)/libmissing/m4/minmax.m4 \ $(top_srcdir)/libmissing/m4/mktime.m4 \ $(top_srcdir)/libmissing/m4/mmap-anon.m4 \ $(top_srcdir)/libmissing/m4/mode_t.m4 \ $(top_srcdir)/libmissing/m4/multiarch.m4 \ $(top_srcdir)/libmissing/m4/netdb_h.m4 \ $(top_srcdir)/libmissing/m4/netinet_in_h.m4 \ $(top_srcdir)/libmissing/m4/nl_langinfo.m4 \ $(top_srcdir)/libmissing/m4/nocrash.m4 \ $(top_srcdir)/libmissing/m4/onceonly.m4 \ $(top_srcdir)/libmissing/m4/open.m4 \ $(top_srcdir)/libmissing/m4/pathmax.m4 \ $(top_srcdir)/libmissing/m4/perror.m4 \ $(top_srcdir)/libmissing/m4/poll.m4 \ $(top_srcdir)/libmissing/m4/printf-frexp.m4 \ $(top_srcdir)/libmissing/m4/printf-frexpl.m4 \ $(top_srcdir)/libmissing/m4/printf.m4 \ $(top_srcdir)/libmissing/m4/realloc.m4 \ $(top_srcdir)/libmissing/m4/regex.m4 \ $(top_srcdir)/libmissing/m4/relocatable-lib.m4 \ $(top_srcdir)/libmissing/m4/select.m4 \ $(top_srcdir)/libmissing/m4/servent.m4 \ $(top_srcdir)/libmissing/m4/signal_h.m4 \ $(top_srcdir)/libmissing/m4/signalblocking.m4 \ $(top_srcdir)/libmissing/m4/signbit.m4 \ $(top_srcdir)/libmissing/m4/size_max.m4 \ $(top_srcdir)/libmissing/m4/sleep.m4 \ $(top_srcdir)/libmissing/m4/snprintf-posix.m4 \ $(top_srcdir)/libmissing/m4/snprintf.m4 \ $(top_srcdir)/libmissing/m4/sockets.m4 \ $(top_srcdir)/libmissing/m4/socklen.m4 \ $(top_srcdir)/libmissing/m4/sockpfaf.m4 \ $(top_srcdir)/libmissing/m4/ssize_t.m4 \ $(top_srcdir)/libmissing/m4/stat.m4 \ $(top_srcdir)/libmissing/m4/stdbool.m4 \ $(top_srcdir)/libmissing/m4/stddef_h.m4 \ $(top_srcdir)/libmissing/m4/stdint.m4 \ $(top_srcdir)/libmissing/m4/stdint_h.m4 \ $(top_srcdir)/libmissing/m4/stdio_h.m4 \ $(top_srcdir)/libmissing/m4/stdlib_h.m4 \ $(top_srcdir)/libmissing/m4/strcase.m4 \ $(top_srcdir)/libmissing/m4/strcasestr.m4 \ $(top_srcdir)/libmissing/m4/strdup.m4 \ $(top_srcdir)/libmissing/m4/strerror.m4 \ $(top_srcdir)/libmissing/m4/string_h.m4 \ $(top_srcdir)/libmissing/m4/strings_h.m4 \ $(top_srcdir)/libmissing/m4/strndup.m4 \ $(top_srcdir)/libmissing/m4/strnlen.m4 \ $(top_srcdir)/libmissing/m4/strptime.m4 \ $(top_srcdir)/libmissing/m4/strsep.m4 \ $(top_srcdir)/libmissing/m4/symlink.m4 \ $(top_srcdir)/libmissing/m4/sys_ioctl_h.m4 \ $(top_srcdir)/libmissing/m4/sys_select_h.m4 \ $(top_srcdir)/libmissing/m4/sys_socket_h.m4 \ $(top_srcdir)/libmissing/m4/sys_stat_h.m4 \ $(top_srcdir)/libmissing/m4/sys_time_h.m4 \ $(top_srcdir)/libmissing/m4/sys_utsname_h.m4 \ $(top_srcdir)/libmissing/m4/thread.m4 \ $(top_srcdir)/libmissing/m4/threadlib.m4 \ $(top_srcdir)/libmissing/m4/time_h.m4 \ $(top_srcdir)/libmissing/m4/time_r.m4 \ $(top_srcdir)/libmissing/m4/timegm.m4 \ $(top_srcdir)/libmissing/m4/tls.m4 \ $(top_srcdir)/libmissing/m4/tm_gmtoff.m4 \ $(top_srcdir)/libmissing/m4/uname.m4 \ $(top_srcdir)/libmissing/m4/ungetc.m4 \ $(top_srcdir)/libmissing/m4/unistd_h.m4 \ $(top_srcdir)/libmissing/m4/vasnprintf.m4 \ $(top_srcdir)/libmissing/m4/vsnprintf-posix.m4 \ $(top_srcdir)/libmissing/m4/vsnprintf.m4 \ $(top_srcdir)/libmissing/m4/warn-on-use.m4 \ $(top_srcdir)/libmissing/m4/wchar.m4 \ $(top_srcdir)/libmissing/m4/wchar_t.m4 \ $(top_srcdir)/libmissing/m4/wcrtomb.m4 \ $(top_srcdir)/libmissing/m4/wctob.m4 \ $(top_srcdir)/libmissing/m4/wctype.m4 \ $(top_srcdir)/libmissing/m4/wint_t.m4 \ $(top_srcdir)/libmissing/m4/write.m4 \ $(top_srcdir)/libmissing/m4/xsize.m4 \ $(top_srcdir)/libmissing/m4/yield.m4 \ $(top_srcdir)/m4/ac_compile_check_sizeof.m4 \ $(top_srcdir)/m4/am_path_ruby.m4 $(top_srcdir)/m4/argz.m4 \ $(top_srcdir)/m4/as-ac-expand.m4 \ $(top_srcdir)/m4/ax_c_check_flag.m4 \ $(top_srcdir)/m4/ax_check_aligned_access_required.m4 \ $(top_srcdir)/m4/ax_create_prelude_inttypes_h.m4 \ $(top_srcdir)/m4/ax_ld_check_flag.m4 \ $(top_srcdir)/m4/gtk-doc.m4 $(top_srcdir)/m4/libgcrypt.m4 \ $(top_srcdir)/m4/libgnutls-extra.m4 \ $(top_srcdir)/m4/libgnutls.m4 $(top_srcdir)/m4/libtool.m4 \ $(top_srcdir)/m4/ltdl.m4 $(top_srcdir)/m4/ltoptions.m4 \ $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/m4/pkg.m4 \ $(top_srcdir)/configure.in am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = SOURCES = DIST_SOURCES = am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; am__install_max = 40 am__nobase_strip_setup = \ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` am__nobase_strip = \ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" am__nobase_list = $(am__nobase_strip_setup); \ for p in $$list; do echo "$$p $$p"; done | \ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ if (++n[$$2] == $(am__install_max)) \ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ END { for (dir in files) print dir, files[dir] }' am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' am__installdirs = "$(DESTDIR)$(includedir)" HEADERS = $(include_HEADERS) ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ ALLOCA = @ALLOCA@ ALLOCA_H = @ALLOCA_H@ AMTAR = @AMTAR@ APPLE_UNIVERSAL_BUILD = @APPLE_UNIVERSAL_BUILD@ AR = @AR@ ARGZ_H = @ARGZ_H@ AS = @AS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ BINDINGS_CC = @BINDINGS_CC@ BINDIR = @BINDIR@ BITSIZEOF_PTRDIFF_T = @BITSIZEOF_PTRDIFF_T@ BITSIZEOF_SIG_ATOMIC_T = @BITSIZEOF_SIG_ATOMIC_T@ BITSIZEOF_SIZE_T = @BITSIZEOF_SIZE_T@ BITSIZEOF_WCHAR_T = @BITSIZEOF_WCHAR_T@ BITSIZEOF_WINT_T = @BITSIZEOF_WINT_T@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CC_FOR_BUILD = @CC_FOR_BUILD@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EMULTIHOP_HIDDEN = @EMULTIHOP_HIDDEN@ EMULTIHOP_VALUE = @EMULTIHOP_VALUE@ ENOLINK_HIDDEN = @ENOLINK_HIDDEN@ ENOLINK_VALUE = @ENOLINK_VALUE@ EOVERFLOW_HIDDEN = @EOVERFLOW_HIDDEN@ EOVERFLOW_VALUE = @EOVERFLOW_VALUE@ ERRNO_H = @ERRNO_H@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ FLOAT_H = @FLOAT_H@ GETADDRINFO_LIB = @GETADDRINFO_LIB@ GETHOSTNAME_LIB = @GETHOSTNAME_LIB@ GLIBC21 = @GLIBC21@ GNULIB_ACCEPT = @GNULIB_ACCEPT@ GNULIB_ACCEPT4 = @GNULIB_ACCEPT4@ GNULIB_ACOSL = @GNULIB_ACOSL@ GNULIB_ASINL = @GNULIB_ASINL@ GNULIB_ATANL = @GNULIB_ATANL@ GNULIB_ATOLL = @GNULIB_ATOLL@ GNULIB_BIND = @GNULIB_BIND@ GNULIB_BTOWC = @GNULIB_BTOWC@ GNULIB_CALLOC_POSIX = @GNULIB_CALLOC_POSIX@ GNULIB_CANONICALIZE_FILE_NAME = @GNULIB_CANONICALIZE_FILE_NAME@ GNULIB_CEILF = @GNULIB_CEILF@ GNULIB_CEILL = @GNULIB_CEILL@ GNULIB_CHOWN = @GNULIB_CHOWN@ GNULIB_CLOSE = @GNULIB_CLOSE@ GNULIB_CONNECT = @GNULIB_CONNECT@ GNULIB_COSL = @GNULIB_COSL@ GNULIB_DPRINTF = @GNULIB_DPRINTF@ GNULIB_DUP2 = @GNULIB_DUP2@ GNULIB_DUP3 = @GNULIB_DUP3@ GNULIB_ENVIRON = @GNULIB_ENVIRON@ GNULIB_EUIDACCESS = @GNULIB_EUIDACCESS@ GNULIB_EXPL = @GNULIB_EXPL@ GNULIB_FACCESSAT = @GNULIB_FACCESSAT@ GNULIB_FCHDIR = @GNULIB_FCHDIR@ GNULIB_FCHMODAT = @GNULIB_FCHMODAT@ GNULIB_FCHOWNAT = @GNULIB_FCHOWNAT@ GNULIB_FCLOSE = @GNULIB_FCLOSE@ GNULIB_FCNTL = @GNULIB_FCNTL@ GNULIB_FFLUSH = @GNULIB_FFLUSH@ GNULIB_FLOORF = @GNULIB_FLOORF@ GNULIB_FLOORL = @GNULIB_FLOORL@ GNULIB_FOPEN = @GNULIB_FOPEN@ GNULIB_FPRINTF = @GNULIB_FPRINTF@ GNULIB_FPRINTF_POSIX = @GNULIB_FPRINTF_POSIX@ GNULIB_FPURGE = @GNULIB_FPURGE@ GNULIB_FPUTC = @GNULIB_FPUTC@ GNULIB_FPUTS = @GNULIB_FPUTS@ GNULIB_FREOPEN = @GNULIB_FREOPEN@ GNULIB_FREXP = @GNULIB_FREXP@ GNULIB_FREXPL = @GNULIB_FREXPL@ GNULIB_FSEEK = @GNULIB_FSEEK@ GNULIB_FSEEKO = @GNULIB_FSEEKO@ GNULIB_FSTATAT = @GNULIB_FSTATAT@ GNULIB_FSYNC = @GNULIB_FSYNC@ GNULIB_FTELL = @GNULIB_FTELL@ GNULIB_FTELLO = @GNULIB_FTELLO@ GNULIB_FTRUNCATE = @GNULIB_FTRUNCATE@ GNULIB_FUTIMENS = @GNULIB_FUTIMENS@ GNULIB_FWRITE = @GNULIB_FWRITE@ GNULIB_GETADDRINFO = @GNULIB_GETADDRINFO@ GNULIB_GETCWD = @GNULIB_GETCWD@ GNULIB_GETDELIM = @GNULIB_GETDELIM@ GNULIB_GETDOMAINNAME = @GNULIB_GETDOMAINNAME@ GNULIB_GETDTABLESIZE = @GNULIB_GETDTABLESIZE@ GNULIB_GETGROUPS = @GNULIB_GETGROUPS@ GNULIB_GETHOSTNAME = @GNULIB_GETHOSTNAME@ GNULIB_GETLINE = @GNULIB_GETLINE@ GNULIB_GETLOADAVG = @GNULIB_GETLOADAVG@ GNULIB_GETLOGIN = @GNULIB_GETLOGIN@ GNULIB_GETLOGIN_R = @GNULIB_GETLOGIN_R@ GNULIB_GETPAGESIZE = @GNULIB_GETPAGESIZE@ GNULIB_GETPEERNAME = @GNULIB_GETPEERNAME@ GNULIB_GETSOCKNAME = @GNULIB_GETSOCKNAME@ GNULIB_GETSOCKOPT = @GNULIB_GETSOCKOPT@ GNULIB_GETSUBOPT = @GNULIB_GETSUBOPT@ GNULIB_GETTIMEOFDAY = @GNULIB_GETTIMEOFDAY@ GNULIB_GETUSERSHELL = @GNULIB_GETUSERSHELL@ GNULIB_INET_NTOP = @GNULIB_INET_NTOP@ GNULIB_INET_PTON = @GNULIB_INET_PTON@ GNULIB_IOCTL = @GNULIB_IOCTL@ GNULIB_ISFINITE = @GNULIB_ISFINITE@ GNULIB_ISINF = @GNULIB_ISINF@ GNULIB_ISNAN = @GNULIB_ISNAN@ GNULIB_ISNAND = @GNULIB_ISNAND@ GNULIB_ISNANF = @GNULIB_ISNANF@ GNULIB_ISNANL = @GNULIB_ISNANL@ GNULIB_LCHMOD = @GNULIB_LCHMOD@ GNULIB_LCHOWN = @GNULIB_LCHOWN@ GNULIB_LDEXPL = @GNULIB_LDEXPL@ GNULIB_LINK = @GNULIB_LINK@ GNULIB_LINKAT = @GNULIB_LINKAT@ GNULIB_LISTEN = @GNULIB_LISTEN@ GNULIB_LOGL = @GNULIB_LOGL@ GNULIB_LSEEK = @GNULIB_LSEEK@ GNULIB_LSTAT = @GNULIB_LSTAT@ GNULIB_MALLOC_POSIX = @GNULIB_MALLOC_POSIX@ GNULIB_MBRLEN = @GNULIB_MBRLEN@ GNULIB_MBRTOWC = @GNULIB_MBRTOWC@ GNULIB_MBSCASECMP = @GNULIB_MBSCASECMP@ GNULIB_MBSCASESTR = @GNULIB_MBSCASESTR@ GNULIB_MBSCHR = @GNULIB_MBSCHR@ GNULIB_MBSCSPN = @GNULIB_MBSCSPN@ GNULIB_MBSINIT = @GNULIB_MBSINIT@ GNULIB_MBSLEN = @GNULIB_MBSLEN@ GNULIB_MBSNCASECMP = @GNULIB_MBSNCASECMP@ GNULIB_MBSNLEN = @GNULIB_MBSNLEN@ GNULIB_MBSNRTOWCS = @GNULIB_MBSNRTOWCS@ GNULIB_MBSPBRK = @GNULIB_MBSPBRK@ GNULIB_MBSPCASECMP = @GNULIB_MBSPCASECMP@ GNULIB_MBSRCHR = @GNULIB_MBSRCHR@ GNULIB_MBSRTOWCS = @GNULIB_MBSRTOWCS@ GNULIB_MBSSEP = @GNULIB_MBSSEP@ GNULIB_MBSSPN = @GNULIB_MBSSPN@ GNULIB_MBSSTR = @GNULIB_MBSSTR@ GNULIB_MBSTOK_R = @GNULIB_MBSTOK_R@ GNULIB_MEMCHR = @GNULIB_MEMCHR@ GNULIB_MEMMEM = @GNULIB_MEMMEM@ GNULIB_MEMPCPY = @GNULIB_MEMPCPY@ GNULIB_MEMRCHR = @GNULIB_MEMRCHR@ GNULIB_MKDIRAT = @GNULIB_MKDIRAT@ GNULIB_MKDTEMP = @GNULIB_MKDTEMP@ GNULIB_MKFIFO = @GNULIB_MKFIFO@ GNULIB_MKFIFOAT = @GNULIB_MKFIFOAT@ GNULIB_MKNOD = @GNULIB_MKNOD@ GNULIB_MKNODAT = @GNULIB_MKNODAT@ GNULIB_MKOSTEMP = @GNULIB_MKOSTEMP@ GNULIB_MKOSTEMPS = @GNULIB_MKOSTEMPS@ GNULIB_MKSTEMP = @GNULIB_MKSTEMP@ GNULIB_MKSTEMPS = @GNULIB_MKSTEMPS@ GNULIB_NL_LANGINFO = @GNULIB_NL_LANGINFO@ GNULIB_OBSTACK_PRINTF = @GNULIB_OBSTACK_PRINTF@ GNULIB_OBSTACK_PRINTF_POSIX = @GNULIB_OBSTACK_PRINTF_POSIX@ GNULIB_OPEN = @GNULIB_OPEN@ GNULIB_OPENAT = @GNULIB_OPENAT@ GNULIB_PERROR = @GNULIB_PERROR@ GNULIB_PIPE2 = @GNULIB_PIPE2@ GNULIB_POPEN = @GNULIB_POPEN@ GNULIB_PREAD = @GNULIB_PREAD@ GNULIB_PRINTF = @GNULIB_PRINTF@ GNULIB_PRINTF_POSIX = @GNULIB_PRINTF_POSIX@ GNULIB_PUTC = @GNULIB_PUTC@ GNULIB_PUTCHAR = @GNULIB_PUTCHAR@ GNULIB_PUTENV = @GNULIB_PUTENV@ GNULIB_PUTS = @GNULIB_PUTS@ GNULIB_RANDOM_R = @GNULIB_RANDOM_R@ GNULIB_RAWMEMCHR = @GNULIB_RAWMEMCHR@ GNULIB_READLINK = @GNULIB_READLINK@ GNULIB_READLINKAT = @GNULIB_READLINKAT@ GNULIB_REALLOC_POSIX = @GNULIB_REALLOC_POSIX@ GNULIB_REALPATH = @GNULIB_REALPATH@ GNULIB_RECV = @GNULIB_RECV@ GNULIB_RECVFROM = @GNULIB_RECVFROM@ GNULIB_REMOVE = @GNULIB_REMOVE@ GNULIB_RENAME = @GNULIB_RENAME@ GNULIB_RENAMEAT = @GNULIB_RENAMEAT@ GNULIB_RMDIR = @GNULIB_RMDIR@ GNULIB_ROUND = @GNULIB_ROUND@ GNULIB_ROUNDF = @GNULIB_ROUNDF@ GNULIB_ROUNDL = @GNULIB_ROUNDL@ GNULIB_RPMATCH = @GNULIB_RPMATCH@ GNULIB_SELECT = @GNULIB_SELECT@ GNULIB_SEND = @GNULIB_SEND@ GNULIB_SENDTO = @GNULIB_SENDTO@ GNULIB_SETENV = @GNULIB_SETENV@ GNULIB_SETSOCKOPT = @GNULIB_SETSOCKOPT@ GNULIB_SHUTDOWN = @GNULIB_SHUTDOWN@ GNULIB_SIGACTION = @GNULIB_SIGACTION@ GNULIB_SIGNAL_H_SIGPIPE = @GNULIB_SIGNAL_H_SIGPIPE@ GNULIB_SIGNBIT = @GNULIB_SIGNBIT@ GNULIB_SIGPROCMASK = @GNULIB_SIGPROCMASK@ GNULIB_SINL = @GNULIB_SINL@ GNULIB_SLEEP = @GNULIB_SLEEP@ GNULIB_SNPRINTF = @GNULIB_SNPRINTF@ GNULIB_SOCKET = @GNULIB_SOCKET@ GNULIB_SPRINTF_POSIX = @GNULIB_SPRINTF_POSIX@ GNULIB_SQRTL = @GNULIB_SQRTL@ GNULIB_STAT = @GNULIB_STAT@ GNULIB_STDIO_H_SIGPIPE = @GNULIB_STDIO_H_SIGPIPE@ GNULIB_STPCPY = @GNULIB_STPCPY@ GNULIB_STPNCPY = @GNULIB_STPNCPY@ GNULIB_STRCASESTR = @GNULIB_STRCASESTR@ GNULIB_STRCHRNUL = @GNULIB_STRCHRNUL@ GNULIB_STRDUP = @GNULIB_STRDUP@ GNULIB_STRERROR = @GNULIB_STRERROR@ GNULIB_STRNDUP = @GNULIB_STRNDUP@ GNULIB_STRNLEN = @GNULIB_STRNLEN@ GNULIB_STRPBRK = @GNULIB_STRPBRK@ GNULIB_STRSEP = @GNULIB_STRSEP@ GNULIB_STRSIGNAL = @GNULIB_STRSIGNAL@ GNULIB_STRSTR = @GNULIB_STRSTR@ GNULIB_STRTOD = @GNULIB_STRTOD@ GNULIB_STRTOK_R = @GNULIB_STRTOK_R@ GNULIB_STRTOLL = @GNULIB_STRTOLL@ GNULIB_STRTOULL = @GNULIB_STRTOULL@ GNULIB_STRVERSCMP = @GNULIB_STRVERSCMP@ GNULIB_SYMLINK = @GNULIB_SYMLINK@ GNULIB_SYMLINKAT = @GNULIB_SYMLINKAT@ GNULIB_TANL = @GNULIB_TANL@ GNULIB_TRUNC = @GNULIB_TRUNC@ GNULIB_TRUNCF = @GNULIB_TRUNCF@ GNULIB_TRUNCL = @GNULIB_TRUNCL@ GNULIB_UNAME = @GNULIB_UNAME@ GNULIB_UNISTD_H_GETOPT = @GNULIB_UNISTD_H_GETOPT@ GNULIB_UNISTD_H_SIGPIPE = @GNULIB_UNISTD_H_SIGPIPE@ GNULIB_UNLINK = @GNULIB_UNLINK@ GNULIB_UNLINKAT = @GNULIB_UNLINKAT@ GNULIB_UNSETENV = @GNULIB_UNSETENV@ GNULIB_USLEEP = @GNULIB_USLEEP@ GNULIB_UTIMENSAT = @GNULIB_UTIMENSAT@ GNULIB_VASPRINTF = @GNULIB_VASPRINTF@ GNULIB_VDPRINTF = @GNULIB_VDPRINTF@ GNULIB_VFPRINTF = @GNULIB_VFPRINTF@ GNULIB_VFPRINTF_POSIX = @GNULIB_VFPRINTF_POSIX@ GNULIB_VPRINTF = @GNULIB_VPRINTF@ GNULIB_VPRINTF_POSIX = @GNULIB_VPRINTF_POSIX@ GNULIB_VSNPRINTF = @GNULIB_VSNPRINTF@ GNULIB_VSPRINTF_POSIX = @GNULIB_VSPRINTF_POSIX@ GNULIB_WCRTOMB = @GNULIB_WCRTOMB@ GNULIB_WCSNRTOMBS = @GNULIB_WCSNRTOMBS@ GNULIB_WCSRTOMBS = @GNULIB_WCSRTOMBS@ GNULIB_WCTOB = @GNULIB_WCTOB@ GNULIB_WCWIDTH = @GNULIB_WCWIDTH@ GNULIB_WRITE = @GNULIB_WRITE@ GREP = @GREP@ GTKDOC_CHECK = @GTKDOC_CHECK@ HAVE_ACCEPT4 = @HAVE_ACCEPT4@ HAVE_ACOSL = @HAVE_ACOSL@ HAVE_ARPA_INET_H = @HAVE_ARPA_INET_H@ HAVE_ASINL = @HAVE_ASINL@ HAVE_ATANL = @HAVE_ATANL@ HAVE_ATOLL = @HAVE_ATOLL@ HAVE_BTOWC = @HAVE_BTOWC@ HAVE_CALLOC_POSIX = @HAVE_CALLOC_POSIX@ HAVE_CANONICALIZE_FILE_NAME = @HAVE_CANONICALIZE_FILE_NAME@ HAVE_CHOWN = @HAVE_CHOWN@ HAVE_COSL = @HAVE_COSL@ HAVE_CXX = @HAVE_CXX@ HAVE_DECL_ACOSL = @HAVE_DECL_ACOSL@ HAVE_DECL_ASINL = @HAVE_DECL_ASINL@ HAVE_DECL_ATANL = @HAVE_DECL_ATANL@ HAVE_DECL_COSL = @HAVE_DECL_COSL@ HAVE_DECL_ENVIRON = @HAVE_DECL_ENVIRON@ HAVE_DECL_EXPL = @HAVE_DECL_EXPL@ HAVE_DECL_FPURGE = @HAVE_DECL_FPURGE@ HAVE_DECL_FREEADDRINFO = @HAVE_DECL_FREEADDRINFO@ HAVE_DECL_FREXPL = @HAVE_DECL_FREXPL@ HAVE_DECL_GAI_STRERROR = @HAVE_DECL_GAI_STRERROR@ HAVE_DECL_GETADDRINFO = @HAVE_DECL_GETADDRINFO@ HAVE_DECL_GETDELIM = @HAVE_DECL_GETDELIM@ HAVE_DECL_GETLINE = @HAVE_DECL_GETLINE@ HAVE_DECL_GETLOADAVG = @HAVE_DECL_GETLOADAVG@ HAVE_DECL_GETLOGIN_R = @HAVE_DECL_GETLOGIN_R@ HAVE_DECL_GETNAMEINFO = @HAVE_DECL_GETNAMEINFO@ HAVE_DECL_INET_NTOP = @HAVE_DECL_INET_NTOP@ HAVE_DECL_INET_PTON = @HAVE_DECL_INET_PTON@ HAVE_DECL_LDEXPL = @HAVE_DECL_LDEXPL@ HAVE_DECL_LOGL = @HAVE_DECL_LOGL@ HAVE_DECL_MEMMEM = @HAVE_DECL_MEMMEM@ HAVE_DECL_MEMRCHR = @HAVE_DECL_MEMRCHR@ HAVE_DECL_OBSTACK_PRINTF = @HAVE_DECL_OBSTACK_PRINTF@ HAVE_DECL_SINL = @HAVE_DECL_SINL@ HAVE_DECL_SNPRINTF = @HAVE_DECL_SNPRINTF@ HAVE_DECL_SQRTL = @HAVE_DECL_SQRTL@ HAVE_DECL_STRDUP = @HAVE_DECL_STRDUP@ HAVE_DECL_STRERROR = @HAVE_DECL_STRERROR@ HAVE_DECL_STRNCASECMP = @HAVE_DECL_STRNCASECMP@ HAVE_DECL_STRNDUP = @HAVE_DECL_STRNDUP@ HAVE_DECL_STRNLEN = @HAVE_DECL_STRNLEN@ HAVE_DECL_STRSIGNAL = @HAVE_DECL_STRSIGNAL@ HAVE_DECL_STRTOK_R = @HAVE_DECL_STRTOK_R@ HAVE_DECL_TANL = @HAVE_DECL_TANL@ HAVE_DECL_TRUNC = @HAVE_DECL_TRUNC@ HAVE_DECL_TRUNCF = @HAVE_DECL_TRUNCF@ HAVE_DECL_VSNPRINTF = @HAVE_DECL_VSNPRINTF@ HAVE_DECL_WCTOB = @HAVE_DECL_WCTOB@ HAVE_DECL_WCWIDTH = @HAVE_DECL_WCWIDTH@ HAVE_DPRINTF = @HAVE_DPRINTF@ HAVE_DUP2 = @HAVE_DUP2@ HAVE_DUP3 = @HAVE_DUP3@ HAVE_EUIDACCESS = @HAVE_EUIDACCESS@ HAVE_EXPL = @HAVE_EXPL@ HAVE_FACCESSAT = @HAVE_FACCESSAT@ HAVE_FCHMODAT = @HAVE_FCHMODAT@ HAVE_FCHOWNAT = @HAVE_FCHOWNAT@ HAVE_FCNTL = @HAVE_FCNTL@ HAVE_FSTATAT = @HAVE_FSTATAT@ HAVE_FSYNC = @HAVE_FSYNC@ HAVE_FTRUNCATE = @HAVE_FTRUNCATE@ HAVE_FUTIMENS = @HAVE_FUTIMENS@ HAVE_GETDOMAINNAME = @HAVE_GETDOMAINNAME@ HAVE_GETDTABLESIZE = @HAVE_GETDTABLESIZE@ HAVE_GETGROUPS = @HAVE_GETGROUPS@ HAVE_GETHOSTNAME = @HAVE_GETHOSTNAME@ HAVE_GETLOGIN = @HAVE_GETLOGIN@ HAVE_GETPAGESIZE = @HAVE_GETPAGESIZE@ HAVE_GETSUBOPT = @HAVE_GETSUBOPT@ HAVE_GETUSERSHELL = @HAVE_GETUSERSHELL@ HAVE_INTTYPES_H = @HAVE_INTTYPES_H@ HAVE_ISNAND = @HAVE_ISNAND@ HAVE_ISNANF = @HAVE_ISNANF@ HAVE_ISNANL = @HAVE_ISNANL@ HAVE_ISWCNTRL = @HAVE_ISWCNTRL@ HAVE_LANGINFO_CODESET = @HAVE_LANGINFO_CODESET@ HAVE_LANGINFO_ERA = @HAVE_LANGINFO_ERA@ HAVE_LANGINFO_H = @HAVE_LANGINFO_H@ HAVE_LCHMOD = @HAVE_LCHMOD@ HAVE_LCHOWN = @HAVE_LCHOWN@ HAVE_LINK = @HAVE_LINK@ HAVE_LINKAT = @HAVE_LINKAT@ HAVE_LOGL = @HAVE_LOGL@ HAVE_LONG_LONG_INT = @HAVE_LONG_LONG_INT@ HAVE_LSTAT = @HAVE_LSTAT@ HAVE_MALLOC_POSIX = @HAVE_MALLOC_POSIX@ HAVE_MBRLEN = @HAVE_MBRLEN@ HAVE_MBRTOWC = @HAVE_MBRTOWC@ HAVE_MBSINIT = @HAVE_MBSINIT@ HAVE_MBSLEN = @HAVE_MBSLEN@ HAVE_MBSNRTOWCS = @HAVE_MBSNRTOWCS@ HAVE_MBSRTOWCS = @HAVE_MBSRTOWCS@ HAVE_MEMPCPY = @HAVE_MEMPCPY@ HAVE_MKDIRAT = @HAVE_MKDIRAT@ HAVE_MKDTEMP = @HAVE_MKDTEMP@ HAVE_MKFIFO = @HAVE_MKFIFO@ HAVE_MKFIFOAT = @HAVE_MKFIFOAT@ HAVE_MKNOD = @HAVE_MKNOD@ HAVE_MKNODAT = @HAVE_MKNODAT@ HAVE_MKOSTEMP = @HAVE_MKOSTEMP@ HAVE_MKOSTEMPS = @HAVE_MKOSTEMPS@ HAVE_MKSTEMPS = @HAVE_MKSTEMPS@ HAVE_NETDB_H = @HAVE_NETDB_H@ HAVE_NETINET_IN_H = @HAVE_NETINET_IN_H@ HAVE_NL_LANGINFO = @HAVE_NL_LANGINFO@ HAVE_OPENAT = @HAVE_OPENAT@ HAVE_OS_H = @HAVE_OS_H@ HAVE_PIPE2 = @HAVE_PIPE2@ HAVE_POSIX_SIGNALBLOCKING = @HAVE_POSIX_SIGNALBLOCKING@ HAVE_PREAD = @HAVE_PREAD@ HAVE_RANDOM_H = @HAVE_RANDOM_H@ HAVE_RANDOM_R = @HAVE_RANDOM_R@ HAVE_RAWMEMCHR = @HAVE_RAWMEMCHR@ HAVE_READLINK = @HAVE_READLINK@ HAVE_READLINKAT = @HAVE_READLINKAT@ HAVE_REALLOC_POSIX = @HAVE_REALLOC_POSIX@ HAVE_REALPATH = @HAVE_REALPATH@ HAVE_RENAMEAT = @HAVE_RENAMEAT@ HAVE_RPMATCH = @HAVE_RPMATCH@ HAVE_SA_FAMILY_T = @HAVE_SA_FAMILY_T@ HAVE_SETENV = @HAVE_SETENV@ HAVE_SIGACTION = @HAVE_SIGACTION@ HAVE_SIGINFO_T = @HAVE_SIGINFO_T@ HAVE_SIGNED_SIG_ATOMIC_T = @HAVE_SIGNED_SIG_ATOMIC_T@ HAVE_SIGNED_WCHAR_T = @HAVE_SIGNED_WCHAR_T@ HAVE_SIGNED_WINT_T = @HAVE_SIGNED_WINT_T@ HAVE_SIGSET_T = @HAVE_SIGSET_T@ HAVE_SINL = @HAVE_SINL@ HAVE_SLEEP = @HAVE_SLEEP@ HAVE_SQRTL = @HAVE_SQRTL@ HAVE_STDINT_H = @HAVE_STDINT_H@ HAVE_STPCPY = @HAVE_STPCPY@ HAVE_STPNCPY = @HAVE_STPNCPY@ HAVE_STRCASECMP = @HAVE_STRCASECMP@ HAVE_STRCASESTR = @HAVE_STRCASESTR@ HAVE_STRCHRNUL = @HAVE_STRCHRNUL@ HAVE_STRPBRK = @HAVE_STRPBRK@ HAVE_STRSEP = @HAVE_STRSEP@ HAVE_STRTOD = @HAVE_STRTOD@ HAVE_STRTOLL = @HAVE_STRTOLL@ HAVE_STRTOULL = @HAVE_STRTOULL@ HAVE_STRUCT_ADDRINFO = @HAVE_STRUCT_ADDRINFO@ HAVE_STRUCT_RANDOM_DATA = @HAVE_STRUCT_RANDOM_DATA@ HAVE_STRUCT_SIGACTION_SA_SIGACTION = @HAVE_STRUCT_SIGACTION_SA_SIGACTION@ HAVE_STRUCT_SOCKADDR_STORAGE = @HAVE_STRUCT_SOCKADDR_STORAGE@ HAVE_STRUCT_TIMEVAL = @HAVE_STRUCT_TIMEVAL@ HAVE_STRUCT_UTSNAME = @HAVE_STRUCT_UTSNAME@ HAVE_STRVERSCMP = @HAVE_STRVERSCMP@ HAVE_SYMLINK = @HAVE_SYMLINK@ HAVE_SYMLINKAT = @HAVE_SYMLINKAT@ HAVE_SYS_BITYPES_H = @HAVE_SYS_BITYPES_H@ HAVE_SYS_INTTYPES_H = @HAVE_SYS_INTTYPES_H@ HAVE_SYS_IOCTL_H = @HAVE_SYS_IOCTL_H@ HAVE_SYS_LOADAVG_H = @HAVE_SYS_LOADAVG_H@ HAVE_SYS_PARAM_H = @HAVE_SYS_PARAM_H@ HAVE_SYS_SELECT_H = @HAVE_SYS_SELECT_H@ HAVE_SYS_SOCKET_H = @HAVE_SYS_SOCKET_H@ HAVE_SYS_TIME_H = @HAVE_SYS_TIME_H@ HAVE_SYS_TYPES_H = @HAVE_SYS_TYPES_H@ HAVE_SYS_UTSNAME_H = @HAVE_SYS_UTSNAME_H@ HAVE_TANL = @HAVE_TANL@ HAVE_TYPE_VOLATILE_SIG_ATOMIC_T = @HAVE_TYPE_VOLATILE_SIG_ATOMIC_T@ HAVE_UNAME = @HAVE_UNAME@ HAVE_UNISTD_H = @HAVE_UNISTD_H@ HAVE_UNLINKAT = @HAVE_UNLINKAT@ HAVE_UNSETENV = @HAVE_UNSETENV@ HAVE_UNSIGNED_LONG_LONG_INT = @HAVE_UNSIGNED_LONG_LONG_INT@ HAVE_USLEEP = @HAVE_USLEEP@ HAVE_UTIMENSAT = @HAVE_UTIMENSAT@ HAVE_VASPRINTF = @HAVE_VASPRINTF@ HAVE_VDPRINTF = @HAVE_VDPRINTF@ HAVE_WCHAR_H = @HAVE_WCHAR_H@ HAVE_WCHAR_T = @HAVE_WCHAR_T@ HAVE_WCRTOMB = @HAVE_WCRTOMB@ HAVE_WCSNRTOMBS = @HAVE_WCSNRTOMBS@ HAVE_WCSRTOMBS = @HAVE_WCSRTOMBS@ HAVE_WCTYPE_H = @HAVE_WCTYPE_H@ HAVE_WINSOCK2_H = @HAVE_WINSOCK2_H@ HAVE_WINT_T = @HAVE_WINT_T@ HAVE_WS2TCPIP_H = @HAVE_WS2TCPIP_H@ HAVE__BOOL = @HAVE__BOOL@ HOSTENT_LIB = @HOSTENT_LIB@ HTML_DIR = @HTML_DIR@ INCLTDL = @INCLTDL@ INCLUDE_NEXT = @INCLUDE_NEXT@ INCLUDE_NEXT_AS_FIRST_DIRECTIVE = @INCLUDE_NEXT_AS_FIRST_DIRECTIVE@ INET_NTOP_LIB = @INET_NTOP_LIB@ INET_PTON_LIB = @INET_PTON_LIB@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LD = @LD@ LDFLAGS = @LDFLAGS@ LEX = @LEX@ LEXLIB = @LEXLIB@ LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@ LIBADD_DL = @LIBADD_DL@ LIBADD_DLD_LINK = @LIBADD_DLD_LINK@ LIBADD_DLOPEN = @LIBADD_DLOPEN@ LIBADD_SHL_LOAD = @LIBADD_SHL_LOAD@ LIBDIR = @LIBDIR@ LIBGCRYPT_CFLAGS = @LIBGCRYPT_CFLAGS@ LIBGCRYPT_CONFIG = @LIBGCRYPT_CONFIG@ LIBGCRYPT_LIBS = @LIBGCRYPT_LIBS@ LIBGNUTLS_CFLAGS = @LIBGNUTLS_CFLAGS@ LIBGNUTLS_CONFIG = @LIBGNUTLS_CONFIG@ LIBGNUTLS_EXTRA_CFLAGS = @LIBGNUTLS_EXTRA_CFLAGS@ LIBGNUTLS_EXTRA_CONFIG = @LIBGNUTLS_EXTRA_CONFIG@ LIBGNUTLS_EXTRA_LIBS = @LIBGNUTLS_EXTRA_LIBS@ LIBGNUTLS_LIBS = @LIBGNUTLS_LIBS@ LIBINTL = @LIBINTL@ LIBLTDL = @LIBLTDL@ LIBMULTITHREAD = @LIBMULTITHREAD@ LIBOBJS = @LIBOBJS@ LIBPRELUDECPP_SONAME = @LIBPRELUDECPP_SONAME@ LIBPRELUDE_CFLAGS = @LIBPRELUDE_CFLAGS@ LIBPRELUDE_LIBS = @LIBPRELUDE_LIBS@ LIBPRELUDE_SONAME = @LIBPRELUDE_SONAME@ LIBPTH = @LIBPTH@ LIBPTH_PREFIX = @LIBPTH_PREFIX@ LIBS = @LIBS@ LIBSOCKET = @LIBSOCKET@ LIBTESTS_LIBDEPS = @LIBTESTS_LIBDEPS@ LIBTHREAD = @LIBTHREAD@ LIBTOOL = @LIBTOOL@ LIPO = @LIPO@ LN_S = @LN_S@ LOCALCHARSET_TESTS_ENVIRONMENT = @LOCALCHARSET_TESTS_ENVIRONMENT@ LOCALE_FR = @LOCALE_FR@ LOCALE_FR_UTF8 = @LOCALE_FR_UTF8@ LOCALE_JA = @LOCALE_JA@ LOCALE_TR_UTF8 = @LOCALE_TR_UTF8@ LOCALE_ZH_CN = @LOCALE_ZH_CN@ LOCALSTATEDIR = @LOCALSTATEDIR@ LTALLOCA = @LTALLOCA@ LTDLDEPS = @LTDLDEPS@ LTDLINCL = @LTDLINCL@ LTDLOPEN = @LTDLOPEN@ LTLIBINTL = @LTLIBINTL@ LTLIBMULTITHREAD = @LTLIBMULTITHREAD@ LTLIBOBJS = @LTLIBOBJS@ LTLIBPTH = @LTLIBPTH@ LTLIBTHREAD = @LTLIBTHREAD@ LT_CONFIG_H = @LT_CONFIG_H@ LT_DLLOADERS = @LT_DLLOADERS@ LT_DLPREOPEN = @LT_DLPREOPEN@ LUA_CFLAGS = @LUA_CFLAGS@ LUA_CONFIG = @LUA_CONFIG@ LUA_LIBS = @LUA_LIBS@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MKDIR_P = @MKDIR_P@ NETDB_H = @NETDB_H@ NETINET_IN_H = @NETINET_IN_H@ NEXT_ARPA_INET_H = @NEXT_ARPA_INET_H@ NEXT_AS_FIRST_DIRECTIVE_ARPA_INET_H = @NEXT_AS_FIRST_DIRECTIVE_ARPA_INET_H@ NEXT_AS_FIRST_DIRECTIVE_ERRNO_H = @NEXT_AS_FIRST_DIRECTIVE_ERRNO_H@ NEXT_AS_FIRST_DIRECTIVE_FCNTL_H = @NEXT_AS_FIRST_DIRECTIVE_FCNTL_H@ NEXT_AS_FIRST_DIRECTIVE_FLOAT_H = @NEXT_AS_FIRST_DIRECTIVE_FLOAT_H@ NEXT_AS_FIRST_DIRECTIVE_LANGINFO_H = @NEXT_AS_FIRST_DIRECTIVE_LANGINFO_H@ NEXT_AS_FIRST_DIRECTIVE_MATH_H = @NEXT_AS_FIRST_DIRECTIVE_MATH_H@ NEXT_AS_FIRST_DIRECTIVE_NETDB_H = @NEXT_AS_FIRST_DIRECTIVE_NETDB_H@ NEXT_AS_FIRST_DIRECTIVE_NETINET_IN_H = @NEXT_AS_FIRST_DIRECTIVE_NETINET_IN_H@ NEXT_AS_FIRST_DIRECTIVE_SIGNAL_H = @NEXT_AS_FIRST_DIRECTIVE_SIGNAL_H@ NEXT_AS_FIRST_DIRECTIVE_STDDEF_H = @NEXT_AS_FIRST_DIRECTIVE_STDDEF_H@ NEXT_AS_FIRST_DIRECTIVE_STDINT_H = @NEXT_AS_FIRST_DIRECTIVE_STDINT_H@ NEXT_AS_FIRST_DIRECTIVE_STDIO_H = @NEXT_AS_FIRST_DIRECTIVE_STDIO_H@ NEXT_AS_FIRST_DIRECTIVE_STDLIB_H = @NEXT_AS_FIRST_DIRECTIVE_STDLIB_H@ NEXT_AS_FIRST_DIRECTIVE_STRINGS_H = @NEXT_AS_FIRST_DIRECTIVE_STRINGS_H@ NEXT_AS_FIRST_DIRECTIVE_STRING_H = @NEXT_AS_FIRST_DIRECTIVE_STRING_H@ NEXT_AS_FIRST_DIRECTIVE_SYS_IOCTL_H = @NEXT_AS_FIRST_DIRECTIVE_SYS_IOCTL_H@ NEXT_AS_FIRST_DIRECTIVE_SYS_SELECT_H = @NEXT_AS_FIRST_DIRECTIVE_SYS_SELECT_H@ NEXT_AS_FIRST_DIRECTIVE_SYS_SOCKET_H = @NEXT_AS_FIRST_DIRECTIVE_SYS_SOCKET_H@ NEXT_AS_FIRST_DIRECTIVE_SYS_STAT_H = @NEXT_AS_FIRST_DIRECTIVE_SYS_STAT_H@ NEXT_AS_FIRST_DIRECTIVE_SYS_TIME_H = @NEXT_AS_FIRST_DIRECTIVE_SYS_TIME_H@ NEXT_AS_FIRST_DIRECTIVE_SYS_UTSNAME_H = @NEXT_AS_FIRST_DIRECTIVE_SYS_UTSNAME_H@ NEXT_AS_FIRST_DIRECTIVE_TIME_H = @NEXT_AS_FIRST_DIRECTIVE_TIME_H@ NEXT_AS_FIRST_DIRECTIVE_UNISTD_H = @NEXT_AS_FIRST_DIRECTIVE_UNISTD_H@ NEXT_AS_FIRST_DIRECTIVE_WCHAR_H = @NEXT_AS_FIRST_DIRECTIVE_WCHAR_H@ NEXT_AS_FIRST_DIRECTIVE_WCTYPE_H = @NEXT_AS_FIRST_DIRECTIVE_WCTYPE_H@ NEXT_ERRNO_H = @NEXT_ERRNO_H@ NEXT_FCNTL_H = @NEXT_FCNTL_H@ NEXT_FLOAT_H = @NEXT_FLOAT_H@ NEXT_LANGINFO_H = @NEXT_LANGINFO_H@ NEXT_MATH_H = @NEXT_MATH_H@ NEXT_NETDB_H = @NEXT_NETDB_H@ NEXT_NETINET_IN_H = @NEXT_NETINET_IN_H@ NEXT_SIGNAL_H = @NEXT_SIGNAL_H@ NEXT_STDDEF_H = @NEXT_STDDEF_H@ NEXT_STDINT_H = @NEXT_STDINT_H@ NEXT_STDIO_H = @NEXT_STDIO_H@ NEXT_STDLIB_H = @NEXT_STDLIB_H@ NEXT_STRINGS_H = @NEXT_STRINGS_H@ NEXT_STRING_H = @NEXT_STRING_H@ NEXT_SYS_IOCTL_H = @NEXT_SYS_IOCTL_H@ NEXT_SYS_SELECT_H = @NEXT_SYS_SELECT_H@ NEXT_SYS_SOCKET_H = @NEXT_SYS_SOCKET_H@ NEXT_SYS_STAT_H = @NEXT_SYS_STAT_H@ NEXT_SYS_TIME_H = @NEXT_SYS_TIME_H@ NEXT_SYS_UTSNAME_H = @NEXT_SYS_UTSNAME_H@ NEXT_TIME_H = @NEXT_TIME_H@ NEXT_UNISTD_H = @NEXT_UNISTD_H@ NEXT_WCHAR_H = @NEXT_WCHAR_H@ NEXT_WCTYPE_H = @NEXT_WCTYPE_H@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PCFLAGS = @PCFLAGS@ PERL = @PERL@ PERL_EXTRA_PARAMS = @PERL_EXTRA_PARAMS@ PKG_CONFIG = @PKG_CONFIG@ POLL_H = @POLL_H@ PRAGMA_SYSTEM_HEADER = @PRAGMA_SYSTEM_HEADER@ PRELUDE_ADMIN_CFLAGS = @PRELUDE_ADMIN_CFLAGS@ PRELUDE_ADMIN_LIBS = @PRELUDE_ADMIN_LIBS@ PRELUDE_CONFIG_DIR = @PRELUDE_CONFIG_DIR@ PRELUDE_SPOOL_DIR = @PRELUDE_SPOOL_DIR@ PTHREAD_CFLAGS = @PTHREAD_CFLAGS@ PTHREAD_LDFLAGS = @PTHREAD_LDFLAGS@ PTHREAD_LIBS = @PTHREAD_LIBS@ PTRDIFF_T_SUFFIX = @PTRDIFF_T_SUFFIX@ PYTHON = @PYTHON@ RANLIB = @RANLIB@ RELOCATABLE = @RELOCATABLE@ REPLACE_BTOWC = @REPLACE_BTOWC@ REPLACE_CANONICALIZE_FILE_NAME = @REPLACE_CANONICALIZE_FILE_NAME@ REPLACE_CEILF = @REPLACE_CEILF@ REPLACE_CEILL = @REPLACE_CEILL@ REPLACE_CHOWN = @REPLACE_CHOWN@ REPLACE_CLOSE = @REPLACE_CLOSE@ REPLACE_DPRINTF = @REPLACE_DPRINTF@ REPLACE_DUP = @REPLACE_DUP@ REPLACE_DUP2 = @REPLACE_DUP2@ REPLACE_FCHDIR = @REPLACE_FCHDIR@ REPLACE_FCHOWNAT = @REPLACE_FCHOWNAT@ REPLACE_FCLOSE = @REPLACE_FCLOSE@ REPLACE_FCNTL = @REPLACE_FCNTL@ REPLACE_FFLUSH = @REPLACE_FFLUSH@ REPLACE_FLOORF = @REPLACE_FLOORF@ REPLACE_FLOORL = @REPLACE_FLOORL@ REPLACE_FOPEN = @REPLACE_FOPEN@ REPLACE_FPRINTF = @REPLACE_FPRINTF@ REPLACE_FPURGE = @REPLACE_FPURGE@ REPLACE_FREOPEN = @REPLACE_FREOPEN@ REPLACE_FREXP = @REPLACE_FREXP@ REPLACE_FREXPL = @REPLACE_FREXPL@ REPLACE_FSEEK = @REPLACE_FSEEK@ REPLACE_FSEEKO = @REPLACE_FSEEKO@ REPLACE_FSTAT = @REPLACE_FSTAT@ REPLACE_FSTATAT = @REPLACE_FSTATAT@ REPLACE_FTELL = @REPLACE_FTELL@ REPLACE_FTELLO = @REPLACE_FTELLO@ REPLACE_FUTIMENS = @REPLACE_FUTIMENS@ REPLACE_GETCWD = @REPLACE_GETCWD@ REPLACE_GETDELIM = @REPLACE_GETDELIM@ REPLACE_GETGROUPS = @REPLACE_GETGROUPS@ REPLACE_GETLINE = @REPLACE_GETLINE@ REPLACE_GETPAGESIZE = @REPLACE_GETPAGESIZE@ REPLACE_GETTIMEOFDAY = @REPLACE_GETTIMEOFDAY@ REPLACE_HUGE_VAL = @REPLACE_HUGE_VAL@ REPLACE_ISFINITE = @REPLACE_ISFINITE@ REPLACE_ISINF = @REPLACE_ISINF@ REPLACE_ISNAN = @REPLACE_ISNAN@ REPLACE_ISWCNTRL = @REPLACE_ISWCNTRL@ REPLACE_LCHOWN = @REPLACE_LCHOWN@ REPLACE_LDEXPL = @REPLACE_LDEXPL@ REPLACE_LINK = @REPLACE_LINK@ REPLACE_LINKAT = @REPLACE_LINKAT@ REPLACE_LOCALTIME_R = @REPLACE_LOCALTIME_R@ REPLACE_LSEEK = @REPLACE_LSEEK@ REPLACE_LSTAT = @REPLACE_LSTAT@ REPLACE_MBRLEN = @REPLACE_MBRLEN@ REPLACE_MBRTOWC = @REPLACE_MBRTOWC@ REPLACE_MBSINIT = @REPLACE_MBSINIT@ REPLACE_MBSNRTOWCS = @REPLACE_MBSNRTOWCS@ REPLACE_MBSRTOWCS = @REPLACE_MBSRTOWCS@ REPLACE_MBSTATE_T = @REPLACE_MBSTATE_T@ REPLACE_MEMCHR = @REPLACE_MEMCHR@ REPLACE_MEMMEM = @REPLACE_MEMMEM@ REPLACE_MKDIR = @REPLACE_MKDIR@ REPLACE_MKFIFO = @REPLACE_MKFIFO@ REPLACE_MKNOD = @REPLACE_MKNOD@ REPLACE_MKSTEMP = @REPLACE_MKSTEMP@ REPLACE_MKTIME = @REPLACE_MKTIME@ REPLACE_NAN = @REPLACE_NAN@ REPLACE_NANOSLEEP = @REPLACE_NANOSLEEP@ REPLACE_NL_LANGINFO = @REPLACE_NL_LANGINFO@ REPLACE_NULL = @REPLACE_NULL@ REPLACE_OBSTACK_PRINTF = @REPLACE_OBSTACK_PRINTF@ REPLACE_OPEN = @REPLACE_OPEN@ REPLACE_OPENAT = @REPLACE_OPENAT@ REPLACE_PERROR = @REPLACE_PERROR@ REPLACE_POPEN = @REPLACE_POPEN@ REPLACE_PREAD = @REPLACE_PREAD@ REPLACE_PRINTF = @REPLACE_PRINTF@ REPLACE_PUTENV = @REPLACE_PUTENV@ REPLACE_READLINK = @REPLACE_READLINK@ REPLACE_REALPATH = @REPLACE_REALPATH@ REPLACE_REMOVE = @REPLACE_REMOVE@ REPLACE_RENAME = @REPLACE_RENAME@ REPLACE_RENAMEAT = @REPLACE_RENAMEAT@ REPLACE_RMDIR = @REPLACE_RMDIR@ REPLACE_ROUND = @REPLACE_ROUND@ REPLACE_ROUNDF = @REPLACE_ROUNDF@ REPLACE_ROUNDL = @REPLACE_ROUNDL@ REPLACE_SELECT = @REPLACE_SELECT@ REPLACE_SETENV = @REPLACE_SETENV@ REPLACE_SIGNBIT = @REPLACE_SIGNBIT@ REPLACE_SIGNBIT_USING_GCC = @REPLACE_SIGNBIT_USING_GCC@ REPLACE_SLEEP = @REPLACE_SLEEP@ REPLACE_SNPRINTF = @REPLACE_SNPRINTF@ REPLACE_SPRINTF = @REPLACE_SPRINTF@ REPLACE_STAT = @REPLACE_STAT@ REPLACE_STDIO_WRITE_FUNCS = @REPLACE_STDIO_WRITE_FUNCS@ REPLACE_STRCASESTR = @REPLACE_STRCASESTR@ REPLACE_STRDUP = @REPLACE_STRDUP@ REPLACE_STRERROR = @REPLACE_STRERROR@ REPLACE_STRNDUP = @REPLACE_STRNDUP@ REPLACE_STRPTIME = @REPLACE_STRPTIME@ REPLACE_STRSIGNAL = @REPLACE_STRSIGNAL@ REPLACE_STRSTR = @REPLACE_STRSTR@ REPLACE_STRTOD = @REPLACE_STRTOD@ REPLACE_STRTOK_R = @REPLACE_STRTOK_R@ REPLACE_SYMLINK = @REPLACE_SYMLINK@ REPLACE_TIMEGM = @REPLACE_TIMEGM@ REPLACE_TRUNCL = @REPLACE_TRUNCL@ REPLACE_UNLINK = @REPLACE_UNLINK@ REPLACE_UNLINKAT = @REPLACE_UNLINKAT@ REPLACE_UNSETENV = @REPLACE_UNSETENV@ REPLACE_USLEEP = @REPLACE_USLEEP@ REPLACE_UTIMENSAT = @REPLACE_UTIMENSAT@ REPLACE_VASPRINTF = @REPLACE_VASPRINTF@ REPLACE_VDPRINTF = @REPLACE_VDPRINTF@ REPLACE_VFPRINTF = @REPLACE_VFPRINTF@ REPLACE_VPRINTF = @REPLACE_VPRINTF@ REPLACE_VSNPRINTF = @REPLACE_VSNPRINTF@ REPLACE_VSPRINTF = @REPLACE_VSPRINTF@ REPLACE_WCRTOMB = @REPLACE_WCRTOMB@ REPLACE_WCSNRTOMBS = @REPLACE_WCSNRTOMBS@ REPLACE_WCSRTOMBS = @REPLACE_WCSRTOMBS@ REPLACE_WCTOB = @REPLACE_WCTOB@ REPLACE_WCWIDTH = @REPLACE_WCWIDTH@ REPLACE_WRITE = @REPLACE_WRITE@ RUBY = @RUBY@ RUBY_CCFLAGS = @RUBY_CCFLAGS@ RUBY_EXEC_PREFIX = @RUBY_EXEC_PREFIX@ RUBY_INCLUDES = @RUBY_INCLUDES@ RUBY_LIBS = @RUBY_LIBS@ RUBY_PLATFORM = @RUBY_PLATFORM@ RUBY_PREFIX = @RUBY_PREFIX@ RUBY_VERSION = @RUBY_VERSION@ SED = @SED@ SERVENT_LIB = @SERVENT_LIB@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ SIG_ATOMIC_T_SUFFIX = @SIG_ATOMIC_T_SUFFIX@ SIZE_T_SUFFIX = @SIZE_T_SUFFIX@ STDBOOL_H = @STDBOOL_H@ STDDEF_H = @STDDEF_H@ STDINT_H = @STDINT_H@ STRIP = @STRIP@ SWIG = @SWIG@ SYSCONFDIR = @SYSCONFDIR@ SYS_IOCTL_H_HAVE_WINSOCK2_H = @SYS_IOCTL_H_HAVE_WINSOCK2_H@ SYS_IOCTL_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS = @SYS_IOCTL_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS@ SYS_SOCKET_H = @SYS_SOCKET_H@ SYS_TIME_H_DEFINES_STRUCT_TIMESPEC = @SYS_TIME_H_DEFINES_STRUCT_TIMESPEC@ TIME_H_DEFINES_STRUCT_TIMESPEC = @TIME_H_DEFINES_STRUCT_TIMESPEC@ UNDEFINE_STRTOK_R = @UNDEFINE_STRTOK_R@ UNISTD_H_HAVE_WINSOCK2_H = @UNISTD_H_HAVE_WINSOCK2_H@ UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS = @UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS@ VALGRIND = @VALGRIND@ VERSION = @VERSION@ WCHAR_T_SUFFIX = @WCHAR_T_SUFFIX@ WCTYPE_H = @WCTYPE_H@ WINT_T_SUFFIX = @WINT_T_SUFFIX@ YACC = @YACC@ YFLAGS = @YFLAGS@ YIELD_LIB = @YIELD_LIB@ __PRELUDE_64BIT_FORMAT_PREFIX = @__PRELUDE_64BIT_FORMAT_PREFIX@ __PRELUDE_HAVE_64BIT_LONG = @__PRELUDE_HAVE_64BIT_LONG@ __PRELUDE_HAVE_INTTYPES_H = @__PRELUDE_HAVE_INTTYPES_H@ __PRELUDE_HAVE_STDINT_H = @__PRELUDE_HAVE_STDINT_H@ __PRELUDE_STDINT_HAVE_UINT16 = @__PRELUDE_STDINT_HAVE_UINT16@ __PRELUDE_STDINT_HAVE_UINT32 = @__PRELUDE_STDINT_HAVE_UINT32@ __PRELUDE_STDINT_HAVE_UINT64 = @__PRELUDE_STDINT_HAVE_UINT64@ __PRELUDE_STDINT_HAVE_UINT8 = @__PRELUDE_STDINT_HAVE_UINT8@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ gl_LIBOBJS = @gl_LIBOBJS@ gl_LTLIBOBJS = @gl_LTLIBOBJS@ gltests_LIBOBJS = @gltests_LIBOBJS@ gltests_LTLIBOBJS = @gltests_LTLIBOBJS@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = $(prefix)/include/libprelude infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ lt_ECHO = @lt_ECHO@ ltdl_LIBOBJS = @ltdl_LIBOBJS@ ltdl_LTLIBOBJS = @ltdl_LTLIBOBJS@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ pkgrbexecdir = @pkgrbexecdir@ pkgrubydir = @pkgrubydir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ rbexecdir = @rbexecdir@ rubydir = @rubydir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sys_symbol_underscore = @sys_symbol_underscore@ sysconfdir = @sysconfdir@ target = @target@ target_alias = @target_alias@ target_cpu = @target_cpu@ target_os = @target_os@ target_vendor = @target_vendor@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ include_HEADERS = \ prelude-error.hxx \ idmef.hxx \ idmef-criteria.hxx \ idmef-path.hxx \ idmef-time.hxx \ idmef-value.hxx \ prelude.hxx \ prelude-client.hxx \ prelude-client-easy.hxx \ prelude-client-profile.hxx \ prelude-connection.hxx \ prelude-connection-pool.hxx \ prelude-log.hxx all: all-am .SUFFIXES: $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu bindings/c++/include/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu bindings/c++/include/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs install-includeHEADERS: $(include_HEADERS) @$(NORMAL_INSTALL) test -z "$(includedir)" || $(MKDIR_P) "$(DESTDIR)$(includedir)" @list='$(include_HEADERS)'; test -n "$(includedir)" || list=; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ done | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_HEADER) $$files '$(DESTDIR)$(includedir)'"; \ $(INSTALL_HEADER) $$files "$(DESTDIR)$(includedir)" || exit $$?; \ done uninstall-includeHEADERS: @$(NORMAL_UNINSTALL) @list='$(include_HEADERS)'; test -n "$(includedir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ test -n "$$files" || exit 0; \ echo " ( cd '$(DESTDIR)$(includedir)' && rm -f" $$files ")"; \ cd "$(DESTDIR)$(includedir)" && rm -f $$files ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ mkid -fID $$unique tags: TAGS TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) set x; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: CTAGS CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(HEADERS) installdirs: for dir in "$(DESTDIR)$(includedir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic clean-libtool mostlyclean-am distclean: distclean-am -rm -f Makefile distclean-am: clean-am distclean-generic distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-includeHEADERS install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-generic mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-includeHEADERS .MAKE: install-am install-strip .PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ clean-libtool ctags distclean distclean-generic \ distclean-libtool distclean-tags distdir dvi dvi-am html \ html-am info info-am install install-am install-data \ install-data-am install-dvi install-dvi-am install-exec \ install-exec-am install-html install-html-am \ install-includeHEADERS install-info install-info-am \ install-man install-pdf install-pdf-am install-ps \ install-ps-am install-strip installcheck installcheck-am \ installdirs maintainer-clean maintainer-clean-generic \ mostlyclean mostlyclean-generic mostlyclean-libtool pdf pdf-am \ ps ps-am tags uninstall uninstall-am uninstall-includeHEADERS -include $(top_srcdir)/git.mk # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: libprelude-1.0.0/bindings/c++/include/idmef-criteria.hxx0000664000076400007640000000712411324463744020013 00000000000000/***** * * Copyright (C) 2008 PreludeIDS Technologies. All Rights Reserved. * Author: Yoann Vandoorselaere * * This file is part of the Prelude library. * * 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; see the file COPYING. If not, write to * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. * *****/ #ifndef _LIBPRELUDE_IDMEF_CRITERIA_HXX #define _LIBPRELUDE_IDMEF_CRITERIA_HXX #include #include "prelude.h" #include "idmef.hxx" namespace Prelude { class IDMEFCriterion { public: enum IDMEFCriterionOperatorEnum { OPERATOR_NOT = IDMEF_CRITERION_OPERATOR_NOT, OPERATOR_NOCASE = IDMEF_CRITERION_OPERATOR_NOCASE, OPERATOR_EQUAL = IDMEF_CRITERION_OPERATOR_EQUAL, OPERATOR_EQUAL_NOCASE = IDMEF_CRITERION_OPERATOR_EQUAL_NOCASE, OPERATOR_NOT_EQUAL = IDMEF_CRITERION_OPERATOR_NOT_EQUAL, OPERATOR_NOT_EQUAL_NOCASE = IDMEF_CRITERION_OPERATOR_NOT_EQUAL_NOCASE, OPERATOR_LESSER = IDMEF_CRITERION_OPERATOR_LESSER, OPERATOR_LESSER_OR_EQUAL = IDMEF_CRITERION_OPERATOR_LESSER_OR_EQUAL, OPERATOR_GREATER = IDMEF_CRITERION_OPERATOR_GREATER, OPERATOR_GREATER_OR_EQUAL = IDMEF_CRITERION_OPERATOR_GREATER_OR_EQUAL, OPERATOR_SUBSTR = IDMEF_CRITERION_OPERATOR_SUBSTR, OPERATOR_SUBSTR_NOCASE = IDMEF_CRITERION_OPERATOR_SUBSTR_NOCASE, OPERATOR_NOT_SUBSTR = IDMEF_CRITERION_OPERATOR_NOT_SUBSTR, OPERATOR_NOT_SUBSTR_NOCASE = IDMEF_CRITERION_OPERATOR_NOT_SUBSTR_NOCASE, OPERATOR_REGEX = IDMEF_CRITERION_OPERATOR_REGEX, OPERATOR_REGEX_NOCASE = IDMEF_CRITERION_OPERATOR_REGEX_NOCASE, OPERATOR_NOT_REGEX = IDMEF_CRITERION_OPERATOR_NOT_REGEX, OPERATOR_NOT_REGEX_NOCASE = IDMEF_CRITERION_OPERATOR_NOT_REGEX_NOCASE, OPERATOR_NULL = IDMEF_CRITERION_OPERATOR_NULL, OPERATOR_NOT_NULL = IDMEF_CRITERION_OPERATOR_NOT_NULL }; }; class IDMEFCriteria { private: idmef_criteria_t *_criteria; public: ~IDMEFCriteria(); IDMEFCriteria(); IDMEFCriteria(const IDMEFCriteria &criteria); IDMEFCriteria(const char *criteria); IDMEFCriteria(const std::string &criteria); IDMEFCriteria(idmef_criteria_t *criteria); int Match(Prelude::IDMEF *message); IDMEFCriteria Clone(); void ANDCriteria(const IDMEFCriteria &criteria); void ORCriteria(const IDMEFCriteria &criteria); const std::string ToString() const; operator const std::string() const; IDMEFCriteria &operator=(const IDMEFCriteria &criteria); }; }; #endif libprelude-1.0.0/bindings/c++/include/idmef.hxx0000664000076400007640000000462711324402502016201 00000000000000#ifndef _LIBPRELUDE_IDMEF_HXX #define _LIBPRELUDE_IDMEF_HXX #include #include #include "idmef-value.hxx" #include "idmef-time.hxx" namespace Prelude { class IDMEF; } std::ostream & operator <<(std::ostream &os, const Prelude::IDMEF &idmef); std::istream & operator >>(std::istream &is, Prelude::IDMEF &idmef); namespace Prelude { class Client; class IDMEF { friend std::ostream & ::operator <<(std::ostream &os, const IDMEF &idmef); friend std::istream & ::operator >>(std::istream &is, IDMEF &idmef); protected: idmef_message_t *_message; public: ~IDMEF(); IDMEF(); IDMEF(const IDMEF &idmef); IDMEF(idmef_message_t *message); void Set(const char *path, std::vector value); void Set(const char *path, Prelude::IDMEFValue *value); void Set(const char *path, Prelude::IDMEFValue &value); void Set(const char *path, Prelude::IDMEFTime &value); void Set(const char *path, const char *value); void Set(const char *path, std::string value); void Set(const char *path, int8_t value); void Set(const char *path, uint8_t value); void Set(const char *path, int16_t value); void Set(const char *path, uint16_t value); void Set(const char *path, int32_t value); void Set(const char *path, uint32_t value); void Set(const char *path, int64_t value); void Set(const char *path, uint64_t value); void Set(const char *path, float value); void Set(const char *path, double value); Prelude::IDMEFValue Get(const char *path); #ifndef SWIG size_t _genericWrite(int (write_cb)(prelude_msgbuf_t *msgbuf, prelude_msg_t *msg), void *fd_data) const; void _genericRead(ssize_t (read_cb)(prelude_io_t *fd, void *buf, size_t size), void *fd_data); #endif IDMEF Clone(const IDMEF &idmef); const std::string ToString() const; operator const std::string() const; operator idmef_message_t *() const; IDMEF &operator = (const IDMEF &idmef); }; }; #endif /* __LIBPRELUDE_IDMEF_HXX */ libprelude-1.0.0/bindings/c++/include/prelude-client.hxx0000664000076400007640000000575311202225026020031 00000000000000#ifndef _LIBPRELUDE_PRELUDE_CLIENT_HXX #define _LIBPRELUDE_PRELUDE_CLIENT_HXX #include "idmef.hxx" #include "prelude-connection-pool.hxx" #include "prelude-client-profile.hxx" namespace Prelude { class IDMEF; class Client : public ClientProfile { private: prelude_client_t *_client; ConnectionPool _pool; protected: int _recv_timeout; public: enum ClientFlagsEnum { ASYNC_SEND = PRELUDE_CLIENT_FLAGS_ASYNC_SEND, FLAGS_ASYNC_SEND = PRELUDE_CLIENT_FLAGS_ASYNC_SEND, ASYNC_TIMER = PRELUDE_CLIENT_FLAGS_ASYNC_TIMER, FLAGS_ASYNC_TIMER = PRELUDE_CLIENT_FLAGS_ASYNC_TIMER, HEARTBEAT = PRELUDE_CLIENT_FLAGS_HEARTBEAT, FLAGS_HEARTBEAT = PRELUDE_CLIENT_FLAGS_HEARTBEAT, CONNECT = PRELUDE_CLIENT_FLAGS_CONNECT, FLAGS_CONNECT = PRELUDE_CLIENT_FLAGS_CONNECT, AUTOCONFIG = PRELUDE_CLIENT_FLAGS_AUTOCONFIG, FLAGS_AUTOCONFIG = PRELUDE_CLIENT_FLAGS_AUTOCONFIG, }; enum ConnectionPermissionEnum { IDMEF_READ = PRELUDE_CONNECTION_PERMISSION_IDMEF_READ, PERMISSION_IDMEF_READ = PRELUDE_CONNECTION_PERMISSION_IDMEF_READ, ADMIN_READ = PRELUDE_CONNECTION_PERMISSION_ADMIN_READ, PERMISSION_ADMIN_READ = PRELUDE_CONNECTION_PERMISSION_ADMIN_READ, IDMEF_WRITE = PRELUDE_CONNECTION_PERMISSION_IDMEF_WRITE, PERMISSION_IDMEF_WRITE = PRELUDE_CONNECTION_PERMISSION_IDMEF_WRITE, ADMIN_WRITE = PRELUDE_CONNECTION_PERMISSION_ADMIN_WRITE, PERMISSION_ADMIN_WRITE = PRELUDE_CONNECTION_PERMISSION_ADMIN_WRITE, }; ~Client(); Client(const char *profile); Client(const Client &client); void Start(); void Init(); prelude_client_t *GetClient(); void SendIDMEF(const Prelude::IDMEF &message); int RecvIDMEF(Prelude::IDMEF &idmef, int timeout=-1); int GetFlags(); void SetFlags(int flags); int GetRequiredPermission(); void SetRequiredPermission(int permission); const char *GetConfigFilename(); void SetConfigFilename(const char *name); Prelude::ConnectionPool &GetConnectionPool(); void SetConnectionPool(Prelude::ConnectionPool pool); Client &operator << (Prelude::IDMEF &idmef); Client &operator >> (Prelude::IDMEF &idmef); Client &operator=(const Client &p); static Client &SetRecvTimeout(Client &c, int timeout); }; }; #endif libprelude-1.0.0/bindings/c++/include/prelude-error.hxx0000664000076400007640000000333711202225026017700 00000000000000/***** * * Copyright (C) 2008 PreludeIDS Technologies. All Rights Reserved. * Author: Yoann Vandoorselaere * * This file is part of the Prelude library. * * 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; see the file COPYING. If not, write to * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. * *****/ #ifndef _LIBPRELUDE_PRELUDE_ERROR_HXX #define _LIBPRELUDE_PRELUDE_ERROR_HXX #include #include #define prelude_except_if_fail(cond) do { \ if ( ! (cond) ) \ throw PreludeError(prelude_error(PRELUDE_ERROR_ASSERTION)); \ } while(0) namespace Prelude { class PreludeError: public std::exception { private: int _error; std::string _message; public: virtual ~PreludeError() throw() {}; PreludeError(int error) throw(); PreludeError(const std::string message) throw(); virtual const char *what() const throw(); operator const char *(); operator const std::string() const; }; }; #endif libprelude-1.0.0/bindings/c++/include/prelude-client-profile.hxx0000664000076400007640000000374511202225026021466 00000000000000#ifndef __PRELUDE_CLIENT_PROFILE__ #define __PRELUDE_CLIENT_PROFILE__ #include #include "prelude.h" namespace Prelude { class ClientProfile { protected: bool _own_data; prelude_client_profile_t *_profile; public: ClientProfile(); ClientProfile(const char *profile); ClientProfile(prelude_client_profile_t * profile); ClientProfile(const ClientProfile &p); ~ClientProfile(); int GetUid() { return (int)prelude_client_profile_get_uid(_profile); } int GetGid() { return (int)prelude_client_profile_get_gid(_profile); } const char *GetName() { return prelude_client_profile_get_name(_profile); } int SetName(const char *name) { return prelude_client_profile_set_name(_profile,name); } /* XXX uint64_t has to be converted */ uint64_t GetAnalyzerId() { return prelude_client_profile_get_analyzerid(_profile); } void GetAnalyzerId(uint64_t id) { prelude_client_profile_set_analyzerid(_profile,id); } const std::string GetConfigFilename(); const std::string GetAnalyzeridFilename(); const std::string GetTlsKeyFilename(); const std::string GetTlsServerCaCertFilename(); const std::string GetTlsServerKeyCertFilename(); const std::string GetTlsServerCrlFilename(); const std::string GetTlsClientKeyCertFilename(); const std::string GetTlsClientTrustedCertFilename(); const std::string GetBackupDirname(); const std::string GetProfileDirname(); void SetPrefix(const char *prefix); const std::string GetPrefix(); operator prelude_client_profile_t *() const; ClientProfile &operator=(const ClientProfile &p); }; }; #endif libprelude-1.0.0/bindings/c++/include/idmef-time.hxx0000664000076400007640000000502411202225026017124 00000000000000/***** * * Copyright (C) 2008 PreludeIDS Technologies. All Rights Reserved. * Author: Yoann Vandoorselaere * * This file is part of the Prelude library. * * 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; see the file COPYING. If not, write to * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. * *****/ #ifndef _LIBPRELUDE_IDMEF_TIME_HXX #define _LIBPRELUDE_IDMEF_TIME_HXX #include "prelude.h" namespace Prelude { class IDMEFTime { protected: idmef_time_t *_time; public: IDMEFTime(); IDMEFTime(idmef_time_t *time); IDMEFTime(const time_t *time); IDMEFTime(const char *string); IDMEFTime(const struct timeval *tv); IDMEFTime(const IDMEFTime &value); ~IDMEFTime(); void Set(); void Set(const time_t *time); void Set(const char *string); void Set(const struct timeval *tv); void SetSec(uint32_t sec); void SetUSec(uint32_t usec); void SetGmtOffset(int32_t gmtoff); uint32_t GetSec() const; uint32_t GetUSec() const; int32_t GetGmtOffset() const; IDMEFTime Clone(); const std::string ToString() const; operator int() const; operator long() const; operator double() const; operator const std::string() const; operator idmef_time_t *() const; bool operator != (const IDMEFTime &time); bool operator >= (const IDMEFTime &time); bool operator <= (const IDMEFTime &time); bool operator == (const IDMEFTime &time); bool operator > (const IDMEFTime &time); bool operator < (const IDMEFTime &time); IDMEFTime & operator = (const IDMEFTime &p); }; }; #endif libprelude-1.0.0/bindings/c++/prelude-client-easy.cxx0000664000076400007640000000312511202225026017327 00000000000000#include "idmef.hxx" #include "prelude-client-profile.hxx" #include "prelude-client-easy.hxx" #include "prelude-error.hxx" using namespace Prelude; void ClientEasy::setup_analyzer(idmef_analyzer_t *analyzer, const char *_model, const char *_class, const char *_manufacturer, const char *_version) { int ret; prelude_string_t *string; ret = idmef_analyzer_new_model(analyzer, &string); if ( ret < 0 ) throw PreludeError(ret); prelude_string_set_ref(string, _model); ret = idmef_analyzer_new_class(analyzer, &string); if ( ret < 0 ) throw PreludeError(ret); prelude_string_set_ref(string, _class); ret = idmef_analyzer_new_manufacturer(analyzer, &string); if ( ret < 0 ) throw PreludeError(ret); prelude_string_set_ref(string, _manufacturer); ret = idmef_analyzer_new_version(analyzer, &string); if ( ret < 0 ) throw PreludeError(ret); prelude_string_set_ref(string, _version); } ClientEasy::ClientEasy(const char *profile, int permission, const char *_model, const char *_class, const char *_manufacturer, const char *_version) : Client(profile) { SetRequiredPermission(permission); SetFlags(GetFlags() | Client::FLAGS_ASYNC_TIMER); setup_analyzer(prelude_client_get_analyzer(GetClient()), _model, _class, _manufacturer, _version); } libprelude-1.0.0/bindings/c++/prelude-client-profile.cxx0000664000076400007640000000711711202225026020033 00000000000000#include "prelude-error.hxx" #include "prelude-client-profile.h" #include "prelude-client-profile.hxx" using namespace Prelude; #define _RETURN_NEW_BUFFER_FROM_FUNCTION_BUFFERSIZE(function) do { \ char buf[PATH_MAX]; \ \ (function)(_profile, buf, sizeof(buf)); \ \ return std::string(buf); \ } while(0) ClientProfile::ClientProfile() { _profile = NULL; } ClientProfile::ClientProfile(prelude_client_profile_t *profile) : _profile(profile) { _profile = profile; } ClientProfile::ClientProfile(const char *profile) { int ret; ret = prelude_client_profile_new(&_profile, profile); if ( ret < 0 ) throw PreludeError(ret); } ClientProfile::ClientProfile(const ClientProfile &p) { _profile = (p._profile) ? prelude_client_profile_ref(p._profile) : NULL; } ClientProfile::~ClientProfile() { if ( _profile ) prelude_client_profile_destroy(_profile); } const std::string ClientProfile::GetConfigFilename() { _RETURN_NEW_BUFFER_FROM_FUNCTION_BUFFERSIZE(prelude_client_profile_get_config_filename); } const std::string ClientProfile::GetAnalyzeridFilename() { _RETURN_NEW_BUFFER_FROM_FUNCTION_BUFFERSIZE(prelude_client_profile_get_analyzerid_filename); } const std::string ClientProfile::GetTlsKeyFilename() { _RETURN_NEW_BUFFER_FROM_FUNCTION_BUFFERSIZE(prelude_client_profile_get_tls_key_filename); } const std::string ClientProfile::GetTlsServerCaCertFilename() { _RETURN_NEW_BUFFER_FROM_FUNCTION_BUFFERSIZE(prelude_client_profile_get_tls_server_ca_cert_filename); } const std::string ClientProfile::GetTlsServerKeyCertFilename() { _RETURN_NEW_BUFFER_FROM_FUNCTION_BUFFERSIZE(prelude_client_profile_get_tls_server_keycert_filename); } const std::string ClientProfile::GetTlsServerCrlFilename() { _RETURN_NEW_BUFFER_FROM_FUNCTION_BUFFERSIZE(prelude_client_profile_get_tls_server_crl_filename); } const std::string ClientProfile::GetTlsClientKeyCertFilename() { _RETURN_NEW_BUFFER_FROM_FUNCTION_BUFFERSIZE(prelude_client_profile_get_tls_client_keycert_filename); } const std::string ClientProfile::GetTlsClientTrustedCertFilename() { _RETURN_NEW_BUFFER_FROM_FUNCTION_BUFFERSIZE(prelude_client_profile_get_tls_client_trusted_cert_filename); } const std::string ClientProfile::GetBackupDirname() { _RETURN_NEW_BUFFER_FROM_FUNCTION_BUFFERSIZE(prelude_client_profile_get_backup_dirname); } const std::string ClientProfile::GetProfileDirname() { _RETURN_NEW_BUFFER_FROM_FUNCTION_BUFFERSIZE(prelude_client_profile_get_profile_dirname); } void ClientProfile::SetPrefix(const char *prefix) { int ret; ret = prelude_client_profile_set_prefix(_profile, prefix); if ( ret < 0 ) throw PreludeError(ret); } const std::string ClientProfile::GetPrefix() { _RETURN_NEW_BUFFER_FROM_FUNCTION_BUFFERSIZE(prelude_client_profile_get_prefix); } ClientProfile::operator prelude_client_profile_t *() const { return _profile; } ClientProfile &ClientProfile::operator=(const ClientProfile &p) { if ( this != &p && _profile != p._profile ) { if ( _profile ) prelude_client_profile_destroy(_profile); _profile = (p._profile) ? prelude_client_profile_ref(p._profile) : NULL; } return *this; } libprelude-1.0.0/bindings/c++/idmef-path.cxx0000664000076400007640000001722311324402502015477 00000000000000/***** * * Copyright (C) 2008 PreludeIDS Technologies. All Rights Reserved. * Author: Yoann Vandoorselaere * * This file is part of the Prelude library. * * 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; see the file COPYING. If not, write to * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. * *****/ #include "idmef.hxx" #include "idmef-path.hxx" #include "prelude-error.hxx" using namespace Prelude; IDMEFPath::IDMEFPath(const char *buffer) { int ret; ret = idmef_path_new_fast(&_path, buffer); if ( ret < 0 ) throw PreludeError(ret); } IDMEFPath::IDMEFPath(idmef_path_t *path) { _path = path; } IDMEFPath::IDMEFPath(const IDMEFPath &path) { _path = (path._path) ? idmef_path_ref(path._path) : NULL; } IDMEFPath::~IDMEFPath() { idmef_path_destroy(_path); } IDMEFValue IDMEFPath::Get(IDMEF &message) { int ret; idmef_value_t *value; ret = idmef_path_get(_path, message, &value); if ( ret < 0 ) throw PreludeError(ret); else if ( ret == 0 ) return IDMEFValue((idmef_value_t *) NULL); return IDMEFValue(value); } idmef_value_type_id_t IDMEFPath::GetValueType(int depth) { return idmef_path_get_value_type(_path, depth); } int IDMEFPath::CheckOperator(idmef_criterion_operator_t op) { return idmef_path_check_operator(_path, op); } idmef_criterion_operator_t IDMEFPath::GetApplicableOperators() { int ret; idmef_criterion_operator_t res; ret = idmef_path_get_applicable_operators(_path, &res); if ( ret < 0 ) throw PreludeError(ret); return res; } void IDMEFPath::Set(IDMEF &message, IDMEFValue *value) { int ret; if ( ! value ) ret = idmef_path_set(_path, message, NULL); else ret = idmef_path_set(_path, message, *value); if ( ret < 0 ) throw PreludeError(ret); } void IDMEFPath::Set(IDMEF &message, std::vector value) { int ret; IDMEFValue v = value; ret = idmef_path_set(_path, message, v); if ( ret < 0 ) throw PreludeError(ret); } void IDMEFPath::Set(IDMEF &message, IDMEFValue &value) { int ret; ret = idmef_path_set(_path, message, value); if ( ret < 0 ) throw PreludeError(ret); } void IDMEFPath::Set(IDMEF &message, std::string value) { int ret; ret = idmef_path_set(_path, message, IDMEFValue(value)); if ( ret < 0 ) throw PreludeError(ret); } void IDMEFPath::Set(IDMEF &message, const char *value) { int ret; if ( value ) ret = idmef_path_set(_path, message, IDMEFValue(value)); else ret = idmef_path_set(_path, message, (idmef_value_t *) NULL); if ( ret < 0 ) throw PreludeError(ret); } void IDMEFPath::Set(IDMEF &message, int8_t value) { int ret; ret = idmef_path_set(_path, message, IDMEFValue(value)); if ( ret < 0 ) throw PreludeError(ret); } void IDMEFPath::Set(IDMEF &message, uint8_t value) { int ret; ret = idmef_path_set(_path, message, IDMEFValue(value)); if ( ret < 0 ) throw PreludeError(ret); } void IDMEFPath::Set(IDMEF &message, int16_t value) { int ret; ret = idmef_path_set(_path, message, IDMEFValue(value)); if ( ret < 0 ) throw PreludeError(ret); } void IDMEFPath::Set(IDMEF &message, uint16_t value) { int ret; ret = idmef_path_set(_path, message, IDMEFValue(value)); if ( ret < 0 ) throw PreludeError(ret); } void IDMEFPath::Set(IDMEF &message, int32_t value) { int ret; ret = idmef_path_set(_path, message, IDMEFValue(value)); if ( ret < 0 ) throw PreludeError(ret); } void IDMEFPath::Set(IDMEF &message, uint32_t value) { int ret; ret = idmef_path_set(_path, message, IDMEFValue(value)); if ( ret < 0 ) throw PreludeError(ret); } void IDMEFPath::Set(IDMEF &message, int64_t value) { int ret; ret = idmef_path_set(_path, message, IDMEFValue(value)); if ( ret < 0 ) throw PreludeError(ret); } void IDMEFPath::Set(IDMEF &message, uint64_t value) { int ret; ret = idmef_path_set(_path, message, IDMEFValue(value)); if ( ret < 0 ) throw PreludeError(ret); } void IDMEFPath::Set(IDMEF &message, float value) { int ret; ret = idmef_path_set(_path, message, IDMEFValue(value)); if ( ret < 0 ) throw PreludeError(ret); } void IDMEFPath::Set(IDMEF &message, double value) { int ret; ret = idmef_path_set(_path, message, IDMEFValue(value)); if ( ret < 0 ) throw PreludeError(ret); } void IDMEFPath::Set(IDMEF &message, IDMEFTime &time) { int ret; ret = idmef_path_set(_path, message, IDMEFValue(time)); if ( ret < 0 ) throw PreludeError(ret); } idmef_class_id_t IDMEFPath::GetClass(int depth) { return idmef_path_get_class(_path, depth); } int IDMEFPath::SetIndex(unsigned int index, int depth) { if ( depth < 0 ) depth = GetDepth(); return idmef_path_set_index(_path, depth, index); } int IDMEFPath::UndefineIndex(int depth) { if ( depth < 0 ) depth = GetDepth(); return idmef_path_undefine_index(_path, depth); } int IDMEFPath::GetIndex(int depth) { if ( depth < 0 ) depth = GetDepth(); return idmef_path_get_index(_path, depth); } int IDMEFPath::MakeChild(const char *child_name, unsigned int index=0) { return idmef_path_make_child(_path, child_name, index); } int IDMEFPath::MakeParent() { return idmef_path_make_parent(_path); } int IDMEFPath::Compare(IDMEFPath *path, int depth) { int ret; if ( depth < 0 ) ret = idmef_path_compare(_path, path->_path); else ret = idmef_path_ncompare(_path, path->_path, depth); return ret; } IDMEFPath IDMEFPath::Clone() { int ret; idmef_path_t *cpath; ret = idmef_path_clone(_path, &cpath); if ( ret < 0 ) throw PreludeError(ret); return IDMEFPath(cpath); } const char *IDMEFPath::GetName(int depth) { return idmef_path_get_name(_path, depth); } bool IDMEFPath::IsAmbiguous() { return idmef_path_is_ambiguous(_path); } int IDMEFPath::HasLists() { return idmef_path_has_lists(_path); } bool IDMEFPath::IsList(int depth) { return idmef_path_is_list(_path, depth); } unsigned int IDMEFPath::GetDepth() { return idmef_path_get_depth(_path); } IDMEFPath &IDMEFPath::operator=(const IDMEFPath &path) { if ( this != &path && _path != path._path ) { if ( _path ) idmef_path_destroy(_path); _path = (path._path) ? idmef_path_ref(path._path) : NULL; } return *this; } libprelude-1.0.0/bindings/c++/prelude-connection-pool.cxx0000664000076400007640000001031211212160566020224 00000000000000/***** * * Copyright (C) 2008 PreludeIDS Technologies. All Rights Reserved. * Author: Yoann Vandoorselaere * * This file is part of the Prelude library. * * 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; see the file COPYING. If not, write to * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. * *****/ #include #include "prelude.h" #include "prelude-connection-pool.h" #include "prelude-connection-pool.hxx" #include "prelude-client.hxx" #include "prelude-error.hxx" using namespace Prelude; ConnectionPool::~ConnectionPool() { if ( _pool ) prelude_connection_pool_destroy(_pool); } ConnectionPool::ConnectionPool() { _pool = NULL; } ConnectionPool::ConnectionPool(prelude_connection_pool_t *pool) { _pool = pool; } ConnectionPool::ConnectionPool(const ConnectionPool &con) { _pool = (con._pool) ? prelude_connection_pool_ref(con._pool) : NULL; } ConnectionPool::ConnectionPool(ClientProfile &cp, int permission) { int ret; ret = prelude_connection_pool_new(&_pool, cp, (prelude_connection_permission_t) permission); if ( ret < 0 ) throw PreludeError(ret); } void ConnectionPool::Init() { int ret; ret = prelude_connection_pool_init(_pool); if ( ret < 0 ) throw PreludeError(ret); } std::vector ConnectionPool::GetConnectionList() { std::vector clist; prelude_connection_t *con; prelude_list_t *head, *tmp; head = prelude_connection_pool_get_connection_list(_pool); prelude_list_for_each(head, tmp) { con = (prelude_connection_t *) prelude_linked_object_get_object(tmp); clist.push_back(Connection(prelude_connection_ref(con))); } return clist; } void ConnectionPool::AddConnection(Connection con) { prelude_connection_pool_add_connection(_pool, prelude_connection_ref(con)); } void ConnectionPool::DelConnection(Connection con) { prelude_connection_pool_del_connection(_pool, con); } void ConnectionPool::SetConnectionDead(Connection &con) { prelude_connection_pool_set_connection_dead(_pool, con); } void ConnectionPool::SetConnectionAlive(Connection &con) { prelude_connection_pool_set_connection_alive(_pool, con); } void ConnectionPool::SetConnectionString(const char *str) { int ret; ret = prelude_connection_pool_set_connection_string(_pool, str); if ( ret < 0 ) throw PreludeError(ret); } const char *ConnectionPool::GetConnectionString() { return prelude_connection_pool_get_connection_string(_pool); } int ConnectionPool::GetFlags() { return prelude_connection_pool_get_flags(_pool); } void ConnectionPool::SetFlags(int flags) { prelude_connection_pool_set_flags(_pool, (prelude_connection_pool_flags_t) flags); } void ConnectionPool::SetRequiredPermission(int permission) { prelude_connection_pool_set_required_permission(_pool, (prelude_connection_permission_t) permission); } void ConnectionPool::SetData(void *data) { prelude_connection_pool_set_data(_pool, data); } void *ConnectionPool::GetData() { return prelude_connection_pool_get_data(_pool); } ConnectionPool &ConnectionPool::operator=(const ConnectionPool &pool) { if ( this != &pool && _pool != pool._pool ) { if ( _pool ) prelude_connection_pool_destroy(_pool); _pool = (pool._pool) ? prelude_connection_pool_ref(pool._pool) : NULL; } return *this; } ConnectionPool::operator prelude_connection_pool_t *() { return _pool; } libprelude-1.0.0/bindings/perl/0000775000076400007640000000000011347714754013426 500000000000000libprelude-1.0.0/bindings/perl/libpreludecpp-perl.i0000664000076400007640000001156111324402501017271 00000000000000# Exception map %typemap(throws) Prelude::PreludeError %{ SWIG_exception(SWIG_RuntimeError, $1.what()); %}; # Conversion not allowed %ignore *::operator =; %ignore *::operator int() const; %ignore *::operator long() const; %ignore *::operator int32_t() const; %ignore *::operator uint32_t() const; %ignore *::operator int64_t() const; %ignore *::operator uint64_t() const; %ignore *::operator float() const; %ignore *::operator double() const; %ignore *::operator Prelude::IDMEFTime() const; %ignore *::operator const std::string() const; %ignore *::operator const char *() const; %header %{ #define TARGET_LANGUAGE_OUTPUT_TYPE SV ** int IDMEFValue_to_SWIG(const IDMEFValue &result, TARGET_LANGUAGE_OUTPUT_TYPE ret); %} %fragment("IDMEFValueList_to_SWIG", "header") { SV *IDMEFValueList_to_SWIG(const Prelude::IDMEFValue &value) { int j = 0, ret; std::vector result = value; std::vector::const_iterator i; AV *myav; SV *svret, **svs = new SV*[result.size()]; for ( i = result.begin(); i != result.end(); i++ ) { ret = IDMEFValue_to_SWIG(*i, &svs[j++]); if ( ret < 0 ) return NULL; } myav = av_make(result.size(), svs); delete[] svs; svret = newRV_noinc((SV*) myav); sv_2mortal(svret); return svret; } } /* tell squid not to cast void * value */ %typemap(in) void *nocast_p { $1 = $input; } %fragment("TransitionFunc", "header") { static SV *__prelude_log_func; static gl_thread_t __initial_thread; static void _cb_perl_log(int level, const char *str) { if ( (gl_thread_t) gl_thread_self() != __initial_thread ) return; dSP; ENTER; SAVETMPS; PUSHMARK(SP); XPUSHs(SWIG_From_int(level)); XPUSHs(SWIG_FromCharPtr(str)); PUTBACK; perl_call_sv(__prelude_log_func, G_VOID); FREETMPS; LEAVE; } static int _cb_perl_write(prelude_msgbuf_t *fd, prelude_msg_t *msg) { int ret; PerlIO *io = (PerlIO *) prelude_msgbuf_get_data(fd); ret = PerlIO_write(io, (const char *) prelude_msg_get_message_data(msg), prelude_msg_get_len(msg)); if ( ret != prelude_msg_get_len(msg) ) return prelude_error_from_errno(errno); prelude_msg_recycle(msg); return 0; } static ssize_t _cb_perl_read(prelude_io_t *fd, void *buf, size_t size) { int ret; PerlIO *io = (PerlIO *) prelude_io_get_fdptr(fd); ret = PerlIO_read(io, buf, size); if ( ret < 0 ) ret = prelude_error_from_errno(errno); else if ( ret == 0 ) ret = prelude_error(PRELUDE_ERROR_EOF); return ret; } }; %typemap(in, fragment="TransitionFunc") void (*log_cb)(int level, const char *log) { if ( __prelude_log_func ) SvREFCNT_dec(__prelude_log_func); __prelude_log_func = $input; SvREFCNT_inc($input); $1 = _cb_perl_log; }; %extend Prelude::IDMEF { void Write(void *nocast_p) { PerlIO *io = IoIFP(sv_2io((SV *) nocast_p)); self->_genericWrite(_cb_perl_write, io); } void Read(void *nocast_p) { PerlIO *io = IoIFP(sv_2io((SV *) nocast_p)); self->_genericRead(_cb_perl_read, io); } } %typemap(out, fragment="IDMEFValue_to_SWIG") Prelude::IDMEFValue { int ret; if ( $1.IsNull() ) { SvREFCNT_inc (& PL_sv_undef); $result = &PL_sv_undef; } else { SV *mysv; ret = IDMEFValue_to_SWIG($1, &mysv); if ( ret < 0 ) { std::stringstream s; s << "IDMEFValue typemap does not handle value of type '" << idmef_value_type_to_string($1.GetType()) << "'"; SWIG_exception_fail(SWIG_ValueError, s.str().c_str()); } $result = mysv; } argvi++; }; %init { STRLEN len; char **argv; int j, argc = 1, ret; AV *pargv = get_av("ARGV", FALSE); __initial_thread = (gl_thread_t) gl_thread_self(); ret = av_len(pargv); if ( ret >= 0 ) argc += ret + 1; if ( argc + 1 < 0 ) throw PreludeError("Invalide argc length"); argv = (char **) malloc((argc + 1) * sizeof(char *)); if ( ! argv ) throw PreludeError("Allocation failure"); argv[0] = SvPV(get_sv("0", FALSE), len); for ( j = 0; j < ret + 1; j++ ) argv[j + 1] = SvPV(*av_fetch(pargv, j, FALSE), len); argv[j + 1] = NULL; ret = prelude_init(&argc, argv); if ( ret < 0 ) { free(argv); throw PreludeError(ret); } free(argv); } libprelude-1.0.0/bindings/perl/Makefile.PL.in0000664000076400007640000000325511330563440015714 00000000000000use Config; use ExtUtils::MakeMaker; use ExtUtils::MM_Unix; use File::Copy; use Cwd "abs_path"; my %attributs = (NAME => 'PreludeEasy', INC => '-I@top_srcdir@ -I@top_builddir@/src/include -I@top_srcdir@/src/include -I@top_builddir@/src/libprelude-error -I@top_srcdir@/bindings/c++/include -I@top_srcdir@/libmissing -I@top_builddir@/libmissing', LIBS => ["-L@top_builddir@/src/.libs -lprelude -L@top_builddir@/bindings/c++/.libs -lpreludecpp", "-L$ENV{LIBDIR} -lprelude @LIBPRELUDE_LIBS@ @LIBADD_DL@ @LTLIBTHREAD@" ], LDDLFLAGS => "-L@top_builddir@/src/.libs $Config{lddlflags}"); if ( abs_path("@top_srcdir@") ne abs_path("@top_builddir@") ) { foreach my $filename ( qw/easy-idmef_wrap_perl.cxx PreludeEasy.pm/ ) { my $src = "@top_srcdir@/bindings/perl/$filename"; my $dst = "@top_builddir@/bindings/perl/$filename"; copy($src, $dst) if ( ! -e $dst ); } $attributs{"clean"} = {FILES => join(" ", map { "@top_builddir@/bindings/perl/$_" } qw/easy-idmef_wrap_perl.cxx PreludeEasy.pm Makefile/)}; } if ( -w $Config{"sitelib"} ) { $attributs{"INSTALLDIRS"} = "site"; } else { $attributs{"PREFIX"} = "@prefix@"; } WriteMakefile(%attributs); my($atime, $mtime) = (stat "Makefile.PL")[8,9]; utime($atime + 1, $mtime + 1, "Makefile"); package MY; sub install { my $str = shift->SUPER::install(@_); my @files = ((map { "\$(INSTALLSITEARCH)/$_" } qw/perllocal.pod PreludeEasy.pm/), (map { "\$(INSTALLSITEARCH)/auto/PreludeEasy/$_" } qw/PreludeEasy.bs PreludeEasy.so .packlist/), '$(INSTALLMAN3DIR)/Prelude.$(MAN3EXT)'); $str =~ s/(uninstall_from_sitedirs.+)\n.+\n/"$1\n\t\$(RM_F) " . join(" ", @files) . "\n"/e; return $str; } libprelude-1.0.0/bindings/ruby/0000775000076400007640000000000011347714755013446 500000000000000libprelude-1.0.0/bindings/ruby/libpreludecpp-ruby.i0000664000076400007640000001155711324402501017334 00000000000000%rename (__str__) *::operator const std::string() const; %rename (__str__) *::operator const char *() const; %rename (__int__) *::operator int() const; %rename (__long__) *::operator long() const; %rename (__float__) *::operator double() const; %ignore *::operator =; %ignore *::operator !=; %header %{ #define TARGET_LANGUAGE_OUTPUT_TYPE VALUE * int IDMEFValue_to_SWIG(const IDMEFValue &result, TARGET_LANGUAGE_OUTPUT_TYPE ret); %} /* tell squid not to cast void * value */ %typemap(in) void *nocast_p { Check_Type($input, T_FILE); $1 = &$input; } %{ extern "C" { #include "rubyio.h" } %}; %fragment("TransitionFunc", "header") { static gl_thread_t __initial_thread; static VALUE __prelude_log_func = Qnil; static void _cb_ruby_log(int level, const char *str) { static int cid = rb_intern("call"); if ( (gl_thread_t) gl_thread_self() != __initial_thread ) return; rb_funcall(__prelude_log_func, cid, 2, SWIG_From_int(level), SWIG_FromCharPtr(str)); } static int _cb_ruby_write(prelude_msgbuf_t *fd, prelude_msg_t *msg) { FILE *f; ssize_t ret; OpenFile *fptr; VALUE *io = (VALUE *) prelude_msgbuf_get_data(fd); GetOpenFile(*io, fptr); f = fptr->f; ret = fwrite((const char *) prelude_msg_get_message_data(msg), 1, prelude_msg_get_len(msg), f); if ( ret != prelude_msg_get_len(msg) ) return prelude_error_from_errno(errno); prelude_msg_recycle(msg); return 0; } static ssize_t _cb_ruby_read(prelude_io_t *fd, void *buf, size_t size) { FILE *f; ssize_t ret; OpenFile *fptr; VALUE *io = (VALUE *) prelude_io_get_fdptr(fd); GetOpenFile(*io, fptr); f = fptr->f; ret = fread(buf, 1, size, f); if ( ret < 0 ) ret = prelude_error_from_errno(errno); else if ( ret == 0 ) ret = prelude_error(PRELUDE_ERROR_EOF); return ret; } }; %typemap(in, fragment="TransitionFunc") void (*log_cb)(int level, const char *log) { if ( ! SWIG_Ruby_isCallable($input) ) SWIG_exception_fail(SWIG_ValueError, "Argument is not a callable object"); __prelude_log_func = $input; rb_global_variable(&$input); $1 = _cb_ruby_log; }; %extend Prelude::IDMEF { void Write(void *nocast_p) { self->_genericWrite(_cb_ruby_write, nocast_p); } void Read(void *nocast_p) { self->_genericRead(_cb_ruby_read, nocast_p); } Prelude::IDMEF &operator >> (void *nocast_p) { self->_genericWrite(_cb_ruby_write, nocast_p); return *self; } Prelude::IDMEF &operator << (void *nocast_p) { self->_genericRead(_cb_ruby_read, nocast_p); return *self; } } %fragment("IDMEFValueList_to_SWIG", "header") { VALUE IDMEFValueList_to_SWIG(const Prelude::IDMEFValue &value) { VALUE ary; int ret, j = 0; std::vector result = value; std::vector::const_iterator i; ary = rb_ary_new2(result.size()); for ( i = result.begin(); i != result.end(); i++ ) { VALUE val; ret = IDMEFValue_to_SWIG(*i, &val); if ( ret < 0 ) return Qnil; RARRAY(ary)->ptr[j++] = val; } RARRAY(ary)->len = result.size(); return ary; } } %typemap(out, fragment="IDMEFValue_to_SWIG") Prelude::IDMEFValue { int ret; if ( $1.IsNull() ) $result = Qnil; else { ret = IDMEFValue_to_SWIG($1, &$result); if ( ret < 0 ) { std::stringstream s; s << "IDMEFValue typemap does not handle value of type '" << idmef_value_type_to_string($1.GetType()) << "'"; SWIG_exception_fail(SWIG_ValueError, s.str().c_str()); } } }; %init { int ret; char **argv; int _i, argc; VALUE rbargv, *ptr; __initial_thread = (gl_thread_t) gl_thread_self(); rbargv = rb_const_get(rb_cObject, rb_intern("ARGV")); argc = RARRAY(rbargv)->len + 1; if ( argc + 1 < 0 ) throw PreludeError("Invalid argc length"); argv = (char **) malloc((argc + 1) * sizeof(char *)); if ( ! argv ) throw PreludeError("Allocation failure"); argv[0] = STR2CSTR(rb_gv_get("$0")); ptr = RARRAY(rbargv)->ptr; for ( ptr = RARRAY(rbargv)->ptr, _i = 1; _i < argc; _i++, ptr++ ) argv[_i] = STR2CSTR(*ptr); argv[_i] = NULL; ret = prelude_init(&argc, argv); if ( ret < 0 ) { free(argv); throw PreludeError(ret); } free(argv); } libprelude-1.0.0/bindings/ruby/Makefile.am0000664000076400007640000000166211225122036015403 00000000000000if HAVE_EASY_BINDINGS if HAVE_RUBY EXTRA_DIST = libpreludecpp-ruby.i PreludeEasy.cxx rbexec_LTLIBRARIES = PreludeEasy.la PreludeEasy_la_CPPFLAGS = $(RUBY_INCLUDES) $(RUBY_CCFLAGS) -I@top_builddir@ -I$(top_srcdir)/src/include -I$(top_builddir)/src/include -I@top_builddir@/src/libprelude-error -I$(top_srcdir)/bindings/c++/include -I@top_srcdir@/libmissing -I@top_builddir@/libmissing PreludeEasy_la_LDFLAGS = -module -avoid-version PreludeEasy_la_LIBADD = $(top_builddir)/bindings/c++/.libs/libpreludecpp.la $(RUBY_LIBS) nodist_PreludeEasy_la_SOURCES = PreludeEasy.cxx PreludeEasy.cxx: $(top_srcdir)/bindings/c++/include/*.hxx $(top_srcdir)/bindings/libpreludecpp.i libpreludecpp-ruby.i if HAVE_SWIG $(SWIG) -c++ -I$(top_srcdir)/bindings -I$(top_srcdir)/bindings/c++/include -I$(top_srcdir)/src/include -I$(top_srcdir)/src/libprelude-error -ruby -o $@ $(top_srcdir)/bindings/libpreludecpp.i endif endif endif -include $(top_srcdir)/git.mk libprelude-1.0.0/bindings/ruby/Makefile.in0000664000076400007640000014563011347714454015440 00000000000000# Makefile.in generated by automake 1.11.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, # Inc. # This Makefile.in 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. @SET_MAKE@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ target_triplet = @target@ subdir = bindings/ruby DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/libmissing/m4/00gnulib.m4 \ $(top_srcdir)/libmissing/m4/alloca.m4 \ $(top_srcdir)/libmissing/m4/arpa_inet_h.m4 \ $(top_srcdir)/libmissing/m4/btowc.m4 \ $(top_srcdir)/libmissing/m4/close.m4 \ $(top_srcdir)/libmissing/m4/codeset.m4 \ $(top_srcdir)/libmissing/m4/cond.m4 \ $(top_srcdir)/libmissing/m4/dos.m4 \ $(top_srcdir)/libmissing/m4/dup2.m4 \ $(top_srcdir)/libmissing/m4/errno_h.m4 \ $(top_srcdir)/libmissing/m4/exponentd.m4 \ $(top_srcdir)/libmissing/m4/exponentf.m4 \ $(top_srcdir)/libmissing/m4/exponentl.m4 \ $(top_srcdir)/libmissing/m4/extensions.m4 \ $(top_srcdir)/libmissing/m4/fclose.m4 \ $(top_srcdir)/libmissing/m4/fcntl-o.m4 \ $(top_srcdir)/libmissing/m4/fcntl_h.m4 \ $(top_srcdir)/libmissing/m4/float_h.m4 \ $(top_srcdir)/libmissing/m4/fopen.m4 \ $(top_srcdir)/libmissing/m4/fpieee.m4 \ $(top_srcdir)/libmissing/m4/frexp.m4 \ $(top_srcdir)/libmissing/m4/frexpl.m4 \ $(top_srcdir)/libmissing/m4/fseeko.m4 \ $(top_srcdir)/libmissing/m4/ftw.m4 \ $(top_srcdir)/libmissing/m4/getaddrinfo.m4 \ $(top_srcdir)/libmissing/m4/getdelim.m4 \ $(top_srcdir)/libmissing/m4/gethostname.m4 \ $(top_srcdir)/libmissing/m4/getline.m4 \ $(top_srcdir)/libmissing/m4/getpagesize.m4 \ $(top_srcdir)/libmissing/m4/getpass.m4 \ $(top_srcdir)/libmissing/m4/gettimeofday.m4 \ $(top_srcdir)/libmissing/m4/glibc21.m4 \ $(top_srcdir)/libmissing/m4/gnulib-common.m4 \ $(top_srcdir)/libmissing/m4/gnulib-comp.m4 \ $(top_srcdir)/libmissing/m4/gnulib-tool.m4 \ $(top_srcdir)/libmissing/m4/hostent.m4 \ $(top_srcdir)/libmissing/m4/include_next.m4 \ $(top_srcdir)/libmissing/m4/inet_ntop.m4 \ $(top_srcdir)/libmissing/m4/inet_pton.m4 \ $(top_srcdir)/libmissing/m4/intmax_t.m4 \ $(top_srcdir)/libmissing/m4/inttypes_h.m4 \ $(top_srcdir)/libmissing/m4/isnand.m4 \ $(top_srcdir)/libmissing/m4/isnanf.m4 \ $(top_srcdir)/libmissing/m4/isnanl.m4 \ $(top_srcdir)/libmissing/m4/langinfo_h.m4 \ $(top_srcdir)/libmissing/m4/ldexpl.m4 \ $(top_srcdir)/libmissing/m4/lib-ld.m4 \ $(top_srcdir)/libmissing/m4/lib-link.m4 \ $(top_srcdir)/libmissing/m4/lib-prefix.m4 \ $(top_srcdir)/libmissing/m4/localcharset.m4 \ $(top_srcdir)/libmissing/m4/locale-fr.m4 \ $(top_srcdir)/libmissing/m4/locale-ja.m4 \ $(top_srcdir)/libmissing/m4/locale-tr.m4 \ $(top_srcdir)/libmissing/m4/locale-zh.m4 \ $(top_srcdir)/libmissing/m4/lock.m4 \ $(top_srcdir)/libmissing/m4/longlong.m4 \ $(top_srcdir)/libmissing/m4/lseek.m4 \ $(top_srcdir)/libmissing/m4/lstat.m4 \ $(top_srcdir)/libmissing/m4/malloc.m4 \ $(top_srcdir)/libmissing/m4/math_h.m4 \ $(top_srcdir)/libmissing/m4/mbrtowc.m4 \ $(top_srcdir)/libmissing/m4/mbsinit.m4 \ $(top_srcdir)/libmissing/m4/mbstate_t.m4 \ $(top_srcdir)/libmissing/m4/memchr.m4 \ $(top_srcdir)/libmissing/m4/memmem.m4 \ $(top_srcdir)/libmissing/m4/minmax.m4 \ $(top_srcdir)/libmissing/m4/mktime.m4 \ $(top_srcdir)/libmissing/m4/mmap-anon.m4 \ $(top_srcdir)/libmissing/m4/mode_t.m4 \ $(top_srcdir)/libmissing/m4/multiarch.m4 \ $(top_srcdir)/libmissing/m4/netdb_h.m4 \ $(top_srcdir)/libmissing/m4/netinet_in_h.m4 \ $(top_srcdir)/libmissing/m4/nl_langinfo.m4 \ $(top_srcdir)/libmissing/m4/nocrash.m4 \ $(top_srcdir)/libmissing/m4/onceonly.m4 \ $(top_srcdir)/libmissing/m4/open.m4 \ $(top_srcdir)/libmissing/m4/pathmax.m4 \ $(top_srcdir)/libmissing/m4/perror.m4 \ $(top_srcdir)/libmissing/m4/poll.m4 \ $(top_srcdir)/libmissing/m4/printf-frexp.m4 \ $(top_srcdir)/libmissing/m4/printf-frexpl.m4 \ $(top_srcdir)/libmissing/m4/printf.m4 \ $(top_srcdir)/libmissing/m4/realloc.m4 \ $(top_srcdir)/libmissing/m4/regex.m4 \ $(top_srcdir)/libmissing/m4/relocatable-lib.m4 \ $(top_srcdir)/libmissing/m4/select.m4 \ $(top_srcdir)/libmissing/m4/servent.m4 \ $(top_srcdir)/libmissing/m4/signal_h.m4 \ $(top_srcdir)/libmissing/m4/signalblocking.m4 \ $(top_srcdir)/libmissing/m4/signbit.m4 \ $(top_srcdir)/libmissing/m4/size_max.m4 \ $(top_srcdir)/libmissing/m4/sleep.m4 \ $(top_srcdir)/libmissing/m4/snprintf-posix.m4 \ $(top_srcdir)/libmissing/m4/snprintf.m4 \ $(top_srcdir)/libmissing/m4/sockets.m4 \ $(top_srcdir)/libmissing/m4/socklen.m4 \ $(top_srcdir)/libmissing/m4/sockpfaf.m4 \ $(top_srcdir)/libmissing/m4/ssize_t.m4 \ $(top_srcdir)/libmissing/m4/stat.m4 \ $(top_srcdir)/libmissing/m4/stdbool.m4 \ $(top_srcdir)/libmissing/m4/stddef_h.m4 \ $(top_srcdir)/libmissing/m4/stdint.m4 \ $(top_srcdir)/libmissing/m4/stdint_h.m4 \ $(top_srcdir)/libmissing/m4/stdio_h.m4 \ $(top_srcdir)/libmissing/m4/stdlib_h.m4 \ $(top_srcdir)/libmissing/m4/strcase.m4 \ $(top_srcdir)/libmissing/m4/strcasestr.m4 \ $(top_srcdir)/libmissing/m4/strdup.m4 \ $(top_srcdir)/libmissing/m4/strerror.m4 \ $(top_srcdir)/libmissing/m4/string_h.m4 \ $(top_srcdir)/libmissing/m4/strings_h.m4 \ $(top_srcdir)/libmissing/m4/strndup.m4 \ $(top_srcdir)/libmissing/m4/strnlen.m4 \ $(top_srcdir)/libmissing/m4/strptime.m4 \ $(top_srcdir)/libmissing/m4/strsep.m4 \ $(top_srcdir)/libmissing/m4/symlink.m4 \ $(top_srcdir)/libmissing/m4/sys_ioctl_h.m4 \ $(top_srcdir)/libmissing/m4/sys_select_h.m4 \ $(top_srcdir)/libmissing/m4/sys_socket_h.m4 \ $(top_srcdir)/libmissing/m4/sys_stat_h.m4 \ $(top_srcdir)/libmissing/m4/sys_time_h.m4 \ $(top_srcdir)/libmissing/m4/sys_utsname_h.m4 \ $(top_srcdir)/libmissing/m4/thread.m4 \ $(top_srcdir)/libmissing/m4/threadlib.m4 \ $(top_srcdir)/libmissing/m4/time_h.m4 \ $(top_srcdir)/libmissing/m4/time_r.m4 \ $(top_srcdir)/libmissing/m4/timegm.m4 \ $(top_srcdir)/libmissing/m4/tls.m4 \ $(top_srcdir)/libmissing/m4/tm_gmtoff.m4 \ $(top_srcdir)/libmissing/m4/uname.m4 \ $(top_srcdir)/libmissing/m4/ungetc.m4 \ $(top_srcdir)/libmissing/m4/unistd_h.m4 \ $(top_srcdir)/libmissing/m4/vasnprintf.m4 \ $(top_srcdir)/libmissing/m4/vsnprintf-posix.m4 \ $(top_srcdir)/libmissing/m4/vsnprintf.m4 \ $(top_srcdir)/libmissing/m4/warn-on-use.m4 \ $(top_srcdir)/libmissing/m4/wchar.m4 \ $(top_srcdir)/libmissing/m4/wchar_t.m4 \ $(top_srcdir)/libmissing/m4/wcrtomb.m4 \ $(top_srcdir)/libmissing/m4/wctob.m4 \ $(top_srcdir)/libmissing/m4/wctype.m4 \ $(top_srcdir)/libmissing/m4/wint_t.m4 \ $(top_srcdir)/libmissing/m4/write.m4 \ $(top_srcdir)/libmissing/m4/xsize.m4 \ $(top_srcdir)/libmissing/m4/yield.m4 \ $(top_srcdir)/m4/ac_compile_check_sizeof.m4 \ $(top_srcdir)/m4/am_path_ruby.m4 $(top_srcdir)/m4/argz.m4 \ $(top_srcdir)/m4/as-ac-expand.m4 \ $(top_srcdir)/m4/ax_c_check_flag.m4 \ $(top_srcdir)/m4/ax_check_aligned_access_required.m4 \ $(top_srcdir)/m4/ax_create_prelude_inttypes_h.m4 \ $(top_srcdir)/m4/ax_ld_check_flag.m4 \ $(top_srcdir)/m4/gtk-doc.m4 $(top_srcdir)/m4/libgcrypt.m4 \ $(top_srcdir)/m4/libgnutls-extra.m4 \ $(top_srcdir)/m4/libgnutls.m4 $(top_srcdir)/m4/libtool.m4 \ $(top_srcdir)/m4/ltdl.m4 $(top_srcdir)/m4/ltoptions.m4 \ $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/m4/pkg.m4 \ $(top_srcdir)/configure.in am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; am__install_max = 40 am__nobase_strip_setup = \ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` am__nobase_strip = \ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" am__nobase_list = $(am__nobase_strip_setup); \ for p in $$list; do echo "$$p $$p"; done | \ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ if (++n[$$2] == $(am__install_max)) \ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ END { for (dir in files) print dir, files[dir] }' am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' am__installdirs = "$(DESTDIR)$(rbexecdir)" LTLIBRARIES = $(rbexec_LTLIBRARIES) am__DEPENDENCIES_1 = @HAVE_EASY_BINDINGS_TRUE@@HAVE_RUBY_TRUE@PreludeEasy_la_DEPENDENCIES = $(top_builddir)/bindings/c++/.libs/libpreludecpp.la \ @HAVE_EASY_BINDINGS_TRUE@@HAVE_RUBY_TRUE@ $(am__DEPENDENCIES_1) @HAVE_EASY_BINDINGS_TRUE@@HAVE_RUBY_TRUE@nodist_PreludeEasy_la_OBJECTS = PreludeEasy_la-PreludeEasy.lo PreludeEasy_la_OBJECTS = $(nodist_PreludeEasy_la_OBJECTS) PreludeEasy_la_LINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CXXLD) $(AM_CXXFLAGS) \ $(CXXFLAGS) $(PreludeEasy_la_LDFLAGS) $(LDFLAGS) -o $@ @HAVE_EASY_BINDINGS_TRUE@@HAVE_RUBY_TRUE@am_PreludeEasy_la_rpath = \ @HAVE_EASY_BINDINGS_TRUE@@HAVE_RUBY_TRUE@ -rpath $(rbexecdir) DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles am__mv = mv -f CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) LTCXXCOMPILE = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) CXXLD = $(CXX) CXXLINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=link $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) \ $(LDFLAGS) -o $@ SOURCES = $(nodist_PreludeEasy_la_SOURCES) DIST_SOURCES = ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ ALLOCA = @ALLOCA@ ALLOCA_H = @ALLOCA_H@ AMTAR = @AMTAR@ APPLE_UNIVERSAL_BUILD = @APPLE_UNIVERSAL_BUILD@ AR = @AR@ ARGZ_H = @ARGZ_H@ AS = @AS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ BINDINGS_CC = @BINDINGS_CC@ BINDIR = @BINDIR@ BITSIZEOF_PTRDIFF_T = @BITSIZEOF_PTRDIFF_T@ BITSIZEOF_SIG_ATOMIC_T = @BITSIZEOF_SIG_ATOMIC_T@ BITSIZEOF_SIZE_T = @BITSIZEOF_SIZE_T@ BITSIZEOF_WCHAR_T = @BITSIZEOF_WCHAR_T@ BITSIZEOF_WINT_T = @BITSIZEOF_WINT_T@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CC_FOR_BUILD = @CC_FOR_BUILD@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EMULTIHOP_HIDDEN = @EMULTIHOP_HIDDEN@ EMULTIHOP_VALUE = @EMULTIHOP_VALUE@ ENOLINK_HIDDEN = @ENOLINK_HIDDEN@ ENOLINK_VALUE = @ENOLINK_VALUE@ EOVERFLOW_HIDDEN = @EOVERFLOW_HIDDEN@ EOVERFLOW_VALUE = @EOVERFLOW_VALUE@ ERRNO_H = @ERRNO_H@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ FLOAT_H = @FLOAT_H@ GETADDRINFO_LIB = @GETADDRINFO_LIB@ GETHOSTNAME_LIB = @GETHOSTNAME_LIB@ GLIBC21 = @GLIBC21@ GNULIB_ACCEPT = @GNULIB_ACCEPT@ GNULIB_ACCEPT4 = @GNULIB_ACCEPT4@ GNULIB_ACOSL = @GNULIB_ACOSL@ GNULIB_ASINL = @GNULIB_ASINL@ GNULIB_ATANL = @GNULIB_ATANL@ GNULIB_ATOLL = @GNULIB_ATOLL@ GNULIB_BIND = @GNULIB_BIND@ GNULIB_BTOWC = @GNULIB_BTOWC@ GNULIB_CALLOC_POSIX = @GNULIB_CALLOC_POSIX@ GNULIB_CANONICALIZE_FILE_NAME = @GNULIB_CANONICALIZE_FILE_NAME@ GNULIB_CEILF = @GNULIB_CEILF@ GNULIB_CEILL = @GNULIB_CEILL@ GNULIB_CHOWN = @GNULIB_CHOWN@ GNULIB_CLOSE = @GNULIB_CLOSE@ GNULIB_CONNECT = @GNULIB_CONNECT@ GNULIB_COSL = @GNULIB_COSL@ GNULIB_DPRINTF = @GNULIB_DPRINTF@ GNULIB_DUP2 = @GNULIB_DUP2@ GNULIB_DUP3 = @GNULIB_DUP3@ GNULIB_ENVIRON = @GNULIB_ENVIRON@ GNULIB_EUIDACCESS = @GNULIB_EUIDACCESS@ GNULIB_EXPL = @GNULIB_EXPL@ GNULIB_FACCESSAT = @GNULIB_FACCESSAT@ GNULIB_FCHDIR = @GNULIB_FCHDIR@ GNULIB_FCHMODAT = @GNULIB_FCHMODAT@ GNULIB_FCHOWNAT = @GNULIB_FCHOWNAT@ GNULIB_FCLOSE = @GNULIB_FCLOSE@ GNULIB_FCNTL = @GNULIB_FCNTL@ GNULIB_FFLUSH = @GNULIB_FFLUSH@ GNULIB_FLOORF = @GNULIB_FLOORF@ GNULIB_FLOORL = @GNULIB_FLOORL@ GNULIB_FOPEN = @GNULIB_FOPEN@ GNULIB_FPRINTF = @GNULIB_FPRINTF@ GNULIB_FPRINTF_POSIX = @GNULIB_FPRINTF_POSIX@ GNULIB_FPURGE = @GNULIB_FPURGE@ GNULIB_FPUTC = @GNULIB_FPUTC@ GNULIB_FPUTS = @GNULIB_FPUTS@ GNULIB_FREOPEN = @GNULIB_FREOPEN@ GNULIB_FREXP = @GNULIB_FREXP@ GNULIB_FREXPL = @GNULIB_FREXPL@ GNULIB_FSEEK = @GNULIB_FSEEK@ GNULIB_FSEEKO = @GNULIB_FSEEKO@ GNULIB_FSTATAT = @GNULIB_FSTATAT@ GNULIB_FSYNC = @GNULIB_FSYNC@ GNULIB_FTELL = @GNULIB_FTELL@ GNULIB_FTELLO = @GNULIB_FTELLO@ GNULIB_FTRUNCATE = @GNULIB_FTRUNCATE@ GNULIB_FUTIMENS = @GNULIB_FUTIMENS@ GNULIB_FWRITE = @GNULIB_FWRITE@ GNULIB_GETADDRINFO = @GNULIB_GETADDRINFO@ GNULIB_GETCWD = @GNULIB_GETCWD@ GNULIB_GETDELIM = @GNULIB_GETDELIM@ GNULIB_GETDOMAINNAME = @GNULIB_GETDOMAINNAME@ GNULIB_GETDTABLESIZE = @GNULIB_GETDTABLESIZE@ GNULIB_GETGROUPS = @GNULIB_GETGROUPS@ GNULIB_GETHOSTNAME = @GNULIB_GETHOSTNAME@ GNULIB_GETLINE = @GNULIB_GETLINE@ GNULIB_GETLOADAVG = @GNULIB_GETLOADAVG@ GNULIB_GETLOGIN = @GNULIB_GETLOGIN@ GNULIB_GETLOGIN_R = @GNULIB_GETLOGIN_R@ GNULIB_GETPAGESIZE = @GNULIB_GETPAGESIZE@ GNULIB_GETPEERNAME = @GNULIB_GETPEERNAME@ GNULIB_GETSOCKNAME = @GNULIB_GETSOCKNAME@ GNULIB_GETSOCKOPT = @GNULIB_GETSOCKOPT@ GNULIB_GETSUBOPT = @GNULIB_GETSUBOPT@ GNULIB_GETTIMEOFDAY = @GNULIB_GETTIMEOFDAY@ GNULIB_GETUSERSHELL = @GNULIB_GETUSERSHELL@ GNULIB_INET_NTOP = @GNULIB_INET_NTOP@ GNULIB_INET_PTON = @GNULIB_INET_PTON@ GNULIB_IOCTL = @GNULIB_IOCTL@ GNULIB_ISFINITE = @GNULIB_ISFINITE@ GNULIB_ISINF = @GNULIB_ISINF@ GNULIB_ISNAN = @GNULIB_ISNAN@ GNULIB_ISNAND = @GNULIB_ISNAND@ GNULIB_ISNANF = @GNULIB_ISNANF@ GNULIB_ISNANL = @GNULIB_ISNANL@ GNULIB_LCHMOD = @GNULIB_LCHMOD@ GNULIB_LCHOWN = @GNULIB_LCHOWN@ GNULIB_LDEXPL = @GNULIB_LDEXPL@ GNULIB_LINK = @GNULIB_LINK@ GNULIB_LINKAT = @GNULIB_LINKAT@ GNULIB_LISTEN = @GNULIB_LISTEN@ GNULIB_LOGL = @GNULIB_LOGL@ GNULIB_LSEEK = @GNULIB_LSEEK@ GNULIB_LSTAT = @GNULIB_LSTAT@ GNULIB_MALLOC_POSIX = @GNULIB_MALLOC_POSIX@ GNULIB_MBRLEN = @GNULIB_MBRLEN@ GNULIB_MBRTOWC = @GNULIB_MBRTOWC@ GNULIB_MBSCASECMP = @GNULIB_MBSCASECMP@ GNULIB_MBSCASESTR = @GNULIB_MBSCASESTR@ GNULIB_MBSCHR = @GNULIB_MBSCHR@ GNULIB_MBSCSPN = @GNULIB_MBSCSPN@ GNULIB_MBSINIT = @GNULIB_MBSINIT@ GNULIB_MBSLEN = @GNULIB_MBSLEN@ GNULIB_MBSNCASECMP = @GNULIB_MBSNCASECMP@ GNULIB_MBSNLEN = @GNULIB_MBSNLEN@ GNULIB_MBSNRTOWCS = @GNULIB_MBSNRTOWCS@ GNULIB_MBSPBRK = @GNULIB_MBSPBRK@ GNULIB_MBSPCASECMP = @GNULIB_MBSPCASECMP@ GNULIB_MBSRCHR = @GNULIB_MBSRCHR@ GNULIB_MBSRTOWCS = @GNULIB_MBSRTOWCS@ GNULIB_MBSSEP = @GNULIB_MBSSEP@ GNULIB_MBSSPN = @GNULIB_MBSSPN@ GNULIB_MBSSTR = @GNULIB_MBSSTR@ GNULIB_MBSTOK_R = @GNULIB_MBSTOK_R@ GNULIB_MEMCHR = @GNULIB_MEMCHR@ GNULIB_MEMMEM = @GNULIB_MEMMEM@ GNULIB_MEMPCPY = @GNULIB_MEMPCPY@ GNULIB_MEMRCHR = @GNULIB_MEMRCHR@ GNULIB_MKDIRAT = @GNULIB_MKDIRAT@ GNULIB_MKDTEMP = @GNULIB_MKDTEMP@ GNULIB_MKFIFO = @GNULIB_MKFIFO@ GNULIB_MKFIFOAT = @GNULIB_MKFIFOAT@ GNULIB_MKNOD = @GNULIB_MKNOD@ GNULIB_MKNODAT = @GNULIB_MKNODAT@ GNULIB_MKOSTEMP = @GNULIB_MKOSTEMP@ GNULIB_MKOSTEMPS = @GNULIB_MKOSTEMPS@ GNULIB_MKSTEMP = @GNULIB_MKSTEMP@ GNULIB_MKSTEMPS = @GNULIB_MKSTEMPS@ GNULIB_NL_LANGINFO = @GNULIB_NL_LANGINFO@ GNULIB_OBSTACK_PRINTF = @GNULIB_OBSTACK_PRINTF@ GNULIB_OBSTACK_PRINTF_POSIX = @GNULIB_OBSTACK_PRINTF_POSIX@ GNULIB_OPEN = @GNULIB_OPEN@ GNULIB_OPENAT = @GNULIB_OPENAT@ GNULIB_PERROR = @GNULIB_PERROR@ GNULIB_PIPE2 = @GNULIB_PIPE2@ GNULIB_POPEN = @GNULIB_POPEN@ GNULIB_PREAD = @GNULIB_PREAD@ GNULIB_PRINTF = @GNULIB_PRINTF@ GNULIB_PRINTF_POSIX = @GNULIB_PRINTF_POSIX@ GNULIB_PUTC = @GNULIB_PUTC@ GNULIB_PUTCHAR = @GNULIB_PUTCHAR@ GNULIB_PUTENV = @GNULIB_PUTENV@ GNULIB_PUTS = @GNULIB_PUTS@ GNULIB_RANDOM_R = @GNULIB_RANDOM_R@ GNULIB_RAWMEMCHR = @GNULIB_RAWMEMCHR@ GNULIB_READLINK = @GNULIB_READLINK@ GNULIB_READLINKAT = @GNULIB_READLINKAT@ GNULIB_REALLOC_POSIX = @GNULIB_REALLOC_POSIX@ GNULIB_REALPATH = @GNULIB_REALPATH@ GNULIB_RECV = @GNULIB_RECV@ GNULIB_RECVFROM = @GNULIB_RECVFROM@ GNULIB_REMOVE = @GNULIB_REMOVE@ GNULIB_RENAME = @GNULIB_RENAME@ GNULIB_RENAMEAT = @GNULIB_RENAMEAT@ GNULIB_RMDIR = @GNULIB_RMDIR@ GNULIB_ROUND = @GNULIB_ROUND@ GNULIB_ROUNDF = @GNULIB_ROUNDF@ GNULIB_ROUNDL = @GNULIB_ROUNDL@ GNULIB_RPMATCH = @GNULIB_RPMATCH@ GNULIB_SELECT = @GNULIB_SELECT@ GNULIB_SEND = @GNULIB_SEND@ GNULIB_SENDTO = @GNULIB_SENDTO@ GNULIB_SETENV = @GNULIB_SETENV@ GNULIB_SETSOCKOPT = @GNULIB_SETSOCKOPT@ GNULIB_SHUTDOWN = @GNULIB_SHUTDOWN@ GNULIB_SIGACTION = @GNULIB_SIGACTION@ GNULIB_SIGNAL_H_SIGPIPE = @GNULIB_SIGNAL_H_SIGPIPE@ GNULIB_SIGNBIT = @GNULIB_SIGNBIT@ GNULIB_SIGPROCMASK = @GNULIB_SIGPROCMASK@ GNULIB_SINL = @GNULIB_SINL@ GNULIB_SLEEP = @GNULIB_SLEEP@ GNULIB_SNPRINTF = @GNULIB_SNPRINTF@ GNULIB_SOCKET = @GNULIB_SOCKET@ GNULIB_SPRINTF_POSIX = @GNULIB_SPRINTF_POSIX@ GNULIB_SQRTL = @GNULIB_SQRTL@ GNULIB_STAT = @GNULIB_STAT@ GNULIB_STDIO_H_SIGPIPE = @GNULIB_STDIO_H_SIGPIPE@ GNULIB_STPCPY = @GNULIB_STPCPY@ GNULIB_STPNCPY = @GNULIB_STPNCPY@ GNULIB_STRCASESTR = @GNULIB_STRCASESTR@ GNULIB_STRCHRNUL = @GNULIB_STRCHRNUL@ GNULIB_STRDUP = @GNULIB_STRDUP@ GNULIB_STRERROR = @GNULIB_STRERROR@ GNULIB_STRNDUP = @GNULIB_STRNDUP@ GNULIB_STRNLEN = @GNULIB_STRNLEN@ GNULIB_STRPBRK = @GNULIB_STRPBRK@ GNULIB_STRSEP = @GNULIB_STRSEP@ GNULIB_STRSIGNAL = @GNULIB_STRSIGNAL@ GNULIB_STRSTR = @GNULIB_STRSTR@ GNULIB_STRTOD = @GNULIB_STRTOD@ GNULIB_STRTOK_R = @GNULIB_STRTOK_R@ GNULIB_STRTOLL = @GNULIB_STRTOLL@ GNULIB_STRTOULL = @GNULIB_STRTOULL@ GNULIB_STRVERSCMP = @GNULIB_STRVERSCMP@ GNULIB_SYMLINK = @GNULIB_SYMLINK@ GNULIB_SYMLINKAT = @GNULIB_SYMLINKAT@ GNULIB_TANL = @GNULIB_TANL@ GNULIB_TRUNC = @GNULIB_TRUNC@ GNULIB_TRUNCF = @GNULIB_TRUNCF@ GNULIB_TRUNCL = @GNULIB_TRUNCL@ GNULIB_UNAME = @GNULIB_UNAME@ GNULIB_UNISTD_H_GETOPT = @GNULIB_UNISTD_H_GETOPT@ GNULIB_UNISTD_H_SIGPIPE = @GNULIB_UNISTD_H_SIGPIPE@ GNULIB_UNLINK = @GNULIB_UNLINK@ GNULIB_UNLINKAT = @GNULIB_UNLINKAT@ GNULIB_UNSETENV = @GNULIB_UNSETENV@ GNULIB_USLEEP = @GNULIB_USLEEP@ GNULIB_UTIMENSAT = @GNULIB_UTIMENSAT@ GNULIB_VASPRINTF = @GNULIB_VASPRINTF@ GNULIB_VDPRINTF = @GNULIB_VDPRINTF@ GNULIB_VFPRINTF = @GNULIB_VFPRINTF@ GNULIB_VFPRINTF_POSIX = @GNULIB_VFPRINTF_POSIX@ GNULIB_VPRINTF = @GNULIB_VPRINTF@ GNULIB_VPRINTF_POSIX = @GNULIB_VPRINTF_POSIX@ GNULIB_VSNPRINTF = @GNULIB_VSNPRINTF@ GNULIB_VSPRINTF_POSIX = @GNULIB_VSPRINTF_POSIX@ GNULIB_WCRTOMB = @GNULIB_WCRTOMB@ GNULIB_WCSNRTOMBS = @GNULIB_WCSNRTOMBS@ GNULIB_WCSRTOMBS = @GNULIB_WCSRTOMBS@ GNULIB_WCTOB = @GNULIB_WCTOB@ GNULIB_WCWIDTH = @GNULIB_WCWIDTH@ GNULIB_WRITE = @GNULIB_WRITE@ GREP = @GREP@ GTKDOC_CHECK = @GTKDOC_CHECK@ HAVE_ACCEPT4 = @HAVE_ACCEPT4@ HAVE_ACOSL = @HAVE_ACOSL@ HAVE_ARPA_INET_H = @HAVE_ARPA_INET_H@ HAVE_ASINL = @HAVE_ASINL@ HAVE_ATANL = @HAVE_ATANL@ HAVE_ATOLL = @HAVE_ATOLL@ HAVE_BTOWC = @HAVE_BTOWC@ HAVE_CALLOC_POSIX = @HAVE_CALLOC_POSIX@ HAVE_CANONICALIZE_FILE_NAME = @HAVE_CANONICALIZE_FILE_NAME@ HAVE_CHOWN = @HAVE_CHOWN@ HAVE_COSL = @HAVE_COSL@ HAVE_CXX = @HAVE_CXX@ HAVE_DECL_ACOSL = @HAVE_DECL_ACOSL@ HAVE_DECL_ASINL = @HAVE_DECL_ASINL@ HAVE_DECL_ATANL = @HAVE_DECL_ATANL@ HAVE_DECL_COSL = @HAVE_DECL_COSL@ HAVE_DECL_ENVIRON = @HAVE_DECL_ENVIRON@ HAVE_DECL_EXPL = @HAVE_DECL_EXPL@ HAVE_DECL_FPURGE = @HAVE_DECL_FPURGE@ HAVE_DECL_FREEADDRINFO = @HAVE_DECL_FREEADDRINFO@ HAVE_DECL_FREXPL = @HAVE_DECL_FREXPL@ HAVE_DECL_GAI_STRERROR = @HAVE_DECL_GAI_STRERROR@ HAVE_DECL_GETADDRINFO = @HAVE_DECL_GETADDRINFO@ HAVE_DECL_GETDELIM = @HAVE_DECL_GETDELIM@ HAVE_DECL_GETLINE = @HAVE_DECL_GETLINE@ HAVE_DECL_GETLOADAVG = @HAVE_DECL_GETLOADAVG@ HAVE_DECL_GETLOGIN_R = @HAVE_DECL_GETLOGIN_R@ HAVE_DECL_GETNAMEINFO = @HAVE_DECL_GETNAMEINFO@ HAVE_DECL_INET_NTOP = @HAVE_DECL_INET_NTOP@ HAVE_DECL_INET_PTON = @HAVE_DECL_INET_PTON@ HAVE_DECL_LDEXPL = @HAVE_DECL_LDEXPL@ HAVE_DECL_LOGL = @HAVE_DECL_LOGL@ HAVE_DECL_MEMMEM = @HAVE_DECL_MEMMEM@ HAVE_DECL_MEMRCHR = @HAVE_DECL_MEMRCHR@ HAVE_DECL_OBSTACK_PRINTF = @HAVE_DECL_OBSTACK_PRINTF@ HAVE_DECL_SINL = @HAVE_DECL_SINL@ HAVE_DECL_SNPRINTF = @HAVE_DECL_SNPRINTF@ HAVE_DECL_SQRTL = @HAVE_DECL_SQRTL@ HAVE_DECL_STRDUP = @HAVE_DECL_STRDUP@ HAVE_DECL_STRERROR = @HAVE_DECL_STRERROR@ HAVE_DECL_STRNCASECMP = @HAVE_DECL_STRNCASECMP@ HAVE_DECL_STRNDUP = @HAVE_DECL_STRNDUP@ HAVE_DECL_STRNLEN = @HAVE_DECL_STRNLEN@ HAVE_DECL_STRSIGNAL = @HAVE_DECL_STRSIGNAL@ HAVE_DECL_STRTOK_R = @HAVE_DECL_STRTOK_R@ HAVE_DECL_TANL = @HAVE_DECL_TANL@ HAVE_DECL_TRUNC = @HAVE_DECL_TRUNC@ HAVE_DECL_TRUNCF = @HAVE_DECL_TRUNCF@ HAVE_DECL_VSNPRINTF = @HAVE_DECL_VSNPRINTF@ HAVE_DECL_WCTOB = @HAVE_DECL_WCTOB@ HAVE_DECL_WCWIDTH = @HAVE_DECL_WCWIDTH@ HAVE_DPRINTF = @HAVE_DPRINTF@ HAVE_DUP2 = @HAVE_DUP2@ HAVE_DUP3 = @HAVE_DUP3@ HAVE_EUIDACCESS = @HAVE_EUIDACCESS@ HAVE_EXPL = @HAVE_EXPL@ HAVE_FACCESSAT = @HAVE_FACCESSAT@ HAVE_FCHMODAT = @HAVE_FCHMODAT@ HAVE_FCHOWNAT = @HAVE_FCHOWNAT@ HAVE_FCNTL = @HAVE_FCNTL@ HAVE_FSTATAT = @HAVE_FSTATAT@ HAVE_FSYNC = @HAVE_FSYNC@ HAVE_FTRUNCATE = @HAVE_FTRUNCATE@ HAVE_FUTIMENS = @HAVE_FUTIMENS@ HAVE_GETDOMAINNAME = @HAVE_GETDOMAINNAME@ HAVE_GETDTABLESIZE = @HAVE_GETDTABLESIZE@ HAVE_GETGROUPS = @HAVE_GETGROUPS@ HAVE_GETHOSTNAME = @HAVE_GETHOSTNAME@ HAVE_GETLOGIN = @HAVE_GETLOGIN@ HAVE_GETPAGESIZE = @HAVE_GETPAGESIZE@ HAVE_GETSUBOPT = @HAVE_GETSUBOPT@ HAVE_GETUSERSHELL = @HAVE_GETUSERSHELL@ HAVE_INTTYPES_H = @HAVE_INTTYPES_H@ HAVE_ISNAND = @HAVE_ISNAND@ HAVE_ISNANF = @HAVE_ISNANF@ HAVE_ISNANL = @HAVE_ISNANL@ HAVE_ISWCNTRL = @HAVE_ISWCNTRL@ HAVE_LANGINFO_CODESET = @HAVE_LANGINFO_CODESET@ HAVE_LANGINFO_ERA = @HAVE_LANGINFO_ERA@ HAVE_LANGINFO_H = @HAVE_LANGINFO_H@ HAVE_LCHMOD = @HAVE_LCHMOD@ HAVE_LCHOWN = @HAVE_LCHOWN@ HAVE_LINK = @HAVE_LINK@ HAVE_LINKAT = @HAVE_LINKAT@ HAVE_LOGL = @HAVE_LOGL@ HAVE_LONG_LONG_INT = @HAVE_LONG_LONG_INT@ HAVE_LSTAT = @HAVE_LSTAT@ HAVE_MALLOC_POSIX = @HAVE_MALLOC_POSIX@ HAVE_MBRLEN = @HAVE_MBRLEN@ HAVE_MBRTOWC = @HAVE_MBRTOWC@ HAVE_MBSINIT = @HAVE_MBSINIT@ HAVE_MBSLEN = @HAVE_MBSLEN@ HAVE_MBSNRTOWCS = @HAVE_MBSNRTOWCS@ HAVE_MBSRTOWCS = @HAVE_MBSRTOWCS@ HAVE_MEMPCPY = @HAVE_MEMPCPY@ HAVE_MKDIRAT = @HAVE_MKDIRAT@ HAVE_MKDTEMP = @HAVE_MKDTEMP@ HAVE_MKFIFO = @HAVE_MKFIFO@ HAVE_MKFIFOAT = @HAVE_MKFIFOAT@ HAVE_MKNOD = @HAVE_MKNOD@ HAVE_MKNODAT = @HAVE_MKNODAT@ HAVE_MKOSTEMP = @HAVE_MKOSTEMP@ HAVE_MKOSTEMPS = @HAVE_MKOSTEMPS@ HAVE_MKSTEMPS = @HAVE_MKSTEMPS@ HAVE_NETDB_H = @HAVE_NETDB_H@ HAVE_NETINET_IN_H = @HAVE_NETINET_IN_H@ HAVE_NL_LANGINFO = @HAVE_NL_LANGINFO@ HAVE_OPENAT = @HAVE_OPENAT@ HAVE_OS_H = @HAVE_OS_H@ HAVE_PIPE2 = @HAVE_PIPE2@ HAVE_POSIX_SIGNALBLOCKING = @HAVE_POSIX_SIGNALBLOCKING@ HAVE_PREAD = @HAVE_PREAD@ HAVE_RANDOM_H = @HAVE_RANDOM_H@ HAVE_RANDOM_R = @HAVE_RANDOM_R@ HAVE_RAWMEMCHR = @HAVE_RAWMEMCHR@ HAVE_READLINK = @HAVE_READLINK@ HAVE_READLINKAT = @HAVE_READLINKAT@ HAVE_REALLOC_POSIX = @HAVE_REALLOC_POSIX@ HAVE_REALPATH = @HAVE_REALPATH@ HAVE_RENAMEAT = @HAVE_RENAMEAT@ HAVE_RPMATCH = @HAVE_RPMATCH@ HAVE_SA_FAMILY_T = @HAVE_SA_FAMILY_T@ HAVE_SETENV = @HAVE_SETENV@ HAVE_SIGACTION = @HAVE_SIGACTION@ HAVE_SIGINFO_T = @HAVE_SIGINFO_T@ HAVE_SIGNED_SIG_ATOMIC_T = @HAVE_SIGNED_SIG_ATOMIC_T@ HAVE_SIGNED_WCHAR_T = @HAVE_SIGNED_WCHAR_T@ HAVE_SIGNED_WINT_T = @HAVE_SIGNED_WINT_T@ HAVE_SIGSET_T = @HAVE_SIGSET_T@ HAVE_SINL = @HAVE_SINL@ HAVE_SLEEP = @HAVE_SLEEP@ HAVE_SQRTL = @HAVE_SQRTL@ HAVE_STDINT_H = @HAVE_STDINT_H@ HAVE_STPCPY = @HAVE_STPCPY@ HAVE_STPNCPY = @HAVE_STPNCPY@ HAVE_STRCASECMP = @HAVE_STRCASECMP@ HAVE_STRCASESTR = @HAVE_STRCASESTR@ HAVE_STRCHRNUL = @HAVE_STRCHRNUL@ HAVE_STRPBRK = @HAVE_STRPBRK@ HAVE_STRSEP = @HAVE_STRSEP@ HAVE_STRTOD = @HAVE_STRTOD@ HAVE_STRTOLL = @HAVE_STRTOLL@ HAVE_STRTOULL = @HAVE_STRTOULL@ HAVE_STRUCT_ADDRINFO = @HAVE_STRUCT_ADDRINFO@ HAVE_STRUCT_RANDOM_DATA = @HAVE_STRUCT_RANDOM_DATA@ HAVE_STRUCT_SIGACTION_SA_SIGACTION = @HAVE_STRUCT_SIGACTION_SA_SIGACTION@ HAVE_STRUCT_SOCKADDR_STORAGE = @HAVE_STRUCT_SOCKADDR_STORAGE@ HAVE_STRUCT_TIMEVAL = @HAVE_STRUCT_TIMEVAL@ HAVE_STRUCT_UTSNAME = @HAVE_STRUCT_UTSNAME@ HAVE_STRVERSCMP = @HAVE_STRVERSCMP@ HAVE_SYMLINK = @HAVE_SYMLINK@ HAVE_SYMLINKAT = @HAVE_SYMLINKAT@ HAVE_SYS_BITYPES_H = @HAVE_SYS_BITYPES_H@ HAVE_SYS_INTTYPES_H = @HAVE_SYS_INTTYPES_H@ HAVE_SYS_IOCTL_H = @HAVE_SYS_IOCTL_H@ HAVE_SYS_LOADAVG_H = @HAVE_SYS_LOADAVG_H@ HAVE_SYS_PARAM_H = @HAVE_SYS_PARAM_H@ HAVE_SYS_SELECT_H = @HAVE_SYS_SELECT_H@ HAVE_SYS_SOCKET_H = @HAVE_SYS_SOCKET_H@ HAVE_SYS_TIME_H = @HAVE_SYS_TIME_H@ HAVE_SYS_TYPES_H = @HAVE_SYS_TYPES_H@ HAVE_SYS_UTSNAME_H = @HAVE_SYS_UTSNAME_H@ HAVE_TANL = @HAVE_TANL@ HAVE_TYPE_VOLATILE_SIG_ATOMIC_T = @HAVE_TYPE_VOLATILE_SIG_ATOMIC_T@ HAVE_UNAME = @HAVE_UNAME@ HAVE_UNISTD_H = @HAVE_UNISTD_H@ HAVE_UNLINKAT = @HAVE_UNLINKAT@ HAVE_UNSETENV = @HAVE_UNSETENV@ HAVE_UNSIGNED_LONG_LONG_INT = @HAVE_UNSIGNED_LONG_LONG_INT@ HAVE_USLEEP = @HAVE_USLEEP@ HAVE_UTIMENSAT = @HAVE_UTIMENSAT@ HAVE_VASPRINTF = @HAVE_VASPRINTF@ HAVE_VDPRINTF = @HAVE_VDPRINTF@ HAVE_WCHAR_H = @HAVE_WCHAR_H@ HAVE_WCHAR_T = @HAVE_WCHAR_T@ HAVE_WCRTOMB = @HAVE_WCRTOMB@ HAVE_WCSNRTOMBS = @HAVE_WCSNRTOMBS@ HAVE_WCSRTOMBS = @HAVE_WCSRTOMBS@ HAVE_WCTYPE_H = @HAVE_WCTYPE_H@ HAVE_WINSOCK2_H = @HAVE_WINSOCK2_H@ HAVE_WINT_T = @HAVE_WINT_T@ HAVE_WS2TCPIP_H = @HAVE_WS2TCPIP_H@ HAVE__BOOL = @HAVE__BOOL@ HOSTENT_LIB = @HOSTENT_LIB@ HTML_DIR = @HTML_DIR@ INCLTDL = @INCLTDL@ INCLUDE_NEXT = @INCLUDE_NEXT@ INCLUDE_NEXT_AS_FIRST_DIRECTIVE = @INCLUDE_NEXT_AS_FIRST_DIRECTIVE@ INET_NTOP_LIB = @INET_NTOP_LIB@ INET_PTON_LIB = @INET_PTON_LIB@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LD = @LD@ LDFLAGS = @LDFLAGS@ LEX = @LEX@ LEXLIB = @LEXLIB@ LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@ LIBADD_DL = @LIBADD_DL@ LIBADD_DLD_LINK = @LIBADD_DLD_LINK@ LIBADD_DLOPEN = @LIBADD_DLOPEN@ LIBADD_SHL_LOAD = @LIBADD_SHL_LOAD@ LIBDIR = @LIBDIR@ LIBGCRYPT_CFLAGS = @LIBGCRYPT_CFLAGS@ LIBGCRYPT_CONFIG = @LIBGCRYPT_CONFIG@ LIBGCRYPT_LIBS = @LIBGCRYPT_LIBS@ LIBGNUTLS_CFLAGS = @LIBGNUTLS_CFLAGS@ LIBGNUTLS_CONFIG = @LIBGNUTLS_CONFIG@ LIBGNUTLS_EXTRA_CFLAGS = @LIBGNUTLS_EXTRA_CFLAGS@ LIBGNUTLS_EXTRA_CONFIG = @LIBGNUTLS_EXTRA_CONFIG@ LIBGNUTLS_EXTRA_LIBS = @LIBGNUTLS_EXTRA_LIBS@ LIBGNUTLS_LIBS = @LIBGNUTLS_LIBS@ LIBINTL = @LIBINTL@ LIBLTDL = @LIBLTDL@ LIBMULTITHREAD = @LIBMULTITHREAD@ LIBOBJS = @LIBOBJS@ LIBPRELUDECPP_SONAME = @LIBPRELUDECPP_SONAME@ LIBPRELUDE_CFLAGS = @LIBPRELUDE_CFLAGS@ LIBPRELUDE_LIBS = @LIBPRELUDE_LIBS@ LIBPRELUDE_SONAME = @LIBPRELUDE_SONAME@ LIBPTH = @LIBPTH@ LIBPTH_PREFIX = @LIBPTH_PREFIX@ LIBS = @LIBS@ LIBSOCKET = @LIBSOCKET@ LIBTESTS_LIBDEPS = @LIBTESTS_LIBDEPS@ LIBTHREAD = @LIBTHREAD@ LIBTOOL = @LIBTOOL@ LIPO = @LIPO@ LN_S = @LN_S@ LOCALCHARSET_TESTS_ENVIRONMENT = @LOCALCHARSET_TESTS_ENVIRONMENT@ LOCALE_FR = @LOCALE_FR@ LOCALE_FR_UTF8 = @LOCALE_FR_UTF8@ LOCALE_JA = @LOCALE_JA@ LOCALE_TR_UTF8 = @LOCALE_TR_UTF8@ LOCALE_ZH_CN = @LOCALE_ZH_CN@ LOCALSTATEDIR = @LOCALSTATEDIR@ LTALLOCA = @LTALLOCA@ LTDLDEPS = @LTDLDEPS@ LTDLINCL = @LTDLINCL@ LTDLOPEN = @LTDLOPEN@ LTLIBINTL = @LTLIBINTL@ LTLIBMULTITHREAD = @LTLIBMULTITHREAD@ LTLIBOBJS = @LTLIBOBJS@ LTLIBPTH = @LTLIBPTH@ LTLIBTHREAD = @LTLIBTHREAD@ LT_CONFIG_H = @LT_CONFIG_H@ LT_DLLOADERS = @LT_DLLOADERS@ LT_DLPREOPEN = @LT_DLPREOPEN@ LUA_CFLAGS = @LUA_CFLAGS@ LUA_CONFIG = @LUA_CONFIG@ LUA_LIBS = @LUA_LIBS@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MKDIR_P = @MKDIR_P@ NETDB_H = @NETDB_H@ NETINET_IN_H = @NETINET_IN_H@ NEXT_ARPA_INET_H = @NEXT_ARPA_INET_H@ NEXT_AS_FIRST_DIRECTIVE_ARPA_INET_H = @NEXT_AS_FIRST_DIRECTIVE_ARPA_INET_H@ NEXT_AS_FIRST_DIRECTIVE_ERRNO_H = @NEXT_AS_FIRST_DIRECTIVE_ERRNO_H@ NEXT_AS_FIRST_DIRECTIVE_FCNTL_H = @NEXT_AS_FIRST_DIRECTIVE_FCNTL_H@ NEXT_AS_FIRST_DIRECTIVE_FLOAT_H = @NEXT_AS_FIRST_DIRECTIVE_FLOAT_H@ NEXT_AS_FIRST_DIRECTIVE_LANGINFO_H = @NEXT_AS_FIRST_DIRECTIVE_LANGINFO_H@ NEXT_AS_FIRST_DIRECTIVE_MATH_H = @NEXT_AS_FIRST_DIRECTIVE_MATH_H@ NEXT_AS_FIRST_DIRECTIVE_NETDB_H = @NEXT_AS_FIRST_DIRECTIVE_NETDB_H@ NEXT_AS_FIRST_DIRECTIVE_NETINET_IN_H = @NEXT_AS_FIRST_DIRECTIVE_NETINET_IN_H@ NEXT_AS_FIRST_DIRECTIVE_SIGNAL_H = @NEXT_AS_FIRST_DIRECTIVE_SIGNAL_H@ NEXT_AS_FIRST_DIRECTIVE_STDDEF_H = @NEXT_AS_FIRST_DIRECTIVE_STDDEF_H@ NEXT_AS_FIRST_DIRECTIVE_STDINT_H = @NEXT_AS_FIRST_DIRECTIVE_STDINT_H@ NEXT_AS_FIRST_DIRECTIVE_STDIO_H = @NEXT_AS_FIRST_DIRECTIVE_STDIO_H@ NEXT_AS_FIRST_DIRECTIVE_STDLIB_H = @NEXT_AS_FIRST_DIRECTIVE_STDLIB_H@ NEXT_AS_FIRST_DIRECTIVE_STRINGS_H = @NEXT_AS_FIRST_DIRECTIVE_STRINGS_H@ NEXT_AS_FIRST_DIRECTIVE_STRING_H = @NEXT_AS_FIRST_DIRECTIVE_STRING_H@ NEXT_AS_FIRST_DIRECTIVE_SYS_IOCTL_H = @NEXT_AS_FIRST_DIRECTIVE_SYS_IOCTL_H@ NEXT_AS_FIRST_DIRECTIVE_SYS_SELECT_H = @NEXT_AS_FIRST_DIRECTIVE_SYS_SELECT_H@ NEXT_AS_FIRST_DIRECTIVE_SYS_SOCKET_H = @NEXT_AS_FIRST_DIRECTIVE_SYS_SOCKET_H@ NEXT_AS_FIRST_DIRECTIVE_SYS_STAT_H = @NEXT_AS_FIRST_DIRECTIVE_SYS_STAT_H@ NEXT_AS_FIRST_DIRECTIVE_SYS_TIME_H = @NEXT_AS_FIRST_DIRECTIVE_SYS_TIME_H@ NEXT_AS_FIRST_DIRECTIVE_SYS_UTSNAME_H = @NEXT_AS_FIRST_DIRECTIVE_SYS_UTSNAME_H@ NEXT_AS_FIRST_DIRECTIVE_TIME_H = @NEXT_AS_FIRST_DIRECTIVE_TIME_H@ NEXT_AS_FIRST_DIRECTIVE_UNISTD_H = @NEXT_AS_FIRST_DIRECTIVE_UNISTD_H@ NEXT_AS_FIRST_DIRECTIVE_WCHAR_H = @NEXT_AS_FIRST_DIRECTIVE_WCHAR_H@ NEXT_AS_FIRST_DIRECTIVE_WCTYPE_H = @NEXT_AS_FIRST_DIRECTIVE_WCTYPE_H@ NEXT_ERRNO_H = @NEXT_ERRNO_H@ NEXT_FCNTL_H = @NEXT_FCNTL_H@ NEXT_FLOAT_H = @NEXT_FLOAT_H@ NEXT_LANGINFO_H = @NEXT_LANGINFO_H@ NEXT_MATH_H = @NEXT_MATH_H@ NEXT_NETDB_H = @NEXT_NETDB_H@ NEXT_NETINET_IN_H = @NEXT_NETINET_IN_H@ NEXT_SIGNAL_H = @NEXT_SIGNAL_H@ NEXT_STDDEF_H = @NEXT_STDDEF_H@ NEXT_STDINT_H = @NEXT_STDINT_H@ NEXT_STDIO_H = @NEXT_STDIO_H@ NEXT_STDLIB_H = @NEXT_STDLIB_H@ NEXT_STRINGS_H = @NEXT_STRINGS_H@ NEXT_STRING_H = @NEXT_STRING_H@ NEXT_SYS_IOCTL_H = @NEXT_SYS_IOCTL_H@ NEXT_SYS_SELECT_H = @NEXT_SYS_SELECT_H@ NEXT_SYS_SOCKET_H = @NEXT_SYS_SOCKET_H@ NEXT_SYS_STAT_H = @NEXT_SYS_STAT_H@ NEXT_SYS_TIME_H = @NEXT_SYS_TIME_H@ NEXT_SYS_UTSNAME_H = @NEXT_SYS_UTSNAME_H@ NEXT_TIME_H = @NEXT_TIME_H@ NEXT_UNISTD_H = @NEXT_UNISTD_H@ NEXT_WCHAR_H = @NEXT_WCHAR_H@ NEXT_WCTYPE_H = @NEXT_WCTYPE_H@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PCFLAGS = @PCFLAGS@ PERL = @PERL@ PERL_EXTRA_PARAMS = @PERL_EXTRA_PARAMS@ PKG_CONFIG = @PKG_CONFIG@ POLL_H = @POLL_H@ PRAGMA_SYSTEM_HEADER = @PRAGMA_SYSTEM_HEADER@ PRELUDE_ADMIN_CFLAGS = @PRELUDE_ADMIN_CFLAGS@ PRELUDE_ADMIN_LIBS = @PRELUDE_ADMIN_LIBS@ PRELUDE_CONFIG_DIR = @PRELUDE_CONFIG_DIR@ PRELUDE_SPOOL_DIR = @PRELUDE_SPOOL_DIR@ PTHREAD_CFLAGS = @PTHREAD_CFLAGS@ PTHREAD_LDFLAGS = @PTHREAD_LDFLAGS@ PTHREAD_LIBS = @PTHREAD_LIBS@ PTRDIFF_T_SUFFIX = @PTRDIFF_T_SUFFIX@ PYTHON = @PYTHON@ RANLIB = @RANLIB@ RELOCATABLE = @RELOCATABLE@ REPLACE_BTOWC = @REPLACE_BTOWC@ REPLACE_CANONICALIZE_FILE_NAME = @REPLACE_CANONICALIZE_FILE_NAME@ REPLACE_CEILF = @REPLACE_CEILF@ REPLACE_CEILL = @REPLACE_CEILL@ REPLACE_CHOWN = @REPLACE_CHOWN@ REPLACE_CLOSE = @REPLACE_CLOSE@ REPLACE_DPRINTF = @REPLACE_DPRINTF@ REPLACE_DUP = @REPLACE_DUP@ REPLACE_DUP2 = @REPLACE_DUP2@ REPLACE_FCHDIR = @REPLACE_FCHDIR@ REPLACE_FCHOWNAT = @REPLACE_FCHOWNAT@ REPLACE_FCLOSE = @REPLACE_FCLOSE@ REPLACE_FCNTL = @REPLACE_FCNTL@ REPLACE_FFLUSH = @REPLACE_FFLUSH@ REPLACE_FLOORF = @REPLACE_FLOORF@ REPLACE_FLOORL = @REPLACE_FLOORL@ REPLACE_FOPEN = @REPLACE_FOPEN@ REPLACE_FPRINTF = @REPLACE_FPRINTF@ REPLACE_FPURGE = @REPLACE_FPURGE@ REPLACE_FREOPEN = @REPLACE_FREOPEN@ REPLACE_FREXP = @REPLACE_FREXP@ REPLACE_FREXPL = @REPLACE_FREXPL@ REPLACE_FSEEK = @REPLACE_FSEEK@ REPLACE_FSEEKO = @REPLACE_FSEEKO@ REPLACE_FSTAT = @REPLACE_FSTAT@ REPLACE_FSTATAT = @REPLACE_FSTATAT@ REPLACE_FTELL = @REPLACE_FTELL@ REPLACE_FTELLO = @REPLACE_FTELLO@ REPLACE_FUTIMENS = @REPLACE_FUTIMENS@ REPLACE_GETCWD = @REPLACE_GETCWD@ REPLACE_GETDELIM = @REPLACE_GETDELIM@ REPLACE_GETGROUPS = @REPLACE_GETGROUPS@ REPLACE_GETLINE = @REPLACE_GETLINE@ REPLACE_GETPAGESIZE = @REPLACE_GETPAGESIZE@ REPLACE_GETTIMEOFDAY = @REPLACE_GETTIMEOFDAY@ REPLACE_HUGE_VAL = @REPLACE_HUGE_VAL@ REPLACE_ISFINITE = @REPLACE_ISFINITE@ REPLACE_ISINF = @REPLACE_ISINF@ REPLACE_ISNAN = @REPLACE_ISNAN@ REPLACE_ISWCNTRL = @REPLACE_ISWCNTRL@ REPLACE_LCHOWN = @REPLACE_LCHOWN@ REPLACE_LDEXPL = @REPLACE_LDEXPL@ REPLACE_LINK = @REPLACE_LINK@ REPLACE_LINKAT = @REPLACE_LINKAT@ REPLACE_LOCALTIME_R = @REPLACE_LOCALTIME_R@ REPLACE_LSEEK = @REPLACE_LSEEK@ REPLACE_LSTAT = @REPLACE_LSTAT@ REPLACE_MBRLEN = @REPLACE_MBRLEN@ REPLACE_MBRTOWC = @REPLACE_MBRTOWC@ REPLACE_MBSINIT = @REPLACE_MBSINIT@ REPLACE_MBSNRTOWCS = @REPLACE_MBSNRTOWCS@ REPLACE_MBSRTOWCS = @REPLACE_MBSRTOWCS@ REPLACE_MBSTATE_T = @REPLACE_MBSTATE_T@ REPLACE_MEMCHR = @REPLACE_MEMCHR@ REPLACE_MEMMEM = @REPLACE_MEMMEM@ REPLACE_MKDIR = @REPLACE_MKDIR@ REPLACE_MKFIFO = @REPLACE_MKFIFO@ REPLACE_MKNOD = @REPLACE_MKNOD@ REPLACE_MKSTEMP = @REPLACE_MKSTEMP@ REPLACE_MKTIME = @REPLACE_MKTIME@ REPLACE_NAN = @REPLACE_NAN@ REPLACE_NANOSLEEP = @REPLACE_NANOSLEEP@ REPLACE_NL_LANGINFO = @REPLACE_NL_LANGINFO@ REPLACE_NULL = @REPLACE_NULL@ REPLACE_OBSTACK_PRINTF = @REPLACE_OBSTACK_PRINTF@ REPLACE_OPEN = @REPLACE_OPEN@ REPLACE_OPENAT = @REPLACE_OPENAT@ REPLACE_PERROR = @REPLACE_PERROR@ REPLACE_POPEN = @REPLACE_POPEN@ REPLACE_PREAD = @REPLACE_PREAD@ REPLACE_PRINTF = @REPLACE_PRINTF@ REPLACE_PUTENV = @REPLACE_PUTENV@ REPLACE_READLINK = @REPLACE_READLINK@ REPLACE_REALPATH = @REPLACE_REALPATH@ REPLACE_REMOVE = @REPLACE_REMOVE@ REPLACE_RENAME = @REPLACE_RENAME@ REPLACE_RENAMEAT = @REPLACE_RENAMEAT@ REPLACE_RMDIR = @REPLACE_RMDIR@ REPLACE_ROUND = @REPLACE_ROUND@ REPLACE_ROUNDF = @REPLACE_ROUNDF@ REPLACE_ROUNDL = @REPLACE_ROUNDL@ REPLACE_SELECT = @REPLACE_SELECT@ REPLACE_SETENV = @REPLACE_SETENV@ REPLACE_SIGNBIT = @REPLACE_SIGNBIT@ REPLACE_SIGNBIT_USING_GCC = @REPLACE_SIGNBIT_USING_GCC@ REPLACE_SLEEP = @REPLACE_SLEEP@ REPLACE_SNPRINTF = @REPLACE_SNPRINTF@ REPLACE_SPRINTF = @REPLACE_SPRINTF@ REPLACE_STAT = @REPLACE_STAT@ REPLACE_STDIO_WRITE_FUNCS = @REPLACE_STDIO_WRITE_FUNCS@ REPLACE_STRCASESTR = @REPLACE_STRCASESTR@ REPLACE_STRDUP = @REPLACE_STRDUP@ REPLACE_STRERROR = @REPLACE_STRERROR@ REPLACE_STRNDUP = @REPLACE_STRNDUP@ REPLACE_STRPTIME = @REPLACE_STRPTIME@ REPLACE_STRSIGNAL = @REPLACE_STRSIGNAL@ REPLACE_STRSTR = @REPLACE_STRSTR@ REPLACE_STRTOD = @REPLACE_STRTOD@ REPLACE_STRTOK_R = @REPLACE_STRTOK_R@ REPLACE_SYMLINK = @REPLACE_SYMLINK@ REPLACE_TIMEGM = @REPLACE_TIMEGM@ REPLACE_TRUNCL = @REPLACE_TRUNCL@ REPLACE_UNLINK = @REPLACE_UNLINK@ REPLACE_UNLINKAT = @REPLACE_UNLINKAT@ REPLACE_UNSETENV = @REPLACE_UNSETENV@ REPLACE_USLEEP = @REPLACE_USLEEP@ REPLACE_UTIMENSAT = @REPLACE_UTIMENSAT@ REPLACE_VASPRINTF = @REPLACE_VASPRINTF@ REPLACE_VDPRINTF = @REPLACE_VDPRINTF@ REPLACE_VFPRINTF = @REPLACE_VFPRINTF@ REPLACE_VPRINTF = @REPLACE_VPRINTF@ REPLACE_VSNPRINTF = @REPLACE_VSNPRINTF@ REPLACE_VSPRINTF = @REPLACE_VSPRINTF@ REPLACE_WCRTOMB = @REPLACE_WCRTOMB@ REPLACE_WCSNRTOMBS = @REPLACE_WCSNRTOMBS@ REPLACE_WCSRTOMBS = @REPLACE_WCSRTOMBS@ REPLACE_WCTOB = @REPLACE_WCTOB@ REPLACE_WCWIDTH = @REPLACE_WCWIDTH@ REPLACE_WRITE = @REPLACE_WRITE@ RUBY = @RUBY@ RUBY_CCFLAGS = @RUBY_CCFLAGS@ RUBY_EXEC_PREFIX = @RUBY_EXEC_PREFIX@ RUBY_INCLUDES = @RUBY_INCLUDES@ RUBY_LIBS = @RUBY_LIBS@ RUBY_PLATFORM = @RUBY_PLATFORM@ RUBY_PREFIX = @RUBY_PREFIX@ RUBY_VERSION = @RUBY_VERSION@ SED = @SED@ SERVENT_LIB = @SERVENT_LIB@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ SIG_ATOMIC_T_SUFFIX = @SIG_ATOMIC_T_SUFFIX@ SIZE_T_SUFFIX = @SIZE_T_SUFFIX@ STDBOOL_H = @STDBOOL_H@ STDDEF_H = @STDDEF_H@ STDINT_H = @STDINT_H@ STRIP = @STRIP@ SWIG = @SWIG@ SYSCONFDIR = @SYSCONFDIR@ SYS_IOCTL_H_HAVE_WINSOCK2_H = @SYS_IOCTL_H_HAVE_WINSOCK2_H@ SYS_IOCTL_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS = @SYS_IOCTL_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS@ SYS_SOCKET_H = @SYS_SOCKET_H@ SYS_TIME_H_DEFINES_STRUCT_TIMESPEC = @SYS_TIME_H_DEFINES_STRUCT_TIMESPEC@ TIME_H_DEFINES_STRUCT_TIMESPEC = @TIME_H_DEFINES_STRUCT_TIMESPEC@ UNDEFINE_STRTOK_R = @UNDEFINE_STRTOK_R@ UNISTD_H_HAVE_WINSOCK2_H = @UNISTD_H_HAVE_WINSOCK2_H@ UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS = @UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS@ VALGRIND = @VALGRIND@ VERSION = @VERSION@ WCHAR_T_SUFFIX = @WCHAR_T_SUFFIX@ WCTYPE_H = @WCTYPE_H@ WINT_T_SUFFIX = @WINT_T_SUFFIX@ YACC = @YACC@ YFLAGS = @YFLAGS@ YIELD_LIB = @YIELD_LIB@ __PRELUDE_64BIT_FORMAT_PREFIX = @__PRELUDE_64BIT_FORMAT_PREFIX@ __PRELUDE_HAVE_64BIT_LONG = @__PRELUDE_HAVE_64BIT_LONG@ __PRELUDE_HAVE_INTTYPES_H = @__PRELUDE_HAVE_INTTYPES_H@ __PRELUDE_HAVE_STDINT_H = @__PRELUDE_HAVE_STDINT_H@ __PRELUDE_STDINT_HAVE_UINT16 = @__PRELUDE_STDINT_HAVE_UINT16@ __PRELUDE_STDINT_HAVE_UINT32 = @__PRELUDE_STDINT_HAVE_UINT32@ __PRELUDE_STDINT_HAVE_UINT64 = @__PRELUDE_STDINT_HAVE_UINT64@ __PRELUDE_STDINT_HAVE_UINT8 = @__PRELUDE_STDINT_HAVE_UINT8@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ gl_LIBOBJS = @gl_LIBOBJS@ gl_LTLIBOBJS = @gl_LTLIBOBJS@ gltests_LIBOBJS = @gltests_LIBOBJS@ gltests_LTLIBOBJS = @gltests_LTLIBOBJS@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ lt_ECHO = @lt_ECHO@ ltdl_LIBOBJS = @ltdl_LIBOBJS@ ltdl_LTLIBOBJS = @ltdl_LTLIBOBJS@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ pkgrbexecdir = @pkgrbexecdir@ pkgrubydir = @pkgrubydir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ rbexecdir = @rbexecdir@ rubydir = @rubydir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sys_symbol_underscore = @sys_symbol_underscore@ sysconfdir = @sysconfdir@ target = @target@ target_alias = @target_alias@ target_cpu = @target_cpu@ target_os = @target_os@ target_vendor = @target_vendor@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ @HAVE_EASY_BINDINGS_TRUE@@HAVE_RUBY_TRUE@EXTRA_DIST = libpreludecpp-ruby.i PreludeEasy.cxx @HAVE_EASY_BINDINGS_TRUE@@HAVE_RUBY_TRUE@rbexec_LTLIBRARIES = PreludeEasy.la @HAVE_EASY_BINDINGS_TRUE@@HAVE_RUBY_TRUE@PreludeEasy_la_CPPFLAGS = $(RUBY_INCLUDES) $(RUBY_CCFLAGS) -I@top_builddir@ -I$(top_srcdir)/src/include -I$(top_builddir)/src/include -I@top_builddir@/src/libprelude-error -I$(top_srcdir)/bindings/c++/include -I@top_srcdir@/libmissing -I@top_builddir@/libmissing @HAVE_EASY_BINDINGS_TRUE@@HAVE_RUBY_TRUE@PreludeEasy_la_LDFLAGS = -module -avoid-version @HAVE_EASY_BINDINGS_TRUE@@HAVE_RUBY_TRUE@PreludeEasy_la_LIBADD = $(top_builddir)/bindings/c++/.libs/libpreludecpp.la $(RUBY_LIBS) @HAVE_EASY_BINDINGS_TRUE@@HAVE_RUBY_TRUE@nodist_PreludeEasy_la_SOURCES = PreludeEasy.cxx all: all-am .SUFFIXES: .SUFFIXES: .cxx .lo .o .obj $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu bindings/ruby/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu bindings/ruby/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): install-rbexecLTLIBRARIES: $(rbexec_LTLIBRARIES) @$(NORMAL_INSTALL) test -z "$(rbexecdir)" || $(MKDIR_P) "$(DESTDIR)$(rbexecdir)" @list='$(rbexec_LTLIBRARIES)'; test -n "$(rbexecdir)" || list=; \ list2=; for p in $$list; do \ if test -f $$p; then \ list2="$$list2 $$p"; \ else :; fi; \ done; \ test -z "$$list2" || { \ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(rbexecdir)'"; \ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(rbexecdir)"; \ } uninstall-rbexecLTLIBRARIES: @$(NORMAL_UNINSTALL) @list='$(rbexec_LTLIBRARIES)'; test -n "$(rbexecdir)" || list=; \ for p in $$list; do \ $(am__strip_dir) \ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(rbexecdir)/$$f'"; \ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(rbexecdir)/$$f"; \ done clean-rbexecLTLIBRARIES: -test -z "$(rbexec_LTLIBRARIES)" || rm -f $(rbexec_LTLIBRARIES) @list='$(rbexec_LTLIBRARIES)'; for p in $$list; do \ dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ test "$$dir" != "$$p" || dir=.; \ echo "rm -f \"$${dir}/so_locations\""; \ rm -f "$${dir}/so_locations"; \ done PreludeEasy.la: $(PreludeEasy_la_OBJECTS) $(PreludeEasy_la_DEPENDENCIES) $(PreludeEasy_la_LINK) $(am_PreludeEasy_la_rpath) $(PreludeEasy_la_OBJECTS) $(PreludeEasy_la_LIBADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/PreludeEasy_la-PreludeEasy.Plo@am__quote@ .cxx.o: @am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ $< .cxx.obj: @am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'` .cxx.lo: @am__fastdepCXX_TRUE@ $(LTCXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(LTCXXCOMPILE) -c -o $@ $< PreludeEasy_la-PreludeEasy.lo: PreludeEasy.cxx @am__fastdepCXX_TRUE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(PreludeEasy_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT PreludeEasy_la-PreludeEasy.lo -MD -MP -MF $(DEPDIR)/PreludeEasy_la-PreludeEasy.Tpo -c -o PreludeEasy_la-PreludeEasy.lo `test -f 'PreludeEasy.cxx' || echo '$(srcdir)/'`PreludeEasy.cxx @am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/PreludeEasy_la-PreludeEasy.Tpo $(DEPDIR)/PreludeEasy_la-PreludeEasy.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='PreludeEasy.cxx' object='PreludeEasy_la-PreludeEasy.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(PreludeEasy_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o PreludeEasy_la-PreludeEasy.lo `test -f 'PreludeEasy.cxx' || echo '$(srcdir)/'`PreludeEasy.cxx mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ mkid -fID $$unique tags: TAGS TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) set x; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: CTAGS CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(LTLIBRARIES) installdirs: for dir in "$(DESTDIR)$(rbexecdir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic clean-libtool clean-rbexecLTLIBRARIES \ mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-rbexecLTLIBRARIES install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-rbexecLTLIBRARIES .MAKE: install-am install-strip .PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ clean-libtool clean-rbexecLTLIBRARIES ctags distclean \ distclean-compile distclean-generic distclean-libtool \ distclean-tags distdir dvi dvi-am html html-am info info-am \ install install-am install-data install-data-am install-dvi \ install-dvi-am install-exec install-exec-am install-html \ install-html-am install-info install-info-am install-man \ install-pdf install-pdf-am install-ps install-ps-am \ install-rbexecLTLIBRARIES install-strip installcheck \ installcheck-am installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-compile \ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ tags uninstall uninstall-am uninstall-rbexecLTLIBRARIES @HAVE_EASY_BINDINGS_TRUE@@HAVE_RUBY_TRUE@PreludeEasy.cxx: $(top_srcdir)/bindings/c++/include/*.hxx $(top_srcdir)/bindings/libpreludecpp.i libpreludecpp-ruby.i @HAVE_EASY_BINDINGS_TRUE@@HAVE_RUBY_TRUE@@HAVE_SWIG_TRUE@ $(SWIG) -c++ -I$(top_srcdir)/bindings -I$(top_srcdir)/bindings/c++/include -I$(top_srcdir)/src/include -I$(top_srcdir)/src/libprelude-error -ruby -o $@ $(top_srcdir)/bindings/libpreludecpp.i -include $(top_srcdir)/git.mk # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: libprelude-1.0.0/bindings/ruby/PreludeEasy.cxx0000664000076400007640000211004711330606207016321 00000000000000/* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). * Version 1.3.40 * * This file is not intended to be easily readable and contains a number of * coding conventions designed to improve portability and efficiency. Do not make * changes to this file unless you know what you are doing--modify the SWIG * interface file instead. * ----------------------------------------------------------------------------- */ #define SWIGRUBY #ifdef __cplusplus /* SwigValueWrapper is described in swig.swg */ template class SwigValueWrapper { struct SwigMovePointer { T *ptr; SwigMovePointer(T *p) : ptr(p) { } ~SwigMovePointer() { delete ptr; } SwigMovePointer& operator=(SwigMovePointer& rhs) { T* oldptr = ptr; ptr = 0; delete oldptr; ptr = rhs.ptr; rhs.ptr = 0; return *this; } } pointer; SwigValueWrapper& operator=(const SwigValueWrapper& rhs); SwigValueWrapper(const SwigValueWrapper& rhs); public: SwigValueWrapper() : pointer(0) { } SwigValueWrapper& operator=(const T& t) { SwigMovePointer tmp(new T(t)); pointer = tmp; return *this; } operator T&() const { return *pointer.ptr; } T *operator&() { return pointer.ptr; } }; template T SwigValueInit() { return T(); } #endif /* ----------------------------------------------------------------------------- * This section contains generic SWIG labels for method/variable * declarations/attributes, and other compiler dependent labels. * ----------------------------------------------------------------------------- */ /* template workaround for compilers that cannot correctly implement the C++ standard */ #ifndef SWIGTEMPLATEDISAMBIGUATOR # if defined(__SUNPRO_CC) && (__SUNPRO_CC <= 0x560) # define SWIGTEMPLATEDISAMBIGUATOR template # elif defined(__HP_aCC) /* Needed even with `aCC -AA' when `aCC -V' reports HP ANSI C++ B3910B A.03.55 */ /* If we find a maximum version that requires this, the test would be __HP_aCC <= 35500 for A.03.55 */ # define SWIGTEMPLATEDISAMBIGUATOR template # else # define SWIGTEMPLATEDISAMBIGUATOR # endif #endif /* inline attribute */ #ifndef SWIGINLINE # if defined(__cplusplus) || (defined(__GNUC__) && !defined(__STRICT_ANSI__)) # define SWIGINLINE inline # else # define SWIGINLINE # endif #endif /* attribute recognised by some compilers to avoid 'unused' warnings */ #ifndef SWIGUNUSED # if defined(__GNUC__) # if !(defined(__cplusplus)) || (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4)) # define SWIGUNUSED __attribute__ ((__unused__)) # else # define SWIGUNUSED # endif # elif defined(__ICC) # define SWIGUNUSED __attribute__ ((__unused__)) # else # define SWIGUNUSED # endif #endif #ifndef SWIG_MSC_UNSUPPRESS_4505 # if defined(_MSC_VER) # pragma warning(disable : 4505) /* unreferenced local function has been removed */ # endif #endif #ifndef SWIGUNUSEDPARM # ifdef __cplusplus # define SWIGUNUSEDPARM(p) # else # define SWIGUNUSEDPARM(p) p SWIGUNUSED # endif #endif /* internal SWIG method */ #ifndef SWIGINTERN # define SWIGINTERN static SWIGUNUSED #endif /* internal inline SWIG method */ #ifndef SWIGINTERNINLINE # define SWIGINTERNINLINE SWIGINTERN SWIGINLINE #endif /* exporting methods */ #if (__GNUC__ >= 4) || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4) # ifndef GCC_HASCLASSVISIBILITY # define GCC_HASCLASSVISIBILITY # endif #endif #ifndef SWIGEXPORT # if defined(_WIN32) || defined(__WIN32__) || defined(__CYGWIN__) # if defined(STATIC_LINKED) # define SWIGEXPORT # else # define SWIGEXPORT __declspec(dllexport) # endif # else # if defined(__GNUC__) && defined(GCC_HASCLASSVISIBILITY) # define SWIGEXPORT __attribute__ ((visibility("default"))) # else # define SWIGEXPORT # endif # endif #endif /* calling conventions for Windows */ #ifndef SWIGSTDCALL # if defined(_WIN32) || defined(__WIN32__) || defined(__CYGWIN__) # define SWIGSTDCALL __stdcall # else # define SWIGSTDCALL # endif #endif /* Deal with Microsoft's attempt at deprecating C standard runtime functions */ #if !defined(SWIG_NO_CRT_SECURE_NO_DEPRECATE) && defined(_MSC_VER) && !defined(_CRT_SECURE_NO_DEPRECATE) # define _CRT_SECURE_NO_DEPRECATE #endif /* Deal with Microsoft's attempt at deprecating methods in the standard C++ library */ #if !defined(SWIG_NO_SCL_SECURE_NO_DEPRECATE) && defined(_MSC_VER) && !defined(_SCL_SECURE_NO_DEPRECATE) # define _SCL_SECURE_NO_DEPRECATE #endif /* ----------------------------------------------------------------------------- * This section contains generic SWIG labels for method/variable * declarations/attributes, and other compiler dependent labels. * ----------------------------------------------------------------------------- */ /* template workaround for compilers that cannot correctly implement the C++ standard */ #ifndef SWIGTEMPLATEDISAMBIGUATOR # if defined(__SUNPRO_CC) && (__SUNPRO_CC <= 0x560) # define SWIGTEMPLATEDISAMBIGUATOR template # elif defined(__HP_aCC) /* Needed even with `aCC -AA' when `aCC -V' reports HP ANSI C++ B3910B A.03.55 */ /* If we find a maximum version that requires this, the test would be __HP_aCC <= 35500 for A.03.55 */ # define SWIGTEMPLATEDISAMBIGUATOR template # else # define SWIGTEMPLATEDISAMBIGUATOR # endif #endif /* inline attribute */ #ifndef SWIGINLINE # if defined(__cplusplus) || (defined(__GNUC__) && !defined(__STRICT_ANSI__)) # define SWIGINLINE inline # else # define SWIGINLINE # endif #endif /* attribute recognised by some compilers to avoid 'unused' warnings */ #ifndef SWIGUNUSED # if defined(__GNUC__) # if !(defined(__cplusplus)) || (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4)) # define SWIGUNUSED __attribute__ ((__unused__)) # else # define SWIGUNUSED # endif # elif defined(__ICC) # define SWIGUNUSED __attribute__ ((__unused__)) # else # define SWIGUNUSED # endif #endif #ifndef SWIG_MSC_UNSUPPRESS_4505 # if defined(_MSC_VER) # pragma warning(disable : 4505) /* unreferenced local function has been removed */ # endif #endif #ifndef SWIGUNUSEDPARM # ifdef __cplusplus # define SWIGUNUSEDPARM(p) # else # define SWIGUNUSEDPARM(p) p SWIGUNUSED # endif #endif /* internal SWIG method */ #ifndef SWIGINTERN # define SWIGINTERN static SWIGUNUSED #endif /* internal inline SWIG method */ #ifndef SWIGINTERNINLINE # define SWIGINTERNINLINE SWIGINTERN SWIGINLINE #endif /* exporting methods */ #if (__GNUC__ >= 4) || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4) # ifndef GCC_HASCLASSVISIBILITY # define GCC_HASCLASSVISIBILITY # endif #endif #ifndef SWIGEXPORT # if defined(_WIN32) || defined(__WIN32__) || defined(__CYGWIN__) # if defined(STATIC_LINKED) # define SWIGEXPORT # else # define SWIGEXPORT __declspec(dllexport) # endif # else # if defined(__GNUC__) && defined(GCC_HASCLASSVISIBILITY) # define SWIGEXPORT __attribute__ ((visibility("default"))) # else # define SWIGEXPORT # endif # endif #endif /* calling conventions for Windows */ #ifndef SWIGSTDCALL # if defined(_WIN32) || defined(__WIN32__) || defined(__CYGWIN__) # define SWIGSTDCALL __stdcall # else # define SWIGSTDCALL # endif #endif /* Deal with Microsoft's attempt at deprecating C standard runtime functions */ #if !defined(SWIG_NO_CRT_SECURE_NO_DEPRECATE) && defined(_MSC_VER) && !defined(_CRT_SECURE_NO_DEPRECATE) # define _CRT_SECURE_NO_DEPRECATE #endif /* Deal with Microsoft's attempt at deprecating methods in the standard C++ library */ #if !defined(SWIG_NO_SCL_SECURE_NO_DEPRECATE) && defined(_MSC_VER) && !defined(_SCL_SECURE_NO_DEPRECATE) # define _SCL_SECURE_NO_DEPRECATE #endif /* ----------------------------------------------------------------------------- * swigrun.swg * * This file contains generic C API SWIG runtime support for pointer * type checking. * ----------------------------------------------------------------------------- */ /* This should only be incremented when either the layout of swig_type_info changes, or for whatever reason, the runtime changes incompatibly */ #define SWIG_RUNTIME_VERSION "4" /* define SWIG_TYPE_TABLE_NAME as "SWIG_TYPE_TABLE" */ #ifdef SWIG_TYPE_TABLE # define SWIG_QUOTE_STRING(x) #x # define SWIG_EXPAND_AND_QUOTE_STRING(x) SWIG_QUOTE_STRING(x) # define SWIG_TYPE_TABLE_NAME SWIG_EXPAND_AND_QUOTE_STRING(SWIG_TYPE_TABLE) #else # define SWIG_TYPE_TABLE_NAME #endif /* You can use the SWIGRUNTIME and SWIGRUNTIMEINLINE macros for creating a static or dynamic library from the SWIG runtime code. In 99.9% of the cases, SWIG just needs to declare them as 'static'. But only do this if strictly necessary, ie, if you have problems with your compiler or suchlike. */ #ifndef SWIGRUNTIME # define SWIGRUNTIME SWIGINTERN #endif #ifndef SWIGRUNTIMEINLINE # define SWIGRUNTIMEINLINE SWIGRUNTIME SWIGINLINE #endif /* Generic buffer size */ #ifndef SWIG_BUFFER_SIZE # define SWIG_BUFFER_SIZE 1024 #endif /* Flags for pointer conversions */ #define SWIG_POINTER_DISOWN 0x1 #define SWIG_CAST_NEW_MEMORY 0x2 /* Flags for new pointer objects */ #define SWIG_POINTER_OWN 0x1 /* Flags/methods for returning states. The SWIG conversion methods, as ConvertPtr, return and integer that tells if the conversion was successful or not. And if not, an error code can be returned (see swigerrors.swg for the codes). Use the following macros/flags to set or process the returning states. In old versions of SWIG, code such as the following was usually written: if (SWIG_ConvertPtr(obj,vptr,ty.flags) != -1) { // success code } else { //fail code } Now you can be more explicit: int res = SWIG_ConvertPtr(obj,vptr,ty.flags); if (SWIG_IsOK(res)) { // success code } else { // fail code } which is the same really, but now you can also do Type *ptr; int res = SWIG_ConvertPtr(obj,(void **)(&ptr),ty.flags); if (SWIG_IsOK(res)) { // success code if (SWIG_IsNewObj(res) { ... delete *ptr; } else { ... } } else { // fail code } I.e., now SWIG_ConvertPtr can return new objects and you can identify the case and take care of the deallocation. Of course that also requires SWIG_ConvertPtr to return new result values, such as int SWIG_ConvertPtr(obj, ptr,...) { if () { if () { *ptr = ; return SWIG_NEWOBJ; } else { *ptr = ; return SWIG_OLDOBJ; } } else { return SWIG_BADOBJ; } } Of course, returning the plain '0(success)/-1(fail)' still works, but you can be more explicit by returning SWIG_BADOBJ, SWIG_ERROR or any of the SWIG errors code. Finally, if the SWIG_CASTRANK_MODE is enabled, the result code allows to return the 'cast rank', for example, if you have this int food(double) int fooi(int); and you call food(1) // cast rank '1' (1 -> 1.0) fooi(1) // cast rank '0' just use the SWIG_AddCast()/SWIG_CheckState() */ #define SWIG_OK (0) #define SWIG_ERROR (-1) #define SWIG_IsOK(r) (r >= 0) #define SWIG_ArgError(r) ((r != SWIG_ERROR) ? r : SWIG_TypeError) /* The CastRankLimit says how many bits are used for the cast rank */ #define SWIG_CASTRANKLIMIT (1 << 8) /* The NewMask denotes the object was created (using new/malloc) */ #define SWIG_NEWOBJMASK (SWIG_CASTRANKLIMIT << 1) /* The TmpMask is for in/out typemaps that use temporal objects */ #define SWIG_TMPOBJMASK (SWIG_NEWOBJMASK << 1) /* Simple returning values */ #define SWIG_BADOBJ (SWIG_ERROR) #define SWIG_OLDOBJ (SWIG_OK) #define SWIG_NEWOBJ (SWIG_OK | SWIG_NEWOBJMASK) #define SWIG_TMPOBJ (SWIG_OK | SWIG_TMPOBJMASK) /* Check, add and del mask methods */ #define SWIG_AddNewMask(r) (SWIG_IsOK(r) ? (r | SWIG_NEWOBJMASK) : r) #define SWIG_DelNewMask(r) (SWIG_IsOK(r) ? (r & ~SWIG_NEWOBJMASK) : r) #define SWIG_IsNewObj(r) (SWIG_IsOK(r) && (r & SWIG_NEWOBJMASK)) #define SWIG_AddTmpMask(r) (SWIG_IsOK(r) ? (r | SWIG_TMPOBJMASK) : r) #define SWIG_DelTmpMask(r) (SWIG_IsOK(r) ? (r & ~SWIG_TMPOBJMASK) : r) #define SWIG_IsTmpObj(r) (SWIG_IsOK(r) && (r & SWIG_TMPOBJMASK)) /* Cast-Rank Mode */ #if defined(SWIG_CASTRANK_MODE) # ifndef SWIG_TypeRank # define SWIG_TypeRank unsigned long # endif # ifndef SWIG_MAXCASTRANK /* Default cast allowed */ # define SWIG_MAXCASTRANK (2) # endif # define SWIG_CASTRANKMASK ((SWIG_CASTRANKLIMIT) -1) # define SWIG_CastRank(r) (r & SWIG_CASTRANKMASK) SWIGINTERNINLINE int SWIG_AddCast(int r) { return SWIG_IsOK(r) ? ((SWIG_CastRank(r) < SWIG_MAXCASTRANK) ? (r + 1) : SWIG_ERROR) : r; } SWIGINTERNINLINE int SWIG_CheckState(int r) { return SWIG_IsOK(r) ? SWIG_CastRank(r) + 1 : 0; } #else /* no cast-rank mode */ # define SWIG_AddCast # define SWIG_CheckState(r) (SWIG_IsOK(r) ? 1 : 0) #endif #include #ifdef __cplusplus extern "C" { #endif typedef void *(*swig_converter_func)(void *, int *); typedef struct swig_type_info *(*swig_dycast_func)(void **); /* Structure to store information on one type */ typedef struct swig_type_info { const char *name; /* mangled name of this type */ const char *str; /* human readable name of this type */ swig_dycast_func dcast; /* dynamic cast function down a hierarchy */ struct swig_cast_info *cast; /* linked list of types that can cast into this type */ void *clientdata; /* language specific type data */ int owndata; /* flag if the structure owns the clientdata */ } swig_type_info; /* Structure to store a type and conversion function used for casting */ typedef struct swig_cast_info { swig_type_info *type; /* pointer to type that is equivalent to this type */ swig_converter_func converter; /* function to cast the void pointers */ struct swig_cast_info *next; /* pointer to next cast in linked list */ struct swig_cast_info *prev; /* pointer to the previous cast */ } swig_cast_info; /* Structure used to store module information * Each module generates one structure like this, and the runtime collects * all of these structures and stores them in a circularly linked list.*/ typedef struct swig_module_info { swig_type_info **types; /* Array of pointers to swig_type_info structures that are in this module */ size_t size; /* Number of types in this module */ struct swig_module_info *next; /* Pointer to next element in circularly linked list */ swig_type_info **type_initial; /* Array of initially generated type structures */ swig_cast_info **cast_initial; /* Array of initially generated casting structures */ void *clientdata; /* Language specific module data */ } swig_module_info; /* Compare two type names skipping the space characters, therefore "char*" == "char *" and "Class" == "Class", etc. Return 0 when the two name types are equivalent, as in strncmp, but skipping ' '. */ SWIGRUNTIME int SWIG_TypeNameComp(const char *f1, const char *l1, const char *f2, const char *l2) { for (;(f1 != l1) && (f2 != l2); ++f1, ++f2) { while ((*f1 == ' ') && (f1 != l1)) ++f1; while ((*f2 == ' ') && (f2 != l2)) ++f2; if (*f1 != *f2) return (*f1 > *f2) ? 1 : -1; } return (int)((l1 - f1) - (l2 - f2)); } /* Check type equivalence in a name list like ||... Return 0 if not equal, 1 if equal */ SWIGRUNTIME int SWIG_TypeEquiv(const char *nb, const char *tb) { int equiv = 0; const char* te = tb + strlen(tb); const char* ne = nb; while (!equiv && *ne) { for (nb = ne; *ne; ++ne) { if (*ne == '|') break; } equiv = (SWIG_TypeNameComp(nb, ne, tb, te) == 0) ? 1 : 0; if (*ne) ++ne; } return equiv; } /* Check type equivalence in a name list like ||... Return 0 if equal, -1 if nb < tb, 1 if nb > tb */ SWIGRUNTIME int SWIG_TypeCompare(const char *nb, const char *tb) { int equiv = 0; const char* te = tb + strlen(tb); const char* ne = nb; while (!equiv && *ne) { for (nb = ne; *ne; ++ne) { if (*ne == '|') break; } equiv = (SWIG_TypeNameComp(nb, ne, tb, te) == 0) ? 1 : 0; if (*ne) ++ne; } return equiv; } /* Check the typename */ SWIGRUNTIME swig_cast_info * SWIG_TypeCheck(const char *c, swig_type_info *ty) { if (ty) { swig_cast_info *iter = ty->cast; while (iter) { if (strcmp(iter->type->name, c) == 0) { if (iter == ty->cast) return iter; /* Move iter to the top of the linked list */ iter->prev->next = iter->next; if (iter->next) iter->next->prev = iter->prev; iter->next = ty->cast; iter->prev = 0; if (ty->cast) ty->cast->prev = iter; ty->cast = iter; return iter; } iter = iter->next; } } return 0; } /* Identical to SWIG_TypeCheck, except strcmp is replaced with a pointer comparison */ SWIGRUNTIME swig_cast_info * SWIG_TypeCheckStruct(swig_type_info *from, swig_type_info *ty) { if (ty) { swig_cast_info *iter = ty->cast; while (iter) { if (iter->type == from) { if (iter == ty->cast) return iter; /* Move iter to the top of the linked list */ iter->prev->next = iter->next; if (iter->next) iter->next->prev = iter->prev; iter->next = ty->cast; iter->prev = 0; if (ty->cast) ty->cast->prev = iter; ty->cast = iter; return iter; } iter = iter->next; } } return 0; } /* Cast a pointer up an inheritance hierarchy */ SWIGRUNTIMEINLINE void * SWIG_TypeCast(swig_cast_info *ty, void *ptr, int *newmemory) { return ((!ty) || (!ty->converter)) ? ptr : (*ty->converter)(ptr, newmemory); } /* Dynamic pointer casting. Down an inheritance hierarchy */ SWIGRUNTIME swig_type_info * SWIG_TypeDynamicCast(swig_type_info *ty, void **ptr) { swig_type_info *lastty = ty; if (!ty || !ty->dcast) return ty; while (ty && (ty->dcast)) { ty = (*ty->dcast)(ptr); if (ty) lastty = ty; } return lastty; } /* Return the name associated with this type */ SWIGRUNTIMEINLINE const char * SWIG_TypeName(const swig_type_info *ty) { return ty->name; } /* Return the pretty name associated with this type, that is an unmangled type name in a form presentable to the user. */ SWIGRUNTIME const char * SWIG_TypePrettyName(const swig_type_info *type) { /* The "str" field contains the equivalent pretty names of the type, separated by vertical-bar characters. We choose to print the last name, as it is often (?) the most specific. */ if (!type) return NULL; if (type->str != NULL) { const char *last_name = type->str; const char *s; for (s = type->str; *s; s++) if (*s == '|') last_name = s+1; return last_name; } else return type->name; } /* Set the clientdata field for a type */ SWIGRUNTIME void SWIG_TypeClientData(swig_type_info *ti, void *clientdata) { swig_cast_info *cast = ti->cast; /* if (ti->clientdata == clientdata) return; */ ti->clientdata = clientdata; while (cast) { if (!cast->converter) { swig_type_info *tc = cast->type; if (!tc->clientdata) { SWIG_TypeClientData(tc, clientdata); } } cast = cast->next; } } SWIGRUNTIME void SWIG_TypeNewClientData(swig_type_info *ti, void *clientdata) { SWIG_TypeClientData(ti, clientdata); ti->owndata = 1; } /* Search for a swig_type_info structure only by mangled name Search is a O(log #types) We start searching at module start, and finish searching when start == end. Note: if start == end at the beginning of the function, we go all the way around the circular list. */ SWIGRUNTIME swig_type_info * SWIG_MangledTypeQueryModule(swig_module_info *start, swig_module_info *end, const char *name) { swig_module_info *iter = start; do { if (iter->size) { register size_t l = 0; register size_t r = iter->size - 1; do { /* since l+r >= 0, we can (>> 1) instead (/ 2) */ register size_t i = (l + r) >> 1; const char *iname = iter->types[i]->name; if (iname) { register int compare = strcmp(name, iname); if (compare == 0) { return iter->types[i]; } else if (compare < 0) { if (i) { r = i - 1; } else { break; } } else if (compare > 0) { l = i + 1; } } else { break; /* should never happen */ } } while (l <= r); } iter = iter->next; } while (iter != end); return 0; } /* Search for a swig_type_info structure for either a mangled name or a human readable name. It first searches the mangled names of the types, which is a O(log #types) If a type is not found it then searches the human readable names, which is O(#types). We start searching at module start, and finish searching when start == end. Note: if start == end at the beginning of the function, we go all the way around the circular list. */ SWIGRUNTIME swig_type_info * SWIG_TypeQueryModule(swig_module_info *start, swig_module_info *end, const char *name) { /* STEP 1: Search the name field using binary search */ swig_type_info *ret = SWIG_MangledTypeQueryModule(start, end, name); if (ret) { return ret; } else { /* STEP 2: If the type hasn't been found, do a complete search of the str field (the human readable name) */ swig_module_info *iter = start; do { register size_t i = 0; for (; i < iter->size; ++i) { if (iter->types[i]->str && (SWIG_TypeEquiv(iter->types[i]->str, name))) return iter->types[i]; } iter = iter->next; } while (iter != end); } /* neither found a match */ return 0; } /* Pack binary data into a string */ SWIGRUNTIME char * SWIG_PackData(char *c, void *ptr, size_t sz) { static const char hex[17] = "0123456789abcdef"; register const unsigned char *u = (unsigned char *) ptr; register const unsigned char *eu = u + sz; for (; u != eu; ++u) { register unsigned char uu = *u; *(c++) = hex[(uu & 0xf0) >> 4]; *(c++) = hex[uu & 0xf]; } return c; } /* Unpack binary data from a string */ SWIGRUNTIME const char * SWIG_UnpackData(const char *c, void *ptr, size_t sz) { register unsigned char *u = (unsigned char *) ptr; register const unsigned char *eu = u + sz; for (; u != eu; ++u) { register char d = *(c++); register unsigned char uu; if ((d >= '0') && (d <= '9')) uu = ((d - '0') << 4); else if ((d >= 'a') && (d <= 'f')) uu = ((d - ('a'-10)) << 4); else return (char *) 0; d = *(c++); if ((d >= '0') && (d <= '9')) uu |= (d - '0'); else if ((d >= 'a') && (d <= 'f')) uu |= (d - ('a'-10)); else return (char *) 0; *u = uu; } return c; } /* Pack 'void *' into a string buffer. */ SWIGRUNTIME char * SWIG_PackVoidPtr(char *buff, void *ptr, const char *name, size_t bsz) { char *r = buff; if ((2*sizeof(void *) + 2) > bsz) return 0; *(r++) = '_'; r = SWIG_PackData(r,&ptr,sizeof(void *)); if (strlen(name) + 1 > (bsz - (r - buff))) return 0; strcpy(r,name); return buff; } SWIGRUNTIME const char * SWIG_UnpackVoidPtr(const char *c, void **ptr, const char *name) { if (*c != '_') { if (strcmp(c,"NULL") == 0) { *ptr = (void *) 0; return name; } else { return 0; } } return SWIG_UnpackData(++c,ptr,sizeof(void *)); } SWIGRUNTIME char * SWIG_PackDataName(char *buff, void *ptr, size_t sz, const char *name, size_t bsz) { char *r = buff; size_t lname = (name ? strlen(name) : 0); if ((2*sz + 2 + lname) > bsz) return 0; *(r++) = '_'; r = SWIG_PackData(r,ptr,sz); if (lname) { strncpy(r,name,lname+1); } else { *r = 0; } return buff; } SWIGRUNTIME const char * SWIG_UnpackDataName(const char *c, void *ptr, size_t sz, const char *name) { if (*c != '_') { if (strcmp(c,"NULL") == 0) { memset(ptr,0,sz); return name; } else { return 0; } } return SWIG_UnpackData(++c,ptr,sz); } #ifdef __cplusplus } #endif /* Errors in SWIG */ #define SWIG_UnknownError -1 #define SWIG_IOError -2 #define SWIG_RuntimeError -3 #define SWIG_IndexError -4 #define SWIG_TypeError -5 #define SWIG_DivisionByZero -6 #define SWIG_OverflowError -7 #define SWIG_SyntaxError -8 #define SWIG_ValueError -9 #define SWIG_SystemError -10 #define SWIG_AttributeError -11 #define SWIG_MemoryError -12 #define SWIG_NullReferenceError -13 #include /* Remove global macros defined in Ruby's win32.h */ #ifdef write # undef write #endif #ifdef read # undef read #endif #ifdef bind # undef bind #endif #ifdef close # undef close #endif #ifdef connect # undef connect #endif /* Ruby 1.7 defines NUM2LL(), LL2NUM() and ULL2NUM() macros */ #ifndef NUM2LL #define NUM2LL(x) NUM2LONG((x)) #endif #ifndef LL2NUM #define LL2NUM(x) INT2NUM((long) (x)) #endif #ifndef ULL2NUM #define ULL2NUM(x) UINT2NUM((unsigned long) (x)) #endif /* Ruby 1.7 doesn't (yet) define NUM2ULL() */ #ifndef NUM2ULL #ifdef HAVE_LONG_LONG #define NUM2ULL(x) rb_num2ull((x)) #else #define NUM2ULL(x) NUM2ULONG(x) #endif #endif /* RSTRING_LEN, etc are new in Ruby 1.9, but ->ptr and ->len no longer work */ /* Define these for older versions so we can just write code the new way */ #ifndef RSTRING_LEN # define RSTRING_LEN(x) RSTRING(x)->len #endif #ifndef RSTRING_PTR # define RSTRING_PTR(x) RSTRING(x)->ptr #endif #ifndef RSTRING_END # define RSTRING_END(x) (RSTRING_PTR(x) + RSTRING_LEN(x)) #endif #ifndef RARRAY_LEN # define RARRAY_LEN(x) RARRAY(x)->len #endif #ifndef RARRAY_PTR # define RARRAY_PTR(x) RARRAY(x)->ptr #endif #ifndef RFLOAT_VALUE # define RFLOAT_VALUE(x) RFLOAT(x)->value #endif #ifndef DOUBLE2NUM # define DOUBLE2NUM(x) rb_float_new(x) #endif #ifndef RHASH_TBL # define RHASH_TBL(x) (RHASH(x)->tbl) #endif #ifndef RHASH_ITER_LEV # define RHASH_ITER_LEV(x) (RHASH(x)->iter_lev) #endif #ifndef RHASH_IFNONE # define RHASH_IFNONE(x) (RHASH(x)->ifnone) #endif #ifndef RHASH_SIZE # define RHASH_SIZE(x) (RHASH(x)->tbl->num_entries) #endif #ifndef RHASH_EMPTY_P # define RHASH_EMPTY_P(x) (RHASH_SIZE(x) == 0) #endif #ifndef RSTRUCT_LEN # define RSTRUCT_LEN(x) RSTRUCT(x)->len #endif #ifndef RSTRUCT_PTR # define RSTRUCT_PTR(x) RSTRUCT(x)->ptr #endif /* * Need to be very careful about how these macros are defined, especially * when compiling C++ code or C code with an ANSI C compiler. * * VALUEFUNC(f) is a macro used to typecast a C function that implements * a Ruby method so that it can be passed as an argument to API functions * like rb_define_method() and rb_define_singleton_method(). * * VOIDFUNC(f) is a macro used to typecast a C function that implements * either the "mark" or "free" stuff for a Ruby Data object, so that it * can be passed as an argument to API functions like Data_Wrap_Struct() * and Data_Make_Struct(). */ #ifdef __cplusplus # ifndef RUBY_METHOD_FUNC /* These definitions should work for Ruby 1.4.6 */ # define PROTECTFUNC(f) ((VALUE (*)()) f) # define VALUEFUNC(f) ((VALUE (*)()) f) # define VOIDFUNC(f) ((void (*)()) f) # else # ifndef ANYARGS /* These definitions should work for Ruby 1.6 */ # define PROTECTFUNC(f) ((VALUE (*)()) f) # define VALUEFUNC(f) ((VALUE (*)()) f) # define VOIDFUNC(f) ((RUBY_DATA_FUNC) f) # else /* These definitions should work for Ruby 1.7+ */ # define PROTECTFUNC(f) ((VALUE (*)(VALUE)) f) # define VALUEFUNC(f) ((VALUE (*)(ANYARGS)) f) # define VOIDFUNC(f) ((RUBY_DATA_FUNC) f) # endif # endif #else # define VALUEFUNC(f) (f) # define VOIDFUNC(f) (f) #endif /* Don't use for expressions have side effect */ #ifndef RB_STRING_VALUE #define RB_STRING_VALUE(s) (TYPE(s) == T_STRING ? (s) : (*(volatile VALUE *)&(s) = rb_str_to_str(s))) #endif #ifndef StringValue #define StringValue(s) RB_STRING_VALUE(s) #endif #ifndef StringValuePtr #define StringValuePtr(s) RSTRING_PTR(RB_STRING_VALUE(s)) #endif #ifndef StringValueLen #define StringValueLen(s) RSTRING_LEN(RB_STRING_VALUE(s)) #endif #ifndef SafeStringValue #define SafeStringValue(v) do {\ StringValue(v);\ rb_check_safe_str(v);\ } while (0) #endif #ifndef HAVE_RB_DEFINE_ALLOC_FUNC #define rb_define_alloc_func(klass, func) rb_define_singleton_method((klass), "new", VALUEFUNC((func)), -1) #define rb_undef_alloc_func(klass) rb_undef_method(CLASS_OF((klass)), "new") #endif static VALUE _mSWIG = Qnil; /* ----------------------------------------------------------------------------- * error manipulation * ----------------------------------------------------------------------------- */ /* Define some additional error types */ #define SWIG_ObjectPreviouslyDeletedError -100 /* Define custom exceptions for errors that do not map to existing Ruby exceptions. Note this only works for C++ since a global cannot be initialized by a funtion in C. For C, fallback to rb_eRuntimeError.*/ SWIGINTERN VALUE getNullReferenceError(void) { static int init = 0; static VALUE rb_eNullReferenceError ; if (!init) { init = 1; rb_eNullReferenceError = rb_define_class("NullReferenceError", rb_eRuntimeError); } return rb_eNullReferenceError; } SWIGINTERN VALUE getObjectPreviouslyDeletedError(void) { static int init = 0; static VALUE rb_eObjectPreviouslyDeleted ; if (!init) { init = 1; rb_eObjectPreviouslyDeleted = rb_define_class("ObjectPreviouslyDeleted", rb_eRuntimeError); } return rb_eObjectPreviouslyDeleted; } SWIGINTERN VALUE SWIG_Ruby_ErrorType(int SWIG_code) { VALUE type; switch (SWIG_code) { case SWIG_MemoryError: type = rb_eNoMemError; break; case SWIG_IOError: type = rb_eIOError; break; case SWIG_RuntimeError: type = rb_eRuntimeError; break; case SWIG_IndexError: type = rb_eIndexError; break; case SWIG_TypeError: type = rb_eTypeError; break; case SWIG_DivisionByZero: type = rb_eZeroDivError; break; case SWIG_OverflowError: type = rb_eRangeError; break; case SWIG_SyntaxError: type = rb_eSyntaxError; break; case SWIG_ValueError: type = rb_eArgError; break; case SWIG_SystemError: type = rb_eFatal; break; case SWIG_AttributeError: type = rb_eRuntimeError; break; case SWIG_NullReferenceError: type = getNullReferenceError(); break; case SWIG_ObjectPreviouslyDeletedError: type = getObjectPreviouslyDeletedError(); break; case SWIG_UnknownError: type = rb_eRuntimeError; break; default: type = rb_eRuntimeError; } return type; } /* This function is called when a user inputs a wrong argument to a method. */ SWIGINTERN const char* Ruby_Format_TypeError( const char* msg, const char* type, const char* name, const int argn, VALUE input ) { char buf[128]; VALUE str; VALUE asStr; if ( msg && *msg ) { str = rb_str_new2(msg); } else { str = rb_str_new(NULL, 0); } str = rb_str_cat2( str, "Expected argument " ); sprintf( buf, "%d of type ", argn-1 ); str = rb_str_cat2( str, buf ); str = rb_str_cat2( str, type ); str = rb_str_cat2( str, ", but got " ); str = rb_str_cat2( str, rb_obj_classname(input) ); str = rb_str_cat2( str, " " ); asStr = rb_inspect(input); if ( RSTRING_LEN(asStr) > 30 ) { str = rb_str_cat( str, StringValuePtr(asStr), 30 ); str = rb_str_cat2( str, "..." ); } else { str = rb_str_append( str, asStr ); } if ( name ) { str = rb_str_cat2( str, "\n\tin SWIG method '" ); str = rb_str_cat2( str, name ); str = rb_str_cat2( str, "'" ); } return StringValuePtr( str ); } /* This function is called when an overloaded method fails */ SWIGINTERN void Ruby_Format_OverloadedError( const int argc, const int maxargs, const char* method, const char* prototypes ) { const char* msg = "Wrong # of arguments"; if ( argc <= maxargs ) msg = "Wrong arguments"; rb_raise(rb_eArgError,"%s for overloaded method '%s'.\n" "Possible C/C++ prototypes are:\n%s", msg, method, prototypes); } /* ----------------------------------------------------------------------------- * See the LICENSE file for information on copyright, usage and redistribution * of SWIG, and the README file for authors - http://www.swig.org/release.html. * * rubytracking.swg * * This file contains support for tracking mappings from * Ruby objects to C++ objects. This functionality is needed * to implement mark functions for Ruby's mark and sweep * garbage collector. * ----------------------------------------------------------------------------- */ #ifdef __cplusplus extern "C" { #endif /* Ruby 1.8 actually assumes the first case. */ #if SIZEOF_VOIDP == SIZEOF_LONG # define SWIG2NUM(v) LONG2NUM((unsigned long)v) # define NUM2SWIG(x) (unsigned long)NUM2LONG(x) #elif SIZEOF_VOIDP == SIZEOF_LONG_LONG # define SWIG2NUM(v) LL2NUM((unsigned long long)v) # define NUM2SWIG(x) (unsigned long long)NUM2LL(x) #else # error sizeof(void*) is not the same as long or long long #endif /* Global Ruby hash table to store Trackings from C/C++ structs to Ruby Objects. */ static VALUE swig_ruby_trackings = Qnil; /* Global variable that stores a reference to the ruby hash table delete function. */ static ID swig_ruby_hash_delete; /* Setup a Ruby hash table to store Trackings */ SWIGRUNTIME void SWIG_RubyInitializeTrackings(void) { /* Create a ruby hash table to store Trackings from C++ objects to Ruby objects. */ /* Try to see if some other .so has already created a tracking hash table, which we keep hidden in an instance var in the SWIG module. This is done to allow multiple DSOs to share the same tracking table. */ ID trackings_id = rb_intern( "@__trackings__" ); VALUE verbose = rb_gv_get("VERBOSE"); rb_gv_set("VERBOSE", Qfalse); swig_ruby_trackings = rb_ivar_get( _mSWIG, trackings_id ); rb_gv_set("VERBOSE", verbose); /* No, it hasn't. Create one ourselves */ if ( swig_ruby_trackings == Qnil ) { swig_ruby_trackings = rb_hash_new(); rb_ivar_set( _mSWIG, trackings_id, swig_ruby_trackings ); } /* Now store a reference to the hash table delete function so that we only have to look it up once.*/ swig_ruby_hash_delete = rb_intern("delete"); } /* Get a Ruby number to reference a pointer */ SWIGRUNTIME VALUE SWIG_RubyPtrToReference(void* ptr) { /* We cast the pointer to an unsigned long and then store a reference to it using a Ruby number object. */ /* Convert the pointer to a Ruby number */ return SWIG2NUM(ptr); } /* Get a Ruby number to reference an object */ SWIGRUNTIME VALUE SWIG_RubyObjectToReference(VALUE object) { /* We cast the object to an unsigned long and then store a reference to it using a Ruby number object. */ /* Convert the Object to a Ruby number */ return SWIG2NUM(object); } /* Get a Ruby object from a previously stored reference */ SWIGRUNTIME VALUE SWIG_RubyReferenceToObject(VALUE reference) { /* The provided Ruby number object is a reference to the Ruby object we want.*/ /* Convert the Ruby number to a Ruby object */ return NUM2SWIG(reference); } /* Add a Tracking from a C/C++ struct to a Ruby object */ SWIGRUNTIME void SWIG_RubyAddTracking(void* ptr, VALUE object) { /* In a Ruby hash table we store the pointer and the associated Ruby object. The trick here is that we cannot store the Ruby object directly - if we do then it cannot be garbage collected. So instead we typecast it as a unsigned long and convert it to a Ruby number object.*/ /* Get a reference to the pointer as a Ruby number */ VALUE key = SWIG_RubyPtrToReference(ptr); /* Get a reference to the Ruby object as a Ruby number */ VALUE value = SWIG_RubyObjectToReference(object); /* Store the mapping to the global hash table. */ rb_hash_aset(swig_ruby_trackings, key, value); } /* Get the Ruby object that owns the specified C/C++ struct */ SWIGRUNTIME VALUE SWIG_RubyInstanceFor(void* ptr) { /* Get a reference to the pointer as a Ruby number */ VALUE key = SWIG_RubyPtrToReference(ptr); /* Now lookup the value stored in the global hash table */ VALUE value = rb_hash_aref(swig_ruby_trackings, key); if (value == Qnil) { /* No object exists - return nil. */ return Qnil; } else { /* Convert this value to Ruby object */ return SWIG_RubyReferenceToObject(value); } } /* Remove a Tracking from a C/C++ struct to a Ruby object. It is very important to remove objects once they are destroyed since the same memory address may be reused later to create a new object. */ SWIGRUNTIME void SWIG_RubyRemoveTracking(void* ptr) { /* Get a reference to the pointer as a Ruby number */ VALUE key = SWIG_RubyPtrToReference(ptr); /* Delete the object from the hash table by calling Ruby's do this we need to call the Hash.delete method.*/ rb_funcall(swig_ruby_trackings, swig_ruby_hash_delete, 1, key); } /* This is a helper method that unlinks a Ruby object from its underlying C++ object. This is needed if the lifetime of the Ruby object is longer than the C++ object */ SWIGRUNTIME void SWIG_RubyUnlinkObjects(void* ptr) { VALUE object = SWIG_RubyInstanceFor(ptr); if (object != Qnil) { DATA_PTR(object) = 0; } } #ifdef __cplusplus } #endif /* ----------------------------------------------------------------------------- * Ruby API portion that goes into the runtime * ----------------------------------------------------------------------------- */ #ifdef __cplusplus extern "C" { #endif SWIGINTERN VALUE SWIG_Ruby_AppendOutput(VALUE target, VALUE o) { if (NIL_P(target)) { target = o; } else { if (TYPE(target) != T_ARRAY) { VALUE o2 = target; target = rb_ary_new(); rb_ary_push(target, o2); } rb_ary_push(target, o); } return target; } /* For ruby1.8.4 and earlier. */ #ifndef RUBY_INIT_STACK RUBY_EXTERN void Init_stack(VALUE* addr); # define RUBY_INIT_STACK \ VALUE variable_in_this_stack_frame; \ Init_stack(&variable_in_this_stack_frame); #endif #ifdef __cplusplus } #endif /* ----------------------------------------------------------------------------- * See the LICENSE file for information on copyright, usage and redistribution * of SWIG, and the README file for authors - http://www.swig.org/release.html. * * rubyrun.swg * * This file contains the runtime support for Ruby modules * and includes code for managing global variables and pointer * type checking. * ----------------------------------------------------------------------------- */ /* For backward compatibility only */ #define SWIG_POINTER_EXCEPTION 0 /* for raw pointers */ #define SWIG_ConvertPtr(obj, pptr, type, flags) SWIG_Ruby_ConvertPtrAndOwn(obj, pptr, type, flags, 0) #define SWIG_ConvertPtrAndOwn(obj,pptr,type,flags,own) SWIG_Ruby_ConvertPtrAndOwn(obj, pptr, type, flags, own) #define SWIG_NewPointerObj(ptr, type, flags) SWIG_Ruby_NewPointerObj(ptr, type, flags) #define SWIG_AcquirePtr(ptr, own) SWIG_Ruby_AcquirePtr(ptr, own) #define swig_owntype ruby_owntype /* for raw packed data */ #define SWIG_ConvertPacked(obj, ptr, sz, ty) SWIG_Ruby_ConvertPacked(obj, ptr, sz, ty, flags) #define SWIG_NewPackedObj(ptr, sz, type) SWIG_Ruby_NewPackedObj(ptr, sz, type) /* for class or struct pointers */ #define SWIG_ConvertInstance(obj, pptr, type, flags) SWIG_ConvertPtr(obj, pptr, type, flags) #define SWIG_NewInstanceObj(ptr, type, flags) SWIG_NewPointerObj(ptr, type, flags) /* for C or C++ function pointers */ #define SWIG_ConvertFunctionPtr(obj, pptr, type) SWIG_ConvertPtr(obj, pptr, type, 0) #define SWIG_NewFunctionPtrObj(ptr, type) SWIG_NewPointerObj(ptr, type, 0) /* for C++ member pointers, ie, member methods */ #define SWIG_ConvertMember(obj, ptr, sz, ty) SWIG_Ruby_ConvertPacked(obj, ptr, sz, ty) #define SWIG_NewMemberObj(ptr, sz, type) SWIG_Ruby_NewPackedObj(ptr, sz, type) /* Runtime API */ #define SWIG_GetModule(clientdata) SWIG_Ruby_GetModule() #define SWIG_SetModule(clientdata, pointer) SWIG_Ruby_SetModule(pointer) /* Error manipulation */ #define SWIG_ErrorType(code) SWIG_Ruby_ErrorType(code) #define SWIG_Error(code, msg) rb_raise(SWIG_Ruby_ErrorType(code), msg) #define SWIG_fail goto fail /* Ruby-specific SWIG API */ #define SWIG_InitRuntime() SWIG_Ruby_InitRuntime() #define SWIG_define_class(ty) SWIG_Ruby_define_class(ty) #define SWIG_NewClassInstance(value, ty) SWIG_Ruby_NewClassInstance(value, ty) #define SWIG_MangleStr(value) SWIG_Ruby_MangleStr(value) #define SWIG_CheckConvert(value, ty) SWIG_Ruby_CheckConvert(value, ty) #include "assert.h" /* ----------------------------------------------------------------------------- * pointers/data manipulation * ----------------------------------------------------------------------------- */ #ifdef __cplusplus extern "C" { #endif typedef struct { VALUE klass; VALUE mImpl; void (*mark)(void *); void (*destroy)(void *); int trackObjects; } swig_class; /* Global pointer used to keep some internal SWIG stuff */ static VALUE _cSWIG_Pointer = Qnil; static VALUE swig_runtime_data_type_pointer = Qnil; /* Global IDs used to keep some internal SWIG stuff */ static ID swig_arity_id = 0; static ID swig_call_id = 0; /* If your swig extension is to be run within an embedded ruby and has director callbacks, you should set -DRUBY_EMBEDDED during compilation. This will reset ruby's stack frame on each entry point from the main program the first time a virtual director function is invoked (in a non-recursive way). If this is not done, you run the risk of Ruby trashing the stack. */ #ifdef RUBY_EMBEDDED # define SWIG_INIT_STACK \ if ( !swig_virtual_calls ) { RUBY_INIT_STACK } \ ++swig_virtual_calls; # define SWIG_RELEASE_STACK --swig_virtual_calls; # define Ruby_DirectorTypeMismatchException(x) \ rb_raise( rb_eTypeError, x ); return c_result; static unsigned int swig_virtual_calls = 0; #else /* normal non-embedded extension */ # define SWIG_INIT_STACK # define SWIG_RELEASE_STACK # define Ruby_DirectorTypeMismatchException(x) \ throw Swig::DirectorTypeMismatchException( x ); #endif /* RUBY_EMBEDDED */ SWIGRUNTIME VALUE getExceptionClass(void) { static int init = 0; static VALUE rubyExceptionClass ; if (!init) { init = 1; rubyExceptionClass = rb_const_get(_mSWIG, rb_intern("Exception")); } return rubyExceptionClass; } /* This code checks to see if the Ruby object being raised as part of an exception inherits from the Ruby class Exception. If so, the object is simply returned. If not, then a new Ruby exception object is created and that will be returned to Ruby.*/ SWIGRUNTIME VALUE SWIG_Ruby_ExceptionType(swig_type_info *desc, VALUE obj) { VALUE exceptionClass = getExceptionClass(); if (rb_obj_is_kind_of(obj, exceptionClass)) { return obj; } else { return rb_exc_new3(rb_eRuntimeError, rb_obj_as_string(obj)); } } /* Initialize Ruby runtime support */ SWIGRUNTIME void SWIG_Ruby_InitRuntime(void) { if (_mSWIG == Qnil) { _mSWIG = rb_define_module("SWIG"); swig_call_id = rb_intern("call"); swig_arity_id = rb_intern("arity"); } } /* Define Ruby class for C type */ SWIGRUNTIME void SWIG_Ruby_define_class(swig_type_info *type) { VALUE klass; char *klass_name = (char *) malloc(4 + strlen(type->name) + 1); sprintf(klass_name, "TYPE%s", type->name); if (NIL_P(_cSWIG_Pointer)) { _cSWIG_Pointer = rb_define_class_under(_mSWIG, "Pointer", rb_cObject); rb_undef_method(CLASS_OF(_cSWIG_Pointer), "new"); } klass = rb_define_class_under(_mSWIG, klass_name, _cSWIG_Pointer); free((void *) klass_name); } /* Create a new pointer object */ SWIGRUNTIME VALUE SWIG_Ruby_NewPointerObj(void *ptr, swig_type_info *type, int flags) { int own = flags & SWIG_POINTER_OWN; int track; char *klass_name; swig_class *sklass; VALUE klass; VALUE obj; if (!ptr) return Qnil; if (type->clientdata) { sklass = (swig_class *) type->clientdata; /* Are we tracking this class and have we already returned this Ruby object? */ track = sklass->trackObjects; if (track) { obj = SWIG_RubyInstanceFor(ptr); /* Check the object's type and make sure it has the correct type. It might not in cases where methods do things like downcast methods. */ if (obj != Qnil) { VALUE value = rb_iv_get(obj, "@__swigtype__"); char* type_name = RSTRING_PTR(value); if (strcmp(type->name, type_name) == 0) { return obj; } } } /* Create a new Ruby object */ obj = Data_Wrap_Struct(sklass->klass, VOIDFUNC(sklass->mark), ( own ? VOIDFUNC(sklass->destroy) : (track ? VOIDFUNC(SWIG_RubyRemoveTracking) : 0 ) ), ptr); /* If tracking is on for this class then track this object. */ if (track) { SWIG_RubyAddTracking(ptr, obj); } } else { klass_name = (char *) malloc(4 + strlen(type->name) + 1); sprintf(klass_name, "TYPE%s", type->name); klass = rb_const_get(_mSWIG, rb_intern(klass_name)); free((void *) klass_name); obj = Data_Wrap_Struct(klass, 0, 0, ptr); } rb_iv_set(obj, "@__swigtype__", rb_str_new2(type->name)); return obj; } /* Create a new class instance (always owned) */ SWIGRUNTIME VALUE SWIG_Ruby_NewClassInstance(VALUE klass, swig_type_info *type) { VALUE obj; swig_class *sklass = (swig_class *) type->clientdata; obj = Data_Wrap_Struct(klass, VOIDFUNC(sklass->mark), VOIDFUNC(sklass->destroy), 0); rb_iv_set(obj, "@__swigtype__", rb_str_new2(type->name)); return obj; } /* Get type mangle from class name */ SWIGRUNTIMEINLINE char * SWIG_Ruby_MangleStr(VALUE obj) { VALUE stype = rb_iv_get(obj, "@__swigtype__"); return StringValuePtr(stype); } /* Acquire a pointer value */ typedef void (*ruby_owntype)(void*); SWIGRUNTIME ruby_owntype SWIG_Ruby_AcquirePtr(VALUE obj, ruby_owntype own) { if (obj) { ruby_owntype oldown = RDATA(obj)->dfree; RDATA(obj)->dfree = own; return oldown; } else { return 0; } } /* Convert a pointer value */ SWIGRUNTIME int SWIG_Ruby_ConvertPtrAndOwn(VALUE obj, void **ptr, swig_type_info *ty, int flags, ruby_owntype *own) { char *c; swig_cast_info *tc; void *vptr = 0; /* Grab the pointer */ if (NIL_P(obj)) { *ptr = 0; return SWIG_OK; } else { if (TYPE(obj) != T_DATA) { return SWIG_ERROR; } Data_Get_Struct(obj, void, vptr); } if (own) *own = RDATA(obj)->dfree; /* Check to see if the input object is giving up ownership of the underlying C struct or C++ object. If so then we need to reset the destructor since the Ruby object no longer owns the underlying C++ object.*/ if (flags & SWIG_POINTER_DISOWN) { /* Is tracking on for this class? */ int track = 0; if (ty && ty->clientdata) { swig_class *sklass = (swig_class *) ty->clientdata; track = sklass->trackObjects; } if (track) { /* We are tracking objects for this class. Thus we change the destructor * to SWIG_RubyRemoveTracking. This allows us to * remove the mapping from the C++ to Ruby object * when the Ruby object is garbage collected. If we don't * do this, then it is possible we will return a reference * to a Ruby object that no longer exists thereby crashing Ruby. */ RDATA(obj)->dfree = SWIG_RubyRemoveTracking; } else { RDATA(obj)->dfree = 0; } } /* Do type-checking if type info was provided */ if (ty) { if (ty->clientdata) { if (rb_obj_is_kind_of(obj, ((swig_class *) (ty->clientdata))->klass)) { if (vptr == 0) { /* The object has already been deleted */ return SWIG_ObjectPreviouslyDeletedError; } *ptr = vptr; return SWIG_OK; } } if ((c = SWIG_MangleStr(obj)) == NULL) { return SWIG_ERROR; } tc = SWIG_TypeCheck(c, ty); if (!tc) { return SWIG_ERROR; } else { int newmemory = 0; *ptr = SWIG_TypeCast(tc, vptr, &newmemory); assert(!newmemory); /* newmemory handling not yet implemented */ } } else { *ptr = vptr; } return SWIG_OK; } /* Check convert */ SWIGRUNTIMEINLINE int SWIG_Ruby_CheckConvert(VALUE obj, swig_type_info *ty) { char *c = SWIG_MangleStr(obj); if (!c) return 0; return SWIG_TypeCheck(c,ty) != 0; } SWIGRUNTIME VALUE SWIG_Ruby_NewPackedObj(void *ptr, int sz, swig_type_info *type) { char result[1024]; char *r = result; if ((2*sz + 1 + strlen(type->name)) > 1000) return 0; *(r++) = '_'; r = SWIG_PackData(r, ptr, sz); strcpy(r, type->name); return rb_str_new2(result); } /* Convert a packed value value */ SWIGRUNTIME int SWIG_Ruby_ConvertPacked(VALUE obj, void *ptr, int sz, swig_type_info *ty) { swig_cast_info *tc; const char *c; if (TYPE(obj) != T_STRING) goto type_error; c = StringValuePtr(obj); /* Pointer values must start with leading underscore */ if (*c != '_') goto type_error; c++; c = SWIG_UnpackData(c, ptr, sz); if (ty) { tc = SWIG_TypeCheck(c, ty); if (!tc) goto type_error; } return SWIG_OK; type_error: return SWIG_ERROR; } SWIGRUNTIME swig_module_info * SWIG_Ruby_GetModule(void) { VALUE pointer; swig_module_info *ret = 0; VALUE verbose = rb_gv_get("VERBOSE"); /* temporarily disable warnings, since the pointer check causes warnings with 'ruby -w' */ rb_gv_set("VERBOSE", Qfalse); /* first check if pointer already created */ pointer = rb_gv_get("$swig_runtime_data_type_pointer" SWIG_RUNTIME_VERSION SWIG_TYPE_TABLE_NAME); if (pointer != Qnil) { Data_Get_Struct(pointer, swig_module_info, ret); } /* reinstate warnings */ rb_gv_set("VERBOSE", verbose); return ret; } SWIGRUNTIME void SWIG_Ruby_SetModule(swig_module_info *pointer) { /* register a new class */ VALUE cl = rb_define_class("swig_runtime_data", rb_cObject); /* create and store the structure pointer to a global variable */ swig_runtime_data_type_pointer = Data_Wrap_Struct(cl, 0, 0, pointer); rb_define_readonly_variable("$swig_runtime_data_type_pointer" SWIG_RUNTIME_VERSION SWIG_TYPE_TABLE_NAME, &swig_runtime_data_type_pointer); } /* This function can be used to check whether a proc or method or similarly callable function has been passed. Usually used in a %typecheck, like: %typecheck(c_callback_t, precedence=SWIG_TYPECHECK_POINTER) { $result = SWIG_Ruby_isCallable( $input ); } */ SWIGINTERN int SWIG_Ruby_isCallable( VALUE proc ) { if ( rb_respond_to( proc, swig_call_id ) == Qtrue ) return 1; return 0; } /* This function can be used to check the arity (number of arguments) a proc or method can take. Usually used in a %typecheck. Valid arities will be that equal to minimal or those < 0 which indicate a variable number of parameters at the end. */ SWIGINTERN int SWIG_Ruby_arity( VALUE proc, int minimal ) { if ( rb_respond_to( proc, swig_arity_id ) == Qtrue ) { VALUE num = rb_funcall( proc, swig_arity_id, 0 ); int arity = NUM2INT(num); if ( arity < 0 && (arity+1) < -minimal ) return 1; if ( arity == minimal ) return 1; return 1; } return 0; } #ifdef __cplusplus } #endif #define SWIG_exception_fail(code, msg) do { SWIG_Error(code, msg); SWIG_fail; } while(0) #define SWIG_contract_assert(expr, msg) if (!(expr)) { SWIG_Error(SWIG_RuntimeError, msg); SWIG_fail; } else #define SWIG_exception(code, msg) do { SWIG_Error(code, msg);; } while(0) /* -------- TYPES TABLE (BEGIN) -------- */ #define SWIGTYPE_p_Prelude__Client swig_types[0] #define SWIGTYPE_p_Prelude__ClientEasy swig_types[1] #define SWIGTYPE_p_Prelude__ClientProfile swig_types[2] #define SWIGTYPE_p_Prelude__Connection swig_types[3] #define SWIGTYPE_p_Prelude__ConnectionPool swig_types[4] #define SWIGTYPE_p_Prelude__IDMEF swig_types[5] #define SWIGTYPE_p_Prelude__IDMEFCriteria swig_types[6] #define SWIGTYPE_p_Prelude__IDMEFCriterion swig_types[7] #define SWIGTYPE_p_Prelude__IDMEFPath swig_types[8] #define SWIGTYPE_p_Prelude__IDMEFTime swig_types[9] #define SWIGTYPE_p_Prelude__IDMEFValue swig_types[10] #define SWIGTYPE_p_Prelude__PreludeError swig_types[11] #define SWIGTYPE_p_Prelude__PreludeLog swig_types[12] #define SWIGTYPE_p_allocator_type swig_types[13] #define SWIGTYPE_p_char swig_types[14] #define SWIGTYPE_p_difference_type swig_types[15] #define SWIGTYPE_p_f_int_p_q_const__char__void swig_types[16] #define SWIGTYPE_p_idmef_class_id_t swig_types[17] #define SWIGTYPE_p_idmef_criteria_t swig_types[18] #define SWIGTYPE_p_idmef_criterion_operator_t swig_types[19] #define SWIGTYPE_p_idmef_message_t swig_types[20] #define SWIGTYPE_p_idmef_path_t swig_types[21] #define SWIGTYPE_p_idmef_time_t swig_types[22] #define SWIGTYPE_p_idmef_value_t swig_types[23] #define SWIGTYPE_p_idmef_value_type_id_t swig_types[24] #define SWIGTYPE_p_int swig_types[25] #define SWIGTYPE_p_long_long swig_types[26] #define SWIGTYPE_p_p_void swig_types[27] #define SWIGTYPE_p_prelude_client_profile_t swig_types[28] #define SWIGTYPE_p_prelude_client_t swig_types[29] #define SWIGTYPE_p_prelude_connection_pool_t swig_types[30] #define SWIGTYPE_p_prelude_connection_t swig_types[31] #define SWIGTYPE_p_short swig_types[32] #define SWIGTYPE_p_size_type swig_types[33] #define SWIGTYPE_p_std__exception swig_types[34] #define SWIGTYPE_p_swig__ConstIterator swig_types[35] #define SWIGTYPE_p_swig__GC_VALUE swig_types[36] #define SWIGTYPE_p_swig__Iterator swig_types[37] #define SWIGTYPE_p_time_t swig_types[38] #define SWIGTYPE_p_timeval swig_types[39] #define SWIGTYPE_p_unsigned_char swig_types[40] #define SWIGTYPE_p_unsigned_int swig_types[41] #define SWIGTYPE_p_unsigned_long_long swig_types[42] #define SWIGTYPE_p_unsigned_short swig_types[43] #define SWIGTYPE_p_value_type swig_types[44] #define SWIGTYPE_p_void swig_types[45] static swig_type_info *swig_types[47]; static swig_module_info swig_module = {swig_types, 46, 0, 0, 0, 0}; #define SWIG_TypeQuery(name) SWIG_TypeQueryModule(&swig_module, &swig_module, name) #define SWIG_MangledTypeQuery(name) SWIG_MangledTypeQueryModule(&swig_module, &swig_module, name) /* -------- TYPES TABLE (END) -------- */ #define SWIG_init Init_PreludeEasy #define SWIG_name "PreludeEasy" static VALUE mPreludeEasy; #define SWIG_RUBY_THREAD_BEGIN_BLOCK #define SWIG_RUBY_THREAD_END_BLOCK #define SWIGVERSION 0x010340 #define SWIG_VERSION SWIGVERSION #define SWIG_as_voidptr(a) const_cast< void * >(static_cast< const void * >(a)) #define SWIG_as_voidptrptr(a) ((void)SWIG_as_voidptr(*a),reinterpret_cast< void** >(a)) #include #include #include #include namespace swig { class GC_VALUE { protected: // Hash of all GC_VALUE's currently in use static VALUE _hash; VALUE _obj; static ID hash_id; static ID lt_id; static ID gt_id; static ID eq_id; static ID le_id; static ID ge_id; static ID pos_id; static ID neg_id; static ID inv_id; static ID add_id; static ID sub_id; static ID mul_id; static ID div_id; static ID mod_id; static ID and_id; static ID or_id; static ID xor_id; static ID lshift_id; static ID rshift_id; struct OpArgs { VALUE src; ID id; int nargs; VALUE target; }; public: static void initialize() { if ( _hash == Qnil ) { _hash = rb_hash_new(); rb_gc_register_address( &_hash ); } } // this function is never called. Provided for symmetry only. static void cleanup() { rb_gc_unregister_address( &_hash ); } GC_VALUE() : _obj( Qnil ) { } GC_VALUE(const GC_VALUE& item) : _obj(item._obj) { GC_register(); } GC_VALUE(VALUE obj) :_obj(obj) { GC_register(); } ~GC_VALUE() { GC_unregister(); } GC_VALUE & operator=(const GC_VALUE& item) { GC_unregister(); _obj = item._obj; GC_register(); return *this; } void GC_register() { if ( FIXNUM_P(_obj) || SPECIAL_CONST_P(_obj) || SYMBOL_P(_obj) ) return; VALUE val = rb_hash_aref( _hash, _obj ); unsigned n = FIXNUM_P(val) ? NUM2UINT(val) : 0; ++n; rb_hash_aset( _hash, _obj, INT2NUM(n) ); } void GC_unregister() { if ( FIXNUM_P(_obj) || SPECIAL_CONST_P(_obj) || SYMBOL_P(_obj) ) return; // this test should not be needed but I've noticed some very erratic // behavior of none being unregistered in some very rare situations. if ( BUILTIN_TYPE(_obj) == T_NONE ) return; VALUE val = rb_hash_aref( _hash, _obj ); unsigned n = FIXNUM_P(val) ? NUM2UINT(val) : 1; --n; if ( n ) rb_hash_aset( _hash, _obj, INT2NUM(n) ); else rb_hash_delete( _hash, _obj ); } operator VALUE() const { return _obj; } VALUE inspect() const { return rb_inspect(_obj); } VALUE to_s() const { return rb_inspect(_obj); } static VALUE swig_protect_funcall( VALUE p ) { OpArgs* args = (OpArgs*) p; return rb_funcall( args->src, args->id, args->nargs, args->target ); } #define GC_VALUE_CMP( op_id, op, cmp, cmpval ) \ bool op( const GC_VALUE& other ) const \ { \ if ( FIXNUM_P(_obj) && FIXNUM_P(other._obj) ) \ { \ return _obj cmp other._obj; \ } \ bool res = false; \ VALUE ret = Qnil; \ SWIG_RUBY_THREAD_BEGIN_BLOCK; \ if ( rb_respond_to( _obj, op_id ) == Qtrue ) \ { \ int status; \ OpArgs args; \ args.src = _obj; \ args.id = op_id; \ args.nargs = 1; \ args.target = VALUE(other); \ ret = rb_protect( PROTECTFUNC(swig_protect_funcall), \ VALUE(&args), &status ); \ } \ if ( ret == Qnil ) { \ VALUE a = rb_funcall( _obj, hash_id, 0 ); \ VALUE b = rb_funcall( VALUE(other), hash_id, 0 ); \ res = a cmp b; \ } \ else \ { \ res = RTEST( ret ); \ } \ SWIG_RUBY_THREAD_END_BLOCK; \ return res; \ } GC_VALUE_CMP( eq_id, operator==, ==, == 0 ) GC_VALUE_CMP( lt_id, operator<, < , < 0 ) GC_VALUE_CMP( le_id, operator<=, <=, <= 0 ) GC_VALUE_CMP( gt_id, operator>, > , > 0 ) GC_VALUE_CMP( ge_id, operator>=, >=, >= 0 ) #undef GC_VALUE_CMP bool operator!=( const GC_VALUE& other ) { return !(this->operator==(other)); } #define GC_VALUE_UNARY( proc_id, op ) \ GC_VALUE op() const \ { \ VALUE ret = Qnil; \ SWIG_RUBY_THREAD_BEGIN_BLOCK; \ int status; \ OpArgs args; \ args.src = _obj; \ args.id = proc_id; \ args.nargs = 0; \ args.target = Qnil; \ ret = rb_protect( PROTECTFUNC(swig_protect_funcall), VALUE(&args), \ &status ); \ SWIG_RUBY_THREAD_END_BLOCK; \ return ret; \ } GC_VALUE_UNARY( pos_id, operator+ ) GC_VALUE_UNARY( neg_id, operator- ) GC_VALUE_UNARY( inv_id, operator~ ) #undef GC_VALUE_BINARY #define GC_VALUE_BINARY( proc_id, op ) \ GC_VALUE op( const GC_VALUE& other ) const \ { \ VALUE ret = Qnil; \ SWIG_RUBY_THREAD_BEGIN_BLOCK; \ int status; \ OpArgs args; \ args.src = _obj; \ args.id = proc_id; \ args.nargs = 1; \ args.target = VALUE(other); \ ret = rb_protect( PROTECTFUNC(swig_protect_funcall), VALUE(&args), \ &status ); \ SWIG_RUBY_THREAD_END_BLOCK; \ return GC_VALUE(ret); \ } GC_VALUE_BINARY( add_id, operator+ ); GC_VALUE_BINARY( sub_id, operator- ); GC_VALUE_BINARY( mul_id, operator* ); GC_VALUE_BINARY( div_id, operator/ ); GC_VALUE_BINARY( mod_id, operator% ); GC_VALUE_BINARY( and_id, operator& ); GC_VALUE_BINARY( xor_id, operator^ ); GC_VALUE_BINARY( or_id, operator| ); GC_VALUE_BINARY( lshift_id, operator<< ); GC_VALUE_BINARY( rshift_id, operator>> ); #undef GC_VALUE_BINARY }; ID GC_VALUE::hash_id = rb_intern("hash"); ID GC_VALUE::lt_id = rb_intern("<"); ID GC_VALUE::gt_id = rb_intern(">"); ID GC_VALUE::eq_id = rb_intern("=="); ID GC_VALUE::le_id = rb_intern("<="); ID GC_VALUE::ge_id = rb_intern(">="); ID GC_VALUE::pos_id = rb_intern("+@"); ID GC_VALUE::neg_id = rb_intern("-@"); ID GC_VALUE::inv_id = rb_intern("~"); ID GC_VALUE::add_id = rb_intern("+"); ID GC_VALUE::sub_id = rb_intern("-"); ID GC_VALUE::mul_id = rb_intern("*"); ID GC_VALUE::div_id = rb_intern("/"); ID GC_VALUE::mod_id = rb_intern("%"); ID GC_VALUE::and_id = rb_intern("&"); ID GC_VALUE::or_id = rb_intern("|"); ID GC_VALUE::xor_id = rb_intern("^"); ID GC_VALUE::lshift_id = rb_intern("<<"); ID GC_VALUE::rshift_id = rb_intern(">>"); VALUE GC_VALUE::_hash = Qnil; typedef GC_VALUE LANGUAGE_OBJ; } // namespace swig #if defined(__GNUC__) # if __GNUC__ == 2 && __GNUC_MINOR <= 96 # define SWIG_STD_NOMODERN_STL # endif #endif #include #include namespace swig { struct stop_iteration { }; /** * Abstract base class used to represent all iterators of STL containers. */ struct ConstIterator { public: typedef ConstIterator self_type; protected: GC_VALUE _seq; protected: ConstIterator(VALUE seq) : _seq(seq) { } // Random access iterator methods, but not required in Ruby virtual ptrdiff_t distance(const ConstIterator &x) const { throw std::invalid_argument("distance not supported"); } virtual bool equal (const ConstIterator &x) const { throw std::invalid_argument("equal not supported"); } virtual self_type* advance(ptrdiff_t n) { throw std::invalid_argument("advance not supported"); } public: virtual ~ConstIterator() {} // Access iterator method, required by Ruby virtual VALUE value() const { throw std::invalid_argument("value not supported"); return Qnil; }; virtual VALUE setValue( const VALUE& v ) { throw std::invalid_argument("value= not supported"); return Qnil; } virtual self_type* next( size_t n = 1 ) { return this->advance( n ); } virtual self_type* previous( size_t n = 1 ) { ptrdiff_t nn = n; return this->advance( -nn ); } virtual VALUE to_s() const { throw std::invalid_argument("to_s not supported"); return Qnil; } virtual VALUE inspect() const { throw std::invalid_argument("inspect not supported"); return Qnil; } virtual ConstIterator *dup() const { throw std::invalid_argument("dup not supported"); return NULL; } // // C++ common/needed methods. We emulate a bidirectional // operator, to be compatible with all the STL. // The iterator traits will then tell the STL what type of // iterator we really are. // ConstIterator() : _seq( Qnil ) { } ConstIterator( const self_type& b ) : _seq( b._seq ) { } self_type& operator=( const self_type& b ) { _seq = b._seq; return *this; } bool operator == (const ConstIterator& x) const { return equal(x); } bool operator != (const ConstIterator& x) const { return ! operator==(x); } // Pre-decrement operator self_type& operator--() { return *previous(); } // Pre-increment operator self_type& operator++() { return *next(); } // Post-decrement operator self_type operator--(int) { self_type r = *this; previous(); return r; } // Post-increment operator self_type operator++(int) { self_type r = *this; next(); return r; } ConstIterator& operator += (ptrdiff_t n) { return *advance(n); } ConstIterator& operator -= (ptrdiff_t n) { return *advance(-n); } ConstIterator* operator + (ptrdiff_t n) const { return dup()->advance(n); } ConstIterator* operator - (ptrdiff_t n) const { return dup()->advance(-n); } ptrdiff_t operator - (const ConstIterator& x) const { return x.distance(*this); } static swig_type_info* descriptor() { static int init = 0; static swig_type_info* desc = 0; if (!init) { desc = SWIG_TypeQuery("swig::ConstIterator *"); init = 1; } return desc; } }; /** * Abstract base class used to represent all non-const iterators of STL containers. * */ struct Iterator : public ConstIterator { public: typedef Iterator self_type; protected: Iterator(VALUE seq) : ConstIterator(seq) { } virtual self_type* advance(ptrdiff_t n) { throw std::invalid_argument("operation not supported"); } public: static swig_type_info* descriptor() { static int init = 0; static swig_type_info* desc = 0; if (!init) { desc = SWIG_TypeQuery("swig::Iterator *"); init = 1; } return desc; } virtual Iterator *dup() const { throw std::invalid_argument("dup not supported"); return NULL; } virtual self_type* next( size_t n = 1 ) { return this->advance( n ); } virtual self_type* previous( size_t n = 1 ) { ptrdiff_t nn = n; return this->advance( -nn ); } bool operator == (const ConstIterator& x) const { return equal(x); } bool operator != (const Iterator& x) const { return ! operator==(x); } Iterator& operator += (ptrdiff_t n) { return *advance(n); } Iterator& operator -= (ptrdiff_t n) { return *advance(-n); } Iterator* operator + (ptrdiff_t n) const { return dup()->advance(n); } Iterator* operator - (ptrdiff_t n) const { return dup()->advance(-n); } ptrdiff_t operator - (const Iterator& x) const { return x.distance(*this); } }; } SWIGINTERN VALUE SWIG_ruby_failed(void) { return Qnil; } /*@SWIG:/usr/share/swig/1.3.40/ruby/rubyprimtypes.swg,23,%ruby_aux_method@*/ SWIGINTERN VALUE SWIG_AUX_NUM2ULONG(VALUE *args) { VALUE obj = args[0]; VALUE type = TYPE(obj); unsigned long *res = (unsigned long *)(args[1]); *res = type == T_FIXNUM ? NUM2ULONG(obj) : rb_big2ulong(obj); return obj; } /*@SWIG@*/ SWIGINTERN int SWIG_AsVal_unsigned_SS_long (VALUE obj, unsigned long *val) { VALUE type = TYPE(obj); if ((type == T_FIXNUM) || (type == T_BIGNUM)) { unsigned long v; VALUE a[2]; a[0] = obj; a[1] = (VALUE)(&v); if (rb_rescue(RUBY_METHOD_FUNC(SWIG_AUX_NUM2ULONG), (VALUE)a, RUBY_METHOD_FUNC(SWIG_ruby_failed), 0) != Qnil) { if (val) *val = v; return SWIG_OK; } } return SWIG_TypeError; } SWIGINTERNINLINE int SWIG_AsVal_size_t (VALUE obj, size_t *val) { unsigned long v; int res = SWIG_AsVal_unsigned_SS_long (obj, val ? &v : 0); if (SWIG_IsOK(res) && val) *val = static_cast< size_t >(v); return res; } SWIGINTERNINLINE VALUE SWIG_From_bool (bool value) { return value ? Qtrue : Qfalse; } /*@SWIG:/usr/share/swig/1.3.40/ruby/rubyprimtypes.swg,23,%ruby_aux_method@*/ SWIGINTERN VALUE SWIG_AUX_NUM2LONG(VALUE *args) { VALUE obj = args[0]; VALUE type = TYPE(obj); long *res = (long *)(args[1]); *res = type == T_FIXNUM ? NUM2LONG(obj) : rb_big2long(obj); return obj; } /*@SWIG@*/ SWIGINTERN int SWIG_AsVal_long (VALUE obj, long* val) { VALUE type = TYPE(obj); if ((type == T_FIXNUM) || (type == T_BIGNUM)) { long v; VALUE a[2]; a[0] = obj; a[1] = (VALUE)(&v); if (rb_rescue(RUBY_METHOD_FUNC(SWIG_AUX_NUM2LONG), (VALUE)a, RUBY_METHOD_FUNC(SWIG_ruby_failed), 0) != Qnil) { if (val) *val = v; return SWIG_OK; } } return SWIG_TypeError; } SWIGINTERNINLINE int SWIG_AsVal_ptrdiff_t (VALUE obj, ptrdiff_t *val) { long v; int res = SWIG_AsVal_long (obj, val ? &v : 0); if (SWIG_IsOK(res) && val) *val = static_cast< ptrdiff_t >(v); return res; } #include #if !defined(SWIG_NO_LLONG_MAX) # if !defined(LLONG_MAX) && defined(__GNUC__) && defined (__LONG_LONG_MAX__) # define LLONG_MAX __LONG_LONG_MAX__ # define LLONG_MIN (-LLONG_MAX - 1LL) # define ULLONG_MAX (LLONG_MAX * 2ULL + 1ULL) # endif #endif #define SWIG_From_long LONG2NUM SWIGINTERNINLINE VALUE SWIG_From_ptrdiff_t (ptrdiff_t value) { return SWIG_From_long (static_cast< long >(value)); } #include #include #include #include #include #ifndef SWIGPYTHON # include "config.h" # include "glthread/thread.h" #endif #include "prelude.hxx" #include "prelude-log.hxx" #include "prelude-error.hxx" #include "prelude-connection.hxx" #include "prelude-connection-pool.hxx" #include "prelude-client-profile.hxx" #include "prelude-client.hxx" #include "prelude-client-easy.hxx" #include "idmef-criteria.hxx" #include "idmef-value.hxx" #include "idmef-path.hxx" #include "idmef-time.hxx" #include "idmef.hxx" using namespace Prelude; #define TARGET_LANGUAGE_OUTPUT_TYPE VALUE * int IDMEFValue_to_SWIG(const IDMEFValue &result, TARGET_LANGUAGE_OUTPUT_TYPE ret); extern "C" { #include "rubyio.h" } namespace swig { template struct noconst_traits { typedef Type noconst_type; }; template struct noconst_traits { typedef Type noconst_type; }; /* type categories */ struct pointer_category { }; struct value_category { }; /* General traits that provides type_name and type_info */ template struct traits { }; template inline const char* type_name() { return traits::noconst_type >::type_name(); } template struct traits_info { static swig_type_info *type_query(std::string name) { name += " *"; return SWIG_TypeQuery(name.c_str()); } static swig_type_info *type_info() { static swig_type_info *info = type_query(type_name()); return info; } }; template inline swig_type_info *type_info() { return traits_info::type_info(); } /* Partial specialization for pointers */ template struct traits { typedef pointer_category category; static std::string make_ptr_name(const char* name) { std::string ptrname = name; ptrname += " *"; return ptrname; } static const char* type_name() { static std::string name = make_ptr_name(swig::type_name()); return name.c_str(); } }; template struct traits_as { }; template struct traits_check { }; } namespace swig { /* Traits that provides the from method */ template struct traits_from_ptr { static VALUE from(Type *val, int owner = 0) { return SWIG_NewPointerObj(val, type_info(), owner); } }; template struct traits_from { static VALUE from(const Type& val) { return traits_from_ptr::from(new Type(val), 1); } }; template struct traits_from { static VALUE from(Type* val) { return traits_from_ptr::from(val, 0); } }; template struct traits_from { static VALUE from(const Type* val) { return traits_from_ptr::from(const_cast(val), 0); } }; template inline VALUE from(const Type& val) { return traits_from::from(val); } template inline VALUE from_ptr(Type* val, int owner) { return traits_from_ptr::from(val, owner); } /* Traits that provides the asval/as/check method */ template struct traits_asptr { static int asptr(VALUE obj, Type **val) { Type *p; int res = SWIG_ConvertPtr(obj, (void**)&p, type_info(), 0); if (SWIG_IsOK(res)) { if (val) *val = p; } return res; } }; template inline int asptr(VALUE obj, Type **vptr) { return traits_asptr::asptr(obj, vptr); } template struct traits_asval { static int asval(VALUE obj, Type *val) { if (val) { Type *p = 0; int res = traits_asptr::asptr(obj, &p); if (!SWIG_IsOK(res)) return res; if (p) { typedef typename noconst_traits::noconst_type noconst_type; *(const_cast(val)) = *p; if (SWIG_IsNewObj(res)){ delete p; res = SWIG_DelNewMask(res); } return res; } else { return SWIG_ERROR; } } else { return traits_asptr::asptr(obj, (Type **)(0)); } } }; template struct traits_asval { static int asval(VALUE obj, Type **val) { if (val) { typedef typename noconst_traits::noconst_type noconst_type; noconst_type *p = 0; int res = traits_asptr::asptr(obj, &p); if (SWIG_IsOK(res)) { *(const_cast(val)) = p; } return res; } else { return traits_asptr::asptr(obj, (Type **)(0)); } } }; template inline int asval(VALUE obj, Type *val) { return traits_asval::asval(obj, val); } template struct traits_as { static Type as(VALUE obj, bool throw_error) { Type v; int res = asval(obj, &v); if (!obj || !SWIG_IsOK(res)) { if (throw_error) throw std::invalid_argument("bad type"); VALUE lastErr = rb_gv_get("$!"); if (lastErr == Qnil) { SWIG_Error(SWIG_TypeError, swig::type_name()); } } return v; } }; template struct traits_as { static Type as(VALUE obj, bool throw_error) { Type *v = 0; int res = (obj ? traits_asptr::asptr(obj, &v) : SWIG_ERROR); if (SWIG_IsOK(res) && v) { if (SWIG_IsNewObj(res)) { Type r(*v); delete v; return r; } else { return *v; } } else { // Uninitialized return value, no Type() constructor required. if (throw_error) throw std::invalid_argument("bad type"); VALUE lastErr = rb_gv_get("$!"); if (lastErr == Qnil) { SWIG_Error(SWIG_TypeError, swig::type_name()); } static Type *v_def = (Type*) malloc(sizeof(Type)); memset(v_def,0,sizeof(Type)); return *v_def; } } }; template struct traits_as { static Type* as(VALUE obj, bool throw_error) { Type *v = 0; int res = (obj ? traits_asptr::asptr(obj, &v) : SWIG_ERROR); if (SWIG_IsOK(res)) { return v; } else { if (throw_error) throw std::invalid_argument("bad type"); VALUE lastErr = rb_gv_get("$!"); if (lastErr == Qnil) { SWIG_Error(SWIG_TypeError, swig::type_name()); } return 0; } } }; template inline Type as(VALUE obj, bool te = false) { return traits_as< Type, typename traits< Type >::category >::as(obj, te); } template struct traits_check { static bool check(VALUE obj) { int res = obj ? asval(obj, (Type *)(0)) : SWIG_ERROR; return SWIG_IsOK(res) ? true : false; } }; template struct traits_check { static bool check(VALUE obj) { int res = obj ? asptr(obj, (Type **)(0)) : SWIG_ERROR; return SWIG_IsOK(res) ? true : false; } }; template inline bool check(VALUE obj) { return traits_check::category>::check(obj); } } #include namespace swig { template < class T > struct yield : public std::unary_function< T, bool > { bool operator()( const T& v ) const { return RTEST( rb_yield( swig::from< T >(v) ) ); } }; inline size_t check_index(ptrdiff_t i, size_t size, bool insert = false) { if ( i < 0 ) { if ((size_t) (-i) <= size) return (size_t) (i + size); } else if ( (size_t) i < size ) { return (size_t) i; } else if (insert && ((size_t) i == size)) { return size; } throw std::out_of_range("index out of range"); } inline size_t slice_index(ptrdiff_t i, size_t size) { if ( i < 0 ) { if ((size_t) (-i) <= size) { return (size_t) (i + size); } else { throw std::out_of_range("index out of range"); } } else { return ( (size_t) i < size ) ? ((size_t) i) : size; } } template inline typename Sequence::iterator getpos(Sequence* self, Difference i) { typename Sequence::iterator pos = self->begin(); std::advance(pos, check_index(i,self->size())); return pos; } template inline typename Sequence::const_iterator cgetpos(const Sequence* self, Difference i) { typename Sequence::const_iterator pos = self->begin(); std::advance(pos, check_index(i,self->size())); return pos; } template inline Sequence* getslice(const Sequence* self, Difference i, Difference j) { typename Sequence::size_type size = self->size(); typename Sequence::size_type ii = swig::check_index(i, size); typename Sequence::size_type jj = swig::slice_index(j, size); if (jj > ii) { typename Sequence::const_iterator vb = self->begin(); typename Sequence::const_iterator ve = self->begin(); std::advance(vb,ii); std::advance(ve,jj); return new Sequence(vb, ve); } else { return new Sequence(); } } template inline void setslice(Sequence* self, Difference i, Difference j, const InputSeq& v) { typename Sequence::size_type size = self->size(); typename Sequence::size_type ii = swig::check_index(i, size, true); typename Sequence::size_type jj = swig::slice_index(j, size); if (jj < ii) jj = ii; size_t ssize = jj - ii; if (ssize <= v.size()) { typename Sequence::iterator sb = self->begin(); typename InputSeq::const_iterator vmid = v.begin(); std::advance(sb,ii); std::advance(vmid, jj - ii); self->insert(std::copy(v.begin(), vmid, sb), vmid, v.end()); } else { typename Sequence::iterator sb = self->begin(); typename Sequence::iterator se = self->begin(); std::advance(sb,ii); std::advance(se,jj); self->erase(sb,se); self->insert(sb, v.begin(), v.end()); } } template inline void delslice(Sequence* self, Difference i, Difference j) { typename Sequence::size_type size = self->size(); typename Sequence::size_type ii = swig::check_index(i, size, true); typename Sequence::size_type jj = swig::slice_index(j, size); if (jj > ii) { typename Sequence::iterator sb = self->begin(); typename Sequence::iterator se = self->begin(); std::advance(sb,ii); std::advance(se,jj); self->erase(sb,se); } } } #if defined(__SUNPRO_CC) && defined(_RWSTD_VER) # if !defined(SWIG_NO_STD_NOITERATOR_TRAITS_STL) # define SWIG_STD_NOITERATOR_TRAITS_STL # endif #endif #if !defined(SWIG_STD_NOITERATOR_TRAITS_STL) #include #else namespace std { template struct iterator_traits { typedef ptrdiff_t difference_type; typedef typename Iterator::value_type value_type; }; template struct iterator_traits<__reverse_bi_iterator > { typedef Distance difference_type; typedef T value_type; }; template struct iterator_traits { typedef T value_type; typedef ptrdiff_t difference_type; }; template inline typename iterator_traits<_InputIterator>::difference_type distance(_InputIterator __first, _InputIterator __last) { typename iterator_traits<_InputIterator>::difference_type __n = 0; while (__first != __last) { ++__first; ++__n; } return __n; } } #endif namespace swig { /** * Templated base classes for all custom const_iterators. * */ template class ConstIterator_T : public ConstIterator { public: typedef OutConstIterator const_iter; typedef typename std::iterator_traits::value_type value_type; typedef ConstIterator_T self_type; protected: virtual bool equal (const ConstIterator &iter) const { const self_type *iters = dynamic_cast(&iter); if (iters) { return (current == iters->get_current()); } else { throw std::invalid_argument("bad iterator type"); } } virtual ptrdiff_t distance(const ConstIterator &iter) const { const self_type *iters = dynamic_cast(&iter); if (iters) { return std::distance(current, iters->get_current()); } else { throw std::invalid_argument("bad iterator type"); } } virtual ConstIterator* advance(ptrdiff_t n) { std::advance( current, n ); return this; } public: ConstIterator_T() : ConstIterator(Qnil) { } ConstIterator_T(const_iter curr, VALUE seq = Qnil) : ConstIterator(seq), current(curr) { } const const_iter& get_current() const { return current; } const value_type& operator*() const { return *current; } virtual VALUE inspect() const { VALUE ret = rb_str_new2("#<"); ret = rb_str_cat2( ret, rb_obj_classname(_seq) ); ret = rb_str_cat2( ret, "::const_iterator " ); VALUE cur = value(); ret = rb_str_concat( ret, rb_inspect(cur) ); ret = rb_str_cat2( ret, ">" ); return ret; } virtual VALUE to_s() const { VALUE ret = rb_str_new2( rb_obj_classname(_seq) ); ret = rb_str_cat2( ret, "::const_iterator " ); VALUE cur = value(); ret = rb_str_concat( ret, rb_obj_as_string(cur) ); return ret; } protected: const_iter current; }; /** * Templated base classes for all custom non-const iterators. * */ template class Iterator_T : public Iterator { public: typedef InOutIterator nonconst_iter; // Make this class iterator STL compatible, by using iterator_traits typedef typename std::iterator_traits::iterator_category iterator_category; typedef typename std::iterator_traits::value_type value_type; typedef typename std::iterator_traits::difference_type difference_type; typedef typename std::iterator_traits::pointer pointer; typedef typename std::iterator_traits::reference reference; typedef Iterator base; typedef Iterator_T< nonconst_iter > self_type; protected: virtual bool equal (const ConstIterator &iter) const { const self_type *iters = dynamic_cast(&iter); if (iters) { return (current == iters->get_current()); } else { throw std::invalid_argument("bad iterator type"); } } virtual ptrdiff_t distance(const ConstIterator &iter) const { const self_type *iters = dynamic_cast(&iter); if (iters) { return std::distance(current, iters->get_current()); } else { throw std::invalid_argument("bad iterator type"); } } virtual Iterator* advance(ptrdiff_t n) { std::advance( current, n ); return this; } public: Iterator_T(nonconst_iter curr, VALUE seq = Qnil) : Iterator(seq), current(curr) { } const nonconst_iter& get_current() const { return current; } self_type& operator=( const self_type& b ) { base::operator=( b ); return *this; } self_type& operator=( const value_type& b ) { *current = b; return *this; } const value_type& operator*() const { return *current; } value_type& operator*() { return *current; } virtual VALUE inspect() const { VALUE ret = rb_str_new2("#<"); ret = rb_str_cat2( ret, rb_obj_classname(_seq) ); ret = rb_str_cat2( ret, "::iterator " ); VALUE cur = value(); ret = rb_str_concat( ret, rb_inspect(cur) ); ret = rb_str_cat2( ret, ">" ); return ret; } virtual VALUE to_s() const { VALUE ret = rb_str_new2( rb_obj_classname(_seq) ); ret = rb_str_cat2( ret, "::iterator " ); VALUE cur = value(); ret = rb_str_concat( ret, rb_obj_as_string(cur) ); return ret; } protected: nonconst_iter current; }; /** * Auxiliary functor to store the value of a ruby object inside * a reference of a compatible C++ type. ie: Ruby -> C++ * */ template struct asval_oper { typedef ValueType value_type; typedef bool result_type; bool operator()(VALUE obj, value_type& v) const { return ( swig::asval< value_type >(obj, &v) == SWIG_OK ); } }; /** * Auxiliary functor to return a ruby object from a C++ type. * ie: C++ -> Ruby * */ template struct from_oper { typedef const ValueType& argument_type; typedef VALUE result_type; result_type operator()(argument_type v) const { return swig::from(v); } }; /** * ConstIterator class for a const_iterator with no end() boundaries. * */ template::value_type, typename FromOper = from_oper > class ConstIteratorOpen_T : public ConstIterator_T { public: FromOper from; typedef OutConstIterator const_iter; typedef ValueType value_type; typedef ConstIterator_T base; typedef ConstIteratorOpen_T self_type; ConstIteratorOpen_T(const_iter curr, VALUE seq = Qnil) : ConstIterator_T(curr, seq) { } virtual VALUE value() const { return from(static_cast(*(base::current))); } ConstIterator *dup() const { return new self_type(*this); } }; /** * Iterator class for an iterator with no end() boundaries. * */ template::value_type, typename FromOper = from_oper, typename AsvalOper = asval_oper > class IteratorOpen_T : public Iterator_T { public: FromOper from; AsvalOper asval; typedef InOutIterator nonconst_iter; typedef ValueType value_type; typedef Iterator_T base; typedef IteratorOpen_T self_type; public: IteratorOpen_T(nonconst_iter curr, VALUE seq = Qnil) : Iterator_T(curr, seq) { } virtual VALUE value() const { return from(static_cast(*(base::current))); } virtual VALUE setValue( const VALUE& v ) { value_type& dst = *base::current; if ( asval(v, dst) ) return v; return Qnil; } Iterator *dup() const { return new self_type(*this); } }; /** * ConstIterator class for a const_iterator where begin() and end() boundaries are known. * */ template::value_type, typename FromOper = from_oper > class ConstIteratorClosed_T : public ConstIterator_T { public: FromOper from; typedef OutConstIterator const_iter; typedef ValueType value_type; typedef ConstIterator_T base; typedef ConstIteratorClosed_T self_type; protected: virtual ConstIterator* advance(ptrdiff_t n) { std::advance( base::current, n ); if ( base::current == end ) throw stop_iteration(); return this; } public: ConstIteratorClosed_T(const_iter curr, const_iter first, const_iter last, VALUE seq = Qnil) : ConstIterator_T(curr, seq), begin(first), end(last) { } virtual VALUE value() const { if (base::current == end) { throw stop_iteration(); } else { return from(static_cast(*(base::current))); } } ConstIterator *dup() const { return new self_type(*this); } private: const_iter begin; const_iter end; }; /** * Iterator class for a iterator where begin() and end() boundaries are known. * */ template::value_type, typename FromOper = from_oper, typename AsvalOper = asval_oper > class IteratorClosed_T : public Iterator_T { public: FromOper from; AsvalOper asval; typedef InOutIterator nonconst_iter; typedef ValueType value_type; typedef Iterator_T base; typedef IteratorClosed_T self_type; protected: virtual Iterator* advance(ptrdiff_t n) { std::advance( base::current, n ); if ( base::current == end ) throw stop_iteration(); return this; } public: IteratorClosed_T(nonconst_iter curr, nonconst_iter first, nonconst_iter last, VALUE seq = Qnil) : Iterator_T(curr, seq), begin(first), end(last) { } virtual VALUE value() const { if (base::current == end) { throw stop_iteration(); } else { return from(static_cast(*(base::current))); } } // Iterator setter method, required by Ruby virtual VALUE setValue( const VALUE& v ) { if (base::current == end) throw stop_iteration(); value_type& dst = *base::current; if ( asval( v, dst ) ) return v; return Qnil; } Iterator *dup() const { return new self_type(*this); } private: nonconst_iter begin; nonconst_iter end; }; /* Partial specialization for bools which don't allow de-referencing */ template< typename InOutIterator, typename FromOper, typename AsvalOper > class IteratorOpen_T< InOutIterator, bool, FromOper, AsvalOper > : public Iterator_T { public: FromOper from; AsvalOper asval; typedef InOutIterator nonconst_iter; typedef bool value_type; typedef Iterator_T base; typedef IteratorOpen_T self_type; IteratorOpen_T(nonconst_iter curr, VALUE seq = Qnil) : Iterator_T(curr, seq) { } virtual VALUE value() const { return from(static_cast(*(base::current))); } virtual VALUE setValue( const VALUE& v ) { bool tmp = *base::current; if ( asval( v, tmp ) ) { *base::current = tmp; return v; } return Qnil; } Iterator *dup() const { return new self_type(*this); } }; /* Partial specialization for bools which don't allow de-referencing */ template< typename InOutIterator, typename FromOper, typename AsvalOper > class IteratorClosed_T< InOutIterator, bool, FromOper, AsvalOper > : public Iterator_T { public: FromOper from; AsvalOper asval; typedef InOutIterator nonconst_iter; typedef bool value_type; typedef Iterator_T base; typedef IteratorClosed_T self_type; protected: virtual Iterator* advance(ptrdiff_t n) { std::advance( base::current, n ); if ( base::current == end ) throw stop_iteration(); return this; } public: IteratorClosed_T(nonconst_iter curr, nonconst_iter first, nonconst_iter last, VALUE seq = Qnil) : Iterator_T(curr, seq), begin(first), end(last) { } virtual VALUE value() const { if (base::current == end) { throw stop_iteration(); } else { return from(static_cast(*(base::current))); } } virtual VALUE setValue( const VALUE& v ) { if (base::current == end) throw stop_iteration(); bool tmp = *base::current; if ( asval( v, tmp ) ) { *base::current = tmp; return v; } return Qnil; } Iterator *dup() const { return new self_type(*this); } private: nonconst_iter begin; nonconst_iter end; }; /** * Helper function used to wrap a bounded const_iterator. This is to be used in * a %typemap(out), for example. * */ template inline Iterator* make_nonconst_iterator(const InOutIter& current, const InOutIter& begin, const InOutIter& end, VALUE seq = Qnil) { return new IteratorClosed_T(current, begin, end, seq); } /** * Helper function used to wrap an unbounded const_iterator. This is to be used in * a %typemap(out), for example. * */ template inline Iterator* make_nonconst_iterator(const InOutIter& current, VALUE seq = Qnil) { return new IteratorOpen_T(current, seq); } /** * Helper function used to wrap a bounded const_iterator. This is to be used in * a %typemap(out), for example. * */ template inline ConstIterator* make_const_iterator(const OutIter& current, const OutIter& begin, const OutIter& end, VALUE seq = Qnil) { return new ConstIteratorClosed_T(current, begin, end, seq); } /** * Helper function used to wrap an unbounded const_iterator. This is to be used in * a %typemap(out), for example. * */ template inline ConstIterator* make_const_iterator(const OutIter& current, VALUE seq = Qnil) { return new ConstIteratorOpen_T(current, seq); } } namespace swig { /** * This class is a proxy class for references, used to return and set values * of an element of a Ruby Array of stuff. * It can be used by RubySequence_InputIterator to make it work with STL * algorithms. * */ template struct RubySequence_Ref { RubySequence_Ref(VALUE seq, int index) : _seq(seq), _index(index) { } operator T () const { VALUE item = rb_ary_entry(_seq, _index ); try { return swig::as(item, true); } catch (std::exception& e) { char msg[1024]; sprintf(msg, "in sequence element %d ", _index); VALUE lastErr = rb_gv_get("$!"); if ( lastErr == Qnil ) { SWIG_Error(SWIG_TypeError, swig::type_name()); } VALUE str = rb_str_new2(msg); str = rb_str_cat2( str, e.what() ); SWIG_Ruby_ExceptionType( NULL, str ); throw; } } RubySequence_Ref& operator=(const T& v) { rb_ary_set(_seq, _index, swig::from< T >(v)); return *this; } private: VALUE _seq; int _index; }; /** * This class is a proxy to return a pointer to a class, usually * RubySequence_Ref. * It can be used by RubySequence_InputIterator to make it work with STL * algorithms. * */ template struct RubySequence_ArrowProxy { RubySequence_ArrowProxy(const T& x): m_value(x) {} const T* operator->() const { return &m_value; } operator const T*() const { return &m_value; } T m_value; }; /** * Input Iterator. This adapator class is a random access iterator that * allows you to use STL algorithms with a Ruby class (a Ruby Array by default). * */ template > struct RubySequence_InputIterator { typedef RubySequence_InputIterator self; typedef std::random_access_iterator_tag iterator_category; typedef Reference reference; typedef T value_type; typedef T* pointer; typedef ptrdiff_t difference_type; RubySequence_InputIterator() { } RubySequence_InputIterator(VALUE seq, int index) : _seq(seq), _index(index) { } reference operator*() const { return reference(_seq, _index); } RubySequence_ArrowProxy operator->() const { return RubySequence_ArrowProxy(operator*()); } bool operator==(const self& ri) const { return (_index == ri._index) && (_seq == ri._seq); } bool operator!=(const self& ri) const { return !(operator==(ri)); } self& operator ++ () { ++_index; return *this; } self& operator -- () { --_index; return *this; } self& operator += (difference_type n) { _index += n; return *this; } self operator +(difference_type n) const { return self(_seq, _index + n); } self& operator -= (difference_type n) { _index -= n; return *this; } self operator -(difference_type n) const { return self(_seq, _index - n); } difference_type operator - (const self& ri) const { return _index - ri._index; } bool operator < (const self& ri) const { return _index < ri._index; } reference operator[](difference_type n) const { return reference(_seq, _index + n); } private: VALUE _seq; difference_type _index; }; /** * This adaptor class allows you to use a Ruby Array as if it was an STL * container, giving it begin(), end(), and iterators. * */ template struct RubySequence_Cont { typedef RubySequence_Ref reference; typedef const RubySequence_Ref const_reference; typedef T value_type; typedef T* pointer; typedef int difference_type; typedef int size_type; typedef const pointer const_pointer; typedef RubySequence_InputIterator iterator; typedef RubySequence_InputIterator const_iterator; RubySequence_Cont(VALUE seq) : _seq(0) { if (!rb_obj_is_kind_of(seq, rb_cArray)) { throw std::invalid_argument("an Array is expected"); } _seq = seq; } ~RubySequence_Cont() { } size_type size() const { return RARRAY_LEN(_seq); } bool empty() const { return size() == 0; } iterator begin() { return iterator(_seq, 0); } const_iterator begin() const { return const_iterator(_seq, 0); } iterator end() { return iterator(_seq, size()); } const_iterator end() const { return const_iterator(_seq, size()); } reference operator[](difference_type n) { return reference(_seq, n); } const_reference operator[](difference_type n) const { return const_reference(_seq, n); } bool check(bool set_err = false) const { int s = (int) size(); for (int i = 0; i < s; ++i) { VALUE item = rb_ary_entry(_seq, i ); if (!swig::check(item)) { if (set_err) { char msg[1024]; sprintf(msg, "in sequence element %d", i); SWIG_Error(SWIG_RuntimeError, msg); } return false; } } return true; } private: VALUE _seq; }; } SWIGINTERN swig_type_info* SWIG_pchar_descriptor(void) { static int init = 0; static swig_type_info* info = 0; if (!init) { info = SWIG_TypeQuery("_p_char"); init = 1; } return info; } SWIGINTERN int SWIG_AsCharPtrAndSize(VALUE obj, char** cptr, size_t* psize, int *alloc) { if (TYPE(obj) == T_STRING) { #if defined(StringValuePtr) char *cstr = StringValuePtr(obj); #else char *cstr = STR2CSTR(obj); #endif size_t size = RSTRING_LEN(obj) + 1; if (cptr) { if (alloc) { if (*alloc == SWIG_NEWOBJ) { *cptr = reinterpret_cast< char* >(memcpy((new char[size]), cstr, sizeof(char)*(size))); } else { *cptr = cstr; *alloc = SWIG_OLDOBJ; } } } if (psize) *psize = size; return SWIG_OK; } else { swig_type_info* pchar_descriptor = SWIG_pchar_descriptor(); if (pchar_descriptor) { void* vptr = 0; if (SWIG_ConvertPtr(obj, &vptr, pchar_descriptor, 0) == SWIG_OK) { if (cptr) *cptr = (char *)vptr; if (psize) *psize = vptr ? (strlen((char*)vptr) + 1) : 0; if (alloc) *alloc = SWIG_OLDOBJ; return SWIG_OK; } } } return SWIG_TypeError; } SWIGINTERNINLINE VALUE SWIG_FromCharPtrAndSize(const char* carray, size_t size) { if (carray) { if (size > LONG_MAX) { swig_type_info* pchar_descriptor = SWIG_pchar_descriptor(); return pchar_descriptor ? SWIG_NewPointerObj(const_cast< char * >(carray), pchar_descriptor, 0) : Qnil; } else { return rb_str_new(carray, static_cast< long >(size)); } } else { return Qnil; } } SWIGINTERNINLINE VALUE SWIG_FromCharPtr(const char *cptr) { return SWIG_FromCharPtrAndSize(cptr, (cptr ? strlen(cptr) : 0)); } SWIGINTERNINLINE VALUE SWIG_From_int (int value) { return SWIG_From_long (value); } SWIGINTERN int SWIG_AsVal_int (VALUE obj, int *val) { long v; int res = SWIG_AsVal_long (obj, &v); if (SWIG_IsOK(res)) { if ((v < INT_MIN || v > INT_MAX)) { return SWIG_OverflowError; } else { if (val) *val = static_cast< int >(v); } } return res; } static gl_thread_t __initial_thread; static VALUE __prelude_log_func = Qnil; static void _cb_ruby_log(int level, const char *str) { static int cid = rb_intern("call"); if ( (gl_thread_t) gl_thread_self() != __initial_thread ) return; rb_funcall(__prelude_log_func, cid, 2, SWIG_From_int(level), SWIG_FromCharPtr(str)); } static int _cb_ruby_write(prelude_msgbuf_t *fd, prelude_msg_t *msg) { FILE *f; ssize_t ret; OpenFile *fptr; VALUE *io = (VALUE *) prelude_msgbuf_get_data(fd); GetOpenFile(*io, fptr); f = fptr->f; ret = fwrite((const char *) prelude_msg_get_message_data(msg), 1, prelude_msg_get_len(msg), f); if ( ret != prelude_msg_get_len(msg) ) return prelude_error_from_errno(errno); prelude_msg_recycle(msg); return 0; } static ssize_t _cb_ruby_read(prelude_io_t *fd, void *buf, size_t size) { FILE *f; ssize_t ret; OpenFile *fptr; VALUE *io = (VALUE *) prelude_io_get_fdptr(fd); GetOpenFile(*io, fptr); f = fptr->f; ret = fread(buf, 1, size, f); if ( ret < 0 ) ret = prelude_error_from_errno(errno); else if ( ret == 0 ) ret = prelude_error(PRELUDE_ERROR_EOF); return ret; } SWIGINTERN int SWIG_AsPtr_std_string (VALUE obj, std::string **val) { char* buf = 0 ; size_t size = 0; int alloc = SWIG_OLDOBJ; if (SWIG_IsOK((SWIG_AsCharPtrAndSize(obj, &buf, &size, &alloc)))) { if (buf) { if (val) *val = new std::string(buf, size - 1); if (alloc == SWIG_NEWOBJ) delete[] buf; return SWIG_NEWOBJ; } else { if (val) *val = 0; return SWIG_OLDOBJ; } } else { static int init = 0; static swig_type_info* descriptor = 0; if (!init) { descriptor = SWIG_TypeQuery("std::string" " *"); init = 1; } if (descriptor) { std::string *vptr; int res = SWIG_ConvertPtr(obj, (void**)&vptr, descriptor, 0); if (SWIG_IsOK(res) && val) *val = vptr; return res; } } return SWIG_ERROR; } SWIGINTERNINLINE VALUE SWIG_From_std_string (const std::string& s) { if (s.size()) { return SWIG_FromCharPtrAndSize(s.data(), s.size()); } else { return SWIG_FromCharPtrAndSize(s.c_str(), 0); } } SWIGINTERN int SWIG_AsVal_bool (VALUE obj, bool *val) { if (obj == Qtrue) { if (val) *val = true; return SWIG_OK; } else if (obj == Qfalse) { if (val) *val = false; return SWIG_OK; } else { int res = 0; if (SWIG_AsVal_int (obj, &res) == SWIG_OK) { if (val) *val = res ? true : false; return SWIG_OK; } } return SWIG_TypeError; } /*@SWIG:/usr/share/swig/1.3.40/ruby/rubyprimtypes.swg,23,%ruby_aux_method@*/ SWIGINTERN VALUE SWIG_AUX_NUM2ULL(VALUE *args) { VALUE obj = args[0]; VALUE type = TYPE(obj); long long *res = (long long *)(args[1]); *res = type == T_FIXNUM ? NUM2ULL(obj) : rb_big2ull(obj); return obj; } /*@SWIG@*/ SWIGINTERN int SWIG_AsVal_unsigned_SS_long_SS_long (VALUE obj, unsigned long long *val) { VALUE type = TYPE(obj); if ((type == T_FIXNUM) || (type == T_BIGNUM)) { unsigned long long v; VALUE a[2]; a[0] = obj; a[1] = (VALUE)(&v); if (rb_rescue(RUBY_METHOD_FUNC(SWIG_AUX_NUM2ULL), (VALUE)a, RUBY_METHOD_FUNC(SWIG_ruby_failed), 0) != Qnil) { if (val) *val = v; return SWIG_OK; } } return SWIG_TypeError; } SWIGINTERNINLINE VALUE SWIG_From_long_SS_long (long long value) { return LL2NUM(value); } SWIGINTERNINLINE VALUE SWIG_From_unsigned_SS_long_SS_long (unsigned long long value) { return ULL2NUM(value); } SWIGINTERNINLINE VALUE SWIG_From_unsigned_SS_long (unsigned long value) { return ULONG2NUM(value); } SWIGINTERNINLINE VALUE SWIG_From_unsigned_SS_int (unsigned int value) { return SWIG_From_unsigned_SS_long (value); } namespace swig { template <> struct traits { typedef pointer_category category; static const char* type_name() { return"Prelude::Connection"; } }; } namespace swig { template inline void assign(const RubySeq& rubyseq, Seq* seq) { // seq->assign(rubyseq.begin(), rubyseq.end()); // not used as not always implemented typedef typename RubySeq::value_type value_type; typename RubySeq::const_iterator it = rubyseq.begin(); for (;it != rubyseq.end(); ++it) { seq->insert(seq->end(),(value_type)(*it)); } } template struct traits_asptr_stdseq { typedef Seq sequence; typedef T value_type; static int asptr(VALUE obj, sequence **seq) { if (rb_obj_is_kind_of(obj, rb_cArray) == Qtrue) { try { RubySequence_Cont rubyseq(obj); if (seq) { sequence *pseq = new sequence(); assign(rubyseq, pseq); *seq = pseq; return SWIG_NEWOBJ; } else { return rubyseq.check() ? SWIG_OK : SWIG_ERROR; } } catch (std::exception& e) { if (seq) { VALUE lastErr = rb_gv_get("$!"); if (lastErr == Qnil) { rb_raise(rb_eTypeError, e.what()); } } return SWIG_ERROR; } } else { sequence *p; if (SWIG_ConvertPtr(obj,(void**)&p, swig::type_info(),0) == SWIG_OK) { if (seq) *seq = p; return SWIG_OLDOBJ; } } return SWIG_ERROR; } }; // Partial specialization for GC_VALUE's. No need to typecheck each // element. template< class Seq > struct traits_asptr_stdseq< Seq, swig::GC_VALUE > { typedef Seq sequence; typedef swig::GC_VALUE value_type; static int asptr(VALUE obj, sequence **seq) { if (rb_obj_is_kind_of(obj, rb_cArray) == Qtrue) { try { if (seq) { RubySequence_Cont rubyseq(obj); sequence *pseq = new sequence(); assign(rubyseq, pseq); *seq = pseq; return SWIG_NEWOBJ; } else { return true; } } catch (std::exception& e) { if (seq) { VALUE lastErr = rb_gv_get("$!"); if (lastErr == Qnil) { rb_raise(rb_eTypeError, e.what()); } } return SWIG_ERROR; } } else { sequence *p; if (SWIG_ConvertPtr(obj,(void**)&p, swig::type_info(),0) == SWIG_OK) { if (seq) *seq = p; return SWIG_OLDOBJ; } } return SWIG_ERROR; } }; template struct traits_from_stdseq { typedef Seq sequence; typedef T value_type; typedef typename Seq::size_type size_type; typedef typename sequence::const_iterator const_iterator; static VALUE from(const sequence& seq) { size_type size = seq.size(); if (size <= (size_type)INT_MAX) { VALUE obj = rb_ary_new2((int)size); int i = 0; for (const_iterator it = seq.begin(); it != seq.end(); ++it, ++i) { RARRAY_PTR(obj)[i] = swig::from< value_type >(*it); } RARRAY_LEN(obj) = size; rb_obj_freeze(obj); // treat as immutable result return obj; } else { rb_raise(rb_eRangeError,"sequence size not valid in ruby"); return Qnil; } } }; } namespace swig { template struct traits_asptr > { static int asptr(VALUE obj, std::vector **vec) { return traits_asptr_stdseq >::asptr(obj, vec); } }; template struct traits_from > { static VALUE from(const std::vector& vec) { return traits_from_stdseq >::from(vec); } }; } namespace swig { template <> struct traits > > { typedef pointer_category category; static const char* type_name() { return "std::vector<" "Prelude::Connection" "," "std::allocator< Prelude::Connection >" " >"; } }; } namespace swig { template <> struct traits { typedef pointer_category category; static const char* type_name() { return"Prelude::IDMEFValue"; } }; } namespace swig { template <> struct traits > > { typedef pointer_category category; static const char* type_name() { return "std::vector<" "Prelude::IDMEFValue" "," "std::allocator< Prelude::IDMEFValue >" " >"; } }; } SWIGINTERN int SWIG_AsCharArray(VALUE obj, char *val, size_t size) { char* cptr = 0; size_t csize = 0; int alloc = SWIG_OLDOBJ; int res = SWIG_AsCharPtrAndSize(obj, &cptr, &csize, &alloc); if (SWIG_IsOK(res)) { if ((csize == size + 1) && cptr && !(cptr[csize-1])) --csize; if (csize <= size) { if (val) { if (csize) memcpy(val, cptr, csize*sizeof(char)); if (csize < size) memset(val + csize, 0, (size - csize)*sizeof(char)); } if (alloc == SWIG_NEWOBJ) { delete[] cptr; res = SWIG_DelNewMask(res); } return res; } if (alloc == SWIG_NEWOBJ) delete[] cptr; } return SWIG_TypeError; } SWIGINTERN int SWIG_AsVal_char (VALUE obj, char *val) { int res = SWIG_AsCharArray(obj, val, 1); if (!SWIG_IsOK(res)) { long v; res = SWIG_AddCast(SWIG_AsVal_long (obj, &v)); if (SWIG_IsOK(res)) { if ((CHAR_MIN <= v) && (v <= CHAR_MAX)) { if (val) *val = static_cast< char >(v); } else { res = SWIG_OverflowError; } } } return res; } SWIGINTERN int SWIG_AsVal_unsigned_SS_char (VALUE obj, unsigned char *val) { unsigned long v; int res = SWIG_AsVal_unsigned_SS_long (obj, &v); if (SWIG_IsOK(res)) { if ((v > UCHAR_MAX)) { return SWIG_OverflowError; } else { if (val) *val = static_cast< unsigned char >(v); } } return res; } SWIGINTERN int SWIG_AsVal_short (VALUE obj, short *val) { long v; int res = SWIG_AsVal_long (obj, &v); if (SWIG_IsOK(res)) { if ((v < SHRT_MIN || v > SHRT_MAX)) { return SWIG_OverflowError; } else { if (val) *val = static_cast< short >(v); } } return res; } SWIGINTERN int SWIG_AsVal_unsigned_SS_short (VALUE obj, unsigned short *val) { unsigned long v; int res = SWIG_AsVal_unsigned_SS_long (obj, &v); if (SWIG_IsOK(res)) { if ((v > USHRT_MAX)) { return SWIG_OverflowError; } else { if (val) *val = static_cast< unsigned short >(v); } } return res; } SWIGINTERN int SWIG_AsVal_unsigned_SS_int (VALUE obj, unsigned int *val) { unsigned long v; int res = SWIG_AsVal_unsigned_SS_long (obj, &v); if (SWIG_IsOK(res)) { if ((v > UINT_MAX)) { return SWIG_OverflowError; } else { if (val) *val = static_cast< unsigned int >(v); } } return res; } /*@SWIG:/usr/share/swig/1.3.40/ruby/rubyprimtypes.swg,23,%ruby_aux_method@*/ SWIGINTERN VALUE SWIG_AUX_NUM2LL(VALUE *args) { VALUE obj = args[0]; VALUE type = TYPE(obj); long long *res = (long long *)(args[1]); *res = type == T_FIXNUM ? NUM2LL(obj) : rb_big2ll(obj); return obj; } /*@SWIG@*/ SWIGINTERN int SWIG_AsVal_long_SS_long (VALUE obj, long long *val) { VALUE type = TYPE(obj); if ((type == T_FIXNUM) || (type == T_BIGNUM)) { long long v; VALUE a[2]; a[0] = obj; a[1] = (VALUE)(&v); if (rb_rescue(RUBY_METHOD_FUNC(SWIG_AUX_NUM2LL), (VALUE)a, RUBY_METHOD_FUNC(SWIG_ruby_failed), 0) != Qnil) { if (val) *val = v; return SWIG_OK; } } return SWIG_TypeError; } #include /*@SWIG:/usr/share/swig/1.3.40/ruby/rubyprimtypes.swg,23,%ruby_aux_method@*/ SWIGINTERN VALUE SWIG_AUX_NUM2DBL(VALUE *args) { VALUE obj = args[0]; VALUE type = TYPE(obj); double *res = (double *)(args[1]); *res = NUM2DBL(obj); return obj; } /*@SWIG@*/ SWIGINTERN int SWIG_AsVal_double (VALUE obj, double *val) { VALUE type = TYPE(obj); if ((type == T_FLOAT) || (type == T_FIXNUM) || (type == T_BIGNUM)) { double v; VALUE a[2]; a[0] = obj; a[1] = (VALUE)(&v); if (rb_rescue(RUBY_METHOD_FUNC(SWIG_AUX_NUM2DBL), (VALUE)a, RUBY_METHOD_FUNC(SWIG_ruby_failed), 0) != Qnil) { if (val) *val = v; return SWIG_OK; } } return SWIG_TypeError; } SWIGINTERN int SWIG_AsVal_float (VALUE obj, float *val) { double v; int res = SWIG_AsVal_double (obj, &v); if (SWIG_IsOK(res)) { if ((v < -FLT_MAX || v > FLT_MAX)) { return SWIG_OverflowError; } else { if (val) *val = static_cast< float >(v); } } return res; } VALUE IDMEFValueList_to_SWIG(const Prelude::IDMEFValue &value) { VALUE ary; int ret, j = 0; std::vector result = value; std::vector::const_iterator i; ary = rb_ary_new2(result.size()); for ( i = result.begin(); i != result.end(); i++ ) { VALUE val; ret = IDMEFValue_to_SWIG(*i, &val); if ( ret < 0 ) return Qnil; RARRAY(ary)->ptr[j++] = val; } RARRAY(ary)->len = result.size(); return ary; } #define SWIG_From_double rb_float_new SWIGINTERNINLINE VALUE SWIG_From_float (float value) { return SWIG_From_double (value); } int IDMEFValue_to_SWIG(const IDMEFValue &result, TARGET_LANGUAGE_OUTPUT_TYPE ret) { std::stringstream s; idmef_value_t *value = result; idmef_value_type_id_t type = result.GetType(); if ( type == IDMEF_VALUE_TYPE_STRING ) { prelude_string_t *str = idmef_value_get_string(value); *ret = SWIG_FromCharPtrAndSize(prelude_string_get_string(str), prelude_string_get_len(str)); } else if ( type == IDMEF_VALUE_TYPE_INT8 ) *ret = SWIG_From_int(idmef_value_get_int8(value)); else if ( type == IDMEF_VALUE_TYPE_UINT8 ) *ret = SWIG_From_unsigned_SS_int(idmef_value_get_uint8(value)); else if ( type == IDMEF_VALUE_TYPE_INT16 ) *ret = SWIG_From_int(idmef_value_get_int16(value)); else if ( type == IDMEF_VALUE_TYPE_UINT16 ) *ret = SWIG_From_unsigned_SS_int(idmef_value_get_uint16(value)); else if ( type == IDMEF_VALUE_TYPE_INT32 ) *ret = SWIG_From_int(idmef_value_get_int32(value)); else if ( type == IDMEF_VALUE_TYPE_UINT32 ) *ret = SWIG_From_unsigned_SS_int(idmef_value_get_uint32(value)); else if ( type == IDMEF_VALUE_TYPE_INT64 ) *ret = SWIG_From_long_SS_long(idmef_value_get_int64(value)); else if ( type == IDMEF_VALUE_TYPE_UINT64 ) *ret = SWIG_From_unsigned_SS_long_SS_long(idmef_value_get_uint64(value)); else if ( type == IDMEF_VALUE_TYPE_FLOAT ) *ret = SWIG_From_float(idmef_value_get_float(value)); else if ( type == IDMEF_VALUE_TYPE_DOUBLE ) *ret = SWIG_From_double(idmef_value_get_double(value)); else if ( type == IDMEF_VALUE_TYPE_ENUM ) { const char *s = idmef_class_enum_to_string(idmef_value_get_class(value), idmef_value_get_enum(value)); *ret = SWIG_FromCharPtr(s); } else if ( type == IDMEF_VALUE_TYPE_TIME ) { IDMEFTime time = result; *ret = SWIG_NewPointerObj(new IDMEFTime(time), SWIGTYPE_p_Prelude__IDMEFTime, 1); } else if ( type == IDMEF_VALUE_TYPE_LIST ) *ret = IDMEFValueList_to_SWIG(result); else if ( type == IDMEF_VALUE_TYPE_DATA ) { idmef_data_t *d = idmef_value_get_data(value); idmef_data_type_t t = idmef_data_get_type(d); if ( t == IDMEF_DATA_TYPE_CHAR || t == IDMEF_DATA_TYPE_BYTE || t == IDMEF_DATA_TYPE_BYTE_STRING ) *ret = SWIG_FromCharPtrAndSize((const char *)idmef_data_get_data(d), idmef_data_get_len(d)); else if ( t == IDMEF_DATA_TYPE_CHAR_STRING ) *ret = SWIG_FromCharPtrAndSize((const char *)idmef_data_get_data(d), idmef_data_get_len(d) - 1); else if ( t == IDMEF_DATA_TYPE_FLOAT ) *ret = SWIG_From_float(idmef_data_get_float(d)); else if ( t == IDMEF_DATA_TYPE_UINT32 ) *ret = SWIG_From_unsigned_SS_int(idmef_data_get_uint32(d)); else if ( t == IDMEF_DATA_TYPE_UINT64 ) *ret = SWIG_From_unsigned_SS_long_SS_long(idmef_data_get_uint64(d)); } else if ( type == IDMEF_VALUE_TYPE_CLASS ) *ret = SWIG_NewPointerObj(new IDMEFValue(idmef_value_ref(value)), SWIGTYPE_p_Prelude__IDMEFValue, 1); else return -1; return 0; } SWIGINTERN void Prelude_IDMEF_Write(Prelude::IDMEF *self,void *nocast_p){ self->_genericWrite(_cb_ruby_write, nocast_p); } SWIGINTERN void Prelude_IDMEF_Read(Prelude::IDMEF *self,void *nocast_p){ self->_genericRead(_cb_ruby_read, nocast_p); } SWIGINTERN Prelude::IDMEF &Prelude_IDMEF_operator_Sg__Sg_(Prelude::IDMEF *self,void *nocast_p){ self->_genericWrite(_cb_ruby_write, nocast_p); return *self; } SWIGINTERN Prelude::IDMEF &Prelude_IDMEF_operator_Sl__Sl_(Prelude::IDMEF *self,void *nocast_p){ self->_genericRead(_cb_ruby_read, nocast_p); return *self; } swig_class SwigClassGC_VALUE; /* Document-method: PreludeEasy::GC_VALUE.inspect call-seq: inspect -> VALUE Inspect class and its contents. */ SWIGINTERN VALUE _wrap_GC_VALUE_inspect(int argc, VALUE *argv, VALUE self) { swig::GC_VALUE *arg1 = (swig::GC_VALUE *) 0 ; void *argp1 = 0 ; int res1 = 0 ; VALUE result; VALUE vresult = Qnil; if ((argc < 0) || (argc > 0)) { rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; } res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_swig__GC_VALUE, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "swig::GC_VALUE const *","inspect", 1, self )); } arg1 = reinterpret_cast< swig::GC_VALUE * >(argp1); result = (VALUE)((swig::GC_VALUE const *)arg1)->inspect(); vresult = result; return vresult; fail: return Qnil; } /* Document-method: PreludeEasy::GC_VALUE.to_s call-seq: to_s -> VALUE Convert class to a String representation. */ SWIGINTERN VALUE _wrap_GC_VALUE_to_s(int argc, VALUE *argv, VALUE self) { swig::GC_VALUE *arg1 = (swig::GC_VALUE *) 0 ; void *argp1 = 0 ; int res1 = 0 ; VALUE result; VALUE vresult = Qnil; if ((argc < 0) || (argc > 0)) { rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; } res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_swig__GC_VALUE, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "swig::GC_VALUE const *","to_s", 1, self )); } arg1 = reinterpret_cast< swig::GC_VALUE * >(argp1); result = (VALUE)((swig::GC_VALUE const *)arg1)->to_s(); vresult = result; return vresult; fail: return Qnil; } swig_class SwigClassConstIterator; SWIGINTERN void free_swig_ConstIterator(swig::ConstIterator *arg1) { delete arg1; } SWIGINTERN VALUE _wrap_ConstIterator_value(int argc, VALUE *argv, VALUE self) { swig::ConstIterator *arg1 = (swig::ConstIterator *) 0 ; void *argp1 = 0 ; int res1 = 0 ; VALUE result; VALUE vresult = Qnil; if ((argc < 0) || (argc > 0)) { rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; } res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_swig__ConstIterator, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "swig::ConstIterator const *","value", 1, self )); } arg1 = reinterpret_cast< swig::ConstIterator * >(argp1); try { result = (VALUE)((swig::ConstIterator const *)arg1)->value(); } catch(swig::stop_iteration &_e) { { (void)_e; SWIG_Ruby_ExceptionType(NULL, Qnil); SWIG_fail; } } vresult = result; return vresult; fail: return Qnil; } /* Document-method: PreludeEasy::ConstIterator.dup call-seq: dup -> ConstIterator Create a duplicate of the class and unfreeze it if needed. */ SWIGINTERN VALUE _wrap_ConstIterator_dup(int argc, VALUE *argv, VALUE self) { swig::ConstIterator *arg1 = (swig::ConstIterator *) 0 ; void *argp1 = 0 ; int res1 = 0 ; swig::ConstIterator *result = 0 ; VALUE vresult = Qnil; if ((argc < 0) || (argc > 0)) { rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; } res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_swig__ConstIterator, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "swig::ConstIterator const *","dup", 1, self )); } arg1 = reinterpret_cast< swig::ConstIterator * >(argp1); result = (swig::ConstIterator *)((swig::ConstIterator const *)arg1)->dup(); vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_swig__ConstIterator, SWIG_POINTER_OWN | 0 ); return vresult; fail: return Qnil; } /* Document-method: PreludeEasy::ConstIterator.inspect call-seq: inspect -> VALUE Inspect class and its contents. */ SWIGINTERN VALUE _wrap_ConstIterator_inspect(int argc, VALUE *argv, VALUE self) { swig::ConstIterator *arg1 = (swig::ConstIterator *) 0 ; void *argp1 = 0 ; int res1 = 0 ; VALUE result; VALUE vresult = Qnil; if ((argc < 0) || (argc > 0)) { rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; } res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_swig__ConstIterator, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "swig::ConstIterator const *","inspect", 1, self )); } arg1 = reinterpret_cast< swig::ConstIterator * >(argp1); result = (VALUE)((swig::ConstIterator const *)arg1)->inspect(); vresult = result; return vresult; fail: return Qnil; } /* Document-method: PreludeEasy::ConstIterator.to_s call-seq: to_s -> VALUE Convert class to a String representation. */ SWIGINTERN VALUE _wrap_ConstIterator_to_s(int argc, VALUE *argv, VALUE self) { swig::ConstIterator *arg1 = (swig::ConstIterator *) 0 ; void *argp1 = 0 ; int res1 = 0 ; VALUE result; VALUE vresult = Qnil; if ((argc < 0) || (argc > 0)) { rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; } res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_swig__ConstIterator, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "swig::ConstIterator const *","to_s", 1, self )); } arg1 = reinterpret_cast< swig::ConstIterator * >(argp1); result = (VALUE)((swig::ConstIterator const *)arg1)->to_s(); vresult = result; return vresult; fail: return Qnil; } SWIGINTERN VALUE _wrap_ConstIterator_next__SWIG_0(int argc, VALUE *argv, VALUE self) { swig::ConstIterator *arg1 = (swig::ConstIterator *) 0 ; size_t arg2 ; void *argp1 = 0 ; int res1 = 0 ; size_t val2 ; int ecode2 = 0 ; swig::ConstIterator *result = 0 ; VALUE vresult = Qnil; if ((argc < 1) || (argc > 1)) { rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; } res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_swig__ConstIterator, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "swig::ConstIterator *","next", 1, self )); } arg1 = reinterpret_cast< swig::ConstIterator * >(argp1); ecode2 = SWIG_AsVal_size_t(argv[0], &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "size_t","next", 2, argv[0] )); } arg2 = static_cast< size_t >(val2); result = (swig::ConstIterator *)(arg1)->next(arg2); vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_swig__ConstIterator, 0 | 0 ); return vresult; fail: return Qnil; } SWIGINTERN VALUE _wrap_ConstIterator_next__SWIG_1(int argc, VALUE *argv, VALUE self) { swig::ConstIterator *arg1 = (swig::ConstIterator *) 0 ; void *argp1 = 0 ; int res1 = 0 ; swig::ConstIterator *result = 0 ; VALUE vresult = Qnil; if ((argc < 0) || (argc > 0)) { rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; } res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_swig__ConstIterator, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "swig::ConstIterator *","next", 1, self )); } arg1 = reinterpret_cast< swig::ConstIterator * >(argp1); try { result = (swig::ConstIterator *)(arg1)->next(); } catch(swig::stop_iteration &_e) { { (void)_e; SWIG_Ruby_ExceptionType(NULL, Qnil); SWIG_fail; } } vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_swig__ConstIterator, 0 | 0 ); return vresult; fail: return Qnil; } SWIGINTERN VALUE _wrap_ConstIterator_next(int nargs, VALUE *args, VALUE self) { int argc; VALUE argv[3]; int ii; argc = nargs + 1; argv[0] = self; if (argc > 3) SWIG_fail; for (ii = 1; (ii < argc); ++ii) { argv[ii] = args[ii-1]; } if (argc == 1) { int _v; void *vptr = 0; int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_swig__ConstIterator, 0); _v = SWIG_CheckState(res); if (_v) { return _wrap_ConstIterator_next__SWIG_1(nargs, args, self); } } if (argc == 2) { int _v; void *vptr = 0; int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_swig__ConstIterator, 0); _v = SWIG_CheckState(res); if (_v) { { int res = SWIG_AsVal_size_t(argv[1], NULL); _v = SWIG_CheckState(res); } if (_v) { return _wrap_ConstIterator_next__SWIG_0(nargs, args, self); } } } fail: Ruby_Format_OverloadedError( argc, 3, "ConstIterator.next", " swig::ConstIterator * ConstIterator.next(size_t n)\n" " swig::ConstIterator * ConstIterator.next()\n"); return Qnil; } SWIGINTERN VALUE _wrap_ConstIterator_previous__SWIG_0(int argc, VALUE *argv, VALUE self) { swig::ConstIterator *arg1 = (swig::ConstIterator *) 0 ; size_t arg2 ; void *argp1 = 0 ; int res1 = 0 ; size_t val2 ; int ecode2 = 0 ; swig::ConstIterator *result = 0 ; VALUE vresult = Qnil; if ((argc < 1) || (argc > 1)) { rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; } res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_swig__ConstIterator, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "swig::ConstIterator *","previous", 1, self )); } arg1 = reinterpret_cast< swig::ConstIterator * >(argp1); ecode2 = SWIG_AsVal_size_t(argv[0], &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "size_t","previous", 2, argv[0] )); } arg2 = static_cast< size_t >(val2); result = (swig::ConstIterator *)(arg1)->previous(arg2); vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_swig__ConstIterator, 0 | 0 ); return vresult; fail: return Qnil; } SWIGINTERN VALUE _wrap_ConstIterator_previous__SWIG_1(int argc, VALUE *argv, VALUE self) { swig::ConstIterator *arg1 = (swig::ConstIterator *) 0 ; void *argp1 = 0 ; int res1 = 0 ; swig::ConstIterator *result = 0 ; VALUE vresult = Qnil; if ((argc < 0) || (argc > 0)) { rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; } res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_swig__ConstIterator, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "swig::ConstIterator *","previous", 1, self )); } arg1 = reinterpret_cast< swig::ConstIterator * >(argp1); try { result = (swig::ConstIterator *)(arg1)->previous(); } catch(swig::stop_iteration &_e) { { (void)_e; SWIG_Ruby_ExceptionType(NULL, Qnil); SWIG_fail; } } vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_swig__ConstIterator, 0 | 0 ); return vresult; fail: return Qnil; } SWIGINTERN VALUE _wrap_ConstIterator_previous(int nargs, VALUE *args, VALUE self) { int argc; VALUE argv[3]; int ii; argc = nargs + 1; argv[0] = self; if (argc > 3) SWIG_fail; for (ii = 1; (ii < argc); ++ii) { argv[ii] = args[ii-1]; } if (argc == 1) { int _v; void *vptr = 0; int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_swig__ConstIterator, 0); _v = SWIG_CheckState(res); if (_v) { return _wrap_ConstIterator_previous__SWIG_1(nargs, args, self); } } if (argc == 2) { int _v; void *vptr = 0; int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_swig__ConstIterator, 0); _v = SWIG_CheckState(res); if (_v) { { int res = SWIG_AsVal_size_t(argv[1], NULL); _v = SWIG_CheckState(res); } if (_v) { return _wrap_ConstIterator_previous__SWIG_0(nargs, args, self); } } } fail: Ruby_Format_OverloadedError( argc, 3, "ConstIterator.previous", " swig::ConstIterator * ConstIterator.previous(size_t n)\n" " swig::ConstIterator * ConstIterator.previous()\n"); return Qnil; } /* Document-method: PreludeEasy::ConstIterator.== call-seq: ==(x) -> bool Equality comparison operator. */ SWIGINTERN VALUE _wrap_ConstIterator___eq__(int argc, VALUE *argv, VALUE self) { swig::ConstIterator *arg1 = (swig::ConstIterator *) 0 ; swig::ConstIterator *arg2 = 0 ; void *argp1 = 0 ; int res1 = 0 ; void *argp2 ; int res2 = 0 ; bool result; VALUE vresult = Qnil; if ((argc < 1) || (argc > 1)) { rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; } res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_swig__ConstIterator, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "swig::ConstIterator const *","operator ==", 1, self )); } arg1 = reinterpret_cast< swig::ConstIterator * >(argp1); res2 = SWIG_ConvertPtr(argv[0], &argp2, SWIGTYPE_p_swig__ConstIterator, 0 ); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "swig::ConstIterator const &","operator ==", 2, argv[0] )); } if (!argp2) { SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "swig::ConstIterator const &","operator ==", 2, argv[0])); } arg2 = reinterpret_cast< swig::ConstIterator * >(argp2); result = (bool)((swig::ConstIterator const *)arg1)->operator ==((swig::ConstIterator const &)*arg2); vresult = SWIG_From_bool(static_cast< bool >(result)); return vresult; fail: return Qnil; } /* Document-method: PreludeEasy::ConstIterator.+ call-seq: +(n) -> ConstIterator Add operator. */ SWIGINTERN VALUE _wrap_ConstIterator___add__(int argc, VALUE *argv, VALUE self) { swig::ConstIterator *arg1 = (swig::ConstIterator *) 0 ; ptrdiff_t arg2 ; void *argp1 = 0 ; int res1 = 0 ; ptrdiff_t val2 ; int ecode2 = 0 ; swig::ConstIterator *result = 0 ; VALUE vresult = Qnil; if ((argc < 1) || (argc > 1)) { rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; } res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_swig__ConstIterator, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "swig::ConstIterator const *","operator +", 1, self )); } arg1 = reinterpret_cast< swig::ConstIterator * >(argp1); ecode2 = SWIG_AsVal_ptrdiff_t(argv[0], &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "ptrdiff_t","operator +", 2, argv[0] )); } arg2 = static_cast< ptrdiff_t >(val2); try { result = (swig::ConstIterator *)((swig::ConstIterator const *)arg1)->operator +(arg2); } catch(swig::stop_iteration &_e) { { (void)_e; SWIG_Ruby_ExceptionType(NULL, Qnil); SWIG_fail; } } vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_swig__ConstIterator, SWIG_POINTER_OWN | 0 ); return vresult; fail: return Qnil; } /* Document-method: PreludeEasy::ConstIterator.- call-seq: -(n) -> ConstIterator -(x) -> ptrdiff_t Substraction operator. */ SWIGINTERN VALUE _wrap_ConstIterator___sub____SWIG_0(int argc, VALUE *argv, VALUE self) { swig::ConstIterator *arg1 = (swig::ConstIterator *) 0 ; ptrdiff_t arg2 ; void *argp1 = 0 ; int res1 = 0 ; ptrdiff_t val2 ; int ecode2 = 0 ; swig::ConstIterator *result = 0 ; VALUE vresult = Qnil; if ((argc < 1) || (argc > 1)) { rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; } res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_swig__ConstIterator, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "swig::ConstIterator const *","operator -", 1, self )); } arg1 = reinterpret_cast< swig::ConstIterator * >(argp1); ecode2 = SWIG_AsVal_ptrdiff_t(argv[0], &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "ptrdiff_t","operator -", 2, argv[0] )); } arg2 = static_cast< ptrdiff_t >(val2); try { result = (swig::ConstIterator *)((swig::ConstIterator const *)arg1)->operator -(arg2); } catch(swig::stop_iteration &_e) { { (void)_e; SWIG_Ruby_ExceptionType(NULL, Qnil); SWIG_fail; } } vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_swig__ConstIterator, SWIG_POINTER_OWN | 0 ); return vresult; fail: return Qnil; } SWIGINTERN VALUE _wrap_ConstIterator___sub____SWIG_1(int argc, VALUE *argv, VALUE self) { swig::ConstIterator *arg1 = (swig::ConstIterator *) 0 ; swig::ConstIterator *arg2 = 0 ; void *argp1 = 0 ; int res1 = 0 ; void *argp2 ; int res2 = 0 ; ptrdiff_t result; VALUE vresult = Qnil; if ((argc < 1) || (argc > 1)) { rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; } res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_swig__ConstIterator, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "swig::ConstIterator const *","operator -", 1, self )); } arg1 = reinterpret_cast< swig::ConstIterator * >(argp1); res2 = SWIG_ConvertPtr(argv[0], &argp2, SWIGTYPE_p_swig__ConstIterator, 0 ); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "swig::ConstIterator const &","operator -", 2, argv[0] )); } if (!argp2) { SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "swig::ConstIterator const &","operator -", 2, argv[0])); } arg2 = reinterpret_cast< swig::ConstIterator * >(argp2); result = ((swig::ConstIterator const *)arg1)->operator -((swig::ConstIterator const &)*arg2); vresult = SWIG_From_ptrdiff_t(static_cast< ptrdiff_t >(result)); return vresult; fail: return Qnil; } SWIGINTERN VALUE _wrap_ConstIterator___sub__(int nargs, VALUE *args, VALUE self) { int argc; VALUE argv[3]; int ii; argc = nargs + 1; argv[0] = self; if (argc > 3) SWIG_fail; for (ii = 1; (ii < argc); ++ii) { argv[ii] = args[ii-1]; } if (argc == 2) { int _v; void *vptr = 0; int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_swig__ConstIterator, 0); _v = SWIG_CheckState(res); if (_v) { void *vptr = 0; int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_p_swig__ConstIterator, 0); _v = SWIG_CheckState(res); if (_v) { return _wrap_ConstIterator___sub____SWIG_1(nargs, args, self); } } } if (argc == 2) { int _v; void *vptr = 0; int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_swig__ConstIterator, 0); _v = SWIG_CheckState(res); if (_v) { { int res = SWIG_AsVal_ptrdiff_t(argv[1], NULL); _v = SWIG_CheckState(res); } if (_v) { return _wrap_ConstIterator___sub____SWIG_0(nargs, args, self); } } } fail: Ruby_Format_OverloadedError( argc, 3, "__sub__.new", " __sub__.new(ptrdiff_t n)\n" " __sub__.new(swig::ConstIterator const &x)\n"); return Qnil; } swig_class SwigClassIterator; SWIGINTERN VALUE _wrap_Iterator_valuee___(int argc, VALUE *argv, VALUE self) { swig::Iterator *arg1 = (swig::Iterator *) 0 ; VALUE *arg2 = 0 ; void *argp1 = 0 ; int res1 = 0 ; VALUE temp2 ; VALUE result; VALUE vresult = Qnil; if ((argc < 1) || (argc > 1)) { rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; } res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_swig__Iterator, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "swig::Iterator *","setValue", 1, self )); } arg1 = reinterpret_cast< swig::Iterator * >(argp1); temp2 = static_cast< VALUE >(argv[0]); arg2 = &temp2; result = (VALUE)(arg1)->setValue((VALUE const &)*arg2); vresult = result; return vresult; fail: return Qnil; } /* Document-method: PreludeEasy::Iterator.dup call-seq: dup -> Iterator Create a duplicate of the class and unfreeze it if needed. */ SWIGINTERN VALUE _wrap_Iterator_dup(int argc, VALUE *argv, VALUE self) { swig::Iterator *arg1 = (swig::Iterator *) 0 ; void *argp1 = 0 ; int res1 = 0 ; swig::Iterator *result = 0 ; VALUE vresult = Qnil; if ((argc < 0) || (argc > 0)) { rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; } res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_swig__Iterator, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "swig::Iterator const *","dup", 1, self )); } arg1 = reinterpret_cast< swig::Iterator * >(argp1); result = (swig::Iterator *)((swig::Iterator const *)arg1)->dup(); vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_swig__Iterator, SWIG_POINTER_OWN | 0 ); return vresult; fail: return Qnil; } SWIGINTERN VALUE _wrap_Iterator_next__SWIG_0(int argc, VALUE *argv, VALUE self) { swig::Iterator *arg1 = (swig::Iterator *) 0 ; size_t arg2 ; void *argp1 = 0 ; int res1 = 0 ; size_t val2 ; int ecode2 = 0 ; swig::Iterator *result = 0 ; VALUE vresult = Qnil; if ((argc < 1) || (argc > 1)) { rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; } res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_swig__Iterator, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "swig::Iterator *","next", 1, self )); } arg1 = reinterpret_cast< swig::Iterator * >(argp1); ecode2 = SWIG_AsVal_size_t(argv[0], &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "size_t","next", 2, argv[0] )); } arg2 = static_cast< size_t >(val2); result = (swig::Iterator *)(arg1)->next(arg2); vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_swig__Iterator, 0 | 0 ); return vresult; fail: return Qnil; } SWIGINTERN VALUE _wrap_Iterator_next__SWIG_1(int argc, VALUE *argv, VALUE self) { swig::Iterator *arg1 = (swig::Iterator *) 0 ; void *argp1 = 0 ; int res1 = 0 ; swig::Iterator *result = 0 ; VALUE vresult = Qnil; if ((argc < 0) || (argc > 0)) { rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; } res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_swig__Iterator, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "swig::Iterator *","next", 1, self )); } arg1 = reinterpret_cast< swig::Iterator * >(argp1); try { result = (swig::Iterator *)(arg1)->next(); } catch(swig::stop_iteration &_e) { { (void)_e; SWIG_Ruby_ExceptionType(NULL, Qnil); SWIG_fail; } } vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_swig__Iterator, 0 | 0 ); return vresult; fail: return Qnil; } SWIGINTERN VALUE _wrap_Iterator_next(int nargs, VALUE *args, VALUE self) { int argc; VALUE argv[3]; int ii; argc = nargs + 1; argv[0] = self; if (argc > 3) SWIG_fail; for (ii = 1; (ii < argc); ++ii) { argv[ii] = args[ii-1]; } if (argc == 1) { int _v; void *vptr = 0; int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_swig__Iterator, 0); _v = SWIG_CheckState(res); if (_v) { return _wrap_Iterator_next__SWIG_1(nargs, args, self); } } if (argc == 2) { int _v; void *vptr = 0; int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_swig__Iterator, 0); _v = SWIG_CheckState(res); if (_v) { { int res = SWIG_AsVal_size_t(argv[1], NULL); _v = SWIG_CheckState(res); } if (_v) { return _wrap_Iterator_next__SWIG_0(nargs, args, self); } } } fail: Ruby_Format_OverloadedError( argc, 3, "Iterator.next", " swig::Iterator * Iterator.next(size_t n)\n" " swig::Iterator * Iterator.next()\n"); return Qnil; } SWIGINTERN VALUE _wrap_Iterator_previous__SWIG_0(int argc, VALUE *argv, VALUE self) { swig::Iterator *arg1 = (swig::Iterator *) 0 ; size_t arg2 ; void *argp1 = 0 ; int res1 = 0 ; size_t val2 ; int ecode2 = 0 ; swig::Iterator *result = 0 ; VALUE vresult = Qnil; if ((argc < 1) || (argc > 1)) { rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; } res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_swig__Iterator, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "swig::Iterator *","previous", 1, self )); } arg1 = reinterpret_cast< swig::Iterator * >(argp1); ecode2 = SWIG_AsVal_size_t(argv[0], &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "size_t","previous", 2, argv[0] )); } arg2 = static_cast< size_t >(val2); result = (swig::Iterator *)(arg1)->previous(arg2); vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_swig__Iterator, 0 | 0 ); return vresult; fail: return Qnil; } SWIGINTERN VALUE _wrap_Iterator_previous__SWIG_1(int argc, VALUE *argv, VALUE self) { swig::Iterator *arg1 = (swig::Iterator *) 0 ; void *argp1 = 0 ; int res1 = 0 ; swig::Iterator *result = 0 ; VALUE vresult = Qnil; if ((argc < 0) || (argc > 0)) { rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; } res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_swig__Iterator, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "swig::Iterator *","previous", 1, self )); } arg1 = reinterpret_cast< swig::Iterator * >(argp1); try { result = (swig::Iterator *)(arg1)->previous(); } catch(swig::stop_iteration &_e) { { (void)_e; SWIG_Ruby_ExceptionType(NULL, Qnil); SWIG_fail; } } vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_swig__Iterator, 0 | 0 ); return vresult; fail: return Qnil; } SWIGINTERN VALUE _wrap_Iterator_previous(int nargs, VALUE *args, VALUE self) { int argc; VALUE argv[3]; int ii; argc = nargs + 1; argv[0] = self; if (argc > 3) SWIG_fail; for (ii = 1; (ii < argc); ++ii) { argv[ii] = args[ii-1]; } if (argc == 1) { int _v; void *vptr = 0; int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_swig__Iterator, 0); _v = SWIG_CheckState(res); if (_v) { return _wrap_Iterator_previous__SWIG_1(nargs, args, self); } } if (argc == 2) { int _v; void *vptr = 0; int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_swig__Iterator, 0); _v = SWIG_CheckState(res); if (_v) { { int res = SWIG_AsVal_size_t(argv[1], NULL); _v = SWIG_CheckState(res); } if (_v) { return _wrap_Iterator_previous__SWIG_0(nargs, args, self); } } } fail: Ruby_Format_OverloadedError( argc, 3, "Iterator.previous", " swig::Iterator * Iterator.previous(size_t n)\n" " swig::Iterator * Iterator.previous()\n"); return Qnil; } /* Document-method: PreludeEasy::Iterator.inspect call-seq: inspect -> VALUE Inspect class and its contents. */ SWIGINTERN VALUE _wrap_Iterator_inspect(int argc, VALUE *argv, VALUE self) { swig::Iterator *arg1 = (swig::Iterator *) 0 ; void *argp1 = 0 ; int res1 = 0 ; VALUE result; VALUE vresult = Qnil; if ((argc < 0) || (argc > 0)) { rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; } res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_swig__Iterator, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "swig::Iterator const *","inspect", 1, self )); } arg1 = reinterpret_cast< swig::Iterator * >(argp1); result = (VALUE)((swig::Iterator const *)arg1)->inspect(); vresult = result; return vresult; fail: return Qnil; } /* Document-method: PreludeEasy::Iterator.to_s call-seq: to_s -> VALUE Convert class to a String representation. */ SWIGINTERN VALUE _wrap_Iterator_to_s(int argc, VALUE *argv, VALUE self) { swig::Iterator *arg1 = (swig::Iterator *) 0 ; void *argp1 = 0 ; int res1 = 0 ; VALUE result; VALUE vresult = Qnil; if ((argc < 0) || (argc > 0)) { rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; } res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_swig__Iterator, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "swig::Iterator const *","to_s", 1, self )); } arg1 = reinterpret_cast< swig::Iterator * >(argp1); result = (VALUE)((swig::Iterator const *)arg1)->to_s(); vresult = result; return vresult; fail: return Qnil; } /* Document-method: PreludeEasy::Iterator.== call-seq: ==(x) -> bool Equality comparison operator. */ SWIGINTERN VALUE _wrap_Iterator___eq__(int argc, VALUE *argv, VALUE self) { swig::Iterator *arg1 = (swig::Iterator *) 0 ; swig::Iterator *arg2 = 0 ; void *argp1 = 0 ; int res1 = 0 ; void *argp2 ; int res2 = 0 ; bool result; VALUE vresult = Qnil; if ((argc < 1) || (argc > 1)) { rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; } res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_swig__Iterator, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "swig::Iterator const *","operator ==", 1, self )); } arg1 = reinterpret_cast< swig::Iterator * >(argp1); res2 = SWIG_ConvertPtr(argv[0], &argp2, SWIGTYPE_p_swig__Iterator, 0 ); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "swig::Iterator const &","operator ==", 2, argv[0] )); } if (!argp2) { SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "swig::Iterator const &","operator ==", 2, argv[0])); } arg2 = reinterpret_cast< swig::Iterator * >(argp2); result = (bool)((swig::Iterator const *)arg1)->operator ==((swig::Iterator const &)*arg2); vresult = SWIG_From_bool(static_cast< bool >(result)); return vresult; fail: return Qnil; } /* Document-method: PreludeEasy::Iterator.+ call-seq: +(n) -> Iterator Add operator. */ SWIGINTERN VALUE _wrap_Iterator___add__(int argc, VALUE *argv, VALUE self) { swig::Iterator *arg1 = (swig::Iterator *) 0 ; ptrdiff_t arg2 ; void *argp1 = 0 ; int res1 = 0 ; ptrdiff_t val2 ; int ecode2 = 0 ; swig::Iterator *result = 0 ; VALUE vresult = Qnil; if ((argc < 1) || (argc > 1)) { rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; } res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_swig__Iterator, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "swig::Iterator const *","operator +", 1, self )); } arg1 = reinterpret_cast< swig::Iterator * >(argp1); ecode2 = SWIG_AsVal_ptrdiff_t(argv[0], &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "ptrdiff_t","operator +", 2, argv[0] )); } arg2 = static_cast< ptrdiff_t >(val2); try { result = (swig::Iterator *)((swig::Iterator const *)arg1)->operator +(arg2); } catch(swig::stop_iteration &_e) { { (void)_e; SWIG_Ruby_ExceptionType(NULL, Qnil); SWIG_fail; } } vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_swig__Iterator, SWIG_POINTER_OWN | 0 ); return vresult; fail: return Qnil; } /* Document-method: PreludeEasy::Iterator.- call-seq: -(n) -> Iterator -(x) -> ptrdiff_t Substraction operator. */ SWIGINTERN VALUE _wrap_Iterator___sub____SWIG_0(int argc, VALUE *argv, VALUE self) { swig::Iterator *arg1 = (swig::Iterator *) 0 ; ptrdiff_t arg2 ; void *argp1 = 0 ; int res1 = 0 ; ptrdiff_t val2 ; int ecode2 = 0 ; swig::Iterator *result = 0 ; VALUE vresult = Qnil; if ((argc < 1) || (argc > 1)) { rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; } res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_swig__Iterator, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "swig::Iterator const *","operator -", 1, self )); } arg1 = reinterpret_cast< swig::Iterator * >(argp1); ecode2 = SWIG_AsVal_ptrdiff_t(argv[0], &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "ptrdiff_t","operator -", 2, argv[0] )); } arg2 = static_cast< ptrdiff_t >(val2); try { result = (swig::Iterator *)((swig::Iterator const *)arg1)->operator -(arg2); } catch(swig::stop_iteration &_e) { { (void)_e; SWIG_Ruby_ExceptionType(NULL, Qnil); SWIG_fail; } } vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_swig__Iterator, SWIG_POINTER_OWN | 0 ); return vresult; fail: return Qnil; } SWIGINTERN VALUE _wrap_Iterator___sub____SWIG_1(int argc, VALUE *argv, VALUE self) { swig::Iterator *arg1 = (swig::Iterator *) 0 ; swig::Iterator *arg2 = 0 ; void *argp1 = 0 ; int res1 = 0 ; void *argp2 ; int res2 = 0 ; ptrdiff_t result; VALUE vresult = Qnil; if ((argc < 1) || (argc > 1)) { rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; } res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_swig__Iterator, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "swig::Iterator const *","operator -", 1, self )); } arg1 = reinterpret_cast< swig::Iterator * >(argp1); res2 = SWIG_ConvertPtr(argv[0], &argp2, SWIGTYPE_p_swig__Iterator, 0 ); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "swig::Iterator const &","operator -", 2, argv[0] )); } if (!argp2) { SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "swig::Iterator const &","operator -", 2, argv[0])); } arg2 = reinterpret_cast< swig::Iterator * >(argp2); result = ((swig::Iterator const *)arg1)->operator -((swig::Iterator const &)*arg2); vresult = SWIG_From_ptrdiff_t(static_cast< ptrdiff_t >(result)); return vresult; fail: return Qnil; } SWIGINTERN VALUE _wrap_Iterator___sub__(int nargs, VALUE *args, VALUE self) { int argc; VALUE argv[3]; int ii; argc = nargs + 1; argv[0] = self; if (argc > 3) SWIG_fail; for (ii = 1; (ii < argc); ++ii) { argv[ii] = args[ii-1]; } if (argc == 2) { int _v; void *vptr = 0; int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_swig__Iterator, 0); _v = SWIG_CheckState(res); if (_v) { void *vptr = 0; int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_p_swig__Iterator, 0); _v = SWIG_CheckState(res); if (_v) { return _wrap_Iterator___sub____SWIG_1(nargs, args, self); } } } if (argc == 2) { int _v; void *vptr = 0; int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_swig__Iterator, 0); _v = SWIG_CheckState(res); if (_v) { { int res = SWIG_AsVal_ptrdiff_t(argv[1], NULL); _v = SWIG_CheckState(res); } if (_v) { return _wrap_Iterator___sub____SWIG_0(nargs, args, self); } } } fail: Ruby_Format_OverloadedError( argc, 3, "__sub__.new", " __sub__.new(ptrdiff_t n)\n" " __sub__.new(swig::Iterator const &x)\n"); return Qnil; } SWIGINTERN void free_swig_Iterator(swig::Iterator *arg1) { delete arg1; } SWIGINTERN VALUE _wrap_CheckVersion__SWIG_0(int argc, VALUE *argv, VALUE self) { char *arg1 = (char *) 0 ; int res1 ; char *buf1 = 0 ; int alloc1 = 0 ; char *result = 0 ; VALUE vresult = Qnil; if ((argc < 1) || (argc > 1)) { rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; } res1 = SWIG_AsCharPtrAndSize(argv[0], &buf1, NULL, &alloc1); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "char const *","CheckVersion", 1, argv[0] )); } arg1 = reinterpret_cast< char * >(buf1); try { result = (char *)CheckVersion((char const *)arg1); } catch(Prelude::PreludeError &_e) { rb_exc_raise(SWIG_Ruby_ExceptionType(SWIGTYPE_p_Prelude__PreludeError, SWIG_NewPointerObj((new Prelude::PreludeError(static_cast< const Prelude::PreludeError& >(_e))),SWIGTYPE_p_Prelude__PreludeError,SWIG_POINTER_OWN))); SWIG_fail; } vresult = SWIG_FromCharPtr((const char *)result); if (alloc1 == SWIG_NEWOBJ) delete[] buf1; return vresult; fail: if (alloc1 == SWIG_NEWOBJ) delete[] buf1; return Qnil; } SWIGINTERN VALUE _wrap_CheckVersion__SWIG_1(int argc, VALUE *argv, VALUE self) { char *result = 0 ; VALUE vresult = Qnil; if ((argc < 0) || (argc > 0)) { rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; } try { result = (char *)CheckVersion(); } catch(Prelude::PreludeError &_e) { rb_exc_raise(SWIG_Ruby_ExceptionType(SWIGTYPE_p_Prelude__PreludeError, SWIG_NewPointerObj((new Prelude::PreludeError(static_cast< const Prelude::PreludeError& >(_e))),SWIGTYPE_p_Prelude__PreludeError,SWIG_POINTER_OWN))); SWIG_fail; } vresult = SWIG_FromCharPtr((const char *)result); return vresult; fail: return Qnil; } SWIGINTERN VALUE _wrap_CheckVersion(int nargs, VALUE *args, VALUE self) { int argc; VALUE argv[1]; int ii; argc = nargs; if (argc > 1) SWIG_fail; for (ii = 0; (ii < argc); ++ii) { argv[ii] = args[ii]; } if (argc == 0) { return _wrap_CheckVersion__SWIG_1(nargs, args, self); } if (argc == 1) { int _v; int res = SWIG_AsCharPtrAndSize(argv[0], 0, NULL, 0); _v = SWIG_CheckState(res); if (_v) { return _wrap_CheckVersion__SWIG_0(nargs, args, self); } } fail: Ruby_Format_OverloadedError( argc, 1, "CheckVersion", " char const * CheckVersion(char const *version)\n" " char const * CheckVersion()\n"); return Qnil; } swig_class SwigClassPreludeLog; SWIGINTERN VALUE _wrap_PreludeLog_SetLevel(int argc, VALUE *argv, VALUE self) { int arg1 ; int val1 ; int ecode1 = 0 ; if ((argc < 1) || (argc > 1)) { rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; } ecode1 = SWIG_AsVal_int(argv[0], &val1); if (!SWIG_IsOK(ecode1)) { SWIG_exception_fail(SWIG_ArgError(ecode1), Ruby_Format_TypeError( "", "int","Prelude::PreludeLog::SetLevel", 1, argv[0] )); } arg1 = static_cast< int >(val1); try { Prelude::PreludeLog::SetLevel(arg1); } catch(Prelude::PreludeError &_e) { rb_exc_raise(SWIG_Ruby_ExceptionType(SWIGTYPE_p_Prelude__PreludeError, SWIG_NewPointerObj((new Prelude::PreludeError(static_cast< const Prelude::PreludeError& >(_e))),SWIGTYPE_p_Prelude__PreludeError,SWIG_POINTER_OWN))); SWIG_fail; } return Qnil; fail: return Qnil; } SWIGINTERN VALUE _wrap_PreludeLog_SetDebugLevel(int argc, VALUE *argv, VALUE self) { int arg1 ; int val1 ; int ecode1 = 0 ; if ((argc < 1) || (argc > 1)) { rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; } ecode1 = SWIG_AsVal_int(argv[0], &val1); if (!SWIG_IsOK(ecode1)) { SWIG_exception_fail(SWIG_ArgError(ecode1), Ruby_Format_TypeError( "", "int","Prelude::PreludeLog::SetDebugLevel", 1, argv[0] )); } arg1 = static_cast< int >(val1); try { Prelude::PreludeLog::SetDebugLevel(arg1); } catch(Prelude::PreludeError &_e) { rb_exc_raise(SWIG_Ruby_ExceptionType(SWIGTYPE_p_Prelude__PreludeError, SWIG_NewPointerObj((new Prelude::PreludeError(static_cast< const Prelude::PreludeError& >(_e))),SWIGTYPE_p_Prelude__PreludeError,SWIG_POINTER_OWN))); SWIG_fail; } return Qnil; fail: return Qnil; } SWIGINTERN VALUE _wrap_PreludeLog_SetFlags(int argc, VALUE *argv, VALUE self) { int arg1 ; int val1 ; int ecode1 = 0 ; if ((argc < 1) || (argc > 1)) { rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; } ecode1 = SWIG_AsVal_int(argv[0], &val1); if (!SWIG_IsOK(ecode1)) { SWIG_exception_fail(SWIG_ArgError(ecode1), Ruby_Format_TypeError( "", "int","Prelude::PreludeLog::SetFlags", 1, argv[0] )); } arg1 = static_cast< int >(val1); try { Prelude::PreludeLog::SetFlags(arg1); } catch(Prelude::PreludeError &_e) { rb_exc_raise(SWIG_Ruby_ExceptionType(SWIGTYPE_p_Prelude__PreludeError, SWIG_NewPointerObj((new Prelude::PreludeError(static_cast< const Prelude::PreludeError& >(_e))),SWIGTYPE_p_Prelude__PreludeError,SWIG_POINTER_OWN))); SWIG_fail; } return Qnil; fail: return Qnil; } SWIGINTERN VALUE _wrap_PreludeLog_GetFlags(int argc, VALUE *argv, VALUE self) { int result; VALUE vresult = Qnil; if ((argc < 0) || (argc > 0)) { rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; } try { result = (int)Prelude::PreludeLog::GetFlags(); } catch(Prelude::PreludeError &_e) { rb_exc_raise(SWIG_Ruby_ExceptionType(SWIGTYPE_p_Prelude__PreludeError, SWIG_NewPointerObj((new Prelude::PreludeError(static_cast< const Prelude::PreludeError& >(_e))),SWIGTYPE_p_Prelude__PreludeError,SWIG_POINTER_OWN))); SWIG_fail; } vresult = SWIG_From_int(static_cast< int >(result)); return vresult; fail: return Qnil; } SWIGINTERN VALUE _wrap_PreludeLog_SetLogfile(int argc, VALUE *argv, VALUE self) { char *arg1 = (char *) 0 ; int res1 ; char *buf1 = 0 ; int alloc1 = 0 ; if ((argc < 1) || (argc > 1)) { rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; } res1 = SWIG_AsCharPtrAndSize(argv[0], &buf1, NULL, &alloc1); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "char const *","Prelude::PreludeLog::SetLogfile", 1, argv[0] )); } arg1 = reinterpret_cast< char * >(buf1); try { Prelude::PreludeLog::SetLogfile((char const *)arg1); } catch(Prelude::PreludeError &_e) { rb_exc_raise(SWIG_Ruby_ExceptionType(SWIGTYPE_p_Prelude__PreludeError, SWIG_NewPointerObj((new Prelude::PreludeError(static_cast< const Prelude::PreludeError& >(_e))),SWIGTYPE_p_Prelude__PreludeError,SWIG_POINTER_OWN))); SWIG_fail; } if (alloc1 == SWIG_NEWOBJ) delete[] buf1; return Qnil; fail: if (alloc1 == SWIG_NEWOBJ) delete[] buf1; return Qnil; } SWIGINTERN VALUE _wrap_PreludeLog_SetCallback(int argc, VALUE *argv, VALUE self) { void (*arg1)(int,char const *) = (void (*)(int,char const *)) 0 ; if ((argc < 1) || (argc > 1)) { rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; } { if ( ! SWIG_Ruby_isCallable(argv[0]) ) SWIG_exception_fail(SWIG_ValueError, "Argument is not a callable object"); __prelude_log_func = argv[0]; rb_global_variable(&argv[0]); arg1 = _cb_ruby_log; } try { Prelude::PreludeLog::SetCallback(arg1); } catch(Prelude::PreludeError &_e) { rb_exc_raise(SWIG_Ruby_ExceptionType(SWIGTYPE_p_Prelude__PreludeError, SWIG_NewPointerObj((new Prelude::PreludeError(static_cast< const Prelude::PreludeError& >(_e))),SWIGTYPE_p_Prelude__PreludeError,SWIG_POINTER_OWN))); SWIG_fail; } return Qnil; fail: return Qnil; } #ifdef HAVE_RB_DEFINE_ALLOC_FUNC SWIGINTERN VALUE _wrap_PreludeLog_allocate(VALUE self) { #else SWIGINTERN VALUE _wrap_PreludeLog_allocate(int argc, VALUE *argv, VALUE self) { #endif VALUE vresult = SWIG_NewClassInstance(self, SWIGTYPE_p_Prelude__PreludeLog); #ifndef HAVE_RB_DEFINE_ALLOC_FUNC rb_obj_call_init(vresult, argc, argv); #endif return vresult; } SWIGINTERN VALUE _wrap_new_PreludeLog(int argc, VALUE *argv, VALUE self) { Prelude::PreludeLog *result = 0 ; if ((argc < 0) || (argc > 0)) { rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; } result = (Prelude::PreludeLog *)new Prelude::PreludeLog(); DATA_PTR(self) = result; return self; fail: return Qnil; } SWIGINTERN void free_Prelude_PreludeLog(Prelude::PreludeLog *arg1) { delete arg1; } swig_class SwigClassPreludeError; SWIGINTERN void free_Prelude_PreludeError(Prelude::PreludeError *arg1) { delete arg1; } SWIGINTERN VALUE _wrap_new_PreludeError__SWIG_0(int argc, VALUE *argv, VALUE self) { int arg1 ; int val1 ; int ecode1 = 0 ; Prelude::PreludeError *result = 0 ; if ((argc < 1) || (argc > 1)) { rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; } ecode1 = SWIG_AsVal_int(argv[0], &val1); if (!SWIG_IsOK(ecode1)) { SWIG_exception_fail(SWIG_ArgError(ecode1), Ruby_Format_TypeError( "", "int","Prelude::PreludeError", 1, argv[0] )); } arg1 = static_cast< int >(val1); try { result = (Prelude::PreludeError *)new Prelude::PreludeError(arg1); DATA_PTR(self) = result; } catch(Prelude::PreludeError &_e) { rb_exc_raise(SWIG_Ruby_ExceptionType(SWIGTYPE_p_Prelude__PreludeError, SWIG_NewPointerObj((new Prelude::PreludeError(static_cast< const Prelude::PreludeError& >(_e))),SWIGTYPE_p_Prelude__PreludeError,SWIG_POINTER_OWN))); SWIG_fail; } return self; fail: return Qnil; } #ifdef HAVE_RB_DEFINE_ALLOC_FUNC SWIGINTERN VALUE _wrap_PreludeError_allocate(VALUE self) { #else SWIGINTERN VALUE _wrap_PreludeError_allocate(int argc, VALUE *argv, VALUE self) { #endif VALUE vresult = SWIG_NewClassInstance(self, SWIGTYPE_p_Prelude__PreludeError); #ifndef HAVE_RB_DEFINE_ALLOC_FUNC rb_obj_call_init(vresult, argc, argv); #endif return vresult; } SWIGINTERN VALUE _wrap_new_PreludeError__SWIG_1(int argc, VALUE *argv, VALUE self) { std::string arg1 ; Prelude::PreludeError *result = 0 ; if ((argc < 1) || (argc > 1)) { rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; } { std::string *ptr = (std::string *)0; int res = SWIG_AsPtr_std_string(argv[0], &ptr); if (!SWIG_IsOK(res) || !ptr) { SWIG_exception_fail(SWIG_ArgError((ptr ? res : SWIG_TypeError)), Ruby_Format_TypeError( "", "std::string const","Prelude::PreludeError", 1, argv[0] )); } arg1 = *ptr; if (SWIG_IsNewObj(res)) delete ptr; } try { result = (Prelude::PreludeError *)new Prelude::PreludeError(arg1); DATA_PTR(self) = result; } catch(Prelude::PreludeError &_e) { rb_exc_raise(SWIG_Ruby_ExceptionType(SWIGTYPE_p_Prelude__PreludeError, SWIG_NewPointerObj((new Prelude::PreludeError(static_cast< const Prelude::PreludeError& >(_e))),SWIGTYPE_p_Prelude__PreludeError,SWIG_POINTER_OWN))); SWIG_fail; } return self; fail: return Qnil; } SWIGINTERN VALUE _wrap_new_PreludeError(int nargs, VALUE *args, VALUE self) { int argc; VALUE argv[1]; int ii; argc = nargs; if (argc > 1) SWIG_fail; for (ii = 0; (ii < argc); ++ii) { argv[ii] = args[ii]; } if (argc == 1) { int _v; { int res = SWIG_AsVal_int(argv[0], NULL); _v = SWIG_CheckState(res); } if (_v) { return _wrap_new_PreludeError__SWIG_0(nargs, args, self); } } if (argc == 1) { int _v; int res = SWIG_AsPtr_std_string(argv[0], (std::string**)(0)); _v = SWIG_CheckState(res); if (_v) { return _wrap_new_PreludeError__SWIG_1(nargs, args, self); } } fail: Ruby_Format_OverloadedError( argc, 1, "PreludeError.new", " PreludeError.new(int error)\n" " PreludeError.new(std::string const message)\n"); return Qnil; } SWIGINTERN VALUE _wrap_PreludeError_what(int argc, VALUE *argv, VALUE self) { Prelude::PreludeError *arg1 = (Prelude::PreludeError *) 0 ; void *argp1 = 0 ; int res1 = 0 ; char *result = 0 ; VALUE vresult = Qnil; if ((argc < 0) || (argc > 0)) { rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; } res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Prelude__PreludeError, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Prelude::PreludeError const *","what", 1, self )); } arg1 = reinterpret_cast< Prelude::PreludeError * >(argp1); try { result = (char *)((Prelude::PreludeError const *)arg1)->what(); } catch(Prelude::PreludeError &_e) { rb_exc_raise(SWIG_Ruby_ExceptionType(SWIGTYPE_p_Prelude__PreludeError, SWIG_NewPointerObj((new Prelude::PreludeError(static_cast< const Prelude::PreludeError& >(_e))),SWIGTYPE_p_Prelude__PreludeError,SWIG_POINTER_OWN))); SWIG_fail; } vresult = SWIG_FromCharPtr((const char *)result); return vresult; fail: return Qnil; } SWIGINTERN VALUE _wrap_PreludeError___str__(int argc, VALUE *argv, VALUE self) { Prelude::PreludeError *arg1 = (Prelude::PreludeError *) 0 ; void *argp1 = 0 ; int res1 = 0 ; std::string result; VALUE vresult = Qnil; if ((argc < 0) || (argc > 0)) { rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; } res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Prelude__PreludeError, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Prelude::PreludeError const *","operator const std::string", 1, self )); } arg1 = reinterpret_cast< Prelude::PreludeError * >(argp1); try { result = ((Prelude::PreludeError const *)arg1)->operator const std::string(); } catch(Prelude::PreludeError &_e) { rb_exc_raise(SWIG_Ruby_ExceptionType(SWIGTYPE_p_Prelude__PreludeError, SWIG_NewPointerObj((new Prelude::PreludeError(static_cast< const Prelude::PreludeError& >(_e))),SWIGTYPE_p_Prelude__PreludeError,SWIG_POINTER_OWN))); SWIG_fail; } vresult = SWIG_From_std_string(static_cast< std::string >(result)); return vresult; fail: return Qnil; } swig_class SwigClassConnection; SWIGINTERN void free_Prelude_Connection(Prelude::Connection *arg1) { delete arg1; } SWIGINTERN VALUE _wrap_new_Connection__SWIG_0(int argc, VALUE *argv, VALUE self) { Prelude::Connection *result = 0 ; if ((argc < 0) || (argc > 0)) { rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; } try { result = (Prelude::Connection *)new Prelude::Connection(); DATA_PTR(self) = result; } catch(Prelude::PreludeError &_e) { rb_exc_raise(SWIG_Ruby_ExceptionType(SWIGTYPE_p_Prelude__PreludeError, SWIG_NewPointerObj((new Prelude::PreludeError(static_cast< const Prelude::PreludeError& >(_e))),SWIGTYPE_p_Prelude__PreludeError,SWIG_POINTER_OWN))); SWIG_fail; } return self; fail: return Qnil; } SWIGINTERN VALUE _wrap_new_Connection__SWIG_1(int argc, VALUE *argv, VALUE self) { char *arg1 = (char *) 0 ; int res1 ; char *buf1 = 0 ; int alloc1 = 0 ; Prelude::Connection *result = 0 ; if ((argc < 1) || (argc > 1)) { rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; } res1 = SWIG_AsCharPtrAndSize(argv[0], &buf1, NULL, &alloc1); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "char const *","Prelude::Connection", 1, argv[0] )); } arg1 = reinterpret_cast< char * >(buf1); try { result = (Prelude::Connection *)new Prelude::Connection((char const *)arg1); DATA_PTR(self) = result; } catch(Prelude::PreludeError &_e) { rb_exc_raise(SWIG_Ruby_ExceptionType(SWIGTYPE_p_Prelude__PreludeError, SWIG_NewPointerObj((new Prelude::PreludeError(static_cast< const Prelude::PreludeError& >(_e))),SWIGTYPE_p_Prelude__PreludeError,SWIG_POINTER_OWN))); SWIG_fail; } if (alloc1 == SWIG_NEWOBJ) delete[] buf1; return self; fail: if (alloc1 == SWIG_NEWOBJ) delete[] buf1; return Qnil; } SWIGINTERN VALUE _wrap_new_Connection__SWIG_2(int argc, VALUE *argv, VALUE self) { Prelude::Connection *arg1 = 0 ; void *argp1 ; int res1 = 0 ; Prelude::Connection *result = 0 ; if ((argc < 1) || (argc > 1)) { rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; } res1 = SWIG_ConvertPtr(argv[0], &argp1, SWIGTYPE_p_Prelude__Connection, 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Prelude::Connection const &","Prelude::Connection", 1, argv[0] )); } if (!argp1) { SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "Prelude::Connection const &","Prelude::Connection", 1, argv[0])); } arg1 = reinterpret_cast< Prelude::Connection * >(argp1); try { result = (Prelude::Connection *)new Prelude::Connection((Prelude::Connection const &)*arg1); DATA_PTR(self) = result; } catch(Prelude::PreludeError &_e) { rb_exc_raise(SWIG_Ruby_ExceptionType(SWIGTYPE_p_Prelude__PreludeError, SWIG_NewPointerObj((new Prelude::PreludeError(static_cast< const Prelude::PreludeError& >(_e))),SWIGTYPE_p_Prelude__PreludeError,SWIG_POINTER_OWN))); SWIG_fail; } return self; fail: return Qnil; } SWIGINTERN VALUE _wrap_new_Connection__SWIG_3(int argc, VALUE *argv, VALUE self) { prelude_connection_t *arg1 = (prelude_connection_t *) 0 ; bool arg2 ; void *argp1 = 0 ; int res1 = 0 ; bool val2 ; int ecode2 = 0 ; Prelude::Connection *result = 0 ; if ((argc < 2) || (argc > 2)) { rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail; } res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_prelude_connection_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "prelude_connection_t *","Prelude::Connection", 1, argv[0] )); } arg1 = reinterpret_cast< prelude_connection_t * >(argp1); ecode2 = SWIG_AsVal_bool(argv[1], &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "bool","Prelude::Connection", 2, argv[1] )); } arg2 = static_cast< bool >(val2); try { result = (Prelude::Connection *)new Prelude::Connection(arg1,arg2); DATA_PTR(self) = result; } catch(Prelude::PreludeError &_e) { rb_exc_raise(SWIG_Ruby_ExceptionType(SWIGTYPE_p_Prelude__PreludeError, SWIG_NewPointerObj((new Prelude::PreludeError(static_cast< const Prelude::PreludeError& >(_e))),SWIGTYPE_p_Prelude__PreludeError,SWIG_POINTER_OWN))); SWIG_fail; } return self; fail: return Qnil; } #ifdef HAVE_RB_DEFINE_ALLOC_FUNC SWIGINTERN VALUE _wrap_Connection_allocate(VALUE self) { #else SWIGINTERN VALUE _wrap_Connection_allocate(int argc, VALUE *argv, VALUE self) { #endif VALUE vresult = SWIG_NewClassInstance(self, SWIGTYPE_p_Prelude__Connection); #ifndef HAVE_RB_DEFINE_ALLOC_FUNC rb_obj_call_init(vresult, argc, argv); #endif return vresult; } SWIGINTERN VALUE _wrap_new_Connection__SWIG_4(int argc, VALUE *argv, VALUE self) { prelude_connection_t *arg1 = (prelude_connection_t *) 0 ; void *argp1 = 0 ; int res1 = 0 ; Prelude::Connection *result = 0 ; if ((argc < 1) || (argc > 1)) { rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; } res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_prelude_connection_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "prelude_connection_t *","Prelude::Connection", 1, argv[0] )); } arg1 = reinterpret_cast< prelude_connection_t * >(argp1); try { result = (Prelude::Connection *)new Prelude::Connection(arg1); DATA_PTR(self) = result; } catch(Prelude::PreludeError &_e) { rb_exc_raise(SWIG_Ruby_ExceptionType(SWIGTYPE_p_Prelude__PreludeError, SWIG_NewPointerObj((new Prelude::PreludeError(static_cast< const Prelude::PreludeError& >(_e))),SWIGTYPE_p_Prelude__PreludeError,SWIG_POINTER_OWN))); SWIG_fail; } return self; fail: return Qnil; } SWIGINTERN VALUE _wrap_new_Connection(int nargs, VALUE *args, VALUE self) { int argc; VALUE argv[2]; int ii; argc = nargs; if (argc > 2) SWIG_fail; for (ii = 0; (ii < argc); ++ii) { argv[ii] = args[ii]; } if (argc == 0) { return _wrap_new_Connection__SWIG_0(nargs, args, self); } if (argc == 1) { int _v; void *vptr = 0; int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_Prelude__Connection, 0); _v = SWIG_CheckState(res); if (_v) { return _wrap_new_Connection__SWIG_2(nargs, args, self); } } if (argc == 1) { int _v; void *vptr = 0; int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_prelude_connection_t, 0); _v = SWIG_CheckState(res); if (_v) { return _wrap_new_Connection__SWIG_4(nargs, args, self); } } if (argc == 1) { int _v; int res = SWIG_AsCharPtrAndSize(argv[0], 0, NULL, 0); _v = SWIG_CheckState(res); if (_v) { return _wrap_new_Connection__SWIG_1(nargs, args, self); } } if (argc == 2) { int _v; void *vptr = 0; int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_prelude_connection_t, 0); _v = SWIG_CheckState(res); if (_v) { { int res = SWIG_AsVal_bool(argv[1], NULL); _v = SWIG_CheckState(res); } if (_v) { return _wrap_new_Connection__SWIG_3(nargs, args, self); } } } fail: Ruby_Format_OverloadedError( argc, 2, "Connection.new", " Connection.new()\n" " Connection.new(char const *addr)\n" " Connection.new(Prelude::Connection const &con)\n" " Connection.new(prelude_connection_t *con, bool own_data)\n" " Connection.new(prelude_connection_t *con)\n"); return Qnil; } SWIGINTERN VALUE _wrap_Connection_GetConnection(int argc, VALUE *argv, VALUE self) { Prelude::Connection *arg1 = (Prelude::Connection *) 0 ; void *argp1 = 0 ; int res1 = 0 ; prelude_connection_t *result = 0 ; VALUE vresult = Qnil; if ((argc < 0) || (argc > 0)) { rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; } res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Prelude__Connection, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Prelude::Connection *","GetConnection", 1, self )); } arg1 = reinterpret_cast< Prelude::Connection * >(argp1); try { result = (prelude_connection_t *)(arg1)->GetConnection(); } catch(Prelude::PreludeError &_e) { rb_exc_raise(SWIG_Ruby_ExceptionType(SWIGTYPE_p_Prelude__PreludeError, SWIG_NewPointerObj((new Prelude::PreludeError(static_cast< const Prelude::PreludeError& >(_e))),SWIGTYPE_p_Prelude__PreludeError,SWIG_POINTER_OWN))); SWIG_fail; } vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_prelude_connection_t, 0 | 0 ); return vresult; fail: return Qnil; } SWIGINTERN VALUE _wrap_Connection_Close(int argc, VALUE *argv, VALUE self) { Prelude::Connection *arg1 = (Prelude::Connection *) 0 ; void *argp1 = 0 ; int res1 = 0 ; if ((argc < 0) || (argc > 0)) { rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; } res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Prelude__Connection, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Prelude::Connection *","Close", 1, self )); } arg1 = reinterpret_cast< Prelude::Connection * >(argp1); try { (arg1)->Close(); } catch(Prelude::PreludeError &_e) { rb_exc_raise(SWIG_Ruby_ExceptionType(SWIGTYPE_p_Prelude__PreludeError, SWIG_NewPointerObj((new Prelude::PreludeError(static_cast< const Prelude::PreludeError& >(_e))),SWIGTYPE_p_Prelude__PreludeError,SWIG_POINTER_OWN))); SWIG_fail; } return Qnil; fail: return Qnil; } SWIGINTERN VALUE _wrap_Connection_Connect(int argc, VALUE *argv, VALUE self) { Prelude::Connection *arg1 = (Prelude::Connection *) 0 ; Prelude::ClientProfile *arg2 = 0 ; int arg3 ; void *argp1 = 0 ; int res1 = 0 ; void *argp2 = 0 ; int res2 = 0 ; int val3 ; int ecode3 = 0 ; if ((argc < 2) || (argc > 2)) { rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail; } res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Prelude__Connection, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Prelude::Connection *","Connect", 1, self )); } arg1 = reinterpret_cast< Prelude::Connection * >(argp1); res2 = SWIG_ConvertPtr(argv[0], &argp2, SWIGTYPE_p_Prelude__ClientProfile, 0 ); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "Prelude::ClientProfile &","Connect", 2, argv[0] )); } if (!argp2) { SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "Prelude::ClientProfile &","Connect", 2, argv[0])); } arg2 = reinterpret_cast< Prelude::ClientProfile * >(argp2); ecode3 = SWIG_AsVal_int(argv[1], &val3); if (!SWIG_IsOK(ecode3)) { SWIG_exception_fail(SWIG_ArgError(ecode3), Ruby_Format_TypeError( "", "int","Connect", 3, argv[1] )); } arg3 = static_cast< int >(val3); try { (arg1)->Connect(*arg2,arg3); } catch(Prelude::PreludeError &_e) { rb_exc_raise(SWIG_Ruby_ExceptionType(SWIGTYPE_p_Prelude__PreludeError, SWIG_NewPointerObj((new Prelude::PreludeError(static_cast< const Prelude::PreludeError& >(_e))),SWIGTYPE_p_Prelude__PreludeError,SWIG_POINTER_OWN))); SWIG_fail; } return Qnil; fail: return Qnil; } SWIGINTERN VALUE _wrap_Connection_SetState(int argc, VALUE *argv, VALUE self) { Prelude::Connection *arg1 = (Prelude::Connection *) 0 ; int arg2 ; void *argp1 = 0 ; int res1 = 0 ; int val2 ; int ecode2 = 0 ; if ((argc < 1) || (argc > 1)) { rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; } res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Prelude__Connection, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Prelude::Connection *","SetState", 1, self )); } arg1 = reinterpret_cast< Prelude::Connection * >(argp1); ecode2 = SWIG_AsVal_int(argv[0], &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "int","SetState", 2, argv[0] )); } arg2 = static_cast< int >(val2); try { (arg1)->SetState(arg2); } catch(Prelude::PreludeError &_e) { rb_exc_raise(SWIG_Ruby_ExceptionType(SWIGTYPE_p_Prelude__PreludeError, SWIG_NewPointerObj((new Prelude::PreludeError(static_cast< const Prelude::PreludeError& >(_e))),SWIGTYPE_p_Prelude__PreludeError,SWIG_POINTER_OWN))); SWIG_fail; } return Qnil; fail: return Qnil; } SWIGINTERN VALUE _wrap_Connection_GetState(int argc, VALUE *argv, VALUE self) { Prelude::Connection *arg1 = (Prelude::Connection *) 0 ; void *argp1 = 0 ; int res1 = 0 ; int result; VALUE vresult = Qnil; if ((argc < 0) || (argc > 0)) { rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; } res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Prelude__Connection, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Prelude::Connection *","GetState", 1, self )); } arg1 = reinterpret_cast< Prelude::Connection * >(argp1); try { result = (int)(arg1)->GetState(); } catch(Prelude::PreludeError &_e) { rb_exc_raise(SWIG_Ruby_ExceptionType(SWIGTYPE_p_Prelude__PreludeError, SWIG_NewPointerObj((new Prelude::PreludeError(static_cast< const Prelude::PreludeError& >(_e))),SWIGTYPE_p_Prelude__PreludeError,SWIG_POINTER_OWN))); SWIG_fail; } vresult = SWIG_From_int(static_cast< int >(result)); return vresult; fail: return Qnil; } SWIGINTERN VALUE _wrap_Connection_SetData(int argc, VALUE *argv, VALUE self) { Prelude::Connection *arg1 = (Prelude::Connection *) 0 ; void *arg2 = (void *) 0 ; void *argp1 = 0 ; int res1 = 0 ; int res2 ; if ((argc < 1) || (argc > 1)) { rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; } res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Prelude__Connection, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Prelude::Connection *","SetData", 1, self )); } arg1 = reinterpret_cast< Prelude::Connection * >(argp1); res2 = SWIG_ConvertPtr(argv[0],SWIG_as_voidptrptr(&arg2), 0, 0); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "void *","SetData", 2, argv[0] )); } try { (arg1)->SetData(arg2); } catch(Prelude::PreludeError &_e) { rb_exc_raise(SWIG_Ruby_ExceptionType(SWIGTYPE_p_Prelude__PreludeError, SWIG_NewPointerObj((new Prelude::PreludeError(static_cast< const Prelude::PreludeError& >(_e))),SWIGTYPE_p_Prelude__PreludeError,SWIG_POINTER_OWN))); SWIG_fail; } return Qnil; fail: return Qnil; } SWIGINTERN VALUE _wrap_Connection_GetData(int argc, VALUE *argv, VALUE self) { Prelude::Connection *arg1 = (Prelude::Connection *) 0 ; void *argp1 = 0 ; int res1 = 0 ; void *result = 0 ; VALUE vresult = Qnil; if ((argc < 0) || (argc > 0)) { rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; } res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Prelude__Connection, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Prelude::Connection *","GetData", 1, self )); } arg1 = reinterpret_cast< Prelude::Connection * >(argp1); try { result = (void *)(arg1)->GetData(); } catch(Prelude::PreludeError &_e) { rb_exc_raise(SWIG_Ruby_ExceptionType(SWIGTYPE_p_Prelude__PreludeError, SWIG_NewPointerObj((new Prelude::PreludeError(static_cast< const Prelude::PreludeError& >(_e))),SWIGTYPE_p_Prelude__PreludeError,SWIG_POINTER_OWN))); SWIG_fail; } vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_void, 0 | 0 ); return vresult; fail: return Qnil; } SWIGINTERN VALUE _wrap_Connection_GetPermission(int argc, VALUE *argv, VALUE self) { Prelude::Connection *arg1 = (Prelude::Connection *) 0 ; void *argp1 = 0 ; int res1 = 0 ; int result; VALUE vresult = Qnil; if ((argc < 0) || (argc > 0)) { rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; } res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Prelude__Connection, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Prelude::Connection *","GetPermission", 1, self )); } arg1 = reinterpret_cast< Prelude::Connection * >(argp1); try { result = (int)(arg1)->GetPermission(); } catch(Prelude::PreludeError &_e) { rb_exc_raise(SWIG_Ruby_ExceptionType(SWIGTYPE_p_Prelude__PreludeError, SWIG_NewPointerObj((new Prelude::PreludeError(static_cast< const Prelude::PreludeError& >(_e))),SWIGTYPE_p_Prelude__PreludeError,SWIG_POINTER_OWN))); SWIG_fail; } vresult = SWIG_From_int(static_cast< int >(result)); return vresult; fail: return Qnil; } SWIGINTERN VALUE _wrap_Connection_SetPeerAnalyzerid(int argc, VALUE *argv, VALUE self) { Prelude::Connection *arg1 = (Prelude::Connection *) 0 ; uint64_t arg2 ; void *argp1 = 0 ; int res1 = 0 ; unsigned long long val2 ; int ecode2 = 0 ; if ((argc < 1) || (argc > 1)) { rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; } res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Prelude__Connection, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Prelude::Connection *","SetPeerAnalyzerid", 1, self )); } arg1 = reinterpret_cast< Prelude::Connection * >(argp1); ecode2 = SWIG_AsVal_unsigned_SS_long_SS_long(argv[0], &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "uint64_t","SetPeerAnalyzerid", 2, argv[0] )); } arg2 = static_cast< uint64_t >(val2); try { (arg1)->SetPeerAnalyzerid(arg2); } catch(Prelude::PreludeError &_e) { rb_exc_raise(SWIG_Ruby_ExceptionType(SWIGTYPE_p_Prelude__PreludeError, SWIG_NewPointerObj((new Prelude::PreludeError(static_cast< const Prelude::PreludeError& >(_e))),SWIGTYPE_p_Prelude__PreludeError,SWIG_POINTER_OWN))); SWIG_fail; } return Qnil; fail: return Qnil; } SWIGINTERN VALUE _wrap_Connection_GetPeerAnalyzerid(int argc, VALUE *argv, VALUE self) { Prelude::Connection *arg1 = (Prelude::Connection *) 0 ; void *argp1 = 0 ; int res1 = 0 ; uint64_t result; VALUE vresult = Qnil; if ((argc < 0) || (argc > 0)) { rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; } res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Prelude__Connection, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Prelude::Connection *","GetPeerAnalyzerid", 1, self )); } arg1 = reinterpret_cast< Prelude::Connection * >(argp1); try { result = (uint64_t)(arg1)->GetPeerAnalyzerid(); } catch(Prelude::PreludeError &_e) { rb_exc_raise(SWIG_Ruby_ExceptionType(SWIGTYPE_p_Prelude__PreludeError, SWIG_NewPointerObj((new Prelude::PreludeError(static_cast< const Prelude::PreludeError& >(_e))),SWIGTYPE_p_Prelude__PreludeError,SWIG_POINTER_OWN))); SWIG_fail; } vresult = SWIG_From_unsigned_SS_long_SS_long(static_cast< unsigned long long >(result)); return vresult; fail: return Qnil; } SWIGINTERN VALUE _wrap_Connection_GetLocalAddr(int argc, VALUE *argv, VALUE self) { Prelude::Connection *arg1 = (Prelude::Connection *) 0 ; void *argp1 = 0 ; int res1 = 0 ; char *result = 0 ; VALUE vresult = Qnil; if ((argc < 0) || (argc > 0)) { rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; } res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Prelude__Connection, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Prelude::Connection *","GetLocalAddr", 1, self )); } arg1 = reinterpret_cast< Prelude::Connection * >(argp1); try { result = (char *)(arg1)->GetLocalAddr(); } catch(Prelude::PreludeError &_e) { rb_exc_raise(SWIG_Ruby_ExceptionType(SWIGTYPE_p_Prelude__PreludeError, SWIG_NewPointerObj((new Prelude::PreludeError(static_cast< const Prelude::PreludeError& >(_e))),SWIGTYPE_p_Prelude__PreludeError,SWIG_POINTER_OWN))); SWIG_fail; } vresult = SWIG_FromCharPtr((const char *)result); return vresult; fail: return Qnil; } SWIGINTERN VALUE _wrap_Connection_GetLocalPort(int argc, VALUE *argv, VALUE self) { Prelude::Connection *arg1 = (Prelude::Connection *) 0 ; void *argp1 = 0 ; int res1 = 0 ; unsigned int result; VALUE vresult = Qnil; if ((argc < 0) || (argc > 0)) { rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; } res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Prelude__Connection, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Prelude::Connection *","GetLocalPort", 1, self )); } arg1 = reinterpret_cast< Prelude::Connection * >(argp1); try { result = (unsigned int)(arg1)->GetLocalPort(); } catch(Prelude::PreludeError &_e) { rb_exc_raise(SWIG_Ruby_ExceptionType(SWIGTYPE_p_Prelude__PreludeError, SWIG_NewPointerObj((new Prelude::PreludeError(static_cast< const Prelude::PreludeError& >(_e))),SWIGTYPE_p_Prelude__PreludeError,SWIG_POINTER_OWN))); SWIG_fail; } vresult = SWIG_From_unsigned_SS_int(static_cast< unsigned int >(result)); return vresult; fail: return Qnil; } SWIGINTERN VALUE _wrap_Connection_GetPeerAddr(int argc, VALUE *argv, VALUE self) { Prelude::Connection *arg1 = (Prelude::Connection *) 0 ; void *argp1 = 0 ; int res1 = 0 ; char *result = 0 ; VALUE vresult = Qnil; if ((argc < 0) || (argc > 0)) { rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; } res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Prelude__Connection, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Prelude::Connection *","GetPeerAddr", 1, self )); } arg1 = reinterpret_cast< Prelude::Connection * >(argp1); try { result = (char *)(arg1)->GetPeerAddr(); } catch(Prelude::PreludeError &_e) { rb_exc_raise(SWIG_Ruby_ExceptionType(SWIGTYPE_p_Prelude__PreludeError, SWIG_NewPointerObj((new Prelude::PreludeError(static_cast< const Prelude::PreludeError& >(_e))),SWIGTYPE_p_Prelude__PreludeError,SWIG_POINTER_OWN))); SWIG_fail; } vresult = SWIG_FromCharPtr((const char *)result); return vresult; fail: return Qnil; } SWIGINTERN VALUE _wrap_Connection_GetPeerPort(int argc, VALUE *argv, VALUE self) { Prelude::Connection *arg1 = (Prelude::Connection *) 0 ; void *argp1 = 0 ; int res1 = 0 ; unsigned int result; VALUE vresult = Qnil; if ((argc < 0) || (argc > 0)) { rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; } res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Prelude__Connection, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Prelude::Connection *","GetPeerPort", 1, self )); } arg1 = reinterpret_cast< Prelude::Connection * >(argp1); try { result = (unsigned int)(arg1)->GetPeerPort(); } catch(Prelude::PreludeError &_e) { rb_exc_raise(SWIG_Ruby_ExceptionType(SWIGTYPE_p_Prelude__PreludeError, SWIG_NewPointerObj((new Prelude::PreludeError(static_cast< const Prelude::PreludeError& >(_e))),SWIGTYPE_p_Prelude__PreludeError,SWIG_POINTER_OWN))); SWIG_fail; } vresult = SWIG_From_unsigned_SS_int(static_cast< unsigned int >(result)); return vresult; fail: return Qnil; } SWIGINTERN VALUE _wrap_Connection_IsAlive(int argc, VALUE *argv, VALUE self) { Prelude::Connection *arg1 = (Prelude::Connection *) 0 ; void *argp1 = 0 ; int res1 = 0 ; bool result; VALUE vresult = Qnil; if ((argc < 0) || (argc > 0)) { rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; } res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Prelude__Connection, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Prelude::Connection *","IsAlive", 1, self )); } arg1 = reinterpret_cast< Prelude::Connection * >(argp1); try { result = (bool)(arg1)->IsAlive(); } catch(Prelude::PreludeError &_e) { rb_exc_raise(SWIG_Ruby_ExceptionType(SWIGTYPE_p_Prelude__PreludeError, SWIG_NewPointerObj((new Prelude::PreludeError(static_cast< const Prelude::PreludeError& >(_e))),SWIGTYPE_p_Prelude__PreludeError,SWIG_POINTER_OWN))); SWIG_fail; } vresult = SWIG_From_bool(static_cast< bool >(result)); return vresult; fail: return Qnil; } SWIGINTERN VALUE _wrap_Connection_GetFd(int argc, VALUE *argv, VALUE self) { Prelude::Connection *arg1 = (Prelude::Connection *) 0 ; void *argp1 = 0 ; int res1 = 0 ; int result; VALUE vresult = Qnil; if ((argc < 0) || (argc > 0)) { rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; } res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Prelude__Connection, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Prelude::Connection *","GetFd", 1, self )); } arg1 = reinterpret_cast< Prelude::Connection * >(argp1); try { result = (int)(arg1)->GetFd(); } catch(Prelude::PreludeError &_e) { rb_exc_raise(SWIG_Ruby_ExceptionType(SWIGTYPE_p_Prelude__PreludeError, SWIG_NewPointerObj((new Prelude::PreludeError(static_cast< const Prelude::PreludeError& >(_e))),SWIGTYPE_p_Prelude__PreludeError,SWIG_POINTER_OWN))); SWIG_fail; } vresult = SWIG_From_int(static_cast< int >(result)); return vresult; fail: return Qnil; } SWIGINTERN VALUE _wrap_Connection_RecvIDMEF(int argc, VALUE *argv, VALUE self) { Prelude::Connection *arg1 = (Prelude::Connection *) 0 ; void *argp1 = 0 ; int res1 = 0 ; Prelude::IDMEF result; VALUE vresult = Qnil; if ((argc < 0) || (argc > 0)) { rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; } res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Prelude__Connection, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Prelude::Connection *","RecvIDMEF", 1, self )); } arg1 = reinterpret_cast< Prelude::Connection * >(argp1); try { result = (arg1)->RecvIDMEF(); } catch(Prelude::PreludeError &_e) { rb_exc_raise(SWIG_Ruby_ExceptionType(SWIGTYPE_p_Prelude__PreludeError, SWIG_NewPointerObj((new Prelude::PreludeError(static_cast< const Prelude::PreludeError& >(_e))),SWIGTYPE_p_Prelude__PreludeError,SWIG_POINTER_OWN))); SWIG_fail; } vresult = SWIG_NewPointerObj((new Prelude::IDMEF(static_cast< const Prelude::IDMEF& >(result))), SWIGTYPE_p_Prelude__IDMEF, SWIG_POINTER_OWN | 0 ); return vresult; fail: return Qnil; } swig_class SwigClassConnectionPool; SWIGINTERN void free_Prelude_ConnectionPool(Prelude::ConnectionPool *arg1) { delete arg1; } SWIGINTERN VALUE _wrap_new_ConnectionPool__SWIG_0(int argc, VALUE *argv, VALUE self) { Prelude::ConnectionPool *result = 0 ; if ((argc < 0) || (argc > 0)) { rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; } try { result = (Prelude::ConnectionPool *)new Prelude::ConnectionPool(); DATA_PTR(self) = result; } catch(Prelude::PreludeError &_e) { rb_exc_raise(SWIG_Ruby_ExceptionType(SWIGTYPE_p_Prelude__PreludeError, SWIG_NewPointerObj((new Prelude::PreludeError(static_cast< const Prelude::PreludeError& >(_e))),SWIGTYPE_p_Prelude__PreludeError,SWIG_POINTER_OWN))); SWIG_fail; } return self; fail: return Qnil; } SWIGINTERN VALUE _wrap_new_ConnectionPool__SWIG_1(int argc, VALUE *argv, VALUE self) { prelude_connection_pool_t *arg1 = (prelude_connection_pool_t *) 0 ; void *argp1 = 0 ; int res1 = 0 ; Prelude::ConnectionPool *result = 0 ; if ((argc < 1) || (argc > 1)) { rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; } res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_prelude_connection_pool_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "prelude_connection_pool_t *","Prelude::ConnectionPool", 1, argv[0] )); } arg1 = reinterpret_cast< prelude_connection_pool_t * >(argp1); try { result = (Prelude::ConnectionPool *)new Prelude::ConnectionPool(arg1); DATA_PTR(self) = result; } catch(Prelude::PreludeError &_e) { rb_exc_raise(SWIG_Ruby_ExceptionType(SWIGTYPE_p_Prelude__PreludeError, SWIG_NewPointerObj((new Prelude::PreludeError(static_cast< const Prelude::PreludeError& >(_e))),SWIGTYPE_p_Prelude__PreludeError,SWIG_POINTER_OWN))); SWIG_fail; } return self; fail: return Qnil; } SWIGINTERN VALUE _wrap_new_ConnectionPool__SWIG_2(int argc, VALUE *argv, VALUE self) { Prelude::ConnectionPool *arg1 = 0 ; void *argp1 ; int res1 = 0 ; Prelude::ConnectionPool *result = 0 ; if ((argc < 1) || (argc > 1)) { rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; } res1 = SWIG_ConvertPtr(argv[0], &argp1, SWIGTYPE_p_Prelude__ConnectionPool, 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Prelude::ConnectionPool const &","Prelude::ConnectionPool", 1, argv[0] )); } if (!argp1) { SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "Prelude::ConnectionPool const &","Prelude::ConnectionPool", 1, argv[0])); } arg1 = reinterpret_cast< Prelude::ConnectionPool * >(argp1); try { result = (Prelude::ConnectionPool *)new Prelude::ConnectionPool((Prelude::ConnectionPool const &)*arg1); DATA_PTR(self) = result; } catch(Prelude::PreludeError &_e) { rb_exc_raise(SWIG_Ruby_ExceptionType(SWIGTYPE_p_Prelude__PreludeError, SWIG_NewPointerObj((new Prelude::PreludeError(static_cast< const Prelude::PreludeError& >(_e))),SWIGTYPE_p_Prelude__PreludeError,SWIG_POINTER_OWN))); SWIG_fail; } return self; fail: return Qnil; } #ifdef HAVE_RB_DEFINE_ALLOC_FUNC SWIGINTERN VALUE _wrap_ConnectionPool_allocate(VALUE self) { #else SWIGINTERN VALUE _wrap_ConnectionPool_allocate(int argc, VALUE *argv, VALUE self) { #endif VALUE vresult = SWIG_NewClassInstance(self, SWIGTYPE_p_Prelude__ConnectionPool); #ifndef HAVE_RB_DEFINE_ALLOC_FUNC rb_obj_call_init(vresult, argc, argv); #endif return vresult; } SWIGINTERN VALUE _wrap_new_ConnectionPool__SWIG_3(int argc, VALUE *argv, VALUE self) { Prelude::ClientProfile *arg1 = 0 ; int arg2 ; void *argp1 = 0 ; int res1 = 0 ; int val2 ; int ecode2 = 0 ; Prelude::ConnectionPool *result = 0 ; if ((argc < 2) || (argc > 2)) { rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail; } res1 = SWIG_ConvertPtr(argv[0], &argp1, SWIGTYPE_p_Prelude__ClientProfile, 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Prelude::ClientProfile &","Prelude::ConnectionPool", 1, argv[0] )); } if (!argp1) { SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "Prelude::ClientProfile &","Prelude::ConnectionPool", 1, argv[0])); } arg1 = reinterpret_cast< Prelude::ClientProfile * >(argp1); ecode2 = SWIG_AsVal_int(argv[1], &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "int","Prelude::ConnectionPool", 2, argv[1] )); } arg2 = static_cast< int >(val2); try { result = (Prelude::ConnectionPool *)new Prelude::ConnectionPool(*arg1,arg2); DATA_PTR(self) = result; } catch(Prelude::PreludeError &_e) { rb_exc_raise(SWIG_Ruby_ExceptionType(SWIGTYPE_p_Prelude__PreludeError, SWIG_NewPointerObj((new Prelude::PreludeError(static_cast< const Prelude::PreludeError& >(_e))),SWIGTYPE_p_Prelude__PreludeError,SWIG_POINTER_OWN))); SWIG_fail; } return self; fail: return Qnil; } SWIGINTERN VALUE _wrap_new_ConnectionPool(int nargs, VALUE *args, VALUE self) { int argc; VALUE argv[2]; int ii; argc = nargs; if (argc > 2) SWIG_fail; for (ii = 0; (ii < argc); ++ii) { argv[ii] = args[ii]; } if (argc == 0) { return _wrap_new_ConnectionPool__SWIG_0(nargs, args, self); } if (argc == 1) { int _v; void *vptr = 0; int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_prelude_connection_pool_t, 0); _v = SWIG_CheckState(res); if (_v) { return _wrap_new_ConnectionPool__SWIG_1(nargs, args, self); } } if (argc == 1) { int _v; void *vptr = 0; int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_Prelude__ConnectionPool, 0); _v = SWIG_CheckState(res); if (_v) { return _wrap_new_ConnectionPool__SWIG_2(nargs, args, self); } } if (argc == 2) { int _v; void *vptr = 0; int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_Prelude__ClientProfile, 0); _v = SWIG_CheckState(res); if (_v) { { int res = SWIG_AsVal_int(argv[1], NULL); _v = SWIG_CheckState(res); } if (_v) { return _wrap_new_ConnectionPool__SWIG_3(nargs, args, self); } } } fail: Ruby_Format_OverloadedError( argc, 2, "ConnectionPool.new", " ConnectionPool.new()\n" " ConnectionPool.new(prelude_connection_pool_t *pool)\n" " ConnectionPool.new(Prelude::ConnectionPool const &pool)\n" " ConnectionPool.new(Prelude::ClientProfile &cp, int permission)\n"); return Qnil; } SWIGINTERN VALUE _wrap_ConnectionPool_Init(int argc, VALUE *argv, VALUE self) { Prelude::ConnectionPool *arg1 = (Prelude::ConnectionPool *) 0 ; void *argp1 = 0 ; int res1 = 0 ; if ((argc < 0) || (argc > 0)) { rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; } res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Prelude__ConnectionPool, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Prelude::ConnectionPool *","Init", 1, self )); } arg1 = reinterpret_cast< Prelude::ConnectionPool * >(argp1); try { (arg1)->Init(); } catch(Prelude::PreludeError &_e) { rb_exc_raise(SWIG_Ruby_ExceptionType(SWIGTYPE_p_Prelude__PreludeError, SWIG_NewPointerObj((new Prelude::PreludeError(static_cast< const Prelude::PreludeError& >(_e))),SWIGTYPE_p_Prelude__PreludeError,SWIG_POINTER_OWN))); SWIG_fail; } return Qnil; fail: return Qnil; } SWIGINTERN VALUE _wrap_ConnectionPool_SetConnectionString(int argc, VALUE *argv, VALUE self) { Prelude::ConnectionPool *arg1 = (Prelude::ConnectionPool *) 0 ; char *arg2 = (char *) 0 ; void *argp1 = 0 ; int res1 = 0 ; int res2 ; char *buf2 = 0 ; int alloc2 = 0 ; if ((argc < 1) || (argc > 1)) { rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; } res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Prelude__ConnectionPool, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Prelude::ConnectionPool *","SetConnectionString", 1, self )); } arg1 = reinterpret_cast< Prelude::ConnectionPool * >(argp1); res2 = SWIG_AsCharPtrAndSize(argv[0], &buf2, NULL, &alloc2); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "char const *","SetConnectionString", 2, argv[0] )); } arg2 = reinterpret_cast< char * >(buf2); try { (arg1)->SetConnectionString((char const *)arg2); } catch(Prelude::PreludeError &_e) { rb_exc_raise(SWIG_Ruby_ExceptionType(SWIGTYPE_p_Prelude__PreludeError, SWIG_NewPointerObj((new Prelude::PreludeError(static_cast< const Prelude::PreludeError& >(_e))),SWIGTYPE_p_Prelude__PreludeError,SWIG_POINTER_OWN))); SWIG_fail; } if (alloc2 == SWIG_NEWOBJ) delete[] buf2; return Qnil; fail: if (alloc2 == SWIG_NEWOBJ) delete[] buf2; return Qnil; } SWIGINTERN VALUE _wrap_ConnectionPool_GetConnectionString(int argc, VALUE *argv, VALUE self) { Prelude::ConnectionPool *arg1 = (Prelude::ConnectionPool *) 0 ; void *argp1 = 0 ; int res1 = 0 ; char *result = 0 ; VALUE vresult = Qnil; if ((argc < 0) || (argc > 0)) { rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; } res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Prelude__ConnectionPool, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Prelude::ConnectionPool *","GetConnectionString", 1, self )); } arg1 = reinterpret_cast< Prelude::ConnectionPool * >(argp1); try { result = (char *)(arg1)->GetConnectionString(); } catch(Prelude::PreludeError &_e) { rb_exc_raise(SWIG_Ruby_ExceptionType(SWIGTYPE_p_Prelude__PreludeError, SWIG_NewPointerObj((new Prelude::PreludeError(static_cast< const Prelude::PreludeError& >(_e))),SWIGTYPE_p_Prelude__PreludeError,SWIG_POINTER_OWN))); SWIG_fail; } vresult = SWIG_FromCharPtr((const char *)result); return vresult; fail: return Qnil; } SWIGINTERN VALUE _wrap_ConnectionPool_GetConnectionList(int argc, VALUE *argv, VALUE self) { Prelude::ConnectionPool *arg1 = (Prelude::ConnectionPool *) 0 ; void *argp1 = 0 ; int res1 = 0 ; std::vector< Prelude::Connection,std::allocator< Prelude::Connection > > result; VALUE vresult = Qnil; if ((argc < 0) || (argc > 0)) { rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; } res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Prelude__ConnectionPool, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Prelude::ConnectionPool *","GetConnectionList", 1, self )); } arg1 = reinterpret_cast< Prelude::ConnectionPool * >(argp1); try { result = (arg1)->GetConnectionList(); } catch(Prelude::PreludeError &_e) { rb_exc_raise(SWIG_Ruby_ExceptionType(SWIGTYPE_p_Prelude__PreludeError, SWIG_NewPointerObj((new Prelude::PreludeError(static_cast< const Prelude::PreludeError& >(_e))),SWIGTYPE_p_Prelude__PreludeError,SWIG_POINTER_OWN))); SWIG_fail; } vresult = swig::from(static_cast< std::vector > >(result)); return vresult; fail: return Qnil; } SWIGINTERN VALUE _wrap_ConnectionPool_SetFlags(int argc, VALUE *argv, VALUE self) { Prelude::ConnectionPool *arg1 = (Prelude::ConnectionPool *) 0 ; int arg2 ; void *argp1 = 0 ; int res1 = 0 ; int val2 ; int ecode2 = 0 ; if ((argc < 1) || (argc > 1)) { rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; } res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Prelude__ConnectionPool, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Prelude::ConnectionPool *","SetFlags", 1, self )); } arg1 = reinterpret_cast< Prelude::ConnectionPool * >(argp1); ecode2 = SWIG_AsVal_int(argv[0], &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "int","SetFlags", 2, argv[0] )); } arg2 = static_cast< int >(val2); try { (arg1)->SetFlags(arg2); } catch(Prelude::PreludeError &_e) { rb_exc_raise(SWIG_Ruby_ExceptionType(SWIGTYPE_p_Prelude__PreludeError, SWIG_NewPointerObj((new Prelude::PreludeError(static_cast< const Prelude::PreludeError& >(_e))),SWIGTYPE_p_Prelude__PreludeError,SWIG_POINTER_OWN))); SWIG_fail; } return Qnil; fail: return Qnil; } SWIGINTERN VALUE _wrap_ConnectionPool_GetFlags(int argc, VALUE *argv, VALUE self) { Prelude::ConnectionPool *arg1 = (Prelude::ConnectionPool *) 0 ; void *argp1 = 0 ; int res1 = 0 ; int result; VALUE vresult = Qnil; if ((argc < 0) || (argc > 0)) { rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; } res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Prelude__ConnectionPool, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Prelude::ConnectionPool *","GetFlags", 1, self )); } arg1 = reinterpret_cast< Prelude::ConnectionPool * >(argp1); try { result = (int)(arg1)->GetFlags(); } catch(Prelude::PreludeError &_e) { rb_exc_raise(SWIG_Ruby_ExceptionType(SWIGTYPE_p_Prelude__PreludeError, SWIG_NewPointerObj((new Prelude::PreludeError(static_cast< const Prelude::PreludeError& >(_e))),SWIGTYPE_p_Prelude__PreludeError,SWIG_POINTER_OWN))); SWIG_fail; } vresult = SWIG_From_int(static_cast< int >(result)); return vresult; fail: return Qnil; } SWIGINTERN VALUE _wrap_ConnectionPool_SetData(int argc, VALUE *argv, VALUE self) { Prelude::ConnectionPool *arg1 = (Prelude::ConnectionPool *) 0 ; void *arg2 = (void *) 0 ; void *argp1 = 0 ; int res1 = 0 ; int res2 ; if ((argc < 1) || (argc > 1)) { rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; } res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Prelude__ConnectionPool, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Prelude::ConnectionPool *","SetData", 1, self )); } arg1 = reinterpret_cast< Prelude::ConnectionPool * >(argp1); res2 = SWIG_ConvertPtr(argv[0],SWIG_as_voidptrptr(&arg2), 0, 0); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "void *","SetData", 2, argv[0] )); } try { (arg1)->SetData(arg2); } catch(Prelude::PreludeError &_e) { rb_exc_raise(SWIG_Ruby_ExceptionType(SWIGTYPE_p_Prelude__PreludeError, SWIG_NewPointerObj((new Prelude::PreludeError(static_cast< const Prelude::PreludeError& >(_e))),SWIGTYPE_p_Prelude__PreludeError,SWIG_POINTER_OWN))); SWIG_fail; } return Qnil; fail: return Qnil; } SWIGINTERN VALUE _wrap_ConnectionPool_GetData(int argc, VALUE *argv, VALUE self) { Prelude::ConnectionPool *arg1 = (Prelude::ConnectionPool *) 0 ; void *argp1 = 0 ; int res1 = 0 ; void *result = 0 ; VALUE vresult = Qnil; if ((argc < 0) || (argc > 0)) { rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; } res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Prelude__ConnectionPool, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Prelude::ConnectionPool *","GetData", 1, self )); } arg1 = reinterpret_cast< Prelude::ConnectionPool * >(argp1); try { result = (void *)(arg1)->GetData(); } catch(Prelude::PreludeError &_e) { rb_exc_raise(SWIG_Ruby_ExceptionType(SWIGTYPE_p_Prelude__PreludeError, SWIG_NewPointerObj((new Prelude::PreludeError(static_cast< const Prelude::PreludeError& >(_e))),SWIGTYPE_p_Prelude__PreludeError,SWIG_POINTER_OWN))); SWIG_fail; } vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_void, 0 | 0 ); return vresult; fail: return Qnil; } SWIGINTERN VALUE _wrap_ConnectionPool_AddConnection(int argc, VALUE *argv, VALUE self) { Prelude::ConnectionPool *arg1 = (Prelude::ConnectionPool *) 0 ; Prelude::Connection arg2 ; void *argp1 = 0 ; int res1 = 0 ; void *argp2 ; int res2 = 0 ; if ((argc < 1) || (argc > 1)) { rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; } res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Prelude__ConnectionPool, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Prelude::ConnectionPool *","AddConnection", 1, self )); } arg1 = reinterpret_cast< Prelude::ConnectionPool * >(argp1); { res2 = SWIG_ConvertPtr(argv[0], &argp2, SWIGTYPE_p_Prelude__Connection, 0 ); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "Prelude::Connection","AddConnection", 2, argv[0] )); } if (!argp2) { SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "Prelude::Connection","AddConnection", 2, argv[0])); } else { arg2 = *(reinterpret_cast< Prelude::Connection * >(argp2)); } } try { (arg1)->AddConnection(arg2); } catch(Prelude::PreludeError &_e) { rb_exc_raise(SWIG_Ruby_ExceptionType(SWIGTYPE_p_Prelude__PreludeError, SWIG_NewPointerObj((new Prelude::PreludeError(static_cast< const Prelude::PreludeError& >(_e))),SWIGTYPE_p_Prelude__PreludeError,SWIG_POINTER_OWN))); SWIG_fail; } return Qnil; fail: return Qnil; } SWIGINTERN VALUE _wrap_ConnectionPool_DelConnection(int argc, VALUE *argv, VALUE self) { Prelude::ConnectionPool *arg1 = (Prelude::ConnectionPool *) 0 ; Prelude::Connection arg2 ; void *argp1 = 0 ; int res1 = 0 ; void *argp2 ; int res2 = 0 ; if ((argc < 1) || (argc > 1)) { rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; } res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Prelude__ConnectionPool, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Prelude::ConnectionPool *","DelConnection", 1, self )); } arg1 = reinterpret_cast< Prelude::ConnectionPool * >(argp1); { res2 = SWIG_ConvertPtr(argv[0], &argp2, SWIGTYPE_p_Prelude__Connection, 0 ); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "Prelude::Connection","DelConnection", 2, argv[0] )); } if (!argp2) { SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "Prelude::Connection","DelConnection", 2, argv[0])); } else { arg2 = *(reinterpret_cast< Prelude::Connection * >(argp2)); } } try { (arg1)->DelConnection(arg2); } catch(Prelude::PreludeError &_e) { rb_exc_raise(SWIG_Ruby_ExceptionType(SWIGTYPE_p_Prelude__PreludeError, SWIG_NewPointerObj((new Prelude::PreludeError(static_cast< const Prelude::PreludeError& >(_e))),SWIGTYPE_p_Prelude__PreludeError,SWIG_POINTER_OWN))); SWIG_fail; } return Qnil; fail: return Qnil; } SWIGINTERN VALUE _wrap_ConnectionPool_SetConnectionAlive(int argc, VALUE *argv, VALUE self) { Prelude::ConnectionPool *arg1 = (Prelude::ConnectionPool *) 0 ; Prelude::Connection *arg2 = 0 ; void *argp1 = 0 ; int res1 = 0 ; void *argp2 = 0 ; int res2 = 0 ; if ((argc < 1) || (argc > 1)) { rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; } res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Prelude__ConnectionPool, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Prelude::ConnectionPool *","SetConnectionAlive", 1, self )); } arg1 = reinterpret_cast< Prelude::ConnectionPool * >(argp1); res2 = SWIG_ConvertPtr(argv[0], &argp2, SWIGTYPE_p_Prelude__Connection, 0 ); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "Prelude::Connection &","SetConnectionAlive", 2, argv[0] )); } if (!argp2) { SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "Prelude::Connection &","SetConnectionAlive", 2, argv[0])); } arg2 = reinterpret_cast< Prelude::Connection * >(argp2); try { (arg1)->SetConnectionAlive(*arg2); } catch(Prelude::PreludeError &_e) { rb_exc_raise(SWIG_Ruby_ExceptionType(SWIGTYPE_p_Prelude__PreludeError, SWIG_NewPointerObj((new Prelude::PreludeError(static_cast< const Prelude::PreludeError& >(_e))),SWIGTYPE_p_Prelude__PreludeError,SWIG_POINTER_OWN))); SWIG_fail; } return Qnil; fail: return Qnil; } SWIGINTERN VALUE _wrap_ConnectionPool_SetConnectionDead(int argc, VALUE *argv, VALUE self) { Prelude::ConnectionPool *arg1 = (Prelude::ConnectionPool *) 0 ; Prelude::Connection *arg2 = 0 ; void *argp1 = 0 ; int res1 = 0 ; void *argp2 = 0 ; int res2 = 0 ; if ((argc < 1) || (argc > 1)) { rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; } res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Prelude__ConnectionPool, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Prelude::ConnectionPool *","SetConnectionDead", 1, self )); } arg1 = reinterpret_cast< Prelude::ConnectionPool * >(argp1); res2 = SWIG_ConvertPtr(argv[0], &argp2, SWIGTYPE_p_Prelude__Connection, 0 ); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "Prelude::Connection &","SetConnectionDead", 2, argv[0] )); } if (!argp2) { SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "Prelude::Connection &","SetConnectionDead", 2, argv[0])); } arg2 = reinterpret_cast< Prelude::Connection * >(argp2); try { (arg1)->SetConnectionDead(*arg2); } catch(Prelude::PreludeError &_e) { rb_exc_raise(SWIG_Ruby_ExceptionType(SWIGTYPE_p_Prelude__PreludeError, SWIG_NewPointerObj((new Prelude::PreludeError(static_cast< const Prelude::PreludeError& >(_e))),SWIGTYPE_p_Prelude__PreludeError,SWIG_POINTER_OWN))); SWIG_fail; } return Qnil; fail: return Qnil; } SWIGINTERN VALUE _wrap_ConnectionPool_SetRequiredPermission(int argc, VALUE *argv, VALUE self) { Prelude::ConnectionPool *arg1 = (Prelude::ConnectionPool *) 0 ; int arg2 ; void *argp1 = 0 ; int res1 = 0 ; int val2 ; int ecode2 = 0 ; if ((argc < 1) || (argc > 1)) { rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; } res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Prelude__ConnectionPool, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Prelude::ConnectionPool *","SetRequiredPermission", 1, self )); } arg1 = reinterpret_cast< Prelude::ConnectionPool * >(argp1); ecode2 = SWIG_AsVal_int(argv[0], &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "int","SetRequiredPermission", 2, argv[0] )); } arg2 = static_cast< int >(val2); try { (arg1)->SetRequiredPermission(arg2); } catch(Prelude::PreludeError &_e) { rb_exc_raise(SWIG_Ruby_ExceptionType(SWIGTYPE_p_Prelude__PreludeError, SWIG_NewPointerObj((new Prelude::PreludeError(static_cast< const Prelude::PreludeError& >(_e))),SWIGTYPE_p_Prelude__PreludeError,SWIG_POINTER_OWN))); SWIG_fail; } return Qnil; fail: return Qnil; } swig_class SwigClassClientProfile; SWIGINTERN VALUE _wrap_new_ClientProfile__SWIG_0(int argc, VALUE *argv, VALUE self) { Prelude::ClientProfile *result = 0 ; if ((argc < 0) || (argc > 0)) { rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; } try { result = (Prelude::ClientProfile *)new Prelude::ClientProfile(); DATA_PTR(self) = result; } catch(Prelude::PreludeError &_e) { rb_exc_raise(SWIG_Ruby_ExceptionType(SWIGTYPE_p_Prelude__PreludeError, SWIG_NewPointerObj((new Prelude::PreludeError(static_cast< const Prelude::PreludeError& >(_e))),SWIGTYPE_p_Prelude__PreludeError,SWIG_POINTER_OWN))); SWIG_fail; } return self; fail: return Qnil; } SWIGINTERN VALUE _wrap_new_ClientProfile__SWIG_1(int argc, VALUE *argv, VALUE self) { char *arg1 = (char *) 0 ; int res1 ; char *buf1 = 0 ; int alloc1 = 0 ; Prelude::ClientProfile *result = 0 ; if ((argc < 1) || (argc > 1)) { rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; } res1 = SWIG_AsCharPtrAndSize(argv[0], &buf1, NULL, &alloc1); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "char const *","Prelude::ClientProfile", 1, argv[0] )); } arg1 = reinterpret_cast< char * >(buf1); try { result = (Prelude::ClientProfile *)new Prelude::ClientProfile((char const *)arg1); DATA_PTR(self) = result; } catch(Prelude::PreludeError &_e) { rb_exc_raise(SWIG_Ruby_ExceptionType(SWIGTYPE_p_Prelude__PreludeError, SWIG_NewPointerObj((new Prelude::PreludeError(static_cast< const Prelude::PreludeError& >(_e))),SWIGTYPE_p_Prelude__PreludeError,SWIG_POINTER_OWN))); SWIG_fail; } if (alloc1 == SWIG_NEWOBJ) delete[] buf1; return self; fail: if (alloc1 == SWIG_NEWOBJ) delete[] buf1; return Qnil; } SWIGINTERN VALUE _wrap_new_ClientProfile__SWIG_2(int argc, VALUE *argv, VALUE self) { prelude_client_profile_t *arg1 = (prelude_client_profile_t *) 0 ; void *argp1 = 0 ; int res1 = 0 ; Prelude::ClientProfile *result = 0 ; if ((argc < 1) || (argc > 1)) { rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; } res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_prelude_client_profile_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "prelude_client_profile_t *","Prelude::ClientProfile", 1, argv[0] )); } arg1 = reinterpret_cast< prelude_client_profile_t * >(argp1); try { result = (Prelude::ClientProfile *)new Prelude::ClientProfile(arg1); DATA_PTR(self) = result; } catch(Prelude::PreludeError &_e) { rb_exc_raise(SWIG_Ruby_ExceptionType(SWIGTYPE_p_Prelude__PreludeError, SWIG_NewPointerObj((new Prelude::PreludeError(static_cast< const Prelude::PreludeError& >(_e))),SWIGTYPE_p_Prelude__PreludeError,SWIG_POINTER_OWN))); SWIG_fail; } return self; fail: return Qnil; } #ifdef HAVE_RB_DEFINE_ALLOC_FUNC SWIGINTERN VALUE _wrap_ClientProfile_allocate(VALUE self) { #else SWIGINTERN VALUE _wrap_ClientProfile_allocate(int argc, VALUE *argv, VALUE self) { #endif VALUE vresult = SWIG_NewClassInstance(self, SWIGTYPE_p_Prelude__ClientProfile); #ifndef HAVE_RB_DEFINE_ALLOC_FUNC rb_obj_call_init(vresult, argc, argv); #endif return vresult; } SWIGINTERN VALUE _wrap_new_ClientProfile__SWIG_3(int argc, VALUE *argv, VALUE self) { Prelude::ClientProfile *arg1 = 0 ; void *argp1 ; int res1 = 0 ; Prelude::ClientProfile *result = 0 ; if ((argc < 1) || (argc > 1)) { rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; } res1 = SWIG_ConvertPtr(argv[0], &argp1, SWIGTYPE_p_Prelude__ClientProfile, 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Prelude::ClientProfile const &","Prelude::ClientProfile", 1, argv[0] )); } if (!argp1) { SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "Prelude::ClientProfile const &","Prelude::ClientProfile", 1, argv[0])); } arg1 = reinterpret_cast< Prelude::ClientProfile * >(argp1); try { result = (Prelude::ClientProfile *)new Prelude::ClientProfile((Prelude::ClientProfile const &)*arg1); DATA_PTR(self) = result; } catch(Prelude::PreludeError &_e) { rb_exc_raise(SWIG_Ruby_ExceptionType(SWIGTYPE_p_Prelude__PreludeError, SWIG_NewPointerObj((new Prelude::PreludeError(static_cast< const Prelude::PreludeError& >(_e))),SWIGTYPE_p_Prelude__PreludeError,SWIG_POINTER_OWN))); SWIG_fail; } return self; fail: return Qnil; } SWIGINTERN VALUE _wrap_new_ClientProfile(int nargs, VALUE *args, VALUE self) { int argc; VALUE argv[1]; int ii; argc = nargs; if (argc > 1) SWIG_fail; for (ii = 0; (ii < argc); ++ii) { argv[ii] = args[ii]; } if (argc == 0) { return _wrap_new_ClientProfile__SWIG_0(nargs, args, self); } if (argc == 1) { int _v; void *vptr = 0; int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_prelude_client_profile_t, 0); _v = SWIG_CheckState(res); if (_v) { return _wrap_new_ClientProfile__SWIG_2(nargs, args, self); } } if (argc == 1) { int _v; void *vptr = 0; int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_Prelude__ClientProfile, 0); _v = SWIG_CheckState(res); if (_v) { return _wrap_new_ClientProfile__SWIG_3(nargs, args, self); } } if (argc == 1) { int _v; int res = SWIG_AsCharPtrAndSize(argv[0], 0, NULL, 0); _v = SWIG_CheckState(res); if (_v) { return _wrap_new_ClientProfile__SWIG_1(nargs, args, self); } } fail: Ruby_Format_OverloadedError( argc, 1, "ClientProfile.new", " ClientProfile.new()\n" " ClientProfile.new(char const *profile)\n" " ClientProfile.new(prelude_client_profile_t *profile)\n" " ClientProfile.new(Prelude::ClientProfile const &p)\n"); return Qnil; } SWIGINTERN void free_Prelude_ClientProfile(Prelude::ClientProfile *arg1) { delete arg1; } SWIGINTERN VALUE _wrap_ClientProfile_GetUid(int argc, VALUE *argv, VALUE self) { Prelude::ClientProfile *arg1 = (Prelude::ClientProfile *) 0 ; void *argp1 = 0 ; int res1 = 0 ; int result; VALUE vresult = Qnil; if ((argc < 0) || (argc > 0)) { rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; } res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Prelude__ClientProfile, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Prelude::ClientProfile *","GetUid", 1, self )); } arg1 = reinterpret_cast< Prelude::ClientProfile * >(argp1); try { result = (int)(arg1)->GetUid(); } catch(Prelude::PreludeError &_e) { rb_exc_raise(SWIG_Ruby_ExceptionType(SWIGTYPE_p_Prelude__PreludeError, SWIG_NewPointerObj((new Prelude::PreludeError(static_cast< const Prelude::PreludeError& >(_e))),SWIGTYPE_p_Prelude__PreludeError,SWIG_POINTER_OWN))); SWIG_fail; } vresult = SWIG_From_int(static_cast< int >(result)); return vresult; fail: return Qnil; } SWIGINTERN VALUE _wrap_ClientProfile_GetGid(int argc, VALUE *argv, VALUE self) { Prelude::ClientProfile *arg1 = (Prelude::ClientProfile *) 0 ; void *argp1 = 0 ; int res1 = 0 ; int result; VALUE vresult = Qnil; if ((argc < 0) || (argc > 0)) { rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; } res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Prelude__ClientProfile, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Prelude::ClientProfile *","GetGid", 1, self )); } arg1 = reinterpret_cast< Prelude::ClientProfile * >(argp1); try { result = (int)(arg1)->GetGid(); } catch(Prelude::PreludeError &_e) { rb_exc_raise(SWIG_Ruby_ExceptionType(SWIGTYPE_p_Prelude__PreludeError, SWIG_NewPointerObj((new Prelude::PreludeError(static_cast< const Prelude::PreludeError& >(_e))),SWIGTYPE_p_Prelude__PreludeError,SWIG_POINTER_OWN))); SWIG_fail; } vresult = SWIG_From_int(static_cast< int >(result)); return vresult; fail: return Qnil; } SWIGINTERN VALUE _wrap_ClientProfile_GetName(int argc, VALUE *argv, VALUE self) { Prelude::ClientProfile *arg1 = (Prelude::ClientProfile *) 0 ; void *argp1 = 0 ; int res1 = 0 ; char *result = 0 ; VALUE vresult = Qnil; if ((argc < 0) || (argc > 0)) { rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; } res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Prelude__ClientProfile, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Prelude::ClientProfile *","GetName", 1, self )); } arg1 = reinterpret_cast< Prelude::ClientProfile * >(argp1); try { result = (char *)(arg1)->GetName(); } catch(Prelude::PreludeError &_e) { rb_exc_raise(SWIG_Ruby_ExceptionType(SWIGTYPE_p_Prelude__PreludeError, SWIG_NewPointerObj((new Prelude::PreludeError(static_cast< const Prelude::PreludeError& >(_e))),SWIGTYPE_p_Prelude__PreludeError,SWIG_POINTER_OWN))); SWIG_fail; } vresult = SWIG_FromCharPtr((const char *)result); return vresult; fail: return Qnil; } SWIGINTERN VALUE _wrap_ClientProfile_SetName(int argc, VALUE *argv, VALUE self) { Prelude::ClientProfile *arg1 = (Prelude::ClientProfile *) 0 ; char *arg2 = (char *) 0 ; void *argp1 = 0 ; int res1 = 0 ; int res2 ; char *buf2 = 0 ; int alloc2 = 0 ; int result; VALUE vresult = Qnil; if ((argc < 1) || (argc > 1)) { rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; } res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Prelude__ClientProfile, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Prelude::ClientProfile *","SetName", 1, self )); } arg1 = reinterpret_cast< Prelude::ClientProfile * >(argp1); res2 = SWIG_AsCharPtrAndSize(argv[0], &buf2, NULL, &alloc2); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "char const *","SetName", 2, argv[0] )); } arg2 = reinterpret_cast< char * >(buf2); try { result = (int)(arg1)->SetName((char const *)arg2); } catch(Prelude::PreludeError &_e) { rb_exc_raise(SWIG_Ruby_ExceptionType(SWIGTYPE_p_Prelude__PreludeError, SWIG_NewPointerObj((new Prelude::PreludeError(static_cast< const Prelude::PreludeError& >(_e))),SWIGTYPE_p_Prelude__PreludeError,SWIG_POINTER_OWN))); SWIG_fail; } vresult = SWIG_From_int(static_cast< int >(result)); if (alloc2 == SWIG_NEWOBJ) delete[] buf2; return vresult; fail: if (alloc2 == SWIG_NEWOBJ) delete[] buf2; return Qnil; } SWIGINTERN VALUE _wrap_ClientProfile_GetAnalyzerId__SWIG_0(int argc, VALUE *argv, VALUE self) { Prelude::ClientProfile *arg1 = (Prelude::ClientProfile *) 0 ; void *argp1 = 0 ; int res1 = 0 ; uint64_t result; VALUE vresult = Qnil; if ((argc < 0) || (argc > 0)) { rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; } res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Prelude__ClientProfile, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Prelude::ClientProfile *","GetAnalyzerId", 1, self )); } arg1 = reinterpret_cast< Prelude::ClientProfile * >(argp1); try { result = (uint64_t)(arg1)->GetAnalyzerId(); } catch(Prelude::PreludeError &_e) { rb_exc_raise(SWIG_Ruby_ExceptionType(SWIGTYPE_p_Prelude__PreludeError, SWIG_NewPointerObj((new Prelude::PreludeError(static_cast< const Prelude::PreludeError& >(_e))),SWIGTYPE_p_Prelude__PreludeError,SWIG_POINTER_OWN))); SWIG_fail; } vresult = SWIG_From_unsigned_SS_long_SS_long(static_cast< unsigned long long >(result)); return vresult; fail: return Qnil; } SWIGINTERN VALUE _wrap_ClientProfile_GetAnalyzerId__SWIG_1(int argc, VALUE *argv, VALUE self) { Prelude::ClientProfile *arg1 = (Prelude::ClientProfile *) 0 ; uint64_t arg2 ; void *argp1 = 0 ; int res1 = 0 ; unsigned long long val2 ; int ecode2 = 0 ; if ((argc < 1) || (argc > 1)) { rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; } res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Prelude__ClientProfile, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Prelude::ClientProfile *","GetAnalyzerId", 1, self )); } arg1 = reinterpret_cast< Prelude::ClientProfile * >(argp1); ecode2 = SWIG_AsVal_unsigned_SS_long_SS_long(argv[0], &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "uint64_t","GetAnalyzerId", 2, argv[0] )); } arg2 = static_cast< uint64_t >(val2); try { (arg1)->GetAnalyzerId(arg2); } catch(Prelude::PreludeError &_e) { rb_exc_raise(SWIG_Ruby_ExceptionType(SWIGTYPE_p_Prelude__PreludeError, SWIG_NewPointerObj((new Prelude::PreludeError(static_cast< const Prelude::PreludeError& >(_e))),SWIGTYPE_p_Prelude__PreludeError,SWIG_POINTER_OWN))); SWIG_fail; } return Qnil; fail: return Qnil; } SWIGINTERN VALUE _wrap_ClientProfile_GetAnalyzerId(int nargs, VALUE *args, VALUE self) { int argc; VALUE argv[3]; int ii; argc = nargs + 1; argv[0] = self; if (argc > 3) SWIG_fail; for (ii = 1; (ii < argc); ++ii) { argv[ii] = args[ii-1]; } if (argc == 1) { int _v; void *vptr = 0; int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_Prelude__ClientProfile, 0); _v = SWIG_CheckState(res); if (_v) { return _wrap_ClientProfile_GetAnalyzerId__SWIG_0(nargs, args, self); } } if (argc == 2) { int _v; void *vptr = 0; int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_Prelude__ClientProfile, 0); _v = SWIG_CheckState(res); if (_v) { { int res = SWIG_AsVal_unsigned_SS_long_SS_long(argv[1], NULL); _v = SWIG_CheckState(res); } if (_v) { return _wrap_ClientProfile_GetAnalyzerId__SWIG_1(nargs, args, self); } } } fail: Ruby_Format_OverloadedError( argc, 3, "ClientProfile.GetAnalyzerId", " void ClientProfile.GetAnalyzerId()\n" " void ClientProfile.GetAnalyzerId(uint64_t id)\n"); return Qnil; } SWIGINTERN VALUE _wrap_ClientProfile_GetConfigFilename(int argc, VALUE *argv, VALUE self) { Prelude::ClientProfile *arg1 = (Prelude::ClientProfile *) 0 ; void *argp1 = 0 ; int res1 = 0 ; std::string result; VALUE vresult = Qnil; if ((argc < 0) || (argc > 0)) { rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; } res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Prelude__ClientProfile, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Prelude::ClientProfile *","GetConfigFilename", 1, self )); } arg1 = reinterpret_cast< Prelude::ClientProfile * >(argp1); try { result = (arg1)->GetConfigFilename(); } catch(Prelude::PreludeError &_e) { rb_exc_raise(SWIG_Ruby_ExceptionType(SWIGTYPE_p_Prelude__PreludeError, SWIG_NewPointerObj((new Prelude::PreludeError(static_cast< const Prelude::PreludeError& >(_e))),SWIGTYPE_p_Prelude__PreludeError,SWIG_POINTER_OWN))); SWIG_fail; } vresult = SWIG_From_std_string(static_cast< std::string >(result)); return vresult; fail: return Qnil; } SWIGINTERN VALUE _wrap_ClientProfile_GetAnalyzeridFilename(int argc, VALUE *argv, VALUE self) { Prelude::ClientProfile *arg1 = (Prelude::ClientProfile *) 0 ; void *argp1 = 0 ; int res1 = 0 ; std::string result; VALUE vresult = Qnil; if ((argc < 0) || (argc > 0)) { rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; } res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Prelude__ClientProfile, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Prelude::ClientProfile *","GetAnalyzeridFilename", 1, self )); } arg1 = reinterpret_cast< Prelude::ClientProfile * >(argp1); try { result = (arg1)->GetAnalyzeridFilename(); } catch(Prelude::PreludeError &_e) { rb_exc_raise(SWIG_Ruby_ExceptionType(SWIGTYPE_p_Prelude__PreludeError, SWIG_NewPointerObj((new Prelude::PreludeError(static_cast< const Prelude::PreludeError& >(_e))),SWIGTYPE_p_Prelude__PreludeError,SWIG_POINTER_OWN))); SWIG_fail; } vresult = SWIG_From_std_string(static_cast< std::string >(result)); return vresult; fail: return Qnil; } SWIGINTERN VALUE _wrap_ClientProfile_GetTlsKeyFilename(int argc, VALUE *argv, VALUE self) { Prelude::ClientProfile *arg1 = (Prelude::ClientProfile *) 0 ; void *argp1 = 0 ; int res1 = 0 ; std::string result; VALUE vresult = Qnil; if ((argc < 0) || (argc > 0)) { rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; } res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Prelude__ClientProfile, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Prelude::ClientProfile *","GetTlsKeyFilename", 1, self )); } arg1 = reinterpret_cast< Prelude::ClientProfile * >(argp1); try { result = (arg1)->GetTlsKeyFilename(); } catch(Prelude::PreludeError &_e) { rb_exc_raise(SWIG_Ruby_ExceptionType(SWIGTYPE_p_Prelude__PreludeError, SWIG_NewPointerObj((new Prelude::PreludeError(static_cast< const Prelude::PreludeError& >(_e))),SWIGTYPE_p_Prelude__PreludeError,SWIG_POINTER_OWN))); SWIG_fail; } vresult = SWIG_From_std_string(static_cast< std::string >(result)); return vresult; fail: return Qnil; } SWIGINTERN VALUE _wrap_ClientProfile_GetTlsServerCaCertFilename(int argc, VALUE *argv, VALUE self) { Prelude::ClientProfile *arg1 = (Prelude::ClientProfile *) 0 ; void *argp1 = 0 ; int res1 = 0 ; std::string result; VALUE vresult = Qnil; if ((argc < 0) || (argc > 0)) { rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; } res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Prelude__ClientProfile, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Prelude::ClientProfile *","GetTlsServerCaCertFilename", 1, self )); } arg1 = reinterpret_cast< Prelude::ClientProfile * >(argp1); try { result = (arg1)->GetTlsServerCaCertFilename(); } catch(Prelude::PreludeError &_e) { rb_exc_raise(SWIG_Ruby_ExceptionType(SWIGTYPE_p_Prelude__PreludeError, SWIG_NewPointerObj((new Prelude::PreludeError(static_cast< const Prelude::PreludeError& >(_e))),SWIGTYPE_p_Prelude__PreludeError,SWIG_POINTER_OWN))); SWIG_fail; } vresult = SWIG_From_std_string(static_cast< std::string >(result)); return vresult; fail: return Qnil; } SWIGINTERN VALUE _wrap_ClientProfile_GetTlsServerKeyCertFilename(int argc, VALUE *argv, VALUE self) { Prelude::ClientProfile *arg1 = (Prelude::ClientProfile *) 0 ; void *argp1 = 0 ; int res1 = 0 ; std::string result; VALUE vresult = Qnil; if ((argc < 0) || (argc > 0)) { rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; } res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Prelude__ClientProfile, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Prelude::ClientProfile *","GetTlsServerKeyCertFilename", 1, self )); } arg1 = reinterpret_cast< Prelude::ClientProfile * >(argp1); try { result = (arg1)->GetTlsServerKeyCertFilename(); } catch(Prelude::PreludeError &_e) { rb_exc_raise(SWIG_Ruby_ExceptionType(SWIGTYPE_p_Prelude__PreludeError, SWIG_NewPointerObj((new Prelude::PreludeError(static_cast< const Prelude::PreludeError& >(_e))),SWIGTYPE_p_Prelude__PreludeError,SWIG_POINTER_OWN))); SWIG_fail; } vresult = SWIG_From_std_string(static_cast< std::string >(result)); return vresult; fail: return Qnil; } SWIGINTERN VALUE _wrap_ClientProfile_GetTlsServerCrlFilename(int argc, VALUE *argv, VALUE self) { Prelude::ClientProfile *arg1 = (Prelude::ClientProfile *) 0 ; void *argp1 = 0 ; int res1 = 0 ; std::string result; VALUE vresult = Qnil; if ((argc < 0) || (argc > 0)) { rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; } res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Prelude__ClientProfile, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Prelude::ClientProfile *","GetTlsServerCrlFilename", 1, self )); } arg1 = reinterpret_cast< Prelude::ClientProfile * >(argp1); try { result = (arg1)->GetTlsServerCrlFilename(); } catch(Prelude::PreludeError &_e) { rb_exc_raise(SWIG_Ruby_ExceptionType(SWIGTYPE_p_Prelude__PreludeError, SWIG_NewPointerObj((new Prelude::PreludeError(static_cast< const Prelude::PreludeError& >(_e))),SWIGTYPE_p_Prelude__PreludeError,SWIG_POINTER_OWN))); SWIG_fail; } vresult = SWIG_From_std_string(static_cast< std::string >(result)); return vresult; fail: return Qnil; } SWIGINTERN VALUE _wrap_ClientProfile_GetTlsClientKeyCertFilename(int argc, VALUE *argv, VALUE self) { Prelude::ClientProfile *arg1 = (Prelude::ClientProfile *) 0 ; void *argp1 = 0 ; int res1 = 0 ; std::string result; VALUE vresult = Qnil; if ((argc < 0) || (argc > 0)) { rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; } res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Prelude__ClientProfile, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Prelude::ClientProfile *","GetTlsClientKeyCertFilename", 1, self )); } arg1 = reinterpret_cast< Prelude::ClientProfile * >(argp1); try { result = (arg1)->GetTlsClientKeyCertFilename(); } catch(Prelude::PreludeError &_e) { rb_exc_raise(SWIG_Ruby_ExceptionType(SWIGTYPE_p_Prelude__PreludeError, SWIG_NewPointerObj((new Prelude::PreludeError(static_cast< const Prelude::PreludeError& >(_e))),SWIGTYPE_p_Prelude__PreludeError,SWIG_POINTER_OWN))); SWIG_fail; } vresult = SWIG_From_std_string(static_cast< std::string >(result)); return vresult; fail: return Qnil; } SWIGINTERN VALUE _wrap_ClientProfile_GetTlsClientTrustedCertFilename(int argc, VALUE *argv, VALUE self) { Prelude::ClientProfile *arg1 = (Prelude::ClientProfile *) 0 ; void *argp1 = 0 ; int res1 = 0 ; std::string result; VALUE vresult = Qnil; if ((argc < 0) || (argc > 0)) { rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; } res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Prelude__ClientProfile, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Prelude::ClientProfile *","GetTlsClientTrustedCertFilename", 1, self )); } arg1 = reinterpret_cast< Prelude::ClientProfile * >(argp1); try { result = (arg1)->GetTlsClientTrustedCertFilename(); } catch(Prelude::PreludeError &_e) { rb_exc_raise(SWIG_Ruby_ExceptionType(SWIGTYPE_p_Prelude__PreludeError, SWIG_NewPointerObj((new Prelude::PreludeError(static_cast< const Prelude::PreludeError& >(_e))),SWIGTYPE_p_Prelude__PreludeError,SWIG_POINTER_OWN))); SWIG_fail; } vresult = SWIG_From_std_string(static_cast< std::string >(result)); return vresult; fail: return Qnil; } SWIGINTERN VALUE _wrap_ClientProfile_GetBackupDirname(int argc, VALUE *argv, VALUE self) { Prelude::ClientProfile *arg1 = (Prelude::ClientProfile *) 0 ; void *argp1 = 0 ; int res1 = 0 ; std::string result; VALUE vresult = Qnil; if ((argc < 0) || (argc > 0)) { rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; } res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Prelude__ClientProfile, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Prelude::ClientProfile *","GetBackupDirname", 1, self )); } arg1 = reinterpret_cast< Prelude::ClientProfile * >(argp1); try { result = (arg1)->GetBackupDirname(); } catch(Prelude::PreludeError &_e) { rb_exc_raise(SWIG_Ruby_ExceptionType(SWIGTYPE_p_Prelude__PreludeError, SWIG_NewPointerObj((new Prelude::PreludeError(static_cast< const Prelude::PreludeError& >(_e))),SWIGTYPE_p_Prelude__PreludeError,SWIG_POINTER_OWN))); SWIG_fail; } vresult = SWIG_From_std_string(static_cast< std::string >(result)); return vresult; fail: return Qnil; } SWIGINTERN VALUE _wrap_ClientProfile_GetProfileDirname(int argc, VALUE *argv, VALUE self) { Prelude::ClientProfile *arg1 = (Prelude::ClientProfile *) 0 ; void *argp1 = 0 ; int res1 = 0 ; std::string result; VALUE vresult = Qnil; if ((argc < 0) || (argc > 0)) { rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; } res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Prelude__ClientProfile, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Prelude::ClientProfile *","GetProfileDirname", 1, self )); } arg1 = reinterpret_cast< Prelude::ClientProfile * >(argp1); try { result = (arg1)->GetProfileDirname(); } catch(Prelude::PreludeError &_e) { rb_exc_raise(SWIG_Ruby_ExceptionType(SWIGTYPE_p_Prelude__PreludeError, SWIG_NewPointerObj((new Prelude::PreludeError(static_cast< const Prelude::PreludeError& >(_e))),SWIGTYPE_p_Prelude__PreludeError,SWIG_POINTER_OWN))); SWIG_fail; } vresult = SWIG_From_std_string(static_cast< std::string >(result)); return vresult; fail: return Qnil; } SWIGINTERN VALUE _wrap_ClientProfile_SetPrefix(int argc, VALUE *argv, VALUE self) { Prelude::ClientProfile *arg1 = (Prelude::ClientProfile *) 0 ; char *arg2 = (char *) 0 ; void *argp1 = 0 ; int res1 = 0 ; int res2 ; char *buf2 = 0 ; int alloc2 = 0 ; if ((argc < 1) || (argc > 1)) { rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; } res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Prelude__ClientProfile, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Prelude::ClientProfile *","SetPrefix", 1, self )); } arg1 = reinterpret_cast< Prelude::ClientProfile * >(argp1); res2 = SWIG_AsCharPtrAndSize(argv[0], &buf2, NULL, &alloc2); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "char const *","SetPrefix", 2, argv[0] )); } arg2 = reinterpret_cast< char * >(buf2); try { (arg1)->SetPrefix((char const *)arg2); } catch(Prelude::PreludeError &_e) { rb_exc_raise(SWIG_Ruby_ExceptionType(SWIGTYPE_p_Prelude__PreludeError, SWIG_NewPointerObj((new Prelude::PreludeError(static_cast< const Prelude::PreludeError& >(_e))),SWIGTYPE_p_Prelude__PreludeError,SWIG_POINTER_OWN))); SWIG_fail; } if (alloc2 == SWIG_NEWOBJ) delete[] buf2; return Qnil; fail: if (alloc2 == SWIG_NEWOBJ) delete[] buf2; return Qnil; } SWIGINTERN VALUE _wrap_ClientProfile_GetPrefix(int argc, VALUE *argv, VALUE self) { Prelude::ClientProfile *arg1 = (Prelude::ClientProfile *) 0 ; void *argp1 = 0 ; int res1 = 0 ; std::string result; VALUE vresult = Qnil; if ((argc < 0) || (argc > 0)) { rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; } res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Prelude__ClientProfile, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Prelude::ClientProfile *","GetPrefix", 1, self )); } arg1 = reinterpret_cast< Prelude::ClientProfile * >(argp1); try { result = (arg1)->GetPrefix(); } catch(Prelude::PreludeError &_e) { rb_exc_raise(SWIG_Ruby_ExceptionType(SWIGTYPE_p_Prelude__PreludeError, SWIG_NewPointerObj((new Prelude::PreludeError(static_cast< const Prelude::PreludeError& >(_e))),SWIGTYPE_p_Prelude__PreludeError,SWIG_POINTER_OWN))); SWIG_fail; } vresult = SWIG_From_std_string(static_cast< std::string >(result)); return vresult; fail: return Qnil; } swig_class SwigClassClient; SWIGINTERN void free_Prelude_Client(Prelude::Client *arg1) { delete arg1; } SWIGINTERN VALUE _wrap_new_Client__SWIG_0(int argc, VALUE *argv, VALUE self) { char *arg1 = (char *) 0 ; int res1 ; char *buf1 = 0 ; int alloc1 = 0 ; Prelude::Client *result = 0 ; if ((argc < 1) || (argc > 1)) { rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; } res1 = SWIG_AsCharPtrAndSize(argv[0], &buf1, NULL, &alloc1); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "char const *","Prelude::Client", 1, argv[0] )); } arg1 = reinterpret_cast< char * >(buf1); try { result = (Prelude::Client *)new Prelude::Client((char const *)arg1); DATA_PTR(self) = result; } catch(Prelude::PreludeError &_e) { rb_exc_raise(SWIG_Ruby_ExceptionType(SWIGTYPE_p_Prelude__PreludeError, SWIG_NewPointerObj((new Prelude::PreludeError(static_cast< const Prelude::PreludeError& >(_e))),SWIGTYPE_p_Prelude__PreludeError,SWIG_POINTER_OWN))); SWIG_fail; } if (alloc1 == SWIG_NEWOBJ) delete[] buf1; return self; fail: if (alloc1 == SWIG_NEWOBJ) delete[] buf1; return Qnil; } #ifdef HAVE_RB_DEFINE_ALLOC_FUNC SWIGINTERN VALUE _wrap_Client_allocate(VALUE self) { #else SWIGINTERN VALUE _wrap_Client_allocate(int argc, VALUE *argv, VALUE self) { #endif VALUE vresult = SWIG_NewClassInstance(self, SWIGTYPE_p_Prelude__Client); #ifndef HAVE_RB_DEFINE_ALLOC_FUNC rb_obj_call_init(vresult, argc, argv); #endif return vresult; } SWIGINTERN VALUE _wrap_new_Client__SWIG_1(int argc, VALUE *argv, VALUE self) { Prelude::Client *arg1 = 0 ; void *argp1 ; int res1 = 0 ; Prelude::Client *result = 0 ; if ((argc < 1) || (argc > 1)) { rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; } res1 = SWIG_ConvertPtr(argv[0], &argp1, SWIGTYPE_p_Prelude__Client, 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Prelude::Client const &","Prelude::Client", 1, argv[0] )); } if (!argp1) { SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "Prelude::Client const &","Prelude::Client", 1, argv[0])); } arg1 = reinterpret_cast< Prelude::Client * >(argp1); try { result = (Prelude::Client *)new Prelude::Client((Prelude::Client const &)*arg1); DATA_PTR(self) = result; } catch(Prelude::PreludeError &_e) { rb_exc_raise(SWIG_Ruby_ExceptionType(SWIGTYPE_p_Prelude__PreludeError, SWIG_NewPointerObj((new Prelude::PreludeError(static_cast< const Prelude::PreludeError& >(_e))),SWIGTYPE_p_Prelude__PreludeError,SWIG_POINTER_OWN))); SWIG_fail; } return self; fail: return Qnil; } SWIGINTERN VALUE _wrap_new_Client(int nargs, VALUE *args, VALUE self) { int argc; VALUE argv[1]; int ii; argc = nargs; if (argc > 1) SWIG_fail; for (ii = 0; (ii < argc); ++ii) { argv[ii] = args[ii]; } if (argc == 1) { int _v; void *vptr = 0; int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_Prelude__Client, 0); _v = SWIG_CheckState(res); if (_v) { return _wrap_new_Client__SWIG_1(nargs, args, self); } } if (argc == 1) { int _v; int res = SWIG_AsCharPtrAndSize(argv[0], 0, NULL, 0); _v = SWIG_CheckState(res); if (_v) { return _wrap_new_Client__SWIG_0(nargs, args, self); } } fail: Ruby_Format_OverloadedError( argc, 1, "Client.new", " Client.new(char const *profile)\n" " Client.new(Prelude::Client const &client)\n"); return Qnil; } SWIGINTERN VALUE _wrap_Client_Start(int argc, VALUE *argv, VALUE self) { Prelude::Client *arg1 = (Prelude::Client *) 0 ; void *argp1 = 0 ; int res1 = 0 ; if ((argc < 0) || (argc > 0)) { rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; } res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Prelude__Client, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Prelude::Client *","Start", 1, self )); } arg1 = reinterpret_cast< Prelude::Client * >(argp1); try { (arg1)->Start(); } catch(Prelude::PreludeError &_e) { rb_exc_raise(SWIG_Ruby_ExceptionType(SWIGTYPE_p_Prelude__PreludeError, SWIG_NewPointerObj((new Prelude::PreludeError(static_cast< const Prelude::PreludeError& >(_e))),SWIGTYPE_p_Prelude__PreludeError,SWIG_POINTER_OWN))); SWIG_fail; } return Qnil; fail: return Qnil; } SWIGINTERN VALUE _wrap_Client_Init(int argc, VALUE *argv, VALUE self) { Prelude::Client *arg1 = (Prelude::Client *) 0 ; void *argp1 = 0 ; int res1 = 0 ; if ((argc < 0) || (argc > 0)) { rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; } res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Prelude__Client, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Prelude::Client *","Init", 1, self )); } arg1 = reinterpret_cast< Prelude::Client * >(argp1); try { (arg1)->Init(); } catch(Prelude::PreludeError &_e) { rb_exc_raise(SWIG_Ruby_ExceptionType(SWIGTYPE_p_Prelude__PreludeError, SWIG_NewPointerObj((new Prelude::PreludeError(static_cast< const Prelude::PreludeError& >(_e))),SWIGTYPE_p_Prelude__PreludeError,SWIG_POINTER_OWN))); SWIG_fail; } return Qnil; fail: return Qnil; } SWIGINTERN VALUE _wrap_Client_GetClient(int argc, VALUE *argv, VALUE self) { Prelude::Client *arg1 = (Prelude::Client *) 0 ; void *argp1 = 0 ; int res1 = 0 ; prelude_client_t *result = 0 ; VALUE vresult = Qnil; if ((argc < 0) || (argc > 0)) { rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; } res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Prelude__Client, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Prelude::Client *","GetClient", 1, self )); } arg1 = reinterpret_cast< Prelude::Client * >(argp1); try { result = (prelude_client_t *)(arg1)->GetClient(); } catch(Prelude::PreludeError &_e) { rb_exc_raise(SWIG_Ruby_ExceptionType(SWIGTYPE_p_Prelude__PreludeError, SWIG_NewPointerObj((new Prelude::PreludeError(static_cast< const Prelude::PreludeError& >(_e))),SWIGTYPE_p_Prelude__PreludeError,SWIG_POINTER_OWN))); SWIG_fail; } vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_prelude_client_t, 0 | 0 ); return vresult; fail: return Qnil; } SWIGINTERN VALUE _wrap_Client_SendIDMEF(int argc, VALUE *argv, VALUE self) { Prelude::Client *arg1 = (Prelude::Client *) 0 ; Prelude::IDMEF *arg2 = 0 ; void *argp1 = 0 ; int res1 = 0 ; void *argp2 ; int res2 = 0 ; if ((argc < 1) || (argc > 1)) { rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; } res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Prelude__Client, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Prelude::Client *","SendIDMEF", 1, self )); } arg1 = reinterpret_cast< Prelude::Client * >(argp1); res2 = SWIG_ConvertPtr(argv[0], &argp2, SWIGTYPE_p_Prelude__IDMEF, 0 ); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "Prelude::IDMEF const &","SendIDMEF", 2, argv[0] )); } if (!argp2) { SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "Prelude::IDMEF const &","SendIDMEF", 2, argv[0])); } arg2 = reinterpret_cast< Prelude::IDMEF * >(argp2); try { (arg1)->SendIDMEF((Prelude::IDMEF const &)*arg2); } catch(Prelude::PreludeError &_e) { rb_exc_raise(SWIG_Ruby_ExceptionType(SWIGTYPE_p_Prelude__PreludeError, SWIG_NewPointerObj((new Prelude::PreludeError(static_cast< const Prelude::PreludeError& >(_e))),SWIGTYPE_p_Prelude__PreludeError,SWIG_POINTER_OWN))); SWIG_fail; } return Qnil; fail: return Qnil; } SWIGINTERN VALUE _wrap_Client_RecvIDMEF__SWIG_0(int argc, VALUE *argv, VALUE self) { Prelude::Client *arg1 = (Prelude::Client *) 0 ; Prelude::IDMEF *arg2 = 0 ; int arg3 ; void *argp1 = 0 ; int res1 = 0 ; void *argp2 = 0 ; int res2 = 0 ; int val3 ; int ecode3 = 0 ; int result; VALUE vresult = Qnil; if ((argc < 2) || (argc > 2)) { rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail; } res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Prelude__Client, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Prelude::Client *","RecvIDMEF", 1, self )); } arg1 = reinterpret_cast< Prelude::Client * >(argp1); res2 = SWIG_ConvertPtr(argv[0], &argp2, SWIGTYPE_p_Prelude__IDMEF, 0 ); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "Prelude::IDMEF &","RecvIDMEF", 2, argv[0] )); } if (!argp2) { SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "Prelude::IDMEF &","RecvIDMEF", 2, argv[0])); } arg2 = reinterpret_cast< Prelude::IDMEF * >(argp2); ecode3 = SWIG_AsVal_int(argv[1], &val3); if (!SWIG_IsOK(ecode3)) { SWIG_exception_fail(SWIG_ArgError(ecode3), Ruby_Format_TypeError( "", "int","RecvIDMEF", 3, argv[1] )); } arg3 = static_cast< int >(val3); try { result = (int)(arg1)->RecvIDMEF(*arg2,arg3); } catch(Prelude::PreludeError &_e) { rb_exc_raise(SWIG_Ruby_ExceptionType(SWIGTYPE_p_Prelude__PreludeError, SWIG_NewPointerObj((new Prelude::PreludeError(static_cast< const Prelude::PreludeError& >(_e))),SWIGTYPE_p_Prelude__PreludeError,SWIG_POINTER_OWN))); SWIG_fail; } vresult = SWIG_From_int(static_cast< int >(result)); return vresult; fail: return Qnil; } SWIGINTERN VALUE _wrap_Client_RecvIDMEF__SWIG_1(int argc, VALUE *argv, VALUE self) { Prelude::Client *arg1 = (Prelude::Client *) 0 ; Prelude::IDMEF *arg2 = 0 ; void *argp1 = 0 ; int res1 = 0 ; void *argp2 = 0 ; int res2 = 0 ; int result; VALUE vresult = Qnil; if ((argc < 1) || (argc > 1)) { rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; } res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Prelude__Client, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Prelude::Client *","RecvIDMEF", 1, self )); } arg1 = reinterpret_cast< Prelude::Client * >(argp1); res2 = SWIG_ConvertPtr(argv[0], &argp2, SWIGTYPE_p_Prelude__IDMEF, 0 ); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "Prelude::IDMEF &","RecvIDMEF", 2, argv[0] )); } if (!argp2) { SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "Prelude::IDMEF &","RecvIDMEF", 2, argv[0])); } arg2 = reinterpret_cast< Prelude::IDMEF * >(argp2); try { result = (int)(arg1)->RecvIDMEF(*arg2); } catch(Prelude::PreludeError &_e) { rb_exc_raise(SWIG_Ruby_ExceptionType(SWIGTYPE_p_Prelude__PreludeError, SWIG_NewPointerObj((new Prelude::PreludeError(static_cast< const Prelude::PreludeError& >(_e))),SWIGTYPE_p_Prelude__PreludeError,SWIG_POINTER_OWN))); SWIG_fail; } vresult = SWIG_From_int(static_cast< int >(result)); return vresult; fail: return Qnil; } SWIGINTERN VALUE _wrap_Client_RecvIDMEF(int nargs, VALUE *args, VALUE self) { int argc; VALUE argv[4]; int ii; argc = nargs + 1; argv[0] = self; if (argc > 4) SWIG_fail; for (ii = 1; (ii < argc); ++ii) { argv[ii] = args[ii-1]; } if (argc == 2) { int _v; void *vptr = 0; int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_Prelude__Client, 0); _v = SWIG_CheckState(res); if (_v) { void *vptr = 0; int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_p_Prelude__IDMEF, 0); _v = SWIG_CheckState(res); if (_v) { return _wrap_Client_RecvIDMEF__SWIG_1(nargs, args, self); } } } if (argc == 3) { int _v; void *vptr = 0; int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_Prelude__Client, 0); _v = SWIG_CheckState(res); if (_v) { void *vptr = 0; int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_p_Prelude__IDMEF, 0); _v = SWIG_CheckState(res); if (_v) { { int res = SWIG_AsVal_int(argv[2], NULL); _v = SWIG_CheckState(res); } if (_v) { return _wrap_Client_RecvIDMEF__SWIG_0(nargs, args, self); } } } } fail: Ruby_Format_OverloadedError( argc, 4, "Client.RecvIDMEF", " int Client.RecvIDMEF(Prelude::IDMEF &idmef, int timeout)\n" " int Client.RecvIDMEF(Prelude::IDMEF &idmef)\n"); return Qnil; } SWIGINTERN VALUE _wrap_Client_GetFlags(int argc, VALUE *argv, VALUE self) { Prelude::Client *arg1 = (Prelude::Client *) 0 ; void *argp1 = 0 ; int res1 = 0 ; int result; VALUE vresult = Qnil; if ((argc < 0) || (argc > 0)) { rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; } res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Prelude__Client, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Prelude::Client *","GetFlags", 1, self )); } arg1 = reinterpret_cast< Prelude::Client * >(argp1); try { result = (int)(arg1)->GetFlags(); } catch(Prelude::PreludeError &_e) { rb_exc_raise(SWIG_Ruby_ExceptionType(SWIGTYPE_p_Prelude__PreludeError, SWIG_NewPointerObj((new Prelude::PreludeError(static_cast< const Prelude::PreludeError& >(_e))),SWIGTYPE_p_Prelude__PreludeError,SWIG_POINTER_OWN))); SWIG_fail; } vresult = SWIG_From_int(static_cast< int >(result)); return vresult; fail: return Qnil; } SWIGINTERN VALUE _wrap_Client_SetFlags(int argc, VALUE *argv, VALUE self) { Prelude::Client *arg1 = (Prelude::Client *) 0 ; int arg2 ; void *argp1 = 0 ; int res1 = 0 ; int val2 ; int ecode2 = 0 ; if ((argc < 1) || (argc > 1)) { rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; } res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Prelude__Client, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Prelude::Client *","SetFlags", 1, self )); } arg1 = reinterpret_cast< Prelude::Client * >(argp1); ecode2 = SWIG_AsVal_int(argv[0], &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "int","SetFlags", 2, argv[0] )); } arg2 = static_cast< int >(val2); try { (arg1)->SetFlags(arg2); } catch(Prelude::PreludeError &_e) { rb_exc_raise(SWIG_Ruby_ExceptionType(SWIGTYPE_p_Prelude__PreludeError, SWIG_NewPointerObj((new Prelude::PreludeError(static_cast< const Prelude::PreludeError& >(_e))),SWIGTYPE_p_Prelude__PreludeError,SWIG_POINTER_OWN))); SWIG_fail; } return Qnil; fail: return Qnil; } SWIGINTERN VALUE _wrap_Client_GetRequiredPermission(int argc, VALUE *argv, VALUE self) { Prelude::Client *arg1 = (Prelude::Client *) 0 ; void *argp1 = 0 ; int res1 = 0 ; int result; VALUE vresult = Qnil; if ((argc < 0) || (argc > 0)) { rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; } res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Prelude__Client, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Prelude::Client *","GetRequiredPermission", 1, self )); } arg1 = reinterpret_cast< Prelude::Client * >(argp1); try { result = (int)(arg1)->GetRequiredPermission(); } catch(Prelude::PreludeError &_e) { rb_exc_raise(SWIG_Ruby_ExceptionType(SWIGTYPE_p_Prelude__PreludeError, SWIG_NewPointerObj((new Prelude::PreludeError(static_cast< const Prelude::PreludeError& >(_e))),SWIGTYPE_p_Prelude__PreludeError,SWIG_POINTER_OWN))); SWIG_fail; } vresult = SWIG_From_int(static_cast< int >(result)); return vresult; fail: return Qnil; } SWIGINTERN VALUE _wrap_Client_SetRequiredPermission(int argc, VALUE *argv, VALUE self) { Prelude::Client *arg1 = (Prelude::Client *) 0 ; int arg2 ; void *argp1 = 0 ; int res1 = 0 ; int val2 ; int ecode2 = 0 ; if ((argc < 1) || (argc > 1)) { rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; } res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Prelude__Client, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Prelude::Client *","SetRequiredPermission", 1, self )); } arg1 = reinterpret_cast< Prelude::Client * >(argp1); ecode2 = SWIG_AsVal_int(argv[0], &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "int","SetRequiredPermission", 2, argv[0] )); } arg2 = static_cast< int >(val2); try { (arg1)->SetRequiredPermission(arg2); } catch(Prelude::PreludeError &_e) { rb_exc_raise(SWIG_Ruby_ExceptionType(SWIGTYPE_p_Prelude__PreludeError, SWIG_NewPointerObj((new Prelude::PreludeError(static_cast< const Prelude::PreludeError& >(_e))),SWIGTYPE_p_Prelude__PreludeError,SWIG_POINTER_OWN))); SWIG_fail; } return Qnil; fail: return Qnil; } SWIGINTERN VALUE _wrap_Client_GetConfigFilename(int argc, VALUE *argv, VALUE self) { Prelude::Client *arg1 = (Prelude::Client *) 0 ; void *argp1 = 0 ; int res1 = 0 ; char *result = 0 ; VALUE vresult = Qnil; if ((argc < 0) || (argc > 0)) { rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; } res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Prelude__Client, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Prelude::Client *","GetConfigFilename", 1, self )); } arg1 = reinterpret_cast< Prelude::Client * >(argp1); try { result = (char *)(arg1)->GetConfigFilename(); } catch(Prelude::PreludeError &_e) { rb_exc_raise(SWIG_Ruby_ExceptionType(SWIGTYPE_p_Prelude__PreludeError, SWIG_NewPointerObj((new Prelude::PreludeError(static_cast< const Prelude::PreludeError& >(_e))),SWIGTYPE_p_Prelude__PreludeError,SWIG_POINTER_OWN))); SWIG_fail; } vresult = SWIG_FromCharPtr((const char *)result); return vresult; fail: return Qnil; } SWIGINTERN VALUE _wrap_Client_SetConfigFilename(int argc, VALUE *argv, VALUE self) { Prelude::Client *arg1 = (Prelude::Client *) 0 ; char *arg2 = (char *) 0 ; void *argp1 = 0 ; int res1 = 0 ; int res2 ; char *buf2 = 0 ; int alloc2 = 0 ; if ((argc < 1) || (argc > 1)) { rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; } res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Prelude__Client, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Prelude::Client *","SetConfigFilename", 1, self )); } arg1 = reinterpret_cast< Prelude::Client * >(argp1); res2 = SWIG_AsCharPtrAndSize(argv[0], &buf2, NULL, &alloc2); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "char const *","SetConfigFilename", 2, argv[0] )); } arg2 = reinterpret_cast< char * >(buf2); try { (arg1)->SetConfigFilename((char const *)arg2); } catch(Prelude::PreludeError &_e) { rb_exc_raise(SWIG_Ruby_ExceptionType(SWIGTYPE_p_Prelude__PreludeError, SWIG_NewPointerObj((new Prelude::PreludeError(static_cast< const Prelude::PreludeError& >(_e))),SWIGTYPE_p_Prelude__PreludeError,SWIG_POINTER_OWN))); SWIG_fail; } if (alloc2 == SWIG_NEWOBJ) delete[] buf2; return Qnil; fail: if (alloc2 == SWIG_NEWOBJ) delete[] buf2; return Qnil; } SWIGINTERN VALUE _wrap_Client_GetConnectionPool(int argc, VALUE *argv, VALUE self) { Prelude::Client *arg1 = (Prelude::Client *) 0 ; void *argp1 = 0 ; int res1 = 0 ; Prelude::ConnectionPool *result = 0 ; VALUE vresult = Qnil; if ((argc < 0) || (argc > 0)) { rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; } res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Prelude__Client, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Prelude::Client *","GetConnectionPool", 1, self )); } arg1 = reinterpret_cast< Prelude::Client * >(argp1); try { result = (Prelude::ConnectionPool *) &(arg1)->GetConnectionPool(); } catch(Prelude::PreludeError &_e) { rb_exc_raise(SWIG_Ruby_ExceptionType(SWIGTYPE_p_Prelude__PreludeError, SWIG_NewPointerObj((new Prelude::PreludeError(static_cast< const Prelude::PreludeError& >(_e))),SWIGTYPE_p_Prelude__PreludeError,SWIG_POINTER_OWN))); SWIG_fail; } vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Prelude__ConnectionPool, 0 | 0 ); return vresult; fail: return Qnil; } SWIGINTERN VALUE _wrap_Client_SetConnectionPool(int argc, VALUE *argv, VALUE self) { Prelude::Client *arg1 = (Prelude::Client *) 0 ; Prelude::ConnectionPool arg2 ; void *argp1 = 0 ; int res1 = 0 ; void *argp2 ; int res2 = 0 ; if ((argc < 1) || (argc > 1)) { rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; } res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Prelude__Client, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Prelude::Client *","SetConnectionPool", 1, self )); } arg1 = reinterpret_cast< Prelude::Client * >(argp1); { res2 = SWIG_ConvertPtr(argv[0], &argp2, SWIGTYPE_p_Prelude__ConnectionPool, 0 ); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "Prelude::ConnectionPool","SetConnectionPool", 2, argv[0] )); } if (!argp2) { SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "Prelude::ConnectionPool","SetConnectionPool", 2, argv[0])); } else { arg2 = *(reinterpret_cast< Prelude::ConnectionPool * >(argp2)); } } try { (arg1)->SetConnectionPool(arg2); } catch(Prelude::PreludeError &_e) { rb_exc_raise(SWIG_Ruby_ExceptionType(SWIGTYPE_p_Prelude__PreludeError, SWIG_NewPointerObj((new Prelude::PreludeError(static_cast< const Prelude::PreludeError& >(_e))),SWIGTYPE_p_Prelude__PreludeError,SWIG_POINTER_OWN))); SWIG_fail; } return Qnil; fail: return Qnil; } /* Document-method: PreludeEasy::Client.<< call-seq: <<(idmef) -> Client Left shifting or appending operator. */ SWIGINTERN VALUE _wrap_Client___lshift__(int argc, VALUE *argv, VALUE self) { Prelude::Client *arg1 = (Prelude::Client *) 0 ; Prelude::IDMEF *arg2 = 0 ; void *argp1 = 0 ; int res1 = 0 ; void *argp2 = 0 ; int res2 = 0 ; Prelude::Client *result = 0 ; VALUE vresult = Qnil; if ((argc < 1) || (argc > 1)) { rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; } res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Prelude__Client, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Prelude::Client *","operator <<", 1, self )); } arg1 = reinterpret_cast< Prelude::Client * >(argp1); res2 = SWIG_ConvertPtr(argv[0], &argp2, SWIGTYPE_p_Prelude__IDMEF, 0 ); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "Prelude::IDMEF &","operator <<", 2, argv[0] )); } if (!argp2) { SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "Prelude::IDMEF &","operator <<", 2, argv[0])); } arg2 = reinterpret_cast< Prelude::IDMEF * >(argp2); try { result = (Prelude::Client *) &(arg1)->operator <<(*arg2); } catch(Prelude::PreludeError &_e) { rb_exc_raise(SWIG_Ruby_ExceptionType(SWIGTYPE_p_Prelude__PreludeError, SWIG_NewPointerObj((new Prelude::PreludeError(static_cast< const Prelude::PreludeError& >(_e))),SWIGTYPE_p_Prelude__PreludeError,SWIG_POINTER_OWN))); SWIG_fail; } vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Prelude__Client, 0 | 0 ); return vresult; fail: return Qnil; } /* Document-method: PreludeEasy::Client.>> call-seq: >>(idmef) -> Client Right shifting operator or extracting operator. */ SWIGINTERN VALUE _wrap_Client___rshift__(int argc, VALUE *argv, VALUE self) { Prelude::Client *arg1 = (Prelude::Client *) 0 ; Prelude::IDMEF *arg2 = 0 ; void *argp1 = 0 ; int res1 = 0 ; void *argp2 = 0 ; int res2 = 0 ; Prelude::Client *result = 0 ; VALUE vresult = Qnil; if ((argc < 1) || (argc > 1)) { rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; } res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Prelude__Client, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Prelude::Client *","operator >>", 1, self )); } arg1 = reinterpret_cast< Prelude::Client * >(argp1); res2 = SWIG_ConvertPtr(argv[0], &argp2, SWIGTYPE_p_Prelude__IDMEF, 0 ); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "Prelude::IDMEF &","operator >>", 2, argv[0] )); } if (!argp2) { SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "Prelude::IDMEF &","operator >>", 2, argv[0])); } arg2 = reinterpret_cast< Prelude::IDMEF * >(argp2); try { result = (Prelude::Client *) &(arg1)->operator >>(*arg2); } catch(Prelude::PreludeError &_e) { rb_exc_raise(SWIG_Ruby_ExceptionType(SWIGTYPE_p_Prelude__PreludeError, SWIG_NewPointerObj((new Prelude::PreludeError(static_cast< const Prelude::PreludeError& >(_e))),SWIGTYPE_p_Prelude__PreludeError,SWIG_POINTER_OWN))); SWIG_fail; } vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Prelude__Client, 0 | 0 ); return vresult; fail: return Qnil; } SWIGINTERN VALUE _wrap_Client_SetRecvTimeout(int argc, VALUE *argv, VALUE self) { Prelude::Client *arg1 = 0 ; int arg2 ; void *argp1 = 0 ; int res1 = 0 ; int val2 ; int ecode2 = 0 ; Prelude::Client *result = 0 ; VALUE vresult = Qnil; if ((argc < 2) || (argc > 2)) { rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail; } res1 = SWIG_ConvertPtr(argv[0], &argp1, SWIGTYPE_p_Prelude__Client, 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Prelude::Client &","Prelude::Client::SetRecvTimeout", 1, argv[0] )); } if (!argp1) { SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "Prelude::Client &","Prelude::Client::SetRecvTimeout", 1, argv[0])); } arg1 = reinterpret_cast< Prelude::Client * >(argp1); ecode2 = SWIG_AsVal_int(argv[1], &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "int","Prelude::Client::SetRecvTimeout", 2, argv[1] )); } arg2 = static_cast< int >(val2); try { result = (Prelude::Client *) &Prelude::Client::SetRecvTimeout(*arg1,arg2); } catch(Prelude::PreludeError &_e) { rb_exc_raise(SWIG_Ruby_ExceptionType(SWIGTYPE_p_Prelude__PreludeError, SWIG_NewPointerObj((new Prelude::PreludeError(static_cast< const Prelude::PreludeError& >(_e))),SWIGTYPE_p_Prelude__PreludeError,SWIG_POINTER_OWN))); SWIG_fail; } vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Prelude__Client, 0 | 0 ); return vresult; fail: return Qnil; } swig_class SwigClassClientEasy; SWIGINTERN VALUE _wrap_new_ClientEasy__SWIG_0(int argc, VALUE *argv, VALUE self) { char *arg1 = (char *) 0 ; int arg2 ; char *arg3 = (char *) 0 ; char *arg4 = (char *) 0 ; char *arg5 = (char *) 0 ; char *arg6 = (char *) 0 ; int res1 ; char *buf1 = 0 ; int alloc1 = 0 ; int val2 ; int ecode2 = 0 ; int res3 ; char *buf3 = 0 ; int alloc3 = 0 ; int res4 ; char *buf4 = 0 ; int alloc4 = 0 ; int res5 ; char *buf5 = 0 ; int alloc5 = 0 ; int res6 ; char *buf6 = 0 ; int alloc6 = 0 ; Prelude::ClientEasy *result = 0 ; if ((argc < 6) || (argc > 6)) { rb_raise(rb_eArgError, "wrong # of arguments(%d for 6)",argc); SWIG_fail; } res1 = SWIG_AsCharPtrAndSize(argv[0], &buf1, NULL, &alloc1); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "char const *","Prelude::ClientEasy", 1, argv[0] )); } arg1 = reinterpret_cast< char * >(buf1); ecode2 = SWIG_AsVal_int(argv[1], &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "int","Prelude::ClientEasy", 2, argv[1] )); } arg2 = static_cast< int >(val2); res3 = SWIG_AsCharPtrAndSize(argv[2], &buf3, NULL, &alloc3); if (!SWIG_IsOK(res3)) { SWIG_exception_fail(SWIG_ArgError(res3), Ruby_Format_TypeError( "", "char const *","Prelude::ClientEasy", 3, argv[2] )); } arg3 = reinterpret_cast< char * >(buf3); res4 = SWIG_AsCharPtrAndSize(argv[3], &buf4, NULL, &alloc4); if (!SWIG_IsOK(res4)) { SWIG_exception_fail(SWIG_ArgError(res4), Ruby_Format_TypeError( "", "char const *","Prelude::ClientEasy", 4, argv[3] )); } arg4 = reinterpret_cast< char * >(buf4); res5 = SWIG_AsCharPtrAndSize(argv[4], &buf5, NULL, &alloc5); if (!SWIG_IsOK(res5)) { SWIG_exception_fail(SWIG_ArgError(res5), Ruby_Format_TypeError( "", "char const *","Prelude::ClientEasy", 5, argv[4] )); } arg5 = reinterpret_cast< char * >(buf5); res6 = SWIG_AsCharPtrAndSize(argv[5], &buf6, NULL, &alloc6); if (!SWIG_IsOK(res6)) { SWIG_exception_fail(SWIG_ArgError(res6), Ruby_Format_TypeError( "", "char const *","Prelude::ClientEasy", 6, argv[5] )); } arg6 = reinterpret_cast< char * >(buf6); try { result = (Prelude::ClientEasy *)new Prelude::ClientEasy((char const *)arg1,arg2,(char const *)arg3,(char const *)arg4,(char const *)arg5,(char const *)arg6); DATA_PTR(self) = result; } catch(Prelude::PreludeError &_e) { rb_exc_raise(SWIG_Ruby_ExceptionType(SWIGTYPE_p_Prelude__PreludeError, SWIG_NewPointerObj((new Prelude::PreludeError(static_cast< const Prelude::PreludeError& >(_e))),SWIGTYPE_p_Prelude__PreludeError,SWIG_POINTER_OWN))); SWIG_fail; } if (alloc1 == SWIG_NEWOBJ) delete[] buf1; if (alloc3 == SWIG_NEWOBJ) delete[] buf3; if (alloc4 == SWIG_NEWOBJ) delete[] buf4; if (alloc5 == SWIG_NEWOBJ) delete[] buf5; if (alloc6 == SWIG_NEWOBJ) delete[] buf6; return self; fail: if (alloc1 == SWIG_NEWOBJ) delete[] buf1; if (alloc3 == SWIG_NEWOBJ) delete[] buf3; if (alloc4 == SWIG_NEWOBJ) delete[] buf4; if (alloc5 == SWIG_NEWOBJ) delete[] buf5; if (alloc6 == SWIG_NEWOBJ) delete[] buf6; return Qnil; } SWIGINTERN VALUE _wrap_new_ClientEasy__SWIG_1(int argc, VALUE *argv, VALUE self) { char *arg1 = (char *) 0 ; int arg2 ; char *arg3 = (char *) 0 ; char *arg4 = (char *) 0 ; char *arg5 = (char *) 0 ; int res1 ; char *buf1 = 0 ; int alloc1 = 0 ; int val2 ; int ecode2 = 0 ; int res3 ; char *buf3 = 0 ; int alloc3 = 0 ; int res4 ; char *buf4 = 0 ; int alloc4 = 0 ; int res5 ; char *buf5 = 0 ; int alloc5 = 0 ; Prelude::ClientEasy *result = 0 ; if ((argc < 5) || (argc > 5)) { rb_raise(rb_eArgError, "wrong # of arguments(%d for 5)",argc); SWIG_fail; } res1 = SWIG_AsCharPtrAndSize(argv[0], &buf1, NULL, &alloc1); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "char const *","Prelude::ClientEasy", 1, argv[0] )); } arg1 = reinterpret_cast< char * >(buf1); ecode2 = SWIG_AsVal_int(argv[1], &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "int","Prelude::ClientEasy", 2, argv[1] )); } arg2 = static_cast< int >(val2); res3 = SWIG_AsCharPtrAndSize(argv[2], &buf3, NULL, &alloc3); if (!SWIG_IsOK(res3)) { SWIG_exception_fail(SWIG_ArgError(res3), Ruby_Format_TypeError( "", "char const *","Prelude::ClientEasy", 3, argv[2] )); } arg3 = reinterpret_cast< char * >(buf3); res4 = SWIG_AsCharPtrAndSize(argv[3], &buf4, NULL, &alloc4); if (!SWIG_IsOK(res4)) { SWIG_exception_fail(SWIG_ArgError(res4), Ruby_Format_TypeError( "", "char const *","Prelude::ClientEasy", 4, argv[3] )); } arg4 = reinterpret_cast< char * >(buf4); res5 = SWIG_AsCharPtrAndSize(argv[4], &buf5, NULL, &alloc5); if (!SWIG_IsOK(res5)) { SWIG_exception_fail(SWIG_ArgError(res5), Ruby_Format_TypeError( "", "char const *","Prelude::ClientEasy", 5, argv[4] )); } arg5 = reinterpret_cast< char * >(buf5); try { result = (Prelude::ClientEasy *)new Prelude::ClientEasy((char const *)arg1,arg2,(char const *)arg3,(char const *)arg4,(char const *)arg5); DATA_PTR(self) = result; } catch(Prelude::PreludeError &_e) { rb_exc_raise(SWIG_Ruby_ExceptionType(SWIGTYPE_p_Prelude__PreludeError, SWIG_NewPointerObj((new Prelude::PreludeError(static_cast< const Prelude::PreludeError& >(_e))),SWIGTYPE_p_Prelude__PreludeError,SWIG_POINTER_OWN))); SWIG_fail; } if (alloc1 == SWIG_NEWOBJ) delete[] buf1; if (alloc3 == SWIG_NEWOBJ) delete[] buf3; if (alloc4 == SWIG_NEWOBJ) delete[] buf4; if (alloc5 == SWIG_NEWOBJ) delete[] buf5; return self; fail: if (alloc1 == SWIG_NEWOBJ) delete[] buf1; if (alloc3 == SWIG_NEWOBJ) delete[] buf3; if (alloc4 == SWIG_NEWOBJ) delete[] buf4; if (alloc5 == SWIG_NEWOBJ) delete[] buf5; return Qnil; } SWIGINTERN VALUE _wrap_new_ClientEasy__SWIG_2(int argc, VALUE *argv, VALUE self) { char *arg1 = (char *) 0 ; int arg2 ; char *arg3 = (char *) 0 ; char *arg4 = (char *) 0 ; int res1 ; char *buf1 = 0 ; int alloc1 = 0 ; int val2 ; int ecode2 = 0 ; int res3 ; char *buf3 = 0 ; int alloc3 = 0 ; int res4 ; char *buf4 = 0 ; int alloc4 = 0 ; Prelude::ClientEasy *result = 0 ; if ((argc < 4) || (argc > 4)) { rb_raise(rb_eArgError, "wrong # of arguments(%d for 4)",argc); SWIG_fail; } res1 = SWIG_AsCharPtrAndSize(argv[0], &buf1, NULL, &alloc1); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "char const *","Prelude::ClientEasy", 1, argv[0] )); } arg1 = reinterpret_cast< char * >(buf1); ecode2 = SWIG_AsVal_int(argv[1], &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "int","Prelude::ClientEasy", 2, argv[1] )); } arg2 = static_cast< int >(val2); res3 = SWIG_AsCharPtrAndSize(argv[2], &buf3, NULL, &alloc3); if (!SWIG_IsOK(res3)) { SWIG_exception_fail(SWIG_ArgError(res3), Ruby_Format_TypeError( "", "char const *","Prelude::ClientEasy", 3, argv[2] )); } arg3 = reinterpret_cast< char * >(buf3); res4 = SWIG_AsCharPtrAndSize(argv[3], &buf4, NULL, &alloc4); if (!SWIG_IsOK(res4)) { SWIG_exception_fail(SWIG_ArgError(res4), Ruby_Format_TypeError( "", "char const *","Prelude::ClientEasy", 4, argv[3] )); } arg4 = reinterpret_cast< char * >(buf4); try { result = (Prelude::ClientEasy *)new Prelude::ClientEasy((char const *)arg1,arg2,(char const *)arg3,(char const *)arg4); DATA_PTR(self) = result; } catch(Prelude::PreludeError &_e) { rb_exc_raise(SWIG_Ruby_ExceptionType(SWIGTYPE_p_Prelude__PreludeError, SWIG_NewPointerObj((new Prelude::PreludeError(static_cast< const Prelude::PreludeError& >(_e))),SWIGTYPE_p_Prelude__PreludeError,SWIG_POINTER_OWN))); SWIG_fail; } if (alloc1 == SWIG_NEWOBJ) delete[] buf1; if (alloc3 == SWIG_NEWOBJ) delete[] buf3; if (alloc4 == SWIG_NEWOBJ) delete[] buf4; return self; fail: if (alloc1 == SWIG_NEWOBJ) delete[] buf1; if (alloc3 == SWIG_NEWOBJ) delete[] buf3; if (alloc4 == SWIG_NEWOBJ) delete[] buf4; return Qnil; } SWIGINTERN VALUE _wrap_new_ClientEasy__SWIG_3(int argc, VALUE *argv, VALUE self) { char *arg1 = (char *) 0 ; int arg2 ; char *arg3 = (char *) 0 ; int res1 ; char *buf1 = 0 ; int alloc1 = 0 ; int val2 ; int ecode2 = 0 ; int res3 ; char *buf3 = 0 ; int alloc3 = 0 ; Prelude::ClientEasy *result = 0 ; if ((argc < 3) || (argc > 3)) { rb_raise(rb_eArgError, "wrong # of arguments(%d for 3)",argc); SWIG_fail; } res1 = SWIG_AsCharPtrAndSize(argv[0], &buf1, NULL, &alloc1); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "char const *","Prelude::ClientEasy", 1, argv[0] )); } arg1 = reinterpret_cast< char * >(buf1); ecode2 = SWIG_AsVal_int(argv[1], &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "int","Prelude::ClientEasy", 2, argv[1] )); } arg2 = static_cast< int >(val2); res3 = SWIG_AsCharPtrAndSize(argv[2], &buf3, NULL, &alloc3); if (!SWIG_IsOK(res3)) { SWIG_exception_fail(SWIG_ArgError(res3), Ruby_Format_TypeError( "", "char const *","Prelude::ClientEasy", 3, argv[2] )); } arg3 = reinterpret_cast< char * >(buf3); try { result = (Prelude::ClientEasy *)new Prelude::ClientEasy((char const *)arg1,arg2,(char const *)arg3); DATA_PTR(self) = result; } catch(Prelude::PreludeError &_e) { rb_exc_raise(SWIG_Ruby_ExceptionType(SWIGTYPE_p_Prelude__PreludeError, SWIG_NewPointerObj((new Prelude::PreludeError(static_cast< const Prelude::PreludeError& >(_e))),SWIGTYPE_p_Prelude__PreludeError,SWIG_POINTER_OWN))); SWIG_fail; } if (alloc1 == SWIG_NEWOBJ) delete[] buf1; if (alloc3 == SWIG_NEWOBJ) delete[] buf3; return self; fail: if (alloc1 == SWIG_NEWOBJ) delete[] buf1; if (alloc3 == SWIG_NEWOBJ) delete[] buf3; return Qnil; } SWIGINTERN VALUE _wrap_new_ClientEasy__SWIG_4(int argc, VALUE *argv, VALUE self) { char *arg1 = (char *) 0 ; int arg2 ; int res1 ; char *buf1 = 0 ; int alloc1 = 0 ; int val2 ; int ecode2 = 0 ; Prelude::ClientEasy *result = 0 ; if ((argc < 2) || (argc > 2)) { rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail; } res1 = SWIG_AsCharPtrAndSize(argv[0], &buf1, NULL, &alloc1); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "char const *","Prelude::ClientEasy", 1, argv[0] )); } arg1 = reinterpret_cast< char * >(buf1); ecode2 = SWIG_AsVal_int(argv[1], &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "int","Prelude::ClientEasy", 2, argv[1] )); } arg2 = static_cast< int >(val2); try { result = (Prelude::ClientEasy *)new Prelude::ClientEasy((char const *)arg1,arg2); DATA_PTR(self) = result; } catch(Prelude::PreludeError &_e) { rb_exc_raise(SWIG_Ruby_ExceptionType(SWIGTYPE_p_Prelude__PreludeError, SWIG_NewPointerObj((new Prelude::PreludeError(static_cast< const Prelude::PreludeError& >(_e))),SWIGTYPE_p_Prelude__PreludeError,SWIG_POINTER_OWN))); SWIG_fail; } if (alloc1 == SWIG_NEWOBJ) delete[] buf1; return self; fail: if (alloc1 == SWIG_NEWOBJ) delete[] buf1; return Qnil; } #ifdef HAVE_RB_DEFINE_ALLOC_FUNC SWIGINTERN VALUE _wrap_ClientEasy_allocate(VALUE self) { #else SWIGINTERN VALUE _wrap_ClientEasy_allocate(int argc, VALUE *argv, VALUE self) { #endif VALUE vresult = SWIG_NewClassInstance(self, SWIGTYPE_p_Prelude__ClientEasy); #ifndef HAVE_RB_DEFINE_ALLOC_FUNC rb_obj_call_init(vresult, argc, argv); #endif return vresult; } SWIGINTERN VALUE _wrap_new_ClientEasy__SWIG_5(int argc, VALUE *argv, VALUE self) { char *arg1 = (char *) 0 ; int res1 ; char *buf1 = 0 ; int alloc1 = 0 ; Prelude::ClientEasy *result = 0 ; if ((argc < 1) || (argc > 1)) { rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; } res1 = SWIG_AsCharPtrAndSize(argv[0], &buf1, NULL, &alloc1); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "char const *","Prelude::ClientEasy", 1, argv[0] )); } arg1 = reinterpret_cast< char * >(buf1); try { result = (Prelude::ClientEasy *)new Prelude::ClientEasy((char const *)arg1); DATA_PTR(self) = result; } catch(Prelude::PreludeError &_e) { rb_exc_raise(SWIG_Ruby_ExceptionType(SWIGTYPE_p_Prelude__PreludeError, SWIG_NewPointerObj((new Prelude::PreludeError(static_cast< const Prelude::PreludeError& >(_e))),SWIGTYPE_p_Prelude__PreludeError,SWIG_POINTER_OWN))); SWIG_fail; } if (alloc1 == SWIG_NEWOBJ) delete[] buf1; return self; fail: if (alloc1 == SWIG_NEWOBJ) delete[] buf1; return Qnil; } SWIGINTERN VALUE _wrap_new_ClientEasy(int nargs, VALUE *args, VALUE self) { int argc; VALUE argv[6]; int ii; argc = nargs; if (argc > 6) SWIG_fail; for (ii = 0; (ii < argc); ++ii) { argv[ii] = args[ii]; } if (argc == 1) { int _v; int res = SWIG_AsCharPtrAndSize(argv[0], 0, NULL, 0); _v = SWIG_CheckState(res); if (_v) { return _wrap_new_ClientEasy__SWIG_5(nargs, args, self); } } if (argc == 2) { int _v; int res = SWIG_AsCharPtrAndSize(argv[0], 0, NULL, 0); _v = SWIG_CheckState(res); if (_v) { { int res = SWIG_AsVal_int(argv[1], NULL); _v = SWIG_CheckState(res); } if (_v) { return _wrap_new_ClientEasy__SWIG_4(nargs, args, self); } } } if (argc == 3) { int _v; int res = SWIG_AsCharPtrAndSize(argv[0], 0, NULL, 0); _v = SWIG_CheckState(res); if (_v) { { int res = SWIG_AsVal_int(argv[1], NULL); _v = SWIG_CheckState(res); } if (_v) { int res = SWIG_AsCharPtrAndSize(argv[2], 0, NULL, 0); _v = SWIG_CheckState(res); if (_v) { return _wrap_new_ClientEasy__SWIG_3(nargs, args, self); } } } } if (argc == 4) { int _v; int res = SWIG_AsCharPtrAndSize(argv[0], 0, NULL, 0); _v = SWIG_CheckState(res); if (_v) { { int res = SWIG_AsVal_int(argv[1], NULL); _v = SWIG_CheckState(res); } if (_v) { int res = SWIG_AsCharPtrAndSize(argv[2], 0, NULL, 0); _v = SWIG_CheckState(res); if (_v) { int res = SWIG_AsCharPtrAndSize(argv[3], 0, NULL, 0); _v = SWIG_CheckState(res); if (_v) { return _wrap_new_ClientEasy__SWIG_2(nargs, args, self); } } } } } if (argc == 5) { int _v; int res = SWIG_AsCharPtrAndSize(argv[0], 0, NULL, 0); _v = SWIG_CheckState(res); if (_v) { { int res = SWIG_AsVal_int(argv[1], NULL); _v = SWIG_CheckState(res); } if (_v) { int res = SWIG_AsCharPtrAndSize(argv[2], 0, NULL, 0); _v = SWIG_CheckState(res); if (_v) { int res = SWIG_AsCharPtrAndSize(argv[3], 0, NULL, 0); _v = SWIG_CheckState(res); if (_v) { int res = SWIG_AsCharPtrAndSize(argv[4], 0, NULL, 0); _v = SWIG_CheckState(res); if (_v) { return _wrap_new_ClientEasy__SWIG_1(nargs, args, self); } } } } } } if (argc == 6) { int _v; int res = SWIG_AsCharPtrAndSize(argv[0], 0, NULL, 0); _v = SWIG_CheckState(res); if (_v) { { int res = SWIG_AsVal_int(argv[1], NULL); _v = SWIG_CheckState(res); } if (_v) { int res = SWIG_AsCharPtrAndSize(argv[2], 0, NULL, 0); _v = SWIG_CheckState(res); if (_v) { int res = SWIG_AsCharPtrAndSize(argv[3], 0, NULL, 0); _v = SWIG_CheckState(res); if (_v) { int res = SWIG_AsCharPtrAndSize(argv[4], 0, NULL, 0); _v = SWIG_CheckState(res); if (_v) { int res = SWIG_AsCharPtrAndSize(argv[5], 0, NULL, 0); _v = SWIG_CheckState(res); if (_v) { return _wrap_new_ClientEasy__SWIG_0(nargs, args, self); } } } } } } } fail: Ruby_Format_OverloadedError( argc, 6, "ClientEasy.new", " ClientEasy.new(char const *profile, int permission, char const *_model, char const *_class, char const *_manufacturer, char const *_version)\n" " ClientEasy.new(char const *profile, int permission, char const *_model, char const *_class, char const *_manufacturer)\n" " ClientEasy.new(char const *profile, int permission, char const *_model, char const *_class)\n" " ClientEasy.new(char const *profile, int permission, char const *_model)\n" " ClientEasy.new(char const *profile, int permission)\n" " ClientEasy.new(char const *profile)\n"); return Qnil; } SWIGINTERN void free_Prelude_ClientEasy(Prelude::ClientEasy *arg1) { delete arg1; } swig_class SwigClassIDMEFCriterion; #ifdef HAVE_RB_DEFINE_ALLOC_FUNC SWIGINTERN VALUE _wrap_IDMEFCriterion_allocate(VALUE self) { #else SWIGINTERN VALUE _wrap_IDMEFCriterion_allocate(int argc, VALUE *argv, VALUE self) { #endif VALUE vresult = SWIG_NewClassInstance(self, SWIGTYPE_p_Prelude__IDMEFCriterion); #ifndef HAVE_RB_DEFINE_ALLOC_FUNC rb_obj_call_init(vresult, argc, argv); #endif return vresult; } SWIGINTERN VALUE _wrap_new_IDMEFCriterion(int argc, VALUE *argv, VALUE self) { Prelude::IDMEFCriterion *result = 0 ; if ((argc < 0) || (argc > 0)) { rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; } result = (Prelude::IDMEFCriterion *)new Prelude::IDMEFCriterion(); DATA_PTR(self) = result; return self; fail: return Qnil; } SWIGINTERN void free_Prelude_IDMEFCriterion(Prelude::IDMEFCriterion *arg1) { delete arg1; } swig_class SwigClassIDMEFCriteria; SWIGINTERN void free_Prelude_IDMEFCriteria(Prelude::IDMEFCriteria *arg1) { delete arg1; } SWIGINTERN VALUE _wrap_new_IDMEFCriteria__SWIG_0(int argc, VALUE *argv, VALUE self) { Prelude::IDMEFCriteria *result = 0 ; if ((argc < 0) || (argc > 0)) { rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; } try { result = (Prelude::IDMEFCriteria *)new Prelude::IDMEFCriteria(); DATA_PTR(self) = result; } catch(Prelude::PreludeError &_e) { rb_exc_raise(SWIG_Ruby_ExceptionType(SWIGTYPE_p_Prelude__PreludeError, SWIG_NewPointerObj((new Prelude::PreludeError(static_cast< const Prelude::PreludeError& >(_e))),SWIGTYPE_p_Prelude__PreludeError,SWIG_POINTER_OWN))); SWIG_fail; } return self; fail: return Qnil; } SWIGINTERN VALUE _wrap_new_IDMEFCriteria__SWIG_1(int argc, VALUE *argv, VALUE self) { Prelude::IDMEFCriteria *arg1 = 0 ; void *argp1 ; int res1 = 0 ; Prelude::IDMEFCriteria *result = 0 ; if ((argc < 1) || (argc > 1)) { rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; } res1 = SWIG_ConvertPtr(argv[0], &argp1, SWIGTYPE_p_Prelude__IDMEFCriteria, 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Prelude::IDMEFCriteria const &","Prelude::IDMEFCriteria", 1, argv[0] )); } if (!argp1) { SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "Prelude::IDMEFCriteria const &","Prelude::IDMEFCriteria", 1, argv[0])); } arg1 = reinterpret_cast< Prelude::IDMEFCriteria * >(argp1); try { result = (Prelude::IDMEFCriteria *)new Prelude::IDMEFCriteria((Prelude::IDMEFCriteria const &)*arg1); DATA_PTR(self) = result; } catch(Prelude::PreludeError &_e) { rb_exc_raise(SWIG_Ruby_ExceptionType(SWIGTYPE_p_Prelude__PreludeError, SWIG_NewPointerObj((new Prelude::PreludeError(static_cast< const Prelude::PreludeError& >(_e))),SWIGTYPE_p_Prelude__PreludeError,SWIG_POINTER_OWN))); SWIG_fail; } return self; fail: return Qnil; } SWIGINTERN VALUE _wrap_new_IDMEFCriteria__SWIG_2(int argc, VALUE *argv, VALUE self) { char *arg1 = (char *) 0 ; int res1 ; char *buf1 = 0 ; int alloc1 = 0 ; Prelude::IDMEFCriteria *result = 0 ; if ((argc < 1) || (argc > 1)) { rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; } res1 = SWIG_AsCharPtrAndSize(argv[0], &buf1, NULL, &alloc1); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "char const *","Prelude::IDMEFCriteria", 1, argv[0] )); } arg1 = reinterpret_cast< char * >(buf1); try { result = (Prelude::IDMEFCriteria *)new Prelude::IDMEFCriteria((char const *)arg1); DATA_PTR(self) = result; } catch(Prelude::PreludeError &_e) { rb_exc_raise(SWIG_Ruby_ExceptionType(SWIGTYPE_p_Prelude__PreludeError, SWIG_NewPointerObj((new Prelude::PreludeError(static_cast< const Prelude::PreludeError& >(_e))),SWIGTYPE_p_Prelude__PreludeError,SWIG_POINTER_OWN))); SWIG_fail; } if (alloc1 == SWIG_NEWOBJ) delete[] buf1; return self; fail: if (alloc1 == SWIG_NEWOBJ) delete[] buf1; return Qnil; } SWIGINTERN VALUE _wrap_new_IDMEFCriteria__SWIG_3(int argc, VALUE *argv, VALUE self) { std::string *arg1 = 0 ; int res1 = SWIG_OLDOBJ ; Prelude::IDMEFCriteria *result = 0 ; if ((argc < 1) || (argc > 1)) { rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; } { std::string *ptr = (std::string *)0; res1 = SWIG_AsPtr_std_string(argv[0], &ptr); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "std::string const &","Prelude::IDMEFCriteria", 1, argv[0] )); } if (!ptr) { SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "std::string const &","Prelude::IDMEFCriteria", 1, argv[0])); } arg1 = ptr; } try { result = (Prelude::IDMEFCriteria *)new Prelude::IDMEFCriteria((std::string const &)*arg1); DATA_PTR(self) = result; } catch(Prelude::PreludeError &_e) { rb_exc_raise(SWIG_Ruby_ExceptionType(SWIGTYPE_p_Prelude__PreludeError, SWIG_NewPointerObj((new Prelude::PreludeError(static_cast< const Prelude::PreludeError& >(_e))),SWIGTYPE_p_Prelude__PreludeError,SWIG_POINTER_OWN))); SWIG_fail; } if (SWIG_IsNewObj(res1)) delete arg1; return self; fail: if (SWIG_IsNewObj(res1)) delete arg1; return Qnil; } #ifdef HAVE_RB_DEFINE_ALLOC_FUNC SWIGINTERN VALUE _wrap_IDMEFCriteria_allocate(VALUE self) { #else SWIGINTERN VALUE _wrap_IDMEFCriteria_allocate(int argc, VALUE *argv, VALUE self) { #endif VALUE vresult = SWIG_NewClassInstance(self, SWIGTYPE_p_Prelude__IDMEFCriteria); #ifndef HAVE_RB_DEFINE_ALLOC_FUNC rb_obj_call_init(vresult, argc, argv); #endif return vresult; } SWIGINTERN VALUE _wrap_new_IDMEFCriteria__SWIG_4(int argc, VALUE *argv, VALUE self) { idmef_criteria_t *arg1 = (idmef_criteria_t *) 0 ; void *argp1 = 0 ; int res1 = 0 ; Prelude::IDMEFCriteria *result = 0 ; if ((argc < 1) || (argc > 1)) { rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; } res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_idmef_criteria_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "idmef_criteria_t *","Prelude::IDMEFCriteria", 1, argv[0] )); } arg1 = reinterpret_cast< idmef_criteria_t * >(argp1); try { result = (Prelude::IDMEFCriteria *)new Prelude::IDMEFCriteria(arg1); DATA_PTR(self) = result; } catch(Prelude::PreludeError &_e) { rb_exc_raise(SWIG_Ruby_ExceptionType(SWIGTYPE_p_Prelude__PreludeError, SWIG_NewPointerObj((new Prelude::PreludeError(static_cast< const Prelude::PreludeError& >(_e))),SWIGTYPE_p_Prelude__PreludeError,SWIG_POINTER_OWN))); SWIG_fail; } return self; fail: return Qnil; } SWIGINTERN VALUE _wrap_new_IDMEFCriteria(int nargs, VALUE *args, VALUE self) { int argc; VALUE argv[1]; int ii; argc = nargs; if (argc > 1) SWIG_fail; for (ii = 0; (ii < argc); ++ii) { argv[ii] = args[ii]; } if (argc == 0) { return _wrap_new_IDMEFCriteria__SWIG_0(nargs, args, self); } if (argc == 1) { int _v; void *vptr = 0; int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_Prelude__IDMEFCriteria, 0); _v = SWIG_CheckState(res); if (_v) { return _wrap_new_IDMEFCriteria__SWIG_1(nargs, args, self); } } if (argc == 1) { int _v; void *vptr = 0; int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_idmef_criteria_t, 0); _v = SWIG_CheckState(res); if (_v) { return _wrap_new_IDMEFCriteria__SWIG_4(nargs, args, self); } } if (argc == 1) { int _v; int res = SWIG_AsPtr_std_string(argv[0], (std::string**)(0)); _v = SWIG_CheckState(res); if (_v) { return _wrap_new_IDMEFCriteria__SWIG_3(nargs, args, self); } } if (argc == 1) { int _v; int res = SWIG_AsCharPtrAndSize(argv[0], 0, NULL, 0); _v = SWIG_CheckState(res); if (_v) { return _wrap_new_IDMEFCriteria__SWIG_2(nargs, args, self); } } fail: Ruby_Format_OverloadedError( argc, 1, "IDMEFCriteria.new", " IDMEFCriteria.new()\n" " IDMEFCriteria.new(Prelude::IDMEFCriteria const &criteria)\n" " IDMEFCriteria.new(char const *criteria)\n" " IDMEFCriteria.new(std::string const &criteria)\n" " IDMEFCriteria.new(idmef_criteria_t *criteria)\n"); return Qnil; } SWIGINTERN VALUE _wrap_IDMEFCriteria_Match(int argc, VALUE *argv, VALUE self) { Prelude::IDMEFCriteria *arg1 = (Prelude::IDMEFCriteria *) 0 ; Prelude::IDMEF *arg2 = (Prelude::IDMEF *) 0 ; void *argp1 = 0 ; int res1 = 0 ; void *argp2 = 0 ; int res2 = 0 ; int result; VALUE vresult = Qnil; if ((argc < 1) || (argc > 1)) { rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; } res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Prelude__IDMEFCriteria, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Prelude::IDMEFCriteria *","Match", 1, self )); } arg1 = reinterpret_cast< Prelude::IDMEFCriteria * >(argp1); res2 = SWIG_ConvertPtr(argv[0], &argp2,SWIGTYPE_p_Prelude__IDMEF, 0 | 0 ); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "Prelude::IDMEF *","Match", 2, argv[0] )); } arg2 = reinterpret_cast< Prelude::IDMEF * >(argp2); try { result = (int)(arg1)->Match(arg2); } catch(Prelude::PreludeError &_e) { rb_exc_raise(SWIG_Ruby_ExceptionType(SWIGTYPE_p_Prelude__PreludeError, SWIG_NewPointerObj((new Prelude::PreludeError(static_cast< const Prelude::PreludeError& >(_e))),SWIGTYPE_p_Prelude__PreludeError,SWIG_POINTER_OWN))); SWIG_fail; } vresult = SWIG_From_int(static_cast< int >(result)); return vresult; fail: return Qnil; } SWIGINTERN VALUE _wrap_IDMEFCriteria_Clone(int argc, VALUE *argv, VALUE self) { Prelude::IDMEFCriteria *arg1 = (Prelude::IDMEFCriteria *) 0 ; void *argp1 = 0 ; int res1 = 0 ; Prelude::IDMEFCriteria result; VALUE vresult = Qnil; if ((argc < 0) || (argc > 0)) { rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; } res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Prelude__IDMEFCriteria, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Prelude::IDMEFCriteria *","Clone", 1, self )); } arg1 = reinterpret_cast< Prelude::IDMEFCriteria * >(argp1); try { result = (arg1)->Clone(); } catch(Prelude::PreludeError &_e) { rb_exc_raise(SWIG_Ruby_ExceptionType(SWIGTYPE_p_Prelude__PreludeError, SWIG_NewPointerObj((new Prelude::PreludeError(static_cast< const Prelude::PreludeError& >(_e))),SWIGTYPE_p_Prelude__PreludeError,SWIG_POINTER_OWN))); SWIG_fail; } vresult = SWIG_NewPointerObj((new Prelude::IDMEFCriteria(static_cast< const Prelude::IDMEFCriteria& >(result))), SWIGTYPE_p_Prelude__IDMEFCriteria, SWIG_POINTER_OWN | 0 ); return vresult; fail: return Qnil; } SWIGINTERN VALUE _wrap_IDMEFCriteria_ANDCriteria(int argc, VALUE *argv, VALUE self) { Prelude::IDMEFCriteria *arg1 = (Prelude::IDMEFCriteria *) 0 ; Prelude::IDMEFCriteria *arg2 = 0 ; void *argp1 = 0 ; int res1 = 0 ; void *argp2 ; int res2 = 0 ; if ((argc < 1) || (argc > 1)) { rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; } res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Prelude__IDMEFCriteria, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Prelude::IDMEFCriteria *","ANDCriteria", 1, self )); } arg1 = reinterpret_cast< Prelude::IDMEFCriteria * >(argp1); res2 = SWIG_ConvertPtr(argv[0], &argp2, SWIGTYPE_p_Prelude__IDMEFCriteria, 0 ); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "Prelude::IDMEFCriteria const &","ANDCriteria", 2, argv[0] )); } if (!argp2) { SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "Prelude::IDMEFCriteria const &","ANDCriteria", 2, argv[0])); } arg2 = reinterpret_cast< Prelude::IDMEFCriteria * >(argp2); try { (arg1)->ANDCriteria((Prelude::IDMEFCriteria const &)*arg2); } catch(Prelude::PreludeError &_e) { rb_exc_raise(SWIG_Ruby_ExceptionType(SWIGTYPE_p_Prelude__PreludeError, SWIG_NewPointerObj((new Prelude::PreludeError(static_cast< const Prelude::PreludeError& >(_e))),SWIGTYPE_p_Prelude__PreludeError,SWIG_POINTER_OWN))); SWIG_fail; } return Qnil; fail: return Qnil; } SWIGINTERN VALUE _wrap_IDMEFCriteria_ORCriteria(int argc, VALUE *argv, VALUE self) { Prelude::IDMEFCriteria *arg1 = (Prelude::IDMEFCriteria *) 0 ; Prelude::IDMEFCriteria *arg2 = 0 ; void *argp1 = 0 ; int res1 = 0 ; void *argp2 ; int res2 = 0 ; if ((argc < 1) || (argc > 1)) { rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; } res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Prelude__IDMEFCriteria, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Prelude::IDMEFCriteria *","ORCriteria", 1, self )); } arg1 = reinterpret_cast< Prelude::IDMEFCriteria * >(argp1); res2 = SWIG_ConvertPtr(argv[0], &argp2, SWIGTYPE_p_Prelude__IDMEFCriteria, 0 ); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "Prelude::IDMEFCriteria const &","ORCriteria", 2, argv[0] )); } if (!argp2) { SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "Prelude::IDMEFCriteria const &","ORCriteria", 2, argv[0])); } arg2 = reinterpret_cast< Prelude::IDMEFCriteria * >(argp2); try { (arg1)->ORCriteria((Prelude::IDMEFCriteria const &)*arg2); } catch(Prelude::PreludeError &_e) { rb_exc_raise(SWIG_Ruby_ExceptionType(SWIGTYPE_p_Prelude__PreludeError, SWIG_NewPointerObj((new Prelude::PreludeError(static_cast< const Prelude::PreludeError& >(_e))),SWIGTYPE_p_Prelude__PreludeError,SWIG_POINTER_OWN))); SWIG_fail; } return Qnil; fail: return Qnil; } SWIGINTERN VALUE _wrap_IDMEFCriteria_ToString(int argc, VALUE *argv, VALUE self) { Prelude::IDMEFCriteria *arg1 = (Prelude::IDMEFCriteria *) 0 ; void *argp1 = 0 ; int res1 = 0 ; std::string result; VALUE vresult = Qnil; if ((argc < 0) || (argc > 0)) { rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; } res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Prelude__IDMEFCriteria, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Prelude::IDMEFCriteria const *","ToString", 1, self )); } arg1 = reinterpret_cast< Prelude::IDMEFCriteria * >(argp1); try { result = ((Prelude::IDMEFCriteria const *)arg1)->ToString(); } catch(Prelude::PreludeError &_e) { rb_exc_raise(SWIG_Ruby_ExceptionType(SWIGTYPE_p_Prelude__PreludeError, SWIG_NewPointerObj((new Prelude::PreludeError(static_cast< const Prelude::PreludeError& >(_e))),SWIGTYPE_p_Prelude__PreludeError,SWIG_POINTER_OWN))); SWIG_fail; } vresult = SWIG_From_std_string(static_cast< std::string >(result)); return vresult; fail: return Qnil; } SWIGINTERN VALUE _wrap_IDMEFCriteria___str__(int argc, VALUE *argv, VALUE self) { Prelude::IDMEFCriteria *arg1 = (Prelude::IDMEFCriteria *) 0 ; void *argp1 = 0 ; int res1 = 0 ; std::string result; VALUE vresult = Qnil; if ((argc < 0) || (argc > 0)) { rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; } res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Prelude__IDMEFCriteria, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Prelude::IDMEFCriteria const *","operator const std::string", 1, self )); } arg1 = reinterpret_cast< Prelude::IDMEFCriteria * >(argp1); try { result = ((Prelude::IDMEFCriteria const *)arg1)->operator const std::string(); } catch(Prelude::PreludeError &_e) { rb_exc_raise(SWIG_Ruby_ExceptionType(SWIGTYPE_p_Prelude__PreludeError, SWIG_NewPointerObj((new Prelude::PreludeError(static_cast< const Prelude::PreludeError& >(_e))),SWIGTYPE_p_Prelude__PreludeError,SWIG_POINTER_OWN))); SWIG_fail; } vresult = SWIG_From_std_string(static_cast< std::string >(result)); return vresult; fail: return Qnil; } swig_class SwigClassIDMEFValue; SWIGINTERN VALUE _wrap_IDMEFValue_GetType(int argc, VALUE *argv, VALUE self) { Prelude::IDMEFValue *arg1 = (Prelude::IDMEFValue *) 0 ; void *argp1 = 0 ; int res1 = 0 ; idmef_value_type_id_t result; VALUE vresult = Qnil; if ((argc < 0) || (argc > 0)) { rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; } res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Prelude__IDMEFValue, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Prelude::IDMEFValue const *","GetType", 1, self )); } arg1 = reinterpret_cast< Prelude::IDMEFValue * >(argp1); try { result = ((Prelude::IDMEFValue const *)arg1)->GetType(); } catch(Prelude::PreludeError &_e) { rb_exc_raise(SWIG_Ruby_ExceptionType(SWIGTYPE_p_Prelude__PreludeError, SWIG_NewPointerObj((new Prelude::PreludeError(static_cast< const Prelude::PreludeError& >(_e))),SWIGTYPE_p_Prelude__PreludeError,SWIG_POINTER_OWN))); SWIG_fail; } vresult = SWIG_NewPointerObj((new idmef_value_type_id_t(static_cast< const idmef_value_type_id_t& >(result))), SWIGTYPE_p_idmef_value_type_id_t, SWIG_POINTER_OWN | 0 ); return vresult; fail: return Qnil; } SWIGINTERN VALUE _wrap_IDMEFValue_IsNull(int argc, VALUE *argv, VALUE self) { Prelude::IDMEFValue *arg1 = (Prelude::IDMEFValue *) 0 ; void *argp1 = 0 ; int res1 = 0 ; bool result; VALUE vresult = Qnil; if ((argc < 0) || (argc > 0)) { rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; } res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Prelude__IDMEFValue, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Prelude::IDMEFValue const *","IsNull", 1, self )); } arg1 = reinterpret_cast< Prelude::IDMEFValue * >(argp1); try { result = (bool)((Prelude::IDMEFValue const *)arg1)->IsNull(); } catch(Prelude::PreludeError &_e) { rb_exc_raise(SWIG_Ruby_ExceptionType(SWIGTYPE_p_Prelude__PreludeError, SWIG_NewPointerObj((new Prelude::PreludeError(static_cast< const Prelude::PreludeError& >(_e))),SWIGTYPE_p_Prelude__PreludeError,SWIG_POINTER_OWN))); SWIG_fail; } vresult = SWIG_From_bool(static_cast< bool >(result)); return vresult; fail: return Qnil; } SWIGINTERN VALUE _wrap_new_IDMEFValue__SWIG_0(int argc, VALUE *argv, VALUE self) { Prelude::IDMEFValue *result = 0 ; if ((argc < 0) || (argc > 0)) { rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; } try { result = (Prelude::IDMEFValue *)new Prelude::IDMEFValue(); DATA_PTR(self) = result; } catch(Prelude::PreludeError &_e) { rb_exc_raise(SWIG_Ruby_ExceptionType(SWIGTYPE_p_Prelude__PreludeError, SWIG_NewPointerObj((new Prelude::PreludeError(static_cast< const Prelude::PreludeError& >(_e))),SWIGTYPE_p_Prelude__PreludeError,SWIG_POINTER_OWN))); SWIG_fail; } return self; fail: return Qnil; } SWIGINTERN void free_Prelude_IDMEFValue(Prelude::IDMEFValue *arg1) { delete arg1; } SWIGINTERN VALUE _wrap_new_IDMEFValue__SWIG_1(int argc, VALUE *argv, VALUE self) { Prelude::IDMEFValue *arg1 = 0 ; void *argp1 ; int res1 = 0 ; Prelude::IDMEFValue *result = 0 ; if ((argc < 1) || (argc > 1)) { rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; } res1 = SWIG_ConvertPtr(argv[0], &argp1, SWIGTYPE_p_Prelude__IDMEFValue, 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Prelude::IDMEFValue const &","Prelude::IDMEFValue", 1, argv[0] )); } if (!argp1) { SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "Prelude::IDMEFValue const &","Prelude::IDMEFValue", 1, argv[0])); } arg1 = reinterpret_cast< Prelude::IDMEFValue * >(argp1); try { result = (Prelude::IDMEFValue *)new Prelude::IDMEFValue((Prelude::IDMEFValue const &)*arg1); DATA_PTR(self) = result; } catch(Prelude::PreludeError &_e) { rb_exc_raise(SWIG_Ruby_ExceptionType(SWIGTYPE_p_Prelude__PreludeError, SWIG_NewPointerObj((new Prelude::PreludeError(static_cast< const Prelude::PreludeError& >(_e))),SWIGTYPE_p_Prelude__PreludeError,SWIG_POINTER_OWN))); SWIG_fail; } return self; fail: return Qnil; } SWIGINTERN VALUE _wrap_new_IDMEFValue__SWIG_2(int argc, VALUE *argv, VALUE self) { std::vector< Prelude::IDMEFValue,std::allocator< Prelude::IDMEFValue > > arg1 ; Prelude::IDMEFValue *result = 0 ; if ((argc < 1) || (argc > 1)) { rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; } { std::vector > *ptr = (std::vector > *)0; int res = swig::asptr(argv[0], &ptr); if (!SWIG_IsOK(res) || !ptr) { SWIG_exception_fail(SWIG_ArgError((ptr ? res : SWIG_TypeError)), Ruby_Format_TypeError( "", "std::vector< Prelude::IDMEFValue,std::allocator< Prelude::IDMEFValue > >","Prelude::IDMEFValue", 1, argv[0] )); } arg1 = *ptr; if (SWIG_IsNewObj(res)) delete ptr; } try { result = (Prelude::IDMEFValue *)new Prelude::IDMEFValue(arg1); DATA_PTR(self) = result; } catch(Prelude::PreludeError &_e) { rb_exc_raise(SWIG_Ruby_ExceptionType(SWIGTYPE_p_Prelude__PreludeError, SWIG_NewPointerObj((new Prelude::PreludeError(static_cast< const Prelude::PreludeError& >(_e))),SWIGTYPE_p_Prelude__PreludeError,SWIG_POINTER_OWN))); SWIG_fail; } return self; fail: return Qnil; } SWIGINTERN VALUE _wrap_new_IDMEFValue__SWIG_3(int argc, VALUE *argv, VALUE self) { idmef_value_t *arg1 = (idmef_value_t *) 0 ; void *argp1 = 0 ; int res1 = 0 ; Prelude::IDMEFValue *result = 0 ; if ((argc < 1) || (argc > 1)) { rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; } res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_idmef_value_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "idmef_value_t *","Prelude::IDMEFValue", 1, argv[0] )); } arg1 = reinterpret_cast< idmef_value_t * >(argp1); try { result = (Prelude::IDMEFValue *)new Prelude::IDMEFValue(arg1); DATA_PTR(self) = result; } catch(Prelude::PreludeError &_e) { rb_exc_raise(SWIG_Ruby_ExceptionType(SWIGTYPE_p_Prelude__PreludeError, SWIG_NewPointerObj((new Prelude::PreludeError(static_cast< const Prelude::PreludeError& >(_e))),SWIGTYPE_p_Prelude__PreludeError,SWIG_POINTER_OWN))); SWIG_fail; } return self; fail: return Qnil; } SWIGINTERN VALUE _wrap_new_IDMEFValue__SWIG_4(int argc, VALUE *argv, VALUE self) { std::string arg1 ; Prelude::IDMEFValue *result = 0 ; if ((argc < 1) || (argc > 1)) { rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; } { std::string *ptr = (std::string *)0; int res = SWIG_AsPtr_std_string(argv[0], &ptr); if (!SWIG_IsOK(res) || !ptr) { SWIG_exception_fail(SWIG_ArgError((ptr ? res : SWIG_TypeError)), Ruby_Format_TypeError( "", "std::string","Prelude::IDMEFValue", 1, argv[0] )); } arg1 = *ptr; if (SWIG_IsNewObj(res)) delete ptr; } try { result = (Prelude::IDMEFValue *)new Prelude::IDMEFValue(arg1); DATA_PTR(self) = result; } catch(Prelude::PreludeError &_e) { rb_exc_raise(SWIG_Ruby_ExceptionType(SWIGTYPE_p_Prelude__PreludeError, SWIG_NewPointerObj((new Prelude::PreludeError(static_cast< const Prelude::PreludeError& >(_e))),SWIGTYPE_p_Prelude__PreludeError,SWIG_POINTER_OWN))); SWIG_fail; } return self; fail: return Qnil; } SWIGINTERN VALUE _wrap_new_IDMEFValue__SWIG_5(int argc, VALUE *argv, VALUE self) { char *arg1 = (char *) 0 ; int res1 ; char *buf1 = 0 ; int alloc1 = 0 ; Prelude::IDMEFValue *result = 0 ; if ((argc < 1) || (argc > 1)) { rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; } res1 = SWIG_AsCharPtrAndSize(argv[0], &buf1, NULL, &alloc1); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "char const *","Prelude::IDMEFValue", 1, argv[0] )); } arg1 = reinterpret_cast< char * >(buf1); try { result = (Prelude::IDMEFValue *)new Prelude::IDMEFValue((char const *)arg1); DATA_PTR(self) = result; } catch(Prelude::PreludeError &_e) { rb_exc_raise(SWIG_Ruby_ExceptionType(SWIGTYPE_p_Prelude__PreludeError, SWIG_NewPointerObj((new Prelude::PreludeError(static_cast< const Prelude::PreludeError& >(_e))),SWIGTYPE_p_Prelude__PreludeError,SWIG_POINTER_OWN))); SWIG_fail; } if (alloc1 == SWIG_NEWOBJ) delete[] buf1; return self; fail: if (alloc1 == SWIG_NEWOBJ) delete[] buf1; return Qnil; } SWIGINTERN VALUE _wrap_new_IDMEFValue__SWIG_6(int argc, VALUE *argv, VALUE self) { int8_t arg1 ; char val1 ; int ecode1 = 0 ; Prelude::IDMEFValue *result = 0 ; if ((argc < 1) || (argc > 1)) { rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; } ecode1 = SWIG_AsVal_char(argv[0], &val1); if (!SWIG_IsOK(ecode1)) { SWIG_exception_fail(SWIG_ArgError(ecode1), Ruby_Format_TypeError( "", "int8_t","Prelude::IDMEFValue", 1, argv[0] )); } arg1 = static_cast< int8_t >(val1); try { result = (Prelude::IDMEFValue *)new Prelude::IDMEFValue(arg1); DATA_PTR(self) = result; } catch(Prelude::PreludeError &_e) { rb_exc_raise(SWIG_Ruby_ExceptionType(SWIGTYPE_p_Prelude__PreludeError, SWIG_NewPointerObj((new Prelude::PreludeError(static_cast< const Prelude::PreludeError& >(_e))),SWIGTYPE_p_Prelude__PreludeError,SWIG_POINTER_OWN))); SWIG_fail; } return self; fail: return Qnil; } SWIGINTERN VALUE _wrap_new_IDMEFValue__SWIG_7(int argc, VALUE *argv, VALUE self) { uint8_t arg1 ; unsigned char val1 ; int ecode1 = 0 ; Prelude::IDMEFValue *result = 0 ; if ((argc < 1) || (argc > 1)) { rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; } ecode1 = SWIG_AsVal_unsigned_SS_char(argv[0], &val1); if (!SWIG_IsOK(ecode1)) { SWIG_exception_fail(SWIG_ArgError(ecode1), Ruby_Format_TypeError( "", "uint8_t","Prelude::IDMEFValue", 1, argv[0] )); } arg1 = static_cast< uint8_t >(val1); try { result = (Prelude::IDMEFValue *)new Prelude::IDMEFValue(arg1); DATA_PTR(self) = result; } catch(Prelude::PreludeError &_e) { rb_exc_raise(SWIG_Ruby_ExceptionType(SWIGTYPE_p_Prelude__PreludeError, SWIG_NewPointerObj((new Prelude::PreludeError(static_cast< const Prelude::PreludeError& >(_e))),SWIGTYPE_p_Prelude__PreludeError,SWIG_POINTER_OWN))); SWIG_fail; } return self; fail: return Qnil; } SWIGINTERN VALUE _wrap_new_IDMEFValue__SWIG_8(int argc, VALUE *argv, VALUE self) { int16_t arg1 ; short val1 ; int ecode1 = 0 ; Prelude::IDMEFValue *result = 0 ; if ((argc < 1) || (argc > 1)) { rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; } ecode1 = SWIG_AsVal_short(argv[0], &val1); if (!SWIG_IsOK(ecode1)) { SWIG_exception_fail(SWIG_ArgError(ecode1), Ruby_Format_TypeError( "", "int16_t","Prelude::IDMEFValue", 1, argv[0] )); } arg1 = static_cast< int16_t >(val1); try { result = (Prelude::IDMEFValue *)new Prelude::IDMEFValue(arg1); DATA_PTR(self) = result; } catch(Prelude::PreludeError &_e) { rb_exc_raise(SWIG_Ruby_ExceptionType(SWIGTYPE_p_Prelude__PreludeError, SWIG_NewPointerObj((new Prelude::PreludeError(static_cast< const Prelude::PreludeError& >(_e))),SWIGTYPE_p_Prelude__PreludeError,SWIG_POINTER_OWN))); SWIG_fail; } return self; fail: return Qnil; } SWIGINTERN VALUE _wrap_new_IDMEFValue__SWIG_9(int argc, VALUE *argv, VALUE self) { uint16_t arg1 ; unsigned short val1 ; int ecode1 = 0 ; Prelude::IDMEFValue *result = 0 ; if ((argc < 1) || (argc > 1)) { rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; } ecode1 = SWIG_AsVal_unsigned_SS_short(argv[0], &val1); if (!SWIG_IsOK(ecode1)) { SWIG_exception_fail(SWIG_ArgError(ecode1), Ruby_Format_TypeError( "", "uint16_t","Prelude::IDMEFValue", 1, argv[0] )); } arg1 = static_cast< uint16_t >(val1); try { result = (Prelude::IDMEFValue *)new Prelude::IDMEFValue(arg1); DATA_PTR(self) = result; } catch(Prelude::PreludeError &_e) { rb_exc_raise(SWIG_Ruby_ExceptionType(SWIGTYPE_p_Prelude__PreludeError, SWIG_NewPointerObj((new Prelude::PreludeError(static_cast< const Prelude::PreludeError& >(_e))),SWIGTYPE_p_Prelude__PreludeError,SWIG_POINTER_OWN))); SWIG_fail; } return self; fail: return Qnil; } SWIGINTERN VALUE _wrap_new_IDMEFValue__SWIG_10(int argc, VALUE *argv, VALUE self) { int32_t arg1 ; int val1 ; int ecode1 = 0 ; Prelude::IDMEFValue *result = 0 ; if ((argc < 1) || (argc > 1)) { rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; } ecode1 = SWIG_AsVal_int(argv[0], &val1); if (!SWIG_IsOK(ecode1)) { SWIG_exception_fail(SWIG_ArgError(ecode1), Ruby_Format_TypeError( "", "int32_t","Prelude::IDMEFValue", 1, argv[0] )); } arg1 = static_cast< int32_t >(val1); try { result = (Prelude::IDMEFValue *)new Prelude::IDMEFValue(arg1); DATA_PTR(self) = result; } catch(Prelude::PreludeError &_e) { rb_exc_raise(SWIG_Ruby_ExceptionType(SWIGTYPE_p_Prelude__PreludeError, SWIG_NewPointerObj((new Prelude::PreludeError(static_cast< const Prelude::PreludeError& >(_e))),SWIGTYPE_p_Prelude__PreludeError,SWIG_POINTER_OWN))); SWIG_fail; } return self; fail: return Qnil; } SWIGINTERN VALUE _wrap_new_IDMEFValue__SWIG_11(int argc, VALUE *argv, VALUE self) { uint32_t arg1 ; unsigned int val1 ; int ecode1 = 0 ; Prelude::IDMEFValue *result = 0 ; if ((argc < 1) || (argc > 1)) { rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; } ecode1 = SWIG_AsVal_unsigned_SS_int(argv[0], &val1); if (!SWIG_IsOK(ecode1)) { SWIG_exception_fail(SWIG_ArgError(ecode1), Ruby_Format_TypeError( "", "uint32_t","Prelude::IDMEFValue", 1, argv[0] )); } arg1 = static_cast< uint32_t >(val1); try { result = (Prelude::IDMEFValue *)new Prelude::IDMEFValue(arg1); DATA_PTR(self) = result; } catch(Prelude::PreludeError &_e) { rb_exc_raise(SWIG_Ruby_ExceptionType(SWIGTYPE_p_Prelude__PreludeError, SWIG_NewPointerObj((new Prelude::PreludeError(static_cast< const Prelude::PreludeError& >(_e))),SWIGTYPE_p_Prelude__PreludeError,SWIG_POINTER_OWN))); SWIG_fail; } return self; fail: return Qnil; } SWIGINTERN VALUE _wrap_new_IDMEFValue__SWIG_12(int argc, VALUE *argv, VALUE self) { int64_t arg1 ; long long val1 ; int ecode1 = 0 ; Prelude::IDMEFValue *result = 0 ; if ((argc < 1) || (argc > 1)) { rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; } ecode1 = SWIG_AsVal_long_SS_long(argv[0], &val1); if (!SWIG_IsOK(ecode1)) { SWIG_exception_fail(SWIG_ArgError(ecode1), Ruby_Format_TypeError( "", "int64_t","Prelude::IDMEFValue", 1, argv[0] )); } arg1 = static_cast< int64_t >(val1); try { result = (Prelude::IDMEFValue *)new Prelude::IDMEFValue(arg1); DATA_PTR(self) = result; } catch(Prelude::PreludeError &_e) { rb_exc_raise(SWIG_Ruby_ExceptionType(SWIGTYPE_p_Prelude__PreludeError, SWIG_NewPointerObj((new Prelude::PreludeError(static_cast< const Prelude::PreludeError& >(_e))),SWIGTYPE_p_Prelude__PreludeError,SWIG_POINTER_OWN))); SWIG_fail; } return self; fail: return Qnil; } SWIGINTERN VALUE _wrap_new_IDMEFValue__SWIG_13(int argc, VALUE *argv, VALUE self) { uint64_t arg1 ; unsigned long long val1 ; int ecode1 = 0 ; Prelude::IDMEFValue *result = 0 ; if ((argc < 1) || (argc > 1)) { rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; } ecode1 = SWIG_AsVal_unsigned_SS_long_SS_long(argv[0], &val1); if (!SWIG_IsOK(ecode1)) { SWIG_exception_fail(SWIG_ArgError(ecode1), Ruby_Format_TypeError( "", "uint64_t","Prelude::IDMEFValue", 1, argv[0] )); } arg1 = static_cast< uint64_t >(val1); try { result = (Prelude::IDMEFValue *)new Prelude::IDMEFValue(arg1); DATA_PTR(self) = result; } catch(Prelude::PreludeError &_e) { rb_exc_raise(SWIG_Ruby_ExceptionType(SWIGTYPE_p_Prelude__PreludeError, SWIG_NewPointerObj((new Prelude::PreludeError(static_cast< const Prelude::PreludeError& >(_e))),SWIGTYPE_p_Prelude__PreludeError,SWIG_POINTER_OWN))); SWIG_fail; } return self; fail: return Qnil; } SWIGINTERN VALUE _wrap_new_IDMEFValue__SWIG_14(int argc, VALUE *argv, VALUE self) { float arg1 ; float val1 ; int ecode1 = 0 ; Prelude::IDMEFValue *result = 0 ; if ((argc < 1) || (argc > 1)) { rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; } ecode1 = SWIG_AsVal_float(argv[0], &val1); if (!SWIG_IsOK(ecode1)) { SWIG_exception_fail(SWIG_ArgError(ecode1), Ruby_Format_TypeError( "", "float","Prelude::IDMEFValue", 1, argv[0] )); } arg1 = static_cast< float >(val1); try { result = (Prelude::IDMEFValue *)new Prelude::IDMEFValue(arg1); DATA_PTR(self) = result; } catch(Prelude::PreludeError &_e) { rb_exc_raise(SWIG_Ruby_ExceptionType(SWIGTYPE_p_Prelude__PreludeError, SWIG_NewPointerObj((new Prelude::PreludeError(static_cast< const Prelude::PreludeError& >(_e))),SWIGTYPE_p_Prelude__PreludeError,SWIG_POINTER_OWN))); SWIG_fail; } return self; fail: return Qnil; } SWIGINTERN VALUE _wrap_new_IDMEFValue__SWIG_15(int argc, VALUE *argv, VALUE self) { double arg1 ; double val1 ; int ecode1 = 0 ; Prelude::IDMEFValue *result = 0 ; if ((argc < 1) || (argc > 1)) { rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; } ecode1 = SWIG_AsVal_double(argv[0], &val1); if (!SWIG_IsOK(ecode1)) { SWIG_exception_fail(SWIG_ArgError(ecode1), Ruby_Format_TypeError( "", "double","Prelude::IDMEFValue", 1, argv[0] )); } arg1 = static_cast< double >(val1); try { result = (Prelude::IDMEFValue *)new Prelude::IDMEFValue(arg1); DATA_PTR(self) = result; } catch(Prelude::PreludeError &_e) { rb_exc_raise(SWIG_Ruby_ExceptionType(SWIGTYPE_p_Prelude__PreludeError, SWIG_NewPointerObj((new Prelude::PreludeError(static_cast< const Prelude::PreludeError& >(_e))),SWIGTYPE_p_Prelude__PreludeError,SWIG_POINTER_OWN))); SWIG_fail; } return self; fail: return Qnil; } #ifdef HAVE_RB_DEFINE_ALLOC_FUNC SWIGINTERN VALUE _wrap_IDMEFValue_allocate(VALUE self) { #else SWIGINTERN VALUE _wrap_IDMEFValue_allocate(int argc, VALUE *argv, VALUE self) { #endif VALUE vresult = SWIG_NewClassInstance(self, SWIGTYPE_p_Prelude__IDMEFValue); #ifndef HAVE_RB_DEFINE_ALLOC_FUNC rb_obj_call_init(vresult, argc, argv); #endif return vresult; } SWIGINTERN VALUE _wrap_new_IDMEFValue__SWIG_16(int argc, VALUE *argv, VALUE self) { Prelude::IDMEFTime *arg1 = 0 ; void *argp1 = 0 ; int res1 = 0 ; Prelude::IDMEFValue *result = 0 ; if ((argc < 1) || (argc > 1)) { rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; } res1 = SWIG_ConvertPtr(argv[0], &argp1, SWIGTYPE_p_Prelude__IDMEFTime, 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Prelude::IDMEFTime &","Prelude::IDMEFValue", 1, argv[0] )); } if (!argp1) { SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "Prelude::IDMEFTime &","Prelude::IDMEFValue", 1, argv[0])); } arg1 = reinterpret_cast< Prelude::IDMEFTime * >(argp1); try { result = (Prelude::IDMEFValue *)new Prelude::IDMEFValue(*arg1); DATA_PTR(self) = result; } catch(Prelude::PreludeError &_e) { rb_exc_raise(SWIG_Ruby_ExceptionType(SWIGTYPE_p_Prelude__PreludeError, SWIG_NewPointerObj((new Prelude::PreludeError(static_cast< const Prelude::PreludeError& >(_e))),SWIGTYPE_p_Prelude__PreludeError,SWIG_POINTER_OWN))); SWIG_fail; } return self; fail: return Qnil; } SWIGINTERN VALUE _wrap_new_IDMEFValue(int nargs, VALUE *args, VALUE self) { int argc; VALUE argv[1]; int ii; argc = nargs; if (argc > 1) SWIG_fail; for (ii = 0; (ii < argc); ++ii) { argv[ii] = args[ii]; } if (argc == 0) { return _wrap_new_IDMEFValue__SWIG_0(nargs, args, self); } if (argc == 1) { int _v; void *vptr = 0; int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_Prelude__IDMEFValue, 0); _v = SWIG_CheckState(res); if (_v) { return _wrap_new_IDMEFValue__SWIG_1(nargs, args, self); } } if (argc == 1) { int _v; void *vptr = 0; int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_idmef_value_t, 0); _v = SWIG_CheckState(res); if (_v) { return _wrap_new_IDMEFValue__SWIG_3(nargs, args, self); } } if (argc == 1) { int _v; void *vptr = 0; int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_Prelude__IDMEFTime, 0); _v = SWIG_CheckState(res); if (_v) { return _wrap_new_IDMEFValue__SWIG_16(nargs, args, self); } } if (argc == 1) { int _v; { int res = SWIG_AsVal_unsigned_SS_char(argv[0], NULL); _v = SWIG_CheckState(res); } if (_v) { return _wrap_new_IDMEFValue__SWIG_7(nargs, args, self); } } if (argc == 1) { int _v; { int res = SWIG_AsVal_unsigned_SS_short(argv[0], NULL); _v = SWIG_CheckState(res); } if (_v) { return _wrap_new_IDMEFValue__SWIG_9(nargs, args, self); } } if (argc == 1) { int _v; { int res = SWIG_AsVal_short(argv[0], NULL); _v = SWIG_CheckState(res); } if (_v) { return _wrap_new_IDMEFValue__SWIG_8(nargs, args, self); } } if (argc == 1) { int _v; { int res = SWIG_AsVal_unsigned_SS_int(argv[0], NULL); _v = SWIG_CheckState(res); } if (_v) { return _wrap_new_IDMEFValue__SWIG_11(nargs, args, self); } } if (argc == 1) { int _v; { int res = SWIG_AsVal_int(argv[0], NULL); _v = SWIG_CheckState(res); } if (_v) { return _wrap_new_IDMEFValue__SWIG_10(nargs, args, self); } } if (argc == 1) { int _v; { int res = SWIG_AsVal_unsigned_SS_long_SS_long(argv[0], NULL); _v = SWIG_CheckState(res); } if (_v) { return _wrap_new_IDMEFValue__SWIG_13(nargs, args, self); } } if (argc == 1) { int _v; { int res = SWIG_AsVal_long_SS_long(argv[0], NULL); _v = SWIG_CheckState(res); } if (_v) { return _wrap_new_IDMEFValue__SWIG_12(nargs, args, self); } } if (argc == 1) { int _v; { int res = SWIG_AsVal_float(argv[0], NULL); _v = SWIG_CheckState(res); } if (_v) { return _wrap_new_IDMEFValue__SWIG_14(nargs, args, self); } } if (argc == 1) { int _v; { int res = SWIG_AsVal_double(argv[0], NULL); _v = SWIG_CheckState(res); } if (_v) { return _wrap_new_IDMEFValue__SWIG_15(nargs, args, self); } } if (argc == 1) { int _v; { int res = SWIG_AsVal_char(argv[0], NULL); _v = SWIG_CheckState(res); } if (_v) { return _wrap_new_IDMEFValue__SWIG_6(nargs, args, self); } } if (argc == 1) { int _v; int res = SWIG_AsPtr_std_string(argv[0], (std::string**)(0)); _v = SWIG_CheckState(res); if (_v) { return _wrap_new_IDMEFValue__SWIG_4(nargs, args, self); } } if (argc == 1) { int _v; int res = SWIG_AsCharPtrAndSize(argv[0], 0, NULL, 0); _v = SWIG_CheckState(res); if (_v) { return _wrap_new_IDMEFValue__SWIG_5(nargs, args, self); } } if (argc == 1) { int _v; int res = swig::asptr(argv[0], (std::vector >**)(0)); _v = SWIG_CheckState(res); if (_v) { return _wrap_new_IDMEFValue__SWIG_2(nargs, args, self); } } fail: Ruby_Format_OverloadedError( argc, 1, "IDMEFValue.new", " IDMEFValue.new()\n" " IDMEFValue.new(Prelude::IDMEFValue const &value)\n" " IDMEFValue.new(std::vector< Prelude::IDMEFValue,std::allocator< Prelude::IDMEFValue > > value)\n" " IDMEFValue.new(idmef_value_t *value)\n" " IDMEFValue.new(std::string value)\n" " IDMEFValue.new(char const *value)\n" " IDMEFValue.new(int8_t value)\n" " IDMEFValue.new(uint8_t value)\n" " IDMEFValue.new(int16_t value)\n" " IDMEFValue.new(uint16_t value)\n" " IDMEFValue.new(int32_t value)\n" " IDMEFValue.new(uint32_t value)\n" " IDMEFValue.new(int64_t value)\n" " IDMEFValue.new(uint64_t value)\n" " IDMEFValue.new(float value)\n" " IDMEFValue.new(double value)\n" " IDMEFValue.new(Prelude::IDMEFTime &time)\n"); return Qnil; } SWIGINTERN VALUE _wrap_IDMEFValue_Match(int argc, VALUE *argv, VALUE self) { Prelude::IDMEFValue *arg1 = (Prelude::IDMEFValue *) 0 ; Prelude::IDMEFValue *arg2 = 0 ; int arg3 ; void *argp1 = 0 ; int res1 = 0 ; void *argp2 ; int res2 = 0 ; int val3 ; int ecode3 = 0 ; int result; VALUE vresult = Qnil; if ((argc < 2) || (argc > 2)) { rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail; } res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Prelude__IDMEFValue, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Prelude::IDMEFValue *","Match", 1, self )); } arg1 = reinterpret_cast< Prelude::IDMEFValue * >(argp1); res2 = SWIG_ConvertPtr(argv[0], &argp2, SWIGTYPE_p_Prelude__IDMEFValue, 0 ); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "Prelude::IDMEFValue const &","Match", 2, argv[0] )); } if (!argp2) { SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "Prelude::IDMEFValue const &","Match", 2, argv[0])); } arg2 = reinterpret_cast< Prelude::IDMEFValue * >(argp2); ecode3 = SWIG_AsVal_int(argv[1], &val3); if (!SWIG_IsOK(ecode3)) { SWIG_exception_fail(SWIG_ArgError(ecode3), Ruby_Format_TypeError( "", "int","Match", 3, argv[1] )); } arg3 = static_cast< int >(val3); try { result = (int)(arg1)->Match((Prelude::IDMEFValue const &)*arg2,arg3); } catch(Prelude::PreludeError &_e) { rb_exc_raise(SWIG_Ruby_ExceptionType(SWIGTYPE_p_Prelude__PreludeError, SWIG_NewPointerObj((new Prelude::PreludeError(static_cast< const Prelude::PreludeError& >(_e))),SWIGTYPE_p_Prelude__PreludeError,SWIG_POINTER_OWN))); SWIG_fail; } vresult = SWIG_From_int(static_cast< int >(result)); return vresult; fail: return Qnil; } SWIGINTERN VALUE _wrap_IDMEFValue_Clone(int argc, VALUE *argv, VALUE self) { Prelude::IDMEFValue *arg1 = (Prelude::IDMEFValue *) 0 ; void *argp1 = 0 ; int res1 = 0 ; Prelude::IDMEFValue result; VALUE vresult = Qnil; if ((argc < 0) || (argc > 0)) { rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; } res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Prelude__IDMEFValue, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Prelude::IDMEFValue const *","Clone", 1, self )); } arg1 = reinterpret_cast< Prelude::IDMEFValue * >(argp1); try { result = ((Prelude::IDMEFValue const *)arg1)->Clone(); } catch(Prelude::PreludeError &_e) { rb_exc_raise(SWIG_Ruby_ExceptionType(SWIGTYPE_p_Prelude__PreludeError, SWIG_NewPointerObj((new Prelude::PreludeError(static_cast< const Prelude::PreludeError& >(_e))),SWIGTYPE_p_Prelude__PreludeError,SWIG_POINTER_OWN))); SWIG_fail; } { int ret; if ( (&result)->IsNull() ) vresult = Qnil; else { ret = IDMEFValue_to_SWIG(result, &vresult); if ( ret < 0 ) { std::stringstream s; s << "IDMEFValue typemap does not handle value of type '" << idmef_value_type_to_string((&result)->GetType()) << "'"; SWIG_exception_fail(SWIG_ValueError, s.str().c_str()); } } } return vresult; fail: return Qnil; } swig_class SwigClassIDMEFPath; SWIGINTERN VALUE _wrap_new_IDMEFPath__SWIG_0(int argc, VALUE *argv, VALUE self) { char *arg1 = (char *) 0 ; int res1 ; char *buf1 = 0 ; int alloc1 = 0 ; Prelude::IDMEFPath *result = 0 ; if ((argc < 1) || (argc > 1)) { rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; } res1 = SWIG_AsCharPtrAndSize(argv[0], &buf1, NULL, &alloc1); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "char const *","Prelude::IDMEFPath", 1, argv[0] )); } arg1 = reinterpret_cast< char * >(buf1); try { result = (Prelude::IDMEFPath *)new Prelude::IDMEFPath((char const *)arg1); DATA_PTR(self) = result; } catch(Prelude::PreludeError &_e) { rb_exc_raise(SWIG_Ruby_ExceptionType(SWIGTYPE_p_Prelude__PreludeError, SWIG_NewPointerObj((new Prelude::PreludeError(static_cast< const Prelude::PreludeError& >(_e))),SWIGTYPE_p_Prelude__PreludeError,SWIG_POINTER_OWN))); SWIG_fail; } if (alloc1 == SWIG_NEWOBJ) delete[] buf1; return self; fail: if (alloc1 == SWIG_NEWOBJ) delete[] buf1; return Qnil; } SWIGINTERN VALUE _wrap_new_IDMEFPath__SWIG_1(int argc, VALUE *argv, VALUE self) { idmef_path_t *arg1 = (idmef_path_t *) 0 ; void *argp1 = 0 ; int res1 = 0 ; Prelude::IDMEFPath *result = 0 ; if ((argc < 1) || (argc > 1)) { rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; } res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_idmef_path_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "idmef_path_t *","Prelude::IDMEFPath", 1, argv[0] )); } arg1 = reinterpret_cast< idmef_path_t * >(argp1); try { result = (Prelude::IDMEFPath *)new Prelude::IDMEFPath(arg1); DATA_PTR(self) = result; } catch(Prelude::PreludeError &_e) { rb_exc_raise(SWIG_Ruby_ExceptionType(SWIGTYPE_p_Prelude__PreludeError, SWIG_NewPointerObj((new Prelude::PreludeError(static_cast< const Prelude::PreludeError& >(_e))),SWIGTYPE_p_Prelude__PreludeError,SWIG_POINTER_OWN))); SWIG_fail; } return self; fail: return Qnil; } #ifdef HAVE_RB_DEFINE_ALLOC_FUNC SWIGINTERN VALUE _wrap_IDMEFPath_allocate(VALUE self) { #else SWIGINTERN VALUE _wrap_IDMEFPath_allocate(int argc, VALUE *argv, VALUE self) { #endif VALUE vresult = SWIG_NewClassInstance(self, SWIGTYPE_p_Prelude__IDMEFPath); #ifndef HAVE_RB_DEFINE_ALLOC_FUNC rb_obj_call_init(vresult, argc, argv); #endif return vresult; } SWIGINTERN VALUE _wrap_new_IDMEFPath__SWIG_2(int argc, VALUE *argv, VALUE self) { Prelude::IDMEFPath *arg1 = 0 ; void *argp1 ; int res1 = 0 ; Prelude::IDMEFPath *result = 0 ; if ((argc < 1) || (argc > 1)) { rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; } res1 = SWIG_ConvertPtr(argv[0], &argp1, SWIGTYPE_p_Prelude__IDMEFPath, 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Prelude::IDMEFPath const &","Prelude::IDMEFPath", 1, argv[0] )); } if (!argp1) { SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "Prelude::IDMEFPath const &","Prelude::IDMEFPath", 1, argv[0])); } arg1 = reinterpret_cast< Prelude::IDMEFPath * >(argp1); try { result = (Prelude::IDMEFPath *)new Prelude::IDMEFPath((Prelude::IDMEFPath const &)*arg1); DATA_PTR(self) = result; } catch(Prelude::PreludeError &_e) { rb_exc_raise(SWIG_Ruby_ExceptionType(SWIGTYPE_p_Prelude__PreludeError, SWIG_NewPointerObj((new Prelude::PreludeError(static_cast< const Prelude::PreludeError& >(_e))),SWIGTYPE_p_Prelude__PreludeError,SWIG_POINTER_OWN))); SWIG_fail; } return self; fail: return Qnil; } SWIGINTERN VALUE _wrap_new_IDMEFPath(int nargs, VALUE *args, VALUE self) { int argc; VALUE argv[1]; int ii; argc = nargs; if (argc > 1) SWIG_fail; for (ii = 0; (ii < argc); ++ii) { argv[ii] = args[ii]; } if (argc == 1) { int _v; void *vptr = 0; int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_idmef_path_t, 0); _v = SWIG_CheckState(res); if (_v) { return _wrap_new_IDMEFPath__SWIG_1(nargs, args, self); } } if (argc == 1) { int _v; void *vptr = 0; int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_Prelude__IDMEFPath, 0); _v = SWIG_CheckState(res); if (_v) { return _wrap_new_IDMEFPath__SWIG_2(nargs, args, self); } } if (argc == 1) { int _v; int res = SWIG_AsCharPtrAndSize(argv[0], 0, NULL, 0); _v = SWIG_CheckState(res); if (_v) { return _wrap_new_IDMEFPath__SWIG_0(nargs, args, self); } } fail: Ruby_Format_OverloadedError( argc, 1, "IDMEFPath.new", " IDMEFPath.new(char const *buffer)\n" " IDMEFPath.new(idmef_path_t *path)\n" " IDMEFPath.new(Prelude::IDMEFPath const &path)\n"); return Qnil; } SWIGINTERN void free_Prelude_IDMEFPath(Prelude::IDMEFPath *arg1) { delete arg1; } SWIGINTERN VALUE _wrap_IDMEFPath_Get(int argc, VALUE *argv, VALUE self) { Prelude::IDMEFPath *arg1 = (Prelude::IDMEFPath *) 0 ; Prelude::IDMEF *arg2 = 0 ; void *argp1 = 0 ; int res1 = 0 ; void *argp2 = 0 ; int res2 = 0 ; Prelude::IDMEFValue result; VALUE vresult = Qnil; if ((argc < 1) || (argc > 1)) { rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; } res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Prelude__IDMEFPath, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Prelude::IDMEFPath *","Get", 1, self )); } arg1 = reinterpret_cast< Prelude::IDMEFPath * >(argp1); res2 = SWIG_ConvertPtr(argv[0], &argp2, SWIGTYPE_p_Prelude__IDMEF, 0 ); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "Prelude::IDMEF &","Get", 2, argv[0] )); } if (!argp2) { SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "Prelude::IDMEF &","Get", 2, argv[0])); } arg2 = reinterpret_cast< Prelude::IDMEF * >(argp2); try { result = (arg1)->Get(*arg2); } catch(Prelude::PreludeError &_e) { rb_exc_raise(SWIG_Ruby_ExceptionType(SWIGTYPE_p_Prelude__PreludeError, SWIG_NewPointerObj((new Prelude::PreludeError(static_cast< const Prelude::PreludeError& >(_e))),SWIGTYPE_p_Prelude__PreludeError,SWIG_POINTER_OWN))); SWIG_fail; } { int ret; if ( (&result)->IsNull() ) vresult = Qnil; else { ret = IDMEFValue_to_SWIG(result, &vresult); if ( ret < 0 ) { std::stringstream s; s << "IDMEFValue typemap does not handle value of type '" << idmef_value_type_to_string((&result)->GetType()) << "'"; SWIG_exception_fail(SWIG_ValueError, s.str().c_str()); } } } return vresult; fail: return Qnil; } SWIGINTERN VALUE _wrap_IDMEFPath_Set__SWIG_0(int argc, VALUE *argv, VALUE self) { Prelude::IDMEFPath *arg1 = (Prelude::IDMEFPath *) 0 ; Prelude::IDMEF *arg2 = 0 ; std::vector< Prelude::IDMEFValue,std::allocator< Prelude::IDMEFValue > > arg3 ; void *argp1 = 0 ; int res1 = 0 ; void *argp2 = 0 ; int res2 = 0 ; if ((argc < 2) || (argc > 2)) { rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail; } res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Prelude__IDMEFPath, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Prelude::IDMEFPath *","Set", 1, self )); } arg1 = reinterpret_cast< Prelude::IDMEFPath * >(argp1); res2 = SWIG_ConvertPtr(argv[0], &argp2, SWIGTYPE_p_Prelude__IDMEF, 0 ); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "Prelude::IDMEF &","Set", 2, argv[0] )); } if (!argp2) { SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "Prelude::IDMEF &","Set", 2, argv[0])); } arg2 = reinterpret_cast< Prelude::IDMEF * >(argp2); { std::vector > *ptr = (std::vector > *)0; int res = swig::asptr(argv[1], &ptr); if (!SWIG_IsOK(res) || !ptr) { SWIG_exception_fail(SWIG_ArgError((ptr ? res : SWIG_TypeError)), Ruby_Format_TypeError( "", "std::vector< Prelude::IDMEFValue,std::allocator< Prelude::IDMEFValue > >","Set", 3, argv[1] )); } arg3 = *ptr; if (SWIG_IsNewObj(res)) delete ptr; } try { (arg1)->Set(*arg2,arg3); } catch(Prelude::PreludeError &_e) { rb_exc_raise(SWIG_Ruby_ExceptionType(SWIGTYPE_p_Prelude__PreludeError, SWIG_NewPointerObj((new Prelude::PreludeError(static_cast< const Prelude::PreludeError& >(_e))),SWIGTYPE_p_Prelude__PreludeError,SWIG_POINTER_OWN))); SWIG_fail; } return Qnil; fail: return Qnil; } SWIGINTERN VALUE _wrap_IDMEFPath_Set__SWIG_1(int argc, VALUE *argv, VALUE self) { Prelude::IDMEFPath *arg1 = (Prelude::IDMEFPath *) 0 ; Prelude::IDMEF *arg2 = 0 ; Prelude::IDMEFValue *arg3 = (Prelude::IDMEFValue *) 0 ; void *argp1 = 0 ; int res1 = 0 ; void *argp2 = 0 ; int res2 = 0 ; void *argp3 = 0 ; int res3 = 0 ; if ((argc < 2) || (argc > 2)) { rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail; } res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Prelude__IDMEFPath, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Prelude::IDMEFPath *","Set", 1, self )); } arg1 = reinterpret_cast< Prelude::IDMEFPath * >(argp1); res2 = SWIG_ConvertPtr(argv[0], &argp2, SWIGTYPE_p_Prelude__IDMEF, 0 ); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "Prelude::IDMEF &","Set", 2, argv[0] )); } if (!argp2) { SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "Prelude::IDMEF &","Set", 2, argv[0])); } arg2 = reinterpret_cast< Prelude::IDMEF * >(argp2); res3 = SWIG_ConvertPtr(argv[1], &argp3,SWIGTYPE_p_Prelude__IDMEFValue, 0 | 0 ); if (!SWIG_IsOK(res3)) { SWIG_exception_fail(SWIG_ArgError(res3), Ruby_Format_TypeError( "", "Prelude::IDMEFValue *","Set", 3, argv[1] )); } arg3 = reinterpret_cast< Prelude::IDMEFValue * >(argp3); try { (arg1)->Set(*arg2,arg3); } catch(Prelude::PreludeError &_e) { rb_exc_raise(SWIG_Ruby_ExceptionType(SWIGTYPE_p_Prelude__PreludeError, SWIG_NewPointerObj((new Prelude::PreludeError(static_cast< const Prelude::PreludeError& >(_e))),SWIGTYPE_p_Prelude__PreludeError,SWIG_POINTER_OWN))); SWIG_fail; } return Qnil; fail: return Qnil; } SWIGINTERN VALUE _wrap_IDMEFPath_Set__SWIG_2(int argc, VALUE *argv, VALUE self) { Prelude::IDMEFPath *arg1 = (Prelude::IDMEFPath *) 0 ; Prelude::IDMEF *arg2 = 0 ; Prelude::IDMEFTime *arg3 = 0 ; void *argp1 = 0 ; int res1 = 0 ; void *argp2 = 0 ; int res2 = 0 ; void *argp3 = 0 ; int res3 = 0 ; if ((argc < 2) || (argc > 2)) { rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail; } res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Prelude__IDMEFPath, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Prelude::IDMEFPath *","Set", 1, self )); } arg1 = reinterpret_cast< Prelude::IDMEFPath * >(argp1); res2 = SWIG_ConvertPtr(argv[0], &argp2, SWIGTYPE_p_Prelude__IDMEF, 0 ); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "Prelude::IDMEF &","Set", 2, argv[0] )); } if (!argp2) { SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "Prelude::IDMEF &","Set", 2, argv[0])); } arg2 = reinterpret_cast< Prelude::IDMEF * >(argp2); res3 = SWIG_ConvertPtr(argv[1], &argp3, SWIGTYPE_p_Prelude__IDMEFTime, 0 ); if (!SWIG_IsOK(res3)) { SWIG_exception_fail(SWIG_ArgError(res3), Ruby_Format_TypeError( "", "Prelude::IDMEFTime &","Set", 3, argv[1] )); } if (!argp3) { SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "Prelude::IDMEFTime &","Set", 3, argv[1])); } arg3 = reinterpret_cast< Prelude::IDMEFTime * >(argp3); try { (arg1)->Set(*arg2,*arg3); } catch(Prelude::PreludeError &_e) { rb_exc_raise(SWIG_Ruby_ExceptionType(SWIGTYPE_p_Prelude__PreludeError, SWIG_NewPointerObj((new Prelude::PreludeError(static_cast< const Prelude::PreludeError& >(_e))),SWIGTYPE_p_Prelude__PreludeError,SWIG_POINTER_OWN))); SWIG_fail; } return Qnil; fail: return Qnil; } SWIGINTERN VALUE _wrap_IDMEFPath_Set__SWIG_3(int argc, VALUE *argv, VALUE self) { Prelude::IDMEFPath *arg1 = (Prelude::IDMEFPath *) 0 ; Prelude::IDMEF *arg2 = 0 ; std::string arg3 ; void *argp1 = 0 ; int res1 = 0 ; void *argp2 = 0 ; int res2 = 0 ; if ((argc < 2) || (argc > 2)) { rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail; } res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Prelude__IDMEFPath, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Prelude::IDMEFPath *","Set", 1, self )); } arg1 = reinterpret_cast< Prelude::IDMEFPath * >(argp1); res2 = SWIG_ConvertPtr(argv[0], &argp2, SWIGTYPE_p_Prelude__IDMEF, 0 ); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "Prelude::IDMEF &","Set", 2, argv[0] )); } if (!argp2) { SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "Prelude::IDMEF &","Set", 2, argv[0])); } arg2 = reinterpret_cast< Prelude::IDMEF * >(argp2); { std::string *ptr = (std::string *)0; int res = SWIG_AsPtr_std_string(argv[1], &ptr); if (!SWIG_IsOK(res) || !ptr) { SWIG_exception_fail(SWIG_ArgError((ptr ? res : SWIG_TypeError)), Ruby_Format_TypeError( "", "std::string","Set", 3, argv[1] )); } arg3 = *ptr; if (SWIG_IsNewObj(res)) delete ptr; } try { (arg1)->Set(*arg2,arg3); } catch(Prelude::PreludeError &_e) { rb_exc_raise(SWIG_Ruby_ExceptionType(SWIGTYPE_p_Prelude__PreludeError, SWIG_NewPointerObj((new Prelude::PreludeError(static_cast< const Prelude::PreludeError& >(_e))),SWIGTYPE_p_Prelude__PreludeError,SWIG_POINTER_OWN))); SWIG_fail; } return Qnil; fail: return Qnil; } SWIGINTERN VALUE _wrap_IDMEFPath_Set__SWIG_4(int argc, VALUE *argv, VALUE self) { Prelude::IDMEFPath *arg1 = (Prelude::IDMEFPath *) 0 ; Prelude::IDMEF *arg2 = 0 ; char *arg3 = (char *) 0 ; void *argp1 = 0 ; int res1 = 0 ; void *argp2 = 0 ; int res2 = 0 ; int res3 ; char *buf3 = 0 ; int alloc3 = 0 ; if ((argc < 2) || (argc > 2)) { rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail; } res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Prelude__IDMEFPath, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Prelude::IDMEFPath *","Set", 1, self )); } arg1 = reinterpret_cast< Prelude::IDMEFPath * >(argp1); res2 = SWIG_ConvertPtr(argv[0], &argp2, SWIGTYPE_p_Prelude__IDMEF, 0 ); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "Prelude::IDMEF &","Set", 2, argv[0] )); } if (!argp2) { SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "Prelude::IDMEF &","Set", 2, argv[0])); } arg2 = reinterpret_cast< Prelude::IDMEF * >(argp2); res3 = SWIG_AsCharPtrAndSize(argv[1], &buf3, NULL, &alloc3); if (!SWIG_IsOK(res3)) { SWIG_exception_fail(SWIG_ArgError(res3), Ruby_Format_TypeError( "", "char const *","Set", 3, argv[1] )); } arg3 = reinterpret_cast< char * >(buf3); try { (arg1)->Set(*arg2,(char const *)arg3); } catch(Prelude::PreludeError &_e) { rb_exc_raise(SWIG_Ruby_ExceptionType(SWIGTYPE_p_Prelude__PreludeError, SWIG_NewPointerObj((new Prelude::PreludeError(static_cast< const Prelude::PreludeError& >(_e))),SWIGTYPE_p_Prelude__PreludeError,SWIG_POINTER_OWN))); SWIG_fail; } if (alloc3 == SWIG_NEWOBJ) delete[] buf3; return Qnil; fail: if (alloc3 == SWIG_NEWOBJ) delete[] buf3; return Qnil; } SWIGINTERN VALUE _wrap_IDMEFPath_Set__SWIG_5(int argc, VALUE *argv, VALUE self) { Prelude::IDMEFPath *arg1 = (Prelude::IDMEFPath *) 0 ; Prelude::IDMEF *arg2 = 0 ; int8_t arg3 ; void *argp1 = 0 ; int res1 = 0 ; void *argp2 = 0 ; int res2 = 0 ; char val3 ; int ecode3 = 0 ; if ((argc < 2) || (argc > 2)) { rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail; } res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Prelude__IDMEFPath, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Prelude::IDMEFPath *","Set", 1, self )); } arg1 = reinterpret_cast< Prelude::IDMEFPath * >(argp1); res2 = SWIG_ConvertPtr(argv[0], &argp2, SWIGTYPE_p_Prelude__IDMEF, 0 ); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "Prelude::IDMEF &","Set", 2, argv[0] )); } if (!argp2) { SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "Prelude::IDMEF &","Set", 2, argv[0])); } arg2 = reinterpret_cast< Prelude::IDMEF * >(argp2); ecode3 = SWIG_AsVal_char(argv[1], &val3); if (!SWIG_IsOK(ecode3)) { SWIG_exception_fail(SWIG_ArgError(ecode3), Ruby_Format_TypeError( "", "int8_t","Set", 3, argv[1] )); } arg3 = static_cast< int8_t >(val3); try { (arg1)->Set(*arg2,arg3); } catch(Prelude::PreludeError &_e) { rb_exc_raise(SWIG_Ruby_ExceptionType(SWIGTYPE_p_Prelude__PreludeError, SWIG_NewPointerObj((new Prelude::PreludeError(static_cast< const Prelude::PreludeError& >(_e))),SWIGTYPE_p_Prelude__PreludeError,SWIG_POINTER_OWN))); SWIG_fail; } return Qnil; fail: return Qnil; } SWIGINTERN VALUE _wrap_IDMEFPath_Set__SWIG_6(int argc, VALUE *argv, VALUE self) { Prelude::IDMEFPath *arg1 = (Prelude::IDMEFPath *) 0 ; Prelude::IDMEF *arg2 = 0 ; uint8_t arg3 ; void *argp1 = 0 ; int res1 = 0 ; void *argp2 = 0 ; int res2 = 0 ; unsigned char val3 ; int ecode3 = 0 ; if ((argc < 2) || (argc > 2)) { rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail; } res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Prelude__IDMEFPath, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Prelude::IDMEFPath *","Set", 1, self )); } arg1 = reinterpret_cast< Prelude::IDMEFPath * >(argp1); res2 = SWIG_ConvertPtr(argv[0], &argp2, SWIGTYPE_p_Prelude__IDMEF, 0 ); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "Prelude::IDMEF &","Set", 2, argv[0] )); } if (!argp2) { SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "Prelude::IDMEF &","Set", 2, argv[0])); } arg2 = reinterpret_cast< Prelude::IDMEF * >(argp2); ecode3 = SWIG_AsVal_unsigned_SS_char(argv[1], &val3); if (!SWIG_IsOK(ecode3)) { SWIG_exception_fail(SWIG_ArgError(ecode3), Ruby_Format_TypeError( "", "uint8_t","Set", 3, argv[1] )); } arg3 = static_cast< uint8_t >(val3); try { (arg1)->Set(*arg2,arg3); } catch(Prelude::PreludeError &_e) { rb_exc_raise(SWIG_Ruby_ExceptionType(SWIGTYPE_p_Prelude__PreludeError, SWIG_NewPointerObj((new Prelude::PreludeError(static_cast< const Prelude::PreludeError& >(_e))),SWIGTYPE_p_Prelude__PreludeError,SWIG_POINTER_OWN))); SWIG_fail; } return Qnil; fail: return Qnil; } SWIGINTERN VALUE _wrap_IDMEFPath_Set__SWIG_7(int argc, VALUE *argv, VALUE self) { Prelude::IDMEFPath *arg1 = (Prelude::IDMEFPath *) 0 ; Prelude::IDMEF *arg2 = 0 ; int16_t arg3 ; void *argp1 = 0 ; int res1 = 0 ; void *argp2 = 0 ; int res2 = 0 ; short val3 ; int ecode3 = 0 ; if ((argc < 2) || (argc > 2)) { rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail; } res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Prelude__IDMEFPath, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Prelude::IDMEFPath *","Set", 1, self )); } arg1 = reinterpret_cast< Prelude::IDMEFPath * >(argp1); res2 = SWIG_ConvertPtr(argv[0], &argp2, SWIGTYPE_p_Prelude__IDMEF, 0 ); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "Prelude::IDMEF &","Set", 2, argv[0] )); } if (!argp2) { SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "Prelude::IDMEF &","Set", 2, argv[0])); } arg2 = reinterpret_cast< Prelude::IDMEF * >(argp2); ecode3 = SWIG_AsVal_short(argv[1], &val3); if (!SWIG_IsOK(ecode3)) { SWIG_exception_fail(SWIG_ArgError(ecode3), Ruby_Format_TypeError( "", "int16_t","Set", 3, argv[1] )); } arg3 = static_cast< int16_t >(val3); try { (arg1)->Set(*arg2,arg3); } catch(Prelude::PreludeError &_e) { rb_exc_raise(SWIG_Ruby_ExceptionType(SWIGTYPE_p_Prelude__PreludeError, SWIG_NewPointerObj((new Prelude::PreludeError(static_cast< const Prelude::PreludeError& >(_e))),SWIGTYPE_p_Prelude__PreludeError,SWIG_POINTER_OWN))); SWIG_fail; } return Qnil; fail: return Qnil; } SWIGINTERN VALUE _wrap_IDMEFPath_Set__SWIG_8(int argc, VALUE *argv, VALUE self) { Prelude::IDMEFPath *arg1 = (Prelude::IDMEFPath *) 0 ; Prelude::IDMEF *arg2 = 0 ; uint16_t arg3 ; void *argp1 = 0 ; int res1 = 0 ; void *argp2 = 0 ; int res2 = 0 ; unsigned short val3 ; int ecode3 = 0 ; if ((argc < 2) || (argc > 2)) { rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail; } res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Prelude__IDMEFPath, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Prelude::IDMEFPath *","Set", 1, self )); } arg1 = reinterpret_cast< Prelude::IDMEFPath * >(argp1); res2 = SWIG_ConvertPtr(argv[0], &argp2, SWIGTYPE_p_Prelude__IDMEF, 0 ); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "Prelude::IDMEF &","Set", 2, argv[0] )); } if (!argp2) { SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "Prelude::IDMEF &","Set", 2, argv[0])); } arg2 = reinterpret_cast< Prelude::IDMEF * >(argp2); ecode3 = SWIG_AsVal_unsigned_SS_short(argv[1], &val3); if (!SWIG_IsOK(ecode3)) { SWIG_exception_fail(SWIG_ArgError(ecode3), Ruby_Format_TypeError( "", "uint16_t","Set", 3, argv[1] )); } arg3 = static_cast< uint16_t >(val3); try { (arg1)->Set(*arg2,arg3); } catch(Prelude::PreludeError &_e) { rb_exc_raise(SWIG_Ruby_ExceptionType(SWIGTYPE_p_Prelude__PreludeError, SWIG_NewPointerObj((new Prelude::PreludeError(static_cast< const Prelude::PreludeError& >(_e))),SWIGTYPE_p_Prelude__PreludeError,SWIG_POINTER_OWN))); SWIG_fail; } return Qnil; fail: return Qnil; } SWIGINTERN VALUE _wrap_IDMEFPath_Set__SWIG_9(int argc, VALUE *argv, VALUE self) { Prelude::IDMEFPath *arg1 = (Prelude::IDMEFPath *) 0 ; Prelude::IDMEF *arg2 = 0 ; int32_t arg3 ; void *argp1 = 0 ; int res1 = 0 ; void *argp2 = 0 ; int res2 = 0 ; int val3 ; int ecode3 = 0 ; if ((argc < 2) || (argc > 2)) { rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail; } res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Prelude__IDMEFPath, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Prelude::IDMEFPath *","Set", 1, self )); } arg1 = reinterpret_cast< Prelude::IDMEFPath * >(argp1); res2 = SWIG_ConvertPtr(argv[0], &argp2, SWIGTYPE_p_Prelude__IDMEF, 0 ); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "Prelude::IDMEF &","Set", 2, argv[0] )); } if (!argp2) { SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "Prelude::IDMEF &","Set", 2, argv[0])); } arg2 = reinterpret_cast< Prelude::IDMEF * >(argp2); ecode3 = SWIG_AsVal_int(argv[1], &val3); if (!SWIG_IsOK(ecode3)) { SWIG_exception_fail(SWIG_ArgError(ecode3), Ruby_Format_TypeError( "", "int32_t","Set", 3, argv[1] )); } arg3 = static_cast< int32_t >(val3); try { (arg1)->Set(*arg2,arg3); } catch(Prelude::PreludeError &_e) { rb_exc_raise(SWIG_Ruby_ExceptionType(SWIGTYPE_p_Prelude__PreludeError, SWIG_NewPointerObj((new Prelude::PreludeError(static_cast< const Prelude::PreludeError& >(_e))),SWIGTYPE_p_Prelude__PreludeError,SWIG_POINTER_OWN))); SWIG_fail; } return Qnil; fail: return Qnil; } SWIGINTERN VALUE _wrap_IDMEFPath_Set__SWIG_10(int argc, VALUE *argv, VALUE self) { Prelude::IDMEFPath *arg1 = (Prelude::IDMEFPath *) 0 ; Prelude::IDMEF *arg2 = 0 ; uint32_t arg3 ; void *argp1 = 0 ; int res1 = 0 ; void *argp2 = 0 ; int res2 = 0 ; unsigned int val3 ; int ecode3 = 0 ; if ((argc < 2) || (argc > 2)) { rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail; } res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Prelude__IDMEFPath, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Prelude::IDMEFPath *","Set", 1, self )); } arg1 = reinterpret_cast< Prelude::IDMEFPath * >(argp1); res2 = SWIG_ConvertPtr(argv[0], &argp2, SWIGTYPE_p_Prelude__IDMEF, 0 ); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "Prelude::IDMEF &","Set", 2, argv[0] )); } if (!argp2) { SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "Prelude::IDMEF &","Set", 2, argv[0])); } arg2 = reinterpret_cast< Prelude::IDMEF * >(argp2); ecode3 = SWIG_AsVal_unsigned_SS_int(argv[1], &val3); if (!SWIG_IsOK(ecode3)) { SWIG_exception_fail(SWIG_ArgError(ecode3), Ruby_Format_TypeError( "", "uint32_t","Set", 3, argv[1] )); } arg3 = static_cast< uint32_t >(val3); try { (arg1)->Set(*arg2,arg3); } catch(Prelude::PreludeError &_e) { rb_exc_raise(SWIG_Ruby_ExceptionType(SWIGTYPE_p_Prelude__PreludeError, SWIG_NewPointerObj((new Prelude::PreludeError(static_cast< const Prelude::PreludeError& >(_e))),SWIGTYPE_p_Prelude__PreludeError,SWIG_POINTER_OWN))); SWIG_fail; } return Qnil; fail: return Qnil; } SWIGINTERN VALUE _wrap_IDMEFPath_Set__SWIG_11(int argc, VALUE *argv, VALUE self) { Prelude::IDMEFPath *arg1 = (Prelude::IDMEFPath *) 0 ; Prelude::IDMEF *arg2 = 0 ; int64_t arg3 ; void *argp1 = 0 ; int res1 = 0 ; void *argp2 = 0 ; int res2 = 0 ; long long val3 ; int ecode3 = 0 ; if ((argc < 2) || (argc > 2)) { rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail; } res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Prelude__IDMEFPath, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Prelude::IDMEFPath *","Set", 1, self )); } arg1 = reinterpret_cast< Prelude::IDMEFPath * >(argp1); res2 = SWIG_ConvertPtr(argv[0], &argp2, SWIGTYPE_p_Prelude__IDMEF, 0 ); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "Prelude::IDMEF &","Set", 2, argv[0] )); } if (!argp2) { SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "Prelude::IDMEF &","Set", 2, argv[0])); } arg2 = reinterpret_cast< Prelude::IDMEF * >(argp2); ecode3 = SWIG_AsVal_long_SS_long(argv[1], &val3); if (!SWIG_IsOK(ecode3)) { SWIG_exception_fail(SWIG_ArgError(ecode3), Ruby_Format_TypeError( "", "int64_t","Set", 3, argv[1] )); } arg3 = static_cast< int64_t >(val3); try { (arg1)->Set(*arg2,arg3); } catch(Prelude::PreludeError &_e) { rb_exc_raise(SWIG_Ruby_ExceptionType(SWIGTYPE_p_Prelude__PreludeError, SWIG_NewPointerObj((new Prelude::PreludeError(static_cast< const Prelude::PreludeError& >(_e))),SWIGTYPE_p_Prelude__PreludeError,SWIG_POINTER_OWN))); SWIG_fail; } return Qnil; fail: return Qnil; } SWIGINTERN VALUE _wrap_IDMEFPath_Set__SWIG_12(int argc, VALUE *argv, VALUE self) { Prelude::IDMEFPath *arg1 = (Prelude::IDMEFPath *) 0 ; Prelude::IDMEF *arg2 = 0 ; uint64_t arg3 ; void *argp1 = 0 ; int res1 = 0 ; void *argp2 = 0 ; int res2 = 0 ; unsigned long long val3 ; int ecode3 = 0 ; if ((argc < 2) || (argc > 2)) { rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail; } res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Prelude__IDMEFPath, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Prelude::IDMEFPath *","Set", 1, self )); } arg1 = reinterpret_cast< Prelude::IDMEFPath * >(argp1); res2 = SWIG_ConvertPtr(argv[0], &argp2, SWIGTYPE_p_Prelude__IDMEF, 0 ); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "Prelude::IDMEF &","Set", 2, argv[0] )); } if (!argp2) { SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "Prelude::IDMEF &","Set", 2, argv[0])); } arg2 = reinterpret_cast< Prelude::IDMEF * >(argp2); ecode3 = SWIG_AsVal_unsigned_SS_long_SS_long(argv[1], &val3); if (!SWIG_IsOK(ecode3)) { SWIG_exception_fail(SWIG_ArgError(ecode3), Ruby_Format_TypeError( "", "uint64_t","Set", 3, argv[1] )); } arg3 = static_cast< uint64_t >(val3); try { (arg1)->Set(*arg2,arg3); } catch(Prelude::PreludeError &_e) { rb_exc_raise(SWIG_Ruby_ExceptionType(SWIGTYPE_p_Prelude__PreludeError, SWIG_NewPointerObj((new Prelude::PreludeError(static_cast< const Prelude::PreludeError& >(_e))),SWIGTYPE_p_Prelude__PreludeError,SWIG_POINTER_OWN))); SWIG_fail; } return Qnil; fail: return Qnil; } SWIGINTERN VALUE _wrap_IDMEFPath_Set__SWIG_13(int argc, VALUE *argv, VALUE self) { Prelude::IDMEFPath *arg1 = (Prelude::IDMEFPath *) 0 ; Prelude::IDMEF *arg2 = 0 ; float arg3 ; void *argp1 = 0 ; int res1 = 0 ; void *argp2 = 0 ; int res2 = 0 ; float val3 ; int ecode3 = 0 ; if ((argc < 2) || (argc > 2)) { rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail; } res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Prelude__IDMEFPath, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Prelude::IDMEFPath *","Set", 1, self )); } arg1 = reinterpret_cast< Prelude::IDMEFPath * >(argp1); res2 = SWIG_ConvertPtr(argv[0], &argp2, SWIGTYPE_p_Prelude__IDMEF, 0 ); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "Prelude::IDMEF &","Set", 2, argv[0] )); } if (!argp2) { SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "Prelude::IDMEF &","Set", 2, argv[0])); } arg2 = reinterpret_cast< Prelude::IDMEF * >(argp2); ecode3 = SWIG_AsVal_float(argv[1], &val3); if (!SWIG_IsOK(ecode3)) { SWIG_exception_fail(SWIG_ArgError(ecode3), Ruby_Format_TypeError( "", "float","Set", 3, argv[1] )); } arg3 = static_cast< float >(val3); try { (arg1)->Set(*arg2,arg3); } catch(Prelude::PreludeError &_e) { rb_exc_raise(SWIG_Ruby_ExceptionType(SWIGTYPE_p_Prelude__PreludeError, SWIG_NewPointerObj((new Prelude::PreludeError(static_cast< const Prelude::PreludeError& >(_e))),SWIGTYPE_p_Prelude__PreludeError,SWIG_POINTER_OWN))); SWIG_fail; } return Qnil; fail: return Qnil; } SWIGINTERN VALUE _wrap_IDMEFPath_Set__SWIG_14(int argc, VALUE *argv, VALUE self) { Prelude::IDMEFPath *arg1 = (Prelude::IDMEFPath *) 0 ; Prelude::IDMEF *arg2 = 0 ; double arg3 ; void *argp1 = 0 ; int res1 = 0 ; void *argp2 = 0 ; int res2 = 0 ; double val3 ; int ecode3 = 0 ; if ((argc < 2) || (argc > 2)) { rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail; } res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Prelude__IDMEFPath, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Prelude::IDMEFPath *","Set", 1, self )); } arg1 = reinterpret_cast< Prelude::IDMEFPath * >(argp1); res2 = SWIG_ConvertPtr(argv[0], &argp2, SWIGTYPE_p_Prelude__IDMEF, 0 ); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "Prelude::IDMEF &","Set", 2, argv[0] )); } if (!argp2) { SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "Prelude::IDMEF &","Set", 2, argv[0])); } arg2 = reinterpret_cast< Prelude::IDMEF * >(argp2); ecode3 = SWIG_AsVal_double(argv[1], &val3); if (!SWIG_IsOK(ecode3)) { SWIG_exception_fail(SWIG_ArgError(ecode3), Ruby_Format_TypeError( "", "double","Set", 3, argv[1] )); } arg3 = static_cast< double >(val3); try { (arg1)->Set(*arg2,arg3); } catch(Prelude::PreludeError &_e) { rb_exc_raise(SWIG_Ruby_ExceptionType(SWIGTYPE_p_Prelude__PreludeError, SWIG_NewPointerObj((new Prelude::PreludeError(static_cast< const Prelude::PreludeError& >(_e))),SWIGTYPE_p_Prelude__PreludeError,SWIG_POINTER_OWN))); SWIG_fail; } return Qnil; fail: return Qnil; } SWIGINTERN VALUE _wrap_IDMEFPath_Set(int nargs, VALUE *args, VALUE self) { int argc; VALUE argv[4]; int ii; argc = nargs + 1; argv[0] = self; if (argc > 4) SWIG_fail; for (ii = 1; (ii < argc); ++ii) { argv[ii] = args[ii-1]; } if (argc == 3) { int _v; void *vptr = 0; int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_Prelude__IDMEFPath, 0); _v = SWIG_CheckState(res); if (_v) { void *vptr = 0; int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_p_Prelude__IDMEF, 0); _v = SWIG_CheckState(res); if (_v) { void *vptr = 0; int res = SWIG_ConvertPtr(argv[2], &vptr, SWIGTYPE_p_Prelude__IDMEFValue, 0); _v = SWIG_CheckState(res); if (_v) { return _wrap_IDMEFPath_Set__SWIG_1(nargs, args, self); } } } } if (argc == 3) { int _v; void *vptr = 0; int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_Prelude__IDMEFPath, 0); _v = SWIG_CheckState(res); if (_v) { void *vptr = 0; int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_p_Prelude__IDMEF, 0); _v = SWIG_CheckState(res); if (_v) { void *vptr = 0; int res = SWIG_ConvertPtr(argv[2], &vptr, SWIGTYPE_p_Prelude__IDMEFTime, 0); _v = SWIG_CheckState(res); if (_v) { return _wrap_IDMEFPath_Set__SWIG_2(nargs, args, self); } } } } if (argc == 3) { int _v; void *vptr = 0; int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_Prelude__IDMEFPath, 0); _v = SWIG_CheckState(res); if (_v) { void *vptr = 0; int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_p_Prelude__IDMEF, 0); _v = SWIG_CheckState(res); if (_v) { { int res = SWIG_AsVal_unsigned_SS_char(argv[2], NULL); _v = SWIG_CheckState(res); } if (_v) { return _wrap_IDMEFPath_Set__SWIG_6(nargs, args, self); } } } } if (argc == 3) { int _v; void *vptr = 0; int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_Prelude__IDMEFPath, 0); _v = SWIG_CheckState(res); if (_v) { void *vptr = 0; int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_p_Prelude__IDMEF, 0); _v = SWIG_CheckState(res); if (_v) { { int res = SWIG_AsVal_unsigned_SS_short(argv[2], NULL); _v = SWIG_CheckState(res); } if (_v) { return _wrap_IDMEFPath_Set__SWIG_8(nargs, args, self); } } } } if (argc == 3) { int _v; void *vptr = 0; int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_Prelude__IDMEFPath, 0); _v = SWIG_CheckState(res); if (_v) { void *vptr = 0; int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_p_Prelude__IDMEF, 0); _v = SWIG_CheckState(res); if (_v) { { int res = SWIG_AsVal_short(argv[2], NULL); _v = SWIG_CheckState(res); } if (_v) { return _wrap_IDMEFPath_Set__SWIG_7(nargs, args, self); } } } } if (argc == 3) { int _v; void *vptr = 0; int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_Prelude__IDMEFPath, 0); _v = SWIG_CheckState(res); if (_v) { void *vptr = 0; int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_p_Prelude__IDMEF, 0); _v = SWIG_CheckState(res); if (_v) { { int res = SWIG_AsVal_unsigned_SS_int(argv[2], NULL); _v = SWIG_CheckState(res); } if (_v) { return _wrap_IDMEFPath_Set__SWIG_10(nargs, args, self); } } } } if (argc == 3) { int _v; void *vptr = 0; int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_Prelude__IDMEFPath, 0); _v = SWIG_CheckState(res); if (_v) { void *vptr = 0; int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_p_Prelude__IDMEF, 0); _v = SWIG_CheckState(res); if (_v) { { int res = SWIG_AsVal_int(argv[2], NULL); _v = SWIG_CheckState(res); } if (_v) { return _wrap_IDMEFPath_Set__SWIG_9(nargs, args, self); } } } } if (argc == 3) { int _v; void *vptr = 0; int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_Prelude__IDMEFPath, 0); _v = SWIG_CheckState(res); if (_v) { void *vptr = 0; int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_p_Prelude__IDMEF, 0); _v = SWIG_CheckState(res); if (_v) { { int res = SWIG_AsVal_unsigned_SS_long_SS_long(argv[2], NULL); _v = SWIG_CheckState(res); } if (_v) { return _wrap_IDMEFPath_Set__SWIG_12(nargs, args, self); } } } } if (argc == 3) { int _v; void *vptr = 0; int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_Prelude__IDMEFPath, 0); _v = SWIG_CheckState(res); if (_v) { void *vptr = 0; int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_p_Prelude__IDMEF, 0); _v = SWIG_CheckState(res); if (_v) { { int res = SWIG_AsVal_long_SS_long(argv[2], NULL); _v = SWIG_CheckState(res); } if (_v) { return _wrap_IDMEFPath_Set__SWIG_11(nargs, args, self); } } } } if (argc == 3) { int _v; void *vptr = 0; int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_Prelude__IDMEFPath, 0); _v = SWIG_CheckState(res); if (_v) { void *vptr = 0; int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_p_Prelude__IDMEF, 0); _v = SWIG_CheckState(res); if (_v) { { int res = SWIG_AsVal_float(argv[2], NULL); _v = SWIG_CheckState(res); } if (_v) { return _wrap_IDMEFPath_Set__SWIG_13(nargs, args, self); } } } } if (argc == 3) { int _v; void *vptr = 0; int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_Prelude__IDMEFPath, 0); _v = SWIG_CheckState(res); if (_v) { void *vptr = 0; int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_p_Prelude__IDMEF, 0); _v = SWIG_CheckState(res); if (_v) { { int res = SWIG_AsVal_double(argv[2], NULL); _v = SWIG_CheckState(res); } if (_v) { return _wrap_IDMEFPath_Set__SWIG_14(nargs, args, self); } } } } if (argc == 3) { int _v; void *vptr = 0; int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_Prelude__IDMEFPath, 0); _v = SWIG_CheckState(res); if (_v) { void *vptr = 0; int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_p_Prelude__IDMEF, 0); _v = SWIG_CheckState(res); if (_v) { { int res = SWIG_AsVal_char(argv[2], NULL); _v = SWIG_CheckState(res); } if (_v) { return _wrap_IDMEFPath_Set__SWIG_5(nargs, args, self); } } } } if (argc == 3) { int _v; void *vptr = 0; int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_Prelude__IDMEFPath, 0); _v = SWIG_CheckState(res); if (_v) { void *vptr = 0; int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_p_Prelude__IDMEF, 0); _v = SWIG_CheckState(res); if (_v) { int res = SWIG_AsPtr_std_string(argv[2], (std::string**)(0)); _v = SWIG_CheckState(res); if (_v) { return _wrap_IDMEFPath_Set__SWIG_3(nargs, args, self); } } } } if (argc == 3) { int _v; void *vptr = 0; int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_Prelude__IDMEFPath, 0); _v = SWIG_CheckState(res); if (_v) { void *vptr = 0; int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_p_Prelude__IDMEF, 0); _v = SWIG_CheckState(res); if (_v) { int res = SWIG_AsCharPtrAndSize(argv[2], 0, NULL, 0); _v = SWIG_CheckState(res); if (_v) { return _wrap_IDMEFPath_Set__SWIG_4(nargs, args, self); } } } } if (argc == 3) { int _v; void *vptr = 0; int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_Prelude__IDMEFPath, 0); _v = SWIG_CheckState(res); if (_v) { void *vptr = 0; int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_p_Prelude__IDMEF, 0); _v = SWIG_CheckState(res); if (_v) { int res = swig::asptr(argv[2], (std::vector >**)(0)); _v = SWIG_CheckState(res); if (_v) { return _wrap_IDMEFPath_Set__SWIG_0(nargs, args, self); } } } } fail: Ruby_Format_OverloadedError( argc, 4, "IDMEFPath.Set", " void IDMEFPath.Set(Prelude::IDMEF &message, std::vector< Prelude::IDMEFValue,std::allocator< Prelude::IDMEFValue > > value)\n" " void IDMEFPath.Set(Prelude::IDMEF &message, Prelude::IDMEFValue *value)\n" " void IDMEFPath.Set(Prelude::IDMEF &message, Prelude::IDMEFTime &time)\n" " void IDMEFPath.Set(Prelude::IDMEF &message, std::string value)\n" " void IDMEFPath.Set(Prelude::IDMEF &message, char const *value)\n" " void IDMEFPath.Set(Prelude::IDMEF &message, int8_t value)\n" " void IDMEFPath.Set(Prelude::IDMEF &message, uint8_t value)\n" " void IDMEFPath.Set(Prelude::IDMEF &message, int16_t value)\n" " void IDMEFPath.Set(Prelude::IDMEF &message, uint16_t value)\n" " void IDMEFPath.Set(Prelude::IDMEF &message, int32_t value)\n" " void IDMEFPath.Set(Prelude::IDMEF &message, uint32_t value)\n" " void IDMEFPath.Set(Prelude::IDMEF &message, int64_t value)\n" " void IDMEFPath.Set(Prelude::IDMEF &message, uint64_t value)\n" " void IDMEFPath.Set(Prelude::IDMEF &message, float value)\n" " void IDMEFPath.Set(Prelude::IDMEF &message, double value)\n"); return Qnil; } SWIGINTERN VALUE _wrap_IDMEFPath_GetClass__SWIG_0(int argc, VALUE *argv, VALUE self) { Prelude::IDMEFPath *arg1 = (Prelude::IDMEFPath *) 0 ; int arg2 ; void *argp1 = 0 ; int res1 = 0 ; int val2 ; int ecode2 = 0 ; idmef_class_id_t result; VALUE vresult = Qnil; if ((argc < 1) || (argc > 1)) { rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; } res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Prelude__IDMEFPath, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Prelude::IDMEFPath *","GetClass", 1, self )); } arg1 = reinterpret_cast< Prelude::IDMEFPath * >(argp1); ecode2 = SWIG_AsVal_int(argv[0], &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "int","GetClass", 2, argv[0] )); } arg2 = static_cast< int >(val2); try { result = (arg1)->GetClass(arg2); } catch(Prelude::PreludeError &_e) { rb_exc_raise(SWIG_Ruby_ExceptionType(SWIGTYPE_p_Prelude__PreludeError, SWIG_NewPointerObj((new Prelude::PreludeError(static_cast< const Prelude::PreludeError& >(_e))),SWIGTYPE_p_Prelude__PreludeError,SWIG_POINTER_OWN))); SWIG_fail; } vresult = SWIG_NewPointerObj((new idmef_class_id_t(static_cast< const idmef_class_id_t& >(result))), SWIGTYPE_p_idmef_class_id_t, SWIG_POINTER_OWN | 0 ); return vresult; fail: return Qnil; } SWIGINTERN VALUE _wrap_IDMEFPath_GetClass__SWIG_1(int argc, VALUE *argv, VALUE self) { Prelude::IDMEFPath *arg1 = (Prelude::IDMEFPath *) 0 ; void *argp1 = 0 ; int res1 = 0 ; idmef_class_id_t result; VALUE vresult = Qnil; if ((argc < 0) || (argc > 0)) { rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; } res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Prelude__IDMEFPath, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Prelude::IDMEFPath *","GetClass", 1, self )); } arg1 = reinterpret_cast< Prelude::IDMEFPath * >(argp1); try { result = (arg1)->GetClass(); } catch(Prelude::PreludeError &_e) { rb_exc_raise(SWIG_Ruby_ExceptionType(SWIGTYPE_p_Prelude__PreludeError, SWIG_NewPointerObj((new Prelude::PreludeError(static_cast< const Prelude::PreludeError& >(_e))),SWIGTYPE_p_Prelude__PreludeError,SWIG_POINTER_OWN))); SWIG_fail; } vresult = SWIG_NewPointerObj((new idmef_class_id_t(static_cast< const idmef_class_id_t& >(result))), SWIGTYPE_p_idmef_class_id_t, SWIG_POINTER_OWN | 0 ); return vresult; fail: return Qnil; } SWIGINTERN VALUE _wrap_IDMEFPath_GetClass(int nargs, VALUE *args, VALUE self) { int argc; VALUE argv[3]; int ii; argc = nargs + 1; argv[0] = self; if (argc > 3) SWIG_fail; for (ii = 1; (ii < argc); ++ii) { argv[ii] = args[ii-1]; } if (argc == 1) { int _v; void *vptr = 0; int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_Prelude__IDMEFPath, 0); _v = SWIG_CheckState(res); if (_v) { return _wrap_IDMEFPath_GetClass__SWIG_1(nargs, args, self); } } if (argc == 2) { int _v; void *vptr = 0; int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_Prelude__IDMEFPath, 0); _v = SWIG_CheckState(res); if (_v) { { int res = SWIG_AsVal_int(argv[1], NULL); _v = SWIG_CheckState(res); } if (_v) { return _wrap_IDMEFPath_GetClass__SWIG_0(nargs, args, self); } } } fail: Ruby_Format_OverloadedError( argc, 3, "IDMEFPath.GetClass", " idmef_class_id_t IDMEFPath.GetClass(int depth)\n" " idmef_class_id_t IDMEFPath.GetClass()\n"); return Qnil; } SWIGINTERN VALUE _wrap_IDMEFPath_GetValueType__SWIG_0(int argc, VALUE *argv, VALUE self) { Prelude::IDMEFPath *arg1 = (Prelude::IDMEFPath *) 0 ; int arg2 ; void *argp1 = 0 ; int res1 = 0 ; int val2 ; int ecode2 = 0 ; idmef_value_type_id_t result; VALUE vresult = Qnil; if ((argc < 1) || (argc > 1)) { rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; } res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Prelude__IDMEFPath, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Prelude::IDMEFPath *","GetValueType", 1, self )); } arg1 = reinterpret_cast< Prelude::IDMEFPath * >(argp1); ecode2 = SWIG_AsVal_int(argv[0], &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "int","GetValueType", 2, argv[0] )); } arg2 = static_cast< int >(val2); try { result = (arg1)->GetValueType(arg2); } catch(Prelude::PreludeError &_e) { rb_exc_raise(SWIG_Ruby_ExceptionType(SWIGTYPE_p_Prelude__PreludeError, SWIG_NewPointerObj((new Prelude::PreludeError(static_cast< const Prelude::PreludeError& >(_e))),SWIGTYPE_p_Prelude__PreludeError,SWIG_POINTER_OWN))); SWIG_fail; } vresult = SWIG_NewPointerObj((new idmef_value_type_id_t(static_cast< const idmef_value_type_id_t& >(result))), SWIGTYPE_p_idmef_value_type_id_t, SWIG_POINTER_OWN | 0 ); return vresult; fail: return Qnil; } SWIGINTERN VALUE _wrap_IDMEFPath_GetValueType__SWIG_1(int argc, VALUE *argv, VALUE self) { Prelude::IDMEFPath *arg1 = (Prelude::IDMEFPath *) 0 ; void *argp1 = 0 ; int res1 = 0 ; idmef_value_type_id_t result; VALUE vresult = Qnil; if ((argc < 0) || (argc > 0)) { rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; } res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Prelude__IDMEFPath, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Prelude::IDMEFPath *","GetValueType", 1, self )); } arg1 = reinterpret_cast< Prelude::IDMEFPath * >(argp1); try { result = (arg1)->GetValueType(); } catch(Prelude::PreludeError &_e) { rb_exc_raise(SWIG_Ruby_ExceptionType(SWIGTYPE_p_Prelude__PreludeError, SWIG_NewPointerObj((new Prelude::PreludeError(static_cast< const Prelude::PreludeError& >(_e))),SWIGTYPE_p_Prelude__PreludeError,SWIG_POINTER_OWN))); SWIG_fail; } vresult = SWIG_NewPointerObj((new idmef_value_type_id_t(static_cast< const idmef_value_type_id_t& >(result))), SWIGTYPE_p_idmef_value_type_id_t, SWIG_POINTER_OWN | 0 ); return vresult; fail: return Qnil; } SWIGINTERN VALUE _wrap_IDMEFPath_GetValueType(int nargs, VALUE *args, VALUE self) { int argc; VALUE argv[3]; int ii; argc = nargs + 1; argv[0] = self; if (argc > 3) SWIG_fail; for (ii = 1; (ii < argc); ++ii) { argv[ii] = args[ii-1]; } if (argc == 1) { int _v; void *vptr = 0; int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_Prelude__IDMEFPath, 0); _v = SWIG_CheckState(res); if (_v) { return _wrap_IDMEFPath_GetValueType__SWIG_1(nargs, args, self); } } if (argc == 2) { int _v; void *vptr = 0; int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_Prelude__IDMEFPath, 0); _v = SWIG_CheckState(res); if (_v) { { int res = SWIG_AsVal_int(argv[1], NULL); _v = SWIG_CheckState(res); } if (_v) { return _wrap_IDMEFPath_GetValueType__SWIG_0(nargs, args, self); } } } fail: Ruby_Format_OverloadedError( argc, 3, "IDMEFPath.GetValueType", " idmef_value_type_id_t IDMEFPath.GetValueType(int depth)\n" " idmef_value_type_id_t IDMEFPath.GetValueType()\n"); return Qnil; } SWIGINTERN VALUE _wrap_IDMEFPath_SetIndex__SWIG_0(int argc, VALUE *argv, VALUE self) { Prelude::IDMEFPath *arg1 = (Prelude::IDMEFPath *) 0 ; unsigned int arg2 ; int arg3 ; void *argp1 = 0 ; int res1 = 0 ; unsigned int val2 ; int ecode2 = 0 ; int val3 ; int ecode3 = 0 ; int result; VALUE vresult = Qnil; if ((argc < 2) || (argc > 2)) { rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail; } res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Prelude__IDMEFPath, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Prelude::IDMEFPath *","SetIndex", 1, self )); } arg1 = reinterpret_cast< Prelude::IDMEFPath * >(argp1); ecode2 = SWIG_AsVal_unsigned_SS_int(argv[0], &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "unsigned int","SetIndex", 2, argv[0] )); } arg2 = static_cast< unsigned int >(val2); ecode3 = SWIG_AsVal_int(argv[1], &val3); if (!SWIG_IsOK(ecode3)) { SWIG_exception_fail(SWIG_ArgError(ecode3), Ruby_Format_TypeError( "", "int","SetIndex", 3, argv[1] )); } arg3 = static_cast< int >(val3); try { result = (int)(arg1)->SetIndex(arg2,arg3); } catch(Prelude::PreludeError &_e) { rb_exc_raise(SWIG_Ruby_ExceptionType(SWIGTYPE_p_Prelude__PreludeError, SWIG_NewPointerObj((new Prelude::PreludeError(static_cast< const Prelude::PreludeError& >(_e))),SWIGTYPE_p_Prelude__PreludeError,SWIG_POINTER_OWN))); SWIG_fail; } vresult = SWIG_From_int(static_cast< int >(result)); return vresult; fail: return Qnil; } SWIGINTERN VALUE _wrap_IDMEFPath_SetIndex__SWIG_1(int argc, VALUE *argv, VALUE self) { Prelude::IDMEFPath *arg1 = (Prelude::IDMEFPath *) 0 ; unsigned int arg2 ; void *argp1 = 0 ; int res1 = 0 ; unsigned int val2 ; int ecode2 = 0 ; int result; VALUE vresult = Qnil; if ((argc < 1) || (argc > 1)) { rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; } res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Prelude__IDMEFPath, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Prelude::IDMEFPath *","SetIndex", 1, self )); } arg1 = reinterpret_cast< Prelude::IDMEFPath * >(argp1); ecode2 = SWIG_AsVal_unsigned_SS_int(argv[0], &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "unsigned int","SetIndex", 2, argv[0] )); } arg2 = static_cast< unsigned int >(val2); try { result = (int)(arg1)->SetIndex(arg2); } catch(Prelude::PreludeError &_e) { rb_exc_raise(SWIG_Ruby_ExceptionType(SWIGTYPE_p_Prelude__PreludeError, SWIG_NewPointerObj((new Prelude::PreludeError(static_cast< const Prelude::PreludeError& >(_e))),SWIGTYPE_p_Prelude__PreludeError,SWIG_POINTER_OWN))); SWIG_fail; } vresult = SWIG_From_int(static_cast< int >(result)); return vresult; fail: return Qnil; } SWIGINTERN VALUE _wrap_IDMEFPath_SetIndex(int nargs, VALUE *args, VALUE self) { int argc; VALUE argv[4]; int ii; argc = nargs + 1; argv[0] = self; if (argc > 4) SWIG_fail; for (ii = 1; (ii < argc); ++ii) { argv[ii] = args[ii-1]; } if (argc == 2) { int _v; void *vptr = 0; int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_Prelude__IDMEFPath, 0); _v = SWIG_CheckState(res); if (_v) { { int res = SWIG_AsVal_unsigned_SS_int(argv[1], NULL); _v = SWIG_CheckState(res); } if (_v) { return _wrap_IDMEFPath_SetIndex__SWIG_1(nargs, args, self); } } } if (argc == 3) { int _v; void *vptr = 0; int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_Prelude__IDMEFPath, 0); _v = SWIG_CheckState(res); if (_v) { { int res = SWIG_AsVal_unsigned_SS_int(argv[1], NULL); _v = SWIG_CheckState(res); } if (_v) { { int res = SWIG_AsVal_int(argv[2], NULL); _v = SWIG_CheckState(res); } if (_v) { return _wrap_IDMEFPath_SetIndex__SWIG_0(nargs, args, self); } } } } fail: Ruby_Format_OverloadedError( argc, 4, "IDMEFPath.SetIndex", " int IDMEFPath.SetIndex(unsigned int index, int depth)\n" " int IDMEFPath.SetIndex(unsigned int index)\n"); return Qnil; } SWIGINTERN VALUE _wrap_IDMEFPath_UndefineIndex__SWIG_0(int argc, VALUE *argv, VALUE self) { Prelude::IDMEFPath *arg1 = (Prelude::IDMEFPath *) 0 ; int arg2 ; void *argp1 = 0 ; int res1 = 0 ; int val2 ; int ecode2 = 0 ; int result; VALUE vresult = Qnil; if ((argc < 1) || (argc > 1)) { rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; } res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Prelude__IDMEFPath, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Prelude::IDMEFPath *","UndefineIndex", 1, self )); } arg1 = reinterpret_cast< Prelude::IDMEFPath * >(argp1); ecode2 = SWIG_AsVal_int(argv[0], &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "int","UndefineIndex", 2, argv[0] )); } arg2 = static_cast< int >(val2); try { result = (int)(arg1)->UndefineIndex(arg2); } catch(Prelude::PreludeError &_e) { rb_exc_raise(SWIG_Ruby_ExceptionType(SWIGTYPE_p_Prelude__PreludeError, SWIG_NewPointerObj((new Prelude::PreludeError(static_cast< const Prelude::PreludeError& >(_e))),SWIGTYPE_p_Prelude__PreludeError,SWIG_POINTER_OWN))); SWIG_fail; } vresult = SWIG_From_int(static_cast< int >(result)); return vresult; fail: return Qnil; } SWIGINTERN VALUE _wrap_IDMEFPath_UndefineIndex__SWIG_1(int argc, VALUE *argv, VALUE self) { Prelude::IDMEFPath *arg1 = (Prelude::IDMEFPath *) 0 ; void *argp1 = 0 ; int res1 = 0 ; int result; VALUE vresult = Qnil; if ((argc < 0) || (argc > 0)) { rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; } res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Prelude__IDMEFPath, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Prelude::IDMEFPath *","UndefineIndex", 1, self )); } arg1 = reinterpret_cast< Prelude::IDMEFPath * >(argp1); try { result = (int)(arg1)->UndefineIndex(); } catch(Prelude::PreludeError &_e) { rb_exc_raise(SWIG_Ruby_ExceptionType(SWIGTYPE_p_Prelude__PreludeError, SWIG_NewPointerObj((new Prelude::PreludeError(static_cast< const Prelude::PreludeError& >(_e))),SWIGTYPE_p_Prelude__PreludeError,SWIG_POINTER_OWN))); SWIG_fail; } vresult = SWIG_From_int(static_cast< int >(result)); return vresult; fail: return Qnil; } SWIGINTERN VALUE _wrap_IDMEFPath_UndefineIndex(int nargs, VALUE *args, VALUE self) { int argc; VALUE argv[3]; int ii; argc = nargs + 1; argv[0] = self; if (argc > 3) SWIG_fail; for (ii = 1; (ii < argc); ++ii) { argv[ii] = args[ii-1]; } if (argc == 1) { int _v; void *vptr = 0; int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_Prelude__IDMEFPath, 0); _v = SWIG_CheckState(res); if (_v) { return _wrap_IDMEFPath_UndefineIndex__SWIG_1(nargs, args, self); } } if (argc == 2) { int _v; void *vptr = 0; int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_Prelude__IDMEFPath, 0); _v = SWIG_CheckState(res); if (_v) { { int res = SWIG_AsVal_int(argv[1], NULL); _v = SWIG_CheckState(res); } if (_v) { return _wrap_IDMEFPath_UndefineIndex__SWIG_0(nargs, args, self); } } } fail: Ruby_Format_OverloadedError( argc, 3, "IDMEFPath.UndefineIndex", " int IDMEFPath.UndefineIndex(int depth)\n" " int IDMEFPath.UndefineIndex()\n"); return Qnil; } SWIGINTERN VALUE _wrap_IDMEFPath_GetIndex__SWIG_0(int argc, VALUE *argv, VALUE self) { Prelude::IDMEFPath *arg1 = (Prelude::IDMEFPath *) 0 ; int arg2 ; void *argp1 = 0 ; int res1 = 0 ; int val2 ; int ecode2 = 0 ; int result; VALUE vresult = Qnil; if ((argc < 1) || (argc > 1)) { rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; } res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Prelude__IDMEFPath, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Prelude::IDMEFPath *","GetIndex", 1, self )); } arg1 = reinterpret_cast< Prelude::IDMEFPath * >(argp1); ecode2 = SWIG_AsVal_int(argv[0], &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "int","GetIndex", 2, argv[0] )); } arg2 = static_cast< int >(val2); try { result = (int)(arg1)->GetIndex(arg2); } catch(Prelude::PreludeError &_e) { rb_exc_raise(SWIG_Ruby_ExceptionType(SWIGTYPE_p_Prelude__PreludeError, SWIG_NewPointerObj((new Prelude::PreludeError(static_cast< const Prelude::PreludeError& >(_e))),SWIGTYPE_p_Prelude__PreludeError,SWIG_POINTER_OWN))); SWIG_fail; } vresult = SWIG_From_int(static_cast< int >(result)); return vresult; fail: return Qnil; } SWIGINTERN VALUE _wrap_IDMEFPath_GetIndex__SWIG_1(int argc, VALUE *argv, VALUE self) { Prelude::IDMEFPath *arg1 = (Prelude::IDMEFPath *) 0 ; void *argp1 = 0 ; int res1 = 0 ; int result; VALUE vresult = Qnil; if ((argc < 0) || (argc > 0)) { rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; } res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Prelude__IDMEFPath, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Prelude::IDMEFPath *","GetIndex", 1, self )); } arg1 = reinterpret_cast< Prelude::IDMEFPath * >(argp1); try { result = (int)(arg1)->GetIndex(); } catch(Prelude::PreludeError &_e) { rb_exc_raise(SWIG_Ruby_ExceptionType(SWIGTYPE_p_Prelude__PreludeError, SWIG_NewPointerObj((new Prelude::PreludeError(static_cast< const Prelude::PreludeError& >(_e))),SWIGTYPE_p_Prelude__PreludeError,SWIG_POINTER_OWN))); SWIG_fail; } vresult = SWIG_From_int(static_cast< int >(result)); return vresult; fail: return Qnil; } SWIGINTERN VALUE _wrap_IDMEFPath_GetIndex(int nargs, VALUE *args, VALUE self) { int argc; VALUE argv[3]; int ii; argc = nargs + 1; argv[0] = self; if (argc > 3) SWIG_fail; for (ii = 1; (ii < argc); ++ii) { argv[ii] = args[ii-1]; } if (argc == 1) { int _v; void *vptr = 0; int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_Prelude__IDMEFPath, 0); _v = SWIG_CheckState(res); if (_v) { return _wrap_IDMEFPath_GetIndex__SWIG_1(nargs, args, self); } } if (argc == 2) { int _v; void *vptr = 0; int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_Prelude__IDMEFPath, 0); _v = SWIG_CheckState(res); if (_v) { { int res = SWIG_AsVal_int(argv[1], NULL); _v = SWIG_CheckState(res); } if (_v) { return _wrap_IDMEFPath_GetIndex__SWIG_0(nargs, args, self); } } } fail: Ruby_Format_OverloadedError( argc, 3, "IDMEFPath.GetIndex", " int IDMEFPath.GetIndex(int depth)\n" " int IDMEFPath.GetIndex()\n"); return Qnil; } SWIGINTERN VALUE _wrap_IDMEFPath_MakeChild(int argc, VALUE *argv, VALUE self) { Prelude::IDMEFPath *arg1 = (Prelude::IDMEFPath *) 0 ; char *arg2 = (char *) 0 ; unsigned int arg3 ; void *argp1 = 0 ; int res1 = 0 ; int res2 ; char *buf2 = 0 ; int alloc2 = 0 ; unsigned int val3 ; int ecode3 = 0 ; int result; VALUE vresult = Qnil; if ((argc < 2) || (argc > 2)) { rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail; } res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Prelude__IDMEFPath, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Prelude::IDMEFPath *","MakeChild", 1, self )); } arg1 = reinterpret_cast< Prelude::IDMEFPath * >(argp1); res2 = SWIG_AsCharPtrAndSize(argv[0], &buf2, NULL, &alloc2); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "char const *","MakeChild", 2, argv[0] )); } arg2 = reinterpret_cast< char * >(buf2); ecode3 = SWIG_AsVal_unsigned_SS_int(argv[1], &val3); if (!SWIG_IsOK(ecode3)) { SWIG_exception_fail(SWIG_ArgError(ecode3), Ruby_Format_TypeError( "", "unsigned int","MakeChild", 3, argv[1] )); } arg3 = static_cast< unsigned int >(val3); try { result = (int)(arg1)->MakeChild((char const *)arg2,arg3); } catch(Prelude::PreludeError &_e) { rb_exc_raise(SWIG_Ruby_ExceptionType(SWIGTYPE_p_Prelude__PreludeError, SWIG_NewPointerObj((new Prelude::PreludeError(static_cast< const Prelude::PreludeError& >(_e))),SWIGTYPE_p_Prelude__PreludeError,SWIG_POINTER_OWN))); SWIG_fail; } vresult = SWIG_From_int(static_cast< int >(result)); if (alloc2 == SWIG_NEWOBJ) delete[] buf2; return vresult; fail: if (alloc2 == SWIG_NEWOBJ) delete[] buf2; return Qnil; } SWIGINTERN VALUE _wrap_IDMEFPath_MakeParent(int argc, VALUE *argv, VALUE self) { Prelude::IDMEFPath *arg1 = (Prelude::IDMEFPath *) 0 ; void *argp1 = 0 ; int res1 = 0 ; int result; VALUE vresult = Qnil; if ((argc < 0) || (argc > 0)) { rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; } res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Prelude__IDMEFPath, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Prelude::IDMEFPath *","MakeParent", 1, self )); } arg1 = reinterpret_cast< Prelude::IDMEFPath * >(argp1); try { result = (int)(arg1)->MakeParent(); } catch(Prelude::PreludeError &_e) { rb_exc_raise(SWIG_Ruby_ExceptionType(SWIGTYPE_p_Prelude__PreludeError, SWIG_NewPointerObj((new Prelude::PreludeError(static_cast< const Prelude::PreludeError& >(_e))),SWIGTYPE_p_Prelude__PreludeError,SWIG_POINTER_OWN))); SWIG_fail; } vresult = SWIG_From_int(static_cast< int >(result)); return vresult; fail: return Qnil; } SWIGINTERN VALUE _wrap_IDMEFPath_Compare__SWIG_0(int argc, VALUE *argv, VALUE self) { Prelude::IDMEFPath *arg1 = (Prelude::IDMEFPath *) 0 ; Prelude::IDMEFPath *arg2 = (Prelude::IDMEFPath *) 0 ; int arg3 ; void *argp1 = 0 ; int res1 = 0 ; void *argp2 = 0 ; int res2 = 0 ; int val3 ; int ecode3 = 0 ; int result; VALUE vresult = Qnil; if ((argc < 2) || (argc > 2)) { rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail; } res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Prelude__IDMEFPath, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Prelude::IDMEFPath *","Compare", 1, self )); } arg1 = reinterpret_cast< Prelude::IDMEFPath * >(argp1); res2 = SWIG_ConvertPtr(argv[0], &argp2,SWIGTYPE_p_Prelude__IDMEFPath, 0 | 0 ); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "Prelude::IDMEFPath *","Compare", 2, argv[0] )); } arg2 = reinterpret_cast< Prelude::IDMEFPath * >(argp2); ecode3 = SWIG_AsVal_int(argv[1], &val3); if (!SWIG_IsOK(ecode3)) { SWIG_exception_fail(SWIG_ArgError(ecode3), Ruby_Format_TypeError( "", "int","Compare", 3, argv[1] )); } arg3 = static_cast< int >(val3); try { result = (int)(arg1)->Compare(arg2,arg3); } catch(Prelude::PreludeError &_e) { rb_exc_raise(SWIG_Ruby_ExceptionType(SWIGTYPE_p_Prelude__PreludeError, SWIG_NewPointerObj((new Prelude::PreludeError(static_cast< const Prelude::PreludeError& >(_e))),SWIGTYPE_p_Prelude__PreludeError,SWIG_POINTER_OWN))); SWIG_fail; } vresult = SWIG_From_int(static_cast< int >(result)); return vresult; fail: return Qnil; } SWIGINTERN VALUE _wrap_IDMEFPath_Compare__SWIG_1(int argc, VALUE *argv, VALUE self) { Prelude::IDMEFPath *arg1 = (Prelude::IDMEFPath *) 0 ; Prelude::IDMEFPath *arg2 = (Prelude::IDMEFPath *) 0 ; void *argp1 = 0 ; int res1 = 0 ; void *argp2 = 0 ; int res2 = 0 ; int result; VALUE vresult = Qnil; if ((argc < 1) || (argc > 1)) { rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; } res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Prelude__IDMEFPath, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Prelude::IDMEFPath *","Compare", 1, self )); } arg1 = reinterpret_cast< Prelude::IDMEFPath * >(argp1); res2 = SWIG_ConvertPtr(argv[0], &argp2,SWIGTYPE_p_Prelude__IDMEFPath, 0 | 0 ); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "Prelude::IDMEFPath *","Compare", 2, argv[0] )); } arg2 = reinterpret_cast< Prelude::IDMEFPath * >(argp2); try { result = (int)(arg1)->Compare(arg2); } catch(Prelude::PreludeError &_e) { rb_exc_raise(SWIG_Ruby_ExceptionType(SWIGTYPE_p_Prelude__PreludeError, SWIG_NewPointerObj((new Prelude::PreludeError(static_cast< const Prelude::PreludeError& >(_e))),SWIGTYPE_p_Prelude__PreludeError,SWIG_POINTER_OWN))); SWIG_fail; } vresult = SWIG_From_int(static_cast< int >(result)); return vresult; fail: return Qnil; } SWIGINTERN VALUE _wrap_IDMEFPath_Compare(int nargs, VALUE *args, VALUE self) { int argc; VALUE argv[4]; int ii; argc = nargs + 1; argv[0] = self; if (argc > 4) SWIG_fail; for (ii = 1; (ii < argc); ++ii) { argv[ii] = args[ii-1]; } if (argc == 2) { int _v; void *vptr = 0; int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_Prelude__IDMEFPath, 0); _v = SWIG_CheckState(res); if (_v) { void *vptr = 0; int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_p_Prelude__IDMEFPath, 0); _v = SWIG_CheckState(res); if (_v) { return _wrap_IDMEFPath_Compare__SWIG_1(nargs, args, self); } } } if (argc == 3) { int _v; void *vptr = 0; int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_Prelude__IDMEFPath, 0); _v = SWIG_CheckState(res); if (_v) { void *vptr = 0; int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_p_Prelude__IDMEFPath, 0); _v = SWIG_CheckState(res); if (_v) { { int res = SWIG_AsVal_int(argv[2], NULL); _v = SWIG_CheckState(res); } if (_v) { return _wrap_IDMEFPath_Compare__SWIG_0(nargs, args, self); } } } } fail: Ruby_Format_OverloadedError( argc, 4, "IDMEFPath.Compare", " int IDMEFPath.Compare(Prelude::IDMEFPath *path, int depth)\n" " int IDMEFPath.Compare(Prelude::IDMEFPath *path)\n"); return Qnil; } SWIGINTERN VALUE _wrap_IDMEFPath_Clone(int argc, VALUE *argv, VALUE self) { Prelude::IDMEFPath *arg1 = (Prelude::IDMEFPath *) 0 ; void *argp1 = 0 ; int res1 = 0 ; SwigValueWrapper< Prelude::IDMEFPath > result; VALUE vresult = Qnil; if ((argc < 0) || (argc > 0)) { rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; } res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Prelude__IDMEFPath, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Prelude::IDMEFPath *","Clone", 1, self )); } arg1 = reinterpret_cast< Prelude::IDMEFPath * >(argp1); try { result = (arg1)->Clone(); } catch(Prelude::PreludeError &_e) { rb_exc_raise(SWIG_Ruby_ExceptionType(SWIGTYPE_p_Prelude__PreludeError, SWIG_NewPointerObj((new Prelude::PreludeError(static_cast< const Prelude::PreludeError& >(_e))),SWIGTYPE_p_Prelude__PreludeError,SWIG_POINTER_OWN))); SWIG_fail; } vresult = SWIG_NewPointerObj((new Prelude::IDMEFPath(static_cast< const Prelude::IDMEFPath& >(result))), SWIGTYPE_p_Prelude__IDMEFPath, SWIG_POINTER_OWN | 0 ); return vresult; fail: return Qnil; } SWIGINTERN VALUE _wrap_IDMEFPath_CheckOperator(int argc, VALUE *argv, VALUE self) { Prelude::IDMEFPath *arg1 = (Prelude::IDMEFPath *) 0 ; idmef_criterion_operator_t arg2 ; void *argp1 = 0 ; int res1 = 0 ; void *argp2 ; int res2 = 0 ; int result; VALUE vresult = Qnil; if ((argc < 1) || (argc > 1)) { rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; } res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Prelude__IDMEFPath, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Prelude::IDMEFPath *","CheckOperator", 1, self )); } arg1 = reinterpret_cast< Prelude::IDMEFPath * >(argp1); { res2 = SWIG_ConvertPtr(argv[0], &argp2, SWIGTYPE_p_idmef_criterion_operator_t, 0 ); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "idmef_criterion_operator_t","CheckOperator", 2, argv[0] )); } if (!argp2) { SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "idmef_criterion_operator_t","CheckOperator", 2, argv[0])); } else { arg2 = *(reinterpret_cast< idmef_criterion_operator_t * >(argp2)); } } try { result = (int)(arg1)->CheckOperator(arg2); } catch(Prelude::PreludeError &_e) { rb_exc_raise(SWIG_Ruby_ExceptionType(SWIGTYPE_p_Prelude__PreludeError, SWIG_NewPointerObj((new Prelude::PreludeError(static_cast< const Prelude::PreludeError& >(_e))),SWIGTYPE_p_Prelude__PreludeError,SWIG_POINTER_OWN))); SWIG_fail; } vresult = SWIG_From_int(static_cast< int >(result)); return vresult; fail: return Qnil; } SWIGINTERN VALUE _wrap_IDMEFPath_GetApplicableOperators(int argc, VALUE *argv, VALUE self) { Prelude::IDMEFPath *arg1 = (Prelude::IDMEFPath *) 0 ; void *argp1 = 0 ; int res1 = 0 ; idmef_criterion_operator_t result; VALUE vresult = Qnil; if ((argc < 0) || (argc > 0)) { rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; } res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Prelude__IDMEFPath, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Prelude::IDMEFPath *","GetApplicableOperators", 1, self )); } arg1 = reinterpret_cast< Prelude::IDMEFPath * >(argp1); try { result = (arg1)->GetApplicableOperators(); } catch(Prelude::PreludeError &_e) { rb_exc_raise(SWIG_Ruby_ExceptionType(SWIGTYPE_p_Prelude__PreludeError, SWIG_NewPointerObj((new Prelude::PreludeError(static_cast< const Prelude::PreludeError& >(_e))),SWIGTYPE_p_Prelude__PreludeError,SWIG_POINTER_OWN))); SWIG_fail; } vresult = SWIG_NewPointerObj((new idmef_criterion_operator_t(static_cast< const idmef_criterion_operator_t& >(result))), SWIGTYPE_p_idmef_criterion_operator_t, SWIG_POINTER_OWN | 0 ); return vresult; fail: return Qnil; } SWIGINTERN VALUE _wrap_IDMEFPath_GetName__SWIG_0(int argc, VALUE *argv, VALUE self) { Prelude::IDMEFPath *arg1 = (Prelude::IDMEFPath *) 0 ; int arg2 ; void *argp1 = 0 ; int res1 = 0 ; int val2 ; int ecode2 = 0 ; char *result = 0 ; VALUE vresult = Qnil; if ((argc < 1) || (argc > 1)) { rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; } res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Prelude__IDMEFPath, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Prelude::IDMEFPath *","GetName", 1, self )); } arg1 = reinterpret_cast< Prelude::IDMEFPath * >(argp1); ecode2 = SWIG_AsVal_int(argv[0], &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "int","GetName", 2, argv[0] )); } arg2 = static_cast< int >(val2); try { result = (char *)(arg1)->GetName(arg2); } catch(Prelude::PreludeError &_e) { rb_exc_raise(SWIG_Ruby_ExceptionType(SWIGTYPE_p_Prelude__PreludeError, SWIG_NewPointerObj((new Prelude::PreludeError(static_cast< const Prelude::PreludeError& >(_e))),SWIGTYPE_p_Prelude__PreludeError,SWIG_POINTER_OWN))); SWIG_fail; } vresult = SWIG_FromCharPtr((const char *)result); return vresult; fail: return Qnil; } SWIGINTERN VALUE _wrap_IDMEFPath_GetName__SWIG_1(int argc, VALUE *argv, VALUE self) { Prelude::IDMEFPath *arg1 = (Prelude::IDMEFPath *) 0 ; void *argp1 = 0 ; int res1 = 0 ; char *result = 0 ; VALUE vresult = Qnil; if ((argc < 0) || (argc > 0)) { rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; } res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Prelude__IDMEFPath, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Prelude::IDMEFPath *","GetName", 1, self )); } arg1 = reinterpret_cast< Prelude::IDMEFPath * >(argp1); try { result = (char *)(arg1)->GetName(); } catch(Prelude::PreludeError &_e) { rb_exc_raise(SWIG_Ruby_ExceptionType(SWIGTYPE_p_Prelude__PreludeError, SWIG_NewPointerObj((new Prelude::PreludeError(static_cast< const Prelude::PreludeError& >(_e))),SWIGTYPE_p_Prelude__PreludeError,SWIG_POINTER_OWN))); SWIG_fail; } vresult = SWIG_FromCharPtr((const char *)result); return vresult; fail: return Qnil; } SWIGINTERN VALUE _wrap_IDMEFPath_GetName(int nargs, VALUE *args, VALUE self) { int argc; VALUE argv[3]; int ii; argc = nargs + 1; argv[0] = self; if (argc > 3) SWIG_fail; for (ii = 1; (ii < argc); ++ii) { argv[ii] = args[ii-1]; } if (argc == 1) { int _v; void *vptr = 0; int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_Prelude__IDMEFPath, 0); _v = SWIG_CheckState(res); if (_v) { return _wrap_IDMEFPath_GetName__SWIG_1(nargs, args, self); } } if (argc == 2) { int _v; void *vptr = 0; int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_Prelude__IDMEFPath, 0); _v = SWIG_CheckState(res); if (_v) { { int res = SWIG_AsVal_int(argv[1], NULL); _v = SWIG_CheckState(res); } if (_v) { return _wrap_IDMEFPath_GetName__SWIG_0(nargs, args, self); } } } fail: Ruby_Format_OverloadedError( argc, 3, "IDMEFPath.GetName", " char const * IDMEFPath.GetName(int depth)\n" " char const * IDMEFPath.GetName()\n"); return Qnil; } SWIGINTERN VALUE _wrap_IDMEFPath_IsAmbiguous(int argc, VALUE *argv, VALUE self) { Prelude::IDMEFPath *arg1 = (Prelude::IDMEFPath *) 0 ; void *argp1 = 0 ; int res1 = 0 ; bool result; VALUE vresult = Qnil; if ((argc < 0) || (argc > 0)) { rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; } res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Prelude__IDMEFPath, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Prelude::IDMEFPath *","IsAmbiguous", 1, self )); } arg1 = reinterpret_cast< Prelude::IDMEFPath * >(argp1); try { result = (bool)(arg1)->IsAmbiguous(); } catch(Prelude::PreludeError &_e) { rb_exc_raise(SWIG_Ruby_ExceptionType(SWIGTYPE_p_Prelude__PreludeError, SWIG_NewPointerObj((new Prelude::PreludeError(static_cast< const Prelude::PreludeError& >(_e))),SWIGTYPE_p_Prelude__PreludeError,SWIG_POINTER_OWN))); SWIG_fail; } vresult = SWIG_From_bool(static_cast< bool >(result)); return vresult; fail: return Qnil; } SWIGINTERN VALUE _wrap_IDMEFPath_HasLists(int argc, VALUE *argv, VALUE self) { Prelude::IDMEFPath *arg1 = (Prelude::IDMEFPath *) 0 ; void *argp1 = 0 ; int res1 = 0 ; int result; VALUE vresult = Qnil; if ((argc < 0) || (argc > 0)) { rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; } res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Prelude__IDMEFPath, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Prelude::IDMEFPath *","HasLists", 1, self )); } arg1 = reinterpret_cast< Prelude::IDMEFPath * >(argp1); try { result = (int)(arg1)->HasLists(); } catch(Prelude::PreludeError &_e) { rb_exc_raise(SWIG_Ruby_ExceptionType(SWIGTYPE_p_Prelude__PreludeError, SWIG_NewPointerObj((new Prelude::PreludeError(static_cast< const Prelude::PreludeError& >(_e))),SWIGTYPE_p_Prelude__PreludeError,SWIG_POINTER_OWN))); SWIG_fail; } vresult = SWIG_From_int(static_cast< int >(result)); return vresult; fail: return Qnil; } SWIGINTERN VALUE _wrap_IDMEFPath_IsList__SWIG_0(int argc, VALUE *argv, VALUE self) { Prelude::IDMEFPath *arg1 = (Prelude::IDMEFPath *) 0 ; int arg2 ; void *argp1 = 0 ; int res1 = 0 ; int val2 ; int ecode2 = 0 ; bool result; VALUE vresult = Qnil; if ((argc < 1) || (argc > 1)) { rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; } res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Prelude__IDMEFPath, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Prelude::IDMEFPath *","IsList", 1, self )); } arg1 = reinterpret_cast< Prelude::IDMEFPath * >(argp1); ecode2 = SWIG_AsVal_int(argv[0], &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "int","IsList", 2, argv[0] )); } arg2 = static_cast< int >(val2); try { result = (bool)(arg1)->IsList(arg2); } catch(Prelude::PreludeError &_e) { rb_exc_raise(SWIG_Ruby_ExceptionType(SWIGTYPE_p_Prelude__PreludeError, SWIG_NewPointerObj((new Prelude::PreludeError(static_cast< const Prelude::PreludeError& >(_e))),SWIGTYPE_p_Prelude__PreludeError,SWIG_POINTER_OWN))); SWIG_fail; } vresult = SWIG_From_bool(static_cast< bool >(result)); return vresult; fail: return Qnil; } SWIGINTERN VALUE _wrap_IDMEFPath_IsList__SWIG_1(int argc, VALUE *argv, VALUE self) { Prelude::IDMEFPath *arg1 = (Prelude::IDMEFPath *) 0 ; void *argp1 = 0 ; int res1 = 0 ; bool result; VALUE vresult = Qnil; if ((argc < 0) || (argc > 0)) { rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; } res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Prelude__IDMEFPath, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Prelude::IDMEFPath *","IsList", 1, self )); } arg1 = reinterpret_cast< Prelude::IDMEFPath * >(argp1); try { result = (bool)(arg1)->IsList(); } catch(Prelude::PreludeError &_e) { rb_exc_raise(SWIG_Ruby_ExceptionType(SWIGTYPE_p_Prelude__PreludeError, SWIG_NewPointerObj((new Prelude::PreludeError(static_cast< const Prelude::PreludeError& >(_e))),SWIGTYPE_p_Prelude__PreludeError,SWIG_POINTER_OWN))); SWIG_fail; } vresult = SWIG_From_bool(static_cast< bool >(result)); return vresult; fail: return Qnil; } SWIGINTERN VALUE _wrap_IDMEFPath_IsList(int nargs, VALUE *args, VALUE self) { int argc; VALUE argv[3]; int ii; argc = nargs + 1; argv[0] = self; if (argc > 3) SWIG_fail; for (ii = 1; (ii < argc); ++ii) { argv[ii] = args[ii-1]; } if (argc == 1) { int _v; void *vptr = 0; int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_Prelude__IDMEFPath, 0); _v = SWIG_CheckState(res); if (_v) { return _wrap_IDMEFPath_IsList__SWIG_1(nargs, args, self); } } if (argc == 2) { int _v; void *vptr = 0; int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_Prelude__IDMEFPath, 0); _v = SWIG_CheckState(res); if (_v) { { int res = SWIG_AsVal_int(argv[1], NULL); _v = SWIG_CheckState(res); } if (_v) { return _wrap_IDMEFPath_IsList__SWIG_0(nargs, args, self); } } } fail: Ruby_Format_OverloadedError( argc, 3, "IDMEFPath.IsList", " bool IDMEFPath.IsList(int depth)\n" " bool IDMEFPath.IsList()\n"); return Qnil; } SWIGINTERN VALUE _wrap_IDMEFPath_GetDepth(int argc, VALUE *argv, VALUE self) { Prelude::IDMEFPath *arg1 = (Prelude::IDMEFPath *) 0 ; void *argp1 = 0 ; int res1 = 0 ; unsigned int result; VALUE vresult = Qnil; if ((argc < 0) || (argc > 0)) { rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; } res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Prelude__IDMEFPath, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Prelude::IDMEFPath *","GetDepth", 1, self )); } arg1 = reinterpret_cast< Prelude::IDMEFPath * >(argp1); try { result = (unsigned int)(arg1)->GetDepth(); } catch(Prelude::PreludeError &_e) { rb_exc_raise(SWIG_Ruby_ExceptionType(SWIGTYPE_p_Prelude__PreludeError, SWIG_NewPointerObj((new Prelude::PreludeError(static_cast< const Prelude::PreludeError& >(_e))),SWIGTYPE_p_Prelude__PreludeError,SWIG_POINTER_OWN))); SWIG_fail; } vresult = SWIG_From_unsigned_SS_int(static_cast< unsigned int >(result)); return vresult; fail: return Qnil; } swig_class SwigClassIDMEFTime; SWIGINTERN VALUE _wrap_new_IDMEFTime__SWIG_0(int argc, VALUE *argv, VALUE self) { Prelude::IDMEFTime *result = 0 ; if ((argc < 0) || (argc > 0)) { rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; } try { result = (Prelude::IDMEFTime *)new Prelude::IDMEFTime(); DATA_PTR(self) = result; } catch(Prelude::PreludeError &_e) { rb_exc_raise(SWIG_Ruby_ExceptionType(SWIGTYPE_p_Prelude__PreludeError, SWIG_NewPointerObj((new Prelude::PreludeError(static_cast< const Prelude::PreludeError& >(_e))),SWIGTYPE_p_Prelude__PreludeError,SWIG_POINTER_OWN))); SWIG_fail; } return self; fail: return Qnil; } SWIGINTERN VALUE _wrap_new_IDMEFTime__SWIG_1(int argc, VALUE *argv, VALUE self) { idmef_time_t *arg1 = (idmef_time_t *) 0 ; void *argp1 = 0 ; int res1 = 0 ; Prelude::IDMEFTime *result = 0 ; if ((argc < 1) || (argc > 1)) { rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; } res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_idmef_time_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "idmef_time_t *","Prelude::IDMEFTime", 1, argv[0] )); } arg1 = reinterpret_cast< idmef_time_t * >(argp1); try { result = (Prelude::IDMEFTime *)new Prelude::IDMEFTime(arg1); DATA_PTR(self) = result; } catch(Prelude::PreludeError &_e) { rb_exc_raise(SWIG_Ruby_ExceptionType(SWIGTYPE_p_Prelude__PreludeError, SWIG_NewPointerObj((new Prelude::PreludeError(static_cast< const Prelude::PreludeError& >(_e))),SWIGTYPE_p_Prelude__PreludeError,SWIG_POINTER_OWN))); SWIG_fail; } return self; fail: return Qnil; } SWIGINTERN VALUE _wrap_new_IDMEFTime__SWIG_2(int argc, VALUE *argv, VALUE self) { time_t *arg1 = (time_t *) 0 ; void *argp1 = 0 ; int res1 = 0 ; Prelude::IDMEFTime *result = 0 ; if ((argc < 1) || (argc > 1)) { rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; } res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_time_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "time_t const *","Prelude::IDMEFTime", 1, argv[0] )); } arg1 = reinterpret_cast< time_t * >(argp1); try { result = (Prelude::IDMEFTime *)new Prelude::IDMEFTime((time_t const *)arg1); DATA_PTR(self) = result; } catch(Prelude::PreludeError &_e) { rb_exc_raise(SWIG_Ruby_ExceptionType(SWIGTYPE_p_Prelude__PreludeError, SWIG_NewPointerObj((new Prelude::PreludeError(static_cast< const Prelude::PreludeError& >(_e))),SWIGTYPE_p_Prelude__PreludeError,SWIG_POINTER_OWN))); SWIG_fail; } return self; fail: return Qnil; } SWIGINTERN VALUE _wrap_new_IDMEFTime__SWIG_3(int argc, VALUE *argv, VALUE self) { char *arg1 = (char *) 0 ; int res1 ; char *buf1 = 0 ; int alloc1 = 0 ; Prelude::IDMEFTime *result = 0 ; if ((argc < 1) || (argc > 1)) { rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; } res1 = SWIG_AsCharPtrAndSize(argv[0], &buf1, NULL, &alloc1); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "char const *","Prelude::IDMEFTime", 1, argv[0] )); } arg1 = reinterpret_cast< char * >(buf1); try { result = (Prelude::IDMEFTime *)new Prelude::IDMEFTime((char const *)arg1); DATA_PTR(self) = result; } catch(Prelude::PreludeError &_e) { rb_exc_raise(SWIG_Ruby_ExceptionType(SWIGTYPE_p_Prelude__PreludeError, SWIG_NewPointerObj((new Prelude::PreludeError(static_cast< const Prelude::PreludeError& >(_e))),SWIGTYPE_p_Prelude__PreludeError,SWIG_POINTER_OWN))); SWIG_fail; } if (alloc1 == SWIG_NEWOBJ) delete[] buf1; return self; fail: if (alloc1 == SWIG_NEWOBJ) delete[] buf1; return Qnil; } SWIGINTERN VALUE _wrap_new_IDMEFTime__SWIG_4(int argc, VALUE *argv, VALUE self) { timeval *arg1 = (timeval *) 0 ; void *argp1 = 0 ; int res1 = 0 ; Prelude::IDMEFTime *result = 0 ; if ((argc < 1) || (argc > 1)) { rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; } res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_timeval, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "timeval const *","Prelude::IDMEFTime", 1, argv[0] )); } arg1 = reinterpret_cast< timeval * >(argp1); try { result = (Prelude::IDMEFTime *)new Prelude::IDMEFTime((timeval const *)arg1); DATA_PTR(self) = result; } catch(Prelude::PreludeError &_e) { rb_exc_raise(SWIG_Ruby_ExceptionType(SWIGTYPE_p_Prelude__PreludeError, SWIG_NewPointerObj((new Prelude::PreludeError(static_cast< const Prelude::PreludeError& >(_e))),SWIGTYPE_p_Prelude__PreludeError,SWIG_POINTER_OWN))); SWIG_fail; } return self; fail: return Qnil; } #ifdef HAVE_RB_DEFINE_ALLOC_FUNC SWIGINTERN VALUE _wrap_IDMEFTime_allocate(VALUE self) { #else SWIGINTERN VALUE _wrap_IDMEFTime_allocate(int argc, VALUE *argv, VALUE self) { #endif VALUE vresult = SWIG_NewClassInstance(self, SWIGTYPE_p_Prelude__IDMEFTime); #ifndef HAVE_RB_DEFINE_ALLOC_FUNC rb_obj_call_init(vresult, argc, argv); #endif return vresult; } SWIGINTERN VALUE _wrap_new_IDMEFTime__SWIG_5(int argc, VALUE *argv, VALUE self) { Prelude::IDMEFTime *arg1 = 0 ; void *argp1 ; int res1 = 0 ; Prelude::IDMEFTime *result = 0 ; if ((argc < 1) || (argc > 1)) { rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; } res1 = SWIG_ConvertPtr(argv[0], &argp1, SWIGTYPE_p_Prelude__IDMEFTime, 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Prelude::IDMEFTime const &","Prelude::IDMEFTime", 1, argv[0] )); } if (!argp1) { SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "Prelude::IDMEFTime const &","Prelude::IDMEFTime", 1, argv[0])); } arg1 = reinterpret_cast< Prelude::IDMEFTime * >(argp1); try { result = (Prelude::IDMEFTime *)new Prelude::IDMEFTime((Prelude::IDMEFTime const &)*arg1); DATA_PTR(self) = result; } catch(Prelude::PreludeError &_e) { rb_exc_raise(SWIG_Ruby_ExceptionType(SWIGTYPE_p_Prelude__PreludeError, SWIG_NewPointerObj((new Prelude::PreludeError(static_cast< const Prelude::PreludeError& >(_e))),SWIGTYPE_p_Prelude__PreludeError,SWIG_POINTER_OWN))); SWIG_fail; } return self; fail: return Qnil; } SWIGINTERN VALUE _wrap_new_IDMEFTime(int nargs, VALUE *args, VALUE self) { int argc; VALUE argv[1]; int ii; argc = nargs; if (argc > 1) SWIG_fail; for (ii = 0; (ii < argc); ++ii) { argv[ii] = args[ii]; } if (argc == 0) { return _wrap_new_IDMEFTime__SWIG_0(nargs, args, self); } if (argc == 1) { int _v; void *vptr = 0; int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_idmef_time_t, 0); _v = SWIG_CheckState(res); if (_v) { return _wrap_new_IDMEFTime__SWIG_1(nargs, args, self); } } if (argc == 1) { int _v; void *vptr = 0; int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_time_t, 0); _v = SWIG_CheckState(res); if (_v) { return _wrap_new_IDMEFTime__SWIG_2(nargs, args, self); } } if (argc == 1) { int _v; void *vptr = 0; int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_timeval, 0); _v = SWIG_CheckState(res); if (_v) { return _wrap_new_IDMEFTime__SWIG_4(nargs, args, self); } } if (argc == 1) { int _v; void *vptr = 0; int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_Prelude__IDMEFTime, 0); _v = SWIG_CheckState(res); if (_v) { return _wrap_new_IDMEFTime__SWIG_5(nargs, args, self); } } if (argc == 1) { int _v; int res = SWIG_AsCharPtrAndSize(argv[0], 0, NULL, 0); _v = SWIG_CheckState(res); if (_v) { return _wrap_new_IDMEFTime__SWIG_3(nargs, args, self); } } fail: Ruby_Format_OverloadedError( argc, 1, "IDMEFTime.new", " IDMEFTime.new()\n" " IDMEFTime.new(idmef_time_t *time)\n" " IDMEFTime.new(time_t const *time)\n" " IDMEFTime.new(char const *string)\n" " IDMEFTime.new(timeval const *tv)\n" " IDMEFTime.new(Prelude::IDMEFTime const &value)\n"); return Qnil; } SWIGINTERN void free_Prelude_IDMEFTime(Prelude::IDMEFTime *arg1) { delete arg1; } SWIGINTERN VALUE _wrap_IDMEFTime_Set__SWIG_0(int argc, VALUE *argv, VALUE self) { Prelude::IDMEFTime *arg1 = (Prelude::IDMEFTime *) 0 ; void *argp1 = 0 ; int res1 = 0 ; if ((argc < 0) || (argc > 0)) { rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; } res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Prelude__IDMEFTime, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Prelude::IDMEFTime *","Set", 1, self )); } arg1 = reinterpret_cast< Prelude::IDMEFTime * >(argp1); try { (arg1)->Set(); } catch(Prelude::PreludeError &_e) { rb_exc_raise(SWIG_Ruby_ExceptionType(SWIGTYPE_p_Prelude__PreludeError, SWIG_NewPointerObj((new Prelude::PreludeError(static_cast< const Prelude::PreludeError& >(_e))),SWIGTYPE_p_Prelude__PreludeError,SWIG_POINTER_OWN))); SWIG_fail; } return Qnil; fail: return Qnil; } SWIGINTERN VALUE _wrap_IDMEFTime_Set__SWIG_1(int argc, VALUE *argv, VALUE self) { Prelude::IDMEFTime *arg1 = (Prelude::IDMEFTime *) 0 ; time_t *arg2 = (time_t *) 0 ; void *argp1 = 0 ; int res1 = 0 ; void *argp2 = 0 ; int res2 = 0 ; if ((argc < 1) || (argc > 1)) { rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; } res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Prelude__IDMEFTime, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Prelude::IDMEFTime *","Set", 1, self )); } arg1 = reinterpret_cast< Prelude::IDMEFTime * >(argp1); res2 = SWIG_ConvertPtr(argv[0], &argp2,SWIGTYPE_p_time_t, 0 | 0 ); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "time_t const *","Set", 2, argv[0] )); } arg2 = reinterpret_cast< time_t * >(argp2); try { (arg1)->Set((time_t const *)arg2); } catch(Prelude::PreludeError &_e) { rb_exc_raise(SWIG_Ruby_ExceptionType(SWIGTYPE_p_Prelude__PreludeError, SWIG_NewPointerObj((new Prelude::PreludeError(static_cast< const Prelude::PreludeError& >(_e))),SWIGTYPE_p_Prelude__PreludeError,SWIG_POINTER_OWN))); SWIG_fail; } return Qnil; fail: return Qnil; } SWIGINTERN VALUE _wrap_IDMEFTime_Set__SWIG_2(int argc, VALUE *argv, VALUE self) { Prelude::IDMEFTime *arg1 = (Prelude::IDMEFTime *) 0 ; char *arg2 = (char *) 0 ; void *argp1 = 0 ; int res1 = 0 ; int res2 ; char *buf2 = 0 ; int alloc2 = 0 ; if ((argc < 1) || (argc > 1)) { rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; } res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Prelude__IDMEFTime, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Prelude::IDMEFTime *","Set", 1, self )); } arg1 = reinterpret_cast< Prelude::IDMEFTime * >(argp1); res2 = SWIG_AsCharPtrAndSize(argv[0], &buf2, NULL, &alloc2); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "char const *","Set", 2, argv[0] )); } arg2 = reinterpret_cast< char * >(buf2); try { (arg1)->Set((char const *)arg2); } catch(Prelude::PreludeError &_e) { rb_exc_raise(SWIG_Ruby_ExceptionType(SWIGTYPE_p_Prelude__PreludeError, SWIG_NewPointerObj((new Prelude::PreludeError(static_cast< const Prelude::PreludeError& >(_e))),SWIGTYPE_p_Prelude__PreludeError,SWIG_POINTER_OWN))); SWIG_fail; } if (alloc2 == SWIG_NEWOBJ) delete[] buf2; return Qnil; fail: if (alloc2 == SWIG_NEWOBJ) delete[] buf2; return Qnil; } SWIGINTERN VALUE _wrap_IDMEFTime_Set__SWIG_3(int argc, VALUE *argv, VALUE self) { Prelude::IDMEFTime *arg1 = (Prelude::IDMEFTime *) 0 ; timeval *arg2 = (timeval *) 0 ; void *argp1 = 0 ; int res1 = 0 ; void *argp2 = 0 ; int res2 = 0 ; if ((argc < 1) || (argc > 1)) { rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; } res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Prelude__IDMEFTime, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Prelude::IDMEFTime *","Set", 1, self )); } arg1 = reinterpret_cast< Prelude::IDMEFTime * >(argp1); res2 = SWIG_ConvertPtr(argv[0], &argp2,SWIGTYPE_p_timeval, 0 | 0 ); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "timeval const *","Set", 2, argv[0] )); } arg2 = reinterpret_cast< timeval * >(argp2); try { (arg1)->Set((timeval const *)arg2); } catch(Prelude::PreludeError &_e) { rb_exc_raise(SWIG_Ruby_ExceptionType(SWIGTYPE_p_Prelude__PreludeError, SWIG_NewPointerObj((new Prelude::PreludeError(static_cast< const Prelude::PreludeError& >(_e))),SWIGTYPE_p_Prelude__PreludeError,SWIG_POINTER_OWN))); SWIG_fail; } return Qnil; fail: return Qnil; } SWIGINTERN VALUE _wrap_IDMEFTime_Set(int nargs, VALUE *args, VALUE self) { int argc; VALUE argv[3]; int ii; argc = nargs + 1; argv[0] = self; if (argc > 3) SWIG_fail; for (ii = 1; (ii < argc); ++ii) { argv[ii] = args[ii-1]; } if (argc == 1) { int _v; void *vptr = 0; int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_Prelude__IDMEFTime, 0); _v = SWIG_CheckState(res); if (_v) { return _wrap_IDMEFTime_Set__SWIG_0(nargs, args, self); } } if (argc == 2) { int _v; void *vptr = 0; int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_Prelude__IDMEFTime, 0); _v = SWIG_CheckState(res); if (_v) { void *vptr = 0; int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_p_time_t, 0); _v = SWIG_CheckState(res); if (_v) { return _wrap_IDMEFTime_Set__SWIG_1(nargs, args, self); } } } if (argc == 2) { int _v; void *vptr = 0; int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_Prelude__IDMEFTime, 0); _v = SWIG_CheckState(res); if (_v) { void *vptr = 0; int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_p_timeval, 0); _v = SWIG_CheckState(res); if (_v) { return _wrap_IDMEFTime_Set__SWIG_3(nargs, args, self); } } } if (argc == 2) { int _v; void *vptr = 0; int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_Prelude__IDMEFTime, 0); _v = SWIG_CheckState(res); if (_v) { int res = SWIG_AsCharPtrAndSize(argv[1], 0, NULL, 0); _v = SWIG_CheckState(res); if (_v) { return _wrap_IDMEFTime_Set__SWIG_2(nargs, args, self); } } } fail: Ruby_Format_OverloadedError( argc, 3, "IDMEFTime.Set", " void IDMEFTime.Set()\n" " void IDMEFTime.Set(time_t const *time)\n" " void IDMEFTime.Set(char const *string)\n" " void IDMEFTime.Set(timeval const *tv)\n"); return Qnil; } SWIGINTERN VALUE _wrap_IDMEFTime_SetSec(int argc, VALUE *argv, VALUE self) { Prelude::IDMEFTime *arg1 = (Prelude::IDMEFTime *) 0 ; uint32_t arg2 ; void *argp1 = 0 ; int res1 = 0 ; unsigned int val2 ; int ecode2 = 0 ; if ((argc < 1) || (argc > 1)) { rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; } res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Prelude__IDMEFTime, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Prelude::IDMEFTime *","SetSec", 1, self )); } arg1 = reinterpret_cast< Prelude::IDMEFTime * >(argp1); ecode2 = SWIG_AsVal_unsigned_SS_int(argv[0], &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "uint32_t","SetSec", 2, argv[0] )); } arg2 = static_cast< uint32_t >(val2); try { (arg1)->SetSec(arg2); } catch(Prelude::PreludeError &_e) { rb_exc_raise(SWIG_Ruby_ExceptionType(SWIGTYPE_p_Prelude__PreludeError, SWIG_NewPointerObj((new Prelude::PreludeError(static_cast< const Prelude::PreludeError& >(_e))),SWIGTYPE_p_Prelude__PreludeError,SWIG_POINTER_OWN))); SWIG_fail; } return Qnil; fail: return Qnil; } SWIGINTERN VALUE _wrap_IDMEFTime_SetUSec(int argc, VALUE *argv, VALUE self) { Prelude::IDMEFTime *arg1 = (Prelude::IDMEFTime *) 0 ; uint32_t arg2 ; void *argp1 = 0 ; int res1 = 0 ; unsigned int val2 ; int ecode2 = 0 ; if ((argc < 1) || (argc > 1)) { rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; } res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Prelude__IDMEFTime, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Prelude::IDMEFTime *","SetUSec", 1, self )); } arg1 = reinterpret_cast< Prelude::IDMEFTime * >(argp1); ecode2 = SWIG_AsVal_unsigned_SS_int(argv[0], &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "uint32_t","SetUSec", 2, argv[0] )); } arg2 = static_cast< uint32_t >(val2); try { (arg1)->SetUSec(arg2); } catch(Prelude::PreludeError &_e) { rb_exc_raise(SWIG_Ruby_ExceptionType(SWIGTYPE_p_Prelude__PreludeError, SWIG_NewPointerObj((new Prelude::PreludeError(static_cast< const Prelude::PreludeError& >(_e))),SWIGTYPE_p_Prelude__PreludeError,SWIG_POINTER_OWN))); SWIG_fail; } return Qnil; fail: return Qnil; } SWIGINTERN VALUE _wrap_IDMEFTime_SetGmtOffset(int argc, VALUE *argv, VALUE self) { Prelude::IDMEFTime *arg1 = (Prelude::IDMEFTime *) 0 ; int32_t arg2 ; void *argp1 = 0 ; int res1 = 0 ; int val2 ; int ecode2 = 0 ; if ((argc < 1) || (argc > 1)) { rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; } res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Prelude__IDMEFTime, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Prelude::IDMEFTime *","SetGmtOffset", 1, self )); } arg1 = reinterpret_cast< Prelude::IDMEFTime * >(argp1); ecode2 = SWIG_AsVal_int(argv[0], &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "int32_t","SetGmtOffset", 2, argv[0] )); } arg2 = static_cast< int32_t >(val2); try { (arg1)->SetGmtOffset(arg2); } catch(Prelude::PreludeError &_e) { rb_exc_raise(SWIG_Ruby_ExceptionType(SWIGTYPE_p_Prelude__PreludeError, SWIG_NewPointerObj((new Prelude::PreludeError(static_cast< const Prelude::PreludeError& >(_e))),SWIGTYPE_p_Prelude__PreludeError,SWIG_POINTER_OWN))); SWIG_fail; } return Qnil; fail: return Qnil; } SWIGINTERN VALUE _wrap_IDMEFTime_GetSec(int argc, VALUE *argv, VALUE self) { Prelude::IDMEFTime *arg1 = (Prelude::IDMEFTime *) 0 ; void *argp1 = 0 ; int res1 = 0 ; uint32_t result; VALUE vresult = Qnil; if ((argc < 0) || (argc > 0)) { rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; } res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Prelude__IDMEFTime, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Prelude::IDMEFTime const *","GetSec", 1, self )); } arg1 = reinterpret_cast< Prelude::IDMEFTime * >(argp1); try { result = (uint32_t)((Prelude::IDMEFTime const *)arg1)->GetSec(); } catch(Prelude::PreludeError &_e) { rb_exc_raise(SWIG_Ruby_ExceptionType(SWIGTYPE_p_Prelude__PreludeError, SWIG_NewPointerObj((new Prelude::PreludeError(static_cast< const Prelude::PreludeError& >(_e))),SWIGTYPE_p_Prelude__PreludeError,SWIG_POINTER_OWN))); SWIG_fail; } vresult = SWIG_From_unsigned_SS_int(static_cast< unsigned int >(result)); return vresult; fail: return Qnil; } SWIGINTERN VALUE _wrap_IDMEFTime_GetUSec(int argc, VALUE *argv, VALUE self) { Prelude::IDMEFTime *arg1 = (Prelude::IDMEFTime *) 0 ; void *argp1 = 0 ; int res1 = 0 ; uint32_t result; VALUE vresult = Qnil; if ((argc < 0) || (argc > 0)) { rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; } res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Prelude__IDMEFTime, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Prelude::IDMEFTime const *","GetUSec", 1, self )); } arg1 = reinterpret_cast< Prelude::IDMEFTime * >(argp1); try { result = (uint32_t)((Prelude::IDMEFTime const *)arg1)->GetUSec(); } catch(Prelude::PreludeError &_e) { rb_exc_raise(SWIG_Ruby_ExceptionType(SWIGTYPE_p_Prelude__PreludeError, SWIG_NewPointerObj((new Prelude::PreludeError(static_cast< const Prelude::PreludeError& >(_e))),SWIGTYPE_p_Prelude__PreludeError,SWIG_POINTER_OWN))); SWIG_fail; } vresult = SWIG_From_unsigned_SS_int(static_cast< unsigned int >(result)); return vresult; fail: return Qnil; } SWIGINTERN VALUE _wrap_IDMEFTime_GetGmtOffset(int argc, VALUE *argv, VALUE self) { Prelude::IDMEFTime *arg1 = (Prelude::IDMEFTime *) 0 ; void *argp1 = 0 ; int res1 = 0 ; int32_t result; VALUE vresult = Qnil; if ((argc < 0) || (argc > 0)) { rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; } res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Prelude__IDMEFTime, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Prelude::IDMEFTime const *","GetGmtOffset", 1, self )); } arg1 = reinterpret_cast< Prelude::IDMEFTime * >(argp1); try { result = (int32_t)((Prelude::IDMEFTime const *)arg1)->GetGmtOffset(); } catch(Prelude::PreludeError &_e) { rb_exc_raise(SWIG_Ruby_ExceptionType(SWIGTYPE_p_Prelude__PreludeError, SWIG_NewPointerObj((new Prelude::PreludeError(static_cast< const Prelude::PreludeError& >(_e))),SWIGTYPE_p_Prelude__PreludeError,SWIG_POINTER_OWN))); SWIG_fail; } vresult = SWIG_From_int(static_cast< int >(result)); return vresult; fail: return Qnil; } SWIGINTERN VALUE _wrap_IDMEFTime_Clone(int argc, VALUE *argv, VALUE self) { Prelude::IDMEFTime *arg1 = (Prelude::IDMEFTime *) 0 ; void *argp1 = 0 ; int res1 = 0 ; Prelude::IDMEFTime result; VALUE vresult = Qnil; if ((argc < 0) || (argc > 0)) { rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; } res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Prelude__IDMEFTime, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Prelude::IDMEFTime *","Clone", 1, self )); } arg1 = reinterpret_cast< Prelude::IDMEFTime * >(argp1); try { result = (arg1)->Clone(); } catch(Prelude::PreludeError &_e) { rb_exc_raise(SWIG_Ruby_ExceptionType(SWIGTYPE_p_Prelude__PreludeError, SWIG_NewPointerObj((new Prelude::PreludeError(static_cast< const Prelude::PreludeError& >(_e))),SWIGTYPE_p_Prelude__PreludeError,SWIG_POINTER_OWN))); SWIG_fail; } vresult = SWIG_NewPointerObj((new Prelude::IDMEFTime(static_cast< const Prelude::IDMEFTime& >(result))), SWIGTYPE_p_Prelude__IDMEFTime, SWIG_POINTER_OWN | 0 ); return vresult; fail: return Qnil; } SWIGINTERN VALUE _wrap_IDMEFTime_ToString(int argc, VALUE *argv, VALUE self) { Prelude::IDMEFTime *arg1 = (Prelude::IDMEFTime *) 0 ; void *argp1 = 0 ; int res1 = 0 ; std::string result; VALUE vresult = Qnil; if ((argc < 0) || (argc > 0)) { rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; } res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Prelude__IDMEFTime, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Prelude::IDMEFTime const *","ToString", 1, self )); } arg1 = reinterpret_cast< Prelude::IDMEFTime * >(argp1); try { result = ((Prelude::IDMEFTime const *)arg1)->ToString(); } catch(Prelude::PreludeError &_e) { rb_exc_raise(SWIG_Ruby_ExceptionType(SWIGTYPE_p_Prelude__PreludeError, SWIG_NewPointerObj((new Prelude::PreludeError(static_cast< const Prelude::PreludeError& >(_e))),SWIGTYPE_p_Prelude__PreludeError,SWIG_POINTER_OWN))); SWIG_fail; } vresult = SWIG_From_std_string(static_cast< std::string >(result)); return vresult; fail: return Qnil; } SWIGINTERN VALUE _wrap_IDMEFTime___int__(int argc, VALUE *argv, VALUE self) { Prelude::IDMEFTime *arg1 = (Prelude::IDMEFTime *) 0 ; void *argp1 = 0 ; int res1 = 0 ; int result; VALUE vresult = Qnil; if ((argc < 0) || (argc > 0)) { rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; } res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Prelude__IDMEFTime, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Prelude::IDMEFTime const *","operator int", 1, self )); } arg1 = reinterpret_cast< Prelude::IDMEFTime * >(argp1); try { result = (int)((Prelude::IDMEFTime const *)arg1)->operator int(); } catch(Prelude::PreludeError &_e) { rb_exc_raise(SWIG_Ruby_ExceptionType(SWIGTYPE_p_Prelude__PreludeError, SWIG_NewPointerObj((new Prelude::PreludeError(static_cast< const Prelude::PreludeError& >(_e))),SWIGTYPE_p_Prelude__PreludeError,SWIG_POINTER_OWN))); SWIG_fail; } vresult = SWIG_From_int(static_cast< int >(result)); return vresult; fail: return Qnil; } SWIGINTERN VALUE _wrap_IDMEFTime___long__(int argc, VALUE *argv, VALUE self) { Prelude::IDMEFTime *arg1 = (Prelude::IDMEFTime *) 0 ; void *argp1 = 0 ; int res1 = 0 ; long result; VALUE vresult = Qnil; if ((argc < 0) || (argc > 0)) { rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; } res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Prelude__IDMEFTime, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Prelude::IDMEFTime const *","operator long", 1, self )); } arg1 = reinterpret_cast< Prelude::IDMEFTime * >(argp1); try { result = (long)((Prelude::IDMEFTime const *)arg1)->operator long(); } catch(Prelude::PreludeError &_e) { rb_exc_raise(SWIG_Ruby_ExceptionType(SWIGTYPE_p_Prelude__PreludeError, SWIG_NewPointerObj((new Prelude::PreludeError(static_cast< const Prelude::PreludeError& >(_e))),SWIGTYPE_p_Prelude__PreludeError,SWIG_POINTER_OWN))); SWIG_fail; } vresult = SWIG_From_long(static_cast< long >(result)); return vresult; fail: return Qnil; } SWIGINTERN VALUE _wrap_IDMEFTime___float__(int argc, VALUE *argv, VALUE self) { Prelude::IDMEFTime *arg1 = (Prelude::IDMEFTime *) 0 ; void *argp1 = 0 ; int res1 = 0 ; double result; VALUE vresult = Qnil; if ((argc < 0) || (argc > 0)) { rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; } res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Prelude__IDMEFTime, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Prelude::IDMEFTime const *","operator double", 1, self )); } arg1 = reinterpret_cast< Prelude::IDMEFTime * >(argp1); try { result = (double)((Prelude::IDMEFTime const *)arg1)->operator double(); } catch(Prelude::PreludeError &_e) { rb_exc_raise(SWIG_Ruby_ExceptionType(SWIGTYPE_p_Prelude__PreludeError, SWIG_NewPointerObj((new Prelude::PreludeError(static_cast< const Prelude::PreludeError& >(_e))),SWIGTYPE_p_Prelude__PreludeError,SWIG_POINTER_OWN))); SWIG_fail; } vresult = SWIG_From_double(static_cast< double >(result)); return vresult; fail: return Qnil; } SWIGINTERN VALUE _wrap_IDMEFTime___str__(int argc, VALUE *argv, VALUE self) { Prelude::IDMEFTime *arg1 = (Prelude::IDMEFTime *) 0 ; void *argp1 = 0 ; int res1 = 0 ; std::string result; VALUE vresult = Qnil; if ((argc < 0) || (argc > 0)) { rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; } res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Prelude__IDMEFTime, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Prelude::IDMEFTime const *","operator const std::string", 1, self )); } arg1 = reinterpret_cast< Prelude::IDMEFTime * >(argp1); try { result = ((Prelude::IDMEFTime const *)arg1)->operator const std::string(); } catch(Prelude::PreludeError &_e) { rb_exc_raise(SWIG_Ruby_ExceptionType(SWIGTYPE_p_Prelude__PreludeError, SWIG_NewPointerObj((new Prelude::PreludeError(static_cast< const Prelude::PreludeError& >(_e))),SWIGTYPE_p_Prelude__PreludeError,SWIG_POINTER_OWN))); SWIG_fail; } vresult = SWIG_From_std_string(static_cast< std::string >(result)); return vresult; fail: return Qnil; } /* Document-method: PreludeEasy::IDMEFTime.>= call-seq: >=(time) -> bool Higher or equal comparison operator. */ SWIGINTERN VALUE _wrap_IDMEFTime___ge__(int argc, VALUE *argv, VALUE self) { Prelude::IDMEFTime *arg1 = (Prelude::IDMEFTime *) 0 ; Prelude::IDMEFTime *arg2 = 0 ; void *argp1 = 0 ; int res1 = 0 ; void *argp2 ; int res2 = 0 ; bool result; VALUE vresult = Qnil; if ((argc < 1) || (argc > 1)) { rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; } res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Prelude__IDMEFTime, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Prelude::IDMEFTime *","operator >=", 1, self )); } arg1 = reinterpret_cast< Prelude::IDMEFTime * >(argp1); res2 = SWIG_ConvertPtr(argv[0], &argp2, SWIGTYPE_p_Prelude__IDMEFTime, 0 ); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "Prelude::IDMEFTime const &","operator >=", 2, argv[0] )); } if (!argp2) { SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "Prelude::IDMEFTime const &","operator >=", 2, argv[0])); } arg2 = reinterpret_cast< Prelude::IDMEFTime * >(argp2); try { result = (bool)(arg1)->operator >=((Prelude::IDMEFTime const &)*arg2); } catch(Prelude::PreludeError &_e) { rb_exc_raise(SWIG_Ruby_ExceptionType(SWIGTYPE_p_Prelude__PreludeError, SWIG_NewPointerObj((new Prelude::PreludeError(static_cast< const Prelude::PreludeError& >(_e))),SWIGTYPE_p_Prelude__PreludeError,SWIG_POINTER_OWN))); SWIG_fail; } vresult = SWIG_From_bool(static_cast< bool >(result)); return vresult; fail: return Qnil; } /* Document-method: PreludeEasy::IDMEFTime.<= call-seq: <=(time) -> bool Lower or equal comparison operator. */ SWIGINTERN VALUE _wrap_IDMEFTime___le__(int argc, VALUE *argv, VALUE self) { Prelude::IDMEFTime *arg1 = (Prelude::IDMEFTime *) 0 ; Prelude::IDMEFTime *arg2 = 0 ; void *argp1 = 0 ; int res1 = 0 ; void *argp2 ; int res2 = 0 ; bool result; VALUE vresult = Qnil; if ((argc < 1) || (argc > 1)) { rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; } res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Prelude__IDMEFTime, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Prelude::IDMEFTime *","operator <=", 1, self )); } arg1 = reinterpret_cast< Prelude::IDMEFTime * >(argp1); res2 = SWIG_ConvertPtr(argv[0], &argp2, SWIGTYPE_p_Prelude__IDMEFTime, 0 ); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "Prelude::IDMEFTime const &","operator <=", 2, argv[0] )); } if (!argp2) { SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "Prelude::IDMEFTime const &","operator <=", 2, argv[0])); } arg2 = reinterpret_cast< Prelude::IDMEFTime * >(argp2); try { result = (bool)(arg1)->operator <=((Prelude::IDMEFTime const &)*arg2); } catch(Prelude::PreludeError &_e) { rb_exc_raise(SWIG_Ruby_ExceptionType(SWIGTYPE_p_Prelude__PreludeError, SWIG_NewPointerObj((new Prelude::PreludeError(static_cast< const Prelude::PreludeError& >(_e))),SWIGTYPE_p_Prelude__PreludeError,SWIG_POINTER_OWN))); SWIG_fail; } vresult = SWIG_From_bool(static_cast< bool >(result)); return vresult; fail: return Qnil; } /* Document-method: PreludeEasy::IDMEFTime.== call-seq: ==(time) -> bool Equality comparison operator. */ SWIGINTERN VALUE _wrap_IDMEFTime___eq__(int argc, VALUE *argv, VALUE self) { Prelude::IDMEFTime *arg1 = (Prelude::IDMEFTime *) 0 ; Prelude::IDMEFTime *arg2 = 0 ; void *argp1 = 0 ; int res1 = 0 ; void *argp2 ; int res2 = 0 ; bool result; VALUE vresult = Qnil; if ((argc < 1) || (argc > 1)) { rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; } res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Prelude__IDMEFTime, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Prelude::IDMEFTime *","operator ==", 1, self )); } arg1 = reinterpret_cast< Prelude::IDMEFTime * >(argp1); res2 = SWIG_ConvertPtr(argv[0], &argp2, SWIGTYPE_p_Prelude__IDMEFTime, 0 ); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "Prelude::IDMEFTime const &","operator ==", 2, argv[0] )); } if (!argp2) { SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "Prelude::IDMEFTime const &","operator ==", 2, argv[0])); } arg2 = reinterpret_cast< Prelude::IDMEFTime * >(argp2); try { result = (bool)(arg1)->operator ==((Prelude::IDMEFTime const &)*arg2); } catch(Prelude::PreludeError &_e) { rb_exc_raise(SWIG_Ruby_ExceptionType(SWIGTYPE_p_Prelude__PreludeError, SWIG_NewPointerObj((new Prelude::PreludeError(static_cast< const Prelude::PreludeError& >(_e))),SWIGTYPE_p_Prelude__PreludeError,SWIG_POINTER_OWN))); SWIG_fail; } vresult = SWIG_From_bool(static_cast< bool >(result)); return vresult; fail: return Qnil; } /* Document-method: PreludeEasy::IDMEFTime.> call-seq: >(time) -> bool Higher than comparison operator. */ SWIGINTERN VALUE _wrap_IDMEFTime___gt__(int argc, VALUE *argv, VALUE self) { Prelude::IDMEFTime *arg1 = (Prelude::IDMEFTime *) 0 ; Prelude::IDMEFTime *arg2 = 0 ; void *argp1 = 0 ; int res1 = 0 ; void *argp2 ; int res2 = 0 ; bool result; VALUE vresult = Qnil; if ((argc < 1) || (argc > 1)) { rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; } res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Prelude__IDMEFTime, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Prelude::IDMEFTime *","operator >", 1, self )); } arg1 = reinterpret_cast< Prelude::IDMEFTime * >(argp1); res2 = SWIG_ConvertPtr(argv[0], &argp2, SWIGTYPE_p_Prelude__IDMEFTime, 0 ); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "Prelude::IDMEFTime const &","operator >", 2, argv[0] )); } if (!argp2) { SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "Prelude::IDMEFTime const &","operator >", 2, argv[0])); } arg2 = reinterpret_cast< Prelude::IDMEFTime * >(argp2); try { result = (bool)(arg1)->operator >((Prelude::IDMEFTime const &)*arg2); } catch(Prelude::PreludeError &_e) { rb_exc_raise(SWIG_Ruby_ExceptionType(SWIGTYPE_p_Prelude__PreludeError, SWIG_NewPointerObj((new Prelude::PreludeError(static_cast< const Prelude::PreludeError& >(_e))),SWIGTYPE_p_Prelude__PreludeError,SWIG_POINTER_OWN))); SWIG_fail; } vresult = SWIG_From_bool(static_cast< bool >(result)); return vresult; fail: return Qnil; } /* Document-method: PreludeEasy::IDMEFTime.< call-seq: <(time) -> bool Lower than comparison operator. */ SWIGINTERN VALUE _wrap_IDMEFTime___lt__(int argc, VALUE *argv, VALUE self) { Prelude::IDMEFTime *arg1 = (Prelude::IDMEFTime *) 0 ; Prelude::IDMEFTime *arg2 = 0 ; void *argp1 = 0 ; int res1 = 0 ; void *argp2 ; int res2 = 0 ; bool result; VALUE vresult = Qnil; if ((argc < 1) || (argc > 1)) { rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; } res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Prelude__IDMEFTime, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Prelude::IDMEFTime *","operator <", 1, self )); } arg1 = reinterpret_cast< Prelude::IDMEFTime * >(argp1); res2 = SWIG_ConvertPtr(argv[0], &argp2, SWIGTYPE_p_Prelude__IDMEFTime, 0 ); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "Prelude::IDMEFTime const &","operator <", 2, argv[0] )); } if (!argp2) { SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "Prelude::IDMEFTime const &","operator <", 2, argv[0])); } arg2 = reinterpret_cast< Prelude::IDMEFTime * >(argp2); try { result = (bool)(arg1)->operator <((Prelude::IDMEFTime const &)*arg2); } catch(Prelude::PreludeError &_e) { rb_exc_raise(SWIG_Ruby_ExceptionType(SWIGTYPE_p_Prelude__PreludeError, SWIG_NewPointerObj((new Prelude::PreludeError(static_cast< const Prelude::PreludeError& >(_e))),SWIGTYPE_p_Prelude__PreludeError,SWIG_POINTER_OWN))); SWIG_fail; } vresult = SWIG_From_bool(static_cast< bool >(result)); return vresult; fail: return Qnil; } swig_class SwigClassIDMEF; SWIGINTERN void free_Prelude_IDMEF(Prelude::IDMEF *arg1) { delete arg1; } SWIGINTERN VALUE _wrap_new_IDMEF__SWIG_0(int argc, VALUE *argv, VALUE self) { Prelude::IDMEF *result = 0 ; if ((argc < 0) || (argc > 0)) { rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; } try { result = (Prelude::IDMEF *)new Prelude::IDMEF(); DATA_PTR(self) = result; } catch(Prelude::PreludeError &_e) { rb_exc_raise(SWIG_Ruby_ExceptionType(SWIGTYPE_p_Prelude__PreludeError, SWIG_NewPointerObj((new Prelude::PreludeError(static_cast< const Prelude::PreludeError& >(_e))),SWIGTYPE_p_Prelude__PreludeError,SWIG_POINTER_OWN))); SWIG_fail; } return self; fail: return Qnil; } SWIGINTERN VALUE _wrap_new_IDMEF__SWIG_1(int argc, VALUE *argv, VALUE self) { Prelude::IDMEF *arg1 = 0 ; void *argp1 ; int res1 = 0 ; Prelude::IDMEF *result = 0 ; if ((argc < 1) || (argc > 1)) { rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; } res1 = SWIG_ConvertPtr(argv[0], &argp1, SWIGTYPE_p_Prelude__IDMEF, 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Prelude::IDMEF const &","Prelude::IDMEF", 1, argv[0] )); } if (!argp1) { SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "Prelude::IDMEF const &","Prelude::IDMEF", 1, argv[0])); } arg1 = reinterpret_cast< Prelude::IDMEF * >(argp1); try { result = (Prelude::IDMEF *)new Prelude::IDMEF((Prelude::IDMEF const &)*arg1); DATA_PTR(self) = result; } catch(Prelude::PreludeError &_e) { rb_exc_raise(SWIG_Ruby_ExceptionType(SWIGTYPE_p_Prelude__PreludeError, SWIG_NewPointerObj((new Prelude::PreludeError(static_cast< const Prelude::PreludeError& >(_e))),SWIGTYPE_p_Prelude__PreludeError,SWIG_POINTER_OWN))); SWIG_fail; } return self; fail: return Qnil; } #ifdef HAVE_RB_DEFINE_ALLOC_FUNC SWIGINTERN VALUE _wrap_IDMEF_allocate(VALUE self) { #else SWIGINTERN VALUE _wrap_IDMEF_allocate(int argc, VALUE *argv, VALUE self) { #endif VALUE vresult = SWIG_NewClassInstance(self, SWIGTYPE_p_Prelude__IDMEF); #ifndef HAVE_RB_DEFINE_ALLOC_FUNC rb_obj_call_init(vresult, argc, argv); #endif return vresult; } SWIGINTERN VALUE _wrap_new_IDMEF__SWIG_2(int argc, VALUE *argv, VALUE self) { idmef_message_t *arg1 = (idmef_message_t *) 0 ; void *argp1 = 0 ; int res1 = 0 ; Prelude::IDMEF *result = 0 ; if ((argc < 1) || (argc > 1)) { rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; } res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_idmef_message_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "idmef_message_t *","Prelude::IDMEF", 1, argv[0] )); } arg1 = reinterpret_cast< idmef_message_t * >(argp1); try { result = (Prelude::IDMEF *)new Prelude::IDMEF(arg1); DATA_PTR(self) = result; } catch(Prelude::PreludeError &_e) { rb_exc_raise(SWIG_Ruby_ExceptionType(SWIGTYPE_p_Prelude__PreludeError, SWIG_NewPointerObj((new Prelude::PreludeError(static_cast< const Prelude::PreludeError& >(_e))),SWIGTYPE_p_Prelude__PreludeError,SWIG_POINTER_OWN))); SWIG_fail; } return self; fail: return Qnil; } SWIGINTERN VALUE _wrap_new_IDMEF(int nargs, VALUE *args, VALUE self) { int argc; VALUE argv[1]; int ii; argc = nargs; if (argc > 1) SWIG_fail; for (ii = 0; (ii < argc); ++ii) { argv[ii] = args[ii]; } if (argc == 0) { return _wrap_new_IDMEF__SWIG_0(nargs, args, self); } if (argc == 1) { int _v; void *vptr = 0; int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_Prelude__IDMEF, 0); _v = SWIG_CheckState(res); if (_v) { return _wrap_new_IDMEF__SWIG_1(nargs, args, self); } } if (argc == 1) { int _v; void *vptr = 0; int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_idmef_message_t, 0); _v = SWIG_CheckState(res); if (_v) { return _wrap_new_IDMEF__SWIG_2(nargs, args, self); } } fail: Ruby_Format_OverloadedError( argc, 1, "IDMEF.new", " IDMEF.new()\n" " IDMEF.new(Prelude::IDMEF const &idmef)\n" " IDMEF.new(idmef_message_t *message)\n"); return Qnil; } SWIGINTERN VALUE _wrap_IDMEF_Set__SWIG_0(int argc, VALUE *argv, VALUE self) { Prelude::IDMEF *arg1 = (Prelude::IDMEF *) 0 ; char *arg2 = (char *) 0 ; std::vector< Prelude::IDMEFValue,std::allocator< Prelude::IDMEFValue > > arg3 ; void *argp1 = 0 ; int res1 = 0 ; int res2 ; char *buf2 = 0 ; int alloc2 = 0 ; if ((argc < 2) || (argc > 2)) { rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail; } res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Prelude__IDMEF, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Prelude::IDMEF *","Set", 1, self )); } arg1 = reinterpret_cast< Prelude::IDMEF * >(argp1); res2 = SWIG_AsCharPtrAndSize(argv[0], &buf2, NULL, &alloc2); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "char const *","Set", 2, argv[0] )); } arg2 = reinterpret_cast< char * >(buf2); { std::vector > *ptr = (std::vector > *)0; int res = swig::asptr(argv[1], &ptr); if (!SWIG_IsOK(res) || !ptr) { SWIG_exception_fail(SWIG_ArgError((ptr ? res : SWIG_TypeError)), Ruby_Format_TypeError( "", "std::vector< Prelude::IDMEFValue,std::allocator< Prelude::IDMEFValue > >","Set", 3, argv[1] )); } arg3 = *ptr; if (SWIG_IsNewObj(res)) delete ptr; } try { (arg1)->Set((char const *)arg2,arg3); } catch(Prelude::PreludeError &_e) { rb_exc_raise(SWIG_Ruby_ExceptionType(SWIGTYPE_p_Prelude__PreludeError, SWIG_NewPointerObj((new Prelude::PreludeError(static_cast< const Prelude::PreludeError& >(_e))),SWIGTYPE_p_Prelude__PreludeError,SWIG_POINTER_OWN))); SWIG_fail; } if (alloc2 == SWIG_NEWOBJ) delete[] buf2; return Qnil; fail: if (alloc2 == SWIG_NEWOBJ) delete[] buf2; return Qnil; } SWIGINTERN VALUE _wrap_IDMEF_Set__SWIG_1(int argc, VALUE *argv, VALUE self) { Prelude::IDMEF *arg1 = (Prelude::IDMEF *) 0 ; char *arg2 = (char *) 0 ; Prelude::IDMEFValue *arg3 = (Prelude::IDMEFValue *) 0 ; void *argp1 = 0 ; int res1 = 0 ; int res2 ; char *buf2 = 0 ; int alloc2 = 0 ; void *argp3 = 0 ; int res3 = 0 ; if ((argc < 2) || (argc > 2)) { rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail; } res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Prelude__IDMEF, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Prelude::IDMEF *","Set", 1, self )); } arg1 = reinterpret_cast< Prelude::IDMEF * >(argp1); res2 = SWIG_AsCharPtrAndSize(argv[0], &buf2, NULL, &alloc2); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "char const *","Set", 2, argv[0] )); } arg2 = reinterpret_cast< char * >(buf2); res3 = SWIG_ConvertPtr(argv[1], &argp3,SWIGTYPE_p_Prelude__IDMEFValue, 0 | 0 ); if (!SWIG_IsOK(res3)) { SWIG_exception_fail(SWIG_ArgError(res3), Ruby_Format_TypeError( "", "Prelude::IDMEFValue *","Set", 3, argv[1] )); } arg3 = reinterpret_cast< Prelude::IDMEFValue * >(argp3); try { (arg1)->Set((char const *)arg2,arg3); } catch(Prelude::PreludeError &_e) { rb_exc_raise(SWIG_Ruby_ExceptionType(SWIGTYPE_p_Prelude__PreludeError, SWIG_NewPointerObj((new Prelude::PreludeError(static_cast< const Prelude::PreludeError& >(_e))),SWIGTYPE_p_Prelude__PreludeError,SWIG_POINTER_OWN))); SWIG_fail; } if (alloc2 == SWIG_NEWOBJ) delete[] buf2; return Qnil; fail: if (alloc2 == SWIG_NEWOBJ) delete[] buf2; return Qnil; } SWIGINTERN VALUE _wrap_IDMEF_Set__SWIG_2(int argc, VALUE *argv, VALUE self) { Prelude::IDMEF *arg1 = (Prelude::IDMEF *) 0 ; char *arg2 = (char *) 0 ; Prelude::IDMEFTime *arg3 = 0 ; void *argp1 = 0 ; int res1 = 0 ; int res2 ; char *buf2 = 0 ; int alloc2 = 0 ; void *argp3 = 0 ; int res3 = 0 ; if ((argc < 2) || (argc > 2)) { rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail; } res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Prelude__IDMEF, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Prelude::IDMEF *","Set", 1, self )); } arg1 = reinterpret_cast< Prelude::IDMEF * >(argp1); res2 = SWIG_AsCharPtrAndSize(argv[0], &buf2, NULL, &alloc2); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "char const *","Set", 2, argv[0] )); } arg2 = reinterpret_cast< char * >(buf2); res3 = SWIG_ConvertPtr(argv[1], &argp3, SWIGTYPE_p_Prelude__IDMEFTime, 0 ); if (!SWIG_IsOK(res3)) { SWIG_exception_fail(SWIG_ArgError(res3), Ruby_Format_TypeError( "", "Prelude::IDMEFTime &","Set", 3, argv[1] )); } if (!argp3) { SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "Prelude::IDMEFTime &","Set", 3, argv[1])); } arg3 = reinterpret_cast< Prelude::IDMEFTime * >(argp3); try { (arg1)->Set((char const *)arg2,*arg3); } catch(Prelude::PreludeError &_e) { rb_exc_raise(SWIG_Ruby_ExceptionType(SWIGTYPE_p_Prelude__PreludeError, SWIG_NewPointerObj((new Prelude::PreludeError(static_cast< const Prelude::PreludeError& >(_e))),SWIGTYPE_p_Prelude__PreludeError,SWIG_POINTER_OWN))); SWIG_fail; } if (alloc2 == SWIG_NEWOBJ) delete[] buf2; return Qnil; fail: if (alloc2 == SWIG_NEWOBJ) delete[] buf2; return Qnil; } SWIGINTERN VALUE _wrap_IDMEF_Set__SWIG_3(int argc, VALUE *argv, VALUE self) { Prelude::IDMEF *arg1 = (Prelude::IDMEF *) 0 ; char *arg2 = (char *) 0 ; char *arg3 = (char *) 0 ; void *argp1 = 0 ; int res1 = 0 ; int res2 ; char *buf2 = 0 ; int alloc2 = 0 ; int res3 ; char *buf3 = 0 ; int alloc3 = 0 ; if ((argc < 2) || (argc > 2)) { rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail; } res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Prelude__IDMEF, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Prelude::IDMEF *","Set", 1, self )); } arg1 = reinterpret_cast< Prelude::IDMEF * >(argp1); res2 = SWIG_AsCharPtrAndSize(argv[0], &buf2, NULL, &alloc2); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "char const *","Set", 2, argv[0] )); } arg2 = reinterpret_cast< char * >(buf2); res3 = SWIG_AsCharPtrAndSize(argv[1], &buf3, NULL, &alloc3); if (!SWIG_IsOK(res3)) { SWIG_exception_fail(SWIG_ArgError(res3), Ruby_Format_TypeError( "", "char const *","Set", 3, argv[1] )); } arg3 = reinterpret_cast< char * >(buf3); try { (arg1)->Set((char const *)arg2,(char const *)arg3); } catch(Prelude::PreludeError &_e) { rb_exc_raise(SWIG_Ruby_ExceptionType(SWIGTYPE_p_Prelude__PreludeError, SWIG_NewPointerObj((new Prelude::PreludeError(static_cast< const Prelude::PreludeError& >(_e))),SWIGTYPE_p_Prelude__PreludeError,SWIG_POINTER_OWN))); SWIG_fail; } if (alloc2 == SWIG_NEWOBJ) delete[] buf2; if (alloc3 == SWIG_NEWOBJ) delete[] buf3; return Qnil; fail: if (alloc2 == SWIG_NEWOBJ) delete[] buf2; if (alloc3 == SWIG_NEWOBJ) delete[] buf3; return Qnil; } SWIGINTERN VALUE _wrap_IDMEF_Set__SWIG_4(int argc, VALUE *argv, VALUE self) { Prelude::IDMEF *arg1 = (Prelude::IDMEF *) 0 ; char *arg2 = (char *) 0 ; std::string arg3 ; void *argp1 = 0 ; int res1 = 0 ; int res2 ; char *buf2 = 0 ; int alloc2 = 0 ; if ((argc < 2) || (argc > 2)) { rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail; } res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Prelude__IDMEF, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Prelude::IDMEF *","Set", 1, self )); } arg1 = reinterpret_cast< Prelude::IDMEF * >(argp1); res2 = SWIG_AsCharPtrAndSize(argv[0], &buf2, NULL, &alloc2); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "char const *","Set", 2, argv[0] )); } arg2 = reinterpret_cast< char * >(buf2); { std::string *ptr = (std::string *)0; int res = SWIG_AsPtr_std_string(argv[1], &ptr); if (!SWIG_IsOK(res) || !ptr) { SWIG_exception_fail(SWIG_ArgError((ptr ? res : SWIG_TypeError)), Ruby_Format_TypeError( "", "std::string","Set", 3, argv[1] )); } arg3 = *ptr; if (SWIG_IsNewObj(res)) delete ptr; } try { (arg1)->Set((char const *)arg2,arg3); } catch(Prelude::PreludeError &_e) { rb_exc_raise(SWIG_Ruby_ExceptionType(SWIGTYPE_p_Prelude__PreludeError, SWIG_NewPointerObj((new Prelude::PreludeError(static_cast< const Prelude::PreludeError& >(_e))),SWIGTYPE_p_Prelude__PreludeError,SWIG_POINTER_OWN))); SWIG_fail; } if (alloc2 == SWIG_NEWOBJ) delete[] buf2; return Qnil; fail: if (alloc2 == SWIG_NEWOBJ) delete[] buf2; return Qnil; } SWIGINTERN VALUE _wrap_IDMEF_Set__SWIG_5(int argc, VALUE *argv, VALUE self) { Prelude::IDMEF *arg1 = (Prelude::IDMEF *) 0 ; char *arg2 = (char *) 0 ; int8_t arg3 ; void *argp1 = 0 ; int res1 = 0 ; int res2 ; char *buf2 = 0 ; int alloc2 = 0 ; char val3 ; int ecode3 = 0 ; if ((argc < 2) || (argc > 2)) { rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail; } res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Prelude__IDMEF, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Prelude::IDMEF *","Set", 1, self )); } arg1 = reinterpret_cast< Prelude::IDMEF * >(argp1); res2 = SWIG_AsCharPtrAndSize(argv[0], &buf2, NULL, &alloc2); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "char const *","Set", 2, argv[0] )); } arg2 = reinterpret_cast< char * >(buf2); ecode3 = SWIG_AsVal_char(argv[1], &val3); if (!SWIG_IsOK(ecode3)) { SWIG_exception_fail(SWIG_ArgError(ecode3), Ruby_Format_TypeError( "", "int8_t","Set", 3, argv[1] )); } arg3 = static_cast< int8_t >(val3); try { (arg1)->Set((char const *)arg2,arg3); } catch(Prelude::PreludeError &_e) { rb_exc_raise(SWIG_Ruby_ExceptionType(SWIGTYPE_p_Prelude__PreludeError, SWIG_NewPointerObj((new Prelude::PreludeError(static_cast< const Prelude::PreludeError& >(_e))),SWIGTYPE_p_Prelude__PreludeError,SWIG_POINTER_OWN))); SWIG_fail; } if (alloc2 == SWIG_NEWOBJ) delete[] buf2; return Qnil; fail: if (alloc2 == SWIG_NEWOBJ) delete[] buf2; return Qnil; } SWIGINTERN VALUE _wrap_IDMEF_Set__SWIG_6(int argc, VALUE *argv, VALUE self) { Prelude::IDMEF *arg1 = (Prelude::IDMEF *) 0 ; char *arg2 = (char *) 0 ; uint8_t arg3 ; void *argp1 = 0 ; int res1 = 0 ; int res2 ; char *buf2 = 0 ; int alloc2 = 0 ; unsigned char val3 ; int ecode3 = 0 ; if ((argc < 2) || (argc > 2)) { rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail; } res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Prelude__IDMEF, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Prelude::IDMEF *","Set", 1, self )); } arg1 = reinterpret_cast< Prelude::IDMEF * >(argp1); res2 = SWIG_AsCharPtrAndSize(argv[0], &buf2, NULL, &alloc2); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "char const *","Set", 2, argv[0] )); } arg2 = reinterpret_cast< char * >(buf2); ecode3 = SWIG_AsVal_unsigned_SS_char(argv[1], &val3); if (!SWIG_IsOK(ecode3)) { SWIG_exception_fail(SWIG_ArgError(ecode3), Ruby_Format_TypeError( "", "uint8_t","Set", 3, argv[1] )); } arg3 = static_cast< uint8_t >(val3); try { (arg1)->Set((char const *)arg2,arg3); } catch(Prelude::PreludeError &_e) { rb_exc_raise(SWIG_Ruby_ExceptionType(SWIGTYPE_p_Prelude__PreludeError, SWIG_NewPointerObj((new Prelude::PreludeError(static_cast< const Prelude::PreludeError& >(_e))),SWIGTYPE_p_Prelude__PreludeError,SWIG_POINTER_OWN))); SWIG_fail; } if (alloc2 == SWIG_NEWOBJ) delete[] buf2; return Qnil; fail: if (alloc2 == SWIG_NEWOBJ) delete[] buf2; return Qnil; } SWIGINTERN VALUE _wrap_IDMEF_Set__SWIG_7(int argc, VALUE *argv, VALUE self) { Prelude::IDMEF *arg1 = (Prelude::IDMEF *) 0 ; char *arg2 = (char *) 0 ; int16_t arg3 ; void *argp1 = 0 ; int res1 = 0 ; int res2 ; char *buf2 = 0 ; int alloc2 = 0 ; short val3 ; int ecode3 = 0 ; if ((argc < 2) || (argc > 2)) { rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail; } res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Prelude__IDMEF, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Prelude::IDMEF *","Set", 1, self )); } arg1 = reinterpret_cast< Prelude::IDMEF * >(argp1); res2 = SWIG_AsCharPtrAndSize(argv[0], &buf2, NULL, &alloc2); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "char const *","Set", 2, argv[0] )); } arg2 = reinterpret_cast< char * >(buf2); ecode3 = SWIG_AsVal_short(argv[1], &val3); if (!SWIG_IsOK(ecode3)) { SWIG_exception_fail(SWIG_ArgError(ecode3), Ruby_Format_TypeError( "", "int16_t","Set", 3, argv[1] )); } arg3 = static_cast< int16_t >(val3); try { (arg1)->Set((char const *)arg2,arg3); } catch(Prelude::PreludeError &_e) { rb_exc_raise(SWIG_Ruby_ExceptionType(SWIGTYPE_p_Prelude__PreludeError, SWIG_NewPointerObj((new Prelude::PreludeError(static_cast< const Prelude::PreludeError& >(_e))),SWIGTYPE_p_Prelude__PreludeError,SWIG_POINTER_OWN))); SWIG_fail; } if (alloc2 == SWIG_NEWOBJ) delete[] buf2; return Qnil; fail: if (alloc2 == SWIG_NEWOBJ) delete[] buf2; return Qnil; } SWIGINTERN VALUE _wrap_IDMEF_Set__SWIG_8(int argc, VALUE *argv, VALUE self) { Prelude::IDMEF *arg1 = (Prelude::IDMEF *) 0 ; char *arg2 = (char *) 0 ; uint16_t arg3 ; void *argp1 = 0 ; int res1 = 0 ; int res2 ; char *buf2 = 0 ; int alloc2 = 0 ; unsigned short val3 ; int ecode3 = 0 ; if ((argc < 2) || (argc > 2)) { rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail; } res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Prelude__IDMEF, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Prelude::IDMEF *","Set", 1, self )); } arg1 = reinterpret_cast< Prelude::IDMEF * >(argp1); res2 = SWIG_AsCharPtrAndSize(argv[0], &buf2, NULL, &alloc2); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "char const *","Set", 2, argv[0] )); } arg2 = reinterpret_cast< char * >(buf2); ecode3 = SWIG_AsVal_unsigned_SS_short(argv[1], &val3); if (!SWIG_IsOK(ecode3)) { SWIG_exception_fail(SWIG_ArgError(ecode3), Ruby_Format_TypeError( "", "uint16_t","Set", 3, argv[1] )); } arg3 = static_cast< uint16_t >(val3); try { (arg1)->Set((char const *)arg2,arg3); } catch(Prelude::PreludeError &_e) { rb_exc_raise(SWIG_Ruby_ExceptionType(SWIGTYPE_p_Prelude__PreludeError, SWIG_NewPointerObj((new Prelude::PreludeError(static_cast< const Prelude::PreludeError& >(_e))),SWIGTYPE_p_Prelude__PreludeError,SWIG_POINTER_OWN))); SWIG_fail; } if (alloc2 == SWIG_NEWOBJ) delete[] buf2; return Qnil; fail: if (alloc2 == SWIG_NEWOBJ) delete[] buf2; return Qnil; } SWIGINTERN VALUE _wrap_IDMEF_Set__SWIG_9(int argc, VALUE *argv, VALUE self) { Prelude::IDMEF *arg1 = (Prelude::IDMEF *) 0 ; char *arg2 = (char *) 0 ; int32_t arg3 ; void *argp1 = 0 ; int res1 = 0 ; int res2 ; char *buf2 = 0 ; int alloc2 = 0 ; int val3 ; int ecode3 = 0 ; if ((argc < 2) || (argc > 2)) { rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail; } res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Prelude__IDMEF, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Prelude::IDMEF *","Set", 1, self )); } arg1 = reinterpret_cast< Prelude::IDMEF * >(argp1); res2 = SWIG_AsCharPtrAndSize(argv[0], &buf2, NULL, &alloc2); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "char const *","Set", 2, argv[0] )); } arg2 = reinterpret_cast< char * >(buf2); ecode3 = SWIG_AsVal_int(argv[1], &val3); if (!SWIG_IsOK(ecode3)) { SWIG_exception_fail(SWIG_ArgError(ecode3), Ruby_Format_TypeError( "", "int32_t","Set", 3, argv[1] )); } arg3 = static_cast< int32_t >(val3); try { (arg1)->Set((char const *)arg2,arg3); } catch(Prelude::PreludeError &_e) { rb_exc_raise(SWIG_Ruby_ExceptionType(SWIGTYPE_p_Prelude__PreludeError, SWIG_NewPointerObj((new Prelude::PreludeError(static_cast< const Prelude::PreludeError& >(_e))),SWIGTYPE_p_Prelude__PreludeError,SWIG_POINTER_OWN))); SWIG_fail; } if (alloc2 == SWIG_NEWOBJ) delete[] buf2; return Qnil; fail: if (alloc2 == SWIG_NEWOBJ) delete[] buf2; return Qnil; } SWIGINTERN VALUE _wrap_IDMEF_Set__SWIG_10(int argc, VALUE *argv, VALUE self) { Prelude::IDMEF *arg1 = (Prelude::IDMEF *) 0 ; char *arg2 = (char *) 0 ; uint32_t arg3 ; void *argp1 = 0 ; int res1 = 0 ; int res2 ; char *buf2 = 0 ; int alloc2 = 0 ; unsigned int val3 ; int ecode3 = 0 ; if ((argc < 2) || (argc > 2)) { rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail; } res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Prelude__IDMEF, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Prelude::IDMEF *","Set", 1, self )); } arg1 = reinterpret_cast< Prelude::IDMEF * >(argp1); res2 = SWIG_AsCharPtrAndSize(argv[0], &buf2, NULL, &alloc2); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "char const *","Set", 2, argv[0] )); } arg2 = reinterpret_cast< char * >(buf2); ecode3 = SWIG_AsVal_unsigned_SS_int(argv[1], &val3); if (!SWIG_IsOK(ecode3)) { SWIG_exception_fail(SWIG_ArgError(ecode3), Ruby_Format_TypeError( "", "uint32_t","Set", 3, argv[1] )); } arg3 = static_cast< uint32_t >(val3); try { (arg1)->Set((char const *)arg2,arg3); } catch(Prelude::PreludeError &_e) { rb_exc_raise(SWIG_Ruby_ExceptionType(SWIGTYPE_p_Prelude__PreludeError, SWIG_NewPointerObj((new Prelude::PreludeError(static_cast< const Prelude::PreludeError& >(_e))),SWIGTYPE_p_Prelude__PreludeError,SWIG_POINTER_OWN))); SWIG_fail; } if (alloc2 == SWIG_NEWOBJ) delete[] buf2; return Qnil; fail: if (alloc2 == SWIG_NEWOBJ) delete[] buf2; return Qnil; } SWIGINTERN VALUE _wrap_IDMEF_Set__SWIG_11(int argc, VALUE *argv, VALUE self) { Prelude::IDMEF *arg1 = (Prelude::IDMEF *) 0 ; char *arg2 = (char *) 0 ; int64_t arg3 ; void *argp1 = 0 ; int res1 = 0 ; int res2 ; char *buf2 = 0 ; int alloc2 = 0 ; long long val3 ; int ecode3 = 0 ; if ((argc < 2) || (argc > 2)) { rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail; } res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Prelude__IDMEF, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Prelude::IDMEF *","Set", 1, self )); } arg1 = reinterpret_cast< Prelude::IDMEF * >(argp1); res2 = SWIG_AsCharPtrAndSize(argv[0], &buf2, NULL, &alloc2); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "char const *","Set", 2, argv[0] )); } arg2 = reinterpret_cast< char * >(buf2); ecode3 = SWIG_AsVal_long_SS_long(argv[1], &val3); if (!SWIG_IsOK(ecode3)) { SWIG_exception_fail(SWIG_ArgError(ecode3), Ruby_Format_TypeError( "", "int64_t","Set", 3, argv[1] )); } arg3 = static_cast< int64_t >(val3); try { (arg1)->Set((char const *)arg2,arg3); } catch(Prelude::PreludeError &_e) { rb_exc_raise(SWIG_Ruby_ExceptionType(SWIGTYPE_p_Prelude__PreludeError, SWIG_NewPointerObj((new Prelude::PreludeError(static_cast< const Prelude::PreludeError& >(_e))),SWIGTYPE_p_Prelude__PreludeError,SWIG_POINTER_OWN))); SWIG_fail; } if (alloc2 == SWIG_NEWOBJ) delete[] buf2; return Qnil; fail: if (alloc2 == SWIG_NEWOBJ) delete[] buf2; return Qnil; } SWIGINTERN VALUE _wrap_IDMEF_Set__SWIG_12(int argc, VALUE *argv, VALUE self) { Prelude::IDMEF *arg1 = (Prelude::IDMEF *) 0 ; char *arg2 = (char *) 0 ; uint64_t arg3 ; void *argp1 = 0 ; int res1 = 0 ; int res2 ; char *buf2 = 0 ; int alloc2 = 0 ; unsigned long long val3 ; int ecode3 = 0 ; if ((argc < 2) || (argc > 2)) { rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail; } res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Prelude__IDMEF, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Prelude::IDMEF *","Set", 1, self )); } arg1 = reinterpret_cast< Prelude::IDMEF * >(argp1); res2 = SWIG_AsCharPtrAndSize(argv[0], &buf2, NULL, &alloc2); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "char const *","Set", 2, argv[0] )); } arg2 = reinterpret_cast< char * >(buf2); ecode3 = SWIG_AsVal_unsigned_SS_long_SS_long(argv[1], &val3); if (!SWIG_IsOK(ecode3)) { SWIG_exception_fail(SWIG_ArgError(ecode3), Ruby_Format_TypeError( "", "uint64_t","Set", 3, argv[1] )); } arg3 = static_cast< uint64_t >(val3); try { (arg1)->Set((char const *)arg2,arg3); } catch(Prelude::PreludeError &_e) { rb_exc_raise(SWIG_Ruby_ExceptionType(SWIGTYPE_p_Prelude__PreludeError, SWIG_NewPointerObj((new Prelude::PreludeError(static_cast< const Prelude::PreludeError& >(_e))),SWIGTYPE_p_Prelude__PreludeError,SWIG_POINTER_OWN))); SWIG_fail; } if (alloc2 == SWIG_NEWOBJ) delete[] buf2; return Qnil; fail: if (alloc2 == SWIG_NEWOBJ) delete[] buf2; return Qnil; } SWIGINTERN VALUE _wrap_IDMEF_Set__SWIG_13(int argc, VALUE *argv, VALUE self) { Prelude::IDMEF *arg1 = (Prelude::IDMEF *) 0 ; char *arg2 = (char *) 0 ; float arg3 ; void *argp1 = 0 ; int res1 = 0 ; int res2 ; char *buf2 = 0 ; int alloc2 = 0 ; float val3 ; int ecode3 = 0 ; if ((argc < 2) || (argc > 2)) { rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail; } res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Prelude__IDMEF, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Prelude::IDMEF *","Set", 1, self )); } arg1 = reinterpret_cast< Prelude::IDMEF * >(argp1); res2 = SWIG_AsCharPtrAndSize(argv[0], &buf2, NULL, &alloc2); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "char const *","Set", 2, argv[0] )); } arg2 = reinterpret_cast< char * >(buf2); ecode3 = SWIG_AsVal_float(argv[1], &val3); if (!SWIG_IsOK(ecode3)) { SWIG_exception_fail(SWIG_ArgError(ecode3), Ruby_Format_TypeError( "", "float","Set", 3, argv[1] )); } arg3 = static_cast< float >(val3); try { (arg1)->Set((char const *)arg2,arg3); } catch(Prelude::PreludeError &_e) { rb_exc_raise(SWIG_Ruby_ExceptionType(SWIGTYPE_p_Prelude__PreludeError, SWIG_NewPointerObj((new Prelude::PreludeError(static_cast< const Prelude::PreludeError& >(_e))),SWIGTYPE_p_Prelude__PreludeError,SWIG_POINTER_OWN))); SWIG_fail; } if (alloc2 == SWIG_NEWOBJ) delete[] buf2; return Qnil; fail: if (alloc2 == SWIG_NEWOBJ) delete[] buf2; return Qnil; } SWIGINTERN VALUE _wrap_IDMEF_Set__SWIG_14(int argc, VALUE *argv, VALUE self) { Prelude::IDMEF *arg1 = (Prelude::IDMEF *) 0 ; char *arg2 = (char *) 0 ; double arg3 ; void *argp1 = 0 ; int res1 = 0 ; int res2 ; char *buf2 = 0 ; int alloc2 = 0 ; double val3 ; int ecode3 = 0 ; if ((argc < 2) || (argc > 2)) { rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail; } res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Prelude__IDMEF, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Prelude::IDMEF *","Set", 1, self )); } arg1 = reinterpret_cast< Prelude::IDMEF * >(argp1); res2 = SWIG_AsCharPtrAndSize(argv[0], &buf2, NULL, &alloc2); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "char const *","Set", 2, argv[0] )); } arg2 = reinterpret_cast< char * >(buf2); ecode3 = SWIG_AsVal_double(argv[1], &val3); if (!SWIG_IsOK(ecode3)) { SWIG_exception_fail(SWIG_ArgError(ecode3), Ruby_Format_TypeError( "", "double","Set", 3, argv[1] )); } arg3 = static_cast< double >(val3); try { (arg1)->Set((char const *)arg2,arg3); } catch(Prelude::PreludeError &_e) { rb_exc_raise(SWIG_Ruby_ExceptionType(SWIGTYPE_p_Prelude__PreludeError, SWIG_NewPointerObj((new Prelude::PreludeError(static_cast< const Prelude::PreludeError& >(_e))),SWIGTYPE_p_Prelude__PreludeError,SWIG_POINTER_OWN))); SWIG_fail; } if (alloc2 == SWIG_NEWOBJ) delete[] buf2; return Qnil; fail: if (alloc2 == SWIG_NEWOBJ) delete[] buf2; return Qnil; } SWIGINTERN VALUE _wrap_IDMEF_Set(int nargs, VALUE *args, VALUE self) { int argc; VALUE argv[4]; int ii; argc = nargs + 1; argv[0] = self; if (argc > 4) SWIG_fail; for (ii = 1; (ii < argc); ++ii) { argv[ii] = args[ii-1]; } if (argc == 3) { int _v; void *vptr = 0; int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_Prelude__IDMEF, 0); _v = SWIG_CheckState(res); if (_v) { int res = SWIG_AsCharPtrAndSize(argv[1], 0, NULL, 0); _v = SWIG_CheckState(res); if (_v) { void *vptr = 0; int res = SWIG_ConvertPtr(argv[2], &vptr, SWIGTYPE_p_Prelude__IDMEFValue, 0); _v = SWIG_CheckState(res); if (_v) { return _wrap_IDMEF_Set__SWIG_1(nargs, args, self); } } } } if (argc == 3) { int _v; void *vptr = 0; int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_Prelude__IDMEF, 0); _v = SWIG_CheckState(res); if (_v) { int res = SWIG_AsCharPtrAndSize(argv[1], 0, NULL, 0); _v = SWIG_CheckState(res); if (_v) { void *vptr = 0; int res = SWIG_ConvertPtr(argv[2], &vptr, SWIGTYPE_p_Prelude__IDMEFTime, 0); _v = SWIG_CheckState(res); if (_v) { return _wrap_IDMEF_Set__SWIG_2(nargs, args, self); } } } } if (argc == 3) { int _v; void *vptr = 0; int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_Prelude__IDMEF, 0); _v = SWIG_CheckState(res); if (_v) { int res = SWIG_AsCharPtrAndSize(argv[1], 0, NULL, 0); _v = SWIG_CheckState(res); if (_v) { { int res = SWIG_AsVal_unsigned_SS_char(argv[2], NULL); _v = SWIG_CheckState(res); } if (_v) { return _wrap_IDMEF_Set__SWIG_6(nargs, args, self); } } } } if (argc == 3) { int _v; void *vptr = 0; int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_Prelude__IDMEF, 0); _v = SWIG_CheckState(res); if (_v) { int res = SWIG_AsCharPtrAndSize(argv[1], 0, NULL, 0); _v = SWIG_CheckState(res); if (_v) { { int res = SWIG_AsVal_unsigned_SS_short(argv[2], NULL); _v = SWIG_CheckState(res); } if (_v) { return _wrap_IDMEF_Set__SWIG_8(nargs, args, self); } } } } if (argc == 3) { int _v; void *vptr = 0; int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_Prelude__IDMEF, 0); _v = SWIG_CheckState(res); if (_v) { int res = SWIG_AsCharPtrAndSize(argv[1], 0, NULL, 0); _v = SWIG_CheckState(res); if (_v) { { int res = SWIG_AsVal_short(argv[2], NULL); _v = SWIG_CheckState(res); } if (_v) { return _wrap_IDMEF_Set__SWIG_7(nargs, args, self); } } } } if (argc == 3) { int _v; void *vptr = 0; int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_Prelude__IDMEF, 0); _v = SWIG_CheckState(res); if (_v) { int res = SWIG_AsCharPtrAndSize(argv[1], 0, NULL, 0); _v = SWIG_CheckState(res); if (_v) { { int res = SWIG_AsVal_unsigned_SS_int(argv[2], NULL); _v = SWIG_CheckState(res); } if (_v) { return _wrap_IDMEF_Set__SWIG_10(nargs, args, self); } } } } if (argc == 3) { int _v; void *vptr = 0; int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_Prelude__IDMEF, 0); _v = SWIG_CheckState(res); if (_v) { int res = SWIG_AsCharPtrAndSize(argv[1], 0, NULL, 0); _v = SWIG_CheckState(res); if (_v) { { int res = SWIG_AsVal_int(argv[2], NULL); _v = SWIG_CheckState(res); } if (_v) { return _wrap_IDMEF_Set__SWIG_9(nargs, args, self); } } } } if (argc == 3) { int _v; void *vptr = 0; int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_Prelude__IDMEF, 0); _v = SWIG_CheckState(res); if (_v) { int res = SWIG_AsCharPtrAndSize(argv[1], 0, NULL, 0); _v = SWIG_CheckState(res); if (_v) { { int res = SWIG_AsVal_unsigned_SS_long_SS_long(argv[2], NULL); _v = SWIG_CheckState(res); } if (_v) { return _wrap_IDMEF_Set__SWIG_12(nargs, args, self); } } } } if (argc == 3) { int _v; void *vptr = 0; int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_Prelude__IDMEF, 0); _v = SWIG_CheckState(res); if (_v) { int res = SWIG_AsCharPtrAndSize(argv[1], 0, NULL, 0); _v = SWIG_CheckState(res); if (_v) { { int res = SWIG_AsVal_long_SS_long(argv[2], NULL); _v = SWIG_CheckState(res); } if (_v) { return _wrap_IDMEF_Set__SWIG_11(nargs, args, self); } } } } if (argc == 3) { int _v; void *vptr = 0; int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_Prelude__IDMEF, 0); _v = SWIG_CheckState(res); if (_v) { int res = SWIG_AsCharPtrAndSize(argv[1], 0, NULL, 0); _v = SWIG_CheckState(res); if (_v) { { int res = SWIG_AsVal_float(argv[2], NULL); _v = SWIG_CheckState(res); } if (_v) { return _wrap_IDMEF_Set__SWIG_13(nargs, args, self); } } } } if (argc == 3) { int _v; void *vptr = 0; int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_Prelude__IDMEF, 0); _v = SWIG_CheckState(res); if (_v) { int res = SWIG_AsCharPtrAndSize(argv[1], 0, NULL, 0); _v = SWIG_CheckState(res); if (_v) { { int res = SWIG_AsVal_double(argv[2], NULL); _v = SWIG_CheckState(res); } if (_v) { return _wrap_IDMEF_Set__SWIG_14(nargs, args, self); } } } } if (argc == 3) { int _v; void *vptr = 0; int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_Prelude__IDMEF, 0); _v = SWIG_CheckState(res); if (_v) { int res = SWIG_AsCharPtrAndSize(argv[1], 0, NULL, 0); _v = SWIG_CheckState(res); if (_v) { { int res = SWIG_AsVal_char(argv[2], NULL); _v = SWIG_CheckState(res); } if (_v) { return _wrap_IDMEF_Set__SWIG_5(nargs, args, self); } } } } if (argc == 3) { int _v; void *vptr = 0; int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_Prelude__IDMEF, 0); _v = SWIG_CheckState(res); if (_v) { int res = SWIG_AsCharPtrAndSize(argv[1], 0, NULL, 0); _v = SWIG_CheckState(res); if (_v) { int res = SWIG_AsPtr_std_string(argv[2], (std::string**)(0)); _v = SWIG_CheckState(res); if (_v) { return _wrap_IDMEF_Set__SWIG_4(nargs, args, self); } } } } if (argc == 3) { int _v; void *vptr = 0; int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_Prelude__IDMEF, 0); _v = SWIG_CheckState(res); if (_v) { int res = SWIG_AsCharPtrAndSize(argv[1], 0, NULL, 0); _v = SWIG_CheckState(res); if (_v) { int res = SWIG_AsCharPtrAndSize(argv[2], 0, NULL, 0); _v = SWIG_CheckState(res); if (_v) { return _wrap_IDMEF_Set__SWIG_3(nargs, args, self); } } } } if (argc == 3) { int _v; void *vptr = 0; int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_Prelude__IDMEF, 0); _v = SWIG_CheckState(res); if (_v) { int res = SWIG_AsCharPtrAndSize(argv[1], 0, NULL, 0); _v = SWIG_CheckState(res); if (_v) { int res = swig::asptr(argv[2], (std::vector >**)(0)); _v = SWIG_CheckState(res); if (_v) { return _wrap_IDMEF_Set__SWIG_0(nargs, args, self); } } } } fail: Ruby_Format_OverloadedError( argc, 4, "IDMEF.Set", " void IDMEF.Set(char const *path, std::vector< Prelude::IDMEFValue,std::allocator< Prelude::IDMEFValue > > value)\n" " void IDMEF.Set(char const *path, Prelude::IDMEFValue *value)\n" " void IDMEF.Set(char const *path, Prelude::IDMEFTime &value)\n" " void IDMEF.Set(char const *path, char const *value)\n" " void IDMEF.Set(char const *path, std::string value)\n" " void IDMEF.Set(char const *path, int8_t value)\n" " void IDMEF.Set(char const *path, uint8_t value)\n" " void IDMEF.Set(char const *path, int16_t value)\n" " void IDMEF.Set(char const *path, uint16_t value)\n" " void IDMEF.Set(char const *path, int32_t value)\n" " void IDMEF.Set(char const *path, uint32_t value)\n" " void IDMEF.Set(char const *path, int64_t value)\n" " void IDMEF.Set(char const *path, uint64_t value)\n" " void IDMEF.Set(char const *path, float value)\n" " void IDMEF.Set(char const *path, double value)\n"); return Qnil; } SWIGINTERN VALUE _wrap_IDMEF_Get(int argc, VALUE *argv, VALUE self) { Prelude::IDMEF *arg1 = (Prelude::IDMEF *) 0 ; char *arg2 = (char *) 0 ; void *argp1 = 0 ; int res1 = 0 ; int res2 ; char *buf2 = 0 ; int alloc2 = 0 ; Prelude::IDMEFValue result; VALUE vresult = Qnil; if ((argc < 1) || (argc > 1)) { rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; } res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Prelude__IDMEF, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Prelude::IDMEF *","Get", 1, self )); } arg1 = reinterpret_cast< Prelude::IDMEF * >(argp1); res2 = SWIG_AsCharPtrAndSize(argv[0], &buf2, NULL, &alloc2); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "char const *","Get", 2, argv[0] )); } arg2 = reinterpret_cast< char * >(buf2); try { result = (arg1)->Get((char const *)arg2); } catch(Prelude::PreludeError &_e) { rb_exc_raise(SWIG_Ruby_ExceptionType(SWIGTYPE_p_Prelude__PreludeError, SWIG_NewPointerObj((new Prelude::PreludeError(static_cast< const Prelude::PreludeError& >(_e))),SWIGTYPE_p_Prelude__PreludeError,SWIG_POINTER_OWN))); SWIG_fail; } { int ret; if ( (&result)->IsNull() ) vresult = Qnil; else { ret = IDMEFValue_to_SWIG(result, &vresult); if ( ret < 0 ) { std::stringstream s; s << "IDMEFValue typemap does not handle value of type '" << idmef_value_type_to_string((&result)->GetType()) << "'"; SWIG_exception_fail(SWIG_ValueError, s.str().c_str()); } } } if (alloc2 == SWIG_NEWOBJ) delete[] buf2; return vresult; fail: if (alloc2 == SWIG_NEWOBJ) delete[] buf2; return Qnil; } SWIGINTERN VALUE _wrap_IDMEF_Clone(int argc, VALUE *argv, VALUE self) { Prelude::IDMEF *arg1 = (Prelude::IDMEF *) 0 ; Prelude::IDMEF *arg2 = 0 ; void *argp1 = 0 ; int res1 = 0 ; void *argp2 ; int res2 = 0 ; Prelude::IDMEF result; VALUE vresult = Qnil; if ((argc < 1) || (argc > 1)) { rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; } res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Prelude__IDMEF, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Prelude::IDMEF *","Clone", 1, self )); } arg1 = reinterpret_cast< Prelude::IDMEF * >(argp1); res2 = SWIG_ConvertPtr(argv[0], &argp2, SWIGTYPE_p_Prelude__IDMEF, 0 ); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "Prelude::IDMEF const &","Clone", 2, argv[0] )); } if (!argp2) { SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "Prelude::IDMEF const &","Clone", 2, argv[0])); } arg2 = reinterpret_cast< Prelude::IDMEF * >(argp2); try { result = (arg1)->Clone((Prelude::IDMEF const &)*arg2); } catch(Prelude::PreludeError &_e) { rb_exc_raise(SWIG_Ruby_ExceptionType(SWIGTYPE_p_Prelude__PreludeError, SWIG_NewPointerObj((new Prelude::PreludeError(static_cast< const Prelude::PreludeError& >(_e))),SWIGTYPE_p_Prelude__PreludeError,SWIG_POINTER_OWN))); SWIG_fail; } vresult = SWIG_NewPointerObj((new Prelude::IDMEF(static_cast< const Prelude::IDMEF& >(result))), SWIGTYPE_p_Prelude__IDMEF, SWIG_POINTER_OWN | 0 ); return vresult; fail: return Qnil; } SWIGINTERN VALUE _wrap_IDMEF_ToString(int argc, VALUE *argv, VALUE self) { Prelude::IDMEF *arg1 = (Prelude::IDMEF *) 0 ; void *argp1 = 0 ; int res1 = 0 ; std::string result; VALUE vresult = Qnil; if ((argc < 0) || (argc > 0)) { rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; } res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Prelude__IDMEF, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Prelude::IDMEF const *","ToString", 1, self )); } arg1 = reinterpret_cast< Prelude::IDMEF * >(argp1); try { result = ((Prelude::IDMEF const *)arg1)->ToString(); } catch(Prelude::PreludeError &_e) { rb_exc_raise(SWIG_Ruby_ExceptionType(SWIGTYPE_p_Prelude__PreludeError, SWIG_NewPointerObj((new Prelude::PreludeError(static_cast< const Prelude::PreludeError& >(_e))),SWIGTYPE_p_Prelude__PreludeError,SWIG_POINTER_OWN))); SWIG_fail; } vresult = SWIG_From_std_string(static_cast< std::string >(result)); return vresult; fail: return Qnil; } SWIGINTERN VALUE _wrap_IDMEF___str__(int argc, VALUE *argv, VALUE self) { Prelude::IDMEF *arg1 = (Prelude::IDMEF *) 0 ; void *argp1 = 0 ; int res1 = 0 ; std::string result; VALUE vresult = Qnil; if ((argc < 0) || (argc > 0)) { rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; } res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Prelude__IDMEF, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Prelude::IDMEF const *","operator const std::string", 1, self )); } arg1 = reinterpret_cast< Prelude::IDMEF * >(argp1); try { result = ((Prelude::IDMEF const *)arg1)->operator const std::string(); } catch(Prelude::PreludeError &_e) { rb_exc_raise(SWIG_Ruby_ExceptionType(SWIGTYPE_p_Prelude__PreludeError, SWIG_NewPointerObj((new Prelude::PreludeError(static_cast< const Prelude::PreludeError& >(_e))),SWIGTYPE_p_Prelude__PreludeError,SWIG_POINTER_OWN))); SWIG_fail; } vresult = SWIG_From_std_string(static_cast< std::string >(result)); return vresult; fail: return Qnil; } SWIGINTERN VALUE _wrap_IDMEF_Write(int argc, VALUE *argv, VALUE self) { Prelude::IDMEF *arg1 = (Prelude::IDMEF *) 0 ; void *arg2 = (void *) 0 ; void *argp1 = 0 ; int res1 = 0 ; if ((argc < 1) || (argc > 1)) { rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; } res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Prelude__IDMEF, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Prelude::IDMEF *","Write", 1, self )); } arg1 = reinterpret_cast< Prelude::IDMEF * >(argp1); { Check_Type(argv[0], T_FILE); arg2 = &argv[0]; } Prelude_IDMEF_Write(arg1,arg2); return Qnil; fail: return Qnil; } SWIGINTERN VALUE _wrap_IDMEF_Read(int argc, VALUE *argv, VALUE self) { Prelude::IDMEF *arg1 = (Prelude::IDMEF *) 0 ; void *arg2 = (void *) 0 ; void *argp1 = 0 ; int res1 = 0 ; if ((argc < 1) || (argc > 1)) { rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; } res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Prelude__IDMEF, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Prelude::IDMEF *","Read", 1, self )); } arg1 = reinterpret_cast< Prelude::IDMEF * >(argp1); { Check_Type(argv[0], T_FILE); arg2 = &argv[0]; } Prelude_IDMEF_Read(arg1,arg2); return Qnil; fail: return Qnil; } /* Document-method: PreludeEasy::IDMEF.>> call-seq: >>(nocast_p) -> IDMEF Right shifting operator or extracting operator. */ SWIGINTERN VALUE _wrap_IDMEF___rshift__(int argc, VALUE *argv, VALUE self) { Prelude::IDMEF *arg1 = (Prelude::IDMEF *) 0 ; void *arg2 = (void *) 0 ; void *argp1 = 0 ; int res1 = 0 ; Prelude::IDMEF *result = 0 ; VALUE vresult = Qnil; if ((argc < 1) || (argc > 1)) { rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; } res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Prelude__IDMEF, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Prelude::IDMEF *","operator >>", 1, self )); } arg1 = reinterpret_cast< Prelude::IDMEF * >(argp1); { Check_Type(argv[0], T_FILE); arg2 = &argv[0]; } result = (Prelude::IDMEF *) &Prelude_IDMEF_operator_Sg__Sg_(arg1,arg2); vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Prelude__IDMEF, 0 | 0 ); return vresult; fail: return Qnil; } /* Document-method: PreludeEasy::IDMEF.<< call-seq: <<(nocast_p) -> IDMEF Left shifting or appending operator. */ SWIGINTERN VALUE _wrap_IDMEF___lshift__(int argc, VALUE *argv, VALUE self) { Prelude::IDMEF *arg1 = (Prelude::IDMEF *) 0 ; void *arg2 = (void *) 0 ; void *argp1 = 0 ; int res1 = 0 ; Prelude::IDMEF *result = 0 ; VALUE vresult = Qnil; if ((argc < 1) || (argc > 1)) { rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; } res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Prelude__IDMEF, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Prelude::IDMEF *","operator <<", 1, self )); } arg1 = reinterpret_cast< Prelude::IDMEF * >(argp1); { Check_Type(argv[0], T_FILE); arg2 = &argv[0]; } result = (Prelude::IDMEF *) &Prelude_IDMEF_operator_Sl__Sl_(arg1,arg2); vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Prelude__IDMEF, 0 | 0 ); return vresult; fail: return Qnil; } /* -------- TYPE CONVERSION AND EQUIVALENCE RULES (BEGIN) -------- */ static void *_p_swig__IteratorTo_p_swig__ConstIterator(void *x, int *SWIGUNUSEDPARM(newmemory)) { return (void *)((swig::ConstIterator *) ((swig::Iterator *) x)); } static void *_p_Prelude__ClientTo_p_Prelude__ClientProfile(void *x, int *SWIGUNUSEDPARM(newmemory)) { return (void *)((Prelude::ClientProfile *) ((Prelude::Client *) x)); } static void *_p_Prelude__ClientEasyTo_p_Prelude__ClientProfile(void *x, int *SWIGUNUSEDPARM(newmemory)) { return (void *)((Prelude::ClientProfile *) (Prelude::Client *) ((Prelude::ClientEasy *) x)); } static void *_p_Prelude__PreludeErrorTo_p_std__exception(void *x, int *SWIGUNUSEDPARM(newmemory)) { return (void *)((std::exception *) ((Prelude::PreludeError *) x)); } static void *_p_Prelude__ClientEasyTo_p_Prelude__Client(void *x, int *SWIGUNUSEDPARM(newmemory)) { return (void *)((Prelude::Client *) ((Prelude::ClientEasy *) x)); } static swig_type_info _swigt__p_Prelude__Client = {"_p_Prelude__Client", "Prelude::Client *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_Prelude__ClientEasy = {"_p_Prelude__ClientEasy", "Prelude::ClientEasy *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_Prelude__ClientProfile = {"_p_Prelude__ClientProfile", "Prelude::ClientProfile *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_Prelude__Connection = {"_p_Prelude__Connection", "Prelude::Connection *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_Prelude__ConnectionPool = {"_p_Prelude__ConnectionPool", "Prelude::ConnectionPool *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_Prelude__IDMEF = {"_p_Prelude__IDMEF", "Prelude::IDMEF *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_Prelude__IDMEFCriteria = {"_p_Prelude__IDMEFCriteria", "Prelude::IDMEFCriteria *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_Prelude__IDMEFCriterion = {"_p_Prelude__IDMEFCriterion", "Prelude::IDMEFCriterion *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_Prelude__IDMEFPath = {"_p_Prelude__IDMEFPath", "Prelude::IDMEFPath *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_Prelude__IDMEFTime = {"_p_Prelude__IDMEFTime", "Prelude::IDMEFTime *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_Prelude__IDMEFValue = {"_p_Prelude__IDMEFValue", "Prelude::IDMEFValue *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_Prelude__PreludeError = {"_p_Prelude__PreludeError", "Prelude::PreludeError *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_Prelude__PreludeLog = {"_p_Prelude__PreludeLog", "Prelude::PreludeLog *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_allocator_type = {"_p_allocator_type", "allocator_type *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_char = {"_p_char", "char *|int8_t *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_difference_type = {"_p_difference_type", "difference_type *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_f_int_p_q_const__char__void = {"_p_f_int_p_q_const__char__void", "void (*)(int,char const *)", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_idmef_class_id_t = {"_p_idmef_class_id_t", "idmef_class_id_t *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_idmef_criteria_t = {"_p_idmef_criteria_t", "idmef_criteria_t *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_idmef_criterion_operator_t = {"_p_idmef_criterion_operator_t", "idmef_criterion_operator_t *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_idmef_message_t = {"_p_idmef_message_t", "idmef_message_t *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_idmef_path_t = {"_p_idmef_path_t", "idmef_path_t *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_idmef_time_t = {"_p_idmef_time_t", "idmef_time_t *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_idmef_value_t = {"_p_idmef_value_t", "idmef_value_t *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_idmef_value_type_id_t = {"_p_idmef_value_type_id_t", "idmef_value_type_id_t *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_int = {"_p_int", "int *|int32_t *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_long_long = {"_p_long_long", "int64_t *|long long *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_p_void = {"_p_p_void", "void **|VALUE *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_prelude_client_profile_t = {"_p_prelude_client_profile_t", "prelude_client_profile_t *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_prelude_client_t = {"_p_prelude_client_t", "prelude_client_t *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_prelude_connection_pool_t = {"_p_prelude_connection_pool_t", "prelude_connection_pool_t *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_prelude_connection_t = {"_p_prelude_connection_t", "prelude_connection_t *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_short = {"_p_short", "short *|int16_t *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_size_type = {"_p_size_type", "size_type *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_std__exception = {"_p_std__exception", "std::exception *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_swig__ConstIterator = {"_p_swig__ConstIterator", "swig::ConstIterator *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_swig__GC_VALUE = {"_p_swig__GC_VALUE", "swig::GC_VALUE *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_swig__Iterator = {"_p_swig__Iterator", "swig::Iterator *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_time_t = {"_p_time_t", "time_t *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_timeval = {"_p_timeval", "timeval *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_unsigned_char = {"_p_unsigned_char", "unsigned char *|uint8_t *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_unsigned_int = {"_p_unsigned_int", "uint32_t *|unsigned int *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_unsigned_long_long = {"_p_unsigned_long_long", "uint64_t *|unsigned long long *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_unsigned_short = {"_p_unsigned_short", "unsigned short *|uint16_t *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_value_type = {"_p_value_type", "value_type *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_void = {"_p_void", "void *", 0, 0, (void*)0, 0}; static swig_type_info *swig_type_initial[] = { &_swigt__p_Prelude__Client, &_swigt__p_Prelude__ClientEasy, &_swigt__p_Prelude__ClientProfile, &_swigt__p_Prelude__Connection, &_swigt__p_Prelude__ConnectionPool, &_swigt__p_Prelude__IDMEF, &_swigt__p_Prelude__IDMEFCriteria, &_swigt__p_Prelude__IDMEFCriterion, &_swigt__p_Prelude__IDMEFPath, &_swigt__p_Prelude__IDMEFTime, &_swigt__p_Prelude__IDMEFValue, &_swigt__p_Prelude__PreludeError, &_swigt__p_Prelude__PreludeLog, &_swigt__p_allocator_type, &_swigt__p_char, &_swigt__p_difference_type, &_swigt__p_f_int_p_q_const__char__void, &_swigt__p_idmef_class_id_t, &_swigt__p_idmef_criteria_t, &_swigt__p_idmef_criterion_operator_t, &_swigt__p_idmef_message_t, &_swigt__p_idmef_path_t, &_swigt__p_idmef_time_t, &_swigt__p_idmef_value_t, &_swigt__p_idmef_value_type_id_t, &_swigt__p_int, &_swigt__p_long_long, &_swigt__p_p_void, &_swigt__p_prelude_client_profile_t, &_swigt__p_prelude_client_t, &_swigt__p_prelude_connection_pool_t, &_swigt__p_prelude_connection_t, &_swigt__p_short, &_swigt__p_size_type, &_swigt__p_std__exception, &_swigt__p_swig__ConstIterator, &_swigt__p_swig__GC_VALUE, &_swigt__p_swig__Iterator, &_swigt__p_time_t, &_swigt__p_timeval, &_swigt__p_unsigned_char, &_swigt__p_unsigned_int, &_swigt__p_unsigned_long_long, &_swigt__p_unsigned_short, &_swigt__p_value_type, &_swigt__p_void, }; static swig_cast_info _swigc__p_Prelude__Client[] = { {&_swigt__p_Prelude__Client, 0, 0, 0}, {&_swigt__p_Prelude__ClientEasy, _p_Prelude__ClientEasyTo_p_Prelude__Client, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_Prelude__ClientEasy[] = { {&_swigt__p_Prelude__ClientEasy, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_Prelude__ClientProfile[] = { {&_swigt__p_Prelude__Client, _p_Prelude__ClientTo_p_Prelude__ClientProfile, 0, 0}, {&_swigt__p_Prelude__ClientProfile, 0, 0, 0}, {&_swigt__p_Prelude__ClientEasy, _p_Prelude__ClientEasyTo_p_Prelude__ClientProfile, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_Prelude__Connection[] = { {&_swigt__p_Prelude__Connection, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_Prelude__ConnectionPool[] = { {&_swigt__p_Prelude__ConnectionPool, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_Prelude__IDMEF[] = { {&_swigt__p_Prelude__IDMEF, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_Prelude__IDMEFCriteria[] = { {&_swigt__p_Prelude__IDMEFCriteria, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_Prelude__IDMEFCriterion[] = { {&_swigt__p_Prelude__IDMEFCriterion, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_Prelude__IDMEFPath[] = { {&_swigt__p_Prelude__IDMEFPath, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_Prelude__IDMEFTime[] = { {&_swigt__p_Prelude__IDMEFTime, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_Prelude__IDMEFValue[] = { {&_swigt__p_Prelude__IDMEFValue, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_Prelude__PreludeError[] = { {&_swigt__p_Prelude__PreludeError, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_Prelude__PreludeLog[] = { {&_swigt__p_Prelude__PreludeLog, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_allocator_type[] = { {&_swigt__p_allocator_type, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_char[] = { {&_swigt__p_char, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_difference_type[] = { {&_swigt__p_difference_type, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_f_int_p_q_const__char__void[] = { {&_swigt__p_f_int_p_q_const__char__void, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_idmef_class_id_t[] = { {&_swigt__p_idmef_class_id_t, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_idmef_criteria_t[] = { {&_swigt__p_idmef_criteria_t, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_idmef_criterion_operator_t[] = { {&_swigt__p_idmef_criterion_operator_t, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_idmef_message_t[] = { {&_swigt__p_idmef_message_t, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_idmef_path_t[] = { {&_swigt__p_idmef_path_t, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_idmef_time_t[] = { {&_swigt__p_idmef_time_t, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_idmef_value_t[] = { {&_swigt__p_idmef_value_t, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_idmef_value_type_id_t[] = { {&_swigt__p_idmef_value_type_id_t, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_int[] = { {&_swigt__p_int, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_long_long[] = { {&_swigt__p_long_long, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_p_void[] = { {&_swigt__p_p_void, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_prelude_client_profile_t[] = { {&_swigt__p_prelude_client_profile_t, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_prelude_client_t[] = { {&_swigt__p_prelude_client_t, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_prelude_connection_pool_t[] = { {&_swigt__p_prelude_connection_pool_t, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_prelude_connection_t[] = { {&_swigt__p_prelude_connection_t, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_short[] = { {&_swigt__p_short, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_size_type[] = { {&_swigt__p_size_type, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_std__exception[] = { {&_swigt__p_std__exception, 0, 0, 0}, {&_swigt__p_Prelude__PreludeError, _p_Prelude__PreludeErrorTo_p_std__exception, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_swig__ConstIterator[] = { {&_swigt__p_swig__ConstIterator, 0, 0, 0}, {&_swigt__p_swig__Iterator, _p_swig__IteratorTo_p_swig__ConstIterator, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_swig__GC_VALUE[] = { {&_swigt__p_swig__GC_VALUE, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_swig__Iterator[] = { {&_swigt__p_swig__Iterator, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_time_t[] = { {&_swigt__p_time_t, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_timeval[] = { {&_swigt__p_timeval, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_unsigned_char[] = { {&_swigt__p_unsigned_char, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_unsigned_int[] = { {&_swigt__p_unsigned_int, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_unsigned_long_long[] = { {&_swigt__p_unsigned_long_long, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_unsigned_short[] = { {&_swigt__p_unsigned_short, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_value_type[] = { {&_swigt__p_value_type, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_void[] = { {&_swigt__p_void, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info *swig_cast_initial[] = { _swigc__p_Prelude__Client, _swigc__p_Prelude__ClientEasy, _swigc__p_Prelude__ClientProfile, _swigc__p_Prelude__Connection, _swigc__p_Prelude__ConnectionPool, _swigc__p_Prelude__IDMEF, _swigc__p_Prelude__IDMEFCriteria, _swigc__p_Prelude__IDMEFCriterion, _swigc__p_Prelude__IDMEFPath, _swigc__p_Prelude__IDMEFTime, _swigc__p_Prelude__IDMEFValue, _swigc__p_Prelude__PreludeError, _swigc__p_Prelude__PreludeLog, _swigc__p_allocator_type, _swigc__p_char, _swigc__p_difference_type, _swigc__p_f_int_p_q_const__char__void, _swigc__p_idmef_class_id_t, _swigc__p_idmef_criteria_t, _swigc__p_idmef_criterion_operator_t, _swigc__p_idmef_message_t, _swigc__p_idmef_path_t, _swigc__p_idmef_time_t, _swigc__p_idmef_value_t, _swigc__p_idmef_value_type_id_t, _swigc__p_int, _swigc__p_long_long, _swigc__p_p_void, _swigc__p_prelude_client_profile_t, _swigc__p_prelude_client_t, _swigc__p_prelude_connection_pool_t, _swigc__p_prelude_connection_t, _swigc__p_short, _swigc__p_size_type, _swigc__p_std__exception, _swigc__p_swig__ConstIterator, _swigc__p_swig__GC_VALUE, _swigc__p_swig__Iterator, _swigc__p_time_t, _swigc__p_timeval, _swigc__p_unsigned_char, _swigc__p_unsigned_int, _swigc__p_unsigned_long_long, _swigc__p_unsigned_short, _swigc__p_value_type, _swigc__p_void, }; /* -------- TYPE CONVERSION AND EQUIVALENCE RULES (END) -------- */ /* ----------------------------------------------------------------------------- * Type initialization: * This problem is tough by the requirement that no dynamic * memory is used. Also, since swig_type_info structures store pointers to * swig_cast_info structures and swig_cast_info structures store pointers back * to swig_type_info structures, we need some lookup code at initialization. * The idea is that swig generates all the structures that are needed. * The runtime then collects these partially filled structures. * The SWIG_InitializeModule function takes these initial arrays out of * swig_module, and does all the lookup, filling in the swig_module.types * array with the correct data and linking the correct swig_cast_info * structures together. * * The generated swig_type_info structures are assigned staticly to an initial * array. We just loop through that array, and handle each type individually. * First we lookup if this type has been already loaded, and if so, use the * loaded structure instead of the generated one. Then we have to fill in the * cast linked list. The cast data is initially stored in something like a * two-dimensional array. Each row corresponds to a type (there are the same * number of rows as there are in the swig_type_initial array). Each entry in * a column is one of the swig_cast_info structures for that type. * The cast_initial array is actually an array of arrays, because each row has * a variable number of columns. So to actually build the cast linked list, * we find the array of casts associated with the type, and loop through it * adding the casts to the list. The one last trick we need to do is making * sure the type pointer in the swig_cast_info struct is correct. * * First off, we lookup the cast->type name to see if it is already loaded. * There are three cases to handle: * 1) If the cast->type has already been loaded AND the type we are adding * casting info to has not been loaded (it is in this module), THEN we * replace the cast->type pointer with the type pointer that has already * been loaded. * 2) If BOTH types (the one we are adding casting info to, and the * cast->type) are loaded, THEN the cast info has already been loaded by * the previous module so we just ignore it. * 3) Finally, if cast->type has not already been loaded, then we add that * swig_cast_info to the linked list (because the cast->type) pointer will * be correct. * ----------------------------------------------------------------------------- */ #ifdef __cplusplus extern "C" { #if 0 } /* c-mode */ #endif #endif #if 0 #define SWIGRUNTIME_DEBUG #endif SWIGRUNTIME void SWIG_InitializeModule(void *clientdata) { size_t i; swig_module_info *module_head, *iter; int found, init; clientdata = clientdata; /* check to see if the circular list has been setup, if not, set it up */ if (swig_module.next==0) { /* Initialize the swig_module */ swig_module.type_initial = swig_type_initial; swig_module.cast_initial = swig_cast_initial; swig_module.next = &swig_module; init = 1; } else { init = 0; } /* Try and load any already created modules */ module_head = SWIG_GetModule(clientdata); if (!module_head) { /* This is the first module loaded for this interpreter */ /* so set the swig module into the interpreter */ SWIG_SetModule(clientdata, &swig_module); module_head = &swig_module; } else { /* the interpreter has loaded a SWIG module, but has it loaded this one? */ found=0; iter=module_head; do { if (iter==&swig_module) { found=1; break; } iter=iter->next; } while (iter!= module_head); /* if the is found in the list, then all is done and we may leave */ if (found) return; /* otherwise we must add out module into the list */ swig_module.next = module_head->next; module_head->next = &swig_module; } /* When multiple interpeters are used, a module could have already been initialized in a different interpreter, but not yet have a pointer in this interpreter. In this case, we do not want to continue adding types... everything should be set up already */ if (init == 0) return; /* Now work on filling in swig_module.types */ #ifdef SWIGRUNTIME_DEBUG printf("SWIG_InitializeModule: size %d\n", swig_module.size); #endif for (i = 0; i < swig_module.size; ++i) { swig_type_info *type = 0; swig_type_info *ret; swig_cast_info *cast; #ifdef SWIGRUNTIME_DEBUG printf("SWIG_InitializeModule: type %d %s\n", i, swig_module.type_initial[i]->name); #endif /* if there is another module already loaded */ if (swig_module.next != &swig_module) { type = SWIG_MangledTypeQueryModule(swig_module.next, &swig_module, swig_module.type_initial[i]->name); } if (type) { /* Overwrite clientdata field */ #ifdef SWIGRUNTIME_DEBUG printf("SWIG_InitializeModule: found type %s\n", type->name); #endif if (swig_module.type_initial[i]->clientdata) { type->clientdata = swig_module.type_initial[i]->clientdata; #ifdef SWIGRUNTIME_DEBUG printf("SWIG_InitializeModule: found and overwrite type %s \n", type->name); #endif } } else { type = swig_module.type_initial[i]; } /* Insert casting types */ cast = swig_module.cast_initial[i]; while (cast->type) { /* Don't need to add information already in the list */ ret = 0; #ifdef SWIGRUNTIME_DEBUG printf("SWIG_InitializeModule: look cast %s\n", cast->type->name); #endif if (swig_module.next != &swig_module) { ret = SWIG_MangledTypeQueryModule(swig_module.next, &swig_module, cast->type->name); #ifdef SWIGRUNTIME_DEBUG if (ret) printf("SWIG_InitializeModule: found cast %s\n", ret->name); #endif } if (ret) { if (type == swig_module.type_initial[i]) { #ifdef SWIGRUNTIME_DEBUG printf("SWIG_InitializeModule: skip old type %s\n", ret->name); #endif cast->type = ret; ret = 0; } else { /* Check for casting already in the list */ swig_cast_info *ocast = SWIG_TypeCheck(ret->name, type); #ifdef SWIGRUNTIME_DEBUG if (ocast) printf("SWIG_InitializeModule: skip old cast %s\n", ret->name); #endif if (!ocast) ret = 0; } } if (!ret) { #ifdef SWIGRUNTIME_DEBUG printf("SWIG_InitializeModule: adding cast %s\n", cast->type->name); #endif if (type->cast) { type->cast->prev = cast; cast->next = type->cast; } type->cast = cast; } cast++; } /* Set entry in modules->types array equal to the type */ swig_module.types[i] = type; } swig_module.types[i] = 0; #ifdef SWIGRUNTIME_DEBUG printf("**** SWIG_InitializeModule: Cast List ******\n"); for (i = 0; i < swig_module.size; ++i) { int j = 0; swig_cast_info *cast = swig_module.cast_initial[i]; printf("SWIG_InitializeModule: type %d %s\n", i, swig_module.type_initial[i]->name); while (cast->type) { printf("SWIG_InitializeModule: cast type %s\n", cast->type->name); cast++; ++j; } printf("---- Total casts: %d\n",j); } printf("**** SWIG_InitializeModule: Cast List ******\n"); #endif } /* This function will propagate the clientdata field of type to * any new swig_type_info structures that have been added into the list * of equivalent types. It is like calling * SWIG_TypeClientData(type, clientdata) a second time. */ SWIGRUNTIME void SWIG_PropagateClientData(void) { size_t i; swig_cast_info *equiv; static int init_run = 0; if (init_run) return; init_run = 1; for (i = 0; i < swig_module.size; i++) { if (swig_module.types[i]->clientdata) { equiv = swig_module.types[i]->cast; while (equiv) { if (!equiv->converter) { if (equiv->type && !equiv->type->clientdata) SWIG_TypeClientData(equiv->type, swig_module.types[i]->clientdata); } equiv = equiv->next; } } } } #ifdef __cplusplus #if 0 { /* c-mode */ #endif } #endif /* */ #ifdef __cplusplus extern "C" #endif SWIGEXPORT void Init_PreludeEasy(void) { size_t i; SWIG_InitRuntime(); mPreludeEasy = rb_define_module("PreludeEasy"); SWIG_InitializeModule(0); for (i = 0; i < swig_module.size; i++) { SWIG_define_class(swig_module.types[i]); } SWIG_RubyInitializeTrackings(); SwigClassGC_VALUE.klass = rb_define_class_under(mPreludeEasy, "GC_VALUE", rb_cObject); SWIG_TypeClientData(SWIGTYPE_p_swig__GC_VALUE, (void *) &SwigClassGC_VALUE); rb_undef_alloc_func(SwigClassGC_VALUE.klass); rb_define_method(SwigClassGC_VALUE.klass, "inspect", VALUEFUNC(_wrap_GC_VALUE_inspect), -1); rb_define_method(SwigClassGC_VALUE.klass, "to_s", VALUEFUNC(_wrap_GC_VALUE_to_s), -1); SwigClassGC_VALUE.mark = 0; SwigClassGC_VALUE.trackObjects = 0; swig::GC_VALUE::initialize(); SwigClassConstIterator.klass = rb_define_class_under(mPreludeEasy, "ConstIterator", rb_cObject); SWIG_TypeClientData(SWIGTYPE_p_swig__ConstIterator, (void *) &SwigClassConstIterator); rb_undef_alloc_func(SwigClassConstIterator.klass); rb_define_method(SwigClassConstIterator.klass, "value", VALUEFUNC(_wrap_ConstIterator_value), -1); rb_define_method(SwigClassConstIterator.klass, "dup", VALUEFUNC(_wrap_ConstIterator_dup), -1); rb_define_method(SwigClassConstIterator.klass, "inspect", VALUEFUNC(_wrap_ConstIterator_inspect), -1); rb_define_method(SwigClassConstIterator.klass, "to_s", VALUEFUNC(_wrap_ConstIterator_to_s), -1); rb_define_method(SwigClassConstIterator.klass, "next", VALUEFUNC(_wrap_ConstIterator_next), -1); rb_define_method(SwigClassConstIterator.klass, "previous", VALUEFUNC(_wrap_ConstIterator_previous), -1); rb_define_method(SwigClassConstIterator.klass, "==", VALUEFUNC(_wrap_ConstIterator___eq__), -1); rb_define_method(SwigClassConstIterator.klass, "+", VALUEFUNC(_wrap_ConstIterator___add__), -1); rb_define_method(SwigClassConstIterator.klass, "-", VALUEFUNC(_wrap_ConstIterator___sub__), -1); SwigClassConstIterator.mark = 0; SwigClassConstIterator.destroy = (void (*)(void *)) free_swig_ConstIterator; SwigClassConstIterator.trackObjects = 0; SwigClassIterator.klass = rb_define_class_under(mPreludeEasy, "Iterator", ((swig_class *) SWIGTYPE_p_swig__ConstIterator->clientdata)->klass); SWIG_TypeClientData(SWIGTYPE_p_swig__Iterator, (void *) &SwigClassIterator); rb_undef_alloc_func(SwigClassIterator.klass); rb_define_method(SwigClassIterator.klass, "value=", VALUEFUNC(_wrap_Iterator_valuee___), -1); rb_define_method(SwigClassIterator.klass, "dup", VALUEFUNC(_wrap_Iterator_dup), -1); rb_define_method(SwigClassIterator.klass, "next", VALUEFUNC(_wrap_Iterator_next), -1); rb_define_method(SwigClassIterator.klass, "previous", VALUEFUNC(_wrap_Iterator_previous), -1); rb_define_method(SwigClassIterator.klass, "inspect", VALUEFUNC(_wrap_Iterator_inspect), -1); rb_define_method(SwigClassIterator.klass, "to_s", VALUEFUNC(_wrap_Iterator_to_s), -1); rb_define_method(SwigClassIterator.klass, "==", VALUEFUNC(_wrap_Iterator___eq__), -1); rb_define_method(SwigClassIterator.klass, "+", VALUEFUNC(_wrap_Iterator___add__), -1); rb_define_method(SwigClassIterator.klass, "-", VALUEFUNC(_wrap_Iterator___sub__), -1); SwigClassIterator.mark = 0; SwigClassIterator.destroy = (void (*)(void *)) free_swig_Iterator; SwigClassIterator.trackObjects = 0; int ret; char **argv; int _i, argc; VALUE rbargv, *ptr; __initial_thread = (gl_thread_t) gl_thread_self(); rbargv = rb_const_get(rb_cObject, rb_intern("ARGV")); argc = RARRAY(rbargv)->len + 1; if ( argc + 1 < 0 ) throw PreludeError("Invalid argc length"); argv = (char **) malloc((argc + 1) * sizeof(char *)); if ( ! argv ) throw PreludeError("Allocation failure"); argv[0] = STR2CSTR(rb_gv_get("$0")); ptr = RARRAY(rbargv)->ptr; for ( ptr = RARRAY(rbargv)->ptr, _i = 1; _i < argc; _i++, ptr++ ) argv[_i] = STR2CSTR(*ptr); argv[_i] = NULL; ret = prelude_init(&argc, argv); if ( ret < 0 ) { free(argv); throw PreludeError(ret); } free(argv); rb_define_module_function(mPreludeEasy, "CheckVersion", VALUEFUNC(_wrap_CheckVersion), -1); SwigClassPreludeLog.klass = rb_define_class_under(mPreludeEasy, "PreludeLog", rb_cObject); SWIG_TypeClientData(SWIGTYPE_p_Prelude__PreludeLog, (void *) &SwigClassPreludeLog); rb_define_alloc_func(SwigClassPreludeLog.klass, _wrap_PreludeLog_allocate); rb_define_method(SwigClassPreludeLog.klass, "initialize", VALUEFUNC(_wrap_new_PreludeLog), -1); rb_define_const(SwigClassPreludeLog.klass, "DEBUG", SWIG_From_int(static_cast< int >(Prelude::PreludeLog::DEBUG))); rb_define_const(SwigClassPreludeLog.klass, "INFO", SWIG_From_int(static_cast< int >(Prelude::PreludeLog::INFO))); rb_define_const(SwigClassPreludeLog.klass, "WARNING", SWIG_From_int(static_cast< int >(Prelude::PreludeLog::WARNING))); rb_define_const(SwigClassPreludeLog.klass, "ERROR", SWIG_From_int(static_cast< int >(Prelude::PreludeLog::ERROR))); rb_define_const(SwigClassPreludeLog.klass, "CRITICAL", SWIG_From_int(static_cast< int >(Prelude::PreludeLog::CRITICAL))); rb_define_const(SwigClassPreludeLog.klass, "QUIET", SWIG_From_int(static_cast< int >(Prelude::PreludeLog::QUIET))); rb_define_const(SwigClassPreludeLog.klass, "SYSLOG", SWIG_From_int(static_cast< int >(Prelude::PreludeLog::SYSLOG))); rb_define_singleton_method(SwigClassPreludeLog.klass, "SetLevel", VALUEFUNC(_wrap_PreludeLog_SetLevel), -1); rb_define_singleton_method(SwigClassPreludeLog.klass, "SetDebugLevel", VALUEFUNC(_wrap_PreludeLog_SetDebugLevel), -1); rb_define_singleton_method(SwigClassPreludeLog.klass, "SetFlags", VALUEFUNC(_wrap_PreludeLog_SetFlags), -1); rb_define_singleton_method(SwigClassPreludeLog.klass, "GetFlags", VALUEFUNC(_wrap_PreludeLog_GetFlags), -1); rb_define_singleton_method(SwigClassPreludeLog.klass, "SetLogfile", VALUEFUNC(_wrap_PreludeLog_SetLogfile), -1); rb_define_singleton_method(SwigClassPreludeLog.klass, "SetCallback", VALUEFUNC(_wrap_PreludeLog_SetCallback), -1); SwigClassPreludeLog.mark = 0; SwigClassPreludeLog.destroy = (void (*)(void *)) free_Prelude_PreludeLog; SwigClassPreludeLog.trackObjects = 0; SwigClassPreludeError.klass = rb_define_class_under(mPreludeEasy, "PreludeError", rb_eRuntimeError); SWIG_TypeClientData(SWIGTYPE_p_Prelude__PreludeError, (void *) &SwigClassPreludeError); rb_define_alloc_func(SwigClassPreludeError.klass, _wrap_PreludeError_allocate); rb_define_method(SwigClassPreludeError.klass, "initialize", VALUEFUNC(_wrap_new_PreludeError), -1); rb_define_method(SwigClassPreludeError.klass, "what", VALUEFUNC(_wrap_PreludeError_what), -1); rb_define_method(SwigClassPreludeError.klass, "to_s", VALUEFUNC(_wrap_PreludeError___str__), -1); SwigClassPreludeError.mark = 0; SwigClassPreludeError.destroy = (void (*)(void *)) free_Prelude_PreludeError; SwigClassPreludeError.trackObjects = 0; SwigClassConnection.klass = rb_define_class_under(mPreludeEasy, "Connection", rb_cObject); SWIG_TypeClientData(SWIGTYPE_p_Prelude__Connection, (void *) &SwigClassConnection); rb_define_alloc_func(SwigClassConnection.klass, _wrap_Connection_allocate); rb_define_method(SwigClassConnection.klass, "initialize", VALUEFUNC(_wrap_new_Connection), -1); rb_define_method(SwigClassConnection.klass, "GetConnection", VALUEFUNC(_wrap_Connection_GetConnection), -1); rb_define_method(SwigClassConnection.klass, "Close", VALUEFUNC(_wrap_Connection_Close), -1); rb_define_method(SwigClassConnection.klass, "Connect", VALUEFUNC(_wrap_Connection_Connect), -1); rb_define_method(SwigClassConnection.klass, "SetState", VALUEFUNC(_wrap_Connection_SetState), -1); rb_define_method(SwigClassConnection.klass, "GetState", VALUEFUNC(_wrap_Connection_GetState), -1); rb_define_method(SwigClassConnection.klass, "SetData", VALUEFUNC(_wrap_Connection_SetData), -1); rb_define_method(SwigClassConnection.klass, "GetData", VALUEFUNC(_wrap_Connection_GetData), -1); rb_define_method(SwigClassConnection.klass, "GetPermission", VALUEFUNC(_wrap_Connection_GetPermission), -1); rb_define_method(SwigClassConnection.klass, "SetPeerAnalyzerid", VALUEFUNC(_wrap_Connection_SetPeerAnalyzerid), -1); rb_define_method(SwigClassConnection.klass, "GetPeerAnalyzerid", VALUEFUNC(_wrap_Connection_GetPeerAnalyzerid), -1); rb_define_method(SwigClassConnection.klass, "GetLocalAddr", VALUEFUNC(_wrap_Connection_GetLocalAddr), -1); rb_define_method(SwigClassConnection.klass, "GetLocalPort", VALUEFUNC(_wrap_Connection_GetLocalPort), -1); rb_define_method(SwigClassConnection.klass, "GetPeerAddr", VALUEFUNC(_wrap_Connection_GetPeerAddr), -1); rb_define_method(SwigClassConnection.klass, "GetPeerPort", VALUEFUNC(_wrap_Connection_GetPeerPort), -1); rb_define_method(SwigClassConnection.klass, "IsAlive", VALUEFUNC(_wrap_Connection_IsAlive), -1); rb_define_method(SwigClassConnection.klass, "GetFd", VALUEFUNC(_wrap_Connection_GetFd), -1); rb_define_method(SwigClassConnection.klass, "RecvIDMEF", VALUEFUNC(_wrap_Connection_RecvIDMEF), -1); SwigClassConnection.mark = 0; SwigClassConnection.destroy = (void (*)(void *)) free_Prelude_Connection; SwigClassConnection.trackObjects = 0; SwigClassConnectionPool.klass = rb_define_class_under(mPreludeEasy, "ConnectionPool", rb_cObject); SWIG_TypeClientData(SWIGTYPE_p_Prelude__ConnectionPool, (void *) &SwigClassConnectionPool); rb_define_alloc_func(SwigClassConnectionPool.klass, _wrap_ConnectionPool_allocate); rb_define_method(SwigClassConnectionPool.klass, "initialize", VALUEFUNC(_wrap_new_ConnectionPool), -1); rb_define_method(SwigClassConnectionPool.klass, "Init", VALUEFUNC(_wrap_ConnectionPool_Init), -1); rb_define_method(SwigClassConnectionPool.klass, "SetConnectionString", VALUEFUNC(_wrap_ConnectionPool_SetConnectionString), -1); rb_define_method(SwigClassConnectionPool.klass, "GetConnectionString", VALUEFUNC(_wrap_ConnectionPool_GetConnectionString), -1); rb_define_method(SwigClassConnectionPool.klass, "GetConnectionList", VALUEFUNC(_wrap_ConnectionPool_GetConnectionList), -1); rb_define_method(SwigClassConnectionPool.klass, "SetFlags", VALUEFUNC(_wrap_ConnectionPool_SetFlags), -1); rb_define_method(SwigClassConnectionPool.klass, "GetFlags", VALUEFUNC(_wrap_ConnectionPool_GetFlags), -1); rb_define_method(SwigClassConnectionPool.klass, "SetData", VALUEFUNC(_wrap_ConnectionPool_SetData), -1); rb_define_method(SwigClassConnectionPool.klass, "GetData", VALUEFUNC(_wrap_ConnectionPool_GetData), -1); rb_define_method(SwigClassConnectionPool.klass, "AddConnection", VALUEFUNC(_wrap_ConnectionPool_AddConnection), -1); rb_define_method(SwigClassConnectionPool.klass, "DelConnection", VALUEFUNC(_wrap_ConnectionPool_DelConnection), -1); rb_define_method(SwigClassConnectionPool.klass, "SetConnectionAlive", VALUEFUNC(_wrap_ConnectionPool_SetConnectionAlive), -1); rb_define_method(SwigClassConnectionPool.klass, "SetConnectionDead", VALUEFUNC(_wrap_ConnectionPool_SetConnectionDead), -1); rb_define_method(SwigClassConnectionPool.klass, "SetRequiredPermission", VALUEFUNC(_wrap_ConnectionPool_SetRequiredPermission), -1); SwigClassConnectionPool.mark = 0; SwigClassConnectionPool.destroy = (void (*)(void *)) free_Prelude_ConnectionPool; SwigClassConnectionPool.trackObjects = 0; SwigClassClientProfile.klass = rb_define_class_under(mPreludeEasy, "ClientProfile", rb_cObject); SWIG_TypeClientData(SWIGTYPE_p_Prelude__ClientProfile, (void *) &SwigClassClientProfile); rb_define_alloc_func(SwigClassClientProfile.klass, _wrap_ClientProfile_allocate); rb_define_method(SwigClassClientProfile.klass, "initialize", VALUEFUNC(_wrap_new_ClientProfile), -1); rb_define_method(SwigClassClientProfile.klass, "GetUid", VALUEFUNC(_wrap_ClientProfile_GetUid), -1); rb_define_method(SwigClassClientProfile.klass, "GetGid", VALUEFUNC(_wrap_ClientProfile_GetGid), -1); rb_define_method(SwigClassClientProfile.klass, "GetName", VALUEFUNC(_wrap_ClientProfile_GetName), -1); rb_define_method(SwigClassClientProfile.klass, "SetName", VALUEFUNC(_wrap_ClientProfile_SetName), -1); rb_define_method(SwigClassClientProfile.klass, "GetAnalyzerId", VALUEFUNC(_wrap_ClientProfile_GetAnalyzerId), -1); rb_define_method(SwigClassClientProfile.klass, "GetConfigFilename", VALUEFUNC(_wrap_ClientProfile_GetConfigFilename), -1); rb_define_method(SwigClassClientProfile.klass, "GetAnalyzeridFilename", VALUEFUNC(_wrap_ClientProfile_GetAnalyzeridFilename), -1); rb_define_method(SwigClassClientProfile.klass, "GetTlsKeyFilename", VALUEFUNC(_wrap_ClientProfile_GetTlsKeyFilename), -1); rb_define_method(SwigClassClientProfile.klass, "GetTlsServerCaCertFilename", VALUEFUNC(_wrap_ClientProfile_GetTlsServerCaCertFilename), -1); rb_define_method(SwigClassClientProfile.klass, "GetTlsServerKeyCertFilename", VALUEFUNC(_wrap_ClientProfile_GetTlsServerKeyCertFilename), -1); rb_define_method(SwigClassClientProfile.klass, "GetTlsServerCrlFilename", VALUEFUNC(_wrap_ClientProfile_GetTlsServerCrlFilename), -1); rb_define_method(SwigClassClientProfile.klass, "GetTlsClientKeyCertFilename", VALUEFUNC(_wrap_ClientProfile_GetTlsClientKeyCertFilename), -1); rb_define_method(SwigClassClientProfile.klass, "GetTlsClientTrustedCertFilename", VALUEFUNC(_wrap_ClientProfile_GetTlsClientTrustedCertFilename), -1); rb_define_method(SwigClassClientProfile.klass, "GetBackupDirname", VALUEFUNC(_wrap_ClientProfile_GetBackupDirname), -1); rb_define_method(SwigClassClientProfile.klass, "GetProfileDirname", VALUEFUNC(_wrap_ClientProfile_GetProfileDirname), -1); rb_define_method(SwigClassClientProfile.klass, "SetPrefix", VALUEFUNC(_wrap_ClientProfile_SetPrefix), -1); rb_define_method(SwigClassClientProfile.klass, "GetPrefix", VALUEFUNC(_wrap_ClientProfile_GetPrefix), -1); SwigClassClientProfile.mark = 0; SwigClassClientProfile.destroy = (void (*)(void *)) free_Prelude_ClientProfile; SwigClassClientProfile.trackObjects = 0; SwigClassClient.klass = rb_define_class_under(mPreludeEasy, "Client", ((swig_class *) SWIGTYPE_p_Prelude__ClientProfile->clientdata)->klass); SWIG_TypeClientData(SWIGTYPE_p_Prelude__Client, (void *) &SwigClassClient); rb_define_alloc_func(SwigClassClient.klass, _wrap_Client_allocate); rb_define_method(SwigClassClient.klass, "initialize", VALUEFUNC(_wrap_new_Client), -1); rb_define_const(SwigClassClient.klass, "ASYNC_SEND", SWIG_From_int(static_cast< int >(Prelude::Client::ASYNC_SEND))); rb_define_const(SwigClassClient.klass, "FLAGS_ASYNC_SEND", SWIG_From_int(static_cast< int >(Prelude::Client::FLAGS_ASYNC_SEND))); rb_define_const(SwigClassClient.klass, "ASYNC_TIMER", SWIG_From_int(static_cast< int >(Prelude::Client::ASYNC_TIMER))); rb_define_const(SwigClassClient.klass, "FLAGS_ASYNC_TIMER", SWIG_From_int(static_cast< int >(Prelude::Client::FLAGS_ASYNC_TIMER))); rb_define_const(SwigClassClient.klass, "HEARTBEAT", SWIG_From_int(static_cast< int >(Prelude::Client::HEARTBEAT))); rb_define_const(SwigClassClient.klass, "FLAGS_HEARTBEAT", SWIG_From_int(static_cast< int >(Prelude::Client::FLAGS_HEARTBEAT))); rb_define_const(SwigClassClient.klass, "CONNECT", SWIG_From_int(static_cast< int >(Prelude::Client::CONNECT))); rb_define_const(SwigClassClient.klass, "FLAGS_CONNECT", SWIG_From_int(static_cast< int >(Prelude::Client::FLAGS_CONNECT))); rb_define_const(SwigClassClient.klass, "AUTOCONFIG", SWIG_From_int(static_cast< int >(Prelude::Client::AUTOCONFIG))); rb_define_const(SwigClassClient.klass, "FLAGS_AUTOCONFIG", SWIG_From_int(static_cast< int >(Prelude::Client::FLAGS_AUTOCONFIG))); rb_define_const(SwigClassClient.klass, "IDMEF_READ", SWIG_From_int(static_cast< int >(Prelude::Client::IDMEF_READ))); rb_define_const(SwigClassClient.klass, "PERMISSION_IDMEF_READ", SWIG_From_int(static_cast< int >(Prelude::Client::PERMISSION_IDMEF_READ))); rb_define_const(SwigClassClient.klass, "ADMIN_READ", SWIG_From_int(static_cast< int >(Prelude::Client::ADMIN_READ))); rb_define_const(SwigClassClient.klass, "PERMISSION_ADMIN_READ", SWIG_From_int(static_cast< int >(Prelude::Client::PERMISSION_ADMIN_READ))); rb_define_const(SwigClassClient.klass, "IDMEF_WRITE", SWIG_From_int(static_cast< int >(Prelude::Client::IDMEF_WRITE))); rb_define_const(SwigClassClient.klass, "PERMISSION_IDMEF_WRITE", SWIG_From_int(static_cast< int >(Prelude::Client::PERMISSION_IDMEF_WRITE))); rb_define_const(SwigClassClient.klass, "ADMIN_WRITE", SWIG_From_int(static_cast< int >(Prelude::Client::ADMIN_WRITE))); rb_define_const(SwigClassClient.klass, "PERMISSION_ADMIN_WRITE", SWIG_From_int(static_cast< int >(Prelude::Client::PERMISSION_ADMIN_WRITE))); rb_define_method(SwigClassClient.klass, "Start", VALUEFUNC(_wrap_Client_Start), -1); rb_define_method(SwigClassClient.klass, "Init", VALUEFUNC(_wrap_Client_Init), -1); rb_define_method(SwigClassClient.klass, "GetClient", VALUEFUNC(_wrap_Client_GetClient), -1); rb_define_method(SwigClassClient.klass, "SendIDMEF", VALUEFUNC(_wrap_Client_SendIDMEF), -1); rb_define_method(SwigClassClient.klass, "RecvIDMEF", VALUEFUNC(_wrap_Client_RecvIDMEF), -1); rb_define_method(SwigClassClient.klass, "GetFlags", VALUEFUNC(_wrap_Client_GetFlags), -1); rb_define_method(SwigClassClient.klass, "SetFlags", VALUEFUNC(_wrap_Client_SetFlags), -1); rb_define_method(SwigClassClient.klass, "GetRequiredPermission", VALUEFUNC(_wrap_Client_GetRequiredPermission), -1); rb_define_method(SwigClassClient.klass, "SetRequiredPermission", VALUEFUNC(_wrap_Client_SetRequiredPermission), -1); rb_define_method(SwigClassClient.klass, "GetConfigFilename", VALUEFUNC(_wrap_Client_GetConfigFilename), -1); rb_define_method(SwigClassClient.klass, "SetConfigFilename", VALUEFUNC(_wrap_Client_SetConfigFilename), -1); rb_define_method(SwigClassClient.klass, "GetConnectionPool", VALUEFUNC(_wrap_Client_GetConnectionPool), -1); rb_define_method(SwigClassClient.klass, "SetConnectionPool", VALUEFUNC(_wrap_Client_SetConnectionPool), -1); rb_define_method(SwigClassClient.klass, "<<", VALUEFUNC(_wrap_Client___lshift__), -1); rb_define_method(SwigClassClient.klass, ">>", VALUEFUNC(_wrap_Client___rshift__), -1); rb_define_singleton_method(SwigClassClient.klass, "SetRecvTimeout", VALUEFUNC(_wrap_Client_SetRecvTimeout), -1); SwigClassClient.mark = 0; SwigClassClient.destroy = (void (*)(void *)) free_Prelude_Client; SwigClassClient.trackObjects = 0; SwigClassClientEasy.klass = rb_define_class_under(mPreludeEasy, "ClientEasy", ((swig_class *) SWIGTYPE_p_Prelude__Client->clientdata)->klass); SWIG_TypeClientData(SWIGTYPE_p_Prelude__ClientEasy, (void *) &SwigClassClientEasy); rb_define_alloc_func(SwigClassClientEasy.klass, _wrap_ClientEasy_allocate); rb_define_method(SwigClassClientEasy.klass, "initialize", VALUEFUNC(_wrap_new_ClientEasy), -1); SwigClassClientEasy.mark = 0; SwigClassClientEasy.destroy = (void (*)(void *)) free_Prelude_ClientEasy; SwigClassClientEasy.trackObjects = 0; SwigClassIDMEFCriterion.klass = rb_define_class_under(mPreludeEasy, "IDMEFCriterion", rb_cObject); SWIG_TypeClientData(SWIGTYPE_p_Prelude__IDMEFCriterion, (void *) &SwigClassIDMEFCriterion); rb_define_alloc_func(SwigClassIDMEFCriterion.klass, _wrap_IDMEFCriterion_allocate); rb_define_method(SwigClassIDMEFCriterion.klass, "initialize", VALUEFUNC(_wrap_new_IDMEFCriterion), -1); rb_define_const(SwigClassIDMEFCriterion.klass, "OPERATOR_NOT", SWIG_From_int(static_cast< int >(Prelude::IDMEFCriterion::OPERATOR_NOT))); rb_define_const(SwigClassIDMEFCriterion.klass, "OPERATOR_NOCASE", SWIG_From_int(static_cast< int >(Prelude::IDMEFCriterion::OPERATOR_NOCASE))); rb_define_const(SwigClassIDMEFCriterion.klass, "OPERATOR_EQUAL", SWIG_From_int(static_cast< int >(Prelude::IDMEFCriterion::OPERATOR_EQUAL))); rb_define_const(SwigClassIDMEFCriterion.klass, "OPERATOR_EQUAL_NOCASE", SWIG_From_int(static_cast< int >(Prelude::IDMEFCriterion::OPERATOR_EQUAL_NOCASE))); rb_define_const(SwigClassIDMEFCriterion.klass, "OPERATOR_NOT_EQUAL", SWIG_From_int(static_cast< int >(Prelude::IDMEFCriterion::OPERATOR_NOT_EQUAL))); rb_define_const(SwigClassIDMEFCriterion.klass, "OPERATOR_NOT_EQUAL_NOCASE", SWIG_From_int(static_cast< int >(Prelude::IDMEFCriterion::OPERATOR_NOT_EQUAL_NOCASE))); rb_define_const(SwigClassIDMEFCriterion.klass, "OPERATOR_LESSER", SWIG_From_int(static_cast< int >(Prelude::IDMEFCriterion::OPERATOR_LESSER))); rb_define_const(SwigClassIDMEFCriterion.klass, "OPERATOR_LESSER_OR_EQUAL", SWIG_From_int(static_cast< int >(Prelude::IDMEFCriterion::OPERATOR_LESSER_OR_EQUAL))); rb_define_const(SwigClassIDMEFCriterion.klass, "OPERATOR_GREATER", SWIG_From_int(static_cast< int >(Prelude::IDMEFCriterion::OPERATOR_GREATER))); rb_define_const(SwigClassIDMEFCriterion.klass, "OPERATOR_GREATER_OR_EQUAL", SWIG_From_int(static_cast< int >(Prelude::IDMEFCriterion::OPERATOR_GREATER_OR_EQUAL))); rb_define_const(SwigClassIDMEFCriterion.klass, "OPERATOR_SUBSTR", SWIG_From_int(static_cast< int >(Prelude::IDMEFCriterion::OPERATOR_SUBSTR))); rb_define_const(SwigClassIDMEFCriterion.klass, "OPERATOR_SUBSTR_NOCASE", SWIG_From_int(static_cast< int >(Prelude::IDMEFCriterion::OPERATOR_SUBSTR_NOCASE))); rb_define_const(SwigClassIDMEFCriterion.klass, "OPERATOR_NOT_SUBSTR", SWIG_From_int(static_cast< int >(Prelude::IDMEFCriterion::OPERATOR_NOT_SUBSTR))); rb_define_const(SwigClassIDMEFCriterion.klass, "OPERATOR_NOT_SUBSTR_NOCASE", SWIG_From_int(static_cast< int >(Prelude::IDMEFCriterion::OPERATOR_NOT_SUBSTR_NOCASE))); rb_define_const(SwigClassIDMEFCriterion.klass, "OPERATOR_REGEX", SWIG_From_int(static_cast< int >(Prelude::IDMEFCriterion::OPERATOR_REGEX))); rb_define_const(SwigClassIDMEFCriterion.klass, "OPERATOR_REGEX_NOCASE", SWIG_From_int(static_cast< int >(Prelude::IDMEFCriterion::OPERATOR_REGEX_NOCASE))); rb_define_const(SwigClassIDMEFCriterion.klass, "OPERATOR_NOT_REGEX", SWIG_From_int(static_cast< int >(Prelude::IDMEFCriterion::OPERATOR_NOT_REGEX))); rb_define_const(SwigClassIDMEFCriterion.klass, "OPERATOR_NOT_REGEX_NOCASE", SWIG_From_int(static_cast< int >(Prelude::IDMEFCriterion::OPERATOR_NOT_REGEX_NOCASE))); rb_define_const(SwigClassIDMEFCriterion.klass, "OPERATOR_NULL", SWIG_From_int(static_cast< int >(Prelude::IDMEFCriterion::OPERATOR_NULL))); rb_define_const(SwigClassIDMEFCriterion.klass, "OPERATOR_NOT_NULL", SWIG_From_int(static_cast< int >(Prelude::IDMEFCriterion::OPERATOR_NOT_NULL))); SwigClassIDMEFCriterion.mark = 0; SwigClassIDMEFCriterion.destroy = (void (*)(void *)) free_Prelude_IDMEFCriterion; SwigClassIDMEFCriterion.trackObjects = 0; SwigClassIDMEFCriteria.klass = rb_define_class_under(mPreludeEasy, "IDMEFCriteria", rb_cObject); SWIG_TypeClientData(SWIGTYPE_p_Prelude__IDMEFCriteria, (void *) &SwigClassIDMEFCriteria); rb_define_alloc_func(SwigClassIDMEFCriteria.klass, _wrap_IDMEFCriteria_allocate); rb_define_method(SwigClassIDMEFCriteria.klass, "initialize", VALUEFUNC(_wrap_new_IDMEFCriteria), -1); rb_define_method(SwigClassIDMEFCriteria.klass, "Match", VALUEFUNC(_wrap_IDMEFCriteria_Match), -1); rb_define_method(SwigClassIDMEFCriteria.klass, "Clone", VALUEFUNC(_wrap_IDMEFCriteria_Clone), -1); rb_define_method(SwigClassIDMEFCriteria.klass, "ANDCriteria", VALUEFUNC(_wrap_IDMEFCriteria_ANDCriteria), -1); rb_define_method(SwigClassIDMEFCriteria.klass, "ORCriteria", VALUEFUNC(_wrap_IDMEFCriteria_ORCriteria), -1); rb_define_method(SwigClassIDMEFCriteria.klass, "ToString", VALUEFUNC(_wrap_IDMEFCriteria_ToString), -1); rb_define_method(SwigClassIDMEFCriteria.klass, "to_s", VALUEFUNC(_wrap_IDMEFCriteria___str__), -1); SwigClassIDMEFCriteria.mark = 0; SwigClassIDMEFCriteria.destroy = (void (*)(void *)) free_Prelude_IDMEFCriteria; SwigClassIDMEFCriteria.trackObjects = 0; SwigClassIDMEFValue.klass = rb_define_class_under(mPreludeEasy, "IDMEFValue", rb_cObject); SWIG_TypeClientData(SWIGTYPE_p_Prelude__IDMEFValue, (void *) &SwigClassIDMEFValue); rb_define_alloc_func(SwigClassIDMEFValue.klass, _wrap_IDMEFValue_allocate); rb_define_method(SwigClassIDMEFValue.klass, "initialize", VALUEFUNC(_wrap_new_IDMEFValue), -1); rb_define_method(SwigClassIDMEFValue.klass, "GetType", VALUEFUNC(_wrap_IDMEFValue_GetType), -1); rb_define_method(SwigClassIDMEFValue.klass, "IsNull", VALUEFUNC(_wrap_IDMEFValue_IsNull), -1); rb_define_method(SwigClassIDMEFValue.klass, "Match", VALUEFUNC(_wrap_IDMEFValue_Match), -1); rb_define_method(SwigClassIDMEFValue.klass, "Clone", VALUEFUNC(_wrap_IDMEFValue_Clone), -1); SwigClassIDMEFValue.mark = 0; SwigClassIDMEFValue.destroy = (void (*)(void *)) free_Prelude_IDMEFValue; SwigClassIDMEFValue.trackObjects = 0; SwigClassIDMEFPath.klass = rb_define_class_under(mPreludeEasy, "IDMEFPath", rb_cObject); SWIG_TypeClientData(SWIGTYPE_p_Prelude__IDMEFPath, (void *) &SwigClassIDMEFPath); rb_define_alloc_func(SwigClassIDMEFPath.klass, _wrap_IDMEFPath_allocate); rb_define_method(SwigClassIDMEFPath.klass, "initialize", VALUEFUNC(_wrap_new_IDMEFPath), -1); rb_define_method(SwigClassIDMEFPath.klass, "Get", VALUEFUNC(_wrap_IDMEFPath_Get), -1); rb_define_method(SwigClassIDMEFPath.klass, "Set", VALUEFUNC(_wrap_IDMEFPath_Set), -1); rb_define_method(SwigClassIDMEFPath.klass, "GetClass", VALUEFUNC(_wrap_IDMEFPath_GetClass), -1); rb_define_method(SwigClassIDMEFPath.klass, "GetValueType", VALUEFUNC(_wrap_IDMEFPath_GetValueType), -1); rb_define_method(SwigClassIDMEFPath.klass, "SetIndex", VALUEFUNC(_wrap_IDMEFPath_SetIndex), -1); rb_define_method(SwigClassIDMEFPath.klass, "UndefineIndex", VALUEFUNC(_wrap_IDMEFPath_UndefineIndex), -1); rb_define_method(SwigClassIDMEFPath.klass, "GetIndex", VALUEFUNC(_wrap_IDMEFPath_GetIndex), -1); rb_define_method(SwigClassIDMEFPath.klass, "MakeChild", VALUEFUNC(_wrap_IDMEFPath_MakeChild), -1); rb_define_method(SwigClassIDMEFPath.klass, "MakeParent", VALUEFUNC(_wrap_IDMEFPath_MakeParent), -1); rb_define_method(SwigClassIDMEFPath.klass, "Compare", VALUEFUNC(_wrap_IDMEFPath_Compare), -1); rb_define_method(SwigClassIDMEFPath.klass, "Clone", VALUEFUNC(_wrap_IDMEFPath_Clone), -1); rb_define_method(SwigClassIDMEFPath.klass, "CheckOperator", VALUEFUNC(_wrap_IDMEFPath_CheckOperator), -1); rb_define_method(SwigClassIDMEFPath.klass, "GetApplicableOperators", VALUEFUNC(_wrap_IDMEFPath_GetApplicableOperators), -1); rb_define_method(SwigClassIDMEFPath.klass, "GetName", VALUEFUNC(_wrap_IDMEFPath_GetName), -1); rb_define_method(SwigClassIDMEFPath.klass, "IsAmbiguous", VALUEFUNC(_wrap_IDMEFPath_IsAmbiguous), -1); rb_define_method(SwigClassIDMEFPath.klass, "HasLists", VALUEFUNC(_wrap_IDMEFPath_HasLists), -1); rb_define_method(SwigClassIDMEFPath.klass, "IsList", VALUEFUNC(_wrap_IDMEFPath_IsList), -1); rb_define_method(SwigClassIDMEFPath.klass, "GetDepth", VALUEFUNC(_wrap_IDMEFPath_GetDepth), -1); SwigClassIDMEFPath.mark = 0; SwigClassIDMEFPath.destroy = (void (*)(void *)) free_Prelude_IDMEFPath; SwigClassIDMEFPath.trackObjects = 0; SwigClassIDMEFTime.klass = rb_define_class_under(mPreludeEasy, "IDMEFTime", rb_cObject); SWIG_TypeClientData(SWIGTYPE_p_Prelude__IDMEFTime, (void *) &SwigClassIDMEFTime); rb_define_alloc_func(SwigClassIDMEFTime.klass, _wrap_IDMEFTime_allocate); rb_define_method(SwigClassIDMEFTime.klass, "initialize", VALUEFUNC(_wrap_new_IDMEFTime), -1); rb_define_method(SwigClassIDMEFTime.klass, "Set", VALUEFUNC(_wrap_IDMEFTime_Set), -1); rb_define_method(SwigClassIDMEFTime.klass, "SetSec", VALUEFUNC(_wrap_IDMEFTime_SetSec), -1); rb_define_method(SwigClassIDMEFTime.klass, "SetUSec", VALUEFUNC(_wrap_IDMEFTime_SetUSec), -1); rb_define_method(SwigClassIDMEFTime.klass, "SetGmtOffset", VALUEFUNC(_wrap_IDMEFTime_SetGmtOffset), -1); rb_define_method(SwigClassIDMEFTime.klass, "GetSec", VALUEFUNC(_wrap_IDMEFTime_GetSec), -1); rb_define_method(SwigClassIDMEFTime.klass, "GetUSec", VALUEFUNC(_wrap_IDMEFTime_GetUSec), -1); rb_define_method(SwigClassIDMEFTime.klass, "GetGmtOffset", VALUEFUNC(_wrap_IDMEFTime_GetGmtOffset), -1); rb_define_method(SwigClassIDMEFTime.klass, "Clone", VALUEFUNC(_wrap_IDMEFTime_Clone), -1); rb_define_method(SwigClassIDMEFTime.klass, "ToString", VALUEFUNC(_wrap_IDMEFTime_ToString), -1); rb_define_method(SwigClassIDMEFTime.klass, "to_i", VALUEFUNC(_wrap_IDMEFTime___int__), -1); rb_define_method(SwigClassIDMEFTime.klass, "__long__", VALUEFUNC(_wrap_IDMEFTime___long__), -1); rb_define_method(SwigClassIDMEFTime.klass, "to_f", VALUEFUNC(_wrap_IDMEFTime___float__), -1); rb_define_method(SwigClassIDMEFTime.klass, "to_s", VALUEFUNC(_wrap_IDMEFTime___str__), -1); rb_define_method(SwigClassIDMEFTime.klass, ">=", VALUEFUNC(_wrap_IDMEFTime___ge__), -1); rb_define_method(SwigClassIDMEFTime.klass, "<=", VALUEFUNC(_wrap_IDMEFTime___le__), -1); rb_define_method(SwigClassIDMEFTime.klass, "==", VALUEFUNC(_wrap_IDMEFTime___eq__), -1); rb_define_method(SwigClassIDMEFTime.klass, ">", VALUEFUNC(_wrap_IDMEFTime___gt__), -1); rb_define_method(SwigClassIDMEFTime.klass, "<", VALUEFUNC(_wrap_IDMEFTime___lt__), -1); SwigClassIDMEFTime.mark = 0; SwigClassIDMEFTime.destroy = (void (*)(void *)) free_Prelude_IDMEFTime; SwigClassIDMEFTime.trackObjects = 0; SwigClassIDMEF.klass = rb_define_class_under(mPreludeEasy, "IDMEF", rb_cObject); SWIG_TypeClientData(SWIGTYPE_p_Prelude__IDMEF, (void *) &SwigClassIDMEF); rb_define_alloc_func(SwigClassIDMEF.klass, _wrap_IDMEF_allocate); rb_define_method(SwigClassIDMEF.klass, "initialize", VALUEFUNC(_wrap_new_IDMEF), -1); rb_define_method(SwigClassIDMEF.klass, "Set", VALUEFUNC(_wrap_IDMEF_Set), -1); rb_define_method(SwigClassIDMEF.klass, "Get", VALUEFUNC(_wrap_IDMEF_Get), -1); rb_define_method(SwigClassIDMEF.klass, "Clone", VALUEFUNC(_wrap_IDMEF_Clone), -1); rb_define_method(SwigClassIDMEF.klass, "ToString", VALUEFUNC(_wrap_IDMEF_ToString), -1); rb_define_method(SwigClassIDMEF.klass, "to_s", VALUEFUNC(_wrap_IDMEF___str__), -1); rb_define_method(SwigClassIDMEF.klass, "Write", VALUEFUNC(_wrap_IDMEF_Write), -1); rb_define_method(SwigClassIDMEF.klass, "Read", VALUEFUNC(_wrap_IDMEF_Read), -1); rb_define_method(SwigClassIDMEF.klass, ">>", VALUEFUNC(_wrap_IDMEF___rshift__), -1); rb_define_method(SwigClassIDMEF.klass, "<<", VALUEFUNC(_wrap_IDMEF___lshift__), -1); SwigClassIDMEF.mark = 0; SwigClassIDMEF.destroy = (void (*)(void *)) free_Prelude_IDMEF; SwigClassIDMEF.trackObjects = 0; } libprelude-1.0.0/bindings/python/0000775000076400007640000000000011347714755014006 500000000000000libprelude-1.0.0/bindings/python/_PreludeEasy.cxx0000664000076400007640000222605111330606206017022 00000000000000/* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). * Version 1.3.40 * * This file is not intended to be easily readable and contains a number of * coding conventions designed to improve portability and efficiency. Do not make * changes to this file unless you know what you are doing--modify the SWIG * interface file instead. * ----------------------------------------------------------------------------- */ #define SWIGPYTHON #define SWIG_PYTHON_DIRECTOR_NO_VTABLE #ifdef __cplusplus /* SwigValueWrapper is described in swig.swg */ template class SwigValueWrapper { struct SwigMovePointer { T *ptr; SwigMovePointer(T *p) : ptr(p) { } ~SwigMovePointer() { delete ptr; } SwigMovePointer& operator=(SwigMovePointer& rhs) { T* oldptr = ptr; ptr = 0; delete oldptr; ptr = rhs.ptr; rhs.ptr = 0; return *this; } } pointer; SwigValueWrapper& operator=(const SwigValueWrapper& rhs); SwigValueWrapper(const SwigValueWrapper& rhs); public: SwigValueWrapper() : pointer(0) { } SwigValueWrapper& operator=(const T& t) { SwigMovePointer tmp(new T(t)); pointer = tmp; return *this; } operator T&() const { return *pointer.ptr; } T *operator&() { return pointer.ptr; } }; template T SwigValueInit() { return T(); } #endif /* ----------------------------------------------------------------------------- * This section contains generic SWIG labels for method/variable * declarations/attributes, and other compiler dependent labels. * ----------------------------------------------------------------------------- */ /* template workaround for compilers that cannot correctly implement the C++ standard */ #ifndef SWIGTEMPLATEDISAMBIGUATOR # if defined(__SUNPRO_CC) && (__SUNPRO_CC <= 0x560) # define SWIGTEMPLATEDISAMBIGUATOR template # elif defined(__HP_aCC) /* Needed even with `aCC -AA' when `aCC -V' reports HP ANSI C++ B3910B A.03.55 */ /* If we find a maximum version that requires this, the test would be __HP_aCC <= 35500 for A.03.55 */ # define SWIGTEMPLATEDISAMBIGUATOR template # else # define SWIGTEMPLATEDISAMBIGUATOR # endif #endif /* inline attribute */ #ifndef SWIGINLINE # if defined(__cplusplus) || (defined(__GNUC__) && !defined(__STRICT_ANSI__)) # define SWIGINLINE inline # else # define SWIGINLINE # endif #endif /* attribute recognised by some compilers to avoid 'unused' warnings */ #ifndef SWIGUNUSED # if defined(__GNUC__) # if !(defined(__cplusplus)) || (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4)) # define SWIGUNUSED __attribute__ ((__unused__)) # else # define SWIGUNUSED # endif # elif defined(__ICC) # define SWIGUNUSED __attribute__ ((__unused__)) # else # define SWIGUNUSED # endif #endif #ifndef SWIG_MSC_UNSUPPRESS_4505 # if defined(_MSC_VER) # pragma warning(disable : 4505) /* unreferenced local function has been removed */ # endif #endif #ifndef SWIGUNUSEDPARM # ifdef __cplusplus # define SWIGUNUSEDPARM(p) # else # define SWIGUNUSEDPARM(p) p SWIGUNUSED # endif #endif /* internal SWIG method */ #ifndef SWIGINTERN # define SWIGINTERN static SWIGUNUSED #endif /* internal inline SWIG method */ #ifndef SWIGINTERNINLINE # define SWIGINTERNINLINE SWIGINTERN SWIGINLINE #endif /* exporting methods */ #if (__GNUC__ >= 4) || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4) # ifndef GCC_HASCLASSVISIBILITY # define GCC_HASCLASSVISIBILITY # endif #endif #ifndef SWIGEXPORT # if defined(_WIN32) || defined(__WIN32__) || defined(__CYGWIN__) # if defined(STATIC_LINKED) # define SWIGEXPORT # else # define SWIGEXPORT __declspec(dllexport) # endif # else # if defined(__GNUC__) && defined(GCC_HASCLASSVISIBILITY) # define SWIGEXPORT __attribute__ ((visibility("default"))) # else # define SWIGEXPORT # endif # endif #endif /* calling conventions for Windows */ #ifndef SWIGSTDCALL # if defined(_WIN32) || defined(__WIN32__) || defined(__CYGWIN__) # define SWIGSTDCALL __stdcall # else # define SWIGSTDCALL # endif #endif /* Deal with Microsoft's attempt at deprecating C standard runtime functions */ #if !defined(SWIG_NO_CRT_SECURE_NO_DEPRECATE) && defined(_MSC_VER) && !defined(_CRT_SECURE_NO_DEPRECATE) # define _CRT_SECURE_NO_DEPRECATE #endif /* Deal with Microsoft's attempt at deprecating methods in the standard C++ library */ #if !defined(SWIG_NO_SCL_SECURE_NO_DEPRECATE) && defined(_MSC_VER) && !defined(_SCL_SECURE_NO_DEPRECATE) # define _SCL_SECURE_NO_DEPRECATE #endif /* Python.h has to appear first */ #include /* ----------------------------------------------------------------------------- * swigrun.swg * * This file contains generic C API SWIG runtime support for pointer * type checking. * ----------------------------------------------------------------------------- */ /* This should only be incremented when either the layout of swig_type_info changes, or for whatever reason, the runtime changes incompatibly */ #define SWIG_RUNTIME_VERSION "4" /* define SWIG_TYPE_TABLE_NAME as "SWIG_TYPE_TABLE" */ #ifdef SWIG_TYPE_TABLE # define SWIG_QUOTE_STRING(x) #x # define SWIG_EXPAND_AND_QUOTE_STRING(x) SWIG_QUOTE_STRING(x) # define SWIG_TYPE_TABLE_NAME SWIG_EXPAND_AND_QUOTE_STRING(SWIG_TYPE_TABLE) #else # define SWIG_TYPE_TABLE_NAME #endif /* You can use the SWIGRUNTIME and SWIGRUNTIMEINLINE macros for creating a static or dynamic library from the SWIG runtime code. In 99.9% of the cases, SWIG just needs to declare them as 'static'. But only do this if strictly necessary, ie, if you have problems with your compiler or suchlike. */ #ifndef SWIGRUNTIME # define SWIGRUNTIME SWIGINTERN #endif #ifndef SWIGRUNTIMEINLINE # define SWIGRUNTIMEINLINE SWIGRUNTIME SWIGINLINE #endif /* Generic buffer size */ #ifndef SWIG_BUFFER_SIZE # define SWIG_BUFFER_SIZE 1024 #endif /* Flags for pointer conversions */ #define SWIG_POINTER_DISOWN 0x1 #define SWIG_CAST_NEW_MEMORY 0x2 /* Flags for new pointer objects */ #define SWIG_POINTER_OWN 0x1 /* Flags/methods for returning states. The SWIG conversion methods, as ConvertPtr, return and integer that tells if the conversion was successful or not. And if not, an error code can be returned (see swigerrors.swg for the codes). Use the following macros/flags to set or process the returning states. In old versions of SWIG, code such as the following was usually written: if (SWIG_ConvertPtr(obj,vptr,ty.flags) != -1) { // success code } else { //fail code } Now you can be more explicit: int res = SWIG_ConvertPtr(obj,vptr,ty.flags); if (SWIG_IsOK(res)) { // success code } else { // fail code } which is the same really, but now you can also do Type *ptr; int res = SWIG_ConvertPtr(obj,(void **)(&ptr),ty.flags); if (SWIG_IsOK(res)) { // success code if (SWIG_IsNewObj(res) { ... delete *ptr; } else { ... } } else { // fail code } I.e., now SWIG_ConvertPtr can return new objects and you can identify the case and take care of the deallocation. Of course that also requires SWIG_ConvertPtr to return new result values, such as int SWIG_ConvertPtr(obj, ptr,...) { if () { if () { *ptr = ; return SWIG_NEWOBJ; } else { *ptr = ; return SWIG_OLDOBJ; } } else { return SWIG_BADOBJ; } } Of course, returning the plain '0(success)/-1(fail)' still works, but you can be more explicit by returning SWIG_BADOBJ, SWIG_ERROR or any of the SWIG errors code. Finally, if the SWIG_CASTRANK_MODE is enabled, the result code allows to return the 'cast rank', for example, if you have this int food(double) int fooi(int); and you call food(1) // cast rank '1' (1 -> 1.0) fooi(1) // cast rank '0' just use the SWIG_AddCast()/SWIG_CheckState() */ #define SWIG_OK (0) #define SWIG_ERROR (-1) #define SWIG_IsOK(r) (r >= 0) #define SWIG_ArgError(r) ((r != SWIG_ERROR) ? r : SWIG_TypeError) /* The CastRankLimit says how many bits are used for the cast rank */ #define SWIG_CASTRANKLIMIT (1 << 8) /* The NewMask denotes the object was created (using new/malloc) */ #define SWIG_NEWOBJMASK (SWIG_CASTRANKLIMIT << 1) /* The TmpMask is for in/out typemaps that use temporal objects */ #define SWIG_TMPOBJMASK (SWIG_NEWOBJMASK << 1) /* Simple returning values */ #define SWIG_BADOBJ (SWIG_ERROR) #define SWIG_OLDOBJ (SWIG_OK) #define SWIG_NEWOBJ (SWIG_OK | SWIG_NEWOBJMASK) #define SWIG_TMPOBJ (SWIG_OK | SWIG_TMPOBJMASK) /* Check, add and del mask methods */ #define SWIG_AddNewMask(r) (SWIG_IsOK(r) ? (r | SWIG_NEWOBJMASK) : r) #define SWIG_DelNewMask(r) (SWIG_IsOK(r) ? (r & ~SWIG_NEWOBJMASK) : r) #define SWIG_IsNewObj(r) (SWIG_IsOK(r) && (r & SWIG_NEWOBJMASK)) #define SWIG_AddTmpMask(r) (SWIG_IsOK(r) ? (r | SWIG_TMPOBJMASK) : r) #define SWIG_DelTmpMask(r) (SWIG_IsOK(r) ? (r & ~SWIG_TMPOBJMASK) : r) #define SWIG_IsTmpObj(r) (SWIG_IsOK(r) && (r & SWIG_TMPOBJMASK)) /* Cast-Rank Mode */ #if defined(SWIG_CASTRANK_MODE) # ifndef SWIG_TypeRank # define SWIG_TypeRank unsigned long # endif # ifndef SWIG_MAXCASTRANK /* Default cast allowed */ # define SWIG_MAXCASTRANK (2) # endif # define SWIG_CASTRANKMASK ((SWIG_CASTRANKLIMIT) -1) # define SWIG_CastRank(r) (r & SWIG_CASTRANKMASK) SWIGINTERNINLINE int SWIG_AddCast(int r) { return SWIG_IsOK(r) ? ((SWIG_CastRank(r) < SWIG_MAXCASTRANK) ? (r + 1) : SWIG_ERROR) : r; } SWIGINTERNINLINE int SWIG_CheckState(int r) { return SWIG_IsOK(r) ? SWIG_CastRank(r) + 1 : 0; } #else /* no cast-rank mode */ # define SWIG_AddCast # define SWIG_CheckState(r) (SWIG_IsOK(r) ? 1 : 0) #endif #include #ifdef __cplusplus extern "C" { #endif typedef void *(*swig_converter_func)(void *, int *); typedef struct swig_type_info *(*swig_dycast_func)(void **); /* Structure to store information on one type */ typedef struct swig_type_info { const char *name; /* mangled name of this type */ const char *str; /* human readable name of this type */ swig_dycast_func dcast; /* dynamic cast function down a hierarchy */ struct swig_cast_info *cast; /* linked list of types that can cast into this type */ void *clientdata; /* language specific type data */ int owndata; /* flag if the structure owns the clientdata */ } swig_type_info; /* Structure to store a type and conversion function used for casting */ typedef struct swig_cast_info { swig_type_info *type; /* pointer to type that is equivalent to this type */ swig_converter_func converter; /* function to cast the void pointers */ struct swig_cast_info *next; /* pointer to next cast in linked list */ struct swig_cast_info *prev; /* pointer to the previous cast */ } swig_cast_info; /* Structure used to store module information * Each module generates one structure like this, and the runtime collects * all of these structures and stores them in a circularly linked list.*/ typedef struct swig_module_info { swig_type_info **types; /* Array of pointers to swig_type_info structures that are in this module */ size_t size; /* Number of types in this module */ struct swig_module_info *next; /* Pointer to next element in circularly linked list */ swig_type_info **type_initial; /* Array of initially generated type structures */ swig_cast_info **cast_initial; /* Array of initially generated casting structures */ void *clientdata; /* Language specific module data */ } swig_module_info; /* Compare two type names skipping the space characters, therefore "char*" == "char *" and "Class" == "Class", etc. Return 0 when the two name types are equivalent, as in strncmp, but skipping ' '. */ SWIGRUNTIME int SWIG_TypeNameComp(const char *f1, const char *l1, const char *f2, const char *l2) { for (;(f1 != l1) && (f2 != l2); ++f1, ++f2) { while ((*f1 == ' ') && (f1 != l1)) ++f1; while ((*f2 == ' ') && (f2 != l2)) ++f2; if (*f1 != *f2) return (*f1 > *f2) ? 1 : -1; } return (int)((l1 - f1) - (l2 - f2)); } /* Check type equivalence in a name list like ||... Return 0 if not equal, 1 if equal */ SWIGRUNTIME int SWIG_TypeEquiv(const char *nb, const char *tb) { int equiv = 0; const char* te = tb + strlen(tb); const char* ne = nb; while (!equiv && *ne) { for (nb = ne; *ne; ++ne) { if (*ne == '|') break; } equiv = (SWIG_TypeNameComp(nb, ne, tb, te) == 0) ? 1 : 0; if (*ne) ++ne; } return equiv; } /* Check type equivalence in a name list like ||... Return 0 if equal, -1 if nb < tb, 1 if nb > tb */ SWIGRUNTIME int SWIG_TypeCompare(const char *nb, const char *tb) { int equiv = 0; const char* te = tb + strlen(tb); const char* ne = nb; while (!equiv && *ne) { for (nb = ne; *ne; ++ne) { if (*ne == '|') break; } equiv = (SWIG_TypeNameComp(nb, ne, tb, te) == 0) ? 1 : 0; if (*ne) ++ne; } return equiv; } /* Check the typename */ SWIGRUNTIME swig_cast_info * SWIG_TypeCheck(const char *c, swig_type_info *ty) { if (ty) { swig_cast_info *iter = ty->cast; while (iter) { if (strcmp(iter->type->name, c) == 0) { if (iter == ty->cast) return iter; /* Move iter to the top of the linked list */ iter->prev->next = iter->next; if (iter->next) iter->next->prev = iter->prev; iter->next = ty->cast; iter->prev = 0; if (ty->cast) ty->cast->prev = iter; ty->cast = iter; return iter; } iter = iter->next; } } return 0; } /* Identical to SWIG_TypeCheck, except strcmp is replaced with a pointer comparison */ SWIGRUNTIME swig_cast_info * SWIG_TypeCheckStruct(swig_type_info *from, swig_type_info *ty) { if (ty) { swig_cast_info *iter = ty->cast; while (iter) { if (iter->type == from) { if (iter == ty->cast) return iter; /* Move iter to the top of the linked list */ iter->prev->next = iter->next; if (iter->next) iter->next->prev = iter->prev; iter->next = ty->cast; iter->prev = 0; if (ty->cast) ty->cast->prev = iter; ty->cast = iter; return iter; } iter = iter->next; } } return 0; } /* Cast a pointer up an inheritance hierarchy */ SWIGRUNTIMEINLINE void * SWIG_TypeCast(swig_cast_info *ty, void *ptr, int *newmemory) { return ((!ty) || (!ty->converter)) ? ptr : (*ty->converter)(ptr, newmemory); } /* Dynamic pointer casting. Down an inheritance hierarchy */ SWIGRUNTIME swig_type_info * SWIG_TypeDynamicCast(swig_type_info *ty, void **ptr) { swig_type_info *lastty = ty; if (!ty || !ty->dcast) return ty; while (ty && (ty->dcast)) { ty = (*ty->dcast)(ptr); if (ty) lastty = ty; } return lastty; } /* Return the name associated with this type */ SWIGRUNTIMEINLINE const char * SWIG_TypeName(const swig_type_info *ty) { return ty->name; } /* Return the pretty name associated with this type, that is an unmangled type name in a form presentable to the user. */ SWIGRUNTIME const char * SWIG_TypePrettyName(const swig_type_info *type) { /* The "str" field contains the equivalent pretty names of the type, separated by vertical-bar characters. We choose to print the last name, as it is often (?) the most specific. */ if (!type) return NULL; if (type->str != NULL) { const char *last_name = type->str; const char *s; for (s = type->str; *s; s++) if (*s == '|') last_name = s+1; return last_name; } else return type->name; } /* Set the clientdata field for a type */ SWIGRUNTIME void SWIG_TypeClientData(swig_type_info *ti, void *clientdata) { swig_cast_info *cast = ti->cast; /* if (ti->clientdata == clientdata) return; */ ti->clientdata = clientdata; while (cast) { if (!cast->converter) { swig_type_info *tc = cast->type; if (!tc->clientdata) { SWIG_TypeClientData(tc, clientdata); } } cast = cast->next; } } SWIGRUNTIME void SWIG_TypeNewClientData(swig_type_info *ti, void *clientdata) { SWIG_TypeClientData(ti, clientdata); ti->owndata = 1; } /* Search for a swig_type_info structure only by mangled name Search is a O(log #types) We start searching at module start, and finish searching when start == end. Note: if start == end at the beginning of the function, we go all the way around the circular list. */ SWIGRUNTIME swig_type_info * SWIG_MangledTypeQueryModule(swig_module_info *start, swig_module_info *end, const char *name) { swig_module_info *iter = start; do { if (iter->size) { register size_t l = 0; register size_t r = iter->size - 1; do { /* since l+r >= 0, we can (>> 1) instead (/ 2) */ register size_t i = (l + r) >> 1; const char *iname = iter->types[i]->name; if (iname) { register int compare = strcmp(name, iname); if (compare == 0) { return iter->types[i]; } else if (compare < 0) { if (i) { r = i - 1; } else { break; } } else if (compare > 0) { l = i + 1; } } else { break; /* should never happen */ } } while (l <= r); } iter = iter->next; } while (iter != end); return 0; } /* Search for a swig_type_info structure for either a mangled name or a human readable name. It first searches the mangled names of the types, which is a O(log #types) If a type is not found it then searches the human readable names, which is O(#types). We start searching at module start, and finish searching when start == end. Note: if start == end at the beginning of the function, we go all the way around the circular list. */ SWIGRUNTIME swig_type_info * SWIG_TypeQueryModule(swig_module_info *start, swig_module_info *end, const char *name) { /* STEP 1: Search the name field using binary search */ swig_type_info *ret = SWIG_MangledTypeQueryModule(start, end, name); if (ret) { return ret; } else { /* STEP 2: If the type hasn't been found, do a complete search of the str field (the human readable name) */ swig_module_info *iter = start; do { register size_t i = 0; for (; i < iter->size; ++i) { if (iter->types[i]->str && (SWIG_TypeEquiv(iter->types[i]->str, name))) return iter->types[i]; } iter = iter->next; } while (iter != end); } /* neither found a match */ return 0; } /* Pack binary data into a string */ SWIGRUNTIME char * SWIG_PackData(char *c, void *ptr, size_t sz) { static const char hex[17] = "0123456789abcdef"; register const unsigned char *u = (unsigned char *) ptr; register const unsigned char *eu = u + sz; for (; u != eu; ++u) { register unsigned char uu = *u; *(c++) = hex[(uu & 0xf0) >> 4]; *(c++) = hex[uu & 0xf]; } return c; } /* Unpack binary data from a string */ SWIGRUNTIME const char * SWIG_UnpackData(const char *c, void *ptr, size_t sz) { register unsigned char *u = (unsigned char *) ptr; register const unsigned char *eu = u + sz; for (; u != eu; ++u) { register char d = *(c++); register unsigned char uu; if ((d >= '0') && (d <= '9')) uu = ((d - '0') << 4); else if ((d >= 'a') && (d <= 'f')) uu = ((d - ('a'-10)) << 4); else return (char *) 0; d = *(c++); if ((d >= '0') && (d <= '9')) uu |= (d - '0'); else if ((d >= 'a') && (d <= 'f')) uu |= (d - ('a'-10)); else return (char *) 0; *u = uu; } return c; } /* Pack 'void *' into a string buffer. */ SWIGRUNTIME char * SWIG_PackVoidPtr(char *buff, void *ptr, const char *name, size_t bsz) { char *r = buff; if ((2*sizeof(void *) + 2) > bsz) return 0; *(r++) = '_'; r = SWIG_PackData(r,&ptr,sizeof(void *)); if (strlen(name) + 1 > (bsz - (r - buff))) return 0; strcpy(r,name); return buff; } SWIGRUNTIME const char * SWIG_UnpackVoidPtr(const char *c, void **ptr, const char *name) { if (*c != '_') { if (strcmp(c,"NULL") == 0) { *ptr = (void *) 0; return name; } else { return 0; } } return SWIG_UnpackData(++c,ptr,sizeof(void *)); } SWIGRUNTIME char * SWIG_PackDataName(char *buff, void *ptr, size_t sz, const char *name, size_t bsz) { char *r = buff; size_t lname = (name ? strlen(name) : 0); if ((2*sz + 2 + lname) > bsz) return 0; *(r++) = '_'; r = SWIG_PackData(r,ptr,sz); if (lname) { strncpy(r,name,lname+1); } else { *r = 0; } return buff; } SWIGRUNTIME const char * SWIG_UnpackDataName(const char *c, void *ptr, size_t sz, const char *name) { if (*c != '_') { if (strcmp(c,"NULL") == 0) { memset(ptr,0,sz); return name; } else { return 0; } } return SWIG_UnpackData(++c,ptr,sz); } #ifdef __cplusplus } #endif /* Errors in SWIG */ #define SWIG_UnknownError -1 #define SWIG_IOError -2 #define SWIG_RuntimeError -3 #define SWIG_IndexError -4 #define SWIG_TypeError -5 #define SWIG_DivisionByZero -6 #define SWIG_OverflowError -7 #define SWIG_SyntaxError -8 #define SWIG_ValueError -9 #define SWIG_SystemError -10 #define SWIG_AttributeError -11 #define SWIG_MemoryError -12 #define SWIG_NullReferenceError -13 /* Compatibility macros for Python 3 */ #if PY_VERSION_HEX >= 0x03000000 #define PyClass_Check(obj) PyObject_IsInstance(obj, (PyObject *)&PyType_Type) #define PyInt_Check(x) PyLong_Check(x) #define PyInt_AsLong(x) PyLong_AsLong(x) #define PyInt_FromLong(x) PyLong_FromLong(x) #define PyString_Format(fmt, args) PyUnicode_Format(fmt, args) #endif #ifndef Py_TYPE # define Py_TYPE(op) ((op)->ob_type) #endif /* SWIG APIs for compatibility of both Python 2 & 3 */ #if PY_VERSION_HEX >= 0x03000000 # define SWIG_Python_str_FromFormat PyUnicode_FromFormat #else # define SWIG_Python_str_FromFormat PyString_FromFormat #endif /* Warning: This function will allocate a new string in Python 3, * so please call SWIG_Python_str_DelForPy3(x) to free the space. */ SWIGINTERN char* SWIG_Python_str_AsChar(PyObject *str) { #if PY_VERSION_HEX >= 0x03000000 char *cstr; char *newstr; Py_ssize_t len; str = PyUnicode_AsUTF8String(str); PyBytes_AsStringAndSize(str, &cstr, &len); newstr = (char *) malloc(len+1); memcpy(newstr, cstr, len+1); Py_XDECREF(str); return newstr; #else return PyString_AsString(str); #endif } #if PY_VERSION_HEX >= 0x03000000 # define SWIG_Python_str_DelForPy3(x) free( (void*) (x) ) #else # define SWIG_Python_str_DelForPy3(x) #endif SWIGINTERN PyObject* SWIG_Python_str_FromChar(const char *c) { #if PY_VERSION_HEX >= 0x03000000 return PyUnicode_FromString(c); #else return PyString_FromString(c); #endif } /* Add PyOS_snprintf for old Pythons */ #if PY_VERSION_HEX < 0x02020000 # if defined(_MSC_VER) || defined(__BORLANDC__) || defined(_WATCOM) # define PyOS_snprintf _snprintf # else # define PyOS_snprintf snprintf # endif #endif /* A crude PyString_FromFormat implementation for old Pythons */ #if PY_VERSION_HEX < 0x02020000 #ifndef SWIG_PYBUFFER_SIZE # define SWIG_PYBUFFER_SIZE 1024 #endif static PyObject * PyString_FromFormat(const char *fmt, ...) { va_list ap; char buf[SWIG_PYBUFFER_SIZE * 2]; int res; va_start(ap, fmt); res = vsnprintf(buf, sizeof(buf), fmt, ap); va_end(ap); return (res < 0 || res >= (int)sizeof(buf)) ? 0 : PyString_FromString(buf); } #endif /* Add PyObject_Del for old Pythons */ #if PY_VERSION_HEX < 0x01060000 # define PyObject_Del(op) PyMem_DEL((op)) #endif #ifndef PyObject_DEL # define PyObject_DEL PyObject_Del #endif /* A crude PyExc_StopIteration exception for old Pythons */ #if PY_VERSION_HEX < 0x02020000 # ifndef PyExc_StopIteration # define PyExc_StopIteration PyExc_RuntimeError # endif # ifndef PyObject_GenericGetAttr # define PyObject_GenericGetAttr 0 # endif #endif /* Py_NotImplemented is defined in 2.1 and up. */ #if PY_VERSION_HEX < 0x02010000 # ifndef Py_NotImplemented # define Py_NotImplemented PyExc_RuntimeError # endif #endif /* A crude PyString_AsStringAndSize implementation for old Pythons */ #if PY_VERSION_HEX < 0x02010000 # ifndef PyString_AsStringAndSize # define PyString_AsStringAndSize(obj, s, len) {*s = PyString_AsString(obj); *len = *s ? strlen(*s) : 0;} # endif #endif /* PySequence_Size for old Pythons */ #if PY_VERSION_HEX < 0x02000000 # ifndef PySequence_Size # define PySequence_Size PySequence_Length # endif #endif /* PyBool_FromLong for old Pythons */ #if PY_VERSION_HEX < 0x02030000 static PyObject *PyBool_FromLong(long ok) { PyObject *result = ok ? Py_True : Py_False; Py_INCREF(result); return result; } #endif /* Py_ssize_t for old Pythons */ /* This code is as recommended by: */ /* http://www.python.org/dev/peps/pep-0353/#conversion-guidelines */ #if PY_VERSION_HEX < 0x02050000 && !defined(PY_SSIZE_T_MIN) typedef int Py_ssize_t; # define PY_SSIZE_T_MAX INT_MAX # define PY_SSIZE_T_MIN INT_MIN #endif /* ----------------------------------------------------------------------------- * error manipulation * ----------------------------------------------------------------------------- */ SWIGRUNTIME PyObject* SWIG_Python_ErrorType(int code) { PyObject* type = 0; switch(code) { case SWIG_MemoryError: type = PyExc_MemoryError; break; case SWIG_IOError: type = PyExc_IOError; break; case SWIG_RuntimeError: type = PyExc_RuntimeError; break; case SWIG_IndexError: type = PyExc_IndexError; break; case SWIG_TypeError: type = PyExc_TypeError; break; case SWIG_DivisionByZero: type = PyExc_ZeroDivisionError; break; case SWIG_OverflowError: type = PyExc_OverflowError; break; case SWIG_SyntaxError: type = PyExc_SyntaxError; break; case SWIG_ValueError: type = PyExc_ValueError; break; case SWIG_SystemError: type = PyExc_SystemError; break; case SWIG_AttributeError: type = PyExc_AttributeError; break; default: type = PyExc_RuntimeError; } return type; } SWIGRUNTIME void SWIG_Python_AddErrorMsg(const char* mesg) { PyObject *type = 0; PyObject *value = 0; PyObject *traceback = 0; if (PyErr_Occurred()) PyErr_Fetch(&type, &value, &traceback); if (value) { char *tmp; PyObject *old_str = PyObject_Str(value); PyErr_Clear(); Py_XINCREF(type); PyErr_Format(type, "%s %s", tmp = SWIG_Python_str_AsChar(old_str), mesg); SWIG_Python_str_DelForPy3(tmp); Py_DECREF(old_str); Py_DECREF(value); } else { PyErr_SetString(PyExc_RuntimeError, mesg); } } #if defined(SWIG_PYTHON_NO_THREADS) # if defined(SWIG_PYTHON_THREADS) # undef SWIG_PYTHON_THREADS # endif #endif #if defined(SWIG_PYTHON_THREADS) /* Threading support is enabled */ # if !defined(SWIG_PYTHON_USE_GIL) && !defined(SWIG_PYTHON_NO_USE_GIL) # if (PY_VERSION_HEX >= 0x02030000) /* For 2.3 or later, use the PyGILState calls */ # define SWIG_PYTHON_USE_GIL # endif # endif # if defined(SWIG_PYTHON_USE_GIL) /* Use PyGILState threads calls */ # ifndef SWIG_PYTHON_INITIALIZE_THREADS # define SWIG_PYTHON_INITIALIZE_THREADS PyEval_InitThreads() # endif # ifdef __cplusplus /* C++ code */ class SWIG_Python_Thread_Block { bool status; PyGILState_STATE state; public: void end() { if (status) { PyGILState_Release(state); status = false;} } SWIG_Python_Thread_Block() : status(true), state(PyGILState_Ensure()) {} ~SWIG_Python_Thread_Block() { end(); } }; class SWIG_Python_Thread_Allow { bool status; PyThreadState *save; public: void end() { if (status) { PyEval_RestoreThread(save); status = false; }} SWIG_Python_Thread_Allow() : status(true), save(PyEval_SaveThread()) {} ~SWIG_Python_Thread_Allow() { end(); } }; # define SWIG_PYTHON_THREAD_BEGIN_BLOCK SWIG_Python_Thread_Block _swig_thread_block # define SWIG_PYTHON_THREAD_END_BLOCK _swig_thread_block.end() # define SWIG_PYTHON_THREAD_BEGIN_ALLOW SWIG_Python_Thread_Allow _swig_thread_allow # define SWIG_PYTHON_THREAD_END_ALLOW _swig_thread_allow.end() # else /* C code */ # define SWIG_PYTHON_THREAD_BEGIN_BLOCK PyGILState_STATE _swig_thread_block = PyGILState_Ensure() # define SWIG_PYTHON_THREAD_END_BLOCK PyGILState_Release(_swig_thread_block) # define SWIG_PYTHON_THREAD_BEGIN_ALLOW PyThreadState *_swig_thread_allow = PyEval_SaveThread() # define SWIG_PYTHON_THREAD_END_ALLOW PyEval_RestoreThread(_swig_thread_allow) # endif # else /* Old thread way, not implemented, user must provide it */ # if !defined(SWIG_PYTHON_INITIALIZE_THREADS) # define SWIG_PYTHON_INITIALIZE_THREADS # endif # if !defined(SWIG_PYTHON_THREAD_BEGIN_BLOCK) # define SWIG_PYTHON_THREAD_BEGIN_BLOCK # endif # if !defined(SWIG_PYTHON_THREAD_END_BLOCK) # define SWIG_PYTHON_THREAD_END_BLOCK # endif # if !defined(SWIG_PYTHON_THREAD_BEGIN_ALLOW) # define SWIG_PYTHON_THREAD_BEGIN_ALLOW # endif # if !defined(SWIG_PYTHON_THREAD_END_ALLOW) # define SWIG_PYTHON_THREAD_END_ALLOW # endif # endif #else /* No thread support */ # define SWIG_PYTHON_INITIALIZE_THREADS # define SWIG_PYTHON_THREAD_BEGIN_BLOCK # define SWIG_PYTHON_THREAD_END_BLOCK # define SWIG_PYTHON_THREAD_BEGIN_ALLOW # define SWIG_PYTHON_THREAD_END_ALLOW #endif /* ----------------------------------------------------------------------------- * Python API portion that goes into the runtime * ----------------------------------------------------------------------------- */ #ifdef __cplusplus extern "C" { #if 0 } /* cc-mode */ #endif #endif /* ----------------------------------------------------------------------------- * Constant declarations * ----------------------------------------------------------------------------- */ /* Constant Types */ #define SWIG_PY_POINTER 4 #define SWIG_PY_BINARY 5 /* Constant information structure */ typedef struct swig_const_info { int type; char *name; long lvalue; double dvalue; void *pvalue; swig_type_info **ptype; } swig_const_info; /* ----------------------------------------------------------------------------- * Wrapper of PyInstanceMethod_New() used in Python 3 * It is exported to the generated module, used for -fastproxy * ----------------------------------------------------------------------------- */ SWIGRUNTIME PyObject* SWIG_PyInstanceMethod_New(PyObject *self, PyObject *func) { #if PY_VERSION_HEX >= 0x03000000 return PyInstanceMethod_New(func); #else return NULL; #endif } #ifdef __cplusplus #if 0 { /* cc-mode */ #endif } #endif /* ----------------------------------------------------------------------------- * See the LICENSE file for information on copyright, usage and redistribution * of SWIG, and the README file for authors - http://www.swig.org/release.html. * * pyrun.swg * * This file contains the runtime support for Python modules * and includes code for managing global variables and pointer * type checking. * * ----------------------------------------------------------------------------- */ /* Common SWIG API */ /* for raw pointers */ #define SWIG_Python_ConvertPtr(obj, pptr, type, flags) SWIG_Python_ConvertPtrAndOwn(obj, pptr, type, flags, 0) #define SWIG_ConvertPtr(obj, pptr, type, flags) SWIG_Python_ConvertPtr(obj, pptr, type, flags) #define SWIG_ConvertPtrAndOwn(obj,pptr,type,flags,own) SWIG_Python_ConvertPtrAndOwn(obj, pptr, type, flags, own) #define SWIG_NewPointerObj(ptr, type, flags) SWIG_Python_NewPointerObj(ptr, type, flags) #define SWIG_CheckImplicit(ty) SWIG_Python_CheckImplicit(ty) #define SWIG_AcquirePtr(ptr, src) SWIG_Python_AcquirePtr(ptr, src) #define swig_owntype int /* for raw packed data */ #define SWIG_ConvertPacked(obj, ptr, sz, ty) SWIG_Python_ConvertPacked(obj, ptr, sz, ty) #define SWIG_NewPackedObj(ptr, sz, type) SWIG_Python_NewPackedObj(ptr, sz, type) /* for class or struct pointers */ #define SWIG_ConvertInstance(obj, pptr, type, flags) SWIG_ConvertPtr(obj, pptr, type, flags) #define SWIG_NewInstanceObj(ptr, type, flags) SWIG_NewPointerObj(ptr, type, flags) /* for C or C++ function pointers */ #define SWIG_ConvertFunctionPtr(obj, pptr, type) SWIG_Python_ConvertFunctionPtr(obj, pptr, type) #define SWIG_NewFunctionPtrObj(ptr, type) SWIG_Python_NewPointerObj(ptr, type, 0) /* for C++ member pointers, ie, member methods */ #define SWIG_ConvertMember(obj, ptr, sz, ty) SWIG_Python_ConvertPacked(obj, ptr, sz, ty) #define SWIG_NewMemberObj(ptr, sz, type) SWIG_Python_NewPackedObj(ptr, sz, type) /* Runtime API */ #define SWIG_GetModule(clientdata) SWIG_Python_GetModule() #define SWIG_SetModule(clientdata, pointer) SWIG_Python_SetModule(pointer) #define SWIG_NewClientData(obj) SwigPyClientData_New(obj) #define SWIG_SetErrorObj SWIG_Python_SetErrorObj #define SWIG_SetErrorMsg SWIG_Python_SetErrorMsg #define SWIG_ErrorType(code) SWIG_Python_ErrorType(code) #define SWIG_Error(code, msg) SWIG_Python_SetErrorMsg(SWIG_ErrorType(code), msg) #define SWIG_fail goto fail /* Runtime API implementation */ /* Error manipulation */ SWIGINTERN void SWIG_Python_SetErrorObj(PyObject *errtype, PyObject *obj) { SWIG_PYTHON_THREAD_BEGIN_BLOCK; PyErr_SetObject(errtype, obj); Py_DECREF(obj); SWIG_PYTHON_THREAD_END_BLOCK; } SWIGINTERN void SWIG_Python_SetErrorMsg(PyObject *errtype, const char *msg) { SWIG_PYTHON_THREAD_BEGIN_BLOCK; PyErr_SetString(errtype, (char *) msg); SWIG_PYTHON_THREAD_END_BLOCK; } #define SWIG_Python_Raise(obj, type, desc) SWIG_Python_SetErrorObj(SWIG_Python_ExceptionType(desc), obj) /* Set a constant value */ SWIGINTERN void SWIG_Python_SetConstant(PyObject *d, const char *name, PyObject *obj) { PyDict_SetItemString(d, (char*) name, obj); Py_DECREF(obj); } /* Append a value to the result obj */ SWIGINTERN PyObject* SWIG_Python_AppendOutput(PyObject* result, PyObject* obj) { #if !defined(SWIG_PYTHON_OUTPUT_TUPLE) if (!result) { result = obj; } else if (result == Py_None) { Py_DECREF(result); result = obj; } else { if (!PyList_Check(result)) { PyObject *o2 = result; result = PyList_New(1); PyList_SetItem(result, 0, o2); } PyList_Append(result,obj); Py_DECREF(obj); } return result; #else PyObject* o2; PyObject* o3; if (!result) { result = obj; } else if (result == Py_None) { Py_DECREF(result); result = obj; } else { if (!PyTuple_Check(result)) { o2 = result; result = PyTuple_New(1); PyTuple_SET_ITEM(result, 0, o2); } o3 = PyTuple_New(1); PyTuple_SET_ITEM(o3, 0, obj); o2 = result; result = PySequence_Concat(o2, o3); Py_DECREF(o2); Py_DECREF(o3); } return result; #endif } /* Unpack the argument tuple */ SWIGINTERN int SWIG_Python_UnpackTuple(PyObject *args, const char *name, Py_ssize_t min, Py_ssize_t max, PyObject **objs) { if (!args) { if (!min && !max) { return 1; } else { PyErr_Format(PyExc_TypeError, "%s expected %s%d arguments, got none", name, (min == max ? "" : "at least "), (int)min); return 0; } } if (!PyTuple_Check(args)) { PyErr_SetString(PyExc_SystemError, "UnpackTuple() argument list is not a tuple"); return 0; } else { register Py_ssize_t l = PyTuple_GET_SIZE(args); if (l < min) { PyErr_Format(PyExc_TypeError, "%s expected %s%d arguments, got %d", name, (min == max ? "" : "at least "), (int)min, (int)l); return 0; } else if (l > max) { PyErr_Format(PyExc_TypeError, "%s expected %s%d arguments, got %d", name, (min == max ? "" : "at most "), (int)max, (int)l); return 0; } else { register int i; for (i = 0; i < l; ++i) { objs[i] = PyTuple_GET_ITEM(args, i); } for (; l < max; ++l) { objs[l] = 0; } return i + 1; } } } /* A functor is a function object with one single object argument */ #if PY_VERSION_HEX >= 0x02020000 #define SWIG_Python_CallFunctor(functor, obj) PyObject_CallFunctionObjArgs(functor, obj, NULL); #else #define SWIG_Python_CallFunctor(functor, obj) PyObject_CallFunction(functor, "O", obj); #endif /* Helper for static pointer initialization for both C and C++ code, for example static PyObject *SWIG_STATIC_POINTER(MyVar) = NewSomething(...); */ #ifdef __cplusplus #define SWIG_STATIC_POINTER(var) var #else #define SWIG_STATIC_POINTER(var) var = 0; if (!var) var #endif /* ----------------------------------------------------------------------------- * Pointer declarations * ----------------------------------------------------------------------------- */ /* Flags for new pointer objects */ #define SWIG_POINTER_NOSHADOW (SWIG_POINTER_OWN << 1) #define SWIG_POINTER_NEW (SWIG_POINTER_NOSHADOW | SWIG_POINTER_OWN) #define SWIG_POINTER_IMPLICIT_CONV (SWIG_POINTER_DISOWN << 1) #ifdef __cplusplus extern "C" { #if 0 } /* cc-mode */ #endif #endif /* How to access Py_None */ #if defined(_WIN32) || defined(__WIN32__) || defined(__CYGWIN__) # ifndef SWIG_PYTHON_NO_BUILD_NONE # ifndef SWIG_PYTHON_BUILD_NONE # define SWIG_PYTHON_BUILD_NONE # endif # endif #endif #ifdef SWIG_PYTHON_BUILD_NONE # ifdef Py_None # undef Py_None # define Py_None SWIG_Py_None() # endif SWIGRUNTIMEINLINE PyObject * _SWIG_Py_None(void) { PyObject *none = Py_BuildValue((char*)""); Py_DECREF(none); return none; } SWIGRUNTIME PyObject * SWIG_Py_None(void) { static PyObject *SWIG_STATIC_POINTER(none) = _SWIG_Py_None(); return none; } #endif /* The python void return value */ SWIGRUNTIMEINLINE PyObject * SWIG_Py_Void(void) { PyObject *none = Py_None; Py_INCREF(none); return none; } /* SwigPyClientData */ typedef struct { PyObject *klass; PyObject *newraw; PyObject *newargs; PyObject *destroy; int delargs; int implicitconv; } SwigPyClientData; SWIGRUNTIMEINLINE int SWIG_Python_CheckImplicit(swig_type_info *ty) { SwigPyClientData *data = (SwigPyClientData *)ty->clientdata; return data ? data->implicitconv : 0; } SWIGRUNTIMEINLINE PyObject * SWIG_Python_ExceptionType(swig_type_info *desc) { SwigPyClientData *data = desc ? (SwigPyClientData *) desc->clientdata : 0; PyObject *klass = data ? data->klass : 0; return (klass ? klass : PyExc_RuntimeError); } SWIGRUNTIME SwigPyClientData * SwigPyClientData_New(PyObject* obj) { if (!obj) { return 0; } else { SwigPyClientData *data = (SwigPyClientData *)malloc(sizeof(SwigPyClientData)); /* the klass element */ data->klass = obj; Py_INCREF(data->klass); /* the newraw method and newargs arguments used to create a new raw instance */ if (PyClass_Check(obj)) { data->newraw = 0; data->newargs = obj; Py_INCREF(obj); } else { #if (PY_VERSION_HEX < 0x02020000) data->newraw = 0; #else data->newraw = PyObject_GetAttrString(data->klass, (char *)"__new__"); #endif if (data->newraw) { Py_INCREF(data->newraw); data->newargs = PyTuple_New(1); PyTuple_SetItem(data->newargs, 0, obj); } else { data->newargs = obj; } Py_INCREF(data->newargs); } /* the destroy method, aka as the C++ delete method */ data->destroy = PyObject_GetAttrString(data->klass, (char *)"__swig_destroy__"); if (PyErr_Occurred()) { PyErr_Clear(); data->destroy = 0; } if (data->destroy) { int flags; Py_INCREF(data->destroy); flags = PyCFunction_GET_FLAGS(data->destroy); #ifdef METH_O data->delargs = !(flags & (METH_O)); #else data->delargs = 0; #endif } else { data->delargs = 0; } data->implicitconv = 0; return data; } } SWIGRUNTIME void SwigPyClientData_Del(SwigPyClientData* data) { Py_XDECREF(data->newraw); Py_XDECREF(data->newargs); Py_XDECREF(data->destroy); } /* =============== SwigPyObject =====================*/ typedef struct { PyObject_HEAD void *ptr; swig_type_info *ty; int own; PyObject *next; } SwigPyObject; SWIGRUNTIME PyObject * SwigPyObject_long(SwigPyObject *v) { return PyLong_FromVoidPtr(v->ptr); } SWIGRUNTIME PyObject * SwigPyObject_format(const char* fmt, SwigPyObject *v) { PyObject *res = NULL; PyObject *args = PyTuple_New(1); if (args) { if (PyTuple_SetItem(args, 0, SwigPyObject_long(v)) == 0) { PyObject *ofmt = SWIG_Python_str_FromChar(fmt); if (ofmt) { #if PY_VERSION_HEX >= 0x03000000 res = PyUnicode_Format(ofmt,args); #else res = PyString_Format(ofmt,args); #endif Py_DECREF(ofmt); } Py_DECREF(args); } } return res; } SWIGRUNTIME PyObject * SwigPyObject_oct(SwigPyObject *v) { return SwigPyObject_format("%o",v); } SWIGRUNTIME PyObject * SwigPyObject_hex(SwigPyObject *v) { return SwigPyObject_format("%x",v); } SWIGRUNTIME PyObject * #ifdef METH_NOARGS SwigPyObject_repr(SwigPyObject *v) #else SwigPyObject_repr(SwigPyObject *v, PyObject *args) #endif { const char *name = SWIG_TypePrettyName(v->ty); PyObject *repr = SWIG_Python_str_FromFormat("", name, v); if (v->next) { #ifdef METH_NOARGS PyObject *nrep = SwigPyObject_repr((SwigPyObject *)v->next); #else PyObject *nrep = SwigPyObject_repr((SwigPyObject *)v->next, args); #endif #if PY_VERSION_HEX >= 0x03000000 PyObject *joined = PyUnicode_Concat(repr, nrep); Py_DecRef(repr); Py_DecRef(nrep); repr = joined; #else PyString_ConcatAndDel(&repr,nrep); #endif } return repr; } SWIGRUNTIME int SwigPyObject_print(SwigPyObject *v, FILE *fp, int SWIGUNUSEDPARM(flags)) { char *str; #ifdef METH_NOARGS PyObject *repr = SwigPyObject_repr(v); #else PyObject *repr = SwigPyObject_repr(v, NULL); #endif if (repr) { str = SWIG_Python_str_AsChar(repr); fputs(str, fp); SWIG_Python_str_DelForPy3(str); Py_DECREF(repr); return 0; } else { return 1; } } SWIGRUNTIME PyObject * SwigPyObject_str(SwigPyObject *v) { char result[SWIG_BUFFER_SIZE]; return SWIG_PackVoidPtr(result, v->ptr, v->ty->name, sizeof(result)) ? SWIG_Python_str_FromChar(result) : 0; } SWIGRUNTIME int SwigPyObject_compare(SwigPyObject *v, SwigPyObject *w) { void *i = v->ptr; void *j = w->ptr; return (i < j) ? -1 : ((i > j) ? 1 : 0); } /* Added for Python 3.x, would it also be useful for Python 2.x? */ SWIGRUNTIME PyObject* SwigPyObject_richcompare(SwigPyObject *v, SwigPyObject *w, int op) { PyObject* res; if( op != Py_EQ && op != Py_NE ) { Py_INCREF(Py_NotImplemented); return Py_NotImplemented; } if( (SwigPyObject_compare(v, w)==0) == (op == Py_EQ) ) res = Py_True; else res = Py_False; Py_INCREF(res); return res; } SWIGRUNTIME PyTypeObject* _PySwigObject_type(void); SWIGRUNTIME PyTypeObject* SwigPyObject_type(void) { static PyTypeObject *SWIG_STATIC_POINTER(type) = _PySwigObject_type(); return type; } SWIGRUNTIMEINLINE int SwigPyObject_Check(PyObject *op) { return (Py_TYPE(op) == SwigPyObject_type()) || (strcmp(Py_TYPE(op)->tp_name,"SwigPyObject") == 0); } SWIGRUNTIME PyObject * SwigPyObject_New(void *ptr, swig_type_info *ty, int own); SWIGRUNTIME void SwigPyObject_dealloc(PyObject *v) { SwigPyObject *sobj = (SwigPyObject *) v; PyObject *next = sobj->next; if (sobj->own == SWIG_POINTER_OWN) { swig_type_info *ty = sobj->ty; SwigPyClientData *data = ty ? (SwigPyClientData *) ty->clientdata : 0; PyObject *destroy = data ? data->destroy : 0; if (destroy) { /* destroy is always a VARARGS method */ PyObject *res; if (data->delargs) { /* we need to create a temporary object to carry the destroy operation */ PyObject *tmp = SwigPyObject_New(sobj->ptr, ty, 0); res = SWIG_Python_CallFunctor(destroy, tmp); Py_DECREF(tmp); } else { PyCFunction meth = PyCFunction_GET_FUNCTION(destroy); PyObject *mself = PyCFunction_GET_SELF(destroy); res = ((*meth)(mself, v)); } Py_XDECREF(res); } #if !defined(SWIG_PYTHON_SILENT_MEMLEAK) else { const char *name = SWIG_TypePrettyName(ty); printf("swig/python detected a memory leak of type '%s', no destructor found.\n", (name ? name : "unknown")); } #endif } Py_XDECREF(next); PyObject_DEL(v); } SWIGRUNTIME PyObject* SwigPyObject_append(PyObject* v, PyObject* next) { SwigPyObject *sobj = (SwigPyObject *) v; #ifndef METH_O PyObject *tmp = 0; if (!PyArg_ParseTuple(next,(char *)"O:append", &tmp)) return NULL; next = tmp; #endif if (!SwigPyObject_Check(next)) { return NULL; } sobj->next = next; Py_INCREF(next); return SWIG_Py_Void(); } SWIGRUNTIME PyObject* #ifdef METH_NOARGS SwigPyObject_next(PyObject* v) #else SwigPyObject_next(PyObject* v, PyObject *SWIGUNUSEDPARM(args)) #endif { SwigPyObject *sobj = (SwigPyObject *) v; if (sobj->next) { Py_INCREF(sobj->next); return sobj->next; } else { return SWIG_Py_Void(); } } SWIGINTERN PyObject* #ifdef METH_NOARGS SwigPyObject_disown(PyObject *v) #else SwigPyObject_disown(PyObject* v, PyObject *SWIGUNUSEDPARM(args)) #endif { SwigPyObject *sobj = (SwigPyObject *)v; sobj->own = 0; return SWIG_Py_Void(); } SWIGINTERN PyObject* #ifdef METH_NOARGS SwigPyObject_acquire(PyObject *v) #else SwigPyObject_acquire(PyObject* v, PyObject *SWIGUNUSEDPARM(args)) #endif { SwigPyObject *sobj = (SwigPyObject *)v; sobj->own = SWIG_POINTER_OWN; return SWIG_Py_Void(); } SWIGINTERN PyObject* SwigPyObject_own(PyObject *v, PyObject *args) { PyObject *val = 0; #if (PY_VERSION_HEX < 0x02020000) if (!PyArg_ParseTuple(args,(char *)"|O:own",&val)) #else if (!PyArg_UnpackTuple(args, (char *)"own", 0, 1, &val)) #endif { return NULL; } else { SwigPyObject *sobj = (SwigPyObject *)v; PyObject *obj = PyBool_FromLong(sobj->own); if (val) { #ifdef METH_NOARGS if (PyObject_IsTrue(val)) { SwigPyObject_acquire(v); } else { SwigPyObject_disown(v); } #else if (PyObject_IsTrue(val)) { SwigPyObject_acquire(v,args); } else { SwigPyObject_disown(v,args); } #endif } return obj; } } #ifdef METH_O static PyMethodDef swigobject_methods[] = { {(char *)"disown", (PyCFunction)SwigPyObject_disown, METH_NOARGS, (char *)"releases ownership of the pointer"}, {(char *)"acquire", (PyCFunction)SwigPyObject_acquire, METH_NOARGS, (char *)"aquires ownership of the pointer"}, {(char *)"own", (PyCFunction)SwigPyObject_own, METH_VARARGS, (char *)"returns/sets ownership of the pointer"}, {(char *)"append", (PyCFunction)SwigPyObject_append, METH_O, (char *)"appends another 'this' object"}, {(char *)"next", (PyCFunction)SwigPyObject_next, METH_NOARGS, (char *)"returns the next 'this' object"}, {(char *)"__repr__",(PyCFunction)SwigPyObject_repr, METH_NOARGS, (char *)"returns object representation"}, {0, 0, 0, 0} }; #else static PyMethodDef swigobject_methods[] = { {(char *)"disown", (PyCFunction)SwigPyObject_disown, METH_VARARGS, (char *)"releases ownership of the pointer"}, {(char *)"acquire", (PyCFunction)SwigPyObject_acquire, METH_VARARGS, (char *)"aquires ownership of the pointer"}, {(char *)"own", (PyCFunction)SwigPyObject_own, METH_VARARGS, (char *)"returns/sets ownership of the pointer"}, {(char *)"append", (PyCFunction)SwigPyObject_append, METH_VARARGS, (char *)"appends another 'this' object"}, {(char *)"next", (PyCFunction)SwigPyObject_next, METH_VARARGS, (char *)"returns the next 'this' object"}, {(char *)"__repr__",(PyCFunction)SwigPyObject_repr, METH_VARARGS, (char *)"returns object representation"}, {0, 0, 0, 0} }; #endif #if PY_VERSION_HEX < 0x02020000 SWIGINTERN PyObject * SwigPyObject_getattr(SwigPyObject *sobj,char *name) { return Py_FindMethod(swigobject_methods, (PyObject *)sobj, name); } #endif SWIGRUNTIME PyTypeObject* _PySwigObject_type(void) { static char swigobject_doc[] = "Swig object carries a C/C++ instance pointer"; static PyNumberMethods SwigPyObject_as_number = { (binaryfunc)0, /*nb_add*/ (binaryfunc)0, /*nb_subtract*/ (binaryfunc)0, /*nb_multiply*/ /* nb_divide removed in Python 3 */ #if PY_VERSION_HEX < 0x03000000 (binaryfunc)0, /*nb_divide*/ #endif (binaryfunc)0, /*nb_remainder*/ (binaryfunc)0, /*nb_divmod*/ (ternaryfunc)0,/*nb_power*/ (unaryfunc)0, /*nb_negative*/ (unaryfunc)0, /*nb_positive*/ (unaryfunc)0, /*nb_absolute*/ (inquiry)0, /*nb_nonzero*/ 0, /*nb_invert*/ 0, /*nb_lshift*/ 0, /*nb_rshift*/ 0, /*nb_and*/ 0, /*nb_xor*/ 0, /*nb_or*/ #if PY_VERSION_HEX < 0x03000000 0, /*nb_coerce*/ #endif (unaryfunc)SwigPyObject_long, /*nb_int*/ #if PY_VERSION_HEX < 0x03000000 (unaryfunc)SwigPyObject_long, /*nb_long*/ #else 0, /*nb_reserved*/ #endif (unaryfunc)0, /*nb_float*/ #if PY_VERSION_HEX < 0x03000000 (unaryfunc)SwigPyObject_oct, /*nb_oct*/ (unaryfunc)SwigPyObject_hex, /*nb_hex*/ #endif #if PY_VERSION_HEX >= 0x03000000 /* 3.0 */ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 /* nb_inplace_add -> nb_index, nb_inplace_divide removed */ #elif PY_VERSION_HEX >= 0x02050000 /* 2.5.0 */ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 /* nb_inplace_add -> nb_index */ #elif PY_VERSION_HEX >= 0x02020000 /* 2.2.0 */ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 /* nb_inplace_add -> nb_inplace_true_divide */ #elif PY_VERSION_HEX >= 0x02000000 /* 2.0.0 */ 0,0,0,0,0,0,0,0,0,0,0 /* nb_inplace_add -> nb_inplace_or */ #endif }; static PyTypeObject swigpyobject_type; static int type_init = 0; if (!type_init) { const PyTypeObject tmp = { /* PyObject header changed in Python 3 */ #if PY_VERSION_HEX >= 0x03000000 PyVarObject_HEAD_INIT(&PyType_Type, 0) #else PyObject_HEAD_INIT(NULL) 0, /* ob_size */ #endif (char *)"SwigPyObject", /* tp_name */ sizeof(SwigPyObject), /* tp_basicsize */ 0, /* tp_itemsize */ (destructor)SwigPyObject_dealloc, /* tp_dealloc */ (printfunc)SwigPyObject_print, /* tp_print */ #if PY_VERSION_HEX < 0x02020000 (getattrfunc)SwigPyObject_getattr, /* tp_getattr */ #else (getattrfunc)0, /* tp_getattr */ #endif (setattrfunc)0, /* tp_setattr */ #if PY_VERSION_HEX >= 0x03000000 0, /* tp_reserved in 3.0.1, tp_compare in 3.0.0 but not used */ #else (cmpfunc)SwigPyObject_compare, /* tp_compare */ #endif (reprfunc)SwigPyObject_repr, /* tp_repr */ &SwigPyObject_as_number, /* tp_as_number */ 0, /* tp_as_sequence */ 0, /* tp_as_mapping */ (hashfunc)0, /* tp_hash */ (ternaryfunc)0, /* tp_call */ (reprfunc)SwigPyObject_str, /* tp_str */ PyObject_GenericGetAttr, /* tp_getattro */ 0, /* tp_setattro */ 0, /* tp_as_buffer */ Py_TPFLAGS_DEFAULT, /* tp_flags */ swigobject_doc, /* tp_doc */ 0, /* tp_traverse */ 0, /* tp_clear */ (richcmpfunc)SwigPyObject_richcompare, /* tp_richcompare */ 0, /* tp_weaklistoffset */ #if PY_VERSION_HEX >= 0x02020000 0, /* tp_iter */ 0, /* tp_iternext */ swigobject_methods, /* tp_methods */ 0, /* tp_members */ 0, /* tp_getset */ 0, /* tp_base */ 0, /* tp_dict */ 0, /* tp_descr_get */ 0, /* tp_descr_set */ 0, /* tp_dictoffset */ 0, /* tp_init */ 0, /* tp_alloc */ 0, /* tp_new */ 0, /* tp_free */ 0, /* tp_is_gc */ 0, /* tp_bases */ 0, /* tp_mro */ 0, /* tp_cache */ 0, /* tp_subclasses */ 0, /* tp_weaklist */ #endif #if PY_VERSION_HEX >= 0x02030000 0, /* tp_del */ #endif #ifdef COUNT_ALLOCS 0,0,0,0 /* tp_alloc -> tp_next */ #endif }; swigpyobject_type = tmp; /* for Python 3 we already assigned ob_type in PyVarObject_HEAD_INIT() */ #if PY_VERSION_HEX < 0x03000000 swigpyobject_type.ob_type = &PyType_Type; #endif type_init = 1; } return &swigpyobject_type; } SWIGRUNTIME PyObject * SwigPyObject_New(void *ptr, swig_type_info *ty, int own) { SwigPyObject *sobj = PyObject_NEW(SwigPyObject, SwigPyObject_type()); if (sobj) { sobj->ptr = ptr; sobj->ty = ty; sobj->own = own; sobj->next = 0; } return (PyObject *)sobj; } /* ----------------------------------------------------------------------------- * Implements a simple Swig Packed type, and use it instead of string * ----------------------------------------------------------------------------- */ typedef struct { PyObject_HEAD void *pack; swig_type_info *ty; size_t size; } SwigPyPacked; SWIGRUNTIME int SwigPyPacked_print(SwigPyPacked *v, FILE *fp, int SWIGUNUSEDPARM(flags)) { char result[SWIG_BUFFER_SIZE]; fputs("pack, v->size, 0, sizeof(result))) { fputs("at ", fp); fputs(result, fp); } fputs(v->ty->name,fp); fputs(">", fp); return 0; } SWIGRUNTIME PyObject * SwigPyPacked_repr(SwigPyPacked *v) { char result[SWIG_BUFFER_SIZE]; if (SWIG_PackDataName(result, v->pack, v->size, 0, sizeof(result))) { return SWIG_Python_str_FromFormat("", result, v->ty->name); } else { return SWIG_Python_str_FromFormat("", v->ty->name); } } SWIGRUNTIME PyObject * SwigPyPacked_str(SwigPyPacked *v) { char result[SWIG_BUFFER_SIZE]; if (SWIG_PackDataName(result, v->pack, v->size, 0, sizeof(result))){ return SWIG_Python_str_FromFormat("%s%s", result, v->ty->name); } else { return SWIG_Python_str_FromChar(v->ty->name); } } SWIGRUNTIME int SwigPyPacked_compare(SwigPyPacked *v, SwigPyPacked *w) { size_t i = v->size; size_t j = w->size; int s = (i < j) ? -1 : ((i > j) ? 1 : 0); return s ? s : strncmp((char *)v->pack, (char *)w->pack, 2*v->size); } SWIGRUNTIME PyTypeObject* _PySwigPacked_type(void); SWIGRUNTIME PyTypeObject* SwigPyPacked_type(void) { static PyTypeObject *SWIG_STATIC_POINTER(type) = _PySwigPacked_type(); return type; } SWIGRUNTIMEINLINE int SwigPyPacked_Check(PyObject *op) { return ((op)->ob_type == _PySwigPacked_type()) || (strcmp((op)->ob_type->tp_name,"SwigPyPacked") == 0); } SWIGRUNTIME void SwigPyPacked_dealloc(PyObject *v) { if (SwigPyPacked_Check(v)) { SwigPyPacked *sobj = (SwigPyPacked *) v; free(sobj->pack); } PyObject_DEL(v); } SWIGRUNTIME PyTypeObject* _PySwigPacked_type(void) { static char swigpacked_doc[] = "Swig object carries a C/C++ instance pointer"; static PyTypeObject swigpypacked_type; static int type_init = 0; if (!type_init) { const PyTypeObject tmp = { /* PyObject header changed in Python 3 */ #if PY_VERSION_HEX>=0x03000000 PyVarObject_HEAD_INIT(&PyType_Type, 0) #else PyObject_HEAD_INIT(NULL) 0, /* ob_size */ #endif (char *)"SwigPyPacked", /* tp_name */ sizeof(SwigPyPacked), /* tp_basicsize */ 0, /* tp_itemsize */ (destructor)SwigPyPacked_dealloc, /* tp_dealloc */ (printfunc)SwigPyPacked_print, /* tp_print */ (getattrfunc)0, /* tp_getattr */ (setattrfunc)0, /* tp_setattr */ #if PY_VERSION_HEX>=0x03000000 0, /* tp_reserved in 3.0.1 */ #else (cmpfunc)SwigPyPacked_compare, /* tp_compare */ #endif (reprfunc)SwigPyPacked_repr, /* tp_repr */ 0, /* tp_as_number */ 0, /* tp_as_sequence */ 0, /* tp_as_mapping */ (hashfunc)0, /* tp_hash */ (ternaryfunc)0, /* tp_call */ (reprfunc)SwigPyPacked_str, /* tp_str */ PyObject_GenericGetAttr, /* tp_getattro */ 0, /* tp_setattro */ 0, /* tp_as_buffer */ Py_TPFLAGS_DEFAULT, /* tp_flags */ swigpacked_doc, /* tp_doc */ 0, /* tp_traverse */ 0, /* tp_clear */ 0, /* tp_richcompare */ 0, /* tp_weaklistoffset */ #if PY_VERSION_HEX >= 0x02020000 0, /* tp_iter */ 0, /* tp_iternext */ 0, /* tp_methods */ 0, /* tp_members */ 0, /* tp_getset */ 0, /* tp_base */ 0, /* tp_dict */ 0, /* tp_descr_get */ 0, /* tp_descr_set */ 0, /* tp_dictoffset */ 0, /* tp_init */ 0, /* tp_alloc */ 0, /* tp_new */ 0, /* tp_free */ 0, /* tp_is_gc */ 0, /* tp_bases */ 0, /* tp_mro */ 0, /* tp_cache */ 0, /* tp_subclasses */ 0, /* tp_weaklist */ #endif #if PY_VERSION_HEX >= 0x02030000 0, /* tp_del */ #endif #ifdef COUNT_ALLOCS 0,0,0,0 /* tp_alloc -> tp_next */ #endif }; swigpypacked_type = tmp; /* for Python 3 the ob_type already assigned in PyVarObject_HEAD_INIT() */ #if PY_VERSION_HEX < 0x03000000 swigpypacked_type.ob_type = &PyType_Type; #endif type_init = 1; } return &swigpypacked_type; } SWIGRUNTIME PyObject * SwigPyPacked_New(void *ptr, size_t size, swig_type_info *ty) { SwigPyPacked *sobj = PyObject_NEW(SwigPyPacked, SwigPyPacked_type()); if (sobj) { void *pack = malloc(size); if (pack) { memcpy(pack, ptr, size); sobj->pack = pack; sobj->ty = ty; sobj->size = size; } else { PyObject_DEL((PyObject *) sobj); sobj = 0; } } return (PyObject *) sobj; } SWIGRUNTIME swig_type_info * SwigPyPacked_UnpackData(PyObject *obj, void *ptr, size_t size) { if (SwigPyPacked_Check(obj)) { SwigPyPacked *sobj = (SwigPyPacked *)obj; if (sobj->size != size) return 0; memcpy(ptr, sobj->pack, size); return sobj->ty; } else { return 0; } } /* ----------------------------------------------------------------------------- * pointers/data manipulation * ----------------------------------------------------------------------------- */ SWIGRUNTIMEINLINE PyObject * _SWIG_This(void) { return SWIG_Python_str_FromChar("this"); } SWIGRUNTIME PyObject * SWIG_This(void) { static PyObject *SWIG_STATIC_POINTER(swig_this) = _SWIG_This(); return swig_this; } /* #define SWIG_PYTHON_SLOW_GETSET_THIS */ /* TODO: I don't know how to implement the fast getset in Python 3 right now */ #if PY_VERSION_HEX>=0x03000000 #define SWIG_PYTHON_SLOW_GETSET_THIS #endif SWIGRUNTIME SwigPyObject * SWIG_Python_GetSwigThis(PyObject *pyobj) { if (SwigPyObject_Check(pyobj)) { return (SwigPyObject *) pyobj; } else { PyObject *obj = 0; #if (!defined(SWIG_PYTHON_SLOW_GETSET_THIS) && (PY_VERSION_HEX >= 0x02030000)) if (PyInstance_Check(pyobj)) { obj = _PyInstance_Lookup(pyobj, SWIG_This()); } else { PyObject **dictptr = _PyObject_GetDictPtr(pyobj); if (dictptr != NULL) { PyObject *dict = *dictptr; obj = dict ? PyDict_GetItem(dict, SWIG_This()) : 0; } else { #ifdef PyWeakref_CheckProxy if (PyWeakref_CheckProxy(pyobj)) { PyObject *wobj = PyWeakref_GET_OBJECT(pyobj); return wobj ? SWIG_Python_GetSwigThis(wobj) : 0; } #endif obj = PyObject_GetAttr(pyobj,SWIG_This()); if (obj) { Py_DECREF(obj); } else { if (PyErr_Occurred()) PyErr_Clear(); return 0; } } } #else obj = PyObject_GetAttr(pyobj,SWIG_This()); if (obj) { Py_DECREF(obj); } else { if (PyErr_Occurred()) PyErr_Clear(); return 0; } #endif if (obj && !SwigPyObject_Check(obj)) { /* a PyObject is called 'this', try to get the 'real this' SwigPyObject from it */ return SWIG_Python_GetSwigThis(obj); } return (SwigPyObject *)obj; } } /* Acquire a pointer value */ SWIGRUNTIME int SWIG_Python_AcquirePtr(PyObject *obj, int own) { if (own == SWIG_POINTER_OWN) { SwigPyObject *sobj = SWIG_Python_GetSwigThis(obj); if (sobj) { int oldown = sobj->own; sobj->own = own; return oldown; } } return 0; } /* Convert a pointer value */ SWIGRUNTIME int SWIG_Python_ConvertPtrAndOwn(PyObject *obj, void **ptr, swig_type_info *ty, int flags, int *own) { if (!obj) return SWIG_ERROR; if (obj == Py_None) { if (ptr) *ptr = 0; return SWIG_OK; } else { SwigPyObject *sobj = SWIG_Python_GetSwigThis(obj); if (own) *own = 0; while (sobj) { void *vptr = sobj->ptr; if (ty) { swig_type_info *to = sobj->ty; if (to == ty) { /* no type cast needed */ if (ptr) *ptr = vptr; break; } else { swig_cast_info *tc = SWIG_TypeCheck(to->name,ty); if (!tc) { sobj = (SwigPyObject *)sobj->next; } else { if (ptr) { int newmemory = 0; *ptr = SWIG_TypeCast(tc,vptr,&newmemory); if (newmemory == SWIG_CAST_NEW_MEMORY) { assert(own); if (own) *own = *own | SWIG_CAST_NEW_MEMORY; } } break; } } } else { if (ptr) *ptr = vptr; break; } } if (sobj) { if (own) *own = *own | sobj->own; if (flags & SWIG_POINTER_DISOWN) { sobj->own = 0; } return SWIG_OK; } else { int res = SWIG_ERROR; if (flags & SWIG_POINTER_IMPLICIT_CONV) { SwigPyClientData *data = ty ? (SwigPyClientData *) ty->clientdata : 0; if (data && !data->implicitconv) { PyObject *klass = data->klass; if (klass) { PyObject *impconv; data->implicitconv = 1; /* avoid recursion and call 'explicit' constructors*/ impconv = SWIG_Python_CallFunctor(klass, obj); data->implicitconv = 0; if (PyErr_Occurred()) { PyErr_Clear(); impconv = 0; } if (impconv) { SwigPyObject *iobj = SWIG_Python_GetSwigThis(impconv); if (iobj) { void *vptr; res = SWIG_Python_ConvertPtrAndOwn((PyObject*)iobj, &vptr, ty, 0, 0); if (SWIG_IsOK(res)) { if (ptr) { *ptr = vptr; /* transfer the ownership to 'ptr' */ iobj->own = 0; res = SWIG_AddCast(res); res = SWIG_AddNewMask(res); } else { res = SWIG_AddCast(res); } } } Py_DECREF(impconv); } } } } return res; } } } /* Convert a function ptr value */ SWIGRUNTIME int SWIG_Python_ConvertFunctionPtr(PyObject *obj, void **ptr, swig_type_info *ty) { if (!PyCFunction_Check(obj)) { return SWIG_ConvertPtr(obj, ptr, ty, 0); } else { void *vptr = 0; /* here we get the method pointer for callbacks */ const char *doc = (((PyCFunctionObject *)obj) -> m_ml -> ml_doc); const char *desc = doc ? strstr(doc, "swig_ptr: ") : 0; if (desc) desc = ty ? SWIG_UnpackVoidPtr(desc + 10, &vptr, ty->name) : 0; if (!desc) return SWIG_ERROR; if (ty) { swig_cast_info *tc = SWIG_TypeCheck(desc,ty); if (tc) { int newmemory = 0; *ptr = SWIG_TypeCast(tc,vptr,&newmemory); assert(!newmemory); /* newmemory handling not yet implemented */ } else { return SWIG_ERROR; } } else { *ptr = vptr; } return SWIG_OK; } } /* Convert a packed value value */ SWIGRUNTIME int SWIG_Python_ConvertPacked(PyObject *obj, void *ptr, size_t sz, swig_type_info *ty) { swig_type_info *to = SwigPyPacked_UnpackData(obj, ptr, sz); if (!to) return SWIG_ERROR; if (ty) { if (to != ty) { /* check type cast? */ swig_cast_info *tc = SWIG_TypeCheck(to->name,ty); if (!tc) return SWIG_ERROR; } } return SWIG_OK; } /* ----------------------------------------------------------------------------- * Create a new pointer object * ----------------------------------------------------------------------------- */ /* Create a new instance object, without calling __init__, and set the 'this' attribute. */ SWIGRUNTIME PyObject* SWIG_Python_NewShadowInstance(SwigPyClientData *data, PyObject *swig_this) { #if (PY_VERSION_HEX >= 0x02020000) PyObject *inst = 0; PyObject *newraw = data->newraw; if (newraw) { inst = PyObject_Call(newraw, data->newargs, NULL); if (inst) { #if !defined(SWIG_PYTHON_SLOW_GETSET_THIS) PyObject **dictptr = _PyObject_GetDictPtr(inst); if (dictptr != NULL) { PyObject *dict = *dictptr; if (dict == NULL) { dict = PyDict_New(); *dictptr = dict; PyDict_SetItem(dict, SWIG_This(), swig_this); } } #else PyObject *key = SWIG_This(); PyObject_SetAttr(inst, key, swig_this); #endif } } else { #if PY_VERSION_HEX >= 0x03000000 inst = PyBaseObject_Type.tp_new((PyTypeObject*) data->newargs, Py_None, Py_None); PyObject_SetAttr(inst, SWIG_This(), swig_this); Py_TYPE(inst)->tp_flags &= ~Py_TPFLAGS_VALID_VERSION_TAG; #else PyObject *dict = PyDict_New(); PyDict_SetItem(dict, SWIG_This(), swig_this); inst = PyInstance_NewRaw(data->newargs, dict); Py_DECREF(dict); #endif } return inst; #else #if (PY_VERSION_HEX >= 0x02010000) PyObject *inst; PyObject *dict = PyDict_New(); PyDict_SetItem(dict, SWIG_This(), swig_this); inst = PyInstance_NewRaw(data->newargs, dict); Py_DECREF(dict); return (PyObject *) inst; #else PyInstanceObject *inst = PyObject_NEW(PyInstanceObject, &PyInstance_Type); if (inst == NULL) { return NULL; } inst->in_class = (PyClassObject *)data->newargs; Py_INCREF(inst->in_class); inst->in_dict = PyDict_New(); if (inst->in_dict == NULL) { Py_DECREF(inst); return NULL; } #ifdef Py_TPFLAGS_HAVE_WEAKREFS inst->in_weakreflist = NULL; #endif #ifdef Py_TPFLAGS_GC PyObject_GC_Init(inst); #endif PyDict_SetItem(inst->in_dict, SWIG_This(), swig_this); return (PyObject *) inst; #endif #endif } SWIGRUNTIME void SWIG_Python_SetSwigThis(PyObject *inst, PyObject *swig_this) { PyObject *dict; #if (PY_VERSION_HEX >= 0x02020000) && !defined(SWIG_PYTHON_SLOW_GETSET_THIS) PyObject **dictptr = _PyObject_GetDictPtr(inst); if (dictptr != NULL) { dict = *dictptr; if (dict == NULL) { dict = PyDict_New(); *dictptr = dict; } PyDict_SetItem(dict, SWIG_This(), swig_this); return; } #endif dict = PyObject_GetAttrString(inst, (char*)"__dict__"); PyDict_SetItem(dict, SWIG_This(), swig_this); Py_DECREF(dict); } SWIGINTERN PyObject * SWIG_Python_InitShadowInstance(PyObject *args) { PyObject *obj[2]; if (!SWIG_Python_UnpackTuple(args,(char*)"swiginit", 2, 2, obj)) { return NULL; } else { SwigPyObject *sthis = SWIG_Python_GetSwigThis(obj[0]); if (sthis) { SwigPyObject_append((PyObject*) sthis, obj[1]); } else { SWIG_Python_SetSwigThis(obj[0], obj[1]); } return SWIG_Py_Void(); } } /* Create a new pointer object */ SWIGRUNTIME PyObject * SWIG_Python_NewPointerObj(void *ptr, swig_type_info *type, int flags) { if (!ptr) { return SWIG_Py_Void(); } else { int own = (flags & SWIG_POINTER_OWN) ? SWIG_POINTER_OWN : 0; PyObject *robj = SwigPyObject_New(ptr, type, own); SwigPyClientData *clientdata = type ? (SwigPyClientData *)(type->clientdata) : 0; if (clientdata && !(flags & SWIG_POINTER_NOSHADOW)) { PyObject *inst = SWIG_Python_NewShadowInstance(clientdata, robj); if (inst) { Py_DECREF(robj); robj = inst; } } return robj; } } /* Create a new packed object */ SWIGRUNTIMEINLINE PyObject * SWIG_Python_NewPackedObj(void *ptr, size_t sz, swig_type_info *type) { return ptr ? SwigPyPacked_New((void *) ptr, sz, type) : SWIG_Py_Void(); } /* -----------------------------------------------------------------------------* * Get type list * -----------------------------------------------------------------------------*/ #ifdef SWIG_LINK_RUNTIME void *SWIG_ReturnGlobalTypeList(void *); #endif SWIGRUNTIME swig_module_info * SWIG_Python_GetModule(void) { static void *type_pointer = (void *)0; /* first check if module already created */ if (!type_pointer) { #ifdef SWIG_LINK_RUNTIME type_pointer = SWIG_ReturnGlobalTypeList((void *)0); #else type_pointer = PyCObject_Import((char*)"swig_runtime_data" SWIG_RUNTIME_VERSION, (char*)"type_pointer" SWIG_TYPE_TABLE_NAME); if (PyErr_Occurred()) { PyErr_Clear(); type_pointer = (void *)0; } #endif } return (swig_module_info *) type_pointer; } #if PY_MAJOR_VERSION < 2 /* PyModule_AddObject function was introduced in Python 2.0. The following function is copied out of Python/modsupport.c in python version 2.3.4 */ SWIGINTERN int PyModule_AddObject(PyObject *m, char *name, PyObject *o) { PyObject *dict; if (!PyModule_Check(m)) { PyErr_SetString(PyExc_TypeError, "PyModule_AddObject() needs module as first arg"); return SWIG_ERROR; } if (!o) { PyErr_SetString(PyExc_TypeError, "PyModule_AddObject() needs non-NULL value"); return SWIG_ERROR; } dict = PyModule_GetDict(m); if (dict == NULL) { /* Internal error -- modules must have a dict! */ PyErr_Format(PyExc_SystemError, "module '%s' has no __dict__", PyModule_GetName(m)); return SWIG_ERROR; } if (PyDict_SetItemString(dict, name, o)) return SWIG_ERROR; Py_DECREF(o); return SWIG_OK; } #endif SWIGRUNTIME void SWIG_Python_DestroyModule(void *vptr) { swig_module_info *swig_module = (swig_module_info *) vptr; swig_type_info **types = swig_module->types; size_t i; for (i =0; i < swig_module->size; ++i) { swig_type_info *ty = types[i]; if (ty->owndata) { SwigPyClientData *data = (SwigPyClientData *) ty->clientdata; if (data) SwigPyClientData_Del(data); } } Py_DECREF(SWIG_This()); } SWIGRUNTIME void SWIG_Python_SetModule(swig_module_info *swig_module) { static PyMethodDef swig_empty_runtime_method_table[] = { {NULL, NULL, 0, NULL} };/* Sentinel */ #if PY_VERSION_HEX >= 0x03000000 /* Add a dummy module object into sys.modules */ PyObject *module = PyImport_AddModule((char*)"swig_runtime_data" SWIG_RUNTIME_VERSION); #else PyObject *module = Py_InitModule((char*)"swig_runtime_data" SWIG_RUNTIME_VERSION, swig_empty_runtime_method_table); #endif PyObject *pointer = PyCObject_FromVoidPtr((void *) swig_module, SWIG_Python_DestroyModule); if (pointer && module) { PyModule_AddObject(module, (char*)"type_pointer" SWIG_TYPE_TABLE_NAME, pointer); } else { Py_XDECREF(pointer); } } /* The python cached type query */ SWIGRUNTIME PyObject * SWIG_Python_TypeCache(void) { static PyObject *SWIG_STATIC_POINTER(cache) = PyDict_New(); return cache; } SWIGRUNTIME swig_type_info * SWIG_Python_TypeQuery(const char *type) { PyObject *cache = SWIG_Python_TypeCache(); PyObject *key = SWIG_Python_str_FromChar(type); PyObject *obj = PyDict_GetItem(cache, key); swig_type_info *descriptor; if (obj) { descriptor = (swig_type_info *) PyCObject_AsVoidPtr(obj); } else { swig_module_info *swig_module = SWIG_Python_GetModule(); descriptor = SWIG_TypeQueryModule(swig_module, swig_module, type); if (descriptor) { obj = PyCObject_FromVoidPtr(descriptor, NULL); PyDict_SetItem(cache, key, obj); Py_DECREF(obj); } } Py_DECREF(key); return descriptor; } /* For backward compatibility only */ #define SWIG_POINTER_EXCEPTION 0 #define SWIG_arg_fail(arg) SWIG_Python_ArgFail(arg) #define SWIG_MustGetPtr(p, type, argnum, flags) SWIG_Python_MustGetPtr(p, type, argnum, flags) SWIGRUNTIME int SWIG_Python_AddErrMesg(const char* mesg, int infront) { if (PyErr_Occurred()) { PyObject *type = 0; PyObject *value = 0; PyObject *traceback = 0; PyErr_Fetch(&type, &value, &traceback); if (value) { char *tmp; PyObject *old_str = PyObject_Str(value); Py_XINCREF(type); PyErr_Clear(); if (infront) { PyErr_Format(type, "%s %s", mesg, tmp = SWIG_Python_str_AsChar(old_str)); } else { PyErr_Format(type, "%s %s", tmp = SWIG_Python_str_AsChar(old_str), mesg); } SWIG_Python_str_DelForPy3(tmp); Py_DECREF(old_str); } return 1; } else { return 0; } } SWIGRUNTIME int SWIG_Python_ArgFail(int argnum) { if (PyErr_Occurred()) { /* add information about failing argument */ char mesg[256]; PyOS_snprintf(mesg, sizeof(mesg), "argument number %d:", argnum); return SWIG_Python_AddErrMesg(mesg, 1); } else { return 0; } } SWIGRUNTIMEINLINE const char * SwigPyObject_GetDesc(PyObject *self) { SwigPyObject *v = (SwigPyObject *)self; swig_type_info *ty = v ? v->ty : 0; return ty ? ty->str : (char*)""; } SWIGRUNTIME void SWIG_Python_TypeError(const char *type, PyObject *obj) { if (type) { #if defined(SWIG_COBJECT_TYPES) if (obj && SwigPyObject_Check(obj)) { const char *otype = (const char *) SwigPyObject_GetDesc(obj); if (otype) { PyErr_Format(PyExc_TypeError, "a '%s' is expected, 'SwigPyObject(%s)' is received", type, otype); return; } } else #endif { const char *otype = (obj ? obj->ob_type->tp_name : 0); if (otype) { PyObject *str = PyObject_Str(obj); const char *cstr = str ? SWIG_Python_str_AsChar(str) : 0; if (cstr) { PyErr_Format(PyExc_TypeError, "a '%s' is expected, '%s(%s)' is received", type, otype, cstr); SWIG_Python_str_DelForPy3(cstr); } else { PyErr_Format(PyExc_TypeError, "a '%s' is expected, '%s' is received", type, otype); } Py_XDECREF(str); return; } } PyErr_Format(PyExc_TypeError, "a '%s' is expected", type); } else { PyErr_Format(PyExc_TypeError, "unexpected type is received"); } } /* Convert a pointer value, signal an exception on a type mismatch */ SWIGRUNTIME void * SWIG_Python_MustGetPtr(PyObject *obj, swig_type_info *ty, int argnum, int flags) { void *result; if (SWIG_Python_ConvertPtr(obj, &result, ty, flags) == -1) { PyErr_Clear(); #if SWIG_POINTER_EXCEPTION if (flags) { SWIG_Python_TypeError(SWIG_TypePrettyName(ty), obj); SWIG_Python_ArgFail(argnum); } #endif } return result; } #ifdef __cplusplus #if 0 { /* cc-mode */ #endif } #endif #define SWIG_exception_fail(code, msg) do { SWIG_Error(code, msg); SWIG_fail; } while(0) #define SWIG_contract_assert(expr, msg) if (!(expr)) { SWIG_Error(SWIG_RuntimeError, msg); SWIG_fail; } else #define SWIG_exception(code, msg) do { SWIG_Error(code, msg); SWIG_fail;; } while(0) /* -------- TYPES TABLE (BEGIN) -------- */ #define SWIGTYPE_p_Prelude__Client swig_types[0] #define SWIGTYPE_p_Prelude__ClientEasy swig_types[1] #define SWIGTYPE_p_Prelude__ClientProfile swig_types[2] #define SWIGTYPE_p_Prelude__Connection swig_types[3] #define SWIGTYPE_p_Prelude__ConnectionPool swig_types[4] #define SWIGTYPE_p_Prelude__IDMEF swig_types[5] #define SWIGTYPE_p_Prelude__IDMEFCriteria swig_types[6] #define SWIGTYPE_p_Prelude__IDMEFCriterion swig_types[7] #define SWIGTYPE_p_Prelude__IDMEFPath swig_types[8] #define SWIGTYPE_p_Prelude__IDMEFTime swig_types[9] #define SWIGTYPE_p_Prelude__IDMEFValue swig_types[10] #define SWIGTYPE_p_Prelude__PreludeError swig_types[11] #define SWIGTYPE_p_Prelude__PreludeLog swig_types[12] #define SWIGTYPE_p_allocator_type swig_types[13] #define SWIGTYPE_p_char swig_types[14] #define SWIGTYPE_p_difference_type swig_types[15] #define SWIGTYPE_p_f_int_p_q_const__char__void swig_types[16] #define SWIGTYPE_p_idmef_class_id_t swig_types[17] #define SWIGTYPE_p_idmef_criteria_t swig_types[18] #define SWIGTYPE_p_idmef_criterion_operator_t swig_types[19] #define SWIGTYPE_p_idmef_message_t swig_types[20] #define SWIGTYPE_p_idmef_path_t swig_types[21] #define SWIGTYPE_p_idmef_time_t swig_types[22] #define SWIGTYPE_p_idmef_value_t swig_types[23] #define SWIGTYPE_p_idmef_value_type_id_t swig_types[24] #define SWIGTYPE_p_int swig_types[25] #define SWIGTYPE_p_long_long swig_types[26] #define SWIGTYPE_p_prelude_client_profile_t swig_types[27] #define SWIGTYPE_p_prelude_client_t swig_types[28] #define SWIGTYPE_p_prelude_connection_pool_t swig_types[29] #define SWIGTYPE_p_prelude_connection_t swig_types[30] #define SWIGTYPE_p_short swig_types[31] #define SWIGTYPE_p_size_type swig_types[32] #define SWIGTYPE_p_std__exception swig_types[33] #define SWIGTYPE_p_std__invalid_argument swig_types[34] #define SWIGTYPE_p_swig__SwigPyIterator swig_types[35] #define SWIGTYPE_p_time_t swig_types[36] #define SWIGTYPE_p_timeval swig_types[37] #define SWIGTYPE_p_unsigned_char swig_types[38] #define SWIGTYPE_p_unsigned_int swig_types[39] #define SWIGTYPE_p_unsigned_long_long swig_types[40] #define SWIGTYPE_p_unsigned_short swig_types[41] #define SWIGTYPE_p_value_type swig_types[42] #define SWIGTYPE_p_void swig_types[43] static swig_type_info *swig_types[45]; static swig_module_info swig_module = {swig_types, 44, 0, 0, 0, 0}; #define SWIG_TypeQuery(name) SWIG_TypeQueryModule(&swig_module, &swig_module, name) #define SWIG_MangledTypeQuery(name) SWIG_MangledTypeQueryModule(&swig_module, &swig_module, name) /* -------- TYPES TABLE (END) -------- */ #if (PY_VERSION_HEX <= 0x02000000) # if !defined(SWIG_PYTHON_CLASSIC) # error "This python version requires swig to be run with the '-classic' option" # endif #endif /*----------------------------------------------- @(target):= _PreludeEasy.so ------------------------------------------------*/ #if PY_VERSION_HEX >= 0x03000000 # define SWIG_init PyInit__PreludeEasy #else # define SWIG_init init_PreludeEasy #endif #define SWIG_name "_PreludeEasy" #define SWIGVERSION 0x010340 #define SWIG_VERSION SWIGVERSION #define SWIG_as_voidptr(a) const_cast< void * >(static_cast< const void * >(a)) #define SWIG_as_voidptrptr(a) ((void)SWIG_as_voidptr(*a),reinterpret_cast< void** >(a)) #include namespace swig { class SwigPtr_PyObject { protected: PyObject *_obj; public: SwigPtr_PyObject() :_obj(0) { } SwigPtr_PyObject(const SwigPtr_PyObject& item) : _obj(item._obj) { Py_XINCREF(_obj); } SwigPtr_PyObject(PyObject *obj, bool initial_ref = true) :_obj(obj) { if (initial_ref) { Py_XINCREF(_obj); } } SwigPtr_PyObject & operator=(const SwigPtr_PyObject& item) { Py_XINCREF(item._obj); Py_XDECREF(_obj); _obj = item._obj; return *this; } ~SwigPtr_PyObject() { Py_XDECREF(_obj); } operator PyObject *() const { return _obj; } PyObject *operator->() const { return _obj; } }; } namespace swig { struct SwigVar_PyObject : SwigPtr_PyObject { SwigVar_PyObject(PyObject* obj = 0) : SwigPtr_PyObject(obj, false) { } SwigVar_PyObject & operator = (PyObject* obj) { Py_XDECREF(_obj); _obj = obj; return *this; } }; } #include #include #include #if defined(__GNUC__) # if __GNUC__ == 2 && __GNUC_MINOR <= 96 # define SWIG_STD_NOMODERN_STL # endif #endif #include #include namespace swig { struct stop_iteration { }; struct SwigPyIterator { private: SwigPtr_PyObject _seq; protected: SwigPyIterator(PyObject *seq) : _seq(seq) { } public: virtual ~SwigPyIterator() {} // Access iterator method, required by Python virtual PyObject *value() const = 0; // Forward iterator method, required by Python virtual SwigPyIterator *incr(size_t n = 1) = 0; // Backward iterator method, very common in C++, but not required in Python virtual SwigPyIterator *decr(size_t /*n*/ = 1) { throw stop_iteration(); } // Random access iterator methods, but not required in Python virtual ptrdiff_t distance(const SwigPyIterator &/*x*/) const { throw std::invalid_argument("operation not supported"); } virtual bool equal (const SwigPyIterator &/*x*/) const { throw std::invalid_argument("operation not supported"); } // C++ common/needed methods virtual SwigPyIterator *copy() const = 0; PyObject *next() { SWIG_PYTHON_THREAD_BEGIN_BLOCK; // disable threads PyObject *obj = value(); incr(); SWIG_PYTHON_THREAD_END_BLOCK; // re-enable threads return obj; } /* Make an alias for Python 3.x */ PyObject *__next__() { return next(); } PyObject *previous() { SWIG_PYTHON_THREAD_BEGIN_BLOCK; // disable threads decr(); PyObject *obj = value(); SWIG_PYTHON_THREAD_END_BLOCK; // re-enable threads return obj; } SwigPyIterator *advance(ptrdiff_t n) { return (n > 0) ? incr(n) : decr(-n); } bool operator == (const SwigPyIterator& x) const { return equal(x); } bool operator != (const SwigPyIterator& x) const { return ! operator==(x); } SwigPyIterator& operator += (ptrdiff_t n) { return *advance(n); } SwigPyIterator& operator -= (ptrdiff_t n) { return *advance(-n); } SwigPyIterator* operator + (ptrdiff_t n) const { return copy()->advance(n); } SwigPyIterator* operator - (ptrdiff_t n) const { return copy()->advance(-n); } ptrdiff_t operator - (const SwigPyIterator& x) const { return x.distance(*this); } static swig_type_info* descriptor() { static int init = 0; static swig_type_info* desc = 0; if (!init) { desc = SWIG_TypeQuery("swig::SwigPyIterator *"); init = 1; } return desc; } }; } SWIGINTERN int SWIG_AsVal_double (PyObject *obj, double *val) { int res = SWIG_TypeError; if (PyFloat_Check(obj)) { if (val) *val = PyFloat_AsDouble(obj); return SWIG_OK; } else if (PyInt_Check(obj)) { if (val) *val = PyInt_AsLong(obj); return SWIG_OK; } else if (PyLong_Check(obj)) { double v = PyLong_AsDouble(obj); if (!PyErr_Occurred()) { if (val) *val = v; return SWIG_OK; } else { PyErr_Clear(); } } #ifdef SWIG_PYTHON_CAST_MODE { int dispatch = 0; double d = PyFloat_AsDouble(obj); if (!PyErr_Occurred()) { if (val) *val = d; return SWIG_AddCast(SWIG_OK); } else { PyErr_Clear(); } if (!dispatch) { long v = PyLong_AsLong(obj); if (!PyErr_Occurred()) { if (val) *val = v; return SWIG_AddCast(SWIG_AddCast(SWIG_OK)); } else { PyErr_Clear(); } } } #endif return res; } #include #include SWIGINTERNINLINE int SWIG_CanCastAsInteger(double *d, double min, double max) { double x = *d; if ((min <= x && x <= max)) { double fx = floor(x); double cx = ceil(x); double rd = ((x - fx) < 0.5) ? fx : cx; /* simple rint */ if ((errno == EDOM) || (errno == ERANGE)) { errno = 0; } else { double summ, reps, diff; if (rd < x) { diff = x - rd; } else if (rd > x) { diff = rd - x; } else { return 1; } summ = rd + x; reps = diff/summ; if (reps < 8*DBL_EPSILON) { *d = rd; return 1; } } } return 0; } SWIGINTERN int SWIG_AsVal_unsigned_SS_long (PyObject *obj, unsigned long *val) { if (PyInt_Check(obj)) { long v = PyInt_AsLong(obj); if (v >= 0) { if (val) *val = v; return SWIG_OK; } else { return SWIG_OverflowError; } } else if (PyLong_Check(obj)) { unsigned long v = PyLong_AsUnsignedLong(obj); if (!PyErr_Occurred()) { if (val) *val = v; return SWIG_OK; } else { PyErr_Clear(); } } #ifdef SWIG_PYTHON_CAST_MODE { int dispatch = 0; unsigned long v = PyLong_AsUnsignedLong(obj); if (!PyErr_Occurred()) { if (val) *val = v; return SWIG_AddCast(SWIG_OK); } else { PyErr_Clear(); } if (!dispatch) { double d; int res = SWIG_AddCast(SWIG_AsVal_double (obj,&d)); if (SWIG_IsOK(res) && SWIG_CanCastAsInteger(&d, 0, ULONG_MAX)) { if (val) *val = (unsigned long)(d); return res; } } } #endif return SWIG_TypeError; } SWIGINTERNINLINE int SWIG_AsVal_size_t (PyObject * obj, size_t *val) { unsigned long v; int res = SWIG_AsVal_unsigned_SS_long (obj, val ? &v : 0); if (SWIG_IsOK(res) && val) *val = static_cast< size_t >(v); return res; } #define SWIG_From_long PyInt_FromLong SWIGINTERNINLINE PyObject * SWIG_From_ptrdiff_t (ptrdiff_t value) { return SWIG_From_long (static_cast< long >(value)); } SWIGINTERNINLINE PyObject* SWIG_From_bool (bool value) { return PyBool_FromLong(value ? 1 : 0); } SWIGINTERN int SWIG_AsVal_long (PyObject *obj, long* val) { if (PyInt_Check(obj)) { if (val) *val = PyInt_AsLong(obj); return SWIG_OK; } else if (PyLong_Check(obj)) { long v = PyLong_AsLong(obj); if (!PyErr_Occurred()) { if (val) *val = v; return SWIG_OK; } else { PyErr_Clear(); } } #ifdef SWIG_PYTHON_CAST_MODE { int dispatch = 0; long v = PyInt_AsLong(obj); if (!PyErr_Occurred()) { if (val) *val = v; return SWIG_AddCast(SWIG_OK); } else { PyErr_Clear(); } if (!dispatch) { double d; int res = SWIG_AddCast(SWIG_AsVal_double (obj,&d)); if (SWIG_IsOK(res) && SWIG_CanCastAsInteger(&d, LONG_MIN, LONG_MAX)) { if (val) *val = (long)(d); return res; } } } #endif return SWIG_TypeError; } SWIGINTERNINLINE int SWIG_AsVal_ptrdiff_t (PyObject * obj, ptrdiff_t *val) { long v; int res = SWIG_AsVal_long (obj, val ? &v : 0); if (SWIG_IsOK(res) && val) *val = static_cast< ptrdiff_t >(v); return res; } #include #include #include #include #include #ifndef SWIGPYTHON # include "config.h" # include "glthread/thread.h" #endif #include "prelude.hxx" #include "prelude-log.hxx" #include "prelude-error.hxx" #include "prelude-connection.hxx" #include "prelude-connection-pool.hxx" #include "prelude-client-profile.hxx" #include "prelude-client.hxx" #include "prelude-client-easy.hxx" #include "idmef-criteria.hxx" #include "idmef-value.hxx" #include "idmef-path.hxx" #include "idmef-time.hxx" #include "idmef.hxx" using namespace Prelude; #include #define TARGET_LANGUAGE_OUTPUT_TYPE PyObject ** int IDMEFValue_to_SWIG(const IDMEFValue &result, TARGET_LANGUAGE_OUTPUT_TYPE ret); PyObject *__prelude_log_func = NULL; static void _cb_python_log(int level, const char *str) { PyObject *arglist, *result; SWIG_PYTHON_THREAD_BEGIN_BLOCK; arglist = Py_BuildValue("(i,s)", level, str); result = PyEval_CallObject(__prelude_log_func, arglist); Py_DECREF(arglist); Py_XDECREF(result); SWIG_PYTHON_THREAD_END_BLOCK; } static int _cb_python_write(prelude_msgbuf_t *fd, prelude_msg_t *msg) { size_t ret; PyObject *io = (PyObject *) prelude_msgbuf_get_data(fd); FILE *f = PyFile_AsFile(io); ret = fwrite((const char *)prelude_msg_get_message_data(msg), 1, prelude_msg_get_len(msg), f); if ( ret != prelude_msg_get_len(msg) ) return prelude_error_from_errno(errno); prelude_msg_recycle(msg); return 0; } static ssize_t _cb_python_read(prelude_io_t *fd, void *buf, size_t size) { ssize_t ret; PyObject *io = (PyObject *) prelude_io_get_fdptr(fd); FILE *f = PyFile_AsFile(io); ret = fread(buf, 1, size, f); if ( ret < 0 ) ret = prelude_error_from_errno(errno); else if ( ret == 0 ) ret = prelude_error(PRELUDE_ERROR_EOF); return ret; } namespace swig { template struct noconst_traits { typedef Type noconst_type; }; template struct noconst_traits { typedef Type noconst_type; }; /* type categories */ struct pointer_category { }; struct value_category { }; /* General traits that provides type_name and type_info */ template struct traits { }; template inline const char* type_name() { return traits::noconst_type >::type_name(); } template struct traits_info { static swig_type_info *type_query(std::string name) { name += " *"; return SWIG_TypeQuery(name.c_str()); } static swig_type_info *type_info() { static swig_type_info *info = type_query(type_name()); return info; } }; template inline swig_type_info *type_info() { return traits_info::type_info(); } /* Partial specialization for pointers */ template struct traits { typedef pointer_category category; static std::string make_ptr_name(const char* name) { std::string ptrname = name; ptrname += " *"; return ptrname; } static const char* type_name() { static std::string name = make_ptr_name(swig::type_name()); return name.c_str(); } }; template struct traits_as { }; template struct traits_check { }; } namespace swig { /* Traits that provides the from method */ template struct traits_from_ptr { static PyObject *from(Type *val, int owner = 0) { return SWIG_NewPointerObj(val, type_info(), owner); } }; template struct traits_from { static PyObject *from(const Type& val) { return traits_from_ptr::from(new Type(val), 1); } }; template struct traits_from { static PyObject *from(Type* val) { return traits_from_ptr::from(val, 0); } }; template struct traits_from { static PyObject *from(const Type* val) { return traits_from_ptr::from(const_cast(val), 0); } }; template inline PyObject *from(const Type& val) { return traits_from::from(val); } template inline PyObject *from_ptr(Type* val, int owner) { return traits_from_ptr::from(val, owner); } /* Traits that provides the asval/as/check method */ template struct traits_asptr { static int asptr(PyObject *obj, Type **val) { Type *p; int res = SWIG_ConvertPtr(obj, (void**)&p, type_info(), 0); if (SWIG_IsOK(res)) { if (val) *val = p; } return res; } }; template inline int asptr(PyObject *obj, Type **vptr) { return traits_asptr::asptr(obj, vptr); } template struct traits_asval { static int asval(PyObject *obj, Type *val) { if (val) { Type *p = 0; int res = traits_asptr::asptr(obj, &p); if (!SWIG_IsOK(res)) return res; if (p) { typedef typename noconst_traits::noconst_type noconst_type; *(const_cast(val)) = *p; if (SWIG_IsNewObj(res)){ delete p; res = SWIG_DelNewMask(res); } return res; } else { return SWIG_ERROR; } } else { return traits_asptr::asptr(obj, (Type **)(0)); } } }; template struct traits_asval { static int asval(PyObject *obj, Type **val) { if (val) { typedef typename noconst_traits::noconst_type noconst_type; noconst_type *p = 0; int res = traits_asptr::asptr(obj, &p); if (SWIG_IsOK(res)) { *(const_cast(val)) = p; } return res; } else { return traits_asptr::asptr(obj, (Type **)(0)); } } }; template inline int asval(PyObject *obj, Type *val) { return traits_asval::asval(obj, val); } template struct traits_as { static Type as(PyObject *obj, bool throw_error) { Type v; int res = asval(obj, &v); if (!obj || !SWIG_IsOK(res)) { if (!PyErr_Occurred()) { ::SWIG_Error(SWIG_TypeError, swig::type_name()); } if (throw_error) throw std::invalid_argument("bad type"); } return v; } }; template struct traits_as { static Type as(PyObject *obj, bool throw_error) { Type *v = 0; int res = (obj ? traits_asptr::asptr(obj, &v) : SWIG_ERROR); if (SWIG_IsOK(res) && v) { if (SWIG_IsNewObj(res)) { Type r(*v); delete v; return r; } else { return *v; } } else { // Uninitialized return value, no Type() constructor required. static Type *v_def = (Type*) malloc(sizeof(Type)); if (!PyErr_Occurred()) { SWIG_Error(SWIG_TypeError, swig::type_name()); } if (throw_error) throw std::invalid_argument("bad type"); memset(v_def,0,sizeof(Type)); return *v_def; } } }; template struct traits_as { static Type* as(PyObject *obj, bool throw_error) { Type *v = 0; int res = (obj ? traits_asptr::asptr(obj, &v) : SWIG_ERROR); if (SWIG_IsOK(res)) { return v; } else { if (!PyErr_Occurred()) { SWIG_Error(SWIG_TypeError, swig::type_name()); } if (throw_error) throw std::invalid_argument("bad type"); return 0; } } }; template inline Type as(PyObject *obj, bool te = false) { return traits_as::category>::as(obj, te); } template struct traits_check { static bool check(PyObject *obj) { int res = obj ? asval(obj, (Type *)(0)) : SWIG_ERROR; return SWIG_IsOK(res) ? true : false; } }; template struct traits_check { static bool check(PyObject *obj) { int res = obj ? asptr(obj, (Type **)(0)) : SWIG_ERROR; return SWIG_IsOK(res) ? true : false; } }; template inline bool check(PyObject *obj) { return traits_check::category>::check(obj); } } #include namespace std { template <> struct less : public binary_function { bool operator()(PyObject * v, PyObject *w) const { bool res; SWIG_PYTHON_THREAD_BEGIN_BLOCK; res = PyObject_RichCompareBool(v, w, Py_LT) ? true : false; /* This may fall into a case of inconsistent eg. ObjA > ObjX > ObjB but ObjA < ObjB */ if( PyErr_Occurred() && PyErr_ExceptionMatches(PyExc_TypeError) ) { /* Objects can't be compared, this mostly occurred in Python 3.0 */ /* Compare their ptr directly for a workaround */ res = (v < w); PyErr_Clear(); } SWIG_PYTHON_THREAD_END_BLOCK; return res; } }; template <> struct less : public binary_function { bool operator()(const swig::SwigPtr_PyObject& v, const swig::SwigPtr_PyObject& w) const { return std::less()(v, w); } }; template <> struct less : public binary_function { bool operator()(const swig::SwigVar_PyObject& v, const swig::SwigVar_PyObject& w) const { return std::less()(v, w); } }; } namespace swig { template <> struct traits { typedef value_category category; static const char* type_name() { return "PyObject *"; } }; template <> struct traits_asval { typedef PyObject * value_type; static int asval(PyObject *obj, value_type *val) { if (val) *val = obj; return SWIG_OK; } }; template <> struct traits_check { static bool check(PyObject *) { return true; } }; template <> struct traits_from { typedef PyObject * value_type; static PyObject *from(const value_type& val) { Py_XINCREF(val); return val; } }; } namespace swig { inline size_t check_index(ptrdiff_t i, size_t size, bool insert = false) { if ( i < 0 ) { if ((size_t) (-i) <= size) return (size_t) (i + size); } else if ( (size_t) i < size ) { return (size_t) i; } else if (insert && ((size_t) i == size)) { return size; } throw std::out_of_range("index out of range"); } inline size_t slice_index(ptrdiff_t i, size_t size) { if ( i < 0 ) { if ((size_t) (-i) <= size) { return (size_t) (i + size); } else { throw std::out_of_range("index out of range"); } } else { return ( (size_t) i < size ) ? ((size_t) i) : size; } } template inline typename Sequence::iterator getpos(Sequence* self, Difference i) { typename Sequence::iterator pos = self->begin(); std::advance(pos, check_index(i,self->size())); return pos; } template inline typename Sequence::const_iterator cgetpos(const Sequence* self, Difference i) { typename Sequence::const_iterator pos = self->begin(); std::advance(pos, check_index(i,self->size())); return pos; } template inline Sequence* getslice(const Sequence* self, Difference i, Difference j) { typename Sequence::size_type size = self->size(); typename Sequence::size_type ii = swig::check_index(i, size); typename Sequence::size_type jj = swig::slice_index(j, size); if (jj > ii) { typename Sequence::const_iterator vb = self->begin(); typename Sequence::const_iterator ve = self->begin(); std::advance(vb,ii); std::advance(ve,jj); return new Sequence(vb, ve); } else { return new Sequence(); } } template inline void setslice(Sequence* self, Difference i, Difference j, const InputSeq& v) { typename Sequence::size_type size = self->size(); typename Sequence::size_type ii = swig::check_index(i, size, true); typename Sequence::size_type jj = swig::slice_index(j, size); if (jj < ii) jj = ii; size_t ssize = jj - ii; if (ssize <= v.size()) { typename Sequence::iterator sb = self->begin(); typename InputSeq::const_iterator vmid = v.begin(); std::advance(sb,ii); std::advance(vmid, jj - ii); self->insert(std::copy(v.begin(), vmid, sb), vmid, v.end()); } else { typename Sequence::iterator sb = self->begin(); typename Sequence::iterator se = self->begin(); std::advance(sb,ii); std::advance(se,jj); self->erase(sb,se); self->insert(sb, v.begin(), v.end()); } } template inline void delslice(Sequence* self, Difference i, Difference j) { typename Sequence::size_type size = self->size(); typename Sequence::size_type ii = swig::check_index(i, size, true); typename Sequence::size_type jj = swig::slice_index(j, size); if (jj > ii) { typename Sequence::iterator sb = self->begin(); typename Sequence::iterator se = self->begin(); std::advance(sb,ii); std::advance(se,jj); self->erase(sb,se); } } } #if defined(__SUNPRO_CC) && defined(_RWSTD_VER) # if !defined(SWIG_NO_STD_NOITERATOR_TRAITS_STL) # define SWIG_STD_NOITERATOR_TRAITS_STL # endif #endif #if !defined(SWIG_STD_NOITERATOR_TRAITS_STL) #include #else namespace std { template struct iterator_traits { typedef ptrdiff_t difference_type; typedef typename Iterator::value_type value_type; }; template struct iterator_traits<__reverse_bi_iterator > { typedef Distance difference_type; typedef T value_type; }; template struct iterator_traits { typedef T value_type; typedef ptrdiff_t difference_type; }; template inline typename iterator_traits<_InputIterator>::difference_type distance(_InputIterator __first, _InputIterator __last) { typename iterator_traits<_InputIterator>::difference_type __n = 0; while (__first != __last) { ++__first; ++__n; } return __n; } } #endif namespace swig { template class SwigPyIterator_T : public SwigPyIterator { public: typedef OutIterator out_iterator; typedef typename std::iterator_traits::value_type value_type; typedef SwigPyIterator_T self_type; SwigPyIterator_T(out_iterator curr, PyObject *seq) : SwigPyIterator(seq), current(curr) { } const out_iterator& get_current() const { return current; } bool equal (const SwigPyIterator &iter) const { const self_type *iters = dynamic_cast(&iter); if (iters) { return (current == iters->get_current()); } else { throw std::invalid_argument("bad iterator type"); } } ptrdiff_t distance(const SwigPyIterator &iter) const { const self_type *iters = dynamic_cast(&iter); if (iters) { return std::distance(current, iters->get_current()); } else { throw std::invalid_argument("bad iterator type"); } } protected: out_iterator current; }; template struct from_oper { typedef const ValueType& argument_type; typedef PyObject *result_type; result_type operator()(argument_type v) const { return swig::from(v); } }; template::value_type, typename FromOper = from_oper > class SwigPyIteratorOpen_T : public SwigPyIterator_T { public: FromOper from; typedef OutIterator out_iterator; typedef ValueType value_type; typedef SwigPyIterator_T base; typedef SwigPyIteratorOpen_T self_type; SwigPyIteratorOpen_T(out_iterator curr, PyObject *seq) : SwigPyIterator_T(curr, seq) { } PyObject *value() const { return from(static_cast(*(base::current))); } SwigPyIterator *copy() const { return new self_type(*this); } SwigPyIterator *incr(size_t n = 1) { while (n--) { ++base::current; } return this; } SwigPyIterator *decr(size_t n = 1) { while (n--) { --base::current; } return this; } }; template::value_type, typename FromOper = from_oper > class SwigPyIteratorClosed_T : public SwigPyIterator_T { public: FromOper from; typedef OutIterator out_iterator; typedef ValueType value_type; typedef SwigPyIterator_T base; typedef SwigPyIteratorClosed_T self_type; SwigPyIteratorClosed_T(out_iterator curr, out_iterator first, out_iterator last, PyObject *seq) : SwigPyIterator_T(curr, seq), begin(first), end(last) { } PyObject *value() const { if (base::current == end) { throw stop_iteration(); } else { return from(static_cast(*(base::current))); } } SwigPyIterator *copy() const { return new self_type(*this); } SwigPyIterator *incr(size_t n = 1) { while (n--) { if (base::current == end) { throw stop_iteration(); } else { ++base::current; } } return this; } SwigPyIterator *decr(size_t n = 1) { while (n--) { if (base::current == begin) { throw stop_iteration(); } else { --base::current; } } return this; } private: out_iterator begin; out_iterator end; }; template inline SwigPyIterator* make_output_iterator(const OutIter& current, const OutIter& begin,const OutIter& end, PyObject *seq = 0) { return new SwigPyIteratorClosed_T(current, begin, end, seq); } template inline SwigPyIterator* make_output_iterator(const OutIter& current, PyObject *seq = 0) { return new SwigPyIteratorOpen_T(current, seq); } } namespace swig { template struct SwigPySequence_Ref { SwigPySequence_Ref(PyObject* seq, int index) : _seq(seq), _index(index) { } operator T () const { swig::SwigVar_PyObject item = PySequence_GetItem(_seq, _index); try { return swig::as(item, true); } catch (std::exception& e) { char msg[1024]; sprintf(msg, "in sequence element %d ", _index); if (!PyErr_Occurred()) { ::SWIG_Error(SWIG_TypeError, swig::type_name()); } SWIG_Python_AddErrorMsg(msg); SWIG_Python_AddErrorMsg(e.what()); throw; } } SwigPySequence_Ref& operator=(const T& v) { PySequence_SetItem(_seq, _index, swig::from(v)); return *this; } private: PyObject* _seq; int _index; }; template struct SwigPySequence_ArrowProxy { SwigPySequence_ArrowProxy(const T& x): m_value(x) {} const T* operator->() const { return &m_value; } operator const T*() const { return &m_value; } T m_value; }; template struct SwigPySequence_InputIterator { typedef SwigPySequence_InputIterator self; typedef std::random_access_iterator_tag iterator_category; typedef Reference reference; typedef T value_type; typedef T* pointer; typedef int difference_type; SwigPySequence_InputIterator() { } SwigPySequence_InputIterator(PyObject* seq, int index) : _seq(seq), _index(index) { } reference operator*() const { return reference(_seq, _index); } SwigPySequence_ArrowProxy operator->() const { return SwigPySequence_ArrowProxy(operator*()); } bool operator==(const self& ri) const { return (_index == ri._index) && (_seq == ri._seq); } bool operator!=(const self& ri) const { return !(operator==(ri)); } self& operator ++ () { ++_index; return *this; } self& operator -- () { --_index; return *this; } self& operator += (difference_type n) { _index += n; return *this; } self operator +(difference_type n) const { return self(_seq, _index + n); } self& operator -= (difference_type n) { _index -= n; return *this; } self operator -(difference_type n) const { return self(_seq, _index - n); } difference_type operator - (const self& ri) const { return _index - ri._index; } bool operator < (const self& ri) const { return _index < ri._index; } reference operator[](difference_type n) const { return reference(_seq, _index + n); } private: PyObject* _seq; difference_type _index; }; template struct SwigPySequence_Cont { typedef SwigPySequence_Ref reference; typedef const SwigPySequence_Ref const_reference; typedef T value_type; typedef T* pointer; typedef int difference_type; typedef int size_type; typedef const pointer const_pointer; typedef SwigPySequence_InputIterator iterator; typedef SwigPySequence_InputIterator const_iterator; SwigPySequence_Cont(PyObject* seq) : _seq(0) { if (!PySequence_Check(seq)) { throw std::invalid_argument("a sequence is expected"); } _seq = seq; Py_INCREF(_seq); } ~SwigPySequence_Cont() { Py_XDECREF(_seq); } size_type size() const { return static_cast(PySequence_Size(_seq)); } bool empty() const { return size() == 0; } iterator begin() { return iterator(_seq, 0); } const_iterator begin() const { return const_iterator(_seq, 0); } iterator end() { return iterator(_seq, size()); } const_iterator end() const { return const_iterator(_seq, size()); } reference operator[](difference_type n) { return reference(_seq, n); } const_reference operator[](difference_type n) const { return const_reference(_seq, n); } bool check(bool set_err = true) const { int s = size(); for (int i = 0; i < s; ++i) { swig::SwigVar_PyObject item = PySequence_GetItem(_seq, i); if (!swig::check(item)) { if (set_err) { char msg[1024]; sprintf(msg, "in sequence element %d", i); SWIG_Error(SWIG_RuntimeError, msg); } return false; } } return true; } private: PyObject* _seq; }; } SWIGINTERN swig_type_info* SWIG_pchar_descriptor(void) { static int init = 0; static swig_type_info* info = 0; if (!init) { info = SWIG_TypeQuery("_p_char"); init = 1; } return info; } SWIGINTERN int SWIG_AsCharPtrAndSize(PyObject *obj, char** cptr, size_t* psize, int *alloc) { #if PY_VERSION_HEX>=0x03000000 if (PyUnicode_Check(obj)) #else if (PyString_Check(obj)) #endif { char *cstr; Py_ssize_t len; #if PY_VERSION_HEX>=0x03000000 if (!alloc && cptr) { /* We can't allow converting without allocation, since the internal representation of string in Python 3 is UCS-2/UCS-4 but we require a UTF-8 representation. TODO(bhy) More detailed explanation */ return SWIG_RuntimeError; } obj = PyUnicode_AsUTF8String(obj); PyBytes_AsStringAndSize(obj, &cstr, &len); if(alloc) *alloc = SWIG_NEWOBJ; #else PyString_AsStringAndSize(obj, &cstr, &len); #endif if (cptr) { if (alloc) { /* In python the user should not be able to modify the inner string representation. To warranty that, if you define SWIG_PYTHON_SAFE_CSTRINGS, a new/copy of the python string buffer is always returned. The default behavior is just to return the pointer value, so, be careful. */ #if defined(SWIG_PYTHON_SAFE_CSTRINGS) if (*alloc != SWIG_OLDOBJ) #else if (*alloc == SWIG_NEWOBJ) #endif { *cptr = reinterpret_cast< char* >(memcpy((new char[len + 1]), cstr, sizeof(char)*(len + 1))); *alloc = SWIG_NEWOBJ; } else { *cptr = cstr; *alloc = SWIG_OLDOBJ; } } else { #if PY_VERSION_HEX>=0x03000000 assert(0); /* Should never reach here in Python 3 */ #endif *cptr = SWIG_Python_str_AsChar(obj); } } if (psize) *psize = len + 1; #if PY_VERSION_HEX>=0x03000000 Py_XDECREF(obj); #endif return SWIG_OK; } else { swig_type_info* pchar_descriptor = SWIG_pchar_descriptor(); if (pchar_descriptor) { void* vptr = 0; if (SWIG_ConvertPtr(obj, &vptr, pchar_descriptor, 0) == SWIG_OK) { if (cptr) *cptr = (char *) vptr; if (psize) *psize = vptr ? (strlen((char *)vptr) + 1) : 0; if (alloc) *alloc = SWIG_OLDOBJ; return SWIG_OK; } } } return SWIG_TypeError; } SWIGINTERNINLINE PyObject * SWIG_FromCharPtrAndSize(const char* carray, size_t size) { if (carray) { if (size > INT_MAX) { swig_type_info* pchar_descriptor = SWIG_pchar_descriptor(); return pchar_descriptor ? SWIG_NewPointerObj(const_cast< char * >(carray), pchar_descriptor, 0) : SWIG_Py_Void(); } else { #if PY_VERSION_HEX >= 0x03000000 return PyUnicode_FromStringAndSize(carray, static_cast< int >(size)); #else return PyString_FromStringAndSize(carray, static_cast< int >(size)); #endif } } else { return SWIG_Py_Void(); } } SWIGINTERNINLINE PyObject * SWIG_FromCharPtr(const char *cptr) { return SWIG_FromCharPtrAndSize(cptr, (cptr ? strlen(cptr) : 0)); } SWIGINTERNINLINE PyObject * SWIG_From_int (int value) { return SWIG_From_long (value); } #include #if !defined(SWIG_NO_LLONG_MAX) # if !defined(LLONG_MAX) && defined(__GNUC__) && defined (__LONG_LONG_MAX__) # define LLONG_MAX __LONG_LONG_MAX__ # define LLONG_MIN (-LLONG_MAX - 1LL) # define ULLONG_MAX (LLONG_MAX * 2ULL + 1ULL) # endif #endif SWIGINTERN int SWIG_AsVal_int (PyObject * obj, int *val) { long v; int res = SWIG_AsVal_long (obj, &v); if (SWIG_IsOK(res)) { if ((v < INT_MIN || v > INT_MAX)) { return SWIG_OverflowError; } else { if (val) *val = static_cast< int >(v); } } return res; } SWIGINTERN int SWIG_AsPtr_std_string (PyObject * obj, std::string **val) { char* buf = 0 ; size_t size = 0; int alloc = SWIG_OLDOBJ; if (SWIG_IsOK((SWIG_AsCharPtrAndSize(obj, &buf, &size, &alloc)))) { if (buf) { if (val) *val = new std::string(buf, size - 1); if (alloc == SWIG_NEWOBJ) delete[] buf; return SWIG_NEWOBJ; } else { if (val) *val = 0; return SWIG_OLDOBJ; } } else { static int init = 0; static swig_type_info* descriptor = 0; if (!init) { descriptor = SWIG_TypeQuery("std::string" " *"); init = 1; } if (descriptor) { std::string *vptr; int res = SWIG_ConvertPtr(obj, (void**)&vptr, descriptor, 0); if (SWIG_IsOK(res) && val) *val = vptr; return res; } } return SWIG_ERROR; } SWIGINTERNINLINE PyObject * SWIG_From_std_string (const std::string& s) { if (s.size()) { return SWIG_FromCharPtrAndSize(s.data(), s.size()); } else { return SWIG_FromCharPtrAndSize(s.c_str(), 0); } } SWIGINTERN int SWIG_AsVal_bool (PyObject *obj, bool *val) { int r = PyObject_IsTrue(obj); if (r == -1) return SWIG_ERROR; if (val) *val = r ? true : false; return SWIG_OK; } SWIGINTERN int SWIG_AsVal_unsigned_SS_long_SS_long (PyObject *obj, unsigned long long *val) { int res = SWIG_TypeError; if (PyLong_Check(obj)) { unsigned long long v = PyLong_AsUnsignedLongLong(obj); if (!PyErr_Occurred()) { if (val) *val = v; return SWIG_OK; } else { PyErr_Clear(); } } else { unsigned long v; res = SWIG_AsVal_unsigned_SS_long (obj,&v); if (SWIG_IsOK(res)) { if (val) *val = v; return res; } } #ifdef SWIG_PYTHON_CAST_MODE { const double mant_max = 1LL << DBL_MANT_DIG; double d; res = SWIG_AsVal_double (obj,&d); if (SWIG_IsOK(res) && SWIG_CanCastAsInteger(&d, 0, mant_max)) { if (val) *val = (unsigned long long)(d); return SWIG_AddCast(res); } res = SWIG_TypeError; } #endif return res; } SWIGINTERNINLINE PyObject* SWIG_From_long_SS_long (long long value) { return ((value < LONG_MIN) || (value > LONG_MAX)) ? PyLong_FromLongLong(value) : PyInt_FromLong(static_cast< long >(value)); } SWIGINTERNINLINE PyObject* SWIG_From_unsigned_SS_long_SS_long (unsigned long long value) { return (value > LONG_MAX) ? PyLong_FromUnsignedLongLong(value) : PyInt_FromLong(static_cast< long >(value)); } SWIGINTERNINLINE PyObject* SWIG_From_unsigned_SS_long (unsigned long value) { return (value > LONG_MAX) ? PyLong_FromUnsignedLong(value) : PyInt_FromLong(static_cast< long >(value)); } SWIGINTERNINLINE PyObject * SWIG_From_unsigned_SS_int (unsigned int value) { return SWIG_From_unsigned_SS_long (value); } namespace swig { template <> struct traits { typedef pointer_category category; static const char* type_name() { return"Prelude::Connection"; } }; } namespace swig { template inline void assign(const SwigPySeq& swigpyseq, Seq* seq) { // seq->assign(swigpyseq.begin(), swigpyseq.end()); // not used as not always implemented typedef typename SwigPySeq::value_type value_type; typename SwigPySeq::const_iterator it = swigpyseq.begin(); for (;it != swigpyseq.end(); ++it) { seq->insert(seq->end(),(value_type)(*it)); } } template struct traits_asptr_stdseq { typedef Seq sequence; typedef T value_type; static int asptr(PyObject *obj, sequence **seq) { if (obj == Py_None || SWIG_Python_GetSwigThis(obj)) { sequence *p; if (::SWIG_ConvertPtr(obj,(void**)&p, swig::type_info(),0) == SWIG_OK) { if (seq) *seq = p; return SWIG_OLDOBJ; } } else if (PySequence_Check(obj)) { try { SwigPySequence_Cont swigpyseq(obj); if (seq) { sequence *pseq = new sequence(); assign(swigpyseq, pseq); *seq = pseq; return SWIG_NEWOBJ; } else { return swigpyseq.check() ? SWIG_OK : SWIG_ERROR; } } catch (std::exception& e) { if (seq) { if (!PyErr_Occurred()) { PyErr_SetString(PyExc_TypeError, e.what()); } } return SWIG_ERROR; } } return SWIG_ERROR; } }; template struct traits_from_stdseq { typedef Seq sequence; typedef T value_type; typedef typename Seq::size_type size_type; typedef typename sequence::const_iterator const_iterator; static PyObject *from(const sequence& seq) { #ifdef SWIG_PYTHON_EXTRA_NATIVE_CONTAINERS swig_type_info *desc = swig::type_info(); if (desc && desc->clientdata) { return SWIG_NewPointerObj(new sequence(seq), desc, SWIG_POINTER_OWN); } #endif size_type size = seq.size(); if (size <= (size_type)INT_MAX) { PyObject *obj = PyTuple_New((int)size); int i = 0; for (const_iterator it = seq.begin(); it != seq.end(); ++it, ++i) { PyTuple_SetItem(obj,i,swig::from(*it)); } return obj; } else { PyErr_SetString(PyExc_OverflowError,"sequence size not valid in python"); return NULL; } } }; } namespace swig { template struct traits_asptr > { static int asptr(PyObject *obj, std::vector **vec) { return traits_asptr_stdseq >::asptr(obj, vec); } }; template struct traits_from > { static PyObject *from(const std::vector& vec) { return traits_from_stdseq >::from(vec); } }; } namespace swig { template <> struct traits > > { typedef pointer_category category; static const char* type_name() { return "std::vector<" "Prelude::Connection" "," "std::allocator< Prelude::Connection >" " >"; } }; } namespace swig { template <> struct traits { typedef pointer_category category; static const char* type_name() { return"Prelude::IDMEFValue"; } }; } namespace swig { template <> struct traits > > { typedef pointer_category category; static const char* type_name() { return "std::vector<" "Prelude::IDMEFValue" "," "std::allocator< Prelude::IDMEFValue >" " >"; } }; } SWIGINTERN int SWIG_AsCharArray(PyObject * obj, char *val, size_t size) { char* cptr = 0; size_t csize = 0; int alloc = SWIG_OLDOBJ; int res = SWIG_AsCharPtrAndSize(obj, &cptr, &csize, &alloc); if (SWIG_IsOK(res)) { if ((csize == size + 1) && cptr && !(cptr[csize-1])) --csize; if (csize <= size) { if (val) { if (csize) memcpy(val, cptr, csize*sizeof(char)); if (csize < size) memset(val + csize, 0, (size - csize)*sizeof(char)); } if (alloc == SWIG_NEWOBJ) { delete[] cptr; res = SWIG_DelNewMask(res); } return res; } if (alloc == SWIG_NEWOBJ) delete[] cptr; } return SWIG_TypeError; } SWIGINTERN int SWIG_AsVal_char (PyObject * obj, char *val) { int res = SWIG_AsCharArray(obj, val, 1); if (!SWIG_IsOK(res)) { long v; res = SWIG_AddCast(SWIG_AsVal_long (obj, &v)); if (SWIG_IsOK(res)) { if ((CHAR_MIN <= v) && (v <= CHAR_MAX)) { if (val) *val = static_cast< char >(v); } else { res = SWIG_OverflowError; } } } return res; } SWIGINTERN int SWIG_AsVal_unsigned_SS_char (PyObject * obj, unsigned char *val) { unsigned long v; int res = SWIG_AsVal_unsigned_SS_long (obj, &v); if (SWIG_IsOK(res)) { if ((v > UCHAR_MAX)) { return SWIG_OverflowError; } else { if (val) *val = static_cast< unsigned char >(v); } } return res; } SWIGINTERN int SWIG_AsVal_short (PyObject * obj, short *val) { long v; int res = SWIG_AsVal_long (obj, &v); if (SWIG_IsOK(res)) { if ((v < SHRT_MIN || v > SHRT_MAX)) { return SWIG_OverflowError; } else { if (val) *val = static_cast< short >(v); } } return res; } SWIGINTERN int SWIG_AsVal_unsigned_SS_short (PyObject * obj, unsigned short *val) { unsigned long v; int res = SWIG_AsVal_unsigned_SS_long (obj, &v); if (SWIG_IsOK(res)) { if ((v > USHRT_MAX)) { return SWIG_OverflowError; } else { if (val) *val = static_cast< unsigned short >(v); } } return res; } SWIGINTERN int SWIG_AsVal_unsigned_SS_int (PyObject * obj, unsigned int *val) { unsigned long v; int res = SWIG_AsVal_unsigned_SS_long (obj, &v); if (SWIG_IsOK(res)) { if ((v > UINT_MAX)) { return SWIG_OverflowError; } else { if (val) *val = static_cast< unsigned int >(v); } } return res; } SWIGINTERN int SWIG_AsVal_long_SS_long (PyObject *obj, long long *val) { int res = SWIG_TypeError; if (PyLong_Check(obj)) { long long v = PyLong_AsLongLong(obj); if (!PyErr_Occurred()) { if (val) *val = v; return SWIG_OK; } else { PyErr_Clear(); } } else { long v; res = SWIG_AsVal_long (obj,&v); if (SWIG_IsOK(res)) { if (val) *val = v; return res; } } #ifdef SWIG_PYTHON_CAST_MODE { const double mant_max = 1LL << DBL_MANT_DIG; const double mant_min = -mant_max; double d; res = SWIG_AsVal_double (obj,&d); if (SWIG_IsOK(res) && SWIG_CanCastAsInteger(&d, mant_min, mant_max)) { if (val) *val = (long long)(d); return SWIG_AddCast(res); } res = SWIG_TypeError; } #endif return res; } SWIGINTERN int SWIG_AsVal_float (PyObject * obj, float *val) { double v; int res = SWIG_AsVal_double (obj, &v); if (SWIG_IsOK(res)) { if ((v < -FLT_MAX || v > FLT_MAX)) { return SWIG_OverflowError; } else { if (val) *val = static_cast< float >(v); } } return res; } PyObject *IDMEFValueList_to_SWIG(const Prelude::IDMEFValue &value) { int j = 0, ret; PyObject *pytuple; std::vector result = value; std::vector::const_iterator i; pytuple = PyTuple_New(result.size()); for ( i = result.begin(); i != result.end(); i++ ) { PyObject *val; ret = IDMEFValue_to_SWIG(*i, &val); if ( ret < 0 ) return NULL; PyTuple_SetItem(pytuple, j++, val); } return pytuple; } #define SWIG_From_double PyFloat_FromDouble SWIGINTERNINLINE PyObject * SWIG_From_float (float value) { return SWIG_From_double (value); } int IDMEFValue_to_SWIG(const IDMEFValue &result, TARGET_LANGUAGE_OUTPUT_TYPE ret) { std::stringstream s; idmef_value_t *value = result; idmef_value_type_id_t type = result.GetType(); if ( type == IDMEF_VALUE_TYPE_STRING ) { prelude_string_t *str = idmef_value_get_string(value); *ret = SWIG_FromCharPtrAndSize(prelude_string_get_string(str), prelude_string_get_len(str)); } else if ( type == IDMEF_VALUE_TYPE_INT8 ) *ret = SWIG_From_int(idmef_value_get_int8(value)); else if ( type == IDMEF_VALUE_TYPE_UINT8 ) *ret = SWIG_From_unsigned_SS_int(idmef_value_get_uint8(value)); else if ( type == IDMEF_VALUE_TYPE_INT16 ) *ret = SWIG_From_int(idmef_value_get_int16(value)); else if ( type == IDMEF_VALUE_TYPE_UINT16 ) *ret = SWIG_From_unsigned_SS_int(idmef_value_get_uint16(value)); else if ( type == IDMEF_VALUE_TYPE_INT32 ) *ret = SWIG_From_int(idmef_value_get_int32(value)); else if ( type == IDMEF_VALUE_TYPE_UINT32 ) *ret = SWIG_From_unsigned_SS_int(idmef_value_get_uint32(value)); else if ( type == IDMEF_VALUE_TYPE_INT64 ) *ret = SWIG_From_long_SS_long(idmef_value_get_int64(value)); else if ( type == IDMEF_VALUE_TYPE_UINT64 ) *ret = SWIG_From_unsigned_SS_long_SS_long(idmef_value_get_uint64(value)); else if ( type == IDMEF_VALUE_TYPE_FLOAT ) *ret = SWIG_From_float(idmef_value_get_float(value)); else if ( type == IDMEF_VALUE_TYPE_DOUBLE ) *ret = SWIG_From_double(idmef_value_get_double(value)); else if ( type == IDMEF_VALUE_TYPE_ENUM ) { const char *s = idmef_class_enum_to_string(idmef_value_get_class(value), idmef_value_get_enum(value)); *ret = SWIG_FromCharPtr(s); } else if ( type == IDMEF_VALUE_TYPE_TIME ) { IDMEFTime time = result; *ret = SWIG_NewPointerObj(new IDMEFTime(time), SWIGTYPE_p_Prelude__IDMEFTime, 1); } else if ( type == IDMEF_VALUE_TYPE_LIST ) *ret = IDMEFValueList_to_SWIG(result); else if ( type == IDMEF_VALUE_TYPE_DATA ) { idmef_data_t *d = idmef_value_get_data(value); idmef_data_type_t t = idmef_data_get_type(d); if ( t == IDMEF_DATA_TYPE_CHAR || t == IDMEF_DATA_TYPE_BYTE || t == IDMEF_DATA_TYPE_BYTE_STRING ) *ret = SWIG_FromCharPtrAndSize((const char *)idmef_data_get_data(d), idmef_data_get_len(d)); else if ( t == IDMEF_DATA_TYPE_CHAR_STRING ) *ret = SWIG_FromCharPtrAndSize((const char *)idmef_data_get_data(d), idmef_data_get_len(d) - 1); else if ( t == IDMEF_DATA_TYPE_FLOAT ) *ret = SWIG_From_float(idmef_data_get_float(d)); else if ( t == IDMEF_DATA_TYPE_UINT32 ) *ret = SWIG_From_unsigned_SS_int(idmef_data_get_uint32(d)); else if ( t == IDMEF_DATA_TYPE_UINT64 ) *ret = SWIG_From_unsigned_SS_long_SS_long(idmef_data_get_uint64(d)); } else if ( type == IDMEF_VALUE_TYPE_CLASS ) *ret = SWIG_NewPointerObj(new IDMEFValue(idmef_value_ref(value)), SWIGTYPE_p_Prelude__IDMEFValue, 1); else return -1; return 0; } SWIGINTERN void Prelude_IDMEF_Write(Prelude::IDMEF *self,void *nocast_file_p){ self->_genericWrite(_cb_python_write, nocast_file_p); } SWIGINTERN void Prelude_IDMEF_Read(Prelude::IDMEF *self,void *nocast_file_p){ self->_genericRead(_cb_python_read, nocast_file_p); } SWIGINTERN Prelude::IDMEF &Prelude_IDMEF_operator_Sg__Sg_(Prelude::IDMEF *self,void *nocast_file_p){ self->_genericWrite(_cb_python_write, nocast_file_p); return *self; } SWIGINTERN Prelude::IDMEF &Prelude_IDMEF_operator_Sl__Sl_(Prelude::IDMEF *self,void *nocast_file_p){ self->_genericRead(_cb_python_read, nocast_file_p); return *self; } #ifdef __cplusplus extern "C" { #endif SWIGINTERN PyObject *_wrap_delete_SwigPyIterator(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; swig::SwigPyIterator *arg1 = (swig::SwigPyIterator *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:delete_SwigPyIterator",&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_swig__SwigPyIterator, SWIG_POINTER_DISOWN | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_SwigPyIterator" "', argument " "1"" of type '" "swig::SwigPyIterator *""'"); } arg1 = reinterpret_cast< swig::SwigPyIterator * >(argp1); delete arg1; resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_SwigPyIterator_value(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; swig::SwigPyIterator *arg1 = (swig::SwigPyIterator *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; PyObject *result = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:SwigPyIterator_value",&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_swig__SwigPyIterator, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SwigPyIterator_value" "', argument " "1"" of type '" "swig::SwigPyIterator const *""'"); } arg1 = reinterpret_cast< swig::SwigPyIterator * >(argp1); try { result = (PyObject *)((swig::SwigPyIterator const *)arg1)->value(); } catch(swig::stop_iteration &_e) { { (void)_e; SWIG_SetErrorObj(PyExc_StopIteration, SWIG_Py_Void()); SWIG_fail; } } resultobj = result; return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_SwigPyIterator_incr__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; swig::SwigPyIterator *arg1 = (swig::SwigPyIterator *) 0 ; size_t arg2 ; void *argp1 = 0 ; int res1 = 0 ; size_t val2 ; int ecode2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; swig::SwigPyIterator *result = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:SwigPyIterator_incr",&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_swig__SwigPyIterator, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SwigPyIterator_incr" "', argument " "1"" of type '" "swig::SwigPyIterator *""'"); } arg1 = reinterpret_cast< swig::SwigPyIterator * >(argp1); ecode2 = SWIG_AsVal_size_t(obj1, &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "SwigPyIterator_incr" "', argument " "2"" of type '" "size_t""'"); } arg2 = static_cast< size_t >(val2); try { result = (swig::SwigPyIterator *)(arg1)->incr(arg2); } catch(swig::stop_iteration &_e) { { (void)_e; SWIG_SetErrorObj(PyExc_StopIteration, SWIG_Py_Void()); SWIG_fail; } } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_swig__SwigPyIterator, 0 | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_SwigPyIterator_incr__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; swig::SwigPyIterator *arg1 = (swig::SwigPyIterator *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; swig::SwigPyIterator *result = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:SwigPyIterator_incr",&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_swig__SwigPyIterator, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SwigPyIterator_incr" "', argument " "1"" of type '" "swig::SwigPyIterator *""'"); } arg1 = reinterpret_cast< swig::SwigPyIterator * >(argp1); try { result = (swig::SwigPyIterator *)(arg1)->incr(); } catch(swig::stop_iteration &_e) { { (void)_e; SWIG_SetErrorObj(PyExc_StopIteration, SWIG_Py_Void()); SWIG_fail; } } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_swig__SwigPyIterator, 0 | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_SwigPyIterator_incr(PyObject *self, PyObject *args) { int argc; PyObject *argv[3]; int ii; if (!PyTuple_Check(args)) SWIG_fail; argc = (int)PyObject_Length(args); for (ii = 0; (ii < argc) && (ii < 2); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } if (argc == 1) { int _v; void *vptr = 0; int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_swig__SwigPyIterator, 0); _v = SWIG_CheckState(res); if (_v) { return _wrap_SwigPyIterator_incr__SWIG_1(self, args); } } if (argc == 2) { int _v; void *vptr = 0; int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_swig__SwigPyIterator, 0); _v = SWIG_CheckState(res); if (_v) { { int res = SWIG_AsVal_size_t(argv[1], NULL); _v = SWIG_CheckState(res); } if (_v) { return _wrap_SwigPyIterator_incr__SWIG_0(self, args); } } } fail: SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'SwigPyIterator_incr'.\n" " Possible C/C++ prototypes are:\n" " incr(swig::SwigPyIterator *,size_t)\n" " incr(swig::SwigPyIterator *)\n"); return NULL; } SWIGINTERN PyObject *_wrap_SwigPyIterator_decr__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; swig::SwigPyIterator *arg1 = (swig::SwigPyIterator *) 0 ; size_t arg2 ; void *argp1 = 0 ; int res1 = 0 ; size_t val2 ; int ecode2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; swig::SwigPyIterator *result = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:SwigPyIterator_decr",&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_swig__SwigPyIterator, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SwigPyIterator_decr" "', argument " "1"" of type '" "swig::SwigPyIterator *""'"); } arg1 = reinterpret_cast< swig::SwigPyIterator * >(argp1); ecode2 = SWIG_AsVal_size_t(obj1, &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "SwigPyIterator_decr" "', argument " "2"" of type '" "size_t""'"); } arg2 = static_cast< size_t >(val2); try { result = (swig::SwigPyIterator *)(arg1)->decr(arg2); } catch(swig::stop_iteration &_e) { { (void)_e; SWIG_SetErrorObj(PyExc_StopIteration, SWIG_Py_Void()); SWIG_fail; } } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_swig__SwigPyIterator, 0 | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_SwigPyIterator_decr__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; swig::SwigPyIterator *arg1 = (swig::SwigPyIterator *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; swig::SwigPyIterator *result = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:SwigPyIterator_decr",&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_swig__SwigPyIterator, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SwigPyIterator_decr" "', argument " "1"" of type '" "swig::SwigPyIterator *""'"); } arg1 = reinterpret_cast< swig::SwigPyIterator * >(argp1); try { result = (swig::SwigPyIterator *)(arg1)->decr(); } catch(swig::stop_iteration &_e) { { (void)_e; SWIG_SetErrorObj(PyExc_StopIteration, SWIG_Py_Void()); SWIG_fail; } } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_swig__SwigPyIterator, 0 | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_SwigPyIterator_decr(PyObject *self, PyObject *args) { int argc; PyObject *argv[3]; int ii; if (!PyTuple_Check(args)) SWIG_fail; argc = (int)PyObject_Length(args); for (ii = 0; (ii < argc) && (ii < 2); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } if (argc == 1) { int _v; void *vptr = 0; int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_swig__SwigPyIterator, 0); _v = SWIG_CheckState(res); if (_v) { return _wrap_SwigPyIterator_decr__SWIG_1(self, args); } } if (argc == 2) { int _v; void *vptr = 0; int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_swig__SwigPyIterator, 0); _v = SWIG_CheckState(res); if (_v) { { int res = SWIG_AsVal_size_t(argv[1], NULL); _v = SWIG_CheckState(res); } if (_v) { return _wrap_SwigPyIterator_decr__SWIG_0(self, args); } } } fail: SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'SwigPyIterator_decr'.\n" " Possible C/C++ prototypes are:\n" " decr(swig::SwigPyIterator *,size_t)\n" " decr(swig::SwigPyIterator *)\n"); return NULL; } SWIGINTERN PyObject *_wrap_SwigPyIterator_distance(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; swig::SwigPyIterator *arg1 = (swig::SwigPyIterator *) 0 ; swig::SwigPyIterator *arg2 = 0 ; void *argp1 = 0 ; int res1 = 0 ; void *argp2 = 0 ; int res2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; ptrdiff_t result; if (!PyArg_ParseTuple(args,(char *)"OO:SwigPyIterator_distance",&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_swig__SwigPyIterator, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SwigPyIterator_distance" "', argument " "1"" of type '" "swig::SwigPyIterator const *""'"); } arg1 = reinterpret_cast< swig::SwigPyIterator * >(argp1); res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_swig__SwigPyIterator, 0 | 0); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "SwigPyIterator_distance" "', argument " "2"" of type '" "swig::SwigPyIterator const &""'"); } if (!argp2) { SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "SwigPyIterator_distance" "', argument " "2"" of type '" "swig::SwigPyIterator const &""'"); } arg2 = reinterpret_cast< swig::SwigPyIterator * >(argp2); try { result = ((swig::SwigPyIterator const *)arg1)->distance((swig::SwigPyIterator const &)*arg2); } catch(std::invalid_argument &_e) { SWIG_Python_Raise(SWIG_NewPointerObj((new std::invalid_argument(static_cast< const std::invalid_argument& >(_e))),SWIGTYPE_p_std__invalid_argument,SWIG_POINTER_OWN), "std::invalid_argument", SWIGTYPE_p_std__invalid_argument); SWIG_fail; } resultobj = SWIG_From_ptrdiff_t(static_cast< ptrdiff_t >(result)); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_SwigPyIterator_equal(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; swig::SwigPyIterator *arg1 = (swig::SwigPyIterator *) 0 ; swig::SwigPyIterator *arg2 = 0 ; void *argp1 = 0 ; int res1 = 0 ; void *argp2 = 0 ; int res2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; bool result; if (!PyArg_ParseTuple(args,(char *)"OO:SwigPyIterator_equal",&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_swig__SwigPyIterator, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SwigPyIterator_equal" "', argument " "1"" of type '" "swig::SwigPyIterator const *""'"); } arg1 = reinterpret_cast< swig::SwigPyIterator * >(argp1); res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_swig__SwigPyIterator, 0 | 0); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "SwigPyIterator_equal" "', argument " "2"" of type '" "swig::SwigPyIterator const &""'"); } if (!argp2) { SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "SwigPyIterator_equal" "', argument " "2"" of type '" "swig::SwigPyIterator const &""'"); } arg2 = reinterpret_cast< swig::SwigPyIterator * >(argp2); try { result = (bool)((swig::SwigPyIterator const *)arg1)->equal((swig::SwigPyIterator const &)*arg2); } catch(std::invalid_argument &_e) { SWIG_Python_Raise(SWIG_NewPointerObj((new std::invalid_argument(static_cast< const std::invalid_argument& >(_e))),SWIGTYPE_p_std__invalid_argument,SWIG_POINTER_OWN), "std::invalid_argument", SWIGTYPE_p_std__invalid_argument); SWIG_fail; } resultobj = SWIG_From_bool(static_cast< bool >(result)); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_SwigPyIterator_copy(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; swig::SwigPyIterator *arg1 = (swig::SwigPyIterator *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; swig::SwigPyIterator *result = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:SwigPyIterator_copy",&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_swig__SwigPyIterator, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SwigPyIterator_copy" "', argument " "1"" of type '" "swig::SwigPyIterator const *""'"); } arg1 = reinterpret_cast< swig::SwigPyIterator * >(argp1); result = (swig::SwigPyIterator *)((swig::SwigPyIterator const *)arg1)->copy(); resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_swig__SwigPyIterator, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_SwigPyIterator_next(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; swig::SwigPyIterator *arg1 = (swig::SwigPyIterator *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; PyObject *result = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:SwigPyIterator_next",&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_swig__SwigPyIterator, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SwigPyIterator_next" "', argument " "1"" of type '" "swig::SwigPyIterator *""'"); } arg1 = reinterpret_cast< swig::SwigPyIterator * >(argp1); try { result = (PyObject *)(arg1)->next(); } catch(swig::stop_iteration &_e) { { (void)_e; SWIG_SetErrorObj(PyExc_StopIteration, SWIG_Py_Void()); SWIG_fail; } } resultobj = result; return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_SwigPyIterator___next__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; swig::SwigPyIterator *arg1 = (swig::SwigPyIterator *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; PyObject *result = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:SwigPyIterator___next__",&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_swig__SwigPyIterator, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SwigPyIterator___next__" "', argument " "1"" of type '" "swig::SwigPyIterator *""'"); } arg1 = reinterpret_cast< swig::SwigPyIterator * >(argp1); try { result = (PyObject *)(arg1)->__next__(); } catch(swig::stop_iteration &_e) { { (void)_e; SWIG_SetErrorObj(PyExc_StopIteration, SWIG_Py_Void()); SWIG_fail; } } resultobj = result; return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_SwigPyIterator_previous(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; swig::SwigPyIterator *arg1 = (swig::SwigPyIterator *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; PyObject *result = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:SwigPyIterator_previous",&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_swig__SwigPyIterator, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SwigPyIterator_previous" "', argument " "1"" of type '" "swig::SwigPyIterator *""'"); } arg1 = reinterpret_cast< swig::SwigPyIterator * >(argp1); try { result = (PyObject *)(arg1)->previous(); } catch(swig::stop_iteration &_e) { { (void)_e; SWIG_SetErrorObj(PyExc_StopIteration, SWIG_Py_Void()); SWIG_fail; } } resultobj = result; return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_SwigPyIterator_advance(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; swig::SwigPyIterator *arg1 = (swig::SwigPyIterator *) 0 ; ptrdiff_t arg2 ; void *argp1 = 0 ; int res1 = 0 ; ptrdiff_t val2 ; int ecode2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; swig::SwigPyIterator *result = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:SwigPyIterator_advance",&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_swig__SwigPyIterator, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SwigPyIterator_advance" "', argument " "1"" of type '" "swig::SwigPyIterator *""'"); } arg1 = reinterpret_cast< swig::SwigPyIterator * >(argp1); ecode2 = SWIG_AsVal_ptrdiff_t(obj1, &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "SwigPyIterator_advance" "', argument " "2"" of type '" "ptrdiff_t""'"); } arg2 = static_cast< ptrdiff_t >(val2); try { result = (swig::SwigPyIterator *)(arg1)->advance(arg2); } catch(swig::stop_iteration &_e) { { (void)_e; SWIG_SetErrorObj(PyExc_StopIteration, SWIG_Py_Void()); SWIG_fail; } } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_swig__SwigPyIterator, 0 | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_SwigPyIterator___eq__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; swig::SwigPyIterator *arg1 = (swig::SwigPyIterator *) 0 ; swig::SwigPyIterator *arg2 = 0 ; void *argp1 = 0 ; int res1 = 0 ; void *argp2 = 0 ; int res2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; bool result; if (!PyArg_ParseTuple(args,(char *)"OO:SwigPyIterator___eq__",&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_swig__SwigPyIterator, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SwigPyIterator___eq__" "', argument " "1"" of type '" "swig::SwigPyIterator const *""'"); } arg1 = reinterpret_cast< swig::SwigPyIterator * >(argp1); res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_swig__SwigPyIterator, 0 | 0); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "SwigPyIterator___eq__" "', argument " "2"" of type '" "swig::SwigPyIterator const &""'"); } if (!argp2) { SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "SwigPyIterator___eq__" "', argument " "2"" of type '" "swig::SwigPyIterator const &""'"); } arg2 = reinterpret_cast< swig::SwigPyIterator * >(argp2); result = (bool)((swig::SwigPyIterator const *)arg1)->operator ==((swig::SwigPyIterator const &)*arg2); resultobj = SWIG_From_bool(static_cast< bool >(result)); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_SwigPyIterator___ne__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; swig::SwigPyIterator *arg1 = (swig::SwigPyIterator *) 0 ; swig::SwigPyIterator *arg2 = 0 ; void *argp1 = 0 ; int res1 = 0 ; void *argp2 = 0 ; int res2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; bool result; if (!PyArg_ParseTuple(args,(char *)"OO:SwigPyIterator___ne__",&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_swig__SwigPyIterator, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SwigPyIterator___ne__" "', argument " "1"" of type '" "swig::SwigPyIterator const *""'"); } arg1 = reinterpret_cast< swig::SwigPyIterator * >(argp1); res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_swig__SwigPyIterator, 0 | 0); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "SwigPyIterator___ne__" "', argument " "2"" of type '" "swig::SwigPyIterator const &""'"); } if (!argp2) { SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "SwigPyIterator___ne__" "', argument " "2"" of type '" "swig::SwigPyIterator const &""'"); } arg2 = reinterpret_cast< swig::SwigPyIterator * >(argp2); result = (bool)((swig::SwigPyIterator const *)arg1)->operator !=((swig::SwigPyIterator const &)*arg2); resultobj = SWIG_From_bool(static_cast< bool >(result)); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_SwigPyIterator___iadd__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; swig::SwigPyIterator *arg1 = (swig::SwigPyIterator *) 0 ; ptrdiff_t arg2 ; void *argp1 = 0 ; int res1 = 0 ; ptrdiff_t val2 ; int ecode2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; swig::SwigPyIterator *result = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:SwigPyIterator___iadd__",&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_swig__SwigPyIterator, SWIG_POINTER_DISOWN | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SwigPyIterator___iadd__" "', argument " "1"" of type '" "swig::SwigPyIterator *""'"); } arg1 = reinterpret_cast< swig::SwigPyIterator * >(argp1); ecode2 = SWIG_AsVal_ptrdiff_t(obj1, &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "SwigPyIterator___iadd__" "', argument " "2"" of type '" "ptrdiff_t""'"); } arg2 = static_cast< ptrdiff_t >(val2); try { result = (swig::SwigPyIterator *) &(arg1)->operator +=(arg2); } catch(swig::stop_iteration &_e) { { (void)_e; SWIG_SetErrorObj(PyExc_StopIteration, SWIG_Py_Void()); SWIG_fail; } } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_swig__SwigPyIterator, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_SwigPyIterator___isub__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; swig::SwigPyIterator *arg1 = (swig::SwigPyIterator *) 0 ; ptrdiff_t arg2 ; void *argp1 = 0 ; int res1 = 0 ; ptrdiff_t val2 ; int ecode2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; swig::SwigPyIterator *result = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:SwigPyIterator___isub__",&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_swig__SwigPyIterator, SWIG_POINTER_DISOWN | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SwigPyIterator___isub__" "', argument " "1"" of type '" "swig::SwigPyIterator *""'"); } arg1 = reinterpret_cast< swig::SwigPyIterator * >(argp1); ecode2 = SWIG_AsVal_ptrdiff_t(obj1, &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "SwigPyIterator___isub__" "', argument " "2"" of type '" "ptrdiff_t""'"); } arg2 = static_cast< ptrdiff_t >(val2); try { result = (swig::SwigPyIterator *) &(arg1)->operator -=(arg2); } catch(swig::stop_iteration &_e) { { (void)_e; SWIG_SetErrorObj(PyExc_StopIteration, SWIG_Py_Void()); SWIG_fail; } } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_swig__SwigPyIterator, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_SwigPyIterator___add__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; swig::SwigPyIterator *arg1 = (swig::SwigPyIterator *) 0 ; ptrdiff_t arg2 ; void *argp1 = 0 ; int res1 = 0 ; ptrdiff_t val2 ; int ecode2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; swig::SwigPyIterator *result = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:SwigPyIterator___add__",&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_swig__SwigPyIterator, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SwigPyIterator___add__" "', argument " "1"" of type '" "swig::SwigPyIterator const *""'"); } arg1 = reinterpret_cast< swig::SwigPyIterator * >(argp1); ecode2 = SWIG_AsVal_ptrdiff_t(obj1, &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "SwigPyIterator___add__" "', argument " "2"" of type '" "ptrdiff_t""'"); } arg2 = static_cast< ptrdiff_t >(val2); try { result = (swig::SwigPyIterator *)((swig::SwigPyIterator const *)arg1)->operator +(arg2); } catch(swig::stop_iteration &_e) { { (void)_e; SWIG_SetErrorObj(PyExc_StopIteration, SWIG_Py_Void()); SWIG_fail; } } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_swig__SwigPyIterator, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_SwigPyIterator___sub____SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; swig::SwigPyIterator *arg1 = (swig::SwigPyIterator *) 0 ; ptrdiff_t arg2 ; void *argp1 = 0 ; int res1 = 0 ; ptrdiff_t val2 ; int ecode2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; swig::SwigPyIterator *result = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:SwigPyIterator___sub__",&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_swig__SwigPyIterator, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SwigPyIterator___sub__" "', argument " "1"" of type '" "swig::SwigPyIterator const *""'"); } arg1 = reinterpret_cast< swig::SwigPyIterator * >(argp1); ecode2 = SWIG_AsVal_ptrdiff_t(obj1, &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "SwigPyIterator___sub__" "', argument " "2"" of type '" "ptrdiff_t""'"); } arg2 = static_cast< ptrdiff_t >(val2); try { result = (swig::SwigPyIterator *)((swig::SwigPyIterator const *)arg1)->operator -(arg2); } catch(swig::stop_iteration &_e) { { (void)_e; SWIG_SetErrorObj(PyExc_StopIteration, SWIG_Py_Void()); SWIG_fail; } } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_swig__SwigPyIterator, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_SwigPyIterator___sub____SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; swig::SwigPyIterator *arg1 = (swig::SwigPyIterator *) 0 ; swig::SwigPyIterator *arg2 = 0 ; void *argp1 = 0 ; int res1 = 0 ; void *argp2 = 0 ; int res2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; ptrdiff_t result; if (!PyArg_ParseTuple(args,(char *)"OO:SwigPyIterator___sub__",&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_swig__SwigPyIterator, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SwigPyIterator___sub__" "', argument " "1"" of type '" "swig::SwigPyIterator const *""'"); } arg1 = reinterpret_cast< swig::SwigPyIterator * >(argp1); res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_swig__SwigPyIterator, 0 | 0); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "SwigPyIterator___sub__" "', argument " "2"" of type '" "swig::SwigPyIterator const &""'"); } if (!argp2) { SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "SwigPyIterator___sub__" "', argument " "2"" of type '" "swig::SwigPyIterator const &""'"); } arg2 = reinterpret_cast< swig::SwigPyIterator * >(argp2); result = ((swig::SwigPyIterator const *)arg1)->operator -((swig::SwigPyIterator const &)*arg2); resultobj = SWIG_From_ptrdiff_t(static_cast< ptrdiff_t >(result)); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_SwigPyIterator___sub__(PyObject *self, PyObject *args) { int argc; PyObject *argv[3]; int ii; if (!PyTuple_Check(args)) SWIG_fail; argc = (int)PyObject_Length(args); for (ii = 0; (ii < argc) && (ii < 2); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } if (argc == 2) { int _v; void *vptr = 0; int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_swig__SwigPyIterator, 0); _v = SWIG_CheckState(res); if (_v) { int res = SWIG_ConvertPtr(argv[1], 0, SWIGTYPE_p_swig__SwigPyIterator, 0); _v = SWIG_CheckState(res); if (_v) { return _wrap_SwigPyIterator___sub____SWIG_1(self, args); } } } if (argc == 2) { int _v; void *vptr = 0; int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_swig__SwigPyIterator, 0); _v = SWIG_CheckState(res); if (_v) { { int res = SWIG_AsVal_ptrdiff_t(argv[1], NULL); _v = SWIG_CheckState(res); } if (_v) { return _wrap_SwigPyIterator___sub____SWIG_0(self, args); } } } fail: Py_INCREF(Py_NotImplemented); return Py_NotImplemented; } SWIGINTERN PyObject *SwigPyIterator_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *obj; if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL; SWIG_TypeNewClientData(SWIGTYPE_p_swig__SwigPyIterator, SWIG_NewClientData(obj)); return SWIG_Py_Void(); } SWIGINTERN PyObject *_wrap_CheckVersion__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; char *arg1 = (char *) 0 ; int res1 ; char *buf1 = 0 ; int alloc1 = 0 ; PyObject * obj0 = 0 ; char *result = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:CheckVersion",&obj0)) SWIG_fail; res1 = SWIG_AsCharPtrAndSize(obj0, &buf1, NULL, &alloc1); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CheckVersion" "', argument " "1"" of type '" "char const *""'"); } arg1 = reinterpret_cast< char * >(buf1); try { result = (char *)CheckVersion((char const *)arg1); } catch(Prelude::PreludeError &_e) { SWIG_Python_Raise(SWIG_NewPointerObj((new Prelude::PreludeError(static_cast< const Prelude::PreludeError& >(_e))),SWIGTYPE_p_Prelude__PreludeError,SWIG_POINTER_OWN), "Prelude::PreludeError", SWIGTYPE_p_Prelude__PreludeError); SWIG_fail; } resultobj = SWIG_FromCharPtr((const char *)result); if (alloc1 == SWIG_NEWOBJ) delete[] buf1; return resultobj; fail: if (alloc1 == SWIG_NEWOBJ) delete[] buf1; return NULL; } SWIGINTERN PyObject *_wrap_CheckVersion__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; char *result = 0 ; if (!PyArg_ParseTuple(args,(char *)":CheckVersion")) SWIG_fail; try { result = (char *)CheckVersion(); } catch(Prelude::PreludeError &_e) { SWIG_Python_Raise(SWIG_NewPointerObj((new Prelude::PreludeError(static_cast< const Prelude::PreludeError& >(_e))),SWIGTYPE_p_Prelude__PreludeError,SWIG_POINTER_OWN), "Prelude::PreludeError", SWIGTYPE_p_Prelude__PreludeError); SWIG_fail; } resultobj = SWIG_FromCharPtr((const char *)result); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_CheckVersion(PyObject *self, PyObject *args) { int argc; PyObject *argv[2]; int ii; if (!PyTuple_Check(args)) SWIG_fail; argc = (int)PyObject_Length(args); for (ii = 0; (ii < argc) && (ii < 1); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } if (argc == 0) { return _wrap_CheckVersion__SWIG_1(self, args); } if (argc == 1) { int _v; int res = SWIG_AsCharPtrAndSize(argv[0], 0, NULL, 0); _v = SWIG_CheckState(res); if (_v) { return _wrap_CheckVersion__SWIG_0(self, args); } } fail: SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'CheckVersion'.\n" " Possible C/C++ prototypes are:\n" " CheckVersion(char const *)\n" " CheckVersion()\n"); return NULL; } SWIGINTERN PyObject *_wrap_PreludeLog_SetLevel(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; int arg1 ; int val1 ; int ecode1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:PreludeLog_SetLevel",&obj0)) SWIG_fail; ecode1 = SWIG_AsVal_int(obj0, &val1); if (!SWIG_IsOK(ecode1)) { SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "PreludeLog_SetLevel" "', argument " "1"" of type '" "int""'"); } arg1 = static_cast< int >(val1); try { Prelude::PreludeLog::SetLevel(arg1); } catch(Prelude::PreludeError &_e) { SWIG_Python_Raise(SWIG_NewPointerObj((new Prelude::PreludeError(static_cast< const Prelude::PreludeError& >(_e))),SWIGTYPE_p_Prelude__PreludeError,SWIG_POINTER_OWN), "Prelude::PreludeError", SWIGTYPE_p_Prelude__PreludeError); SWIG_fail; } resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_PreludeLog_SetDebugLevel(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; int arg1 ; int val1 ; int ecode1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:PreludeLog_SetDebugLevel",&obj0)) SWIG_fail; ecode1 = SWIG_AsVal_int(obj0, &val1); if (!SWIG_IsOK(ecode1)) { SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "PreludeLog_SetDebugLevel" "', argument " "1"" of type '" "int""'"); } arg1 = static_cast< int >(val1); try { Prelude::PreludeLog::SetDebugLevel(arg1); } catch(Prelude::PreludeError &_e) { SWIG_Python_Raise(SWIG_NewPointerObj((new Prelude::PreludeError(static_cast< const Prelude::PreludeError& >(_e))),SWIGTYPE_p_Prelude__PreludeError,SWIG_POINTER_OWN), "Prelude::PreludeError", SWIGTYPE_p_Prelude__PreludeError); SWIG_fail; } resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_PreludeLog_SetFlags(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; int arg1 ; int val1 ; int ecode1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:PreludeLog_SetFlags",&obj0)) SWIG_fail; ecode1 = SWIG_AsVal_int(obj0, &val1); if (!SWIG_IsOK(ecode1)) { SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "PreludeLog_SetFlags" "', argument " "1"" of type '" "int""'"); } arg1 = static_cast< int >(val1); try { Prelude::PreludeLog::SetFlags(arg1); } catch(Prelude::PreludeError &_e) { SWIG_Python_Raise(SWIG_NewPointerObj((new Prelude::PreludeError(static_cast< const Prelude::PreludeError& >(_e))),SWIGTYPE_p_Prelude__PreludeError,SWIG_POINTER_OWN), "Prelude::PreludeError", SWIGTYPE_p_Prelude__PreludeError); SWIG_fail; } resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_PreludeLog_GetFlags(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; int result; if (!PyArg_ParseTuple(args,(char *)":PreludeLog_GetFlags")) SWIG_fail; try { result = (int)Prelude::PreludeLog::GetFlags(); } catch(Prelude::PreludeError &_e) { SWIG_Python_Raise(SWIG_NewPointerObj((new Prelude::PreludeError(static_cast< const Prelude::PreludeError& >(_e))),SWIGTYPE_p_Prelude__PreludeError,SWIG_POINTER_OWN), "Prelude::PreludeError", SWIGTYPE_p_Prelude__PreludeError); SWIG_fail; } resultobj = SWIG_From_int(static_cast< int >(result)); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_PreludeLog_SetLogfile(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; char *arg1 = (char *) 0 ; int res1 ; char *buf1 = 0 ; int alloc1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:PreludeLog_SetLogfile",&obj0)) SWIG_fail; res1 = SWIG_AsCharPtrAndSize(obj0, &buf1, NULL, &alloc1); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "PreludeLog_SetLogfile" "', argument " "1"" of type '" "char const *""'"); } arg1 = reinterpret_cast< char * >(buf1); try { Prelude::PreludeLog::SetLogfile((char const *)arg1); } catch(Prelude::PreludeError &_e) { SWIG_Python_Raise(SWIG_NewPointerObj((new Prelude::PreludeError(static_cast< const Prelude::PreludeError& >(_e))),SWIGTYPE_p_Prelude__PreludeError,SWIG_POINTER_OWN), "Prelude::PreludeError", SWIGTYPE_p_Prelude__PreludeError); SWIG_fail; } resultobj = SWIG_Py_Void(); if (alloc1 == SWIG_NEWOBJ) delete[] buf1; return resultobj; fail: if (alloc1 == SWIG_NEWOBJ) delete[] buf1; return NULL; } SWIGINTERN PyObject *_wrap_PreludeLog_SetCallback(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; void (*arg1)(int,char const *) = (void (*)(int,char const *)) 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:PreludeLog_SetCallback",&obj0)) SWIG_fail; { if ( ! PyCallable_Check(obj0) ) SWIG_exception_fail(SWIG_ValueError, "Argument is not a callable object"); if ( __prelude_log_func ) Py_DECREF(__prelude_log_func); __prelude_log_func = obj0; Py_INCREF(obj0); arg1 = _cb_python_log; } try { Prelude::PreludeLog::SetCallback(arg1); } catch(Prelude::PreludeError &_e) { SWIG_Python_Raise(SWIG_NewPointerObj((new Prelude::PreludeError(static_cast< const Prelude::PreludeError& >(_e))),SWIGTYPE_p_Prelude__PreludeError,SWIG_POINTER_OWN), "Prelude::PreludeError", SWIGTYPE_p_Prelude__PreludeError); SWIG_fail; } resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_new_PreludeLog(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; Prelude::PreludeLog *result = 0 ; if (!PyArg_ParseTuple(args,(char *)":new_PreludeLog")) SWIG_fail; result = (Prelude::PreludeLog *)new Prelude::PreludeLog(); resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Prelude__PreludeLog, SWIG_POINTER_NEW | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_delete_PreludeLog(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; Prelude::PreludeLog *arg1 = (Prelude::PreludeLog *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:delete_PreludeLog",&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Prelude__PreludeLog, SWIG_POINTER_DISOWN | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_PreludeLog" "', argument " "1"" of type '" "Prelude::PreludeLog *""'"); } arg1 = reinterpret_cast< Prelude::PreludeLog * >(argp1); delete arg1; resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *PreludeLog_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *obj; if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL; SWIG_TypeNewClientData(SWIGTYPE_p_Prelude__PreludeLog, SWIG_NewClientData(obj)); return SWIG_Py_Void(); } SWIGINTERN PyObject *_wrap_delete_PreludeError(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; Prelude::PreludeError *arg1 = (Prelude::PreludeError *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:delete_PreludeError",&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Prelude__PreludeError, SWIG_POINTER_DISOWN | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_PreludeError" "', argument " "1"" of type '" "Prelude::PreludeError *""'"); } arg1 = reinterpret_cast< Prelude::PreludeError * >(argp1); delete arg1; resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_new_PreludeError__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; int arg1 ; int val1 ; int ecode1 = 0 ; PyObject * obj0 = 0 ; Prelude::PreludeError *result = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:new_PreludeError",&obj0)) SWIG_fail; ecode1 = SWIG_AsVal_int(obj0, &val1); if (!SWIG_IsOK(ecode1)) { SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_PreludeError" "', argument " "1"" of type '" "int""'"); } arg1 = static_cast< int >(val1); try { result = (Prelude::PreludeError *)new Prelude::PreludeError(arg1); } catch(Prelude::PreludeError &_e) { SWIG_Python_Raise(SWIG_NewPointerObj((new Prelude::PreludeError(static_cast< const Prelude::PreludeError& >(_e))),SWIGTYPE_p_Prelude__PreludeError,SWIG_POINTER_OWN), "Prelude::PreludeError", SWIGTYPE_p_Prelude__PreludeError); SWIG_fail; } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Prelude__PreludeError, SWIG_POINTER_NEW | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_new_PreludeError__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; std::string arg1 ; PyObject * obj0 = 0 ; Prelude::PreludeError *result = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:new_PreludeError",&obj0)) SWIG_fail; { std::string *ptr = (std::string *)0; int res = SWIG_AsPtr_std_string(obj0, &ptr); if (!SWIG_IsOK(res) || !ptr) { SWIG_exception_fail(SWIG_ArgError((ptr ? res : SWIG_TypeError)), "in method '" "new_PreludeError" "', argument " "1"" of type '" "std::string const""'"); } arg1 = *ptr; if (SWIG_IsNewObj(res)) delete ptr; } try { result = (Prelude::PreludeError *)new Prelude::PreludeError(arg1); } catch(Prelude::PreludeError &_e) { SWIG_Python_Raise(SWIG_NewPointerObj((new Prelude::PreludeError(static_cast< const Prelude::PreludeError& >(_e))),SWIGTYPE_p_Prelude__PreludeError,SWIG_POINTER_OWN), "Prelude::PreludeError", SWIGTYPE_p_Prelude__PreludeError); SWIG_fail; } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Prelude__PreludeError, SWIG_POINTER_NEW | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_new_PreludeError(PyObject *self, PyObject *args) { int argc; PyObject *argv[2]; int ii; if (!PyTuple_Check(args)) SWIG_fail; argc = (int)PyObject_Length(args); for (ii = 0; (ii < argc) && (ii < 1); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } if (argc == 1) { int _v; { int res = SWIG_AsVal_int(argv[0], NULL); _v = SWIG_CheckState(res); } if (_v) { return _wrap_new_PreludeError__SWIG_0(self, args); } } if (argc == 1) { int _v; int res = SWIG_AsPtr_std_string(argv[0], (std::string**)(0)); _v = SWIG_CheckState(res); if (_v) { return _wrap_new_PreludeError__SWIG_1(self, args); } } fail: SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'new_PreludeError'.\n" " Possible C/C++ prototypes are:\n" " Prelude::PreludeError(int)\n" " Prelude::PreludeError(std::string const)\n"); return NULL; } SWIGINTERN PyObject *_wrap_PreludeError_what(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; Prelude::PreludeError *arg1 = (Prelude::PreludeError *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; char *result = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:PreludeError_what",&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Prelude__PreludeError, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "PreludeError_what" "', argument " "1"" of type '" "Prelude::PreludeError const *""'"); } arg1 = reinterpret_cast< Prelude::PreludeError * >(argp1); try { result = (char *)((Prelude::PreludeError const *)arg1)->what(); } catch(Prelude::PreludeError &_e) { SWIG_Python_Raise(SWIG_NewPointerObj((new Prelude::PreludeError(static_cast< const Prelude::PreludeError& >(_e))),SWIGTYPE_p_Prelude__PreludeError,SWIG_POINTER_OWN), "Prelude::PreludeError", SWIGTYPE_p_Prelude__PreludeError); SWIG_fail; } resultobj = SWIG_FromCharPtr((const char *)result); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_PreludeError___str__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; Prelude::PreludeError *arg1 = (Prelude::PreludeError *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; std::string result; if (!PyArg_ParseTuple(args,(char *)"O:PreludeError___str__",&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Prelude__PreludeError, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "PreludeError___str__" "', argument " "1"" of type '" "Prelude::PreludeError const *""'"); } arg1 = reinterpret_cast< Prelude::PreludeError * >(argp1); try { result = ((Prelude::PreludeError const *)arg1)->operator const std::string(); } catch(Prelude::PreludeError &_e) { SWIG_Python_Raise(SWIG_NewPointerObj((new Prelude::PreludeError(static_cast< const Prelude::PreludeError& >(_e))),SWIGTYPE_p_Prelude__PreludeError,SWIG_POINTER_OWN), "Prelude::PreludeError", SWIGTYPE_p_Prelude__PreludeError); SWIG_fail; } resultobj = SWIG_From_std_string(static_cast< std::string >(result)); return resultobj; fail: return NULL; } SWIGINTERN PyObject *PreludeError_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *obj; if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL; SWIG_TypeNewClientData(SWIGTYPE_p_Prelude__PreludeError, SWIG_NewClientData(obj)); return SWIG_Py_Void(); } SWIGINTERN PyObject *_wrap_delete_Connection(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; Prelude::Connection *arg1 = (Prelude::Connection *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:delete_Connection",&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Prelude__Connection, SWIG_POINTER_DISOWN | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_Connection" "', argument " "1"" of type '" "Prelude::Connection *""'"); } arg1 = reinterpret_cast< Prelude::Connection * >(argp1); delete arg1; resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_new_Connection__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; Prelude::Connection *result = 0 ; if (!PyArg_ParseTuple(args,(char *)":new_Connection")) SWIG_fail; try { result = (Prelude::Connection *)new Prelude::Connection(); } catch(Prelude::PreludeError &_e) { SWIG_Python_Raise(SWIG_NewPointerObj((new Prelude::PreludeError(static_cast< const Prelude::PreludeError& >(_e))),SWIGTYPE_p_Prelude__PreludeError,SWIG_POINTER_OWN), "Prelude::PreludeError", SWIGTYPE_p_Prelude__PreludeError); SWIG_fail; } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Prelude__Connection, SWIG_POINTER_NEW | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_new_Connection__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; char *arg1 = (char *) 0 ; int res1 ; char *buf1 = 0 ; int alloc1 = 0 ; PyObject * obj0 = 0 ; Prelude::Connection *result = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:new_Connection",&obj0)) SWIG_fail; res1 = SWIG_AsCharPtrAndSize(obj0, &buf1, NULL, &alloc1); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_Connection" "', argument " "1"" of type '" "char const *""'"); } arg1 = reinterpret_cast< char * >(buf1); try { result = (Prelude::Connection *)new Prelude::Connection((char const *)arg1); } catch(Prelude::PreludeError &_e) { SWIG_Python_Raise(SWIG_NewPointerObj((new Prelude::PreludeError(static_cast< const Prelude::PreludeError& >(_e))),SWIGTYPE_p_Prelude__PreludeError,SWIG_POINTER_OWN), "Prelude::PreludeError", SWIGTYPE_p_Prelude__PreludeError); SWIG_fail; } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Prelude__Connection, SWIG_POINTER_NEW | 0 ); if (alloc1 == SWIG_NEWOBJ) delete[] buf1; return resultobj; fail: if (alloc1 == SWIG_NEWOBJ) delete[] buf1; return NULL; } SWIGINTERN PyObject *_wrap_new_Connection__SWIG_2(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; Prelude::Connection *arg1 = 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; Prelude::Connection *result = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:new_Connection",&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1, SWIGTYPE_p_Prelude__Connection, 0 | 0); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_Connection" "', argument " "1"" of type '" "Prelude::Connection const &""'"); } if (!argp1) { SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_Connection" "', argument " "1"" of type '" "Prelude::Connection const &""'"); } arg1 = reinterpret_cast< Prelude::Connection * >(argp1); try { result = (Prelude::Connection *)new Prelude::Connection((Prelude::Connection const &)*arg1); } catch(Prelude::PreludeError &_e) { SWIG_Python_Raise(SWIG_NewPointerObj((new Prelude::PreludeError(static_cast< const Prelude::PreludeError& >(_e))),SWIGTYPE_p_Prelude__PreludeError,SWIG_POINTER_OWN), "Prelude::PreludeError", SWIGTYPE_p_Prelude__PreludeError); SWIG_fail; } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Prelude__Connection, SWIG_POINTER_NEW | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_new_Connection__SWIG_3(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; prelude_connection_t *arg1 = (prelude_connection_t *) 0 ; bool arg2 ; void *argp1 = 0 ; int res1 = 0 ; bool val2 ; int ecode2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; Prelude::Connection *result = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:new_Connection",&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_prelude_connection_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_Connection" "', argument " "1"" of type '" "prelude_connection_t *""'"); } arg1 = reinterpret_cast< prelude_connection_t * >(argp1); ecode2 = SWIG_AsVal_bool(obj1, &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_Connection" "', argument " "2"" of type '" "bool""'"); } arg2 = static_cast< bool >(val2); try { result = (Prelude::Connection *)new Prelude::Connection(arg1,arg2); } catch(Prelude::PreludeError &_e) { SWIG_Python_Raise(SWIG_NewPointerObj((new Prelude::PreludeError(static_cast< const Prelude::PreludeError& >(_e))),SWIGTYPE_p_Prelude__PreludeError,SWIG_POINTER_OWN), "Prelude::PreludeError", SWIGTYPE_p_Prelude__PreludeError); SWIG_fail; } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Prelude__Connection, SWIG_POINTER_NEW | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_new_Connection__SWIG_4(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; prelude_connection_t *arg1 = (prelude_connection_t *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; Prelude::Connection *result = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:new_Connection",&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_prelude_connection_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_Connection" "', argument " "1"" of type '" "prelude_connection_t *""'"); } arg1 = reinterpret_cast< prelude_connection_t * >(argp1); try { result = (Prelude::Connection *)new Prelude::Connection(arg1); } catch(Prelude::PreludeError &_e) { SWIG_Python_Raise(SWIG_NewPointerObj((new Prelude::PreludeError(static_cast< const Prelude::PreludeError& >(_e))),SWIGTYPE_p_Prelude__PreludeError,SWIG_POINTER_OWN), "Prelude::PreludeError", SWIGTYPE_p_Prelude__PreludeError); SWIG_fail; } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Prelude__Connection, SWIG_POINTER_NEW | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_new_Connection(PyObject *self, PyObject *args) { int argc; PyObject *argv[3]; int ii; if (!PyTuple_Check(args)) SWIG_fail; argc = (int)PyObject_Length(args); for (ii = 0; (ii < argc) && (ii < 2); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } if (argc == 0) { return _wrap_new_Connection__SWIG_0(self, args); } if (argc == 1) { int _v; int res = SWIG_ConvertPtr(argv[0], 0, SWIGTYPE_p_Prelude__Connection, 0); _v = SWIG_CheckState(res); if (_v) { return _wrap_new_Connection__SWIG_2(self, args); } } if (argc == 1) { int _v; void *vptr = 0; int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_prelude_connection_t, 0); _v = SWIG_CheckState(res); if (_v) { return _wrap_new_Connection__SWIG_4(self, args); } } if (argc == 1) { int _v; int res = SWIG_AsCharPtrAndSize(argv[0], 0, NULL, 0); _v = SWIG_CheckState(res); if (_v) { return _wrap_new_Connection__SWIG_1(self, args); } } if (argc == 2) { int _v; void *vptr = 0; int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_prelude_connection_t, 0); _v = SWIG_CheckState(res); if (_v) { { int res = SWIG_AsVal_bool(argv[1], NULL); _v = SWIG_CheckState(res); } if (_v) { return _wrap_new_Connection__SWIG_3(self, args); } } } fail: SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'new_Connection'.\n" " Possible C/C++ prototypes are:\n" " Prelude::Connection()\n" " Prelude::Connection(char const *)\n" " Prelude::Connection(Prelude::Connection const &)\n" " Prelude::Connection(prelude_connection_t *,bool)\n" " Prelude::Connection(prelude_connection_t *)\n"); return NULL; } SWIGINTERN PyObject *_wrap_Connection_GetConnection(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; Prelude::Connection *arg1 = (Prelude::Connection *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; prelude_connection_t *result = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:Connection_GetConnection",&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Prelude__Connection, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Connection_GetConnection" "', argument " "1"" of type '" "Prelude::Connection *""'"); } arg1 = reinterpret_cast< Prelude::Connection * >(argp1); try { result = (prelude_connection_t *)(arg1)->GetConnection(); } catch(Prelude::PreludeError &_e) { SWIG_Python_Raise(SWIG_NewPointerObj((new Prelude::PreludeError(static_cast< const Prelude::PreludeError& >(_e))),SWIGTYPE_p_Prelude__PreludeError,SWIG_POINTER_OWN), "Prelude::PreludeError", SWIGTYPE_p_Prelude__PreludeError); SWIG_fail; } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_prelude_connection_t, 0 | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_Connection_Close(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; Prelude::Connection *arg1 = (Prelude::Connection *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:Connection_Close",&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Prelude__Connection, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Connection_Close" "', argument " "1"" of type '" "Prelude::Connection *""'"); } arg1 = reinterpret_cast< Prelude::Connection * >(argp1); try { (arg1)->Close(); } catch(Prelude::PreludeError &_e) { SWIG_Python_Raise(SWIG_NewPointerObj((new Prelude::PreludeError(static_cast< const Prelude::PreludeError& >(_e))),SWIGTYPE_p_Prelude__PreludeError,SWIG_POINTER_OWN), "Prelude::PreludeError", SWIGTYPE_p_Prelude__PreludeError); SWIG_fail; } resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_Connection_Connect(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; Prelude::Connection *arg1 = (Prelude::Connection *) 0 ; Prelude::ClientProfile *arg2 = 0 ; int arg3 ; void *argp1 = 0 ; int res1 = 0 ; void *argp2 = 0 ; int res2 = 0 ; int val3 ; int ecode3 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; PyObject * obj2 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OOO:Connection_Connect",&obj0,&obj1,&obj2)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Prelude__Connection, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Connection_Connect" "', argument " "1"" of type '" "Prelude::Connection *""'"); } arg1 = reinterpret_cast< Prelude::Connection * >(argp1); res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_Prelude__ClientProfile, 0 ); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Connection_Connect" "', argument " "2"" of type '" "Prelude::ClientProfile &""'"); } if (!argp2) { SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Connection_Connect" "', argument " "2"" of type '" "Prelude::ClientProfile &""'"); } arg2 = reinterpret_cast< Prelude::ClientProfile * >(argp2); ecode3 = SWIG_AsVal_int(obj2, &val3); if (!SWIG_IsOK(ecode3)) { SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "Connection_Connect" "', argument " "3"" of type '" "int""'"); } arg3 = static_cast< int >(val3); try { (arg1)->Connect(*arg2,arg3); } catch(Prelude::PreludeError &_e) { SWIG_Python_Raise(SWIG_NewPointerObj((new Prelude::PreludeError(static_cast< const Prelude::PreludeError& >(_e))),SWIGTYPE_p_Prelude__PreludeError,SWIG_POINTER_OWN), "Prelude::PreludeError", SWIGTYPE_p_Prelude__PreludeError); SWIG_fail; } resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_Connection_SetState(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; Prelude::Connection *arg1 = (Prelude::Connection *) 0 ; int arg2 ; void *argp1 = 0 ; int res1 = 0 ; int val2 ; int ecode2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:Connection_SetState",&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Prelude__Connection, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Connection_SetState" "', argument " "1"" of type '" "Prelude::Connection *""'"); } arg1 = reinterpret_cast< Prelude::Connection * >(argp1); ecode2 = SWIG_AsVal_int(obj1, &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Connection_SetState" "', argument " "2"" of type '" "int""'"); } arg2 = static_cast< int >(val2); try { (arg1)->SetState(arg2); } catch(Prelude::PreludeError &_e) { SWIG_Python_Raise(SWIG_NewPointerObj((new Prelude::PreludeError(static_cast< const Prelude::PreludeError& >(_e))),SWIGTYPE_p_Prelude__PreludeError,SWIG_POINTER_OWN), "Prelude::PreludeError", SWIGTYPE_p_Prelude__PreludeError); SWIG_fail; } resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_Connection_GetState(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; Prelude::Connection *arg1 = (Prelude::Connection *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; int result; if (!PyArg_ParseTuple(args,(char *)"O:Connection_GetState",&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Prelude__Connection, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Connection_GetState" "', argument " "1"" of type '" "Prelude::Connection *""'"); } arg1 = reinterpret_cast< Prelude::Connection * >(argp1); try { result = (int)(arg1)->GetState(); } catch(Prelude::PreludeError &_e) { SWIG_Python_Raise(SWIG_NewPointerObj((new Prelude::PreludeError(static_cast< const Prelude::PreludeError& >(_e))),SWIGTYPE_p_Prelude__PreludeError,SWIG_POINTER_OWN), "Prelude::PreludeError", SWIGTYPE_p_Prelude__PreludeError); SWIG_fail; } resultobj = SWIG_From_int(static_cast< int >(result)); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_Connection_SetData(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; Prelude::Connection *arg1 = (Prelude::Connection *) 0 ; void *arg2 = (void *) 0 ; void *argp1 = 0 ; int res1 = 0 ; int res2 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:Connection_SetData",&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Prelude__Connection, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Connection_SetData" "', argument " "1"" of type '" "Prelude::Connection *""'"); } arg1 = reinterpret_cast< Prelude::Connection * >(argp1); res2 = SWIG_ConvertPtr(obj1,SWIG_as_voidptrptr(&arg2), 0, 0); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Connection_SetData" "', argument " "2"" of type '" "void *""'"); } try { (arg1)->SetData(arg2); } catch(Prelude::PreludeError &_e) { SWIG_Python_Raise(SWIG_NewPointerObj((new Prelude::PreludeError(static_cast< const Prelude::PreludeError& >(_e))),SWIGTYPE_p_Prelude__PreludeError,SWIG_POINTER_OWN), "Prelude::PreludeError", SWIGTYPE_p_Prelude__PreludeError); SWIG_fail; } resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_Connection_GetData(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; Prelude::Connection *arg1 = (Prelude::Connection *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; void *result = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:Connection_GetData",&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Prelude__Connection, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Connection_GetData" "', argument " "1"" of type '" "Prelude::Connection *""'"); } arg1 = reinterpret_cast< Prelude::Connection * >(argp1); try { result = (void *)(arg1)->GetData(); } catch(Prelude::PreludeError &_e) { SWIG_Python_Raise(SWIG_NewPointerObj((new Prelude::PreludeError(static_cast< const Prelude::PreludeError& >(_e))),SWIGTYPE_p_Prelude__PreludeError,SWIG_POINTER_OWN), "Prelude::PreludeError", SWIGTYPE_p_Prelude__PreludeError); SWIG_fail; } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_void, 0 | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_Connection_GetPermission(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; Prelude::Connection *arg1 = (Prelude::Connection *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; int result; if (!PyArg_ParseTuple(args,(char *)"O:Connection_GetPermission",&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Prelude__Connection, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Connection_GetPermission" "', argument " "1"" of type '" "Prelude::Connection *""'"); } arg1 = reinterpret_cast< Prelude::Connection * >(argp1); try { result = (int)(arg1)->GetPermission(); } catch(Prelude::PreludeError &_e) { SWIG_Python_Raise(SWIG_NewPointerObj((new Prelude::PreludeError(static_cast< const Prelude::PreludeError& >(_e))),SWIGTYPE_p_Prelude__PreludeError,SWIG_POINTER_OWN), "Prelude::PreludeError", SWIGTYPE_p_Prelude__PreludeError); SWIG_fail; } resultobj = SWIG_From_int(static_cast< int >(result)); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_Connection_SetPeerAnalyzerid(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; Prelude::Connection *arg1 = (Prelude::Connection *) 0 ; uint64_t arg2 ; void *argp1 = 0 ; int res1 = 0 ; unsigned long long val2 ; int ecode2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:Connection_SetPeerAnalyzerid",&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Prelude__Connection, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Connection_SetPeerAnalyzerid" "', argument " "1"" of type '" "Prelude::Connection *""'"); } arg1 = reinterpret_cast< Prelude::Connection * >(argp1); ecode2 = SWIG_AsVal_unsigned_SS_long_SS_long(obj1, &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Connection_SetPeerAnalyzerid" "', argument " "2"" of type '" "uint64_t""'"); } arg2 = static_cast< uint64_t >(val2); try { (arg1)->SetPeerAnalyzerid(arg2); } catch(Prelude::PreludeError &_e) { SWIG_Python_Raise(SWIG_NewPointerObj((new Prelude::PreludeError(static_cast< const Prelude::PreludeError& >(_e))),SWIGTYPE_p_Prelude__PreludeError,SWIG_POINTER_OWN), "Prelude::PreludeError", SWIGTYPE_p_Prelude__PreludeError); SWIG_fail; } resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_Connection_GetPeerAnalyzerid(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; Prelude::Connection *arg1 = (Prelude::Connection *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; uint64_t result; if (!PyArg_ParseTuple(args,(char *)"O:Connection_GetPeerAnalyzerid",&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Prelude__Connection, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Connection_GetPeerAnalyzerid" "', argument " "1"" of type '" "Prelude::Connection *""'"); } arg1 = reinterpret_cast< Prelude::Connection * >(argp1); try { result = (uint64_t)(arg1)->GetPeerAnalyzerid(); } catch(Prelude::PreludeError &_e) { SWIG_Python_Raise(SWIG_NewPointerObj((new Prelude::PreludeError(static_cast< const Prelude::PreludeError& >(_e))),SWIGTYPE_p_Prelude__PreludeError,SWIG_POINTER_OWN), "Prelude::PreludeError", SWIGTYPE_p_Prelude__PreludeError); SWIG_fail; } resultobj = SWIG_From_unsigned_SS_long_SS_long(static_cast< unsigned long long >(result)); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_Connection_GetLocalAddr(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; Prelude::Connection *arg1 = (Prelude::Connection *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; char *result = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:Connection_GetLocalAddr",&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Prelude__Connection, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Connection_GetLocalAddr" "', argument " "1"" of type '" "Prelude::Connection *""'"); } arg1 = reinterpret_cast< Prelude::Connection * >(argp1); try { result = (char *)(arg1)->GetLocalAddr(); } catch(Prelude::PreludeError &_e) { SWIG_Python_Raise(SWIG_NewPointerObj((new Prelude::PreludeError(static_cast< const Prelude::PreludeError& >(_e))),SWIGTYPE_p_Prelude__PreludeError,SWIG_POINTER_OWN), "Prelude::PreludeError", SWIGTYPE_p_Prelude__PreludeError); SWIG_fail; } resultobj = SWIG_FromCharPtr((const char *)result); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_Connection_GetLocalPort(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; Prelude::Connection *arg1 = (Prelude::Connection *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; unsigned int result; if (!PyArg_ParseTuple(args,(char *)"O:Connection_GetLocalPort",&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Prelude__Connection, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Connection_GetLocalPort" "', argument " "1"" of type '" "Prelude::Connection *""'"); } arg1 = reinterpret_cast< Prelude::Connection * >(argp1); try { result = (unsigned int)(arg1)->GetLocalPort(); } catch(Prelude::PreludeError &_e) { SWIG_Python_Raise(SWIG_NewPointerObj((new Prelude::PreludeError(static_cast< const Prelude::PreludeError& >(_e))),SWIGTYPE_p_Prelude__PreludeError,SWIG_POINTER_OWN), "Prelude::PreludeError", SWIGTYPE_p_Prelude__PreludeError); SWIG_fail; } resultobj = SWIG_From_unsigned_SS_int(static_cast< unsigned int >(result)); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_Connection_GetPeerAddr(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; Prelude::Connection *arg1 = (Prelude::Connection *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; char *result = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:Connection_GetPeerAddr",&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Prelude__Connection, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Connection_GetPeerAddr" "', argument " "1"" of type '" "Prelude::Connection *""'"); } arg1 = reinterpret_cast< Prelude::Connection * >(argp1); try { result = (char *)(arg1)->GetPeerAddr(); } catch(Prelude::PreludeError &_e) { SWIG_Python_Raise(SWIG_NewPointerObj((new Prelude::PreludeError(static_cast< const Prelude::PreludeError& >(_e))),SWIGTYPE_p_Prelude__PreludeError,SWIG_POINTER_OWN), "Prelude::PreludeError", SWIGTYPE_p_Prelude__PreludeError); SWIG_fail; } resultobj = SWIG_FromCharPtr((const char *)result); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_Connection_GetPeerPort(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; Prelude::Connection *arg1 = (Prelude::Connection *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; unsigned int result; if (!PyArg_ParseTuple(args,(char *)"O:Connection_GetPeerPort",&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Prelude__Connection, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Connection_GetPeerPort" "', argument " "1"" of type '" "Prelude::Connection *""'"); } arg1 = reinterpret_cast< Prelude::Connection * >(argp1); try { result = (unsigned int)(arg1)->GetPeerPort(); } catch(Prelude::PreludeError &_e) { SWIG_Python_Raise(SWIG_NewPointerObj((new Prelude::PreludeError(static_cast< const Prelude::PreludeError& >(_e))),SWIGTYPE_p_Prelude__PreludeError,SWIG_POINTER_OWN), "Prelude::PreludeError", SWIGTYPE_p_Prelude__PreludeError); SWIG_fail; } resultobj = SWIG_From_unsigned_SS_int(static_cast< unsigned int >(result)); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_Connection_IsAlive(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; Prelude::Connection *arg1 = (Prelude::Connection *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; bool result; if (!PyArg_ParseTuple(args,(char *)"O:Connection_IsAlive",&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Prelude__Connection, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Connection_IsAlive" "', argument " "1"" of type '" "Prelude::Connection *""'"); } arg1 = reinterpret_cast< Prelude::Connection * >(argp1); try { result = (bool)(arg1)->IsAlive(); } catch(Prelude::PreludeError &_e) { SWIG_Python_Raise(SWIG_NewPointerObj((new Prelude::PreludeError(static_cast< const Prelude::PreludeError& >(_e))),SWIGTYPE_p_Prelude__PreludeError,SWIG_POINTER_OWN), "Prelude::PreludeError", SWIGTYPE_p_Prelude__PreludeError); SWIG_fail; } resultobj = SWIG_From_bool(static_cast< bool >(result)); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_Connection_GetFd(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; Prelude::Connection *arg1 = (Prelude::Connection *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; int result; if (!PyArg_ParseTuple(args,(char *)"O:Connection_GetFd",&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Prelude__Connection, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Connection_GetFd" "', argument " "1"" of type '" "Prelude::Connection *""'"); } arg1 = reinterpret_cast< Prelude::Connection * >(argp1); try { result = (int)(arg1)->GetFd(); } catch(Prelude::PreludeError &_e) { SWIG_Python_Raise(SWIG_NewPointerObj((new Prelude::PreludeError(static_cast< const Prelude::PreludeError& >(_e))),SWIGTYPE_p_Prelude__PreludeError,SWIG_POINTER_OWN), "Prelude::PreludeError", SWIGTYPE_p_Prelude__PreludeError); SWIG_fail; } resultobj = SWIG_From_int(static_cast< int >(result)); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_Connection_RecvIDMEF(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; Prelude::Connection *arg1 = (Prelude::Connection *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; Prelude::IDMEF result; if (!PyArg_ParseTuple(args,(char *)"O:Connection_RecvIDMEF",&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Prelude__Connection, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Connection_RecvIDMEF" "', argument " "1"" of type '" "Prelude::Connection *""'"); } arg1 = reinterpret_cast< Prelude::Connection * >(argp1); try { result = (arg1)->RecvIDMEF(); } catch(Prelude::PreludeError &_e) { SWIG_Python_Raise(SWIG_NewPointerObj((new Prelude::PreludeError(static_cast< const Prelude::PreludeError& >(_e))),SWIGTYPE_p_Prelude__PreludeError,SWIG_POINTER_OWN), "Prelude::PreludeError", SWIGTYPE_p_Prelude__PreludeError); SWIG_fail; } resultobj = SWIG_NewPointerObj((new Prelude::IDMEF(static_cast< const Prelude::IDMEF& >(result))), SWIGTYPE_p_Prelude__IDMEF, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *Connection_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *obj; if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL; SWIG_TypeNewClientData(SWIGTYPE_p_Prelude__Connection, SWIG_NewClientData(obj)); return SWIG_Py_Void(); } SWIGINTERN PyObject *_wrap_delete_ConnectionPool(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; Prelude::ConnectionPool *arg1 = (Prelude::ConnectionPool *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:delete_ConnectionPool",&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Prelude__ConnectionPool, SWIG_POINTER_DISOWN | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_ConnectionPool" "', argument " "1"" of type '" "Prelude::ConnectionPool *""'"); } arg1 = reinterpret_cast< Prelude::ConnectionPool * >(argp1); delete arg1; resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_new_ConnectionPool__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; Prelude::ConnectionPool *result = 0 ; if (!PyArg_ParseTuple(args,(char *)":new_ConnectionPool")) SWIG_fail; try { result = (Prelude::ConnectionPool *)new Prelude::ConnectionPool(); } catch(Prelude::PreludeError &_e) { SWIG_Python_Raise(SWIG_NewPointerObj((new Prelude::PreludeError(static_cast< const Prelude::PreludeError& >(_e))),SWIGTYPE_p_Prelude__PreludeError,SWIG_POINTER_OWN), "Prelude::PreludeError", SWIGTYPE_p_Prelude__PreludeError); SWIG_fail; } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Prelude__ConnectionPool, SWIG_POINTER_NEW | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_new_ConnectionPool__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; prelude_connection_pool_t *arg1 = (prelude_connection_pool_t *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; Prelude::ConnectionPool *result = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:new_ConnectionPool",&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_prelude_connection_pool_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_ConnectionPool" "', argument " "1"" of type '" "prelude_connection_pool_t *""'"); } arg1 = reinterpret_cast< prelude_connection_pool_t * >(argp1); try { result = (Prelude::ConnectionPool *)new Prelude::ConnectionPool(arg1); } catch(Prelude::PreludeError &_e) { SWIG_Python_Raise(SWIG_NewPointerObj((new Prelude::PreludeError(static_cast< const Prelude::PreludeError& >(_e))),SWIGTYPE_p_Prelude__PreludeError,SWIG_POINTER_OWN), "Prelude::PreludeError", SWIGTYPE_p_Prelude__PreludeError); SWIG_fail; } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Prelude__ConnectionPool, SWIG_POINTER_NEW | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_new_ConnectionPool__SWIG_2(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; Prelude::ConnectionPool *arg1 = 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; Prelude::ConnectionPool *result = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:new_ConnectionPool",&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1, SWIGTYPE_p_Prelude__ConnectionPool, 0 | 0); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_ConnectionPool" "', argument " "1"" of type '" "Prelude::ConnectionPool const &""'"); } if (!argp1) { SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_ConnectionPool" "', argument " "1"" of type '" "Prelude::ConnectionPool const &""'"); } arg1 = reinterpret_cast< Prelude::ConnectionPool * >(argp1); try { result = (Prelude::ConnectionPool *)new Prelude::ConnectionPool((Prelude::ConnectionPool const &)*arg1); } catch(Prelude::PreludeError &_e) { SWIG_Python_Raise(SWIG_NewPointerObj((new Prelude::PreludeError(static_cast< const Prelude::PreludeError& >(_e))),SWIGTYPE_p_Prelude__PreludeError,SWIG_POINTER_OWN), "Prelude::PreludeError", SWIGTYPE_p_Prelude__PreludeError); SWIG_fail; } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Prelude__ConnectionPool, SWIG_POINTER_NEW | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_new_ConnectionPool__SWIG_3(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; Prelude::ClientProfile *arg1 = 0 ; int arg2 ; void *argp1 = 0 ; int res1 = 0 ; int val2 ; int ecode2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; Prelude::ConnectionPool *result = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:new_ConnectionPool",&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1, SWIGTYPE_p_Prelude__ClientProfile, 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_ConnectionPool" "', argument " "1"" of type '" "Prelude::ClientProfile &""'"); } if (!argp1) { SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_ConnectionPool" "', argument " "1"" of type '" "Prelude::ClientProfile &""'"); } arg1 = reinterpret_cast< Prelude::ClientProfile * >(argp1); ecode2 = SWIG_AsVal_int(obj1, &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_ConnectionPool" "', argument " "2"" of type '" "int""'"); } arg2 = static_cast< int >(val2); try { result = (Prelude::ConnectionPool *)new Prelude::ConnectionPool(*arg1,arg2); } catch(Prelude::PreludeError &_e) { SWIG_Python_Raise(SWIG_NewPointerObj((new Prelude::PreludeError(static_cast< const Prelude::PreludeError& >(_e))),SWIGTYPE_p_Prelude__PreludeError,SWIG_POINTER_OWN), "Prelude::PreludeError", SWIGTYPE_p_Prelude__PreludeError); SWIG_fail; } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Prelude__ConnectionPool, SWIG_POINTER_NEW | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_new_ConnectionPool(PyObject *self, PyObject *args) { int argc; PyObject *argv[3]; int ii; if (!PyTuple_Check(args)) SWIG_fail; argc = (int)PyObject_Length(args); for (ii = 0; (ii < argc) && (ii < 2); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } if (argc == 0) { return _wrap_new_ConnectionPool__SWIG_0(self, args); } if (argc == 1) { int _v; void *vptr = 0; int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_prelude_connection_pool_t, 0); _v = SWIG_CheckState(res); if (_v) { return _wrap_new_ConnectionPool__SWIG_1(self, args); } } if (argc == 1) { int _v; int res = SWIG_ConvertPtr(argv[0], 0, SWIGTYPE_p_Prelude__ConnectionPool, 0); _v = SWIG_CheckState(res); if (_v) { return _wrap_new_ConnectionPool__SWIG_2(self, args); } } if (argc == 2) { int _v; void *vptr = 0; int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_Prelude__ClientProfile, 0); _v = SWIG_CheckState(res); if (_v) { { int res = SWIG_AsVal_int(argv[1], NULL); _v = SWIG_CheckState(res); } if (_v) { return _wrap_new_ConnectionPool__SWIG_3(self, args); } } } fail: SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'new_ConnectionPool'.\n" " Possible C/C++ prototypes are:\n" " Prelude::ConnectionPool()\n" " Prelude::ConnectionPool(prelude_connection_pool_t *)\n" " Prelude::ConnectionPool(Prelude::ConnectionPool const &)\n" " Prelude::ConnectionPool(Prelude::ClientProfile &,int)\n"); return NULL; } SWIGINTERN PyObject *_wrap_ConnectionPool_Init(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; Prelude::ConnectionPool *arg1 = (Prelude::ConnectionPool *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:ConnectionPool_Init",&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Prelude__ConnectionPool, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ConnectionPool_Init" "', argument " "1"" of type '" "Prelude::ConnectionPool *""'"); } arg1 = reinterpret_cast< Prelude::ConnectionPool * >(argp1); try { (arg1)->Init(); } catch(Prelude::PreludeError &_e) { SWIG_Python_Raise(SWIG_NewPointerObj((new Prelude::PreludeError(static_cast< const Prelude::PreludeError& >(_e))),SWIGTYPE_p_Prelude__PreludeError,SWIG_POINTER_OWN), "Prelude::PreludeError", SWIGTYPE_p_Prelude__PreludeError); SWIG_fail; } resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_ConnectionPool_SetConnectionString(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; Prelude::ConnectionPool *arg1 = (Prelude::ConnectionPool *) 0 ; char *arg2 = (char *) 0 ; void *argp1 = 0 ; int res1 = 0 ; int res2 ; char *buf2 = 0 ; int alloc2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:ConnectionPool_SetConnectionString",&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Prelude__ConnectionPool, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ConnectionPool_SetConnectionString" "', argument " "1"" of type '" "Prelude::ConnectionPool *""'"); } arg1 = reinterpret_cast< Prelude::ConnectionPool * >(argp1); res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ConnectionPool_SetConnectionString" "', argument " "2"" of type '" "char const *""'"); } arg2 = reinterpret_cast< char * >(buf2); try { (arg1)->SetConnectionString((char const *)arg2); } catch(Prelude::PreludeError &_e) { SWIG_Python_Raise(SWIG_NewPointerObj((new Prelude::PreludeError(static_cast< const Prelude::PreludeError& >(_e))),SWIGTYPE_p_Prelude__PreludeError,SWIG_POINTER_OWN), "Prelude::PreludeError", SWIGTYPE_p_Prelude__PreludeError); SWIG_fail; } resultobj = SWIG_Py_Void(); if (alloc2 == SWIG_NEWOBJ) delete[] buf2; return resultobj; fail: if (alloc2 == SWIG_NEWOBJ) delete[] buf2; return NULL; } SWIGINTERN PyObject *_wrap_ConnectionPool_GetConnectionString(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; Prelude::ConnectionPool *arg1 = (Prelude::ConnectionPool *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; char *result = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:ConnectionPool_GetConnectionString",&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Prelude__ConnectionPool, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ConnectionPool_GetConnectionString" "', argument " "1"" of type '" "Prelude::ConnectionPool *""'"); } arg1 = reinterpret_cast< Prelude::ConnectionPool * >(argp1); try { result = (char *)(arg1)->GetConnectionString(); } catch(Prelude::PreludeError &_e) { SWIG_Python_Raise(SWIG_NewPointerObj((new Prelude::PreludeError(static_cast< const Prelude::PreludeError& >(_e))),SWIGTYPE_p_Prelude__PreludeError,SWIG_POINTER_OWN), "Prelude::PreludeError", SWIGTYPE_p_Prelude__PreludeError); SWIG_fail; } resultobj = SWIG_FromCharPtr((const char *)result); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_ConnectionPool_GetConnectionList(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; Prelude::ConnectionPool *arg1 = (Prelude::ConnectionPool *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; std::vector< Prelude::Connection,std::allocator< Prelude::Connection > > result; if (!PyArg_ParseTuple(args,(char *)"O:ConnectionPool_GetConnectionList",&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Prelude__ConnectionPool, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ConnectionPool_GetConnectionList" "', argument " "1"" of type '" "Prelude::ConnectionPool *""'"); } arg1 = reinterpret_cast< Prelude::ConnectionPool * >(argp1); try { result = (arg1)->GetConnectionList(); } catch(Prelude::PreludeError &_e) { SWIG_Python_Raise(SWIG_NewPointerObj((new Prelude::PreludeError(static_cast< const Prelude::PreludeError& >(_e))),SWIGTYPE_p_Prelude__PreludeError,SWIG_POINTER_OWN), "Prelude::PreludeError", SWIGTYPE_p_Prelude__PreludeError); SWIG_fail; } resultobj = swig::from(static_cast< std::vector > >(result)); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_ConnectionPool_SetFlags(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; Prelude::ConnectionPool *arg1 = (Prelude::ConnectionPool *) 0 ; int arg2 ; void *argp1 = 0 ; int res1 = 0 ; int val2 ; int ecode2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:ConnectionPool_SetFlags",&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Prelude__ConnectionPool, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ConnectionPool_SetFlags" "', argument " "1"" of type '" "Prelude::ConnectionPool *""'"); } arg1 = reinterpret_cast< Prelude::ConnectionPool * >(argp1); ecode2 = SWIG_AsVal_int(obj1, &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ConnectionPool_SetFlags" "', argument " "2"" of type '" "int""'"); } arg2 = static_cast< int >(val2); try { (arg1)->SetFlags(arg2); } catch(Prelude::PreludeError &_e) { SWIG_Python_Raise(SWIG_NewPointerObj((new Prelude::PreludeError(static_cast< const Prelude::PreludeError& >(_e))),SWIGTYPE_p_Prelude__PreludeError,SWIG_POINTER_OWN), "Prelude::PreludeError", SWIGTYPE_p_Prelude__PreludeError); SWIG_fail; } resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_ConnectionPool_GetFlags(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; Prelude::ConnectionPool *arg1 = (Prelude::ConnectionPool *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; int result; if (!PyArg_ParseTuple(args,(char *)"O:ConnectionPool_GetFlags",&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Prelude__ConnectionPool, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ConnectionPool_GetFlags" "', argument " "1"" of type '" "Prelude::ConnectionPool *""'"); } arg1 = reinterpret_cast< Prelude::ConnectionPool * >(argp1); try { result = (int)(arg1)->GetFlags(); } catch(Prelude::PreludeError &_e) { SWIG_Python_Raise(SWIG_NewPointerObj((new Prelude::PreludeError(static_cast< const Prelude::PreludeError& >(_e))),SWIGTYPE_p_Prelude__PreludeError,SWIG_POINTER_OWN), "Prelude::PreludeError", SWIGTYPE_p_Prelude__PreludeError); SWIG_fail; } resultobj = SWIG_From_int(static_cast< int >(result)); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_ConnectionPool_SetData(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; Prelude::ConnectionPool *arg1 = (Prelude::ConnectionPool *) 0 ; void *arg2 = (void *) 0 ; void *argp1 = 0 ; int res1 = 0 ; int res2 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:ConnectionPool_SetData",&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Prelude__ConnectionPool, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ConnectionPool_SetData" "', argument " "1"" of type '" "Prelude::ConnectionPool *""'"); } arg1 = reinterpret_cast< Prelude::ConnectionPool * >(argp1); res2 = SWIG_ConvertPtr(obj1,SWIG_as_voidptrptr(&arg2), 0, 0); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ConnectionPool_SetData" "', argument " "2"" of type '" "void *""'"); } try { (arg1)->SetData(arg2); } catch(Prelude::PreludeError &_e) { SWIG_Python_Raise(SWIG_NewPointerObj((new Prelude::PreludeError(static_cast< const Prelude::PreludeError& >(_e))),SWIGTYPE_p_Prelude__PreludeError,SWIG_POINTER_OWN), "Prelude::PreludeError", SWIGTYPE_p_Prelude__PreludeError); SWIG_fail; } resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_ConnectionPool_GetData(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; Prelude::ConnectionPool *arg1 = (Prelude::ConnectionPool *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; void *result = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:ConnectionPool_GetData",&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Prelude__ConnectionPool, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ConnectionPool_GetData" "', argument " "1"" of type '" "Prelude::ConnectionPool *""'"); } arg1 = reinterpret_cast< Prelude::ConnectionPool * >(argp1); try { result = (void *)(arg1)->GetData(); } catch(Prelude::PreludeError &_e) { SWIG_Python_Raise(SWIG_NewPointerObj((new Prelude::PreludeError(static_cast< const Prelude::PreludeError& >(_e))),SWIGTYPE_p_Prelude__PreludeError,SWIG_POINTER_OWN), "Prelude::PreludeError", SWIGTYPE_p_Prelude__PreludeError); SWIG_fail; } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_void, 0 | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_ConnectionPool_AddConnection(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; Prelude::ConnectionPool *arg1 = (Prelude::ConnectionPool *) 0 ; Prelude::Connection arg2 ; void *argp1 = 0 ; int res1 = 0 ; void *argp2 ; int res2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:ConnectionPool_AddConnection",&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Prelude__ConnectionPool, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ConnectionPool_AddConnection" "', argument " "1"" of type '" "Prelude::ConnectionPool *""'"); } arg1 = reinterpret_cast< Prelude::ConnectionPool * >(argp1); { res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_Prelude__Connection, 0 | 0); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ConnectionPool_AddConnection" "', argument " "2"" of type '" "Prelude::Connection""'"); } if (!argp2) { SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "ConnectionPool_AddConnection" "', argument " "2"" of type '" "Prelude::Connection""'"); } else { Prelude::Connection * temp = reinterpret_cast< Prelude::Connection * >(argp2); arg2 = *temp; if (SWIG_IsNewObj(res2)) delete temp; } } try { (arg1)->AddConnection(arg2); } catch(Prelude::PreludeError &_e) { SWIG_Python_Raise(SWIG_NewPointerObj((new Prelude::PreludeError(static_cast< const Prelude::PreludeError& >(_e))),SWIGTYPE_p_Prelude__PreludeError,SWIG_POINTER_OWN), "Prelude::PreludeError", SWIGTYPE_p_Prelude__PreludeError); SWIG_fail; } resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_ConnectionPool_DelConnection(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; Prelude::ConnectionPool *arg1 = (Prelude::ConnectionPool *) 0 ; Prelude::Connection arg2 ; void *argp1 = 0 ; int res1 = 0 ; void *argp2 ; int res2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:ConnectionPool_DelConnection",&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Prelude__ConnectionPool, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ConnectionPool_DelConnection" "', argument " "1"" of type '" "Prelude::ConnectionPool *""'"); } arg1 = reinterpret_cast< Prelude::ConnectionPool * >(argp1); { res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_Prelude__Connection, 0 | 0); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ConnectionPool_DelConnection" "', argument " "2"" of type '" "Prelude::Connection""'"); } if (!argp2) { SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "ConnectionPool_DelConnection" "', argument " "2"" of type '" "Prelude::Connection""'"); } else { Prelude::Connection * temp = reinterpret_cast< Prelude::Connection * >(argp2); arg2 = *temp; if (SWIG_IsNewObj(res2)) delete temp; } } try { (arg1)->DelConnection(arg2); } catch(Prelude::PreludeError &_e) { SWIG_Python_Raise(SWIG_NewPointerObj((new Prelude::PreludeError(static_cast< const Prelude::PreludeError& >(_e))),SWIGTYPE_p_Prelude__PreludeError,SWIG_POINTER_OWN), "Prelude::PreludeError", SWIGTYPE_p_Prelude__PreludeError); SWIG_fail; } resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_ConnectionPool_SetConnectionAlive(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; Prelude::ConnectionPool *arg1 = (Prelude::ConnectionPool *) 0 ; Prelude::Connection *arg2 = 0 ; void *argp1 = 0 ; int res1 = 0 ; void *argp2 = 0 ; int res2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:ConnectionPool_SetConnectionAlive",&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Prelude__ConnectionPool, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ConnectionPool_SetConnectionAlive" "', argument " "1"" of type '" "Prelude::ConnectionPool *""'"); } arg1 = reinterpret_cast< Prelude::ConnectionPool * >(argp1); res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_Prelude__Connection, 0 ); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ConnectionPool_SetConnectionAlive" "', argument " "2"" of type '" "Prelude::Connection &""'"); } if (!argp2) { SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "ConnectionPool_SetConnectionAlive" "', argument " "2"" of type '" "Prelude::Connection &""'"); } arg2 = reinterpret_cast< Prelude::Connection * >(argp2); try { (arg1)->SetConnectionAlive(*arg2); } catch(Prelude::PreludeError &_e) { SWIG_Python_Raise(SWIG_NewPointerObj((new Prelude::PreludeError(static_cast< const Prelude::PreludeError& >(_e))),SWIGTYPE_p_Prelude__PreludeError,SWIG_POINTER_OWN), "Prelude::PreludeError", SWIGTYPE_p_Prelude__PreludeError); SWIG_fail; } resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_ConnectionPool_SetConnectionDead(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; Prelude::ConnectionPool *arg1 = (Prelude::ConnectionPool *) 0 ; Prelude::Connection *arg2 = 0 ; void *argp1 = 0 ; int res1 = 0 ; void *argp2 = 0 ; int res2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:ConnectionPool_SetConnectionDead",&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Prelude__ConnectionPool, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ConnectionPool_SetConnectionDead" "', argument " "1"" of type '" "Prelude::ConnectionPool *""'"); } arg1 = reinterpret_cast< Prelude::ConnectionPool * >(argp1); res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_Prelude__Connection, 0 ); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ConnectionPool_SetConnectionDead" "', argument " "2"" of type '" "Prelude::Connection &""'"); } if (!argp2) { SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "ConnectionPool_SetConnectionDead" "', argument " "2"" of type '" "Prelude::Connection &""'"); } arg2 = reinterpret_cast< Prelude::Connection * >(argp2); try { (arg1)->SetConnectionDead(*arg2); } catch(Prelude::PreludeError &_e) { SWIG_Python_Raise(SWIG_NewPointerObj((new Prelude::PreludeError(static_cast< const Prelude::PreludeError& >(_e))),SWIGTYPE_p_Prelude__PreludeError,SWIG_POINTER_OWN), "Prelude::PreludeError", SWIGTYPE_p_Prelude__PreludeError); SWIG_fail; } resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_ConnectionPool_SetRequiredPermission(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; Prelude::ConnectionPool *arg1 = (Prelude::ConnectionPool *) 0 ; int arg2 ; void *argp1 = 0 ; int res1 = 0 ; int val2 ; int ecode2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:ConnectionPool_SetRequiredPermission",&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Prelude__ConnectionPool, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ConnectionPool_SetRequiredPermission" "', argument " "1"" of type '" "Prelude::ConnectionPool *""'"); } arg1 = reinterpret_cast< Prelude::ConnectionPool * >(argp1); ecode2 = SWIG_AsVal_int(obj1, &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ConnectionPool_SetRequiredPermission" "', argument " "2"" of type '" "int""'"); } arg2 = static_cast< int >(val2); try { (arg1)->SetRequiredPermission(arg2); } catch(Prelude::PreludeError &_e) { SWIG_Python_Raise(SWIG_NewPointerObj((new Prelude::PreludeError(static_cast< const Prelude::PreludeError& >(_e))),SWIGTYPE_p_Prelude__PreludeError,SWIG_POINTER_OWN), "Prelude::PreludeError", SWIGTYPE_p_Prelude__PreludeError); SWIG_fail; } resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *ConnectionPool_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *obj; if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL; SWIG_TypeNewClientData(SWIGTYPE_p_Prelude__ConnectionPool, SWIG_NewClientData(obj)); return SWIG_Py_Void(); } SWIGINTERN PyObject *_wrap_new_ClientProfile__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; Prelude::ClientProfile *result = 0 ; if (!PyArg_ParseTuple(args,(char *)":new_ClientProfile")) SWIG_fail; try { result = (Prelude::ClientProfile *)new Prelude::ClientProfile(); } catch(Prelude::PreludeError &_e) { SWIG_Python_Raise(SWIG_NewPointerObj((new Prelude::PreludeError(static_cast< const Prelude::PreludeError& >(_e))),SWIGTYPE_p_Prelude__PreludeError,SWIG_POINTER_OWN), "Prelude::PreludeError", SWIGTYPE_p_Prelude__PreludeError); SWIG_fail; } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Prelude__ClientProfile, SWIG_POINTER_NEW | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_new_ClientProfile__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; char *arg1 = (char *) 0 ; int res1 ; char *buf1 = 0 ; int alloc1 = 0 ; PyObject * obj0 = 0 ; Prelude::ClientProfile *result = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:new_ClientProfile",&obj0)) SWIG_fail; res1 = SWIG_AsCharPtrAndSize(obj0, &buf1, NULL, &alloc1); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_ClientProfile" "', argument " "1"" of type '" "char const *""'"); } arg1 = reinterpret_cast< char * >(buf1); try { result = (Prelude::ClientProfile *)new Prelude::ClientProfile((char const *)arg1); } catch(Prelude::PreludeError &_e) { SWIG_Python_Raise(SWIG_NewPointerObj((new Prelude::PreludeError(static_cast< const Prelude::PreludeError& >(_e))),SWIGTYPE_p_Prelude__PreludeError,SWIG_POINTER_OWN), "Prelude::PreludeError", SWIGTYPE_p_Prelude__PreludeError); SWIG_fail; } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Prelude__ClientProfile, SWIG_POINTER_NEW | 0 ); if (alloc1 == SWIG_NEWOBJ) delete[] buf1; return resultobj; fail: if (alloc1 == SWIG_NEWOBJ) delete[] buf1; return NULL; } SWIGINTERN PyObject *_wrap_new_ClientProfile__SWIG_2(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; prelude_client_profile_t *arg1 = (prelude_client_profile_t *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; Prelude::ClientProfile *result = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:new_ClientProfile",&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_prelude_client_profile_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_ClientProfile" "', argument " "1"" of type '" "prelude_client_profile_t *""'"); } arg1 = reinterpret_cast< prelude_client_profile_t * >(argp1); try { result = (Prelude::ClientProfile *)new Prelude::ClientProfile(arg1); } catch(Prelude::PreludeError &_e) { SWIG_Python_Raise(SWIG_NewPointerObj((new Prelude::PreludeError(static_cast< const Prelude::PreludeError& >(_e))),SWIGTYPE_p_Prelude__PreludeError,SWIG_POINTER_OWN), "Prelude::PreludeError", SWIGTYPE_p_Prelude__PreludeError); SWIG_fail; } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Prelude__ClientProfile, SWIG_POINTER_NEW | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_new_ClientProfile__SWIG_3(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; Prelude::ClientProfile *arg1 = 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; Prelude::ClientProfile *result = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:new_ClientProfile",&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1, SWIGTYPE_p_Prelude__ClientProfile, 0 | 0); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_ClientProfile" "', argument " "1"" of type '" "Prelude::ClientProfile const &""'"); } if (!argp1) { SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_ClientProfile" "', argument " "1"" of type '" "Prelude::ClientProfile const &""'"); } arg1 = reinterpret_cast< Prelude::ClientProfile * >(argp1); try { result = (Prelude::ClientProfile *)new Prelude::ClientProfile((Prelude::ClientProfile const &)*arg1); } catch(Prelude::PreludeError &_e) { SWIG_Python_Raise(SWIG_NewPointerObj((new Prelude::PreludeError(static_cast< const Prelude::PreludeError& >(_e))),SWIGTYPE_p_Prelude__PreludeError,SWIG_POINTER_OWN), "Prelude::PreludeError", SWIGTYPE_p_Prelude__PreludeError); SWIG_fail; } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Prelude__ClientProfile, SWIG_POINTER_NEW | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_new_ClientProfile(PyObject *self, PyObject *args) { int argc; PyObject *argv[2]; int ii; if (!PyTuple_Check(args)) SWIG_fail; argc = (int)PyObject_Length(args); for (ii = 0; (ii < argc) && (ii < 1); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } if (argc == 0) { return _wrap_new_ClientProfile__SWIG_0(self, args); } if (argc == 1) { int _v; void *vptr = 0; int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_prelude_client_profile_t, 0); _v = SWIG_CheckState(res); if (_v) { return _wrap_new_ClientProfile__SWIG_2(self, args); } } if (argc == 1) { int _v; int res = SWIG_ConvertPtr(argv[0], 0, SWIGTYPE_p_Prelude__ClientProfile, 0); _v = SWIG_CheckState(res); if (_v) { return _wrap_new_ClientProfile__SWIG_3(self, args); } } if (argc == 1) { int _v; int res = SWIG_AsCharPtrAndSize(argv[0], 0, NULL, 0); _v = SWIG_CheckState(res); if (_v) { return _wrap_new_ClientProfile__SWIG_1(self, args); } } fail: SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'new_ClientProfile'.\n" " Possible C/C++ prototypes are:\n" " Prelude::ClientProfile()\n" " Prelude::ClientProfile(char const *)\n" " Prelude::ClientProfile(prelude_client_profile_t *)\n" " Prelude::ClientProfile(Prelude::ClientProfile const &)\n"); return NULL; } SWIGINTERN PyObject *_wrap_delete_ClientProfile(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; Prelude::ClientProfile *arg1 = (Prelude::ClientProfile *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:delete_ClientProfile",&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Prelude__ClientProfile, SWIG_POINTER_DISOWN | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_ClientProfile" "', argument " "1"" of type '" "Prelude::ClientProfile *""'"); } arg1 = reinterpret_cast< Prelude::ClientProfile * >(argp1); delete arg1; resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_ClientProfile_GetUid(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; Prelude::ClientProfile *arg1 = (Prelude::ClientProfile *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; int result; if (!PyArg_ParseTuple(args,(char *)"O:ClientProfile_GetUid",&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Prelude__ClientProfile, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ClientProfile_GetUid" "', argument " "1"" of type '" "Prelude::ClientProfile *""'"); } arg1 = reinterpret_cast< Prelude::ClientProfile * >(argp1); try { result = (int)(arg1)->GetUid(); } catch(Prelude::PreludeError &_e) { SWIG_Python_Raise(SWIG_NewPointerObj((new Prelude::PreludeError(static_cast< const Prelude::PreludeError& >(_e))),SWIGTYPE_p_Prelude__PreludeError,SWIG_POINTER_OWN), "Prelude::PreludeError", SWIGTYPE_p_Prelude__PreludeError); SWIG_fail; } resultobj = SWIG_From_int(static_cast< int >(result)); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_ClientProfile_GetGid(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; Prelude::ClientProfile *arg1 = (Prelude::ClientProfile *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; int result; if (!PyArg_ParseTuple(args,(char *)"O:ClientProfile_GetGid",&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Prelude__ClientProfile, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ClientProfile_GetGid" "', argument " "1"" of type '" "Prelude::ClientProfile *""'"); } arg1 = reinterpret_cast< Prelude::ClientProfile * >(argp1); try { result = (int)(arg1)->GetGid(); } catch(Prelude::PreludeError &_e) { SWIG_Python_Raise(SWIG_NewPointerObj((new Prelude::PreludeError(static_cast< const Prelude::PreludeError& >(_e))),SWIGTYPE_p_Prelude__PreludeError,SWIG_POINTER_OWN), "Prelude::PreludeError", SWIGTYPE_p_Prelude__PreludeError); SWIG_fail; } resultobj = SWIG_From_int(static_cast< int >(result)); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_ClientProfile_GetName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; Prelude::ClientProfile *arg1 = (Prelude::ClientProfile *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; char *result = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:ClientProfile_GetName",&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Prelude__ClientProfile, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ClientProfile_GetName" "', argument " "1"" of type '" "Prelude::ClientProfile *""'"); } arg1 = reinterpret_cast< Prelude::ClientProfile * >(argp1); try { result = (char *)(arg1)->GetName(); } catch(Prelude::PreludeError &_e) { SWIG_Python_Raise(SWIG_NewPointerObj((new Prelude::PreludeError(static_cast< const Prelude::PreludeError& >(_e))),SWIGTYPE_p_Prelude__PreludeError,SWIG_POINTER_OWN), "Prelude::PreludeError", SWIGTYPE_p_Prelude__PreludeError); SWIG_fail; } resultobj = SWIG_FromCharPtr((const char *)result); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_ClientProfile_SetName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; Prelude::ClientProfile *arg1 = (Prelude::ClientProfile *) 0 ; char *arg2 = (char *) 0 ; void *argp1 = 0 ; int res1 = 0 ; int res2 ; char *buf2 = 0 ; int alloc2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; int result; if (!PyArg_ParseTuple(args,(char *)"OO:ClientProfile_SetName",&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Prelude__ClientProfile, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ClientProfile_SetName" "', argument " "1"" of type '" "Prelude::ClientProfile *""'"); } arg1 = reinterpret_cast< Prelude::ClientProfile * >(argp1); res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ClientProfile_SetName" "', argument " "2"" of type '" "char const *""'"); } arg2 = reinterpret_cast< char * >(buf2); try { result = (int)(arg1)->SetName((char const *)arg2); } catch(Prelude::PreludeError &_e) { SWIG_Python_Raise(SWIG_NewPointerObj((new Prelude::PreludeError(static_cast< const Prelude::PreludeError& >(_e))),SWIGTYPE_p_Prelude__PreludeError,SWIG_POINTER_OWN), "Prelude::PreludeError", SWIGTYPE_p_Prelude__PreludeError); SWIG_fail; } resultobj = SWIG_From_int(static_cast< int >(result)); if (alloc2 == SWIG_NEWOBJ) delete[] buf2; return resultobj; fail: if (alloc2 == SWIG_NEWOBJ) delete[] buf2; return NULL; } SWIGINTERN PyObject *_wrap_ClientProfile_GetAnalyzerId__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; Prelude::ClientProfile *arg1 = (Prelude::ClientProfile *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; uint64_t result; if (!PyArg_ParseTuple(args,(char *)"O:ClientProfile_GetAnalyzerId",&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Prelude__ClientProfile, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ClientProfile_GetAnalyzerId" "', argument " "1"" of type '" "Prelude::ClientProfile *""'"); } arg1 = reinterpret_cast< Prelude::ClientProfile * >(argp1); try { result = (uint64_t)(arg1)->GetAnalyzerId(); } catch(Prelude::PreludeError &_e) { SWIG_Python_Raise(SWIG_NewPointerObj((new Prelude::PreludeError(static_cast< const Prelude::PreludeError& >(_e))),SWIGTYPE_p_Prelude__PreludeError,SWIG_POINTER_OWN), "Prelude::PreludeError", SWIGTYPE_p_Prelude__PreludeError); SWIG_fail; } resultobj = SWIG_From_unsigned_SS_long_SS_long(static_cast< unsigned long long >(result)); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_ClientProfile_GetAnalyzerId__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; Prelude::ClientProfile *arg1 = (Prelude::ClientProfile *) 0 ; uint64_t arg2 ; void *argp1 = 0 ; int res1 = 0 ; unsigned long long val2 ; int ecode2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:ClientProfile_GetAnalyzerId",&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Prelude__ClientProfile, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ClientProfile_GetAnalyzerId" "', argument " "1"" of type '" "Prelude::ClientProfile *""'"); } arg1 = reinterpret_cast< Prelude::ClientProfile * >(argp1); ecode2 = SWIG_AsVal_unsigned_SS_long_SS_long(obj1, &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ClientProfile_GetAnalyzerId" "', argument " "2"" of type '" "uint64_t""'"); } arg2 = static_cast< uint64_t >(val2); try { (arg1)->GetAnalyzerId(arg2); } catch(Prelude::PreludeError &_e) { SWIG_Python_Raise(SWIG_NewPointerObj((new Prelude::PreludeError(static_cast< const Prelude::PreludeError& >(_e))),SWIGTYPE_p_Prelude__PreludeError,SWIG_POINTER_OWN), "Prelude::PreludeError", SWIGTYPE_p_Prelude__PreludeError); SWIG_fail; } resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_ClientProfile_GetAnalyzerId(PyObject *self, PyObject *args) { int argc; PyObject *argv[3]; int ii; if (!PyTuple_Check(args)) SWIG_fail; argc = (int)PyObject_Length(args); for (ii = 0; (ii < argc) && (ii < 2); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } if (argc == 1) { int _v; void *vptr = 0; int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_Prelude__ClientProfile, 0); _v = SWIG_CheckState(res); if (_v) { return _wrap_ClientProfile_GetAnalyzerId__SWIG_0(self, args); } } if (argc == 2) { int _v; void *vptr = 0; int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_Prelude__ClientProfile, 0); _v = SWIG_CheckState(res); if (_v) { { int res = SWIG_AsVal_unsigned_SS_long_SS_long(argv[1], NULL); _v = SWIG_CheckState(res); } if (_v) { return _wrap_ClientProfile_GetAnalyzerId__SWIG_1(self, args); } } } fail: SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'ClientProfile_GetAnalyzerId'.\n" " Possible C/C++ prototypes are:\n" " GetAnalyzerId(Prelude::ClientProfile *)\n" " GetAnalyzerId(Prelude::ClientProfile *,uint64_t)\n"); return NULL; } SWIGINTERN PyObject *_wrap_ClientProfile_GetConfigFilename(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; Prelude::ClientProfile *arg1 = (Prelude::ClientProfile *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; std::string result; if (!PyArg_ParseTuple(args,(char *)"O:ClientProfile_GetConfigFilename",&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Prelude__ClientProfile, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ClientProfile_GetConfigFilename" "', argument " "1"" of type '" "Prelude::ClientProfile *""'"); } arg1 = reinterpret_cast< Prelude::ClientProfile * >(argp1); try { result = (arg1)->GetConfigFilename(); } catch(Prelude::PreludeError &_e) { SWIG_Python_Raise(SWIG_NewPointerObj((new Prelude::PreludeError(static_cast< const Prelude::PreludeError& >(_e))),SWIGTYPE_p_Prelude__PreludeError,SWIG_POINTER_OWN), "Prelude::PreludeError", SWIGTYPE_p_Prelude__PreludeError); SWIG_fail; } resultobj = SWIG_From_std_string(static_cast< std::string >(result)); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_ClientProfile_GetAnalyzeridFilename(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; Prelude::ClientProfile *arg1 = (Prelude::ClientProfile *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; std::string result; if (!PyArg_ParseTuple(args,(char *)"O:ClientProfile_GetAnalyzeridFilename",&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Prelude__ClientProfile, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ClientProfile_GetAnalyzeridFilename" "', argument " "1"" of type '" "Prelude::ClientProfile *""'"); } arg1 = reinterpret_cast< Prelude::ClientProfile * >(argp1); try { result = (arg1)->GetAnalyzeridFilename(); } catch(Prelude::PreludeError &_e) { SWIG_Python_Raise(SWIG_NewPointerObj((new Prelude::PreludeError(static_cast< const Prelude::PreludeError& >(_e))),SWIGTYPE_p_Prelude__PreludeError,SWIG_POINTER_OWN), "Prelude::PreludeError", SWIGTYPE_p_Prelude__PreludeError); SWIG_fail; } resultobj = SWIG_From_std_string(static_cast< std::string >(result)); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_ClientProfile_GetTlsKeyFilename(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; Prelude::ClientProfile *arg1 = (Prelude::ClientProfile *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; std::string result; if (!PyArg_ParseTuple(args,(char *)"O:ClientProfile_GetTlsKeyFilename",&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Prelude__ClientProfile, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ClientProfile_GetTlsKeyFilename" "', argument " "1"" of type '" "Prelude::ClientProfile *""'"); } arg1 = reinterpret_cast< Prelude::ClientProfile * >(argp1); try { result = (arg1)->GetTlsKeyFilename(); } catch(Prelude::PreludeError &_e) { SWIG_Python_Raise(SWIG_NewPointerObj((new Prelude::PreludeError(static_cast< const Prelude::PreludeError& >(_e))),SWIGTYPE_p_Prelude__PreludeError,SWIG_POINTER_OWN), "Prelude::PreludeError", SWIGTYPE_p_Prelude__PreludeError); SWIG_fail; } resultobj = SWIG_From_std_string(static_cast< std::string >(result)); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_ClientProfile_GetTlsServerCaCertFilename(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; Prelude::ClientProfile *arg1 = (Prelude::ClientProfile *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; std::string result; if (!PyArg_ParseTuple(args,(char *)"O:ClientProfile_GetTlsServerCaCertFilename",&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Prelude__ClientProfile, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ClientProfile_GetTlsServerCaCertFilename" "', argument " "1"" of type '" "Prelude::ClientProfile *""'"); } arg1 = reinterpret_cast< Prelude::ClientProfile * >(argp1); try { result = (arg1)->GetTlsServerCaCertFilename(); } catch(Prelude::PreludeError &_e) { SWIG_Python_Raise(SWIG_NewPointerObj((new Prelude::PreludeError(static_cast< const Prelude::PreludeError& >(_e))),SWIGTYPE_p_Prelude__PreludeError,SWIG_POINTER_OWN), "Prelude::PreludeError", SWIGTYPE_p_Prelude__PreludeError); SWIG_fail; } resultobj = SWIG_From_std_string(static_cast< std::string >(result)); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_ClientProfile_GetTlsServerKeyCertFilename(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; Prelude::ClientProfile *arg1 = (Prelude::ClientProfile *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; std::string result; if (!PyArg_ParseTuple(args,(char *)"O:ClientProfile_GetTlsServerKeyCertFilename",&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Prelude__ClientProfile, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ClientProfile_GetTlsServerKeyCertFilename" "', argument " "1"" of type '" "Prelude::ClientProfile *""'"); } arg1 = reinterpret_cast< Prelude::ClientProfile * >(argp1); try { result = (arg1)->GetTlsServerKeyCertFilename(); } catch(Prelude::PreludeError &_e) { SWIG_Python_Raise(SWIG_NewPointerObj((new Prelude::PreludeError(static_cast< const Prelude::PreludeError& >(_e))),SWIGTYPE_p_Prelude__PreludeError,SWIG_POINTER_OWN), "Prelude::PreludeError", SWIGTYPE_p_Prelude__PreludeError); SWIG_fail; } resultobj = SWIG_From_std_string(static_cast< std::string >(result)); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_ClientProfile_GetTlsServerCrlFilename(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; Prelude::ClientProfile *arg1 = (Prelude::ClientProfile *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; std::string result; if (!PyArg_ParseTuple(args,(char *)"O:ClientProfile_GetTlsServerCrlFilename",&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Prelude__ClientProfile, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ClientProfile_GetTlsServerCrlFilename" "', argument " "1"" of type '" "Prelude::ClientProfile *""'"); } arg1 = reinterpret_cast< Prelude::ClientProfile * >(argp1); try { result = (arg1)->GetTlsServerCrlFilename(); } catch(Prelude::PreludeError &_e) { SWIG_Python_Raise(SWIG_NewPointerObj((new Prelude::PreludeError(static_cast< const Prelude::PreludeError& >(_e))),SWIGTYPE_p_Prelude__PreludeError,SWIG_POINTER_OWN), "Prelude::PreludeError", SWIGTYPE_p_Prelude__PreludeError); SWIG_fail; } resultobj = SWIG_From_std_string(static_cast< std::string >(result)); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_ClientProfile_GetTlsClientKeyCertFilename(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; Prelude::ClientProfile *arg1 = (Prelude::ClientProfile *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; std::string result; if (!PyArg_ParseTuple(args,(char *)"O:ClientProfile_GetTlsClientKeyCertFilename",&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Prelude__ClientProfile, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ClientProfile_GetTlsClientKeyCertFilename" "', argument " "1"" of type '" "Prelude::ClientProfile *""'"); } arg1 = reinterpret_cast< Prelude::ClientProfile * >(argp1); try { result = (arg1)->GetTlsClientKeyCertFilename(); } catch(Prelude::PreludeError &_e) { SWIG_Python_Raise(SWIG_NewPointerObj((new Prelude::PreludeError(static_cast< const Prelude::PreludeError& >(_e))),SWIGTYPE_p_Prelude__PreludeError,SWIG_POINTER_OWN), "Prelude::PreludeError", SWIGTYPE_p_Prelude__PreludeError); SWIG_fail; } resultobj = SWIG_From_std_string(static_cast< std::string >(result)); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_ClientProfile_GetTlsClientTrustedCertFilename(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; Prelude::ClientProfile *arg1 = (Prelude::ClientProfile *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; std::string result; if (!PyArg_ParseTuple(args,(char *)"O:ClientProfile_GetTlsClientTrustedCertFilename",&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Prelude__ClientProfile, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ClientProfile_GetTlsClientTrustedCertFilename" "', argument " "1"" of type '" "Prelude::ClientProfile *""'"); } arg1 = reinterpret_cast< Prelude::ClientProfile * >(argp1); try { result = (arg1)->GetTlsClientTrustedCertFilename(); } catch(Prelude::PreludeError &_e) { SWIG_Python_Raise(SWIG_NewPointerObj((new Prelude::PreludeError(static_cast< const Prelude::PreludeError& >(_e))),SWIGTYPE_p_Prelude__PreludeError,SWIG_POINTER_OWN), "Prelude::PreludeError", SWIGTYPE_p_Prelude__PreludeError); SWIG_fail; } resultobj = SWIG_From_std_string(static_cast< std::string >(result)); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_ClientProfile_GetBackupDirname(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; Prelude::ClientProfile *arg1 = (Prelude::ClientProfile *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; std::string result; if (!PyArg_ParseTuple(args,(char *)"O:ClientProfile_GetBackupDirname",&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Prelude__ClientProfile, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ClientProfile_GetBackupDirname" "', argument " "1"" of type '" "Prelude::ClientProfile *""'"); } arg1 = reinterpret_cast< Prelude::ClientProfile * >(argp1); try { result = (arg1)->GetBackupDirname(); } catch(Prelude::PreludeError &_e) { SWIG_Python_Raise(SWIG_NewPointerObj((new Prelude::PreludeError(static_cast< const Prelude::PreludeError& >(_e))),SWIGTYPE_p_Prelude__PreludeError,SWIG_POINTER_OWN), "Prelude::PreludeError", SWIGTYPE_p_Prelude__PreludeError); SWIG_fail; } resultobj = SWIG_From_std_string(static_cast< std::string >(result)); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_ClientProfile_GetProfileDirname(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; Prelude::ClientProfile *arg1 = (Prelude::ClientProfile *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; std::string result; if (!PyArg_ParseTuple(args,(char *)"O:ClientProfile_GetProfileDirname",&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Prelude__ClientProfile, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ClientProfile_GetProfileDirname" "', argument " "1"" of type '" "Prelude::ClientProfile *""'"); } arg1 = reinterpret_cast< Prelude::ClientProfile * >(argp1); try { result = (arg1)->GetProfileDirname(); } catch(Prelude::PreludeError &_e) { SWIG_Python_Raise(SWIG_NewPointerObj((new Prelude::PreludeError(static_cast< const Prelude::PreludeError& >(_e))),SWIGTYPE_p_Prelude__PreludeError,SWIG_POINTER_OWN), "Prelude::PreludeError", SWIGTYPE_p_Prelude__PreludeError); SWIG_fail; } resultobj = SWIG_From_std_string(static_cast< std::string >(result)); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_ClientProfile_SetPrefix(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; Prelude::ClientProfile *arg1 = (Prelude::ClientProfile *) 0 ; char *arg2 = (char *) 0 ; void *argp1 = 0 ; int res1 = 0 ; int res2 ; char *buf2 = 0 ; int alloc2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:ClientProfile_SetPrefix",&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Prelude__ClientProfile, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ClientProfile_SetPrefix" "', argument " "1"" of type '" "Prelude::ClientProfile *""'"); } arg1 = reinterpret_cast< Prelude::ClientProfile * >(argp1); res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ClientProfile_SetPrefix" "', argument " "2"" of type '" "char const *""'"); } arg2 = reinterpret_cast< char * >(buf2); try { (arg1)->SetPrefix((char const *)arg2); } catch(Prelude::PreludeError &_e) { SWIG_Python_Raise(SWIG_NewPointerObj((new Prelude::PreludeError(static_cast< const Prelude::PreludeError& >(_e))),SWIGTYPE_p_Prelude__PreludeError,SWIG_POINTER_OWN), "Prelude::PreludeError", SWIGTYPE_p_Prelude__PreludeError); SWIG_fail; } resultobj = SWIG_Py_Void(); if (alloc2 == SWIG_NEWOBJ) delete[] buf2; return resultobj; fail: if (alloc2 == SWIG_NEWOBJ) delete[] buf2; return NULL; } SWIGINTERN PyObject *_wrap_ClientProfile_GetPrefix(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; Prelude::ClientProfile *arg1 = (Prelude::ClientProfile *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; std::string result; if (!PyArg_ParseTuple(args,(char *)"O:ClientProfile_GetPrefix",&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Prelude__ClientProfile, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ClientProfile_GetPrefix" "', argument " "1"" of type '" "Prelude::ClientProfile *""'"); } arg1 = reinterpret_cast< Prelude::ClientProfile * >(argp1); try { result = (arg1)->GetPrefix(); } catch(Prelude::PreludeError &_e) { SWIG_Python_Raise(SWIG_NewPointerObj((new Prelude::PreludeError(static_cast< const Prelude::PreludeError& >(_e))),SWIGTYPE_p_Prelude__PreludeError,SWIG_POINTER_OWN), "Prelude::PreludeError", SWIGTYPE_p_Prelude__PreludeError); SWIG_fail; } resultobj = SWIG_From_std_string(static_cast< std::string >(result)); return resultobj; fail: return NULL; } SWIGINTERN PyObject *ClientProfile_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *obj; if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL; SWIG_TypeNewClientData(SWIGTYPE_p_Prelude__ClientProfile, SWIG_NewClientData(obj)); return SWIG_Py_Void(); } SWIGINTERN PyObject *_wrap_delete_Client(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; Prelude::Client *arg1 = (Prelude::Client *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:delete_Client",&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Prelude__Client, SWIG_POINTER_DISOWN | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_Client" "', argument " "1"" of type '" "Prelude::Client *""'"); } arg1 = reinterpret_cast< Prelude::Client * >(argp1); delete arg1; resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_new_Client__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; char *arg1 = (char *) 0 ; int res1 ; char *buf1 = 0 ; int alloc1 = 0 ; PyObject * obj0 = 0 ; Prelude::Client *result = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:new_Client",&obj0)) SWIG_fail; res1 = SWIG_AsCharPtrAndSize(obj0, &buf1, NULL, &alloc1); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_Client" "', argument " "1"" of type '" "char const *""'"); } arg1 = reinterpret_cast< char * >(buf1); try { result = (Prelude::Client *)new Prelude::Client((char const *)arg1); } catch(Prelude::PreludeError &_e) { SWIG_Python_Raise(SWIG_NewPointerObj((new Prelude::PreludeError(static_cast< const Prelude::PreludeError& >(_e))),SWIGTYPE_p_Prelude__PreludeError,SWIG_POINTER_OWN), "Prelude::PreludeError", SWIGTYPE_p_Prelude__PreludeError); SWIG_fail; } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Prelude__Client, SWIG_POINTER_NEW | 0 ); if (alloc1 == SWIG_NEWOBJ) delete[] buf1; return resultobj; fail: if (alloc1 == SWIG_NEWOBJ) delete[] buf1; return NULL; } SWIGINTERN PyObject *_wrap_new_Client__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; Prelude::Client *arg1 = 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; Prelude::Client *result = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:new_Client",&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1, SWIGTYPE_p_Prelude__Client, 0 | 0); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_Client" "', argument " "1"" of type '" "Prelude::Client const &""'"); } if (!argp1) { SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_Client" "', argument " "1"" of type '" "Prelude::Client const &""'"); } arg1 = reinterpret_cast< Prelude::Client * >(argp1); try { result = (Prelude::Client *)new Prelude::Client((Prelude::Client const &)*arg1); } catch(Prelude::PreludeError &_e) { SWIG_Python_Raise(SWIG_NewPointerObj((new Prelude::PreludeError(static_cast< const Prelude::PreludeError& >(_e))),SWIGTYPE_p_Prelude__PreludeError,SWIG_POINTER_OWN), "Prelude::PreludeError", SWIGTYPE_p_Prelude__PreludeError); SWIG_fail; } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Prelude__Client, SWIG_POINTER_NEW | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_new_Client(PyObject *self, PyObject *args) { int argc; PyObject *argv[2]; int ii; if (!PyTuple_Check(args)) SWIG_fail; argc = (int)PyObject_Length(args); for (ii = 0; (ii < argc) && (ii < 1); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } if (argc == 1) { int _v; int res = SWIG_ConvertPtr(argv[0], 0, SWIGTYPE_p_Prelude__Client, 0); _v = SWIG_CheckState(res); if (_v) { return _wrap_new_Client__SWIG_1(self, args); } } if (argc == 1) { int _v; int res = SWIG_AsCharPtrAndSize(argv[0], 0, NULL, 0); _v = SWIG_CheckState(res); if (_v) { return _wrap_new_Client__SWIG_0(self, args); } } fail: SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'new_Client'.\n" " Possible C/C++ prototypes are:\n" " Prelude::Client(char const *)\n" " Prelude::Client(Prelude::Client const &)\n"); return NULL; } SWIGINTERN PyObject *_wrap_Client_Start(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; Prelude::Client *arg1 = (Prelude::Client *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:Client_Start",&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Prelude__Client, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Client_Start" "', argument " "1"" of type '" "Prelude::Client *""'"); } arg1 = reinterpret_cast< Prelude::Client * >(argp1); try { (arg1)->Start(); } catch(Prelude::PreludeError &_e) { SWIG_Python_Raise(SWIG_NewPointerObj((new Prelude::PreludeError(static_cast< const Prelude::PreludeError& >(_e))),SWIGTYPE_p_Prelude__PreludeError,SWIG_POINTER_OWN), "Prelude::PreludeError", SWIGTYPE_p_Prelude__PreludeError); SWIG_fail; } resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_Client_Init(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; Prelude::Client *arg1 = (Prelude::Client *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:Client_Init",&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Prelude__Client, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Client_Init" "', argument " "1"" of type '" "Prelude::Client *""'"); } arg1 = reinterpret_cast< Prelude::Client * >(argp1); try { (arg1)->Init(); } catch(Prelude::PreludeError &_e) { SWIG_Python_Raise(SWIG_NewPointerObj((new Prelude::PreludeError(static_cast< const Prelude::PreludeError& >(_e))),SWIGTYPE_p_Prelude__PreludeError,SWIG_POINTER_OWN), "Prelude::PreludeError", SWIGTYPE_p_Prelude__PreludeError); SWIG_fail; } resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_Client_GetClient(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; Prelude::Client *arg1 = (Prelude::Client *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; prelude_client_t *result = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:Client_GetClient",&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Prelude__Client, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Client_GetClient" "', argument " "1"" of type '" "Prelude::Client *""'"); } arg1 = reinterpret_cast< Prelude::Client * >(argp1); try { result = (prelude_client_t *)(arg1)->GetClient(); } catch(Prelude::PreludeError &_e) { SWIG_Python_Raise(SWIG_NewPointerObj((new Prelude::PreludeError(static_cast< const Prelude::PreludeError& >(_e))),SWIGTYPE_p_Prelude__PreludeError,SWIG_POINTER_OWN), "Prelude::PreludeError", SWIGTYPE_p_Prelude__PreludeError); SWIG_fail; } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_prelude_client_t, 0 | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_Client_SendIDMEF(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; Prelude::Client *arg1 = (Prelude::Client *) 0 ; Prelude::IDMEF *arg2 = 0 ; void *argp1 = 0 ; int res1 = 0 ; void *argp2 = 0 ; int res2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:Client_SendIDMEF",&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Prelude__Client, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Client_SendIDMEF" "', argument " "1"" of type '" "Prelude::Client *""'"); } arg1 = reinterpret_cast< Prelude::Client * >(argp1); res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_Prelude__IDMEF, 0 | 0); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Client_SendIDMEF" "', argument " "2"" of type '" "Prelude::IDMEF const &""'"); } if (!argp2) { SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Client_SendIDMEF" "', argument " "2"" of type '" "Prelude::IDMEF const &""'"); } arg2 = reinterpret_cast< Prelude::IDMEF * >(argp2); try { (arg1)->SendIDMEF((Prelude::IDMEF const &)*arg2); } catch(Prelude::PreludeError &_e) { SWIG_Python_Raise(SWIG_NewPointerObj((new Prelude::PreludeError(static_cast< const Prelude::PreludeError& >(_e))),SWIGTYPE_p_Prelude__PreludeError,SWIG_POINTER_OWN), "Prelude::PreludeError", SWIGTYPE_p_Prelude__PreludeError); SWIG_fail; } resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_Client_RecvIDMEF__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; Prelude::Client *arg1 = (Prelude::Client *) 0 ; Prelude::IDMEF *arg2 = 0 ; int arg3 ; void *argp1 = 0 ; int res1 = 0 ; void *argp2 = 0 ; int res2 = 0 ; int val3 ; int ecode3 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; PyObject * obj2 = 0 ; int result; if (!PyArg_ParseTuple(args,(char *)"OOO:Client_RecvIDMEF",&obj0,&obj1,&obj2)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Prelude__Client, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Client_RecvIDMEF" "', argument " "1"" of type '" "Prelude::Client *""'"); } arg1 = reinterpret_cast< Prelude::Client * >(argp1); res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_Prelude__IDMEF, 0 ); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Client_RecvIDMEF" "', argument " "2"" of type '" "Prelude::IDMEF &""'"); } if (!argp2) { SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Client_RecvIDMEF" "', argument " "2"" of type '" "Prelude::IDMEF &""'"); } arg2 = reinterpret_cast< Prelude::IDMEF * >(argp2); ecode3 = SWIG_AsVal_int(obj2, &val3); if (!SWIG_IsOK(ecode3)) { SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "Client_RecvIDMEF" "', argument " "3"" of type '" "int""'"); } arg3 = static_cast< int >(val3); try { result = (int)(arg1)->RecvIDMEF(*arg2,arg3); } catch(Prelude::PreludeError &_e) { SWIG_Python_Raise(SWIG_NewPointerObj((new Prelude::PreludeError(static_cast< const Prelude::PreludeError& >(_e))),SWIGTYPE_p_Prelude__PreludeError,SWIG_POINTER_OWN), "Prelude::PreludeError", SWIGTYPE_p_Prelude__PreludeError); SWIG_fail; } resultobj = SWIG_From_int(static_cast< int >(result)); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_Client_RecvIDMEF__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; Prelude::Client *arg1 = (Prelude::Client *) 0 ; Prelude::IDMEF *arg2 = 0 ; void *argp1 = 0 ; int res1 = 0 ; void *argp2 = 0 ; int res2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; int result; if (!PyArg_ParseTuple(args,(char *)"OO:Client_RecvIDMEF",&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Prelude__Client, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Client_RecvIDMEF" "', argument " "1"" of type '" "Prelude::Client *""'"); } arg1 = reinterpret_cast< Prelude::Client * >(argp1); res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_Prelude__IDMEF, 0 ); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Client_RecvIDMEF" "', argument " "2"" of type '" "Prelude::IDMEF &""'"); } if (!argp2) { SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Client_RecvIDMEF" "', argument " "2"" of type '" "Prelude::IDMEF &""'"); } arg2 = reinterpret_cast< Prelude::IDMEF * >(argp2); try { result = (int)(arg1)->RecvIDMEF(*arg2); } catch(Prelude::PreludeError &_e) { SWIG_Python_Raise(SWIG_NewPointerObj((new Prelude::PreludeError(static_cast< const Prelude::PreludeError& >(_e))),SWIGTYPE_p_Prelude__PreludeError,SWIG_POINTER_OWN), "Prelude::PreludeError", SWIGTYPE_p_Prelude__PreludeError); SWIG_fail; } resultobj = SWIG_From_int(static_cast< int >(result)); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_Client_RecvIDMEF(PyObject *self, PyObject *args) { int argc; PyObject *argv[4]; int ii; if (!PyTuple_Check(args)) SWIG_fail; argc = (int)PyObject_Length(args); for (ii = 0; (ii < argc) && (ii < 3); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } if (argc == 2) { int _v; void *vptr = 0; int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_Prelude__Client, 0); _v = SWIG_CheckState(res); if (_v) { void *vptr = 0; int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_p_Prelude__IDMEF, 0); _v = SWIG_CheckState(res); if (_v) { return _wrap_Client_RecvIDMEF__SWIG_1(self, args); } } } if (argc == 3) { int _v; void *vptr = 0; int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_Prelude__Client, 0); _v = SWIG_CheckState(res); if (_v) { void *vptr = 0; int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_p_Prelude__IDMEF, 0); _v = SWIG_CheckState(res); if (_v) { { int res = SWIG_AsVal_int(argv[2], NULL); _v = SWIG_CheckState(res); } if (_v) { return _wrap_Client_RecvIDMEF__SWIG_0(self, args); } } } } fail: SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'Client_RecvIDMEF'.\n" " Possible C/C++ prototypes are:\n" " RecvIDMEF(Prelude::Client *,Prelude::IDMEF &,int)\n" " RecvIDMEF(Prelude::Client *,Prelude::IDMEF &)\n"); return NULL; } SWIGINTERN PyObject *_wrap_Client_GetFlags(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; Prelude::Client *arg1 = (Prelude::Client *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; int result; if (!PyArg_ParseTuple(args,(char *)"O:Client_GetFlags",&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Prelude__Client, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Client_GetFlags" "', argument " "1"" of type '" "Prelude::Client *""'"); } arg1 = reinterpret_cast< Prelude::Client * >(argp1); try { result = (int)(arg1)->GetFlags(); } catch(Prelude::PreludeError &_e) { SWIG_Python_Raise(SWIG_NewPointerObj((new Prelude::PreludeError(static_cast< const Prelude::PreludeError& >(_e))),SWIGTYPE_p_Prelude__PreludeError,SWIG_POINTER_OWN), "Prelude::PreludeError", SWIGTYPE_p_Prelude__PreludeError); SWIG_fail; } resultobj = SWIG_From_int(static_cast< int >(result)); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_Client_SetFlags(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; Prelude::Client *arg1 = (Prelude::Client *) 0 ; int arg2 ; void *argp1 = 0 ; int res1 = 0 ; int val2 ; int ecode2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:Client_SetFlags",&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Prelude__Client, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Client_SetFlags" "', argument " "1"" of type '" "Prelude::Client *""'"); } arg1 = reinterpret_cast< Prelude::Client * >(argp1); ecode2 = SWIG_AsVal_int(obj1, &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Client_SetFlags" "', argument " "2"" of type '" "int""'"); } arg2 = static_cast< int >(val2); try { (arg1)->SetFlags(arg2); } catch(Prelude::PreludeError &_e) { SWIG_Python_Raise(SWIG_NewPointerObj((new Prelude::PreludeError(static_cast< const Prelude::PreludeError& >(_e))),SWIGTYPE_p_Prelude__PreludeError,SWIG_POINTER_OWN), "Prelude::PreludeError", SWIGTYPE_p_Prelude__PreludeError); SWIG_fail; } resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_Client_GetRequiredPermission(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; Prelude::Client *arg1 = (Prelude::Client *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; int result; if (!PyArg_ParseTuple(args,(char *)"O:Client_GetRequiredPermission",&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Prelude__Client, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Client_GetRequiredPermission" "', argument " "1"" of type '" "Prelude::Client *""'"); } arg1 = reinterpret_cast< Prelude::Client * >(argp1); try { result = (int)(arg1)->GetRequiredPermission(); } catch(Prelude::PreludeError &_e) { SWIG_Python_Raise(SWIG_NewPointerObj((new Prelude::PreludeError(static_cast< const Prelude::PreludeError& >(_e))),SWIGTYPE_p_Prelude__PreludeError,SWIG_POINTER_OWN), "Prelude::PreludeError", SWIGTYPE_p_Prelude__PreludeError); SWIG_fail; } resultobj = SWIG_From_int(static_cast< int >(result)); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_Client_SetRequiredPermission(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; Prelude::Client *arg1 = (Prelude::Client *) 0 ; int arg2 ; void *argp1 = 0 ; int res1 = 0 ; int val2 ; int ecode2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:Client_SetRequiredPermission",&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Prelude__Client, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Client_SetRequiredPermission" "', argument " "1"" of type '" "Prelude::Client *""'"); } arg1 = reinterpret_cast< Prelude::Client * >(argp1); ecode2 = SWIG_AsVal_int(obj1, &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Client_SetRequiredPermission" "', argument " "2"" of type '" "int""'"); } arg2 = static_cast< int >(val2); try { (arg1)->SetRequiredPermission(arg2); } catch(Prelude::PreludeError &_e) { SWIG_Python_Raise(SWIG_NewPointerObj((new Prelude::PreludeError(static_cast< const Prelude::PreludeError& >(_e))),SWIGTYPE_p_Prelude__PreludeError,SWIG_POINTER_OWN), "Prelude::PreludeError", SWIGTYPE_p_Prelude__PreludeError); SWIG_fail; } resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_Client_GetConfigFilename(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; Prelude::Client *arg1 = (Prelude::Client *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; char *result = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:Client_GetConfigFilename",&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Prelude__Client, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Client_GetConfigFilename" "', argument " "1"" of type '" "Prelude::Client *""'"); } arg1 = reinterpret_cast< Prelude::Client * >(argp1); try { result = (char *)(arg1)->GetConfigFilename(); } catch(Prelude::PreludeError &_e) { SWIG_Python_Raise(SWIG_NewPointerObj((new Prelude::PreludeError(static_cast< const Prelude::PreludeError& >(_e))),SWIGTYPE_p_Prelude__PreludeError,SWIG_POINTER_OWN), "Prelude::PreludeError", SWIGTYPE_p_Prelude__PreludeError); SWIG_fail; } resultobj = SWIG_FromCharPtr((const char *)result); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_Client_SetConfigFilename(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; Prelude::Client *arg1 = (Prelude::Client *) 0 ; char *arg2 = (char *) 0 ; void *argp1 = 0 ; int res1 = 0 ; int res2 ; char *buf2 = 0 ; int alloc2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:Client_SetConfigFilename",&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Prelude__Client, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Client_SetConfigFilename" "', argument " "1"" of type '" "Prelude::Client *""'"); } arg1 = reinterpret_cast< Prelude::Client * >(argp1); res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Client_SetConfigFilename" "', argument " "2"" of type '" "char const *""'"); } arg2 = reinterpret_cast< char * >(buf2); try { (arg1)->SetConfigFilename((char const *)arg2); } catch(Prelude::PreludeError &_e) { SWIG_Python_Raise(SWIG_NewPointerObj((new Prelude::PreludeError(static_cast< const Prelude::PreludeError& >(_e))),SWIGTYPE_p_Prelude__PreludeError,SWIG_POINTER_OWN), "Prelude::PreludeError", SWIGTYPE_p_Prelude__PreludeError); SWIG_fail; } resultobj = SWIG_Py_Void(); if (alloc2 == SWIG_NEWOBJ) delete[] buf2; return resultobj; fail: if (alloc2 == SWIG_NEWOBJ) delete[] buf2; return NULL; } SWIGINTERN PyObject *_wrap_Client_GetConnectionPool(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; Prelude::Client *arg1 = (Prelude::Client *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; Prelude::ConnectionPool *result = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:Client_GetConnectionPool",&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Prelude__Client, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Client_GetConnectionPool" "', argument " "1"" of type '" "Prelude::Client *""'"); } arg1 = reinterpret_cast< Prelude::Client * >(argp1); try { result = (Prelude::ConnectionPool *) &(arg1)->GetConnectionPool(); } catch(Prelude::PreludeError &_e) { SWIG_Python_Raise(SWIG_NewPointerObj((new Prelude::PreludeError(static_cast< const Prelude::PreludeError& >(_e))),SWIGTYPE_p_Prelude__PreludeError,SWIG_POINTER_OWN), "Prelude::PreludeError", SWIGTYPE_p_Prelude__PreludeError); SWIG_fail; } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Prelude__ConnectionPool, 0 | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_Client_SetConnectionPool(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; Prelude::Client *arg1 = (Prelude::Client *) 0 ; Prelude::ConnectionPool arg2 ; void *argp1 = 0 ; int res1 = 0 ; void *argp2 ; int res2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:Client_SetConnectionPool",&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Prelude__Client, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Client_SetConnectionPool" "', argument " "1"" of type '" "Prelude::Client *""'"); } arg1 = reinterpret_cast< Prelude::Client * >(argp1); { res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_Prelude__ConnectionPool, 0 | 0); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Client_SetConnectionPool" "', argument " "2"" of type '" "Prelude::ConnectionPool""'"); } if (!argp2) { SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Client_SetConnectionPool" "', argument " "2"" of type '" "Prelude::ConnectionPool""'"); } else { Prelude::ConnectionPool * temp = reinterpret_cast< Prelude::ConnectionPool * >(argp2); arg2 = *temp; if (SWIG_IsNewObj(res2)) delete temp; } } try { (arg1)->SetConnectionPool(arg2); } catch(Prelude::PreludeError &_e) { SWIG_Python_Raise(SWIG_NewPointerObj((new Prelude::PreludeError(static_cast< const Prelude::PreludeError& >(_e))),SWIGTYPE_p_Prelude__PreludeError,SWIG_POINTER_OWN), "Prelude::PreludeError", SWIGTYPE_p_Prelude__PreludeError); SWIG_fail; } resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_Client___lshift__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; Prelude::Client *arg1 = (Prelude::Client *) 0 ; Prelude::IDMEF *arg2 = 0 ; void *argp1 = 0 ; int res1 = 0 ; void *argp2 = 0 ; int res2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; Prelude::Client *result = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:Client___lshift__",&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Prelude__Client, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Client___lshift__" "', argument " "1"" of type '" "Prelude::Client *""'"); } arg1 = reinterpret_cast< Prelude::Client * >(argp1); res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_Prelude__IDMEF, 0 ); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Client___lshift__" "', argument " "2"" of type '" "Prelude::IDMEF &""'"); } if (!argp2) { SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Client___lshift__" "', argument " "2"" of type '" "Prelude::IDMEF &""'"); } arg2 = reinterpret_cast< Prelude::IDMEF * >(argp2); try { result = (Prelude::Client *) &(arg1)->operator <<(*arg2); } catch(Prelude::PreludeError &_e) { SWIG_Python_Raise(SWIG_NewPointerObj((new Prelude::PreludeError(static_cast< const Prelude::PreludeError& >(_e))),SWIGTYPE_p_Prelude__PreludeError,SWIG_POINTER_OWN), "Prelude::PreludeError", SWIGTYPE_p_Prelude__PreludeError); SWIG_fail; } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Prelude__Client, 0 | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_Client___rshift__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; Prelude::Client *arg1 = (Prelude::Client *) 0 ; Prelude::IDMEF *arg2 = 0 ; void *argp1 = 0 ; int res1 = 0 ; void *argp2 = 0 ; int res2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; Prelude::Client *result = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:Client___rshift__",&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Prelude__Client, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Client___rshift__" "', argument " "1"" of type '" "Prelude::Client *""'"); } arg1 = reinterpret_cast< Prelude::Client * >(argp1); res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_Prelude__IDMEF, 0 ); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Client___rshift__" "', argument " "2"" of type '" "Prelude::IDMEF &""'"); } if (!argp2) { SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Client___rshift__" "', argument " "2"" of type '" "Prelude::IDMEF &""'"); } arg2 = reinterpret_cast< Prelude::IDMEF * >(argp2); try { result = (Prelude::Client *) &(arg1)->operator >>(*arg2); } catch(Prelude::PreludeError &_e) { SWIG_Python_Raise(SWIG_NewPointerObj((new Prelude::PreludeError(static_cast< const Prelude::PreludeError& >(_e))),SWIGTYPE_p_Prelude__PreludeError,SWIG_POINTER_OWN), "Prelude::PreludeError", SWIGTYPE_p_Prelude__PreludeError); SWIG_fail; } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Prelude__Client, 0 | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_Client_SetRecvTimeout(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; Prelude::Client *arg1 = 0 ; int arg2 ; void *argp1 = 0 ; int res1 = 0 ; int val2 ; int ecode2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; Prelude::Client *result = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:Client_SetRecvTimeout",&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1, SWIGTYPE_p_Prelude__Client, 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Client_SetRecvTimeout" "', argument " "1"" of type '" "Prelude::Client &""'"); } if (!argp1) { SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Client_SetRecvTimeout" "', argument " "1"" of type '" "Prelude::Client &""'"); } arg1 = reinterpret_cast< Prelude::Client * >(argp1); ecode2 = SWIG_AsVal_int(obj1, &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Client_SetRecvTimeout" "', argument " "2"" of type '" "int""'"); } arg2 = static_cast< int >(val2); try { result = (Prelude::Client *) &Prelude::Client::SetRecvTimeout(*arg1,arg2); } catch(Prelude::PreludeError &_e) { SWIG_Python_Raise(SWIG_NewPointerObj((new Prelude::PreludeError(static_cast< const Prelude::PreludeError& >(_e))),SWIGTYPE_p_Prelude__PreludeError,SWIG_POINTER_OWN), "Prelude::PreludeError", SWIGTYPE_p_Prelude__PreludeError); SWIG_fail; } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Prelude__Client, 0 | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *Client_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *obj; if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL; SWIG_TypeNewClientData(SWIGTYPE_p_Prelude__Client, SWIG_NewClientData(obj)); return SWIG_Py_Void(); } SWIGINTERN PyObject *_wrap_new_ClientEasy__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; char *arg1 = (char *) 0 ; int arg2 ; char *arg3 = (char *) 0 ; char *arg4 = (char *) 0 ; char *arg5 = (char *) 0 ; char *arg6 = (char *) 0 ; int res1 ; char *buf1 = 0 ; int alloc1 = 0 ; int val2 ; int ecode2 = 0 ; int res3 ; char *buf3 = 0 ; int alloc3 = 0 ; int res4 ; char *buf4 = 0 ; int alloc4 = 0 ; int res5 ; char *buf5 = 0 ; int alloc5 = 0 ; int res6 ; char *buf6 = 0 ; int alloc6 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; PyObject * obj2 = 0 ; PyObject * obj3 = 0 ; PyObject * obj4 = 0 ; PyObject * obj5 = 0 ; Prelude::ClientEasy *result = 0 ; if (!PyArg_ParseTuple(args,(char *)"OOOOOO:new_ClientEasy",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5)) SWIG_fail; res1 = SWIG_AsCharPtrAndSize(obj0, &buf1, NULL, &alloc1); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_ClientEasy" "', argument " "1"" of type '" "char const *""'"); } arg1 = reinterpret_cast< char * >(buf1); ecode2 = SWIG_AsVal_int(obj1, &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_ClientEasy" "', argument " "2"" of type '" "int""'"); } arg2 = static_cast< int >(val2); res3 = SWIG_AsCharPtrAndSize(obj2, &buf3, NULL, &alloc3); if (!SWIG_IsOK(res3)) { SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_ClientEasy" "', argument " "3"" of type '" "char const *""'"); } arg3 = reinterpret_cast< char * >(buf3); res4 = SWIG_AsCharPtrAndSize(obj3, &buf4, NULL, &alloc4); if (!SWIG_IsOK(res4)) { SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "new_ClientEasy" "', argument " "4"" of type '" "char const *""'"); } arg4 = reinterpret_cast< char * >(buf4); res5 = SWIG_AsCharPtrAndSize(obj4, &buf5, NULL, &alloc5); if (!SWIG_IsOK(res5)) { SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "new_ClientEasy" "', argument " "5"" of type '" "char const *""'"); } arg5 = reinterpret_cast< char * >(buf5); res6 = SWIG_AsCharPtrAndSize(obj5, &buf6, NULL, &alloc6); if (!SWIG_IsOK(res6)) { SWIG_exception_fail(SWIG_ArgError(res6), "in method '" "new_ClientEasy" "', argument " "6"" of type '" "char const *""'"); } arg6 = reinterpret_cast< char * >(buf6); try { result = (Prelude::ClientEasy *)new Prelude::ClientEasy((char const *)arg1,arg2,(char const *)arg3,(char const *)arg4,(char const *)arg5,(char const *)arg6); } catch(Prelude::PreludeError &_e) { SWIG_Python_Raise(SWIG_NewPointerObj((new Prelude::PreludeError(static_cast< const Prelude::PreludeError& >(_e))),SWIGTYPE_p_Prelude__PreludeError,SWIG_POINTER_OWN), "Prelude::PreludeError", SWIGTYPE_p_Prelude__PreludeError); SWIG_fail; } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Prelude__ClientEasy, SWIG_POINTER_NEW | 0 ); if (alloc1 == SWIG_NEWOBJ) delete[] buf1; if (alloc3 == SWIG_NEWOBJ) delete[] buf3; if (alloc4 == SWIG_NEWOBJ) delete[] buf4; if (alloc5 == SWIG_NEWOBJ) delete[] buf5; if (alloc6 == SWIG_NEWOBJ) delete[] buf6; return resultobj; fail: if (alloc1 == SWIG_NEWOBJ) delete[] buf1; if (alloc3 == SWIG_NEWOBJ) delete[] buf3; if (alloc4 == SWIG_NEWOBJ) delete[] buf4; if (alloc5 == SWIG_NEWOBJ) delete[] buf5; if (alloc6 == SWIG_NEWOBJ) delete[] buf6; return NULL; } SWIGINTERN PyObject *_wrap_new_ClientEasy__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; char *arg1 = (char *) 0 ; int arg2 ; char *arg3 = (char *) 0 ; char *arg4 = (char *) 0 ; char *arg5 = (char *) 0 ; int res1 ; char *buf1 = 0 ; int alloc1 = 0 ; int val2 ; int ecode2 = 0 ; int res3 ; char *buf3 = 0 ; int alloc3 = 0 ; int res4 ; char *buf4 = 0 ; int alloc4 = 0 ; int res5 ; char *buf5 = 0 ; int alloc5 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; PyObject * obj2 = 0 ; PyObject * obj3 = 0 ; PyObject * obj4 = 0 ; Prelude::ClientEasy *result = 0 ; if (!PyArg_ParseTuple(args,(char *)"OOOOO:new_ClientEasy",&obj0,&obj1,&obj2,&obj3,&obj4)) SWIG_fail; res1 = SWIG_AsCharPtrAndSize(obj0, &buf1, NULL, &alloc1); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_ClientEasy" "', argument " "1"" of type '" "char const *""'"); } arg1 = reinterpret_cast< char * >(buf1); ecode2 = SWIG_AsVal_int(obj1, &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_ClientEasy" "', argument " "2"" of type '" "int""'"); } arg2 = static_cast< int >(val2); res3 = SWIG_AsCharPtrAndSize(obj2, &buf3, NULL, &alloc3); if (!SWIG_IsOK(res3)) { SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_ClientEasy" "', argument " "3"" of type '" "char const *""'"); } arg3 = reinterpret_cast< char * >(buf3); res4 = SWIG_AsCharPtrAndSize(obj3, &buf4, NULL, &alloc4); if (!SWIG_IsOK(res4)) { SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "new_ClientEasy" "', argument " "4"" of type '" "char const *""'"); } arg4 = reinterpret_cast< char * >(buf4); res5 = SWIG_AsCharPtrAndSize(obj4, &buf5, NULL, &alloc5); if (!SWIG_IsOK(res5)) { SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "new_ClientEasy" "', argument " "5"" of type '" "char const *""'"); } arg5 = reinterpret_cast< char * >(buf5); try { result = (Prelude::ClientEasy *)new Prelude::ClientEasy((char const *)arg1,arg2,(char const *)arg3,(char const *)arg4,(char const *)arg5); } catch(Prelude::PreludeError &_e) { SWIG_Python_Raise(SWIG_NewPointerObj((new Prelude::PreludeError(static_cast< const Prelude::PreludeError& >(_e))),SWIGTYPE_p_Prelude__PreludeError,SWIG_POINTER_OWN), "Prelude::PreludeError", SWIGTYPE_p_Prelude__PreludeError); SWIG_fail; } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Prelude__ClientEasy, SWIG_POINTER_NEW | 0 ); if (alloc1 == SWIG_NEWOBJ) delete[] buf1; if (alloc3 == SWIG_NEWOBJ) delete[] buf3; if (alloc4 == SWIG_NEWOBJ) delete[] buf4; if (alloc5 == SWIG_NEWOBJ) delete[] buf5; return resultobj; fail: if (alloc1 == SWIG_NEWOBJ) delete[] buf1; if (alloc3 == SWIG_NEWOBJ) delete[] buf3; if (alloc4 == SWIG_NEWOBJ) delete[] buf4; if (alloc5 == SWIG_NEWOBJ) delete[] buf5; return NULL; } SWIGINTERN PyObject *_wrap_new_ClientEasy__SWIG_2(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; char *arg1 = (char *) 0 ; int arg2 ; char *arg3 = (char *) 0 ; char *arg4 = (char *) 0 ; int res1 ; char *buf1 = 0 ; int alloc1 = 0 ; int val2 ; int ecode2 = 0 ; int res3 ; char *buf3 = 0 ; int alloc3 = 0 ; int res4 ; char *buf4 = 0 ; int alloc4 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; PyObject * obj2 = 0 ; PyObject * obj3 = 0 ; Prelude::ClientEasy *result = 0 ; if (!PyArg_ParseTuple(args,(char *)"OOOO:new_ClientEasy",&obj0,&obj1,&obj2,&obj3)) SWIG_fail; res1 = SWIG_AsCharPtrAndSize(obj0, &buf1, NULL, &alloc1); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_ClientEasy" "', argument " "1"" of type '" "char const *""'"); } arg1 = reinterpret_cast< char * >(buf1); ecode2 = SWIG_AsVal_int(obj1, &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_ClientEasy" "', argument " "2"" of type '" "int""'"); } arg2 = static_cast< int >(val2); res3 = SWIG_AsCharPtrAndSize(obj2, &buf3, NULL, &alloc3); if (!SWIG_IsOK(res3)) { SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_ClientEasy" "', argument " "3"" of type '" "char const *""'"); } arg3 = reinterpret_cast< char * >(buf3); res4 = SWIG_AsCharPtrAndSize(obj3, &buf4, NULL, &alloc4); if (!SWIG_IsOK(res4)) { SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "new_ClientEasy" "', argument " "4"" of type '" "char const *""'"); } arg4 = reinterpret_cast< char * >(buf4); try { result = (Prelude::ClientEasy *)new Prelude::ClientEasy((char const *)arg1,arg2,(char const *)arg3,(char const *)arg4); } catch(Prelude::PreludeError &_e) { SWIG_Python_Raise(SWIG_NewPointerObj((new Prelude::PreludeError(static_cast< const Prelude::PreludeError& >(_e))),SWIGTYPE_p_Prelude__PreludeError,SWIG_POINTER_OWN), "Prelude::PreludeError", SWIGTYPE_p_Prelude__PreludeError); SWIG_fail; } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Prelude__ClientEasy, SWIG_POINTER_NEW | 0 ); if (alloc1 == SWIG_NEWOBJ) delete[] buf1; if (alloc3 == SWIG_NEWOBJ) delete[] buf3; if (alloc4 == SWIG_NEWOBJ) delete[] buf4; return resultobj; fail: if (alloc1 == SWIG_NEWOBJ) delete[] buf1; if (alloc3 == SWIG_NEWOBJ) delete[] buf3; if (alloc4 == SWIG_NEWOBJ) delete[] buf4; return NULL; } SWIGINTERN PyObject *_wrap_new_ClientEasy__SWIG_3(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; char *arg1 = (char *) 0 ; int arg2 ; char *arg3 = (char *) 0 ; int res1 ; char *buf1 = 0 ; int alloc1 = 0 ; int val2 ; int ecode2 = 0 ; int res3 ; char *buf3 = 0 ; int alloc3 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; PyObject * obj2 = 0 ; Prelude::ClientEasy *result = 0 ; if (!PyArg_ParseTuple(args,(char *)"OOO:new_ClientEasy",&obj0,&obj1,&obj2)) SWIG_fail; res1 = SWIG_AsCharPtrAndSize(obj0, &buf1, NULL, &alloc1); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_ClientEasy" "', argument " "1"" of type '" "char const *""'"); } arg1 = reinterpret_cast< char * >(buf1); ecode2 = SWIG_AsVal_int(obj1, &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_ClientEasy" "', argument " "2"" of type '" "int""'"); } arg2 = static_cast< int >(val2); res3 = SWIG_AsCharPtrAndSize(obj2, &buf3, NULL, &alloc3); if (!SWIG_IsOK(res3)) { SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_ClientEasy" "', argument " "3"" of type '" "char const *""'"); } arg3 = reinterpret_cast< char * >(buf3); try { result = (Prelude::ClientEasy *)new Prelude::ClientEasy((char const *)arg1,arg2,(char const *)arg3); } catch(Prelude::PreludeError &_e) { SWIG_Python_Raise(SWIG_NewPointerObj((new Prelude::PreludeError(static_cast< const Prelude::PreludeError& >(_e))),SWIGTYPE_p_Prelude__PreludeError,SWIG_POINTER_OWN), "Prelude::PreludeError", SWIGTYPE_p_Prelude__PreludeError); SWIG_fail; } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Prelude__ClientEasy, SWIG_POINTER_NEW | 0 ); if (alloc1 == SWIG_NEWOBJ) delete[] buf1; if (alloc3 == SWIG_NEWOBJ) delete[] buf3; return resultobj; fail: if (alloc1 == SWIG_NEWOBJ) delete[] buf1; if (alloc3 == SWIG_NEWOBJ) delete[] buf3; return NULL; } SWIGINTERN PyObject *_wrap_new_ClientEasy__SWIG_4(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; char *arg1 = (char *) 0 ; int arg2 ; int res1 ; char *buf1 = 0 ; int alloc1 = 0 ; int val2 ; int ecode2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; Prelude::ClientEasy *result = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:new_ClientEasy",&obj0,&obj1)) SWIG_fail; res1 = SWIG_AsCharPtrAndSize(obj0, &buf1, NULL, &alloc1); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_ClientEasy" "', argument " "1"" of type '" "char const *""'"); } arg1 = reinterpret_cast< char * >(buf1); ecode2 = SWIG_AsVal_int(obj1, &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_ClientEasy" "', argument " "2"" of type '" "int""'"); } arg2 = static_cast< int >(val2); try { result = (Prelude::ClientEasy *)new Prelude::ClientEasy((char const *)arg1,arg2); } catch(Prelude::PreludeError &_e) { SWIG_Python_Raise(SWIG_NewPointerObj((new Prelude::PreludeError(static_cast< const Prelude::PreludeError& >(_e))),SWIGTYPE_p_Prelude__PreludeError,SWIG_POINTER_OWN), "Prelude::PreludeError", SWIGTYPE_p_Prelude__PreludeError); SWIG_fail; } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Prelude__ClientEasy, SWIG_POINTER_NEW | 0 ); if (alloc1 == SWIG_NEWOBJ) delete[] buf1; return resultobj; fail: if (alloc1 == SWIG_NEWOBJ) delete[] buf1; return NULL; } SWIGINTERN PyObject *_wrap_new_ClientEasy__SWIG_5(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; char *arg1 = (char *) 0 ; int res1 ; char *buf1 = 0 ; int alloc1 = 0 ; PyObject * obj0 = 0 ; Prelude::ClientEasy *result = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:new_ClientEasy",&obj0)) SWIG_fail; res1 = SWIG_AsCharPtrAndSize(obj0, &buf1, NULL, &alloc1); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_ClientEasy" "', argument " "1"" of type '" "char const *""'"); } arg1 = reinterpret_cast< char * >(buf1); try { result = (Prelude::ClientEasy *)new Prelude::ClientEasy((char const *)arg1); } catch(Prelude::PreludeError &_e) { SWIG_Python_Raise(SWIG_NewPointerObj((new Prelude::PreludeError(static_cast< const Prelude::PreludeError& >(_e))),SWIGTYPE_p_Prelude__PreludeError,SWIG_POINTER_OWN), "Prelude::PreludeError", SWIGTYPE_p_Prelude__PreludeError); SWIG_fail; } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Prelude__ClientEasy, SWIG_POINTER_NEW | 0 ); if (alloc1 == SWIG_NEWOBJ) delete[] buf1; return resultobj; fail: if (alloc1 == SWIG_NEWOBJ) delete[] buf1; return NULL; } SWIGINTERN PyObject *_wrap_new_ClientEasy(PyObject *self, PyObject *args) { int argc; PyObject *argv[7]; int ii; if (!PyTuple_Check(args)) SWIG_fail; argc = (int)PyObject_Length(args); for (ii = 0; (ii < argc) && (ii < 6); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } if (argc == 1) { int _v; int res = SWIG_AsCharPtrAndSize(argv[0], 0, NULL, 0); _v = SWIG_CheckState(res); if (_v) { return _wrap_new_ClientEasy__SWIG_5(self, args); } } if (argc == 2) { int _v; int res = SWIG_AsCharPtrAndSize(argv[0], 0, NULL, 0); _v = SWIG_CheckState(res); if (_v) { { int res = SWIG_AsVal_int(argv[1], NULL); _v = SWIG_CheckState(res); } if (_v) { return _wrap_new_ClientEasy__SWIG_4(self, args); } } } if (argc == 3) { int _v; int res = SWIG_AsCharPtrAndSize(argv[0], 0, NULL, 0); _v = SWIG_CheckState(res); if (_v) { { int res = SWIG_AsVal_int(argv[1], NULL); _v = SWIG_CheckState(res); } if (_v) { int res = SWIG_AsCharPtrAndSize(argv[2], 0, NULL, 0); _v = SWIG_CheckState(res); if (_v) { return _wrap_new_ClientEasy__SWIG_3(self, args); } } } } if (argc == 4) { int _v; int res = SWIG_AsCharPtrAndSize(argv[0], 0, NULL, 0); _v = SWIG_CheckState(res); if (_v) { { int res = SWIG_AsVal_int(argv[1], NULL); _v = SWIG_CheckState(res); } if (_v) { int res = SWIG_AsCharPtrAndSize(argv[2], 0, NULL, 0); _v = SWIG_CheckState(res); if (_v) { int res = SWIG_AsCharPtrAndSize(argv[3], 0, NULL, 0); _v = SWIG_CheckState(res); if (_v) { return _wrap_new_ClientEasy__SWIG_2(self, args); } } } } } if (argc == 5) { int _v; int res = SWIG_AsCharPtrAndSize(argv[0], 0, NULL, 0); _v = SWIG_CheckState(res); if (_v) { { int res = SWIG_AsVal_int(argv[1], NULL); _v = SWIG_CheckState(res); } if (_v) { int res = SWIG_AsCharPtrAndSize(argv[2], 0, NULL, 0); _v = SWIG_CheckState(res); if (_v) { int res = SWIG_AsCharPtrAndSize(argv[3], 0, NULL, 0); _v = SWIG_CheckState(res); if (_v) { int res = SWIG_AsCharPtrAndSize(argv[4], 0, NULL, 0); _v = SWIG_CheckState(res); if (_v) { return _wrap_new_ClientEasy__SWIG_1(self, args); } } } } } } if (argc == 6) { int _v; int res = SWIG_AsCharPtrAndSize(argv[0], 0, NULL, 0); _v = SWIG_CheckState(res); if (_v) { { int res = SWIG_AsVal_int(argv[1], NULL); _v = SWIG_CheckState(res); } if (_v) { int res = SWIG_AsCharPtrAndSize(argv[2], 0, NULL, 0); _v = SWIG_CheckState(res); if (_v) { int res = SWIG_AsCharPtrAndSize(argv[3], 0, NULL, 0); _v = SWIG_CheckState(res); if (_v) { int res = SWIG_AsCharPtrAndSize(argv[4], 0, NULL, 0); _v = SWIG_CheckState(res); if (_v) { int res = SWIG_AsCharPtrAndSize(argv[5], 0, NULL, 0); _v = SWIG_CheckState(res); if (_v) { return _wrap_new_ClientEasy__SWIG_0(self, args); } } } } } } } fail: SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'new_ClientEasy'.\n" " Possible C/C++ prototypes are:\n" " Prelude::ClientEasy(char const *,int,char const *,char const *,char const *,char const *)\n" " Prelude::ClientEasy(char const *,int,char const *,char const *,char const *)\n" " Prelude::ClientEasy(char const *,int,char const *,char const *)\n" " Prelude::ClientEasy(char const *,int,char const *)\n" " Prelude::ClientEasy(char const *,int)\n" " Prelude::ClientEasy(char const *)\n"); return NULL; } SWIGINTERN PyObject *_wrap_delete_ClientEasy(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; Prelude::ClientEasy *arg1 = (Prelude::ClientEasy *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:delete_ClientEasy",&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Prelude__ClientEasy, SWIG_POINTER_DISOWN | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_ClientEasy" "', argument " "1"" of type '" "Prelude::ClientEasy *""'"); } arg1 = reinterpret_cast< Prelude::ClientEasy * >(argp1); delete arg1; resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *ClientEasy_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *obj; if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL; SWIG_TypeNewClientData(SWIGTYPE_p_Prelude__ClientEasy, SWIG_NewClientData(obj)); return SWIG_Py_Void(); } SWIGINTERN PyObject *_wrap_new_IDMEFCriterion(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; Prelude::IDMEFCriterion *result = 0 ; if (!PyArg_ParseTuple(args,(char *)":new_IDMEFCriterion")) SWIG_fail; result = (Prelude::IDMEFCriterion *)new Prelude::IDMEFCriterion(); resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Prelude__IDMEFCriterion, SWIG_POINTER_NEW | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_delete_IDMEFCriterion(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; Prelude::IDMEFCriterion *arg1 = (Prelude::IDMEFCriterion *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:delete_IDMEFCriterion",&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Prelude__IDMEFCriterion, SWIG_POINTER_DISOWN | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_IDMEFCriterion" "', argument " "1"" of type '" "Prelude::IDMEFCriterion *""'"); } arg1 = reinterpret_cast< Prelude::IDMEFCriterion * >(argp1); delete arg1; resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *IDMEFCriterion_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *obj; if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL; SWIG_TypeNewClientData(SWIGTYPE_p_Prelude__IDMEFCriterion, SWIG_NewClientData(obj)); return SWIG_Py_Void(); } SWIGINTERN PyObject *_wrap_delete_IDMEFCriteria(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; Prelude::IDMEFCriteria *arg1 = (Prelude::IDMEFCriteria *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:delete_IDMEFCriteria",&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Prelude__IDMEFCriteria, SWIG_POINTER_DISOWN | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_IDMEFCriteria" "', argument " "1"" of type '" "Prelude::IDMEFCriteria *""'"); } arg1 = reinterpret_cast< Prelude::IDMEFCriteria * >(argp1); delete arg1; resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_new_IDMEFCriteria__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; Prelude::IDMEFCriteria *result = 0 ; if (!PyArg_ParseTuple(args,(char *)":new_IDMEFCriteria")) SWIG_fail; try { result = (Prelude::IDMEFCriteria *)new Prelude::IDMEFCriteria(); } catch(Prelude::PreludeError &_e) { SWIG_Python_Raise(SWIG_NewPointerObj((new Prelude::PreludeError(static_cast< const Prelude::PreludeError& >(_e))),SWIGTYPE_p_Prelude__PreludeError,SWIG_POINTER_OWN), "Prelude::PreludeError", SWIGTYPE_p_Prelude__PreludeError); SWIG_fail; } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Prelude__IDMEFCriteria, SWIG_POINTER_NEW | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_new_IDMEFCriteria__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; Prelude::IDMEFCriteria *arg1 = 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; Prelude::IDMEFCriteria *result = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:new_IDMEFCriteria",&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1, SWIGTYPE_p_Prelude__IDMEFCriteria, 0 | 0); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_IDMEFCriteria" "', argument " "1"" of type '" "Prelude::IDMEFCriteria const &""'"); } if (!argp1) { SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_IDMEFCriteria" "', argument " "1"" of type '" "Prelude::IDMEFCriteria const &""'"); } arg1 = reinterpret_cast< Prelude::IDMEFCriteria * >(argp1); try { result = (Prelude::IDMEFCriteria *)new Prelude::IDMEFCriteria((Prelude::IDMEFCriteria const &)*arg1); } catch(Prelude::PreludeError &_e) { SWIG_Python_Raise(SWIG_NewPointerObj((new Prelude::PreludeError(static_cast< const Prelude::PreludeError& >(_e))),SWIGTYPE_p_Prelude__PreludeError,SWIG_POINTER_OWN), "Prelude::PreludeError", SWIGTYPE_p_Prelude__PreludeError); SWIG_fail; } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Prelude__IDMEFCriteria, SWIG_POINTER_NEW | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_new_IDMEFCriteria__SWIG_2(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; char *arg1 = (char *) 0 ; int res1 ; char *buf1 = 0 ; int alloc1 = 0 ; PyObject * obj0 = 0 ; Prelude::IDMEFCriteria *result = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:new_IDMEFCriteria",&obj0)) SWIG_fail; res1 = SWIG_AsCharPtrAndSize(obj0, &buf1, NULL, &alloc1); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_IDMEFCriteria" "', argument " "1"" of type '" "char const *""'"); } arg1 = reinterpret_cast< char * >(buf1); try { result = (Prelude::IDMEFCriteria *)new Prelude::IDMEFCriteria((char const *)arg1); } catch(Prelude::PreludeError &_e) { SWIG_Python_Raise(SWIG_NewPointerObj((new Prelude::PreludeError(static_cast< const Prelude::PreludeError& >(_e))),SWIGTYPE_p_Prelude__PreludeError,SWIG_POINTER_OWN), "Prelude::PreludeError", SWIGTYPE_p_Prelude__PreludeError); SWIG_fail; } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Prelude__IDMEFCriteria, SWIG_POINTER_NEW | 0 ); if (alloc1 == SWIG_NEWOBJ) delete[] buf1; return resultobj; fail: if (alloc1 == SWIG_NEWOBJ) delete[] buf1; return NULL; } SWIGINTERN PyObject *_wrap_new_IDMEFCriteria__SWIG_3(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; std::string *arg1 = 0 ; int res1 = SWIG_OLDOBJ ; PyObject * obj0 = 0 ; Prelude::IDMEFCriteria *result = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:new_IDMEFCriteria",&obj0)) SWIG_fail; { std::string *ptr = (std::string *)0; res1 = SWIG_AsPtr_std_string(obj0, &ptr); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_IDMEFCriteria" "', argument " "1"" of type '" "std::string const &""'"); } if (!ptr) { SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_IDMEFCriteria" "', argument " "1"" of type '" "std::string const &""'"); } arg1 = ptr; } try { result = (Prelude::IDMEFCriteria *)new Prelude::IDMEFCriteria((std::string const &)*arg1); } catch(Prelude::PreludeError &_e) { SWIG_Python_Raise(SWIG_NewPointerObj((new Prelude::PreludeError(static_cast< const Prelude::PreludeError& >(_e))),SWIGTYPE_p_Prelude__PreludeError,SWIG_POINTER_OWN), "Prelude::PreludeError", SWIGTYPE_p_Prelude__PreludeError); SWIG_fail; } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Prelude__IDMEFCriteria, SWIG_POINTER_NEW | 0 ); if (SWIG_IsNewObj(res1)) delete arg1; return resultobj; fail: if (SWIG_IsNewObj(res1)) delete arg1; return NULL; } SWIGINTERN PyObject *_wrap_new_IDMEFCriteria__SWIG_4(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_criteria_t *arg1 = (idmef_criteria_t *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; Prelude::IDMEFCriteria *result = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:new_IDMEFCriteria",&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_idmef_criteria_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_IDMEFCriteria" "', argument " "1"" of type '" "idmef_criteria_t *""'"); } arg1 = reinterpret_cast< idmef_criteria_t * >(argp1); try { result = (Prelude::IDMEFCriteria *)new Prelude::IDMEFCriteria(arg1); } catch(Prelude::PreludeError &_e) { SWIG_Python_Raise(SWIG_NewPointerObj((new Prelude::PreludeError(static_cast< const Prelude::PreludeError& >(_e))),SWIGTYPE_p_Prelude__PreludeError,SWIG_POINTER_OWN), "Prelude::PreludeError", SWIGTYPE_p_Prelude__PreludeError); SWIG_fail; } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Prelude__IDMEFCriteria, SWIG_POINTER_NEW | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_new_IDMEFCriteria(PyObject *self, PyObject *args) { int argc; PyObject *argv[2]; int ii; if (!PyTuple_Check(args)) SWIG_fail; argc = (int)PyObject_Length(args); for (ii = 0; (ii < argc) && (ii < 1); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } if (argc == 0) { return _wrap_new_IDMEFCriteria__SWIG_0(self, args); } if (argc == 1) { int _v; int res = SWIG_ConvertPtr(argv[0], 0, SWIGTYPE_p_Prelude__IDMEFCriteria, 0); _v = SWIG_CheckState(res); if (_v) { return _wrap_new_IDMEFCriteria__SWIG_1(self, args); } } if (argc == 1) { int _v; void *vptr = 0; int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_idmef_criteria_t, 0); _v = SWIG_CheckState(res); if (_v) { return _wrap_new_IDMEFCriteria__SWIG_4(self, args); } } if (argc == 1) { int _v; int res = SWIG_AsPtr_std_string(argv[0], (std::string**)(0)); _v = SWIG_CheckState(res); if (_v) { return _wrap_new_IDMEFCriteria__SWIG_3(self, args); } } if (argc == 1) { int _v; int res = SWIG_AsCharPtrAndSize(argv[0], 0, NULL, 0); _v = SWIG_CheckState(res); if (_v) { return _wrap_new_IDMEFCriteria__SWIG_2(self, args); } } fail: SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'new_IDMEFCriteria'.\n" " Possible C/C++ prototypes are:\n" " Prelude::IDMEFCriteria()\n" " Prelude::IDMEFCriteria(Prelude::IDMEFCriteria const &)\n" " Prelude::IDMEFCriteria(char const *)\n" " Prelude::IDMEFCriteria(std::string const &)\n" " Prelude::IDMEFCriteria(idmef_criteria_t *)\n"); return NULL; } SWIGINTERN PyObject *_wrap_IDMEFCriteria_Match(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; Prelude::IDMEFCriteria *arg1 = (Prelude::IDMEFCriteria *) 0 ; Prelude::IDMEF *arg2 = (Prelude::IDMEF *) 0 ; void *argp1 = 0 ; int res1 = 0 ; void *argp2 = 0 ; int res2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; int result; if (!PyArg_ParseTuple(args,(char *)"OO:IDMEFCriteria_Match",&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Prelude__IDMEFCriteria, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IDMEFCriteria_Match" "', argument " "1"" of type '" "Prelude::IDMEFCriteria *""'"); } arg1 = reinterpret_cast< Prelude::IDMEFCriteria * >(argp1); res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_Prelude__IDMEF, 0 | 0 ); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "IDMEFCriteria_Match" "', argument " "2"" of type '" "Prelude::IDMEF *""'"); } arg2 = reinterpret_cast< Prelude::IDMEF * >(argp2); try { result = (int)(arg1)->Match(arg2); } catch(Prelude::PreludeError &_e) { SWIG_Python_Raise(SWIG_NewPointerObj((new Prelude::PreludeError(static_cast< const Prelude::PreludeError& >(_e))),SWIGTYPE_p_Prelude__PreludeError,SWIG_POINTER_OWN), "Prelude::PreludeError", SWIGTYPE_p_Prelude__PreludeError); SWIG_fail; } resultobj = SWIG_From_int(static_cast< int >(result)); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_IDMEFCriteria_Clone(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; Prelude::IDMEFCriteria *arg1 = (Prelude::IDMEFCriteria *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; Prelude::IDMEFCriteria result; if (!PyArg_ParseTuple(args,(char *)"O:IDMEFCriteria_Clone",&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Prelude__IDMEFCriteria, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IDMEFCriteria_Clone" "', argument " "1"" of type '" "Prelude::IDMEFCriteria *""'"); } arg1 = reinterpret_cast< Prelude::IDMEFCriteria * >(argp1); try { result = (arg1)->Clone(); } catch(Prelude::PreludeError &_e) { SWIG_Python_Raise(SWIG_NewPointerObj((new Prelude::PreludeError(static_cast< const Prelude::PreludeError& >(_e))),SWIGTYPE_p_Prelude__PreludeError,SWIG_POINTER_OWN), "Prelude::PreludeError", SWIGTYPE_p_Prelude__PreludeError); SWIG_fail; } resultobj = SWIG_NewPointerObj((new Prelude::IDMEFCriteria(static_cast< const Prelude::IDMEFCriteria& >(result))), SWIGTYPE_p_Prelude__IDMEFCriteria, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_IDMEFCriteria_ANDCriteria(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; Prelude::IDMEFCriteria *arg1 = (Prelude::IDMEFCriteria *) 0 ; Prelude::IDMEFCriteria *arg2 = 0 ; void *argp1 = 0 ; int res1 = 0 ; void *argp2 = 0 ; int res2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:IDMEFCriteria_ANDCriteria",&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Prelude__IDMEFCriteria, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IDMEFCriteria_ANDCriteria" "', argument " "1"" of type '" "Prelude::IDMEFCriteria *""'"); } arg1 = reinterpret_cast< Prelude::IDMEFCriteria * >(argp1); res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_Prelude__IDMEFCriteria, 0 | 0); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "IDMEFCriteria_ANDCriteria" "', argument " "2"" of type '" "Prelude::IDMEFCriteria const &""'"); } if (!argp2) { SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "IDMEFCriteria_ANDCriteria" "', argument " "2"" of type '" "Prelude::IDMEFCriteria const &""'"); } arg2 = reinterpret_cast< Prelude::IDMEFCriteria * >(argp2); try { (arg1)->ANDCriteria((Prelude::IDMEFCriteria const &)*arg2); } catch(Prelude::PreludeError &_e) { SWIG_Python_Raise(SWIG_NewPointerObj((new Prelude::PreludeError(static_cast< const Prelude::PreludeError& >(_e))),SWIGTYPE_p_Prelude__PreludeError,SWIG_POINTER_OWN), "Prelude::PreludeError", SWIGTYPE_p_Prelude__PreludeError); SWIG_fail; } resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_IDMEFCriteria_ORCriteria(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; Prelude::IDMEFCriteria *arg1 = (Prelude::IDMEFCriteria *) 0 ; Prelude::IDMEFCriteria *arg2 = 0 ; void *argp1 = 0 ; int res1 = 0 ; void *argp2 = 0 ; int res2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:IDMEFCriteria_ORCriteria",&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Prelude__IDMEFCriteria, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IDMEFCriteria_ORCriteria" "', argument " "1"" of type '" "Prelude::IDMEFCriteria *""'"); } arg1 = reinterpret_cast< Prelude::IDMEFCriteria * >(argp1); res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_Prelude__IDMEFCriteria, 0 | 0); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "IDMEFCriteria_ORCriteria" "', argument " "2"" of type '" "Prelude::IDMEFCriteria const &""'"); } if (!argp2) { SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "IDMEFCriteria_ORCriteria" "', argument " "2"" of type '" "Prelude::IDMEFCriteria const &""'"); } arg2 = reinterpret_cast< Prelude::IDMEFCriteria * >(argp2); try { (arg1)->ORCriteria((Prelude::IDMEFCriteria const &)*arg2); } catch(Prelude::PreludeError &_e) { SWIG_Python_Raise(SWIG_NewPointerObj((new Prelude::PreludeError(static_cast< const Prelude::PreludeError& >(_e))),SWIGTYPE_p_Prelude__PreludeError,SWIG_POINTER_OWN), "Prelude::PreludeError", SWIGTYPE_p_Prelude__PreludeError); SWIG_fail; } resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_IDMEFCriteria_ToString(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; Prelude::IDMEFCriteria *arg1 = (Prelude::IDMEFCriteria *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; std::string result; if (!PyArg_ParseTuple(args,(char *)"O:IDMEFCriteria_ToString",&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Prelude__IDMEFCriteria, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IDMEFCriteria_ToString" "', argument " "1"" of type '" "Prelude::IDMEFCriteria const *""'"); } arg1 = reinterpret_cast< Prelude::IDMEFCriteria * >(argp1); try { result = ((Prelude::IDMEFCriteria const *)arg1)->ToString(); } catch(Prelude::PreludeError &_e) { SWIG_Python_Raise(SWIG_NewPointerObj((new Prelude::PreludeError(static_cast< const Prelude::PreludeError& >(_e))),SWIGTYPE_p_Prelude__PreludeError,SWIG_POINTER_OWN), "Prelude::PreludeError", SWIGTYPE_p_Prelude__PreludeError); SWIG_fail; } resultobj = SWIG_From_std_string(static_cast< std::string >(result)); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_IDMEFCriteria___str__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; Prelude::IDMEFCriteria *arg1 = (Prelude::IDMEFCriteria *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; std::string result; if (!PyArg_ParseTuple(args,(char *)"O:IDMEFCriteria___str__",&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Prelude__IDMEFCriteria, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IDMEFCriteria___str__" "', argument " "1"" of type '" "Prelude::IDMEFCriteria const *""'"); } arg1 = reinterpret_cast< Prelude::IDMEFCriteria * >(argp1); try { result = ((Prelude::IDMEFCriteria const *)arg1)->operator const std::string(); } catch(Prelude::PreludeError &_e) { SWIG_Python_Raise(SWIG_NewPointerObj((new Prelude::PreludeError(static_cast< const Prelude::PreludeError& >(_e))),SWIGTYPE_p_Prelude__PreludeError,SWIG_POINTER_OWN), "Prelude::PreludeError", SWIGTYPE_p_Prelude__PreludeError); SWIG_fail; } resultobj = SWIG_From_std_string(static_cast< std::string >(result)); return resultobj; fail: return NULL; } SWIGINTERN PyObject *IDMEFCriteria_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *obj; if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL; SWIG_TypeNewClientData(SWIGTYPE_p_Prelude__IDMEFCriteria, SWIG_NewClientData(obj)); return SWIG_Py_Void(); } SWIGINTERN PyObject *_wrap_IDMEFValue_GetType(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; Prelude::IDMEFValue *arg1 = (Prelude::IDMEFValue *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; idmef_value_type_id_t result; if (!PyArg_ParseTuple(args,(char *)"O:IDMEFValue_GetType",&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Prelude__IDMEFValue, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IDMEFValue_GetType" "', argument " "1"" of type '" "Prelude::IDMEFValue const *""'"); } arg1 = reinterpret_cast< Prelude::IDMEFValue * >(argp1); try { result = ((Prelude::IDMEFValue const *)arg1)->GetType(); } catch(Prelude::PreludeError &_e) { SWIG_Python_Raise(SWIG_NewPointerObj((new Prelude::PreludeError(static_cast< const Prelude::PreludeError& >(_e))),SWIGTYPE_p_Prelude__PreludeError,SWIG_POINTER_OWN), "Prelude::PreludeError", SWIGTYPE_p_Prelude__PreludeError); SWIG_fail; } resultobj = SWIG_NewPointerObj((new idmef_value_type_id_t(static_cast< const idmef_value_type_id_t& >(result))), SWIGTYPE_p_idmef_value_type_id_t, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_IDMEFValue_IsNull(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; Prelude::IDMEFValue *arg1 = (Prelude::IDMEFValue *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; bool result; if (!PyArg_ParseTuple(args,(char *)"O:IDMEFValue_IsNull",&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Prelude__IDMEFValue, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IDMEFValue_IsNull" "', argument " "1"" of type '" "Prelude::IDMEFValue const *""'"); } arg1 = reinterpret_cast< Prelude::IDMEFValue * >(argp1); try { result = (bool)((Prelude::IDMEFValue const *)arg1)->IsNull(); } catch(Prelude::PreludeError &_e) { SWIG_Python_Raise(SWIG_NewPointerObj((new Prelude::PreludeError(static_cast< const Prelude::PreludeError& >(_e))),SWIGTYPE_p_Prelude__PreludeError,SWIG_POINTER_OWN), "Prelude::PreludeError", SWIGTYPE_p_Prelude__PreludeError); SWIG_fail; } resultobj = SWIG_From_bool(static_cast< bool >(result)); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_new_IDMEFValue__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; Prelude::IDMEFValue *result = 0 ; if (!PyArg_ParseTuple(args,(char *)":new_IDMEFValue")) SWIG_fail; try { result = (Prelude::IDMEFValue *)new Prelude::IDMEFValue(); } catch(Prelude::PreludeError &_e) { SWIG_Python_Raise(SWIG_NewPointerObj((new Prelude::PreludeError(static_cast< const Prelude::PreludeError& >(_e))),SWIGTYPE_p_Prelude__PreludeError,SWIG_POINTER_OWN), "Prelude::PreludeError", SWIGTYPE_p_Prelude__PreludeError); SWIG_fail; } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Prelude__IDMEFValue, SWIG_POINTER_NEW | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_delete_IDMEFValue(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; Prelude::IDMEFValue *arg1 = (Prelude::IDMEFValue *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:delete_IDMEFValue",&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Prelude__IDMEFValue, SWIG_POINTER_DISOWN | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_IDMEFValue" "', argument " "1"" of type '" "Prelude::IDMEFValue *""'"); } arg1 = reinterpret_cast< Prelude::IDMEFValue * >(argp1); delete arg1; resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_new_IDMEFValue__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; Prelude::IDMEFValue *arg1 = 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; Prelude::IDMEFValue *result = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:new_IDMEFValue",&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1, SWIGTYPE_p_Prelude__IDMEFValue, 0 | 0); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_IDMEFValue" "', argument " "1"" of type '" "Prelude::IDMEFValue const &""'"); } if (!argp1) { SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_IDMEFValue" "', argument " "1"" of type '" "Prelude::IDMEFValue const &""'"); } arg1 = reinterpret_cast< Prelude::IDMEFValue * >(argp1); try { result = (Prelude::IDMEFValue *)new Prelude::IDMEFValue((Prelude::IDMEFValue const &)*arg1); } catch(Prelude::PreludeError &_e) { SWIG_Python_Raise(SWIG_NewPointerObj((new Prelude::PreludeError(static_cast< const Prelude::PreludeError& >(_e))),SWIGTYPE_p_Prelude__PreludeError,SWIG_POINTER_OWN), "Prelude::PreludeError", SWIGTYPE_p_Prelude__PreludeError); SWIG_fail; } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Prelude__IDMEFValue, SWIG_POINTER_NEW | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_new_IDMEFValue__SWIG_2(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; std::vector< Prelude::IDMEFValue,std::allocator< Prelude::IDMEFValue > > arg1 ; PyObject * obj0 = 0 ; Prelude::IDMEFValue *result = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:new_IDMEFValue",&obj0)) SWIG_fail; { std::vector > *ptr = (std::vector > *)0; int res = swig::asptr(obj0, &ptr); if (!SWIG_IsOK(res) || !ptr) { SWIG_exception_fail(SWIG_ArgError((ptr ? res : SWIG_TypeError)), "in method '" "new_IDMEFValue" "', argument " "1"" of type '" "std::vector< Prelude::IDMEFValue,std::allocator< Prelude::IDMEFValue > >""'"); } arg1 = *ptr; if (SWIG_IsNewObj(res)) delete ptr; } try { result = (Prelude::IDMEFValue *)new Prelude::IDMEFValue(arg1); } catch(Prelude::PreludeError &_e) { SWIG_Python_Raise(SWIG_NewPointerObj((new Prelude::PreludeError(static_cast< const Prelude::PreludeError& >(_e))),SWIGTYPE_p_Prelude__PreludeError,SWIG_POINTER_OWN), "Prelude::PreludeError", SWIGTYPE_p_Prelude__PreludeError); SWIG_fail; } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Prelude__IDMEFValue, SWIG_POINTER_NEW | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_new_IDMEFValue__SWIG_3(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_value_t *arg1 = (idmef_value_t *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; Prelude::IDMEFValue *result = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:new_IDMEFValue",&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_idmef_value_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_IDMEFValue" "', argument " "1"" of type '" "idmef_value_t *""'"); } arg1 = reinterpret_cast< idmef_value_t * >(argp1); try { result = (Prelude::IDMEFValue *)new Prelude::IDMEFValue(arg1); } catch(Prelude::PreludeError &_e) { SWIG_Python_Raise(SWIG_NewPointerObj((new Prelude::PreludeError(static_cast< const Prelude::PreludeError& >(_e))),SWIGTYPE_p_Prelude__PreludeError,SWIG_POINTER_OWN), "Prelude::PreludeError", SWIGTYPE_p_Prelude__PreludeError); SWIG_fail; } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Prelude__IDMEFValue, SWIG_POINTER_NEW | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_new_IDMEFValue__SWIG_4(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; std::string arg1 ; PyObject * obj0 = 0 ; Prelude::IDMEFValue *result = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:new_IDMEFValue",&obj0)) SWIG_fail; { std::string *ptr = (std::string *)0; int res = SWIG_AsPtr_std_string(obj0, &ptr); if (!SWIG_IsOK(res) || !ptr) { SWIG_exception_fail(SWIG_ArgError((ptr ? res : SWIG_TypeError)), "in method '" "new_IDMEFValue" "', argument " "1"" of type '" "std::string""'"); } arg1 = *ptr; if (SWIG_IsNewObj(res)) delete ptr; } try { result = (Prelude::IDMEFValue *)new Prelude::IDMEFValue(arg1); } catch(Prelude::PreludeError &_e) { SWIG_Python_Raise(SWIG_NewPointerObj((new Prelude::PreludeError(static_cast< const Prelude::PreludeError& >(_e))),SWIGTYPE_p_Prelude__PreludeError,SWIG_POINTER_OWN), "Prelude::PreludeError", SWIGTYPE_p_Prelude__PreludeError); SWIG_fail; } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Prelude__IDMEFValue, SWIG_POINTER_NEW | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_new_IDMEFValue__SWIG_5(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; char *arg1 = (char *) 0 ; int res1 ; char *buf1 = 0 ; int alloc1 = 0 ; PyObject * obj0 = 0 ; Prelude::IDMEFValue *result = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:new_IDMEFValue",&obj0)) SWIG_fail; res1 = SWIG_AsCharPtrAndSize(obj0, &buf1, NULL, &alloc1); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_IDMEFValue" "', argument " "1"" of type '" "char const *""'"); } arg1 = reinterpret_cast< char * >(buf1); try { result = (Prelude::IDMEFValue *)new Prelude::IDMEFValue((char const *)arg1); } catch(Prelude::PreludeError &_e) { SWIG_Python_Raise(SWIG_NewPointerObj((new Prelude::PreludeError(static_cast< const Prelude::PreludeError& >(_e))),SWIGTYPE_p_Prelude__PreludeError,SWIG_POINTER_OWN), "Prelude::PreludeError", SWIGTYPE_p_Prelude__PreludeError); SWIG_fail; } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Prelude__IDMEFValue, SWIG_POINTER_NEW | 0 ); if (alloc1 == SWIG_NEWOBJ) delete[] buf1; return resultobj; fail: if (alloc1 == SWIG_NEWOBJ) delete[] buf1; return NULL; } SWIGINTERN PyObject *_wrap_new_IDMEFValue__SWIG_6(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; int8_t arg1 ; char val1 ; int ecode1 = 0 ; PyObject * obj0 = 0 ; Prelude::IDMEFValue *result = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:new_IDMEFValue",&obj0)) SWIG_fail; ecode1 = SWIG_AsVal_char(obj0, &val1); if (!SWIG_IsOK(ecode1)) { SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_IDMEFValue" "', argument " "1"" of type '" "int8_t""'"); } arg1 = static_cast< int8_t >(val1); try { result = (Prelude::IDMEFValue *)new Prelude::IDMEFValue(arg1); } catch(Prelude::PreludeError &_e) { SWIG_Python_Raise(SWIG_NewPointerObj((new Prelude::PreludeError(static_cast< const Prelude::PreludeError& >(_e))),SWIGTYPE_p_Prelude__PreludeError,SWIG_POINTER_OWN), "Prelude::PreludeError", SWIGTYPE_p_Prelude__PreludeError); SWIG_fail; } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Prelude__IDMEFValue, SWIG_POINTER_NEW | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_new_IDMEFValue__SWIG_7(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; uint8_t arg1 ; unsigned char val1 ; int ecode1 = 0 ; PyObject * obj0 = 0 ; Prelude::IDMEFValue *result = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:new_IDMEFValue",&obj0)) SWIG_fail; ecode1 = SWIG_AsVal_unsigned_SS_char(obj0, &val1); if (!SWIG_IsOK(ecode1)) { SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_IDMEFValue" "', argument " "1"" of type '" "uint8_t""'"); } arg1 = static_cast< uint8_t >(val1); try { result = (Prelude::IDMEFValue *)new Prelude::IDMEFValue(arg1); } catch(Prelude::PreludeError &_e) { SWIG_Python_Raise(SWIG_NewPointerObj((new Prelude::PreludeError(static_cast< const Prelude::PreludeError& >(_e))),SWIGTYPE_p_Prelude__PreludeError,SWIG_POINTER_OWN), "Prelude::PreludeError", SWIGTYPE_p_Prelude__PreludeError); SWIG_fail; } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Prelude__IDMEFValue, SWIG_POINTER_NEW | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_new_IDMEFValue__SWIG_8(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; int16_t arg1 ; short val1 ; int ecode1 = 0 ; PyObject * obj0 = 0 ; Prelude::IDMEFValue *result = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:new_IDMEFValue",&obj0)) SWIG_fail; ecode1 = SWIG_AsVal_short(obj0, &val1); if (!SWIG_IsOK(ecode1)) { SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_IDMEFValue" "', argument " "1"" of type '" "int16_t""'"); } arg1 = static_cast< int16_t >(val1); try { result = (Prelude::IDMEFValue *)new Prelude::IDMEFValue(arg1); } catch(Prelude::PreludeError &_e) { SWIG_Python_Raise(SWIG_NewPointerObj((new Prelude::PreludeError(static_cast< const Prelude::PreludeError& >(_e))),SWIGTYPE_p_Prelude__PreludeError,SWIG_POINTER_OWN), "Prelude::PreludeError", SWIGTYPE_p_Prelude__PreludeError); SWIG_fail; } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Prelude__IDMEFValue, SWIG_POINTER_NEW | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_new_IDMEFValue__SWIG_9(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; uint16_t arg1 ; unsigned short val1 ; int ecode1 = 0 ; PyObject * obj0 = 0 ; Prelude::IDMEFValue *result = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:new_IDMEFValue",&obj0)) SWIG_fail; ecode1 = SWIG_AsVal_unsigned_SS_short(obj0, &val1); if (!SWIG_IsOK(ecode1)) { SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_IDMEFValue" "', argument " "1"" of type '" "uint16_t""'"); } arg1 = static_cast< uint16_t >(val1); try { result = (Prelude::IDMEFValue *)new Prelude::IDMEFValue(arg1); } catch(Prelude::PreludeError &_e) { SWIG_Python_Raise(SWIG_NewPointerObj((new Prelude::PreludeError(static_cast< const Prelude::PreludeError& >(_e))),SWIGTYPE_p_Prelude__PreludeError,SWIG_POINTER_OWN), "Prelude::PreludeError", SWIGTYPE_p_Prelude__PreludeError); SWIG_fail; } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Prelude__IDMEFValue, SWIG_POINTER_NEW | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_new_IDMEFValue__SWIG_10(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; int32_t arg1 ; int val1 ; int ecode1 = 0 ; PyObject * obj0 = 0 ; Prelude::IDMEFValue *result = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:new_IDMEFValue",&obj0)) SWIG_fail; ecode1 = SWIG_AsVal_int(obj0, &val1); if (!SWIG_IsOK(ecode1)) { SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_IDMEFValue" "', argument " "1"" of type '" "int32_t""'"); } arg1 = static_cast< int32_t >(val1); try { result = (Prelude::IDMEFValue *)new Prelude::IDMEFValue(arg1); } catch(Prelude::PreludeError &_e) { SWIG_Python_Raise(SWIG_NewPointerObj((new Prelude::PreludeError(static_cast< const Prelude::PreludeError& >(_e))),SWIGTYPE_p_Prelude__PreludeError,SWIG_POINTER_OWN), "Prelude::PreludeError", SWIGTYPE_p_Prelude__PreludeError); SWIG_fail; } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Prelude__IDMEFValue, SWIG_POINTER_NEW | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_new_IDMEFValue__SWIG_11(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; uint32_t arg1 ; unsigned int val1 ; int ecode1 = 0 ; PyObject * obj0 = 0 ; Prelude::IDMEFValue *result = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:new_IDMEFValue",&obj0)) SWIG_fail; ecode1 = SWIG_AsVal_unsigned_SS_int(obj0, &val1); if (!SWIG_IsOK(ecode1)) { SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_IDMEFValue" "', argument " "1"" of type '" "uint32_t""'"); } arg1 = static_cast< uint32_t >(val1); try { result = (Prelude::IDMEFValue *)new Prelude::IDMEFValue(arg1); } catch(Prelude::PreludeError &_e) { SWIG_Python_Raise(SWIG_NewPointerObj((new Prelude::PreludeError(static_cast< const Prelude::PreludeError& >(_e))),SWIGTYPE_p_Prelude__PreludeError,SWIG_POINTER_OWN), "Prelude::PreludeError", SWIGTYPE_p_Prelude__PreludeError); SWIG_fail; } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Prelude__IDMEFValue, SWIG_POINTER_NEW | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_new_IDMEFValue__SWIG_12(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; int64_t arg1 ; long long val1 ; int ecode1 = 0 ; PyObject * obj0 = 0 ; Prelude::IDMEFValue *result = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:new_IDMEFValue",&obj0)) SWIG_fail; ecode1 = SWIG_AsVal_long_SS_long(obj0, &val1); if (!SWIG_IsOK(ecode1)) { SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_IDMEFValue" "', argument " "1"" of type '" "int64_t""'"); } arg1 = static_cast< int64_t >(val1); try { result = (Prelude::IDMEFValue *)new Prelude::IDMEFValue(arg1); } catch(Prelude::PreludeError &_e) { SWIG_Python_Raise(SWIG_NewPointerObj((new Prelude::PreludeError(static_cast< const Prelude::PreludeError& >(_e))),SWIGTYPE_p_Prelude__PreludeError,SWIG_POINTER_OWN), "Prelude::PreludeError", SWIGTYPE_p_Prelude__PreludeError); SWIG_fail; } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Prelude__IDMEFValue, SWIG_POINTER_NEW | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_new_IDMEFValue__SWIG_13(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; uint64_t arg1 ; unsigned long long val1 ; int ecode1 = 0 ; PyObject * obj0 = 0 ; Prelude::IDMEFValue *result = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:new_IDMEFValue",&obj0)) SWIG_fail; ecode1 = SWIG_AsVal_unsigned_SS_long_SS_long(obj0, &val1); if (!SWIG_IsOK(ecode1)) { SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_IDMEFValue" "', argument " "1"" of type '" "uint64_t""'"); } arg1 = static_cast< uint64_t >(val1); try { result = (Prelude::IDMEFValue *)new Prelude::IDMEFValue(arg1); } catch(Prelude::PreludeError &_e) { SWIG_Python_Raise(SWIG_NewPointerObj((new Prelude::PreludeError(static_cast< const Prelude::PreludeError& >(_e))),SWIGTYPE_p_Prelude__PreludeError,SWIG_POINTER_OWN), "Prelude::PreludeError", SWIGTYPE_p_Prelude__PreludeError); SWIG_fail; } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Prelude__IDMEFValue, SWIG_POINTER_NEW | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_new_IDMEFValue__SWIG_14(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; float arg1 ; float val1 ; int ecode1 = 0 ; PyObject * obj0 = 0 ; Prelude::IDMEFValue *result = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:new_IDMEFValue",&obj0)) SWIG_fail; ecode1 = SWIG_AsVal_float(obj0, &val1); if (!SWIG_IsOK(ecode1)) { SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_IDMEFValue" "', argument " "1"" of type '" "float""'"); } arg1 = static_cast< float >(val1); try { result = (Prelude::IDMEFValue *)new Prelude::IDMEFValue(arg1); } catch(Prelude::PreludeError &_e) { SWIG_Python_Raise(SWIG_NewPointerObj((new Prelude::PreludeError(static_cast< const Prelude::PreludeError& >(_e))),SWIGTYPE_p_Prelude__PreludeError,SWIG_POINTER_OWN), "Prelude::PreludeError", SWIGTYPE_p_Prelude__PreludeError); SWIG_fail; } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Prelude__IDMEFValue, SWIG_POINTER_NEW | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_new_IDMEFValue__SWIG_15(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; double arg1 ; double val1 ; int ecode1 = 0 ; PyObject * obj0 = 0 ; Prelude::IDMEFValue *result = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:new_IDMEFValue",&obj0)) SWIG_fail; ecode1 = SWIG_AsVal_double(obj0, &val1); if (!SWIG_IsOK(ecode1)) { SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_IDMEFValue" "', argument " "1"" of type '" "double""'"); } arg1 = static_cast< double >(val1); try { result = (Prelude::IDMEFValue *)new Prelude::IDMEFValue(arg1); } catch(Prelude::PreludeError &_e) { SWIG_Python_Raise(SWIG_NewPointerObj((new Prelude::PreludeError(static_cast< const Prelude::PreludeError& >(_e))),SWIGTYPE_p_Prelude__PreludeError,SWIG_POINTER_OWN), "Prelude::PreludeError", SWIGTYPE_p_Prelude__PreludeError); SWIG_fail; } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Prelude__IDMEFValue, SWIG_POINTER_NEW | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_new_IDMEFValue__SWIG_16(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; Prelude::IDMEFTime *arg1 = 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; Prelude::IDMEFValue *result = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:new_IDMEFValue",&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1, SWIGTYPE_p_Prelude__IDMEFTime, 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_IDMEFValue" "', argument " "1"" of type '" "Prelude::IDMEFTime &""'"); } if (!argp1) { SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_IDMEFValue" "', argument " "1"" of type '" "Prelude::IDMEFTime &""'"); } arg1 = reinterpret_cast< Prelude::IDMEFTime * >(argp1); try { result = (Prelude::IDMEFValue *)new Prelude::IDMEFValue(*arg1); } catch(Prelude::PreludeError &_e) { SWIG_Python_Raise(SWIG_NewPointerObj((new Prelude::PreludeError(static_cast< const Prelude::PreludeError& >(_e))),SWIGTYPE_p_Prelude__PreludeError,SWIG_POINTER_OWN), "Prelude::PreludeError", SWIGTYPE_p_Prelude__PreludeError); SWIG_fail; } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Prelude__IDMEFValue, SWIG_POINTER_NEW | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_new_IDMEFValue(PyObject *self, PyObject *args) { int argc; PyObject *argv[2]; int ii; if (!PyTuple_Check(args)) SWIG_fail; argc = (int)PyObject_Length(args); for (ii = 0; (ii < argc) && (ii < 1); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } if (argc == 0) { return _wrap_new_IDMEFValue__SWIG_0(self, args); } if (argc == 1) { int _v; int res = SWIG_ConvertPtr(argv[0], 0, SWIGTYPE_p_Prelude__IDMEFValue, 0); _v = SWIG_CheckState(res); if (_v) { return _wrap_new_IDMEFValue__SWIG_1(self, args); } } if (argc == 1) { int _v; void *vptr = 0; int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_idmef_value_t, 0); _v = SWIG_CheckState(res); if (_v) { return _wrap_new_IDMEFValue__SWIG_3(self, args); } } if (argc == 1) { int _v; void *vptr = 0; int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_Prelude__IDMEFTime, 0); _v = SWIG_CheckState(res); if (_v) { return _wrap_new_IDMEFValue__SWIG_16(self, args); } } if (argc == 1) { int _v; { int res = SWIG_AsVal_unsigned_SS_char(argv[0], NULL); _v = SWIG_CheckState(res); } if (_v) { return _wrap_new_IDMEFValue__SWIG_7(self, args); } } if (argc == 1) { int _v; { int res = SWIG_AsVal_unsigned_SS_short(argv[0], NULL); _v = SWIG_CheckState(res); } if (_v) { return _wrap_new_IDMEFValue__SWIG_9(self, args); } } if (argc == 1) { int _v; { int res = SWIG_AsVal_short(argv[0], NULL); _v = SWIG_CheckState(res); } if (_v) { return _wrap_new_IDMEFValue__SWIG_8(self, args); } } if (argc == 1) { int _v; { int res = SWIG_AsVal_unsigned_SS_int(argv[0], NULL); _v = SWIG_CheckState(res); } if (_v) { return _wrap_new_IDMEFValue__SWIG_11(self, args); } } if (argc == 1) { int _v; { int res = SWIG_AsVal_int(argv[0], NULL); _v = SWIG_CheckState(res); } if (_v) { return _wrap_new_IDMEFValue__SWIG_10(self, args); } } if (argc == 1) { int _v; { int res = SWIG_AsVal_unsigned_SS_long_SS_long(argv[0], NULL); _v = SWIG_CheckState(res); } if (_v) { return _wrap_new_IDMEFValue__SWIG_13(self, args); } } if (argc == 1) { int _v; { int res = SWIG_AsVal_long_SS_long(argv[0], NULL); _v = SWIG_CheckState(res); } if (_v) { return _wrap_new_IDMEFValue__SWIG_12(self, args); } } if (argc == 1) { int _v; { int res = SWIG_AsVal_float(argv[0], NULL); _v = SWIG_CheckState(res); } if (_v) { return _wrap_new_IDMEFValue__SWIG_14(self, args); } } if (argc == 1) { int _v; { int res = SWIG_AsVal_double(argv[0], NULL); _v = SWIG_CheckState(res); } if (_v) { return _wrap_new_IDMEFValue__SWIG_15(self, args); } } if (argc == 1) { int _v; { int res = SWIG_AsVal_char(argv[0], NULL); _v = SWIG_CheckState(res); } if (_v) { return _wrap_new_IDMEFValue__SWIG_6(self, args); } } if (argc == 1) { int _v; int res = SWIG_AsPtr_std_string(argv[0], (std::string**)(0)); _v = SWIG_CheckState(res); if (_v) { return _wrap_new_IDMEFValue__SWIG_4(self, args); } } if (argc == 1) { int _v; int res = SWIG_AsCharPtrAndSize(argv[0], 0, NULL, 0); _v = SWIG_CheckState(res); if (_v) { return _wrap_new_IDMEFValue__SWIG_5(self, args); } } if (argc == 1) { int _v; int res = swig::asptr(argv[0], (std::vector >**)(0)); _v = SWIG_CheckState(res); if (_v) { return _wrap_new_IDMEFValue__SWIG_2(self, args); } } fail: SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'new_IDMEFValue'.\n" " Possible C/C++ prototypes are:\n" " Prelude::IDMEFValue()\n" " Prelude::IDMEFValue(Prelude::IDMEFValue const &)\n" " Prelude::IDMEFValue(std::vector< Prelude::IDMEFValue,std::allocator< Prelude::IDMEFValue > >)\n" " Prelude::IDMEFValue(idmef_value_t *)\n" " Prelude::IDMEFValue(std::string)\n" " Prelude::IDMEFValue(char const *)\n" " Prelude::IDMEFValue(int8_t)\n" " Prelude::IDMEFValue(uint8_t)\n" " Prelude::IDMEFValue(int16_t)\n" " Prelude::IDMEFValue(uint16_t)\n" " Prelude::IDMEFValue(int32_t)\n" " Prelude::IDMEFValue(uint32_t)\n" " Prelude::IDMEFValue(int64_t)\n" " Prelude::IDMEFValue(uint64_t)\n" " Prelude::IDMEFValue(float)\n" " Prelude::IDMEFValue(double)\n" " Prelude::IDMEFValue(Prelude::IDMEFTime &)\n"); return NULL; } SWIGINTERN PyObject *_wrap_IDMEFValue_Match(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; Prelude::IDMEFValue *arg1 = (Prelude::IDMEFValue *) 0 ; Prelude::IDMEFValue *arg2 = 0 ; int arg3 ; void *argp1 = 0 ; int res1 = 0 ; void *argp2 = 0 ; int res2 = 0 ; int val3 ; int ecode3 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; PyObject * obj2 = 0 ; int result; if (!PyArg_ParseTuple(args,(char *)"OOO:IDMEFValue_Match",&obj0,&obj1,&obj2)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Prelude__IDMEFValue, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IDMEFValue_Match" "', argument " "1"" of type '" "Prelude::IDMEFValue *""'"); } arg1 = reinterpret_cast< Prelude::IDMEFValue * >(argp1); res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_Prelude__IDMEFValue, 0 | 0); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "IDMEFValue_Match" "', argument " "2"" of type '" "Prelude::IDMEFValue const &""'"); } if (!argp2) { SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "IDMEFValue_Match" "', argument " "2"" of type '" "Prelude::IDMEFValue const &""'"); } arg2 = reinterpret_cast< Prelude::IDMEFValue * >(argp2); ecode3 = SWIG_AsVal_int(obj2, &val3); if (!SWIG_IsOK(ecode3)) { SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "IDMEFValue_Match" "', argument " "3"" of type '" "int""'"); } arg3 = static_cast< int >(val3); try { result = (int)(arg1)->Match((Prelude::IDMEFValue const &)*arg2,arg3); } catch(Prelude::PreludeError &_e) { SWIG_Python_Raise(SWIG_NewPointerObj((new Prelude::PreludeError(static_cast< const Prelude::PreludeError& >(_e))),SWIGTYPE_p_Prelude__PreludeError,SWIG_POINTER_OWN), "Prelude::PreludeError", SWIGTYPE_p_Prelude__PreludeError); SWIG_fail; } resultobj = SWIG_From_int(static_cast< int >(result)); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_IDMEFValue_Clone(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; Prelude::IDMEFValue *arg1 = (Prelude::IDMEFValue *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; Prelude::IDMEFValue result; if (!PyArg_ParseTuple(args,(char *)"O:IDMEFValue_Clone",&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Prelude__IDMEFValue, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IDMEFValue_Clone" "', argument " "1"" of type '" "Prelude::IDMEFValue const *""'"); } arg1 = reinterpret_cast< Prelude::IDMEFValue * >(argp1); try { result = ((Prelude::IDMEFValue const *)arg1)->Clone(); } catch(Prelude::PreludeError &_e) { SWIG_Python_Raise(SWIG_NewPointerObj((new Prelude::PreludeError(static_cast< const Prelude::PreludeError& >(_e))),SWIGTYPE_p_Prelude__PreludeError,SWIG_POINTER_OWN), "Prelude::PreludeError", SWIGTYPE_p_Prelude__PreludeError); SWIG_fail; } { int ret; if ( (&result)->IsNull() ) { Py_INCREF(Py_None); resultobj = Py_None; } else { ret = IDMEFValue_to_SWIG(result, &resultobj); if ( ret < 0 ) { std::stringstream s; s << "IDMEFValue typemap does not handle value of type '" << idmef_value_type_to_string((&result)->GetType()) << "'"; SWIG_exception_fail(SWIG_ValueError, s.str().c_str()); } } } return resultobj; fail: return NULL; } SWIGINTERN PyObject *IDMEFValue_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *obj; if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL; SWIG_TypeNewClientData(SWIGTYPE_p_Prelude__IDMEFValue, SWIG_NewClientData(obj)); return SWIG_Py_Void(); } SWIGINTERN PyObject *_wrap_new_IDMEFPath__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; char *arg1 = (char *) 0 ; int res1 ; char *buf1 = 0 ; int alloc1 = 0 ; PyObject * obj0 = 0 ; Prelude::IDMEFPath *result = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:new_IDMEFPath",&obj0)) SWIG_fail; res1 = SWIG_AsCharPtrAndSize(obj0, &buf1, NULL, &alloc1); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_IDMEFPath" "', argument " "1"" of type '" "char const *""'"); } arg1 = reinterpret_cast< char * >(buf1); try { result = (Prelude::IDMEFPath *)new Prelude::IDMEFPath((char const *)arg1); } catch(Prelude::PreludeError &_e) { SWIG_Python_Raise(SWIG_NewPointerObj((new Prelude::PreludeError(static_cast< const Prelude::PreludeError& >(_e))),SWIGTYPE_p_Prelude__PreludeError,SWIG_POINTER_OWN), "Prelude::PreludeError", SWIGTYPE_p_Prelude__PreludeError); SWIG_fail; } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Prelude__IDMEFPath, SWIG_POINTER_NEW | 0 ); if (alloc1 == SWIG_NEWOBJ) delete[] buf1; return resultobj; fail: if (alloc1 == SWIG_NEWOBJ) delete[] buf1; return NULL; } SWIGINTERN PyObject *_wrap_new_IDMEFPath__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_path_t *arg1 = (idmef_path_t *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; Prelude::IDMEFPath *result = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:new_IDMEFPath",&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_idmef_path_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_IDMEFPath" "', argument " "1"" of type '" "idmef_path_t *""'"); } arg1 = reinterpret_cast< idmef_path_t * >(argp1); try { result = (Prelude::IDMEFPath *)new Prelude::IDMEFPath(arg1); } catch(Prelude::PreludeError &_e) { SWIG_Python_Raise(SWIG_NewPointerObj((new Prelude::PreludeError(static_cast< const Prelude::PreludeError& >(_e))),SWIGTYPE_p_Prelude__PreludeError,SWIG_POINTER_OWN), "Prelude::PreludeError", SWIGTYPE_p_Prelude__PreludeError); SWIG_fail; } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Prelude__IDMEFPath, SWIG_POINTER_NEW | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_new_IDMEFPath__SWIG_2(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; Prelude::IDMEFPath *arg1 = 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; Prelude::IDMEFPath *result = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:new_IDMEFPath",&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1, SWIGTYPE_p_Prelude__IDMEFPath, 0 | 0); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_IDMEFPath" "', argument " "1"" of type '" "Prelude::IDMEFPath const &""'"); } if (!argp1) { SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_IDMEFPath" "', argument " "1"" of type '" "Prelude::IDMEFPath const &""'"); } arg1 = reinterpret_cast< Prelude::IDMEFPath * >(argp1); try { result = (Prelude::IDMEFPath *)new Prelude::IDMEFPath((Prelude::IDMEFPath const &)*arg1); } catch(Prelude::PreludeError &_e) { SWIG_Python_Raise(SWIG_NewPointerObj((new Prelude::PreludeError(static_cast< const Prelude::PreludeError& >(_e))),SWIGTYPE_p_Prelude__PreludeError,SWIG_POINTER_OWN), "Prelude::PreludeError", SWIGTYPE_p_Prelude__PreludeError); SWIG_fail; } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Prelude__IDMEFPath, SWIG_POINTER_NEW | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_new_IDMEFPath(PyObject *self, PyObject *args) { int argc; PyObject *argv[2]; int ii; if (!PyTuple_Check(args)) SWIG_fail; argc = (int)PyObject_Length(args); for (ii = 0; (ii < argc) && (ii < 1); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } if (argc == 1) { int _v; void *vptr = 0; int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_idmef_path_t, 0); _v = SWIG_CheckState(res); if (_v) { return _wrap_new_IDMEFPath__SWIG_1(self, args); } } if (argc == 1) { int _v; int res = SWIG_ConvertPtr(argv[0], 0, SWIGTYPE_p_Prelude__IDMEFPath, 0); _v = SWIG_CheckState(res); if (_v) { return _wrap_new_IDMEFPath__SWIG_2(self, args); } } if (argc == 1) { int _v; int res = SWIG_AsCharPtrAndSize(argv[0], 0, NULL, 0); _v = SWIG_CheckState(res); if (_v) { return _wrap_new_IDMEFPath__SWIG_0(self, args); } } fail: SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'new_IDMEFPath'.\n" " Possible C/C++ prototypes are:\n" " Prelude::IDMEFPath(char const *)\n" " Prelude::IDMEFPath(idmef_path_t *)\n" " Prelude::IDMEFPath(Prelude::IDMEFPath const &)\n"); return NULL; } SWIGINTERN PyObject *_wrap_delete_IDMEFPath(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; Prelude::IDMEFPath *arg1 = (Prelude::IDMEFPath *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:delete_IDMEFPath",&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Prelude__IDMEFPath, SWIG_POINTER_DISOWN | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_IDMEFPath" "', argument " "1"" of type '" "Prelude::IDMEFPath *""'"); } arg1 = reinterpret_cast< Prelude::IDMEFPath * >(argp1); delete arg1; resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_IDMEFPath_Get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; Prelude::IDMEFPath *arg1 = (Prelude::IDMEFPath *) 0 ; Prelude::IDMEF *arg2 = 0 ; void *argp1 = 0 ; int res1 = 0 ; void *argp2 = 0 ; int res2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; Prelude::IDMEFValue result; if (!PyArg_ParseTuple(args,(char *)"OO:IDMEFPath_Get",&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Prelude__IDMEFPath, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IDMEFPath_Get" "', argument " "1"" of type '" "Prelude::IDMEFPath *""'"); } arg1 = reinterpret_cast< Prelude::IDMEFPath * >(argp1); res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_Prelude__IDMEF, 0 ); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "IDMEFPath_Get" "', argument " "2"" of type '" "Prelude::IDMEF &""'"); } if (!argp2) { SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "IDMEFPath_Get" "', argument " "2"" of type '" "Prelude::IDMEF &""'"); } arg2 = reinterpret_cast< Prelude::IDMEF * >(argp2); try { result = (arg1)->Get(*arg2); } catch(Prelude::PreludeError &_e) { SWIG_Python_Raise(SWIG_NewPointerObj((new Prelude::PreludeError(static_cast< const Prelude::PreludeError& >(_e))),SWIGTYPE_p_Prelude__PreludeError,SWIG_POINTER_OWN), "Prelude::PreludeError", SWIGTYPE_p_Prelude__PreludeError); SWIG_fail; } { int ret; if ( (&result)->IsNull() ) { Py_INCREF(Py_None); resultobj = Py_None; } else { ret = IDMEFValue_to_SWIG(result, &resultobj); if ( ret < 0 ) { std::stringstream s; s << "IDMEFValue typemap does not handle value of type '" << idmef_value_type_to_string((&result)->GetType()) << "'"; SWIG_exception_fail(SWIG_ValueError, s.str().c_str()); } } } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_IDMEFPath_Set__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; Prelude::IDMEFPath *arg1 = (Prelude::IDMEFPath *) 0 ; Prelude::IDMEF *arg2 = 0 ; std::vector< Prelude::IDMEFValue,std::allocator< Prelude::IDMEFValue > > arg3 ; void *argp1 = 0 ; int res1 = 0 ; void *argp2 = 0 ; int res2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; PyObject * obj2 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OOO:IDMEFPath_Set",&obj0,&obj1,&obj2)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Prelude__IDMEFPath, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IDMEFPath_Set" "', argument " "1"" of type '" "Prelude::IDMEFPath *""'"); } arg1 = reinterpret_cast< Prelude::IDMEFPath * >(argp1); res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_Prelude__IDMEF, 0 ); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "IDMEFPath_Set" "', argument " "2"" of type '" "Prelude::IDMEF &""'"); } if (!argp2) { SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "IDMEFPath_Set" "', argument " "2"" of type '" "Prelude::IDMEF &""'"); } arg2 = reinterpret_cast< Prelude::IDMEF * >(argp2); { std::vector > *ptr = (std::vector > *)0; int res = swig::asptr(obj2, &ptr); if (!SWIG_IsOK(res) || !ptr) { SWIG_exception_fail(SWIG_ArgError((ptr ? res : SWIG_TypeError)), "in method '" "IDMEFPath_Set" "', argument " "3"" of type '" "std::vector< Prelude::IDMEFValue,std::allocator< Prelude::IDMEFValue > >""'"); } arg3 = *ptr; if (SWIG_IsNewObj(res)) delete ptr; } try { (arg1)->Set(*arg2,arg3); } catch(Prelude::PreludeError &_e) { SWIG_Python_Raise(SWIG_NewPointerObj((new Prelude::PreludeError(static_cast< const Prelude::PreludeError& >(_e))),SWIGTYPE_p_Prelude__PreludeError,SWIG_POINTER_OWN), "Prelude::PreludeError", SWIGTYPE_p_Prelude__PreludeError); SWIG_fail; } resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_IDMEFPath_Set__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; Prelude::IDMEFPath *arg1 = (Prelude::IDMEFPath *) 0 ; Prelude::IDMEF *arg2 = 0 ; Prelude::IDMEFValue *arg3 = (Prelude::IDMEFValue *) 0 ; void *argp1 = 0 ; int res1 = 0 ; void *argp2 = 0 ; int res2 = 0 ; void *argp3 = 0 ; int res3 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; PyObject * obj2 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OOO:IDMEFPath_Set",&obj0,&obj1,&obj2)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Prelude__IDMEFPath, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IDMEFPath_Set" "', argument " "1"" of type '" "Prelude::IDMEFPath *""'"); } arg1 = reinterpret_cast< Prelude::IDMEFPath * >(argp1); res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_Prelude__IDMEF, 0 ); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "IDMEFPath_Set" "', argument " "2"" of type '" "Prelude::IDMEF &""'"); } if (!argp2) { SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "IDMEFPath_Set" "', argument " "2"" of type '" "Prelude::IDMEF &""'"); } arg2 = reinterpret_cast< Prelude::IDMEF * >(argp2); res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_Prelude__IDMEFValue, 0 | 0 ); if (!SWIG_IsOK(res3)) { SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "IDMEFPath_Set" "', argument " "3"" of type '" "Prelude::IDMEFValue *""'"); } arg3 = reinterpret_cast< Prelude::IDMEFValue * >(argp3); try { (arg1)->Set(*arg2,arg3); } catch(Prelude::PreludeError &_e) { SWIG_Python_Raise(SWIG_NewPointerObj((new Prelude::PreludeError(static_cast< const Prelude::PreludeError& >(_e))),SWIGTYPE_p_Prelude__PreludeError,SWIG_POINTER_OWN), "Prelude::PreludeError", SWIGTYPE_p_Prelude__PreludeError); SWIG_fail; } resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_IDMEFPath_Set__SWIG_2(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; Prelude::IDMEFPath *arg1 = (Prelude::IDMEFPath *) 0 ; Prelude::IDMEF *arg2 = 0 ; Prelude::IDMEFTime *arg3 = 0 ; void *argp1 = 0 ; int res1 = 0 ; void *argp2 = 0 ; int res2 = 0 ; void *argp3 = 0 ; int res3 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; PyObject * obj2 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OOO:IDMEFPath_Set",&obj0,&obj1,&obj2)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Prelude__IDMEFPath, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IDMEFPath_Set" "', argument " "1"" of type '" "Prelude::IDMEFPath *""'"); } arg1 = reinterpret_cast< Prelude::IDMEFPath * >(argp1); res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_Prelude__IDMEF, 0 ); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "IDMEFPath_Set" "', argument " "2"" of type '" "Prelude::IDMEF &""'"); } if (!argp2) { SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "IDMEFPath_Set" "', argument " "2"" of type '" "Prelude::IDMEF &""'"); } arg2 = reinterpret_cast< Prelude::IDMEF * >(argp2); res3 = SWIG_ConvertPtr(obj2, &argp3, SWIGTYPE_p_Prelude__IDMEFTime, 0 ); if (!SWIG_IsOK(res3)) { SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "IDMEFPath_Set" "', argument " "3"" of type '" "Prelude::IDMEFTime &""'"); } if (!argp3) { SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "IDMEFPath_Set" "', argument " "3"" of type '" "Prelude::IDMEFTime &""'"); } arg3 = reinterpret_cast< Prelude::IDMEFTime * >(argp3); try { (arg1)->Set(*arg2,*arg3); } catch(Prelude::PreludeError &_e) { SWIG_Python_Raise(SWIG_NewPointerObj((new Prelude::PreludeError(static_cast< const Prelude::PreludeError& >(_e))),SWIGTYPE_p_Prelude__PreludeError,SWIG_POINTER_OWN), "Prelude::PreludeError", SWIGTYPE_p_Prelude__PreludeError); SWIG_fail; } resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_IDMEFPath_Set__SWIG_3(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; Prelude::IDMEFPath *arg1 = (Prelude::IDMEFPath *) 0 ; Prelude::IDMEF *arg2 = 0 ; std::string arg3 ; void *argp1 = 0 ; int res1 = 0 ; void *argp2 = 0 ; int res2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; PyObject * obj2 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OOO:IDMEFPath_Set",&obj0,&obj1,&obj2)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Prelude__IDMEFPath, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IDMEFPath_Set" "', argument " "1"" of type '" "Prelude::IDMEFPath *""'"); } arg1 = reinterpret_cast< Prelude::IDMEFPath * >(argp1); res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_Prelude__IDMEF, 0 ); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "IDMEFPath_Set" "', argument " "2"" of type '" "Prelude::IDMEF &""'"); } if (!argp2) { SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "IDMEFPath_Set" "', argument " "2"" of type '" "Prelude::IDMEF &""'"); } arg2 = reinterpret_cast< Prelude::IDMEF * >(argp2); { std::string *ptr = (std::string *)0; int res = SWIG_AsPtr_std_string(obj2, &ptr); if (!SWIG_IsOK(res) || !ptr) { SWIG_exception_fail(SWIG_ArgError((ptr ? res : SWIG_TypeError)), "in method '" "IDMEFPath_Set" "', argument " "3"" of type '" "std::string""'"); } arg3 = *ptr; if (SWIG_IsNewObj(res)) delete ptr; } try { (arg1)->Set(*arg2,arg3); } catch(Prelude::PreludeError &_e) { SWIG_Python_Raise(SWIG_NewPointerObj((new Prelude::PreludeError(static_cast< const Prelude::PreludeError& >(_e))),SWIGTYPE_p_Prelude__PreludeError,SWIG_POINTER_OWN), "Prelude::PreludeError", SWIGTYPE_p_Prelude__PreludeError); SWIG_fail; } resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_IDMEFPath_Set__SWIG_4(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; Prelude::IDMEFPath *arg1 = (Prelude::IDMEFPath *) 0 ; Prelude::IDMEF *arg2 = 0 ; char *arg3 = (char *) 0 ; void *argp1 = 0 ; int res1 = 0 ; void *argp2 = 0 ; int res2 = 0 ; int res3 ; char *buf3 = 0 ; int alloc3 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; PyObject * obj2 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OOO:IDMEFPath_Set",&obj0,&obj1,&obj2)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Prelude__IDMEFPath, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IDMEFPath_Set" "', argument " "1"" of type '" "Prelude::IDMEFPath *""'"); } arg1 = reinterpret_cast< Prelude::IDMEFPath * >(argp1); res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_Prelude__IDMEF, 0 ); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "IDMEFPath_Set" "', argument " "2"" of type '" "Prelude::IDMEF &""'"); } if (!argp2) { SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "IDMEFPath_Set" "', argument " "2"" of type '" "Prelude::IDMEF &""'"); } arg2 = reinterpret_cast< Prelude::IDMEF * >(argp2); res3 = SWIG_AsCharPtrAndSize(obj2, &buf3, NULL, &alloc3); if (!SWIG_IsOK(res3)) { SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "IDMEFPath_Set" "', argument " "3"" of type '" "char const *""'"); } arg3 = reinterpret_cast< char * >(buf3); try { (arg1)->Set(*arg2,(char const *)arg3); } catch(Prelude::PreludeError &_e) { SWIG_Python_Raise(SWIG_NewPointerObj((new Prelude::PreludeError(static_cast< const Prelude::PreludeError& >(_e))),SWIGTYPE_p_Prelude__PreludeError,SWIG_POINTER_OWN), "Prelude::PreludeError", SWIGTYPE_p_Prelude__PreludeError); SWIG_fail; } resultobj = SWIG_Py_Void(); if (alloc3 == SWIG_NEWOBJ) delete[] buf3; return resultobj; fail: if (alloc3 == SWIG_NEWOBJ) delete[] buf3; return NULL; } SWIGINTERN PyObject *_wrap_IDMEFPath_Set__SWIG_5(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; Prelude::IDMEFPath *arg1 = (Prelude::IDMEFPath *) 0 ; Prelude::IDMEF *arg2 = 0 ; int8_t arg3 ; void *argp1 = 0 ; int res1 = 0 ; void *argp2 = 0 ; int res2 = 0 ; char val3 ; int ecode3 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; PyObject * obj2 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OOO:IDMEFPath_Set",&obj0,&obj1,&obj2)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Prelude__IDMEFPath, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IDMEFPath_Set" "', argument " "1"" of type '" "Prelude::IDMEFPath *""'"); } arg1 = reinterpret_cast< Prelude::IDMEFPath * >(argp1); res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_Prelude__IDMEF, 0 ); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "IDMEFPath_Set" "', argument " "2"" of type '" "Prelude::IDMEF &""'"); } if (!argp2) { SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "IDMEFPath_Set" "', argument " "2"" of type '" "Prelude::IDMEF &""'"); } arg2 = reinterpret_cast< Prelude::IDMEF * >(argp2); ecode3 = SWIG_AsVal_char(obj2, &val3); if (!SWIG_IsOK(ecode3)) { SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "IDMEFPath_Set" "', argument " "3"" of type '" "int8_t""'"); } arg3 = static_cast< int8_t >(val3); try { (arg1)->Set(*arg2,arg3); } catch(Prelude::PreludeError &_e) { SWIG_Python_Raise(SWIG_NewPointerObj((new Prelude::PreludeError(static_cast< const Prelude::PreludeError& >(_e))),SWIGTYPE_p_Prelude__PreludeError,SWIG_POINTER_OWN), "Prelude::PreludeError", SWIGTYPE_p_Prelude__PreludeError); SWIG_fail; } resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_IDMEFPath_Set__SWIG_6(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; Prelude::IDMEFPath *arg1 = (Prelude::IDMEFPath *) 0 ; Prelude::IDMEF *arg2 = 0 ; uint8_t arg3 ; void *argp1 = 0 ; int res1 = 0 ; void *argp2 = 0 ; int res2 = 0 ; unsigned char val3 ; int ecode3 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; PyObject * obj2 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OOO:IDMEFPath_Set",&obj0,&obj1,&obj2)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Prelude__IDMEFPath, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IDMEFPath_Set" "', argument " "1"" of type '" "Prelude::IDMEFPath *""'"); } arg1 = reinterpret_cast< Prelude::IDMEFPath * >(argp1); res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_Prelude__IDMEF, 0 ); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "IDMEFPath_Set" "', argument " "2"" of type '" "Prelude::IDMEF &""'"); } if (!argp2) { SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "IDMEFPath_Set" "', argument " "2"" of type '" "Prelude::IDMEF &""'"); } arg2 = reinterpret_cast< Prelude::IDMEF * >(argp2); ecode3 = SWIG_AsVal_unsigned_SS_char(obj2, &val3); if (!SWIG_IsOK(ecode3)) { SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "IDMEFPath_Set" "', argument " "3"" of type '" "uint8_t""'"); } arg3 = static_cast< uint8_t >(val3); try { (arg1)->Set(*arg2,arg3); } catch(Prelude::PreludeError &_e) { SWIG_Python_Raise(SWIG_NewPointerObj((new Prelude::PreludeError(static_cast< const Prelude::PreludeError& >(_e))),SWIGTYPE_p_Prelude__PreludeError,SWIG_POINTER_OWN), "Prelude::PreludeError", SWIGTYPE_p_Prelude__PreludeError); SWIG_fail; } resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_IDMEFPath_Set__SWIG_7(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; Prelude::IDMEFPath *arg1 = (Prelude::IDMEFPath *) 0 ; Prelude::IDMEF *arg2 = 0 ; int16_t arg3 ; void *argp1 = 0 ; int res1 = 0 ; void *argp2 = 0 ; int res2 = 0 ; short val3 ; int ecode3 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; PyObject * obj2 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OOO:IDMEFPath_Set",&obj0,&obj1,&obj2)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Prelude__IDMEFPath, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IDMEFPath_Set" "', argument " "1"" of type '" "Prelude::IDMEFPath *""'"); } arg1 = reinterpret_cast< Prelude::IDMEFPath * >(argp1); res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_Prelude__IDMEF, 0 ); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "IDMEFPath_Set" "', argument " "2"" of type '" "Prelude::IDMEF &""'"); } if (!argp2) { SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "IDMEFPath_Set" "', argument " "2"" of type '" "Prelude::IDMEF &""'"); } arg2 = reinterpret_cast< Prelude::IDMEF * >(argp2); ecode3 = SWIG_AsVal_short(obj2, &val3); if (!SWIG_IsOK(ecode3)) { SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "IDMEFPath_Set" "', argument " "3"" of type '" "int16_t""'"); } arg3 = static_cast< int16_t >(val3); try { (arg1)->Set(*arg2,arg3); } catch(Prelude::PreludeError &_e) { SWIG_Python_Raise(SWIG_NewPointerObj((new Prelude::PreludeError(static_cast< const Prelude::PreludeError& >(_e))),SWIGTYPE_p_Prelude__PreludeError,SWIG_POINTER_OWN), "Prelude::PreludeError", SWIGTYPE_p_Prelude__PreludeError); SWIG_fail; } resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_IDMEFPath_Set__SWIG_8(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; Prelude::IDMEFPath *arg1 = (Prelude::IDMEFPath *) 0 ; Prelude::IDMEF *arg2 = 0 ; uint16_t arg3 ; void *argp1 = 0 ; int res1 = 0 ; void *argp2 = 0 ; int res2 = 0 ; unsigned short val3 ; int ecode3 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; PyObject * obj2 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OOO:IDMEFPath_Set",&obj0,&obj1,&obj2)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Prelude__IDMEFPath, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IDMEFPath_Set" "', argument " "1"" of type '" "Prelude::IDMEFPath *""'"); } arg1 = reinterpret_cast< Prelude::IDMEFPath * >(argp1); res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_Prelude__IDMEF, 0 ); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "IDMEFPath_Set" "', argument " "2"" of type '" "Prelude::IDMEF &""'"); } if (!argp2) { SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "IDMEFPath_Set" "', argument " "2"" of type '" "Prelude::IDMEF &""'"); } arg2 = reinterpret_cast< Prelude::IDMEF * >(argp2); ecode3 = SWIG_AsVal_unsigned_SS_short(obj2, &val3); if (!SWIG_IsOK(ecode3)) { SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "IDMEFPath_Set" "', argument " "3"" of type '" "uint16_t""'"); } arg3 = static_cast< uint16_t >(val3); try { (arg1)->Set(*arg2,arg3); } catch(Prelude::PreludeError &_e) { SWIG_Python_Raise(SWIG_NewPointerObj((new Prelude::PreludeError(static_cast< const Prelude::PreludeError& >(_e))),SWIGTYPE_p_Prelude__PreludeError,SWIG_POINTER_OWN), "Prelude::PreludeError", SWIGTYPE_p_Prelude__PreludeError); SWIG_fail; } resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_IDMEFPath_Set__SWIG_9(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; Prelude::IDMEFPath *arg1 = (Prelude::IDMEFPath *) 0 ; Prelude::IDMEF *arg2 = 0 ; int32_t arg3 ; void *argp1 = 0 ; int res1 = 0 ; void *argp2 = 0 ; int res2 = 0 ; int val3 ; int ecode3 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; PyObject * obj2 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OOO:IDMEFPath_Set",&obj0,&obj1,&obj2)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Prelude__IDMEFPath, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IDMEFPath_Set" "', argument " "1"" of type '" "Prelude::IDMEFPath *""'"); } arg1 = reinterpret_cast< Prelude::IDMEFPath * >(argp1); res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_Prelude__IDMEF, 0 ); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "IDMEFPath_Set" "', argument " "2"" of type '" "Prelude::IDMEF &""'"); } if (!argp2) { SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "IDMEFPath_Set" "', argument " "2"" of type '" "Prelude::IDMEF &""'"); } arg2 = reinterpret_cast< Prelude::IDMEF * >(argp2); ecode3 = SWIG_AsVal_int(obj2, &val3); if (!SWIG_IsOK(ecode3)) { SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "IDMEFPath_Set" "', argument " "3"" of type '" "int32_t""'"); } arg3 = static_cast< int32_t >(val3); try { (arg1)->Set(*arg2,arg3); } catch(Prelude::PreludeError &_e) { SWIG_Python_Raise(SWIG_NewPointerObj((new Prelude::PreludeError(static_cast< const Prelude::PreludeError& >(_e))),SWIGTYPE_p_Prelude__PreludeError,SWIG_POINTER_OWN), "Prelude::PreludeError", SWIGTYPE_p_Prelude__PreludeError); SWIG_fail; } resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_IDMEFPath_Set__SWIG_10(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; Prelude::IDMEFPath *arg1 = (Prelude::IDMEFPath *) 0 ; Prelude::IDMEF *arg2 = 0 ; uint32_t arg3 ; void *argp1 = 0 ; int res1 = 0 ; void *argp2 = 0 ; int res2 = 0 ; unsigned int val3 ; int ecode3 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; PyObject * obj2 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OOO:IDMEFPath_Set",&obj0,&obj1,&obj2)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Prelude__IDMEFPath, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IDMEFPath_Set" "', argument " "1"" of type '" "Prelude::IDMEFPath *""'"); } arg1 = reinterpret_cast< Prelude::IDMEFPath * >(argp1); res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_Prelude__IDMEF, 0 ); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "IDMEFPath_Set" "', argument " "2"" of type '" "Prelude::IDMEF &""'"); } if (!argp2) { SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "IDMEFPath_Set" "', argument " "2"" of type '" "Prelude::IDMEF &""'"); } arg2 = reinterpret_cast< Prelude::IDMEF * >(argp2); ecode3 = SWIG_AsVal_unsigned_SS_int(obj2, &val3); if (!SWIG_IsOK(ecode3)) { SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "IDMEFPath_Set" "', argument " "3"" of type '" "uint32_t""'"); } arg3 = static_cast< uint32_t >(val3); try { (arg1)->Set(*arg2,arg3); } catch(Prelude::PreludeError &_e) { SWIG_Python_Raise(SWIG_NewPointerObj((new Prelude::PreludeError(static_cast< const Prelude::PreludeError& >(_e))),SWIGTYPE_p_Prelude__PreludeError,SWIG_POINTER_OWN), "Prelude::PreludeError", SWIGTYPE_p_Prelude__PreludeError); SWIG_fail; } resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_IDMEFPath_Set__SWIG_11(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; Prelude::IDMEFPath *arg1 = (Prelude::IDMEFPath *) 0 ; Prelude::IDMEF *arg2 = 0 ; int64_t arg3 ; void *argp1 = 0 ; int res1 = 0 ; void *argp2 = 0 ; int res2 = 0 ; long long val3 ; int ecode3 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; PyObject * obj2 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OOO:IDMEFPath_Set",&obj0,&obj1,&obj2)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Prelude__IDMEFPath, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IDMEFPath_Set" "', argument " "1"" of type '" "Prelude::IDMEFPath *""'"); } arg1 = reinterpret_cast< Prelude::IDMEFPath * >(argp1); res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_Prelude__IDMEF, 0 ); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "IDMEFPath_Set" "', argument " "2"" of type '" "Prelude::IDMEF &""'"); } if (!argp2) { SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "IDMEFPath_Set" "', argument " "2"" of type '" "Prelude::IDMEF &""'"); } arg2 = reinterpret_cast< Prelude::IDMEF * >(argp2); ecode3 = SWIG_AsVal_long_SS_long(obj2, &val3); if (!SWIG_IsOK(ecode3)) { SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "IDMEFPath_Set" "', argument " "3"" of type '" "int64_t""'"); } arg3 = static_cast< int64_t >(val3); try { (arg1)->Set(*arg2,arg3); } catch(Prelude::PreludeError &_e) { SWIG_Python_Raise(SWIG_NewPointerObj((new Prelude::PreludeError(static_cast< const Prelude::PreludeError& >(_e))),SWIGTYPE_p_Prelude__PreludeError,SWIG_POINTER_OWN), "Prelude::PreludeError", SWIGTYPE_p_Prelude__PreludeError); SWIG_fail; } resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_IDMEFPath_Set__SWIG_12(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; Prelude::IDMEFPath *arg1 = (Prelude::IDMEFPath *) 0 ; Prelude::IDMEF *arg2 = 0 ; uint64_t arg3 ; void *argp1 = 0 ; int res1 = 0 ; void *argp2 = 0 ; int res2 = 0 ; unsigned long long val3 ; int ecode3 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; PyObject * obj2 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OOO:IDMEFPath_Set",&obj0,&obj1,&obj2)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Prelude__IDMEFPath, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IDMEFPath_Set" "', argument " "1"" of type '" "Prelude::IDMEFPath *""'"); } arg1 = reinterpret_cast< Prelude::IDMEFPath * >(argp1); res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_Prelude__IDMEF, 0 ); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "IDMEFPath_Set" "', argument " "2"" of type '" "Prelude::IDMEF &""'"); } if (!argp2) { SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "IDMEFPath_Set" "', argument " "2"" of type '" "Prelude::IDMEF &""'"); } arg2 = reinterpret_cast< Prelude::IDMEF * >(argp2); ecode3 = SWIG_AsVal_unsigned_SS_long_SS_long(obj2, &val3); if (!SWIG_IsOK(ecode3)) { SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "IDMEFPath_Set" "', argument " "3"" of type '" "uint64_t""'"); } arg3 = static_cast< uint64_t >(val3); try { (arg1)->Set(*arg2,arg3); } catch(Prelude::PreludeError &_e) { SWIG_Python_Raise(SWIG_NewPointerObj((new Prelude::PreludeError(static_cast< const Prelude::PreludeError& >(_e))),SWIGTYPE_p_Prelude__PreludeError,SWIG_POINTER_OWN), "Prelude::PreludeError", SWIGTYPE_p_Prelude__PreludeError); SWIG_fail; } resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_IDMEFPath_Set__SWIG_13(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; Prelude::IDMEFPath *arg1 = (Prelude::IDMEFPath *) 0 ; Prelude::IDMEF *arg2 = 0 ; float arg3 ; void *argp1 = 0 ; int res1 = 0 ; void *argp2 = 0 ; int res2 = 0 ; float val3 ; int ecode3 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; PyObject * obj2 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OOO:IDMEFPath_Set",&obj0,&obj1,&obj2)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Prelude__IDMEFPath, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IDMEFPath_Set" "', argument " "1"" of type '" "Prelude::IDMEFPath *""'"); } arg1 = reinterpret_cast< Prelude::IDMEFPath * >(argp1); res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_Prelude__IDMEF, 0 ); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "IDMEFPath_Set" "', argument " "2"" of type '" "Prelude::IDMEF &""'"); } if (!argp2) { SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "IDMEFPath_Set" "', argument " "2"" of type '" "Prelude::IDMEF &""'"); } arg2 = reinterpret_cast< Prelude::IDMEF * >(argp2); ecode3 = SWIG_AsVal_float(obj2, &val3); if (!SWIG_IsOK(ecode3)) { SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "IDMEFPath_Set" "', argument " "3"" of type '" "float""'"); } arg3 = static_cast< float >(val3); try { (arg1)->Set(*arg2,arg3); } catch(Prelude::PreludeError &_e) { SWIG_Python_Raise(SWIG_NewPointerObj((new Prelude::PreludeError(static_cast< const Prelude::PreludeError& >(_e))),SWIGTYPE_p_Prelude__PreludeError,SWIG_POINTER_OWN), "Prelude::PreludeError", SWIGTYPE_p_Prelude__PreludeError); SWIG_fail; } resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_IDMEFPath_Set__SWIG_14(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; Prelude::IDMEFPath *arg1 = (Prelude::IDMEFPath *) 0 ; Prelude::IDMEF *arg2 = 0 ; double arg3 ; void *argp1 = 0 ; int res1 = 0 ; void *argp2 = 0 ; int res2 = 0 ; double val3 ; int ecode3 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; PyObject * obj2 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OOO:IDMEFPath_Set",&obj0,&obj1,&obj2)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Prelude__IDMEFPath, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IDMEFPath_Set" "', argument " "1"" of type '" "Prelude::IDMEFPath *""'"); } arg1 = reinterpret_cast< Prelude::IDMEFPath * >(argp1); res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_Prelude__IDMEF, 0 ); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "IDMEFPath_Set" "', argument " "2"" of type '" "Prelude::IDMEF &""'"); } if (!argp2) { SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "IDMEFPath_Set" "', argument " "2"" of type '" "Prelude::IDMEF &""'"); } arg2 = reinterpret_cast< Prelude::IDMEF * >(argp2); ecode3 = SWIG_AsVal_double(obj2, &val3); if (!SWIG_IsOK(ecode3)) { SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "IDMEFPath_Set" "', argument " "3"" of type '" "double""'"); } arg3 = static_cast< double >(val3); try { (arg1)->Set(*arg2,arg3); } catch(Prelude::PreludeError &_e) { SWIG_Python_Raise(SWIG_NewPointerObj((new Prelude::PreludeError(static_cast< const Prelude::PreludeError& >(_e))),SWIGTYPE_p_Prelude__PreludeError,SWIG_POINTER_OWN), "Prelude::PreludeError", SWIGTYPE_p_Prelude__PreludeError); SWIG_fail; } resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_IDMEFPath_Set(PyObject *self, PyObject *args) { int argc; PyObject *argv[4]; int ii; if (!PyTuple_Check(args)) SWIG_fail; argc = (int)PyObject_Length(args); for (ii = 0; (ii < argc) && (ii < 3); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } if (argc == 3) { int _v; void *vptr = 0; int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_Prelude__IDMEFPath, 0); _v = SWIG_CheckState(res); if (_v) { void *vptr = 0; int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_p_Prelude__IDMEF, 0); _v = SWIG_CheckState(res); if (_v) { void *vptr = 0; int res = SWIG_ConvertPtr(argv[2], &vptr, SWIGTYPE_p_Prelude__IDMEFValue, 0); _v = SWIG_CheckState(res); if (_v) { return _wrap_IDMEFPath_Set__SWIG_1(self, args); } } } } if (argc == 3) { int _v; void *vptr = 0; int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_Prelude__IDMEFPath, 0); _v = SWIG_CheckState(res); if (_v) { void *vptr = 0; int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_p_Prelude__IDMEF, 0); _v = SWIG_CheckState(res); if (_v) { void *vptr = 0; int res = SWIG_ConvertPtr(argv[2], &vptr, SWIGTYPE_p_Prelude__IDMEFTime, 0); _v = SWIG_CheckState(res); if (_v) { return _wrap_IDMEFPath_Set__SWIG_2(self, args); } } } } if (argc == 3) { int _v; void *vptr = 0; int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_Prelude__IDMEFPath, 0); _v = SWIG_CheckState(res); if (_v) { void *vptr = 0; int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_p_Prelude__IDMEF, 0); _v = SWIG_CheckState(res); if (_v) { { int res = SWIG_AsVal_unsigned_SS_char(argv[2], NULL); _v = SWIG_CheckState(res); } if (_v) { return _wrap_IDMEFPath_Set__SWIG_6(self, args); } } } } if (argc == 3) { int _v; void *vptr = 0; int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_Prelude__IDMEFPath, 0); _v = SWIG_CheckState(res); if (_v) { void *vptr = 0; int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_p_Prelude__IDMEF, 0); _v = SWIG_CheckState(res); if (_v) { { int res = SWIG_AsVal_unsigned_SS_short(argv[2], NULL); _v = SWIG_CheckState(res); } if (_v) { return _wrap_IDMEFPath_Set__SWIG_8(self, args); } } } } if (argc == 3) { int _v; void *vptr = 0; int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_Prelude__IDMEFPath, 0); _v = SWIG_CheckState(res); if (_v) { void *vptr = 0; int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_p_Prelude__IDMEF, 0); _v = SWIG_CheckState(res); if (_v) { { int res = SWIG_AsVal_short(argv[2], NULL); _v = SWIG_CheckState(res); } if (_v) { return _wrap_IDMEFPath_Set__SWIG_7(self, args); } } } } if (argc == 3) { int _v; void *vptr = 0; int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_Prelude__IDMEFPath, 0); _v = SWIG_CheckState(res); if (_v) { void *vptr = 0; int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_p_Prelude__IDMEF, 0); _v = SWIG_CheckState(res); if (_v) { { int res = SWIG_AsVal_unsigned_SS_int(argv[2], NULL); _v = SWIG_CheckState(res); } if (_v) { return _wrap_IDMEFPath_Set__SWIG_10(self, args); } } } } if (argc == 3) { int _v; void *vptr = 0; int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_Prelude__IDMEFPath, 0); _v = SWIG_CheckState(res); if (_v) { void *vptr = 0; int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_p_Prelude__IDMEF, 0); _v = SWIG_CheckState(res); if (_v) { { int res = SWIG_AsVal_int(argv[2], NULL); _v = SWIG_CheckState(res); } if (_v) { return _wrap_IDMEFPath_Set__SWIG_9(self, args); } } } } if (argc == 3) { int _v; void *vptr = 0; int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_Prelude__IDMEFPath, 0); _v = SWIG_CheckState(res); if (_v) { void *vptr = 0; int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_p_Prelude__IDMEF, 0); _v = SWIG_CheckState(res); if (_v) { { int res = SWIG_AsVal_unsigned_SS_long_SS_long(argv[2], NULL); _v = SWIG_CheckState(res); } if (_v) { return _wrap_IDMEFPath_Set__SWIG_12(self, args); } } } } if (argc == 3) { int _v; void *vptr = 0; int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_Prelude__IDMEFPath, 0); _v = SWIG_CheckState(res); if (_v) { void *vptr = 0; int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_p_Prelude__IDMEF, 0); _v = SWIG_CheckState(res); if (_v) { { int res = SWIG_AsVal_long_SS_long(argv[2], NULL); _v = SWIG_CheckState(res); } if (_v) { return _wrap_IDMEFPath_Set__SWIG_11(self, args); } } } } if (argc == 3) { int _v; void *vptr = 0; int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_Prelude__IDMEFPath, 0); _v = SWIG_CheckState(res); if (_v) { void *vptr = 0; int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_p_Prelude__IDMEF, 0); _v = SWIG_CheckState(res); if (_v) { { int res = SWIG_AsVal_float(argv[2], NULL); _v = SWIG_CheckState(res); } if (_v) { return _wrap_IDMEFPath_Set__SWIG_13(self, args); } } } } if (argc == 3) { int _v; void *vptr = 0; int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_Prelude__IDMEFPath, 0); _v = SWIG_CheckState(res); if (_v) { void *vptr = 0; int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_p_Prelude__IDMEF, 0); _v = SWIG_CheckState(res); if (_v) { { int res = SWIG_AsVal_double(argv[2], NULL); _v = SWIG_CheckState(res); } if (_v) { return _wrap_IDMEFPath_Set__SWIG_14(self, args); } } } } if (argc == 3) { int _v; void *vptr = 0; int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_Prelude__IDMEFPath, 0); _v = SWIG_CheckState(res); if (_v) { void *vptr = 0; int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_p_Prelude__IDMEF, 0); _v = SWIG_CheckState(res); if (_v) { { int res = SWIG_AsVal_char(argv[2], NULL); _v = SWIG_CheckState(res); } if (_v) { return _wrap_IDMEFPath_Set__SWIG_5(self, args); } } } } if (argc == 3) { int _v; void *vptr = 0; int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_Prelude__IDMEFPath, 0); _v = SWIG_CheckState(res); if (_v) { void *vptr = 0; int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_p_Prelude__IDMEF, 0); _v = SWIG_CheckState(res); if (_v) { int res = SWIG_AsPtr_std_string(argv[2], (std::string**)(0)); _v = SWIG_CheckState(res); if (_v) { return _wrap_IDMEFPath_Set__SWIG_3(self, args); } } } } if (argc == 3) { int _v; void *vptr = 0; int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_Prelude__IDMEFPath, 0); _v = SWIG_CheckState(res); if (_v) { void *vptr = 0; int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_p_Prelude__IDMEF, 0); _v = SWIG_CheckState(res); if (_v) { int res = SWIG_AsCharPtrAndSize(argv[2], 0, NULL, 0); _v = SWIG_CheckState(res); if (_v) { return _wrap_IDMEFPath_Set__SWIG_4(self, args); } } } } if (argc == 3) { int _v; void *vptr = 0; int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_Prelude__IDMEFPath, 0); _v = SWIG_CheckState(res); if (_v) { void *vptr = 0; int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_p_Prelude__IDMEF, 0); _v = SWIG_CheckState(res); if (_v) { int res = swig::asptr(argv[2], (std::vector >**)(0)); _v = SWIG_CheckState(res); if (_v) { return _wrap_IDMEFPath_Set__SWIG_0(self, args); } } } } fail: SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'IDMEFPath_Set'.\n" " Possible C/C++ prototypes are:\n" " Set(Prelude::IDMEFPath *,Prelude::IDMEF &,std::vector< Prelude::IDMEFValue,std::allocator< Prelude::IDMEFValue > >)\n" " Set(Prelude::IDMEFPath *,Prelude::IDMEF &,Prelude::IDMEFValue *)\n" " Set(Prelude::IDMEFPath *,Prelude::IDMEF &,Prelude::IDMEFTime &)\n" " Set(Prelude::IDMEFPath *,Prelude::IDMEF &,std::string)\n" " Set(Prelude::IDMEFPath *,Prelude::IDMEF &,char const *)\n" " Set(Prelude::IDMEFPath *,Prelude::IDMEF &,int8_t)\n" " Set(Prelude::IDMEFPath *,Prelude::IDMEF &,uint8_t)\n" " Set(Prelude::IDMEFPath *,Prelude::IDMEF &,int16_t)\n" " Set(Prelude::IDMEFPath *,Prelude::IDMEF &,uint16_t)\n" " Set(Prelude::IDMEFPath *,Prelude::IDMEF &,int32_t)\n" " Set(Prelude::IDMEFPath *,Prelude::IDMEF &,uint32_t)\n" " Set(Prelude::IDMEFPath *,Prelude::IDMEF &,int64_t)\n" " Set(Prelude::IDMEFPath *,Prelude::IDMEF &,uint64_t)\n" " Set(Prelude::IDMEFPath *,Prelude::IDMEF &,float)\n" " Set(Prelude::IDMEFPath *,Prelude::IDMEF &,double)\n"); return NULL; } SWIGINTERN PyObject *_wrap_IDMEFPath_GetClass__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; Prelude::IDMEFPath *arg1 = (Prelude::IDMEFPath *) 0 ; int arg2 ; void *argp1 = 0 ; int res1 = 0 ; int val2 ; int ecode2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; idmef_class_id_t result; if (!PyArg_ParseTuple(args,(char *)"OO:IDMEFPath_GetClass",&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Prelude__IDMEFPath, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IDMEFPath_GetClass" "', argument " "1"" of type '" "Prelude::IDMEFPath *""'"); } arg1 = reinterpret_cast< Prelude::IDMEFPath * >(argp1); ecode2 = SWIG_AsVal_int(obj1, &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "IDMEFPath_GetClass" "', argument " "2"" of type '" "int""'"); } arg2 = static_cast< int >(val2); try { result = (arg1)->GetClass(arg2); } catch(Prelude::PreludeError &_e) { SWIG_Python_Raise(SWIG_NewPointerObj((new Prelude::PreludeError(static_cast< const Prelude::PreludeError& >(_e))),SWIGTYPE_p_Prelude__PreludeError,SWIG_POINTER_OWN), "Prelude::PreludeError", SWIGTYPE_p_Prelude__PreludeError); SWIG_fail; } resultobj = SWIG_NewPointerObj((new idmef_class_id_t(static_cast< const idmef_class_id_t& >(result))), SWIGTYPE_p_idmef_class_id_t, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_IDMEFPath_GetClass__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; Prelude::IDMEFPath *arg1 = (Prelude::IDMEFPath *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; idmef_class_id_t result; if (!PyArg_ParseTuple(args,(char *)"O:IDMEFPath_GetClass",&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Prelude__IDMEFPath, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IDMEFPath_GetClass" "', argument " "1"" of type '" "Prelude::IDMEFPath *""'"); } arg1 = reinterpret_cast< Prelude::IDMEFPath * >(argp1); try { result = (arg1)->GetClass(); } catch(Prelude::PreludeError &_e) { SWIG_Python_Raise(SWIG_NewPointerObj((new Prelude::PreludeError(static_cast< const Prelude::PreludeError& >(_e))),SWIGTYPE_p_Prelude__PreludeError,SWIG_POINTER_OWN), "Prelude::PreludeError", SWIGTYPE_p_Prelude__PreludeError); SWIG_fail; } resultobj = SWIG_NewPointerObj((new idmef_class_id_t(static_cast< const idmef_class_id_t& >(result))), SWIGTYPE_p_idmef_class_id_t, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_IDMEFPath_GetClass(PyObject *self, PyObject *args) { int argc; PyObject *argv[3]; int ii; if (!PyTuple_Check(args)) SWIG_fail; argc = (int)PyObject_Length(args); for (ii = 0; (ii < argc) && (ii < 2); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } if (argc == 1) { int _v; void *vptr = 0; int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_Prelude__IDMEFPath, 0); _v = SWIG_CheckState(res); if (_v) { return _wrap_IDMEFPath_GetClass__SWIG_1(self, args); } } if (argc == 2) { int _v; void *vptr = 0; int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_Prelude__IDMEFPath, 0); _v = SWIG_CheckState(res); if (_v) { { int res = SWIG_AsVal_int(argv[1], NULL); _v = SWIG_CheckState(res); } if (_v) { return _wrap_IDMEFPath_GetClass__SWIG_0(self, args); } } } fail: SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'IDMEFPath_GetClass'.\n" " Possible C/C++ prototypes are:\n" " GetClass(Prelude::IDMEFPath *,int)\n" " GetClass(Prelude::IDMEFPath *)\n"); return NULL; } SWIGINTERN PyObject *_wrap_IDMEFPath_GetValueType__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; Prelude::IDMEFPath *arg1 = (Prelude::IDMEFPath *) 0 ; int arg2 ; void *argp1 = 0 ; int res1 = 0 ; int val2 ; int ecode2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; idmef_value_type_id_t result; if (!PyArg_ParseTuple(args,(char *)"OO:IDMEFPath_GetValueType",&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Prelude__IDMEFPath, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IDMEFPath_GetValueType" "', argument " "1"" of type '" "Prelude::IDMEFPath *""'"); } arg1 = reinterpret_cast< Prelude::IDMEFPath * >(argp1); ecode2 = SWIG_AsVal_int(obj1, &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "IDMEFPath_GetValueType" "', argument " "2"" of type '" "int""'"); } arg2 = static_cast< int >(val2); try { result = (arg1)->GetValueType(arg2); } catch(Prelude::PreludeError &_e) { SWIG_Python_Raise(SWIG_NewPointerObj((new Prelude::PreludeError(static_cast< const Prelude::PreludeError& >(_e))),SWIGTYPE_p_Prelude__PreludeError,SWIG_POINTER_OWN), "Prelude::PreludeError", SWIGTYPE_p_Prelude__PreludeError); SWIG_fail; } resultobj = SWIG_NewPointerObj((new idmef_value_type_id_t(static_cast< const idmef_value_type_id_t& >(result))), SWIGTYPE_p_idmef_value_type_id_t, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_IDMEFPath_GetValueType__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; Prelude::IDMEFPath *arg1 = (Prelude::IDMEFPath *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; idmef_value_type_id_t result; if (!PyArg_ParseTuple(args,(char *)"O:IDMEFPath_GetValueType",&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Prelude__IDMEFPath, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IDMEFPath_GetValueType" "', argument " "1"" of type '" "Prelude::IDMEFPath *""'"); } arg1 = reinterpret_cast< Prelude::IDMEFPath * >(argp1); try { result = (arg1)->GetValueType(); } catch(Prelude::PreludeError &_e) { SWIG_Python_Raise(SWIG_NewPointerObj((new Prelude::PreludeError(static_cast< const Prelude::PreludeError& >(_e))),SWIGTYPE_p_Prelude__PreludeError,SWIG_POINTER_OWN), "Prelude::PreludeError", SWIGTYPE_p_Prelude__PreludeError); SWIG_fail; } resultobj = SWIG_NewPointerObj((new idmef_value_type_id_t(static_cast< const idmef_value_type_id_t& >(result))), SWIGTYPE_p_idmef_value_type_id_t, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_IDMEFPath_GetValueType(PyObject *self, PyObject *args) { int argc; PyObject *argv[3]; int ii; if (!PyTuple_Check(args)) SWIG_fail; argc = (int)PyObject_Length(args); for (ii = 0; (ii < argc) && (ii < 2); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } if (argc == 1) { int _v; void *vptr = 0; int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_Prelude__IDMEFPath, 0); _v = SWIG_CheckState(res); if (_v) { return _wrap_IDMEFPath_GetValueType__SWIG_1(self, args); } } if (argc == 2) { int _v; void *vptr = 0; int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_Prelude__IDMEFPath, 0); _v = SWIG_CheckState(res); if (_v) { { int res = SWIG_AsVal_int(argv[1], NULL); _v = SWIG_CheckState(res); } if (_v) { return _wrap_IDMEFPath_GetValueType__SWIG_0(self, args); } } } fail: SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'IDMEFPath_GetValueType'.\n" " Possible C/C++ prototypes are:\n" " GetValueType(Prelude::IDMEFPath *,int)\n" " GetValueType(Prelude::IDMEFPath *)\n"); return NULL; } SWIGINTERN PyObject *_wrap_IDMEFPath_SetIndex__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; Prelude::IDMEFPath *arg1 = (Prelude::IDMEFPath *) 0 ; unsigned int arg2 ; int arg3 ; void *argp1 = 0 ; int res1 = 0 ; unsigned int val2 ; int ecode2 = 0 ; int val3 ; int ecode3 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; PyObject * obj2 = 0 ; int result; if (!PyArg_ParseTuple(args,(char *)"OOO:IDMEFPath_SetIndex",&obj0,&obj1,&obj2)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Prelude__IDMEFPath, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IDMEFPath_SetIndex" "', argument " "1"" of type '" "Prelude::IDMEFPath *""'"); } arg1 = reinterpret_cast< Prelude::IDMEFPath * >(argp1); ecode2 = SWIG_AsVal_unsigned_SS_int(obj1, &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "IDMEFPath_SetIndex" "', argument " "2"" of type '" "unsigned int""'"); } arg2 = static_cast< unsigned int >(val2); ecode3 = SWIG_AsVal_int(obj2, &val3); if (!SWIG_IsOK(ecode3)) { SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "IDMEFPath_SetIndex" "', argument " "3"" of type '" "int""'"); } arg3 = static_cast< int >(val3); try { result = (int)(arg1)->SetIndex(arg2,arg3); } catch(Prelude::PreludeError &_e) { SWIG_Python_Raise(SWIG_NewPointerObj((new Prelude::PreludeError(static_cast< const Prelude::PreludeError& >(_e))),SWIGTYPE_p_Prelude__PreludeError,SWIG_POINTER_OWN), "Prelude::PreludeError", SWIGTYPE_p_Prelude__PreludeError); SWIG_fail; } resultobj = SWIG_From_int(static_cast< int >(result)); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_IDMEFPath_SetIndex__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; Prelude::IDMEFPath *arg1 = (Prelude::IDMEFPath *) 0 ; unsigned int arg2 ; void *argp1 = 0 ; int res1 = 0 ; unsigned int val2 ; int ecode2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; int result; if (!PyArg_ParseTuple(args,(char *)"OO:IDMEFPath_SetIndex",&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Prelude__IDMEFPath, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IDMEFPath_SetIndex" "', argument " "1"" of type '" "Prelude::IDMEFPath *""'"); } arg1 = reinterpret_cast< Prelude::IDMEFPath * >(argp1); ecode2 = SWIG_AsVal_unsigned_SS_int(obj1, &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "IDMEFPath_SetIndex" "', argument " "2"" of type '" "unsigned int""'"); } arg2 = static_cast< unsigned int >(val2); try { result = (int)(arg1)->SetIndex(arg2); } catch(Prelude::PreludeError &_e) { SWIG_Python_Raise(SWIG_NewPointerObj((new Prelude::PreludeError(static_cast< const Prelude::PreludeError& >(_e))),SWIGTYPE_p_Prelude__PreludeError,SWIG_POINTER_OWN), "Prelude::PreludeError", SWIGTYPE_p_Prelude__PreludeError); SWIG_fail; } resultobj = SWIG_From_int(static_cast< int >(result)); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_IDMEFPath_SetIndex(PyObject *self, PyObject *args) { int argc; PyObject *argv[4]; int ii; if (!PyTuple_Check(args)) SWIG_fail; argc = (int)PyObject_Length(args); for (ii = 0; (ii < argc) && (ii < 3); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } if (argc == 2) { int _v; void *vptr = 0; int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_Prelude__IDMEFPath, 0); _v = SWIG_CheckState(res); if (_v) { { int res = SWIG_AsVal_unsigned_SS_int(argv[1], NULL); _v = SWIG_CheckState(res); } if (_v) { return _wrap_IDMEFPath_SetIndex__SWIG_1(self, args); } } } if (argc == 3) { int _v; void *vptr = 0; int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_Prelude__IDMEFPath, 0); _v = SWIG_CheckState(res); if (_v) { { int res = SWIG_AsVal_unsigned_SS_int(argv[1], NULL); _v = SWIG_CheckState(res); } if (_v) { { int res = SWIG_AsVal_int(argv[2], NULL); _v = SWIG_CheckState(res); } if (_v) { return _wrap_IDMEFPath_SetIndex__SWIG_0(self, args); } } } } fail: SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'IDMEFPath_SetIndex'.\n" " Possible C/C++ prototypes are:\n" " SetIndex(Prelude::IDMEFPath *,unsigned int,int)\n" " SetIndex(Prelude::IDMEFPath *,unsigned int)\n"); return NULL; } SWIGINTERN PyObject *_wrap_IDMEFPath_UndefineIndex__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; Prelude::IDMEFPath *arg1 = (Prelude::IDMEFPath *) 0 ; int arg2 ; void *argp1 = 0 ; int res1 = 0 ; int val2 ; int ecode2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; int result; if (!PyArg_ParseTuple(args,(char *)"OO:IDMEFPath_UndefineIndex",&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Prelude__IDMEFPath, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IDMEFPath_UndefineIndex" "', argument " "1"" of type '" "Prelude::IDMEFPath *""'"); } arg1 = reinterpret_cast< Prelude::IDMEFPath * >(argp1); ecode2 = SWIG_AsVal_int(obj1, &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "IDMEFPath_UndefineIndex" "', argument " "2"" of type '" "int""'"); } arg2 = static_cast< int >(val2); try { result = (int)(arg1)->UndefineIndex(arg2); } catch(Prelude::PreludeError &_e) { SWIG_Python_Raise(SWIG_NewPointerObj((new Prelude::PreludeError(static_cast< const Prelude::PreludeError& >(_e))),SWIGTYPE_p_Prelude__PreludeError,SWIG_POINTER_OWN), "Prelude::PreludeError", SWIGTYPE_p_Prelude__PreludeError); SWIG_fail; } resultobj = SWIG_From_int(static_cast< int >(result)); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_IDMEFPath_UndefineIndex__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; Prelude::IDMEFPath *arg1 = (Prelude::IDMEFPath *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; int result; if (!PyArg_ParseTuple(args,(char *)"O:IDMEFPath_UndefineIndex",&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Prelude__IDMEFPath, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IDMEFPath_UndefineIndex" "', argument " "1"" of type '" "Prelude::IDMEFPath *""'"); } arg1 = reinterpret_cast< Prelude::IDMEFPath * >(argp1); try { result = (int)(arg1)->UndefineIndex(); } catch(Prelude::PreludeError &_e) { SWIG_Python_Raise(SWIG_NewPointerObj((new Prelude::PreludeError(static_cast< const Prelude::PreludeError& >(_e))),SWIGTYPE_p_Prelude__PreludeError,SWIG_POINTER_OWN), "Prelude::PreludeError", SWIGTYPE_p_Prelude__PreludeError); SWIG_fail; } resultobj = SWIG_From_int(static_cast< int >(result)); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_IDMEFPath_UndefineIndex(PyObject *self, PyObject *args) { int argc; PyObject *argv[3]; int ii; if (!PyTuple_Check(args)) SWIG_fail; argc = (int)PyObject_Length(args); for (ii = 0; (ii < argc) && (ii < 2); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } if (argc == 1) { int _v; void *vptr = 0; int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_Prelude__IDMEFPath, 0); _v = SWIG_CheckState(res); if (_v) { return _wrap_IDMEFPath_UndefineIndex__SWIG_1(self, args); } } if (argc == 2) { int _v; void *vptr = 0; int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_Prelude__IDMEFPath, 0); _v = SWIG_CheckState(res); if (_v) { { int res = SWIG_AsVal_int(argv[1], NULL); _v = SWIG_CheckState(res); } if (_v) { return _wrap_IDMEFPath_UndefineIndex__SWIG_0(self, args); } } } fail: SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'IDMEFPath_UndefineIndex'.\n" " Possible C/C++ prototypes are:\n" " UndefineIndex(Prelude::IDMEFPath *,int)\n" " UndefineIndex(Prelude::IDMEFPath *)\n"); return NULL; } SWIGINTERN PyObject *_wrap_IDMEFPath_GetIndex__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; Prelude::IDMEFPath *arg1 = (Prelude::IDMEFPath *) 0 ; int arg2 ; void *argp1 = 0 ; int res1 = 0 ; int val2 ; int ecode2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; int result; if (!PyArg_ParseTuple(args,(char *)"OO:IDMEFPath_GetIndex",&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Prelude__IDMEFPath, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IDMEFPath_GetIndex" "', argument " "1"" of type '" "Prelude::IDMEFPath *""'"); } arg1 = reinterpret_cast< Prelude::IDMEFPath * >(argp1); ecode2 = SWIG_AsVal_int(obj1, &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "IDMEFPath_GetIndex" "', argument " "2"" of type '" "int""'"); } arg2 = static_cast< int >(val2); try { result = (int)(arg1)->GetIndex(arg2); } catch(Prelude::PreludeError &_e) { SWIG_Python_Raise(SWIG_NewPointerObj((new Prelude::PreludeError(static_cast< const Prelude::PreludeError& >(_e))),SWIGTYPE_p_Prelude__PreludeError,SWIG_POINTER_OWN), "Prelude::PreludeError", SWIGTYPE_p_Prelude__PreludeError); SWIG_fail; } resultobj = SWIG_From_int(static_cast< int >(result)); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_IDMEFPath_GetIndex__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; Prelude::IDMEFPath *arg1 = (Prelude::IDMEFPath *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; int result; if (!PyArg_ParseTuple(args,(char *)"O:IDMEFPath_GetIndex",&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Prelude__IDMEFPath, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IDMEFPath_GetIndex" "', argument " "1"" of type '" "Prelude::IDMEFPath *""'"); } arg1 = reinterpret_cast< Prelude::IDMEFPath * >(argp1); try { result = (int)(arg1)->GetIndex(); } catch(Prelude::PreludeError &_e) { SWIG_Python_Raise(SWIG_NewPointerObj((new Prelude::PreludeError(static_cast< const Prelude::PreludeError& >(_e))),SWIGTYPE_p_Prelude__PreludeError,SWIG_POINTER_OWN), "Prelude::PreludeError", SWIGTYPE_p_Prelude__PreludeError); SWIG_fail; } resultobj = SWIG_From_int(static_cast< int >(result)); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_IDMEFPath_GetIndex(PyObject *self, PyObject *args) { int argc; PyObject *argv[3]; int ii; if (!PyTuple_Check(args)) SWIG_fail; argc = (int)PyObject_Length(args); for (ii = 0; (ii < argc) && (ii < 2); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } if (argc == 1) { int _v; void *vptr = 0; int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_Prelude__IDMEFPath, 0); _v = SWIG_CheckState(res); if (_v) { return _wrap_IDMEFPath_GetIndex__SWIG_1(self, args); } } if (argc == 2) { int _v; void *vptr = 0; int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_Prelude__IDMEFPath, 0); _v = SWIG_CheckState(res); if (_v) { { int res = SWIG_AsVal_int(argv[1], NULL); _v = SWIG_CheckState(res); } if (_v) { return _wrap_IDMEFPath_GetIndex__SWIG_0(self, args); } } } fail: SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'IDMEFPath_GetIndex'.\n" " Possible C/C++ prototypes are:\n" " GetIndex(Prelude::IDMEFPath *,int)\n" " GetIndex(Prelude::IDMEFPath *)\n"); return NULL; } SWIGINTERN PyObject *_wrap_IDMEFPath_MakeChild(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; Prelude::IDMEFPath *arg1 = (Prelude::IDMEFPath *) 0 ; char *arg2 = (char *) 0 ; unsigned int arg3 ; void *argp1 = 0 ; int res1 = 0 ; int res2 ; char *buf2 = 0 ; int alloc2 = 0 ; unsigned int val3 ; int ecode3 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; PyObject * obj2 = 0 ; int result; if (!PyArg_ParseTuple(args,(char *)"OOO:IDMEFPath_MakeChild",&obj0,&obj1,&obj2)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Prelude__IDMEFPath, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IDMEFPath_MakeChild" "', argument " "1"" of type '" "Prelude::IDMEFPath *""'"); } arg1 = reinterpret_cast< Prelude::IDMEFPath * >(argp1); res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "IDMEFPath_MakeChild" "', argument " "2"" of type '" "char const *""'"); } arg2 = reinterpret_cast< char * >(buf2); ecode3 = SWIG_AsVal_unsigned_SS_int(obj2, &val3); if (!SWIG_IsOK(ecode3)) { SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "IDMEFPath_MakeChild" "', argument " "3"" of type '" "unsigned int""'"); } arg3 = static_cast< unsigned int >(val3); try { result = (int)(arg1)->MakeChild((char const *)arg2,arg3); } catch(Prelude::PreludeError &_e) { SWIG_Python_Raise(SWIG_NewPointerObj((new Prelude::PreludeError(static_cast< const Prelude::PreludeError& >(_e))),SWIGTYPE_p_Prelude__PreludeError,SWIG_POINTER_OWN), "Prelude::PreludeError", SWIGTYPE_p_Prelude__PreludeError); SWIG_fail; } resultobj = SWIG_From_int(static_cast< int >(result)); if (alloc2 == SWIG_NEWOBJ) delete[] buf2; return resultobj; fail: if (alloc2 == SWIG_NEWOBJ) delete[] buf2; return NULL; } SWIGINTERN PyObject *_wrap_IDMEFPath_MakeParent(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; Prelude::IDMEFPath *arg1 = (Prelude::IDMEFPath *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; int result; if (!PyArg_ParseTuple(args,(char *)"O:IDMEFPath_MakeParent",&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Prelude__IDMEFPath, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IDMEFPath_MakeParent" "', argument " "1"" of type '" "Prelude::IDMEFPath *""'"); } arg1 = reinterpret_cast< Prelude::IDMEFPath * >(argp1); try { result = (int)(arg1)->MakeParent(); } catch(Prelude::PreludeError &_e) { SWIG_Python_Raise(SWIG_NewPointerObj((new Prelude::PreludeError(static_cast< const Prelude::PreludeError& >(_e))),SWIGTYPE_p_Prelude__PreludeError,SWIG_POINTER_OWN), "Prelude::PreludeError", SWIGTYPE_p_Prelude__PreludeError); SWIG_fail; } resultobj = SWIG_From_int(static_cast< int >(result)); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_IDMEFPath_Compare__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; Prelude::IDMEFPath *arg1 = (Prelude::IDMEFPath *) 0 ; Prelude::IDMEFPath *arg2 = (Prelude::IDMEFPath *) 0 ; int arg3 ; void *argp1 = 0 ; int res1 = 0 ; void *argp2 = 0 ; int res2 = 0 ; int val3 ; int ecode3 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; PyObject * obj2 = 0 ; int result; if (!PyArg_ParseTuple(args,(char *)"OOO:IDMEFPath_Compare",&obj0,&obj1,&obj2)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Prelude__IDMEFPath, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IDMEFPath_Compare" "', argument " "1"" of type '" "Prelude::IDMEFPath *""'"); } arg1 = reinterpret_cast< Prelude::IDMEFPath * >(argp1); res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_Prelude__IDMEFPath, 0 | 0 ); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "IDMEFPath_Compare" "', argument " "2"" of type '" "Prelude::IDMEFPath *""'"); } arg2 = reinterpret_cast< Prelude::IDMEFPath * >(argp2); ecode3 = SWIG_AsVal_int(obj2, &val3); if (!SWIG_IsOK(ecode3)) { SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "IDMEFPath_Compare" "', argument " "3"" of type '" "int""'"); } arg3 = static_cast< int >(val3); try { result = (int)(arg1)->Compare(arg2,arg3); } catch(Prelude::PreludeError &_e) { SWIG_Python_Raise(SWIG_NewPointerObj((new Prelude::PreludeError(static_cast< const Prelude::PreludeError& >(_e))),SWIGTYPE_p_Prelude__PreludeError,SWIG_POINTER_OWN), "Prelude::PreludeError", SWIGTYPE_p_Prelude__PreludeError); SWIG_fail; } resultobj = SWIG_From_int(static_cast< int >(result)); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_IDMEFPath_Compare__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; Prelude::IDMEFPath *arg1 = (Prelude::IDMEFPath *) 0 ; Prelude::IDMEFPath *arg2 = (Prelude::IDMEFPath *) 0 ; void *argp1 = 0 ; int res1 = 0 ; void *argp2 = 0 ; int res2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; int result; if (!PyArg_ParseTuple(args,(char *)"OO:IDMEFPath_Compare",&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Prelude__IDMEFPath, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IDMEFPath_Compare" "', argument " "1"" of type '" "Prelude::IDMEFPath *""'"); } arg1 = reinterpret_cast< Prelude::IDMEFPath * >(argp1); res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_Prelude__IDMEFPath, 0 | 0 ); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "IDMEFPath_Compare" "', argument " "2"" of type '" "Prelude::IDMEFPath *""'"); } arg2 = reinterpret_cast< Prelude::IDMEFPath * >(argp2); try { result = (int)(arg1)->Compare(arg2); } catch(Prelude::PreludeError &_e) { SWIG_Python_Raise(SWIG_NewPointerObj((new Prelude::PreludeError(static_cast< const Prelude::PreludeError& >(_e))),SWIGTYPE_p_Prelude__PreludeError,SWIG_POINTER_OWN), "Prelude::PreludeError", SWIGTYPE_p_Prelude__PreludeError); SWIG_fail; } resultobj = SWIG_From_int(static_cast< int >(result)); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_IDMEFPath_Compare(PyObject *self, PyObject *args) { int argc; PyObject *argv[4]; int ii; if (!PyTuple_Check(args)) SWIG_fail; argc = (int)PyObject_Length(args); for (ii = 0; (ii < argc) && (ii < 3); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } if (argc == 2) { int _v; void *vptr = 0; int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_Prelude__IDMEFPath, 0); _v = SWIG_CheckState(res); if (_v) { void *vptr = 0; int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_p_Prelude__IDMEFPath, 0); _v = SWIG_CheckState(res); if (_v) { return _wrap_IDMEFPath_Compare__SWIG_1(self, args); } } } if (argc == 3) { int _v; void *vptr = 0; int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_Prelude__IDMEFPath, 0); _v = SWIG_CheckState(res); if (_v) { void *vptr = 0; int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_p_Prelude__IDMEFPath, 0); _v = SWIG_CheckState(res); if (_v) { { int res = SWIG_AsVal_int(argv[2], NULL); _v = SWIG_CheckState(res); } if (_v) { return _wrap_IDMEFPath_Compare__SWIG_0(self, args); } } } } fail: SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'IDMEFPath_Compare'.\n" " Possible C/C++ prototypes are:\n" " Compare(Prelude::IDMEFPath *,Prelude::IDMEFPath *,int)\n" " Compare(Prelude::IDMEFPath *,Prelude::IDMEFPath *)\n"); return NULL; } SWIGINTERN PyObject *_wrap_IDMEFPath_Clone(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; Prelude::IDMEFPath *arg1 = (Prelude::IDMEFPath *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; SwigValueWrapper< Prelude::IDMEFPath > result; if (!PyArg_ParseTuple(args,(char *)"O:IDMEFPath_Clone",&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Prelude__IDMEFPath, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IDMEFPath_Clone" "', argument " "1"" of type '" "Prelude::IDMEFPath *""'"); } arg1 = reinterpret_cast< Prelude::IDMEFPath * >(argp1); try { result = (arg1)->Clone(); } catch(Prelude::PreludeError &_e) { SWIG_Python_Raise(SWIG_NewPointerObj((new Prelude::PreludeError(static_cast< const Prelude::PreludeError& >(_e))),SWIGTYPE_p_Prelude__PreludeError,SWIG_POINTER_OWN), "Prelude::PreludeError", SWIGTYPE_p_Prelude__PreludeError); SWIG_fail; } resultobj = SWIG_NewPointerObj((new Prelude::IDMEFPath(static_cast< const Prelude::IDMEFPath& >(result))), SWIGTYPE_p_Prelude__IDMEFPath, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_IDMEFPath_CheckOperator(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; Prelude::IDMEFPath *arg1 = (Prelude::IDMEFPath *) 0 ; idmef_criterion_operator_t arg2 ; void *argp1 = 0 ; int res1 = 0 ; void *argp2 ; int res2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; int result; if (!PyArg_ParseTuple(args,(char *)"OO:IDMEFPath_CheckOperator",&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Prelude__IDMEFPath, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IDMEFPath_CheckOperator" "', argument " "1"" of type '" "Prelude::IDMEFPath *""'"); } arg1 = reinterpret_cast< Prelude::IDMEFPath * >(argp1); { res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_idmef_criterion_operator_t, 0 | 0); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "IDMEFPath_CheckOperator" "', argument " "2"" of type '" "idmef_criterion_operator_t""'"); } if (!argp2) { SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "IDMEFPath_CheckOperator" "', argument " "2"" of type '" "idmef_criterion_operator_t""'"); } else { idmef_criterion_operator_t * temp = reinterpret_cast< idmef_criterion_operator_t * >(argp2); arg2 = *temp; if (SWIG_IsNewObj(res2)) delete temp; } } try { result = (int)(arg1)->CheckOperator(arg2); } catch(Prelude::PreludeError &_e) { SWIG_Python_Raise(SWIG_NewPointerObj((new Prelude::PreludeError(static_cast< const Prelude::PreludeError& >(_e))),SWIGTYPE_p_Prelude__PreludeError,SWIG_POINTER_OWN), "Prelude::PreludeError", SWIGTYPE_p_Prelude__PreludeError); SWIG_fail; } resultobj = SWIG_From_int(static_cast< int >(result)); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_IDMEFPath_GetApplicableOperators(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; Prelude::IDMEFPath *arg1 = (Prelude::IDMEFPath *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; idmef_criterion_operator_t result; if (!PyArg_ParseTuple(args,(char *)"O:IDMEFPath_GetApplicableOperators",&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Prelude__IDMEFPath, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IDMEFPath_GetApplicableOperators" "', argument " "1"" of type '" "Prelude::IDMEFPath *""'"); } arg1 = reinterpret_cast< Prelude::IDMEFPath * >(argp1); try { result = (arg1)->GetApplicableOperators(); } catch(Prelude::PreludeError &_e) { SWIG_Python_Raise(SWIG_NewPointerObj((new Prelude::PreludeError(static_cast< const Prelude::PreludeError& >(_e))),SWIGTYPE_p_Prelude__PreludeError,SWIG_POINTER_OWN), "Prelude::PreludeError", SWIGTYPE_p_Prelude__PreludeError); SWIG_fail; } resultobj = SWIG_NewPointerObj((new idmef_criterion_operator_t(static_cast< const idmef_criterion_operator_t& >(result))), SWIGTYPE_p_idmef_criterion_operator_t, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_IDMEFPath_GetName__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; Prelude::IDMEFPath *arg1 = (Prelude::IDMEFPath *) 0 ; int arg2 ; void *argp1 = 0 ; int res1 = 0 ; int val2 ; int ecode2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; char *result = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:IDMEFPath_GetName",&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Prelude__IDMEFPath, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IDMEFPath_GetName" "', argument " "1"" of type '" "Prelude::IDMEFPath *""'"); } arg1 = reinterpret_cast< Prelude::IDMEFPath * >(argp1); ecode2 = SWIG_AsVal_int(obj1, &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "IDMEFPath_GetName" "', argument " "2"" of type '" "int""'"); } arg2 = static_cast< int >(val2); try { result = (char *)(arg1)->GetName(arg2); } catch(Prelude::PreludeError &_e) { SWIG_Python_Raise(SWIG_NewPointerObj((new Prelude::PreludeError(static_cast< const Prelude::PreludeError& >(_e))),SWIGTYPE_p_Prelude__PreludeError,SWIG_POINTER_OWN), "Prelude::PreludeError", SWIGTYPE_p_Prelude__PreludeError); SWIG_fail; } resultobj = SWIG_FromCharPtr((const char *)result); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_IDMEFPath_GetName__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; Prelude::IDMEFPath *arg1 = (Prelude::IDMEFPath *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; char *result = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:IDMEFPath_GetName",&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Prelude__IDMEFPath, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IDMEFPath_GetName" "', argument " "1"" of type '" "Prelude::IDMEFPath *""'"); } arg1 = reinterpret_cast< Prelude::IDMEFPath * >(argp1); try { result = (char *)(arg1)->GetName(); } catch(Prelude::PreludeError &_e) { SWIG_Python_Raise(SWIG_NewPointerObj((new Prelude::PreludeError(static_cast< const Prelude::PreludeError& >(_e))),SWIGTYPE_p_Prelude__PreludeError,SWIG_POINTER_OWN), "Prelude::PreludeError", SWIGTYPE_p_Prelude__PreludeError); SWIG_fail; } resultobj = SWIG_FromCharPtr((const char *)result); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_IDMEFPath_GetName(PyObject *self, PyObject *args) { int argc; PyObject *argv[3]; int ii; if (!PyTuple_Check(args)) SWIG_fail; argc = (int)PyObject_Length(args); for (ii = 0; (ii < argc) && (ii < 2); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } if (argc == 1) { int _v; void *vptr = 0; int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_Prelude__IDMEFPath, 0); _v = SWIG_CheckState(res); if (_v) { return _wrap_IDMEFPath_GetName__SWIG_1(self, args); } } if (argc == 2) { int _v; void *vptr = 0; int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_Prelude__IDMEFPath, 0); _v = SWIG_CheckState(res); if (_v) { { int res = SWIG_AsVal_int(argv[1], NULL); _v = SWIG_CheckState(res); } if (_v) { return _wrap_IDMEFPath_GetName__SWIG_0(self, args); } } } fail: SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'IDMEFPath_GetName'.\n" " Possible C/C++ prototypes are:\n" " GetName(Prelude::IDMEFPath *,int)\n" " GetName(Prelude::IDMEFPath *)\n"); return NULL; } SWIGINTERN PyObject *_wrap_IDMEFPath_IsAmbiguous(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; Prelude::IDMEFPath *arg1 = (Prelude::IDMEFPath *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; bool result; if (!PyArg_ParseTuple(args,(char *)"O:IDMEFPath_IsAmbiguous",&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Prelude__IDMEFPath, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IDMEFPath_IsAmbiguous" "', argument " "1"" of type '" "Prelude::IDMEFPath *""'"); } arg1 = reinterpret_cast< Prelude::IDMEFPath * >(argp1); try { result = (bool)(arg1)->IsAmbiguous(); } catch(Prelude::PreludeError &_e) { SWIG_Python_Raise(SWIG_NewPointerObj((new Prelude::PreludeError(static_cast< const Prelude::PreludeError& >(_e))),SWIGTYPE_p_Prelude__PreludeError,SWIG_POINTER_OWN), "Prelude::PreludeError", SWIGTYPE_p_Prelude__PreludeError); SWIG_fail; } resultobj = SWIG_From_bool(static_cast< bool >(result)); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_IDMEFPath_HasLists(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; Prelude::IDMEFPath *arg1 = (Prelude::IDMEFPath *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; int result; if (!PyArg_ParseTuple(args,(char *)"O:IDMEFPath_HasLists",&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Prelude__IDMEFPath, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IDMEFPath_HasLists" "', argument " "1"" of type '" "Prelude::IDMEFPath *""'"); } arg1 = reinterpret_cast< Prelude::IDMEFPath * >(argp1); try { result = (int)(arg1)->HasLists(); } catch(Prelude::PreludeError &_e) { SWIG_Python_Raise(SWIG_NewPointerObj((new Prelude::PreludeError(static_cast< const Prelude::PreludeError& >(_e))),SWIGTYPE_p_Prelude__PreludeError,SWIG_POINTER_OWN), "Prelude::PreludeError", SWIGTYPE_p_Prelude__PreludeError); SWIG_fail; } resultobj = SWIG_From_int(static_cast< int >(result)); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_IDMEFPath_IsList__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; Prelude::IDMEFPath *arg1 = (Prelude::IDMEFPath *) 0 ; int arg2 ; void *argp1 = 0 ; int res1 = 0 ; int val2 ; int ecode2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; bool result; if (!PyArg_ParseTuple(args,(char *)"OO:IDMEFPath_IsList",&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Prelude__IDMEFPath, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IDMEFPath_IsList" "', argument " "1"" of type '" "Prelude::IDMEFPath *""'"); } arg1 = reinterpret_cast< Prelude::IDMEFPath * >(argp1); ecode2 = SWIG_AsVal_int(obj1, &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "IDMEFPath_IsList" "', argument " "2"" of type '" "int""'"); } arg2 = static_cast< int >(val2); try { result = (bool)(arg1)->IsList(arg2); } catch(Prelude::PreludeError &_e) { SWIG_Python_Raise(SWIG_NewPointerObj((new Prelude::PreludeError(static_cast< const Prelude::PreludeError& >(_e))),SWIGTYPE_p_Prelude__PreludeError,SWIG_POINTER_OWN), "Prelude::PreludeError", SWIGTYPE_p_Prelude__PreludeError); SWIG_fail; } resultobj = SWIG_From_bool(static_cast< bool >(result)); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_IDMEFPath_IsList__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; Prelude::IDMEFPath *arg1 = (Prelude::IDMEFPath *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; bool result; if (!PyArg_ParseTuple(args,(char *)"O:IDMEFPath_IsList",&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Prelude__IDMEFPath, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IDMEFPath_IsList" "', argument " "1"" of type '" "Prelude::IDMEFPath *""'"); } arg1 = reinterpret_cast< Prelude::IDMEFPath * >(argp1); try { result = (bool)(arg1)->IsList(); } catch(Prelude::PreludeError &_e) { SWIG_Python_Raise(SWIG_NewPointerObj((new Prelude::PreludeError(static_cast< const Prelude::PreludeError& >(_e))),SWIGTYPE_p_Prelude__PreludeError,SWIG_POINTER_OWN), "Prelude::PreludeError", SWIGTYPE_p_Prelude__PreludeError); SWIG_fail; } resultobj = SWIG_From_bool(static_cast< bool >(result)); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_IDMEFPath_IsList(PyObject *self, PyObject *args) { int argc; PyObject *argv[3]; int ii; if (!PyTuple_Check(args)) SWIG_fail; argc = (int)PyObject_Length(args); for (ii = 0; (ii < argc) && (ii < 2); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } if (argc == 1) { int _v; void *vptr = 0; int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_Prelude__IDMEFPath, 0); _v = SWIG_CheckState(res); if (_v) { return _wrap_IDMEFPath_IsList__SWIG_1(self, args); } } if (argc == 2) { int _v; void *vptr = 0; int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_Prelude__IDMEFPath, 0); _v = SWIG_CheckState(res); if (_v) { { int res = SWIG_AsVal_int(argv[1], NULL); _v = SWIG_CheckState(res); } if (_v) { return _wrap_IDMEFPath_IsList__SWIG_0(self, args); } } } fail: SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'IDMEFPath_IsList'.\n" " Possible C/C++ prototypes are:\n" " IsList(Prelude::IDMEFPath *,int)\n" " IsList(Prelude::IDMEFPath *)\n"); return NULL; } SWIGINTERN PyObject *_wrap_IDMEFPath_GetDepth(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; Prelude::IDMEFPath *arg1 = (Prelude::IDMEFPath *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; unsigned int result; if (!PyArg_ParseTuple(args,(char *)"O:IDMEFPath_GetDepth",&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Prelude__IDMEFPath, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IDMEFPath_GetDepth" "', argument " "1"" of type '" "Prelude::IDMEFPath *""'"); } arg1 = reinterpret_cast< Prelude::IDMEFPath * >(argp1); try { result = (unsigned int)(arg1)->GetDepth(); } catch(Prelude::PreludeError &_e) { SWIG_Python_Raise(SWIG_NewPointerObj((new Prelude::PreludeError(static_cast< const Prelude::PreludeError& >(_e))),SWIGTYPE_p_Prelude__PreludeError,SWIG_POINTER_OWN), "Prelude::PreludeError", SWIGTYPE_p_Prelude__PreludeError); SWIG_fail; } resultobj = SWIG_From_unsigned_SS_int(static_cast< unsigned int >(result)); return resultobj; fail: return NULL; } SWIGINTERN PyObject *IDMEFPath_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *obj; if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL; SWIG_TypeNewClientData(SWIGTYPE_p_Prelude__IDMEFPath, SWIG_NewClientData(obj)); return SWIG_Py_Void(); } SWIGINTERN PyObject *_wrap_new_IDMEFTime__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; Prelude::IDMEFTime *result = 0 ; if (!PyArg_ParseTuple(args,(char *)":new_IDMEFTime")) SWIG_fail; try { result = (Prelude::IDMEFTime *)new Prelude::IDMEFTime(); } catch(Prelude::PreludeError &_e) { SWIG_Python_Raise(SWIG_NewPointerObj((new Prelude::PreludeError(static_cast< const Prelude::PreludeError& >(_e))),SWIGTYPE_p_Prelude__PreludeError,SWIG_POINTER_OWN), "Prelude::PreludeError", SWIGTYPE_p_Prelude__PreludeError); SWIG_fail; } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Prelude__IDMEFTime, SWIG_POINTER_NEW | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_new_IDMEFTime__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_time_t *arg1 = (idmef_time_t *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; Prelude::IDMEFTime *result = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:new_IDMEFTime",&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_idmef_time_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_IDMEFTime" "', argument " "1"" of type '" "idmef_time_t *""'"); } arg1 = reinterpret_cast< idmef_time_t * >(argp1); try { result = (Prelude::IDMEFTime *)new Prelude::IDMEFTime(arg1); } catch(Prelude::PreludeError &_e) { SWIG_Python_Raise(SWIG_NewPointerObj((new Prelude::PreludeError(static_cast< const Prelude::PreludeError& >(_e))),SWIGTYPE_p_Prelude__PreludeError,SWIG_POINTER_OWN), "Prelude::PreludeError", SWIGTYPE_p_Prelude__PreludeError); SWIG_fail; } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Prelude__IDMEFTime, SWIG_POINTER_NEW | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_new_IDMEFTime__SWIG_2(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; time_t *arg1 = (time_t *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; Prelude::IDMEFTime *result = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:new_IDMEFTime",&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_time_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_IDMEFTime" "', argument " "1"" of type '" "time_t const *""'"); } arg1 = reinterpret_cast< time_t * >(argp1); try { result = (Prelude::IDMEFTime *)new Prelude::IDMEFTime((time_t const *)arg1); } catch(Prelude::PreludeError &_e) { SWIG_Python_Raise(SWIG_NewPointerObj((new Prelude::PreludeError(static_cast< const Prelude::PreludeError& >(_e))),SWIGTYPE_p_Prelude__PreludeError,SWIG_POINTER_OWN), "Prelude::PreludeError", SWIGTYPE_p_Prelude__PreludeError); SWIG_fail; } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Prelude__IDMEFTime, SWIG_POINTER_NEW | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_new_IDMEFTime__SWIG_3(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; char *arg1 = (char *) 0 ; int res1 ; char *buf1 = 0 ; int alloc1 = 0 ; PyObject * obj0 = 0 ; Prelude::IDMEFTime *result = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:new_IDMEFTime",&obj0)) SWIG_fail; res1 = SWIG_AsCharPtrAndSize(obj0, &buf1, NULL, &alloc1); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_IDMEFTime" "', argument " "1"" of type '" "char const *""'"); } arg1 = reinterpret_cast< char * >(buf1); try { result = (Prelude::IDMEFTime *)new Prelude::IDMEFTime((char const *)arg1); } catch(Prelude::PreludeError &_e) { SWIG_Python_Raise(SWIG_NewPointerObj((new Prelude::PreludeError(static_cast< const Prelude::PreludeError& >(_e))),SWIGTYPE_p_Prelude__PreludeError,SWIG_POINTER_OWN), "Prelude::PreludeError", SWIGTYPE_p_Prelude__PreludeError); SWIG_fail; } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Prelude__IDMEFTime, SWIG_POINTER_NEW | 0 ); if (alloc1 == SWIG_NEWOBJ) delete[] buf1; return resultobj; fail: if (alloc1 == SWIG_NEWOBJ) delete[] buf1; return NULL; } SWIGINTERN PyObject *_wrap_new_IDMEFTime__SWIG_4(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; timeval *arg1 = (timeval *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; Prelude::IDMEFTime *result = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:new_IDMEFTime",&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_timeval, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_IDMEFTime" "', argument " "1"" of type '" "timeval const *""'"); } arg1 = reinterpret_cast< timeval * >(argp1); try { result = (Prelude::IDMEFTime *)new Prelude::IDMEFTime((timeval const *)arg1); } catch(Prelude::PreludeError &_e) { SWIG_Python_Raise(SWIG_NewPointerObj((new Prelude::PreludeError(static_cast< const Prelude::PreludeError& >(_e))),SWIGTYPE_p_Prelude__PreludeError,SWIG_POINTER_OWN), "Prelude::PreludeError", SWIGTYPE_p_Prelude__PreludeError); SWIG_fail; } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Prelude__IDMEFTime, SWIG_POINTER_NEW | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_new_IDMEFTime__SWIG_5(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; Prelude::IDMEFTime *arg1 = 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; Prelude::IDMEFTime *result = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:new_IDMEFTime",&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1, SWIGTYPE_p_Prelude__IDMEFTime, 0 | 0); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_IDMEFTime" "', argument " "1"" of type '" "Prelude::IDMEFTime const &""'"); } if (!argp1) { SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_IDMEFTime" "', argument " "1"" of type '" "Prelude::IDMEFTime const &""'"); } arg1 = reinterpret_cast< Prelude::IDMEFTime * >(argp1); try { result = (Prelude::IDMEFTime *)new Prelude::IDMEFTime((Prelude::IDMEFTime const &)*arg1); } catch(Prelude::PreludeError &_e) { SWIG_Python_Raise(SWIG_NewPointerObj((new Prelude::PreludeError(static_cast< const Prelude::PreludeError& >(_e))),SWIGTYPE_p_Prelude__PreludeError,SWIG_POINTER_OWN), "Prelude::PreludeError", SWIGTYPE_p_Prelude__PreludeError); SWIG_fail; } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Prelude__IDMEFTime, SWIG_POINTER_NEW | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_new_IDMEFTime(PyObject *self, PyObject *args) { int argc; PyObject *argv[2]; int ii; if (!PyTuple_Check(args)) SWIG_fail; argc = (int)PyObject_Length(args); for (ii = 0; (ii < argc) && (ii < 1); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } if (argc == 0) { return _wrap_new_IDMEFTime__SWIG_0(self, args); } if (argc == 1) { int _v; void *vptr = 0; int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_idmef_time_t, 0); _v = SWIG_CheckState(res); if (_v) { return _wrap_new_IDMEFTime__SWIG_1(self, args); } } if (argc == 1) { int _v; void *vptr = 0; int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_time_t, 0); _v = SWIG_CheckState(res); if (_v) { return _wrap_new_IDMEFTime__SWIG_2(self, args); } } if (argc == 1) { int _v; void *vptr = 0; int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_timeval, 0); _v = SWIG_CheckState(res); if (_v) { return _wrap_new_IDMEFTime__SWIG_4(self, args); } } if (argc == 1) { int _v; int res = SWIG_ConvertPtr(argv[0], 0, SWIGTYPE_p_Prelude__IDMEFTime, 0); _v = SWIG_CheckState(res); if (_v) { return _wrap_new_IDMEFTime__SWIG_5(self, args); } } if (argc == 1) { int _v; int res = SWIG_AsCharPtrAndSize(argv[0], 0, NULL, 0); _v = SWIG_CheckState(res); if (_v) { return _wrap_new_IDMEFTime__SWIG_3(self, args); } } fail: SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'new_IDMEFTime'.\n" " Possible C/C++ prototypes are:\n" " Prelude::IDMEFTime()\n" " Prelude::IDMEFTime(idmef_time_t *)\n" " Prelude::IDMEFTime(time_t const *)\n" " Prelude::IDMEFTime(char const *)\n" " Prelude::IDMEFTime(timeval const *)\n" " Prelude::IDMEFTime(Prelude::IDMEFTime const &)\n"); return NULL; } SWIGINTERN PyObject *_wrap_delete_IDMEFTime(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; Prelude::IDMEFTime *arg1 = (Prelude::IDMEFTime *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:delete_IDMEFTime",&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Prelude__IDMEFTime, SWIG_POINTER_DISOWN | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_IDMEFTime" "', argument " "1"" of type '" "Prelude::IDMEFTime *""'"); } arg1 = reinterpret_cast< Prelude::IDMEFTime * >(argp1); delete arg1; resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_IDMEFTime_Set__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; Prelude::IDMEFTime *arg1 = (Prelude::IDMEFTime *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:IDMEFTime_Set",&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Prelude__IDMEFTime, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IDMEFTime_Set" "', argument " "1"" of type '" "Prelude::IDMEFTime *""'"); } arg1 = reinterpret_cast< Prelude::IDMEFTime * >(argp1); try { (arg1)->Set(); } catch(Prelude::PreludeError &_e) { SWIG_Python_Raise(SWIG_NewPointerObj((new Prelude::PreludeError(static_cast< const Prelude::PreludeError& >(_e))),SWIGTYPE_p_Prelude__PreludeError,SWIG_POINTER_OWN), "Prelude::PreludeError", SWIGTYPE_p_Prelude__PreludeError); SWIG_fail; } resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_IDMEFTime_Set__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; Prelude::IDMEFTime *arg1 = (Prelude::IDMEFTime *) 0 ; time_t *arg2 = (time_t *) 0 ; void *argp1 = 0 ; int res1 = 0 ; void *argp2 = 0 ; int res2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:IDMEFTime_Set",&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Prelude__IDMEFTime, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IDMEFTime_Set" "', argument " "1"" of type '" "Prelude::IDMEFTime *""'"); } arg1 = reinterpret_cast< Prelude::IDMEFTime * >(argp1); res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_time_t, 0 | 0 ); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "IDMEFTime_Set" "', argument " "2"" of type '" "time_t const *""'"); } arg2 = reinterpret_cast< time_t * >(argp2); try { (arg1)->Set((time_t const *)arg2); } catch(Prelude::PreludeError &_e) { SWIG_Python_Raise(SWIG_NewPointerObj((new Prelude::PreludeError(static_cast< const Prelude::PreludeError& >(_e))),SWIGTYPE_p_Prelude__PreludeError,SWIG_POINTER_OWN), "Prelude::PreludeError", SWIGTYPE_p_Prelude__PreludeError); SWIG_fail; } resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_IDMEFTime_Set__SWIG_2(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; Prelude::IDMEFTime *arg1 = (Prelude::IDMEFTime *) 0 ; char *arg2 = (char *) 0 ; void *argp1 = 0 ; int res1 = 0 ; int res2 ; char *buf2 = 0 ; int alloc2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:IDMEFTime_Set",&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Prelude__IDMEFTime, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IDMEFTime_Set" "', argument " "1"" of type '" "Prelude::IDMEFTime *""'"); } arg1 = reinterpret_cast< Prelude::IDMEFTime * >(argp1); res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "IDMEFTime_Set" "', argument " "2"" of type '" "char const *""'"); } arg2 = reinterpret_cast< char * >(buf2); try { (arg1)->Set((char const *)arg2); } catch(Prelude::PreludeError &_e) { SWIG_Python_Raise(SWIG_NewPointerObj((new Prelude::PreludeError(static_cast< const Prelude::PreludeError& >(_e))),SWIGTYPE_p_Prelude__PreludeError,SWIG_POINTER_OWN), "Prelude::PreludeError", SWIGTYPE_p_Prelude__PreludeError); SWIG_fail; } resultobj = SWIG_Py_Void(); if (alloc2 == SWIG_NEWOBJ) delete[] buf2; return resultobj; fail: if (alloc2 == SWIG_NEWOBJ) delete[] buf2; return NULL; } SWIGINTERN PyObject *_wrap_IDMEFTime_Set__SWIG_3(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; Prelude::IDMEFTime *arg1 = (Prelude::IDMEFTime *) 0 ; timeval *arg2 = (timeval *) 0 ; void *argp1 = 0 ; int res1 = 0 ; void *argp2 = 0 ; int res2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:IDMEFTime_Set",&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Prelude__IDMEFTime, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IDMEFTime_Set" "', argument " "1"" of type '" "Prelude::IDMEFTime *""'"); } arg1 = reinterpret_cast< Prelude::IDMEFTime * >(argp1); res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_timeval, 0 | 0 ); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "IDMEFTime_Set" "', argument " "2"" of type '" "timeval const *""'"); } arg2 = reinterpret_cast< timeval * >(argp2); try { (arg1)->Set((timeval const *)arg2); } catch(Prelude::PreludeError &_e) { SWIG_Python_Raise(SWIG_NewPointerObj((new Prelude::PreludeError(static_cast< const Prelude::PreludeError& >(_e))),SWIGTYPE_p_Prelude__PreludeError,SWIG_POINTER_OWN), "Prelude::PreludeError", SWIGTYPE_p_Prelude__PreludeError); SWIG_fail; } resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_IDMEFTime_Set(PyObject *self, PyObject *args) { int argc; PyObject *argv[3]; int ii; if (!PyTuple_Check(args)) SWIG_fail; argc = (int)PyObject_Length(args); for (ii = 0; (ii < argc) && (ii < 2); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } if (argc == 1) { int _v; void *vptr = 0; int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_Prelude__IDMEFTime, 0); _v = SWIG_CheckState(res); if (_v) { return _wrap_IDMEFTime_Set__SWIG_0(self, args); } } if (argc == 2) { int _v; void *vptr = 0; int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_Prelude__IDMEFTime, 0); _v = SWIG_CheckState(res); if (_v) { void *vptr = 0; int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_p_time_t, 0); _v = SWIG_CheckState(res); if (_v) { return _wrap_IDMEFTime_Set__SWIG_1(self, args); } } } if (argc == 2) { int _v; void *vptr = 0; int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_Prelude__IDMEFTime, 0); _v = SWIG_CheckState(res); if (_v) { void *vptr = 0; int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_p_timeval, 0); _v = SWIG_CheckState(res); if (_v) { return _wrap_IDMEFTime_Set__SWIG_3(self, args); } } } if (argc == 2) { int _v; void *vptr = 0; int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_Prelude__IDMEFTime, 0); _v = SWIG_CheckState(res); if (_v) { int res = SWIG_AsCharPtrAndSize(argv[1], 0, NULL, 0); _v = SWIG_CheckState(res); if (_v) { return _wrap_IDMEFTime_Set__SWIG_2(self, args); } } } fail: SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'IDMEFTime_Set'.\n" " Possible C/C++ prototypes are:\n" " Set(Prelude::IDMEFTime *)\n" " Set(Prelude::IDMEFTime *,time_t const *)\n" " Set(Prelude::IDMEFTime *,char const *)\n" " Set(Prelude::IDMEFTime *,timeval const *)\n"); return NULL; } SWIGINTERN PyObject *_wrap_IDMEFTime_SetSec(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; Prelude::IDMEFTime *arg1 = (Prelude::IDMEFTime *) 0 ; uint32_t arg2 ; void *argp1 = 0 ; int res1 = 0 ; unsigned int val2 ; int ecode2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:IDMEFTime_SetSec",&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Prelude__IDMEFTime, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IDMEFTime_SetSec" "', argument " "1"" of type '" "Prelude::IDMEFTime *""'"); } arg1 = reinterpret_cast< Prelude::IDMEFTime * >(argp1); ecode2 = SWIG_AsVal_unsigned_SS_int(obj1, &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "IDMEFTime_SetSec" "', argument " "2"" of type '" "uint32_t""'"); } arg2 = static_cast< uint32_t >(val2); try { (arg1)->SetSec(arg2); } catch(Prelude::PreludeError &_e) { SWIG_Python_Raise(SWIG_NewPointerObj((new Prelude::PreludeError(static_cast< const Prelude::PreludeError& >(_e))),SWIGTYPE_p_Prelude__PreludeError,SWIG_POINTER_OWN), "Prelude::PreludeError", SWIGTYPE_p_Prelude__PreludeError); SWIG_fail; } resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_IDMEFTime_SetUSec(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; Prelude::IDMEFTime *arg1 = (Prelude::IDMEFTime *) 0 ; uint32_t arg2 ; void *argp1 = 0 ; int res1 = 0 ; unsigned int val2 ; int ecode2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:IDMEFTime_SetUSec",&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Prelude__IDMEFTime, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IDMEFTime_SetUSec" "', argument " "1"" of type '" "Prelude::IDMEFTime *""'"); } arg1 = reinterpret_cast< Prelude::IDMEFTime * >(argp1); ecode2 = SWIG_AsVal_unsigned_SS_int(obj1, &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "IDMEFTime_SetUSec" "', argument " "2"" of type '" "uint32_t""'"); } arg2 = static_cast< uint32_t >(val2); try { (arg1)->SetUSec(arg2); } catch(Prelude::PreludeError &_e) { SWIG_Python_Raise(SWIG_NewPointerObj((new Prelude::PreludeError(static_cast< const Prelude::PreludeError& >(_e))),SWIGTYPE_p_Prelude__PreludeError,SWIG_POINTER_OWN), "Prelude::PreludeError", SWIGTYPE_p_Prelude__PreludeError); SWIG_fail; } resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_IDMEFTime_SetGmtOffset(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; Prelude::IDMEFTime *arg1 = (Prelude::IDMEFTime *) 0 ; int32_t arg2 ; void *argp1 = 0 ; int res1 = 0 ; int val2 ; int ecode2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:IDMEFTime_SetGmtOffset",&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Prelude__IDMEFTime, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IDMEFTime_SetGmtOffset" "', argument " "1"" of type '" "Prelude::IDMEFTime *""'"); } arg1 = reinterpret_cast< Prelude::IDMEFTime * >(argp1); ecode2 = SWIG_AsVal_int(obj1, &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "IDMEFTime_SetGmtOffset" "', argument " "2"" of type '" "int32_t""'"); } arg2 = static_cast< int32_t >(val2); try { (arg1)->SetGmtOffset(arg2); } catch(Prelude::PreludeError &_e) { SWIG_Python_Raise(SWIG_NewPointerObj((new Prelude::PreludeError(static_cast< const Prelude::PreludeError& >(_e))),SWIGTYPE_p_Prelude__PreludeError,SWIG_POINTER_OWN), "Prelude::PreludeError", SWIGTYPE_p_Prelude__PreludeError); SWIG_fail; } resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_IDMEFTime_GetSec(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; Prelude::IDMEFTime *arg1 = (Prelude::IDMEFTime *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; uint32_t result; if (!PyArg_ParseTuple(args,(char *)"O:IDMEFTime_GetSec",&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Prelude__IDMEFTime, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IDMEFTime_GetSec" "', argument " "1"" of type '" "Prelude::IDMEFTime const *""'"); } arg1 = reinterpret_cast< Prelude::IDMEFTime * >(argp1); try { result = (uint32_t)((Prelude::IDMEFTime const *)arg1)->GetSec(); } catch(Prelude::PreludeError &_e) { SWIG_Python_Raise(SWIG_NewPointerObj((new Prelude::PreludeError(static_cast< const Prelude::PreludeError& >(_e))),SWIGTYPE_p_Prelude__PreludeError,SWIG_POINTER_OWN), "Prelude::PreludeError", SWIGTYPE_p_Prelude__PreludeError); SWIG_fail; } resultobj = SWIG_From_unsigned_SS_int(static_cast< unsigned int >(result)); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_IDMEFTime_GetUSec(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; Prelude::IDMEFTime *arg1 = (Prelude::IDMEFTime *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; uint32_t result; if (!PyArg_ParseTuple(args,(char *)"O:IDMEFTime_GetUSec",&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Prelude__IDMEFTime, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IDMEFTime_GetUSec" "', argument " "1"" of type '" "Prelude::IDMEFTime const *""'"); } arg1 = reinterpret_cast< Prelude::IDMEFTime * >(argp1); try { result = (uint32_t)((Prelude::IDMEFTime const *)arg1)->GetUSec(); } catch(Prelude::PreludeError &_e) { SWIG_Python_Raise(SWIG_NewPointerObj((new Prelude::PreludeError(static_cast< const Prelude::PreludeError& >(_e))),SWIGTYPE_p_Prelude__PreludeError,SWIG_POINTER_OWN), "Prelude::PreludeError", SWIGTYPE_p_Prelude__PreludeError); SWIG_fail; } resultobj = SWIG_From_unsigned_SS_int(static_cast< unsigned int >(result)); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_IDMEFTime_GetGmtOffset(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; Prelude::IDMEFTime *arg1 = (Prelude::IDMEFTime *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; int32_t result; if (!PyArg_ParseTuple(args,(char *)"O:IDMEFTime_GetGmtOffset",&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Prelude__IDMEFTime, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IDMEFTime_GetGmtOffset" "', argument " "1"" of type '" "Prelude::IDMEFTime const *""'"); } arg1 = reinterpret_cast< Prelude::IDMEFTime * >(argp1); try { result = (int32_t)((Prelude::IDMEFTime const *)arg1)->GetGmtOffset(); } catch(Prelude::PreludeError &_e) { SWIG_Python_Raise(SWIG_NewPointerObj((new Prelude::PreludeError(static_cast< const Prelude::PreludeError& >(_e))),SWIGTYPE_p_Prelude__PreludeError,SWIG_POINTER_OWN), "Prelude::PreludeError", SWIGTYPE_p_Prelude__PreludeError); SWIG_fail; } resultobj = SWIG_From_int(static_cast< int >(result)); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_IDMEFTime_Clone(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; Prelude::IDMEFTime *arg1 = (Prelude::IDMEFTime *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; Prelude::IDMEFTime result; if (!PyArg_ParseTuple(args,(char *)"O:IDMEFTime_Clone",&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Prelude__IDMEFTime, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IDMEFTime_Clone" "', argument " "1"" of type '" "Prelude::IDMEFTime *""'"); } arg1 = reinterpret_cast< Prelude::IDMEFTime * >(argp1); try { result = (arg1)->Clone(); } catch(Prelude::PreludeError &_e) { SWIG_Python_Raise(SWIG_NewPointerObj((new Prelude::PreludeError(static_cast< const Prelude::PreludeError& >(_e))),SWIGTYPE_p_Prelude__PreludeError,SWIG_POINTER_OWN), "Prelude::PreludeError", SWIGTYPE_p_Prelude__PreludeError); SWIG_fail; } resultobj = SWIG_NewPointerObj((new Prelude::IDMEFTime(static_cast< const Prelude::IDMEFTime& >(result))), SWIGTYPE_p_Prelude__IDMEFTime, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_IDMEFTime_ToString(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; Prelude::IDMEFTime *arg1 = (Prelude::IDMEFTime *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; std::string result; if (!PyArg_ParseTuple(args,(char *)"O:IDMEFTime_ToString",&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Prelude__IDMEFTime, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IDMEFTime_ToString" "', argument " "1"" of type '" "Prelude::IDMEFTime const *""'"); } arg1 = reinterpret_cast< Prelude::IDMEFTime * >(argp1); try { result = ((Prelude::IDMEFTime const *)arg1)->ToString(); } catch(Prelude::PreludeError &_e) { SWIG_Python_Raise(SWIG_NewPointerObj((new Prelude::PreludeError(static_cast< const Prelude::PreludeError& >(_e))),SWIGTYPE_p_Prelude__PreludeError,SWIG_POINTER_OWN), "Prelude::PreludeError", SWIGTYPE_p_Prelude__PreludeError); SWIG_fail; } resultobj = SWIG_From_std_string(static_cast< std::string >(result)); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_IDMEFTime___int__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; Prelude::IDMEFTime *arg1 = (Prelude::IDMEFTime *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; int result; if (!PyArg_ParseTuple(args,(char *)"O:IDMEFTime___int__",&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Prelude__IDMEFTime, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IDMEFTime___int__" "', argument " "1"" of type '" "Prelude::IDMEFTime const *""'"); } arg1 = reinterpret_cast< Prelude::IDMEFTime * >(argp1); try { result = (int)((Prelude::IDMEFTime const *)arg1)->operator int(); } catch(Prelude::PreludeError &_e) { SWIG_Python_Raise(SWIG_NewPointerObj((new Prelude::PreludeError(static_cast< const Prelude::PreludeError& >(_e))),SWIGTYPE_p_Prelude__PreludeError,SWIG_POINTER_OWN), "Prelude::PreludeError", SWIGTYPE_p_Prelude__PreludeError); SWIG_fail; } resultobj = SWIG_From_int(static_cast< int >(result)); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_IDMEFTime___long__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; Prelude::IDMEFTime *arg1 = (Prelude::IDMEFTime *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; long result; if (!PyArg_ParseTuple(args,(char *)"O:IDMEFTime___long__",&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Prelude__IDMEFTime, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IDMEFTime___long__" "', argument " "1"" of type '" "Prelude::IDMEFTime const *""'"); } arg1 = reinterpret_cast< Prelude::IDMEFTime * >(argp1); try { result = (long)((Prelude::IDMEFTime const *)arg1)->operator long(); } catch(Prelude::PreludeError &_e) { SWIG_Python_Raise(SWIG_NewPointerObj((new Prelude::PreludeError(static_cast< const Prelude::PreludeError& >(_e))),SWIGTYPE_p_Prelude__PreludeError,SWIG_POINTER_OWN), "Prelude::PreludeError", SWIGTYPE_p_Prelude__PreludeError); SWIG_fail; } resultobj = SWIG_From_long(static_cast< long >(result)); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_IDMEFTime___float__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; Prelude::IDMEFTime *arg1 = (Prelude::IDMEFTime *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; double result; if (!PyArg_ParseTuple(args,(char *)"O:IDMEFTime___float__",&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Prelude__IDMEFTime, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IDMEFTime___float__" "', argument " "1"" of type '" "Prelude::IDMEFTime const *""'"); } arg1 = reinterpret_cast< Prelude::IDMEFTime * >(argp1); try { result = (double)((Prelude::IDMEFTime const *)arg1)->operator double(); } catch(Prelude::PreludeError &_e) { SWIG_Python_Raise(SWIG_NewPointerObj((new Prelude::PreludeError(static_cast< const Prelude::PreludeError& >(_e))),SWIGTYPE_p_Prelude__PreludeError,SWIG_POINTER_OWN), "Prelude::PreludeError", SWIGTYPE_p_Prelude__PreludeError); SWIG_fail; } resultobj = SWIG_From_double(static_cast< double >(result)); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_IDMEFTime___str__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; Prelude::IDMEFTime *arg1 = (Prelude::IDMEFTime *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; std::string result; if (!PyArg_ParseTuple(args,(char *)"O:IDMEFTime___str__",&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Prelude__IDMEFTime, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IDMEFTime___str__" "', argument " "1"" of type '" "Prelude::IDMEFTime const *""'"); } arg1 = reinterpret_cast< Prelude::IDMEFTime * >(argp1); try { result = ((Prelude::IDMEFTime const *)arg1)->operator const std::string(); } catch(Prelude::PreludeError &_e) { SWIG_Python_Raise(SWIG_NewPointerObj((new Prelude::PreludeError(static_cast< const Prelude::PreludeError& >(_e))),SWIGTYPE_p_Prelude__PreludeError,SWIG_POINTER_OWN), "Prelude::PreludeError", SWIGTYPE_p_Prelude__PreludeError); SWIG_fail; } resultobj = SWIG_From_std_string(static_cast< std::string >(result)); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_IDMEFTime___ne__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; Prelude::IDMEFTime *arg1 = (Prelude::IDMEFTime *) 0 ; Prelude::IDMEFTime *arg2 = 0 ; void *argp1 = 0 ; int res1 = 0 ; void *argp2 = 0 ; int res2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; bool result; if (!PyArg_ParseTuple(args,(char *)"OO:IDMEFTime___ne__",&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Prelude__IDMEFTime, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IDMEFTime___ne__" "', argument " "1"" of type '" "Prelude::IDMEFTime *""'"); } arg1 = reinterpret_cast< Prelude::IDMEFTime * >(argp1); res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_Prelude__IDMEFTime, 0 | 0); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "IDMEFTime___ne__" "', argument " "2"" of type '" "Prelude::IDMEFTime const &""'"); } if (!argp2) { SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "IDMEFTime___ne__" "', argument " "2"" of type '" "Prelude::IDMEFTime const &""'"); } arg2 = reinterpret_cast< Prelude::IDMEFTime * >(argp2); try { result = (bool)(arg1)->operator !=((Prelude::IDMEFTime const &)*arg2); } catch(Prelude::PreludeError &_e) { SWIG_Python_Raise(SWIG_NewPointerObj((new Prelude::PreludeError(static_cast< const Prelude::PreludeError& >(_e))),SWIGTYPE_p_Prelude__PreludeError,SWIG_POINTER_OWN), "Prelude::PreludeError", SWIGTYPE_p_Prelude__PreludeError); SWIG_fail; } resultobj = SWIG_From_bool(static_cast< bool >(result)); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_IDMEFTime___ge__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; Prelude::IDMEFTime *arg1 = (Prelude::IDMEFTime *) 0 ; Prelude::IDMEFTime *arg2 = 0 ; void *argp1 = 0 ; int res1 = 0 ; void *argp2 = 0 ; int res2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; bool result; if (!PyArg_ParseTuple(args,(char *)"OO:IDMEFTime___ge__",&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Prelude__IDMEFTime, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IDMEFTime___ge__" "', argument " "1"" of type '" "Prelude::IDMEFTime *""'"); } arg1 = reinterpret_cast< Prelude::IDMEFTime * >(argp1); res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_Prelude__IDMEFTime, 0 | 0); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "IDMEFTime___ge__" "', argument " "2"" of type '" "Prelude::IDMEFTime const &""'"); } if (!argp2) { SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "IDMEFTime___ge__" "', argument " "2"" of type '" "Prelude::IDMEFTime const &""'"); } arg2 = reinterpret_cast< Prelude::IDMEFTime * >(argp2); try { result = (bool)(arg1)->operator >=((Prelude::IDMEFTime const &)*arg2); } catch(Prelude::PreludeError &_e) { SWIG_Python_Raise(SWIG_NewPointerObj((new Prelude::PreludeError(static_cast< const Prelude::PreludeError& >(_e))),SWIGTYPE_p_Prelude__PreludeError,SWIG_POINTER_OWN), "Prelude::PreludeError", SWIGTYPE_p_Prelude__PreludeError); SWIG_fail; } resultobj = SWIG_From_bool(static_cast< bool >(result)); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_IDMEFTime___le__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; Prelude::IDMEFTime *arg1 = (Prelude::IDMEFTime *) 0 ; Prelude::IDMEFTime *arg2 = 0 ; void *argp1 = 0 ; int res1 = 0 ; void *argp2 = 0 ; int res2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; bool result; if (!PyArg_ParseTuple(args,(char *)"OO:IDMEFTime___le__",&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Prelude__IDMEFTime, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IDMEFTime___le__" "', argument " "1"" of type '" "Prelude::IDMEFTime *""'"); } arg1 = reinterpret_cast< Prelude::IDMEFTime * >(argp1); res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_Prelude__IDMEFTime, 0 | 0); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "IDMEFTime___le__" "', argument " "2"" of type '" "Prelude::IDMEFTime const &""'"); } if (!argp2) { SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "IDMEFTime___le__" "', argument " "2"" of type '" "Prelude::IDMEFTime const &""'"); } arg2 = reinterpret_cast< Prelude::IDMEFTime * >(argp2); try { result = (bool)(arg1)->operator <=((Prelude::IDMEFTime const &)*arg2); } catch(Prelude::PreludeError &_e) { SWIG_Python_Raise(SWIG_NewPointerObj((new Prelude::PreludeError(static_cast< const Prelude::PreludeError& >(_e))),SWIGTYPE_p_Prelude__PreludeError,SWIG_POINTER_OWN), "Prelude::PreludeError", SWIGTYPE_p_Prelude__PreludeError); SWIG_fail; } resultobj = SWIG_From_bool(static_cast< bool >(result)); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_IDMEFTime___eq__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; Prelude::IDMEFTime *arg1 = (Prelude::IDMEFTime *) 0 ; Prelude::IDMEFTime *arg2 = 0 ; void *argp1 = 0 ; int res1 = 0 ; void *argp2 = 0 ; int res2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; bool result; if (!PyArg_ParseTuple(args,(char *)"OO:IDMEFTime___eq__",&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Prelude__IDMEFTime, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IDMEFTime___eq__" "', argument " "1"" of type '" "Prelude::IDMEFTime *""'"); } arg1 = reinterpret_cast< Prelude::IDMEFTime * >(argp1); res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_Prelude__IDMEFTime, 0 | 0); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "IDMEFTime___eq__" "', argument " "2"" of type '" "Prelude::IDMEFTime const &""'"); } if (!argp2) { SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "IDMEFTime___eq__" "', argument " "2"" of type '" "Prelude::IDMEFTime const &""'"); } arg2 = reinterpret_cast< Prelude::IDMEFTime * >(argp2); try { result = (bool)(arg1)->operator ==((Prelude::IDMEFTime const &)*arg2); } catch(Prelude::PreludeError &_e) { SWIG_Python_Raise(SWIG_NewPointerObj((new Prelude::PreludeError(static_cast< const Prelude::PreludeError& >(_e))),SWIGTYPE_p_Prelude__PreludeError,SWIG_POINTER_OWN), "Prelude::PreludeError", SWIGTYPE_p_Prelude__PreludeError); SWIG_fail; } resultobj = SWIG_From_bool(static_cast< bool >(result)); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_IDMEFTime___gt__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; Prelude::IDMEFTime *arg1 = (Prelude::IDMEFTime *) 0 ; Prelude::IDMEFTime *arg2 = 0 ; void *argp1 = 0 ; int res1 = 0 ; void *argp2 = 0 ; int res2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; bool result; if (!PyArg_ParseTuple(args,(char *)"OO:IDMEFTime___gt__",&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Prelude__IDMEFTime, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IDMEFTime___gt__" "', argument " "1"" of type '" "Prelude::IDMEFTime *""'"); } arg1 = reinterpret_cast< Prelude::IDMEFTime * >(argp1); res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_Prelude__IDMEFTime, 0 | 0); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "IDMEFTime___gt__" "', argument " "2"" of type '" "Prelude::IDMEFTime const &""'"); } if (!argp2) { SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "IDMEFTime___gt__" "', argument " "2"" of type '" "Prelude::IDMEFTime const &""'"); } arg2 = reinterpret_cast< Prelude::IDMEFTime * >(argp2); try { result = (bool)(arg1)->operator >((Prelude::IDMEFTime const &)*arg2); } catch(Prelude::PreludeError &_e) { SWIG_Python_Raise(SWIG_NewPointerObj((new Prelude::PreludeError(static_cast< const Prelude::PreludeError& >(_e))),SWIGTYPE_p_Prelude__PreludeError,SWIG_POINTER_OWN), "Prelude::PreludeError", SWIGTYPE_p_Prelude__PreludeError); SWIG_fail; } resultobj = SWIG_From_bool(static_cast< bool >(result)); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_IDMEFTime___lt__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; Prelude::IDMEFTime *arg1 = (Prelude::IDMEFTime *) 0 ; Prelude::IDMEFTime *arg2 = 0 ; void *argp1 = 0 ; int res1 = 0 ; void *argp2 = 0 ; int res2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; bool result; if (!PyArg_ParseTuple(args,(char *)"OO:IDMEFTime___lt__",&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Prelude__IDMEFTime, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IDMEFTime___lt__" "', argument " "1"" of type '" "Prelude::IDMEFTime *""'"); } arg1 = reinterpret_cast< Prelude::IDMEFTime * >(argp1); res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_Prelude__IDMEFTime, 0 | 0); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "IDMEFTime___lt__" "', argument " "2"" of type '" "Prelude::IDMEFTime const &""'"); } if (!argp2) { SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "IDMEFTime___lt__" "', argument " "2"" of type '" "Prelude::IDMEFTime const &""'"); } arg2 = reinterpret_cast< Prelude::IDMEFTime * >(argp2); try { result = (bool)(arg1)->operator <((Prelude::IDMEFTime const &)*arg2); } catch(Prelude::PreludeError &_e) { SWIG_Python_Raise(SWIG_NewPointerObj((new Prelude::PreludeError(static_cast< const Prelude::PreludeError& >(_e))),SWIGTYPE_p_Prelude__PreludeError,SWIG_POINTER_OWN), "Prelude::PreludeError", SWIGTYPE_p_Prelude__PreludeError); SWIG_fail; } resultobj = SWIG_From_bool(static_cast< bool >(result)); return resultobj; fail: return NULL; } SWIGINTERN PyObject *IDMEFTime_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *obj; if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL; SWIG_TypeNewClientData(SWIGTYPE_p_Prelude__IDMEFTime, SWIG_NewClientData(obj)); return SWIG_Py_Void(); } SWIGINTERN PyObject *_wrap_delete_IDMEF(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; Prelude::IDMEF *arg1 = (Prelude::IDMEF *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:delete_IDMEF",&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Prelude__IDMEF, SWIG_POINTER_DISOWN | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_IDMEF" "', argument " "1"" of type '" "Prelude::IDMEF *""'"); } arg1 = reinterpret_cast< Prelude::IDMEF * >(argp1); delete arg1; resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_new_IDMEF__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; Prelude::IDMEF *result = 0 ; if (!PyArg_ParseTuple(args,(char *)":new_IDMEF")) SWIG_fail; try { result = (Prelude::IDMEF *)new Prelude::IDMEF(); } catch(Prelude::PreludeError &_e) { SWIG_Python_Raise(SWIG_NewPointerObj((new Prelude::PreludeError(static_cast< const Prelude::PreludeError& >(_e))),SWIGTYPE_p_Prelude__PreludeError,SWIG_POINTER_OWN), "Prelude::PreludeError", SWIGTYPE_p_Prelude__PreludeError); SWIG_fail; } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Prelude__IDMEF, SWIG_POINTER_NEW | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_new_IDMEF__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; Prelude::IDMEF *arg1 = 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; Prelude::IDMEF *result = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:new_IDMEF",&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1, SWIGTYPE_p_Prelude__IDMEF, 0 | 0); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_IDMEF" "', argument " "1"" of type '" "Prelude::IDMEF const &""'"); } if (!argp1) { SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_IDMEF" "', argument " "1"" of type '" "Prelude::IDMEF const &""'"); } arg1 = reinterpret_cast< Prelude::IDMEF * >(argp1); try { result = (Prelude::IDMEF *)new Prelude::IDMEF((Prelude::IDMEF const &)*arg1); } catch(Prelude::PreludeError &_e) { SWIG_Python_Raise(SWIG_NewPointerObj((new Prelude::PreludeError(static_cast< const Prelude::PreludeError& >(_e))),SWIGTYPE_p_Prelude__PreludeError,SWIG_POINTER_OWN), "Prelude::PreludeError", SWIGTYPE_p_Prelude__PreludeError); SWIG_fail; } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Prelude__IDMEF, SWIG_POINTER_NEW | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_new_IDMEF__SWIG_2(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_message_t *arg1 = (idmef_message_t *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; Prelude::IDMEF *result = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:new_IDMEF",&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_idmef_message_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_IDMEF" "', argument " "1"" of type '" "idmef_message_t *""'"); } arg1 = reinterpret_cast< idmef_message_t * >(argp1); try { result = (Prelude::IDMEF *)new Prelude::IDMEF(arg1); } catch(Prelude::PreludeError &_e) { SWIG_Python_Raise(SWIG_NewPointerObj((new Prelude::PreludeError(static_cast< const Prelude::PreludeError& >(_e))),SWIGTYPE_p_Prelude__PreludeError,SWIG_POINTER_OWN), "Prelude::PreludeError", SWIGTYPE_p_Prelude__PreludeError); SWIG_fail; } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Prelude__IDMEF, SWIG_POINTER_NEW | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_new_IDMEF(PyObject *self, PyObject *args) { int argc; PyObject *argv[2]; int ii; if (!PyTuple_Check(args)) SWIG_fail; argc = (int)PyObject_Length(args); for (ii = 0; (ii < argc) && (ii < 1); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } if (argc == 0) { return _wrap_new_IDMEF__SWIG_0(self, args); } if (argc == 1) { int _v; int res = SWIG_ConvertPtr(argv[0], 0, SWIGTYPE_p_Prelude__IDMEF, 0); _v = SWIG_CheckState(res); if (_v) { return _wrap_new_IDMEF__SWIG_1(self, args); } } if (argc == 1) { int _v; void *vptr = 0; int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_idmef_message_t, 0); _v = SWIG_CheckState(res); if (_v) { return _wrap_new_IDMEF__SWIG_2(self, args); } } fail: SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'new_IDMEF'.\n" " Possible C/C++ prototypes are:\n" " Prelude::IDMEF()\n" " Prelude::IDMEF(Prelude::IDMEF const &)\n" " Prelude::IDMEF(idmef_message_t *)\n"); return NULL; } SWIGINTERN PyObject *_wrap_IDMEF_Set__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; Prelude::IDMEF *arg1 = (Prelude::IDMEF *) 0 ; char *arg2 = (char *) 0 ; std::vector< Prelude::IDMEFValue,std::allocator< Prelude::IDMEFValue > > arg3 ; void *argp1 = 0 ; int res1 = 0 ; int res2 ; char *buf2 = 0 ; int alloc2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; PyObject * obj2 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OOO:IDMEF_Set",&obj0,&obj1,&obj2)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Prelude__IDMEF, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IDMEF_Set" "', argument " "1"" of type '" "Prelude::IDMEF *""'"); } arg1 = reinterpret_cast< Prelude::IDMEF * >(argp1); res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "IDMEF_Set" "', argument " "2"" of type '" "char const *""'"); } arg2 = reinterpret_cast< char * >(buf2); { std::vector > *ptr = (std::vector > *)0; int res = swig::asptr(obj2, &ptr); if (!SWIG_IsOK(res) || !ptr) { SWIG_exception_fail(SWIG_ArgError((ptr ? res : SWIG_TypeError)), "in method '" "IDMEF_Set" "', argument " "3"" of type '" "std::vector< Prelude::IDMEFValue,std::allocator< Prelude::IDMEFValue > >""'"); } arg3 = *ptr; if (SWIG_IsNewObj(res)) delete ptr; } try { (arg1)->Set((char const *)arg2,arg3); } catch(Prelude::PreludeError &_e) { SWIG_Python_Raise(SWIG_NewPointerObj((new Prelude::PreludeError(static_cast< const Prelude::PreludeError& >(_e))),SWIGTYPE_p_Prelude__PreludeError,SWIG_POINTER_OWN), "Prelude::PreludeError", SWIGTYPE_p_Prelude__PreludeError); SWIG_fail; } resultobj = SWIG_Py_Void(); if (alloc2 == SWIG_NEWOBJ) delete[] buf2; return resultobj; fail: if (alloc2 == SWIG_NEWOBJ) delete[] buf2; return NULL; } SWIGINTERN PyObject *_wrap_IDMEF_Set__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; Prelude::IDMEF *arg1 = (Prelude::IDMEF *) 0 ; char *arg2 = (char *) 0 ; Prelude::IDMEFValue *arg3 = (Prelude::IDMEFValue *) 0 ; void *argp1 = 0 ; int res1 = 0 ; int res2 ; char *buf2 = 0 ; int alloc2 = 0 ; void *argp3 = 0 ; int res3 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; PyObject * obj2 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OOO:IDMEF_Set",&obj0,&obj1,&obj2)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Prelude__IDMEF, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IDMEF_Set" "', argument " "1"" of type '" "Prelude::IDMEF *""'"); } arg1 = reinterpret_cast< Prelude::IDMEF * >(argp1); res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "IDMEF_Set" "', argument " "2"" of type '" "char const *""'"); } arg2 = reinterpret_cast< char * >(buf2); res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_Prelude__IDMEFValue, 0 | 0 ); if (!SWIG_IsOK(res3)) { SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "IDMEF_Set" "', argument " "3"" of type '" "Prelude::IDMEFValue *""'"); } arg3 = reinterpret_cast< Prelude::IDMEFValue * >(argp3); try { (arg1)->Set((char const *)arg2,arg3); } catch(Prelude::PreludeError &_e) { SWIG_Python_Raise(SWIG_NewPointerObj((new Prelude::PreludeError(static_cast< const Prelude::PreludeError& >(_e))),SWIGTYPE_p_Prelude__PreludeError,SWIG_POINTER_OWN), "Prelude::PreludeError", SWIGTYPE_p_Prelude__PreludeError); SWIG_fail; } resultobj = SWIG_Py_Void(); if (alloc2 == SWIG_NEWOBJ) delete[] buf2; return resultobj; fail: if (alloc2 == SWIG_NEWOBJ) delete[] buf2; return NULL; } SWIGINTERN PyObject *_wrap_IDMEF_Set__SWIG_2(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; Prelude::IDMEF *arg1 = (Prelude::IDMEF *) 0 ; char *arg2 = (char *) 0 ; Prelude::IDMEFTime *arg3 = 0 ; void *argp1 = 0 ; int res1 = 0 ; int res2 ; char *buf2 = 0 ; int alloc2 = 0 ; void *argp3 = 0 ; int res3 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; PyObject * obj2 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OOO:IDMEF_Set",&obj0,&obj1,&obj2)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Prelude__IDMEF, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IDMEF_Set" "', argument " "1"" of type '" "Prelude::IDMEF *""'"); } arg1 = reinterpret_cast< Prelude::IDMEF * >(argp1); res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "IDMEF_Set" "', argument " "2"" of type '" "char const *""'"); } arg2 = reinterpret_cast< char * >(buf2); res3 = SWIG_ConvertPtr(obj2, &argp3, SWIGTYPE_p_Prelude__IDMEFTime, 0 ); if (!SWIG_IsOK(res3)) { SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "IDMEF_Set" "', argument " "3"" of type '" "Prelude::IDMEFTime &""'"); } if (!argp3) { SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "IDMEF_Set" "', argument " "3"" of type '" "Prelude::IDMEFTime &""'"); } arg3 = reinterpret_cast< Prelude::IDMEFTime * >(argp3); try { (arg1)->Set((char const *)arg2,*arg3); } catch(Prelude::PreludeError &_e) { SWIG_Python_Raise(SWIG_NewPointerObj((new Prelude::PreludeError(static_cast< const Prelude::PreludeError& >(_e))),SWIGTYPE_p_Prelude__PreludeError,SWIG_POINTER_OWN), "Prelude::PreludeError", SWIGTYPE_p_Prelude__PreludeError); SWIG_fail; } resultobj = SWIG_Py_Void(); if (alloc2 == SWIG_NEWOBJ) delete[] buf2; return resultobj; fail: if (alloc2 == SWIG_NEWOBJ) delete[] buf2; return NULL; } SWIGINTERN PyObject *_wrap_IDMEF_Set__SWIG_3(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; Prelude::IDMEF *arg1 = (Prelude::IDMEF *) 0 ; char *arg2 = (char *) 0 ; char *arg3 = (char *) 0 ; void *argp1 = 0 ; int res1 = 0 ; int res2 ; char *buf2 = 0 ; int alloc2 = 0 ; int res3 ; char *buf3 = 0 ; int alloc3 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; PyObject * obj2 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OOO:IDMEF_Set",&obj0,&obj1,&obj2)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Prelude__IDMEF, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IDMEF_Set" "', argument " "1"" of type '" "Prelude::IDMEF *""'"); } arg1 = reinterpret_cast< Prelude::IDMEF * >(argp1); res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "IDMEF_Set" "', argument " "2"" of type '" "char const *""'"); } arg2 = reinterpret_cast< char * >(buf2); res3 = SWIG_AsCharPtrAndSize(obj2, &buf3, NULL, &alloc3); if (!SWIG_IsOK(res3)) { SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "IDMEF_Set" "', argument " "3"" of type '" "char const *""'"); } arg3 = reinterpret_cast< char * >(buf3); try { (arg1)->Set((char const *)arg2,(char const *)arg3); } catch(Prelude::PreludeError &_e) { SWIG_Python_Raise(SWIG_NewPointerObj((new Prelude::PreludeError(static_cast< const Prelude::PreludeError& >(_e))),SWIGTYPE_p_Prelude__PreludeError,SWIG_POINTER_OWN), "Prelude::PreludeError", SWIGTYPE_p_Prelude__PreludeError); SWIG_fail; } resultobj = SWIG_Py_Void(); if (alloc2 == SWIG_NEWOBJ) delete[] buf2; if (alloc3 == SWIG_NEWOBJ) delete[] buf3; return resultobj; fail: if (alloc2 == SWIG_NEWOBJ) delete[] buf2; if (alloc3 == SWIG_NEWOBJ) delete[] buf3; return NULL; } SWIGINTERN PyObject *_wrap_IDMEF_Set__SWIG_4(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; Prelude::IDMEF *arg1 = (Prelude::IDMEF *) 0 ; char *arg2 = (char *) 0 ; std::string arg3 ; void *argp1 = 0 ; int res1 = 0 ; int res2 ; char *buf2 = 0 ; int alloc2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; PyObject * obj2 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OOO:IDMEF_Set",&obj0,&obj1,&obj2)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Prelude__IDMEF, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IDMEF_Set" "', argument " "1"" of type '" "Prelude::IDMEF *""'"); } arg1 = reinterpret_cast< Prelude::IDMEF * >(argp1); res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "IDMEF_Set" "', argument " "2"" of type '" "char const *""'"); } arg2 = reinterpret_cast< char * >(buf2); { std::string *ptr = (std::string *)0; int res = SWIG_AsPtr_std_string(obj2, &ptr); if (!SWIG_IsOK(res) || !ptr) { SWIG_exception_fail(SWIG_ArgError((ptr ? res : SWIG_TypeError)), "in method '" "IDMEF_Set" "', argument " "3"" of type '" "std::string""'"); } arg3 = *ptr; if (SWIG_IsNewObj(res)) delete ptr; } try { (arg1)->Set((char const *)arg2,arg3); } catch(Prelude::PreludeError &_e) { SWIG_Python_Raise(SWIG_NewPointerObj((new Prelude::PreludeError(static_cast< const Prelude::PreludeError& >(_e))),SWIGTYPE_p_Prelude__PreludeError,SWIG_POINTER_OWN), "Prelude::PreludeError", SWIGTYPE_p_Prelude__PreludeError); SWIG_fail; } resultobj = SWIG_Py_Void(); if (alloc2 == SWIG_NEWOBJ) delete[] buf2; return resultobj; fail: if (alloc2 == SWIG_NEWOBJ) delete[] buf2; return NULL; } SWIGINTERN PyObject *_wrap_IDMEF_Set__SWIG_5(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; Prelude::IDMEF *arg1 = (Prelude::IDMEF *) 0 ; char *arg2 = (char *) 0 ; int8_t arg3 ; void *argp1 = 0 ; int res1 = 0 ; int res2 ; char *buf2 = 0 ; int alloc2 = 0 ; char val3 ; int ecode3 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; PyObject * obj2 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OOO:IDMEF_Set",&obj0,&obj1,&obj2)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Prelude__IDMEF, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IDMEF_Set" "', argument " "1"" of type '" "Prelude::IDMEF *""'"); } arg1 = reinterpret_cast< Prelude::IDMEF * >(argp1); res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "IDMEF_Set" "', argument " "2"" of type '" "char const *""'"); } arg2 = reinterpret_cast< char * >(buf2); ecode3 = SWIG_AsVal_char(obj2, &val3); if (!SWIG_IsOK(ecode3)) { SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "IDMEF_Set" "', argument " "3"" of type '" "int8_t""'"); } arg3 = static_cast< int8_t >(val3); try { (arg1)->Set((char const *)arg2,arg3); } catch(Prelude::PreludeError &_e) { SWIG_Python_Raise(SWIG_NewPointerObj((new Prelude::PreludeError(static_cast< const Prelude::PreludeError& >(_e))),SWIGTYPE_p_Prelude__PreludeError,SWIG_POINTER_OWN), "Prelude::PreludeError", SWIGTYPE_p_Prelude__PreludeError); SWIG_fail; } resultobj = SWIG_Py_Void(); if (alloc2 == SWIG_NEWOBJ) delete[] buf2; return resultobj; fail: if (alloc2 == SWIG_NEWOBJ) delete[] buf2; return NULL; } SWIGINTERN PyObject *_wrap_IDMEF_Set__SWIG_6(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; Prelude::IDMEF *arg1 = (Prelude::IDMEF *) 0 ; char *arg2 = (char *) 0 ; uint8_t arg3 ; void *argp1 = 0 ; int res1 = 0 ; int res2 ; char *buf2 = 0 ; int alloc2 = 0 ; unsigned char val3 ; int ecode3 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; PyObject * obj2 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OOO:IDMEF_Set",&obj0,&obj1,&obj2)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Prelude__IDMEF, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IDMEF_Set" "', argument " "1"" of type '" "Prelude::IDMEF *""'"); } arg1 = reinterpret_cast< Prelude::IDMEF * >(argp1); res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "IDMEF_Set" "', argument " "2"" of type '" "char const *""'"); } arg2 = reinterpret_cast< char * >(buf2); ecode3 = SWIG_AsVal_unsigned_SS_char(obj2, &val3); if (!SWIG_IsOK(ecode3)) { SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "IDMEF_Set" "', argument " "3"" of type '" "uint8_t""'"); } arg3 = static_cast< uint8_t >(val3); try { (arg1)->Set((char const *)arg2,arg3); } catch(Prelude::PreludeError &_e) { SWIG_Python_Raise(SWIG_NewPointerObj((new Prelude::PreludeError(static_cast< const Prelude::PreludeError& >(_e))),SWIGTYPE_p_Prelude__PreludeError,SWIG_POINTER_OWN), "Prelude::PreludeError", SWIGTYPE_p_Prelude__PreludeError); SWIG_fail; } resultobj = SWIG_Py_Void(); if (alloc2 == SWIG_NEWOBJ) delete[] buf2; return resultobj; fail: if (alloc2 == SWIG_NEWOBJ) delete[] buf2; return NULL; } SWIGINTERN PyObject *_wrap_IDMEF_Set__SWIG_7(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; Prelude::IDMEF *arg1 = (Prelude::IDMEF *) 0 ; char *arg2 = (char *) 0 ; int16_t arg3 ; void *argp1 = 0 ; int res1 = 0 ; int res2 ; char *buf2 = 0 ; int alloc2 = 0 ; short val3 ; int ecode3 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; PyObject * obj2 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OOO:IDMEF_Set",&obj0,&obj1,&obj2)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Prelude__IDMEF, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IDMEF_Set" "', argument " "1"" of type '" "Prelude::IDMEF *""'"); } arg1 = reinterpret_cast< Prelude::IDMEF * >(argp1); res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "IDMEF_Set" "', argument " "2"" of type '" "char const *""'"); } arg2 = reinterpret_cast< char * >(buf2); ecode3 = SWIG_AsVal_short(obj2, &val3); if (!SWIG_IsOK(ecode3)) { SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "IDMEF_Set" "', argument " "3"" of type '" "int16_t""'"); } arg3 = static_cast< int16_t >(val3); try { (arg1)->Set((char const *)arg2,arg3); } catch(Prelude::PreludeError &_e) { SWIG_Python_Raise(SWIG_NewPointerObj((new Prelude::PreludeError(static_cast< const Prelude::PreludeError& >(_e))),SWIGTYPE_p_Prelude__PreludeError,SWIG_POINTER_OWN), "Prelude::PreludeError", SWIGTYPE_p_Prelude__PreludeError); SWIG_fail; } resultobj = SWIG_Py_Void(); if (alloc2 == SWIG_NEWOBJ) delete[] buf2; return resultobj; fail: if (alloc2 == SWIG_NEWOBJ) delete[] buf2; return NULL; } SWIGINTERN PyObject *_wrap_IDMEF_Set__SWIG_8(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; Prelude::IDMEF *arg1 = (Prelude::IDMEF *) 0 ; char *arg2 = (char *) 0 ; uint16_t arg3 ; void *argp1 = 0 ; int res1 = 0 ; int res2 ; char *buf2 = 0 ; int alloc2 = 0 ; unsigned short val3 ; int ecode3 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; PyObject * obj2 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OOO:IDMEF_Set",&obj0,&obj1,&obj2)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Prelude__IDMEF, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IDMEF_Set" "', argument " "1"" of type '" "Prelude::IDMEF *""'"); } arg1 = reinterpret_cast< Prelude::IDMEF * >(argp1); res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "IDMEF_Set" "', argument " "2"" of type '" "char const *""'"); } arg2 = reinterpret_cast< char * >(buf2); ecode3 = SWIG_AsVal_unsigned_SS_short(obj2, &val3); if (!SWIG_IsOK(ecode3)) { SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "IDMEF_Set" "', argument " "3"" of type '" "uint16_t""'"); } arg3 = static_cast< uint16_t >(val3); try { (arg1)->Set((char const *)arg2,arg3); } catch(Prelude::PreludeError &_e) { SWIG_Python_Raise(SWIG_NewPointerObj((new Prelude::PreludeError(static_cast< const Prelude::PreludeError& >(_e))),SWIGTYPE_p_Prelude__PreludeError,SWIG_POINTER_OWN), "Prelude::PreludeError", SWIGTYPE_p_Prelude__PreludeError); SWIG_fail; } resultobj = SWIG_Py_Void(); if (alloc2 == SWIG_NEWOBJ) delete[] buf2; return resultobj; fail: if (alloc2 == SWIG_NEWOBJ) delete[] buf2; return NULL; } SWIGINTERN PyObject *_wrap_IDMEF_Set__SWIG_9(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; Prelude::IDMEF *arg1 = (Prelude::IDMEF *) 0 ; char *arg2 = (char *) 0 ; int32_t arg3 ; void *argp1 = 0 ; int res1 = 0 ; int res2 ; char *buf2 = 0 ; int alloc2 = 0 ; int val3 ; int ecode3 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; PyObject * obj2 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OOO:IDMEF_Set",&obj0,&obj1,&obj2)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Prelude__IDMEF, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IDMEF_Set" "', argument " "1"" of type '" "Prelude::IDMEF *""'"); } arg1 = reinterpret_cast< Prelude::IDMEF * >(argp1); res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "IDMEF_Set" "', argument " "2"" of type '" "char const *""'"); } arg2 = reinterpret_cast< char * >(buf2); ecode3 = SWIG_AsVal_int(obj2, &val3); if (!SWIG_IsOK(ecode3)) { SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "IDMEF_Set" "', argument " "3"" of type '" "int32_t""'"); } arg3 = static_cast< int32_t >(val3); try { (arg1)->Set((char const *)arg2,arg3); } catch(Prelude::PreludeError &_e) { SWIG_Python_Raise(SWIG_NewPointerObj((new Prelude::PreludeError(static_cast< const Prelude::PreludeError& >(_e))),SWIGTYPE_p_Prelude__PreludeError,SWIG_POINTER_OWN), "Prelude::PreludeError", SWIGTYPE_p_Prelude__PreludeError); SWIG_fail; } resultobj = SWIG_Py_Void(); if (alloc2 == SWIG_NEWOBJ) delete[] buf2; return resultobj; fail: if (alloc2 == SWIG_NEWOBJ) delete[] buf2; return NULL; } SWIGINTERN PyObject *_wrap_IDMEF_Set__SWIG_10(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; Prelude::IDMEF *arg1 = (Prelude::IDMEF *) 0 ; char *arg2 = (char *) 0 ; uint32_t arg3 ; void *argp1 = 0 ; int res1 = 0 ; int res2 ; char *buf2 = 0 ; int alloc2 = 0 ; unsigned int val3 ; int ecode3 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; PyObject * obj2 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OOO:IDMEF_Set",&obj0,&obj1,&obj2)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Prelude__IDMEF, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IDMEF_Set" "', argument " "1"" of type '" "Prelude::IDMEF *""'"); } arg1 = reinterpret_cast< Prelude::IDMEF * >(argp1); res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "IDMEF_Set" "', argument " "2"" of type '" "char const *""'"); } arg2 = reinterpret_cast< char * >(buf2); ecode3 = SWIG_AsVal_unsigned_SS_int(obj2, &val3); if (!SWIG_IsOK(ecode3)) { SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "IDMEF_Set" "', argument " "3"" of type '" "uint32_t""'"); } arg3 = static_cast< uint32_t >(val3); try { (arg1)->Set((char const *)arg2,arg3); } catch(Prelude::PreludeError &_e) { SWIG_Python_Raise(SWIG_NewPointerObj((new Prelude::PreludeError(static_cast< const Prelude::PreludeError& >(_e))),SWIGTYPE_p_Prelude__PreludeError,SWIG_POINTER_OWN), "Prelude::PreludeError", SWIGTYPE_p_Prelude__PreludeError); SWIG_fail; } resultobj = SWIG_Py_Void(); if (alloc2 == SWIG_NEWOBJ) delete[] buf2; return resultobj; fail: if (alloc2 == SWIG_NEWOBJ) delete[] buf2; return NULL; } SWIGINTERN PyObject *_wrap_IDMEF_Set__SWIG_11(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; Prelude::IDMEF *arg1 = (Prelude::IDMEF *) 0 ; char *arg2 = (char *) 0 ; int64_t arg3 ; void *argp1 = 0 ; int res1 = 0 ; int res2 ; char *buf2 = 0 ; int alloc2 = 0 ; long long val3 ; int ecode3 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; PyObject * obj2 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OOO:IDMEF_Set",&obj0,&obj1,&obj2)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Prelude__IDMEF, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IDMEF_Set" "', argument " "1"" of type '" "Prelude::IDMEF *""'"); } arg1 = reinterpret_cast< Prelude::IDMEF * >(argp1); res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "IDMEF_Set" "', argument " "2"" of type '" "char const *""'"); } arg2 = reinterpret_cast< char * >(buf2); ecode3 = SWIG_AsVal_long_SS_long(obj2, &val3); if (!SWIG_IsOK(ecode3)) { SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "IDMEF_Set" "', argument " "3"" of type '" "int64_t""'"); } arg3 = static_cast< int64_t >(val3); try { (arg1)->Set((char const *)arg2,arg3); } catch(Prelude::PreludeError &_e) { SWIG_Python_Raise(SWIG_NewPointerObj((new Prelude::PreludeError(static_cast< const Prelude::PreludeError& >(_e))),SWIGTYPE_p_Prelude__PreludeError,SWIG_POINTER_OWN), "Prelude::PreludeError", SWIGTYPE_p_Prelude__PreludeError); SWIG_fail; } resultobj = SWIG_Py_Void(); if (alloc2 == SWIG_NEWOBJ) delete[] buf2; return resultobj; fail: if (alloc2 == SWIG_NEWOBJ) delete[] buf2; return NULL; } SWIGINTERN PyObject *_wrap_IDMEF_Set__SWIG_12(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; Prelude::IDMEF *arg1 = (Prelude::IDMEF *) 0 ; char *arg2 = (char *) 0 ; uint64_t arg3 ; void *argp1 = 0 ; int res1 = 0 ; int res2 ; char *buf2 = 0 ; int alloc2 = 0 ; unsigned long long val3 ; int ecode3 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; PyObject * obj2 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OOO:IDMEF_Set",&obj0,&obj1,&obj2)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Prelude__IDMEF, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IDMEF_Set" "', argument " "1"" of type '" "Prelude::IDMEF *""'"); } arg1 = reinterpret_cast< Prelude::IDMEF * >(argp1); res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "IDMEF_Set" "', argument " "2"" of type '" "char const *""'"); } arg2 = reinterpret_cast< char * >(buf2); ecode3 = SWIG_AsVal_unsigned_SS_long_SS_long(obj2, &val3); if (!SWIG_IsOK(ecode3)) { SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "IDMEF_Set" "', argument " "3"" of type '" "uint64_t""'"); } arg3 = static_cast< uint64_t >(val3); try { (arg1)->Set((char const *)arg2,arg3); } catch(Prelude::PreludeError &_e) { SWIG_Python_Raise(SWIG_NewPointerObj((new Prelude::PreludeError(static_cast< const Prelude::PreludeError& >(_e))),SWIGTYPE_p_Prelude__PreludeError,SWIG_POINTER_OWN), "Prelude::PreludeError", SWIGTYPE_p_Prelude__PreludeError); SWIG_fail; } resultobj = SWIG_Py_Void(); if (alloc2 == SWIG_NEWOBJ) delete[] buf2; return resultobj; fail: if (alloc2 == SWIG_NEWOBJ) delete[] buf2; return NULL; } SWIGINTERN PyObject *_wrap_IDMEF_Set__SWIG_13(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; Prelude::IDMEF *arg1 = (Prelude::IDMEF *) 0 ; char *arg2 = (char *) 0 ; float arg3 ; void *argp1 = 0 ; int res1 = 0 ; int res2 ; char *buf2 = 0 ; int alloc2 = 0 ; float val3 ; int ecode3 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; PyObject * obj2 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OOO:IDMEF_Set",&obj0,&obj1,&obj2)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Prelude__IDMEF, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IDMEF_Set" "', argument " "1"" of type '" "Prelude::IDMEF *""'"); } arg1 = reinterpret_cast< Prelude::IDMEF * >(argp1); res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "IDMEF_Set" "', argument " "2"" of type '" "char const *""'"); } arg2 = reinterpret_cast< char * >(buf2); ecode3 = SWIG_AsVal_float(obj2, &val3); if (!SWIG_IsOK(ecode3)) { SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "IDMEF_Set" "', argument " "3"" of type '" "float""'"); } arg3 = static_cast< float >(val3); try { (arg1)->Set((char const *)arg2,arg3); } catch(Prelude::PreludeError &_e) { SWIG_Python_Raise(SWIG_NewPointerObj((new Prelude::PreludeError(static_cast< const Prelude::PreludeError& >(_e))),SWIGTYPE_p_Prelude__PreludeError,SWIG_POINTER_OWN), "Prelude::PreludeError", SWIGTYPE_p_Prelude__PreludeError); SWIG_fail; } resultobj = SWIG_Py_Void(); if (alloc2 == SWIG_NEWOBJ) delete[] buf2; return resultobj; fail: if (alloc2 == SWIG_NEWOBJ) delete[] buf2; return NULL; } SWIGINTERN PyObject *_wrap_IDMEF_Set__SWIG_14(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; Prelude::IDMEF *arg1 = (Prelude::IDMEF *) 0 ; char *arg2 = (char *) 0 ; double arg3 ; void *argp1 = 0 ; int res1 = 0 ; int res2 ; char *buf2 = 0 ; int alloc2 = 0 ; double val3 ; int ecode3 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; PyObject * obj2 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OOO:IDMEF_Set",&obj0,&obj1,&obj2)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Prelude__IDMEF, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IDMEF_Set" "', argument " "1"" of type '" "Prelude::IDMEF *""'"); } arg1 = reinterpret_cast< Prelude::IDMEF * >(argp1); res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "IDMEF_Set" "', argument " "2"" of type '" "char const *""'"); } arg2 = reinterpret_cast< char * >(buf2); ecode3 = SWIG_AsVal_double(obj2, &val3); if (!SWIG_IsOK(ecode3)) { SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "IDMEF_Set" "', argument " "3"" of type '" "double""'"); } arg3 = static_cast< double >(val3); try { (arg1)->Set((char const *)arg2,arg3); } catch(Prelude::PreludeError &_e) { SWIG_Python_Raise(SWIG_NewPointerObj((new Prelude::PreludeError(static_cast< const Prelude::PreludeError& >(_e))),SWIGTYPE_p_Prelude__PreludeError,SWIG_POINTER_OWN), "Prelude::PreludeError", SWIGTYPE_p_Prelude__PreludeError); SWIG_fail; } resultobj = SWIG_Py_Void(); if (alloc2 == SWIG_NEWOBJ) delete[] buf2; return resultobj; fail: if (alloc2 == SWIG_NEWOBJ) delete[] buf2; return NULL; } SWIGINTERN PyObject *_wrap_IDMEF_Set(PyObject *self, PyObject *args) { int argc; PyObject *argv[4]; int ii; if (!PyTuple_Check(args)) SWIG_fail; argc = (int)PyObject_Length(args); for (ii = 0; (ii < argc) && (ii < 3); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } if (argc == 3) { int _v; void *vptr = 0; int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_Prelude__IDMEF, 0); _v = SWIG_CheckState(res); if (_v) { int res = SWIG_AsCharPtrAndSize(argv[1], 0, NULL, 0); _v = SWIG_CheckState(res); if (_v) { void *vptr = 0; int res = SWIG_ConvertPtr(argv[2], &vptr, SWIGTYPE_p_Prelude__IDMEFValue, 0); _v = SWIG_CheckState(res); if (_v) { return _wrap_IDMEF_Set__SWIG_1(self, args); } } } } if (argc == 3) { int _v; void *vptr = 0; int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_Prelude__IDMEF, 0); _v = SWIG_CheckState(res); if (_v) { int res = SWIG_AsCharPtrAndSize(argv[1], 0, NULL, 0); _v = SWIG_CheckState(res); if (_v) { void *vptr = 0; int res = SWIG_ConvertPtr(argv[2], &vptr, SWIGTYPE_p_Prelude__IDMEFTime, 0); _v = SWIG_CheckState(res); if (_v) { return _wrap_IDMEF_Set__SWIG_2(self, args); } } } } if (argc == 3) { int _v; void *vptr = 0; int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_Prelude__IDMEF, 0); _v = SWIG_CheckState(res); if (_v) { int res = SWIG_AsCharPtrAndSize(argv[1], 0, NULL, 0); _v = SWIG_CheckState(res); if (_v) { { int res = SWIG_AsVal_unsigned_SS_char(argv[2], NULL); _v = SWIG_CheckState(res); } if (_v) { return _wrap_IDMEF_Set__SWIG_6(self, args); } } } } if (argc == 3) { int _v; void *vptr = 0; int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_Prelude__IDMEF, 0); _v = SWIG_CheckState(res); if (_v) { int res = SWIG_AsCharPtrAndSize(argv[1], 0, NULL, 0); _v = SWIG_CheckState(res); if (_v) { { int res = SWIG_AsVal_unsigned_SS_short(argv[2], NULL); _v = SWIG_CheckState(res); } if (_v) { return _wrap_IDMEF_Set__SWIG_8(self, args); } } } } if (argc == 3) { int _v; void *vptr = 0; int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_Prelude__IDMEF, 0); _v = SWIG_CheckState(res); if (_v) { int res = SWIG_AsCharPtrAndSize(argv[1], 0, NULL, 0); _v = SWIG_CheckState(res); if (_v) { { int res = SWIG_AsVal_short(argv[2], NULL); _v = SWIG_CheckState(res); } if (_v) { return _wrap_IDMEF_Set__SWIG_7(self, args); } } } } if (argc == 3) { int _v; void *vptr = 0; int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_Prelude__IDMEF, 0); _v = SWIG_CheckState(res); if (_v) { int res = SWIG_AsCharPtrAndSize(argv[1], 0, NULL, 0); _v = SWIG_CheckState(res); if (_v) { { int res = SWIG_AsVal_unsigned_SS_int(argv[2], NULL); _v = SWIG_CheckState(res); } if (_v) { return _wrap_IDMEF_Set__SWIG_10(self, args); } } } } if (argc == 3) { int _v; void *vptr = 0; int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_Prelude__IDMEF, 0); _v = SWIG_CheckState(res); if (_v) { int res = SWIG_AsCharPtrAndSize(argv[1], 0, NULL, 0); _v = SWIG_CheckState(res); if (_v) { { int res = SWIG_AsVal_int(argv[2], NULL); _v = SWIG_CheckState(res); } if (_v) { return _wrap_IDMEF_Set__SWIG_9(self, args); } } } } if (argc == 3) { int _v; void *vptr = 0; int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_Prelude__IDMEF, 0); _v = SWIG_CheckState(res); if (_v) { int res = SWIG_AsCharPtrAndSize(argv[1], 0, NULL, 0); _v = SWIG_CheckState(res); if (_v) { { int res = SWIG_AsVal_unsigned_SS_long_SS_long(argv[2], NULL); _v = SWIG_CheckState(res); } if (_v) { return _wrap_IDMEF_Set__SWIG_12(self, args); } } } } if (argc == 3) { int _v; void *vptr = 0; int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_Prelude__IDMEF, 0); _v = SWIG_CheckState(res); if (_v) { int res = SWIG_AsCharPtrAndSize(argv[1], 0, NULL, 0); _v = SWIG_CheckState(res); if (_v) { { int res = SWIG_AsVal_long_SS_long(argv[2], NULL); _v = SWIG_CheckState(res); } if (_v) { return _wrap_IDMEF_Set__SWIG_11(self, args); } } } } if (argc == 3) { int _v; void *vptr = 0; int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_Prelude__IDMEF, 0); _v = SWIG_CheckState(res); if (_v) { int res = SWIG_AsCharPtrAndSize(argv[1], 0, NULL, 0); _v = SWIG_CheckState(res); if (_v) { { int res = SWIG_AsVal_float(argv[2], NULL); _v = SWIG_CheckState(res); } if (_v) { return _wrap_IDMEF_Set__SWIG_13(self, args); } } } } if (argc == 3) { int _v; void *vptr = 0; int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_Prelude__IDMEF, 0); _v = SWIG_CheckState(res); if (_v) { int res = SWIG_AsCharPtrAndSize(argv[1], 0, NULL, 0); _v = SWIG_CheckState(res); if (_v) { { int res = SWIG_AsVal_double(argv[2], NULL); _v = SWIG_CheckState(res); } if (_v) { return _wrap_IDMEF_Set__SWIG_14(self, args); } } } } if (argc == 3) { int _v; void *vptr = 0; int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_Prelude__IDMEF, 0); _v = SWIG_CheckState(res); if (_v) { int res = SWIG_AsCharPtrAndSize(argv[1], 0, NULL, 0); _v = SWIG_CheckState(res); if (_v) { { int res = SWIG_AsVal_char(argv[2], NULL); _v = SWIG_CheckState(res); } if (_v) { return _wrap_IDMEF_Set__SWIG_5(self, args); } } } } if (argc == 3) { int _v; void *vptr = 0; int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_Prelude__IDMEF, 0); _v = SWIG_CheckState(res); if (_v) { int res = SWIG_AsCharPtrAndSize(argv[1], 0, NULL, 0); _v = SWIG_CheckState(res); if (_v) { int res = SWIG_AsPtr_std_string(argv[2], (std::string**)(0)); _v = SWIG_CheckState(res); if (_v) { return _wrap_IDMEF_Set__SWIG_4(self, args); } } } } if (argc == 3) { int _v; void *vptr = 0; int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_Prelude__IDMEF, 0); _v = SWIG_CheckState(res); if (_v) { int res = SWIG_AsCharPtrAndSize(argv[1], 0, NULL, 0); _v = SWIG_CheckState(res); if (_v) { int res = SWIG_AsCharPtrAndSize(argv[2], 0, NULL, 0); _v = SWIG_CheckState(res); if (_v) { return _wrap_IDMEF_Set__SWIG_3(self, args); } } } } if (argc == 3) { int _v; void *vptr = 0; int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_Prelude__IDMEF, 0); _v = SWIG_CheckState(res); if (_v) { int res = SWIG_AsCharPtrAndSize(argv[1], 0, NULL, 0); _v = SWIG_CheckState(res); if (_v) { int res = swig::asptr(argv[2], (std::vector >**)(0)); _v = SWIG_CheckState(res); if (_v) { return _wrap_IDMEF_Set__SWIG_0(self, args); } } } } fail: SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'IDMEF_Set'.\n" " Possible C/C++ prototypes are:\n" " Set(Prelude::IDMEF *,char const *,std::vector< Prelude::IDMEFValue,std::allocator< Prelude::IDMEFValue > >)\n" " Set(Prelude::IDMEF *,char const *,Prelude::IDMEFValue *)\n" " Set(Prelude::IDMEF *,char const *,Prelude::IDMEFTime &)\n" " Set(Prelude::IDMEF *,char const *,char const *)\n" " Set(Prelude::IDMEF *,char const *,std::string)\n" " Set(Prelude::IDMEF *,char const *,int8_t)\n" " Set(Prelude::IDMEF *,char const *,uint8_t)\n" " Set(Prelude::IDMEF *,char const *,int16_t)\n" " Set(Prelude::IDMEF *,char const *,uint16_t)\n" " Set(Prelude::IDMEF *,char const *,int32_t)\n" " Set(Prelude::IDMEF *,char const *,uint32_t)\n" " Set(Prelude::IDMEF *,char const *,int64_t)\n" " Set(Prelude::IDMEF *,char const *,uint64_t)\n" " Set(Prelude::IDMEF *,char const *,float)\n" " Set(Prelude::IDMEF *,char const *,double)\n"); return NULL; } SWIGINTERN PyObject *_wrap_IDMEF_Get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; Prelude::IDMEF *arg1 = (Prelude::IDMEF *) 0 ; char *arg2 = (char *) 0 ; void *argp1 = 0 ; int res1 = 0 ; int res2 ; char *buf2 = 0 ; int alloc2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; Prelude::IDMEFValue result; if (!PyArg_ParseTuple(args,(char *)"OO:IDMEF_Get",&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Prelude__IDMEF, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IDMEF_Get" "', argument " "1"" of type '" "Prelude::IDMEF *""'"); } arg1 = reinterpret_cast< Prelude::IDMEF * >(argp1); res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "IDMEF_Get" "', argument " "2"" of type '" "char const *""'"); } arg2 = reinterpret_cast< char * >(buf2); try { result = (arg1)->Get((char const *)arg2); } catch(Prelude::PreludeError &_e) { SWIG_Python_Raise(SWIG_NewPointerObj((new Prelude::PreludeError(static_cast< const Prelude::PreludeError& >(_e))),SWIGTYPE_p_Prelude__PreludeError,SWIG_POINTER_OWN), "Prelude::PreludeError", SWIGTYPE_p_Prelude__PreludeError); SWIG_fail; } { int ret; if ( (&result)->IsNull() ) { Py_INCREF(Py_None); resultobj = Py_None; } else { ret = IDMEFValue_to_SWIG(result, &resultobj); if ( ret < 0 ) { std::stringstream s; s << "IDMEFValue typemap does not handle value of type '" << idmef_value_type_to_string((&result)->GetType()) << "'"; SWIG_exception_fail(SWIG_ValueError, s.str().c_str()); } } } if (alloc2 == SWIG_NEWOBJ) delete[] buf2; return resultobj; fail: if (alloc2 == SWIG_NEWOBJ) delete[] buf2; return NULL; } SWIGINTERN PyObject *_wrap_IDMEF_Clone(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; Prelude::IDMEF *arg1 = (Prelude::IDMEF *) 0 ; Prelude::IDMEF *arg2 = 0 ; void *argp1 = 0 ; int res1 = 0 ; void *argp2 = 0 ; int res2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; Prelude::IDMEF result; if (!PyArg_ParseTuple(args,(char *)"OO:IDMEF_Clone",&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Prelude__IDMEF, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IDMEF_Clone" "', argument " "1"" of type '" "Prelude::IDMEF *""'"); } arg1 = reinterpret_cast< Prelude::IDMEF * >(argp1); res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_Prelude__IDMEF, 0 | 0); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "IDMEF_Clone" "', argument " "2"" of type '" "Prelude::IDMEF const &""'"); } if (!argp2) { SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "IDMEF_Clone" "', argument " "2"" of type '" "Prelude::IDMEF const &""'"); } arg2 = reinterpret_cast< Prelude::IDMEF * >(argp2); try { result = (arg1)->Clone((Prelude::IDMEF const &)*arg2); } catch(Prelude::PreludeError &_e) { SWIG_Python_Raise(SWIG_NewPointerObj((new Prelude::PreludeError(static_cast< const Prelude::PreludeError& >(_e))),SWIGTYPE_p_Prelude__PreludeError,SWIG_POINTER_OWN), "Prelude::PreludeError", SWIGTYPE_p_Prelude__PreludeError); SWIG_fail; } resultobj = SWIG_NewPointerObj((new Prelude::IDMEF(static_cast< const Prelude::IDMEF& >(result))), SWIGTYPE_p_Prelude__IDMEF, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_IDMEF_ToString(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; Prelude::IDMEF *arg1 = (Prelude::IDMEF *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; std::string result; if (!PyArg_ParseTuple(args,(char *)"O:IDMEF_ToString",&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Prelude__IDMEF, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IDMEF_ToString" "', argument " "1"" of type '" "Prelude::IDMEF const *""'"); } arg1 = reinterpret_cast< Prelude::IDMEF * >(argp1); try { result = ((Prelude::IDMEF const *)arg1)->ToString(); } catch(Prelude::PreludeError &_e) { SWIG_Python_Raise(SWIG_NewPointerObj((new Prelude::PreludeError(static_cast< const Prelude::PreludeError& >(_e))),SWIGTYPE_p_Prelude__PreludeError,SWIG_POINTER_OWN), "Prelude::PreludeError", SWIGTYPE_p_Prelude__PreludeError); SWIG_fail; } resultobj = SWIG_From_std_string(static_cast< std::string >(result)); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_IDMEF___str__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; Prelude::IDMEF *arg1 = (Prelude::IDMEF *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; std::string result; if (!PyArg_ParseTuple(args,(char *)"O:IDMEF___str__",&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Prelude__IDMEF, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IDMEF___str__" "', argument " "1"" of type '" "Prelude::IDMEF const *""'"); } arg1 = reinterpret_cast< Prelude::IDMEF * >(argp1); try { result = ((Prelude::IDMEF const *)arg1)->operator const std::string(); } catch(Prelude::PreludeError &_e) { SWIG_Python_Raise(SWIG_NewPointerObj((new Prelude::PreludeError(static_cast< const Prelude::PreludeError& >(_e))),SWIGTYPE_p_Prelude__PreludeError,SWIG_POINTER_OWN), "Prelude::PreludeError", SWIGTYPE_p_Prelude__PreludeError); SWIG_fail; } resultobj = SWIG_From_std_string(static_cast< std::string >(result)); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_IDMEF_Write(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; Prelude::IDMEF *arg1 = (Prelude::IDMEF *) 0 ; void *arg2 = (void *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:IDMEF_Write",&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Prelude__IDMEF, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IDMEF_Write" "', argument " "1"" of type '" "Prelude::IDMEF *""'"); } arg1 = reinterpret_cast< Prelude::IDMEF * >(argp1); { if ( !PyFile_Check( (PyObject *)obj1) ) { const char * errstr = "Argument is not a file object."; PyErr_SetString(PyExc_RuntimeError,errstr); return NULL; } arg2 = obj1; } Prelude_IDMEF_Write(arg1,arg2); resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_IDMEF_Read(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; Prelude::IDMEF *arg1 = (Prelude::IDMEF *) 0 ; void *arg2 = (void *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:IDMEF_Read",&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Prelude__IDMEF, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IDMEF_Read" "', argument " "1"" of type '" "Prelude::IDMEF *""'"); } arg1 = reinterpret_cast< Prelude::IDMEF * >(argp1); { if ( !PyFile_Check( (PyObject *)obj1) ) { const char * errstr = "Argument is not a file object."; PyErr_SetString(PyExc_RuntimeError,errstr); return NULL; } arg2 = obj1; } Prelude_IDMEF_Read(arg1,arg2); resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_IDMEF___rshift__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; Prelude::IDMEF *arg1 = (Prelude::IDMEF *) 0 ; void *arg2 = (void *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; Prelude::IDMEF *result = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:IDMEF___rshift__",&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Prelude__IDMEF, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IDMEF___rshift__" "', argument " "1"" of type '" "Prelude::IDMEF *""'"); } arg1 = reinterpret_cast< Prelude::IDMEF * >(argp1); { if ( !PyFile_Check( (PyObject *)obj1) ) { const char * errstr = "Argument is not a file object."; PyErr_SetString(PyExc_RuntimeError,errstr); return NULL; } arg2 = obj1; } result = (Prelude::IDMEF *) &Prelude_IDMEF_operator_Sg__Sg_(arg1,arg2); resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Prelude__IDMEF, 0 | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_IDMEF___lshift__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; Prelude::IDMEF *arg1 = (Prelude::IDMEF *) 0 ; void *arg2 = (void *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; Prelude::IDMEF *result = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:IDMEF___lshift__",&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Prelude__IDMEF, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IDMEF___lshift__" "', argument " "1"" of type '" "Prelude::IDMEF *""'"); } arg1 = reinterpret_cast< Prelude::IDMEF * >(argp1); { if ( !PyFile_Check( (PyObject *)obj1) ) { const char * errstr = "Argument is not a file object."; PyErr_SetString(PyExc_RuntimeError,errstr); return NULL; } arg2 = obj1; } result = (Prelude::IDMEF *) &Prelude_IDMEF_operator_Sl__Sl_(arg1,arg2); resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Prelude__IDMEF, 0 | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *IDMEF_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *obj; if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL; SWIG_TypeNewClientData(SWIGTYPE_p_Prelude__IDMEF, SWIG_NewClientData(obj)); return SWIG_Py_Void(); } static PyMethodDef SwigMethods[] = { { (char *)"SWIG_PyInstanceMethod_New", (PyCFunction)SWIG_PyInstanceMethod_New, METH_O, NULL}, { (char *)"delete_SwigPyIterator", _wrap_delete_SwigPyIterator, METH_VARARGS, NULL}, { (char *)"SwigPyIterator_value", _wrap_SwigPyIterator_value, METH_VARARGS, NULL}, { (char *)"SwigPyIterator_incr", _wrap_SwigPyIterator_incr, METH_VARARGS, NULL}, { (char *)"SwigPyIterator_decr", _wrap_SwigPyIterator_decr, METH_VARARGS, NULL}, { (char *)"SwigPyIterator_distance", _wrap_SwigPyIterator_distance, METH_VARARGS, NULL}, { (char *)"SwigPyIterator_equal", _wrap_SwigPyIterator_equal, METH_VARARGS, NULL}, { (char *)"SwigPyIterator_copy", _wrap_SwigPyIterator_copy, METH_VARARGS, NULL}, { (char *)"SwigPyIterator_next", _wrap_SwigPyIterator_next, METH_VARARGS, NULL}, { (char *)"SwigPyIterator___next__", _wrap_SwigPyIterator___next__, METH_VARARGS, NULL}, { (char *)"SwigPyIterator_previous", _wrap_SwigPyIterator_previous, METH_VARARGS, NULL}, { (char *)"SwigPyIterator_advance", _wrap_SwigPyIterator_advance, METH_VARARGS, NULL}, { (char *)"SwigPyIterator___eq__", _wrap_SwigPyIterator___eq__, METH_VARARGS, NULL}, { (char *)"SwigPyIterator___ne__", _wrap_SwigPyIterator___ne__, METH_VARARGS, NULL}, { (char *)"SwigPyIterator___iadd__", _wrap_SwigPyIterator___iadd__, METH_VARARGS, NULL}, { (char *)"SwigPyIterator___isub__", _wrap_SwigPyIterator___isub__, METH_VARARGS, NULL}, { (char *)"SwigPyIterator___add__", _wrap_SwigPyIterator___add__, METH_VARARGS, NULL}, { (char *)"SwigPyIterator___sub__", _wrap_SwigPyIterator___sub__, METH_VARARGS, NULL}, { (char *)"SwigPyIterator_swigregister", SwigPyIterator_swigregister, METH_VARARGS, NULL}, { (char *)"CheckVersion", _wrap_CheckVersion, METH_VARARGS, NULL}, { (char *)"PreludeLog_SetLevel", _wrap_PreludeLog_SetLevel, METH_VARARGS, NULL}, { (char *)"PreludeLog_SetDebugLevel", _wrap_PreludeLog_SetDebugLevel, METH_VARARGS, NULL}, { (char *)"PreludeLog_SetFlags", _wrap_PreludeLog_SetFlags, METH_VARARGS, NULL}, { (char *)"PreludeLog_GetFlags", _wrap_PreludeLog_GetFlags, METH_VARARGS, NULL}, { (char *)"PreludeLog_SetLogfile", _wrap_PreludeLog_SetLogfile, METH_VARARGS, NULL}, { (char *)"PreludeLog_SetCallback", _wrap_PreludeLog_SetCallback, METH_VARARGS, NULL}, { (char *)"new_PreludeLog", _wrap_new_PreludeLog, METH_VARARGS, NULL}, { (char *)"delete_PreludeLog", _wrap_delete_PreludeLog, METH_VARARGS, NULL}, { (char *)"PreludeLog_swigregister", PreludeLog_swigregister, METH_VARARGS, NULL}, { (char *)"delete_PreludeError", _wrap_delete_PreludeError, METH_VARARGS, NULL}, { (char *)"new_PreludeError", _wrap_new_PreludeError, METH_VARARGS, NULL}, { (char *)"PreludeError_what", _wrap_PreludeError_what, METH_VARARGS, NULL}, { (char *)"PreludeError___str__", _wrap_PreludeError___str__, METH_VARARGS, NULL}, { (char *)"PreludeError_swigregister", PreludeError_swigregister, METH_VARARGS, NULL}, { (char *)"delete_Connection", _wrap_delete_Connection, METH_VARARGS, NULL}, { (char *)"new_Connection", _wrap_new_Connection, METH_VARARGS, NULL}, { (char *)"Connection_GetConnection", _wrap_Connection_GetConnection, METH_VARARGS, NULL}, { (char *)"Connection_Close", _wrap_Connection_Close, METH_VARARGS, NULL}, { (char *)"Connection_Connect", _wrap_Connection_Connect, METH_VARARGS, NULL}, { (char *)"Connection_SetState", _wrap_Connection_SetState, METH_VARARGS, NULL}, { (char *)"Connection_GetState", _wrap_Connection_GetState, METH_VARARGS, NULL}, { (char *)"Connection_SetData", _wrap_Connection_SetData, METH_VARARGS, NULL}, { (char *)"Connection_GetData", _wrap_Connection_GetData, METH_VARARGS, NULL}, { (char *)"Connection_GetPermission", _wrap_Connection_GetPermission, METH_VARARGS, NULL}, { (char *)"Connection_SetPeerAnalyzerid", _wrap_Connection_SetPeerAnalyzerid, METH_VARARGS, NULL}, { (char *)"Connection_GetPeerAnalyzerid", _wrap_Connection_GetPeerAnalyzerid, METH_VARARGS, NULL}, { (char *)"Connection_GetLocalAddr", _wrap_Connection_GetLocalAddr, METH_VARARGS, NULL}, { (char *)"Connection_GetLocalPort", _wrap_Connection_GetLocalPort, METH_VARARGS, NULL}, { (char *)"Connection_GetPeerAddr", _wrap_Connection_GetPeerAddr, METH_VARARGS, NULL}, { (char *)"Connection_GetPeerPort", _wrap_Connection_GetPeerPort, METH_VARARGS, NULL}, { (char *)"Connection_IsAlive", _wrap_Connection_IsAlive, METH_VARARGS, NULL}, { (char *)"Connection_GetFd", _wrap_Connection_GetFd, METH_VARARGS, NULL}, { (char *)"Connection_RecvIDMEF", _wrap_Connection_RecvIDMEF, METH_VARARGS, NULL}, { (char *)"Connection_swigregister", Connection_swigregister, METH_VARARGS, NULL}, { (char *)"delete_ConnectionPool", _wrap_delete_ConnectionPool, METH_VARARGS, NULL}, { (char *)"new_ConnectionPool", _wrap_new_ConnectionPool, METH_VARARGS, NULL}, { (char *)"ConnectionPool_Init", _wrap_ConnectionPool_Init, METH_VARARGS, NULL}, { (char *)"ConnectionPool_SetConnectionString", _wrap_ConnectionPool_SetConnectionString, METH_VARARGS, NULL}, { (char *)"ConnectionPool_GetConnectionString", _wrap_ConnectionPool_GetConnectionString, METH_VARARGS, NULL}, { (char *)"ConnectionPool_GetConnectionList", _wrap_ConnectionPool_GetConnectionList, METH_VARARGS, NULL}, { (char *)"ConnectionPool_SetFlags", _wrap_ConnectionPool_SetFlags, METH_VARARGS, NULL}, { (char *)"ConnectionPool_GetFlags", _wrap_ConnectionPool_GetFlags, METH_VARARGS, NULL}, { (char *)"ConnectionPool_SetData", _wrap_ConnectionPool_SetData, METH_VARARGS, NULL}, { (char *)"ConnectionPool_GetData", _wrap_ConnectionPool_GetData, METH_VARARGS, NULL}, { (char *)"ConnectionPool_AddConnection", _wrap_ConnectionPool_AddConnection, METH_VARARGS, NULL}, { (char *)"ConnectionPool_DelConnection", _wrap_ConnectionPool_DelConnection, METH_VARARGS, NULL}, { (char *)"ConnectionPool_SetConnectionAlive", _wrap_ConnectionPool_SetConnectionAlive, METH_VARARGS, NULL}, { (char *)"ConnectionPool_SetConnectionDead", _wrap_ConnectionPool_SetConnectionDead, METH_VARARGS, NULL}, { (char *)"ConnectionPool_SetRequiredPermission", _wrap_ConnectionPool_SetRequiredPermission, METH_VARARGS, NULL}, { (char *)"ConnectionPool_swigregister", ConnectionPool_swigregister, METH_VARARGS, NULL}, { (char *)"new_ClientProfile", _wrap_new_ClientProfile, METH_VARARGS, NULL}, { (char *)"delete_ClientProfile", _wrap_delete_ClientProfile, METH_VARARGS, NULL}, { (char *)"ClientProfile_GetUid", _wrap_ClientProfile_GetUid, METH_VARARGS, NULL}, { (char *)"ClientProfile_GetGid", _wrap_ClientProfile_GetGid, METH_VARARGS, NULL}, { (char *)"ClientProfile_GetName", _wrap_ClientProfile_GetName, METH_VARARGS, NULL}, { (char *)"ClientProfile_SetName", _wrap_ClientProfile_SetName, METH_VARARGS, NULL}, { (char *)"ClientProfile_GetAnalyzerId", _wrap_ClientProfile_GetAnalyzerId, METH_VARARGS, NULL}, { (char *)"ClientProfile_GetConfigFilename", _wrap_ClientProfile_GetConfigFilename, METH_VARARGS, NULL}, { (char *)"ClientProfile_GetAnalyzeridFilename", _wrap_ClientProfile_GetAnalyzeridFilename, METH_VARARGS, NULL}, { (char *)"ClientProfile_GetTlsKeyFilename", _wrap_ClientProfile_GetTlsKeyFilename, METH_VARARGS, NULL}, { (char *)"ClientProfile_GetTlsServerCaCertFilename", _wrap_ClientProfile_GetTlsServerCaCertFilename, METH_VARARGS, NULL}, { (char *)"ClientProfile_GetTlsServerKeyCertFilename", _wrap_ClientProfile_GetTlsServerKeyCertFilename, METH_VARARGS, NULL}, { (char *)"ClientProfile_GetTlsServerCrlFilename", _wrap_ClientProfile_GetTlsServerCrlFilename, METH_VARARGS, NULL}, { (char *)"ClientProfile_GetTlsClientKeyCertFilename", _wrap_ClientProfile_GetTlsClientKeyCertFilename, METH_VARARGS, NULL}, { (char *)"ClientProfile_GetTlsClientTrustedCertFilename", _wrap_ClientProfile_GetTlsClientTrustedCertFilename, METH_VARARGS, NULL}, { (char *)"ClientProfile_GetBackupDirname", _wrap_ClientProfile_GetBackupDirname, METH_VARARGS, NULL}, { (char *)"ClientProfile_GetProfileDirname", _wrap_ClientProfile_GetProfileDirname, METH_VARARGS, NULL}, { (char *)"ClientProfile_SetPrefix", _wrap_ClientProfile_SetPrefix, METH_VARARGS, NULL}, { (char *)"ClientProfile_GetPrefix", _wrap_ClientProfile_GetPrefix, METH_VARARGS, NULL}, { (char *)"ClientProfile_swigregister", ClientProfile_swigregister, METH_VARARGS, NULL}, { (char *)"delete_Client", _wrap_delete_Client, METH_VARARGS, NULL}, { (char *)"new_Client", _wrap_new_Client, METH_VARARGS, NULL}, { (char *)"Client_Start", _wrap_Client_Start, METH_VARARGS, NULL}, { (char *)"Client_Init", _wrap_Client_Init, METH_VARARGS, NULL}, { (char *)"Client_GetClient", _wrap_Client_GetClient, METH_VARARGS, NULL}, { (char *)"Client_SendIDMEF", _wrap_Client_SendIDMEF, METH_VARARGS, NULL}, { (char *)"Client_RecvIDMEF", _wrap_Client_RecvIDMEF, METH_VARARGS, NULL}, { (char *)"Client_GetFlags", _wrap_Client_GetFlags, METH_VARARGS, NULL}, { (char *)"Client_SetFlags", _wrap_Client_SetFlags, METH_VARARGS, NULL}, { (char *)"Client_GetRequiredPermission", _wrap_Client_GetRequiredPermission, METH_VARARGS, NULL}, { (char *)"Client_SetRequiredPermission", _wrap_Client_SetRequiredPermission, METH_VARARGS, NULL}, { (char *)"Client_GetConfigFilename", _wrap_Client_GetConfigFilename, METH_VARARGS, NULL}, { (char *)"Client_SetConfigFilename", _wrap_Client_SetConfigFilename, METH_VARARGS, NULL}, { (char *)"Client_GetConnectionPool", _wrap_Client_GetConnectionPool, METH_VARARGS, NULL}, { (char *)"Client_SetConnectionPool", _wrap_Client_SetConnectionPool, METH_VARARGS, NULL}, { (char *)"Client___lshift__", _wrap_Client___lshift__, METH_VARARGS, NULL}, { (char *)"Client___rshift__", _wrap_Client___rshift__, METH_VARARGS, NULL}, { (char *)"Client_SetRecvTimeout", _wrap_Client_SetRecvTimeout, METH_VARARGS, NULL}, { (char *)"Client_swigregister", Client_swigregister, METH_VARARGS, NULL}, { (char *)"new_ClientEasy", _wrap_new_ClientEasy, METH_VARARGS, NULL}, { (char *)"delete_ClientEasy", _wrap_delete_ClientEasy, METH_VARARGS, NULL}, { (char *)"ClientEasy_swigregister", ClientEasy_swigregister, METH_VARARGS, NULL}, { (char *)"new_IDMEFCriterion", _wrap_new_IDMEFCriterion, METH_VARARGS, NULL}, { (char *)"delete_IDMEFCriterion", _wrap_delete_IDMEFCriterion, METH_VARARGS, NULL}, { (char *)"IDMEFCriterion_swigregister", IDMEFCriterion_swigregister, METH_VARARGS, NULL}, { (char *)"delete_IDMEFCriteria", _wrap_delete_IDMEFCriteria, METH_VARARGS, NULL}, { (char *)"new_IDMEFCriteria", _wrap_new_IDMEFCriteria, METH_VARARGS, NULL}, { (char *)"IDMEFCriteria_Match", _wrap_IDMEFCriteria_Match, METH_VARARGS, NULL}, { (char *)"IDMEFCriteria_Clone", _wrap_IDMEFCriteria_Clone, METH_VARARGS, NULL}, { (char *)"IDMEFCriteria_ANDCriteria", _wrap_IDMEFCriteria_ANDCriteria, METH_VARARGS, NULL}, { (char *)"IDMEFCriteria_ORCriteria", _wrap_IDMEFCriteria_ORCriteria, METH_VARARGS, NULL}, { (char *)"IDMEFCriteria_ToString", _wrap_IDMEFCriteria_ToString, METH_VARARGS, NULL}, { (char *)"IDMEFCriteria___str__", _wrap_IDMEFCriteria___str__, METH_VARARGS, NULL}, { (char *)"IDMEFCriteria_swigregister", IDMEFCriteria_swigregister, METH_VARARGS, NULL}, { (char *)"IDMEFValue_GetType", _wrap_IDMEFValue_GetType, METH_VARARGS, NULL}, { (char *)"IDMEFValue_IsNull", _wrap_IDMEFValue_IsNull, METH_VARARGS, NULL}, { (char *)"delete_IDMEFValue", _wrap_delete_IDMEFValue, METH_VARARGS, NULL}, { (char *)"new_IDMEFValue", _wrap_new_IDMEFValue, METH_VARARGS, NULL}, { (char *)"IDMEFValue_Match", _wrap_IDMEFValue_Match, METH_VARARGS, NULL}, { (char *)"IDMEFValue_Clone", _wrap_IDMEFValue_Clone, METH_VARARGS, NULL}, { (char *)"IDMEFValue_swigregister", IDMEFValue_swigregister, METH_VARARGS, NULL}, { (char *)"new_IDMEFPath", _wrap_new_IDMEFPath, METH_VARARGS, NULL}, { (char *)"delete_IDMEFPath", _wrap_delete_IDMEFPath, METH_VARARGS, NULL}, { (char *)"IDMEFPath_Get", _wrap_IDMEFPath_Get, METH_VARARGS, NULL}, { (char *)"IDMEFPath_Set", _wrap_IDMEFPath_Set, METH_VARARGS, NULL}, { (char *)"IDMEFPath_GetClass", _wrap_IDMEFPath_GetClass, METH_VARARGS, NULL}, { (char *)"IDMEFPath_GetValueType", _wrap_IDMEFPath_GetValueType, METH_VARARGS, NULL}, { (char *)"IDMEFPath_SetIndex", _wrap_IDMEFPath_SetIndex, METH_VARARGS, NULL}, { (char *)"IDMEFPath_UndefineIndex", _wrap_IDMEFPath_UndefineIndex, METH_VARARGS, NULL}, { (char *)"IDMEFPath_GetIndex", _wrap_IDMEFPath_GetIndex, METH_VARARGS, NULL}, { (char *)"IDMEFPath_MakeChild", _wrap_IDMEFPath_MakeChild, METH_VARARGS, NULL}, { (char *)"IDMEFPath_MakeParent", _wrap_IDMEFPath_MakeParent, METH_VARARGS, NULL}, { (char *)"IDMEFPath_Compare", _wrap_IDMEFPath_Compare, METH_VARARGS, NULL}, { (char *)"IDMEFPath_Clone", _wrap_IDMEFPath_Clone, METH_VARARGS, NULL}, { (char *)"IDMEFPath_CheckOperator", _wrap_IDMEFPath_CheckOperator, METH_VARARGS, NULL}, { (char *)"IDMEFPath_GetApplicableOperators", _wrap_IDMEFPath_GetApplicableOperators, METH_VARARGS, NULL}, { (char *)"IDMEFPath_GetName", _wrap_IDMEFPath_GetName, METH_VARARGS, NULL}, { (char *)"IDMEFPath_IsAmbiguous", _wrap_IDMEFPath_IsAmbiguous, METH_VARARGS, NULL}, { (char *)"IDMEFPath_HasLists", _wrap_IDMEFPath_HasLists, METH_VARARGS, NULL}, { (char *)"IDMEFPath_IsList", _wrap_IDMEFPath_IsList, METH_VARARGS, NULL}, { (char *)"IDMEFPath_GetDepth", _wrap_IDMEFPath_GetDepth, METH_VARARGS, NULL}, { (char *)"IDMEFPath_swigregister", IDMEFPath_swigregister, METH_VARARGS, NULL}, { (char *)"new_IDMEFTime", _wrap_new_IDMEFTime, METH_VARARGS, NULL}, { (char *)"delete_IDMEFTime", _wrap_delete_IDMEFTime, METH_VARARGS, NULL}, { (char *)"IDMEFTime_Set", _wrap_IDMEFTime_Set, METH_VARARGS, NULL}, { (char *)"IDMEFTime_SetSec", _wrap_IDMEFTime_SetSec, METH_VARARGS, NULL}, { (char *)"IDMEFTime_SetUSec", _wrap_IDMEFTime_SetUSec, METH_VARARGS, NULL}, { (char *)"IDMEFTime_SetGmtOffset", _wrap_IDMEFTime_SetGmtOffset, METH_VARARGS, NULL}, { (char *)"IDMEFTime_GetSec", _wrap_IDMEFTime_GetSec, METH_VARARGS, NULL}, { (char *)"IDMEFTime_GetUSec", _wrap_IDMEFTime_GetUSec, METH_VARARGS, NULL}, { (char *)"IDMEFTime_GetGmtOffset", _wrap_IDMEFTime_GetGmtOffset, METH_VARARGS, NULL}, { (char *)"IDMEFTime_Clone", _wrap_IDMEFTime_Clone, METH_VARARGS, NULL}, { (char *)"IDMEFTime_ToString", _wrap_IDMEFTime_ToString, METH_VARARGS, NULL}, { (char *)"IDMEFTime___int__", _wrap_IDMEFTime___int__, METH_VARARGS, NULL}, { (char *)"IDMEFTime___long__", _wrap_IDMEFTime___long__, METH_VARARGS, NULL}, { (char *)"IDMEFTime___float__", _wrap_IDMEFTime___float__, METH_VARARGS, NULL}, { (char *)"IDMEFTime___str__", _wrap_IDMEFTime___str__, METH_VARARGS, NULL}, { (char *)"IDMEFTime___ne__", _wrap_IDMEFTime___ne__, METH_VARARGS, NULL}, { (char *)"IDMEFTime___ge__", _wrap_IDMEFTime___ge__, METH_VARARGS, NULL}, { (char *)"IDMEFTime___le__", _wrap_IDMEFTime___le__, METH_VARARGS, NULL}, { (char *)"IDMEFTime___eq__", _wrap_IDMEFTime___eq__, METH_VARARGS, NULL}, { (char *)"IDMEFTime___gt__", _wrap_IDMEFTime___gt__, METH_VARARGS, NULL}, { (char *)"IDMEFTime___lt__", _wrap_IDMEFTime___lt__, METH_VARARGS, NULL}, { (char *)"IDMEFTime_swigregister", IDMEFTime_swigregister, METH_VARARGS, NULL}, { (char *)"delete_IDMEF", _wrap_delete_IDMEF, METH_VARARGS, NULL}, { (char *)"new_IDMEF", _wrap_new_IDMEF, METH_VARARGS, NULL}, { (char *)"IDMEF_Set", _wrap_IDMEF_Set, METH_VARARGS, NULL}, { (char *)"IDMEF_Get", _wrap_IDMEF_Get, METH_VARARGS, NULL}, { (char *)"IDMEF_Clone", _wrap_IDMEF_Clone, METH_VARARGS, NULL}, { (char *)"IDMEF_ToString", _wrap_IDMEF_ToString, METH_VARARGS, NULL}, { (char *)"IDMEF___str__", _wrap_IDMEF___str__, METH_VARARGS, NULL}, { (char *)"IDMEF_Write", _wrap_IDMEF_Write, METH_VARARGS, NULL}, { (char *)"IDMEF_Read", _wrap_IDMEF_Read, METH_VARARGS, NULL}, { (char *)"IDMEF___rshift__", _wrap_IDMEF___rshift__, METH_VARARGS, NULL}, { (char *)"IDMEF___lshift__", _wrap_IDMEF___lshift__, METH_VARARGS, NULL}, { (char *)"IDMEF_swigregister", IDMEF_swigregister, METH_VARARGS, NULL}, { NULL, NULL, 0, NULL } }; /* -------- TYPE CONVERSION AND EQUIVALENCE RULES (BEGIN) -------- */ static void *_p_Prelude__ClientTo_p_Prelude__ClientProfile(void *x, int *SWIGUNUSEDPARM(newmemory)) { return (void *)((Prelude::ClientProfile *) ((Prelude::Client *) x)); } static void *_p_Prelude__ClientEasyTo_p_Prelude__ClientProfile(void *x, int *SWIGUNUSEDPARM(newmemory)) { return (void *)((Prelude::ClientProfile *) (Prelude::Client *) ((Prelude::ClientEasy *) x)); } static void *_p_Prelude__PreludeErrorTo_p_std__exception(void *x, int *SWIGUNUSEDPARM(newmemory)) { return (void *)((std::exception *) ((Prelude::PreludeError *) x)); } static void *_p_Prelude__ClientEasyTo_p_Prelude__Client(void *x, int *SWIGUNUSEDPARM(newmemory)) { return (void *)((Prelude::Client *) ((Prelude::ClientEasy *) x)); } static swig_type_info _swigt__p_Prelude__Client = {"_p_Prelude__Client", "Prelude::Client *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_Prelude__ClientEasy = {"_p_Prelude__ClientEasy", "Prelude::ClientEasy *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_Prelude__ClientProfile = {"_p_Prelude__ClientProfile", "Prelude::ClientProfile *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_Prelude__Connection = {"_p_Prelude__Connection", "Prelude::Connection *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_Prelude__ConnectionPool = {"_p_Prelude__ConnectionPool", "Prelude::ConnectionPool *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_Prelude__IDMEF = {"_p_Prelude__IDMEF", "Prelude::IDMEF *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_Prelude__IDMEFCriteria = {"_p_Prelude__IDMEFCriteria", "Prelude::IDMEFCriteria *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_Prelude__IDMEFCriterion = {"_p_Prelude__IDMEFCriterion", "Prelude::IDMEFCriterion *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_Prelude__IDMEFPath = {"_p_Prelude__IDMEFPath", "Prelude::IDMEFPath *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_Prelude__IDMEFTime = {"_p_Prelude__IDMEFTime", "Prelude::IDMEFTime *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_Prelude__IDMEFValue = {"_p_Prelude__IDMEFValue", "Prelude::IDMEFValue *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_Prelude__PreludeError = {"_p_Prelude__PreludeError", "Prelude::PreludeError *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_Prelude__PreludeLog = {"_p_Prelude__PreludeLog", "Prelude::PreludeLog *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_allocator_type = {"_p_allocator_type", "allocator_type *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_char = {"_p_char", "char *|int8_t *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_difference_type = {"_p_difference_type", "difference_type *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_f_int_p_q_const__char__void = {"_p_f_int_p_q_const__char__void", "void (*)(int,char const *)", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_idmef_class_id_t = {"_p_idmef_class_id_t", "idmef_class_id_t *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_idmef_criteria_t = {"_p_idmef_criteria_t", "idmef_criteria_t *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_idmef_criterion_operator_t = {"_p_idmef_criterion_operator_t", "idmef_criterion_operator_t *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_idmef_message_t = {"_p_idmef_message_t", "idmef_message_t *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_idmef_path_t = {"_p_idmef_path_t", "idmef_path_t *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_idmef_time_t = {"_p_idmef_time_t", "idmef_time_t *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_idmef_value_t = {"_p_idmef_value_t", "idmef_value_t *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_idmef_value_type_id_t = {"_p_idmef_value_type_id_t", "idmef_value_type_id_t *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_int = {"_p_int", "int *|int32_t *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_long_long = {"_p_long_long", "int64_t *|long long *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_prelude_client_profile_t = {"_p_prelude_client_profile_t", "prelude_client_profile_t *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_prelude_client_t = {"_p_prelude_client_t", "prelude_client_t *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_prelude_connection_pool_t = {"_p_prelude_connection_pool_t", "prelude_connection_pool_t *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_prelude_connection_t = {"_p_prelude_connection_t", "prelude_connection_t *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_short = {"_p_short", "short *|int16_t *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_size_type = {"_p_size_type", "size_type *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_std__exception = {"_p_std__exception", "std::exception *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_std__invalid_argument = {"_p_std__invalid_argument", "std::invalid_argument *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_swig__SwigPyIterator = {"_p_swig__SwigPyIterator", "swig::SwigPyIterator *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_time_t = {"_p_time_t", "time_t *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_timeval = {"_p_timeval", "timeval *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_unsigned_char = {"_p_unsigned_char", "unsigned char *|uint8_t *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_unsigned_int = {"_p_unsigned_int", "uint32_t *|unsigned int *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_unsigned_long_long = {"_p_unsigned_long_long", "uint64_t *|unsigned long long *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_unsigned_short = {"_p_unsigned_short", "unsigned short *|uint16_t *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_value_type = {"_p_value_type", "value_type *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_void = {"_p_void", "void *", 0, 0, (void*)0, 0}; static swig_type_info *swig_type_initial[] = { &_swigt__p_Prelude__Client, &_swigt__p_Prelude__ClientEasy, &_swigt__p_Prelude__ClientProfile, &_swigt__p_Prelude__Connection, &_swigt__p_Prelude__ConnectionPool, &_swigt__p_Prelude__IDMEF, &_swigt__p_Prelude__IDMEFCriteria, &_swigt__p_Prelude__IDMEFCriterion, &_swigt__p_Prelude__IDMEFPath, &_swigt__p_Prelude__IDMEFTime, &_swigt__p_Prelude__IDMEFValue, &_swigt__p_Prelude__PreludeError, &_swigt__p_Prelude__PreludeLog, &_swigt__p_allocator_type, &_swigt__p_char, &_swigt__p_difference_type, &_swigt__p_f_int_p_q_const__char__void, &_swigt__p_idmef_class_id_t, &_swigt__p_idmef_criteria_t, &_swigt__p_idmef_criterion_operator_t, &_swigt__p_idmef_message_t, &_swigt__p_idmef_path_t, &_swigt__p_idmef_time_t, &_swigt__p_idmef_value_t, &_swigt__p_idmef_value_type_id_t, &_swigt__p_int, &_swigt__p_long_long, &_swigt__p_prelude_client_profile_t, &_swigt__p_prelude_client_t, &_swigt__p_prelude_connection_pool_t, &_swigt__p_prelude_connection_t, &_swigt__p_short, &_swigt__p_size_type, &_swigt__p_std__exception, &_swigt__p_std__invalid_argument, &_swigt__p_swig__SwigPyIterator, &_swigt__p_time_t, &_swigt__p_timeval, &_swigt__p_unsigned_char, &_swigt__p_unsigned_int, &_swigt__p_unsigned_long_long, &_swigt__p_unsigned_short, &_swigt__p_value_type, &_swigt__p_void, }; static swig_cast_info _swigc__p_Prelude__Client[] = { {&_swigt__p_Prelude__Client, 0, 0, 0}, {&_swigt__p_Prelude__ClientEasy, _p_Prelude__ClientEasyTo_p_Prelude__Client, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_Prelude__ClientEasy[] = { {&_swigt__p_Prelude__ClientEasy, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_Prelude__ClientProfile[] = { {&_swigt__p_Prelude__Client, _p_Prelude__ClientTo_p_Prelude__ClientProfile, 0, 0}, {&_swigt__p_Prelude__ClientProfile, 0, 0, 0}, {&_swigt__p_Prelude__ClientEasy, _p_Prelude__ClientEasyTo_p_Prelude__ClientProfile, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_Prelude__Connection[] = { {&_swigt__p_Prelude__Connection, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_Prelude__ConnectionPool[] = { {&_swigt__p_Prelude__ConnectionPool, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_Prelude__IDMEF[] = { {&_swigt__p_Prelude__IDMEF, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_Prelude__IDMEFCriteria[] = { {&_swigt__p_Prelude__IDMEFCriteria, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_Prelude__IDMEFCriterion[] = { {&_swigt__p_Prelude__IDMEFCriterion, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_Prelude__IDMEFPath[] = { {&_swigt__p_Prelude__IDMEFPath, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_Prelude__IDMEFTime[] = { {&_swigt__p_Prelude__IDMEFTime, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_Prelude__IDMEFValue[] = { {&_swigt__p_Prelude__IDMEFValue, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_Prelude__PreludeError[] = { {&_swigt__p_Prelude__PreludeError, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_Prelude__PreludeLog[] = { {&_swigt__p_Prelude__PreludeLog, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_allocator_type[] = { {&_swigt__p_allocator_type, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_char[] = { {&_swigt__p_char, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_difference_type[] = { {&_swigt__p_difference_type, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_f_int_p_q_const__char__void[] = { {&_swigt__p_f_int_p_q_const__char__void, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_idmef_class_id_t[] = { {&_swigt__p_idmef_class_id_t, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_idmef_criteria_t[] = { {&_swigt__p_idmef_criteria_t, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_idmef_criterion_operator_t[] = { {&_swigt__p_idmef_criterion_operator_t, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_idmef_message_t[] = { {&_swigt__p_idmef_message_t, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_idmef_path_t[] = { {&_swigt__p_idmef_path_t, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_idmef_time_t[] = { {&_swigt__p_idmef_time_t, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_idmef_value_t[] = { {&_swigt__p_idmef_value_t, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_idmef_value_type_id_t[] = { {&_swigt__p_idmef_value_type_id_t, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_int[] = { {&_swigt__p_int, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_long_long[] = { {&_swigt__p_long_long, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_prelude_client_profile_t[] = { {&_swigt__p_prelude_client_profile_t, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_prelude_client_t[] = { {&_swigt__p_prelude_client_t, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_prelude_connection_pool_t[] = { {&_swigt__p_prelude_connection_pool_t, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_prelude_connection_t[] = { {&_swigt__p_prelude_connection_t, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_short[] = { {&_swigt__p_short, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_size_type[] = { {&_swigt__p_size_type, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_std__exception[] = { {&_swigt__p_std__exception, 0, 0, 0}, {&_swigt__p_Prelude__PreludeError, _p_Prelude__PreludeErrorTo_p_std__exception, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_std__invalid_argument[] = { {&_swigt__p_std__invalid_argument, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_swig__SwigPyIterator[] = { {&_swigt__p_swig__SwigPyIterator, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_time_t[] = { {&_swigt__p_time_t, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_timeval[] = { {&_swigt__p_timeval, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_unsigned_char[] = { {&_swigt__p_unsigned_char, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_unsigned_int[] = { {&_swigt__p_unsigned_int, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_unsigned_long_long[] = { {&_swigt__p_unsigned_long_long, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_unsigned_short[] = { {&_swigt__p_unsigned_short, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_value_type[] = { {&_swigt__p_value_type, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_void[] = { {&_swigt__p_void, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info *swig_cast_initial[] = { _swigc__p_Prelude__Client, _swigc__p_Prelude__ClientEasy, _swigc__p_Prelude__ClientProfile, _swigc__p_Prelude__Connection, _swigc__p_Prelude__ConnectionPool, _swigc__p_Prelude__IDMEF, _swigc__p_Prelude__IDMEFCriteria, _swigc__p_Prelude__IDMEFCriterion, _swigc__p_Prelude__IDMEFPath, _swigc__p_Prelude__IDMEFTime, _swigc__p_Prelude__IDMEFValue, _swigc__p_Prelude__PreludeError, _swigc__p_Prelude__PreludeLog, _swigc__p_allocator_type, _swigc__p_char, _swigc__p_difference_type, _swigc__p_f_int_p_q_const__char__void, _swigc__p_idmef_class_id_t, _swigc__p_idmef_criteria_t, _swigc__p_idmef_criterion_operator_t, _swigc__p_idmef_message_t, _swigc__p_idmef_path_t, _swigc__p_idmef_time_t, _swigc__p_idmef_value_t, _swigc__p_idmef_value_type_id_t, _swigc__p_int, _swigc__p_long_long, _swigc__p_prelude_client_profile_t, _swigc__p_prelude_client_t, _swigc__p_prelude_connection_pool_t, _swigc__p_prelude_connection_t, _swigc__p_short, _swigc__p_size_type, _swigc__p_std__exception, _swigc__p_std__invalid_argument, _swigc__p_swig__SwigPyIterator, _swigc__p_time_t, _swigc__p_timeval, _swigc__p_unsigned_char, _swigc__p_unsigned_int, _swigc__p_unsigned_long_long, _swigc__p_unsigned_short, _swigc__p_value_type, _swigc__p_void, }; /* -------- TYPE CONVERSION AND EQUIVALENCE RULES (END) -------- */ static swig_const_info swig_const_table[] = { {0, 0, 0, 0.0, 0, 0}}; #ifdef __cplusplus } #endif /* ----------------------------------------------------------------------------- * Type initialization: * This problem is tough by the requirement that no dynamic * memory is used. Also, since swig_type_info structures store pointers to * swig_cast_info structures and swig_cast_info structures store pointers back * to swig_type_info structures, we need some lookup code at initialization. * The idea is that swig generates all the structures that are needed. * The runtime then collects these partially filled structures. * The SWIG_InitializeModule function takes these initial arrays out of * swig_module, and does all the lookup, filling in the swig_module.types * array with the correct data and linking the correct swig_cast_info * structures together. * * The generated swig_type_info structures are assigned staticly to an initial * array. We just loop through that array, and handle each type individually. * First we lookup if this type has been already loaded, and if so, use the * loaded structure instead of the generated one. Then we have to fill in the * cast linked list. The cast data is initially stored in something like a * two-dimensional array. Each row corresponds to a type (there are the same * number of rows as there are in the swig_type_initial array). Each entry in * a column is one of the swig_cast_info structures for that type. * The cast_initial array is actually an array of arrays, because each row has * a variable number of columns. So to actually build the cast linked list, * we find the array of casts associated with the type, and loop through it * adding the casts to the list. The one last trick we need to do is making * sure the type pointer in the swig_cast_info struct is correct. * * First off, we lookup the cast->type name to see if it is already loaded. * There are three cases to handle: * 1) If the cast->type has already been loaded AND the type we are adding * casting info to has not been loaded (it is in this module), THEN we * replace the cast->type pointer with the type pointer that has already * been loaded. * 2) If BOTH types (the one we are adding casting info to, and the * cast->type) are loaded, THEN the cast info has already been loaded by * the previous module so we just ignore it. * 3) Finally, if cast->type has not already been loaded, then we add that * swig_cast_info to the linked list (because the cast->type) pointer will * be correct. * ----------------------------------------------------------------------------- */ #ifdef __cplusplus extern "C" { #if 0 } /* c-mode */ #endif #endif #if 0 #define SWIGRUNTIME_DEBUG #endif SWIGRUNTIME void SWIG_InitializeModule(void *clientdata) { size_t i; swig_module_info *module_head, *iter; int found, init; clientdata = clientdata; /* check to see if the circular list has been setup, if not, set it up */ if (swig_module.next==0) { /* Initialize the swig_module */ swig_module.type_initial = swig_type_initial; swig_module.cast_initial = swig_cast_initial; swig_module.next = &swig_module; init = 1; } else { init = 0; } /* Try and load any already created modules */ module_head = SWIG_GetModule(clientdata); if (!module_head) { /* This is the first module loaded for this interpreter */ /* so set the swig module into the interpreter */ SWIG_SetModule(clientdata, &swig_module); module_head = &swig_module; } else { /* the interpreter has loaded a SWIG module, but has it loaded this one? */ found=0; iter=module_head; do { if (iter==&swig_module) { found=1; break; } iter=iter->next; } while (iter!= module_head); /* if the is found in the list, then all is done and we may leave */ if (found) return; /* otherwise we must add out module into the list */ swig_module.next = module_head->next; module_head->next = &swig_module; } /* When multiple interpeters are used, a module could have already been initialized in a different interpreter, but not yet have a pointer in this interpreter. In this case, we do not want to continue adding types... everything should be set up already */ if (init == 0) return; /* Now work on filling in swig_module.types */ #ifdef SWIGRUNTIME_DEBUG printf("SWIG_InitializeModule: size %d\n", swig_module.size); #endif for (i = 0; i < swig_module.size; ++i) { swig_type_info *type = 0; swig_type_info *ret; swig_cast_info *cast; #ifdef SWIGRUNTIME_DEBUG printf("SWIG_InitializeModule: type %d %s\n", i, swig_module.type_initial[i]->name); #endif /* if there is another module already loaded */ if (swig_module.next != &swig_module) { type = SWIG_MangledTypeQueryModule(swig_module.next, &swig_module, swig_module.type_initial[i]->name); } if (type) { /* Overwrite clientdata field */ #ifdef SWIGRUNTIME_DEBUG printf("SWIG_InitializeModule: found type %s\n", type->name); #endif if (swig_module.type_initial[i]->clientdata) { type->clientdata = swig_module.type_initial[i]->clientdata; #ifdef SWIGRUNTIME_DEBUG printf("SWIG_InitializeModule: found and overwrite type %s \n", type->name); #endif } } else { type = swig_module.type_initial[i]; } /* Insert casting types */ cast = swig_module.cast_initial[i]; while (cast->type) { /* Don't need to add information already in the list */ ret = 0; #ifdef SWIGRUNTIME_DEBUG printf("SWIG_InitializeModule: look cast %s\n", cast->type->name); #endif if (swig_module.next != &swig_module) { ret = SWIG_MangledTypeQueryModule(swig_module.next, &swig_module, cast->type->name); #ifdef SWIGRUNTIME_DEBUG if (ret) printf("SWIG_InitializeModule: found cast %s\n", ret->name); #endif } if (ret) { if (type == swig_module.type_initial[i]) { #ifdef SWIGRUNTIME_DEBUG printf("SWIG_InitializeModule: skip old type %s\n", ret->name); #endif cast->type = ret; ret = 0; } else { /* Check for casting already in the list */ swig_cast_info *ocast = SWIG_TypeCheck(ret->name, type); #ifdef SWIGRUNTIME_DEBUG if (ocast) printf("SWIG_InitializeModule: skip old cast %s\n", ret->name); #endif if (!ocast) ret = 0; } } if (!ret) { #ifdef SWIGRUNTIME_DEBUG printf("SWIG_InitializeModule: adding cast %s\n", cast->type->name); #endif if (type->cast) { type->cast->prev = cast; cast->next = type->cast; } type->cast = cast; } cast++; } /* Set entry in modules->types array equal to the type */ swig_module.types[i] = type; } swig_module.types[i] = 0; #ifdef SWIGRUNTIME_DEBUG printf("**** SWIG_InitializeModule: Cast List ******\n"); for (i = 0; i < swig_module.size; ++i) { int j = 0; swig_cast_info *cast = swig_module.cast_initial[i]; printf("SWIG_InitializeModule: type %d %s\n", i, swig_module.type_initial[i]->name); while (cast->type) { printf("SWIG_InitializeModule: cast type %s\n", cast->type->name); cast++; ++j; } printf("---- Total casts: %d\n",j); } printf("**** SWIG_InitializeModule: Cast List ******\n"); #endif } /* This function will propagate the clientdata field of type to * any new swig_type_info structures that have been added into the list * of equivalent types. It is like calling * SWIG_TypeClientData(type, clientdata) a second time. */ SWIGRUNTIME void SWIG_PropagateClientData(void) { size_t i; swig_cast_info *equiv; static int init_run = 0; if (init_run) return; init_run = 1; for (i = 0; i < swig_module.size; i++) { if (swig_module.types[i]->clientdata) { equiv = swig_module.types[i]->cast; while (equiv) { if (!equiv->converter) { if (equiv->type && !equiv->type->clientdata) SWIG_TypeClientData(equiv->type, swig_module.types[i]->clientdata); } equiv = equiv->next; } } } } #ifdef __cplusplus #if 0 { /* c-mode */ #endif } #endif #ifdef __cplusplus extern "C" { #endif /* Python-specific SWIG API */ #define SWIG_newvarlink() SWIG_Python_newvarlink() #define SWIG_addvarlink(p, name, get_attr, set_attr) SWIG_Python_addvarlink(p, name, get_attr, set_attr) #define SWIG_InstallConstants(d, constants) SWIG_Python_InstallConstants(d, constants) /* ----------------------------------------------------------------------------- * global variable support code. * ----------------------------------------------------------------------------- */ typedef struct swig_globalvar { char *name; /* Name of global variable */ PyObject *(*get_attr)(void); /* Return the current value */ int (*set_attr)(PyObject *); /* Set the value */ struct swig_globalvar *next; } swig_globalvar; typedef struct swig_varlinkobject { PyObject_HEAD swig_globalvar *vars; } swig_varlinkobject; SWIGINTERN PyObject * swig_varlink_repr(swig_varlinkobject *SWIGUNUSEDPARM(v)) { #if PY_VERSION_HEX >= 0x03000000 return PyUnicode_InternFromString(""); #else return PyString_FromString(""); #endif } SWIGINTERN PyObject * swig_varlink_str(swig_varlinkobject *v) { #if PY_VERSION_HEX >= 0x03000000 PyObject *str = PyUnicode_InternFromString("("); PyObject *tail; PyObject *joined; swig_globalvar *var; for (var = v->vars; var; var=var->next) { tail = PyUnicode_FromString(var->name); joined = PyUnicode_Concat(str, tail); Py_DecRef(str); Py_DecRef(tail); str = joined; if (var->next) { tail = PyUnicode_InternFromString(", "); joined = PyUnicode_Concat(str, tail); Py_DecRef(str); Py_DecRef(tail); str = joined; } } tail = PyUnicode_InternFromString(")"); joined = PyUnicode_Concat(str, tail); Py_DecRef(str); Py_DecRef(tail); str = joined; #else PyObject *str = PyString_FromString("("); swig_globalvar *var; for (var = v->vars; var; var=var->next) { PyString_ConcatAndDel(&str,PyString_FromString(var->name)); if (var->next) PyString_ConcatAndDel(&str,PyString_FromString(", ")); } PyString_ConcatAndDel(&str,PyString_FromString(")")); #endif return str; } SWIGINTERN int swig_varlink_print(swig_varlinkobject *v, FILE *fp, int SWIGUNUSEDPARM(flags)) { char *tmp; PyObject *str = swig_varlink_str(v); fprintf(fp,"Swig global variables "); fprintf(fp,"%s\n", tmp = SWIG_Python_str_AsChar(str)); SWIG_Python_str_DelForPy3(tmp); Py_DECREF(str); return 0; } SWIGINTERN void swig_varlink_dealloc(swig_varlinkobject *v) { swig_globalvar *var = v->vars; while (var) { swig_globalvar *n = var->next; free(var->name); free(var); var = n; } } SWIGINTERN PyObject * swig_varlink_getattr(swig_varlinkobject *v, char *n) { PyObject *res = NULL; swig_globalvar *var = v->vars; while (var) { if (strcmp(var->name,n) == 0) { res = (*var->get_attr)(); break; } var = var->next; } if (res == NULL && !PyErr_Occurred()) { PyErr_SetString(PyExc_NameError,"Unknown C global variable"); } return res; } SWIGINTERN int swig_varlink_setattr(swig_varlinkobject *v, char *n, PyObject *p) { int res = 1; swig_globalvar *var = v->vars; while (var) { if (strcmp(var->name,n) == 0) { res = (*var->set_attr)(p); break; } var = var->next; } if (res == 1 && !PyErr_Occurred()) { PyErr_SetString(PyExc_NameError,"Unknown C global variable"); } return res; } SWIGINTERN PyTypeObject* swig_varlink_type(void) { static char varlink__doc__[] = "Swig var link object"; static PyTypeObject varlink_type; static int type_init = 0; if (!type_init) { const PyTypeObject tmp = { /* PyObject header changed in Python 3 */ #if PY_VERSION_HEX >= 0x03000000 PyVarObject_HEAD_INIT(&PyType_Type, 0) #else PyObject_HEAD_INIT(NULL) 0, /* Number of items in variable part (ob_size) */ #endif (char *)"swigvarlink", /* Type name (tp_name) */ sizeof(swig_varlinkobject), /* Basic size (tp_basicsize) */ 0, /* Itemsize (tp_itemsize) */ (destructor) swig_varlink_dealloc, /* Deallocator (tp_dealloc) */ (printfunc) swig_varlink_print, /* Print (tp_print) */ (getattrfunc) swig_varlink_getattr, /* get attr (tp_getattr) */ (setattrfunc) swig_varlink_setattr, /* Set attr (tp_setattr) */ 0, /* tp_compare */ (reprfunc) swig_varlink_repr, /* tp_repr */ 0, /* tp_as_number */ 0, /* tp_as_sequence */ 0, /* tp_as_mapping */ 0, /* tp_hash */ 0, /* tp_call */ (reprfunc) swig_varlink_str, /* tp_str */ 0, /* tp_getattro */ 0, /* tp_setattro */ 0, /* tp_as_buffer */ 0, /* tp_flags */ varlink__doc__, /* tp_doc */ 0, /* tp_traverse */ 0, /* tp_clear */ 0, /* tp_richcompare */ 0, /* tp_weaklistoffset */ #if PY_VERSION_HEX >= 0x02020000 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /* tp_iter -> tp_weaklist */ #endif #if PY_VERSION_HEX >= 0x02030000 0, /* tp_del */ #endif #ifdef COUNT_ALLOCS 0,0,0,0 /* tp_alloc -> tp_next */ #endif }; varlink_type = tmp; /* for Python 3 we already assigned ob_type in PyVarObject_HEAD_INIT() */ #if PY_VERSION_HEX < 0x03000000 varlink_type.ob_type = &PyType_Type; #endif type_init = 1; } return &varlink_type; } /* Create a variable linking object for use later */ SWIGINTERN PyObject * SWIG_Python_newvarlink(void) { swig_varlinkobject *result = PyObject_NEW(swig_varlinkobject, swig_varlink_type()); if (result) { result->vars = 0; } return ((PyObject*) result); } SWIGINTERN void SWIG_Python_addvarlink(PyObject *p, char *name, PyObject *(*get_attr)(void), int (*set_attr)(PyObject *p)) { swig_varlinkobject *v = (swig_varlinkobject *) p; swig_globalvar *gv = (swig_globalvar *) malloc(sizeof(swig_globalvar)); if (gv) { size_t size = strlen(name)+1; gv->name = (char *)malloc(size); if (gv->name) { strncpy(gv->name,name,size); gv->get_attr = get_attr; gv->set_attr = set_attr; gv->next = v->vars; } } v->vars = gv; } SWIGINTERN PyObject * SWIG_globals(void) { static PyObject *_SWIG_globals = 0; if (!_SWIG_globals) _SWIG_globals = SWIG_newvarlink(); return _SWIG_globals; } /* ----------------------------------------------------------------------------- * constants/methods manipulation * ----------------------------------------------------------------------------- */ /* Install Constants */ SWIGINTERN void SWIG_Python_InstallConstants(PyObject *d, swig_const_info constants[]) { PyObject *obj = 0; size_t i; for (i = 0; constants[i].type; ++i) { switch(constants[i].type) { case SWIG_PY_POINTER: obj = SWIG_NewPointerObj(constants[i].pvalue, *(constants[i]).ptype,0); break; case SWIG_PY_BINARY: obj = SWIG_NewPackedObj(constants[i].pvalue, constants[i].lvalue, *(constants[i].ptype)); break; default: obj = 0; break; } if (obj) { PyDict_SetItemString(d, constants[i].name, obj); Py_DECREF(obj); } } } /* -----------------------------------------------------------------------------*/ /* Fix SwigMethods to carry the callback ptrs when needed */ /* -----------------------------------------------------------------------------*/ SWIGINTERN void SWIG_Python_FixMethods(PyMethodDef *methods, swig_const_info *const_table, swig_type_info **types, swig_type_info **types_initial) { size_t i; for (i = 0; methods[i].ml_name; ++i) { const char *c = methods[i].ml_doc; if (c && (c = strstr(c, "swig_ptr: "))) { int j; swig_const_info *ci = 0; const char *name = c + 10; for (j = 0; const_table[j].type; ++j) { if (strncmp(const_table[j].name, name, strlen(const_table[j].name)) == 0) { ci = &(const_table[j]); break; } } if (ci) { size_t shift = (ci->ptype) - types; swig_type_info *ty = types_initial[shift]; size_t ldoc = (c - methods[i].ml_doc); size_t lptr = strlen(ty->name)+2*sizeof(void*)+2; char *ndoc = (char*)malloc(ldoc + lptr + 10); if (ndoc) { char *buff = ndoc; void *ptr = (ci->type == SWIG_PY_POINTER) ? ci->pvalue : 0; if (ptr) { strncpy(buff, methods[i].ml_doc, ldoc); buff += ldoc; strncpy(buff, "swig_ptr: ", 10); buff += 10; SWIG_PackVoidPtr(buff, ptr, ty->name, lptr); methods[i].ml_doc = ndoc; } } } } } } #ifdef __cplusplus } #endif /* -----------------------------------------------------------------------------* * Partial Init method * -----------------------------------------------------------------------------*/ #ifdef __cplusplus extern "C" #endif SWIGEXPORT #if PY_VERSION_HEX >= 0x03000000 PyObject* #else void #endif SWIG_init(void) { PyObject *m, *d; #if PY_VERSION_HEX >= 0x03000000 static struct PyModuleDef SWIG_module = { PyModuleDef_HEAD_INIT, (char *) SWIG_name, NULL, -1, SwigMethods, NULL, NULL, NULL, NULL }; #endif /* Fix SwigMethods to carry the callback ptrs when needed */ SWIG_Python_FixMethods(SwigMethods, swig_const_table, swig_types, swig_type_initial); #if PY_VERSION_HEX >= 0x03000000 m = PyModule_Create(&SWIG_module); #else m = Py_InitModule((char *) SWIG_name, SwigMethods); #endif d = PyModule_GetDict(m); SWIG_InitializeModule(0); SWIG_InstallConstants(d,swig_const_table); int argc, ret, i; char **argv = NULL; PyObject *sys = PyImport_ImportModule("sys"); PyObject *pyargv = PyObject_GetAttrString(sys, "argv"); argc = PyObject_Length(pyargv); assert(argc >= 1); assert(PyList_Check(pyargv)); if ( argc + 1 < 0 ) throw PreludeError("Invalid argc length"); argv = (char **) malloc((argc + 1) * sizeof(char *)); if ( ! argv ) throw PreludeError("Allocation failure"); for ( i = 0; i < argc; i++ ) { PyObject *o = PyList_GetItem(pyargv, i); argv[i] = PyString_AsString(o); } argv[i] = NULL; ret = prelude_init(&argc, argv); if ( ret < 0 ) { free(argv); throw PreludeError(ret); } free(argv); Py_DECREF(pyargv); Py_DECREF(sys); SWIG_Python_SetConstant(d, "PreludeLog_DEBUG",SWIG_From_int(static_cast< int >(Prelude::PreludeLog::DEBUG))); SWIG_Python_SetConstant(d, "PreludeLog_INFO",SWIG_From_int(static_cast< int >(Prelude::PreludeLog::INFO))); SWIG_Python_SetConstant(d, "PreludeLog_WARNING",SWIG_From_int(static_cast< int >(Prelude::PreludeLog::WARNING))); SWIG_Python_SetConstant(d, "PreludeLog_ERROR",SWIG_From_int(static_cast< int >(Prelude::PreludeLog::ERROR))); SWIG_Python_SetConstant(d, "PreludeLog_CRITICAL",SWIG_From_int(static_cast< int >(Prelude::PreludeLog::CRITICAL))); SWIG_Python_SetConstant(d, "PreludeLog_QUIET",SWIG_From_int(static_cast< int >(Prelude::PreludeLog::QUIET))); SWIG_Python_SetConstant(d, "PreludeLog_SYSLOG",SWIG_From_int(static_cast< int >(Prelude::PreludeLog::SYSLOG))); SWIG_Python_SetConstant(d, "Client_ASYNC_SEND",SWIG_From_int(static_cast< int >(Prelude::Client::ASYNC_SEND))); SWIG_Python_SetConstant(d, "Client_FLAGS_ASYNC_SEND",SWIG_From_int(static_cast< int >(Prelude::Client::FLAGS_ASYNC_SEND))); SWIG_Python_SetConstant(d, "Client_ASYNC_TIMER",SWIG_From_int(static_cast< int >(Prelude::Client::ASYNC_TIMER))); SWIG_Python_SetConstant(d, "Client_FLAGS_ASYNC_TIMER",SWIG_From_int(static_cast< int >(Prelude::Client::FLAGS_ASYNC_TIMER))); SWIG_Python_SetConstant(d, "Client_HEARTBEAT",SWIG_From_int(static_cast< int >(Prelude::Client::HEARTBEAT))); SWIG_Python_SetConstant(d, "Client_FLAGS_HEARTBEAT",SWIG_From_int(static_cast< int >(Prelude::Client::FLAGS_HEARTBEAT))); SWIG_Python_SetConstant(d, "Client_CONNECT",SWIG_From_int(static_cast< int >(Prelude::Client::CONNECT))); SWIG_Python_SetConstant(d, "Client_FLAGS_CONNECT",SWIG_From_int(static_cast< int >(Prelude::Client::FLAGS_CONNECT))); SWIG_Python_SetConstant(d, "Client_AUTOCONFIG",SWIG_From_int(static_cast< int >(Prelude::Client::AUTOCONFIG))); SWIG_Python_SetConstant(d, "Client_FLAGS_AUTOCONFIG",SWIG_From_int(static_cast< int >(Prelude::Client::FLAGS_AUTOCONFIG))); SWIG_Python_SetConstant(d, "Client_IDMEF_READ",SWIG_From_int(static_cast< int >(Prelude::Client::IDMEF_READ))); SWIG_Python_SetConstant(d, "Client_PERMISSION_IDMEF_READ",SWIG_From_int(static_cast< int >(Prelude::Client::PERMISSION_IDMEF_READ))); SWIG_Python_SetConstant(d, "Client_ADMIN_READ",SWIG_From_int(static_cast< int >(Prelude::Client::ADMIN_READ))); SWIG_Python_SetConstant(d, "Client_PERMISSION_ADMIN_READ",SWIG_From_int(static_cast< int >(Prelude::Client::PERMISSION_ADMIN_READ))); SWIG_Python_SetConstant(d, "Client_IDMEF_WRITE",SWIG_From_int(static_cast< int >(Prelude::Client::IDMEF_WRITE))); SWIG_Python_SetConstant(d, "Client_PERMISSION_IDMEF_WRITE",SWIG_From_int(static_cast< int >(Prelude::Client::PERMISSION_IDMEF_WRITE))); SWIG_Python_SetConstant(d, "Client_ADMIN_WRITE",SWIG_From_int(static_cast< int >(Prelude::Client::ADMIN_WRITE))); SWIG_Python_SetConstant(d, "Client_PERMISSION_ADMIN_WRITE",SWIG_From_int(static_cast< int >(Prelude::Client::PERMISSION_ADMIN_WRITE))); SWIG_Python_SetConstant(d, "IDMEFCriterion_OPERATOR_NOT",SWIG_From_int(static_cast< int >(Prelude::IDMEFCriterion::OPERATOR_NOT))); SWIG_Python_SetConstant(d, "IDMEFCriterion_OPERATOR_NOCASE",SWIG_From_int(static_cast< int >(Prelude::IDMEFCriterion::OPERATOR_NOCASE))); SWIG_Python_SetConstant(d, "IDMEFCriterion_OPERATOR_EQUAL",SWIG_From_int(static_cast< int >(Prelude::IDMEFCriterion::OPERATOR_EQUAL))); SWIG_Python_SetConstant(d, "IDMEFCriterion_OPERATOR_EQUAL_NOCASE",SWIG_From_int(static_cast< int >(Prelude::IDMEFCriterion::OPERATOR_EQUAL_NOCASE))); SWIG_Python_SetConstant(d, "IDMEFCriterion_OPERATOR_NOT_EQUAL",SWIG_From_int(static_cast< int >(Prelude::IDMEFCriterion::OPERATOR_NOT_EQUAL))); SWIG_Python_SetConstant(d, "IDMEFCriterion_OPERATOR_NOT_EQUAL_NOCASE",SWIG_From_int(static_cast< int >(Prelude::IDMEFCriterion::OPERATOR_NOT_EQUAL_NOCASE))); SWIG_Python_SetConstant(d, "IDMEFCriterion_OPERATOR_LESSER",SWIG_From_int(static_cast< int >(Prelude::IDMEFCriterion::OPERATOR_LESSER))); SWIG_Python_SetConstant(d, "IDMEFCriterion_OPERATOR_LESSER_OR_EQUAL",SWIG_From_int(static_cast< int >(Prelude::IDMEFCriterion::OPERATOR_LESSER_OR_EQUAL))); SWIG_Python_SetConstant(d, "IDMEFCriterion_OPERATOR_GREATER",SWIG_From_int(static_cast< int >(Prelude::IDMEFCriterion::OPERATOR_GREATER))); SWIG_Python_SetConstant(d, "IDMEFCriterion_OPERATOR_GREATER_OR_EQUAL",SWIG_From_int(static_cast< int >(Prelude::IDMEFCriterion::OPERATOR_GREATER_OR_EQUAL))); SWIG_Python_SetConstant(d, "IDMEFCriterion_OPERATOR_SUBSTR",SWIG_From_int(static_cast< int >(Prelude::IDMEFCriterion::OPERATOR_SUBSTR))); SWIG_Python_SetConstant(d, "IDMEFCriterion_OPERATOR_SUBSTR_NOCASE",SWIG_From_int(static_cast< int >(Prelude::IDMEFCriterion::OPERATOR_SUBSTR_NOCASE))); SWIG_Python_SetConstant(d, "IDMEFCriterion_OPERATOR_NOT_SUBSTR",SWIG_From_int(static_cast< int >(Prelude::IDMEFCriterion::OPERATOR_NOT_SUBSTR))); SWIG_Python_SetConstant(d, "IDMEFCriterion_OPERATOR_NOT_SUBSTR_NOCASE",SWIG_From_int(static_cast< int >(Prelude::IDMEFCriterion::OPERATOR_NOT_SUBSTR_NOCASE))); SWIG_Python_SetConstant(d, "IDMEFCriterion_OPERATOR_REGEX",SWIG_From_int(static_cast< int >(Prelude::IDMEFCriterion::OPERATOR_REGEX))); SWIG_Python_SetConstant(d, "IDMEFCriterion_OPERATOR_REGEX_NOCASE",SWIG_From_int(static_cast< int >(Prelude::IDMEFCriterion::OPERATOR_REGEX_NOCASE))); SWIG_Python_SetConstant(d, "IDMEFCriterion_OPERATOR_NOT_REGEX",SWIG_From_int(static_cast< int >(Prelude::IDMEFCriterion::OPERATOR_NOT_REGEX))); SWIG_Python_SetConstant(d, "IDMEFCriterion_OPERATOR_NOT_REGEX_NOCASE",SWIG_From_int(static_cast< int >(Prelude::IDMEFCriterion::OPERATOR_NOT_REGEX_NOCASE))); SWIG_Python_SetConstant(d, "IDMEFCriterion_OPERATOR_NULL",SWIG_From_int(static_cast< int >(Prelude::IDMEFCriterion::OPERATOR_NULL))); SWIG_Python_SetConstant(d, "IDMEFCriterion_OPERATOR_NOT_NULL",SWIG_From_int(static_cast< int >(Prelude::IDMEFCriterion::OPERATOR_NOT_NULL))); #if PY_VERSION_HEX >= 0x03000000 return m; #else return; #endif } libprelude-1.0.0/bindings/python/Makefile.am0000664000076400007640000000145211227305706015751 00000000000000if HAVE_EASY_BINDINGS if HAVE_PYTHON EXTRA_DIST = libpreludecpp-python.i PreludeEasy.py _PreludeEasy.cxx all-am: python-build python-build: _PreludeEasy.cxx CC="$(CXX)" $(PYTHON) setup.py build install-exec-hook: $(PYTHON) setup.py install `test -n "$(DESTDIR)" && echo --root $(DESTDIR)` uninstall-hook: $(PYTHON) setup.py uninstall `test -n "$(DESTDIR)" && echo --root $(DESTDIR)` clean-local: $(PYTHON) setup.py clean -a _PreludeEasy.cxx PreludeEasy.py: $(top_srcdir)/bindings/c++/include/*.hxx $(top_srcdir)/bindings/libpreludecpp.i libpreludecpp-python.i if HAVE_SWIG $(SWIG) -c++ -I$(top_srcdir)/bindings -I$(top_srcdir)/bindings/c++/include -I$(top_srcdir)/src/include -I$(top_srcdir)/src/libprelude-error -python -o $@ ../libpreludecpp.i endif endif endif -include $(top_srcdir)/git.mk libprelude-1.0.0/bindings/python/Makefile.in0000664000076400007640000012632411347714454015777 00000000000000# Makefile.in generated by automake 1.11.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, # Inc. # This Makefile.in 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. @SET_MAKE@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ target_triplet = @target@ subdir = bindings/python DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in \ $(srcdir)/setup.py.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/libmissing/m4/00gnulib.m4 \ $(top_srcdir)/libmissing/m4/alloca.m4 \ $(top_srcdir)/libmissing/m4/arpa_inet_h.m4 \ $(top_srcdir)/libmissing/m4/btowc.m4 \ $(top_srcdir)/libmissing/m4/close.m4 \ $(top_srcdir)/libmissing/m4/codeset.m4 \ $(top_srcdir)/libmissing/m4/cond.m4 \ $(top_srcdir)/libmissing/m4/dos.m4 \ $(top_srcdir)/libmissing/m4/dup2.m4 \ $(top_srcdir)/libmissing/m4/errno_h.m4 \ $(top_srcdir)/libmissing/m4/exponentd.m4 \ $(top_srcdir)/libmissing/m4/exponentf.m4 \ $(top_srcdir)/libmissing/m4/exponentl.m4 \ $(top_srcdir)/libmissing/m4/extensions.m4 \ $(top_srcdir)/libmissing/m4/fclose.m4 \ $(top_srcdir)/libmissing/m4/fcntl-o.m4 \ $(top_srcdir)/libmissing/m4/fcntl_h.m4 \ $(top_srcdir)/libmissing/m4/float_h.m4 \ $(top_srcdir)/libmissing/m4/fopen.m4 \ $(top_srcdir)/libmissing/m4/fpieee.m4 \ $(top_srcdir)/libmissing/m4/frexp.m4 \ $(top_srcdir)/libmissing/m4/frexpl.m4 \ $(top_srcdir)/libmissing/m4/fseeko.m4 \ $(top_srcdir)/libmissing/m4/ftw.m4 \ $(top_srcdir)/libmissing/m4/getaddrinfo.m4 \ $(top_srcdir)/libmissing/m4/getdelim.m4 \ $(top_srcdir)/libmissing/m4/gethostname.m4 \ $(top_srcdir)/libmissing/m4/getline.m4 \ $(top_srcdir)/libmissing/m4/getpagesize.m4 \ $(top_srcdir)/libmissing/m4/getpass.m4 \ $(top_srcdir)/libmissing/m4/gettimeofday.m4 \ $(top_srcdir)/libmissing/m4/glibc21.m4 \ $(top_srcdir)/libmissing/m4/gnulib-common.m4 \ $(top_srcdir)/libmissing/m4/gnulib-comp.m4 \ $(top_srcdir)/libmissing/m4/gnulib-tool.m4 \ $(top_srcdir)/libmissing/m4/hostent.m4 \ $(top_srcdir)/libmissing/m4/include_next.m4 \ $(top_srcdir)/libmissing/m4/inet_ntop.m4 \ $(top_srcdir)/libmissing/m4/inet_pton.m4 \ $(top_srcdir)/libmissing/m4/intmax_t.m4 \ $(top_srcdir)/libmissing/m4/inttypes_h.m4 \ $(top_srcdir)/libmissing/m4/isnand.m4 \ $(top_srcdir)/libmissing/m4/isnanf.m4 \ $(top_srcdir)/libmissing/m4/isnanl.m4 \ $(top_srcdir)/libmissing/m4/langinfo_h.m4 \ $(top_srcdir)/libmissing/m4/ldexpl.m4 \ $(top_srcdir)/libmissing/m4/lib-ld.m4 \ $(top_srcdir)/libmissing/m4/lib-link.m4 \ $(top_srcdir)/libmissing/m4/lib-prefix.m4 \ $(top_srcdir)/libmissing/m4/localcharset.m4 \ $(top_srcdir)/libmissing/m4/locale-fr.m4 \ $(top_srcdir)/libmissing/m4/locale-ja.m4 \ $(top_srcdir)/libmissing/m4/locale-tr.m4 \ $(top_srcdir)/libmissing/m4/locale-zh.m4 \ $(top_srcdir)/libmissing/m4/lock.m4 \ $(top_srcdir)/libmissing/m4/longlong.m4 \ $(top_srcdir)/libmissing/m4/lseek.m4 \ $(top_srcdir)/libmissing/m4/lstat.m4 \ $(top_srcdir)/libmissing/m4/malloc.m4 \ $(top_srcdir)/libmissing/m4/math_h.m4 \ $(top_srcdir)/libmissing/m4/mbrtowc.m4 \ $(top_srcdir)/libmissing/m4/mbsinit.m4 \ $(top_srcdir)/libmissing/m4/mbstate_t.m4 \ $(top_srcdir)/libmissing/m4/memchr.m4 \ $(top_srcdir)/libmissing/m4/memmem.m4 \ $(top_srcdir)/libmissing/m4/minmax.m4 \ $(top_srcdir)/libmissing/m4/mktime.m4 \ $(top_srcdir)/libmissing/m4/mmap-anon.m4 \ $(top_srcdir)/libmissing/m4/mode_t.m4 \ $(top_srcdir)/libmissing/m4/multiarch.m4 \ $(top_srcdir)/libmissing/m4/netdb_h.m4 \ $(top_srcdir)/libmissing/m4/netinet_in_h.m4 \ $(top_srcdir)/libmissing/m4/nl_langinfo.m4 \ $(top_srcdir)/libmissing/m4/nocrash.m4 \ $(top_srcdir)/libmissing/m4/onceonly.m4 \ $(top_srcdir)/libmissing/m4/open.m4 \ $(top_srcdir)/libmissing/m4/pathmax.m4 \ $(top_srcdir)/libmissing/m4/perror.m4 \ $(top_srcdir)/libmissing/m4/poll.m4 \ $(top_srcdir)/libmissing/m4/printf-frexp.m4 \ $(top_srcdir)/libmissing/m4/printf-frexpl.m4 \ $(top_srcdir)/libmissing/m4/printf.m4 \ $(top_srcdir)/libmissing/m4/realloc.m4 \ $(top_srcdir)/libmissing/m4/regex.m4 \ $(top_srcdir)/libmissing/m4/relocatable-lib.m4 \ $(top_srcdir)/libmissing/m4/select.m4 \ $(top_srcdir)/libmissing/m4/servent.m4 \ $(top_srcdir)/libmissing/m4/signal_h.m4 \ $(top_srcdir)/libmissing/m4/signalblocking.m4 \ $(top_srcdir)/libmissing/m4/signbit.m4 \ $(top_srcdir)/libmissing/m4/size_max.m4 \ $(top_srcdir)/libmissing/m4/sleep.m4 \ $(top_srcdir)/libmissing/m4/snprintf-posix.m4 \ $(top_srcdir)/libmissing/m4/snprintf.m4 \ $(top_srcdir)/libmissing/m4/sockets.m4 \ $(top_srcdir)/libmissing/m4/socklen.m4 \ $(top_srcdir)/libmissing/m4/sockpfaf.m4 \ $(top_srcdir)/libmissing/m4/ssize_t.m4 \ $(top_srcdir)/libmissing/m4/stat.m4 \ $(top_srcdir)/libmissing/m4/stdbool.m4 \ $(top_srcdir)/libmissing/m4/stddef_h.m4 \ $(top_srcdir)/libmissing/m4/stdint.m4 \ $(top_srcdir)/libmissing/m4/stdint_h.m4 \ $(top_srcdir)/libmissing/m4/stdio_h.m4 \ $(top_srcdir)/libmissing/m4/stdlib_h.m4 \ $(top_srcdir)/libmissing/m4/strcase.m4 \ $(top_srcdir)/libmissing/m4/strcasestr.m4 \ $(top_srcdir)/libmissing/m4/strdup.m4 \ $(top_srcdir)/libmissing/m4/strerror.m4 \ $(top_srcdir)/libmissing/m4/string_h.m4 \ $(top_srcdir)/libmissing/m4/strings_h.m4 \ $(top_srcdir)/libmissing/m4/strndup.m4 \ $(top_srcdir)/libmissing/m4/strnlen.m4 \ $(top_srcdir)/libmissing/m4/strptime.m4 \ $(top_srcdir)/libmissing/m4/strsep.m4 \ $(top_srcdir)/libmissing/m4/symlink.m4 \ $(top_srcdir)/libmissing/m4/sys_ioctl_h.m4 \ $(top_srcdir)/libmissing/m4/sys_select_h.m4 \ $(top_srcdir)/libmissing/m4/sys_socket_h.m4 \ $(top_srcdir)/libmissing/m4/sys_stat_h.m4 \ $(top_srcdir)/libmissing/m4/sys_time_h.m4 \ $(top_srcdir)/libmissing/m4/sys_utsname_h.m4 \ $(top_srcdir)/libmissing/m4/thread.m4 \ $(top_srcdir)/libmissing/m4/threadlib.m4 \ $(top_srcdir)/libmissing/m4/time_h.m4 \ $(top_srcdir)/libmissing/m4/time_r.m4 \ $(top_srcdir)/libmissing/m4/timegm.m4 \ $(top_srcdir)/libmissing/m4/tls.m4 \ $(top_srcdir)/libmissing/m4/tm_gmtoff.m4 \ $(top_srcdir)/libmissing/m4/uname.m4 \ $(top_srcdir)/libmissing/m4/ungetc.m4 \ $(top_srcdir)/libmissing/m4/unistd_h.m4 \ $(top_srcdir)/libmissing/m4/vasnprintf.m4 \ $(top_srcdir)/libmissing/m4/vsnprintf-posix.m4 \ $(top_srcdir)/libmissing/m4/vsnprintf.m4 \ $(top_srcdir)/libmissing/m4/warn-on-use.m4 \ $(top_srcdir)/libmissing/m4/wchar.m4 \ $(top_srcdir)/libmissing/m4/wchar_t.m4 \ $(top_srcdir)/libmissing/m4/wcrtomb.m4 \ $(top_srcdir)/libmissing/m4/wctob.m4 \ $(top_srcdir)/libmissing/m4/wctype.m4 \ $(top_srcdir)/libmissing/m4/wint_t.m4 \ $(top_srcdir)/libmissing/m4/write.m4 \ $(top_srcdir)/libmissing/m4/xsize.m4 \ $(top_srcdir)/libmissing/m4/yield.m4 \ $(top_srcdir)/m4/ac_compile_check_sizeof.m4 \ $(top_srcdir)/m4/am_path_ruby.m4 $(top_srcdir)/m4/argz.m4 \ $(top_srcdir)/m4/as-ac-expand.m4 \ $(top_srcdir)/m4/ax_c_check_flag.m4 \ $(top_srcdir)/m4/ax_check_aligned_access_required.m4 \ $(top_srcdir)/m4/ax_create_prelude_inttypes_h.m4 \ $(top_srcdir)/m4/ax_ld_check_flag.m4 \ $(top_srcdir)/m4/gtk-doc.m4 $(top_srcdir)/m4/libgcrypt.m4 \ $(top_srcdir)/m4/libgnutls-extra.m4 \ $(top_srcdir)/m4/libgnutls.m4 $(top_srcdir)/m4/libtool.m4 \ $(top_srcdir)/m4/ltdl.m4 $(top_srcdir)/m4/ltoptions.m4 \ $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/m4/pkg.m4 \ $(top_srcdir)/configure.in am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = setup.py CONFIG_CLEAN_VPATH_FILES = SOURCES = DIST_SOURCES = DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ ALLOCA = @ALLOCA@ ALLOCA_H = @ALLOCA_H@ AMTAR = @AMTAR@ APPLE_UNIVERSAL_BUILD = @APPLE_UNIVERSAL_BUILD@ AR = @AR@ ARGZ_H = @ARGZ_H@ AS = @AS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ BINDINGS_CC = @BINDINGS_CC@ BINDIR = @BINDIR@ BITSIZEOF_PTRDIFF_T = @BITSIZEOF_PTRDIFF_T@ BITSIZEOF_SIG_ATOMIC_T = @BITSIZEOF_SIG_ATOMIC_T@ BITSIZEOF_SIZE_T = @BITSIZEOF_SIZE_T@ BITSIZEOF_WCHAR_T = @BITSIZEOF_WCHAR_T@ BITSIZEOF_WINT_T = @BITSIZEOF_WINT_T@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CC_FOR_BUILD = @CC_FOR_BUILD@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EMULTIHOP_HIDDEN = @EMULTIHOP_HIDDEN@ EMULTIHOP_VALUE = @EMULTIHOP_VALUE@ ENOLINK_HIDDEN = @ENOLINK_HIDDEN@ ENOLINK_VALUE = @ENOLINK_VALUE@ EOVERFLOW_HIDDEN = @EOVERFLOW_HIDDEN@ EOVERFLOW_VALUE = @EOVERFLOW_VALUE@ ERRNO_H = @ERRNO_H@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ FLOAT_H = @FLOAT_H@ GETADDRINFO_LIB = @GETADDRINFO_LIB@ GETHOSTNAME_LIB = @GETHOSTNAME_LIB@ GLIBC21 = @GLIBC21@ GNULIB_ACCEPT = @GNULIB_ACCEPT@ GNULIB_ACCEPT4 = @GNULIB_ACCEPT4@ GNULIB_ACOSL = @GNULIB_ACOSL@ GNULIB_ASINL = @GNULIB_ASINL@ GNULIB_ATANL = @GNULIB_ATANL@ GNULIB_ATOLL = @GNULIB_ATOLL@ GNULIB_BIND = @GNULIB_BIND@ GNULIB_BTOWC = @GNULIB_BTOWC@ GNULIB_CALLOC_POSIX = @GNULIB_CALLOC_POSIX@ GNULIB_CANONICALIZE_FILE_NAME = @GNULIB_CANONICALIZE_FILE_NAME@ GNULIB_CEILF = @GNULIB_CEILF@ GNULIB_CEILL = @GNULIB_CEILL@ GNULIB_CHOWN = @GNULIB_CHOWN@ GNULIB_CLOSE = @GNULIB_CLOSE@ GNULIB_CONNECT = @GNULIB_CONNECT@ GNULIB_COSL = @GNULIB_COSL@ GNULIB_DPRINTF = @GNULIB_DPRINTF@ GNULIB_DUP2 = @GNULIB_DUP2@ GNULIB_DUP3 = @GNULIB_DUP3@ GNULIB_ENVIRON = @GNULIB_ENVIRON@ GNULIB_EUIDACCESS = @GNULIB_EUIDACCESS@ GNULIB_EXPL = @GNULIB_EXPL@ GNULIB_FACCESSAT = @GNULIB_FACCESSAT@ GNULIB_FCHDIR = @GNULIB_FCHDIR@ GNULIB_FCHMODAT = @GNULIB_FCHMODAT@ GNULIB_FCHOWNAT = @GNULIB_FCHOWNAT@ GNULIB_FCLOSE = @GNULIB_FCLOSE@ GNULIB_FCNTL = @GNULIB_FCNTL@ GNULIB_FFLUSH = @GNULIB_FFLUSH@ GNULIB_FLOORF = @GNULIB_FLOORF@ GNULIB_FLOORL = @GNULIB_FLOORL@ GNULIB_FOPEN = @GNULIB_FOPEN@ GNULIB_FPRINTF = @GNULIB_FPRINTF@ GNULIB_FPRINTF_POSIX = @GNULIB_FPRINTF_POSIX@ GNULIB_FPURGE = @GNULIB_FPURGE@ GNULIB_FPUTC = @GNULIB_FPUTC@ GNULIB_FPUTS = @GNULIB_FPUTS@ GNULIB_FREOPEN = @GNULIB_FREOPEN@ GNULIB_FREXP = @GNULIB_FREXP@ GNULIB_FREXPL = @GNULIB_FREXPL@ GNULIB_FSEEK = @GNULIB_FSEEK@ GNULIB_FSEEKO = @GNULIB_FSEEKO@ GNULIB_FSTATAT = @GNULIB_FSTATAT@ GNULIB_FSYNC = @GNULIB_FSYNC@ GNULIB_FTELL = @GNULIB_FTELL@ GNULIB_FTELLO = @GNULIB_FTELLO@ GNULIB_FTRUNCATE = @GNULIB_FTRUNCATE@ GNULIB_FUTIMENS = @GNULIB_FUTIMENS@ GNULIB_FWRITE = @GNULIB_FWRITE@ GNULIB_GETADDRINFO = @GNULIB_GETADDRINFO@ GNULIB_GETCWD = @GNULIB_GETCWD@ GNULIB_GETDELIM = @GNULIB_GETDELIM@ GNULIB_GETDOMAINNAME = @GNULIB_GETDOMAINNAME@ GNULIB_GETDTABLESIZE = @GNULIB_GETDTABLESIZE@ GNULIB_GETGROUPS = @GNULIB_GETGROUPS@ GNULIB_GETHOSTNAME = @GNULIB_GETHOSTNAME@ GNULIB_GETLINE = @GNULIB_GETLINE@ GNULIB_GETLOADAVG = @GNULIB_GETLOADAVG@ GNULIB_GETLOGIN = @GNULIB_GETLOGIN@ GNULIB_GETLOGIN_R = @GNULIB_GETLOGIN_R@ GNULIB_GETPAGESIZE = @GNULIB_GETPAGESIZE@ GNULIB_GETPEERNAME = @GNULIB_GETPEERNAME@ GNULIB_GETSOCKNAME = @GNULIB_GETSOCKNAME@ GNULIB_GETSOCKOPT = @GNULIB_GETSOCKOPT@ GNULIB_GETSUBOPT = @GNULIB_GETSUBOPT@ GNULIB_GETTIMEOFDAY = @GNULIB_GETTIMEOFDAY@ GNULIB_GETUSERSHELL = @GNULIB_GETUSERSHELL@ GNULIB_INET_NTOP = @GNULIB_INET_NTOP@ GNULIB_INET_PTON = @GNULIB_INET_PTON@ GNULIB_IOCTL = @GNULIB_IOCTL@ GNULIB_ISFINITE = @GNULIB_ISFINITE@ GNULIB_ISINF = @GNULIB_ISINF@ GNULIB_ISNAN = @GNULIB_ISNAN@ GNULIB_ISNAND = @GNULIB_ISNAND@ GNULIB_ISNANF = @GNULIB_ISNANF@ GNULIB_ISNANL = @GNULIB_ISNANL@ GNULIB_LCHMOD = @GNULIB_LCHMOD@ GNULIB_LCHOWN = @GNULIB_LCHOWN@ GNULIB_LDEXPL = @GNULIB_LDEXPL@ GNULIB_LINK = @GNULIB_LINK@ GNULIB_LINKAT = @GNULIB_LINKAT@ GNULIB_LISTEN = @GNULIB_LISTEN@ GNULIB_LOGL = @GNULIB_LOGL@ GNULIB_LSEEK = @GNULIB_LSEEK@ GNULIB_LSTAT = @GNULIB_LSTAT@ GNULIB_MALLOC_POSIX = @GNULIB_MALLOC_POSIX@ GNULIB_MBRLEN = @GNULIB_MBRLEN@ GNULIB_MBRTOWC = @GNULIB_MBRTOWC@ GNULIB_MBSCASECMP = @GNULIB_MBSCASECMP@ GNULIB_MBSCASESTR = @GNULIB_MBSCASESTR@ GNULIB_MBSCHR = @GNULIB_MBSCHR@ GNULIB_MBSCSPN = @GNULIB_MBSCSPN@ GNULIB_MBSINIT = @GNULIB_MBSINIT@ GNULIB_MBSLEN = @GNULIB_MBSLEN@ GNULIB_MBSNCASECMP = @GNULIB_MBSNCASECMP@ GNULIB_MBSNLEN = @GNULIB_MBSNLEN@ GNULIB_MBSNRTOWCS = @GNULIB_MBSNRTOWCS@ GNULIB_MBSPBRK = @GNULIB_MBSPBRK@ GNULIB_MBSPCASECMP = @GNULIB_MBSPCASECMP@ GNULIB_MBSRCHR = @GNULIB_MBSRCHR@ GNULIB_MBSRTOWCS = @GNULIB_MBSRTOWCS@ GNULIB_MBSSEP = @GNULIB_MBSSEP@ GNULIB_MBSSPN = @GNULIB_MBSSPN@ GNULIB_MBSSTR = @GNULIB_MBSSTR@ GNULIB_MBSTOK_R = @GNULIB_MBSTOK_R@ GNULIB_MEMCHR = @GNULIB_MEMCHR@ GNULIB_MEMMEM = @GNULIB_MEMMEM@ GNULIB_MEMPCPY = @GNULIB_MEMPCPY@ GNULIB_MEMRCHR = @GNULIB_MEMRCHR@ GNULIB_MKDIRAT = @GNULIB_MKDIRAT@ GNULIB_MKDTEMP = @GNULIB_MKDTEMP@ GNULIB_MKFIFO = @GNULIB_MKFIFO@ GNULIB_MKFIFOAT = @GNULIB_MKFIFOAT@ GNULIB_MKNOD = @GNULIB_MKNOD@ GNULIB_MKNODAT = @GNULIB_MKNODAT@ GNULIB_MKOSTEMP = @GNULIB_MKOSTEMP@ GNULIB_MKOSTEMPS = @GNULIB_MKOSTEMPS@ GNULIB_MKSTEMP = @GNULIB_MKSTEMP@ GNULIB_MKSTEMPS = @GNULIB_MKSTEMPS@ GNULIB_NL_LANGINFO = @GNULIB_NL_LANGINFO@ GNULIB_OBSTACK_PRINTF = @GNULIB_OBSTACK_PRINTF@ GNULIB_OBSTACK_PRINTF_POSIX = @GNULIB_OBSTACK_PRINTF_POSIX@ GNULIB_OPEN = @GNULIB_OPEN@ GNULIB_OPENAT = @GNULIB_OPENAT@ GNULIB_PERROR = @GNULIB_PERROR@ GNULIB_PIPE2 = @GNULIB_PIPE2@ GNULIB_POPEN = @GNULIB_POPEN@ GNULIB_PREAD = @GNULIB_PREAD@ GNULIB_PRINTF = @GNULIB_PRINTF@ GNULIB_PRINTF_POSIX = @GNULIB_PRINTF_POSIX@ GNULIB_PUTC = @GNULIB_PUTC@ GNULIB_PUTCHAR = @GNULIB_PUTCHAR@ GNULIB_PUTENV = @GNULIB_PUTENV@ GNULIB_PUTS = @GNULIB_PUTS@ GNULIB_RANDOM_R = @GNULIB_RANDOM_R@ GNULIB_RAWMEMCHR = @GNULIB_RAWMEMCHR@ GNULIB_READLINK = @GNULIB_READLINK@ GNULIB_READLINKAT = @GNULIB_READLINKAT@ GNULIB_REALLOC_POSIX = @GNULIB_REALLOC_POSIX@ GNULIB_REALPATH = @GNULIB_REALPATH@ GNULIB_RECV = @GNULIB_RECV@ GNULIB_RECVFROM = @GNULIB_RECVFROM@ GNULIB_REMOVE = @GNULIB_REMOVE@ GNULIB_RENAME = @GNULIB_RENAME@ GNULIB_RENAMEAT = @GNULIB_RENAMEAT@ GNULIB_RMDIR = @GNULIB_RMDIR@ GNULIB_ROUND = @GNULIB_ROUND@ GNULIB_ROUNDF = @GNULIB_ROUNDF@ GNULIB_ROUNDL = @GNULIB_ROUNDL@ GNULIB_RPMATCH = @GNULIB_RPMATCH@ GNULIB_SELECT = @GNULIB_SELECT@ GNULIB_SEND = @GNULIB_SEND@ GNULIB_SENDTO = @GNULIB_SENDTO@ GNULIB_SETENV = @GNULIB_SETENV@ GNULIB_SETSOCKOPT = @GNULIB_SETSOCKOPT@ GNULIB_SHUTDOWN = @GNULIB_SHUTDOWN@ GNULIB_SIGACTION = @GNULIB_SIGACTION@ GNULIB_SIGNAL_H_SIGPIPE = @GNULIB_SIGNAL_H_SIGPIPE@ GNULIB_SIGNBIT = @GNULIB_SIGNBIT@ GNULIB_SIGPROCMASK = @GNULIB_SIGPROCMASK@ GNULIB_SINL = @GNULIB_SINL@ GNULIB_SLEEP = @GNULIB_SLEEP@ GNULIB_SNPRINTF = @GNULIB_SNPRINTF@ GNULIB_SOCKET = @GNULIB_SOCKET@ GNULIB_SPRINTF_POSIX = @GNULIB_SPRINTF_POSIX@ GNULIB_SQRTL = @GNULIB_SQRTL@ GNULIB_STAT = @GNULIB_STAT@ GNULIB_STDIO_H_SIGPIPE = @GNULIB_STDIO_H_SIGPIPE@ GNULIB_STPCPY = @GNULIB_STPCPY@ GNULIB_STPNCPY = @GNULIB_STPNCPY@ GNULIB_STRCASESTR = @GNULIB_STRCASESTR@ GNULIB_STRCHRNUL = @GNULIB_STRCHRNUL@ GNULIB_STRDUP = @GNULIB_STRDUP@ GNULIB_STRERROR = @GNULIB_STRERROR@ GNULIB_STRNDUP = @GNULIB_STRNDUP@ GNULIB_STRNLEN = @GNULIB_STRNLEN@ GNULIB_STRPBRK = @GNULIB_STRPBRK@ GNULIB_STRSEP = @GNULIB_STRSEP@ GNULIB_STRSIGNAL = @GNULIB_STRSIGNAL@ GNULIB_STRSTR = @GNULIB_STRSTR@ GNULIB_STRTOD = @GNULIB_STRTOD@ GNULIB_STRTOK_R = @GNULIB_STRTOK_R@ GNULIB_STRTOLL = @GNULIB_STRTOLL@ GNULIB_STRTOULL = @GNULIB_STRTOULL@ GNULIB_STRVERSCMP = @GNULIB_STRVERSCMP@ GNULIB_SYMLINK = @GNULIB_SYMLINK@ GNULIB_SYMLINKAT = @GNULIB_SYMLINKAT@ GNULIB_TANL = @GNULIB_TANL@ GNULIB_TRUNC = @GNULIB_TRUNC@ GNULIB_TRUNCF = @GNULIB_TRUNCF@ GNULIB_TRUNCL = @GNULIB_TRUNCL@ GNULIB_UNAME = @GNULIB_UNAME@ GNULIB_UNISTD_H_GETOPT = @GNULIB_UNISTD_H_GETOPT@ GNULIB_UNISTD_H_SIGPIPE = @GNULIB_UNISTD_H_SIGPIPE@ GNULIB_UNLINK = @GNULIB_UNLINK@ GNULIB_UNLINKAT = @GNULIB_UNLINKAT@ GNULIB_UNSETENV = @GNULIB_UNSETENV@ GNULIB_USLEEP = @GNULIB_USLEEP@ GNULIB_UTIMENSAT = @GNULIB_UTIMENSAT@ GNULIB_VASPRINTF = @GNULIB_VASPRINTF@ GNULIB_VDPRINTF = @GNULIB_VDPRINTF@ GNULIB_VFPRINTF = @GNULIB_VFPRINTF@ GNULIB_VFPRINTF_POSIX = @GNULIB_VFPRINTF_POSIX@ GNULIB_VPRINTF = @GNULIB_VPRINTF@ GNULIB_VPRINTF_POSIX = @GNULIB_VPRINTF_POSIX@ GNULIB_VSNPRINTF = @GNULIB_VSNPRINTF@ GNULIB_VSPRINTF_POSIX = @GNULIB_VSPRINTF_POSIX@ GNULIB_WCRTOMB = @GNULIB_WCRTOMB@ GNULIB_WCSNRTOMBS = @GNULIB_WCSNRTOMBS@ GNULIB_WCSRTOMBS = @GNULIB_WCSRTOMBS@ GNULIB_WCTOB = @GNULIB_WCTOB@ GNULIB_WCWIDTH = @GNULIB_WCWIDTH@ GNULIB_WRITE = @GNULIB_WRITE@ GREP = @GREP@ GTKDOC_CHECK = @GTKDOC_CHECK@ HAVE_ACCEPT4 = @HAVE_ACCEPT4@ HAVE_ACOSL = @HAVE_ACOSL@ HAVE_ARPA_INET_H = @HAVE_ARPA_INET_H@ HAVE_ASINL = @HAVE_ASINL@ HAVE_ATANL = @HAVE_ATANL@ HAVE_ATOLL = @HAVE_ATOLL@ HAVE_BTOWC = @HAVE_BTOWC@ HAVE_CALLOC_POSIX = @HAVE_CALLOC_POSIX@ HAVE_CANONICALIZE_FILE_NAME = @HAVE_CANONICALIZE_FILE_NAME@ HAVE_CHOWN = @HAVE_CHOWN@ HAVE_COSL = @HAVE_COSL@ HAVE_CXX = @HAVE_CXX@ HAVE_DECL_ACOSL = @HAVE_DECL_ACOSL@ HAVE_DECL_ASINL = @HAVE_DECL_ASINL@ HAVE_DECL_ATANL = @HAVE_DECL_ATANL@ HAVE_DECL_COSL = @HAVE_DECL_COSL@ HAVE_DECL_ENVIRON = @HAVE_DECL_ENVIRON@ HAVE_DECL_EXPL = @HAVE_DECL_EXPL@ HAVE_DECL_FPURGE = @HAVE_DECL_FPURGE@ HAVE_DECL_FREEADDRINFO = @HAVE_DECL_FREEADDRINFO@ HAVE_DECL_FREXPL = @HAVE_DECL_FREXPL@ HAVE_DECL_GAI_STRERROR = @HAVE_DECL_GAI_STRERROR@ HAVE_DECL_GETADDRINFO = @HAVE_DECL_GETADDRINFO@ HAVE_DECL_GETDELIM = @HAVE_DECL_GETDELIM@ HAVE_DECL_GETLINE = @HAVE_DECL_GETLINE@ HAVE_DECL_GETLOADAVG = @HAVE_DECL_GETLOADAVG@ HAVE_DECL_GETLOGIN_R = @HAVE_DECL_GETLOGIN_R@ HAVE_DECL_GETNAMEINFO = @HAVE_DECL_GETNAMEINFO@ HAVE_DECL_INET_NTOP = @HAVE_DECL_INET_NTOP@ HAVE_DECL_INET_PTON = @HAVE_DECL_INET_PTON@ HAVE_DECL_LDEXPL = @HAVE_DECL_LDEXPL@ HAVE_DECL_LOGL = @HAVE_DECL_LOGL@ HAVE_DECL_MEMMEM = @HAVE_DECL_MEMMEM@ HAVE_DECL_MEMRCHR = @HAVE_DECL_MEMRCHR@ HAVE_DECL_OBSTACK_PRINTF = @HAVE_DECL_OBSTACK_PRINTF@ HAVE_DECL_SINL = @HAVE_DECL_SINL@ HAVE_DECL_SNPRINTF = @HAVE_DECL_SNPRINTF@ HAVE_DECL_SQRTL = @HAVE_DECL_SQRTL@ HAVE_DECL_STRDUP = @HAVE_DECL_STRDUP@ HAVE_DECL_STRERROR = @HAVE_DECL_STRERROR@ HAVE_DECL_STRNCASECMP = @HAVE_DECL_STRNCASECMP@ HAVE_DECL_STRNDUP = @HAVE_DECL_STRNDUP@ HAVE_DECL_STRNLEN = @HAVE_DECL_STRNLEN@ HAVE_DECL_STRSIGNAL = @HAVE_DECL_STRSIGNAL@ HAVE_DECL_STRTOK_R = @HAVE_DECL_STRTOK_R@ HAVE_DECL_TANL = @HAVE_DECL_TANL@ HAVE_DECL_TRUNC = @HAVE_DECL_TRUNC@ HAVE_DECL_TRUNCF = @HAVE_DECL_TRUNCF@ HAVE_DECL_VSNPRINTF = @HAVE_DECL_VSNPRINTF@ HAVE_DECL_WCTOB = @HAVE_DECL_WCTOB@ HAVE_DECL_WCWIDTH = @HAVE_DECL_WCWIDTH@ HAVE_DPRINTF = @HAVE_DPRINTF@ HAVE_DUP2 = @HAVE_DUP2@ HAVE_DUP3 = @HAVE_DUP3@ HAVE_EUIDACCESS = @HAVE_EUIDACCESS@ HAVE_EXPL = @HAVE_EXPL@ HAVE_FACCESSAT = @HAVE_FACCESSAT@ HAVE_FCHMODAT = @HAVE_FCHMODAT@ HAVE_FCHOWNAT = @HAVE_FCHOWNAT@ HAVE_FCNTL = @HAVE_FCNTL@ HAVE_FSTATAT = @HAVE_FSTATAT@ HAVE_FSYNC = @HAVE_FSYNC@ HAVE_FTRUNCATE = @HAVE_FTRUNCATE@ HAVE_FUTIMENS = @HAVE_FUTIMENS@ HAVE_GETDOMAINNAME = @HAVE_GETDOMAINNAME@ HAVE_GETDTABLESIZE = @HAVE_GETDTABLESIZE@ HAVE_GETGROUPS = @HAVE_GETGROUPS@ HAVE_GETHOSTNAME = @HAVE_GETHOSTNAME@ HAVE_GETLOGIN = @HAVE_GETLOGIN@ HAVE_GETPAGESIZE = @HAVE_GETPAGESIZE@ HAVE_GETSUBOPT = @HAVE_GETSUBOPT@ HAVE_GETUSERSHELL = @HAVE_GETUSERSHELL@ HAVE_INTTYPES_H = @HAVE_INTTYPES_H@ HAVE_ISNAND = @HAVE_ISNAND@ HAVE_ISNANF = @HAVE_ISNANF@ HAVE_ISNANL = @HAVE_ISNANL@ HAVE_ISWCNTRL = @HAVE_ISWCNTRL@ HAVE_LANGINFO_CODESET = @HAVE_LANGINFO_CODESET@ HAVE_LANGINFO_ERA = @HAVE_LANGINFO_ERA@ HAVE_LANGINFO_H = @HAVE_LANGINFO_H@ HAVE_LCHMOD = @HAVE_LCHMOD@ HAVE_LCHOWN = @HAVE_LCHOWN@ HAVE_LINK = @HAVE_LINK@ HAVE_LINKAT = @HAVE_LINKAT@ HAVE_LOGL = @HAVE_LOGL@ HAVE_LONG_LONG_INT = @HAVE_LONG_LONG_INT@ HAVE_LSTAT = @HAVE_LSTAT@ HAVE_MALLOC_POSIX = @HAVE_MALLOC_POSIX@ HAVE_MBRLEN = @HAVE_MBRLEN@ HAVE_MBRTOWC = @HAVE_MBRTOWC@ HAVE_MBSINIT = @HAVE_MBSINIT@ HAVE_MBSLEN = @HAVE_MBSLEN@ HAVE_MBSNRTOWCS = @HAVE_MBSNRTOWCS@ HAVE_MBSRTOWCS = @HAVE_MBSRTOWCS@ HAVE_MEMPCPY = @HAVE_MEMPCPY@ HAVE_MKDIRAT = @HAVE_MKDIRAT@ HAVE_MKDTEMP = @HAVE_MKDTEMP@ HAVE_MKFIFO = @HAVE_MKFIFO@ HAVE_MKFIFOAT = @HAVE_MKFIFOAT@ HAVE_MKNOD = @HAVE_MKNOD@ HAVE_MKNODAT = @HAVE_MKNODAT@ HAVE_MKOSTEMP = @HAVE_MKOSTEMP@ HAVE_MKOSTEMPS = @HAVE_MKOSTEMPS@ HAVE_MKSTEMPS = @HAVE_MKSTEMPS@ HAVE_NETDB_H = @HAVE_NETDB_H@ HAVE_NETINET_IN_H = @HAVE_NETINET_IN_H@ HAVE_NL_LANGINFO = @HAVE_NL_LANGINFO@ HAVE_OPENAT = @HAVE_OPENAT@ HAVE_OS_H = @HAVE_OS_H@ HAVE_PIPE2 = @HAVE_PIPE2@ HAVE_POSIX_SIGNALBLOCKING = @HAVE_POSIX_SIGNALBLOCKING@ HAVE_PREAD = @HAVE_PREAD@ HAVE_RANDOM_H = @HAVE_RANDOM_H@ HAVE_RANDOM_R = @HAVE_RANDOM_R@ HAVE_RAWMEMCHR = @HAVE_RAWMEMCHR@ HAVE_READLINK = @HAVE_READLINK@ HAVE_READLINKAT = @HAVE_READLINKAT@ HAVE_REALLOC_POSIX = @HAVE_REALLOC_POSIX@ HAVE_REALPATH = @HAVE_REALPATH@ HAVE_RENAMEAT = @HAVE_RENAMEAT@ HAVE_RPMATCH = @HAVE_RPMATCH@ HAVE_SA_FAMILY_T = @HAVE_SA_FAMILY_T@ HAVE_SETENV = @HAVE_SETENV@ HAVE_SIGACTION = @HAVE_SIGACTION@ HAVE_SIGINFO_T = @HAVE_SIGINFO_T@ HAVE_SIGNED_SIG_ATOMIC_T = @HAVE_SIGNED_SIG_ATOMIC_T@ HAVE_SIGNED_WCHAR_T = @HAVE_SIGNED_WCHAR_T@ HAVE_SIGNED_WINT_T = @HAVE_SIGNED_WINT_T@ HAVE_SIGSET_T = @HAVE_SIGSET_T@ HAVE_SINL = @HAVE_SINL@ HAVE_SLEEP = @HAVE_SLEEP@ HAVE_SQRTL = @HAVE_SQRTL@ HAVE_STDINT_H = @HAVE_STDINT_H@ HAVE_STPCPY = @HAVE_STPCPY@ HAVE_STPNCPY = @HAVE_STPNCPY@ HAVE_STRCASECMP = @HAVE_STRCASECMP@ HAVE_STRCASESTR = @HAVE_STRCASESTR@ HAVE_STRCHRNUL = @HAVE_STRCHRNUL@ HAVE_STRPBRK = @HAVE_STRPBRK@ HAVE_STRSEP = @HAVE_STRSEP@ HAVE_STRTOD = @HAVE_STRTOD@ HAVE_STRTOLL = @HAVE_STRTOLL@ HAVE_STRTOULL = @HAVE_STRTOULL@ HAVE_STRUCT_ADDRINFO = @HAVE_STRUCT_ADDRINFO@ HAVE_STRUCT_RANDOM_DATA = @HAVE_STRUCT_RANDOM_DATA@ HAVE_STRUCT_SIGACTION_SA_SIGACTION = @HAVE_STRUCT_SIGACTION_SA_SIGACTION@ HAVE_STRUCT_SOCKADDR_STORAGE = @HAVE_STRUCT_SOCKADDR_STORAGE@ HAVE_STRUCT_TIMEVAL = @HAVE_STRUCT_TIMEVAL@ HAVE_STRUCT_UTSNAME = @HAVE_STRUCT_UTSNAME@ HAVE_STRVERSCMP = @HAVE_STRVERSCMP@ HAVE_SYMLINK = @HAVE_SYMLINK@ HAVE_SYMLINKAT = @HAVE_SYMLINKAT@ HAVE_SYS_BITYPES_H = @HAVE_SYS_BITYPES_H@ HAVE_SYS_INTTYPES_H = @HAVE_SYS_INTTYPES_H@ HAVE_SYS_IOCTL_H = @HAVE_SYS_IOCTL_H@ HAVE_SYS_LOADAVG_H = @HAVE_SYS_LOADAVG_H@ HAVE_SYS_PARAM_H = @HAVE_SYS_PARAM_H@ HAVE_SYS_SELECT_H = @HAVE_SYS_SELECT_H@ HAVE_SYS_SOCKET_H = @HAVE_SYS_SOCKET_H@ HAVE_SYS_TIME_H = @HAVE_SYS_TIME_H@ HAVE_SYS_TYPES_H = @HAVE_SYS_TYPES_H@ HAVE_SYS_UTSNAME_H = @HAVE_SYS_UTSNAME_H@ HAVE_TANL = @HAVE_TANL@ HAVE_TYPE_VOLATILE_SIG_ATOMIC_T = @HAVE_TYPE_VOLATILE_SIG_ATOMIC_T@ HAVE_UNAME = @HAVE_UNAME@ HAVE_UNISTD_H = @HAVE_UNISTD_H@ HAVE_UNLINKAT = @HAVE_UNLINKAT@ HAVE_UNSETENV = @HAVE_UNSETENV@ HAVE_UNSIGNED_LONG_LONG_INT = @HAVE_UNSIGNED_LONG_LONG_INT@ HAVE_USLEEP = @HAVE_USLEEP@ HAVE_UTIMENSAT = @HAVE_UTIMENSAT@ HAVE_VASPRINTF = @HAVE_VASPRINTF@ HAVE_VDPRINTF = @HAVE_VDPRINTF@ HAVE_WCHAR_H = @HAVE_WCHAR_H@ HAVE_WCHAR_T = @HAVE_WCHAR_T@ HAVE_WCRTOMB = @HAVE_WCRTOMB@ HAVE_WCSNRTOMBS = @HAVE_WCSNRTOMBS@ HAVE_WCSRTOMBS = @HAVE_WCSRTOMBS@ HAVE_WCTYPE_H = @HAVE_WCTYPE_H@ HAVE_WINSOCK2_H = @HAVE_WINSOCK2_H@ HAVE_WINT_T = @HAVE_WINT_T@ HAVE_WS2TCPIP_H = @HAVE_WS2TCPIP_H@ HAVE__BOOL = @HAVE__BOOL@ HOSTENT_LIB = @HOSTENT_LIB@ HTML_DIR = @HTML_DIR@ INCLTDL = @INCLTDL@ INCLUDE_NEXT = @INCLUDE_NEXT@ INCLUDE_NEXT_AS_FIRST_DIRECTIVE = @INCLUDE_NEXT_AS_FIRST_DIRECTIVE@ INET_NTOP_LIB = @INET_NTOP_LIB@ INET_PTON_LIB = @INET_PTON_LIB@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LD = @LD@ LDFLAGS = @LDFLAGS@ LEX = @LEX@ LEXLIB = @LEXLIB@ LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@ LIBADD_DL = @LIBADD_DL@ LIBADD_DLD_LINK = @LIBADD_DLD_LINK@ LIBADD_DLOPEN = @LIBADD_DLOPEN@ LIBADD_SHL_LOAD = @LIBADD_SHL_LOAD@ LIBDIR = @LIBDIR@ LIBGCRYPT_CFLAGS = @LIBGCRYPT_CFLAGS@ LIBGCRYPT_CONFIG = @LIBGCRYPT_CONFIG@ LIBGCRYPT_LIBS = @LIBGCRYPT_LIBS@ LIBGNUTLS_CFLAGS = @LIBGNUTLS_CFLAGS@ LIBGNUTLS_CONFIG = @LIBGNUTLS_CONFIG@ LIBGNUTLS_EXTRA_CFLAGS = @LIBGNUTLS_EXTRA_CFLAGS@ LIBGNUTLS_EXTRA_CONFIG = @LIBGNUTLS_EXTRA_CONFIG@ LIBGNUTLS_EXTRA_LIBS = @LIBGNUTLS_EXTRA_LIBS@ LIBGNUTLS_LIBS = @LIBGNUTLS_LIBS@ LIBINTL = @LIBINTL@ LIBLTDL = @LIBLTDL@ LIBMULTITHREAD = @LIBMULTITHREAD@ LIBOBJS = @LIBOBJS@ LIBPRELUDECPP_SONAME = @LIBPRELUDECPP_SONAME@ LIBPRELUDE_CFLAGS = @LIBPRELUDE_CFLAGS@ LIBPRELUDE_LIBS = @LIBPRELUDE_LIBS@ LIBPRELUDE_SONAME = @LIBPRELUDE_SONAME@ LIBPTH = @LIBPTH@ LIBPTH_PREFIX = @LIBPTH_PREFIX@ LIBS = @LIBS@ LIBSOCKET = @LIBSOCKET@ LIBTESTS_LIBDEPS = @LIBTESTS_LIBDEPS@ LIBTHREAD = @LIBTHREAD@ LIBTOOL = @LIBTOOL@ LIPO = @LIPO@ LN_S = @LN_S@ LOCALCHARSET_TESTS_ENVIRONMENT = @LOCALCHARSET_TESTS_ENVIRONMENT@ LOCALE_FR = @LOCALE_FR@ LOCALE_FR_UTF8 = @LOCALE_FR_UTF8@ LOCALE_JA = @LOCALE_JA@ LOCALE_TR_UTF8 = @LOCALE_TR_UTF8@ LOCALE_ZH_CN = @LOCALE_ZH_CN@ LOCALSTATEDIR = @LOCALSTATEDIR@ LTALLOCA = @LTALLOCA@ LTDLDEPS = @LTDLDEPS@ LTDLINCL = @LTDLINCL@ LTDLOPEN = @LTDLOPEN@ LTLIBINTL = @LTLIBINTL@ LTLIBMULTITHREAD = @LTLIBMULTITHREAD@ LTLIBOBJS = @LTLIBOBJS@ LTLIBPTH = @LTLIBPTH@ LTLIBTHREAD = @LTLIBTHREAD@ LT_CONFIG_H = @LT_CONFIG_H@ LT_DLLOADERS = @LT_DLLOADERS@ LT_DLPREOPEN = @LT_DLPREOPEN@ LUA_CFLAGS = @LUA_CFLAGS@ LUA_CONFIG = @LUA_CONFIG@ LUA_LIBS = @LUA_LIBS@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MKDIR_P = @MKDIR_P@ NETDB_H = @NETDB_H@ NETINET_IN_H = @NETINET_IN_H@ NEXT_ARPA_INET_H = @NEXT_ARPA_INET_H@ NEXT_AS_FIRST_DIRECTIVE_ARPA_INET_H = @NEXT_AS_FIRST_DIRECTIVE_ARPA_INET_H@ NEXT_AS_FIRST_DIRECTIVE_ERRNO_H = @NEXT_AS_FIRST_DIRECTIVE_ERRNO_H@ NEXT_AS_FIRST_DIRECTIVE_FCNTL_H = @NEXT_AS_FIRST_DIRECTIVE_FCNTL_H@ NEXT_AS_FIRST_DIRECTIVE_FLOAT_H = @NEXT_AS_FIRST_DIRECTIVE_FLOAT_H@ NEXT_AS_FIRST_DIRECTIVE_LANGINFO_H = @NEXT_AS_FIRST_DIRECTIVE_LANGINFO_H@ NEXT_AS_FIRST_DIRECTIVE_MATH_H = @NEXT_AS_FIRST_DIRECTIVE_MATH_H@ NEXT_AS_FIRST_DIRECTIVE_NETDB_H = @NEXT_AS_FIRST_DIRECTIVE_NETDB_H@ NEXT_AS_FIRST_DIRECTIVE_NETINET_IN_H = @NEXT_AS_FIRST_DIRECTIVE_NETINET_IN_H@ NEXT_AS_FIRST_DIRECTIVE_SIGNAL_H = @NEXT_AS_FIRST_DIRECTIVE_SIGNAL_H@ NEXT_AS_FIRST_DIRECTIVE_STDDEF_H = @NEXT_AS_FIRST_DIRECTIVE_STDDEF_H@ NEXT_AS_FIRST_DIRECTIVE_STDINT_H = @NEXT_AS_FIRST_DIRECTIVE_STDINT_H@ NEXT_AS_FIRST_DIRECTIVE_STDIO_H = @NEXT_AS_FIRST_DIRECTIVE_STDIO_H@ NEXT_AS_FIRST_DIRECTIVE_STDLIB_H = @NEXT_AS_FIRST_DIRECTIVE_STDLIB_H@ NEXT_AS_FIRST_DIRECTIVE_STRINGS_H = @NEXT_AS_FIRST_DIRECTIVE_STRINGS_H@ NEXT_AS_FIRST_DIRECTIVE_STRING_H = @NEXT_AS_FIRST_DIRECTIVE_STRING_H@ NEXT_AS_FIRST_DIRECTIVE_SYS_IOCTL_H = @NEXT_AS_FIRST_DIRECTIVE_SYS_IOCTL_H@ NEXT_AS_FIRST_DIRECTIVE_SYS_SELECT_H = @NEXT_AS_FIRST_DIRECTIVE_SYS_SELECT_H@ NEXT_AS_FIRST_DIRECTIVE_SYS_SOCKET_H = @NEXT_AS_FIRST_DIRECTIVE_SYS_SOCKET_H@ NEXT_AS_FIRST_DIRECTIVE_SYS_STAT_H = @NEXT_AS_FIRST_DIRECTIVE_SYS_STAT_H@ NEXT_AS_FIRST_DIRECTIVE_SYS_TIME_H = @NEXT_AS_FIRST_DIRECTIVE_SYS_TIME_H@ NEXT_AS_FIRST_DIRECTIVE_SYS_UTSNAME_H = @NEXT_AS_FIRST_DIRECTIVE_SYS_UTSNAME_H@ NEXT_AS_FIRST_DIRECTIVE_TIME_H = @NEXT_AS_FIRST_DIRECTIVE_TIME_H@ NEXT_AS_FIRST_DIRECTIVE_UNISTD_H = @NEXT_AS_FIRST_DIRECTIVE_UNISTD_H@ NEXT_AS_FIRST_DIRECTIVE_WCHAR_H = @NEXT_AS_FIRST_DIRECTIVE_WCHAR_H@ NEXT_AS_FIRST_DIRECTIVE_WCTYPE_H = @NEXT_AS_FIRST_DIRECTIVE_WCTYPE_H@ NEXT_ERRNO_H = @NEXT_ERRNO_H@ NEXT_FCNTL_H = @NEXT_FCNTL_H@ NEXT_FLOAT_H = @NEXT_FLOAT_H@ NEXT_LANGINFO_H = @NEXT_LANGINFO_H@ NEXT_MATH_H = @NEXT_MATH_H@ NEXT_NETDB_H = @NEXT_NETDB_H@ NEXT_NETINET_IN_H = @NEXT_NETINET_IN_H@ NEXT_SIGNAL_H = @NEXT_SIGNAL_H@ NEXT_STDDEF_H = @NEXT_STDDEF_H@ NEXT_STDINT_H = @NEXT_STDINT_H@ NEXT_STDIO_H = @NEXT_STDIO_H@ NEXT_STDLIB_H = @NEXT_STDLIB_H@ NEXT_STRINGS_H = @NEXT_STRINGS_H@ NEXT_STRING_H = @NEXT_STRING_H@ NEXT_SYS_IOCTL_H = @NEXT_SYS_IOCTL_H@ NEXT_SYS_SELECT_H = @NEXT_SYS_SELECT_H@ NEXT_SYS_SOCKET_H = @NEXT_SYS_SOCKET_H@ NEXT_SYS_STAT_H = @NEXT_SYS_STAT_H@ NEXT_SYS_TIME_H = @NEXT_SYS_TIME_H@ NEXT_SYS_UTSNAME_H = @NEXT_SYS_UTSNAME_H@ NEXT_TIME_H = @NEXT_TIME_H@ NEXT_UNISTD_H = @NEXT_UNISTD_H@ NEXT_WCHAR_H = @NEXT_WCHAR_H@ NEXT_WCTYPE_H = @NEXT_WCTYPE_H@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PCFLAGS = @PCFLAGS@ PERL = @PERL@ PERL_EXTRA_PARAMS = @PERL_EXTRA_PARAMS@ PKG_CONFIG = @PKG_CONFIG@ POLL_H = @POLL_H@ PRAGMA_SYSTEM_HEADER = @PRAGMA_SYSTEM_HEADER@ PRELUDE_ADMIN_CFLAGS = @PRELUDE_ADMIN_CFLAGS@ PRELUDE_ADMIN_LIBS = @PRELUDE_ADMIN_LIBS@ PRELUDE_CONFIG_DIR = @PRELUDE_CONFIG_DIR@ PRELUDE_SPOOL_DIR = @PRELUDE_SPOOL_DIR@ PTHREAD_CFLAGS = @PTHREAD_CFLAGS@ PTHREAD_LDFLAGS = @PTHREAD_LDFLAGS@ PTHREAD_LIBS = @PTHREAD_LIBS@ PTRDIFF_T_SUFFIX = @PTRDIFF_T_SUFFIX@ PYTHON = @PYTHON@ RANLIB = @RANLIB@ RELOCATABLE = @RELOCATABLE@ REPLACE_BTOWC = @REPLACE_BTOWC@ REPLACE_CANONICALIZE_FILE_NAME = @REPLACE_CANONICALIZE_FILE_NAME@ REPLACE_CEILF = @REPLACE_CEILF@ REPLACE_CEILL = @REPLACE_CEILL@ REPLACE_CHOWN = @REPLACE_CHOWN@ REPLACE_CLOSE = @REPLACE_CLOSE@ REPLACE_DPRINTF = @REPLACE_DPRINTF@ REPLACE_DUP = @REPLACE_DUP@ REPLACE_DUP2 = @REPLACE_DUP2@ REPLACE_FCHDIR = @REPLACE_FCHDIR@ REPLACE_FCHOWNAT = @REPLACE_FCHOWNAT@ REPLACE_FCLOSE = @REPLACE_FCLOSE@ REPLACE_FCNTL = @REPLACE_FCNTL@ REPLACE_FFLUSH = @REPLACE_FFLUSH@ REPLACE_FLOORF = @REPLACE_FLOORF@ REPLACE_FLOORL = @REPLACE_FLOORL@ REPLACE_FOPEN = @REPLACE_FOPEN@ REPLACE_FPRINTF = @REPLACE_FPRINTF@ REPLACE_FPURGE = @REPLACE_FPURGE@ REPLACE_FREOPEN = @REPLACE_FREOPEN@ REPLACE_FREXP = @REPLACE_FREXP@ REPLACE_FREXPL = @REPLACE_FREXPL@ REPLACE_FSEEK = @REPLACE_FSEEK@ REPLACE_FSEEKO = @REPLACE_FSEEKO@ REPLACE_FSTAT = @REPLACE_FSTAT@ REPLACE_FSTATAT = @REPLACE_FSTATAT@ REPLACE_FTELL = @REPLACE_FTELL@ REPLACE_FTELLO = @REPLACE_FTELLO@ REPLACE_FUTIMENS = @REPLACE_FUTIMENS@ REPLACE_GETCWD = @REPLACE_GETCWD@ REPLACE_GETDELIM = @REPLACE_GETDELIM@ REPLACE_GETGROUPS = @REPLACE_GETGROUPS@ REPLACE_GETLINE = @REPLACE_GETLINE@ REPLACE_GETPAGESIZE = @REPLACE_GETPAGESIZE@ REPLACE_GETTIMEOFDAY = @REPLACE_GETTIMEOFDAY@ REPLACE_HUGE_VAL = @REPLACE_HUGE_VAL@ REPLACE_ISFINITE = @REPLACE_ISFINITE@ REPLACE_ISINF = @REPLACE_ISINF@ REPLACE_ISNAN = @REPLACE_ISNAN@ REPLACE_ISWCNTRL = @REPLACE_ISWCNTRL@ REPLACE_LCHOWN = @REPLACE_LCHOWN@ REPLACE_LDEXPL = @REPLACE_LDEXPL@ REPLACE_LINK = @REPLACE_LINK@ REPLACE_LINKAT = @REPLACE_LINKAT@ REPLACE_LOCALTIME_R = @REPLACE_LOCALTIME_R@ REPLACE_LSEEK = @REPLACE_LSEEK@ REPLACE_LSTAT = @REPLACE_LSTAT@ REPLACE_MBRLEN = @REPLACE_MBRLEN@ REPLACE_MBRTOWC = @REPLACE_MBRTOWC@ REPLACE_MBSINIT = @REPLACE_MBSINIT@ REPLACE_MBSNRTOWCS = @REPLACE_MBSNRTOWCS@ REPLACE_MBSRTOWCS = @REPLACE_MBSRTOWCS@ REPLACE_MBSTATE_T = @REPLACE_MBSTATE_T@ REPLACE_MEMCHR = @REPLACE_MEMCHR@ REPLACE_MEMMEM = @REPLACE_MEMMEM@ REPLACE_MKDIR = @REPLACE_MKDIR@ REPLACE_MKFIFO = @REPLACE_MKFIFO@ REPLACE_MKNOD = @REPLACE_MKNOD@ REPLACE_MKSTEMP = @REPLACE_MKSTEMP@ REPLACE_MKTIME = @REPLACE_MKTIME@ REPLACE_NAN = @REPLACE_NAN@ REPLACE_NANOSLEEP = @REPLACE_NANOSLEEP@ REPLACE_NL_LANGINFO = @REPLACE_NL_LANGINFO@ REPLACE_NULL = @REPLACE_NULL@ REPLACE_OBSTACK_PRINTF = @REPLACE_OBSTACK_PRINTF@ REPLACE_OPEN = @REPLACE_OPEN@ REPLACE_OPENAT = @REPLACE_OPENAT@ REPLACE_PERROR = @REPLACE_PERROR@ REPLACE_POPEN = @REPLACE_POPEN@ REPLACE_PREAD = @REPLACE_PREAD@ REPLACE_PRINTF = @REPLACE_PRINTF@ REPLACE_PUTENV = @REPLACE_PUTENV@ REPLACE_READLINK = @REPLACE_READLINK@ REPLACE_REALPATH = @REPLACE_REALPATH@ REPLACE_REMOVE = @REPLACE_REMOVE@ REPLACE_RENAME = @REPLACE_RENAME@ REPLACE_RENAMEAT = @REPLACE_RENAMEAT@ REPLACE_RMDIR = @REPLACE_RMDIR@ REPLACE_ROUND = @REPLACE_ROUND@ REPLACE_ROUNDF = @REPLACE_ROUNDF@ REPLACE_ROUNDL = @REPLACE_ROUNDL@ REPLACE_SELECT = @REPLACE_SELECT@ REPLACE_SETENV = @REPLACE_SETENV@ REPLACE_SIGNBIT = @REPLACE_SIGNBIT@ REPLACE_SIGNBIT_USING_GCC = @REPLACE_SIGNBIT_USING_GCC@ REPLACE_SLEEP = @REPLACE_SLEEP@ REPLACE_SNPRINTF = @REPLACE_SNPRINTF@ REPLACE_SPRINTF = @REPLACE_SPRINTF@ REPLACE_STAT = @REPLACE_STAT@ REPLACE_STDIO_WRITE_FUNCS = @REPLACE_STDIO_WRITE_FUNCS@ REPLACE_STRCASESTR = @REPLACE_STRCASESTR@ REPLACE_STRDUP = @REPLACE_STRDUP@ REPLACE_STRERROR = @REPLACE_STRERROR@ REPLACE_STRNDUP = @REPLACE_STRNDUP@ REPLACE_STRPTIME = @REPLACE_STRPTIME@ REPLACE_STRSIGNAL = @REPLACE_STRSIGNAL@ REPLACE_STRSTR = @REPLACE_STRSTR@ REPLACE_STRTOD = @REPLACE_STRTOD@ REPLACE_STRTOK_R = @REPLACE_STRTOK_R@ REPLACE_SYMLINK = @REPLACE_SYMLINK@ REPLACE_TIMEGM = @REPLACE_TIMEGM@ REPLACE_TRUNCL = @REPLACE_TRUNCL@ REPLACE_UNLINK = @REPLACE_UNLINK@ REPLACE_UNLINKAT = @REPLACE_UNLINKAT@ REPLACE_UNSETENV = @REPLACE_UNSETENV@ REPLACE_USLEEP = @REPLACE_USLEEP@ REPLACE_UTIMENSAT = @REPLACE_UTIMENSAT@ REPLACE_VASPRINTF = @REPLACE_VASPRINTF@ REPLACE_VDPRINTF = @REPLACE_VDPRINTF@ REPLACE_VFPRINTF = @REPLACE_VFPRINTF@ REPLACE_VPRINTF = @REPLACE_VPRINTF@ REPLACE_VSNPRINTF = @REPLACE_VSNPRINTF@ REPLACE_VSPRINTF = @REPLACE_VSPRINTF@ REPLACE_WCRTOMB = @REPLACE_WCRTOMB@ REPLACE_WCSNRTOMBS = @REPLACE_WCSNRTOMBS@ REPLACE_WCSRTOMBS = @REPLACE_WCSRTOMBS@ REPLACE_WCTOB = @REPLACE_WCTOB@ REPLACE_WCWIDTH = @REPLACE_WCWIDTH@ REPLACE_WRITE = @REPLACE_WRITE@ RUBY = @RUBY@ RUBY_CCFLAGS = @RUBY_CCFLAGS@ RUBY_EXEC_PREFIX = @RUBY_EXEC_PREFIX@ RUBY_INCLUDES = @RUBY_INCLUDES@ RUBY_LIBS = @RUBY_LIBS@ RUBY_PLATFORM = @RUBY_PLATFORM@ RUBY_PREFIX = @RUBY_PREFIX@ RUBY_VERSION = @RUBY_VERSION@ SED = @SED@ SERVENT_LIB = @SERVENT_LIB@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ SIG_ATOMIC_T_SUFFIX = @SIG_ATOMIC_T_SUFFIX@ SIZE_T_SUFFIX = @SIZE_T_SUFFIX@ STDBOOL_H = @STDBOOL_H@ STDDEF_H = @STDDEF_H@ STDINT_H = @STDINT_H@ STRIP = @STRIP@ SWIG = @SWIG@ SYSCONFDIR = @SYSCONFDIR@ SYS_IOCTL_H_HAVE_WINSOCK2_H = @SYS_IOCTL_H_HAVE_WINSOCK2_H@ SYS_IOCTL_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS = @SYS_IOCTL_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS@ SYS_SOCKET_H = @SYS_SOCKET_H@ SYS_TIME_H_DEFINES_STRUCT_TIMESPEC = @SYS_TIME_H_DEFINES_STRUCT_TIMESPEC@ TIME_H_DEFINES_STRUCT_TIMESPEC = @TIME_H_DEFINES_STRUCT_TIMESPEC@ UNDEFINE_STRTOK_R = @UNDEFINE_STRTOK_R@ UNISTD_H_HAVE_WINSOCK2_H = @UNISTD_H_HAVE_WINSOCK2_H@ UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS = @UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS@ VALGRIND = @VALGRIND@ VERSION = @VERSION@ WCHAR_T_SUFFIX = @WCHAR_T_SUFFIX@ WCTYPE_H = @WCTYPE_H@ WINT_T_SUFFIX = @WINT_T_SUFFIX@ YACC = @YACC@ YFLAGS = @YFLAGS@ YIELD_LIB = @YIELD_LIB@ __PRELUDE_64BIT_FORMAT_PREFIX = @__PRELUDE_64BIT_FORMAT_PREFIX@ __PRELUDE_HAVE_64BIT_LONG = @__PRELUDE_HAVE_64BIT_LONG@ __PRELUDE_HAVE_INTTYPES_H = @__PRELUDE_HAVE_INTTYPES_H@ __PRELUDE_HAVE_STDINT_H = @__PRELUDE_HAVE_STDINT_H@ __PRELUDE_STDINT_HAVE_UINT16 = @__PRELUDE_STDINT_HAVE_UINT16@ __PRELUDE_STDINT_HAVE_UINT32 = @__PRELUDE_STDINT_HAVE_UINT32@ __PRELUDE_STDINT_HAVE_UINT64 = @__PRELUDE_STDINT_HAVE_UINT64@ __PRELUDE_STDINT_HAVE_UINT8 = @__PRELUDE_STDINT_HAVE_UINT8@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ gl_LIBOBJS = @gl_LIBOBJS@ gl_LTLIBOBJS = @gl_LTLIBOBJS@ gltests_LIBOBJS = @gltests_LIBOBJS@ gltests_LTLIBOBJS = @gltests_LTLIBOBJS@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ lt_ECHO = @lt_ECHO@ ltdl_LIBOBJS = @ltdl_LIBOBJS@ ltdl_LTLIBOBJS = @ltdl_LTLIBOBJS@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ pkgrbexecdir = @pkgrbexecdir@ pkgrubydir = @pkgrubydir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ rbexecdir = @rbexecdir@ rubydir = @rubydir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sys_symbol_underscore = @sys_symbol_underscore@ sysconfdir = @sysconfdir@ target = @target@ target_alias = @target_alias@ target_cpu = @target_cpu@ target_os = @target_os@ target_vendor = @target_vendor@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ @HAVE_EASY_BINDINGS_TRUE@@HAVE_PYTHON_TRUE@EXTRA_DIST = libpreludecpp-python.i PreludeEasy.py _PreludeEasy.cxx all: all-am .SUFFIXES: $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu bindings/python/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu bindings/python/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): setup.py: $(top_builddir)/config.status $(srcdir)/setup.py.in cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs tags: TAGS TAGS: ctags: CTAGS CTAGS: distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile installdirs: install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." @HAVE_EASY_BINDINGS_FALSE@clean-local: @HAVE_PYTHON_FALSE@clean-local: @HAVE_EASY_BINDINGS_FALSE@install-exec-hook: @HAVE_PYTHON_FALSE@install-exec-hook: @HAVE_EASY_BINDINGS_FALSE@uninstall-hook: @HAVE_PYTHON_FALSE@uninstall-hook: clean: clean-am clean-am: clean-generic clean-libtool clean-local mostlyclean-am distclean: distclean-am -rm -f Makefile distclean-am: clean-am distclean-generic dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: @$(NORMAL_INSTALL) $(MAKE) $(AM_MAKEFLAGS) install-exec-hook install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-generic mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: @$(NORMAL_INSTALL) $(MAKE) $(AM_MAKEFLAGS) uninstall-hook .MAKE: install-am install-exec-am install-strip uninstall-am .PHONY: all all-am check check-am clean clean-generic clean-libtool \ clean-local distclean distclean-generic distclean-libtool \ distdir dvi dvi-am html html-am info info-am install \ install-am install-data install-data-am install-dvi \ install-dvi-am install-exec install-exec-am install-exec-hook \ install-html install-html-am install-info install-info-am \ install-man install-pdf install-pdf-am install-ps \ install-ps-am install-strip installcheck installcheck-am \ installdirs maintainer-clean maintainer-clean-generic \ mostlyclean mostlyclean-generic mostlyclean-libtool pdf pdf-am \ ps ps-am uninstall uninstall-am uninstall-hook @HAVE_EASY_BINDINGS_TRUE@@HAVE_PYTHON_TRUE@all-am: python-build @HAVE_EASY_BINDINGS_TRUE@@HAVE_PYTHON_TRUE@python-build: _PreludeEasy.cxx @HAVE_EASY_BINDINGS_TRUE@@HAVE_PYTHON_TRUE@ CC="$(CXX)" $(PYTHON) setup.py build @HAVE_EASY_BINDINGS_TRUE@@HAVE_PYTHON_TRUE@install-exec-hook: @HAVE_EASY_BINDINGS_TRUE@@HAVE_PYTHON_TRUE@ $(PYTHON) setup.py install `test -n "$(DESTDIR)" && echo --root $(DESTDIR)` @HAVE_EASY_BINDINGS_TRUE@@HAVE_PYTHON_TRUE@uninstall-hook: @HAVE_EASY_BINDINGS_TRUE@@HAVE_PYTHON_TRUE@ $(PYTHON) setup.py uninstall `test -n "$(DESTDIR)" && echo --root $(DESTDIR)` @HAVE_EASY_BINDINGS_TRUE@@HAVE_PYTHON_TRUE@clean-local: @HAVE_EASY_BINDINGS_TRUE@@HAVE_PYTHON_TRUE@ $(PYTHON) setup.py clean -a @HAVE_EASY_BINDINGS_TRUE@@HAVE_PYTHON_TRUE@_PreludeEasy.cxx PreludeEasy.py: $(top_srcdir)/bindings/c++/include/*.hxx $(top_srcdir)/bindings/libpreludecpp.i libpreludecpp-python.i @HAVE_EASY_BINDINGS_TRUE@@HAVE_PYTHON_TRUE@@HAVE_SWIG_TRUE@ $(SWIG) -c++ -I$(top_srcdir)/bindings -I$(top_srcdir)/bindings/c++/include -I$(top_srcdir)/src/include -I$(top_srcdir)/src/libprelude-error -python -o $@ ../libpreludecpp.i -include $(top_srcdir)/git.mk # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: libprelude-1.0.0/bindings/python/libpreludecpp-python.i0000664000076400007640000001205511330605466020242 00000000000000%include std_list.i %rename (__str__) *::operator const std::string() const; %rename (__str__) *::operator const char *() const; %rename (__int__) *::operator int() const; %rename (__long__) *::operator long() const; %rename (__float__) *::operator double() const; %ignore *::operator =; %header %{ #define TARGET_LANGUAGE_OUTPUT_TYPE PyObject ** int IDMEFValue_to_SWIG(const IDMEFValue &result, TARGET_LANGUAGE_OUTPUT_TYPE ret); %} %{ PyObject *__prelude_log_func = NULL; static void _cb_python_log(int level, const char *str) { PyObject *arglist, *result; SWIG_PYTHON_THREAD_BEGIN_BLOCK; arglist = Py_BuildValue("(i,s)", level, str); result = PyEval_CallObject(__prelude_log_func, arglist); Py_DECREF(arglist); Py_XDECREF(result); SWIG_PYTHON_THREAD_END_BLOCK; } static int _cb_python_write(prelude_msgbuf_t *fd, prelude_msg_t *msg) { size_t ret; PyObject *io = (PyObject *) prelude_msgbuf_get_data(fd); FILE *f = PyFile_AsFile(io); ret = fwrite((const char *)prelude_msg_get_message_data(msg), 1, prelude_msg_get_len(msg), f); if ( ret != prelude_msg_get_len(msg) ) return prelude_error_from_errno(errno); prelude_msg_recycle(msg); return 0; } static ssize_t _cb_python_read(prelude_io_t *fd, void *buf, size_t size) { ssize_t ret; PyObject *io = (PyObject *) prelude_io_get_fdptr(fd); FILE *f = PyFile_AsFile(io); ret = fread(buf, 1, size, f); if ( ret < 0 ) ret = prelude_error_from_errno(errno); else if ( ret == 0 ) ret = prelude_error(PRELUDE_ERROR_EOF); return ret; } %} %typemap(in) void (*log_cb)(int level, const char *log) { if ( ! PyCallable_Check($input) ) SWIG_exception_fail(SWIG_ValueError, "Argument is not a callable object"); if ( __prelude_log_func ) Py_DECREF(__prelude_log_func); __prelude_log_func = $input; Py_INCREF($input); $1 = _cb_python_log; }; /* tell squid not to cast void * value */ %typemap(in) void *nocast_file_p { if ( !PyFile_Check( (PyObject *)$input) ) { const char * errstr = "Argument is not a file object."; PyErr_SetString(PyExc_RuntimeError,errstr); return NULL; } $1 = $input; } %extend Prelude::IDMEF { void Write(void *nocast_file_p) { self->_genericWrite(_cb_python_write, nocast_file_p); } void Read(void *nocast_file_p) { self->_genericRead(_cb_python_read, nocast_file_p); } Prelude::IDMEF &operator >> (void *nocast_file_p) { self->_genericWrite(_cb_python_write, nocast_file_p); return *self; } Prelude::IDMEF &operator << (void *nocast_file_p) { self->_genericRead(_cb_python_read, nocast_file_p); return *self; } } %fragment("IDMEFValueList_to_SWIG", "header") { PyObject *IDMEFValueList_to_SWIG(const Prelude::IDMEFValue &value) { int j = 0, ret; PyObject *pytuple; std::vector result = value; std::vector::const_iterator i; pytuple = PyTuple_New(result.size()); for ( i = result.begin(); i != result.end(); i++ ) { PyObject *val; ret = IDMEFValue_to_SWIG(*i, &val); if ( ret < 0 ) return NULL; PyTuple_SetItem(pytuple, j++, val); } return pytuple; } } %typemap(out, fragment="IDMEFValue_to_SWIG") Prelude::IDMEFValue { int ret; if ( $1.IsNull() ) { Py_INCREF(Py_None); $result = Py_None; } else { ret = IDMEFValue_to_SWIG($1, &$result); if ( ret < 0 ) { std::stringstream s; s << "IDMEFValue typemap does not handle value of type '" << idmef_value_type_to_string($1.GetType()) << "'"; SWIG_exception_fail(SWIG_ValueError, s.str().c_str()); } } }; %init { int argc, ret, i; char **argv = NULL; PyObject *sys = PyImport_ImportModule("sys"); PyObject *pyargv = PyObject_GetAttrString(sys, "argv"); argc = PyObject_Length(pyargv); assert(argc >= 1); assert(PyList_Check(pyargv)); if ( argc + 1 < 0 ) throw PreludeError("Invalid argc length"); argv = (char **) malloc((argc + 1) * sizeof(char *)); if ( ! argv ) throw PreludeError("Allocation failure"); for ( i = 0; i < argc; i++ ) { PyObject *o = PyList_GetItem(pyargv, i); argv[i] = PyString_AsString(o); } argv[i] = NULL; ret = prelude_init(&argc, argv); if ( ret < 0 ) { free(argv); throw PreludeError(ret); } free(argv); Py_DECREF(pyargv); Py_DECREF(sys); } libprelude-1.0.0/bindings/python/setup.py.in0000664000076400007640000000507111330604626016033 00000000000000import sys, os from os.path import abspath, exists import shutil from distutils.sysconfig import get_python_lib from distutils.core import setup, Extension FILES_TO_BE_COPIED = ("_PreludeEasy.cxx", "PreludeEasy.py") def split_args(s): import re return re.split("\s+", s.strip()) def get_root(): try: return sys.argv[sys.argv.index("--root") + 1] except ValueError: return "" def is_system_wide_install(): return os.access(get_python_lib(), os.W_OK) def builddir_is_srcdir(): return abspath("@top_srcdir@") == abspath("@top_builddir@") def pre_install(): if not is_system_wide_install(): sys.argv.extend(["--prefix", "@prefix@"]) def pre_build(): if not builddir_is_srcdir(): for file in FILES_TO_BE_COPIED: src = "@top_srcdir@/bindings/python/" + file dst = "@top_builddir@/bindings/python/" + file if not exists(dst): shutil.copy(src, dst) def pre_clean(): if not builddir_is_srcdir(): for file in FILES_TO_BE_COPIED: exists(file) and os.remove(file) def uninstall(): if is_system_wide_install(): prefix = None else: prefix = "@prefix@" for f in "PreludeEasy.py", "PreludeEasy.pyc", "_PreludeEasy.so": file = get_root() + "/" + get_python_lib(prefix=prefix) + "/" + f exists(file) and os.remove(file) file = get_root() + "/" + get_python_lib(plat_specific=True, prefix=prefix) + "/" + f exists(file) and os.remove(file) sys.exit(0) commands = { "install": pre_install, "build": pre_build, "clean": pre_clean, "uninstall": uninstall, } if len(sys.argv) > 1 and commands.has_key(sys.argv[1]): commands[sys.argv[1]]() setup(name="PreludeEasy", version="@VERSION@", description="Python bindings for the Prelude Library", author="PreludeIDS Technologies", url="http://www.prelude-ids.com", package_dir={'PreludeEasy': '@top_srcdir@/bindings/python'}, py_modules=["PreludeEasy"], ext_modules=[Extension("_PreludeEasy", ["_PreludeEasy.cxx"], extra_compile_args=split_args("-I@top_builddir@ -I@top_srcdir@/src/include -I@top_builddir@/src/include -I@top_builddir@/src/libprelude-error -I@top_srcdir@/bindings/c++/include"), library_dirs=[ "@top_builddir@/src/.libs/", "@top_builddir@/bindings/c++/.libs/" ], extra_link_args=split_args("-lpreludecpp -lprelude @LIBPRELUDE_LIBS@ @LIBADD_DL@ @LTLIBTHREAD@"))]) libprelude-1.0.0/bindings/python/PreludeEasy.py0000664000076400007640000006515611330606206016516 00000000000000# This file was automatically generated by SWIG (http://www.swig.org). # Version 1.3.40 # # Do not make changes to this file unless you know what you are doing--modify # the SWIG interface file instead. # This file is compatible with both classic and new-style classes. from sys import version_info if version_info >= (2,6,0): def swig_import_helper(): from os.path import dirname import imp fp = None try: fp, pathname, description = imp.find_module('_PreludeEasy', [dirname(__file__)]) except ImportError: import _PreludeEasy return _PreludeEasy if fp is not None: try: _mod = imp.load_module('_PreludeEasy', fp, pathname, description) finally: fp.close() return _mod _PreludeEasy = swig_import_helper() del swig_import_helper else: import _PreludeEasy del version_info try: _swig_property = property except NameError: pass # Python < 2.2 doesn't have 'property'. def _swig_setattr_nondynamic(self,class_type,name,value,static=1): if (name == "thisown"): return self.this.own(value) if (name == "this"): if type(value).__name__ == 'SwigPyObject': self.__dict__[name] = value return method = class_type.__swig_setmethods__.get(name,None) if method: return method(self,value) if (not static) or hasattr(self,name): self.__dict__[name] = value else: raise AttributeError("You cannot add attributes to %s" % self) def _swig_setattr(self,class_type,name,value): return _swig_setattr_nondynamic(self,class_type,name,value,0) def _swig_getattr(self,class_type,name): if (name == "thisown"): return self.this.own() method = class_type.__swig_getmethods__.get(name,None) if method: return method(self) raise AttributeError(name) def _swig_repr(self): try: strthis = "proxy of " + self.this.__repr__() except: strthis = "" return "<%s.%s; %s >" % (self.__class__.__module__, self.__class__.__name__, strthis,) try: _object = object _newclass = 1 except AttributeError: class _object : pass _newclass = 0 class SwigPyIterator(_object): __swig_setmethods__ = {} __setattr__ = lambda self, name, value: _swig_setattr(self, SwigPyIterator, name, value) __swig_getmethods__ = {} __getattr__ = lambda self, name: _swig_getattr(self, SwigPyIterator, name) def __init__(self, *args, **kwargs): raise AttributeError("No constructor defined - class is abstract") __repr__ = _swig_repr __swig_destroy__ = _PreludeEasy.delete_SwigPyIterator __del__ = lambda self : None; def value(self): return _PreludeEasy.SwigPyIterator_value(self) def incr(self, n = 1): return _PreludeEasy.SwigPyIterator_incr(self, n) def decr(self, n = 1): return _PreludeEasy.SwigPyIterator_decr(self, n) def distance(self, *args): return _PreludeEasy.SwigPyIterator_distance(self, *args) def equal(self, *args): return _PreludeEasy.SwigPyIterator_equal(self, *args) def copy(self): return _PreludeEasy.SwigPyIterator_copy(self) def next(self): return _PreludeEasy.SwigPyIterator_next(self) def __next__(self): return _PreludeEasy.SwigPyIterator___next__(self) def previous(self): return _PreludeEasy.SwigPyIterator_previous(self) def advance(self, *args): return _PreludeEasy.SwigPyIterator_advance(self, *args) def __eq__(self, *args): return _PreludeEasy.SwigPyIterator___eq__(self, *args) def __ne__(self, *args): return _PreludeEasy.SwigPyIterator___ne__(self, *args) def __iadd__(self, *args): return _PreludeEasy.SwigPyIterator___iadd__(self, *args) def __isub__(self, *args): return _PreludeEasy.SwigPyIterator___isub__(self, *args) def __add__(self, *args): return _PreludeEasy.SwigPyIterator___add__(self, *args) def __sub__(self, *args): return _PreludeEasy.SwigPyIterator___sub__(self, *args) def __iter__(self): return self SwigPyIterator_swigregister = _PreludeEasy.SwigPyIterator_swigregister SwigPyIterator_swigregister(SwigPyIterator) class PreludeLog(_object): __swig_setmethods__ = {} __setattr__ = lambda self, name, value: _swig_setattr(self, PreludeLog, name, value) __swig_getmethods__ = {} __getattr__ = lambda self, name: _swig_getattr(self, PreludeLog, name) __repr__ = _swig_repr DEBUG = _PreludeEasy.PreludeLog_DEBUG INFO = _PreludeEasy.PreludeLog_INFO WARNING = _PreludeEasy.PreludeLog_WARNING ERROR = _PreludeEasy.PreludeLog_ERROR CRITICAL = _PreludeEasy.PreludeLog_CRITICAL QUIET = _PreludeEasy.PreludeLog_QUIET SYSLOG = _PreludeEasy.PreludeLog_SYSLOG __swig_getmethods__["SetLevel"] = lambda x: _PreludeEasy.PreludeLog_SetLevel if _newclass:SetLevel = staticmethod(_PreludeEasy.PreludeLog_SetLevel) __swig_getmethods__["SetDebugLevel"] = lambda x: _PreludeEasy.PreludeLog_SetDebugLevel if _newclass:SetDebugLevel = staticmethod(_PreludeEasy.PreludeLog_SetDebugLevel) __swig_getmethods__["SetFlags"] = lambda x: _PreludeEasy.PreludeLog_SetFlags if _newclass:SetFlags = staticmethod(_PreludeEasy.PreludeLog_SetFlags) __swig_getmethods__["GetFlags"] = lambda x: _PreludeEasy.PreludeLog_GetFlags if _newclass:GetFlags = staticmethod(_PreludeEasy.PreludeLog_GetFlags) __swig_getmethods__["SetLogfile"] = lambda x: _PreludeEasy.PreludeLog_SetLogfile if _newclass:SetLogfile = staticmethod(_PreludeEasy.PreludeLog_SetLogfile) __swig_getmethods__["SetCallback"] = lambda x: _PreludeEasy.PreludeLog_SetCallback if _newclass:SetCallback = staticmethod(_PreludeEasy.PreludeLog_SetCallback) def __init__(self): this = _PreludeEasy.new_PreludeLog() try: self.this.append(this) except: self.this = this __swig_destroy__ = _PreludeEasy.delete_PreludeLog __del__ = lambda self : None; PreludeLog_swigregister = _PreludeEasy.PreludeLog_swigregister PreludeLog_swigregister(PreludeLog) def CheckVersion(version = None): return _PreludeEasy.CheckVersion(version) CheckVersion = _PreludeEasy.CheckVersion def PreludeLog_SetLevel(*args): return _PreludeEasy.PreludeLog_SetLevel(*args) PreludeLog_SetLevel = _PreludeEasy.PreludeLog_SetLevel def PreludeLog_SetDebugLevel(*args): return _PreludeEasy.PreludeLog_SetDebugLevel(*args) PreludeLog_SetDebugLevel = _PreludeEasy.PreludeLog_SetDebugLevel def PreludeLog_SetFlags(*args): return _PreludeEasy.PreludeLog_SetFlags(*args) PreludeLog_SetFlags = _PreludeEasy.PreludeLog_SetFlags def PreludeLog_GetFlags(): return _PreludeEasy.PreludeLog_GetFlags() PreludeLog_GetFlags = _PreludeEasy.PreludeLog_GetFlags def PreludeLog_SetLogfile(*args): return _PreludeEasy.PreludeLog_SetLogfile(*args) PreludeLog_SetLogfile = _PreludeEasy.PreludeLog_SetLogfile def PreludeLog_SetCallback(*args): return _PreludeEasy.PreludeLog_SetCallback(*args) PreludeLog_SetCallback = _PreludeEasy.PreludeLog_SetCallback class PreludeError(Exception): __swig_setmethods__ = {} __setattr__ = lambda self, name, value: _swig_setattr(self, PreludeError, name, value) __swig_getmethods__ = {} __getattr__ = lambda self, name: _swig_getattr(self, PreludeError, name) __repr__ = _swig_repr __swig_destroy__ = _PreludeEasy.delete_PreludeError __del__ = lambda self : None; def __init__(self, *args): this = _PreludeEasy.new_PreludeError(*args) try: self.this.append(this) except: self.this = this def what(self): return _PreludeEasy.PreludeError_what(self) def __str__(self): return _PreludeEasy.PreludeError___str__(self) PreludeError_swigregister = _PreludeEasy.PreludeError_swigregister PreludeError_swigregister(PreludeError) class Connection(_object): __swig_setmethods__ = {} __setattr__ = lambda self, name, value: _swig_setattr(self, Connection, name, value) __swig_getmethods__ = {} __getattr__ = lambda self, name: _swig_getattr(self, Connection, name) __repr__ = _swig_repr __swig_destroy__ = _PreludeEasy.delete_Connection __del__ = lambda self : None; def __init__(self, *args): this = _PreludeEasy.new_Connection(*args) try: self.this.append(this) except: self.this = this def GetConnection(self): return _PreludeEasy.Connection_GetConnection(self) def Close(self): return _PreludeEasy.Connection_Close(self) def Connect(self, *args): return _PreludeEasy.Connection_Connect(self, *args) def SetState(self, *args): return _PreludeEasy.Connection_SetState(self, *args) def GetState(self): return _PreludeEasy.Connection_GetState(self) def SetData(self, *args): return _PreludeEasy.Connection_SetData(self, *args) def GetData(self): return _PreludeEasy.Connection_GetData(self) def GetPermission(self): return _PreludeEasy.Connection_GetPermission(self) def SetPeerAnalyzerid(self, *args): return _PreludeEasy.Connection_SetPeerAnalyzerid(self, *args) def GetPeerAnalyzerid(self): return _PreludeEasy.Connection_GetPeerAnalyzerid(self) def GetLocalAddr(self): return _PreludeEasy.Connection_GetLocalAddr(self) def GetLocalPort(self): return _PreludeEasy.Connection_GetLocalPort(self) def GetPeerAddr(self): return _PreludeEasy.Connection_GetPeerAddr(self) def GetPeerPort(self): return _PreludeEasy.Connection_GetPeerPort(self) def IsAlive(self): return _PreludeEasy.Connection_IsAlive(self) def GetFd(self): return _PreludeEasy.Connection_GetFd(self) def RecvIDMEF(self): return _PreludeEasy.Connection_RecvIDMEF(self) Connection_swigregister = _PreludeEasy.Connection_swigregister Connection_swigregister(Connection) class ConnectionPool(_object): __swig_setmethods__ = {} __setattr__ = lambda self, name, value: _swig_setattr(self, ConnectionPool, name, value) __swig_getmethods__ = {} __getattr__ = lambda self, name: _swig_getattr(self, ConnectionPool, name) __repr__ = _swig_repr __swig_destroy__ = _PreludeEasy.delete_ConnectionPool __del__ = lambda self : None; def __init__(self, *args): this = _PreludeEasy.new_ConnectionPool(*args) try: self.this.append(this) except: self.this = this def Init(self): return _PreludeEasy.ConnectionPool_Init(self) def SetConnectionString(self, *args): return _PreludeEasy.ConnectionPool_SetConnectionString(self, *args) def GetConnectionString(self): return _PreludeEasy.ConnectionPool_GetConnectionString(self) def GetConnectionList(self): return _PreludeEasy.ConnectionPool_GetConnectionList(self) def SetFlags(self, *args): return _PreludeEasy.ConnectionPool_SetFlags(self, *args) def GetFlags(self): return _PreludeEasy.ConnectionPool_GetFlags(self) def SetData(self, *args): return _PreludeEasy.ConnectionPool_SetData(self, *args) def GetData(self): return _PreludeEasy.ConnectionPool_GetData(self) def AddConnection(self, *args): return _PreludeEasy.ConnectionPool_AddConnection(self, *args) def DelConnection(self, *args): return _PreludeEasy.ConnectionPool_DelConnection(self, *args) def SetConnectionAlive(self, *args): return _PreludeEasy.ConnectionPool_SetConnectionAlive(self, *args) def SetConnectionDead(self, *args): return _PreludeEasy.ConnectionPool_SetConnectionDead(self, *args) def SetRequiredPermission(self, *args): return _PreludeEasy.ConnectionPool_SetRequiredPermission(self, *args) ConnectionPool_swigregister = _PreludeEasy.ConnectionPool_swigregister ConnectionPool_swigregister(ConnectionPool) class ClientProfile(_object): __swig_setmethods__ = {} __setattr__ = lambda self, name, value: _swig_setattr(self, ClientProfile, name, value) __swig_getmethods__ = {} __getattr__ = lambda self, name: _swig_getattr(self, ClientProfile, name) __repr__ = _swig_repr def __init__(self, *args): this = _PreludeEasy.new_ClientProfile(*args) try: self.this.append(this) except: self.this = this __swig_destroy__ = _PreludeEasy.delete_ClientProfile __del__ = lambda self : None; def GetUid(self): return _PreludeEasy.ClientProfile_GetUid(self) def GetGid(self): return _PreludeEasy.ClientProfile_GetGid(self) def GetName(self): return _PreludeEasy.ClientProfile_GetName(self) def SetName(self, *args): return _PreludeEasy.ClientProfile_SetName(self, *args) def GetAnalyzerId(self, *args): return _PreludeEasy.ClientProfile_GetAnalyzerId(self, *args) def GetConfigFilename(self): return _PreludeEasy.ClientProfile_GetConfigFilename(self) def GetAnalyzeridFilename(self): return _PreludeEasy.ClientProfile_GetAnalyzeridFilename(self) def GetTlsKeyFilename(self): return _PreludeEasy.ClientProfile_GetTlsKeyFilename(self) def GetTlsServerCaCertFilename(self): return _PreludeEasy.ClientProfile_GetTlsServerCaCertFilename(self) def GetTlsServerKeyCertFilename(self): return _PreludeEasy.ClientProfile_GetTlsServerKeyCertFilename(self) def GetTlsServerCrlFilename(self): return _PreludeEasy.ClientProfile_GetTlsServerCrlFilename(self) def GetTlsClientKeyCertFilename(self): return _PreludeEasy.ClientProfile_GetTlsClientKeyCertFilename(self) def GetTlsClientTrustedCertFilename(self): return _PreludeEasy.ClientProfile_GetTlsClientTrustedCertFilename(self) def GetBackupDirname(self): return _PreludeEasy.ClientProfile_GetBackupDirname(self) def GetProfileDirname(self): return _PreludeEasy.ClientProfile_GetProfileDirname(self) def SetPrefix(self, *args): return _PreludeEasy.ClientProfile_SetPrefix(self, *args) def GetPrefix(self): return _PreludeEasy.ClientProfile_GetPrefix(self) ClientProfile_swigregister = _PreludeEasy.ClientProfile_swigregister ClientProfile_swigregister(ClientProfile) class Client(ClientProfile): __swig_setmethods__ = {} for _s in [ClientProfile]: __swig_setmethods__.update(getattr(_s,'__swig_setmethods__',{})) __setattr__ = lambda self, name, value: _swig_setattr(self, Client, name, value) __swig_getmethods__ = {} for _s in [ClientProfile]: __swig_getmethods__.update(getattr(_s,'__swig_getmethods__',{})) __getattr__ = lambda self, name: _swig_getattr(self, Client, name) __repr__ = _swig_repr ASYNC_SEND = _PreludeEasy.Client_ASYNC_SEND FLAGS_ASYNC_SEND = _PreludeEasy.Client_FLAGS_ASYNC_SEND ASYNC_TIMER = _PreludeEasy.Client_ASYNC_TIMER FLAGS_ASYNC_TIMER = _PreludeEasy.Client_FLAGS_ASYNC_TIMER HEARTBEAT = _PreludeEasy.Client_HEARTBEAT FLAGS_HEARTBEAT = _PreludeEasy.Client_FLAGS_HEARTBEAT CONNECT = _PreludeEasy.Client_CONNECT FLAGS_CONNECT = _PreludeEasy.Client_FLAGS_CONNECT AUTOCONFIG = _PreludeEasy.Client_AUTOCONFIG FLAGS_AUTOCONFIG = _PreludeEasy.Client_FLAGS_AUTOCONFIG IDMEF_READ = _PreludeEasy.Client_IDMEF_READ PERMISSION_IDMEF_READ = _PreludeEasy.Client_PERMISSION_IDMEF_READ ADMIN_READ = _PreludeEasy.Client_ADMIN_READ PERMISSION_ADMIN_READ = _PreludeEasy.Client_PERMISSION_ADMIN_READ IDMEF_WRITE = _PreludeEasy.Client_IDMEF_WRITE PERMISSION_IDMEF_WRITE = _PreludeEasy.Client_PERMISSION_IDMEF_WRITE ADMIN_WRITE = _PreludeEasy.Client_ADMIN_WRITE PERMISSION_ADMIN_WRITE = _PreludeEasy.Client_PERMISSION_ADMIN_WRITE __swig_destroy__ = _PreludeEasy.delete_Client __del__ = lambda self : None; def __init__(self, *args): this = _PreludeEasy.new_Client(*args) try: self.this.append(this) except: self.this = this def Start(self): return _PreludeEasy.Client_Start(self) def Init(self): return _PreludeEasy.Client_Init(self) def GetClient(self): return _PreludeEasy.Client_GetClient(self) def SendIDMEF(self, *args): return _PreludeEasy.Client_SendIDMEF(self, *args) def RecvIDMEF(self, *args): return _PreludeEasy.Client_RecvIDMEF(self, *args) def GetFlags(self): return _PreludeEasy.Client_GetFlags(self) def SetFlags(self, *args): return _PreludeEasy.Client_SetFlags(self, *args) def GetRequiredPermission(self): return _PreludeEasy.Client_GetRequiredPermission(self) def SetRequiredPermission(self, *args): return _PreludeEasy.Client_SetRequiredPermission(self, *args) def GetConfigFilename(self): return _PreludeEasy.Client_GetConfigFilename(self) def SetConfigFilename(self, *args): return _PreludeEasy.Client_SetConfigFilename(self, *args) def GetConnectionPool(self): return _PreludeEasy.Client_GetConnectionPool(self) def SetConnectionPool(self, *args): return _PreludeEasy.Client_SetConnectionPool(self, *args) def __lshift__(self, *args): return _PreludeEasy.Client___lshift__(self, *args) def __rshift__(self, *args): return _PreludeEasy.Client___rshift__(self, *args) __swig_getmethods__["SetRecvTimeout"] = lambda x: _PreludeEasy.Client_SetRecvTimeout if _newclass:SetRecvTimeout = staticmethod(_PreludeEasy.Client_SetRecvTimeout) Client_swigregister = _PreludeEasy.Client_swigregister Client_swigregister(Client) def Client_SetRecvTimeout(*args): return _PreludeEasy.Client_SetRecvTimeout(*args) Client_SetRecvTimeout = _PreludeEasy.Client_SetRecvTimeout class ClientEasy(Client): __swig_setmethods__ = {} for _s in [Client]: __swig_setmethods__.update(getattr(_s,'__swig_setmethods__',{})) __setattr__ = lambda self, name, value: _swig_setattr(self, ClientEasy, name, value) __swig_getmethods__ = {} for _s in [Client]: __swig_getmethods__.update(getattr(_s,'__swig_getmethods__',{})) __getattr__ = lambda self, name: _swig_getattr(self, ClientEasy, name) __repr__ = _swig_repr def __init__(self, *args): this = _PreludeEasy.new_ClientEasy(*args) try: self.this.append(this) except: self.this = this __swig_destroy__ = _PreludeEasy.delete_ClientEasy __del__ = lambda self : None; ClientEasy_swigregister = _PreludeEasy.ClientEasy_swigregister ClientEasy_swigregister(ClientEasy) class IDMEFCriterion(_object): __swig_setmethods__ = {} __setattr__ = lambda self, name, value: _swig_setattr(self, IDMEFCriterion, name, value) __swig_getmethods__ = {} __getattr__ = lambda self, name: _swig_getattr(self, IDMEFCriterion, name) __repr__ = _swig_repr OPERATOR_NOT = _PreludeEasy.IDMEFCriterion_OPERATOR_NOT OPERATOR_NOCASE = _PreludeEasy.IDMEFCriterion_OPERATOR_NOCASE OPERATOR_EQUAL = _PreludeEasy.IDMEFCriterion_OPERATOR_EQUAL OPERATOR_EQUAL_NOCASE = _PreludeEasy.IDMEFCriterion_OPERATOR_EQUAL_NOCASE OPERATOR_NOT_EQUAL = _PreludeEasy.IDMEFCriterion_OPERATOR_NOT_EQUAL OPERATOR_NOT_EQUAL_NOCASE = _PreludeEasy.IDMEFCriterion_OPERATOR_NOT_EQUAL_NOCASE OPERATOR_LESSER = _PreludeEasy.IDMEFCriterion_OPERATOR_LESSER OPERATOR_LESSER_OR_EQUAL = _PreludeEasy.IDMEFCriterion_OPERATOR_LESSER_OR_EQUAL OPERATOR_GREATER = _PreludeEasy.IDMEFCriterion_OPERATOR_GREATER OPERATOR_GREATER_OR_EQUAL = _PreludeEasy.IDMEFCriterion_OPERATOR_GREATER_OR_EQUAL OPERATOR_SUBSTR = _PreludeEasy.IDMEFCriterion_OPERATOR_SUBSTR OPERATOR_SUBSTR_NOCASE = _PreludeEasy.IDMEFCriterion_OPERATOR_SUBSTR_NOCASE OPERATOR_NOT_SUBSTR = _PreludeEasy.IDMEFCriterion_OPERATOR_NOT_SUBSTR OPERATOR_NOT_SUBSTR_NOCASE = _PreludeEasy.IDMEFCriterion_OPERATOR_NOT_SUBSTR_NOCASE OPERATOR_REGEX = _PreludeEasy.IDMEFCriterion_OPERATOR_REGEX OPERATOR_REGEX_NOCASE = _PreludeEasy.IDMEFCriterion_OPERATOR_REGEX_NOCASE OPERATOR_NOT_REGEX = _PreludeEasy.IDMEFCriterion_OPERATOR_NOT_REGEX OPERATOR_NOT_REGEX_NOCASE = _PreludeEasy.IDMEFCriterion_OPERATOR_NOT_REGEX_NOCASE OPERATOR_NULL = _PreludeEasy.IDMEFCriterion_OPERATOR_NULL OPERATOR_NOT_NULL = _PreludeEasy.IDMEFCriterion_OPERATOR_NOT_NULL def __init__(self): this = _PreludeEasy.new_IDMEFCriterion() try: self.this.append(this) except: self.this = this __swig_destroy__ = _PreludeEasy.delete_IDMEFCriterion __del__ = lambda self : None; IDMEFCriterion_swigregister = _PreludeEasy.IDMEFCriterion_swigregister IDMEFCriterion_swigregister(IDMEFCriterion) class IDMEFCriteria(_object): __swig_setmethods__ = {} __setattr__ = lambda self, name, value: _swig_setattr(self, IDMEFCriteria, name, value) __swig_getmethods__ = {} __getattr__ = lambda self, name: _swig_getattr(self, IDMEFCriteria, name) __repr__ = _swig_repr __swig_destroy__ = _PreludeEasy.delete_IDMEFCriteria __del__ = lambda self : None; def __init__(self, *args): this = _PreludeEasy.new_IDMEFCriteria(*args) try: self.this.append(this) except: self.this = this def Match(self, *args): return _PreludeEasy.IDMEFCriteria_Match(self, *args) def Clone(self): return _PreludeEasy.IDMEFCriteria_Clone(self) def ANDCriteria(self, *args): return _PreludeEasy.IDMEFCriteria_ANDCriteria(self, *args) def ORCriteria(self, *args): return _PreludeEasy.IDMEFCriteria_ORCriteria(self, *args) def ToString(self): return _PreludeEasy.IDMEFCriteria_ToString(self) def __str__(self): return _PreludeEasy.IDMEFCriteria___str__(self) IDMEFCriteria_swigregister = _PreludeEasy.IDMEFCriteria_swigregister IDMEFCriteria_swigregister(IDMEFCriteria) class IDMEFValue(_object): __swig_setmethods__ = {} __setattr__ = lambda self, name, value: _swig_setattr(self, IDMEFValue, name, value) __swig_getmethods__ = {} __getattr__ = lambda self, name: _swig_getattr(self, IDMEFValue, name) __repr__ = _swig_repr def GetType(self): return _PreludeEasy.IDMEFValue_GetType(self) def IsNull(self): return _PreludeEasy.IDMEFValue_IsNull(self) __swig_destroy__ = _PreludeEasy.delete_IDMEFValue __del__ = lambda self : None; def __init__(self, *args): this = _PreludeEasy.new_IDMEFValue(*args) try: self.this.append(this) except: self.this = this def Match(self, *args): return _PreludeEasy.IDMEFValue_Match(self, *args) def Clone(self): return _PreludeEasy.IDMEFValue_Clone(self) IDMEFValue_swigregister = _PreludeEasy.IDMEFValue_swigregister IDMEFValue_swigregister(IDMEFValue) class IDMEFPath(_object): __swig_setmethods__ = {} __setattr__ = lambda self, name, value: _swig_setattr(self, IDMEFPath, name, value) __swig_getmethods__ = {} __getattr__ = lambda self, name: _swig_getattr(self, IDMEFPath, name) __repr__ = _swig_repr def __init__(self, *args): this = _PreludeEasy.new_IDMEFPath(*args) try: self.this.append(this) except: self.this = this __swig_destroy__ = _PreludeEasy.delete_IDMEFPath __del__ = lambda self : None; def Get(self, *args): return _PreludeEasy.IDMEFPath_Get(self, *args) def Set(self, *args): return _PreludeEasy.IDMEFPath_Set(self, *args) def GetClass(self, *args): return _PreludeEasy.IDMEFPath_GetClass(self, *args) def GetValueType(self, *args): return _PreludeEasy.IDMEFPath_GetValueType(self, *args) def SetIndex(self, *args): return _PreludeEasy.IDMEFPath_SetIndex(self, *args) def UndefineIndex(self, *args): return _PreludeEasy.IDMEFPath_UndefineIndex(self, *args) def GetIndex(self, *args): return _PreludeEasy.IDMEFPath_GetIndex(self, *args) def MakeChild(self, *args): return _PreludeEasy.IDMEFPath_MakeChild(self, *args) def MakeParent(self): return _PreludeEasy.IDMEFPath_MakeParent(self) def Compare(self, *args): return _PreludeEasy.IDMEFPath_Compare(self, *args) def Clone(self): return _PreludeEasy.IDMEFPath_Clone(self) def CheckOperator(self, *args): return _PreludeEasy.IDMEFPath_CheckOperator(self, *args) def GetApplicableOperators(self): return _PreludeEasy.IDMEFPath_GetApplicableOperators(self) def GetName(self, *args): return _PreludeEasy.IDMEFPath_GetName(self, *args) def IsAmbiguous(self): return _PreludeEasy.IDMEFPath_IsAmbiguous(self) def HasLists(self): return _PreludeEasy.IDMEFPath_HasLists(self) def IsList(self, *args): return _PreludeEasy.IDMEFPath_IsList(self, *args) def GetDepth(self): return _PreludeEasy.IDMEFPath_GetDepth(self) IDMEFPath_swigregister = _PreludeEasy.IDMEFPath_swigregister IDMEFPath_swigregister(IDMEFPath) class IDMEFTime(_object): __swig_setmethods__ = {} __setattr__ = lambda self, name, value: _swig_setattr(self, IDMEFTime, name, value) __swig_getmethods__ = {} __getattr__ = lambda self, name: _swig_getattr(self, IDMEFTime, name) __repr__ = _swig_repr def __init__(self, *args): this = _PreludeEasy.new_IDMEFTime(*args) try: self.this.append(this) except: self.this = this __swig_destroy__ = _PreludeEasy.delete_IDMEFTime __del__ = lambda self : None; def Set(self, *args): return _PreludeEasy.IDMEFTime_Set(self, *args) def SetSec(self, *args): return _PreludeEasy.IDMEFTime_SetSec(self, *args) def SetUSec(self, *args): return _PreludeEasy.IDMEFTime_SetUSec(self, *args) def SetGmtOffset(self, *args): return _PreludeEasy.IDMEFTime_SetGmtOffset(self, *args) def GetSec(self): return _PreludeEasy.IDMEFTime_GetSec(self) def GetUSec(self): return _PreludeEasy.IDMEFTime_GetUSec(self) def GetGmtOffset(self): return _PreludeEasy.IDMEFTime_GetGmtOffset(self) def Clone(self): return _PreludeEasy.IDMEFTime_Clone(self) def ToString(self): return _PreludeEasy.IDMEFTime_ToString(self) def __int__(self): return _PreludeEasy.IDMEFTime___int__(self) def __long__(self): return _PreludeEasy.IDMEFTime___long__(self) def __float__(self): return _PreludeEasy.IDMEFTime___float__(self) def __str__(self): return _PreludeEasy.IDMEFTime___str__(self) def __ne__(self, *args): return _PreludeEasy.IDMEFTime___ne__(self, *args) def __ge__(self, *args): return _PreludeEasy.IDMEFTime___ge__(self, *args) def __le__(self, *args): return _PreludeEasy.IDMEFTime___le__(self, *args) def __eq__(self, *args): return _PreludeEasy.IDMEFTime___eq__(self, *args) def __gt__(self, *args): return _PreludeEasy.IDMEFTime___gt__(self, *args) def __lt__(self, *args): return _PreludeEasy.IDMEFTime___lt__(self, *args) IDMEFTime_swigregister = _PreludeEasy.IDMEFTime_swigregister IDMEFTime_swigregister(IDMEFTime) class IDMEF(_object): __swig_setmethods__ = {} __setattr__ = lambda self, name, value: _swig_setattr(self, IDMEF, name, value) __swig_getmethods__ = {} __getattr__ = lambda self, name: _swig_getattr(self, IDMEF, name) __repr__ = _swig_repr __swig_destroy__ = _PreludeEasy.delete_IDMEF __del__ = lambda self : None; def __init__(self, *args): this = _PreludeEasy.new_IDMEF(*args) try: self.this.append(this) except: self.this = this def Set(self, *args): return _PreludeEasy.IDMEF_Set(self, *args) def Get(self, *args): return _PreludeEasy.IDMEF_Get(self, *args) def Clone(self, *args): return _PreludeEasy.IDMEF_Clone(self, *args) def ToString(self): return _PreludeEasy.IDMEF_ToString(self) def __str__(self): return _PreludeEasy.IDMEF___str__(self) def Write(self, *args): return _PreludeEasy.IDMEF_Write(self, *args) def Read(self, *args): return _PreludeEasy.IDMEF_Read(self, *args) def __rshift__(self, *args): return _PreludeEasy.IDMEF___rshift__(self, *args) def __lshift__(self, *args): return _PreludeEasy.IDMEF___lshift__(self, *args) IDMEF_swigregister = _PreludeEasy.IDMEF_swigregister IDMEF_swigregister(IDMEF) libprelude-1.0.0/bindings/Makefile.am0000664000076400007640000000271411324402500014416 00000000000000SUBDIRS = c++ low-level lua python ruby EXTRA_DIST = libpreludecpp.i perl/libpreludecpp-perl.i perl/Makefile.PL.in CLEANFILES = perl/pm_to_blib perl/PreludeEasy.o perl/blib python/build DISTCLEANFILES=perl/PreludeEasy.cxx MAINTAINERCLEANFILES = \ lua/PreludeEasy.cxx \ perl/Makefile \ perl/PreludeEasy.cxx \ perl/PreludeEasy.pm \ perl/PreludeEasy.bs \ python/_PreludeEasy.cxx \ python/PreludeEasy.py \ ruby/PreludeEasy.cxx all-am: perl if HAVE_EASY_BINDINGS if HAVE_PERL perl: perl-build # # Workaround invalid Makefile generated by MakeMaker when UTF-8 is enabled. # perl-makefile: cd perl && LANG="" DESTDIR=$(DESTDIR) LIBDIR=$(libdir) $(PERL) Makefile.PL @PERL_EXTRA_PARAMS@ CC="$(CXX)" perl/PreludeEasy.cxx: $(top_srcdir)/bindings/c++/include/*.hxx libpreludecpp.i perl/libpreludecpp-perl.i if HAVE_SWIG $(SWIG) -c++ -I$(top_srcdir)/bindings -I$(top_srcdir)/bindings/c++/include -I$(top_srcdir)/src/include -I$(top_srcdir)/src/libprelude-error -perl5 -o $@ libpreludecpp.i endif perl-build: perl/PreludeEasy.cxx perl-makefile cd perl && $(MAKE) LD_RUN_PATH="" CC="$(CXX)" install-exec-hook: perl-makefile cd perl && $(MAKE) LD_RUN_PATH="" install uninstall-hook: perl-makefile cd perl && $(MAKE) uninstall clean-local: cd perl && test -f Makefile && $(MAKE) clean rm -f perl/Makefile.old else perl: endif else perl: endif -include $(top_srcdir)/git.mk libprelude-1.0.0/bindings/Makefile.in0000664000076400007640000014606111347714452014454 00000000000000# Makefile.in generated by automake 1.11.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, # Inc. # This Makefile.in 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. @SET_MAKE@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ target_triplet = @target@ subdir = bindings DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/libmissing/m4/00gnulib.m4 \ $(top_srcdir)/libmissing/m4/alloca.m4 \ $(top_srcdir)/libmissing/m4/arpa_inet_h.m4 \ $(top_srcdir)/libmissing/m4/btowc.m4 \ $(top_srcdir)/libmissing/m4/close.m4 \ $(top_srcdir)/libmissing/m4/codeset.m4 \ $(top_srcdir)/libmissing/m4/cond.m4 \ $(top_srcdir)/libmissing/m4/dos.m4 \ $(top_srcdir)/libmissing/m4/dup2.m4 \ $(top_srcdir)/libmissing/m4/errno_h.m4 \ $(top_srcdir)/libmissing/m4/exponentd.m4 \ $(top_srcdir)/libmissing/m4/exponentf.m4 \ $(top_srcdir)/libmissing/m4/exponentl.m4 \ $(top_srcdir)/libmissing/m4/extensions.m4 \ $(top_srcdir)/libmissing/m4/fclose.m4 \ $(top_srcdir)/libmissing/m4/fcntl-o.m4 \ $(top_srcdir)/libmissing/m4/fcntl_h.m4 \ $(top_srcdir)/libmissing/m4/float_h.m4 \ $(top_srcdir)/libmissing/m4/fopen.m4 \ $(top_srcdir)/libmissing/m4/fpieee.m4 \ $(top_srcdir)/libmissing/m4/frexp.m4 \ $(top_srcdir)/libmissing/m4/frexpl.m4 \ $(top_srcdir)/libmissing/m4/fseeko.m4 \ $(top_srcdir)/libmissing/m4/ftw.m4 \ $(top_srcdir)/libmissing/m4/getaddrinfo.m4 \ $(top_srcdir)/libmissing/m4/getdelim.m4 \ $(top_srcdir)/libmissing/m4/gethostname.m4 \ $(top_srcdir)/libmissing/m4/getline.m4 \ $(top_srcdir)/libmissing/m4/getpagesize.m4 \ $(top_srcdir)/libmissing/m4/getpass.m4 \ $(top_srcdir)/libmissing/m4/gettimeofday.m4 \ $(top_srcdir)/libmissing/m4/glibc21.m4 \ $(top_srcdir)/libmissing/m4/gnulib-common.m4 \ $(top_srcdir)/libmissing/m4/gnulib-comp.m4 \ $(top_srcdir)/libmissing/m4/gnulib-tool.m4 \ $(top_srcdir)/libmissing/m4/hostent.m4 \ $(top_srcdir)/libmissing/m4/include_next.m4 \ $(top_srcdir)/libmissing/m4/inet_ntop.m4 \ $(top_srcdir)/libmissing/m4/inet_pton.m4 \ $(top_srcdir)/libmissing/m4/intmax_t.m4 \ $(top_srcdir)/libmissing/m4/inttypes_h.m4 \ $(top_srcdir)/libmissing/m4/isnand.m4 \ $(top_srcdir)/libmissing/m4/isnanf.m4 \ $(top_srcdir)/libmissing/m4/isnanl.m4 \ $(top_srcdir)/libmissing/m4/langinfo_h.m4 \ $(top_srcdir)/libmissing/m4/ldexpl.m4 \ $(top_srcdir)/libmissing/m4/lib-ld.m4 \ $(top_srcdir)/libmissing/m4/lib-link.m4 \ $(top_srcdir)/libmissing/m4/lib-prefix.m4 \ $(top_srcdir)/libmissing/m4/localcharset.m4 \ $(top_srcdir)/libmissing/m4/locale-fr.m4 \ $(top_srcdir)/libmissing/m4/locale-ja.m4 \ $(top_srcdir)/libmissing/m4/locale-tr.m4 \ $(top_srcdir)/libmissing/m4/locale-zh.m4 \ $(top_srcdir)/libmissing/m4/lock.m4 \ $(top_srcdir)/libmissing/m4/longlong.m4 \ $(top_srcdir)/libmissing/m4/lseek.m4 \ $(top_srcdir)/libmissing/m4/lstat.m4 \ $(top_srcdir)/libmissing/m4/malloc.m4 \ $(top_srcdir)/libmissing/m4/math_h.m4 \ $(top_srcdir)/libmissing/m4/mbrtowc.m4 \ $(top_srcdir)/libmissing/m4/mbsinit.m4 \ $(top_srcdir)/libmissing/m4/mbstate_t.m4 \ $(top_srcdir)/libmissing/m4/memchr.m4 \ $(top_srcdir)/libmissing/m4/memmem.m4 \ $(top_srcdir)/libmissing/m4/minmax.m4 \ $(top_srcdir)/libmissing/m4/mktime.m4 \ $(top_srcdir)/libmissing/m4/mmap-anon.m4 \ $(top_srcdir)/libmissing/m4/mode_t.m4 \ $(top_srcdir)/libmissing/m4/multiarch.m4 \ $(top_srcdir)/libmissing/m4/netdb_h.m4 \ $(top_srcdir)/libmissing/m4/netinet_in_h.m4 \ $(top_srcdir)/libmissing/m4/nl_langinfo.m4 \ $(top_srcdir)/libmissing/m4/nocrash.m4 \ $(top_srcdir)/libmissing/m4/onceonly.m4 \ $(top_srcdir)/libmissing/m4/open.m4 \ $(top_srcdir)/libmissing/m4/pathmax.m4 \ $(top_srcdir)/libmissing/m4/perror.m4 \ $(top_srcdir)/libmissing/m4/poll.m4 \ $(top_srcdir)/libmissing/m4/printf-frexp.m4 \ $(top_srcdir)/libmissing/m4/printf-frexpl.m4 \ $(top_srcdir)/libmissing/m4/printf.m4 \ $(top_srcdir)/libmissing/m4/realloc.m4 \ $(top_srcdir)/libmissing/m4/regex.m4 \ $(top_srcdir)/libmissing/m4/relocatable-lib.m4 \ $(top_srcdir)/libmissing/m4/select.m4 \ $(top_srcdir)/libmissing/m4/servent.m4 \ $(top_srcdir)/libmissing/m4/signal_h.m4 \ $(top_srcdir)/libmissing/m4/signalblocking.m4 \ $(top_srcdir)/libmissing/m4/signbit.m4 \ $(top_srcdir)/libmissing/m4/size_max.m4 \ $(top_srcdir)/libmissing/m4/sleep.m4 \ $(top_srcdir)/libmissing/m4/snprintf-posix.m4 \ $(top_srcdir)/libmissing/m4/snprintf.m4 \ $(top_srcdir)/libmissing/m4/sockets.m4 \ $(top_srcdir)/libmissing/m4/socklen.m4 \ $(top_srcdir)/libmissing/m4/sockpfaf.m4 \ $(top_srcdir)/libmissing/m4/ssize_t.m4 \ $(top_srcdir)/libmissing/m4/stat.m4 \ $(top_srcdir)/libmissing/m4/stdbool.m4 \ $(top_srcdir)/libmissing/m4/stddef_h.m4 \ $(top_srcdir)/libmissing/m4/stdint.m4 \ $(top_srcdir)/libmissing/m4/stdint_h.m4 \ $(top_srcdir)/libmissing/m4/stdio_h.m4 \ $(top_srcdir)/libmissing/m4/stdlib_h.m4 \ $(top_srcdir)/libmissing/m4/strcase.m4 \ $(top_srcdir)/libmissing/m4/strcasestr.m4 \ $(top_srcdir)/libmissing/m4/strdup.m4 \ $(top_srcdir)/libmissing/m4/strerror.m4 \ $(top_srcdir)/libmissing/m4/string_h.m4 \ $(top_srcdir)/libmissing/m4/strings_h.m4 \ $(top_srcdir)/libmissing/m4/strndup.m4 \ $(top_srcdir)/libmissing/m4/strnlen.m4 \ $(top_srcdir)/libmissing/m4/strptime.m4 \ $(top_srcdir)/libmissing/m4/strsep.m4 \ $(top_srcdir)/libmissing/m4/symlink.m4 \ $(top_srcdir)/libmissing/m4/sys_ioctl_h.m4 \ $(top_srcdir)/libmissing/m4/sys_select_h.m4 \ $(top_srcdir)/libmissing/m4/sys_socket_h.m4 \ $(top_srcdir)/libmissing/m4/sys_stat_h.m4 \ $(top_srcdir)/libmissing/m4/sys_time_h.m4 \ $(top_srcdir)/libmissing/m4/sys_utsname_h.m4 \ $(top_srcdir)/libmissing/m4/thread.m4 \ $(top_srcdir)/libmissing/m4/threadlib.m4 \ $(top_srcdir)/libmissing/m4/time_h.m4 \ $(top_srcdir)/libmissing/m4/time_r.m4 \ $(top_srcdir)/libmissing/m4/timegm.m4 \ $(top_srcdir)/libmissing/m4/tls.m4 \ $(top_srcdir)/libmissing/m4/tm_gmtoff.m4 \ $(top_srcdir)/libmissing/m4/uname.m4 \ $(top_srcdir)/libmissing/m4/ungetc.m4 \ $(top_srcdir)/libmissing/m4/unistd_h.m4 \ $(top_srcdir)/libmissing/m4/vasnprintf.m4 \ $(top_srcdir)/libmissing/m4/vsnprintf-posix.m4 \ $(top_srcdir)/libmissing/m4/vsnprintf.m4 \ $(top_srcdir)/libmissing/m4/warn-on-use.m4 \ $(top_srcdir)/libmissing/m4/wchar.m4 \ $(top_srcdir)/libmissing/m4/wchar_t.m4 \ $(top_srcdir)/libmissing/m4/wcrtomb.m4 \ $(top_srcdir)/libmissing/m4/wctob.m4 \ $(top_srcdir)/libmissing/m4/wctype.m4 \ $(top_srcdir)/libmissing/m4/wint_t.m4 \ $(top_srcdir)/libmissing/m4/write.m4 \ $(top_srcdir)/libmissing/m4/xsize.m4 \ $(top_srcdir)/libmissing/m4/yield.m4 \ $(top_srcdir)/m4/ac_compile_check_sizeof.m4 \ $(top_srcdir)/m4/am_path_ruby.m4 $(top_srcdir)/m4/argz.m4 \ $(top_srcdir)/m4/as-ac-expand.m4 \ $(top_srcdir)/m4/ax_c_check_flag.m4 \ $(top_srcdir)/m4/ax_check_aligned_access_required.m4 \ $(top_srcdir)/m4/ax_create_prelude_inttypes_h.m4 \ $(top_srcdir)/m4/ax_ld_check_flag.m4 \ $(top_srcdir)/m4/gtk-doc.m4 $(top_srcdir)/m4/libgcrypt.m4 \ $(top_srcdir)/m4/libgnutls-extra.m4 \ $(top_srcdir)/m4/libgnutls.m4 $(top_srcdir)/m4/libtool.m4 \ $(top_srcdir)/m4/ltdl.m4 $(top_srcdir)/m4/ltoptions.m4 \ $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/m4/pkg.m4 \ $(top_srcdir)/configure.in am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = SOURCES = DIST_SOURCES = RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \ html-recursive info-recursive install-data-recursive \ install-dvi-recursive install-exec-recursive \ install-html-recursive install-info-recursive \ install-pdf-recursive install-ps-recursive install-recursive \ installcheck-recursive installdirs-recursive pdf-recursive \ ps-recursive uninstall-recursive RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ distclean-recursive maintainer-clean-recursive AM_RECURSIVE_TARGETS = $(RECURSIVE_TARGETS:-recursive=) \ $(RECURSIVE_CLEAN_TARGETS:-recursive=) tags TAGS ctags CTAGS \ distdir ETAGS = etags CTAGS = ctags DIST_SUBDIRS = $(SUBDIRS) DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) am__relativize = \ dir0=`pwd`; \ sed_first='s,^\([^/]*\)/.*$$,\1,'; \ sed_rest='s,^[^/]*/*,,'; \ sed_last='s,^.*/\([^/]*\)$$,\1,'; \ sed_butlast='s,/*[^/]*$$,,'; \ while test -n "$$dir1"; do \ first=`echo "$$dir1" | sed -e "$$sed_first"`; \ if test "$$first" != "."; then \ if test "$$first" = ".."; then \ dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \ dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \ else \ first2=`echo "$$dir2" | sed -e "$$sed_first"`; \ if test "$$first2" = "$$first"; then \ dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \ else \ dir2="../$$dir2"; \ fi; \ dir0="$$dir0"/"$$first"; \ fi; \ fi; \ dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \ done; \ reldir="$$dir2" ACLOCAL = @ACLOCAL@ ALLOCA = @ALLOCA@ ALLOCA_H = @ALLOCA_H@ AMTAR = @AMTAR@ APPLE_UNIVERSAL_BUILD = @APPLE_UNIVERSAL_BUILD@ AR = @AR@ ARGZ_H = @ARGZ_H@ AS = @AS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ BINDINGS_CC = @BINDINGS_CC@ BINDIR = @BINDIR@ BITSIZEOF_PTRDIFF_T = @BITSIZEOF_PTRDIFF_T@ BITSIZEOF_SIG_ATOMIC_T = @BITSIZEOF_SIG_ATOMIC_T@ BITSIZEOF_SIZE_T = @BITSIZEOF_SIZE_T@ BITSIZEOF_WCHAR_T = @BITSIZEOF_WCHAR_T@ BITSIZEOF_WINT_T = @BITSIZEOF_WINT_T@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CC_FOR_BUILD = @CC_FOR_BUILD@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EMULTIHOP_HIDDEN = @EMULTIHOP_HIDDEN@ EMULTIHOP_VALUE = @EMULTIHOP_VALUE@ ENOLINK_HIDDEN = @ENOLINK_HIDDEN@ ENOLINK_VALUE = @ENOLINK_VALUE@ EOVERFLOW_HIDDEN = @EOVERFLOW_HIDDEN@ EOVERFLOW_VALUE = @EOVERFLOW_VALUE@ ERRNO_H = @ERRNO_H@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ FLOAT_H = @FLOAT_H@ GETADDRINFO_LIB = @GETADDRINFO_LIB@ GETHOSTNAME_LIB = @GETHOSTNAME_LIB@ GLIBC21 = @GLIBC21@ GNULIB_ACCEPT = @GNULIB_ACCEPT@ GNULIB_ACCEPT4 = @GNULIB_ACCEPT4@ GNULIB_ACOSL = @GNULIB_ACOSL@ GNULIB_ASINL = @GNULIB_ASINL@ GNULIB_ATANL = @GNULIB_ATANL@ GNULIB_ATOLL = @GNULIB_ATOLL@ GNULIB_BIND = @GNULIB_BIND@ GNULIB_BTOWC = @GNULIB_BTOWC@ GNULIB_CALLOC_POSIX = @GNULIB_CALLOC_POSIX@ GNULIB_CANONICALIZE_FILE_NAME = @GNULIB_CANONICALIZE_FILE_NAME@ GNULIB_CEILF = @GNULIB_CEILF@ GNULIB_CEILL = @GNULIB_CEILL@ GNULIB_CHOWN = @GNULIB_CHOWN@ GNULIB_CLOSE = @GNULIB_CLOSE@ GNULIB_CONNECT = @GNULIB_CONNECT@ GNULIB_COSL = @GNULIB_COSL@ GNULIB_DPRINTF = @GNULIB_DPRINTF@ GNULIB_DUP2 = @GNULIB_DUP2@ GNULIB_DUP3 = @GNULIB_DUP3@ GNULIB_ENVIRON = @GNULIB_ENVIRON@ GNULIB_EUIDACCESS = @GNULIB_EUIDACCESS@ GNULIB_EXPL = @GNULIB_EXPL@ GNULIB_FACCESSAT = @GNULIB_FACCESSAT@ GNULIB_FCHDIR = @GNULIB_FCHDIR@ GNULIB_FCHMODAT = @GNULIB_FCHMODAT@ GNULIB_FCHOWNAT = @GNULIB_FCHOWNAT@ GNULIB_FCLOSE = @GNULIB_FCLOSE@ GNULIB_FCNTL = @GNULIB_FCNTL@ GNULIB_FFLUSH = @GNULIB_FFLUSH@ GNULIB_FLOORF = @GNULIB_FLOORF@ GNULIB_FLOORL = @GNULIB_FLOORL@ GNULIB_FOPEN = @GNULIB_FOPEN@ GNULIB_FPRINTF = @GNULIB_FPRINTF@ GNULIB_FPRINTF_POSIX = @GNULIB_FPRINTF_POSIX@ GNULIB_FPURGE = @GNULIB_FPURGE@ GNULIB_FPUTC = @GNULIB_FPUTC@ GNULIB_FPUTS = @GNULIB_FPUTS@ GNULIB_FREOPEN = @GNULIB_FREOPEN@ GNULIB_FREXP = @GNULIB_FREXP@ GNULIB_FREXPL = @GNULIB_FREXPL@ GNULIB_FSEEK = @GNULIB_FSEEK@ GNULIB_FSEEKO = @GNULIB_FSEEKO@ GNULIB_FSTATAT = @GNULIB_FSTATAT@ GNULIB_FSYNC = @GNULIB_FSYNC@ GNULIB_FTELL = @GNULIB_FTELL@ GNULIB_FTELLO = @GNULIB_FTELLO@ GNULIB_FTRUNCATE = @GNULIB_FTRUNCATE@ GNULIB_FUTIMENS = @GNULIB_FUTIMENS@ GNULIB_FWRITE = @GNULIB_FWRITE@ GNULIB_GETADDRINFO = @GNULIB_GETADDRINFO@ GNULIB_GETCWD = @GNULIB_GETCWD@ GNULIB_GETDELIM = @GNULIB_GETDELIM@ GNULIB_GETDOMAINNAME = @GNULIB_GETDOMAINNAME@ GNULIB_GETDTABLESIZE = @GNULIB_GETDTABLESIZE@ GNULIB_GETGROUPS = @GNULIB_GETGROUPS@ GNULIB_GETHOSTNAME = @GNULIB_GETHOSTNAME@ GNULIB_GETLINE = @GNULIB_GETLINE@ GNULIB_GETLOADAVG = @GNULIB_GETLOADAVG@ GNULIB_GETLOGIN = @GNULIB_GETLOGIN@ GNULIB_GETLOGIN_R = @GNULIB_GETLOGIN_R@ GNULIB_GETPAGESIZE = @GNULIB_GETPAGESIZE@ GNULIB_GETPEERNAME = @GNULIB_GETPEERNAME@ GNULIB_GETSOCKNAME = @GNULIB_GETSOCKNAME@ GNULIB_GETSOCKOPT = @GNULIB_GETSOCKOPT@ GNULIB_GETSUBOPT = @GNULIB_GETSUBOPT@ GNULIB_GETTIMEOFDAY = @GNULIB_GETTIMEOFDAY@ GNULIB_GETUSERSHELL = @GNULIB_GETUSERSHELL@ GNULIB_INET_NTOP = @GNULIB_INET_NTOP@ GNULIB_INET_PTON = @GNULIB_INET_PTON@ GNULIB_IOCTL = @GNULIB_IOCTL@ GNULIB_ISFINITE = @GNULIB_ISFINITE@ GNULIB_ISINF = @GNULIB_ISINF@ GNULIB_ISNAN = @GNULIB_ISNAN@ GNULIB_ISNAND = @GNULIB_ISNAND@ GNULIB_ISNANF = @GNULIB_ISNANF@ GNULIB_ISNANL = @GNULIB_ISNANL@ GNULIB_LCHMOD = @GNULIB_LCHMOD@ GNULIB_LCHOWN = @GNULIB_LCHOWN@ GNULIB_LDEXPL = @GNULIB_LDEXPL@ GNULIB_LINK = @GNULIB_LINK@ GNULIB_LINKAT = @GNULIB_LINKAT@ GNULIB_LISTEN = @GNULIB_LISTEN@ GNULIB_LOGL = @GNULIB_LOGL@ GNULIB_LSEEK = @GNULIB_LSEEK@ GNULIB_LSTAT = @GNULIB_LSTAT@ GNULIB_MALLOC_POSIX = @GNULIB_MALLOC_POSIX@ GNULIB_MBRLEN = @GNULIB_MBRLEN@ GNULIB_MBRTOWC = @GNULIB_MBRTOWC@ GNULIB_MBSCASECMP = @GNULIB_MBSCASECMP@ GNULIB_MBSCASESTR = @GNULIB_MBSCASESTR@ GNULIB_MBSCHR = @GNULIB_MBSCHR@ GNULIB_MBSCSPN = @GNULIB_MBSCSPN@ GNULIB_MBSINIT = @GNULIB_MBSINIT@ GNULIB_MBSLEN = @GNULIB_MBSLEN@ GNULIB_MBSNCASECMP = @GNULIB_MBSNCASECMP@ GNULIB_MBSNLEN = @GNULIB_MBSNLEN@ GNULIB_MBSNRTOWCS = @GNULIB_MBSNRTOWCS@ GNULIB_MBSPBRK = @GNULIB_MBSPBRK@ GNULIB_MBSPCASECMP = @GNULIB_MBSPCASECMP@ GNULIB_MBSRCHR = @GNULIB_MBSRCHR@ GNULIB_MBSRTOWCS = @GNULIB_MBSRTOWCS@ GNULIB_MBSSEP = @GNULIB_MBSSEP@ GNULIB_MBSSPN = @GNULIB_MBSSPN@ GNULIB_MBSSTR = @GNULIB_MBSSTR@ GNULIB_MBSTOK_R = @GNULIB_MBSTOK_R@ GNULIB_MEMCHR = @GNULIB_MEMCHR@ GNULIB_MEMMEM = @GNULIB_MEMMEM@ GNULIB_MEMPCPY = @GNULIB_MEMPCPY@ GNULIB_MEMRCHR = @GNULIB_MEMRCHR@ GNULIB_MKDIRAT = @GNULIB_MKDIRAT@ GNULIB_MKDTEMP = @GNULIB_MKDTEMP@ GNULIB_MKFIFO = @GNULIB_MKFIFO@ GNULIB_MKFIFOAT = @GNULIB_MKFIFOAT@ GNULIB_MKNOD = @GNULIB_MKNOD@ GNULIB_MKNODAT = @GNULIB_MKNODAT@ GNULIB_MKOSTEMP = @GNULIB_MKOSTEMP@ GNULIB_MKOSTEMPS = @GNULIB_MKOSTEMPS@ GNULIB_MKSTEMP = @GNULIB_MKSTEMP@ GNULIB_MKSTEMPS = @GNULIB_MKSTEMPS@ GNULIB_NL_LANGINFO = @GNULIB_NL_LANGINFO@ GNULIB_OBSTACK_PRINTF = @GNULIB_OBSTACK_PRINTF@ GNULIB_OBSTACK_PRINTF_POSIX = @GNULIB_OBSTACK_PRINTF_POSIX@ GNULIB_OPEN = @GNULIB_OPEN@ GNULIB_OPENAT = @GNULIB_OPENAT@ GNULIB_PERROR = @GNULIB_PERROR@ GNULIB_PIPE2 = @GNULIB_PIPE2@ GNULIB_POPEN = @GNULIB_POPEN@ GNULIB_PREAD = @GNULIB_PREAD@ GNULIB_PRINTF = @GNULIB_PRINTF@ GNULIB_PRINTF_POSIX = @GNULIB_PRINTF_POSIX@ GNULIB_PUTC = @GNULIB_PUTC@ GNULIB_PUTCHAR = @GNULIB_PUTCHAR@ GNULIB_PUTENV = @GNULIB_PUTENV@ GNULIB_PUTS = @GNULIB_PUTS@ GNULIB_RANDOM_R = @GNULIB_RANDOM_R@ GNULIB_RAWMEMCHR = @GNULIB_RAWMEMCHR@ GNULIB_READLINK = @GNULIB_READLINK@ GNULIB_READLINKAT = @GNULIB_READLINKAT@ GNULIB_REALLOC_POSIX = @GNULIB_REALLOC_POSIX@ GNULIB_REALPATH = @GNULIB_REALPATH@ GNULIB_RECV = @GNULIB_RECV@ GNULIB_RECVFROM = @GNULIB_RECVFROM@ GNULIB_REMOVE = @GNULIB_REMOVE@ GNULIB_RENAME = @GNULIB_RENAME@ GNULIB_RENAMEAT = @GNULIB_RENAMEAT@ GNULIB_RMDIR = @GNULIB_RMDIR@ GNULIB_ROUND = @GNULIB_ROUND@ GNULIB_ROUNDF = @GNULIB_ROUNDF@ GNULIB_ROUNDL = @GNULIB_ROUNDL@ GNULIB_RPMATCH = @GNULIB_RPMATCH@ GNULIB_SELECT = @GNULIB_SELECT@ GNULIB_SEND = @GNULIB_SEND@ GNULIB_SENDTO = @GNULIB_SENDTO@ GNULIB_SETENV = @GNULIB_SETENV@ GNULIB_SETSOCKOPT = @GNULIB_SETSOCKOPT@ GNULIB_SHUTDOWN = @GNULIB_SHUTDOWN@ GNULIB_SIGACTION = @GNULIB_SIGACTION@ GNULIB_SIGNAL_H_SIGPIPE = @GNULIB_SIGNAL_H_SIGPIPE@ GNULIB_SIGNBIT = @GNULIB_SIGNBIT@ GNULIB_SIGPROCMASK = @GNULIB_SIGPROCMASK@ GNULIB_SINL = @GNULIB_SINL@ GNULIB_SLEEP = @GNULIB_SLEEP@ GNULIB_SNPRINTF = @GNULIB_SNPRINTF@ GNULIB_SOCKET = @GNULIB_SOCKET@ GNULIB_SPRINTF_POSIX = @GNULIB_SPRINTF_POSIX@ GNULIB_SQRTL = @GNULIB_SQRTL@ GNULIB_STAT = @GNULIB_STAT@ GNULIB_STDIO_H_SIGPIPE = @GNULIB_STDIO_H_SIGPIPE@ GNULIB_STPCPY = @GNULIB_STPCPY@ GNULIB_STPNCPY = @GNULIB_STPNCPY@ GNULIB_STRCASESTR = @GNULIB_STRCASESTR@ GNULIB_STRCHRNUL = @GNULIB_STRCHRNUL@ GNULIB_STRDUP = @GNULIB_STRDUP@ GNULIB_STRERROR = @GNULIB_STRERROR@ GNULIB_STRNDUP = @GNULIB_STRNDUP@ GNULIB_STRNLEN = @GNULIB_STRNLEN@ GNULIB_STRPBRK = @GNULIB_STRPBRK@ GNULIB_STRSEP = @GNULIB_STRSEP@ GNULIB_STRSIGNAL = @GNULIB_STRSIGNAL@ GNULIB_STRSTR = @GNULIB_STRSTR@ GNULIB_STRTOD = @GNULIB_STRTOD@ GNULIB_STRTOK_R = @GNULIB_STRTOK_R@ GNULIB_STRTOLL = @GNULIB_STRTOLL@ GNULIB_STRTOULL = @GNULIB_STRTOULL@ GNULIB_STRVERSCMP = @GNULIB_STRVERSCMP@ GNULIB_SYMLINK = @GNULIB_SYMLINK@ GNULIB_SYMLINKAT = @GNULIB_SYMLINKAT@ GNULIB_TANL = @GNULIB_TANL@ GNULIB_TRUNC = @GNULIB_TRUNC@ GNULIB_TRUNCF = @GNULIB_TRUNCF@ GNULIB_TRUNCL = @GNULIB_TRUNCL@ GNULIB_UNAME = @GNULIB_UNAME@ GNULIB_UNISTD_H_GETOPT = @GNULIB_UNISTD_H_GETOPT@ GNULIB_UNISTD_H_SIGPIPE = @GNULIB_UNISTD_H_SIGPIPE@ GNULIB_UNLINK = @GNULIB_UNLINK@ GNULIB_UNLINKAT = @GNULIB_UNLINKAT@ GNULIB_UNSETENV = @GNULIB_UNSETENV@ GNULIB_USLEEP = @GNULIB_USLEEP@ GNULIB_UTIMENSAT = @GNULIB_UTIMENSAT@ GNULIB_VASPRINTF = @GNULIB_VASPRINTF@ GNULIB_VDPRINTF = @GNULIB_VDPRINTF@ GNULIB_VFPRINTF = @GNULIB_VFPRINTF@ GNULIB_VFPRINTF_POSIX = @GNULIB_VFPRINTF_POSIX@ GNULIB_VPRINTF = @GNULIB_VPRINTF@ GNULIB_VPRINTF_POSIX = @GNULIB_VPRINTF_POSIX@ GNULIB_VSNPRINTF = @GNULIB_VSNPRINTF@ GNULIB_VSPRINTF_POSIX = @GNULIB_VSPRINTF_POSIX@ GNULIB_WCRTOMB = @GNULIB_WCRTOMB@ GNULIB_WCSNRTOMBS = @GNULIB_WCSNRTOMBS@ GNULIB_WCSRTOMBS = @GNULIB_WCSRTOMBS@ GNULIB_WCTOB = @GNULIB_WCTOB@ GNULIB_WCWIDTH = @GNULIB_WCWIDTH@ GNULIB_WRITE = @GNULIB_WRITE@ GREP = @GREP@ GTKDOC_CHECK = @GTKDOC_CHECK@ HAVE_ACCEPT4 = @HAVE_ACCEPT4@ HAVE_ACOSL = @HAVE_ACOSL@ HAVE_ARPA_INET_H = @HAVE_ARPA_INET_H@ HAVE_ASINL = @HAVE_ASINL@ HAVE_ATANL = @HAVE_ATANL@ HAVE_ATOLL = @HAVE_ATOLL@ HAVE_BTOWC = @HAVE_BTOWC@ HAVE_CALLOC_POSIX = @HAVE_CALLOC_POSIX@ HAVE_CANONICALIZE_FILE_NAME = @HAVE_CANONICALIZE_FILE_NAME@ HAVE_CHOWN = @HAVE_CHOWN@ HAVE_COSL = @HAVE_COSL@ HAVE_CXX = @HAVE_CXX@ HAVE_DECL_ACOSL = @HAVE_DECL_ACOSL@ HAVE_DECL_ASINL = @HAVE_DECL_ASINL@ HAVE_DECL_ATANL = @HAVE_DECL_ATANL@ HAVE_DECL_COSL = @HAVE_DECL_COSL@ HAVE_DECL_ENVIRON = @HAVE_DECL_ENVIRON@ HAVE_DECL_EXPL = @HAVE_DECL_EXPL@ HAVE_DECL_FPURGE = @HAVE_DECL_FPURGE@ HAVE_DECL_FREEADDRINFO = @HAVE_DECL_FREEADDRINFO@ HAVE_DECL_FREXPL = @HAVE_DECL_FREXPL@ HAVE_DECL_GAI_STRERROR = @HAVE_DECL_GAI_STRERROR@ HAVE_DECL_GETADDRINFO = @HAVE_DECL_GETADDRINFO@ HAVE_DECL_GETDELIM = @HAVE_DECL_GETDELIM@ HAVE_DECL_GETLINE = @HAVE_DECL_GETLINE@ HAVE_DECL_GETLOADAVG = @HAVE_DECL_GETLOADAVG@ HAVE_DECL_GETLOGIN_R = @HAVE_DECL_GETLOGIN_R@ HAVE_DECL_GETNAMEINFO = @HAVE_DECL_GETNAMEINFO@ HAVE_DECL_INET_NTOP = @HAVE_DECL_INET_NTOP@ HAVE_DECL_INET_PTON = @HAVE_DECL_INET_PTON@ HAVE_DECL_LDEXPL = @HAVE_DECL_LDEXPL@ HAVE_DECL_LOGL = @HAVE_DECL_LOGL@ HAVE_DECL_MEMMEM = @HAVE_DECL_MEMMEM@ HAVE_DECL_MEMRCHR = @HAVE_DECL_MEMRCHR@ HAVE_DECL_OBSTACK_PRINTF = @HAVE_DECL_OBSTACK_PRINTF@ HAVE_DECL_SINL = @HAVE_DECL_SINL@ HAVE_DECL_SNPRINTF = @HAVE_DECL_SNPRINTF@ HAVE_DECL_SQRTL = @HAVE_DECL_SQRTL@ HAVE_DECL_STRDUP = @HAVE_DECL_STRDUP@ HAVE_DECL_STRERROR = @HAVE_DECL_STRERROR@ HAVE_DECL_STRNCASECMP = @HAVE_DECL_STRNCASECMP@ HAVE_DECL_STRNDUP = @HAVE_DECL_STRNDUP@ HAVE_DECL_STRNLEN = @HAVE_DECL_STRNLEN@ HAVE_DECL_STRSIGNAL = @HAVE_DECL_STRSIGNAL@ HAVE_DECL_STRTOK_R = @HAVE_DECL_STRTOK_R@ HAVE_DECL_TANL = @HAVE_DECL_TANL@ HAVE_DECL_TRUNC = @HAVE_DECL_TRUNC@ HAVE_DECL_TRUNCF = @HAVE_DECL_TRUNCF@ HAVE_DECL_VSNPRINTF = @HAVE_DECL_VSNPRINTF@ HAVE_DECL_WCTOB = @HAVE_DECL_WCTOB@ HAVE_DECL_WCWIDTH = @HAVE_DECL_WCWIDTH@ HAVE_DPRINTF = @HAVE_DPRINTF@ HAVE_DUP2 = @HAVE_DUP2@ HAVE_DUP3 = @HAVE_DUP3@ HAVE_EUIDACCESS = @HAVE_EUIDACCESS@ HAVE_EXPL = @HAVE_EXPL@ HAVE_FACCESSAT = @HAVE_FACCESSAT@ HAVE_FCHMODAT = @HAVE_FCHMODAT@ HAVE_FCHOWNAT = @HAVE_FCHOWNAT@ HAVE_FCNTL = @HAVE_FCNTL@ HAVE_FSTATAT = @HAVE_FSTATAT@ HAVE_FSYNC = @HAVE_FSYNC@ HAVE_FTRUNCATE = @HAVE_FTRUNCATE@ HAVE_FUTIMENS = @HAVE_FUTIMENS@ HAVE_GETDOMAINNAME = @HAVE_GETDOMAINNAME@ HAVE_GETDTABLESIZE = @HAVE_GETDTABLESIZE@ HAVE_GETGROUPS = @HAVE_GETGROUPS@ HAVE_GETHOSTNAME = @HAVE_GETHOSTNAME@ HAVE_GETLOGIN = @HAVE_GETLOGIN@ HAVE_GETPAGESIZE = @HAVE_GETPAGESIZE@ HAVE_GETSUBOPT = @HAVE_GETSUBOPT@ HAVE_GETUSERSHELL = @HAVE_GETUSERSHELL@ HAVE_INTTYPES_H = @HAVE_INTTYPES_H@ HAVE_ISNAND = @HAVE_ISNAND@ HAVE_ISNANF = @HAVE_ISNANF@ HAVE_ISNANL = @HAVE_ISNANL@ HAVE_ISWCNTRL = @HAVE_ISWCNTRL@ HAVE_LANGINFO_CODESET = @HAVE_LANGINFO_CODESET@ HAVE_LANGINFO_ERA = @HAVE_LANGINFO_ERA@ HAVE_LANGINFO_H = @HAVE_LANGINFO_H@ HAVE_LCHMOD = @HAVE_LCHMOD@ HAVE_LCHOWN = @HAVE_LCHOWN@ HAVE_LINK = @HAVE_LINK@ HAVE_LINKAT = @HAVE_LINKAT@ HAVE_LOGL = @HAVE_LOGL@ HAVE_LONG_LONG_INT = @HAVE_LONG_LONG_INT@ HAVE_LSTAT = @HAVE_LSTAT@ HAVE_MALLOC_POSIX = @HAVE_MALLOC_POSIX@ HAVE_MBRLEN = @HAVE_MBRLEN@ HAVE_MBRTOWC = @HAVE_MBRTOWC@ HAVE_MBSINIT = @HAVE_MBSINIT@ HAVE_MBSLEN = @HAVE_MBSLEN@ HAVE_MBSNRTOWCS = @HAVE_MBSNRTOWCS@ HAVE_MBSRTOWCS = @HAVE_MBSRTOWCS@ HAVE_MEMPCPY = @HAVE_MEMPCPY@ HAVE_MKDIRAT = @HAVE_MKDIRAT@ HAVE_MKDTEMP = @HAVE_MKDTEMP@ HAVE_MKFIFO = @HAVE_MKFIFO@ HAVE_MKFIFOAT = @HAVE_MKFIFOAT@ HAVE_MKNOD = @HAVE_MKNOD@ HAVE_MKNODAT = @HAVE_MKNODAT@ HAVE_MKOSTEMP = @HAVE_MKOSTEMP@ HAVE_MKOSTEMPS = @HAVE_MKOSTEMPS@ HAVE_MKSTEMPS = @HAVE_MKSTEMPS@ HAVE_NETDB_H = @HAVE_NETDB_H@ HAVE_NETINET_IN_H = @HAVE_NETINET_IN_H@ HAVE_NL_LANGINFO = @HAVE_NL_LANGINFO@ HAVE_OPENAT = @HAVE_OPENAT@ HAVE_OS_H = @HAVE_OS_H@ HAVE_PIPE2 = @HAVE_PIPE2@ HAVE_POSIX_SIGNALBLOCKING = @HAVE_POSIX_SIGNALBLOCKING@ HAVE_PREAD = @HAVE_PREAD@ HAVE_RANDOM_H = @HAVE_RANDOM_H@ HAVE_RANDOM_R = @HAVE_RANDOM_R@ HAVE_RAWMEMCHR = @HAVE_RAWMEMCHR@ HAVE_READLINK = @HAVE_READLINK@ HAVE_READLINKAT = @HAVE_READLINKAT@ HAVE_REALLOC_POSIX = @HAVE_REALLOC_POSIX@ HAVE_REALPATH = @HAVE_REALPATH@ HAVE_RENAMEAT = @HAVE_RENAMEAT@ HAVE_RPMATCH = @HAVE_RPMATCH@ HAVE_SA_FAMILY_T = @HAVE_SA_FAMILY_T@ HAVE_SETENV = @HAVE_SETENV@ HAVE_SIGACTION = @HAVE_SIGACTION@ HAVE_SIGINFO_T = @HAVE_SIGINFO_T@ HAVE_SIGNED_SIG_ATOMIC_T = @HAVE_SIGNED_SIG_ATOMIC_T@ HAVE_SIGNED_WCHAR_T = @HAVE_SIGNED_WCHAR_T@ HAVE_SIGNED_WINT_T = @HAVE_SIGNED_WINT_T@ HAVE_SIGSET_T = @HAVE_SIGSET_T@ HAVE_SINL = @HAVE_SINL@ HAVE_SLEEP = @HAVE_SLEEP@ HAVE_SQRTL = @HAVE_SQRTL@ HAVE_STDINT_H = @HAVE_STDINT_H@ HAVE_STPCPY = @HAVE_STPCPY@ HAVE_STPNCPY = @HAVE_STPNCPY@ HAVE_STRCASECMP = @HAVE_STRCASECMP@ HAVE_STRCASESTR = @HAVE_STRCASESTR@ HAVE_STRCHRNUL = @HAVE_STRCHRNUL@ HAVE_STRPBRK = @HAVE_STRPBRK@ HAVE_STRSEP = @HAVE_STRSEP@ HAVE_STRTOD = @HAVE_STRTOD@ HAVE_STRTOLL = @HAVE_STRTOLL@ HAVE_STRTOULL = @HAVE_STRTOULL@ HAVE_STRUCT_ADDRINFO = @HAVE_STRUCT_ADDRINFO@ HAVE_STRUCT_RANDOM_DATA = @HAVE_STRUCT_RANDOM_DATA@ HAVE_STRUCT_SIGACTION_SA_SIGACTION = @HAVE_STRUCT_SIGACTION_SA_SIGACTION@ HAVE_STRUCT_SOCKADDR_STORAGE = @HAVE_STRUCT_SOCKADDR_STORAGE@ HAVE_STRUCT_TIMEVAL = @HAVE_STRUCT_TIMEVAL@ HAVE_STRUCT_UTSNAME = @HAVE_STRUCT_UTSNAME@ HAVE_STRVERSCMP = @HAVE_STRVERSCMP@ HAVE_SYMLINK = @HAVE_SYMLINK@ HAVE_SYMLINKAT = @HAVE_SYMLINKAT@ HAVE_SYS_BITYPES_H = @HAVE_SYS_BITYPES_H@ HAVE_SYS_INTTYPES_H = @HAVE_SYS_INTTYPES_H@ HAVE_SYS_IOCTL_H = @HAVE_SYS_IOCTL_H@ HAVE_SYS_LOADAVG_H = @HAVE_SYS_LOADAVG_H@ HAVE_SYS_PARAM_H = @HAVE_SYS_PARAM_H@ HAVE_SYS_SELECT_H = @HAVE_SYS_SELECT_H@ HAVE_SYS_SOCKET_H = @HAVE_SYS_SOCKET_H@ HAVE_SYS_TIME_H = @HAVE_SYS_TIME_H@ HAVE_SYS_TYPES_H = @HAVE_SYS_TYPES_H@ HAVE_SYS_UTSNAME_H = @HAVE_SYS_UTSNAME_H@ HAVE_TANL = @HAVE_TANL@ HAVE_TYPE_VOLATILE_SIG_ATOMIC_T = @HAVE_TYPE_VOLATILE_SIG_ATOMIC_T@ HAVE_UNAME = @HAVE_UNAME@ HAVE_UNISTD_H = @HAVE_UNISTD_H@ HAVE_UNLINKAT = @HAVE_UNLINKAT@ HAVE_UNSETENV = @HAVE_UNSETENV@ HAVE_UNSIGNED_LONG_LONG_INT = @HAVE_UNSIGNED_LONG_LONG_INT@ HAVE_USLEEP = @HAVE_USLEEP@ HAVE_UTIMENSAT = @HAVE_UTIMENSAT@ HAVE_VASPRINTF = @HAVE_VASPRINTF@ HAVE_VDPRINTF = @HAVE_VDPRINTF@ HAVE_WCHAR_H = @HAVE_WCHAR_H@ HAVE_WCHAR_T = @HAVE_WCHAR_T@ HAVE_WCRTOMB = @HAVE_WCRTOMB@ HAVE_WCSNRTOMBS = @HAVE_WCSNRTOMBS@ HAVE_WCSRTOMBS = @HAVE_WCSRTOMBS@ HAVE_WCTYPE_H = @HAVE_WCTYPE_H@ HAVE_WINSOCK2_H = @HAVE_WINSOCK2_H@ HAVE_WINT_T = @HAVE_WINT_T@ HAVE_WS2TCPIP_H = @HAVE_WS2TCPIP_H@ HAVE__BOOL = @HAVE__BOOL@ HOSTENT_LIB = @HOSTENT_LIB@ HTML_DIR = @HTML_DIR@ INCLTDL = @INCLTDL@ INCLUDE_NEXT = @INCLUDE_NEXT@ INCLUDE_NEXT_AS_FIRST_DIRECTIVE = @INCLUDE_NEXT_AS_FIRST_DIRECTIVE@ INET_NTOP_LIB = @INET_NTOP_LIB@ INET_PTON_LIB = @INET_PTON_LIB@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LD = @LD@ LDFLAGS = @LDFLAGS@ LEX = @LEX@ LEXLIB = @LEXLIB@ LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@ LIBADD_DL = @LIBADD_DL@ LIBADD_DLD_LINK = @LIBADD_DLD_LINK@ LIBADD_DLOPEN = @LIBADD_DLOPEN@ LIBADD_SHL_LOAD = @LIBADD_SHL_LOAD@ LIBDIR = @LIBDIR@ LIBGCRYPT_CFLAGS = @LIBGCRYPT_CFLAGS@ LIBGCRYPT_CONFIG = @LIBGCRYPT_CONFIG@ LIBGCRYPT_LIBS = @LIBGCRYPT_LIBS@ LIBGNUTLS_CFLAGS = @LIBGNUTLS_CFLAGS@ LIBGNUTLS_CONFIG = @LIBGNUTLS_CONFIG@ LIBGNUTLS_EXTRA_CFLAGS = @LIBGNUTLS_EXTRA_CFLAGS@ LIBGNUTLS_EXTRA_CONFIG = @LIBGNUTLS_EXTRA_CONFIG@ LIBGNUTLS_EXTRA_LIBS = @LIBGNUTLS_EXTRA_LIBS@ LIBGNUTLS_LIBS = @LIBGNUTLS_LIBS@ LIBINTL = @LIBINTL@ LIBLTDL = @LIBLTDL@ LIBMULTITHREAD = @LIBMULTITHREAD@ LIBOBJS = @LIBOBJS@ LIBPRELUDECPP_SONAME = @LIBPRELUDECPP_SONAME@ LIBPRELUDE_CFLAGS = @LIBPRELUDE_CFLAGS@ LIBPRELUDE_LIBS = @LIBPRELUDE_LIBS@ LIBPRELUDE_SONAME = @LIBPRELUDE_SONAME@ LIBPTH = @LIBPTH@ LIBPTH_PREFIX = @LIBPTH_PREFIX@ LIBS = @LIBS@ LIBSOCKET = @LIBSOCKET@ LIBTESTS_LIBDEPS = @LIBTESTS_LIBDEPS@ LIBTHREAD = @LIBTHREAD@ LIBTOOL = @LIBTOOL@ LIPO = @LIPO@ LN_S = @LN_S@ LOCALCHARSET_TESTS_ENVIRONMENT = @LOCALCHARSET_TESTS_ENVIRONMENT@ LOCALE_FR = @LOCALE_FR@ LOCALE_FR_UTF8 = @LOCALE_FR_UTF8@ LOCALE_JA = @LOCALE_JA@ LOCALE_TR_UTF8 = @LOCALE_TR_UTF8@ LOCALE_ZH_CN = @LOCALE_ZH_CN@ LOCALSTATEDIR = @LOCALSTATEDIR@ LTALLOCA = @LTALLOCA@ LTDLDEPS = @LTDLDEPS@ LTDLINCL = @LTDLINCL@ LTDLOPEN = @LTDLOPEN@ LTLIBINTL = @LTLIBINTL@ LTLIBMULTITHREAD = @LTLIBMULTITHREAD@ LTLIBOBJS = @LTLIBOBJS@ LTLIBPTH = @LTLIBPTH@ LTLIBTHREAD = @LTLIBTHREAD@ LT_CONFIG_H = @LT_CONFIG_H@ LT_DLLOADERS = @LT_DLLOADERS@ LT_DLPREOPEN = @LT_DLPREOPEN@ LUA_CFLAGS = @LUA_CFLAGS@ LUA_CONFIG = @LUA_CONFIG@ LUA_LIBS = @LUA_LIBS@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MKDIR_P = @MKDIR_P@ NETDB_H = @NETDB_H@ NETINET_IN_H = @NETINET_IN_H@ NEXT_ARPA_INET_H = @NEXT_ARPA_INET_H@ NEXT_AS_FIRST_DIRECTIVE_ARPA_INET_H = @NEXT_AS_FIRST_DIRECTIVE_ARPA_INET_H@ NEXT_AS_FIRST_DIRECTIVE_ERRNO_H = @NEXT_AS_FIRST_DIRECTIVE_ERRNO_H@ NEXT_AS_FIRST_DIRECTIVE_FCNTL_H = @NEXT_AS_FIRST_DIRECTIVE_FCNTL_H@ NEXT_AS_FIRST_DIRECTIVE_FLOAT_H = @NEXT_AS_FIRST_DIRECTIVE_FLOAT_H@ NEXT_AS_FIRST_DIRECTIVE_LANGINFO_H = @NEXT_AS_FIRST_DIRECTIVE_LANGINFO_H@ NEXT_AS_FIRST_DIRECTIVE_MATH_H = @NEXT_AS_FIRST_DIRECTIVE_MATH_H@ NEXT_AS_FIRST_DIRECTIVE_NETDB_H = @NEXT_AS_FIRST_DIRECTIVE_NETDB_H@ NEXT_AS_FIRST_DIRECTIVE_NETINET_IN_H = @NEXT_AS_FIRST_DIRECTIVE_NETINET_IN_H@ NEXT_AS_FIRST_DIRECTIVE_SIGNAL_H = @NEXT_AS_FIRST_DIRECTIVE_SIGNAL_H@ NEXT_AS_FIRST_DIRECTIVE_STDDEF_H = @NEXT_AS_FIRST_DIRECTIVE_STDDEF_H@ NEXT_AS_FIRST_DIRECTIVE_STDINT_H = @NEXT_AS_FIRST_DIRECTIVE_STDINT_H@ NEXT_AS_FIRST_DIRECTIVE_STDIO_H = @NEXT_AS_FIRST_DIRECTIVE_STDIO_H@ NEXT_AS_FIRST_DIRECTIVE_STDLIB_H = @NEXT_AS_FIRST_DIRECTIVE_STDLIB_H@ NEXT_AS_FIRST_DIRECTIVE_STRINGS_H = @NEXT_AS_FIRST_DIRECTIVE_STRINGS_H@ NEXT_AS_FIRST_DIRECTIVE_STRING_H = @NEXT_AS_FIRST_DIRECTIVE_STRING_H@ NEXT_AS_FIRST_DIRECTIVE_SYS_IOCTL_H = @NEXT_AS_FIRST_DIRECTIVE_SYS_IOCTL_H@ NEXT_AS_FIRST_DIRECTIVE_SYS_SELECT_H = @NEXT_AS_FIRST_DIRECTIVE_SYS_SELECT_H@ NEXT_AS_FIRST_DIRECTIVE_SYS_SOCKET_H = @NEXT_AS_FIRST_DIRECTIVE_SYS_SOCKET_H@ NEXT_AS_FIRST_DIRECTIVE_SYS_STAT_H = @NEXT_AS_FIRST_DIRECTIVE_SYS_STAT_H@ NEXT_AS_FIRST_DIRECTIVE_SYS_TIME_H = @NEXT_AS_FIRST_DIRECTIVE_SYS_TIME_H@ NEXT_AS_FIRST_DIRECTIVE_SYS_UTSNAME_H = @NEXT_AS_FIRST_DIRECTIVE_SYS_UTSNAME_H@ NEXT_AS_FIRST_DIRECTIVE_TIME_H = @NEXT_AS_FIRST_DIRECTIVE_TIME_H@ NEXT_AS_FIRST_DIRECTIVE_UNISTD_H = @NEXT_AS_FIRST_DIRECTIVE_UNISTD_H@ NEXT_AS_FIRST_DIRECTIVE_WCHAR_H = @NEXT_AS_FIRST_DIRECTIVE_WCHAR_H@ NEXT_AS_FIRST_DIRECTIVE_WCTYPE_H = @NEXT_AS_FIRST_DIRECTIVE_WCTYPE_H@ NEXT_ERRNO_H = @NEXT_ERRNO_H@ NEXT_FCNTL_H = @NEXT_FCNTL_H@ NEXT_FLOAT_H = @NEXT_FLOAT_H@ NEXT_LANGINFO_H = @NEXT_LANGINFO_H@ NEXT_MATH_H = @NEXT_MATH_H@ NEXT_NETDB_H = @NEXT_NETDB_H@ NEXT_NETINET_IN_H = @NEXT_NETINET_IN_H@ NEXT_SIGNAL_H = @NEXT_SIGNAL_H@ NEXT_STDDEF_H = @NEXT_STDDEF_H@ NEXT_STDINT_H = @NEXT_STDINT_H@ NEXT_STDIO_H = @NEXT_STDIO_H@ NEXT_STDLIB_H = @NEXT_STDLIB_H@ NEXT_STRINGS_H = @NEXT_STRINGS_H@ NEXT_STRING_H = @NEXT_STRING_H@ NEXT_SYS_IOCTL_H = @NEXT_SYS_IOCTL_H@ NEXT_SYS_SELECT_H = @NEXT_SYS_SELECT_H@ NEXT_SYS_SOCKET_H = @NEXT_SYS_SOCKET_H@ NEXT_SYS_STAT_H = @NEXT_SYS_STAT_H@ NEXT_SYS_TIME_H = @NEXT_SYS_TIME_H@ NEXT_SYS_UTSNAME_H = @NEXT_SYS_UTSNAME_H@ NEXT_TIME_H = @NEXT_TIME_H@ NEXT_UNISTD_H = @NEXT_UNISTD_H@ NEXT_WCHAR_H = @NEXT_WCHAR_H@ NEXT_WCTYPE_H = @NEXT_WCTYPE_H@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PCFLAGS = @PCFLAGS@ PERL = @PERL@ PERL_EXTRA_PARAMS = @PERL_EXTRA_PARAMS@ PKG_CONFIG = @PKG_CONFIG@ POLL_H = @POLL_H@ PRAGMA_SYSTEM_HEADER = @PRAGMA_SYSTEM_HEADER@ PRELUDE_ADMIN_CFLAGS = @PRELUDE_ADMIN_CFLAGS@ PRELUDE_ADMIN_LIBS = @PRELUDE_ADMIN_LIBS@ PRELUDE_CONFIG_DIR = @PRELUDE_CONFIG_DIR@ PRELUDE_SPOOL_DIR = @PRELUDE_SPOOL_DIR@ PTHREAD_CFLAGS = @PTHREAD_CFLAGS@ PTHREAD_LDFLAGS = @PTHREAD_LDFLAGS@ PTHREAD_LIBS = @PTHREAD_LIBS@ PTRDIFF_T_SUFFIX = @PTRDIFF_T_SUFFIX@ PYTHON = @PYTHON@ RANLIB = @RANLIB@ RELOCATABLE = @RELOCATABLE@ REPLACE_BTOWC = @REPLACE_BTOWC@ REPLACE_CANONICALIZE_FILE_NAME = @REPLACE_CANONICALIZE_FILE_NAME@ REPLACE_CEILF = @REPLACE_CEILF@ REPLACE_CEILL = @REPLACE_CEILL@ REPLACE_CHOWN = @REPLACE_CHOWN@ REPLACE_CLOSE = @REPLACE_CLOSE@ REPLACE_DPRINTF = @REPLACE_DPRINTF@ REPLACE_DUP = @REPLACE_DUP@ REPLACE_DUP2 = @REPLACE_DUP2@ REPLACE_FCHDIR = @REPLACE_FCHDIR@ REPLACE_FCHOWNAT = @REPLACE_FCHOWNAT@ REPLACE_FCLOSE = @REPLACE_FCLOSE@ REPLACE_FCNTL = @REPLACE_FCNTL@ REPLACE_FFLUSH = @REPLACE_FFLUSH@ REPLACE_FLOORF = @REPLACE_FLOORF@ REPLACE_FLOORL = @REPLACE_FLOORL@ REPLACE_FOPEN = @REPLACE_FOPEN@ REPLACE_FPRINTF = @REPLACE_FPRINTF@ REPLACE_FPURGE = @REPLACE_FPURGE@ REPLACE_FREOPEN = @REPLACE_FREOPEN@ REPLACE_FREXP = @REPLACE_FREXP@ REPLACE_FREXPL = @REPLACE_FREXPL@ REPLACE_FSEEK = @REPLACE_FSEEK@ REPLACE_FSEEKO = @REPLACE_FSEEKO@ REPLACE_FSTAT = @REPLACE_FSTAT@ REPLACE_FSTATAT = @REPLACE_FSTATAT@ REPLACE_FTELL = @REPLACE_FTELL@ REPLACE_FTELLO = @REPLACE_FTELLO@ REPLACE_FUTIMENS = @REPLACE_FUTIMENS@ REPLACE_GETCWD = @REPLACE_GETCWD@ REPLACE_GETDELIM = @REPLACE_GETDELIM@ REPLACE_GETGROUPS = @REPLACE_GETGROUPS@ REPLACE_GETLINE = @REPLACE_GETLINE@ REPLACE_GETPAGESIZE = @REPLACE_GETPAGESIZE@ REPLACE_GETTIMEOFDAY = @REPLACE_GETTIMEOFDAY@ REPLACE_HUGE_VAL = @REPLACE_HUGE_VAL@ REPLACE_ISFINITE = @REPLACE_ISFINITE@ REPLACE_ISINF = @REPLACE_ISINF@ REPLACE_ISNAN = @REPLACE_ISNAN@ REPLACE_ISWCNTRL = @REPLACE_ISWCNTRL@ REPLACE_LCHOWN = @REPLACE_LCHOWN@ REPLACE_LDEXPL = @REPLACE_LDEXPL@ REPLACE_LINK = @REPLACE_LINK@ REPLACE_LINKAT = @REPLACE_LINKAT@ REPLACE_LOCALTIME_R = @REPLACE_LOCALTIME_R@ REPLACE_LSEEK = @REPLACE_LSEEK@ REPLACE_LSTAT = @REPLACE_LSTAT@ REPLACE_MBRLEN = @REPLACE_MBRLEN@ REPLACE_MBRTOWC = @REPLACE_MBRTOWC@ REPLACE_MBSINIT = @REPLACE_MBSINIT@ REPLACE_MBSNRTOWCS = @REPLACE_MBSNRTOWCS@ REPLACE_MBSRTOWCS = @REPLACE_MBSRTOWCS@ REPLACE_MBSTATE_T = @REPLACE_MBSTATE_T@ REPLACE_MEMCHR = @REPLACE_MEMCHR@ REPLACE_MEMMEM = @REPLACE_MEMMEM@ REPLACE_MKDIR = @REPLACE_MKDIR@ REPLACE_MKFIFO = @REPLACE_MKFIFO@ REPLACE_MKNOD = @REPLACE_MKNOD@ REPLACE_MKSTEMP = @REPLACE_MKSTEMP@ REPLACE_MKTIME = @REPLACE_MKTIME@ REPLACE_NAN = @REPLACE_NAN@ REPLACE_NANOSLEEP = @REPLACE_NANOSLEEP@ REPLACE_NL_LANGINFO = @REPLACE_NL_LANGINFO@ REPLACE_NULL = @REPLACE_NULL@ REPLACE_OBSTACK_PRINTF = @REPLACE_OBSTACK_PRINTF@ REPLACE_OPEN = @REPLACE_OPEN@ REPLACE_OPENAT = @REPLACE_OPENAT@ REPLACE_PERROR = @REPLACE_PERROR@ REPLACE_POPEN = @REPLACE_POPEN@ REPLACE_PREAD = @REPLACE_PREAD@ REPLACE_PRINTF = @REPLACE_PRINTF@ REPLACE_PUTENV = @REPLACE_PUTENV@ REPLACE_READLINK = @REPLACE_READLINK@ REPLACE_REALPATH = @REPLACE_REALPATH@ REPLACE_REMOVE = @REPLACE_REMOVE@ REPLACE_RENAME = @REPLACE_RENAME@ REPLACE_RENAMEAT = @REPLACE_RENAMEAT@ REPLACE_RMDIR = @REPLACE_RMDIR@ REPLACE_ROUND = @REPLACE_ROUND@ REPLACE_ROUNDF = @REPLACE_ROUNDF@ REPLACE_ROUNDL = @REPLACE_ROUNDL@ REPLACE_SELECT = @REPLACE_SELECT@ REPLACE_SETENV = @REPLACE_SETENV@ REPLACE_SIGNBIT = @REPLACE_SIGNBIT@ REPLACE_SIGNBIT_USING_GCC = @REPLACE_SIGNBIT_USING_GCC@ REPLACE_SLEEP = @REPLACE_SLEEP@ REPLACE_SNPRINTF = @REPLACE_SNPRINTF@ REPLACE_SPRINTF = @REPLACE_SPRINTF@ REPLACE_STAT = @REPLACE_STAT@ REPLACE_STDIO_WRITE_FUNCS = @REPLACE_STDIO_WRITE_FUNCS@ REPLACE_STRCASESTR = @REPLACE_STRCASESTR@ REPLACE_STRDUP = @REPLACE_STRDUP@ REPLACE_STRERROR = @REPLACE_STRERROR@ REPLACE_STRNDUP = @REPLACE_STRNDUP@ REPLACE_STRPTIME = @REPLACE_STRPTIME@ REPLACE_STRSIGNAL = @REPLACE_STRSIGNAL@ REPLACE_STRSTR = @REPLACE_STRSTR@ REPLACE_STRTOD = @REPLACE_STRTOD@ REPLACE_STRTOK_R = @REPLACE_STRTOK_R@ REPLACE_SYMLINK = @REPLACE_SYMLINK@ REPLACE_TIMEGM = @REPLACE_TIMEGM@ REPLACE_TRUNCL = @REPLACE_TRUNCL@ REPLACE_UNLINK = @REPLACE_UNLINK@ REPLACE_UNLINKAT = @REPLACE_UNLINKAT@ REPLACE_UNSETENV = @REPLACE_UNSETENV@ REPLACE_USLEEP = @REPLACE_USLEEP@ REPLACE_UTIMENSAT = @REPLACE_UTIMENSAT@ REPLACE_VASPRINTF = @REPLACE_VASPRINTF@ REPLACE_VDPRINTF = @REPLACE_VDPRINTF@ REPLACE_VFPRINTF = @REPLACE_VFPRINTF@ REPLACE_VPRINTF = @REPLACE_VPRINTF@ REPLACE_VSNPRINTF = @REPLACE_VSNPRINTF@ REPLACE_VSPRINTF = @REPLACE_VSPRINTF@ REPLACE_WCRTOMB = @REPLACE_WCRTOMB@ REPLACE_WCSNRTOMBS = @REPLACE_WCSNRTOMBS@ REPLACE_WCSRTOMBS = @REPLACE_WCSRTOMBS@ REPLACE_WCTOB = @REPLACE_WCTOB@ REPLACE_WCWIDTH = @REPLACE_WCWIDTH@ REPLACE_WRITE = @REPLACE_WRITE@ RUBY = @RUBY@ RUBY_CCFLAGS = @RUBY_CCFLAGS@ RUBY_EXEC_PREFIX = @RUBY_EXEC_PREFIX@ RUBY_INCLUDES = @RUBY_INCLUDES@ RUBY_LIBS = @RUBY_LIBS@ RUBY_PLATFORM = @RUBY_PLATFORM@ RUBY_PREFIX = @RUBY_PREFIX@ RUBY_VERSION = @RUBY_VERSION@ SED = @SED@ SERVENT_LIB = @SERVENT_LIB@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ SIG_ATOMIC_T_SUFFIX = @SIG_ATOMIC_T_SUFFIX@ SIZE_T_SUFFIX = @SIZE_T_SUFFIX@ STDBOOL_H = @STDBOOL_H@ STDDEF_H = @STDDEF_H@ STDINT_H = @STDINT_H@ STRIP = @STRIP@ SWIG = @SWIG@ SYSCONFDIR = @SYSCONFDIR@ SYS_IOCTL_H_HAVE_WINSOCK2_H = @SYS_IOCTL_H_HAVE_WINSOCK2_H@ SYS_IOCTL_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS = @SYS_IOCTL_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS@ SYS_SOCKET_H = @SYS_SOCKET_H@ SYS_TIME_H_DEFINES_STRUCT_TIMESPEC = @SYS_TIME_H_DEFINES_STRUCT_TIMESPEC@ TIME_H_DEFINES_STRUCT_TIMESPEC = @TIME_H_DEFINES_STRUCT_TIMESPEC@ UNDEFINE_STRTOK_R = @UNDEFINE_STRTOK_R@ UNISTD_H_HAVE_WINSOCK2_H = @UNISTD_H_HAVE_WINSOCK2_H@ UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS = @UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS@ VALGRIND = @VALGRIND@ VERSION = @VERSION@ WCHAR_T_SUFFIX = @WCHAR_T_SUFFIX@ WCTYPE_H = @WCTYPE_H@ WINT_T_SUFFIX = @WINT_T_SUFFIX@ YACC = @YACC@ YFLAGS = @YFLAGS@ YIELD_LIB = @YIELD_LIB@ __PRELUDE_64BIT_FORMAT_PREFIX = @__PRELUDE_64BIT_FORMAT_PREFIX@ __PRELUDE_HAVE_64BIT_LONG = @__PRELUDE_HAVE_64BIT_LONG@ __PRELUDE_HAVE_INTTYPES_H = @__PRELUDE_HAVE_INTTYPES_H@ __PRELUDE_HAVE_STDINT_H = @__PRELUDE_HAVE_STDINT_H@ __PRELUDE_STDINT_HAVE_UINT16 = @__PRELUDE_STDINT_HAVE_UINT16@ __PRELUDE_STDINT_HAVE_UINT32 = @__PRELUDE_STDINT_HAVE_UINT32@ __PRELUDE_STDINT_HAVE_UINT64 = @__PRELUDE_STDINT_HAVE_UINT64@ __PRELUDE_STDINT_HAVE_UINT8 = @__PRELUDE_STDINT_HAVE_UINT8@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ gl_LIBOBJS = @gl_LIBOBJS@ gl_LTLIBOBJS = @gl_LTLIBOBJS@ gltests_LIBOBJS = @gltests_LIBOBJS@ gltests_LTLIBOBJS = @gltests_LTLIBOBJS@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ lt_ECHO = @lt_ECHO@ ltdl_LIBOBJS = @ltdl_LIBOBJS@ ltdl_LTLIBOBJS = @ltdl_LTLIBOBJS@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ pkgrbexecdir = @pkgrbexecdir@ pkgrubydir = @pkgrubydir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ rbexecdir = @rbexecdir@ rubydir = @rubydir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sys_symbol_underscore = @sys_symbol_underscore@ sysconfdir = @sysconfdir@ target = @target@ target_alias = @target_alias@ target_cpu = @target_cpu@ target_os = @target_os@ target_vendor = @target_vendor@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ SUBDIRS = c++ low-level lua python ruby EXTRA_DIST = libpreludecpp.i perl/libpreludecpp-perl.i perl/Makefile.PL.in CLEANFILES = perl/pm_to_blib perl/PreludeEasy.o perl/blib python/build DISTCLEANFILES = perl/PreludeEasy.cxx MAINTAINERCLEANFILES = \ lua/PreludeEasy.cxx \ perl/Makefile \ perl/PreludeEasy.cxx \ perl/PreludeEasy.pm \ perl/PreludeEasy.bs \ python/_PreludeEasy.cxx \ python/PreludeEasy.py \ ruby/PreludeEasy.cxx all: all-recursive .SUFFIXES: $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu bindings/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu bindings/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs # This directory's subdirectories are mostly independent; you can cd # into them and run `make' without going through this Makefile. # To change the values of `make' variables: instead of editing Makefiles, # (1) if the variable is set in `config.status', edit `config.status' # (which will cause the Makefiles to be regenerated when you run `make'); # (2) otherwise, pass the desired values on the `make' command line. $(RECURSIVE_TARGETS): @fail= failcom='exit 1'; \ for f in x $$MAKEFLAGS; do \ case $$f in \ *=* | --[!k]*);; \ *k*) failcom='fail=yes';; \ esac; \ done; \ dot_seen=no; \ target=`echo $@ | sed s/-recursive//`; \ list='$(SUBDIRS)'; for subdir in $$list; do \ echo "Making $$target in $$subdir"; \ if test "$$subdir" = "."; then \ dot_seen=yes; \ local_target="$$target-am"; \ else \ local_target="$$target"; \ fi; \ ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ || eval $$failcom; \ done; \ if test "$$dot_seen" = "no"; then \ $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ fi; test -z "$$fail" $(RECURSIVE_CLEAN_TARGETS): @fail= failcom='exit 1'; \ for f in x $$MAKEFLAGS; do \ case $$f in \ *=* | --[!k]*);; \ *k*) failcom='fail=yes';; \ esac; \ done; \ dot_seen=no; \ case "$@" in \ distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ *) list='$(SUBDIRS)' ;; \ esac; \ rev=''; for subdir in $$list; do \ if test "$$subdir" = "."; then :; else \ rev="$$subdir $$rev"; \ fi; \ done; \ rev="$$rev ."; \ target=`echo $@ | sed s/-recursive//`; \ for subdir in $$rev; do \ echo "Making $$target in $$subdir"; \ if test "$$subdir" = "."; then \ local_target="$$target-am"; \ else \ local_target="$$target"; \ fi; \ ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ || eval $$failcom; \ done && test -z "$$fail" tags-recursive: list='$(SUBDIRS)'; for subdir in $$list; do \ test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \ done ctags-recursive: list='$(SUBDIRS)'; for subdir in $$list; do \ test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \ done ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ mkid -fID $$unique tags: TAGS TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) set x; \ here=`pwd`; \ if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ include_option=--etags-include; \ empty_fix=.; \ else \ include_option=--include; \ empty_fix=; \ fi; \ list='$(SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ test ! -f $$subdir/TAGS || \ set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \ fi; \ done; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: CTAGS CTAGS: ctags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ test -d "$(distdir)/$$subdir" \ || $(MKDIR_P) "$(distdir)/$$subdir" \ || exit 1; \ fi; \ done @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ dir1=$$subdir; dir2="$(distdir)/$$subdir"; \ $(am__relativize); \ new_distdir=$$reldir; \ dir1=$$subdir; dir2="$(top_distdir)"; \ $(am__relativize); \ new_top_distdir=$$reldir; \ echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \ echo " am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \ ($(am__cd) $$subdir && \ $(MAKE) $(AM_MAKEFLAGS) \ top_distdir="$$new_top_distdir" \ distdir="$$new_distdir" \ am__remove_distdir=: \ am__skip_length_check=: \ am__skip_mode_fix=: \ distdir) \ || exit 1; \ fi; \ done check-am: all-am check: check-recursive all-am: Makefile installdirs: installdirs-recursive installdirs-am: install: install-recursive install-exec: install-exec-recursive install-data: install-data-recursive uninstall: uninstall-recursive install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-recursive install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES) distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) -test -z "$(DISTCLEANFILES)" || rm -f $(DISTCLEANFILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES) @HAVE_EASY_BINDINGS_FALSE@clean-local: @HAVE_PERL_FALSE@clean-local: @HAVE_EASY_BINDINGS_FALSE@install-exec-hook: @HAVE_PERL_FALSE@install-exec-hook: @HAVE_EASY_BINDINGS_FALSE@uninstall-hook: @HAVE_PERL_FALSE@uninstall-hook: clean: clean-recursive clean-am: clean-generic clean-libtool clean-local mostlyclean-am distclean: distclean-recursive -rm -f Makefile distclean-am: clean-am distclean-generic distclean-tags dvi: dvi-recursive dvi-am: html: html-recursive html-am: info: info-recursive info-am: install-data-am: install-dvi: install-dvi-recursive install-dvi-am: install-exec-am: @$(NORMAL_INSTALL) $(MAKE) $(AM_MAKEFLAGS) install-exec-hook install-html: install-html-recursive install-html-am: install-info: install-info-recursive install-info-am: install-man: install-pdf: install-pdf-recursive install-pdf-am: install-ps: install-ps-recursive install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-recursive -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-recursive mostlyclean-am: mostlyclean-generic mostlyclean-libtool pdf: pdf-recursive pdf-am: ps: ps-recursive ps-am: uninstall-am: @$(NORMAL_INSTALL) $(MAKE) $(AM_MAKEFLAGS) uninstall-hook .MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) ctags-recursive \ install-am install-exec-am install-strip tags-recursive \ uninstall-am .PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \ all all-am check check-am clean clean-generic clean-libtool \ clean-local ctags ctags-recursive distclean distclean-generic \ distclean-libtool distclean-tags distdir dvi dvi-am html \ html-am info info-am install install-am install-data \ install-data-am install-dvi install-dvi-am install-exec \ install-exec-am install-exec-hook install-html install-html-am \ install-info install-info-am install-man install-pdf \ install-pdf-am install-ps install-ps-am install-strip \ installcheck installcheck-am installdirs installdirs-am \ maintainer-clean maintainer-clean-generic mostlyclean \ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ tags tags-recursive uninstall uninstall-am uninstall-hook all-am: perl @HAVE_EASY_BINDINGS_TRUE@@HAVE_PERL_TRUE@perl: perl-build # # Workaround invalid Makefile generated by MakeMaker when UTF-8 is enabled. # @HAVE_EASY_BINDINGS_TRUE@@HAVE_PERL_TRUE@perl-makefile: @HAVE_EASY_BINDINGS_TRUE@@HAVE_PERL_TRUE@ cd perl && LANG="" DESTDIR=$(DESTDIR) LIBDIR=$(libdir) $(PERL) Makefile.PL @PERL_EXTRA_PARAMS@ CC="$(CXX)" @HAVE_EASY_BINDINGS_TRUE@@HAVE_PERL_TRUE@perl/PreludeEasy.cxx: $(top_srcdir)/bindings/c++/include/*.hxx libpreludecpp.i perl/libpreludecpp-perl.i @HAVE_EASY_BINDINGS_TRUE@@HAVE_PERL_TRUE@@HAVE_SWIG_TRUE@ $(SWIG) -c++ -I$(top_srcdir)/bindings -I$(top_srcdir)/bindings/c++/include -I$(top_srcdir)/src/include -I$(top_srcdir)/src/libprelude-error -perl5 -o $@ libpreludecpp.i @HAVE_EASY_BINDINGS_TRUE@@HAVE_PERL_TRUE@perl-build: perl/PreludeEasy.cxx perl-makefile @HAVE_EASY_BINDINGS_TRUE@@HAVE_PERL_TRUE@ cd perl && $(MAKE) LD_RUN_PATH="" CC="$(CXX)" @HAVE_EASY_BINDINGS_TRUE@@HAVE_PERL_TRUE@install-exec-hook: perl-makefile @HAVE_EASY_BINDINGS_TRUE@@HAVE_PERL_TRUE@ cd perl && $(MAKE) LD_RUN_PATH="" install @HAVE_EASY_BINDINGS_TRUE@@HAVE_PERL_TRUE@uninstall-hook: perl-makefile @HAVE_EASY_BINDINGS_TRUE@@HAVE_PERL_TRUE@ cd perl && $(MAKE) uninstall @HAVE_EASY_BINDINGS_TRUE@@HAVE_PERL_TRUE@clean-local: @HAVE_EASY_BINDINGS_TRUE@@HAVE_PERL_TRUE@ cd perl && test -f Makefile && $(MAKE) clean @HAVE_EASY_BINDINGS_TRUE@@HAVE_PERL_TRUE@ rm -f perl/Makefile.old @HAVE_EASY_BINDINGS_TRUE@@HAVE_PERL_FALSE@perl: @HAVE_EASY_BINDINGS_FALSE@perl: -include $(top_srcdir)/git.mk # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: libprelude-1.0.0/bindings/low-level/0000775000076400007640000000000011347714754014372 500000000000000libprelude-1.0.0/bindings/low-level/perl/0000775000076400007640000000000011347714754015334 500000000000000libprelude-1.0.0/bindings/low-level/perl/Prelude.c0000664000076400007640000721422411345707712017026 00000000000000/* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). * Version 1.3.40 * * This file is not intended to be easily readable and contains a number of * coding conventions designed to improve portability and efficiency. Do not make * changes to this file unless you know what you are doing--modify the SWIG * interface file instead. * ----------------------------------------------------------------------------- */ #define SWIGPERL #define SWIG_CASTRANK_MODE /* ----------------------------------------------------------------------------- * This section contains generic SWIG labels for method/variable * declarations/attributes, and other compiler dependent labels. * ----------------------------------------------------------------------------- */ /* template workaround for compilers that cannot correctly implement the C++ standard */ #ifndef SWIGTEMPLATEDISAMBIGUATOR # if defined(__SUNPRO_CC) && (__SUNPRO_CC <= 0x560) # define SWIGTEMPLATEDISAMBIGUATOR template # elif defined(__HP_aCC) /* Needed even with `aCC -AA' when `aCC -V' reports HP ANSI C++ B3910B A.03.55 */ /* If we find a maximum version that requires this, the test would be __HP_aCC <= 35500 for A.03.55 */ # define SWIGTEMPLATEDISAMBIGUATOR template # else # define SWIGTEMPLATEDISAMBIGUATOR # endif #endif /* inline attribute */ #ifndef SWIGINLINE # if defined(__cplusplus) || (defined(__GNUC__) && !defined(__STRICT_ANSI__)) # define SWIGINLINE inline # else # define SWIGINLINE # endif #endif /* attribute recognised by some compilers to avoid 'unused' warnings */ #ifndef SWIGUNUSED # if defined(__GNUC__) # if !(defined(__cplusplus)) || (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4)) # define SWIGUNUSED __attribute__ ((__unused__)) # else # define SWIGUNUSED # endif # elif defined(__ICC) # define SWIGUNUSED __attribute__ ((__unused__)) # else # define SWIGUNUSED # endif #endif #ifndef SWIG_MSC_UNSUPPRESS_4505 # if defined(_MSC_VER) # pragma warning(disable : 4505) /* unreferenced local function has been removed */ # endif #endif #ifndef SWIGUNUSEDPARM # ifdef __cplusplus # define SWIGUNUSEDPARM(p) # else # define SWIGUNUSEDPARM(p) p SWIGUNUSED # endif #endif /* internal SWIG method */ #ifndef SWIGINTERN # define SWIGINTERN static SWIGUNUSED #endif /* internal inline SWIG method */ #ifndef SWIGINTERNINLINE # define SWIGINTERNINLINE SWIGINTERN SWIGINLINE #endif /* exporting methods */ #if (__GNUC__ >= 4) || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4) # ifndef GCC_HASCLASSVISIBILITY # define GCC_HASCLASSVISIBILITY # endif #endif #ifndef SWIGEXPORT # if defined(_WIN32) || defined(__WIN32__) || defined(__CYGWIN__) # if defined(STATIC_LINKED) # define SWIGEXPORT # else # define SWIGEXPORT __declspec(dllexport) # endif # else # if defined(__GNUC__) && defined(GCC_HASCLASSVISIBILITY) # define SWIGEXPORT __attribute__ ((visibility("default"))) # else # define SWIGEXPORT # endif # endif #endif /* calling conventions for Windows */ #ifndef SWIGSTDCALL # if defined(_WIN32) || defined(__WIN32__) || defined(__CYGWIN__) # define SWIGSTDCALL __stdcall # else # define SWIGSTDCALL # endif #endif /* Deal with Microsoft's attempt at deprecating C standard runtime functions */ #if !defined(SWIG_NO_CRT_SECURE_NO_DEPRECATE) && defined(_MSC_VER) && !defined(_CRT_SECURE_NO_DEPRECATE) # define _CRT_SECURE_NO_DEPRECATE #endif /* Deal with Microsoft's attempt at deprecating methods in the standard C++ library */ #if !defined(SWIG_NO_SCL_SECURE_NO_DEPRECATE) && defined(_MSC_VER) && !defined(_SCL_SECURE_NO_DEPRECATE) # define _SCL_SECURE_NO_DEPRECATE #endif /* ----------------------------------------------------------------------------- * swigrun.swg * * This file contains generic C API SWIG runtime support for pointer * type checking. * ----------------------------------------------------------------------------- */ /* This should only be incremented when either the layout of swig_type_info changes, or for whatever reason, the runtime changes incompatibly */ #define SWIG_RUNTIME_VERSION "4" /* define SWIG_TYPE_TABLE_NAME as "SWIG_TYPE_TABLE" */ #ifdef SWIG_TYPE_TABLE # define SWIG_QUOTE_STRING(x) #x # define SWIG_EXPAND_AND_QUOTE_STRING(x) SWIG_QUOTE_STRING(x) # define SWIG_TYPE_TABLE_NAME SWIG_EXPAND_AND_QUOTE_STRING(SWIG_TYPE_TABLE) #else # define SWIG_TYPE_TABLE_NAME #endif /* You can use the SWIGRUNTIME and SWIGRUNTIMEINLINE macros for creating a static or dynamic library from the SWIG runtime code. In 99.9% of the cases, SWIG just needs to declare them as 'static'. But only do this if strictly necessary, ie, if you have problems with your compiler or suchlike. */ #ifndef SWIGRUNTIME # define SWIGRUNTIME SWIGINTERN #endif #ifndef SWIGRUNTIMEINLINE # define SWIGRUNTIMEINLINE SWIGRUNTIME SWIGINLINE #endif /* Generic buffer size */ #ifndef SWIG_BUFFER_SIZE # define SWIG_BUFFER_SIZE 1024 #endif /* Flags for pointer conversions */ #define SWIG_POINTER_DISOWN 0x1 #define SWIG_CAST_NEW_MEMORY 0x2 /* Flags for new pointer objects */ #define SWIG_POINTER_OWN 0x1 /* Flags/methods for returning states. The SWIG conversion methods, as ConvertPtr, return and integer that tells if the conversion was successful or not. And if not, an error code can be returned (see swigerrors.swg for the codes). Use the following macros/flags to set or process the returning states. In old versions of SWIG, code such as the following was usually written: if (SWIG_ConvertPtr(obj,vptr,ty.flags) != -1) { // success code } else { //fail code } Now you can be more explicit: int res = SWIG_ConvertPtr(obj,vptr,ty.flags); if (SWIG_IsOK(res)) { // success code } else { // fail code } which is the same really, but now you can also do Type *ptr; int res = SWIG_ConvertPtr(obj,(void **)(&ptr),ty.flags); if (SWIG_IsOK(res)) { // success code if (SWIG_IsNewObj(res) { ... delete *ptr; } else { ... } } else { // fail code } I.e., now SWIG_ConvertPtr can return new objects and you can identify the case and take care of the deallocation. Of course that also requires SWIG_ConvertPtr to return new result values, such as int SWIG_ConvertPtr(obj, ptr,...) { if () { if () { *ptr = ; return SWIG_NEWOBJ; } else { *ptr = ; return SWIG_OLDOBJ; } } else { return SWIG_BADOBJ; } } Of course, returning the plain '0(success)/-1(fail)' still works, but you can be more explicit by returning SWIG_BADOBJ, SWIG_ERROR or any of the SWIG errors code. Finally, if the SWIG_CASTRANK_MODE is enabled, the result code allows to return the 'cast rank', for example, if you have this int food(double) int fooi(int); and you call food(1) // cast rank '1' (1 -> 1.0) fooi(1) // cast rank '0' just use the SWIG_AddCast()/SWIG_CheckState() */ #define SWIG_OK (0) #define SWIG_ERROR (-1) #define SWIG_IsOK(r) (r >= 0) #define SWIG_ArgError(r) ((r != SWIG_ERROR) ? r : SWIG_TypeError) /* The CastRankLimit says how many bits are used for the cast rank */ #define SWIG_CASTRANKLIMIT (1 << 8) /* The NewMask denotes the object was created (using new/malloc) */ #define SWIG_NEWOBJMASK (SWIG_CASTRANKLIMIT << 1) /* The TmpMask is for in/out typemaps that use temporal objects */ #define SWIG_TMPOBJMASK (SWIG_NEWOBJMASK << 1) /* Simple returning values */ #define SWIG_BADOBJ (SWIG_ERROR) #define SWIG_OLDOBJ (SWIG_OK) #define SWIG_NEWOBJ (SWIG_OK | SWIG_NEWOBJMASK) #define SWIG_TMPOBJ (SWIG_OK | SWIG_TMPOBJMASK) /* Check, add and del mask methods */ #define SWIG_AddNewMask(r) (SWIG_IsOK(r) ? (r | SWIG_NEWOBJMASK) : r) #define SWIG_DelNewMask(r) (SWIG_IsOK(r) ? (r & ~SWIG_NEWOBJMASK) : r) #define SWIG_IsNewObj(r) (SWIG_IsOK(r) && (r & SWIG_NEWOBJMASK)) #define SWIG_AddTmpMask(r) (SWIG_IsOK(r) ? (r | SWIG_TMPOBJMASK) : r) #define SWIG_DelTmpMask(r) (SWIG_IsOK(r) ? (r & ~SWIG_TMPOBJMASK) : r) #define SWIG_IsTmpObj(r) (SWIG_IsOK(r) && (r & SWIG_TMPOBJMASK)) /* Cast-Rank Mode */ #if defined(SWIG_CASTRANK_MODE) # ifndef SWIG_TypeRank # define SWIG_TypeRank unsigned long # endif # ifndef SWIG_MAXCASTRANK /* Default cast allowed */ # define SWIG_MAXCASTRANK (2) # endif # define SWIG_CASTRANKMASK ((SWIG_CASTRANKLIMIT) -1) # define SWIG_CastRank(r) (r & SWIG_CASTRANKMASK) SWIGINTERNINLINE int SWIG_AddCast(int r) { return SWIG_IsOK(r) ? ((SWIG_CastRank(r) < SWIG_MAXCASTRANK) ? (r + 1) : SWIG_ERROR) : r; } SWIGINTERNINLINE int SWIG_CheckState(int r) { return SWIG_IsOK(r) ? SWIG_CastRank(r) + 1 : 0; } #else /* no cast-rank mode */ # define SWIG_AddCast # define SWIG_CheckState(r) (SWIG_IsOK(r) ? 1 : 0) #endif #include #ifdef __cplusplus extern "C" { #endif typedef void *(*swig_converter_func)(void *, int *); typedef struct swig_type_info *(*swig_dycast_func)(void **); /* Structure to store information on one type */ typedef struct swig_type_info { const char *name; /* mangled name of this type */ const char *str; /* human readable name of this type */ swig_dycast_func dcast; /* dynamic cast function down a hierarchy */ struct swig_cast_info *cast; /* linked list of types that can cast into this type */ void *clientdata; /* language specific type data */ int owndata; /* flag if the structure owns the clientdata */ } swig_type_info; /* Structure to store a type and conversion function used for casting */ typedef struct swig_cast_info { swig_type_info *type; /* pointer to type that is equivalent to this type */ swig_converter_func converter; /* function to cast the void pointers */ struct swig_cast_info *next; /* pointer to next cast in linked list */ struct swig_cast_info *prev; /* pointer to the previous cast */ } swig_cast_info; /* Structure used to store module information * Each module generates one structure like this, and the runtime collects * all of these structures and stores them in a circularly linked list.*/ typedef struct swig_module_info { swig_type_info **types; /* Array of pointers to swig_type_info structures that are in this module */ size_t size; /* Number of types in this module */ struct swig_module_info *next; /* Pointer to next element in circularly linked list */ swig_type_info **type_initial; /* Array of initially generated type structures */ swig_cast_info **cast_initial; /* Array of initially generated casting structures */ void *clientdata; /* Language specific module data */ } swig_module_info; /* Compare two type names skipping the space characters, therefore "char*" == "char *" and "Class" == "Class", etc. Return 0 when the two name types are equivalent, as in strncmp, but skipping ' '. */ SWIGRUNTIME int SWIG_TypeNameComp(const char *f1, const char *l1, const char *f2, const char *l2) { for (;(f1 != l1) && (f2 != l2); ++f1, ++f2) { while ((*f1 == ' ') && (f1 != l1)) ++f1; while ((*f2 == ' ') && (f2 != l2)) ++f2; if (*f1 != *f2) return (*f1 > *f2) ? 1 : -1; } return (int)((l1 - f1) - (l2 - f2)); } /* Check type equivalence in a name list like ||... Return 0 if not equal, 1 if equal */ SWIGRUNTIME int SWIG_TypeEquiv(const char *nb, const char *tb) { int equiv = 0; const char* te = tb + strlen(tb); const char* ne = nb; while (!equiv && *ne) { for (nb = ne; *ne; ++ne) { if (*ne == '|') break; } equiv = (SWIG_TypeNameComp(nb, ne, tb, te) == 0) ? 1 : 0; if (*ne) ++ne; } return equiv; } /* Check type equivalence in a name list like ||... Return 0 if equal, -1 if nb < tb, 1 if nb > tb */ SWIGRUNTIME int SWIG_TypeCompare(const char *nb, const char *tb) { int equiv = 0; const char* te = tb + strlen(tb); const char* ne = nb; while (!equiv && *ne) { for (nb = ne; *ne; ++ne) { if (*ne == '|') break; } equiv = (SWIG_TypeNameComp(nb, ne, tb, te) == 0) ? 1 : 0; if (*ne) ++ne; } return equiv; } /* Check the typename */ SWIGRUNTIME swig_cast_info * SWIG_TypeCheck(const char *c, swig_type_info *ty) { if (ty) { swig_cast_info *iter = ty->cast; while (iter) { if (strcmp(iter->type->name, c) == 0) { if (iter == ty->cast) return iter; /* Move iter to the top of the linked list */ iter->prev->next = iter->next; if (iter->next) iter->next->prev = iter->prev; iter->next = ty->cast; iter->prev = 0; if (ty->cast) ty->cast->prev = iter; ty->cast = iter; return iter; } iter = iter->next; } } return 0; } /* Identical to SWIG_TypeCheck, except strcmp is replaced with a pointer comparison */ SWIGRUNTIME swig_cast_info * SWIG_TypeCheckStruct(swig_type_info *from, swig_type_info *ty) { if (ty) { swig_cast_info *iter = ty->cast; while (iter) { if (iter->type == from) { if (iter == ty->cast) return iter; /* Move iter to the top of the linked list */ iter->prev->next = iter->next; if (iter->next) iter->next->prev = iter->prev; iter->next = ty->cast; iter->prev = 0; if (ty->cast) ty->cast->prev = iter; ty->cast = iter; return iter; } iter = iter->next; } } return 0; } /* Cast a pointer up an inheritance hierarchy */ SWIGRUNTIMEINLINE void * SWIG_TypeCast(swig_cast_info *ty, void *ptr, int *newmemory) { return ((!ty) || (!ty->converter)) ? ptr : (*ty->converter)(ptr, newmemory); } /* Dynamic pointer casting. Down an inheritance hierarchy */ SWIGRUNTIME swig_type_info * SWIG_TypeDynamicCast(swig_type_info *ty, void **ptr) { swig_type_info *lastty = ty; if (!ty || !ty->dcast) return ty; while (ty && (ty->dcast)) { ty = (*ty->dcast)(ptr); if (ty) lastty = ty; } return lastty; } /* Return the name associated with this type */ SWIGRUNTIMEINLINE const char * SWIG_TypeName(const swig_type_info *ty) { return ty->name; } /* Return the pretty name associated with this type, that is an unmangled type name in a form presentable to the user. */ SWIGRUNTIME const char * SWIG_TypePrettyName(const swig_type_info *type) { /* The "str" field contains the equivalent pretty names of the type, separated by vertical-bar characters. We choose to print the last name, as it is often (?) the most specific. */ if (!type) return NULL; if (type->str != NULL) { const char *last_name = type->str; const char *s; for (s = type->str; *s; s++) if (*s == '|') last_name = s+1; return last_name; } else return type->name; } /* Set the clientdata field for a type */ SWIGRUNTIME void SWIG_TypeClientData(swig_type_info *ti, void *clientdata) { swig_cast_info *cast = ti->cast; /* if (ti->clientdata == clientdata) return; */ ti->clientdata = clientdata; while (cast) { if (!cast->converter) { swig_type_info *tc = cast->type; if (!tc->clientdata) { SWIG_TypeClientData(tc, clientdata); } } cast = cast->next; } } SWIGRUNTIME void SWIG_TypeNewClientData(swig_type_info *ti, void *clientdata) { SWIG_TypeClientData(ti, clientdata); ti->owndata = 1; } /* Search for a swig_type_info structure only by mangled name Search is a O(log #types) We start searching at module start, and finish searching when start == end. Note: if start == end at the beginning of the function, we go all the way around the circular list. */ SWIGRUNTIME swig_type_info * SWIG_MangledTypeQueryModule(swig_module_info *start, swig_module_info *end, const char *name) { swig_module_info *iter = start; do { if (iter->size) { register size_t l = 0; register size_t r = iter->size - 1; do { /* since l+r >= 0, we can (>> 1) instead (/ 2) */ register size_t i = (l + r) >> 1; const char *iname = iter->types[i]->name; if (iname) { register int compare = strcmp(name, iname); if (compare == 0) { return iter->types[i]; } else if (compare < 0) { if (i) { r = i - 1; } else { break; } } else if (compare > 0) { l = i + 1; } } else { break; /* should never happen */ } } while (l <= r); } iter = iter->next; } while (iter != end); return 0; } /* Search for a swig_type_info structure for either a mangled name or a human readable name. It first searches the mangled names of the types, which is a O(log #types) If a type is not found it then searches the human readable names, which is O(#types). We start searching at module start, and finish searching when start == end. Note: if start == end at the beginning of the function, we go all the way around the circular list. */ SWIGRUNTIME swig_type_info * SWIG_TypeQueryModule(swig_module_info *start, swig_module_info *end, const char *name) { /* STEP 1: Search the name field using binary search */ swig_type_info *ret = SWIG_MangledTypeQueryModule(start, end, name); if (ret) { return ret; } else { /* STEP 2: If the type hasn't been found, do a complete search of the str field (the human readable name) */ swig_module_info *iter = start; do { register size_t i = 0; for (; i < iter->size; ++i) { if (iter->types[i]->str && (SWIG_TypeEquiv(iter->types[i]->str, name))) return iter->types[i]; } iter = iter->next; } while (iter != end); } /* neither found a match */ return 0; } /* Pack binary data into a string */ SWIGRUNTIME char * SWIG_PackData(char *c, void *ptr, size_t sz) { static const char hex[17] = "0123456789abcdef"; register const unsigned char *u = (unsigned char *) ptr; register const unsigned char *eu = u + sz; for (; u != eu; ++u) { register unsigned char uu = *u; *(c++) = hex[(uu & 0xf0) >> 4]; *(c++) = hex[uu & 0xf]; } return c; } /* Unpack binary data from a string */ SWIGRUNTIME const char * SWIG_UnpackData(const char *c, void *ptr, size_t sz) { register unsigned char *u = (unsigned char *) ptr; register const unsigned char *eu = u + sz; for (; u != eu; ++u) { register char d = *(c++); register unsigned char uu; if ((d >= '0') && (d <= '9')) uu = ((d - '0') << 4); else if ((d >= 'a') && (d <= 'f')) uu = ((d - ('a'-10)) << 4); else return (char *) 0; d = *(c++); if ((d >= '0') && (d <= '9')) uu |= (d - '0'); else if ((d >= 'a') && (d <= 'f')) uu |= (d - ('a'-10)); else return (char *) 0; *u = uu; } return c; } /* Pack 'void *' into a string buffer. */ SWIGRUNTIME char * SWIG_PackVoidPtr(char *buff, void *ptr, const char *name, size_t bsz) { char *r = buff; if ((2*sizeof(void *) + 2) > bsz) return 0; *(r++) = '_'; r = SWIG_PackData(r,&ptr,sizeof(void *)); if (strlen(name) + 1 > (bsz - (r - buff))) return 0; strcpy(r,name); return buff; } SWIGRUNTIME const char * SWIG_UnpackVoidPtr(const char *c, void **ptr, const char *name) { if (*c != '_') { if (strcmp(c,"NULL") == 0) { *ptr = (void *) 0; return name; } else { return 0; } } return SWIG_UnpackData(++c,ptr,sizeof(void *)); } SWIGRUNTIME char * SWIG_PackDataName(char *buff, void *ptr, size_t sz, const char *name, size_t bsz) { char *r = buff; size_t lname = (name ? strlen(name) : 0); if ((2*sz + 2 + lname) > bsz) return 0; *(r++) = '_'; r = SWIG_PackData(r,ptr,sz); if (lname) { strncpy(r,name,lname+1); } else { *r = 0; } return buff; } SWIGRUNTIME const char * SWIG_UnpackDataName(const char *c, void *ptr, size_t sz, const char *name) { if (*c != '_') { if (strcmp(c,"NULL") == 0) { memset(ptr,0,sz); return name; } else { return 0; } } return SWIG_UnpackData(++c,ptr,sz); } #ifdef __cplusplus } #endif /* Errors in SWIG */ #define SWIG_UnknownError -1 #define SWIG_IOError -2 #define SWIG_RuntimeError -3 #define SWIG_IndexError -4 #define SWIG_TypeError -5 #define SWIG_DivisionByZero -6 #define SWIG_OverflowError -7 #define SWIG_SyntaxError -8 #define SWIG_ValueError -9 #define SWIG_SystemError -10 #define SWIG_AttributeError -11 #define SWIG_MemoryError -12 #define SWIG_NullReferenceError -13 #ifdef __cplusplus /* Needed on some windows machines---since MS plays funny games with the header files under C++ */ #include #include extern "C" { #endif #include "EXTERN.h" #include "perl.h" #include "XSUB.h" /* Add in functionality missing in older versions of Perl. Much of this is based on Devel-PPPort on cpan. */ /* Add PERL_REVISION, PERL_VERSION, PERL_SUBVERSION if missing */ #ifndef PERL_REVISION # if !defined(__PATCHLEVEL_H_INCLUDED__) && !(defined(PATCHLEVEL) && defined(SUBVERSION)) # define PERL_PATCHLEVEL_H_IMPLICIT # include # endif # if !(defined(PERL_VERSION) || (defined(SUBVERSION) && defined(PATCHLEVEL))) # include # endif # ifndef PERL_REVISION # define PERL_REVISION (5) # define PERL_VERSION PATCHLEVEL # define PERL_SUBVERSION SUBVERSION # endif #endif #if defined(WIN32) && defined(PERL_OBJECT) && !defined(PerlIO_exportFILE) #define PerlIO_exportFILE(fh,fl) (FILE*)(fh) #endif #ifndef SvIOK_UV # define SvIOK_UV(sv) (SvIOK(sv) && (SvUVX(sv) == SvIVX(sv))) #endif #ifndef SvUOK # define SvUOK(sv) SvIOK_UV(sv) #endif #if ((PERL_VERSION < 4) || ((PERL_VERSION == 4) && (PERL_SUBVERSION <= 5))) # define PL_sv_undef sv_undef # define PL_na na # define PL_errgv errgv # define PL_sv_no sv_no # define PL_sv_yes sv_yes # define PL_markstack_ptr markstack_ptr #endif #ifndef IVSIZE # ifdef LONGSIZE # define IVSIZE LONGSIZE # else # define IVSIZE 4 /* A bold guess, but the best we can make. */ # endif #endif #ifndef INT2PTR # if (IVSIZE == PTRSIZE) && (UVSIZE == PTRSIZE) # define PTRV UV # define INT2PTR(any,d) (any)(d) # else # if PTRSIZE == LONGSIZE # define PTRV unsigned long # else # define PTRV unsigned # endif # define INT2PTR(any,d) (any)(PTRV)(d) # endif # define NUM2PTR(any,d) (any)(PTRV)(d) # define PTR2IV(p) INT2PTR(IV,p) # define PTR2UV(p) INT2PTR(UV,p) # define PTR2NV(p) NUM2PTR(NV,p) # if PTRSIZE == LONGSIZE # define PTR2ul(p) (unsigned long)(p) # else # define PTR2ul(p) INT2PTR(unsigned long,p) # endif #endif /* !INT2PTR */ #ifndef SvPV_nolen # define SvPV_nolen(x) SvPV(x,PL_na) #endif #ifndef get_sv # define get_sv perl_get_sv #endif #ifndef ERRSV # define ERRSV get_sv("@",FALSE) #endif #ifndef pTHX_ #define pTHX_ #endif #include #ifdef __cplusplus } #endif /* ----------------------------------------------------------------------------- * error manipulation * ----------------------------------------------------------------------------- */ SWIGINTERN const char* SWIG_Perl_ErrorType(int code) { const char* type = 0; switch(code) { case SWIG_MemoryError: type = "MemoryError"; break; case SWIG_IOError: type = "IOError"; break; case SWIG_RuntimeError: type = "RuntimeError"; break; case SWIG_IndexError: type = "IndexError"; break; case SWIG_TypeError: type = "TypeError"; break; case SWIG_DivisionByZero: type = "ZeroDivisionError"; break; case SWIG_OverflowError: type = "OverflowError"; break; case SWIG_SyntaxError: type = "SyntaxError"; break; case SWIG_ValueError: type = "ValueError"; break; case SWIG_SystemError: type = "SystemError"; break; case SWIG_AttributeError: type = "AttributeError"; break; default: type = "RuntimeError"; } return type; } /* ----------------------------------------------------------------------------- * perlrun.swg * * This file contains the runtime support for Perl modules * and includes code for managing global variables and pointer * type checking. * ----------------------------------------------------------------------------- */ #ifdef PERL_OBJECT #define SWIG_PERL_OBJECT_DECL CPerlObj *SWIGUNUSEDPARM(pPerl), #define SWIG_PERL_OBJECT_CALL pPerl, #else #define SWIG_PERL_OBJECT_DECL #define SWIG_PERL_OBJECT_CALL #endif /* Common SWIG API */ /* for raw pointers */ #define SWIG_ConvertPtr(obj, pp, type, flags) SWIG_Perl_ConvertPtr(SWIG_PERL_OBJECT_CALL obj, pp, type, flags) #define SWIG_ConvertPtrAndOwn(obj, pp, type, flags,own) SWIG_Perl_ConvertPtrAndOwn(SWIG_PERL_OBJECT_CALL obj, pp, type, flags, own) #define SWIG_NewPointerObj(p, type, flags) SWIG_Perl_NewPointerObj(SWIG_PERL_OBJECT_CALL p, type, flags) /* for raw packed data */ #define SWIG_ConvertPacked(obj, p, s, type) SWIG_Perl_ConvertPacked(SWIG_PERL_OBJECT_CALL obj, p, s, type) #define SWIG_NewPackedObj(p, s, type) SWIG_Perl_NewPackedObj(SWIG_PERL_OBJECT_CALL p, s, type) /* for class or struct pointers */ #define SWIG_ConvertInstance(obj, pptr, type, flags) SWIG_ConvertPtr(obj, pptr, type, flags) #define SWIG_NewInstanceObj(ptr, type, flags) SWIG_NewPointerObj(ptr, type, flags) /* for C or C++ function pointers */ #define SWIG_ConvertFunctionPtr(obj, pptr, type) SWIG_ConvertPtr(obj, pptr, type, 0) #define SWIG_NewFunctionPtrObj(ptr, type) SWIG_NewPointerObj(ptr, type, 0) /* for C++ member pointers, ie, member methods */ #define SWIG_ConvertMember(obj, ptr, sz, ty) SWIG_ConvertPacked(obj, ptr, sz, ty) #define SWIG_NewMemberObj(ptr, sz, type) SWIG_NewPackedObj(ptr, sz, type) /* Runtime API */ #define SWIG_GetModule(clientdata) SWIG_Perl_GetModule() #define SWIG_SetModule(clientdata, pointer) SWIG_Perl_SetModule(pointer) /* Error manipulation */ #define SWIG_ErrorType(code) SWIG_Perl_ErrorType(code) #define SWIG_Error(code, msg) sv_setpvf(GvSV(PL_errgv),"%s %s\n", SWIG_ErrorType(code), msg) #define SWIG_fail goto fail /* Perl-specific SWIG API */ #define SWIG_MakePtr(sv, ptr, type, flags) SWIG_Perl_MakePtr(SWIG_PERL_OBJECT_CALL sv, ptr, type, flags) #define SWIG_MakePackedObj(sv, p, s, type) SWIG_Perl_MakePackedObj(SWIG_PERL_OBJECT_CALL sv, p, s, type) #define SWIG_SetError(str) SWIG_Error(SWIG_RuntimeError, str) #define SWIG_PERL_DECL_ARGS_1(arg1) (SWIG_PERL_OBJECT_DECL arg1) #define SWIG_PERL_CALL_ARGS_1(arg1) (SWIG_PERL_OBJECT_CALL arg1) #define SWIG_PERL_DECL_ARGS_2(arg1, arg2) (SWIG_PERL_OBJECT_DECL arg1, arg2) #define SWIG_PERL_CALL_ARGS_2(arg1, arg2) (SWIG_PERL_OBJECT_CALL arg1, arg2) /* ----------------------------------------------------------------------------- * pointers/data manipulation * ----------------------------------------------------------------------------- */ /* For backward compatibility only */ #define SWIG_POINTER_EXCEPTION 0 #ifdef __cplusplus extern "C" { #endif #define SWIG_OWNER SWIG_POINTER_OWN #define SWIG_SHADOW SWIG_OWNER << 1 #define SWIG_MAYBE_PERL_OBJECT SWIG_PERL_OBJECT_DECL /* SWIG Perl macros */ /* Macro to declare an XS function */ #ifndef XSPROTO # define XSPROTO(name) void name(pTHX_ CV* cv) #endif /* Macro to call an XS function */ #ifdef PERL_OBJECT # define SWIG_CALLXS(_name) _name(cv,pPerl) #else # ifndef MULTIPLICITY # define SWIG_CALLXS(_name) _name(cv) # else # define SWIG_CALLXS(_name) _name(PERL_GET_THX, cv) # endif #endif #ifdef PERL_OBJECT #define MAGIC_PPERL CPerlObj *pPerl = (CPerlObj *) this; #ifdef __cplusplus extern "C" { #endif typedef int (CPerlObj::*SwigMagicFunc)(SV *, MAGIC *); #ifdef __cplusplus } #endif #define SWIG_MAGIC(a,b) (SV *a, MAGIC *b) #define SWIGCLASS_STATIC #else /* PERL_OBJECT */ #define MAGIC_PPERL #define SWIGCLASS_STATIC static SWIGUNUSED #ifndef MULTIPLICITY #define SWIG_MAGIC(a,b) (SV *a, MAGIC *b) #ifdef __cplusplus extern "C" { #endif typedef int (*SwigMagicFunc)(SV *, MAGIC *); #ifdef __cplusplus } #endif #else /* MULTIPLICITY */ #define SWIG_MAGIC(a,b) (struct interpreter *interp, SV *a, MAGIC *b) #ifdef __cplusplus extern "C" { #endif typedef int (*SwigMagicFunc)(struct interpreter *, SV *, MAGIC *); #ifdef __cplusplus } #endif #endif /* MULTIPLICITY */ #endif /* PERL_OBJECT */ /* Workaround for bug in perl 5.6.x croak and earlier */ #if (PERL_VERSION < 8) # ifdef PERL_OBJECT # define SWIG_croak_null() SWIG_Perl_croak_null(pPerl) static void SWIG_Perl_croak_null(CPerlObj *pPerl) # else static void SWIG_croak_null() # endif { SV *err=ERRSV; # if (PERL_VERSION < 6) croak("%_", err); # else if (SvOK(err) && !SvROK(err)) croak("%_", err); croak(Nullch); # endif } #else # define SWIG_croak_null() croak(Nullch) #endif /* Define how strict is the cast between strings and integers/doubles when overloading between these types occurs. The default is making it as strict as possible by using SWIG_AddCast when needed. You can use -DSWIG_PERL_NO_STRICT_STR2NUM at compilation time to disable the SWIG_AddCast, making the casting between string and numbers less strict. In the end, we try to solve the overloading between strings and numerical types in the more natural way, but if you can avoid it, well, avoid it using %rename, for example. */ #ifndef SWIG_PERL_NO_STRICT_STR2NUM # ifndef SWIG_PERL_STRICT_STR2NUM # define SWIG_PERL_STRICT_STR2NUM # endif #endif #ifdef SWIG_PERL_STRICT_STR2NUM /* string takes precedence */ #define SWIG_Str2NumCast(x) SWIG_AddCast(x) #else /* number takes precedence */ #define SWIG_Str2NumCast(x) x #endif #include SWIGRUNTIME const char * SWIG_Perl_TypeProxyName(const swig_type_info *type) { if (!type) return NULL; if (type->clientdata != NULL) { return (const char*) type->clientdata; } else { return type->name; } } /* Identical to SWIG_TypeCheck, except for strcmp comparison */ SWIGRUNTIME swig_cast_info * SWIG_TypeProxyCheck(const char *c, swig_type_info *ty) { if (ty) { swig_cast_info *iter = ty->cast; while (iter) { if ( (!iter->type->clientdata && (strcmp(iter->type->name, c) == 0)) || (iter->type->clientdata && (strcmp((char*)iter->type->clientdata, c) == 0)) ) { if (iter == ty->cast) return iter; /* Move iter to the top of the linked list */ iter->prev->next = iter->next; if (iter->next) iter->next->prev = iter->prev; iter->next = ty->cast; iter->prev = 0; if (ty->cast) ty->cast->prev = iter; ty->cast = iter; return iter; } iter = iter->next; } } return 0; } /* Function for getting a pointer value */ SWIGRUNTIME int SWIG_Perl_ConvertPtrAndOwn(SWIG_MAYBE_PERL_OBJECT SV *sv, void **ptr, swig_type_info *_t, int flags, int *own) { swig_cast_info *tc; void *voidptr = (void *)0; SV *tsv = 0; if (own) *own = 0; /* If magical, apply more magic */ if (SvGMAGICAL(sv)) mg_get(sv); /* Check to see if this is an object */ if (sv_isobject(sv)) { IV tmp = 0; tsv = (SV*) SvRV(sv); if ((SvTYPE(tsv) == SVt_PVHV)) { MAGIC *mg; if (SvMAGICAL(tsv)) { mg = mg_find(tsv,'P'); if (mg) { sv = mg->mg_obj; if (sv_isobject(sv)) { tsv = (SV*)SvRV(sv); tmp = SvIV(tsv); } } } else { return SWIG_ERROR; } } else { tmp = SvIV(tsv); } voidptr = INT2PTR(void *,tmp); } else if (! SvOK(sv)) { /* Check for undef */ *(ptr) = (void *) 0; return SWIG_OK; } else if (SvTYPE(sv) == SVt_RV) { /* Check for NULL pointer */ if (!SvROK(sv)) { *(ptr) = (void *) 0; return SWIG_OK; } else { return SWIG_ERROR; } } else { /* Don't know what it is */ return SWIG_ERROR; } if (_t) { /* Now see if the types match */ char *_c = HvNAME(SvSTASH(SvRV(sv))); tc = SWIG_TypeProxyCheck(_c,_t); if (!tc) { return SWIG_ERROR; } { int newmemory = 0; *ptr = SWIG_TypeCast(tc,voidptr,&newmemory); if (newmemory == SWIG_CAST_NEW_MEMORY) { assert(own); if (own) *own = *own | SWIG_CAST_NEW_MEMORY; } } } else { *ptr = voidptr; } /* * DISOWN implementation: we need a perl guru to check this one. */ if (tsv && (flags & SWIG_POINTER_DISOWN)) { /* * almost copy paste code from below SWIG_POINTER_OWN setting */ SV *obj = sv; HV *stash = SvSTASH(SvRV(obj)); GV *gv = *(GV**) hv_fetch(stash, "OWNER", 5, TRUE); if (isGV(gv)) { HV *hv = GvHVn(gv); /* * To set ownership (see below), a newSViv(1) entry is added. * Hence, to remove ownership, we delete the entry. */ if (hv_exists_ent(hv, obj, 0)) { hv_delete_ent(hv, obj, 0, 0); } } } return SWIG_OK; } SWIGRUNTIME int SWIG_Perl_ConvertPtr(SWIG_MAYBE_PERL_OBJECT SV *sv, void **ptr, swig_type_info *_t, int flags) { return SWIG_Perl_ConvertPtrAndOwn(sv, ptr, _t, flags, 0); } SWIGRUNTIME void SWIG_Perl_MakePtr(SWIG_MAYBE_PERL_OBJECT SV *sv, void *ptr, swig_type_info *t, int flags) { if (ptr && (flags & (SWIG_SHADOW | SWIG_POINTER_OWN))) { SV *self; SV *obj=newSV(0); HV *hash=newHV(); HV *stash; sv_setref_pv(obj, (char *) SWIG_Perl_TypeProxyName(t), ptr); stash=SvSTASH(SvRV(obj)); if (flags & SWIG_POINTER_OWN) { HV *hv; GV *gv=*(GV**)hv_fetch(stash, "OWNER", 5, TRUE); if (!isGV(gv)) gv_init(gv, stash, "OWNER", 5, FALSE); hv=GvHVn(gv); hv_store_ent(hv, obj, newSViv(1), 0); } sv_magic((SV *)hash, (SV *)obj, 'P', Nullch, 0); SvREFCNT_dec(obj); self=newRV_noinc((SV *)hash); sv_setsv(sv, self); SvREFCNT_dec((SV *)self); sv_bless(sv, stash); } else { sv_setref_pv(sv, (char *) SWIG_Perl_TypeProxyName(t), ptr); } } SWIGRUNTIMEINLINE SV * SWIG_Perl_NewPointerObj(SWIG_MAYBE_PERL_OBJECT void *ptr, swig_type_info *t, int flags) { SV *result = sv_newmortal(); SWIG_MakePtr(result, ptr, t, flags); return result; } SWIGRUNTIME void SWIG_Perl_MakePackedObj(SWIG_MAYBE_PERL_OBJECT SV *sv, void *ptr, int sz, swig_type_info *type) { char result[1024]; char *r = result; if ((2*sz + 1 + strlen(SWIG_Perl_TypeProxyName(type))) > 1000) return; *(r++) = '_'; r = SWIG_PackData(r,ptr,sz); strcpy(r,SWIG_Perl_TypeProxyName(type)); sv_setpv(sv, result); } SWIGRUNTIME SV * SWIG_Perl_NewPackedObj(SWIG_MAYBE_PERL_OBJECT void *ptr, int sz, swig_type_info *type) { SV *result = sv_newmortal(); SWIG_Perl_MakePackedObj(result, ptr, sz, type); return result; } /* Convert a packed value value */ SWIGRUNTIME int SWIG_Perl_ConvertPacked(SWIG_MAYBE_PERL_OBJECT SV *obj, void *ptr, int sz, swig_type_info *ty) { swig_cast_info *tc; const char *c = 0; if ((!obj) || (!SvOK(obj))) return SWIG_ERROR; c = SvPV_nolen(obj); /* Pointer values must start with leading underscore */ if (*c != '_') return SWIG_ERROR; c++; c = SWIG_UnpackData(c,ptr,sz); if (ty) { tc = SWIG_TypeCheck(c,ty); if (!tc) return SWIG_ERROR; } return SWIG_OK; } /* Macros for low-level exception handling */ #define SWIG_croak(x) { SWIG_Error(SWIG_RuntimeError, x); SWIG_fail; } typedef XSPROTO(SwigPerlWrapper); typedef SwigPerlWrapper *SwigPerlWrapperPtr; /* Structure for command table */ typedef struct { const char *name; SwigPerlWrapperPtr wrapper; } swig_command_info; /* Information for constant table */ #define SWIG_INT 1 #define SWIG_FLOAT 2 #define SWIG_STRING 3 #define SWIG_POINTER 4 #define SWIG_BINARY 5 /* Constant information structure */ typedef struct swig_constant_info { int type; const char *name; long lvalue; double dvalue; void *pvalue; swig_type_info **ptype; } swig_constant_info; /* Structure for variable table */ typedef struct { const char *name; SwigMagicFunc set; SwigMagicFunc get; swig_type_info **type; } swig_variable_info; /* Magic variable code */ #ifndef PERL_OBJECT #define swig_create_magic(s,a,b,c) _swig_create_magic(s,a,b,c) #ifndef MULTIPLICITY SWIGRUNTIME void _swig_create_magic(SV *sv, char *name, int (*set)(SV *, MAGIC *), int (*get)(SV *,MAGIC *)) #else SWIGRUNTIME void _swig_create_magic(SV *sv, char *name, int (*set)(struct interpreter*, SV *, MAGIC *), int (*get)(struct interpreter*, SV *,MAGIC *)) #endif #else # define swig_create_magic(s,a,b,c) _swig_create_magic(pPerl,s,a,b,c) SWIGRUNTIME void _swig_create_magic(CPerlObj *pPerl, SV *sv, const char *name, int (CPerlObj::*set)(SV *, MAGIC *), int (CPerlObj::*get)(SV *, MAGIC *)) #endif { MAGIC *mg; sv_magic(sv,sv,'U',(char *) name,strlen(name)); mg = mg_find(sv,'U'); mg->mg_virtual = (MGVTBL *) malloc(sizeof(MGVTBL)); mg->mg_virtual->svt_get = (SwigMagicFunc) get; mg->mg_virtual->svt_set = (SwigMagicFunc) set; mg->mg_virtual->svt_len = 0; mg->mg_virtual->svt_clear = 0; mg->mg_virtual->svt_free = 0; } SWIGRUNTIME swig_module_info * SWIG_Perl_GetModule(void) { static void *type_pointer = (void *)0; SV *pointer; /* first check if pointer already created */ if (!type_pointer) { pointer = get_sv("swig_runtime_data::type_pointer" SWIG_RUNTIME_VERSION SWIG_TYPE_TABLE_NAME, FALSE | GV_ADDMULTI); if (pointer && SvOK(pointer)) { type_pointer = INT2PTR(swig_type_info **, SvIV(pointer)); } } return (swig_module_info *) type_pointer; } SWIGRUNTIME void SWIG_Perl_SetModule(swig_module_info *module) { SV *pointer; /* create a new pointer */ pointer = get_sv("swig_runtime_data::type_pointer" SWIG_RUNTIME_VERSION SWIG_TYPE_TABLE_NAME, TRUE | GV_ADDMULTI); sv_setiv(pointer, PTR2IV(module)); } #ifdef __cplusplus } #endif /* Workaround perl5 global namespace pollution. Note that undefining library * functions like fopen will not solve the problem on all platforms as fopen * might be a macro on Windows but not necessarily on other operating systems. */ #ifdef do_open #undef do_open #endif #ifdef do_close #undef do_close #endif #ifdef do_exec #undef do_exec #endif #ifdef scalar #undef scalar #endif #ifdef list #undef list #endif #ifdef apply #undef apply #endif #ifdef convert #undef convert #endif #ifdef Error #undef Error #endif #ifdef form #undef form #endif #ifdef vform #undef vform #endif #ifdef LABEL #undef LABEL #endif #ifdef METHOD #undef METHOD #endif #ifdef Move #undef Move #endif #ifdef yylex #undef yylex #endif #ifdef yyparse #undef yyparse #endif #ifdef yyerror #undef yyerror #endif #ifdef invert #undef invert #endif #ifdef ref #undef ref #endif #ifdef read #undef read #endif #ifdef write #undef write #endif #ifdef eof #undef eof #endif #ifdef bool #undef bool #endif #ifdef close #undef close #endif #ifdef rewind #undef rewind #endif #ifdef free #undef free #endif #ifdef malloc #undef malloc #endif #ifdef calloc #undef calloc #endif #ifdef Stat #undef Stat #endif #ifdef check #undef check #endif #ifdef seekdir #undef seekdir #endif #ifdef open #undef open #endif #ifdef readdir #undef readdir #endif #ifdef bind #undef bind #endif #define SWIG_exception_fail(code, msg) do { SWIG_Error(code, msg); SWIG_fail; } while(0) #define SWIG_contract_assert(expr, msg) if (!(expr)) { SWIG_Error(SWIG_RuntimeError, msg); SWIG_fail; } else /* -------- TYPES TABLE (BEGIN) -------- */ #define SWIGTYPE_p_FILE swig_types[0] #define SWIGTYPE_p_char swig_types[1] #define SWIGTYPE_p_f_enum_prelude_log_t_p_q_const__char__void swig_types[2] #define SWIGTYPE_p_f_p_p_struct_prelude_msg_p_void__int swig_types[3] #define SWIGTYPE_p_f_p_struct_idmef_value_p_void__int swig_types[4] #define SWIGTYPE_p_f_p_struct_prelude_client_p_struct_idmef_message__void swig_types[5] #define SWIGTYPE_p_f_p_struct_prelude_connection_pool_enum_prelude_connection_pool_event_t__int swig_types[6] #define SWIGTYPE_p_f_p_struct_prelude_connection_pool_enum_prelude_connection_pool_event_t_p_struct_prelude_connection__int swig_types[7] #define SWIGTYPE_p_f_p_struct_prelude_connection_pool_enum_prelude_connection_pool_event_t_p_struct_prelude_connection_p_void__int swig_types[8] #define SWIGTYPE_p_f_p_struct_prelude_msgbuf_p_struct_prelude_msg__int swig_types[9] #define SWIGTYPE_p_f_p_struct_prelude_option_p_prelude_string_t_p_void__int swig_types[10] #define SWIGTYPE_p_f_p_struct_prelude_option_p_q_const__char_p_prelude_string_t_p_void__int swig_types[11] #define SWIGTYPE_p_f_p_void__void swig_types[12] #define SWIGTYPE_p_idmef_action swig_types[13] #define SWIGTYPE_p_idmef_action_category_t swig_types[14] #define SWIGTYPE_p_idmef_additional_data swig_types[15] #define SWIGTYPE_p_idmef_additional_data_type_t swig_types[16] #define SWIGTYPE_p_idmef_address swig_types[17] #define SWIGTYPE_p_idmef_address_category_t swig_types[18] #define SWIGTYPE_p_idmef_alert swig_types[19] #define SWIGTYPE_p_idmef_alert_type_t swig_types[20] #define SWIGTYPE_p_idmef_alertident swig_types[21] #define SWIGTYPE_p_idmef_analyzer swig_types[22] #define SWIGTYPE_p_idmef_assessment swig_types[23] #define SWIGTYPE_p_idmef_checksum swig_types[24] #define SWIGTYPE_p_idmef_checksum_algorithm_t swig_types[25] #define SWIGTYPE_p_idmef_classification swig_types[26] #define SWIGTYPE_p_idmef_confidence swig_types[27] #define SWIGTYPE_p_idmef_confidence_rating_t swig_types[28] #define SWIGTYPE_p_idmef_correlation_alert swig_types[29] #define SWIGTYPE_p_idmef_criteria swig_types[30] #define SWIGTYPE_p_idmef_criterion swig_types[31] #define SWIGTYPE_p_idmef_criterion_operator_t swig_types[32] #define SWIGTYPE_p_idmef_criterion_value_t swig_types[33] #define SWIGTYPE_p_idmef_data_t swig_types[34] #define SWIGTYPE_p_idmef_data_t_data swig_types[35] #define SWIGTYPE_p_idmef_data_type_t swig_types[36] #define SWIGTYPE_p_idmef_file swig_types[37] #define SWIGTYPE_p_idmef_file_access swig_types[38] #define SWIGTYPE_p_idmef_file_category_t swig_types[39] #define SWIGTYPE_p_idmef_file_fstype_t swig_types[40] #define SWIGTYPE_p_idmef_heartbeat swig_types[41] #define SWIGTYPE_p_idmef_impact swig_types[42] #define SWIGTYPE_p_idmef_impact_completion_t swig_types[43] #define SWIGTYPE_p_idmef_impact_severity_t swig_types[44] #define SWIGTYPE_p_idmef_impact_type_t swig_types[45] #define SWIGTYPE_p_idmef_inode swig_types[46] #define SWIGTYPE_p_idmef_linkage swig_types[47] #define SWIGTYPE_p_idmef_linkage_category_t swig_types[48] #define SWIGTYPE_p_idmef_message swig_types[49] #define SWIGTYPE_p_idmef_message_type_t swig_types[50] #define SWIGTYPE_p_idmef_node swig_types[51] #define SWIGTYPE_p_idmef_node_category_t swig_types[52] #define SWIGTYPE_p_idmef_overflow_alert swig_types[53] #define SWIGTYPE_p_idmef_path swig_types[54] #define SWIGTYPE_p_idmef_process swig_types[55] #define SWIGTYPE_p_idmef_reference swig_types[56] #define SWIGTYPE_p_idmef_reference_origin_t swig_types[57] #define SWIGTYPE_p_idmef_service swig_types[58] #define SWIGTYPE_p_idmef_service_type_t swig_types[59] #define SWIGTYPE_p_idmef_snmp_service swig_types[60] #define SWIGTYPE_p_idmef_source swig_types[61] #define SWIGTYPE_p_idmef_source_spoofed_t swig_types[62] #define SWIGTYPE_p_idmef_target swig_types[63] #define SWIGTYPE_p_idmef_target_decoy_t swig_types[64] #define SWIGTYPE_p_idmef_time swig_types[65] #define SWIGTYPE_p_idmef_tool_alert swig_types[66] #define SWIGTYPE_p_idmef_user swig_types[67] #define SWIGTYPE_p_idmef_user_category_t swig_types[68] #define SWIGTYPE_p_idmef_user_id swig_types[69] #define SWIGTYPE_p_idmef_user_id_type_t swig_types[70] #define SWIGTYPE_p_idmef_value swig_types[71] #define SWIGTYPE_p_idmef_value_type_class_t swig_types[72] #define SWIGTYPE_p_idmef_value_type_data_t swig_types[73] #define SWIGTYPE_p_idmef_value_type_enum_t swig_types[74] #define SWIGTYPE_p_idmef_value_type_id_t swig_types[75] #define SWIGTYPE_p_idmef_value_type_t swig_types[76] #define SWIGTYPE_p_idmef_web_service swig_types[77] #define SWIGTYPE_p_int swig_types[78] #define SWIGTYPE_p_long_long swig_types[79] #define SWIGTYPE_p_p_char swig_types[80] #define SWIGTYPE_p_p_float swig_types[81] #define SWIGTYPE_p_p_idmef_action swig_types[82] #define SWIGTYPE_p_p_idmef_action_category_t swig_types[83] #define SWIGTYPE_p_p_idmef_additional_data swig_types[84] #define SWIGTYPE_p_p_idmef_additional_data_type_t swig_types[85] #define SWIGTYPE_p_p_idmef_address swig_types[86] #define SWIGTYPE_p_p_idmef_address_category_t swig_types[87] #define SWIGTYPE_p_p_idmef_alert swig_types[88] #define SWIGTYPE_p_p_idmef_alertident swig_types[89] #define SWIGTYPE_p_p_idmef_analyzer swig_types[90] #define SWIGTYPE_p_p_idmef_assessment swig_types[91] #define SWIGTYPE_p_p_idmef_checksum swig_types[92] #define SWIGTYPE_p_p_idmef_checksum_algorithm_t swig_types[93] #define SWIGTYPE_p_p_idmef_classification swig_types[94] #define SWIGTYPE_p_p_idmef_confidence swig_types[95] #define SWIGTYPE_p_p_idmef_confidence_rating_t swig_types[96] #define SWIGTYPE_p_p_idmef_correlation_alert swig_types[97] #define SWIGTYPE_p_p_idmef_criteria swig_types[98] #define SWIGTYPE_p_p_idmef_criterion swig_types[99] #define SWIGTYPE_p_p_idmef_data_t swig_types[100] #define SWIGTYPE_p_p_idmef_file swig_types[101] #define SWIGTYPE_p_p_idmef_file_access swig_types[102] #define SWIGTYPE_p_p_idmef_file_category_t swig_types[103] #define SWIGTYPE_p_p_idmef_file_fstype_t swig_types[104] #define SWIGTYPE_p_p_idmef_heartbeat swig_types[105] #define SWIGTYPE_p_p_idmef_impact swig_types[106] #define SWIGTYPE_p_p_idmef_impact_completion_t swig_types[107] #define SWIGTYPE_p_p_idmef_impact_severity_t swig_types[108] #define SWIGTYPE_p_p_idmef_impact_type_t swig_types[109] #define SWIGTYPE_p_p_idmef_inode swig_types[110] #define SWIGTYPE_p_p_idmef_linkage swig_types[111] #define SWIGTYPE_p_p_idmef_linkage_category_t swig_types[112] #define SWIGTYPE_p_p_idmef_message swig_types[113] #define SWIGTYPE_p_p_idmef_node swig_types[114] #define SWIGTYPE_p_p_idmef_node_category_t swig_types[115] #define SWIGTYPE_p_p_idmef_overflow_alert swig_types[116] #define SWIGTYPE_p_p_idmef_path swig_types[117] #define SWIGTYPE_p_p_idmef_process swig_types[118] #define SWIGTYPE_p_p_idmef_reference swig_types[119] #define SWIGTYPE_p_p_idmef_reference_origin_t swig_types[120] #define SWIGTYPE_p_p_idmef_service swig_types[121] #define SWIGTYPE_p_p_idmef_snmp_service swig_types[122] #define SWIGTYPE_p_p_idmef_source swig_types[123] #define SWIGTYPE_p_p_idmef_source_spoofed_t swig_types[124] #define SWIGTYPE_p_p_idmef_target swig_types[125] #define SWIGTYPE_p_p_idmef_target_decoy_t swig_types[126] #define SWIGTYPE_p_p_idmef_time swig_types[127] #define SWIGTYPE_p_p_idmef_tool_alert swig_types[128] #define SWIGTYPE_p_p_idmef_user swig_types[129] #define SWIGTYPE_p_p_idmef_user_category_t swig_types[130] #define SWIGTYPE_p_p_idmef_user_id swig_types[131] #define SWIGTYPE_p_p_idmef_user_id_type_t swig_types[132] #define SWIGTYPE_p_p_idmef_value swig_types[133] #define SWIGTYPE_p_p_idmef_web_service swig_types[134] #define SWIGTYPE_p_p_int swig_types[135] #define SWIGTYPE_p_p_prelude_client swig_types[136] #define SWIGTYPE_p_p_prelude_client_profile swig_types[137] #define SWIGTYPE_p_p_prelude_connection swig_types[138] #define SWIGTYPE_p_p_prelude_connection_pool swig_types[139] #define SWIGTYPE_p_p_prelude_msg swig_types[140] #define SWIGTYPE_p_p_prelude_msgbuf swig_types[141] #define SWIGTYPE_p_p_prelude_option swig_types[142] #define SWIGTYPE_p_p_prelude_option_context swig_types[143] #define SWIGTYPE_p_p_prelude_string_t swig_types[144] #define SWIGTYPE_p_p_unsigned_char swig_types[145] #define SWIGTYPE_p_p_unsigned_int swig_types[146] #define SWIGTYPE_p_p_unsigned_long_long swig_types[147] #define SWIGTYPE_p_p_unsigned_short swig_types[148] #define SWIGTYPE_p_p_void swig_types[149] #define SWIGTYPE_p_prelude_bool_t swig_types[150] #define SWIGTYPE_p_prelude_client swig_types[151] #define SWIGTYPE_p_prelude_client_exit_status_t swig_types[152] #define SWIGTYPE_p_prelude_client_flags_t swig_types[153] #define SWIGTYPE_p_prelude_client_profile swig_types[154] #define SWIGTYPE_p_prelude_connection swig_types[155] #define SWIGTYPE_p_prelude_connection_permission_t swig_types[156] #define SWIGTYPE_p_prelude_connection_pool swig_types[157] #define SWIGTYPE_p_prelude_connection_pool_event_t swig_types[158] #define SWIGTYPE_p_prelude_connection_pool_flags_t swig_types[159] #define SWIGTYPE_p_prelude_connection_state_t swig_types[160] #define SWIGTYPE_p_prelude_error_code_t swig_types[161] #define SWIGTYPE_p_prelude_error_source_t swig_types[162] #define SWIGTYPE_p_prelude_ident_t swig_types[163] #define SWIGTYPE_p_prelude_io_t swig_types[164] #define SWIGTYPE_p_prelude_list_t swig_types[165] #define SWIGTYPE_p_prelude_log_flags_t swig_types[166] #define SWIGTYPE_p_prelude_log_t swig_types[167] #define SWIGTYPE_p_prelude_msg swig_types[168] #define SWIGTYPE_p_prelude_msg_priority_t swig_types[169] #define SWIGTYPE_p_prelude_msgbuf swig_types[170] #define SWIGTYPE_p_prelude_msgbuf_flags_t swig_types[171] #define SWIGTYPE_p_prelude_option swig_types[172] #define SWIGTYPE_p_prelude_option_argument_t swig_types[173] #define SWIGTYPE_p_prelude_option_context swig_types[174] #define SWIGTYPE_p_prelude_option_input_type_t swig_types[175] #define SWIGTYPE_p_prelude_option_priority_t swig_types[176] #define SWIGTYPE_p_prelude_option_type_t swig_types[177] #define SWIGTYPE_p_prelude_option_warning_t swig_types[178] #define SWIGTYPE_p_prelude_string_t swig_types[179] #define SWIGTYPE_p_prelude_timer_t swig_types[180] #define SWIGTYPE_p_short swig_types[181] #define SWIGTYPE_p_ssize_t swig_types[182] #define SWIGTYPE_p_time_t swig_types[183] #define SWIGTYPE_p_timeval swig_types[184] #define SWIGTYPE_p_unsigned_char swig_types[185] #define SWIGTYPE_p_unsigned_int swig_types[186] #define SWIGTYPE_p_unsigned_long_long swig_types[187] #define SWIGTYPE_p_unsigned_short swig_types[188] #define SWIGTYPE_p_void swig_types[189] static swig_type_info *swig_types[191]; static swig_module_info swig_module = {swig_types, 190, 0, 0, 0, 0}; #define SWIG_TypeQuery(name) SWIG_TypeQueryModule(&swig_module, &swig_module, name) #define SWIG_MangledTypeQuery(name) SWIG_MangledTypeQueryModule(&swig_module, &swig_module, name) /* -------- TYPES TABLE (END) -------- */ #define SWIG_init boot_Prelude #define SWIG_name "Prelude::boot_Prelude" #define SWIG_prefix "Prelude::" #define SWIGVERSION 0x010340 #define SWIG_VERSION SWIGVERSION #define SWIG_as_voidptr(a) (void *)((const void *)(a)) #define SWIG_as_voidptrptr(a) ((void)SWIG_as_voidptr(*a),(void**)(a)) #ifdef __cplusplus extern "C" #endif #ifndef PERL_OBJECT #ifndef MULTIPLICITY SWIGEXPORT void SWIG_init (CV* cv); #else SWIGEXPORT void SWIG_init (pTHXo_ CV* cv); #endif #else SWIGEXPORT void SWIG_init (CV *cv, CPerlObj *); #endif #include #include #include #include #include "prelude.h" #include "prelude-log.h" #include "prelude-msg.h" #include "prelude-option.h" #include "prelude-option-wide.h" #include "idmef.h" #include "idmef-message-write.h" #include "idmef-message-print.h" #include "idmef-additional-data.h" #include "idmef-tree-wrap.h" #include "prelude-inttypes.h" SWIGINTERNINLINE SV * SWIG_From_long SWIG_PERL_DECL_ARGS_1(long value) { SV *obj = sv_newmortal(); sv_setiv(obj, (IV) value); return obj; } SWIGINTERNINLINE SV * SWIG_From_int SWIG_PERL_DECL_ARGS_1(int value) { return SWIG_From_long SWIG_PERL_CALL_ARGS_1(value); } void *swig_idmef_value_get_descriptor(idmef_value_t *value) { unsigned int i = 0; idmef_class_id_t wanted_class = idmef_value_get_class(value); const struct { idmef_class_id_t classid; const char *classname; } tbl[] = { { IDMEF_CLASS_ID_ADDITIONAL_DATA, "idmef_additional_data_t *" }, { IDMEF_CLASS_ID_CLASSIFICATION, "idmef_classification_t *" }, { IDMEF_CLASS_ID_USER_ID, "idmef_user_id_t *" }, { IDMEF_CLASS_ID_USER, "idmef_user_t *" }, { IDMEF_CLASS_ID_ADDRESS, "idmef_address_t *" }, { IDMEF_CLASS_ID_PROCESS, "idmef_process_t *" }, { IDMEF_CLASS_ID_WEB_SERVICE, "idmef_web_service_t *" }, { IDMEF_CLASS_ID_SNMP_SERVICE, "idmef_snmp_service_t *" }, { IDMEF_CLASS_ID_SERVICE, "idmef_service_t *" }, { IDMEF_CLASS_ID_NODE, "idmef_node_t *" }, { IDMEF_CLASS_ID_SOURCE, "idmef_source_t *" }, { IDMEF_CLASS_ID_FILE_ACCESS, "idmef_file_access_t *" }, { IDMEF_CLASS_ID_INODE, "idmef_inode_t *" }, { IDMEF_CLASS_ID_FILE, "idmef_file_t *" }, { IDMEF_CLASS_ID_LINKAGE, "idmef_linkage_t *" }, { IDMEF_CLASS_ID_TARGET, "idmef_target_t *" }, { IDMEF_CLASS_ID_ANALYZER, "idmef_analyzer_t *" }, { IDMEF_CLASS_ID_ALERTIDENT, "idmef_alertident_t *" }, { IDMEF_CLASS_ID_IMPACT, "idmef_impact_t *" }, { IDMEF_CLASS_ID_ACTION, "idmef_action_t *" }, { IDMEF_CLASS_ID_CONFIDENCE, "idmef_confidence_t *" }, { IDMEF_CLASS_ID_ASSESSMENT, "idmef_assessment_t *" }, { IDMEF_CLASS_ID_TOOL_ALERT, "idmef_tool_alert_t *" }, { IDMEF_CLASS_ID_CORRELATION_ALERT, "idmef_correlation_alert_t *" }, { IDMEF_CLASS_ID_OVERFLOW_ALERT, "idmef_overflow_alert_t *" }, { IDMEF_CLASS_ID_ALERT, "idmef_alert_t *" }, { IDMEF_CLASS_ID_HEARTBEAT, "idmef_heartbeat_t *" }, { IDMEF_CLASS_ID_MESSAGE, "idmef_message_t *" }, { IDMEF_CLASS_ID_REFERENCE, "idmef_reference_t *" }, { IDMEF_CLASS_ID_CHECKSUM, "idmef_checksum_t *" }, { 0, NULL } }; for ( i = 0; tbl[i].classname != NULL; i++ ) { if ( tbl[i].classid == wanted_class ) return SWIG_TypeQuery(tbl[i].classname); } return NULL; } void swig_perl_raise_error(int error) { char buf[1024]; snprintf(buf, sizeof(buf), "Prelude error - %s: %s", prelude_strsource(error), prelude_strerror(error)); croak(buf); } SV *swig_perl_string(prelude_string_t *string) { if ( string ) { return newSVpv(prelude_string_get_string(string), prelude_string_get_len(string)); } else { SvREFCNT_inc (& PL_sv_undef); return &PL_sv_undef; } } SV *swig_perl_data(idmef_data_t *data) { switch ( idmef_data_get_type(data) ) { case IDMEF_DATA_TYPE_CHAR: case IDMEF_DATA_TYPE_BYTE: return newSVpv((const char *)idmef_data_get_data(data), 1); case IDMEF_DATA_TYPE_CHAR_STRING: return newSVpv((const char *)idmef_data_get_data(data), idmef_data_get_len(data) - 1); case IDMEF_DATA_TYPE_BYTE_STRING: return newSVpv((const char *)idmef_data_get_data(data), idmef_data_get_len(data)); case IDMEF_DATA_TYPE_UINT32: return newSVpvf("%d", idmef_data_get_uint32(data)); case IDMEF_DATA_TYPE_UINT64: return newSVpvf("%" PRELUDE_PRIu64, idmef_data_get_uint64(data)); case IDMEF_DATA_TYPE_FLOAT: return newSVpvf("%hf", idmef_data_get_float(data)); default: SvREFCNT_inc (& PL_sv_undef); return &PL_sv_undef; } } SWIGINTERNINLINE SV * SWIG_FromCharPtrAndSize(const char* carray, size_t size) { SV *obj = sv_newmortal(); if (carray) { sv_setpvn(obj, carray, size); } else { sv_setsv(obj, &PL_sv_undef); } return obj; } SWIGINTERNINLINE SV * SWIG_FromCharPtr(const char *cptr) { return SWIG_FromCharPtrAndSize(cptr, (cptr ? strlen(cptr) : 0)); } SWIGINTERN swig_type_info* SWIG_pchar_descriptor(void) { static int init = 0; static swig_type_info* info = 0; if (!init) { info = SWIG_TypeQuery("_p_char"); init = 1; } return info; } SWIGINTERN int SWIG_AsCharPtrAndSize(SV *obj, char** cptr, size_t* psize, int *alloc) { if (SvMAGICAL(obj)) { SV *tmp = sv_newmortal(); SvSetSV(tmp, obj); obj = tmp; } if (SvPOK(obj)) { STRLEN len = 0; char *cstr = SvPV(obj, len); size_t size = len + 1; if (cptr) { if (alloc) { if (*alloc == SWIG_NEWOBJ) { *cptr = (char *)memcpy((char *)malloc((size)*sizeof(char)), cstr, sizeof(char)*(size)); } else { *cptr = cstr; *alloc = SWIG_OLDOBJ; } } } if (psize) *psize = size; return SWIG_OK; } else { swig_type_info* pchar_descriptor = SWIG_pchar_descriptor(); if (pchar_descriptor) { char* vptr = 0; if (SWIG_ConvertPtr(obj, (void**)&vptr, pchar_descriptor, 0) == SWIG_OK) { if (cptr) *cptr = vptr; if (psize) *psize = vptr ? (strlen(vptr) + 1) : 0; if (alloc) *alloc = SWIG_OLDOBJ; return SWIG_OK; } } } return SWIG_TypeError; } #include #if !defined(SWIG_NO_LLONG_MAX) # if !defined(LLONG_MAX) && defined(__GNUC__) && defined (__LONG_LONG_MAX__) # define LLONG_MAX __LONG_LONG_MAX__ # define LLONG_MIN (-LLONG_MAX - 1LL) # define ULLONG_MAX (LLONG_MAX * 2ULL + 1ULL) # endif #endif SWIGINTERN int SWIG_AsVal_double SWIG_PERL_DECL_ARGS_2(SV *obj, double *val) { if (SvNIOK(obj)) { if (val) *val = SvNV(obj); return SWIG_OK; } else if (SvIOK(obj)) { if (val) *val = (double) SvIV(obj); return SWIG_AddCast(SWIG_OK); } else { const char *nptr = SvPV_nolen(obj); if (nptr) { char *endptr; double v = strtod(nptr, &endptr); if (errno == ERANGE) { errno = 0; return SWIG_OverflowError; } else { if (*endptr == '\0') { if (val) *val = v; return SWIG_Str2NumCast(SWIG_OK); } } } } return SWIG_TypeError; } #include #include SWIGINTERNINLINE int SWIG_CanCastAsInteger(double *d, double min, double max) { double x = *d; if ((min <= x && x <= max)) { double fx = floor(x); double cx = ceil(x); double rd = ((x - fx) < 0.5) ? fx : cx; /* simple rint */ if ((errno == EDOM) || (errno == ERANGE)) { errno = 0; } else { double summ, reps, diff; if (rd < x) { diff = x - rd; } else if (rd > x) { diff = rd - x; } else { return 1; } summ = rd + x; reps = diff/summ; if (reps < 8*DBL_EPSILON) { *d = rd; return 1; } } } return 0; } SWIGINTERN int SWIG_AsVal_long SWIG_PERL_DECL_ARGS_2(SV *obj, long* val) { if (SvIOK(obj)) { if (val) *val = SvIV(obj); return SWIG_OK; } else { int dispatch = 0; const char *nptr = SvPV_nolen(obj); if (nptr) { char *endptr; long v; errno = 0; v = strtol(nptr, &endptr,0); if (errno == ERANGE) { errno = 0; return SWIG_OverflowError; } else { if (*endptr == '\0') { if (val) *val = v; return SWIG_Str2NumCast(SWIG_OK); } } } if (!dispatch) { double d; int res = SWIG_AddCast(SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(obj,&d)); if (SWIG_IsOK(res) && SWIG_CanCastAsInteger(&d, LONG_MIN, LONG_MAX)) { if (val) *val = (long)(d); return res; } } } return SWIG_TypeError; } SWIGINTERN int SWIG_AsVal_int SWIG_PERL_DECL_ARGS_2(SV * obj, int *val) { long v; int res = SWIG_AsVal_long SWIG_PERL_CALL_ARGS_2(obj, &v); if (SWIG_IsOK(res)) { if ((v < INT_MIN || v > INT_MAX)) { return SWIG_OverflowError; } else { if (val) *val = (int)(v); } } return res; } SWIGINTERN int SWIG_AsVal_unsigned_SS_long SWIG_PERL_DECL_ARGS_2(SV *obj, unsigned long *val) { if (SvUOK(obj)) { if (val) *val = SvUV(obj); return SWIG_OK; } else if (SvIOK(obj)) { long v = SvIV(obj); if (v >= 0) { if (val) *val = v; return SWIG_OK; } else { return SWIG_OverflowError; } } else { int dispatch = 0; const char *nptr = SvPV_nolen(obj); if (nptr) { char *endptr; unsigned long v; errno = 0; v = strtoul(nptr, &endptr,0); if (errno == ERANGE) { errno = 0; return SWIG_OverflowError; } else { if (*endptr == '\0') { if (val) *val = v; return SWIG_Str2NumCast(SWIG_OK); } } } if (!dispatch) { double d; int res = SWIG_AddCast(SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(obj,&d)); if (SWIG_IsOK(res) && SWIG_CanCastAsInteger(&d, 0, ULONG_MAX)) { if (val) *val = (unsigned long)(d); return res; } } } return SWIG_TypeError; } SWIGINTERNINLINE int SWIG_AsVal_size_t SWIG_PERL_DECL_ARGS_2(SV * obj, size_t *val) { unsigned long v; int res = SWIG_AsVal_unsigned_SS_long SWIG_PERL_CALL_ARGS_2(obj, val ? &v : 0); if (SWIG_IsOK(res) && val) *val = (size_t)(v); return res; } #include #if defined(_MSC_VER) || defined(__BORLANDC__) || defined(_WATCOM) # ifndef snprintf # define snprintf _snprintf # endif #endif SWIGINTERNINLINE SV * SWIG_From_long_SS_long SWIG_PERL_DECL_ARGS_1(long long value) { if (((long long) LONG_MIN <= value) && (value <= (long long) LONG_MAX)) { return SWIG_From_long SWIG_PERL_CALL_ARGS_1((long)(value)); } else { char temp[256]; SV *obj = sv_newmortal(); sprintf(temp, "%lld", value); sv_setpv(obj, temp); return obj; } } SWIGINTERNINLINE SV * SWIG_From_unsigned_SS_long_SS_long SWIG_PERL_DECL_ARGS_1(unsigned long long value) { if (value < (unsigned long long) LONG_MAX) { return SWIG_From_long_SS_long SWIG_PERL_CALL_ARGS_1((long long)(value)); } else { char temp[256]; SV *obj = sv_newmortal(); sprintf(temp, "%llu", value); sv_setpv(obj, temp); return obj; } } #include #ifdef _MSC_VER # ifndef strtoull # define strtoull _strtoui64 # endif # ifndef strtoll # define strtoll _strtoi64 # endif #endif SWIGINTERN int SWIG_AsVal_unsigned_SS_long_SS_long SWIG_PERL_DECL_ARGS_2(SV *obj, unsigned long long *val) { if (SvUOK(obj)) { if (val) *val = SvUV(obj); return SWIG_OK; } else if (SvIOK(obj)) { long v = SvIV(obj); if (v >= 0) { if (val) *val = v; return SWIG_OK; } else { return SWIG_OverflowError; } } else { int dispatch = 0; const char *nptr = SvPV_nolen(obj); if (nptr) { char *endptr; unsigned long long v; errno = 0; v = strtoull(nptr, &endptr,0); if (errno == ERANGE) { errno = 0; return SWIG_OverflowError; } else { if (*endptr == '\0') { if (val) *val = v; return SWIG_Str2NumCast(SWIG_OK); } } } if (!dispatch) { const double mant_max = 1LL << DBL_MANT_DIG; double d; int res = SWIG_AddCast(SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(obj,&d)); if (SWIG_IsOK(res) && SWIG_CanCastAsInteger(&d, 0, mant_max)) { if (val) *val = (unsigned long long)(d); return res; } } } return SWIG_TypeError; } SWIGINTERN int SWIG_AsVal_unsigned_SS_int SWIG_PERL_DECL_ARGS_2(SV * obj, unsigned int *val) { unsigned long v; int res = SWIG_AsVal_unsigned_SS_long SWIG_PERL_CALL_ARGS_2(obj, &v); if (SWIG_IsOK(res)) { if ((v > UINT_MAX)) { return SWIG_OverflowError; } else { if (val) *val = (unsigned int)(v); } } return res; } SWIGINTERN int SWIG_AsVal_unsigned_SS_char SWIG_PERL_DECL_ARGS_2(SV * obj, unsigned char *val) { unsigned long v; int res = SWIG_AsVal_unsigned_SS_long SWIG_PERL_CALL_ARGS_2(obj, &v); if (SWIG_IsOK(res)) { if ((v > UCHAR_MAX)) { return SWIG_OverflowError; } else { if (val) *val = (unsigned char)(v); } } return res; } SWIGINTERN int SWIG_AsVal_unsigned_SS_short SWIG_PERL_DECL_ARGS_2(SV * obj, unsigned short *val) { unsigned long v; int res = SWIG_AsVal_unsigned_SS_long SWIG_PERL_CALL_ARGS_2(obj, &v); if (SWIG_IsOK(res)) { if ((v > USHRT_MAX)) { return SWIG_OverflowError; } else { if (val) *val = (unsigned short)(v); } } return res; } SWIGINTERNINLINE SV * SWIG_From_double SWIG_PERL_DECL_ARGS_1(double value) { SV *obj = sv_newmortal(); sv_setnv(obj, value); return obj; } SWIGINTERNINLINE SV * SWIG_From_float SWIG_PERL_DECL_ARGS_1(float value) { return SWIG_From_double SWIG_PERL_CALL_ARGS_1(value); } SWIGINTERN int SWIG_AsVal_float SWIG_PERL_DECL_ARGS_2(SV * obj, float *val) { double v; int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(obj, &v); if (SWIG_IsOK(res)) { if ((v < -FLT_MAX || v > FLT_MAX)) { return SWIG_OverflowError; } else { if (val) *val = (float)(v); } } return res; } SWIGINTERN int SWIG_AsCharArray(SV * obj, char *val, size_t size) { char* cptr = 0; size_t csize = 0; int alloc = SWIG_OLDOBJ; int res = SWIG_AsCharPtrAndSize(obj, &cptr, &csize, &alloc); if (SWIG_IsOK(res)) { if ((csize == size + 1) && cptr && !(cptr[csize-1])) --csize; if (csize <= size) { if (val) { if (csize) memcpy(val, cptr, csize*sizeof(char)); if (csize < size) memset(val + csize, 0, (size - csize)*sizeof(char)); } if (alloc == SWIG_NEWOBJ) { free((char*)cptr); res = SWIG_DelNewMask(res); } return res; } if (alloc == SWIG_NEWOBJ) free((char*)cptr); } return SWIG_TypeError; } SWIGINTERN int SWIG_AsVal_char SWIG_PERL_DECL_ARGS_2(SV * obj, char *val) { int res = SWIG_AsCharArray(obj, val, 1); if (!SWIG_IsOK(res)) { long v; res = SWIG_AddCast(SWIG_AsVal_long SWIG_PERL_CALL_ARGS_2(obj, &v)); if (SWIG_IsOK(res)) { if ((CHAR_MIN <= v) && (v <= CHAR_MAX)) { if (val) *val = (char)(v); } else { res = SWIG_OverflowError; } } } return res; } SWIGINTERN int SWIG_AsVal_short SWIG_PERL_DECL_ARGS_2(SV * obj, short *val) { long v; int res = SWIG_AsVal_long SWIG_PERL_CALL_ARGS_2(obj, &v); if (SWIG_IsOK(res)) { if ((v < SHRT_MIN || v > SHRT_MAX)) { return SWIG_OverflowError; } else { if (val) *val = (short)(v); } } return res; } SWIGINTERN int SWIG_AsVal_long_SS_long SWIG_PERL_DECL_ARGS_2(SV *obj, long long *val) { if (SvIOK(obj)) { if (val) *val = SvIV(obj); return SWIG_OK; } else { int dispatch = 0; const char *nptr = SvPV_nolen(obj); if (nptr) { char *endptr; long long v; errno = 0; v = strtoll(nptr, &endptr,0); if (errno == ERANGE) { errno = 0; return SWIG_OverflowError; } else { if (*endptr == '\0') { if (val) *val = v; return SWIG_Str2NumCast(SWIG_OK); } } } if (!dispatch) { const double mant_max = 1LL << DBL_MANT_DIG; const double mant_min = -mant_max; double d; int res = SWIG_AddCast(SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(obj,&d)); if (SWIG_IsOK(res) && SWIG_CanCastAsInteger(&d, mant_min, mant_max)) { if (val) *val = (long long)(d); return res; } } } return SWIG_TypeError; } SWIGINTERNINLINE SV * SWIG_From_char SWIG_PERL_DECL_ARGS_1(char c) { return SWIG_FromCharPtrAndSize(&c,1); } SWIGINTERNINLINE SV * SWIG_From_unsigned_SS_long SWIG_PERL_DECL_ARGS_1(unsigned long value) { SV *obj = sv_newmortal(); sv_setuv(obj, (UV) value); return obj; } SWIGINTERNINLINE SV * SWIG_From_unsigned_SS_char SWIG_PERL_DECL_ARGS_1(unsigned char value) { return SWIG_From_unsigned_SS_long SWIG_PERL_CALL_ARGS_1(value); } SWIGINTERNINLINE SV * SWIG_From_short SWIG_PERL_DECL_ARGS_1(short value) { return SWIG_From_long SWIG_PERL_CALL_ARGS_1(value); } SWIGINTERNINLINE SV * SWIG_From_unsigned_SS_short SWIG_PERL_DECL_ARGS_1(unsigned short value) { return SWIG_From_unsigned_SS_long SWIG_PERL_CALL_ARGS_1(value); } SWIGINTERNINLINE SV * SWIG_From_unsigned_SS_int SWIG_PERL_DECL_ARGS_1(unsigned int value) { return SWIG_From_unsigned_SS_long SWIG_PERL_CALL_ARGS_1(value); } SWIGINTERNINLINE SV * SWIG_From_size_t SWIG_PERL_DECL_ARGS_1(size_t value) { return SWIG_From_unsigned_SS_long SWIG_PERL_CALL_ARGS_1((unsigned long)(value)); } typedef union { char char_data; uint8_t byte_data; uint32_t uint32_data; uint64_t uint64_data; float float_data; void *rw_data; const void *ro_data; } idmef_data_t_data; #ifdef __cplusplus extern "C" { #endif #ifdef PERL_OBJECT #define MAGIC_CLASS _wrap_Prelude_var:: class _wrap_Prelude_var : public CPerlObj { public: #else #define MAGIC_CLASS #endif SWIGCLASS_STATIC int swig_magic_readonly(pTHX_ SV *SWIGUNUSEDPARM(sv), MAGIC *SWIGUNUSEDPARM(mg)) { MAGIC_PPERL croak("Value is read-only."); return 0; } #ifdef PERL_OBJECT }; #endif #ifdef __cplusplus } #endif #ifdef __cplusplus extern "C" { #endif XS(_wrap_prelude_init) { { int *arg1 = (int *) 0 ; char **arg2 = (char **) 0 ; int tmp1 ; int argvi = 0; int result; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: prelude_init(argc,argv);"); } { tmp1 = SvIV(ST(0)); arg1 = &tmp1; } { AV *tempav; I32 len; int i; SV **tv; if ( ! SvROK(ST(1)) ) croak("Argument 2 is not a reference."); if ( SvTYPE(SvRV(ST(1))) != SVt_PVAV ) croak("Argument 2 is not an array."); tempav = (AV*) SvRV(ST(1)); len = av_len(tempav); arg2 = (char **) malloc((len+2)*sizeof(char *)); if ( ! arg2 ) croak("out of memory\n"); for (i = 0; i <= len; i++) { tv = av_fetch(tempav, i, 0); SvREFCNT_inc(*tv); arg2[i] = (char *) SvPV_nolen(*tv); } arg2[i] = NULL; } result = (int)prelude_init(arg1,arg2); { ST(argvi) = newSViv(result); argvi++; } { free(arg2); } XSRETURN(argvi); fail: { free(arg2); } SWIG_croak_null(); } } XS(_wrap_prelude_deinit) { { int argvi = 0; dXSARGS; if ((items < 0) || (items > 0)) { SWIG_croak("Usage: prelude_deinit();"); } prelude_deinit(); ST(argvi) = sv_newmortal(); XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_prelude_check_version) { { char *arg1 = (char *) 0 ; int res1 ; char *buf1 = 0 ; int alloc1 = 0 ; int argvi = 0; char *result = 0 ; dXSARGS; if ((items < 1) || (items > 1)) { SWIG_croak("Usage: prelude_check_version(req_version);"); } res1 = SWIG_AsCharPtrAndSize(ST(0), &buf1, NULL, &alloc1); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "prelude_check_version" "', argument " "1"" of type '" "char const *""'"); } arg1 = (char *)(buf1); result = (char *)prelude_check_version((char const *)arg1); ST(argvi) = SWIG_FromCharPtr((const char *)result); argvi++ ; if (alloc1 == SWIG_NEWOBJ) free((char*)buf1); XSRETURN(argvi); fail: if (alloc1 == SWIG_NEWOBJ) free((char*)buf1); SWIG_croak_null(); } } XS(_wrap_prelude_thread_init) { { void *arg1 = (void *) 0 ; int res1 ; int argvi = 0; int result; dXSARGS; if ((items < 1) || (items > 1)) { SWIG_croak("Usage: prelude_thread_init(future_use);"); } res1 = SWIG_ConvertPtr(ST(0),SWIG_as_voidptrptr(&arg1), 0, 0); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "prelude_thread_init" "', argument " "1"" of type '" "void *""'"); } result = (int)prelude_thread_init(arg1); { ST(argvi) = newSViv(result); argvi++; } XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_prelude_fork_prepare) { { int argvi = 0; dXSARGS; if ((items < 0) || (items > 0)) { SWIG_croak("Usage: prelude_fork_prepare();"); } prelude_fork_prepare(); ST(argvi) = sv_newmortal(); XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_prelude_fork_parent) { { int argvi = 0; dXSARGS; if ((items < 0) || (items > 0)) { SWIG_croak("Usage: prelude_fork_parent();"); } prelude_fork_parent(); ST(argvi) = sv_newmortal(); XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_prelude_fork_child) { { int argvi = 0; dXSARGS; if ((items < 0) || (items > 0)) { SWIG_croak("Usage: prelude_fork_child();"); } prelude_fork_child(); ST(argvi) = sv_newmortal(); XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_prelude_client_get_unique_ident) { { prelude_client_t *arg1 = (prelude_client_t *) 0 ; int argvi = 0; prelude_ident_t *result = 0 ; dXSARGS; if ((items < 1) || (items > 1)) { SWIG_croak("Usage: prelude_client_get_unique_ident(client);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_prelude_client, 0) ) { croak("Expected type prelude_client_t * for argument 1."); return; } } result = (prelude_ident_t *)prelude_client_get_unique_ident(arg1); ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_prelude_ident_t, 0 | 0); argvi++ ; XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_prelude_client_set_connection_pool) { { prelude_client_t *arg1 = (prelude_client_t *) 0 ; prelude_connection_pool_t *arg2 = (prelude_connection_pool_t *) 0 ; void *argp2 = 0 ; int res2 = 0 ; int argvi = 0; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: prelude_client_set_connection_pool(client,pool);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_prelude_client, 0) ) { croak("Expected type prelude_client_t * for argument 1."); return; } } res2 = SWIG_ConvertPtr(ST(1), &argp2,SWIGTYPE_p_prelude_connection_pool, 0 | 0 ); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "prelude_client_set_connection_pool" "', argument " "2"" of type '" "prelude_connection_pool_t *""'"); } arg2 = (prelude_connection_pool_t *)(argp2); prelude_client_set_connection_pool(arg1,arg2); ST(argvi) = sv_newmortal(); XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_prelude_client_get_connection_pool) { { prelude_client_t *arg1 = (prelude_client_t *) 0 ; int argvi = 0; prelude_connection_pool_t *result = 0 ; dXSARGS; if ((items < 1) || (items > 1)) { SWIG_croak("Usage: prelude_client_get_connection_pool(client);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_prelude_client, 0) ) { croak("Expected type prelude_client_t * for argument 1."); return; } } result = (prelude_connection_pool_t *)prelude_client_get_connection_pool(arg1); ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_prelude_connection_pool, 0 | 0); argvi++ ; XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_prelude_client_start) { { prelude_client_t *arg1 = (prelude_client_t *) 0 ; int argvi = 0; int result; dXSARGS; if ((items < 1) || (items > 1)) { SWIG_croak("Usage: prelude_client_start(client);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_prelude_client, 0) ) { croak("Expected type prelude_client_t * for argument 1."); return; } } result = (int)prelude_client_start(arg1); { ST(argvi) = newSViv(result); argvi++; } XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_prelude_client_init) { { prelude_client_t *arg1 = (prelude_client_t *) 0 ; int argvi = 0; int result; dXSARGS; if ((items < 1) || (items > 1)) { SWIG_croak("Usage: prelude_client_init(client);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_prelude_client, 0) ) { croak("Expected type prelude_client_t * for argument 1."); return; } } result = (int)prelude_client_init(arg1); { ST(argvi) = newSViv(result); argvi++; } XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_prelude_client_new) { { prelude_client_t **arg1 = (prelude_client_t **) 0 ; char *arg2 = (char *) 0 ; prelude_client_t *tmp1 ; int res2 ; char *buf2 = 0 ; int alloc2 = 0 ; int argvi = 0; SV * _saved[1] ; int result; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: prelude_client_new(client,profile);"); } { arg1 = (prelude_client_t **) &tmp1; } res2 = SWIG_AsCharPtrAndSize(ST(1), &buf2, NULL, &alloc2); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "prelude_client_new" "', argument " "2"" of type '" "char const *""'"); } arg2 = (char *)(buf2); _saved[0] = ST(0); result = (int)prelude_client_new(arg1,(char const *)arg2); { ST(argvi) = newSViv(result); argvi++; } { SV *sv; if ( result >= 0 ) { if ( ! SvROK(_saved[0]) ) { croak("Argument 1 is not a reference."); return; } sv = SvRV(_saved[0]); sv_setsv(sv, SWIG_NewPointerObj((void *) * arg1, SWIGTYPE_p_prelude_client, 0)); } } if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); XSRETURN(argvi); fail: if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); SWIG_croak_null(); } } XS(_wrap_prelude_client_ref) { { prelude_client_t *arg1 = (prelude_client_t *) 0 ; int argvi = 0; prelude_client_t *result = 0 ; dXSARGS; if ((items < 1) || (items > 1)) { SWIG_croak("Usage: prelude_client_ref(client);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_prelude_client, 0) ) { croak("Expected type prelude_client_t * for argument 1."); return; } } result = (prelude_client_t *)prelude_client_ref(arg1); ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_prelude_client, 0 | 0); argvi++ ; XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_prelude_client_get_analyzer) { { prelude_client_t *arg1 = (prelude_client_t *) 0 ; int argvi = 0; idmef_analyzer_t *result = 0 ; dXSARGS; if ((items < 1) || (items > 1)) { SWIG_croak("Usage: prelude_client_get_analyzer(client);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_prelude_client, 0) ) { croak("Expected type prelude_client_t * for argument 1."); return; } } result = (idmef_analyzer_t *)prelude_client_get_analyzer(arg1); ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_idmef_analyzer, 0 | 0); argvi++ ; XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_prelude_client_get_flags) { { prelude_client_t *arg1 = (prelude_client_t *) 0 ; int argvi = 0; prelude_client_flags_t result; dXSARGS; if ((items < 1) || (items > 1)) { SWIG_croak("Usage: prelude_client_get_flags(client);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_prelude_client, 0) ) { croak("Expected type prelude_client_t * for argument 1."); return; } } result = (prelude_client_flags_t)prelude_client_get_flags(arg1); ST(argvi) = SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(result)); argvi++ ; XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_prelude_client_set_required_permission) { { prelude_client_t *arg1 = (prelude_client_t *) 0 ; prelude_connection_permission_t arg2 ; int val2 ; int ecode2 = 0 ; int argvi = 0; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: prelude_client_set_required_permission(client,permission);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_prelude_client, 0) ) { croak("Expected type prelude_client_t * for argument 1."); return; } } ecode2 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(1), &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "prelude_client_set_required_permission" "', argument " "2"" of type '" "prelude_connection_permission_t""'"); } arg2 = (prelude_connection_permission_t)(val2); prelude_client_set_required_permission(arg1,arg2); ST(argvi) = sv_newmortal(); XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_prelude_client_get_required_permission) { { prelude_client_t *arg1 = (prelude_client_t *) 0 ; int argvi = 0; prelude_connection_permission_t result; dXSARGS; if ((items < 1) || (items > 1)) { SWIG_croak("Usage: prelude_client_get_required_permission(client);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_prelude_client, 0) ) { croak("Expected type prelude_client_t * for argument 1."); return; } } result = (prelude_connection_permission_t)prelude_client_get_required_permission(arg1); ST(argvi) = SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(result)); argvi++ ; XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_prelude_client_send_msg) { { prelude_client_t *arg1 = (prelude_client_t *) 0 ; prelude_msg_t *arg2 = (prelude_msg_t *) 0 ; int argvi = 0; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: prelude_client_send_msg(client,msg);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_prelude_client, 0) ) { croak("Expected type prelude_client_t * for argument 1."); return; } } { if ( ! SvROK(ST(1)) ) { croak("Argument 2 is null."); return; } if ( SWIG_ConvertPtr(ST(1), (void **)&arg2, SWIGTYPE_p_prelude_msg, 0) ) { croak("Expected type prelude_msg_t * for argument 2."); return; } } prelude_client_send_msg(arg1,arg2); ST(argvi) = sv_newmortal(); XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_prelude_client_recv_msg) { { prelude_client_t *arg1 = (prelude_client_t *) 0 ; int arg2 ; prelude_msg_t **arg3 = (prelude_msg_t **) 0 ; int val2 ; int ecode2 = 0 ; prelude_msg_t *tmp3 ; int argvi = 0; SV * _saved[1] ; int result; dXSARGS; if ((items < 3) || (items > 3)) { SWIG_croak("Usage: prelude_client_recv_msg(client,timeout,msg);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_prelude_client, 0) ) { croak("Expected type prelude_client_t * for argument 1."); return; } } ecode2 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(1), &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "prelude_client_recv_msg" "', argument " "2"" of type '" "int""'"); } arg2 = (int)(val2); { arg3 = (prelude_msg_t **) &tmp3; } _saved[0] = ST(2); result = (int)prelude_client_recv_msg(arg1,arg2,arg3); { ST(argvi) = newSViv(result); argvi++; } { SV *sv; if ( result >= 0 ) { if ( ! SvROK(_saved[0]) ) { croak("Argument 3 is not a reference."); return; } sv = SvRV(_saved[0]); sv_setsv(sv, SWIG_NewPointerObj((void *) * arg3, SWIGTYPE_p_prelude_msg, 0)); } } XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_prelude_client_set_heartbeat_cb) { { prelude_client_t *arg1 = (prelude_client_t *) 0 ; void (*arg2)(prelude_client_t *,idmef_message_t *) = (void (*)(prelude_client_t *,idmef_message_t *)) 0 ; int argvi = 0; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: prelude_client_set_heartbeat_cb(client,cb);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_prelude_client, 0) ) { croak("Expected type prelude_client_t * for argument 1."); return; } } { int res = SWIG_ConvertFunctionPtr(ST(1), (void**)(&arg2), SWIGTYPE_p_f_p_struct_prelude_client_p_struct_idmef_message__void); if (!SWIG_IsOK(res)) { SWIG_exception_fail(SWIG_ArgError(res), "in method '" "prelude_client_set_heartbeat_cb" "', argument " "2"" of type '" "void (*)(prelude_client_t *,idmef_message_t *)""'"); } } prelude_client_set_heartbeat_cb(arg1,arg2); ST(argvi) = sv_newmortal(); XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_prelude_client_send_idmef) { { prelude_client_t *arg1 = (prelude_client_t *) 0 ; idmef_message_t *arg2 = (idmef_message_t *) 0 ; int argvi = 0; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: prelude_client_send_idmef(client,msg);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_prelude_client, 0) ) { croak("Expected type prelude_client_t * for argument 1."); return; } } { if ( ! SvROK(ST(1)) ) { croak("Argument 2 is null."); return; } if ( SWIG_ConvertPtr(ST(1), (void **)&arg2, SWIGTYPE_p_idmef_message, 0) ) { croak("Expected type idmef_message_t * for argument 2."); return; } } prelude_client_send_idmef(arg1,arg2); ST(argvi) = sv_newmortal(); XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_prelude_client_recv_idmef) { { prelude_client_t *arg1 = (prelude_client_t *) 0 ; int arg2 ; idmef_message_t **arg3 = (idmef_message_t **) 0 ; int val2 ; int ecode2 = 0 ; idmef_message_t *tmp3 ; int argvi = 0; SV * _saved[1] ; int result; dXSARGS; if ((items < 3) || (items > 3)) { SWIG_croak("Usage: prelude_client_recv_idmef(client,timeout,idmef);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_prelude_client, 0) ) { croak("Expected type prelude_client_t * for argument 1."); return; } } ecode2 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(1), &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "prelude_client_recv_idmef" "', argument " "2"" of type '" "int""'"); } arg2 = (int)(val2); { arg3 = (idmef_message_t **) &tmp3; } _saved[0] = ST(2); result = (int)prelude_client_recv_idmef(arg1,arg2,arg3); { ST(argvi) = newSViv(result); argvi++; } { SV *sv; if ( result >= 0 ) { if ( ! SvROK(_saved[0]) ) { croak("Argument 3 is not a reference."); return; } sv = SvRV(_saved[0]); sv_setsv(sv, SWIG_NewPointerObj((void *) * arg3, SWIGTYPE_p_idmef_message, 0)); } } XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_prelude_client_destroy) { { prelude_client_t *arg1 = (prelude_client_t *) 0 ; prelude_client_exit_status_t arg2 ; int val2 ; int ecode2 = 0 ; int argvi = 0; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: prelude_client_destroy(client,status);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_prelude_client, 0) ) { croak("Expected type prelude_client_t * for argument 1."); return; } } ecode2 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(1), &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "prelude_client_destroy" "', argument " "2"" of type '" "prelude_client_exit_status_t""'"); } arg2 = (prelude_client_exit_status_t)(val2); prelude_client_destroy(arg1,arg2); ST(argvi) = sv_newmortal(); XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_prelude_client_set_flags) { { prelude_client_t *arg1 = (prelude_client_t *) 0 ; prelude_client_flags_t arg2 ; int val2 ; int ecode2 = 0 ; int argvi = 0; int result; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: prelude_client_set_flags(client,flags);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_prelude_client, 0) ) { croak("Expected type prelude_client_t * for argument 1."); return; } } ecode2 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(1), &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "prelude_client_set_flags" "', argument " "2"" of type '" "prelude_client_flags_t""'"); } arg2 = (prelude_client_flags_t)(val2); result = (int)prelude_client_set_flags(arg1,arg2); { ST(argvi) = newSViv(result); argvi++; } XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_prelude_client_set_config_filename) { { prelude_client_t *arg1 = (prelude_client_t *) 0 ; char *arg2 = (char *) 0 ; int res2 ; char *buf2 = 0 ; int alloc2 = 0 ; int argvi = 0; int result; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: prelude_client_set_config_filename(client,filename);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_prelude_client, 0) ) { croak("Expected type prelude_client_t * for argument 1."); return; } } res2 = SWIG_AsCharPtrAndSize(ST(1), &buf2, NULL, &alloc2); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "prelude_client_set_config_filename" "', argument " "2"" of type '" "char const *""'"); } arg2 = (char *)(buf2); result = (int)prelude_client_set_config_filename(arg1,(char const *)arg2); { ST(argvi) = newSViv(result); argvi++; } if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); XSRETURN(argvi); fail: if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); SWIG_croak_null(); } } XS(_wrap_prelude_client_get_config_filename) { { prelude_client_t *arg1 = (prelude_client_t *) 0 ; int argvi = 0; char *result = 0 ; dXSARGS; if ((items < 1) || (items > 1)) { SWIG_croak("Usage: prelude_client_get_config_filename(client);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_prelude_client, 0) ) { croak("Expected type prelude_client_t * for argument 1."); return; } } result = (char *)prelude_client_get_config_filename(arg1); ST(argvi) = SWIG_FromCharPtr((const char *)result); argvi++ ; XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_prelude_client_get_profile) { { prelude_client_t *arg1 = (prelude_client_t *) 0 ; int argvi = 0; prelude_client_profile_t *result = 0 ; dXSARGS; if ((items < 1) || (items > 1)) { SWIG_croak("Usage: prelude_client_get_profile(client);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_prelude_client, 0) ) { croak("Expected type prelude_client_t * for argument 1."); return; } } result = (prelude_client_profile_t *)prelude_client_get_profile(arg1); ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_prelude_client_profile, 0 | 0); argvi++ ; XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_prelude_client_new_msgbuf) { { prelude_client_t *arg1 = (prelude_client_t *) 0 ; prelude_msgbuf_t **arg2 = (prelude_msgbuf_t **) 0 ; prelude_msgbuf_t *tmp2 ; int argvi = 0; SV * _saved[1] ; int result; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: prelude_client_new_msgbuf(client,msgbuf);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_prelude_client, 0) ) { croak("Expected type prelude_client_t * for argument 1."); return; } } { arg2 = (prelude_msgbuf_t **) &tmp2; } _saved[0] = ST(1); result = (int)prelude_client_new_msgbuf(arg1,arg2); { ST(argvi) = newSViv(result); argvi++; } { SV *sv; if ( result >= 0 ) { if ( ! SvROK(_saved[0]) ) { croak("Argument 2 is not a reference."); return; } sv = SvRV(_saved[0]); sv_setsv(sv, SWIG_NewPointerObj((void *) * arg2, SWIGTYPE_p_prelude_msgbuf, 0)); } } XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_prelude_client_handle_msg_default) { { prelude_client_t *arg1 = (prelude_client_t *) 0 ; prelude_msg_t *arg2 = (prelude_msg_t *) 0 ; prelude_msgbuf_t *arg3 = (prelude_msgbuf_t *) 0 ; int argvi = 0; int result; dXSARGS; if ((items < 3) || (items > 3)) { SWIG_croak("Usage: prelude_client_handle_msg_default(client,msg,msgbuf);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_prelude_client, 0) ) { croak("Expected type prelude_client_t * for argument 1."); return; } } { if ( ! SvROK(ST(1)) ) { croak("Argument 2 is null."); return; } if ( SWIG_ConvertPtr(ST(1), (void **)&arg2, SWIGTYPE_p_prelude_msg, 0) ) { croak("Expected type prelude_msg_t * for argument 2."); return; } } { if ( ! SvROK(ST(2)) ) { croak("Argument 3 is null."); return; } if ( SWIG_ConvertPtr(ST(2), (void **)&arg3, SWIGTYPE_p_prelude_msgbuf, 0) ) { croak("Expected type prelude_msgbuf_t * for argument 3."); return; } } result = (int)prelude_client_handle_msg_default(arg1,arg2,arg3); { ST(argvi) = newSViv(result); argvi++; } XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap__prelude_client_register_options) { { int argvi = 0; int result; dXSARGS; if ((items < 0) || (items > 0)) { SWIG_croak("Usage: _prelude_client_register_options();"); } result = (int)_prelude_client_register_options(); { ST(argvi) = newSViv(result); argvi++; } XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_prelude_client_get_setup_error) { { prelude_client_t *arg1 = (prelude_client_t *) 0 ; int argvi = 0; char *result = 0 ; dXSARGS; if ((items < 1) || (items > 1)) { SWIG_croak("Usage: prelude_client_get_setup_error(client);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_prelude_client, 0) ) { croak("Expected type prelude_client_t * for argument 1."); return; } } result = (char *)prelude_client_get_setup_error(arg1); ST(argvi) = SWIG_FromCharPtr((const char *)result); argvi++ ; XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_prelude_client_is_setup_needed) { { int arg1 ; int val1 ; int ecode1 = 0 ; int argvi = 0; prelude_bool_t result; dXSARGS; if ((items < 1) || (items > 1)) { SWIG_croak("Usage: prelude_client_is_setup_needed(error);"); } ecode1 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(0), &val1); if (!SWIG_IsOK(ecode1)) { SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "prelude_client_is_setup_needed" "', argument " "1"" of type '" "int""'"); } arg1 = (int)(val1); result = (prelude_bool_t)prelude_client_is_setup_needed(arg1); ST(argvi) = SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(result)); argvi++ ; XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_prelude_client_print_setup_error) { { prelude_client_t *arg1 = (prelude_client_t *) 0 ; int argvi = 0; dXSARGS; if ((items < 1) || (items > 1)) { SWIG_croak("Usage: prelude_client_print_setup_error(client);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_prelude_client, 0) ) { croak("Expected type prelude_client_t * for argument 1."); return; } } prelude_client_print_setup_error(arg1); ST(argvi) = sv_newmortal(); XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap__prelude_client_profile_init) { { prelude_client_profile_t *arg1 = (prelude_client_profile_t *) 0 ; int argvi = 0; int result; dXSARGS; if ((items < 1) || (items > 1)) { SWIG_croak("Usage: _prelude_client_profile_init(cp);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_prelude_client_profile, 0) ) { croak("Expected type prelude_client_profile_t * for argument 1."); return; } } result = (int)_prelude_client_profile_init(arg1); { ST(argvi) = newSViv(result); argvi++; } XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap__prelude_client_profile_new) { { prelude_client_profile_t **arg1 = (prelude_client_profile_t **) 0 ; prelude_client_profile_t *tmp1 ; int argvi = 0; SV * _saved[1] ; int result; dXSARGS; if ((items < 1) || (items > 1)) { SWIG_croak("Usage: _prelude_client_profile_new(ret);"); } { arg1 = (prelude_client_profile_t **) &tmp1; } _saved[0] = ST(0); result = (int)_prelude_client_profile_new(arg1); { ST(argvi) = newSViv(result); argvi++; } { SV *sv; if ( result >= 0 ) { if ( ! SvROK(_saved[0]) ) { croak("Argument 1 is not a reference."); return; } sv = SvRV(_saved[0]); sv_setsv(sv, SWIG_NewPointerObj((void *) * arg1, SWIGTYPE_p_prelude_client_profile, 0)); } } XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_prelude_client_profile_new) { { prelude_client_profile_t **arg1 = (prelude_client_profile_t **) 0 ; char *arg2 = (char *) 0 ; prelude_client_profile_t *tmp1 ; int res2 ; char *buf2 = 0 ; int alloc2 = 0 ; int argvi = 0; SV * _saved[1] ; int result; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: prelude_client_profile_new(ret,name);"); } { arg1 = (prelude_client_profile_t **) &tmp1; } res2 = SWIG_AsCharPtrAndSize(ST(1), &buf2, NULL, &alloc2); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "prelude_client_profile_new" "', argument " "2"" of type '" "char const *""'"); } arg2 = (char *)(buf2); _saved[0] = ST(0); result = (int)prelude_client_profile_new(arg1,(char const *)arg2); { ST(argvi) = newSViv(result); argvi++; } { SV *sv; if ( result >= 0 ) { if ( ! SvROK(_saved[0]) ) { croak("Argument 1 is not a reference."); return; } sv = SvRV(_saved[0]); sv_setsv(sv, SWIG_NewPointerObj((void *) * arg1, SWIGTYPE_p_prelude_client_profile, 0)); } } if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); XSRETURN(argvi); fail: if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); SWIG_croak_null(); } } XS(_wrap_prelude_client_profile_ref) { { prelude_client_profile_t *arg1 = (prelude_client_profile_t *) 0 ; int argvi = 0; prelude_client_profile_t *result = 0 ; dXSARGS; if ((items < 1) || (items > 1)) { SWIG_croak("Usage: prelude_client_profile_ref(cp);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_prelude_client_profile, 0) ) { croak("Expected type prelude_client_profile_t * for argument 1."); return; } } result = (prelude_client_profile_t *)prelude_client_profile_ref(arg1); ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_prelude_client_profile, 0 | 0); argvi++ ; XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_prelude_client_profile_destroy) { { prelude_client_profile_t *arg1 = (prelude_client_profile_t *) 0 ; int argvi = 0; dXSARGS; if ((items < 1) || (items > 1)) { SWIG_croak("Usage: prelude_client_profile_destroy(cp);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_prelude_client_profile, 0) ) { croak("Expected type prelude_client_profile_t * for argument 1."); return; } } prelude_client_profile_destroy(arg1); ST(argvi) = sv_newmortal(); XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_prelude_client_profile_get_config_filename) { { prelude_client_profile_t *arg1 = (prelude_client_profile_t *) 0 ; char *arg2 = (char *) 0 ; size_t arg3 ; int res2 ; char *buf2 = 0 ; int alloc2 = 0 ; size_t val3 ; int ecode3 = 0 ; int argvi = 0; dXSARGS; if ((items < 3) || (items > 3)) { SWIG_croak("Usage: prelude_client_profile_get_config_filename(cp,buf,size);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_prelude_client_profile, 0) ) { croak("Expected type prelude_client_profile_t const * for argument 1."); return; } } res2 = SWIG_AsCharPtrAndSize(ST(1), &buf2, NULL, &alloc2); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "prelude_client_profile_get_config_filename" "', argument " "2"" of type '" "char *""'"); } arg2 = (char *)(buf2); ecode3 = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(2), &val3); if (!SWIG_IsOK(ecode3)) { SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "prelude_client_profile_get_config_filename" "', argument " "3"" of type '" "size_t""'"); } arg3 = (size_t)(val3); prelude_client_profile_get_config_filename((struct prelude_client_profile const *)arg1,arg2,arg3); ST(argvi) = sv_newmortal(); if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); XSRETURN(argvi); fail: if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); SWIG_croak_null(); } } XS(_wrap_prelude_client_profile_get_default_config_dirname) { { prelude_client_profile_t *arg1 = (prelude_client_profile_t *) 0 ; char *arg2 = (char *) 0 ; size_t arg3 ; int res2 ; char *buf2 = 0 ; int alloc2 = 0 ; size_t val3 ; int ecode3 = 0 ; int argvi = 0; dXSARGS; if ((items < 3) || (items > 3)) { SWIG_croak("Usage: prelude_client_profile_get_default_config_dirname(cp,buf,size);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_prelude_client_profile, 0) ) { croak("Expected type prelude_client_profile_t const * for argument 1."); return; } } res2 = SWIG_AsCharPtrAndSize(ST(1), &buf2, NULL, &alloc2); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "prelude_client_profile_get_default_config_dirname" "', argument " "2"" of type '" "char *""'"); } arg2 = (char *)(buf2); ecode3 = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(2), &val3); if (!SWIG_IsOK(ecode3)) { SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "prelude_client_profile_get_default_config_dirname" "', argument " "3"" of type '" "size_t""'"); } arg3 = (size_t)(val3); prelude_client_profile_get_default_config_dirname((struct prelude_client_profile const *)arg1,arg2,arg3); ST(argvi) = sv_newmortal(); if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); XSRETURN(argvi); fail: if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); SWIG_croak_null(); } } XS(_wrap_prelude_client_profile_get_analyzerid_filename) { { prelude_client_profile_t *arg1 = (prelude_client_profile_t *) 0 ; char *arg2 = (char *) 0 ; size_t arg3 ; int res2 ; char *buf2 = 0 ; int alloc2 = 0 ; size_t val3 ; int ecode3 = 0 ; int argvi = 0; dXSARGS; if ((items < 3) || (items > 3)) { SWIG_croak("Usage: prelude_client_profile_get_analyzerid_filename(cp,buf,size);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_prelude_client_profile, 0) ) { croak("Expected type prelude_client_profile_t const * for argument 1."); return; } } res2 = SWIG_AsCharPtrAndSize(ST(1), &buf2, NULL, &alloc2); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "prelude_client_profile_get_analyzerid_filename" "', argument " "2"" of type '" "char *""'"); } arg2 = (char *)(buf2); ecode3 = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(2), &val3); if (!SWIG_IsOK(ecode3)) { SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "prelude_client_profile_get_analyzerid_filename" "', argument " "3"" of type '" "size_t""'"); } arg3 = (size_t)(val3); prelude_client_profile_get_analyzerid_filename((struct prelude_client_profile const *)arg1,arg2,arg3); ST(argvi) = sv_newmortal(); if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); XSRETURN(argvi); fail: if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); SWIG_croak_null(); } } XS(_wrap_prelude_client_profile_get_tls_key_filename) { { prelude_client_profile_t *arg1 = (prelude_client_profile_t *) 0 ; char *arg2 = (char *) 0 ; size_t arg3 ; int res2 ; char *buf2 = 0 ; int alloc2 = 0 ; size_t val3 ; int ecode3 = 0 ; int argvi = 0; dXSARGS; if ((items < 3) || (items > 3)) { SWIG_croak("Usage: prelude_client_profile_get_tls_key_filename(cp,buf,size);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_prelude_client_profile, 0) ) { croak("Expected type prelude_client_profile_t const * for argument 1."); return; } } res2 = SWIG_AsCharPtrAndSize(ST(1), &buf2, NULL, &alloc2); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "prelude_client_profile_get_tls_key_filename" "', argument " "2"" of type '" "char *""'"); } arg2 = (char *)(buf2); ecode3 = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(2), &val3); if (!SWIG_IsOK(ecode3)) { SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "prelude_client_profile_get_tls_key_filename" "', argument " "3"" of type '" "size_t""'"); } arg3 = (size_t)(val3); prelude_client_profile_get_tls_key_filename((struct prelude_client_profile const *)arg1,arg2,arg3); ST(argvi) = sv_newmortal(); if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); XSRETURN(argvi); fail: if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); SWIG_croak_null(); } } XS(_wrap_prelude_client_profile_get_tls_server_ca_cert_filename) { { prelude_client_profile_t *arg1 = (prelude_client_profile_t *) 0 ; char *arg2 = (char *) 0 ; size_t arg3 ; int res2 ; char *buf2 = 0 ; int alloc2 = 0 ; size_t val3 ; int ecode3 = 0 ; int argvi = 0; dXSARGS; if ((items < 3) || (items > 3)) { SWIG_croak("Usage: prelude_client_profile_get_tls_server_ca_cert_filename(cp,buf,size);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_prelude_client_profile, 0) ) { croak("Expected type prelude_client_profile_t const * for argument 1."); return; } } res2 = SWIG_AsCharPtrAndSize(ST(1), &buf2, NULL, &alloc2); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "prelude_client_profile_get_tls_server_ca_cert_filename" "', argument " "2"" of type '" "char *""'"); } arg2 = (char *)(buf2); ecode3 = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(2), &val3); if (!SWIG_IsOK(ecode3)) { SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "prelude_client_profile_get_tls_server_ca_cert_filename" "', argument " "3"" of type '" "size_t""'"); } arg3 = (size_t)(val3); prelude_client_profile_get_tls_server_ca_cert_filename((struct prelude_client_profile const *)arg1,arg2,arg3); ST(argvi) = sv_newmortal(); if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); XSRETURN(argvi); fail: if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); SWIG_croak_null(); } } XS(_wrap_prelude_client_profile_get_tls_server_keycert_filename) { { prelude_client_profile_t *arg1 = (prelude_client_profile_t *) 0 ; char *arg2 = (char *) 0 ; size_t arg3 ; int res2 ; char *buf2 = 0 ; int alloc2 = 0 ; size_t val3 ; int ecode3 = 0 ; int argvi = 0; dXSARGS; if ((items < 3) || (items > 3)) { SWIG_croak("Usage: prelude_client_profile_get_tls_server_keycert_filename(cp,buf,size);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_prelude_client_profile, 0) ) { croak("Expected type prelude_client_profile_t const * for argument 1."); return; } } res2 = SWIG_AsCharPtrAndSize(ST(1), &buf2, NULL, &alloc2); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "prelude_client_profile_get_tls_server_keycert_filename" "', argument " "2"" of type '" "char *""'"); } arg2 = (char *)(buf2); ecode3 = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(2), &val3); if (!SWIG_IsOK(ecode3)) { SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "prelude_client_profile_get_tls_server_keycert_filename" "', argument " "3"" of type '" "size_t""'"); } arg3 = (size_t)(val3); prelude_client_profile_get_tls_server_keycert_filename((struct prelude_client_profile const *)arg1,arg2,arg3); ST(argvi) = sv_newmortal(); if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); XSRETURN(argvi); fail: if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); SWIG_croak_null(); } } XS(_wrap_prelude_client_profile_get_tls_server_crl_filename) { { prelude_client_profile_t *arg1 = (prelude_client_profile_t *) 0 ; char *arg2 = (char *) 0 ; size_t arg3 ; int res2 ; char *buf2 = 0 ; int alloc2 = 0 ; size_t val3 ; int ecode3 = 0 ; int argvi = 0; dXSARGS; if ((items < 3) || (items > 3)) { SWIG_croak("Usage: prelude_client_profile_get_tls_server_crl_filename(cp,buf,size);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_prelude_client_profile, 0) ) { croak("Expected type prelude_client_profile_t const * for argument 1."); return; } } res2 = SWIG_AsCharPtrAndSize(ST(1), &buf2, NULL, &alloc2); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "prelude_client_profile_get_tls_server_crl_filename" "', argument " "2"" of type '" "char *""'"); } arg2 = (char *)(buf2); ecode3 = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(2), &val3); if (!SWIG_IsOK(ecode3)) { SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "prelude_client_profile_get_tls_server_crl_filename" "', argument " "3"" of type '" "size_t""'"); } arg3 = (size_t)(val3); prelude_client_profile_get_tls_server_crl_filename((struct prelude_client_profile const *)arg1,arg2,arg3); ST(argvi) = sv_newmortal(); if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); XSRETURN(argvi); fail: if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); SWIG_croak_null(); } } XS(_wrap_prelude_client_profile_get_tls_client_keycert_filename) { { prelude_client_profile_t *arg1 = (prelude_client_profile_t *) 0 ; char *arg2 = (char *) 0 ; size_t arg3 ; int res2 ; char *buf2 = 0 ; int alloc2 = 0 ; size_t val3 ; int ecode3 = 0 ; int argvi = 0; dXSARGS; if ((items < 3) || (items > 3)) { SWIG_croak("Usage: prelude_client_profile_get_tls_client_keycert_filename(cp,buf,size);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_prelude_client_profile, 0) ) { croak("Expected type prelude_client_profile_t const * for argument 1."); return; } } res2 = SWIG_AsCharPtrAndSize(ST(1), &buf2, NULL, &alloc2); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "prelude_client_profile_get_tls_client_keycert_filename" "', argument " "2"" of type '" "char *""'"); } arg2 = (char *)(buf2); ecode3 = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(2), &val3); if (!SWIG_IsOK(ecode3)) { SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "prelude_client_profile_get_tls_client_keycert_filename" "', argument " "3"" of type '" "size_t""'"); } arg3 = (size_t)(val3); prelude_client_profile_get_tls_client_keycert_filename((struct prelude_client_profile const *)arg1,arg2,arg3); ST(argvi) = sv_newmortal(); if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); XSRETURN(argvi); fail: if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); SWIG_croak_null(); } } XS(_wrap_prelude_client_profile_get_tls_client_trusted_cert_filename) { { prelude_client_profile_t *arg1 = (prelude_client_profile_t *) 0 ; char *arg2 = (char *) 0 ; size_t arg3 ; int res2 ; char *buf2 = 0 ; int alloc2 = 0 ; size_t val3 ; int ecode3 = 0 ; int argvi = 0; dXSARGS; if ((items < 3) || (items > 3)) { SWIG_croak("Usage: prelude_client_profile_get_tls_client_trusted_cert_filename(cp,buf,size);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_prelude_client_profile, 0) ) { croak("Expected type prelude_client_profile_t const * for argument 1."); return; } } res2 = SWIG_AsCharPtrAndSize(ST(1), &buf2, NULL, &alloc2); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "prelude_client_profile_get_tls_client_trusted_cert_filename" "', argument " "2"" of type '" "char *""'"); } arg2 = (char *)(buf2); ecode3 = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(2), &val3); if (!SWIG_IsOK(ecode3)) { SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "prelude_client_profile_get_tls_client_trusted_cert_filename" "', argument " "3"" of type '" "size_t""'"); } arg3 = (size_t)(val3); prelude_client_profile_get_tls_client_trusted_cert_filename((struct prelude_client_profile const *)arg1,arg2,arg3); ST(argvi) = sv_newmortal(); if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); XSRETURN(argvi); fail: if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); SWIG_croak_null(); } } XS(_wrap_prelude_client_profile_get_backup_dirname) { { prelude_client_profile_t *arg1 = (prelude_client_profile_t *) 0 ; char *arg2 = (char *) 0 ; size_t arg3 ; int res2 ; char *buf2 = 0 ; int alloc2 = 0 ; size_t val3 ; int ecode3 = 0 ; int argvi = 0; dXSARGS; if ((items < 3) || (items > 3)) { SWIG_croak("Usage: prelude_client_profile_get_backup_dirname(cp,buf,size);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_prelude_client_profile, 0) ) { croak("Expected type prelude_client_profile_t const * for argument 1."); return; } } res2 = SWIG_AsCharPtrAndSize(ST(1), &buf2, NULL, &alloc2); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "prelude_client_profile_get_backup_dirname" "', argument " "2"" of type '" "char *""'"); } arg2 = (char *)(buf2); ecode3 = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(2), &val3); if (!SWIG_IsOK(ecode3)) { SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "prelude_client_profile_get_backup_dirname" "', argument " "3"" of type '" "size_t""'"); } arg3 = (size_t)(val3); prelude_client_profile_get_backup_dirname((struct prelude_client_profile const *)arg1,arg2,arg3); ST(argvi) = sv_newmortal(); if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); XSRETURN(argvi); fail: if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); SWIG_croak_null(); } } XS(_wrap_prelude_client_profile_get_profile_dirname) { { prelude_client_profile_t *arg1 = (prelude_client_profile_t *) 0 ; char *arg2 = (char *) 0 ; size_t arg3 ; int res2 ; char *buf2 = 0 ; int alloc2 = 0 ; size_t val3 ; int ecode3 = 0 ; int argvi = 0; dXSARGS; if ((items < 3) || (items > 3)) { SWIG_croak("Usage: prelude_client_profile_get_profile_dirname(cp,buf,size);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_prelude_client_profile, 0) ) { croak("Expected type prelude_client_profile_t const * for argument 1."); return; } } res2 = SWIG_AsCharPtrAndSize(ST(1), &buf2, NULL, &alloc2); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "prelude_client_profile_get_profile_dirname" "', argument " "2"" of type '" "char *""'"); } arg2 = (char *)(buf2); ecode3 = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(2), &val3); if (!SWIG_IsOK(ecode3)) { SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "prelude_client_profile_get_profile_dirname" "', argument " "3"" of type '" "size_t""'"); } arg3 = (size_t)(val3); prelude_client_profile_get_profile_dirname((struct prelude_client_profile const *)arg1,arg2,arg3); ST(argvi) = sv_newmortal(); if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); XSRETURN(argvi); fail: if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); SWIG_croak_null(); } } XS(_wrap_prelude_client_profile_set_uid) { { prelude_client_profile_t *arg1 = (prelude_client_profile_t *) 0 ; prelude_uid_t arg2 ; int val2 ; int ecode2 = 0 ; int argvi = 0; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: prelude_client_profile_set_uid(cp,uid);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_prelude_client_profile, 0) ) { croak("Expected type prelude_client_profile_t * for argument 1."); return; } } ecode2 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(1), &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "prelude_client_profile_set_uid" "', argument " "2"" of type '" "prelude_uid_t""'"); } arg2 = (prelude_uid_t)(val2); prelude_client_profile_set_uid(arg1,arg2); ST(argvi) = sv_newmortal(); XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_prelude_client_profile_get_uid) { { prelude_client_profile_t *arg1 = (prelude_client_profile_t *) 0 ; int argvi = 0; prelude_uid_t result; dXSARGS; if ((items < 1) || (items > 1)) { SWIG_croak("Usage: prelude_client_profile_get_uid(cp);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_prelude_client_profile, 0) ) { croak("Expected type prelude_client_profile_t const * for argument 1."); return; } } result = (prelude_uid_t)prelude_client_profile_get_uid((struct prelude_client_profile const *)arg1); { ST(argvi) = newSViv(result); argvi++; } XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_prelude_client_profile_set_gid) { { prelude_client_profile_t *arg1 = (prelude_client_profile_t *) 0 ; prelude_uid_t arg2 ; int val2 ; int ecode2 = 0 ; int argvi = 0; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: prelude_client_profile_set_gid(cp,gid);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_prelude_client_profile, 0) ) { croak("Expected type prelude_client_profile_t * for argument 1."); return; } } ecode2 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(1), &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "prelude_client_profile_set_gid" "', argument " "2"" of type '" "prelude_uid_t""'"); } arg2 = (prelude_uid_t)(val2); prelude_client_profile_set_gid(arg1,arg2); ST(argvi) = sv_newmortal(); XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_prelude_client_profile_get_gid) { { prelude_client_profile_t *arg1 = (prelude_client_profile_t *) 0 ; int argvi = 0; prelude_gid_t result; dXSARGS; if ((items < 1) || (items > 1)) { SWIG_croak("Usage: prelude_client_profile_get_gid(cp);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_prelude_client_profile, 0) ) { croak("Expected type prelude_client_profile_t const * for argument 1."); return; } } result = (prelude_gid_t)prelude_client_profile_get_gid((struct prelude_client_profile const *)arg1); { ST(argvi) = newSViv(result); argvi++; } XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_prelude_client_profile_set_name) { { prelude_client_profile_t *arg1 = (prelude_client_profile_t *) 0 ; char *arg2 = (char *) 0 ; int res2 ; char *buf2 = 0 ; int alloc2 = 0 ; int argvi = 0; int result; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: prelude_client_profile_set_name(cp,name);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_prelude_client_profile, 0) ) { croak("Expected type prelude_client_profile_t * for argument 1."); return; } } res2 = SWIG_AsCharPtrAndSize(ST(1), &buf2, NULL, &alloc2); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "prelude_client_profile_set_name" "', argument " "2"" of type '" "char const *""'"); } arg2 = (char *)(buf2); result = (int)prelude_client_profile_set_name(arg1,(char const *)arg2); { ST(argvi) = newSViv(result); argvi++; } if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); XSRETURN(argvi); fail: if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); SWIG_croak_null(); } } XS(_wrap_prelude_client_profile_get_name) { { prelude_client_profile_t *arg1 = (prelude_client_profile_t *) 0 ; int argvi = 0; char *result = 0 ; dXSARGS; if ((items < 1) || (items > 1)) { SWIG_croak("Usage: prelude_client_profile_get_name(cp);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_prelude_client_profile, 0) ) { croak("Expected type prelude_client_profile_t const * for argument 1."); return; } } result = (char *)prelude_client_profile_get_name((struct prelude_client_profile const *)arg1); ST(argvi) = SWIG_FromCharPtr((const char *)result); argvi++ ; XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_prelude_client_profile_get_analyzerid) { { prelude_client_profile_t *arg1 = (prelude_client_profile_t *) 0 ; int argvi = 0; uint64_t result; dXSARGS; if ((items < 1) || (items > 1)) { SWIG_croak("Usage: prelude_client_profile_get_analyzerid(cp);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_prelude_client_profile, 0) ) { croak("Expected type prelude_client_profile_t const * for argument 1."); return; } } result = (uint64_t)prelude_client_profile_get_analyzerid((struct prelude_client_profile const *)arg1); ST(argvi) = SWIG_From_unsigned_SS_long_SS_long SWIG_PERL_CALL_ARGS_1((unsigned long long)(result)); argvi++ ; XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_prelude_client_profile_set_analyzerid) { { prelude_client_profile_t *arg1 = (prelude_client_profile_t *) 0 ; uint64_t arg2 ; unsigned long long val2 ; int ecode2 = 0 ; int argvi = 0; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: prelude_client_profile_set_analyzerid(cp,analyzerid);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_prelude_client_profile, 0) ) { croak("Expected type prelude_client_profile_t * for argument 1."); return; } } ecode2 = SWIG_AsVal_unsigned_SS_long_SS_long SWIG_PERL_CALL_ARGS_2(ST(1), &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "prelude_client_profile_set_analyzerid" "', argument " "2"" of type '" "uint64_t""'"); } arg2 = (uint64_t)(val2); prelude_client_profile_set_analyzerid(arg1,arg2); ST(argvi) = sv_newmortal(); XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_prelude_client_profile_get_credentials) { { prelude_client_profile_t *arg1 = (prelude_client_profile_t *) 0 ; void **arg2 = (void **) 0 ; void *argp2 = 0 ; int res2 = 0 ; int argvi = 0; int result; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: prelude_client_profile_get_credentials(cp,credentials);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_prelude_client_profile, 0) ) { croak("Expected type prelude_client_profile_t * for argument 1."); return; } } res2 = SWIG_ConvertPtr(ST(1), &argp2,SWIGTYPE_p_p_void, 0 | 0 ); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "prelude_client_profile_get_credentials" "', argument " "2"" of type '" "void **""'"); } arg2 = (void **)(argp2); result = (int)prelude_client_profile_get_credentials(arg1,arg2); { ST(argvi) = newSViv(result); argvi++; } XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_prelude_client_profile_set_prefix) { { prelude_client_profile_t *arg1 = (prelude_client_profile_t *) 0 ; char *arg2 = (char *) 0 ; int res2 ; char *buf2 = 0 ; int alloc2 = 0 ; int argvi = 0; int result; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: prelude_client_profile_set_prefix(cp,prefix);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_prelude_client_profile, 0) ) { croak("Expected type prelude_client_profile_t * for argument 1."); return; } } res2 = SWIG_AsCharPtrAndSize(ST(1), &buf2, NULL, &alloc2); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "prelude_client_profile_set_prefix" "', argument " "2"" of type '" "char const *""'"); } arg2 = (char *)(buf2); result = (int)prelude_client_profile_set_prefix(arg1,(char const *)arg2); { ST(argvi) = newSViv(result); argvi++; } if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); XSRETURN(argvi); fail: if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); SWIG_croak_null(); } } XS(_wrap_prelude_client_profile_get_prefix) { { prelude_client_profile_t *arg1 = (prelude_client_profile_t *) 0 ; char *arg2 = (char *) 0 ; size_t arg3 ; int res2 ; char *buf2 = 0 ; int alloc2 = 0 ; size_t val3 ; int ecode3 = 0 ; int argvi = 0; dXSARGS; if ((items < 3) || (items > 3)) { SWIG_croak("Usage: prelude_client_profile_get_prefix(cp,buf,size);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_prelude_client_profile, 0) ) { croak("Expected type prelude_client_profile_t const * for argument 1."); return; } } res2 = SWIG_AsCharPtrAndSize(ST(1), &buf2, NULL, &alloc2); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "prelude_client_profile_get_prefix" "', argument " "2"" of type '" "char *""'"); } arg2 = (char *)(buf2); ecode3 = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(2), &val3); if (!SWIG_IsOK(ecode3)) { SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "prelude_client_profile_get_prefix" "', argument " "3"" of type '" "size_t""'"); } arg3 = (size_t)(val3); prelude_client_profile_get_prefix((struct prelude_client_profile const *)arg1,arg2,arg3); ST(argvi) = sv_newmortal(); if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); XSRETURN(argvi); fail: if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); SWIG_croak_null(); } } XS(_wrap_idmef_additional_data_type_to_numeric) { { char *arg1 = (char *) 0 ; int res1 ; char *buf1 = 0 ; int alloc1 = 0 ; int argvi = 0; idmef_additional_data_type_t result; dXSARGS; if ((items < 1) || (items > 1)) { SWIG_croak("Usage: idmef_additional_data_type_to_numeric(name);"); } res1 = SWIG_AsCharPtrAndSize(ST(0), &buf1, NULL, &alloc1); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "idmef_additional_data_type_to_numeric" "', argument " "1"" of type '" "char const *""'"); } arg1 = (char *)(buf1); result = (idmef_additional_data_type_t)idmef_additional_data_type_to_numeric((char const *)arg1); ST(argvi) = SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(result)); argvi++ ; if (alloc1 == SWIG_NEWOBJ) free((char*)buf1); XSRETURN(argvi); fail: if (alloc1 == SWIG_NEWOBJ) free((char*)buf1); SWIG_croak_null(); } } XS(_wrap_idmef_additional_data_type_to_string) { { idmef_additional_data_type_t arg1 ; int val1 ; int ecode1 = 0 ; int argvi = 0; char *result = 0 ; dXSARGS; if ((items < 1) || (items > 1)) { SWIG_croak("Usage: idmef_additional_data_type_to_string(val);"); } ecode1 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(0), &val1); if (!SWIG_IsOK(ecode1)) { SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "idmef_additional_data_type_to_string" "', argument " "1"" of type '" "idmef_additional_data_type_t""'"); } arg1 = (idmef_additional_data_type_t)(val1); result = (char *)idmef_additional_data_type_to_string(arg1); ST(argvi) = SWIG_FromCharPtr((const char *)result); argvi++ ; XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_additional_data_new) { { idmef_additional_data_t **arg1 = (idmef_additional_data_t **) 0 ; idmef_additional_data_t *tmp1 ; int argvi = 0; SV * _saved[1] ; int result; dXSARGS; if ((items < 1) || (items > 1)) { SWIG_croak("Usage: idmef_additional_data_new(ret);"); } { arg1 = (idmef_additional_data_t **) &tmp1; } _saved[0] = ST(0); result = (int)idmef_additional_data_new(arg1); { ST(argvi) = newSViv(result); argvi++; } { SV *sv; if ( result >= 0 ) { if ( ! SvROK(_saved[0]) ) { croak("Argument 1 is not a reference."); return; } sv = SvRV(_saved[0]); sv_setsv(sv, SWIG_NewPointerObj((void *) * arg1, SWIGTYPE_p_idmef_additional_data, 0)); } } XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_additional_data_copy) { { idmef_additional_data_t *arg1 = (idmef_additional_data_t *) 0 ; idmef_additional_data_t *arg2 = (idmef_additional_data_t *) 0 ; int argvi = 0; int result; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: idmef_additional_data_copy(src,dst);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_additional_data, 0) ) { croak("Expected type idmef_additional_data_t const * for argument 1."); return; } } { if ( ! SvROK(ST(1)) ) { croak("Argument 2 is null."); return; } if ( SWIG_ConvertPtr(ST(1), (void **)&arg2, SWIGTYPE_p_idmef_additional_data, 0) ) { croak("Expected type idmef_additional_data_t * for argument 2."); return; } } result = (int)idmef_additional_data_copy((struct idmef_additional_data const *)arg1,arg2); { ST(argvi) = newSViv(result); argvi++; } XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_additional_data_clone) { { idmef_additional_data_t *arg1 = (idmef_additional_data_t *) 0 ; idmef_additional_data_t **arg2 = (idmef_additional_data_t **) 0 ; idmef_additional_data_t *tmp2 ; int argvi = 0; SV * _saved[1] ; int result; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: idmef_additional_data_clone(src,dst);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_additional_data, 0) ) { croak("Expected type idmef_additional_data_t * for argument 1."); return; } } { arg2 = (idmef_additional_data_t **) &tmp2; } _saved[0] = ST(1); result = (int)idmef_additional_data_clone(arg1,arg2); { ST(argvi) = newSViv(result); argvi++; } { SV *sv; if ( result >= 0 ) { if ( ! SvROK(_saved[0]) ) { croak("Argument 2 is not a reference."); return; } sv = SvRV(_saved[0]); sv_setsv(sv, SWIG_NewPointerObj((void *) * arg2, SWIGTYPE_p_idmef_additional_data, 0)); } } XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_additional_data_compare) { { idmef_additional_data_t *arg1 = (idmef_additional_data_t *) 0 ; idmef_additional_data_t *arg2 = (idmef_additional_data_t *) 0 ; int argvi = 0; int result; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: idmef_additional_data_compare(obj1,obj2);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_additional_data, 0) ) { croak("Expected type idmef_additional_data_t const * for argument 1."); return; } } { if ( ! SvROK(ST(1)) ) { croak("Argument 2 is null."); return; } if ( SWIG_ConvertPtr(ST(1), (void **)&arg2, SWIGTYPE_p_idmef_additional_data, 0) ) { croak("Expected type idmef_additional_data_t const * for argument 2."); return; } } result = (int)idmef_additional_data_compare((struct idmef_additional_data const *)arg1,(struct idmef_additional_data const *)arg2); { ST(argvi) = newSViv(result); argvi++; } XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_additional_data_ref) { { idmef_additional_data_t *arg1 = (idmef_additional_data_t *) 0 ; int argvi = 0; idmef_additional_data_t *result = 0 ; dXSARGS; if ((items < 1) || (items > 1)) { SWIG_croak("Usage: idmef_additional_data_ref(additional_data);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_additional_data, 0) ) { croak("Expected type idmef_additional_data_t * for argument 1."); return; } } result = (idmef_additional_data_t *)idmef_additional_data_ref(arg1); ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_idmef_additional_data, 0 | 0); argvi++ ; XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_additional_data_destroy) { { idmef_additional_data_t *arg1 = (idmef_additional_data_t *) 0 ; int argvi = 0; dXSARGS; if ((items < 1) || (items > 1)) { SWIG_croak("Usage: idmef_additional_data_destroy(ptr);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_additional_data, 0) ) { croak("Expected type idmef_additional_data_t * for argument 1."); return; } } idmef_additional_data_destroy(arg1); ST(argvi) = sv_newmortal(); XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_additional_data_get_type) { { idmef_additional_data_t *arg1 = (idmef_additional_data_t *) 0 ; int argvi = 0; idmef_additional_data_type_t result; dXSARGS; if ((items < 1) || (items > 1)) { SWIG_croak("Usage: idmef_additional_data_get_type(ptr);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_additional_data, 0) ) { croak("Expected type idmef_additional_data_t * for argument 1."); return; } } result = (idmef_additional_data_type_t)idmef_additional_data_get_type(arg1); ST(argvi) = SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(result)); argvi++ ; XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_additional_data_set_type) { { idmef_additional_data_t *arg1 = (idmef_additional_data_t *) 0 ; idmef_additional_data_type_t arg2 ; int val2 ; int ecode2 = 0 ; int argvi = 0; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: idmef_additional_data_set_type(ptr,type);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_additional_data, 0) ) { croak("Expected type idmef_additional_data_t * for argument 1."); return; } } ecode2 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(1), &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "idmef_additional_data_set_type" "', argument " "2"" of type '" "idmef_additional_data_type_t""'"); } arg2 = (idmef_additional_data_type_t)(val2); idmef_additional_data_set_type(arg1,arg2); ST(argvi) = sv_newmortal(); XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_additional_data_new_type) { { idmef_additional_data_t *arg1 = (idmef_additional_data_t *) 0 ; idmef_additional_data_type_t **arg2 = (idmef_additional_data_type_t **) 0 ; void *argp2 = 0 ; int res2 = 0 ; int argvi = 0; int result; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: idmef_additional_data_new_type(ptr,ret);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_additional_data, 0) ) { croak("Expected type idmef_additional_data_t * for argument 1."); return; } } res2 = SWIG_ConvertPtr(ST(1), &argp2,SWIGTYPE_p_p_idmef_additional_data_type_t, 0 | 0 ); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "idmef_additional_data_new_type" "', argument " "2"" of type '" "idmef_additional_data_type_t **""'"); } arg2 = (idmef_additional_data_type_t **)(argp2); result = (int)idmef_additional_data_new_type(arg1,arg2); { ST(argvi) = newSViv(result); argvi++; } XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_additional_data_get_meaning) { { idmef_additional_data_t *arg1 = (idmef_additional_data_t *) 0 ; int argvi = 0; prelude_string_t *result = 0 ; dXSARGS; if ((items < 1) || (items > 1)) { SWIG_croak("Usage: idmef_additional_data_get_meaning(ptr);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_additional_data, 0) ) { croak("Expected type idmef_additional_data_t * for argument 1."); return; } } result = (prelude_string_t *)idmef_additional_data_get_meaning(arg1); { ST(argvi) = swig_perl_string(result); argvi++; } XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_additional_data_set_meaning) { { idmef_additional_data_t *arg1 = (idmef_additional_data_t *) 0 ; prelude_string_t *arg2 = (prelude_string_t *) 0 ; int argvi = 0; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: idmef_additional_data_set_meaning(ptr,meaning);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_additional_data, 0) ) { croak("Expected type idmef_additional_data_t * for argument 1."); return; } } { int ret; char *str; STRLEN len; str = SvPV(ST(1), len); ret = prelude_string_new_dup_fast(&(arg2), str, len); if ( ret < 0 ) { swig_perl_raise_error(ret); return; } } idmef_additional_data_set_meaning(arg1,arg2); ST(argvi) = sv_newmortal(); XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_additional_data_new_meaning) { { idmef_additional_data_t *arg1 = (idmef_additional_data_t *) 0 ; prelude_string_t **arg2 = (prelude_string_t **) 0 ; void *argp2 = 0 ; int res2 = 0 ; int argvi = 0; int result; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: idmef_additional_data_new_meaning(ptr,ret);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_additional_data, 0) ) { croak("Expected type idmef_additional_data_t * for argument 1."); return; } } res2 = SWIG_ConvertPtr(ST(1), &argp2,SWIGTYPE_p_p_prelude_string_t, 0 | 0 ); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "idmef_additional_data_new_meaning" "', argument " "2"" of type '" "prelude_string_t **""'"); } arg2 = (prelude_string_t **)(argp2); result = (int)idmef_additional_data_new_meaning(arg1,arg2); { ST(argvi) = newSViv(result); argvi++; } XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_additional_data_get_data) { { idmef_additional_data_t *arg1 = (idmef_additional_data_t *) 0 ; int argvi = 0; idmef_data_t *result = 0 ; dXSARGS; if ((items < 1) || (items > 1)) { SWIG_croak("Usage: idmef_additional_data_get_data(ptr);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_additional_data, 0) ) { croak("Expected type idmef_additional_data_t * for argument 1."); return; } } result = (idmef_data_t *)idmef_additional_data_get_data(arg1); { ST(argvi) = swig_perl_data(result); argvi++; } XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_additional_data_set_data) { { idmef_additional_data_t *arg1 = (idmef_additional_data_t *) 0 ; idmef_data_t *arg2 = (idmef_data_t *) 0 ; int argvi = 0; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: idmef_additional_data_set_data(ptr,data);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_additional_data, 0) ) { croak("Expected type idmef_additional_data_t * for argument 1."); return; } } { if ( ! SvROK(ST(1)) ) { croak("Argument 2 is null."); return; } if ( SWIG_ConvertPtr(ST(1), (void **)&arg2, SWIGTYPE_p_idmef_data_t, 0) ) { croak("Expected type idmef_data_t * for argument 2."); return; } } idmef_additional_data_set_data(arg1,arg2); ST(argvi) = sv_newmortal(); XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_additional_data_new_data) { { idmef_additional_data_t *arg1 = (idmef_additional_data_t *) 0 ; idmef_data_t **arg2 = (idmef_data_t **) 0 ; idmef_data_t *tmp2 ; int argvi = 0; SV * _saved[1] ; int result; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: idmef_additional_data_new_data(ptr,ret);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_additional_data, 0) ) { croak("Expected type idmef_additional_data_t * for argument 1."); return; } } { arg2 = (idmef_data_t **) &tmp2; } _saved[0] = ST(1); result = (int)idmef_additional_data_new_data(arg1,arg2); { ST(argvi) = newSViv(result); argvi++; } { SV *sv; if ( result >= 0 ) { if ( ! SvROK(_saved[0]) ) { croak("Argument 2 is not a reference."); return; } sv = SvRV(_saved[0]); sv_setsv(sv, SWIG_NewPointerObj((void *) * arg2, SWIGTYPE_p_idmef_data_t, 0)); } } XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_reference_origin_to_numeric) { { char *arg1 = (char *) 0 ; int res1 ; char *buf1 = 0 ; int alloc1 = 0 ; int argvi = 0; idmef_reference_origin_t result; dXSARGS; if ((items < 1) || (items > 1)) { SWIG_croak("Usage: idmef_reference_origin_to_numeric(name);"); } res1 = SWIG_AsCharPtrAndSize(ST(0), &buf1, NULL, &alloc1); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "idmef_reference_origin_to_numeric" "', argument " "1"" of type '" "char const *""'"); } arg1 = (char *)(buf1); result = (idmef_reference_origin_t)idmef_reference_origin_to_numeric((char const *)arg1); ST(argvi) = SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(result)); argvi++ ; if (alloc1 == SWIG_NEWOBJ) free((char*)buf1); XSRETURN(argvi); fail: if (alloc1 == SWIG_NEWOBJ) free((char*)buf1); SWIG_croak_null(); } } XS(_wrap_idmef_reference_origin_to_string) { { idmef_reference_origin_t arg1 ; int val1 ; int ecode1 = 0 ; int argvi = 0; char *result = 0 ; dXSARGS; if ((items < 1) || (items > 1)) { SWIG_croak("Usage: idmef_reference_origin_to_string(val);"); } ecode1 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(0), &val1); if (!SWIG_IsOK(ecode1)) { SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "idmef_reference_origin_to_string" "', argument " "1"" of type '" "idmef_reference_origin_t""'"); } arg1 = (idmef_reference_origin_t)(val1); result = (char *)idmef_reference_origin_to_string(arg1); ST(argvi) = SWIG_FromCharPtr((const char *)result); argvi++ ; XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_reference_new) { { idmef_reference_t **arg1 = (idmef_reference_t **) 0 ; idmef_reference_t *tmp1 ; int argvi = 0; SV * _saved[1] ; int result; dXSARGS; if ((items < 1) || (items > 1)) { SWIG_croak("Usage: idmef_reference_new(ret);"); } { arg1 = (idmef_reference_t **) &tmp1; } _saved[0] = ST(0); result = (int)idmef_reference_new(arg1); { ST(argvi) = newSViv(result); argvi++; } { SV *sv; if ( result >= 0 ) { if ( ! SvROK(_saved[0]) ) { croak("Argument 1 is not a reference."); return; } sv = SvRV(_saved[0]); sv_setsv(sv, SWIG_NewPointerObj((void *) * arg1, SWIGTYPE_p_idmef_reference, 0)); } } XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_reference_copy) { { idmef_reference_t *arg1 = (idmef_reference_t *) 0 ; idmef_reference_t *arg2 = (idmef_reference_t *) 0 ; int argvi = 0; int result; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: idmef_reference_copy(src,dst);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_reference, 0) ) { croak("Expected type idmef_reference_t const * for argument 1."); return; } } { if ( ! SvROK(ST(1)) ) { croak("Argument 2 is null."); return; } if ( SWIG_ConvertPtr(ST(1), (void **)&arg2, SWIGTYPE_p_idmef_reference, 0) ) { croak("Expected type idmef_reference_t * for argument 2."); return; } } result = (int)idmef_reference_copy((struct idmef_reference const *)arg1,arg2); { ST(argvi) = newSViv(result); argvi++; } XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_reference_clone) { { idmef_reference_t *arg1 = (idmef_reference_t *) 0 ; idmef_reference_t **arg2 = (idmef_reference_t **) 0 ; idmef_reference_t *tmp2 ; int argvi = 0; SV * _saved[1] ; int result; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: idmef_reference_clone(src,dst);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_reference, 0) ) { croak("Expected type idmef_reference_t * for argument 1."); return; } } { arg2 = (idmef_reference_t **) &tmp2; } _saved[0] = ST(1); result = (int)idmef_reference_clone(arg1,arg2); { ST(argvi) = newSViv(result); argvi++; } { SV *sv; if ( result >= 0 ) { if ( ! SvROK(_saved[0]) ) { croak("Argument 2 is not a reference."); return; } sv = SvRV(_saved[0]); sv_setsv(sv, SWIG_NewPointerObj((void *) * arg2, SWIGTYPE_p_idmef_reference, 0)); } } XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_reference_compare) { { idmef_reference_t *arg1 = (idmef_reference_t *) 0 ; idmef_reference_t *arg2 = (idmef_reference_t *) 0 ; int argvi = 0; int result; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: idmef_reference_compare(obj1,obj2);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_reference, 0) ) { croak("Expected type idmef_reference_t const * for argument 1."); return; } } { if ( ! SvROK(ST(1)) ) { croak("Argument 2 is null."); return; } if ( SWIG_ConvertPtr(ST(1), (void **)&arg2, SWIGTYPE_p_idmef_reference, 0) ) { croak("Expected type idmef_reference_t const * for argument 2."); return; } } result = (int)idmef_reference_compare((struct idmef_reference const *)arg1,(struct idmef_reference const *)arg2); { ST(argvi) = newSViv(result); argvi++; } XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_reference_ref) { { idmef_reference_t *arg1 = (idmef_reference_t *) 0 ; int argvi = 0; idmef_reference_t *result = 0 ; dXSARGS; if ((items < 1) || (items > 1)) { SWIG_croak("Usage: idmef_reference_ref(reference);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_reference, 0) ) { croak("Expected type idmef_reference_t * for argument 1."); return; } } result = (idmef_reference_t *)idmef_reference_ref(arg1); ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_idmef_reference, 0 | 0); argvi++ ; XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_reference_destroy) { { idmef_reference_t *arg1 = (idmef_reference_t *) 0 ; int argvi = 0; dXSARGS; if ((items < 1) || (items > 1)) { SWIG_croak("Usage: idmef_reference_destroy(ptr);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_reference, 0) ) { croak("Expected type idmef_reference_t * for argument 1."); return; } } idmef_reference_destroy(arg1); ST(argvi) = sv_newmortal(); XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_reference_get_origin) { { idmef_reference_t *arg1 = (idmef_reference_t *) 0 ; int argvi = 0; idmef_reference_origin_t result; dXSARGS; if ((items < 1) || (items > 1)) { SWIG_croak("Usage: idmef_reference_get_origin(ptr);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_reference, 0) ) { croak("Expected type idmef_reference_t * for argument 1."); return; } } result = (idmef_reference_origin_t)idmef_reference_get_origin(arg1); ST(argvi) = SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(result)); argvi++ ; XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_reference_set_origin) { { idmef_reference_t *arg1 = (idmef_reference_t *) 0 ; idmef_reference_origin_t arg2 ; int val2 ; int ecode2 = 0 ; int argvi = 0; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: idmef_reference_set_origin(ptr,origin);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_reference, 0) ) { croak("Expected type idmef_reference_t * for argument 1."); return; } } ecode2 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(1), &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "idmef_reference_set_origin" "', argument " "2"" of type '" "idmef_reference_origin_t""'"); } arg2 = (idmef_reference_origin_t)(val2); idmef_reference_set_origin(arg1,arg2); ST(argvi) = sv_newmortal(); XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_reference_new_origin) { { idmef_reference_t *arg1 = (idmef_reference_t *) 0 ; idmef_reference_origin_t **arg2 = (idmef_reference_origin_t **) 0 ; void *argp2 = 0 ; int res2 = 0 ; int argvi = 0; int result; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: idmef_reference_new_origin(ptr,ret);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_reference, 0) ) { croak("Expected type idmef_reference_t * for argument 1."); return; } } res2 = SWIG_ConvertPtr(ST(1), &argp2,SWIGTYPE_p_p_idmef_reference_origin_t, 0 | 0 ); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "idmef_reference_new_origin" "', argument " "2"" of type '" "idmef_reference_origin_t **""'"); } arg2 = (idmef_reference_origin_t **)(argp2); result = (int)idmef_reference_new_origin(arg1,arg2); { ST(argvi) = newSViv(result); argvi++; } XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_reference_get_name) { { idmef_reference_t *arg1 = (idmef_reference_t *) 0 ; int argvi = 0; prelude_string_t *result = 0 ; dXSARGS; if ((items < 1) || (items > 1)) { SWIG_croak("Usage: idmef_reference_get_name(ptr);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_reference, 0) ) { croak("Expected type idmef_reference_t * for argument 1."); return; } } result = (prelude_string_t *)idmef_reference_get_name(arg1); { ST(argvi) = swig_perl_string(result); argvi++; } XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_reference_set_name) { { idmef_reference_t *arg1 = (idmef_reference_t *) 0 ; prelude_string_t *arg2 = (prelude_string_t *) 0 ; int argvi = 0; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: idmef_reference_set_name(ptr,name);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_reference, 0) ) { croak("Expected type idmef_reference_t * for argument 1."); return; } } { int ret; char *str; STRLEN len; str = SvPV(ST(1), len); ret = prelude_string_new_dup_fast(&(arg2), str, len); if ( ret < 0 ) { swig_perl_raise_error(ret); return; } } idmef_reference_set_name(arg1,arg2); ST(argvi) = sv_newmortal(); XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_reference_new_name) { { idmef_reference_t *arg1 = (idmef_reference_t *) 0 ; prelude_string_t **arg2 = (prelude_string_t **) 0 ; void *argp2 = 0 ; int res2 = 0 ; int argvi = 0; int result; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: idmef_reference_new_name(ptr,ret);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_reference, 0) ) { croak("Expected type idmef_reference_t * for argument 1."); return; } } res2 = SWIG_ConvertPtr(ST(1), &argp2,SWIGTYPE_p_p_prelude_string_t, 0 | 0 ); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "idmef_reference_new_name" "', argument " "2"" of type '" "prelude_string_t **""'"); } arg2 = (prelude_string_t **)(argp2); result = (int)idmef_reference_new_name(arg1,arg2); { ST(argvi) = newSViv(result); argvi++; } XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_reference_get_url) { { idmef_reference_t *arg1 = (idmef_reference_t *) 0 ; int argvi = 0; prelude_string_t *result = 0 ; dXSARGS; if ((items < 1) || (items > 1)) { SWIG_croak("Usage: idmef_reference_get_url(ptr);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_reference, 0) ) { croak("Expected type idmef_reference_t * for argument 1."); return; } } result = (prelude_string_t *)idmef_reference_get_url(arg1); { ST(argvi) = swig_perl_string(result); argvi++; } XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_reference_set_url) { { idmef_reference_t *arg1 = (idmef_reference_t *) 0 ; prelude_string_t *arg2 = (prelude_string_t *) 0 ; int argvi = 0; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: idmef_reference_set_url(ptr,url);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_reference, 0) ) { croak("Expected type idmef_reference_t * for argument 1."); return; } } { int ret; char *str; STRLEN len; str = SvPV(ST(1), len); ret = prelude_string_new_dup_fast(&(arg2), str, len); if ( ret < 0 ) { swig_perl_raise_error(ret); return; } } idmef_reference_set_url(arg1,arg2); ST(argvi) = sv_newmortal(); XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_reference_new_url) { { idmef_reference_t *arg1 = (idmef_reference_t *) 0 ; prelude_string_t **arg2 = (prelude_string_t **) 0 ; void *argp2 = 0 ; int res2 = 0 ; int argvi = 0; int result; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: idmef_reference_new_url(ptr,ret);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_reference, 0) ) { croak("Expected type idmef_reference_t * for argument 1."); return; } } res2 = SWIG_ConvertPtr(ST(1), &argp2,SWIGTYPE_p_p_prelude_string_t, 0 | 0 ); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "idmef_reference_new_url" "', argument " "2"" of type '" "prelude_string_t **""'"); } arg2 = (prelude_string_t **)(argp2); result = (int)idmef_reference_new_url(arg1,arg2); { ST(argvi) = newSViv(result); argvi++; } XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_reference_get_meaning) { { idmef_reference_t *arg1 = (idmef_reference_t *) 0 ; int argvi = 0; prelude_string_t *result = 0 ; dXSARGS; if ((items < 1) || (items > 1)) { SWIG_croak("Usage: idmef_reference_get_meaning(ptr);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_reference, 0) ) { croak("Expected type idmef_reference_t * for argument 1."); return; } } result = (prelude_string_t *)idmef_reference_get_meaning(arg1); { ST(argvi) = swig_perl_string(result); argvi++; } XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_reference_set_meaning) { { idmef_reference_t *arg1 = (idmef_reference_t *) 0 ; prelude_string_t *arg2 = (prelude_string_t *) 0 ; int argvi = 0; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: idmef_reference_set_meaning(ptr,meaning);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_reference, 0) ) { croak("Expected type idmef_reference_t * for argument 1."); return; } } { int ret; char *str; STRLEN len; str = SvPV(ST(1), len); ret = prelude_string_new_dup_fast(&(arg2), str, len); if ( ret < 0 ) { swig_perl_raise_error(ret); return; } } idmef_reference_set_meaning(arg1,arg2); ST(argvi) = sv_newmortal(); XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_reference_new_meaning) { { idmef_reference_t *arg1 = (idmef_reference_t *) 0 ; prelude_string_t **arg2 = (prelude_string_t **) 0 ; void *argp2 = 0 ; int res2 = 0 ; int argvi = 0; int result; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: idmef_reference_new_meaning(ptr,ret);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_reference, 0) ) { croak("Expected type idmef_reference_t * for argument 1."); return; } } res2 = SWIG_ConvertPtr(ST(1), &argp2,SWIGTYPE_p_p_prelude_string_t, 0 | 0 ); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "idmef_reference_new_meaning" "', argument " "2"" of type '" "prelude_string_t **""'"); } arg2 = (prelude_string_t **)(argp2); result = (int)idmef_reference_new_meaning(arg1,arg2); { ST(argvi) = newSViv(result); argvi++; } XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_classification_new) { { idmef_classification_t **arg1 = (idmef_classification_t **) 0 ; idmef_classification_t *tmp1 ; int argvi = 0; SV * _saved[1] ; int result; dXSARGS; if ((items < 1) || (items > 1)) { SWIG_croak("Usage: idmef_classification_new(ret);"); } { arg1 = (idmef_classification_t **) &tmp1; } _saved[0] = ST(0); result = (int)idmef_classification_new(arg1); { ST(argvi) = newSViv(result); argvi++; } { SV *sv; if ( result >= 0 ) { if ( ! SvROK(_saved[0]) ) { croak("Argument 1 is not a reference."); return; } sv = SvRV(_saved[0]); sv_setsv(sv, SWIG_NewPointerObj((void *) * arg1, SWIGTYPE_p_idmef_classification, 0)); } } XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_classification_copy) { { idmef_classification_t *arg1 = (idmef_classification_t *) 0 ; idmef_classification_t *arg2 = (idmef_classification_t *) 0 ; int argvi = 0; int result; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: idmef_classification_copy(src,dst);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_classification, 0) ) { croak("Expected type idmef_classification_t const * for argument 1."); return; } } { if ( ! SvROK(ST(1)) ) { croak("Argument 2 is null."); return; } if ( SWIG_ConvertPtr(ST(1), (void **)&arg2, SWIGTYPE_p_idmef_classification, 0) ) { croak("Expected type idmef_classification_t * for argument 2."); return; } } result = (int)idmef_classification_copy((struct idmef_classification const *)arg1,arg2); { ST(argvi) = newSViv(result); argvi++; } XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_classification_clone) { { idmef_classification_t *arg1 = (idmef_classification_t *) 0 ; idmef_classification_t **arg2 = (idmef_classification_t **) 0 ; idmef_classification_t *tmp2 ; int argvi = 0; SV * _saved[1] ; int result; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: idmef_classification_clone(src,dst);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_classification, 0) ) { croak("Expected type idmef_classification_t * for argument 1."); return; } } { arg2 = (idmef_classification_t **) &tmp2; } _saved[0] = ST(1); result = (int)idmef_classification_clone(arg1,arg2); { ST(argvi) = newSViv(result); argvi++; } { SV *sv; if ( result >= 0 ) { if ( ! SvROK(_saved[0]) ) { croak("Argument 2 is not a reference."); return; } sv = SvRV(_saved[0]); sv_setsv(sv, SWIG_NewPointerObj((void *) * arg2, SWIGTYPE_p_idmef_classification, 0)); } } XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_classification_compare) { { idmef_classification_t *arg1 = (idmef_classification_t *) 0 ; idmef_classification_t *arg2 = (idmef_classification_t *) 0 ; int argvi = 0; int result; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: idmef_classification_compare(obj1,obj2);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_classification, 0) ) { croak("Expected type idmef_classification_t const * for argument 1."); return; } } { if ( ! SvROK(ST(1)) ) { croak("Argument 2 is null."); return; } if ( SWIG_ConvertPtr(ST(1), (void **)&arg2, SWIGTYPE_p_idmef_classification, 0) ) { croak("Expected type idmef_classification_t const * for argument 2."); return; } } result = (int)idmef_classification_compare((struct idmef_classification const *)arg1,(struct idmef_classification const *)arg2); { ST(argvi) = newSViv(result); argvi++; } XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_classification_ref) { { idmef_classification_t *arg1 = (idmef_classification_t *) 0 ; int argvi = 0; idmef_classification_t *result = 0 ; dXSARGS; if ((items < 1) || (items > 1)) { SWIG_croak("Usage: idmef_classification_ref(classification);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_classification, 0) ) { croak("Expected type idmef_classification_t * for argument 1."); return; } } result = (idmef_classification_t *)idmef_classification_ref(arg1); ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_idmef_classification, 0 | 0); argvi++ ; XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_classification_destroy) { { idmef_classification_t *arg1 = (idmef_classification_t *) 0 ; int argvi = 0; dXSARGS; if ((items < 1) || (items > 1)) { SWIG_croak("Usage: idmef_classification_destroy(ptr);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_classification, 0) ) { croak("Expected type idmef_classification_t * for argument 1."); return; } } idmef_classification_destroy(arg1); ST(argvi) = sv_newmortal(); XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_classification_get_ident) { { idmef_classification_t *arg1 = (idmef_classification_t *) 0 ; int argvi = 0; prelude_string_t *result = 0 ; dXSARGS; if ((items < 1) || (items > 1)) { SWIG_croak("Usage: idmef_classification_get_ident(ptr);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_classification, 0) ) { croak("Expected type idmef_classification_t * for argument 1."); return; } } result = (prelude_string_t *)idmef_classification_get_ident(arg1); { ST(argvi) = swig_perl_string(result); argvi++; } XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_classification_set_ident) { { idmef_classification_t *arg1 = (idmef_classification_t *) 0 ; prelude_string_t *arg2 = (prelude_string_t *) 0 ; int argvi = 0; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: idmef_classification_set_ident(ptr,ident);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_classification, 0) ) { croak("Expected type idmef_classification_t * for argument 1."); return; } } { int ret; char *str; STRLEN len; str = SvPV(ST(1), len); ret = prelude_string_new_dup_fast(&(arg2), str, len); if ( ret < 0 ) { swig_perl_raise_error(ret); return; } } idmef_classification_set_ident(arg1,arg2); ST(argvi) = sv_newmortal(); XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_classification_new_ident) { { idmef_classification_t *arg1 = (idmef_classification_t *) 0 ; prelude_string_t **arg2 = (prelude_string_t **) 0 ; void *argp2 = 0 ; int res2 = 0 ; int argvi = 0; int result; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: idmef_classification_new_ident(ptr,ret);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_classification, 0) ) { croak("Expected type idmef_classification_t * for argument 1."); return; } } res2 = SWIG_ConvertPtr(ST(1), &argp2,SWIGTYPE_p_p_prelude_string_t, 0 | 0 ); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "idmef_classification_new_ident" "', argument " "2"" of type '" "prelude_string_t **""'"); } arg2 = (prelude_string_t **)(argp2); result = (int)idmef_classification_new_ident(arg1,arg2); { ST(argvi) = newSViv(result); argvi++; } XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_classification_get_text) { { idmef_classification_t *arg1 = (idmef_classification_t *) 0 ; int argvi = 0; prelude_string_t *result = 0 ; dXSARGS; if ((items < 1) || (items > 1)) { SWIG_croak("Usage: idmef_classification_get_text(ptr);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_classification, 0) ) { croak("Expected type idmef_classification_t * for argument 1."); return; } } result = (prelude_string_t *)idmef_classification_get_text(arg1); { ST(argvi) = swig_perl_string(result); argvi++; } XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_classification_set_text) { { idmef_classification_t *arg1 = (idmef_classification_t *) 0 ; prelude_string_t *arg2 = (prelude_string_t *) 0 ; int argvi = 0; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: idmef_classification_set_text(ptr,text);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_classification, 0) ) { croak("Expected type idmef_classification_t * for argument 1."); return; } } { int ret; char *str; STRLEN len; str = SvPV(ST(1), len); ret = prelude_string_new_dup_fast(&(arg2), str, len); if ( ret < 0 ) { swig_perl_raise_error(ret); return; } } idmef_classification_set_text(arg1,arg2); ST(argvi) = sv_newmortal(); XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_classification_new_text) { { idmef_classification_t *arg1 = (idmef_classification_t *) 0 ; prelude_string_t **arg2 = (prelude_string_t **) 0 ; void *argp2 = 0 ; int res2 = 0 ; int argvi = 0; int result; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: idmef_classification_new_text(ptr,ret);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_classification, 0) ) { croak("Expected type idmef_classification_t * for argument 1."); return; } } res2 = SWIG_ConvertPtr(ST(1), &argp2,SWIGTYPE_p_p_prelude_string_t, 0 | 0 ); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "idmef_classification_new_text" "', argument " "2"" of type '" "prelude_string_t **""'"); } arg2 = (prelude_string_t **)(argp2); result = (int)idmef_classification_new_text(arg1,arg2); { ST(argvi) = newSViv(result); argvi++; } XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_classification_get_next_reference) { { idmef_classification_t *arg1 = (idmef_classification_t *) 0 ; idmef_reference_t *arg2 = (idmef_reference_t *) 0 ; int argvi = 0; idmef_reference_t *result = 0 ; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: idmef_classification_get_next_reference(classification,reference_cur);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_classification, 0) ) { croak("Expected type idmef_classification_t * for argument 1."); return; } } { if ( ! SvOK(ST(1)) ) { arg2 = NULL; } else { if ( SWIG_ConvertPtr(ST(1), (void **)&arg2, SWIGTYPE_p_idmef_reference, 0) ) { croak("Expected type idmef_reference_t * for argument 2."); return; } } } result = (idmef_reference_t *)idmef_classification_get_next_reference(arg1,arg2); ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_idmef_reference, 0 | 0); argvi++ ; XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_classification_set_reference) { { idmef_classification_t *arg1 = (idmef_classification_t *) 0 ; idmef_reference_t *arg2 = (idmef_reference_t *) 0 ; int arg3 ; int val3 ; int ecode3 = 0 ; int argvi = 0; dXSARGS; if ((items < 3) || (items > 3)) { SWIG_croak("Usage: idmef_classification_set_reference(ptr,object,pos);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_classification, 0) ) { croak("Expected type idmef_classification_t * for argument 1."); return; } } { if ( ! SvROK(ST(1)) ) { croak("Argument 2 is null."); return; } if ( SWIG_ConvertPtr(ST(1), (void **)&arg2, SWIGTYPE_p_idmef_reference, 0) ) { croak("Expected type idmef_reference_t * for argument 2."); return; } } ecode3 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(2), &val3); if (!SWIG_IsOK(ecode3)) { SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "idmef_classification_set_reference" "', argument " "3"" of type '" "int""'"); } arg3 = (int)(val3); idmef_classification_set_reference(arg1,arg2,arg3); ST(argvi) = sv_newmortal(); XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_classification_new_reference) { { idmef_classification_t *arg1 = (idmef_classification_t *) 0 ; idmef_reference_t **arg2 = (idmef_reference_t **) 0 ; int arg3 ; idmef_reference_t *tmp2 ; int val3 ; int ecode3 = 0 ; int argvi = 0; SV * _saved[1] ; int result; dXSARGS; if ((items < 3) || (items > 3)) { SWIG_croak("Usage: idmef_classification_new_reference(ptr,ret,pos);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_classification, 0) ) { croak("Expected type idmef_classification_t * for argument 1."); return; } } { arg2 = (idmef_reference_t **) &tmp2; } ecode3 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(2), &val3); if (!SWIG_IsOK(ecode3)) { SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "idmef_classification_new_reference" "', argument " "3"" of type '" "int""'"); } arg3 = (int)(val3); _saved[0] = ST(1); result = (int)idmef_classification_new_reference(arg1,arg2,arg3); { ST(argvi) = newSViv(result); argvi++; } { SV *sv; if ( result >= 0 ) { if ( ! SvROK(_saved[0]) ) { croak("Argument 2 is not a reference."); return; } sv = SvRV(_saved[0]); sv_setsv(sv, SWIG_NewPointerObj((void *) * arg2, SWIGTYPE_p_idmef_reference, 0)); } } XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_user_id_type_to_numeric) { { char *arg1 = (char *) 0 ; int res1 ; char *buf1 = 0 ; int alloc1 = 0 ; int argvi = 0; idmef_user_id_type_t result; dXSARGS; if ((items < 1) || (items > 1)) { SWIG_croak("Usage: idmef_user_id_type_to_numeric(name);"); } res1 = SWIG_AsCharPtrAndSize(ST(0), &buf1, NULL, &alloc1); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "idmef_user_id_type_to_numeric" "', argument " "1"" of type '" "char const *""'"); } arg1 = (char *)(buf1); result = (idmef_user_id_type_t)idmef_user_id_type_to_numeric((char const *)arg1); ST(argvi) = SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(result)); argvi++ ; if (alloc1 == SWIG_NEWOBJ) free((char*)buf1); XSRETURN(argvi); fail: if (alloc1 == SWIG_NEWOBJ) free((char*)buf1); SWIG_croak_null(); } } XS(_wrap_idmef_user_id_type_to_string) { { idmef_user_id_type_t arg1 ; int val1 ; int ecode1 = 0 ; int argvi = 0; char *result = 0 ; dXSARGS; if ((items < 1) || (items > 1)) { SWIG_croak("Usage: idmef_user_id_type_to_string(val);"); } ecode1 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(0), &val1); if (!SWIG_IsOK(ecode1)) { SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "idmef_user_id_type_to_string" "', argument " "1"" of type '" "idmef_user_id_type_t""'"); } arg1 = (idmef_user_id_type_t)(val1); result = (char *)idmef_user_id_type_to_string(arg1); ST(argvi) = SWIG_FromCharPtr((const char *)result); argvi++ ; XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_user_id_new) { { idmef_user_id_t **arg1 = (idmef_user_id_t **) 0 ; idmef_user_id_t *tmp1 ; int argvi = 0; SV * _saved[1] ; int result; dXSARGS; if ((items < 1) || (items > 1)) { SWIG_croak("Usage: idmef_user_id_new(ret);"); } { arg1 = (idmef_user_id_t **) &tmp1; } _saved[0] = ST(0); result = (int)idmef_user_id_new(arg1); { ST(argvi) = newSViv(result); argvi++; } { SV *sv; if ( result >= 0 ) { if ( ! SvROK(_saved[0]) ) { croak("Argument 1 is not a reference."); return; } sv = SvRV(_saved[0]); sv_setsv(sv, SWIG_NewPointerObj((void *) * arg1, SWIGTYPE_p_idmef_user_id, 0)); } } XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_user_id_copy) { { idmef_user_id_t *arg1 = (idmef_user_id_t *) 0 ; idmef_user_id_t *arg2 = (idmef_user_id_t *) 0 ; int argvi = 0; int result; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: idmef_user_id_copy(src,dst);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_user_id, 0) ) { croak("Expected type idmef_user_id_t const * for argument 1."); return; } } { if ( ! SvROK(ST(1)) ) { croak("Argument 2 is null."); return; } if ( SWIG_ConvertPtr(ST(1), (void **)&arg2, SWIGTYPE_p_idmef_user_id, 0) ) { croak("Expected type idmef_user_id_t * for argument 2."); return; } } result = (int)idmef_user_id_copy((struct idmef_user_id const *)arg1,arg2); { ST(argvi) = newSViv(result); argvi++; } XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_user_id_clone) { { idmef_user_id_t *arg1 = (idmef_user_id_t *) 0 ; idmef_user_id_t **arg2 = (idmef_user_id_t **) 0 ; idmef_user_id_t *tmp2 ; int argvi = 0; SV * _saved[1] ; int result; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: idmef_user_id_clone(src,dst);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_user_id, 0) ) { croak("Expected type idmef_user_id_t * for argument 1."); return; } } { arg2 = (idmef_user_id_t **) &tmp2; } _saved[0] = ST(1); result = (int)idmef_user_id_clone(arg1,arg2); { ST(argvi) = newSViv(result); argvi++; } { SV *sv; if ( result >= 0 ) { if ( ! SvROK(_saved[0]) ) { croak("Argument 2 is not a reference."); return; } sv = SvRV(_saved[0]); sv_setsv(sv, SWIG_NewPointerObj((void *) * arg2, SWIGTYPE_p_idmef_user_id, 0)); } } XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_user_id_compare) { { idmef_user_id_t *arg1 = (idmef_user_id_t *) 0 ; idmef_user_id_t *arg2 = (idmef_user_id_t *) 0 ; int argvi = 0; int result; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: idmef_user_id_compare(obj1,obj2);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_user_id, 0) ) { croak("Expected type idmef_user_id_t const * for argument 1."); return; } } { if ( ! SvROK(ST(1)) ) { croak("Argument 2 is null."); return; } if ( SWIG_ConvertPtr(ST(1), (void **)&arg2, SWIGTYPE_p_idmef_user_id, 0) ) { croak("Expected type idmef_user_id_t const * for argument 2."); return; } } result = (int)idmef_user_id_compare((struct idmef_user_id const *)arg1,(struct idmef_user_id const *)arg2); { ST(argvi) = newSViv(result); argvi++; } XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_user_id_ref) { { idmef_user_id_t *arg1 = (idmef_user_id_t *) 0 ; int argvi = 0; idmef_user_id_t *result = 0 ; dXSARGS; if ((items < 1) || (items > 1)) { SWIG_croak("Usage: idmef_user_id_ref(user_id);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_user_id, 0) ) { croak("Expected type idmef_user_id_t * for argument 1."); return; } } result = (idmef_user_id_t *)idmef_user_id_ref(arg1); ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_idmef_user_id, 0 | 0); argvi++ ; XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_user_id_destroy) { { idmef_user_id_t *arg1 = (idmef_user_id_t *) 0 ; int argvi = 0; dXSARGS; if ((items < 1) || (items > 1)) { SWIG_croak("Usage: idmef_user_id_destroy(ptr);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_user_id, 0) ) { croak("Expected type idmef_user_id_t * for argument 1."); return; } } idmef_user_id_destroy(arg1); ST(argvi) = sv_newmortal(); XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_user_id_get_ident) { { idmef_user_id_t *arg1 = (idmef_user_id_t *) 0 ; int argvi = 0; prelude_string_t *result = 0 ; dXSARGS; if ((items < 1) || (items > 1)) { SWIG_croak("Usage: idmef_user_id_get_ident(ptr);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_user_id, 0) ) { croak("Expected type idmef_user_id_t * for argument 1."); return; } } result = (prelude_string_t *)idmef_user_id_get_ident(arg1); { ST(argvi) = swig_perl_string(result); argvi++; } XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_user_id_set_ident) { { idmef_user_id_t *arg1 = (idmef_user_id_t *) 0 ; prelude_string_t *arg2 = (prelude_string_t *) 0 ; int argvi = 0; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: idmef_user_id_set_ident(ptr,ident);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_user_id, 0) ) { croak("Expected type idmef_user_id_t * for argument 1."); return; } } { int ret; char *str; STRLEN len; str = SvPV(ST(1), len); ret = prelude_string_new_dup_fast(&(arg2), str, len); if ( ret < 0 ) { swig_perl_raise_error(ret); return; } } idmef_user_id_set_ident(arg1,arg2); ST(argvi) = sv_newmortal(); XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_user_id_new_ident) { { idmef_user_id_t *arg1 = (idmef_user_id_t *) 0 ; prelude_string_t **arg2 = (prelude_string_t **) 0 ; void *argp2 = 0 ; int res2 = 0 ; int argvi = 0; int result; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: idmef_user_id_new_ident(ptr,ret);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_user_id, 0) ) { croak("Expected type idmef_user_id_t * for argument 1."); return; } } res2 = SWIG_ConvertPtr(ST(1), &argp2,SWIGTYPE_p_p_prelude_string_t, 0 | 0 ); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "idmef_user_id_new_ident" "', argument " "2"" of type '" "prelude_string_t **""'"); } arg2 = (prelude_string_t **)(argp2); result = (int)idmef_user_id_new_ident(arg1,arg2); { ST(argvi) = newSViv(result); argvi++; } XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_user_id_get_type) { { idmef_user_id_t *arg1 = (idmef_user_id_t *) 0 ; int argvi = 0; idmef_user_id_type_t result; dXSARGS; if ((items < 1) || (items > 1)) { SWIG_croak("Usage: idmef_user_id_get_type(ptr);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_user_id, 0) ) { croak("Expected type idmef_user_id_t * for argument 1."); return; } } result = (idmef_user_id_type_t)idmef_user_id_get_type(arg1); ST(argvi) = SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(result)); argvi++ ; XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_user_id_set_type) { { idmef_user_id_t *arg1 = (idmef_user_id_t *) 0 ; idmef_user_id_type_t arg2 ; int val2 ; int ecode2 = 0 ; int argvi = 0; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: idmef_user_id_set_type(ptr,type);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_user_id, 0) ) { croak("Expected type idmef_user_id_t * for argument 1."); return; } } ecode2 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(1), &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "idmef_user_id_set_type" "', argument " "2"" of type '" "idmef_user_id_type_t""'"); } arg2 = (idmef_user_id_type_t)(val2); idmef_user_id_set_type(arg1,arg2); ST(argvi) = sv_newmortal(); XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_user_id_new_type) { { idmef_user_id_t *arg1 = (idmef_user_id_t *) 0 ; idmef_user_id_type_t **arg2 = (idmef_user_id_type_t **) 0 ; void *argp2 = 0 ; int res2 = 0 ; int argvi = 0; int result; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: idmef_user_id_new_type(ptr,ret);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_user_id, 0) ) { croak("Expected type idmef_user_id_t * for argument 1."); return; } } res2 = SWIG_ConvertPtr(ST(1), &argp2,SWIGTYPE_p_p_idmef_user_id_type_t, 0 | 0 ); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "idmef_user_id_new_type" "', argument " "2"" of type '" "idmef_user_id_type_t **""'"); } arg2 = (idmef_user_id_type_t **)(argp2); result = (int)idmef_user_id_new_type(arg1,arg2); { ST(argvi) = newSViv(result); argvi++; } XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_user_id_get_tty) { { idmef_user_id_t *arg1 = (idmef_user_id_t *) 0 ; int argvi = 0; prelude_string_t *result = 0 ; dXSARGS; if ((items < 1) || (items > 1)) { SWIG_croak("Usage: idmef_user_id_get_tty(ptr);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_user_id, 0) ) { croak("Expected type idmef_user_id_t * for argument 1."); return; } } result = (prelude_string_t *)idmef_user_id_get_tty(arg1); { ST(argvi) = swig_perl_string(result); argvi++; } XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_user_id_set_tty) { { idmef_user_id_t *arg1 = (idmef_user_id_t *) 0 ; prelude_string_t *arg2 = (prelude_string_t *) 0 ; int argvi = 0; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: idmef_user_id_set_tty(ptr,tty);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_user_id, 0) ) { croak("Expected type idmef_user_id_t * for argument 1."); return; } } { int ret; char *str; STRLEN len; str = SvPV(ST(1), len); ret = prelude_string_new_dup_fast(&(arg2), str, len); if ( ret < 0 ) { swig_perl_raise_error(ret); return; } } idmef_user_id_set_tty(arg1,arg2); ST(argvi) = sv_newmortal(); XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_user_id_new_tty) { { idmef_user_id_t *arg1 = (idmef_user_id_t *) 0 ; prelude_string_t **arg2 = (prelude_string_t **) 0 ; void *argp2 = 0 ; int res2 = 0 ; int argvi = 0; int result; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: idmef_user_id_new_tty(ptr,ret);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_user_id, 0) ) { croak("Expected type idmef_user_id_t * for argument 1."); return; } } res2 = SWIG_ConvertPtr(ST(1), &argp2,SWIGTYPE_p_p_prelude_string_t, 0 | 0 ); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "idmef_user_id_new_tty" "', argument " "2"" of type '" "prelude_string_t **""'"); } arg2 = (prelude_string_t **)(argp2); result = (int)idmef_user_id_new_tty(arg1,arg2); { ST(argvi) = newSViv(result); argvi++; } XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_user_id_get_name) { { idmef_user_id_t *arg1 = (idmef_user_id_t *) 0 ; int argvi = 0; prelude_string_t *result = 0 ; dXSARGS; if ((items < 1) || (items > 1)) { SWIG_croak("Usage: idmef_user_id_get_name(ptr);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_user_id, 0) ) { croak("Expected type idmef_user_id_t * for argument 1."); return; } } result = (prelude_string_t *)idmef_user_id_get_name(arg1); { ST(argvi) = swig_perl_string(result); argvi++; } XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_user_id_set_name) { { idmef_user_id_t *arg1 = (idmef_user_id_t *) 0 ; prelude_string_t *arg2 = (prelude_string_t *) 0 ; int argvi = 0; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: idmef_user_id_set_name(ptr,name);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_user_id, 0) ) { croak("Expected type idmef_user_id_t * for argument 1."); return; } } { int ret; char *str; STRLEN len; str = SvPV(ST(1), len); ret = prelude_string_new_dup_fast(&(arg2), str, len); if ( ret < 0 ) { swig_perl_raise_error(ret); return; } } idmef_user_id_set_name(arg1,arg2); ST(argvi) = sv_newmortal(); XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_user_id_new_name) { { idmef_user_id_t *arg1 = (idmef_user_id_t *) 0 ; prelude_string_t **arg2 = (prelude_string_t **) 0 ; void *argp2 = 0 ; int res2 = 0 ; int argvi = 0; int result; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: idmef_user_id_new_name(ptr,ret);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_user_id, 0) ) { croak("Expected type idmef_user_id_t * for argument 1."); return; } } res2 = SWIG_ConvertPtr(ST(1), &argp2,SWIGTYPE_p_p_prelude_string_t, 0 | 0 ); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "idmef_user_id_new_name" "', argument " "2"" of type '" "prelude_string_t **""'"); } arg2 = (prelude_string_t **)(argp2); result = (int)idmef_user_id_new_name(arg1,arg2); { ST(argvi) = newSViv(result); argvi++; } XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_user_id_unset_number) { { idmef_user_id_t *arg1 = (idmef_user_id_t *) 0 ; int argvi = 0; dXSARGS; if ((items < 1) || (items > 1)) { SWIG_croak("Usage: idmef_user_id_unset_number(ptr);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_user_id, 0) ) { croak("Expected type idmef_user_id_t * for argument 1."); return; } } idmef_user_id_unset_number(arg1); ST(argvi) = sv_newmortal(); XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_user_id_get_number) { { idmef_user_id_t *arg1 = (idmef_user_id_t *) 0 ; int argvi = 0; uint32_t *result = 0 ; dXSARGS; if ((items < 1) || (items > 1)) { SWIG_croak("Usage: idmef_user_id_get_number(ptr);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_user_id, 0) ) { croak("Expected type idmef_user_id_t * for argument 1."); return; } } result = (uint32_t *)idmef_user_id_get_number(arg1); { if ( result != NULL ) { ST(argvi) = newSVuv(*result); } else { SvREFCNT_inc (& PL_sv_undef); ST(argvi) = &PL_sv_undef; } } XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_user_id_set_number) { { idmef_user_id_t *arg1 = (idmef_user_id_t *) 0 ; uint32_t arg2 ; unsigned int val2 ; int ecode2 = 0 ; int argvi = 0; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: idmef_user_id_set_number(ptr,number);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_user_id, 0) ) { croak("Expected type idmef_user_id_t * for argument 1."); return; } } ecode2 = SWIG_AsVal_unsigned_SS_int SWIG_PERL_CALL_ARGS_2(ST(1), &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "idmef_user_id_set_number" "', argument " "2"" of type '" "uint32_t""'"); } arg2 = (uint32_t)(val2); idmef_user_id_set_number(arg1,arg2); ST(argvi) = sv_newmortal(); XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_user_id_new_number) { { idmef_user_id_t *arg1 = (idmef_user_id_t *) 0 ; uint32_t **arg2 = (uint32_t **) 0 ; void *argp2 = 0 ; int res2 = 0 ; int argvi = 0; int result; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: idmef_user_id_new_number(ptr,ret);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_user_id, 0) ) { croak("Expected type idmef_user_id_t * for argument 1."); return; } } res2 = SWIG_ConvertPtr(ST(1), &argp2,SWIGTYPE_p_p_unsigned_int, 0 | 0 ); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "idmef_user_id_new_number" "', argument " "2"" of type '" "uint32_t **""'"); } arg2 = (uint32_t **)(argp2); result = (int)idmef_user_id_new_number(arg1,arg2); { ST(argvi) = newSViv(result); argvi++; } XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_user_category_to_numeric) { { char *arg1 = (char *) 0 ; int res1 ; char *buf1 = 0 ; int alloc1 = 0 ; int argvi = 0; idmef_user_category_t result; dXSARGS; if ((items < 1) || (items > 1)) { SWIG_croak("Usage: idmef_user_category_to_numeric(name);"); } res1 = SWIG_AsCharPtrAndSize(ST(0), &buf1, NULL, &alloc1); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "idmef_user_category_to_numeric" "', argument " "1"" of type '" "char const *""'"); } arg1 = (char *)(buf1); result = (idmef_user_category_t)idmef_user_category_to_numeric((char const *)arg1); ST(argvi) = SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(result)); argvi++ ; if (alloc1 == SWIG_NEWOBJ) free((char*)buf1); XSRETURN(argvi); fail: if (alloc1 == SWIG_NEWOBJ) free((char*)buf1); SWIG_croak_null(); } } XS(_wrap_idmef_user_category_to_string) { { idmef_user_category_t arg1 ; int val1 ; int ecode1 = 0 ; int argvi = 0; char *result = 0 ; dXSARGS; if ((items < 1) || (items > 1)) { SWIG_croak("Usage: idmef_user_category_to_string(val);"); } ecode1 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(0), &val1); if (!SWIG_IsOK(ecode1)) { SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "idmef_user_category_to_string" "', argument " "1"" of type '" "idmef_user_category_t""'"); } arg1 = (idmef_user_category_t)(val1); result = (char *)idmef_user_category_to_string(arg1); ST(argvi) = SWIG_FromCharPtr((const char *)result); argvi++ ; XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_user_new) { { idmef_user_t **arg1 = (idmef_user_t **) 0 ; idmef_user_t *tmp1 ; int argvi = 0; SV * _saved[1] ; int result; dXSARGS; if ((items < 1) || (items > 1)) { SWIG_croak("Usage: idmef_user_new(ret);"); } { arg1 = (idmef_user_t **) &tmp1; } _saved[0] = ST(0); result = (int)idmef_user_new(arg1); { ST(argvi) = newSViv(result); argvi++; } { SV *sv; if ( result >= 0 ) { if ( ! SvROK(_saved[0]) ) { croak("Argument 1 is not a reference."); return; } sv = SvRV(_saved[0]); sv_setsv(sv, SWIG_NewPointerObj((void *) * arg1, SWIGTYPE_p_idmef_user, 0)); } } XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_user_copy) { { idmef_user_t *arg1 = (idmef_user_t *) 0 ; idmef_user_t *arg2 = (idmef_user_t *) 0 ; int argvi = 0; int result; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: idmef_user_copy(src,dst);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_user, 0) ) { croak("Expected type idmef_user_t const * for argument 1."); return; } } { if ( ! SvROK(ST(1)) ) { croak("Argument 2 is null."); return; } if ( SWIG_ConvertPtr(ST(1), (void **)&arg2, SWIGTYPE_p_idmef_user, 0) ) { croak("Expected type idmef_user_t * for argument 2."); return; } } result = (int)idmef_user_copy((struct idmef_user const *)arg1,arg2); { ST(argvi) = newSViv(result); argvi++; } XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_user_clone) { { idmef_user_t *arg1 = (idmef_user_t *) 0 ; idmef_user_t **arg2 = (idmef_user_t **) 0 ; idmef_user_t *tmp2 ; int argvi = 0; SV * _saved[1] ; int result; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: idmef_user_clone(src,dst);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_user, 0) ) { croak("Expected type idmef_user_t * for argument 1."); return; } } { arg2 = (idmef_user_t **) &tmp2; } _saved[0] = ST(1); result = (int)idmef_user_clone(arg1,arg2); { ST(argvi) = newSViv(result); argvi++; } { SV *sv; if ( result >= 0 ) { if ( ! SvROK(_saved[0]) ) { croak("Argument 2 is not a reference."); return; } sv = SvRV(_saved[0]); sv_setsv(sv, SWIG_NewPointerObj((void *) * arg2, SWIGTYPE_p_idmef_user, 0)); } } XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_user_compare) { { idmef_user_t *arg1 = (idmef_user_t *) 0 ; idmef_user_t *arg2 = (idmef_user_t *) 0 ; int argvi = 0; int result; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: idmef_user_compare(obj1,obj2);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_user, 0) ) { croak("Expected type idmef_user_t const * for argument 1."); return; } } { if ( ! SvROK(ST(1)) ) { croak("Argument 2 is null."); return; } if ( SWIG_ConvertPtr(ST(1), (void **)&arg2, SWIGTYPE_p_idmef_user, 0) ) { croak("Expected type idmef_user_t const * for argument 2."); return; } } result = (int)idmef_user_compare((struct idmef_user const *)arg1,(struct idmef_user const *)arg2); { ST(argvi) = newSViv(result); argvi++; } XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_user_ref) { { idmef_user_t *arg1 = (idmef_user_t *) 0 ; int argvi = 0; idmef_user_t *result = 0 ; dXSARGS; if ((items < 1) || (items > 1)) { SWIG_croak("Usage: idmef_user_ref(user);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_user, 0) ) { croak("Expected type idmef_user_t * for argument 1."); return; } } result = (idmef_user_t *)idmef_user_ref(arg1); ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_idmef_user, 0 | 0); argvi++ ; XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_user_destroy) { { idmef_user_t *arg1 = (idmef_user_t *) 0 ; int argvi = 0; dXSARGS; if ((items < 1) || (items > 1)) { SWIG_croak("Usage: idmef_user_destroy(ptr);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_user, 0) ) { croak("Expected type idmef_user_t * for argument 1."); return; } } idmef_user_destroy(arg1); ST(argvi) = sv_newmortal(); XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_user_get_ident) { { idmef_user_t *arg1 = (idmef_user_t *) 0 ; int argvi = 0; prelude_string_t *result = 0 ; dXSARGS; if ((items < 1) || (items > 1)) { SWIG_croak("Usage: idmef_user_get_ident(ptr);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_user, 0) ) { croak("Expected type idmef_user_t * for argument 1."); return; } } result = (prelude_string_t *)idmef_user_get_ident(arg1); { ST(argvi) = swig_perl_string(result); argvi++; } XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_user_set_ident) { { idmef_user_t *arg1 = (idmef_user_t *) 0 ; prelude_string_t *arg2 = (prelude_string_t *) 0 ; int argvi = 0; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: idmef_user_set_ident(ptr,ident);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_user, 0) ) { croak("Expected type idmef_user_t * for argument 1."); return; } } { int ret; char *str; STRLEN len; str = SvPV(ST(1), len); ret = prelude_string_new_dup_fast(&(arg2), str, len); if ( ret < 0 ) { swig_perl_raise_error(ret); return; } } idmef_user_set_ident(arg1,arg2); ST(argvi) = sv_newmortal(); XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_user_new_ident) { { idmef_user_t *arg1 = (idmef_user_t *) 0 ; prelude_string_t **arg2 = (prelude_string_t **) 0 ; void *argp2 = 0 ; int res2 = 0 ; int argvi = 0; int result; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: idmef_user_new_ident(ptr,ret);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_user, 0) ) { croak("Expected type idmef_user_t * for argument 1."); return; } } res2 = SWIG_ConvertPtr(ST(1), &argp2,SWIGTYPE_p_p_prelude_string_t, 0 | 0 ); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "idmef_user_new_ident" "', argument " "2"" of type '" "prelude_string_t **""'"); } arg2 = (prelude_string_t **)(argp2); result = (int)idmef_user_new_ident(arg1,arg2); { ST(argvi) = newSViv(result); argvi++; } XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_user_get_category) { { idmef_user_t *arg1 = (idmef_user_t *) 0 ; int argvi = 0; idmef_user_category_t result; dXSARGS; if ((items < 1) || (items > 1)) { SWIG_croak("Usage: idmef_user_get_category(ptr);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_user, 0) ) { croak("Expected type idmef_user_t * for argument 1."); return; } } result = (idmef_user_category_t)idmef_user_get_category(arg1); ST(argvi) = SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(result)); argvi++ ; XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_user_set_category) { { idmef_user_t *arg1 = (idmef_user_t *) 0 ; idmef_user_category_t arg2 ; int val2 ; int ecode2 = 0 ; int argvi = 0; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: idmef_user_set_category(ptr,category);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_user, 0) ) { croak("Expected type idmef_user_t * for argument 1."); return; } } ecode2 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(1), &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "idmef_user_set_category" "', argument " "2"" of type '" "idmef_user_category_t""'"); } arg2 = (idmef_user_category_t)(val2); idmef_user_set_category(arg1,arg2); ST(argvi) = sv_newmortal(); XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_user_new_category) { { idmef_user_t *arg1 = (idmef_user_t *) 0 ; idmef_user_category_t **arg2 = (idmef_user_category_t **) 0 ; void *argp2 = 0 ; int res2 = 0 ; int argvi = 0; int result; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: idmef_user_new_category(ptr,ret);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_user, 0) ) { croak("Expected type idmef_user_t * for argument 1."); return; } } res2 = SWIG_ConvertPtr(ST(1), &argp2,SWIGTYPE_p_p_idmef_user_category_t, 0 | 0 ); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "idmef_user_new_category" "', argument " "2"" of type '" "idmef_user_category_t **""'"); } arg2 = (idmef_user_category_t **)(argp2); result = (int)idmef_user_new_category(arg1,arg2); { ST(argvi) = newSViv(result); argvi++; } XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_user_get_next_user_id) { { idmef_user_t *arg1 = (idmef_user_t *) 0 ; idmef_user_id_t *arg2 = (idmef_user_id_t *) 0 ; int argvi = 0; idmef_user_id_t *result = 0 ; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: idmef_user_get_next_user_id(user,user_id_cur);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_user, 0) ) { croak("Expected type idmef_user_t * for argument 1."); return; } } { if ( ! SvOK(ST(1)) ) { arg2 = NULL; } else { if ( SWIG_ConvertPtr(ST(1), (void **)&arg2, SWIGTYPE_p_idmef_user_id, 0) ) { croak("Expected type idmef_user_id_t * for argument 2."); return; } } } result = (idmef_user_id_t *)idmef_user_get_next_user_id(arg1,arg2); ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_idmef_user_id, 0 | 0); argvi++ ; XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_user_set_user_id) { { idmef_user_t *arg1 = (idmef_user_t *) 0 ; idmef_user_id_t *arg2 = (idmef_user_id_t *) 0 ; int arg3 ; int val3 ; int ecode3 = 0 ; int argvi = 0; dXSARGS; if ((items < 3) || (items > 3)) { SWIG_croak("Usage: idmef_user_set_user_id(ptr,object,pos);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_user, 0) ) { croak("Expected type idmef_user_t * for argument 1."); return; } } { if ( ! SvROK(ST(1)) ) { croak("Argument 2 is null."); return; } if ( SWIG_ConvertPtr(ST(1), (void **)&arg2, SWIGTYPE_p_idmef_user_id, 0) ) { croak("Expected type idmef_user_id_t * for argument 2."); return; } } ecode3 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(2), &val3); if (!SWIG_IsOK(ecode3)) { SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "idmef_user_set_user_id" "', argument " "3"" of type '" "int""'"); } arg3 = (int)(val3); idmef_user_set_user_id(arg1,arg2,arg3); ST(argvi) = sv_newmortal(); XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_user_new_user_id) { { idmef_user_t *arg1 = (idmef_user_t *) 0 ; idmef_user_id_t **arg2 = (idmef_user_id_t **) 0 ; int arg3 ; idmef_user_id_t *tmp2 ; int val3 ; int ecode3 = 0 ; int argvi = 0; SV * _saved[1] ; int result; dXSARGS; if ((items < 3) || (items > 3)) { SWIG_croak("Usage: idmef_user_new_user_id(ptr,ret,pos);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_user, 0) ) { croak("Expected type idmef_user_t * for argument 1."); return; } } { arg2 = (idmef_user_id_t **) &tmp2; } ecode3 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(2), &val3); if (!SWIG_IsOK(ecode3)) { SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "idmef_user_new_user_id" "', argument " "3"" of type '" "int""'"); } arg3 = (int)(val3); _saved[0] = ST(1); result = (int)idmef_user_new_user_id(arg1,arg2,arg3); { ST(argvi) = newSViv(result); argvi++; } { SV *sv; if ( result >= 0 ) { if ( ! SvROK(_saved[0]) ) { croak("Argument 2 is not a reference."); return; } sv = SvRV(_saved[0]); sv_setsv(sv, SWIG_NewPointerObj((void *) * arg2, SWIGTYPE_p_idmef_user_id, 0)); } } XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_address_category_to_numeric) { { char *arg1 = (char *) 0 ; int res1 ; char *buf1 = 0 ; int alloc1 = 0 ; int argvi = 0; idmef_address_category_t result; dXSARGS; if ((items < 1) || (items > 1)) { SWIG_croak("Usage: idmef_address_category_to_numeric(name);"); } res1 = SWIG_AsCharPtrAndSize(ST(0), &buf1, NULL, &alloc1); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "idmef_address_category_to_numeric" "', argument " "1"" of type '" "char const *""'"); } arg1 = (char *)(buf1); result = (idmef_address_category_t)idmef_address_category_to_numeric((char const *)arg1); ST(argvi) = SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(result)); argvi++ ; if (alloc1 == SWIG_NEWOBJ) free((char*)buf1); XSRETURN(argvi); fail: if (alloc1 == SWIG_NEWOBJ) free((char*)buf1); SWIG_croak_null(); } } XS(_wrap_idmef_address_category_to_string) { { idmef_address_category_t arg1 ; int val1 ; int ecode1 = 0 ; int argvi = 0; char *result = 0 ; dXSARGS; if ((items < 1) || (items > 1)) { SWIG_croak("Usage: idmef_address_category_to_string(val);"); } ecode1 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(0), &val1); if (!SWIG_IsOK(ecode1)) { SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "idmef_address_category_to_string" "', argument " "1"" of type '" "idmef_address_category_t""'"); } arg1 = (idmef_address_category_t)(val1); result = (char *)idmef_address_category_to_string(arg1); ST(argvi) = SWIG_FromCharPtr((const char *)result); argvi++ ; XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_address_new) { { idmef_address_t **arg1 = (idmef_address_t **) 0 ; idmef_address_t *tmp1 ; int argvi = 0; SV * _saved[1] ; int result; dXSARGS; if ((items < 1) || (items > 1)) { SWIG_croak("Usage: idmef_address_new(ret);"); } { arg1 = (idmef_address_t **) &tmp1; } _saved[0] = ST(0); result = (int)idmef_address_new(arg1); { ST(argvi) = newSViv(result); argvi++; } { SV *sv; if ( result >= 0 ) { if ( ! SvROK(_saved[0]) ) { croak("Argument 1 is not a reference."); return; } sv = SvRV(_saved[0]); sv_setsv(sv, SWIG_NewPointerObj((void *) * arg1, SWIGTYPE_p_idmef_address, 0)); } } XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_address_copy) { { idmef_address_t *arg1 = (idmef_address_t *) 0 ; idmef_address_t *arg2 = (idmef_address_t *) 0 ; int argvi = 0; int result; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: idmef_address_copy(src,dst);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_address, 0) ) { croak("Expected type idmef_address_t const * for argument 1."); return; } } { if ( ! SvROK(ST(1)) ) { croak("Argument 2 is null."); return; } if ( SWIG_ConvertPtr(ST(1), (void **)&arg2, SWIGTYPE_p_idmef_address, 0) ) { croak("Expected type idmef_address_t * for argument 2."); return; } } result = (int)idmef_address_copy((struct idmef_address const *)arg1,arg2); { ST(argvi) = newSViv(result); argvi++; } XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_address_clone) { { idmef_address_t *arg1 = (idmef_address_t *) 0 ; idmef_address_t **arg2 = (idmef_address_t **) 0 ; idmef_address_t *tmp2 ; int argvi = 0; SV * _saved[1] ; int result; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: idmef_address_clone(src,dst);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_address, 0) ) { croak("Expected type idmef_address_t * for argument 1."); return; } } { arg2 = (idmef_address_t **) &tmp2; } _saved[0] = ST(1); result = (int)idmef_address_clone(arg1,arg2); { ST(argvi) = newSViv(result); argvi++; } { SV *sv; if ( result >= 0 ) { if ( ! SvROK(_saved[0]) ) { croak("Argument 2 is not a reference."); return; } sv = SvRV(_saved[0]); sv_setsv(sv, SWIG_NewPointerObj((void *) * arg2, SWIGTYPE_p_idmef_address, 0)); } } XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_address_compare) { { idmef_address_t *arg1 = (idmef_address_t *) 0 ; idmef_address_t *arg2 = (idmef_address_t *) 0 ; int argvi = 0; int result; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: idmef_address_compare(obj1,obj2);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_address, 0) ) { croak("Expected type idmef_address_t const * for argument 1."); return; } } { if ( ! SvROK(ST(1)) ) { croak("Argument 2 is null."); return; } if ( SWIG_ConvertPtr(ST(1), (void **)&arg2, SWIGTYPE_p_idmef_address, 0) ) { croak("Expected type idmef_address_t const * for argument 2."); return; } } result = (int)idmef_address_compare((struct idmef_address const *)arg1,(struct idmef_address const *)arg2); { ST(argvi) = newSViv(result); argvi++; } XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_address_ref) { { idmef_address_t *arg1 = (idmef_address_t *) 0 ; int argvi = 0; idmef_address_t *result = 0 ; dXSARGS; if ((items < 1) || (items > 1)) { SWIG_croak("Usage: idmef_address_ref(address);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_address, 0) ) { croak("Expected type idmef_address_t * for argument 1."); return; } } result = (idmef_address_t *)idmef_address_ref(arg1); ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_idmef_address, 0 | 0); argvi++ ; XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_address_destroy) { { idmef_address_t *arg1 = (idmef_address_t *) 0 ; int argvi = 0; dXSARGS; if ((items < 1) || (items > 1)) { SWIG_croak("Usage: idmef_address_destroy(ptr);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_address, 0) ) { croak("Expected type idmef_address_t * for argument 1."); return; } } idmef_address_destroy(arg1); ST(argvi) = sv_newmortal(); XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_address_get_ident) { { idmef_address_t *arg1 = (idmef_address_t *) 0 ; int argvi = 0; prelude_string_t *result = 0 ; dXSARGS; if ((items < 1) || (items > 1)) { SWIG_croak("Usage: idmef_address_get_ident(ptr);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_address, 0) ) { croak("Expected type idmef_address_t * for argument 1."); return; } } result = (prelude_string_t *)idmef_address_get_ident(arg1); { ST(argvi) = swig_perl_string(result); argvi++; } XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_address_set_ident) { { idmef_address_t *arg1 = (idmef_address_t *) 0 ; prelude_string_t *arg2 = (prelude_string_t *) 0 ; int argvi = 0; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: idmef_address_set_ident(ptr,ident);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_address, 0) ) { croak("Expected type idmef_address_t * for argument 1."); return; } } { int ret; char *str; STRLEN len; str = SvPV(ST(1), len); ret = prelude_string_new_dup_fast(&(arg2), str, len); if ( ret < 0 ) { swig_perl_raise_error(ret); return; } } idmef_address_set_ident(arg1,arg2); ST(argvi) = sv_newmortal(); XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_address_new_ident) { { idmef_address_t *arg1 = (idmef_address_t *) 0 ; prelude_string_t **arg2 = (prelude_string_t **) 0 ; void *argp2 = 0 ; int res2 = 0 ; int argvi = 0; int result; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: idmef_address_new_ident(ptr,ret);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_address, 0) ) { croak("Expected type idmef_address_t * for argument 1."); return; } } res2 = SWIG_ConvertPtr(ST(1), &argp2,SWIGTYPE_p_p_prelude_string_t, 0 | 0 ); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "idmef_address_new_ident" "', argument " "2"" of type '" "prelude_string_t **""'"); } arg2 = (prelude_string_t **)(argp2); result = (int)idmef_address_new_ident(arg1,arg2); { ST(argvi) = newSViv(result); argvi++; } XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_address_get_category) { { idmef_address_t *arg1 = (idmef_address_t *) 0 ; int argvi = 0; idmef_address_category_t result; dXSARGS; if ((items < 1) || (items > 1)) { SWIG_croak("Usage: idmef_address_get_category(ptr);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_address, 0) ) { croak("Expected type idmef_address_t * for argument 1."); return; } } result = (idmef_address_category_t)idmef_address_get_category(arg1); ST(argvi) = SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(result)); argvi++ ; XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_address_set_category) { { idmef_address_t *arg1 = (idmef_address_t *) 0 ; idmef_address_category_t arg2 ; int val2 ; int ecode2 = 0 ; int argvi = 0; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: idmef_address_set_category(ptr,category);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_address, 0) ) { croak("Expected type idmef_address_t * for argument 1."); return; } } ecode2 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(1), &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "idmef_address_set_category" "', argument " "2"" of type '" "idmef_address_category_t""'"); } arg2 = (idmef_address_category_t)(val2); idmef_address_set_category(arg1,arg2); ST(argvi) = sv_newmortal(); XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_address_new_category) { { idmef_address_t *arg1 = (idmef_address_t *) 0 ; idmef_address_category_t **arg2 = (idmef_address_category_t **) 0 ; void *argp2 = 0 ; int res2 = 0 ; int argvi = 0; int result; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: idmef_address_new_category(ptr,ret);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_address, 0) ) { croak("Expected type idmef_address_t * for argument 1."); return; } } res2 = SWIG_ConvertPtr(ST(1), &argp2,SWIGTYPE_p_p_idmef_address_category_t, 0 | 0 ); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "idmef_address_new_category" "', argument " "2"" of type '" "idmef_address_category_t **""'"); } arg2 = (idmef_address_category_t **)(argp2); result = (int)idmef_address_new_category(arg1,arg2); { ST(argvi) = newSViv(result); argvi++; } XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_address_get_vlan_name) { { idmef_address_t *arg1 = (idmef_address_t *) 0 ; int argvi = 0; prelude_string_t *result = 0 ; dXSARGS; if ((items < 1) || (items > 1)) { SWIG_croak("Usage: idmef_address_get_vlan_name(ptr);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_address, 0) ) { croak("Expected type idmef_address_t * for argument 1."); return; } } result = (prelude_string_t *)idmef_address_get_vlan_name(arg1); { ST(argvi) = swig_perl_string(result); argvi++; } XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_address_set_vlan_name) { { idmef_address_t *arg1 = (idmef_address_t *) 0 ; prelude_string_t *arg2 = (prelude_string_t *) 0 ; int argvi = 0; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: idmef_address_set_vlan_name(ptr,vlan_name);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_address, 0) ) { croak("Expected type idmef_address_t * for argument 1."); return; } } { int ret; char *str; STRLEN len; str = SvPV(ST(1), len); ret = prelude_string_new_dup_fast(&(arg2), str, len); if ( ret < 0 ) { swig_perl_raise_error(ret); return; } } idmef_address_set_vlan_name(arg1,arg2); ST(argvi) = sv_newmortal(); XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_address_new_vlan_name) { { idmef_address_t *arg1 = (idmef_address_t *) 0 ; prelude_string_t **arg2 = (prelude_string_t **) 0 ; void *argp2 = 0 ; int res2 = 0 ; int argvi = 0; int result; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: idmef_address_new_vlan_name(ptr,ret);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_address, 0) ) { croak("Expected type idmef_address_t * for argument 1."); return; } } res2 = SWIG_ConvertPtr(ST(1), &argp2,SWIGTYPE_p_p_prelude_string_t, 0 | 0 ); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "idmef_address_new_vlan_name" "', argument " "2"" of type '" "prelude_string_t **""'"); } arg2 = (prelude_string_t **)(argp2); result = (int)idmef_address_new_vlan_name(arg1,arg2); { ST(argvi) = newSViv(result); argvi++; } XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_address_unset_vlan_num) { { idmef_address_t *arg1 = (idmef_address_t *) 0 ; int argvi = 0; dXSARGS; if ((items < 1) || (items > 1)) { SWIG_croak("Usage: idmef_address_unset_vlan_num(ptr);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_address, 0) ) { croak("Expected type idmef_address_t * for argument 1."); return; } } idmef_address_unset_vlan_num(arg1); ST(argvi) = sv_newmortal(); XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_address_get_vlan_num) { { idmef_address_t *arg1 = (idmef_address_t *) 0 ; int argvi = 0; int32_t *result = 0 ; dXSARGS; if ((items < 1) || (items > 1)) { SWIG_croak("Usage: idmef_address_get_vlan_num(ptr);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_address, 0) ) { croak("Expected type idmef_address_t * for argument 1."); return; } } result = (int32_t *)idmef_address_get_vlan_num(arg1); { if ( result != NULL ) { ST(argvi) = newSViv(*result); } else { SvREFCNT_inc (& PL_sv_undef); ST(argvi) = &PL_sv_undef; } } XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_address_set_vlan_num) { { idmef_address_t *arg1 = (idmef_address_t *) 0 ; int32_t arg2 ; int val2 ; int ecode2 = 0 ; int argvi = 0; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: idmef_address_set_vlan_num(ptr,vlan_num);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_address, 0) ) { croak("Expected type idmef_address_t * for argument 1."); return; } } ecode2 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(1), &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "idmef_address_set_vlan_num" "', argument " "2"" of type '" "int32_t""'"); } arg2 = (int32_t)(val2); idmef_address_set_vlan_num(arg1,arg2); ST(argvi) = sv_newmortal(); XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_address_new_vlan_num) { { idmef_address_t *arg1 = (idmef_address_t *) 0 ; int32_t **arg2 = (int32_t **) 0 ; void *argp2 = 0 ; int res2 = 0 ; int argvi = 0; int result; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: idmef_address_new_vlan_num(ptr,ret);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_address, 0) ) { croak("Expected type idmef_address_t * for argument 1."); return; } } res2 = SWIG_ConvertPtr(ST(1), &argp2,SWIGTYPE_p_p_int, 0 | 0 ); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "idmef_address_new_vlan_num" "', argument " "2"" of type '" "int32_t **""'"); } arg2 = (int32_t **)(argp2); result = (int)idmef_address_new_vlan_num(arg1,arg2); { ST(argvi) = newSViv(result); argvi++; } XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_address_get_address) { { idmef_address_t *arg1 = (idmef_address_t *) 0 ; int argvi = 0; prelude_string_t *result = 0 ; dXSARGS; if ((items < 1) || (items > 1)) { SWIG_croak("Usage: idmef_address_get_address(ptr);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_address, 0) ) { croak("Expected type idmef_address_t * for argument 1."); return; } } result = (prelude_string_t *)idmef_address_get_address(arg1); { ST(argvi) = swig_perl_string(result); argvi++; } XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_address_set_address) { { idmef_address_t *arg1 = (idmef_address_t *) 0 ; prelude_string_t *arg2 = (prelude_string_t *) 0 ; int argvi = 0; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: idmef_address_set_address(ptr,address);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_address, 0) ) { croak("Expected type idmef_address_t * for argument 1."); return; } } { int ret; char *str; STRLEN len; str = SvPV(ST(1), len); ret = prelude_string_new_dup_fast(&(arg2), str, len); if ( ret < 0 ) { swig_perl_raise_error(ret); return; } } idmef_address_set_address(arg1,arg2); ST(argvi) = sv_newmortal(); XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_address_new_address) { { idmef_address_t *arg1 = (idmef_address_t *) 0 ; prelude_string_t **arg2 = (prelude_string_t **) 0 ; void *argp2 = 0 ; int res2 = 0 ; int argvi = 0; int result; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: idmef_address_new_address(ptr,ret);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_address, 0) ) { croak("Expected type idmef_address_t * for argument 1."); return; } } res2 = SWIG_ConvertPtr(ST(1), &argp2,SWIGTYPE_p_p_prelude_string_t, 0 | 0 ); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "idmef_address_new_address" "', argument " "2"" of type '" "prelude_string_t **""'"); } arg2 = (prelude_string_t **)(argp2); result = (int)idmef_address_new_address(arg1,arg2); { ST(argvi) = newSViv(result); argvi++; } XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_address_get_netmask) { { idmef_address_t *arg1 = (idmef_address_t *) 0 ; int argvi = 0; prelude_string_t *result = 0 ; dXSARGS; if ((items < 1) || (items > 1)) { SWIG_croak("Usage: idmef_address_get_netmask(ptr);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_address, 0) ) { croak("Expected type idmef_address_t * for argument 1."); return; } } result = (prelude_string_t *)idmef_address_get_netmask(arg1); { ST(argvi) = swig_perl_string(result); argvi++; } XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_address_set_netmask) { { idmef_address_t *arg1 = (idmef_address_t *) 0 ; prelude_string_t *arg2 = (prelude_string_t *) 0 ; int argvi = 0; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: idmef_address_set_netmask(ptr,netmask);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_address, 0) ) { croak("Expected type idmef_address_t * for argument 1."); return; } } { int ret; char *str; STRLEN len; str = SvPV(ST(1), len); ret = prelude_string_new_dup_fast(&(arg2), str, len); if ( ret < 0 ) { swig_perl_raise_error(ret); return; } } idmef_address_set_netmask(arg1,arg2); ST(argvi) = sv_newmortal(); XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_address_new_netmask) { { idmef_address_t *arg1 = (idmef_address_t *) 0 ; prelude_string_t **arg2 = (prelude_string_t **) 0 ; void *argp2 = 0 ; int res2 = 0 ; int argvi = 0; int result; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: idmef_address_new_netmask(ptr,ret);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_address, 0) ) { croak("Expected type idmef_address_t * for argument 1."); return; } } res2 = SWIG_ConvertPtr(ST(1), &argp2,SWIGTYPE_p_p_prelude_string_t, 0 | 0 ); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "idmef_address_new_netmask" "', argument " "2"" of type '" "prelude_string_t **""'"); } arg2 = (prelude_string_t **)(argp2); result = (int)idmef_address_new_netmask(arg1,arg2); { ST(argvi) = newSViv(result); argvi++; } XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_process_new) { { idmef_process_t **arg1 = (idmef_process_t **) 0 ; idmef_process_t *tmp1 ; int argvi = 0; SV * _saved[1] ; int result; dXSARGS; if ((items < 1) || (items > 1)) { SWIG_croak("Usage: idmef_process_new(ret);"); } { arg1 = (idmef_process_t **) &tmp1; } _saved[0] = ST(0); result = (int)idmef_process_new(arg1); { ST(argvi) = newSViv(result); argvi++; } { SV *sv; if ( result >= 0 ) { if ( ! SvROK(_saved[0]) ) { croak("Argument 1 is not a reference."); return; } sv = SvRV(_saved[0]); sv_setsv(sv, SWIG_NewPointerObj((void *) * arg1, SWIGTYPE_p_idmef_process, 0)); } } XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_process_copy) { { idmef_process_t *arg1 = (idmef_process_t *) 0 ; idmef_process_t *arg2 = (idmef_process_t *) 0 ; int argvi = 0; int result; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: idmef_process_copy(src,dst);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_process, 0) ) { croak("Expected type idmef_process_t const * for argument 1."); return; } } { if ( ! SvROK(ST(1)) ) { croak("Argument 2 is null."); return; } if ( SWIG_ConvertPtr(ST(1), (void **)&arg2, SWIGTYPE_p_idmef_process, 0) ) { croak("Expected type idmef_process_t * for argument 2."); return; } } result = (int)idmef_process_copy((struct idmef_process const *)arg1,arg2); { ST(argvi) = newSViv(result); argvi++; } XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_process_clone) { { idmef_process_t *arg1 = (idmef_process_t *) 0 ; idmef_process_t **arg2 = (idmef_process_t **) 0 ; idmef_process_t *tmp2 ; int argvi = 0; SV * _saved[1] ; int result; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: idmef_process_clone(src,dst);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_process, 0) ) { croak("Expected type idmef_process_t * for argument 1."); return; } } { arg2 = (idmef_process_t **) &tmp2; } _saved[0] = ST(1); result = (int)idmef_process_clone(arg1,arg2); { ST(argvi) = newSViv(result); argvi++; } { SV *sv; if ( result >= 0 ) { if ( ! SvROK(_saved[0]) ) { croak("Argument 2 is not a reference."); return; } sv = SvRV(_saved[0]); sv_setsv(sv, SWIG_NewPointerObj((void *) * arg2, SWIGTYPE_p_idmef_process, 0)); } } XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_process_compare) { { idmef_process_t *arg1 = (idmef_process_t *) 0 ; idmef_process_t *arg2 = (idmef_process_t *) 0 ; int argvi = 0; int result; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: idmef_process_compare(obj1,obj2);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_process, 0) ) { croak("Expected type idmef_process_t const * for argument 1."); return; } } { if ( ! SvROK(ST(1)) ) { croak("Argument 2 is null."); return; } if ( SWIG_ConvertPtr(ST(1), (void **)&arg2, SWIGTYPE_p_idmef_process, 0) ) { croak("Expected type idmef_process_t const * for argument 2."); return; } } result = (int)idmef_process_compare((struct idmef_process const *)arg1,(struct idmef_process const *)arg2); { ST(argvi) = newSViv(result); argvi++; } XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_process_ref) { { idmef_process_t *arg1 = (idmef_process_t *) 0 ; int argvi = 0; idmef_process_t *result = 0 ; dXSARGS; if ((items < 1) || (items > 1)) { SWIG_croak("Usage: idmef_process_ref(process);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_process, 0) ) { croak("Expected type idmef_process_t * for argument 1."); return; } } result = (idmef_process_t *)idmef_process_ref(arg1); ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_idmef_process, 0 | 0); argvi++ ; XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_process_destroy) { { idmef_process_t *arg1 = (idmef_process_t *) 0 ; int argvi = 0; dXSARGS; if ((items < 1) || (items > 1)) { SWIG_croak("Usage: idmef_process_destroy(ptr);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_process, 0) ) { croak("Expected type idmef_process_t * for argument 1."); return; } } idmef_process_destroy(arg1); ST(argvi) = sv_newmortal(); XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_process_get_ident) { { idmef_process_t *arg1 = (idmef_process_t *) 0 ; int argvi = 0; prelude_string_t *result = 0 ; dXSARGS; if ((items < 1) || (items > 1)) { SWIG_croak("Usage: idmef_process_get_ident(ptr);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_process, 0) ) { croak("Expected type idmef_process_t * for argument 1."); return; } } result = (prelude_string_t *)idmef_process_get_ident(arg1); { ST(argvi) = swig_perl_string(result); argvi++; } XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_process_set_ident) { { idmef_process_t *arg1 = (idmef_process_t *) 0 ; prelude_string_t *arg2 = (prelude_string_t *) 0 ; int argvi = 0; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: idmef_process_set_ident(ptr,ident);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_process, 0) ) { croak("Expected type idmef_process_t * for argument 1."); return; } } { int ret; char *str; STRLEN len; str = SvPV(ST(1), len); ret = prelude_string_new_dup_fast(&(arg2), str, len); if ( ret < 0 ) { swig_perl_raise_error(ret); return; } } idmef_process_set_ident(arg1,arg2); ST(argvi) = sv_newmortal(); XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_process_new_ident) { { idmef_process_t *arg1 = (idmef_process_t *) 0 ; prelude_string_t **arg2 = (prelude_string_t **) 0 ; void *argp2 = 0 ; int res2 = 0 ; int argvi = 0; int result; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: idmef_process_new_ident(ptr,ret);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_process, 0) ) { croak("Expected type idmef_process_t * for argument 1."); return; } } res2 = SWIG_ConvertPtr(ST(1), &argp2,SWIGTYPE_p_p_prelude_string_t, 0 | 0 ); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "idmef_process_new_ident" "', argument " "2"" of type '" "prelude_string_t **""'"); } arg2 = (prelude_string_t **)(argp2); result = (int)idmef_process_new_ident(arg1,arg2); { ST(argvi) = newSViv(result); argvi++; } XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_process_get_name) { { idmef_process_t *arg1 = (idmef_process_t *) 0 ; int argvi = 0; prelude_string_t *result = 0 ; dXSARGS; if ((items < 1) || (items > 1)) { SWIG_croak("Usage: idmef_process_get_name(ptr);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_process, 0) ) { croak("Expected type idmef_process_t * for argument 1."); return; } } result = (prelude_string_t *)idmef_process_get_name(arg1); { ST(argvi) = swig_perl_string(result); argvi++; } XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_process_set_name) { { idmef_process_t *arg1 = (idmef_process_t *) 0 ; prelude_string_t *arg2 = (prelude_string_t *) 0 ; int argvi = 0; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: idmef_process_set_name(ptr,name);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_process, 0) ) { croak("Expected type idmef_process_t * for argument 1."); return; } } { int ret; char *str; STRLEN len; str = SvPV(ST(1), len); ret = prelude_string_new_dup_fast(&(arg2), str, len); if ( ret < 0 ) { swig_perl_raise_error(ret); return; } } idmef_process_set_name(arg1,arg2); ST(argvi) = sv_newmortal(); XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_process_new_name) { { idmef_process_t *arg1 = (idmef_process_t *) 0 ; prelude_string_t **arg2 = (prelude_string_t **) 0 ; void *argp2 = 0 ; int res2 = 0 ; int argvi = 0; int result; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: idmef_process_new_name(ptr,ret);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_process, 0) ) { croak("Expected type idmef_process_t * for argument 1."); return; } } res2 = SWIG_ConvertPtr(ST(1), &argp2,SWIGTYPE_p_p_prelude_string_t, 0 | 0 ); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "idmef_process_new_name" "', argument " "2"" of type '" "prelude_string_t **""'"); } arg2 = (prelude_string_t **)(argp2); result = (int)idmef_process_new_name(arg1,arg2); { ST(argvi) = newSViv(result); argvi++; } XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_process_unset_pid) { { idmef_process_t *arg1 = (idmef_process_t *) 0 ; int argvi = 0; dXSARGS; if ((items < 1) || (items > 1)) { SWIG_croak("Usage: idmef_process_unset_pid(ptr);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_process, 0) ) { croak("Expected type idmef_process_t * for argument 1."); return; } } idmef_process_unset_pid(arg1); ST(argvi) = sv_newmortal(); XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_process_get_pid) { { idmef_process_t *arg1 = (idmef_process_t *) 0 ; int argvi = 0; uint32_t *result = 0 ; dXSARGS; if ((items < 1) || (items > 1)) { SWIG_croak("Usage: idmef_process_get_pid(ptr);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_process, 0) ) { croak("Expected type idmef_process_t * for argument 1."); return; } } result = (uint32_t *)idmef_process_get_pid(arg1); { if ( result != NULL ) { ST(argvi) = newSVuv(*result); } else { SvREFCNT_inc (& PL_sv_undef); ST(argvi) = &PL_sv_undef; } } XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_process_set_pid) { { idmef_process_t *arg1 = (idmef_process_t *) 0 ; uint32_t arg2 ; unsigned int val2 ; int ecode2 = 0 ; int argvi = 0; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: idmef_process_set_pid(ptr,pid);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_process, 0) ) { croak("Expected type idmef_process_t * for argument 1."); return; } } ecode2 = SWIG_AsVal_unsigned_SS_int SWIG_PERL_CALL_ARGS_2(ST(1), &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "idmef_process_set_pid" "', argument " "2"" of type '" "uint32_t""'"); } arg2 = (uint32_t)(val2); idmef_process_set_pid(arg1,arg2); ST(argvi) = sv_newmortal(); XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_process_new_pid) { { idmef_process_t *arg1 = (idmef_process_t *) 0 ; uint32_t **arg2 = (uint32_t **) 0 ; void *argp2 = 0 ; int res2 = 0 ; int argvi = 0; int result; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: idmef_process_new_pid(ptr,ret);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_process, 0) ) { croak("Expected type idmef_process_t * for argument 1."); return; } } res2 = SWIG_ConvertPtr(ST(1), &argp2,SWIGTYPE_p_p_unsigned_int, 0 | 0 ); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "idmef_process_new_pid" "', argument " "2"" of type '" "uint32_t **""'"); } arg2 = (uint32_t **)(argp2); result = (int)idmef_process_new_pid(arg1,arg2); { ST(argvi) = newSViv(result); argvi++; } XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_process_get_path) { { idmef_process_t *arg1 = (idmef_process_t *) 0 ; int argvi = 0; prelude_string_t *result = 0 ; dXSARGS; if ((items < 1) || (items > 1)) { SWIG_croak("Usage: idmef_process_get_path(ptr);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_process, 0) ) { croak("Expected type idmef_process_t * for argument 1."); return; } } result = (prelude_string_t *)idmef_process_get_path(arg1); { ST(argvi) = swig_perl_string(result); argvi++; } XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_process_set_path) { { idmef_process_t *arg1 = (idmef_process_t *) 0 ; prelude_string_t *arg2 = (prelude_string_t *) 0 ; int argvi = 0; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: idmef_process_set_path(ptr,path);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_process, 0) ) { croak("Expected type idmef_process_t * for argument 1."); return; } } { int ret; char *str; STRLEN len; str = SvPV(ST(1), len); ret = prelude_string_new_dup_fast(&(arg2), str, len); if ( ret < 0 ) { swig_perl_raise_error(ret); return; } } idmef_process_set_path(arg1,arg2); ST(argvi) = sv_newmortal(); XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_process_new_path) { { idmef_process_t *arg1 = (idmef_process_t *) 0 ; prelude_string_t **arg2 = (prelude_string_t **) 0 ; void *argp2 = 0 ; int res2 = 0 ; int argvi = 0; int result; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: idmef_process_new_path(ptr,ret);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_process, 0) ) { croak("Expected type idmef_process_t * for argument 1."); return; } } res2 = SWIG_ConvertPtr(ST(1), &argp2,SWIGTYPE_p_p_prelude_string_t, 0 | 0 ); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "idmef_process_new_path" "', argument " "2"" of type '" "prelude_string_t **""'"); } arg2 = (prelude_string_t **)(argp2); result = (int)idmef_process_new_path(arg1,arg2); { ST(argvi) = newSViv(result); argvi++; } XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_process_get_next_arg) { { idmef_process_t *arg1 = (idmef_process_t *) 0 ; prelude_string_t *arg2 = (prelude_string_t *) 0 ; int argvi = 0; prelude_string_t *result = 0 ; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: idmef_process_get_next_arg(process,prelude_string_cur);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_process, 0) ) { croak("Expected type idmef_process_t * for argument 1."); return; } } { if ( ! SvOK(ST(1)) ) { arg2 = NULL; } else { if ( SWIG_ConvertPtr(ST(1), (void **)&arg2, SWIGTYPE_p_prelude_string_t, 0) ) { croak("Expected type prelude_string_t * for argument 2."); return; } } } result = (prelude_string_t *)idmef_process_get_next_arg(arg1,arg2); { ST(argvi) = swig_perl_string(result); argvi++; } XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_process_set_arg) { { idmef_process_t *arg1 = (idmef_process_t *) 0 ; prelude_string_t *arg2 = (prelude_string_t *) 0 ; int arg3 ; int val3 ; int ecode3 = 0 ; int argvi = 0; dXSARGS; if ((items < 3) || (items > 3)) { SWIG_croak("Usage: idmef_process_set_arg(ptr,object,pos);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_process, 0) ) { croak("Expected type idmef_process_t * for argument 1."); return; } } { int ret; char *str; STRLEN len; str = SvPV(ST(1), len); ret = prelude_string_new_dup_fast(&(arg2), str, len); if ( ret < 0 ) { swig_perl_raise_error(ret); return; } } ecode3 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(2), &val3); if (!SWIG_IsOK(ecode3)) { SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "idmef_process_set_arg" "', argument " "3"" of type '" "int""'"); } arg3 = (int)(val3); idmef_process_set_arg(arg1,arg2,arg3); ST(argvi) = sv_newmortal(); XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_process_new_arg) { { idmef_process_t *arg1 = (idmef_process_t *) 0 ; prelude_string_t **arg2 = (prelude_string_t **) 0 ; int arg3 ; void *argp2 = 0 ; int res2 = 0 ; int val3 ; int ecode3 = 0 ; int argvi = 0; int result; dXSARGS; if ((items < 3) || (items > 3)) { SWIG_croak("Usage: idmef_process_new_arg(ptr,ret,pos);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_process, 0) ) { croak("Expected type idmef_process_t * for argument 1."); return; } } res2 = SWIG_ConvertPtr(ST(1), &argp2,SWIGTYPE_p_p_prelude_string_t, 0 | 0 ); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "idmef_process_new_arg" "', argument " "2"" of type '" "prelude_string_t **""'"); } arg2 = (prelude_string_t **)(argp2); ecode3 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(2), &val3); if (!SWIG_IsOK(ecode3)) { SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "idmef_process_new_arg" "', argument " "3"" of type '" "int""'"); } arg3 = (int)(val3); result = (int)idmef_process_new_arg(arg1,arg2,arg3); { ST(argvi) = newSViv(result); argvi++; } XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_process_get_next_env) { { idmef_process_t *arg1 = (idmef_process_t *) 0 ; prelude_string_t *arg2 = (prelude_string_t *) 0 ; int argvi = 0; prelude_string_t *result = 0 ; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: idmef_process_get_next_env(process,prelude_string_cur);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_process, 0) ) { croak("Expected type idmef_process_t * for argument 1."); return; } } { if ( ! SvOK(ST(1)) ) { arg2 = NULL; } else { if ( SWIG_ConvertPtr(ST(1), (void **)&arg2, SWIGTYPE_p_prelude_string_t, 0) ) { croak("Expected type prelude_string_t * for argument 2."); return; } } } result = (prelude_string_t *)idmef_process_get_next_env(arg1,arg2); { ST(argvi) = swig_perl_string(result); argvi++; } XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_process_set_env) { { idmef_process_t *arg1 = (idmef_process_t *) 0 ; prelude_string_t *arg2 = (prelude_string_t *) 0 ; int arg3 ; int val3 ; int ecode3 = 0 ; int argvi = 0; dXSARGS; if ((items < 3) || (items > 3)) { SWIG_croak("Usage: idmef_process_set_env(ptr,object,pos);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_process, 0) ) { croak("Expected type idmef_process_t * for argument 1."); return; } } { int ret; char *str; STRLEN len; str = SvPV(ST(1), len); ret = prelude_string_new_dup_fast(&(arg2), str, len); if ( ret < 0 ) { swig_perl_raise_error(ret); return; } } ecode3 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(2), &val3); if (!SWIG_IsOK(ecode3)) { SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "idmef_process_set_env" "', argument " "3"" of type '" "int""'"); } arg3 = (int)(val3); idmef_process_set_env(arg1,arg2,arg3); ST(argvi) = sv_newmortal(); XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_process_new_env) { { idmef_process_t *arg1 = (idmef_process_t *) 0 ; prelude_string_t **arg2 = (prelude_string_t **) 0 ; int arg3 ; void *argp2 = 0 ; int res2 = 0 ; int val3 ; int ecode3 = 0 ; int argvi = 0; int result; dXSARGS; if ((items < 3) || (items > 3)) { SWIG_croak("Usage: idmef_process_new_env(ptr,ret,pos);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_process, 0) ) { croak("Expected type idmef_process_t * for argument 1."); return; } } res2 = SWIG_ConvertPtr(ST(1), &argp2,SWIGTYPE_p_p_prelude_string_t, 0 | 0 ); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "idmef_process_new_env" "', argument " "2"" of type '" "prelude_string_t **""'"); } arg2 = (prelude_string_t **)(argp2); ecode3 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(2), &val3); if (!SWIG_IsOK(ecode3)) { SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "idmef_process_new_env" "', argument " "3"" of type '" "int""'"); } arg3 = (int)(val3); result = (int)idmef_process_new_env(arg1,arg2,arg3); { ST(argvi) = newSViv(result); argvi++; } XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_web_service_new) { { idmef_web_service_t **arg1 = (idmef_web_service_t **) 0 ; idmef_web_service_t *tmp1 ; int argvi = 0; SV * _saved[1] ; int result; dXSARGS; if ((items < 1) || (items > 1)) { SWIG_croak("Usage: idmef_web_service_new(ret);"); } { arg1 = (idmef_web_service_t **) &tmp1; } _saved[0] = ST(0); result = (int)idmef_web_service_new(arg1); { ST(argvi) = newSViv(result); argvi++; } { SV *sv; if ( result >= 0 ) { if ( ! SvROK(_saved[0]) ) { croak("Argument 1 is not a reference."); return; } sv = SvRV(_saved[0]); sv_setsv(sv, SWIG_NewPointerObj((void *) * arg1, SWIGTYPE_p_idmef_web_service, 0)); } } XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_web_service_copy) { { idmef_web_service_t *arg1 = (idmef_web_service_t *) 0 ; idmef_web_service_t *arg2 = (idmef_web_service_t *) 0 ; int argvi = 0; int result; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: idmef_web_service_copy(src,dst);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_web_service, 0) ) { croak("Expected type idmef_web_service_t const * for argument 1."); return; } } { if ( ! SvROK(ST(1)) ) { croak("Argument 2 is null."); return; } if ( SWIG_ConvertPtr(ST(1), (void **)&arg2, SWIGTYPE_p_idmef_web_service, 0) ) { croak("Expected type idmef_web_service_t * for argument 2."); return; } } result = (int)idmef_web_service_copy((struct idmef_web_service const *)arg1,arg2); { ST(argvi) = newSViv(result); argvi++; } XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_web_service_clone) { { idmef_web_service_t *arg1 = (idmef_web_service_t *) 0 ; idmef_web_service_t **arg2 = (idmef_web_service_t **) 0 ; idmef_web_service_t *tmp2 ; int argvi = 0; SV * _saved[1] ; int result; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: idmef_web_service_clone(src,dst);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_web_service, 0) ) { croak("Expected type idmef_web_service_t * for argument 1."); return; } } { arg2 = (idmef_web_service_t **) &tmp2; } _saved[0] = ST(1); result = (int)idmef_web_service_clone(arg1,arg2); { ST(argvi) = newSViv(result); argvi++; } { SV *sv; if ( result >= 0 ) { if ( ! SvROK(_saved[0]) ) { croak("Argument 2 is not a reference."); return; } sv = SvRV(_saved[0]); sv_setsv(sv, SWIG_NewPointerObj((void *) * arg2, SWIGTYPE_p_idmef_web_service, 0)); } } XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_web_service_compare) { { idmef_web_service_t *arg1 = (idmef_web_service_t *) 0 ; idmef_web_service_t *arg2 = (idmef_web_service_t *) 0 ; int argvi = 0; int result; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: idmef_web_service_compare(obj1,obj2);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_web_service, 0) ) { croak("Expected type idmef_web_service_t const * for argument 1."); return; } } { if ( ! SvROK(ST(1)) ) { croak("Argument 2 is null."); return; } if ( SWIG_ConvertPtr(ST(1), (void **)&arg2, SWIGTYPE_p_idmef_web_service, 0) ) { croak("Expected type idmef_web_service_t const * for argument 2."); return; } } result = (int)idmef_web_service_compare((struct idmef_web_service const *)arg1,(struct idmef_web_service const *)arg2); { ST(argvi) = newSViv(result); argvi++; } XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_web_service_ref) { { idmef_web_service_t *arg1 = (idmef_web_service_t *) 0 ; int argvi = 0; idmef_web_service_t *result = 0 ; dXSARGS; if ((items < 1) || (items > 1)) { SWIG_croak("Usage: idmef_web_service_ref(web_service);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_web_service, 0) ) { croak("Expected type idmef_web_service_t * for argument 1."); return; } } result = (idmef_web_service_t *)idmef_web_service_ref(arg1); ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_idmef_web_service, 0 | 0); argvi++ ; XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_web_service_destroy) { { idmef_web_service_t *arg1 = (idmef_web_service_t *) 0 ; int argvi = 0; dXSARGS; if ((items < 1) || (items > 1)) { SWIG_croak("Usage: idmef_web_service_destroy(ptr);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_web_service, 0) ) { croak("Expected type idmef_web_service_t * for argument 1."); return; } } idmef_web_service_destroy(arg1); ST(argvi) = sv_newmortal(); XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_web_service_get_url) { { idmef_web_service_t *arg1 = (idmef_web_service_t *) 0 ; int argvi = 0; prelude_string_t *result = 0 ; dXSARGS; if ((items < 1) || (items > 1)) { SWIG_croak("Usage: idmef_web_service_get_url(ptr);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_web_service, 0) ) { croak("Expected type idmef_web_service_t * for argument 1."); return; } } result = (prelude_string_t *)idmef_web_service_get_url(arg1); { ST(argvi) = swig_perl_string(result); argvi++; } XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_web_service_set_url) { { idmef_web_service_t *arg1 = (idmef_web_service_t *) 0 ; prelude_string_t *arg2 = (prelude_string_t *) 0 ; int argvi = 0; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: idmef_web_service_set_url(ptr,url);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_web_service, 0) ) { croak("Expected type idmef_web_service_t * for argument 1."); return; } } { int ret; char *str; STRLEN len; str = SvPV(ST(1), len); ret = prelude_string_new_dup_fast(&(arg2), str, len); if ( ret < 0 ) { swig_perl_raise_error(ret); return; } } idmef_web_service_set_url(arg1,arg2); ST(argvi) = sv_newmortal(); XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_web_service_new_url) { { idmef_web_service_t *arg1 = (idmef_web_service_t *) 0 ; prelude_string_t **arg2 = (prelude_string_t **) 0 ; void *argp2 = 0 ; int res2 = 0 ; int argvi = 0; int result; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: idmef_web_service_new_url(ptr,ret);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_web_service, 0) ) { croak("Expected type idmef_web_service_t * for argument 1."); return; } } res2 = SWIG_ConvertPtr(ST(1), &argp2,SWIGTYPE_p_p_prelude_string_t, 0 | 0 ); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "idmef_web_service_new_url" "', argument " "2"" of type '" "prelude_string_t **""'"); } arg2 = (prelude_string_t **)(argp2); result = (int)idmef_web_service_new_url(arg1,arg2); { ST(argvi) = newSViv(result); argvi++; } XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_web_service_get_cgi) { { idmef_web_service_t *arg1 = (idmef_web_service_t *) 0 ; int argvi = 0; prelude_string_t *result = 0 ; dXSARGS; if ((items < 1) || (items > 1)) { SWIG_croak("Usage: idmef_web_service_get_cgi(ptr);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_web_service, 0) ) { croak("Expected type idmef_web_service_t * for argument 1."); return; } } result = (prelude_string_t *)idmef_web_service_get_cgi(arg1); { ST(argvi) = swig_perl_string(result); argvi++; } XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_web_service_set_cgi) { { idmef_web_service_t *arg1 = (idmef_web_service_t *) 0 ; prelude_string_t *arg2 = (prelude_string_t *) 0 ; int argvi = 0; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: idmef_web_service_set_cgi(ptr,cgi);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_web_service, 0) ) { croak("Expected type idmef_web_service_t * for argument 1."); return; } } { int ret; char *str; STRLEN len; str = SvPV(ST(1), len); ret = prelude_string_new_dup_fast(&(arg2), str, len); if ( ret < 0 ) { swig_perl_raise_error(ret); return; } } idmef_web_service_set_cgi(arg1,arg2); ST(argvi) = sv_newmortal(); XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_web_service_new_cgi) { { idmef_web_service_t *arg1 = (idmef_web_service_t *) 0 ; prelude_string_t **arg2 = (prelude_string_t **) 0 ; void *argp2 = 0 ; int res2 = 0 ; int argvi = 0; int result; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: idmef_web_service_new_cgi(ptr,ret);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_web_service, 0) ) { croak("Expected type idmef_web_service_t * for argument 1."); return; } } res2 = SWIG_ConvertPtr(ST(1), &argp2,SWIGTYPE_p_p_prelude_string_t, 0 | 0 ); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "idmef_web_service_new_cgi" "', argument " "2"" of type '" "prelude_string_t **""'"); } arg2 = (prelude_string_t **)(argp2); result = (int)idmef_web_service_new_cgi(arg1,arg2); { ST(argvi) = newSViv(result); argvi++; } XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_web_service_get_http_method) { { idmef_web_service_t *arg1 = (idmef_web_service_t *) 0 ; int argvi = 0; prelude_string_t *result = 0 ; dXSARGS; if ((items < 1) || (items > 1)) { SWIG_croak("Usage: idmef_web_service_get_http_method(ptr);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_web_service, 0) ) { croak("Expected type idmef_web_service_t * for argument 1."); return; } } result = (prelude_string_t *)idmef_web_service_get_http_method(arg1); { ST(argvi) = swig_perl_string(result); argvi++; } XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_web_service_set_http_method) { { idmef_web_service_t *arg1 = (idmef_web_service_t *) 0 ; prelude_string_t *arg2 = (prelude_string_t *) 0 ; int argvi = 0; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: idmef_web_service_set_http_method(ptr,http_method);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_web_service, 0) ) { croak("Expected type idmef_web_service_t * for argument 1."); return; } } { int ret; char *str; STRLEN len; str = SvPV(ST(1), len); ret = prelude_string_new_dup_fast(&(arg2), str, len); if ( ret < 0 ) { swig_perl_raise_error(ret); return; } } idmef_web_service_set_http_method(arg1,arg2); ST(argvi) = sv_newmortal(); XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_web_service_new_http_method) { { idmef_web_service_t *arg1 = (idmef_web_service_t *) 0 ; prelude_string_t **arg2 = (prelude_string_t **) 0 ; void *argp2 = 0 ; int res2 = 0 ; int argvi = 0; int result; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: idmef_web_service_new_http_method(ptr,ret);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_web_service, 0) ) { croak("Expected type idmef_web_service_t * for argument 1."); return; } } res2 = SWIG_ConvertPtr(ST(1), &argp2,SWIGTYPE_p_p_prelude_string_t, 0 | 0 ); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "idmef_web_service_new_http_method" "', argument " "2"" of type '" "prelude_string_t **""'"); } arg2 = (prelude_string_t **)(argp2); result = (int)idmef_web_service_new_http_method(arg1,arg2); { ST(argvi) = newSViv(result); argvi++; } XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_web_service_get_next_arg) { { idmef_web_service_t *arg1 = (idmef_web_service_t *) 0 ; prelude_string_t *arg2 = (prelude_string_t *) 0 ; int argvi = 0; prelude_string_t *result = 0 ; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: idmef_web_service_get_next_arg(web_service,prelude_string_cur);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_web_service, 0) ) { croak("Expected type idmef_web_service_t * for argument 1."); return; } } { if ( ! SvOK(ST(1)) ) { arg2 = NULL; } else { if ( SWIG_ConvertPtr(ST(1), (void **)&arg2, SWIGTYPE_p_prelude_string_t, 0) ) { croak("Expected type prelude_string_t * for argument 2."); return; } } } result = (prelude_string_t *)idmef_web_service_get_next_arg(arg1,arg2); { ST(argvi) = swig_perl_string(result); argvi++; } XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_web_service_set_arg) { { idmef_web_service_t *arg1 = (idmef_web_service_t *) 0 ; prelude_string_t *arg2 = (prelude_string_t *) 0 ; int arg3 ; int val3 ; int ecode3 = 0 ; int argvi = 0; dXSARGS; if ((items < 3) || (items > 3)) { SWIG_croak("Usage: idmef_web_service_set_arg(ptr,object,pos);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_web_service, 0) ) { croak("Expected type idmef_web_service_t * for argument 1."); return; } } { int ret; char *str; STRLEN len; str = SvPV(ST(1), len); ret = prelude_string_new_dup_fast(&(arg2), str, len); if ( ret < 0 ) { swig_perl_raise_error(ret); return; } } ecode3 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(2), &val3); if (!SWIG_IsOK(ecode3)) { SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "idmef_web_service_set_arg" "', argument " "3"" of type '" "int""'"); } arg3 = (int)(val3); idmef_web_service_set_arg(arg1,arg2,arg3); ST(argvi) = sv_newmortal(); XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_web_service_new_arg) { { idmef_web_service_t *arg1 = (idmef_web_service_t *) 0 ; prelude_string_t **arg2 = (prelude_string_t **) 0 ; int arg3 ; void *argp2 = 0 ; int res2 = 0 ; int val3 ; int ecode3 = 0 ; int argvi = 0; int result; dXSARGS; if ((items < 3) || (items > 3)) { SWIG_croak("Usage: idmef_web_service_new_arg(ptr,ret,pos);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_web_service, 0) ) { croak("Expected type idmef_web_service_t * for argument 1."); return; } } res2 = SWIG_ConvertPtr(ST(1), &argp2,SWIGTYPE_p_p_prelude_string_t, 0 | 0 ); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "idmef_web_service_new_arg" "', argument " "2"" of type '" "prelude_string_t **""'"); } arg2 = (prelude_string_t **)(argp2); ecode3 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(2), &val3); if (!SWIG_IsOK(ecode3)) { SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "idmef_web_service_new_arg" "', argument " "3"" of type '" "int""'"); } arg3 = (int)(val3); result = (int)idmef_web_service_new_arg(arg1,arg2,arg3); { ST(argvi) = newSViv(result); argvi++; } XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_snmp_service_new) { { idmef_snmp_service_t **arg1 = (idmef_snmp_service_t **) 0 ; idmef_snmp_service_t *tmp1 ; int argvi = 0; SV * _saved[1] ; int result; dXSARGS; if ((items < 1) || (items > 1)) { SWIG_croak("Usage: idmef_snmp_service_new(ret);"); } { arg1 = (idmef_snmp_service_t **) &tmp1; } _saved[0] = ST(0); result = (int)idmef_snmp_service_new(arg1); { ST(argvi) = newSViv(result); argvi++; } { SV *sv; if ( result >= 0 ) { if ( ! SvROK(_saved[0]) ) { croak("Argument 1 is not a reference."); return; } sv = SvRV(_saved[0]); sv_setsv(sv, SWIG_NewPointerObj((void *) * arg1, SWIGTYPE_p_idmef_snmp_service, 0)); } } XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_snmp_service_copy) { { idmef_snmp_service_t *arg1 = (idmef_snmp_service_t *) 0 ; idmef_snmp_service_t *arg2 = (idmef_snmp_service_t *) 0 ; int argvi = 0; int result; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: idmef_snmp_service_copy(src,dst);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_snmp_service, 0) ) { croak("Expected type idmef_snmp_service_t const * for argument 1."); return; } } { if ( ! SvROK(ST(1)) ) { croak("Argument 2 is null."); return; } if ( SWIG_ConvertPtr(ST(1), (void **)&arg2, SWIGTYPE_p_idmef_snmp_service, 0) ) { croak("Expected type idmef_snmp_service_t * for argument 2."); return; } } result = (int)idmef_snmp_service_copy((struct idmef_snmp_service const *)arg1,arg2); { ST(argvi) = newSViv(result); argvi++; } XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_snmp_service_clone) { { idmef_snmp_service_t *arg1 = (idmef_snmp_service_t *) 0 ; idmef_snmp_service_t **arg2 = (idmef_snmp_service_t **) 0 ; idmef_snmp_service_t *tmp2 ; int argvi = 0; SV * _saved[1] ; int result; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: idmef_snmp_service_clone(src,dst);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_snmp_service, 0) ) { croak("Expected type idmef_snmp_service_t * for argument 1."); return; } } { arg2 = (idmef_snmp_service_t **) &tmp2; } _saved[0] = ST(1); result = (int)idmef_snmp_service_clone(arg1,arg2); { ST(argvi) = newSViv(result); argvi++; } { SV *sv; if ( result >= 0 ) { if ( ! SvROK(_saved[0]) ) { croak("Argument 2 is not a reference."); return; } sv = SvRV(_saved[0]); sv_setsv(sv, SWIG_NewPointerObj((void *) * arg2, SWIGTYPE_p_idmef_snmp_service, 0)); } } XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_snmp_service_compare) { { idmef_snmp_service_t *arg1 = (idmef_snmp_service_t *) 0 ; idmef_snmp_service_t *arg2 = (idmef_snmp_service_t *) 0 ; int argvi = 0; int result; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: idmef_snmp_service_compare(obj1,obj2);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_snmp_service, 0) ) { croak("Expected type idmef_snmp_service_t const * for argument 1."); return; } } { if ( ! SvROK(ST(1)) ) { croak("Argument 2 is null."); return; } if ( SWIG_ConvertPtr(ST(1), (void **)&arg2, SWIGTYPE_p_idmef_snmp_service, 0) ) { croak("Expected type idmef_snmp_service_t const * for argument 2."); return; } } result = (int)idmef_snmp_service_compare((struct idmef_snmp_service const *)arg1,(struct idmef_snmp_service const *)arg2); { ST(argvi) = newSViv(result); argvi++; } XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_snmp_service_ref) { { idmef_snmp_service_t *arg1 = (idmef_snmp_service_t *) 0 ; int argvi = 0; idmef_snmp_service_t *result = 0 ; dXSARGS; if ((items < 1) || (items > 1)) { SWIG_croak("Usage: idmef_snmp_service_ref(snmp_service);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_snmp_service, 0) ) { croak("Expected type idmef_snmp_service_t * for argument 1."); return; } } result = (idmef_snmp_service_t *)idmef_snmp_service_ref(arg1); ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_idmef_snmp_service, 0 | 0); argvi++ ; XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_snmp_service_destroy) { { idmef_snmp_service_t *arg1 = (idmef_snmp_service_t *) 0 ; int argvi = 0; dXSARGS; if ((items < 1) || (items > 1)) { SWIG_croak("Usage: idmef_snmp_service_destroy(ptr);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_snmp_service, 0) ) { croak("Expected type idmef_snmp_service_t * for argument 1."); return; } } idmef_snmp_service_destroy(arg1); ST(argvi) = sv_newmortal(); XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_snmp_service_get_oid) { { idmef_snmp_service_t *arg1 = (idmef_snmp_service_t *) 0 ; int argvi = 0; prelude_string_t *result = 0 ; dXSARGS; if ((items < 1) || (items > 1)) { SWIG_croak("Usage: idmef_snmp_service_get_oid(ptr);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_snmp_service, 0) ) { croak("Expected type idmef_snmp_service_t * for argument 1."); return; } } result = (prelude_string_t *)idmef_snmp_service_get_oid(arg1); { ST(argvi) = swig_perl_string(result); argvi++; } XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_snmp_service_set_oid) { { idmef_snmp_service_t *arg1 = (idmef_snmp_service_t *) 0 ; prelude_string_t *arg2 = (prelude_string_t *) 0 ; int argvi = 0; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: idmef_snmp_service_set_oid(ptr,oid);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_snmp_service, 0) ) { croak("Expected type idmef_snmp_service_t * for argument 1."); return; } } { int ret; char *str; STRLEN len; str = SvPV(ST(1), len); ret = prelude_string_new_dup_fast(&(arg2), str, len); if ( ret < 0 ) { swig_perl_raise_error(ret); return; } } idmef_snmp_service_set_oid(arg1,arg2); ST(argvi) = sv_newmortal(); XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_snmp_service_new_oid) { { idmef_snmp_service_t *arg1 = (idmef_snmp_service_t *) 0 ; prelude_string_t **arg2 = (prelude_string_t **) 0 ; void *argp2 = 0 ; int res2 = 0 ; int argvi = 0; int result; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: idmef_snmp_service_new_oid(ptr,ret);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_snmp_service, 0) ) { croak("Expected type idmef_snmp_service_t * for argument 1."); return; } } res2 = SWIG_ConvertPtr(ST(1), &argp2,SWIGTYPE_p_p_prelude_string_t, 0 | 0 ); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "idmef_snmp_service_new_oid" "', argument " "2"" of type '" "prelude_string_t **""'"); } arg2 = (prelude_string_t **)(argp2); result = (int)idmef_snmp_service_new_oid(arg1,arg2); { ST(argvi) = newSViv(result); argvi++; } XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_snmp_service_unset_message_processing_model) { { idmef_snmp_service_t *arg1 = (idmef_snmp_service_t *) 0 ; int argvi = 0; dXSARGS; if ((items < 1) || (items > 1)) { SWIG_croak("Usage: idmef_snmp_service_unset_message_processing_model(ptr);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_snmp_service, 0) ) { croak("Expected type idmef_snmp_service_t * for argument 1."); return; } } idmef_snmp_service_unset_message_processing_model(arg1); ST(argvi) = sv_newmortal(); XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_snmp_service_get_message_processing_model) { { idmef_snmp_service_t *arg1 = (idmef_snmp_service_t *) 0 ; int argvi = 0; uint32_t *result = 0 ; dXSARGS; if ((items < 1) || (items > 1)) { SWIG_croak("Usage: idmef_snmp_service_get_message_processing_model(ptr);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_snmp_service, 0) ) { croak("Expected type idmef_snmp_service_t * for argument 1."); return; } } result = (uint32_t *)idmef_snmp_service_get_message_processing_model(arg1); { if ( result != NULL ) { ST(argvi) = newSVuv(*result); } else { SvREFCNT_inc (& PL_sv_undef); ST(argvi) = &PL_sv_undef; } } XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_snmp_service_set_message_processing_model) { { idmef_snmp_service_t *arg1 = (idmef_snmp_service_t *) 0 ; uint32_t arg2 ; unsigned int val2 ; int ecode2 = 0 ; int argvi = 0; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: idmef_snmp_service_set_message_processing_model(ptr,message_processing_model);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_snmp_service, 0) ) { croak("Expected type idmef_snmp_service_t * for argument 1."); return; } } ecode2 = SWIG_AsVal_unsigned_SS_int SWIG_PERL_CALL_ARGS_2(ST(1), &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "idmef_snmp_service_set_message_processing_model" "', argument " "2"" of type '" "uint32_t""'"); } arg2 = (uint32_t)(val2); idmef_snmp_service_set_message_processing_model(arg1,arg2); ST(argvi) = sv_newmortal(); XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_snmp_service_new_message_processing_model) { { idmef_snmp_service_t *arg1 = (idmef_snmp_service_t *) 0 ; uint32_t **arg2 = (uint32_t **) 0 ; void *argp2 = 0 ; int res2 = 0 ; int argvi = 0; int result; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: idmef_snmp_service_new_message_processing_model(ptr,ret);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_snmp_service, 0) ) { croak("Expected type idmef_snmp_service_t * for argument 1."); return; } } res2 = SWIG_ConvertPtr(ST(1), &argp2,SWIGTYPE_p_p_unsigned_int, 0 | 0 ); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "idmef_snmp_service_new_message_processing_model" "', argument " "2"" of type '" "uint32_t **""'"); } arg2 = (uint32_t **)(argp2); result = (int)idmef_snmp_service_new_message_processing_model(arg1,arg2); { ST(argvi) = newSViv(result); argvi++; } XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_snmp_service_unset_security_model) { { idmef_snmp_service_t *arg1 = (idmef_snmp_service_t *) 0 ; int argvi = 0; dXSARGS; if ((items < 1) || (items > 1)) { SWIG_croak("Usage: idmef_snmp_service_unset_security_model(ptr);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_snmp_service, 0) ) { croak("Expected type idmef_snmp_service_t * for argument 1."); return; } } idmef_snmp_service_unset_security_model(arg1); ST(argvi) = sv_newmortal(); XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_snmp_service_get_security_model) { { idmef_snmp_service_t *arg1 = (idmef_snmp_service_t *) 0 ; int argvi = 0; uint32_t *result = 0 ; dXSARGS; if ((items < 1) || (items > 1)) { SWIG_croak("Usage: idmef_snmp_service_get_security_model(ptr);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_snmp_service, 0) ) { croak("Expected type idmef_snmp_service_t * for argument 1."); return; } } result = (uint32_t *)idmef_snmp_service_get_security_model(arg1); { if ( result != NULL ) { ST(argvi) = newSVuv(*result); } else { SvREFCNT_inc (& PL_sv_undef); ST(argvi) = &PL_sv_undef; } } XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_snmp_service_set_security_model) { { idmef_snmp_service_t *arg1 = (idmef_snmp_service_t *) 0 ; uint32_t arg2 ; unsigned int val2 ; int ecode2 = 0 ; int argvi = 0; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: idmef_snmp_service_set_security_model(ptr,security_model);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_snmp_service, 0) ) { croak("Expected type idmef_snmp_service_t * for argument 1."); return; } } ecode2 = SWIG_AsVal_unsigned_SS_int SWIG_PERL_CALL_ARGS_2(ST(1), &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "idmef_snmp_service_set_security_model" "', argument " "2"" of type '" "uint32_t""'"); } arg2 = (uint32_t)(val2); idmef_snmp_service_set_security_model(arg1,arg2); ST(argvi) = sv_newmortal(); XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_snmp_service_new_security_model) { { idmef_snmp_service_t *arg1 = (idmef_snmp_service_t *) 0 ; uint32_t **arg2 = (uint32_t **) 0 ; void *argp2 = 0 ; int res2 = 0 ; int argvi = 0; int result; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: idmef_snmp_service_new_security_model(ptr,ret);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_snmp_service, 0) ) { croak("Expected type idmef_snmp_service_t * for argument 1."); return; } } res2 = SWIG_ConvertPtr(ST(1), &argp2,SWIGTYPE_p_p_unsigned_int, 0 | 0 ); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "idmef_snmp_service_new_security_model" "', argument " "2"" of type '" "uint32_t **""'"); } arg2 = (uint32_t **)(argp2); result = (int)idmef_snmp_service_new_security_model(arg1,arg2); { ST(argvi) = newSViv(result); argvi++; } XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_snmp_service_get_security_name) { { idmef_snmp_service_t *arg1 = (idmef_snmp_service_t *) 0 ; int argvi = 0; prelude_string_t *result = 0 ; dXSARGS; if ((items < 1) || (items > 1)) { SWIG_croak("Usage: idmef_snmp_service_get_security_name(ptr);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_snmp_service, 0) ) { croak("Expected type idmef_snmp_service_t * for argument 1."); return; } } result = (prelude_string_t *)idmef_snmp_service_get_security_name(arg1); { ST(argvi) = swig_perl_string(result); argvi++; } XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_snmp_service_set_security_name) { { idmef_snmp_service_t *arg1 = (idmef_snmp_service_t *) 0 ; prelude_string_t *arg2 = (prelude_string_t *) 0 ; int argvi = 0; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: idmef_snmp_service_set_security_name(ptr,security_name);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_snmp_service, 0) ) { croak("Expected type idmef_snmp_service_t * for argument 1."); return; } } { int ret; char *str; STRLEN len; str = SvPV(ST(1), len); ret = prelude_string_new_dup_fast(&(arg2), str, len); if ( ret < 0 ) { swig_perl_raise_error(ret); return; } } idmef_snmp_service_set_security_name(arg1,arg2); ST(argvi) = sv_newmortal(); XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_snmp_service_new_security_name) { { idmef_snmp_service_t *arg1 = (idmef_snmp_service_t *) 0 ; prelude_string_t **arg2 = (prelude_string_t **) 0 ; void *argp2 = 0 ; int res2 = 0 ; int argvi = 0; int result; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: idmef_snmp_service_new_security_name(ptr,ret);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_snmp_service, 0) ) { croak("Expected type idmef_snmp_service_t * for argument 1."); return; } } res2 = SWIG_ConvertPtr(ST(1), &argp2,SWIGTYPE_p_p_prelude_string_t, 0 | 0 ); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "idmef_snmp_service_new_security_name" "', argument " "2"" of type '" "prelude_string_t **""'"); } arg2 = (prelude_string_t **)(argp2); result = (int)idmef_snmp_service_new_security_name(arg1,arg2); { ST(argvi) = newSViv(result); argvi++; } XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_snmp_service_unset_security_level) { { idmef_snmp_service_t *arg1 = (idmef_snmp_service_t *) 0 ; int argvi = 0; dXSARGS; if ((items < 1) || (items > 1)) { SWIG_croak("Usage: idmef_snmp_service_unset_security_level(ptr);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_snmp_service, 0) ) { croak("Expected type idmef_snmp_service_t * for argument 1."); return; } } idmef_snmp_service_unset_security_level(arg1); ST(argvi) = sv_newmortal(); XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_snmp_service_get_security_level) { { idmef_snmp_service_t *arg1 = (idmef_snmp_service_t *) 0 ; int argvi = 0; uint32_t *result = 0 ; dXSARGS; if ((items < 1) || (items > 1)) { SWIG_croak("Usage: idmef_snmp_service_get_security_level(ptr);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_snmp_service, 0) ) { croak("Expected type idmef_snmp_service_t * for argument 1."); return; } } result = (uint32_t *)idmef_snmp_service_get_security_level(arg1); { if ( result != NULL ) { ST(argvi) = newSVuv(*result); } else { SvREFCNT_inc (& PL_sv_undef); ST(argvi) = &PL_sv_undef; } } XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_snmp_service_set_security_level) { { idmef_snmp_service_t *arg1 = (idmef_snmp_service_t *) 0 ; uint32_t arg2 ; unsigned int val2 ; int ecode2 = 0 ; int argvi = 0; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: idmef_snmp_service_set_security_level(ptr,security_level);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_snmp_service, 0) ) { croak("Expected type idmef_snmp_service_t * for argument 1."); return; } } ecode2 = SWIG_AsVal_unsigned_SS_int SWIG_PERL_CALL_ARGS_2(ST(1), &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "idmef_snmp_service_set_security_level" "', argument " "2"" of type '" "uint32_t""'"); } arg2 = (uint32_t)(val2); idmef_snmp_service_set_security_level(arg1,arg2); ST(argvi) = sv_newmortal(); XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_snmp_service_new_security_level) { { idmef_snmp_service_t *arg1 = (idmef_snmp_service_t *) 0 ; uint32_t **arg2 = (uint32_t **) 0 ; void *argp2 = 0 ; int res2 = 0 ; int argvi = 0; int result; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: idmef_snmp_service_new_security_level(ptr,ret);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_snmp_service, 0) ) { croak("Expected type idmef_snmp_service_t * for argument 1."); return; } } res2 = SWIG_ConvertPtr(ST(1), &argp2,SWIGTYPE_p_p_unsigned_int, 0 | 0 ); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "idmef_snmp_service_new_security_level" "', argument " "2"" of type '" "uint32_t **""'"); } arg2 = (uint32_t **)(argp2); result = (int)idmef_snmp_service_new_security_level(arg1,arg2); { ST(argvi) = newSViv(result); argvi++; } XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_snmp_service_get_context_name) { { idmef_snmp_service_t *arg1 = (idmef_snmp_service_t *) 0 ; int argvi = 0; prelude_string_t *result = 0 ; dXSARGS; if ((items < 1) || (items > 1)) { SWIG_croak("Usage: idmef_snmp_service_get_context_name(ptr);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_snmp_service, 0) ) { croak("Expected type idmef_snmp_service_t * for argument 1."); return; } } result = (prelude_string_t *)idmef_snmp_service_get_context_name(arg1); { ST(argvi) = swig_perl_string(result); argvi++; } XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_snmp_service_set_context_name) { { idmef_snmp_service_t *arg1 = (idmef_snmp_service_t *) 0 ; prelude_string_t *arg2 = (prelude_string_t *) 0 ; int argvi = 0; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: idmef_snmp_service_set_context_name(ptr,context_name);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_snmp_service, 0) ) { croak("Expected type idmef_snmp_service_t * for argument 1."); return; } } { int ret; char *str; STRLEN len; str = SvPV(ST(1), len); ret = prelude_string_new_dup_fast(&(arg2), str, len); if ( ret < 0 ) { swig_perl_raise_error(ret); return; } } idmef_snmp_service_set_context_name(arg1,arg2); ST(argvi) = sv_newmortal(); XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_snmp_service_new_context_name) { { idmef_snmp_service_t *arg1 = (idmef_snmp_service_t *) 0 ; prelude_string_t **arg2 = (prelude_string_t **) 0 ; void *argp2 = 0 ; int res2 = 0 ; int argvi = 0; int result; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: idmef_snmp_service_new_context_name(ptr,ret);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_snmp_service, 0) ) { croak("Expected type idmef_snmp_service_t * for argument 1."); return; } } res2 = SWIG_ConvertPtr(ST(1), &argp2,SWIGTYPE_p_p_prelude_string_t, 0 | 0 ); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "idmef_snmp_service_new_context_name" "', argument " "2"" of type '" "prelude_string_t **""'"); } arg2 = (prelude_string_t **)(argp2); result = (int)idmef_snmp_service_new_context_name(arg1,arg2); { ST(argvi) = newSViv(result); argvi++; } XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_snmp_service_get_context_engine_id) { { idmef_snmp_service_t *arg1 = (idmef_snmp_service_t *) 0 ; int argvi = 0; prelude_string_t *result = 0 ; dXSARGS; if ((items < 1) || (items > 1)) { SWIG_croak("Usage: idmef_snmp_service_get_context_engine_id(ptr);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_snmp_service, 0) ) { croak("Expected type idmef_snmp_service_t * for argument 1."); return; } } result = (prelude_string_t *)idmef_snmp_service_get_context_engine_id(arg1); { ST(argvi) = swig_perl_string(result); argvi++; } XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_snmp_service_set_context_engine_id) { { idmef_snmp_service_t *arg1 = (idmef_snmp_service_t *) 0 ; prelude_string_t *arg2 = (prelude_string_t *) 0 ; int argvi = 0; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: idmef_snmp_service_set_context_engine_id(ptr,context_engine_id);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_snmp_service, 0) ) { croak("Expected type idmef_snmp_service_t * for argument 1."); return; } } { int ret; char *str; STRLEN len; str = SvPV(ST(1), len); ret = prelude_string_new_dup_fast(&(arg2), str, len); if ( ret < 0 ) { swig_perl_raise_error(ret); return; } } idmef_snmp_service_set_context_engine_id(arg1,arg2); ST(argvi) = sv_newmortal(); XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_snmp_service_new_context_engine_id) { { idmef_snmp_service_t *arg1 = (idmef_snmp_service_t *) 0 ; prelude_string_t **arg2 = (prelude_string_t **) 0 ; void *argp2 = 0 ; int res2 = 0 ; int argvi = 0; int result; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: idmef_snmp_service_new_context_engine_id(ptr,ret);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_snmp_service, 0) ) { croak("Expected type idmef_snmp_service_t * for argument 1."); return; } } res2 = SWIG_ConvertPtr(ST(1), &argp2,SWIGTYPE_p_p_prelude_string_t, 0 | 0 ); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "idmef_snmp_service_new_context_engine_id" "', argument " "2"" of type '" "prelude_string_t **""'"); } arg2 = (prelude_string_t **)(argp2); result = (int)idmef_snmp_service_new_context_engine_id(arg1,arg2); { ST(argvi) = newSViv(result); argvi++; } XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_snmp_service_get_command) { { idmef_snmp_service_t *arg1 = (idmef_snmp_service_t *) 0 ; int argvi = 0; prelude_string_t *result = 0 ; dXSARGS; if ((items < 1) || (items > 1)) { SWIG_croak("Usage: idmef_snmp_service_get_command(ptr);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_snmp_service, 0) ) { croak("Expected type idmef_snmp_service_t * for argument 1."); return; } } result = (prelude_string_t *)idmef_snmp_service_get_command(arg1); { ST(argvi) = swig_perl_string(result); argvi++; } XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_snmp_service_set_command) { { idmef_snmp_service_t *arg1 = (idmef_snmp_service_t *) 0 ; prelude_string_t *arg2 = (prelude_string_t *) 0 ; int argvi = 0; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: idmef_snmp_service_set_command(ptr,command);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_snmp_service, 0) ) { croak("Expected type idmef_snmp_service_t * for argument 1."); return; } } { int ret; char *str; STRLEN len; str = SvPV(ST(1), len); ret = prelude_string_new_dup_fast(&(arg2), str, len); if ( ret < 0 ) { swig_perl_raise_error(ret); return; } } idmef_snmp_service_set_command(arg1,arg2); ST(argvi) = sv_newmortal(); XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_snmp_service_new_command) { { idmef_snmp_service_t *arg1 = (idmef_snmp_service_t *) 0 ; prelude_string_t **arg2 = (prelude_string_t **) 0 ; void *argp2 = 0 ; int res2 = 0 ; int argvi = 0; int result; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: idmef_snmp_service_new_command(ptr,ret);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_snmp_service, 0) ) { croak("Expected type idmef_snmp_service_t * for argument 1."); return; } } res2 = SWIG_ConvertPtr(ST(1), &argp2,SWIGTYPE_p_p_prelude_string_t, 0 | 0 ); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "idmef_snmp_service_new_command" "', argument " "2"" of type '" "prelude_string_t **""'"); } arg2 = (prelude_string_t **)(argp2); result = (int)idmef_snmp_service_new_command(arg1,arg2); { ST(argvi) = newSViv(result); argvi++; } XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_snmp_service_get_community) { { idmef_snmp_service_t *arg1 = (idmef_snmp_service_t *) 0 ; int argvi = 0; prelude_string_t *result = 0 ; dXSARGS; if ((items < 1) || (items > 1)) { SWIG_croak("Usage: idmef_snmp_service_get_community(ptr);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_snmp_service, 0) ) { croak("Expected type idmef_snmp_service_t * for argument 1."); return; } } result = (prelude_string_t *)idmef_snmp_service_get_community(arg1); { ST(argvi) = swig_perl_string(result); argvi++; } XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_snmp_service_set_community) { { idmef_snmp_service_t *arg1 = (idmef_snmp_service_t *) 0 ; prelude_string_t *arg2 = (prelude_string_t *) 0 ; int argvi = 0; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: idmef_snmp_service_set_community(ptr,community);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_snmp_service, 0) ) { croak("Expected type idmef_snmp_service_t * for argument 1."); return; } } { int ret; char *str; STRLEN len; str = SvPV(ST(1), len); ret = prelude_string_new_dup_fast(&(arg2), str, len); if ( ret < 0 ) { swig_perl_raise_error(ret); return; } } idmef_snmp_service_set_community(arg1,arg2); ST(argvi) = sv_newmortal(); XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_snmp_service_new_community) { { idmef_snmp_service_t *arg1 = (idmef_snmp_service_t *) 0 ; prelude_string_t **arg2 = (prelude_string_t **) 0 ; void *argp2 = 0 ; int res2 = 0 ; int argvi = 0; int result; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: idmef_snmp_service_new_community(ptr,ret);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_snmp_service, 0) ) { croak("Expected type idmef_snmp_service_t * for argument 1."); return; } } res2 = SWIG_ConvertPtr(ST(1), &argp2,SWIGTYPE_p_p_prelude_string_t, 0 | 0 ); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "idmef_snmp_service_new_community" "', argument " "2"" of type '" "prelude_string_t **""'"); } arg2 = (prelude_string_t **)(argp2); result = (int)idmef_snmp_service_new_community(arg1,arg2); { ST(argvi) = newSViv(result); argvi++; } XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_service_type_to_numeric) { { char *arg1 = (char *) 0 ; int res1 ; char *buf1 = 0 ; int alloc1 = 0 ; int argvi = 0; idmef_service_type_t result; dXSARGS; if ((items < 1) || (items > 1)) { SWIG_croak("Usage: idmef_service_type_to_numeric(name);"); } res1 = SWIG_AsCharPtrAndSize(ST(0), &buf1, NULL, &alloc1); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "idmef_service_type_to_numeric" "', argument " "1"" of type '" "char const *""'"); } arg1 = (char *)(buf1); result = (idmef_service_type_t)idmef_service_type_to_numeric((char const *)arg1); ST(argvi) = SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(result)); argvi++ ; if (alloc1 == SWIG_NEWOBJ) free((char*)buf1); XSRETURN(argvi); fail: if (alloc1 == SWIG_NEWOBJ) free((char*)buf1); SWIG_croak_null(); } } XS(_wrap_idmef_service_type_to_string) { { idmef_service_type_t arg1 ; int val1 ; int ecode1 = 0 ; int argvi = 0; char *result = 0 ; dXSARGS; if ((items < 1) || (items > 1)) { SWIG_croak("Usage: idmef_service_type_to_string(val);"); } ecode1 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(0), &val1); if (!SWIG_IsOK(ecode1)) { SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "idmef_service_type_to_string" "', argument " "1"" of type '" "idmef_service_type_t""'"); } arg1 = (idmef_service_type_t)(val1); result = (char *)idmef_service_type_to_string(arg1); ST(argvi) = SWIG_FromCharPtr((const char *)result); argvi++ ; XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_service_new) { { idmef_service_t **arg1 = (idmef_service_t **) 0 ; idmef_service_t *tmp1 ; int argvi = 0; SV * _saved[1] ; int result; dXSARGS; if ((items < 1) || (items > 1)) { SWIG_croak("Usage: idmef_service_new(ret);"); } { arg1 = (idmef_service_t **) &tmp1; } _saved[0] = ST(0); result = (int)idmef_service_new(arg1); { ST(argvi) = newSViv(result); argvi++; } { SV *sv; if ( result >= 0 ) { if ( ! SvROK(_saved[0]) ) { croak("Argument 1 is not a reference."); return; } sv = SvRV(_saved[0]); sv_setsv(sv, SWIG_NewPointerObj((void *) * arg1, SWIGTYPE_p_idmef_service, 0)); } } XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_service_copy) { { idmef_service_t *arg1 = (idmef_service_t *) 0 ; idmef_service_t *arg2 = (idmef_service_t *) 0 ; int argvi = 0; int result; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: idmef_service_copy(src,dst);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_service, 0) ) { croak("Expected type idmef_service_t const * for argument 1."); return; } } { if ( ! SvROK(ST(1)) ) { croak("Argument 2 is null."); return; } if ( SWIG_ConvertPtr(ST(1), (void **)&arg2, SWIGTYPE_p_idmef_service, 0) ) { croak("Expected type idmef_service_t * for argument 2."); return; } } result = (int)idmef_service_copy((struct idmef_service const *)arg1,arg2); { ST(argvi) = newSViv(result); argvi++; } XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_service_clone) { { idmef_service_t *arg1 = (idmef_service_t *) 0 ; idmef_service_t **arg2 = (idmef_service_t **) 0 ; idmef_service_t *tmp2 ; int argvi = 0; SV * _saved[1] ; int result; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: idmef_service_clone(src,dst);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_service, 0) ) { croak("Expected type idmef_service_t * for argument 1."); return; } } { arg2 = (idmef_service_t **) &tmp2; } _saved[0] = ST(1); result = (int)idmef_service_clone(arg1,arg2); { ST(argvi) = newSViv(result); argvi++; } { SV *sv; if ( result >= 0 ) { if ( ! SvROK(_saved[0]) ) { croak("Argument 2 is not a reference."); return; } sv = SvRV(_saved[0]); sv_setsv(sv, SWIG_NewPointerObj((void *) * arg2, SWIGTYPE_p_idmef_service, 0)); } } XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_service_compare) { { idmef_service_t *arg1 = (idmef_service_t *) 0 ; idmef_service_t *arg2 = (idmef_service_t *) 0 ; int argvi = 0; int result; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: idmef_service_compare(obj1,obj2);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_service, 0) ) { croak("Expected type idmef_service_t const * for argument 1."); return; } } { if ( ! SvROK(ST(1)) ) { croak("Argument 2 is null."); return; } if ( SWIG_ConvertPtr(ST(1), (void **)&arg2, SWIGTYPE_p_idmef_service, 0) ) { croak("Expected type idmef_service_t const * for argument 2."); return; } } result = (int)idmef_service_compare((struct idmef_service const *)arg1,(struct idmef_service const *)arg2); { ST(argvi) = newSViv(result); argvi++; } XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_service_ref) { { idmef_service_t *arg1 = (idmef_service_t *) 0 ; int argvi = 0; idmef_service_t *result = 0 ; dXSARGS; if ((items < 1) || (items > 1)) { SWIG_croak("Usage: idmef_service_ref(service);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_service, 0) ) { croak("Expected type idmef_service_t * for argument 1."); return; } } result = (idmef_service_t *)idmef_service_ref(arg1); ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_idmef_service, 0 | 0); argvi++ ; XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_service_destroy) { { idmef_service_t *arg1 = (idmef_service_t *) 0 ; int argvi = 0; dXSARGS; if ((items < 1) || (items > 1)) { SWIG_croak("Usage: idmef_service_destroy(ptr);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_service, 0) ) { croak("Expected type idmef_service_t * for argument 1."); return; } } idmef_service_destroy(arg1); ST(argvi) = sv_newmortal(); XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_service_get_ident) { { idmef_service_t *arg1 = (idmef_service_t *) 0 ; int argvi = 0; prelude_string_t *result = 0 ; dXSARGS; if ((items < 1) || (items > 1)) { SWIG_croak("Usage: idmef_service_get_ident(ptr);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_service, 0) ) { croak("Expected type idmef_service_t * for argument 1."); return; } } result = (prelude_string_t *)idmef_service_get_ident(arg1); { ST(argvi) = swig_perl_string(result); argvi++; } XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_service_set_ident) { { idmef_service_t *arg1 = (idmef_service_t *) 0 ; prelude_string_t *arg2 = (prelude_string_t *) 0 ; int argvi = 0; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: idmef_service_set_ident(ptr,ident);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_service, 0) ) { croak("Expected type idmef_service_t * for argument 1."); return; } } { int ret; char *str; STRLEN len; str = SvPV(ST(1), len); ret = prelude_string_new_dup_fast(&(arg2), str, len); if ( ret < 0 ) { swig_perl_raise_error(ret); return; } } idmef_service_set_ident(arg1,arg2); ST(argvi) = sv_newmortal(); XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_service_new_ident) { { idmef_service_t *arg1 = (idmef_service_t *) 0 ; prelude_string_t **arg2 = (prelude_string_t **) 0 ; void *argp2 = 0 ; int res2 = 0 ; int argvi = 0; int result; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: idmef_service_new_ident(ptr,ret);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_service, 0) ) { croak("Expected type idmef_service_t * for argument 1."); return; } } res2 = SWIG_ConvertPtr(ST(1), &argp2,SWIGTYPE_p_p_prelude_string_t, 0 | 0 ); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "idmef_service_new_ident" "', argument " "2"" of type '" "prelude_string_t **""'"); } arg2 = (prelude_string_t **)(argp2); result = (int)idmef_service_new_ident(arg1,arg2); { ST(argvi) = newSViv(result); argvi++; } XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_service_unset_ip_version) { { idmef_service_t *arg1 = (idmef_service_t *) 0 ; int argvi = 0; dXSARGS; if ((items < 1) || (items > 1)) { SWIG_croak("Usage: idmef_service_unset_ip_version(ptr);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_service, 0) ) { croak("Expected type idmef_service_t * for argument 1."); return; } } idmef_service_unset_ip_version(arg1); ST(argvi) = sv_newmortal(); XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_service_get_ip_version) { { idmef_service_t *arg1 = (idmef_service_t *) 0 ; int argvi = 0; uint8_t *result = 0 ; dXSARGS; if ((items < 1) || (items > 1)) { SWIG_croak("Usage: idmef_service_get_ip_version(ptr);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_service, 0) ) { croak("Expected type idmef_service_t * for argument 1."); return; } } result = (uint8_t *)idmef_service_get_ip_version(arg1); { if ( result != NULL ) { ST(argvi) = newSVuv(*result); } else { SvREFCNT_inc (& PL_sv_undef); ST(argvi) = &PL_sv_undef; } } XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_service_set_ip_version) { { idmef_service_t *arg1 = (idmef_service_t *) 0 ; uint8_t arg2 ; unsigned char val2 ; int ecode2 = 0 ; int argvi = 0; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: idmef_service_set_ip_version(ptr,ip_version);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_service, 0) ) { croak("Expected type idmef_service_t * for argument 1."); return; } } ecode2 = SWIG_AsVal_unsigned_SS_char SWIG_PERL_CALL_ARGS_2(ST(1), &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "idmef_service_set_ip_version" "', argument " "2"" of type '" "uint8_t""'"); } arg2 = (uint8_t)(val2); idmef_service_set_ip_version(arg1,arg2); ST(argvi) = sv_newmortal(); XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_service_new_ip_version) { { idmef_service_t *arg1 = (idmef_service_t *) 0 ; uint8_t **arg2 = (uint8_t **) 0 ; void *argp2 = 0 ; int res2 = 0 ; int argvi = 0; int result; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: idmef_service_new_ip_version(ptr,ret);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_service, 0) ) { croak("Expected type idmef_service_t * for argument 1."); return; } } res2 = SWIG_ConvertPtr(ST(1), &argp2,SWIGTYPE_p_p_unsigned_char, 0 | 0 ); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "idmef_service_new_ip_version" "', argument " "2"" of type '" "uint8_t **""'"); } arg2 = (uint8_t **)(argp2); result = (int)idmef_service_new_ip_version(arg1,arg2); { ST(argvi) = newSViv(result); argvi++; } XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_service_unset_iana_protocol_number) { { idmef_service_t *arg1 = (idmef_service_t *) 0 ; int argvi = 0; dXSARGS; if ((items < 1) || (items > 1)) { SWIG_croak("Usage: idmef_service_unset_iana_protocol_number(ptr);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_service, 0) ) { croak("Expected type idmef_service_t * for argument 1."); return; } } idmef_service_unset_iana_protocol_number(arg1); ST(argvi) = sv_newmortal(); XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_service_get_iana_protocol_number) { { idmef_service_t *arg1 = (idmef_service_t *) 0 ; int argvi = 0; uint8_t *result = 0 ; dXSARGS; if ((items < 1) || (items > 1)) { SWIG_croak("Usage: idmef_service_get_iana_protocol_number(ptr);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_service, 0) ) { croak("Expected type idmef_service_t * for argument 1."); return; } } result = (uint8_t *)idmef_service_get_iana_protocol_number(arg1); { if ( result != NULL ) { ST(argvi) = newSVuv(*result); } else { SvREFCNT_inc (& PL_sv_undef); ST(argvi) = &PL_sv_undef; } } XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_service_set_iana_protocol_number) { { idmef_service_t *arg1 = (idmef_service_t *) 0 ; uint8_t arg2 ; unsigned char val2 ; int ecode2 = 0 ; int argvi = 0; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: idmef_service_set_iana_protocol_number(ptr,iana_protocol_number);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_service, 0) ) { croak("Expected type idmef_service_t * for argument 1."); return; } } ecode2 = SWIG_AsVal_unsigned_SS_char SWIG_PERL_CALL_ARGS_2(ST(1), &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "idmef_service_set_iana_protocol_number" "', argument " "2"" of type '" "uint8_t""'"); } arg2 = (uint8_t)(val2); idmef_service_set_iana_protocol_number(arg1,arg2); ST(argvi) = sv_newmortal(); XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_service_new_iana_protocol_number) { { idmef_service_t *arg1 = (idmef_service_t *) 0 ; uint8_t **arg2 = (uint8_t **) 0 ; void *argp2 = 0 ; int res2 = 0 ; int argvi = 0; int result; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: idmef_service_new_iana_protocol_number(ptr,ret);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_service, 0) ) { croak("Expected type idmef_service_t * for argument 1."); return; } } res2 = SWIG_ConvertPtr(ST(1), &argp2,SWIGTYPE_p_p_unsigned_char, 0 | 0 ); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "idmef_service_new_iana_protocol_number" "', argument " "2"" of type '" "uint8_t **""'"); } arg2 = (uint8_t **)(argp2); result = (int)idmef_service_new_iana_protocol_number(arg1,arg2); { ST(argvi) = newSViv(result); argvi++; } XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_service_get_iana_protocol_name) { { idmef_service_t *arg1 = (idmef_service_t *) 0 ; int argvi = 0; prelude_string_t *result = 0 ; dXSARGS; if ((items < 1) || (items > 1)) { SWIG_croak("Usage: idmef_service_get_iana_protocol_name(ptr);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_service, 0) ) { croak("Expected type idmef_service_t * for argument 1."); return; } } result = (prelude_string_t *)idmef_service_get_iana_protocol_name(arg1); { ST(argvi) = swig_perl_string(result); argvi++; } XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_service_set_iana_protocol_name) { { idmef_service_t *arg1 = (idmef_service_t *) 0 ; prelude_string_t *arg2 = (prelude_string_t *) 0 ; int argvi = 0; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: idmef_service_set_iana_protocol_name(ptr,iana_protocol_name);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_service, 0) ) { croak("Expected type idmef_service_t * for argument 1."); return; } } { int ret; char *str; STRLEN len; str = SvPV(ST(1), len); ret = prelude_string_new_dup_fast(&(arg2), str, len); if ( ret < 0 ) { swig_perl_raise_error(ret); return; } } idmef_service_set_iana_protocol_name(arg1,arg2); ST(argvi) = sv_newmortal(); XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_service_new_iana_protocol_name) { { idmef_service_t *arg1 = (idmef_service_t *) 0 ; prelude_string_t **arg2 = (prelude_string_t **) 0 ; void *argp2 = 0 ; int res2 = 0 ; int argvi = 0; int result; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: idmef_service_new_iana_protocol_name(ptr,ret);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_service, 0) ) { croak("Expected type idmef_service_t * for argument 1."); return; } } res2 = SWIG_ConvertPtr(ST(1), &argp2,SWIGTYPE_p_p_prelude_string_t, 0 | 0 ); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "idmef_service_new_iana_protocol_name" "', argument " "2"" of type '" "prelude_string_t **""'"); } arg2 = (prelude_string_t **)(argp2); result = (int)idmef_service_new_iana_protocol_name(arg1,arg2); { ST(argvi) = newSViv(result); argvi++; } XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_service_get_name) { { idmef_service_t *arg1 = (idmef_service_t *) 0 ; int argvi = 0; prelude_string_t *result = 0 ; dXSARGS; if ((items < 1) || (items > 1)) { SWIG_croak("Usage: idmef_service_get_name(ptr);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_service, 0) ) { croak("Expected type idmef_service_t * for argument 1."); return; } } result = (prelude_string_t *)idmef_service_get_name(arg1); { ST(argvi) = swig_perl_string(result); argvi++; } XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_service_set_name) { { idmef_service_t *arg1 = (idmef_service_t *) 0 ; prelude_string_t *arg2 = (prelude_string_t *) 0 ; int argvi = 0; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: idmef_service_set_name(ptr,name);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_service, 0) ) { croak("Expected type idmef_service_t * for argument 1."); return; } } { int ret; char *str; STRLEN len; str = SvPV(ST(1), len); ret = prelude_string_new_dup_fast(&(arg2), str, len); if ( ret < 0 ) { swig_perl_raise_error(ret); return; } } idmef_service_set_name(arg1,arg2); ST(argvi) = sv_newmortal(); XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_service_new_name) { { idmef_service_t *arg1 = (idmef_service_t *) 0 ; prelude_string_t **arg2 = (prelude_string_t **) 0 ; void *argp2 = 0 ; int res2 = 0 ; int argvi = 0; int result; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: idmef_service_new_name(ptr,ret);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_service, 0) ) { croak("Expected type idmef_service_t * for argument 1."); return; } } res2 = SWIG_ConvertPtr(ST(1), &argp2,SWIGTYPE_p_p_prelude_string_t, 0 | 0 ); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "idmef_service_new_name" "', argument " "2"" of type '" "prelude_string_t **""'"); } arg2 = (prelude_string_t **)(argp2); result = (int)idmef_service_new_name(arg1,arg2); { ST(argvi) = newSViv(result); argvi++; } XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_service_unset_port) { { idmef_service_t *arg1 = (idmef_service_t *) 0 ; int argvi = 0; dXSARGS; if ((items < 1) || (items > 1)) { SWIG_croak("Usage: idmef_service_unset_port(ptr);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_service, 0) ) { croak("Expected type idmef_service_t * for argument 1."); return; } } idmef_service_unset_port(arg1); ST(argvi) = sv_newmortal(); XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_service_get_port) { { idmef_service_t *arg1 = (idmef_service_t *) 0 ; int argvi = 0; uint16_t *result = 0 ; dXSARGS; if ((items < 1) || (items > 1)) { SWIG_croak("Usage: idmef_service_get_port(ptr);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_service, 0) ) { croak("Expected type idmef_service_t * for argument 1."); return; } } result = (uint16_t *)idmef_service_get_port(arg1); { if ( result != NULL ) { ST(argvi) = newSVuv(*result); } else { SvREFCNT_inc (& PL_sv_undef); ST(argvi) = &PL_sv_undef; } } XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_service_set_port) { { idmef_service_t *arg1 = (idmef_service_t *) 0 ; uint16_t arg2 ; unsigned short val2 ; int ecode2 = 0 ; int argvi = 0; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: idmef_service_set_port(ptr,port);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_service, 0) ) { croak("Expected type idmef_service_t * for argument 1."); return; } } ecode2 = SWIG_AsVal_unsigned_SS_short SWIG_PERL_CALL_ARGS_2(ST(1), &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "idmef_service_set_port" "', argument " "2"" of type '" "uint16_t""'"); } arg2 = (uint16_t)(val2); idmef_service_set_port(arg1,arg2); ST(argvi) = sv_newmortal(); XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_service_new_port) { { idmef_service_t *arg1 = (idmef_service_t *) 0 ; uint16_t **arg2 = (uint16_t **) 0 ; void *argp2 = 0 ; int res2 = 0 ; int argvi = 0; int result; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: idmef_service_new_port(ptr,ret);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_service, 0) ) { croak("Expected type idmef_service_t * for argument 1."); return; } } res2 = SWIG_ConvertPtr(ST(1), &argp2,SWIGTYPE_p_p_unsigned_short, 0 | 0 ); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "idmef_service_new_port" "', argument " "2"" of type '" "uint16_t **""'"); } arg2 = (uint16_t **)(argp2); result = (int)idmef_service_new_port(arg1,arg2); { ST(argvi) = newSViv(result); argvi++; } XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_service_get_portlist) { { idmef_service_t *arg1 = (idmef_service_t *) 0 ; int argvi = 0; prelude_string_t *result = 0 ; dXSARGS; if ((items < 1) || (items > 1)) { SWIG_croak("Usage: idmef_service_get_portlist(ptr);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_service, 0) ) { croak("Expected type idmef_service_t * for argument 1."); return; } } result = (prelude_string_t *)idmef_service_get_portlist(arg1); { ST(argvi) = swig_perl_string(result); argvi++; } XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_service_set_portlist) { { idmef_service_t *arg1 = (idmef_service_t *) 0 ; prelude_string_t *arg2 = (prelude_string_t *) 0 ; int argvi = 0; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: idmef_service_set_portlist(ptr,portlist);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_service, 0) ) { croak("Expected type idmef_service_t * for argument 1."); return; } } { int ret; char *str; STRLEN len; str = SvPV(ST(1), len); ret = prelude_string_new_dup_fast(&(arg2), str, len); if ( ret < 0 ) { swig_perl_raise_error(ret); return; } } idmef_service_set_portlist(arg1,arg2); ST(argvi) = sv_newmortal(); XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_service_new_portlist) { { idmef_service_t *arg1 = (idmef_service_t *) 0 ; prelude_string_t **arg2 = (prelude_string_t **) 0 ; void *argp2 = 0 ; int res2 = 0 ; int argvi = 0; int result; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: idmef_service_new_portlist(ptr,ret);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_service, 0) ) { croak("Expected type idmef_service_t * for argument 1."); return; } } res2 = SWIG_ConvertPtr(ST(1), &argp2,SWIGTYPE_p_p_prelude_string_t, 0 | 0 ); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "idmef_service_new_portlist" "', argument " "2"" of type '" "prelude_string_t **""'"); } arg2 = (prelude_string_t **)(argp2); result = (int)idmef_service_new_portlist(arg1,arg2); { ST(argvi) = newSViv(result); argvi++; } XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_service_get_protocol) { { idmef_service_t *arg1 = (idmef_service_t *) 0 ; int argvi = 0; prelude_string_t *result = 0 ; dXSARGS; if ((items < 1) || (items > 1)) { SWIG_croak("Usage: idmef_service_get_protocol(ptr);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_service, 0) ) { croak("Expected type idmef_service_t * for argument 1."); return; } } result = (prelude_string_t *)idmef_service_get_protocol(arg1); { ST(argvi) = swig_perl_string(result); argvi++; } XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_service_set_protocol) { { idmef_service_t *arg1 = (idmef_service_t *) 0 ; prelude_string_t *arg2 = (prelude_string_t *) 0 ; int argvi = 0; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: idmef_service_set_protocol(ptr,protocol);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_service, 0) ) { croak("Expected type idmef_service_t * for argument 1."); return; } } { int ret; char *str; STRLEN len; str = SvPV(ST(1), len); ret = prelude_string_new_dup_fast(&(arg2), str, len); if ( ret < 0 ) { swig_perl_raise_error(ret); return; } } idmef_service_set_protocol(arg1,arg2); ST(argvi) = sv_newmortal(); XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_service_new_protocol) { { idmef_service_t *arg1 = (idmef_service_t *) 0 ; prelude_string_t **arg2 = (prelude_string_t **) 0 ; void *argp2 = 0 ; int res2 = 0 ; int argvi = 0; int result; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: idmef_service_new_protocol(ptr,ret);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_service, 0) ) { croak("Expected type idmef_service_t * for argument 1."); return; } } res2 = SWIG_ConvertPtr(ST(1), &argp2,SWIGTYPE_p_p_prelude_string_t, 0 | 0 ); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "idmef_service_new_protocol" "', argument " "2"" of type '" "prelude_string_t **""'"); } arg2 = (prelude_string_t **)(argp2); result = (int)idmef_service_new_protocol(arg1,arg2); { ST(argvi) = newSViv(result); argvi++; } XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_service_get_type) { { idmef_service_t *arg1 = (idmef_service_t *) 0 ; int argvi = 0; idmef_service_type_t result; dXSARGS; if ((items < 1) || (items > 1)) { SWIG_croak("Usage: idmef_service_get_type(ptr);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_service, 0) ) { croak("Expected type idmef_service_t * for argument 1."); return; } } result = (idmef_service_type_t)idmef_service_get_type(arg1); ST(argvi) = SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(result)); argvi++ ; XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_service_get_web_service) { { idmef_service_t *arg1 = (idmef_service_t *) 0 ; int argvi = 0; idmef_web_service_t *result = 0 ; dXSARGS; if ((items < 1) || (items > 1)) { SWIG_croak("Usage: idmef_service_get_web_service(ptr);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_service, 0) ) { croak("Expected type idmef_service_t * for argument 1."); return; } } result = (idmef_web_service_t *)idmef_service_get_web_service(arg1); ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_idmef_web_service, 0 | 0); argvi++ ; XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_service_set_web_service) { { idmef_service_t *arg1 = (idmef_service_t *) 0 ; idmef_web_service_t *arg2 = (idmef_web_service_t *) 0 ; int argvi = 0; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: idmef_service_set_web_service(ptr,web_service);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_service, 0) ) { croak("Expected type idmef_service_t * for argument 1."); return; } } { if ( ! SvROK(ST(1)) ) { croak("Argument 2 is null."); return; } if ( SWIG_ConvertPtr(ST(1), (void **)&arg2, SWIGTYPE_p_idmef_web_service, 0) ) { croak("Expected type idmef_web_service_t * for argument 2."); return; } } idmef_service_set_web_service(arg1,arg2); ST(argvi) = sv_newmortal(); XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_service_new_web_service) { { idmef_service_t *arg1 = (idmef_service_t *) 0 ; idmef_web_service_t **arg2 = (idmef_web_service_t **) 0 ; idmef_web_service_t *tmp2 ; int argvi = 0; SV * _saved[1] ; int result; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: idmef_service_new_web_service(ptr,ret);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_service, 0) ) { croak("Expected type idmef_service_t * for argument 1."); return; } } { arg2 = (idmef_web_service_t **) &tmp2; } _saved[0] = ST(1); result = (int)idmef_service_new_web_service(arg1,arg2); { ST(argvi) = newSViv(result); argvi++; } { SV *sv; if ( result >= 0 ) { if ( ! SvROK(_saved[0]) ) { croak("Argument 2 is not a reference."); return; } sv = SvRV(_saved[0]); sv_setsv(sv, SWIG_NewPointerObj((void *) * arg2, SWIGTYPE_p_idmef_web_service, 0)); } } XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_service_get_snmp_service) { { idmef_service_t *arg1 = (idmef_service_t *) 0 ; int argvi = 0; idmef_snmp_service_t *result = 0 ; dXSARGS; if ((items < 1) || (items > 1)) { SWIG_croak("Usage: idmef_service_get_snmp_service(ptr);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_service, 0) ) { croak("Expected type idmef_service_t * for argument 1."); return; } } result = (idmef_snmp_service_t *)idmef_service_get_snmp_service(arg1); ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_idmef_snmp_service, 0 | 0); argvi++ ; XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_service_set_snmp_service) { { idmef_service_t *arg1 = (idmef_service_t *) 0 ; idmef_snmp_service_t *arg2 = (idmef_snmp_service_t *) 0 ; int argvi = 0; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: idmef_service_set_snmp_service(ptr,snmp_service);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_service, 0) ) { croak("Expected type idmef_service_t * for argument 1."); return; } } { if ( ! SvROK(ST(1)) ) { croak("Argument 2 is null."); return; } if ( SWIG_ConvertPtr(ST(1), (void **)&arg2, SWIGTYPE_p_idmef_snmp_service, 0) ) { croak("Expected type idmef_snmp_service_t * for argument 2."); return; } } idmef_service_set_snmp_service(arg1,arg2); ST(argvi) = sv_newmortal(); XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_service_new_snmp_service) { { idmef_service_t *arg1 = (idmef_service_t *) 0 ; idmef_snmp_service_t **arg2 = (idmef_snmp_service_t **) 0 ; idmef_snmp_service_t *tmp2 ; int argvi = 0; SV * _saved[1] ; int result; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: idmef_service_new_snmp_service(ptr,ret);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_service, 0) ) { croak("Expected type idmef_service_t * for argument 1."); return; } } { arg2 = (idmef_snmp_service_t **) &tmp2; } _saved[0] = ST(1); result = (int)idmef_service_new_snmp_service(arg1,arg2); { ST(argvi) = newSViv(result); argvi++; } { SV *sv; if ( result >= 0 ) { if ( ! SvROK(_saved[0]) ) { croak("Argument 2 is not a reference."); return; } sv = SvRV(_saved[0]); sv_setsv(sv, SWIG_NewPointerObj((void *) * arg2, SWIGTYPE_p_idmef_snmp_service, 0)); } } XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_node_category_to_numeric) { { char *arg1 = (char *) 0 ; int res1 ; char *buf1 = 0 ; int alloc1 = 0 ; int argvi = 0; idmef_node_category_t result; dXSARGS; if ((items < 1) || (items > 1)) { SWIG_croak("Usage: idmef_node_category_to_numeric(name);"); } res1 = SWIG_AsCharPtrAndSize(ST(0), &buf1, NULL, &alloc1); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "idmef_node_category_to_numeric" "', argument " "1"" of type '" "char const *""'"); } arg1 = (char *)(buf1); result = (idmef_node_category_t)idmef_node_category_to_numeric((char const *)arg1); ST(argvi) = SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(result)); argvi++ ; if (alloc1 == SWIG_NEWOBJ) free((char*)buf1); XSRETURN(argvi); fail: if (alloc1 == SWIG_NEWOBJ) free((char*)buf1); SWIG_croak_null(); } } XS(_wrap_idmef_node_category_to_string) { { idmef_node_category_t arg1 ; int val1 ; int ecode1 = 0 ; int argvi = 0; char *result = 0 ; dXSARGS; if ((items < 1) || (items > 1)) { SWIG_croak("Usage: idmef_node_category_to_string(val);"); } ecode1 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(0), &val1); if (!SWIG_IsOK(ecode1)) { SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "idmef_node_category_to_string" "', argument " "1"" of type '" "idmef_node_category_t""'"); } arg1 = (idmef_node_category_t)(val1); result = (char *)idmef_node_category_to_string(arg1); ST(argvi) = SWIG_FromCharPtr((const char *)result); argvi++ ; XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_node_new) { { idmef_node_t **arg1 = (idmef_node_t **) 0 ; idmef_node_t *tmp1 ; int argvi = 0; SV * _saved[1] ; int result; dXSARGS; if ((items < 1) || (items > 1)) { SWIG_croak("Usage: idmef_node_new(ret);"); } { arg1 = (idmef_node_t **) &tmp1; } _saved[0] = ST(0); result = (int)idmef_node_new(arg1); { ST(argvi) = newSViv(result); argvi++; } { SV *sv; if ( result >= 0 ) { if ( ! SvROK(_saved[0]) ) { croak("Argument 1 is not a reference."); return; } sv = SvRV(_saved[0]); sv_setsv(sv, SWIG_NewPointerObj((void *) * arg1, SWIGTYPE_p_idmef_node, 0)); } } XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_node_copy) { { idmef_node_t *arg1 = (idmef_node_t *) 0 ; idmef_node_t *arg2 = (idmef_node_t *) 0 ; int argvi = 0; int result; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: idmef_node_copy(src,dst);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_node, 0) ) { croak("Expected type idmef_node_t const * for argument 1."); return; } } { if ( ! SvROK(ST(1)) ) { croak("Argument 2 is null."); return; } if ( SWIG_ConvertPtr(ST(1), (void **)&arg2, SWIGTYPE_p_idmef_node, 0) ) { croak("Expected type idmef_node_t * for argument 2."); return; } } result = (int)idmef_node_copy((struct idmef_node const *)arg1,arg2); { ST(argvi) = newSViv(result); argvi++; } XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_node_clone) { { idmef_node_t *arg1 = (idmef_node_t *) 0 ; idmef_node_t **arg2 = (idmef_node_t **) 0 ; idmef_node_t *tmp2 ; int argvi = 0; SV * _saved[1] ; int result; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: idmef_node_clone(src,dst);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_node, 0) ) { croak("Expected type idmef_node_t * for argument 1."); return; } } { arg2 = (idmef_node_t **) &tmp2; } _saved[0] = ST(1); result = (int)idmef_node_clone(arg1,arg2); { ST(argvi) = newSViv(result); argvi++; } { SV *sv; if ( result >= 0 ) { if ( ! SvROK(_saved[0]) ) { croak("Argument 2 is not a reference."); return; } sv = SvRV(_saved[0]); sv_setsv(sv, SWIG_NewPointerObj((void *) * arg2, SWIGTYPE_p_idmef_node, 0)); } } XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_node_compare) { { idmef_node_t *arg1 = (idmef_node_t *) 0 ; idmef_node_t *arg2 = (idmef_node_t *) 0 ; int argvi = 0; int result; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: idmef_node_compare(obj1,obj2);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_node, 0) ) { croak("Expected type idmef_node_t const * for argument 1."); return; } } { if ( ! SvROK(ST(1)) ) { croak("Argument 2 is null."); return; } if ( SWIG_ConvertPtr(ST(1), (void **)&arg2, SWIGTYPE_p_idmef_node, 0) ) { croak("Expected type idmef_node_t const * for argument 2."); return; } } result = (int)idmef_node_compare((struct idmef_node const *)arg1,(struct idmef_node const *)arg2); { ST(argvi) = newSViv(result); argvi++; } XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_node_ref) { { idmef_node_t *arg1 = (idmef_node_t *) 0 ; int argvi = 0; idmef_node_t *result = 0 ; dXSARGS; if ((items < 1) || (items > 1)) { SWIG_croak("Usage: idmef_node_ref(node);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_node, 0) ) { croak("Expected type idmef_node_t * for argument 1."); return; } } result = (idmef_node_t *)idmef_node_ref(arg1); ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_idmef_node, 0 | 0); argvi++ ; XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_node_destroy) { { idmef_node_t *arg1 = (idmef_node_t *) 0 ; int argvi = 0; dXSARGS; if ((items < 1) || (items > 1)) { SWIG_croak("Usage: idmef_node_destroy(ptr);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_node, 0) ) { croak("Expected type idmef_node_t * for argument 1."); return; } } idmef_node_destroy(arg1); ST(argvi) = sv_newmortal(); XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_node_get_ident) { { idmef_node_t *arg1 = (idmef_node_t *) 0 ; int argvi = 0; prelude_string_t *result = 0 ; dXSARGS; if ((items < 1) || (items > 1)) { SWIG_croak("Usage: idmef_node_get_ident(ptr);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_node, 0) ) { croak("Expected type idmef_node_t * for argument 1."); return; } } result = (prelude_string_t *)idmef_node_get_ident(arg1); { ST(argvi) = swig_perl_string(result); argvi++; } XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_node_set_ident) { { idmef_node_t *arg1 = (idmef_node_t *) 0 ; prelude_string_t *arg2 = (prelude_string_t *) 0 ; int argvi = 0; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: idmef_node_set_ident(ptr,ident);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_node, 0) ) { croak("Expected type idmef_node_t * for argument 1."); return; } } { int ret; char *str; STRLEN len; str = SvPV(ST(1), len); ret = prelude_string_new_dup_fast(&(arg2), str, len); if ( ret < 0 ) { swig_perl_raise_error(ret); return; } } idmef_node_set_ident(arg1,arg2); ST(argvi) = sv_newmortal(); XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_node_new_ident) { { idmef_node_t *arg1 = (idmef_node_t *) 0 ; prelude_string_t **arg2 = (prelude_string_t **) 0 ; void *argp2 = 0 ; int res2 = 0 ; int argvi = 0; int result; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: idmef_node_new_ident(ptr,ret);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_node, 0) ) { croak("Expected type idmef_node_t * for argument 1."); return; } } res2 = SWIG_ConvertPtr(ST(1), &argp2,SWIGTYPE_p_p_prelude_string_t, 0 | 0 ); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "idmef_node_new_ident" "', argument " "2"" of type '" "prelude_string_t **""'"); } arg2 = (prelude_string_t **)(argp2); result = (int)idmef_node_new_ident(arg1,arg2); { ST(argvi) = newSViv(result); argvi++; } XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_node_get_category) { { idmef_node_t *arg1 = (idmef_node_t *) 0 ; int argvi = 0; idmef_node_category_t result; dXSARGS; if ((items < 1) || (items > 1)) { SWIG_croak("Usage: idmef_node_get_category(ptr);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_node, 0) ) { croak("Expected type idmef_node_t * for argument 1."); return; } } result = (idmef_node_category_t)idmef_node_get_category(arg1); ST(argvi) = SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(result)); argvi++ ; XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_node_set_category) { { idmef_node_t *arg1 = (idmef_node_t *) 0 ; idmef_node_category_t arg2 ; int val2 ; int ecode2 = 0 ; int argvi = 0; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: idmef_node_set_category(ptr,category);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_node, 0) ) { croak("Expected type idmef_node_t * for argument 1."); return; } } ecode2 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(1), &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "idmef_node_set_category" "', argument " "2"" of type '" "idmef_node_category_t""'"); } arg2 = (idmef_node_category_t)(val2); idmef_node_set_category(arg1,arg2); ST(argvi) = sv_newmortal(); XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_node_new_category) { { idmef_node_t *arg1 = (idmef_node_t *) 0 ; idmef_node_category_t **arg2 = (idmef_node_category_t **) 0 ; void *argp2 = 0 ; int res2 = 0 ; int argvi = 0; int result; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: idmef_node_new_category(ptr,ret);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_node, 0) ) { croak("Expected type idmef_node_t * for argument 1."); return; } } res2 = SWIG_ConvertPtr(ST(1), &argp2,SWIGTYPE_p_p_idmef_node_category_t, 0 | 0 ); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "idmef_node_new_category" "', argument " "2"" of type '" "idmef_node_category_t **""'"); } arg2 = (idmef_node_category_t **)(argp2); result = (int)idmef_node_new_category(arg1,arg2); { ST(argvi) = newSViv(result); argvi++; } XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_node_get_location) { { idmef_node_t *arg1 = (idmef_node_t *) 0 ; int argvi = 0; prelude_string_t *result = 0 ; dXSARGS; if ((items < 1) || (items > 1)) { SWIG_croak("Usage: idmef_node_get_location(ptr);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_node, 0) ) { croak("Expected type idmef_node_t * for argument 1."); return; } } result = (prelude_string_t *)idmef_node_get_location(arg1); { ST(argvi) = swig_perl_string(result); argvi++; } XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_node_set_location) { { idmef_node_t *arg1 = (idmef_node_t *) 0 ; prelude_string_t *arg2 = (prelude_string_t *) 0 ; int argvi = 0; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: idmef_node_set_location(ptr,location);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_node, 0) ) { croak("Expected type idmef_node_t * for argument 1."); return; } } { int ret; char *str; STRLEN len; str = SvPV(ST(1), len); ret = prelude_string_new_dup_fast(&(arg2), str, len); if ( ret < 0 ) { swig_perl_raise_error(ret); return; } } idmef_node_set_location(arg1,arg2); ST(argvi) = sv_newmortal(); XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_node_new_location) { { idmef_node_t *arg1 = (idmef_node_t *) 0 ; prelude_string_t **arg2 = (prelude_string_t **) 0 ; void *argp2 = 0 ; int res2 = 0 ; int argvi = 0; int result; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: idmef_node_new_location(ptr,ret);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_node, 0) ) { croak("Expected type idmef_node_t * for argument 1."); return; } } res2 = SWIG_ConvertPtr(ST(1), &argp2,SWIGTYPE_p_p_prelude_string_t, 0 | 0 ); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "idmef_node_new_location" "', argument " "2"" of type '" "prelude_string_t **""'"); } arg2 = (prelude_string_t **)(argp2); result = (int)idmef_node_new_location(arg1,arg2); { ST(argvi) = newSViv(result); argvi++; } XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_node_get_name) { { idmef_node_t *arg1 = (idmef_node_t *) 0 ; int argvi = 0; prelude_string_t *result = 0 ; dXSARGS; if ((items < 1) || (items > 1)) { SWIG_croak("Usage: idmef_node_get_name(ptr);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_node, 0) ) { croak("Expected type idmef_node_t * for argument 1."); return; } } result = (prelude_string_t *)idmef_node_get_name(arg1); { ST(argvi) = swig_perl_string(result); argvi++; } XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_node_set_name) { { idmef_node_t *arg1 = (idmef_node_t *) 0 ; prelude_string_t *arg2 = (prelude_string_t *) 0 ; int argvi = 0; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: idmef_node_set_name(ptr,name);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_node, 0) ) { croak("Expected type idmef_node_t * for argument 1."); return; } } { int ret; char *str; STRLEN len; str = SvPV(ST(1), len); ret = prelude_string_new_dup_fast(&(arg2), str, len); if ( ret < 0 ) { swig_perl_raise_error(ret); return; } } idmef_node_set_name(arg1,arg2); ST(argvi) = sv_newmortal(); XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_node_new_name) { { idmef_node_t *arg1 = (idmef_node_t *) 0 ; prelude_string_t **arg2 = (prelude_string_t **) 0 ; void *argp2 = 0 ; int res2 = 0 ; int argvi = 0; int result; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: idmef_node_new_name(ptr,ret);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_node, 0) ) { croak("Expected type idmef_node_t * for argument 1."); return; } } res2 = SWIG_ConvertPtr(ST(1), &argp2,SWIGTYPE_p_p_prelude_string_t, 0 | 0 ); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "idmef_node_new_name" "', argument " "2"" of type '" "prelude_string_t **""'"); } arg2 = (prelude_string_t **)(argp2); result = (int)idmef_node_new_name(arg1,arg2); { ST(argvi) = newSViv(result); argvi++; } XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_node_get_next_address) { { idmef_node_t *arg1 = (idmef_node_t *) 0 ; idmef_address_t *arg2 = (idmef_address_t *) 0 ; int argvi = 0; idmef_address_t *result = 0 ; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: idmef_node_get_next_address(node,address_cur);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_node, 0) ) { croak("Expected type idmef_node_t * for argument 1."); return; } } { if ( ! SvOK(ST(1)) ) { arg2 = NULL; } else { if ( SWIG_ConvertPtr(ST(1), (void **)&arg2, SWIGTYPE_p_idmef_address, 0) ) { croak("Expected type idmef_address_t * for argument 2."); return; } } } result = (idmef_address_t *)idmef_node_get_next_address(arg1,arg2); ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_idmef_address, 0 | 0); argvi++ ; XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_node_set_address) { { idmef_node_t *arg1 = (idmef_node_t *) 0 ; idmef_address_t *arg2 = (idmef_address_t *) 0 ; int arg3 ; int val3 ; int ecode3 = 0 ; int argvi = 0; dXSARGS; if ((items < 3) || (items > 3)) { SWIG_croak("Usage: idmef_node_set_address(ptr,object,pos);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_node, 0) ) { croak("Expected type idmef_node_t * for argument 1."); return; } } { if ( ! SvROK(ST(1)) ) { croak("Argument 2 is null."); return; } if ( SWIG_ConvertPtr(ST(1), (void **)&arg2, SWIGTYPE_p_idmef_address, 0) ) { croak("Expected type idmef_address_t * for argument 2."); return; } } ecode3 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(2), &val3); if (!SWIG_IsOK(ecode3)) { SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "idmef_node_set_address" "', argument " "3"" of type '" "int""'"); } arg3 = (int)(val3); idmef_node_set_address(arg1,arg2,arg3); ST(argvi) = sv_newmortal(); XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_node_new_address) { { idmef_node_t *arg1 = (idmef_node_t *) 0 ; idmef_address_t **arg2 = (idmef_address_t **) 0 ; int arg3 ; idmef_address_t *tmp2 ; int val3 ; int ecode3 = 0 ; int argvi = 0; SV * _saved[1] ; int result; dXSARGS; if ((items < 3) || (items > 3)) { SWIG_croak("Usage: idmef_node_new_address(ptr,ret,pos);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_node, 0) ) { croak("Expected type idmef_node_t * for argument 1."); return; } } { arg2 = (idmef_address_t **) &tmp2; } ecode3 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(2), &val3); if (!SWIG_IsOK(ecode3)) { SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "idmef_node_new_address" "', argument " "3"" of type '" "int""'"); } arg3 = (int)(val3); _saved[0] = ST(1); result = (int)idmef_node_new_address(arg1,arg2,arg3); { ST(argvi) = newSViv(result); argvi++; } { SV *sv; if ( result >= 0 ) { if ( ! SvROK(_saved[0]) ) { croak("Argument 2 is not a reference."); return; } sv = SvRV(_saved[0]); sv_setsv(sv, SWIG_NewPointerObj((void *) * arg2, SWIGTYPE_p_idmef_address, 0)); } } XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_source_spoofed_to_numeric) { { char *arg1 = (char *) 0 ; int res1 ; char *buf1 = 0 ; int alloc1 = 0 ; int argvi = 0; idmef_source_spoofed_t result; dXSARGS; if ((items < 1) || (items > 1)) { SWIG_croak("Usage: idmef_source_spoofed_to_numeric(name);"); } res1 = SWIG_AsCharPtrAndSize(ST(0), &buf1, NULL, &alloc1); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "idmef_source_spoofed_to_numeric" "', argument " "1"" of type '" "char const *""'"); } arg1 = (char *)(buf1); result = (idmef_source_spoofed_t)idmef_source_spoofed_to_numeric((char const *)arg1); ST(argvi) = SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(result)); argvi++ ; if (alloc1 == SWIG_NEWOBJ) free((char*)buf1); XSRETURN(argvi); fail: if (alloc1 == SWIG_NEWOBJ) free((char*)buf1); SWIG_croak_null(); } } XS(_wrap_idmef_source_spoofed_to_string) { { idmef_source_spoofed_t arg1 ; int val1 ; int ecode1 = 0 ; int argvi = 0; char *result = 0 ; dXSARGS; if ((items < 1) || (items > 1)) { SWIG_croak("Usage: idmef_source_spoofed_to_string(val);"); } ecode1 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(0), &val1); if (!SWIG_IsOK(ecode1)) { SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "idmef_source_spoofed_to_string" "', argument " "1"" of type '" "idmef_source_spoofed_t""'"); } arg1 = (idmef_source_spoofed_t)(val1); result = (char *)idmef_source_spoofed_to_string(arg1); ST(argvi) = SWIG_FromCharPtr((const char *)result); argvi++ ; XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_source_new) { { idmef_source_t **arg1 = (idmef_source_t **) 0 ; idmef_source_t *tmp1 ; int argvi = 0; SV * _saved[1] ; int result; dXSARGS; if ((items < 1) || (items > 1)) { SWIG_croak("Usage: idmef_source_new(ret);"); } { arg1 = (idmef_source_t **) &tmp1; } _saved[0] = ST(0); result = (int)idmef_source_new(arg1); { ST(argvi) = newSViv(result); argvi++; } { SV *sv; if ( result >= 0 ) { if ( ! SvROK(_saved[0]) ) { croak("Argument 1 is not a reference."); return; } sv = SvRV(_saved[0]); sv_setsv(sv, SWIG_NewPointerObj((void *) * arg1, SWIGTYPE_p_idmef_source, 0)); } } XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_source_copy) { { idmef_source_t *arg1 = (idmef_source_t *) 0 ; idmef_source_t *arg2 = (idmef_source_t *) 0 ; int argvi = 0; int result; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: idmef_source_copy(src,dst);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_source, 0) ) { croak("Expected type idmef_source_t const * for argument 1."); return; } } { if ( ! SvROK(ST(1)) ) { croak("Argument 2 is null."); return; } if ( SWIG_ConvertPtr(ST(1), (void **)&arg2, SWIGTYPE_p_idmef_source, 0) ) { croak("Expected type idmef_source_t * for argument 2."); return; } } result = (int)idmef_source_copy((struct idmef_source const *)arg1,arg2); { ST(argvi) = newSViv(result); argvi++; } XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_source_clone) { { idmef_source_t *arg1 = (idmef_source_t *) 0 ; idmef_source_t **arg2 = (idmef_source_t **) 0 ; idmef_source_t *tmp2 ; int argvi = 0; SV * _saved[1] ; int result; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: idmef_source_clone(src,dst);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_source, 0) ) { croak("Expected type idmef_source_t * for argument 1."); return; } } { arg2 = (idmef_source_t **) &tmp2; } _saved[0] = ST(1); result = (int)idmef_source_clone(arg1,arg2); { ST(argvi) = newSViv(result); argvi++; } { SV *sv; if ( result >= 0 ) { if ( ! SvROK(_saved[0]) ) { croak("Argument 2 is not a reference."); return; } sv = SvRV(_saved[0]); sv_setsv(sv, SWIG_NewPointerObj((void *) * arg2, SWIGTYPE_p_idmef_source, 0)); } } XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_source_compare) { { idmef_source_t *arg1 = (idmef_source_t *) 0 ; idmef_source_t *arg2 = (idmef_source_t *) 0 ; int argvi = 0; int result; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: idmef_source_compare(obj1,obj2);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_source, 0) ) { croak("Expected type idmef_source_t const * for argument 1."); return; } } { if ( ! SvROK(ST(1)) ) { croak("Argument 2 is null."); return; } if ( SWIG_ConvertPtr(ST(1), (void **)&arg2, SWIGTYPE_p_idmef_source, 0) ) { croak("Expected type idmef_source_t const * for argument 2."); return; } } result = (int)idmef_source_compare((struct idmef_source const *)arg1,(struct idmef_source const *)arg2); { ST(argvi) = newSViv(result); argvi++; } XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_source_ref) { { idmef_source_t *arg1 = (idmef_source_t *) 0 ; int argvi = 0; idmef_source_t *result = 0 ; dXSARGS; if ((items < 1) || (items > 1)) { SWIG_croak("Usage: idmef_source_ref(source);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_source, 0) ) { croak("Expected type idmef_source_t * for argument 1."); return; } } result = (idmef_source_t *)idmef_source_ref(arg1); ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_idmef_source, 0 | 0); argvi++ ; XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_source_destroy) { { idmef_source_t *arg1 = (idmef_source_t *) 0 ; int argvi = 0; dXSARGS; if ((items < 1) || (items > 1)) { SWIG_croak("Usage: idmef_source_destroy(ptr);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_source, 0) ) { croak("Expected type idmef_source_t * for argument 1."); return; } } idmef_source_destroy(arg1); ST(argvi) = sv_newmortal(); XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_source_get_ident) { { idmef_source_t *arg1 = (idmef_source_t *) 0 ; int argvi = 0; prelude_string_t *result = 0 ; dXSARGS; if ((items < 1) || (items > 1)) { SWIG_croak("Usage: idmef_source_get_ident(ptr);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_source, 0) ) { croak("Expected type idmef_source_t * for argument 1."); return; } } result = (prelude_string_t *)idmef_source_get_ident(arg1); { ST(argvi) = swig_perl_string(result); argvi++; } XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_source_set_ident) { { idmef_source_t *arg1 = (idmef_source_t *) 0 ; prelude_string_t *arg2 = (prelude_string_t *) 0 ; int argvi = 0; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: idmef_source_set_ident(ptr,ident);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_source, 0) ) { croak("Expected type idmef_source_t * for argument 1."); return; } } { int ret; char *str; STRLEN len; str = SvPV(ST(1), len); ret = prelude_string_new_dup_fast(&(arg2), str, len); if ( ret < 0 ) { swig_perl_raise_error(ret); return; } } idmef_source_set_ident(arg1,arg2); ST(argvi) = sv_newmortal(); XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_source_new_ident) { { idmef_source_t *arg1 = (idmef_source_t *) 0 ; prelude_string_t **arg2 = (prelude_string_t **) 0 ; void *argp2 = 0 ; int res2 = 0 ; int argvi = 0; int result; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: idmef_source_new_ident(ptr,ret);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_source, 0) ) { croak("Expected type idmef_source_t * for argument 1."); return; } } res2 = SWIG_ConvertPtr(ST(1), &argp2,SWIGTYPE_p_p_prelude_string_t, 0 | 0 ); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "idmef_source_new_ident" "', argument " "2"" of type '" "prelude_string_t **""'"); } arg2 = (prelude_string_t **)(argp2); result = (int)idmef_source_new_ident(arg1,arg2); { ST(argvi) = newSViv(result); argvi++; } XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_source_get_spoofed) { { idmef_source_t *arg1 = (idmef_source_t *) 0 ; int argvi = 0; idmef_source_spoofed_t result; dXSARGS; if ((items < 1) || (items > 1)) { SWIG_croak("Usage: idmef_source_get_spoofed(ptr);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_source, 0) ) { croak("Expected type idmef_source_t * for argument 1."); return; } } result = (idmef_source_spoofed_t)idmef_source_get_spoofed(arg1); ST(argvi) = SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(result)); argvi++ ; XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_source_set_spoofed) { { idmef_source_t *arg1 = (idmef_source_t *) 0 ; idmef_source_spoofed_t arg2 ; int val2 ; int ecode2 = 0 ; int argvi = 0; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: idmef_source_set_spoofed(ptr,spoofed);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_source, 0) ) { croak("Expected type idmef_source_t * for argument 1."); return; } } ecode2 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(1), &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "idmef_source_set_spoofed" "', argument " "2"" of type '" "idmef_source_spoofed_t""'"); } arg2 = (idmef_source_spoofed_t)(val2); idmef_source_set_spoofed(arg1,arg2); ST(argvi) = sv_newmortal(); XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_source_new_spoofed) { { idmef_source_t *arg1 = (idmef_source_t *) 0 ; idmef_source_spoofed_t **arg2 = (idmef_source_spoofed_t **) 0 ; void *argp2 = 0 ; int res2 = 0 ; int argvi = 0; int result; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: idmef_source_new_spoofed(ptr,ret);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_source, 0) ) { croak("Expected type idmef_source_t * for argument 1."); return; } } res2 = SWIG_ConvertPtr(ST(1), &argp2,SWIGTYPE_p_p_idmef_source_spoofed_t, 0 | 0 ); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "idmef_source_new_spoofed" "', argument " "2"" of type '" "idmef_source_spoofed_t **""'"); } arg2 = (idmef_source_spoofed_t **)(argp2); result = (int)idmef_source_new_spoofed(arg1,arg2); { ST(argvi) = newSViv(result); argvi++; } XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_source_get_interface) { { idmef_source_t *arg1 = (idmef_source_t *) 0 ; int argvi = 0; prelude_string_t *result = 0 ; dXSARGS; if ((items < 1) || (items > 1)) { SWIG_croak("Usage: idmef_source_get_interface(ptr);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_source, 0) ) { croak("Expected type idmef_source_t * for argument 1."); return; } } result = (prelude_string_t *)idmef_source_get_interface(arg1); { ST(argvi) = swig_perl_string(result); argvi++; } XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_source_set_interface) { { idmef_source_t *arg1 = (idmef_source_t *) 0 ; prelude_string_t *arg2 = (prelude_string_t *) 0 ; int argvi = 0; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: idmef_source_set_interface(ptr,interface);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_source, 0) ) { croak("Expected type idmef_source_t * for argument 1."); return; } } { int ret; char *str; STRLEN len; str = SvPV(ST(1), len); ret = prelude_string_new_dup_fast(&(arg2), str, len); if ( ret < 0 ) { swig_perl_raise_error(ret); return; } } idmef_source_set_interface(arg1,arg2); ST(argvi) = sv_newmortal(); XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_source_new_interface) { { idmef_source_t *arg1 = (idmef_source_t *) 0 ; prelude_string_t **arg2 = (prelude_string_t **) 0 ; void *argp2 = 0 ; int res2 = 0 ; int argvi = 0; int result; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: idmef_source_new_interface(ptr,ret);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_source, 0) ) { croak("Expected type idmef_source_t * for argument 1."); return; } } res2 = SWIG_ConvertPtr(ST(1), &argp2,SWIGTYPE_p_p_prelude_string_t, 0 | 0 ); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "idmef_source_new_interface" "', argument " "2"" of type '" "prelude_string_t **""'"); } arg2 = (prelude_string_t **)(argp2); result = (int)idmef_source_new_interface(arg1,arg2); { ST(argvi) = newSViv(result); argvi++; } XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_source_get_node) { { idmef_source_t *arg1 = (idmef_source_t *) 0 ; int argvi = 0; idmef_node_t *result = 0 ; dXSARGS; if ((items < 1) || (items > 1)) { SWIG_croak("Usage: idmef_source_get_node(ptr);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_source, 0) ) { croak("Expected type idmef_source_t * for argument 1."); return; } } result = (idmef_node_t *)idmef_source_get_node(arg1); ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_idmef_node, 0 | 0); argvi++ ; XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_source_set_node) { { idmef_source_t *arg1 = (idmef_source_t *) 0 ; idmef_node_t *arg2 = (idmef_node_t *) 0 ; int argvi = 0; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: idmef_source_set_node(ptr,node);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_source, 0) ) { croak("Expected type idmef_source_t * for argument 1."); return; } } { if ( ! SvROK(ST(1)) ) { croak("Argument 2 is null."); return; } if ( SWIG_ConvertPtr(ST(1), (void **)&arg2, SWIGTYPE_p_idmef_node, 0) ) { croak("Expected type idmef_node_t * for argument 2."); return; } } idmef_source_set_node(arg1,arg2); ST(argvi) = sv_newmortal(); XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_source_new_node) { { idmef_source_t *arg1 = (idmef_source_t *) 0 ; idmef_node_t **arg2 = (idmef_node_t **) 0 ; idmef_node_t *tmp2 ; int argvi = 0; SV * _saved[1] ; int result; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: idmef_source_new_node(ptr,ret);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_source, 0) ) { croak("Expected type idmef_source_t * for argument 1."); return; } } { arg2 = (idmef_node_t **) &tmp2; } _saved[0] = ST(1); result = (int)idmef_source_new_node(arg1,arg2); { ST(argvi) = newSViv(result); argvi++; } { SV *sv; if ( result >= 0 ) { if ( ! SvROK(_saved[0]) ) { croak("Argument 2 is not a reference."); return; } sv = SvRV(_saved[0]); sv_setsv(sv, SWIG_NewPointerObj((void *) * arg2, SWIGTYPE_p_idmef_node, 0)); } } XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_source_get_user) { { idmef_source_t *arg1 = (idmef_source_t *) 0 ; int argvi = 0; idmef_user_t *result = 0 ; dXSARGS; if ((items < 1) || (items > 1)) { SWIG_croak("Usage: idmef_source_get_user(ptr);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_source, 0) ) { croak("Expected type idmef_source_t * for argument 1."); return; } } result = (idmef_user_t *)idmef_source_get_user(arg1); ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_idmef_user, 0 | 0); argvi++ ; XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_source_set_user) { { idmef_source_t *arg1 = (idmef_source_t *) 0 ; idmef_user_t *arg2 = (idmef_user_t *) 0 ; int argvi = 0; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: idmef_source_set_user(ptr,user);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_source, 0) ) { croak("Expected type idmef_source_t * for argument 1."); return; } } { if ( ! SvROK(ST(1)) ) { croak("Argument 2 is null."); return; } if ( SWIG_ConvertPtr(ST(1), (void **)&arg2, SWIGTYPE_p_idmef_user, 0) ) { croak("Expected type idmef_user_t * for argument 2."); return; } } idmef_source_set_user(arg1,arg2); ST(argvi) = sv_newmortal(); XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_source_new_user) { { idmef_source_t *arg1 = (idmef_source_t *) 0 ; idmef_user_t **arg2 = (idmef_user_t **) 0 ; idmef_user_t *tmp2 ; int argvi = 0; SV * _saved[1] ; int result; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: idmef_source_new_user(ptr,ret);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_source, 0) ) { croak("Expected type idmef_source_t * for argument 1."); return; } } { arg2 = (idmef_user_t **) &tmp2; } _saved[0] = ST(1); result = (int)idmef_source_new_user(arg1,arg2); { ST(argvi) = newSViv(result); argvi++; } { SV *sv; if ( result >= 0 ) { if ( ! SvROK(_saved[0]) ) { croak("Argument 2 is not a reference."); return; } sv = SvRV(_saved[0]); sv_setsv(sv, SWIG_NewPointerObj((void *) * arg2, SWIGTYPE_p_idmef_user, 0)); } } XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_source_get_process) { { idmef_source_t *arg1 = (idmef_source_t *) 0 ; int argvi = 0; idmef_process_t *result = 0 ; dXSARGS; if ((items < 1) || (items > 1)) { SWIG_croak("Usage: idmef_source_get_process(ptr);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_source, 0) ) { croak("Expected type idmef_source_t * for argument 1."); return; } } result = (idmef_process_t *)idmef_source_get_process(arg1); ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_idmef_process, 0 | 0); argvi++ ; XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_source_set_process) { { idmef_source_t *arg1 = (idmef_source_t *) 0 ; idmef_process_t *arg2 = (idmef_process_t *) 0 ; int argvi = 0; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: idmef_source_set_process(ptr,process);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_source, 0) ) { croak("Expected type idmef_source_t * for argument 1."); return; } } { if ( ! SvROK(ST(1)) ) { croak("Argument 2 is null."); return; } if ( SWIG_ConvertPtr(ST(1), (void **)&arg2, SWIGTYPE_p_idmef_process, 0) ) { croak("Expected type idmef_process_t * for argument 2."); return; } } idmef_source_set_process(arg1,arg2); ST(argvi) = sv_newmortal(); XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_source_new_process) { { idmef_source_t *arg1 = (idmef_source_t *) 0 ; idmef_process_t **arg2 = (idmef_process_t **) 0 ; idmef_process_t *tmp2 ; int argvi = 0; SV * _saved[1] ; int result; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: idmef_source_new_process(ptr,ret);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_source, 0) ) { croak("Expected type idmef_source_t * for argument 1."); return; } } { arg2 = (idmef_process_t **) &tmp2; } _saved[0] = ST(1); result = (int)idmef_source_new_process(arg1,arg2); { ST(argvi) = newSViv(result); argvi++; } { SV *sv; if ( result >= 0 ) { if ( ! SvROK(_saved[0]) ) { croak("Argument 2 is not a reference."); return; } sv = SvRV(_saved[0]); sv_setsv(sv, SWIG_NewPointerObj((void *) * arg2, SWIGTYPE_p_idmef_process, 0)); } } XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_source_get_service) { { idmef_source_t *arg1 = (idmef_source_t *) 0 ; int argvi = 0; idmef_service_t *result = 0 ; dXSARGS; if ((items < 1) || (items > 1)) { SWIG_croak("Usage: idmef_source_get_service(ptr);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_source, 0) ) { croak("Expected type idmef_source_t * for argument 1."); return; } } result = (idmef_service_t *)idmef_source_get_service(arg1); ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_idmef_service, 0 | 0); argvi++ ; XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_source_set_service) { { idmef_source_t *arg1 = (idmef_source_t *) 0 ; idmef_service_t *arg2 = (idmef_service_t *) 0 ; int argvi = 0; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: idmef_source_set_service(ptr,service);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_source, 0) ) { croak("Expected type idmef_source_t * for argument 1."); return; } } { if ( ! SvROK(ST(1)) ) { croak("Argument 2 is null."); return; } if ( SWIG_ConvertPtr(ST(1), (void **)&arg2, SWIGTYPE_p_idmef_service, 0) ) { croak("Expected type idmef_service_t * for argument 2."); return; } } idmef_source_set_service(arg1,arg2); ST(argvi) = sv_newmortal(); XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_source_new_service) { { idmef_source_t *arg1 = (idmef_source_t *) 0 ; idmef_service_t **arg2 = (idmef_service_t **) 0 ; idmef_service_t *tmp2 ; int argvi = 0; SV * _saved[1] ; int result; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: idmef_source_new_service(ptr,ret);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_source, 0) ) { croak("Expected type idmef_source_t * for argument 1."); return; } } { arg2 = (idmef_service_t **) &tmp2; } _saved[0] = ST(1); result = (int)idmef_source_new_service(arg1,arg2); { ST(argvi) = newSViv(result); argvi++; } { SV *sv; if ( result >= 0 ) { if ( ! SvROK(_saved[0]) ) { croak("Argument 2 is not a reference."); return; } sv = SvRV(_saved[0]); sv_setsv(sv, SWIG_NewPointerObj((void *) * arg2, SWIGTYPE_p_idmef_service, 0)); } } XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_file_access_new) { { idmef_file_access_t **arg1 = (idmef_file_access_t **) 0 ; idmef_file_access_t *tmp1 ; int argvi = 0; SV * _saved[1] ; int result; dXSARGS; if ((items < 1) || (items > 1)) { SWIG_croak("Usage: idmef_file_access_new(ret);"); } { arg1 = (idmef_file_access_t **) &tmp1; } _saved[0] = ST(0); result = (int)idmef_file_access_new(arg1); { ST(argvi) = newSViv(result); argvi++; } { SV *sv; if ( result >= 0 ) { if ( ! SvROK(_saved[0]) ) { croak("Argument 1 is not a reference."); return; } sv = SvRV(_saved[0]); sv_setsv(sv, SWIG_NewPointerObj((void *) * arg1, SWIGTYPE_p_idmef_file_access, 0)); } } XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_file_access_copy) { { idmef_file_access_t *arg1 = (idmef_file_access_t *) 0 ; idmef_file_access_t *arg2 = (idmef_file_access_t *) 0 ; int argvi = 0; int result; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: idmef_file_access_copy(src,dst);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_file_access, 0) ) { croak("Expected type idmef_file_access_t const * for argument 1."); return; } } { if ( ! SvROK(ST(1)) ) { croak("Argument 2 is null."); return; } if ( SWIG_ConvertPtr(ST(1), (void **)&arg2, SWIGTYPE_p_idmef_file_access, 0) ) { croak("Expected type idmef_file_access_t * for argument 2."); return; } } result = (int)idmef_file_access_copy((struct idmef_file_access const *)arg1,arg2); { ST(argvi) = newSViv(result); argvi++; } XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_file_access_clone) { { idmef_file_access_t *arg1 = (idmef_file_access_t *) 0 ; idmef_file_access_t **arg2 = (idmef_file_access_t **) 0 ; idmef_file_access_t *tmp2 ; int argvi = 0; SV * _saved[1] ; int result; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: idmef_file_access_clone(src,dst);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_file_access, 0) ) { croak("Expected type idmef_file_access_t * for argument 1."); return; } } { arg2 = (idmef_file_access_t **) &tmp2; } _saved[0] = ST(1); result = (int)idmef_file_access_clone(arg1,arg2); { ST(argvi) = newSViv(result); argvi++; } { SV *sv; if ( result >= 0 ) { if ( ! SvROK(_saved[0]) ) { croak("Argument 2 is not a reference."); return; } sv = SvRV(_saved[0]); sv_setsv(sv, SWIG_NewPointerObj((void *) * arg2, SWIGTYPE_p_idmef_file_access, 0)); } } XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_file_access_compare) { { idmef_file_access_t *arg1 = (idmef_file_access_t *) 0 ; idmef_file_access_t *arg2 = (idmef_file_access_t *) 0 ; int argvi = 0; int result; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: idmef_file_access_compare(obj1,obj2);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_file_access, 0) ) { croak("Expected type idmef_file_access_t const * for argument 1."); return; } } { if ( ! SvROK(ST(1)) ) { croak("Argument 2 is null."); return; } if ( SWIG_ConvertPtr(ST(1), (void **)&arg2, SWIGTYPE_p_idmef_file_access, 0) ) { croak("Expected type idmef_file_access_t const * for argument 2."); return; } } result = (int)idmef_file_access_compare((struct idmef_file_access const *)arg1,(struct idmef_file_access const *)arg2); { ST(argvi) = newSViv(result); argvi++; } XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_file_access_ref) { { idmef_file_access_t *arg1 = (idmef_file_access_t *) 0 ; int argvi = 0; idmef_file_access_t *result = 0 ; dXSARGS; if ((items < 1) || (items > 1)) { SWIG_croak("Usage: idmef_file_access_ref(file_access);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_file_access, 0) ) { croak("Expected type idmef_file_access_t * for argument 1."); return; } } result = (idmef_file_access_t *)idmef_file_access_ref(arg1); ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_idmef_file_access, 0 | 0); argvi++ ; XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_file_access_destroy) { { idmef_file_access_t *arg1 = (idmef_file_access_t *) 0 ; int argvi = 0; dXSARGS; if ((items < 1) || (items > 1)) { SWIG_croak("Usage: idmef_file_access_destroy(ptr);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_file_access, 0) ) { croak("Expected type idmef_file_access_t * for argument 1."); return; } } idmef_file_access_destroy(arg1); ST(argvi) = sv_newmortal(); XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_file_access_get_user_id) { { idmef_file_access_t *arg1 = (idmef_file_access_t *) 0 ; int argvi = 0; idmef_user_id_t *result = 0 ; dXSARGS; if ((items < 1) || (items > 1)) { SWIG_croak("Usage: idmef_file_access_get_user_id(ptr);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_file_access, 0) ) { croak("Expected type idmef_file_access_t * for argument 1."); return; } } result = (idmef_user_id_t *)idmef_file_access_get_user_id(arg1); ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_idmef_user_id, 0 | 0); argvi++ ; XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_file_access_set_user_id) { { idmef_file_access_t *arg1 = (idmef_file_access_t *) 0 ; idmef_user_id_t *arg2 = (idmef_user_id_t *) 0 ; int argvi = 0; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: idmef_file_access_set_user_id(ptr,user_id);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_file_access, 0) ) { croak("Expected type idmef_file_access_t * for argument 1."); return; } } { if ( ! SvROK(ST(1)) ) { croak("Argument 2 is null."); return; } if ( SWIG_ConvertPtr(ST(1), (void **)&arg2, SWIGTYPE_p_idmef_user_id, 0) ) { croak("Expected type idmef_user_id_t * for argument 2."); return; } } idmef_file_access_set_user_id(arg1,arg2); ST(argvi) = sv_newmortal(); XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_file_access_new_user_id) { { idmef_file_access_t *arg1 = (idmef_file_access_t *) 0 ; idmef_user_id_t **arg2 = (idmef_user_id_t **) 0 ; idmef_user_id_t *tmp2 ; int argvi = 0; SV * _saved[1] ; int result; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: idmef_file_access_new_user_id(ptr,ret);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_file_access, 0) ) { croak("Expected type idmef_file_access_t * for argument 1."); return; } } { arg2 = (idmef_user_id_t **) &tmp2; } _saved[0] = ST(1); result = (int)idmef_file_access_new_user_id(arg1,arg2); { ST(argvi) = newSViv(result); argvi++; } { SV *sv; if ( result >= 0 ) { if ( ! SvROK(_saved[0]) ) { croak("Argument 2 is not a reference."); return; } sv = SvRV(_saved[0]); sv_setsv(sv, SWIG_NewPointerObj((void *) * arg2, SWIGTYPE_p_idmef_user_id, 0)); } } XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_file_access_get_next_permission) { { idmef_file_access_t *arg1 = (idmef_file_access_t *) 0 ; prelude_string_t *arg2 = (prelude_string_t *) 0 ; int argvi = 0; prelude_string_t *result = 0 ; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: idmef_file_access_get_next_permission(file_access,prelude_string_cur);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_file_access, 0) ) { croak("Expected type idmef_file_access_t * for argument 1."); return; } } { if ( ! SvOK(ST(1)) ) { arg2 = NULL; } else { if ( SWIG_ConvertPtr(ST(1), (void **)&arg2, SWIGTYPE_p_prelude_string_t, 0) ) { croak("Expected type prelude_string_t * for argument 2."); return; } } } result = (prelude_string_t *)idmef_file_access_get_next_permission(arg1,arg2); { ST(argvi) = swig_perl_string(result); argvi++; } XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_file_access_set_permission) { { idmef_file_access_t *arg1 = (idmef_file_access_t *) 0 ; prelude_string_t *arg2 = (prelude_string_t *) 0 ; int arg3 ; int val3 ; int ecode3 = 0 ; int argvi = 0; dXSARGS; if ((items < 3) || (items > 3)) { SWIG_croak("Usage: idmef_file_access_set_permission(ptr,object,pos);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_file_access, 0) ) { croak("Expected type idmef_file_access_t * for argument 1."); return; } } { int ret; char *str; STRLEN len; str = SvPV(ST(1), len); ret = prelude_string_new_dup_fast(&(arg2), str, len); if ( ret < 0 ) { swig_perl_raise_error(ret); return; } } ecode3 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(2), &val3); if (!SWIG_IsOK(ecode3)) { SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "idmef_file_access_set_permission" "', argument " "3"" of type '" "int""'"); } arg3 = (int)(val3); idmef_file_access_set_permission(arg1,arg2,arg3); ST(argvi) = sv_newmortal(); XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_file_access_new_permission) { { idmef_file_access_t *arg1 = (idmef_file_access_t *) 0 ; prelude_string_t **arg2 = (prelude_string_t **) 0 ; int arg3 ; void *argp2 = 0 ; int res2 = 0 ; int val3 ; int ecode3 = 0 ; int argvi = 0; int result; dXSARGS; if ((items < 3) || (items > 3)) { SWIG_croak("Usage: idmef_file_access_new_permission(ptr,ret,pos);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_file_access, 0) ) { croak("Expected type idmef_file_access_t * for argument 1."); return; } } res2 = SWIG_ConvertPtr(ST(1), &argp2,SWIGTYPE_p_p_prelude_string_t, 0 | 0 ); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "idmef_file_access_new_permission" "', argument " "2"" of type '" "prelude_string_t **""'"); } arg2 = (prelude_string_t **)(argp2); ecode3 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(2), &val3); if (!SWIG_IsOK(ecode3)) { SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "idmef_file_access_new_permission" "', argument " "3"" of type '" "int""'"); } arg3 = (int)(val3); result = (int)idmef_file_access_new_permission(arg1,arg2,arg3); { ST(argvi) = newSViv(result); argvi++; } XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_inode_new) { { idmef_inode_t **arg1 = (idmef_inode_t **) 0 ; idmef_inode_t *tmp1 ; int argvi = 0; SV * _saved[1] ; int result; dXSARGS; if ((items < 1) || (items > 1)) { SWIG_croak("Usage: idmef_inode_new(ret);"); } { arg1 = (idmef_inode_t **) &tmp1; } _saved[0] = ST(0); result = (int)idmef_inode_new(arg1); { ST(argvi) = newSViv(result); argvi++; } { SV *sv; if ( result >= 0 ) { if ( ! SvROK(_saved[0]) ) { croak("Argument 1 is not a reference."); return; } sv = SvRV(_saved[0]); sv_setsv(sv, SWIG_NewPointerObj((void *) * arg1, SWIGTYPE_p_idmef_inode, 0)); } } XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_inode_copy) { { idmef_inode_t *arg1 = (idmef_inode_t *) 0 ; idmef_inode_t *arg2 = (idmef_inode_t *) 0 ; int argvi = 0; int result; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: idmef_inode_copy(src,dst);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_inode, 0) ) { croak("Expected type idmef_inode_t const * for argument 1."); return; } } { if ( ! SvROK(ST(1)) ) { croak("Argument 2 is null."); return; } if ( SWIG_ConvertPtr(ST(1), (void **)&arg2, SWIGTYPE_p_idmef_inode, 0) ) { croak("Expected type idmef_inode_t * for argument 2."); return; } } result = (int)idmef_inode_copy((struct idmef_inode const *)arg1,arg2); { ST(argvi) = newSViv(result); argvi++; } XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_inode_clone) { { idmef_inode_t *arg1 = (idmef_inode_t *) 0 ; idmef_inode_t **arg2 = (idmef_inode_t **) 0 ; idmef_inode_t *tmp2 ; int argvi = 0; SV * _saved[1] ; int result; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: idmef_inode_clone(src,dst);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_inode, 0) ) { croak("Expected type idmef_inode_t * for argument 1."); return; } } { arg2 = (idmef_inode_t **) &tmp2; } _saved[0] = ST(1); result = (int)idmef_inode_clone(arg1,arg2); { ST(argvi) = newSViv(result); argvi++; } { SV *sv; if ( result >= 0 ) { if ( ! SvROK(_saved[0]) ) { croak("Argument 2 is not a reference."); return; } sv = SvRV(_saved[0]); sv_setsv(sv, SWIG_NewPointerObj((void *) * arg2, SWIGTYPE_p_idmef_inode, 0)); } } XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_inode_compare) { { idmef_inode_t *arg1 = (idmef_inode_t *) 0 ; idmef_inode_t *arg2 = (idmef_inode_t *) 0 ; int argvi = 0; int result; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: idmef_inode_compare(obj1,obj2);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_inode, 0) ) { croak("Expected type idmef_inode_t const * for argument 1."); return; } } { if ( ! SvROK(ST(1)) ) { croak("Argument 2 is null."); return; } if ( SWIG_ConvertPtr(ST(1), (void **)&arg2, SWIGTYPE_p_idmef_inode, 0) ) { croak("Expected type idmef_inode_t const * for argument 2."); return; } } result = (int)idmef_inode_compare((struct idmef_inode const *)arg1,(struct idmef_inode const *)arg2); { ST(argvi) = newSViv(result); argvi++; } XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_inode_ref) { { idmef_inode_t *arg1 = (idmef_inode_t *) 0 ; int argvi = 0; idmef_inode_t *result = 0 ; dXSARGS; if ((items < 1) || (items > 1)) { SWIG_croak("Usage: idmef_inode_ref(inode);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_inode, 0) ) { croak("Expected type idmef_inode_t * for argument 1."); return; } } result = (idmef_inode_t *)idmef_inode_ref(arg1); ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_idmef_inode, 0 | 0); argvi++ ; XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_inode_destroy) { { idmef_inode_t *arg1 = (idmef_inode_t *) 0 ; int argvi = 0; dXSARGS; if ((items < 1) || (items > 1)) { SWIG_croak("Usage: idmef_inode_destroy(ptr);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_inode, 0) ) { croak("Expected type idmef_inode_t * for argument 1."); return; } } idmef_inode_destroy(arg1); ST(argvi) = sv_newmortal(); XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_inode_get_change_time) { { idmef_inode_t *arg1 = (idmef_inode_t *) 0 ; int argvi = 0; idmef_time_t *result = 0 ; dXSARGS; if ((items < 1) || (items > 1)) { SWIG_croak("Usage: idmef_inode_get_change_time(ptr);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_inode, 0) ) { croak("Expected type idmef_inode_t * for argument 1."); return; } } result = (idmef_time_t *)idmef_inode_get_change_time(arg1); ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_idmef_time, 0 | SWIG_SHADOW); argvi++ ; XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_inode_set_change_time) { { idmef_inode_t *arg1 = (idmef_inode_t *) 0 ; idmef_time_t *arg2 = (idmef_time_t *) 0 ; int argvi = 0; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: idmef_inode_set_change_time(ptr,change_time);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_inode, 0) ) { croak("Expected type idmef_inode_t * for argument 1."); return; } } { if ( ! SvROK(ST(1)) ) { croak("Argument 2 is null."); return; } if ( SWIG_ConvertPtr(ST(1), (void **)&arg2, SWIGTYPE_p_idmef_time, 0) ) { croak("Expected type idmef_time_t * for argument 2."); return; } } idmef_inode_set_change_time(arg1,arg2); ST(argvi) = sv_newmortal(); XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_inode_new_change_time) { { idmef_inode_t *arg1 = (idmef_inode_t *) 0 ; idmef_time_t **arg2 = (idmef_time_t **) 0 ; idmef_time_t *tmp2 ; int argvi = 0; SV * _saved[1] ; int result; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: idmef_inode_new_change_time(ptr,ret);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_inode, 0) ) { croak("Expected type idmef_inode_t * for argument 1."); return; } } { arg2 = (idmef_time_t **) &tmp2; } _saved[0] = ST(1); result = (int)idmef_inode_new_change_time(arg1,arg2); { ST(argvi) = newSViv(result); argvi++; } { SV *sv; if ( result >= 0 ) { if ( ! SvROK(_saved[0]) ) { croak("Argument 2 is not a reference."); return; } sv = SvRV(_saved[0]); sv_setsv(sv, SWIG_NewPointerObj((void *) * arg2, SWIGTYPE_p_idmef_time, 0)); } } XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_inode_unset_number) { { idmef_inode_t *arg1 = (idmef_inode_t *) 0 ; int argvi = 0; dXSARGS; if ((items < 1) || (items > 1)) { SWIG_croak("Usage: idmef_inode_unset_number(ptr);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_inode, 0) ) { croak("Expected type idmef_inode_t * for argument 1."); return; } } idmef_inode_unset_number(arg1); ST(argvi) = sv_newmortal(); XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_inode_get_number) { { idmef_inode_t *arg1 = (idmef_inode_t *) 0 ; int argvi = 0; uint32_t *result = 0 ; dXSARGS; if ((items < 1) || (items > 1)) { SWIG_croak("Usage: idmef_inode_get_number(ptr);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_inode, 0) ) { croak("Expected type idmef_inode_t * for argument 1."); return; } } result = (uint32_t *)idmef_inode_get_number(arg1); { if ( result != NULL ) { ST(argvi) = newSVuv(*result); } else { SvREFCNT_inc (& PL_sv_undef); ST(argvi) = &PL_sv_undef; } } XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_inode_set_number) { { idmef_inode_t *arg1 = (idmef_inode_t *) 0 ; uint32_t arg2 ; unsigned int val2 ; int ecode2 = 0 ; int argvi = 0; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: idmef_inode_set_number(ptr,number);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_inode, 0) ) { croak("Expected type idmef_inode_t * for argument 1."); return; } } ecode2 = SWIG_AsVal_unsigned_SS_int SWIG_PERL_CALL_ARGS_2(ST(1), &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "idmef_inode_set_number" "', argument " "2"" of type '" "uint32_t""'"); } arg2 = (uint32_t)(val2); idmef_inode_set_number(arg1,arg2); ST(argvi) = sv_newmortal(); XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_inode_new_number) { { idmef_inode_t *arg1 = (idmef_inode_t *) 0 ; uint32_t **arg2 = (uint32_t **) 0 ; void *argp2 = 0 ; int res2 = 0 ; int argvi = 0; int result; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: idmef_inode_new_number(ptr,ret);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_inode, 0) ) { croak("Expected type idmef_inode_t * for argument 1."); return; } } res2 = SWIG_ConvertPtr(ST(1), &argp2,SWIGTYPE_p_p_unsigned_int, 0 | 0 ); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "idmef_inode_new_number" "', argument " "2"" of type '" "uint32_t **""'"); } arg2 = (uint32_t **)(argp2); result = (int)idmef_inode_new_number(arg1,arg2); { ST(argvi) = newSViv(result); argvi++; } XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_inode_unset_major_device) { { idmef_inode_t *arg1 = (idmef_inode_t *) 0 ; int argvi = 0; dXSARGS; if ((items < 1) || (items > 1)) { SWIG_croak("Usage: idmef_inode_unset_major_device(ptr);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_inode, 0) ) { croak("Expected type idmef_inode_t * for argument 1."); return; } } idmef_inode_unset_major_device(arg1); ST(argvi) = sv_newmortal(); XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_inode_get_major_device) { { idmef_inode_t *arg1 = (idmef_inode_t *) 0 ; int argvi = 0; uint32_t *result = 0 ; dXSARGS; if ((items < 1) || (items > 1)) { SWIG_croak("Usage: idmef_inode_get_major_device(ptr);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_inode, 0) ) { croak("Expected type idmef_inode_t * for argument 1."); return; } } result = (uint32_t *)idmef_inode_get_major_device(arg1); { if ( result != NULL ) { ST(argvi) = newSVuv(*result); } else { SvREFCNT_inc (& PL_sv_undef); ST(argvi) = &PL_sv_undef; } } XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_inode_set_major_device) { { idmef_inode_t *arg1 = (idmef_inode_t *) 0 ; uint32_t arg2 ; unsigned int val2 ; int ecode2 = 0 ; int argvi = 0; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: idmef_inode_set_major_device(ptr,major_device);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_inode, 0) ) { croak("Expected type idmef_inode_t * for argument 1."); return; } } ecode2 = SWIG_AsVal_unsigned_SS_int SWIG_PERL_CALL_ARGS_2(ST(1), &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "idmef_inode_set_major_device" "', argument " "2"" of type '" "uint32_t""'"); } arg2 = (uint32_t)(val2); idmef_inode_set_major_device(arg1,arg2); ST(argvi) = sv_newmortal(); XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_inode_new_major_device) { { idmef_inode_t *arg1 = (idmef_inode_t *) 0 ; uint32_t **arg2 = (uint32_t **) 0 ; void *argp2 = 0 ; int res2 = 0 ; int argvi = 0; int result; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: idmef_inode_new_major_device(ptr,ret);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_inode, 0) ) { croak("Expected type idmef_inode_t * for argument 1."); return; } } res2 = SWIG_ConvertPtr(ST(1), &argp2,SWIGTYPE_p_p_unsigned_int, 0 | 0 ); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "idmef_inode_new_major_device" "', argument " "2"" of type '" "uint32_t **""'"); } arg2 = (uint32_t **)(argp2); result = (int)idmef_inode_new_major_device(arg1,arg2); { ST(argvi) = newSViv(result); argvi++; } XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_inode_unset_minor_device) { { idmef_inode_t *arg1 = (idmef_inode_t *) 0 ; int argvi = 0; dXSARGS; if ((items < 1) || (items > 1)) { SWIG_croak("Usage: idmef_inode_unset_minor_device(ptr);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_inode, 0) ) { croak("Expected type idmef_inode_t * for argument 1."); return; } } idmef_inode_unset_minor_device(arg1); ST(argvi) = sv_newmortal(); XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_inode_get_minor_device) { { idmef_inode_t *arg1 = (idmef_inode_t *) 0 ; int argvi = 0; uint32_t *result = 0 ; dXSARGS; if ((items < 1) || (items > 1)) { SWIG_croak("Usage: idmef_inode_get_minor_device(ptr);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_inode, 0) ) { croak("Expected type idmef_inode_t * for argument 1."); return; } } result = (uint32_t *)idmef_inode_get_minor_device(arg1); { if ( result != NULL ) { ST(argvi) = newSVuv(*result); } else { SvREFCNT_inc (& PL_sv_undef); ST(argvi) = &PL_sv_undef; } } XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_inode_set_minor_device) { { idmef_inode_t *arg1 = (idmef_inode_t *) 0 ; uint32_t arg2 ; unsigned int val2 ; int ecode2 = 0 ; int argvi = 0; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: idmef_inode_set_minor_device(ptr,minor_device);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_inode, 0) ) { croak("Expected type idmef_inode_t * for argument 1."); return; } } ecode2 = SWIG_AsVal_unsigned_SS_int SWIG_PERL_CALL_ARGS_2(ST(1), &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "idmef_inode_set_minor_device" "', argument " "2"" of type '" "uint32_t""'"); } arg2 = (uint32_t)(val2); idmef_inode_set_minor_device(arg1,arg2); ST(argvi) = sv_newmortal(); XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_inode_new_minor_device) { { idmef_inode_t *arg1 = (idmef_inode_t *) 0 ; uint32_t **arg2 = (uint32_t **) 0 ; void *argp2 = 0 ; int res2 = 0 ; int argvi = 0; int result; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: idmef_inode_new_minor_device(ptr,ret);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_inode, 0) ) { croak("Expected type idmef_inode_t * for argument 1."); return; } } res2 = SWIG_ConvertPtr(ST(1), &argp2,SWIGTYPE_p_p_unsigned_int, 0 | 0 ); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "idmef_inode_new_minor_device" "', argument " "2"" of type '" "uint32_t **""'"); } arg2 = (uint32_t **)(argp2); result = (int)idmef_inode_new_minor_device(arg1,arg2); { ST(argvi) = newSViv(result); argvi++; } XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_inode_unset_c_major_device) { { idmef_inode_t *arg1 = (idmef_inode_t *) 0 ; int argvi = 0; dXSARGS; if ((items < 1) || (items > 1)) { SWIG_croak("Usage: idmef_inode_unset_c_major_device(ptr);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_inode, 0) ) { croak("Expected type idmef_inode_t * for argument 1."); return; } } idmef_inode_unset_c_major_device(arg1); ST(argvi) = sv_newmortal(); XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_inode_get_c_major_device) { { idmef_inode_t *arg1 = (idmef_inode_t *) 0 ; int argvi = 0; uint32_t *result = 0 ; dXSARGS; if ((items < 1) || (items > 1)) { SWIG_croak("Usage: idmef_inode_get_c_major_device(ptr);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_inode, 0) ) { croak("Expected type idmef_inode_t * for argument 1."); return; } } result = (uint32_t *)idmef_inode_get_c_major_device(arg1); { if ( result != NULL ) { ST(argvi) = newSVuv(*result); } else { SvREFCNT_inc (& PL_sv_undef); ST(argvi) = &PL_sv_undef; } } XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_inode_set_c_major_device) { { idmef_inode_t *arg1 = (idmef_inode_t *) 0 ; uint32_t arg2 ; unsigned int val2 ; int ecode2 = 0 ; int argvi = 0; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: idmef_inode_set_c_major_device(ptr,c_major_device);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_inode, 0) ) { croak("Expected type idmef_inode_t * for argument 1."); return; } } ecode2 = SWIG_AsVal_unsigned_SS_int SWIG_PERL_CALL_ARGS_2(ST(1), &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "idmef_inode_set_c_major_device" "', argument " "2"" of type '" "uint32_t""'"); } arg2 = (uint32_t)(val2); idmef_inode_set_c_major_device(arg1,arg2); ST(argvi) = sv_newmortal(); XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_inode_new_c_major_device) { { idmef_inode_t *arg1 = (idmef_inode_t *) 0 ; uint32_t **arg2 = (uint32_t **) 0 ; void *argp2 = 0 ; int res2 = 0 ; int argvi = 0; int result; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: idmef_inode_new_c_major_device(ptr,ret);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_inode, 0) ) { croak("Expected type idmef_inode_t * for argument 1."); return; } } res2 = SWIG_ConvertPtr(ST(1), &argp2,SWIGTYPE_p_p_unsigned_int, 0 | 0 ); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "idmef_inode_new_c_major_device" "', argument " "2"" of type '" "uint32_t **""'"); } arg2 = (uint32_t **)(argp2); result = (int)idmef_inode_new_c_major_device(arg1,arg2); { ST(argvi) = newSViv(result); argvi++; } XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_inode_unset_c_minor_device) { { idmef_inode_t *arg1 = (idmef_inode_t *) 0 ; int argvi = 0; dXSARGS; if ((items < 1) || (items > 1)) { SWIG_croak("Usage: idmef_inode_unset_c_minor_device(ptr);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_inode, 0) ) { croak("Expected type idmef_inode_t * for argument 1."); return; } } idmef_inode_unset_c_minor_device(arg1); ST(argvi) = sv_newmortal(); XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_inode_get_c_minor_device) { { idmef_inode_t *arg1 = (idmef_inode_t *) 0 ; int argvi = 0; uint32_t *result = 0 ; dXSARGS; if ((items < 1) || (items > 1)) { SWIG_croak("Usage: idmef_inode_get_c_minor_device(ptr);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_inode, 0) ) { croak("Expected type idmef_inode_t * for argument 1."); return; } } result = (uint32_t *)idmef_inode_get_c_minor_device(arg1); { if ( result != NULL ) { ST(argvi) = newSVuv(*result); } else { SvREFCNT_inc (& PL_sv_undef); ST(argvi) = &PL_sv_undef; } } XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_inode_set_c_minor_device) { { idmef_inode_t *arg1 = (idmef_inode_t *) 0 ; uint32_t arg2 ; unsigned int val2 ; int ecode2 = 0 ; int argvi = 0; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: idmef_inode_set_c_minor_device(ptr,c_minor_device);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_inode, 0) ) { croak("Expected type idmef_inode_t * for argument 1."); return; } } ecode2 = SWIG_AsVal_unsigned_SS_int SWIG_PERL_CALL_ARGS_2(ST(1), &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "idmef_inode_set_c_minor_device" "', argument " "2"" of type '" "uint32_t""'"); } arg2 = (uint32_t)(val2); idmef_inode_set_c_minor_device(arg1,arg2); ST(argvi) = sv_newmortal(); XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_inode_new_c_minor_device) { { idmef_inode_t *arg1 = (idmef_inode_t *) 0 ; uint32_t **arg2 = (uint32_t **) 0 ; void *argp2 = 0 ; int res2 = 0 ; int argvi = 0; int result; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: idmef_inode_new_c_minor_device(ptr,ret);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_inode, 0) ) { croak("Expected type idmef_inode_t * for argument 1."); return; } } res2 = SWIG_ConvertPtr(ST(1), &argp2,SWIGTYPE_p_p_unsigned_int, 0 | 0 ); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "idmef_inode_new_c_minor_device" "', argument " "2"" of type '" "uint32_t **""'"); } arg2 = (uint32_t **)(argp2); result = (int)idmef_inode_new_c_minor_device(arg1,arg2); { ST(argvi) = newSViv(result); argvi++; } XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_checksum_algorithm_to_numeric) { { char *arg1 = (char *) 0 ; int res1 ; char *buf1 = 0 ; int alloc1 = 0 ; int argvi = 0; idmef_checksum_algorithm_t result; dXSARGS; if ((items < 1) || (items > 1)) { SWIG_croak("Usage: idmef_checksum_algorithm_to_numeric(name);"); } res1 = SWIG_AsCharPtrAndSize(ST(0), &buf1, NULL, &alloc1); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "idmef_checksum_algorithm_to_numeric" "', argument " "1"" of type '" "char const *""'"); } arg1 = (char *)(buf1); result = (idmef_checksum_algorithm_t)idmef_checksum_algorithm_to_numeric((char const *)arg1); ST(argvi) = SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(result)); argvi++ ; if (alloc1 == SWIG_NEWOBJ) free((char*)buf1); XSRETURN(argvi); fail: if (alloc1 == SWIG_NEWOBJ) free((char*)buf1); SWIG_croak_null(); } } XS(_wrap_idmef_checksum_algorithm_to_string) { { idmef_checksum_algorithm_t arg1 ; int val1 ; int ecode1 = 0 ; int argvi = 0; char *result = 0 ; dXSARGS; if ((items < 1) || (items > 1)) { SWIG_croak("Usage: idmef_checksum_algorithm_to_string(val);"); } ecode1 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(0), &val1); if (!SWIG_IsOK(ecode1)) { SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "idmef_checksum_algorithm_to_string" "', argument " "1"" of type '" "idmef_checksum_algorithm_t""'"); } arg1 = (idmef_checksum_algorithm_t)(val1); result = (char *)idmef_checksum_algorithm_to_string(arg1); ST(argvi) = SWIG_FromCharPtr((const char *)result); argvi++ ; XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_checksum_new) { { idmef_checksum_t **arg1 = (idmef_checksum_t **) 0 ; idmef_checksum_t *tmp1 ; int argvi = 0; SV * _saved[1] ; int result; dXSARGS; if ((items < 1) || (items > 1)) { SWIG_croak("Usage: idmef_checksum_new(ret);"); } { arg1 = (idmef_checksum_t **) &tmp1; } _saved[0] = ST(0); result = (int)idmef_checksum_new(arg1); { ST(argvi) = newSViv(result); argvi++; } { SV *sv; if ( result >= 0 ) { if ( ! SvROK(_saved[0]) ) { croak("Argument 1 is not a reference."); return; } sv = SvRV(_saved[0]); sv_setsv(sv, SWIG_NewPointerObj((void *) * arg1, SWIGTYPE_p_idmef_checksum, 0)); } } XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_checksum_copy) { { idmef_checksum_t *arg1 = (idmef_checksum_t *) 0 ; idmef_checksum_t *arg2 = (idmef_checksum_t *) 0 ; int argvi = 0; int result; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: idmef_checksum_copy(src,dst);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_checksum, 0) ) { croak("Expected type idmef_checksum_t const * for argument 1."); return; } } { if ( ! SvROK(ST(1)) ) { croak("Argument 2 is null."); return; } if ( SWIG_ConvertPtr(ST(1), (void **)&arg2, SWIGTYPE_p_idmef_checksum, 0) ) { croak("Expected type idmef_checksum_t * for argument 2."); return; } } result = (int)idmef_checksum_copy((struct idmef_checksum const *)arg1,arg2); { ST(argvi) = newSViv(result); argvi++; } XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_checksum_clone) { { idmef_checksum_t *arg1 = (idmef_checksum_t *) 0 ; idmef_checksum_t **arg2 = (idmef_checksum_t **) 0 ; idmef_checksum_t *tmp2 ; int argvi = 0; SV * _saved[1] ; int result; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: idmef_checksum_clone(src,dst);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_checksum, 0) ) { croak("Expected type idmef_checksum_t * for argument 1."); return; } } { arg2 = (idmef_checksum_t **) &tmp2; } _saved[0] = ST(1); result = (int)idmef_checksum_clone(arg1,arg2); { ST(argvi) = newSViv(result); argvi++; } { SV *sv; if ( result >= 0 ) { if ( ! SvROK(_saved[0]) ) { croak("Argument 2 is not a reference."); return; } sv = SvRV(_saved[0]); sv_setsv(sv, SWIG_NewPointerObj((void *) * arg2, SWIGTYPE_p_idmef_checksum, 0)); } } XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_checksum_compare) { { idmef_checksum_t *arg1 = (idmef_checksum_t *) 0 ; idmef_checksum_t *arg2 = (idmef_checksum_t *) 0 ; int argvi = 0; int result; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: idmef_checksum_compare(obj1,obj2);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_checksum, 0) ) { croak("Expected type idmef_checksum_t const * for argument 1."); return; } } { if ( ! SvROK(ST(1)) ) { croak("Argument 2 is null."); return; } if ( SWIG_ConvertPtr(ST(1), (void **)&arg2, SWIGTYPE_p_idmef_checksum, 0) ) { croak("Expected type idmef_checksum_t const * for argument 2."); return; } } result = (int)idmef_checksum_compare((struct idmef_checksum const *)arg1,(struct idmef_checksum const *)arg2); { ST(argvi) = newSViv(result); argvi++; } XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_checksum_ref) { { idmef_checksum_t *arg1 = (idmef_checksum_t *) 0 ; int argvi = 0; idmef_checksum_t *result = 0 ; dXSARGS; if ((items < 1) || (items > 1)) { SWIG_croak("Usage: idmef_checksum_ref(checksum);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_checksum, 0) ) { croak("Expected type idmef_checksum_t * for argument 1."); return; } } result = (idmef_checksum_t *)idmef_checksum_ref(arg1); ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_idmef_checksum, 0 | 0); argvi++ ; XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_checksum_destroy) { { idmef_checksum_t *arg1 = (idmef_checksum_t *) 0 ; int argvi = 0; dXSARGS; if ((items < 1) || (items > 1)) { SWIG_croak("Usage: idmef_checksum_destroy(ptr);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_checksum, 0) ) { croak("Expected type idmef_checksum_t * for argument 1."); return; } } idmef_checksum_destroy(arg1); ST(argvi) = sv_newmortal(); XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_checksum_get_value) { { idmef_checksum_t *arg1 = (idmef_checksum_t *) 0 ; int argvi = 0; prelude_string_t *result = 0 ; dXSARGS; if ((items < 1) || (items > 1)) { SWIG_croak("Usage: idmef_checksum_get_value(ptr);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_checksum, 0) ) { croak("Expected type idmef_checksum_t * for argument 1."); return; } } result = (prelude_string_t *)idmef_checksum_get_value(arg1); { ST(argvi) = swig_perl_string(result); argvi++; } XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_checksum_set_value) { { idmef_checksum_t *arg1 = (idmef_checksum_t *) 0 ; prelude_string_t *arg2 = (prelude_string_t *) 0 ; int argvi = 0; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: idmef_checksum_set_value(ptr,value);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_checksum, 0) ) { croak("Expected type idmef_checksum_t * for argument 1."); return; } } { int ret; char *str; STRLEN len; str = SvPV(ST(1), len); ret = prelude_string_new_dup_fast(&(arg2), str, len); if ( ret < 0 ) { swig_perl_raise_error(ret); return; } } idmef_checksum_set_value(arg1,arg2); ST(argvi) = sv_newmortal(); XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_checksum_new_value) { { idmef_checksum_t *arg1 = (idmef_checksum_t *) 0 ; prelude_string_t **arg2 = (prelude_string_t **) 0 ; void *argp2 = 0 ; int res2 = 0 ; int argvi = 0; int result; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: idmef_checksum_new_value(ptr,ret);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_checksum, 0) ) { croak("Expected type idmef_checksum_t * for argument 1."); return; } } res2 = SWIG_ConvertPtr(ST(1), &argp2,SWIGTYPE_p_p_prelude_string_t, 0 | 0 ); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "idmef_checksum_new_value" "', argument " "2"" of type '" "prelude_string_t **""'"); } arg2 = (prelude_string_t **)(argp2); result = (int)idmef_checksum_new_value(arg1,arg2); { ST(argvi) = newSViv(result); argvi++; } XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_checksum_get_key) { { idmef_checksum_t *arg1 = (idmef_checksum_t *) 0 ; int argvi = 0; prelude_string_t *result = 0 ; dXSARGS; if ((items < 1) || (items > 1)) { SWIG_croak("Usage: idmef_checksum_get_key(ptr);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_checksum, 0) ) { croak("Expected type idmef_checksum_t * for argument 1."); return; } } result = (prelude_string_t *)idmef_checksum_get_key(arg1); { ST(argvi) = swig_perl_string(result); argvi++; } XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_checksum_set_key) { { idmef_checksum_t *arg1 = (idmef_checksum_t *) 0 ; prelude_string_t *arg2 = (prelude_string_t *) 0 ; int argvi = 0; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: idmef_checksum_set_key(ptr,key);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_checksum, 0) ) { croak("Expected type idmef_checksum_t * for argument 1."); return; } } { int ret; char *str; STRLEN len; str = SvPV(ST(1), len); ret = prelude_string_new_dup_fast(&(arg2), str, len); if ( ret < 0 ) { swig_perl_raise_error(ret); return; } } idmef_checksum_set_key(arg1,arg2); ST(argvi) = sv_newmortal(); XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_checksum_new_key) { { idmef_checksum_t *arg1 = (idmef_checksum_t *) 0 ; prelude_string_t **arg2 = (prelude_string_t **) 0 ; void *argp2 = 0 ; int res2 = 0 ; int argvi = 0; int result; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: idmef_checksum_new_key(ptr,ret);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_checksum, 0) ) { croak("Expected type idmef_checksum_t * for argument 1."); return; } } res2 = SWIG_ConvertPtr(ST(1), &argp2,SWIGTYPE_p_p_prelude_string_t, 0 | 0 ); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "idmef_checksum_new_key" "', argument " "2"" of type '" "prelude_string_t **""'"); } arg2 = (prelude_string_t **)(argp2); result = (int)idmef_checksum_new_key(arg1,arg2); { ST(argvi) = newSViv(result); argvi++; } XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_checksum_get_algorithm) { { idmef_checksum_t *arg1 = (idmef_checksum_t *) 0 ; int argvi = 0; idmef_checksum_algorithm_t result; dXSARGS; if ((items < 1) || (items > 1)) { SWIG_croak("Usage: idmef_checksum_get_algorithm(ptr);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_checksum, 0) ) { croak("Expected type idmef_checksum_t * for argument 1."); return; } } result = (idmef_checksum_algorithm_t)idmef_checksum_get_algorithm(arg1); ST(argvi) = SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(result)); argvi++ ; XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_checksum_set_algorithm) { { idmef_checksum_t *arg1 = (idmef_checksum_t *) 0 ; idmef_checksum_algorithm_t arg2 ; int val2 ; int ecode2 = 0 ; int argvi = 0; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: idmef_checksum_set_algorithm(ptr,algorithm);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_checksum, 0) ) { croak("Expected type idmef_checksum_t * for argument 1."); return; } } ecode2 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(1), &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "idmef_checksum_set_algorithm" "', argument " "2"" of type '" "idmef_checksum_algorithm_t""'"); } arg2 = (idmef_checksum_algorithm_t)(val2); idmef_checksum_set_algorithm(arg1,arg2); ST(argvi) = sv_newmortal(); XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_checksum_new_algorithm) { { idmef_checksum_t *arg1 = (idmef_checksum_t *) 0 ; idmef_checksum_algorithm_t **arg2 = (idmef_checksum_algorithm_t **) 0 ; void *argp2 = 0 ; int res2 = 0 ; int argvi = 0; int result; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: idmef_checksum_new_algorithm(ptr,ret);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_checksum, 0) ) { croak("Expected type idmef_checksum_t * for argument 1."); return; } } res2 = SWIG_ConvertPtr(ST(1), &argp2,SWIGTYPE_p_p_idmef_checksum_algorithm_t, 0 | 0 ); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "idmef_checksum_new_algorithm" "', argument " "2"" of type '" "idmef_checksum_algorithm_t **""'"); } arg2 = (idmef_checksum_algorithm_t **)(argp2); result = (int)idmef_checksum_new_algorithm(arg1,arg2); { ST(argvi) = newSViv(result); argvi++; } XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_file_category_to_numeric) { { char *arg1 = (char *) 0 ; int res1 ; char *buf1 = 0 ; int alloc1 = 0 ; int argvi = 0; idmef_file_category_t result; dXSARGS; if ((items < 1) || (items > 1)) { SWIG_croak("Usage: idmef_file_category_to_numeric(name);"); } res1 = SWIG_AsCharPtrAndSize(ST(0), &buf1, NULL, &alloc1); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "idmef_file_category_to_numeric" "', argument " "1"" of type '" "char const *""'"); } arg1 = (char *)(buf1); result = (idmef_file_category_t)idmef_file_category_to_numeric((char const *)arg1); ST(argvi) = SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(result)); argvi++ ; if (alloc1 == SWIG_NEWOBJ) free((char*)buf1); XSRETURN(argvi); fail: if (alloc1 == SWIG_NEWOBJ) free((char*)buf1); SWIG_croak_null(); } } XS(_wrap_idmef_file_category_to_string) { { idmef_file_category_t arg1 ; int val1 ; int ecode1 = 0 ; int argvi = 0; char *result = 0 ; dXSARGS; if ((items < 1) || (items > 1)) { SWIG_croak("Usage: idmef_file_category_to_string(val);"); } ecode1 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(0), &val1); if (!SWIG_IsOK(ecode1)) { SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "idmef_file_category_to_string" "', argument " "1"" of type '" "idmef_file_category_t""'"); } arg1 = (idmef_file_category_t)(val1); result = (char *)idmef_file_category_to_string(arg1); ST(argvi) = SWIG_FromCharPtr((const char *)result); argvi++ ; XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_file_fstype_to_numeric) { { char *arg1 = (char *) 0 ; int res1 ; char *buf1 = 0 ; int alloc1 = 0 ; int argvi = 0; idmef_file_fstype_t result; dXSARGS; if ((items < 1) || (items > 1)) { SWIG_croak("Usage: idmef_file_fstype_to_numeric(name);"); } res1 = SWIG_AsCharPtrAndSize(ST(0), &buf1, NULL, &alloc1); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "idmef_file_fstype_to_numeric" "', argument " "1"" of type '" "char const *""'"); } arg1 = (char *)(buf1); result = (idmef_file_fstype_t)idmef_file_fstype_to_numeric((char const *)arg1); ST(argvi) = SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(result)); argvi++ ; if (alloc1 == SWIG_NEWOBJ) free((char*)buf1); XSRETURN(argvi); fail: if (alloc1 == SWIG_NEWOBJ) free((char*)buf1); SWIG_croak_null(); } } XS(_wrap_idmef_file_fstype_to_string) { { idmef_file_fstype_t arg1 ; int val1 ; int ecode1 = 0 ; int argvi = 0; char *result = 0 ; dXSARGS; if ((items < 1) || (items > 1)) { SWIG_croak("Usage: idmef_file_fstype_to_string(val);"); } ecode1 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(0), &val1); if (!SWIG_IsOK(ecode1)) { SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "idmef_file_fstype_to_string" "', argument " "1"" of type '" "idmef_file_fstype_t""'"); } arg1 = (idmef_file_fstype_t)(val1); result = (char *)idmef_file_fstype_to_string(arg1); ST(argvi) = SWIG_FromCharPtr((const char *)result); argvi++ ; XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_file_new) { { idmef_file_t **arg1 = (idmef_file_t **) 0 ; idmef_file_t *tmp1 ; int argvi = 0; SV * _saved[1] ; int result; dXSARGS; if ((items < 1) || (items > 1)) { SWIG_croak("Usage: idmef_file_new(ret);"); } { arg1 = (idmef_file_t **) &tmp1; } _saved[0] = ST(0); result = (int)idmef_file_new(arg1); { ST(argvi) = newSViv(result); argvi++; } { SV *sv; if ( result >= 0 ) { if ( ! SvROK(_saved[0]) ) { croak("Argument 1 is not a reference."); return; } sv = SvRV(_saved[0]); sv_setsv(sv, SWIG_NewPointerObj((void *) * arg1, SWIGTYPE_p_idmef_file, 0)); } } XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_file_copy) { { idmef_file_t *arg1 = (idmef_file_t *) 0 ; idmef_file_t *arg2 = (idmef_file_t *) 0 ; int argvi = 0; int result; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: idmef_file_copy(src,dst);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_file, 0) ) { croak("Expected type idmef_file_t const * for argument 1."); return; } } { if ( ! SvROK(ST(1)) ) { croak("Argument 2 is null."); return; } if ( SWIG_ConvertPtr(ST(1), (void **)&arg2, SWIGTYPE_p_idmef_file, 0) ) { croak("Expected type idmef_file_t * for argument 2."); return; } } result = (int)idmef_file_copy((struct idmef_file const *)arg1,arg2); { ST(argvi) = newSViv(result); argvi++; } XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_file_clone) { { idmef_file_t *arg1 = (idmef_file_t *) 0 ; idmef_file_t **arg2 = (idmef_file_t **) 0 ; idmef_file_t *tmp2 ; int argvi = 0; SV * _saved[1] ; int result; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: idmef_file_clone(src,dst);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_file, 0) ) { croak("Expected type idmef_file_t * for argument 1."); return; } } { arg2 = (idmef_file_t **) &tmp2; } _saved[0] = ST(1); result = (int)idmef_file_clone(arg1,arg2); { ST(argvi) = newSViv(result); argvi++; } { SV *sv; if ( result >= 0 ) { if ( ! SvROK(_saved[0]) ) { croak("Argument 2 is not a reference."); return; } sv = SvRV(_saved[0]); sv_setsv(sv, SWIG_NewPointerObj((void *) * arg2, SWIGTYPE_p_idmef_file, 0)); } } XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_file_compare) { { idmef_file_t *arg1 = (idmef_file_t *) 0 ; idmef_file_t *arg2 = (idmef_file_t *) 0 ; int argvi = 0; int result; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: idmef_file_compare(obj1,obj2);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_file, 0) ) { croak("Expected type idmef_file_t const * for argument 1."); return; } } { if ( ! SvROK(ST(1)) ) { croak("Argument 2 is null."); return; } if ( SWIG_ConvertPtr(ST(1), (void **)&arg2, SWIGTYPE_p_idmef_file, 0) ) { croak("Expected type idmef_file_t const * for argument 2."); return; } } result = (int)idmef_file_compare((struct idmef_file const *)arg1,(struct idmef_file const *)arg2); { ST(argvi) = newSViv(result); argvi++; } XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_file_ref) { { idmef_file_t *arg1 = (idmef_file_t *) 0 ; int argvi = 0; idmef_file_t *result = 0 ; dXSARGS; if ((items < 1) || (items > 1)) { SWIG_croak("Usage: idmef_file_ref(file);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_file, 0) ) { croak("Expected type idmef_file_t * for argument 1."); return; } } result = (idmef_file_t *)idmef_file_ref(arg1); ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_idmef_file, 0 | 0); argvi++ ; XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_file_destroy) { { idmef_file_t *arg1 = (idmef_file_t *) 0 ; int argvi = 0; dXSARGS; if ((items < 1) || (items > 1)) { SWIG_croak("Usage: idmef_file_destroy(ptr);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_file, 0) ) { croak("Expected type idmef_file_t * for argument 1."); return; } } idmef_file_destroy(arg1); ST(argvi) = sv_newmortal(); XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_file_get_ident) { { idmef_file_t *arg1 = (idmef_file_t *) 0 ; int argvi = 0; prelude_string_t *result = 0 ; dXSARGS; if ((items < 1) || (items > 1)) { SWIG_croak("Usage: idmef_file_get_ident(ptr);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_file, 0) ) { croak("Expected type idmef_file_t * for argument 1."); return; } } result = (prelude_string_t *)idmef_file_get_ident(arg1); { ST(argvi) = swig_perl_string(result); argvi++; } XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_file_set_ident) { { idmef_file_t *arg1 = (idmef_file_t *) 0 ; prelude_string_t *arg2 = (prelude_string_t *) 0 ; int argvi = 0; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: idmef_file_set_ident(ptr,ident);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_file, 0) ) { croak("Expected type idmef_file_t * for argument 1."); return; } } { int ret; char *str; STRLEN len; str = SvPV(ST(1), len); ret = prelude_string_new_dup_fast(&(arg2), str, len); if ( ret < 0 ) { swig_perl_raise_error(ret); return; } } idmef_file_set_ident(arg1,arg2); ST(argvi) = sv_newmortal(); XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_file_new_ident) { { idmef_file_t *arg1 = (idmef_file_t *) 0 ; prelude_string_t **arg2 = (prelude_string_t **) 0 ; void *argp2 = 0 ; int res2 = 0 ; int argvi = 0; int result; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: idmef_file_new_ident(ptr,ret);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_file, 0) ) { croak("Expected type idmef_file_t * for argument 1."); return; } } res2 = SWIG_ConvertPtr(ST(1), &argp2,SWIGTYPE_p_p_prelude_string_t, 0 | 0 ); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "idmef_file_new_ident" "', argument " "2"" of type '" "prelude_string_t **""'"); } arg2 = (prelude_string_t **)(argp2); result = (int)idmef_file_new_ident(arg1,arg2); { ST(argvi) = newSViv(result); argvi++; } XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_file_get_name) { { idmef_file_t *arg1 = (idmef_file_t *) 0 ; int argvi = 0; prelude_string_t *result = 0 ; dXSARGS; if ((items < 1) || (items > 1)) { SWIG_croak("Usage: idmef_file_get_name(ptr);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_file, 0) ) { croak("Expected type idmef_file_t * for argument 1."); return; } } result = (prelude_string_t *)idmef_file_get_name(arg1); { ST(argvi) = swig_perl_string(result); argvi++; } XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_file_set_name) { { idmef_file_t *arg1 = (idmef_file_t *) 0 ; prelude_string_t *arg2 = (prelude_string_t *) 0 ; int argvi = 0; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: idmef_file_set_name(ptr,name);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_file, 0) ) { croak("Expected type idmef_file_t * for argument 1."); return; } } { int ret; char *str; STRLEN len; str = SvPV(ST(1), len); ret = prelude_string_new_dup_fast(&(arg2), str, len); if ( ret < 0 ) { swig_perl_raise_error(ret); return; } } idmef_file_set_name(arg1,arg2); ST(argvi) = sv_newmortal(); XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_file_new_name) { { idmef_file_t *arg1 = (idmef_file_t *) 0 ; prelude_string_t **arg2 = (prelude_string_t **) 0 ; void *argp2 = 0 ; int res2 = 0 ; int argvi = 0; int result; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: idmef_file_new_name(ptr,ret);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_file, 0) ) { croak("Expected type idmef_file_t * for argument 1."); return; } } res2 = SWIG_ConvertPtr(ST(1), &argp2,SWIGTYPE_p_p_prelude_string_t, 0 | 0 ); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "idmef_file_new_name" "', argument " "2"" of type '" "prelude_string_t **""'"); } arg2 = (prelude_string_t **)(argp2); result = (int)idmef_file_new_name(arg1,arg2); { ST(argvi) = newSViv(result); argvi++; } XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_file_get_path) { { idmef_file_t *arg1 = (idmef_file_t *) 0 ; int argvi = 0; prelude_string_t *result = 0 ; dXSARGS; if ((items < 1) || (items > 1)) { SWIG_croak("Usage: idmef_file_get_path(ptr);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_file, 0) ) { croak("Expected type idmef_file_t * for argument 1."); return; } } result = (prelude_string_t *)idmef_file_get_path(arg1); { ST(argvi) = swig_perl_string(result); argvi++; } XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_file_set_path) { { idmef_file_t *arg1 = (idmef_file_t *) 0 ; prelude_string_t *arg2 = (prelude_string_t *) 0 ; int argvi = 0; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: idmef_file_set_path(ptr,path);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_file, 0) ) { croak("Expected type idmef_file_t * for argument 1."); return; } } { int ret; char *str; STRLEN len; str = SvPV(ST(1), len); ret = prelude_string_new_dup_fast(&(arg2), str, len); if ( ret < 0 ) { swig_perl_raise_error(ret); return; } } idmef_file_set_path(arg1,arg2); ST(argvi) = sv_newmortal(); XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_file_new_path) { { idmef_file_t *arg1 = (idmef_file_t *) 0 ; prelude_string_t **arg2 = (prelude_string_t **) 0 ; void *argp2 = 0 ; int res2 = 0 ; int argvi = 0; int result; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: idmef_file_new_path(ptr,ret);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_file, 0) ) { croak("Expected type idmef_file_t * for argument 1."); return; } } res2 = SWIG_ConvertPtr(ST(1), &argp2,SWIGTYPE_p_p_prelude_string_t, 0 | 0 ); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "idmef_file_new_path" "', argument " "2"" of type '" "prelude_string_t **""'"); } arg2 = (prelude_string_t **)(argp2); result = (int)idmef_file_new_path(arg1,arg2); { ST(argvi) = newSViv(result); argvi++; } XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_file_get_create_time) { { idmef_file_t *arg1 = (idmef_file_t *) 0 ; int argvi = 0; idmef_time_t *result = 0 ; dXSARGS; if ((items < 1) || (items > 1)) { SWIG_croak("Usage: idmef_file_get_create_time(ptr);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_file, 0) ) { croak("Expected type idmef_file_t * for argument 1."); return; } } result = (idmef_time_t *)idmef_file_get_create_time(arg1); ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_idmef_time, 0 | SWIG_SHADOW); argvi++ ; XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_file_set_create_time) { { idmef_file_t *arg1 = (idmef_file_t *) 0 ; idmef_time_t *arg2 = (idmef_time_t *) 0 ; int argvi = 0; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: idmef_file_set_create_time(ptr,create_time);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_file, 0) ) { croak("Expected type idmef_file_t * for argument 1."); return; } } { if ( ! SvROK(ST(1)) ) { croak("Argument 2 is null."); return; } if ( SWIG_ConvertPtr(ST(1), (void **)&arg2, SWIGTYPE_p_idmef_time, 0) ) { croak("Expected type idmef_time_t * for argument 2."); return; } } idmef_file_set_create_time(arg1,arg2); ST(argvi) = sv_newmortal(); XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_file_new_create_time) { { idmef_file_t *arg1 = (idmef_file_t *) 0 ; idmef_time_t **arg2 = (idmef_time_t **) 0 ; idmef_time_t *tmp2 ; int argvi = 0; SV * _saved[1] ; int result; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: idmef_file_new_create_time(ptr,ret);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_file, 0) ) { croak("Expected type idmef_file_t * for argument 1."); return; } } { arg2 = (idmef_time_t **) &tmp2; } _saved[0] = ST(1); result = (int)idmef_file_new_create_time(arg1,arg2); { ST(argvi) = newSViv(result); argvi++; } { SV *sv; if ( result >= 0 ) { if ( ! SvROK(_saved[0]) ) { croak("Argument 2 is not a reference."); return; } sv = SvRV(_saved[0]); sv_setsv(sv, SWIG_NewPointerObj((void *) * arg2, SWIGTYPE_p_idmef_time, 0)); } } XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_file_get_modify_time) { { idmef_file_t *arg1 = (idmef_file_t *) 0 ; int argvi = 0; idmef_time_t *result = 0 ; dXSARGS; if ((items < 1) || (items > 1)) { SWIG_croak("Usage: idmef_file_get_modify_time(ptr);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_file, 0) ) { croak("Expected type idmef_file_t * for argument 1."); return; } } result = (idmef_time_t *)idmef_file_get_modify_time(arg1); ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_idmef_time, 0 | SWIG_SHADOW); argvi++ ; XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_file_set_modify_time) { { idmef_file_t *arg1 = (idmef_file_t *) 0 ; idmef_time_t *arg2 = (idmef_time_t *) 0 ; int argvi = 0; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: idmef_file_set_modify_time(ptr,modify_time);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_file, 0) ) { croak("Expected type idmef_file_t * for argument 1."); return; } } { if ( ! SvROK(ST(1)) ) { croak("Argument 2 is null."); return; } if ( SWIG_ConvertPtr(ST(1), (void **)&arg2, SWIGTYPE_p_idmef_time, 0) ) { croak("Expected type idmef_time_t * for argument 2."); return; } } idmef_file_set_modify_time(arg1,arg2); ST(argvi) = sv_newmortal(); XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_file_new_modify_time) { { idmef_file_t *arg1 = (idmef_file_t *) 0 ; idmef_time_t **arg2 = (idmef_time_t **) 0 ; idmef_time_t *tmp2 ; int argvi = 0; SV * _saved[1] ; int result; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: idmef_file_new_modify_time(ptr,ret);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_file, 0) ) { croak("Expected type idmef_file_t * for argument 1."); return; } } { arg2 = (idmef_time_t **) &tmp2; } _saved[0] = ST(1); result = (int)idmef_file_new_modify_time(arg1,arg2); { ST(argvi) = newSViv(result); argvi++; } { SV *sv; if ( result >= 0 ) { if ( ! SvROK(_saved[0]) ) { croak("Argument 2 is not a reference."); return; } sv = SvRV(_saved[0]); sv_setsv(sv, SWIG_NewPointerObj((void *) * arg2, SWIGTYPE_p_idmef_time, 0)); } } XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_file_get_access_time) { { idmef_file_t *arg1 = (idmef_file_t *) 0 ; int argvi = 0; idmef_time_t *result = 0 ; dXSARGS; if ((items < 1) || (items > 1)) { SWIG_croak("Usage: idmef_file_get_access_time(ptr);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_file, 0) ) { croak("Expected type idmef_file_t * for argument 1."); return; } } result = (idmef_time_t *)idmef_file_get_access_time(arg1); ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_idmef_time, 0 | SWIG_SHADOW); argvi++ ; XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_file_set_access_time) { { idmef_file_t *arg1 = (idmef_file_t *) 0 ; idmef_time_t *arg2 = (idmef_time_t *) 0 ; int argvi = 0; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: idmef_file_set_access_time(ptr,access_time);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_file, 0) ) { croak("Expected type idmef_file_t * for argument 1."); return; } } { if ( ! SvROK(ST(1)) ) { croak("Argument 2 is null."); return; } if ( SWIG_ConvertPtr(ST(1), (void **)&arg2, SWIGTYPE_p_idmef_time, 0) ) { croak("Expected type idmef_time_t * for argument 2."); return; } } idmef_file_set_access_time(arg1,arg2); ST(argvi) = sv_newmortal(); XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_file_new_access_time) { { idmef_file_t *arg1 = (idmef_file_t *) 0 ; idmef_time_t **arg2 = (idmef_time_t **) 0 ; idmef_time_t *tmp2 ; int argvi = 0; SV * _saved[1] ; int result; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: idmef_file_new_access_time(ptr,ret);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_file, 0) ) { croak("Expected type idmef_file_t * for argument 1."); return; } } { arg2 = (idmef_time_t **) &tmp2; } _saved[0] = ST(1); result = (int)idmef_file_new_access_time(arg1,arg2); { ST(argvi) = newSViv(result); argvi++; } { SV *sv; if ( result >= 0 ) { if ( ! SvROK(_saved[0]) ) { croak("Argument 2 is not a reference."); return; } sv = SvRV(_saved[0]); sv_setsv(sv, SWIG_NewPointerObj((void *) * arg2, SWIGTYPE_p_idmef_time, 0)); } } XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_file_unset_data_size) { { idmef_file_t *arg1 = (idmef_file_t *) 0 ; int argvi = 0; dXSARGS; if ((items < 1) || (items > 1)) { SWIG_croak("Usage: idmef_file_unset_data_size(ptr);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_file, 0) ) { croak("Expected type idmef_file_t * for argument 1."); return; } } idmef_file_unset_data_size(arg1); ST(argvi) = sv_newmortal(); XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_file_get_data_size) { { idmef_file_t *arg1 = (idmef_file_t *) 0 ; int argvi = 0; uint64_t *result = 0 ; dXSARGS; if ((items < 1) || (items > 1)) { SWIG_croak("Usage: idmef_file_get_data_size(ptr);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_file, 0) ) { croak("Expected type idmef_file_t * for argument 1."); return; } } result = (uint64_t *)idmef_file_get_data_size(arg1); { if ( result != NULL ) { ST(argvi) = newSVuv(*result); } else { SvREFCNT_inc (& PL_sv_undef); ST(argvi) = &PL_sv_undef; } } XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_file_set_data_size) { { idmef_file_t *arg1 = (idmef_file_t *) 0 ; uint64_t arg2 ; unsigned long long val2 ; int ecode2 = 0 ; int argvi = 0; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: idmef_file_set_data_size(ptr,data_size);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_file, 0) ) { croak("Expected type idmef_file_t * for argument 1."); return; } } ecode2 = SWIG_AsVal_unsigned_SS_long_SS_long SWIG_PERL_CALL_ARGS_2(ST(1), &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "idmef_file_set_data_size" "', argument " "2"" of type '" "uint64_t""'"); } arg2 = (uint64_t)(val2); idmef_file_set_data_size(arg1,arg2); ST(argvi) = sv_newmortal(); XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_file_new_data_size) { { idmef_file_t *arg1 = (idmef_file_t *) 0 ; uint64_t **arg2 = (uint64_t **) 0 ; void *argp2 = 0 ; int res2 = 0 ; int argvi = 0; int result; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: idmef_file_new_data_size(ptr,ret);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_file, 0) ) { croak("Expected type idmef_file_t * for argument 1."); return; } } res2 = SWIG_ConvertPtr(ST(1), &argp2,SWIGTYPE_p_p_unsigned_long_long, 0 | 0 ); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "idmef_file_new_data_size" "', argument " "2"" of type '" "uint64_t **""'"); } arg2 = (uint64_t **)(argp2); result = (int)idmef_file_new_data_size(arg1,arg2); { ST(argvi) = newSViv(result); argvi++; } XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_file_unset_disk_size) { { idmef_file_t *arg1 = (idmef_file_t *) 0 ; int argvi = 0; dXSARGS; if ((items < 1) || (items > 1)) { SWIG_croak("Usage: idmef_file_unset_disk_size(ptr);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_file, 0) ) { croak("Expected type idmef_file_t * for argument 1."); return; } } idmef_file_unset_disk_size(arg1); ST(argvi) = sv_newmortal(); XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_file_get_disk_size) { { idmef_file_t *arg1 = (idmef_file_t *) 0 ; int argvi = 0; uint64_t *result = 0 ; dXSARGS; if ((items < 1) || (items > 1)) { SWIG_croak("Usage: idmef_file_get_disk_size(ptr);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_file, 0) ) { croak("Expected type idmef_file_t * for argument 1."); return; } } result = (uint64_t *)idmef_file_get_disk_size(arg1); { if ( result != NULL ) { ST(argvi) = newSVuv(*result); } else { SvREFCNT_inc (& PL_sv_undef); ST(argvi) = &PL_sv_undef; } } XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_file_set_disk_size) { { idmef_file_t *arg1 = (idmef_file_t *) 0 ; uint64_t arg2 ; unsigned long long val2 ; int ecode2 = 0 ; int argvi = 0; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: idmef_file_set_disk_size(ptr,disk_size);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_file, 0) ) { croak("Expected type idmef_file_t * for argument 1."); return; } } ecode2 = SWIG_AsVal_unsigned_SS_long_SS_long SWIG_PERL_CALL_ARGS_2(ST(1), &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "idmef_file_set_disk_size" "', argument " "2"" of type '" "uint64_t""'"); } arg2 = (uint64_t)(val2); idmef_file_set_disk_size(arg1,arg2); ST(argvi) = sv_newmortal(); XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_file_new_disk_size) { { idmef_file_t *arg1 = (idmef_file_t *) 0 ; uint64_t **arg2 = (uint64_t **) 0 ; void *argp2 = 0 ; int res2 = 0 ; int argvi = 0; int result; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: idmef_file_new_disk_size(ptr,ret);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_file, 0) ) { croak("Expected type idmef_file_t * for argument 1."); return; } } res2 = SWIG_ConvertPtr(ST(1), &argp2,SWIGTYPE_p_p_unsigned_long_long, 0 | 0 ); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "idmef_file_new_disk_size" "', argument " "2"" of type '" "uint64_t **""'"); } arg2 = (uint64_t **)(argp2); result = (int)idmef_file_new_disk_size(arg1,arg2); { ST(argvi) = newSViv(result); argvi++; } XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_file_get_next_file_access) { { idmef_file_t *arg1 = (idmef_file_t *) 0 ; idmef_file_access_t *arg2 = (idmef_file_access_t *) 0 ; int argvi = 0; idmef_file_access_t *result = 0 ; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: idmef_file_get_next_file_access(file,file_access_cur);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_file, 0) ) { croak("Expected type idmef_file_t * for argument 1."); return; } } { if ( ! SvOK(ST(1)) ) { arg2 = NULL; } else { if ( SWIG_ConvertPtr(ST(1), (void **)&arg2, SWIGTYPE_p_idmef_file_access, 0) ) { croak("Expected type idmef_file_access_t * for argument 2."); return; } } } result = (idmef_file_access_t *)idmef_file_get_next_file_access(arg1,arg2); ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_idmef_file_access, 0 | 0); argvi++ ; XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_file_set_file_access) { { idmef_file_t *arg1 = (idmef_file_t *) 0 ; idmef_file_access_t *arg2 = (idmef_file_access_t *) 0 ; int arg3 ; int val3 ; int ecode3 = 0 ; int argvi = 0; dXSARGS; if ((items < 3) || (items > 3)) { SWIG_croak("Usage: idmef_file_set_file_access(ptr,object,pos);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_file, 0) ) { croak("Expected type idmef_file_t * for argument 1."); return; } } { if ( ! SvROK(ST(1)) ) { croak("Argument 2 is null."); return; } if ( SWIG_ConvertPtr(ST(1), (void **)&arg2, SWIGTYPE_p_idmef_file_access, 0) ) { croak("Expected type idmef_file_access_t * for argument 2."); return; } } ecode3 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(2), &val3); if (!SWIG_IsOK(ecode3)) { SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "idmef_file_set_file_access" "', argument " "3"" of type '" "int""'"); } arg3 = (int)(val3); idmef_file_set_file_access(arg1,arg2,arg3); ST(argvi) = sv_newmortal(); XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_file_new_file_access) { { idmef_file_t *arg1 = (idmef_file_t *) 0 ; idmef_file_access_t **arg2 = (idmef_file_access_t **) 0 ; int arg3 ; idmef_file_access_t *tmp2 ; int val3 ; int ecode3 = 0 ; int argvi = 0; SV * _saved[1] ; int result; dXSARGS; if ((items < 3) || (items > 3)) { SWIG_croak("Usage: idmef_file_new_file_access(ptr,ret,pos);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_file, 0) ) { croak("Expected type idmef_file_t * for argument 1."); return; } } { arg2 = (idmef_file_access_t **) &tmp2; } ecode3 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(2), &val3); if (!SWIG_IsOK(ecode3)) { SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "idmef_file_new_file_access" "', argument " "3"" of type '" "int""'"); } arg3 = (int)(val3); _saved[0] = ST(1); result = (int)idmef_file_new_file_access(arg1,arg2,arg3); { ST(argvi) = newSViv(result); argvi++; } { SV *sv; if ( result >= 0 ) { if ( ! SvROK(_saved[0]) ) { croak("Argument 2 is not a reference."); return; } sv = SvRV(_saved[0]); sv_setsv(sv, SWIG_NewPointerObj((void *) * arg2, SWIGTYPE_p_idmef_file_access, 0)); } } XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_file_get_next_linkage) { { idmef_file_t *arg1 = (idmef_file_t *) 0 ; idmef_linkage_t *arg2 = (idmef_linkage_t *) 0 ; int argvi = 0; idmef_linkage_t *result = 0 ; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: idmef_file_get_next_linkage(file,linkage_cur);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_file, 0) ) { croak("Expected type idmef_file_t * for argument 1."); return; } } { if ( ! SvOK(ST(1)) ) { arg2 = NULL; } else { if ( SWIG_ConvertPtr(ST(1), (void **)&arg2, SWIGTYPE_p_idmef_linkage, 0) ) { croak("Expected type idmef_linkage_t * for argument 2."); return; } } } result = (idmef_linkage_t *)idmef_file_get_next_linkage(arg1,arg2); ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_idmef_linkage, 0 | 0); argvi++ ; XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_file_set_linkage) { { idmef_file_t *arg1 = (idmef_file_t *) 0 ; idmef_linkage_t *arg2 = (idmef_linkage_t *) 0 ; int arg3 ; int val3 ; int ecode3 = 0 ; int argvi = 0; dXSARGS; if ((items < 3) || (items > 3)) { SWIG_croak("Usage: idmef_file_set_linkage(ptr,object,pos);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_file, 0) ) { croak("Expected type idmef_file_t * for argument 1."); return; } } { if ( ! SvROK(ST(1)) ) { croak("Argument 2 is null."); return; } if ( SWIG_ConvertPtr(ST(1), (void **)&arg2, SWIGTYPE_p_idmef_linkage, 0) ) { croak("Expected type idmef_linkage_t * for argument 2."); return; } } ecode3 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(2), &val3); if (!SWIG_IsOK(ecode3)) { SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "idmef_file_set_linkage" "', argument " "3"" of type '" "int""'"); } arg3 = (int)(val3); idmef_file_set_linkage(arg1,arg2,arg3); ST(argvi) = sv_newmortal(); XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_file_new_linkage) { { idmef_file_t *arg1 = (idmef_file_t *) 0 ; idmef_linkage_t **arg2 = (idmef_linkage_t **) 0 ; int arg3 ; idmef_linkage_t *tmp2 ; int val3 ; int ecode3 = 0 ; int argvi = 0; SV * _saved[1] ; int result; dXSARGS; if ((items < 3) || (items > 3)) { SWIG_croak("Usage: idmef_file_new_linkage(ptr,ret,pos);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_file, 0) ) { croak("Expected type idmef_file_t * for argument 1."); return; } } { arg2 = (idmef_linkage_t **) &tmp2; } ecode3 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(2), &val3); if (!SWIG_IsOK(ecode3)) { SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "idmef_file_new_linkage" "', argument " "3"" of type '" "int""'"); } arg3 = (int)(val3); _saved[0] = ST(1); result = (int)idmef_file_new_linkage(arg1,arg2,arg3); { ST(argvi) = newSViv(result); argvi++; } { SV *sv; if ( result >= 0 ) { if ( ! SvROK(_saved[0]) ) { croak("Argument 2 is not a reference."); return; } sv = SvRV(_saved[0]); sv_setsv(sv, SWIG_NewPointerObj((void *) * arg2, SWIGTYPE_p_idmef_linkage, 0)); } } XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_file_get_inode) { { idmef_file_t *arg1 = (idmef_file_t *) 0 ; int argvi = 0; idmef_inode_t *result = 0 ; dXSARGS; if ((items < 1) || (items > 1)) { SWIG_croak("Usage: idmef_file_get_inode(ptr);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_file, 0) ) { croak("Expected type idmef_file_t * for argument 1."); return; } } result = (idmef_inode_t *)idmef_file_get_inode(arg1); ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_idmef_inode, 0 | 0); argvi++ ; XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_file_set_inode) { { idmef_file_t *arg1 = (idmef_file_t *) 0 ; idmef_inode_t *arg2 = (idmef_inode_t *) 0 ; int argvi = 0; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: idmef_file_set_inode(ptr,inode);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_file, 0) ) { croak("Expected type idmef_file_t * for argument 1."); return; } } { if ( ! SvROK(ST(1)) ) { croak("Argument 2 is null."); return; } if ( SWIG_ConvertPtr(ST(1), (void **)&arg2, SWIGTYPE_p_idmef_inode, 0) ) { croak("Expected type idmef_inode_t * for argument 2."); return; } } idmef_file_set_inode(arg1,arg2); ST(argvi) = sv_newmortal(); XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_file_new_inode) { { idmef_file_t *arg1 = (idmef_file_t *) 0 ; idmef_inode_t **arg2 = (idmef_inode_t **) 0 ; idmef_inode_t *tmp2 ; int argvi = 0; SV * _saved[1] ; int result; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: idmef_file_new_inode(ptr,ret);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_file, 0) ) { croak("Expected type idmef_file_t * for argument 1."); return; } } { arg2 = (idmef_inode_t **) &tmp2; } _saved[0] = ST(1); result = (int)idmef_file_new_inode(arg1,arg2); { ST(argvi) = newSViv(result); argvi++; } { SV *sv; if ( result >= 0 ) { if ( ! SvROK(_saved[0]) ) { croak("Argument 2 is not a reference."); return; } sv = SvRV(_saved[0]); sv_setsv(sv, SWIG_NewPointerObj((void *) * arg2, SWIGTYPE_p_idmef_inode, 0)); } } XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_file_get_next_checksum) { { idmef_file_t *arg1 = (idmef_file_t *) 0 ; idmef_checksum_t *arg2 = (idmef_checksum_t *) 0 ; int argvi = 0; idmef_checksum_t *result = 0 ; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: idmef_file_get_next_checksum(file,checksum_cur);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_file, 0) ) { croak("Expected type idmef_file_t * for argument 1."); return; } } { if ( ! SvOK(ST(1)) ) { arg2 = NULL; } else { if ( SWIG_ConvertPtr(ST(1), (void **)&arg2, SWIGTYPE_p_idmef_checksum, 0) ) { croak("Expected type idmef_checksum_t * for argument 2."); return; } } } result = (idmef_checksum_t *)idmef_file_get_next_checksum(arg1,arg2); ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_idmef_checksum, 0 | 0); argvi++ ; XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_file_set_checksum) { { idmef_file_t *arg1 = (idmef_file_t *) 0 ; idmef_checksum_t *arg2 = (idmef_checksum_t *) 0 ; int arg3 ; int val3 ; int ecode3 = 0 ; int argvi = 0; dXSARGS; if ((items < 3) || (items > 3)) { SWIG_croak("Usage: idmef_file_set_checksum(ptr,object,pos);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_file, 0) ) { croak("Expected type idmef_file_t * for argument 1."); return; } } { if ( ! SvROK(ST(1)) ) { croak("Argument 2 is null."); return; } if ( SWIG_ConvertPtr(ST(1), (void **)&arg2, SWIGTYPE_p_idmef_checksum, 0) ) { croak("Expected type idmef_checksum_t * for argument 2."); return; } } ecode3 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(2), &val3); if (!SWIG_IsOK(ecode3)) { SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "idmef_file_set_checksum" "', argument " "3"" of type '" "int""'"); } arg3 = (int)(val3); idmef_file_set_checksum(arg1,arg2,arg3); ST(argvi) = sv_newmortal(); XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_file_new_checksum) { { idmef_file_t *arg1 = (idmef_file_t *) 0 ; idmef_checksum_t **arg2 = (idmef_checksum_t **) 0 ; int arg3 ; idmef_checksum_t *tmp2 ; int val3 ; int ecode3 = 0 ; int argvi = 0; SV * _saved[1] ; int result; dXSARGS; if ((items < 3) || (items > 3)) { SWIG_croak("Usage: idmef_file_new_checksum(ptr,ret,pos);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_file, 0) ) { croak("Expected type idmef_file_t * for argument 1."); return; } } { arg2 = (idmef_checksum_t **) &tmp2; } ecode3 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(2), &val3); if (!SWIG_IsOK(ecode3)) { SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "idmef_file_new_checksum" "', argument " "3"" of type '" "int""'"); } arg3 = (int)(val3); _saved[0] = ST(1); result = (int)idmef_file_new_checksum(arg1,arg2,arg3); { ST(argvi) = newSViv(result); argvi++; } { SV *sv; if ( result >= 0 ) { if ( ! SvROK(_saved[0]) ) { croak("Argument 2 is not a reference."); return; } sv = SvRV(_saved[0]); sv_setsv(sv, SWIG_NewPointerObj((void *) * arg2, SWIGTYPE_p_idmef_checksum, 0)); } } XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_file_get_category) { { idmef_file_t *arg1 = (idmef_file_t *) 0 ; int argvi = 0; idmef_file_category_t result; dXSARGS; if ((items < 1) || (items > 1)) { SWIG_croak("Usage: idmef_file_get_category(ptr);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_file, 0) ) { croak("Expected type idmef_file_t * for argument 1."); return; } } result = (idmef_file_category_t)idmef_file_get_category(arg1); ST(argvi) = SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(result)); argvi++ ; XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_file_set_category) { { idmef_file_t *arg1 = (idmef_file_t *) 0 ; idmef_file_category_t arg2 ; int val2 ; int ecode2 = 0 ; int argvi = 0; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: idmef_file_set_category(ptr,category);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_file, 0) ) { croak("Expected type idmef_file_t * for argument 1."); return; } } ecode2 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(1), &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "idmef_file_set_category" "', argument " "2"" of type '" "idmef_file_category_t""'"); } arg2 = (idmef_file_category_t)(val2); idmef_file_set_category(arg1,arg2); ST(argvi) = sv_newmortal(); XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_file_new_category) { { idmef_file_t *arg1 = (idmef_file_t *) 0 ; idmef_file_category_t **arg2 = (idmef_file_category_t **) 0 ; void *argp2 = 0 ; int res2 = 0 ; int argvi = 0; int result; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: idmef_file_new_category(ptr,ret);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_file, 0) ) { croak("Expected type idmef_file_t * for argument 1."); return; } } res2 = SWIG_ConvertPtr(ST(1), &argp2,SWIGTYPE_p_p_idmef_file_category_t, 0 | 0 ); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "idmef_file_new_category" "', argument " "2"" of type '" "idmef_file_category_t **""'"); } arg2 = (idmef_file_category_t **)(argp2); result = (int)idmef_file_new_category(arg1,arg2); { ST(argvi) = newSViv(result); argvi++; } XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_file_unset_fstype) { { idmef_file_t *arg1 = (idmef_file_t *) 0 ; int argvi = 0; dXSARGS; if ((items < 1) || (items > 1)) { SWIG_croak("Usage: idmef_file_unset_fstype(ptr);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_file, 0) ) { croak("Expected type idmef_file_t * for argument 1."); return; } } idmef_file_unset_fstype(arg1); ST(argvi) = sv_newmortal(); XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_file_get_fstype) { { idmef_file_t *arg1 = (idmef_file_t *) 0 ; int argvi = 0; idmef_file_fstype_t *result = 0 ; dXSARGS; if ((items < 1) || (items > 1)) { SWIG_croak("Usage: idmef_file_get_fstype(ptr);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_file, 0) ) { croak("Expected type idmef_file_t * for argument 1."); return; } } result = (idmef_file_fstype_t *)idmef_file_get_fstype(arg1); ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_idmef_file_fstype_t, 0 | 0); argvi++ ; XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_file_set_fstype) { { idmef_file_t *arg1 = (idmef_file_t *) 0 ; idmef_file_fstype_t arg2 ; int val2 ; int ecode2 = 0 ; int argvi = 0; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: idmef_file_set_fstype(ptr,fstype);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_file, 0) ) { croak("Expected type idmef_file_t * for argument 1."); return; } } ecode2 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(1), &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "idmef_file_set_fstype" "', argument " "2"" of type '" "idmef_file_fstype_t""'"); } arg2 = (idmef_file_fstype_t)(val2); idmef_file_set_fstype(arg1,arg2); ST(argvi) = sv_newmortal(); XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_file_new_fstype) { { idmef_file_t *arg1 = (idmef_file_t *) 0 ; idmef_file_fstype_t **arg2 = (idmef_file_fstype_t **) 0 ; void *argp2 = 0 ; int res2 = 0 ; int argvi = 0; int result; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: idmef_file_new_fstype(ptr,ret);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_file, 0) ) { croak("Expected type idmef_file_t * for argument 1."); return; } } res2 = SWIG_ConvertPtr(ST(1), &argp2,SWIGTYPE_p_p_idmef_file_fstype_t, 0 | 0 ); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "idmef_file_new_fstype" "', argument " "2"" of type '" "idmef_file_fstype_t **""'"); } arg2 = (idmef_file_fstype_t **)(argp2); result = (int)idmef_file_new_fstype(arg1,arg2); { ST(argvi) = newSViv(result); argvi++; } XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_file_get_file_type) { { idmef_file_t *arg1 = (idmef_file_t *) 0 ; int argvi = 0; prelude_string_t *result = 0 ; dXSARGS; if ((items < 1) || (items > 1)) { SWIG_croak("Usage: idmef_file_get_file_type(ptr);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_file, 0) ) { croak("Expected type idmef_file_t * for argument 1."); return; } } result = (prelude_string_t *)idmef_file_get_file_type(arg1); { ST(argvi) = swig_perl_string(result); argvi++; } XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_file_set_file_type) { { idmef_file_t *arg1 = (idmef_file_t *) 0 ; prelude_string_t *arg2 = (prelude_string_t *) 0 ; int argvi = 0; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: idmef_file_set_file_type(ptr,file_type);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_file, 0) ) { croak("Expected type idmef_file_t * for argument 1."); return; } } { int ret; char *str; STRLEN len; str = SvPV(ST(1), len); ret = prelude_string_new_dup_fast(&(arg2), str, len); if ( ret < 0 ) { swig_perl_raise_error(ret); return; } } idmef_file_set_file_type(arg1,arg2); ST(argvi) = sv_newmortal(); XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_file_new_file_type) { { idmef_file_t *arg1 = (idmef_file_t *) 0 ; prelude_string_t **arg2 = (prelude_string_t **) 0 ; void *argp2 = 0 ; int res2 = 0 ; int argvi = 0; int result; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: idmef_file_new_file_type(ptr,ret);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_file, 0) ) { croak("Expected type idmef_file_t * for argument 1."); return; } } res2 = SWIG_ConvertPtr(ST(1), &argp2,SWIGTYPE_p_p_prelude_string_t, 0 | 0 ); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "idmef_file_new_file_type" "', argument " "2"" of type '" "prelude_string_t **""'"); } arg2 = (prelude_string_t **)(argp2); result = (int)idmef_file_new_file_type(arg1,arg2); { ST(argvi) = newSViv(result); argvi++; } XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_linkage_category_to_numeric) { { char *arg1 = (char *) 0 ; int res1 ; char *buf1 = 0 ; int alloc1 = 0 ; int argvi = 0; idmef_linkage_category_t result; dXSARGS; if ((items < 1) || (items > 1)) { SWIG_croak("Usage: idmef_linkage_category_to_numeric(name);"); } res1 = SWIG_AsCharPtrAndSize(ST(0), &buf1, NULL, &alloc1); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "idmef_linkage_category_to_numeric" "', argument " "1"" of type '" "char const *""'"); } arg1 = (char *)(buf1); result = (idmef_linkage_category_t)idmef_linkage_category_to_numeric((char const *)arg1); ST(argvi) = SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(result)); argvi++ ; if (alloc1 == SWIG_NEWOBJ) free((char*)buf1); XSRETURN(argvi); fail: if (alloc1 == SWIG_NEWOBJ) free((char*)buf1); SWIG_croak_null(); } } XS(_wrap_idmef_linkage_category_to_string) { { idmef_linkage_category_t arg1 ; int val1 ; int ecode1 = 0 ; int argvi = 0; char *result = 0 ; dXSARGS; if ((items < 1) || (items > 1)) { SWIG_croak("Usage: idmef_linkage_category_to_string(val);"); } ecode1 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(0), &val1); if (!SWIG_IsOK(ecode1)) { SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "idmef_linkage_category_to_string" "', argument " "1"" of type '" "idmef_linkage_category_t""'"); } arg1 = (idmef_linkage_category_t)(val1); result = (char *)idmef_linkage_category_to_string(arg1); ST(argvi) = SWIG_FromCharPtr((const char *)result); argvi++ ; XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_linkage_new) { { idmef_linkage_t **arg1 = (idmef_linkage_t **) 0 ; idmef_linkage_t *tmp1 ; int argvi = 0; SV * _saved[1] ; int result; dXSARGS; if ((items < 1) || (items > 1)) { SWIG_croak("Usage: idmef_linkage_new(ret);"); } { arg1 = (idmef_linkage_t **) &tmp1; } _saved[0] = ST(0); result = (int)idmef_linkage_new(arg1); { ST(argvi) = newSViv(result); argvi++; } { SV *sv; if ( result >= 0 ) { if ( ! SvROK(_saved[0]) ) { croak("Argument 1 is not a reference."); return; } sv = SvRV(_saved[0]); sv_setsv(sv, SWIG_NewPointerObj((void *) * arg1, SWIGTYPE_p_idmef_linkage, 0)); } } XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_linkage_copy) { { idmef_linkage_t *arg1 = (idmef_linkage_t *) 0 ; idmef_linkage_t *arg2 = (idmef_linkage_t *) 0 ; int argvi = 0; int result; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: idmef_linkage_copy(src,dst);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_linkage, 0) ) { croak("Expected type idmef_linkage_t const * for argument 1."); return; } } { if ( ! SvROK(ST(1)) ) { croak("Argument 2 is null."); return; } if ( SWIG_ConvertPtr(ST(1), (void **)&arg2, SWIGTYPE_p_idmef_linkage, 0) ) { croak("Expected type idmef_linkage_t * for argument 2."); return; } } result = (int)idmef_linkage_copy((struct idmef_linkage const *)arg1,arg2); { ST(argvi) = newSViv(result); argvi++; } XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_linkage_clone) { { idmef_linkage_t *arg1 = (idmef_linkage_t *) 0 ; idmef_linkage_t **arg2 = (idmef_linkage_t **) 0 ; idmef_linkage_t *tmp2 ; int argvi = 0; SV * _saved[1] ; int result; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: idmef_linkage_clone(src,dst);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_linkage, 0) ) { croak("Expected type idmef_linkage_t * for argument 1."); return; } } { arg2 = (idmef_linkage_t **) &tmp2; } _saved[0] = ST(1); result = (int)idmef_linkage_clone(arg1,arg2); { ST(argvi) = newSViv(result); argvi++; } { SV *sv; if ( result >= 0 ) { if ( ! SvROK(_saved[0]) ) { croak("Argument 2 is not a reference."); return; } sv = SvRV(_saved[0]); sv_setsv(sv, SWIG_NewPointerObj((void *) * arg2, SWIGTYPE_p_idmef_linkage, 0)); } } XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_linkage_compare) { { idmef_linkage_t *arg1 = (idmef_linkage_t *) 0 ; idmef_linkage_t *arg2 = (idmef_linkage_t *) 0 ; int argvi = 0; int result; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: idmef_linkage_compare(obj1,obj2);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_linkage, 0) ) { croak("Expected type idmef_linkage_t const * for argument 1."); return; } } { if ( ! SvROK(ST(1)) ) { croak("Argument 2 is null."); return; } if ( SWIG_ConvertPtr(ST(1), (void **)&arg2, SWIGTYPE_p_idmef_linkage, 0) ) { croak("Expected type idmef_linkage_t const * for argument 2."); return; } } result = (int)idmef_linkage_compare((struct idmef_linkage const *)arg1,(struct idmef_linkage const *)arg2); { ST(argvi) = newSViv(result); argvi++; } XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_linkage_ref) { { idmef_linkage_t *arg1 = (idmef_linkage_t *) 0 ; int argvi = 0; idmef_linkage_t *result = 0 ; dXSARGS; if ((items < 1) || (items > 1)) { SWIG_croak("Usage: idmef_linkage_ref(linkage);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_linkage, 0) ) { croak("Expected type idmef_linkage_t * for argument 1."); return; } } result = (idmef_linkage_t *)idmef_linkage_ref(arg1); ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_idmef_linkage, 0 | 0); argvi++ ; XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_linkage_destroy) { { idmef_linkage_t *arg1 = (idmef_linkage_t *) 0 ; int argvi = 0; dXSARGS; if ((items < 1) || (items > 1)) { SWIG_croak("Usage: idmef_linkage_destroy(ptr);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_linkage, 0) ) { croak("Expected type idmef_linkage_t * for argument 1."); return; } } idmef_linkage_destroy(arg1); ST(argvi) = sv_newmortal(); XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_linkage_get_category) { { idmef_linkage_t *arg1 = (idmef_linkage_t *) 0 ; int argvi = 0; idmef_linkage_category_t result; dXSARGS; if ((items < 1) || (items > 1)) { SWIG_croak("Usage: idmef_linkage_get_category(ptr);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_linkage, 0) ) { croak("Expected type idmef_linkage_t * for argument 1."); return; } } result = (idmef_linkage_category_t)idmef_linkage_get_category(arg1); ST(argvi) = SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(result)); argvi++ ; XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_linkage_set_category) { { idmef_linkage_t *arg1 = (idmef_linkage_t *) 0 ; idmef_linkage_category_t arg2 ; int val2 ; int ecode2 = 0 ; int argvi = 0; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: idmef_linkage_set_category(ptr,category);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_linkage, 0) ) { croak("Expected type idmef_linkage_t * for argument 1."); return; } } ecode2 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(1), &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "idmef_linkage_set_category" "', argument " "2"" of type '" "idmef_linkage_category_t""'"); } arg2 = (idmef_linkage_category_t)(val2); idmef_linkage_set_category(arg1,arg2); ST(argvi) = sv_newmortal(); XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_linkage_new_category) { { idmef_linkage_t *arg1 = (idmef_linkage_t *) 0 ; idmef_linkage_category_t **arg2 = (idmef_linkage_category_t **) 0 ; void *argp2 = 0 ; int res2 = 0 ; int argvi = 0; int result; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: idmef_linkage_new_category(ptr,ret);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_linkage, 0) ) { croak("Expected type idmef_linkage_t * for argument 1."); return; } } res2 = SWIG_ConvertPtr(ST(1), &argp2,SWIGTYPE_p_p_idmef_linkage_category_t, 0 | 0 ); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "idmef_linkage_new_category" "', argument " "2"" of type '" "idmef_linkage_category_t **""'"); } arg2 = (idmef_linkage_category_t **)(argp2); result = (int)idmef_linkage_new_category(arg1,arg2); { ST(argvi) = newSViv(result); argvi++; } XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_linkage_get_name) { { idmef_linkage_t *arg1 = (idmef_linkage_t *) 0 ; int argvi = 0; prelude_string_t *result = 0 ; dXSARGS; if ((items < 1) || (items > 1)) { SWIG_croak("Usage: idmef_linkage_get_name(ptr);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_linkage, 0) ) { croak("Expected type idmef_linkage_t * for argument 1."); return; } } result = (prelude_string_t *)idmef_linkage_get_name(arg1); { ST(argvi) = swig_perl_string(result); argvi++; } XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_linkage_set_name) { { idmef_linkage_t *arg1 = (idmef_linkage_t *) 0 ; prelude_string_t *arg2 = (prelude_string_t *) 0 ; int argvi = 0; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: idmef_linkage_set_name(ptr,name);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_linkage, 0) ) { croak("Expected type idmef_linkage_t * for argument 1."); return; } } { int ret; char *str; STRLEN len; str = SvPV(ST(1), len); ret = prelude_string_new_dup_fast(&(arg2), str, len); if ( ret < 0 ) { swig_perl_raise_error(ret); return; } } idmef_linkage_set_name(arg1,arg2); ST(argvi) = sv_newmortal(); XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_linkage_new_name) { { idmef_linkage_t *arg1 = (idmef_linkage_t *) 0 ; prelude_string_t **arg2 = (prelude_string_t **) 0 ; void *argp2 = 0 ; int res2 = 0 ; int argvi = 0; int result; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: idmef_linkage_new_name(ptr,ret);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_linkage, 0) ) { croak("Expected type idmef_linkage_t * for argument 1."); return; } } res2 = SWIG_ConvertPtr(ST(1), &argp2,SWIGTYPE_p_p_prelude_string_t, 0 | 0 ); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "idmef_linkage_new_name" "', argument " "2"" of type '" "prelude_string_t **""'"); } arg2 = (prelude_string_t **)(argp2); result = (int)idmef_linkage_new_name(arg1,arg2); { ST(argvi) = newSViv(result); argvi++; } XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_linkage_get_path) { { idmef_linkage_t *arg1 = (idmef_linkage_t *) 0 ; int argvi = 0; prelude_string_t *result = 0 ; dXSARGS; if ((items < 1) || (items > 1)) { SWIG_croak("Usage: idmef_linkage_get_path(ptr);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_linkage, 0) ) { croak("Expected type idmef_linkage_t * for argument 1."); return; } } result = (prelude_string_t *)idmef_linkage_get_path(arg1); { ST(argvi) = swig_perl_string(result); argvi++; } XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_linkage_set_path) { { idmef_linkage_t *arg1 = (idmef_linkage_t *) 0 ; prelude_string_t *arg2 = (prelude_string_t *) 0 ; int argvi = 0; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: idmef_linkage_set_path(ptr,path);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_linkage, 0) ) { croak("Expected type idmef_linkage_t * for argument 1."); return; } } { int ret; char *str; STRLEN len; str = SvPV(ST(1), len); ret = prelude_string_new_dup_fast(&(arg2), str, len); if ( ret < 0 ) { swig_perl_raise_error(ret); return; } } idmef_linkage_set_path(arg1,arg2); ST(argvi) = sv_newmortal(); XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_linkage_new_path) { { idmef_linkage_t *arg1 = (idmef_linkage_t *) 0 ; prelude_string_t **arg2 = (prelude_string_t **) 0 ; void *argp2 = 0 ; int res2 = 0 ; int argvi = 0; int result; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: idmef_linkage_new_path(ptr,ret);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_linkage, 0) ) { croak("Expected type idmef_linkage_t * for argument 1."); return; } } res2 = SWIG_ConvertPtr(ST(1), &argp2,SWIGTYPE_p_p_prelude_string_t, 0 | 0 ); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "idmef_linkage_new_path" "', argument " "2"" of type '" "prelude_string_t **""'"); } arg2 = (prelude_string_t **)(argp2); result = (int)idmef_linkage_new_path(arg1,arg2); { ST(argvi) = newSViv(result); argvi++; } XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_linkage_get_file) { { idmef_linkage_t *arg1 = (idmef_linkage_t *) 0 ; int argvi = 0; idmef_file_t *result = 0 ; dXSARGS; if ((items < 1) || (items > 1)) { SWIG_croak("Usage: idmef_linkage_get_file(ptr);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_linkage, 0) ) { croak("Expected type idmef_linkage_t * for argument 1."); return; } } result = (idmef_file_t *)idmef_linkage_get_file(arg1); ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_idmef_file, 0 | 0); argvi++ ; XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_linkage_set_file) { { idmef_linkage_t *arg1 = (idmef_linkage_t *) 0 ; idmef_file_t *arg2 = (idmef_file_t *) 0 ; int argvi = 0; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: idmef_linkage_set_file(ptr,file);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_linkage, 0) ) { croak("Expected type idmef_linkage_t * for argument 1."); return; } } { if ( ! SvROK(ST(1)) ) { croak("Argument 2 is null."); return; } if ( SWIG_ConvertPtr(ST(1), (void **)&arg2, SWIGTYPE_p_idmef_file, 0) ) { croak("Expected type idmef_file_t * for argument 2."); return; } } idmef_linkage_set_file(arg1,arg2); ST(argvi) = sv_newmortal(); XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_linkage_new_file) { { idmef_linkage_t *arg1 = (idmef_linkage_t *) 0 ; idmef_file_t **arg2 = (idmef_file_t **) 0 ; idmef_file_t *tmp2 ; int argvi = 0; SV * _saved[1] ; int result; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: idmef_linkage_new_file(ptr,ret);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_linkage, 0) ) { croak("Expected type idmef_linkage_t * for argument 1."); return; } } { arg2 = (idmef_file_t **) &tmp2; } _saved[0] = ST(1); result = (int)idmef_linkage_new_file(arg1,arg2); { ST(argvi) = newSViv(result); argvi++; } { SV *sv; if ( result >= 0 ) { if ( ! SvROK(_saved[0]) ) { croak("Argument 2 is not a reference."); return; } sv = SvRV(_saved[0]); sv_setsv(sv, SWIG_NewPointerObj((void *) * arg2, SWIGTYPE_p_idmef_file, 0)); } } XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_target_decoy_to_numeric) { { char *arg1 = (char *) 0 ; int res1 ; char *buf1 = 0 ; int alloc1 = 0 ; int argvi = 0; idmef_target_decoy_t result; dXSARGS; if ((items < 1) || (items > 1)) { SWIG_croak("Usage: idmef_target_decoy_to_numeric(name);"); } res1 = SWIG_AsCharPtrAndSize(ST(0), &buf1, NULL, &alloc1); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "idmef_target_decoy_to_numeric" "', argument " "1"" of type '" "char const *""'"); } arg1 = (char *)(buf1); result = (idmef_target_decoy_t)idmef_target_decoy_to_numeric((char const *)arg1); ST(argvi) = SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(result)); argvi++ ; if (alloc1 == SWIG_NEWOBJ) free((char*)buf1); XSRETURN(argvi); fail: if (alloc1 == SWIG_NEWOBJ) free((char*)buf1); SWIG_croak_null(); } } XS(_wrap_idmef_target_decoy_to_string) { { idmef_target_decoy_t arg1 ; int val1 ; int ecode1 = 0 ; int argvi = 0; char *result = 0 ; dXSARGS; if ((items < 1) || (items > 1)) { SWIG_croak("Usage: idmef_target_decoy_to_string(val);"); } ecode1 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(0), &val1); if (!SWIG_IsOK(ecode1)) { SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "idmef_target_decoy_to_string" "', argument " "1"" of type '" "idmef_target_decoy_t""'"); } arg1 = (idmef_target_decoy_t)(val1); result = (char *)idmef_target_decoy_to_string(arg1); ST(argvi) = SWIG_FromCharPtr((const char *)result); argvi++ ; XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_target_new) { { idmef_target_t **arg1 = (idmef_target_t **) 0 ; idmef_target_t *tmp1 ; int argvi = 0; SV * _saved[1] ; int result; dXSARGS; if ((items < 1) || (items > 1)) { SWIG_croak("Usage: idmef_target_new(ret);"); } { arg1 = (idmef_target_t **) &tmp1; } _saved[0] = ST(0); result = (int)idmef_target_new(arg1); { ST(argvi) = newSViv(result); argvi++; } { SV *sv; if ( result >= 0 ) { if ( ! SvROK(_saved[0]) ) { croak("Argument 1 is not a reference."); return; } sv = SvRV(_saved[0]); sv_setsv(sv, SWIG_NewPointerObj((void *) * arg1, SWIGTYPE_p_idmef_target, 0)); } } XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_target_copy) { { idmef_target_t *arg1 = (idmef_target_t *) 0 ; idmef_target_t *arg2 = (idmef_target_t *) 0 ; int argvi = 0; int result; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: idmef_target_copy(src,dst);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_target, 0) ) { croak("Expected type idmef_target_t const * for argument 1."); return; } } { if ( ! SvROK(ST(1)) ) { croak("Argument 2 is null."); return; } if ( SWIG_ConvertPtr(ST(1), (void **)&arg2, SWIGTYPE_p_idmef_target, 0) ) { croak("Expected type idmef_target_t * for argument 2."); return; } } result = (int)idmef_target_copy((struct idmef_target const *)arg1,arg2); { ST(argvi) = newSViv(result); argvi++; } XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_target_clone) { { idmef_target_t *arg1 = (idmef_target_t *) 0 ; idmef_target_t **arg2 = (idmef_target_t **) 0 ; idmef_target_t *tmp2 ; int argvi = 0; SV * _saved[1] ; int result; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: idmef_target_clone(src,dst);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_target, 0) ) { croak("Expected type idmef_target_t * for argument 1."); return; } } { arg2 = (idmef_target_t **) &tmp2; } _saved[0] = ST(1); result = (int)idmef_target_clone(arg1,arg2); { ST(argvi) = newSViv(result); argvi++; } { SV *sv; if ( result >= 0 ) { if ( ! SvROK(_saved[0]) ) { croak("Argument 2 is not a reference."); return; } sv = SvRV(_saved[0]); sv_setsv(sv, SWIG_NewPointerObj((void *) * arg2, SWIGTYPE_p_idmef_target, 0)); } } XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_target_compare) { { idmef_target_t *arg1 = (idmef_target_t *) 0 ; idmef_target_t *arg2 = (idmef_target_t *) 0 ; int argvi = 0; int result; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: idmef_target_compare(obj1,obj2);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_target, 0) ) { croak("Expected type idmef_target_t const * for argument 1."); return; } } { if ( ! SvROK(ST(1)) ) { croak("Argument 2 is null."); return; } if ( SWIG_ConvertPtr(ST(1), (void **)&arg2, SWIGTYPE_p_idmef_target, 0) ) { croak("Expected type idmef_target_t const * for argument 2."); return; } } result = (int)idmef_target_compare((struct idmef_target const *)arg1,(struct idmef_target const *)arg2); { ST(argvi) = newSViv(result); argvi++; } XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_target_ref) { { idmef_target_t *arg1 = (idmef_target_t *) 0 ; int argvi = 0; idmef_target_t *result = 0 ; dXSARGS; if ((items < 1) || (items > 1)) { SWIG_croak("Usage: idmef_target_ref(target);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_target, 0) ) { croak("Expected type idmef_target_t * for argument 1."); return; } } result = (idmef_target_t *)idmef_target_ref(arg1); ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_idmef_target, 0 | 0); argvi++ ; XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_target_destroy) { { idmef_target_t *arg1 = (idmef_target_t *) 0 ; int argvi = 0; dXSARGS; if ((items < 1) || (items > 1)) { SWIG_croak("Usage: idmef_target_destroy(ptr);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_target, 0) ) { croak("Expected type idmef_target_t * for argument 1."); return; } } idmef_target_destroy(arg1); ST(argvi) = sv_newmortal(); XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_target_get_ident) { { idmef_target_t *arg1 = (idmef_target_t *) 0 ; int argvi = 0; prelude_string_t *result = 0 ; dXSARGS; if ((items < 1) || (items > 1)) { SWIG_croak("Usage: idmef_target_get_ident(ptr);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_target, 0) ) { croak("Expected type idmef_target_t * for argument 1."); return; } } result = (prelude_string_t *)idmef_target_get_ident(arg1); { ST(argvi) = swig_perl_string(result); argvi++; } XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_target_set_ident) { { idmef_target_t *arg1 = (idmef_target_t *) 0 ; prelude_string_t *arg2 = (prelude_string_t *) 0 ; int argvi = 0; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: idmef_target_set_ident(ptr,ident);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_target, 0) ) { croak("Expected type idmef_target_t * for argument 1."); return; } } { int ret; char *str; STRLEN len; str = SvPV(ST(1), len); ret = prelude_string_new_dup_fast(&(arg2), str, len); if ( ret < 0 ) { swig_perl_raise_error(ret); return; } } idmef_target_set_ident(arg1,arg2); ST(argvi) = sv_newmortal(); XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_target_new_ident) { { idmef_target_t *arg1 = (idmef_target_t *) 0 ; prelude_string_t **arg2 = (prelude_string_t **) 0 ; void *argp2 = 0 ; int res2 = 0 ; int argvi = 0; int result; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: idmef_target_new_ident(ptr,ret);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_target, 0) ) { croak("Expected type idmef_target_t * for argument 1."); return; } } res2 = SWIG_ConvertPtr(ST(1), &argp2,SWIGTYPE_p_p_prelude_string_t, 0 | 0 ); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "idmef_target_new_ident" "', argument " "2"" of type '" "prelude_string_t **""'"); } arg2 = (prelude_string_t **)(argp2); result = (int)idmef_target_new_ident(arg1,arg2); { ST(argvi) = newSViv(result); argvi++; } XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_target_get_decoy) { { idmef_target_t *arg1 = (idmef_target_t *) 0 ; int argvi = 0; idmef_target_decoy_t result; dXSARGS; if ((items < 1) || (items > 1)) { SWIG_croak("Usage: idmef_target_get_decoy(ptr);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_target, 0) ) { croak("Expected type idmef_target_t * for argument 1."); return; } } result = (idmef_target_decoy_t)idmef_target_get_decoy(arg1); ST(argvi) = SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(result)); argvi++ ; XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_target_set_decoy) { { idmef_target_t *arg1 = (idmef_target_t *) 0 ; idmef_target_decoy_t arg2 ; int val2 ; int ecode2 = 0 ; int argvi = 0; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: idmef_target_set_decoy(ptr,decoy);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_target, 0) ) { croak("Expected type idmef_target_t * for argument 1."); return; } } ecode2 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(1), &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "idmef_target_set_decoy" "', argument " "2"" of type '" "idmef_target_decoy_t""'"); } arg2 = (idmef_target_decoy_t)(val2); idmef_target_set_decoy(arg1,arg2); ST(argvi) = sv_newmortal(); XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_target_new_decoy) { { idmef_target_t *arg1 = (idmef_target_t *) 0 ; idmef_target_decoy_t **arg2 = (idmef_target_decoy_t **) 0 ; void *argp2 = 0 ; int res2 = 0 ; int argvi = 0; int result; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: idmef_target_new_decoy(ptr,ret);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_target, 0) ) { croak("Expected type idmef_target_t * for argument 1."); return; } } res2 = SWIG_ConvertPtr(ST(1), &argp2,SWIGTYPE_p_p_idmef_target_decoy_t, 0 | 0 ); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "idmef_target_new_decoy" "', argument " "2"" of type '" "idmef_target_decoy_t **""'"); } arg2 = (idmef_target_decoy_t **)(argp2); result = (int)idmef_target_new_decoy(arg1,arg2); { ST(argvi) = newSViv(result); argvi++; } XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_target_get_interface) { { idmef_target_t *arg1 = (idmef_target_t *) 0 ; int argvi = 0; prelude_string_t *result = 0 ; dXSARGS; if ((items < 1) || (items > 1)) { SWIG_croak("Usage: idmef_target_get_interface(ptr);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_target, 0) ) { croak("Expected type idmef_target_t * for argument 1."); return; } } result = (prelude_string_t *)idmef_target_get_interface(arg1); { ST(argvi) = swig_perl_string(result); argvi++; } XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_target_set_interface) { { idmef_target_t *arg1 = (idmef_target_t *) 0 ; prelude_string_t *arg2 = (prelude_string_t *) 0 ; int argvi = 0; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: idmef_target_set_interface(ptr,interface);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_target, 0) ) { croak("Expected type idmef_target_t * for argument 1."); return; } } { int ret; char *str; STRLEN len; str = SvPV(ST(1), len); ret = prelude_string_new_dup_fast(&(arg2), str, len); if ( ret < 0 ) { swig_perl_raise_error(ret); return; } } idmef_target_set_interface(arg1,arg2); ST(argvi) = sv_newmortal(); XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_target_new_interface) { { idmef_target_t *arg1 = (idmef_target_t *) 0 ; prelude_string_t **arg2 = (prelude_string_t **) 0 ; void *argp2 = 0 ; int res2 = 0 ; int argvi = 0; int result; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: idmef_target_new_interface(ptr,ret);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_target, 0) ) { croak("Expected type idmef_target_t * for argument 1."); return; } } res2 = SWIG_ConvertPtr(ST(1), &argp2,SWIGTYPE_p_p_prelude_string_t, 0 | 0 ); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "idmef_target_new_interface" "', argument " "2"" of type '" "prelude_string_t **""'"); } arg2 = (prelude_string_t **)(argp2); result = (int)idmef_target_new_interface(arg1,arg2); { ST(argvi) = newSViv(result); argvi++; } XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_target_get_node) { { idmef_target_t *arg1 = (idmef_target_t *) 0 ; int argvi = 0; idmef_node_t *result = 0 ; dXSARGS; if ((items < 1) || (items > 1)) { SWIG_croak("Usage: idmef_target_get_node(ptr);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_target, 0) ) { croak("Expected type idmef_target_t * for argument 1."); return; } } result = (idmef_node_t *)idmef_target_get_node(arg1); ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_idmef_node, 0 | 0); argvi++ ; XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_target_set_node) { { idmef_target_t *arg1 = (idmef_target_t *) 0 ; idmef_node_t *arg2 = (idmef_node_t *) 0 ; int argvi = 0; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: idmef_target_set_node(ptr,node);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_target, 0) ) { croak("Expected type idmef_target_t * for argument 1."); return; } } { if ( ! SvROK(ST(1)) ) { croak("Argument 2 is null."); return; } if ( SWIG_ConvertPtr(ST(1), (void **)&arg2, SWIGTYPE_p_idmef_node, 0) ) { croak("Expected type idmef_node_t * for argument 2."); return; } } idmef_target_set_node(arg1,arg2); ST(argvi) = sv_newmortal(); XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_target_new_node) { { idmef_target_t *arg1 = (idmef_target_t *) 0 ; idmef_node_t **arg2 = (idmef_node_t **) 0 ; idmef_node_t *tmp2 ; int argvi = 0; SV * _saved[1] ; int result; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: idmef_target_new_node(ptr,ret);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_target, 0) ) { croak("Expected type idmef_target_t * for argument 1."); return; } } { arg2 = (idmef_node_t **) &tmp2; } _saved[0] = ST(1); result = (int)idmef_target_new_node(arg1,arg2); { ST(argvi) = newSViv(result); argvi++; } { SV *sv; if ( result >= 0 ) { if ( ! SvROK(_saved[0]) ) { croak("Argument 2 is not a reference."); return; } sv = SvRV(_saved[0]); sv_setsv(sv, SWIG_NewPointerObj((void *) * arg2, SWIGTYPE_p_idmef_node, 0)); } } XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_target_get_user) { { idmef_target_t *arg1 = (idmef_target_t *) 0 ; int argvi = 0; idmef_user_t *result = 0 ; dXSARGS; if ((items < 1) || (items > 1)) { SWIG_croak("Usage: idmef_target_get_user(ptr);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_target, 0) ) { croak("Expected type idmef_target_t * for argument 1."); return; } } result = (idmef_user_t *)idmef_target_get_user(arg1); ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_idmef_user, 0 | 0); argvi++ ; XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_target_set_user) { { idmef_target_t *arg1 = (idmef_target_t *) 0 ; idmef_user_t *arg2 = (idmef_user_t *) 0 ; int argvi = 0; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: idmef_target_set_user(ptr,user);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_target, 0) ) { croak("Expected type idmef_target_t * for argument 1."); return; } } { if ( ! SvROK(ST(1)) ) { croak("Argument 2 is null."); return; } if ( SWIG_ConvertPtr(ST(1), (void **)&arg2, SWIGTYPE_p_idmef_user, 0) ) { croak("Expected type idmef_user_t * for argument 2."); return; } } idmef_target_set_user(arg1,arg2); ST(argvi) = sv_newmortal(); XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_target_new_user) { { idmef_target_t *arg1 = (idmef_target_t *) 0 ; idmef_user_t **arg2 = (idmef_user_t **) 0 ; idmef_user_t *tmp2 ; int argvi = 0; SV * _saved[1] ; int result; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: idmef_target_new_user(ptr,ret);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_target, 0) ) { croak("Expected type idmef_target_t * for argument 1."); return; } } { arg2 = (idmef_user_t **) &tmp2; } _saved[0] = ST(1); result = (int)idmef_target_new_user(arg1,arg2); { ST(argvi) = newSViv(result); argvi++; } { SV *sv; if ( result >= 0 ) { if ( ! SvROK(_saved[0]) ) { croak("Argument 2 is not a reference."); return; } sv = SvRV(_saved[0]); sv_setsv(sv, SWIG_NewPointerObj((void *) * arg2, SWIGTYPE_p_idmef_user, 0)); } } XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_target_get_process) { { idmef_target_t *arg1 = (idmef_target_t *) 0 ; int argvi = 0; idmef_process_t *result = 0 ; dXSARGS; if ((items < 1) || (items > 1)) { SWIG_croak("Usage: idmef_target_get_process(ptr);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_target, 0) ) { croak("Expected type idmef_target_t * for argument 1."); return; } } result = (idmef_process_t *)idmef_target_get_process(arg1); ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_idmef_process, 0 | 0); argvi++ ; XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_target_set_process) { { idmef_target_t *arg1 = (idmef_target_t *) 0 ; idmef_process_t *arg2 = (idmef_process_t *) 0 ; int argvi = 0; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: idmef_target_set_process(ptr,process);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_target, 0) ) { croak("Expected type idmef_target_t * for argument 1."); return; } } { if ( ! SvROK(ST(1)) ) { croak("Argument 2 is null."); return; } if ( SWIG_ConvertPtr(ST(1), (void **)&arg2, SWIGTYPE_p_idmef_process, 0) ) { croak("Expected type idmef_process_t * for argument 2."); return; } } idmef_target_set_process(arg1,arg2); ST(argvi) = sv_newmortal(); XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_target_new_process) { { idmef_target_t *arg1 = (idmef_target_t *) 0 ; idmef_process_t **arg2 = (idmef_process_t **) 0 ; idmef_process_t *tmp2 ; int argvi = 0; SV * _saved[1] ; int result; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: idmef_target_new_process(ptr,ret);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_target, 0) ) { croak("Expected type idmef_target_t * for argument 1."); return; } } { arg2 = (idmef_process_t **) &tmp2; } _saved[0] = ST(1); result = (int)idmef_target_new_process(arg1,arg2); { ST(argvi) = newSViv(result); argvi++; } { SV *sv; if ( result >= 0 ) { if ( ! SvROK(_saved[0]) ) { croak("Argument 2 is not a reference."); return; } sv = SvRV(_saved[0]); sv_setsv(sv, SWIG_NewPointerObj((void *) * arg2, SWIGTYPE_p_idmef_process, 0)); } } XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_target_get_service) { { idmef_target_t *arg1 = (idmef_target_t *) 0 ; int argvi = 0; idmef_service_t *result = 0 ; dXSARGS; if ((items < 1) || (items > 1)) { SWIG_croak("Usage: idmef_target_get_service(ptr);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_target, 0) ) { croak("Expected type idmef_target_t * for argument 1."); return; } } result = (idmef_service_t *)idmef_target_get_service(arg1); ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_idmef_service, 0 | 0); argvi++ ; XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_target_set_service) { { idmef_target_t *arg1 = (idmef_target_t *) 0 ; idmef_service_t *arg2 = (idmef_service_t *) 0 ; int argvi = 0; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: idmef_target_set_service(ptr,service);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_target, 0) ) { croak("Expected type idmef_target_t * for argument 1."); return; } } { if ( ! SvROK(ST(1)) ) { croak("Argument 2 is null."); return; } if ( SWIG_ConvertPtr(ST(1), (void **)&arg2, SWIGTYPE_p_idmef_service, 0) ) { croak("Expected type idmef_service_t * for argument 2."); return; } } idmef_target_set_service(arg1,arg2); ST(argvi) = sv_newmortal(); XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_target_new_service) { { idmef_target_t *arg1 = (idmef_target_t *) 0 ; idmef_service_t **arg2 = (idmef_service_t **) 0 ; idmef_service_t *tmp2 ; int argvi = 0; SV * _saved[1] ; int result; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: idmef_target_new_service(ptr,ret);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_target, 0) ) { croak("Expected type idmef_target_t * for argument 1."); return; } } { arg2 = (idmef_service_t **) &tmp2; } _saved[0] = ST(1); result = (int)idmef_target_new_service(arg1,arg2); { ST(argvi) = newSViv(result); argvi++; } { SV *sv; if ( result >= 0 ) { if ( ! SvROK(_saved[0]) ) { croak("Argument 2 is not a reference."); return; } sv = SvRV(_saved[0]); sv_setsv(sv, SWIG_NewPointerObj((void *) * arg2, SWIGTYPE_p_idmef_service, 0)); } } XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_target_get_next_file) { { idmef_target_t *arg1 = (idmef_target_t *) 0 ; idmef_file_t *arg2 = (idmef_file_t *) 0 ; int argvi = 0; idmef_file_t *result = 0 ; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: idmef_target_get_next_file(target,file_cur);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_target, 0) ) { croak("Expected type idmef_target_t * for argument 1."); return; } } { if ( ! SvOK(ST(1)) ) { arg2 = NULL; } else { if ( SWIG_ConvertPtr(ST(1), (void **)&arg2, SWIGTYPE_p_idmef_file, 0) ) { croak("Expected type idmef_file_t * for argument 2."); return; } } } result = (idmef_file_t *)idmef_target_get_next_file(arg1,arg2); ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_idmef_file, 0 | 0); argvi++ ; XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_target_set_file) { { idmef_target_t *arg1 = (idmef_target_t *) 0 ; idmef_file_t *arg2 = (idmef_file_t *) 0 ; int arg3 ; int val3 ; int ecode3 = 0 ; int argvi = 0; dXSARGS; if ((items < 3) || (items > 3)) { SWIG_croak("Usage: idmef_target_set_file(ptr,object,pos);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_target, 0) ) { croak("Expected type idmef_target_t * for argument 1."); return; } } { if ( ! SvROK(ST(1)) ) { croak("Argument 2 is null."); return; } if ( SWIG_ConvertPtr(ST(1), (void **)&arg2, SWIGTYPE_p_idmef_file, 0) ) { croak("Expected type idmef_file_t * for argument 2."); return; } } ecode3 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(2), &val3); if (!SWIG_IsOK(ecode3)) { SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "idmef_target_set_file" "', argument " "3"" of type '" "int""'"); } arg3 = (int)(val3); idmef_target_set_file(arg1,arg2,arg3); ST(argvi) = sv_newmortal(); XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_target_new_file) { { idmef_target_t *arg1 = (idmef_target_t *) 0 ; idmef_file_t **arg2 = (idmef_file_t **) 0 ; int arg3 ; idmef_file_t *tmp2 ; int val3 ; int ecode3 = 0 ; int argvi = 0; SV * _saved[1] ; int result; dXSARGS; if ((items < 3) || (items > 3)) { SWIG_croak("Usage: idmef_target_new_file(ptr,ret,pos);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_target, 0) ) { croak("Expected type idmef_target_t * for argument 1."); return; } } { arg2 = (idmef_file_t **) &tmp2; } ecode3 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(2), &val3); if (!SWIG_IsOK(ecode3)) { SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "idmef_target_new_file" "', argument " "3"" of type '" "int""'"); } arg3 = (int)(val3); _saved[0] = ST(1); result = (int)idmef_target_new_file(arg1,arg2,arg3); { ST(argvi) = newSViv(result); argvi++; } { SV *sv; if ( result >= 0 ) { if ( ! SvROK(_saved[0]) ) { croak("Argument 2 is not a reference."); return; } sv = SvRV(_saved[0]); sv_setsv(sv, SWIG_NewPointerObj((void *) * arg2, SWIGTYPE_p_idmef_file, 0)); } } XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_analyzer_new) { { idmef_analyzer_t **arg1 = (idmef_analyzer_t **) 0 ; idmef_analyzer_t *tmp1 ; int argvi = 0; SV * _saved[1] ; int result; dXSARGS; if ((items < 1) || (items > 1)) { SWIG_croak("Usage: idmef_analyzer_new(ret);"); } { arg1 = (idmef_analyzer_t **) &tmp1; } _saved[0] = ST(0); result = (int)idmef_analyzer_new(arg1); { ST(argvi) = newSViv(result); argvi++; } { SV *sv; if ( result >= 0 ) { if ( ! SvROK(_saved[0]) ) { croak("Argument 1 is not a reference."); return; } sv = SvRV(_saved[0]); sv_setsv(sv, SWIG_NewPointerObj((void *) * arg1, SWIGTYPE_p_idmef_analyzer, 0)); } } XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_analyzer_copy) { { idmef_analyzer_t *arg1 = (idmef_analyzer_t *) 0 ; idmef_analyzer_t *arg2 = (idmef_analyzer_t *) 0 ; int argvi = 0; int result; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: idmef_analyzer_copy(src,dst);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_analyzer, 0) ) { croak("Expected type idmef_analyzer_t const * for argument 1."); return; } } { if ( ! SvROK(ST(1)) ) { croak("Argument 2 is null."); return; } if ( SWIG_ConvertPtr(ST(1), (void **)&arg2, SWIGTYPE_p_idmef_analyzer, 0) ) { croak("Expected type idmef_analyzer_t * for argument 2."); return; } } result = (int)idmef_analyzer_copy((struct idmef_analyzer const *)arg1,arg2); { ST(argvi) = newSViv(result); argvi++; } XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_analyzer_clone) { { idmef_analyzer_t *arg1 = (idmef_analyzer_t *) 0 ; idmef_analyzer_t **arg2 = (idmef_analyzer_t **) 0 ; idmef_analyzer_t *tmp2 ; int argvi = 0; SV * _saved[1] ; int result; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: idmef_analyzer_clone(src,dst);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_analyzer, 0) ) { croak("Expected type idmef_analyzer_t * for argument 1."); return; } } { arg2 = (idmef_analyzer_t **) &tmp2; } _saved[0] = ST(1); result = (int)idmef_analyzer_clone(arg1,arg2); { ST(argvi) = newSViv(result); argvi++; } { SV *sv; if ( result >= 0 ) { if ( ! SvROK(_saved[0]) ) { croak("Argument 2 is not a reference."); return; } sv = SvRV(_saved[0]); sv_setsv(sv, SWIG_NewPointerObj((void *) * arg2, SWIGTYPE_p_idmef_analyzer, 0)); } } XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_analyzer_compare) { { idmef_analyzer_t *arg1 = (idmef_analyzer_t *) 0 ; idmef_analyzer_t *arg2 = (idmef_analyzer_t *) 0 ; int argvi = 0; int result; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: idmef_analyzer_compare(obj1,obj2);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_analyzer, 0) ) { croak("Expected type idmef_analyzer_t const * for argument 1."); return; } } { if ( ! SvROK(ST(1)) ) { croak("Argument 2 is null."); return; } if ( SWIG_ConvertPtr(ST(1), (void **)&arg2, SWIGTYPE_p_idmef_analyzer, 0) ) { croak("Expected type idmef_analyzer_t const * for argument 2."); return; } } result = (int)idmef_analyzer_compare((struct idmef_analyzer const *)arg1,(struct idmef_analyzer const *)arg2); { ST(argvi) = newSViv(result); argvi++; } XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_analyzer_ref) { { idmef_analyzer_t *arg1 = (idmef_analyzer_t *) 0 ; int argvi = 0; idmef_analyzer_t *result = 0 ; dXSARGS; if ((items < 1) || (items > 1)) { SWIG_croak("Usage: idmef_analyzer_ref(analyzer);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_analyzer, 0) ) { croak("Expected type idmef_analyzer_t * for argument 1."); return; } } result = (idmef_analyzer_t *)idmef_analyzer_ref(arg1); ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_idmef_analyzer, 0 | 0); argvi++ ; XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_analyzer_destroy) { { idmef_analyzer_t *arg1 = (idmef_analyzer_t *) 0 ; int argvi = 0; dXSARGS; if ((items < 1) || (items > 1)) { SWIG_croak("Usage: idmef_analyzer_destroy(ptr);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_analyzer, 0) ) { croak("Expected type idmef_analyzer_t * for argument 1."); return; } } idmef_analyzer_destroy(arg1); ST(argvi) = sv_newmortal(); XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_analyzer_get_analyzerid) { { idmef_analyzer_t *arg1 = (idmef_analyzer_t *) 0 ; int argvi = 0; prelude_string_t *result = 0 ; dXSARGS; if ((items < 1) || (items > 1)) { SWIG_croak("Usage: idmef_analyzer_get_analyzerid(ptr);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_analyzer, 0) ) { croak("Expected type idmef_analyzer_t * for argument 1."); return; } } result = (prelude_string_t *)idmef_analyzer_get_analyzerid(arg1); { ST(argvi) = swig_perl_string(result); argvi++; } XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_analyzer_set_analyzerid) { { idmef_analyzer_t *arg1 = (idmef_analyzer_t *) 0 ; prelude_string_t *arg2 = (prelude_string_t *) 0 ; int argvi = 0; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: idmef_analyzer_set_analyzerid(ptr,analyzerid);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_analyzer, 0) ) { croak("Expected type idmef_analyzer_t * for argument 1."); return; } } { int ret; char *str; STRLEN len; str = SvPV(ST(1), len); ret = prelude_string_new_dup_fast(&(arg2), str, len); if ( ret < 0 ) { swig_perl_raise_error(ret); return; } } idmef_analyzer_set_analyzerid(arg1,arg2); ST(argvi) = sv_newmortal(); XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_analyzer_new_analyzerid) { { idmef_analyzer_t *arg1 = (idmef_analyzer_t *) 0 ; prelude_string_t **arg2 = (prelude_string_t **) 0 ; void *argp2 = 0 ; int res2 = 0 ; int argvi = 0; int result; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: idmef_analyzer_new_analyzerid(ptr,ret);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_analyzer, 0) ) { croak("Expected type idmef_analyzer_t * for argument 1."); return; } } res2 = SWIG_ConvertPtr(ST(1), &argp2,SWIGTYPE_p_p_prelude_string_t, 0 | 0 ); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "idmef_analyzer_new_analyzerid" "', argument " "2"" of type '" "prelude_string_t **""'"); } arg2 = (prelude_string_t **)(argp2); result = (int)idmef_analyzer_new_analyzerid(arg1,arg2); { ST(argvi) = newSViv(result); argvi++; } XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_analyzer_get_name) { { idmef_analyzer_t *arg1 = (idmef_analyzer_t *) 0 ; int argvi = 0; prelude_string_t *result = 0 ; dXSARGS; if ((items < 1) || (items > 1)) { SWIG_croak("Usage: idmef_analyzer_get_name(ptr);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_analyzer, 0) ) { croak("Expected type idmef_analyzer_t * for argument 1."); return; } } result = (prelude_string_t *)idmef_analyzer_get_name(arg1); { ST(argvi) = swig_perl_string(result); argvi++; } XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_analyzer_set_name) { { idmef_analyzer_t *arg1 = (idmef_analyzer_t *) 0 ; prelude_string_t *arg2 = (prelude_string_t *) 0 ; int argvi = 0; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: idmef_analyzer_set_name(ptr,name);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_analyzer, 0) ) { croak("Expected type idmef_analyzer_t * for argument 1."); return; } } { int ret; char *str; STRLEN len; str = SvPV(ST(1), len); ret = prelude_string_new_dup_fast(&(arg2), str, len); if ( ret < 0 ) { swig_perl_raise_error(ret); return; } } idmef_analyzer_set_name(arg1,arg2); ST(argvi) = sv_newmortal(); XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_analyzer_new_name) { { idmef_analyzer_t *arg1 = (idmef_analyzer_t *) 0 ; prelude_string_t **arg2 = (prelude_string_t **) 0 ; void *argp2 = 0 ; int res2 = 0 ; int argvi = 0; int result; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: idmef_analyzer_new_name(ptr,ret);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_analyzer, 0) ) { croak("Expected type idmef_analyzer_t * for argument 1."); return; } } res2 = SWIG_ConvertPtr(ST(1), &argp2,SWIGTYPE_p_p_prelude_string_t, 0 | 0 ); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "idmef_analyzer_new_name" "', argument " "2"" of type '" "prelude_string_t **""'"); } arg2 = (prelude_string_t **)(argp2); result = (int)idmef_analyzer_new_name(arg1,arg2); { ST(argvi) = newSViv(result); argvi++; } XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_analyzer_get_manufacturer) { { idmef_analyzer_t *arg1 = (idmef_analyzer_t *) 0 ; int argvi = 0; prelude_string_t *result = 0 ; dXSARGS; if ((items < 1) || (items > 1)) { SWIG_croak("Usage: idmef_analyzer_get_manufacturer(ptr);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_analyzer, 0) ) { croak("Expected type idmef_analyzer_t * for argument 1."); return; } } result = (prelude_string_t *)idmef_analyzer_get_manufacturer(arg1); { ST(argvi) = swig_perl_string(result); argvi++; } XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_analyzer_set_manufacturer) { { idmef_analyzer_t *arg1 = (idmef_analyzer_t *) 0 ; prelude_string_t *arg2 = (prelude_string_t *) 0 ; int argvi = 0; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: idmef_analyzer_set_manufacturer(ptr,manufacturer);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_analyzer, 0) ) { croak("Expected type idmef_analyzer_t * for argument 1."); return; } } { int ret; char *str; STRLEN len; str = SvPV(ST(1), len); ret = prelude_string_new_dup_fast(&(arg2), str, len); if ( ret < 0 ) { swig_perl_raise_error(ret); return; } } idmef_analyzer_set_manufacturer(arg1,arg2); ST(argvi) = sv_newmortal(); XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_analyzer_new_manufacturer) { { idmef_analyzer_t *arg1 = (idmef_analyzer_t *) 0 ; prelude_string_t **arg2 = (prelude_string_t **) 0 ; void *argp2 = 0 ; int res2 = 0 ; int argvi = 0; int result; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: idmef_analyzer_new_manufacturer(ptr,ret);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_analyzer, 0) ) { croak("Expected type idmef_analyzer_t * for argument 1."); return; } } res2 = SWIG_ConvertPtr(ST(1), &argp2,SWIGTYPE_p_p_prelude_string_t, 0 | 0 ); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "idmef_analyzer_new_manufacturer" "', argument " "2"" of type '" "prelude_string_t **""'"); } arg2 = (prelude_string_t **)(argp2); result = (int)idmef_analyzer_new_manufacturer(arg1,arg2); { ST(argvi) = newSViv(result); argvi++; } XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_analyzer_get_model) { { idmef_analyzer_t *arg1 = (idmef_analyzer_t *) 0 ; int argvi = 0; prelude_string_t *result = 0 ; dXSARGS; if ((items < 1) || (items > 1)) { SWIG_croak("Usage: idmef_analyzer_get_model(ptr);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_analyzer, 0) ) { croak("Expected type idmef_analyzer_t * for argument 1."); return; } } result = (prelude_string_t *)idmef_analyzer_get_model(arg1); { ST(argvi) = swig_perl_string(result); argvi++; } XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_analyzer_set_model) { { idmef_analyzer_t *arg1 = (idmef_analyzer_t *) 0 ; prelude_string_t *arg2 = (prelude_string_t *) 0 ; int argvi = 0; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: idmef_analyzer_set_model(ptr,model);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_analyzer, 0) ) { croak("Expected type idmef_analyzer_t * for argument 1."); return; } } { int ret; char *str; STRLEN len; str = SvPV(ST(1), len); ret = prelude_string_new_dup_fast(&(arg2), str, len); if ( ret < 0 ) { swig_perl_raise_error(ret); return; } } idmef_analyzer_set_model(arg1,arg2); ST(argvi) = sv_newmortal(); XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_analyzer_new_model) { { idmef_analyzer_t *arg1 = (idmef_analyzer_t *) 0 ; prelude_string_t **arg2 = (prelude_string_t **) 0 ; void *argp2 = 0 ; int res2 = 0 ; int argvi = 0; int result; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: idmef_analyzer_new_model(ptr,ret);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_analyzer, 0) ) { croak("Expected type idmef_analyzer_t * for argument 1."); return; } } res2 = SWIG_ConvertPtr(ST(1), &argp2,SWIGTYPE_p_p_prelude_string_t, 0 | 0 ); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "idmef_analyzer_new_model" "', argument " "2"" of type '" "prelude_string_t **""'"); } arg2 = (prelude_string_t **)(argp2); result = (int)idmef_analyzer_new_model(arg1,arg2); { ST(argvi) = newSViv(result); argvi++; } XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_analyzer_get_version) { { idmef_analyzer_t *arg1 = (idmef_analyzer_t *) 0 ; int argvi = 0; prelude_string_t *result = 0 ; dXSARGS; if ((items < 1) || (items > 1)) { SWIG_croak("Usage: idmef_analyzer_get_version(ptr);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_analyzer, 0) ) { croak("Expected type idmef_analyzer_t * for argument 1."); return; } } result = (prelude_string_t *)idmef_analyzer_get_version(arg1); { ST(argvi) = swig_perl_string(result); argvi++; } XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_analyzer_set_version) { { idmef_analyzer_t *arg1 = (idmef_analyzer_t *) 0 ; prelude_string_t *arg2 = (prelude_string_t *) 0 ; int argvi = 0; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: idmef_analyzer_set_version(ptr,version);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_analyzer, 0) ) { croak("Expected type idmef_analyzer_t * for argument 1."); return; } } { int ret; char *str; STRLEN len; str = SvPV(ST(1), len); ret = prelude_string_new_dup_fast(&(arg2), str, len); if ( ret < 0 ) { swig_perl_raise_error(ret); return; } } idmef_analyzer_set_version(arg1,arg2); ST(argvi) = sv_newmortal(); XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_analyzer_new_version) { { idmef_analyzer_t *arg1 = (idmef_analyzer_t *) 0 ; prelude_string_t **arg2 = (prelude_string_t **) 0 ; void *argp2 = 0 ; int res2 = 0 ; int argvi = 0; int result; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: idmef_analyzer_new_version(ptr,ret);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_analyzer, 0) ) { croak("Expected type idmef_analyzer_t * for argument 1."); return; } } res2 = SWIG_ConvertPtr(ST(1), &argp2,SWIGTYPE_p_p_prelude_string_t, 0 | 0 ); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "idmef_analyzer_new_version" "', argument " "2"" of type '" "prelude_string_t **""'"); } arg2 = (prelude_string_t **)(argp2); result = (int)idmef_analyzer_new_version(arg1,arg2); { ST(argvi) = newSViv(result); argvi++; } XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_analyzer_get_class) { { idmef_analyzer_t *arg1 = (idmef_analyzer_t *) 0 ; int argvi = 0; prelude_string_t *result = 0 ; dXSARGS; if ((items < 1) || (items > 1)) { SWIG_croak("Usage: idmef_analyzer_get_class(ptr);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_analyzer, 0) ) { croak("Expected type idmef_analyzer_t * for argument 1."); return; } } result = (prelude_string_t *)idmef_analyzer_get_class(arg1); { ST(argvi) = swig_perl_string(result); argvi++; } XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_analyzer_set_class) { { idmef_analyzer_t *arg1 = (idmef_analyzer_t *) 0 ; prelude_string_t *arg2 = (prelude_string_t *) 0 ; int argvi = 0; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: idmef_analyzer_set_class(ptr,class_str);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_analyzer, 0) ) { croak("Expected type idmef_analyzer_t * for argument 1."); return; } } { int ret; char *str; STRLEN len; str = SvPV(ST(1), len); ret = prelude_string_new_dup_fast(&(arg2), str, len); if ( ret < 0 ) { swig_perl_raise_error(ret); return; } } idmef_analyzer_set_class(arg1,arg2); ST(argvi) = sv_newmortal(); XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_analyzer_new_class) { { idmef_analyzer_t *arg1 = (idmef_analyzer_t *) 0 ; prelude_string_t **arg2 = (prelude_string_t **) 0 ; void *argp2 = 0 ; int res2 = 0 ; int argvi = 0; int result; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: idmef_analyzer_new_class(ptr,ret);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_analyzer, 0) ) { croak("Expected type idmef_analyzer_t * for argument 1."); return; } } res2 = SWIG_ConvertPtr(ST(1), &argp2,SWIGTYPE_p_p_prelude_string_t, 0 | 0 ); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "idmef_analyzer_new_class" "', argument " "2"" of type '" "prelude_string_t **""'"); } arg2 = (prelude_string_t **)(argp2); result = (int)idmef_analyzer_new_class(arg1,arg2); { ST(argvi) = newSViv(result); argvi++; } XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_analyzer_get_ostype) { { idmef_analyzer_t *arg1 = (idmef_analyzer_t *) 0 ; int argvi = 0; prelude_string_t *result = 0 ; dXSARGS; if ((items < 1) || (items > 1)) { SWIG_croak("Usage: idmef_analyzer_get_ostype(ptr);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_analyzer, 0) ) { croak("Expected type idmef_analyzer_t * for argument 1."); return; } } result = (prelude_string_t *)idmef_analyzer_get_ostype(arg1); { ST(argvi) = swig_perl_string(result); argvi++; } XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_analyzer_set_ostype) { { idmef_analyzer_t *arg1 = (idmef_analyzer_t *) 0 ; prelude_string_t *arg2 = (prelude_string_t *) 0 ; int argvi = 0; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: idmef_analyzer_set_ostype(ptr,ostype);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_analyzer, 0) ) { croak("Expected type idmef_analyzer_t * for argument 1."); return; } } { int ret; char *str; STRLEN len; str = SvPV(ST(1), len); ret = prelude_string_new_dup_fast(&(arg2), str, len); if ( ret < 0 ) { swig_perl_raise_error(ret); return; } } idmef_analyzer_set_ostype(arg1,arg2); ST(argvi) = sv_newmortal(); XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_analyzer_new_ostype) { { idmef_analyzer_t *arg1 = (idmef_analyzer_t *) 0 ; prelude_string_t **arg2 = (prelude_string_t **) 0 ; void *argp2 = 0 ; int res2 = 0 ; int argvi = 0; int result; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: idmef_analyzer_new_ostype(ptr,ret);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_analyzer, 0) ) { croak("Expected type idmef_analyzer_t * for argument 1."); return; } } res2 = SWIG_ConvertPtr(ST(1), &argp2,SWIGTYPE_p_p_prelude_string_t, 0 | 0 ); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "idmef_analyzer_new_ostype" "', argument " "2"" of type '" "prelude_string_t **""'"); } arg2 = (prelude_string_t **)(argp2); result = (int)idmef_analyzer_new_ostype(arg1,arg2); { ST(argvi) = newSViv(result); argvi++; } XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_analyzer_get_osversion) { { idmef_analyzer_t *arg1 = (idmef_analyzer_t *) 0 ; int argvi = 0; prelude_string_t *result = 0 ; dXSARGS; if ((items < 1) || (items > 1)) { SWIG_croak("Usage: idmef_analyzer_get_osversion(ptr);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_analyzer, 0) ) { croak("Expected type idmef_analyzer_t * for argument 1."); return; } } result = (prelude_string_t *)idmef_analyzer_get_osversion(arg1); { ST(argvi) = swig_perl_string(result); argvi++; } XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_analyzer_set_osversion) { { idmef_analyzer_t *arg1 = (idmef_analyzer_t *) 0 ; prelude_string_t *arg2 = (prelude_string_t *) 0 ; int argvi = 0; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: idmef_analyzer_set_osversion(ptr,osversion);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_analyzer, 0) ) { croak("Expected type idmef_analyzer_t * for argument 1."); return; } } { int ret; char *str; STRLEN len; str = SvPV(ST(1), len); ret = prelude_string_new_dup_fast(&(arg2), str, len); if ( ret < 0 ) { swig_perl_raise_error(ret); return; } } idmef_analyzer_set_osversion(arg1,arg2); ST(argvi) = sv_newmortal(); XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_analyzer_new_osversion) { { idmef_analyzer_t *arg1 = (idmef_analyzer_t *) 0 ; prelude_string_t **arg2 = (prelude_string_t **) 0 ; void *argp2 = 0 ; int res2 = 0 ; int argvi = 0; int result; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: idmef_analyzer_new_osversion(ptr,ret);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_analyzer, 0) ) { croak("Expected type idmef_analyzer_t * for argument 1."); return; } } res2 = SWIG_ConvertPtr(ST(1), &argp2,SWIGTYPE_p_p_prelude_string_t, 0 | 0 ); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "idmef_analyzer_new_osversion" "', argument " "2"" of type '" "prelude_string_t **""'"); } arg2 = (prelude_string_t **)(argp2); result = (int)idmef_analyzer_new_osversion(arg1,arg2); { ST(argvi) = newSViv(result); argvi++; } XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_analyzer_get_node) { { idmef_analyzer_t *arg1 = (idmef_analyzer_t *) 0 ; int argvi = 0; idmef_node_t *result = 0 ; dXSARGS; if ((items < 1) || (items > 1)) { SWIG_croak("Usage: idmef_analyzer_get_node(ptr);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_analyzer, 0) ) { croak("Expected type idmef_analyzer_t * for argument 1."); return; } } result = (idmef_node_t *)idmef_analyzer_get_node(arg1); ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_idmef_node, 0 | 0); argvi++ ; XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_analyzer_set_node) { { idmef_analyzer_t *arg1 = (idmef_analyzer_t *) 0 ; idmef_node_t *arg2 = (idmef_node_t *) 0 ; int argvi = 0; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: idmef_analyzer_set_node(ptr,node);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_analyzer, 0) ) { croak("Expected type idmef_analyzer_t * for argument 1."); return; } } { if ( ! SvROK(ST(1)) ) { croak("Argument 2 is null."); return; } if ( SWIG_ConvertPtr(ST(1), (void **)&arg2, SWIGTYPE_p_idmef_node, 0) ) { croak("Expected type idmef_node_t * for argument 2."); return; } } idmef_analyzer_set_node(arg1,arg2); ST(argvi) = sv_newmortal(); XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_analyzer_new_node) { { idmef_analyzer_t *arg1 = (idmef_analyzer_t *) 0 ; idmef_node_t **arg2 = (idmef_node_t **) 0 ; idmef_node_t *tmp2 ; int argvi = 0; SV * _saved[1] ; int result; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: idmef_analyzer_new_node(ptr,ret);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_analyzer, 0) ) { croak("Expected type idmef_analyzer_t * for argument 1."); return; } } { arg2 = (idmef_node_t **) &tmp2; } _saved[0] = ST(1); result = (int)idmef_analyzer_new_node(arg1,arg2); { ST(argvi) = newSViv(result); argvi++; } { SV *sv; if ( result >= 0 ) { if ( ! SvROK(_saved[0]) ) { croak("Argument 2 is not a reference."); return; } sv = SvRV(_saved[0]); sv_setsv(sv, SWIG_NewPointerObj((void *) * arg2, SWIGTYPE_p_idmef_node, 0)); } } XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_analyzer_get_process) { { idmef_analyzer_t *arg1 = (idmef_analyzer_t *) 0 ; int argvi = 0; idmef_process_t *result = 0 ; dXSARGS; if ((items < 1) || (items > 1)) { SWIG_croak("Usage: idmef_analyzer_get_process(ptr);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_analyzer, 0) ) { croak("Expected type idmef_analyzer_t * for argument 1."); return; } } result = (idmef_process_t *)idmef_analyzer_get_process(arg1); ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_idmef_process, 0 | 0); argvi++ ; XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_analyzer_set_process) { { idmef_analyzer_t *arg1 = (idmef_analyzer_t *) 0 ; idmef_process_t *arg2 = (idmef_process_t *) 0 ; int argvi = 0; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: idmef_analyzer_set_process(ptr,process);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_analyzer, 0) ) { croak("Expected type idmef_analyzer_t * for argument 1."); return; } } { if ( ! SvROK(ST(1)) ) { croak("Argument 2 is null."); return; } if ( SWIG_ConvertPtr(ST(1), (void **)&arg2, SWIGTYPE_p_idmef_process, 0) ) { croak("Expected type idmef_process_t * for argument 2."); return; } } idmef_analyzer_set_process(arg1,arg2); ST(argvi) = sv_newmortal(); XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_analyzer_new_process) { { idmef_analyzer_t *arg1 = (idmef_analyzer_t *) 0 ; idmef_process_t **arg2 = (idmef_process_t **) 0 ; idmef_process_t *tmp2 ; int argvi = 0; SV * _saved[1] ; int result; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: idmef_analyzer_new_process(ptr,ret);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_analyzer, 0) ) { croak("Expected type idmef_analyzer_t * for argument 1."); return; } } { arg2 = (idmef_process_t **) &tmp2; } _saved[0] = ST(1); result = (int)idmef_analyzer_new_process(arg1,arg2); { ST(argvi) = newSViv(result); argvi++; } { SV *sv; if ( result >= 0 ) { if ( ! SvROK(_saved[0]) ) { croak("Argument 2 is not a reference."); return; } sv = SvRV(_saved[0]); sv_setsv(sv, SWIG_NewPointerObj((void *) * arg2, SWIGTYPE_p_idmef_process, 0)); } } XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_alertident_new) { { idmef_alertident_t **arg1 = (idmef_alertident_t **) 0 ; int argvi = 0; SV * _saved[1] ; int result; dXSARGS; if ((items < 1) || (items > 1)) { SWIG_croak("Usage: idmef_alertident_new(ret);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_p_idmef_alertident, 0) ) { croak("Expected type idmef_alertident_t ** for argument 1."); return; } } _saved[0] = ST(0); result = (int)idmef_alertident_new(arg1); { ST(argvi) = newSViv(result); argvi++; } { SV *sv; if ( result >= 0 ) { if ( ! SvROK(_saved[0]) ) { croak("Argument 1 is not a reference."); return; } sv = SvRV(_saved[0]); sv_setsv(sv, SWIG_NewPointerObj((void *) * arg1, SWIGTYPE_p_idmef_alertident, 0)); } } XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_alertident_copy) { { idmef_alertident_t *arg1 = (idmef_alertident_t *) 0 ; idmef_alertident_t *arg2 = (idmef_alertident_t *) 0 ; void *argp1 = 0 ; int res1 = 0 ; void *argp2 = 0 ; int res2 = 0 ; int argvi = 0; int result; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: idmef_alertident_copy(src,dst);"); } res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_idmef_alertident, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "idmef_alertident_copy" "', argument " "1"" of type '" "idmef_alertident_t const *""'"); } arg1 = (idmef_alertident_t *)(argp1); res2 = SWIG_ConvertPtr(ST(1), &argp2,SWIGTYPE_p_idmef_alertident, 0 | 0 ); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "idmef_alertident_copy" "', argument " "2"" of type '" "idmef_alertident_t *""'"); } arg2 = (idmef_alertident_t *)(argp2); result = (int)idmef_alertident_copy((struct idmef_alertident const *)arg1,arg2); { ST(argvi) = newSViv(result); argvi++; } XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_alertident_clone) { { idmef_alertident_t *arg1 = (idmef_alertident_t *) 0 ; idmef_alertident_t **arg2 = (idmef_alertident_t **) 0 ; void *argp1 = 0 ; int res1 = 0 ; int argvi = 0; SV * _saved[1] ; int result; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: idmef_alertident_clone(src,dst);"); } res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_idmef_alertident, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "idmef_alertident_clone" "', argument " "1"" of type '" "idmef_alertident_t *""'"); } arg1 = (idmef_alertident_t *)(argp1); { if ( ! SvROK(ST(1)) ) { croak("Argument 2 is null."); return; } if ( SWIG_ConvertPtr(ST(1), (void **)&arg2, SWIGTYPE_p_p_idmef_alertident, 0) ) { croak("Expected type idmef_alertident_t ** for argument 2."); return; } } _saved[0] = ST(1); result = (int)idmef_alertident_clone(arg1,arg2); { ST(argvi) = newSViv(result); argvi++; } { SV *sv; if ( result >= 0 ) { if ( ! SvROK(_saved[0]) ) { croak("Argument 2 is not a reference."); return; } sv = SvRV(_saved[0]); sv_setsv(sv, SWIG_NewPointerObj((void *) * arg2, SWIGTYPE_p_idmef_alertident, 0)); } } XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_alertident_compare) { { idmef_alertident_t *arg1 = (idmef_alertident_t *) 0 ; idmef_alertident_t *arg2 = (idmef_alertident_t *) 0 ; void *argp1 = 0 ; int res1 = 0 ; void *argp2 = 0 ; int res2 = 0 ; int argvi = 0; int result; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: idmef_alertident_compare(obj1,obj2);"); } res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_idmef_alertident, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "idmef_alertident_compare" "', argument " "1"" of type '" "idmef_alertident_t const *""'"); } arg1 = (idmef_alertident_t *)(argp1); res2 = SWIG_ConvertPtr(ST(1), &argp2,SWIGTYPE_p_idmef_alertident, 0 | 0 ); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "idmef_alertident_compare" "', argument " "2"" of type '" "idmef_alertident_t const *""'"); } arg2 = (idmef_alertident_t *)(argp2); result = (int)idmef_alertident_compare((struct idmef_alertident const *)arg1,(struct idmef_alertident const *)arg2); { ST(argvi) = newSViv(result); argvi++; } XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_alertident_ref) { { idmef_alertident_t *arg1 = (idmef_alertident_t *) 0 ; void *argp1 = 0 ; int res1 = 0 ; int argvi = 0; idmef_alertident_t *result = 0 ; dXSARGS; if ((items < 1) || (items > 1)) { SWIG_croak("Usage: idmef_alertident_ref(alertident);"); } res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_idmef_alertident, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "idmef_alertident_ref" "', argument " "1"" of type '" "idmef_alertident_t *""'"); } arg1 = (idmef_alertident_t *)(argp1); result = (idmef_alertident_t *)idmef_alertident_ref(arg1); ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_idmef_alertident, 0 | 0); argvi++ ; XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_alertident_destroy) { { idmef_alertident_t *arg1 = (idmef_alertident_t *) 0 ; void *argp1 = 0 ; int res1 = 0 ; int argvi = 0; dXSARGS; if ((items < 1) || (items > 1)) { SWIG_croak("Usage: idmef_alertident_destroy(ptr);"); } res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_idmef_alertident, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "idmef_alertident_destroy" "', argument " "1"" of type '" "idmef_alertident_t *""'"); } arg1 = (idmef_alertident_t *)(argp1); idmef_alertident_destroy(arg1); ST(argvi) = sv_newmortal(); XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_alertident_get_alertident) { { idmef_alertident_t *arg1 = (idmef_alertident_t *) 0 ; void *argp1 = 0 ; int res1 = 0 ; int argvi = 0; prelude_string_t *result = 0 ; dXSARGS; if ((items < 1) || (items > 1)) { SWIG_croak("Usage: idmef_alertident_get_alertident(ptr);"); } res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_idmef_alertident, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "idmef_alertident_get_alertident" "', argument " "1"" of type '" "idmef_alertident_t *""'"); } arg1 = (idmef_alertident_t *)(argp1); result = (prelude_string_t *)idmef_alertident_get_alertident(arg1); { ST(argvi) = swig_perl_string(result); argvi++; } XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_alertident_set_alertident) { { idmef_alertident_t *arg1 = (idmef_alertident_t *) 0 ; prelude_string_t *arg2 = (prelude_string_t *) 0 ; void *argp1 = 0 ; int res1 = 0 ; int argvi = 0; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: idmef_alertident_set_alertident(ptr,alertident);"); } res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_idmef_alertident, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "idmef_alertident_set_alertident" "', argument " "1"" of type '" "idmef_alertident_t *""'"); } arg1 = (idmef_alertident_t *)(argp1); { int ret; char *str; STRLEN len; str = SvPV(ST(1), len); ret = prelude_string_new_dup_fast(&(arg2), str, len); if ( ret < 0 ) { swig_perl_raise_error(ret); return; } } idmef_alertident_set_alertident(arg1,arg2); ST(argvi) = sv_newmortal(); XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_alertident_new_alertident) { { idmef_alertident_t *arg1 = (idmef_alertident_t *) 0 ; prelude_string_t **arg2 = (prelude_string_t **) 0 ; void *argp1 = 0 ; int res1 = 0 ; void *argp2 = 0 ; int res2 = 0 ; int argvi = 0; int result; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: idmef_alertident_new_alertident(ptr,ret);"); } res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_idmef_alertident, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "idmef_alertident_new_alertident" "', argument " "1"" of type '" "idmef_alertident_t *""'"); } arg1 = (idmef_alertident_t *)(argp1); res2 = SWIG_ConvertPtr(ST(1), &argp2,SWIGTYPE_p_p_prelude_string_t, 0 | 0 ); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "idmef_alertident_new_alertident" "', argument " "2"" of type '" "prelude_string_t **""'"); } arg2 = (prelude_string_t **)(argp2); result = (int)idmef_alertident_new_alertident(arg1,arg2); { ST(argvi) = newSViv(result); argvi++; } XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_alertident_get_analyzerid) { { idmef_alertident_t *arg1 = (idmef_alertident_t *) 0 ; void *argp1 = 0 ; int res1 = 0 ; int argvi = 0; prelude_string_t *result = 0 ; dXSARGS; if ((items < 1) || (items > 1)) { SWIG_croak("Usage: idmef_alertident_get_analyzerid(ptr);"); } res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_idmef_alertident, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "idmef_alertident_get_analyzerid" "', argument " "1"" of type '" "idmef_alertident_t *""'"); } arg1 = (idmef_alertident_t *)(argp1); result = (prelude_string_t *)idmef_alertident_get_analyzerid(arg1); { ST(argvi) = swig_perl_string(result); argvi++; } XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_alertident_set_analyzerid) { { idmef_alertident_t *arg1 = (idmef_alertident_t *) 0 ; prelude_string_t *arg2 = (prelude_string_t *) 0 ; void *argp1 = 0 ; int res1 = 0 ; int argvi = 0; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: idmef_alertident_set_analyzerid(ptr,analyzerid);"); } res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_idmef_alertident, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "idmef_alertident_set_analyzerid" "', argument " "1"" of type '" "idmef_alertident_t *""'"); } arg1 = (idmef_alertident_t *)(argp1); { int ret; char *str; STRLEN len; str = SvPV(ST(1), len); ret = prelude_string_new_dup_fast(&(arg2), str, len); if ( ret < 0 ) { swig_perl_raise_error(ret); return; } } idmef_alertident_set_analyzerid(arg1,arg2); ST(argvi) = sv_newmortal(); XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_alertident_new_analyzerid) { { idmef_alertident_t *arg1 = (idmef_alertident_t *) 0 ; prelude_string_t **arg2 = (prelude_string_t **) 0 ; void *argp1 = 0 ; int res1 = 0 ; void *argp2 = 0 ; int res2 = 0 ; int argvi = 0; int result; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: idmef_alertident_new_analyzerid(ptr,ret);"); } res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_idmef_alertident, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "idmef_alertident_new_analyzerid" "', argument " "1"" of type '" "idmef_alertident_t *""'"); } arg1 = (idmef_alertident_t *)(argp1); res2 = SWIG_ConvertPtr(ST(1), &argp2,SWIGTYPE_p_p_prelude_string_t, 0 | 0 ); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "idmef_alertident_new_analyzerid" "', argument " "2"" of type '" "prelude_string_t **""'"); } arg2 = (prelude_string_t **)(argp2); result = (int)idmef_alertident_new_analyzerid(arg1,arg2); { ST(argvi) = newSViv(result); argvi++; } XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_impact_severity_to_numeric) { { char *arg1 = (char *) 0 ; int res1 ; char *buf1 = 0 ; int alloc1 = 0 ; int argvi = 0; idmef_impact_severity_t result; dXSARGS; if ((items < 1) || (items > 1)) { SWIG_croak("Usage: idmef_impact_severity_to_numeric(name);"); } res1 = SWIG_AsCharPtrAndSize(ST(0), &buf1, NULL, &alloc1); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "idmef_impact_severity_to_numeric" "', argument " "1"" of type '" "char const *""'"); } arg1 = (char *)(buf1); result = (idmef_impact_severity_t)idmef_impact_severity_to_numeric((char const *)arg1); ST(argvi) = SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(result)); argvi++ ; if (alloc1 == SWIG_NEWOBJ) free((char*)buf1); XSRETURN(argvi); fail: if (alloc1 == SWIG_NEWOBJ) free((char*)buf1); SWIG_croak_null(); } } XS(_wrap_idmef_impact_severity_to_string) { { idmef_impact_severity_t arg1 ; int val1 ; int ecode1 = 0 ; int argvi = 0; char *result = 0 ; dXSARGS; if ((items < 1) || (items > 1)) { SWIG_croak("Usage: idmef_impact_severity_to_string(val);"); } ecode1 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(0), &val1); if (!SWIG_IsOK(ecode1)) { SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "idmef_impact_severity_to_string" "', argument " "1"" of type '" "idmef_impact_severity_t""'"); } arg1 = (idmef_impact_severity_t)(val1); result = (char *)idmef_impact_severity_to_string(arg1); ST(argvi) = SWIG_FromCharPtr((const char *)result); argvi++ ; XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_impact_completion_to_numeric) { { char *arg1 = (char *) 0 ; int res1 ; char *buf1 = 0 ; int alloc1 = 0 ; int argvi = 0; idmef_impact_completion_t result; dXSARGS; if ((items < 1) || (items > 1)) { SWIG_croak("Usage: idmef_impact_completion_to_numeric(name);"); } res1 = SWIG_AsCharPtrAndSize(ST(0), &buf1, NULL, &alloc1); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "idmef_impact_completion_to_numeric" "', argument " "1"" of type '" "char const *""'"); } arg1 = (char *)(buf1); result = (idmef_impact_completion_t)idmef_impact_completion_to_numeric((char const *)arg1); ST(argvi) = SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(result)); argvi++ ; if (alloc1 == SWIG_NEWOBJ) free((char*)buf1); XSRETURN(argvi); fail: if (alloc1 == SWIG_NEWOBJ) free((char*)buf1); SWIG_croak_null(); } } XS(_wrap_idmef_impact_completion_to_string) { { idmef_impact_completion_t arg1 ; int val1 ; int ecode1 = 0 ; int argvi = 0; char *result = 0 ; dXSARGS; if ((items < 1) || (items > 1)) { SWIG_croak("Usage: idmef_impact_completion_to_string(val);"); } ecode1 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(0), &val1); if (!SWIG_IsOK(ecode1)) { SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "idmef_impact_completion_to_string" "', argument " "1"" of type '" "idmef_impact_completion_t""'"); } arg1 = (idmef_impact_completion_t)(val1); result = (char *)idmef_impact_completion_to_string(arg1); ST(argvi) = SWIG_FromCharPtr((const char *)result); argvi++ ; XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_impact_type_to_numeric) { { char *arg1 = (char *) 0 ; int res1 ; char *buf1 = 0 ; int alloc1 = 0 ; int argvi = 0; idmef_impact_type_t result; dXSARGS; if ((items < 1) || (items > 1)) { SWIG_croak("Usage: idmef_impact_type_to_numeric(name);"); } res1 = SWIG_AsCharPtrAndSize(ST(0), &buf1, NULL, &alloc1); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "idmef_impact_type_to_numeric" "', argument " "1"" of type '" "char const *""'"); } arg1 = (char *)(buf1); result = (idmef_impact_type_t)idmef_impact_type_to_numeric((char const *)arg1); ST(argvi) = SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(result)); argvi++ ; if (alloc1 == SWIG_NEWOBJ) free((char*)buf1); XSRETURN(argvi); fail: if (alloc1 == SWIG_NEWOBJ) free((char*)buf1); SWIG_croak_null(); } } XS(_wrap_idmef_impact_type_to_string) { { idmef_impact_type_t arg1 ; int val1 ; int ecode1 = 0 ; int argvi = 0; char *result = 0 ; dXSARGS; if ((items < 1) || (items > 1)) { SWIG_croak("Usage: idmef_impact_type_to_string(val);"); } ecode1 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(0), &val1); if (!SWIG_IsOK(ecode1)) { SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "idmef_impact_type_to_string" "', argument " "1"" of type '" "idmef_impact_type_t""'"); } arg1 = (idmef_impact_type_t)(val1); result = (char *)idmef_impact_type_to_string(arg1); ST(argvi) = SWIG_FromCharPtr((const char *)result); argvi++ ; XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_impact_new) { { idmef_impact_t **arg1 = (idmef_impact_t **) 0 ; idmef_impact_t *tmp1 ; int argvi = 0; SV * _saved[1] ; int result; dXSARGS; if ((items < 1) || (items > 1)) { SWIG_croak("Usage: idmef_impact_new(ret);"); } { arg1 = (idmef_impact_t **) &tmp1; } _saved[0] = ST(0); result = (int)idmef_impact_new(arg1); { ST(argvi) = newSViv(result); argvi++; } { SV *sv; if ( result >= 0 ) { if ( ! SvROK(_saved[0]) ) { croak("Argument 1 is not a reference."); return; } sv = SvRV(_saved[0]); sv_setsv(sv, SWIG_NewPointerObj((void *) * arg1, SWIGTYPE_p_idmef_impact, 0)); } } XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_impact_copy) { { idmef_impact_t *arg1 = (idmef_impact_t *) 0 ; idmef_impact_t *arg2 = (idmef_impact_t *) 0 ; int argvi = 0; int result; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: idmef_impact_copy(src,dst);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_impact, 0) ) { croak("Expected type idmef_impact_t const * for argument 1."); return; } } { if ( ! SvROK(ST(1)) ) { croak("Argument 2 is null."); return; } if ( SWIG_ConvertPtr(ST(1), (void **)&arg2, SWIGTYPE_p_idmef_impact, 0) ) { croak("Expected type idmef_impact_t * for argument 2."); return; } } result = (int)idmef_impact_copy((struct idmef_impact const *)arg1,arg2); { ST(argvi) = newSViv(result); argvi++; } XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_impact_clone) { { idmef_impact_t *arg1 = (idmef_impact_t *) 0 ; idmef_impact_t **arg2 = (idmef_impact_t **) 0 ; idmef_impact_t *tmp2 ; int argvi = 0; SV * _saved[1] ; int result; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: idmef_impact_clone(src,dst);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_impact, 0) ) { croak("Expected type idmef_impact_t * for argument 1."); return; } } { arg2 = (idmef_impact_t **) &tmp2; } _saved[0] = ST(1); result = (int)idmef_impact_clone(arg1,arg2); { ST(argvi) = newSViv(result); argvi++; } { SV *sv; if ( result >= 0 ) { if ( ! SvROK(_saved[0]) ) { croak("Argument 2 is not a reference."); return; } sv = SvRV(_saved[0]); sv_setsv(sv, SWIG_NewPointerObj((void *) * arg2, SWIGTYPE_p_idmef_impact, 0)); } } XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_impact_compare) { { idmef_impact_t *arg1 = (idmef_impact_t *) 0 ; idmef_impact_t *arg2 = (idmef_impact_t *) 0 ; int argvi = 0; int result; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: idmef_impact_compare(obj1,obj2);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_impact, 0) ) { croak("Expected type idmef_impact_t const * for argument 1."); return; } } { if ( ! SvROK(ST(1)) ) { croak("Argument 2 is null."); return; } if ( SWIG_ConvertPtr(ST(1), (void **)&arg2, SWIGTYPE_p_idmef_impact, 0) ) { croak("Expected type idmef_impact_t const * for argument 2."); return; } } result = (int)idmef_impact_compare((struct idmef_impact const *)arg1,(struct idmef_impact const *)arg2); { ST(argvi) = newSViv(result); argvi++; } XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_impact_ref) { { idmef_impact_t *arg1 = (idmef_impact_t *) 0 ; int argvi = 0; idmef_impact_t *result = 0 ; dXSARGS; if ((items < 1) || (items > 1)) { SWIG_croak("Usage: idmef_impact_ref(impact);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_impact, 0) ) { croak("Expected type idmef_impact_t * for argument 1."); return; } } result = (idmef_impact_t *)idmef_impact_ref(arg1); ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_idmef_impact, 0 | 0); argvi++ ; XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_impact_destroy) { { idmef_impact_t *arg1 = (idmef_impact_t *) 0 ; int argvi = 0; dXSARGS; if ((items < 1) || (items > 1)) { SWIG_croak("Usage: idmef_impact_destroy(ptr);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_impact, 0) ) { croak("Expected type idmef_impact_t * for argument 1."); return; } } idmef_impact_destroy(arg1); ST(argvi) = sv_newmortal(); XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_impact_unset_severity) { { idmef_impact_t *arg1 = (idmef_impact_t *) 0 ; int argvi = 0; dXSARGS; if ((items < 1) || (items > 1)) { SWIG_croak("Usage: idmef_impact_unset_severity(ptr);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_impact, 0) ) { croak("Expected type idmef_impact_t * for argument 1."); return; } } idmef_impact_unset_severity(arg1); ST(argvi) = sv_newmortal(); XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_impact_get_severity) { { idmef_impact_t *arg1 = (idmef_impact_t *) 0 ; int argvi = 0; idmef_impact_severity_t *result = 0 ; dXSARGS; if ((items < 1) || (items > 1)) { SWIG_croak("Usage: idmef_impact_get_severity(ptr);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_impact, 0) ) { croak("Expected type idmef_impact_t * for argument 1."); return; } } result = (idmef_impact_severity_t *)idmef_impact_get_severity(arg1); ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_idmef_impact_severity_t, 0 | 0); argvi++ ; XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_impact_set_severity) { { idmef_impact_t *arg1 = (idmef_impact_t *) 0 ; idmef_impact_severity_t arg2 ; int val2 ; int ecode2 = 0 ; int argvi = 0; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: idmef_impact_set_severity(ptr,severity);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_impact, 0) ) { croak("Expected type idmef_impact_t * for argument 1."); return; } } ecode2 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(1), &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "idmef_impact_set_severity" "', argument " "2"" of type '" "idmef_impact_severity_t""'"); } arg2 = (idmef_impact_severity_t)(val2); idmef_impact_set_severity(arg1,arg2); ST(argvi) = sv_newmortal(); XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_impact_new_severity) { { idmef_impact_t *arg1 = (idmef_impact_t *) 0 ; idmef_impact_severity_t **arg2 = (idmef_impact_severity_t **) 0 ; void *argp2 = 0 ; int res2 = 0 ; int argvi = 0; int result; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: idmef_impact_new_severity(ptr,ret);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_impact, 0) ) { croak("Expected type idmef_impact_t * for argument 1."); return; } } res2 = SWIG_ConvertPtr(ST(1), &argp2,SWIGTYPE_p_p_idmef_impact_severity_t, 0 | 0 ); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "idmef_impact_new_severity" "', argument " "2"" of type '" "idmef_impact_severity_t **""'"); } arg2 = (idmef_impact_severity_t **)(argp2); result = (int)idmef_impact_new_severity(arg1,arg2); { ST(argvi) = newSViv(result); argvi++; } XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_impact_unset_completion) { { idmef_impact_t *arg1 = (idmef_impact_t *) 0 ; int argvi = 0; dXSARGS; if ((items < 1) || (items > 1)) { SWIG_croak("Usage: idmef_impact_unset_completion(ptr);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_impact, 0) ) { croak("Expected type idmef_impact_t * for argument 1."); return; } } idmef_impact_unset_completion(arg1); ST(argvi) = sv_newmortal(); XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_impact_get_completion) { { idmef_impact_t *arg1 = (idmef_impact_t *) 0 ; int argvi = 0; idmef_impact_completion_t *result = 0 ; dXSARGS; if ((items < 1) || (items > 1)) { SWIG_croak("Usage: idmef_impact_get_completion(ptr);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_impact, 0) ) { croak("Expected type idmef_impact_t * for argument 1."); return; } } result = (idmef_impact_completion_t *)idmef_impact_get_completion(arg1); ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_idmef_impact_completion_t, 0 | 0); argvi++ ; XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_impact_set_completion) { { idmef_impact_t *arg1 = (idmef_impact_t *) 0 ; idmef_impact_completion_t arg2 ; int val2 ; int ecode2 = 0 ; int argvi = 0; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: idmef_impact_set_completion(ptr,completion);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_impact, 0) ) { croak("Expected type idmef_impact_t * for argument 1."); return; } } ecode2 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(1), &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "idmef_impact_set_completion" "', argument " "2"" of type '" "idmef_impact_completion_t""'"); } arg2 = (idmef_impact_completion_t)(val2); idmef_impact_set_completion(arg1,arg2); ST(argvi) = sv_newmortal(); XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_impact_new_completion) { { idmef_impact_t *arg1 = (idmef_impact_t *) 0 ; idmef_impact_completion_t **arg2 = (idmef_impact_completion_t **) 0 ; void *argp2 = 0 ; int res2 = 0 ; int argvi = 0; int result; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: idmef_impact_new_completion(ptr,ret);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_impact, 0) ) { croak("Expected type idmef_impact_t * for argument 1."); return; } } res2 = SWIG_ConvertPtr(ST(1), &argp2,SWIGTYPE_p_p_idmef_impact_completion_t, 0 | 0 ); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "idmef_impact_new_completion" "', argument " "2"" of type '" "idmef_impact_completion_t **""'"); } arg2 = (idmef_impact_completion_t **)(argp2); result = (int)idmef_impact_new_completion(arg1,arg2); { ST(argvi) = newSViv(result); argvi++; } XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_impact_get_type) { { idmef_impact_t *arg1 = (idmef_impact_t *) 0 ; int argvi = 0; idmef_impact_type_t result; dXSARGS; if ((items < 1) || (items > 1)) { SWIG_croak("Usage: idmef_impact_get_type(ptr);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_impact, 0) ) { croak("Expected type idmef_impact_t * for argument 1."); return; } } result = (idmef_impact_type_t)idmef_impact_get_type(arg1); ST(argvi) = SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(result)); argvi++ ; XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_impact_set_type) { { idmef_impact_t *arg1 = (idmef_impact_t *) 0 ; idmef_impact_type_t arg2 ; int val2 ; int ecode2 = 0 ; int argvi = 0; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: idmef_impact_set_type(ptr,type);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_impact, 0) ) { croak("Expected type idmef_impact_t * for argument 1."); return; } } ecode2 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(1), &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "idmef_impact_set_type" "', argument " "2"" of type '" "idmef_impact_type_t""'"); } arg2 = (idmef_impact_type_t)(val2); idmef_impact_set_type(arg1,arg2); ST(argvi) = sv_newmortal(); XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_impact_new_type) { { idmef_impact_t *arg1 = (idmef_impact_t *) 0 ; idmef_impact_type_t **arg2 = (idmef_impact_type_t **) 0 ; void *argp2 = 0 ; int res2 = 0 ; int argvi = 0; int result; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: idmef_impact_new_type(ptr,ret);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_impact, 0) ) { croak("Expected type idmef_impact_t * for argument 1."); return; } } res2 = SWIG_ConvertPtr(ST(1), &argp2,SWIGTYPE_p_p_idmef_impact_type_t, 0 | 0 ); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "idmef_impact_new_type" "', argument " "2"" of type '" "idmef_impact_type_t **""'"); } arg2 = (idmef_impact_type_t **)(argp2); result = (int)idmef_impact_new_type(arg1,arg2); { ST(argvi) = newSViv(result); argvi++; } XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_impact_get_description) { { idmef_impact_t *arg1 = (idmef_impact_t *) 0 ; int argvi = 0; prelude_string_t *result = 0 ; dXSARGS; if ((items < 1) || (items > 1)) { SWIG_croak("Usage: idmef_impact_get_description(ptr);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_impact, 0) ) { croak("Expected type idmef_impact_t * for argument 1."); return; } } result = (prelude_string_t *)idmef_impact_get_description(arg1); { ST(argvi) = swig_perl_string(result); argvi++; } XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_impact_set_description) { { idmef_impact_t *arg1 = (idmef_impact_t *) 0 ; prelude_string_t *arg2 = (prelude_string_t *) 0 ; int argvi = 0; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: idmef_impact_set_description(ptr,description);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_impact, 0) ) { croak("Expected type idmef_impact_t * for argument 1."); return; } } { int ret; char *str; STRLEN len; str = SvPV(ST(1), len); ret = prelude_string_new_dup_fast(&(arg2), str, len); if ( ret < 0 ) { swig_perl_raise_error(ret); return; } } idmef_impact_set_description(arg1,arg2); ST(argvi) = sv_newmortal(); XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_impact_new_description) { { idmef_impact_t *arg1 = (idmef_impact_t *) 0 ; prelude_string_t **arg2 = (prelude_string_t **) 0 ; void *argp2 = 0 ; int res2 = 0 ; int argvi = 0; int result; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: idmef_impact_new_description(ptr,ret);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_impact, 0) ) { croak("Expected type idmef_impact_t * for argument 1."); return; } } res2 = SWIG_ConvertPtr(ST(1), &argp2,SWIGTYPE_p_p_prelude_string_t, 0 | 0 ); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "idmef_impact_new_description" "', argument " "2"" of type '" "prelude_string_t **""'"); } arg2 = (prelude_string_t **)(argp2); result = (int)idmef_impact_new_description(arg1,arg2); { ST(argvi) = newSViv(result); argvi++; } XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_action_category_to_numeric) { { char *arg1 = (char *) 0 ; int res1 ; char *buf1 = 0 ; int alloc1 = 0 ; int argvi = 0; idmef_action_category_t result; dXSARGS; if ((items < 1) || (items > 1)) { SWIG_croak("Usage: idmef_action_category_to_numeric(name);"); } res1 = SWIG_AsCharPtrAndSize(ST(0), &buf1, NULL, &alloc1); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "idmef_action_category_to_numeric" "', argument " "1"" of type '" "char const *""'"); } arg1 = (char *)(buf1); result = (idmef_action_category_t)idmef_action_category_to_numeric((char const *)arg1); ST(argvi) = SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(result)); argvi++ ; if (alloc1 == SWIG_NEWOBJ) free((char*)buf1); XSRETURN(argvi); fail: if (alloc1 == SWIG_NEWOBJ) free((char*)buf1); SWIG_croak_null(); } } XS(_wrap_idmef_action_category_to_string) { { idmef_action_category_t arg1 ; int val1 ; int ecode1 = 0 ; int argvi = 0; char *result = 0 ; dXSARGS; if ((items < 1) || (items > 1)) { SWIG_croak("Usage: idmef_action_category_to_string(val);"); } ecode1 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(0), &val1); if (!SWIG_IsOK(ecode1)) { SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "idmef_action_category_to_string" "', argument " "1"" of type '" "idmef_action_category_t""'"); } arg1 = (idmef_action_category_t)(val1); result = (char *)idmef_action_category_to_string(arg1); ST(argvi) = SWIG_FromCharPtr((const char *)result); argvi++ ; XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_action_new) { { idmef_action_t **arg1 = (idmef_action_t **) 0 ; idmef_action_t *tmp1 ; int argvi = 0; SV * _saved[1] ; int result; dXSARGS; if ((items < 1) || (items > 1)) { SWIG_croak("Usage: idmef_action_new(ret);"); } { arg1 = (idmef_action_t **) &tmp1; } _saved[0] = ST(0); result = (int)idmef_action_new(arg1); { ST(argvi) = newSViv(result); argvi++; } { SV *sv; if ( result >= 0 ) { if ( ! SvROK(_saved[0]) ) { croak("Argument 1 is not a reference."); return; } sv = SvRV(_saved[0]); sv_setsv(sv, SWIG_NewPointerObj((void *) * arg1, SWIGTYPE_p_idmef_action, 0)); } } XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_action_copy) { { idmef_action_t *arg1 = (idmef_action_t *) 0 ; idmef_action_t *arg2 = (idmef_action_t *) 0 ; int argvi = 0; int result; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: idmef_action_copy(src,dst);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_action, 0) ) { croak("Expected type idmef_action_t const * for argument 1."); return; } } { if ( ! SvROK(ST(1)) ) { croak("Argument 2 is null."); return; } if ( SWIG_ConvertPtr(ST(1), (void **)&arg2, SWIGTYPE_p_idmef_action, 0) ) { croak("Expected type idmef_action_t * for argument 2."); return; } } result = (int)idmef_action_copy((struct idmef_action const *)arg1,arg2); { ST(argvi) = newSViv(result); argvi++; } XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_action_clone) { { idmef_action_t *arg1 = (idmef_action_t *) 0 ; idmef_action_t **arg2 = (idmef_action_t **) 0 ; idmef_action_t *tmp2 ; int argvi = 0; SV * _saved[1] ; int result; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: idmef_action_clone(src,dst);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_action, 0) ) { croak("Expected type idmef_action_t * for argument 1."); return; } } { arg2 = (idmef_action_t **) &tmp2; } _saved[0] = ST(1); result = (int)idmef_action_clone(arg1,arg2); { ST(argvi) = newSViv(result); argvi++; } { SV *sv; if ( result >= 0 ) { if ( ! SvROK(_saved[0]) ) { croak("Argument 2 is not a reference."); return; } sv = SvRV(_saved[0]); sv_setsv(sv, SWIG_NewPointerObj((void *) * arg2, SWIGTYPE_p_idmef_action, 0)); } } XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_action_compare) { { idmef_action_t *arg1 = (idmef_action_t *) 0 ; idmef_action_t *arg2 = (idmef_action_t *) 0 ; int argvi = 0; int result; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: idmef_action_compare(obj1,obj2);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_action, 0) ) { croak("Expected type idmef_action_t const * for argument 1."); return; } } { if ( ! SvROK(ST(1)) ) { croak("Argument 2 is null."); return; } if ( SWIG_ConvertPtr(ST(1), (void **)&arg2, SWIGTYPE_p_idmef_action, 0) ) { croak("Expected type idmef_action_t const * for argument 2."); return; } } result = (int)idmef_action_compare((struct idmef_action const *)arg1,(struct idmef_action const *)arg2); { ST(argvi) = newSViv(result); argvi++; } XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_action_ref) { { idmef_action_t *arg1 = (idmef_action_t *) 0 ; int argvi = 0; idmef_action_t *result = 0 ; dXSARGS; if ((items < 1) || (items > 1)) { SWIG_croak("Usage: idmef_action_ref(action);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_action, 0) ) { croak("Expected type idmef_action_t * for argument 1."); return; } } result = (idmef_action_t *)idmef_action_ref(arg1); ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_idmef_action, 0 | 0); argvi++ ; XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_action_destroy) { { idmef_action_t *arg1 = (idmef_action_t *) 0 ; int argvi = 0; dXSARGS; if ((items < 1) || (items > 1)) { SWIG_croak("Usage: idmef_action_destroy(ptr);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_action, 0) ) { croak("Expected type idmef_action_t * for argument 1."); return; } } idmef_action_destroy(arg1); ST(argvi) = sv_newmortal(); XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_action_get_category) { { idmef_action_t *arg1 = (idmef_action_t *) 0 ; int argvi = 0; idmef_action_category_t result; dXSARGS; if ((items < 1) || (items > 1)) { SWIG_croak("Usage: idmef_action_get_category(ptr);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_action, 0) ) { croak("Expected type idmef_action_t * for argument 1."); return; } } result = (idmef_action_category_t)idmef_action_get_category(arg1); ST(argvi) = SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(result)); argvi++ ; XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_action_set_category) { { idmef_action_t *arg1 = (idmef_action_t *) 0 ; idmef_action_category_t arg2 ; int val2 ; int ecode2 = 0 ; int argvi = 0; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: idmef_action_set_category(ptr,category);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_action, 0) ) { croak("Expected type idmef_action_t * for argument 1."); return; } } ecode2 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(1), &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "idmef_action_set_category" "', argument " "2"" of type '" "idmef_action_category_t""'"); } arg2 = (idmef_action_category_t)(val2); idmef_action_set_category(arg1,arg2); ST(argvi) = sv_newmortal(); XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_action_new_category) { { idmef_action_t *arg1 = (idmef_action_t *) 0 ; idmef_action_category_t **arg2 = (idmef_action_category_t **) 0 ; void *argp2 = 0 ; int res2 = 0 ; int argvi = 0; int result; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: idmef_action_new_category(ptr,ret);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_action, 0) ) { croak("Expected type idmef_action_t * for argument 1."); return; } } res2 = SWIG_ConvertPtr(ST(1), &argp2,SWIGTYPE_p_p_idmef_action_category_t, 0 | 0 ); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "idmef_action_new_category" "', argument " "2"" of type '" "idmef_action_category_t **""'"); } arg2 = (idmef_action_category_t **)(argp2); result = (int)idmef_action_new_category(arg1,arg2); { ST(argvi) = newSViv(result); argvi++; } XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_action_get_description) { { idmef_action_t *arg1 = (idmef_action_t *) 0 ; int argvi = 0; prelude_string_t *result = 0 ; dXSARGS; if ((items < 1) || (items > 1)) { SWIG_croak("Usage: idmef_action_get_description(ptr);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_action, 0) ) { croak("Expected type idmef_action_t * for argument 1."); return; } } result = (prelude_string_t *)idmef_action_get_description(arg1); { ST(argvi) = swig_perl_string(result); argvi++; } XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_action_set_description) { { idmef_action_t *arg1 = (idmef_action_t *) 0 ; prelude_string_t *arg2 = (prelude_string_t *) 0 ; int argvi = 0; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: idmef_action_set_description(ptr,description);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_action, 0) ) { croak("Expected type idmef_action_t * for argument 1."); return; } } { int ret; char *str; STRLEN len; str = SvPV(ST(1), len); ret = prelude_string_new_dup_fast(&(arg2), str, len); if ( ret < 0 ) { swig_perl_raise_error(ret); return; } } idmef_action_set_description(arg1,arg2); ST(argvi) = sv_newmortal(); XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_action_new_description) { { idmef_action_t *arg1 = (idmef_action_t *) 0 ; prelude_string_t **arg2 = (prelude_string_t **) 0 ; void *argp2 = 0 ; int res2 = 0 ; int argvi = 0; int result; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: idmef_action_new_description(ptr,ret);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_action, 0) ) { croak("Expected type idmef_action_t * for argument 1."); return; } } res2 = SWIG_ConvertPtr(ST(1), &argp2,SWIGTYPE_p_p_prelude_string_t, 0 | 0 ); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "idmef_action_new_description" "', argument " "2"" of type '" "prelude_string_t **""'"); } arg2 = (prelude_string_t **)(argp2); result = (int)idmef_action_new_description(arg1,arg2); { ST(argvi) = newSViv(result); argvi++; } XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_confidence_rating_to_numeric) { { char *arg1 = (char *) 0 ; int res1 ; char *buf1 = 0 ; int alloc1 = 0 ; int argvi = 0; idmef_confidence_rating_t result; dXSARGS; if ((items < 1) || (items > 1)) { SWIG_croak("Usage: idmef_confidence_rating_to_numeric(name);"); } res1 = SWIG_AsCharPtrAndSize(ST(0), &buf1, NULL, &alloc1); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "idmef_confidence_rating_to_numeric" "', argument " "1"" of type '" "char const *""'"); } arg1 = (char *)(buf1); result = (idmef_confidence_rating_t)idmef_confidence_rating_to_numeric((char const *)arg1); ST(argvi) = SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(result)); argvi++ ; if (alloc1 == SWIG_NEWOBJ) free((char*)buf1); XSRETURN(argvi); fail: if (alloc1 == SWIG_NEWOBJ) free((char*)buf1); SWIG_croak_null(); } } XS(_wrap_idmef_confidence_rating_to_string) { { idmef_confidence_rating_t arg1 ; int val1 ; int ecode1 = 0 ; int argvi = 0; char *result = 0 ; dXSARGS; if ((items < 1) || (items > 1)) { SWIG_croak("Usage: idmef_confidence_rating_to_string(val);"); } ecode1 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(0), &val1); if (!SWIG_IsOK(ecode1)) { SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "idmef_confidence_rating_to_string" "', argument " "1"" of type '" "idmef_confidence_rating_t""'"); } arg1 = (idmef_confidence_rating_t)(val1); result = (char *)idmef_confidence_rating_to_string(arg1); ST(argvi) = SWIG_FromCharPtr((const char *)result); argvi++ ; XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_confidence_new) { { idmef_confidence_t **arg1 = (idmef_confidence_t **) 0 ; idmef_confidence_t *tmp1 ; int argvi = 0; SV * _saved[1] ; int result; dXSARGS; if ((items < 1) || (items > 1)) { SWIG_croak("Usage: idmef_confidence_new(ret);"); } { arg1 = (idmef_confidence_t **) &tmp1; } _saved[0] = ST(0); result = (int)idmef_confidence_new(arg1); { ST(argvi) = newSViv(result); argvi++; } { SV *sv; if ( result >= 0 ) { if ( ! SvROK(_saved[0]) ) { croak("Argument 1 is not a reference."); return; } sv = SvRV(_saved[0]); sv_setsv(sv, SWIG_NewPointerObj((void *) * arg1, SWIGTYPE_p_idmef_confidence, 0)); } } XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_confidence_copy) { { idmef_confidence_t *arg1 = (idmef_confidence_t *) 0 ; idmef_confidence_t *arg2 = (idmef_confidence_t *) 0 ; int argvi = 0; int result; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: idmef_confidence_copy(src,dst);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_confidence, 0) ) { croak("Expected type idmef_confidence_t const * for argument 1."); return; } } { if ( ! SvROK(ST(1)) ) { croak("Argument 2 is null."); return; } if ( SWIG_ConvertPtr(ST(1), (void **)&arg2, SWIGTYPE_p_idmef_confidence, 0) ) { croak("Expected type idmef_confidence_t * for argument 2."); return; } } result = (int)idmef_confidence_copy((struct idmef_confidence const *)arg1,arg2); { ST(argvi) = newSViv(result); argvi++; } XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_confidence_clone) { { idmef_confidence_t *arg1 = (idmef_confidence_t *) 0 ; idmef_confidence_t **arg2 = (idmef_confidence_t **) 0 ; idmef_confidence_t *tmp2 ; int argvi = 0; SV * _saved[1] ; int result; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: idmef_confidence_clone(src,dst);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_confidence, 0) ) { croak("Expected type idmef_confidence_t * for argument 1."); return; } } { arg2 = (idmef_confidence_t **) &tmp2; } _saved[0] = ST(1); result = (int)idmef_confidence_clone(arg1,arg2); { ST(argvi) = newSViv(result); argvi++; } { SV *sv; if ( result >= 0 ) { if ( ! SvROK(_saved[0]) ) { croak("Argument 2 is not a reference."); return; } sv = SvRV(_saved[0]); sv_setsv(sv, SWIG_NewPointerObj((void *) * arg2, SWIGTYPE_p_idmef_confidence, 0)); } } XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_confidence_compare) { { idmef_confidence_t *arg1 = (idmef_confidence_t *) 0 ; idmef_confidence_t *arg2 = (idmef_confidence_t *) 0 ; int argvi = 0; int result; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: idmef_confidence_compare(obj1,obj2);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_confidence, 0) ) { croak("Expected type idmef_confidence_t const * for argument 1."); return; } } { if ( ! SvROK(ST(1)) ) { croak("Argument 2 is null."); return; } if ( SWIG_ConvertPtr(ST(1), (void **)&arg2, SWIGTYPE_p_idmef_confidence, 0) ) { croak("Expected type idmef_confidence_t const * for argument 2."); return; } } result = (int)idmef_confidence_compare((struct idmef_confidence const *)arg1,(struct idmef_confidence const *)arg2); { ST(argvi) = newSViv(result); argvi++; } XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_confidence_ref) { { idmef_confidence_t *arg1 = (idmef_confidence_t *) 0 ; int argvi = 0; idmef_confidence_t *result = 0 ; dXSARGS; if ((items < 1) || (items > 1)) { SWIG_croak("Usage: idmef_confidence_ref(confidence);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_confidence, 0) ) { croak("Expected type idmef_confidence_t * for argument 1."); return; } } result = (idmef_confidence_t *)idmef_confidence_ref(arg1); ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_idmef_confidence, 0 | 0); argvi++ ; XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_confidence_destroy) { { idmef_confidence_t *arg1 = (idmef_confidence_t *) 0 ; int argvi = 0; dXSARGS; if ((items < 1) || (items > 1)) { SWIG_croak("Usage: idmef_confidence_destroy(ptr);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_confidence, 0) ) { croak("Expected type idmef_confidence_t * for argument 1."); return; } } idmef_confidence_destroy(arg1); ST(argvi) = sv_newmortal(); XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_confidence_get_rating) { { idmef_confidence_t *arg1 = (idmef_confidence_t *) 0 ; int argvi = 0; idmef_confidence_rating_t result; dXSARGS; if ((items < 1) || (items > 1)) { SWIG_croak("Usage: idmef_confidence_get_rating(ptr);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_confidence, 0) ) { croak("Expected type idmef_confidence_t * for argument 1."); return; } } result = (idmef_confidence_rating_t)idmef_confidence_get_rating(arg1); ST(argvi) = SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(result)); argvi++ ; XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_confidence_set_rating) { { idmef_confidence_t *arg1 = (idmef_confidence_t *) 0 ; idmef_confidence_rating_t arg2 ; int val2 ; int ecode2 = 0 ; int argvi = 0; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: idmef_confidence_set_rating(ptr,rating);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_confidence, 0) ) { croak("Expected type idmef_confidence_t * for argument 1."); return; } } ecode2 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(1), &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "idmef_confidence_set_rating" "', argument " "2"" of type '" "idmef_confidence_rating_t""'"); } arg2 = (idmef_confidence_rating_t)(val2); idmef_confidence_set_rating(arg1,arg2); ST(argvi) = sv_newmortal(); XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_confidence_new_rating) { { idmef_confidence_t *arg1 = (idmef_confidence_t *) 0 ; idmef_confidence_rating_t **arg2 = (idmef_confidence_rating_t **) 0 ; void *argp2 = 0 ; int res2 = 0 ; int argvi = 0; int result; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: idmef_confidence_new_rating(ptr,ret);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_confidence, 0) ) { croak("Expected type idmef_confidence_t * for argument 1."); return; } } res2 = SWIG_ConvertPtr(ST(1), &argp2,SWIGTYPE_p_p_idmef_confidence_rating_t, 0 | 0 ); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "idmef_confidence_new_rating" "', argument " "2"" of type '" "idmef_confidence_rating_t **""'"); } arg2 = (idmef_confidence_rating_t **)(argp2); result = (int)idmef_confidence_new_rating(arg1,arg2); { ST(argvi) = newSViv(result); argvi++; } XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_confidence_get_confidence) { { idmef_confidence_t *arg1 = (idmef_confidence_t *) 0 ; int argvi = 0; float result; dXSARGS; if ((items < 1) || (items > 1)) { SWIG_croak("Usage: idmef_confidence_get_confidence(ptr);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_confidence, 0) ) { croak("Expected type idmef_confidence_t * for argument 1."); return; } } result = (float)idmef_confidence_get_confidence(arg1); ST(argvi) = SWIG_From_float SWIG_PERL_CALL_ARGS_1((float)(result)); argvi++ ; XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_confidence_set_confidence) { { idmef_confidence_t *arg1 = (idmef_confidence_t *) 0 ; float arg2 ; float val2 ; int ecode2 = 0 ; int argvi = 0; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: idmef_confidence_set_confidence(ptr,confidence);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_confidence, 0) ) { croak("Expected type idmef_confidence_t * for argument 1."); return; } } ecode2 = SWIG_AsVal_float SWIG_PERL_CALL_ARGS_2(ST(1), &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "idmef_confidence_set_confidence" "', argument " "2"" of type '" "float""'"); } arg2 = (float)(val2); idmef_confidence_set_confidence(arg1,arg2); ST(argvi) = sv_newmortal(); XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_confidence_new_confidence) { { idmef_confidence_t *arg1 = (idmef_confidence_t *) 0 ; float **arg2 = (float **) 0 ; void *argp2 = 0 ; int res2 = 0 ; int argvi = 0; int result; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: idmef_confidence_new_confidence(ptr,ret);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_confidence, 0) ) { croak("Expected type idmef_confidence_t * for argument 1."); return; } } res2 = SWIG_ConvertPtr(ST(1), &argp2,SWIGTYPE_p_p_float, 0 | 0 ); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "idmef_confidence_new_confidence" "', argument " "2"" of type '" "float **""'"); } arg2 = (float **)(argp2); result = (int)idmef_confidence_new_confidence(arg1,arg2); { ST(argvi) = newSViv(result); argvi++; } XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_assessment_new) { { idmef_assessment_t **arg1 = (idmef_assessment_t **) 0 ; idmef_assessment_t *tmp1 ; int argvi = 0; SV * _saved[1] ; int result; dXSARGS; if ((items < 1) || (items > 1)) { SWIG_croak("Usage: idmef_assessment_new(ret);"); } { arg1 = (idmef_assessment_t **) &tmp1; } _saved[0] = ST(0); result = (int)idmef_assessment_new(arg1); { ST(argvi) = newSViv(result); argvi++; } { SV *sv; if ( result >= 0 ) { if ( ! SvROK(_saved[0]) ) { croak("Argument 1 is not a reference."); return; } sv = SvRV(_saved[0]); sv_setsv(sv, SWIG_NewPointerObj((void *) * arg1, SWIGTYPE_p_idmef_assessment, 0)); } } XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_assessment_copy) { { idmef_assessment_t *arg1 = (idmef_assessment_t *) 0 ; idmef_assessment_t *arg2 = (idmef_assessment_t *) 0 ; int argvi = 0; int result; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: idmef_assessment_copy(src,dst);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_assessment, 0) ) { croak("Expected type idmef_assessment_t const * for argument 1."); return; } } { if ( ! SvROK(ST(1)) ) { croak("Argument 2 is null."); return; } if ( SWIG_ConvertPtr(ST(1), (void **)&arg2, SWIGTYPE_p_idmef_assessment, 0) ) { croak("Expected type idmef_assessment_t * for argument 2."); return; } } result = (int)idmef_assessment_copy((struct idmef_assessment const *)arg1,arg2); { ST(argvi) = newSViv(result); argvi++; } XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_assessment_clone) { { idmef_assessment_t *arg1 = (idmef_assessment_t *) 0 ; idmef_assessment_t **arg2 = (idmef_assessment_t **) 0 ; idmef_assessment_t *tmp2 ; int argvi = 0; SV * _saved[1] ; int result; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: idmef_assessment_clone(src,dst);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_assessment, 0) ) { croak("Expected type idmef_assessment_t * for argument 1."); return; } } { arg2 = (idmef_assessment_t **) &tmp2; } _saved[0] = ST(1); result = (int)idmef_assessment_clone(arg1,arg2); { ST(argvi) = newSViv(result); argvi++; } { SV *sv; if ( result >= 0 ) { if ( ! SvROK(_saved[0]) ) { croak("Argument 2 is not a reference."); return; } sv = SvRV(_saved[0]); sv_setsv(sv, SWIG_NewPointerObj((void *) * arg2, SWIGTYPE_p_idmef_assessment, 0)); } } XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_assessment_compare) { { idmef_assessment_t *arg1 = (idmef_assessment_t *) 0 ; idmef_assessment_t *arg2 = (idmef_assessment_t *) 0 ; int argvi = 0; int result; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: idmef_assessment_compare(obj1,obj2);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_assessment, 0) ) { croak("Expected type idmef_assessment_t const * for argument 1."); return; } } { if ( ! SvROK(ST(1)) ) { croak("Argument 2 is null."); return; } if ( SWIG_ConvertPtr(ST(1), (void **)&arg2, SWIGTYPE_p_idmef_assessment, 0) ) { croak("Expected type idmef_assessment_t const * for argument 2."); return; } } result = (int)idmef_assessment_compare((struct idmef_assessment const *)arg1,(struct idmef_assessment const *)arg2); { ST(argvi) = newSViv(result); argvi++; } XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_assessment_ref) { { idmef_assessment_t *arg1 = (idmef_assessment_t *) 0 ; int argvi = 0; idmef_assessment_t *result = 0 ; dXSARGS; if ((items < 1) || (items > 1)) { SWIG_croak("Usage: idmef_assessment_ref(assessment);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_assessment, 0) ) { croak("Expected type idmef_assessment_t * for argument 1."); return; } } result = (idmef_assessment_t *)idmef_assessment_ref(arg1); ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_idmef_assessment, 0 | 0); argvi++ ; XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_assessment_destroy) { { idmef_assessment_t *arg1 = (idmef_assessment_t *) 0 ; int argvi = 0; dXSARGS; if ((items < 1) || (items > 1)) { SWIG_croak("Usage: idmef_assessment_destroy(ptr);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_assessment, 0) ) { croak("Expected type idmef_assessment_t * for argument 1."); return; } } idmef_assessment_destroy(arg1); ST(argvi) = sv_newmortal(); XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_assessment_get_impact) { { idmef_assessment_t *arg1 = (idmef_assessment_t *) 0 ; int argvi = 0; idmef_impact_t *result = 0 ; dXSARGS; if ((items < 1) || (items > 1)) { SWIG_croak("Usage: idmef_assessment_get_impact(ptr);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_assessment, 0) ) { croak("Expected type idmef_assessment_t * for argument 1."); return; } } result = (idmef_impact_t *)idmef_assessment_get_impact(arg1); ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_idmef_impact, 0 | 0); argvi++ ; XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_assessment_set_impact) { { idmef_assessment_t *arg1 = (idmef_assessment_t *) 0 ; idmef_impact_t *arg2 = (idmef_impact_t *) 0 ; int argvi = 0; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: idmef_assessment_set_impact(ptr,impact);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_assessment, 0) ) { croak("Expected type idmef_assessment_t * for argument 1."); return; } } { if ( ! SvROK(ST(1)) ) { croak("Argument 2 is null."); return; } if ( SWIG_ConvertPtr(ST(1), (void **)&arg2, SWIGTYPE_p_idmef_impact, 0) ) { croak("Expected type idmef_impact_t * for argument 2."); return; } } idmef_assessment_set_impact(arg1,arg2); ST(argvi) = sv_newmortal(); XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_assessment_new_impact) { { idmef_assessment_t *arg1 = (idmef_assessment_t *) 0 ; idmef_impact_t **arg2 = (idmef_impact_t **) 0 ; idmef_impact_t *tmp2 ; int argvi = 0; SV * _saved[1] ; int result; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: idmef_assessment_new_impact(ptr,ret);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_assessment, 0) ) { croak("Expected type idmef_assessment_t * for argument 1."); return; } } { arg2 = (idmef_impact_t **) &tmp2; } _saved[0] = ST(1); result = (int)idmef_assessment_new_impact(arg1,arg2); { ST(argvi) = newSViv(result); argvi++; } { SV *sv; if ( result >= 0 ) { if ( ! SvROK(_saved[0]) ) { croak("Argument 2 is not a reference."); return; } sv = SvRV(_saved[0]); sv_setsv(sv, SWIG_NewPointerObj((void *) * arg2, SWIGTYPE_p_idmef_impact, 0)); } } XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_assessment_get_next_action) { { idmef_assessment_t *arg1 = (idmef_assessment_t *) 0 ; idmef_action_t *arg2 = (idmef_action_t *) 0 ; int argvi = 0; idmef_action_t *result = 0 ; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: idmef_assessment_get_next_action(assessment,action_cur);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_assessment, 0) ) { croak("Expected type idmef_assessment_t * for argument 1."); return; } } { if ( ! SvOK(ST(1)) ) { arg2 = NULL; } else { if ( SWIG_ConvertPtr(ST(1), (void **)&arg2, SWIGTYPE_p_idmef_action, 0) ) { croak("Expected type idmef_action_t * for argument 2."); return; } } } result = (idmef_action_t *)idmef_assessment_get_next_action(arg1,arg2); ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_idmef_action, 0 | 0); argvi++ ; XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_assessment_set_action) { { idmef_assessment_t *arg1 = (idmef_assessment_t *) 0 ; idmef_action_t *arg2 = (idmef_action_t *) 0 ; int arg3 ; int val3 ; int ecode3 = 0 ; int argvi = 0; dXSARGS; if ((items < 3) || (items > 3)) { SWIG_croak("Usage: idmef_assessment_set_action(ptr,object,pos);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_assessment, 0) ) { croak("Expected type idmef_assessment_t * for argument 1."); return; } } { if ( ! SvROK(ST(1)) ) { croak("Argument 2 is null."); return; } if ( SWIG_ConvertPtr(ST(1), (void **)&arg2, SWIGTYPE_p_idmef_action, 0) ) { croak("Expected type idmef_action_t * for argument 2."); return; } } ecode3 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(2), &val3); if (!SWIG_IsOK(ecode3)) { SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "idmef_assessment_set_action" "', argument " "3"" of type '" "int""'"); } arg3 = (int)(val3); idmef_assessment_set_action(arg1,arg2,arg3); ST(argvi) = sv_newmortal(); XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_assessment_new_action) { { idmef_assessment_t *arg1 = (idmef_assessment_t *) 0 ; idmef_action_t **arg2 = (idmef_action_t **) 0 ; int arg3 ; idmef_action_t *tmp2 ; int val3 ; int ecode3 = 0 ; int argvi = 0; SV * _saved[1] ; int result; dXSARGS; if ((items < 3) || (items > 3)) { SWIG_croak("Usage: idmef_assessment_new_action(ptr,ret,pos);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_assessment, 0) ) { croak("Expected type idmef_assessment_t * for argument 1."); return; } } { arg2 = (idmef_action_t **) &tmp2; } ecode3 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(2), &val3); if (!SWIG_IsOK(ecode3)) { SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "idmef_assessment_new_action" "', argument " "3"" of type '" "int""'"); } arg3 = (int)(val3); _saved[0] = ST(1); result = (int)idmef_assessment_new_action(arg1,arg2,arg3); { ST(argvi) = newSViv(result); argvi++; } { SV *sv; if ( result >= 0 ) { if ( ! SvROK(_saved[0]) ) { croak("Argument 2 is not a reference."); return; } sv = SvRV(_saved[0]); sv_setsv(sv, SWIG_NewPointerObj((void *) * arg2, SWIGTYPE_p_idmef_action, 0)); } } XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_assessment_get_confidence) { { idmef_assessment_t *arg1 = (idmef_assessment_t *) 0 ; int argvi = 0; idmef_confidence_t *result = 0 ; dXSARGS; if ((items < 1) || (items > 1)) { SWIG_croak("Usage: idmef_assessment_get_confidence(ptr);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_assessment, 0) ) { croak("Expected type idmef_assessment_t * for argument 1."); return; } } result = (idmef_confidence_t *)idmef_assessment_get_confidence(arg1); ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_idmef_confidence, 0 | 0); argvi++ ; XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_assessment_set_confidence) { { idmef_assessment_t *arg1 = (idmef_assessment_t *) 0 ; idmef_confidence_t *arg2 = (idmef_confidence_t *) 0 ; int argvi = 0; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: idmef_assessment_set_confidence(ptr,confidence);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_assessment, 0) ) { croak("Expected type idmef_assessment_t * for argument 1."); return; } } { if ( ! SvROK(ST(1)) ) { croak("Argument 2 is null."); return; } if ( SWIG_ConvertPtr(ST(1), (void **)&arg2, SWIGTYPE_p_idmef_confidence, 0) ) { croak("Expected type idmef_confidence_t * for argument 2."); return; } } idmef_assessment_set_confidence(arg1,arg2); ST(argvi) = sv_newmortal(); XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_assessment_new_confidence) { { idmef_assessment_t *arg1 = (idmef_assessment_t *) 0 ; idmef_confidence_t **arg2 = (idmef_confidence_t **) 0 ; idmef_confidence_t *tmp2 ; int argvi = 0; SV * _saved[1] ; int result; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: idmef_assessment_new_confidence(ptr,ret);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_assessment, 0) ) { croak("Expected type idmef_assessment_t * for argument 1."); return; } } { arg2 = (idmef_confidence_t **) &tmp2; } _saved[0] = ST(1); result = (int)idmef_assessment_new_confidence(arg1,arg2); { ST(argvi) = newSViv(result); argvi++; } { SV *sv; if ( result >= 0 ) { if ( ! SvROK(_saved[0]) ) { croak("Argument 2 is not a reference."); return; } sv = SvRV(_saved[0]); sv_setsv(sv, SWIG_NewPointerObj((void *) * arg2, SWIGTYPE_p_idmef_confidence, 0)); } } XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_tool_alert_new) { { idmef_tool_alert_t **arg1 = (idmef_tool_alert_t **) 0 ; idmef_tool_alert_t *tmp1 ; int argvi = 0; SV * _saved[1] ; int result; dXSARGS; if ((items < 1) || (items > 1)) { SWIG_croak("Usage: idmef_tool_alert_new(ret);"); } { arg1 = (idmef_tool_alert_t **) &tmp1; } _saved[0] = ST(0); result = (int)idmef_tool_alert_new(arg1); { ST(argvi) = newSViv(result); argvi++; } { SV *sv; if ( result >= 0 ) { if ( ! SvROK(_saved[0]) ) { croak("Argument 1 is not a reference."); return; } sv = SvRV(_saved[0]); sv_setsv(sv, SWIG_NewPointerObj((void *) * arg1, SWIGTYPE_p_idmef_tool_alert, 0)); } } XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_tool_alert_copy) { { idmef_tool_alert_t *arg1 = (idmef_tool_alert_t *) 0 ; idmef_tool_alert_t *arg2 = (idmef_tool_alert_t *) 0 ; int argvi = 0; int result; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: idmef_tool_alert_copy(src,dst);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_tool_alert, 0) ) { croak("Expected type idmef_tool_alert_t const * for argument 1."); return; } } { if ( ! SvROK(ST(1)) ) { croak("Argument 2 is null."); return; } if ( SWIG_ConvertPtr(ST(1), (void **)&arg2, SWIGTYPE_p_idmef_tool_alert, 0) ) { croak("Expected type idmef_tool_alert_t * for argument 2."); return; } } result = (int)idmef_tool_alert_copy((struct idmef_tool_alert const *)arg1,arg2); { ST(argvi) = newSViv(result); argvi++; } XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_tool_alert_clone) { { idmef_tool_alert_t *arg1 = (idmef_tool_alert_t *) 0 ; idmef_tool_alert_t **arg2 = (idmef_tool_alert_t **) 0 ; idmef_tool_alert_t *tmp2 ; int argvi = 0; SV * _saved[1] ; int result; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: idmef_tool_alert_clone(src,dst);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_tool_alert, 0) ) { croak("Expected type idmef_tool_alert_t * for argument 1."); return; } } { arg2 = (idmef_tool_alert_t **) &tmp2; } _saved[0] = ST(1); result = (int)idmef_tool_alert_clone(arg1,arg2); { ST(argvi) = newSViv(result); argvi++; } { SV *sv; if ( result >= 0 ) { if ( ! SvROK(_saved[0]) ) { croak("Argument 2 is not a reference."); return; } sv = SvRV(_saved[0]); sv_setsv(sv, SWIG_NewPointerObj((void *) * arg2, SWIGTYPE_p_idmef_tool_alert, 0)); } } XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_tool_alert_compare) { { idmef_tool_alert_t *arg1 = (idmef_tool_alert_t *) 0 ; idmef_tool_alert_t *arg2 = (idmef_tool_alert_t *) 0 ; int argvi = 0; int result; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: idmef_tool_alert_compare(obj1,obj2);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_tool_alert, 0) ) { croak("Expected type idmef_tool_alert_t const * for argument 1."); return; } } { if ( ! SvROK(ST(1)) ) { croak("Argument 2 is null."); return; } if ( SWIG_ConvertPtr(ST(1), (void **)&arg2, SWIGTYPE_p_idmef_tool_alert, 0) ) { croak("Expected type idmef_tool_alert_t const * for argument 2."); return; } } result = (int)idmef_tool_alert_compare((struct idmef_tool_alert const *)arg1,(struct idmef_tool_alert const *)arg2); { ST(argvi) = newSViv(result); argvi++; } XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_tool_alert_ref) { { idmef_tool_alert_t *arg1 = (idmef_tool_alert_t *) 0 ; int argvi = 0; idmef_tool_alert_t *result = 0 ; dXSARGS; if ((items < 1) || (items > 1)) { SWIG_croak("Usage: idmef_tool_alert_ref(tool_alert);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_tool_alert, 0) ) { croak("Expected type idmef_tool_alert_t * for argument 1."); return; } } result = (idmef_tool_alert_t *)idmef_tool_alert_ref(arg1); ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_idmef_tool_alert, 0 | 0); argvi++ ; XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_tool_alert_destroy) { { idmef_tool_alert_t *arg1 = (idmef_tool_alert_t *) 0 ; int argvi = 0; dXSARGS; if ((items < 1) || (items > 1)) { SWIG_croak("Usage: idmef_tool_alert_destroy(ptr);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_tool_alert, 0) ) { croak("Expected type idmef_tool_alert_t * for argument 1."); return; } } idmef_tool_alert_destroy(arg1); ST(argvi) = sv_newmortal(); XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_tool_alert_get_name) { { idmef_tool_alert_t *arg1 = (idmef_tool_alert_t *) 0 ; int argvi = 0; prelude_string_t *result = 0 ; dXSARGS; if ((items < 1) || (items > 1)) { SWIG_croak("Usage: idmef_tool_alert_get_name(ptr);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_tool_alert, 0) ) { croak("Expected type idmef_tool_alert_t * for argument 1."); return; } } result = (prelude_string_t *)idmef_tool_alert_get_name(arg1); { ST(argvi) = swig_perl_string(result); argvi++; } XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_tool_alert_set_name) { { idmef_tool_alert_t *arg1 = (idmef_tool_alert_t *) 0 ; prelude_string_t *arg2 = (prelude_string_t *) 0 ; int argvi = 0; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: idmef_tool_alert_set_name(ptr,name);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_tool_alert, 0) ) { croak("Expected type idmef_tool_alert_t * for argument 1."); return; } } { int ret; char *str; STRLEN len; str = SvPV(ST(1), len); ret = prelude_string_new_dup_fast(&(arg2), str, len); if ( ret < 0 ) { swig_perl_raise_error(ret); return; } } idmef_tool_alert_set_name(arg1,arg2); ST(argvi) = sv_newmortal(); XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_tool_alert_new_name) { { idmef_tool_alert_t *arg1 = (idmef_tool_alert_t *) 0 ; prelude_string_t **arg2 = (prelude_string_t **) 0 ; void *argp2 = 0 ; int res2 = 0 ; int argvi = 0; int result; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: idmef_tool_alert_new_name(ptr,ret);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_tool_alert, 0) ) { croak("Expected type idmef_tool_alert_t * for argument 1."); return; } } res2 = SWIG_ConvertPtr(ST(1), &argp2,SWIGTYPE_p_p_prelude_string_t, 0 | 0 ); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "idmef_tool_alert_new_name" "', argument " "2"" of type '" "prelude_string_t **""'"); } arg2 = (prelude_string_t **)(argp2); result = (int)idmef_tool_alert_new_name(arg1,arg2); { ST(argvi) = newSViv(result); argvi++; } XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_tool_alert_get_command) { { idmef_tool_alert_t *arg1 = (idmef_tool_alert_t *) 0 ; int argvi = 0; prelude_string_t *result = 0 ; dXSARGS; if ((items < 1) || (items > 1)) { SWIG_croak("Usage: idmef_tool_alert_get_command(ptr);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_tool_alert, 0) ) { croak("Expected type idmef_tool_alert_t * for argument 1."); return; } } result = (prelude_string_t *)idmef_tool_alert_get_command(arg1); { ST(argvi) = swig_perl_string(result); argvi++; } XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_tool_alert_set_command) { { idmef_tool_alert_t *arg1 = (idmef_tool_alert_t *) 0 ; prelude_string_t *arg2 = (prelude_string_t *) 0 ; int argvi = 0; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: idmef_tool_alert_set_command(ptr,command);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_tool_alert, 0) ) { croak("Expected type idmef_tool_alert_t * for argument 1."); return; } } { int ret; char *str; STRLEN len; str = SvPV(ST(1), len); ret = prelude_string_new_dup_fast(&(arg2), str, len); if ( ret < 0 ) { swig_perl_raise_error(ret); return; } } idmef_tool_alert_set_command(arg1,arg2); ST(argvi) = sv_newmortal(); XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_tool_alert_new_command) { { idmef_tool_alert_t *arg1 = (idmef_tool_alert_t *) 0 ; prelude_string_t **arg2 = (prelude_string_t **) 0 ; void *argp2 = 0 ; int res2 = 0 ; int argvi = 0; int result; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: idmef_tool_alert_new_command(ptr,ret);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_tool_alert, 0) ) { croak("Expected type idmef_tool_alert_t * for argument 1."); return; } } res2 = SWIG_ConvertPtr(ST(1), &argp2,SWIGTYPE_p_p_prelude_string_t, 0 | 0 ); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "idmef_tool_alert_new_command" "', argument " "2"" of type '" "prelude_string_t **""'"); } arg2 = (prelude_string_t **)(argp2); result = (int)idmef_tool_alert_new_command(arg1,arg2); { ST(argvi) = newSViv(result); argvi++; } XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_tool_alert_get_next_alertident) { { idmef_tool_alert_t *arg1 = (idmef_tool_alert_t *) 0 ; idmef_alertident_t *arg2 = (idmef_alertident_t *) 0 ; int argvi = 0; idmef_alertident_t *result = 0 ; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: idmef_tool_alert_get_next_alertident(tool_alert,alertident_cur);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_tool_alert, 0) ) { croak("Expected type idmef_tool_alert_t * for argument 1."); return; } } { if ( ! SvOK(ST(1)) ) { arg2 = NULL; } else { if ( SWIG_ConvertPtr(ST(1), (void **)&arg2, SWIGTYPE_p_idmef_alertident, 0) ) { croak("Expected type idmef_alertident_t * for argument 2."); return; } } } result = (idmef_alertident_t *)idmef_tool_alert_get_next_alertident(arg1,arg2); ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_idmef_alertident, 0 | 0); argvi++ ; XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_tool_alert_set_alertident) { { idmef_tool_alert_t *arg1 = (idmef_tool_alert_t *) 0 ; idmef_alertident_t *arg2 = (idmef_alertident_t *) 0 ; int arg3 ; void *argp2 = 0 ; int res2 = 0 ; int val3 ; int ecode3 = 0 ; int argvi = 0; dXSARGS; if ((items < 3) || (items > 3)) { SWIG_croak("Usage: idmef_tool_alert_set_alertident(ptr,object,pos);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_tool_alert, 0) ) { croak("Expected type idmef_tool_alert_t * for argument 1."); return; } } res2 = SWIG_ConvertPtr(ST(1), &argp2,SWIGTYPE_p_idmef_alertident, 0 | 0 ); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "idmef_tool_alert_set_alertident" "', argument " "2"" of type '" "idmef_alertident_t *""'"); } arg2 = (idmef_alertident_t *)(argp2); ecode3 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(2), &val3); if (!SWIG_IsOK(ecode3)) { SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "idmef_tool_alert_set_alertident" "', argument " "3"" of type '" "int""'"); } arg3 = (int)(val3); idmef_tool_alert_set_alertident(arg1,arg2,arg3); ST(argvi) = sv_newmortal(); XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_tool_alert_new_alertident) { { idmef_tool_alert_t *arg1 = (idmef_tool_alert_t *) 0 ; idmef_alertident_t **arg2 = (idmef_alertident_t **) 0 ; int arg3 ; int val3 ; int ecode3 = 0 ; int argvi = 0; SV * _saved[1] ; int result; dXSARGS; if ((items < 3) || (items > 3)) { SWIG_croak("Usage: idmef_tool_alert_new_alertident(ptr,ret,pos);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_tool_alert, 0) ) { croak("Expected type idmef_tool_alert_t * for argument 1."); return; } } { if ( ! SvROK(ST(1)) ) { croak("Argument 2 is null."); return; } if ( SWIG_ConvertPtr(ST(1), (void **)&arg2, SWIGTYPE_p_p_idmef_alertident, 0) ) { croak("Expected type idmef_alertident_t ** for argument 2."); return; } } ecode3 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(2), &val3); if (!SWIG_IsOK(ecode3)) { SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "idmef_tool_alert_new_alertident" "', argument " "3"" of type '" "int""'"); } arg3 = (int)(val3); _saved[0] = ST(1); result = (int)idmef_tool_alert_new_alertident(arg1,arg2,arg3); { ST(argvi) = newSViv(result); argvi++; } { SV *sv; if ( result >= 0 ) { if ( ! SvROK(_saved[0]) ) { croak("Argument 2 is not a reference."); return; } sv = SvRV(_saved[0]); sv_setsv(sv, SWIG_NewPointerObj((void *) * arg2, SWIGTYPE_p_idmef_alertident, 0)); } } XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_correlation_alert_new) { { idmef_correlation_alert_t **arg1 = (idmef_correlation_alert_t **) 0 ; idmef_correlation_alert_t *tmp1 ; int argvi = 0; SV * _saved[1] ; int result; dXSARGS; if ((items < 1) || (items > 1)) { SWIG_croak("Usage: idmef_correlation_alert_new(ret);"); } { arg1 = (idmef_correlation_alert_t **) &tmp1; } _saved[0] = ST(0); result = (int)idmef_correlation_alert_new(arg1); { ST(argvi) = newSViv(result); argvi++; } { SV *sv; if ( result >= 0 ) { if ( ! SvROK(_saved[0]) ) { croak("Argument 1 is not a reference."); return; } sv = SvRV(_saved[0]); sv_setsv(sv, SWIG_NewPointerObj((void *) * arg1, SWIGTYPE_p_idmef_correlation_alert, 0)); } } XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_correlation_alert_copy) { { idmef_correlation_alert_t *arg1 = (idmef_correlation_alert_t *) 0 ; idmef_correlation_alert_t *arg2 = (idmef_correlation_alert_t *) 0 ; int argvi = 0; int result; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: idmef_correlation_alert_copy(src,dst);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_correlation_alert, 0) ) { croak("Expected type idmef_correlation_alert_t const * for argument 1."); return; } } { if ( ! SvROK(ST(1)) ) { croak("Argument 2 is null."); return; } if ( SWIG_ConvertPtr(ST(1), (void **)&arg2, SWIGTYPE_p_idmef_correlation_alert, 0) ) { croak("Expected type idmef_correlation_alert_t * for argument 2."); return; } } result = (int)idmef_correlation_alert_copy((struct idmef_correlation_alert const *)arg1,arg2); { ST(argvi) = newSViv(result); argvi++; } XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_correlation_alert_clone) { { idmef_correlation_alert_t *arg1 = (idmef_correlation_alert_t *) 0 ; idmef_correlation_alert_t **arg2 = (idmef_correlation_alert_t **) 0 ; idmef_correlation_alert_t *tmp2 ; int argvi = 0; SV * _saved[1] ; int result; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: idmef_correlation_alert_clone(src,dst);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_correlation_alert, 0) ) { croak("Expected type idmef_correlation_alert_t * for argument 1."); return; } } { arg2 = (idmef_correlation_alert_t **) &tmp2; } _saved[0] = ST(1); result = (int)idmef_correlation_alert_clone(arg1,arg2); { ST(argvi) = newSViv(result); argvi++; } { SV *sv; if ( result >= 0 ) { if ( ! SvROK(_saved[0]) ) { croak("Argument 2 is not a reference."); return; } sv = SvRV(_saved[0]); sv_setsv(sv, SWIG_NewPointerObj((void *) * arg2, SWIGTYPE_p_idmef_correlation_alert, 0)); } } XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_correlation_alert_compare) { { idmef_correlation_alert_t *arg1 = (idmef_correlation_alert_t *) 0 ; idmef_correlation_alert_t *arg2 = (idmef_correlation_alert_t *) 0 ; int argvi = 0; int result; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: idmef_correlation_alert_compare(obj1,obj2);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_correlation_alert, 0) ) { croak("Expected type idmef_correlation_alert_t const * for argument 1."); return; } } { if ( ! SvROK(ST(1)) ) { croak("Argument 2 is null."); return; } if ( SWIG_ConvertPtr(ST(1), (void **)&arg2, SWIGTYPE_p_idmef_correlation_alert, 0) ) { croak("Expected type idmef_correlation_alert_t const * for argument 2."); return; } } result = (int)idmef_correlation_alert_compare((struct idmef_correlation_alert const *)arg1,(struct idmef_correlation_alert const *)arg2); { ST(argvi) = newSViv(result); argvi++; } XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_correlation_alert_ref) { { idmef_correlation_alert_t *arg1 = (idmef_correlation_alert_t *) 0 ; int argvi = 0; idmef_correlation_alert_t *result = 0 ; dXSARGS; if ((items < 1) || (items > 1)) { SWIG_croak("Usage: idmef_correlation_alert_ref(correlation_alert);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_correlation_alert, 0) ) { croak("Expected type idmef_correlation_alert_t * for argument 1."); return; } } result = (idmef_correlation_alert_t *)idmef_correlation_alert_ref(arg1); ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_idmef_correlation_alert, 0 | 0); argvi++ ; XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_correlation_alert_destroy) { { idmef_correlation_alert_t *arg1 = (idmef_correlation_alert_t *) 0 ; int argvi = 0; dXSARGS; if ((items < 1) || (items > 1)) { SWIG_croak("Usage: idmef_correlation_alert_destroy(ptr);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_correlation_alert, 0) ) { croak("Expected type idmef_correlation_alert_t * for argument 1."); return; } } idmef_correlation_alert_destroy(arg1); ST(argvi) = sv_newmortal(); XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_correlation_alert_get_name) { { idmef_correlation_alert_t *arg1 = (idmef_correlation_alert_t *) 0 ; int argvi = 0; prelude_string_t *result = 0 ; dXSARGS; if ((items < 1) || (items > 1)) { SWIG_croak("Usage: idmef_correlation_alert_get_name(ptr);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_correlation_alert, 0) ) { croak("Expected type idmef_correlation_alert_t * for argument 1."); return; } } result = (prelude_string_t *)idmef_correlation_alert_get_name(arg1); { ST(argvi) = swig_perl_string(result); argvi++; } XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_correlation_alert_set_name) { { idmef_correlation_alert_t *arg1 = (idmef_correlation_alert_t *) 0 ; prelude_string_t *arg2 = (prelude_string_t *) 0 ; int argvi = 0; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: idmef_correlation_alert_set_name(ptr,name);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_correlation_alert, 0) ) { croak("Expected type idmef_correlation_alert_t * for argument 1."); return; } } { int ret; char *str; STRLEN len; str = SvPV(ST(1), len); ret = prelude_string_new_dup_fast(&(arg2), str, len); if ( ret < 0 ) { swig_perl_raise_error(ret); return; } } idmef_correlation_alert_set_name(arg1,arg2); ST(argvi) = sv_newmortal(); XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_correlation_alert_new_name) { { idmef_correlation_alert_t *arg1 = (idmef_correlation_alert_t *) 0 ; prelude_string_t **arg2 = (prelude_string_t **) 0 ; void *argp2 = 0 ; int res2 = 0 ; int argvi = 0; int result; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: idmef_correlation_alert_new_name(ptr,ret);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_correlation_alert, 0) ) { croak("Expected type idmef_correlation_alert_t * for argument 1."); return; } } res2 = SWIG_ConvertPtr(ST(1), &argp2,SWIGTYPE_p_p_prelude_string_t, 0 | 0 ); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "idmef_correlation_alert_new_name" "', argument " "2"" of type '" "prelude_string_t **""'"); } arg2 = (prelude_string_t **)(argp2); result = (int)idmef_correlation_alert_new_name(arg1,arg2); { ST(argvi) = newSViv(result); argvi++; } XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_correlation_alert_get_next_alertident) { { idmef_correlation_alert_t *arg1 = (idmef_correlation_alert_t *) 0 ; idmef_alertident_t *arg2 = (idmef_alertident_t *) 0 ; int argvi = 0; idmef_alertident_t *result = 0 ; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: idmef_correlation_alert_get_next_alertident(correlation_alert,alertident_cur);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_correlation_alert, 0) ) { croak("Expected type idmef_correlation_alert_t * for argument 1."); return; } } { if ( ! SvOK(ST(1)) ) { arg2 = NULL; } else { if ( SWIG_ConvertPtr(ST(1), (void **)&arg2, SWIGTYPE_p_idmef_alertident, 0) ) { croak("Expected type idmef_alertident_t * for argument 2."); return; } } } result = (idmef_alertident_t *)idmef_correlation_alert_get_next_alertident(arg1,arg2); ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_idmef_alertident, 0 | 0); argvi++ ; XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_correlation_alert_set_alertident) { { idmef_correlation_alert_t *arg1 = (idmef_correlation_alert_t *) 0 ; idmef_alertident_t *arg2 = (idmef_alertident_t *) 0 ; int arg3 ; void *argp2 = 0 ; int res2 = 0 ; int val3 ; int ecode3 = 0 ; int argvi = 0; dXSARGS; if ((items < 3) || (items > 3)) { SWIG_croak("Usage: idmef_correlation_alert_set_alertident(ptr,object,pos);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_correlation_alert, 0) ) { croak("Expected type idmef_correlation_alert_t * for argument 1."); return; } } res2 = SWIG_ConvertPtr(ST(1), &argp2,SWIGTYPE_p_idmef_alertident, 0 | 0 ); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "idmef_correlation_alert_set_alertident" "', argument " "2"" of type '" "idmef_alertident_t *""'"); } arg2 = (idmef_alertident_t *)(argp2); ecode3 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(2), &val3); if (!SWIG_IsOK(ecode3)) { SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "idmef_correlation_alert_set_alertident" "', argument " "3"" of type '" "int""'"); } arg3 = (int)(val3); idmef_correlation_alert_set_alertident(arg1,arg2,arg3); ST(argvi) = sv_newmortal(); XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_correlation_alert_new_alertident) { { idmef_correlation_alert_t *arg1 = (idmef_correlation_alert_t *) 0 ; idmef_alertident_t **arg2 = (idmef_alertident_t **) 0 ; int arg3 ; int val3 ; int ecode3 = 0 ; int argvi = 0; SV * _saved[1] ; int result; dXSARGS; if ((items < 3) || (items > 3)) { SWIG_croak("Usage: idmef_correlation_alert_new_alertident(ptr,ret,pos);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_correlation_alert, 0) ) { croak("Expected type idmef_correlation_alert_t * for argument 1."); return; } } { if ( ! SvROK(ST(1)) ) { croak("Argument 2 is null."); return; } if ( SWIG_ConvertPtr(ST(1), (void **)&arg2, SWIGTYPE_p_p_idmef_alertident, 0) ) { croak("Expected type idmef_alertident_t ** for argument 2."); return; } } ecode3 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(2), &val3); if (!SWIG_IsOK(ecode3)) { SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "idmef_correlation_alert_new_alertident" "', argument " "3"" of type '" "int""'"); } arg3 = (int)(val3); _saved[0] = ST(1); result = (int)idmef_correlation_alert_new_alertident(arg1,arg2,arg3); { ST(argvi) = newSViv(result); argvi++; } { SV *sv; if ( result >= 0 ) { if ( ! SvROK(_saved[0]) ) { croak("Argument 2 is not a reference."); return; } sv = SvRV(_saved[0]); sv_setsv(sv, SWIG_NewPointerObj((void *) * arg2, SWIGTYPE_p_idmef_alertident, 0)); } } XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_overflow_alert_new) { { idmef_overflow_alert_t **arg1 = (idmef_overflow_alert_t **) 0 ; idmef_overflow_alert_t *tmp1 ; int argvi = 0; SV * _saved[1] ; int result; dXSARGS; if ((items < 1) || (items > 1)) { SWIG_croak("Usage: idmef_overflow_alert_new(ret);"); } { arg1 = (idmef_overflow_alert_t **) &tmp1; } _saved[0] = ST(0); result = (int)idmef_overflow_alert_new(arg1); { ST(argvi) = newSViv(result); argvi++; } { SV *sv; if ( result >= 0 ) { if ( ! SvROK(_saved[0]) ) { croak("Argument 1 is not a reference."); return; } sv = SvRV(_saved[0]); sv_setsv(sv, SWIG_NewPointerObj((void *) * arg1, SWIGTYPE_p_idmef_overflow_alert, 0)); } } XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_overflow_alert_copy) { { idmef_overflow_alert_t *arg1 = (idmef_overflow_alert_t *) 0 ; idmef_overflow_alert_t *arg2 = (idmef_overflow_alert_t *) 0 ; int argvi = 0; int result; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: idmef_overflow_alert_copy(src,dst);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_overflow_alert, 0) ) { croak("Expected type idmef_overflow_alert_t const * for argument 1."); return; } } { if ( ! SvROK(ST(1)) ) { croak("Argument 2 is null."); return; } if ( SWIG_ConvertPtr(ST(1), (void **)&arg2, SWIGTYPE_p_idmef_overflow_alert, 0) ) { croak("Expected type idmef_overflow_alert_t * for argument 2."); return; } } result = (int)idmef_overflow_alert_copy((struct idmef_overflow_alert const *)arg1,arg2); { ST(argvi) = newSViv(result); argvi++; } XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_overflow_alert_clone) { { idmef_overflow_alert_t *arg1 = (idmef_overflow_alert_t *) 0 ; idmef_overflow_alert_t **arg2 = (idmef_overflow_alert_t **) 0 ; idmef_overflow_alert_t *tmp2 ; int argvi = 0; SV * _saved[1] ; int result; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: idmef_overflow_alert_clone(src,dst);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_overflow_alert, 0) ) { croak("Expected type idmef_overflow_alert_t * for argument 1."); return; } } { arg2 = (idmef_overflow_alert_t **) &tmp2; } _saved[0] = ST(1); result = (int)idmef_overflow_alert_clone(arg1,arg2); { ST(argvi) = newSViv(result); argvi++; } { SV *sv; if ( result >= 0 ) { if ( ! SvROK(_saved[0]) ) { croak("Argument 2 is not a reference."); return; } sv = SvRV(_saved[0]); sv_setsv(sv, SWIG_NewPointerObj((void *) * arg2, SWIGTYPE_p_idmef_overflow_alert, 0)); } } XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_overflow_alert_compare) { { idmef_overflow_alert_t *arg1 = (idmef_overflow_alert_t *) 0 ; idmef_overflow_alert_t *arg2 = (idmef_overflow_alert_t *) 0 ; int argvi = 0; int result; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: idmef_overflow_alert_compare(obj1,obj2);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_overflow_alert, 0) ) { croak("Expected type idmef_overflow_alert_t const * for argument 1."); return; } } { if ( ! SvROK(ST(1)) ) { croak("Argument 2 is null."); return; } if ( SWIG_ConvertPtr(ST(1), (void **)&arg2, SWIGTYPE_p_idmef_overflow_alert, 0) ) { croak("Expected type idmef_overflow_alert_t const * for argument 2."); return; } } result = (int)idmef_overflow_alert_compare((struct idmef_overflow_alert const *)arg1,(struct idmef_overflow_alert const *)arg2); { ST(argvi) = newSViv(result); argvi++; } XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_overflow_alert_ref) { { idmef_overflow_alert_t *arg1 = (idmef_overflow_alert_t *) 0 ; int argvi = 0; idmef_overflow_alert_t *result = 0 ; dXSARGS; if ((items < 1) || (items > 1)) { SWIG_croak("Usage: idmef_overflow_alert_ref(overflow_alert);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_overflow_alert, 0) ) { croak("Expected type idmef_overflow_alert_t * for argument 1."); return; } } result = (idmef_overflow_alert_t *)idmef_overflow_alert_ref(arg1); ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_idmef_overflow_alert, 0 | 0); argvi++ ; XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_overflow_alert_destroy) { { idmef_overflow_alert_t *arg1 = (idmef_overflow_alert_t *) 0 ; int argvi = 0; dXSARGS; if ((items < 1) || (items > 1)) { SWIG_croak("Usage: idmef_overflow_alert_destroy(ptr);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_overflow_alert, 0) ) { croak("Expected type idmef_overflow_alert_t * for argument 1."); return; } } idmef_overflow_alert_destroy(arg1); ST(argvi) = sv_newmortal(); XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_overflow_alert_get_program) { { idmef_overflow_alert_t *arg1 = (idmef_overflow_alert_t *) 0 ; int argvi = 0; prelude_string_t *result = 0 ; dXSARGS; if ((items < 1) || (items > 1)) { SWIG_croak("Usage: idmef_overflow_alert_get_program(ptr);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_overflow_alert, 0) ) { croak("Expected type idmef_overflow_alert_t * for argument 1."); return; } } result = (prelude_string_t *)idmef_overflow_alert_get_program(arg1); { ST(argvi) = swig_perl_string(result); argvi++; } XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_overflow_alert_set_program) { { idmef_overflow_alert_t *arg1 = (idmef_overflow_alert_t *) 0 ; prelude_string_t *arg2 = (prelude_string_t *) 0 ; int argvi = 0; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: idmef_overflow_alert_set_program(ptr,program);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_overflow_alert, 0) ) { croak("Expected type idmef_overflow_alert_t * for argument 1."); return; } } { int ret; char *str; STRLEN len; str = SvPV(ST(1), len); ret = prelude_string_new_dup_fast(&(arg2), str, len); if ( ret < 0 ) { swig_perl_raise_error(ret); return; } } idmef_overflow_alert_set_program(arg1,arg2); ST(argvi) = sv_newmortal(); XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_overflow_alert_new_program) { { idmef_overflow_alert_t *arg1 = (idmef_overflow_alert_t *) 0 ; prelude_string_t **arg2 = (prelude_string_t **) 0 ; void *argp2 = 0 ; int res2 = 0 ; int argvi = 0; int result; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: idmef_overflow_alert_new_program(ptr,ret);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_overflow_alert, 0) ) { croak("Expected type idmef_overflow_alert_t * for argument 1."); return; } } res2 = SWIG_ConvertPtr(ST(1), &argp2,SWIGTYPE_p_p_prelude_string_t, 0 | 0 ); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "idmef_overflow_alert_new_program" "', argument " "2"" of type '" "prelude_string_t **""'"); } arg2 = (prelude_string_t **)(argp2); result = (int)idmef_overflow_alert_new_program(arg1,arg2); { ST(argvi) = newSViv(result); argvi++; } XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_overflow_alert_unset_size) { { idmef_overflow_alert_t *arg1 = (idmef_overflow_alert_t *) 0 ; int argvi = 0; dXSARGS; if ((items < 1) || (items > 1)) { SWIG_croak("Usage: idmef_overflow_alert_unset_size(ptr);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_overflow_alert, 0) ) { croak("Expected type idmef_overflow_alert_t * for argument 1."); return; } } idmef_overflow_alert_unset_size(arg1); ST(argvi) = sv_newmortal(); XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_overflow_alert_get_size) { { idmef_overflow_alert_t *arg1 = (idmef_overflow_alert_t *) 0 ; int argvi = 0; uint32_t *result = 0 ; dXSARGS; if ((items < 1) || (items > 1)) { SWIG_croak("Usage: idmef_overflow_alert_get_size(ptr);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_overflow_alert, 0) ) { croak("Expected type idmef_overflow_alert_t * for argument 1."); return; } } result = (uint32_t *)idmef_overflow_alert_get_size(arg1); { if ( result != NULL ) { ST(argvi) = newSVuv(*result); } else { SvREFCNT_inc (& PL_sv_undef); ST(argvi) = &PL_sv_undef; } } XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_overflow_alert_set_size) { { idmef_overflow_alert_t *arg1 = (idmef_overflow_alert_t *) 0 ; uint32_t arg2 ; unsigned int val2 ; int ecode2 = 0 ; int argvi = 0; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: idmef_overflow_alert_set_size(ptr,size);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_overflow_alert, 0) ) { croak("Expected type idmef_overflow_alert_t * for argument 1."); return; } } ecode2 = SWIG_AsVal_unsigned_SS_int SWIG_PERL_CALL_ARGS_2(ST(1), &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "idmef_overflow_alert_set_size" "', argument " "2"" of type '" "uint32_t""'"); } arg2 = (uint32_t)(val2); idmef_overflow_alert_set_size(arg1,arg2); ST(argvi) = sv_newmortal(); XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_overflow_alert_new_size) { { idmef_overflow_alert_t *arg1 = (idmef_overflow_alert_t *) 0 ; uint32_t **arg2 = (uint32_t **) 0 ; void *argp2 = 0 ; int res2 = 0 ; int argvi = 0; int result; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: idmef_overflow_alert_new_size(ptr,ret);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_overflow_alert, 0) ) { croak("Expected type idmef_overflow_alert_t * for argument 1."); return; } } res2 = SWIG_ConvertPtr(ST(1), &argp2,SWIGTYPE_p_p_unsigned_int, 0 | 0 ); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "idmef_overflow_alert_new_size" "', argument " "2"" of type '" "uint32_t **""'"); } arg2 = (uint32_t **)(argp2); result = (int)idmef_overflow_alert_new_size(arg1,arg2); { ST(argvi) = newSViv(result); argvi++; } XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_overflow_alert_get_buffer) { { idmef_overflow_alert_t *arg1 = (idmef_overflow_alert_t *) 0 ; int argvi = 0; idmef_data_t *result = 0 ; dXSARGS; if ((items < 1) || (items > 1)) { SWIG_croak("Usage: idmef_overflow_alert_get_buffer(ptr);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_overflow_alert, 0) ) { croak("Expected type idmef_overflow_alert_t * for argument 1."); return; } } result = (idmef_data_t *)idmef_overflow_alert_get_buffer(arg1); { ST(argvi) = swig_perl_data(result); argvi++; } XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_overflow_alert_set_buffer) { { idmef_overflow_alert_t *arg1 = (idmef_overflow_alert_t *) 0 ; idmef_data_t *arg2 = (idmef_data_t *) 0 ; int argvi = 0; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: idmef_overflow_alert_set_buffer(ptr,buffer);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_overflow_alert, 0) ) { croak("Expected type idmef_overflow_alert_t * for argument 1."); return; } } { if ( ! SvROK(ST(1)) ) { croak("Argument 2 is null."); return; } if ( SWIG_ConvertPtr(ST(1), (void **)&arg2, SWIGTYPE_p_idmef_data_t, 0) ) { croak("Expected type idmef_data_t * for argument 2."); return; } } idmef_overflow_alert_set_buffer(arg1,arg2); ST(argvi) = sv_newmortal(); XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_overflow_alert_new_buffer) { { idmef_overflow_alert_t *arg1 = (idmef_overflow_alert_t *) 0 ; idmef_data_t **arg2 = (idmef_data_t **) 0 ; idmef_data_t *tmp2 ; int argvi = 0; SV * _saved[1] ; int result; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: idmef_overflow_alert_new_buffer(ptr,ret);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_overflow_alert, 0) ) { croak("Expected type idmef_overflow_alert_t * for argument 1."); return; } } { arg2 = (idmef_data_t **) &tmp2; } _saved[0] = ST(1); result = (int)idmef_overflow_alert_new_buffer(arg1,arg2); { ST(argvi) = newSViv(result); argvi++; } { SV *sv; if ( result >= 0 ) { if ( ! SvROK(_saved[0]) ) { croak("Argument 2 is not a reference."); return; } sv = SvRV(_saved[0]); sv_setsv(sv, SWIG_NewPointerObj((void *) * arg2, SWIGTYPE_p_idmef_data_t, 0)); } } XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_alert_type_to_numeric) { { char *arg1 = (char *) 0 ; int res1 ; char *buf1 = 0 ; int alloc1 = 0 ; int argvi = 0; idmef_alert_type_t result; dXSARGS; if ((items < 1) || (items > 1)) { SWIG_croak("Usage: idmef_alert_type_to_numeric(name);"); } res1 = SWIG_AsCharPtrAndSize(ST(0), &buf1, NULL, &alloc1); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "idmef_alert_type_to_numeric" "', argument " "1"" of type '" "char const *""'"); } arg1 = (char *)(buf1); result = (idmef_alert_type_t)idmef_alert_type_to_numeric((char const *)arg1); ST(argvi) = SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(result)); argvi++ ; if (alloc1 == SWIG_NEWOBJ) free((char*)buf1); XSRETURN(argvi); fail: if (alloc1 == SWIG_NEWOBJ) free((char*)buf1); SWIG_croak_null(); } } XS(_wrap_idmef_alert_type_to_string) { { idmef_alert_type_t arg1 ; int val1 ; int ecode1 = 0 ; int argvi = 0; char *result = 0 ; dXSARGS; if ((items < 1) || (items > 1)) { SWIG_croak("Usage: idmef_alert_type_to_string(val);"); } ecode1 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(0), &val1); if (!SWIG_IsOK(ecode1)) { SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "idmef_alert_type_to_string" "', argument " "1"" of type '" "idmef_alert_type_t""'"); } arg1 = (idmef_alert_type_t)(val1); result = (char *)idmef_alert_type_to_string(arg1); ST(argvi) = SWIG_FromCharPtr((const char *)result); argvi++ ; XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_alert_new) { { idmef_alert_t **arg1 = (idmef_alert_t **) 0 ; idmef_alert_t *tmp1 ; int argvi = 0; SV * _saved[1] ; int result; dXSARGS; if ((items < 1) || (items > 1)) { SWIG_croak("Usage: idmef_alert_new(ret);"); } { arg1 = (idmef_alert_t **) &tmp1; } _saved[0] = ST(0); result = (int)idmef_alert_new(arg1); { ST(argvi) = newSViv(result); argvi++; } { SV *sv; if ( result >= 0 ) { if ( ! SvROK(_saved[0]) ) { croak("Argument 1 is not a reference."); return; } sv = SvRV(_saved[0]); sv_setsv(sv, SWIG_NewPointerObj((void *) * arg1, SWIGTYPE_p_idmef_alert, 0)); } } XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_alert_copy) { { idmef_alert_t *arg1 = (idmef_alert_t *) 0 ; idmef_alert_t *arg2 = (idmef_alert_t *) 0 ; int argvi = 0; int result; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: idmef_alert_copy(src,dst);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_alert, 0) ) { croak("Expected type idmef_alert_t const * for argument 1."); return; } } { if ( ! SvROK(ST(1)) ) { croak("Argument 2 is null."); return; } if ( SWIG_ConvertPtr(ST(1), (void **)&arg2, SWIGTYPE_p_idmef_alert, 0) ) { croak("Expected type idmef_alert_t * for argument 2."); return; } } result = (int)idmef_alert_copy((struct idmef_alert const *)arg1,arg2); { ST(argvi) = newSViv(result); argvi++; } XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_alert_clone) { { idmef_alert_t *arg1 = (idmef_alert_t *) 0 ; idmef_alert_t **arg2 = (idmef_alert_t **) 0 ; idmef_alert_t *tmp2 ; int argvi = 0; SV * _saved[1] ; int result; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: idmef_alert_clone(src,dst);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_alert, 0) ) { croak("Expected type idmef_alert_t * for argument 1."); return; } } { arg2 = (idmef_alert_t **) &tmp2; } _saved[0] = ST(1); result = (int)idmef_alert_clone(arg1,arg2); { ST(argvi) = newSViv(result); argvi++; } { SV *sv; if ( result >= 0 ) { if ( ! SvROK(_saved[0]) ) { croak("Argument 2 is not a reference."); return; } sv = SvRV(_saved[0]); sv_setsv(sv, SWIG_NewPointerObj((void *) * arg2, SWIGTYPE_p_idmef_alert, 0)); } } XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_alert_compare) { { idmef_alert_t *arg1 = (idmef_alert_t *) 0 ; idmef_alert_t *arg2 = (idmef_alert_t *) 0 ; int argvi = 0; int result; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: idmef_alert_compare(obj1,obj2);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_alert, 0) ) { croak("Expected type idmef_alert_t const * for argument 1."); return; } } { if ( ! SvROK(ST(1)) ) { croak("Argument 2 is null."); return; } if ( SWIG_ConvertPtr(ST(1), (void **)&arg2, SWIGTYPE_p_idmef_alert, 0) ) { croak("Expected type idmef_alert_t const * for argument 2."); return; } } result = (int)idmef_alert_compare((struct idmef_alert const *)arg1,(struct idmef_alert const *)arg2); { ST(argvi) = newSViv(result); argvi++; } XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_alert_ref) { { idmef_alert_t *arg1 = (idmef_alert_t *) 0 ; int argvi = 0; idmef_alert_t *result = 0 ; dXSARGS; if ((items < 1) || (items > 1)) { SWIG_croak("Usage: idmef_alert_ref(alert);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_alert, 0) ) { croak("Expected type idmef_alert_t * for argument 1."); return; } } result = (idmef_alert_t *)idmef_alert_ref(arg1); ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_idmef_alert, 0 | 0); argvi++ ; XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_alert_destroy) { { idmef_alert_t *arg1 = (idmef_alert_t *) 0 ; int argvi = 0; dXSARGS; if ((items < 1) || (items > 1)) { SWIG_croak("Usage: idmef_alert_destroy(ptr);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_alert, 0) ) { croak("Expected type idmef_alert_t * for argument 1."); return; } } idmef_alert_destroy(arg1); ST(argvi) = sv_newmortal(); XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_alert_get_messageid) { { idmef_alert_t *arg1 = (idmef_alert_t *) 0 ; int argvi = 0; prelude_string_t *result = 0 ; dXSARGS; if ((items < 1) || (items > 1)) { SWIG_croak("Usage: idmef_alert_get_messageid(ptr);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_alert, 0) ) { croak("Expected type idmef_alert_t * for argument 1."); return; } } result = (prelude_string_t *)idmef_alert_get_messageid(arg1); { ST(argvi) = swig_perl_string(result); argvi++; } XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_alert_set_messageid) { { idmef_alert_t *arg1 = (idmef_alert_t *) 0 ; prelude_string_t *arg2 = (prelude_string_t *) 0 ; int argvi = 0; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: idmef_alert_set_messageid(ptr,messageid);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_alert, 0) ) { croak("Expected type idmef_alert_t * for argument 1."); return; } } { int ret; char *str; STRLEN len; str = SvPV(ST(1), len); ret = prelude_string_new_dup_fast(&(arg2), str, len); if ( ret < 0 ) { swig_perl_raise_error(ret); return; } } idmef_alert_set_messageid(arg1,arg2); ST(argvi) = sv_newmortal(); XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_alert_new_messageid) { { idmef_alert_t *arg1 = (idmef_alert_t *) 0 ; prelude_string_t **arg2 = (prelude_string_t **) 0 ; void *argp2 = 0 ; int res2 = 0 ; int argvi = 0; int result; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: idmef_alert_new_messageid(ptr,ret);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_alert, 0) ) { croak("Expected type idmef_alert_t * for argument 1."); return; } } res2 = SWIG_ConvertPtr(ST(1), &argp2,SWIGTYPE_p_p_prelude_string_t, 0 | 0 ); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "idmef_alert_new_messageid" "', argument " "2"" of type '" "prelude_string_t **""'"); } arg2 = (prelude_string_t **)(argp2); result = (int)idmef_alert_new_messageid(arg1,arg2); { ST(argvi) = newSViv(result); argvi++; } XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_alert_get_next_analyzer) { { idmef_alert_t *arg1 = (idmef_alert_t *) 0 ; idmef_analyzer_t *arg2 = (idmef_analyzer_t *) 0 ; int argvi = 0; idmef_analyzer_t *result = 0 ; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: idmef_alert_get_next_analyzer(alert,analyzer_cur);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_alert, 0) ) { croak("Expected type idmef_alert_t * for argument 1."); return; } } { if ( ! SvOK(ST(1)) ) { arg2 = NULL; } else { if ( SWIG_ConvertPtr(ST(1), (void **)&arg2, SWIGTYPE_p_idmef_analyzer, 0) ) { croak("Expected type idmef_analyzer_t * for argument 2."); return; } } } result = (idmef_analyzer_t *)idmef_alert_get_next_analyzer(arg1,arg2); ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_idmef_analyzer, 0 | 0); argvi++ ; XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_alert_set_analyzer) { { idmef_alert_t *arg1 = (idmef_alert_t *) 0 ; idmef_analyzer_t *arg2 = (idmef_analyzer_t *) 0 ; int arg3 ; int val3 ; int ecode3 = 0 ; int argvi = 0; dXSARGS; if ((items < 3) || (items > 3)) { SWIG_croak("Usage: idmef_alert_set_analyzer(ptr,object,pos);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_alert, 0) ) { croak("Expected type idmef_alert_t * for argument 1."); return; } } { if ( ! SvROK(ST(1)) ) { croak("Argument 2 is null."); return; } if ( SWIG_ConvertPtr(ST(1), (void **)&arg2, SWIGTYPE_p_idmef_analyzer, 0) ) { croak("Expected type idmef_analyzer_t * for argument 2."); return; } } ecode3 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(2), &val3); if (!SWIG_IsOK(ecode3)) { SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "idmef_alert_set_analyzer" "', argument " "3"" of type '" "int""'"); } arg3 = (int)(val3); idmef_alert_set_analyzer(arg1,arg2,arg3); ST(argvi) = sv_newmortal(); XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_alert_new_analyzer) { { idmef_alert_t *arg1 = (idmef_alert_t *) 0 ; idmef_analyzer_t **arg2 = (idmef_analyzer_t **) 0 ; int arg3 ; idmef_analyzer_t *tmp2 ; int val3 ; int ecode3 = 0 ; int argvi = 0; SV * _saved[1] ; int result; dXSARGS; if ((items < 3) || (items > 3)) { SWIG_croak("Usage: idmef_alert_new_analyzer(ptr,ret,pos);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_alert, 0) ) { croak("Expected type idmef_alert_t * for argument 1."); return; } } { arg2 = (idmef_analyzer_t **) &tmp2; } ecode3 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(2), &val3); if (!SWIG_IsOK(ecode3)) { SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "idmef_alert_new_analyzer" "', argument " "3"" of type '" "int""'"); } arg3 = (int)(val3); _saved[0] = ST(1); result = (int)idmef_alert_new_analyzer(arg1,arg2,arg3); { ST(argvi) = newSViv(result); argvi++; } { SV *sv; if ( result >= 0 ) { if ( ! SvROK(_saved[0]) ) { croak("Argument 2 is not a reference."); return; } sv = SvRV(_saved[0]); sv_setsv(sv, SWIG_NewPointerObj((void *) * arg2, SWIGTYPE_p_idmef_analyzer, 0)); } } XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_alert_get_create_time) { { idmef_alert_t *arg1 = (idmef_alert_t *) 0 ; int argvi = 0; idmef_time_t *result = 0 ; dXSARGS; if ((items < 1) || (items > 1)) { SWIG_croak("Usage: idmef_alert_get_create_time(ptr);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_alert, 0) ) { croak("Expected type idmef_alert_t * for argument 1."); return; } } result = (idmef_time_t *)idmef_alert_get_create_time(arg1); ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_idmef_time, 0 | SWIG_SHADOW); argvi++ ; XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_alert_set_create_time) { { idmef_alert_t *arg1 = (idmef_alert_t *) 0 ; idmef_time_t *arg2 = (idmef_time_t *) 0 ; int argvi = 0; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: idmef_alert_set_create_time(ptr,create_time);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_alert, 0) ) { croak("Expected type idmef_alert_t * for argument 1."); return; } } { if ( ! SvROK(ST(1)) ) { croak("Argument 2 is null."); return; } if ( SWIG_ConvertPtr(ST(1), (void **)&arg2, SWIGTYPE_p_idmef_time, 0) ) { croak("Expected type idmef_time_t * for argument 2."); return; } } idmef_alert_set_create_time(arg1,arg2); ST(argvi) = sv_newmortal(); XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_alert_new_create_time) { { idmef_alert_t *arg1 = (idmef_alert_t *) 0 ; idmef_time_t **arg2 = (idmef_time_t **) 0 ; idmef_time_t *tmp2 ; int argvi = 0; SV * _saved[1] ; int result; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: idmef_alert_new_create_time(ptr,ret);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_alert, 0) ) { croak("Expected type idmef_alert_t * for argument 1."); return; } } { arg2 = (idmef_time_t **) &tmp2; } _saved[0] = ST(1); result = (int)idmef_alert_new_create_time(arg1,arg2); { ST(argvi) = newSViv(result); argvi++; } { SV *sv; if ( result >= 0 ) { if ( ! SvROK(_saved[0]) ) { croak("Argument 2 is not a reference."); return; } sv = SvRV(_saved[0]); sv_setsv(sv, SWIG_NewPointerObj((void *) * arg2, SWIGTYPE_p_idmef_time, 0)); } } XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_alert_get_classification) { { idmef_alert_t *arg1 = (idmef_alert_t *) 0 ; int argvi = 0; idmef_classification_t *result = 0 ; dXSARGS; if ((items < 1) || (items > 1)) { SWIG_croak("Usage: idmef_alert_get_classification(ptr);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_alert, 0) ) { croak("Expected type idmef_alert_t * for argument 1."); return; } } result = (idmef_classification_t *)idmef_alert_get_classification(arg1); ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_idmef_classification, 0 | 0); argvi++ ; XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_alert_set_classification) { { idmef_alert_t *arg1 = (idmef_alert_t *) 0 ; idmef_classification_t *arg2 = (idmef_classification_t *) 0 ; int argvi = 0; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: idmef_alert_set_classification(ptr,classification);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_alert, 0) ) { croak("Expected type idmef_alert_t * for argument 1."); return; } } { if ( ! SvROK(ST(1)) ) { croak("Argument 2 is null."); return; } if ( SWIG_ConvertPtr(ST(1), (void **)&arg2, SWIGTYPE_p_idmef_classification, 0) ) { croak("Expected type idmef_classification_t * for argument 2."); return; } } idmef_alert_set_classification(arg1,arg2); ST(argvi) = sv_newmortal(); XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_alert_new_classification) { { idmef_alert_t *arg1 = (idmef_alert_t *) 0 ; idmef_classification_t **arg2 = (idmef_classification_t **) 0 ; idmef_classification_t *tmp2 ; int argvi = 0; SV * _saved[1] ; int result; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: idmef_alert_new_classification(ptr,ret);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_alert, 0) ) { croak("Expected type idmef_alert_t * for argument 1."); return; } } { arg2 = (idmef_classification_t **) &tmp2; } _saved[0] = ST(1); result = (int)idmef_alert_new_classification(arg1,arg2); { ST(argvi) = newSViv(result); argvi++; } { SV *sv; if ( result >= 0 ) { if ( ! SvROK(_saved[0]) ) { croak("Argument 2 is not a reference."); return; } sv = SvRV(_saved[0]); sv_setsv(sv, SWIG_NewPointerObj((void *) * arg2, SWIGTYPE_p_idmef_classification, 0)); } } XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_alert_get_detect_time) { { idmef_alert_t *arg1 = (idmef_alert_t *) 0 ; int argvi = 0; idmef_time_t *result = 0 ; dXSARGS; if ((items < 1) || (items > 1)) { SWIG_croak("Usage: idmef_alert_get_detect_time(ptr);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_alert, 0) ) { croak("Expected type idmef_alert_t * for argument 1."); return; } } result = (idmef_time_t *)idmef_alert_get_detect_time(arg1); ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_idmef_time, 0 | SWIG_SHADOW); argvi++ ; XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_alert_set_detect_time) { { idmef_alert_t *arg1 = (idmef_alert_t *) 0 ; idmef_time_t *arg2 = (idmef_time_t *) 0 ; int argvi = 0; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: idmef_alert_set_detect_time(ptr,detect_time);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_alert, 0) ) { croak("Expected type idmef_alert_t * for argument 1."); return; } } { if ( ! SvROK(ST(1)) ) { croak("Argument 2 is null."); return; } if ( SWIG_ConvertPtr(ST(1), (void **)&arg2, SWIGTYPE_p_idmef_time, 0) ) { croak("Expected type idmef_time_t * for argument 2."); return; } } idmef_alert_set_detect_time(arg1,arg2); ST(argvi) = sv_newmortal(); XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_alert_new_detect_time) { { idmef_alert_t *arg1 = (idmef_alert_t *) 0 ; idmef_time_t **arg2 = (idmef_time_t **) 0 ; idmef_time_t *tmp2 ; int argvi = 0; SV * _saved[1] ; int result; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: idmef_alert_new_detect_time(ptr,ret);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_alert, 0) ) { croak("Expected type idmef_alert_t * for argument 1."); return; } } { arg2 = (idmef_time_t **) &tmp2; } _saved[0] = ST(1); result = (int)idmef_alert_new_detect_time(arg1,arg2); { ST(argvi) = newSViv(result); argvi++; } { SV *sv; if ( result >= 0 ) { if ( ! SvROK(_saved[0]) ) { croak("Argument 2 is not a reference."); return; } sv = SvRV(_saved[0]); sv_setsv(sv, SWIG_NewPointerObj((void *) * arg2, SWIGTYPE_p_idmef_time, 0)); } } XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_alert_get_analyzer_time) { { idmef_alert_t *arg1 = (idmef_alert_t *) 0 ; int argvi = 0; idmef_time_t *result = 0 ; dXSARGS; if ((items < 1) || (items > 1)) { SWIG_croak("Usage: idmef_alert_get_analyzer_time(ptr);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_alert, 0) ) { croak("Expected type idmef_alert_t * for argument 1."); return; } } result = (idmef_time_t *)idmef_alert_get_analyzer_time(arg1); ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_idmef_time, 0 | SWIG_SHADOW); argvi++ ; XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_alert_set_analyzer_time) { { idmef_alert_t *arg1 = (idmef_alert_t *) 0 ; idmef_time_t *arg2 = (idmef_time_t *) 0 ; int argvi = 0; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: idmef_alert_set_analyzer_time(ptr,analyzer_time);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_alert, 0) ) { croak("Expected type idmef_alert_t * for argument 1."); return; } } { if ( ! SvROK(ST(1)) ) { croak("Argument 2 is null."); return; } if ( SWIG_ConvertPtr(ST(1), (void **)&arg2, SWIGTYPE_p_idmef_time, 0) ) { croak("Expected type idmef_time_t * for argument 2."); return; } } idmef_alert_set_analyzer_time(arg1,arg2); ST(argvi) = sv_newmortal(); XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_alert_new_analyzer_time) { { idmef_alert_t *arg1 = (idmef_alert_t *) 0 ; idmef_time_t **arg2 = (idmef_time_t **) 0 ; idmef_time_t *tmp2 ; int argvi = 0; SV * _saved[1] ; int result; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: idmef_alert_new_analyzer_time(ptr,ret);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_alert, 0) ) { croak("Expected type idmef_alert_t * for argument 1."); return; } } { arg2 = (idmef_time_t **) &tmp2; } _saved[0] = ST(1); result = (int)idmef_alert_new_analyzer_time(arg1,arg2); { ST(argvi) = newSViv(result); argvi++; } { SV *sv; if ( result >= 0 ) { if ( ! SvROK(_saved[0]) ) { croak("Argument 2 is not a reference."); return; } sv = SvRV(_saved[0]); sv_setsv(sv, SWIG_NewPointerObj((void *) * arg2, SWIGTYPE_p_idmef_time, 0)); } } XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_alert_get_next_source) { { idmef_alert_t *arg1 = (idmef_alert_t *) 0 ; idmef_source_t *arg2 = (idmef_source_t *) 0 ; int argvi = 0; idmef_source_t *result = 0 ; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: idmef_alert_get_next_source(alert,source_cur);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_alert, 0) ) { croak("Expected type idmef_alert_t * for argument 1."); return; } } { if ( ! SvOK(ST(1)) ) { arg2 = NULL; } else { if ( SWIG_ConvertPtr(ST(1), (void **)&arg2, SWIGTYPE_p_idmef_source, 0) ) { croak("Expected type idmef_source_t * for argument 2."); return; } } } result = (idmef_source_t *)idmef_alert_get_next_source(arg1,arg2); ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_idmef_source, 0 | 0); argvi++ ; XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_alert_set_source) { { idmef_alert_t *arg1 = (idmef_alert_t *) 0 ; idmef_source_t *arg2 = (idmef_source_t *) 0 ; int arg3 ; int val3 ; int ecode3 = 0 ; int argvi = 0; dXSARGS; if ((items < 3) || (items > 3)) { SWIG_croak("Usage: idmef_alert_set_source(ptr,object,pos);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_alert, 0) ) { croak("Expected type idmef_alert_t * for argument 1."); return; } } { if ( ! SvROK(ST(1)) ) { croak("Argument 2 is null."); return; } if ( SWIG_ConvertPtr(ST(1), (void **)&arg2, SWIGTYPE_p_idmef_source, 0) ) { croak("Expected type idmef_source_t * for argument 2."); return; } } ecode3 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(2), &val3); if (!SWIG_IsOK(ecode3)) { SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "idmef_alert_set_source" "', argument " "3"" of type '" "int""'"); } arg3 = (int)(val3); idmef_alert_set_source(arg1,arg2,arg3); ST(argvi) = sv_newmortal(); XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_alert_new_source) { { idmef_alert_t *arg1 = (idmef_alert_t *) 0 ; idmef_source_t **arg2 = (idmef_source_t **) 0 ; int arg3 ; idmef_source_t *tmp2 ; int val3 ; int ecode3 = 0 ; int argvi = 0; SV * _saved[1] ; int result; dXSARGS; if ((items < 3) || (items > 3)) { SWIG_croak("Usage: idmef_alert_new_source(ptr,ret,pos);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_alert, 0) ) { croak("Expected type idmef_alert_t * for argument 1."); return; } } { arg2 = (idmef_source_t **) &tmp2; } ecode3 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(2), &val3); if (!SWIG_IsOK(ecode3)) { SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "idmef_alert_new_source" "', argument " "3"" of type '" "int""'"); } arg3 = (int)(val3); _saved[0] = ST(1); result = (int)idmef_alert_new_source(arg1,arg2,arg3); { ST(argvi) = newSViv(result); argvi++; } { SV *sv; if ( result >= 0 ) { if ( ! SvROK(_saved[0]) ) { croak("Argument 2 is not a reference."); return; } sv = SvRV(_saved[0]); sv_setsv(sv, SWIG_NewPointerObj((void *) * arg2, SWIGTYPE_p_idmef_source, 0)); } } XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_alert_get_next_target) { { idmef_alert_t *arg1 = (idmef_alert_t *) 0 ; idmef_target_t *arg2 = (idmef_target_t *) 0 ; int argvi = 0; idmef_target_t *result = 0 ; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: idmef_alert_get_next_target(alert,target_cur);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_alert, 0) ) { croak("Expected type idmef_alert_t * for argument 1."); return; } } { if ( ! SvOK(ST(1)) ) { arg2 = NULL; } else { if ( SWIG_ConvertPtr(ST(1), (void **)&arg2, SWIGTYPE_p_idmef_target, 0) ) { croak("Expected type idmef_target_t * for argument 2."); return; } } } result = (idmef_target_t *)idmef_alert_get_next_target(arg1,arg2); ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_idmef_target, 0 | 0); argvi++ ; XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_alert_set_target) { { idmef_alert_t *arg1 = (idmef_alert_t *) 0 ; idmef_target_t *arg2 = (idmef_target_t *) 0 ; int arg3 ; int val3 ; int ecode3 = 0 ; int argvi = 0; dXSARGS; if ((items < 3) || (items > 3)) { SWIG_croak("Usage: idmef_alert_set_target(ptr,object,pos);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_alert, 0) ) { croak("Expected type idmef_alert_t * for argument 1."); return; } } { if ( ! SvROK(ST(1)) ) { croak("Argument 2 is null."); return; } if ( SWIG_ConvertPtr(ST(1), (void **)&arg2, SWIGTYPE_p_idmef_target, 0) ) { croak("Expected type idmef_target_t * for argument 2."); return; } } ecode3 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(2), &val3); if (!SWIG_IsOK(ecode3)) { SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "idmef_alert_set_target" "', argument " "3"" of type '" "int""'"); } arg3 = (int)(val3); idmef_alert_set_target(arg1,arg2,arg3); ST(argvi) = sv_newmortal(); XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_alert_new_target) { { idmef_alert_t *arg1 = (idmef_alert_t *) 0 ; idmef_target_t **arg2 = (idmef_target_t **) 0 ; int arg3 ; idmef_target_t *tmp2 ; int val3 ; int ecode3 = 0 ; int argvi = 0; SV * _saved[1] ; int result; dXSARGS; if ((items < 3) || (items > 3)) { SWIG_croak("Usage: idmef_alert_new_target(ptr,ret,pos);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_alert, 0) ) { croak("Expected type idmef_alert_t * for argument 1."); return; } } { arg2 = (idmef_target_t **) &tmp2; } ecode3 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(2), &val3); if (!SWIG_IsOK(ecode3)) { SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "idmef_alert_new_target" "', argument " "3"" of type '" "int""'"); } arg3 = (int)(val3); _saved[0] = ST(1); result = (int)idmef_alert_new_target(arg1,arg2,arg3); { ST(argvi) = newSViv(result); argvi++; } { SV *sv; if ( result >= 0 ) { if ( ! SvROK(_saved[0]) ) { croak("Argument 2 is not a reference."); return; } sv = SvRV(_saved[0]); sv_setsv(sv, SWIG_NewPointerObj((void *) * arg2, SWIGTYPE_p_idmef_target, 0)); } } XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_alert_get_assessment) { { idmef_alert_t *arg1 = (idmef_alert_t *) 0 ; int argvi = 0; idmef_assessment_t *result = 0 ; dXSARGS; if ((items < 1) || (items > 1)) { SWIG_croak("Usage: idmef_alert_get_assessment(ptr);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_alert, 0) ) { croak("Expected type idmef_alert_t * for argument 1."); return; } } result = (idmef_assessment_t *)idmef_alert_get_assessment(arg1); ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_idmef_assessment, 0 | 0); argvi++ ; XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_alert_set_assessment) { { idmef_alert_t *arg1 = (idmef_alert_t *) 0 ; idmef_assessment_t *arg2 = (idmef_assessment_t *) 0 ; int argvi = 0; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: idmef_alert_set_assessment(ptr,assessment);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_alert, 0) ) { croak("Expected type idmef_alert_t * for argument 1."); return; } } { if ( ! SvROK(ST(1)) ) { croak("Argument 2 is null."); return; } if ( SWIG_ConvertPtr(ST(1), (void **)&arg2, SWIGTYPE_p_idmef_assessment, 0) ) { croak("Expected type idmef_assessment_t * for argument 2."); return; } } idmef_alert_set_assessment(arg1,arg2); ST(argvi) = sv_newmortal(); XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_alert_new_assessment) { { idmef_alert_t *arg1 = (idmef_alert_t *) 0 ; idmef_assessment_t **arg2 = (idmef_assessment_t **) 0 ; idmef_assessment_t *tmp2 ; int argvi = 0; SV * _saved[1] ; int result; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: idmef_alert_new_assessment(ptr,ret);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_alert, 0) ) { croak("Expected type idmef_alert_t * for argument 1."); return; } } { arg2 = (idmef_assessment_t **) &tmp2; } _saved[0] = ST(1); result = (int)idmef_alert_new_assessment(arg1,arg2); { ST(argvi) = newSViv(result); argvi++; } { SV *sv; if ( result >= 0 ) { if ( ! SvROK(_saved[0]) ) { croak("Argument 2 is not a reference."); return; } sv = SvRV(_saved[0]); sv_setsv(sv, SWIG_NewPointerObj((void *) * arg2, SWIGTYPE_p_idmef_assessment, 0)); } } XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_alert_get_next_additional_data) { { idmef_alert_t *arg1 = (idmef_alert_t *) 0 ; idmef_additional_data_t *arg2 = (idmef_additional_data_t *) 0 ; int argvi = 0; idmef_additional_data_t *result = 0 ; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: idmef_alert_get_next_additional_data(alert,additional_data_cur);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_alert, 0) ) { croak("Expected type idmef_alert_t * for argument 1."); return; } } { if ( ! SvOK(ST(1)) ) { arg2 = NULL; } else { if ( SWIG_ConvertPtr(ST(1), (void **)&arg2, SWIGTYPE_p_idmef_additional_data, 0) ) { croak("Expected type idmef_additional_data_t * for argument 2."); return; } } } result = (idmef_additional_data_t *)idmef_alert_get_next_additional_data(arg1,arg2); ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_idmef_additional_data, 0 | 0); argvi++ ; XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_alert_set_additional_data) { { idmef_alert_t *arg1 = (idmef_alert_t *) 0 ; idmef_additional_data_t *arg2 = (idmef_additional_data_t *) 0 ; int arg3 ; int val3 ; int ecode3 = 0 ; int argvi = 0; dXSARGS; if ((items < 3) || (items > 3)) { SWIG_croak("Usage: idmef_alert_set_additional_data(ptr,object,pos);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_alert, 0) ) { croak("Expected type idmef_alert_t * for argument 1."); return; } } { if ( ! SvROK(ST(1)) ) { croak("Argument 2 is null."); return; } if ( SWIG_ConvertPtr(ST(1), (void **)&arg2, SWIGTYPE_p_idmef_additional_data, 0) ) { croak("Expected type idmef_additional_data_t * for argument 2."); return; } } ecode3 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(2), &val3); if (!SWIG_IsOK(ecode3)) { SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "idmef_alert_set_additional_data" "', argument " "3"" of type '" "int""'"); } arg3 = (int)(val3); idmef_alert_set_additional_data(arg1,arg2,arg3); ST(argvi) = sv_newmortal(); XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_alert_new_additional_data) { { idmef_alert_t *arg1 = (idmef_alert_t *) 0 ; idmef_additional_data_t **arg2 = (idmef_additional_data_t **) 0 ; int arg3 ; idmef_additional_data_t *tmp2 ; int val3 ; int ecode3 = 0 ; int argvi = 0; SV * _saved[1] ; int result; dXSARGS; if ((items < 3) || (items > 3)) { SWIG_croak("Usage: idmef_alert_new_additional_data(ptr,ret,pos);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_alert, 0) ) { croak("Expected type idmef_alert_t * for argument 1."); return; } } { arg2 = (idmef_additional_data_t **) &tmp2; } ecode3 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(2), &val3); if (!SWIG_IsOK(ecode3)) { SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "idmef_alert_new_additional_data" "', argument " "3"" of type '" "int""'"); } arg3 = (int)(val3); _saved[0] = ST(1); result = (int)idmef_alert_new_additional_data(arg1,arg2,arg3); { ST(argvi) = newSViv(result); argvi++; } { SV *sv; if ( result >= 0 ) { if ( ! SvROK(_saved[0]) ) { croak("Argument 2 is not a reference."); return; } sv = SvRV(_saved[0]); sv_setsv(sv, SWIG_NewPointerObj((void *) * arg2, SWIGTYPE_p_idmef_additional_data, 0)); } } XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_alert_get_type) { { idmef_alert_t *arg1 = (idmef_alert_t *) 0 ; int argvi = 0; idmef_alert_type_t result; dXSARGS; if ((items < 1) || (items > 1)) { SWIG_croak("Usage: idmef_alert_get_type(ptr);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_alert, 0) ) { croak("Expected type idmef_alert_t * for argument 1."); return; } } result = (idmef_alert_type_t)idmef_alert_get_type(arg1); ST(argvi) = SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(result)); argvi++ ; XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_alert_get_tool_alert) { { idmef_alert_t *arg1 = (idmef_alert_t *) 0 ; int argvi = 0; idmef_tool_alert_t *result = 0 ; dXSARGS; if ((items < 1) || (items > 1)) { SWIG_croak("Usage: idmef_alert_get_tool_alert(ptr);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_alert, 0) ) { croak("Expected type idmef_alert_t * for argument 1."); return; } } result = (idmef_tool_alert_t *)idmef_alert_get_tool_alert(arg1); ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_idmef_tool_alert, 0 | 0); argvi++ ; XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_alert_set_tool_alert) { { idmef_alert_t *arg1 = (idmef_alert_t *) 0 ; idmef_tool_alert_t *arg2 = (idmef_tool_alert_t *) 0 ; int argvi = 0; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: idmef_alert_set_tool_alert(ptr,tool_alert);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_alert, 0) ) { croak("Expected type idmef_alert_t * for argument 1."); return; } } { if ( ! SvROK(ST(1)) ) { croak("Argument 2 is null."); return; } if ( SWIG_ConvertPtr(ST(1), (void **)&arg2, SWIGTYPE_p_idmef_tool_alert, 0) ) { croak("Expected type idmef_tool_alert_t * for argument 2."); return; } } idmef_alert_set_tool_alert(arg1,arg2); ST(argvi) = sv_newmortal(); XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_alert_new_tool_alert) { { idmef_alert_t *arg1 = (idmef_alert_t *) 0 ; idmef_tool_alert_t **arg2 = (idmef_tool_alert_t **) 0 ; idmef_tool_alert_t *tmp2 ; int argvi = 0; SV * _saved[1] ; int result; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: idmef_alert_new_tool_alert(ptr,ret);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_alert, 0) ) { croak("Expected type idmef_alert_t * for argument 1."); return; } } { arg2 = (idmef_tool_alert_t **) &tmp2; } _saved[0] = ST(1); result = (int)idmef_alert_new_tool_alert(arg1,arg2); { ST(argvi) = newSViv(result); argvi++; } { SV *sv; if ( result >= 0 ) { if ( ! SvROK(_saved[0]) ) { croak("Argument 2 is not a reference."); return; } sv = SvRV(_saved[0]); sv_setsv(sv, SWIG_NewPointerObj((void *) * arg2, SWIGTYPE_p_idmef_tool_alert, 0)); } } XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_alert_get_correlation_alert) { { idmef_alert_t *arg1 = (idmef_alert_t *) 0 ; int argvi = 0; idmef_correlation_alert_t *result = 0 ; dXSARGS; if ((items < 1) || (items > 1)) { SWIG_croak("Usage: idmef_alert_get_correlation_alert(ptr);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_alert, 0) ) { croak("Expected type idmef_alert_t * for argument 1."); return; } } result = (idmef_correlation_alert_t *)idmef_alert_get_correlation_alert(arg1); ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_idmef_correlation_alert, 0 | 0); argvi++ ; XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_alert_set_correlation_alert) { { idmef_alert_t *arg1 = (idmef_alert_t *) 0 ; idmef_correlation_alert_t *arg2 = (idmef_correlation_alert_t *) 0 ; int argvi = 0; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: idmef_alert_set_correlation_alert(ptr,correlation_alert);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_alert, 0) ) { croak("Expected type idmef_alert_t * for argument 1."); return; } } { if ( ! SvROK(ST(1)) ) { croak("Argument 2 is null."); return; } if ( SWIG_ConvertPtr(ST(1), (void **)&arg2, SWIGTYPE_p_idmef_correlation_alert, 0) ) { croak("Expected type idmef_correlation_alert_t * for argument 2."); return; } } idmef_alert_set_correlation_alert(arg1,arg2); ST(argvi) = sv_newmortal(); XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_alert_new_correlation_alert) { { idmef_alert_t *arg1 = (idmef_alert_t *) 0 ; idmef_correlation_alert_t **arg2 = (idmef_correlation_alert_t **) 0 ; idmef_correlation_alert_t *tmp2 ; int argvi = 0; SV * _saved[1] ; int result; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: idmef_alert_new_correlation_alert(ptr,ret);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_alert, 0) ) { croak("Expected type idmef_alert_t * for argument 1."); return; } } { arg2 = (idmef_correlation_alert_t **) &tmp2; } _saved[0] = ST(1); result = (int)idmef_alert_new_correlation_alert(arg1,arg2); { ST(argvi) = newSViv(result); argvi++; } { SV *sv; if ( result >= 0 ) { if ( ! SvROK(_saved[0]) ) { croak("Argument 2 is not a reference."); return; } sv = SvRV(_saved[0]); sv_setsv(sv, SWIG_NewPointerObj((void *) * arg2, SWIGTYPE_p_idmef_correlation_alert, 0)); } } XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_alert_get_overflow_alert) { { idmef_alert_t *arg1 = (idmef_alert_t *) 0 ; int argvi = 0; idmef_overflow_alert_t *result = 0 ; dXSARGS; if ((items < 1) || (items > 1)) { SWIG_croak("Usage: idmef_alert_get_overflow_alert(ptr);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_alert, 0) ) { croak("Expected type idmef_alert_t * for argument 1."); return; } } result = (idmef_overflow_alert_t *)idmef_alert_get_overflow_alert(arg1); ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_idmef_overflow_alert, 0 | 0); argvi++ ; XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_alert_set_overflow_alert) { { idmef_alert_t *arg1 = (idmef_alert_t *) 0 ; idmef_overflow_alert_t *arg2 = (idmef_overflow_alert_t *) 0 ; int argvi = 0; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: idmef_alert_set_overflow_alert(ptr,overflow_alert);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_alert, 0) ) { croak("Expected type idmef_alert_t * for argument 1."); return; } } { if ( ! SvROK(ST(1)) ) { croak("Argument 2 is null."); return; } if ( SWIG_ConvertPtr(ST(1), (void **)&arg2, SWIGTYPE_p_idmef_overflow_alert, 0) ) { croak("Expected type idmef_overflow_alert_t * for argument 2."); return; } } idmef_alert_set_overflow_alert(arg1,arg2); ST(argvi) = sv_newmortal(); XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_alert_new_overflow_alert) { { idmef_alert_t *arg1 = (idmef_alert_t *) 0 ; idmef_overflow_alert_t **arg2 = (idmef_overflow_alert_t **) 0 ; idmef_overflow_alert_t *tmp2 ; int argvi = 0; SV * _saved[1] ; int result; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: idmef_alert_new_overflow_alert(ptr,ret);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_alert, 0) ) { croak("Expected type idmef_alert_t * for argument 1."); return; } } { arg2 = (idmef_overflow_alert_t **) &tmp2; } _saved[0] = ST(1); result = (int)idmef_alert_new_overflow_alert(arg1,arg2); { ST(argvi) = newSViv(result); argvi++; } { SV *sv; if ( result >= 0 ) { if ( ! SvROK(_saved[0]) ) { croak("Argument 2 is not a reference."); return; } sv = SvRV(_saved[0]); sv_setsv(sv, SWIG_NewPointerObj((void *) * arg2, SWIGTYPE_p_idmef_overflow_alert, 0)); } } XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_heartbeat_new) { { idmef_heartbeat_t **arg1 = (idmef_heartbeat_t **) 0 ; idmef_heartbeat_t *tmp1 ; int argvi = 0; SV * _saved[1] ; int result; dXSARGS; if ((items < 1) || (items > 1)) { SWIG_croak("Usage: idmef_heartbeat_new(ret);"); } { arg1 = (idmef_heartbeat_t **) &tmp1; } _saved[0] = ST(0); result = (int)idmef_heartbeat_new(arg1); { ST(argvi) = newSViv(result); argvi++; } { SV *sv; if ( result >= 0 ) { if ( ! SvROK(_saved[0]) ) { croak("Argument 1 is not a reference."); return; } sv = SvRV(_saved[0]); sv_setsv(sv, SWIG_NewPointerObj((void *) * arg1, SWIGTYPE_p_idmef_heartbeat, 0)); } } XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_heartbeat_copy) { { idmef_heartbeat_t *arg1 = (idmef_heartbeat_t *) 0 ; idmef_heartbeat_t *arg2 = (idmef_heartbeat_t *) 0 ; int argvi = 0; int result; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: idmef_heartbeat_copy(src,dst);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_heartbeat, 0) ) { croak("Expected type idmef_heartbeat_t const * for argument 1."); return; } } { if ( ! SvROK(ST(1)) ) { croak("Argument 2 is null."); return; } if ( SWIG_ConvertPtr(ST(1), (void **)&arg2, SWIGTYPE_p_idmef_heartbeat, 0) ) { croak("Expected type idmef_heartbeat_t * for argument 2."); return; } } result = (int)idmef_heartbeat_copy((struct idmef_heartbeat const *)arg1,arg2); { ST(argvi) = newSViv(result); argvi++; } XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_heartbeat_clone) { { idmef_heartbeat_t *arg1 = (idmef_heartbeat_t *) 0 ; idmef_heartbeat_t **arg2 = (idmef_heartbeat_t **) 0 ; idmef_heartbeat_t *tmp2 ; int argvi = 0; SV * _saved[1] ; int result; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: idmef_heartbeat_clone(src,dst);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_heartbeat, 0) ) { croak("Expected type idmef_heartbeat_t * for argument 1."); return; } } { arg2 = (idmef_heartbeat_t **) &tmp2; } _saved[0] = ST(1); result = (int)idmef_heartbeat_clone(arg1,arg2); { ST(argvi) = newSViv(result); argvi++; } { SV *sv; if ( result >= 0 ) { if ( ! SvROK(_saved[0]) ) { croak("Argument 2 is not a reference."); return; } sv = SvRV(_saved[0]); sv_setsv(sv, SWIG_NewPointerObj((void *) * arg2, SWIGTYPE_p_idmef_heartbeat, 0)); } } XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_heartbeat_compare) { { idmef_heartbeat_t *arg1 = (idmef_heartbeat_t *) 0 ; idmef_heartbeat_t *arg2 = (idmef_heartbeat_t *) 0 ; int argvi = 0; int result; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: idmef_heartbeat_compare(obj1,obj2);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_heartbeat, 0) ) { croak("Expected type idmef_heartbeat_t const * for argument 1."); return; } } { if ( ! SvROK(ST(1)) ) { croak("Argument 2 is null."); return; } if ( SWIG_ConvertPtr(ST(1), (void **)&arg2, SWIGTYPE_p_idmef_heartbeat, 0) ) { croak("Expected type idmef_heartbeat_t const * for argument 2."); return; } } result = (int)idmef_heartbeat_compare((struct idmef_heartbeat const *)arg1,(struct idmef_heartbeat const *)arg2); { ST(argvi) = newSViv(result); argvi++; } XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_heartbeat_ref) { { idmef_heartbeat_t *arg1 = (idmef_heartbeat_t *) 0 ; int argvi = 0; idmef_heartbeat_t *result = 0 ; dXSARGS; if ((items < 1) || (items > 1)) { SWIG_croak("Usage: idmef_heartbeat_ref(heartbeat);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_heartbeat, 0) ) { croak("Expected type idmef_heartbeat_t * for argument 1."); return; } } result = (idmef_heartbeat_t *)idmef_heartbeat_ref(arg1); ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_idmef_heartbeat, 0 | 0); argvi++ ; XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_heartbeat_destroy) { { idmef_heartbeat_t *arg1 = (idmef_heartbeat_t *) 0 ; int argvi = 0; dXSARGS; if ((items < 1) || (items > 1)) { SWIG_croak("Usage: idmef_heartbeat_destroy(ptr);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_heartbeat, 0) ) { croak("Expected type idmef_heartbeat_t * for argument 1."); return; } } idmef_heartbeat_destroy(arg1); ST(argvi) = sv_newmortal(); XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_heartbeat_get_messageid) { { idmef_heartbeat_t *arg1 = (idmef_heartbeat_t *) 0 ; int argvi = 0; prelude_string_t *result = 0 ; dXSARGS; if ((items < 1) || (items > 1)) { SWIG_croak("Usage: idmef_heartbeat_get_messageid(ptr);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_heartbeat, 0) ) { croak("Expected type idmef_heartbeat_t * for argument 1."); return; } } result = (prelude_string_t *)idmef_heartbeat_get_messageid(arg1); { ST(argvi) = swig_perl_string(result); argvi++; } XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_heartbeat_set_messageid) { { idmef_heartbeat_t *arg1 = (idmef_heartbeat_t *) 0 ; prelude_string_t *arg2 = (prelude_string_t *) 0 ; int argvi = 0; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: idmef_heartbeat_set_messageid(ptr,messageid);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_heartbeat, 0) ) { croak("Expected type idmef_heartbeat_t * for argument 1."); return; } } { int ret; char *str; STRLEN len; str = SvPV(ST(1), len); ret = prelude_string_new_dup_fast(&(arg2), str, len); if ( ret < 0 ) { swig_perl_raise_error(ret); return; } } idmef_heartbeat_set_messageid(arg1,arg2); ST(argvi) = sv_newmortal(); XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_heartbeat_new_messageid) { { idmef_heartbeat_t *arg1 = (idmef_heartbeat_t *) 0 ; prelude_string_t **arg2 = (prelude_string_t **) 0 ; void *argp2 = 0 ; int res2 = 0 ; int argvi = 0; int result; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: idmef_heartbeat_new_messageid(ptr,ret);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_heartbeat, 0) ) { croak("Expected type idmef_heartbeat_t * for argument 1."); return; } } res2 = SWIG_ConvertPtr(ST(1), &argp2,SWIGTYPE_p_p_prelude_string_t, 0 | 0 ); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "idmef_heartbeat_new_messageid" "', argument " "2"" of type '" "prelude_string_t **""'"); } arg2 = (prelude_string_t **)(argp2); result = (int)idmef_heartbeat_new_messageid(arg1,arg2); { ST(argvi) = newSViv(result); argvi++; } XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_heartbeat_get_next_analyzer) { { idmef_heartbeat_t *arg1 = (idmef_heartbeat_t *) 0 ; idmef_analyzer_t *arg2 = (idmef_analyzer_t *) 0 ; int argvi = 0; idmef_analyzer_t *result = 0 ; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: idmef_heartbeat_get_next_analyzer(heartbeat,analyzer_cur);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_heartbeat, 0) ) { croak("Expected type idmef_heartbeat_t * for argument 1."); return; } } { if ( ! SvOK(ST(1)) ) { arg2 = NULL; } else { if ( SWIG_ConvertPtr(ST(1), (void **)&arg2, SWIGTYPE_p_idmef_analyzer, 0) ) { croak("Expected type idmef_analyzer_t * for argument 2."); return; } } } result = (idmef_analyzer_t *)idmef_heartbeat_get_next_analyzer(arg1,arg2); ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_idmef_analyzer, 0 | 0); argvi++ ; XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_heartbeat_set_analyzer) { { idmef_heartbeat_t *arg1 = (idmef_heartbeat_t *) 0 ; idmef_analyzer_t *arg2 = (idmef_analyzer_t *) 0 ; int arg3 ; int val3 ; int ecode3 = 0 ; int argvi = 0; dXSARGS; if ((items < 3) || (items > 3)) { SWIG_croak("Usage: idmef_heartbeat_set_analyzer(ptr,object,pos);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_heartbeat, 0) ) { croak("Expected type idmef_heartbeat_t * for argument 1."); return; } } { if ( ! SvROK(ST(1)) ) { croak("Argument 2 is null."); return; } if ( SWIG_ConvertPtr(ST(1), (void **)&arg2, SWIGTYPE_p_idmef_analyzer, 0) ) { croak("Expected type idmef_analyzer_t * for argument 2."); return; } } ecode3 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(2), &val3); if (!SWIG_IsOK(ecode3)) { SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "idmef_heartbeat_set_analyzer" "', argument " "3"" of type '" "int""'"); } arg3 = (int)(val3); idmef_heartbeat_set_analyzer(arg1,arg2,arg3); ST(argvi) = sv_newmortal(); XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_heartbeat_new_analyzer) { { idmef_heartbeat_t *arg1 = (idmef_heartbeat_t *) 0 ; idmef_analyzer_t **arg2 = (idmef_analyzer_t **) 0 ; int arg3 ; idmef_analyzer_t *tmp2 ; int val3 ; int ecode3 = 0 ; int argvi = 0; SV * _saved[1] ; int result; dXSARGS; if ((items < 3) || (items > 3)) { SWIG_croak("Usage: idmef_heartbeat_new_analyzer(ptr,ret,pos);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_heartbeat, 0) ) { croak("Expected type idmef_heartbeat_t * for argument 1."); return; } } { arg2 = (idmef_analyzer_t **) &tmp2; } ecode3 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(2), &val3); if (!SWIG_IsOK(ecode3)) { SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "idmef_heartbeat_new_analyzer" "', argument " "3"" of type '" "int""'"); } arg3 = (int)(val3); _saved[0] = ST(1); result = (int)idmef_heartbeat_new_analyzer(arg1,arg2,arg3); { ST(argvi) = newSViv(result); argvi++; } { SV *sv; if ( result >= 0 ) { if ( ! SvROK(_saved[0]) ) { croak("Argument 2 is not a reference."); return; } sv = SvRV(_saved[0]); sv_setsv(sv, SWIG_NewPointerObj((void *) * arg2, SWIGTYPE_p_idmef_analyzer, 0)); } } XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_heartbeat_get_create_time) { { idmef_heartbeat_t *arg1 = (idmef_heartbeat_t *) 0 ; int argvi = 0; idmef_time_t *result = 0 ; dXSARGS; if ((items < 1) || (items > 1)) { SWIG_croak("Usage: idmef_heartbeat_get_create_time(ptr);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_heartbeat, 0) ) { croak("Expected type idmef_heartbeat_t * for argument 1."); return; } } result = (idmef_time_t *)idmef_heartbeat_get_create_time(arg1); ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_idmef_time, 0 | SWIG_SHADOW); argvi++ ; XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_heartbeat_set_create_time) { { idmef_heartbeat_t *arg1 = (idmef_heartbeat_t *) 0 ; idmef_time_t *arg2 = (idmef_time_t *) 0 ; int argvi = 0; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: idmef_heartbeat_set_create_time(ptr,create_time);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_heartbeat, 0) ) { croak("Expected type idmef_heartbeat_t * for argument 1."); return; } } { if ( ! SvROK(ST(1)) ) { croak("Argument 2 is null."); return; } if ( SWIG_ConvertPtr(ST(1), (void **)&arg2, SWIGTYPE_p_idmef_time, 0) ) { croak("Expected type idmef_time_t * for argument 2."); return; } } idmef_heartbeat_set_create_time(arg1,arg2); ST(argvi) = sv_newmortal(); XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_heartbeat_new_create_time) { { idmef_heartbeat_t *arg1 = (idmef_heartbeat_t *) 0 ; idmef_time_t **arg2 = (idmef_time_t **) 0 ; idmef_time_t *tmp2 ; int argvi = 0; SV * _saved[1] ; int result; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: idmef_heartbeat_new_create_time(ptr,ret);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_heartbeat, 0) ) { croak("Expected type idmef_heartbeat_t * for argument 1."); return; } } { arg2 = (idmef_time_t **) &tmp2; } _saved[0] = ST(1); result = (int)idmef_heartbeat_new_create_time(arg1,arg2); { ST(argvi) = newSViv(result); argvi++; } { SV *sv; if ( result >= 0 ) { if ( ! SvROK(_saved[0]) ) { croak("Argument 2 is not a reference."); return; } sv = SvRV(_saved[0]); sv_setsv(sv, SWIG_NewPointerObj((void *) * arg2, SWIGTYPE_p_idmef_time, 0)); } } XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_heartbeat_get_analyzer_time) { { idmef_heartbeat_t *arg1 = (idmef_heartbeat_t *) 0 ; int argvi = 0; idmef_time_t *result = 0 ; dXSARGS; if ((items < 1) || (items > 1)) { SWIG_croak("Usage: idmef_heartbeat_get_analyzer_time(ptr);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_heartbeat, 0) ) { croak("Expected type idmef_heartbeat_t * for argument 1."); return; } } result = (idmef_time_t *)idmef_heartbeat_get_analyzer_time(arg1); ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_idmef_time, 0 | SWIG_SHADOW); argvi++ ; XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_heartbeat_set_analyzer_time) { { idmef_heartbeat_t *arg1 = (idmef_heartbeat_t *) 0 ; idmef_time_t *arg2 = (idmef_time_t *) 0 ; int argvi = 0; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: idmef_heartbeat_set_analyzer_time(ptr,analyzer_time);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_heartbeat, 0) ) { croak("Expected type idmef_heartbeat_t * for argument 1."); return; } } { if ( ! SvROK(ST(1)) ) { croak("Argument 2 is null."); return; } if ( SWIG_ConvertPtr(ST(1), (void **)&arg2, SWIGTYPE_p_idmef_time, 0) ) { croak("Expected type idmef_time_t * for argument 2."); return; } } idmef_heartbeat_set_analyzer_time(arg1,arg2); ST(argvi) = sv_newmortal(); XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_heartbeat_new_analyzer_time) { { idmef_heartbeat_t *arg1 = (idmef_heartbeat_t *) 0 ; idmef_time_t **arg2 = (idmef_time_t **) 0 ; idmef_time_t *tmp2 ; int argvi = 0; SV * _saved[1] ; int result; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: idmef_heartbeat_new_analyzer_time(ptr,ret);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_heartbeat, 0) ) { croak("Expected type idmef_heartbeat_t * for argument 1."); return; } } { arg2 = (idmef_time_t **) &tmp2; } _saved[0] = ST(1); result = (int)idmef_heartbeat_new_analyzer_time(arg1,arg2); { ST(argvi) = newSViv(result); argvi++; } { SV *sv; if ( result >= 0 ) { if ( ! SvROK(_saved[0]) ) { croak("Argument 2 is not a reference."); return; } sv = SvRV(_saved[0]); sv_setsv(sv, SWIG_NewPointerObj((void *) * arg2, SWIGTYPE_p_idmef_time, 0)); } } XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_heartbeat_unset_heartbeat_interval) { { idmef_heartbeat_t *arg1 = (idmef_heartbeat_t *) 0 ; int argvi = 0; dXSARGS; if ((items < 1) || (items > 1)) { SWIG_croak("Usage: idmef_heartbeat_unset_heartbeat_interval(ptr);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_heartbeat, 0) ) { croak("Expected type idmef_heartbeat_t * for argument 1."); return; } } idmef_heartbeat_unset_heartbeat_interval(arg1); ST(argvi) = sv_newmortal(); XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_heartbeat_get_heartbeat_interval) { { idmef_heartbeat_t *arg1 = (idmef_heartbeat_t *) 0 ; int argvi = 0; uint32_t *result = 0 ; dXSARGS; if ((items < 1) || (items > 1)) { SWIG_croak("Usage: idmef_heartbeat_get_heartbeat_interval(ptr);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_heartbeat, 0) ) { croak("Expected type idmef_heartbeat_t * for argument 1."); return; } } result = (uint32_t *)idmef_heartbeat_get_heartbeat_interval(arg1); { if ( result != NULL ) { ST(argvi) = newSVuv(*result); } else { SvREFCNT_inc (& PL_sv_undef); ST(argvi) = &PL_sv_undef; } } XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_heartbeat_set_heartbeat_interval) { { idmef_heartbeat_t *arg1 = (idmef_heartbeat_t *) 0 ; uint32_t arg2 ; unsigned int val2 ; int ecode2 = 0 ; int argvi = 0; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: idmef_heartbeat_set_heartbeat_interval(ptr,heartbeat_interval);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_heartbeat, 0) ) { croak("Expected type idmef_heartbeat_t * for argument 1."); return; } } ecode2 = SWIG_AsVal_unsigned_SS_int SWIG_PERL_CALL_ARGS_2(ST(1), &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "idmef_heartbeat_set_heartbeat_interval" "', argument " "2"" of type '" "uint32_t""'"); } arg2 = (uint32_t)(val2); idmef_heartbeat_set_heartbeat_interval(arg1,arg2); ST(argvi) = sv_newmortal(); XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_heartbeat_new_heartbeat_interval) { { idmef_heartbeat_t *arg1 = (idmef_heartbeat_t *) 0 ; uint32_t **arg2 = (uint32_t **) 0 ; void *argp2 = 0 ; int res2 = 0 ; int argvi = 0; int result; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: idmef_heartbeat_new_heartbeat_interval(ptr,ret);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_heartbeat, 0) ) { croak("Expected type idmef_heartbeat_t * for argument 1."); return; } } res2 = SWIG_ConvertPtr(ST(1), &argp2,SWIGTYPE_p_p_unsigned_int, 0 | 0 ); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "idmef_heartbeat_new_heartbeat_interval" "', argument " "2"" of type '" "uint32_t **""'"); } arg2 = (uint32_t **)(argp2); result = (int)idmef_heartbeat_new_heartbeat_interval(arg1,arg2); { ST(argvi) = newSViv(result); argvi++; } XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_heartbeat_get_next_additional_data) { { idmef_heartbeat_t *arg1 = (idmef_heartbeat_t *) 0 ; idmef_additional_data_t *arg2 = (idmef_additional_data_t *) 0 ; int argvi = 0; idmef_additional_data_t *result = 0 ; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: idmef_heartbeat_get_next_additional_data(heartbeat,additional_data_cur);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_heartbeat, 0) ) { croak("Expected type idmef_heartbeat_t * for argument 1."); return; } } { if ( ! SvOK(ST(1)) ) { arg2 = NULL; } else { if ( SWIG_ConvertPtr(ST(1), (void **)&arg2, SWIGTYPE_p_idmef_additional_data, 0) ) { croak("Expected type idmef_additional_data_t * for argument 2."); return; } } } result = (idmef_additional_data_t *)idmef_heartbeat_get_next_additional_data(arg1,arg2); ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_idmef_additional_data, 0 | 0); argvi++ ; XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_heartbeat_set_additional_data) { { idmef_heartbeat_t *arg1 = (idmef_heartbeat_t *) 0 ; idmef_additional_data_t *arg2 = (idmef_additional_data_t *) 0 ; int arg3 ; int val3 ; int ecode3 = 0 ; int argvi = 0; dXSARGS; if ((items < 3) || (items > 3)) { SWIG_croak("Usage: idmef_heartbeat_set_additional_data(ptr,object,pos);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_heartbeat, 0) ) { croak("Expected type idmef_heartbeat_t * for argument 1."); return; } } { if ( ! SvROK(ST(1)) ) { croak("Argument 2 is null."); return; } if ( SWIG_ConvertPtr(ST(1), (void **)&arg2, SWIGTYPE_p_idmef_additional_data, 0) ) { croak("Expected type idmef_additional_data_t * for argument 2."); return; } } ecode3 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(2), &val3); if (!SWIG_IsOK(ecode3)) { SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "idmef_heartbeat_set_additional_data" "', argument " "3"" of type '" "int""'"); } arg3 = (int)(val3); idmef_heartbeat_set_additional_data(arg1,arg2,arg3); ST(argvi) = sv_newmortal(); XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_heartbeat_new_additional_data) { { idmef_heartbeat_t *arg1 = (idmef_heartbeat_t *) 0 ; idmef_additional_data_t **arg2 = (idmef_additional_data_t **) 0 ; int arg3 ; idmef_additional_data_t *tmp2 ; int val3 ; int ecode3 = 0 ; int argvi = 0; SV * _saved[1] ; int result; dXSARGS; if ((items < 3) || (items > 3)) { SWIG_croak("Usage: idmef_heartbeat_new_additional_data(ptr,ret,pos);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_heartbeat, 0) ) { croak("Expected type idmef_heartbeat_t * for argument 1."); return; } } { arg2 = (idmef_additional_data_t **) &tmp2; } ecode3 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(2), &val3); if (!SWIG_IsOK(ecode3)) { SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "idmef_heartbeat_new_additional_data" "', argument " "3"" of type '" "int""'"); } arg3 = (int)(val3); _saved[0] = ST(1); result = (int)idmef_heartbeat_new_additional_data(arg1,arg2,arg3); { ST(argvi) = newSViv(result); argvi++; } { SV *sv; if ( result >= 0 ) { if ( ! SvROK(_saved[0]) ) { croak("Argument 2 is not a reference."); return; } sv = SvRV(_saved[0]); sv_setsv(sv, SWIG_NewPointerObj((void *) * arg2, SWIGTYPE_p_idmef_additional_data, 0)); } } XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_message_type_to_numeric) { { char *arg1 = (char *) 0 ; int res1 ; char *buf1 = 0 ; int alloc1 = 0 ; int argvi = 0; idmef_message_type_t result; dXSARGS; if ((items < 1) || (items > 1)) { SWIG_croak("Usage: idmef_message_type_to_numeric(name);"); } res1 = SWIG_AsCharPtrAndSize(ST(0), &buf1, NULL, &alloc1); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "idmef_message_type_to_numeric" "', argument " "1"" of type '" "char const *""'"); } arg1 = (char *)(buf1); result = (idmef_message_type_t)idmef_message_type_to_numeric((char const *)arg1); ST(argvi) = SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(result)); argvi++ ; if (alloc1 == SWIG_NEWOBJ) free((char*)buf1); XSRETURN(argvi); fail: if (alloc1 == SWIG_NEWOBJ) free((char*)buf1); SWIG_croak_null(); } } XS(_wrap_idmef_message_type_to_string) { { idmef_message_type_t arg1 ; int val1 ; int ecode1 = 0 ; int argvi = 0; char *result = 0 ; dXSARGS; if ((items < 1) || (items > 1)) { SWIG_croak("Usage: idmef_message_type_to_string(val);"); } ecode1 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(0), &val1); if (!SWIG_IsOK(ecode1)) { SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "idmef_message_type_to_string" "', argument " "1"" of type '" "idmef_message_type_t""'"); } arg1 = (idmef_message_type_t)(val1); result = (char *)idmef_message_type_to_string(arg1); ST(argvi) = SWIG_FromCharPtr((const char *)result); argvi++ ; XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_message_new) { { idmef_message_t **arg1 = (idmef_message_t **) 0 ; idmef_message_t *tmp1 ; int argvi = 0; SV * _saved[1] ; int result; dXSARGS; if ((items < 1) || (items > 1)) { SWIG_croak("Usage: idmef_message_new(ret);"); } { arg1 = (idmef_message_t **) &tmp1; } _saved[0] = ST(0); result = (int)idmef_message_new(arg1); { ST(argvi) = newSViv(result); argvi++; } { SV *sv; if ( result >= 0 ) { if ( ! SvROK(_saved[0]) ) { croak("Argument 1 is not a reference."); return; } sv = SvRV(_saved[0]); sv_setsv(sv, SWIG_NewPointerObj((void *) * arg1, SWIGTYPE_p_idmef_message, 0)); } } XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_message_copy) { { idmef_message_t *arg1 = (idmef_message_t *) 0 ; idmef_message_t *arg2 = (idmef_message_t *) 0 ; int argvi = 0; int result; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: idmef_message_copy(src,dst);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_message, 0) ) { croak("Expected type idmef_message_t const * for argument 1."); return; } } { if ( ! SvROK(ST(1)) ) { croak("Argument 2 is null."); return; } if ( SWIG_ConvertPtr(ST(1), (void **)&arg2, SWIGTYPE_p_idmef_message, 0) ) { croak("Expected type idmef_message_t * for argument 2."); return; } } result = (int)idmef_message_copy((struct idmef_message const *)arg1,arg2); { ST(argvi) = newSViv(result); argvi++; } XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_message_clone) { { idmef_message_t *arg1 = (idmef_message_t *) 0 ; idmef_message_t **arg2 = (idmef_message_t **) 0 ; idmef_message_t *tmp2 ; int argvi = 0; SV * _saved[1] ; int result; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: idmef_message_clone(src,dst);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_message, 0) ) { croak("Expected type idmef_message_t * for argument 1."); return; } } { arg2 = (idmef_message_t **) &tmp2; } _saved[0] = ST(1); result = (int)idmef_message_clone(arg1,arg2); { ST(argvi) = newSViv(result); argvi++; } { SV *sv; if ( result >= 0 ) { if ( ! SvROK(_saved[0]) ) { croak("Argument 2 is not a reference."); return; } sv = SvRV(_saved[0]); sv_setsv(sv, SWIG_NewPointerObj((void *) * arg2, SWIGTYPE_p_idmef_message, 0)); } } XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_message_compare) { { idmef_message_t *arg1 = (idmef_message_t *) 0 ; idmef_message_t *arg2 = (idmef_message_t *) 0 ; int argvi = 0; int result; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: idmef_message_compare(obj1,obj2);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_message, 0) ) { croak("Expected type idmef_message_t const * for argument 1."); return; } } { if ( ! SvROK(ST(1)) ) { croak("Argument 2 is null."); return; } if ( SWIG_ConvertPtr(ST(1), (void **)&arg2, SWIGTYPE_p_idmef_message, 0) ) { croak("Expected type idmef_message_t const * for argument 2."); return; } } result = (int)idmef_message_compare((struct idmef_message const *)arg1,(struct idmef_message const *)arg2); { ST(argvi) = newSViv(result); argvi++; } XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_message_ref) { { idmef_message_t *arg1 = (idmef_message_t *) 0 ; int argvi = 0; idmef_message_t *result = 0 ; dXSARGS; if ((items < 1) || (items > 1)) { SWIG_croak("Usage: idmef_message_ref(message);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_message, 0) ) { croak("Expected type idmef_message_t * for argument 1."); return; } } result = (idmef_message_t *)idmef_message_ref(arg1); ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_idmef_message, 0 | 0); argvi++ ; XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_message_destroy) { { idmef_message_t *arg1 = (idmef_message_t *) 0 ; int argvi = 0; dXSARGS; if ((items < 1) || (items > 1)) { SWIG_croak("Usage: idmef_message_destroy(ptr);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_message, 0) ) { croak("Expected type idmef_message_t * for argument 1."); return; } } idmef_message_destroy(arg1); ST(argvi) = sv_newmortal(); XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_message_get_version) { { idmef_message_t *arg1 = (idmef_message_t *) 0 ; int argvi = 0; prelude_string_t *result = 0 ; dXSARGS; if ((items < 1) || (items > 1)) { SWIG_croak("Usage: idmef_message_get_version(ptr);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_message, 0) ) { croak("Expected type idmef_message_t * for argument 1."); return; } } result = (prelude_string_t *)idmef_message_get_version(arg1); { ST(argvi) = swig_perl_string(result); argvi++; } XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_message_set_version) { { idmef_message_t *arg1 = (idmef_message_t *) 0 ; prelude_string_t *arg2 = (prelude_string_t *) 0 ; int argvi = 0; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: idmef_message_set_version(ptr,version);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_message, 0) ) { croak("Expected type idmef_message_t * for argument 1."); return; } } { int ret; char *str; STRLEN len; str = SvPV(ST(1), len); ret = prelude_string_new_dup_fast(&(arg2), str, len); if ( ret < 0 ) { swig_perl_raise_error(ret); return; } } idmef_message_set_version(arg1,arg2); ST(argvi) = sv_newmortal(); XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_message_new_version) { { idmef_message_t *arg1 = (idmef_message_t *) 0 ; prelude_string_t **arg2 = (prelude_string_t **) 0 ; void *argp2 = 0 ; int res2 = 0 ; int argvi = 0; int result; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: idmef_message_new_version(ptr,ret);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_message, 0) ) { croak("Expected type idmef_message_t * for argument 1."); return; } } res2 = SWIG_ConvertPtr(ST(1), &argp2,SWIGTYPE_p_p_prelude_string_t, 0 | 0 ); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "idmef_message_new_version" "', argument " "2"" of type '" "prelude_string_t **""'"); } arg2 = (prelude_string_t **)(argp2); result = (int)idmef_message_new_version(arg1,arg2); { ST(argvi) = newSViv(result); argvi++; } XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_message_get_type) { { idmef_message_t *arg1 = (idmef_message_t *) 0 ; int argvi = 0; idmef_message_type_t result; dXSARGS; if ((items < 1) || (items > 1)) { SWIG_croak("Usage: idmef_message_get_type(ptr);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_message, 0) ) { croak("Expected type idmef_message_t * for argument 1."); return; } } result = (idmef_message_type_t)idmef_message_get_type(arg1); ST(argvi) = SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(result)); argvi++ ; XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_message_get_alert) { { idmef_message_t *arg1 = (idmef_message_t *) 0 ; int argvi = 0; idmef_alert_t *result = 0 ; dXSARGS; if ((items < 1) || (items > 1)) { SWIG_croak("Usage: idmef_message_get_alert(ptr);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_message, 0) ) { croak("Expected type idmef_message_t * for argument 1."); return; } } result = (idmef_alert_t *)idmef_message_get_alert(arg1); ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_idmef_alert, 0 | 0); argvi++ ; XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_message_set_alert) { { idmef_message_t *arg1 = (idmef_message_t *) 0 ; idmef_alert_t *arg2 = (idmef_alert_t *) 0 ; int argvi = 0; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: idmef_message_set_alert(ptr,alert);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_message, 0) ) { croak("Expected type idmef_message_t * for argument 1."); return; } } { if ( ! SvROK(ST(1)) ) { croak("Argument 2 is null."); return; } if ( SWIG_ConvertPtr(ST(1), (void **)&arg2, SWIGTYPE_p_idmef_alert, 0) ) { croak("Expected type idmef_alert_t * for argument 2."); return; } } idmef_message_set_alert(arg1,arg2); ST(argvi) = sv_newmortal(); XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_message_new_alert) { { idmef_message_t *arg1 = (idmef_message_t *) 0 ; idmef_alert_t **arg2 = (idmef_alert_t **) 0 ; idmef_alert_t *tmp2 ; int argvi = 0; SV * _saved[1] ; int result; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: idmef_message_new_alert(ptr,ret);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_message, 0) ) { croak("Expected type idmef_message_t * for argument 1."); return; } } { arg2 = (idmef_alert_t **) &tmp2; } _saved[0] = ST(1); result = (int)idmef_message_new_alert(arg1,arg2); { ST(argvi) = newSViv(result); argvi++; } { SV *sv; if ( result >= 0 ) { if ( ! SvROK(_saved[0]) ) { croak("Argument 2 is not a reference."); return; } sv = SvRV(_saved[0]); sv_setsv(sv, SWIG_NewPointerObj((void *) * arg2, SWIGTYPE_p_idmef_alert, 0)); } } XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_message_get_heartbeat) { { idmef_message_t *arg1 = (idmef_message_t *) 0 ; int argvi = 0; idmef_heartbeat_t *result = 0 ; dXSARGS; if ((items < 1) || (items > 1)) { SWIG_croak("Usage: idmef_message_get_heartbeat(ptr);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_message, 0) ) { croak("Expected type idmef_message_t * for argument 1."); return; } } result = (idmef_heartbeat_t *)idmef_message_get_heartbeat(arg1); ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_idmef_heartbeat, 0 | 0); argvi++ ; XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_message_set_heartbeat) { { idmef_message_t *arg1 = (idmef_message_t *) 0 ; idmef_heartbeat_t *arg2 = (idmef_heartbeat_t *) 0 ; int argvi = 0; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: idmef_message_set_heartbeat(ptr,heartbeat);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_message, 0) ) { croak("Expected type idmef_message_t * for argument 1."); return; } } { if ( ! SvROK(ST(1)) ) { croak("Argument 2 is null."); return; } if ( SWIG_ConvertPtr(ST(1), (void **)&arg2, SWIGTYPE_p_idmef_heartbeat, 0) ) { croak("Expected type idmef_heartbeat_t * for argument 2."); return; } } idmef_message_set_heartbeat(arg1,arg2); ST(argvi) = sv_newmortal(); XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_message_new_heartbeat) { { idmef_message_t *arg1 = (idmef_message_t *) 0 ; idmef_heartbeat_t **arg2 = (idmef_heartbeat_t **) 0 ; idmef_heartbeat_t *tmp2 ; int argvi = 0; SV * _saved[1] ; int result; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: idmef_message_new_heartbeat(ptr,ret);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_message, 0) ) { croak("Expected type idmef_message_t * for argument 1."); return; } } { arg2 = (idmef_heartbeat_t **) &tmp2; } _saved[0] = ST(1); result = (int)idmef_message_new_heartbeat(arg1,arg2); { ST(argvi) = newSViv(result); argvi++; } { SV *sv; if ( result >= 0 ) { if ( ! SvROK(_saved[0]) ) { croak("Argument 2 is not a reference."); return; } sv = SvRV(_saved[0]); sv_setsv(sv, SWIG_NewPointerObj((void *) * arg2, SWIGTYPE_p_idmef_heartbeat, 0)); } } XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_message_set_pmsg) { { idmef_message_t *arg1 = (idmef_message_t *) 0 ; prelude_msg_t *arg2 = (prelude_msg_t *) 0 ; int argvi = 0; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: idmef_message_set_pmsg(message,msg);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_message, 0) ) { croak("Expected type idmef_message_t * for argument 1."); return; } } { if ( ! SvROK(ST(1)) ) { croak("Argument 2 is null."); return; } if ( SWIG_ConvertPtr(ST(1), (void **)&arg2, SWIGTYPE_p_prelude_msg, 0) ) { croak("Expected type prelude_msg_t * for argument 2."); return; } } idmef_message_set_pmsg(arg1,arg2); ST(argvi) = sv_newmortal(); XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_message_get_pmsg) { { idmef_message_t *arg1 = (idmef_message_t *) 0 ; int argvi = 0; prelude_msg_t *result = 0 ; dXSARGS; if ((items < 1) || (items > 1)) { SWIG_croak("Usage: idmef_message_get_pmsg(message);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_message, 0) ) { croak("Expected type idmef_message_t * for argument 1."); return; } } result = (prelude_msg_t *)idmef_message_get_pmsg(arg1); ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_prelude_msg, 0 | 0); argvi++ ; XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_value_new_int8) { { idmef_value_t **arg1 = (idmef_value_t **) 0 ; int8_t arg2 ; idmef_value_t *tmp1 ; char val2 ; int ecode2 = 0 ; int argvi = 0; SV * _saved[1] ; int result; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: idmef_value_new_int8(value,val);"); } { arg1 = (idmef_value_t **) &tmp1; } ecode2 = SWIG_AsVal_char SWIG_PERL_CALL_ARGS_2(ST(1), &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "idmef_value_new_int8" "', argument " "2"" of type '" "int8_t""'"); } arg2 = (int8_t)(val2); _saved[0] = ST(0); result = (int)idmef_value_new_int8(arg1,arg2); { ST(argvi) = newSViv(result); argvi++; } { SV *sv; if ( result >= 0 ) { if ( ! SvROK(_saved[0]) ) { croak("Argument 1 is not a reference."); return; } sv = SvRV(_saved[0]); sv_setsv(sv, SWIG_NewPointerObj((void *) * arg1, SWIGTYPE_p_idmef_value, 0)); } } XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_value_new_uint8) { { idmef_value_t **arg1 = (idmef_value_t **) 0 ; uint8_t arg2 ; idmef_value_t *tmp1 ; unsigned char val2 ; int ecode2 = 0 ; int argvi = 0; SV * _saved[1] ; int result; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: idmef_value_new_uint8(value,val);"); } { arg1 = (idmef_value_t **) &tmp1; } ecode2 = SWIG_AsVal_unsigned_SS_char SWIG_PERL_CALL_ARGS_2(ST(1), &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "idmef_value_new_uint8" "', argument " "2"" of type '" "uint8_t""'"); } arg2 = (uint8_t)(val2); _saved[0] = ST(0); result = (int)idmef_value_new_uint8(arg1,arg2); { ST(argvi) = newSViv(result); argvi++; } { SV *sv; if ( result >= 0 ) { if ( ! SvROK(_saved[0]) ) { croak("Argument 1 is not a reference."); return; } sv = SvRV(_saved[0]); sv_setsv(sv, SWIG_NewPointerObj((void *) * arg1, SWIGTYPE_p_idmef_value, 0)); } } XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_value_new_int16) { { idmef_value_t **arg1 = (idmef_value_t **) 0 ; int16_t arg2 ; idmef_value_t *tmp1 ; short val2 ; int ecode2 = 0 ; int argvi = 0; SV * _saved[1] ; int result; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: idmef_value_new_int16(value,val);"); } { arg1 = (idmef_value_t **) &tmp1; } ecode2 = SWIG_AsVal_short SWIG_PERL_CALL_ARGS_2(ST(1), &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "idmef_value_new_int16" "', argument " "2"" of type '" "int16_t""'"); } arg2 = (int16_t)(val2); _saved[0] = ST(0); result = (int)idmef_value_new_int16(arg1,arg2); { ST(argvi) = newSViv(result); argvi++; } { SV *sv; if ( result >= 0 ) { if ( ! SvROK(_saved[0]) ) { croak("Argument 1 is not a reference."); return; } sv = SvRV(_saved[0]); sv_setsv(sv, SWIG_NewPointerObj((void *) * arg1, SWIGTYPE_p_idmef_value, 0)); } } XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_value_new_uint16) { { idmef_value_t **arg1 = (idmef_value_t **) 0 ; uint16_t arg2 ; idmef_value_t *tmp1 ; unsigned short val2 ; int ecode2 = 0 ; int argvi = 0; SV * _saved[1] ; int result; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: idmef_value_new_uint16(value,val);"); } { arg1 = (idmef_value_t **) &tmp1; } ecode2 = SWIG_AsVal_unsigned_SS_short SWIG_PERL_CALL_ARGS_2(ST(1), &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "idmef_value_new_uint16" "', argument " "2"" of type '" "uint16_t""'"); } arg2 = (uint16_t)(val2); _saved[0] = ST(0); result = (int)idmef_value_new_uint16(arg1,arg2); { ST(argvi) = newSViv(result); argvi++; } { SV *sv; if ( result >= 0 ) { if ( ! SvROK(_saved[0]) ) { croak("Argument 1 is not a reference."); return; } sv = SvRV(_saved[0]); sv_setsv(sv, SWIG_NewPointerObj((void *) * arg1, SWIGTYPE_p_idmef_value, 0)); } } XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_value_new_int32) { { idmef_value_t **arg1 = (idmef_value_t **) 0 ; int32_t arg2 ; idmef_value_t *tmp1 ; int val2 ; int ecode2 = 0 ; int argvi = 0; SV * _saved[1] ; int result; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: idmef_value_new_int32(value,val);"); } { arg1 = (idmef_value_t **) &tmp1; } ecode2 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(1), &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "idmef_value_new_int32" "', argument " "2"" of type '" "int32_t""'"); } arg2 = (int32_t)(val2); _saved[0] = ST(0); result = (int)idmef_value_new_int32(arg1,arg2); { ST(argvi) = newSViv(result); argvi++; } { SV *sv; if ( result >= 0 ) { if ( ! SvROK(_saved[0]) ) { croak("Argument 1 is not a reference."); return; } sv = SvRV(_saved[0]); sv_setsv(sv, SWIG_NewPointerObj((void *) * arg1, SWIGTYPE_p_idmef_value, 0)); } } XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_value_new_uint32) { { idmef_value_t **arg1 = (idmef_value_t **) 0 ; uint32_t arg2 ; idmef_value_t *tmp1 ; unsigned int val2 ; int ecode2 = 0 ; int argvi = 0; SV * _saved[1] ; int result; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: idmef_value_new_uint32(value,val);"); } { arg1 = (idmef_value_t **) &tmp1; } ecode2 = SWIG_AsVal_unsigned_SS_int SWIG_PERL_CALL_ARGS_2(ST(1), &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "idmef_value_new_uint32" "', argument " "2"" of type '" "uint32_t""'"); } arg2 = (uint32_t)(val2); _saved[0] = ST(0); result = (int)idmef_value_new_uint32(arg1,arg2); { ST(argvi) = newSViv(result); argvi++; } { SV *sv; if ( result >= 0 ) { if ( ! SvROK(_saved[0]) ) { croak("Argument 1 is not a reference."); return; } sv = SvRV(_saved[0]); sv_setsv(sv, SWIG_NewPointerObj((void *) * arg1, SWIGTYPE_p_idmef_value, 0)); } } XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_value_new_int64) { { idmef_value_t **arg1 = (idmef_value_t **) 0 ; int64_t arg2 ; idmef_value_t *tmp1 ; long long val2 ; int ecode2 = 0 ; int argvi = 0; SV * _saved[1] ; int result; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: idmef_value_new_int64(value,val);"); } { arg1 = (idmef_value_t **) &tmp1; } ecode2 = SWIG_AsVal_long_SS_long SWIG_PERL_CALL_ARGS_2(ST(1), &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "idmef_value_new_int64" "', argument " "2"" of type '" "int64_t""'"); } arg2 = (int64_t)(val2); _saved[0] = ST(0); result = (int)idmef_value_new_int64(arg1,arg2); { ST(argvi) = newSViv(result); argvi++; } { SV *sv; if ( result >= 0 ) { if ( ! SvROK(_saved[0]) ) { croak("Argument 1 is not a reference."); return; } sv = SvRV(_saved[0]); sv_setsv(sv, SWIG_NewPointerObj((void *) * arg1, SWIGTYPE_p_idmef_value, 0)); } } XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_value_new_uint64) { { idmef_value_t **arg1 = (idmef_value_t **) 0 ; uint64_t arg2 ; idmef_value_t *tmp1 ; unsigned long long val2 ; int ecode2 = 0 ; int argvi = 0; SV * _saved[1] ; int result; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: idmef_value_new_uint64(value,val);"); } { arg1 = (idmef_value_t **) &tmp1; } ecode2 = SWIG_AsVal_unsigned_SS_long_SS_long SWIG_PERL_CALL_ARGS_2(ST(1), &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "idmef_value_new_uint64" "', argument " "2"" of type '" "uint64_t""'"); } arg2 = (uint64_t)(val2); _saved[0] = ST(0); result = (int)idmef_value_new_uint64(arg1,arg2); { ST(argvi) = newSViv(result); argvi++; } { SV *sv; if ( result >= 0 ) { if ( ! SvROK(_saved[0]) ) { croak("Argument 1 is not a reference."); return; } sv = SvRV(_saved[0]); sv_setsv(sv, SWIG_NewPointerObj((void *) * arg1, SWIGTYPE_p_idmef_value, 0)); } } XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_value_new_float) { { idmef_value_t **arg1 = (idmef_value_t **) 0 ; float arg2 ; idmef_value_t *tmp1 ; float val2 ; int ecode2 = 0 ; int argvi = 0; SV * _saved[1] ; int result; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: idmef_value_new_float(value,val);"); } { arg1 = (idmef_value_t **) &tmp1; } ecode2 = SWIG_AsVal_float SWIG_PERL_CALL_ARGS_2(ST(1), &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "idmef_value_new_float" "', argument " "2"" of type '" "float""'"); } arg2 = (float)(val2); _saved[0] = ST(0); result = (int)idmef_value_new_float(arg1,arg2); { ST(argvi) = newSViv(result); argvi++; } { SV *sv; if ( result >= 0 ) { if ( ! SvROK(_saved[0]) ) { croak("Argument 1 is not a reference."); return; } sv = SvRV(_saved[0]); sv_setsv(sv, SWIG_NewPointerObj((void *) * arg1, SWIGTYPE_p_idmef_value, 0)); } } XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_value_new_double) { { idmef_value_t **arg1 = (idmef_value_t **) 0 ; double arg2 ; idmef_value_t *tmp1 ; double val2 ; int ecode2 = 0 ; int argvi = 0; SV * _saved[1] ; int result; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: idmef_value_new_double(value,val);"); } { arg1 = (idmef_value_t **) &tmp1; } ecode2 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "idmef_value_new_double" "', argument " "2"" of type '" "double""'"); } arg2 = (double)(val2); _saved[0] = ST(0); result = (int)idmef_value_new_double(arg1,arg2); { ST(argvi) = newSViv(result); argvi++; } { SV *sv; if ( result >= 0 ) { if ( ! SvROK(_saved[0]) ) { croak("Argument 1 is not a reference."); return; } sv = SvRV(_saved[0]); sv_setsv(sv, SWIG_NewPointerObj((void *) * arg1, SWIGTYPE_p_idmef_value, 0)); } } XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_value_new_string) { { idmef_value_t **arg1 = (idmef_value_t **) 0 ; prelude_string_t *arg2 = (prelude_string_t *) 0 ; idmef_value_t *tmp1 ; int argvi = 0; SV * _saved[1] ; int result; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: idmef_value_new_string(value,string);"); } { arg1 = (idmef_value_t **) &tmp1; } { int ret; char *str; STRLEN len; str = SvPV(ST(1), len); ret = prelude_string_new_dup_fast(&(arg2), str, len); if ( ret < 0 ) { swig_perl_raise_error(ret); return; } } _saved[0] = ST(0); result = (int)idmef_value_new_string(arg1,arg2); { ST(argvi) = newSViv(result); argvi++; } { SV *sv; if ( result >= 0 ) { if ( ! SvROK(_saved[0]) ) { croak("Argument 1 is not a reference."); return; } sv = SvRV(_saved[0]); sv_setsv(sv, SWIG_NewPointerObj((void *) * arg1, SWIGTYPE_p_idmef_value, 0)); } } XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_value_new_time) { { idmef_value_t **arg1 = (idmef_value_t **) 0 ; idmef_time_t *arg2 = (idmef_time_t *) 0 ; idmef_value_t *tmp1 ; int argvi = 0; SV * _saved[1] ; int result; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: idmef_value_new_time(value,time);"); } { arg1 = (idmef_value_t **) &tmp1; } { if ( ! SvROK(ST(1)) ) { croak("Argument 2 is null."); return; } if ( SWIG_ConvertPtr(ST(1), (void **)&arg2, SWIGTYPE_p_idmef_time, 0) ) { croak("Expected type idmef_time_t * for argument 2."); return; } } _saved[0] = ST(0); result = (int)idmef_value_new_time(arg1,arg2); { ST(argvi) = newSViv(result); argvi++; } { SV *sv; if ( result >= 0 ) { if ( ! SvROK(_saved[0]) ) { croak("Argument 1 is not a reference."); return; } sv = SvRV(_saved[0]); sv_setsv(sv, SWIG_NewPointerObj((void *) * arg1, SWIGTYPE_p_idmef_value, 0)); } } XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_value_new_data) { { idmef_value_t **arg1 = (idmef_value_t **) 0 ; idmef_data_t *arg2 = (idmef_data_t *) 0 ; idmef_value_t *tmp1 ; int argvi = 0; SV * _saved[1] ; int result; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: idmef_value_new_data(value,data);"); } { arg1 = (idmef_value_t **) &tmp1; } { if ( ! SvROK(ST(1)) ) { croak("Argument 2 is null."); return; } if ( SWIG_ConvertPtr(ST(1), (void **)&arg2, SWIGTYPE_p_idmef_data_t, 0) ) { croak("Expected type idmef_data_t * for argument 2."); return; } } _saved[0] = ST(0); result = (int)idmef_value_new_data(arg1,arg2); { ST(argvi) = newSViv(result); argvi++; } { SV *sv; if ( result >= 0 ) { if ( ! SvROK(_saved[0]) ) { croak("Argument 1 is not a reference."); return; } sv = SvRV(_saved[0]); sv_setsv(sv, SWIG_NewPointerObj((void *) * arg1, SWIGTYPE_p_idmef_value, 0)); } } XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_value_new_class) { { idmef_value_t **arg1 = (idmef_value_t **) 0 ; idmef_class_id_t arg2 ; void *arg3 = (void *) 0 ; idmef_value_t *tmp1 ; int val2 ; int ecode2 = 0 ; int res3 ; int argvi = 0; SV * _saved[1] ; int result; dXSARGS; if ((items < 3) || (items > 3)) { SWIG_croak("Usage: idmef_value_new_class(value,classid,ptr);"); } { arg1 = (idmef_value_t **) &tmp1; } ecode2 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(1), &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "idmef_value_new_class" "', argument " "2"" of type '" "idmef_class_id_t""'"); } arg2 = (idmef_class_id_t)(val2); res3 = SWIG_ConvertPtr(ST(2),SWIG_as_voidptrptr(&arg3), 0, 0); if (!SWIG_IsOK(res3)) { SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "idmef_value_new_class" "', argument " "3"" of type '" "void *""'"); } _saved[0] = ST(0); result = (int)idmef_value_new_class(arg1,arg2,arg3); { ST(argvi) = newSViv(result); argvi++; } { SV *sv; if ( result >= 0 ) { if ( ! SvROK(_saved[0]) ) { croak("Argument 1 is not a reference."); return; } sv = SvRV(_saved[0]); sv_setsv(sv, SWIG_NewPointerObj((void *) * arg1, SWIGTYPE_p_idmef_value, 0)); } } XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_value_new_list) { { idmef_value_t **arg1 = (idmef_value_t **) 0 ; idmef_value_t *tmp1 ; int argvi = 0; SV * _saved[1] ; int result; dXSARGS; if ((items < 1) || (items > 1)) { SWIG_croak("Usage: idmef_value_new_list(value);"); } { arg1 = (idmef_value_t **) &tmp1; } _saved[0] = ST(0); result = (int)idmef_value_new_list(arg1); { ST(argvi) = newSViv(result); argvi++; } { SV *sv; if ( result >= 0 ) { if ( ! SvROK(_saved[0]) ) { croak("Argument 1 is not a reference."); return; } sv = SvRV(_saved[0]); sv_setsv(sv, SWIG_NewPointerObj((void *) * arg1, SWIGTYPE_p_idmef_value, 0)); } } XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_value_new_enum) { { idmef_value_t **arg1 = (idmef_value_t **) 0 ; idmef_class_id_t arg2 ; char *arg3 = (char *) 0 ; idmef_value_t *tmp1 ; int val2 ; int ecode2 = 0 ; int res3 ; char *buf3 = 0 ; int alloc3 = 0 ; int argvi = 0; SV * _saved[1] ; int result; dXSARGS; if ((items < 3) || (items > 3)) { SWIG_croak("Usage: idmef_value_new_enum(value,classid,buf);"); } { arg1 = (idmef_value_t **) &tmp1; } ecode2 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(1), &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "idmef_value_new_enum" "', argument " "2"" of type '" "idmef_class_id_t""'"); } arg2 = (idmef_class_id_t)(val2); res3 = SWIG_AsCharPtrAndSize(ST(2), &buf3, NULL, &alloc3); if (!SWIG_IsOK(res3)) { SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "idmef_value_new_enum" "', argument " "3"" of type '" "char const *""'"); } arg3 = (char *)(buf3); _saved[0] = ST(0); result = (int)idmef_value_new_enum(arg1,arg2,(char const *)arg3); { ST(argvi) = newSViv(result); argvi++; } { SV *sv; if ( result >= 0 ) { if ( ! SvROK(_saved[0]) ) { croak("Argument 1 is not a reference."); return; } sv = SvRV(_saved[0]); sv_setsv(sv, SWIG_NewPointerObj((void *) * arg1, SWIGTYPE_p_idmef_value, 0)); } } if (alloc3 == SWIG_NEWOBJ) free((char*)buf3); XSRETURN(argvi); fail: if (alloc3 == SWIG_NEWOBJ) free((char*)buf3); SWIG_croak_null(); } } XS(_wrap_idmef_value_new_enum_from_string) { { idmef_value_t **arg1 = (idmef_value_t **) 0 ; idmef_class_id_t arg2 ; char *arg3 = (char *) 0 ; idmef_value_t *tmp1 ; int val2 ; int ecode2 = 0 ; int res3 ; char *buf3 = 0 ; int alloc3 = 0 ; int argvi = 0; SV * _saved[1] ; int result; dXSARGS; if ((items < 3) || (items > 3)) { SWIG_croak("Usage: idmef_value_new_enum_from_string(value,classid,buf);"); } { arg1 = (idmef_value_t **) &tmp1; } ecode2 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(1), &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "idmef_value_new_enum_from_string" "', argument " "2"" of type '" "idmef_class_id_t""'"); } arg2 = (idmef_class_id_t)(val2); res3 = SWIG_AsCharPtrAndSize(ST(2), &buf3, NULL, &alloc3); if (!SWIG_IsOK(res3)) { SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "idmef_value_new_enum_from_string" "', argument " "3"" of type '" "char const *""'"); } arg3 = (char *)(buf3); _saved[0] = ST(0); result = (int)idmef_value_new_enum_from_string(arg1,arg2,(char const *)arg3); { ST(argvi) = newSViv(result); argvi++; } { SV *sv; if ( result >= 0 ) { if ( ! SvROK(_saved[0]) ) { croak("Argument 1 is not a reference."); return; } sv = SvRV(_saved[0]); sv_setsv(sv, SWIG_NewPointerObj((void *) * arg1, SWIGTYPE_p_idmef_value, 0)); } } if (alloc3 == SWIG_NEWOBJ) free((char*)buf3); XSRETURN(argvi); fail: if (alloc3 == SWIG_NEWOBJ) free((char*)buf3); SWIG_croak_null(); } } XS(_wrap_idmef_value_new_enum_from_numeric) { { idmef_value_t **arg1 = (idmef_value_t **) 0 ; idmef_class_id_t arg2 ; int arg3 ; idmef_value_t *tmp1 ; int val2 ; int ecode2 = 0 ; int val3 ; int ecode3 = 0 ; int argvi = 0; SV * _saved[1] ; int result; dXSARGS; if ((items < 3) || (items > 3)) { SWIG_croak("Usage: idmef_value_new_enum_from_numeric(value,classid,val);"); } { arg1 = (idmef_value_t **) &tmp1; } ecode2 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(1), &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "idmef_value_new_enum_from_numeric" "', argument " "2"" of type '" "idmef_class_id_t""'"); } arg2 = (idmef_class_id_t)(val2); ecode3 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(2), &val3); if (!SWIG_IsOK(ecode3)) { SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "idmef_value_new_enum_from_numeric" "', argument " "3"" of type '" "int""'"); } arg3 = (int)(val3); _saved[0] = ST(0); result = (int)idmef_value_new_enum_from_numeric(arg1,arg2,arg3); { ST(argvi) = newSViv(result); argvi++; } { SV *sv; if ( result >= 0 ) { if ( ! SvROK(_saved[0]) ) { croak("Argument 1 is not a reference."); return; } sv = SvRV(_saved[0]); sv_setsv(sv, SWIG_NewPointerObj((void *) * arg1, SWIGTYPE_p_idmef_value, 0)); } } XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_value_set_int8) { { idmef_value_t *arg1 = (idmef_value_t *) 0 ; int8_t arg2 ; char val2 ; int ecode2 = 0 ; int argvi = 0; int result; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: idmef_value_set_int8(value,val);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_value, 0) ) { croak("Expected type idmef_value_t * for argument 1."); return; } } ecode2 = SWIG_AsVal_char SWIG_PERL_CALL_ARGS_2(ST(1), &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "idmef_value_set_int8" "', argument " "2"" of type '" "int8_t""'"); } arg2 = (int8_t)(val2); result = (int)idmef_value_set_int8(arg1,arg2); { ST(argvi) = newSViv(result); argvi++; } XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_value_set_uint8) { { idmef_value_t *arg1 = (idmef_value_t *) 0 ; uint8_t arg2 ; unsigned char val2 ; int ecode2 = 0 ; int argvi = 0; int result; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: idmef_value_set_uint8(value,val);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_value, 0) ) { croak("Expected type idmef_value_t * for argument 1."); return; } } ecode2 = SWIG_AsVal_unsigned_SS_char SWIG_PERL_CALL_ARGS_2(ST(1), &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "idmef_value_set_uint8" "', argument " "2"" of type '" "uint8_t""'"); } arg2 = (uint8_t)(val2); result = (int)idmef_value_set_uint8(arg1,arg2); { ST(argvi) = newSViv(result); argvi++; } XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_value_set_int16) { { idmef_value_t *arg1 = (idmef_value_t *) 0 ; int16_t arg2 ; short val2 ; int ecode2 = 0 ; int argvi = 0; int result; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: idmef_value_set_int16(value,val);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_value, 0) ) { croak("Expected type idmef_value_t * for argument 1."); return; } } ecode2 = SWIG_AsVal_short SWIG_PERL_CALL_ARGS_2(ST(1), &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "idmef_value_set_int16" "', argument " "2"" of type '" "int16_t""'"); } arg2 = (int16_t)(val2); result = (int)idmef_value_set_int16(arg1,arg2); { ST(argvi) = newSViv(result); argvi++; } XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_value_set_uint16) { { idmef_value_t *arg1 = (idmef_value_t *) 0 ; uint16_t arg2 ; unsigned short val2 ; int ecode2 = 0 ; int argvi = 0; int result; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: idmef_value_set_uint16(value,val);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_value, 0) ) { croak("Expected type idmef_value_t * for argument 1."); return; } } ecode2 = SWIG_AsVal_unsigned_SS_short SWIG_PERL_CALL_ARGS_2(ST(1), &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "idmef_value_set_uint16" "', argument " "2"" of type '" "uint16_t""'"); } arg2 = (uint16_t)(val2); result = (int)idmef_value_set_uint16(arg1,arg2); { ST(argvi) = newSViv(result); argvi++; } XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_value_set_int32) { { idmef_value_t *arg1 = (idmef_value_t *) 0 ; int32_t arg2 ; int val2 ; int ecode2 = 0 ; int argvi = 0; int result; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: idmef_value_set_int32(value,val);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_value, 0) ) { croak("Expected type idmef_value_t * for argument 1."); return; } } ecode2 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(1), &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "idmef_value_set_int32" "', argument " "2"" of type '" "int32_t""'"); } arg2 = (int32_t)(val2); result = (int)idmef_value_set_int32(arg1,arg2); { ST(argvi) = newSViv(result); argvi++; } XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_value_set_uint32) { { idmef_value_t *arg1 = (idmef_value_t *) 0 ; uint32_t arg2 ; unsigned int val2 ; int ecode2 = 0 ; int argvi = 0; int result; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: idmef_value_set_uint32(value,val);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_value, 0) ) { croak("Expected type idmef_value_t * for argument 1."); return; } } ecode2 = SWIG_AsVal_unsigned_SS_int SWIG_PERL_CALL_ARGS_2(ST(1), &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "idmef_value_set_uint32" "', argument " "2"" of type '" "uint32_t""'"); } arg2 = (uint32_t)(val2); result = (int)idmef_value_set_uint32(arg1,arg2); { ST(argvi) = newSViv(result); argvi++; } XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_value_set_int64) { { idmef_value_t *arg1 = (idmef_value_t *) 0 ; int64_t arg2 ; long long val2 ; int ecode2 = 0 ; int argvi = 0; int result; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: idmef_value_set_int64(value,val);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_value, 0) ) { croak("Expected type idmef_value_t * for argument 1."); return; } } ecode2 = SWIG_AsVal_long_SS_long SWIG_PERL_CALL_ARGS_2(ST(1), &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "idmef_value_set_int64" "', argument " "2"" of type '" "int64_t""'"); } arg2 = (int64_t)(val2); result = (int)idmef_value_set_int64(arg1,arg2); { ST(argvi) = newSViv(result); argvi++; } XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_value_set_uint64) { { idmef_value_t *arg1 = (idmef_value_t *) 0 ; uint64_t arg2 ; unsigned long long val2 ; int ecode2 = 0 ; int argvi = 0; int result; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: idmef_value_set_uint64(value,val);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_value, 0) ) { croak("Expected type idmef_value_t * for argument 1."); return; } } ecode2 = SWIG_AsVal_unsigned_SS_long_SS_long SWIG_PERL_CALL_ARGS_2(ST(1), &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "idmef_value_set_uint64" "', argument " "2"" of type '" "uint64_t""'"); } arg2 = (uint64_t)(val2); result = (int)idmef_value_set_uint64(arg1,arg2); { ST(argvi) = newSViv(result); argvi++; } XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_value_set_float) { { idmef_value_t *arg1 = (idmef_value_t *) 0 ; float arg2 ; float val2 ; int ecode2 = 0 ; int argvi = 0; int result; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: idmef_value_set_float(value,val);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_value, 0) ) { croak("Expected type idmef_value_t * for argument 1."); return; } } ecode2 = SWIG_AsVal_float SWIG_PERL_CALL_ARGS_2(ST(1), &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "idmef_value_set_float" "', argument " "2"" of type '" "float""'"); } arg2 = (float)(val2); result = (int)idmef_value_set_float(arg1,arg2); { ST(argvi) = newSViv(result); argvi++; } XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_value_set_double) { { idmef_value_t *arg1 = (idmef_value_t *) 0 ; double arg2 ; double val2 ; int ecode2 = 0 ; int argvi = 0; int result; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: idmef_value_set_double(value,val);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_value, 0) ) { croak("Expected type idmef_value_t * for argument 1."); return; } } ecode2 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "idmef_value_set_double" "', argument " "2"" of type '" "double""'"); } arg2 = (double)(val2); result = (int)idmef_value_set_double(arg1,arg2); { ST(argvi) = newSViv(result); argvi++; } XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_value_set_string) { { idmef_value_t *arg1 = (idmef_value_t *) 0 ; prelude_string_t *arg2 = (prelude_string_t *) 0 ; int argvi = 0; int result; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: idmef_value_set_string(value,string);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_value, 0) ) { croak("Expected type idmef_value_t * for argument 1."); return; } } { int ret; char *str; STRLEN len; str = SvPV(ST(1), len); ret = prelude_string_new_dup_fast(&(arg2), str, len); if ( ret < 0 ) { swig_perl_raise_error(ret); return; } } result = (int)idmef_value_set_string(arg1,arg2); { ST(argvi) = newSViv(result); argvi++; } XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_value_set_time) { { idmef_value_t *arg1 = (idmef_value_t *) 0 ; idmef_time_t *arg2 = (idmef_time_t *) 0 ; int argvi = 0; int result; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: idmef_value_set_time(value,time);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_value, 0) ) { croak("Expected type idmef_value_t * for argument 1."); return; } } { if ( ! SvROK(ST(1)) ) { croak("Argument 2 is null."); return; } if ( SWIG_ConvertPtr(ST(1), (void **)&arg2, SWIGTYPE_p_idmef_time, 0) ) { croak("Expected type idmef_time_t * for argument 2."); return; } } result = (int)idmef_value_set_time(arg1,arg2); { ST(argvi) = newSViv(result); argvi++; } XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_value_set_data) { { idmef_value_t *arg1 = (idmef_value_t *) 0 ; idmef_data_t *arg2 = (idmef_data_t *) 0 ; int argvi = 0; int result; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: idmef_value_set_data(value,data);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_value, 0) ) { croak("Expected type idmef_value_t * for argument 1."); return; } } { if ( ! SvROK(ST(1)) ) { croak("Argument 2 is null."); return; } if ( SWIG_ConvertPtr(ST(1), (void **)&arg2, SWIGTYPE_p_idmef_data_t, 0) ) { croak("Expected type idmef_data_t * for argument 2."); return; } } result = (int)idmef_value_set_data(arg1,arg2); { ST(argvi) = newSViv(result); argvi++; } XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_value_set_enum) { { idmef_value_t *arg1 = (idmef_value_t *) 0 ; idmef_class_id_t arg2 ; char *arg3 = (char *) 0 ; int val2 ; int ecode2 = 0 ; int res3 ; char *buf3 = 0 ; int alloc3 = 0 ; int argvi = 0; int result; dXSARGS; if ((items < 3) || (items > 3)) { SWIG_croak("Usage: idmef_value_set_enum(value,classid,buf);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_value, 0) ) { croak("Expected type idmef_value_t * for argument 1."); return; } } ecode2 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(1), &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "idmef_value_set_enum" "', argument " "2"" of type '" "idmef_class_id_t""'"); } arg2 = (idmef_class_id_t)(val2); res3 = SWIG_AsCharPtrAndSize(ST(2), &buf3, NULL, &alloc3); if (!SWIG_IsOK(res3)) { SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "idmef_value_set_enum" "', argument " "3"" of type '" "char const *""'"); } arg3 = (char *)(buf3); result = (int)idmef_value_set_enum(arg1,arg2,(char const *)arg3); { ST(argvi) = newSViv(result); argvi++; } if (alloc3 == SWIG_NEWOBJ) free((char*)buf3); XSRETURN(argvi); fail: if (alloc3 == SWIG_NEWOBJ) free((char*)buf3); SWIG_croak_null(); } } XS(_wrap_idmef_value_set_enum_from_string) { { idmef_value_t *arg1 = (idmef_value_t *) 0 ; idmef_class_id_t arg2 ; char *arg3 = (char *) 0 ; int val2 ; int ecode2 = 0 ; int res3 ; char *buf3 = 0 ; int alloc3 = 0 ; int argvi = 0; int result; dXSARGS; if ((items < 3) || (items > 3)) { SWIG_croak("Usage: idmef_value_set_enum_from_string(value,classid,buf);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_value, 0) ) { croak("Expected type idmef_value_t * for argument 1."); return; } } ecode2 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(1), &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "idmef_value_set_enum_from_string" "', argument " "2"" of type '" "idmef_class_id_t""'"); } arg2 = (idmef_class_id_t)(val2); res3 = SWIG_AsCharPtrAndSize(ST(2), &buf3, NULL, &alloc3); if (!SWIG_IsOK(res3)) { SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "idmef_value_set_enum_from_string" "', argument " "3"" of type '" "char const *""'"); } arg3 = (char *)(buf3); result = (int)idmef_value_set_enum_from_string(arg1,arg2,(char const *)arg3); { ST(argvi) = newSViv(result); argvi++; } if (alloc3 == SWIG_NEWOBJ) free((char*)buf3); XSRETURN(argvi); fail: if (alloc3 == SWIG_NEWOBJ) free((char*)buf3); SWIG_croak_null(); } } XS(_wrap_idmef_value_set_enum_from_numeric) { { idmef_value_t *arg1 = (idmef_value_t *) 0 ; idmef_class_id_t arg2 ; int arg3 ; int val2 ; int ecode2 = 0 ; int val3 ; int ecode3 = 0 ; int argvi = 0; int result; dXSARGS; if ((items < 3) || (items > 3)) { SWIG_croak("Usage: idmef_value_set_enum_from_numeric(value,classid,no);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_value, 0) ) { croak("Expected type idmef_value_t * for argument 1."); return; } } ecode2 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(1), &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "idmef_value_set_enum_from_numeric" "', argument " "2"" of type '" "idmef_class_id_t""'"); } arg2 = (idmef_class_id_t)(val2); ecode3 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(2), &val3); if (!SWIG_IsOK(ecode3)) { SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "idmef_value_set_enum_from_numeric" "', argument " "3"" of type '" "int""'"); } arg3 = (int)(val3); result = (int)idmef_value_set_enum_from_numeric(arg1,arg2,arg3); { ST(argvi) = newSViv(result); argvi++; } XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_value_set_class) { { idmef_value_t *arg1 = (idmef_value_t *) 0 ; idmef_class_id_t arg2 ; void *arg3 = (void *) 0 ; int val2 ; int ecode2 = 0 ; int res3 ; int argvi = 0; int result; dXSARGS; if ((items < 3) || (items > 3)) { SWIG_croak("Usage: idmef_value_set_class(value,classid,ptr);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_value, 0) ) { croak("Expected type idmef_value_t * for argument 1."); return; } } ecode2 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(1), &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "idmef_value_set_class" "', argument " "2"" of type '" "idmef_class_id_t""'"); } arg2 = (idmef_class_id_t)(val2); res3 = SWIG_ConvertPtr(ST(2),SWIG_as_voidptrptr(&arg3), 0, 0); if (!SWIG_IsOK(res3)) { SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "idmef_value_set_class" "', argument " "3"" of type '" "void *""'"); } result = (int)idmef_value_set_class(arg1,arg2,arg3); { ST(argvi) = newSViv(result); argvi++; } XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_value_new) { { idmef_value_t **arg1 = (idmef_value_t **) 0 ; idmef_value_type_id_t arg2 ; void *arg3 = (void *) 0 ; idmef_value_t *tmp1 ; int val2 ; int ecode2 = 0 ; int res3 ; int argvi = 0; SV * _saved[1] ; int result; dXSARGS; if ((items < 3) || (items > 3)) { SWIG_croak("Usage: idmef_value_new(value,type,ptr);"); } { arg1 = (idmef_value_t **) &tmp1; } ecode2 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(1), &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "idmef_value_new" "', argument " "2"" of type '" "idmef_value_type_id_t""'"); } arg2 = (idmef_value_type_id_t)(val2); res3 = SWIG_ConvertPtr(ST(2),SWIG_as_voidptrptr(&arg3), 0, 0); if (!SWIG_IsOK(res3)) { SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "idmef_value_new" "', argument " "3"" of type '" "void *""'"); } _saved[0] = ST(0); result = (int)idmef_value_new(arg1,arg2,arg3); { ST(argvi) = newSViv(result); argvi++; } { SV *sv; if ( result >= 0 ) { if ( ! SvROK(_saved[0]) ) { croak("Argument 1 is not a reference."); return; } sv = SvRV(_saved[0]); sv_setsv(sv, SWIG_NewPointerObj((void *) * arg1, SWIGTYPE_p_idmef_value, 0)); } } XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_value_new_from_path) { { idmef_value_t **arg1 = (idmef_value_t **) 0 ; idmef_path_t *arg2 = (idmef_path_t *) 0 ; char *arg3 = (char *) 0 ; idmef_value_t *tmp1 ; int res3 ; char *buf3 = 0 ; int alloc3 = 0 ; int argvi = 0; SV * _saved[1] ; int result; dXSARGS; if ((items < 3) || (items > 3)) { SWIG_croak("Usage: idmef_value_new_from_path(value,path,buf);"); } { arg1 = (idmef_value_t **) &tmp1; } { if ( ! SvROK(ST(1)) ) { croak("Argument 2 is null."); return; } if ( SWIG_ConvertPtr(ST(1), (void **)&arg2, SWIGTYPE_p_idmef_path, 0) ) { croak("Expected type idmef_path_t * for argument 2."); return; } } res3 = SWIG_AsCharPtrAndSize(ST(2), &buf3, NULL, &alloc3); if (!SWIG_IsOK(res3)) { SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "idmef_value_new_from_path" "', argument " "3"" of type '" "char const *""'"); } arg3 = (char *)(buf3); _saved[0] = ST(0); result = (int)idmef_value_new_from_path(arg1,arg2,(char const *)arg3); { ST(argvi) = newSViv(result); argvi++; } { SV *sv; if ( result >= 0 ) { if ( ! SvROK(_saved[0]) ) { croak("Argument 1 is not a reference."); return; } sv = SvRV(_saved[0]); sv_setsv(sv, SWIG_NewPointerObj((void *) * arg1, SWIGTYPE_p_idmef_value, 0)); } } if (alloc3 == SWIG_NEWOBJ) free((char*)buf3); XSRETURN(argvi); fail: if (alloc3 == SWIG_NEWOBJ) free((char*)buf3); SWIG_croak_null(); } } XS(_wrap_idmef_value_new_from_string) { { idmef_value_t **arg1 = (idmef_value_t **) 0 ; idmef_value_type_id_t arg2 ; char *arg3 = (char *) 0 ; idmef_value_t *tmp1 ; int val2 ; int ecode2 = 0 ; int res3 ; char *buf3 = 0 ; int alloc3 = 0 ; int argvi = 0; SV * _saved[1] ; int result; dXSARGS; if ((items < 3) || (items > 3)) { SWIG_croak("Usage: idmef_value_new_from_string(value,type,buf);"); } { arg1 = (idmef_value_t **) &tmp1; } ecode2 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(1), &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "idmef_value_new_from_string" "', argument " "2"" of type '" "idmef_value_type_id_t""'"); } arg2 = (idmef_value_type_id_t)(val2); res3 = SWIG_AsCharPtrAndSize(ST(2), &buf3, NULL, &alloc3); if (!SWIG_IsOK(res3)) { SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "idmef_value_new_from_string" "', argument " "3"" of type '" "char const *""'"); } arg3 = (char *)(buf3); _saved[0] = ST(0); result = (int)idmef_value_new_from_string(arg1,arg2,(char const *)arg3); { ST(argvi) = newSViv(result); argvi++; } { SV *sv; if ( result >= 0 ) { if ( ! SvROK(_saved[0]) ) { croak("Argument 1 is not a reference."); return; } sv = SvRV(_saved[0]); sv_setsv(sv, SWIG_NewPointerObj((void *) * arg1, SWIGTYPE_p_idmef_value, 0)); } } if (alloc3 == SWIG_NEWOBJ) free((char*)buf3); XSRETURN(argvi); fail: if (alloc3 == SWIG_NEWOBJ) free((char*)buf3); SWIG_croak_null(); } } XS(_wrap_idmef_value_get_int8) { { idmef_value_t *arg1 = (idmef_value_t *) 0 ; int argvi = 0; int8_t result; dXSARGS; if ((items < 1) || (items > 1)) { SWIG_croak("Usage: idmef_value_get_int8(val);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_value, 0) ) { croak("Expected type idmef_value_t const * for argument 1."); return; } } result = (int8_t)idmef_value_get_int8((struct idmef_value const *)arg1); ST(argvi) = SWIG_From_char SWIG_PERL_CALL_ARGS_1((char)(result)); argvi++ ; XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_value_get_uint8) { { idmef_value_t *arg1 = (idmef_value_t *) 0 ; int argvi = 0; uint8_t result; dXSARGS; if ((items < 1) || (items > 1)) { SWIG_croak("Usage: idmef_value_get_uint8(val);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_value, 0) ) { croak("Expected type idmef_value_t const * for argument 1."); return; } } result = (uint8_t)idmef_value_get_uint8((struct idmef_value const *)arg1); ST(argvi) = SWIG_From_unsigned_SS_char SWIG_PERL_CALL_ARGS_1((unsigned char)(result)); argvi++ ; XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_value_get_int16) { { idmef_value_t *arg1 = (idmef_value_t *) 0 ; int argvi = 0; int16_t result; dXSARGS; if ((items < 1) || (items > 1)) { SWIG_croak("Usage: idmef_value_get_int16(val);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_value, 0) ) { croak("Expected type idmef_value_t const * for argument 1."); return; } } result = (int16_t)idmef_value_get_int16((struct idmef_value const *)arg1); ST(argvi) = SWIG_From_short SWIG_PERL_CALL_ARGS_1((short)(result)); argvi++ ; XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_value_get_uint16) { { idmef_value_t *arg1 = (idmef_value_t *) 0 ; int argvi = 0; uint16_t result; dXSARGS; if ((items < 1) || (items > 1)) { SWIG_croak("Usage: idmef_value_get_uint16(val);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_value, 0) ) { croak("Expected type idmef_value_t const * for argument 1."); return; } } result = (uint16_t)idmef_value_get_uint16((struct idmef_value const *)arg1); ST(argvi) = SWIG_From_unsigned_SS_short SWIG_PERL_CALL_ARGS_1((unsigned short)(result)); argvi++ ; XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_value_get_int32) { { idmef_value_t *arg1 = (idmef_value_t *) 0 ; int argvi = 0; int32_t result; dXSARGS; if ((items < 1) || (items > 1)) { SWIG_croak("Usage: idmef_value_get_int32(val);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_value, 0) ) { croak("Expected type idmef_value_t const * for argument 1."); return; } } result = (int32_t)idmef_value_get_int32((struct idmef_value const *)arg1); { ST(argvi) = newSViv(result); argvi++; } XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_value_get_uint32) { { idmef_value_t *arg1 = (idmef_value_t *) 0 ; int argvi = 0; uint32_t result; dXSARGS; if ((items < 1) || (items > 1)) { SWIG_croak("Usage: idmef_value_get_uint32(val);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_value, 0) ) { croak("Expected type idmef_value_t const * for argument 1."); return; } } result = (uint32_t)idmef_value_get_uint32((struct idmef_value const *)arg1); ST(argvi) = SWIG_From_unsigned_SS_int SWIG_PERL_CALL_ARGS_1((unsigned int)(result)); argvi++ ; XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_value_get_int64) { { idmef_value_t *arg1 = (idmef_value_t *) 0 ; int argvi = 0; int64_t result; dXSARGS; if ((items < 1) || (items > 1)) { SWIG_croak("Usage: idmef_value_get_int64(val);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_value, 0) ) { croak("Expected type idmef_value_t const * for argument 1."); return; } } result = (int64_t)idmef_value_get_int64((struct idmef_value const *)arg1); ST(argvi) = SWIG_From_long_SS_long SWIG_PERL_CALL_ARGS_1((long long)(result)); argvi++ ; XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_value_get_uint64) { { idmef_value_t *arg1 = (idmef_value_t *) 0 ; int argvi = 0; uint64_t result; dXSARGS; if ((items < 1) || (items > 1)) { SWIG_croak("Usage: idmef_value_get_uint64(val);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_value, 0) ) { croak("Expected type idmef_value_t const * for argument 1."); return; } } result = (uint64_t)idmef_value_get_uint64((struct idmef_value const *)arg1); ST(argvi) = SWIG_From_unsigned_SS_long_SS_long SWIG_PERL_CALL_ARGS_1((unsigned long long)(result)); argvi++ ; XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_value_get_enum) { { idmef_value_t *arg1 = (idmef_value_t *) 0 ; int argvi = 0; int result; dXSARGS; if ((items < 1) || (items > 1)) { SWIG_croak("Usage: idmef_value_get_enum(val);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_value, 0) ) { croak("Expected type idmef_value_t const * for argument 1."); return; } } result = (int)idmef_value_get_enum((struct idmef_value const *)arg1); { ST(argvi) = newSViv(result); argvi++; } XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_value_get_float) { { idmef_value_t *arg1 = (idmef_value_t *) 0 ; int argvi = 0; float result; dXSARGS; if ((items < 1) || (items > 1)) { SWIG_croak("Usage: idmef_value_get_float(val);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_value, 0) ) { croak("Expected type idmef_value_t const * for argument 1."); return; } } result = (float)idmef_value_get_float((struct idmef_value const *)arg1); ST(argvi) = SWIG_From_float SWIG_PERL_CALL_ARGS_1((float)(result)); argvi++ ; XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_value_get_double) { { idmef_value_t *arg1 = (idmef_value_t *) 0 ; int argvi = 0; double result; dXSARGS; if ((items < 1) || (items > 1)) { SWIG_croak("Usage: idmef_value_get_double(val);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_value, 0) ) { croak("Expected type idmef_value_t const * for argument 1."); return; } } result = (double)idmef_value_get_double((struct idmef_value const *)arg1); ST(argvi) = SWIG_From_double SWIG_PERL_CALL_ARGS_1((double)(result)); argvi++ ; XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_value_get_time) { { idmef_value_t *arg1 = (idmef_value_t *) 0 ; int argvi = 0; idmef_time_t *result = 0 ; dXSARGS; if ((items < 1) || (items > 1)) { SWIG_croak("Usage: idmef_value_get_time(val);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_value, 0) ) { croak("Expected type idmef_value_t const * for argument 1."); return; } } result = (idmef_time_t *)idmef_value_get_time((struct idmef_value const *)arg1); ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_idmef_time, 0 | SWIG_SHADOW); argvi++ ; XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_value_get_data) { { idmef_value_t *arg1 = (idmef_value_t *) 0 ; int argvi = 0; idmef_data_t *result = 0 ; dXSARGS; if ((items < 1) || (items > 1)) { SWIG_croak("Usage: idmef_value_get_data(val);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_value, 0) ) { croak("Expected type idmef_value_t const * for argument 1."); return; } } result = (idmef_data_t *)idmef_value_get_data((struct idmef_value const *)arg1); { ST(argvi) = swig_perl_data(result); argvi++; } XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_value_get_string) { { idmef_value_t *arg1 = (idmef_value_t *) 0 ; int argvi = 0; prelude_string_t *result = 0 ; dXSARGS; if ((items < 1) || (items > 1)) { SWIG_croak("Usage: idmef_value_get_string(val);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_value, 0) ) { croak("Expected type idmef_value_t const * for argument 1."); return; } } result = (prelude_string_t *)idmef_value_get_string((struct idmef_value const *)arg1); { ST(argvi) = swig_perl_string(result); argvi++; } XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_value_list_add) { { idmef_value_t *arg1 = (idmef_value_t *) 0 ; idmef_value_t *arg2 = (idmef_value_t *) 0 ; int argvi = 0; int result; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: idmef_value_list_add(list,item);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_value, 0) ) { croak("Expected type idmef_value_t * for argument 1."); return; } } { if ( ! SvROK(ST(1)) ) { croak("Argument 2 is null."); return; } if ( SWIG_ConvertPtr(ST(1), (void **)&arg2, SWIGTYPE_p_idmef_value, 0) ) { croak("Expected type idmef_value_t * for argument 2."); return; } } result = (int)idmef_value_list_add(arg1,arg2); { ST(argvi) = newSViv(result); argvi++; } XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_value_is_list) { { idmef_value_t *arg1 = (idmef_value_t *) 0 ; int argvi = 0; prelude_bool_t result; dXSARGS; if ((items < 1) || (items > 1)) { SWIG_croak("Usage: idmef_value_is_list(list);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_value, 0) ) { croak("Expected type idmef_value_t const * for argument 1."); return; } } result = (prelude_bool_t)idmef_value_is_list((struct idmef_value const *)arg1); ST(argvi) = SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(result)); argvi++ ; XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_value_list_is_empty) { { idmef_value_t *arg1 = (idmef_value_t *) 0 ; int argvi = 0; prelude_bool_t result; dXSARGS; if ((items < 1) || (items > 1)) { SWIG_croak("Usage: idmef_value_list_is_empty(list);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_value, 0) ) { croak("Expected type idmef_value_t const * for argument 1."); return; } } result = (prelude_bool_t)idmef_value_list_is_empty((struct idmef_value const *)arg1); ST(argvi) = SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(result)); argvi++ ; XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_value_have_own_data) { { idmef_value_t *arg1 = (idmef_value_t *) 0 ; int argvi = 0; int result; dXSARGS; if ((items < 1) || (items > 1)) { SWIG_croak("Usage: idmef_value_have_own_data(value);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_value, 0) ) { croak("Expected type idmef_value_t * for argument 1."); return; } } result = (int)idmef_value_have_own_data(arg1); { ST(argvi) = newSViv(result); argvi++; } XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_value_dont_have_own_data) { { idmef_value_t *arg1 = (idmef_value_t *) 0 ; int argvi = 0; int result; dXSARGS; if ((items < 1) || (items > 1)) { SWIG_croak("Usage: idmef_value_dont_have_own_data(value);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_value, 0) ) { croak("Expected type idmef_value_t * for argument 1."); return; } } result = (int)idmef_value_dont_have_own_data(arg1); { ST(argvi) = newSViv(result); argvi++; } XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_value_get_type) { { idmef_value_t *arg1 = (idmef_value_t *) 0 ; int argvi = 0; idmef_value_type_id_t result; dXSARGS; if ((items < 1) || (items > 1)) { SWIG_croak("Usage: idmef_value_get_type(value);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_value, 0) ) { croak("Expected type idmef_value_t const * for argument 1."); return; } } result = (idmef_value_type_id_t)idmef_value_get_type((struct idmef_value const *)arg1); ST(argvi) = SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(result)); argvi++ ; XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_value_get_class) { { idmef_value_t *arg1 = (idmef_value_t *) 0 ; int argvi = 0; idmef_class_id_t result; dXSARGS; if ((items < 1) || (items > 1)) { SWIG_croak("Usage: idmef_value_get_class(value);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_value, 0) ) { croak("Expected type idmef_value_t const * for argument 1."); return; } } result = (idmef_class_id_t)idmef_value_get_class((struct idmef_value const *)arg1); { ST(argvi) = newSViv(result); argvi++; } XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_value_get_object) { { idmef_value_t *arg1 = (idmef_value_t *) 0 ; int argvi = 0; void *result = 0 ; dXSARGS; if ((items < 1) || (items > 1)) { SWIG_croak("Usage: idmef_value_get_object(value);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_value, 0) ) { croak("Expected type idmef_value_t const * for argument 1."); return; } } result = (void *)idmef_value_get_object((struct idmef_value const *)arg1); { void *swig_type; swig_type = swig_idmef_value_get_descriptor(arg1); if ( ! swig_type ) { SvREFCNT_inc (& PL_sv_undef); ST(argvi) = &PL_sv_undef; } else { ST(argvi) = SWIG_NewPointerObj(result, swig_type, 0); } argvi++; } XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_value_iterate) { { idmef_value_t *arg1 = (idmef_value_t *) 0 ; int (*arg2)(idmef_value_t *,void *) = (int (*)(idmef_value_t *,void *)) 0 ; void *arg3 = (void *) 0 ; int res3 ; int argvi = 0; int result; dXSARGS; if ((items < 3) || (items > 3)) { SWIG_croak("Usage: idmef_value_iterate(value,callback,extra);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_value, 0) ) { croak("Expected type idmef_value_t const * for argument 1."); return; } } { int res = SWIG_ConvertFunctionPtr(ST(1), (void**)(&arg2), SWIGTYPE_p_f_p_struct_idmef_value_p_void__int); if (!SWIG_IsOK(res)) { SWIG_exception_fail(SWIG_ArgError(res), "in method '" "idmef_value_iterate" "', argument " "2"" of type '" "int (*)(idmef_value_t *,void *)""'"); } } res3 = SWIG_ConvertPtr(ST(2),SWIG_as_voidptrptr(&arg3), 0, 0); if (!SWIG_IsOK(res3)) { SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "idmef_value_iterate" "', argument " "3"" of type '" "void *""'"); } result = (int)idmef_value_iterate((struct idmef_value const *)arg1,arg2,arg3); { ST(argvi) = newSViv(result); argvi++; } XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_value_iterate_reversed) { { idmef_value_t *arg1 = (idmef_value_t *) 0 ; int (*arg2)(idmef_value_t *,void *) = (int (*)(idmef_value_t *,void *)) 0 ; void *arg3 = (void *) 0 ; int res3 ; int argvi = 0; int result; dXSARGS; if ((items < 3) || (items > 3)) { SWIG_croak("Usage: idmef_value_iterate_reversed(value,callback,extra);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_value, 0) ) { croak("Expected type idmef_value_t const * for argument 1."); return; } } { int res = SWIG_ConvertFunctionPtr(ST(1), (void**)(&arg2), SWIGTYPE_p_f_p_struct_idmef_value_p_void__int); if (!SWIG_IsOK(res)) { SWIG_exception_fail(SWIG_ArgError(res), "in method '" "idmef_value_iterate_reversed" "', argument " "2"" of type '" "int (*)(idmef_value_t *,void *)""'"); } } res3 = SWIG_ConvertPtr(ST(2),SWIG_as_voidptrptr(&arg3), 0, 0); if (!SWIG_IsOK(res3)) { SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "idmef_value_iterate_reversed" "', argument " "3"" of type '" "void *""'"); } result = (int)idmef_value_iterate_reversed((struct idmef_value const *)arg1,arg2,arg3); { ST(argvi) = newSViv(result); argvi++; } XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_value_get_nth) { { idmef_value_t *arg1 = (idmef_value_t *) 0 ; int arg2 ; int val2 ; int ecode2 = 0 ; int argvi = 0; idmef_value_t *result = 0 ; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: idmef_value_get_nth(val,n);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_value, 0) ) { croak("Expected type idmef_value_t const * for argument 1."); return; } } ecode2 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(1), &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "idmef_value_get_nth" "', argument " "2"" of type '" "int""'"); } arg2 = (int)(val2); result = (idmef_value_t *)idmef_value_get_nth((struct idmef_value const *)arg1,arg2); ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_idmef_value, 0 | 0); argvi++ ; XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_value_get_count) { { idmef_value_t *arg1 = (idmef_value_t *) 0 ; int argvi = 0; int result; dXSARGS; if ((items < 1) || (items > 1)) { SWIG_croak("Usage: idmef_value_get_count(val);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_value, 0) ) { croak("Expected type idmef_value_t const * for argument 1."); return; } } result = (int)idmef_value_get_count((struct idmef_value const *)arg1); { ST(argvi) = newSViv(result); argvi++; } XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_value_clone) { { idmef_value_t *arg1 = (idmef_value_t *) 0 ; idmef_value_t **arg2 = (idmef_value_t **) 0 ; idmef_value_t *tmp2 ; int argvi = 0; SV * _saved[1] ; int result; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: idmef_value_clone(val,dst);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_value, 0) ) { croak("Expected type idmef_value_t const * for argument 1."); return; } } { arg2 = (idmef_value_t **) &tmp2; } _saved[0] = ST(1); result = (int)idmef_value_clone((struct idmef_value const *)arg1,arg2); { ST(argvi) = newSViv(result); argvi++; } { SV *sv; if ( result >= 0 ) { if ( ! SvROK(_saved[0]) ) { croak("Argument 2 is not a reference."); return; } sv = SvRV(_saved[0]); sv_setsv(sv, SWIG_NewPointerObj((void *) * arg2, SWIGTYPE_p_idmef_value, 0)); } } XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_value_ref) { { idmef_value_t *arg1 = (idmef_value_t *) 0 ; int argvi = 0; idmef_value_t *result = 0 ; dXSARGS; if ((items < 1) || (items > 1)) { SWIG_croak("Usage: idmef_value_ref(val);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_value, 0) ) { croak("Expected type idmef_value_t * for argument 1."); return; } } result = (idmef_value_t *)idmef_value_ref(arg1); ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_idmef_value, 0 | 0); argvi++ ; XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_value_print) { { idmef_value_t *arg1 = (idmef_value_t *) 0 ; prelude_io_t *arg2 = (prelude_io_t *) 0 ; void *argp2 = 0 ; int res2 = 0 ; int argvi = 0; int result; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: idmef_value_print(val,fd);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_value, 0) ) { croak("Expected type idmef_value_t const * for argument 1."); return; } } res2 = SWIG_ConvertPtr(ST(1), &argp2,SWIGTYPE_p_prelude_io_t, 0 | 0 ); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "idmef_value_print" "', argument " "2"" of type '" "prelude_io_t *""'"); } arg2 = (prelude_io_t *)(argp2); result = (int)idmef_value_print((struct idmef_value const *)arg1,arg2); { ST(argvi) = newSViv(result); argvi++; } XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_value_to_string) { { idmef_value_t *arg1 = (idmef_value_t *) 0 ; prelude_string_t *arg2 = (prelude_string_t *) 0 ; int argvi = 0; int result; dXSARGS; { int ret; ret = prelude_string_new(&(arg2)); if ( ret < 0 ) { swig_perl_raise_error(ret); return; } } if ((items < 1) || (items > 1)) { SWIG_croak("Usage: idmef_value_to_string(val);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_value, 0) ) { croak("Expected type idmef_value_t const * for argument 1."); return; } } result = (int)idmef_value_to_string((struct idmef_value const *)arg1,arg2); { ST(argvi) = newSViv(result); argvi++; } { if ( result >= 0 ) { ST(argvi) = newSVpv(prelude_string_get_string(arg2), prelude_string_get_len(arg2)); argvi++; } prelude_string_destroy(arg2); } XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_value_get) { { idmef_value_t *arg1 = (idmef_value_t *) 0 ; void *arg2 = (void *) 0 ; int res2 ; int argvi = 0; int result; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: idmef_value_get(val,res);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_value, 0) ) { croak("Expected type idmef_value_t const * for argument 1."); return; } } res2 = SWIG_ConvertPtr(ST(1),SWIG_as_voidptrptr(&arg2), 0, 0); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "idmef_value_get" "', argument " "2"" of type '" "void *""'"); } result = (int)idmef_value_get((struct idmef_value const *)arg1,arg2); { ST(argvi) = newSViv(result); argvi++; } XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_value_match) { { idmef_value_t *arg1 = (idmef_value_t *) 0 ; idmef_value_t *arg2 = (idmef_value_t *) 0 ; idmef_criterion_operator_t arg3 ; int val3 ; int ecode3 = 0 ; int argvi = 0; int result; dXSARGS; if ((items < 3) || (items > 3)) { SWIG_croak("Usage: idmef_value_match(val1,val2,op);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_value, 0) ) { croak("Expected type idmef_value_t * for argument 1."); return; } } { if ( ! SvROK(ST(1)) ) { croak("Argument 2 is null."); return; } if ( SWIG_ConvertPtr(ST(1), (void **)&arg2, SWIGTYPE_p_idmef_value, 0) ) { croak("Expected type idmef_value_t * for argument 2."); return; } } ecode3 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(2), &val3); if (!SWIG_IsOK(ecode3)) { SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "idmef_value_match" "', argument " "3"" of type '" "idmef_criterion_operator_t""'"); } arg3 = (idmef_criterion_operator_t)(val3); result = (int)idmef_value_match(arg1,arg2,arg3); { ST(argvi) = newSViv(result); argvi++; } XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_value_check_operator) { { idmef_value_t *arg1 = (idmef_value_t *) 0 ; idmef_criterion_operator_t arg2 ; int val2 ; int ecode2 = 0 ; int argvi = 0; int result; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: idmef_value_check_operator(value,op);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_value, 0) ) { croak("Expected type idmef_value_t const * for argument 1."); return; } } ecode2 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(1), &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "idmef_value_check_operator" "', argument " "2"" of type '" "idmef_criterion_operator_t""'"); } arg2 = (idmef_criterion_operator_t)(val2); result = (int)idmef_value_check_operator((struct idmef_value const *)arg1,arg2); { ST(argvi) = newSViv(result); argvi++; } XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_value_get_applicable_operators) { { idmef_value_t *arg1 = (idmef_value_t *) 0 ; idmef_criterion_operator_t *arg2 = (idmef_criterion_operator_t *) 0 ; void *argp2 = 0 ; int res2 = 0 ; int argvi = 0; int result; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: idmef_value_get_applicable_operators(value,result);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_value, 0) ) { croak("Expected type idmef_value_t const * for argument 1."); return; } } res2 = SWIG_ConvertPtr(ST(1), &argp2,SWIGTYPE_p_idmef_criterion_operator_t, 0 | 0 ); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "idmef_value_get_applicable_operators" "', argument " "2"" of type '" "idmef_criterion_operator_t *""'"); } arg2 = (idmef_criterion_operator_t *)(argp2); result = (int)idmef_value_get_applicable_operators((struct idmef_value const *)arg1,arg2); { ST(argvi) = newSViv(result); argvi++; } XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_value_destroy) { { idmef_value_t *arg1 = (idmef_value_t *) 0 ; int argvi = 0; dXSARGS; if ((items < 1) || (items > 1)) { SWIG_croak("Usage: idmef_value_destroy(val);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_value, 0) ) { croak("Expected type idmef_value_t * for argument 1."); return; } } idmef_value_destroy(arg1); ST(argvi) = sv_newmortal(); XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_path_get) { { idmef_path_t *arg1 = (idmef_path_t *) 0 ; idmef_message_t *arg2 = (idmef_message_t *) 0 ; idmef_value_t **arg3 = (idmef_value_t **) 0 ; idmef_value_t *tmp3 ; int argvi = 0; SV * _saved[1] ; int result; dXSARGS; if ((items < 3) || (items > 3)) { SWIG_croak("Usage: idmef_path_get(path,message,ret);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_path, 0) ) { croak("Expected type idmef_path_t const * for argument 1."); return; } } { if ( ! SvROK(ST(1)) ) { croak("Argument 2 is null."); return; } if ( SWIG_ConvertPtr(ST(1), (void **)&arg2, SWIGTYPE_p_idmef_message, 0) ) { croak("Expected type idmef_message_t * for argument 2."); return; } } { arg3 = (idmef_value_t **) &tmp3; } _saved[0] = ST(2); result = (int)idmef_path_get((struct idmef_path const *)arg1,arg2,arg3); { ST(argvi) = newSViv(result); argvi++; } { if ( ! SvROK(_saved[0]) ) { croak("Argument 3 is not a reference."); return; } if ( result == 0 ) { SvREFCNT_inc (& PL_sv_undef); ST(argvi) = &PL_sv_undef; } else if ( result > 0 ) { SV *sv; sv = SvRV(_saved[0]); sv_setsv(sv, SWIG_NewPointerObj((void *) * arg3, SWIGTYPE_p_idmef_value, 0)); } } XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_path_set) { { idmef_path_t *arg1 = (idmef_path_t *) 0 ; idmef_message_t *arg2 = (idmef_message_t *) 0 ; idmef_value_t *arg3 = (idmef_value_t *) 0 ; int argvi = 0; int result; dXSARGS; if ((items < 3) || (items > 3)) { SWIG_croak("Usage: idmef_path_set(path,message,value);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_path, 0) ) { croak("Expected type idmef_path_t const * for argument 1."); return; } } { if ( ! SvROK(ST(1)) ) { croak("Argument 2 is null."); return; } if ( SWIG_ConvertPtr(ST(1), (void **)&arg2, SWIGTYPE_p_idmef_message, 0) ) { croak("Expected type idmef_message_t * for argument 2."); return; } } { if ( ! SvROK(ST(2)) ) { croak("Argument 3 is null."); return; } if ( SWIG_ConvertPtr(ST(2), (void **)&arg3, SWIGTYPE_p_idmef_value, 0) ) { croak("Expected type idmef_value_t * for argument 3."); return; } } result = (int)idmef_path_set((struct idmef_path const *)arg1,arg2,arg3); { ST(argvi) = newSViv(result); argvi++; } XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_path_new) { { idmef_path_t **arg1 = (idmef_path_t **) 0 ; char *arg2 = (char *) 0 ; void *arg3 = 0 ; idmef_path_t *tmp1 ; int res2 ; char *buf2 = 0 ; int alloc2 = 0 ; int argvi = 0; SV * _saved[1] ; int result; dXSARGS; if (items < 2) { SWIG_croak("Usage: idmef_path_new(path,format,...);"); } { arg1 = (idmef_path_t **) &tmp1; } res2 = SWIG_AsCharPtrAndSize(ST(1), &buf2, NULL, &alloc2); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "idmef_path_new" "', argument " "2"" of type '" "char const *""'"); } arg2 = (char *)(buf2); _saved[0] = ST(0); result = (int)idmef_path_new(arg1,(char const *)arg2,arg3); { ST(argvi) = newSViv(result); argvi++; } { SV *sv; if ( result >= 0 ) { if ( ! SvROK(_saved[0]) ) { croak("Argument 1 is not a reference."); return; } sv = SvRV(_saved[0]); sv_setsv(sv, SWIG_NewPointerObj((void *) * arg1, SWIGTYPE_p_idmef_path, 0)); } } if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); XSRETURN(argvi); fail: if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); SWIG_croak_null(); } } XS(_wrap_idmef_path_new_fast) { { idmef_path_t **arg1 = (idmef_path_t **) 0 ; char *arg2 = (char *) 0 ; idmef_path_t *tmp1 ; int res2 ; char *buf2 = 0 ; int alloc2 = 0 ; int argvi = 0; SV * _saved[1] ; int result; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: idmef_path_new_fast(path,buffer);"); } { arg1 = (idmef_path_t **) &tmp1; } res2 = SWIG_AsCharPtrAndSize(ST(1), &buf2, NULL, &alloc2); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "idmef_path_new_fast" "', argument " "2"" of type '" "char const *""'"); } arg2 = (char *)(buf2); _saved[0] = ST(0); result = (int)idmef_path_new_fast(arg1,(char const *)arg2); { ST(argvi) = newSViv(result); argvi++; } { SV *sv; if ( result >= 0 ) { if ( ! SvROK(_saved[0]) ) { croak("Argument 1 is not a reference."); return; } sv = SvRV(_saved[0]); sv_setsv(sv, SWIG_NewPointerObj((void *) * arg1, SWIGTYPE_p_idmef_path, 0)); } } if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); XSRETURN(argvi); fail: if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); SWIG_croak_null(); } } XS(_wrap_idmef_path_get_class) { { idmef_path_t *arg1 = (idmef_path_t *) 0 ; int arg2 ; int val2 ; int ecode2 = 0 ; int argvi = 0; idmef_class_id_t result; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: idmef_path_get_class(path,depth);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_path, 0) ) { croak("Expected type idmef_path_t const * for argument 1."); return; } } ecode2 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(1), &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "idmef_path_get_class" "', argument " "2"" of type '" "int""'"); } arg2 = (int)(val2); result = (idmef_class_id_t)idmef_path_get_class((struct idmef_path const *)arg1,arg2); { ST(argvi) = newSViv(result); argvi++; } XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_path_get_value_type) { { idmef_path_t *arg1 = (idmef_path_t *) 0 ; int arg2 ; int val2 ; int ecode2 = 0 ; int argvi = 0; idmef_value_type_id_t result; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: idmef_path_get_value_type(path,depth);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_path, 0) ) { croak("Expected type idmef_path_t const * for argument 1."); return; } } ecode2 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(1), &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "idmef_path_get_value_type" "', argument " "2"" of type '" "int""'"); } arg2 = (int)(val2); result = (idmef_value_type_id_t)idmef_path_get_value_type((struct idmef_path const *)arg1,arg2); ST(argvi) = SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(result)); argvi++ ; XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_path_set_index) { { idmef_path_t *arg1 = (idmef_path_t *) 0 ; unsigned int arg2 ; int arg3 ; unsigned int val2 ; int ecode2 = 0 ; int val3 ; int ecode3 = 0 ; int argvi = 0; int result; dXSARGS; if ((items < 3) || (items > 3)) { SWIG_croak("Usage: idmef_path_set_index(path,depth,index);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_path, 0) ) { croak("Expected type idmef_path_t * for argument 1."); return; } } ecode2 = SWIG_AsVal_unsigned_SS_int SWIG_PERL_CALL_ARGS_2(ST(1), &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "idmef_path_set_index" "', argument " "2"" of type '" "unsigned int""'"); } arg2 = (unsigned int)(val2); ecode3 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(2), &val3); if (!SWIG_IsOK(ecode3)) { SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "idmef_path_set_index" "', argument " "3"" of type '" "int""'"); } arg3 = (int)(val3); result = (int)idmef_path_set_index(arg1,arg2,arg3); { ST(argvi) = newSViv(result); argvi++; } XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_path_undefine_index) { { idmef_path_t *arg1 = (idmef_path_t *) 0 ; unsigned int arg2 ; unsigned int val2 ; int ecode2 = 0 ; int argvi = 0; int result; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: idmef_path_undefine_index(path,depth);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_path, 0) ) { croak("Expected type idmef_path_t * for argument 1."); return; } } ecode2 = SWIG_AsVal_unsigned_SS_int SWIG_PERL_CALL_ARGS_2(ST(1), &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "idmef_path_undefine_index" "', argument " "2"" of type '" "unsigned int""'"); } arg2 = (unsigned int)(val2); result = (int)idmef_path_undefine_index(arg1,arg2); { ST(argvi) = newSViv(result); argvi++; } XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_path_get_index) { { idmef_path_t *arg1 = (idmef_path_t *) 0 ; unsigned int arg2 ; unsigned int val2 ; int ecode2 = 0 ; int argvi = 0; int result; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: idmef_path_get_index(path,depth);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_path, 0) ) { croak("Expected type idmef_path_t const * for argument 1."); return; } } ecode2 = SWIG_AsVal_unsigned_SS_int SWIG_PERL_CALL_ARGS_2(ST(1), &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "idmef_path_get_index" "', argument " "2"" of type '" "unsigned int""'"); } arg2 = (unsigned int)(val2); result = (int)idmef_path_get_index((struct idmef_path const *)arg1,arg2); { ST(argvi) = newSViv(result); argvi++; } XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_path_make_child) { { idmef_path_t *arg1 = (idmef_path_t *) 0 ; char *arg2 = (char *) 0 ; int arg3 ; int res2 ; char *buf2 = 0 ; int alloc2 = 0 ; int val3 ; int ecode3 = 0 ; int argvi = 0; int result; dXSARGS; if ((items < 3) || (items > 3)) { SWIG_croak("Usage: idmef_path_make_child(path,child_name,index);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_path, 0) ) { croak("Expected type idmef_path_t * for argument 1."); return; } } res2 = SWIG_AsCharPtrAndSize(ST(1), &buf2, NULL, &alloc2); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "idmef_path_make_child" "', argument " "2"" of type '" "char const *""'"); } arg2 = (char *)(buf2); ecode3 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(2), &val3); if (!SWIG_IsOK(ecode3)) { SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "idmef_path_make_child" "', argument " "3"" of type '" "int""'"); } arg3 = (int)(val3); result = (int)idmef_path_make_child(arg1,(char const *)arg2,arg3); { ST(argvi) = newSViv(result); argvi++; } if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); XSRETURN(argvi); fail: if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); SWIG_croak_null(); } } XS(_wrap_idmef_path_make_parent) { { idmef_path_t *arg1 = (idmef_path_t *) 0 ; int argvi = 0; int result; dXSARGS; if ((items < 1) || (items > 1)) { SWIG_croak("Usage: idmef_path_make_parent(path);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_path, 0) ) { croak("Expected type idmef_path_t * for argument 1."); return; } } result = (int)idmef_path_make_parent(arg1); { ST(argvi) = newSViv(result); argvi++; } XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_path_destroy) { { idmef_path_t *arg1 = (idmef_path_t *) 0 ; int argvi = 0; dXSARGS; if ((items < 1) || (items > 1)) { SWIG_croak("Usage: idmef_path_destroy(path);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_path, 0) ) { croak("Expected type idmef_path_t * for argument 1."); return; } } idmef_path_destroy(arg1); ST(argvi) = sv_newmortal(); XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_path_ncompare) { { idmef_path_t *arg1 = (idmef_path_t *) 0 ; idmef_path_t *arg2 = (idmef_path_t *) 0 ; unsigned int arg3 ; unsigned int val3 ; int ecode3 = 0 ; int argvi = 0; int result; dXSARGS; if ((items < 3) || (items > 3)) { SWIG_croak("Usage: idmef_path_ncompare(p1,p2,depth);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_path, 0) ) { croak("Expected type idmef_path_t const * for argument 1."); return; } } { if ( ! SvROK(ST(1)) ) { croak("Argument 2 is null."); return; } if ( SWIG_ConvertPtr(ST(1), (void **)&arg2, SWIGTYPE_p_idmef_path, 0) ) { croak("Expected type idmef_path_t const * for argument 2."); return; } } ecode3 = SWIG_AsVal_unsigned_SS_int SWIG_PERL_CALL_ARGS_2(ST(2), &val3); if (!SWIG_IsOK(ecode3)) { SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "idmef_path_ncompare" "', argument " "3"" of type '" "unsigned int""'"); } arg3 = (unsigned int)(val3); result = (int)idmef_path_ncompare((struct idmef_path const *)arg1,(struct idmef_path const *)arg2,arg3); { ST(argvi) = newSViv(result); argvi++; } XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_path_compare) { { idmef_path_t *arg1 = (idmef_path_t *) 0 ; idmef_path_t *arg2 = (idmef_path_t *) 0 ; int argvi = 0; int result; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: idmef_path_compare(p1,p2);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_path, 0) ) { croak("Expected type idmef_path_t const * for argument 1."); return; } } { if ( ! SvROK(ST(1)) ) { croak("Argument 2 is null."); return; } if ( SWIG_ConvertPtr(ST(1), (void **)&arg2, SWIGTYPE_p_idmef_path, 0) ) { croak("Expected type idmef_path_t const * for argument 2."); return; } } result = (int)idmef_path_compare((struct idmef_path const *)arg1,(struct idmef_path const *)arg2); { ST(argvi) = newSViv(result); argvi++; } XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_path_clone) { { idmef_path_t *arg1 = (idmef_path_t *) 0 ; idmef_path_t **arg2 = (idmef_path_t **) 0 ; idmef_path_t *tmp2 ; int argvi = 0; SV * _saved[1] ; int result; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: idmef_path_clone(src,dst);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_path, 0) ) { croak("Expected type idmef_path_t const * for argument 1."); return; } } { arg2 = (idmef_path_t **) &tmp2; } _saved[0] = ST(1); result = (int)idmef_path_clone((struct idmef_path const *)arg1,arg2); { ST(argvi) = newSViv(result); argvi++; } { SV *sv; if ( result >= 0 ) { if ( ! SvROK(_saved[0]) ) { croak("Argument 2 is not a reference."); return; } sv = SvRV(_saved[0]); sv_setsv(sv, SWIG_NewPointerObj((void *) * arg2, SWIGTYPE_p_idmef_path, 0)); } } XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_path_ref) { { idmef_path_t *arg1 = (idmef_path_t *) 0 ; int argvi = 0; idmef_path_t *result = 0 ; dXSARGS; if ((items < 1) || (items > 1)) { SWIG_croak("Usage: idmef_path_ref(path);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_path, 0) ) { croak("Expected type idmef_path_t * for argument 1."); return; } } result = (idmef_path_t *)idmef_path_ref(arg1); ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_idmef_path, 0 | 0); argvi++ ; XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_path_get_name) { { idmef_path_t *arg1 = (idmef_path_t *) 0 ; int arg2 ; int val2 ; int ecode2 = 0 ; int argvi = 0; char *result = 0 ; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: idmef_path_get_name(path,depth);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_path, 0) ) { croak("Expected type idmef_path_t const * for argument 1."); return; } } ecode2 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(1), &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "idmef_path_get_name" "', argument " "2"" of type '" "int""'"); } arg2 = (int)(val2); result = (char *)idmef_path_get_name((struct idmef_path const *)arg1,arg2); ST(argvi) = SWIG_FromCharPtr((const char *)result); argvi++ ; XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_path_is_ambiguous) { { idmef_path_t *arg1 = (idmef_path_t *) 0 ; int argvi = 0; prelude_bool_t result; dXSARGS; if ((items < 1) || (items > 1)) { SWIG_croak("Usage: idmef_path_is_ambiguous(path);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_path, 0) ) { croak("Expected type idmef_path_t const * for argument 1."); return; } } result = (prelude_bool_t)idmef_path_is_ambiguous((struct idmef_path const *)arg1); ST(argvi) = SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(result)); argvi++ ; XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_path_has_lists) { { idmef_path_t *arg1 = (idmef_path_t *) 0 ; int argvi = 0; int result; dXSARGS; if ((items < 1) || (items > 1)) { SWIG_croak("Usage: idmef_path_has_lists(path);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_path, 0) ) { croak("Expected type idmef_path_t const * for argument 1."); return; } } result = (int)idmef_path_has_lists((struct idmef_path const *)arg1); { ST(argvi) = newSViv(result); argvi++; } XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_path_is_list) { { idmef_path_t *arg1 = (idmef_path_t *) 0 ; int arg2 ; int val2 ; int ecode2 = 0 ; int argvi = 0; prelude_bool_t result; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: idmef_path_is_list(path,depth);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_path, 0) ) { croak("Expected type idmef_path_t const * for argument 1."); return; } } ecode2 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(1), &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "idmef_path_is_list" "', argument " "2"" of type '" "int""'"); } arg2 = (int)(val2); result = (prelude_bool_t)idmef_path_is_list((struct idmef_path const *)arg1,arg2); ST(argvi) = SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(result)); argvi++ ; XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_path_get_depth) { { idmef_path_t *arg1 = (idmef_path_t *) 0 ; int argvi = 0; unsigned int result; dXSARGS; if ((items < 1) || (items > 1)) { SWIG_croak("Usage: idmef_path_get_depth(path);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_path, 0) ) { croak("Expected type idmef_path_t const * for argument 1."); return; } } result = (unsigned int)idmef_path_get_depth((struct idmef_path const *)arg1); ST(argvi) = SWIG_From_unsigned_SS_int SWIG_PERL_CALL_ARGS_1((unsigned int)(result)); argvi++ ; XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_path_check_operator) { { idmef_path_t *arg1 = (idmef_path_t *) 0 ; idmef_criterion_operator_t arg2 ; int val2 ; int ecode2 = 0 ; int argvi = 0; int result; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: idmef_path_check_operator(path,op);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_path, 0) ) { croak("Expected type idmef_path_t const * for argument 1."); return; } } ecode2 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(1), &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "idmef_path_check_operator" "', argument " "2"" of type '" "idmef_criterion_operator_t""'"); } arg2 = (idmef_criterion_operator_t)(val2); result = (int)idmef_path_check_operator((struct idmef_path const *)arg1,arg2); { ST(argvi) = newSViv(result); argvi++; } XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_path_get_applicable_operators) { { idmef_path_t *arg1 = (idmef_path_t *) 0 ; idmef_criterion_operator_t *arg2 = (idmef_criterion_operator_t *) 0 ; void *argp2 = 0 ; int res2 = 0 ; int argvi = 0; int result; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: idmef_path_get_applicable_operators(path,result);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_path, 0) ) { croak("Expected type idmef_path_t const * for argument 1."); return; } } res2 = SWIG_ConvertPtr(ST(1), &argp2,SWIGTYPE_p_idmef_criterion_operator_t, 0 | 0 ); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "idmef_path_get_applicable_operators" "', argument " "2"" of type '" "idmef_criterion_operator_t *""'"); } arg2 = (idmef_criterion_operator_t *)(argp2); result = (int)idmef_path_get_applicable_operators((struct idmef_path const *)arg1,arg2); { ST(argvi) = newSViv(result); argvi++; } XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_time_refcount_set) { { struct idmef_time *arg1 = (struct idmef_time *) 0 ; int arg2 ; void *argp1 = 0 ; int res1 = 0 ; int val2 ; int ecode2 = 0 ; int argvi = 0; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: idmef_time_refcount_set(self,refcount);"); } res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_idmef_time, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "idmef_time_refcount_set" "', argument " "1"" of type '" "struct idmef_time *""'"); } arg1 = (struct idmef_time *)(argp1); ecode2 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(1), &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "idmef_time_refcount_set" "', argument " "2"" of type '" "int""'"); } arg2 = (int)(val2); if (arg1) (arg1)->refcount = arg2; ST(argvi) = sv_newmortal(); XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_time_refcount_get) { { struct idmef_time *arg1 = (struct idmef_time *) 0 ; void *argp1 = 0 ; int res1 = 0 ; int argvi = 0; int result; dXSARGS; if ((items < 1) || (items > 1)) { SWIG_croak("Usage: idmef_time_refcount_get(self);"); } res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_idmef_time, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "idmef_time_refcount_get" "', argument " "1"" of type '" "struct idmef_time *""'"); } arg1 = (struct idmef_time *)(argp1); result = (int) ((arg1)->refcount); { ST(argvi) = newSViv(result); argvi++; } XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_time_sec_set) { { struct idmef_time *arg1 = (struct idmef_time *) 0 ; uint32_t arg2 ; void *argp1 = 0 ; int res1 = 0 ; unsigned int val2 ; int ecode2 = 0 ; int argvi = 0; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: idmef_time_sec_set(self,sec);"); } res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_idmef_time, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "idmef_time_sec_set" "', argument " "1"" of type '" "struct idmef_time *""'"); } arg1 = (struct idmef_time *)(argp1); ecode2 = SWIG_AsVal_unsigned_SS_int SWIG_PERL_CALL_ARGS_2(ST(1), &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "idmef_time_sec_set" "', argument " "2"" of type '" "uint32_t""'"); } arg2 = (uint32_t)(val2); if (arg1) (arg1)->sec = arg2; ST(argvi) = sv_newmortal(); XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_time_sec_get) { { struct idmef_time *arg1 = (struct idmef_time *) 0 ; void *argp1 = 0 ; int res1 = 0 ; int argvi = 0; uint32_t result; dXSARGS; if ((items < 1) || (items > 1)) { SWIG_croak("Usage: idmef_time_sec_get(self);"); } res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_idmef_time, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "idmef_time_sec_get" "', argument " "1"" of type '" "struct idmef_time *""'"); } arg1 = (struct idmef_time *)(argp1); result = (uint32_t) ((arg1)->sec); ST(argvi) = SWIG_From_unsigned_SS_int SWIG_PERL_CALL_ARGS_1((unsigned int)(result)); argvi++ ; XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_time_usec_set) { { struct idmef_time *arg1 = (struct idmef_time *) 0 ; uint32_t arg2 ; void *argp1 = 0 ; int res1 = 0 ; unsigned int val2 ; int ecode2 = 0 ; int argvi = 0; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: idmef_time_usec_set(self,usec);"); } res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_idmef_time, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "idmef_time_usec_set" "', argument " "1"" of type '" "struct idmef_time *""'"); } arg1 = (struct idmef_time *)(argp1); ecode2 = SWIG_AsVal_unsigned_SS_int SWIG_PERL_CALL_ARGS_2(ST(1), &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "idmef_time_usec_set" "', argument " "2"" of type '" "uint32_t""'"); } arg2 = (uint32_t)(val2); if (arg1) (arg1)->usec = arg2; ST(argvi) = sv_newmortal(); XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_time_usec_get) { { struct idmef_time *arg1 = (struct idmef_time *) 0 ; void *argp1 = 0 ; int res1 = 0 ; int argvi = 0; uint32_t result; dXSARGS; if ((items < 1) || (items > 1)) { SWIG_croak("Usage: idmef_time_usec_get(self);"); } res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_idmef_time, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "idmef_time_usec_get" "', argument " "1"" of type '" "struct idmef_time *""'"); } arg1 = (struct idmef_time *)(argp1); result = (uint32_t) ((arg1)->usec); ST(argvi) = SWIG_From_unsigned_SS_int SWIG_PERL_CALL_ARGS_1((unsigned int)(result)); argvi++ ; XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_time_gmt_offset_set) { { struct idmef_time *arg1 = (struct idmef_time *) 0 ; int32_t arg2 ; void *argp1 = 0 ; int res1 = 0 ; int val2 ; int ecode2 = 0 ; int argvi = 0; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: idmef_time_gmt_offset_set(self,gmt_offset);"); } res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_idmef_time, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "idmef_time_gmt_offset_set" "', argument " "1"" of type '" "struct idmef_time *""'"); } arg1 = (struct idmef_time *)(argp1); ecode2 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(1), &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "idmef_time_gmt_offset_set" "', argument " "2"" of type '" "int32_t""'"); } arg2 = (int32_t)(val2); if (arg1) (arg1)->gmt_offset = arg2; ST(argvi) = sv_newmortal(); XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_time_gmt_offset_get) { { struct idmef_time *arg1 = (struct idmef_time *) 0 ; void *argp1 = 0 ; int res1 = 0 ; int argvi = 0; int32_t result; dXSARGS; if ((items < 1) || (items > 1)) { SWIG_croak("Usage: idmef_time_gmt_offset_get(self);"); } res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_idmef_time, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "idmef_time_gmt_offset_get" "', argument " "1"" of type '" "struct idmef_time *""'"); } arg1 = (struct idmef_time *)(argp1); result = (int32_t) ((arg1)->gmt_offset); { ST(argvi) = newSViv(result); argvi++; } XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_new_idmef_time) { { int argvi = 0; struct idmef_time *result = 0 ; dXSARGS; if ((items < 0) || (items > 0)) { SWIG_croak("Usage: new_idmef_time();"); } result = (struct idmef_time *)calloc(1, sizeof(struct idmef_time)); ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_idmef_time, SWIG_OWNER | SWIG_SHADOW); argvi++ ; XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_delete_idmef_time) { { struct idmef_time *arg1 = (struct idmef_time *) 0 ; void *argp1 = 0 ; int res1 = 0 ; int argvi = 0; dXSARGS; if ((items < 1) || (items > 1)) { SWIG_croak("Usage: delete_idmef_time(self);"); } res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_idmef_time, SWIG_POINTER_DISOWN | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_idmef_time" "', argument " "1"" of type '" "struct idmef_time *""'"); } arg1 = (struct idmef_time *)(argp1); free((char *) arg1); ST(argvi) = sv_newmortal(); XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_time_ref) { { idmef_time_t *arg1 = (idmef_time_t *) 0 ; int argvi = 0; idmef_time_t *result = 0 ; dXSARGS; if ((items < 1) || (items > 1)) { SWIG_croak("Usage: idmef_time_ref(time);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_time, 0) ) { croak("Expected type idmef_time_t * for argument 1."); return; } } result = (idmef_time_t *)idmef_time_ref(arg1); ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_idmef_time, 0 | SWIG_SHADOW); argvi++ ; XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_time_new) { { idmef_time_t **arg1 = (idmef_time_t **) 0 ; idmef_time_t *tmp1 ; int argvi = 0; SV * _saved[1] ; int result; dXSARGS; if ((items < 1) || (items > 1)) { SWIG_croak("Usage: idmef_time_new(time);"); } { arg1 = (idmef_time_t **) &tmp1; } _saved[0] = ST(0); result = (int)idmef_time_new(arg1); { ST(argvi) = newSViv(result); argvi++; } { SV *sv; if ( result >= 0 ) { if ( ! SvROK(_saved[0]) ) { croak("Argument 1 is not a reference."); return; } sv = SvRV(_saved[0]); sv_setsv(sv, SWIG_NewPointerObj((void *) * arg1, SWIGTYPE_p_idmef_time, 0)); } } XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_time_new_from_time) { { idmef_time_t **arg1 = (idmef_time_t **) 0 ; time_t *arg2 = (time_t *) 0 ; idmef_time_t *tmp1 ; void *argp2 = 0 ; int res2 = 0 ; int argvi = 0; SV * _saved[1] ; int result; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: idmef_time_new_from_time(time,t);"); } { arg1 = (idmef_time_t **) &tmp1; } res2 = SWIG_ConvertPtr(ST(1), &argp2,SWIGTYPE_p_time_t, 0 | 0 ); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "idmef_time_new_from_time" "', argument " "2"" of type '" "time_t const *""'"); } arg2 = (time_t *)(argp2); _saved[0] = ST(0); result = (int)idmef_time_new_from_time(arg1,(time_t const *)arg2); { ST(argvi) = newSViv(result); argvi++; } { SV *sv; if ( result >= 0 ) { if ( ! SvROK(_saved[0]) ) { croak("Argument 1 is not a reference."); return; } sv = SvRV(_saved[0]); sv_setsv(sv, SWIG_NewPointerObj((void *) * arg1, SWIGTYPE_p_idmef_time, 0)); } } XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_time_new_from_gettimeofday) { { idmef_time_t **arg1 = (idmef_time_t **) 0 ; idmef_time_t *tmp1 ; int argvi = 0; SV * _saved[1] ; int result; dXSARGS; if ((items < 1) || (items > 1)) { SWIG_croak("Usage: idmef_time_new_from_gettimeofday(time);"); } { arg1 = (idmef_time_t **) &tmp1; } _saved[0] = ST(0); result = (int)idmef_time_new_from_gettimeofday(arg1); { ST(argvi) = newSViv(result); argvi++; } { SV *sv; if ( result >= 0 ) { if ( ! SvROK(_saved[0]) ) { croak("Argument 1 is not a reference."); return; } sv = SvRV(_saved[0]); sv_setsv(sv, SWIG_NewPointerObj((void *) * arg1, SWIGTYPE_p_idmef_time, 0)); } } XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_time_new_from_string) { { idmef_time_t **arg1 = (idmef_time_t **) 0 ; char *arg2 = (char *) 0 ; idmef_time_t *tmp1 ; int res2 ; char *buf2 = 0 ; int alloc2 = 0 ; int argvi = 0; SV * _saved[1] ; int result; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: idmef_time_new_from_string(time,buf);"); } { arg1 = (idmef_time_t **) &tmp1; } res2 = SWIG_AsCharPtrAndSize(ST(1), &buf2, NULL, &alloc2); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "idmef_time_new_from_string" "', argument " "2"" of type '" "char const *""'"); } arg2 = (char *)(buf2); _saved[0] = ST(0); result = (int)idmef_time_new_from_string(arg1,(char const *)arg2); { ST(argvi) = newSViv(result); argvi++; } { SV *sv; if ( result >= 0 ) { if ( ! SvROK(_saved[0]) ) { croak("Argument 1 is not a reference."); return; } sv = SvRV(_saved[0]); sv_setsv(sv, SWIG_NewPointerObj((void *) * arg1, SWIGTYPE_p_idmef_time, 0)); } } if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); XSRETURN(argvi); fail: if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); SWIG_croak_null(); } } XS(_wrap_idmef_time_new_from_ntpstamp) { { idmef_time_t **arg1 = (idmef_time_t **) 0 ; char *arg2 = (char *) 0 ; idmef_time_t *tmp1 ; int res2 ; char *buf2 = 0 ; int alloc2 = 0 ; int argvi = 0; SV * _saved[1] ; int result; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: idmef_time_new_from_ntpstamp(time,buf);"); } { arg1 = (idmef_time_t **) &tmp1; } res2 = SWIG_AsCharPtrAndSize(ST(1), &buf2, NULL, &alloc2); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "idmef_time_new_from_ntpstamp" "', argument " "2"" of type '" "char const *""'"); } arg2 = (char *)(buf2); _saved[0] = ST(0); result = (int)idmef_time_new_from_ntpstamp(arg1,(char const *)arg2); { ST(argvi) = newSViv(result); argvi++; } { SV *sv; if ( result >= 0 ) { if ( ! SvROK(_saved[0]) ) { croak("Argument 1 is not a reference."); return; } sv = SvRV(_saved[0]); sv_setsv(sv, SWIG_NewPointerObj((void *) * arg1, SWIGTYPE_p_idmef_time, 0)); } } if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); XSRETURN(argvi); fail: if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); SWIG_croak_null(); } } XS(_wrap_idmef_time_new_from_timeval) { { idmef_time_t **arg1 = (idmef_time_t **) 0 ; struct timeval *arg2 = (struct timeval *) 0 ; idmef_time_t *tmp1 ; void *argp2 = 0 ; int res2 = 0 ; int argvi = 0; SV * _saved[1] ; int result; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: idmef_time_new_from_timeval(time,tv);"); } { arg1 = (idmef_time_t **) &tmp1; } res2 = SWIG_ConvertPtr(ST(1), &argp2,SWIGTYPE_p_timeval, 0 | 0 ); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "idmef_time_new_from_timeval" "', argument " "2"" of type '" "struct timeval const *""'"); } arg2 = (struct timeval *)(argp2); _saved[0] = ST(0); result = (int)idmef_time_new_from_timeval(arg1,(struct timeval const *)arg2); { ST(argvi) = newSViv(result); argvi++; } { SV *sv; if ( result >= 0 ) { if ( ! SvROK(_saved[0]) ) { croak("Argument 1 is not a reference."); return; } sv = SvRV(_saved[0]); sv_setsv(sv, SWIG_NewPointerObj((void *) * arg1, SWIGTYPE_p_idmef_time, 0)); } } XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_time_set_from_time) { { idmef_time_t *arg1 = (idmef_time_t *) 0 ; time_t *arg2 = (time_t *) 0 ; void *argp2 = 0 ; int res2 = 0 ; int argvi = 0; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: idmef_time_set_from_time(time,t);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_time, 0) ) { croak("Expected type idmef_time_t * for argument 1."); return; } } res2 = SWIG_ConvertPtr(ST(1), &argp2,SWIGTYPE_p_time_t, 0 | 0 ); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "idmef_time_set_from_time" "', argument " "2"" of type '" "time_t const *""'"); } arg2 = (time_t *)(argp2); idmef_time_set_from_time(arg1,(time_t const *)arg2); ST(argvi) = sv_newmortal(); XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_time_set_from_gettimeofday) { { idmef_time_t *arg1 = (idmef_time_t *) 0 ; int argvi = 0; int result; dXSARGS; if ((items < 1) || (items > 1)) { SWIG_croak("Usage: idmef_time_set_from_gettimeofday(time);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_time, 0) ) { croak("Expected type idmef_time_t * for argument 1."); return; } } result = (int)idmef_time_set_from_gettimeofday(arg1); { ST(argvi) = newSViv(result); argvi++; } XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_time_set_from_string) { { idmef_time_t *arg1 = (idmef_time_t *) 0 ; char *arg2 = (char *) 0 ; int res2 ; char *buf2 = 0 ; int alloc2 = 0 ; int argvi = 0; int result; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: idmef_time_set_from_string(time,buf);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_time, 0) ) { croak("Expected type idmef_time_t * for argument 1."); return; } } res2 = SWIG_AsCharPtrAndSize(ST(1), &buf2, NULL, &alloc2); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "idmef_time_set_from_string" "', argument " "2"" of type '" "char const *""'"); } arg2 = (char *)(buf2); result = (int)idmef_time_set_from_string(arg1,(char const *)arg2); { ST(argvi) = newSViv(result); argvi++; } if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); XSRETURN(argvi); fail: if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); SWIG_croak_null(); } } XS(_wrap_idmef_time_set_from_ntpstamp) { { idmef_time_t *arg1 = (idmef_time_t *) 0 ; char *arg2 = (char *) 0 ; int res2 ; char *buf2 = 0 ; int alloc2 = 0 ; int argvi = 0; int result; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: idmef_time_set_from_ntpstamp(time,buf);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_time, 0) ) { croak("Expected type idmef_time_t * for argument 1."); return; } } res2 = SWIG_AsCharPtrAndSize(ST(1), &buf2, NULL, &alloc2); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "idmef_time_set_from_ntpstamp" "', argument " "2"" of type '" "char const *""'"); } arg2 = (char *)(buf2); result = (int)idmef_time_set_from_ntpstamp(arg1,(char const *)arg2); { ST(argvi) = newSViv(result); argvi++; } if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); XSRETURN(argvi); fail: if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); SWIG_croak_null(); } } XS(_wrap_idmef_time_set_from_timeval) { { idmef_time_t *arg1 = (idmef_time_t *) 0 ; struct timeval *arg2 = (struct timeval *) 0 ; void *argp2 = 0 ; int res2 = 0 ; int argvi = 0; int result; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: idmef_time_set_from_timeval(time,tv);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_time, 0) ) { croak("Expected type idmef_time_t * for argument 1."); return; } } res2 = SWIG_ConvertPtr(ST(1), &argp2,SWIGTYPE_p_timeval, 0 | 0 ); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "idmef_time_set_from_timeval" "', argument " "2"" of type '" "struct timeval const *""'"); } arg2 = (struct timeval *)(argp2); result = (int)idmef_time_set_from_timeval(arg1,(struct timeval const *)arg2); { ST(argvi) = newSViv(result); argvi++; } XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_time_destroy_internal) { { idmef_time_t *arg1 = (idmef_time_t *) 0 ; int argvi = 0; dXSARGS; if ((items < 1) || (items > 1)) { SWIG_croak("Usage: idmef_time_destroy_internal(time);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_time, 0) ) { croak("Expected type idmef_time_t * for argument 1."); return; } } idmef_time_destroy_internal(arg1); ST(argvi) = sv_newmortal(); XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_time_destroy) { { idmef_time_t *arg1 = (idmef_time_t *) 0 ; int argvi = 0; dXSARGS; if ((items < 1) || (items > 1)) { SWIG_croak("Usage: idmef_time_destroy(time);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_time, 0) ) { croak("Expected type idmef_time_t * for argument 1."); return; } } idmef_time_destroy(arg1); ST(argvi) = sv_newmortal(); XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_time_clone) { { idmef_time_t *arg1 = (idmef_time_t *) 0 ; idmef_time_t **arg2 = (idmef_time_t **) 0 ; idmef_time_t *tmp2 ; int argvi = 0; SV * _saved[1] ; int result; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: idmef_time_clone(src,dst);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_time, 0) ) { croak("Expected type idmef_time_t const * for argument 1."); return; } } { arg2 = (idmef_time_t **) &tmp2; } _saved[0] = ST(1); result = (int)idmef_time_clone((struct idmef_time const *)arg1,arg2); { ST(argvi) = newSViv(result); argvi++; } { SV *sv; if ( result >= 0 ) { if ( ! SvROK(_saved[0]) ) { croak("Argument 2 is not a reference."); return; } sv = SvRV(_saved[0]); sv_setsv(sv, SWIG_NewPointerObj((void *) * arg2, SWIGTYPE_p_idmef_time, 0)); } } XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_time_copy) { { idmef_time_t *arg1 = (idmef_time_t *) 0 ; idmef_time_t *arg2 = (idmef_time_t *) 0 ; int argvi = 0; int result; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: idmef_time_copy(src,dst);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_time, 0) ) { croak("Expected type idmef_time_t const * for argument 1."); return; } } { if ( ! SvROK(ST(1)) ) { croak("Argument 2 is null."); return; } if ( SWIG_ConvertPtr(ST(1), (void **)&arg2, SWIGTYPE_p_idmef_time, 0) ) { croak("Expected type idmef_time_t * for argument 2."); return; } } result = (int)idmef_time_copy((struct idmef_time const *)arg1,arg2); { ST(argvi) = newSViv(result); argvi++; } XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_time_set_sec) { { idmef_time_t *arg1 = (idmef_time_t *) 0 ; uint32_t arg2 ; unsigned int val2 ; int ecode2 = 0 ; int argvi = 0; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: idmef_time_set_sec(time,sec);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_time, 0) ) { croak("Expected type idmef_time_t * for argument 1."); return; } } ecode2 = SWIG_AsVal_unsigned_SS_int SWIG_PERL_CALL_ARGS_2(ST(1), &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "idmef_time_set_sec" "', argument " "2"" of type '" "uint32_t""'"); } arg2 = (uint32_t)(val2); idmef_time_set_sec(arg1,arg2); ST(argvi) = sv_newmortal(); XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_time_set_usec) { { idmef_time_t *arg1 = (idmef_time_t *) 0 ; uint32_t arg2 ; unsigned int val2 ; int ecode2 = 0 ; int argvi = 0; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: idmef_time_set_usec(time,usec);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_time, 0) ) { croak("Expected type idmef_time_t * for argument 1."); return; } } ecode2 = SWIG_AsVal_unsigned_SS_int SWIG_PERL_CALL_ARGS_2(ST(1), &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "idmef_time_set_usec" "', argument " "2"" of type '" "uint32_t""'"); } arg2 = (uint32_t)(val2); idmef_time_set_usec(arg1,arg2); ST(argvi) = sv_newmortal(); XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_time_set_gmt_offset) { { idmef_time_t *arg1 = (idmef_time_t *) 0 ; int32_t arg2 ; int val2 ; int ecode2 = 0 ; int argvi = 0; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: idmef_time_set_gmt_offset(time,gmtoff);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_time, 0) ) { croak("Expected type idmef_time_t * for argument 1."); return; } } ecode2 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(1), &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "idmef_time_set_gmt_offset" "', argument " "2"" of type '" "int32_t""'"); } arg2 = (int32_t)(val2); idmef_time_set_gmt_offset(arg1,arg2); ST(argvi) = sv_newmortal(); XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_time_get_sec) { { idmef_time_t *arg1 = (idmef_time_t *) 0 ; int argvi = 0; uint32_t result; dXSARGS; if ((items < 1) || (items > 1)) { SWIG_croak("Usage: idmef_time_get_sec(time);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_time, 0) ) { croak("Expected type idmef_time_t const * for argument 1."); return; } } result = (uint32_t)idmef_time_get_sec((struct idmef_time const *)arg1); ST(argvi) = SWIG_From_unsigned_SS_int SWIG_PERL_CALL_ARGS_1((unsigned int)(result)); argvi++ ; XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_time_get_usec) { { idmef_time_t *arg1 = (idmef_time_t *) 0 ; int argvi = 0; uint32_t result; dXSARGS; if ((items < 1) || (items > 1)) { SWIG_croak("Usage: idmef_time_get_usec(time);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_time, 0) ) { croak("Expected type idmef_time_t const * for argument 1."); return; } } result = (uint32_t)idmef_time_get_usec((struct idmef_time const *)arg1); ST(argvi) = SWIG_From_unsigned_SS_int SWIG_PERL_CALL_ARGS_1((unsigned int)(result)); argvi++ ; XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_time_get_gmt_offset) { { idmef_time_t *arg1 = (idmef_time_t *) 0 ; int argvi = 0; int32_t result; dXSARGS; if ((items < 1) || (items > 1)) { SWIG_croak("Usage: idmef_time_get_gmt_offset(time);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_time, 0) ) { croak("Expected type idmef_time_t const * for argument 1."); return; } } result = (int32_t)idmef_time_get_gmt_offset((struct idmef_time const *)arg1); { ST(argvi) = newSViv(result); argvi++; } XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_time_to_string) { { idmef_time_t *arg1 = (idmef_time_t *) 0 ; prelude_string_t *arg2 = (prelude_string_t *) 0 ; int argvi = 0; int result; dXSARGS; { int ret; ret = prelude_string_new(&(arg2)); if ( ret < 0 ) { swig_perl_raise_error(ret); return; } } if ((items < 1) || (items > 1)) { SWIG_croak("Usage: idmef_time_to_string(time);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_time, 0) ) { croak("Expected type idmef_time_t const * for argument 1."); return; } } result = (int)idmef_time_to_string((struct idmef_time const *)arg1,arg2); { ST(argvi) = newSViv(result); argvi++; } { if ( result >= 0 ) { ST(argvi) = newSVpv(prelude_string_get_string(arg2), prelude_string_get_len(arg2)); argvi++; } prelude_string_destroy(arg2); } XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_time_to_ntpstamp) { { idmef_time_t *arg1 = (idmef_time_t *) 0 ; prelude_string_t *arg2 = (prelude_string_t *) 0 ; int argvi = 0; int result; dXSARGS; { int ret; ret = prelude_string_new(&(arg2)); if ( ret < 0 ) { swig_perl_raise_error(ret); return; } } if ((items < 1) || (items > 1)) { SWIG_croak("Usage: idmef_time_to_ntpstamp(time);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_time, 0) ) { croak("Expected type idmef_time_t const * for argument 1."); return; } } result = (int)idmef_time_to_ntpstamp((struct idmef_time const *)arg1,arg2); { ST(argvi) = newSViv(result); argvi++; } { if ( result >= 0 ) { ST(argvi) = newSVpv(prelude_string_get_string(arg2), prelude_string_get_len(arg2)); argvi++; } prelude_string_destroy(arg2); } XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_time_compare) { { idmef_time_t *arg1 = (idmef_time_t *) 0 ; idmef_time_t *arg2 = (idmef_time_t *) 0 ; int argvi = 0; int result; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: idmef_time_compare(time1,time2);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_time, 0) ) { croak("Expected type idmef_time_t const * for argument 1."); return; } } { if ( ! SvROK(ST(1)) ) { croak("Argument 2 is null."); return; } if ( SWIG_ConvertPtr(ST(1), (void **)&arg2, SWIGTYPE_p_idmef_time, 0) ) { croak("Expected type idmef_time_t const * for argument 2."); return; } } result = (int)idmef_time_compare((struct idmef_time const *)arg1,(struct idmef_time const *)arg2); { ST(argvi) = newSViv(result); argvi++; } XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_data_t_refcount_set) { { idmef_data_t *arg1 = (idmef_data_t *) 0 ; int arg2 ; int val2 ; int ecode2 = 0 ; int argvi = 0; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: idmef_data_t_refcount_set(self,refcount);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_data_t, 0) ) { croak("Expected type idmef_data_t * for argument 1."); return; } } ecode2 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(1), &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "idmef_data_t_refcount_set" "', argument " "2"" of type '" "int""'"); } arg2 = (int)(val2); if (arg1) (arg1)->refcount = arg2; ST(argvi) = sv_newmortal(); XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_data_t_refcount_get) { { idmef_data_t *arg1 = (idmef_data_t *) 0 ; int argvi = 0; int result; dXSARGS; if ((items < 1) || (items > 1)) { SWIG_croak("Usage: idmef_data_t_refcount_get(self);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_data_t, 0) ) { croak("Expected type idmef_data_t * for argument 1."); return; } } result = (int) ((arg1)->refcount); { ST(argvi) = newSViv(result); argvi++; } XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_data_t_flags_set) { { idmef_data_t *arg1 = (idmef_data_t *) 0 ; int arg2 ; int val2 ; int ecode2 = 0 ; int argvi = 0; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: idmef_data_t_flags_set(self,flags);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_data_t, 0) ) { croak("Expected type idmef_data_t * for argument 1."); return; } } ecode2 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(1), &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "idmef_data_t_flags_set" "', argument " "2"" of type '" "int""'"); } arg2 = (int)(val2); if (arg1) (arg1)->flags = arg2; ST(argvi) = sv_newmortal(); XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_data_t_flags_get) { { idmef_data_t *arg1 = (idmef_data_t *) 0 ; int argvi = 0; int result; dXSARGS; if ((items < 1) || (items > 1)) { SWIG_croak("Usage: idmef_data_t_flags_get(self);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_data_t, 0) ) { croak("Expected type idmef_data_t * for argument 1."); return; } } result = (int) ((arg1)->flags); { ST(argvi) = newSViv(result); argvi++; } XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_data_t_type_set) { { idmef_data_t *arg1 = (idmef_data_t *) 0 ; idmef_data_type_t arg2 ; int val2 ; int ecode2 = 0 ; int argvi = 0; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: idmef_data_t_type_set(self,type);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_data_t, 0) ) { croak("Expected type idmef_data_t * for argument 1."); return; } } ecode2 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(1), &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "idmef_data_t_type_set" "', argument " "2"" of type '" "idmef_data_type_t""'"); } arg2 = (idmef_data_type_t)(val2); if (arg1) (arg1)->type = arg2; ST(argvi) = sv_newmortal(); XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_data_t_type_get) { { idmef_data_t *arg1 = (idmef_data_t *) 0 ; int argvi = 0; idmef_data_type_t result; dXSARGS; if ((items < 1) || (items > 1)) { SWIG_croak("Usage: idmef_data_t_type_get(self);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_data_t, 0) ) { croak("Expected type idmef_data_t * for argument 1."); return; } } result = (idmef_data_type_t) ((arg1)->type); ST(argvi) = SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(result)); argvi++ ; XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_data_t_len_set) { { idmef_data_t *arg1 = (idmef_data_t *) 0 ; size_t arg2 ; size_t val2 ; int ecode2 = 0 ; int argvi = 0; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: idmef_data_t_len_set(self,len);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_data_t, 0) ) { croak("Expected type idmef_data_t * for argument 1."); return; } } ecode2 = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(1), &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "idmef_data_t_len_set" "', argument " "2"" of type '" "size_t""'"); } arg2 = (size_t)(val2); if (arg1) (arg1)->len = arg2; ST(argvi) = sv_newmortal(); XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_data_t_len_get) { { idmef_data_t *arg1 = (idmef_data_t *) 0 ; int argvi = 0; size_t result; dXSARGS; if ((items < 1) || (items > 1)) { SWIG_croak("Usage: idmef_data_t_len_get(self);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_data_t, 0) ) { croak("Expected type idmef_data_t * for argument 1."); return; } } result = ((arg1)->len); ST(argvi) = SWIG_From_size_t SWIG_PERL_CALL_ARGS_1((size_t)(result)); argvi++ ; XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_data_t_list_set) { { idmef_data_t *arg1 = (idmef_data_t *) 0 ; prelude_list_t arg2 ; void *argp2 ; int res2 = 0 ; int argvi = 0; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: idmef_data_t_list_set(self,list);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_data_t, 0) ) { croak("Expected type idmef_data_t * for argument 1."); return; } } { res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_prelude_list_t, 0 ); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "idmef_data_t_list_set" "', argument " "2"" of type '" "prelude_list_t""'"); } if (!argp2) { SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "idmef_data_t_list_set" "', argument " "2"" of type '" "prelude_list_t""'"); } else { arg2 = *((prelude_list_t *)(argp2)); } } if (arg1) (arg1)->list = arg2; ST(argvi) = sv_newmortal(); XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_data_t_list_get) { { idmef_data_t *arg1 = (idmef_data_t *) 0 ; int argvi = 0; prelude_list_t result; dXSARGS; if ((items < 1) || (items > 1)) { SWIG_croak("Usage: idmef_data_t_list_get(self);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_data_t, 0) ) { croak("Expected type idmef_data_t * for argument 1."); return; } } result = ((arg1)->list); ST(argvi) = SWIG_NewPointerObj((prelude_list_t *)memcpy((prelude_list_t *)malloc(sizeof(prelude_list_t)),&result,sizeof(prelude_list_t)), SWIGTYPE_p_prelude_list_t, SWIG_POINTER_OWN | 0); argvi++ ; XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_data_t_data_get) { { idmef_data_t *arg1 = (idmef_data_t *) 0 ; int argvi = 0; idmef_data_t_data *result = 0 ; dXSARGS; if ((items < 1) || (items > 1)) { SWIG_croak("Usage: idmef_data_t_data_get(self);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_data_t, 0) ) { croak("Expected type idmef_data_t * for argument 1."); return; } } result = (idmef_data_t_data *)& ((arg1)->data); ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_idmef_data_t_data, 0 | SWIG_SHADOW); argvi++ ; XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_new_idmef_data_t) { { int argvi = 0; idmef_data_t *result = 0 ; dXSARGS; if ((items < 0) || (items > 0)) { SWIG_croak("Usage: new_idmef_data_t();"); } result = (idmef_data_t *)calloc(1, sizeof(idmef_data_t)); { ST(argvi) = swig_perl_data(result); argvi++; } XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_delete_idmef_data_t) { { idmef_data_t *arg1 = (idmef_data_t *) 0 ; int argvi = 0; dXSARGS; if ((items < 1) || (items > 1)) { SWIG_croak("Usage: delete_idmef_data_t(self);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_data_t, 0) ) { croak("Expected type idmef_data_t * for argument 1."); return; } } free((char *) arg1); ST(argvi) = sv_newmortal(); XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_data_t_data_char_data_set) { { idmef_data_t_data *arg1 = (idmef_data_t_data *) 0 ; char arg2 ; void *argp1 = 0 ; int res1 = 0 ; char val2 ; int ecode2 = 0 ; int argvi = 0; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: idmef_data_t_data_char_data_set(self,char_data);"); } res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_idmef_data_t_data, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "idmef_data_t_data_char_data_set" "', argument " "1"" of type '" "idmef_data_t_data *""'"); } arg1 = (idmef_data_t_data *)(argp1); ecode2 = SWIG_AsVal_char SWIG_PERL_CALL_ARGS_2(ST(1), &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "idmef_data_t_data_char_data_set" "', argument " "2"" of type '" "char""'"); } arg2 = (char)(val2); if (arg1) (arg1)->char_data = arg2; ST(argvi) = sv_newmortal(); XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_data_t_data_char_data_get) { { idmef_data_t_data *arg1 = (idmef_data_t_data *) 0 ; void *argp1 = 0 ; int res1 = 0 ; int argvi = 0; char result; dXSARGS; if ((items < 1) || (items > 1)) { SWIG_croak("Usage: idmef_data_t_data_char_data_get(self);"); } res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_idmef_data_t_data, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "idmef_data_t_data_char_data_get" "', argument " "1"" of type '" "idmef_data_t_data *""'"); } arg1 = (idmef_data_t_data *)(argp1); result = (char) ((arg1)->char_data); ST(argvi) = SWIG_From_char SWIG_PERL_CALL_ARGS_1((char)(result)); argvi++ ; XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_data_t_data_byte_data_set) { { idmef_data_t_data *arg1 = (idmef_data_t_data *) 0 ; uint8_t arg2 ; void *argp1 = 0 ; int res1 = 0 ; unsigned char val2 ; int ecode2 = 0 ; int argvi = 0; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: idmef_data_t_data_byte_data_set(self,byte_data);"); } res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_idmef_data_t_data, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "idmef_data_t_data_byte_data_set" "', argument " "1"" of type '" "idmef_data_t_data *""'"); } arg1 = (idmef_data_t_data *)(argp1); ecode2 = SWIG_AsVal_unsigned_SS_char SWIG_PERL_CALL_ARGS_2(ST(1), &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "idmef_data_t_data_byte_data_set" "', argument " "2"" of type '" "uint8_t""'"); } arg2 = (uint8_t)(val2); if (arg1) (arg1)->byte_data = arg2; ST(argvi) = sv_newmortal(); XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_data_t_data_byte_data_get) { { idmef_data_t_data *arg1 = (idmef_data_t_data *) 0 ; void *argp1 = 0 ; int res1 = 0 ; int argvi = 0; uint8_t result; dXSARGS; if ((items < 1) || (items > 1)) { SWIG_croak("Usage: idmef_data_t_data_byte_data_get(self);"); } res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_idmef_data_t_data, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "idmef_data_t_data_byte_data_get" "', argument " "1"" of type '" "idmef_data_t_data *""'"); } arg1 = (idmef_data_t_data *)(argp1); result = (uint8_t) ((arg1)->byte_data); ST(argvi) = SWIG_From_unsigned_SS_char SWIG_PERL_CALL_ARGS_1((unsigned char)(result)); argvi++ ; XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_data_t_data_uint32_data_set) { { idmef_data_t_data *arg1 = (idmef_data_t_data *) 0 ; uint32_t arg2 ; void *argp1 = 0 ; int res1 = 0 ; unsigned int val2 ; int ecode2 = 0 ; int argvi = 0; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: idmef_data_t_data_uint32_data_set(self,uint32_data);"); } res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_idmef_data_t_data, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "idmef_data_t_data_uint32_data_set" "', argument " "1"" of type '" "idmef_data_t_data *""'"); } arg1 = (idmef_data_t_data *)(argp1); ecode2 = SWIG_AsVal_unsigned_SS_int SWIG_PERL_CALL_ARGS_2(ST(1), &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "idmef_data_t_data_uint32_data_set" "', argument " "2"" of type '" "uint32_t""'"); } arg2 = (uint32_t)(val2); if (arg1) (arg1)->uint32_data = arg2; ST(argvi) = sv_newmortal(); XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_data_t_data_uint32_data_get) { { idmef_data_t_data *arg1 = (idmef_data_t_data *) 0 ; void *argp1 = 0 ; int res1 = 0 ; int argvi = 0; uint32_t result; dXSARGS; if ((items < 1) || (items > 1)) { SWIG_croak("Usage: idmef_data_t_data_uint32_data_get(self);"); } res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_idmef_data_t_data, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "idmef_data_t_data_uint32_data_get" "', argument " "1"" of type '" "idmef_data_t_data *""'"); } arg1 = (idmef_data_t_data *)(argp1); result = (uint32_t) ((arg1)->uint32_data); ST(argvi) = SWIG_From_unsigned_SS_int SWIG_PERL_CALL_ARGS_1((unsigned int)(result)); argvi++ ; XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_data_t_data_uint64_data_set) { { idmef_data_t_data *arg1 = (idmef_data_t_data *) 0 ; uint64_t arg2 ; void *argp1 = 0 ; int res1 = 0 ; unsigned long long val2 ; int ecode2 = 0 ; int argvi = 0; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: idmef_data_t_data_uint64_data_set(self,uint64_data);"); } res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_idmef_data_t_data, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "idmef_data_t_data_uint64_data_set" "', argument " "1"" of type '" "idmef_data_t_data *""'"); } arg1 = (idmef_data_t_data *)(argp1); ecode2 = SWIG_AsVal_unsigned_SS_long_SS_long SWIG_PERL_CALL_ARGS_2(ST(1), &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "idmef_data_t_data_uint64_data_set" "', argument " "2"" of type '" "uint64_t""'"); } arg2 = (uint64_t)(val2); if (arg1) (arg1)->uint64_data = arg2; ST(argvi) = sv_newmortal(); XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_data_t_data_uint64_data_get) { { idmef_data_t_data *arg1 = (idmef_data_t_data *) 0 ; void *argp1 = 0 ; int res1 = 0 ; int argvi = 0; uint64_t result; dXSARGS; if ((items < 1) || (items > 1)) { SWIG_croak("Usage: idmef_data_t_data_uint64_data_get(self);"); } res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_idmef_data_t_data, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "idmef_data_t_data_uint64_data_get" "', argument " "1"" of type '" "idmef_data_t_data *""'"); } arg1 = (idmef_data_t_data *)(argp1); result = (uint64_t) ((arg1)->uint64_data); ST(argvi) = SWIG_From_unsigned_SS_long_SS_long SWIG_PERL_CALL_ARGS_1((unsigned long long)(result)); argvi++ ; XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_data_t_data_float_data_set) { { idmef_data_t_data *arg1 = (idmef_data_t_data *) 0 ; float arg2 ; void *argp1 = 0 ; int res1 = 0 ; float val2 ; int ecode2 = 0 ; int argvi = 0; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: idmef_data_t_data_float_data_set(self,float_data);"); } res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_idmef_data_t_data, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "idmef_data_t_data_float_data_set" "', argument " "1"" of type '" "idmef_data_t_data *""'"); } arg1 = (idmef_data_t_data *)(argp1); ecode2 = SWIG_AsVal_float SWIG_PERL_CALL_ARGS_2(ST(1), &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "idmef_data_t_data_float_data_set" "', argument " "2"" of type '" "float""'"); } arg2 = (float)(val2); if (arg1) (arg1)->float_data = arg2; ST(argvi) = sv_newmortal(); XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_data_t_data_float_data_get) { { idmef_data_t_data *arg1 = (idmef_data_t_data *) 0 ; void *argp1 = 0 ; int res1 = 0 ; int argvi = 0; float result; dXSARGS; if ((items < 1) || (items > 1)) { SWIG_croak("Usage: idmef_data_t_data_float_data_get(self);"); } res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_idmef_data_t_data, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "idmef_data_t_data_float_data_get" "', argument " "1"" of type '" "idmef_data_t_data *""'"); } arg1 = (idmef_data_t_data *)(argp1); result = (float) ((arg1)->float_data); ST(argvi) = SWIG_From_float SWIG_PERL_CALL_ARGS_1((float)(result)); argvi++ ; XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_data_t_data_rw_data_set) { { idmef_data_t_data *arg1 = (idmef_data_t_data *) 0 ; void *arg2 = (void *) 0 ; void *argp1 = 0 ; int res1 = 0 ; int res2 ; int argvi = 0; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: idmef_data_t_data_rw_data_set(self,rw_data);"); } res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_idmef_data_t_data, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "idmef_data_t_data_rw_data_set" "', argument " "1"" of type '" "idmef_data_t_data *""'"); } arg1 = (idmef_data_t_data *)(argp1); res2 = SWIG_ConvertPtr(ST(1),SWIG_as_voidptrptr(&arg2), 0, SWIG_POINTER_DISOWN); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "idmef_data_t_data_rw_data_set" "', argument " "2"" of type '" "void *""'"); } if (arg1) (arg1)->rw_data = arg2; ST(argvi) = sv_newmortal(); XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_data_t_data_rw_data_get) { { idmef_data_t_data *arg1 = (idmef_data_t_data *) 0 ; void *argp1 = 0 ; int res1 = 0 ; int argvi = 0; void *result = 0 ; dXSARGS; if ((items < 1) || (items > 1)) { SWIG_croak("Usage: idmef_data_t_data_rw_data_get(self);"); } res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_idmef_data_t_data, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "idmef_data_t_data_rw_data_get" "', argument " "1"" of type '" "idmef_data_t_data *""'"); } arg1 = (idmef_data_t_data *)(argp1); result = (void *) ((arg1)->rw_data); ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_void, 0 | 0); argvi++ ; XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_data_t_data_ro_data_set) { { idmef_data_t_data *arg1 = (idmef_data_t_data *) 0 ; void *arg2 = (void *) 0 ; void *argp1 = 0 ; int res1 = 0 ; int res2 ; int argvi = 0; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: idmef_data_t_data_ro_data_set(self,ro_data);"); } res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_idmef_data_t_data, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "idmef_data_t_data_ro_data_set" "', argument " "1"" of type '" "idmef_data_t_data *""'"); } arg1 = (idmef_data_t_data *)(argp1); res2 = SWIG_ConvertPtr(ST(1),SWIG_as_voidptrptr(&arg2), 0, SWIG_POINTER_DISOWN); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "idmef_data_t_data_ro_data_set" "', argument " "2"" of type '" "void const *""'"); } if (arg1) (arg1)->ro_data = (void const *)arg2; ST(argvi) = sv_newmortal(); XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_data_t_data_ro_data_get) { { idmef_data_t_data *arg1 = (idmef_data_t_data *) 0 ; void *argp1 = 0 ; int res1 = 0 ; int argvi = 0; void *result = 0 ; dXSARGS; if ((items < 1) || (items > 1)) { SWIG_croak("Usage: idmef_data_t_data_ro_data_get(self);"); } res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_idmef_data_t_data, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "idmef_data_t_data_ro_data_get" "', argument " "1"" of type '" "idmef_data_t_data *""'"); } arg1 = (idmef_data_t_data *)(argp1); result = (void *) ((arg1)->ro_data); ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_void, 0 | 0); argvi++ ; XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_new_idmef_data_t_data) { { int argvi = 0; idmef_data_t_data *result = 0 ; dXSARGS; if ((items < 0) || (items > 0)) { SWIG_croak("Usage: new_idmef_data_t_data();"); } result = (idmef_data_t_data *)calloc(1, sizeof(idmef_data_t_data)); ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_idmef_data_t_data, SWIG_OWNER | SWIG_SHADOW); argvi++ ; XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_delete_idmef_data_t_data) { { idmef_data_t_data *arg1 = (idmef_data_t_data *) 0 ; void *argp1 = 0 ; int res1 = 0 ; int argvi = 0; dXSARGS; if ((items < 1) || (items > 1)) { SWIG_croak("Usage: delete_idmef_data_t_data(self);"); } res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_idmef_data_t_data, SWIG_POINTER_DISOWN | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_idmef_data_t_data" "', argument " "1"" of type '" "idmef_data_t_data *""'"); } arg1 = (idmef_data_t_data *)(argp1); free((char *) arg1); ST(argvi) = sv_newmortal(); XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_data_new) { { idmef_data_t **arg1 = (idmef_data_t **) 0 ; idmef_data_t *tmp1 ; int argvi = 0; SV * _saved[1] ; int result; dXSARGS; if ((items < 1) || (items > 1)) { SWIG_croak("Usage: idmef_data_new(data);"); } { arg1 = (idmef_data_t **) &tmp1; } _saved[0] = ST(0); result = (int)idmef_data_new(arg1); { ST(argvi) = newSViv(result); argvi++; } { SV *sv; if ( result >= 0 ) { if ( ! SvROK(_saved[0]) ) { croak("Argument 1 is not a reference."); return; } sv = SvRV(_saved[0]); sv_setsv(sv, SWIG_NewPointerObj((void *) * arg1, SWIGTYPE_p_idmef_data_t, 0)); } } XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_data_ref) { { idmef_data_t *arg1 = (idmef_data_t *) 0 ; int argvi = 0; idmef_data_t *result = 0 ; dXSARGS; if ((items < 1) || (items > 1)) { SWIG_croak("Usage: idmef_data_ref(data);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_data_t, 0) ) { croak("Expected type idmef_data_t * for argument 1."); return; } } result = (idmef_data_t *)idmef_data_ref(arg1); { ST(argvi) = swig_perl_data(result); argvi++; } XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_data_new_char) { { idmef_data_t **arg1 = (idmef_data_t **) 0 ; char arg2 ; idmef_data_t *tmp1 ; char val2 ; int ecode2 = 0 ; int argvi = 0; SV * _saved[1] ; int result; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: idmef_data_new_char(data,c);"); } { arg1 = (idmef_data_t **) &tmp1; } ecode2 = SWIG_AsVal_char SWIG_PERL_CALL_ARGS_2(ST(1), &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "idmef_data_new_char" "', argument " "2"" of type '" "char""'"); } arg2 = (char)(val2); _saved[0] = ST(0); result = (int)idmef_data_new_char(arg1,arg2); { ST(argvi) = newSViv(result); argvi++; } { SV *sv; if ( result >= 0 ) { if ( ! SvROK(_saved[0]) ) { croak("Argument 1 is not a reference."); return; } sv = SvRV(_saved[0]); sv_setsv(sv, SWIG_NewPointerObj((void *) * arg1, SWIGTYPE_p_idmef_data_t, 0)); } } XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_data_new_byte) { { idmef_data_t **arg1 = (idmef_data_t **) 0 ; uint8_t arg2 ; idmef_data_t *tmp1 ; unsigned char val2 ; int ecode2 = 0 ; int argvi = 0; SV * _saved[1] ; int result; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: idmef_data_new_byte(data,i);"); } { arg1 = (idmef_data_t **) &tmp1; } ecode2 = SWIG_AsVal_unsigned_SS_char SWIG_PERL_CALL_ARGS_2(ST(1), &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "idmef_data_new_byte" "', argument " "2"" of type '" "uint8_t""'"); } arg2 = (uint8_t)(val2); _saved[0] = ST(0); result = (int)idmef_data_new_byte(arg1,arg2); { ST(argvi) = newSViv(result); argvi++; } { SV *sv; if ( result >= 0 ) { if ( ! SvROK(_saved[0]) ) { croak("Argument 1 is not a reference."); return; } sv = SvRV(_saved[0]); sv_setsv(sv, SWIG_NewPointerObj((void *) * arg1, SWIGTYPE_p_idmef_data_t, 0)); } } XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_data_new_uint32) { { idmef_data_t **arg1 = (idmef_data_t **) 0 ; uint32_t arg2 ; idmef_data_t *tmp1 ; unsigned int val2 ; int ecode2 = 0 ; int argvi = 0; SV * _saved[1] ; int result; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: idmef_data_new_uint32(data,i);"); } { arg1 = (idmef_data_t **) &tmp1; } ecode2 = SWIG_AsVal_unsigned_SS_int SWIG_PERL_CALL_ARGS_2(ST(1), &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "idmef_data_new_uint32" "', argument " "2"" of type '" "uint32_t""'"); } arg2 = (uint32_t)(val2); _saved[0] = ST(0); result = (int)idmef_data_new_uint32(arg1,arg2); { ST(argvi) = newSViv(result); argvi++; } { SV *sv; if ( result >= 0 ) { if ( ! SvROK(_saved[0]) ) { croak("Argument 1 is not a reference."); return; } sv = SvRV(_saved[0]); sv_setsv(sv, SWIG_NewPointerObj((void *) * arg1, SWIGTYPE_p_idmef_data_t, 0)); } } XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_data_new_uint64) { { idmef_data_t **arg1 = (idmef_data_t **) 0 ; uint64_t arg2 ; idmef_data_t *tmp1 ; unsigned long long val2 ; int ecode2 = 0 ; int argvi = 0; SV * _saved[1] ; int result; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: idmef_data_new_uint64(data,i);"); } { arg1 = (idmef_data_t **) &tmp1; } ecode2 = SWIG_AsVal_unsigned_SS_long_SS_long SWIG_PERL_CALL_ARGS_2(ST(1), &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "idmef_data_new_uint64" "', argument " "2"" of type '" "uint64_t""'"); } arg2 = (uint64_t)(val2); _saved[0] = ST(0); result = (int)idmef_data_new_uint64(arg1,arg2); { ST(argvi) = newSViv(result); argvi++; } { SV *sv; if ( result >= 0 ) { if ( ! SvROK(_saved[0]) ) { croak("Argument 1 is not a reference."); return; } sv = SvRV(_saved[0]); sv_setsv(sv, SWIG_NewPointerObj((void *) * arg1, SWIGTYPE_p_idmef_data_t, 0)); } } XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_data_new_float) { { idmef_data_t **arg1 = (idmef_data_t **) 0 ; float arg2 ; idmef_data_t *tmp1 ; float val2 ; int ecode2 = 0 ; int argvi = 0; SV * _saved[1] ; int result; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: idmef_data_new_float(data,f);"); } { arg1 = (idmef_data_t **) &tmp1; } ecode2 = SWIG_AsVal_float SWIG_PERL_CALL_ARGS_2(ST(1), &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "idmef_data_new_float" "', argument " "2"" of type '" "float""'"); } arg2 = (float)(val2); _saved[0] = ST(0); result = (int)idmef_data_new_float(arg1,arg2); { ST(argvi) = newSViv(result); argvi++; } { SV *sv; if ( result >= 0 ) { if ( ! SvROK(_saved[0]) ) { croak("Argument 1 is not a reference."); return; } sv = SvRV(_saved[0]); sv_setsv(sv, SWIG_NewPointerObj((void *) * arg1, SWIGTYPE_p_idmef_data_t, 0)); } } XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_data_set_char) { { idmef_data_t *arg1 = (idmef_data_t *) 0 ; char arg2 ; char val2 ; int ecode2 = 0 ; int argvi = 0; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: idmef_data_set_char(data,c);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_data_t, 0) ) { croak("Expected type idmef_data_t * for argument 1."); return; } } ecode2 = SWIG_AsVal_char SWIG_PERL_CALL_ARGS_2(ST(1), &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "idmef_data_set_char" "', argument " "2"" of type '" "char""'"); } arg2 = (char)(val2); idmef_data_set_char(arg1,arg2); ST(argvi) = sv_newmortal(); XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_data_set_byte) { { idmef_data_t *arg1 = (idmef_data_t *) 0 ; uint8_t arg2 ; unsigned char val2 ; int ecode2 = 0 ; int argvi = 0; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: idmef_data_set_byte(data,i);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_data_t, 0) ) { croak("Expected type idmef_data_t * for argument 1."); return; } } ecode2 = SWIG_AsVal_unsigned_SS_char SWIG_PERL_CALL_ARGS_2(ST(1), &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "idmef_data_set_byte" "', argument " "2"" of type '" "uint8_t""'"); } arg2 = (uint8_t)(val2); idmef_data_set_byte(arg1,arg2); ST(argvi) = sv_newmortal(); XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_data_set_uint32) { { idmef_data_t *arg1 = (idmef_data_t *) 0 ; uint32_t arg2 ; unsigned int val2 ; int ecode2 = 0 ; int argvi = 0; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: idmef_data_set_uint32(data,i);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_data_t, 0) ) { croak("Expected type idmef_data_t * for argument 1."); return; } } ecode2 = SWIG_AsVal_unsigned_SS_int SWIG_PERL_CALL_ARGS_2(ST(1), &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "idmef_data_set_uint32" "', argument " "2"" of type '" "uint32_t""'"); } arg2 = (uint32_t)(val2); idmef_data_set_uint32(arg1,arg2); ST(argvi) = sv_newmortal(); XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_data_set_uint64) { { idmef_data_t *arg1 = (idmef_data_t *) 0 ; uint64_t arg2 ; unsigned long long val2 ; int ecode2 = 0 ; int argvi = 0; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: idmef_data_set_uint64(data,i);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_data_t, 0) ) { croak("Expected type idmef_data_t * for argument 1."); return; } } ecode2 = SWIG_AsVal_unsigned_SS_long_SS_long SWIG_PERL_CALL_ARGS_2(ST(1), &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "idmef_data_set_uint64" "', argument " "2"" of type '" "uint64_t""'"); } arg2 = (uint64_t)(val2); idmef_data_set_uint64(arg1,arg2); ST(argvi) = sv_newmortal(); XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_data_set_float) { { idmef_data_t *arg1 = (idmef_data_t *) 0 ; float arg2 ; float val2 ; int ecode2 = 0 ; int argvi = 0; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: idmef_data_set_float(data,f);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_data_t, 0) ) { croak("Expected type idmef_data_t * for argument 1."); return; } } ecode2 = SWIG_AsVal_float SWIG_PERL_CALL_ARGS_2(ST(1), &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "idmef_data_set_float" "', argument " "2"" of type '" "float""'"); } arg2 = (float)(val2); idmef_data_set_float(arg1,arg2); ST(argvi) = sv_newmortal(); XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_data_set_ptr_dup_fast) { { idmef_data_t *arg1 = (idmef_data_t *) 0 ; idmef_data_type_t arg2 ; void *arg3 = (void *) 0 ; size_t arg4 ; int val2 ; int ecode2 = 0 ; int res3 ; size_t val4 ; int ecode4 = 0 ; int argvi = 0; int result; dXSARGS; if ((items < 4) || (items > 4)) { SWIG_croak("Usage: idmef_data_set_ptr_dup_fast(data,type,ptr,len);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_data_t, 0) ) { croak("Expected type idmef_data_t * for argument 1."); return; } } ecode2 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(1), &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "idmef_data_set_ptr_dup_fast" "', argument " "2"" of type '" "idmef_data_type_t""'"); } arg2 = (idmef_data_type_t)(val2); res3 = SWIG_ConvertPtr(ST(2),SWIG_as_voidptrptr(&arg3), 0, 0); if (!SWIG_IsOK(res3)) { SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "idmef_data_set_ptr_dup_fast" "', argument " "3"" of type '" "void const *""'"); } ecode4 = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(3), &val4); if (!SWIG_IsOK(ecode4)) { SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "idmef_data_set_ptr_dup_fast" "', argument " "4"" of type '" "size_t""'"); } arg4 = (size_t)(val4); result = (int)idmef_data_set_ptr_dup_fast(arg1,arg2,(void const *)arg3,arg4); { ST(argvi) = newSViv(result); argvi++; } XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_data_set_ptr_ref_fast) { { idmef_data_t *arg1 = (idmef_data_t *) 0 ; idmef_data_type_t arg2 ; void *arg3 = (void *) 0 ; size_t arg4 ; int val2 ; int ecode2 = 0 ; int res3 ; size_t val4 ; int ecode4 = 0 ; int argvi = 0; int result; dXSARGS; if ((items < 4) || (items > 4)) { SWIG_croak("Usage: idmef_data_set_ptr_ref_fast(data,type,ptr,len);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_data_t, 0) ) { croak("Expected type idmef_data_t * for argument 1."); return; } } ecode2 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(1), &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "idmef_data_set_ptr_ref_fast" "', argument " "2"" of type '" "idmef_data_type_t""'"); } arg2 = (idmef_data_type_t)(val2); res3 = SWIG_ConvertPtr(ST(2),SWIG_as_voidptrptr(&arg3), 0, 0); if (!SWIG_IsOK(res3)) { SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "idmef_data_set_ptr_ref_fast" "', argument " "3"" of type '" "void const *""'"); } ecode4 = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(3), &val4); if (!SWIG_IsOK(ecode4)) { SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "idmef_data_set_ptr_ref_fast" "', argument " "4"" of type '" "size_t""'"); } arg4 = (size_t)(val4); result = (int)idmef_data_set_ptr_ref_fast(arg1,arg2,(void const *)arg3,arg4); { ST(argvi) = newSViv(result); argvi++; } XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_data_set_ptr_nodup_fast) { { idmef_data_t *arg1 = (idmef_data_t *) 0 ; idmef_data_type_t arg2 ; void *arg3 = (void *) 0 ; size_t arg4 ; int val2 ; int ecode2 = 0 ; int res3 ; size_t val4 ; int ecode4 = 0 ; int argvi = 0; int result; dXSARGS; if ((items < 4) || (items > 4)) { SWIG_croak("Usage: idmef_data_set_ptr_nodup_fast(data,type,ptr,len);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_data_t, 0) ) { croak("Expected type idmef_data_t * for argument 1."); return; } } ecode2 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(1), &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "idmef_data_set_ptr_nodup_fast" "', argument " "2"" of type '" "idmef_data_type_t""'"); } arg2 = (idmef_data_type_t)(val2); res3 = SWIG_ConvertPtr(ST(2),SWIG_as_voidptrptr(&arg3), 0, 0); if (!SWIG_IsOK(res3)) { SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "idmef_data_set_ptr_nodup_fast" "', argument " "3"" of type '" "void *""'"); } ecode4 = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(3), &val4); if (!SWIG_IsOK(ecode4)) { SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "idmef_data_set_ptr_nodup_fast" "', argument " "4"" of type '" "size_t""'"); } arg4 = (size_t)(val4); result = (int)idmef_data_set_ptr_nodup_fast(arg1,arg2,arg3,arg4); { ST(argvi) = newSViv(result); argvi++; } XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_data_new_ptr_dup_fast) { { idmef_data_t **arg1 = (idmef_data_t **) 0 ; idmef_data_type_t arg2 ; void *arg3 = (void *) 0 ; size_t arg4 ; idmef_data_t *tmp1 ; int val2 ; int ecode2 = 0 ; int res3 ; size_t val4 ; int ecode4 = 0 ; int argvi = 0; SV * _saved[1] ; int result; dXSARGS; if ((items < 4) || (items > 4)) { SWIG_croak("Usage: idmef_data_new_ptr_dup_fast(data,type,ptr,len);"); } { arg1 = (idmef_data_t **) &tmp1; } ecode2 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(1), &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "idmef_data_new_ptr_dup_fast" "', argument " "2"" of type '" "idmef_data_type_t""'"); } arg2 = (idmef_data_type_t)(val2); res3 = SWIG_ConvertPtr(ST(2),SWIG_as_voidptrptr(&arg3), 0, 0); if (!SWIG_IsOK(res3)) { SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "idmef_data_new_ptr_dup_fast" "', argument " "3"" of type '" "void const *""'"); } ecode4 = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(3), &val4); if (!SWIG_IsOK(ecode4)) { SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "idmef_data_new_ptr_dup_fast" "', argument " "4"" of type '" "size_t""'"); } arg4 = (size_t)(val4); _saved[0] = ST(0); result = (int)idmef_data_new_ptr_dup_fast(arg1,arg2,(void const *)arg3,arg4); { ST(argvi) = newSViv(result); argvi++; } { SV *sv; if ( result >= 0 ) { if ( ! SvROK(_saved[0]) ) { croak("Argument 1 is not a reference."); return; } sv = SvRV(_saved[0]); sv_setsv(sv, SWIG_NewPointerObj((void *) * arg1, SWIGTYPE_p_idmef_data_t, 0)); } } XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_data_new_ptr_ref_fast) { { idmef_data_t **arg1 = (idmef_data_t **) 0 ; idmef_data_type_t arg2 ; void *arg3 = (void *) 0 ; size_t arg4 ; idmef_data_t *tmp1 ; int val2 ; int ecode2 = 0 ; int res3 ; size_t val4 ; int ecode4 = 0 ; int argvi = 0; SV * _saved[1] ; int result; dXSARGS; if ((items < 4) || (items > 4)) { SWIG_croak("Usage: idmef_data_new_ptr_ref_fast(data,type,ptr,len);"); } { arg1 = (idmef_data_t **) &tmp1; } ecode2 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(1), &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "idmef_data_new_ptr_ref_fast" "', argument " "2"" of type '" "idmef_data_type_t""'"); } arg2 = (idmef_data_type_t)(val2); res3 = SWIG_ConvertPtr(ST(2),SWIG_as_voidptrptr(&arg3), 0, 0); if (!SWIG_IsOK(res3)) { SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "idmef_data_new_ptr_ref_fast" "', argument " "3"" of type '" "void const *""'"); } ecode4 = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(3), &val4); if (!SWIG_IsOK(ecode4)) { SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "idmef_data_new_ptr_ref_fast" "', argument " "4"" of type '" "size_t""'"); } arg4 = (size_t)(val4); _saved[0] = ST(0); result = (int)idmef_data_new_ptr_ref_fast(arg1,arg2,(void const *)arg3,arg4); { ST(argvi) = newSViv(result); argvi++; } { SV *sv; if ( result >= 0 ) { if ( ! SvROK(_saved[0]) ) { croak("Argument 1 is not a reference."); return; } sv = SvRV(_saved[0]); sv_setsv(sv, SWIG_NewPointerObj((void *) * arg1, SWIGTYPE_p_idmef_data_t, 0)); } } XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_data_new_ptr_nodup_fast) { { idmef_data_t **arg1 = (idmef_data_t **) 0 ; idmef_data_type_t arg2 ; void *arg3 = (void *) 0 ; size_t arg4 ; idmef_data_t *tmp1 ; int val2 ; int ecode2 = 0 ; int res3 ; size_t val4 ; int ecode4 = 0 ; int argvi = 0; SV * _saved[1] ; int result; dXSARGS; if ((items < 4) || (items > 4)) { SWIG_croak("Usage: idmef_data_new_ptr_nodup_fast(data,type,ptr,len);"); } { arg1 = (idmef_data_t **) &tmp1; } ecode2 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(1), &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "idmef_data_new_ptr_nodup_fast" "', argument " "2"" of type '" "idmef_data_type_t""'"); } arg2 = (idmef_data_type_t)(val2); res3 = SWIG_ConvertPtr(ST(2),SWIG_as_voidptrptr(&arg3), 0, 0); if (!SWIG_IsOK(res3)) { SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "idmef_data_new_ptr_nodup_fast" "', argument " "3"" of type '" "void *""'"); } ecode4 = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(3), &val4); if (!SWIG_IsOK(ecode4)) { SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "idmef_data_new_ptr_nodup_fast" "', argument " "4"" of type '" "size_t""'"); } arg4 = (size_t)(val4); _saved[0] = ST(0); result = (int)idmef_data_new_ptr_nodup_fast(arg1,arg2,arg3,arg4); { ST(argvi) = newSViv(result); argvi++; } { SV *sv; if ( result >= 0 ) { if ( ! SvROK(_saved[0]) ) { croak("Argument 1 is not a reference."); return; } sv = SvRV(_saved[0]); sv_setsv(sv, SWIG_NewPointerObj((void *) * arg1, SWIGTYPE_p_idmef_data_t, 0)); } } XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_data_set_char_string_dup_fast) { { idmef_data_t *arg1 = (idmef_data_t *) 0 ; char *arg2 = (char *) 0 ; size_t arg3 ; int res2 ; char *buf2 = 0 ; int alloc2 = 0 ; size_t val3 ; int ecode3 = 0 ; int argvi = 0; int result; dXSARGS; if ((items < 3) || (items > 3)) { SWIG_croak("Usage: idmef_data_set_char_string_dup_fast(data,str,len);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_data_t, 0) ) { croak("Expected type idmef_data_t * for argument 1."); return; } } res2 = SWIG_AsCharPtrAndSize(ST(1), &buf2, NULL, &alloc2); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "idmef_data_set_char_string_dup_fast" "', argument " "2"" of type '" "char const *""'"); } arg2 = (char *)(buf2); ecode3 = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(2), &val3); if (!SWIG_IsOK(ecode3)) { SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "idmef_data_set_char_string_dup_fast" "', argument " "3"" of type '" "size_t""'"); } arg3 = (size_t)(val3); result = (int)idmef_data_set_char_string_dup_fast(arg1,(char const *)arg2,arg3); { ST(argvi) = newSViv(result); argvi++; } if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); XSRETURN(argvi); fail: if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); SWIG_croak_null(); } } XS(_wrap_idmef_data_new_char_string_dup_fast) { { idmef_data_t **arg1 = (idmef_data_t **) 0 ; char *arg2 = (char *) 0 ; size_t arg3 ; idmef_data_t *tmp1 ; int res2 ; char *buf2 = 0 ; int alloc2 = 0 ; size_t val3 ; int ecode3 = 0 ; int argvi = 0; SV * _saved[1] ; int result; dXSARGS; if ((items < 3) || (items > 3)) { SWIG_croak("Usage: idmef_data_new_char_string_dup_fast(data,str,len);"); } { arg1 = (idmef_data_t **) &tmp1; } res2 = SWIG_AsCharPtrAndSize(ST(1), &buf2, NULL, &alloc2); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "idmef_data_new_char_string_dup_fast" "', argument " "2"" of type '" "char const *""'"); } arg2 = (char *)(buf2); ecode3 = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(2), &val3); if (!SWIG_IsOK(ecode3)) { SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "idmef_data_new_char_string_dup_fast" "', argument " "3"" of type '" "size_t""'"); } arg3 = (size_t)(val3); _saved[0] = ST(0); result = (int)idmef_data_new_char_string_dup_fast(arg1,(char const *)arg2,arg3); { ST(argvi) = newSViv(result); argvi++; } { SV *sv; if ( result >= 0 ) { if ( ! SvROK(_saved[0]) ) { croak("Argument 1 is not a reference."); return; } sv = SvRV(_saved[0]); sv_setsv(sv, SWIG_NewPointerObj((void *) * arg1, SWIGTYPE_p_idmef_data_t, 0)); } } if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); XSRETURN(argvi); fail: if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); SWIG_croak_null(); } } XS(_wrap_idmef_data_new_char_string_ref_fast) { { idmef_data_t **arg1 = (idmef_data_t **) 0 ; char *arg2 = (char *) 0 ; size_t arg3 ; idmef_data_t *tmp1 ; int res2 ; char *buf2 = 0 ; int alloc2 = 0 ; size_t val3 ; int ecode3 = 0 ; int argvi = 0; SV * _saved[1] ; int result; dXSARGS; if ((items < 3) || (items > 3)) { SWIG_croak("Usage: idmef_data_new_char_string_ref_fast(data,ptr,len);"); } { arg1 = (idmef_data_t **) &tmp1; } res2 = SWIG_AsCharPtrAndSize(ST(1), &buf2, NULL, &alloc2); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "idmef_data_new_char_string_ref_fast" "', argument " "2"" of type '" "char const *""'"); } arg2 = (char *)(buf2); ecode3 = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(2), &val3); if (!SWIG_IsOK(ecode3)) { SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "idmef_data_new_char_string_ref_fast" "', argument " "3"" of type '" "size_t""'"); } arg3 = (size_t)(val3); _saved[0] = ST(0); result = (int)idmef_data_new_char_string_ref_fast(arg1,(char const *)arg2,arg3); { ST(argvi) = newSViv(result); argvi++; } { SV *sv; if ( result >= 0 ) { if ( ! SvROK(_saved[0]) ) { croak("Argument 1 is not a reference."); return; } sv = SvRV(_saved[0]); sv_setsv(sv, SWIG_NewPointerObj((void *) * arg1, SWIGTYPE_p_idmef_data_t, 0)); } } if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); XSRETURN(argvi); fail: if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); SWIG_croak_null(); } } XS(_wrap_idmef_data_new_char_string_nodup_fast) { { idmef_data_t **arg1 = (idmef_data_t **) 0 ; char *arg2 = (char *) 0 ; size_t arg3 ; idmef_data_t *tmp1 ; int res2 ; char *buf2 = 0 ; int alloc2 = 0 ; size_t val3 ; int ecode3 = 0 ; int argvi = 0; SV * _saved[1] ; int result; dXSARGS; if ((items < 3) || (items > 3)) { SWIG_croak("Usage: idmef_data_new_char_string_nodup_fast(data,ptr,len);"); } { arg1 = (idmef_data_t **) &tmp1; } res2 = SWIG_AsCharPtrAndSize(ST(1), &buf2, NULL, &alloc2); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "idmef_data_new_char_string_nodup_fast" "', argument " "2"" of type '" "char *""'"); } arg2 = (char *)(buf2); ecode3 = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(2), &val3); if (!SWIG_IsOK(ecode3)) { SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "idmef_data_new_char_string_nodup_fast" "', argument " "3"" of type '" "size_t""'"); } arg3 = (size_t)(val3); _saved[0] = ST(0); result = (int)idmef_data_new_char_string_nodup_fast(arg1,arg2,arg3); { ST(argvi) = newSViv(result); argvi++; } { SV *sv; if ( result >= 0 ) { if ( ! SvROK(_saved[0]) ) { croak("Argument 1 is not a reference."); return; } sv = SvRV(_saved[0]); sv_setsv(sv, SWIG_NewPointerObj((void *) * arg1, SWIGTYPE_p_idmef_data_t, 0)); } } if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); XSRETURN(argvi); fail: if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); SWIG_croak_null(); } } XS(_wrap_idmef_data_set_char_string_ref_fast) { { idmef_data_t *arg1 = (idmef_data_t *) 0 ; char *arg2 = (char *) 0 ; size_t arg3 ; int res2 ; char *buf2 = 0 ; int alloc2 = 0 ; size_t val3 ; int ecode3 = 0 ; int argvi = 0; int result; dXSARGS; if ((items < 3) || (items > 3)) { SWIG_croak("Usage: idmef_data_set_char_string_ref_fast(data,ptr,len);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_data_t, 0) ) { croak("Expected type idmef_data_t * for argument 1."); return; } } res2 = SWIG_AsCharPtrAndSize(ST(1), &buf2, NULL, &alloc2); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "idmef_data_set_char_string_ref_fast" "', argument " "2"" of type '" "char const *""'"); } arg2 = (char *)(buf2); ecode3 = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(2), &val3); if (!SWIG_IsOK(ecode3)) { SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "idmef_data_set_char_string_ref_fast" "', argument " "3"" of type '" "size_t""'"); } arg3 = (size_t)(val3); result = (int)idmef_data_set_char_string_ref_fast(arg1,(char const *)arg2,arg3); { ST(argvi) = newSViv(result); argvi++; } if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); XSRETURN(argvi); fail: if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); SWIG_croak_null(); } } XS(_wrap_idmef_data_set_char_string_nodup_fast) { { idmef_data_t *arg1 = (idmef_data_t *) 0 ; char *arg2 = (char *) 0 ; size_t arg3 ; int res2 ; char *buf2 = 0 ; int alloc2 = 0 ; size_t val3 ; int ecode3 = 0 ; int argvi = 0; int result; dXSARGS; if ((items < 3) || (items > 3)) { SWIG_croak("Usage: idmef_data_set_char_string_nodup_fast(data,ptr,len);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_data_t, 0) ) { croak("Expected type idmef_data_t * for argument 1."); return; } } res2 = SWIG_AsCharPtrAndSize(ST(1), &buf2, NULL, &alloc2); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "idmef_data_set_char_string_nodup_fast" "', argument " "2"" of type '" "char *""'"); } arg2 = (char *)(buf2); ecode3 = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(2), &val3); if (!SWIG_IsOK(ecode3)) { SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "idmef_data_set_char_string_nodup_fast" "', argument " "3"" of type '" "size_t""'"); } arg3 = (size_t)(val3); result = (int)idmef_data_set_char_string_nodup_fast(arg1,arg2,arg3); { ST(argvi) = newSViv(result); argvi++; } if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); XSRETURN(argvi); fail: if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); SWIG_croak_null(); } } XS(_wrap_idmef_data_new_char_string_ref) { { idmef_data_t **arg1 = (idmef_data_t **) 0 ; char *arg2 = (char *) 0 ; idmef_data_t *tmp1 ; int res2 ; char *buf2 = 0 ; int alloc2 = 0 ; int argvi = 0; SV * _saved[1] ; int result; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: idmef_data_new_char_string_ref(data,ptr);"); } { arg1 = (idmef_data_t **) &tmp1; } res2 = SWIG_AsCharPtrAndSize(ST(1), &buf2, NULL, &alloc2); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "idmef_data_new_char_string_ref" "', argument " "2"" of type '" "char const *""'"); } arg2 = (char *)(buf2); _saved[0] = ST(0); result = (int)idmef_data_new_char_string_ref(arg1,(char const *)arg2); { ST(argvi) = newSViv(result); argvi++; } { SV *sv; if ( result >= 0 ) { if ( ! SvROK(_saved[0]) ) { croak("Argument 1 is not a reference."); return; } sv = SvRV(_saved[0]); sv_setsv(sv, SWIG_NewPointerObj((void *) * arg1, SWIGTYPE_p_idmef_data_t, 0)); } } if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); XSRETURN(argvi); fail: if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); SWIG_croak_null(); } } XS(_wrap_idmef_data_new_char_string_dup) { { idmef_data_t **arg1 = (idmef_data_t **) 0 ; char *arg2 = (char *) 0 ; idmef_data_t *tmp1 ; int res2 ; char *buf2 = 0 ; int alloc2 = 0 ; int argvi = 0; SV * _saved[1] ; int result; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: idmef_data_new_char_string_dup(data,ptr);"); } { arg1 = (idmef_data_t **) &tmp1; } res2 = SWIG_AsCharPtrAndSize(ST(1), &buf2, NULL, &alloc2); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "idmef_data_new_char_string_dup" "', argument " "2"" of type '" "char const *""'"); } arg2 = (char *)(buf2); _saved[0] = ST(0); result = (int)idmef_data_new_char_string_dup(arg1,(char const *)arg2); { ST(argvi) = newSViv(result); argvi++; } { SV *sv; if ( result >= 0 ) { if ( ! SvROK(_saved[0]) ) { croak("Argument 1 is not a reference."); return; } sv = SvRV(_saved[0]); sv_setsv(sv, SWIG_NewPointerObj((void *) * arg1, SWIGTYPE_p_idmef_data_t, 0)); } } if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); XSRETURN(argvi); fail: if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); SWIG_croak_null(); } } XS(_wrap_idmef_data_new_char_string_nodup) { { idmef_data_t **arg1 = (idmef_data_t **) 0 ; char *arg2 = (char *) 0 ; idmef_data_t *tmp1 ; int res2 ; char *buf2 = 0 ; int alloc2 = 0 ; int argvi = 0; SV * _saved[1] ; int result; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: idmef_data_new_char_string_nodup(data,ptr);"); } { arg1 = (idmef_data_t **) &tmp1; } res2 = SWIG_AsCharPtrAndSize(ST(1), &buf2, NULL, &alloc2); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "idmef_data_new_char_string_nodup" "', argument " "2"" of type '" "char *""'"); } arg2 = (char *)(buf2); _saved[0] = ST(0); result = (int)idmef_data_new_char_string_nodup(arg1,arg2); { ST(argvi) = newSViv(result); argvi++; } { SV *sv; if ( result >= 0 ) { if ( ! SvROK(_saved[0]) ) { croak("Argument 1 is not a reference."); return; } sv = SvRV(_saved[0]); sv_setsv(sv, SWIG_NewPointerObj((void *) * arg1, SWIGTYPE_p_idmef_data_t, 0)); } } if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); XSRETURN(argvi); fail: if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); SWIG_croak_null(); } } XS(_wrap_idmef_data_set_char_string_ref) { { idmef_data_t *arg1 = (idmef_data_t *) 0 ; char *arg2 = (char *) 0 ; int res2 ; char *buf2 = 0 ; int alloc2 = 0 ; int argvi = 0; int result; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: idmef_data_set_char_string_ref(data,ptr);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_data_t, 0) ) { croak("Expected type idmef_data_t * for argument 1."); return; } } res2 = SWIG_AsCharPtrAndSize(ST(1), &buf2, NULL, &alloc2); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "idmef_data_set_char_string_ref" "', argument " "2"" of type '" "char const *""'"); } arg2 = (char *)(buf2); result = (int)idmef_data_set_char_string_ref(arg1,(char const *)arg2); { ST(argvi) = newSViv(result); argvi++; } if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); XSRETURN(argvi); fail: if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); SWIG_croak_null(); } } XS(_wrap_idmef_data_set_char_string_dup) { { idmef_data_t *arg1 = (idmef_data_t *) 0 ; char *arg2 = (char *) 0 ; int res2 ; char *buf2 = 0 ; int alloc2 = 0 ; int argvi = 0; int result; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: idmef_data_set_char_string_dup(data,ptr);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_data_t, 0) ) { croak("Expected type idmef_data_t * for argument 1."); return; } } res2 = SWIG_AsCharPtrAndSize(ST(1), &buf2, NULL, &alloc2); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "idmef_data_set_char_string_dup" "', argument " "2"" of type '" "char const *""'"); } arg2 = (char *)(buf2); result = (int)idmef_data_set_char_string_dup(arg1,(char const *)arg2); { ST(argvi) = newSViv(result); argvi++; } if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); XSRETURN(argvi); fail: if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); SWIG_croak_null(); } } XS(_wrap_idmef_data_set_char_string_nodup) { { idmef_data_t *arg1 = (idmef_data_t *) 0 ; char *arg2 = (char *) 0 ; int res2 ; char *buf2 = 0 ; int alloc2 = 0 ; int argvi = 0; int result; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: idmef_data_set_char_string_nodup(data,ptr);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_data_t, 0) ) { croak("Expected type idmef_data_t * for argument 1."); return; } } res2 = SWIG_AsCharPtrAndSize(ST(1), &buf2, NULL, &alloc2); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "idmef_data_set_char_string_nodup" "', argument " "2"" of type '" "char *""'"); } arg2 = (char *)(buf2); result = (int)idmef_data_set_char_string_nodup(arg1,arg2); { ST(argvi) = newSViv(result); argvi++; } if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); XSRETURN(argvi); fail: if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); SWIG_croak_null(); } } XS(_wrap_idmef_data_new_byte_string_ref) { { idmef_data_t **arg1 = (idmef_data_t **) 0 ; unsigned char *arg2 = (unsigned char *) 0 ; size_t arg3 ; idmef_data_t *tmp1 ; void *argp2 = 0 ; int res2 = 0 ; size_t val3 ; int ecode3 = 0 ; int argvi = 0; SV * _saved[1] ; int result; dXSARGS; if ((items < 3) || (items > 3)) { SWIG_croak("Usage: idmef_data_new_byte_string_ref(data,ptr,len);"); } { arg1 = (idmef_data_t **) &tmp1; } res2 = SWIG_ConvertPtr(ST(1), &argp2,SWIGTYPE_p_unsigned_char, 0 | 0 ); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "idmef_data_new_byte_string_ref" "', argument " "2"" of type '" "unsigned char const *""'"); } arg2 = (unsigned char *)(argp2); ecode3 = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(2), &val3); if (!SWIG_IsOK(ecode3)) { SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "idmef_data_new_byte_string_ref" "', argument " "3"" of type '" "size_t""'"); } arg3 = (size_t)(val3); _saved[0] = ST(0); result = (int)idmef_data_new_byte_string_ref(arg1,(unsigned char const *)arg2,arg3); { ST(argvi) = newSViv(result); argvi++; } { SV *sv; if ( result >= 0 ) { if ( ! SvROK(_saved[0]) ) { croak("Argument 1 is not a reference."); return; } sv = SvRV(_saved[0]); sv_setsv(sv, SWIG_NewPointerObj((void *) * arg1, SWIGTYPE_p_idmef_data_t, 0)); } } XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_data_new_byte_string_dup) { { idmef_data_t **arg1 = (idmef_data_t **) 0 ; unsigned char *arg2 = (unsigned char *) 0 ; size_t arg3 ; idmef_data_t *tmp1 ; void *argp2 = 0 ; int res2 = 0 ; size_t val3 ; int ecode3 = 0 ; int argvi = 0; SV * _saved[1] ; int result; dXSARGS; if ((items < 3) || (items > 3)) { SWIG_croak("Usage: idmef_data_new_byte_string_dup(data,ptr,len);"); } { arg1 = (idmef_data_t **) &tmp1; } res2 = SWIG_ConvertPtr(ST(1), &argp2,SWIGTYPE_p_unsigned_char, 0 | 0 ); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "idmef_data_new_byte_string_dup" "', argument " "2"" of type '" "unsigned char const *""'"); } arg2 = (unsigned char *)(argp2); ecode3 = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(2), &val3); if (!SWIG_IsOK(ecode3)) { SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "idmef_data_new_byte_string_dup" "', argument " "3"" of type '" "size_t""'"); } arg3 = (size_t)(val3); _saved[0] = ST(0); result = (int)idmef_data_new_byte_string_dup(arg1,(unsigned char const *)arg2,arg3); { ST(argvi) = newSViv(result); argvi++; } { SV *sv; if ( result >= 0 ) { if ( ! SvROK(_saved[0]) ) { croak("Argument 1 is not a reference."); return; } sv = SvRV(_saved[0]); sv_setsv(sv, SWIG_NewPointerObj((void *) * arg1, SWIGTYPE_p_idmef_data_t, 0)); } } XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_data_new_byte_string_nodup) { { idmef_data_t **arg1 = (idmef_data_t **) 0 ; unsigned char *arg2 = (unsigned char *) 0 ; size_t arg3 ; idmef_data_t *tmp1 ; void *argp2 = 0 ; int res2 = 0 ; size_t val3 ; int ecode3 = 0 ; int argvi = 0; SV * _saved[1] ; int result; dXSARGS; if ((items < 3) || (items > 3)) { SWIG_croak("Usage: idmef_data_new_byte_string_nodup(data,ptr,len);"); } { arg1 = (idmef_data_t **) &tmp1; } res2 = SWIG_ConvertPtr(ST(1), &argp2,SWIGTYPE_p_unsigned_char, 0 | 0 ); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "idmef_data_new_byte_string_nodup" "', argument " "2"" of type '" "unsigned char *""'"); } arg2 = (unsigned char *)(argp2); ecode3 = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(2), &val3); if (!SWIG_IsOK(ecode3)) { SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "idmef_data_new_byte_string_nodup" "', argument " "3"" of type '" "size_t""'"); } arg3 = (size_t)(val3); _saved[0] = ST(0); result = (int)idmef_data_new_byte_string_nodup(arg1,arg2,arg3); { ST(argvi) = newSViv(result); argvi++; } { SV *sv; if ( result >= 0 ) { if ( ! SvROK(_saved[0]) ) { croak("Argument 1 is not a reference."); return; } sv = SvRV(_saved[0]); sv_setsv(sv, SWIG_NewPointerObj((void *) * arg1, SWIGTYPE_p_idmef_data_t, 0)); } } XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_data_set_byte_string_ref) { { idmef_data_t *arg1 = (idmef_data_t *) 0 ; unsigned char *arg2 = (unsigned char *) 0 ; size_t arg3 ; void *argp2 = 0 ; int res2 = 0 ; size_t val3 ; int ecode3 = 0 ; int argvi = 0; int result; dXSARGS; if ((items < 3) || (items > 3)) { SWIG_croak("Usage: idmef_data_set_byte_string_ref(data,ptr,len);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_data_t, 0) ) { croak("Expected type idmef_data_t * for argument 1."); return; } } res2 = SWIG_ConvertPtr(ST(1), &argp2,SWIGTYPE_p_unsigned_char, 0 | 0 ); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "idmef_data_set_byte_string_ref" "', argument " "2"" of type '" "unsigned char const *""'"); } arg2 = (unsigned char *)(argp2); ecode3 = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(2), &val3); if (!SWIG_IsOK(ecode3)) { SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "idmef_data_set_byte_string_ref" "', argument " "3"" of type '" "size_t""'"); } arg3 = (size_t)(val3); result = (int)idmef_data_set_byte_string_ref(arg1,(unsigned char const *)arg2,arg3); { ST(argvi) = newSViv(result); argvi++; } XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_data_set_byte_string_dup) { { idmef_data_t *arg1 = (idmef_data_t *) 0 ; unsigned char *arg2 = (unsigned char *) 0 ; size_t arg3 ; void *argp2 = 0 ; int res2 = 0 ; size_t val3 ; int ecode3 = 0 ; int argvi = 0; int result; dXSARGS; if ((items < 3) || (items > 3)) { SWIG_croak("Usage: idmef_data_set_byte_string_dup(data,ptr,len);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_data_t, 0) ) { croak("Expected type idmef_data_t * for argument 1."); return; } } res2 = SWIG_ConvertPtr(ST(1), &argp2,SWIGTYPE_p_unsigned_char, 0 | 0 ); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "idmef_data_set_byte_string_dup" "', argument " "2"" of type '" "unsigned char const *""'"); } arg2 = (unsigned char *)(argp2); ecode3 = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(2), &val3); if (!SWIG_IsOK(ecode3)) { SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "idmef_data_set_byte_string_dup" "', argument " "3"" of type '" "size_t""'"); } arg3 = (size_t)(val3); result = (int)idmef_data_set_byte_string_dup(arg1,(unsigned char const *)arg2,arg3); { ST(argvi) = newSViv(result); argvi++; } XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_data_set_byte_string_nodup) { { idmef_data_t *arg1 = (idmef_data_t *) 0 ; unsigned char *arg2 = (unsigned char *) 0 ; size_t arg3 ; void *argp2 = 0 ; int res2 = 0 ; size_t val3 ; int ecode3 = 0 ; int argvi = 0; int result; dXSARGS; if ((items < 3) || (items > 3)) { SWIG_croak("Usage: idmef_data_set_byte_string_nodup(data,ptr,len);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_data_t, 0) ) { croak("Expected type idmef_data_t * for argument 1."); return; } } res2 = SWIG_ConvertPtr(ST(1), &argp2,SWIGTYPE_p_unsigned_char, 0 | 0 ); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "idmef_data_set_byte_string_nodup" "', argument " "2"" of type '" "unsigned char *""'"); } arg2 = (unsigned char *)(argp2); ecode3 = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(2), &val3); if (!SWIG_IsOK(ecode3)) { SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "idmef_data_set_byte_string_nodup" "', argument " "3"" of type '" "size_t""'"); } arg3 = (size_t)(val3); result = (int)idmef_data_set_byte_string_nodup(arg1,arg2,arg3); { ST(argvi) = newSViv(result); argvi++; } XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_data_destroy) { { idmef_data_t *arg1 = (idmef_data_t *) 0 ; int argvi = 0; dXSARGS; if ((items < 1) || (items > 1)) { SWIG_croak("Usage: idmef_data_destroy(data);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_data_t, 0) ) { croak("Expected type idmef_data_t * for argument 1."); return; } } idmef_data_destroy(arg1); ST(argvi) = sv_newmortal(); XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_data_copy_ref) { { idmef_data_t *arg1 = (idmef_data_t *) 0 ; idmef_data_t *arg2 = (idmef_data_t *) 0 ; int argvi = 0; int result; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: idmef_data_copy_ref(src,dst);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_data_t, 0) ) { croak("Expected type idmef_data_t const * for argument 1."); return; } } { if ( ! SvROK(ST(1)) ) { croak("Argument 2 is null."); return; } if ( SWIG_ConvertPtr(ST(1), (void **)&arg2, SWIGTYPE_p_idmef_data_t, 0) ) { croak("Expected type idmef_data_t * for argument 2."); return; } } result = (int)idmef_data_copy_ref((idmef_data_t const *)arg1,arg2); { ST(argvi) = newSViv(result); argvi++; } XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_data_copy_dup) { { idmef_data_t *arg1 = (idmef_data_t *) 0 ; idmef_data_t *arg2 = (idmef_data_t *) 0 ; int argvi = 0; int result; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: idmef_data_copy_dup(src,dst);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_data_t, 0) ) { croak("Expected type idmef_data_t const * for argument 1."); return; } } { if ( ! SvROK(ST(1)) ) { croak("Argument 2 is null."); return; } if ( SWIG_ConvertPtr(ST(1), (void **)&arg2, SWIGTYPE_p_idmef_data_t, 0) ) { croak("Expected type idmef_data_t * for argument 2."); return; } } result = (int)idmef_data_copy_dup((idmef_data_t const *)arg1,arg2); { ST(argvi) = newSViv(result); argvi++; } XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_data_clone) { { idmef_data_t *arg1 = (idmef_data_t *) 0 ; idmef_data_t **arg2 = (idmef_data_t **) 0 ; idmef_data_t *tmp2 ; int argvi = 0; SV * _saved[1] ; int result; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: idmef_data_clone(src,dst);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_data_t, 0) ) { croak("Expected type idmef_data_t const * for argument 1."); return; } } { arg2 = (idmef_data_t **) &tmp2; } _saved[0] = ST(1); result = (int)idmef_data_clone((idmef_data_t const *)arg1,arg2); { ST(argvi) = newSViv(result); argvi++; } { SV *sv; if ( result >= 0 ) { if ( ! SvROK(_saved[0]) ) { croak("Argument 2 is not a reference."); return; } sv = SvRV(_saved[0]); sv_setsv(sv, SWIG_NewPointerObj((void *) * arg2, SWIGTYPE_p_idmef_data_t, 0)); } } XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_data_get_type) { { idmef_data_t *arg1 = (idmef_data_t *) 0 ; int argvi = 0; idmef_data_type_t result; dXSARGS; if ((items < 1) || (items > 1)) { SWIG_croak("Usage: idmef_data_get_type(data);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_data_t, 0) ) { croak("Expected type idmef_data_t const * for argument 1."); return; } } result = (idmef_data_type_t)idmef_data_get_type((idmef_data_t const *)arg1); ST(argvi) = SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(result)); argvi++ ; XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_data_get_len) { { idmef_data_t *arg1 = (idmef_data_t *) 0 ; int argvi = 0; size_t result; dXSARGS; if ((items < 1) || (items > 1)) { SWIG_croak("Usage: idmef_data_get_len(data);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_data_t, 0) ) { croak("Expected type idmef_data_t const * for argument 1."); return; } } result = idmef_data_get_len((idmef_data_t const *)arg1); ST(argvi) = SWIG_From_size_t SWIG_PERL_CALL_ARGS_1((size_t)(result)); argvi++ ; XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_data_get_data) { { idmef_data_t *arg1 = (idmef_data_t *) 0 ; int argvi = 0; void *result = 0 ; dXSARGS; if ((items < 1) || (items > 1)) { SWIG_croak("Usage: idmef_data_get_data(data);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_data_t, 0) ) { croak("Expected type idmef_data_t const * for argument 1."); return; } } result = (void *)idmef_data_get_data((idmef_data_t const *)arg1); ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_void, 0 | 0); argvi++ ; XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_data_get_char) { { idmef_data_t *arg1 = (idmef_data_t *) 0 ; int argvi = 0; char result; dXSARGS; if ((items < 1) || (items > 1)) { SWIG_croak("Usage: idmef_data_get_char(data);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_data_t, 0) ) { croak("Expected type idmef_data_t const * for argument 1."); return; } } result = (char)idmef_data_get_char((idmef_data_t const *)arg1); ST(argvi) = SWIG_From_char SWIG_PERL_CALL_ARGS_1((char)(result)); argvi++ ; XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_data_get_byte) { { idmef_data_t *arg1 = (idmef_data_t *) 0 ; int argvi = 0; uint8_t result; dXSARGS; if ((items < 1) || (items > 1)) { SWIG_croak("Usage: idmef_data_get_byte(data);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_data_t, 0) ) { croak("Expected type idmef_data_t const * for argument 1."); return; } } result = (uint8_t)idmef_data_get_byte((idmef_data_t const *)arg1); ST(argvi) = SWIG_From_unsigned_SS_char SWIG_PERL_CALL_ARGS_1((unsigned char)(result)); argvi++ ; XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_data_get_uint32) { { idmef_data_t *arg1 = (idmef_data_t *) 0 ; int argvi = 0; uint32_t result; dXSARGS; if ((items < 1) || (items > 1)) { SWIG_croak("Usage: idmef_data_get_uint32(data);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_data_t, 0) ) { croak("Expected type idmef_data_t const * for argument 1."); return; } } result = (uint32_t)idmef_data_get_uint32((idmef_data_t const *)arg1); ST(argvi) = SWIG_From_unsigned_SS_int SWIG_PERL_CALL_ARGS_1((unsigned int)(result)); argvi++ ; XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_data_get_uint64) { { idmef_data_t *arg1 = (idmef_data_t *) 0 ; int argvi = 0; uint64_t result; dXSARGS; if ((items < 1) || (items > 1)) { SWIG_croak("Usage: idmef_data_get_uint64(data);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_data_t, 0) ) { croak("Expected type idmef_data_t const * for argument 1."); return; } } result = (uint64_t)idmef_data_get_uint64((idmef_data_t const *)arg1); ST(argvi) = SWIG_From_unsigned_SS_long_SS_long SWIG_PERL_CALL_ARGS_1((unsigned long long)(result)); argvi++ ; XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_data_get_float) { { idmef_data_t *arg1 = (idmef_data_t *) 0 ; int argvi = 0; float result; dXSARGS; if ((items < 1) || (items > 1)) { SWIG_croak("Usage: idmef_data_get_float(data);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_data_t, 0) ) { croak("Expected type idmef_data_t const * for argument 1."); return; } } result = (float)idmef_data_get_float((idmef_data_t const *)arg1); ST(argvi) = SWIG_From_float SWIG_PERL_CALL_ARGS_1((float)(result)); argvi++ ; XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_data_get_char_string) { { idmef_data_t *arg1 = (idmef_data_t *) 0 ; int argvi = 0; char *result = 0 ; dXSARGS; if ((items < 1) || (items > 1)) { SWIG_croak("Usage: idmef_data_get_char_string(data);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_data_t, 0) ) { croak("Expected type idmef_data_t const * for argument 1."); return; } } result = (char *)idmef_data_get_char_string((idmef_data_t const *)arg1); ST(argvi) = SWIG_FromCharPtr((const char *)result); argvi++ ; XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_data_get_byte_string) { { idmef_data_t *arg1 = (idmef_data_t *) 0 ; int argvi = 0; unsigned char *result = 0 ; dXSARGS; if ((items < 1) || (items > 1)) { SWIG_croak("Usage: idmef_data_get_byte_string(data);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_data_t, 0) ) { croak("Expected type idmef_data_t const * for argument 1."); return; } } result = (unsigned char *)idmef_data_get_byte_string((idmef_data_t const *)arg1); ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_unsigned_char, 0 | 0); argvi++ ; XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_data_is_empty) { { idmef_data_t *arg1 = (idmef_data_t *) 0 ; int argvi = 0; prelude_bool_t result; dXSARGS; if ((items < 1) || (items > 1)) { SWIG_croak("Usage: idmef_data_is_empty(data);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_data_t, 0) ) { croak("Expected type idmef_data_t const * for argument 1."); return; } } result = (prelude_bool_t)idmef_data_is_empty((idmef_data_t const *)arg1); ST(argvi) = SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(result)); argvi++ ; XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_data_to_string) { { idmef_data_t *arg1 = (idmef_data_t *) 0 ; prelude_string_t *arg2 = (prelude_string_t *) 0 ; int argvi = 0; int result; dXSARGS; { int ret; ret = prelude_string_new(&(arg2)); if ( ret < 0 ) { swig_perl_raise_error(ret); return; } } if ((items < 1) || (items > 1)) { SWIG_croak("Usage: idmef_data_to_string(data);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_data_t, 0) ) { croak("Expected type idmef_data_t const * for argument 1."); return; } } result = (int)idmef_data_to_string((idmef_data_t const *)arg1,arg2); { ST(argvi) = newSViv(result); argvi++; } { if ( result >= 0 ) { ST(argvi) = newSVpv(prelude_string_get_string(arg2), prelude_string_get_len(arg2)); argvi++; } prelude_string_destroy(arg2); } XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_data_destroy_internal) { { idmef_data_t *arg1 = (idmef_data_t *) 0 ; int argvi = 0; dXSARGS; if ((items < 1) || (items > 1)) { SWIG_croak("Usage: idmef_data_destroy_internal(data);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_data_t, 0) ) { croak("Expected type idmef_data_t * for argument 1."); return; } } idmef_data_destroy_internal(arg1); ST(argvi) = sv_newmortal(); XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_data_compare) { { idmef_data_t *arg1 = (idmef_data_t *) 0 ; idmef_data_t *arg2 = (idmef_data_t *) 0 ; int argvi = 0; int result; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: idmef_data_compare(data1,data2);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_data_t, 0) ) { croak("Expected type idmef_data_t const * for argument 1."); return; } } { if ( ! SvROK(ST(1)) ) { croak("Argument 2 is null."); return; } if ( SWIG_ConvertPtr(ST(1), (void **)&arg2, SWIGTYPE_p_idmef_data_t, 0) ) { croak("Expected type idmef_data_t const * for argument 2."); return; } } result = (int)idmef_data_compare((idmef_data_t const *)arg1,(idmef_data_t const *)arg2); { ST(argvi) = newSViv(result); argvi++; } XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_criterion_operator_to_string) { { idmef_criterion_operator_t arg1 ; int val1 ; int ecode1 = 0 ; int argvi = 0; char *result = 0 ; dXSARGS; if ((items < 1) || (items > 1)) { SWIG_croak("Usage: idmef_criterion_operator_to_string(op);"); } ecode1 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(0), &val1); if (!SWIG_IsOK(ecode1)) { SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "idmef_criterion_operator_to_string" "', argument " "1"" of type '" "idmef_criterion_operator_t""'"); } arg1 = (idmef_criterion_operator_t)(val1); result = (char *)idmef_criterion_operator_to_string(arg1); ST(argvi) = SWIG_FromCharPtr((const char *)result); argvi++ ; XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_criterion_new) { { idmef_criterion_t **arg1 = (idmef_criterion_t **) 0 ; idmef_path_t *arg2 = (idmef_path_t *) 0 ; idmef_criterion_value_t *arg3 = (idmef_criterion_value_t *) 0 ; idmef_criterion_operator_t arg4 ; void *argp1 = 0 ; int res1 = 0 ; void *argp3 = 0 ; int res3 = 0 ; int val4 ; int ecode4 = 0 ; int argvi = 0; int result; dXSARGS; if ((items < 4) || (items > 4)) { SWIG_croak("Usage: idmef_criterion_new(criterion,path,value,op);"); } res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_p_idmef_criterion, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "idmef_criterion_new" "', argument " "1"" of type '" "idmef_criterion_t **""'"); } arg1 = (idmef_criterion_t **)(argp1); { if ( ! SvROK(ST(1)) ) { croak("Argument 2 is null."); return; } if ( SWIG_ConvertPtr(ST(1), (void **)&arg2, SWIGTYPE_p_idmef_path, 0) ) { croak("Expected type idmef_path_t * for argument 2."); return; } } res3 = SWIG_ConvertPtr(ST(2), &argp3,SWIGTYPE_p_idmef_criterion_value_t, 0 | 0 ); if (!SWIG_IsOK(res3)) { SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "idmef_criterion_new" "', argument " "3"" of type '" "idmef_criterion_value_t *""'"); } arg3 = (idmef_criterion_value_t *)(argp3); ecode4 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(3), &val4); if (!SWIG_IsOK(ecode4)) { SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "idmef_criterion_new" "', argument " "4"" of type '" "idmef_criterion_operator_t""'"); } arg4 = (idmef_criterion_operator_t)(val4); result = (int)idmef_criterion_new(arg1,arg2,arg3,arg4); { ST(argvi) = newSViv(result); argvi++; } XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_criterion_destroy) { { idmef_criterion_t *arg1 = (idmef_criterion_t *) 0 ; void *argp1 = 0 ; int res1 = 0 ; int argvi = 0; dXSARGS; if ((items < 1) || (items > 1)) { SWIG_croak("Usage: idmef_criterion_destroy(criterion);"); } res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_idmef_criterion, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "idmef_criterion_destroy" "', argument " "1"" of type '" "idmef_criterion_t *""'"); } arg1 = (idmef_criterion_t *)(argp1); idmef_criterion_destroy(arg1); ST(argvi) = sv_newmortal(); XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_criteria_ref) { { idmef_criteria_t *arg1 = (idmef_criteria_t *) 0 ; int argvi = 0; idmef_criteria_t *result = 0 ; dXSARGS; if ((items < 1) || (items > 1)) { SWIG_croak("Usage: idmef_criteria_ref(criteria);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_criteria, 0) ) { croak("Expected type idmef_criteria_t * for argument 1."); return; } } result = (idmef_criteria_t *)idmef_criteria_ref(arg1); ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_idmef_criteria, 0 | 0); argvi++ ; XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_criterion_clone) { { idmef_criterion_t *arg1 = (idmef_criterion_t *) 0 ; idmef_criterion_t **arg2 = (idmef_criterion_t **) 0 ; void *argp1 = 0 ; int res1 = 0 ; void *argp2 = 0 ; int res2 = 0 ; int argvi = 0; int result; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: idmef_criterion_clone(criterion,dst);"); } res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_idmef_criterion, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "idmef_criterion_clone" "', argument " "1"" of type '" "idmef_criterion_t const *""'"); } arg1 = (idmef_criterion_t *)(argp1); res2 = SWIG_ConvertPtr(ST(1), &argp2,SWIGTYPE_p_p_idmef_criterion, 0 | 0 ); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "idmef_criterion_clone" "', argument " "2"" of type '" "idmef_criterion_t **""'"); } arg2 = (idmef_criterion_t **)(argp2); result = (int)idmef_criterion_clone((struct idmef_criterion const *)arg1,arg2); { ST(argvi) = newSViv(result); argvi++; } XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_criterion_print) { { idmef_criterion_t *arg1 = (idmef_criterion_t *) 0 ; prelude_io_t *arg2 = (prelude_io_t *) 0 ; void *argp1 = 0 ; int res1 = 0 ; void *argp2 = 0 ; int res2 = 0 ; int argvi = 0; int result; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: idmef_criterion_print(criterion,fd);"); } res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_idmef_criterion, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "idmef_criterion_print" "', argument " "1"" of type '" "idmef_criterion_t const *""'"); } arg1 = (idmef_criterion_t *)(argp1); res2 = SWIG_ConvertPtr(ST(1), &argp2,SWIGTYPE_p_prelude_io_t, 0 | 0 ); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "idmef_criterion_print" "', argument " "2"" of type '" "prelude_io_t *""'"); } arg2 = (prelude_io_t *)(argp2); result = (int)idmef_criterion_print((struct idmef_criterion const *)arg1,arg2); { ST(argvi) = newSViv(result); argvi++; } XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_criterion_to_string) { { idmef_criterion_t *arg1 = (idmef_criterion_t *) 0 ; prelude_string_t *arg2 = (prelude_string_t *) 0 ; void *argp1 = 0 ; int res1 = 0 ; int argvi = 0; int result; dXSARGS; { int ret; ret = prelude_string_new(&(arg2)); if ( ret < 0 ) { swig_perl_raise_error(ret); return; } } if ((items < 1) || (items > 1)) { SWIG_croak("Usage: idmef_criterion_to_string(criterion);"); } res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_idmef_criterion, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "idmef_criterion_to_string" "', argument " "1"" of type '" "idmef_criterion_t const *""'"); } arg1 = (idmef_criterion_t *)(argp1); result = (int)idmef_criterion_to_string((struct idmef_criterion const *)arg1,arg2); { ST(argvi) = newSViv(result); argvi++; } { if ( result >= 0 ) { ST(argvi) = newSVpv(prelude_string_get_string(arg2), prelude_string_get_len(arg2)); argvi++; } prelude_string_destroy(arg2); } XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_criterion_get_path) { { idmef_criterion_t *arg1 = (idmef_criterion_t *) 0 ; void *argp1 = 0 ; int res1 = 0 ; int argvi = 0; idmef_path_t *result = 0 ; dXSARGS; if ((items < 1) || (items > 1)) { SWIG_croak("Usage: idmef_criterion_get_path(criterion);"); } res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_idmef_criterion, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "idmef_criterion_get_path" "', argument " "1"" of type '" "idmef_criterion_t const *""'"); } arg1 = (idmef_criterion_t *)(argp1); result = (idmef_path_t *)idmef_criterion_get_path((struct idmef_criterion const *)arg1); ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_idmef_path, 0 | 0); argvi++ ; XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_criterion_get_value) { { idmef_criterion_t *arg1 = (idmef_criterion_t *) 0 ; void *argp1 = 0 ; int res1 = 0 ; int argvi = 0; idmef_criterion_value_t *result = 0 ; dXSARGS; if ((items < 1) || (items > 1)) { SWIG_croak("Usage: idmef_criterion_get_value(criterion);"); } res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_idmef_criterion, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "idmef_criterion_get_value" "', argument " "1"" of type '" "idmef_criterion_t const *""'"); } arg1 = (idmef_criterion_t *)(argp1); result = (idmef_criterion_value_t *)idmef_criterion_get_value((struct idmef_criterion const *)arg1); ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_idmef_criterion_value_t, 0 | 0); argvi++ ; XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_criterion_get_operator) { { idmef_criterion_t *arg1 = (idmef_criterion_t *) 0 ; void *argp1 = 0 ; int res1 = 0 ; int argvi = 0; idmef_criterion_operator_t result; dXSARGS; if ((items < 1) || (items > 1)) { SWIG_croak("Usage: idmef_criterion_get_operator(criterion);"); } res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_idmef_criterion, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "idmef_criterion_get_operator" "', argument " "1"" of type '" "idmef_criterion_t const *""'"); } arg1 = (idmef_criterion_t *)(argp1); result = (idmef_criterion_operator_t)idmef_criterion_get_operator((struct idmef_criterion const *)arg1); ST(argvi) = SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(result)); argvi++ ; XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_criterion_match) { { idmef_criterion_t *arg1 = (idmef_criterion_t *) 0 ; idmef_message_t *arg2 = (idmef_message_t *) 0 ; void *argp1 = 0 ; int res1 = 0 ; int argvi = 0; int result; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: idmef_criterion_match(criterion,message);"); } res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_idmef_criterion, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "idmef_criterion_match" "', argument " "1"" of type '" "idmef_criterion_t const *""'"); } arg1 = (idmef_criterion_t *)(argp1); { if ( ! SvROK(ST(1)) ) { croak("Argument 2 is null."); return; } if ( SWIG_ConvertPtr(ST(1), (void **)&arg2, SWIGTYPE_p_idmef_message, 0) ) { croak("Expected type idmef_message_t * for argument 2."); return; } } result = (int)idmef_criterion_match((struct idmef_criterion const *)arg1,arg2); { ST(argvi) = newSViv(result); argvi++; } XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_criteria_new) { { idmef_criteria_t **arg1 = (idmef_criteria_t **) 0 ; idmef_criteria_t *tmp1 ; int argvi = 0; SV * _saved[1] ; int result; dXSARGS; if ((items < 1) || (items > 1)) { SWIG_croak("Usage: idmef_criteria_new(criteria);"); } { arg1 = (idmef_criteria_t **) &tmp1; } _saved[0] = ST(0); result = (int)idmef_criteria_new(arg1); { ST(argvi) = newSViv(result); argvi++; } { SV *sv; if ( result >= 0 ) { if ( ! SvROK(_saved[0]) ) { croak("Argument 1 is not a reference."); return; } sv = SvRV(_saved[0]); sv_setsv(sv, SWIG_NewPointerObj((void *) * arg1, SWIGTYPE_p_idmef_criteria, 0)); } } XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_criteria_destroy) { { idmef_criteria_t *arg1 = (idmef_criteria_t *) 0 ; int argvi = 0; dXSARGS; if ((items < 1) || (items > 1)) { SWIG_croak("Usage: idmef_criteria_destroy(criteria);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_criteria, 0) ) { croak("Expected type idmef_criteria_t * for argument 1."); return; } } idmef_criteria_destroy(arg1); ST(argvi) = sv_newmortal(); XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_criteria_clone) { { idmef_criteria_t *arg1 = (idmef_criteria_t *) 0 ; idmef_criteria_t **arg2 = (idmef_criteria_t **) 0 ; idmef_criteria_t *tmp2 ; int argvi = 0; SV * _saved[1] ; int result; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: idmef_criteria_clone(src,dst);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_criteria, 0) ) { croak("Expected type idmef_criteria_t * for argument 1."); return; } } { arg2 = (idmef_criteria_t **) &tmp2; } _saved[0] = ST(1); result = (int)idmef_criteria_clone(arg1,arg2); { ST(argvi) = newSViv(result); argvi++; } { SV *sv; if ( result >= 0 ) { if ( ! SvROK(_saved[0]) ) { croak("Argument 2 is not a reference."); return; } sv = SvRV(_saved[0]); sv_setsv(sv, SWIG_NewPointerObj((void *) * arg2, SWIGTYPE_p_idmef_criteria, 0)); } } XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_criteria_print) { { idmef_criteria_t *arg1 = (idmef_criteria_t *) 0 ; prelude_io_t *arg2 = (prelude_io_t *) 0 ; void *argp2 = 0 ; int res2 = 0 ; int argvi = 0; int result; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: idmef_criteria_print(criteria,fd);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_criteria, 0) ) { croak("Expected type idmef_criteria_t const * for argument 1."); return; } } res2 = SWIG_ConvertPtr(ST(1), &argp2,SWIGTYPE_p_prelude_io_t, 0 | 0 ); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "idmef_criteria_print" "', argument " "2"" of type '" "prelude_io_t *""'"); } arg2 = (prelude_io_t *)(argp2); result = (int)idmef_criteria_print((struct idmef_criteria const *)arg1,arg2); { ST(argvi) = newSViv(result); argvi++; } XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_criteria_to_string) { { idmef_criteria_t *arg1 = (idmef_criteria_t *) 0 ; prelude_string_t *arg2 = (prelude_string_t *) 0 ; int argvi = 0; int result; dXSARGS; { int ret; ret = prelude_string_new(&(arg2)); if ( ret < 0 ) { swig_perl_raise_error(ret); return; } } if ((items < 1) || (items > 1)) { SWIG_croak("Usage: idmef_criteria_to_string(criteria);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_criteria, 0) ) { croak("Expected type idmef_criteria_t const * for argument 1."); return; } } result = (int)idmef_criteria_to_string((struct idmef_criteria const *)arg1,arg2); { ST(argvi) = newSViv(result); argvi++; } { if ( result >= 0 ) { ST(argvi) = newSVpv(prelude_string_get_string(arg2), prelude_string_get_len(arg2)); argvi++; } prelude_string_destroy(arg2); } XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_criteria_is_criterion) { { idmef_criteria_t *arg1 = (idmef_criteria_t *) 0 ; int argvi = 0; prelude_bool_t result; dXSARGS; if ((items < 1) || (items > 1)) { SWIG_croak("Usage: idmef_criteria_is_criterion(criteria);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_criteria, 0) ) { croak("Expected type idmef_criteria_t const * for argument 1."); return; } } result = (prelude_bool_t)idmef_criteria_is_criterion((struct idmef_criteria const *)arg1); ST(argvi) = SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(result)); argvi++ ; XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_criteria_get_criterion) { { idmef_criteria_t *arg1 = (idmef_criteria_t *) 0 ; int argvi = 0; idmef_criterion_t *result = 0 ; dXSARGS; if ((items < 1) || (items > 1)) { SWIG_croak("Usage: idmef_criteria_get_criterion(criteria);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_criteria, 0) ) { croak("Expected type idmef_criteria_t const * for argument 1."); return; } } result = (idmef_criterion_t *)idmef_criteria_get_criterion((struct idmef_criteria const *)arg1); ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_idmef_criterion, 0 | 0); argvi++ ; XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_criteria_set_criterion) { { idmef_criteria_t *arg1 = (idmef_criteria_t *) 0 ; idmef_criterion_t *arg2 = (idmef_criterion_t *) 0 ; void *argp2 = 0 ; int res2 = 0 ; int argvi = 0; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: idmef_criteria_set_criterion(criteria,criterion);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_criteria, 0) ) { croak("Expected type idmef_criteria_t * for argument 1."); return; } } res2 = SWIG_ConvertPtr(ST(1), &argp2,SWIGTYPE_p_idmef_criterion, 0 | 0 ); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "idmef_criteria_set_criterion" "', argument " "2"" of type '" "idmef_criterion_t *""'"); } arg2 = (idmef_criterion_t *)(argp2); idmef_criteria_set_criterion(arg1,arg2); ST(argvi) = sv_newmortal(); XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_criteria_or_criteria) { { idmef_criteria_t *arg1 = (idmef_criteria_t *) 0 ; idmef_criteria_t *arg2 = (idmef_criteria_t *) 0 ; int argvi = 0; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: idmef_criteria_or_criteria(criteria,criteria2);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_criteria, 0) ) { croak("Expected type idmef_criteria_t * for argument 1."); return; } } { if ( ! SvROK(ST(1)) ) { croak("Argument 2 is null."); return; } if ( SWIG_ConvertPtr(ST(1), (void **)&arg2, SWIGTYPE_p_idmef_criteria, 0) ) { croak("Expected type idmef_criteria_t * for argument 2."); return; } } idmef_criteria_or_criteria(arg1,arg2); ST(argvi) = sv_newmortal(); XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_criteria_and_criteria) { { idmef_criteria_t *arg1 = (idmef_criteria_t *) 0 ; idmef_criteria_t *arg2 = (idmef_criteria_t *) 0 ; int argvi = 0; int result; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: idmef_criteria_and_criteria(criteria,criteria2);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_criteria, 0) ) { croak("Expected type idmef_criteria_t * for argument 1."); return; } } { if ( ! SvROK(ST(1)) ) { croak("Argument 2 is null."); return; } if ( SWIG_ConvertPtr(ST(1), (void **)&arg2, SWIGTYPE_p_idmef_criteria, 0) ) { croak("Expected type idmef_criteria_t * for argument 2."); return; } } result = (int)idmef_criteria_and_criteria(arg1,arg2); { ST(argvi) = newSViv(result); argvi++; } XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_criteria_match) { { idmef_criteria_t *arg1 = (idmef_criteria_t *) 0 ; idmef_message_t *arg2 = (idmef_message_t *) 0 ; int argvi = 0; int result; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: idmef_criteria_match(criteria,message);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_criteria, 0) ) { croak("Expected type idmef_criteria_t const * for argument 1."); return; } } { if ( ! SvROK(ST(1)) ) { croak("Argument 2 is null."); return; } if ( SWIG_ConvertPtr(ST(1), (void **)&arg2, SWIGTYPE_p_idmef_message, 0) ) { croak("Expected type idmef_message_t * for argument 2."); return; } } result = (int)idmef_criteria_match((struct idmef_criteria const *)arg1,arg2); { ST(argvi) = newSViv(result); argvi++; } XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_criteria_get_or) { { idmef_criteria_t *arg1 = (idmef_criteria_t *) 0 ; int argvi = 0; idmef_criteria_t *result = 0 ; dXSARGS; if ((items < 1) || (items > 1)) { SWIG_croak("Usage: idmef_criteria_get_or(criteria);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_criteria, 0) ) { croak("Expected type idmef_criteria_t const * for argument 1."); return; } } result = (idmef_criteria_t *)idmef_criteria_get_or((struct idmef_criteria const *)arg1); ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_idmef_criteria, 0 | 0); argvi++ ; XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_criteria_get_and) { { idmef_criteria_t *arg1 = (idmef_criteria_t *) 0 ; int argvi = 0; idmef_criteria_t *result = 0 ; dXSARGS; if ((items < 1) || (items > 1)) { SWIG_croak("Usage: idmef_criteria_get_and(criteria);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_criteria, 0) ) { croak("Expected type idmef_criteria_t const * for argument 1."); return; } } result = (idmef_criteria_t *)idmef_criteria_get_and((struct idmef_criteria const *)arg1); ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_idmef_criteria, 0 | 0); argvi++ ; XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_criteria_new_from_string) { { idmef_criteria_t **arg1 = (idmef_criteria_t **) 0 ; char *arg2 = (char *) 0 ; idmef_criteria_t *tmp1 ; int res2 ; char *buf2 = 0 ; int alloc2 = 0 ; int argvi = 0; SV * _saved[1] ; int result; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: idmef_criteria_new_from_string(criteria,str);"); } { arg1 = (idmef_criteria_t **) &tmp1; } res2 = SWIG_AsCharPtrAndSize(ST(1), &buf2, NULL, &alloc2); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "idmef_criteria_new_from_string" "', argument " "2"" of type '" "char const *""'"); } arg2 = (char *)(buf2); _saved[0] = ST(0); result = (int)idmef_criteria_new_from_string(arg1,(char const *)arg2); { ST(argvi) = newSViv(result); argvi++; } { SV *sv; if ( result >= 0 ) { if ( ! SvROK(_saved[0]) ) { croak("Argument 1 is not a reference."); return; } sv = SvRV(_saved[0]); sv_setsv(sv, SWIG_NewPointerObj((void *) * arg1, SWIGTYPE_p_idmef_criteria, 0)); } } if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); XSRETURN(argvi); fail: if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); SWIG_croak_null(); } } XS(_wrap_idmef_criteria_set_negation) { { idmef_criteria_t *arg1 = (idmef_criteria_t *) 0 ; prelude_bool_t arg2 ; int val2 ; int ecode2 = 0 ; int argvi = 0; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: idmef_criteria_set_negation(criteria,negate);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_criteria, 0) ) { croak("Expected type idmef_criteria_t * for argument 1."); return; } } ecode2 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(1), &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "idmef_criteria_set_negation" "', argument " "2"" of type '" "prelude_bool_t""'"); } arg2 = (prelude_bool_t)(val2); idmef_criteria_set_negation(arg1,arg2); ST(argvi) = sv_newmortal(); XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_criteria_get_negation) { { idmef_criteria_t *arg1 = (idmef_criteria_t *) 0 ; int argvi = 0; prelude_bool_t result; dXSARGS; if ((items < 1) || (items > 1)) { SWIG_croak("Usage: idmef_criteria_get_negation(criteria);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_criteria, 0) ) { croak("Expected type idmef_criteria_t const * for argument 1."); return; } } result = (prelude_bool_t)idmef_criteria_get_negation((struct idmef_criteria const *)arg1); ST(argvi) = SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(result)); argvi++ ; XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_additional_data_read) { { idmef_additional_data_t *arg1 = (idmef_additional_data_t *) 0 ; prelude_msg_t *arg2 = (prelude_msg_t *) 0 ; int argvi = 0; int result; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: idmef_additional_data_read(additional_data,msg);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_additional_data, 0) ) { croak("Expected type idmef_additional_data_t * for argument 1."); return; } } { if ( ! SvROK(ST(1)) ) { croak("Argument 2 is null."); return; } if ( SWIG_ConvertPtr(ST(1), (void **)&arg2, SWIGTYPE_p_prelude_msg, 0) ) { croak("Expected type prelude_msg_t * for argument 2."); return; } } result = (int)idmef_additional_data_read(arg1,arg2); { ST(argvi) = newSViv(result); argvi++; } XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_reference_read) { { idmef_reference_t *arg1 = (idmef_reference_t *) 0 ; prelude_msg_t *arg2 = (prelude_msg_t *) 0 ; int argvi = 0; int result; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: idmef_reference_read(reference,msg);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_reference, 0) ) { croak("Expected type idmef_reference_t * for argument 1."); return; } } { if ( ! SvROK(ST(1)) ) { croak("Argument 2 is null."); return; } if ( SWIG_ConvertPtr(ST(1), (void **)&arg2, SWIGTYPE_p_prelude_msg, 0) ) { croak("Expected type prelude_msg_t * for argument 2."); return; } } result = (int)idmef_reference_read(arg1,arg2); { ST(argvi) = newSViv(result); argvi++; } XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_classification_read) { { idmef_classification_t *arg1 = (idmef_classification_t *) 0 ; prelude_msg_t *arg2 = (prelude_msg_t *) 0 ; int argvi = 0; int result; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: idmef_classification_read(classification,msg);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_classification, 0) ) { croak("Expected type idmef_classification_t * for argument 1."); return; } } { if ( ! SvROK(ST(1)) ) { croak("Argument 2 is null."); return; } if ( SWIG_ConvertPtr(ST(1), (void **)&arg2, SWIGTYPE_p_prelude_msg, 0) ) { croak("Expected type prelude_msg_t * for argument 2."); return; } } result = (int)idmef_classification_read(arg1,arg2); { ST(argvi) = newSViv(result); argvi++; } XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_user_id_read) { { idmef_user_id_t *arg1 = (idmef_user_id_t *) 0 ; prelude_msg_t *arg2 = (prelude_msg_t *) 0 ; int argvi = 0; int result; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: idmef_user_id_read(user_id,msg);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_user_id, 0) ) { croak("Expected type idmef_user_id_t * for argument 1."); return; } } { if ( ! SvROK(ST(1)) ) { croak("Argument 2 is null."); return; } if ( SWIG_ConvertPtr(ST(1), (void **)&arg2, SWIGTYPE_p_prelude_msg, 0) ) { croak("Expected type prelude_msg_t * for argument 2."); return; } } result = (int)idmef_user_id_read(arg1,arg2); { ST(argvi) = newSViv(result); argvi++; } XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_user_read) { { idmef_user_t *arg1 = (idmef_user_t *) 0 ; prelude_msg_t *arg2 = (prelude_msg_t *) 0 ; int argvi = 0; int result; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: idmef_user_read(user,msg);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_user, 0) ) { croak("Expected type idmef_user_t * for argument 1."); return; } } { if ( ! SvROK(ST(1)) ) { croak("Argument 2 is null."); return; } if ( SWIG_ConvertPtr(ST(1), (void **)&arg2, SWIGTYPE_p_prelude_msg, 0) ) { croak("Expected type prelude_msg_t * for argument 2."); return; } } result = (int)idmef_user_read(arg1,arg2); { ST(argvi) = newSViv(result); argvi++; } XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_address_read) { { idmef_address_t *arg1 = (idmef_address_t *) 0 ; prelude_msg_t *arg2 = (prelude_msg_t *) 0 ; int argvi = 0; int result; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: idmef_address_read(address,msg);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_address, 0) ) { croak("Expected type idmef_address_t * for argument 1."); return; } } { if ( ! SvROK(ST(1)) ) { croak("Argument 2 is null."); return; } if ( SWIG_ConvertPtr(ST(1), (void **)&arg2, SWIGTYPE_p_prelude_msg, 0) ) { croak("Expected type prelude_msg_t * for argument 2."); return; } } result = (int)idmef_address_read(arg1,arg2); { ST(argvi) = newSViv(result); argvi++; } XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_process_read) { { idmef_process_t *arg1 = (idmef_process_t *) 0 ; prelude_msg_t *arg2 = (prelude_msg_t *) 0 ; int argvi = 0; int result; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: idmef_process_read(process,msg);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_process, 0) ) { croak("Expected type idmef_process_t * for argument 1."); return; } } { if ( ! SvROK(ST(1)) ) { croak("Argument 2 is null."); return; } if ( SWIG_ConvertPtr(ST(1), (void **)&arg2, SWIGTYPE_p_prelude_msg, 0) ) { croak("Expected type prelude_msg_t * for argument 2."); return; } } result = (int)idmef_process_read(arg1,arg2); { ST(argvi) = newSViv(result); argvi++; } XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_web_service_read) { { idmef_web_service_t *arg1 = (idmef_web_service_t *) 0 ; prelude_msg_t *arg2 = (prelude_msg_t *) 0 ; int argvi = 0; int result; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: idmef_web_service_read(web_service,msg);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_web_service, 0) ) { croak("Expected type idmef_web_service_t * for argument 1."); return; } } { if ( ! SvROK(ST(1)) ) { croak("Argument 2 is null."); return; } if ( SWIG_ConvertPtr(ST(1), (void **)&arg2, SWIGTYPE_p_prelude_msg, 0) ) { croak("Expected type prelude_msg_t * for argument 2."); return; } } result = (int)idmef_web_service_read(arg1,arg2); { ST(argvi) = newSViv(result); argvi++; } XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_snmp_service_read) { { idmef_snmp_service_t *arg1 = (idmef_snmp_service_t *) 0 ; prelude_msg_t *arg2 = (prelude_msg_t *) 0 ; int argvi = 0; int result; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: idmef_snmp_service_read(snmp_service,msg);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_snmp_service, 0) ) { croak("Expected type idmef_snmp_service_t * for argument 1."); return; } } { if ( ! SvROK(ST(1)) ) { croak("Argument 2 is null."); return; } if ( SWIG_ConvertPtr(ST(1), (void **)&arg2, SWIGTYPE_p_prelude_msg, 0) ) { croak("Expected type prelude_msg_t * for argument 2."); return; } } result = (int)idmef_snmp_service_read(arg1,arg2); { ST(argvi) = newSViv(result); argvi++; } XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_service_read) { { idmef_service_t *arg1 = (idmef_service_t *) 0 ; prelude_msg_t *arg2 = (prelude_msg_t *) 0 ; int argvi = 0; int result; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: idmef_service_read(service,msg);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_service, 0) ) { croak("Expected type idmef_service_t * for argument 1."); return; } } { if ( ! SvROK(ST(1)) ) { croak("Argument 2 is null."); return; } if ( SWIG_ConvertPtr(ST(1), (void **)&arg2, SWIGTYPE_p_prelude_msg, 0) ) { croak("Expected type prelude_msg_t * for argument 2."); return; } } result = (int)idmef_service_read(arg1,arg2); { ST(argvi) = newSViv(result); argvi++; } XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_node_read) { { idmef_node_t *arg1 = (idmef_node_t *) 0 ; prelude_msg_t *arg2 = (prelude_msg_t *) 0 ; int argvi = 0; int result; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: idmef_node_read(node,msg);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_node, 0) ) { croak("Expected type idmef_node_t * for argument 1."); return; } } { if ( ! SvROK(ST(1)) ) { croak("Argument 2 is null."); return; } if ( SWIG_ConvertPtr(ST(1), (void **)&arg2, SWIGTYPE_p_prelude_msg, 0) ) { croak("Expected type prelude_msg_t * for argument 2."); return; } } result = (int)idmef_node_read(arg1,arg2); { ST(argvi) = newSViv(result); argvi++; } XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_source_read) { { idmef_source_t *arg1 = (idmef_source_t *) 0 ; prelude_msg_t *arg2 = (prelude_msg_t *) 0 ; int argvi = 0; int result; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: idmef_source_read(source,msg);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_source, 0) ) { croak("Expected type idmef_source_t * for argument 1."); return; } } { if ( ! SvROK(ST(1)) ) { croak("Argument 2 is null."); return; } if ( SWIG_ConvertPtr(ST(1), (void **)&arg2, SWIGTYPE_p_prelude_msg, 0) ) { croak("Expected type prelude_msg_t * for argument 2."); return; } } result = (int)idmef_source_read(arg1,arg2); { ST(argvi) = newSViv(result); argvi++; } XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_file_access_read) { { idmef_file_access_t *arg1 = (idmef_file_access_t *) 0 ; prelude_msg_t *arg2 = (prelude_msg_t *) 0 ; int argvi = 0; int result; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: idmef_file_access_read(file_access,msg);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_file_access, 0) ) { croak("Expected type idmef_file_access_t * for argument 1."); return; } } { if ( ! SvROK(ST(1)) ) { croak("Argument 2 is null."); return; } if ( SWIG_ConvertPtr(ST(1), (void **)&arg2, SWIGTYPE_p_prelude_msg, 0) ) { croak("Expected type prelude_msg_t * for argument 2."); return; } } result = (int)idmef_file_access_read(arg1,arg2); { ST(argvi) = newSViv(result); argvi++; } XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_inode_read) { { idmef_inode_t *arg1 = (idmef_inode_t *) 0 ; prelude_msg_t *arg2 = (prelude_msg_t *) 0 ; int argvi = 0; int result; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: idmef_inode_read(inode,msg);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_inode, 0) ) { croak("Expected type idmef_inode_t * for argument 1."); return; } } { if ( ! SvROK(ST(1)) ) { croak("Argument 2 is null."); return; } if ( SWIG_ConvertPtr(ST(1), (void **)&arg2, SWIGTYPE_p_prelude_msg, 0) ) { croak("Expected type prelude_msg_t * for argument 2."); return; } } result = (int)idmef_inode_read(arg1,arg2); { ST(argvi) = newSViv(result); argvi++; } XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_checksum_read) { { idmef_checksum_t *arg1 = (idmef_checksum_t *) 0 ; prelude_msg_t *arg2 = (prelude_msg_t *) 0 ; int argvi = 0; int result; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: idmef_checksum_read(checksum,msg);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_checksum, 0) ) { croak("Expected type idmef_checksum_t * for argument 1."); return; } } { if ( ! SvROK(ST(1)) ) { croak("Argument 2 is null."); return; } if ( SWIG_ConvertPtr(ST(1), (void **)&arg2, SWIGTYPE_p_prelude_msg, 0) ) { croak("Expected type prelude_msg_t * for argument 2."); return; } } result = (int)idmef_checksum_read(arg1,arg2); { ST(argvi) = newSViv(result); argvi++; } XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_file_read) { { idmef_file_t *arg1 = (idmef_file_t *) 0 ; prelude_msg_t *arg2 = (prelude_msg_t *) 0 ; int argvi = 0; int result; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: idmef_file_read(file,msg);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_file, 0) ) { croak("Expected type idmef_file_t * for argument 1."); return; } } { if ( ! SvROK(ST(1)) ) { croak("Argument 2 is null."); return; } if ( SWIG_ConvertPtr(ST(1), (void **)&arg2, SWIGTYPE_p_prelude_msg, 0) ) { croak("Expected type prelude_msg_t * for argument 2."); return; } } result = (int)idmef_file_read(arg1,arg2); { ST(argvi) = newSViv(result); argvi++; } XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_linkage_read) { { idmef_linkage_t *arg1 = (idmef_linkage_t *) 0 ; prelude_msg_t *arg2 = (prelude_msg_t *) 0 ; int argvi = 0; int result; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: idmef_linkage_read(linkage,msg);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_linkage, 0) ) { croak("Expected type idmef_linkage_t * for argument 1."); return; } } { if ( ! SvROK(ST(1)) ) { croak("Argument 2 is null."); return; } if ( SWIG_ConvertPtr(ST(1), (void **)&arg2, SWIGTYPE_p_prelude_msg, 0) ) { croak("Expected type prelude_msg_t * for argument 2."); return; } } result = (int)idmef_linkage_read(arg1,arg2); { ST(argvi) = newSViv(result); argvi++; } XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_target_read) { { idmef_target_t *arg1 = (idmef_target_t *) 0 ; prelude_msg_t *arg2 = (prelude_msg_t *) 0 ; int argvi = 0; int result; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: idmef_target_read(target,msg);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_target, 0) ) { croak("Expected type idmef_target_t * for argument 1."); return; } } { if ( ! SvROK(ST(1)) ) { croak("Argument 2 is null."); return; } if ( SWIG_ConvertPtr(ST(1), (void **)&arg2, SWIGTYPE_p_prelude_msg, 0) ) { croak("Expected type prelude_msg_t * for argument 2."); return; } } result = (int)idmef_target_read(arg1,arg2); { ST(argvi) = newSViv(result); argvi++; } XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_analyzer_read) { { idmef_analyzer_t *arg1 = (idmef_analyzer_t *) 0 ; prelude_msg_t *arg2 = (prelude_msg_t *) 0 ; int argvi = 0; int result; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: idmef_analyzer_read(analyzer,msg);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_analyzer, 0) ) { croak("Expected type idmef_analyzer_t * for argument 1."); return; } } { if ( ! SvROK(ST(1)) ) { croak("Argument 2 is null."); return; } if ( SWIG_ConvertPtr(ST(1), (void **)&arg2, SWIGTYPE_p_prelude_msg, 0) ) { croak("Expected type prelude_msg_t * for argument 2."); return; } } result = (int)idmef_analyzer_read(arg1,arg2); { ST(argvi) = newSViv(result); argvi++; } XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_alertident_read) { { idmef_alertident_t *arg1 = (idmef_alertident_t *) 0 ; prelude_msg_t *arg2 = (prelude_msg_t *) 0 ; void *argp1 = 0 ; int res1 = 0 ; int argvi = 0; int result; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: idmef_alertident_read(alertident,msg);"); } res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_idmef_alertident, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "idmef_alertident_read" "', argument " "1"" of type '" "idmef_alertident_t *""'"); } arg1 = (idmef_alertident_t *)(argp1); { if ( ! SvROK(ST(1)) ) { croak("Argument 2 is null."); return; } if ( SWIG_ConvertPtr(ST(1), (void **)&arg2, SWIGTYPE_p_prelude_msg, 0) ) { croak("Expected type prelude_msg_t * for argument 2."); return; } } result = (int)idmef_alertident_read(arg1,arg2); { ST(argvi) = newSViv(result); argvi++; } XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_impact_read) { { idmef_impact_t *arg1 = (idmef_impact_t *) 0 ; prelude_msg_t *arg2 = (prelude_msg_t *) 0 ; int argvi = 0; int result; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: idmef_impact_read(impact,msg);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_impact, 0) ) { croak("Expected type idmef_impact_t * for argument 1."); return; } } { if ( ! SvROK(ST(1)) ) { croak("Argument 2 is null."); return; } if ( SWIG_ConvertPtr(ST(1), (void **)&arg2, SWIGTYPE_p_prelude_msg, 0) ) { croak("Expected type prelude_msg_t * for argument 2."); return; } } result = (int)idmef_impact_read(arg1,arg2); { ST(argvi) = newSViv(result); argvi++; } XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_action_read) { { idmef_action_t *arg1 = (idmef_action_t *) 0 ; prelude_msg_t *arg2 = (prelude_msg_t *) 0 ; int argvi = 0; int result; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: idmef_action_read(action,msg);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_action, 0) ) { croak("Expected type idmef_action_t * for argument 1."); return; } } { if ( ! SvROK(ST(1)) ) { croak("Argument 2 is null."); return; } if ( SWIG_ConvertPtr(ST(1), (void **)&arg2, SWIGTYPE_p_prelude_msg, 0) ) { croak("Expected type prelude_msg_t * for argument 2."); return; } } result = (int)idmef_action_read(arg1,arg2); { ST(argvi) = newSViv(result); argvi++; } XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_confidence_read) { { idmef_confidence_t *arg1 = (idmef_confidence_t *) 0 ; prelude_msg_t *arg2 = (prelude_msg_t *) 0 ; int argvi = 0; int result; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: idmef_confidence_read(confidence,msg);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_confidence, 0) ) { croak("Expected type idmef_confidence_t * for argument 1."); return; } } { if ( ! SvROK(ST(1)) ) { croak("Argument 2 is null."); return; } if ( SWIG_ConvertPtr(ST(1), (void **)&arg2, SWIGTYPE_p_prelude_msg, 0) ) { croak("Expected type prelude_msg_t * for argument 2."); return; } } result = (int)idmef_confidence_read(arg1,arg2); { ST(argvi) = newSViv(result); argvi++; } XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_assessment_read) { { idmef_assessment_t *arg1 = (idmef_assessment_t *) 0 ; prelude_msg_t *arg2 = (prelude_msg_t *) 0 ; int argvi = 0; int result; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: idmef_assessment_read(assessment,msg);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_assessment, 0) ) { croak("Expected type idmef_assessment_t * for argument 1."); return; } } { if ( ! SvROK(ST(1)) ) { croak("Argument 2 is null."); return; } if ( SWIG_ConvertPtr(ST(1), (void **)&arg2, SWIGTYPE_p_prelude_msg, 0) ) { croak("Expected type prelude_msg_t * for argument 2."); return; } } result = (int)idmef_assessment_read(arg1,arg2); { ST(argvi) = newSViv(result); argvi++; } XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_tool_alert_read) { { idmef_tool_alert_t *arg1 = (idmef_tool_alert_t *) 0 ; prelude_msg_t *arg2 = (prelude_msg_t *) 0 ; int argvi = 0; int result; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: idmef_tool_alert_read(tool_alert,msg);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_tool_alert, 0) ) { croak("Expected type idmef_tool_alert_t * for argument 1."); return; } } { if ( ! SvROK(ST(1)) ) { croak("Argument 2 is null."); return; } if ( SWIG_ConvertPtr(ST(1), (void **)&arg2, SWIGTYPE_p_prelude_msg, 0) ) { croak("Expected type prelude_msg_t * for argument 2."); return; } } result = (int)idmef_tool_alert_read(arg1,arg2); { ST(argvi) = newSViv(result); argvi++; } XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_correlation_alert_read) { { idmef_correlation_alert_t *arg1 = (idmef_correlation_alert_t *) 0 ; prelude_msg_t *arg2 = (prelude_msg_t *) 0 ; int argvi = 0; int result; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: idmef_correlation_alert_read(correlation_alert,msg);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_correlation_alert, 0) ) { croak("Expected type idmef_correlation_alert_t * for argument 1."); return; } } { if ( ! SvROK(ST(1)) ) { croak("Argument 2 is null."); return; } if ( SWIG_ConvertPtr(ST(1), (void **)&arg2, SWIGTYPE_p_prelude_msg, 0) ) { croak("Expected type prelude_msg_t * for argument 2."); return; } } result = (int)idmef_correlation_alert_read(arg1,arg2); { ST(argvi) = newSViv(result); argvi++; } XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_overflow_alert_read) { { idmef_overflow_alert_t *arg1 = (idmef_overflow_alert_t *) 0 ; prelude_msg_t *arg2 = (prelude_msg_t *) 0 ; int argvi = 0; int result; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: idmef_overflow_alert_read(overflow_alert,msg);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_overflow_alert, 0) ) { croak("Expected type idmef_overflow_alert_t * for argument 1."); return; } } { if ( ! SvROK(ST(1)) ) { croak("Argument 2 is null."); return; } if ( SWIG_ConvertPtr(ST(1), (void **)&arg2, SWIGTYPE_p_prelude_msg, 0) ) { croak("Expected type prelude_msg_t * for argument 2."); return; } } result = (int)idmef_overflow_alert_read(arg1,arg2); { ST(argvi) = newSViv(result); argvi++; } XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_alert_read) { { idmef_alert_t *arg1 = (idmef_alert_t *) 0 ; prelude_msg_t *arg2 = (prelude_msg_t *) 0 ; int argvi = 0; int result; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: idmef_alert_read(alert,msg);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_alert, 0) ) { croak("Expected type idmef_alert_t * for argument 1."); return; } } { if ( ! SvROK(ST(1)) ) { croak("Argument 2 is null."); return; } if ( SWIG_ConvertPtr(ST(1), (void **)&arg2, SWIGTYPE_p_prelude_msg, 0) ) { croak("Expected type prelude_msg_t * for argument 2."); return; } } result = (int)idmef_alert_read(arg1,arg2); { ST(argvi) = newSViv(result); argvi++; } XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_heartbeat_read) { { idmef_heartbeat_t *arg1 = (idmef_heartbeat_t *) 0 ; prelude_msg_t *arg2 = (prelude_msg_t *) 0 ; int argvi = 0; int result; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: idmef_heartbeat_read(heartbeat,msg);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_heartbeat, 0) ) { croak("Expected type idmef_heartbeat_t * for argument 1."); return; } } { if ( ! SvROK(ST(1)) ) { croak("Argument 2 is null."); return; } if ( SWIG_ConvertPtr(ST(1), (void **)&arg2, SWIGTYPE_p_prelude_msg, 0) ) { croak("Expected type prelude_msg_t * for argument 2."); return; } } result = (int)idmef_heartbeat_read(arg1,arg2); { ST(argvi) = newSViv(result); argvi++; } XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_message_read) { { idmef_message_t *arg1 = (idmef_message_t *) 0 ; prelude_msg_t *arg2 = (prelude_msg_t *) 0 ; int argvi = 0; int result; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: idmef_message_read(message,msg);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_message, 0) ) { croak("Expected type idmef_message_t * for argument 1."); return; } } { if ( ! SvROK(ST(1)) ) { croak("Argument 2 is null."); return; } if ( SWIG_ConvertPtr(ST(1), (void **)&arg2, SWIGTYPE_p_prelude_msg, 0) ) { croak("Expected type prelude_msg_t * for argument 2."); return; } } result = (int)idmef_message_read(arg1,arg2); { ST(argvi) = newSViv(result); argvi++; } XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_additional_data_write) { { idmef_additional_data_t *arg1 = (idmef_additional_data_t *) 0 ; prelude_msgbuf_t *arg2 = (prelude_msgbuf_t *) 0 ; int argvi = 0; int result; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: idmef_additional_data_write(additional_data,msg);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_additional_data, 0) ) { croak("Expected type idmef_additional_data_t * for argument 1."); return; } } { if ( ! SvROK(ST(1)) ) { croak("Argument 2 is null."); return; } if ( SWIG_ConvertPtr(ST(1), (void **)&arg2, SWIGTYPE_p_prelude_msgbuf, 0) ) { croak("Expected type prelude_msgbuf_t * for argument 2."); return; } } result = (int)idmef_additional_data_write(arg1,arg2); { ST(argvi) = newSViv(result); argvi++; } XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_reference_write) { { idmef_reference_t *arg1 = (idmef_reference_t *) 0 ; prelude_msgbuf_t *arg2 = (prelude_msgbuf_t *) 0 ; int argvi = 0; int result; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: idmef_reference_write(reference,msg);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_reference, 0) ) { croak("Expected type idmef_reference_t * for argument 1."); return; } } { if ( ! SvROK(ST(1)) ) { croak("Argument 2 is null."); return; } if ( SWIG_ConvertPtr(ST(1), (void **)&arg2, SWIGTYPE_p_prelude_msgbuf, 0) ) { croak("Expected type prelude_msgbuf_t * for argument 2."); return; } } result = (int)idmef_reference_write(arg1,arg2); { ST(argvi) = newSViv(result); argvi++; } XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_classification_write) { { idmef_classification_t *arg1 = (idmef_classification_t *) 0 ; prelude_msgbuf_t *arg2 = (prelude_msgbuf_t *) 0 ; int argvi = 0; int result; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: idmef_classification_write(classification,msg);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_classification, 0) ) { croak("Expected type idmef_classification_t * for argument 1."); return; } } { if ( ! SvROK(ST(1)) ) { croak("Argument 2 is null."); return; } if ( SWIG_ConvertPtr(ST(1), (void **)&arg2, SWIGTYPE_p_prelude_msgbuf, 0) ) { croak("Expected type prelude_msgbuf_t * for argument 2."); return; } } result = (int)idmef_classification_write(arg1,arg2); { ST(argvi) = newSViv(result); argvi++; } XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_user_id_write) { { idmef_user_id_t *arg1 = (idmef_user_id_t *) 0 ; prelude_msgbuf_t *arg2 = (prelude_msgbuf_t *) 0 ; int argvi = 0; int result; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: idmef_user_id_write(user_id,msg);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_user_id, 0) ) { croak("Expected type idmef_user_id_t * for argument 1."); return; } } { if ( ! SvROK(ST(1)) ) { croak("Argument 2 is null."); return; } if ( SWIG_ConvertPtr(ST(1), (void **)&arg2, SWIGTYPE_p_prelude_msgbuf, 0) ) { croak("Expected type prelude_msgbuf_t * for argument 2."); return; } } result = (int)idmef_user_id_write(arg1,arg2); { ST(argvi) = newSViv(result); argvi++; } XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_user_write) { { idmef_user_t *arg1 = (idmef_user_t *) 0 ; prelude_msgbuf_t *arg2 = (prelude_msgbuf_t *) 0 ; int argvi = 0; int result; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: idmef_user_write(user,msg);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_user, 0) ) { croak("Expected type idmef_user_t * for argument 1."); return; } } { if ( ! SvROK(ST(1)) ) { croak("Argument 2 is null."); return; } if ( SWIG_ConvertPtr(ST(1), (void **)&arg2, SWIGTYPE_p_prelude_msgbuf, 0) ) { croak("Expected type prelude_msgbuf_t * for argument 2."); return; } } result = (int)idmef_user_write(arg1,arg2); { ST(argvi) = newSViv(result); argvi++; } XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_address_write) { { idmef_address_t *arg1 = (idmef_address_t *) 0 ; prelude_msgbuf_t *arg2 = (prelude_msgbuf_t *) 0 ; int argvi = 0; int result; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: idmef_address_write(address,msg);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_address, 0) ) { croak("Expected type idmef_address_t * for argument 1."); return; } } { if ( ! SvROK(ST(1)) ) { croak("Argument 2 is null."); return; } if ( SWIG_ConvertPtr(ST(1), (void **)&arg2, SWIGTYPE_p_prelude_msgbuf, 0) ) { croak("Expected type prelude_msgbuf_t * for argument 2."); return; } } result = (int)idmef_address_write(arg1,arg2); { ST(argvi) = newSViv(result); argvi++; } XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_process_write) { { idmef_process_t *arg1 = (idmef_process_t *) 0 ; prelude_msgbuf_t *arg2 = (prelude_msgbuf_t *) 0 ; int argvi = 0; int result; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: idmef_process_write(process,msg);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_process, 0) ) { croak("Expected type idmef_process_t * for argument 1."); return; } } { if ( ! SvROK(ST(1)) ) { croak("Argument 2 is null."); return; } if ( SWIG_ConvertPtr(ST(1), (void **)&arg2, SWIGTYPE_p_prelude_msgbuf, 0) ) { croak("Expected type prelude_msgbuf_t * for argument 2."); return; } } result = (int)idmef_process_write(arg1,arg2); { ST(argvi) = newSViv(result); argvi++; } XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_web_service_write) { { idmef_web_service_t *arg1 = (idmef_web_service_t *) 0 ; prelude_msgbuf_t *arg2 = (prelude_msgbuf_t *) 0 ; int argvi = 0; int result; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: idmef_web_service_write(web_service,msg);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_web_service, 0) ) { croak("Expected type idmef_web_service_t * for argument 1."); return; } } { if ( ! SvROK(ST(1)) ) { croak("Argument 2 is null."); return; } if ( SWIG_ConvertPtr(ST(1), (void **)&arg2, SWIGTYPE_p_prelude_msgbuf, 0) ) { croak("Expected type prelude_msgbuf_t * for argument 2."); return; } } result = (int)idmef_web_service_write(arg1,arg2); { ST(argvi) = newSViv(result); argvi++; } XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_snmp_service_write) { { idmef_snmp_service_t *arg1 = (idmef_snmp_service_t *) 0 ; prelude_msgbuf_t *arg2 = (prelude_msgbuf_t *) 0 ; int argvi = 0; int result; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: idmef_snmp_service_write(snmp_service,msg);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_snmp_service, 0) ) { croak("Expected type idmef_snmp_service_t * for argument 1."); return; } } { if ( ! SvROK(ST(1)) ) { croak("Argument 2 is null."); return; } if ( SWIG_ConvertPtr(ST(1), (void **)&arg2, SWIGTYPE_p_prelude_msgbuf, 0) ) { croak("Expected type prelude_msgbuf_t * for argument 2."); return; } } result = (int)idmef_snmp_service_write(arg1,arg2); { ST(argvi) = newSViv(result); argvi++; } XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_service_write) { { idmef_service_t *arg1 = (idmef_service_t *) 0 ; prelude_msgbuf_t *arg2 = (prelude_msgbuf_t *) 0 ; int argvi = 0; int result; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: idmef_service_write(service,msg);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_service, 0) ) { croak("Expected type idmef_service_t * for argument 1."); return; } } { if ( ! SvROK(ST(1)) ) { croak("Argument 2 is null."); return; } if ( SWIG_ConvertPtr(ST(1), (void **)&arg2, SWIGTYPE_p_prelude_msgbuf, 0) ) { croak("Expected type prelude_msgbuf_t * for argument 2."); return; } } result = (int)idmef_service_write(arg1,arg2); { ST(argvi) = newSViv(result); argvi++; } XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_node_write) { { idmef_node_t *arg1 = (idmef_node_t *) 0 ; prelude_msgbuf_t *arg2 = (prelude_msgbuf_t *) 0 ; int argvi = 0; int result; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: idmef_node_write(node,msg);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_node, 0) ) { croak("Expected type idmef_node_t * for argument 1."); return; } } { if ( ! SvROK(ST(1)) ) { croak("Argument 2 is null."); return; } if ( SWIG_ConvertPtr(ST(1), (void **)&arg2, SWIGTYPE_p_prelude_msgbuf, 0) ) { croak("Expected type prelude_msgbuf_t * for argument 2."); return; } } result = (int)idmef_node_write(arg1,arg2); { ST(argvi) = newSViv(result); argvi++; } XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_source_write) { { idmef_source_t *arg1 = (idmef_source_t *) 0 ; prelude_msgbuf_t *arg2 = (prelude_msgbuf_t *) 0 ; int argvi = 0; int result; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: idmef_source_write(source,msg);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_source, 0) ) { croak("Expected type idmef_source_t * for argument 1."); return; } } { if ( ! SvROK(ST(1)) ) { croak("Argument 2 is null."); return; } if ( SWIG_ConvertPtr(ST(1), (void **)&arg2, SWIGTYPE_p_prelude_msgbuf, 0) ) { croak("Expected type prelude_msgbuf_t * for argument 2."); return; } } result = (int)idmef_source_write(arg1,arg2); { ST(argvi) = newSViv(result); argvi++; } XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_file_access_write) { { idmef_file_access_t *arg1 = (idmef_file_access_t *) 0 ; prelude_msgbuf_t *arg2 = (prelude_msgbuf_t *) 0 ; int argvi = 0; int result; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: idmef_file_access_write(file_access,msg);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_file_access, 0) ) { croak("Expected type idmef_file_access_t * for argument 1."); return; } } { if ( ! SvROK(ST(1)) ) { croak("Argument 2 is null."); return; } if ( SWIG_ConvertPtr(ST(1), (void **)&arg2, SWIGTYPE_p_prelude_msgbuf, 0) ) { croak("Expected type prelude_msgbuf_t * for argument 2."); return; } } result = (int)idmef_file_access_write(arg1,arg2); { ST(argvi) = newSViv(result); argvi++; } XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_inode_write) { { idmef_inode_t *arg1 = (idmef_inode_t *) 0 ; prelude_msgbuf_t *arg2 = (prelude_msgbuf_t *) 0 ; int argvi = 0; int result; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: idmef_inode_write(inode,msg);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_inode, 0) ) { croak("Expected type idmef_inode_t * for argument 1."); return; } } { if ( ! SvROK(ST(1)) ) { croak("Argument 2 is null."); return; } if ( SWIG_ConvertPtr(ST(1), (void **)&arg2, SWIGTYPE_p_prelude_msgbuf, 0) ) { croak("Expected type prelude_msgbuf_t * for argument 2."); return; } } result = (int)idmef_inode_write(arg1,arg2); { ST(argvi) = newSViv(result); argvi++; } XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_checksum_write) { { idmef_checksum_t *arg1 = (idmef_checksum_t *) 0 ; prelude_msgbuf_t *arg2 = (prelude_msgbuf_t *) 0 ; int argvi = 0; int result; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: idmef_checksum_write(checksum,msg);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_checksum, 0) ) { croak("Expected type idmef_checksum_t * for argument 1."); return; } } { if ( ! SvROK(ST(1)) ) { croak("Argument 2 is null."); return; } if ( SWIG_ConvertPtr(ST(1), (void **)&arg2, SWIGTYPE_p_prelude_msgbuf, 0) ) { croak("Expected type prelude_msgbuf_t * for argument 2."); return; } } result = (int)idmef_checksum_write(arg1,arg2); { ST(argvi) = newSViv(result); argvi++; } XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_file_write) { { idmef_file_t *arg1 = (idmef_file_t *) 0 ; prelude_msgbuf_t *arg2 = (prelude_msgbuf_t *) 0 ; int argvi = 0; int result; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: idmef_file_write(file,msg);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_file, 0) ) { croak("Expected type idmef_file_t * for argument 1."); return; } } { if ( ! SvROK(ST(1)) ) { croak("Argument 2 is null."); return; } if ( SWIG_ConvertPtr(ST(1), (void **)&arg2, SWIGTYPE_p_prelude_msgbuf, 0) ) { croak("Expected type prelude_msgbuf_t * for argument 2."); return; } } result = (int)idmef_file_write(arg1,arg2); { ST(argvi) = newSViv(result); argvi++; } XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_linkage_write) { { idmef_linkage_t *arg1 = (idmef_linkage_t *) 0 ; prelude_msgbuf_t *arg2 = (prelude_msgbuf_t *) 0 ; int argvi = 0; int result; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: idmef_linkage_write(linkage,msg);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_linkage, 0) ) { croak("Expected type idmef_linkage_t * for argument 1."); return; } } { if ( ! SvROK(ST(1)) ) { croak("Argument 2 is null."); return; } if ( SWIG_ConvertPtr(ST(1), (void **)&arg2, SWIGTYPE_p_prelude_msgbuf, 0) ) { croak("Expected type prelude_msgbuf_t * for argument 2."); return; } } result = (int)idmef_linkage_write(arg1,arg2); { ST(argvi) = newSViv(result); argvi++; } XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_target_write) { { idmef_target_t *arg1 = (idmef_target_t *) 0 ; prelude_msgbuf_t *arg2 = (prelude_msgbuf_t *) 0 ; int argvi = 0; int result; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: idmef_target_write(target,msg);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_target, 0) ) { croak("Expected type idmef_target_t * for argument 1."); return; } } { if ( ! SvROK(ST(1)) ) { croak("Argument 2 is null."); return; } if ( SWIG_ConvertPtr(ST(1), (void **)&arg2, SWIGTYPE_p_prelude_msgbuf, 0) ) { croak("Expected type prelude_msgbuf_t * for argument 2."); return; } } result = (int)idmef_target_write(arg1,arg2); { ST(argvi) = newSViv(result); argvi++; } XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_analyzer_write) { { idmef_analyzer_t *arg1 = (idmef_analyzer_t *) 0 ; prelude_msgbuf_t *arg2 = (prelude_msgbuf_t *) 0 ; int argvi = 0; int result; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: idmef_analyzer_write(analyzer,msg);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_analyzer, 0) ) { croak("Expected type idmef_analyzer_t * for argument 1."); return; } } { if ( ! SvROK(ST(1)) ) { croak("Argument 2 is null."); return; } if ( SWIG_ConvertPtr(ST(1), (void **)&arg2, SWIGTYPE_p_prelude_msgbuf, 0) ) { croak("Expected type prelude_msgbuf_t * for argument 2."); return; } } result = (int)idmef_analyzer_write(arg1,arg2); { ST(argvi) = newSViv(result); argvi++; } XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_alertident_write) { { idmef_alertident_t *arg1 = (idmef_alertident_t *) 0 ; prelude_msgbuf_t *arg2 = (prelude_msgbuf_t *) 0 ; void *argp1 = 0 ; int res1 = 0 ; int argvi = 0; int result; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: idmef_alertident_write(alertident,msg);"); } res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_idmef_alertident, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "idmef_alertident_write" "', argument " "1"" of type '" "idmef_alertident_t *""'"); } arg1 = (idmef_alertident_t *)(argp1); { if ( ! SvROK(ST(1)) ) { croak("Argument 2 is null."); return; } if ( SWIG_ConvertPtr(ST(1), (void **)&arg2, SWIGTYPE_p_prelude_msgbuf, 0) ) { croak("Expected type prelude_msgbuf_t * for argument 2."); return; } } result = (int)idmef_alertident_write(arg1,arg2); { ST(argvi) = newSViv(result); argvi++; } XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_impact_write) { { idmef_impact_t *arg1 = (idmef_impact_t *) 0 ; prelude_msgbuf_t *arg2 = (prelude_msgbuf_t *) 0 ; int argvi = 0; int result; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: idmef_impact_write(impact,msg);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_impact, 0) ) { croak("Expected type idmef_impact_t * for argument 1."); return; } } { if ( ! SvROK(ST(1)) ) { croak("Argument 2 is null."); return; } if ( SWIG_ConvertPtr(ST(1), (void **)&arg2, SWIGTYPE_p_prelude_msgbuf, 0) ) { croak("Expected type prelude_msgbuf_t * for argument 2."); return; } } result = (int)idmef_impact_write(arg1,arg2); { ST(argvi) = newSViv(result); argvi++; } XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_action_write) { { idmef_action_t *arg1 = (idmef_action_t *) 0 ; prelude_msgbuf_t *arg2 = (prelude_msgbuf_t *) 0 ; int argvi = 0; int result; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: idmef_action_write(action,msg);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_action, 0) ) { croak("Expected type idmef_action_t * for argument 1."); return; } } { if ( ! SvROK(ST(1)) ) { croak("Argument 2 is null."); return; } if ( SWIG_ConvertPtr(ST(1), (void **)&arg2, SWIGTYPE_p_prelude_msgbuf, 0) ) { croak("Expected type prelude_msgbuf_t * for argument 2."); return; } } result = (int)idmef_action_write(arg1,arg2); { ST(argvi) = newSViv(result); argvi++; } XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_confidence_write) { { idmef_confidence_t *arg1 = (idmef_confidence_t *) 0 ; prelude_msgbuf_t *arg2 = (prelude_msgbuf_t *) 0 ; int argvi = 0; int result; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: idmef_confidence_write(confidence,msg);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_confidence, 0) ) { croak("Expected type idmef_confidence_t * for argument 1."); return; } } { if ( ! SvROK(ST(1)) ) { croak("Argument 2 is null."); return; } if ( SWIG_ConvertPtr(ST(1), (void **)&arg2, SWIGTYPE_p_prelude_msgbuf, 0) ) { croak("Expected type prelude_msgbuf_t * for argument 2."); return; } } result = (int)idmef_confidence_write(arg1,arg2); { ST(argvi) = newSViv(result); argvi++; } XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_assessment_write) { { idmef_assessment_t *arg1 = (idmef_assessment_t *) 0 ; prelude_msgbuf_t *arg2 = (prelude_msgbuf_t *) 0 ; int argvi = 0; int result; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: idmef_assessment_write(assessment,msg);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_assessment, 0) ) { croak("Expected type idmef_assessment_t * for argument 1."); return; } } { if ( ! SvROK(ST(1)) ) { croak("Argument 2 is null."); return; } if ( SWIG_ConvertPtr(ST(1), (void **)&arg2, SWIGTYPE_p_prelude_msgbuf, 0) ) { croak("Expected type prelude_msgbuf_t * for argument 2."); return; } } result = (int)idmef_assessment_write(arg1,arg2); { ST(argvi) = newSViv(result); argvi++; } XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_tool_alert_write) { { idmef_tool_alert_t *arg1 = (idmef_tool_alert_t *) 0 ; prelude_msgbuf_t *arg2 = (prelude_msgbuf_t *) 0 ; int argvi = 0; int result; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: idmef_tool_alert_write(tool_alert,msg);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_tool_alert, 0) ) { croak("Expected type idmef_tool_alert_t * for argument 1."); return; } } { if ( ! SvROK(ST(1)) ) { croak("Argument 2 is null."); return; } if ( SWIG_ConvertPtr(ST(1), (void **)&arg2, SWIGTYPE_p_prelude_msgbuf, 0) ) { croak("Expected type prelude_msgbuf_t * for argument 2."); return; } } result = (int)idmef_tool_alert_write(arg1,arg2); { ST(argvi) = newSViv(result); argvi++; } XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_correlation_alert_write) { { idmef_correlation_alert_t *arg1 = (idmef_correlation_alert_t *) 0 ; prelude_msgbuf_t *arg2 = (prelude_msgbuf_t *) 0 ; int argvi = 0; int result; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: idmef_correlation_alert_write(correlation_alert,msg);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_correlation_alert, 0) ) { croak("Expected type idmef_correlation_alert_t * for argument 1."); return; } } { if ( ! SvROK(ST(1)) ) { croak("Argument 2 is null."); return; } if ( SWIG_ConvertPtr(ST(1), (void **)&arg2, SWIGTYPE_p_prelude_msgbuf, 0) ) { croak("Expected type prelude_msgbuf_t * for argument 2."); return; } } result = (int)idmef_correlation_alert_write(arg1,arg2); { ST(argvi) = newSViv(result); argvi++; } XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_overflow_alert_write) { { idmef_overflow_alert_t *arg1 = (idmef_overflow_alert_t *) 0 ; prelude_msgbuf_t *arg2 = (prelude_msgbuf_t *) 0 ; int argvi = 0; int result; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: idmef_overflow_alert_write(overflow_alert,msg);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_overflow_alert, 0) ) { croak("Expected type idmef_overflow_alert_t * for argument 1."); return; } } { if ( ! SvROK(ST(1)) ) { croak("Argument 2 is null."); return; } if ( SWIG_ConvertPtr(ST(1), (void **)&arg2, SWIGTYPE_p_prelude_msgbuf, 0) ) { croak("Expected type prelude_msgbuf_t * for argument 2."); return; } } result = (int)idmef_overflow_alert_write(arg1,arg2); { ST(argvi) = newSViv(result); argvi++; } XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_alert_write) { { idmef_alert_t *arg1 = (idmef_alert_t *) 0 ; prelude_msgbuf_t *arg2 = (prelude_msgbuf_t *) 0 ; int argvi = 0; int result; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: idmef_alert_write(alert,msg);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_alert, 0) ) { croak("Expected type idmef_alert_t * for argument 1."); return; } } { if ( ! SvROK(ST(1)) ) { croak("Argument 2 is null."); return; } if ( SWIG_ConvertPtr(ST(1), (void **)&arg2, SWIGTYPE_p_prelude_msgbuf, 0) ) { croak("Expected type prelude_msgbuf_t * for argument 2."); return; } } result = (int)idmef_alert_write(arg1,arg2); { ST(argvi) = newSViv(result); argvi++; } XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_heartbeat_write) { { idmef_heartbeat_t *arg1 = (idmef_heartbeat_t *) 0 ; prelude_msgbuf_t *arg2 = (prelude_msgbuf_t *) 0 ; int argvi = 0; int result; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: idmef_heartbeat_write(heartbeat,msg);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_heartbeat, 0) ) { croak("Expected type idmef_heartbeat_t * for argument 1."); return; } } { if ( ! SvROK(ST(1)) ) { croak("Argument 2 is null."); return; } if ( SWIG_ConvertPtr(ST(1), (void **)&arg2, SWIGTYPE_p_prelude_msgbuf, 0) ) { croak("Expected type prelude_msgbuf_t * for argument 2."); return; } } result = (int)idmef_heartbeat_write(arg1,arg2); { ST(argvi) = newSViv(result); argvi++; } XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_message_write) { { idmef_message_t *arg1 = (idmef_message_t *) 0 ; prelude_msgbuf_t *arg2 = (prelude_msgbuf_t *) 0 ; int argvi = 0; int result; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: idmef_message_write(message,msg);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_message, 0) ) { croak("Expected type idmef_message_t * for argument 1."); return; } } { if ( ! SvROK(ST(1)) ) { croak("Argument 2 is null."); return; } if ( SWIG_ConvertPtr(ST(1), (void **)&arg2, SWIGTYPE_p_prelude_msgbuf, 0) ) { croak("Expected type prelude_msgbuf_t * for argument 2."); return; } } result = (int)idmef_message_write(arg1,arg2); { ST(argvi) = newSViv(result); argvi++; } XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_additional_data_new_real) { { idmef_additional_data_t **arg1 = (idmef_additional_data_t **) 0 ; float arg2 ; idmef_additional_data_t *tmp1 ; float val2 ; int ecode2 = 0 ; int argvi = 0; SV * _saved[1] ; int result; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: idmef_additional_data_new_real(ret,data);"); } { arg1 = (idmef_additional_data_t **) &tmp1; } ecode2 = SWIG_AsVal_float SWIG_PERL_CALL_ARGS_2(ST(1), &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "idmef_additional_data_new_real" "', argument " "2"" of type '" "float""'"); } arg2 = (float)(val2); _saved[0] = ST(0); result = (int)idmef_additional_data_new_real(arg1,arg2); { ST(argvi) = newSViv(result); argvi++; } { SV *sv; if ( result >= 0 ) { if ( ! SvROK(_saved[0]) ) { croak("Argument 1 is not a reference."); return; } sv = SvRV(_saved[0]); sv_setsv(sv, SWIG_NewPointerObj((void *) * arg1, SWIGTYPE_p_idmef_additional_data, 0)); } } XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_additional_data_new_byte) { { idmef_additional_data_t **arg1 = (idmef_additional_data_t **) 0 ; uint8_t arg2 ; idmef_additional_data_t *tmp1 ; unsigned char val2 ; int ecode2 = 0 ; int argvi = 0; SV * _saved[1] ; int result; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: idmef_additional_data_new_byte(ret,byte);"); } { arg1 = (idmef_additional_data_t **) &tmp1; } ecode2 = SWIG_AsVal_unsigned_SS_char SWIG_PERL_CALL_ARGS_2(ST(1), &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "idmef_additional_data_new_byte" "', argument " "2"" of type '" "uint8_t""'"); } arg2 = (uint8_t)(val2); _saved[0] = ST(0); result = (int)idmef_additional_data_new_byte(arg1,arg2); { ST(argvi) = newSViv(result); argvi++; } { SV *sv; if ( result >= 0 ) { if ( ! SvROK(_saved[0]) ) { croak("Argument 1 is not a reference."); return; } sv = SvRV(_saved[0]); sv_setsv(sv, SWIG_NewPointerObj((void *) * arg1, SWIGTYPE_p_idmef_additional_data, 0)); } } XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_additional_data_new_integer) { { idmef_additional_data_t **arg1 = (idmef_additional_data_t **) 0 ; uint32_t arg2 ; idmef_additional_data_t *tmp1 ; unsigned int val2 ; int ecode2 = 0 ; int argvi = 0; SV * _saved[1] ; int result; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: idmef_additional_data_new_integer(ret,data);"); } { arg1 = (idmef_additional_data_t **) &tmp1; } ecode2 = SWIG_AsVal_unsigned_SS_int SWIG_PERL_CALL_ARGS_2(ST(1), &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "idmef_additional_data_new_integer" "', argument " "2"" of type '" "uint32_t""'"); } arg2 = (uint32_t)(val2); _saved[0] = ST(0); result = (int)idmef_additional_data_new_integer(arg1,arg2); { ST(argvi) = newSViv(result); argvi++; } { SV *sv; if ( result >= 0 ) { if ( ! SvROK(_saved[0]) ) { croak("Argument 1 is not a reference."); return; } sv = SvRV(_saved[0]); sv_setsv(sv, SWIG_NewPointerObj((void *) * arg1, SWIGTYPE_p_idmef_additional_data, 0)); } } XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_additional_data_new_boolean) { { idmef_additional_data_t **arg1 = (idmef_additional_data_t **) 0 ; prelude_bool_t arg2 ; idmef_additional_data_t *tmp1 ; int val2 ; int ecode2 = 0 ; int argvi = 0; SV * _saved[1] ; int result; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: idmef_additional_data_new_boolean(ret,data);"); } { arg1 = (idmef_additional_data_t **) &tmp1; } ecode2 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(1), &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "idmef_additional_data_new_boolean" "', argument " "2"" of type '" "prelude_bool_t""'"); } arg2 = (prelude_bool_t)(val2); _saved[0] = ST(0); result = (int)idmef_additional_data_new_boolean(arg1,arg2); { ST(argvi) = newSViv(result); argvi++; } { SV *sv; if ( result >= 0 ) { if ( ! SvROK(_saved[0]) ) { croak("Argument 1 is not a reference."); return; } sv = SvRV(_saved[0]); sv_setsv(sv, SWIG_NewPointerObj((void *) * arg1, SWIGTYPE_p_idmef_additional_data, 0)); } } XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_additional_data_new_character) { { idmef_additional_data_t **arg1 = (idmef_additional_data_t **) 0 ; char arg2 ; idmef_additional_data_t *tmp1 ; char val2 ; int ecode2 = 0 ; int argvi = 0; SV * _saved[1] ; int result; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: idmef_additional_data_new_character(ret,data);"); } { arg1 = (idmef_additional_data_t **) &tmp1; } ecode2 = SWIG_AsVal_char SWIG_PERL_CALL_ARGS_2(ST(1), &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "idmef_additional_data_new_character" "', argument " "2"" of type '" "char""'"); } arg2 = (char)(val2); _saved[0] = ST(0); result = (int)idmef_additional_data_new_character(arg1,arg2); { ST(argvi) = newSViv(result); argvi++; } { SV *sv; if ( result >= 0 ) { if ( ! SvROK(_saved[0]) ) { croak("Argument 1 is not a reference."); return; } sv = SvRV(_saved[0]); sv_setsv(sv, SWIG_NewPointerObj((void *) * arg1, SWIGTYPE_p_idmef_additional_data, 0)); } } XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_additional_data_set_real) { { idmef_additional_data_t *arg1 = (idmef_additional_data_t *) 0 ; float arg2 ; float val2 ; int ecode2 = 0 ; int argvi = 0; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: idmef_additional_data_set_real(ptr,data);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_additional_data, 0) ) { croak("Expected type idmef_additional_data_t * for argument 1."); return; } } ecode2 = SWIG_AsVal_float SWIG_PERL_CALL_ARGS_2(ST(1), &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "idmef_additional_data_set_real" "', argument " "2"" of type '" "float""'"); } arg2 = (float)(val2); idmef_additional_data_set_real(arg1,arg2); ST(argvi) = sv_newmortal(); XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_additional_data_set_byte) { { idmef_additional_data_t *arg1 = (idmef_additional_data_t *) 0 ; uint8_t arg2 ; unsigned char val2 ; int ecode2 = 0 ; int argvi = 0; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: idmef_additional_data_set_byte(ptr,byte);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_additional_data, 0) ) { croak("Expected type idmef_additional_data_t * for argument 1."); return; } } ecode2 = SWIG_AsVal_unsigned_SS_char SWIG_PERL_CALL_ARGS_2(ST(1), &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "idmef_additional_data_set_byte" "', argument " "2"" of type '" "uint8_t""'"); } arg2 = (uint8_t)(val2); idmef_additional_data_set_byte(arg1,arg2); ST(argvi) = sv_newmortal(); XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_additional_data_set_integer) { { idmef_additional_data_t *arg1 = (idmef_additional_data_t *) 0 ; uint32_t arg2 ; unsigned int val2 ; int ecode2 = 0 ; int argvi = 0; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: idmef_additional_data_set_integer(ptr,data);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_additional_data, 0) ) { croak("Expected type idmef_additional_data_t * for argument 1."); return; } } ecode2 = SWIG_AsVal_unsigned_SS_int SWIG_PERL_CALL_ARGS_2(ST(1), &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "idmef_additional_data_set_integer" "', argument " "2"" of type '" "uint32_t""'"); } arg2 = (uint32_t)(val2); idmef_additional_data_set_integer(arg1,arg2); ST(argvi) = sv_newmortal(); XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_additional_data_set_boolean) { { idmef_additional_data_t *arg1 = (idmef_additional_data_t *) 0 ; prelude_bool_t arg2 ; int val2 ; int ecode2 = 0 ; int argvi = 0; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: idmef_additional_data_set_boolean(ptr,data);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_additional_data, 0) ) { croak("Expected type idmef_additional_data_t * for argument 1."); return; } } ecode2 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(1), &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "idmef_additional_data_set_boolean" "', argument " "2"" of type '" "prelude_bool_t""'"); } arg2 = (prelude_bool_t)(val2); idmef_additional_data_set_boolean(arg1,arg2); ST(argvi) = sv_newmortal(); XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_additional_data_set_character) { { idmef_additional_data_t *arg1 = (idmef_additional_data_t *) 0 ; char arg2 ; char val2 ; int ecode2 = 0 ; int argvi = 0; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: idmef_additional_data_set_character(ptr,data);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_additional_data, 0) ) { croak("Expected type idmef_additional_data_t * for argument 1."); return; } } ecode2 = SWIG_AsVal_char SWIG_PERL_CALL_ARGS_2(ST(1), &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "idmef_additional_data_set_character" "', argument " "2"" of type '" "char""'"); } arg2 = (char)(val2); idmef_additional_data_set_character(arg1,arg2); ST(argvi) = sv_newmortal(); XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_additional_data_new_string_ref_fast) { { idmef_additional_data_t **arg1 = (idmef_additional_data_t **) 0 ; char *arg2 = (char *) 0 ; size_t arg3 ; idmef_additional_data_t *tmp1 ; int argvi = 0; SV * _saved[1] ; int result; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: idmef_additional_data_new_string_ref_fast(ad,data,len);"); } { arg1 = (idmef_additional_data_t **) &tmp1; } { arg2 = SvPV_nolen(ST(1)); arg3 = SvCUR(ST(1)); } _saved[0] = ST(0); result = (int)idmef_additional_data_new_string_ref_fast(arg1,(char const *)arg2,arg3); { ST(argvi) = newSViv(result); argvi++; } { SV *sv; if ( result >= 0 ) { if ( ! SvROK(_saved[0]) ) { croak("Argument 1 is not a reference."); return; } sv = SvRV(_saved[0]); sv_setsv(sv, SWIG_NewPointerObj((void *) * arg1, SWIGTYPE_p_idmef_additional_data, 0)); } } XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_additional_data_new_string_ref) { { idmef_additional_data_t **arg1 = (idmef_additional_data_t **) 0 ; char *arg2 = (char *) 0 ; idmef_additional_data_t *tmp1 ; int res2 ; char *buf2 = 0 ; int alloc2 = 0 ; int argvi = 0; SV * _saved[1] ; int result; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: idmef_additional_data_new_string_ref(ad,data);"); } { arg1 = (idmef_additional_data_t **) &tmp1; } res2 = SWIG_AsCharPtrAndSize(ST(1), &buf2, NULL, &alloc2); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "idmef_additional_data_new_string_ref" "', argument " "2"" of type '" "char const *""'"); } arg2 = (char *)(buf2); _saved[0] = ST(0); result = (int)idmef_additional_data_new_string_ref(arg1,(char const *)arg2); { ST(argvi) = newSViv(result); argvi++; } { SV *sv; if ( result >= 0 ) { if ( ! SvROK(_saved[0]) ) { croak("Argument 1 is not a reference."); return; } sv = SvRV(_saved[0]); sv_setsv(sv, SWIG_NewPointerObj((void *) * arg1, SWIGTYPE_p_idmef_additional_data, 0)); } } if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); XSRETURN(argvi); fail: if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); SWIG_croak_null(); } } XS(_wrap_idmef_additional_data_set_string_ref_fast) { { idmef_additional_data_t *arg1 = (idmef_additional_data_t *) 0 ; char *arg2 = (char *) 0 ; size_t arg3 ; int argvi = 0; int result; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: idmef_additional_data_set_string_ref_fast(ad,data,len);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_additional_data, 0) ) { croak("Expected type idmef_additional_data_t * for argument 1."); return; } } { arg2 = SvPV_nolen(ST(1)); arg3 = SvCUR(ST(1)); } result = (int)idmef_additional_data_set_string_ref_fast(arg1,(char const *)arg2,arg3); { ST(argvi) = newSViv(result); argvi++; } XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_additional_data_set_string_ref) { { idmef_additional_data_t *arg1 = (idmef_additional_data_t *) 0 ; char *arg2 = (char *) 0 ; int res2 ; char *buf2 = 0 ; int alloc2 = 0 ; int argvi = 0; int result; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: idmef_additional_data_set_string_ref(ad,data);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_additional_data, 0) ) { croak("Expected type idmef_additional_data_t * for argument 1."); return; } } res2 = SWIG_AsCharPtrAndSize(ST(1), &buf2, NULL, &alloc2); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "idmef_additional_data_set_string_ref" "', argument " "2"" of type '" "char const *""'"); } arg2 = (char *)(buf2); result = (int)idmef_additional_data_set_string_ref(arg1,(char const *)arg2); { ST(argvi) = newSViv(result); argvi++; } if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); XSRETURN(argvi); fail: if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); SWIG_croak_null(); } } XS(_wrap_idmef_additional_data_new_string_dup_fast) { { idmef_additional_data_t **arg1 = (idmef_additional_data_t **) 0 ; char *arg2 = (char *) 0 ; size_t arg3 ; idmef_additional_data_t *tmp1 ; int argvi = 0; SV * _saved[1] ; int result; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: idmef_additional_data_new_string_dup_fast(ad,data,len);"); } { arg1 = (idmef_additional_data_t **) &tmp1; } { arg2 = SvPV_nolen(ST(1)); arg3 = SvCUR(ST(1)); } _saved[0] = ST(0); result = (int)idmef_additional_data_new_string_dup_fast(arg1,(char const *)arg2,arg3); { ST(argvi) = newSViv(result); argvi++; } { SV *sv; if ( result >= 0 ) { if ( ! SvROK(_saved[0]) ) { croak("Argument 1 is not a reference."); return; } sv = SvRV(_saved[0]); sv_setsv(sv, SWIG_NewPointerObj((void *) * arg1, SWIGTYPE_p_idmef_additional_data, 0)); } } XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_additional_data_new_string_dup) { { idmef_additional_data_t **arg1 = (idmef_additional_data_t **) 0 ; char *arg2 = (char *) 0 ; idmef_additional_data_t *tmp1 ; int res2 ; char *buf2 = 0 ; int alloc2 = 0 ; int argvi = 0; SV * _saved[1] ; int result; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: idmef_additional_data_new_string_dup(ad,data);"); } { arg1 = (idmef_additional_data_t **) &tmp1; } res2 = SWIG_AsCharPtrAndSize(ST(1), &buf2, NULL, &alloc2); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "idmef_additional_data_new_string_dup" "', argument " "2"" of type '" "char const *""'"); } arg2 = (char *)(buf2); _saved[0] = ST(0); result = (int)idmef_additional_data_new_string_dup(arg1,(char const *)arg2); { ST(argvi) = newSViv(result); argvi++; } { SV *sv; if ( result >= 0 ) { if ( ! SvROK(_saved[0]) ) { croak("Argument 1 is not a reference."); return; } sv = SvRV(_saved[0]); sv_setsv(sv, SWIG_NewPointerObj((void *) * arg1, SWIGTYPE_p_idmef_additional_data, 0)); } } if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); XSRETURN(argvi); fail: if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); SWIG_croak_null(); } } XS(_wrap_idmef_additional_data_set_string_dup_fast) { { idmef_additional_data_t *arg1 = (idmef_additional_data_t *) 0 ; char *arg2 = (char *) 0 ; size_t arg3 ; int argvi = 0; int result; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: idmef_additional_data_set_string_dup_fast(ad,data,len);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_additional_data, 0) ) { croak("Expected type idmef_additional_data_t * for argument 1."); return; } } { arg2 = SvPV_nolen(ST(1)); arg3 = SvCUR(ST(1)); } result = (int)idmef_additional_data_set_string_dup_fast(arg1,(char const *)arg2,arg3); { ST(argvi) = newSViv(result); argvi++; } XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_additional_data_set_string_dup) { { idmef_additional_data_t *arg1 = (idmef_additional_data_t *) 0 ; char *arg2 = (char *) 0 ; int res2 ; char *buf2 = 0 ; int alloc2 = 0 ; int argvi = 0; int result; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: idmef_additional_data_set_string_dup(ad,data);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_additional_data, 0) ) { croak("Expected type idmef_additional_data_t * for argument 1."); return; } } res2 = SWIG_AsCharPtrAndSize(ST(1), &buf2, NULL, &alloc2); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "idmef_additional_data_set_string_dup" "', argument " "2"" of type '" "char const *""'"); } arg2 = (char *)(buf2); result = (int)idmef_additional_data_set_string_dup(arg1,(char const *)arg2); { ST(argvi) = newSViv(result); argvi++; } if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); XSRETURN(argvi); fail: if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); SWIG_croak_null(); } } XS(_wrap_idmef_additional_data_new_string_nodup_fast) { { idmef_additional_data_t **arg1 = (idmef_additional_data_t **) 0 ; char *arg2 = (char *) 0 ; size_t arg3 ; idmef_additional_data_t *tmp1 ; int argvi = 0; SV * _saved[1] ; int result; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: idmef_additional_data_new_string_nodup_fast(ad,data,len);"); } { arg1 = (idmef_additional_data_t **) &tmp1; } { arg2 = SvPV_nolen(ST(1)); arg3 = SvCUR(ST(1)); } _saved[0] = ST(0); result = (int)idmef_additional_data_new_string_nodup_fast(arg1,arg2,arg3); { ST(argvi) = newSViv(result); argvi++; } { SV *sv; if ( result >= 0 ) { if ( ! SvROK(_saved[0]) ) { croak("Argument 1 is not a reference."); return; } sv = SvRV(_saved[0]); sv_setsv(sv, SWIG_NewPointerObj((void *) * arg1, SWIGTYPE_p_idmef_additional_data, 0)); } } XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_additional_data_new_string_nodup) { { idmef_additional_data_t **arg1 = (idmef_additional_data_t **) 0 ; char *arg2 = (char *) 0 ; idmef_additional_data_t *tmp1 ; int res2 ; char *buf2 = 0 ; int alloc2 = 0 ; int argvi = 0; SV * _saved[1] ; int result; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: idmef_additional_data_new_string_nodup(ad,data);"); } { arg1 = (idmef_additional_data_t **) &tmp1; } res2 = SWIG_AsCharPtrAndSize(ST(1), &buf2, NULL, &alloc2); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "idmef_additional_data_new_string_nodup" "', argument " "2"" of type '" "char *""'"); } arg2 = (char *)(buf2); _saved[0] = ST(0); result = (int)idmef_additional_data_new_string_nodup(arg1,arg2); { ST(argvi) = newSViv(result); argvi++; } { SV *sv; if ( result >= 0 ) { if ( ! SvROK(_saved[0]) ) { croak("Argument 1 is not a reference."); return; } sv = SvRV(_saved[0]); sv_setsv(sv, SWIG_NewPointerObj((void *) * arg1, SWIGTYPE_p_idmef_additional_data, 0)); } } if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); XSRETURN(argvi); fail: if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); SWIG_croak_null(); } } XS(_wrap_idmef_additional_data_set_string_nodup_fast) { { idmef_additional_data_t *arg1 = (idmef_additional_data_t *) 0 ; char *arg2 = (char *) 0 ; size_t arg3 ; int argvi = 0; int result; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: idmef_additional_data_set_string_nodup_fast(ad,data,len);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_additional_data, 0) ) { croak("Expected type idmef_additional_data_t * for argument 1."); return; } } { arg2 = SvPV_nolen(ST(1)); arg3 = SvCUR(ST(1)); } result = (int)idmef_additional_data_set_string_nodup_fast(arg1,arg2,arg3); { ST(argvi) = newSViv(result); argvi++; } XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_additional_data_set_string_nodup) { { idmef_additional_data_t *arg1 = (idmef_additional_data_t *) 0 ; char *arg2 = (char *) 0 ; int res2 ; char *buf2 = 0 ; int alloc2 = 0 ; int argvi = 0; int result; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: idmef_additional_data_set_string_nodup(ad,data);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_additional_data, 0) ) { croak("Expected type idmef_additional_data_t * for argument 1."); return; } } res2 = SWIG_AsCharPtrAndSize(ST(1), &buf2, NULL, &alloc2); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "idmef_additional_data_set_string_nodup" "', argument " "2"" of type '" "char *""'"); } arg2 = (char *)(buf2); result = (int)idmef_additional_data_set_string_nodup(arg1,arg2); { ST(argvi) = newSViv(result); argvi++; } if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); XSRETURN(argvi); fail: if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); SWIG_croak_null(); } } XS(_wrap_idmef_additional_data_new_ntpstamp_ref_fast) { { idmef_additional_data_t **arg1 = (idmef_additional_data_t **) 0 ; char *arg2 = (char *) 0 ; size_t arg3 ; idmef_additional_data_t *tmp1 ; int argvi = 0; SV * _saved[1] ; int result; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: idmef_additional_data_new_ntpstamp_ref_fast(ad,data,len);"); } { arg1 = (idmef_additional_data_t **) &tmp1; } { arg2 = SvPV_nolen(ST(1)); arg3 = SvCUR(ST(1)); } _saved[0] = ST(0); result = (int)idmef_additional_data_new_ntpstamp_ref_fast(arg1,(char const *)arg2,arg3); { ST(argvi) = newSViv(result); argvi++; } { SV *sv; if ( result >= 0 ) { if ( ! SvROK(_saved[0]) ) { croak("Argument 1 is not a reference."); return; } sv = SvRV(_saved[0]); sv_setsv(sv, SWIG_NewPointerObj((void *) * arg1, SWIGTYPE_p_idmef_additional_data, 0)); } } XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_additional_data_new_ntpstamp_ref) { { idmef_additional_data_t **arg1 = (idmef_additional_data_t **) 0 ; char *arg2 = (char *) 0 ; idmef_additional_data_t *tmp1 ; int res2 ; char *buf2 = 0 ; int alloc2 = 0 ; int argvi = 0; SV * _saved[1] ; int result; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: idmef_additional_data_new_ntpstamp_ref(ad,data);"); } { arg1 = (idmef_additional_data_t **) &tmp1; } res2 = SWIG_AsCharPtrAndSize(ST(1), &buf2, NULL, &alloc2); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "idmef_additional_data_new_ntpstamp_ref" "', argument " "2"" of type '" "char const *""'"); } arg2 = (char *)(buf2); _saved[0] = ST(0); result = (int)idmef_additional_data_new_ntpstamp_ref(arg1,(char const *)arg2); { ST(argvi) = newSViv(result); argvi++; } { SV *sv; if ( result >= 0 ) { if ( ! SvROK(_saved[0]) ) { croak("Argument 1 is not a reference."); return; } sv = SvRV(_saved[0]); sv_setsv(sv, SWIG_NewPointerObj((void *) * arg1, SWIGTYPE_p_idmef_additional_data, 0)); } } if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); XSRETURN(argvi); fail: if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); SWIG_croak_null(); } } XS(_wrap_idmef_additional_data_set_ntpstamp_ref_fast) { { idmef_additional_data_t *arg1 = (idmef_additional_data_t *) 0 ; char *arg2 = (char *) 0 ; size_t arg3 ; int argvi = 0; int result; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: idmef_additional_data_set_ntpstamp_ref_fast(ad,data,len);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_additional_data, 0) ) { croak("Expected type idmef_additional_data_t * for argument 1."); return; } } { arg2 = SvPV_nolen(ST(1)); arg3 = SvCUR(ST(1)); } result = (int)idmef_additional_data_set_ntpstamp_ref_fast(arg1,(char const *)arg2,arg3); { ST(argvi) = newSViv(result); argvi++; } XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_additional_data_set_ntpstamp_ref) { { idmef_additional_data_t *arg1 = (idmef_additional_data_t *) 0 ; char *arg2 = (char *) 0 ; int res2 ; char *buf2 = 0 ; int alloc2 = 0 ; int argvi = 0; int result; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: idmef_additional_data_set_ntpstamp_ref(ad,data);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_additional_data, 0) ) { croak("Expected type idmef_additional_data_t * for argument 1."); return; } } res2 = SWIG_AsCharPtrAndSize(ST(1), &buf2, NULL, &alloc2); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "idmef_additional_data_set_ntpstamp_ref" "', argument " "2"" of type '" "char const *""'"); } arg2 = (char *)(buf2); result = (int)idmef_additional_data_set_ntpstamp_ref(arg1,(char const *)arg2); { ST(argvi) = newSViv(result); argvi++; } if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); XSRETURN(argvi); fail: if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); SWIG_croak_null(); } } XS(_wrap_idmef_additional_data_new_ntpstamp_dup_fast) { { idmef_additional_data_t **arg1 = (idmef_additional_data_t **) 0 ; char *arg2 = (char *) 0 ; size_t arg3 ; idmef_additional_data_t *tmp1 ; int argvi = 0; SV * _saved[1] ; int result; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: idmef_additional_data_new_ntpstamp_dup_fast(ad,data,len);"); } { arg1 = (idmef_additional_data_t **) &tmp1; } { arg2 = SvPV_nolen(ST(1)); arg3 = SvCUR(ST(1)); } _saved[0] = ST(0); result = (int)idmef_additional_data_new_ntpstamp_dup_fast(arg1,(char const *)arg2,arg3); { ST(argvi) = newSViv(result); argvi++; } { SV *sv; if ( result >= 0 ) { if ( ! SvROK(_saved[0]) ) { croak("Argument 1 is not a reference."); return; } sv = SvRV(_saved[0]); sv_setsv(sv, SWIG_NewPointerObj((void *) * arg1, SWIGTYPE_p_idmef_additional_data, 0)); } } XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_additional_data_new_ntpstamp_dup) { { idmef_additional_data_t **arg1 = (idmef_additional_data_t **) 0 ; char *arg2 = (char *) 0 ; idmef_additional_data_t *tmp1 ; int res2 ; char *buf2 = 0 ; int alloc2 = 0 ; int argvi = 0; SV * _saved[1] ; int result; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: idmef_additional_data_new_ntpstamp_dup(ad,data);"); } { arg1 = (idmef_additional_data_t **) &tmp1; } res2 = SWIG_AsCharPtrAndSize(ST(1), &buf2, NULL, &alloc2); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "idmef_additional_data_new_ntpstamp_dup" "', argument " "2"" of type '" "char const *""'"); } arg2 = (char *)(buf2); _saved[0] = ST(0); result = (int)idmef_additional_data_new_ntpstamp_dup(arg1,(char const *)arg2); { ST(argvi) = newSViv(result); argvi++; } { SV *sv; if ( result >= 0 ) { if ( ! SvROK(_saved[0]) ) { croak("Argument 1 is not a reference."); return; } sv = SvRV(_saved[0]); sv_setsv(sv, SWIG_NewPointerObj((void *) * arg1, SWIGTYPE_p_idmef_additional_data, 0)); } } if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); XSRETURN(argvi); fail: if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); SWIG_croak_null(); } } XS(_wrap_idmef_additional_data_set_ntpstamp_dup_fast) { { idmef_additional_data_t *arg1 = (idmef_additional_data_t *) 0 ; char *arg2 = (char *) 0 ; size_t arg3 ; int argvi = 0; int result; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: idmef_additional_data_set_ntpstamp_dup_fast(ad,data,len);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_additional_data, 0) ) { croak("Expected type idmef_additional_data_t * for argument 1."); return; } } { arg2 = SvPV_nolen(ST(1)); arg3 = SvCUR(ST(1)); } result = (int)idmef_additional_data_set_ntpstamp_dup_fast(arg1,(char const *)arg2,arg3); { ST(argvi) = newSViv(result); argvi++; } XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_additional_data_set_ntpstamp_dup) { { idmef_additional_data_t *arg1 = (idmef_additional_data_t *) 0 ; char *arg2 = (char *) 0 ; int res2 ; char *buf2 = 0 ; int alloc2 = 0 ; int argvi = 0; int result; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: idmef_additional_data_set_ntpstamp_dup(ad,data);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_additional_data, 0) ) { croak("Expected type idmef_additional_data_t * for argument 1."); return; } } res2 = SWIG_AsCharPtrAndSize(ST(1), &buf2, NULL, &alloc2); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "idmef_additional_data_set_ntpstamp_dup" "', argument " "2"" of type '" "char const *""'"); } arg2 = (char *)(buf2); result = (int)idmef_additional_data_set_ntpstamp_dup(arg1,(char const *)arg2); { ST(argvi) = newSViv(result); argvi++; } if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); XSRETURN(argvi); fail: if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); SWIG_croak_null(); } } XS(_wrap_idmef_additional_data_new_ntpstamp_nodup_fast) { { idmef_additional_data_t **arg1 = (idmef_additional_data_t **) 0 ; char *arg2 = (char *) 0 ; size_t arg3 ; idmef_additional_data_t *tmp1 ; int argvi = 0; SV * _saved[1] ; int result; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: idmef_additional_data_new_ntpstamp_nodup_fast(ad,data,len);"); } { arg1 = (idmef_additional_data_t **) &tmp1; } { arg2 = SvPV_nolen(ST(1)); arg3 = SvCUR(ST(1)); } _saved[0] = ST(0); result = (int)idmef_additional_data_new_ntpstamp_nodup_fast(arg1,arg2,arg3); { ST(argvi) = newSViv(result); argvi++; } { SV *sv; if ( result >= 0 ) { if ( ! SvROK(_saved[0]) ) { croak("Argument 1 is not a reference."); return; } sv = SvRV(_saved[0]); sv_setsv(sv, SWIG_NewPointerObj((void *) * arg1, SWIGTYPE_p_idmef_additional_data, 0)); } } XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_additional_data_new_ntpstamp_nodup) { { idmef_additional_data_t **arg1 = (idmef_additional_data_t **) 0 ; char *arg2 = (char *) 0 ; idmef_additional_data_t *tmp1 ; int res2 ; char *buf2 = 0 ; int alloc2 = 0 ; int argvi = 0; SV * _saved[1] ; int result; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: idmef_additional_data_new_ntpstamp_nodup(ad,data);"); } { arg1 = (idmef_additional_data_t **) &tmp1; } res2 = SWIG_AsCharPtrAndSize(ST(1), &buf2, NULL, &alloc2); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "idmef_additional_data_new_ntpstamp_nodup" "', argument " "2"" of type '" "char *""'"); } arg2 = (char *)(buf2); _saved[0] = ST(0); result = (int)idmef_additional_data_new_ntpstamp_nodup(arg1,arg2); { ST(argvi) = newSViv(result); argvi++; } { SV *sv; if ( result >= 0 ) { if ( ! SvROK(_saved[0]) ) { croak("Argument 1 is not a reference."); return; } sv = SvRV(_saved[0]); sv_setsv(sv, SWIG_NewPointerObj((void *) * arg1, SWIGTYPE_p_idmef_additional_data, 0)); } } if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); XSRETURN(argvi); fail: if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); SWIG_croak_null(); } } XS(_wrap_idmef_additional_data_set_ntpstamp_nodup_fast) { { idmef_additional_data_t *arg1 = (idmef_additional_data_t *) 0 ; char *arg2 = (char *) 0 ; size_t arg3 ; int argvi = 0; int result; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: idmef_additional_data_set_ntpstamp_nodup_fast(ad,data,len);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_additional_data, 0) ) { croak("Expected type idmef_additional_data_t * for argument 1."); return; } } { arg2 = SvPV_nolen(ST(1)); arg3 = SvCUR(ST(1)); } result = (int)idmef_additional_data_set_ntpstamp_nodup_fast(arg1,arg2,arg3); { ST(argvi) = newSViv(result); argvi++; } XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_additional_data_set_ntpstamp_nodup) { { idmef_additional_data_t *arg1 = (idmef_additional_data_t *) 0 ; char *arg2 = (char *) 0 ; int res2 ; char *buf2 = 0 ; int alloc2 = 0 ; int argvi = 0; int result; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: idmef_additional_data_set_ntpstamp_nodup(ad,data);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_additional_data, 0) ) { croak("Expected type idmef_additional_data_t * for argument 1."); return; } } res2 = SWIG_AsCharPtrAndSize(ST(1), &buf2, NULL, &alloc2); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "idmef_additional_data_set_ntpstamp_nodup" "', argument " "2"" of type '" "char *""'"); } arg2 = (char *)(buf2); result = (int)idmef_additional_data_set_ntpstamp_nodup(arg1,arg2); { ST(argvi) = newSViv(result); argvi++; } if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); XSRETURN(argvi); fail: if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); SWIG_croak_null(); } } XS(_wrap_idmef_additional_data_new_date_time_ref_fast) { { idmef_additional_data_t **arg1 = (idmef_additional_data_t **) 0 ; char *arg2 = (char *) 0 ; size_t arg3 ; idmef_additional_data_t *tmp1 ; int argvi = 0; SV * _saved[1] ; int result; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: idmef_additional_data_new_date_time_ref_fast(ad,data,len);"); } { arg1 = (idmef_additional_data_t **) &tmp1; } { arg2 = SvPV_nolen(ST(1)); arg3 = SvCUR(ST(1)); } _saved[0] = ST(0); result = (int)idmef_additional_data_new_date_time_ref_fast(arg1,(char const *)arg2,arg3); { ST(argvi) = newSViv(result); argvi++; } { SV *sv; if ( result >= 0 ) { if ( ! SvROK(_saved[0]) ) { croak("Argument 1 is not a reference."); return; } sv = SvRV(_saved[0]); sv_setsv(sv, SWIG_NewPointerObj((void *) * arg1, SWIGTYPE_p_idmef_additional_data, 0)); } } XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_additional_data_new_date_time_ref) { { idmef_additional_data_t **arg1 = (idmef_additional_data_t **) 0 ; char *arg2 = (char *) 0 ; idmef_additional_data_t *tmp1 ; int res2 ; char *buf2 = 0 ; int alloc2 = 0 ; int argvi = 0; SV * _saved[1] ; int result; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: idmef_additional_data_new_date_time_ref(ad,data);"); } { arg1 = (idmef_additional_data_t **) &tmp1; } res2 = SWIG_AsCharPtrAndSize(ST(1), &buf2, NULL, &alloc2); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "idmef_additional_data_new_date_time_ref" "', argument " "2"" of type '" "char const *""'"); } arg2 = (char *)(buf2); _saved[0] = ST(0); result = (int)idmef_additional_data_new_date_time_ref(arg1,(char const *)arg2); { ST(argvi) = newSViv(result); argvi++; } { SV *sv; if ( result >= 0 ) { if ( ! SvROK(_saved[0]) ) { croak("Argument 1 is not a reference."); return; } sv = SvRV(_saved[0]); sv_setsv(sv, SWIG_NewPointerObj((void *) * arg1, SWIGTYPE_p_idmef_additional_data, 0)); } } if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); XSRETURN(argvi); fail: if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); SWIG_croak_null(); } } XS(_wrap_idmef_additional_data_set_date_time_ref_fast) { { idmef_additional_data_t *arg1 = (idmef_additional_data_t *) 0 ; char *arg2 = (char *) 0 ; size_t arg3 ; int argvi = 0; int result; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: idmef_additional_data_set_date_time_ref_fast(ad,data,len);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_additional_data, 0) ) { croak("Expected type idmef_additional_data_t * for argument 1."); return; } } { arg2 = SvPV_nolen(ST(1)); arg3 = SvCUR(ST(1)); } result = (int)idmef_additional_data_set_date_time_ref_fast(arg1,(char const *)arg2,arg3); { ST(argvi) = newSViv(result); argvi++; } XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_additional_data_set_date_time_ref) { { idmef_additional_data_t *arg1 = (idmef_additional_data_t *) 0 ; char *arg2 = (char *) 0 ; int res2 ; char *buf2 = 0 ; int alloc2 = 0 ; int argvi = 0; int result; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: idmef_additional_data_set_date_time_ref(ad,data);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_additional_data, 0) ) { croak("Expected type idmef_additional_data_t * for argument 1."); return; } } res2 = SWIG_AsCharPtrAndSize(ST(1), &buf2, NULL, &alloc2); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "idmef_additional_data_set_date_time_ref" "', argument " "2"" of type '" "char const *""'"); } arg2 = (char *)(buf2); result = (int)idmef_additional_data_set_date_time_ref(arg1,(char const *)arg2); { ST(argvi) = newSViv(result); argvi++; } if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); XSRETURN(argvi); fail: if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); SWIG_croak_null(); } } XS(_wrap_idmef_additional_data_new_date_time_dup_fast) { { idmef_additional_data_t **arg1 = (idmef_additional_data_t **) 0 ; char *arg2 = (char *) 0 ; size_t arg3 ; idmef_additional_data_t *tmp1 ; int argvi = 0; SV * _saved[1] ; int result; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: idmef_additional_data_new_date_time_dup_fast(ad,data,len);"); } { arg1 = (idmef_additional_data_t **) &tmp1; } { arg2 = SvPV_nolen(ST(1)); arg3 = SvCUR(ST(1)); } _saved[0] = ST(0); result = (int)idmef_additional_data_new_date_time_dup_fast(arg1,(char const *)arg2,arg3); { ST(argvi) = newSViv(result); argvi++; } { SV *sv; if ( result >= 0 ) { if ( ! SvROK(_saved[0]) ) { croak("Argument 1 is not a reference."); return; } sv = SvRV(_saved[0]); sv_setsv(sv, SWIG_NewPointerObj((void *) * arg1, SWIGTYPE_p_idmef_additional_data, 0)); } } XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_additional_data_new_date_time_dup) { { idmef_additional_data_t **arg1 = (idmef_additional_data_t **) 0 ; char *arg2 = (char *) 0 ; idmef_additional_data_t *tmp1 ; int res2 ; char *buf2 = 0 ; int alloc2 = 0 ; int argvi = 0; SV * _saved[1] ; int result; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: idmef_additional_data_new_date_time_dup(ad,data);"); } { arg1 = (idmef_additional_data_t **) &tmp1; } res2 = SWIG_AsCharPtrAndSize(ST(1), &buf2, NULL, &alloc2); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "idmef_additional_data_new_date_time_dup" "', argument " "2"" of type '" "char const *""'"); } arg2 = (char *)(buf2); _saved[0] = ST(0); result = (int)idmef_additional_data_new_date_time_dup(arg1,(char const *)arg2); { ST(argvi) = newSViv(result); argvi++; } { SV *sv; if ( result >= 0 ) { if ( ! SvROK(_saved[0]) ) { croak("Argument 1 is not a reference."); return; } sv = SvRV(_saved[0]); sv_setsv(sv, SWIG_NewPointerObj((void *) * arg1, SWIGTYPE_p_idmef_additional_data, 0)); } } if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); XSRETURN(argvi); fail: if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); SWIG_croak_null(); } } XS(_wrap_idmef_additional_data_set_date_time_dup_fast) { { idmef_additional_data_t *arg1 = (idmef_additional_data_t *) 0 ; char *arg2 = (char *) 0 ; size_t arg3 ; int argvi = 0; int result; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: idmef_additional_data_set_date_time_dup_fast(ad,data,len);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_additional_data, 0) ) { croak("Expected type idmef_additional_data_t * for argument 1."); return; } } { arg2 = SvPV_nolen(ST(1)); arg3 = SvCUR(ST(1)); } result = (int)idmef_additional_data_set_date_time_dup_fast(arg1,(char const *)arg2,arg3); { ST(argvi) = newSViv(result); argvi++; } XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_additional_data_set_date_time_dup) { { idmef_additional_data_t *arg1 = (idmef_additional_data_t *) 0 ; char *arg2 = (char *) 0 ; int res2 ; char *buf2 = 0 ; int alloc2 = 0 ; int argvi = 0; int result; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: idmef_additional_data_set_date_time_dup(ad,data);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_additional_data, 0) ) { croak("Expected type idmef_additional_data_t * for argument 1."); return; } } res2 = SWIG_AsCharPtrAndSize(ST(1), &buf2, NULL, &alloc2); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "idmef_additional_data_set_date_time_dup" "', argument " "2"" of type '" "char const *""'"); } arg2 = (char *)(buf2); result = (int)idmef_additional_data_set_date_time_dup(arg1,(char const *)arg2); { ST(argvi) = newSViv(result); argvi++; } if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); XSRETURN(argvi); fail: if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); SWIG_croak_null(); } } XS(_wrap_idmef_additional_data_new_date_time_nodup_fast) { { idmef_additional_data_t **arg1 = (idmef_additional_data_t **) 0 ; char *arg2 = (char *) 0 ; size_t arg3 ; idmef_additional_data_t *tmp1 ; int argvi = 0; SV * _saved[1] ; int result; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: idmef_additional_data_new_date_time_nodup_fast(ad,data,len);"); } { arg1 = (idmef_additional_data_t **) &tmp1; } { arg2 = SvPV_nolen(ST(1)); arg3 = SvCUR(ST(1)); } _saved[0] = ST(0); result = (int)idmef_additional_data_new_date_time_nodup_fast(arg1,arg2,arg3); { ST(argvi) = newSViv(result); argvi++; } { SV *sv; if ( result >= 0 ) { if ( ! SvROK(_saved[0]) ) { croak("Argument 1 is not a reference."); return; } sv = SvRV(_saved[0]); sv_setsv(sv, SWIG_NewPointerObj((void *) * arg1, SWIGTYPE_p_idmef_additional_data, 0)); } } XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_additional_data_new_date_time_nodup) { { idmef_additional_data_t **arg1 = (idmef_additional_data_t **) 0 ; char *arg2 = (char *) 0 ; idmef_additional_data_t *tmp1 ; int res2 ; char *buf2 = 0 ; int alloc2 = 0 ; int argvi = 0; SV * _saved[1] ; int result; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: idmef_additional_data_new_date_time_nodup(ad,data);"); } { arg1 = (idmef_additional_data_t **) &tmp1; } res2 = SWIG_AsCharPtrAndSize(ST(1), &buf2, NULL, &alloc2); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "idmef_additional_data_new_date_time_nodup" "', argument " "2"" of type '" "char *""'"); } arg2 = (char *)(buf2); _saved[0] = ST(0); result = (int)idmef_additional_data_new_date_time_nodup(arg1,arg2); { ST(argvi) = newSViv(result); argvi++; } { SV *sv; if ( result >= 0 ) { if ( ! SvROK(_saved[0]) ) { croak("Argument 1 is not a reference."); return; } sv = SvRV(_saved[0]); sv_setsv(sv, SWIG_NewPointerObj((void *) * arg1, SWIGTYPE_p_idmef_additional_data, 0)); } } if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); XSRETURN(argvi); fail: if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); SWIG_croak_null(); } } XS(_wrap_idmef_additional_data_set_date_time_nodup_fast) { { idmef_additional_data_t *arg1 = (idmef_additional_data_t *) 0 ; char *arg2 = (char *) 0 ; size_t arg3 ; int argvi = 0; int result; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: idmef_additional_data_set_date_time_nodup_fast(ad,data,len);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_additional_data, 0) ) { croak("Expected type idmef_additional_data_t * for argument 1."); return; } } { arg2 = SvPV_nolen(ST(1)); arg3 = SvCUR(ST(1)); } result = (int)idmef_additional_data_set_date_time_nodup_fast(arg1,arg2,arg3); { ST(argvi) = newSViv(result); argvi++; } XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_additional_data_set_date_time_nodup) { { idmef_additional_data_t *arg1 = (idmef_additional_data_t *) 0 ; char *arg2 = (char *) 0 ; int res2 ; char *buf2 = 0 ; int alloc2 = 0 ; int argvi = 0; int result; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: idmef_additional_data_set_date_time_nodup(ad,data);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_additional_data, 0) ) { croak("Expected type idmef_additional_data_t * for argument 1."); return; } } res2 = SWIG_AsCharPtrAndSize(ST(1), &buf2, NULL, &alloc2); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "idmef_additional_data_set_date_time_nodup" "', argument " "2"" of type '" "char *""'"); } arg2 = (char *)(buf2); result = (int)idmef_additional_data_set_date_time_nodup(arg1,arg2); { ST(argvi) = newSViv(result); argvi++; } if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); XSRETURN(argvi); fail: if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); SWIG_croak_null(); } } XS(_wrap_idmef_additional_data_new_portlist_ref_fast) { { idmef_additional_data_t **arg1 = (idmef_additional_data_t **) 0 ; char *arg2 = (char *) 0 ; size_t arg3 ; idmef_additional_data_t *tmp1 ; int argvi = 0; SV * _saved[1] ; int result; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: idmef_additional_data_new_portlist_ref_fast(ad,data,len);"); } { arg1 = (idmef_additional_data_t **) &tmp1; } { arg2 = SvPV_nolen(ST(1)); arg3 = SvCUR(ST(1)); } _saved[0] = ST(0); result = (int)idmef_additional_data_new_portlist_ref_fast(arg1,(char const *)arg2,arg3); { ST(argvi) = newSViv(result); argvi++; } { SV *sv; if ( result >= 0 ) { if ( ! SvROK(_saved[0]) ) { croak("Argument 1 is not a reference."); return; } sv = SvRV(_saved[0]); sv_setsv(sv, SWIG_NewPointerObj((void *) * arg1, SWIGTYPE_p_idmef_additional_data, 0)); } } XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_additional_data_new_portlist_ref) { { idmef_additional_data_t **arg1 = (idmef_additional_data_t **) 0 ; char *arg2 = (char *) 0 ; idmef_additional_data_t *tmp1 ; int res2 ; char *buf2 = 0 ; int alloc2 = 0 ; int argvi = 0; SV * _saved[1] ; int result; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: idmef_additional_data_new_portlist_ref(ad,data);"); } { arg1 = (idmef_additional_data_t **) &tmp1; } res2 = SWIG_AsCharPtrAndSize(ST(1), &buf2, NULL, &alloc2); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "idmef_additional_data_new_portlist_ref" "', argument " "2"" of type '" "char const *""'"); } arg2 = (char *)(buf2); _saved[0] = ST(0); result = (int)idmef_additional_data_new_portlist_ref(arg1,(char const *)arg2); { ST(argvi) = newSViv(result); argvi++; } { SV *sv; if ( result >= 0 ) { if ( ! SvROK(_saved[0]) ) { croak("Argument 1 is not a reference."); return; } sv = SvRV(_saved[0]); sv_setsv(sv, SWIG_NewPointerObj((void *) * arg1, SWIGTYPE_p_idmef_additional_data, 0)); } } if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); XSRETURN(argvi); fail: if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); SWIG_croak_null(); } } XS(_wrap_idmef_additional_data_set_portlist_ref_fast) { { idmef_additional_data_t *arg1 = (idmef_additional_data_t *) 0 ; char *arg2 = (char *) 0 ; size_t arg3 ; int argvi = 0; int result; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: idmef_additional_data_set_portlist_ref_fast(ad,data,len);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_additional_data, 0) ) { croak("Expected type idmef_additional_data_t * for argument 1."); return; } } { arg2 = SvPV_nolen(ST(1)); arg3 = SvCUR(ST(1)); } result = (int)idmef_additional_data_set_portlist_ref_fast(arg1,(char const *)arg2,arg3); { ST(argvi) = newSViv(result); argvi++; } XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_additional_data_set_portlist_ref) { { idmef_additional_data_t *arg1 = (idmef_additional_data_t *) 0 ; char *arg2 = (char *) 0 ; int res2 ; char *buf2 = 0 ; int alloc2 = 0 ; int argvi = 0; int result; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: idmef_additional_data_set_portlist_ref(ad,data);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_additional_data, 0) ) { croak("Expected type idmef_additional_data_t * for argument 1."); return; } } res2 = SWIG_AsCharPtrAndSize(ST(1), &buf2, NULL, &alloc2); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "idmef_additional_data_set_portlist_ref" "', argument " "2"" of type '" "char const *""'"); } arg2 = (char *)(buf2); result = (int)idmef_additional_data_set_portlist_ref(arg1,(char const *)arg2); { ST(argvi) = newSViv(result); argvi++; } if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); XSRETURN(argvi); fail: if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); SWIG_croak_null(); } } XS(_wrap_idmef_additional_data_new_portlist_dup_fast) { { idmef_additional_data_t **arg1 = (idmef_additional_data_t **) 0 ; char *arg2 = (char *) 0 ; size_t arg3 ; idmef_additional_data_t *tmp1 ; int argvi = 0; SV * _saved[1] ; int result; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: idmef_additional_data_new_portlist_dup_fast(ad,data,len);"); } { arg1 = (idmef_additional_data_t **) &tmp1; } { arg2 = SvPV_nolen(ST(1)); arg3 = SvCUR(ST(1)); } _saved[0] = ST(0); result = (int)idmef_additional_data_new_portlist_dup_fast(arg1,(char const *)arg2,arg3); { ST(argvi) = newSViv(result); argvi++; } { SV *sv; if ( result >= 0 ) { if ( ! SvROK(_saved[0]) ) { croak("Argument 1 is not a reference."); return; } sv = SvRV(_saved[0]); sv_setsv(sv, SWIG_NewPointerObj((void *) * arg1, SWIGTYPE_p_idmef_additional_data, 0)); } } XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_additional_data_new_portlist_dup) { { idmef_additional_data_t **arg1 = (idmef_additional_data_t **) 0 ; char *arg2 = (char *) 0 ; idmef_additional_data_t *tmp1 ; int res2 ; char *buf2 = 0 ; int alloc2 = 0 ; int argvi = 0; SV * _saved[1] ; int result; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: idmef_additional_data_new_portlist_dup(ad,data);"); } { arg1 = (idmef_additional_data_t **) &tmp1; } res2 = SWIG_AsCharPtrAndSize(ST(1), &buf2, NULL, &alloc2); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "idmef_additional_data_new_portlist_dup" "', argument " "2"" of type '" "char const *""'"); } arg2 = (char *)(buf2); _saved[0] = ST(0); result = (int)idmef_additional_data_new_portlist_dup(arg1,(char const *)arg2); { ST(argvi) = newSViv(result); argvi++; } { SV *sv; if ( result >= 0 ) { if ( ! SvROK(_saved[0]) ) { croak("Argument 1 is not a reference."); return; } sv = SvRV(_saved[0]); sv_setsv(sv, SWIG_NewPointerObj((void *) * arg1, SWIGTYPE_p_idmef_additional_data, 0)); } } if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); XSRETURN(argvi); fail: if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); SWIG_croak_null(); } } XS(_wrap_idmef_additional_data_set_portlist_dup_fast) { { idmef_additional_data_t *arg1 = (idmef_additional_data_t *) 0 ; char *arg2 = (char *) 0 ; size_t arg3 ; int argvi = 0; int result; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: idmef_additional_data_set_portlist_dup_fast(ad,data,len);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_additional_data, 0) ) { croak("Expected type idmef_additional_data_t * for argument 1."); return; } } { arg2 = SvPV_nolen(ST(1)); arg3 = SvCUR(ST(1)); } result = (int)idmef_additional_data_set_portlist_dup_fast(arg1,(char const *)arg2,arg3); { ST(argvi) = newSViv(result); argvi++; } XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_additional_data_set_portlist_dup) { { idmef_additional_data_t *arg1 = (idmef_additional_data_t *) 0 ; char *arg2 = (char *) 0 ; int res2 ; char *buf2 = 0 ; int alloc2 = 0 ; int argvi = 0; int result; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: idmef_additional_data_set_portlist_dup(ad,data);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_additional_data, 0) ) { croak("Expected type idmef_additional_data_t * for argument 1."); return; } } res2 = SWIG_AsCharPtrAndSize(ST(1), &buf2, NULL, &alloc2); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "idmef_additional_data_set_portlist_dup" "', argument " "2"" of type '" "char const *""'"); } arg2 = (char *)(buf2); result = (int)idmef_additional_data_set_portlist_dup(arg1,(char const *)arg2); { ST(argvi) = newSViv(result); argvi++; } if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); XSRETURN(argvi); fail: if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); SWIG_croak_null(); } } XS(_wrap_idmef_additional_data_new_portlist_nodup_fast) { { idmef_additional_data_t **arg1 = (idmef_additional_data_t **) 0 ; char *arg2 = (char *) 0 ; size_t arg3 ; idmef_additional_data_t *tmp1 ; int argvi = 0; SV * _saved[1] ; int result; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: idmef_additional_data_new_portlist_nodup_fast(ad,data,len);"); } { arg1 = (idmef_additional_data_t **) &tmp1; } { arg2 = SvPV_nolen(ST(1)); arg3 = SvCUR(ST(1)); } _saved[0] = ST(0); result = (int)idmef_additional_data_new_portlist_nodup_fast(arg1,arg2,arg3); { ST(argvi) = newSViv(result); argvi++; } { SV *sv; if ( result >= 0 ) { if ( ! SvROK(_saved[0]) ) { croak("Argument 1 is not a reference."); return; } sv = SvRV(_saved[0]); sv_setsv(sv, SWIG_NewPointerObj((void *) * arg1, SWIGTYPE_p_idmef_additional_data, 0)); } } XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_additional_data_new_portlist_nodup) { { idmef_additional_data_t **arg1 = (idmef_additional_data_t **) 0 ; char *arg2 = (char *) 0 ; idmef_additional_data_t *tmp1 ; int res2 ; char *buf2 = 0 ; int alloc2 = 0 ; int argvi = 0; SV * _saved[1] ; int result; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: idmef_additional_data_new_portlist_nodup(ad,data);"); } { arg1 = (idmef_additional_data_t **) &tmp1; } res2 = SWIG_AsCharPtrAndSize(ST(1), &buf2, NULL, &alloc2); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "idmef_additional_data_new_portlist_nodup" "', argument " "2"" of type '" "char *""'"); } arg2 = (char *)(buf2); _saved[0] = ST(0); result = (int)idmef_additional_data_new_portlist_nodup(arg1,arg2); { ST(argvi) = newSViv(result); argvi++; } { SV *sv; if ( result >= 0 ) { if ( ! SvROK(_saved[0]) ) { croak("Argument 1 is not a reference."); return; } sv = SvRV(_saved[0]); sv_setsv(sv, SWIG_NewPointerObj((void *) * arg1, SWIGTYPE_p_idmef_additional_data, 0)); } } if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); XSRETURN(argvi); fail: if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); SWIG_croak_null(); } } XS(_wrap_idmef_additional_data_set_portlist_nodup_fast) { { idmef_additional_data_t *arg1 = (idmef_additional_data_t *) 0 ; char *arg2 = (char *) 0 ; size_t arg3 ; int argvi = 0; int result; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: idmef_additional_data_set_portlist_nodup_fast(ad,data,len);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_additional_data, 0) ) { croak("Expected type idmef_additional_data_t * for argument 1."); return; } } { arg2 = SvPV_nolen(ST(1)); arg3 = SvCUR(ST(1)); } result = (int)idmef_additional_data_set_portlist_nodup_fast(arg1,arg2,arg3); { ST(argvi) = newSViv(result); argvi++; } XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_additional_data_set_portlist_nodup) { { idmef_additional_data_t *arg1 = (idmef_additional_data_t *) 0 ; char *arg2 = (char *) 0 ; int res2 ; char *buf2 = 0 ; int alloc2 = 0 ; int argvi = 0; int result; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: idmef_additional_data_set_portlist_nodup(ad,data);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_additional_data, 0) ) { croak("Expected type idmef_additional_data_t * for argument 1."); return; } } res2 = SWIG_AsCharPtrAndSize(ST(1), &buf2, NULL, &alloc2); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "idmef_additional_data_set_portlist_nodup" "', argument " "2"" of type '" "char *""'"); } arg2 = (char *)(buf2); result = (int)idmef_additional_data_set_portlist_nodup(arg1,arg2); { ST(argvi) = newSViv(result); argvi++; } if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); XSRETURN(argvi); fail: if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); SWIG_croak_null(); } } XS(_wrap_idmef_additional_data_new_xml_ref_fast) { { idmef_additional_data_t **arg1 = (idmef_additional_data_t **) 0 ; char *arg2 = (char *) 0 ; size_t arg3 ; idmef_additional_data_t *tmp1 ; int argvi = 0; SV * _saved[1] ; int result; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: idmef_additional_data_new_xml_ref_fast(ad,data,len);"); } { arg1 = (idmef_additional_data_t **) &tmp1; } { arg2 = SvPV_nolen(ST(1)); arg3 = SvCUR(ST(1)); } _saved[0] = ST(0); result = (int)idmef_additional_data_new_xml_ref_fast(arg1,(char const *)arg2,arg3); { ST(argvi) = newSViv(result); argvi++; } { SV *sv; if ( result >= 0 ) { if ( ! SvROK(_saved[0]) ) { croak("Argument 1 is not a reference."); return; } sv = SvRV(_saved[0]); sv_setsv(sv, SWIG_NewPointerObj((void *) * arg1, SWIGTYPE_p_idmef_additional_data, 0)); } } XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_additional_data_new_xml_ref) { { idmef_additional_data_t **arg1 = (idmef_additional_data_t **) 0 ; char *arg2 = (char *) 0 ; idmef_additional_data_t *tmp1 ; int res2 ; char *buf2 = 0 ; int alloc2 = 0 ; int argvi = 0; SV * _saved[1] ; int result; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: idmef_additional_data_new_xml_ref(ad,data);"); } { arg1 = (idmef_additional_data_t **) &tmp1; } res2 = SWIG_AsCharPtrAndSize(ST(1), &buf2, NULL, &alloc2); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "idmef_additional_data_new_xml_ref" "', argument " "2"" of type '" "char const *""'"); } arg2 = (char *)(buf2); _saved[0] = ST(0); result = (int)idmef_additional_data_new_xml_ref(arg1,(char const *)arg2); { ST(argvi) = newSViv(result); argvi++; } { SV *sv; if ( result >= 0 ) { if ( ! SvROK(_saved[0]) ) { croak("Argument 1 is not a reference."); return; } sv = SvRV(_saved[0]); sv_setsv(sv, SWIG_NewPointerObj((void *) * arg1, SWIGTYPE_p_idmef_additional_data, 0)); } } if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); XSRETURN(argvi); fail: if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); SWIG_croak_null(); } } XS(_wrap_idmef_additional_data_set_xml_ref_fast) { { idmef_additional_data_t *arg1 = (idmef_additional_data_t *) 0 ; char *arg2 = (char *) 0 ; size_t arg3 ; int argvi = 0; int result; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: idmef_additional_data_set_xml_ref_fast(ad,data,len);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_additional_data, 0) ) { croak("Expected type idmef_additional_data_t * for argument 1."); return; } } { arg2 = SvPV_nolen(ST(1)); arg3 = SvCUR(ST(1)); } result = (int)idmef_additional_data_set_xml_ref_fast(arg1,(char const *)arg2,arg3); { ST(argvi) = newSViv(result); argvi++; } XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_additional_data_set_xml_ref) { { idmef_additional_data_t *arg1 = (idmef_additional_data_t *) 0 ; char *arg2 = (char *) 0 ; int res2 ; char *buf2 = 0 ; int alloc2 = 0 ; int argvi = 0; int result; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: idmef_additional_data_set_xml_ref(ad,data);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_additional_data, 0) ) { croak("Expected type idmef_additional_data_t * for argument 1."); return; } } res2 = SWIG_AsCharPtrAndSize(ST(1), &buf2, NULL, &alloc2); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "idmef_additional_data_set_xml_ref" "', argument " "2"" of type '" "char const *""'"); } arg2 = (char *)(buf2); result = (int)idmef_additional_data_set_xml_ref(arg1,(char const *)arg2); { ST(argvi) = newSViv(result); argvi++; } if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); XSRETURN(argvi); fail: if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); SWIG_croak_null(); } } XS(_wrap_idmef_additional_data_new_xml_dup_fast) { { idmef_additional_data_t **arg1 = (idmef_additional_data_t **) 0 ; char *arg2 = (char *) 0 ; size_t arg3 ; idmef_additional_data_t *tmp1 ; int argvi = 0; SV * _saved[1] ; int result; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: idmef_additional_data_new_xml_dup_fast(ad,data,len);"); } { arg1 = (idmef_additional_data_t **) &tmp1; } { arg2 = SvPV_nolen(ST(1)); arg3 = SvCUR(ST(1)); } _saved[0] = ST(0); result = (int)idmef_additional_data_new_xml_dup_fast(arg1,(char const *)arg2,arg3); { ST(argvi) = newSViv(result); argvi++; } { SV *sv; if ( result >= 0 ) { if ( ! SvROK(_saved[0]) ) { croak("Argument 1 is not a reference."); return; } sv = SvRV(_saved[0]); sv_setsv(sv, SWIG_NewPointerObj((void *) * arg1, SWIGTYPE_p_idmef_additional_data, 0)); } } XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_additional_data_new_xml_dup) { { idmef_additional_data_t **arg1 = (idmef_additional_data_t **) 0 ; char *arg2 = (char *) 0 ; idmef_additional_data_t *tmp1 ; int res2 ; char *buf2 = 0 ; int alloc2 = 0 ; int argvi = 0; SV * _saved[1] ; int result; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: idmef_additional_data_new_xml_dup(ad,data);"); } { arg1 = (idmef_additional_data_t **) &tmp1; } res2 = SWIG_AsCharPtrAndSize(ST(1), &buf2, NULL, &alloc2); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "idmef_additional_data_new_xml_dup" "', argument " "2"" of type '" "char const *""'"); } arg2 = (char *)(buf2); _saved[0] = ST(0); result = (int)idmef_additional_data_new_xml_dup(arg1,(char const *)arg2); { ST(argvi) = newSViv(result); argvi++; } { SV *sv; if ( result >= 0 ) { if ( ! SvROK(_saved[0]) ) { croak("Argument 1 is not a reference."); return; } sv = SvRV(_saved[0]); sv_setsv(sv, SWIG_NewPointerObj((void *) * arg1, SWIGTYPE_p_idmef_additional_data, 0)); } } if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); XSRETURN(argvi); fail: if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); SWIG_croak_null(); } } XS(_wrap_idmef_additional_data_set_xml_dup_fast) { { idmef_additional_data_t *arg1 = (idmef_additional_data_t *) 0 ; char *arg2 = (char *) 0 ; size_t arg3 ; int argvi = 0; int result; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: idmef_additional_data_set_xml_dup_fast(ad,data,len);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_additional_data, 0) ) { croak("Expected type idmef_additional_data_t * for argument 1."); return; } } { arg2 = SvPV_nolen(ST(1)); arg3 = SvCUR(ST(1)); } result = (int)idmef_additional_data_set_xml_dup_fast(arg1,(char const *)arg2,arg3); { ST(argvi) = newSViv(result); argvi++; } XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_additional_data_set_xml_dup) { { idmef_additional_data_t *arg1 = (idmef_additional_data_t *) 0 ; char *arg2 = (char *) 0 ; int res2 ; char *buf2 = 0 ; int alloc2 = 0 ; int argvi = 0; int result; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: idmef_additional_data_set_xml_dup(ad,data);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_additional_data, 0) ) { croak("Expected type idmef_additional_data_t * for argument 1."); return; } } res2 = SWIG_AsCharPtrAndSize(ST(1), &buf2, NULL, &alloc2); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "idmef_additional_data_set_xml_dup" "', argument " "2"" of type '" "char const *""'"); } arg2 = (char *)(buf2); result = (int)idmef_additional_data_set_xml_dup(arg1,(char const *)arg2); { ST(argvi) = newSViv(result); argvi++; } if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); XSRETURN(argvi); fail: if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); SWIG_croak_null(); } } XS(_wrap_idmef_additional_data_new_xml_nodup_fast) { { idmef_additional_data_t **arg1 = (idmef_additional_data_t **) 0 ; char *arg2 = (char *) 0 ; size_t arg3 ; idmef_additional_data_t *tmp1 ; int argvi = 0; SV * _saved[1] ; int result; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: idmef_additional_data_new_xml_nodup_fast(ad,data,len);"); } { arg1 = (idmef_additional_data_t **) &tmp1; } { arg2 = SvPV_nolen(ST(1)); arg3 = SvCUR(ST(1)); } _saved[0] = ST(0); result = (int)idmef_additional_data_new_xml_nodup_fast(arg1,arg2,arg3); { ST(argvi) = newSViv(result); argvi++; } { SV *sv; if ( result >= 0 ) { if ( ! SvROK(_saved[0]) ) { croak("Argument 1 is not a reference."); return; } sv = SvRV(_saved[0]); sv_setsv(sv, SWIG_NewPointerObj((void *) * arg1, SWIGTYPE_p_idmef_additional_data, 0)); } } XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_additional_data_new_xml_nodup) { { idmef_additional_data_t **arg1 = (idmef_additional_data_t **) 0 ; char *arg2 = (char *) 0 ; idmef_additional_data_t *tmp1 ; int res2 ; char *buf2 = 0 ; int alloc2 = 0 ; int argvi = 0; SV * _saved[1] ; int result; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: idmef_additional_data_new_xml_nodup(ad,data);"); } { arg1 = (idmef_additional_data_t **) &tmp1; } res2 = SWIG_AsCharPtrAndSize(ST(1), &buf2, NULL, &alloc2); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "idmef_additional_data_new_xml_nodup" "', argument " "2"" of type '" "char *""'"); } arg2 = (char *)(buf2); _saved[0] = ST(0); result = (int)idmef_additional_data_new_xml_nodup(arg1,arg2); { ST(argvi) = newSViv(result); argvi++; } { SV *sv; if ( result >= 0 ) { if ( ! SvROK(_saved[0]) ) { croak("Argument 1 is not a reference."); return; } sv = SvRV(_saved[0]); sv_setsv(sv, SWIG_NewPointerObj((void *) * arg1, SWIGTYPE_p_idmef_additional_data, 0)); } } if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); XSRETURN(argvi); fail: if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); SWIG_croak_null(); } } XS(_wrap_idmef_additional_data_set_xml_nodup_fast) { { idmef_additional_data_t *arg1 = (idmef_additional_data_t *) 0 ; char *arg2 = (char *) 0 ; size_t arg3 ; int argvi = 0; int result; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: idmef_additional_data_set_xml_nodup_fast(ad,data,len);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_additional_data, 0) ) { croak("Expected type idmef_additional_data_t * for argument 1."); return; } } { arg2 = SvPV_nolen(ST(1)); arg3 = SvCUR(ST(1)); } result = (int)idmef_additional_data_set_xml_nodup_fast(arg1,arg2,arg3); { ST(argvi) = newSViv(result); argvi++; } XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_additional_data_set_xml_nodup) { { idmef_additional_data_t *arg1 = (idmef_additional_data_t *) 0 ; char *arg2 = (char *) 0 ; int res2 ; char *buf2 = 0 ; int alloc2 = 0 ; int argvi = 0; int result; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: idmef_additional_data_set_xml_nodup(ad,data);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_additional_data, 0) ) { croak("Expected type idmef_additional_data_t * for argument 1."); return; } } res2 = SWIG_AsCharPtrAndSize(ST(1), &buf2, NULL, &alloc2); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "idmef_additional_data_set_xml_nodup" "', argument " "2"" of type '" "char *""'"); } arg2 = (char *)(buf2); result = (int)idmef_additional_data_set_xml_nodup(arg1,arg2); { ST(argvi) = newSViv(result); argvi++; } if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); XSRETURN(argvi); fail: if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); SWIG_croak_null(); } } XS(_wrap_idmef_additional_data_new_byte_string_ref) { { idmef_additional_data_t **arg1 = (idmef_additional_data_t **) 0 ; unsigned char *arg2 = (unsigned char *) 0 ; size_t arg3 ; idmef_additional_data_t *tmp1 ; int argvi = 0; SV * _saved[1] ; int result; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: idmef_additional_data_new_byte_string_ref(ad,data,len);"); } { arg1 = (idmef_additional_data_t **) &tmp1; } { arg2 = (unsigned char *) SvPV_nolen(ST(1)); arg3 = SvCUR(ST(1)); } _saved[0] = ST(0); result = (int)idmef_additional_data_new_byte_string_ref(arg1,(unsigned char const *)arg2,arg3); { ST(argvi) = newSViv(result); argvi++; } { SV *sv; if ( result >= 0 ) { if ( ! SvROK(_saved[0]) ) { croak("Argument 1 is not a reference."); return; } sv = SvRV(_saved[0]); sv_setsv(sv, SWIG_NewPointerObj((void *) * arg1, SWIGTYPE_p_idmef_additional_data, 0)); } } XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_additional_data_set_byte_string_ref) { { idmef_additional_data_t *arg1 = (idmef_additional_data_t *) 0 ; unsigned char *arg2 = (unsigned char *) 0 ; size_t arg3 ; int argvi = 0; int result; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: idmef_additional_data_set_byte_string_ref(ad,data,len);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_additional_data, 0) ) { croak("Expected type idmef_additional_data_t * for argument 1."); return; } } { arg2 = (unsigned char *) SvPV_nolen(ST(1)); arg3 = SvCUR(ST(1)); } result = (int)idmef_additional_data_set_byte_string_ref(arg1,(unsigned char const *)arg2,arg3); { ST(argvi) = newSViv(result); argvi++; } XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_additional_data_new_byte_string_dup) { { idmef_additional_data_t **arg1 = (idmef_additional_data_t **) 0 ; unsigned char *arg2 = (unsigned char *) 0 ; size_t arg3 ; idmef_additional_data_t *tmp1 ; int argvi = 0; SV * _saved[1] ; int result; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: idmef_additional_data_new_byte_string_dup(ad,data,len);"); } { arg1 = (idmef_additional_data_t **) &tmp1; } { arg2 = (unsigned char *) SvPV_nolen(ST(1)); arg3 = SvCUR(ST(1)); } _saved[0] = ST(0); result = (int)idmef_additional_data_new_byte_string_dup(arg1,(unsigned char const *)arg2,arg3); { ST(argvi) = newSViv(result); argvi++; } { SV *sv; if ( result >= 0 ) { if ( ! SvROK(_saved[0]) ) { croak("Argument 1 is not a reference."); return; } sv = SvRV(_saved[0]); sv_setsv(sv, SWIG_NewPointerObj((void *) * arg1, SWIGTYPE_p_idmef_additional_data, 0)); } } XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_additional_data_set_byte_string_dup) { { idmef_additional_data_t *arg1 = (idmef_additional_data_t *) 0 ; unsigned char *arg2 = (unsigned char *) 0 ; size_t arg3 ; int argvi = 0; int result; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: idmef_additional_data_set_byte_string_dup(ad,data,len);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_additional_data, 0) ) { croak("Expected type idmef_additional_data_t * for argument 1."); return; } } { arg2 = (unsigned char *) SvPV_nolen(ST(1)); arg3 = SvCUR(ST(1)); } result = (int)idmef_additional_data_set_byte_string_dup(arg1,(unsigned char const *)arg2,arg3); { ST(argvi) = newSViv(result); argvi++; } XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_additional_data_new_byte_string_nodup) { { idmef_additional_data_t **arg1 = (idmef_additional_data_t **) 0 ; unsigned char *arg2 = (unsigned char *) 0 ; size_t arg3 ; idmef_additional_data_t *tmp1 ; int argvi = 0; SV * _saved[1] ; int result; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: idmef_additional_data_new_byte_string_nodup(ad,data,len);"); } { arg1 = (idmef_additional_data_t **) &tmp1; } { arg2 = (unsigned char *) SvPV_nolen(ST(1)); arg3 = SvCUR(ST(1)); } _saved[0] = ST(0); result = (int)idmef_additional_data_new_byte_string_nodup(arg1,arg2,arg3); { ST(argvi) = newSViv(result); argvi++; } { SV *sv; if ( result >= 0 ) { if ( ! SvROK(_saved[0]) ) { croak("Argument 1 is not a reference."); return; } sv = SvRV(_saved[0]); sv_setsv(sv, SWIG_NewPointerObj((void *) * arg1, SWIGTYPE_p_idmef_additional_data, 0)); } } XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_additional_data_set_byte_string_nodup) { { idmef_additional_data_t *arg1 = (idmef_additional_data_t *) 0 ; unsigned char *arg2 = (unsigned char *) 0 ; size_t arg3 ; int argvi = 0; int result; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: idmef_additional_data_set_byte_string_nodup(ad,data,len);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_additional_data, 0) ) { croak("Expected type idmef_additional_data_t * for argument 1."); return; } } { arg2 = (unsigned char *) SvPV_nolen(ST(1)); arg3 = SvCUR(ST(1)); } result = (int)idmef_additional_data_set_byte_string_nodup(arg1,arg2,arg3); { ST(argvi) = newSViv(result); argvi++; } XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_additional_data_copy_ref) { { idmef_additional_data_t *arg1 = (idmef_additional_data_t *) 0 ; idmef_additional_data_t *arg2 = (idmef_additional_data_t *) 0 ; int argvi = 0; int result; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: idmef_additional_data_copy_ref(src,dst);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_additional_data, 0) ) { croak("Expected type idmef_additional_data_t * for argument 1."); return; } } { if ( ! SvROK(ST(1)) ) { croak("Argument 2 is null."); return; } if ( SWIG_ConvertPtr(ST(1), (void **)&arg2, SWIGTYPE_p_idmef_additional_data, 0) ) { croak("Expected type idmef_additional_data_t * for argument 2."); return; } } result = (int)idmef_additional_data_copy_ref(arg1,arg2); { ST(argvi) = newSViv(result); argvi++; } XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_additional_data_copy_dup) { { idmef_additional_data_t *arg1 = (idmef_additional_data_t *) 0 ; idmef_additional_data_t *arg2 = (idmef_additional_data_t *) 0 ; int argvi = 0; int result; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: idmef_additional_data_copy_dup(src,dst);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_additional_data, 0) ) { croak("Expected type idmef_additional_data_t * for argument 1."); return; } } { if ( ! SvROK(ST(1)) ) { croak("Argument 2 is null."); return; } if ( SWIG_ConvertPtr(ST(1), (void **)&arg2, SWIGTYPE_p_idmef_additional_data, 0) ) { croak("Expected type idmef_additional_data_t * for argument 2."); return; } } result = (int)idmef_additional_data_copy_dup(arg1,arg2); { ST(argvi) = newSViv(result); argvi++; } XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_additional_data_get_real) { { idmef_additional_data_t *arg1 = (idmef_additional_data_t *) 0 ; int argvi = 0; float result; dXSARGS; if ((items < 1) || (items > 1)) { SWIG_croak("Usage: idmef_additional_data_get_real(data);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_additional_data, 0) ) { croak("Expected type idmef_additional_data_t * for argument 1."); return; } } result = (float)idmef_additional_data_get_real(arg1); ST(argvi) = SWIG_From_float SWIG_PERL_CALL_ARGS_1((float)(result)); argvi++ ; XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_additional_data_get_integer) { { idmef_additional_data_t *arg1 = (idmef_additional_data_t *) 0 ; int argvi = 0; uint32_t result; dXSARGS; if ((items < 1) || (items > 1)) { SWIG_croak("Usage: idmef_additional_data_get_integer(data);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_additional_data, 0) ) { croak("Expected type idmef_additional_data_t * for argument 1."); return; } } result = (uint32_t)idmef_additional_data_get_integer(arg1); ST(argvi) = SWIG_From_unsigned_SS_int SWIG_PERL_CALL_ARGS_1((unsigned int)(result)); argvi++ ; XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_additional_data_get_boolean) { { idmef_additional_data_t *arg1 = (idmef_additional_data_t *) 0 ; int argvi = 0; prelude_bool_t result; dXSARGS; if ((items < 1) || (items > 1)) { SWIG_croak("Usage: idmef_additional_data_get_boolean(data);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_additional_data, 0) ) { croak("Expected type idmef_additional_data_t * for argument 1."); return; } } result = (prelude_bool_t)idmef_additional_data_get_boolean(arg1); ST(argvi) = SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(result)); argvi++ ; XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_additional_data_get_character) { { idmef_additional_data_t *arg1 = (idmef_additional_data_t *) 0 ; int argvi = 0; char result; dXSARGS; if ((items < 1) || (items > 1)) { SWIG_croak("Usage: idmef_additional_data_get_character(data);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_additional_data, 0) ) { croak("Expected type idmef_additional_data_t * for argument 1."); return; } } result = (char)idmef_additional_data_get_character(arg1); ST(argvi) = SWIG_From_char SWIG_PERL_CALL_ARGS_1((char)(result)); argvi++ ; XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_additional_data_get_byte) { { idmef_additional_data_t *arg1 = (idmef_additional_data_t *) 0 ; int argvi = 0; uint8_t result; dXSARGS; if ((items < 1) || (items > 1)) { SWIG_croak("Usage: idmef_additional_data_get_byte(data);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_additional_data, 0) ) { croak("Expected type idmef_additional_data_t * for argument 1."); return; } } result = (uint8_t)idmef_additional_data_get_byte(arg1); ST(argvi) = SWIG_From_unsigned_SS_char SWIG_PERL_CALL_ARGS_1((unsigned char)(result)); argvi++ ; XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_additional_data_get_len) { { idmef_additional_data_t *arg1 = (idmef_additional_data_t *) 0 ; int argvi = 0; size_t result; dXSARGS; if ((items < 1) || (items > 1)) { SWIG_croak("Usage: idmef_additional_data_get_len(data);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_additional_data, 0) ) { croak("Expected type idmef_additional_data_t * for argument 1."); return; } } result = idmef_additional_data_get_len(arg1); ST(argvi) = SWIG_From_size_t SWIG_PERL_CALL_ARGS_1((size_t)(result)); argvi++ ; XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_additional_data_is_empty) { { idmef_additional_data_t *arg1 = (idmef_additional_data_t *) 0 ; int argvi = 0; prelude_bool_t result; dXSARGS; if ((items < 1) || (items > 1)) { SWIG_croak("Usage: idmef_additional_data_is_empty(data);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_additional_data, 0) ) { croak("Expected type idmef_additional_data_t * for argument 1."); return; } } result = (prelude_bool_t)idmef_additional_data_is_empty(arg1); ST(argvi) = SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(result)); argvi++ ; XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_additional_data_data_to_string) { { idmef_additional_data_t *arg1 = (idmef_additional_data_t *) 0 ; prelude_string_t *arg2 = (prelude_string_t *) 0 ; int argvi = 0; int result; dXSARGS; { int ret; ret = prelude_string_new(&(arg2)); if ( ret < 0 ) { swig_perl_raise_error(ret); return; } } if ((items < 1) || (items > 1)) { SWIG_croak("Usage: idmef_additional_data_data_to_string(ad);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_idmef_additional_data, 0) ) { croak("Expected type idmef_additional_data_t * for argument 1."); return; } } result = (int)idmef_additional_data_data_to_string(arg1,arg2); { ST(argvi) = newSViv(result); argvi++; } { if ( result >= 0 ) { ST(argvi) = newSVpv(prelude_string_get_string(arg2), prelude_string_get_len(arg2)); argvi++; } prelude_string_destroy(arg2); } XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_value_type_class_t_object_set) { { idmef_value_type_class_t *arg1 = (idmef_value_type_class_t *) 0 ; void *arg2 = (void *) 0 ; void *argp1 = 0 ; int res1 = 0 ; int res2 ; int argvi = 0; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: idmef_value_type_class_t_object_set(self,object);"); } res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_idmef_value_type_class_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "idmef_value_type_class_t_object_set" "', argument " "1"" of type '" "idmef_value_type_class_t *""'"); } arg1 = (idmef_value_type_class_t *)(argp1); res2 = SWIG_ConvertPtr(ST(1),SWIG_as_voidptrptr(&arg2), 0, SWIG_POINTER_DISOWN); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "idmef_value_type_class_t_object_set" "', argument " "2"" of type '" "void *""'"); } if (arg1) (arg1)->object = arg2; ST(argvi) = sv_newmortal(); XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_value_type_class_t_object_get) { { idmef_value_type_class_t *arg1 = (idmef_value_type_class_t *) 0 ; void *argp1 = 0 ; int res1 = 0 ; int argvi = 0; void *result = 0 ; dXSARGS; if ((items < 1) || (items > 1)) { SWIG_croak("Usage: idmef_value_type_class_t_object_get(self);"); } res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_idmef_value_type_class_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "idmef_value_type_class_t_object_get" "', argument " "1"" of type '" "idmef_value_type_class_t *""'"); } arg1 = (idmef_value_type_class_t *)(argp1); result = (void *) ((arg1)->object); ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_void, 0 | 0); argvi++ ; XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_value_type_class_t_class_id_set) { { idmef_value_type_class_t *arg1 = (idmef_value_type_class_t *) 0 ; int arg2 ; void *argp1 = 0 ; int res1 = 0 ; int val2 ; int ecode2 = 0 ; int argvi = 0; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: idmef_value_type_class_t_class_id_set(self,class_id);"); } res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_idmef_value_type_class_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "idmef_value_type_class_t_class_id_set" "', argument " "1"" of type '" "idmef_value_type_class_t *""'"); } arg1 = (idmef_value_type_class_t *)(argp1); ecode2 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(1), &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "idmef_value_type_class_t_class_id_set" "', argument " "2"" of type '" "int""'"); } arg2 = (int)(val2); if (arg1) (arg1)->class_id = arg2; ST(argvi) = sv_newmortal(); XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_value_type_class_t_class_id_get) { { idmef_value_type_class_t *arg1 = (idmef_value_type_class_t *) 0 ; void *argp1 = 0 ; int res1 = 0 ; int argvi = 0; int result; dXSARGS; if ((items < 1) || (items > 1)) { SWIG_croak("Usage: idmef_value_type_class_t_class_id_get(self);"); } res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_idmef_value_type_class_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "idmef_value_type_class_t_class_id_get" "', argument " "1"" of type '" "idmef_value_type_class_t *""'"); } arg1 = (idmef_value_type_class_t *)(argp1); result = (int) ((arg1)->class_id); { ST(argvi) = newSViv(result); argvi++; } XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_new_idmef_value_type_class_t) { { int argvi = 0; idmef_value_type_class_t *result = 0 ; dXSARGS; if ((items < 0) || (items > 0)) { SWIG_croak("Usage: new_idmef_value_type_class_t();"); } result = (idmef_value_type_class_t *)calloc(1, sizeof(idmef_value_type_class_t)); ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_idmef_value_type_class_t, SWIG_OWNER | SWIG_SHADOW); argvi++ ; XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_delete_idmef_value_type_class_t) { { idmef_value_type_class_t *arg1 = (idmef_value_type_class_t *) 0 ; void *argp1 = 0 ; int res1 = 0 ; int argvi = 0; dXSARGS; if ((items < 1) || (items > 1)) { SWIG_croak("Usage: delete_idmef_value_type_class_t(self);"); } res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_idmef_value_type_class_t, SWIG_POINTER_DISOWN | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_idmef_value_type_class_t" "', argument " "1"" of type '" "idmef_value_type_class_t *""'"); } arg1 = (idmef_value_type_class_t *)(argp1); free((char *) arg1); ST(argvi) = sv_newmortal(); XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_value_type_enum_t_value_set) { { idmef_value_type_enum_t *arg1 = (idmef_value_type_enum_t *) 0 ; int arg2 ; void *argp1 = 0 ; int res1 = 0 ; int val2 ; int ecode2 = 0 ; int argvi = 0; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: idmef_value_type_enum_t_value_set(self,value);"); } res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_idmef_value_type_enum_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "idmef_value_type_enum_t_value_set" "', argument " "1"" of type '" "idmef_value_type_enum_t *""'"); } arg1 = (idmef_value_type_enum_t *)(argp1); ecode2 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(1), &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "idmef_value_type_enum_t_value_set" "', argument " "2"" of type '" "int""'"); } arg2 = (int)(val2); if (arg1) (arg1)->value = arg2; ST(argvi) = sv_newmortal(); XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_value_type_enum_t_value_get) { { idmef_value_type_enum_t *arg1 = (idmef_value_type_enum_t *) 0 ; void *argp1 = 0 ; int res1 = 0 ; int argvi = 0; int result; dXSARGS; if ((items < 1) || (items > 1)) { SWIG_croak("Usage: idmef_value_type_enum_t_value_get(self);"); } res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_idmef_value_type_enum_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "idmef_value_type_enum_t_value_get" "', argument " "1"" of type '" "idmef_value_type_enum_t *""'"); } arg1 = (idmef_value_type_enum_t *)(argp1); result = (int) ((arg1)->value); { ST(argvi) = newSViv(result); argvi++; } XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_value_type_enum_t_class_id_set) { { idmef_value_type_enum_t *arg1 = (idmef_value_type_enum_t *) 0 ; int arg2 ; void *argp1 = 0 ; int res1 = 0 ; int val2 ; int ecode2 = 0 ; int argvi = 0; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: idmef_value_type_enum_t_class_id_set(self,class_id);"); } res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_idmef_value_type_enum_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "idmef_value_type_enum_t_class_id_set" "', argument " "1"" of type '" "idmef_value_type_enum_t *""'"); } arg1 = (idmef_value_type_enum_t *)(argp1); ecode2 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(1), &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "idmef_value_type_enum_t_class_id_set" "', argument " "2"" of type '" "int""'"); } arg2 = (int)(val2); if (arg1) (arg1)->class_id = arg2; ST(argvi) = sv_newmortal(); XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_value_type_enum_t_class_id_get) { { idmef_value_type_enum_t *arg1 = (idmef_value_type_enum_t *) 0 ; void *argp1 = 0 ; int res1 = 0 ; int argvi = 0; int result; dXSARGS; if ((items < 1) || (items > 1)) { SWIG_croak("Usage: idmef_value_type_enum_t_class_id_get(self);"); } res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_idmef_value_type_enum_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "idmef_value_type_enum_t_class_id_get" "', argument " "1"" of type '" "idmef_value_type_enum_t *""'"); } arg1 = (idmef_value_type_enum_t *)(argp1); result = (int) ((arg1)->class_id); { ST(argvi) = newSViv(result); argvi++; } XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_new_idmef_value_type_enum_t) { { int argvi = 0; idmef_value_type_enum_t *result = 0 ; dXSARGS; if ((items < 0) || (items > 0)) { SWIG_croak("Usage: new_idmef_value_type_enum_t();"); } result = (idmef_value_type_enum_t *)calloc(1, sizeof(idmef_value_type_enum_t)); ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_idmef_value_type_enum_t, SWIG_OWNER | SWIG_SHADOW); argvi++ ; XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_delete_idmef_value_type_enum_t) { { idmef_value_type_enum_t *arg1 = (idmef_value_type_enum_t *) 0 ; void *argp1 = 0 ; int res1 = 0 ; int argvi = 0; dXSARGS; if ((items < 1) || (items > 1)) { SWIG_croak("Usage: delete_idmef_value_type_enum_t(self);"); } res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_idmef_value_type_enum_t, SWIG_POINTER_DISOWN | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_idmef_value_type_enum_t" "', argument " "1"" of type '" "idmef_value_type_enum_t *""'"); } arg1 = (idmef_value_type_enum_t *)(argp1); free((char *) arg1); ST(argvi) = sv_newmortal(); XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_value_type_data_t_int8_val_set) { { idmef_value_type_data_t *arg1 = (idmef_value_type_data_t *) 0 ; int8_t arg2 ; void *argp1 = 0 ; int res1 = 0 ; char val2 ; int ecode2 = 0 ; int argvi = 0; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: idmef_value_type_data_t_int8_val_set(self,int8_val);"); } res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_idmef_value_type_data_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "idmef_value_type_data_t_int8_val_set" "', argument " "1"" of type '" "idmef_value_type_data_t *""'"); } arg1 = (idmef_value_type_data_t *)(argp1); ecode2 = SWIG_AsVal_char SWIG_PERL_CALL_ARGS_2(ST(1), &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "idmef_value_type_data_t_int8_val_set" "', argument " "2"" of type '" "int8_t""'"); } arg2 = (int8_t)(val2); if (arg1) (arg1)->int8_val = arg2; ST(argvi) = sv_newmortal(); XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_value_type_data_t_int8_val_get) { { idmef_value_type_data_t *arg1 = (idmef_value_type_data_t *) 0 ; void *argp1 = 0 ; int res1 = 0 ; int argvi = 0; int8_t result; dXSARGS; if ((items < 1) || (items > 1)) { SWIG_croak("Usage: idmef_value_type_data_t_int8_val_get(self);"); } res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_idmef_value_type_data_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "idmef_value_type_data_t_int8_val_get" "', argument " "1"" of type '" "idmef_value_type_data_t *""'"); } arg1 = (idmef_value_type_data_t *)(argp1); result = (int8_t) ((arg1)->int8_val); ST(argvi) = SWIG_From_char SWIG_PERL_CALL_ARGS_1((char)(result)); argvi++ ; XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_value_type_data_t_uint8_val_set) { { idmef_value_type_data_t *arg1 = (idmef_value_type_data_t *) 0 ; uint8_t arg2 ; void *argp1 = 0 ; int res1 = 0 ; unsigned char val2 ; int ecode2 = 0 ; int argvi = 0; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: idmef_value_type_data_t_uint8_val_set(self,uint8_val);"); } res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_idmef_value_type_data_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "idmef_value_type_data_t_uint8_val_set" "', argument " "1"" of type '" "idmef_value_type_data_t *""'"); } arg1 = (idmef_value_type_data_t *)(argp1); ecode2 = SWIG_AsVal_unsigned_SS_char SWIG_PERL_CALL_ARGS_2(ST(1), &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "idmef_value_type_data_t_uint8_val_set" "', argument " "2"" of type '" "uint8_t""'"); } arg2 = (uint8_t)(val2); if (arg1) (arg1)->uint8_val = arg2; ST(argvi) = sv_newmortal(); XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_value_type_data_t_uint8_val_get) { { idmef_value_type_data_t *arg1 = (idmef_value_type_data_t *) 0 ; void *argp1 = 0 ; int res1 = 0 ; int argvi = 0; uint8_t result; dXSARGS; if ((items < 1) || (items > 1)) { SWIG_croak("Usage: idmef_value_type_data_t_uint8_val_get(self);"); } res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_idmef_value_type_data_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "idmef_value_type_data_t_uint8_val_get" "', argument " "1"" of type '" "idmef_value_type_data_t *""'"); } arg1 = (idmef_value_type_data_t *)(argp1); result = (uint8_t) ((arg1)->uint8_val); ST(argvi) = SWIG_From_unsigned_SS_char SWIG_PERL_CALL_ARGS_1((unsigned char)(result)); argvi++ ; XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_value_type_data_t_int16_val_set) { { idmef_value_type_data_t *arg1 = (idmef_value_type_data_t *) 0 ; int16_t arg2 ; void *argp1 = 0 ; int res1 = 0 ; short val2 ; int ecode2 = 0 ; int argvi = 0; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: idmef_value_type_data_t_int16_val_set(self,int16_val);"); } res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_idmef_value_type_data_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "idmef_value_type_data_t_int16_val_set" "', argument " "1"" of type '" "idmef_value_type_data_t *""'"); } arg1 = (idmef_value_type_data_t *)(argp1); ecode2 = SWIG_AsVal_short SWIG_PERL_CALL_ARGS_2(ST(1), &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "idmef_value_type_data_t_int16_val_set" "', argument " "2"" of type '" "int16_t""'"); } arg2 = (int16_t)(val2); if (arg1) (arg1)->int16_val = arg2; ST(argvi) = sv_newmortal(); XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_value_type_data_t_int16_val_get) { { idmef_value_type_data_t *arg1 = (idmef_value_type_data_t *) 0 ; void *argp1 = 0 ; int res1 = 0 ; int argvi = 0; int16_t result; dXSARGS; if ((items < 1) || (items > 1)) { SWIG_croak("Usage: idmef_value_type_data_t_int16_val_get(self);"); } res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_idmef_value_type_data_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "idmef_value_type_data_t_int16_val_get" "', argument " "1"" of type '" "idmef_value_type_data_t *""'"); } arg1 = (idmef_value_type_data_t *)(argp1); result = (int16_t) ((arg1)->int16_val); ST(argvi) = SWIG_From_short SWIG_PERL_CALL_ARGS_1((short)(result)); argvi++ ; XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_value_type_data_t_uint16_val_set) { { idmef_value_type_data_t *arg1 = (idmef_value_type_data_t *) 0 ; uint16_t arg2 ; void *argp1 = 0 ; int res1 = 0 ; unsigned short val2 ; int ecode2 = 0 ; int argvi = 0; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: idmef_value_type_data_t_uint16_val_set(self,uint16_val);"); } res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_idmef_value_type_data_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "idmef_value_type_data_t_uint16_val_set" "', argument " "1"" of type '" "idmef_value_type_data_t *""'"); } arg1 = (idmef_value_type_data_t *)(argp1); ecode2 = SWIG_AsVal_unsigned_SS_short SWIG_PERL_CALL_ARGS_2(ST(1), &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "idmef_value_type_data_t_uint16_val_set" "', argument " "2"" of type '" "uint16_t""'"); } arg2 = (uint16_t)(val2); if (arg1) (arg1)->uint16_val = arg2; ST(argvi) = sv_newmortal(); XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_value_type_data_t_uint16_val_get) { { idmef_value_type_data_t *arg1 = (idmef_value_type_data_t *) 0 ; void *argp1 = 0 ; int res1 = 0 ; int argvi = 0; uint16_t result; dXSARGS; if ((items < 1) || (items > 1)) { SWIG_croak("Usage: idmef_value_type_data_t_uint16_val_get(self);"); } res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_idmef_value_type_data_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "idmef_value_type_data_t_uint16_val_get" "', argument " "1"" of type '" "idmef_value_type_data_t *""'"); } arg1 = (idmef_value_type_data_t *)(argp1); result = (uint16_t) ((arg1)->uint16_val); ST(argvi) = SWIG_From_unsigned_SS_short SWIG_PERL_CALL_ARGS_1((unsigned short)(result)); argvi++ ; XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_value_type_data_t_int32_val_set) { { idmef_value_type_data_t *arg1 = (idmef_value_type_data_t *) 0 ; int32_t arg2 ; void *argp1 = 0 ; int res1 = 0 ; int val2 ; int ecode2 = 0 ; int argvi = 0; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: idmef_value_type_data_t_int32_val_set(self,int32_val);"); } res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_idmef_value_type_data_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "idmef_value_type_data_t_int32_val_set" "', argument " "1"" of type '" "idmef_value_type_data_t *""'"); } arg1 = (idmef_value_type_data_t *)(argp1); ecode2 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(1), &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "idmef_value_type_data_t_int32_val_set" "', argument " "2"" of type '" "int32_t""'"); } arg2 = (int32_t)(val2); if (arg1) (arg1)->int32_val = arg2; ST(argvi) = sv_newmortal(); XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_value_type_data_t_int32_val_get) { { idmef_value_type_data_t *arg1 = (idmef_value_type_data_t *) 0 ; void *argp1 = 0 ; int res1 = 0 ; int argvi = 0; int32_t result; dXSARGS; if ((items < 1) || (items > 1)) { SWIG_croak("Usage: idmef_value_type_data_t_int32_val_get(self);"); } res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_idmef_value_type_data_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "idmef_value_type_data_t_int32_val_get" "', argument " "1"" of type '" "idmef_value_type_data_t *""'"); } arg1 = (idmef_value_type_data_t *)(argp1); result = (int32_t) ((arg1)->int32_val); { ST(argvi) = newSViv(result); argvi++; } XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_value_type_data_t_uint32_val_set) { { idmef_value_type_data_t *arg1 = (idmef_value_type_data_t *) 0 ; uint32_t arg2 ; void *argp1 = 0 ; int res1 = 0 ; unsigned int val2 ; int ecode2 = 0 ; int argvi = 0; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: idmef_value_type_data_t_uint32_val_set(self,uint32_val);"); } res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_idmef_value_type_data_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "idmef_value_type_data_t_uint32_val_set" "', argument " "1"" of type '" "idmef_value_type_data_t *""'"); } arg1 = (idmef_value_type_data_t *)(argp1); ecode2 = SWIG_AsVal_unsigned_SS_int SWIG_PERL_CALL_ARGS_2(ST(1), &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "idmef_value_type_data_t_uint32_val_set" "', argument " "2"" of type '" "uint32_t""'"); } arg2 = (uint32_t)(val2); if (arg1) (arg1)->uint32_val = arg2; ST(argvi) = sv_newmortal(); XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_value_type_data_t_uint32_val_get) { { idmef_value_type_data_t *arg1 = (idmef_value_type_data_t *) 0 ; void *argp1 = 0 ; int res1 = 0 ; int argvi = 0; uint32_t result; dXSARGS; if ((items < 1) || (items > 1)) { SWIG_croak("Usage: idmef_value_type_data_t_uint32_val_get(self);"); } res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_idmef_value_type_data_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "idmef_value_type_data_t_uint32_val_get" "', argument " "1"" of type '" "idmef_value_type_data_t *""'"); } arg1 = (idmef_value_type_data_t *)(argp1); result = (uint32_t) ((arg1)->uint32_val); ST(argvi) = SWIG_From_unsigned_SS_int SWIG_PERL_CALL_ARGS_1((unsigned int)(result)); argvi++ ; XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_value_type_data_t_int64_val_set) { { idmef_value_type_data_t *arg1 = (idmef_value_type_data_t *) 0 ; int64_t arg2 ; void *argp1 = 0 ; int res1 = 0 ; long long val2 ; int ecode2 = 0 ; int argvi = 0; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: idmef_value_type_data_t_int64_val_set(self,int64_val);"); } res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_idmef_value_type_data_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "idmef_value_type_data_t_int64_val_set" "', argument " "1"" of type '" "idmef_value_type_data_t *""'"); } arg1 = (idmef_value_type_data_t *)(argp1); ecode2 = SWIG_AsVal_long_SS_long SWIG_PERL_CALL_ARGS_2(ST(1), &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "idmef_value_type_data_t_int64_val_set" "', argument " "2"" of type '" "int64_t""'"); } arg2 = (int64_t)(val2); if (arg1) (arg1)->int64_val = arg2; ST(argvi) = sv_newmortal(); XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_value_type_data_t_int64_val_get) { { idmef_value_type_data_t *arg1 = (idmef_value_type_data_t *) 0 ; void *argp1 = 0 ; int res1 = 0 ; int argvi = 0; int64_t result; dXSARGS; if ((items < 1) || (items > 1)) { SWIG_croak("Usage: idmef_value_type_data_t_int64_val_get(self);"); } res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_idmef_value_type_data_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "idmef_value_type_data_t_int64_val_get" "', argument " "1"" of type '" "idmef_value_type_data_t *""'"); } arg1 = (idmef_value_type_data_t *)(argp1); result = (int64_t) ((arg1)->int64_val); ST(argvi) = SWIG_From_long_SS_long SWIG_PERL_CALL_ARGS_1((long long)(result)); argvi++ ; XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_value_type_data_t_uint64_val_set) { { idmef_value_type_data_t *arg1 = (idmef_value_type_data_t *) 0 ; uint64_t arg2 ; void *argp1 = 0 ; int res1 = 0 ; unsigned long long val2 ; int ecode2 = 0 ; int argvi = 0; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: idmef_value_type_data_t_uint64_val_set(self,uint64_val);"); } res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_idmef_value_type_data_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "idmef_value_type_data_t_uint64_val_set" "', argument " "1"" of type '" "idmef_value_type_data_t *""'"); } arg1 = (idmef_value_type_data_t *)(argp1); ecode2 = SWIG_AsVal_unsigned_SS_long_SS_long SWIG_PERL_CALL_ARGS_2(ST(1), &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "idmef_value_type_data_t_uint64_val_set" "', argument " "2"" of type '" "uint64_t""'"); } arg2 = (uint64_t)(val2); if (arg1) (arg1)->uint64_val = arg2; ST(argvi) = sv_newmortal(); XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_value_type_data_t_uint64_val_get) { { idmef_value_type_data_t *arg1 = (idmef_value_type_data_t *) 0 ; void *argp1 = 0 ; int res1 = 0 ; int argvi = 0; uint64_t result; dXSARGS; if ((items < 1) || (items > 1)) { SWIG_croak("Usage: idmef_value_type_data_t_uint64_val_get(self);"); } res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_idmef_value_type_data_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "idmef_value_type_data_t_uint64_val_get" "', argument " "1"" of type '" "idmef_value_type_data_t *""'"); } arg1 = (idmef_value_type_data_t *)(argp1); result = (uint64_t) ((arg1)->uint64_val); ST(argvi) = SWIG_From_unsigned_SS_long_SS_long SWIG_PERL_CALL_ARGS_1((unsigned long long)(result)); argvi++ ; XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_value_type_data_t_float_val_set) { { idmef_value_type_data_t *arg1 = (idmef_value_type_data_t *) 0 ; float arg2 ; void *argp1 = 0 ; int res1 = 0 ; float val2 ; int ecode2 = 0 ; int argvi = 0; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: idmef_value_type_data_t_float_val_set(self,float_val);"); } res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_idmef_value_type_data_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "idmef_value_type_data_t_float_val_set" "', argument " "1"" of type '" "idmef_value_type_data_t *""'"); } arg1 = (idmef_value_type_data_t *)(argp1); ecode2 = SWIG_AsVal_float SWIG_PERL_CALL_ARGS_2(ST(1), &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "idmef_value_type_data_t_float_val_set" "', argument " "2"" of type '" "float""'"); } arg2 = (float)(val2); if (arg1) (arg1)->float_val = arg2; ST(argvi) = sv_newmortal(); XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_value_type_data_t_float_val_get) { { idmef_value_type_data_t *arg1 = (idmef_value_type_data_t *) 0 ; void *argp1 = 0 ; int res1 = 0 ; int argvi = 0; float result; dXSARGS; if ((items < 1) || (items > 1)) { SWIG_croak("Usage: idmef_value_type_data_t_float_val_get(self);"); } res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_idmef_value_type_data_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "idmef_value_type_data_t_float_val_get" "', argument " "1"" of type '" "idmef_value_type_data_t *""'"); } arg1 = (idmef_value_type_data_t *)(argp1); result = (float) ((arg1)->float_val); ST(argvi) = SWIG_From_float SWIG_PERL_CALL_ARGS_1((float)(result)); argvi++ ; XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_value_type_data_t_double_val_set) { { idmef_value_type_data_t *arg1 = (idmef_value_type_data_t *) 0 ; double arg2 ; void *argp1 = 0 ; int res1 = 0 ; double val2 ; int ecode2 = 0 ; int argvi = 0; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: idmef_value_type_data_t_double_val_set(self,double_val);"); } res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_idmef_value_type_data_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "idmef_value_type_data_t_double_val_set" "', argument " "1"" of type '" "idmef_value_type_data_t *""'"); } arg1 = (idmef_value_type_data_t *)(argp1); ecode2 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "idmef_value_type_data_t_double_val_set" "', argument " "2"" of type '" "double""'"); } arg2 = (double)(val2); if (arg1) (arg1)->double_val = arg2; ST(argvi) = sv_newmortal(); XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_value_type_data_t_double_val_get) { { idmef_value_type_data_t *arg1 = (idmef_value_type_data_t *) 0 ; void *argp1 = 0 ; int res1 = 0 ; int argvi = 0; double result; dXSARGS; if ((items < 1) || (items > 1)) { SWIG_croak("Usage: idmef_value_type_data_t_double_val_get(self);"); } res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_idmef_value_type_data_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "idmef_value_type_data_t_double_val_get" "', argument " "1"" of type '" "idmef_value_type_data_t *""'"); } arg1 = (idmef_value_type_data_t *)(argp1); result = (double) ((arg1)->double_val); ST(argvi) = SWIG_From_double SWIG_PERL_CALL_ARGS_1((double)(result)); argvi++ ; XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_value_type_data_t_string_val_set) { { idmef_value_type_data_t *arg1 = (idmef_value_type_data_t *) 0 ; prelude_string_t *arg2 = (prelude_string_t *) 0 ; void *argp1 = 0 ; int res1 = 0 ; int argvi = 0; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: idmef_value_type_data_t_string_val_set(self,string_val);"); } res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_idmef_value_type_data_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "idmef_value_type_data_t_string_val_set" "', argument " "1"" of type '" "idmef_value_type_data_t *""'"); } arg1 = (idmef_value_type_data_t *)(argp1); { int ret; char *str; STRLEN len; str = SvPV(ST(1), len); ret = prelude_string_new_dup_fast(&(arg2), str, len); if ( ret < 0 ) { swig_perl_raise_error(ret); return; } } if (arg1) (arg1)->string_val = arg2; ST(argvi) = sv_newmortal(); XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_value_type_data_t_string_val_get) { { idmef_value_type_data_t *arg1 = (idmef_value_type_data_t *) 0 ; void *argp1 = 0 ; int res1 = 0 ; int argvi = 0; prelude_string_t *result = 0 ; dXSARGS; if ((items < 1) || (items > 1)) { SWIG_croak("Usage: idmef_value_type_data_t_string_val_get(self);"); } res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_idmef_value_type_data_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "idmef_value_type_data_t_string_val_get" "', argument " "1"" of type '" "idmef_value_type_data_t *""'"); } arg1 = (idmef_value_type_data_t *)(argp1); result = (prelude_string_t *) ((arg1)->string_val); { ST(argvi) = swig_perl_string(result); argvi++; } XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_value_type_data_t_time_val_set) { { idmef_value_type_data_t *arg1 = (idmef_value_type_data_t *) 0 ; idmef_time_t *arg2 = (idmef_time_t *) 0 ; void *argp1 = 0 ; int res1 = 0 ; int argvi = 0; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: idmef_value_type_data_t_time_val_set(self,time_val);"); } res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_idmef_value_type_data_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "idmef_value_type_data_t_time_val_set" "', argument " "1"" of type '" "idmef_value_type_data_t *""'"); } arg1 = (idmef_value_type_data_t *)(argp1); { if ( ! SvROK(ST(1)) ) { croak("Argument 2 is null."); return; } if ( SWIG_ConvertPtr(ST(1), (void **)&arg2, SWIGTYPE_p_idmef_time, 0) ) { croak("Expected type idmef_time_t * for argument 2."); return; } } if (arg1) (arg1)->time_val = arg2; ST(argvi) = sv_newmortal(); XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_value_type_data_t_time_val_get) { { idmef_value_type_data_t *arg1 = (idmef_value_type_data_t *) 0 ; void *argp1 = 0 ; int res1 = 0 ; int argvi = 0; idmef_time_t *result = 0 ; dXSARGS; if ((items < 1) || (items > 1)) { SWIG_croak("Usage: idmef_value_type_data_t_time_val_get(self);"); } res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_idmef_value_type_data_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "idmef_value_type_data_t_time_val_get" "', argument " "1"" of type '" "idmef_value_type_data_t *""'"); } arg1 = (idmef_value_type_data_t *)(argp1); result = (idmef_time_t *) ((arg1)->time_val); ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_idmef_time, 0 | SWIG_SHADOW); argvi++ ; XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_value_type_data_t_data_val_set) { { idmef_value_type_data_t *arg1 = (idmef_value_type_data_t *) 0 ; idmef_data_t *arg2 = (idmef_data_t *) 0 ; void *argp1 = 0 ; int res1 = 0 ; int argvi = 0; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: idmef_value_type_data_t_data_val_set(self,data_val);"); } res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_idmef_value_type_data_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "idmef_value_type_data_t_data_val_set" "', argument " "1"" of type '" "idmef_value_type_data_t *""'"); } arg1 = (idmef_value_type_data_t *)(argp1); { if ( ! SvROK(ST(1)) ) { croak("Argument 2 is null."); return; } if ( SWIG_ConvertPtr(ST(1), (void **)&arg2, SWIGTYPE_p_idmef_data_t, 0) ) { croak("Expected type idmef_data_t * for argument 2."); return; } } if (arg1) (arg1)->data_val = arg2; ST(argvi) = sv_newmortal(); XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_value_type_data_t_data_val_get) { { idmef_value_type_data_t *arg1 = (idmef_value_type_data_t *) 0 ; void *argp1 = 0 ; int res1 = 0 ; int argvi = 0; idmef_data_t *result = 0 ; dXSARGS; if ((items < 1) || (items > 1)) { SWIG_croak("Usage: idmef_value_type_data_t_data_val_get(self);"); } res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_idmef_value_type_data_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "idmef_value_type_data_t_data_val_get" "', argument " "1"" of type '" "idmef_value_type_data_t *""'"); } arg1 = (idmef_value_type_data_t *)(argp1); result = (idmef_data_t *) ((arg1)->data_val); { ST(argvi) = swig_perl_data(result); argvi++; } XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_value_type_data_t_list_val_set) { { idmef_value_type_data_t *arg1 = (idmef_value_type_data_t *) 0 ; prelude_list_t arg2 ; void *argp1 = 0 ; int res1 = 0 ; void *argp2 ; int res2 = 0 ; int argvi = 0; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: idmef_value_type_data_t_list_val_set(self,list_val);"); } res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_idmef_value_type_data_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "idmef_value_type_data_t_list_val_set" "', argument " "1"" of type '" "idmef_value_type_data_t *""'"); } arg1 = (idmef_value_type_data_t *)(argp1); { res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_prelude_list_t, 0 ); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "idmef_value_type_data_t_list_val_set" "', argument " "2"" of type '" "prelude_list_t""'"); } if (!argp2) { SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "idmef_value_type_data_t_list_val_set" "', argument " "2"" of type '" "prelude_list_t""'"); } else { arg2 = *((prelude_list_t *)(argp2)); } } if (arg1) (arg1)->list_val = arg2; ST(argvi) = sv_newmortal(); XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_value_type_data_t_list_val_get) { { idmef_value_type_data_t *arg1 = (idmef_value_type_data_t *) 0 ; void *argp1 = 0 ; int res1 = 0 ; int argvi = 0; prelude_list_t result; dXSARGS; if ((items < 1) || (items > 1)) { SWIG_croak("Usage: idmef_value_type_data_t_list_val_get(self);"); } res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_idmef_value_type_data_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "idmef_value_type_data_t_list_val_get" "', argument " "1"" of type '" "idmef_value_type_data_t *""'"); } arg1 = (idmef_value_type_data_t *)(argp1); result = ((arg1)->list_val); ST(argvi) = SWIG_NewPointerObj((prelude_list_t *)memcpy((prelude_list_t *)malloc(sizeof(prelude_list_t)),&result,sizeof(prelude_list_t)), SWIGTYPE_p_prelude_list_t, SWIG_POINTER_OWN | 0); argvi++ ; XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_value_type_data_t_enum_val_set) { { idmef_value_type_data_t *arg1 = (idmef_value_type_data_t *) 0 ; idmef_value_type_enum_t *arg2 = (idmef_value_type_enum_t *) 0 ; void *argp1 = 0 ; int res1 = 0 ; void *argp2 = 0 ; int res2 = 0 ; int argvi = 0; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: idmef_value_type_data_t_enum_val_set(self,enum_val);"); } res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_idmef_value_type_data_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "idmef_value_type_data_t_enum_val_set" "', argument " "1"" of type '" "idmef_value_type_data_t *""'"); } arg1 = (idmef_value_type_data_t *)(argp1); res2 = SWIG_ConvertPtr(ST(1), &argp2,SWIGTYPE_p_idmef_value_type_enum_t, 0 | 0 ); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "idmef_value_type_data_t_enum_val_set" "', argument " "2"" of type '" "idmef_value_type_enum_t *""'"); } arg2 = (idmef_value_type_enum_t *)(argp2); if (arg1) (arg1)->enum_val = *arg2; ST(argvi) = sv_newmortal(); XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_value_type_data_t_enum_val_get) { { idmef_value_type_data_t *arg1 = (idmef_value_type_data_t *) 0 ; void *argp1 = 0 ; int res1 = 0 ; int argvi = 0; idmef_value_type_enum_t *result = 0 ; dXSARGS; if ((items < 1) || (items > 1)) { SWIG_croak("Usage: idmef_value_type_data_t_enum_val_get(self);"); } res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_idmef_value_type_data_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "idmef_value_type_data_t_enum_val_get" "', argument " "1"" of type '" "idmef_value_type_data_t *""'"); } arg1 = (idmef_value_type_data_t *)(argp1); result = (idmef_value_type_enum_t *)& ((arg1)->enum_val); ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_idmef_value_type_enum_t, 0 | SWIG_SHADOW); argvi++ ; XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_value_type_data_t_class_val_set) { { idmef_value_type_data_t *arg1 = (idmef_value_type_data_t *) 0 ; idmef_value_type_class_t *arg2 = (idmef_value_type_class_t *) 0 ; void *argp1 = 0 ; int res1 = 0 ; void *argp2 = 0 ; int res2 = 0 ; int argvi = 0; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: idmef_value_type_data_t_class_val_set(self,class_val);"); } res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_idmef_value_type_data_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "idmef_value_type_data_t_class_val_set" "', argument " "1"" of type '" "idmef_value_type_data_t *""'"); } arg1 = (idmef_value_type_data_t *)(argp1); res2 = SWIG_ConvertPtr(ST(1), &argp2,SWIGTYPE_p_idmef_value_type_class_t, 0 | 0 ); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "idmef_value_type_data_t_class_val_set" "', argument " "2"" of type '" "idmef_value_type_class_t *""'"); } arg2 = (idmef_value_type_class_t *)(argp2); if (arg1) (arg1)->class_val = *arg2; ST(argvi) = sv_newmortal(); XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_value_type_data_t_class_val_get) { { idmef_value_type_data_t *arg1 = (idmef_value_type_data_t *) 0 ; void *argp1 = 0 ; int res1 = 0 ; int argvi = 0; idmef_value_type_class_t *result = 0 ; dXSARGS; if ((items < 1) || (items > 1)) { SWIG_croak("Usage: idmef_value_type_data_t_class_val_get(self);"); } res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_idmef_value_type_data_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "idmef_value_type_data_t_class_val_get" "', argument " "1"" of type '" "idmef_value_type_data_t *""'"); } arg1 = (idmef_value_type_data_t *)(argp1); result = (idmef_value_type_class_t *)& ((arg1)->class_val); ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_idmef_value_type_class_t, 0 | SWIG_SHADOW); argvi++ ; XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_new_idmef_value_type_data_t) { { int argvi = 0; idmef_value_type_data_t *result = 0 ; dXSARGS; if ((items < 0) || (items > 0)) { SWIG_croak("Usage: new_idmef_value_type_data_t();"); } result = (idmef_value_type_data_t *)calloc(1, sizeof(idmef_value_type_data_t)); ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_idmef_value_type_data_t, SWIG_OWNER | SWIG_SHADOW); argvi++ ; XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_delete_idmef_value_type_data_t) { { idmef_value_type_data_t *arg1 = (idmef_value_type_data_t *) 0 ; void *argp1 = 0 ; int res1 = 0 ; int argvi = 0; dXSARGS; if ((items < 1) || (items > 1)) { SWIG_croak("Usage: delete_idmef_value_type_data_t(self);"); } res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_idmef_value_type_data_t, SWIG_POINTER_DISOWN | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_idmef_value_type_data_t" "', argument " "1"" of type '" "idmef_value_type_data_t *""'"); } arg1 = (idmef_value_type_data_t *)(argp1); free((char *) arg1); ST(argvi) = sv_newmortal(); XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_value_type_t_id_set) { { idmef_value_type_t *arg1 = (idmef_value_type_t *) 0 ; idmef_value_type_id_t arg2 ; void *argp1 = 0 ; int res1 = 0 ; int val2 ; int ecode2 = 0 ; int argvi = 0; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: idmef_value_type_t_id_set(self,id);"); } res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_idmef_value_type_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "idmef_value_type_t_id_set" "', argument " "1"" of type '" "idmef_value_type_t *""'"); } arg1 = (idmef_value_type_t *)(argp1); ecode2 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(1), &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "idmef_value_type_t_id_set" "', argument " "2"" of type '" "idmef_value_type_id_t""'"); } arg2 = (idmef_value_type_id_t)(val2); if (arg1) (arg1)->id = arg2; ST(argvi) = sv_newmortal(); XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_value_type_t_id_get) { { idmef_value_type_t *arg1 = (idmef_value_type_t *) 0 ; void *argp1 = 0 ; int res1 = 0 ; int argvi = 0; idmef_value_type_id_t result; dXSARGS; if ((items < 1) || (items > 1)) { SWIG_croak("Usage: idmef_value_type_t_id_get(self);"); } res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_idmef_value_type_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "idmef_value_type_t_id_get" "', argument " "1"" of type '" "idmef_value_type_t *""'"); } arg1 = (idmef_value_type_t *)(argp1); result = (idmef_value_type_id_t) ((arg1)->id); ST(argvi) = SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(result)); argvi++ ; XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_value_type_t_data_set) { { idmef_value_type_t *arg1 = (idmef_value_type_t *) 0 ; idmef_value_type_data_t *arg2 = (idmef_value_type_data_t *) 0 ; void *argp1 = 0 ; int res1 = 0 ; void *argp2 = 0 ; int res2 = 0 ; int argvi = 0; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: idmef_value_type_t_data_set(self,data);"); } res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_idmef_value_type_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "idmef_value_type_t_data_set" "', argument " "1"" of type '" "idmef_value_type_t *""'"); } arg1 = (idmef_value_type_t *)(argp1); res2 = SWIG_ConvertPtr(ST(1), &argp2,SWIGTYPE_p_idmef_value_type_data_t, 0 | 0 ); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "idmef_value_type_t_data_set" "', argument " "2"" of type '" "idmef_value_type_data_t *""'"); } arg2 = (idmef_value_type_data_t *)(argp2); if (arg1) (arg1)->data = *arg2; ST(argvi) = sv_newmortal(); XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_value_type_t_data_get) { { idmef_value_type_t *arg1 = (idmef_value_type_t *) 0 ; void *argp1 = 0 ; int res1 = 0 ; int argvi = 0; idmef_value_type_data_t *result = 0 ; dXSARGS; if ((items < 1) || (items > 1)) { SWIG_croak("Usage: idmef_value_type_t_data_get(self);"); } res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_idmef_value_type_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "idmef_value_type_t_data_get" "', argument " "1"" of type '" "idmef_value_type_t *""'"); } arg1 = (idmef_value_type_t *)(argp1); result = (idmef_value_type_data_t *)& ((arg1)->data); ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_idmef_value_type_data_t, 0 | SWIG_SHADOW); argvi++ ; XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_new_idmef_value_type_t) { { int argvi = 0; idmef_value_type_t *result = 0 ; dXSARGS; if ((items < 0) || (items > 0)) { SWIG_croak("Usage: new_idmef_value_type_t();"); } result = (idmef_value_type_t *)calloc(1, sizeof(idmef_value_type_t)); ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_idmef_value_type_t, SWIG_OWNER | SWIG_SHADOW); argvi++ ; XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_delete_idmef_value_type_t) { { idmef_value_type_t *arg1 = (idmef_value_type_t *) 0 ; void *argp1 = 0 ; int res1 = 0 ; int argvi = 0; dXSARGS; if ((items < 1) || (items > 1)) { SWIG_croak("Usage: delete_idmef_value_type_t(self);"); } res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_idmef_value_type_t, SWIG_POINTER_DISOWN | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_idmef_value_type_t" "', argument " "1"" of type '" "idmef_value_type_t *""'"); } arg1 = (idmef_value_type_t *)(argp1); free((char *) arg1); ST(argvi) = sv_newmortal(); XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_value_type_ref) { { idmef_value_type_t *arg1 = (idmef_value_type_t *) 0 ; void *argp1 = 0 ; int res1 = 0 ; int argvi = 0; int result; dXSARGS; if ((items < 1) || (items > 1)) { SWIG_croak("Usage: idmef_value_type_ref(src);"); } res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_idmef_value_type_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "idmef_value_type_ref" "', argument " "1"" of type '" "idmef_value_type_t const *""'"); } arg1 = (idmef_value_type_t *)(argp1); result = (int)idmef_value_type_ref((idmef_value_type_t const *)arg1); { ST(argvi) = newSViv(result); argvi++; } XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_value_type_copy) { { idmef_value_type_t *arg1 = (idmef_value_type_t *) 0 ; void *arg2 = (void *) 0 ; void *argp1 = 0 ; int res1 = 0 ; int res2 ; int argvi = 0; int result; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: idmef_value_type_copy(src,dst);"); } res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_idmef_value_type_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "idmef_value_type_copy" "', argument " "1"" of type '" "idmef_value_type_t const *""'"); } arg1 = (idmef_value_type_t *)(argp1); res2 = SWIG_ConvertPtr(ST(1),SWIG_as_voidptrptr(&arg2), 0, 0); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "idmef_value_type_copy" "', argument " "2"" of type '" "void *""'"); } result = (int)idmef_value_type_copy((idmef_value_type_t const *)arg1,arg2); { ST(argvi) = newSViv(result); argvi++; } XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_value_type_read) { { idmef_value_type_t *arg1 = (idmef_value_type_t *) 0 ; char *arg2 = (char *) 0 ; void *argp1 = 0 ; int res1 = 0 ; int res2 ; char *buf2 = 0 ; int alloc2 = 0 ; int argvi = 0; int result; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: idmef_value_type_read(dst,buf);"); } res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_idmef_value_type_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "idmef_value_type_read" "', argument " "1"" of type '" "idmef_value_type_t *""'"); } arg1 = (idmef_value_type_t *)(argp1); res2 = SWIG_AsCharPtrAndSize(ST(1), &buf2, NULL, &alloc2); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "idmef_value_type_read" "', argument " "2"" of type '" "char const *""'"); } arg2 = (char *)(buf2); result = (int)idmef_value_type_read(arg1,(char const *)arg2); { ST(argvi) = newSViv(result); argvi++; } if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); XSRETURN(argvi); fail: if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); SWIG_croak_null(); } } XS(_wrap_idmef_value_type_write) { { idmef_value_type_t *arg1 = (idmef_value_type_t *) 0 ; prelude_string_t *arg2 = (prelude_string_t *) 0 ; void *argp1 = 0 ; int res1 = 0 ; int argvi = 0; int result; dXSARGS; { int ret; ret = prelude_string_new(&(arg2)); if ( ret < 0 ) { swig_perl_raise_error(ret); return; } } if ((items < 1) || (items > 1)) { SWIG_croak("Usage: idmef_value_type_write(src);"); } res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_idmef_value_type_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "idmef_value_type_write" "', argument " "1"" of type '" "idmef_value_type_t const *""'"); } arg1 = (idmef_value_type_t *)(argp1); result = (int)idmef_value_type_write((idmef_value_type_t const *)arg1,arg2); { ST(argvi) = newSViv(result); argvi++; } { if ( result >= 0 ) { ST(argvi) = newSVpv(prelude_string_get_string(arg2), prelude_string_get_len(arg2)); argvi++; } prelude_string_destroy(arg2); } XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_value_type_destroy) { { idmef_value_type_t *arg1 = (idmef_value_type_t *) 0 ; void *argp1 = 0 ; int res1 = 0 ; int argvi = 0; dXSARGS; if ((items < 1) || (items > 1)) { SWIG_croak("Usage: idmef_value_type_destroy(type);"); } res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_idmef_value_type_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "idmef_value_type_destroy" "', argument " "1"" of type '" "idmef_value_type_t *""'"); } arg1 = (idmef_value_type_t *)(argp1); idmef_value_type_destroy(arg1); ST(argvi) = sv_newmortal(); XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_value_type_clone) { { idmef_value_type_t *arg1 = (idmef_value_type_t *) 0 ; idmef_value_type_t *arg2 = (idmef_value_type_t *) 0 ; void *argp1 = 0 ; int res1 = 0 ; void *argp2 = 0 ; int res2 = 0 ; int argvi = 0; int result; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: idmef_value_type_clone(src,dst);"); } res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_idmef_value_type_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "idmef_value_type_clone" "', argument " "1"" of type '" "idmef_value_type_t const *""'"); } arg1 = (idmef_value_type_t *)(argp1); res2 = SWIG_ConvertPtr(ST(1), &argp2,SWIGTYPE_p_idmef_value_type_t, 0 | 0 ); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "idmef_value_type_clone" "', argument " "2"" of type '" "idmef_value_type_t *""'"); } arg2 = (idmef_value_type_t *)(argp2); result = (int)idmef_value_type_clone((idmef_value_type_t const *)arg1,arg2); { ST(argvi) = newSViv(result); argvi++; } XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_value_type_compare) { { idmef_value_type_t *arg1 = (idmef_value_type_t *) 0 ; idmef_value_type_t *arg2 = (idmef_value_type_t *) 0 ; idmef_criterion_operator_t arg3 ; void *argp1 = 0 ; int res1 = 0 ; void *argp2 = 0 ; int res2 = 0 ; int val3 ; int ecode3 = 0 ; int argvi = 0; int result; dXSARGS; if ((items < 3) || (items > 3)) { SWIG_croak("Usage: idmef_value_type_compare(type1,type2,op);"); } res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_idmef_value_type_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "idmef_value_type_compare" "', argument " "1"" of type '" "idmef_value_type_t const *""'"); } arg1 = (idmef_value_type_t *)(argp1); res2 = SWIG_ConvertPtr(ST(1), &argp2,SWIGTYPE_p_idmef_value_type_t, 0 | 0 ); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "idmef_value_type_compare" "', argument " "2"" of type '" "idmef_value_type_t const *""'"); } arg2 = (idmef_value_type_t *)(argp2); ecode3 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(2), &val3); if (!SWIG_IsOK(ecode3)) { SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "idmef_value_type_compare" "', argument " "3"" of type '" "idmef_criterion_operator_t""'"); } arg3 = (idmef_criterion_operator_t)(val3); result = (int)idmef_value_type_compare((idmef_value_type_t const *)arg1,(idmef_value_type_t const *)arg2,arg3); { ST(argvi) = newSViv(result); argvi++; } XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_value_type_check_operator) { { idmef_value_type_id_t arg1 ; idmef_criterion_operator_t arg2 ; int val1 ; int ecode1 = 0 ; int val2 ; int ecode2 = 0 ; int argvi = 0; int result; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: idmef_value_type_check_operator(type,op);"); } ecode1 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(0), &val1); if (!SWIG_IsOK(ecode1)) { SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "idmef_value_type_check_operator" "', argument " "1"" of type '" "idmef_value_type_id_t""'"); } arg1 = (idmef_value_type_id_t)(val1); ecode2 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(1), &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "idmef_value_type_check_operator" "', argument " "2"" of type '" "idmef_criterion_operator_t""'"); } arg2 = (idmef_criterion_operator_t)(val2); result = (int)idmef_value_type_check_operator(arg1,arg2); { ST(argvi) = newSViv(result); argvi++; } XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_value_type_get_applicable_operators) { { idmef_value_type_id_t arg1 ; idmef_criterion_operator_t *arg2 = (idmef_criterion_operator_t *) 0 ; int val1 ; int ecode1 = 0 ; void *argp2 = 0 ; int res2 = 0 ; int argvi = 0; int result; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: idmef_value_type_get_applicable_operators(type,result);"); } ecode1 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(0), &val1); if (!SWIG_IsOK(ecode1)) { SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "idmef_value_type_get_applicable_operators" "', argument " "1"" of type '" "idmef_value_type_id_t""'"); } arg1 = (idmef_value_type_id_t)(val1); res2 = SWIG_ConvertPtr(ST(1), &argp2,SWIGTYPE_p_idmef_criterion_operator_t, 0 | 0 ); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "idmef_value_type_get_applicable_operators" "', argument " "2"" of type '" "idmef_criterion_operator_t *""'"); } arg2 = (idmef_criterion_operator_t *)(argp2); result = (int)idmef_value_type_get_applicable_operators(arg1,arg2); { ST(argvi) = newSViv(result); argvi++; } XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_value_type_to_string) { { idmef_value_type_id_t arg1 ; int val1 ; int ecode1 = 0 ; int argvi = 0; char *result = 0 ; dXSARGS; if ((items < 1) || (items > 1)) { SWIG_croak("Usage: idmef_value_type_to_string(type);"); } ecode1 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(0), &val1); if (!SWIG_IsOK(ecode1)) { SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "idmef_value_type_to_string" "', argument " "1"" of type '" "idmef_value_type_id_t""'"); } arg1 = (idmef_value_type_id_t)(val1); result = (char *)idmef_value_type_to_string(arg1); ST(argvi) = SWIG_FromCharPtr((const char *)result); argvi++ ; XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_class_is_child_list) { { idmef_class_id_t arg1 ; idmef_class_child_id_t arg2 ; int val1 ; int ecode1 = 0 ; int val2 ; int ecode2 = 0 ; int argvi = 0; prelude_bool_t result; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: idmef_class_is_child_list(classid,child);"); } ecode1 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(0), &val1); if (!SWIG_IsOK(ecode1)) { SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "idmef_class_is_child_list" "', argument " "1"" of type '" "idmef_class_id_t""'"); } arg1 = (idmef_class_id_t)(val1); ecode2 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(1), &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "idmef_class_is_child_list" "', argument " "2"" of type '" "idmef_class_child_id_t""'"); } arg2 = (idmef_class_child_id_t)(val2); result = (prelude_bool_t)idmef_class_is_child_list(arg1,arg2); ST(argvi) = SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(result)); argvi++ ; XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_class_get_child_class) { { idmef_class_id_t arg1 ; idmef_class_child_id_t arg2 ; int val1 ; int ecode1 = 0 ; int val2 ; int ecode2 = 0 ; int argvi = 0; idmef_class_id_t result; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: idmef_class_get_child_class(classid,child);"); } ecode1 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(0), &val1); if (!SWIG_IsOK(ecode1)) { SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "idmef_class_get_child_class" "', argument " "1"" of type '" "idmef_class_id_t""'"); } arg1 = (idmef_class_id_t)(val1); ecode2 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(1), &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "idmef_class_get_child_class" "', argument " "2"" of type '" "idmef_class_child_id_t""'"); } arg2 = (idmef_class_child_id_t)(val2); result = (idmef_class_id_t)idmef_class_get_child_class(arg1,arg2); { ST(argvi) = newSViv(result); argvi++; } XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_class_get_child_value_type) { { idmef_class_id_t arg1 ; idmef_class_child_id_t arg2 ; int val1 ; int ecode1 = 0 ; int val2 ; int ecode2 = 0 ; int argvi = 0; idmef_value_type_id_t result; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: idmef_class_get_child_value_type(classid,child);"); } ecode1 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(0), &val1); if (!SWIG_IsOK(ecode1)) { SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "idmef_class_get_child_value_type" "', argument " "1"" of type '" "idmef_class_id_t""'"); } arg1 = (idmef_class_id_t)(val1); ecode2 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(1), &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "idmef_class_get_child_value_type" "', argument " "2"" of type '" "idmef_class_child_id_t""'"); } arg2 = (idmef_class_child_id_t)(val2); result = (idmef_value_type_id_t)idmef_class_get_child_value_type(arg1,arg2); ST(argvi) = SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(result)); argvi++ ; XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_class_enum_to_numeric) { { idmef_class_id_t arg1 ; char *arg2 = (char *) 0 ; int val1 ; int ecode1 = 0 ; int res2 ; char *buf2 = 0 ; int alloc2 = 0 ; int argvi = 0; int result; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: idmef_class_enum_to_numeric(classid,val);"); } ecode1 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(0), &val1); if (!SWIG_IsOK(ecode1)) { SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "idmef_class_enum_to_numeric" "', argument " "1"" of type '" "idmef_class_id_t""'"); } arg1 = (idmef_class_id_t)(val1); res2 = SWIG_AsCharPtrAndSize(ST(1), &buf2, NULL, &alloc2); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "idmef_class_enum_to_numeric" "', argument " "2"" of type '" "char const *""'"); } arg2 = (char *)(buf2); result = (int)idmef_class_enum_to_numeric(arg1,(char const *)arg2); { ST(argvi) = newSViv(result); argvi++; } if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); XSRETURN(argvi); fail: if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); SWIG_croak_null(); } } XS(_wrap_idmef_class_enum_to_string) { { idmef_class_id_t arg1 ; int arg2 ; int val1 ; int ecode1 = 0 ; int val2 ; int ecode2 = 0 ; int argvi = 0; char *result = 0 ; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: idmef_class_enum_to_string(classid,val);"); } ecode1 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(0), &val1); if (!SWIG_IsOK(ecode1)) { SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "idmef_class_enum_to_string" "', argument " "1"" of type '" "idmef_class_id_t""'"); } arg1 = (idmef_class_id_t)(val1); ecode2 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(1), &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "idmef_class_enum_to_string" "', argument " "2"" of type '" "int""'"); } arg2 = (int)(val2); result = (char *)idmef_class_enum_to_string(arg1,arg2); ST(argvi) = SWIG_FromCharPtr((const char *)result); argvi++ ; XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_class_get_child) { { void *arg1 = (void *) 0 ; idmef_class_id_t arg2 ; idmef_class_child_id_t arg3 ; void **arg4 = (void **) 0 ; int res1 ; int val2 ; int ecode2 = 0 ; int val3 ; int ecode3 = 0 ; void *argp4 = 0 ; int res4 = 0 ; int argvi = 0; int result; dXSARGS; if ((items < 4) || (items > 4)) { SWIG_croak("Usage: idmef_class_get_child(ptr,classid,child,childptr);"); } res1 = SWIG_ConvertPtr(ST(0),SWIG_as_voidptrptr(&arg1), 0, 0); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "idmef_class_get_child" "', argument " "1"" of type '" "void *""'"); } ecode2 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(1), &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "idmef_class_get_child" "', argument " "2"" of type '" "idmef_class_id_t""'"); } arg2 = (idmef_class_id_t)(val2); ecode3 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(2), &val3); if (!SWIG_IsOK(ecode3)) { SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "idmef_class_get_child" "', argument " "3"" of type '" "idmef_class_child_id_t""'"); } arg3 = (idmef_class_child_id_t)(val3); res4 = SWIG_ConvertPtr(ST(3), &argp4,SWIGTYPE_p_p_void, 0 | 0 ); if (!SWIG_IsOK(res4)) { SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "idmef_class_get_child" "', argument " "4"" of type '" "void **""'"); } arg4 = (void **)(argp4); result = (int)idmef_class_get_child(arg1,arg2,arg3,arg4); { ST(argvi) = newSViv(result); argvi++; } XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_class_new_child) { { void *arg1 = (void *) 0 ; idmef_class_id_t arg2 ; idmef_class_child_id_t arg3 ; int arg4 ; void **arg5 = (void **) 0 ; int res1 ; int val2 ; int ecode2 = 0 ; int val3 ; int ecode3 = 0 ; int val4 ; int ecode4 = 0 ; void *argp5 = 0 ; int res5 = 0 ; int argvi = 0; int result; dXSARGS; if ((items < 5) || (items > 5)) { SWIG_croak("Usage: idmef_class_new_child(ptr,classid,child,n,childptr);"); } res1 = SWIG_ConvertPtr(ST(0),SWIG_as_voidptrptr(&arg1), 0, 0); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "idmef_class_new_child" "', argument " "1"" of type '" "void *""'"); } ecode2 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(1), &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "idmef_class_new_child" "', argument " "2"" of type '" "idmef_class_id_t""'"); } arg2 = (idmef_class_id_t)(val2); ecode3 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(2), &val3); if (!SWIG_IsOK(ecode3)) { SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "idmef_class_new_child" "', argument " "3"" of type '" "idmef_class_child_id_t""'"); } arg3 = (idmef_class_child_id_t)(val3); ecode4 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(3), &val4); if (!SWIG_IsOK(ecode4)) { SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "idmef_class_new_child" "', argument " "4"" of type '" "int""'"); } arg4 = (int)(val4); res5 = SWIG_ConvertPtr(ST(4), &argp5,SWIGTYPE_p_p_void, 0 | 0 ); if (!SWIG_IsOK(res5)) { SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "idmef_class_new_child" "', argument " "5"" of type '" "void **""'"); } arg5 = (void **)(argp5); result = (int)idmef_class_new_child(arg1,arg2,arg3,arg4,arg5); { ST(argvi) = newSViv(result); argvi++; } XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_class_destroy_child) { { void *arg1 = (void *) 0 ; idmef_class_id_t arg2 ; idmef_class_child_id_t arg3 ; int arg4 ; int res1 ; int val2 ; int ecode2 = 0 ; int val3 ; int ecode3 = 0 ; int val4 ; int ecode4 = 0 ; int argvi = 0; int result; dXSARGS; if ((items < 4) || (items > 4)) { SWIG_croak("Usage: idmef_class_destroy_child(ptr,classid,child,n);"); } res1 = SWIG_ConvertPtr(ST(0),SWIG_as_voidptrptr(&arg1), 0, 0); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "idmef_class_destroy_child" "', argument " "1"" of type '" "void *""'"); } ecode2 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(1), &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "idmef_class_destroy_child" "', argument " "2"" of type '" "idmef_class_id_t""'"); } arg2 = (idmef_class_id_t)(val2); ecode3 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(2), &val3); if (!SWIG_IsOK(ecode3)) { SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "idmef_class_destroy_child" "', argument " "3"" of type '" "idmef_class_child_id_t""'"); } arg3 = (idmef_class_child_id_t)(val3); ecode4 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(3), &val4); if (!SWIG_IsOK(ecode4)) { SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "idmef_class_destroy_child" "', argument " "4"" of type '" "int""'"); } arg4 = (int)(val4); result = (int)idmef_class_destroy_child(arg1,arg2,arg3,arg4); { ST(argvi) = newSViv(result); argvi++; } XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_class_find) { { char *arg1 = (char *) 0 ; int res1 ; char *buf1 = 0 ; int alloc1 = 0 ; int argvi = 0; idmef_class_id_t result; dXSARGS; if ((items < 1) || (items > 1)) { SWIG_croak("Usage: idmef_class_find(name);"); } res1 = SWIG_AsCharPtrAndSize(ST(0), &buf1, NULL, &alloc1); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "idmef_class_find" "', argument " "1"" of type '" "char const *""'"); } arg1 = (char *)(buf1); result = (idmef_class_id_t)idmef_class_find((char const *)arg1); { ST(argvi) = newSViv(result); argvi++; } if (alloc1 == SWIG_NEWOBJ) free((char*)buf1); XSRETURN(argvi); fail: if (alloc1 == SWIG_NEWOBJ) free((char*)buf1); SWIG_croak_null(); } } XS(_wrap_idmef_class_find_child) { { idmef_class_id_t arg1 ; char *arg2 = (char *) 0 ; int val1 ; int ecode1 = 0 ; int res2 ; char *buf2 = 0 ; int alloc2 = 0 ; int argvi = 0; idmef_class_child_id_t result; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: idmef_class_find_child(classid,name);"); } ecode1 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(0), &val1); if (!SWIG_IsOK(ecode1)) { SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "idmef_class_find_child" "', argument " "1"" of type '" "idmef_class_id_t""'"); } arg1 = (idmef_class_id_t)(val1); res2 = SWIG_AsCharPtrAndSize(ST(1), &buf2, NULL, &alloc2); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "idmef_class_find_child" "', argument " "2"" of type '" "char const *""'"); } arg2 = (char *)(buf2); result = (idmef_class_child_id_t)idmef_class_find_child(arg1,(char const *)arg2); { ST(argvi) = newSViv(result); argvi++; } if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); XSRETURN(argvi); fail: if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); SWIG_croak_null(); } } XS(_wrap_idmef_class_get_name) { { idmef_class_id_t arg1 ; int val1 ; int ecode1 = 0 ; int argvi = 0; char *result = 0 ; dXSARGS; if ((items < 1) || (items > 1)) { SWIG_croak("Usage: idmef_class_get_name(classid);"); } ecode1 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(0), &val1); if (!SWIG_IsOK(ecode1)) { SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "idmef_class_get_name" "', argument " "1"" of type '" "idmef_class_id_t""'"); } arg1 = (idmef_class_id_t)(val1); result = (char *)idmef_class_get_name(arg1); ST(argvi) = SWIG_FromCharPtr((const char *)result); argvi++ ; XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_class_get_child_name) { { idmef_class_id_t arg1 ; idmef_class_child_id_t arg2 ; int val1 ; int ecode1 = 0 ; int val2 ; int ecode2 = 0 ; int argvi = 0; char *result = 0 ; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: idmef_class_get_child_name(classid,child);"); } ecode1 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(0), &val1); if (!SWIG_IsOK(ecode1)) { SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "idmef_class_get_child_name" "', argument " "1"" of type '" "idmef_class_id_t""'"); } arg1 = (idmef_class_id_t)(val1); ecode2 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(1), &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "idmef_class_get_child_name" "', argument " "2"" of type '" "idmef_class_child_id_t""'"); } arg2 = (idmef_class_child_id_t)(val2); result = (char *)idmef_class_get_child_name(arg1,arg2); ST(argvi) = SWIG_FromCharPtr((const char *)result); argvi++ ; XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_class_copy) { { idmef_class_id_t arg1 ; void *arg2 = (void *) 0 ; void *arg3 = (void *) 0 ; int val1 ; int ecode1 = 0 ; int res2 ; int res3 ; int argvi = 0; int result; dXSARGS; if ((items < 3) || (items > 3)) { SWIG_croak("Usage: idmef_class_copy(classid,src,dst);"); } ecode1 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(0), &val1); if (!SWIG_IsOK(ecode1)) { SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "idmef_class_copy" "', argument " "1"" of type '" "idmef_class_id_t""'"); } arg1 = (idmef_class_id_t)(val1); res2 = SWIG_ConvertPtr(ST(1),SWIG_as_voidptrptr(&arg2), 0, 0); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "idmef_class_copy" "', argument " "2"" of type '" "void const *""'"); } res3 = SWIG_ConvertPtr(ST(2),SWIG_as_voidptrptr(&arg3), 0, 0); if (!SWIG_IsOK(res3)) { SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "idmef_class_copy" "', argument " "3"" of type '" "void *""'"); } result = (int)idmef_class_copy(arg1,(void const *)arg2,arg3); { ST(argvi) = newSViv(result); argvi++; } XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_class_clone) { { idmef_class_id_t arg1 ; void *arg2 = (void *) 0 ; void **arg3 = (void **) 0 ; int val1 ; int ecode1 = 0 ; int res2 ; void *argp3 = 0 ; int res3 = 0 ; int argvi = 0; int result; dXSARGS; if ((items < 3) || (items > 3)) { SWIG_croak("Usage: idmef_class_clone(classid,src,dst);"); } ecode1 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(0), &val1); if (!SWIG_IsOK(ecode1)) { SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "idmef_class_clone" "', argument " "1"" of type '" "idmef_class_id_t""'"); } arg1 = (idmef_class_id_t)(val1); res2 = SWIG_ConvertPtr(ST(1),SWIG_as_voidptrptr(&arg2), 0, 0); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "idmef_class_clone" "', argument " "2"" of type '" "void const *""'"); } res3 = SWIG_ConvertPtr(ST(2), &argp3,SWIGTYPE_p_p_void, 0 | 0 ); if (!SWIG_IsOK(res3)) { SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "idmef_class_clone" "', argument " "3"" of type '" "void **""'"); } arg3 = (void **)(argp3); result = (int)idmef_class_clone(arg1,(void const *)arg2,arg3); { ST(argvi) = newSViv(result); argvi++; } XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_class_compare) { { idmef_class_id_t arg1 ; void *arg2 = (void *) 0 ; void *arg3 = (void *) 0 ; int val1 ; int ecode1 = 0 ; int res2 ; int res3 ; int argvi = 0; int result; dXSARGS; if ((items < 3) || (items > 3)) { SWIG_croak("Usage: idmef_class_compare(classid,c1,c2);"); } ecode1 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(0), &val1); if (!SWIG_IsOK(ecode1)) { SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "idmef_class_compare" "', argument " "1"" of type '" "idmef_class_id_t""'"); } arg1 = (idmef_class_id_t)(val1); res2 = SWIG_ConvertPtr(ST(1),SWIG_as_voidptrptr(&arg2), 0, 0); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "idmef_class_compare" "', argument " "2"" of type '" "void const *""'"); } res3 = SWIG_ConvertPtr(ST(2),SWIG_as_voidptrptr(&arg3), 0, 0); if (!SWIG_IsOK(res3)) { SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "idmef_class_compare" "', argument " "3"" of type '" "void const *""'"); } result = (int)idmef_class_compare(arg1,(void const *)arg2,(void const *)arg3); { ST(argvi) = newSViv(result); argvi++; } XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_class_ref) { { idmef_class_id_t arg1 ; void *arg2 = (void *) 0 ; int val1 ; int ecode1 = 0 ; int res2 ; int argvi = 0; int result; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: idmef_class_ref(classid,obj);"); } ecode1 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(0), &val1); if (!SWIG_IsOK(ecode1)) { SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "idmef_class_ref" "', argument " "1"" of type '" "idmef_class_id_t""'"); } arg1 = (idmef_class_id_t)(val1); res2 = SWIG_ConvertPtr(ST(1),SWIG_as_voidptrptr(&arg2), 0, 0); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "idmef_class_ref" "', argument " "2"" of type '" "void *""'"); } result = (int)idmef_class_ref(arg1,arg2); { ST(argvi) = newSViv(result); argvi++; } XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_idmef_class_destroy) { { idmef_class_id_t arg1 ; void *arg2 = (void *) 0 ; int val1 ; int ecode1 = 0 ; int res2 ; int argvi = 0; int result; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: idmef_class_destroy(classid,obj);"); } ecode1 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(0), &val1); if (!SWIG_IsOK(ecode1)) { SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "idmef_class_destroy" "', argument " "1"" of type '" "idmef_class_id_t""'"); } arg1 = (idmef_class_id_t)(val1); res2 = SWIG_ConvertPtr(ST(1),SWIG_as_voidptrptr(&arg2), 0, 0); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "idmef_class_destroy" "', argument " "2"" of type '" "void *""'"); } result = (int)idmef_class_destroy(arg1,arg2); { ST(argvi) = newSViv(result); argvi++; } XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_prelude_connection_destroy) { { prelude_connection_t *arg1 = (prelude_connection_t *) 0 ; int argvi = 0; dXSARGS; if ((items < 1) || (items > 1)) { SWIG_croak("Usage: prelude_connection_destroy(conn);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_prelude_connection, 0) ) { croak("Expected type prelude_connection_t * for argument 1."); return; } } prelude_connection_destroy(arg1); ST(argvi) = sv_newmortal(); XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_prelude_connection_ref) { { prelude_connection_t *arg1 = (prelude_connection_t *) 0 ; int argvi = 0; prelude_connection_t *result = 0 ; dXSARGS; if ((items < 1) || (items > 1)) { SWIG_croak("Usage: prelude_connection_ref(conn);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_prelude_connection, 0) ) { croak("Expected type prelude_connection_t * for argument 1."); return; } } result = (prelude_connection_t *)prelude_connection_ref(arg1); ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_prelude_connection, 0 | 0); argvi++ ; XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_prelude_connection_send) { { prelude_connection_t *arg1 = (prelude_connection_t *) 0 ; prelude_msg_t *arg2 = (prelude_msg_t *) 0 ; int argvi = 0; int result; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: prelude_connection_send(cnx,msg);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_prelude_connection, 0) ) { croak("Expected type prelude_connection_t * for argument 1."); return; } } { if ( ! SvROK(ST(1)) ) { croak("Argument 2 is null."); return; } if ( SWIG_ConvertPtr(ST(1), (void **)&arg2, SWIGTYPE_p_prelude_msg, 0) ) { croak("Expected type prelude_msg_t * for argument 2."); return; } } result = (int)prelude_connection_send(arg1,arg2); { ST(argvi) = newSViv(result); argvi++; } XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_prelude_connection_recv) { { prelude_connection_t *arg1 = (prelude_connection_t *) 0 ; prelude_msg_t **arg2 = (prelude_msg_t **) 0 ; prelude_msg_t *tmp2 ; int argvi = 0; SV * _saved[1] ; int result; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: prelude_connection_recv(cnx,outmsg);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_prelude_connection, 0) ) { croak("Expected type prelude_connection_t * for argument 1."); return; } } { tmp2 = NULL; arg2 = (prelude_msg_t **) &tmp2; } _saved[0] = ST(1); result = (int)prelude_connection_recv(arg1,arg2); { ST(argvi) = newSViv(result); argvi++; } { SV *sv; if ( result >= 0 ) { if ( ! SvROK(_saved[0]) ) { croak("Argument 2 is not a reference."); return; } sv = SvRV(_saved[0]); sv_setsv(sv, SWIG_NewPointerObj((void *) * arg2, SWIGTYPE_p_prelude_msg, 0)); } } XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_prelude_connection_recv_idmef) { { prelude_connection_t *arg1 = (prelude_connection_t *) 0 ; idmef_message_t **arg2 = (idmef_message_t **) 0 ; idmef_message_t *tmp2 ; int argvi = 0; SV * _saved[1] ; int result; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: prelude_connection_recv_idmef(con,idmef);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_prelude_connection, 0) ) { croak("Expected type prelude_connection_t * for argument 1."); return; } } { arg2 = (idmef_message_t **) &tmp2; } _saved[0] = ST(1); result = (int)prelude_connection_recv_idmef(arg1,arg2); { ST(argvi) = newSViv(result); argvi++; } { SV *sv; if ( result >= 0 ) { if ( ! SvROK(_saved[0]) ) { croak("Argument 2 is not a reference."); return; } sv = SvRV(_saved[0]); sv_setsv(sv, SWIG_NewPointerObj((void *) * arg2, SWIGTYPE_p_idmef_message, 0)); } } XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_prelude_connection_connect) { { prelude_connection_t *arg1 = (prelude_connection_t *) 0 ; prelude_client_profile_t *arg2 = (prelude_client_profile_t *) 0 ; prelude_connection_permission_t arg3 ; int val3 ; int ecode3 = 0 ; int argvi = 0; int result; dXSARGS; if ((items < 3) || (items > 3)) { SWIG_croak("Usage: prelude_connection_connect(cnx,profile,permission);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_prelude_connection, 0) ) { croak("Expected type prelude_connection_t * for argument 1."); return; } } { if ( ! SvROK(ST(1)) ) { croak("Argument 2 is null."); return; } if ( SWIG_ConvertPtr(ST(1), (void **)&arg2, SWIGTYPE_p_prelude_client_profile, 0) ) { croak("Expected type prelude_client_profile_t * for argument 2."); return; } } ecode3 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(2), &val3); if (!SWIG_IsOK(ecode3)) { SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "prelude_connection_connect" "', argument " "3"" of type '" "prelude_connection_permission_t""'"); } arg3 = (prelude_connection_permission_t)(val3); result = (int)prelude_connection_connect(arg1,arg2,arg3); { ST(argvi) = newSViv(result); argvi++; } XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_prelude_connection_forward) { { prelude_connection_t *arg1 = (prelude_connection_t *) 0 ; prelude_io_t *arg2 = (prelude_io_t *) 0 ; size_t arg3 ; void *argp2 = 0 ; int res2 = 0 ; size_t val3 ; int ecode3 = 0 ; int argvi = 0; ssize_t result; dXSARGS; if ((items < 3) || (items > 3)) { SWIG_croak("Usage: prelude_connection_forward(cnx,src,count);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_prelude_connection, 0) ) { croak("Expected type prelude_connection_t * for argument 1."); return; } } res2 = SWIG_ConvertPtr(ST(1), &argp2,SWIGTYPE_p_prelude_io_t, 0 | 0 ); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "prelude_connection_forward" "', argument " "2"" of type '" "prelude_io_t *""'"); } arg2 = (prelude_io_t *)(argp2); ecode3 = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(2), &val3); if (!SWIG_IsOK(ecode3)) { SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "prelude_connection_forward" "', argument " "3"" of type '" "size_t""'"); } arg3 = (size_t)(val3); result = prelude_connection_forward(arg1,arg2,arg3); ST(argvi) = SWIG_NewPointerObj((ssize_t *)memcpy((ssize_t *)malloc(sizeof(ssize_t)),&result,sizeof(ssize_t)), SWIGTYPE_p_ssize_t, SWIG_POINTER_OWN | 0); argvi++ ; XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_prelude_connection_get_local_addr) { { prelude_connection_t *arg1 = (prelude_connection_t *) 0 ; int argvi = 0; char *result = 0 ; dXSARGS; if ((items < 1) || (items > 1)) { SWIG_croak("Usage: prelude_connection_get_local_addr(cnx);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_prelude_connection, 0) ) { croak("Expected type prelude_connection_t * for argument 1."); return; } } result = (char *)prelude_connection_get_local_addr(arg1); ST(argvi) = SWIG_FromCharPtr((const char *)result); argvi++ ; XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_prelude_connection_get_local_port) { { prelude_connection_t *arg1 = (prelude_connection_t *) 0 ; int argvi = 0; unsigned int result; dXSARGS; if ((items < 1) || (items > 1)) { SWIG_croak("Usage: prelude_connection_get_local_port(cnx);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_prelude_connection, 0) ) { croak("Expected type prelude_connection_t * for argument 1."); return; } } result = (unsigned int)prelude_connection_get_local_port(arg1); ST(argvi) = SWIG_From_unsigned_SS_int SWIG_PERL_CALL_ARGS_1((unsigned int)(result)); argvi++ ; XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_prelude_connection_get_peer_addr) { { prelude_connection_t *arg1 = (prelude_connection_t *) 0 ; int argvi = 0; char *result = 0 ; dXSARGS; if ((items < 1) || (items > 1)) { SWIG_croak("Usage: prelude_connection_get_peer_addr(cnx);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_prelude_connection, 0) ) { croak("Expected type prelude_connection_t * for argument 1."); return; } } result = (char *)prelude_connection_get_peer_addr(arg1); ST(argvi) = SWIG_FromCharPtr((const char *)result); argvi++ ; XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_prelude_connection_get_peer_port) { { prelude_connection_t *arg1 = (prelude_connection_t *) 0 ; int argvi = 0; unsigned int result; dXSARGS; if ((items < 1) || (items > 1)) { SWIG_croak("Usage: prelude_connection_get_peer_port(cnx);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_prelude_connection, 0) ) { croak("Expected type prelude_connection_t * for argument 1."); return; } } result = (unsigned int)prelude_connection_get_peer_port(arg1); ST(argvi) = SWIG_From_unsigned_SS_int SWIG_PERL_CALL_ARGS_1((unsigned int)(result)); argvi++ ; XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_prelude_connection_is_alive) { { prelude_connection_t *arg1 = (prelude_connection_t *) 0 ; int argvi = 0; prelude_bool_t result; dXSARGS; if ((items < 1) || (items > 1)) { SWIG_croak("Usage: prelude_connection_is_alive(cnx);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_prelude_connection, 0) ) { croak("Expected type prelude_connection_t * for argument 1."); return; } } result = (prelude_bool_t)prelude_connection_is_alive(arg1); ST(argvi) = SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(result)); argvi++ ; XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_prelude_connection_get_fd) { { prelude_connection_t *arg1 = (prelude_connection_t *) 0 ; int argvi = 0; prelude_io_t *result = 0 ; dXSARGS; if ((items < 1) || (items > 1)) { SWIG_croak("Usage: prelude_connection_get_fd(cnx);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_prelude_connection, 0) ) { croak("Expected type prelude_connection_t * for argument 1."); return; } } result = (prelude_io_t *)prelude_connection_get_fd(arg1); ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_prelude_io_t, 0 | 0); argvi++ ; XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_prelude_connection_close) { { prelude_connection_t *arg1 = (prelude_connection_t *) 0 ; int argvi = 0; int result; dXSARGS; if ((items < 1) || (items > 1)) { SWIG_croak("Usage: prelude_connection_close(cnx);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_prelude_connection, 0) ) { croak("Expected type prelude_connection_t * for argument 1."); return; } } result = (int)prelude_connection_close(arg1); { ST(argvi) = newSViv(result); argvi++; } XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_prelude_connection_set_fd_ref) { { prelude_connection_t *arg1 = (prelude_connection_t *) 0 ; prelude_io_t *arg2 = (prelude_io_t *) 0 ; void *argp2 = 0 ; int res2 = 0 ; int argvi = 0; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: prelude_connection_set_fd_ref(cnx,fd);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_prelude_connection, 0) ) { croak("Expected type prelude_connection_t * for argument 1."); return; } } res2 = SWIG_ConvertPtr(ST(1), &argp2,SWIGTYPE_p_prelude_io_t, 0 | 0 ); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "prelude_connection_set_fd_ref" "', argument " "2"" of type '" "prelude_io_t *""'"); } arg2 = (prelude_io_t *)(argp2); prelude_connection_set_fd_ref(arg1,arg2); ST(argvi) = sv_newmortal(); XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_prelude_connection_set_fd_nodup) { { prelude_connection_t *arg1 = (prelude_connection_t *) 0 ; prelude_io_t *arg2 = (prelude_io_t *) 0 ; void *argp2 = 0 ; int res2 = 0 ; int argvi = 0; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: prelude_connection_set_fd_nodup(cnx,fd);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_prelude_connection, 0) ) { croak("Expected type prelude_connection_t * for argument 1."); return; } } res2 = SWIG_ConvertPtr(ST(1), &argp2,SWIGTYPE_p_prelude_io_t, 0 | 0 ); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "prelude_connection_set_fd_nodup" "', argument " "2"" of type '" "prelude_io_t *""'"); } arg2 = (prelude_io_t *)(argp2); prelude_connection_set_fd_nodup(arg1,arg2); ST(argvi) = sv_newmortal(); XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_prelude_connection_set_state) { { prelude_connection_t *arg1 = (prelude_connection_t *) 0 ; prelude_connection_state_t arg2 ; int val2 ; int ecode2 = 0 ; int argvi = 0; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: prelude_connection_set_state(cnx,state);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_prelude_connection, 0) ) { croak("Expected type prelude_connection_t * for argument 1."); return; } } ecode2 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(1), &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "prelude_connection_set_state" "', argument " "2"" of type '" "prelude_connection_state_t""'"); } arg2 = (prelude_connection_state_t)(val2); prelude_connection_set_state(arg1,arg2); ST(argvi) = sv_newmortal(); XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_prelude_connection_get_state) { { prelude_connection_t *arg1 = (prelude_connection_t *) 0 ; int argvi = 0; prelude_connection_state_t result; dXSARGS; if ((items < 1) || (items > 1)) { SWIG_croak("Usage: prelude_connection_get_state(cnx);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_prelude_connection, 0) ) { croak("Expected type prelude_connection_t * for argument 1."); return; } } result = (prelude_connection_state_t)prelude_connection_get_state(arg1); ST(argvi) = SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(result)); argvi++ ; XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_prelude_connection_set_data) { { prelude_connection_t *arg1 = (prelude_connection_t *) 0 ; void *arg2 = (void *) 0 ; int res2 ; int argvi = 0; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: prelude_connection_set_data(cnx,data);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_prelude_connection, 0) ) { croak("Expected type prelude_connection_t * for argument 1."); return; } } res2 = SWIG_ConvertPtr(ST(1),SWIG_as_voidptrptr(&arg2), 0, 0); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "prelude_connection_set_data" "', argument " "2"" of type '" "void *""'"); } prelude_connection_set_data(arg1,arg2); ST(argvi) = sv_newmortal(); XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_prelude_connection_get_data) { { prelude_connection_t *arg1 = (prelude_connection_t *) 0 ; int argvi = 0; void *result = 0 ; dXSARGS; if ((items < 1) || (items > 1)) { SWIG_croak("Usage: prelude_connection_get_data(cnx);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_prelude_connection, 0) ) { croak("Expected type prelude_connection_t * for argument 1."); return; } } result = (void *)prelude_connection_get_data(arg1); ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_void, 0 | 0); argvi++ ; XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_prelude_connection_get_default_socket_filename) { { int argvi = 0; char *result = 0 ; dXSARGS; if ((items < 0) || (items > 0)) { SWIG_croak("Usage: prelude_connection_get_default_socket_filename();"); } result = (char *)prelude_connection_get_default_socket_filename(); ST(argvi) = SWIG_FromCharPtr((const char *)result); argvi++ ; XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_prelude_connection_get_permission) { { prelude_connection_t *arg1 = (prelude_connection_t *) 0 ; int argvi = 0; prelude_connection_permission_t result; dXSARGS; if ((items < 1) || (items > 1)) { SWIG_croak("Usage: prelude_connection_get_permission(conn);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_prelude_connection, 0) ) { croak("Expected type prelude_connection_t * for argument 1."); return; } } result = (prelude_connection_permission_t)prelude_connection_get_permission(arg1); ST(argvi) = SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(result)); argvi++ ; XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_prelude_connection_get_peer_analyzerid) { { prelude_connection_t *arg1 = (prelude_connection_t *) 0 ; int argvi = 0; uint64_t result; dXSARGS; if ((items < 1) || (items > 1)) { SWIG_croak("Usage: prelude_connection_get_peer_analyzerid(cnx);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_prelude_connection, 0) ) { croak("Expected type prelude_connection_t * for argument 1."); return; } } result = (uint64_t)prelude_connection_get_peer_analyzerid(arg1); ST(argvi) = SWIG_From_unsigned_SS_long_SS_long SWIG_PERL_CALL_ARGS_1((unsigned long long)(result)); argvi++ ; XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_prelude_connection_set_peer_analyzerid) { { prelude_connection_t *arg1 = (prelude_connection_t *) 0 ; uint64_t arg2 ; unsigned long long val2 ; int ecode2 = 0 ; int argvi = 0; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: prelude_connection_set_peer_analyzerid(cnx,analyzerid);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_prelude_connection, 0) ) { croak("Expected type prelude_connection_t * for argument 1."); return; } } ecode2 = SWIG_AsVal_unsigned_SS_long_SS_long SWIG_PERL_CALL_ARGS_2(ST(1), &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "prelude_connection_set_peer_analyzerid" "', argument " "2"" of type '" "uint64_t""'"); } arg2 = (uint64_t)(val2); prelude_connection_set_peer_analyzerid(arg1,arg2); ST(argvi) = sv_newmortal(); XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_prelude_connection_new) { { prelude_connection_t **arg1 = (prelude_connection_t **) 0 ; char *arg2 = (char *) 0 ; prelude_connection_t *tmp1 ; int res2 ; char *buf2 = 0 ; int alloc2 = 0 ; int argvi = 0; SV * _saved[1] ; int result; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: prelude_connection_new(ret,addr);"); } { arg1 = (prelude_connection_t **) &tmp1; } res2 = SWIG_AsCharPtrAndSize(ST(1), &buf2, NULL, &alloc2); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "prelude_connection_new" "', argument " "2"" of type '" "char const *""'"); } arg2 = (char *)(buf2); _saved[0] = ST(0); result = (int)prelude_connection_new(arg1,(char const *)arg2); { ST(argvi) = newSViv(result); argvi++; } { SV *sv; if ( result >= 0 ) { if ( ! SvROK(_saved[0]) ) { croak("Argument 1 is not a reference."); return; } sv = SvRV(_saved[0]); sv_setsv(sv, SWIG_NewPointerObj((void *) * arg1, SWIGTYPE_p_prelude_connection, 0)); } } if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); XSRETURN(argvi); fail: if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); SWIG_croak_null(); } } XS(_wrap_prelude_connection_new_msgbuf) { { prelude_connection_t *arg1 = (prelude_connection_t *) 0 ; prelude_msgbuf_t **arg2 = (prelude_msgbuf_t **) 0 ; prelude_msgbuf_t *tmp2 ; int argvi = 0; SV * _saved[1] ; int result; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: prelude_connection_new_msgbuf(connection,msgbuf);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_prelude_connection, 0) ) { croak("Expected type prelude_connection_t * for argument 1."); return; } } { arg2 = (prelude_msgbuf_t **) &tmp2; } _saved[0] = ST(1); result = (int)prelude_connection_new_msgbuf(arg1,arg2); { ST(argvi) = newSViv(result); argvi++; } { SV *sv; if ( result >= 0 ) { if ( ! SvROK(_saved[0]) ) { croak("Argument 2 is not a reference."); return; } sv = SvRV(_saved[0]); sv_setsv(sv, SWIG_NewPointerObj((void *) * arg2, SWIGTYPE_p_prelude_msgbuf, 0)); } } XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_prelude_connection_permission_to_string) { { prelude_connection_permission_t arg1 ; prelude_string_t *arg2 = (prelude_string_t *) 0 ; int val1 ; int ecode1 = 0 ; int argvi = 0; int result; dXSARGS; { int ret; ret = prelude_string_new(&(arg2)); if ( ret < 0 ) { swig_perl_raise_error(ret); return; } } if ((items < 1) || (items > 1)) { SWIG_croak("Usage: prelude_connection_permission_to_string(perm);"); } ecode1 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(0), &val1); if (!SWIG_IsOK(ecode1)) { SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "prelude_connection_permission_to_string" "', argument " "1"" of type '" "prelude_connection_permission_t""'"); } arg1 = (prelude_connection_permission_t)(val1); result = (int)prelude_connection_permission_to_string(arg1,arg2); { ST(argvi) = newSViv(result); argvi++; } { if ( result >= 0 ) { ST(argvi) = newSVpv(prelude_string_get_string(arg2), prelude_string_get_len(arg2)); argvi++; } prelude_string_destroy(arg2); } XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_prelude_connection_permission_new_from_string) { { prelude_connection_permission_t *arg1 = (prelude_connection_permission_t *) 0 ; char *arg2 = (char *) 0 ; void *argp1 = 0 ; int res1 = 0 ; int res2 ; char *buf2 = 0 ; int alloc2 = 0 ; int argvi = 0; int result; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: prelude_connection_permission_new_from_string(out,buf);"); } res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_prelude_connection_permission_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "prelude_connection_permission_new_from_string" "', argument " "1"" of type '" "prelude_connection_permission_t *""'"); } arg1 = (prelude_connection_permission_t *)(argp1); res2 = SWIG_AsCharPtrAndSize(ST(1), &buf2, NULL, &alloc2); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "prelude_connection_permission_new_from_string" "', argument " "2"" of type '" "char const *""'"); } arg2 = (char *)(buf2); result = (int)prelude_connection_permission_new_from_string(arg1,(char const *)arg2); { ST(argvi) = newSViv(result); argvi++; } if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); XSRETURN(argvi); fail: if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); SWIG_croak_null(); } } XS(_wrap_prelude_connection_pool_broadcast) { { prelude_connection_pool_t *arg1 = (prelude_connection_pool_t *) 0 ; prelude_msg_t *arg2 = (prelude_msg_t *) 0 ; void *argp1 = 0 ; int res1 = 0 ; int argvi = 0; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: prelude_connection_pool_broadcast(pool,msg);"); } res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_prelude_connection_pool, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "prelude_connection_pool_broadcast" "', argument " "1"" of type '" "prelude_connection_pool_t *""'"); } arg1 = (prelude_connection_pool_t *)(argp1); { if ( ! SvROK(ST(1)) ) { croak("Argument 2 is null."); return; } if ( SWIG_ConvertPtr(ST(1), (void **)&arg2, SWIGTYPE_p_prelude_msg, 0) ) { croak("Expected type prelude_msg_t * for argument 2."); return; } } prelude_connection_pool_broadcast(arg1,arg2); ST(argvi) = sv_newmortal(); XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_prelude_connection_pool_broadcast_async) { { prelude_connection_pool_t *arg1 = (prelude_connection_pool_t *) 0 ; prelude_msg_t *arg2 = (prelude_msg_t *) 0 ; void *argp1 = 0 ; int res1 = 0 ; int argvi = 0; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: prelude_connection_pool_broadcast_async(pool,msg);"); } res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_prelude_connection_pool, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "prelude_connection_pool_broadcast_async" "', argument " "1"" of type '" "prelude_connection_pool_t *""'"); } arg1 = (prelude_connection_pool_t *)(argp1); { if ( ! SvROK(ST(1)) ) { croak("Argument 2 is null."); return; } if ( SWIG_ConvertPtr(ST(1), (void **)&arg2, SWIGTYPE_p_prelude_msg, 0) ) { croak("Expected type prelude_msg_t * for argument 2."); return; } } prelude_connection_pool_broadcast_async(arg1,arg2); ST(argvi) = sv_newmortal(); XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_prelude_connection_pool_init) { { prelude_connection_pool_t *arg1 = (prelude_connection_pool_t *) 0 ; void *argp1 = 0 ; int res1 = 0 ; int argvi = 0; int result; dXSARGS; if ((items < 1) || (items > 1)) { SWIG_croak("Usage: prelude_connection_pool_init(pool);"); } res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_prelude_connection_pool, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "prelude_connection_pool_init" "', argument " "1"" of type '" "prelude_connection_pool_t *""'"); } arg1 = (prelude_connection_pool_t *)(argp1); result = (int)prelude_connection_pool_init(arg1); { ST(argvi) = newSViv(result); argvi++; } XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_prelude_connection_pool_new) { { prelude_connection_pool_t **arg1 = (prelude_connection_pool_t **) 0 ; prelude_client_profile_t *arg2 = (prelude_client_profile_t *) 0 ; prelude_connection_permission_t arg3 ; void *argp1 = 0 ; int res1 = 0 ; int val3 ; int ecode3 = 0 ; int argvi = 0; int result; dXSARGS; if ((items < 3) || (items > 3)) { SWIG_croak("Usage: prelude_connection_pool_new(ret,cp,permission);"); } res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_p_prelude_connection_pool, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "prelude_connection_pool_new" "', argument " "1"" of type '" "prelude_connection_pool_t **""'"); } arg1 = (prelude_connection_pool_t **)(argp1); { if ( ! SvROK(ST(1)) ) { croak("Argument 2 is null."); return; } if ( SWIG_ConvertPtr(ST(1), (void **)&arg2, SWIGTYPE_p_prelude_client_profile, 0) ) { croak("Expected type prelude_client_profile_t * for argument 2."); return; } } ecode3 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(2), &val3); if (!SWIG_IsOK(ecode3)) { SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "prelude_connection_pool_new" "', argument " "3"" of type '" "prelude_connection_permission_t""'"); } arg3 = (prelude_connection_permission_t)(val3); result = (int)prelude_connection_pool_new(arg1,arg2,arg3); { ST(argvi) = newSViv(result); argvi++; } XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_prelude_connection_pool_get_connection_list) { { prelude_connection_pool_t *arg1 = (prelude_connection_pool_t *) 0 ; void *argp1 = 0 ; int res1 = 0 ; int argvi = 0; prelude_list_t *result = 0 ; dXSARGS; if ((items < 1) || (items > 1)) { SWIG_croak("Usage: prelude_connection_pool_get_connection_list(pool);"); } res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_prelude_connection_pool, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "prelude_connection_pool_get_connection_list" "', argument " "1"" of type '" "prelude_connection_pool_t *""'"); } arg1 = (prelude_connection_pool_t *)(argp1); result = (prelude_list_t *)prelude_connection_pool_get_connection_list(arg1); ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_prelude_list_t, 0 | 0); argvi++ ; XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_prelude_connection_pool_add_connection) { { prelude_connection_pool_t *arg1 = (prelude_connection_pool_t *) 0 ; prelude_connection_t *arg2 = (prelude_connection_t *) 0 ; void *argp1 = 0 ; int res1 = 0 ; int argvi = 0; int result; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: prelude_connection_pool_add_connection(pool,cnx);"); } res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_prelude_connection_pool, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "prelude_connection_pool_add_connection" "', argument " "1"" of type '" "prelude_connection_pool_t *""'"); } arg1 = (prelude_connection_pool_t *)(argp1); { if ( ! SvROK(ST(1)) ) { croak("Argument 2 is null."); return; } if ( SWIG_ConvertPtr(ST(1), (void **)&arg2, SWIGTYPE_p_prelude_connection, 0) ) { croak("Expected type prelude_connection_t * for argument 2."); return; } } result = (int)prelude_connection_pool_add_connection(arg1,arg2); { ST(argvi) = newSViv(result); argvi++; } XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_prelude_connection_pool_del_connection) { { prelude_connection_pool_t *arg1 = (prelude_connection_pool_t *) 0 ; prelude_connection_t *arg2 = (prelude_connection_t *) 0 ; void *argp1 = 0 ; int res1 = 0 ; int argvi = 0; int result; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: prelude_connection_pool_del_connection(pool,cnx);"); } res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_prelude_connection_pool, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "prelude_connection_pool_del_connection" "', argument " "1"" of type '" "prelude_connection_pool_t *""'"); } arg1 = (prelude_connection_pool_t *)(argp1); { if ( ! SvROK(ST(1)) ) { croak("Argument 2 is null."); return; } if ( SWIG_ConvertPtr(ST(1), (void **)&arg2, SWIGTYPE_p_prelude_connection, 0) ) { croak("Expected type prelude_connection_t * for argument 2."); return; } } result = (int)prelude_connection_pool_del_connection(arg1,arg2); { ST(argvi) = newSViv(result); argvi++; } XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_prelude_connection_pool_set_connection_dead) { { prelude_connection_pool_t *arg1 = (prelude_connection_pool_t *) 0 ; prelude_connection_t *arg2 = (prelude_connection_t *) 0 ; void *argp1 = 0 ; int res1 = 0 ; int argvi = 0; int result; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: prelude_connection_pool_set_connection_dead(pool,cnx);"); } res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_prelude_connection_pool, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "prelude_connection_pool_set_connection_dead" "', argument " "1"" of type '" "prelude_connection_pool_t *""'"); } arg1 = (prelude_connection_pool_t *)(argp1); { if ( ! SvROK(ST(1)) ) { croak("Argument 2 is null."); return; } if ( SWIG_ConvertPtr(ST(1), (void **)&arg2, SWIGTYPE_p_prelude_connection, 0) ) { croak("Expected type prelude_connection_t * for argument 2."); return; } } result = (int)prelude_connection_pool_set_connection_dead(arg1,arg2); { ST(argvi) = newSViv(result); argvi++; } XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_prelude_connection_pool_set_connection_alive) { { prelude_connection_pool_t *arg1 = (prelude_connection_pool_t *) 0 ; prelude_connection_t *arg2 = (prelude_connection_t *) 0 ; void *argp1 = 0 ; int res1 = 0 ; int argvi = 0; int result; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: prelude_connection_pool_set_connection_alive(pool,cnx);"); } res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_prelude_connection_pool, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "prelude_connection_pool_set_connection_alive" "', argument " "1"" of type '" "prelude_connection_pool_t *""'"); } arg1 = (prelude_connection_pool_t *)(argp1); { if ( ! SvROK(ST(1)) ) { croak("Argument 2 is null."); return; } if ( SWIG_ConvertPtr(ST(1), (void **)&arg2, SWIGTYPE_p_prelude_connection, 0) ) { croak("Expected type prelude_connection_t * for argument 2."); return; } } result = (int)prelude_connection_pool_set_connection_alive(arg1,arg2); { ST(argvi) = newSViv(result); argvi++; } XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_prelude_connection_pool_set_connection_string) { { prelude_connection_pool_t *arg1 = (prelude_connection_pool_t *) 0 ; char *arg2 = (char *) 0 ; void *argp1 = 0 ; int res1 = 0 ; int res2 ; char *buf2 = 0 ; int alloc2 = 0 ; int argvi = 0; int result; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: prelude_connection_pool_set_connection_string(pool,cfgstr);"); } res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_prelude_connection_pool, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "prelude_connection_pool_set_connection_string" "', argument " "1"" of type '" "prelude_connection_pool_t *""'"); } arg1 = (prelude_connection_pool_t *)(argp1); res2 = SWIG_AsCharPtrAndSize(ST(1), &buf2, NULL, &alloc2); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "prelude_connection_pool_set_connection_string" "', argument " "2"" of type '" "char const *""'"); } arg2 = (char *)(buf2); result = (int)prelude_connection_pool_set_connection_string(arg1,(char const *)arg2); { ST(argvi) = newSViv(result); argvi++; } if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); XSRETURN(argvi); fail: if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); SWIG_croak_null(); } } XS(_wrap_prelude_connection_pool_get_connection_string) { { prelude_connection_pool_t *arg1 = (prelude_connection_pool_t *) 0 ; void *argp1 = 0 ; int res1 = 0 ; int argvi = 0; char *result = 0 ; dXSARGS; if ((items < 1) || (items > 1)) { SWIG_croak("Usage: prelude_connection_pool_get_connection_string(pool);"); } res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_prelude_connection_pool, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "prelude_connection_pool_get_connection_string" "', argument " "1"" of type '" "prelude_connection_pool_t *""'"); } arg1 = (prelude_connection_pool_t *)(argp1); result = (char *)prelude_connection_pool_get_connection_string(arg1); ST(argvi) = SWIG_FromCharPtr((const char *)result); argvi++ ; XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_prelude_connection_pool_destroy) { { prelude_connection_pool_t *arg1 = (prelude_connection_pool_t *) 0 ; void *argp1 = 0 ; int res1 = 0 ; int argvi = 0; dXSARGS; if ((items < 1) || (items > 1)) { SWIG_croak("Usage: prelude_connection_pool_destroy(pool);"); } res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_prelude_connection_pool, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "prelude_connection_pool_destroy" "', argument " "1"" of type '" "prelude_connection_pool_t *""'"); } arg1 = (prelude_connection_pool_t *)(argp1); prelude_connection_pool_destroy(arg1); ST(argvi) = sv_newmortal(); XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_prelude_connection_pool_ref) { { prelude_connection_pool_t *arg1 = (prelude_connection_pool_t *) 0 ; void *argp1 = 0 ; int res1 = 0 ; int argvi = 0; prelude_connection_pool_t *result = 0 ; dXSARGS; if ((items < 1) || (items > 1)) { SWIG_croak("Usage: prelude_connection_pool_ref(pool);"); } res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_prelude_connection_pool, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "prelude_connection_pool_ref" "', argument " "1"" of type '" "prelude_connection_pool_t *""'"); } arg1 = (prelude_connection_pool_t *)(argp1); result = (prelude_connection_pool_t *)prelude_connection_pool_ref(arg1); ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_prelude_connection_pool, 0 | 0); argvi++ ; XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_prelude_connection_pool_get_flags) { { prelude_connection_pool_t *arg1 = (prelude_connection_pool_t *) 0 ; void *argp1 = 0 ; int res1 = 0 ; int argvi = 0; prelude_connection_pool_flags_t result; dXSARGS; if ((items < 1) || (items > 1)) { SWIG_croak("Usage: prelude_connection_pool_get_flags(pool);"); } res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_prelude_connection_pool, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "prelude_connection_pool_get_flags" "', argument " "1"" of type '" "prelude_connection_pool_t *""'"); } arg1 = (prelude_connection_pool_t *)(argp1); result = (prelude_connection_pool_flags_t)prelude_connection_pool_get_flags(arg1); ST(argvi) = SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(result)); argvi++ ; XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_prelude_connection_pool_set_flags) { { prelude_connection_pool_t *arg1 = (prelude_connection_pool_t *) 0 ; prelude_connection_pool_flags_t arg2 ; void *argp1 = 0 ; int res1 = 0 ; int val2 ; int ecode2 = 0 ; int argvi = 0; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: prelude_connection_pool_set_flags(pool,flags);"); } res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_prelude_connection_pool, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "prelude_connection_pool_set_flags" "', argument " "1"" of type '" "prelude_connection_pool_t *""'"); } arg1 = (prelude_connection_pool_t *)(argp1); ecode2 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(1), &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "prelude_connection_pool_set_flags" "', argument " "2"" of type '" "prelude_connection_pool_flags_t""'"); } arg2 = (prelude_connection_pool_flags_t)(val2); prelude_connection_pool_set_flags(arg1,arg2); ST(argvi) = sv_newmortal(); XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_prelude_connection_pool_set_required_permission) { { prelude_connection_pool_t *arg1 = (prelude_connection_pool_t *) 0 ; prelude_connection_permission_t arg2 ; void *argp1 = 0 ; int res1 = 0 ; int val2 ; int ecode2 = 0 ; int argvi = 0; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: prelude_connection_pool_set_required_permission(pool,req_perm);"); } res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_prelude_connection_pool, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "prelude_connection_pool_set_required_permission" "', argument " "1"" of type '" "prelude_connection_pool_t *""'"); } arg1 = (prelude_connection_pool_t *)(argp1); ecode2 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(1), &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "prelude_connection_pool_set_required_permission" "', argument " "2"" of type '" "prelude_connection_permission_t""'"); } arg2 = (prelude_connection_permission_t)(val2); prelude_connection_pool_set_required_permission(arg1,arg2); ST(argvi) = sv_newmortal(); XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_prelude_connection_pool_set_data) { { prelude_connection_pool_t *arg1 = (prelude_connection_pool_t *) 0 ; void *arg2 = (void *) 0 ; void *argp1 = 0 ; int res1 = 0 ; int res2 ; int argvi = 0; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: prelude_connection_pool_set_data(pool,data);"); } res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_prelude_connection_pool, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "prelude_connection_pool_set_data" "', argument " "1"" of type '" "prelude_connection_pool_t *""'"); } arg1 = (prelude_connection_pool_t *)(argp1); res2 = SWIG_ConvertPtr(ST(1),SWIG_as_voidptrptr(&arg2), 0, 0); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "prelude_connection_pool_set_data" "', argument " "2"" of type '" "void *""'"); } prelude_connection_pool_set_data(arg1,arg2); ST(argvi) = sv_newmortal(); XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_prelude_connection_pool_get_data) { { prelude_connection_pool_t *arg1 = (prelude_connection_pool_t *) 0 ; void *argp1 = 0 ; int res1 = 0 ; int argvi = 0; void *result = 0 ; dXSARGS; if ((items < 1) || (items > 1)) { SWIG_croak("Usage: prelude_connection_pool_get_data(pool);"); } res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_prelude_connection_pool, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "prelude_connection_pool_get_data" "', argument " "1"" of type '" "prelude_connection_pool_t *""'"); } arg1 = (prelude_connection_pool_t *)(argp1); result = (void *)prelude_connection_pool_get_data(arg1); ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_void, 0 | 0); argvi++ ; XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_prelude_connection_pool_recv) { { prelude_connection_pool_t *arg1 = (prelude_connection_pool_t *) 0 ; int arg2 ; prelude_connection_t **arg3 = (prelude_connection_t **) 0 ; prelude_msg_t **arg4 = (prelude_msg_t **) 0 ; void *argp1 = 0 ; int res1 = 0 ; int val2 ; int ecode2 = 0 ; prelude_connection_t *tmp3 ; prelude_msg_t *tmp4 ; int argvi = 0; SV * _saved[2] ; int result; dXSARGS; if ((items < 4) || (items > 4)) { SWIG_croak("Usage: prelude_connection_pool_recv(pool,timeout,outcon,outmsg);"); } res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_prelude_connection_pool, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "prelude_connection_pool_recv" "', argument " "1"" of type '" "prelude_connection_pool_t *""'"); } arg1 = (prelude_connection_pool_t *)(argp1); ecode2 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(1), &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "prelude_connection_pool_recv" "', argument " "2"" of type '" "int""'"); } arg2 = (int)(val2); { arg3 = (prelude_connection_t **) &tmp3; } { tmp4 = NULL; arg4 = (prelude_msg_t **) &tmp4; } _saved[0] = ST(2); _saved[1] = ST(3); result = (int)prelude_connection_pool_recv(arg1,arg2,arg3,arg4); { ST(argvi) = newSViv(result); argvi++; } { SV *sv; if ( result >= 0 ) { if ( ! SvROK(_saved[0]) ) { croak("Argument 3 is not a reference."); return; } sv = SvRV(_saved[0]); sv_setsv(sv, SWIG_NewPointerObj((void *) * arg3, SWIGTYPE_p_prelude_connection, 0)); } } { SV *sv; if ( result >= 0 ) { if ( ! SvROK(_saved[1]) ) { croak("Argument 4 is not a reference."); return; } sv = SvRV(_saved[1]); sv_setsv(sv, SWIG_NewPointerObj((void *) * arg4, SWIGTYPE_p_prelude_msg, 0)); } } XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_prelude_connection_pool_check_event) { { prelude_connection_pool_t *arg1 = (prelude_connection_pool_t *) 0 ; int arg2 ; int (*arg3)(prelude_connection_pool_t *,prelude_connection_pool_event_t,prelude_connection_t *,void *) = (int (*)(prelude_connection_pool_t *,prelude_connection_pool_event_t,prelude_connection_t *,void *)) 0 ; void *arg4 = (void *) 0 ; void *argp1 = 0 ; int res1 = 0 ; int val2 ; int ecode2 = 0 ; int res4 ; int argvi = 0; int result; dXSARGS; if ((items < 4) || (items > 4)) { SWIG_croak("Usage: prelude_connection_pool_check_event(pool,timeout,event_cb,extra);"); } res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_prelude_connection_pool, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "prelude_connection_pool_check_event" "', argument " "1"" of type '" "prelude_connection_pool_t *""'"); } arg1 = (prelude_connection_pool_t *)(argp1); ecode2 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(1), &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "prelude_connection_pool_check_event" "', argument " "2"" of type '" "int""'"); } arg2 = (int)(val2); { int res = SWIG_ConvertFunctionPtr(ST(2), (void**)(&arg3), SWIGTYPE_p_f_p_struct_prelude_connection_pool_enum_prelude_connection_pool_event_t_p_struct_prelude_connection_p_void__int); if (!SWIG_IsOK(res)) { SWIG_exception_fail(SWIG_ArgError(res), "in method '" "prelude_connection_pool_check_event" "', argument " "3"" of type '" "int (*)(prelude_connection_pool_t *,prelude_connection_pool_event_t,prelude_connection_t *,void *)""'"); } } res4 = SWIG_ConvertPtr(ST(3),SWIG_as_voidptrptr(&arg4), 0, 0); if (!SWIG_IsOK(res4)) { SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "prelude_connection_pool_check_event" "', argument " "4"" of type '" "void *""'"); } result = (int)prelude_connection_pool_check_event(arg1,arg2,arg3,arg4); { ST(argvi) = newSViv(result); argvi++; } XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_prelude_connection_pool_set_global_event_handler) { { prelude_connection_pool_t *arg1 = (prelude_connection_pool_t *) 0 ; prelude_connection_pool_event_t arg2 ; int (*arg3)(prelude_connection_pool_t *,prelude_connection_pool_event_t) = (int (*)(prelude_connection_pool_t *,prelude_connection_pool_event_t)) 0 ; void *argp1 = 0 ; int res1 = 0 ; int val2 ; int ecode2 = 0 ; int argvi = 0; dXSARGS; if ((items < 3) || (items > 3)) { SWIG_croak("Usage: prelude_connection_pool_set_global_event_handler(pool,wanted_events,callback);"); } res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_prelude_connection_pool, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "prelude_connection_pool_set_global_event_handler" "', argument " "1"" of type '" "prelude_connection_pool_t *""'"); } arg1 = (prelude_connection_pool_t *)(argp1); ecode2 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(1), &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "prelude_connection_pool_set_global_event_handler" "', argument " "2"" of type '" "prelude_connection_pool_event_t""'"); } arg2 = (prelude_connection_pool_event_t)(val2); { int res = SWIG_ConvertFunctionPtr(ST(2), (void**)(&arg3), SWIGTYPE_p_f_p_struct_prelude_connection_pool_enum_prelude_connection_pool_event_t__int); if (!SWIG_IsOK(res)) { SWIG_exception_fail(SWIG_ArgError(res), "in method '" "prelude_connection_pool_set_global_event_handler" "', argument " "3"" of type '" "int (*)(prelude_connection_pool_t *,prelude_connection_pool_event_t)""'"); } } prelude_connection_pool_set_global_event_handler(arg1,arg2,arg3); ST(argvi) = sv_newmortal(); XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_prelude_connection_pool_set_event_handler) { { prelude_connection_pool_t *arg1 = (prelude_connection_pool_t *) 0 ; prelude_connection_pool_event_t arg2 ; int (*arg3)(prelude_connection_pool_t *,prelude_connection_pool_event_t,prelude_connection_t *) = (int (*)(prelude_connection_pool_t *,prelude_connection_pool_event_t,prelude_connection_t *)) 0 ; void *argp1 = 0 ; int res1 = 0 ; int val2 ; int ecode2 = 0 ; int argvi = 0; dXSARGS; if ((items < 3) || (items > 3)) { SWIG_croak("Usage: prelude_connection_pool_set_event_handler(pool,wanted_events,callback);"); } res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_prelude_connection_pool, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "prelude_connection_pool_set_event_handler" "', argument " "1"" of type '" "prelude_connection_pool_t *""'"); } arg1 = (prelude_connection_pool_t *)(argp1); ecode2 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(1), &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "prelude_connection_pool_set_event_handler" "', argument " "2"" of type '" "prelude_connection_pool_event_t""'"); } arg2 = (prelude_connection_pool_event_t)(val2); { int res = SWIG_ConvertFunctionPtr(ST(2), (void**)(&arg3), SWIGTYPE_p_f_p_struct_prelude_connection_pool_enum_prelude_connection_pool_event_t_p_struct_prelude_connection__int); if (!SWIG_IsOK(res)) { SWIG_exception_fail(SWIG_ArgError(res), "in method '" "prelude_connection_pool_set_event_handler" "', argument " "3"" of type '" "int (*)(prelude_connection_pool_t *,prelude_connection_pool_event_t,prelude_connection_t *)""'"); } } prelude_connection_pool_set_event_handler(arg1,arg2,arg3); ST(argvi) = sv_newmortal(); XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_prelude_option_set_priority) { { prelude_option_t *arg1 = (prelude_option_t *) 0 ; prelude_option_priority_t arg2 ; void *argp1 = 0 ; int res1 = 0 ; int val2 ; int ecode2 = 0 ; int argvi = 0; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: prelude_option_set_priority(option,priority);"); } res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_prelude_option, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "prelude_option_set_priority" "', argument " "1"" of type '" "prelude_option_t *""'"); } arg1 = (prelude_option_t *)(argp1); ecode2 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(1), &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "prelude_option_set_priority" "', argument " "2"" of type '" "prelude_option_priority_t""'"); } arg2 = (prelude_option_priority_t)(val2); prelude_option_set_priority(arg1,arg2); ST(argvi) = sv_newmortal(); XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_prelude_option_print) { { prelude_option_t *arg1 = (prelude_option_t *) 0 ; prelude_option_type_t arg2 ; int arg3 ; FILE *arg4 = (FILE *) 0 ; void *argp1 = 0 ; int res1 = 0 ; int val2 ; int ecode2 = 0 ; int val3 ; int ecode3 = 0 ; void *argp4 = 0 ; int res4 = 0 ; int argvi = 0; dXSARGS; if ((items < 4) || (items > 4)) { SWIG_croak("Usage: prelude_option_print(opt,type,descoff,fd);"); } res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_prelude_option, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "prelude_option_print" "', argument " "1"" of type '" "prelude_option_t *""'"); } arg1 = (prelude_option_t *)(argp1); ecode2 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(1), &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "prelude_option_print" "', argument " "2"" of type '" "prelude_option_type_t""'"); } arg2 = (prelude_option_type_t)(val2); ecode3 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(2), &val3); if (!SWIG_IsOK(ecode3)) { SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "prelude_option_print" "', argument " "3"" of type '" "int""'"); } arg3 = (int)(val3); res4 = SWIG_ConvertPtr(ST(3), &argp4,SWIGTYPE_p_FILE, 0 | 0 ); if (!SWIG_IsOK(res4)) { SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "prelude_option_print" "', argument " "4"" of type '" "FILE *""'"); } arg4 = (FILE *)(argp4); prelude_option_print(arg1,arg2,arg3,arg4); ST(argvi) = sv_newmortal(); XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_prelude_option_wide_send_msg) { { prelude_msgbuf_t *arg1 = (prelude_msgbuf_t *) 0 ; void *arg2 = (void *) 0 ; int res2 ; int argvi = 0; int result; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: prelude_option_wide_send_msg(msgbuf,context);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_prelude_msgbuf, 0) ) { croak("Expected type prelude_msgbuf_t * for argument 1."); return; } } res2 = SWIG_ConvertPtr(ST(1),SWIG_as_voidptrptr(&arg2), 0, 0); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "prelude_option_wide_send_msg" "', argument " "2"" of type '" "void *""'"); } result = (int)prelude_option_wide_send_msg(arg1,arg2); { ST(argvi) = newSViv(result); argvi++; } XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_prelude_option_destroy) { { prelude_option_t *arg1 = (prelude_option_t *) 0 ; void *argp1 = 0 ; int res1 = 0 ; int argvi = 0; dXSARGS; if ((items < 1) || (items > 1)) { SWIG_croak("Usage: prelude_option_destroy(option);"); } res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_prelude_option, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "prelude_option_destroy" "', argument " "1"" of type '" "prelude_option_t *""'"); } arg1 = (prelude_option_t *)(argp1); prelude_option_destroy(arg1); ST(argvi) = sv_newmortal(); XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_prelude_option_read) { { prelude_option_t *arg1 = (prelude_option_t *) 0 ; char **arg2 = (char **) 0 ; int *arg3 = (int *) 0 ; char **arg4 = (char **) 0 ; prelude_string_t **arg5 = (prelude_string_t **) 0 ; void *arg6 = (void *) 0 ; void *argp1 = 0 ; int res1 = 0 ; void *argp2 = 0 ; int res2 = 0 ; int tmp3 ; void *argp5 = 0 ; int res5 = 0 ; int res6 ; int argvi = 0; int result; dXSARGS; if ((items < 6) || (items > 6)) { SWIG_croak("Usage: prelude_option_read(option,filename,argc,argv,err,context);"); } res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_prelude_option, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "prelude_option_read" "', argument " "1"" of type '" "prelude_option_t *""'"); } arg1 = (prelude_option_t *)(argp1); res2 = SWIG_ConvertPtr(ST(1), &argp2,SWIGTYPE_p_p_char, 0 | 0 ); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "prelude_option_read" "', argument " "2"" of type '" "char const **""'"); } arg2 = (char **)(argp2); { tmp3 = SvIV(ST(2)); arg3 = &tmp3; } { AV *tempav; I32 len; int i; SV **tv; if ( ! SvROK(ST(3)) ) croak("Argument 4 is not a reference."); if ( SvTYPE(SvRV(ST(3))) != SVt_PVAV ) croak("Argument 4 is not an array."); tempav = (AV*) SvRV(ST(3)); len = av_len(tempav); arg4 = (char **) malloc((len+2)*sizeof(char *)); if ( ! arg4 ) croak("out of memory\n"); for (i = 0; i <= len; i++) { tv = av_fetch(tempav, i, 0); SvREFCNT_inc(*tv); arg4[i] = (char *) SvPV_nolen(*tv); } arg4[i] = NULL; } res5 = SWIG_ConvertPtr(ST(4), &argp5,SWIGTYPE_p_p_prelude_string_t, 0 | 0 ); if (!SWIG_IsOK(res5)) { SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "prelude_option_read" "', argument " "5"" of type '" "prelude_string_t **""'"); } arg5 = (prelude_string_t **)(argp5); res6 = SWIG_ConvertPtr(ST(5),SWIG_as_voidptrptr(&arg6), 0, 0); if (!SWIG_IsOK(res6)) { SWIG_exception_fail(SWIG_ArgError(res6), "in method '" "prelude_option_read" "', argument " "6"" of type '" "void *""'"); } result = (int)prelude_option_read(arg1,(char const **)arg2,arg3,arg4,arg5,arg6); { ST(argvi) = newSViv(result); argvi++; } { free(arg4); } XSRETURN(argvi); fail: { free(arg4); } SWIG_croak_null(); } } XS(_wrap_prelude_option_add) { { prelude_option_t *arg1 = (prelude_option_t *) 0 ; prelude_option_t **arg2 = (prelude_option_t **) 0 ; prelude_option_type_t arg3 ; char arg4 ; char *arg5 = (char *) 0 ; char *arg6 = (char *) 0 ; prelude_option_argument_t arg7 ; int (*arg8)(prelude_option_t *,char const *,prelude_string_t *,void *) = (int (*)(prelude_option_t *,char const *,prelude_string_t *,void *)) 0 ; int (*arg9)(prelude_option_t *,prelude_string_t *,void *) = (int (*)(prelude_option_t *,prelude_string_t *,void *)) 0 ; void *argp1 = 0 ; int res1 = 0 ; void *argp2 = 0 ; int res2 = 0 ; int val3 ; int ecode3 = 0 ; char val4 ; int ecode4 = 0 ; int res5 ; char *buf5 = 0 ; int alloc5 = 0 ; int res6 ; char *buf6 = 0 ; int alloc6 = 0 ; int val7 ; int ecode7 = 0 ; int argvi = 0; int result; dXSARGS; if ((items < 9) || (items > 9)) { SWIG_croak("Usage: prelude_option_add(parent,retopt,type,shortopt,longopt,desc,has_arg,set,get);"); } res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_prelude_option, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "prelude_option_add" "', argument " "1"" of type '" "prelude_option_t *""'"); } arg1 = (prelude_option_t *)(argp1); res2 = SWIG_ConvertPtr(ST(1), &argp2,SWIGTYPE_p_p_prelude_option, 0 | 0 ); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "prelude_option_add" "', argument " "2"" of type '" "prelude_option_t **""'"); } arg2 = (prelude_option_t **)(argp2); ecode3 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(2), &val3); if (!SWIG_IsOK(ecode3)) { SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "prelude_option_add" "', argument " "3"" of type '" "prelude_option_type_t""'"); } arg3 = (prelude_option_type_t)(val3); ecode4 = SWIG_AsVal_char SWIG_PERL_CALL_ARGS_2(ST(3), &val4); if (!SWIG_IsOK(ecode4)) { SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "prelude_option_add" "', argument " "4"" of type '" "char""'"); } arg4 = (char)(val4); res5 = SWIG_AsCharPtrAndSize(ST(4), &buf5, NULL, &alloc5); if (!SWIG_IsOK(res5)) { SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "prelude_option_add" "', argument " "5"" of type '" "char const *""'"); } arg5 = (char *)(buf5); res6 = SWIG_AsCharPtrAndSize(ST(5), &buf6, NULL, &alloc6); if (!SWIG_IsOK(res6)) { SWIG_exception_fail(SWIG_ArgError(res6), "in method '" "prelude_option_add" "', argument " "6"" of type '" "char const *""'"); } arg6 = (char *)(buf6); ecode7 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(6), &val7); if (!SWIG_IsOK(ecode7)) { SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "prelude_option_add" "', argument " "7"" of type '" "prelude_option_argument_t""'"); } arg7 = (prelude_option_argument_t)(val7); { int res = SWIG_ConvertFunctionPtr(ST(7), (void**)(&arg8), SWIGTYPE_p_f_p_struct_prelude_option_p_q_const__char_p_prelude_string_t_p_void__int); if (!SWIG_IsOK(res)) { SWIG_exception_fail(SWIG_ArgError(res), "in method '" "prelude_option_add" "', argument " "8"" of type '" "int (*)(prelude_option_t *,char const *,prelude_string_t *,void *)""'"); } } { int res = SWIG_ConvertFunctionPtr(ST(8), (void**)(&arg9), SWIGTYPE_p_f_p_struct_prelude_option_p_prelude_string_t_p_void__int); if (!SWIG_IsOK(res)) { SWIG_exception_fail(SWIG_ArgError(res), "in method '" "prelude_option_add" "', argument " "9"" of type '" "int (*)(prelude_option_t *,prelude_string_t *,void *)""'"); } } result = (int)prelude_option_add(arg1,arg2,arg3,arg4,(char const *)arg5,(char const *)arg6,arg7,arg8,arg9); { ST(argvi) = newSViv(result); argvi++; } if (alloc5 == SWIG_NEWOBJ) free((char*)buf5); if (alloc6 == SWIG_NEWOBJ) free((char*)buf6); XSRETURN(argvi); fail: if (alloc5 == SWIG_NEWOBJ) free((char*)buf5); if (alloc6 == SWIG_NEWOBJ) free((char*)buf6); SWIG_croak_null(); } } XS(_wrap_prelude_option_set_type) { { prelude_option_t *arg1 = (prelude_option_t *) 0 ; prelude_option_type_t arg2 ; void *argp1 = 0 ; int res1 = 0 ; int val2 ; int ecode2 = 0 ; int argvi = 0; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: prelude_option_set_type(opt,type);"); } res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_prelude_option, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "prelude_option_set_type" "', argument " "1"" of type '" "prelude_option_t *""'"); } arg1 = (prelude_option_t *)(argp1); ecode2 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(1), &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "prelude_option_set_type" "', argument " "2"" of type '" "prelude_option_type_t""'"); } arg2 = (prelude_option_type_t)(val2); prelude_option_set_type(arg1,arg2); ST(argvi) = sv_newmortal(); XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_prelude_option_get_type) { { prelude_option_t *arg1 = (prelude_option_t *) 0 ; void *argp1 = 0 ; int res1 = 0 ; int argvi = 0; prelude_option_type_t result; dXSARGS; if ((items < 1) || (items > 1)) { SWIG_croak("Usage: prelude_option_get_type(opt);"); } res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_prelude_option, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "prelude_option_get_type" "', argument " "1"" of type '" "prelude_option_t *""'"); } arg1 = (prelude_option_t *)(argp1); result = (prelude_option_type_t)prelude_option_get_type(arg1); ST(argvi) = SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(result)); argvi++ ; XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_prelude_option_set_warnings) { { prelude_option_warning_t arg1 ; prelude_option_warning_t *arg2 = (prelude_option_warning_t *) 0 ; int val1 ; int ecode1 = 0 ; void *argp2 = 0 ; int res2 = 0 ; int argvi = 0; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: prelude_option_set_warnings(new_warnings,old_warnings);"); } ecode1 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(0), &val1); if (!SWIG_IsOK(ecode1)) { SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "prelude_option_set_warnings" "', argument " "1"" of type '" "prelude_option_warning_t""'"); } arg1 = (prelude_option_warning_t)(val1); res2 = SWIG_ConvertPtr(ST(1), &argp2,SWIGTYPE_p_prelude_option_warning_t, 0 | 0 ); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "prelude_option_set_warnings" "', argument " "2"" of type '" "prelude_option_warning_t *""'"); } arg2 = (prelude_option_warning_t *)(argp2); prelude_option_set_warnings(arg1,arg2); ST(argvi) = sv_newmortal(); XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_prelude_option_get_shortname) { { prelude_option_t *arg1 = (prelude_option_t *) 0 ; void *argp1 = 0 ; int res1 = 0 ; int argvi = 0; char result; dXSARGS; if ((items < 1) || (items > 1)) { SWIG_croak("Usage: prelude_option_get_shortname(opt);"); } res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_prelude_option, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "prelude_option_get_shortname" "', argument " "1"" of type '" "prelude_option_t *""'"); } arg1 = (prelude_option_t *)(argp1); result = (char)prelude_option_get_shortname(arg1); ST(argvi) = SWIG_From_char SWIG_PERL_CALL_ARGS_1((char)(result)); argvi++ ; XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_prelude_option_get_longname) { { prelude_option_t *arg1 = (prelude_option_t *) 0 ; void *argp1 = 0 ; int res1 = 0 ; int argvi = 0; char *result = 0 ; dXSARGS; if ((items < 1) || (items > 1)) { SWIG_croak("Usage: prelude_option_get_longname(opt);"); } res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_prelude_option, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "prelude_option_get_longname" "', argument " "1"" of type '" "prelude_option_t *""'"); } arg1 = (prelude_option_t *)(argp1); result = (char *)prelude_option_get_longname(arg1); ST(argvi) = SWIG_FromCharPtr((const char *)result); argvi++ ; XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap__prelude_option_set_private_data) { { prelude_option_t *arg1 = (prelude_option_t *) 0 ; void *arg2 = (void *) 0 ; void *argp1 = 0 ; int res1 = 0 ; int res2 ; int argvi = 0; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: _prelude_option_set_private_data(opt,data);"); } res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_prelude_option, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "_prelude_option_set_private_data" "', argument " "1"" of type '" "prelude_option_t *""'"); } arg1 = (prelude_option_t *)(argp1); res2 = SWIG_ConvertPtr(ST(1),SWIG_as_voidptrptr(&arg2), 0, 0); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "_prelude_option_set_private_data" "', argument " "2"" of type '" "void *""'"); } _prelude_option_set_private_data(arg1,arg2); ST(argvi) = sv_newmortal(); XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap__prelude_option_get_private_data) { { prelude_option_t *arg1 = (prelude_option_t *) 0 ; void *argp1 = 0 ; int res1 = 0 ; int argvi = 0; void *result = 0 ; dXSARGS; if ((items < 1) || (items > 1)) { SWIG_croak("Usage: _prelude_option_get_private_data(opt);"); } res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_prelude_option, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "_prelude_option_get_private_data" "', argument " "1"" of type '" "prelude_option_t *""'"); } arg1 = (prelude_option_t *)(argp1); result = (void *)_prelude_option_get_private_data(arg1); ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_void, 0 | 0); argvi++ ; XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_prelude_option_set_data) { { prelude_option_t *arg1 = (prelude_option_t *) 0 ; void *arg2 = (void *) 0 ; void *argp1 = 0 ; int res1 = 0 ; int res2 ; int argvi = 0; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: prelude_option_set_data(opt,data);"); } res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_prelude_option, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "prelude_option_set_data" "', argument " "1"" of type '" "prelude_option_t *""'"); } arg1 = (prelude_option_t *)(argp1); res2 = SWIG_ConvertPtr(ST(1),SWIG_as_voidptrptr(&arg2), 0, 0); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "prelude_option_set_data" "', argument " "2"" of type '" "void *""'"); } prelude_option_set_data(arg1,arg2); ST(argvi) = sv_newmortal(); XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_prelude_option_get_data) { { prelude_option_t *arg1 = (prelude_option_t *) 0 ; void *argp1 = 0 ; int res1 = 0 ; int argvi = 0; void *result = 0 ; dXSARGS; if ((items < 1) || (items > 1)) { SWIG_croak("Usage: prelude_option_get_data(opt);"); } res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_prelude_option, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "prelude_option_get_data" "', argument " "1"" of type '" "prelude_option_t *""'"); } arg1 = (prelude_option_t *)(argp1); result = (void *)prelude_option_get_data(arg1); ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_void, 0 | 0); argvi++ ; XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_prelude_option_invoke_commit) { { prelude_option_t *arg1 = (prelude_option_t *) 0 ; char *arg2 = (char *) 0 ; prelude_string_t *arg3 = (prelude_string_t *) 0 ; void *arg4 = (void *) 0 ; void *argp1 = 0 ; int res1 = 0 ; int res2 ; char *buf2 = 0 ; int alloc2 = 0 ; int res4 ; int argvi = 0; int result; dXSARGS; if ((items < 4) || (items > 4)) { SWIG_croak("Usage: prelude_option_invoke_commit(opt,ctname,value,context);"); } res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_prelude_option, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "prelude_option_invoke_commit" "', argument " "1"" of type '" "prelude_option_t *""'"); } arg1 = (prelude_option_t *)(argp1); res2 = SWIG_AsCharPtrAndSize(ST(1), &buf2, NULL, &alloc2); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "prelude_option_invoke_commit" "', argument " "2"" of type '" "char const *""'"); } arg2 = (char *)(buf2); { int ret; char *str; STRLEN len; str = SvPV(ST(2), len); ret = prelude_string_new_dup_fast(&(arg3), str, len); if ( ret < 0 ) { swig_perl_raise_error(ret); return; } } res4 = SWIG_ConvertPtr(ST(3),SWIG_as_voidptrptr(&arg4), 0, 0); if (!SWIG_IsOK(res4)) { SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "prelude_option_invoke_commit" "', argument " "4"" of type '" "void *""'"); } result = (int)prelude_option_invoke_commit(arg1,(char const *)arg2,arg3,arg4); { ST(argvi) = newSViv(result); argvi++; } if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); XSRETURN(argvi); fail: if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); SWIG_croak_null(); } } XS(_wrap_prelude_option_invoke_set) { { prelude_option_t *arg1 = (prelude_option_t *) 0 ; char *arg2 = (char *) 0 ; prelude_string_t *arg3 = (prelude_string_t *) 0 ; void **arg4 = (void **) 0 ; void *argp1 = 0 ; int res1 = 0 ; int res2 ; char *buf2 = 0 ; int alloc2 = 0 ; void *argp4 = 0 ; int res4 = 0 ; int argvi = 0; int result; dXSARGS; if ((items < 4) || (items > 4)) { SWIG_croak("Usage: prelude_option_invoke_set(opt,ctname,value,context);"); } res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_prelude_option, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "prelude_option_invoke_set" "', argument " "1"" of type '" "prelude_option_t *""'"); } arg1 = (prelude_option_t *)(argp1); res2 = SWIG_AsCharPtrAndSize(ST(1), &buf2, NULL, &alloc2); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "prelude_option_invoke_set" "', argument " "2"" of type '" "char const *""'"); } arg2 = (char *)(buf2); { int ret; char *str; STRLEN len; str = SvPV(ST(2), len); ret = prelude_string_new_dup_fast(&(arg3), str, len); if ( ret < 0 ) { swig_perl_raise_error(ret); return; } } res4 = SWIG_ConvertPtr(ST(3), &argp4,SWIGTYPE_p_p_void, 0 | 0 ); if (!SWIG_IsOK(res4)) { SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "prelude_option_invoke_set" "', argument " "4"" of type '" "void **""'"); } arg4 = (void **)(argp4); result = (int)prelude_option_invoke_set(arg1,(char const *)arg2,arg3,arg4); { ST(argvi) = newSViv(result); argvi++; } if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); XSRETURN(argvi); fail: if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); SWIG_croak_null(); } } XS(_wrap_prelude_option_invoke_get) { { prelude_option_t *arg1 = (prelude_option_t *) 0 ; char *arg2 = (char *) 0 ; prelude_string_t *arg3 = (prelude_string_t *) 0 ; void *arg4 = (void *) 0 ; void *argp1 = 0 ; int res1 = 0 ; int res2 ; char *buf2 = 0 ; int alloc2 = 0 ; int res4 ; int argvi = 0; int result; dXSARGS; if ((items < 4) || (items > 4)) { SWIG_croak("Usage: prelude_option_invoke_get(opt,ctname,value,context);"); } res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_prelude_option, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "prelude_option_invoke_get" "', argument " "1"" of type '" "prelude_option_t *""'"); } arg1 = (prelude_option_t *)(argp1); res2 = SWIG_AsCharPtrAndSize(ST(1), &buf2, NULL, &alloc2); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "prelude_option_invoke_get" "', argument " "2"" of type '" "char const *""'"); } arg2 = (char *)(buf2); { int ret; char *str; STRLEN len; str = SvPV(ST(2), len); ret = prelude_string_new_dup_fast(&(arg3), str, len); if ( ret < 0 ) { swig_perl_raise_error(ret); return; } } res4 = SWIG_ConvertPtr(ST(3),SWIG_as_voidptrptr(&arg4), 0, 0); if (!SWIG_IsOK(res4)) { SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "prelude_option_invoke_get" "', argument " "4"" of type '" "void *""'"); } result = (int)prelude_option_invoke_get(arg1,(char const *)arg2,arg3,arg4); { ST(argvi) = newSViv(result); argvi++; } if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); XSRETURN(argvi); fail: if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); SWIG_croak_null(); } } XS(_wrap_prelude_option_invoke_destroy) { { prelude_option_t *arg1 = (prelude_option_t *) 0 ; char *arg2 = (char *) 0 ; prelude_string_t *arg3 = (prelude_string_t *) 0 ; void *arg4 = (void *) 0 ; void *argp1 = 0 ; int res1 = 0 ; int res2 ; char *buf2 = 0 ; int alloc2 = 0 ; int res4 ; int argvi = 0; int result; dXSARGS; if ((items < 4) || (items > 4)) { SWIG_croak("Usage: prelude_option_invoke_destroy(opt,ctname,value,context);"); } res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_prelude_option, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "prelude_option_invoke_destroy" "', argument " "1"" of type '" "prelude_option_t *""'"); } arg1 = (prelude_option_t *)(argp1); res2 = SWIG_AsCharPtrAndSize(ST(1), &buf2, NULL, &alloc2); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "prelude_option_invoke_destroy" "', argument " "2"" of type '" "char const *""'"); } arg2 = (char *)(buf2); { int ret; char *str; STRLEN len; str = SvPV(ST(2), len); ret = prelude_string_new_dup_fast(&(arg3), str, len); if ( ret < 0 ) { swig_perl_raise_error(ret); return; } } res4 = SWIG_ConvertPtr(ST(3),SWIG_as_voidptrptr(&arg4), 0, 0); if (!SWIG_IsOK(res4)) { SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "prelude_option_invoke_destroy" "', argument " "4"" of type '" "void *""'"); } result = (int)prelude_option_invoke_destroy(arg1,(char const *)arg2,arg3,arg4); { ST(argvi) = newSViv(result); argvi++; } if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); XSRETURN(argvi); fail: if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); SWIG_croak_null(); } } XS(_wrap_prelude_option_new_root) { { prelude_option_t **arg1 = (prelude_option_t **) 0 ; void *argp1 = 0 ; int res1 = 0 ; int argvi = 0; int result; dXSARGS; if ((items < 1) || (items > 1)) { SWIG_croak("Usage: prelude_option_new_root(retopt);"); } res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_p_prelude_option, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "prelude_option_new_root" "', argument " "1"" of type '" "prelude_option_t **""'"); } arg1 = (prelude_option_t **)(argp1); result = (int)prelude_option_new_root(arg1); { ST(argvi) = newSViv(result); argvi++; } XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_prelude_option_new) { { prelude_option_t *arg1 = (prelude_option_t *) 0 ; prelude_option_t **arg2 = (prelude_option_t **) 0 ; void *argp1 = 0 ; int res1 = 0 ; void *argp2 = 0 ; int res2 = 0 ; int argvi = 0; int result; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: prelude_option_new(parent,retopt);"); } res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_prelude_option, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "prelude_option_new" "', argument " "1"" of type '" "prelude_option_t *""'"); } arg1 = (prelude_option_t *)(argp1); res2 = SWIG_ConvertPtr(ST(1), &argp2,SWIGTYPE_p_p_prelude_option, 0 | 0 ); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "prelude_option_new" "', argument " "2"" of type '" "prelude_option_t **""'"); } arg2 = (prelude_option_t **)(argp2); result = (int)prelude_option_new(arg1,arg2); { ST(argvi) = newSViv(result); argvi++; } XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_prelude_option_set_longopt) { { prelude_option_t *arg1 = (prelude_option_t *) 0 ; char *arg2 = (char *) 0 ; void *argp1 = 0 ; int res1 = 0 ; int res2 ; char *buf2 = 0 ; int alloc2 = 0 ; int argvi = 0; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: prelude_option_set_longopt(opt,longopt);"); } res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_prelude_option, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "prelude_option_set_longopt" "', argument " "1"" of type '" "prelude_option_t *""'"); } arg1 = (prelude_option_t *)(argp1); res2 = SWIG_AsCharPtrAndSize(ST(1), &buf2, NULL, &alloc2); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "prelude_option_set_longopt" "', argument " "2"" of type '" "char const *""'"); } arg2 = (char *)(buf2); prelude_option_set_longopt(arg1,(char const *)arg2); ST(argvi) = sv_newmortal(); if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); XSRETURN(argvi); fail: if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); SWIG_croak_null(); } } XS(_wrap_prelude_option_get_longopt) { { prelude_option_t *arg1 = (prelude_option_t *) 0 ; void *argp1 = 0 ; int res1 = 0 ; int argvi = 0; char *result = 0 ; dXSARGS; if ((items < 1) || (items > 1)) { SWIG_croak("Usage: prelude_option_get_longopt(opt);"); } res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_prelude_option, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "prelude_option_get_longopt" "', argument " "1"" of type '" "prelude_option_t *""'"); } arg1 = (prelude_option_t *)(argp1); result = (char *)prelude_option_get_longopt(arg1); ST(argvi) = SWIG_FromCharPtr((const char *)result); argvi++ ; XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_prelude_option_set_description) { { prelude_option_t *arg1 = (prelude_option_t *) 0 ; char *arg2 = (char *) 0 ; void *argp1 = 0 ; int res1 = 0 ; int res2 ; char *buf2 = 0 ; int alloc2 = 0 ; int argvi = 0; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: prelude_option_set_description(opt,description);"); } res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_prelude_option, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "prelude_option_set_description" "', argument " "1"" of type '" "prelude_option_t *""'"); } arg1 = (prelude_option_t *)(argp1); res2 = SWIG_AsCharPtrAndSize(ST(1), &buf2, NULL, &alloc2); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "prelude_option_set_description" "', argument " "2"" of type '" "char const *""'"); } arg2 = (char *)(buf2); prelude_option_set_description(arg1,(char const *)arg2); ST(argvi) = sv_newmortal(); if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); XSRETURN(argvi); fail: if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); SWIG_croak_null(); } } XS(_wrap_prelude_option_get_description) { { prelude_option_t *arg1 = (prelude_option_t *) 0 ; void *argp1 = 0 ; int res1 = 0 ; int argvi = 0; char *result = 0 ; dXSARGS; if ((items < 1) || (items > 1)) { SWIG_croak("Usage: prelude_option_get_description(opt);"); } res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_prelude_option, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "prelude_option_get_description" "', argument " "1"" of type '" "prelude_option_t *""'"); } arg1 = (prelude_option_t *)(argp1); result = (char *)prelude_option_get_description(arg1); ST(argvi) = SWIG_FromCharPtr((const char *)result); argvi++ ; XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_prelude_option_set_has_arg) { { prelude_option_t *arg1 = (prelude_option_t *) 0 ; prelude_option_argument_t arg2 ; void *argp1 = 0 ; int res1 = 0 ; int val2 ; int ecode2 = 0 ; int argvi = 0; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: prelude_option_set_has_arg(opt,has_arg);"); } res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_prelude_option, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "prelude_option_set_has_arg" "', argument " "1"" of type '" "prelude_option_t *""'"); } arg1 = (prelude_option_t *)(argp1); ecode2 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(1), &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "prelude_option_set_has_arg" "', argument " "2"" of type '" "prelude_option_argument_t""'"); } arg2 = (prelude_option_argument_t)(val2); prelude_option_set_has_arg(arg1,arg2); ST(argvi) = sv_newmortal(); XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_prelude_option_get_has_arg) { { prelude_option_t *arg1 = (prelude_option_t *) 0 ; void *argp1 = 0 ; int res1 = 0 ; int argvi = 0; prelude_option_argument_t result; dXSARGS; if ((items < 1) || (items > 1)) { SWIG_croak("Usage: prelude_option_get_has_arg(opt);"); } res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_prelude_option, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "prelude_option_get_has_arg" "', argument " "1"" of type '" "prelude_option_t *""'"); } arg1 = (prelude_option_t *)(argp1); result = (prelude_option_argument_t)prelude_option_get_has_arg(arg1); ST(argvi) = SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(result)); argvi++ ; XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_prelude_option_set_value) { { prelude_option_t *arg1 = (prelude_option_t *) 0 ; char *arg2 = (char *) 0 ; void *argp1 = 0 ; int res1 = 0 ; int res2 ; char *buf2 = 0 ; int alloc2 = 0 ; int argvi = 0; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: prelude_option_set_value(opt,value);"); } res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_prelude_option, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "prelude_option_set_value" "', argument " "1"" of type '" "prelude_option_t *""'"); } arg1 = (prelude_option_t *)(argp1); res2 = SWIG_AsCharPtrAndSize(ST(1), &buf2, NULL, &alloc2); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "prelude_option_set_value" "', argument " "2"" of type '" "char const *""'"); } arg2 = (char *)(buf2); prelude_option_set_value(arg1,(char const *)arg2); ST(argvi) = sv_newmortal(); if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); XSRETURN(argvi); fail: if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); SWIG_croak_null(); } } XS(_wrap_prelude_option_get_value) { { prelude_option_t *arg1 = (prelude_option_t *) 0 ; void *argp1 = 0 ; int res1 = 0 ; int argvi = 0; char *result = 0 ; dXSARGS; if ((items < 1) || (items > 1)) { SWIG_croak("Usage: prelude_option_get_value(opt);"); } res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_prelude_option, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "prelude_option_get_value" "', argument " "1"" of type '" "prelude_option_t *""'"); } arg1 = (prelude_option_t *)(argp1); result = (char *)prelude_option_get_value(arg1); ST(argvi) = SWIG_FromCharPtr((const char *)result); argvi++ ; XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_prelude_option_set_help) { { prelude_option_t *arg1 = (prelude_option_t *) 0 ; char *arg2 = (char *) 0 ; void *argp1 = 0 ; int res1 = 0 ; int res2 ; char *buf2 = 0 ; int alloc2 = 0 ; int argvi = 0; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: prelude_option_set_help(opt,help);"); } res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_prelude_option, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "prelude_option_set_help" "', argument " "1"" of type '" "prelude_option_t *""'"); } arg1 = (prelude_option_t *)(argp1); res2 = SWIG_AsCharPtrAndSize(ST(1), &buf2, NULL, &alloc2); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "prelude_option_set_help" "', argument " "2"" of type '" "char const *""'"); } arg2 = (char *)(buf2); prelude_option_set_help(arg1,(char const *)arg2); ST(argvi) = sv_newmortal(); if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); XSRETURN(argvi); fail: if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); SWIG_croak_null(); } } XS(_wrap_prelude_option_get_help) { { prelude_option_t *arg1 = (prelude_option_t *) 0 ; void *argp1 = 0 ; int res1 = 0 ; int argvi = 0; char *result = 0 ; dXSARGS; if ((items < 1) || (items > 1)) { SWIG_croak("Usage: prelude_option_get_help(opt);"); } res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_prelude_option, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "prelude_option_get_help" "', argument " "1"" of type '" "prelude_option_t *""'"); } arg1 = (prelude_option_t *)(argp1); result = (char *)prelude_option_get_help(arg1); ST(argvi) = SWIG_FromCharPtr((const char *)result); argvi++ ; XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_prelude_option_set_input_validation_regex) { { prelude_option_t *arg1 = (prelude_option_t *) 0 ; char *arg2 = (char *) 0 ; void *argp1 = 0 ; int res1 = 0 ; int res2 ; char *buf2 = 0 ; int alloc2 = 0 ; int argvi = 0; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: prelude_option_set_input_validation_regex(opt,regex);"); } res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_prelude_option, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "prelude_option_set_input_validation_regex" "', argument " "1"" of type '" "prelude_option_t *""'"); } arg1 = (prelude_option_t *)(argp1); res2 = SWIG_AsCharPtrAndSize(ST(1), &buf2, NULL, &alloc2); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "prelude_option_set_input_validation_regex" "', argument " "2"" of type '" "char const *""'"); } arg2 = (char *)(buf2); prelude_option_set_input_validation_regex(arg1,(char const *)arg2); ST(argvi) = sv_newmortal(); if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); XSRETURN(argvi); fail: if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); SWIG_croak_null(); } } XS(_wrap_prelude_option_get_input_validation_regex) { { prelude_option_t *arg1 = (prelude_option_t *) 0 ; void *argp1 = 0 ; int res1 = 0 ; int argvi = 0; char *result = 0 ; dXSARGS; if ((items < 1) || (items > 1)) { SWIG_croak("Usage: prelude_option_get_input_validation_regex(opt);"); } res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_prelude_option, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "prelude_option_get_input_validation_regex" "', argument " "1"" of type '" "prelude_option_t *""'"); } arg1 = (prelude_option_t *)(argp1); result = (char *)prelude_option_get_input_validation_regex(arg1); ST(argvi) = SWIG_FromCharPtr((const char *)result); argvi++ ; XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_prelude_option_set_input_type) { { prelude_option_t *arg1 = (prelude_option_t *) 0 ; prelude_option_input_type_t arg2 ; void *argp1 = 0 ; int res1 = 0 ; int val2 ; int ecode2 = 0 ; int argvi = 0; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: prelude_option_set_input_type(opt,input_type);"); } res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_prelude_option, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "prelude_option_set_input_type" "', argument " "1"" of type '" "prelude_option_t *""'"); } arg1 = (prelude_option_t *)(argp1); ecode2 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(1), &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "prelude_option_set_input_type" "', argument " "2"" of type '" "prelude_option_input_type_t""'"); } arg2 = (prelude_option_input_type_t)(val2); prelude_option_set_input_type(arg1,arg2); ST(argvi) = sv_newmortal(); XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_prelude_option_get_input_type) { { prelude_option_t *arg1 = (prelude_option_t *) 0 ; void *argp1 = 0 ; int res1 = 0 ; int argvi = 0; prelude_option_input_type_t result; dXSARGS; if ((items < 1) || (items > 1)) { SWIG_croak("Usage: prelude_option_get_input_type(opt);"); } res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_prelude_option, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "prelude_option_get_input_type" "', argument " "1"" of type '" "prelude_option_t *""'"); } arg1 = (prelude_option_t *)(argp1); result = (prelude_option_input_type_t)prelude_option_get_input_type(arg1); ST(argvi) = SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(result)); argvi++ ; XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_prelude_option_get_optlist) { { prelude_option_t *arg1 = (prelude_option_t *) 0 ; void *argp1 = 0 ; int res1 = 0 ; int argvi = 0; prelude_list_t *result = 0 ; dXSARGS; if ((items < 1) || (items > 1)) { SWIG_croak("Usage: prelude_option_get_optlist(opt);"); } res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_prelude_option, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "prelude_option_get_optlist" "', argument " "1"" of type '" "prelude_option_t *""'"); } arg1 = (prelude_option_t *)(argp1); result = (prelude_list_t *)prelude_option_get_optlist(arg1); ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_prelude_list_t, 0 | 0); argvi++ ; XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_prelude_option_get_next) { { prelude_option_t *arg1 = (prelude_option_t *) 0 ; prelude_option_t *arg2 = (prelude_option_t *) 0 ; void *argp1 = 0 ; int res1 = 0 ; void *argp2 = 0 ; int res2 = 0 ; int argvi = 0; prelude_option_t *result = 0 ; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: prelude_option_get_next(start,cur);"); } res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_prelude_option, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "prelude_option_get_next" "', argument " "1"" of type '" "prelude_option_t *""'"); } arg1 = (prelude_option_t *)(argp1); res2 = SWIG_ConvertPtr(ST(1), &argp2,SWIGTYPE_p_prelude_option, 0 | 0 ); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "prelude_option_get_next" "', argument " "2"" of type '" "prelude_option_t *""'"); } arg2 = (prelude_option_t *)(argp2); result = (prelude_option_t *)prelude_option_get_next(arg1,arg2); ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_prelude_option, 0 | 0); argvi++ ; XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_prelude_option_has_optlist) { { prelude_option_t *arg1 = (prelude_option_t *) 0 ; void *argp1 = 0 ; int res1 = 0 ; int argvi = 0; prelude_bool_t result; dXSARGS; if ((items < 1) || (items > 1)) { SWIG_croak("Usage: prelude_option_has_optlist(opt);"); } res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_prelude_option, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "prelude_option_has_optlist" "', argument " "1"" of type '" "prelude_option_t *""'"); } arg1 = (prelude_option_t *)(argp1); result = (prelude_bool_t)prelude_option_has_optlist(arg1); ST(argvi) = SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(result)); argvi++ ; XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_prelude_option_get_parent) { { prelude_option_t *arg1 = (prelude_option_t *) 0 ; void *argp1 = 0 ; int res1 = 0 ; int argvi = 0; prelude_option_t *result = 0 ; dXSARGS; if ((items < 1) || (items > 1)) { SWIG_croak("Usage: prelude_option_get_parent(opt);"); } res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_prelude_option, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "prelude_option_get_parent" "', argument " "1"" of type '" "prelude_option_t *""'"); } arg1 = (prelude_option_t *)(argp1); result = (prelude_option_t *)prelude_option_get_parent(arg1); ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_prelude_option, 0 | 0); argvi++ ; XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_prelude_option_set_destroy_callback) { { prelude_option_t *arg1 = (prelude_option_t *) 0 ; prelude_option_destroy_callback_t arg2 = (prelude_option_destroy_callback_t) 0 ; void *argp1 = 0 ; int res1 = 0 ; int argvi = 0; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: prelude_option_set_destroy_callback(opt,destroy);"); } res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_prelude_option, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "prelude_option_set_destroy_callback" "', argument " "1"" of type '" "prelude_option_t *""'"); } arg1 = (prelude_option_t *)(argp1); { int res = SWIG_ConvertFunctionPtr(ST(1), (void**)(&arg2), SWIGTYPE_p_f_p_struct_prelude_option_p_prelude_string_t_p_void__int); if (!SWIG_IsOK(res)) { SWIG_exception_fail(SWIG_ArgError(res), "in method '" "prelude_option_set_destroy_callback" "', argument " "2"" of type '" "prelude_option_destroy_callback_t""'"); } } prelude_option_set_destroy_callback(arg1,arg2); ST(argvi) = sv_newmortal(); XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_prelude_option_get_destroy_callback) { { prelude_option_t *arg1 = (prelude_option_t *) 0 ; void *argp1 = 0 ; int res1 = 0 ; int argvi = 0; prelude_option_destroy_callback_t result; dXSARGS; if ((items < 1) || (items > 1)) { SWIG_croak("Usage: prelude_option_get_destroy_callback(opt);"); } res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_prelude_option, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "prelude_option_get_destroy_callback" "', argument " "1"" of type '" "prelude_option_t *""'"); } arg1 = (prelude_option_t *)(argp1); result = (prelude_option_destroy_callback_t)prelude_option_get_destroy_callback(arg1); ST(argvi) = SWIG_NewFunctionPtrObj((void *)(result), SWIGTYPE_p_f_p_struct_prelude_option_p_prelude_string_t_p_void__int); argvi++ ; XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_prelude_option_set_set_callback) { { prelude_option_t *arg1 = (prelude_option_t *) 0 ; prelude_option_set_callback_t arg2 = (prelude_option_set_callback_t) 0 ; void *argp1 = 0 ; int res1 = 0 ; int argvi = 0; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: prelude_option_set_set_callback(opt,set);"); } res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_prelude_option, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "prelude_option_set_set_callback" "', argument " "1"" of type '" "prelude_option_t *""'"); } arg1 = (prelude_option_t *)(argp1); { int res = SWIG_ConvertFunctionPtr(ST(1), (void**)(&arg2), SWIGTYPE_p_f_p_struct_prelude_option_p_q_const__char_p_prelude_string_t_p_void__int); if (!SWIG_IsOK(res)) { SWIG_exception_fail(SWIG_ArgError(res), "in method '" "prelude_option_set_set_callback" "', argument " "2"" of type '" "prelude_option_set_callback_t""'"); } } prelude_option_set_set_callback(arg1,arg2); ST(argvi) = sv_newmortal(); XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_prelude_option_get_set_callback) { { prelude_option_t *arg1 = (prelude_option_t *) 0 ; void *argp1 = 0 ; int res1 = 0 ; int argvi = 0; prelude_option_set_callback_t result; dXSARGS; if ((items < 1) || (items > 1)) { SWIG_croak("Usage: prelude_option_get_set_callback(opt);"); } res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_prelude_option, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "prelude_option_get_set_callback" "', argument " "1"" of type '" "prelude_option_t *""'"); } arg1 = (prelude_option_t *)(argp1); result = (prelude_option_set_callback_t)prelude_option_get_set_callback(arg1); ST(argvi) = SWIG_NewFunctionPtrObj((void *)(result), SWIGTYPE_p_f_p_struct_prelude_option_p_q_const__char_p_prelude_string_t_p_void__int); argvi++ ; XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_prelude_option_set_get_callback) { { prelude_option_t *arg1 = (prelude_option_t *) 0 ; int (*arg2)(prelude_option_t *,prelude_string_t *,void *) = (int (*)(prelude_option_t *,prelude_string_t *,void *)) 0 ; void *argp1 = 0 ; int res1 = 0 ; int argvi = 0; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: prelude_option_set_get_callback(opt,get);"); } res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_prelude_option, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "prelude_option_set_get_callback" "', argument " "1"" of type '" "prelude_option_t *""'"); } arg1 = (prelude_option_t *)(argp1); { int res = SWIG_ConvertFunctionPtr(ST(1), (void**)(&arg2), SWIGTYPE_p_f_p_struct_prelude_option_p_prelude_string_t_p_void__int); if (!SWIG_IsOK(res)) { SWIG_exception_fail(SWIG_ArgError(res), "in method '" "prelude_option_set_get_callback" "', argument " "2"" of type '" "int (*)(prelude_option_t *,prelude_string_t *,void *)""'"); } } prelude_option_set_get_callback(arg1,arg2); ST(argvi) = sv_newmortal(); XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_prelude_option_get_get_callback) { { prelude_option_t *arg1 = (prelude_option_t *) 0 ; void *argp1 = 0 ; int res1 = 0 ; int argvi = 0; prelude_option_get_callback_t result; dXSARGS; if ((items < 1) || (items > 1)) { SWIG_croak("Usage: prelude_option_get_get_callback(opt);"); } res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_prelude_option, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "prelude_option_get_get_callback" "', argument " "1"" of type '" "prelude_option_t *""'"); } arg1 = (prelude_option_t *)(argp1); result = (prelude_option_get_callback_t)prelude_option_get_get_callback(arg1); ST(argvi) = SWIG_NewFunctionPtrObj((void *)(result), SWIGTYPE_p_f_p_struct_prelude_option_p_prelude_string_t_p_void__int); argvi++ ; XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_prelude_option_set_commit_callback) { { prelude_option_t *arg1 = (prelude_option_t *) 0 ; prelude_option_commit_callback_t arg2 = (prelude_option_commit_callback_t) 0 ; void *argp1 = 0 ; int res1 = 0 ; int argvi = 0; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: prelude_option_set_commit_callback(opt,commit);"); } res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_prelude_option, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "prelude_option_set_commit_callback" "', argument " "1"" of type '" "prelude_option_t *""'"); } arg1 = (prelude_option_t *)(argp1); { int res = SWIG_ConvertFunctionPtr(ST(1), (void**)(&arg2), SWIGTYPE_p_f_p_struct_prelude_option_p_prelude_string_t_p_void__int); if (!SWIG_IsOK(res)) { SWIG_exception_fail(SWIG_ArgError(res), "in method '" "prelude_option_set_commit_callback" "', argument " "2"" of type '" "prelude_option_commit_callback_t""'"); } } prelude_option_set_commit_callback(arg1,arg2); ST(argvi) = sv_newmortal(); XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_prelude_option_get_commit_callback) { { prelude_option_t *arg1 = (prelude_option_t *) 0 ; void *argp1 = 0 ; int res1 = 0 ; int argvi = 0; prelude_option_commit_callback_t result; dXSARGS; if ((items < 1) || (items > 1)) { SWIG_croak("Usage: prelude_option_get_commit_callback(opt);"); } res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_prelude_option, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "prelude_option_get_commit_callback" "', argument " "1"" of type '" "prelude_option_t *""'"); } arg1 = (prelude_option_t *)(argp1); result = (prelude_option_commit_callback_t)prelude_option_get_commit_callback(arg1); ST(argvi) = SWIG_NewFunctionPtrObj((void *)(result), SWIGTYPE_p_f_p_struct_prelude_option_p_prelude_string_t_p_void__int); argvi++ ; XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_prelude_option_set_default_context) { { prelude_option_t *arg1 = (prelude_option_t *) 0 ; void *arg2 = (void *) 0 ; void *argp1 = 0 ; int res1 = 0 ; int res2 ; int argvi = 0; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: prelude_option_set_default_context(opt,context);"); } res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_prelude_option, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "prelude_option_set_default_context" "', argument " "1"" of type '" "prelude_option_t *""'"); } arg1 = (prelude_option_t *)(argp1); res2 = SWIG_ConvertPtr(ST(1),SWIG_as_voidptrptr(&arg2), 0, 0); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "prelude_option_set_default_context" "', argument " "2"" of type '" "void *""'"); } prelude_option_set_default_context(arg1,arg2); ST(argvi) = sv_newmortal(); XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_prelude_option_new_context) { { prelude_option_t *arg1 = (prelude_option_t *) 0 ; prelude_option_context_t **arg2 = (prelude_option_context_t **) 0 ; char *arg3 = (char *) 0 ; void *arg4 = (void *) 0 ; void *argp1 = 0 ; int res1 = 0 ; void *argp2 = 0 ; int res2 = 0 ; int res3 ; char *buf3 = 0 ; int alloc3 = 0 ; int res4 ; int argvi = 0; int result; dXSARGS; if ((items < 4) || (items > 4)) { SWIG_croak("Usage: prelude_option_new_context(opt,ctx,name,data);"); } res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_prelude_option, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "prelude_option_new_context" "', argument " "1"" of type '" "prelude_option_t *""'"); } arg1 = (prelude_option_t *)(argp1); res2 = SWIG_ConvertPtr(ST(1), &argp2,SWIGTYPE_p_p_prelude_option_context, 0 | 0 ); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "prelude_option_new_context" "', argument " "2"" of type '" "prelude_option_context_t **""'"); } arg2 = (prelude_option_context_t **)(argp2); res3 = SWIG_AsCharPtrAndSize(ST(2), &buf3, NULL, &alloc3); if (!SWIG_IsOK(res3)) { SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "prelude_option_new_context" "', argument " "3"" of type '" "char const *""'"); } arg3 = (char *)(buf3); res4 = SWIG_ConvertPtr(ST(3),SWIG_as_voidptrptr(&arg4), 0, 0); if (!SWIG_IsOK(res4)) { SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "prelude_option_new_context" "', argument " "4"" of type '" "void *""'"); } result = (int)prelude_option_new_context(arg1,arg2,(char const *)arg3,arg4); { ST(argvi) = newSViv(result); argvi++; } if (alloc3 == SWIG_NEWOBJ) free((char*)buf3); XSRETURN(argvi); fail: if (alloc3 == SWIG_NEWOBJ) free((char*)buf3); SWIG_croak_null(); } } XS(_wrap_prelude_option_context_destroy) { { prelude_option_context_t *arg1 = (prelude_option_context_t *) 0 ; void *argp1 = 0 ; int res1 = 0 ; int argvi = 0; dXSARGS; if ((items < 1) || (items > 1)) { SWIG_croak("Usage: prelude_option_context_destroy(oc);"); } res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_prelude_option_context, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "prelude_option_context_destroy" "', argument " "1"" of type '" "prelude_option_context_t *""'"); } arg1 = (prelude_option_context_t *)(argp1); prelude_option_context_destroy(arg1); ST(argvi) = sv_newmortal(); XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_prelude_option_context_get_data) { { prelude_option_context_t *arg1 = (prelude_option_context_t *) 0 ; void *argp1 = 0 ; int res1 = 0 ; int argvi = 0; void *result = 0 ; dXSARGS; if ((items < 1) || (items > 1)) { SWIG_croak("Usage: prelude_option_context_get_data(oc);"); } res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_prelude_option_context, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "prelude_option_context_get_data" "', argument " "1"" of type '" "prelude_option_context_t *""'"); } arg1 = (prelude_option_context_t *)(argp1); result = (void *)prelude_option_context_get_data(arg1); ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_void, 0 | 0); argvi++ ; XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_prelude_option_context_set_data) { { prelude_option_context_t *arg1 = (prelude_option_context_t *) 0 ; void *arg2 = (void *) 0 ; void *argp1 = 0 ; int res1 = 0 ; int res2 ; int argvi = 0; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: prelude_option_context_set_data(oc,data);"); } res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_prelude_option_context, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "prelude_option_context_set_data" "', argument " "1"" of type '" "prelude_option_context_t *""'"); } arg1 = (prelude_option_context_t *)(argp1); res2 = SWIG_ConvertPtr(ST(1),SWIG_as_voidptrptr(&arg2), 0, 0); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "prelude_option_context_set_data" "', argument " "2"" of type '" "void *""'"); } prelude_option_context_set_data(arg1,arg2); ST(argvi) = sv_newmortal(); XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_prelude_option_search) { { prelude_option_t *arg1 = (prelude_option_t *) 0 ; char *arg2 = (char *) 0 ; prelude_option_type_t arg3 ; prelude_bool_t arg4 ; void *argp1 = 0 ; int res1 = 0 ; int res2 ; char *buf2 = 0 ; int alloc2 = 0 ; int val3 ; int ecode3 = 0 ; int val4 ; int ecode4 = 0 ; int argvi = 0; prelude_option_t *result = 0 ; dXSARGS; if ((items < 4) || (items > 4)) { SWIG_croak("Usage: prelude_option_search(parent,name,type,walk_children);"); } res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_prelude_option, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "prelude_option_search" "', argument " "1"" of type '" "prelude_option_t *""'"); } arg1 = (prelude_option_t *)(argp1); res2 = SWIG_AsCharPtrAndSize(ST(1), &buf2, NULL, &alloc2); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "prelude_option_search" "', argument " "2"" of type '" "char const *""'"); } arg2 = (char *)(buf2); ecode3 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(2), &val3); if (!SWIG_IsOK(ecode3)) { SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "prelude_option_search" "', argument " "3"" of type '" "prelude_option_type_t""'"); } arg3 = (prelude_option_type_t)(val3); ecode4 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(3), &val4); if (!SWIG_IsOK(ecode4)) { SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "prelude_option_search" "', argument " "4"" of type '" "prelude_bool_t""'"); } arg4 = (prelude_bool_t)(val4); result = (prelude_option_t *)prelude_option_search(arg1,(char const *)arg2,arg3,arg4); ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_prelude_option, 0 | 0); argvi++ ; if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); XSRETURN(argvi); fail: if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); SWIG_croak_null(); } } XS(_wrap_prelude_option_search_context) { { prelude_option_t *arg1 = (prelude_option_t *) 0 ; char *arg2 = (char *) 0 ; void *argp1 = 0 ; int res1 = 0 ; int res2 ; char *buf2 = 0 ; int alloc2 = 0 ; int argvi = 0; prelude_option_context_t *result = 0 ; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: prelude_option_search_context(opt,name);"); } res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_prelude_option, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "prelude_option_search_context" "', argument " "1"" of type '" "prelude_option_t *""'"); } arg1 = (prelude_option_t *)(argp1); res2 = SWIG_AsCharPtrAndSize(ST(1), &buf2, NULL, &alloc2); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "prelude_option_search_context" "', argument " "2"" of type '" "char const *""'"); } arg2 = (char *)(buf2); result = (prelude_option_context_t *)prelude_option_search_context(arg1,(char const *)arg2); ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_prelude_option_context, 0 | 0); argvi++ ; if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); XSRETURN(argvi); fail: if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); SWIG_croak_null(); } } XS(_wrap_prelude_option_push_request) { { prelude_msgbuf_t *arg1 = (prelude_msgbuf_t *) 0 ; int arg2 ; char *arg3 = (char *) 0 ; int val2 ; int ecode2 = 0 ; int res3 ; char *buf3 = 0 ; int alloc3 = 0 ; int argvi = 0; int result; dXSARGS; if ((items < 3) || (items > 3)) { SWIG_croak("Usage: prelude_option_push_request(msg,type,request);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_prelude_msgbuf, 0) ) { croak("Expected type prelude_msgbuf_t * for argument 1."); return; } } ecode2 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(1), &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "prelude_option_push_request" "', argument " "2"" of type '" "int""'"); } arg2 = (int)(val2); res3 = SWIG_AsCharPtrAndSize(ST(2), &buf3, NULL, &alloc3); if (!SWIG_IsOK(res3)) { SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "prelude_option_push_request" "', argument " "3"" of type '" "char const *""'"); } arg3 = (char *)(buf3); result = (int)prelude_option_push_request(arg1,arg2,(char const *)arg3); { ST(argvi) = newSViv(result); argvi++; } if (alloc3 == SWIG_NEWOBJ) free((char*)buf3); XSRETURN(argvi); fail: if (alloc3 == SWIG_NEWOBJ) free((char*)buf3); SWIG_croak_null(); } } XS(_wrap_prelude_option_new_request) { { prelude_msgbuf_t *arg1 = (prelude_msgbuf_t *) 0 ; uint32_t arg2 ; uint64_t *arg3 = (uint64_t *) 0 ; size_t arg4 ; unsigned int val2 ; int ecode2 = 0 ; int argvi = 0; int result; dXSARGS; if ((items < 3) || (items > 3)) { SWIG_croak("Usage: prelude_option_new_request(msgbuf,request_id,target_id,size);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_prelude_msgbuf, 0) ) { croak("Expected type prelude_msgbuf_t * for argument 1."); return; } } ecode2 = SWIG_AsVal_unsigned_SS_int SWIG_PERL_CALL_ARGS_2(ST(1), &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "prelude_option_new_request" "', argument " "2"" of type '" "uint32_t""'"); } arg2 = (uint32_t)(val2); { int i; AV *av; SV **sv; if ( ! (SvROK(ST(2)) && SvTYPE(SvRV(ST(2))) == SVt_PVAV) ) croak("Argument 3 is not an array."); av = (AV *) SvRV(ST(2)); arg4 = av_len(av) + 1; /* av_len returns the highest index of the array NOT the len of the array */ arg3 = malloc(arg4 * sizeof (uint64_t)); for ( i = 0; i < arg4; i++ ) { sv = av_fetch(av, i, 0); arg3[i] = strtoull(SvPV_nolen(*sv), NULL, 0); } } result = (int)prelude_option_new_request(arg1,arg2,arg3,arg4); { ST(argvi) = newSViv(result); argvi++; } { free(arg3); } XSRETURN(argvi); fail: { free(arg3); } SWIG_croak_null(); } } XS(_wrap_prelude_option_process_request) { { prelude_client_t *arg1 = (prelude_client_t *) 0 ; prelude_msg_t *arg2 = (prelude_msg_t *) 0 ; prelude_msgbuf_t *arg3 = (prelude_msgbuf_t *) 0 ; int argvi = 0; int result; dXSARGS; if ((items < 3) || (items > 3)) { SWIG_croak("Usage: prelude_option_process_request(client,msg,reply);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_prelude_client, 0) ) { croak("Expected type prelude_client_t * for argument 1."); return; } } { if ( ! SvROK(ST(1)) ) { croak("Argument 2 is null."); return; } if ( SWIG_ConvertPtr(ST(1), (void **)&arg2, SWIGTYPE_p_prelude_msg, 0) ) { croak("Expected type prelude_msg_t * for argument 2."); return; } } { if ( ! SvROK(ST(2)) ) { croak("Argument 3 is null."); return; } if ( SWIG_ConvertPtr(ST(2), (void **)&arg3, SWIGTYPE_p_prelude_msgbuf, 0) ) { croak("Expected type prelude_msgbuf_t * for argument 3."); return; } } result = (int)prelude_option_process_request(arg1,arg2,arg3); { ST(argvi) = newSViv(result); argvi++; } XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_prelude_option_recv_reply) { { prelude_msg_t *arg1 = (prelude_msg_t *) 0 ; uint64_t *arg2 = (uint64_t *) 0 ; uint32_t *arg3 = (uint32_t *) 0 ; void **arg4 = (void **) 0 ; uint64_t tmp_source_id2 ; uint32_t tmp_request_id2 ; void *tmp_value2 ; int argvi = 0; int result; dXSARGS; { tmp_source_id2 = 0; tmp_request_id2 = 0; arg2 = &tmp_source_id2; arg3 = &tmp_request_id2; arg4 = &tmp_value2; } if ((items < 1) || (items > 1)) { SWIG_croak("Usage: prelude_option_recv_reply(msg,request_id,value);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_prelude_msg, 0) ) { croak("Expected type prelude_msg_t * for argument 1."); return; } } result = (int)prelude_option_recv_reply(arg1,arg2,arg3,arg4); { ST(argvi) = newSViv(result); argvi++; } { int ret = SvIV(ST(argvi)); XPUSHs(sv_2mortal(newSVpvf("%" PRELUDE_PRIu64, *arg2))); XPUSHs(sv_2mortal(newSVuv(*arg3))); XPUSHs(sv_2mortal(newSViv(ret))); if ( *arg4 ) { switch ( ret ) { case PRELUDE_OPTION_REPLY_TYPE_LIST: XPUSHs(sv_2mortal(SWIG_NewPointerObj((void *) * arg4, SWIG_TypeQuery("prelude_option_t *"), 0))); break; default: XPUSHs(sv_2mortal(newSVpv(*arg4, strlen(*arg4)))); break; } } else { SvREFCNT_inc (& PL_sv_undef); XPUSHs(&PL_sv_undef); } } XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_prelude_msg_read) { { prelude_msg_t **arg1 = (prelude_msg_t **) 0 ; prelude_io_t *arg2 = (prelude_io_t *) 0 ; prelude_msg_t *tmp1 ; void *argp2 = 0 ; int res2 = 0 ; int argvi = 0; SV * _saved[1] ; int result; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: prelude_msg_read(msg,pio);"); } { arg1 = (prelude_msg_t **) &tmp1; } res2 = SWIG_ConvertPtr(ST(1), &argp2,SWIGTYPE_p_prelude_io_t, 0 | 0 ); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "prelude_msg_read" "', argument " "2"" of type '" "prelude_io_t *""'"); } arg2 = (prelude_io_t *)(argp2); _saved[0] = ST(0); result = (int)prelude_msg_read(arg1,arg2); { ST(argvi) = newSViv(result); argvi++; } { SV *sv; if ( result >= 0 ) { if ( ! SvROK(_saved[0]) ) { croak("Argument 1 is not a reference."); return; } sv = SvRV(_saved[0]); sv_setsv(sv, SWIG_NewPointerObj((void *) * arg1, SWIGTYPE_p_prelude_msg, 0)); } } XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_prelude_msg_forward) { { prelude_msg_t *arg1 = (prelude_msg_t *) 0 ; prelude_io_t *arg2 = (prelude_io_t *) 0 ; prelude_io_t *arg3 = (prelude_io_t *) 0 ; void *argp2 = 0 ; int res2 = 0 ; void *argp3 = 0 ; int res3 = 0 ; int argvi = 0; int result; dXSARGS; if ((items < 3) || (items > 3)) { SWIG_croak("Usage: prelude_msg_forward(msg,dst,src);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_prelude_msg, 0) ) { croak("Expected type prelude_msg_t * for argument 1."); return; } } res2 = SWIG_ConvertPtr(ST(1), &argp2,SWIGTYPE_p_prelude_io_t, 0 | 0 ); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "prelude_msg_forward" "', argument " "2"" of type '" "prelude_io_t *""'"); } arg2 = (prelude_io_t *)(argp2); res3 = SWIG_ConvertPtr(ST(2), &argp3,SWIGTYPE_p_prelude_io_t, 0 | 0 ); if (!SWIG_IsOK(res3)) { SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "prelude_msg_forward" "', argument " "3"" of type '" "prelude_io_t *""'"); } arg3 = (prelude_io_t *)(argp3); result = (int)prelude_msg_forward(arg1,arg2,arg3); { ST(argvi) = newSViv(result); argvi++; } XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_prelude_msg_get) { { prelude_msg_t *arg1 = (prelude_msg_t *) 0 ; uint8_t *arg2 = (uint8_t *) 0 ; uint32_t *arg3 = (uint32_t *) 0 ; void **arg4 = (void **) 0 ; void *argp2 = 0 ; int res2 = 0 ; void *argp3 = 0 ; int res3 = 0 ; void *argp4 = 0 ; int res4 = 0 ; int argvi = 0; int result; dXSARGS; if ((items < 4) || (items > 4)) { SWIG_croak("Usage: prelude_msg_get(msg,tag,len,buf);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_prelude_msg, 0) ) { croak("Expected type prelude_msg_t * for argument 1."); return; } } res2 = SWIG_ConvertPtr(ST(1), &argp2,SWIGTYPE_p_unsigned_char, 0 | 0 ); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "prelude_msg_get" "', argument " "2"" of type '" "uint8_t *""'"); } arg2 = (uint8_t *)(argp2); res3 = SWIG_ConvertPtr(ST(2), &argp3,SWIGTYPE_p_unsigned_int, 0 | 0 ); if (!SWIG_IsOK(res3)) { SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "prelude_msg_get" "', argument " "3"" of type '" "uint32_t *""'"); } arg3 = (uint32_t *)(argp3); res4 = SWIG_ConvertPtr(ST(3), &argp4,SWIGTYPE_p_p_void, 0 | 0 ); if (!SWIG_IsOK(res4)) { SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "prelude_msg_get" "', argument " "4"" of type '" "void **""'"); } arg4 = (void **)(argp4); result = (int)prelude_msg_get(arg1,arg2,arg3,arg4); { ST(argvi) = newSViv(result); argvi++; } XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_prelude_msg_recycle) { { prelude_msg_t *arg1 = (prelude_msg_t *) 0 ; int argvi = 0; dXSARGS; if ((items < 1) || (items > 1)) { SWIG_croak("Usage: prelude_msg_recycle(msg);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_prelude_msg, 0) ) { croak("Expected type prelude_msg_t * for argument 1."); return; } } prelude_msg_recycle(arg1); ST(argvi) = sv_newmortal(); XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_prelude_msg_mark_end) { { prelude_msg_t *arg1 = (prelude_msg_t *) 0 ; int argvi = 0; dXSARGS; if ((items < 1) || (items > 1)) { SWIG_croak("Usage: prelude_msg_mark_end(msg);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_prelude_msg, 0) ) { croak("Expected type prelude_msg_t * for argument 1."); return; } } prelude_msg_mark_end(arg1); ST(argvi) = sv_newmortal(); XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_prelude_msg_dynamic_new) { { prelude_msg_t **arg1 = (prelude_msg_t **) 0 ; int (*arg2)(prelude_msg_t **,void *) = (int (*)(prelude_msg_t **,void *)) 0 ; void *arg3 = (void *) 0 ; prelude_msg_t *tmp1 ; int res3 ; int argvi = 0; SV * _saved[1] ; int result; dXSARGS; if ((items < 3) || (items > 3)) { SWIG_croak("Usage: prelude_msg_dynamic_new(ret,flush_msg_cb,data);"); } { arg1 = (prelude_msg_t **) &tmp1; } { int res = SWIG_ConvertFunctionPtr(ST(1), (void**)(&arg2), SWIGTYPE_p_f_p_p_struct_prelude_msg_p_void__int); if (!SWIG_IsOK(res)) { SWIG_exception_fail(SWIG_ArgError(res), "in method '" "prelude_msg_dynamic_new" "', argument " "2"" of type '" "int (*)(prelude_msg_t **,void *)""'"); } } res3 = SWIG_ConvertPtr(ST(2),SWIG_as_voidptrptr(&arg3), 0, 0); if (!SWIG_IsOK(res3)) { SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "prelude_msg_dynamic_new" "', argument " "3"" of type '" "void *""'"); } _saved[0] = ST(0); result = (int)prelude_msg_dynamic_new(arg1,arg2,arg3); { ST(argvi) = newSViv(result); argvi++; } { SV *sv; if ( result >= 0 ) { if ( ! SvROK(_saved[0]) ) { croak("Argument 1 is not a reference."); return; } sv = SvRV(_saved[0]); sv_setsv(sv, SWIG_NewPointerObj((void *) * arg1, SWIGTYPE_p_prelude_msg, 0)); } } XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_prelude_msg_new) { { prelude_msg_t **arg1 = (prelude_msg_t **) 0 ; size_t arg2 ; size_t arg3 ; uint8_t arg4 ; prelude_msg_priority_t arg5 ; prelude_msg_t *tmp1 ; size_t val2 ; int ecode2 = 0 ; size_t val3 ; int ecode3 = 0 ; unsigned char val4 ; int ecode4 = 0 ; int val5 ; int ecode5 = 0 ; int argvi = 0; SV * _saved[1] ; int result; dXSARGS; if ((items < 5) || (items > 5)) { SWIG_croak("Usage: prelude_msg_new(ret,msgcount,msglen,tag,priority);"); } { arg1 = (prelude_msg_t **) &tmp1; } ecode2 = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(1), &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "prelude_msg_new" "', argument " "2"" of type '" "size_t""'"); } arg2 = (size_t)(val2); ecode3 = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(2), &val3); if (!SWIG_IsOK(ecode3)) { SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "prelude_msg_new" "', argument " "3"" of type '" "size_t""'"); } arg3 = (size_t)(val3); ecode4 = SWIG_AsVal_unsigned_SS_char SWIG_PERL_CALL_ARGS_2(ST(3), &val4); if (!SWIG_IsOK(ecode4)) { SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "prelude_msg_new" "', argument " "4"" of type '" "uint8_t""'"); } arg4 = (uint8_t)(val4); ecode5 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(4), &val5); if (!SWIG_IsOK(ecode5)) { SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "prelude_msg_new" "', argument " "5"" of type '" "prelude_msg_priority_t""'"); } arg5 = (prelude_msg_priority_t)(val5); _saved[0] = ST(0); result = (int)prelude_msg_new(arg1,arg2,arg3,arg4,arg5); { ST(argvi) = newSViv(result); argvi++; } { SV *sv; if ( result >= 0 ) { if ( ! SvROK(_saved[0]) ) { croak("Argument 1 is not a reference."); return; } sv = SvRV(_saved[0]); sv_setsv(sv, SWIG_NewPointerObj((void *) * arg1, SWIGTYPE_p_prelude_msg, 0)); } } XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_prelude_msg_set) { { prelude_msg_t *arg1 = (prelude_msg_t *) 0 ; uint8_t arg2 ; uint32_t arg3 ; void *arg4 = (void *) 0 ; unsigned char val2 ; int ecode2 = 0 ; unsigned int val3 ; int ecode3 = 0 ; int res4 ; int argvi = 0; int result; dXSARGS; if ((items < 4) || (items > 4)) { SWIG_croak("Usage: prelude_msg_set(msg,tag,len,data);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_prelude_msg, 0) ) { croak("Expected type prelude_msg_t * for argument 1."); return; } } ecode2 = SWIG_AsVal_unsigned_SS_char SWIG_PERL_CALL_ARGS_2(ST(1), &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "prelude_msg_set" "', argument " "2"" of type '" "uint8_t""'"); } arg2 = (uint8_t)(val2); ecode3 = SWIG_AsVal_unsigned_SS_int SWIG_PERL_CALL_ARGS_2(ST(2), &val3); if (!SWIG_IsOK(ecode3)) { SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "prelude_msg_set" "', argument " "3"" of type '" "uint32_t""'"); } arg3 = (uint32_t)(val3); res4 = SWIG_ConvertPtr(ST(3),SWIG_as_voidptrptr(&arg4), 0, 0); if (!SWIG_IsOK(res4)) { SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "prelude_msg_set" "', argument " "4"" of type '" "void const *""'"); } result = (int)prelude_msg_set(arg1,arg2,arg3,(void const *)arg4); { ST(argvi) = newSViv(result); argvi++; } XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_prelude_msg_write) { { prelude_msg_t *arg1 = (prelude_msg_t *) 0 ; prelude_io_t *arg2 = (prelude_io_t *) 0 ; void *argp2 = 0 ; int res2 = 0 ; int argvi = 0; int result; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: prelude_msg_write(msg,dst);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_prelude_msg, 0) ) { croak("Expected type prelude_msg_t * for argument 1."); return; } } res2 = SWIG_ConvertPtr(ST(1), &argp2,SWIGTYPE_p_prelude_io_t, 0 | 0 ); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "prelude_msg_write" "', argument " "2"" of type '" "prelude_io_t *""'"); } arg2 = (prelude_io_t *)(argp2); result = (int)prelude_msg_write(arg1,arg2); { ST(argvi) = newSViv(result); argvi++; } XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_prelude_msg_set_tag) { { prelude_msg_t *arg1 = (prelude_msg_t *) 0 ; uint8_t arg2 ; unsigned char val2 ; int ecode2 = 0 ; int argvi = 0; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: prelude_msg_set_tag(msg,tag);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_prelude_msg, 0) ) { croak("Expected type prelude_msg_t * for argument 1."); return; } } ecode2 = SWIG_AsVal_unsigned_SS_char SWIG_PERL_CALL_ARGS_2(ST(1), &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "prelude_msg_set_tag" "', argument " "2"" of type '" "uint8_t""'"); } arg2 = (uint8_t)(val2); prelude_msg_set_tag(arg1,arg2); ST(argvi) = sv_newmortal(); XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_prelude_msg_set_priority) { { prelude_msg_t *arg1 = (prelude_msg_t *) 0 ; prelude_msg_priority_t arg2 ; int val2 ; int ecode2 = 0 ; int argvi = 0; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: prelude_msg_set_priority(msg,priority);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_prelude_msg, 0) ) { croak("Expected type prelude_msg_t * for argument 1."); return; } } ecode2 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(1), &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "prelude_msg_set_priority" "', argument " "2"" of type '" "prelude_msg_priority_t""'"); } arg2 = (prelude_msg_priority_t)(val2); prelude_msg_set_priority(arg1,arg2); ST(argvi) = sv_newmortal(); XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_prelude_msg_get_tag) { { prelude_msg_t *arg1 = (prelude_msg_t *) 0 ; int argvi = 0; uint8_t result; dXSARGS; if ((items < 1) || (items > 1)) { SWIG_croak("Usage: prelude_msg_get_tag(msg);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_prelude_msg, 0) ) { croak("Expected type prelude_msg_t * for argument 1."); return; } } result = (uint8_t)prelude_msg_get_tag(arg1); ST(argvi) = SWIG_From_unsigned_SS_char SWIG_PERL_CALL_ARGS_1((unsigned char)(result)); argvi++ ; XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_prelude_msg_get_priority) { { prelude_msg_t *arg1 = (prelude_msg_t *) 0 ; int argvi = 0; prelude_msg_priority_t result; dXSARGS; if ((items < 1) || (items > 1)) { SWIG_croak("Usage: prelude_msg_get_priority(msg);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_prelude_msg, 0) ) { croak("Expected type prelude_msg_t * for argument 1."); return; } } result = (prelude_msg_priority_t)prelude_msg_get_priority(arg1); ST(argvi) = SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(result)); argvi++ ; XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_prelude_msg_get_len) { { prelude_msg_t *arg1 = (prelude_msg_t *) 0 ; int argvi = 0; uint32_t result; dXSARGS; if ((items < 1) || (items > 1)) { SWIG_croak("Usage: prelude_msg_get_len(msg);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_prelude_msg, 0) ) { croak("Expected type prelude_msg_t * for argument 1."); return; } } result = (uint32_t)prelude_msg_get_len(arg1); ST(argvi) = SWIG_From_unsigned_SS_int SWIG_PERL_CALL_ARGS_1((unsigned int)(result)); argvi++ ; XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_prelude_msg_get_datalen) { { prelude_msg_t *arg1 = (prelude_msg_t *) 0 ; int argvi = 0; uint32_t result; dXSARGS; if ((items < 1) || (items > 1)) { SWIG_croak("Usage: prelude_msg_get_datalen(msg);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_prelude_msg, 0) ) { croak("Expected type prelude_msg_t * for argument 1."); return; } } result = (uint32_t)prelude_msg_get_datalen(arg1); ST(argvi) = SWIG_From_unsigned_SS_int SWIG_PERL_CALL_ARGS_1((unsigned int)(result)); argvi++ ; XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_prelude_msg_get_message_data) { { prelude_msg_t *arg1 = (prelude_msg_t *) 0 ; int argvi = 0; unsigned char *result = 0 ; dXSARGS; if ((items < 1) || (items > 1)) { SWIG_croak("Usage: prelude_msg_get_message_data(msg);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_prelude_msg, 0) ) { croak("Expected type prelude_msg_t * for argument 1."); return; } } result = (unsigned char *)prelude_msg_get_message_data(arg1); ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_unsigned_char, 0 | 0); argvi++ ; XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_prelude_msg_get_time) { { prelude_msg_t *arg1 = (prelude_msg_t *) 0 ; struct timeval *arg2 = (struct timeval *) 0 ; void *argp2 = 0 ; int res2 = 0 ; int argvi = 0; struct timeval *result = 0 ; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: prelude_msg_get_time(msg,tv);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_prelude_msg, 0) ) { croak("Expected type prelude_msg_t * for argument 1."); return; } } res2 = SWIG_ConvertPtr(ST(1), &argp2,SWIGTYPE_p_timeval, 0 | 0 ); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "prelude_msg_get_time" "', argument " "2"" of type '" "struct timeval *""'"); } arg2 = (struct timeval *)(argp2); result = (struct timeval *)prelude_msg_get_time(arg1,arg2); ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_timeval, 0 | 0); argvi++ ; XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_prelude_msg_is_empty) { { prelude_msg_t *arg1 = (prelude_msg_t *) 0 ; int argvi = 0; int result; dXSARGS; if ((items < 1) || (items > 1)) { SWIG_croak("Usage: prelude_msg_is_empty(msg);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_prelude_msg, 0) ) { croak("Expected type prelude_msg_t * for argument 1."); return; } } result = (int)prelude_msg_is_empty(arg1); { ST(argvi) = newSViv(result); argvi++; } XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_prelude_msg_is_fragment) { { prelude_msg_t *arg1 = (prelude_msg_t *) 0 ; int argvi = 0; int result; dXSARGS; if ((items < 1) || (items > 1)) { SWIG_croak("Usage: prelude_msg_is_fragment(msg);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_prelude_msg, 0) ) { croak("Expected type prelude_msg_t * for argument 1."); return; } } result = (int)prelude_msg_is_fragment(arg1); { ST(argvi) = newSViv(result); argvi++; } XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_prelude_msg_destroy) { { prelude_msg_t *arg1 = (prelude_msg_t *) 0 ; int argvi = 0; dXSARGS; if ((items < 1) || (items > 1)) { SWIG_croak("Usage: prelude_msg_destroy(msg);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_prelude_msg, 0) ) { croak("Expected type prelude_msg_t * for argument 1."); return; } } prelude_msg_destroy(arg1); ST(argvi) = sv_newmortal(); XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_prelude_msg_set_callback) { { prelude_msg_t *arg1 = (prelude_msg_t *) 0 ; int (*arg2)(prelude_msg_t **,void *) = (int (*)(prelude_msg_t **,void *)) 0 ; int argvi = 0; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: prelude_msg_set_callback(msg,flush_msg_cb);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_prelude_msg, 0) ) { croak("Expected type prelude_msg_t * for argument 1."); return; } } { int res = SWIG_ConvertFunctionPtr(ST(1), (void**)(&arg2), SWIGTYPE_p_f_p_p_struct_prelude_msg_p_void__int); if (!SWIG_IsOK(res)) { SWIG_exception_fail(SWIG_ArgError(res), "in method '" "prelude_msg_set_callback" "', argument " "2"" of type '" "int (*)(prelude_msg_t **,void *)""'"); } } prelude_msg_set_callback(arg1,arg2); ST(argvi) = sv_newmortal(); XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_prelude_msg_set_data) { { prelude_msg_t *arg1 = (prelude_msg_t *) 0 ; void *arg2 = (void *) 0 ; int res2 ; int argvi = 0; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: prelude_msg_set_data(msg,data);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_prelude_msg, 0) ) { croak("Expected type prelude_msg_t * for argument 1."); return; } } res2 = SWIG_ConvertPtr(ST(1),SWIG_as_voidptrptr(&arg2), 0, 0); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "prelude_msg_set_data" "', argument " "2"" of type '" "void *""'"); } prelude_msg_set_data(arg1,arg2); ST(argvi) = sv_newmortal(); XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_prelude_msg_ref) { { prelude_msg_t *arg1 = (prelude_msg_t *) 0 ; int argvi = 0; prelude_msg_t *result = 0 ; dXSARGS; if ((items < 1) || (items > 1)) { SWIG_croak("Usage: prelude_msg_ref(msg);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_prelude_msg, 0) ) { croak("Expected type prelude_msg_t * for argument 1."); return; } } result = (prelude_msg_t *)prelude_msg_ref(arg1); ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_prelude_msg, 0 | 0); argvi++ ; XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap__prelude_log) { { prelude_log_t arg1 ; char *arg2 = (char *) 0 ; char *arg3 = (char *) 0 ; int arg4 ; char *arg5 = (char *) 0 ; void *arg6 = 0 ; int val1 ; int ecode1 = 0 ; int res2 ; char *buf2 = 0 ; int alloc2 = 0 ; int res3 ; char *buf3 = 0 ; int alloc3 = 0 ; int val4 ; int ecode4 = 0 ; int res5 ; char *buf5 = 0 ; int alloc5 = 0 ; int argvi = 0; dXSARGS; if (items < 5) { SWIG_croak("Usage: _prelude_log(level,file,function,line,fmt,...);"); } ecode1 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(0), &val1); if (!SWIG_IsOK(ecode1)) { SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "_prelude_log" "', argument " "1"" of type '" "prelude_log_t""'"); } arg1 = (prelude_log_t)(val1); res2 = SWIG_AsCharPtrAndSize(ST(1), &buf2, NULL, &alloc2); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "_prelude_log" "', argument " "2"" of type '" "char const *""'"); } arg2 = (char *)(buf2); res3 = SWIG_AsCharPtrAndSize(ST(2), &buf3, NULL, &alloc3); if (!SWIG_IsOK(res3)) { SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "_prelude_log" "', argument " "3"" of type '" "char const *""'"); } arg3 = (char *)(buf3); ecode4 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(3), &val4); if (!SWIG_IsOK(ecode4)) { SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "_prelude_log" "', argument " "4"" of type '" "int""'"); } arg4 = (int)(val4); res5 = SWIG_AsCharPtrAndSize(ST(4), &buf5, NULL, &alloc5); if (!SWIG_IsOK(res5)) { SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "_prelude_log" "', argument " "5"" of type '" "char const *""'"); } arg5 = (char *)(buf5); _prelude_log(arg1,(char const *)arg2,(char const *)arg3,arg4,(char const *)arg5,arg6); ST(argvi) = sv_newmortal(); if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); if (alloc3 == SWIG_NEWOBJ) free((char*)buf3); if (alloc5 == SWIG_NEWOBJ) free((char*)buf5); XSRETURN(argvi); fail: if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); if (alloc3 == SWIG_NEWOBJ) free((char*)buf3); if (alloc5 == SWIG_NEWOBJ) free((char*)buf5); SWIG_croak_null(); } } XS(_wrap_prelude_log) { { prelude_log_t arg1 ; char *arg2 = (char *) 0 ; void *arg3 = 0 ; int val1 ; int ecode1 = 0 ; int res2 ; char *buf2 = 0 ; int alloc2 = 0 ; int argvi = 0; dXSARGS; if (items < 2) { SWIG_croak("Usage: prelude_log(level,fmt,...);"); } ecode1 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(0), &val1); if (!SWIG_IsOK(ecode1)) { SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "prelude_log" "', argument " "1"" of type '" "prelude_log_t""'"); } arg1 = (prelude_log_t)(val1); res2 = SWIG_AsCharPtrAndSize(ST(1), &buf2, NULL, &alloc2); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "prelude_log" "', argument " "2"" of type '" "char const *""'"); } arg2 = (char *)(buf2); prelude_log(arg1,(char const *)arg2,arg3); ST(argvi) = sv_newmortal(); if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); XSRETURN(argvi); fail: if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); SWIG_croak_null(); } } XS(_wrap_prelude_log_debug) { { prelude_log_t arg1 ; char *arg2 = (char *) 0 ; void *arg3 = 0 ; int val1 ; int ecode1 = 0 ; int res2 ; char *buf2 = 0 ; int alloc2 = 0 ; int argvi = 0; dXSARGS; if (items < 2) { SWIG_croak("Usage: prelude_log_debug(level,fmt,...);"); } ecode1 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(0), &val1); if (!SWIG_IsOK(ecode1)) { SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "prelude_log_debug" "', argument " "1"" of type '" "prelude_log_t""'"); } arg1 = (prelude_log_t)(val1); res2 = SWIG_AsCharPtrAndSize(ST(1), &buf2, NULL, &alloc2); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "prelude_log_debug" "', argument " "2"" of type '" "char const *""'"); } arg2 = (char *)(buf2); prelude_log_debug(arg1,(char const *)arg2,arg3); ST(argvi) = sv_newmortal(); if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); XSRETURN(argvi); fail: if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); SWIG_croak_null(); } } XS(_wrap_prelude_log_set_level) { { prelude_log_t arg1 ; int val1 ; int ecode1 = 0 ; int argvi = 0; dXSARGS; if ((items < 1) || (items > 1)) { SWIG_croak("Usage: prelude_log_set_level(level);"); } ecode1 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(0), &val1); if (!SWIG_IsOK(ecode1)) { SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "prelude_log_set_level" "', argument " "1"" of type '" "prelude_log_t""'"); } arg1 = (prelude_log_t)(val1); prelude_log_set_level(arg1); ST(argvi) = sv_newmortal(); XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_prelude_log_set_debug_level) { { int arg1 ; int val1 ; int ecode1 = 0 ; int argvi = 0; dXSARGS; if ((items < 1) || (items > 1)) { SWIG_croak("Usage: prelude_log_set_debug_level(level);"); } ecode1 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(0), &val1); if (!SWIG_IsOK(ecode1)) { SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "prelude_log_set_debug_level" "', argument " "1"" of type '" "int""'"); } arg1 = (int)(val1); prelude_log_set_debug_level(arg1); ST(argvi) = sv_newmortal(); XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_prelude_log_get_flags) { { int argvi = 0; prelude_log_flags_t result; dXSARGS; if ((items < 0) || (items > 0)) { SWIG_croak("Usage: prelude_log_get_flags();"); } result = (prelude_log_flags_t)prelude_log_get_flags(); ST(argvi) = SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(result)); argvi++ ; XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_prelude_log_set_flags) { { prelude_log_flags_t arg1 ; int val1 ; int ecode1 = 0 ; int argvi = 0; dXSARGS; if ((items < 1) || (items > 1)) { SWIG_croak("Usage: prelude_log_set_flags(flags);"); } ecode1 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(0), &val1); if (!SWIG_IsOK(ecode1)) { SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "prelude_log_set_flags" "', argument " "1"" of type '" "prelude_log_flags_t""'"); } arg1 = (prelude_log_flags_t)(val1); prelude_log_set_flags(arg1); ST(argvi) = sv_newmortal(); XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_prelude_log_get_prefix) { { int argvi = 0; char *result = 0 ; dXSARGS; if ((items < 0) || (items > 0)) { SWIG_croak("Usage: prelude_log_get_prefix();"); } result = (char *)prelude_log_get_prefix(); ST(argvi) = SWIG_FromCharPtr((const char *)result); argvi++ ; XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_prelude_log_set_prefix) { { char *arg1 = (char *) 0 ; int res1 ; char *buf1 = 0 ; int alloc1 = 0 ; int argvi = 0; dXSARGS; if ((items < 1) || (items > 1)) { SWIG_croak("Usage: prelude_log_set_prefix(prefix);"); } res1 = SWIG_AsCharPtrAndSize(ST(0), &buf1, NULL, &alloc1); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "prelude_log_set_prefix" "', argument " "1"" of type '" "char *""'"); } arg1 = (char *)(buf1); prelude_log_set_prefix(arg1); ST(argvi) = sv_newmortal(); if (alloc1 == SWIG_NEWOBJ) free((char*)buf1); XSRETURN(argvi); fail: if (alloc1 == SWIG_NEWOBJ) free((char*)buf1); SWIG_croak_null(); } } XS(_wrap_prelude_log_set_callback) { { void (*arg1)(prelude_log_t,char const *) = (void (*)(prelude_log_t,char const *)) 0 ; int argvi = 0; dXSARGS; if ((items < 1) || (items > 1)) { SWIG_croak("Usage: prelude_log_set_callback(log_cb);"); } { int res = SWIG_ConvertFunctionPtr(ST(0), (void**)(&arg1), SWIGTYPE_p_f_enum_prelude_log_t_p_q_const__char__void); if (!SWIG_IsOK(res)) { SWIG_exception_fail(SWIG_ArgError(res), "in method '" "prelude_log_set_callback" "', argument " "1"" of type '" "void (*)(prelude_log_t,char const *)""'"); } } prelude_log_set_callback(arg1); ST(argvi) = sv_newmortal(); XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_prelude_log_set_logfile) { { char *arg1 = (char *) 0 ; int res1 ; char *buf1 = 0 ; int alloc1 = 0 ; int argvi = 0; int result; dXSARGS; if ((items < 1) || (items > 1)) { SWIG_croak("Usage: prelude_log_set_logfile(filename);"); } res1 = SWIG_AsCharPtrAndSize(ST(0), &buf1, NULL, &alloc1); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "prelude_log_set_logfile" "', argument " "1"" of type '" "char const *""'"); } arg1 = (char *)(buf1); result = (int)prelude_log_set_logfile((char const *)arg1); { ST(argvi) = newSViv(result); argvi++; } if (alloc1 == SWIG_NEWOBJ) free((char*)buf1); XSRETURN(argvi); fail: if (alloc1 == SWIG_NEWOBJ) free((char*)buf1); SWIG_croak_null(); } } XS(_wrap__prelude_log_set_abort_level) { { prelude_log_t arg1 ; int val1 ; int ecode1 = 0 ; int argvi = 0; dXSARGS; if ((items < 1) || (items > 1)) { SWIG_croak("Usage: _prelude_log_set_abort_level(level);"); } ecode1 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(0), &val1); if (!SWIG_IsOK(ecode1)) { SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "_prelude_log_set_abort_level" "', argument " "1"" of type '" "prelude_log_t""'"); } arg1 = (prelude_log_t)(val1); _prelude_log_set_abort_level(arg1); ST(argvi) = sv_newmortal(); XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap__prelude_log_set_abort_level_from_string) { { char *arg1 = (char *) 0 ; int res1 ; char *buf1 = 0 ; int alloc1 = 0 ; int argvi = 0; int result; dXSARGS; if ((items < 1) || (items > 1)) { SWIG_croak("Usage: _prelude_log_set_abort_level_from_string(level);"); } res1 = SWIG_AsCharPtrAndSize(ST(0), &buf1, NULL, &alloc1); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "_prelude_log_set_abort_level_from_string" "', argument " "1"" of type '" "char const *""'"); } arg1 = (char *)(buf1); result = (int)_prelude_log_set_abort_level_from_string((char const *)arg1); { ST(argvi) = newSViv(result); argvi++; } if (alloc1 == SWIG_NEWOBJ) free((char*)buf1); XSRETURN(argvi); fail: if (alloc1 == SWIG_NEWOBJ) free((char*)buf1); SWIG_croak_null(); } } XS(_wrap_prelude_msgbuf_new) { { prelude_msgbuf_t **arg1 = (prelude_msgbuf_t **) 0 ; prelude_msgbuf_t *tmp1 ; int argvi = 0; SV * _saved[1] ; int result; dXSARGS; if ((items < 1) || (items > 1)) { SWIG_croak("Usage: prelude_msgbuf_new(msgbuf);"); } { arg1 = (prelude_msgbuf_t **) &tmp1; } _saved[0] = ST(0); result = (int)prelude_msgbuf_new(arg1); { ST(argvi) = newSViv(result); argvi++; } { SV *sv; if ( result >= 0 ) { if ( ! SvROK(_saved[0]) ) { croak("Argument 1 is not a reference."); return; } sv = SvRV(_saved[0]); sv_setsv(sv, SWIG_NewPointerObj((void *) * arg1, SWIGTYPE_p_prelude_msgbuf, 0)); } } XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_prelude_msgbuf_destroy) { { prelude_msgbuf_t *arg1 = (prelude_msgbuf_t *) 0 ; int argvi = 0; dXSARGS; if ((items < 1) || (items > 1)) { SWIG_croak("Usage: prelude_msgbuf_destroy(msgbuf);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_prelude_msgbuf, 0) ) { croak("Expected type prelude_msgbuf_t * for argument 1."); return; } } prelude_msgbuf_destroy(arg1); ST(argvi) = sv_newmortal(); XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_prelude_msgbuf_mark_end) { { prelude_msgbuf_t *arg1 = (prelude_msgbuf_t *) 0 ; int argvi = 0; dXSARGS; if ((items < 1) || (items > 1)) { SWIG_croak("Usage: prelude_msgbuf_mark_end(msgbuf);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_prelude_msgbuf, 0) ) { croak("Expected type prelude_msgbuf_t * for argument 1."); return; } } prelude_msgbuf_mark_end(arg1); ST(argvi) = sv_newmortal(); XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_prelude_msgbuf_set) { { prelude_msgbuf_t *arg1 = (prelude_msgbuf_t *) 0 ; uint8_t arg2 ; uint32_t arg3 ; void *arg4 = (void *) 0 ; unsigned char val2 ; int ecode2 = 0 ; unsigned int val3 ; int ecode3 = 0 ; int res4 ; int argvi = 0; int result; dXSARGS; if ((items < 4) || (items > 4)) { SWIG_croak("Usage: prelude_msgbuf_set(msgbuf,tag,len,data);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_prelude_msgbuf, 0) ) { croak("Expected type prelude_msgbuf_t * for argument 1."); return; } } ecode2 = SWIG_AsVal_unsigned_SS_char SWIG_PERL_CALL_ARGS_2(ST(1), &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "prelude_msgbuf_set" "', argument " "2"" of type '" "uint8_t""'"); } arg2 = (uint8_t)(val2); ecode3 = SWIG_AsVal_unsigned_SS_int SWIG_PERL_CALL_ARGS_2(ST(2), &val3); if (!SWIG_IsOK(ecode3)) { SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "prelude_msgbuf_set" "', argument " "3"" of type '" "uint32_t""'"); } arg3 = (uint32_t)(val3); res4 = SWIG_ConvertPtr(ST(3),SWIG_as_voidptrptr(&arg4), 0, 0); if (!SWIG_IsOK(res4)) { SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "prelude_msgbuf_set" "', argument " "4"" of type '" "void const *""'"); } result = (int)prelude_msgbuf_set(arg1,arg2,arg3,(void const *)arg4); { ST(argvi) = newSViv(result); argvi++; } XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_prelude_msgbuf_get_msg) { { prelude_msgbuf_t *arg1 = (prelude_msgbuf_t *) 0 ; int argvi = 0; prelude_msg_t *result = 0 ; dXSARGS; if ((items < 1) || (items > 1)) { SWIG_croak("Usage: prelude_msgbuf_get_msg(msgbuf);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_prelude_msgbuf, 0) ) { croak("Expected type prelude_msgbuf_t * for argument 1."); return; } } result = (prelude_msg_t *)prelude_msgbuf_get_msg(arg1); ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_prelude_msg, 0 | 0); argvi++ ; XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_prelude_msgbuf_set_callback) { { prelude_msgbuf_t *arg1 = (prelude_msgbuf_t *) 0 ; int (*arg2)(prelude_msgbuf_t *,prelude_msg_t *) = (int (*)(prelude_msgbuf_t *,prelude_msg_t *)) 0 ; int argvi = 0; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: prelude_msgbuf_set_callback(msgbuf,send_msg);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_prelude_msgbuf, 0) ) { croak("Expected type prelude_msgbuf_t * for argument 1."); return; } } { int res = SWIG_ConvertFunctionPtr(ST(1), (void**)(&arg2), SWIGTYPE_p_f_p_struct_prelude_msgbuf_p_struct_prelude_msg__int); if (!SWIG_IsOK(res)) { SWIG_exception_fail(SWIG_ArgError(res), "in method '" "prelude_msgbuf_set_callback" "', argument " "2"" of type '" "int (*)(prelude_msgbuf_t *,prelude_msg_t *)""'"); } } prelude_msgbuf_set_callback(arg1,arg2); ST(argvi) = sv_newmortal(); XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_prelude_msgbuf_set_data) { { prelude_msgbuf_t *arg1 = (prelude_msgbuf_t *) 0 ; void *arg2 = (void *) 0 ; int res2 ; int argvi = 0; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: prelude_msgbuf_set_data(msgbuf,data);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_prelude_msgbuf, 0) ) { croak("Expected type prelude_msgbuf_t * for argument 1."); return; } } res2 = SWIG_ConvertPtr(ST(1),SWIG_as_voidptrptr(&arg2), 0, 0); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "prelude_msgbuf_set_data" "', argument " "2"" of type '" "void *""'"); } prelude_msgbuf_set_data(arg1,arg2); ST(argvi) = sv_newmortal(); XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_prelude_msgbuf_get_data) { { prelude_msgbuf_t *arg1 = (prelude_msgbuf_t *) 0 ; int argvi = 0; void *result = 0 ; dXSARGS; if ((items < 1) || (items > 1)) { SWIG_croak("Usage: prelude_msgbuf_get_data(msgbuf);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_prelude_msgbuf, 0) ) { croak("Expected type prelude_msgbuf_t * for argument 1."); return; } } result = (void *)prelude_msgbuf_get_data(arg1); ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_void, 0 | 0); argvi++ ; XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_prelude_msgbuf_set_flags) { { prelude_msgbuf_t *arg1 = (prelude_msgbuf_t *) 0 ; prelude_msgbuf_flags_t arg2 ; int val2 ; int ecode2 = 0 ; int argvi = 0; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: prelude_msgbuf_set_flags(msgbuf,flags);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_prelude_msgbuf, 0) ) { croak("Expected type prelude_msgbuf_t * for argument 1."); return; } } ecode2 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(1), &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "prelude_msgbuf_set_flags" "', argument " "2"" of type '" "prelude_msgbuf_flags_t""'"); } arg2 = (prelude_msgbuf_flags_t)(val2); prelude_msgbuf_set_flags(arg1,arg2); ST(argvi) = sv_newmortal(); XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_prelude_msgbuf_get_flags) { { prelude_msgbuf_t *arg1 = (prelude_msgbuf_t *) 0 ; int argvi = 0; prelude_msgbuf_flags_t result; dXSARGS; if ((items < 1) || (items > 1)) { SWIG_croak("Usage: prelude_msgbuf_get_flags(msgbuf);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_prelude_msgbuf, 0) ) { croak("Expected type prelude_msgbuf_t * for argument 1."); return; } } result = (prelude_msgbuf_flags_t)prelude_msgbuf_get_flags(arg1); ST(argvi) = SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(result)); argvi++ ; XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_prelude_timer_t_list_set) { { prelude_timer_t *arg1 = (prelude_timer_t *) 0 ; prelude_list_t arg2 ; void *argp1 = 0 ; int res1 = 0 ; void *argp2 ; int res2 = 0 ; int argvi = 0; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: prelude_timer_t_list_set(self,list);"); } res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_prelude_timer_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "prelude_timer_t_list_set" "', argument " "1"" of type '" "prelude_timer_t *""'"); } arg1 = (prelude_timer_t *)(argp1); { res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_prelude_list_t, 0 ); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "prelude_timer_t_list_set" "', argument " "2"" of type '" "prelude_list_t""'"); } if (!argp2) { SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "prelude_timer_t_list_set" "', argument " "2"" of type '" "prelude_list_t""'"); } else { arg2 = *((prelude_list_t *)(argp2)); } } if (arg1) (arg1)->list = arg2; ST(argvi) = sv_newmortal(); XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_prelude_timer_t_list_get) { { prelude_timer_t *arg1 = (prelude_timer_t *) 0 ; void *argp1 = 0 ; int res1 = 0 ; int argvi = 0; prelude_list_t result; dXSARGS; if ((items < 1) || (items > 1)) { SWIG_croak("Usage: prelude_timer_t_list_get(self);"); } res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_prelude_timer_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "prelude_timer_t_list_get" "', argument " "1"" of type '" "prelude_timer_t *""'"); } arg1 = (prelude_timer_t *)(argp1); result = ((arg1)->list); ST(argvi) = SWIG_NewPointerObj((prelude_list_t *)memcpy((prelude_list_t *)malloc(sizeof(prelude_list_t)),&result,sizeof(prelude_list_t)), SWIGTYPE_p_prelude_list_t, SWIG_POINTER_OWN | 0); argvi++ ; XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_prelude_timer_t_expire_set) { { prelude_timer_t *arg1 = (prelude_timer_t *) 0 ; int arg2 ; void *argp1 = 0 ; int res1 = 0 ; int val2 ; int ecode2 = 0 ; int argvi = 0; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: prelude_timer_t_expire_set(self,expire);"); } res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_prelude_timer_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "prelude_timer_t_expire_set" "', argument " "1"" of type '" "prelude_timer_t *""'"); } arg1 = (prelude_timer_t *)(argp1); ecode2 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(1), &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "prelude_timer_t_expire_set" "', argument " "2"" of type '" "int""'"); } arg2 = (int)(val2); if (arg1) (arg1)->expire = arg2; ST(argvi) = sv_newmortal(); XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_prelude_timer_t_expire_get) { { prelude_timer_t *arg1 = (prelude_timer_t *) 0 ; void *argp1 = 0 ; int res1 = 0 ; int argvi = 0; int result; dXSARGS; if ((items < 1) || (items > 1)) { SWIG_croak("Usage: prelude_timer_t_expire_get(self);"); } res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_prelude_timer_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "prelude_timer_t_expire_get" "', argument " "1"" of type '" "prelude_timer_t *""'"); } arg1 = (prelude_timer_t *)(argp1); result = (int) ((arg1)->expire); { ST(argvi) = newSViv(result); argvi++; } XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_prelude_timer_t_start_time_set) { { prelude_timer_t *arg1 = (prelude_timer_t *) 0 ; time_t arg2 ; void *argp1 = 0 ; int res1 = 0 ; void *argp2 ; int res2 = 0 ; int argvi = 0; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: prelude_timer_t_start_time_set(self,start_time);"); } res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_prelude_timer_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "prelude_timer_t_start_time_set" "', argument " "1"" of type '" "prelude_timer_t *""'"); } arg1 = (prelude_timer_t *)(argp1); { res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_time_t, 0 ); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "prelude_timer_t_start_time_set" "', argument " "2"" of type '" "time_t""'"); } if (!argp2) { SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "prelude_timer_t_start_time_set" "', argument " "2"" of type '" "time_t""'"); } else { arg2 = *((time_t *)(argp2)); } } if (arg1) (arg1)->start_time = arg2; ST(argvi) = sv_newmortal(); XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_prelude_timer_t_start_time_get) { { prelude_timer_t *arg1 = (prelude_timer_t *) 0 ; void *argp1 = 0 ; int res1 = 0 ; int argvi = 0; time_t result; dXSARGS; if ((items < 1) || (items > 1)) { SWIG_croak("Usage: prelude_timer_t_start_time_get(self);"); } res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_prelude_timer_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "prelude_timer_t_start_time_get" "', argument " "1"" of type '" "prelude_timer_t *""'"); } arg1 = (prelude_timer_t *)(argp1); result = ((arg1)->start_time); ST(argvi) = SWIG_NewPointerObj((time_t *)memcpy((time_t *)malloc(sizeof(time_t)),&result,sizeof(time_t)), SWIGTYPE_p_time_t, SWIG_POINTER_OWN | 0); argvi++ ; XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_prelude_timer_t_data_set) { { prelude_timer_t *arg1 = (prelude_timer_t *) 0 ; void *arg2 = (void *) 0 ; void *argp1 = 0 ; int res1 = 0 ; int res2 ; int argvi = 0; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: prelude_timer_t_data_set(self,data);"); } res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_prelude_timer_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "prelude_timer_t_data_set" "', argument " "1"" of type '" "prelude_timer_t *""'"); } arg1 = (prelude_timer_t *)(argp1); res2 = SWIG_ConvertPtr(ST(1),SWIG_as_voidptrptr(&arg2), 0, SWIG_POINTER_DISOWN); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "prelude_timer_t_data_set" "', argument " "2"" of type '" "void *""'"); } if (arg1) (arg1)->data = arg2; ST(argvi) = sv_newmortal(); XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_prelude_timer_t_data_get) { { prelude_timer_t *arg1 = (prelude_timer_t *) 0 ; void *argp1 = 0 ; int res1 = 0 ; int argvi = 0; void *result = 0 ; dXSARGS; if ((items < 1) || (items > 1)) { SWIG_croak("Usage: prelude_timer_t_data_get(self);"); } res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_prelude_timer_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "prelude_timer_t_data_get" "', argument " "1"" of type '" "prelude_timer_t *""'"); } arg1 = (prelude_timer_t *)(argp1); result = (void *) ((arg1)->data); ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_void, 0 | 0); argvi++ ; XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_prelude_timer_t_function_set) { { prelude_timer_t *arg1 = (prelude_timer_t *) 0 ; void (*arg2)(void *) = (void (*)(void *)) 0 ; void *argp1 = 0 ; int res1 = 0 ; int argvi = 0; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: prelude_timer_t_function_set(self,function);"); } res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_prelude_timer_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "prelude_timer_t_function_set" "', argument " "1"" of type '" "prelude_timer_t *""'"); } arg1 = (prelude_timer_t *)(argp1); { int res = SWIG_ConvertFunctionPtr(ST(1), (void**)(&arg2), SWIGTYPE_p_f_p_void__void); if (!SWIG_IsOK(res)) { SWIG_exception_fail(SWIG_ArgError(res), "in method '" "prelude_timer_t_function_set" "', argument " "2"" of type '" "void (*)(void *)""'"); } } if (arg1) (arg1)->function = arg2; ST(argvi) = sv_newmortal(); XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_prelude_timer_t_function_get) { { prelude_timer_t *arg1 = (prelude_timer_t *) 0 ; void *argp1 = 0 ; int res1 = 0 ; int argvi = 0; void (*result)(void *) = 0 ; dXSARGS; if ((items < 1) || (items > 1)) { SWIG_croak("Usage: prelude_timer_t_function_get(self);"); } res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_prelude_timer_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "prelude_timer_t_function_get" "', argument " "1"" of type '" "prelude_timer_t *""'"); } arg1 = (prelude_timer_t *)(argp1); result = (void (*)(void *)) ((arg1)->function); ST(argvi) = SWIG_NewFunctionPtrObj((void *)(result), SWIGTYPE_p_f_p_void__void); argvi++ ; XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_new_prelude_timer_t) { { int argvi = 0; prelude_timer_t *result = 0 ; dXSARGS; if ((items < 0) || (items > 0)) { SWIG_croak("Usage: new_prelude_timer_t();"); } result = (prelude_timer_t *)calloc(1, sizeof(prelude_timer_t)); ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_prelude_timer_t, SWIG_OWNER | SWIG_SHADOW); argvi++ ; XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_delete_prelude_timer_t) { { prelude_timer_t *arg1 = (prelude_timer_t *) 0 ; void *argp1 = 0 ; int res1 = 0 ; int argvi = 0; dXSARGS; if ((items < 1) || (items > 1)) { SWIG_croak("Usage: delete_prelude_timer_t(self);"); } res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_prelude_timer_t, SWIG_POINTER_DISOWN | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_prelude_timer_t" "', argument " "1"" of type '" "prelude_timer_t *""'"); } arg1 = (prelude_timer_t *)(argp1); free((char *) arg1); ST(argvi) = sv_newmortal(); XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_prelude_timer_init) { { prelude_timer_t *arg1 = (prelude_timer_t *) 0 ; void *argp1 = 0 ; int res1 = 0 ; int argvi = 0; dXSARGS; if ((items < 1) || (items > 1)) { SWIG_croak("Usage: prelude_timer_init(timer);"); } res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_prelude_timer_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "prelude_timer_init" "', argument " "1"" of type '" "prelude_timer_t *""'"); } arg1 = (prelude_timer_t *)(argp1); prelude_timer_init(arg1); ST(argvi) = sv_newmortal(); XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_prelude_timer_init_list) { { prelude_timer_t *arg1 = (prelude_timer_t *) 0 ; void *argp1 = 0 ; int res1 = 0 ; int argvi = 0; dXSARGS; if ((items < 1) || (items > 1)) { SWIG_croak("Usage: prelude_timer_init_list(timer);"); } res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_prelude_timer_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "prelude_timer_init_list" "', argument " "1"" of type '" "prelude_timer_t *""'"); } arg1 = (prelude_timer_t *)(argp1); prelude_timer_init_list(arg1); ST(argvi) = sv_newmortal(); XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_prelude_timer_reset) { { prelude_timer_t *arg1 = (prelude_timer_t *) 0 ; void *argp1 = 0 ; int res1 = 0 ; int argvi = 0; dXSARGS; if ((items < 1) || (items > 1)) { SWIG_croak("Usage: prelude_timer_reset(timer);"); } res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_prelude_timer_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "prelude_timer_reset" "', argument " "1"" of type '" "prelude_timer_t *""'"); } arg1 = (prelude_timer_t *)(argp1); prelude_timer_reset(arg1); ST(argvi) = sv_newmortal(); XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_prelude_timer_destroy) { { prelude_timer_t *arg1 = (prelude_timer_t *) 0 ; void *argp1 = 0 ; int res1 = 0 ; int argvi = 0; dXSARGS; if ((items < 1) || (items > 1)) { SWIG_croak("Usage: prelude_timer_destroy(timer);"); } res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_prelude_timer_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "prelude_timer_destroy" "', argument " "1"" of type '" "prelude_timer_t *""'"); } arg1 = (prelude_timer_t *)(argp1); prelude_timer_destroy(arg1); ST(argvi) = sv_newmortal(); XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_prelude_timer_wake_up) { { int argvi = 0; dXSARGS; if ((items < 0) || (items > 0)) { SWIG_croak("Usage: prelude_timer_wake_up();"); } prelude_timer_wake_up(); ST(argvi) = sv_newmortal(); XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_prelude_timer_flush) { { int argvi = 0; dXSARGS; if ((items < 0) || (items > 0)) { SWIG_croak("Usage: prelude_timer_flush();"); } prelude_timer_flush(); ST(argvi) = sv_newmortal(); XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_prelude_timer_lock_critical_region) { { int argvi = 0; dXSARGS; if ((items < 0) || (items > 0)) { SWIG_croak("Usage: prelude_timer_lock_critical_region();"); } prelude_timer_lock_critical_region(); ST(argvi) = sv_newmortal(); XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_prelude_timer_unlock_critical_region) { { int argvi = 0; dXSARGS; if ((items < 0) || (items > 0)) { SWIG_croak("Usage: prelude_timer_unlock_critical_region();"); } prelude_timer_unlock_critical_region(); ST(argvi) = sv_newmortal(); XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap__prelude_timer_init) { { int argvi = 0; int result; dXSARGS; if ((items < 0) || (items > 0)) { SWIG_croak("Usage: _prelude_timer_init();"); } result = (int)_prelude_timer_init(); { ST(argvi) = newSViv(result); argvi++; } XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap__prelude_timer_fork_prepare) { { int argvi = 0; dXSARGS; if ((items < 0) || (items > 0)) { SWIG_croak("Usage: _prelude_timer_fork_prepare();"); } _prelude_timer_fork_prepare(); ST(argvi) = sv_newmortal(); XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap__prelude_timer_fork_parent) { { int argvi = 0; dXSARGS; if ((items < 0) || (items > 0)) { SWIG_croak("Usage: _prelude_timer_fork_parent();"); } _prelude_timer_fork_parent(); ST(argvi) = sv_newmortal(); XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap__prelude_timer_fork_child) { { int argvi = 0; dXSARGS; if ((items < 0) || (items > 0)) { SWIG_croak("Usage: _prelude_timer_fork_child();"); } _prelude_timer_fork_child(); ST(argvi) = sv_newmortal(); XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_prelude_error_is_verbose) { { prelude_error_t arg1 ; int val1 ; int ecode1 = 0 ; int argvi = 0; prelude_bool_t result; dXSARGS; if ((items < 1) || (items > 1)) { SWIG_croak("Usage: prelude_error_is_verbose(error);"); } ecode1 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(0), &val1); if (!SWIG_IsOK(ecode1)) { SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "prelude_error_is_verbose" "', argument " "1"" of type '" "prelude_error_t""'"); } arg1 = (prelude_error_t)(val1); result = (prelude_bool_t)prelude_error_is_verbose(arg1); ST(argvi) = SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(result)); argvi++ ; XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_prelude_error_get_code) { { prelude_error_t arg1 ; int val1 ; int ecode1 = 0 ; int argvi = 0; prelude_error_code_t result; dXSARGS; if ((items < 1) || (items > 1)) { SWIG_croak("Usage: prelude_error_get_code(error);"); } ecode1 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(0), &val1); if (!SWIG_IsOK(ecode1)) { SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "prelude_error_get_code" "', argument " "1"" of type '" "prelude_error_t""'"); } arg1 = (prelude_error_t)(val1); result = (prelude_error_code_t)prelude_error_get_code(arg1); ST(argvi) = SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(result)); argvi++ ; XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_prelude_error_get_source) { { prelude_error_t arg1 ; int val1 ; int ecode1 = 0 ; int argvi = 0; prelude_error_source_t result; dXSARGS; if ((items < 1) || (items > 1)) { SWIG_croak("Usage: prelude_error_get_source(error);"); } ecode1 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(0), &val1); if (!SWIG_IsOK(ecode1)) { SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "prelude_error_get_source" "', argument " "1"" of type '" "prelude_error_t""'"); } arg1 = (prelude_error_t)(val1); result = (prelude_error_source_t)prelude_error_get_source(arg1); ST(argvi) = SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(result)); argvi++ ; XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_prelude_error_code_from_errno) { { int arg1 ; int val1 ; int ecode1 = 0 ; int argvi = 0; prelude_error_code_t result; dXSARGS; if ((items < 1) || (items > 1)) { SWIG_croak("Usage: prelude_error_code_from_errno(err);"); } ecode1 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(0), &val1); if (!SWIG_IsOK(ecode1)) { SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "prelude_error_code_from_errno" "', argument " "1"" of type '" "int""'"); } arg1 = (int)(val1); result = (prelude_error_code_t)prelude_error_code_from_errno(arg1); ST(argvi) = SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(result)); argvi++ ; XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_prelude_error_make) { { prelude_error_source_t arg1 ; prelude_error_code_t arg2 ; int val1 ; int ecode1 = 0 ; int val2 ; int ecode2 = 0 ; int argvi = 0; prelude_error_t result; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: prelude_error_make(source,code);"); } ecode1 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(0), &val1); if (!SWIG_IsOK(ecode1)) { SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "prelude_error_make" "', argument " "1"" of type '" "prelude_error_source_t""'"); } arg1 = (prelude_error_source_t)(val1); ecode2 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(1), &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "prelude_error_make" "', argument " "2"" of type '" "prelude_error_code_t""'"); } arg2 = (prelude_error_code_t)(val2); result = (prelude_error_t)prelude_error_make(arg1,arg2); { ST(argvi) = newSViv(result); argvi++; } XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_prelude_error_make_from_errno) { { prelude_error_source_t arg1 ; int arg2 ; int val1 ; int ecode1 = 0 ; int val2 ; int ecode2 = 0 ; int argvi = 0; prelude_error_t result; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: prelude_error_make_from_errno(source,err);"); } ecode1 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(0), &val1); if (!SWIG_IsOK(ecode1)) { SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "prelude_error_make_from_errno" "', argument " "1"" of type '" "prelude_error_source_t""'"); } arg1 = (prelude_error_source_t)(val1); ecode2 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(1), &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "prelude_error_make_from_errno" "', argument " "2"" of type '" "int""'"); } arg2 = (int)(val2); result = (prelude_error_t)prelude_error_make_from_errno(arg1,arg2); { ST(argvi) = newSViv(result); argvi++; } XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_prelude_perror) { { prelude_error_t arg1 ; char *arg2 = (char *) 0 ; void *arg3 = 0 ; int val1 ; int ecode1 = 0 ; int res2 ; char *buf2 = 0 ; int alloc2 = 0 ; int argvi = 0; dXSARGS; if (items < 2) { SWIG_croak("Usage: prelude_perror(error,fmt,...);"); } ecode1 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(0), &val1); if (!SWIG_IsOK(ecode1)) { SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "prelude_perror" "', argument " "1"" of type '" "prelude_error_t""'"); } arg1 = (prelude_error_t)(val1); res2 = SWIG_AsCharPtrAndSize(ST(1), &buf2, NULL, &alloc2); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "prelude_perror" "', argument " "2"" of type '" "char const *""'"); } arg2 = (char *)(buf2); prelude_perror(arg1,(char const *)arg2,arg3); ST(argvi) = sv_newmortal(); if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); XSRETURN(argvi); fail: if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); SWIG_croak_null(); } } XS(_wrap_prelude_strerror) { { prelude_error_t arg1 ; int val1 ; int ecode1 = 0 ; int argvi = 0; char *result = 0 ; dXSARGS; if ((items < 1) || (items > 1)) { SWIG_croak("Usage: prelude_strerror(err);"); } ecode1 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(0), &val1); if (!SWIG_IsOK(ecode1)) { SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "prelude_strerror" "', argument " "1"" of type '" "prelude_error_t""'"); } arg1 = (prelude_error_t)(val1); result = (char *)prelude_strerror(arg1); ST(argvi) = SWIG_FromCharPtr((const char *)result); argvi++ ; XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_prelude_strsource) { { prelude_error_t arg1 ; int val1 ; int ecode1 = 0 ; int argvi = 0; char *result = 0 ; dXSARGS; if ((items < 1) || (items > 1)) { SWIG_croak("Usage: prelude_strsource(err);"); } ecode1 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(0), &val1); if (!SWIG_IsOK(ecode1)) { SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "prelude_strsource" "', argument " "1"" of type '" "prelude_error_t""'"); } arg1 = (prelude_error_t)(val1); result = (char *)prelude_strsource(arg1); ST(argvi) = SWIG_FromCharPtr((const char *)result); argvi++ ; XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_prelude_error_code_to_errno) { { prelude_error_code_t arg1 ; int val1 ; int ecode1 = 0 ; int argvi = 0; int result; dXSARGS; if ((items < 1) || (items > 1)) { SWIG_croak("Usage: prelude_error_code_to_errno(code);"); } ecode1 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(0), &val1); if (!SWIG_IsOK(ecode1)) { SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "prelude_error_code_to_errno" "', argument " "1"" of type '" "prelude_error_code_t""'"); } arg1 = (prelude_error_code_t)(val1); result = (int)prelude_error_code_to_errno(arg1); { ST(argvi) = newSViv(result); argvi++; } XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_prelude_error_verbose_make) { { prelude_error_source_t arg1 ; prelude_error_code_t arg2 ; char *arg3 = (char *) 0 ; void *arg4 = 0 ; int val1 ; int ecode1 = 0 ; int val2 ; int ecode2 = 0 ; int res3 ; char *buf3 = 0 ; int alloc3 = 0 ; int argvi = 0; prelude_error_t result; dXSARGS; if (items < 3) { SWIG_croak("Usage: prelude_error_verbose_make(source,code,fmt,...);"); } ecode1 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(0), &val1); if (!SWIG_IsOK(ecode1)) { SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "prelude_error_verbose_make" "', argument " "1"" of type '" "prelude_error_source_t""'"); } arg1 = (prelude_error_source_t)(val1); ecode2 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(1), &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "prelude_error_verbose_make" "', argument " "2"" of type '" "prelude_error_code_t""'"); } arg2 = (prelude_error_code_t)(val2); res3 = SWIG_AsCharPtrAndSize(ST(2), &buf3, NULL, &alloc3); if (!SWIG_IsOK(res3)) { SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "prelude_error_verbose_make" "', argument " "3"" of type '" "char const *""'"); } arg3 = (char *)(buf3); result = (prelude_error_t)prelude_error_verbose_make(arg1,arg2,(char const *)arg3,arg4); { ST(argvi) = newSViv(result); argvi++; } if (alloc3 == SWIG_NEWOBJ) free((char*)buf3); XSRETURN(argvi); fail: if (alloc3 == SWIG_NEWOBJ) free((char*)buf3); SWIG_croak_null(); } } XS(_wrap_prelude_error) { { prelude_error_code_t arg1 ; int val1 ; int ecode1 = 0 ; int argvi = 0; prelude_error_t result; dXSARGS; if ((items < 1) || (items > 1)) { SWIG_croak("Usage: prelude_error(code);"); } ecode1 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(0), &val1); if (!SWIG_IsOK(ecode1)) { SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "prelude_error" "', argument " "1"" of type '" "prelude_error_code_t""'"); } arg1 = (prelude_error_code_t)(val1); result = (prelude_error_t)prelude_error(arg1); { ST(argvi) = newSViv(result); argvi++; } XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_prelude_error_verbose) { { prelude_error_code_t arg1 ; char *arg2 = (char *) 0 ; void *arg3 = 0 ; int val1 ; int ecode1 = 0 ; int res2 ; char *buf2 = 0 ; int alloc2 = 0 ; int argvi = 0; prelude_error_t result; dXSARGS; if (items < 2) { SWIG_croak("Usage: prelude_error_verbose(code,fmt,...);"); } ecode1 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(0), &val1); if (!SWIG_IsOK(ecode1)) { SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "prelude_error_verbose" "', argument " "1"" of type '" "prelude_error_code_t""'"); } arg1 = (prelude_error_code_t)(val1); res2 = SWIG_AsCharPtrAndSize(ST(1), &buf2, NULL, &alloc2); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "prelude_error_verbose" "', argument " "2"" of type '" "char const *""'"); } arg2 = (char *)(buf2); result = (prelude_error_t)prelude_error_verbose(arg1,(char const *)arg2,arg3); { ST(argvi) = newSViv(result); argvi++; } if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); XSRETURN(argvi); fail: if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); SWIG_croak_null(); } } XS(_wrap_prelude_error_from_errno) { { int arg1 ; int val1 ; int ecode1 = 0 ; int argvi = 0; prelude_error_t result; dXSARGS; if ((items < 1) || (items > 1)) { SWIG_croak("Usage: prelude_error_from_errno(err);"); } ecode1 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(0), &val1); if (!SWIG_IsOK(ecode1)) { SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "prelude_error_from_errno" "', argument " "1"" of type '" "int""'"); } arg1 = (int)(val1); result = (prelude_error_t)prelude_error_from_errno(arg1); { ST(argvi) = newSViv(result); argvi++; } XSRETURN(argvi); fail: SWIG_croak_null(); } } /* -------- TYPE CONVERSION AND EQUIVALENCE RULES (BEGIN) -------- */ static swig_type_info _swigt__p_FILE = {"_p_FILE", "FILE *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_char = {"_p_char", "char *|int8_t *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_f_enum_prelude_log_t_p_q_const__char__void = {"_p_f_enum_prelude_log_t_p_q_const__char__void", "void (*)(enum prelude_log_t,char const *)|void (*)(prelude_log_t,char const *)", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_f_p_p_struct_prelude_msg_p_void__int = {"_p_f_p_p_struct_prelude_msg_p_void__int", "int (*)(struct prelude_msg **,void *)|int (*)(prelude_msg_t **,void *)", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_f_p_struct_idmef_value_p_void__int = {"_p_f_p_struct_idmef_value_p_void__int", "int (*)(struct idmef_value *,void *)|int (*)(idmef_value_t *,void *)", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_f_p_struct_prelude_client_p_struct_idmef_message__void = {"_p_f_p_struct_prelude_client_p_struct_idmef_message__void", "void (*)(prelude_client_t *,idmef_message_t *)|void (*)(struct prelude_client *,struct idmef_message *)", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_f_p_struct_prelude_connection_pool_enum_prelude_connection_pool_event_t__int = {"_p_f_p_struct_prelude_connection_pool_enum_prelude_connection_pool_event_t__int", "int (*)(prelude_connection_pool_t *,prelude_connection_pool_event_t)|int (*)(struct prelude_connection_pool *,enum prelude_connection_pool_event_t)", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_f_p_struct_prelude_connection_pool_enum_prelude_connection_pool_event_t_p_struct_prelude_connection__int = {"_p_f_p_struct_prelude_connection_pool_enum_prelude_connection_pool_event_t_p_struct_prelude_connection__int", "int (*)(prelude_connection_pool_t *,prelude_connection_pool_event_t,prelude_connection_t *)|int (*)(struct prelude_connection_pool *,enum prelude_connection_pool_event_t,struct prelude_connection *)", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_f_p_struct_prelude_connection_pool_enum_prelude_connection_pool_event_t_p_struct_prelude_connection_p_void__int = {"_p_f_p_struct_prelude_connection_pool_enum_prelude_connection_pool_event_t_p_struct_prelude_connection_p_void__int", "int (*)(prelude_connection_pool_t *,prelude_connection_pool_event_t,prelude_connection_t *,void *)|int (*)(struct prelude_connection_pool *,enum prelude_connection_pool_event_t,struct prelude_connection *,void *)", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_f_p_struct_prelude_msgbuf_p_struct_prelude_msg__int = {"_p_f_p_struct_prelude_msgbuf_p_struct_prelude_msg__int", "int (*)(struct prelude_msgbuf *,struct prelude_msg *)|int (*)(prelude_msgbuf_t *,prelude_msg_t *)", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_f_p_struct_prelude_option_p_prelude_string_t_p_void__int = {"_p_f_p_struct_prelude_option_p_prelude_string_t_p_void__int", "int (*)(prelude_option_t *,prelude_string_t *,void *)|prelude_option_destroy_callback_t|prelude_option_get_callback_t|prelude_option_commit_callback_t|int (*)(struct prelude_option *,prelude_string_t *,void *)", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_f_p_struct_prelude_option_p_q_const__char_p_prelude_string_t_p_void__int = {"_p_f_p_struct_prelude_option_p_q_const__char_p_prelude_string_t_p_void__int", "int (*)(struct prelude_option *,char const *,prelude_string_t *,void *)|int (*)(prelude_option_t *,char const *,prelude_string_t *,void *)|prelude_option_set_callback_t", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_f_p_void__void = {"_p_f_p_void__void", "void (*)(void *)", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_idmef_action = {"_p_idmef_action", "idmef_action_t *|struct idmef_action *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_idmef_action_category_t = {"_p_idmef_action_category_t", "enum idmef_action_category_t *|idmef_action_category_t *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_idmef_additional_data = {"_p_idmef_additional_data", "struct idmef_additional_data *|idmef_additional_data_t *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_idmef_additional_data_type_t = {"_p_idmef_additional_data_type_t", "enum idmef_additional_data_type_t *|idmef_additional_data_type_t *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_idmef_address = {"_p_idmef_address", "idmef_address_t *|struct idmef_address *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_idmef_address_category_t = {"_p_idmef_address_category_t", "enum idmef_address_category_t *|idmef_address_category_t *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_idmef_alert = {"_p_idmef_alert", "idmef_alert_t *|struct idmef_alert *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_idmef_alert_type_t = {"_p_idmef_alert_type_t", "enum idmef_alert_type_t *|idmef_alert_type_t *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_idmef_alertident = {"_p_idmef_alertident", "struct idmef_alertident *|idmef_alertident_t *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_idmef_analyzer = {"_p_idmef_analyzer", "struct idmef_analyzer *|idmef_analyzer_t *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_idmef_assessment = {"_p_idmef_assessment", "idmef_assessment_t *|struct idmef_assessment *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_idmef_checksum = {"_p_idmef_checksum", "struct idmef_checksum *|idmef_checksum_t *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_idmef_checksum_algorithm_t = {"_p_idmef_checksum_algorithm_t", "enum idmef_checksum_algorithm_t *|idmef_checksum_algorithm_t *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_idmef_classification = {"_p_idmef_classification", "idmef_classification_t *|struct idmef_classification *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_idmef_confidence = {"_p_idmef_confidence", "struct idmef_confidence *|idmef_confidence_t *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_idmef_confidence_rating_t = {"_p_idmef_confidence_rating_t", "enum idmef_confidence_rating_t *|idmef_confidence_rating_t *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_idmef_correlation_alert = {"_p_idmef_correlation_alert", "idmef_correlation_alert_t *|struct idmef_correlation_alert *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_idmef_criteria = {"_p_idmef_criteria", "idmef_criteria_t *|struct idmef_criteria *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_idmef_criterion = {"_p_idmef_criterion", "idmef_criterion_t *|struct idmef_criterion *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_idmef_criterion_operator_t = {"_p_idmef_criterion_operator_t", "enum idmef_criterion_operator_t *|idmef_criterion_operator_t *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_idmef_criterion_value_t = {"_p_idmef_criterion_value_t", "idmef_criterion_value_t *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_idmef_data_t = {"_p_idmef_data_t", "idmef_data_t *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_idmef_data_t_data = {"_p_idmef_data_t_data", "idmef_data_t_data *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_idmef_data_type_t = {"_p_idmef_data_type_t", "enum idmef_data_type_t *|idmef_data_type_t *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_idmef_file = {"_p_idmef_file", "idmef_file_t *|struct idmef_file *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_idmef_file_access = {"_p_idmef_file_access", "struct idmef_file_access *|idmef_file_access_t *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_idmef_file_category_t = {"_p_idmef_file_category_t", "enum idmef_file_category_t *|idmef_file_category_t *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_idmef_file_fstype_t = {"_p_idmef_file_fstype_t", "enum idmef_file_fstype_t *|idmef_file_fstype_t *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_idmef_heartbeat = {"_p_idmef_heartbeat", "idmef_heartbeat_t *|struct idmef_heartbeat *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_idmef_impact = {"_p_idmef_impact", "idmef_impact_t *|struct idmef_impact *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_idmef_impact_completion_t = {"_p_idmef_impact_completion_t", "enum idmef_impact_completion_t *|idmef_impact_completion_t *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_idmef_impact_severity_t = {"_p_idmef_impact_severity_t", "enum idmef_impact_severity_t *|idmef_impact_severity_t *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_idmef_impact_type_t = {"_p_idmef_impact_type_t", "enum idmef_impact_type_t *|idmef_impact_type_t *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_idmef_inode = {"_p_idmef_inode", "struct idmef_inode *|idmef_inode_t *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_idmef_linkage = {"_p_idmef_linkage", "struct idmef_linkage *|idmef_linkage_t *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_idmef_linkage_category_t = {"_p_idmef_linkage_category_t", "enum idmef_linkage_category_t *|idmef_linkage_category_t *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_idmef_message = {"_p_idmef_message", "struct idmef_message *|idmef_message_t *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_idmef_message_type_t = {"_p_idmef_message_type_t", "enum idmef_message_type_t *|idmef_message_type_t *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_idmef_node = {"_p_idmef_node", "struct idmef_node *|idmef_node_t *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_idmef_node_category_t = {"_p_idmef_node_category_t", "enum idmef_node_category_t *|idmef_node_category_t *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_idmef_overflow_alert = {"_p_idmef_overflow_alert", "idmef_overflow_alert_t *|struct idmef_overflow_alert *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_idmef_path = {"_p_idmef_path", "idmef_path_t *|struct idmef_path *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_idmef_process = {"_p_idmef_process", "struct idmef_process *|idmef_process_t *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_idmef_reference = {"_p_idmef_reference", "struct idmef_reference *|idmef_reference_t *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_idmef_reference_origin_t = {"_p_idmef_reference_origin_t", "enum idmef_reference_origin_t *|idmef_reference_origin_t *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_idmef_service = {"_p_idmef_service", "idmef_service_t *|struct idmef_service *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_idmef_service_type_t = {"_p_idmef_service_type_t", "enum idmef_service_type_t *|idmef_service_type_t *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_idmef_snmp_service = {"_p_idmef_snmp_service", "idmef_snmp_service_t *|struct idmef_snmp_service *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_idmef_source = {"_p_idmef_source", "struct idmef_source *|idmef_source_t *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_idmef_source_spoofed_t = {"_p_idmef_source_spoofed_t", "enum idmef_source_spoofed_t *|idmef_source_spoofed_t *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_idmef_target = {"_p_idmef_target", "idmef_target_t *|struct idmef_target *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_idmef_target_decoy_t = {"_p_idmef_target_decoy_t", "enum idmef_target_decoy_t *|idmef_target_decoy_t *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_idmef_time = {"_p_idmef_time", "struct idmef_time *|idmef_time_t *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_idmef_tool_alert = {"_p_idmef_tool_alert", "idmef_tool_alert_t *|struct idmef_tool_alert *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_idmef_user = {"_p_idmef_user", "struct idmef_user *|idmef_user_t *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_idmef_user_category_t = {"_p_idmef_user_category_t", "enum idmef_user_category_t *|idmef_user_category_t *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_idmef_user_id = {"_p_idmef_user_id", "struct idmef_user_id *|idmef_user_id_t *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_idmef_user_id_type_t = {"_p_idmef_user_id_type_t", "enum idmef_user_id_type_t *|idmef_user_id_type_t *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_idmef_value = {"_p_idmef_value", "struct idmef_value *|idmef_value_t *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_idmef_value_type_class_t = {"_p_idmef_value_type_class_t", "idmef_value_type_class_t *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_idmef_value_type_data_t = {"_p_idmef_value_type_data_t", "idmef_value_type_data_t *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_idmef_value_type_enum_t = {"_p_idmef_value_type_enum_t", "idmef_value_type_enum_t *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_idmef_value_type_id_t = {"_p_idmef_value_type_id_t", "enum idmef_value_type_id_t *|idmef_value_type_id_t *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_idmef_value_type_t = {"_p_idmef_value_type_t", "idmef_value_type_t *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_idmef_web_service = {"_p_idmef_web_service", "idmef_web_service_t *|struct idmef_web_service *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_int = {"_p_int", "int *|int32_t *|prelude_uid_t *|prelude_gid_t *|idmef_class_child_id_t *|idmef_class_id_t *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_long_long = {"_p_long_long", "int64_t *|long long *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_p_char = {"_p_p_char", "char **", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_p_float = {"_p_p_float", "float **", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_p_idmef_action = {"_p_p_idmef_action", "struct idmef_action **|idmef_action_t **", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_p_idmef_action_category_t = {"_p_p_idmef_action_category_t", "enum idmef_action_category_t **|idmef_action_category_t **", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_p_idmef_additional_data = {"_p_p_idmef_additional_data", "idmef_additional_data_t **|struct idmef_additional_data **", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_p_idmef_additional_data_type_t = {"_p_p_idmef_additional_data_type_t", "enum idmef_additional_data_type_t **|idmef_additional_data_type_t **", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_p_idmef_address = {"_p_p_idmef_address", "idmef_address_t **|struct idmef_address **", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_p_idmef_address_category_t = {"_p_p_idmef_address_category_t", "enum idmef_address_category_t **|idmef_address_category_t **", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_p_idmef_alert = {"_p_p_idmef_alert", "struct idmef_alert **|idmef_alert_t **", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_p_idmef_alertident = {"_p_p_idmef_alertident", "struct idmef_alertident **|idmef_alertident_t **", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_p_idmef_analyzer = {"_p_p_idmef_analyzer", "idmef_analyzer_t **|struct idmef_analyzer **", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_p_idmef_assessment = {"_p_p_idmef_assessment", "struct idmef_assessment **|idmef_assessment_t **", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_p_idmef_checksum = {"_p_p_idmef_checksum", "struct idmef_checksum **|idmef_checksum_t **", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_p_idmef_checksum_algorithm_t = {"_p_p_idmef_checksum_algorithm_t", "enum idmef_checksum_algorithm_t **|idmef_checksum_algorithm_t **", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_p_idmef_classification = {"_p_p_idmef_classification", "struct idmef_classification **|idmef_classification_t **", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_p_idmef_confidence = {"_p_p_idmef_confidence", "struct idmef_confidence **|idmef_confidence_t **", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_p_idmef_confidence_rating_t = {"_p_p_idmef_confidence_rating_t", "enum idmef_confidence_rating_t **|idmef_confidence_rating_t **", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_p_idmef_correlation_alert = {"_p_p_idmef_correlation_alert", "struct idmef_correlation_alert **|idmef_correlation_alert_t **", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_p_idmef_criteria = {"_p_p_idmef_criteria", "struct idmef_criteria **|idmef_criteria_t **", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_p_idmef_criterion = {"_p_p_idmef_criterion", "struct idmef_criterion **|idmef_criterion_t **", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_p_idmef_data_t = {"_p_p_idmef_data_t", "idmef_data_t **", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_p_idmef_file = {"_p_p_idmef_file", "struct idmef_file **|idmef_file_t **", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_p_idmef_file_access = {"_p_p_idmef_file_access", "idmef_file_access_t **|struct idmef_file_access **", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_p_idmef_file_category_t = {"_p_p_idmef_file_category_t", "enum idmef_file_category_t **|idmef_file_category_t **", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_p_idmef_file_fstype_t = {"_p_p_idmef_file_fstype_t", "enum idmef_file_fstype_t **|idmef_file_fstype_t **", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_p_idmef_heartbeat = {"_p_p_idmef_heartbeat", "struct idmef_heartbeat **|idmef_heartbeat_t **", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_p_idmef_impact = {"_p_p_idmef_impact", "struct idmef_impact **|idmef_impact_t **", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_p_idmef_impact_completion_t = {"_p_p_idmef_impact_completion_t", "enum idmef_impact_completion_t **|idmef_impact_completion_t **", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_p_idmef_impact_severity_t = {"_p_p_idmef_impact_severity_t", "enum idmef_impact_severity_t **|idmef_impact_severity_t **", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_p_idmef_impact_type_t = {"_p_p_idmef_impact_type_t", "enum idmef_impact_type_t **|idmef_impact_type_t **", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_p_idmef_inode = {"_p_p_idmef_inode", "struct idmef_inode **|idmef_inode_t **", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_p_idmef_linkage = {"_p_p_idmef_linkage", "idmef_linkage_t **|struct idmef_linkage **", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_p_idmef_linkage_category_t = {"_p_p_idmef_linkage_category_t", "enum idmef_linkage_category_t **|idmef_linkage_category_t **", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_p_idmef_message = {"_p_p_idmef_message", "idmef_message_t **|struct idmef_message **", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_p_idmef_node = {"_p_p_idmef_node", "struct idmef_node **|idmef_node_t **", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_p_idmef_node_category_t = {"_p_p_idmef_node_category_t", "enum idmef_node_category_t **|idmef_node_category_t **", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_p_idmef_overflow_alert = {"_p_p_idmef_overflow_alert", "struct idmef_overflow_alert **|idmef_overflow_alert_t **", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_p_idmef_path = {"_p_p_idmef_path", "idmef_path_t **|struct idmef_path **", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_p_idmef_process = {"_p_p_idmef_process", "idmef_process_t **|struct idmef_process **", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_p_idmef_reference = {"_p_p_idmef_reference", "struct idmef_reference **|idmef_reference_t **", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_p_idmef_reference_origin_t = {"_p_p_idmef_reference_origin_t", "enum idmef_reference_origin_t **|idmef_reference_origin_t **", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_p_idmef_service = {"_p_p_idmef_service", "idmef_service_t **|struct idmef_service **", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_p_idmef_snmp_service = {"_p_p_idmef_snmp_service", "idmef_snmp_service_t **|struct idmef_snmp_service **", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_p_idmef_source = {"_p_p_idmef_source", "struct idmef_source **|idmef_source_t **", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_p_idmef_source_spoofed_t = {"_p_p_idmef_source_spoofed_t", "enum idmef_source_spoofed_t **|idmef_source_spoofed_t **", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_p_idmef_target = {"_p_p_idmef_target", "struct idmef_target **|idmef_target_t **", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_p_idmef_target_decoy_t = {"_p_p_idmef_target_decoy_t", "enum idmef_target_decoy_t **|idmef_target_decoy_t **", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_p_idmef_time = {"_p_p_idmef_time", "idmef_time_t **|struct idmef_time **", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_p_idmef_tool_alert = {"_p_p_idmef_tool_alert", "struct idmef_tool_alert **|idmef_tool_alert_t **", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_p_idmef_user = {"_p_p_idmef_user", "idmef_user_t **|struct idmef_user **", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_p_idmef_user_category_t = {"_p_p_idmef_user_category_t", "enum idmef_user_category_t **|idmef_user_category_t **", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_p_idmef_user_id = {"_p_p_idmef_user_id", "idmef_user_id_t **|struct idmef_user_id **", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_p_idmef_user_id_type_t = {"_p_p_idmef_user_id_type_t", "enum idmef_user_id_type_t **|idmef_user_id_type_t **", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_p_idmef_value = {"_p_p_idmef_value", "idmef_value_t **|struct idmef_value **", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_p_idmef_web_service = {"_p_p_idmef_web_service", "idmef_web_service_t **|struct idmef_web_service **", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_p_int = {"_p_p_int", "int32_t **|int **", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_p_prelude_client = {"_p_p_prelude_client", "struct prelude_client **|prelude_client_t **", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_p_prelude_client_profile = {"_p_p_prelude_client_profile", "struct prelude_client_profile **|prelude_client_profile_t **", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_p_prelude_connection = {"_p_p_prelude_connection", "struct prelude_connection **|prelude_connection_t **", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_p_prelude_connection_pool = {"_p_p_prelude_connection_pool", "struct prelude_connection_pool **|prelude_connection_pool_t **", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_p_prelude_msg = {"_p_p_prelude_msg", "prelude_msg_t **|struct prelude_msg **", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_p_prelude_msgbuf = {"_p_p_prelude_msgbuf", "struct prelude_msgbuf **|prelude_msgbuf_t **", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_p_prelude_option = {"_p_p_prelude_option", "struct prelude_option **|prelude_option_t **", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_p_prelude_option_context = {"_p_p_prelude_option_context", "struct prelude_option_context **|prelude_option_context_t **", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_p_prelude_string_t = {"_p_p_prelude_string_t", "prelude_string_t **", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_p_unsigned_char = {"_p_p_unsigned_char", "uint8_t **|unsigned char **", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_p_unsigned_int = {"_p_p_unsigned_int", "uint32_t **|unsigned int **", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_p_unsigned_long_long = {"_p_p_unsigned_long_long", "unsigned long long **|uint64_t **", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_p_unsigned_short = {"_p_p_unsigned_short", "unsigned short **|uint16_t **", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_p_void = {"_p_p_void", "void **", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_prelude_bool_t = {"_p_prelude_bool_t", "enum prelude_bool_t *|prelude_bool_t *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_prelude_client = {"_p_prelude_client", "prelude_client_t *|struct prelude_client *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_prelude_client_exit_status_t = {"_p_prelude_client_exit_status_t", "enum prelude_client_exit_status_t *|prelude_client_exit_status_t *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_prelude_client_flags_t = {"_p_prelude_client_flags_t", "enum prelude_client_flags_t *|prelude_client_flags_t *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_prelude_client_profile = {"_p_prelude_client_profile", "prelude_client_profile_t *|struct prelude_client_profile *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_prelude_connection = {"_p_prelude_connection", "prelude_connection_t *|struct prelude_connection *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_prelude_connection_permission_t = {"_p_prelude_connection_permission_t", "enum prelude_connection_permission_t *|prelude_connection_permission_t *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_prelude_connection_pool = {"_p_prelude_connection_pool", "struct prelude_connection_pool *|prelude_connection_pool_t *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_prelude_connection_pool_event_t = {"_p_prelude_connection_pool_event_t", "enum prelude_connection_pool_event_t *|prelude_connection_pool_event_t *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_prelude_connection_pool_flags_t = {"_p_prelude_connection_pool_flags_t", "enum prelude_connection_pool_flags_t *|prelude_connection_pool_flags_t *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_prelude_connection_state_t = {"_p_prelude_connection_state_t", "enum prelude_connection_state_t *|prelude_connection_state_t *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_prelude_error_code_t = {"_p_prelude_error_code_t", "enum prelude_error_code_t *|prelude_error_code_t *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_prelude_error_source_t = {"_p_prelude_error_source_t", "enum prelude_error_source_t *|prelude_error_source_t *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_prelude_ident_t = {"_p_prelude_ident_t", "prelude_ident_t *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_prelude_io_t = {"_p_prelude_io_t", "prelude_io_t *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_prelude_list_t = {"_p_prelude_list_t", "prelude_list_t *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_prelude_log_flags_t = {"_p_prelude_log_flags_t", "enum prelude_log_flags_t *|prelude_log_flags_t *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_prelude_log_t = {"_p_prelude_log_t", "enum prelude_log_t *|prelude_log_t *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_prelude_msg = {"_p_prelude_msg", "struct prelude_msg *|prelude_msg_t *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_prelude_msg_priority_t = {"_p_prelude_msg_priority_t", "enum prelude_msg_priority_t *|prelude_msg_priority_t *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_prelude_msgbuf = {"_p_prelude_msgbuf", "struct prelude_msgbuf *|prelude_msgbuf_t *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_prelude_msgbuf_flags_t = {"_p_prelude_msgbuf_flags_t", "enum prelude_msgbuf_flags_t *|prelude_msgbuf_flags_t *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_prelude_option = {"_p_prelude_option", "prelude_option_t *|struct prelude_option *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_prelude_option_argument_t = {"_p_prelude_option_argument_t", "enum prelude_option_argument_t *|prelude_option_argument_t *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_prelude_option_context = {"_p_prelude_option_context", "struct prelude_option_context *|prelude_option_context_t *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_prelude_option_input_type_t = {"_p_prelude_option_input_type_t", "enum prelude_option_input_type_t *|prelude_option_input_type_t *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_prelude_option_priority_t = {"_p_prelude_option_priority_t", "enum prelude_option_priority_t *|prelude_option_priority_t *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_prelude_option_type_t = {"_p_prelude_option_type_t", "enum prelude_option_type_t *|prelude_option_type_t *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_prelude_option_warning_t = {"_p_prelude_option_warning_t", "enum prelude_option_warning_t *|prelude_option_warning_t *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_prelude_string_t = {"_p_prelude_string_t", "prelude_string_t *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_prelude_timer_t = {"_p_prelude_timer_t", "prelude_timer_t *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_short = {"_p_short", "short *|int16_t *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_ssize_t = {"_p_ssize_t", "ssize_t *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_time_t = {"_p_time_t", "time_t *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_timeval = {"_p_timeval", "struct timeval *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_unsigned_char = {"_p_unsigned_char", "unsigned char *|uint8_t *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_unsigned_int = {"_p_unsigned_int", "uint32_t *|unsigned int *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_unsigned_long_long = {"_p_unsigned_long_long", "uint64_t *|unsigned long long *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_unsigned_short = {"_p_unsigned_short", "unsigned short *|uint16_t *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_void = {"_p_void", "void *", 0, 0, (void*)0, 0}; static swig_type_info *swig_type_initial[] = { &_swigt__p_FILE, &_swigt__p_char, &_swigt__p_f_enum_prelude_log_t_p_q_const__char__void, &_swigt__p_f_p_p_struct_prelude_msg_p_void__int, &_swigt__p_f_p_struct_idmef_value_p_void__int, &_swigt__p_f_p_struct_prelude_client_p_struct_idmef_message__void, &_swigt__p_f_p_struct_prelude_connection_pool_enum_prelude_connection_pool_event_t__int, &_swigt__p_f_p_struct_prelude_connection_pool_enum_prelude_connection_pool_event_t_p_struct_prelude_connection__int, &_swigt__p_f_p_struct_prelude_connection_pool_enum_prelude_connection_pool_event_t_p_struct_prelude_connection_p_void__int, &_swigt__p_f_p_struct_prelude_msgbuf_p_struct_prelude_msg__int, &_swigt__p_f_p_struct_prelude_option_p_prelude_string_t_p_void__int, &_swigt__p_f_p_struct_prelude_option_p_q_const__char_p_prelude_string_t_p_void__int, &_swigt__p_f_p_void__void, &_swigt__p_idmef_action, &_swigt__p_idmef_action_category_t, &_swigt__p_idmef_additional_data, &_swigt__p_idmef_additional_data_type_t, &_swigt__p_idmef_address, &_swigt__p_idmef_address_category_t, &_swigt__p_idmef_alert, &_swigt__p_idmef_alert_type_t, &_swigt__p_idmef_alertident, &_swigt__p_idmef_analyzer, &_swigt__p_idmef_assessment, &_swigt__p_idmef_checksum, &_swigt__p_idmef_checksum_algorithm_t, &_swigt__p_idmef_classification, &_swigt__p_idmef_confidence, &_swigt__p_idmef_confidence_rating_t, &_swigt__p_idmef_correlation_alert, &_swigt__p_idmef_criteria, &_swigt__p_idmef_criterion, &_swigt__p_idmef_criterion_operator_t, &_swigt__p_idmef_criterion_value_t, &_swigt__p_idmef_data_t, &_swigt__p_idmef_data_t_data, &_swigt__p_idmef_data_type_t, &_swigt__p_idmef_file, &_swigt__p_idmef_file_access, &_swigt__p_idmef_file_category_t, &_swigt__p_idmef_file_fstype_t, &_swigt__p_idmef_heartbeat, &_swigt__p_idmef_impact, &_swigt__p_idmef_impact_completion_t, &_swigt__p_idmef_impact_severity_t, &_swigt__p_idmef_impact_type_t, &_swigt__p_idmef_inode, &_swigt__p_idmef_linkage, &_swigt__p_idmef_linkage_category_t, &_swigt__p_idmef_message, &_swigt__p_idmef_message_type_t, &_swigt__p_idmef_node, &_swigt__p_idmef_node_category_t, &_swigt__p_idmef_overflow_alert, &_swigt__p_idmef_path, &_swigt__p_idmef_process, &_swigt__p_idmef_reference, &_swigt__p_idmef_reference_origin_t, &_swigt__p_idmef_service, &_swigt__p_idmef_service_type_t, &_swigt__p_idmef_snmp_service, &_swigt__p_idmef_source, &_swigt__p_idmef_source_spoofed_t, &_swigt__p_idmef_target, &_swigt__p_idmef_target_decoy_t, &_swigt__p_idmef_time, &_swigt__p_idmef_tool_alert, &_swigt__p_idmef_user, &_swigt__p_idmef_user_category_t, &_swigt__p_idmef_user_id, &_swigt__p_idmef_user_id_type_t, &_swigt__p_idmef_value, &_swigt__p_idmef_value_type_class_t, &_swigt__p_idmef_value_type_data_t, &_swigt__p_idmef_value_type_enum_t, &_swigt__p_idmef_value_type_id_t, &_swigt__p_idmef_value_type_t, &_swigt__p_idmef_web_service, &_swigt__p_int, &_swigt__p_long_long, &_swigt__p_p_char, &_swigt__p_p_float, &_swigt__p_p_idmef_action, &_swigt__p_p_idmef_action_category_t, &_swigt__p_p_idmef_additional_data, &_swigt__p_p_idmef_additional_data_type_t, &_swigt__p_p_idmef_address, &_swigt__p_p_idmef_address_category_t, &_swigt__p_p_idmef_alert, &_swigt__p_p_idmef_alertident, &_swigt__p_p_idmef_analyzer, &_swigt__p_p_idmef_assessment, &_swigt__p_p_idmef_checksum, &_swigt__p_p_idmef_checksum_algorithm_t, &_swigt__p_p_idmef_classification, &_swigt__p_p_idmef_confidence, &_swigt__p_p_idmef_confidence_rating_t, &_swigt__p_p_idmef_correlation_alert, &_swigt__p_p_idmef_criteria, &_swigt__p_p_idmef_criterion, &_swigt__p_p_idmef_data_t, &_swigt__p_p_idmef_file, &_swigt__p_p_idmef_file_access, &_swigt__p_p_idmef_file_category_t, &_swigt__p_p_idmef_file_fstype_t, &_swigt__p_p_idmef_heartbeat, &_swigt__p_p_idmef_impact, &_swigt__p_p_idmef_impact_completion_t, &_swigt__p_p_idmef_impact_severity_t, &_swigt__p_p_idmef_impact_type_t, &_swigt__p_p_idmef_inode, &_swigt__p_p_idmef_linkage, &_swigt__p_p_idmef_linkage_category_t, &_swigt__p_p_idmef_message, &_swigt__p_p_idmef_node, &_swigt__p_p_idmef_node_category_t, &_swigt__p_p_idmef_overflow_alert, &_swigt__p_p_idmef_path, &_swigt__p_p_idmef_process, &_swigt__p_p_idmef_reference, &_swigt__p_p_idmef_reference_origin_t, &_swigt__p_p_idmef_service, &_swigt__p_p_idmef_snmp_service, &_swigt__p_p_idmef_source, &_swigt__p_p_idmef_source_spoofed_t, &_swigt__p_p_idmef_target, &_swigt__p_p_idmef_target_decoy_t, &_swigt__p_p_idmef_time, &_swigt__p_p_idmef_tool_alert, &_swigt__p_p_idmef_user, &_swigt__p_p_idmef_user_category_t, &_swigt__p_p_idmef_user_id, &_swigt__p_p_idmef_user_id_type_t, &_swigt__p_p_idmef_value, &_swigt__p_p_idmef_web_service, &_swigt__p_p_int, &_swigt__p_p_prelude_client, &_swigt__p_p_prelude_client_profile, &_swigt__p_p_prelude_connection, &_swigt__p_p_prelude_connection_pool, &_swigt__p_p_prelude_msg, &_swigt__p_p_prelude_msgbuf, &_swigt__p_p_prelude_option, &_swigt__p_p_prelude_option_context, &_swigt__p_p_prelude_string_t, &_swigt__p_p_unsigned_char, &_swigt__p_p_unsigned_int, &_swigt__p_p_unsigned_long_long, &_swigt__p_p_unsigned_short, &_swigt__p_p_void, &_swigt__p_prelude_bool_t, &_swigt__p_prelude_client, &_swigt__p_prelude_client_exit_status_t, &_swigt__p_prelude_client_flags_t, &_swigt__p_prelude_client_profile, &_swigt__p_prelude_connection, &_swigt__p_prelude_connection_permission_t, &_swigt__p_prelude_connection_pool, &_swigt__p_prelude_connection_pool_event_t, &_swigt__p_prelude_connection_pool_flags_t, &_swigt__p_prelude_connection_state_t, &_swigt__p_prelude_error_code_t, &_swigt__p_prelude_error_source_t, &_swigt__p_prelude_ident_t, &_swigt__p_prelude_io_t, &_swigt__p_prelude_list_t, &_swigt__p_prelude_log_flags_t, &_swigt__p_prelude_log_t, &_swigt__p_prelude_msg, &_swigt__p_prelude_msg_priority_t, &_swigt__p_prelude_msgbuf, &_swigt__p_prelude_msgbuf_flags_t, &_swigt__p_prelude_option, &_swigt__p_prelude_option_argument_t, &_swigt__p_prelude_option_context, &_swigt__p_prelude_option_input_type_t, &_swigt__p_prelude_option_priority_t, &_swigt__p_prelude_option_type_t, &_swigt__p_prelude_option_warning_t, &_swigt__p_prelude_string_t, &_swigt__p_prelude_timer_t, &_swigt__p_short, &_swigt__p_ssize_t, &_swigt__p_time_t, &_swigt__p_timeval, &_swigt__p_unsigned_char, &_swigt__p_unsigned_int, &_swigt__p_unsigned_long_long, &_swigt__p_unsigned_short, &_swigt__p_void, }; static swig_cast_info _swigc__p_FILE[] = { {&_swigt__p_FILE, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_char[] = { {&_swigt__p_char, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_f_enum_prelude_log_t_p_q_const__char__void[] = { {&_swigt__p_f_enum_prelude_log_t_p_q_const__char__void, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_f_p_p_struct_prelude_msg_p_void__int[] = { {&_swigt__p_f_p_p_struct_prelude_msg_p_void__int, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_f_p_struct_idmef_value_p_void__int[] = { {&_swigt__p_f_p_struct_idmef_value_p_void__int, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_f_p_struct_prelude_client_p_struct_idmef_message__void[] = { {&_swigt__p_f_p_struct_prelude_client_p_struct_idmef_message__void, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_f_p_struct_prelude_connection_pool_enum_prelude_connection_pool_event_t__int[] = { {&_swigt__p_f_p_struct_prelude_connection_pool_enum_prelude_connection_pool_event_t__int, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_f_p_struct_prelude_connection_pool_enum_prelude_connection_pool_event_t_p_struct_prelude_connection__int[] = { {&_swigt__p_f_p_struct_prelude_connection_pool_enum_prelude_connection_pool_event_t_p_struct_prelude_connection__int, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_f_p_struct_prelude_connection_pool_enum_prelude_connection_pool_event_t_p_struct_prelude_connection_p_void__int[] = { {&_swigt__p_f_p_struct_prelude_connection_pool_enum_prelude_connection_pool_event_t_p_struct_prelude_connection_p_void__int, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_f_p_struct_prelude_msgbuf_p_struct_prelude_msg__int[] = { {&_swigt__p_f_p_struct_prelude_msgbuf_p_struct_prelude_msg__int, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_f_p_struct_prelude_option_p_prelude_string_t_p_void__int[] = { {&_swigt__p_f_p_struct_prelude_option_p_prelude_string_t_p_void__int, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_f_p_struct_prelude_option_p_q_const__char_p_prelude_string_t_p_void__int[] = { {&_swigt__p_f_p_struct_prelude_option_p_q_const__char_p_prelude_string_t_p_void__int, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_f_p_void__void[] = { {&_swigt__p_f_p_void__void, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_idmef_action[] = { {&_swigt__p_idmef_action, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_idmef_action_category_t[] = { {&_swigt__p_idmef_action_category_t, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_idmef_additional_data[] = { {&_swigt__p_idmef_additional_data, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_idmef_additional_data_type_t[] = { {&_swigt__p_idmef_additional_data_type_t, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_idmef_address[] = { {&_swigt__p_idmef_address, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_idmef_address_category_t[] = { {&_swigt__p_idmef_address_category_t, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_idmef_alert[] = { {&_swigt__p_idmef_alert, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_idmef_alert_type_t[] = { {&_swigt__p_idmef_alert_type_t, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_idmef_alertident[] = { {&_swigt__p_idmef_alertident, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_idmef_analyzer[] = { {&_swigt__p_idmef_analyzer, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_idmef_assessment[] = { {&_swigt__p_idmef_assessment, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_idmef_checksum[] = { {&_swigt__p_idmef_checksum, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_idmef_checksum_algorithm_t[] = { {&_swigt__p_idmef_checksum_algorithm_t, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_idmef_classification[] = { {&_swigt__p_idmef_classification, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_idmef_confidence[] = { {&_swigt__p_idmef_confidence, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_idmef_confidence_rating_t[] = { {&_swigt__p_idmef_confidence_rating_t, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_idmef_correlation_alert[] = { {&_swigt__p_idmef_correlation_alert, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_idmef_criteria[] = { {&_swigt__p_idmef_criteria, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_idmef_criterion[] = { {&_swigt__p_idmef_criterion, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_idmef_criterion_operator_t[] = { {&_swigt__p_idmef_criterion_operator_t, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_idmef_criterion_value_t[] = { {&_swigt__p_idmef_criterion_value_t, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_idmef_data_t[] = { {&_swigt__p_idmef_data_t, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_idmef_data_t_data[] = { {&_swigt__p_idmef_data_t_data, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_idmef_data_type_t[] = { {&_swigt__p_idmef_data_type_t, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_idmef_file[] = { {&_swigt__p_idmef_file, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_idmef_file_access[] = { {&_swigt__p_idmef_file_access, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_idmef_file_category_t[] = { {&_swigt__p_idmef_file_category_t, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_idmef_file_fstype_t[] = { {&_swigt__p_idmef_file_fstype_t, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_idmef_heartbeat[] = { {&_swigt__p_idmef_heartbeat, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_idmef_impact[] = { {&_swigt__p_idmef_impact, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_idmef_impact_completion_t[] = { {&_swigt__p_idmef_impact_completion_t, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_idmef_impact_severity_t[] = { {&_swigt__p_idmef_impact_severity_t, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_idmef_impact_type_t[] = { {&_swigt__p_idmef_impact_type_t, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_idmef_inode[] = { {&_swigt__p_idmef_inode, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_idmef_linkage[] = { {&_swigt__p_idmef_linkage, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_idmef_linkage_category_t[] = { {&_swigt__p_idmef_linkage_category_t, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_idmef_message[] = { {&_swigt__p_idmef_message, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_idmef_message_type_t[] = { {&_swigt__p_idmef_message_type_t, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_idmef_node[] = { {&_swigt__p_idmef_node, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_idmef_node_category_t[] = { {&_swigt__p_idmef_node_category_t, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_idmef_overflow_alert[] = { {&_swigt__p_idmef_overflow_alert, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_idmef_path[] = { {&_swigt__p_idmef_path, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_idmef_process[] = { {&_swigt__p_idmef_process, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_idmef_reference[] = { {&_swigt__p_idmef_reference, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_idmef_reference_origin_t[] = { {&_swigt__p_idmef_reference_origin_t, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_idmef_service[] = { {&_swigt__p_idmef_service, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_idmef_service_type_t[] = { {&_swigt__p_idmef_service_type_t, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_idmef_snmp_service[] = { {&_swigt__p_idmef_snmp_service, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_idmef_source[] = { {&_swigt__p_idmef_source, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_idmef_source_spoofed_t[] = { {&_swigt__p_idmef_source_spoofed_t, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_idmef_target[] = { {&_swigt__p_idmef_target, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_idmef_target_decoy_t[] = { {&_swigt__p_idmef_target_decoy_t, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_idmef_time[] = { {&_swigt__p_idmef_time, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_idmef_tool_alert[] = { {&_swigt__p_idmef_tool_alert, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_idmef_user[] = { {&_swigt__p_idmef_user, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_idmef_user_category_t[] = { {&_swigt__p_idmef_user_category_t, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_idmef_user_id[] = { {&_swigt__p_idmef_user_id, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_idmef_user_id_type_t[] = { {&_swigt__p_idmef_user_id_type_t, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_idmef_value[] = { {&_swigt__p_idmef_value, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_idmef_value_type_class_t[] = { {&_swigt__p_idmef_value_type_class_t, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_idmef_value_type_data_t[] = { {&_swigt__p_idmef_value_type_data_t, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_idmef_value_type_enum_t[] = { {&_swigt__p_idmef_value_type_enum_t, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_idmef_value_type_id_t[] = { {&_swigt__p_idmef_value_type_id_t, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_idmef_value_type_t[] = { {&_swigt__p_idmef_value_type_t, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_idmef_web_service[] = { {&_swigt__p_idmef_web_service, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_int[] = { {&_swigt__p_int, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_long_long[] = { {&_swigt__p_long_long, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_p_char[] = { {&_swigt__p_p_char, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_p_float[] = { {&_swigt__p_p_float, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_p_idmef_action[] = { {&_swigt__p_p_idmef_action, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_p_idmef_action_category_t[] = { {&_swigt__p_p_idmef_action_category_t, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_p_idmef_additional_data[] = { {&_swigt__p_p_idmef_additional_data, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_p_idmef_additional_data_type_t[] = { {&_swigt__p_p_idmef_additional_data_type_t, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_p_idmef_address[] = { {&_swigt__p_p_idmef_address, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_p_idmef_address_category_t[] = { {&_swigt__p_p_idmef_address_category_t, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_p_idmef_alert[] = { {&_swigt__p_p_idmef_alert, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_p_idmef_alertident[] = { {&_swigt__p_p_idmef_alertident, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_p_idmef_analyzer[] = { {&_swigt__p_p_idmef_analyzer, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_p_idmef_assessment[] = { {&_swigt__p_p_idmef_assessment, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_p_idmef_checksum[] = { {&_swigt__p_p_idmef_checksum, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_p_idmef_checksum_algorithm_t[] = { {&_swigt__p_p_idmef_checksum_algorithm_t, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_p_idmef_classification[] = { {&_swigt__p_p_idmef_classification, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_p_idmef_confidence[] = { {&_swigt__p_p_idmef_confidence, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_p_idmef_confidence_rating_t[] = { {&_swigt__p_p_idmef_confidence_rating_t, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_p_idmef_correlation_alert[] = { {&_swigt__p_p_idmef_correlation_alert, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_p_idmef_criteria[] = { {&_swigt__p_p_idmef_criteria, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_p_idmef_criterion[] = { {&_swigt__p_p_idmef_criterion, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_p_idmef_data_t[] = { {&_swigt__p_p_idmef_data_t, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_p_idmef_file[] = { {&_swigt__p_p_idmef_file, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_p_idmef_file_access[] = { {&_swigt__p_p_idmef_file_access, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_p_idmef_file_category_t[] = { {&_swigt__p_p_idmef_file_category_t, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_p_idmef_file_fstype_t[] = { {&_swigt__p_p_idmef_file_fstype_t, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_p_idmef_heartbeat[] = { {&_swigt__p_p_idmef_heartbeat, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_p_idmef_impact[] = { {&_swigt__p_p_idmef_impact, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_p_idmef_impact_completion_t[] = { {&_swigt__p_p_idmef_impact_completion_t, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_p_idmef_impact_severity_t[] = { {&_swigt__p_p_idmef_impact_severity_t, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_p_idmef_impact_type_t[] = { {&_swigt__p_p_idmef_impact_type_t, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_p_idmef_inode[] = { {&_swigt__p_p_idmef_inode, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_p_idmef_linkage[] = { {&_swigt__p_p_idmef_linkage, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_p_idmef_linkage_category_t[] = { {&_swigt__p_p_idmef_linkage_category_t, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_p_idmef_message[] = { {&_swigt__p_p_idmef_message, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_p_idmef_node[] = { {&_swigt__p_p_idmef_node, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_p_idmef_node_category_t[] = { {&_swigt__p_p_idmef_node_category_t, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_p_idmef_overflow_alert[] = { {&_swigt__p_p_idmef_overflow_alert, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_p_idmef_path[] = { {&_swigt__p_p_idmef_path, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_p_idmef_process[] = { {&_swigt__p_p_idmef_process, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_p_idmef_reference[] = { {&_swigt__p_p_idmef_reference, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_p_idmef_reference_origin_t[] = { {&_swigt__p_p_idmef_reference_origin_t, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_p_idmef_service[] = { {&_swigt__p_p_idmef_service, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_p_idmef_snmp_service[] = { {&_swigt__p_p_idmef_snmp_service, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_p_idmef_source[] = { {&_swigt__p_p_idmef_source, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_p_idmef_source_spoofed_t[] = { {&_swigt__p_p_idmef_source_spoofed_t, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_p_idmef_target[] = { {&_swigt__p_p_idmef_target, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_p_idmef_target_decoy_t[] = { {&_swigt__p_p_idmef_target_decoy_t, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_p_idmef_time[] = { {&_swigt__p_p_idmef_time, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_p_idmef_tool_alert[] = { {&_swigt__p_p_idmef_tool_alert, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_p_idmef_user[] = { {&_swigt__p_p_idmef_user, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_p_idmef_user_category_t[] = { {&_swigt__p_p_idmef_user_category_t, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_p_idmef_user_id[] = { {&_swigt__p_p_idmef_user_id, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_p_idmef_user_id_type_t[] = { {&_swigt__p_p_idmef_user_id_type_t, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_p_idmef_value[] = { {&_swigt__p_p_idmef_value, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_p_idmef_web_service[] = { {&_swigt__p_p_idmef_web_service, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_p_int[] = { {&_swigt__p_p_int, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_p_prelude_client[] = { {&_swigt__p_p_prelude_client, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_p_prelude_client_profile[] = { {&_swigt__p_p_prelude_client_profile, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_p_prelude_connection[] = { {&_swigt__p_p_prelude_connection, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_p_prelude_connection_pool[] = { {&_swigt__p_p_prelude_connection_pool, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_p_prelude_msg[] = { {&_swigt__p_p_prelude_msg, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_p_prelude_msgbuf[] = { {&_swigt__p_p_prelude_msgbuf, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_p_prelude_option[] = { {&_swigt__p_p_prelude_option, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_p_prelude_option_context[] = { {&_swigt__p_p_prelude_option_context, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_p_prelude_string_t[] = { {&_swigt__p_p_prelude_string_t, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_p_unsigned_char[] = { {&_swigt__p_p_unsigned_char, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_p_unsigned_int[] = { {&_swigt__p_p_unsigned_int, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_p_unsigned_long_long[] = { {&_swigt__p_p_unsigned_long_long, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_p_unsigned_short[] = { {&_swigt__p_p_unsigned_short, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_p_void[] = { {&_swigt__p_p_void, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_prelude_bool_t[] = { {&_swigt__p_prelude_bool_t, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_prelude_client[] = { {&_swigt__p_prelude_client, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_prelude_client_exit_status_t[] = { {&_swigt__p_prelude_client_exit_status_t, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_prelude_client_flags_t[] = { {&_swigt__p_prelude_client_flags_t, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_prelude_client_profile[] = { {&_swigt__p_prelude_client_profile, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_prelude_connection[] = { {&_swigt__p_prelude_connection, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_prelude_connection_permission_t[] = { {&_swigt__p_prelude_connection_permission_t, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_prelude_connection_pool[] = { {&_swigt__p_prelude_connection_pool, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_prelude_connection_pool_event_t[] = { {&_swigt__p_prelude_connection_pool_event_t, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_prelude_connection_pool_flags_t[] = { {&_swigt__p_prelude_connection_pool_flags_t, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_prelude_connection_state_t[] = { {&_swigt__p_prelude_connection_state_t, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_prelude_error_code_t[] = { {&_swigt__p_prelude_error_code_t, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_prelude_error_source_t[] = { {&_swigt__p_prelude_error_source_t, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_prelude_ident_t[] = { {&_swigt__p_prelude_ident_t, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_prelude_io_t[] = { {&_swigt__p_prelude_io_t, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_prelude_list_t[] = { {&_swigt__p_prelude_list_t, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_prelude_log_flags_t[] = { {&_swigt__p_prelude_log_flags_t, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_prelude_log_t[] = { {&_swigt__p_prelude_log_t, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_prelude_msg[] = { {&_swigt__p_prelude_msg, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_prelude_msg_priority_t[] = { {&_swigt__p_prelude_msg_priority_t, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_prelude_msgbuf[] = { {&_swigt__p_prelude_msgbuf, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_prelude_msgbuf_flags_t[] = { {&_swigt__p_prelude_msgbuf_flags_t, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_prelude_option[] = { {&_swigt__p_prelude_option, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_prelude_option_argument_t[] = { {&_swigt__p_prelude_option_argument_t, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_prelude_option_context[] = { {&_swigt__p_prelude_option_context, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_prelude_option_input_type_t[] = { {&_swigt__p_prelude_option_input_type_t, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_prelude_option_priority_t[] = { {&_swigt__p_prelude_option_priority_t, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_prelude_option_type_t[] = { {&_swigt__p_prelude_option_type_t, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_prelude_option_warning_t[] = { {&_swigt__p_prelude_option_warning_t, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_prelude_string_t[] = { {&_swigt__p_prelude_string_t, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_prelude_timer_t[] = { {&_swigt__p_prelude_timer_t, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_short[] = { {&_swigt__p_short, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_ssize_t[] = { {&_swigt__p_ssize_t, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_time_t[] = { {&_swigt__p_time_t, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_timeval[] = { {&_swigt__p_timeval, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_unsigned_char[] = { {&_swigt__p_unsigned_char, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_unsigned_int[] = { {&_swigt__p_unsigned_int, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_unsigned_long_long[] = { {&_swigt__p_unsigned_long_long, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_unsigned_short[] = { {&_swigt__p_unsigned_short, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_void[] = { {&_swigt__p_void, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info *swig_cast_initial[] = { _swigc__p_FILE, _swigc__p_char, _swigc__p_f_enum_prelude_log_t_p_q_const__char__void, _swigc__p_f_p_p_struct_prelude_msg_p_void__int, _swigc__p_f_p_struct_idmef_value_p_void__int, _swigc__p_f_p_struct_prelude_client_p_struct_idmef_message__void, _swigc__p_f_p_struct_prelude_connection_pool_enum_prelude_connection_pool_event_t__int, _swigc__p_f_p_struct_prelude_connection_pool_enum_prelude_connection_pool_event_t_p_struct_prelude_connection__int, _swigc__p_f_p_struct_prelude_connection_pool_enum_prelude_connection_pool_event_t_p_struct_prelude_connection_p_void__int, _swigc__p_f_p_struct_prelude_msgbuf_p_struct_prelude_msg__int, _swigc__p_f_p_struct_prelude_option_p_prelude_string_t_p_void__int, _swigc__p_f_p_struct_prelude_option_p_q_const__char_p_prelude_string_t_p_void__int, _swigc__p_f_p_void__void, _swigc__p_idmef_action, _swigc__p_idmef_action_category_t, _swigc__p_idmef_additional_data, _swigc__p_idmef_additional_data_type_t, _swigc__p_idmef_address, _swigc__p_idmef_address_category_t, _swigc__p_idmef_alert, _swigc__p_idmef_alert_type_t, _swigc__p_idmef_alertident, _swigc__p_idmef_analyzer, _swigc__p_idmef_assessment, _swigc__p_idmef_checksum, _swigc__p_idmef_checksum_algorithm_t, _swigc__p_idmef_classification, _swigc__p_idmef_confidence, _swigc__p_idmef_confidence_rating_t, _swigc__p_idmef_correlation_alert, _swigc__p_idmef_criteria, _swigc__p_idmef_criterion, _swigc__p_idmef_criterion_operator_t, _swigc__p_idmef_criterion_value_t, _swigc__p_idmef_data_t, _swigc__p_idmef_data_t_data, _swigc__p_idmef_data_type_t, _swigc__p_idmef_file, _swigc__p_idmef_file_access, _swigc__p_idmef_file_category_t, _swigc__p_idmef_file_fstype_t, _swigc__p_idmef_heartbeat, _swigc__p_idmef_impact, _swigc__p_idmef_impact_completion_t, _swigc__p_idmef_impact_severity_t, _swigc__p_idmef_impact_type_t, _swigc__p_idmef_inode, _swigc__p_idmef_linkage, _swigc__p_idmef_linkage_category_t, _swigc__p_idmef_message, _swigc__p_idmef_message_type_t, _swigc__p_idmef_node, _swigc__p_idmef_node_category_t, _swigc__p_idmef_overflow_alert, _swigc__p_idmef_path, _swigc__p_idmef_process, _swigc__p_idmef_reference, _swigc__p_idmef_reference_origin_t, _swigc__p_idmef_service, _swigc__p_idmef_service_type_t, _swigc__p_idmef_snmp_service, _swigc__p_idmef_source, _swigc__p_idmef_source_spoofed_t, _swigc__p_idmef_target, _swigc__p_idmef_target_decoy_t, _swigc__p_idmef_time, _swigc__p_idmef_tool_alert, _swigc__p_idmef_user, _swigc__p_idmef_user_category_t, _swigc__p_idmef_user_id, _swigc__p_idmef_user_id_type_t, _swigc__p_idmef_value, _swigc__p_idmef_value_type_class_t, _swigc__p_idmef_value_type_data_t, _swigc__p_idmef_value_type_enum_t, _swigc__p_idmef_value_type_id_t, _swigc__p_idmef_value_type_t, _swigc__p_idmef_web_service, _swigc__p_int, _swigc__p_long_long, _swigc__p_p_char, _swigc__p_p_float, _swigc__p_p_idmef_action, _swigc__p_p_idmef_action_category_t, _swigc__p_p_idmef_additional_data, _swigc__p_p_idmef_additional_data_type_t, _swigc__p_p_idmef_address, _swigc__p_p_idmef_address_category_t, _swigc__p_p_idmef_alert, _swigc__p_p_idmef_alertident, _swigc__p_p_idmef_analyzer, _swigc__p_p_idmef_assessment, _swigc__p_p_idmef_checksum, _swigc__p_p_idmef_checksum_algorithm_t, _swigc__p_p_idmef_classification, _swigc__p_p_idmef_confidence, _swigc__p_p_idmef_confidence_rating_t, _swigc__p_p_idmef_correlation_alert, _swigc__p_p_idmef_criteria, _swigc__p_p_idmef_criterion, _swigc__p_p_idmef_data_t, _swigc__p_p_idmef_file, _swigc__p_p_idmef_file_access, _swigc__p_p_idmef_file_category_t, _swigc__p_p_idmef_file_fstype_t, _swigc__p_p_idmef_heartbeat, _swigc__p_p_idmef_impact, _swigc__p_p_idmef_impact_completion_t, _swigc__p_p_idmef_impact_severity_t, _swigc__p_p_idmef_impact_type_t, _swigc__p_p_idmef_inode, _swigc__p_p_idmef_linkage, _swigc__p_p_idmef_linkage_category_t, _swigc__p_p_idmef_message, _swigc__p_p_idmef_node, _swigc__p_p_idmef_node_category_t, _swigc__p_p_idmef_overflow_alert, _swigc__p_p_idmef_path, _swigc__p_p_idmef_process, _swigc__p_p_idmef_reference, _swigc__p_p_idmef_reference_origin_t, _swigc__p_p_idmef_service, _swigc__p_p_idmef_snmp_service, _swigc__p_p_idmef_source, _swigc__p_p_idmef_source_spoofed_t, _swigc__p_p_idmef_target, _swigc__p_p_idmef_target_decoy_t, _swigc__p_p_idmef_time, _swigc__p_p_idmef_tool_alert, _swigc__p_p_idmef_user, _swigc__p_p_idmef_user_category_t, _swigc__p_p_idmef_user_id, _swigc__p_p_idmef_user_id_type_t, _swigc__p_p_idmef_value, _swigc__p_p_idmef_web_service, _swigc__p_p_int, _swigc__p_p_prelude_client, _swigc__p_p_prelude_client_profile, _swigc__p_p_prelude_connection, _swigc__p_p_prelude_connection_pool, _swigc__p_p_prelude_msg, _swigc__p_p_prelude_msgbuf, _swigc__p_p_prelude_option, _swigc__p_p_prelude_option_context, _swigc__p_p_prelude_string_t, _swigc__p_p_unsigned_char, _swigc__p_p_unsigned_int, _swigc__p_p_unsigned_long_long, _swigc__p_p_unsigned_short, _swigc__p_p_void, _swigc__p_prelude_bool_t, _swigc__p_prelude_client, _swigc__p_prelude_client_exit_status_t, _swigc__p_prelude_client_flags_t, _swigc__p_prelude_client_profile, _swigc__p_prelude_connection, _swigc__p_prelude_connection_permission_t, _swigc__p_prelude_connection_pool, _swigc__p_prelude_connection_pool_event_t, _swigc__p_prelude_connection_pool_flags_t, _swigc__p_prelude_connection_state_t, _swigc__p_prelude_error_code_t, _swigc__p_prelude_error_source_t, _swigc__p_prelude_ident_t, _swigc__p_prelude_io_t, _swigc__p_prelude_list_t, _swigc__p_prelude_log_flags_t, _swigc__p_prelude_log_t, _swigc__p_prelude_msg, _swigc__p_prelude_msg_priority_t, _swigc__p_prelude_msgbuf, _swigc__p_prelude_msgbuf_flags_t, _swigc__p_prelude_option, _swigc__p_prelude_option_argument_t, _swigc__p_prelude_option_context, _swigc__p_prelude_option_input_type_t, _swigc__p_prelude_option_priority_t, _swigc__p_prelude_option_type_t, _swigc__p_prelude_option_warning_t, _swigc__p_prelude_string_t, _swigc__p_prelude_timer_t, _swigc__p_short, _swigc__p_ssize_t, _swigc__p_time_t, _swigc__p_timeval, _swigc__p_unsigned_char, _swigc__p_unsigned_int, _swigc__p_unsigned_long_long, _swigc__p_unsigned_short, _swigc__p_void, }; /* -------- TYPE CONVERSION AND EQUIVALENCE RULES (END) -------- */ static swig_constant_info swig_constants[] = { {0,0,0,0,0,0} }; #ifdef __cplusplus } #endif static swig_variable_info swig_variables[] = { {0,0,0,0} }; static swig_command_info swig_commands[] = { {"Prelude::prelude_init", _wrap_prelude_init}, {"Prelude::prelude_deinit", _wrap_prelude_deinit}, {"Prelude::prelude_check_version", _wrap_prelude_check_version}, {"Prelude::prelude_thread_init", _wrap_prelude_thread_init}, {"Prelude::prelude_fork_prepare", _wrap_prelude_fork_prepare}, {"Prelude::prelude_fork_parent", _wrap_prelude_fork_parent}, {"Prelude::prelude_fork_child", _wrap_prelude_fork_child}, {"Prelude::prelude_client_get_unique_ident", _wrap_prelude_client_get_unique_ident}, {"Prelude::prelude_client_set_connection_pool", _wrap_prelude_client_set_connection_pool}, {"Prelude::prelude_client_get_connection_pool", _wrap_prelude_client_get_connection_pool}, {"Prelude::prelude_client_start", _wrap_prelude_client_start}, {"Prelude::prelude_client_init", _wrap_prelude_client_init}, {"Prelude::prelude_client_new", _wrap_prelude_client_new}, {"Prelude::prelude_client_ref", _wrap_prelude_client_ref}, {"Prelude::prelude_client_get_analyzer", _wrap_prelude_client_get_analyzer}, {"Prelude::prelude_client_get_flags", _wrap_prelude_client_get_flags}, {"Prelude::prelude_client_set_required_permission", _wrap_prelude_client_set_required_permission}, {"Prelude::prelude_client_get_required_permission", _wrap_prelude_client_get_required_permission}, {"Prelude::prelude_client_send_msg", _wrap_prelude_client_send_msg}, {"Prelude::prelude_client_recv_msg", _wrap_prelude_client_recv_msg}, {"Prelude::prelude_client_set_heartbeat_cb", _wrap_prelude_client_set_heartbeat_cb}, {"Prelude::prelude_client_send_idmef", _wrap_prelude_client_send_idmef}, {"Prelude::prelude_client_recv_idmef", _wrap_prelude_client_recv_idmef}, {"Prelude::prelude_client_destroy", _wrap_prelude_client_destroy}, {"Prelude::prelude_client_set_flags", _wrap_prelude_client_set_flags}, {"Prelude::prelude_client_set_config_filename", _wrap_prelude_client_set_config_filename}, {"Prelude::prelude_client_get_config_filename", _wrap_prelude_client_get_config_filename}, {"Prelude::prelude_client_get_profile", _wrap_prelude_client_get_profile}, {"Prelude::prelude_client_new_msgbuf", _wrap_prelude_client_new_msgbuf}, {"Prelude::prelude_client_handle_msg_default", _wrap_prelude_client_handle_msg_default}, {"Prelude::_prelude_client_register_options", _wrap__prelude_client_register_options}, {"Prelude::prelude_client_get_setup_error", _wrap_prelude_client_get_setup_error}, {"Prelude::prelude_client_is_setup_needed", _wrap_prelude_client_is_setup_needed}, {"Prelude::prelude_client_print_setup_error", _wrap_prelude_client_print_setup_error}, {"Prelude::_prelude_client_profile_init", _wrap__prelude_client_profile_init}, {"Prelude::_prelude_client_profile_new", _wrap__prelude_client_profile_new}, {"Prelude::prelude_client_profile_new", _wrap_prelude_client_profile_new}, {"Prelude::prelude_client_profile_ref", _wrap_prelude_client_profile_ref}, {"Prelude::prelude_client_profile_destroy", _wrap_prelude_client_profile_destroy}, {"Prelude::prelude_client_profile_get_config_filename", _wrap_prelude_client_profile_get_config_filename}, {"Prelude::prelude_client_profile_get_default_config_dirname", _wrap_prelude_client_profile_get_default_config_dirname}, {"Prelude::prelude_client_profile_get_analyzerid_filename", _wrap_prelude_client_profile_get_analyzerid_filename}, {"Prelude::prelude_client_profile_get_tls_key_filename", _wrap_prelude_client_profile_get_tls_key_filename}, {"Prelude::prelude_client_profile_get_tls_server_ca_cert_filename", _wrap_prelude_client_profile_get_tls_server_ca_cert_filename}, {"Prelude::prelude_client_profile_get_tls_server_keycert_filename", _wrap_prelude_client_profile_get_tls_server_keycert_filename}, {"Prelude::prelude_client_profile_get_tls_server_crl_filename", _wrap_prelude_client_profile_get_tls_server_crl_filename}, {"Prelude::prelude_client_profile_get_tls_client_keycert_filename", _wrap_prelude_client_profile_get_tls_client_keycert_filename}, {"Prelude::prelude_client_profile_get_tls_client_trusted_cert_filename", _wrap_prelude_client_profile_get_tls_client_trusted_cert_filename}, {"Prelude::prelude_client_profile_get_backup_dirname", _wrap_prelude_client_profile_get_backup_dirname}, {"Prelude::prelude_client_profile_get_profile_dirname", _wrap_prelude_client_profile_get_profile_dirname}, {"Prelude::prelude_client_profile_set_uid", _wrap_prelude_client_profile_set_uid}, {"Prelude::prelude_client_profile_get_uid", _wrap_prelude_client_profile_get_uid}, {"Prelude::prelude_client_profile_set_gid", _wrap_prelude_client_profile_set_gid}, {"Prelude::prelude_client_profile_get_gid", _wrap_prelude_client_profile_get_gid}, {"Prelude::prelude_client_profile_set_name", _wrap_prelude_client_profile_set_name}, {"Prelude::prelude_client_profile_get_name", _wrap_prelude_client_profile_get_name}, {"Prelude::prelude_client_profile_get_analyzerid", _wrap_prelude_client_profile_get_analyzerid}, {"Prelude::prelude_client_profile_set_analyzerid", _wrap_prelude_client_profile_set_analyzerid}, {"Prelude::prelude_client_profile_get_credentials", _wrap_prelude_client_profile_get_credentials}, {"Prelude::prelude_client_profile_set_prefix", _wrap_prelude_client_profile_set_prefix}, {"Prelude::prelude_client_profile_get_prefix", _wrap_prelude_client_profile_get_prefix}, {"Prelude::idmef_additional_data_type_to_numeric", _wrap_idmef_additional_data_type_to_numeric}, {"Prelude::idmef_additional_data_type_to_string", _wrap_idmef_additional_data_type_to_string}, {"Prelude::idmef_additional_data_new", _wrap_idmef_additional_data_new}, {"Prelude::idmef_additional_data_copy", _wrap_idmef_additional_data_copy}, {"Prelude::idmef_additional_data_clone", _wrap_idmef_additional_data_clone}, {"Prelude::idmef_additional_data_compare", _wrap_idmef_additional_data_compare}, {"Prelude::idmef_additional_data_ref", _wrap_idmef_additional_data_ref}, {"Prelude::idmef_additional_data_destroy", _wrap_idmef_additional_data_destroy}, {"Prelude::idmef_additional_data_get_type", _wrap_idmef_additional_data_get_type}, {"Prelude::idmef_additional_data_set_type", _wrap_idmef_additional_data_set_type}, {"Prelude::idmef_additional_data_new_type", _wrap_idmef_additional_data_new_type}, {"Prelude::idmef_additional_data_get_meaning", _wrap_idmef_additional_data_get_meaning}, {"Prelude::idmef_additional_data_set_meaning", _wrap_idmef_additional_data_set_meaning}, {"Prelude::idmef_additional_data_new_meaning", _wrap_idmef_additional_data_new_meaning}, {"Prelude::idmef_additional_data_get_data", _wrap_idmef_additional_data_get_data}, {"Prelude::idmef_additional_data_set_data", _wrap_idmef_additional_data_set_data}, {"Prelude::idmef_additional_data_new_data", _wrap_idmef_additional_data_new_data}, {"Prelude::idmef_reference_origin_to_numeric", _wrap_idmef_reference_origin_to_numeric}, {"Prelude::idmef_reference_origin_to_string", _wrap_idmef_reference_origin_to_string}, {"Prelude::idmef_reference_new", _wrap_idmef_reference_new}, {"Prelude::idmef_reference_copy", _wrap_idmef_reference_copy}, {"Prelude::idmef_reference_clone", _wrap_idmef_reference_clone}, {"Prelude::idmef_reference_compare", _wrap_idmef_reference_compare}, {"Prelude::idmef_reference_ref", _wrap_idmef_reference_ref}, {"Prelude::idmef_reference_destroy", _wrap_idmef_reference_destroy}, {"Prelude::idmef_reference_get_origin", _wrap_idmef_reference_get_origin}, {"Prelude::idmef_reference_set_origin", _wrap_idmef_reference_set_origin}, {"Prelude::idmef_reference_new_origin", _wrap_idmef_reference_new_origin}, {"Prelude::idmef_reference_get_name", _wrap_idmef_reference_get_name}, {"Prelude::idmef_reference_set_name", _wrap_idmef_reference_set_name}, {"Prelude::idmef_reference_new_name", _wrap_idmef_reference_new_name}, {"Prelude::idmef_reference_get_url", _wrap_idmef_reference_get_url}, {"Prelude::idmef_reference_set_url", _wrap_idmef_reference_set_url}, {"Prelude::idmef_reference_new_url", _wrap_idmef_reference_new_url}, {"Prelude::idmef_reference_get_meaning", _wrap_idmef_reference_get_meaning}, {"Prelude::idmef_reference_set_meaning", _wrap_idmef_reference_set_meaning}, {"Prelude::idmef_reference_new_meaning", _wrap_idmef_reference_new_meaning}, {"Prelude::idmef_classification_new", _wrap_idmef_classification_new}, {"Prelude::idmef_classification_copy", _wrap_idmef_classification_copy}, {"Prelude::idmef_classification_clone", _wrap_idmef_classification_clone}, {"Prelude::idmef_classification_compare", _wrap_idmef_classification_compare}, {"Prelude::idmef_classification_ref", _wrap_idmef_classification_ref}, {"Prelude::idmef_classification_destroy", _wrap_idmef_classification_destroy}, {"Prelude::idmef_classification_get_ident", _wrap_idmef_classification_get_ident}, {"Prelude::idmef_classification_set_ident", _wrap_idmef_classification_set_ident}, {"Prelude::idmef_classification_new_ident", _wrap_idmef_classification_new_ident}, {"Prelude::idmef_classification_get_text", _wrap_idmef_classification_get_text}, {"Prelude::idmef_classification_set_text", _wrap_idmef_classification_set_text}, {"Prelude::idmef_classification_new_text", _wrap_idmef_classification_new_text}, {"Prelude::idmef_classification_get_next_reference", _wrap_idmef_classification_get_next_reference}, {"Prelude::idmef_classification_set_reference", _wrap_idmef_classification_set_reference}, {"Prelude::idmef_classification_new_reference", _wrap_idmef_classification_new_reference}, {"Prelude::idmef_user_id_type_to_numeric", _wrap_idmef_user_id_type_to_numeric}, {"Prelude::idmef_user_id_type_to_string", _wrap_idmef_user_id_type_to_string}, {"Prelude::idmef_user_id_new", _wrap_idmef_user_id_new}, {"Prelude::idmef_user_id_copy", _wrap_idmef_user_id_copy}, {"Prelude::idmef_user_id_clone", _wrap_idmef_user_id_clone}, {"Prelude::idmef_user_id_compare", _wrap_idmef_user_id_compare}, {"Prelude::idmef_user_id_ref", _wrap_idmef_user_id_ref}, {"Prelude::idmef_user_id_destroy", _wrap_idmef_user_id_destroy}, {"Prelude::idmef_user_id_get_ident", _wrap_idmef_user_id_get_ident}, {"Prelude::idmef_user_id_set_ident", _wrap_idmef_user_id_set_ident}, {"Prelude::idmef_user_id_new_ident", _wrap_idmef_user_id_new_ident}, {"Prelude::idmef_user_id_get_type", _wrap_idmef_user_id_get_type}, {"Prelude::idmef_user_id_set_type", _wrap_idmef_user_id_set_type}, {"Prelude::idmef_user_id_new_type", _wrap_idmef_user_id_new_type}, {"Prelude::idmef_user_id_get_tty", _wrap_idmef_user_id_get_tty}, {"Prelude::idmef_user_id_set_tty", _wrap_idmef_user_id_set_tty}, {"Prelude::idmef_user_id_new_tty", _wrap_idmef_user_id_new_tty}, {"Prelude::idmef_user_id_get_name", _wrap_idmef_user_id_get_name}, {"Prelude::idmef_user_id_set_name", _wrap_idmef_user_id_set_name}, {"Prelude::idmef_user_id_new_name", _wrap_idmef_user_id_new_name}, {"Prelude::idmef_user_id_unset_number", _wrap_idmef_user_id_unset_number}, {"Prelude::idmef_user_id_get_number", _wrap_idmef_user_id_get_number}, {"Prelude::idmef_user_id_set_number", _wrap_idmef_user_id_set_number}, {"Prelude::idmef_user_id_new_number", _wrap_idmef_user_id_new_number}, {"Prelude::idmef_user_category_to_numeric", _wrap_idmef_user_category_to_numeric}, {"Prelude::idmef_user_category_to_string", _wrap_idmef_user_category_to_string}, {"Prelude::idmef_user_new", _wrap_idmef_user_new}, {"Prelude::idmef_user_copy", _wrap_idmef_user_copy}, {"Prelude::idmef_user_clone", _wrap_idmef_user_clone}, {"Prelude::idmef_user_compare", _wrap_idmef_user_compare}, {"Prelude::idmef_user_ref", _wrap_idmef_user_ref}, {"Prelude::idmef_user_destroy", _wrap_idmef_user_destroy}, {"Prelude::idmef_user_get_ident", _wrap_idmef_user_get_ident}, {"Prelude::idmef_user_set_ident", _wrap_idmef_user_set_ident}, {"Prelude::idmef_user_new_ident", _wrap_idmef_user_new_ident}, {"Prelude::idmef_user_get_category", _wrap_idmef_user_get_category}, {"Prelude::idmef_user_set_category", _wrap_idmef_user_set_category}, {"Prelude::idmef_user_new_category", _wrap_idmef_user_new_category}, {"Prelude::idmef_user_get_next_user_id", _wrap_idmef_user_get_next_user_id}, {"Prelude::idmef_user_set_user_id", _wrap_idmef_user_set_user_id}, {"Prelude::idmef_user_new_user_id", _wrap_idmef_user_new_user_id}, {"Prelude::idmef_address_category_to_numeric", _wrap_idmef_address_category_to_numeric}, {"Prelude::idmef_address_category_to_string", _wrap_idmef_address_category_to_string}, {"Prelude::idmef_address_new", _wrap_idmef_address_new}, {"Prelude::idmef_address_copy", _wrap_idmef_address_copy}, {"Prelude::idmef_address_clone", _wrap_idmef_address_clone}, {"Prelude::idmef_address_compare", _wrap_idmef_address_compare}, {"Prelude::idmef_address_ref", _wrap_idmef_address_ref}, {"Prelude::idmef_address_destroy", _wrap_idmef_address_destroy}, {"Prelude::idmef_address_get_ident", _wrap_idmef_address_get_ident}, {"Prelude::idmef_address_set_ident", _wrap_idmef_address_set_ident}, {"Prelude::idmef_address_new_ident", _wrap_idmef_address_new_ident}, {"Prelude::idmef_address_get_category", _wrap_idmef_address_get_category}, {"Prelude::idmef_address_set_category", _wrap_idmef_address_set_category}, {"Prelude::idmef_address_new_category", _wrap_idmef_address_new_category}, {"Prelude::idmef_address_get_vlan_name", _wrap_idmef_address_get_vlan_name}, {"Prelude::idmef_address_set_vlan_name", _wrap_idmef_address_set_vlan_name}, {"Prelude::idmef_address_new_vlan_name", _wrap_idmef_address_new_vlan_name}, {"Prelude::idmef_address_unset_vlan_num", _wrap_idmef_address_unset_vlan_num}, {"Prelude::idmef_address_get_vlan_num", _wrap_idmef_address_get_vlan_num}, {"Prelude::idmef_address_set_vlan_num", _wrap_idmef_address_set_vlan_num}, {"Prelude::idmef_address_new_vlan_num", _wrap_idmef_address_new_vlan_num}, {"Prelude::idmef_address_get_address", _wrap_idmef_address_get_address}, {"Prelude::idmef_address_set_address", _wrap_idmef_address_set_address}, {"Prelude::idmef_address_new_address", _wrap_idmef_address_new_address}, {"Prelude::idmef_address_get_netmask", _wrap_idmef_address_get_netmask}, {"Prelude::idmef_address_set_netmask", _wrap_idmef_address_set_netmask}, {"Prelude::idmef_address_new_netmask", _wrap_idmef_address_new_netmask}, {"Prelude::idmef_process_new", _wrap_idmef_process_new}, {"Prelude::idmef_process_copy", _wrap_idmef_process_copy}, {"Prelude::idmef_process_clone", _wrap_idmef_process_clone}, {"Prelude::idmef_process_compare", _wrap_idmef_process_compare}, {"Prelude::idmef_process_ref", _wrap_idmef_process_ref}, {"Prelude::idmef_process_destroy", _wrap_idmef_process_destroy}, {"Prelude::idmef_process_get_ident", _wrap_idmef_process_get_ident}, {"Prelude::idmef_process_set_ident", _wrap_idmef_process_set_ident}, {"Prelude::idmef_process_new_ident", _wrap_idmef_process_new_ident}, {"Prelude::idmef_process_get_name", _wrap_idmef_process_get_name}, {"Prelude::idmef_process_set_name", _wrap_idmef_process_set_name}, {"Prelude::idmef_process_new_name", _wrap_idmef_process_new_name}, {"Prelude::idmef_process_unset_pid", _wrap_idmef_process_unset_pid}, {"Prelude::idmef_process_get_pid", _wrap_idmef_process_get_pid}, {"Prelude::idmef_process_set_pid", _wrap_idmef_process_set_pid}, {"Prelude::idmef_process_new_pid", _wrap_idmef_process_new_pid}, {"Prelude::idmef_process_get_path", _wrap_idmef_process_get_path}, {"Prelude::idmef_process_set_path", _wrap_idmef_process_set_path}, {"Prelude::idmef_process_new_path", _wrap_idmef_process_new_path}, {"Prelude::idmef_process_get_next_arg", _wrap_idmef_process_get_next_arg}, {"Prelude::idmef_process_set_arg", _wrap_idmef_process_set_arg}, {"Prelude::idmef_process_new_arg", _wrap_idmef_process_new_arg}, {"Prelude::idmef_process_get_next_env", _wrap_idmef_process_get_next_env}, {"Prelude::idmef_process_set_env", _wrap_idmef_process_set_env}, {"Prelude::idmef_process_new_env", _wrap_idmef_process_new_env}, {"Prelude::idmef_web_service_new", _wrap_idmef_web_service_new}, {"Prelude::idmef_web_service_copy", _wrap_idmef_web_service_copy}, {"Prelude::idmef_web_service_clone", _wrap_idmef_web_service_clone}, {"Prelude::idmef_web_service_compare", _wrap_idmef_web_service_compare}, {"Prelude::idmef_web_service_ref", _wrap_idmef_web_service_ref}, {"Prelude::idmef_web_service_destroy", _wrap_idmef_web_service_destroy}, {"Prelude::idmef_web_service_get_url", _wrap_idmef_web_service_get_url}, {"Prelude::idmef_web_service_set_url", _wrap_idmef_web_service_set_url}, {"Prelude::idmef_web_service_new_url", _wrap_idmef_web_service_new_url}, {"Prelude::idmef_web_service_get_cgi", _wrap_idmef_web_service_get_cgi}, {"Prelude::idmef_web_service_set_cgi", _wrap_idmef_web_service_set_cgi}, {"Prelude::idmef_web_service_new_cgi", _wrap_idmef_web_service_new_cgi}, {"Prelude::idmef_web_service_get_http_method", _wrap_idmef_web_service_get_http_method}, {"Prelude::idmef_web_service_set_http_method", _wrap_idmef_web_service_set_http_method}, {"Prelude::idmef_web_service_new_http_method", _wrap_idmef_web_service_new_http_method}, {"Prelude::idmef_web_service_get_next_arg", _wrap_idmef_web_service_get_next_arg}, {"Prelude::idmef_web_service_set_arg", _wrap_idmef_web_service_set_arg}, {"Prelude::idmef_web_service_new_arg", _wrap_idmef_web_service_new_arg}, {"Prelude::idmef_snmp_service_new", _wrap_idmef_snmp_service_new}, {"Prelude::idmef_snmp_service_copy", _wrap_idmef_snmp_service_copy}, {"Prelude::idmef_snmp_service_clone", _wrap_idmef_snmp_service_clone}, {"Prelude::idmef_snmp_service_compare", _wrap_idmef_snmp_service_compare}, {"Prelude::idmef_snmp_service_ref", _wrap_idmef_snmp_service_ref}, {"Prelude::idmef_snmp_service_destroy", _wrap_idmef_snmp_service_destroy}, {"Prelude::idmef_snmp_service_get_oid", _wrap_idmef_snmp_service_get_oid}, {"Prelude::idmef_snmp_service_set_oid", _wrap_idmef_snmp_service_set_oid}, {"Prelude::idmef_snmp_service_new_oid", _wrap_idmef_snmp_service_new_oid}, {"Prelude::idmef_snmp_service_unset_message_processing_model", _wrap_idmef_snmp_service_unset_message_processing_model}, {"Prelude::idmef_snmp_service_get_message_processing_model", _wrap_idmef_snmp_service_get_message_processing_model}, {"Prelude::idmef_snmp_service_set_message_processing_model", _wrap_idmef_snmp_service_set_message_processing_model}, {"Prelude::idmef_snmp_service_new_message_processing_model", _wrap_idmef_snmp_service_new_message_processing_model}, {"Prelude::idmef_snmp_service_unset_security_model", _wrap_idmef_snmp_service_unset_security_model}, {"Prelude::idmef_snmp_service_get_security_model", _wrap_idmef_snmp_service_get_security_model}, {"Prelude::idmef_snmp_service_set_security_model", _wrap_idmef_snmp_service_set_security_model}, {"Prelude::idmef_snmp_service_new_security_model", _wrap_idmef_snmp_service_new_security_model}, {"Prelude::idmef_snmp_service_get_security_name", _wrap_idmef_snmp_service_get_security_name}, {"Prelude::idmef_snmp_service_set_security_name", _wrap_idmef_snmp_service_set_security_name}, {"Prelude::idmef_snmp_service_new_security_name", _wrap_idmef_snmp_service_new_security_name}, {"Prelude::idmef_snmp_service_unset_security_level", _wrap_idmef_snmp_service_unset_security_level}, {"Prelude::idmef_snmp_service_get_security_level", _wrap_idmef_snmp_service_get_security_level}, {"Prelude::idmef_snmp_service_set_security_level", _wrap_idmef_snmp_service_set_security_level}, {"Prelude::idmef_snmp_service_new_security_level", _wrap_idmef_snmp_service_new_security_level}, {"Prelude::idmef_snmp_service_get_context_name", _wrap_idmef_snmp_service_get_context_name}, {"Prelude::idmef_snmp_service_set_context_name", _wrap_idmef_snmp_service_set_context_name}, {"Prelude::idmef_snmp_service_new_context_name", _wrap_idmef_snmp_service_new_context_name}, {"Prelude::idmef_snmp_service_get_context_engine_id", _wrap_idmef_snmp_service_get_context_engine_id}, {"Prelude::idmef_snmp_service_set_context_engine_id", _wrap_idmef_snmp_service_set_context_engine_id}, {"Prelude::idmef_snmp_service_new_context_engine_id", _wrap_idmef_snmp_service_new_context_engine_id}, {"Prelude::idmef_snmp_service_get_command", _wrap_idmef_snmp_service_get_command}, {"Prelude::idmef_snmp_service_set_command", _wrap_idmef_snmp_service_set_command}, {"Prelude::idmef_snmp_service_new_command", _wrap_idmef_snmp_service_new_command}, {"Prelude::idmef_snmp_service_get_community", _wrap_idmef_snmp_service_get_community}, {"Prelude::idmef_snmp_service_set_community", _wrap_idmef_snmp_service_set_community}, {"Prelude::idmef_snmp_service_new_community", _wrap_idmef_snmp_service_new_community}, {"Prelude::idmef_service_type_to_numeric", _wrap_idmef_service_type_to_numeric}, {"Prelude::idmef_service_type_to_string", _wrap_idmef_service_type_to_string}, {"Prelude::idmef_service_new", _wrap_idmef_service_new}, {"Prelude::idmef_service_copy", _wrap_idmef_service_copy}, {"Prelude::idmef_service_clone", _wrap_idmef_service_clone}, {"Prelude::idmef_service_compare", _wrap_idmef_service_compare}, {"Prelude::idmef_service_ref", _wrap_idmef_service_ref}, {"Prelude::idmef_service_destroy", _wrap_idmef_service_destroy}, {"Prelude::idmef_service_get_ident", _wrap_idmef_service_get_ident}, {"Prelude::idmef_service_set_ident", _wrap_idmef_service_set_ident}, {"Prelude::idmef_service_new_ident", _wrap_idmef_service_new_ident}, {"Prelude::idmef_service_unset_ip_version", _wrap_idmef_service_unset_ip_version}, {"Prelude::idmef_service_get_ip_version", _wrap_idmef_service_get_ip_version}, {"Prelude::idmef_service_set_ip_version", _wrap_idmef_service_set_ip_version}, {"Prelude::idmef_service_new_ip_version", _wrap_idmef_service_new_ip_version}, {"Prelude::idmef_service_unset_iana_protocol_number", _wrap_idmef_service_unset_iana_protocol_number}, {"Prelude::idmef_service_get_iana_protocol_number", _wrap_idmef_service_get_iana_protocol_number}, {"Prelude::idmef_service_set_iana_protocol_number", _wrap_idmef_service_set_iana_protocol_number}, {"Prelude::idmef_service_new_iana_protocol_number", _wrap_idmef_service_new_iana_protocol_number}, {"Prelude::idmef_service_get_iana_protocol_name", _wrap_idmef_service_get_iana_protocol_name}, {"Prelude::idmef_service_set_iana_protocol_name", _wrap_idmef_service_set_iana_protocol_name}, {"Prelude::idmef_service_new_iana_protocol_name", _wrap_idmef_service_new_iana_protocol_name}, {"Prelude::idmef_service_get_name", _wrap_idmef_service_get_name}, {"Prelude::idmef_service_set_name", _wrap_idmef_service_set_name}, {"Prelude::idmef_service_new_name", _wrap_idmef_service_new_name}, {"Prelude::idmef_service_unset_port", _wrap_idmef_service_unset_port}, {"Prelude::idmef_service_get_port", _wrap_idmef_service_get_port}, {"Prelude::idmef_service_set_port", _wrap_idmef_service_set_port}, {"Prelude::idmef_service_new_port", _wrap_idmef_service_new_port}, {"Prelude::idmef_service_get_portlist", _wrap_idmef_service_get_portlist}, {"Prelude::idmef_service_set_portlist", _wrap_idmef_service_set_portlist}, {"Prelude::idmef_service_new_portlist", _wrap_idmef_service_new_portlist}, {"Prelude::idmef_service_get_protocol", _wrap_idmef_service_get_protocol}, {"Prelude::idmef_service_set_protocol", _wrap_idmef_service_set_protocol}, {"Prelude::idmef_service_new_protocol", _wrap_idmef_service_new_protocol}, {"Prelude::idmef_service_get_type", _wrap_idmef_service_get_type}, {"Prelude::idmef_service_get_web_service", _wrap_idmef_service_get_web_service}, {"Prelude::idmef_service_set_web_service", _wrap_idmef_service_set_web_service}, {"Prelude::idmef_service_new_web_service", _wrap_idmef_service_new_web_service}, {"Prelude::idmef_service_get_snmp_service", _wrap_idmef_service_get_snmp_service}, {"Prelude::idmef_service_set_snmp_service", _wrap_idmef_service_set_snmp_service}, {"Prelude::idmef_service_new_snmp_service", _wrap_idmef_service_new_snmp_service}, {"Prelude::idmef_node_category_to_numeric", _wrap_idmef_node_category_to_numeric}, {"Prelude::idmef_node_category_to_string", _wrap_idmef_node_category_to_string}, {"Prelude::idmef_node_new", _wrap_idmef_node_new}, {"Prelude::idmef_node_copy", _wrap_idmef_node_copy}, {"Prelude::idmef_node_clone", _wrap_idmef_node_clone}, {"Prelude::idmef_node_compare", _wrap_idmef_node_compare}, {"Prelude::idmef_node_ref", _wrap_idmef_node_ref}, {"Prelude::idmef_node_destroy", _wrap_idmef_node_destroy}, {"Prelude::idmef_node_get_ident", _wrap_idmef_node_get_ident}, {"Prelude::idmef_node_set_ident", _wrap_idmef_node_set_ident}, {"Prelude::idmef_node_new_ident", _wrap_idmef_node_new_ident}, {"Prelude::idmef_node_get_category", _wrap_idmef_node_get_category}, {"Prelude::idmef_node_set_category", _wrap_idmef_node_set_category}, {"Prelude::idmef_node_new_category", _wrap_idmef_node_new_category}, {"Prelude::idmef_node_get_location", _wrap_idmef_node_get_location}, {"Prelude::idmef_node_set_location", _wrap_idmef_node_set_location}, {"Prelude::idmef_node_new_location", _wrap_idmef_node_new_location}, {"Prelude::idmef_node_get_name", _wrap_idmef_node_get_name}, {"Prelude::idmef_node_set_name", _wrap_idmef_node_set_name}, {"Prelude::idmef_node_new_name", _wrap_idmef_node_new_name}, {"Prelude::idmef_node_get_next_address", _wrap_idmef_node_get_next_address}, {"Prelude::idmef_node_set_address", _wrap_idmef_node_set_address}, {"Prelude::idmef_node_new_address", _wrap_idmef_node_new_address}, {"Prelude::idmef_source_spoofed_to_numeric", _wrap_idmef_source_spoofed_to_numeric}, {"Prelude::idmef_source_spoofed_to_string", _wrap_idmef_source_spoofed_to_string}, {"Prelude::idmef_source_new", _wrap_idmef_source_new}, {"Prelude::idmef_source_copy", _wrap_idmef_source_copy}, {"Prelude::idmef_source_clone", _wrap_idmef_source_clone}, {"Prelude::idmef_source_compare", _wrap_idmef_source_compare}, {"Prelude::idmef_source_ref", _wrap_idmef_source_ref}, {"Prelude::idmef_source_destroy", _wrap_idmef_source_destroy}, {"Prelude::idmef_source_get_ident", _wrap_idmef_source_get_ident}, {"Prelude::idmef_source_set_ident", _wrap_idmef_source_set_ident}, {"Prelude::idmef_source_new_ident", _wrap_idmef_source_new_ident}, {"Prelude::idmef_source_get_spoofed", _wrap_idmef_source_get_spoofed}, {"Prelude::idmef_source_set_spoofed", _wrap_idmef_source_set_spoofed}, {"Prelude::idmef_source_new_spoofed", _wrap_idmef_source_new_spoofed}, {"Prelude::idmef_source_get_interface", _wrap_idmef_source_get_interface}, {"Prelude::idmef_source_set_interface", _wrap_idmef_source_set_interface}, {"Prelude::idmef_source_new_interface", _wrap_idmef_source_new_interface}, {"Prelude::idmef_source_get_node", _wrap_idmef_source_get_node}, {"Prelude::idmef_source_set_node", _wrap_idmef_source_set_node}, {"Prelude::idmef_source_new_node", _wrap_idmef_source_new_node}, {"Prelude::idmef_source_get_user", _wrap_idmef_source_get_user}, {"Prelude::idmef_source_set_user", _wrap_idmef_source_set_user}, {"Prelude::idmef_source_new_user", _wrap_idmef_source_new_user}, {"Prelude::idmef_source_get_process", _wrap_idmef_source_get_process}, {"Prelude::idmef_source_set_process", _wrap_idmef_source_set_process}, {"Prelude::idmef_source_new_process", _wrap_idmef_source_new_process}, {"Prelude::idmef_source_get_service", _wrap_idmef_source_get_service}, {"Prelude::idmef_source_set_service", _wrap_idmef_source_set_service}, {"Prelude::idmef_source_new_service", _wrap_idmef_source_new_service}, {"Prelude::idmef_file_access_new", _wrap_idmef_file_access_new}, {"Prelude::idmef_file_access_copy", _wrap_idmef_file_access_copy}, {"Prelude::idmef_file_access_clone", _wrap_idmef_file_access_clone}, {"Prelude::idmef_file_access_compare", _wrap_idmef_file_access_compare}, {"Prelude::idmef_file_access_ref", _wrap_idmef_file_access_ref}, {"Prelude::idmef_file_access_destroy", _wrap_idmef_file_access_destroy}, {"Prelude::idmef_file_access_get_user_id", _wrap_idmef_file_access_get_user_id}, {"Prelude::idmef_file_access_set_user_id", _wrap_idmef_file_access_set_user_id}, {"Prelude::idmef_file_access_new_user_id", _wrap_idmef_file_access_new_user_id}, {"Prelude::idmef_file_access_get_next_permission", _wrap_idmef_file_access_get_next_permission}, {"Prelude::idmef_file_access_set_permission", _wrap_idmef_file_access_set_permission}, {"Prelude::idmef_file_access_new_permission", _wrap_idmef_file_access_new_permission}, {"Prelude::idmef_inode_new", _wrap_idmef_inode_new}, {"Prelude::idmef_inode_copy", _wrap_idmef_inode_copy}, {"Prelude::idmef_inode_clone", _wrap_idmef_inode_clone}, {"Prelude::idmef_inode_compare", _wrap_idmef_inode_compare}, {"Prelude::idmef_inode_ref", _wrap_idmef_inode_ref}, {"Prelude::idmef_inode_destroy", _wrap_idmef_inode_destroy}, {"Prelude::idmef_inode_get_change_time", _wrap_idmef_inode_get_change_time}, {"Prelude::idmef_inode_set_change_time", _wrap_idmef_inode_set_change_time}, {"Prelude::idmef_inode_new_change_time", _wrap_idmef_inode_new_change_time}, {"Prelude::idmef_inode_unset_number", _wrap_idmef_inode_unset_number}, {"Prelude::idmef_inode_get_number", _wrap_idmef_inode_get_number}, {"Prelude::idmef_inode_set_number", _wrap_idmef_inode_set_number}, {"Prelude::idmef_inode_new_number", _wrap_idmef_inode_new_number}, {"Prelude::idmef_inode_unset_major_device", _wrap_idmef_inode_unset_major_device}, {"Prelude::idmef_inode_get_major_device", _wrap_idmef_inode_get_major_device}, {"Prelude::idmef_inode_set_major_device", _wrap_idmef_inode_set_major_device}, {"Prelude::idmef_inode_new_major_device", _wrap_idmef_inode_new_major_device}, {"Prelude::idmef_inode_unset_minor_device", _wrap_idmef_inode_unset_minor_device}, {"Prelude::idmef_inode_get_minor_device", _wrap_idmef_inode_get_minor_device}, {"Prelude::idmef_inode_set_minor_device", _wrap_idmef_inode_set_minor_device}, {"Prelude::idmef_inode_new_minor_device", _wrap_idmef_inode_new_minor_device}, {"Prelude::idmef_inode_unset_c_major_device", _wrap_idmef_inode_unset_c_major_device}, {"Prelude::idmef_inode_get_c_major_device", _wrap_idmef_inode_get_c_major_device}, {"Prelude::idmef_inode_set_c_major_device", _wrap_idmef_inode_set_c_major_device}, {"Prelude::idmef_inode_new_c_major_device", _wrap_idmef_inode_new_c_major_device}, {"Prelude::idmef_inode_unset_c_minor_device", _wrap_idmef_inode_unset_c_minor_device}, {"Prelude::idmef_inode_get_c_minor_device", _wrap_idmef_inode_get_c_minor_device}, {"Prelude::idmef_inode_set_c_minor_device", _wrap_idmef_inode_set_c_minor_device}, {"Prelude::idmef_inode_new_c_minor_device", _wrap_idmef_inode_new_c_minor_device}, {"Prelude::idmef_checksum_algorithm_to_numeric", _wrap_idmef_checksum_algorithm_to_numeric}, {"Prelude::idmef_checksum_algorithm_to_string", _wrap_idmef_checksum_algorithm_to_string}, {"Prelude::idmef_checksum_new", _wrap_idmef_checksum_new}, {"Prelude::idmef_checksum_copy", _wrap_idmef_checksum_copy}, {"Prelude::idmef_checksum_clone", _wrap_idmef_checksum_clone}, {"Prelude::idmef_checksum_compare", _wrap_idmef_checksum_compare}, {"Prelude::idmef_checksum_ref", _wrap_idmef_checksum_ref}, {"Prelude::idmef_checksum_destroy", _wrap_idmef_checksum_destroy}, {"Prelude::idmef_checksum_get_value", _wrap_idmef_checksum_get_value}, {"Prelude::idmef_checksum_set_value", _wrap_idmef_checksum_set_value}, {"Prelude::idmef_checksum_new_value", _wrap_idmef_checksum_new_value}, {"Prelude::idmef_checksum_get_key", _wrap_idmef_checksum_get_key}, {"Prelude::idmef_checksum_set_key", _wrap_idmef_checksum_set_key}, {"Prelude::idmef_checksum_new_key", _wrap_idmef_checksum_new_key}, {"Prelude::idmef_checksum_get_algorithm", _wrap_idmef_checksum_get_algorithm}, {"Prelude::idmef_checksum_set_algorithm", _wrap_idmef_checksum_set_algorithm}, {"Prelude::idmef_checksum_new_algorithm", _wrap_idmef_checksum_new_algorithm}, {"Prelude::idmef_file_category_to_numeric", _wrap_idmef_file_category_to_numeric}, {"Prelude::idmef_file_category_to_string", _wrap_idmef_file_category_to_string}, {"Prelude::idmef_file_fstype_to_numeric", _wrap_idmef_file_fstype_to_numeric}, {"Prelude::idmef_file_fstype_to_string", _wrap_idmef_file_fstype_to_string}, {"Prelude::idmef_file_new", _wrap_idmef_file_new}, {"Prelude::idmef_file_copy", _wrap_idmef_file_copy}, {"Prelude::idmef_file_clone", _wrap_idmef_file_clone}, {"Prelude::idmef_file_compare", _wrap_idmef_file_compare}, {"Prelude::idmef_file_ref", _wrap_idmef_file_ref}, {"Prelude::idmef_file_destroy", _wrap_idmef_file_destroy}, {"Prelude::idmef_file_get_ident", _wrap_idmef_file_get_ident}, {"Prelude::idmef_file_set_ident", _wrap_idmef_file_set_ident}, {"Prelude::idmef_file_new_ident", _wrap_idmef_file_new_ident}, {"Prelude::idmef_file_get_name", _wrap_idmef_file_get_name}, {"Prelude::idmef_file_set_name", _wrap_idmef_file_set_name}, {"Prelude::idmef_file_new_name", _wrap_idmef_file_new_name}, {"Prelude::idmef_file_get_path", _wrap_idmef_file_get_path}, {"Prelude::idmef_file_set_path", _wrap_idmef_file_set_path}, {"Prelude::idmef_file_new_path", _wrap_idmef_file_new_path}, {"Prelude::idmef_file_get_create_time", _wrap_idmef_file_get_create_time}, {"Prelude::idmef_file_set_create_time", _wrap_idmef_file_set_create_time}, {"Prelude::idmef_file_new_create_time", _wrap_idmef_file_new_create_time}, {"Prelude::idmef_file_get_modify_time", _wrap_idmef_file_get_modify_time}, {"Prelude::idmef_file_set_modify_time", _wrap_idmef_file_set_modify_time}, {"Prelude::idmef_file_new_modify_time", _wrap_idmef_file_new_modify_time}, {"Prelude::idmef_file_get_access_time", _wrap_idmef_file_get_access_time}, {"Prelude::idmef_file_set_access_time", _wrap_idmef_file_set_access_time}, {"Prelude::idmef_file_new_access_time", _wrap_idmef_file_new_access_time}, {"Prelude::idmef_file_unset_data_size", _wrap_idmef_file_unset_data_size}, {"Prelude::idmef_file_get_data_size", _wrap_idmef_file_get_data_size}, {"Prelude::idmef_file_set_data_size", _wrap_idmef_file_set_data_size}, {"Prelude::idmef_file_new_data_size", _wrap_idmef_file_new_data_size}, {"Prelude::idmef_file_unset_disk_size", _wrap_idmef_file_unset_disk_size}, {"Prelude::idmef_file_get_disk_size", _wrap_idmef_file_get_disk_size}, {"Prelude::idmef_file_set_disk_size", _wrap_idmef_file_set_disk_size}, {"Prelude::idmef_file_new_disk_size", _wrap_idmef_file_new_disk_size}, {"Prelude::idmef_file_get_next_file_access", _wrap_idmef_file_get_next_file_access}, {"Prelude::idmef_file_set_file_access", _wrap_idmef_file_set_file_access}, {"Prelude::idmef_file_new_file_access", _wrap_idmef_file_new_file_access}, {"Prelude::idmef_file_get_next_linkage", _wrap_idmef_file_get_next_linkage}, {"Prelude::idmef_file_set_linkage", _wrap_idmef_file_set_linkage}, {"Prelude::idmef_file_new_linkage", _wrap_idmef_file_new_linkage}, {"Prelude::idmef_file_get_inode", _wrap_idmef_file_get_inode}, {"Prelude::idmef_file_set_inode", _wrap_idmef_file_set_inode}, {"Prelude::idmef_file_new_inode", _wrap_idmef_file_new_inode}, {"Prelude::idmef_file_get_next_checksum", _wrap_idmef_file_get_next_checksum}, {"Prelude::idmef_file_set_checksum", _wrap_idmef_file_set_checksum}, {"Prelude::idmef_file_new_checksum", _wrap_idmef_file_new_checksum}, {"Prelude::idmef_file_get_category", _wrap_idmef_file_get_category}, {"Prelude::idmef_file_set_category", _wrap_idmef_file_set_category}, {"Prelude::idmef_file_new_category", _wrap_idmef_file_new_category}, {"Prelude::idmef_file_unset_fstype", _wrap_idmef_file_unset_fstype}, {"Prelude::idmef_file_get_fstype", _wrap_idmef_file_get_fstype}, {"Prelude::idmef_file_set_fstype", _wrap_idmef_file_set_fstype}, {"Prelude::idmef_file_new_fstype", _wrap_idmef_file_new_fstype}, {"Prelude::idmef_file_get_file_type", _wrap_idmef_file_get_file_type}, {"Prelude::idmef_file_set_file_type", _wrap_idmef_file_set_file_type}, {"Prelude::idmef_file_new_file_type", _wrap_idmef_file_new_file_type}, {"Prelude::idmef_linkage_category_to_numeric", _wrap_idmef_linkage_category_to_numeric}, {"Prelude::idmef_linkage_category_to_string", _wrap_idmef_linkage_category_to_string}, {"Prelude::idmef_linkage_new", _wrap_idmef_linkage_new}, {"Prelude::idmef_linkage_copy", _wrap_idmef_linkage_copy}, {"Prelude::idmef_linkage_clone", _wrap_idmef_linkage_clone}, {"Prelude::idmef_linkage_compare", _wrap_idmef_linkage_compare}, {"Prelude::idmef_linkage_ref", _wrap_idmef_linkage_ref}, {"Prelude::idmef_linkage_destroy", _wrap_idmef_linkage_destroy}, {"Prelude::idmef_linkage_get_category", _wrap_idmef_linkage_get_category}, {"Prelude::idmef_linkage_set_category", _wrap_idmef_linkage_set_category}, {"Prelude::idmef_linkage_new_category", _wrap_idmef_linkage_new_category}, {"Prelude::idmef_linkage_get_name", _wrap_idmef_linkage_get_name}, {"Prelude::idmef_linkage_set_name", _wrap_idmef_linkage_set_name}, {"Prelude::idmef_linkage_new_name", _wrap_idmef_linkage_new_name}, {"Prelude::idmef_linkage_get_path", _wrap_idmef_linkage_get_path}, {"Prelude::idmef_linkage_set_path", _wrap_idmef_linkage_set_path}, {"Prelude::idmef_linkage_new_path", _wrap_idmef_linkage_new_path}, {"Prelude::idmef_linkage_get_file", _wrap_idmef_linkage_get_file}, {"Prelude::idmef_linkage_set_file", _wrap_idmef_linkage_set_file}, {"Prelude::idmef_linkage_new_file", _wrap_idmef_linkage_new_file}, {"Prelude::idmef_target_decoy_to_numeric", _wrap_idmef_target_decoy_to_numeric}, {"Prelude::idmef_target_decoy_to_string", _wrap_idmef_target_decoy_to_string}, {"Prelude::idmef_target_new", _wrap_idmef_target_new}, {"Prelude::idmef_target_copy", _wrap_idmef_target_copy}, {"Prelude::idmef_target_clone", _wrap_idmef_target_clone}, {"Prelude::idmef_target_compare", _wrap_idmef_target_compare}, {"Prelude::idmef_target_ref", _wrap_idmef_target_ref}, {"Prelude::idmef_target_destroy", _wrap_idmef_target_destroy}, {"Prelude::idmef_target_get_ident", _wrap_idmef_target_get_ident}, {"Prelude::idmef_target_set_ident", _wrap_idmef_target_set_ident}, {"Prelude::idmef_target_new_ident", _wrap_idmef_target_new_ident}, {"Prelude::idmef_target_get_decoy", _wrap_idmef_target_get_decoy}, {"Prelude::idmef_target_set_decoy", _wrap_idmef_target_set_decoy}, {"Prelude::idmef_target_new_decoy", _wrap_idmef_target_new_decoy}, {"Prelude::idmef_target_get_interface", _wrap_idmef_target_get_interface}, {"Prelude::idmef_target_set_interface", _wrap_idmef_target_set_interface}, {"Prelude::idmef_target_new_interface", _wrap_idmef_target_new_interface}, {"Prelude::idmef_target_get_node", _wrap_idmef_target_get_node}, {"Prelude::idmef_target_set_node", _wrap_idmef_target_set_node}, {"Prelude::idmef_target_new_node", _wrap_idmef_target_new_node}, {"Prelude::idmef_target_get_user", _wrap_idmef_target_get_user}, {"Prelude::idmef_target_set_user", _wrap_idmef_target_set_user}, {"Prelude::idmef_target_new_user", _wrap_idmef_target_new_user}, {"Prelude::idmef_target_get_process", _wrap_idmef_target_get_process}, {"Prelude::idmef_target_set_process", _wrap_idmef_target_set_process}, {"Prelude::idmef_target_new_process", _wrap_idmef_target_new_process}, {"Prelude::idmef_target_get_service", _wrap_idmef_target_get_service}, {"Prelude::idmef_target_set_service", _wrap_idmef_target_set_service}, {"Prelude::idmef_target_new_service", _wrap_idmef_target_new_service}, {"Prelude::idmef_target_get_next_file", _wrap_idmef_target_get_next_file}, {"Prelude::idmef_target_set_file", _wrap_idmef_target_set_file}, {"Prelude::idmef_target_new_file", _wrap_idmef_target_new_file}, {"Prelude::idmef_analyzer_new", _wrap_idmef_analyzer_new}, {"Prelude::idmef_analyzer_copy", _wrap_idmef_analyzer_copy}, {"Prelude::idmef_analyzer_clone", _wrap_idmef_analyzer_clone}, {"Prelude::idmef_analyzer_compare", _wrap_idmef_analyzer_compare}, {"Prelude::idmef_analyzer_ref", _wrap_idmef_analyzer_ref}, {"Prelude::idmef_analyzer_destroy", _wrap_idmef_analyzer_destroy}, {"Prelude::idmef_analyzer_get_analyzerid", _wrap_idmef_analyzer_get_analyzerid}, {"Prelude::idmef_analyzer_set_analyzerid", _wrap_idmef_analyzer_set_analyzerid}, {"Prelude::idmef_analyzer_new_analyzerid", _wrap_idmef_analyzer_new_analyzerid}, {"Prelude::idmef_analyzer_get_name", _wrap_idmef_analyzer_get_name}, {"Prelude::idmef_analyzer_set_name", _wrap_idmef_analyzer_set_name}, {"Prelude::idmef_analyzer_new_name", _wrap_idmef_analyzer_new_name}, {"Prelude::idmef_analyzer_get_manufacturer", _wrap_idmef_analyzer_get_manufacturer}, {"Prelude::idmef_analyzer_set_manufacturer", _wrap_idmef_analyzer_set_manufacturer}, {"Prelude::idmef_analyzer_new_manufacturer", _wrap_idmef_analyzer_new_manufacturer}, {"Prelude::idmef_analyzer_get_model", _wrap_idmef_analyzer_get_model}, {"Prelude::idmef_analyzer_set_model", _wrap_idmef_analyzer_set_model}, {"Prelude::idmef_analyzer_new_model", _wrap_idmef_analyzer_new_model}, {"Prelude::idmef_analyzer_get_version", _wrap_idmef_analyzer_get_version}, {"Prelude::idmef_analyzer_set_version", _wrap_idmef_analyzer_set_version}, {"Prelude::idmef_analyzer_new_version", _wrap_idmef_analyzer_new_version}, {"Prelude::idmef_analyzer_get_class", _wrap_idmef_analyzer_get_class}, {"Prelude::idmef_analyzer_set_class", _wrap_idmef_analyzer_set_class}, {"Prelude::idmef_analyzer_new_class", _wrap_idmef_analyzer_new_class}, {"Prelude::idmef_analyzer_get_ostype", _wrap_idmef_analyzer_get_ostype}, {"Prelude::idmef_analyzer_set_ostype", _wrap_idmef_analyzer_set_ostype}, {"Prelude::idmef_analyzer_new_ostype", _wrap_idmef_analyzer_new_ostype}, {"Prelude::idmef_analyzer_get_osversion", _wrap_idmef_analyzer_get_osversion}, {"Prelude::idmef_analyzer_set_osversion", _wrap_idmef_analyzer_set_osversion}, {"Prelude::idmef_analyzer_new_osversion", _wrap_idmef_analyzer_new_osversion}, {"Prelude::idmef_analyzer_get_node", _wrap_idmef_analyzer_get_node}, {"Prelude::idmef_analyzer_set_node", _wrap_idmef_analyzer_set_node}, {"Prelude::idmef_analyzer_new_node", _wrap_idmef_analyzer_new_node}, {"Prelude::idmef_analyzer_get_process", _wrap_idmef_analyzer_get_process}, {"Prelude::idmef_analyzer_set_process", _wrap_idmef_analyzer_set_process}, {"Prelude::idmef_analyzer_new_process", _wrap_idmef_analyzer_new_process}, {"Prelude::idmef_alertident_new", _wrap_idmef_alertident_new}, {"Prelude::idmef_alertident_copy", _wrap_idmef_alertident_copy}, {"Prelude::idmef_alertident_clone", _wrap_idmef_alertident_clone}, {"Prelude::idmef_alertident_compare", _wrap_idmef_alertident_compare}, {"Prelude::idmef_alertident_ref", _wrap_idmef_alertident_ref}, {"Prelude::idmef_alertident_destroy", _wrap_idmef_alertident_destroy}, {"Prelude::idmef_alertident_get_alertident", _wrap_idmef_alertident_get_alertident}, {"Prelude::idmef_alertident_set_alertident", _wrap_idmef_alertident_set_alertident}, {"Prelude::idmef_alertident_new_alertident", _wrap_idmef_alertident_new_alertident}, {"Prelude::idmef_alertident_get_analyzerid", _wrap_idmef_alertident_get_analyzerid}, {"Prelude::idmef_alertident_set_analyzerid", _wrap_idmef_alertident_set_analyzerid}, {"Prelude::idmef_alertident_new_analyzerid", _wrap_idmef_alertident_new_analyzerid}, {"Prelude::idmef_impact_severity_to_numeric", _wrap_idmef_impact_severity_to_numeric}, {"Prelude::idmef_impact_severity_to_string", _wrap_idmef_impact_severity_to_string}, {"Prelude::idmef_impact_completion_to_numeric", _wrap_idmef_impact_completion_to_numeric}, {"Prelude::idmef_impact_completion_to_string", _wrap_idmef_impact_completion_to_string}, {"Prelude::idmef_impact_type_to_numeric", _wrap_idmef_impact_type_to_numeric}, {"Prelude::idmef_impact_type_to_string", _wrap_idmef_impact_type_to_string}, {"Prelude::idmef_impact_new", _wrap_idmef_impact_new}, {"Prelude::idmef_impact_copy", _wrap_idmef_impact_copy}, {"Prelude::idmef_impact_clone", _wrap_idmef_impact_clone}, {"Prelude::idmef_impact_compare", _wrap_idmef_impact_compare}, {"Prelude::idmef_impact_ref", _wrap_idmef_impact_ref}, {"Prelude::idmef_impact_destroy", _wrap_idmef_impact_destroy}, {"Prelude::idmef_impact_unset_severity", _wrap_idmef_impact_unset_severity}, {"Prelude::idmef_impact_get_severity", _wrap_idmef_impact_get_severity}, {"Prelude::idmef_impact_set_severity", _wrap_idmef_impact_set_severity}, {"Prelude::idmef_impact_new_severity", _wrap_idmef_impact_new_severity}, {"Prelude::idmef_impact_unset_completion", _wrap_idmef_impact_unset_completion}, {"Prelude::idmef_impact_get_completion", _wrap_idmef_impact_get_completion}, {"Prelude::idmef_impact_set_completion", _wrap_idmef_impact_set_completion}, {"Prelude::idmef_impact_new_completion", _wrap_idmef_impact_new_completion}, {"Prelude::idmef_impact_get_type", _wrap_idmef_impact_get_type}, {"Prelude::idmef_impact_set_type", _wrap_idmef_impact_set_type}, {"Prelude::idmef_impact_new_type", _wrap_idmef_impact_new_type}, {"Prelude::idmef_impact_get_description", _wrap_idmef_impact_get_description}, {"Prelude::idmef_impact_set_description", _wrap_idmef_impact_set_description}, {"Prelude::idmef_impact_new_description", _wrap_idmef_impact_new_description}, {"Prelude::idmef_action_category_to_numeric", _wrap_idmef_action_category_to_numeric}, {"Prelude::idmef_action_category_to_string", _wrap_idmef_action_category_to_string}, {"Prelude::idmef_action_new", _wrap_idmef_action_new}, {"Prelude::idmef_action_copy", _wrap_idmef_action_copy}, {"Prelude::idmef_action_clone", _wrap_idmef_action_clone}, {"Prelude::idmef_action_compare", _wrap_idmef_action_compare}, {"Prelude::idmef_action_ref", _wrap_idmef_action_ref}, {"Prelude::idmef_action_destroy", _wrap_idmef_action_destroy}, {"Prelude::idmef_action_get_category", _wrap_idmef_action_get_category}, {"Prelude::idmef_action_set_category", _wrap_idmef_action_set_category}, {"Prelude::idmef_action_new_category", _wrap_idmef_action_new_category}, {"Prelude::idmef_action_get_description", _wrap_idmef_action_get_description}, {"Prelude::idmef_action_set_description", _wrap_idmef_action_set_description}, {"Prelude::idmef_action_new_description", _wrap_idmef_action_new_description}, {"Prelude::idmef_confidence_rating_to_numeric", _wrap_idmef_confidence_rating_to_numeric}, {"Prelude::idmef_confidence_rating_to_string", _wrap_idmef_confidence_rating_to_string}, {"Prelude::idmef_confidence_new", _wrap_idmef_confidence_new}, {"Prelude::idmef_confidence_copy", _wrap_idmef_confidence_copy}, {"Prelude::idmef_confidence_clone", _wrap_idmef_confidence_clone}, {"Prelude::idmef_confidence_compare", _wrap_idmef_confidence_compare}, {"Prelude::idmef_confidence_ref", _wrap_idmef_confidence_ref}, {"Prelude::idmef_confidence_destroy", _wrap_idmef_confidence_destroy}, {"Prelude::idmef_confidence_get_rating", _wrap_idmef_confidence_get_rating}, {"Prelude::idmef_confidence_set_rating", _wrap_idmef_confidence_set_rating}, {"Prelude::idmef_confidence_new_rating", _wrap_idmef_confidence_new_rating}, {"Prelude::idmef_confidence_get_confidence", _wrap_idmef_confidence_get_confidence}, {"Prelude::idmef_confidence_set_confidence", _wrap_idmef_confidence_set_confidence}, {"Prelude::idmef_confidence_new_confidence", _wrap_idmef_confidence_new_confidence}, {"Prelude::idmef_assessment_new", _wrap_idmef_assessment_new}, {"Prelude::idmef_assessment_copy", _wrap_idmef_assessment_copy}, {"Prelude::idmef_assessment_clone", _wrap_idmef_assessment_clone}, {"Prelude::idmef_assessment_compare", _wrap_idmef_assessment_compare}, {"Prelude::idmef_assessment_ref", _wrap_idmef_assessment_ref}, {"Prelude::idmef_assessment_destroy", _wrap_idmef_assessment_destroy}, {"Prelude::idmef_assessment_get_impact", _wrap_idmef_assessment_get_impact}, {"Prelude::idmef_assessment_set_impact", _wrap_idmef_assessment_set_impact}, {"Prelude::idmef_assessment_new_impact", _wrap_idmef_assessment_new_impact}, {"Prelude::idmef_assessment_get_next_action", _wrap_idmef_assessment_get_next_action}, {"Prelude::idmef_assessment_set_action", _wrap_idmef_assessment_set_action}, {"Prelude::idmef_assessment_new_action", _wrap_idmef_assessment_new_action}, {"Prelude::idmef_assessment_get_confidence", _wrap_idmef_assessment_get_confidence}, {"Prelude::idmef_assessment_set_confidence", _wrap_idmef_assessment_set_confidence}, {"Prelude::idmef_assessment_new_confidence", _wrap_idmef_assessment_new_confidence}, {"Prelude::idmef_tool_alert_new", _wrap_idmef_tool_alert_new}, {"Prelude::idmef_tool_alert_copy", _wrap_idmef_tool_alert_copy}, {"Prelude::idmef_tool_alert_clone", _wrap_idmef_tool_alert_clone}, {"Prelude::idmef_tool_alert_compare", _wrap_idmef_tool_alert_compare}, {"Prelude::idmef_tool_alert_ref", _wrap_idmef_tool_alert_ref}, {"Prelude::idmef_tool_alert_destroy", _wrap_idmef_tool_alert_destroy}, {"Prelude::idmef_tool_alert_get_name", _wrap_idmef_tool_alert_get_name}, {"Prelude::idmef_tool_alert_set_name", _wrap_idmef_tool_alert_set_name}, {"Prelude::idmef_tool_alert_new_name", _wrap_idmef_tool_alert_new_name}, {"Prelude::idmef_tool_alert_get_command", _wrap_idmef_tool_alert_get_command}, {"Prelude::idmef_tool_alert_set_command", _wrap_idmef_tool_alert_set_command}, {"Prelude::idmef_tool_alert_new_command", _wrap_idmef_tool_alert_new_command}, {"Prelude::idmef_tool_alert_get_next_alertident", _wrap_idmef_tool_alert_get_next_alertident}, {"Prelude::idmef_tool_alert_set_alertident", _wrap_idmef_tool_alert_set_alertident}, {"Prelude::idmef_tool_alert_new_alertident", _wrap_idmef_tool_alert_new_alertident}, {"Prelude::idmef_correlation_alert_new", _wrap_idmef_correlation_alert_new}, {"Prelude::idmef_correlation_alert_copy", _wrap_idmef_correlation_alert_copy}, {"Prelude::idmef_correlation_alert_clone", _wrap_idmef_correlation_alert_clone}, {"Prelude::idmef_correlation_alert_compare", _wrap_idmef_correlation_alert_compare}, {"Prelude::idmef_correlation_alert_ref", _wrap_idmef_correlation_alert_ref}, {"Prelude::idmef_correlation_alert_destroy", _wrap_idmef_correlation_alert_destroy}, {"Prelude::idmef_correlation_alert_get_name", _wrap_idmef_correlation_alert_get_name}, {"Prelude::idmef_correlation_alert_set_name", _wrap_idmef_correlation_alert_set_name}, {"Prelude::idmef_correlation_alert_new_name", _wrap_idmef_correlation_alert_new_name}, {"Prelude::idmef_correlation_alert_get_next_alertident", _wrap_idmef_correlation_alert_get_next_alertident}, {"Prelude::idmef_correlation_alert_set_alertident", _wrap_idmef_correlation_alert_set_alertident}, {"Prelude::idmef_correlation_alert_new_alertident", _wrap_idmef_correlation_alert_new_alertident}, {"Prelude::idmef_overflow_alert_new", _wrap_idmef_overflow_alert_new}, {"Prelude::idmef_overflow_alert_copy", _wrap_idmef_overflow_alert_copy}, {"Prelude::idmef_overflow_alert_clone", _wrap_idmef_overflow_alert_clone}, {"Prelude::idmef_overflow_alert_compare", _wrap_idmef_overflow_alert_compare}, {"Prelude::idmef_overflow_alert_ref", _wrap_idmef_overflow_alert_ref}, {"Prelude::idmef_overflow_alert_destroy", _wrap_idmef_overflow_alert_destroy}, {"Prelude::idmef_overflow_alert_get_program", _wrap_idmef_overflow_alert_get_program}, {"Prelude::idmef_overflow_alert_set_program", _wrap_idmef_overflow_alert_set_program}, {"Prelude::idmef_overflow_alert_new_program", _wrap_idmef_overflow_alert_new_program}, {"Prelude::idmef_overflow_alert_unset_size", _wrap_idmef_overflow_alert_unset_size}, {"Prelude::idmef_overflow_alert_get_size", _wrap_idmef_overflow_alert_get_size}, {"Prelude::idmef_overflow_alert_set_size", _wrap_idmef_overflow_alert_set_size}, {"Prelude::idmef_overflow_alert_new_size", _wrap_idmef_overflow_alert_new_size}, {"Prelude::idmef_overflow_alert_get_buffer", _wrap_idmef_overflow_alert_get_buffer}, {"Prelude::idmef_overflow_alert_set_buffer", _wrap_idmef_overflow_alert_set_buffer}, {"Prelude::idmef_overflow_alert_new_buffer", _wrap_idmef_overflow_alert_new_buffer}, {"Prelude::idmef_alert_type_to_numeric", _wrap_idmef_alert_type_to_numeric}, {"Prelude::idmef_alert_type_to_string", _wrap_idmef_alert_type_to_string}, {"Prelude::idmef_alert_new", _wrap_idmef_alert_new}, {"Prelude::idmef_alert_copy", _wrap_idmef_alert_copy}, {"Prelude::idmef_alert_clone", _wrap_idmef_alert_clone}, {"Prelude::idmef_alert_compare", _wrap_idmef_alert_compare}, {"Prelude::idmef_alert_ref", _wrap_idmef_alert_ref}, {"Prelude::idmef_alert_destroy", _wrap_idmef_alert_destroy}, {"Prelude::idmef_alert_get_messageid", _wrap_idmef_alert_get_messageid}, {"Prelude::idmef_alert_set_messageid", _wrap_idmef_alert_set_messageid}, {"Prelude::idmef_alert_new_messageid", _wrap_idmef_alert_new_messageid}, {"Prelude::idmef_alert_get_next_analyzer", _wrap_idmef_alert_get_next_analyzer}, {"Prelude::idmef_alert_set_analyzer", _wrap_idmef_alert_set_analyzer}, {"Prelude::idmef_alert_new_analyzer", _wrap_idmef_alert_new_analyzer}, {"Prelude::idmef_alert_get_create_time", _wrap_idmef_alert_get_create_time}, {"Prelude::idmef_alert_set_create_time", _wrap_idmef_alert_set_create_time}, {"Prelude::idmef_alert_new_create_time", _wrap_idmef_alert_new_create_time}, {"Prelude::idmef_alert_get_classification", _wrap_idmef_alert_get_classification}, {"Prelude::idmef_alert_set_classification", _wrap_idmef_alert_set_classification}, {"Prelude::idmef_alert_new_classification", _wrap_idmef_alert_new_classification}, {"Prelude::idmef_alert_get_detect_time", _wrap_idmef_alert_get_detect_time}, {"Prelude::idmef_alert_set_detect_time", _wrap_idmef_alert_set_detect_time}, {"Prelude::idmef_alert_new_detect_time", _wrap_idmef_alert_new_detect_time}, {"Prelude::idmef_alert_get_analyzer_time", _wrap_idmef_alert_get_analyzer_time}, {"Prelude::idmef_alert_set_analyzer_time", _wrap_idmef_alert_set_analyzer_time}, {"Prelude::idmef_alert_new_analyzer_time", _wrap_idmef_alert_new_analyzer_time}, {"Prelude::idmef_alert_get_next_source", _wrap_idmef_alert_get_next_source}, {"Prelude::idmef_alert_set_source", _wrap_idmef_alert_set_source}, {"Prelude::idmef_alert_new_source", _wrap_idmef_alert_new_source}, {"Prelude::idmef_alert_get_next_target", _wrap_idmef_alert_get_next_target}, {"Prelude::idmef_alert_set_target", _wrap_idmef_alert_set_target}, {"Prelude::idmef_alert_new_target", _wrap_idmef_alert_new_target}, {"Prelude::idmef_alert_get_assessment", _wrap_idmef_alert_get_assessment}, {"Prelude::idmef_alert_set_assessment", _wrap_idmef_alert_set_assessment}, {"Prelude::idmef_alert_new_assessment", _wrap_idmef_alert_new_assessment}, {"Prelude::idmef_alert_get_next_additional_data", _wrap_idmef_alert_get_next_additional_data}, {"Prelude::idmef_alert_set_additional_data", _wrap_idmef_alert_set_additional_data}, {"Prelude::idmef_alert_new_additional_data", _wrap_idmef_alert_new_additional_data}, {"Prelude::idmef_alert_get_type", _wrap_idmef_alert_get_type}, {"Prelude::idmef_alert_get_tool_alert", _wrap_idmef_alert_get_tool_alert}, {"Prelude::idmef_alert_set_tool_alert", _wrap_idmef_alert_set_tool_alert}, {"Prelude::idmef_alert_new_tool_alert", _wrap_idmef_alert_new_tool_alert}, {"Prelude::idmef_alert_get_correlation_alert", _wrap_idmef_alert_get_correlation_alert}, {"Prelude::idmef_alert_set_correlation_alert", _wrap_idmef_alert_set_correlation_alert}, {"Prelude::idmef_alert_new_correlation_alert", _wrap_idmef_alert_new_correlation_alert}, {"Prelude::idmef_alert_get_overflow_alert", _wrap_idmef_alert_get_overflow_alert}, {"Prelude::idmef_alert_set_overflow_alert", _wrap_idmef_alert_set_overflow_alert}, {"Prelude::idmef_alert_new_overflow_alert", _wrap_idmef_alert_new_overflow_alert}, {"Prelude::idmef_heartbeat_new", _wrap_idmef_heartbeat_new}, {"Prelude::idmef_heartbeat_copy", _wrap_idmef_heartbeat_copy}, {"Prelude::idmef_heartbeat_clone", _wrap_idmef_heartbeat_clone}, {"Prelude::idmef_heartbeat_compare", _wrap_idmef_heartbeat_compare}, {"Prelude::idmef_heartbeat_ref", _wrap_idmef_heartbeat_ref}, {"Prelude::idmef_heartbeat_destroy", _wrap_idmef_heartbeat_destroy}, {"Prelude::idmef_heartbeat_get_messageid", _wrap_idmef_heartbeat_get_messageid}, {"Prelude::idmef_heartbeat_set_messageid", _wrap_idmef_heartbeat_set_messageid}, {"Prelude::idmef_heartbeat_new_messageid", _wrap_idmef_heartbeat_new_messageid}, {"Prelude::idmef_heartbeat_get_next_analyzer", _wrap_idmef_heartbeat_get_next_analyzer}, {"Prelude::idmef_heartbeat_set_analyzer", _wrap_idmef_heartbeat_set_analyzer}, {"Prelude::idmef_heartbeat_new_analyzer", _wrap_idmef_heartbeat_new_analyzer}, {"Prelude::idmef_heartbeat_get_create_time", _wrap_idmef_heartbeat_get_create_time}, {"Prelude::idmef_heartbeat_set_create_time", _wrap_idmef_heartbeat_set_create_time}, {"Prelude::idmef_heartbeat_new_create_time", _wrap_idmef_heartbeat_new_create_time}, {"Prelude::idmef_heartbeat_get_analyzer_time", _wrap_idmef_heartbeat_get_analyzer_time}, {"Prelude::idmef_heartbeat_set_analyzer_time", _wrap_idmef_heartbeat_set_analyzer_time}, {"Prelude::idmef_heartbeat_new_analyzer_time", _wrap_idmef_heartbeat_new_analyzer_time}, {"Prelude::idmef_heartbeat_unset_heartbeat_interval", _wrap_idmef_heartbeat_unset_heartbeat_interval}, {"Prelude::idmef_heartbeat_get_heartbeat_interval", _wrap_idmef_heartbeat_get_heartbeat_interval}, {"Prelude::idmef_heartbeat_set_heartbeat_interval", _wrap_idmef_heartbeat_set_heartbeat_interval}, {"Prelude::idmef_heartbeat_new_heartbeat_interval", _wrap_idmef_heartbeat_new_heartbeat_interval}, {"Prelude::idmef_heartbeat_get_next_additional_data", _wrap_idmef_heartbeat_get_next_additional_data}, {"Prelude::idmef_heartbeat_set_additional_data", _wrap_idmef_heartbeat_set_additional_data}, {"Prelude::idmef_heartbeat_new_additional_data", _wrap_idmef_heartbeat_new_additional_data}, {"Prelude::idmef_message_type_to_numeric", _wrap_idmef_message_type_to_numeric}, {"Prelude::idmef_message_type_to_string", _wrap_idmef_message_type_to_string}, {"Prelude::idmef_message_new", _wrap_idmef_message_new}, {"Prelude::idmef_message_copy", _wrap_idmef_message_copy}, {"Prelude::idmef_message_clone", _wrap_idmef_message_clone}, {"Prelude::idmef_message_compare", _wrap_idmef_message_compare}, {"Prelude::idmef_message_ref", _wrap_idmef_message_ref}, {"Prelude::idmef_message_destroy", _wrap_idmef_message_destroy}, {"Prelude::idmef_message_get_version", _wrap_idmef_message_get_version}, {"Prelude::idmef_message_set_version", _wrap_idmef_message_set_version}, {"Prelude::idmef_message_new_version", _wrap_idmef_message_new_version}, {"Prelude::idmef_message_get_type", _wrap_idmef_message_get_type}, {"Prelude::idmef_message_get_alert", _wrap_idmef_message_get_alert}, {"Prelude::idmef_message_set_alert", _wrap_idmef_message_set_alert}, {"Prelude::idmef_message_new_alert", _wrap_idmef_message_new_alert}, {"Prelude::idmef_message_get_heartbeat", _wrap_idmef_message_get_heartbeat}, {"Prelude::idmef_message_set_heartbeat", _wrap_idmef_message_set_heartbeat}, {"Prelude::idmef_message_new_heartbeat", _wrap_idmef_message_new_heartbeat}, {"Prelude::idmef_message_set_pmsg", _wrap_idmef_message_set_pmsg}, {"Prelude::idmef_message_get_pmsg", _wrap_idmef_message_get_pmsg}, {"Prelude::idmef_value_new_int8", _wrap_idmef_value_new_int8}, {"Prelude::idmef_value_new_uint8", _wrap_idmef_value_new_uint8}, {"Prelude::idmef_value_new_int16", _wrap_idmef_value_new_int16}, {"Prelude::idmef_value_new_uint16", _wrap_idmef_value_new_uint16}, {"Prelude::idmef_value_new_int32", _wrap_idmef_value_new_int32}, {"Prelude::idmef_value_new_uint32", _wrap_idmef_value_new_uint32}, {"Prelude::idmef_value_new_int64", _wrap_idmef_value_new_int64}, {"Prelude::idmef_value_new_uint64", _wrap_idmef_value_new_uint64}, {"Prelude::idmef_value_new_float", _wrap_idmef_value_new_float}, {"Prelude::idmef_value_new_double", _wrap_idmef_value_new_double}, {"Prelude::idmef_value_new_string", _wrap_idmef_value_new_string}, {"Prelude::idmef_value_new_time", _wrap_idmef_value_new_time}, {"Prelude::idmef_value_new_data", _wrap_idmef_value_new_data}, {"Prelude::idmef_value_new_class", _wrap_idmef_value_new_class}, {"Prelude::idmef_value_new_list", _wrap_idmef_value_new_list}, {"Prelude::idmef_value_new_enum", _wrap_idmef_value_new_enum}, {"Prelude::idmef_value_new_enum_from_string", _wrap_idmef_value_new_enum_from_string}, {"Prelude::idmef_value_new_enum_from_numeric", _wrap_idmef_value_new_enum_from_numeric}, {"Prelude::idmef_value_set_int8", _wrap_idmef_value_set_int8}, {"Prelude::idmef_value_set_uint8", _wrap_idmef_value_set_uint8}, {"Prelude::idmef_value_set_int16", _wrap_idmef_value_set_int16}, {"Prelude::idmef_value_set_uint16", _wrap_idmef_value_set_uint16}, {"Prelude::idmef_value_set_int32", _wrap_idmef_value_set_int32}, {"Prelude::idmef_value_set_uint32", _wrap_idmef_value_set_uint32}, {"Prelude::idmef_value_set_int64", _wrap_idmef_value_set_int64}, {"Prelude::idmef_value_set_uint64", _wrap_idmef_value_set_uint64}, {"Prelude::idmef_value_set_float", _wrap_idmef_value_set_float}, {"Prelude::idmef_value_set_double", _wrap_idmef_value_set_double}, {"Prelude::idmef_value_set_string", _wrap_idmef_value_set_string}, {"Prelude::idmef_value_set_time", _wrap_idmef_value_set_time}, {"Prelude::idmef_value_set_data", _wrap_idmef_value_set_data}, {"Prelude::idmef_value_set_enum", _wrap_idmef_value_set_enum}, {"Prelude::idmef_value_set_enum_from_string", _wrap_idmef_value_set_enum_from_string}, {"Prelude::idmef_value_set_enum_from_numeric", _wrap_idmef_value_set_enum_from_numeric}, {"Prelude::idmef_value_set_class", _wrap_idmef_value_set_class}, {"Prelude::idmef_value_new", _wrap_idmef_value_new}, {"Prelude::idmef_value_new_from_path", _wrap_idmef_value_new_from_path}, {"Prelude::idmef_value_new_from_string", _wrap_idmef_value_new_from_string}, {"Prelude::idmef_value_get_int8", _wrap_idmef_value_get_int8}, {"Prelude::idmef_value_get_uint8", _wrap_idmef_value_get_uint8}, {"Prelude::idmef_value_get_int16", _wrap_idmef_value_get_int16}, {"Prelude::idmef_value_get_uint16", _wrap_idmef_value_get_uint16}, {"Prelude::idmef_value_get_int32", _wrap_idmef_value_get_int32}, {"Prelude::idmef_value_get_uint32", _wrap_idmef_value_get_uint32}, {"Prelude::idmef_value_get_int64", _wrap_idmef_value_get_int64}, {"Prelude::idmef_value_get_uint64", _wrap_idmef_value_get_uint64}, {"Prelude::idmef_value_get_enum", _wrap_idmef_value_get_enum}, {"Prelude::idmef_value_get_float", _wrap_idmef_value_get_float}, {"Prelude::idmef_value_get_double", _wrap_idmef_value_get_double}, {"Prelude::idmef_value_get_time", _wrap_idmef_value_get_time}, {"Prelude::idmef_value_get_data", _wrap_idmef_value_get_data}, {"Prelude::idmef_value_get_string", _wrap_idmef_value_get_string}, {"Prelude::idmef_value_list_add", _wrap_idmef_value_list_add}, {"Prelude::idmef_value_is_list", _wrap_idmef_value_is_list}, {"Prelude::idmef_value_list_is_empty", _wrap_idmef_value_list_is_empty}, {"Prelude::idmef_value_have_own_data", _wrap_idmef_value_have_own_data}, {"Prelude::idmef_value_dont_have_own_data", _wrap_idmef_value_dont_have_own_data}, {"Prelude::idmef_value_get_type", _wrap_idmef_value_get_type}, {"Prelude::idmef_value_get_class", _wrap_idmef_value_get_class}, {"Prelude::idmef_value_get_object", _wrap_idmef_value_get_object}, {"Prelude::idmef_value_iterate", _wrap_idmef_value_iterate}, {"Prelude::idmef_value_iterate_reversed", _wrap_idmef_value_iterate_reversed}, {"Prelude::idmef_value_get_nth", _wrap_idmef_value_get_nth}, {"Prelude::idmef_value_get_count", _wrap_idmef_value_get_count}, {"Prelude::idmef_value_clone", _wrap_idmef_value_clone}, {"Prelude::idmef_value_ref", _wrap_idmef_value_ref}, {"Prelude::idmef_value_print", _wrap_idmef_value_print}, {"Prelude::idmef_value_to_string", _wrap_idmef_value_to_string}, {"Prelude::idmef_value_get", _wrap_idmef_value_get}, {"Prelude::idmef_value_match", _wrap_idmef_value_match}, {"Prelude::idmef_value_check_operator", _wrap_idmef_value_check_operator}, {"Prelude::idmef_value_get_applicable_operators", _wrap_idmef_value_get_applicable_operators}, {"Prelude::idmef_value_destroy", _wrap_idmef_value_destroy}, {"Prelude::idmef_path_get", _wrap_idmef_path_get}, {"Prelude::idmef_path_set", _wrap_idmef_path_set}, {"Prelude::idmef_path_new", _wrap_idmef_path_new}, {"Prelude::idmef_path_new_fast", _wrap_idmef_path_new_fast}, {"Prelude::idmef_path_get_class", _wrap_idmef_path_get_class}, {"Prelude::idmef_path_get_value_type", _wrap_idmef_path_get_value_type}, {"Prelude::idmef_path_set_index", _wrap_idmef_path_set_index}, {"Prelude::idmef_path_undefine_index", _wrap_idmef_path_undefine_index}, {"Prelude::idmef_path_get_index", _wrap_idmef_path_get_index}, {"Prelude::idmef_path_make_child", _wrap_idmef_path_make_child}, {"Prelude::idmef_path_make_parent", _wrap_idmef_path_make_parent}, {"Prelude::idmef_path_destroy", _wrap_idmef_path_destroy}, {"Prelude::idmef_path_ncompare", _wrap_idmef_path_ncompare}, {"Prelude::idmef_path_compare", _wrap_idmef_path_compare}, {"Prelude::idmef_path_clone", _wrap_idmef_path_clone}, {"Prelude::idmef_path_ref", _wrap_idmef_path_ref}, {"Prelude::idmef_path_get_name", _wrap_idmef_path_get_name}, {"Prelude::idmef_path_is_ambiguous", _wrap_idmef_path_is_ambiguous}, {"Prelude::idmef_path_has_lists", _wrap_idmef_path_has_lists}, {"Prelude::idmef_path_is_list", _wrap_idmef_path_is_list}, {"Prelude::idmef_path_get_depth", _wrap_idmef_path_get_depth}, {"Prelude::idmef_path_check_operator", _wrap_idmef_path_check_operator}, {"Prelude::idmef_path_get_applicable_operators", _wrap_idmef_path_get_applicable_operators}, {"Prelude::idmef_time_refcount_set", _wrap_idmef_time_refcount_set}, {"Prelude::idmef_time_refcount_get", _wrap_idmef_time_refcount_get}, {"Prelude::idmef_time_sec_set", _wrap_idmef_time_sec_set}, {"Prelude::idmef_time_sec_get", _wrap_idmef_time_sec_get}, {"Prelude::idmef_time_usec_set", _wrap_idmef_time_usec_set}, {"Prelude::idmef_time_usec_get", _wrap_idmef_time_usec_get}, {"Prelude::idmef_time_gmt_offset_set", _wrap_idmef_time_gmt_offset_set}, {"Prelude::idmef_time_gmt_offset_get", _wrap_idmef_time_gmt_offset_get}, {"Prelude::new_idmef_time", _wrap_new_idmef_time}, {"Prelude::delete_idmef_time", _wrap_delete_idmef_time}, {"Prelude::idmef_time_ref", _wrap_idmef_time_ref}, {"Prelude::idmef_time_new", _wrap_idmef_time_new}, {"Prelude::idmef_time_new_from_time", _wrap_idmef_time_new_from_time}, {"Prelude::idmef_time_new_from_gettimeofday", _wrap_idmef_time_new_from_gettimeofday}, {"Prelude::idmef_time_new_from_string", _wrap_idmef_time_new_from_string}, {"Prelude::idmef_time_new_from_ntpstamp", _wrap_idmef_time_new_from_ntpstamp}, {"Prelude::idmef_time_new_from_timeval", _wrap_idmef_time_new_from_timeval}, {"Prelude::idmef_time_set_from_time", _wrap_idmef_time_set_from_time}, {"Prelude::idmef_time_set_from_gettimeofday", _wrap_idmef_time_set_from_gettimeofday}, {"Prelude::idmef_time_set_from_string", _wrap_idmef_time_set_from_string}, {"Prelude::idmef_time_set_from_ntpstamp", _wrap_idmef_time_set_from_ntpstamp}, {"Prelude::idmef_time_set_from_timeval", _wrap_idmef_time_set_from_timeval}, {"Prelude::idmef_time_destroy_internal", _wrap_idmef_time_destroy_internal}, {"Prelude::idmef_time_destroy", _wrap_idmef_time_destroy}, {"Prelude::idmef_time_clone", _wrap_idmef_time_clone}, {"Prelude::idmef_time_copy", _wrap_idmef_time_copy}, {"Prelude::idmef_time_set_sec", _wrap_idmef_time_set_sec}, {"Prelude::idmef_time_set_usec", _wrap_idmef_time_set_usec}, {"Prelude::idmef_time_set_gmt_offset", _wrap_idmef_time_set_gmt_offset}, {"Prelude::idmef_time_get_sec", _wrap_idmef_time_get_sec}, {"Prelude::idmef_time_get_usec", _wrap_idmef_time_get_usec}, {"Prelude::idmef_time_get_gmt_offset", _wrap_idmef_time_get_gmt_offset}, {"Prelude::idmef_time_to_string", _wrap_idmef_time_to_string}, {"Prelude::idmef_time_to_ntpstamp", _wrap_idmef_time_to_ntpstamp}, {"Prelude::idmef_time_compare", _wrap_idmef_time_compare}, {"Prelude::idmef_data_t_refcount_set", _wrap_idmef_data_t_refcount_set}, {"Prelude::idmef_data_t_refcount_get", _wrap_idmef_data_t_refcount_get}, {"Prelude::idmef_data_t_flags_set", _wrap_idmef_data_t_flags_set}, {"Prelude::idmef_data_t_flags_get", _wrap_idmef_data_t_flags_get}, {"Prelude::idmef_data_t_type_set", _wrap_idmef_data_t_type_set}, {"Prelude::idmef_data_t_type_get", _wrap_idmef_data_t_type_get}, {"Prelude::idmef_data_t_len_set", _wrap_idmef_data_t_len_set}, {"Prelude::idmef_data_t_len_get", _wrap_idmef_data_t_len_get}, {"Prelude::idmef_data_t_list_set", _wrap_idmef_data_t_list_set}, {"Prelude::idmef_data_t_list_get", _wrap_idmef_data_t_list_get}, {"Prelude::idmef_data_t_data_get", _wrap_idmef_data_t_data_get}, {"Prelude::new_idmef_data_t", _wrap_new_idmef_data_t}, {"Prelude::delete_idmef_data_t", _wrap_delete_idmef_data_t}, {"Prelude::idmef_data_t_data_char_data_set", _wrap_idmef_data_t_data_char_data_set}, {"Prelude::idmef_data_t_data_char_data_get", _wrap_idmef_data_t_data_char_data_get}, {"Prelude::idmef_data_t_data_byte_data_set", _wrap_idmef_data_t_data_byte_data_set}, {"Prelude::idmef_data_t_data_byte_data_get", _wrap_idmef_data_t_data_byte_data_get}, {"Prelude::idmef_data_t_data_uint32_data_set", _wrap_idmef_data_t_data_uint32_data_set}, {"Prelude::idmef_data_t_data_uint32_data_get", _wrap_idmef_data_t_data_uint32_data_get}, {"Prelude::idmef_data_t_data_uint64_data_set", _wrap_idmef_data_t_data_uint64_data_set}, {"Prelude::idmef_data_t_data_uint64_data_get", _wrap_idmef_data_t_data_uint64_data_get}, {"Prelude::idmef_data_t_data_float_data_set", _wrap_idmef_data_t_data_float_data_set}, {"Prelude::idmef_data_t_data_float_data_get", _wrap_idmef_data_t_data_float_data_get}, {"Prelude::idmef_data_t_data_rw_data_set", _wrap_idmef_data_t_data_rw_data_set}, {"Prelude::idmef_data_t_data_rw_data_get", _wrap_idmef_data_t_data_rw_data_get}, {"Prelude::idmef_data_t_data_ro_data_set", _wrap_idmef_data_t_data_ro_data_set}, {"Prelude::idmef_data_t_data_ro_data_get", _wrap_idmef_data_t_data_ro_data_get}, {"Prelude::new_idmef_data_t_data", _wrap_new_idmef_data_t_data}, {"Prelude::delete_idmef_data_t_data", _wrap_delete_idmef_data_t_data}, {"Prelude::idmef_data_new", _wrap_idmef_data_new}, {"Prelude::idmef_data_ref", _wrap_idmef_data_ref}, {"Prelude::idmef_data_new_char", _wrap_idmef_data_new_char}, {"Prelude::idmef_data_new_byte", _wrap_idmef_data_new_byte}, {"Prelude::idmef_data_new_uint32", _wrap_idmef_data_new_uint32}, {"Prelude::idmef_data_new_uint64", _wrap_idmef_data_new_uint64}, {"Prelude::idmef_data_new_float", _wrap_idmef_data_new_float}, {"Prelude::idmef_data_set_char", _wrap_idmef_data_set_char}, {"Prelude::idmef_data_set_byte", _wrap_idmef_data_set_byte}, {"Prelude::idmef_data_set_uint32", _wrap_idmef_data_set_uint32}, {"Prelude::idmef_data_set_uint64", _wrap_idmef_data_set_uint64}, {"Prelude::idmef_data_set_float", _wrap_idmef_data_set_float}, {"Prelude::idmef_data_set_ptr_dup_fast", _wrap_idmef_data_set_ptr_dup_fast}, {"Prelude::idmef_data_set_ptr_ref_fast", _wrap_idmef_data_set_ptr_ref_fast}, {"Prelude::idmef_data_set_ptr_nodup_fast", _wrap_idmef_data_set_ptr_nodup_fast}, {"Prelude::idmef_data_new_ptr_dup_fast", _wrap_idmef_data_new_ptr_dup_fast}, {"Prelude::idmef_data_new_ptr_ref_fast", _wrap_idmef_data_new_ptr_ref_fast}, {"Prelude::idmef_data_new_ptr_nodup_fast", _wrap_idmef_data_new_ptr_nodup_fast}, {"Prelude::idmef_data_set_char_string_dup_fast", _wrap_idmef_data_set_char_string_dup_fast}, {"Prelude::idmef_data_new_char_string_dup_fast", _wrap_idmef_data_new_char_string_dup_fast}, {"Prelude::idmef_data_new_char_string_ref_fast", _wrap_idmef_data_new_char_string_ref_fast}, {"Prelude::idmef_data_new_char_string_nodup_fast", _wrap_idmef_data_new_char_string_nodup_fast}, {"Prelude::idmef_data_set_char_string_ref_fast", _wrap_idmef_data_set_char_string_ref_fast}, {"Prelude::idmef_data_set_char_string_nodup_fast", _wrap_idmef_data_set_char_string_nodup_fast}, {"Prelude::idmef_data_new_char_string_ref", _wrap_idmef_data_new_char_string_ref}, {"Prelude::idmef_data_new_char_string_dup", _wrap_idmef_data_new_char_string_dup}, {"Prelude::idmef_data_new_char_string_nodup", _wrap_idmef_data_new_char_string_nodup}, {"Prelude::idmef_data_set_char_string_ref", _wrap_idmef_data_set_char_string_ref}, {"Prelude::idmef_data_set_char_string_dup", _wrap_idmef_data_set_char_string_dup}, {"Prelude::idmef_data_set_char_string_nodup", _wrap_idmef_data_set_char_string_nodup}, {"Prelude::idmef_data_new_byte_string_ref", _wrap_idmef_data_new_byte_string_ref}, {"Prelude::idmef_data_new_byte_string_dup", _wrap_idmef_data_new_byte_string_dup}, {"Prelude::idmef_data_new_byte_string_nodup", _wrap_idmef_data_new_byte_string_nodup}, {"Prelude::idmef_data_set_byte_string_ref", _wrap_idmef_data_set_byte_string_ref}, {"Prelude::idmef_data_set_byte_string_dup", _wrap_idmef_data_set_byte_string_dup}, {"Prelude::idmef_data_set_byte_string_nodup", _wrap_idmef_data_set_byte_string_nodup}, {"Prelude::idmef_data_destroy", _wrap_idmef_data_destroy}, {"Prelude::idmef_data_copy_ref", _wrap_idmef_data_copy_ref}, {"Prelude::idmef_data_copy_dup", _wrap_idmef_data_copy_dup}, {"Prelude::idmef_data_clone", _wrap_idmef_data_clone}, {"Prelude::idmef_data_get_type", _wrap_idmef_data_get_type}, {"Prelude::idmef_data_get_len", _wrap_idmef_data_get_len}, {"Prelude::idmef_data_get_data", _wrap_idmef_data_get_data}, {"Prelude::idmef_data_get_char", _wrap_idmef_data_get_char}, {"Prelude::idmef_data_get_byte", _wrap_idmef_data_get_byte}, {"Prelude::idmef_data_get_uint32", _wrap_idmef_data_get_uint32}, {"Prelude::idmef_data_get_uint64", _wrap_idmef_data_get_uint64}, {"Prelude::idmef_data_get_float", _wrap_idmef_data_get_float}, {"Prelude::idmef_data_get_char_string", _wrap_idmef_data_get_char_string}, {"Prelude::idmef_data_get_byte_string", _wrap_idmef_data_get_byte_string}, {"Prelude::idmef_data_is_empty", _wrap_idmef_data_is_empty}, {"Prelude::idmef_data_to_string", _wrap_idmef_data_to_string}, {"Prelude::idmef_data_destroy_internal", _wrap_idmef_data_destroy_internal}, {"Prelude::idmef_data_compare", _wrap_idmef_data_compare}, {"Prelude::idmef_criterion_operator_to_string", _wrap_idmef_criterion_operator_to_string}, {"Prelude::idmef_criterion_new", _wrap_idmef_criterion_new}, {"Prelude::idmef_criterion_destroy", _wrap_idmef_criterion_destroy}, {"Prelude::idmef_criteria_ref", _wrap_idmef_criteria_ref}, {"Prelude::idmef_criterion_clone", _wrap_idmef_criterion_clone}, {"Prelude::idmef_criterion_print", _wrap_idmef_criterion_print}, {"Prelude::idmef_criterion_to_string", _wrap_idmef_criterion_to_string}, {"Prelude::idmef_criterion_get_path", _wrap_idmef_criterion_get_path}, {"Prelude::idmef_criterion_get_value", _wrap_idmef_criterion_get_value}, {"Prelude::idmef_criterion_get_operator", _wrap_idmef_criterion_get_operator}, {"Prelude::idmef_criterion_match", _wrap_idmef_criterion_match}, {"Prelude::idmef_criteria_new", _wrap_idmef_criteria_new}, {"Prelude::idmef_criteria_destroy", _wrap_idmef_criteria_destroy}, {"Prelude::idmef_criteria_clone", _wrap_idmef_criteria_clone}, {"Prelude::idmef_criteria_print", _wrap_idmef_criteria_print}, {"Prelude::idmef_criteria_to_string", _wrap_idmef_criteria_to_string}, {"Prelude::idmef_criteria_is_criterion", _wrap_idmef_criteria_is_criterion}, {"Prelude::idmef_criteria_get_criterion", _wrap_idmef_criteria_get_criterion}, {"Prelude::idmef_criteria_set_criterion", _wrap_idmef_criteria_set_criterion}, {"Prelude::idmef_criteria_or_criteria", _wrap_idmef_criteria_or_criteria}, {"Prelude::idmef_criteria_and_criteria", _wrap_idmef_criteria_and_criteria}, {"Prelude::idmef_criteria_match", _wrap_idmef_criteria_match}, {"Prelude::idmef_criteria_get_or", _wrap_idmef_criteria_get_or}, {"Prelude::idmef_criteria_get_and", _wrap_idmef_criteria_get_and}, {"Prelude::idmef_criteria_new_from_string", _wrap_idmef_criteria_new_from_string}, {"Prelude::idmef_criteria_set_negation", _wrap_idmef_criteria_set_negation}, {"Prelude::idmef_criteria_get_negation", _wrap_idmef_criteria_get_negation}, {"Prelude::idmef_additional_data_read", _wrap_idmef_additional_data_read}, {"Prelude::idmef_reference_read", _wrap_idmef_reference_read}, {"Prelude::idmef_classification_read", _wrap_idmef_classification_read}, {"Prelude::idmef_user_id_read", _wrap_idmef_user_id_read}, {"Prelude::idmef_user_read", _wrap_idmef_user_read}, {"Prelude::idmef_address_read", _wrap_idmef_address_read}, {"Prelude::idmef_process_read", _wrap_idmef_process_read}, {"Prelude::idmef_web_service_read", _wrap_idmef_web_service_read}, {"Prelude::idmef_snmp_service_read", _wrap_idmef_snmp_service_read}, {"Prelude::idmef_service_read", _wrap_idmef_service_read}, {"Prelude::idmef_node_read", _wrap_idmef_node_read}, {"Prelude::idmef_source_read", _wrap_idmef_source_read}, {"Prelude::idmef_file_access_read", _wrap_idmef_file_access_read}, {"Prelude::idmef_inode_read", _wrap_idmef_inode_read}, {"Prelude::idmef_checksum_read", _wrap_idmef_checksum_read}, {"Prelude::idmef_file_read", _wrap_idmef_file_read}, {"Prelude::idmef_linkage_read", _wrap_idmef_linkage_read}, {"Prelude::idmef_target_read", _wrap_idmef_target_read}, {"Prelude::idmef_analyzer_read", _wrap_idmef_analyzer_read}, {"Prelude::idmef_alertident_read", _wrap_idmef_alertident_read}, {"Prelude::idmef_impact_read", _wrap_idmef_impact_read}, {"Prelude::idmef_action_read", _wrap_idmef_action_read}, {"Prelude::idmef_confidence_read", _wrap_idmef_confidence_read}, {"Prelude::idmef_assessment_read", _wrap_idmef_assessment_read}, {"Prelude::idmef_tool_alert_read", _wrap_idmef_tool_alert_read}, {"Prelude::idmef_correlation_alert_read", _wrap_idmef_correlation_alert_read}, {"Prelude::idmef_overflow_alert_read", _wrap_idmef_overflow_alert_read}, {"Prelude::idmef_alert_read", _wrap_idmef_alert_read}, {"Prelude::idmef_heartbeat_read", _wrap_idmef_heartbeat_read}, {"Prelude::idmef_message_read", _wrap_idmef_message_read}, {"Prelude::idmef_additional_data_write", _wrap_idmef_additional_data_write}, {"Prelude::idmef_reference_write", _wrap_idmef_reference_write}, {"Prelude::idmef_classification_write", _wrap_idmef_classification_write}, {"Prelude::idmef_user_id_write", _wrap_idmef_user_id_write}, {"Prelude::idmef_user_write", _wrap_idmef_user_write}, {"Prelude::idmef_address_write", _wrap_idmef_address_write}, {"Prelude::idmef_process_write", _wrap_idmef_process_write}, {"Prelude::idmef_web_service_write", _wrap_idmef_web_service_write}, {"Prelude::idmef_snmp_service_write", _wrap_idmef_snmp_service_write}, {"Prelude::idmef_service_write", _wrap_idmef_service_write}, {"Prelude::idmef_node_write", _wrap_idmef_node_write}, {"Prelude::idmef_source_write", _wrap_idmef_source_write}, {"Prelude::idmef_file_access_write", _wrap_idmef_file_access_write}, {"Prelude::idmef_inode_write", _wrap_idmef_inode_write}, {"Prelude::idmef_checksum_write", _wrap_idmef_checksum_write}, {"Prelude::idmef_file_write", _wrap_idmef_file_write}, {"Prelude::idmef_linkage_write", _wrap_idmef_linkage_write}, {"Prelude::idmef_target_write", _wrap_idmef_target_write}, {"Prelude::idmef_analyzer_write", _wrap_idmef_analyzer_write}, {"Prelude::idmef_alertident_write", _wrap_idmef_alertident_write}, {"Prelude::idmef_impact_write", _wrap_idmef_impact_write}, {"Prelude::idmef_action_write", _wrap_idmef_action_write}, {"Prelude::idmef_confidence_write", _wrap_idmef_confidence_write}, {"Prelude::idmef_assessment_write", _wrap_idmef_assessment_write}, {"Prelude::idmef_tool_alert_write", _wrap_idmef_tool_alert_write}, {"Prelude::idmef_correlation_alert_write", _wrap_idmef_correlation_alert_write}, {"Prelude::idmef_overflow_alert_write", _wrap_idmef_overflow_alert_write}, {"Prelude::idmef_alert_write", _wrap_idmef_alert_write}, {"Prelude::idmef_heartbeat_write", _wrap_idmef_heartbeat_write}, {"Prelude::idmef_message_write", _wrap_idmef_message_write}, {"Prelude::idmef_additional_data_new_real", _wrap_idmef_additional_data_new_real}, {"Prelude::idmef_additional_data_new_byte", _wrap_idmef_additional_data_new_byte}, {"Prelude::idmef_additional_data_new_integer", _wrap_idmef_additional_data_new_integer}, {"Prelude::idmef_additional_data_new_boolean", _wrap_idmef_additional_data_new_boolean}, {"Prelude::idmef_additional_data_new_character", _wrap_idmef_additional_data_new_character}, {"Prelude::idmef_additional_data_set_real", _wrap_idmef_additional_data_set_real}, {"Prelude::idmef_additional_data_set_byte", _wrap_idmef_additional_data_set_byte}, {"Prelude::idmef_additional_data_set_integer", _wrap_idmef_additional_data_set_integer}, {"Prelude::idmef_additional_data_set_boolean", _wrap_idmef_additional_data_set_boolean}, {"Prelude::idmef_additional_data_set_character", _wrap_idmef_additional_data_set_character}, {"Prelude::idmef_additional_data_new_string_ref_fast", _wrap_idmef_additional_data_new_string_ref_fast}, {"Prelude::idmef_additional_data_new_string_ref", _wrap_idmef_additional_data_new_string_ref}, {"Prelude::idmef_additional_data_set_string_ref_fast", _wrap_idmef_additional_data_set_string_ref_fast}, {"Prelude::idmef_additional_data_set_string_ref", _wrap_idmef_additional_data_set_string_ref}, {"Prelude::idmef_additional_data_new_string_dup_fast", _wrap_idmef_additional_data_new_string_dup_fast}, {"Prelude::idmef_additional_data_new_string_dup", _wrap_idmef_additional_data_new_string_dup}, {"Prelude::idmef_additional_data_set_string_dup_fast", _wrap_idmef_additional_data_set_string_dup_fast}, {"Prelude::idmef_additional_data_set_string_dup", _wrap_idmef_additional_data_set_string_dup}, {"Prelude::idmef_additional_data_new_string_nodup_fast", _wrap_idmef_additional_data_new_string_nodup_fast}, {"Prelude::idmef_additional_data_new_string_nodup", _wrap_idmef_additional_data_new_string_nodup}, {"Prelude::idmef_additional_data_set_string_nodup_fast", _wrap_idmef_additional_data_set_string_nodup_fast}, {"Prelude::idmef_additional_data_set_string_nodup", _wrap_idmef_additional_data_set_string_nodup}, {"Prelude::idmef_additional_data_new_ntpstamp_ref_fast", _wrap_idmef_additional_data_new_ntpstamp_ref_fast}, {"Prelude::idmef_additional_data_new_ntpstamp_ref", _wrap_idmef_additional_data_new_ntpstamp_ref}, {"Prelude::idmef_additional_data_set_ntpstamp_ref_fast", _wrap_idmef_additional_data_set_ntpstamp_ref_fast}, {"Prelude::idmef_additional_data_set_ntpstamp_ref", _wrap_idmef_additional_data_set_ntpstamp_ref}, {"Prelude::idmef_additional_data_new_ntpstamp_dup_fast", _wrap_idmef_additional_data_new_ntpstamp_dup_fast}, {"Prelude::idmef_additional_data_new_ntpstamp_dup", _wrap_idmef_additional_data_new_ntpstamp_dup}, {"Prelude::idmef_additional_data_set_ntpstamp_dup_fast", _wrap_idmef_additional_data_set_ntpstamp_dup_fast}, {"Prelude::idmef_additional_data_set_ntpstamp_dup", _wrap_idmef_additional_data_set_ntpstamp_dup}, {"Prelude::idmef_additional_data_new_ntpstamp_nodup_fast", _wrap_idmef_additional_data_new_ntpstamp_nodup_fast}, {"Prelude::idmef_additional_data_new_ntpstamp_nodup", _wrap_idmef_additional_data_new_ntpstamp_nodup}, {"Prelude::idmef_additional_data_set_ntpstamp_nodup_fast", _wrap_idmef_additional_data_set_ntpstamp_nodup_fast}, {"Prelude::idmef_additional_data_set_ntpstamp_nodup", _wrap_idmef_additional_data_set_ntpstamp_nodup}, {"Prelude::idmef_additional_data_new_date_time_ref_fast", _wrap_idmef_additional_data_new_date_time_ref_fast}, {"Prelude::idmef_additional_data_new_date_time_ref", _wrap_idmef_additional_data_new_date_time_ref}, {"Prelude::idmef_additional_data_set_date_time_ref_fast", _wrap_idmef_additional_data_set_date_time_ref_fast}, {"Prelude::idmef_additional_data_set_date_time_ref", _wrap_idmef_additional_data_set_date_time_ref}, {"Prelude::idmef_additional_data_new_date_time_dup_fast", _wrap_idmef_additional_data_new_date_time_dup_fast}, {"Prelude::idmef_additional_data_new_date_time_dup", _wrap_idmef_additional_data_new_date_time_dup}, {"Prelude::idmef_additional_data_set_date_time_dup_fast", _wrap_idmef_additional_data_set_date_time_dup_fast}, {"Prelude::idmef_additional_data_set_date_time_dup", _wrap_idmef_additional_data_set_date_time_dup}, {"Prelude::idmef_additional_data_new_date_time_nodup_fast", _wrap_idmef_additional_data_new_date_time_nodup_fast}, {"Prelude::idmef_additional_data_new_date_time_nodup", _wrap_idmef_additional_data_new_date_time_nodup}, {"Prelude::idmef_additional_data_set_date_time_nodup_fast", _wrap_idmef_additional_data_set_date_time_nodup_fast}, {"Prelude::idmef_additional_data_set_date_time_nodup", _wrap_idmef_additional_data_set_date_time_nodup}, {"Prelude::idmef_additional_data_new_portlist_ref_fast", _wrap_idmef_additional_data_new_portlist_ref_fast}, {"Prelude::idmef_additional_data_new_portlist_ref", _wrap_idmef_additional_data_new_portlist_ref}, {"Prelude::idmef_additional_data_set_portlist_ref_fast", _wrap_idmef_additional_data_set_portlist_ref_fast}, {"Prelude::idmef_additional_data_set_portlist_ref", _wrap_idmef_additional_data_set_portlist_ref}, {"Prelude::idmef_additional_data_new_portlist_dup_fast", _wrap_idmef_additional_data_new_portlist_dup_fast}, {"Prelude::idmef_additional_data_new_portlist_dup", _wrap_idmef_additional_data_new_portlist_dup}, {"Prelude::idmef_additional_data_set_portlist_dup_fast", _wrap_idmef_additional_data_set_portlist_dup_fast}, {"Prelude::idmef_additional_data_set_portlist_dup", _wrap_idmef_additional_data_set_portlist_dup}, {"Prelude::idmef_additional_data_new_portlist_nodup_fast", _wrap_idmef_additional_data_new_portlist_nodup_fast}, {"Prelude::idmef_additional_data_new_portlist_nodup", _wrap_idmef_additional_data_new_portlist_nodup}, {"Prelude::idmef_additional_data_set_portlist_nodup_fast", _wrap_idmef_additional_data_set_portlist_nodup_fast}, {"Prelude::idmef_additional_data_set_portlist_nodup", _wrap_idmef_additional_data_set_portlist_nodup}, {"Prelude::idmef_additional_data_new_xml_ref_fast", _wrap_idmef_additional_data_new_xml_ref_fast}, {"Prelude::idmef_additional_data_new_xml_ref", _wrap_idmef_additional_data_new_xml_ref}, {"Prelude::idmef_additional_data_set_xml_ref_fast", _wrap_idmef_additional_data_set_xml_ref_fast}, {"Prelude::idmef_additional_data_set_xml_ref", _wrap_idmef_additional_data_set_xml_ref}, {"Prelude::idmef_additional_data_new_xml_dup_fast", _wrap_idmef_additional_data_new_xml_dup_fast}, {"Prelude::idmef_additional_data_new_xml_dup", _wrap_idmef_additional_data_new_xml_dup}, {"Prelude::idmef_additional_data_set_xml_dup_fast", _wrap_idmef_additional_data_set_xml_dup_fast}, {"Prelude::idmef_additional_data_set_xml_dup", _wrap_idmef_additional_data_set_xml_dup}, {"Prelude::idmef_additional_data_new_xml_nodup_fast", _wrap_idmef_additional_data_new_xml_nodup_fast}, {"Prelude::idmef_additional_data_new_xml_nodup", _wrap_idmef_additional_data_new_xml_nodup}, {"Prelude::idmef_additional_data_set_xml_nodup_fast", _wrap_idmef_additional_data_set_xml_nodup_fast}, {"Prelude::idmef_additional_data_set_xml_nodup", _wrap_idmef_additional_data_set_xml_nodup}, {"Prelude::idmef_additional_data_new_byte_string_ref", _wrap_idmef_additional_data_new_byte_string_ref}, {"Prelude::idmef_additional_data_set_byte_string_ref", _wrap_idmef_additional_data_set_byte_string_ref}, {"Prelude::idmef_additional_data_new_byte_string_dup", _wrap_idmef_additional_data_new_byte_string_dup}, {"Prelude::idmef_additional_data_set_byte_string_dup", _wrap_idmef_additional_data_set_byte_string_dup}, {"Prelude::idmef_additional_data_new_byte_string_nodup", _wrap_idmef_additional_data_new_byte_string_nodup}, {"Prelude::idmef_additional_data_set_byte_string_nodup", _wrap_idmef_additional_data_set_byte_string_nodup}, {"Prelude::idmef_additional_data_copy_ref", _wrap_idmef_additional_data_copy_ref}, {"Prelude::idmef_additional_data_copy_dup", _wrap_idmef_additional_data_copy_dup}, {"Prelude::idmef_additional_data_get_real", _wrap_idmef_additional_data_get_real}, {"Prelude::idmef_additional_data_get_integer", _wrap_idmef_additional_data_get_integer}, {"Prelude::idmef_additional_data_get_boolean", _wrap_idmef_additional_data_get_boolean}, {"Prelude::idmef_additional_data_get_character", _wrap_idmef_additional_data_get_character}, {"Prelude::idmef_additional_data_get_byte", _wrap_idmef_additional_data_get_byte}, {"Prelude::idmef_additional_data_get_len", _wrap_idmef_additional_data_get_len}, {"Prelude::idmef_additional_data_is_empty", _wrap_idmef_additional_data_is_empty}, {"Prelude::idmef_additional_data_data_to_string", _wrap_idmef_additional_data_data_to_string}, {"Prelude::idmef_value_type_class_t_object_set", _wrap_idmef_value_type_class_t_object_set}, {"Prelude::idmef_value_type_class_t_object_get", _wrap_idmef_value_type_class_t_object_get}, {"Prelude::idmef_value_type_class_t_class_id_set", _wrap_idmef_value_type_class_t_class_id_set}, {"Prelude::idmef_value_type_class_t_class_id_get", _wrap_idmef_value_type_class_t_class_id_get}, {"Prelude::new_idmef_value_type_class_t", _wrap_new_idmef_value_type_class_t}, {"Prelude::delete_idmef_value_type_class_t", _wrap_delete_idmef_value_type_class_t}, {"Prelude::idmef_value_type_enum_t_value_set", _wrap_idmef_value_type_enum_t_value_set}, {"Prelude::idmef_value_type_enum_t_value_get", _wrap_idmef_value_type_enum_t_value_get}, {"Prelude::idmef_value_type_enum_t_class_id_set", _wrap_idmef_value_type_enum_t_class_id_set}, {"Prelude::idmef_value_type_enum_t_class_id_get", _wrap_idmef_value_type_enum_t_class_id_get}, {"Prelude::new_idmef_value_type_enum_t", _wrap_new_idmef_value_type_enum_t}, {"Prelude::delete_idmef_value_type_enum_t", _wrap_delete_idmef_value_type_enum_t}, {"Prelude::idmef_value_type_data_t_int8_val_set", _wrap_idmef_value_type_data_t_int8_val_set}, {"Prelude::idmef_value_type_data_t_int8_val_get", _wrap_idmef_value_type_data_t_int8_val_get}, {"Prelude::idmef_value_type_data_t_uint8_val_set", _wrap_idmef_value_type_data_t_uint8_val_set}, {"Prelude::idmef_value_type_data_t_uint8_val_get", _wrap_idmef_value_type_data_t_uint8_val_get}, {"Prelude::idmef_value_type_data_t_int16_val_set", _wrap_idmef_value_type_data_t_int16_val_set}, {"Prelude::idmef_value_type_data_t_int16_val_get", _wrap_idmef_value_type_data_t_int16_val_get}, {"Prelude::idmef_value_type_data_t_uint16_val_set", _wrap_idmef_value_type_data_t_uint16_val_set}, {"Prelude::idmef_value_type_data_t_uint16_val_get", _wrap_idmef_value_type_data_t_uint16_val_get}, {"Prelude::idmef_value_type_data_t_int32_val_set", _wrap_idmef_value_type_data_t_int32_val_set}, {"Prelude::idmef_value_type_data_t_int32_val_get", _wrap_idmef_value_type_data_t_int32_val_get}, {"Prelude::idmef_value_type_data_t_uint32_val_set", _wrap_idmef_value_type_data_t_uint32_val_set}, {"Prelude::idmef_value_type_data_t_uint32_val_get", _wrap_idmef_value_type_data_t_uint32_val_get}, {"Prelude::idmef_value_type_data_t_int64_val_set", _wrap_idmef_value_type_data_t_int64_val_set}, {"Prelude::idmef_value_type_data_t_int64_val_get", _wrap_idmef_value_type_data_t_int64_val_get}, {"Prelude::idmef_value_type_data_t_uint64_val_set", _wrap_idmef_value_type_data_t_uint64_val_set}, {"Prelude::idmef_value_type_data_t_uint64_val_get", _wrap_idmef_value_type_data_t_uint64_val_get}, {"Prelude::idmef_value_type_data_t_float_val_set", _wrap_idmef_value_type_data_t_float_val_set}, {"Prelude::idmef_value_type_data_t_float_val_get", _wrap_idmef_value_type_data_t_float_val_get}, {"Prelude::idmef_value_type_data_t_double_val_set", _wrap_idmef_value_type_data_t_double_val_set}, {"Prelude::idmef_value_type_data_t_double_val_get", _wrap_idmef_value_type_data_t_double_val_get}, {"Prelude::idmef_value_type_data_t_string_val_set", _wrap_idmef_value_type_data_t_string_val_set}, {"Prelude::idmef_value_type_data_t_string_val_get", _wrap_idmef_value_type_data_t_string_val_get}, {"Prelude::idmef_value_type_data_t_time_val_set", _wrap_idmef_value_type_data_t_time_val_set}, {"Prelude::idmef_value_type_data_t_time_val_get", _wrap_idmef_value_type_data_t_time_val_get}, {"Prelude::idmef_value_type_data_t_data_val_set", _wrap_idmef_value_type_data_t_data_val_set}, {"Prelude::idmef_value_type_data_t_data_val_get", _wrap_idmef_value_type_data_t_data_val_get}, {"Prelude::idmef_value_type_data_t_list_val_set", _wrap_idmef_value_type_data_t_list_val_set}, {"Prelude::idmef_value_type_data_t_list_val_get", _wrap_idmef_value_type_data_t_list_val_get}, {"Prelude::idmef_value_type_data_t_enum_val_set", _wrap_idmef_value_type_data_t_enum_val_set}, {"Prelude::idmef_value_type_data_t_enum_val_get", _wrap_idmef_value_type_data_t_enum_val_get}, {"Prelude::idmef_value_type_data_t_class_val_set", _wrap_idmef_value_type_data_t_class_val_set}, {"Prelude::idmef_value_type_data_t_class_val_get", _wrap_idmef_value_type_data_t_class_val_get}, {"Prelude::new_idmef_value_type_data_t", _wrap_new_idmef_value_type_data_t}, {"Prelude::delete_idmef_value_type_data_t", _wrap_delete_idmef_value_type_data_t}, {"Prelude::idmef_value_type_t_id_set", _wrap_idmef_value_type_t_id_set}, {"Prelude::idmef_value_type_t_id_get", _wrap_idmef_value_type_t_id_get}, {"Prelude::idmef_value_type_t_data_set", _wrap_idmef_value_type_t_data_set}, {"Prelude::idmef_value_type_t_data_get", _wrap_idmef_value_type_t_data_get}, {"Prelude::new_idmef_value_type_t", _wrap_new_idmef_value_type_t}, {"Prelude::delete_idmef_value_type_t", _wrap_delete_idmef_value_type_t}, {"Prelude::idmef_value_type_ref", _wrap_idmef_value_type_ref}, {"Prelude::idmef_value_type_copy", _wrap_idmef_value_type_copy}, {"Prelude::idmef_value_type_read", _wrap_idmef_value_type_read}, {"Prelude::idmef_value_type_write", _wrap_idmef_value_type_write}, {"Prelude::idmef_value_type_destroy", _wrap_idmef_value_type_destroy}, {"Prelude::idmef_value_type_clone", _wrap_idmef_value_type_clone}, {"Prelude::idmef_value_type_compare", _wrap_idmef_value_type_compare}, {"Prelude::idmef_value_type_check_operator", _wrap_idmef_value_type_check_operator}, {"Prelude::idmef_value_type_get_applicable_operators", _wrap_idmef_value_type_get_applicable_operators}, {"Prelude::idmef_value_type_to_string", _wrap_idmef_value_type_to_string}, {"Prelude::idmef_class_is_child_list", _wrap_idmef_class_is_child_list}, {"Prelude::idmef_class_get_child_class", _wrap_idmef_class_get_child_class}, {"Prelude::idmef_class_get_child_value_type", _wrap_idmef_class_get_child_value_type}, {"Prelude::idmef_class_enum_to_numeric", _wrap_idmef_class_enum_to_numeric}, {"Prelude::idmef_class_enum_to_string", _wrap_idmef_class_enum_to_string}, {"Prelude::idmef_class_get_child", _wrap_idmef_class_get_child}, {"Prelude::idmef_class_new_child", _wrap_idmef_class_new_child}, {"Prelude::idmef_class_destroy_child", _wrap_idmef_class_destroy_child}, {"Prelude::idmef_class_find", _wrap_idmef_class_find}, {"Prelude::idmef_class_find_child", _wrap_idmef_class_find_child}, {"Prelude::idmef_class_get_name", _wrap_idmef_class_get_name}, {"Prelude::idmef_class_get_child_name", _wrap_idmef_class_get_child_name}, {"Prelude::idmef_class_copy", _wrap_idmef_class_copy}, {"Prelude::idmef_class_clone", _wrap_idmef_class_clone}, {"Prelude::idmef_class_compare", _wrap_idmef_class_compare}, {"Prelude::idmef_class_ref", _wrap_idmef_class_ref}, {"Prelude::idmef_class_destroy", _wrap_idmef_class_destroy}, {"Prelude::prelude_connection_destroy", _wrap_prelude_connection_destroy}, {"Prelude::prelude_connection_ref", _wrap_prelude_connection_ref}, {"Prelude::prelude_connection_send", _wrap_prelude_connection_send}, {"Prelude::prelude_connection_recv", _wrap_prelude_connection_recv}, {"Prelude::prelude_connection_recv_idmef", _wrap_prelude_connection_recv_idmef}, {"Prelude::prelude_connection_connect", _wrap_prelude_connection_connect}, {"Prelude::prelude_connection_forward", _wrap_prelude_connection_forward}, {"Prelude::prelude_connection_get_local_addr", _wrap_prelude_connection_get_local_addr}, {"Prelude::prelude_connection_get_local_port", _wrap_prelude_connection_get_local_port}, {"Prelude::prelude_connection_get_peer_addr", _wrap_prelude_connection_get_peer_addr}, {"Prelude::prelude_connection_get_peer_port", _wrap_prelude_connection_get_peer_port}, {"Prelude::prelude_connection_is_alive", _wrap_prelude_connection_is_alive}, {"Prelude::prelude_connection_get_fd", _wrap_prelude_connection_get_fd}, {"Prelude::prelude_connection_close", _wrap_prelude_connection_close}, {"Prelude::prelude_connection_set_fd_ref", _wrap_prelude_connection_set_fd_ref}, {"Prelude::prelude_connection_set_fd_nodup", _wrap_prelude_connection_set_fd_nodup}, {"Prelude::prelude_connection_set_state", _wrap_prelude_connection_set_state}, {"Prelude::prelude_connection_get_state", _wrap_prelude_connection_get_state}, {"Prelude::prelude_connection_set_data", _wrap_prelude_connection_set_data}, {"Prelude::prelude_connection_get_data", _wrap_prelude_connection_get_data}, {"Prelude::prelude_connection_get_default_socket_filename", _wrap_prelude_connection_get_default_socket_filename}, {"Prelude::prelude_connection_get_permission", _wrap_prelude_connection_get_permission}, {"Prelude::prelude_connection_get_peer_analyzerid", _wrap_prelude_connection_get_peer_analyzerid}, {"Prelude::prelude_connection_set_peer_analyzerid", _wrap_prelude_connection_set_peer_analyzerid}, {"Prelude::prelude_connection_new", _wrap_prelude_connection_new}, {"Prelude::prelude_connection_new_msgbuf", _wrap_prelude_connection_new_msgbuf}, {"Prelude::prelude_connection_permission_to_string", _wrap_prelude_connection_permission_to_string}, {"Prelude::prelude_connection_permission_new_from_string", _wrap_prelude_connection_permission_new_from_string}, {"Prelude::prelude_connection_pool_broadcast", _wrap_prelude_connection_pool_broadcast}, {"Prelude::prelude_connection_pool_broadcast_async", _wrap_prelude_connection_pool_broadcast_async}, {"Prelude::prelude_connection_pool_init", _wrap_prelude_connection_pool_init}, {"Prelude::prelude_connection_pool_new", _wrap_prelude_connection_pool_new}, {"Prelude::prelude_connection_pool_get_connection_list", _wrap_prelude_connection_pool_get_connection_list}, {"Prelude::prelude_connection_pool_add_connection", _wrap_prelude_connection_pool_add_connection}, {"Prelude::prelude_connection_pool_del_connection", _wrap_prelude_connection_pool_del_connection}, {"Prelude::prelude_connection_pool_set_connection_dead", _wrap_prelude_connection_pool_set_connection_dead}, {"Prelude::prelude_connection_pool_set_connection_alive", _wrap_prelude_connection_pool_set_connection_alive}, {"Prelude::prelude_connection_pool_set_connection_string", _wrap_prelude_connection_pool_set_connection_string}, {"Prelude::prelude_connection_pool_get_connection_string", _wrap_prelude_connection_pool_get_connection_string}, {"Prelude::prelude_connection_pool_destroy", _wrap_prelude_connection_pool_destroy}, {"Prelude::prelude_connection_pool_ref", _wrap_prelude_connection_pool_ref}, {"Prelude::prelude_connection_pool_get_flags", _wrap_prelude_connection_pool_get_flags}, {"Prelude::prelude_connection_pool_set_flags", _wrap_prelude_connection_pool_set_flags}, {"Prelude::prelude_connection_pool_set_required_permission", _wrap_prelude_connection_pool_set_required_permission}, {"Prelude::prelude_connection_pool_set_data", _wrap_prelude_connection_pool_set_data}, {"Prelude::prelude_connection_pool_get_data", _wrap_prelude_connection_pool_get_data}, {"Prelude::prelude_connection_pool_recv", _wrap_prelude_connection_pool_recv}, {"Prelude::prelude_connection_pool_check_event", _wrap_prelude_connection_pool_check_event}, {"Prelude::prelude_connection_pool_set_global_event_handler", _wrap_prelude_connection_pool_set_global_event_handler}, {"Prelude::prelude_connection_pool_set_event_handler", _wrap_prelude_connection_pool_set_event_handler}, {"Prelude::prelude_option_set_priority", _wrap_prelude_option_set_priority}, {"Prelude::prelude_option_print", _wrap_prelude_option_print}, {"Prelude::prelude_option_wide_send_msg", _wrap_prelude_option_wide_send_msg}, {"Prelude::prelude_option_destroy", _wrap_prelude_option_destroy}, {"Prelude::prelude_option_read", _wrap_prelude_option_read}, {"Prelude::prelude_option_add", _wrap_prelude_option_add}, {"Prelude::prelude_option_set_type", _wrap_prelude_option_set_type}, {"Prelude::prelude_option_get_type", _wrap_prelude_option_get_type}, {"Prelude::prelude_option_set_warnings", _wrap_prelude_option_set_warnings}, {"Prelude::prelude_option_get_shortname", _wrap_prelude_option_get_shortname}, {"Prelude::prelude_option_get_longname", _wrap_prelude_option_get_longname}, {"Prelude::_prelude_option_set_private_data", _wrap__prelude_option_set_private_data}, {"Prelude::_prelude_option_get_private_data", _wrap__prelude_option_get_private_data}, {"Prelude::prelude_option_set_data", _wrap_prelude_option_set_data}, {"Prelude::prelude_option_get_data", _wrap_prelude_option_get_data}, {"Prelude::prelude_option_invoke_commit", _wrap_prelude_option_invoke_commit}, {"Prelude::prelude_option_invoke_set", _wrap_prelude_option_invoke_set}, {"Prelude::prelude_option_invoke_get", _wrap_prelude_option_invoke_get}, {"Prelude::prelude_option_invoke_destroy", _wrap_prelude_option_invoke_destroy}, {"Prelude::prelude_option_new_root", _wrap_prelude_option_new_root}, {"Prelude::prelude_option_new", _wrap_prelude_option_new}, {"Prelude::prelude_option_set_longopt", _wrap_prelude_option_set_longopt}, {"Prelude::prelude_option_get_longopt", _wrap_prelude_option_get_longopt}, {"Prelude::prelude_option_set_description", _wrap_prelude_option_set_description}, {"Prelude::prelude_option_get_description", _wrap_prelude_option_get_description}, {"Prelude::prelude_option_set_has_arg", _wrap_prelude_option_set_has_arg}, {"Prelude::prelude_option_get_has_arg", _wrap_prelude_option_get_has_arg}, {"Prelude::prelude_option_set_value", _wrap_prelude_option_set_value}, {"Prelude::prelude_option_get_value", _wrap_prelude_option_get_value}, {"Prelude::prelude_option_set_help", _wrap_prelude_option_set_help}, {"Prelude::prelude_option_get_help", _wrap_prelude_option_get_help}, {"Prelude::prelude_option_set_input_validation_regex", _wrap_prelude_option_set_input_validation_regex}, {"Prelude::prelude_option_get_input_validation_regex", _wrap_prelude_option_get_input_validation_regex}, {"Prelude::prelude_option_set_input_type", _wrap_prelude_option_set_input_type}, {"Prelude::prelude_option_get_input_type", _wrap_prelude_option_get_input_type}, {"Prelude::prelude_option_get_optlist", _wrap_prelude_option_get_optlist}, {"Prelude::prelude_option_get_next", _wrap_prelude_option_get_next}, {"Prelude::prelude_option_has_optlist", _wrap_prelude_option_has_optlist}, {"Prelude::prelude_option_get_parent", _wrap_prelude_option_get_parent}, {"Prelude::prelude_option_set_destroy_callback", _wrap_prelude_option_set_destroy_callback}, {"Prelude::prelude_option_get_destroy_callback", _wrap_prelude_option_get_destroy_callback}, {"Prelude::prelude_option_set_set_callback", _wrap_prelude_option_set_set_callback}, {"Prelude::prelude_option_get_set_callback", _wrap_prelude_option_get_set_callback}, {"Prelude::prelude_option_set_get_callback", _wrap_prelude_option_set_get_callback}, {"Prelude::prelude_option_get_get_callback", _wrap_prelude_option_get_get_callback}, {"Prelude::prelude_option_set_commit_callback", _wrap_prelude_option_set_commit_callback}, {"Prelude::prelude_option_get_commit_callback", _wrap_prelude_option_get_commit_callback}, {"Prelude::prelude_option_set_default_context", _wrap_prelude_option_set_default_context}, {"Prelude::prelude_option_new_context", _wrap_prelude_option_new_context}, {"Prelude::prelude_option_context_destroy", _wrap_prelude_option_context_destroy}, {"Prelude::prelude_option_context_get_data", _wrap_prelude_option_context_get_data}, {"Prelude::prelude_option_context_set_data", _wrap_prelude_option_context_set_data}, {"Prelude::prelude_option_search", _wrap_prelude_option_search}, {"Prelude::prelude_option_search_context", _wrap_prelude_option_search_context}, {"Prelude::prelude_option_push_request", _wrap_prelude_option_push_request}, {"Prelude::prelude_option_new_request", _wrap_prelude_option_new_request}, {"Prelude::prelude_option_process_request", _wrap_prelude_option_process_request}, {"Prelude::prelude_option_recv_reply", _wrap_prelude_option_recv_reply}, {"Prelude::prelude_msg_read", _wrap_prelude_msg_read}, {"Prelude::prelude_msg_forward", _wrap_prelude_msg_forward}, {"Prelude::prelude_msg_get", _wrap_prelude_msg_get}, {"Prelude::prelude_msg_recycle", _wrap_prelude_msg_recycle}, {"Prelude::prelude_msg_mark_end", _wrap_prelude_msg_mark_end}, {"Prelude::prelude_msg_dynamic_new", _wrap_prelude_msg_dynamic_new}, {"Prelude::prelude_msg_new", _wrap_prelude_msg_new}, {"Prelude::prelude_msg_set", _wrap_prelude_msg_set}, {"Prelude::prelude_msg_write", _wrap_prelude_msg_write}, {"Prelude::prelude_msg_set_tag", _wrap_prelude_msg_set_tag}, {"Prelude::prelude_msg_set_priority", _wrap_prelude_msg_set_priority}, {"Prelude::prelude_msg_get_tag", _wrap_prelude_msg_get_tag}, {"Prelude::prelude_msg_get_priority", _wrap_prelude_msg_get_priority}, {"Prelude::prelude_msg_get_len", _wrap_prelude_msg_get_len}, {"Prelude::prelude_msg_get_datalen", _wrap_prelude_msg_get_datalen}, {"Prelude::prelude_msg_get_message_data", _wrap_prelude_msg_get_message_data}, {"Prelude::prelude_msg_get_time", _wrap_prelude_msg_get_time}, {"Prelude::prelude_msg_is_empty", _wrap_prelude_msg_is_empty}, {"Prelude::prelude_msg_is_fragment", _wrap_prelude_msg_is_fragment}, {"Prelude::prelude_msg_destroy", _wrap_prelude_msg_destroy}, {"Prelude::prelude_msg_set_callback", _wrap_prelude_msg_set_callback}, {"Prelude::prelude_msg_set_data", _wrap_prelude_msg_set_data}, {"Prelude::prelude_msg_ref", _wrap_prelude_msg_ref}, {"Prelude::_prelude_log", _wrap__prelude_log}, {"Prelude::prelude_log", _wrap_prelude_log}, {"Prelude::prelude_log_debug", _wrap_prelude_log_debug}, {"Prelude::prelude_log_set_level", _wrap_prelude_log_set_level}, {"Prelude::prelude_log_set_debug_level", _wrap_prelude_log_set_debug_level}, {"Prelude::prelude_log_get_flags", _wrap_prelude_log_get_flags}, {"Prelude::prelude_log_set_flags", _wrap_prelude_log_set_flags}, {"Prelude::prelude_log_get_prefix", _wrap_prelude_log_get_prefix}, {"Prelude::prelude_log_set_prefix", _wrap_prelude_log_set_prefix}, {"Prelude::prelude_log_set_callback", _wrap_prelude_log_set_callback}, {"Prelude::prelude_log_set_logfile", _wrap_prelude_log_set_logfile}, {"Prelude::_prelude_log_set_abort_level", _wrap__prelude_log_set_abort_level}, {"Prelude::_prelude_log_set_abort_level_from_string", _wrap__prelude_log_set_abort_level_from_string}, {"Prelude::prelude_msgbuf_new", _wrap_prelude_msgbuf_new}, {"Prelude::prelude_msgbuf_destroy", _wrap_prelude_msgbuf_destroy}, {"Prelude::prelude_msgbuf_mark_end", _wrap_prelude_msgbuf_mark_end}, {"Prelude::prelude_msgbuf_set", _wrap_prelude_msgbuf_set}, {"Prelude::prelude_msgbuf_get_msg", _wrap_prelude_msgbuf_get_msg}, {"Prelude::prelude_msgbuf_set_callback", _wrap_prelude_msgbuf_set_callback}, {"Prelude::prelude_msgbuf_set_data", _wrap_prelude_msgbuf_set_data}, {"Prelude::prelude_msgbuf_get_data", _wrap_prelude_msgbuf_get_data}, {"Prelude::prelude_msgbuf_set_flags", _wrap_prelude_msgbuf_set_flags}, {"Prelude::prelude_msgbuf_get_flags", _wrap_prelude_msgbuf_get_flags}, {"Prelude::prelude_timer_t_list_set", _wrap_prelude_timer_t_list_set}, {"Prelude::prelude_timer_t_list_get", _wrap_prelude_timer_t_list_get}, {"Prelude::prelude_timer_t_expire_set", _wrap_prelude_timer_t_expire_set}, {"Prelude::prelude_timer_t_expire_get", _wrap_prelude_timer_t_expire_get}, {"Prelude::prelude_timer_t_start_time_set", _wrap_prelude_timer_t_start_time_set}, {"Prelude::prelude_timer_t_start_time_get", _wrap_prelude_timer_t_start_time_get}, {"Prelude::prelude_timer_t_data_set", _wrap_prelude_timer_t_data_set}, {"Prelude::prelude_timer_t_data_get", _wrap_prelude_timer_t_data_get}, {"Prelude::prelude_timer_t_function_set", _wrap_prelude_timer_t_function_set}, {"Prelude::prelude_timer_t_function_get", _wrap_prelude_timer_t_function_get}, {"Prelude::new_prelude_timer_t", _wrap_new_prelude_timer_t}, {"Prelude::delete_prelude_timer_t", _wrap_delete_prelude_timer_t}, {"Prelude::prelude_timer_init", _wrap_prelude_timer_init}, {"Prelude::prelude_timer_init_list", _wrap_prelude_timer_init_list}, {"Prelude::prelude_timer_reset", _wrap_prelude_timer_reset}, {"Prelude::prelude_timer_destroy", _wrap_prelude_timer_destroy}, {"Prelude::prelude_timer_wake_up", _wrap_prelude_timer_wake_up}, {"Prelude::prelude_timer_flush", _wrap_prelude_timer_flush}, {"Prelude::prelude_timer_lock_critical_region", _wrap_prelude_timer_lock_critical_region}, {"Prelude::prelude_timer_unlock_critical_region", _wrap_prelude_timer_unlock_critical_region}, {"Prelude::_prelude_timer_init", _wrap__prelude_timer_init}, {"Prelude::_prelude_timer_fork_prepare", _wrap__prelude_timer_fork_prepare}, {"Prelude::_prelude_timer_fork_parent", _wrap__prelude_timer_fork_parent}, {"Prelude::_prelude_timer_fork_child", _wrap__prelude_timer_fork_child}, {"Prelude::prelude_error_is_verbose", _wrap_prelude_error_is_verbose}, {"Prelude::prelude_error_get_code", _wrap_prelude_error_get_code}, {"Prelude::prelude_error_get_source", _wrap_prelude_error_get_source}, {"Prelude::prelude_error_code_from_errno", _wrap_prelude_error_code_from_errno}, {"Prelude::prelude_error_make", _wrap_prelude_error_make}, {"Prelude::prelude_error_make_from_errno", _wrap_prelude_error_make_from_errno}, {"Prelude::prelude_perror", _wrap_prelude_perror}, {"Prelude::prelude_strerror", _wrap_prelude_strerror}, {"Prelude::prelude_strsource", _wrap_prelude_strsource}, {"Prelude::prelude_error_code_to_errno", _wrap_prelude_error_code_to_errno}, {"Prelude::prelude_error_verbose_make", _wrap_prelude_error_verbose_make}, {"Prelude::prelude_error", _wrap_prelude_error}, {"Prelude::prelude_error_verbose", _wrap_prelude_error_verbose}, {"Prelude::prelude_error_from_errno", _wrap_prelude_error_from_errno}, {0,0} }; /* ----------------------------------------------------------------------------- * Type initialization: * This problem is tough by the requirement that no dynamic * memory is used. Also, since swig_type_info structures store pointers to * swig_cast_info structures and swig_cast_info structures store pointers back * to swig_type_info structures, we need some lookup code at initialization. * The idea is that swig generates all the structures that are needed. * The runtime then collects these partially filled structures. * The SWIG_InitializeModule function takes these initial arrays out of * swig_module, and does all the lookup, filling in the swig_module.types * array with the correct data and linking the correct swig_cast_info * structures together. * * The generated swig_type_info structures are assigned staticly to an initial * array. We just loop through that array, and handle each type individually. * First we lookup if this type has been already loaded, and if so, use the * loaded structure instead of the generated one. Then we have to fill in the * cast linked list. The cast data is initially stored in something like a * two-dimensional array. Each row corresponds to a type (there are the same * number of rows as there are in the swig_type_initial array). Each entry in * a column is one of the swig_cast_info structures for that type. * The cast_initial array is actually an array of arrays, because each row has * a variable number of columns. So to actually build the cast linked list, * we find the array of casts associated with the type, and loop through it * adding the casts to the list. The one last trick we need to do is making * sure the type pointer in the swig_cast_info struct is correct. * * First off, we lookup the cast->type name to see if it is already loaded. * There are three cases to handle: * 1) If the cast->type has already been loaded AND the type we are adding * casting info to has not been loaded (it is in this module), THEN we * replace the cast->type pointer with the type pointer that has already * been loaded. * 2) If BOTH types (the one we are adding casting info to, and the * cast->type) are loaded, THEN the cast info has already been loaded by * the previous module so we just ignore it. * 3) Finally, if cast->type has not already been loaded, then we add that * swig_cast_info to the linked list (because the cast->type) pointer will * be correct. * ----------------------------------------------------------------------------- */ #ifdef __cplusplus extern "C" { #if 0 } /* c-mode */ #endif #endif #if 0 #define SWIGRUNTIME_DEBUG #endif SWIGRUNTIME void SWIG_InitializeModule(void *clientdata) { size_t i; swig_module_info *module_head, *iter; int found, init; clientdata = clientdata; /* check to see if the circular list has been setup, if not, set it up */ if (swig_module.next==0) { /* Initialize the swig_module */ swig_module.type_initial = swig_type_initial; swig_module.cast_initial = swig_cast_initial; swig_module.next = &swig_module; init = 1; } else { init = 0; } /* Try and load any already created modules */ module_head = SWIG_GetModule(clientdata); if (!module_head) { /* This is the first module loaded for this interpreter */ /* so set the swig module into the interpreter */ SWIG_SetModule(clientdata, &swig_module); module_head = &swig_module; } else { /* the interpreter has loaded a SWIG module, but has it loaded this one? */ found=0; iter=module_head; do { if (iter==&swig_module) { found=1; break; } iter=iter->next; } while (iter!= module_head); /* if the is found in the list, then all is done and we may leave */ if (found) return; /* otherwise we must add out module into the list */ swig_module.next = module_head->next; module_head->next = &swig_module; } /* When multiple interpeters are used, a module could have already been initialized in a different interpreter, but not yet have a pointer in this interpreter. In this case, we do not want to continue adding types... everything should be set up already */ if (init == 0) return; /* Now work on filling in swig_module.types */ #ifdef SWIGRUNTIME_DEBUG printf("SWIG_InitializeModule: size %d\n", swig_module.size); #endif for (i = 0; i < swig_module.size; ++i) { swig_type_info *type = 0; swig_type_info *ret; swig_cast_info *cast; #ifdef SWIGRUNTIME_DEBUG printf("SWIG_InitializeModule: type %d %s\n", i, swig_module.type_initial[i]->name); #endif /* if there is another module already loaded */ if (swig_module.next != &swig_module) { type = SWIG_MangledTypeQueryModule(swig_module.next, &swig_module, swig_module.type_initial[i]->name); } if (type) { /* Overwrite clientdata field */ #ifdef SWIGRUNTIME_DEBUG printf("SWIG_InitializeModule: found type %s\n", type->name); #endif if (swig_module.type_initial[i]->clientdata) { type->clientdata = swig_module.type_initial[i]->clientdata; #ifdef SWIGRUNTIME_DEBUG printf("SWIG_InitializeModule: found and overwrite type %s \n", type->name); #endif } } else { type = swig_module.type_initial[i]; } /* Insert casting types */ cast = swig_module.cast_initial[i]; while (cast->type) { /* Don't need to add information already in the list */ ret = 0; #ifdef SWIGRUNTIME_DEBUG printf("SWIG_InitializeModule: look cast %s\n", cast->type->name); #endif if (swig_module.next != &swig_module) { ret = SWIG_MangledTypeQueryModule(swig_module.next, &swig_module, cast->type->name); #ifdef SWIGRUNTIME_DEBUG if (ret) printf("SWIG_InitializeModule: found cast %s\n", ret->name); #endif } if (ret) { if (type == swig_module.type_initial[i]) { #ifdef SWIGRUNTIME_DEBUG printf("SWIG_InitializeModule: skip old type %s\n", ret->name); #endif cast->type = ret; ret = 0; } else { /* Check for casting already in the list */ swig_cast_info *ocast = SWIG_TypeCheck(ret->name, type); #ifdef SWIGRUNTIME_DEBUG if (ocast) printf("SWIG_InitializeModule: skip old cast %s\n", ret->name); #endif if (!ocast) ret = 0; } } if (!ret) { #ifdef SWIGRUNTIME_DEBUG printf("SWIG_InitializeModule: adding cast %s\n", cast->type->name); #endif if (type->cast) { type->cast->prev = cast; cast->next = type->cast; } type->cast = cast; } cast++; } /* Set entry in modules->types array equal to the type */ swig_module.types[i] = type; } swig_module.types[i] = 0; #ifdef SWIGRUNTIME_DEBUG printf("**** SWIG_InitializeModule: Cast List ******\n"); for (i = 0; i < swig_module.size; ++i) { int j = 0; swig_cast_info *cast = swig_module.cast_initial[i]; printf("SWIG_InitializeModule: type %d %s\n", i, swig_module.type_initial[i]->name); while (cast->type) { printf("SWIG_InitializeModule: cast type %s\n", cast->type->name); cast++; ++j; } printf("---- Total casts: %d\n",j); } printf("**** SWIG_InitializeModule: Cast List ******\n"); #endif } /* This function will propagate the clientdata field of type to * any new swig_type_info structures that have been added into the list * of equivalent types. It is like calling * SWIG_TypeClientData(type, clientdata) a second time. */ SWIGRUNTIME void SWIG_PropagateClientData(void) { size_t i; swig_cast_info *equiv; static int init_run = 0; if (init_run) return; init_run = 1; for (i = 0; i < swig_module.size; i++) { if (swig_module.types[i]->clientdata) { equiv = swig_module.types[i]->cast; while (equiv) { if (!equiv->converter) { if (equiv->type && !equiv->type->clientdata) SWIG_TypeClientData(equiv->type, swig_module.types[i]->clientdata); } equiv = equiv->next; } } } } #ifdef __cplusplus #if 0 { /* c-mode */ #endif } #endif #ifdef __cplusplus extern "C" #endif XS(SWIG_init) { dXSARGS; int i; SWIG_InitializeModule(0); /* Install commands */ for (i = 0; swig_commands[i].name; i++) { newXS((char*) swig_commands[i].name,swig_commands[i].wrapper, (char*)__FILE__); } /* Install variables */ for (i = 0; swig_variables[i].name; i++) { SV *sv; sv = get_sv((char*) swig_variables[i].name, TRUE | 0x2 | GV_ADDMULTI); if (swig_variables[i].type) { SWIG_MakePtr(sv,(void *)1, *swig_variables[i].type,0); } else { sv_setiv(sv,(IV) 0); } swig_create_magic(sv, (char *) swig_variables[i].name, swig_variables[i].set, swig_variables[i].get); } /* Install constant */ for (i = 0; swig_constants[i].type; i++) { SV *sv; sv = get_sv((char*)swig_constants[i].name, TRUE | 0x2 | GV_ADDMULTI); switch(swig_constants[i].type) { case SWIG_INT: sv_setiv(sv, (IV) swig_constants[i].lvalue); break; case SWIG_FLOAT: sv_setnv(sv, (double) swig_constants[i].dvalue); break; case SWIG_STRING: sv_setpv(sv, (char *) swig_constants[i].pvalue); break; case SWIG_POINTER: SWIG_MakePtr(sv, swig_constants[i].pvalue, *(swig_constants[i].ptype),0); break; case SWIG_BINARY: SWIG_MakePackedObj(sv, swig_constants[i].pvalue, swig_constants[i].lvalue, *(swig_constants[i].ptype)); break; default: break; } SvREADONLY_on(sv); } /*@SWIG:/usr/share/swig/1.3.40/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "IDMEF_LIST_APPEND", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(IDMEF_LIST_APPEND))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; /*@SWIG:/usr/share/swig/1.3.40/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "IDMEF_LIST_PREPEND", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(IDMEF_LIST_PREPEND))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; /*@SWIG:/usr/share/swig/1.3.40/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "PRELUDE_BOOL_TRUE", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(PRELUDE_BOOL_TRUE))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; /*@SWIG:/usr/share/swig/1.3.40/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "PRELUDE_BOOL_FALSE", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(PRELUDE_BOOL_FALSE))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; /*@SWIG:/usr/share/swig/1.3.40/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "LIBPRELUDE_VERSION", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_FromCharPtr("1.0.0")); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; /*@SWIG:/usr/share/swig/1.3.40/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "PRELUDE_CLIENT_EXIT_STATUS_SUCCESS", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(PRELUDE_CLIENT_EXIT_STATUS_SUCCESS))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; /*@SWIG:/usr/share/swig/1.3.40/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "PRELUDE_CLIENT_EXIT_STATUS_FAILURE", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(PRELUDE_CLIENT_EXIT_STATUS_FAILURE))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; /*@SWIG:/usr/share/swig/1.3.40/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "PRELUDE_CLIENT_FLAGS_ASYNC_SEND", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(PRELUDE_CLIENT_FLAGS_ASYNC_SEND))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; /*@SWIG:/usr/share/swig/1.3.40/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "PRELUDE_CLIENT_FLAGS_ASYNC_TIMER", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(PRELUDE_CLIENT_FLAGS_ASYNC_TIMER))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; /*@SWIG:/usr/share/swig/1.3.40/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "PRELUDE_CLIENT_FLAGS_HEARTBEAT", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(PRELUDE_CLIENT_FLAGS_HEARTBEAT))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; /*@SWIG:/usr/share/swig/1.3.40/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "PRELUDE_CLIENT_FLAGS_CONNECT", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(PRELUDE_CLIENT_FLAGS_CONNECT))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; /*@SWIG:/usr/share/swig/1.3.40/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "PRELUDE_CLIENT_FLAGS_AUTOCONFIG", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(PRELUDE_CLIENT_FLAGS_AUTOCONFIG))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; /*@SWIG:/usr/share/swig/1.3.40/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "IDMEF_ADDITIONAL_DATA_TYPE_ERROR", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(IDMEF_ADDITIONAL_DATA_TYPE_ERROR))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; /*@SWIG:/usr/share/swig/1.3.40/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "IDMEF_ADDITIONAL_DATA_TYPE_STRING", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(IDMEF_ADDITIONAL_DATA_TYPE_STRING))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; /*@SWIG:/usr/share/swig/1.3.40/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "IDMEF_ADDITIONAL_DATA_TYPE_BYTE", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(IDMEF_ADDITIONAL_DATA_TYPE_BYTE))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; /*@SWIG:/usr/share/swig/1.3.40/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "IDMEF_ADDITIONAL_DATA_TYPE_CHARACTER", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(IDMEF_ADDITIONAL_DATA_TYPE_CHARACTER))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; /*@SWIG:/usr/share/swig/1.3.40/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "IDMEF_ADDITIONAL_DATA_TYPE_DATE_TIME", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(IDMEF_ADDITIONAL_DATA_TYPE_DATE_TIME))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; /*@SWIG:/usr/share/swig/1.3.40/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "IDMEF_ADDITIONAL_DATA_TYPE_INTEGER", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(IDMEF_ADDITIONAL_DATA_TYPE_INTEGER))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; /*@SWIG:/usr/share/swig/1.3.40/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "IDMEF_ADDITIONAL_DATA_TYPE_NTPSTAMP", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(IDMEF_ADDITIONAL_DATA_TYPE_NTPSTAMP))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; /*@SWIG:/usr/share/swig/1.3.40/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "IDMEF_ADDITIONAL_DATA_TYPE_PORTLIST", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(IDMEF_ADDITIONAL_DATA_TYPE_PORTLIST))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; /*@SWIG:/usr/share/swig/1.3.40/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "IDMEF_ADDITIONAL_DATA_TYPE_REAL", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(IDMEF_ADDITIONAL_DATA_TYPE_REAL))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; /*@SWIG:/usr/share/swig/1.3.40/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "IDMEF_ADDITIONAL_DATA_TYPE_BOOLEAN", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(IDMEF_ADDITIONAL_DATA_TYPE_BOOLEAN))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; /*@SWIG:/usr/share/swig/1.3.40/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "IDMEF_ADDITIONAL_DATA_TYPE_BYTE_STRING", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(IDMEF_ADDITIONAL_DATA_TYPE_BYTE_STRING))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; /*@SWIG:/usr/share/swig/1.3.40/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "IDMEF_ADDITIONAL_DATA_TYPE_XML", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(IDMEF_ADDITIONAL_DATA_TYPE_XML))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; /*@SWIG:/usr/share/swig/1.3.40/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "IDMEF_REFERENCE_ORIGIN_ERROR", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(IDMEF_REFERENCE_ORIGIN_ERROR))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; /*@SWIG:/usr/share/swig/1.3.40/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "IDMEF_REFERENCE_ORIGIN_UNKNOWN", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(IDMEF_REFERENCE_ORIGIN_UNKNOWN))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; /*@SWIG:/usr/share/swig/1.3.40/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "IDMEF_REFERENCE_ORIGIN_VENDOR_SPECIFIC", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(IDMEF_REFERENCE_ORIGIN_VENDOR_SPECIFIC))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; /*@SWIG:/usr/share/swig/1.3.40/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "IDMEF_REFERENCE_ORIGIN_USER_SPECIFIC", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(IDMEF_REFERENCE_ORIGIN_USER_SPECIFIC))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; /*@SWIG:/usr/share/swig/1.3.40/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "IDMEF_REFERENCE_ORIGIN_BUGTRAQID", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(IDMEF_REFERENCE_ORIGIN_BUGTRAQID))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; /*@SWIG:/usr/share/swig/1.3.40/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "IDMEF_REFERENCE_ORIGIN_CVE", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(IDMEF_REFERENCE_ORIGIN_CVE))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; /*@SWIG:/usr/share/swig/1.3.40/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "IDMEF_REFERENCE_ORIGIN_OSVDB", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(IDMEF_REFERENCE_ORIGIN_OSVDB))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; /*@SWIG:/usr/share/swig/1.3.40/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "IDMEF_USER_ID_TYPE_ORIGINAL_ERROR", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(IDMEF_USER_ID_TYPE_ORIGINAL_ERROR))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; /*@SWIG:/usr/share/swig/1.3.40/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "IDMEF_USER_ID_TYPE_ORIGINAL_USER", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(IDMEF_USER_ID_TYPE_ORIGINAL_USER))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; /*@SWIG:/usr/share/swig/1.3.40/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "IDMEF_USER_ID_TYPE_CURRENT_USER", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(IDMEF_USER_ID_TYPE_CURRENT_USER))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; /*@SWIG:/usr/share/swig/1.3.40/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "IDMEF_USER_ID_TYPE_TARGET_USER", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(IDMEF_USER_ID_TYPE_TARGET_USER))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; /*@SWIG:/usr/share/swig/1.3.40/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "IDMEF_USER_ID_TYPE_USER_PRIVS", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(IDMEF_USER_ID_TYPE_USER_PRIVS))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; /*@SWIG:/usr/share/swig/1.3.40/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "IDMEF_USER_ID_TYPE_CURRENT_GROUP", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(IDMEF_USER_ID_TYPE_CURRENT_GROUP))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; /*@SWIG:/usr/share/swig/1.3.40/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "IDMEF_USER_ID_TYPE_GROUP_PRIVS", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(IDMEF_USER_ID_TYPE_GROUP_PRIVS))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; /*@SWIG:/usr/share/swig/1.3.40/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "IDMEF_USER_ID_TYPE_OTHER_PRIVS", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(IDMEF_USER_ID_TYPE_OTHER_PRIVS))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; /*@SWIG:/usr/share/swig/1.3.40/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "IDMEF_USER_CATEGORY_ERROR", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(IDMEF_USER_CATEGORY_ERROR))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; /*@SWIG:/usr/share/swig/1.3.40/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "IDMEF_USER_CATEGORY_UNKNOWN", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(IDMEF_USER_CATEGORY_UNKNOWN))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; /*@SWIG:/usr/share/swig/1.3.40/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "IDMEF_USER_CATEGORY_APPLICATION", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(IDMEF_USER_CATEGORY_APPLICATION))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; /*@SWIG:/usr/share/swig/1.3.40/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "IDMEF_USER_CATEGORY_OS_DEVICE", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(IDMEF_USER_CATEGORY_OS_DEVICE))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; /*@SWIG:/usr/share/swig/1.3.40/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "IDMEF_ADDRESS_CATEGORY_ERROR", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(IDMEF_ADDRESS_CATEGORY_ERROR))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; /*@SWIG:/usr/share/swig/1.3.40/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "IDMEF_ADDRESS_CATEGORY_UNKNOWN", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(IDMEF_ADDRESS_CATEGORY_UNKNOWN))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; /*@SWIG:/usr/share/swig/1.3.40/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "IDMEF_ADDRESS_CATEGORY_ATM", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(IDMEF_ADDRESS_CATEGORY_ATM))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; /*@SWIG:/usr/share/swig/1.3.40/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "IDMEF_ADDRESS_CATEGORY_E_MAIL", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(IDMEF_ADDRESS_CATEGORY_E_MAIL))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; /*@SWIG:/usr/share/swig/1.3.40/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "IDMEF_ADDRESS_CATEGORY_LOTUS_NOTES", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(IDMEF_ADDRESS_CATEGORY_LOTUS_NOTES))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; /*@SWIG:/usr/share/swig/1.3.40/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "IDMEF_ADDRESS_CATEGORY_MAC", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(IDMEF_ADDRESS_CATEGORY_MAC))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; /*@SWIG:/usr/share/swig/1.3.40/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "IDMEF_ADDRESS_CATEGORY_SNA", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(IDMEF_ADDRESS_CATEGORY_SNA))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; /*@SWIG:/usr/share/swig/1.3.40/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "IDMEF_ADDRESS_CATEGORY_VM", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(IDMEF_ADDRESS_CATEGORY_VM))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; /*@SWIG:/usr/share/swig/1.3.40/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "IDMEF_ADDRESS_CATEGORY_IPV4_ADDR", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(IDMEF_ADDRESS_CATEGORY_IPV4_ADDR))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; /*@SWIG:/usr/share/swig/1.3.40/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "IDMEF_ADDRESS_CATEGORY_IPV4_ADDR_HEX", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(IDMEF_ADDRESS_CATEGORY_IPV4_ADDR_HEX))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; /*@SWIG:/usr/share/swig/1.3.40/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "IDMEF_ADDRESS_CATEGORY_IPV4_NET", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(IDMEF_ADDRESS_CATEGORY_IPV4_NET))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; /*@SWIG:/usr/share/swig/1.3.40/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "IDMEF_ADDRESS_CATEGORY_IPV4_NET_MASK", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(IDMEF_ADDRESS_CATEGORY_IPV4_NET_MASK))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; /*@SWIG:/usr/share/swig/1.3.40/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "IDMEF_ADDRESS_CATEGORY_IPV6_ADDR", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(IDMEF_ADDRESS_CATEGORY_IPV6_ADDR))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; /*@SWIG:/usr/share/swig/1.3.40/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "IDMEF_ADDRESS_CATEGORY_IPV6_ADDR_HEX", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(IDMEF_ADDRESS_CATEGORY_IPV6_ADDR_HEX))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; /*@SWIG:/usr/share/swig/1.3.40/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "IDMEF_ADDRESS_CATEGORY_IPV6_NET", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(IDMEF_ADDRESS_CATEGORY_IPV6_NET))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; /*@SWIG:/usr/share/swig/1.3.40/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "IDMEF_ADDRESS_CATEGORY_IPV6_NET_MASK", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(IDMEF_ADDRESS_CATEGORY_IPV6_NET_MASK))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; /*@SWIG:/usr/share/swig/1.3.40/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "IDMEF_SERVICE_TYPE_ERROR", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(IDMEF_SERVICE_TYPE_ERROR))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; /*@SWIG:/usr/share/swig/1.3.40/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "IDMEF_SERVICE_TYPE_DEFAULT", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(IDMEF_SERVICE_TYPE_DEFAULT))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; /*@SWIG:/usr/share/swig/1.3.40/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "IDMEF_SERVICE_TYPE_WEB", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(IDMEF_SERVICE_TYPE_WEB))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; /*@SWIG:/usr/share/swig/1.3.40/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "IDMEF_SERVICE_TYPE_SNMP", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(IDMEF_SERVICE_TYPE_SNMP))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; /*@SWIG:/usr/share/swig/1.3.40/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "IDMEF_NODE_CATEGORY_ERROR", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(IDMEF_NODE_CATEGORY_ERROR))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; /*@SWIG:/usr/share/swig/1.3.40/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "IDMEF_NODE_CATEGORY_UNKNOWN", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(IDMEF_NODE_CATEGORY_UNKNOWN))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; /*@SWIG:/usr/share/swig/1.3.40/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "IDMEF_NODE_CATEGORY_ADS", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(IDMEF_NODE_CATEGORY_ADS))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; /*@SWIG:/usr/share/swig/1.3.40/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "IDMEF_NODE_CATEGORY_AFS", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(IDMEF_NODE_CATEGORY_AFS))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; /*@SWIG:/usr/share/swig/1.3.40/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "IDMEF_NODE_CATEGORY_CODA", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(IDMEF_NODE_CATEGORY_CODA))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; /*@SWIG:/usr/share/swig/1.3.40/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "IDMEF_NODE_CATEGORY_DFS", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(IDMEF_NODE_CATEGORY_DFS))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; /*@SWIG:/usr/share/swig/1.3.40/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "IDMEF_NODE_CATEGORY_DNS", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(IDMEF_NODE_CATEGORY_DNS))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; /*@SWIG:/usr/share/swig/1.3.40/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "IDMEF_NODE_CATEGORY_HOSTS", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(IDMEF_NODE_CATEGORY_HOSTS))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; /*@SWIG:/usr/share/swig/1.3.40/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "IDMEF_NODE_CATEGORY_KERBEROS", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(IDMEF_NODE_CATEGORY_KERBEROS))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; /*@SWIG:/usr/share/swig/1.3.40/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "IDMEF_NODE_CATEGORY_NDS", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(IDMEF_NODE_CATEGORY_NDS))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; /*@SWIG:/usr/share/swig/1.3.40/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "IDMEF_NODE_CATEGORY_NIS", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(IDMEF_NODE_CATEGORY_NIS))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; /*@SWIG:/usr/share/swig/1.3.40/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "IDMEF_NODE_CATEGORY_NISPLUS", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(IDMEF_NODE_CATEGORY_NISPLUS))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; /*@SWIG:/usr/share/swig/1.3.40/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "IDMEF_NODE_CATEGORY_NT", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(IDMEF_NODE_CATEGORY_NT))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; /*@SWIG:/usr/share/swig/1.3.40/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "IDMEF_NODE_CATEGORY_WFW", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(IDMEF_NODE_CATEGORY_WFW))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; /*@SWIG:/usr/share/swig/1.3.40/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "IDMEF_SOURCE_SPOOFED_ERROR", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(IDMEF_SOURCE_SPOOFED_ERROR))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; /*@SWIG:/usr/share/swig/1.3.40/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "IDMEF_SOURCE_SPOOFED_UNKNOWN", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(IDMEF_SOURCE_SPOOFED_UNKNOWN))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; /*@SWIG:/usr/share/swig/1.3.40/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "IDMEF_SOURCE_SPOOFED_YES", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(IDMEF_SOURCE_SPOOFED_YES))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; /*@SWIG:/usr/share/swig/1.3.40/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "IDMEF_SOURCE_SPOOFED_NO", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(IDMEF_SOURCE_SPOOFED_NO))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; /*@SWIG:/usr/share/swig/1.3.40/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "IDMEF_CHECKSUM_ALGORITHM_ERROR", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(IDMEF_CHECKSUM_ALGORITHM_ERROR))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; /*@SWIG:/usr/share/swig/1.3.40/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "IDMEF_CHECKSUM_ALGORITHM_MD4", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(IDMEF_CHECKSUM_ALGORITHM_MD4))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; /*@SWIG:/usr/share/swig/1.3.40/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "IDMEF_CHECKSUM_ALGORITHM_MD5", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(IDMEF_CHECKSUM_ALGORITHM_MD5))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; /*@SWIG:/usr/share/swig/1.3.40/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "IDMEF_CHECKSUM_ALGORITHM_SHA1", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(IDMEF_CHECKSUM_ALGORITHM_SHA1))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; /*@SWIG:/usr/share/swig/1.3.40/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "IDMEF_CHECKSUM_ALGORITHM_SHA2_256", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(IDMEF_CHECKSUM_ALGORITHM_SHA2_256))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; /*@SWIG:/usr/share/swig/1.3.40/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "IDMEF_CHECKSUM_ALGORITHM_SHA2_384", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(IDMEF_CHECKSUM_ALGORITHM_SHA2_384))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; /*@SWIG:/usr/share/swig/1.3.40/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "IDMEF_CHECKSUM_ALGORITHM_SHA2_512", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(IDMEF_CHECKSUM_ALGORITHM_SHA2_512))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; /*@SWIG:/usr/share/swig/1.3.40/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "IDMEF_CHECKSUM_ALGORITHM_CRC_32", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(IDMEF_CHECKSUM_ALGORITHM_CRC_32))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; /*@SWIG:/usr/share/swig/1.3.40/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "IDMEF_CHECKSUM_ALGORITHM_HAVAL", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(IDMEF_CHECKSUM_ALGORITHM_HAVAL))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; /*@SWIG:/usr/share/swig/1.3.40/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "IDMEF_CHECKSUM_ALGORITHM_TIGER", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(IDMEF_CHECKSUM_ALGORITHM_TIGER))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; /*@SWIG:/usr/share/swig/1.3.40/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "IDMEF_CHECKSUM_ALGORITHM_GOST", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(IDMEF_CHECKSUM_ALGORITHM_GOST))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; /*@SWIG:/usr/share/swig/1.3.40/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "IDMEF_FILE_CATEGORY_ERROR", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(IDMEF_FILE_CATEGORY_ERROR))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; /*@SWIG:/usr/share/swig/1.3.40/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "IDMEF_FILE_CATEGORY_CURRENT", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(IDMEF_FILE_CATEGORY_CURRENT))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; /*@SWIG:/usr/share/swig/1.3.40/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "IDMEF_FILE_CATEGORY_ORIGINAL", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(IDMEF_FILE_CATEGORY_ORIGINAL))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; /*@SWIG:/usr/share/swig/1.3.40/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "IDMEF_FILE_FSTYPE_ERROR", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(IDMEF_FILE_FSTYPE_ERROR))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; /*@SWIG:/usr/share/swig/1.3.40/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "IDMEF_FILE_FSTYPE_UFS", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(IDMEF_FILE_FSTYPE_UFS))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; /*@SWIG:/usr/share/swig/1.3.40/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "IDMEF_FILE_FSTYPE_EFS", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(IDMEF_FILE_FSTYPE_EFS))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; /*@SWIG:/usr/share/swig/1.3.40/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "IDMEF_FILE_FSTYPE_NFS", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(IDMEF_FILE_FSTYPE_NFS))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; /*@SWIG:/usr/share/swig/1.3.40/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "IDMEF_FILE_FSTYPE_AFS", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(IDMEF_FILE_FSTYPE_AFS))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; /*@SWIG:/usr/share/swig/1.3.40/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "IDMEF_FILE_FSTYPE_NTFS", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(IDMEF_FILE_FSTYPE_NTFS))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; /*@SWIG:/usr/share/swig/1.3.40/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "IDMEF_FILE_FSTYPE_FAT16", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(IDMEF_FILE_FSTYPE_FAT16))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; /*@SWIG:/usr/share/swig/1.3.40/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "IDMEF_FILE_FSTYPE_FAT32", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(IDMEF_FILE_FSTYPE_FAT32))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; /*@SWIG:/usr/share/swig/1.3.40/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "IDMEF_FILE_FSTYPE_PCFS", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(IDMEF_FILE_FSTYPE_PCFS))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; /*@SWIG:/usr/share/swig/1.3.40/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "IDMEF_FILE_FSTYPE_JOLIET", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(IDMEF_FILE_FSTYPE_JOLIET))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; /*@SWIG:/usr/share/swig/1.3.40/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "IDMEF_FILE_FSTYPE_ISO9660", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(IDMEF_FILE_FSTYPE_ISO9660))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; /*@SWIG:/usr/share/swig/1.3.40/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "IDMEF_LINKAGE_CATEGORY_ERROR", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(IDMEF_LINKAGE_CATEGORY_ERROR))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; /*@SWIG:/usr/share/swig/1.3.40/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "IDMEF_LINKAGE_CATEGORY_HARD_LINK", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(IDMEF_LINKAGE_CATEGORY_HARD_LINK))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; /*@SWIG:/usr/share/swig/1.3.40/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "IDMEF_LINKAGE_CATEGORY_MOUNT_POINT", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(IDMEF_LINKAGE_CATEGORY_MOUNT_POINT))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; /*@SWIG:/usr/share/swig/1.3.40/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "IDMEF_LINKAGE_CATEGORY_REPARSE_POINT", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(IDMEF_LINKAGE_CATEGORY_REPARSE_POINT))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; /*@SWIG:/usr/share/swig/1.3.40/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "IDMEF_LINKAGE_CATEGORY_SHORTCUT", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(IDMEF_LINKAGE_CATEGORY_SHORTCUT))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; /*@SWIG:/usr/share/swig/1.3.40/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "IDMEF_LINKAGE_CATEGORY_STREAM", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(IDMEF_LINKAGE_CATEGORY_STREAM))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; /*@SWIG:/usr/share/swig/1.3.40/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "IDMEF_LINKAGE_CATEGORY_SYMBOLIC_LINK", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(IDMEF_LINKAGE_CATEGORY_SYMBOLIC_LINK))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; /*@SWIG:/usr/share/swig/1.3.40/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "IDMEF_TARGET_DECOY_ERROR", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(IDMEF_TARGET_DECOY_ERROR))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; /*@SWIG:/usr/share/swig/1.3.40/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "IDMEF_TARGET_DECOY_UNKNOWN", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(IDMEF_TARGET_DECOY_UNKNOWN))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; /*@SWIG:/usr/share/swig/1.3.40/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "IDMEF_TARGET_DECOY_YES", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(IDMEF_TARGET_DECOY_YES))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; /*@SWIG:/usr/share/swig/1.3.40/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "IDMEF_TARGET_DECOY_NO", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(IDMEF_TARGET_DECOY_NO))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; /*@SWIG:/usr/share/swig/1.3.40/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "IDMEF_IMPACT_SEVERITY_ERROR", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(IDMEF_IMPACT_SEVERITY_ERROR))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; /*@SWIG:/usr/share/swig/1.3.40/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "IDMEF_IMPACT_SEVERITY_INFO", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(IDMEF_IMPACT_SEVERITY_INFO))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; /*@SWIG:/usr/share/swig/1.3.40/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "IDMEF_IMPACT_SEVERITY_LOW", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(IDMEF_IMPACT_SEVERITY_LOW))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; /*@SWIG:/usr/share/swig/1.3.40/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "IDMEF_IMPACT_SEVERITY_MEDIUM", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(IDMEF_IMPACT_SEVERITY_MEDIUM))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; /*@SWIG:/usr/share/swig/1.3.40/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "IDMEF_IMPACT_SEVERITY_HIGH", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(IDMEF_IMPACT_SEVERITY_HIGH))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; /*@SWIG:/usr/share/swig/1.3.40/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "IDMEF_IMPACT_COMPLETION_ERROR", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(IDMEF_IMPACT_COMPLETION_ERROR))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; /*@SWIG:/usr/share/swig/1.3.40/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "IDMEF_IMPACT_COMPLETION_FAILED", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(IDMEF_IMPACT_COMPLETION_FAILED))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; /*@SWIG:/usr/share/swig/1.3.40/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "IDMEF_IMPACT_COMPLETION_SUCCEEDED", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(IDMEF_IMPACT_COMPLETION_SUCCEEDED))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; /*@SWIG:/usr/share/swig/1.3.40/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "IDMEF_IMPACT_TYPE_ERROR", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(IDMEF_IMPACT_TYPE_ERROR))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; /*@SWIG:/usr/share/swig/1.3.40/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "IDMEF_IMPACT_TYPE_OTHER", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(IDMEF_IMPACT_TYPE_OTHER))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; /*@SWIG:/usr/share/swig/1.3.40/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "IDMEF_IMPACT_TYPE_ADMIN", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(IDMEF_IMPACT_TYPE_ADMIN))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; /*@SWIG:/usr/share/swig/1.3.40/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "IDMEF_IMPACT_TYPE_DOS", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(IDMEF_IMPACT_TYPE_DOS))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; /*@SWIG:/usr/share/swig/1.3.40/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "IDMEF_IMPACT_TYPE_FILE", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(IDMEF_IMPACT_TYPE_FILE))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; /*@SWIG:/usr/share/swig/1.3.40/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "IDMEF_IMPACT_TYPE_RECON", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(IDMEF_IMPACT_TYPE_RECON))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; /*@SWIG:/usr/share/swig/1.3.40/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "IDMEF_IMPACT_TYPE_USER", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(IDMEF_IMPACT_TYPE_USER))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; /*@SWIG:/usr/share/swig/1.3.40/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "IDMEF_ACTION_CATEGORY_ERROR", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(IDMEF_ACTION_CATEGORY_ERROR))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; /*@SWIG:/usr/share/swig/1.3.40/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "IDMEF_ACTION_CATEGORY_OTHER", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(IDMEF_ACTION_CATEGORY_OTHER))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; /*@SWIG:/usr/share/swig/1.3.40/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "IDMEF_ACTION_CATEGORY_BLOCK_INSTALLED", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(IDMEF_ACTION_CATEGORY_BLOCK_INSTALLED))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; /*@SWIG:/usr/share/swig/1.3.40/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "IDMEF_ACTION_CATEGORY_NOTIFICATION_SENT", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(IDMEF_ACTION_CATEGORY_NOTIFICATION_SENT))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; /*@SWIG:/usr/share/swig/1.3.40/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "IDMEF_ACTION_CATEGORY_TAKEN_OFFLINE", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(IDMEF_ACTION_CATEGORY_TAKEN_OFFLINE))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; /*@SWIG:/usr/share/swig/1.3.40/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "IDMEF_CONFIDENCE_RATING_ERROR", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(IDMEF_CONFIDENCE_RATING_ERROR))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; /*@SWIG:/usr/share/swig/1.3.40/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "IDMEF_CONFIDENCE_RATING_NUMERIC", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(IDMEF_CONFIDENCE_RATING_NUMERIC))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; /*@SWIG:/usr/share/swig/1.3.40/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "IDMEF_CONFIDENCE_RATING_LOW", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(IDMEF_CONFIDENCE_RATING_LOW))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; /*@SWIG:/usr/share/swig/1.3.40/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "IDMEF_CONFIDENCE_RATING_MEDIUM", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(IDMEF_CONFIDENCE_RATING_MEDIUM))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; /*@SWIG:/usr/share/swig/1.3.40/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "IDMEF_CONFIDENCE_RATING_HIGH", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(IDMEF_CONFIDENCE_RATING_HIGH))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; /*@SWIG:/usr/share/swig/1.3.40/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "IDMEF_ALERT_TYPE_ERROR", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(IDMEF_ALERT_TYPE_ERROR))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; /*@SWIG:/usr/share/swig/1.3.40/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "IDMEF_ALERT_TYPE_DEFAULT", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(IDMEF_ALERT_TYPE_DEFAULT))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; /*@SWIG:/usr/share/swig/1.3.40/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "IDMEF_ALERT_TYPE_TOOL", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(IDMEF_ALERT_TYPE_TOOL))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; /*@SWIG:/usr/share/swig/1.3.40/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "IDMEF_ALERT_TYPE_CORRELATION", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(IDMEF_ALERT_TYPE_CORRELATION))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; /*@SWIG:/usr/share/swig/1.3.40/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "IDMEF_ALERT_TYPE_OVERFLOW", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(IDMEF_ALERT_TYPE_OVERFLOW))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; /*@SWIG:/usr/share/swig/1.3.40/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "IDMEF_MESSAGE_TYPE_ERROR", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(IDMEF_MESSAGE_TYPE_ERROR))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; /*@SWIG:/usr/share/swig/1.3.40/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "IDMEF_MESSAGE_TYPE_ALERT", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(IDMEF_MESSAGE_TYPE_ALERT))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; /*@SWIG:/usr/share/swig/1.3.40/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "IDMEF_MESSAGE_TYPE_HEARTBEAT", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(IDMEF_MESSAGE_TYPE_HEARTBEAT))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; /*@SWIG:/usr/share/swig/1.3.40/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "IDMEF_CLASS_ID_ADDITIONAL_DATA_TYPE", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(3))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; /*@SWIG:/usr/share/swig/1.3.40/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "IDMEF_CLASS_ID_ADDITIONAL_DATA", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(4))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; /*@SWIG:/usr/share/swig/1.3.40/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "IDMEF_CLASS_ID_REFERENCE_ORIGIN", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(5))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; /*@SWIG:/usr/share/swig/1.3.40/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "IDMEF_CLASS_ID_REFERENCE", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(50))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; /*@SWIG:/usr/share/swig/1.3.40/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "IDMEF_CLASS_ID_CLASSIFICATION", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(6))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; /*@SWIG:/usr/share/swig/1.3.40/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "IDMEF_CLASS_ID_USER_ID_TYPE", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(7))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; /*@SWIG:/usr/share/swig/1.3.40/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "IDMEF_CLASS_ID_USER_ID", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(8))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; /*@SWIG:/usr/share/swig/1.3.40/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "IDMEF_CLASS_ID_USER_CATEGORY", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(9))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; /*@SWIG:/usr/share/swig/1.3.40/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "IDMEF_CLASS_ID_USER", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(10))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; /*@SWIG:/usr/share/swig/1.3.40/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "IDMEF_CLASS_ID_ADDRESS_CATEGORY", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(11))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; /*@SWIG:/usr/share/swig/1.3.40/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "IDMEF_CLASS_ID_ADDRESS", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(12))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; /*@SWIG:/usr/share/swig/1.3.40/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "IDMEF_CLASS_ID_PROCESS", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(13))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; /*@SWIG:/usr/share/swig/1.3.40/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "IDMEF_CLASS_ID_WEB_SERVICE", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(14))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; /*@SWIG:/usr/share/swig/1.3.40/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "IDMEF_CLASS_ID_SNMP_SERVICE", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(15))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; /*@SWIG:/usr/share/swig/1.3.40/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "IDMEF_CLASS_ID_SERVICE_TYPE", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(16))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; /*@SWIG:/usr/share/swig/1.3.40/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "IDMEF_CLASS_ID_SERVICE", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(17))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; /*@SWIG:/usr/share/swig/1.3.40/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "IDMEF_CLASS_ID_NODE_CATEGORY", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(18))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; /*@SWIG:/usr/share/swig/1.3.40/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "IDMEF_CLASS_ID_NODE", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(19))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; /*@SWIG:/usr/share/swig/1.3.40/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "IDMEF_CLASS_ID_SOURCE_SPOOFED", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(20))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; /*@SWIG:/usr/share/swig/1.3.40/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "IDMEF_CLASS_ID_SOURCE", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(21))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; /*@SWIG:/usr/share/swig/1.3.40/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "IDMEF_CLASS_ID_FILE_ACCESS", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(22))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; /*@SWIG:/usr/share/swig/1.3.40/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "IDMEF_CLASS_ID_INODE", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(23))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; /*@SWIG:/usr/share/swig/1.3.40/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "IDMEF_CLASS_ID_CHECKSUM_ALGORITHM", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(53))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; /*@SWIG:/usr/share/swig/1.3.40/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "IDMEF_CLASS_ID_CHECKSUM", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(52))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; /*@SWIG:/usr/share/swig/1.3.40/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "IDMEF_CLASS_ID_FILE_CATEGORY", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(24))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; /*@SWIG:/usr/share/swig/1.3.40/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "IDMEF_CLASS_ID_FILE_FSTYPE", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(25))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; /*@SWIG:/usr/share/swig/1.3.40/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "IDMEF_CLASS_ID_FILE", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(26))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; /*@SWIG:/usr/share/swig/1.3.40/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "IDMEF_CLASS_ID_LINKAGE_CATEGORY", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(27))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; /*@SWIG:/usr/share/swig/1.3.40/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "IDMEF_CLASS_ID_LINKAGE", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(28))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; /*@SWIG:/usr/share/swig/1.3.40/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "IDMEF_CLASS_ID_TARGET_DECOY", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(29))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; /*@SWIG:/usr/share/swig/1.3.40/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "IDMEF_CLASS_ID_TARGET", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(30))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; /*@SWIG:/usr/share/swig/1.3.40/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "IDMEF_CLASS_ID_ANALYZER", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(31))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; /*@SWIG:/usr/share/swig/1.3.40/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "IDMEF_CLASS_ID_ALERTIDENT", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(32))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; /*@SWIG:/usr/share/swig/1.3.40/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "IDMEF_CLASS_ID_IMPACT_SEVERITY", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(33))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; /*@SWIG:/usr/share/swig/1.3.40/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "IDMEF_CLASS_ID_IMPACT_COMPLETION", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(34))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; /*@SWIG:/usr/share/swig/1.3.40/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "IDMEF_CLASS_ID_IMPACT_TYPE", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(35))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; /*@SWIG:/usr/share/swig/1.3.40/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "IDMEF_CLASS_ID_IMPACT", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(36))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; /*@SWIG:/usr/share/swig/1.3.40/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "IDMEF_CLASS_ID_ACTION_CATEGORY", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(37))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; /*@SWIG:/usr/share/swig/1.3.40/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "IDMEF_CLASS_ID_ACTION", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(38))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; /*@SWIG:/usr/share/swig/1.3.40/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "IDMEF_CLASS_ID_CONFIDENCE_RATING", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(39))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; /*@SWIG:/usr/share/swig/1.3.40/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "IDMEF_CLASS_ID_CONFIDENCE", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(40))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; /*@SWIG:/usr/share/swig/1.3.40/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "IDMEF_CLASS_ID_ASSESSMENT", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(41))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; /*@SWIG:/usr/share/swig/1.3.40/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "IDMEF_CLASS_ID_TOOL_ALERT", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(42))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; /*@SWIG:/usr/share/swig/1.3.40/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "IDMEF_CLASS_ID_CORRELATION_ALERT", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(43))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; /*@SWIG:/usr/share/swig/1.3.40/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "IDMEF_CLASS_ID_OVERFLOW_ALERT", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(44))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; /*@SWIG:/usr/share/swig/1.3.40/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "IDMEF_CLASS_ID_ALERT_TYPE", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(45))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; /*@SWIG:/usr/share/swig/1.3.40/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "IDMEF_CLASS_ID_ALERT", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(46))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; /*@SWIG:/usr/share/swig/1.3.40/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "IDMEF_CLASS_ID_HEARTBEAT", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(47))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; /*@SWIG:/usr/share/swig/1.3.40/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "IDMEF_CLASS_ID_MESSAGE_TYPE", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(48))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; /*@SWIG:/usr/share/swig/1.3.40/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "IDMEF_CLASS_ID_MESSAGE", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(49))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; /*@SWIG:/usr/share/swig/1.3.40/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "IDMEF_DATA_TYPE_UNKNOWN", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(IDMEF_DATA_TYPE_UNKNOWN))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; /*@SWIG:/usr/share/swig/1.3.40/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "IDMEF_DATA_TYPE_CHAR", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(IDMEF_DATA_TYPE_CHAR))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; /*@SWIG:/usr/share/swig/1.3.40/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "IDMEF_DATA_TYPE_BYTE", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(IDMEF_DATA_TYPE_BYTE))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; /*@SWIG:/usr/share/swig/1.3.40/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "IDMEF_DATA_TYPE_UINT32", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(IDMEF_DATA_TYPE_UINT32))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; /*@SWIG:/usr/share/swig/1.3.40/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "IDMEF_DATA_TYPE_UINT64", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(IDMEF_DATA_TYPE_UINT64))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; /*@SWIG:/usr/share/swig/1.3.40/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "IDMEF_DATA_TYPE_FLOAT", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(IDMEF_DATA_TYPE_FLOAT))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; /*@SWIG:/usr/share/swig/1.3.40/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "IDMEF_DATA_TYPE_CHAR_STRING", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(IDMEF_DATA_TYPE_CHAR_STRING))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; /*@SWIG:/usr/share/swig/1.3.40/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "IDMEF_DATA_TYPE_BYTE_STRING", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(IDMEF_DATA_TYPE_BYTE_STRING))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; /*@SWIG:/usr/share/swig/1.3.40/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "IDMEF_CRITERION_OPERATOR_NOT", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(IDMEF_CRITERION_OPERATOR_NOT))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; /*@SWIG:/usr/share/swig/1.3.40/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "IDMEF_CRITERION_OPERATOR_NOCASE", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(IDMEF_CRITERION_OPERATOR_NOCASE))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; /*@SWIG:/usr/share/swig/1.3.40/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "IDMEF_CRITERION_OPERATOR_EQUAL", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(IDMEF_CRITERION_OPERATOR_EQUAL))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; /*@SWIG:/usr/share/swig/1.3.40/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "IDMEF_CRITERION_OPERATOR_EQUAL_NOCASE", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(IDMEF_CRITERION_OPERATOR_EQUAL_NOCASE))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; /*@SWIG:/usr/share/swig/1.3.40/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "IDMEF_CRITERION_OPERATOR_NOT_EQUAL", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(IDMEF_CRITERION_OPERATOR_NOT_EQUAL))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; /*@SWIG:/usr/share/swig/1.3.40/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "IDMEF_CRITERION_OPERATOR_NOT_EQUAL_NOCASE", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(IDMEF_CRITERION_OPERATOR_NOT_EQUAL_NOCASE))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; /*@SWIG:/usr/share/swig/1.3.40/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "IDMEF_CRITERION_OPERATOR_LESSER", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(IDMEF_CRITERION_OPERATOR_LESSER))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; /*@SWIG:/usr/share/swig/1.3.40/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "IDMEF_CRITERION_OPERATOR_LESSER_OR_EQUAL", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(IDMEF_CRITERION_OPERATOR_LESSER_OR_EQUAL))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; /*@SWIG:/usr/share/swig/1.3.40/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "IDMEF_CRITERION_OPERATOR_GREATER", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(IDMEF_CRITERION_OPERATOR_GREATER))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; /*@SWIG:/usr/share/swig/1.3.40/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "IDMEF_CRITERION_OPERATOR_GREATER_OR_EQUAL", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(IDMEF_CRITERION_OPERATOR_GREATER_OR_EQUAL))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; /*@SWIG:/usr/share/swig/1.3.40/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "IDMEF_CRITERION_OPERATOR_SUBSTR", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(IDMEF_CRITERION_OPERATOR_SUBSTR))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; /*@SWIG:/usr/share/swig/1.3.40/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "IDMEF_CRITERION_OPERATOR_SUBSTR_NOCASE", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(IDMEF_CRITERION_OPERATOR_SUBSTR_NOCASE))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; /*@SWIG:/usr/share/swig/1.3.40/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "IDMEF_CRITERION_OPERATOR_NOT_SUBSTR", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(IDMEF_CRITERION_OPERATOR_NOT_SUBSTR))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; /*@SWIG:/usr/share/swig/1.3.40/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "IDMEF_CRITERION_OPERATOR_NOT_SUBSTR_NOCASE", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(IDMEF_CRITERION_OPERATOR_NOT_SUBSTR_NOCASE))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; /*@SWIG:/usr/share/swig/1.3.40/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "IDMEF_CRITERION_OPERATOR_REGEX", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(IDMEF_CRITERION_OPERATOR_REGEX))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; /*@SWIG:/usr/share/swig/1.3.40/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "IDMEF_CRITERION_OPERATOR_REGEX_NOCASE", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(IDMEF_CRITERION_OPERATOR_REGEX_NOCASE))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; /*@SWIG:/usr/share/swig/1.3.40/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "IDMEF_CRITERION_OPERATOR_NOT_REGEX", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(IDMEF_CRITERION_OPERATOR_NOT_REGEX))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; /*@SWIG:/usr/share/swig/1.3.40/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "IDMEF_CRITERION_OPERATOR_NOT_REGEX_NOCASE", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(IDMEF_CRITERION_OPERATOR_NOT_REGEX_NOCASE))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; /*@SWIG:/usr/share/swig/1.3.40/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "IDMEF_CRITERION_OPERATOR_NULL", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(IDMEF_CRITERION_OPERATOR_NULL))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; /*@SWIG:/usr/share/swig/1.3.40/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "IDMEF_CRITERION_OPERATOR_NOT_NULL", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(IDMEF_CRITERION_OPERATOR_NOT_NULL))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; /*@SWIG:/usr/share/swig/1.3.40/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "IDMEF_VALUE_TYPE_ERROR", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(IDMEF_VALUE_TYPE_ERROR))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; /*@SWIG:/usr/share/swig/1.3.40/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "IDMEF_VALUE_TYPE_UNKNOWN", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(IDMEF_VALUE_TYPE_UNKNOWN))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; /*@SWIG:/usr/share/swig/1.3.40/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "IDMEF_VALUE_TYPE_INT8", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(IDMEF_VALUE_TYPE_INT8))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; /*@SWIG:/usr/share/swig/1.3.40/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "IDMEF_VALUE_TYPE_UINT8", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(IDMEF_VALUE_TYPE_UINT8))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; /*@SWIG:/usr/share/swig/1.3.40/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "IDMEF_VALUE_TYPE_INT16", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(IDMEF_VALUE_TYPE_INT16))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; /*@SWIG:/usr/share/swig/1.3.40/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "IDMEF_VALUE_TYPE_UINT16", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(IDMEF_VALUE_TYPE_UINT16))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; /*@SWIG:/usr/share/swig/1.3.40/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "IDMEF_VALUE_TYPE_INT32", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(IDMEF_VALUE_TYPE_INT32))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; /*@SWIG:/usr/share/swig/1.3.40/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "IDMEF_VALUE_TYPE_UINT32", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(IDMEF_VALUE_TYPE_UINT32))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; /*@SWIG:/usr/share/swig/1.3.40/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "IDMEF_VALUE_TYPE_INT64", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(IDMEF_VALUE_TYPE_INT64))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; /*@SWIG:/usr/share/swig/1.3.40/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "IDMEF_VALUE_TYPE_UINT64", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(IDMEF_VALUE_TYPE_UINT64))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; /*@SWIG:/usr/share/swig/1.3.40/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "IDMEF_VALUE_TYPE_FLOAT", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(IDMEF_VALUE_TYPE_FLOAT))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; /*@SWIG:/usr/share/swig/1.3.40/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "IDMEF_VALUE_TYPE_DOUBLE", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(IDMEF_VALUE_TYPE_DOUBLE))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; /*@SWIG:/usr/share/swig/1.3.40/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "IDMEF_VALUE_TYPE_STRING", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(IDMEF_VALUE_TYPE_STRING))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; /*@SWIG:/usr/share/swig/1.3.40/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "IDMEF_VALUE_TYPE_TIME", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(IDMEF_VALUE_TYPE_TIME))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; /*@SWIG:/usr/share/swig/1.3.40/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "IDMEF_VALUE_TYPE_DATA", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(IDMEF_VALUE_TYPE_DATA))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; /*@SWIG:/usr/share/swig/1.3.40/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "IDMEF_VALUE_TYPE_ENUM", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(IDMEF_VALUE_TYPE_ENUM))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; /*@SWIG:/usr/share/swig/1.3.40/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "IDMEF_VALUE_TYPE_LIST", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(IDMEF_VALUE_TYPE_LIST))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; /*@SWIG:/usr/share/swig/1.3.40/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "IDMEF_VALUE_TYPE_CLASS", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(IDMEF_VALUE_TYPE_CLASS))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; /*@SWIG:/usr/share/swig/1.3.40/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "PRELUDE_CONNECTION_PERMISSION_IDMEF_READ", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(PRELUDE_CONNECTION_PERMISSION_IDMEF_READ))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; /*@SWIG:/usr/share/swig/1.3.40/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "PRELUDE_CONNECTION_PERMISSION_ADMIN_READ", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(PRELUDE_CONNECTION_PERMISSION_ADMIN_READ))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; /*@SWIG:/usr/share/swig/1.3.40/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "PRELUDE_CONNECTION_PERMISSION_IDMEF_WRITE", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(PRELUDE_CONNECTION_PERMISSION_IDMEF_WRITE))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; /*@SWIG:/usr/share/swig/1.3.40/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "PRELUDE_CONNECTION_PERMISSION_ADMIN_WRITE", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(PRELUDE_CONNECTION_PERMISSION_ADMIN_WRITE))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; /*@SWIG:/usr/share/swig/1.3.40/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "PRELUDE_CONNECTION_STATE_ESTABLISHED", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(PRELUDE_CONNECTION_STATE_ESTABLISHED))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; /*@SWIG:/usr/share/swig/1.3.40/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "PRELUDE_CONNECTION_POOL_FLAGS_RECONNECT", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(PRELUDE_CONNECTION_POOL_FLAGS_RECONNECT))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; /*@SWIG:/usr/share/swig/1.3.40/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "PRELUDE_CONNECTION_POOL_FLAGS_FAILOVER", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(PRELUDE_CONNECTION_POOL_FLAGS_FAILOVER))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; /*@SWIG:/usr/share/swig/1.3.40/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "PRELUDE_CONNECTION_POOL_EVENT_INPUT", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(PRELUDE_CONNECTION_POOL_EVENT_INPUT))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; /*@SWIG:/usr/share/swig/1.3.40/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "PRELUDE_CONNECTION_POOL_EVENT_DEAD", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(PRELUDE_CONNECTION_POOL_EVENT_DEAD))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; /*@SWIG:/usr/share/swig/1.3.40/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "PRELUDE_CONNECTION_POOL_EVENT_ALIVE", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(PRELUDE_CONNECTION_POOL_EVENT_ALIVE))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; /*@SWIG:/usr/share/swig/1.3.40/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "PRELUDE_OPTION_TYPE_CLI", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(PRELUDE_OPTION_TYPE_CLI))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; /*@SWIG:/usr/share/swig/1.3.40/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "PRELUDE_OPTION_TYPE_CFG", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(PRELUDE_OPTION_TYPE_CFG))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; /*@SWIG:/usr/share/swig/1.3.40/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "PRELUDE_OPTION_TYPE_WIDE", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(PRELUDE_OPTION_TYPE_WIDE))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; /*@SWIG:/usr/share/swig/1.3.40/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "PRELUDE_OPTION_TYPE_CONTEXT", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(PRELUDE_OPTION_TYPE_CONTEXT))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; /*@SWIG:/usr/share/swig/1.3.40/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "PRELUDE_OPTION_TYPE_ROOT", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(PRELUDE_OPTION_TYPE_ROOT))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; /*@SWIG:/usr/share/swig/1.3.40/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "PRELUDE_OPTION_TYPE_DESTROY", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(PRELUDE_OPTION_TYPE_DESTROY))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; /*@SWIG:/usr/share/swig/1.3.40/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "PRELUDE_OPTION_INPUT_TYPE_STRING", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(PRELUDE_OPTION_INPUT_TYPE_STRING))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; /*@SWIG:/usr/share/swig/1.3.40/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "PRELUDE_OPTION_INPUT_TYPE_INTEGER", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(PRELUDE_OPTION_INPUT_TYPE_INTEGER))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; /*@SWIG:/usr/share/swig/1.3.40/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "PRELUDE_OPTION_INPUT_TYPE_BOOLEAN", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(PRELUDE_OPTION_INPUT_TYPE_BOOLEAN))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; /*@SWIG:/usr/share/swig/1.3.40/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "PRELUDE_OPTION_ARGUMENT_REQUIRED", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(PRELUDE_OPTION_ARGUMENT_REQUIRED))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; /*@SWIG:/usr/share/swig/1.3.40/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "PRELUDE_OPTION_ARGUMENT_OPTIONAL", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(PRELUDE_OPTION_ARGUMENT_OPTIONAL))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; /*@SWIG:/usr/share/swig/1.3.40/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "PRELUDE_OPTION_ARGUMENT_NONE", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(PRELUDE_OPTION_ARGUMENT_NONE))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; /*@SWIG:/usr/share/swig/1.3.40/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "PRELUDE_OPTION_PRIORITY_IMMEDIATE", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(PRELUDE_OPTION_PRIORITY_IMMEDIATE))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; /*@SWIG:/usr/share/swig/1.3.40/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "PRELUDE_OPTION_PRIORITY_FIRST", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(PRELUDE_OPTION_PRIORITY_FIRST))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; /*@SWIG:/usr/share/swig/1.3.40/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "PRELUDE_OPTION_PRIORITY_NONE", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(PRELUDE_OPTION_PRIORITY_NONE))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; /*@SWIG:/usr/share/swig/1.3.40/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "PRELUDE_OPTION_PRIORITY_LAST", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(PRELUDE_OPTION_PRIORITY_LAST))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; /*@SWIG:/usr/share/swig/1.3.40/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "PRELUDE_OPTION_WARNING_OPTION", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(PRELUDE_OPTION_WARNING_OPTION))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; /*@SWIG:/usr/share/swig/1.3.40/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "PRELUDE_OPTION_WARNING_ARG", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(PRELUDE_OPTION_WARNING_ARG))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; /*@SWIG:/usr/share/swig/1.3.40/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "PRELUDE_OPTION_REPLY_TYPE_SET", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(0x01))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; /*@SWIG:/usr/share/swig/1.3.40/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "PRELUDE_OPTION_REPLY_TYPE_GET", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(0x02))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; /*@SWIG:/usr/share/swig/1.3.40/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "PRELUDE_OPTION_REPLY_TYPE_LIST", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(0x04))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; /*@SWIG:/usr/share/swig/1.3.40/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "PRELUDE_OPTION_REPLY_TYPE_ERROR", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(0x08))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; /*@SWIG:/usr/share/swig/1.3.40/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "PRELUDE_MSG_PRIORITY_NONE", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(PRELUDE_MSG_PRIORITY_NONE))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; /*@SWIG:/usr/share/swig/1.3.40/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "PRELUDE_MSG_PRIORITY_LOW", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(PRELUDE_MSG_PRIORITY_LOW))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; /*@SWIG:/usr/share/swig/1.3.40/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "PRELUDE_MSG_PRIORITY_MID", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(PRELUDE_MSG_PRIORITY_MID))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; /*@SWIG:/usr/share/swig/1.3.40/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "PRELUDE_MSG_PRIORITY_HIGH", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(PRELUDE_MSG_PRIORITY_HIGH))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; /*@SWIG:/usr/share/swig/1.3.40/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "PRELUDE_MSG_IDMEF", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(0))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; /*@SWIG:/usr/share/swig/1.3.40/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "PRELUDE_MSG_ID", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(3))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; /*@SWIG:/usr/share/swig/1.3.40/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "PRELUDE_MSG_AUTH", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(4))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; /*@SWIG:/usr/share/swig/1.3.40/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "PRELUDE_MSG_CM", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(5))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; /*@SWIG:/usr/share/swig/1.3.40/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "PRELUDE_MSG_CONNECTION_CAPABILITY", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(6))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; /*@SWIG:/usr/share/swig/1.3.40/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "PRELUDE_MSG_OPTION_REQUEST", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(7))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; /*@SWIG:/usr/share/swig/1.3.40/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "PRELUDE_MSG_OPTION_REPLY", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(8))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; /*@SWIG:/usr/share/swig/1.3.40/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "PRELUDE_MSG_ID_DECLARE", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(0))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; /*@SWIG:/usr/share/swig/1.3.40/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "PRELUDE_MSG_AUTH_SUCCEED", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(6))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; /*@SWIG:/usr/share/swig/1.3.40/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "PRELUDE_MSG_AUTH_FAILED", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(7))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; /*@SWIG:/usr/share/swig/1.3.40/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "PRELUDE_MSG_CM_FIREWALL", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(0))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; /*@SWIG:/usr/share/swig/1.3.40/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "PRELUDE_MSG_CM_THROTTLE", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(1))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; /*@SWIG:/usr/share/swig/1.3.40/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "PRELUDE_MSG_CM_ISLAND", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(2))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; /*@SWIG:/usr/share/swig/1.3.40/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "PRELUDE_MSG_CM_FEATURE", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(3))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; /*@SWIG:/usr/share/swig/1.3.40/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "PRELUDE_MSG_OPTION_TARGET_ID", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(0))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; /*@SWIG:/usr/share/swig/1.3.40/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "PRELUDE_MSG_OPTION_LIST", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(2))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; /*@SWIG:/usr/share/swig/1.3.40/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "PRELUDE_MSG_OPTION_VALUE", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(3))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; /*@SWIG:/usr/share/swig/1.3.40/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "PRELUDE_MSG_OPTION_SET", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(4))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; /*@SWIG:/usr/share/swig/1.3.40/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "PRELUDE_MSG_OPTION_GET", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(5))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; /*@SWIG:/usr/share/swig/1.3.40/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "PRELUDE_MSG_OPTION_REQUEST_ID", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(6))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; /*@SWIG:/usr/share/swig/1.3.40/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "PRELUDE_MSG_OPTION_ERROR", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(7))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; /*@SWIG:/usr/share/swig/1.3.40/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "PRELUDE_MSG_OPTION_START", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(8))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; /*@SWIG:/usr/share/swig/1.3.40/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "PRELUDE_MSG_OPTION_END", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(9))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; /*@SWIG:/usr/share/swig/1.3.40/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "PRELUDE_MSG_OPTION_NAME", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(10))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; /*@SWIG:/usr/share/swig/1.3.40/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "PRELUDE_MSG_OPTION_DESC", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(11))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; /*@SWIG:/usr/share/swig/1.3.40/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "PRELUDE_MSG_OPTION_HAS_ARG", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(12))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; /*@SWIG:/usr/share/swig/1.3.40/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "PRELUDE_MSG_OPTION_HELP", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(13))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; /*@SWIG:/usr/share/swig/1.3.40/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "PRELUDE_MSG_OPTION_INPUT_VALIDATION", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(14))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; /*@SWIG:/usr/share/swig/1.3.40/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "PRELUDE_MSG_OPTION_INPUT_TYPE", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(15))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; /*@SWIG:/usr/share/swig/1.3.40/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "PRELUDE_MSG_OPTION_ARG", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(16))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; /*@SWIG:/usr/share/swig/1.3.40/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "PRELUDE_MSG_OPTION_TYPE", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(17))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; /*@SWIG:/usr/share/swig/1.3.40/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "PRELUDE_MSG_OPTION_DESTROY", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(18))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; /*@SWIG:/usr/share/swig/1.3.40/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "PRELUDE_MSG_OPTION_COMMIT", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(19))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; /*@SWIG:/usr/share/swig/1.3.40/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "PRELUDE_MSG_OPTION_HOP", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(20))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; /*@SWIG:/usr/share/swig/1.3.40/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "PRELUDE_MSG_OPTION_TARGET_INSTANCE_ID", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(21))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; /*@SWIG:/usr/share/swig/1.3.40/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "PRELUDE_LOG_CRIT", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(PRELUDE_LOG_CRIT))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; /*@SWIG:/usr/share/swig/1.3.40/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "PRELUDE_LOG_ERR", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(PRELUDE_LOG_ERR))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; /*@SWIG:/usr/share/swig/1.3.40/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "PRELUDE_LOG_WARN", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(PRELUDE_LOG_WARN))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; /*@SWIG:/usr/share/swig/1.3.40/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "PRELUDE_LOG_INFO", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(PRELUDE_LOG_INFO))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; /*@SWIG:/usr/share/swig/1.3.40/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "PRELUDE_LOG_DEBUG", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(PRELUDE_LOG_DEBUG))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; /*@SWIG:/usr/share/swig/1.3.40/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "PRELUDE_LOG_FLAGS_QUIET", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(PRELUDE_LOG_FLAGS_QUIET))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; /*@SWIG:/usr/share/swig/1.3.40/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "PRELUDE_LOG_FLAGS_SYSLOG", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(PRELUDE_LOG_FLAGS_SYSLOG))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; /*@SWIG:/usr/share/swig/1.3.40/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "PRELUDE_MSGBUF_FLAGS_ASYNC", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(PRELUDE_MSGBUF_FLAGS_ASYNC))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; /*@SWIG:/usr/share/swig/1.3.40/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "PRELUDE_ERROR_SYSTEM_ERROR", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)((1 << 15)))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; /*@SWIG:/usr/share/swig/1.3.40/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "PRELUDE_ERROR_SOURCE_UNKNOWN", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(PRELUDE_ERROR_SOURCE_UNKNOWN))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; /*@SWIG:/usr/share/swig/1.3.40/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "PRELUDE_ERROR_SOURCE_IO", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(PRELUDE_ERROR_SOURCE_IO))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; /*@SWIG:/usr/share/swig/1.3.40/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "PRELUDE_ERROR_SOURCE_MESSAGE", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(PRELUDE_ERROR_SOURCE_MESSAGE))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; /*@SWIG:/usr/share/swig/1.3.40/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "PRELUDE_ERROR_SOURCE_FAILOVER", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(PRELUDE_ERROR_SOURCE_FAILOVER))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; /*@SWIG:/usr/share/swig/1.3.40/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "PRELUDE_ERROR_SOURCE_CLIENT", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(PRELUDE_ERROR_SOURCE_CLIENT))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; /*@SWIG:/usr/share/swig/1.3.40/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "PRELUDE_ERROR_SOURCE_CLIENT_PROFILE", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(PRELUDE_ERROR_SOURCE_CLIENT_PROFILE))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; /*@SWIG:/usr/share/swig/1.3.40/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "PRELUDE_ERROR_SOURCE_EXTRACT", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(PRELUDE_ERROR_SOURCE_EXTRACT))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; /*@SWIG:/usr/share/swig/1.3.40/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "PRELUDE_ERROR_SOURCE_CONNECTION", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(PRELUDE_ERROR_SOURCE_CONNECTION))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; /*@SWIG:/usr/share/swig/1.3.40/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "PRELUDE_ERROR_SOURCE_CONNECTION_POOL", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(PRELUDE_ERROR_SOURCE_CONNECTION_POOL))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; /*@SWIG:/usr/share/swig/1.3.40/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "PRELUDE_ERROR_SOURCE_CONFIG_ENGINE", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(PRELUDE_ERROR_SOURCE_CONFIG_ENGINE))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; /*@SWIG:/usr/share/swig/1.3.40/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "PRELUDE_ERROR_SOURCE_STRING", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(PRELUDE_ERROR_SOURCE_STRING))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; /*@SWIG:/usr/share/swig/1.3.40/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "PRELUDE_ERROR_SOURCE_IDMEF_TREE_WRAP", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(PRELUDE_ERROR_SOURCE_IDMEF_TREE_WRAP))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; /*@SWIG:/usr/share/swig/1.3.40/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "PRELUDE_ERROR_SOURCE_IDMEF_PATH", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(PRELUDE_ERROR_SOURCE_IDMEF_PATH))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; /*@SWIG:/usr/share/swig/1.3.40/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "PRELUDE_ERROR_SOURCE_IDMEF_TYPE", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(PRELUDE_ERROR_SOURCE_IDMEF_TYPE))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; /*@SWIG:/usr/share/swig/1.3.40/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "PRELUDE_ERROR_SOURCE_IDMEF_MESSAGE_READ", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(PRELUDE_ERROR_SOURCE_IDMEF_MESSAGE_READ))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; /*@SWIG:/usr/share/swig/1.3.40/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "PRELUDE_ERROR_SOURCE_IDMEF_CRITERIA", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(PRELUDE_ERROR_SOURCE_IDMEF_CRITERIA))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; /*@SWIG:/usr/share/swig/1.3.40/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "PRELUDE_ERROR_SOURCE_IDMEF_VALUE_TYPE", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(PRELUDE_ERROR_SOURCE_IDMEF_VALUE_TYPE))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; /*@SWIG:/usr/share/swig/1.3.40/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "PRELUDE_ERROR_SOURCE_PRELUDEDB", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(PRELUDE_ERROR_SOURCE_PRELUDEDB))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; /*@SWIG:/usr/share/swig/1.3.40/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "PRELUDE_ERROR_NO_ERROR", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(PRELUDE_ERROR_NO_ERROR))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; /*@SWIG:/usr/share/swig/1.3.40/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "PRELUDE_ERROR_GENERIC", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(PRELUDE_ERROR_GENERIC))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; /*@SWIG:/usr/share/swig/1.3.40/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "PRELUDE_ERROR_TLS", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(PRELUDE_ERROR_TLS))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; /*@SWIG:/usr/share/swig/1.3.40/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "PRELUDE_ERROR_INVAL_LENGTH", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(PRELUDE_ERROR_INVAL_LENGTH))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; /*@SWIG:/usr/share/swig/1.3.40/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "PRELUDE_ERROR_INVAL_MESSAGE", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(PRELUDE_ERROR_INVAL_MESSAGE))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; /*@SWIG:/usr/share/swig/1.3.40/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "PRELUDE_ERROR_PROTOCOL_VERSION", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(PRELUDE_ERROR_PROTOCOL_VERSION))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; /*@SWIG:/usr/share/swig/1.3.40/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "PRELUDE_ERROR_EOF", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(PRELUDE_ERROR_EOF))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; /*@SWIG:/usr/share/swig/1.3.40/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "PRELUDE_ERROR_PROFILE", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(PRELUDE_ERROR_PROFILE))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; /*@SWIG:/usr/share/swig/1.3.40/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "PRELUDE_ERROR_TLS_AUTH_REJECTED", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(PRELUDE_ERROR_TLS_AUTH_REJECTED))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; /*@SWIG:/usr/share/swig/1.3.40/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "PRELUDE_ERROR_INVAL_INT8", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(PRELUDE_ERROR_INVAL_INT8))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; /*@SWIG:/usr/share/swig/1.3.40/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "PRELUDE_ERROR_INVAL_INT16", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(PRELUDE_ERROR_INVAL_INT16))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; /*@SWIG:/usr/share/swig/1.3.40/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "PRELUDE_ERROR_INVAL_INT32", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(PRELUDE_ERROR_INVAL_INT32))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; /*@SWIG:/usr/share/swig/1.3.40/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "PRELUDE_ERROR_INVAL_INT64", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(PRELUDE_ERROR_INVAL_INT64))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; /*@SWIG:/usr/share/swig/1.3.40/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "PRELUDE_ERROR_INVAL_FLOAT", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(PRELUDE_ERROR_INVAL_FLOAT))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; /*@SWIG:/usr/share/swig/1.3.40/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "PRELUDE_ERROR_INVAL_CHAR", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(PRELUDE_ERROR_INVAL_CHAR))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; /*@SWIG:/usr/share/swig/1.3.40/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "PRELUDE_ERROR_INVAL_IDMEF_TIME", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(PRELUDE_ERROR_INVAL_IDMEF_TIME))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; /*@SWIG:/usr/share/swig/1.3.40/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "PRELUDE_ERROR_CONNECTION_STRING", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(PRELUDE_ERROR_CONNECTION_STRING))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; /*@SWIG:/usr/share/swig/1.3.40/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "PRELUDE_ERROR_IDMEF_VALUE_TYPE_UNKNOWN", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(PRELUDE_ERROR_IDMEF_VALUE_TYPE_UNKNOWN))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; /*@SWIG:/usr/share/swig/1.3.40/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "PRELUDE_ERROR_IDMEF_VALUE_TYPE_COPY_UNAVAILABLE", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(PRELUDE_ERROR_IDMEF_VALUE_TYPE_COPY_UNAVAILABLE))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; /*@SWIG:/usr/share/swig/1.3.40/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "PRELUDE_ERROR_IDMEF_VALUE_TYPE_CLONE_UNAVAILABLE", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(PRELUDE_ERROR_IDMEF_VALUE_TYPE_CLONE_UNAVAILABLE))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; /*@SWIG:/usr/share/swig/1.3.40/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "PRELUDE_ERROR_IDMEF_VALUE_TYPE_COMPARE_UNAVAILABLE", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(PRELUDE_ERROR_IDMEF_VALUE_TYPE_COMPARE_UNAVAILABLE))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; /*@SWIG:/usr/share/swig/1.3.40/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "PRELUDE_ERROR_IDMEF_VALUE_TYPE_READ_UNAVAILABLE", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(PRELUDE_ERROR_IDMEF_VALUE_TYPE_READ_UNAVAILABLE))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; /*@SWIG:/usr/share/swig/1.3.40/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "PRELUDE_ERROR_IDMEF_VALUE_TYPE_WRITE_UNAVAILABLE", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(PRELUDE_ERROR_IDMEF_VALUE_TYPE_WRITE_UNAVAILABLE))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; /*@SWIG:/usr/share/swig/1.3.40/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "PRELUDE_ERROR_IDMEF_VALUE_TYPE_COMPARE_MISMATCH", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(PRELUDE_ERROR_IDMEF_VALUE_TYPE_COMPARE_MISMATCH))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; /*@SWIG:/usr/share/swig/1.3.40/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "PRELUDE_ERROR_IDMEF_VALUE_TYPE_PARSE", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(PRELUDE_ERROR_IDMEF_VALUE_TYPE_PARSE))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; /*@SWIG:/usr/share/swig/1.3.40/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "PRELUDE_ERROR_IDMEF_CLASS_UNKNOWN", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(PRELUDE_ERROR_IDMEF_CLASS_UNKNOWN))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; /*@SWIG:/usr/share/swig/1.3.40/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "PRELUDE_ERROR_IDMEF_CLASS_UNKNOWN_CHILD", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(PRELUDE_ERROR_IDMEF_CLASS_UNKNOWN_CHILD))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; /*@SWIG:/usr/share/swig/1.3.40/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "PRELUDE_ERROR_IDMEF_CLASS_UNKNOWN_NAME", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(PRELUDE_ERROR_IDMEF_CLASS_UNKNOWN_NAME))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; /*@SWIG:/usr/share/swig/1.3.40/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "PRELUDE_ERROR_IDMEF_PATH_LENGTH", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(PRELUDE_ERROR_IDMEF_PATH_LENGTH))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; /*@SWIG:/usr/share/swig/1.3.40/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "PRELUDE_ERROR_IDMEF_PATH_DEPTH", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(PRELUDE_ERROR_IDMEF_PATH_DEPTH))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; /*@SWIG:/usr/share/swig/1.3.40/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "PRELUDE_ERROR_IDMEF_PATH_PARENT_ROOT", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(PRELUDE_ERROR_IDMEF_PATH_PARENT_ROOT))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; /*@SWIG:/usr/share/swig/1.3.40/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "PRELUDE_ERROR_IDMEF_PATH_NTH", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(PRELUDE_ERROR_IDMEF_PATH_NTH))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; /*@SWIG:/usr/share/swig/1.3.40/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "PRELUDE_ERROR_IDMEF_PATH_MISS_INDEX", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(PRELUDE_ERROR_IDMEF_PATH_MISS_INDEX))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; /*@SWIG:/usr/share/swig/1.3.40/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "PRELUDE_ERROR_IDMEF_PATH_INTEGRITY", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(PRELUDE_ERROR_IDMEF_PATH_INTEGRITY))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; /*@SWIG:/usr/share/swig/1.3.40/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "PRELUDE_ERROR_IDMEF_PATH_INDEX_RESERVED", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(PRELUDE_ERROR_IDMEF_PATH_INDEX_RESERVED))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; /*@SWIG:/usr/share/swig/1.3.40/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "PRELUDE_ERROR_IDMEF_PATH_INDEX_FORBIDDEN", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(PRELUDE_ERROR_IDMEF_PATH_INDEX_FORBIDDEN))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; /*@SWIG:/usr/share/swig/1.3.40/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "PRELUDE_ERROR_IDMEF_PATH_INDEX_UNDEFINED", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(PRELUDE_ERROR_IDMEF_PATH_INDEX_UNDEFINED))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; /*@SWIG:/usr/share/swig/1.3.40/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "PRELUDE_ERROR_IDMEF_TREE_INDEX_UNDEFINED", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(PRELUDE_ERROR_IDMEF_TREE_INDEX_UNDEFINED))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; /*@SWIG:/usr/share/swig/1.3.40/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "PRELUDE_ERROR_IDMEF_UNKNOWN_ENUM_STRING", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(PRELUDE_ERROR_IDMEF_UNKNOWN_ENUM_STRING))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; /*@SWIG:/usr/share/swig/1.3.40/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "PRELUDE_ERROR_IDMEF_UNKNOWN_TAG", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(PRELUDE_ERROR_IDMEF_UNKNOWN_TAG))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; /*@SWIG:/usr/share/swig/1.3.40/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "PRELUDE_ERROR_DAEMONIZE_LOCK_HELD", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(PRELUDE_ERROR_DAEMONIZE_LOCK_HELD))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; /*@SWIG:/usr/share/swig/1.3.40/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "PRELUDE_ERROR_PLUGIN_LTDL_INIT", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(PRELUDE_ERROR_PLUGIN_LTDL_INIT))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; /*@SWIG:/usr/share/swig/1.3.40/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "PRELUDE_ERROR_STRING_NOT_NULL_TERMINATED", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(PRELUDE_ERROR_STRING_NOT_NULL_TERMINATED))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; /*@SWIG:/usr/share/swig/1.3.40/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "PRELUDE_ERROR_CANT_RESOLVE", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(PRELUDE_ERROR_CANT_RESOLVE))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; /*@SWIG:/usr/share/swig/1.3.40/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "PRELUDE_ERROR_UNKNOWN_PERMISSION_TYPE", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(PRELUDE_ERROR_UNKNOWN_PERMISSION_TYPE))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; /*@SWIG:/usr/share/swig/1.3.40/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "PRELUDE_ERROR_UNKNOWN_PERMISSION_BIT", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(PRELUDE_ERROR_UNKNOWN_PERMISSION_BIT))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; /*@SWIG:/usr/share/swig/1.3.40/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "PRELUDE_ERROR_IDMEF_CRITERIA_PARSE", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(PRELUDE_ERROR_IDMEF_CRITERIA_PARSE))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; /*@SWIG:/usr/share/swig/1.3.40/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "PRELUDE_ERROR_IDMEF_CRITERION_UNSUPPORTED_OPERATOR", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(PRELUDE_ERROR_IDMEF_CRITERION_UNSUPPORTED_OPERATOR))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; /*@SWIG:/usr/share/swig/1.3.40/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "PRELUDE_ERROR_IDMEF_CRITERION_INVALID_REGEX", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(PRELUDE_ERROR_IDMEF_CRITERION_INVALID_REGEX))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; /*@SWIG:/usr/share/swig/1.3.40/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "PRELUDE_ERROR_TLS_WARNING_ALERT", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(PRELUDE_ERROR_TLS_WARNING_ALERT))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; /*@SWIG:/usr/share/swig/1.3.40/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "PRELUDE_ERROR_TLS_FATAL_ALERT", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(PRELUDE_ERROR_TLS_FATAL_ALERT))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; /*@SWIG:/usr/share/swig/1.3.40/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "PRELUDE_ERROR_IDMEF_CLASS_CHILD_NOT_CLASS", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(PRELUDE_ERROR_IDMEF_CLASS_CHILD_NOT_CLASS))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; /*@SWIG:/usr/share/swig/1.3.40/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "PRELUDE_ERROR_ASSERTION", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(PRELUDE_ERROR_ASSERTION))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; /*@SWIG:/usr/share/swig/1.3.40/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "PRELUDE_ERROR_IDMEF_VALUE_TYPE_REF_UNAVAILABLE", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(PRELUDE_ERROR_IDMEF_VALUE_TYPE_REF_UNAVAILABLE))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; /*@SWIG:/usr/share/swig/1.3.40/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "PRELUDE_ERROR_UNKNOWN_ERRNO", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(PRELUDE_ERROR_UNKNOWN_ERRNO))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; /*@SWIG:/usr/share/swig/1.3.40/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "PRELUDE_ERROR_E2BIG", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(PRELUDE_ERROR_E2BIG))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; /*@SWIG:/usr/share/swig/1.3.40/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "PRELUDE_ERROR_EACCES", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(PRELUDE_ERROR_EACCES))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; /*@SWIG:/usr/share/swig/1.3.40/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "PRELUDE_ERROR_EADDRINUSE", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(PRELUDE_ERROR_EADDRINUSE))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; /*@SWIG:/usr/share/swig/1.3.40/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "PRELUDE_ERROR_EADDRNOTAVAIL", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(PRELUDE_ERROR_EADDRNOTAVAIL))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; /*@SWIG:/usr/share/swig/1.3.40/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "PRELUDE_ERROR_EADV", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(PRELUDE_ERROR_EADV))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; /*@SWIG:/usr/share/swig/1.3.40/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "PRELUDE_ERROR_EAFNOSUPPORT", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(PRELUDE_ERROR_EAFNOSUPPORT))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; /*@SWIG:/usr/share/swig/1.3.40/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "PRELUDE_ERROR_EAGAIN", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(PRELUDE_ERROR_EAGAIN))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; /*@SWIG:/usr/share/swig/1.3.40/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "PRELUDE_ERROR_EALREADY", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(PRELUDE_ERROR_EALREADY))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; /*@SWIG:/usr/share/swig/1.3.40/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "PRELUDE_ERROR_EAUTH", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(PRELUDE_ERROR_EAUTH))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; /*@SWIG:/usr/share/swig/1.3.40/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "PRELUDE_ERROR_EBACKGROUND", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(PRELUDE_ERROR_EBACKGROUND))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; /*@SWIG:/usr/share/swig/1.3.40/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "PRELUDE_ERROR_EBADE", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(PRELUDE_ERROR_EBADE))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; /*@SWIG:/usr/share/swig/1.3.40/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "PRELUDE_ERROR_EBADF", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(PRELUDE_ERROR_EBADF))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; /*@SWIG:/usr/share/swig/1.3.40/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "PRELUDE_ERROR_EBADFD", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(PRELUDE_ERROR_EBADFD))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; /*@SWIG:/usr/share/swig/1.3.40/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "PRELUDE_ERROR_EBADMSG", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(PRELUDE_ERROR_EBADMSG))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; /*@SWIG:/usr/share/swig/1.3.40/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "PRELUDE_ERROR_EBADR", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(PRELUDE_ERROR_EBADR))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; /*@SWIG:/usr/share/swig/1.3.40/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "PRELUDE_ERROR_EBADRPC", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(PRELUDE_ERROR_EBADRPC))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; /*@SWIG:/usr/share/swig/1.3.40/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "PRELUDE_ERROR_EBADRQC", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(PRELUDE_ERROR_EBADRQC))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; /*@SWIG:/usr/share/swig/1.3.40/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "PRELUDE_ERROR_EBADSLT", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(PRELUDE_ERROR_EBADSLT))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; /*@SWIG:/usr/share/swig/1.3.40/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "PRELUDE_ERROR_EBFONT", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(PRELUDE_ERROR_EBFONT))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; /*@SWIG:/usr/share/swig/1.3.40/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "PRELUDE_ERROR_EBUSY", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(PRELUDE_ERROR_EBUSY))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; /*@SWIG:/usr/share/swig/1.3.40/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "PRELUDE_ERROR_ECANCELED", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(PRELUDE_ERROR_ECANCELED))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; /*@SWIG:/usr/share/swig/1.3.40/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "PRELUDE_ERROR_ECHILD", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(PRELUDE_ERROR_ECHILD))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; /*@SWIG:/usr/share/swig/1.3.40/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "PRELUDE_ERROR_ECHRNG", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(PRELUDE_ERROR_ECHRNG))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; /*@SWIG:/usr/share/swig/1.3.40/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "PRELUDE_ERROR_ECOMM", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(PRELUDE_ERROR_ECOMM))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; /*@SWIG:/usr/share/swig/1.3.40/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "PRELUDE_ERROR_ECONNABORTED", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(PRELUDE_ERROR_ECONNABORTED))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; /*@SWIG:/usr/share/swig/1.3.40/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "PRELUDE_ERROR_ECONNREFUSED", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(PRELUDE_ERROR_ECONNREFUSED))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; /*@SWIG:/usr/share/swig/1.3.40/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "PRELUDE_ERROR_ECONNRESET", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(PRELUDE_ERROR_ECONNRESET))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; /*@SWIG:/usr/share/swig/1.3.40/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "PRELUDE_ERROR_ED", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(PRELUDE_ERROR_ED))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; /*@SWIG:/usr/share/swig/1.3.40/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "PRELUDE_ERROR_EDEADLK", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(PRELUDE_ERROR_EDEADLK))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; /*@SWIG:/usr/share/swig/1.3.40/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "PRELUDE_ERROR_EDEADLOCK", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(PRELUDE_ERROR_EDEADLOCK))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; /*@SWIG:/usr/share/swig/1.3.40/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "PRELUDE_ERROR_EDESTADDRREQ", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(PRELUDE_ERROR_EDESTADDRREQ))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; /*@SWIG:/usr/share/swig/1.3.40/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "PRELUDE_ERROR_EDIED", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(PRELUDE_ERROR_EDIED))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; /*@SWIG:/usr/share/swig/1.3.40/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "PRELUDE_ERROR_EDOM", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(PRELUDE_ERROR_EDOM))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; /*@SWIG:/usr/share/swig/1.3.40/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "PRELUDE_ERROR_EDOTDOT", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(PRELUDE_ERROR_EDOTDOT))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; /*@SWIG:/usr/share/swig/1.3.40/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "PRELUDE_ERROR_EDQUOT", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(PRELUDE_ERROR_EDQUOT))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; /*@SWIG:/usr/share/swig/1.3.40/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "PRELUDE_ERROR_EEXIST", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(PRELUDE_ERROR_EEXIST))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; /*@SWIG:/usr/share/swig/1.3.40/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "PRELUDE_ERROR_EFAULT", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(PRELUDE_ERROR_EFAULT))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; /*@SWIG:/usr/share/swig/1.3.40/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "PRELUDE_ERROR_EFBIG", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(PRELUDE_ERROR_EFBIG))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; /*@SWIG:/usr/share/swig/1.3.40/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "PRELUDE_ERROR_EFTYPE", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(PRELUDE_ERROR_EFTYPE))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; /*@SWIG:/usr/share/swig/1.3.40/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "PRELUDE_ERROR_EGRATUITOUS", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(PRELUDE_ERROR_EGRATUITOUS))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; /*@SWIG:/usr/share/swig/1.3.40/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "PRELUDE_ERROR_EGREGIOUS", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(PRELUDE_ERROR_EGREGIOUS))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; /*@SWIG:/usr/share/swig/1.3.40/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "PRELUDE_ERROR_EHOSTDOWN", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(PRELUDE_ERROR_EHOSTDOWN))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; /*@SWIG:/usr/share/swig/1.3.40/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "PRELUDE_ERROR_EHOSTUNREACH", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(PRELUDE_ERROR_EHOSTUNREACH))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; /*@SWIG:/usr/share/swig/1.3.40/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "PRELUDE_ERROR_EIDRM", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(PRELUDE_ERROR_EIDRM))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; /*@SWIG:/usr/share/swig/1.3.40/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "PRELUDE_ERROR_EIEIO", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(PRELUDE_ERROR_EIEIO))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; /*@SWIG:/usr/share/swig/1.3.40/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "PRELUDE_ERROR_EILSEQ", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(PRELUDE_ERROR_EILSEQ))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; /*@SWIG:/usr/share/swig/1.3.40/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "PRELUDE_ERROR_EINPROGRESS", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(PRELUDE_ERROR_EINPROGRESS))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; /*@SWIG:/usr/share/swig/1.3.40/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "PRELUDE_ERROR_EINTR", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(PRELUDE_ERROR_EINTR))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; /*@SWIG:/usr/share/swig/1.3.40/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "PRELUDE_ERROR_EINVAL", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(PRELUDE_ERROR_EINVAL))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; /*@SWIG:/usr/share/swig/1.3.40/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "PRELUDE_ERROR_EIO", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(PRELUDE_ERROR_EIO))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; /*@SWIG:/usr/share/swig/1.3.40/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "PRELUDE_ERROR_EISCONN", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(PRELUDE_ERROR_EISCONN))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; /*@SWIG:/usr/share/swig/1.3.40/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "PRELUDE_ERROR_EISDIR", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(PRELUDE_ERROR_EISDIR))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; /*@SWIG:/usr/share/swig/1.3.40/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "PRELUDE_ERROR_EISNAM", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(PRELUDE_ERROR_EISNAM))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; /*@SWIG:/usr/share/swig/1.3.40/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "PRELUDE_ERROR_EL2HLT", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(PRELUDE_ERROR_EL2HLT))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; /*@SWIG:/usr/share/swig/1.3.40/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "PRELUDE_ERROR_EL2NSYNC", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(PRELUDE_ERROR_EL2NSYNC))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; /*@SWIG:/usr/share/swig/1.3.40/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "PRELUDE_ERROR_EL3HLT", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(PRELUDE_ERROR_EL3HLT))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; /*@SWIG:/usr/share/swig/1.3.40/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "PRELUDE_ERROR_EL3RST", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(PRELUDE_ERROR_EL3RST))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; /*@SWIG:/usr/share/swig/1.3.40/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "PRELUDE_ERROR_ELIBACC", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(PRELUDE_ERROR_ELIBACC))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; /*@SWIG:/usr/share/swig/1.3.40/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "PRELUDE_ERROR_ELIBBAD", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(PRELUDE_ERROR_ELIBBAD))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; /*@SWIG:/usr/share/swig/1.3.40/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "PRELUDE_ERROR_ELIBEXEC", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(PRELUDE_ERROR_ELIBEXEC))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; /*@SWIG:/usr/share/swig/1.3.40/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "PRELUDE_ERROR_ELIBMAX", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(PRELUDE_ERROR_ELIBMAX))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; /*@SWIG:/usr/share/swig/1.3.40/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "PRELUDE_ERROR_ELIBSCN", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(PRELUDE_ERROR_ELIBSCN))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; /*@SWIG:/usr/share/swig/1.3.40/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "PRELUDE_ERROR_ELNRNG", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(PRELUDE_ERROR_ELNRNG))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; /*@SWIG:/usr/share/swig/1.3.40/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "PRELUDE_ERROR_ELOOP", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(PRELUDE_ERROR_ELOOP))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; /*@SWIG:/usr/share/swig/1.3.40/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "PRELUDE_ERROR_EMEDIUMTYPE", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(PRELUDE_ERROR_EMEDIUMTYPE))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; /*@SWIG:/usr/share/swig/1.3.40/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "PRELUDE_ERROR_EMFILE", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(PRELUDE_ERROR_EMFILE))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; /*@SWIG:/usr/share/swig/1.3.40/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "PRELUDE_ERROR_EMLINK", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(PRELUDE_ERROR_EMLINK))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; /*@SWIG:/usr/share/swig/1.3.40/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "PRELUDE_ERROR_EMSGSIZE", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(PRELUDE_ERROR_EMSGSIZE))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; /*@SWIG:/usr/share/swig/1.3.40/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "PRELUDE_ERROR_EMULTIHOP", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(PRELUDE_ERROR_EMULTIHOP))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; /*@SWIG:/usr/share/swig/1.3.40/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "PRELUDE_ERROR_ENAMETOOLONG", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(PRELUDE_ERROR_ENAMETOOLONG))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; /*@SWIG:/usr/share/swig/1.3.40/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "PRELUDE_ERROR_ENAVAIL", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(PRELUDE_ERROR_ENAVAIL))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; /*@SWIG:/usr/share/swig/1.3.40/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "PRELUDE_ERROR_ENEEDAUTH", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(PRELUDE_ERROR_ENEEDAUTH))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; /*@SWIG:/usr/share/swig/1.3.40/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "PRELUDE_ERROR_ENETDOWN", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(PRELUDE_ERROR_ENETDOWN))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; /*@SWIG:/usr/share/swig/1.3.40/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "PRELUDE_ERROR_ENETRESET", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(PRELUDE_ERROR_ENETRESET))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; /*@SWIG:/usr/share/swig/1.3.40/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "PRELUDE_ERROR_ENETUNREACH", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(PRELUDE_ERROR_ENETUNREACH))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; /*@SWIG:/usr/share/swig/1.3.40/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "PRELUDE_ERROR_ENFILE", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(PRELUDE_ERROR_ENFILE))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; /*@SWIG:/usr/share/swig/1.3.40/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "PRELUDE_ERROR_ENOANO", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(PRELUDE_ERROR_ENOANO))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; /*@SWIG:/usr/share/swig/1.3.40/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "PRELUDE_ERROR_ENOBUFS", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(PRELUDE_ERROR_ENOBUFS))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; /*@SWIG:/usr/share/swig/1.3.40/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "PRELUDE_ERROR_ENOCSI", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(PRELUDE_ERROR_ENOCSI))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; /*@SWIG:/usr/share/swig/1.3.40/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "PRELUDE_ERROR_ENODATA", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(PRELUDE_ERROR_ENODATA))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; /*@SWIG:/usr/share/swig/1.3.40/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "PRELUDE_ERROR_ENODEV", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(PRELUDE_ERROR_ENODEV))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; /*@SWIG:/usr/share/swig/1.3.40/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "PRELUDE_ERROR_ENOENT", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(PRELUDE_ERROR_ENOENT))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; /*@SWIG:/usr/share/swig/1.3.40/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "PRELUDE_ERROR_ENOEXEC", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(PRELUDE_ERROR_ENOEXEC))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; /*@SWIG:/usr/share/swig/1.3.40/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "PRELUDE_ERROR_ENOLCK", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(PRELUDE_ERROR_ENOLCK))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; /*@SWIG:/usr/share/swig/1.3.40/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "PRELUDE_ERROR_ENOLINK", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(PRELUDE_ERROR_ENOLINK))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; /*@SWIG:/usr/share/swig/1.3.40/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "PRELUDE_ERROR_ENOMEDIUM", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(PRELUDE_ERROR_ENOMEDIUM))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; /*@SWIG:/usr/share/swig/1.3.40/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "PRELUDE_ERROR_ENOMEM", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(PRELUDE_ERROR_ENOMEM))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; /*@SWIG:/usr/share/swig/1.3.40/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "PRELUDE_ERROR_ENOMSG", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(PRELUDE_ERROR_ENOMSG))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; /*@SWIG:/usr/share/swig/1.3.40/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "PRELUDE_ERROR_ENONET", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(PRELUDE_ERROR_ENONET))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; /*@SWIG:/usr/share/swig/1.3.40/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "PRELUDE_ERROR_ENOPKG", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(PRELUDE_ERROR_ENOPKG))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; /*@SWIG:/usr/share/swig/1.3.40/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "PRELUDE_ERROR_ENOPROTOOPT", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(PRELUDE_ERROR_ENOPROTOOPT))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; /*@SWIG:/usr/share/swig/1.3.40/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "PRELUDE_ERROR_ENOSPC", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(PRELUDE_ERROR_ENOSPC))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; /*@SWIG:/usr/share/swig/1.3.40/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "PRELUDE_ERROR_ENOSR", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(PRELUDE_ERROR_ENOSR))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; /*@SWIG:/usr/share/swig/1.3.40/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "PRELUDE_ERROR_ENOSTR", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(PRELUDE_ERROR_ENOSTR))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; /*@SWIG:/usr/share/swig/1.3.40/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "PRELUDE_ERROR_ENOSYS", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(PRELUDE_ERROR_ENOSYS))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; /*@SWIG:/usr/share/swig/1.3.40/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "PRELUDE_ERROR_ENOTBLK", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(PRELUDE_ERROR_ENOTBLK))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; /*@SWIG:/usr/share/swig/1.3.40/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "PRELUDE_ERROR_ENOTCONN", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(PRELUDE_ERROR_ENOTCONN))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; /*@SWIG:/usr/share/swig/1.3.40/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "PRELUDE_ERROR_ENOTDIR", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(PRELUDE_ERROR_ENOTDIR))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; /*@SWIG:/usr/share/swig/1.3.40/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "PRELUDE_ERROR_ENOTEMPTY", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(PRELUDE_ERROR_ENOTEMPTY))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; /*@SWIG:/usr/share/swig/1.3.40/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "PRELUDE_ERROR_ENOTNAM", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(PRELUDE_ERROR_ENOTNAM))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; /*@SWIG:/usr/share/swig/1.3.40/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "PRELUDE_ERROR_ENOTSOCK", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(PRELUDE_ERROR_ENOTSOCK))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; /*@SWIG:/usr/share/swig/1.3.40/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "PRELUDE_ERROR_ENOTSUP", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(PRELUDE_ERROR_ENOTSUP))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; /*@SWIG:/usr/share/swig/1.3.40/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "PRELUDE_ERROR_ENOTTY", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(PRELUDE_ERROR_ENOTTY))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; /*@SWIG:/usr/share/swig/1.3.40/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "PRELUDE_ERROR_ENOTUNIQ", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(PRELUDE_ERROR_ENOTUNIQ))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; /*@SWIG:/usr/share/swig/1.3.40/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "PRELUDE_ERROR_ENXIO", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(PRELUDE_ERROR_ENXIO))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; /*@SWIG:/usr/share/swig/1.3.40/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "PRELUDE_ERROR_EOPNOTSUPP", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(PRELUDE_ERROR_EOPNOTSUPP))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; /*@SWIG:/usr/share/swig/1.3.40/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "PRELUDE_ERROR_EOVERFLOW", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(PRELUDE_ERROR_EOVERFLOW))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; /*@SWIG:/usr/share/swig/1.3.40/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "PRELUDE_ERROR_EPERM", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(PRELUDE_ERROR_EPERM))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; /*@SWIG:/usr/share/swig/1.3.40/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "PRELUDE_ERROR_EPFNOSUPPORT", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(PRELUDE_ERROR_EPFNOSUPPORT))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; /*@SWIG:/usr/share/swig/1.3.40/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "PRELUDE_ERROR_EPIPE", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(PRELUDE_ERROR_EPIPE))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; /*@SWIG:/usr/share/swig/1.3.40/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "PRELUDE_ERROR_EPROCLIM", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(PRELUDE_ERROR_EPROCLIM))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; /*@SWIG:/usr/share/swig/1.3.40/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "PRELUDE_ERROR_EPROCUNAVAIL", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(PRELUDE_ERROR_EPROCUNAVAIL))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; /*@SWIG:/usr/share/swig/1.3.40/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "PRELUDE_ERROR_EPROGMISMATCH", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(PRELUDE_ERROR_EPROGMISMATCH))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; /*@SWIG:/usr/share/swig/1.3.40/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "PRELUDE_ERROR_EPROGUNAVAIL", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(PRELUDE_ERROR_EPROGUNAVAIL))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; /*@SWIG:/usr/share/swig/1.3.40/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "PRELUDE_ERROR_EPROTO", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(PRELUDE_ERROR_EPROTO))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; /*@SWIG:/usr/share/swig/1.3.40/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "PRELUDE_ERROR_EPROTONOSUPPORT", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(PRELUDE_ERROR_EPROTONOSUPPORT))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; /*@SWIG:/usr/share/swig/1.3.40/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "PRELUDE_ERROR_EPROTOTYPE", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(PRELUDE_ERROR_EPROTOTYPE))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; /*@SWIG:/usr/share/swig/1.3.40/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "PRELUDE_ERROR_ERANGE", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(PRELUDE_ERROR_ERANGE))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; /*@SWIG:/usr/share/swig/1.3.40/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "PRELUDE_ERROR_EREMCHG", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(PRELUDE_ERROR_EREMCHG))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; /*@SWIG:/usr/share/swig/1.3.40/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "PRELUDE_ERROR_EREMOTE", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(PRELUDE_ERROR_EREMOTE))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; /*@SWIG:/usr/share/swig/1.3.40/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "PRELUDE_ERROR_EREMOTEIO", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(PRELUDE_ERROR_EREMOTEIO))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; /*@SWIG:/usr/share/swig/1.3.40/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "PRELUDE_ERROR_ERESTART", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(PRELUDE_ERROR_ERESTART))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; /*@SWIG:/usr/share/swig/1.3.40/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "PRELUDE_ERROR_EROFS", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(PRELUDE_ERROR_EROFS))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; /*@SWIG:/usr/share/swig/1.3.40/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "PRELUDE_ERROR_ERPCMISMATCH", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(PRELUDE_ERROR_ERPCMISMATCH))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; /*@SWIG:/usr/share/swig/1.3.40/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "PRELUDE_ERROR_ESHUTDOWN", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(PRELUDE_ERROR_ESHUTDOWN))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; /*@SWIG:/usr/share/swig/1.3.40/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "PRELUDE_ERROR_ESOCKTNOSUPPORT", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(PRELUDE_ERROR_ESOCKTNOSUPPORT))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; /*@SWIG:/usr/share/swig/1.3.40/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "PRELUDE_ERROR_ESPIPE", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(PRELUDE_ERROR_ESPIPE))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; /*@SWIG:/usr/share/swig/1.3.40/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "PRELUDE_ERROR_ESRCH", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(PRELUDE_ERROR_ESRCH))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; /*@SWIG:/usr/share/swig/1.3.40/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "PRELUDE_ERROR_ESRMNT", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(PRELUDE_ERROR_ESRMNT))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; /*@SWIG:/usr/share/swig/1.3.40/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "PRELUDE_ERROR_ESTALE", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(PRELUDE_ERROR_ESTALE))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; /*@SWIG:/usr/share/swig/1.3.40/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "PRELUDE_ERROR_ESTRPIPE", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(PRELUDE_ERROR_ESTRPIPE))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; /*@SWIG:/usr/share/swig/1.3.40/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "PRELUDE_ERROR_ETIME", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(PRELUDE_ERROR_ETIME))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; /*@SWIG:/usr/share/swig/1.3.40/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "PRELUDE_ERROR_ETIMEDOUT", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(PRELUDE_ERROR_ETIMEDOUT))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; /*@SWIG:/usr/share/swig/1.3.40/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "PRELUDE_ERROR_ETOOMANYREFS", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(PRELUDE_ERROR_ETOOMANYREFS))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; /*@SWIG:/usr/share/swig/1.3.40/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "PRELUDE_ERROR_ETXTBSY", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(PRELUDE_ERROR_ETXTBSY))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; /*@SWIG:/usr/share/swig/1.3.40/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "PRELUDE_ERROR_EUCLEAN", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(PRELUDE_ERROR_EUCLEAN))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; /*@SWIG:/usr/share/swig/1.3.40/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "PRELUDE_ERROR_EUNATCH", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(PRELUDE_ERROR_EUNATCH))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; /*@SWIG:/usr/share/swig/1.3.40/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "PRELUDE_ERROR_EUSERS", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(PRELUDE_ERROR_EUSERS))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; /*@SWIG:/usr/share/swig/1.3.40/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "PRELUDE_ERROR_EWOULDBLOCK", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(PRELUDE_ERROR_EWOULDBLOCK))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; /*@SWIG:/usr/share/swig/1.3.40/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "PRELUDE_ERROR_EXDEV", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(PRELUDE_ERROR_EXDEV))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; /*@SWIG:/usr/share/swig/1.3.40/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "PRELUDE_ERROR_EXFULL", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(PRELUDE_ERROR_EXFULL))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; ST(0) = &PL_sv_yes; XSRETURN(1); } libprelude-1.0.0/bindings/low-level/perl/Prelude.pm0000664000076400007640000000161411330532512017172 00000000000000# Copyright (C) 2005 PreludeIDS Technologies. All Rights Reserved. # Author: Nicolas Delon # # This file is part of the libpreludedb program. # # 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; see the file COPYING. If not, write to # the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. require XSLoader; XSLoader::load('Prelude'); libprelude-1.0.0/bindings/low-level/perl/libprelude_perl.i0000664000076400007640000001670111330537773020600 00000000000000/***** * * Copyright (C) 2003, 2004, 2005 PreludeIDS Technologies. All Rights Reserved. * Author: Nicolas Delon * * This file is part of the Prelude library. * * 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; see the file COPYING. If not, write to * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. * *****/ %module Prelude %{ void swig_perl_raise_error(int error) { char buf[1024]; snprintf(buf, sizeof(buf), "Prelude error - %s: %s", prelude_strsource(error), prelude_strerror(error)); croak(buf); } SV *swig_perl_string(prelude_string_t *string) { if ( string ) { return newSVpv(prelude_string_get_string(string), prelude_string_get_len(string)); } else { SvREFCNT_inc (& PL_sv_undef); return &PL_sv_undef; } } SV *swig_perl_data(idmef_data_t *data) { switch ( idmef_data_get_type(data) ) { case IDMEF_DATA_TYPE_CHAR: case IDMEF_DATA_TYPE_BYTE: return newSVpv((const char *)idmef_data_get_data(data), 1); case IDMEF_DATA_TYPE_CHAR_STRING: return newSVpv((const char *)idmef_data_get_data(data), idmef_data_get_len(data) - 1); case IDMEF_DATA_TYPE_BYTE_STRING: return newSVpv((const char *)idmef_data_get_data(data), idmef_data_get_len(data)); case IDMEF_DATA_TYPE_UINT32: return newSVpvf("%d", idmef_data_get_uint32(data)); case IDMEF_DATA_TYPE_UINT64: return newSVpvf("%" PRELUDE_PRIu64, idmef_data_get_uint64(data)); case IDMEF_DATA_TYPE_FLOAT: return newSVpvf("%hf", idmef_data_get_float(data)); default: SvREFCNT_inc (& PL_sv_undef); return &PL_sv_undef; } } %} /* This typemap is used to allow NULL pointers in _get_next_* functions */ %typemap(in) SWIGTYPE *LISTEDPARAM { if ( ! SvOK($input) ) { $1 = NULL; } else { if ( SWIG_ConvertPtr($input, (void **)&$1, $1_descriptor, 0) ) { croak("Expected type $1_type for argument $argnum."); return; } } } %typemap(in) char **argv { AV *tempav; I32 len; int i; SV **tv; if ( ! SvROK($input) ) croak("Argument $argnum is not a reference."); if ( SvTYPE(SvRV($input)) != SVt_PVAV ) croak("Argument $argnum is not an array."); tempav = (AV*) SvRV($input); len = av_len(tempav); $1 = (char **) malloc((len+2)*sizeof(char *)); if ( ! $1 ) croak("out of memory\n"); for (i = 0; i <= len; i++) { tv = av_fetch(tempav, i, 0); SvREFCNT_inc(*tv); $1[i] = (char *) SvPV_nolen(*tv); } $1[i] = NULL; }; %typemap(freearg) char **argv { free($1); }; /** * Prelude specific typemaps */ %typemap(in) (char *data, size_t len) { $1 = SvPV_nolen($input); $2 = SvCUR($input); }; %typemap(in) (const char *data, size_t len) { $1 = SvPV_nolen($input); $2 = SvCUR($input); }; %typemap(in) (unsigned char *data, size_t len) { $1 = (unsigned char *) SvPV_nolen($input); $2 = SvCUR($input); }; %typemap(in) (const unsigned char *data, size_t len) { $1 = (unsigned char *) SvPV_nolen($input); $2 = SvCUR($input); }; %typemap(in) (const void *data, size_t len) { $1 = SvPV_nolen($input); $2 = SvCUR($input); }; %typemap(in) (uint64_t *target_id, size_t size) { int i; AV *av; SV **sv; if ( ! (SvROK($input) && SvTYPE(SvRV($input)) == SVt_PVAV) ) croak("Argument $argnum is not an array."); av = (AV *) SvRV($input); $2 = av_len(av) + 1; /* av_len returns the highest index of the array NOT the len of the array */ $1 = malloc($2 * sizeof (uint64_t)); for ( i = 0; i < $2; i++ ) { sv = av_fetch(av, i, 0); $1[i] = strtoull(SvPV_nolen(*sv), NULL, 0); } }; %typemap(freearg) (uint64_t *target_id, size_t size) { free($1); }; %typemap(out) int { $result = newSViv($1); argvi++; }; %typemap(out) INTPOINTER * { if ( $1 != NULL ) { $result = newSViv(*$1); } else { SvREFCNT_inc (& PL_sv_undef); $result = &PL_sv_undef; } } %typemap(out) UINTPOINTER * { if ( $1 != NULL ) { $result = newSVuv(*$1); } else { SvREFCNT_inc (& PL_sv_undef); $result = &PL_sv_undef; } } %typemap(out) INT64POINTER * { if ( $1 != NULL ) { $result = newSViv(*$1); } else { SvREFCNT_inc (& PL_sv_undef); $result = &PL_sv_undef; } } %typemap(out) UINT64POINTER * { if ( $1 != NULL ) { $result = newSVuv(*$1); } else { SvREFCNT_inc (& PL_sv_undef); $result = &PL_sv_undef; } } %typemap(argout) (uint64_t *source_id, uint32_t *request_id, void **value) { int ret = SvIV($result); XPUSHs(sv_2mortal(newSVpvf("%" PRELUDE_PRIu64, *$1))); XPUSHs(sv_2mortal(newSVuv(*$2))); XPUSHs(sv_2mortal(newSViv(ret))); if ( *$3 ) { switch ( ret ) { case PRELUDE_OPTION_REPLY_TYPE_LIST: XPUSHs(sv_2mortal(SWIG_NewPointerObj((void *) * $3, SWIG_TypeQuery("prelude_option_t *"), 0))); break; default: XPUSHs(sv_2mortal(newSVpv(*$3, strlen(*$3)))); break; } } else { SvREFCNT_inc (& PL_sv_undef); XPUSHs(&PL_sv_undef); } }; %typemap(in) int *argc (int tmp) { tmp = SvIV($input); $1 = &tmp; }; %typemap(in) prelude_string_t * { int ret; char *str; STRLEN len; str = SvPV($input, len); ret = prelude_string_new_dup_fast(&($1), str, len); if ( ret < 0 ) { swig_perl_raise_error(ret); return; } }; %typemap(out) prelude_string_t * { $result = swig_perl_string($1); argvi++; }; %typemap(out) idmef_data_t * { $result = swig_perl_data($1); argvi++; }; %typemap(out) void * idmef_value_get_object { void *swig_type; swig_type = swig_idmef_value_get_descriptor(arg1); if ( ! swig_type ) { SvREFCNT_inc (& PL_sv_undef); $result = &PL_sv_undef; } else { $result = SWIG_NewPointerObj($1, swig_type, 0); } argvi++; }; %clear idmef_value_t **ret; %typemap(argout) idmef_value_t **ret { if ( ! SvROK($input) ) { croak("Argument $argnum is not a reference."); return; } if ( result == 0 ) { SvREFCNT_inc (& PL_sv_undef); $result = &PL_sv_undef; } else if ( result > 0 ) { SV *sv; sv = SvRV($input); sv_setsv(sv, SWIG_NewPointerObj((void *) * $1, $*1_descriptor, 0)); } }; %typemap(in, numinputs=0) prelude_string_t *out { int ret; ret = prelude_string_new(&($1)); if ( ret < 0 ) { swig_perl_raise_error(ret); return; } }; %typemap(argout) prelude_string_t *out { if ( result >= 0 ) { $result = newSVpv(prelude_string_get_string($1), prelude_string_get_len($1)); argvi++; } prelude_string_destroy($1); }; %typemap(in) prelude_msg_t **outmsg ($*1_type tmp) { tmp = NULL; $1 = ($1_ltype) &tmp; }; %typemap(in) prelude_connection_t **outconn ($*1_type tmp) { tmp = NULL; $1 = ($1_ltype) &tmp; }; %typemap(in) SWIGTYPE **OUTPARAM ($*1_type tmp) { $1 = ($1_ltype) &tmp; }; %typemap(argout) SWIGTYPE **OUTPARAM { SV *sv; if ( result >= 0 ) { if ( ! SvROK($input) ) { croak("Argument $argnum is not a reference."); return; } sv = SvRV($input); sv_setsv(sv, SWIG_NewPointerObj((void *) * $1, $*1_descriptor, 0)); } }; %typemap(in) SWIGTYPE *INPARAM { if ( ! SvROK($input) ) { croak("Argument $argnum is null."); return; } if ( SWIG_ConvertPtr($input, (void **)&arg$argnum, $1_descriptor, 0) ) { croak("Expected type $1_type for argument $argnum."); return; } } libprelude-1.0.0/bindings/low-level/perl/Makefile.PL.in0000664000076400007640000000300611330563535017621 00000000000000use Config; use ExtUtils::MakeMaker; use ExtUtils::MM_Unix; use File::Copy; use Cwd "abs_path"; my %attributs = (NAME => 'Prelude', INC => '-I@top_srcdir@ -I@top_builddir@/src/include -I@top_srcdir@/src/include -I@top_builddir@/src/libprelude-error', LIBS => ["-L@top_builddir@/src/.libs -lprelude", "-L$ENV{LIBDIR} -lprelude @LIBPRELUDE_LIBS@ @LIBADD_DL@ @LTLIBTHREAD@" ], LDDLFLAGS => "-L@top_builddir@/src/.libs $Config{lddlflags}"); if ( abs_path("@top_srcdir@") ne abs_path("@top_builddir@") ) { foreach my $filename ( qw/Prelude.c Prelude.pm/ ) { my $src = "@top_srcdir@/bindings/low-level/perl/$filename"; my $dst = "@top_builddir@/bindings/low-level/perl/$filename"; copy($src, $dst) if ( ! -e $dst ); } $attributs{"clean"} = {FILES => join(" ", map { "@top_builddir@/bindings/low-level/perl/$_" } qw/Prelude.c Prelude.pm Makefile/)}; } if ( -w $Config{"sitelib"} ) { $attributs{"INSTALLDIRS"} = "site"; } else { $attributs{"PREFIX"} = "@prefix@"; } WriteMakefile(%attributs); my($atime, $mtime) = (stat "Makefile.PL")[8,9]; utime($atime + 1, $mtime + 1, "Makefile"); package MY; sub install { my $str = shift->SUPER::install(@_); my @files = ((map { "\$(INSTALLSITEARCH)/$_" } qw/perllocal.pod Prelude.pm/), (map { "\$(INSTALLSITEARCH)/auto/Prelude/$_" } qw/Prelude.bs Prelude.so .packlist/), '$(INSTALLMAN3DIR)/Prelude.$(MAN3EXT)'); $str =~ s/(uninstall_from_sitedirs.+)\n.+\n/"$1\n\t\$(RM_F) " . join(" ", @files) . "\n"/e; return $str; } libprelude-1.0.0/bindings/low-level/python/0000775000076400007640000000000011347714754015713 500000000000000libprelude-1.0.0/bindings/low-level/python/libprelude-python.i0000664000076400007640000002542511202225026021436 00000000000000/***** * * Copyright (C) 2003, 2004, 2005 PreludeIDS Technologies. All Rights Reserved. * Author: Nicolas Delon * * This file is part of the Prelude library. * * 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; see the file COPYING. If not, write to * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. * *****/ %{ void swig_python_raise_exception(int error) { PyObject *module; PyObject *exception_class; PyObject *exception; module = PyImport_ImportModule("prelude"); exception_class = PyObject_GetAttrString(module, "PreludeError"); exception = PyObject_CallFunction(exception_class, "i", error); if ( exception ) { PyErr_SetObject(exception_class, exception); Py_DECREF(exception); } Py_DECREF(module); Py_DECREF(exception_class); } PyObject *swig_python_string(prelude_string_t *string) { if ( string ) return PyString_FromStringAndSize(prelude_string_get_string(string), prelude_string_get_len(string)); else { Py_INCREF(Py_None); return Py_None; } } PyObject *swig_python_data(idmef_data_t *data) { switch ( idmef_data_get_type(data) ) { case IDMEF_DATA_TYPE_CHAR: case IDMEF_DATA_TYPE_BYTE: return PyString_FromStringAndSize((const char *)idmef_data_get_data(data), 1); case IDMEF_DATA_TYPE_CHAR_STRING: return PyString_FromStringAndSize((const char *)idmef_data_get_data(data), idmef_data_get_len(data) - 1); case IDMEF_DATA_TYPE_BYTE_STRING: return PyString_FromStringAndSize((const char *)idmef_data_get_data(data), idmef_data_get_len(data)); case IDMEF_DATA_TYPE_UINT32: return PyLong_FromLongLong(idmef_data_get_uint32(data)); case IDMEF_DATA_TYPE_UINT64: return PyLong_FromUnsignedLongLong(idmef_data_get_uint64(data)); case IDMEF_DATA_TYPE_FLOAT: return PyFloat_FromDouble((double) idmef_data_get_float(data)); default: Py_INCREF(Py_None); return Py_None; } } %} /** * Some generic type typemaps */ %typemap(out) uint32_t { $result = PyLong_FromUnsignedLong($1); }; %typemap(out) INTPOINTER * { if ($1 != NULL) { $result = PyLong_FromLong(*$1); } else { $result = Py_None; } }; %typemap(out) UINTPOINTER * { if ($1 != NULL) { $result = PyLong_FromUnsignedLong(*$1); } else { $result = Py_None; } }; %typemap(out) INT64POINTER * { if ($1 != NULL) { $result = PyLong_FromLongLong(*$1); } else { $result = Py_None; } }; %typemap(out) UINT64POINTER * { if ($1 != NULL) { $result = PyLong_FromUnsignedLongLong(*$1); } else { $result = Py_None; } }; /* This typemap is used to allow NULL pointers in _get_next_* functions */ %typemap(in) SWIGTYPE *LISTEDPARAM { if ( $input == Py_None ) { $1 = NULL; } else { if ( SWIG_ConvertPtr($input, (void **)&$1, $1_descriptor, SWIG_POINTER_EXCEPTION|0) ) return NULL; } }; %typemap(in) const char * { if ( $input == Py_None ) $1 = NULL; else if ( PyString_Check($input) ) $1 = PyString_AsString($input); else { PyErr_Format(PyExc_TypeError, "expected None or string, %s found", $input->ob_type->tp_name); return NULL; } }; %typemap(freearg) const char * ""; %typemap(in) const unsigned char * { if ( PyString_Check($input) ) $1 = (unsigned char *) PyString_AsString($input); else { PyErr_Format(PyExc_TypeError, "expected string, %s found", $input->ob_type->tp_name); return NULL; } }; %typemap(out) unsigned char *idmef_data_get_byte_string { if ( $1 ) $result = PyString_FromStringAndSize((char *) $1, idmef_data_get_len(arg1)); else $result = Py_BuildValue((char *) ""); }; %typemap(in) char **argv { /* Check if is a list */ if ( PyList_Check($input) ) { int size = PyList_Size($input); int i = 0; $1 = (char **) malloc((size+1) * sizeof(char *)); for ( i = 0; i < size; i++ ) { PyObject *o = PyList_GetItem($input,i); if ( PyString_Check(o) ) $1[i] = PyString_AsString(PyList_GetItem($input, i)); else { PyErr_SetString(PyExc_TypeError, "list must contain strings"); free($1); return NULL; } } $1[i] = 0; } else { PyErr_SetString(PyExc_TypeError, "not a list"); return NULL; } }; %typemap(freearg) char **argv { free($1); }; /** * Prelude specific typemaps */ %exception { Py_BEGIN_ALLOW_THREADS $function Py_END_ALLOW_THREADS } %typemap(in) (char *data, size_t len) { if ( ! PyString_Check($input) ) { PyErr_SetString(PyExc_ValueError, "Expected a string"); return NULL; } $1 = PyString_AsString($input); $2 = PyString_Size($input); }; %typemap(in) (const char *data, size_t len) { if ( ! PyString_Check($input) ) { PyErr_SetString(PyExc_ValueError, "Expected a string"); return NULL; } $1 = PyString_AsString($input); $2 = PyString_Size($input); }; %typemap(in) (unsigned char *data, size_t len) { if ( ! PyString_Check($input) ) { PyErr_SetString(PyExc_ValueError, "Expected a string"); return NULL; } $1 = (unsigned char *) PyString_AsString($input); $2 = PyString_Size($input); }; %typemap(in) (const unsigned char *data, size_t len) { if ( ! PyString_Check($input) ) { PyErr_SetString(PyExc_ValueError, "Expected a string"); return NULL; } $1 = (unsigned char *) PyString_AsString($input); $2 = PyString_Size($input); }; %typemap(in) (const void *data, size_t len) { if ( ! PyString_Check($input) ) { PyErr_SetString(PyExc_ValueError, "Expected a string"); return NULL; } $1 = PyString_AsString($input); $2 = PyString_Size($input); }; %typemap(in) (uint64_t *target_id, size_t size) { int i; $2 = PyList_Size($input); $1 = malloc($2 * sizeof(uint64_t)); for ( i = 0; i < $2; i++ ) { PyObject *o = PyList_GetItem($input, i); if ( PyInt_Check(o) ) $1[i] = (unsigned long) PyInt_AsLong(o); else $1[i] = PyLong_AsUnsignedLongLong(o); } }; %typemap(freearg) (uint64_t *target_id, size_t size) { free($1); }; %typemap(out) FUNC_NO_ERROR { $result = PyInt_FromLong($1); }; %typemap(out) int { if ( $1 < 0 ) { swig_python_raise_exception($1); $result = NULL; } else { $result = PyInt_FromLong($1); } }; %typemap(out) int32_t { $result = PyInt_FromLong($1); }; %typemap(in) const time_t * (time_t tmp) { if ( PyInt_Check($input) ) tmp = (time_t) PyInt_AsLong($input); else if ( PyLong_Check($input) ) tmp = (time_t) PyLong_AsUnsignedLong($input); else { PyErr_Format(PyExc_TypeError, "expected int or long, %s found", $input->ob_type->tp_name); return NULL; } $1 = &tmp; }; %typemap(argout) (uint64_t *source_id, uint32_t *request_id, void **value) { int ret = PyInt_AsLong($result); PyObject *tuple = PyTuple_New(4); PyObject *value_obj = Py_None; PyTuple_SetItem(tuple, 0, PyLong_FromUnsignedLongLong(*$1)); PyTuple_SetItem(tuple, 1, PyLong_FromUnsignedLong(*$2)); PyTuple_SetItem(tuple, 2, PyInt_FromLong(ret)); if ( *$3 ) { switch ( ret ) { case PRELUDE_OPTION_REPLY_TYPE_LIST: value_obj = SWIG_NewPointerObj((void *) * $3, SWIG_TypeQuery("prelude_option_t *"), 0); break; default: value_obj = PyString_FromString(* $3); break; } } else { value_obj = Py_None; Py_INCREF(Py_None); } PyTuple_SetItem(tuple, 3, value_obj); $result = tuple; }; %typemap(in) int *argc (int tmp) { tmp = PyInt_AsLong($input); $1 = &tmp; }; %typemap(in) prelude_string_t * { int ret; ret = prelude_string_new_dup_fast(&($1), PyString_AsString($input), PyString_Size($input)); if ( ret < 0 ) { swig_python_raise_exception(ret); return NULL; } }; %typemap(out) prelude_string_t * { $result = swig_python_string($1); }; %typemap(out) idmef_data_t * { $result = swig_python_data($1); }; %typemap(out) void * idmef_value_get_object { void *swig_type; swig_type = swig_idmef_value_get_descriptor(arg1); if ( ! swig_type ) { $result = Py_None; Py_INCREF(Py_None); } else { $result = SWIG_NewPointerObj($1, swig_type, 0); } }; %clear idmef_value_t **ret; %typemap(argout) idmef_value_t **ret { if ( PyInt_AsLong($result) == 0 ) { $result = Py_None; Py_INCREF(Py_None); } else if ( PyInt_AsLong($result) > 0 ) { $result = SWIG_NewPointerObj((void *) * $1, $*1_descriptor, 0); } }; %typemap(in, numinputs=0) prelude_string_t *out { int ret; ret = prelude_string_new(&($1)); if ( ret < 0 ) { swig_python_raise_exception(ret); return NULL; } }; %typemap(argout) prelude_string_t *out { if ( result >= 0 ) $result = PyString_FromStringAndSize(prelude_string_get_string($1), prelude_string_get_len($1)); prelude_string_destroy($1); }; %typemap(in, numinputs=0) prelude_msg_t **outmsg ($*1_type tmp) { tmp = NULL; $1 = ($1_ltype) &tmp; }; %typemap(in, numinputs=0) prelude_connection_t **outconn ($*1_type tmp) { tmp = NULL; $1 = ($1_ltype) &tmp; }; %typemap(in, numinputs=0) SWIGTYPE **OUTPARAM ($*1_type tmp) { $1 = ($1_ltype) &tmp; }; %typemap(argout) SWIGTYPE **OUTPARAM { if ( result >= 0 ) $result = SWIG_NewPointerObj((void *) * $1, $*1_descriptor, 0); }; %typemap(in) SWIGTYPE *INPARAM { if ( $input == Py_None ) return NULL; if ( SWIG_ConvertPtr($input, (void **)&arg$argnum, $1_descriptor, SWIG_POINTER_EXCEPTION|0) ) return NULL; } /* * */ %apply FUNC_NO_ERROR { int idmef_additional_data_compare, int idmef_reference_compare, int idmef_classification_compare, int idmef_user_id_compare, int idmef_user_compare, int idmef_address_compare, int idmef_process_compare, int idmef_web_service_compare, int idmef_snmp_service_compare, int idmef_service_compare, int idmef_node_compare, int idmef_source_compare, int idmef_file_access_compare, int idmef_inode_compare, int idmef_linkage_compare, int idmef_checksum_compare, int idmef_file_compare, int idmef_target_compare, int idmef_analyzer_compare, int idmef_alertident_compare, int idmef_impact_compare, int idmef_action_compare, int idmef_confidence_compare, int idmef_assessment_compare, int idmef_tool_alert_compare, int idmef_correlation_alert_compare, int idmef_overflow_alert_compare, int idmef_alert_compare, int idmef_heartbeat_compare, int idmef_message_compare, int prelude_string_compare, int idmef_data_compare, int idmef_time_compare, int idmef_path_compare, int idmef_path_ncompare }; %pythoncode %{ class PreludeError(Exception): def __init__(self, errno, strerror=None): self.errno = errno self._strerror = strerror def __str__(self): if self._strerror: return self._strerror return prelude_strerror(self.errno) %} libprelude-1.0.0/bindings/low-level/python/Makefile.am0000664000076400007640000000134711202312107017644 00000000000000if HAVE_PYTHON EXTRA_DIST = libprelude-python.i prelude.py _prelude.c all-am: python-build python-build: _prelude.c CC="$(BINDINGS_CC)" $(PYTHON) setup.py build install-exec-hook: $(PYTHON) setup.py install `test -n "$(DESTDIR)" && echo --root $(DESTDIR)` uninstall-hook: $(PYTHON) setup.py uninstall `test -n "$(DESTDIR)" && echo --root $(DESTDIR)` clean-local: $(PYTHON) setup.py clean -a _prelude.c: $(top_srcdir)/bindings/low-level/libprelude.i libprelude-python.i if HAVE_SWIG $(SWIG) -I$(top_srcdir)/bindings -I$(top_srcdir)/src/include -I$(top_srcdir)/src/libprelude-error -o $@ -python -noproxy -interface _prelude -module _prelude $(top_srcdir)/bindings/low-level/libprelude.i endif endif -include $(top_srcdir)/git.mk libprelude-1.0.0/bindings/low-level/python/_prelude.c0000664000076400007640000676647011330540215017605 00000000000000/* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). * Version 1.3.40 * * This file is not intended to be easily readable and contains a number of * coding conventions designed to improve portability and efficiency. Do not make * changes to this file unless you know what you are doing--modify the SWIG * interface file instead. * ----------------------------------------------------------------------------- */ #define SWIGPYTHON #define SWIG_PYTHON_DIRECTOR_NO_VTABLE /* ----------------------------------------------------------------------------- * This section contains generic SWIG labels for method/variable * declarations/attributes, and other compiler dependent labels. * ----------------------------------------------------------------------------- */ /* template workaround for compilers that cannot correctly implement the C++ standard */ #ifndef SWIGTEMPLATEDISAMBIGUATOR # if defined(__SUNPRO_CC) && (__SUNPRO_CC <= 0x560) # define SWIGTEMPLATEDISAMBIGUATOR template # elif defined(__HP_aCC) /* Needed even with `aCC -AA' when `aCC -V' reports HP ANSI C++ B3910B A.03.55 */ /* If we find a maximum version that requires this, the test would be __HP_aCC <= 35500 for A.03.55 */ # define SWIGTEMPLATEDISAMBIGUATOR template # else # define SWIGTEMPLATEDISAMBIGUATOR # endif #endif /* inline attribute */ #ifndef SWIGINLINE # if defined(__cplusplus) || (defined(__GNUC__) && !defined(__STRICT_ANSI__)) # define SWIGINLINE inline # else # define SWIGINLINE # endif #endif /* attribute recognised by some compilers to avoid 'unused' warnings */ #ifndef SWIGUNUSED # if defined(__GNUC__) # if !(defined(__cplusplus)) || (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4)) # define SWIGUNUSED __attribute__ ((__unused__)) # else # define SWIGUNUSED # endif # elif defined(__ICC) # define SWIGUNUSED __attribute__ ((__unused__)) # else # define SWIGUNUSED # endif #endif #ifndef SWIG_MSC_UNSUPPRESS_4505 # if defined(_MSC_VER) # pragma warning(disable : 4505) /* unreferenced local function has been removed */ # endif #endif #ifndef SWIGUNUSEDPARM # ifdef __cplusplus # define SWIGUNUSEDPARM(p) # else # define SWIGUNUSEDPARM(p) p SWIGUNUSED # endif #endif /* internal SWIG method */ #ifndef SWIGINTERN # define SWIGINTERN static SWIGUNUSED #endif /* internal inline SWIG method */ #ifndef SWIGINTERNINLINE # define SWIGINTERNINLINE SWIGINTERN SWIGINLINE #endif /* exporting methods */ #if (__GNUC__ >= 4) || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4) # ifndef GCC_HASCLASSVISIBILITY # define GCC_HASCLASSVISIBILITY # endif #endif #ifndef SWIGEXPORT # if defined(_WIN32) || defined(__WIN32__) || defined(__CYGWIN__) # if defined(STATIC_LINKED) # define SWIGEXPORT # else # define SWIGEXPORT __declspec(dllexport) # endif # else # if defined(__GNUC__) && defined(GCC_HASCLASSVISIBILITY) # define SWIGEXPORT __attribute__ ((visibility("default"))) # else # define SWIGEXPORT # endif # endif #endif /* calling conventions for Windows */ #ifndef SWIGSTDCALL # if defined(_WIN32) || defined(__WIN32__) || defined(__CYGWIN__) # define SWIGSTDCALL __stdcall # else # define SWIGSTDCALL # endif #endif /* Deal with Microsoft's attempt at deprecating C standard runtime functions */ #if !defined(SWIG_NO_CRT_SECURE_NO_DEPRECATE) && defined(_MSC_VER) && !defined(_CRT_SECURE_NO_DEPRECATE) # define _CRT_SECURE_NO_DEPRECATE #endif /* Deal with Microsoft's attempt at deprecating methods in the standard C++ library */ #if !defined(SWIG_NO_SCL_SECURE_NO_DEPRECATE) && defined(_MSC_VER) && !defined(_SCL_SECURE_NO_DEPRECATE) # define _SCL_SECURE_NO_DEPRECATE #endif /* Python.h has to appear first */ #include /* ----------------------------------------------------------------------------- * swigrun.swg * * This file contains generic C API SWIG runtime support for pointer * type checking. * ----------------------------------------------------------------------------- */ /* This should only be incremented when either the layout of swig_type_info changes, or for whatever reason, the runtime changes incompatibly */ #define SWIG_RUNTIME_VERSION "4" /* define SWIG_TYPE_TABLE_NAME as "SWIG_TYPE_TABLE" */ #ifdef SWIG_TYPE_TABLE # define SWIG_QUOTE_STRING(x) #x # define SWIG_EXPAND_AND_QUOTE_STRING(x) SWIG_QUOTE_STRING(x) # define SWIG_TYPE_TABLE_NAME SWIG_EXPAND_AND_QUOTE_STRING(SWIG_TYPE_TABLE) #else # define SWIG_TYPE_TABLE_NAME #endif /* You can use the SWIGRUNTIME and SWIGRUNTIMEINLINE macros for creating a static or dynamic library from the SWIG runtime code. In 99.9% of the cases, SWIG just needs to declare them as 'static'. But only do this if strictly necessary, ie, if you have problems with your compiler or suchlike. */ #ifndef SWIGRUNTIME # define SWIGRUNTIME SWIGINTERN #endif #ifndef SWIGRUNTIMEINLINE # define SWIGRUNTIMEINLINE SWIGRUNTIME SWIGINLINE #endif /* Generic buffer size */ #ifndef SWIG_BUFFER_SIZE # define SWIG_BUFFER_SIZE 1024 #endif /* Flags for pointer conversions */ #define SWIG_POINTER_DISOWN 0x1 #define SWIG_CAST_NEW_MEMORY 0x2 /* Flags for new pointer objects */ #define SWIG_POINTER_OWN 0x1 /* Flags/methods for returning states. The SWIG conversion methods, as ConvertPtr, return and integer that tells if the conversion was successful or not. And if not, an error code can be returned (see swigerrors.swg for the codes). Use the following macros/flags to set or process the returning states. In old versions of SWIG, code such as the following was usually written: if (SWIG_ConvertPtr(obj,vptr,ty.flags) != -1) { // success code } else { //fail code } Now you can be more explicit: int res = SWIG_ConvertPtr(obj,vptr,ty.flags); if (SWIG_IsOK(res)) { // success code } else { // fail code } which is the same really, but now you can also do Type *ptr; int res = SWIG_ConvertPtr(obj,(void **)(&ptr),ty.flags); if (SWIG_IsOK(res)) { // success code if (SWIG_IsNewObj(res) { ... delete *ptr; } else { ... } } else { // fail code } I.e., now SWIG_ConvertPtr can return new objects and you can identify the case and take care of the deallocation. Of course that also requires SWIG_ConvertPtr to return new result values, such as int SWIG_ConvertPtr(obj, ptr,...) { if () { if () { *ptr = ; return SWIG_NEWOBJ; } else { *ptr = ; return SWIG_OLDOBJ; } } else { return SWIG_BADOBJ; } } Of course, returning the plain '0(success)/-1(fail)' still works, but you can be more explicit by returning SWIG_BADOBJ, SWIG_ERROR or any of the SWIG errors code. Finally, if the SWIG_CASTRANK_MODE is enabled, the result code allows to return the 'cast rank', for example, if you have this int food(double) int fooi(int); and you call food(1) // cast rank '1' (1 -> 1.0) fooi(1) // cast rank '0' just use the SWIG_AddCast()/SWIG_CheckState() */ #define SWIG_OK (0) #define SWIG_ERROR (-1) #define SWIG_IsOK(r) (r >= 0) #define SWIG_ArgError(r) ((r != SWIG_ERROR) ? r : SWIG_TypeError) /* The CastRankLimit says how many bits are used for the cast rank */ #define SWIG_CASTRANKLIMIT (1 << 8) /* The NewMask denotes the object was created (using new/malloc) */ #define SWIG_NEWOBJMASK (SWIG_CASTRANKLIMIT << 1) /* The TmpMask is for in/out typemaps that use temporal objects */ #define SWIG_TMPOBJMASK (SWIG_NEWOBJMASK << 1) /* Simple returning values */ #define SWIG_BADOBJ (SWIG_ERROR) #define SWIG_OLDOBJ (SWIG_OK) #define SWIG_NEWOBJ (SWIG_OK | SWIG_NEWOBJMASK) #define SWIG_TMPOBJ (SWIG_OK | SWIG_TMPOBJMASK) /* Check, add and del mask methods */ #define SWIG_AddNewMask(r) (SWIG_IsOK(r) ? (r | SWIG_NEWOBJMASK) : r) #define SWIG_DelNewMask(r) (SWIG_IsOK(r) ? (r & ~SWIG_NEWOBJMASK) : r) #define SWIG_IsNewObj(r) (SWIG_IsOK(r) && (r & SWIG_NEWOBJMASK)) #define SWIG_AddTmpMask(r) (SWIG_IsOK(r) ? (r | SWIG_TMPOBJMASK) : r) #define SWIG_DelTmpMask(r) (SWIG_IsOK(r) ? (r & ~SWIG_TMPOBJMASK) : r) #define SWIG_IsTmpObj(r) (SWIG_IsOK(r) && (r & SWIG_TMPOBJMASK)) /* Cast-Rank Mode */ #if defined(SWIG_CASTRANK_MODE) # ifndef SWIG_TypeRank # define SWIG_TypeRank unsigned long # endif # ifndef SWIG_MAXCASTRANK /* Default cast allowed */ # define SWIG_MAXCASTRANK (2) # endif # define SWIG_CASTRANKMASK ((SWIG_CASTRANKLIMIT) -1) # define SWIG_CastRank(r) (r & SWIG_CASTRANKMASK) SWIGINTERNINLINE int SWIG_AddCast(int r) { return SWIG_IsOK(r) ? ((SWIG_CastRank(r) < SWIG_MAXCASTRANK) ? (r + 1) : SWIG_ERROR) : r; } SWIGINTERNINLINE int SWIG_CheckState(int r) { return SWIG_IsOK(r) ? SWIG_CastRank(r) + 1 : 0; } #else /* no cast-rank mode */ # define SWIG_AddCast # define SWIG_CheckState(r) (SWIG_IsOK(r) ? 1 : 0) #endif #include #ifdef __cplusplus extern "C" { #endif typedef void *(*swig_converter_func)(void *, int *); typedef struct swig_type_info *(*swig_dycast_func)(void **); /* Structure to store information on one type */ typedef struct swig_type_info { const char *name; /* mangled name of this type */ const char *str; /* human readable name of this type */ swig_dycast_func dcast; /* dynamic cast function down a hierarchy */ struct swig_cast_info *cast; /* linked list of types that can cast into this type */ void *clientdata; /* language specific type data */ int owndata; /* flag if the structure owns the clientdata */ } swig_type_info; /* Structure to store a type and conversion function used for casting */ typedef struct swig_cast_info { swig_type_info *type; /* pointer to type that is equivalent to this type */ swig_converter_func converter; /* function to cast the void pointers */ struct swig_cast_info *next; /* pointer to next cast in linked list */ struct swig_cast_info *prev; /* pointer to the previous cast */ } swig_cast_info; /* Structure used to store module information * Each module generates one structure like this, and the runtime collects * all of these structures and stores them in a circularly linked list.*/ typedef struct swig_module_info { swig_type_info **types; /* Array of pointers to swig_type_info structures that are in this module */ size_t size; /* Number of types in this module */ struct swig_module_info *next; /* Pointer to next element in circularly linked list */ swig_type_info **type_initial; /* Array of initially generated type structures */ swig_cast_info **cast_initial; /* Array of initially generated casting structures */ void *clientdata; /* Language specific module data */ } swig_module_info; /* Compare two type names skipping the space characters, therefore "char*" == "char *" and "Class" == "Class", etc. Return 0 when the two name types are equivalent, as in strncmp, but skipping ' '. */ SWIGRUNTIME int SWIG_TypeNameComp(const char *f1, const char *l1, const char *f2, const char *l2) { for (;(f1 != l1) && (f2 != l2); ++f1, ++f2) { while ((*f1 == ' ') && (f1 != l1)) ++f1; while ((*f2 == ' ') && (f2 != l2)) ++f2; if (*f1 != *f2) return (*f1 > *f2) ? 1 : -1; } return (int)((l1 - f1) - (l2 - f2)); } /* Check type equivalence in a name list like ||... Return 0 if not equal, 1 if equal */ SWIGRUNTIME int SWIG_TypeEquiv(const char *nb, const char *tb) { int equiv = 0; const char* te = tb + strlen(tb); const char* ne = nb; while (!equiv && *ne) { for (nb = ne; *ne; ++ne) { if (*ne == '|') break; } equiv = (SWIG_TypeNameComp(nb, ne, tb, te) == 0) ? 1 : 0; if (*ne) ++ne; } return equiv; } /* Check type equivalence in a name list like ||... Return 0 if equal, -1 if nb < tb, 1 if nb > tb */ SWIGRUNTIME int SWIG_TypeCompare(const char *nb, const char *tb) { int equiv = 0; const char* te = tb + strlen(tb); const char* ne = nb; while (!equiv && *ne) { for (nb = ne; *ne; ++ne) { if (*ne == '|') break; } equiv = (SWIG_TypeNameComp(nb, ne, tb, te) == 0) ? 1 : 0; if (*ne) ++ne; } return equiv; } /* Check the typename */ SWIGRUNTIME swig_cast_info * SWIG_TypeCheck(const char *c, swig_type_info *ty) { if (ty) { swig_cast_info *iter = ty->cast; while (iter) { if (strcmp(iter->type->name, c) == 0) { if (iter == ty->cast) return iter; /* Move iter to the top of the linked list */ iter->prev->next = iter->next; if (iter->next) iter->next->prev = iter->prev; iter->next = ty->cast; iter->prev = 0; if (ty->cast) ty->cast->prev = iter; ty->cast = iter; return iter; } iter = iter->next; } } return 0; } /* Identical to SWIG_TypeCheck, except strcmp is replaced with a pointer comparison */ SWIGRUNTIME swig_cast_info * SWIG_TypeCheckStruct(swig_type_info *from, swig_type_info *ty) { if (ty) { swig_cast_info *iter = ty->cast; while (iter) { if (iter->type == from) { if (iter == ty->cast) return iter; /* Move iter to the top of the linked list */ iter->prev->next = iter->next; if (iter->next) iter->next->prev = iter->prev; iter->next = ty->cast; iter->prev = 0; if (ty->cast) ty->cast->prev = iter; ty->cast = iter; return iter; } iter = iter->next; } } return 0; } /* Cast a pointer up an inheritance hierarchy */ SWIGRUNTIMEINLINE void * SWIG_TypeCast(swig_cast_info *ty, void *ptr, int *newmemory) { return ((!ty) || (!ty->converter)) ? ptr : (*ty->converter)(ptr, newmemory); } /* Dynamic pointer casting. Down an inheritance hierarchy */ SWIGRUNTIME swig_type_info * SWIG_TypeDynamicCast(swig_type_info *ty, void **ptr) { swig_type_info *lastty = ty; if (!ty || !ty->dcast) return ty; while (ty && (ty->dcast)) { ty = (*ty->dcast)(ptr); if (ty) lastty = ty; } return lastty; } /* Return the name associated with this type */ SWIGRUNTIMEINLINE const char * SWIG_TypeName(const swig_type_info *ty) { return ty->name; } /* Return the pretty name associated with this type, that is an unmangled type name in a form presentable to the user. */ SWIGRUNTIME const char * SWIG_TypePrettyName(const swig_type_info *type) { /* The "str" field contains the equivalent pretty names of the type, separated by vertical-bar characters. We choose to print the last name, as it is often (?) the most specific. */ if (!type) return NULL; if (type->str != NULL) { const char *last_name = type->str; const char *s; for (s = type->str; *s; s++) if (*s == '|') last_name = s+1; return last_name; } else return type->name; } /* Set the clientdata field for a type */ SWIGRUNTIME void SWIG_TypeClientData(swig_type_info *ti, void *clientdata) { swig_cast_info *cast = ti->cast; /* if (ti->clientdata == clientdata) return; */ ti->clientdata = clientdata; while (cast) { if (!cast->converter) { swig_type_info *tc = cast->type; if (!tc->clientdata) { SWIG_TypeClientData(tc, clientdata); } } cast = cast->next; } } SWIGRUNTIME void SWIG_TypeNewClientData(swig_type_info *ti, void *clientdata) { SWIG_TypeClientData(ti, clientdata); ti->owndata = 1; } /* Search for a swig_type_info structure only by mangled name Search is a O(log #types) We start searching at module start, and finish searching when start == end. Note: if start == end at the beginning of the function, we go all the way around the circular list. */ SWIGRUNTIME swig_type_info * SWIG_MangledTypeQueryModule(swig_module_info *start, swig_module_info *end, const char *name) { swig_module_info *iter = start; do { if (iter->size) { register size_t l = 0; register size_t r = iter->size - 1; do { /* since l+r >= 0, we can (>> 1) instead (/ 2) */ register size_t i = (l + r) >> 1; const char *iname = iter->types[i]->name; if (iname) { register int compare = strcmp(name, iname); if (compare == 0) { return iter->types[i]; } else if (compare < 0) { if (i) { r = i - 1; } else { break; } } else if (compare > 0) { l = i + 1; } } else { break; /* should never happen */ } } while (l <= r); } iter = iter->next; } while (iter != end); return 0; } /* Search for a swig_type_info structure for either a mangled name or a human readable name. It first searches the mangled names of the types, which is a O(log #types) If a type is not found it then searches the human readable names, which is O(#types). We start searching at module start, and finish searching when start == end. Note: if start == end at the beginning of the function, we go all the way around the circular list. */ SWIGRUNTIME swig_type_info * SWIG_TypeQueryModule(swig_module_info *start, swig_module_info *end, const char *name) { /* STEP 1: Search the name field using binary search */ swig_type_info *ret = SWIG_MangledTypeQueryModule(start, end, name); if (ret) { return ret; } else { /* STEP 2: If the type hasn't been found, do a complete search of the str field (the human readable name) */ swig_module_info *iter = start; do { register size_t i = 0; for (; i < iter->size; ++i) { if (iter->types[i]->str && (SWIG_TypeEquiv(iter->types[i]->str, name))) return iter->types[i]; } iter = iter->next; } while (iter != end); } /* neither found a match */ return 0; } /* Pack binary data into a string */ SWIGRUNTIME char * SWIG_PackData(char *c, void *ptr, size_t sz) { static const char hex[17] = "0123456789abcdef"; register const unsigned char *u = (unsigned char *) ptr; register const unsigned char *eu = u + sz; for (; u != eu; ++u) { register unsigned char uu = *u; *(c++) = hex[(uu & 0xf0) >> 4]; *(c++) = hex[uu & 0xf]; } return c; } /* Unpack binary data from a string */ SWIGRUNTIME const char * SWIG_UnpackData(const char *c, void *ptr, size_t sz) { register unsigned char *u = (unsigned char *) ptr; register const unsigned char *eu = u + sz; for (; u != eu; ++u) { register char d = *(c++); register unsigned char uu; if ((d >= '0') && (d <= '9')) uu = ((d - '0') << 4); else if ((d >= 'a') && (d <= 'f')) uu = ((d - ('a'-10)) << 4); else return (char *) 0; d = *(c++); if ((d >= '0') && (d <= '9')) uu |= (d - '0'); else if ((d >= 'a') && (d <= 'f')) uu |= (d - ('a'-10)); else return (char *) 0; *u = uu; } return c; } /* Pack 'void *' into a string buffer. */ SWIGRUNTIME char * SWIG_PackVoidPtr(char *buff, void *ptr, const char *name, size_t bsz) { char *r = buff; if ((2*sizeof(void *) + 2) > bsz) return 0; *(r++) = '_'; r = SWIG_PackData(r,&ptr,sizeof(void *)); if (strlen(name) + 1 > (bsz - (r - buff))) return 0; strcpy(r,name); return buff; } SWIGRUNTIME const char * SWIG_UnpackVoidPtr(const char *c, void **ptr, const char *name) { if (*c != '_') { if (strcmp(c,"NULL") == 0) { *ptr = (void *) 0; return name; } else { return 0; } } return SWIG_UnpackData(++c,ptr,sizeof(void *)); } SWIGRUNTIME char * SWIG_PackDataName(char *buff, void *ptr, size_t sz, const char *name, size_t bsz) { char *r = buff; size_t lname = (name ? strlen(name) : 0); if ((2*sz + 2 + lname) > bsz) return 0; *(r++) = '_'; r = SWIG_PackData(r,ptr,sz); if (lname) { strncpy(r,name,lname+1); } else { *r = 0; } return buff; } SWIGRUNTIME const char * SWIG_UnpackDataName(const char *c, void *ptr, size_t sz, const char *name) { if (*c != '_') { if (strcmp(c,"NULL") == 0) { memset(ptr,0,sz); return name; } else { return 0; } } return SWIG_UnpackData(++c,ptr,sz); } #ifdef __cplusplus } #endif /* Errors in SWIG */ #define SWIG_UnknownError -1 #define SWIG_IOError -2 #define SWIG_RuntimeError -3 #define SWIG_IndexError -4 #define SWIG_TypeError -5 #define SWIG_DivisionByZero -6 #define SWIG_OverflowError -7 #define SWIG_SyntaxError -8 #define SWIG_ValueError -9 #define SWIG_SystemError -10 #define SWIG_AttributeError -11 #define SWIG_MemoryError -12 #define SWIG_NullReferenceError -13 /* Compatibility macros for Python 3 */ #if PY_VERSION_HEX >= 0x03000000 #define PyClass_Check(obj) PyObject_IsInstance(obj, (PyObject *)&PyType_Type) #define PyInt_Check(x) PyLong_Check(x) #define PyInt_AsLong(x) PyLong_AsLong(x) #define PyInt_FromLong(x) PyLong_FromLong(x) #define PyString_Format(fmt, args) PyUnicode_Format(fmt, args) #endif #ifndef Py_TYPE # define Py_TYPE(op) ((op)->ob_type) #endif /* SWIG APIs for compatibility of both Python 2 & 3 */ #if PY_VERSION_HEX >= 0x03000000 # define SWIG_Python_str_FromFormat PyUnicode_FromFormat #else # define SWIG_Python_str_FromFormat PyString_FromFormat #endif /* Warning: This function will allocate a new string in Python 3, * so please call SWIG_Python_str_DelForPy3(x) to free the space. */ SWIGINTERN char* SWIG_Python_str_AsChar(PyObject *str) { #if PY_VERSION_HEX >= 0x03000000 char *cstr; char *newstr; Py_ssize_t len; str = PyUnicode_AsUTF8String(str); PyBytes_AsStringAndSize(str, &cstr, &len); newstr = (char *) malloc(len+1); memcpy(newstr, cstr, len+1); Py_XDECREF(str); return newstr; #else return PyString_AsString(str); #endif } #if PY_VERSION_HEX >= 0x03000000 # define SWIG_Python_str_DelForPy3(x) free( (void*) (x) ) #else # define SWIG_Python_str_DelForPy3(x) #endif SWIGINTERN PyObject* SWIG_Python_str_FromChar(const char *c) { #if PY_VERSION_HEX >= 0x03000000 return PyUnicode_FromString(c); #else return PyString_FromString(c); #endif } /* Add PyOS_snprintf for old Pythons */ #if PY_VERSION_HEX < 0x02020000 # if defined(_MSC_VER) || defined(__BORLANDC__) || defined(_WATCOM) # define PyOS_snprintf _snprintf # else # define PyOS_snprintf snprintf # endif #endif /* A crude PyString_FromFormat implementation for old Pythons */ #if PY_VERSION_HEX < 0x02020000 #ifndef SWIG_PYBUFFER_SIZE # define SWIG_PYBUFFER_SIZE 1024 #endif static PyObject * PyString_FromFormat(const char *fmt, ...) { va_list ap; char buf[SWIG_PYBUFFER_SIZE * 2]; int res; va_start(ap, fmt); res = vsnprintf(buf, sizeof(buf), fmt, ap); va_end(ap); return (res < 0 || res >= (int)sizeof(buf)) ? 0 : PyString_FromString(buf); } #endif /* Add PyObject_Del for old Pythons */ #if PY_VERSION_HEX < 0x01060000 # define PyObject_Del(op) PyMem_DEL((op)) #endif #ifndef PyObject_DEL # define PyObject_DEL PyObject_Del #endif /* A crude PyExc_StopIteration exception for old Pythons */ #if PY_VERSION_HEX < 0x02020000 # ifndef PyExc_StopIteration # define PyExc_StopIteration PyExc_RuntimeError # endif # ifndef PyObject_GenericGetAttr # define PyObject_GenericGetAttr 0 # endif #endif /* Py_NotImplemented is defined in 2.1 and up. */ #if PY_VERSION_HEX < 0x02010000 # ifndef Py_NotImplemented # define Py_NotImplemented PyExc_RuntimeError # endif #endif /* A crude PyString_AsStringAndSize implementation for old Pythons */ #if PY_VERSION_HEX < 0x02010000 # ifndef PyString_AsStringAndSize # define PyString_AsStringAndSize(obj, s, len) {*s = PyString_AsString(obj); *len = *s ? strlen(*s) : 0;} # endif #endif /* PySequence_Size for old Pythons */ #if PY_VERSION_HEX < 0x02000000 # ifndef PySequence_Size # define PySequence_Size PySequence_Length # endif #endif /* PyBool_FromLong for old Pythons */ #if PY_VERSION_HEX < 0x02030000 static PyObject *PyBool_FromLong(long ok) { PyObject *result = ok ? Py_True : Py_False; Py_INCREF(result); return result; } #endif /* Py_ssize_t for old Pythons */ /* This code is as recommended by: */ /* http://www.python.org/dev/peps/pep-0353/#conversion-guidelines */ #if PY_VERSION_HEX < 0x02050000 && !defined(PY_SSIZE_T_MIN) typedef int Py_ssize_t; # define PY_SSIZE_T_MAX INT_MAX # define PY_SSIZE_T_MIN INT_MIN #endif /* ----------------------------------------------------------------------------- * error manipulation * ----------------------------------------------------------------------------- */ SWIGRUNTIME PyObject* SWIG_Python_ErrorType(int code) { PyObject* type = 0; switch(code) { case SWIG_MemoryError: type = PyExc_MemoryError; break; case SWIG_IOError: type = PyExc_IOError; break; case SWIG_RuntimeError: type = PyExc_RuntimeError; break; case SWIG_IndexError: type = PyExc_IndexError; break; case SWIG_TypeError: type = PyExc_TypeError; break; case SWIG_DivisionByZero: type = PyExc_ZeroDivisionError; break; case SWIG_OverflowError: type = PyExc_OverflowError; break; case SWIG_SyntaxError: type = PyExc_SyntaxError; break; case SWIG_ValueError: type = PyExc_ValueError; break; case SWIG_SystemError: type = PyExc_SystemError; break; case SWIG_AttributeError: type = PyExc_AttributeError; break; default: type = PyExc_RuntimeError; } return type; } SWIGRUNTIME void SWIG_Python_AddErrorMsg(const char* mesg) { PyObject *type = 0; PyObject *value = 0; PyObject *traceback = 0; if (PyErr_Occurred()) PyErr_Fetch(&type, &value, &traceback); if (value) { char *tmp; PyObject *old_str = PyObject_Str(value); PyErr_Clear(); Py_XINCREF(type); PyErr_Format(type, "%s %s", tmp = SWIG_Python_str_AsChar(old_str), mesg); SWIG_Python_str_DelForPy3(tmp); Py_DECREF(old_str); Py_DECREF(value); } else { PyErr_SetString(PyExc_RuntimeError, mesg); } } #if defined(SWIG_PYTHON_NO_THREADS) # if defined(SWIG_PYTHON_THREADS) # undef SWIG_PYTHON_THREADS # endif #endif #if defined(SWIG_PYTHON_THREADS) /* Threading support is enabled */ # if !defined(SWIG_PYTHON_USE_GIL) && !defined(SWIG_PYTHON_NO_USE_GIL) # if (PY_VERSION_HEX >= 0x02030000) /* For 2.3 or later, use the PyGILState calls */ # define SWIG_PYTHON_USE_GIL # endif # endif # if defined(SWIG_PYTHON_USE_GIL) /* Use PyGILState threads calls */ # ifndef SWIG_PYTHON_INITIALIZE_THREADS # define SWIG_PYTHON_INITIALIZE_THREADS PyEval_InitThreads() # endif # ifdef __cplusplus /* C++ code */ class SWIG_Python_Thread_Block { bool status; PyGILState_STATE state; public: void end() { if (status) { PyGILState_Release(state); status = false;} } SWIG_Python_Thread_Block() : status(true), state(PyGILState_Ensure()) {} ~SWIG_Python_Thread_Block() { end(); } }; class SWIG_Python_Thread_Allow { bool status; PyThreadState *save; public: void end() { if (status) { PyEval_RestoreThread(save); status = false; }} SWIG_Python_Thread_Allow() : status(true), save(PyEval_SaveThread()) {} ~SWIG_Python_Thread_Allow() { end(); } }; # define SWIG_PYTHON_THREAD_BEGIN_BLOCK SWIG_Python_Thread_Block _swig_thread_block # define SWIG_PYTHON_THREAD_END_BLOCK _swig_thread_block.end() # define SWIG_PYTHON_THREAD_BEGIN_ALLOW SWIG_Python_Thread_Allow _swig_thread_allow # define SWIG_PYTHON_THREAD_END_ALLOW _swig_thread_allow.end() # else /* C code */ # define SWIG_PYTHON_THREAD_BEGIN_BLOCK PyGILState_STATE _swig_thread_block = PyGILState_Ensure() # define SWIG_PYTHON_THREAD_END_BLOCK PyGILState_Release(_swig_thread_block) # define SWIG_PYTHON_THREAD_BEGIN_ALLOW PyThreadState *_swig_thread_allow = PyEval_SaveThread() # define SWIG_PYTHON_THREAD_END_ALLOW PyEval_RestoreThread(_swig_thread_allow) # endif # else /* Old thread way, not implemented, user must provide it */ # if !defined(SWIG_PYTHON_INITIALIZE_THREADS) # define SWIG_PYTHON_INITIALIZE_THREADS # endif # if !defined(SWIG_PYTHON_THREAD_BEGIN_BLOCK) # define SWIG_PYTHON_THREAD_BEGIN_BLOCK # endif # if !defined(SWIG_PYTHON_THREAD_END_BLOCK) # define SWIG_PYTHON_THREAD_END_BLOCK # endif # if !defined(SWIG_PYTHON_THREAD_BEGIN_ALLOW) # define SWIG_PYTHON_THREAD_BEGIN_ALLOW # endif # if !defined(SWIG_PYTHON_THREAD_END_ALLOW) # define SWIG_PYTHON_THREAD_END_ALLOW # endif # endif #else /* No thread support */ # define SWIG_PYTHON_INITIALIZE_THREADS # define SWIG_PYTHON_THREAD_BEGIN_BLOCK # define SWIG_PYTHON_THREAD_END_BLOCK # define SWIG_PYTHON_THREAD_BEGIN_ALLOW # define SWIG_PYTHON_THREAD_END_ALLOW #endif /* ----------------------------------------------------------------------------- * Python API portion that goes into the runtime * ----------------------------------------------------------------------------- */ #ifdef __cplusplus extern "C" { #if 0 } /* cc-mode */ #endif #endif /* ----------------------------------------------------------------------------- * Constant declarations * ----------------------------------------------------------------------------- */ /* Constant Types */ #define SWIG_PY_POINTER 4 #define SWIG_PY_BINARY 5 /* Constant information structure */ typedef struct swig_const_info { int type; char *name; long lvalue; double dvalue; void *pvalue; swig_type_info **ptype; } swig_const_info; /* ----------------------------------------------------------------------------- * Wrapper of PyInstanceMethod_New() used in Python 3 * It is exported to the generated module, used for -fastproxy * ----------------------------------------------------------------------------- */ SWIGRUNTIME PyObject* SWIG_PyInstanceMethod_New(PyObject *self, PyObject *func) { #if PY_VERSION_HEX >= 0x03000000 return PyInstanceMethod_New(func); #else return NULL; #endif } #ifdef __cplusplus #if 0 { /* cc-mode */ #endif } #endif /* ----------------------------------------------------------------------------- * See the LICENSE file for information on copyright, usage and redistribution * of SWIG, and the README file for authors - http://www.swig.org/release.html. * * pyrun.swg * * This file contains the runtime support for Python modules * and includes code for managing global variables and pointer * type checking. * * ----------------------------------------------------------------------------- */ /* Common SWIG API */ /* for raw pointers */ #define SWIG_Python_ConvertPtr(obj, pptr, type, flags) SWIG_Python_ConvertPtrAndOwn(obj, pptr, type, flags, 0) #define SWIG_ConvertPtr(obj, pptr, type, flags) SWIG_Python_ConvertPtr(obj, pptr, type, flags) #define SWIG_ConvertPtrAndOwn(obj,pptr,type,flags,own) SWIG_Python_ConvertPtrAndOwn(obj, pptr, type, flags, own) #define SWIG_NewPointerObj(ptr, type, flags) SWIG_Python_NewPointerObj(ptr, type, flags) #define SWIG_CheckImplicit(ty) SWIG_Python_CheckImplicit(ty) #define SWIG_AcquirePtr(ptr, src) SWIG_Python_AcquirePtr(ptr, src) #define swig_owntype int /* for raw packed data */ #define SWIG_ConvertPacked(obj, ptr, sz, ty) SWIG_Python_ConvertPacked(obj, ptr, sz, ty) #define SWIG_NewPackedObj(ptr, sz, type) SWIG_Python_NewPackedObj(ptr, sz, type) /* for class or struct pointers */ #define SWIG_ConvertInstance(obj, pptr, type, flags) SWIG_ConvertPtr(obj, pptr, type, flags) #define SWIG_NewInstanceObj(ptr, type, flags) SWIG_NewPointerObj(ptr, type, flags) /* for C or C++ function pointers */ #define SWIG_ConvertFunctionPtr(obj, pptr, type) SWIG_Python_ConvertFunctionPtr(obj, pptr, type) #define SWIG_NewFunctionPtrObj(ptr, type) SWIG_Python_NewPointerObj(ptr, type, 0) /* for C++ member pointers, ie, member methods */ #define SWIG_ConvertMember(obj, ptr, sz, ty) SWIG_Python_ConvertPacked(obj, ptr, sz, ty) #define SWIG_NewMemberObj(ptr, sz, type) SWIG_Python_NewPackedObj(ptr, sz, type) /* Runtime API */ #define SWIG_GetModule(clientdata) SWIG_Python_GetModule() #define SWIG_SetModule(clientdata, pointer) SWIG_Python_SetModule(pointer) #define SWIG_NewClientData(obj) SwigPyClientData_New(obj) #define SWIG_SetErrorObj SWIG_Python_SetErrorObj #define SWIG_SetErrorMsg SWIG_Python_SetErrorMsg #define SWIG_ErrorType(code) SWIG_Python_ErrorType(code) #define SWIG_Error(code, msg) SWIG_Python_SetErrorMsg(SWIG_ErrorType(code), msg) #define SWIG_fail goto fail /* Runtime API implementation */ /* Error manipulation */ SWIGINTERN void SWIG_Python_SetErrorObj(PyObject *errtype, PyObject *obj) { SWIG_PYTHON_THREAD_BEGIN_BLOCK; PyErr_SetObject(errtype, obj); Py_DECREF(obj); SWIG_PYTHON_THREAD_END_BLOCK; } SWIGINTERN void SWIG_Python_SetErrorMsg(PyObject *errtype, const char *msg) { SWIG_PYTHON_THREAD_BEGIN_BLOCK; PyErr_SetString(errtype, (char *) msg); SWIG_PYTHON_THREAD_END_BLOCK; } #define SWIG_Python_Raise(obj, type, desc) SWIG_Python_SetErrorObj(SWIG_Python_ExceptionType(desc), obj) /* Set a constant value */ SWIGINTERN void SWIG_Python_SetConstant(PyObject *d, const char *name, PyObject *obj) { PyDict_SetItemString(d, (char*) name, obj); Py_DECREF(obj); } /* Append a value to the result obj */ SWIGINTERN PyObject* SWIG_Python_AppendOutput(PyObject* result, PyObject* obj) { #if !defined(SWIG_PYTHON_OUTPUT_TUPLE) if (!result) { result = obj; } else if (result == Py_None) { Py_DECREF(result); result = obj; } else { if (!PyList_Check(result)) { PyObject *o2 = result; result = PyList_New(1); PyList_SetItem(result, 0, o2); } PyList_Append(result,obj); Py_DECREF(obj); } return result; #else PyObject* o2; PyObject* o3; if (!result) { result = obj; } else if (result == Py_None) { Py_DECREF(result); result = obj; } else { if (!PyTuple_Check(result)) { o2 = result; result = PyTuple_New(1); PyTuple_SET_ITEM(result, 0, o2); } o3 = PyTuple_New(1); PyTuple_SET_ITEM(o3, 0, obj); o2 = result; result = PySequence_Concat(o2, o3); Py_DECREF(o2); Py_DECREF(o3); } return result; #endif } /* Unpack the argument tuple */ SWIGINTERN int SWIG_Python_UnpackTuple(PyObject *args, const char *name, Py_ssize_t min, Py_ssize_t max, PyObject **objs) { if (!args) { if (!min && !max) { return 1; } else { PyErr_Format(PyExc_TypeError, "%s expected %s%d arguments, got none", name, (min == max ? "" : "at least "), (int)min); return 0; } } if (!PyTuple_Check(args)) { PyErr_SetString(PyExc_SystemError, "UnpackTuple() argument list is not a tuple"); return 0; } else { register Py_ssize_t l = PyTuple_GET_SIZE(args); if (l < min) { PyErr_Format(PyExc_TypeError, "%s expected %s%d arguments, got %d", name, (min == max ? "" : "at least "), (int)min, (int)l); return 0; } else if (l > max) { PyErr_Format(PyExc_TypeError, "%s expected %s%d arguments, got %d", name, (min == max ? "" : "at most "), (int)max, (int)l); return 0; } else { register int i; for (i = 0; i < l; ++i) { objs[i] = PyTuple_GET_ITEM(args, i); } for (; l < max; ++l) { objs[l] = 0; } return i + 1; } } } /* A functor is a function object with one single object argument */ #if PY_VERSION_HEX >= 0x02020000 #define SWIG_Python_CallFunctor(functor, obj) PyObject_CallFunctionObjArgs(functor, obj, NULL); #else #define SWIG_Python_CallFunctor(functor, obj) PyObject_CallFunction(functor, "O", obj); #endif /* Helper for static pointer initialization for both C and C++ code, for example static PyObject *SWIG_STATIC_POINTER(MyVar) = NewSomething(...); */ #ifdef __cplusplus #define SWIG_STATIC_POINTER(var) var #else #define SWIG_STATIC_POINTER(var) var = 0; if (!var) var #endif /* ----------------------------------------------------------------------------- * Pointer declarations * ----------------------------------------------------------------------------- */ /* Flags for new pointer objects */ #define SWIG_POINTER_NOSHADOW (SWIG_POINTER_OWN << 1) #define SWIG_POINTER_NEW (SWIG_POINTER_NOSHADOW | SWIG_POINTER_OWN) #define SWIG_POINTER_IMPLICIT_CONV (SWIG_POINTER_DISOWN << 1) #ifdef __cplusplus extern "C" { #if 0 } /* cc-mode */ #endif #endif /* How to access Py_None */ #if defined(_WIN32) || defined(__WIN32__) || defined(__CYGWIN__) # ifndef SWIG_PYTHON_NO_BUILD_NONE # ifndef SWIG_PYTHON_BUILD_NONE # define SWIG_PYTHON_BUILD_NONE # endif # endif #endif #ifdef SWIG_PYTHON_BUILD_NONE # ifdef Py_None # undef Py_None # define Py_None SWIG_Py_None() # endif SWIGRUNTIMEINLINE PyObject * _SWIG_Py_None(void) { PyObject *none = Py_BuildValue((char*)""); Py_DECREF(none); return none; } SWIGRUNTIME PyObject * SWIG_Py_None(void) { static PyObject *SWIG_STATIC_POINTER(none) = _SWIG_Py_None(); return none; } #endif /* The python void return value */ SWIGRUNTIMEINLINE PyObject * SWIG_Py_Void(void) { PyObject *none = Py_None; Py_INCREF(none); return none; } /* SwigPyClientData */ typedef struct { PyObject *klass; PyObject *newraw; PyObject *newargs; PyObject *destroy; int delargs; int implicitconv; } SwigPyClientData; SWIGRUNTIMEINLINE int SWIG_Python_CheckImplicit(swig_type_info *ty) { SwigPyClientData *data = (SwigPyClientData *)ty->clientdata; return data ? data->implicitconv : 0; } SWIGRUNTIMEINLINE PyObject * SWIG_Python_ExceptionType(swig_type_info *desc) { SwigPyClientData *data = desc ? (SwigPyClientData *) desc->clientdata : 0; PyObject *klass = data ? data->klass : 0; return (klass ? klass : PyExc_RuntimeError); } SWIGRUNTIME SwigPyClientData * SwigPyClientData_New(PyObject* obj) { if (!obj) { return 0; } else { SwigPyClientData *data = (SwigPyClientData *)malloc(sizeof(SwigPyClientData)); /* the klass element */ data->klass = obj; Py_INCREF(data->klass); /* the newraw method and newargs arguments used to create a new raw instance */ if (PyClass_Check(obj)) { data->newraw = 0; data->newargs = obj; Py_INCREF(obj); } else { #if (PY_VERSION_HEX < 0x02020000) data->newraw = 0; #else data->newraw = PyObject_GetAttrString(data->klass, (char *)"__new__"); #endif if (data->newraw) { Py_INCREF(data->newraw); data->newargs = PyTuple_New(1); PyTuple_SetItem(data->newargs, 0, obj); } else { data->newargs = obj; } Py_INCREF(data->newargs); } /* the destroy method, aka as the C++ delete method */ data->destroy = PyObject_GetAttrString(data->klass, (char *)"__swig_destroy__"); if (PyErr_Occurred()) { PyErr_Clear(); data->destroy = 0; } if (data->destroy) { int flags; Py_INCREF(data->destroy); flags = PyCFunction_GET_FLAGS(data->destroy); #ifdef METH_O data->delargs = !(flags & (METH_O)); #else data->delargs = 0; #endif } else { data->delargs = 0; } data->implicitconv = 0; return data; } } SWIGRUNTIME void SwigPyClientData_Del(SwigPyClientData* data) { Py_XDECREF(data->newraw); Py_XDECREF(data->newargs); Py_XDECREF(data->destroy); } /* =============== SwigPyObject =====================*/ typedef struct { PyObject_HEAD void *ptr; swig_type_info *ty; int own; PyObject *next; } SwigPyObject; SWIGRUNTIME PyObject * SwigPyObject_long(SwigPyObject *v) { return PyLong_FromVoidPtr(v->ptr); } SWIGRUNTIME PyObject * SwigPyObject_format(const char* fmt, SwigPyObject *v) { PyObject *res = NULL; PyObject *args = PyTuple_New(1); if (args) { if (PyTuple_SetItem(args, 0, SwigPyObject_long(v)) == 0) { PyObject *ofmt = SWIG_Python_str_FromChar(fmt); if (ofmt) { #if PY_VERSION_HEX >= 0x03000000 res = PyUnicode_Format(ofmt,args); #else res = PyString_Format(ofmt,args); #endif Py_DECREF(ofmt); } Py_DECREF(args); } } return res; } SWIGRUNTIME PyObject * SwigPyObject_oct(SwigPyObject *v) { return SwigPyObject_format("%o",v); } SWIGRUNTIME PyObject * SwigPyObject_hex(SwigPyObject *v) { return SwigPyObject_format("%x",v); } SWIGRUNTIME PyObject * #ifdef METH_NOARGS SwigPyObject_repr(SwigPyObject *v) #else SwigPyObject_repr(SwigPyObject *v, PyObject *args) #endif { const char *name = SWIG_TypePrettyName(v->ty); PyObject *repr = SWIG_Python_str_FromFormat("", name, v); if (v->next) { #ifdef METH_NOARGS PyObject *nrep = SwigPyObject_repr((SwigPyObject *)v->next); #else PyObject *nrep = SwigPyObject_repr((SwigPyObject *)v->next, args); #endif #if PY_VERSION_HEX >= 0x03000000 PyObject *joined = PyUnicode_Concat(repr, nrep); Py_DecRef(repr); Py_DecRef(nrep); repr = joined; #else PyString_ConcatAndDel(&repr,nrep); #endif } return repr; } SWIGRUNTIME int SwigPyObject_print(SwigPyObject *v, FILE *fp, int SWIGUNUSEDPARM(flags)) { char *str; #ifdef METH_NOARGS PyObject *repr = SwigPyObject_repr(v); #else PyObject *repr = SwigPyObject_repr(v, NULL); #endif if (repr) { str = SWIG_Python_str_AsChar(repr); fputs(str, fp); SWIG_Python_str_DelForPy3(str); Py_DECREF(repr); return 0; } else { return 1; } } SWIGRUNTIME PyObject * SwigPyObject_str(SwigPyObject *v) { char result[SWIG_BUFFER_SIZE]; return SWIG_PackVoidPtr(result, v->ptr, v->ty->name, sizeof(result)) ? SWIG_Python_str_FromChar(result) : 0; } SWIGRUNTIME int SwigPyObject_compare(SwigPyObject *v, SwigPyObject *w) { void *i = v->ptr; void *j = w->ptr; return (i < j) ? -1 : ((i > j) ? 1 : 0); } /* Added for Python 3.x, would it also be useful for Python 2.x? */ SWIGRUNTIME PyObject* SwigPyObject_richcompare(SwigPyObject *v, SwigPyObject *w, int op) { PyObject* res; if( op != Py_EQ && op != Py_NE ) { Py_INCREF(Py_NotImplemented); return Py_NotImplemented; } if( (SwigPyObject_compare(v, w)==0) == (op == Py_EQ) ) res = Py_True; else res = Py_False; Py_INCREF(res); return res; } SWIGRUNTIME PyTypeObject* _PySwigObject_type(void); SWIGRUNTIME PyTypeObject* SwigPyObject_type(void) { static PyTypeObject *SWIG_STATIC_POINTER(type) = _PySwigObject_type(); return type; } SWIGRUNTIMEINLINE int SwigPyObject_Check(PyObject *op) { return (Py_TYPE(op) == SwigPyObject_type()) || (strcmp(Py_TYPE(op)->tp_name,"SwigPyObject") == 0); } SWIGRUNTIME PyObject * SwigPyObject_New(void *ptr, swig_type_info *ty, int own); SWIGRUNTIME void SwigPyObject_dealloc(PyObject *v) { SwigPyObject *sobj = (SwigPyObject *) v; PyObject *next = sobj->next; if (sobj->own == SWIG_POINTER_OWN) { swig_type_info *ty = sobj->ty; SwigPyClientData *data = ty ? (SwigPyClientData *) ty->clientdata : 0; PyObject *destroy = data ? data->destroy : 0; if (destroy) { /* destroy is always a VARARGS method */ PyObject *res; if (data->delargs) { /* we need to create a temporary object to carry the destroy operation */ PyObject *tmp = SwigPyObject_New(sobj->ptr, ty, 0); res = SWIG_Python_CallFunctor(destroy, tmp); Py_DECREF(tmp); } else { PyCFunction meth = PyCFunction_GET_FUNCTION(destroy); PyObject *mself = PyCFunction_GET_SELF(destroy); res = ((*meth)(mself, v)); } Py_XDECREF(res); } #if !defined(SWIG_PYTHON_SILENT_MEMLEAK) else { const char *name = SWIG_TypePrettyName(ty); printf("swig/python detected a memory leak of type '%s', no destructor found.\n", (name ? name : "unknown")); } #endif } Py_XDECREF(next); PyObject_DEL(v); } SWIGRUNTIME PyObject* SwigPyObject_append(PyObject* v, PyObject* next) { SwigPyObject *sobj = (SwigPyObject *) v; #ifndef METH_O PyObject *tmp = 0; if (!PyArg_ParseTuple(next,(char *)"O:append", &tmp)) return NULL; next = tmp; #endif if (!SwigPyObject_Check(next)) { return NULL; } sobj->next = next; Py_INCREF(next); return SWIG_Py_Void(); } SWIGRUNTIME PyObject* #ifdef METH_NOARGS SwigPyObject_next(PyObject* v) #else SwigPyObject_next(PyObject* v, PyObject *SWIGUNUSEDPARM(args)) #endif { SwigPyObject *sobj = (SwigPyObject *) v; if (sobj->next) { Py_INCREF(sobj->next); return sobj->next; } else { return SWIG_Py_Void(); } } SWIGINTERN PyObject* #ifdef METH_NOARGS SwigPyObject_disown(PyObject *v) #else SwigPyObject_disown(PyObject* v, PyObject *SWIGUNUSEDPARM(args)) #endif { SwigPyObject *sobj = (SwigPyObject *)v; sobj->own = 0; return SWIG_Py_Void(); } SWIGINTERN PyObject* #ifdef METH_NOARGS SwigPyObject_acquire(PyObject *v) #else SwigPyObject_acquire(PyObject* v, PyObject *SWIGUNUSEDPARM(args)) #endif { SwigPyObject *sobj = (SwigPyObject *)v; sobj->own = SWIG_POINTER_OWN; return SWIG_Py_Void(); } SWIGINTERN PyObject* SwigPyObject_own(PyObject *v, PyObject *args) { PyObject *val = 0; #if (PY_VERSION_HEX < 0x02020000) if (!PyArg_ParseTuple(args,(char *)"|O:own",&val)) #else if (!PyArg_UnpackTuple(args, (char *)"own", 0, 1, &val)) #endif { return NULL; } else { SwigPyObject *sobj = (SwigPyObject *)v; PyObject *obj = PyBool_FromLong(sobj->own); if (val) { #ifdef METH_NOARGS if (PyObject_IsTrue(val)) { SwigPyObject_acquire(v); } else { SwigPyObject_disown(v); } #else if (PyObject_IsTrue(val)) { SwigPyObject_acquire(v,args); } else { SwigPyObject_disown(v,args); } #endif } return obj; } } #ifdef METH_O static PyMethodDef swigobject_methods[] = { {(char *)"disown", (PyCFunction)SwigPyObject_disown, METH_NOARGS, (char *)"releases ownership of the pointer"}, {(char *)"acquire", (PyCFunction)SwigPyObject_acquire, METH_NOARGS, (char *)"aquires ownership of the pointer"}, {(char *)"own", (PyCFunction)SwigPyObject_own, METH_VARARGS, (char *)"returns/sets ownership of the pointer"}, {(char *)"append", (PyCFunction)SwigPyObject_append, METH_O, (char *)"appends another 'this' object"}, {(char *)"next", (PyCFunction)SwigPyObject_next, METH_NOARGS, (char *)"returns the next 'this' object"}, {(char *)"__repr__",(PyCFunction)SwigPyObject_repr, METH_NOARGS, (char *)"returns object representation"}, {0, 0, 0, 0} }; #else static PyMethodDef swigobject_methods[] = { {(char *)"disown", (PyCFunction)SwigPyObject_disown, METH_VARARGS, (char *)"releases ownership of the pointer"}, {(char *)"acquire", (PyCFunction)SwigPyObject_acquire, METH_VARARGS, (char *)"aquires ownership of the pointer"}, {(char *)"own", (PyCFunction)SwigPyObject_own, METH_VARARGS, (char *)"returns/sets ownership of the pointer"}, {(char *)"append", (PyCFunction)SwigPyObject_append, METH_VARARGS, (char *)"appends another 'this' object"}, {(char *)"next", (PyCFunction)SwigPyObject_next, METH_VARARGS, (char *)"returns the next 'this' object"}, {(char *)"__repr__",(PyCFunction)SwigPyObject_repr, METH_VARARGS, (char *)"returns object representation"}, {0, 0, 0, 0} }; #endif #if PY_VERSION_HEX < 0x02020000 SWIGINTERN PyObject * SwigPyObject_getattr(SwigPyObject *sobj,char *name) { return Py_FindMethod(swigobject_methods, (PyObject *)sobj, name); } #endif SWIGRUNTIME PyTypeObject* _PySwigObject_type(void) { static char swigobject_doc[] = "Swig object carries a C/C++ instance pointer"; static PyNumberMethods SwigPyObject_as_number = { (binaryfunc)0, /*nb_add*/ (binaryfunc)0, /*nb_subtract*/ (binaryfunc)0, /*nb_multiply*/ /* nb_divide removed in Python 3 */ #if PY_VERSION_HEX < 0x03000000 (binaryfunc)0, /*nb_divide*/ #endif (binaryfunc)0, /*nb_remainder*/ (binaryfunc)0, /*nb_divmod*/ (ternaryfunc)0,/*nb_power*/ (unaryfunc)0, /*nb_negative*/ (unaryfunc)0, /*nb_positive*/ (unaryfunc)0, /*nb_absolute*/ (inquiry)0, /*nb_nonzero*/ 0, /*nb_invert*/ 0, /*nb_lshift*/ 0, /*nb_rshift*/ 0, /*nb_and*/ 0, /*nb_xor*/ 0, /*nb_or*/ #if PY_VERSION_HEX < 0x03000000 0, /*nb_coerce*/ #endif (unaryfunc)SwigPyObject_long, /*nb_int*/ #if PY_VERSION_HEX < 0x03000000 (unaryfunc)SwigPyObject_long, /*nb_long*/ #else 0, /*nb_reserved*/ #endif (unaryfunc)0, /*nb_float*/ #if PY_VERSION_HEX < 0x03000000 (unaryfunc)SwigPyObject_oct, /*nb_oct*/ (unaryfunc)SwigPyObject_hex, /*nb_hex*/ #endif #if PY_VERSION_HEX >= 0x03000000 /* 3.0 */ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 /* nb_inplace_add -> nb_index, nb_inplace_divide removed */ #elif PY_VERSION_HEX >= 0x02050000 /* 2.5.0 */ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 /* nb_inplace_add -> nb_index */ #elif PY_VERSION_HEX >= 0x02020000 /* 2.2.0 */ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 /* nb_inplace_add -> nb_inplace_true_divide */ #elif PY_VERSION_HEX >= 0x02000000 /* 2.0.0 */ 0,0,0,0,0,0,0,0,0,0,0 /* nb_inplace_add -> nb_inplace_or */ #endif }; static PyTypeObject swigpyobject_type; static int type_init = 0; if (!type_init) { const PyTypeObject tmp = { /* PyObject header changed in Python 3 */ #if PY_VERSION_HEX >= 0x03000000 PyVarObject_HEAD_INIT(&PyType_Type, 0) #else PyObject_HEAD_INIT(NULL) 0, /* ob_size */ #endif (char *)"SwigPyObject", /* tp_name */ sizeof(SwigPyObject), /* tp_basicsize */ 0, /* tp_itemsize */ (destructor)SwigPyObject_dealloc, /* tp_dealloc */ (printfunc)SwigPyObject_print, /* tp_print */ #if PY_VERSION_HEX < 0x02020000 (getattrfunc)SwigPyObject_getattr, /* tp_getattr */ #else (getattrfunc)0, /* tp_getattr */ #endif (setattrfunc)0, /* tp_setattr */ #if PY_VERSION_HEX >= 0x03000000 0, /* tp_reserved in 3.0.1, tp_compare in 3.0.0 but not used */ #else (cmpfunc)SwigPyObject_compare, /* tp_compare */ #endif (reprfunc)SwigPyObject_repr, /* tp_repr */ &SwigPyObject_as_number, /* tp_as_number */ 0, /* tp_as_sequence */ 0, /* tp_as_mapping */ (hashfunc)0, /* tp_hash */ (ternaryfunc)0, /* tp_call */ (reprfunc)SwigPyObject_str, /* tp_str */ PyObject_GenericGetAttr, /* tp_getattro */ 0, /* tp_setattro */ 0, /* tp_as_buffer */ Py_TPFLAGS_DEFAULT, /* tp_flags */ swigobject_doc, /* tp_doc */ 0, /* tp_traverse */ 0, /* tp_clear */ (richcmpfunc)SwigPyObject_richcompare, /* tp_richcompare */ 0, /* tp_weaklistoffset */ #if PY_VERSION_HEX >= 0x02020000 0, /* tp_iter */ 0, /* tp_iternext */ swigobject_methods, /* tp_methods */ 0, /* tp_members */ 0, /* tp_getset */ 0, /* tp_base */ 0, /* tp_dict */ 0, /* tp_descr_get */ 0, /* tp_descr_set */ 0, /* tp_dictoffset */ 0, /* tp_init */ 0, /* tp_alloc */ 0, /* tp_new */ 0, /* tp_free */ 0, /* tp_is_gc */ 0, /* tp_bases */ 0, /* tp_mro */ 0, /* tp_cache */ 0, /* tp_subclasses */ 0, /* tp_weaklist */ #endif #if PY_VERSION_HEX >= 0x02030000 0, /* tp_del */ #endif #ifdef COUNT_ALLOCS 0,0,0,0 /* tp_alloc -> tp_next */ #endif }; swigpyobject_type = tmp; /* for Python 3 we already assigned ob_type in PyVarObject_HEAD_INIT() */ #if PY_VERSION_HEX < 0x03000000 swigpyobject_type.ob_type = &PyType_Type; #endif type_init = 1; } return &swigpyobject_type; } SWIGRUNTIME PyObject * SwigPyObject_New(void *ptr, swig_type_info *ty, int own) { SwigPyObject *sobj = PyObject_NEW(SwigPyObject, SwigPyObject_type()); if (sobj) { sobj->ptr = ptr; sobj->ty = ty; sobj->own = own; sobj->next = 0; } return (PyObject *)sobj; } /* ----------------------------------------------------------------------------- * Implements a simple Swig Packed type, and use it instead of string * ----------------------------------------------------------------------------- */ typedef struct { PyObject_HEAD void *pack; swig_type_info *ty; size_t size; } SwigPyPacked; SWIGRUNTIME int SwigPyPacked_print(SwigPyPacked *v, FILE *fp, int SWIGUNUSEDPARM(flags)) { char result[SWIG_BUFFER_SIZE]; fputs("pack, v->size, 0, sizeof(result))) { fputs("at ", fp); fputs(result, fp); } fputs(v->ty->name,fp); fputs(">", fp); return 0; } SWIGRUNTIME PyObject * SwigPyPacked_repr(SwigPyPacked *v) { char result[SWIG_BUFFER_SIZE]; if (SWIG_PackDataName(result, v->pack, v->size, 0, sizeof(result))) { return SWIG_Python_str_FromFormat("", result, v->ty->name); } else { return SWIG_Python_str_FromFormat("", v->ty->name); } } SWIGRUNTIME PyObject * SwigPyPacked_str(SwigPyPacked *v) { char result[SWIG_BUFFER_SIZE]; if (SWIG_PackDataName(result, v->pack, v->size, 0, sizeof(result))){ return SWIG_Python_str_FromFormat("%s%s", result, v->ty->name); } else { return SWIG_Python_str_FromChar(v->ty->name); } } SWIGRUNTIME int SwigPyPacked_compare(SwigPyPacked *v, SwigPyPacked *w) { size_t i = v->size; size_t j = w->size; int s = (i < j) ? -1 : ((i > j) ? 1 : 0); return s ? s : strncmp((char *)v->pack, (char *)w->pack, 2*v->size); } SWIGRUNTIME PyTypeObject* _PySwigPacked_type(void); SWIGRUNTIME PyTypeObject* SwigPyPacked_type(void) { static PyTypeObject *SWIG_STATIC_POINTER(type) = _PySwigPacked_type(); return type; } SWIGRUNTIMEINLINE int SwigPyPacked_Check(PyObject *op) { return ((op)->ob_type == _PySwigPacked_type()) || (strcmp((op)->ob_type->tp_name,"SwigPyPacked") == 0); } SWIGRUNTIME void SwigPyPacked_dealloc(PyObject *v) { if (SwigPyPacked_Check(v)) { SwigPyPacked *sobj = (SwigPyPacked *) v; free(sobj->pack); } PyObject_DEL(v); } SWIGRUNTIME PyTypeObject* _PySwigPacked_type(void) { static char swigpacked_doc[] = "Swig object carries a C/C++ instance pointer"; static PyTypeObject swigpypacked_type; static int type_init = 0; if (!type_init) { const PyTypeObject tmp = { /* PyObject header changed in Python 3 */ #if PY_VERSION_HEX>=0x03000000 PyVarObject_HEAD_INIT(&PyType_Type, 0) #else PyObject_HEAD_INIT(NULL) 0, /* ob_size */ #endif (char *)"SwigPyPacked", /* tp_name */ sizeof(SwigPyPacked), /* tp_basicsize */ 0, /* tp_itemsize */ (destructor)SwigPyPacked_dealloc, /* tp_dealloc */ (printfunc)SwigPyPacked_print, /* tp_print */ (getattrfunc)0, /* tp_getattr */ (setattrfunc)0, /* tp_setattr */ #if PY_VERSION_HEX>=0x03000000 0, /* tp_reserved in 3.0.1 */ #else (cmpfunc)SwigPyPacked_compare, /* tp_compare */ #endif (reprfunc)SwigPyPacked_repr, /* tp_repr */ 0, /* tp_as_number */ 0, /* tp_as_sequence */ 0, /* tp_as_mapping */ (hashfunc)0, /* tp_hash */ (ternaryfunc)0, /* tp_call */ (reprfunc)SwigPyPacked_str, /* tp_str */ PyObject_GenericGetAttr, /* tp_getattro */ 0, /* tp_setattro */ 0, /* tp_as_buffer */ Py_TPFLAGS_DEFAULT, /* tp_flags */ swigpacked_doc, /* tp_doc */ 0, /* tp_traverse */ 0, /* tp_clear */ 0, /* tp_richcompare */ 0, /* tp_weaklistoffset */ #if PY_VERSION_HEX >= 0x02020000 0, /* tp_iter */ 0, /* tp_iternext */ 0, /* tp_methods */ 0, /* tp_members */ 0, /* tp_getset */ 0, /* tp_base */ 0, /* tp_dict */ 0, /* tp_descr_get */ 0, /* tp_descr_set */ 0, /* tp_dictoffset */ 0, /* tp_init */ 0, /* tp_alloc */ 0, /* tp_new */ 0, /* tp_free */ 0, /* tp_is_gc */ 0, /* tp_bases */ 0, /* tp_mro */ 0, /* tp_cache */ 0, /* tp_subclasses */ 0, /* tp_weaklist */ #endif #if PY_VERSION_HEX >= 0x02030000 0, /* tp_del */ #endif #ifdef COUNT_ALLOCS 0,0,0,0 /* tp_alloc -> tp_next */ #endif }; swigpypacked_type = tmp; /* for Python 3 the ob_type already assigned in PyVarObject_HEAD_INIT() */ #if PY_VERSION_HEX < 0x03000000 swigpypacked_type.ob_type = &PyType_Type; #endif type_init = 1; } return &swigpypacked_type; } SWIGRUNTIME PyObject * SwigPyPacked_New(void *ptr, size_t size, swig_type_info *ty) { SwigPyPacked *sobj = PyObject_NEW(SwigPyPacked, SwigPyPacked_type()); if (sobj) { void *pack = malloc(size); if (pack) { memcpy(pack, ptr, size); sobj->pack = pack; sobj->ty = ty; sobj->size = size; } else { PyObject_DEL((PyObject *) sobj); sobj = 0; } } return (PyObject *) sobj; } SWIGRUNTIME swig_type_info * SwigPyPacked_UnpackData(PyObject *obj, void *ptr, size_t size) { if (SwigPyPacked_Check(obj)) { SwigPyPacked *sobj = (SwigPyPacked *)obj; if (sobj->size != size) return 0; memcpy(ptr, sobj->pack, size); return sobj->ty; } else { return 0; } } /* ----------------------------------------------------------------------------- * pointers/data manipulation * ----------------------------------------------------------------------------- */ SWIGRUNTIMEINLINE PyObject * _SWIG_This(void) { return SWIG_Python_str_FromChar("this"); } SWIGRUNTIME PyObject * SWIG_This(void) { static PyObject *SWIG_STATIC_POINTER(swig_this) = _SWIG_This(); return swig_this; } /* #define SWIG_PYTHON_SLOW_GETSET_THIS */ /* TODO: I don't know how to implement the fast getset in Python 3 right now */ #if PY_VERSION_HEX>=0x03000000 #define SWIG_PYTHON_SLOW_GETSET_THIS #endif SWIGRUNTIME SwigPyObject * SWIG_Python_GetSwigThis(PyObject *pyobj) { if (SwigPyObject_Check(pyobj)) { return (SwigPyObject *) pyobj; } else { PyObject *obj = 0; #if (!defined(SWIG_PYTHON_SLOW_GETSET_THIS) && (PY_VERSION_HEX >= 0x02030000)) if (PyInstance_Check(pyobj)) { obj = _PyInstance_Lookup(pyobj, SWIG_This()); } else { PyObject **dictptr = _PyObject_GetDictPtr(pyobj); if (dictptr != NULL) { PyObject *dict = *dictptr; obj = dict ? PyDict_GetItem(dict, SWIG_This()) : 0; } else { #ifdef PyWeakref_CheckProxy if (PyWeakref_CheckProxy(pyobj)) { PyObject *wobj = PyWeakref_GET_OBJECT(pyobj); return wobj ? SWIG_Python_GetSwigThis(wobj) : 0; } #endif obj = PyObject_GetAttr(pyobj,SWIG_This()); if (obj) { Py_DECREF(obj); } else { if (PyErr_Occurred()) PyErr_Clear(); return 0; } } } #else obj = PyObject_GetAttr(pyobj,SWIG_This()); if (obj) { Py_DECREF(obj); } else { if (PyErr_Occurred()) PyErr_Clear(); return 0; } #endif if (obj && !SwigPyObject_Check(obj)) { /* a PyObject is called 'this', try to get the 'real this' SwigPyObject from it */ return SWIG_Python_GetSwigThis(obj); } return (SwigPyObject *)obj; } } /* Acquire a pointer value */ SWIGRUNTIME int SWIG_Python_AcquirePtr(PyObject *obj, int own) { if (own == SWIG_POINTER_OWN) { SwigPyObject *sobj = SWIG_Python_GetSwigThis(obj); if (sobj) { int oldown = sobj->own; sobj->own = own; return oldown; } } return 0; } /* Convert a pointer value */ SWIGRUNTIME int SWIG_Python_ConvertPtrAndOwn(PyObject *obj, void **ptr, swig_type_info *ty, int flags, int *own) { if (!obj) return SWIG_ERROR; if (obj == Py_None) { if (ptr) *ptr = 0; return SWIG_OK; } else { SwigPyObject *sobj = SWIG_Python_GetSwigThis(obj); if (own) *own = 0; while (sobj) { void *vptr = sobj->ptr; if (ty) { swig_type_info *to = sobj->ty; if (to == ty) { /* no type cast needed */ if (ptr) *ptr = vptr; break; } else { swig_cast_info *tc = SWIG_TypeCheck(to->name,ty); if (!tc) { sobj = (SwigPyObject *)sobj->next; } else { if (ptr) { int newmemory = 0; *ptr = SWIG_TypeCast(tc,vptr,&newmemory); if (newmemory == SWIG_CAST_NEW_MEMORY) { assert(own); if (own) *own = *own | SWIG_CAST_NEW_MEMORY; } } break; } } } else { if (ptr) *ptr = vptr; break; } } if (sobj) { if (own) *own = *own | sobj->own; if (flags & SWIG_POINTER_DISOWN) { sobj->own = 0; } return SWIG_OK; } else { int res = SWIG_ERROR; if (flags & SWIG_POINTER_IMPLICIT_CONV) { SwigPyClientData *data = ty ? (SwigPyClientData *) ty->clientdata : 0; if (data && !data->implicitconv) { PyObject *klass = data->klass; if (klass) { PyObject *impconv; data->implicitconv = 1; /* avoid recursion and call 'explicit' constructors*/ impconv = SWIG_Python_CallFunctor(klass, obj); data->implicitconv = 0; if (PyErr_Occurred()) { PyErr_Clear(); impconv = 0; } if (impconv) { SwigPyObject *iobj = SWIG_Python_GetSwigThis(impconv); if (iobj) { void *vptr; res = SWIG_Python_ConvertPtrAndOwn((PyObject*)iobj, &vptr, ty, 0, 0); if (SWIG_IsOK(res)) { if (ptr) { *ptr = vptr; /* transfer the ownership to 'ptr' */ iobj->own = 0; res = SWIG_AddCast(res); res = SWIG_AddNewMask(res); } else { res = SWIG_AddCast(res); } } } Py_DECREF(impconv); } } } } return res; } } } /* Convert a function ptr value */ SWIGRUNTIME int SWIG_Python_ConvertFunctionPtr(PyObject *obj, void **ptr, swig_type_info *ty) { if (!PyCFunction_Check(obj)) { return SWIG_ConvertPtr(obj, ptr, ty, 0); } else { void *vptr = 0; /* here we get the method pointer for callbacks */ const char *doc = (((PyCFunctionObject *)obj) -> m_ml -> ml_doc); const char *desc = doc ? strstr(doc, "swig_ptr: ") : 0; if (desc) desc = ty ? SWIG_UnpackVoidPtr(desc + 10, &vptr, ty->name) : 0; if (!desc) return SWIG_ERROR; if (ty) { swig_cast_info *tc = SWIG_TypeCheck(desc,ty); if (tc) { int newmemory = 0; *ptr = SWIG_TypeCast(tc,vptr,&newmemory); assert(!newmemory); /* newmemory handling not yet implemented */ } else { return SWIG_ERROR; } } else { *ptr = vptr; } return SWIG_OK; } } /* Convert a packed value value */ SWIGRUNTIME int SWIG_Python_ConvertPacked(PyObject *obj, void *ptr, size_t sz, swig_type_info *ty) { swig_type_info *to = SwigPyPacked_UnpackData(obj, ptr, sz); if (!to) return SWIG_ERROR; if (ty) { if (to != ty) { /* check type cast? */ swig_cast_info *tc = SWIG_TypeCheck(to->name,ty); if (!tc) return SWIG_ERROR; } } return SWIG_OK; } /* ----------------------------------------------------------------------------- * Create a new pointer object * ----------------------------------------------------------------------------- */ /* Create a new instance object, without calling __init__, and set the 'this' attribute. */ SWIGRUNTIME PyObject* SWIG_Python_NewShadowInstance(SwigPyClientData *data, PyObject *swig_this) { #if (PY_VERSION_HEX >= 0x02020000) PyObject *inst = 0; PyObject *newraw = data->newraw; if (newraw) { inst = PyObject_Call(newraw, data->newargs, NULL); if (inst) { #if !defined(SWIG_PYTHON_SLOW_GETSET_THIS) PyObject **dictptr = _PyObject_GetDictPtr(inst); if (dictptr != NULL) { PyObject *dict = *dictptr; if (dict == NULL) { dict = PyDict_New(); *dictptr = dict; PyDict_SetItem(dict, SWIG_This(), swig_this); } } #else PyObject *key = SWIG_This(); PyObject_SetAttr(inst, key, swig_this); #endif } } else { #if PY_VERSION_HEX >= 0x03000000 inst = PyBaseObject_Type.tp_new((PyTypeObject*) data->newargs, Py_None, Py_None); PyObject_SetAttr(inst, SWIG_This(), swig_this); Py_TYPE(inst)->tp_flags &= ~Py_TPFLAGS_VALID_VERSION_TAG; #else PyObject *dict = PyDict_New(); PyDict_SetItem(dict, SWIG_This(), swig_this); inst = PyInstance_NewRaw(data->newargs, dict); Py_DECREF(dict); #endif } return inst; #else #if (PY_VERSION_HEX >= 0x02010000) PyObject *inst; PyObject *dict = PyDict_New(); PyDict_SetItem(dict, SWIG_This(), swig_this); inst = PyInstance_NewRaw(data->newargs, dict); Py_DECREF(dict); return (PyObject *) inst; #else PyInstanceObject *inst = PyObject_NEW(PyInstanceObject, &PyInstance_Type); if (inst == NULL) { return NULL; } inst->in_class = (PyClassObject *)data->newargs; Py_INCREF(inst->in_class); inst->in_dict = PyDict_New(); if (inst->in_dict == NULL) { Py_DECREF(inst); return NULL; } #ifdef Py_TPFLAGS_HAVE_WEAKREFS inst->in_weakreflist = NULL; #endif #ifdef Py_TPFLAGS_GC PyObject_GC_Init(inst); #endif PyDict_SetItem(inst->in_dict, SWIG_This(), swig_this); return (PyObject *) inst; #endif #endif } SWIGRUNTIME void SWIG_Python_SetSwigThis(PyObject *inst, PyObject *swig_this) { PyObject *dict; #if (PY_VERSION_HEX >= 0x02020000) && !defined(SWIG_PYTHON_SLOW_GETSET_THIS) PyObject **dictptr = _PyObject_GetDictPtr(inst); if (dictptr != NULL) { dict = *dictptr; if (dict == NULL) { dict = PyDict_New(); *dictptr = dict; } PyDict_SetItem(dict, SWIG_This(), swig_this); return; } #endif dict = PyObject_GetAttrString(inst, (char*)"__dict__"); PyDict_SetItem(dict, SWIG_This(), swig_this); Py_DECREF(dict); } SWIGINTERN PyObject * SWIG_Python_InitShadowInstance(PyObject *args) { PyObject *obj[2]; if (!SWIG_Python_UnpackTuple(args,(char*)"swiginit", 2, 2, obj)) { return NULL; } else { SwigPyObject *sthis = SWIG_Python_GetSwigThis(obj[0]); if (sthis) { SwigPyObject_append((PyObject*) sthis, obj[1]); } else { SWIG_Python_SetSwigThis(obj[0], obj[1]); } return SWIG_Py_Void(); } } /* Create a new pointer object */ SWIGRUNTIME PyObject * SWIG_Python_NewPointerObj(void *ptr, swig_type_info *type, int flags) { if (!ptr) { return SWIG_Py_Void(); } else { int own = (flags & SWIG_POINTER_OWN) ? SWIG_POINTER_OWN : 0; PyObject *robj = SwigPyObject_New(ptr, type, own); SwigPyClientData *clientdata = type ? (SwigPyClientData *)(type->clientdata) : 0; if (clientdata && !(flags & SWIG_POINTER_NOSHADOW)) { PyObject *inst = SWIG_Python_NewShadowInstance(clientdata, robj); if (inst) { Py_DECREF(robj); robj = inst; } } return robj; } } /* Create a new packed object */ SWIGRUNTIMEINLINE PyObject * SWIG_Python_NewPackedObj(void *ptr, size_t sz, swig_type_info *type) { return ptr ? SwigPyPacked_New((void *) ptr, sz, type) : SWIG_Py_Void(); } /* -----------------------------------------------------------------------------* * Get type list * -----------------------------------------------------------------------------*/ #ifdef SWIG_LINK_RUNTIME void *SWIG_ReturnGlobalTypeList(void *); #endif SWIGRUNTIME swig_module_info * SWIG_Python_GetModule(void) { static void *type_pointer = (void *)0; /* first check if module already created */ if (!type_pointer) { #ifdef SWIG_LINK_RUNTIME type_pointer = SWIG_ReturnGlobalTypeList((void *)0); #else type_pointer = PyCObject_Import((char*)"swig_runtime_data" SWIG_RUNTIME_VERSION, (char*)"type_pointer" SWIG_TYPE_TABLE_NAME); if (PyErr_Occurred()) { PyErr_Clear(); type_pointer = (void *)0; } #endif } return (swig_module_info *) type_pointer; } #if PY_MAJOR_VERSION < 2 /* PyModule_AddObject function was introduced in Python 2.0. The following function is copied out of Python/modsupport.c in python version 2.3.4 */ SWIGINTERN int PyModule_AddObject(PyObject *m, char *name, PyObject *o) { PyObject *dict; if (!PyModule_Check(m)) { PyErr_SetString(PyExc_TypeError, "PyModule_AddObject() needs module as first arg"); return SWIG_ERROR; } if (!o) { PyErr_SetString(PyExc_TypeError, "PyModule_AddObject() needs non-NULL value"); return SWIG_ERROR; } dict = PyModule_GetDict(m); if (dict == NULL) { /* Internal error -- modules must have a dict! */ PyErr_Format(PyExc_SystemError, "module '%s' has no __dict__", PyModule_GetName(m)); return SWIG_ERROR; } if (PyDict_SetItemString(dict, name, o)) return SWIG_ERROR; Py_DECREF(o); return SWIG_OK; } #endif SWIGRUNTIME void SWIG_Python_DestroyModule(void *vptr) { swig_module_info *swig_module = (swig_module_info *) vptr; swig_type_info **types = swig_module->types; size_t i; for (i =0; i < swig_module->size; ++i) { swig_type_info *ty = types[i]; if (ty->owndata) { SwigPyClientData *data = (SwigPyClientData *) ty->clientdata; if (data) SwigPyClientData_Del(data); } } Py_DECREF(SWIG_This()); } SWIGRUNTIME void SWIG_Python_SetModule(swig_module_info *swig_module) { static PyMethodDef swig_empty_runtime_method_table[] = { {NULL, NULL, 0, NULL} };/* Sentinel */ #if PY_VERSION_HEX >= 0x03000000 /* Add a dummy module object into sys.modules */ PyObject *module = PyImport_AddModule((char*)"swig_runtime_data" SWIG_RUNTIME_VERSION); #else PyObject *module = Py_InitModule((char*)"swig_runtime_data" SWIG_RUNTIME_VERSION, swig_empty_runtime_method_table); #endif PyObject *pointer = PyCObject_FromVoidPtr((void *) swig_module, SWIG_Python_DestroyModule); if (pointer && module) { PyModule_AddObject(module, (char*)"type_pointer" SWIG_TYPE_TABLE_NAME, pointer); } else { Py_XDECREF(pointer); } } /* The python cached type query */ SWIGRUNTIME PyObject * SWIG_Python_TypeCache(void) { static PyObject *SWIG_STATIC_POINTER(cache) = PyDict_New(); return cache; } SWIGRUNTIME swig_type_info * SWIG_Python_TypeQuery(const char *type) { PyObject *cache = SWIG_Python_TypeCache(); PyObject *key = SWIG_Python_str_FromChar(type); PyObject *obj = PyDict_GetItem(cache, key); swig_type_info *descriptor; if (obj) { descriptor = (swig_type_info *) PyCObject_AsVoidPtr(obj); } else { swig_module_info *swig_module = SWIG_Python_GetModule(); descriptor = SWIG_TypeQueryModule(swig_module, swig_module, type); if (descriptor) { obj = PyCObject_FromVoidPtr(descriptor, NULL); PyDict_SetItem(cache, key, obj); Py_DECREF(obj); } } Py_DECREF(key); return descriptor; } /* For backward compatibility only */ #define SWIG_POINTER_EXCEPTION 0 #define SWIG_arg_fail(arg) SWIG_Python_ArgFail(arg) #define SWIG_MustGetPtr(p, type, argnum, flags) SWIG_Python_MustGetPtr(p, type, argnum, flags) SWIGRUNTIME int SWIG_Python_AddErrMesg(const char* mesg, int infront) { if (PyErr_Occurred()) { PyObject *type = 0; PyObject *value = 0; PyObject *traceback = 0; PyErr_Fetch(&type, &value, &traceback); if (value) { char *tmp; PyObject *old_str = PyObject_Str(value); Py_XINCREF(type); PyErr_Clear(); if (infront) { PyErr_Format(type, "%s %s", mesg, tmp = SWIG_Python_str_AsChar(old_str)); } else { PyErr_Format(type, "%s %s", tmp = SWIG_Python_str_AsChar(old_str), mesg); } SWIG_Python_str_DelForPy3(tmp); Py_DECREF(old_str); } return 1; } else { return 0; } } SWIGRUNTIME int SWIG_Python_ArgFail(int argnum) { if (PyErr_Occurred()) { /* add information about failing argument */ char mesg[256]; PyOS_snprintf(mesg, sizeof(mesg), "argument number %d:", argnum); return SWIG_Python_AddErrMesg(mesg, 1); } else { return 0; } } SWIGRUNTIMEINLINE const char * SwigPyObject_GetDesc(PyObject *self) { SwigPyObject *v = (SwigPyObject *)self; swig_type_info *ty = v ? v->ty : 0; return ty ? ty->str : (char*)""; } SWIGRUNTIME void SWIG_Python_TypeError(const char *type, PyObject *obj) { if (type) { #if defined(SWIG_COBJECT_TYPES) if (obj && SwigPyObject_Check(obj)) { const char *otype = (const char *) SwigPyObject_GetDesc(obj); if (otype) { PyErr_Format(PyExc_TypeError, "a '%s' is expected, 'SwigPyObject(%s)' is received", type, otype); return; } } else #endif { const char *otype = (obj ? obj->ob_type->tp_name : 0); if (otype) { PyObject *str = PyObject_Str(obj); const char *cstr = str ? SWIG_Python_str_AsChar(str) : 0; if (cstr) { PyErr_Format(PyExc_TypeError, "a '%s' is expected, '%s(%s)' is received", type, otype, cstr); SWIG_Python_str_DelForPy3(cstr); } else { PyErr_Format(PyExc_TypeError, "a '%s' is expected, '%s' is received", type, otype); } Py_XDECREF(str); return; } } PyErr_Format(PyExc_TypeError, "a '%s' is expected", type); } else { PyErr_Format(PyExc_TypeError, "unexpected type is received"); } } /* Convert a pointer value, signal an exception on a type mismatch */ SWIGRUNTIME void * SWIG_Python_MustGetPtr(PyObject *obj, swig_type_info *ty, int argnum, int flags) { void *result; if (SWIG_Python_ConvertPtr(obj, &result, ty, flags) == -1) { PyErr_Clear(); #if SWIG_POINTER_EXCEPTION if (flags) { SWIG_Python_TypeError(SWIG_TypePrettyName(ty), obj); SWIG_Python_ArgFail(argnum); } #endif } return result; } #ifdef __cplusplus #if 0 { /* cc-mode */ #endif } #endif #define SWIG_exception_fail(code, msg) do { SWIG_Error(code, msg); SWIG_fail; } while(0) #define SWIG_contract_assert(expr, msg) if (!(expr)) { SWIG_Error(SWIG_RuntimeError, msg); SWIG_fail; } else /* -------- TYPES TABLE (BEGIN) -------- */ #define SWIGTYPE_p_FILE swig_types[0] #define SWIGTYPE_p_char swig_types[1] #define SWIGTYPE_p_f_enum_prelude_log_t_p_q_const__char__void swig_types[2] #define SWIGTYPE_p_f_p_p_struct_prelude_msg_p_void__int swig_types[3] #define SWIGTYPE_p_f_p_struct_idmef_value_p_void__int swig_types[4] #define SWIGTYPE_p_f_p_struct_prelude_client_p_struct_idmef_message__void swig_types[5] #define SWIGTYPE_p_f_p_struct_prelude_connection_pool_enum_prelude_connection_pool_event_t__int swig_types[6] #define SWIGTYPE_p_f_p_struct_prelude_connection_pool_enum_prelude_connection_pool_event_t_p_struct_prelude_connection__int swig_types[7] #define SWIGTYPE_p_f_p_struct_prelude_connection_pool_enum_prelude_connection_pool_event_t_p_struct_prelude_connection_p_void__int swig_types[8] #define SWIGTYPE_p_f_p_struct_prelude_msgbuf_p_struct_prelude_msg__int swig_types[9] #define SWIGTYPE_p_f_p_struct_prelude_option_p_prelude_string_t_p_void__int swig_types[10] #define SWIGTYPE_p_f_p_struct_prelude_option_p_q_const__char_p_prelude_string_t_p_void__int swig_types[11] #define SWIGTYPE_p_f_p_void__void swig_types[12] #define SWIGTYPE_p_idmef_action swig_types[13] #define SWIGTYPE_p_idmef_action_category_t swig_types[14] #define SWIGTYPE_p_idmef_additional_data swig_types[15] #define SWIGTYPE_p_idmef_additional_data_type_t swig_types[16] #define SWIGTYPE_p_idmef_address swig_types[17] #define SWIGTYPE_p_idmef_address_category_t swig_types[18] #define SWIGTYPE_p_idmef_alert swig_types[19] #define SWIGTYPE_p_idmef_alert_type_t swig_types[20] #define SWIGTYPE_p_idmef_alertident swig_types[21] #define SWIGTYPE_p_idmef_analyzer swig_types[22] #define SWIGTYPE_p_idmef_assessment swig_types[23] #define SWIGTYPE_p_idmef_checksum swig_types[24] #define SWIGTYPE_p_idmef_checksum_algorithm_t swig_types[25] #define SWIGTYPE_p_idmef_classification swig_types[26] #define SWIGTYPE_p_idmef_confidence swig_types[27] #define SWIGTYPE_p_idmef_confidence_rating_t swig_types[28] #define SWIGTYPE_p_idmef_correlation_alert swig_types[29] #define SWIGTYPE_p_idmef_criteria swig_types[30] #define SWIGTYPE_p_idmef_criterion swig_types[31] #define SWIGTYPE_p_idmef_criterion_operator_t swig_types[32] #define SWIGTYPE_p_idmef_criterion_value_t swig_types[33] #define SWIGTYPE_p_idmef_data_t swig_types[34] #define SWIGTYPE_p_idmef_data_t_data swig_types[35] #define SWIGTYPE_p_idmef_data_type_t swig_types[36] #define SWIGTYPE_p_idmef_file swig_types[37] #define SWIGTYPE_p_idmef_file_access swig_types[38] #define SWIGTYPE_p_idmef_file_category_t swig_types[39] #define SWIGTYPE_p_idmef_file_fstype_t swig_types[40] #define SWIGTYPE_p_idmef_heartbeat swig_types[41] #define SWIGTYPE_p_idmef_impact swig_types[42] #define SWIGTYPE_p_idmef_impact_completion_t swig_types[43] #define SWIGTYPE_p_idmef_impact_severity_t swig_types[44] #define SWIGTYPE_p_idmef_impact_type_t swig_types[45] #define SWIGTYPE_p_idmef_inode swig_types[46] #define SWIGTYPE_p_idmef_linkage swig_types[47] #define SWIGTYPE_p_idmef_linkage_category_t swig_types[48] #define SWIGTYPE_p_idmef_message swig_types[49] #define SWIGTYPE_p_idmef_message_type_t swig_types[50] #define SWIGTYPE_p_idmef_node swig_types[51] #define SWIGTYPE_p_idmef_node_category_t swig_types[52] #define SWIGTYPE_p_idmef_overflow_alert swig_types[53] #define SWIGTYPE_p_idmef_path swig_types[54] #define SWIGTYPE_p_idmef_process swig_types[55] #define SWIGTYPE_p_idmef_reference swig_types[56] #define SWIGTYPE_p_idmef_reference_origin_t swig_types[57] #define SWIGTYPE_p_idmef_service swig_types[58] #define SWIGTYPE_p_idmef_service_type_t swig_types[59] #define SWIGTYPE_p_idmef_snmp_service swig_types[60] #define SWIGTYPE_p_idmef_source swig_types[61] #define SWIGTYPE_p_idmef_source_spoofed_t swig_types[62] #define SWIGTYPE_p_idmef_target swig_types[63] #define SWIGTYPE_p_idmef_target_decoy_t swig_types[64] #define SWIGTYPE_p_idmef_time swig_types[65] #define SWIGTYPE_p_idmef_tool_alert swig_types[66] #define SWIGTYPE_p_idmef_user swig_types[67] #define SWIGTYPE_p_idmef_user_category_t swig_types[68] #define SWIGTYPE_p_idmef_user_id swig_types[69] #define SWIGTYPE_p_idmef_user_id_type_t swig_types[70] #define SWIGTYPE_p_idmef_value swig_types[71] #define SWIGTYPE_p_idmef_value_type_class_t swig_types[72] #define SWIGTYPE_p_idmef_value_type_data_t swig_types[73] #define SWIGTYPE_p_idmef_value_type_enum_t swig_types[74] #define SWIGTYPE_p_idmef_value_type_id_t swig_types[75] #define SWIGTYPE_p_idmef_value_type_t swig_types[76] #define SWIGTYPE_p_idmef_web_service swig_types[77] #define SWIGTYPE_p_int swig_types[78] #define SWIGTYPE_p_long_long swig_types[79] #define SWIGTYPE_p_p_char swig_types[80] #define SWIGTYPE_p_p_float swig_types[81] #define SWIGTYPE_p_p_idmef_action swig_types[82] #define SWIGTYPE_p_p_idmef_action_category_t swig_types[83] #define SWIGTYPE_p_p_idmef_additional_data swig_types[84] #define SWIGTYPE_p_p_idmef_additional_data_type_t swig_types[85] #define SWIGTYPE_p_p_idmef_address swig_types[86] #define SWIGTYPE_p_p_idmef_address_category_t swig_types[87] #define SWIGTYPE_p_p_idmef_alert swig_types[88] #define SWIGTYPE_p_p_idmef_alertident swig_types[89] #define SWIGTYPE_p_p_idmef_analyzer swig_types[90] #define SWIGTYPE_p_p_idmef_assessment swig_types[91] #define SWIGTYPE_p_p_idmef_checksum swig_types[92] #define SWIGTYPE_p_p_idmef_checksum_algorithm_t swig_types[93] #define SWIGTYPE_p_p_idmef_classification swig_types[94] #define SWIGTYPE_p_p_idmef_confidence swig_types[95] #define SWIGTYPE_p_p_idmef_confidence_rating_t swig_types[96] #define SWIGTYPE_p_p_idmef_correlation_alert swig_types[97] #define SWIGTYPE_p_p_idmef_criteria swig_types[98] #define SWIGTYPE_p_p_idmef_criterion swig_types[99] #define SWIGTYPE_p_p_idmef_data_t swig_types[100] #define SWIGTYPE_p_p_idmef_file swig_types[101] #define SWIGTYPE_p_p_idmef_file_access swig_types[102] #define SWIGTYPE_p_p_idmef_file_category_t swig_types[103] #define SWIGTYPE_p_p_idmef_file_fstype_t swig_types[104] #define SWIGTYPE_p_p_idmef_heartbeat swig_types[105] #define SWIGTYPE_p_p_idmef_impact swig_types[106] #define SWIGTYPE_p_p_idmef_impact_completion_t swig_types[107] #define SWIGTYPE_p_p_idmef_impact_severity_t swig_types[108] #define SWIGTYPE_p_p_idmef_impact_type_t swig_types[109] #define SWIGTYPE_p_p_idmef_inode swig_types[110] #define SWIGTYPE_p_p_idmef_linkage swig_types[111] #define SWIGTYPE_p_p_idmef_linkage_category_t swig_types[112] #define SWIGTYPE_p_p_idmef_message swig_types[113] #define SWIGTYPE_p_p_idmef_node swig_types[114] #define SWIGTYPE_p_p_idmef_node_category_t swig_types[115] #define SWIGTYPE_p_p_idmef_overflow_alert swig_types[116] #define SWIGTYPE_p_p_idmef_path swig_types[117] #define SWIGTYPE_p_p_idmef_process swig_types[118] #define SWIGTYPE_p_p_idmef_reference swig_types[119] #define SWIGTYPE_p_p_idmef_reference_origin_t swig_types[120] #define SWIGTYPE_p_p_idmef_service swig_types[121] #define SWIGTYPE_p_p_idmef_snmp_service swig_types[122] #define SWIGTYPE_p_p_idmef_source swig_types[123] #define SWIGTYPE_p_p_idmef_source_spoofed_t swig_types[124] #define SWIGTYPE_p_p_idmef_target swig_types[125] #define SWIGTYPE_p_p_idmef_target_decoy_t swig_types[126] #define SWIGTYPE_p_p_idmef_time swig_types[127] #define SWIGTYPE_p_p_idmef_tool_alert swig_types[128] #define SWIGTYPE_p_p_idmef_user swig_types[129] #define SWIGTYPE_p_p_idmef_user_category_t swig_types[130] #define SWIGTYPE_p_p_idmef_user_id swig_types[131] #define SWIGTYPE_p_p_idmef_user_id_type_t swig_types[132] #define SWIGTYPE_p_p_idmef_value swig_types[133] #define SWIGTYPE_p_p_idmef_web_service swig_types[134] #define SWIGTYPE_p_p_int swig_types[135] #define SWIGTYPE_p_p_prelude_client swig_types[136] #define SWIGTYPE_p_p_prelude_client_profile swig_types[137] #define SWIGTYPE_p_p_prelude_connection swig_types[138] #define SWIGTYPE_p_p_prelude_connection_pool swig_types[139] #define SWIGTYPE_p_p_prelude_msg swig_types[140] #define SWIGTYPE_p_p_prelude_msgbuf swig_types[141] #define SWIGTYPE_p_p_prelude_option swig_types[142] #define SWIGTYPE_p_p_prelude_option_context swig_types[143] #define SWIGTYPE_p_p_prelude_string_t swig_types[144] #define SWIGTYPE_p_p_unsigned_char swig_types[145] #define SWIGTYPE_p_p_unsigned_int swig_types[146] #define SWIGTYPE_p_p_unsigned_long_long swig_types[147] #define SWIGTYPE_p_p_unsigned_short swig_types[148] #define SWIGTYPE_p_p_void swig_types[149] #define SWIGTYPE_p_prelude_bool_t swig_types[150] #define SWIGTYPE_p_prelude_client swig_types[151] #define SWIGTYPE_p_prelude_client_exit_status_t swig_types[152] #define SWIGTYPE_p_prelude_client_flags_t swig_types[153] #define SWIGTYPE_p_prelude_client_profile swig_types[154] #define SWIGTYPE_p_prelude_connection swig_types[155] #define SWIGTYPE_p_prelude_connection_permission_t swig_types[156] #define SWIGTYPE_p_prelude_connection_pool swig_types[157] #define SWIGTYPE_p_prelude_connection_pool_event_t swig_types[158] #define SWIGTYPE_p_prelude_connection_pool_flags_t swig_types[159] #define SWIGTYPE_p_prelude_connection_state_t swig_types[160] #define SWIGTYPE_p_prelude_error_code_t swig_types[161] #define SWIGTYPE_p_prelude_error_source_t swig_types[162] #define SWIGTYPE_p_prelude_ident_t swig_types[163] #define SWIGTYPE_p_prelude_io_t swig_types[164] #define SWIGTYPE_p_prelude_list_t swig_types[165] #define SWIGTYPE_p_prelude_log_flags_t swig_types[166] #define SWIGTYPE_p_prelude_log_t swig_types[167] #define SWIGTYPE_p_prelude_msg swig_types[168] #define SWIGTYPE_p_prelude_msg_priority_t swig_types[169] #define SWIGTYPE_p_prelude_msgbuf swig_types[170] #define SWIGTYPE_p_prelude_msgbuf_flags_t swig_types[171] #define SWIGTYPE_p_prelude_option swig_types[172] #define SWIGTYPE_p_prelude_option_argument_t swig_types[173] #define SWIGTYPE_p_prelude_option_context swig_types[174] #define SWIGTYPE_p_prelude_option_input_type_t swig_types[175] #define SWIGTYPE_p_prelude_option_priority_t swig_types[176] #define SWIGTYPE_p_prelude_option_type_t swig_types[177] #define SWIGTYPE_p_prelude_option_warning_t swig_types[178] #define SWIGTYPE_p_prelude_string_t swig_types[179] #define SWIGTYPE_p_prelude_timer_t swig_types[180] #define SWIGTYPE_p_short swig_types[181] #define SWIGTYPE_p_ssize_t swig_types[182] #define SWIGTYPE_p_time_t swig_types[183] #define SWIGTYPE_p_timeval swig_types[184] #define SWIGTYPE_p_unsigned_char swig_types[185] #define SWIGTYPE_p_unsigned_int swig_types[186] #define SWIGTYPE_p_unsigned_long_long swig_types[187] #define SWIGTYPE_p_unsigned_short swig_types[188] #define SWIGTYPE_p_void swig_types[189] static swig_type_info *swig_types[191]; static swig_module_info swig_module = {swig_types, 190, 0, 0, 0, 0}; #define SWIG_TypeQuery(name) SWIG_TypeQueryModule(&swig_module, &swig_module, name) #define SWIG_MangledTypeQuery(name) SWIG_MangledTypeQueryModule(&swig_module, &swig_module, name) /* -------- TYPES TABLE (END) -------- */ #if (PY_VERSION_HEX <= 0x02000000) # if !defined(SWIG_PYTHON_CLASSIC) # error "This python version requires swig to be run with the '-classic' option" # endif #endif #if PY_VERSION_HEX >= 0x03000000 # define SWIG_init PyInit__prelude #else # define SWIG_init init_prelude #endif #define SWIG_name "_prelude" #define SWIGVERSION 0x010340 #define SWIG_VERSION SWIGVERSION #define SWIG_as_voidptr(a) (void *)((const void *)(a)) #define SWIG_as_voidptrptr(a) ((void)SWIG_as_voidptr(*a),(void**)(a)) #include #include #include #include #include "prelude.h" #include "prelude-log.h" #include "prelude-msg.h" #include "prelude-option.h" #include "prelude-option-wide.h" #include "idmef.h" #include "idmef-message-write.h" #include "idmef-message-print.h" #include "idmef-additional-data.h" #include "idmef-tree-wrap.h" #include "prelude-inttypes.h" #define SWIG_From_long PyInt_FromLong SWIGINTERNINLINE PyObject * SWIG_From_int (int value) { return SWIG_From_long (value); } void *swig_idmef_value_get_descriptor(idmef_value_t *value) { unsigned int i = 0; idmef_class_id_t wanted_class = idmef_value_get_class(value); const struct { idmef_class_id_t classid; const char *classname; } tbl[] = { { IDMEF_CLASS_ID_ADDITIONAL_DATA, "idmef_additional_data_t *" }, { IDMEF_CLASS_ID_CLASSIFICATION, "idmef_classification_t *" }, { IDMEF_CLASS_ID_USER_ID, "idmef_user_id_t *" }, { IDMEF_CLASS_ID_USER, "idmef_user_t *" }, { IDMEF_CLASS_ID_ADDRESS, "idmef_address_t *" }, { IDMEF_CLASS_ID_PROCESS, "idmef_process_t *" }, { IDMEF_CLASS_ID_WEB_SERVICE, "idmef_web_service_t *" }, { IDMEF_CLASS_ID_SNMP_SERVICE, "idmef_snmp_service_t *" }, { IDMEF_CLASS_ID_SERVICE, "idmef_service_t *" }, { IDMEF_CLASS_ID_NODE, "idmef_node_t *" }, { IDMEF_CLASS_ID_SOURCE, "idmef_source_t *" }, { IDMEF_CLASS_ID_FILE_ACCESS, "idmef_file_access_t *" }, { IDMEF_CLASS_ID_INODE, "idmef_inode_t *" }, { IDMEF_CLASS_ID_FILE, "idmef_file_t *" }, { IDMEF_CLASS_ID_LINKAGE, "idmef_linkage_t *" }, { IDMEF_CLASS_ID_TARGET, "idmef_target_t *" }, { IDMEF_CLASS_ID_ANALYZER, "idmef_analyzer_t *" }, { IDMEF_CLASS_ID_ALERTIDENT, "idmef_alertident_t *" }, { IDMEF_CLASS_ID_IMPACT, "idmef_impact_t *" }, { IDMEF_CLASS_ID_ACTION, "idmef_action_t *" }, { IDMEF_CLASS_ID_CONFIDENCE, "idmef_confidence_t *" }, { IDMEF_CLASS_ID_ASSESSMENT, "idmef_assessment_t *" }, { IDMEF_CLASS_ID_TOOL_ALERT, "idmef_tool_alert_t *" }, { IDMEF_CLASS_ID_CORRELATION_ALERT, "idmef_correlation_alert_t *" }, { IDMEF_CLASS_ID_OVERFLOW_ALERT, "idmef_overflow_alert_t *" }, { IDMEF_CLASS_ID_ALERT, "idmef_alert_t *" }, { IDMEF_CLASS_ID_HEARTBEAT, "idmef_heartbeat_t *" }, { IDMEF_CLASS_ID_MESSAGE, "idmef_message_t *" }, { IDMEF_CLASS_ID_REFERENCE, "idmef_reference_t *" }, { IDMEF_CLASS_ID_CHECKSUM, "idmef_checksum_t *" }, { 0, NULL } }; for ( i = 0; tbl[i].classname != NULL; i++ ) { if ( tbl[i].classid == wanted_class ) return SWIG_TypeQuery(tbl[i].classname); } return NULL; } void swig_python_raise_exception(int error) { PyObject *module; PyObject *exception_class; PyObject *exception; module = PyImport_ImportModule("prelude"); exception_class = PyObject_GetAttrString(module, "PreludeError"); exception = PyObject_CallFunction(exception_class, "i", error); if ( exception ) { PyErr_SetObject(exception_class, exception); Py_DECREF(exception); } Py_DECREF(module); Py_DECREF(exception_class); } PyObject *swig_python_string(prelude_string_t *string) { if ( string ) return PyString_FromStringAndSize(prelude_string_get_string(string), prelude_string_get_len(string)); else { Py_INCREF(Py_None); return Py_None; } } PyObject *swig_python_data(idmef_data_t *data) { switch ( idmef_data_get_type(data) ) { case IDMEF_DATA_TYPE_CHAR: case IDMEF_DATA_TYPE_BYTE: return PyString_FromStringAndSize((const char *)idmef_data_get_data(data), 1); case IDMEF_DATA_TYPE_CHAR_STRING: return PyString_FromStringAndSize((const char *)idmef_data_get_data(data), idmef_data_get_len(data) - 1); case IDMEF_DATA_TYPE_BYTE_STRING: return PyString_FromStringAndSize((const char *)idmef_data_get_data(data), idmef_data_get_len(data)); case IDMEF_DATA_TYPE_UINT32: return PyLong_FromLongLong(idmef_data_get_uint32(data)); case IDMEF_DATA_TYPE_UINT64: return PyLong_FromUnsignedLongLong(idmef_data_get_uint64(data)); case IDMEF_DATA_TYPE_FLOAT: return PyFloat_FromDouble((double) idmef_data_get_float(data)); default: Py_INCREF(Py_None); return Py_None; } } SWIGINTERN swig_type_info* SWIG_pchar_descriptor(void) { static int init = 0; static swig_type_info* info = 0; if (!init) { info = SWIG_TypeQuery("_p_char"); init = 1; } return info; } SWIGINTERNINLINE PyObject * SWIG_FromCharPtrAndSize(const char* carray, size_t size) { if (carray) { if (size > INT_MAX) { swig_type_info* pchar_descriptor = SWIG_pchar_descriptor(); return pchar_descriptor ? SWIG_NewPointerObj((char *)(carray), pchar_descriptor, 0) : SWIG_Py_Void(); } else { #if PY_VERSION_HEX >= 0x03000000 return PyUnicode_FromStringAndSize(carray, (int)(size)); #else return PyString_FromStringAndSize(carray, (int)(size)); #endif } } else { return SWIG_Py_Void(); } } SWIGINTERNINLINE PyObject * SWIG_FromCharPtr(const char *cptr) { return SWIG_FromCharPtrAndSize(cptr, (cptr ? strlen(cptr) : 0)); } SWIGINTERN int SWIG_AsCharPtrAndSize(PyObject *obj, char** cptr, size_t* psize, int *alloc) { #if PY_VERSION_HEX>=0x03000000 if (PyUnicode_Check(obj)) #else if (PyString_Check(obj)) #endif { char *cstr; Py_ssize_t len; #if PY_VERSION_HEX>=0x03000000 if (!alloc && cptr) { /* We can't allow converting without allocation, since the internal representation of string in Python 3 is UCS-2/UCS-4 but we require a UTF-8 representation. TODO(bhy) More detailed explanation */ return SWIG_RuntimeError; } obj = PyUnicode_AsUTF8String(obj); PyBytes_AsStringAndSize(obj, &cstr, &len); if(alloc) *alloc = SWIG_NEWOBJ; #else PyString_AsStringAndSize(obj, &cstr, &len); #endif if (cptr) { if (alloc) { /* In python the user should not be able to modify the inner string representation. To warranty that, if you define SWIG_PYTHON_SAFE_CSTRINGS, a new/copy of the python string buffer is always returned. The default behavior is just to return the pointer value, so, be careful. */ #if defined(SWIG_PYTHON_SAFE_CSTRINGS) if (*alloc != SWIG_OLDOBJ) #else if (*alloc == SWIG_NEWOBJ) #endif { *cptr = (char *)memcpy((char *)malloc((len + 1)*sizeof(char)), cstr, sizeof(char)*(len + 1)); *alloc = SWIG_NEWOBJ; } else { *cptr = cstr; *alloc = SWIG_OLDOBJ; } } else { #if PY_VERSION_HEX>=0x03000000 assert(0); /* Should never reach here in Python 3 */ #endif *cptr = SWIG_Python_str_AsChar(obj); } } if (psize) *psize = len + 1; #if PY_VERSION_HEX>=0x03000000 Py_XDECREF(obj); #endif return SWIG_OK; } else { swig_type_info* pchar_descriptor = SWIG_pchar_descriptor(); if (pchar_descriptor) { void* vptr = 0; if (SWIG_ConvertPtr(obj, &vptr, pchar_descriptor, 0) == SWIG_OK) { if (cptr) *cptr = (char *) vptr; if (psize) *psize = vptr ? (strlen((char *)vptr) + 1) : 0; if (alloc) *alloc = SWIG_OLDOBJ; return SWIG_OK; } } } return SWIG_TypeError; } #include #if !defined(SWIG_NO_LLONG_MAX) # if !defined(LLONG_MAX) && defined(__GNUC__) && defined (__LONG_LONG_MAX__) # define LLONG_MAX __LONG_LONG_MAX__ # define LLONG_MIN (-LLONG_MAX - 1LL) # define ULLONG_MAX (LLONG_MAX * 2ULL + 1ULL) # endif #endif SWIGINTERN int SWIG_AsVal_double (PyObject *obj, double *val) { int res = SWIG_TypeError; if (PyFloat_Check(obj)) { if (val) *val = PyFloat_AsDouble(obj); return SWIG_OK; } else if (PyInt_Check(obj)) { if (val) *val = PyInt_AsLong(obj); return SWIG_OK; } else if (PyLong_Check(obj)) { double v = PyLong_AsDouble(obj); if (!PyErr_Occurred()) { if (val) *val = v; return SWIG_OK; } else { PyErr_Clear(); } } #ifdef SWIG_PYTHON_CAST_MODE { int dispatch = 0; double d = PyFloat_AsDouble(obj); if (!PyErr_Occurred()) { if (val) *val = d; return SWIG_AddCast(SWIG_OK); } else { PyErr_Clear(); } if (!dispatch) { long v = PyLong_AsLong(obj); if (!PyErr_Occurred()) { if (val) *val = v; return SWIG_AddCast(SWIG_AddCast(SWIG_OK)); } else { PyErr_Clear(); } } } #endif return res; } #include #include SWIGINTERNINLINE int SWIG_CanCastAsInteger(double *d, double min, double max) { double x = *d; if ((min <= x && x <= max)) { double fx = floor(x); double cx = ceil(x); double rd = ((x - fx) < 0.5) ? fx : cx; /* simple rint */ if ((errno == EDOM) || (errno == ERANGE)) { errno = 0; } else { double summ, reps, diff; if (rd < x) { diff = x - rd; } else if (rd > x) { diff = rd - x; } else { return 1; } summ = rd + x; reps = diff/summ; if (reps < 8*DBL_EPSILON) { *d = rd; return 1; } } } return 0; } SWIGINTERN int SWIG_AsVal_long (PyObject *obj, long* val) { if (PyInt_Check(obj)) { if (val) *val = PyInt_AsLong(obj); return SWIG_OK; } else if (PyLong_Check(obj)) { long v = PyLong_AsLong(obj); if (!PyErr_Occurred()) { if (val) *val = v; return SWIG_OK; } else { PyErr_Clear(); } } #ifdef SWIG_PYTHON_CAST_MODE { int dispatch = 0; long v = PyInt_AsLong(obj); if (!PyErr_Occurred()) { if (val) *val = v; return SWIG_AddCast(SWIG_OK); } else { PyErr_Clear(); } if (!dispatch) { double d; int res = SWIG_AddCast(SWIG_AsVal_double (obj,&d)); if (SWIG_IsOK(res) && SWIG_CanCastAsInteger(&d, LONG_MIN, LONG_MAX)) { if (val) *val = (long)(d); return res; } } } #endif return SWIG_TypeError; } SWIGINTERN int SWIG_AsVal_int (PyObject * obj, int *val) { long v; int res = SWIG_AsVal_long (obj, &v); if (SWIG_IsOK(res)) { if ((v < INT_MIN || v > INT_MAX)) { return SWIG_OverflowError; } else { if (val) *val = (int)(v); } } return res; } SWIGINTERN int SWIG_AsVal_unsigned_SS_long (PyObject *obj, unsigned long *val) { if (PyInt_Check(obj)) { long v = PyInt_AsLong(obj); if (v >= 0) { if (val) *val = v; return SWIG_OK; } else { return SWIG_OverflowError; } } else if (PyLong_Check(obj)) { unsigned long v = PyLong_AsUnsignedLong(obj); if (!PyErr_Occurred()) { if (val) *val = v; return SWIG_OK; } else { PyErr_Clear(); } } #ifdef SWIG_PYTHON_CAST_MODE { int dispatch = 0; unsigned long v = PyLong_AsUnsignedLong(obj); if (!PyErr_Occurred()) { if (val) *val = v; return SWIG_AddCast(SWIG_OK); } else { PyErr_Clear(); } if (!dispatch) { double d; int res = SWIG_AddCast(SWIG_AsVal_double (obj,&d)); if (SWIG_IsOK(res) && SWIG_CanCastAsInteger(&d, 0, ULONG_MAX)) { if (val) *val = (unsigned long)(d); return res; } } } #endif return SWIG_TypeError; } SWIGINTERNINLINE int SWIG_AsVal_size_t (PyObject * obj, size_t *val) { unsigned long v; int res = SWIG_AsVal_unsigned_SS_long (obj, val ? &v : 0); if (SWIG_IsOK(res) && val) *val = (size_t)(v); return res; } SWIGINTERNINLINE PyObject* SWIG_From_long_SS_long (long long value) { return ((value < LONG_MIN) || (value > LONG_MAX)) ? PyLong_FromLongLong(value) : PyInt_FromLong((long)(value)); } SWIGINTERNINLINE PyObject* SWIG_From_unsigned_SS_long_SS_long (unsigned long long value) { return (value > LONG_MAX) ? PyLong_FromUnsignedLongLong(value) : PyInt_FromLong((long)(value)); } SWIGINTERN int SWIG_AsVal_unsigned_SS_long_SS_long (PyObject *obj, unsigned long long *val) { int res = SWIG_TypeError; if (PyLong_Check(obj)) { unsigned long long v = PyLong_AsUnsignedLongLong(obj); if (!PyErr_Occurred()) { if (val) *val = v; return SWIG_OK; } else { PyErr_Clear(); } } else { unsigned long v; res = SWIG_AsVal_unsigned_SS_long (obj,&v); if (SWIG_IsOK(res)) { if (val) *val = v; return res; } } #ifdef SWIG_PYTHON_CAST_MODE { const double mant_max = 1LL << DBL_MANT_DIG; double d; res = SWIG_AsVal_double (obj,&d); if (SWIG_IsOK(res) && SWIG_CanCastAsInteger(&d, 0, mant_max)) { if (val) *val = (unsigned long long)(d); return SWIG_AddCast(res); } res = SWIG_TypeError; } #endif return res; } SWIGINTERN int SWIG_AsVal_unsigned_SS_int (PyObject * obj, unsigned int *val) { unsigned long v; int res = SWIG_AsVal_unsigned_SS_long (obj, &v); if (SWIG_IsOK(res)) { if ((v > UINT_MAX)) { return SWIG_OverflowError; } else { if (val) *val = (unsigned int)(v); } } return res; } SWIGINTERN int SWIG_AsVal_unsigned_SS_char (PyObject * obj, unsigned char *val) { unsigned long v; int res = SWIG_AsVal_unsigned_SS_long (obj, &v); if (SWIG_IsOK(res)) { if ((v > UCHAR_MAX)) { return SWIG_OverflowError; } else { if (val) *val = (unsigned char)(v); } } return res; } SWIGINTERN int SWIG_AsVal_unsigned_SS_short (PyObject * obj, unsigned short *val) { unsigned long v; int res = SWIG_AsVal_unsigned_SS_long (obj, &v); if (SWIG_IsOK(res)) { if ((v > USHRT_MAX)) { return SWIG_OverflowError; } else { if (val) *val = (unsigned short)(v); } } return res; } #define SWIG_From_double PyFloat_FromDouble SWIGINTERNINLINE PyObject * SWIG_From_float (float value) { return SWIG_From_double (value); } SWIGINTERN int SWIG_AsVal_float (PyObject * obj, float *val) { double v; int res = SWIG_AsVal_double (obj, &v); if (SWIG_IsOK(res)) { if ((v < -FLT_MAX || v > FLT_MAX)) { return SWIG_OverflowError; } else { if (val) *val = (float)(v); } } return res; } SWIGINTERN int SWIG_AsCharArray(PyObject * obj, char *val, size_t size) { char* cptr = 0; size_t csize = 0; int alloc = SWIG_OLDOBJ; int res = SWIG_AsCharPtrAndSize(obj, &cptr, &csize, &alloc); if (SWIG_IsOK(res)) { if ((csize == size + 1) && cptr && !(cptr[csize-1])) --csize; if (csize <= size) { if (val) { if (csize) memcpy(val, cptr, csize*sizeof(char)); if (csize < size) memset(val + csize, 0, (size - csize)*sizeof(char)); } if (alloc == SWIG_NEWOBJ) { free((char*)cptr); res = SWIG_DelNewMask(res); } return res; } if (alloc == SWIG_NEWOBJ) free((char*)cptr); } return SWIG_TypeError; } SWIGINTERN int SWIG_AsVal_char (PyObject * obj, char *val) { int res = SWIG_AsCharArray(obj, val, 1); if (!SWIG_IsOK(res)) { long v; res = SWIG_AddCast(SWIG_AsVal_long (obj, &v)); if (SWIG_IsOK(res)) { if ((CHAR_MIN <= v) && (v <= CHAR_MAX)) { if (val) *val = (char)(v); } else { res = SWIG_OverflowError; } } } return res; } SWIGINTERN int SWIG_AsVal_short (PyObject * obj, short *val) { long v; int res = SWIG_AsVal_long (obj, &v); if (SWIG_IsOK(res)) { if ((v < SHRT_MIN || v > SHRT_MAX)) { return SWIG_OverflowError; } else { if (val) *val = (short)(v); } } return res; } SWIGINTERN int SWIG_AsVal_long_SS_long (PyObject *obj, long long *val) { int res = SWIG_TypeError; if (PyLong_Check(obj)) { long long v = PyLong_AsLongLong(obj); if (!PyErr_Occurred()) { if (val) *val = v; return SWIG_OK; } else { PyErr_Clear(); } } else { long v; res = SWIG_AsVal_long (obj,&v); if (SWIG_IsOK(res)) { if (val) *val = v; return res; } } #ifdef SWIG_PYTHON_CAST_MODE { const double mant_max = 1LL << DBL_MANT_DIG; const double mant_min = -mant_max; double d; res = SWIG_AsVal_double (obj,&d); if (SWIG_IsOK(res) && SWIG_CanCastAsInteger(&d, mant_min, mant_max)) { if (val) *val = (long long)(d); return SWIG_AddCast(res); } res = SWIG_TypeError; } #endif return res; } SWIGINTERNINLINE PyObject * SWIG_From_char (char c) { return SWIG_FromCharPtrAndSize(&c,1); } SWIGINTERNINLINE PyObject* SWIG_From_unsigned_SS_long (unsigned long value) { return (value > LONG_MAX) ? PyLong_FromUnsignedLong(value) : PyInt_FromLong((long)(value)); } SWIGINTERNINLINE PyObject * SWIG_From_unsigned_SS_char (unsigned char value) { return SWIG_From_unsigned_SS_long (value); } SWIGINTERNINLINE PyObject * SWIG_From_short (short value) { return SWIG_From_long (value); } SWIGINTERNINLINE PyObject * SWIG_From_unsigned_SS_short (unsigned short value) { return SWIG_From_unsigned_SS_long (value); } SWIGINTERNINLINE PyObject * SWIG_From_unsigned_SS_int (unsigned int value) { return SWIG_From_unsigned_SS_long (value); } SWIGINTERNINLINE PyObject * SWIG_From_size_t (size_t value) { return SWIG_From_unsigned_SS_long ((unsigned long)(value)); } typedef union { char char_data; uint8_t byte_data; uint32_t uint32_data; uint64_t uint64_data; float float_data; void *rw_data; const void *ro_data; } idmef_data_t_data; #ifdef __cplusplus extern "C" { #endif SWIGINTERN PyObject *_wrap_prelude_init(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; int *arg1 = (int *) 0 ; char **arg2 = (char **) 0 ; int tmp1 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; int result; if (!PyArg_ParseTuple(args,(char *)"OO:prelude_init",&obj0,&obj1)) SWIG_fail; { tmp1 = PyInt_AsLong(obj0); arg1 = &tmp1; } { /* Check if is a list */ if ( PyList_Check(obj1) ) { int size = PyList_Size(obj1); int i = 0; arg2 = (char **) malloc((size+1) * sizeof(char *)); for ( i = 0; i < size; i++ ) { PyObject *o = PyList_GetItem(obj1,i); if ( PyString_Check(o) ) arg2[i] = PyString_AsString(PyList_GetItem(obj1, i)); else { PyErr_SetString(PyExc_TypeError, "list must contain strings"); free(arg2); return NULL; } } arg2[i] = 0; } else { PyErr_SetString(PyExc_TypeError, "not a list"); return NULL; } } { Py_BEGIN_ALLOW_THREADS result = (int)prelude_init(arg1,arg2); Py_END_ALLOW_THREADS } { if ( result < 0 ) { swig_python_raise_exception(result); resultobj = NULL; } else { resultobj = PyInt_FromLong(result); } } { free(arg2); } return resultobj; fail: { free(arg2); } return NULL; } SWIGINTERN PyObject *_wrap_prelude_deinit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; if (!PyArg_ParseTuple(args,(char *)":prelude_deinit")) SWIG_fail; { Py_BEGIN_ALLOW_THREADS prelude_deinit(); Py_END_ALLOW_THREADS } resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_prelude_check_version(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; char *arg1 = (char *) 0 ; PyObject * obj0 = 0 ; char *result = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:prelude_check_version",&obj0)) SWIG_fail; { if ( obj0 == Py_None ) arg1 = NULL; else if ( PyString_Check(obj0) ) arg1 = PyString_AsString(obj0); else { PyErr_Format(PyExc_TypeError, "expected None or string, %s found", obj0->ob_type->tp_name); return NULL; } } { Py_BEGIN_ALLOW_THREADS result = (char *)prelude_check_version((char const *)arg1); Py_END_ALLOW_THREADS } resultobj = SWIG_FromCharPtr((const char *)result); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_prelude_thread_init(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; void *arg1 = (void *) 0 ; int res1 ; PyObject * obj0 = 0 ; int result; if (!PyArg_ParseTuple(args,(char *)"O:prelude_thread_init",&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0,SWIG_as_voidptrptr(&arg1), 0, 0); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "prelude_thread_init" "', argument " "1"" of type '" "void *""'"); } { Py_BEGIN_ALLOW_THREADS result = (int)prelude_thread_init(arg1); Py_END_ALLOW_THREADS } { if ( result < 0 ) { swig_python_raise_exception(result); resultobj = NULL; } else { resultobj = PyInt_FromLong(result); } } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_prelude_fork_prepare(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; if (!PyArg_ParseTuple(args,(char *)":prelude_fork_prepare")) SWIG_fail; { Py_BEGIN_ALLOW_THREADS prelude_fork_prepare(); Py_END_ALLOW_THREADS } resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_prelude_fork_parent(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; if (!PyArg_ParseTuple(args,(char *)":prelude_fork_parent")) SWIG_fail; { Py_BEGIN_ALLOW_THREADS prelude_fork_parent(); Py_END_ALLOW_THREADS } resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_prelude_fork_child(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; if (!PyArg_ParseTuple(args,(char *)":prelude_fork_child")) SWIG_fail; { Py_BEGIN_ALLOW_THREADS prelude_fork_child(); Py_END_ALLOW_THREADS } resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_prelude_client_get_unique_ident(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; prelude_client_t *arg1 = (prelude_client_t *) 0 ; PyObject * obj0 = 0 ; prelude_ident_t *result = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:prelude_client_get_unique_ident",&obj0)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_prelude_client, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { Py_BEGIN_ALLOW_THREADS result = (prelude_ident_t *)prelude_client_get_unique_ident(arg1); Py_END_ALLOW_THREADS } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_prelude_ident_t, 0 | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_prelude_client_set_connection_pool(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; prelude_client_t *arg1 = (prelude_client_t *) 0 ; prelude_connection_pool_t *arg2 = (prelude_connection_pool_t *) 0 ; void *argp2 = 0 ; int res2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:prelude_client_set_connection_pool",&obj0,&obj1)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_prelude_client, SWIG_POINTER_EXCEPTION|0) ) return NULL; } res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_prelude_connection_pool, 0 | 0 ); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "prelude_client_set_connection_pool" "', argument " "2"" of type '" "prelude_connection_pool_t *""'"); } arg2 = (prelude_connection_pool_t *)(argp2); { Py_BEGIN_ALLOW_THREADS prelude_client_set_connection_pool(arg1,arg2); Py_END_ALLOW_THREADS } resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_prelude_client_get_connection_pool(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; prelude_client_t *arg1 = (prelude_client_t *) 0 ; PyObject * obj0 = 0 ; prelude_connection_pool_t *result = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:prelude_client_get_connection_pool",&obj0)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_prelude_client, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { Py_BEGIN_ALLOW_THREADS result = (prelude_connection_pool_t *)prelude_client_get_connection_pool(arg1); Py_END_ALLOW_THREADS } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_prelude_connection_pool, 0 | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_prelude_client_start(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; prelude_client_t *arg1 = (prelude_client_t *) 0 ; PyObject * obj0 = 0 ; int result; if (!PyArg_ParseTuple(args,(char *)"O:prelude_client_start",&obj0)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_prelude_client, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { Py_BEGIN_ALLOW_THREADS result = (int)prelude_client_start(arg1); Py_END_ALLOW_THREADS } { if ( result < 0 ) { swig_python_raise_exception(result); resultobj = NULL; } else { resultobj = PyInt_FromLong(result); } } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_prelude_client_init(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; prelude_client_t *arg1 = (prelude_client_t *) 0 ; PyObject * obj0 = 0 ; int result; if (!PyArg_ParseTuple(args,(char *)"O:prelude_client_init",&obj0)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_prelude_client, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { Py_BEGIN_ALLOW_THREADS result = (int)prelude_client_init(arg1); Py_END_ALLOW_THREADS } { if ( result < 0 ) { swig_python_raise_exception(result); resultobj = NULL; } else { resultobj = PyInt_FromLong(result); } } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_prelude_client_new(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; prelude_client_t **arg1 = (prelude_client_t **) 0 ; char *arg2 = (char *) 0 ; prelude_client_t *tmp1 ; PyObject * obj0 = 0 ; int result; { arg1 = (prelude_client_t **) &tmp1; } if (!PyArg_ParseTuple(args,(char *)"O:prelude_client_new",&obj0)) SWIG_fail; { if ( obj0 == Py_None ) arg2 = NULL; else if ( PyString_Check(obj0) ) arg2 = PyString_AsString(obj0); else { PyErr_Format(PyExc_TypeError, "expected None or string, %s found", obj0->ob_type->tp_name); return NULL; } } { Py_BEGIN_ALLOW_THREADS result = (int)prelude_client_new(arg1,(char const *)arg2); Py_END_ALLOW_THREADS } { if ( result < 0 ) { swig_python_raise_exception(result); resultobj = NULL; } else { resultobj = PyInt_FromLong(result); } } { if ( result >= 0 ) resultobj = SWIG_NewPointerObj((void *) * arg1, SWIGTYPE_p_prelude_client, 0); } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_prelude_client_ref(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; prelude_client_t *arg1 = (prelude_client_t *) 0 ; PyObject * obj0 = 0 ; prelude_client_t *result = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:prelude_client_ref",&obj0)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_prelude_client, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { Py_BEGIN_ALLOW_THREADS result = (prelude_client_t *)prelude_client_ref(arg1); Py_END_ALLOW_THREADS } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_prelude_client, 0 | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_prelude_client_get_analyzer(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; prelude_client_t *arg1 = (prelude_client_t *) 0 ; PyObject * obj0 = 0 ; idmef_analyzer_t *result = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:prelude_client_get_analyzer",&obj0)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_prelude_client, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { Py_BEGIN_ALLOW_THREADS result = (idmef_analyzer_t *)prelude_client_get_analyzer(arg1); Py_END_ALLOW_THREADS } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_idmef_analyzer, 0 | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_prelude_client_get_flags(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; prelude_client_t *arg1 = (prelude_client_t *) 0 ; PyObject * obj0 = 0 ; prelude_client_flags_t result; if (!PyArg_ParseTuple(args,(char *)"O:prelude_client_get_flags",&obj0)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_prelude_client, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { Py_BEGIN_ALLOW_THREADS result = (prelude_client_flags_t)prelude_client_get_flags(arg1); Py_END_ALLOW_THREADS } resultobj = SWIG_From_int((int)(result)); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_prelude_client_set_required_permission(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; prelude_client_t *arg1 = (prelude_client_t *) 0 ; prelude_connection_permission_t arg2 ; int val2 ; int ecode2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:prelude_client_set_required_permission",&obj0,&obj1)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_prelude_client, SWIG_POINTER_EXCEPTION|0) ) return NULL; } ecode2 = SWIG_AsVal_int(obj1, &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "prelude_client_set_required_permission" "', argument " "2"" of type '" "prelude_connection_permission_t""'"); } arg2 = (prelude_connection_permission_t)(val2); { Py_BEGIN_ALLOW_THREADS prelude_client_set_required_permission(arg1,arg2); Py_END_ALLOW_THREADS } resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_prelude_client_get_required_permission(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; prelude_client_t *arg1 = (prelude_client_t *) 0 ; PyObject * obj0 = 0 ; prelude_connection_permission_t result; if (!PyArg_ParseTuple(args,(char *)"O:prelude_client_get_required_permission",&obj0)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_prelude_client, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { Py_BEGIN_ALLOW_THREADS result = (prelude_connection_permission_t)prelude_client_get_required_permission(arg1); Py_END_ALLOW_THREADS } resultobj = SWIG_From_int((int)(result)); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_prelude_client_send_msg(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; prelude_client_t *arg1 = (prelude_client_t *) 0 ; prelude_msg_t *arg2 = (prelude_msg_t *) 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:prelude_client_send_msg",&obj0,&obj1)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_prelude_client, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { if ( obj1 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj1, (void **)&arg2, SWIGTYPE_p_prelude_msg, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { Py_BEGIN_ALLOW_THREADS prelude_client_send_msg(arg1,arg2); Py_END_ALLOW_THREADS } resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_prelude_client_recv_msg(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; prelude_client_t *arg1 = (prelude_client_t *) 0 ; int arg2 ; prelude_msg_t **arg3 = (prelude_msg_t **) 0 ; int val2 ; int ecode2 = 0 ; prelude_msg_t *tmp3 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; int result; { arg3 = (prelude_msg_t **) &tmp3; } if (!PyArg_ParseTuple(args,(char *)"OO:prelude_client_recv_msg",&obj0,&obj1)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_prelude_client, SWIG_POINTER_EXCEPTION|0) ) return NULL; } ecode2 = SWIG_AsVal_int(obj1, &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "prelude_client_recv_msg" "', argument " "2"" of type '" "int""'"); } arg2 = (int)(val2); { Py_BEGIN_ALLOW_THREADS result = (int)prelude_client_recv_msg(arg1,arg2,arg3); Py_END_ALLOW_THREADS } { if ( result < 0 ) { swig_python_raise_exception(result); resultobj = NULL; } else { resultobj = PyInt_FromLong(result); } } { if ( result >= 0 ) resultobj = SWIG_NewPointerObj((void *) * arg3, SWIGTYPE_p_prelude_msg, 0); } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_prelude_client_set_heartbeat_cb(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; prelude_client_t *arg1 = (prelude_client_t *) 0 ; void (*arg2)(prelude_client_t *,idmef_message_t *) = (void (*)(prelude_client_t *,idmef_message_t *)) 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:prelude_client_set_heartbeat_cb",&obj0,&obj1)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_prelude_client, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { int res = SWIG_ConvertFunctionPtr(obj1, (void**)(&arg2), SWIGTYPE_p_f_p_struct_prelude_client_p_struct_idmef_message__void); if (!SWIG_IsOK(res)) { SWIG_exception_fail(SWIG_ArgError(res), "in method '" "prelude_client_set_heartbeat_cb" "', argument " "2"" of type '" "void (*)(prelude_client_t *,idmef_message_t *)""'"); } } { Py_BEGIN_ALLOW_THREADS prelude_client_set_heartbeat_cb(arg1,arg2); Py_END_ALLOW_THREADS } resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_prelude_client_send_idmef(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; prelude_client_t *arg1 = (prelude_client_t *) 0 ; idmef_message_t *arg2 = (idmef_message_t *) 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:prelude_client_send_idmef",&obj0,&obj1)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_prelude_client, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { if ( obj1 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj1, (void **)&arg2, SWIGTYPE_p_idmef_message, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { Py_BEGIN_ALLOW_THREADS prelude_client_send_idmef(arg1,arg2); Py_END_ALLOW_THREADS } resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_prelude_client_recv_idmef(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; prelude_client_t *arg1 = (prelude_client_t *) 0 ; int arg2 ; idmef_message_t **arg3 = (idmef_message_t **) 0 ; int val2 ; int ecode2 = 0 ; idmef_message_t *tmp3 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; int result; { arg3 = (idmef_message_t **) &tmp3; } if (!PyArg_ParseTuple(args,(char *)"OO:prelude_client_recv_idmef",&obj0,&obj1)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_prelude_client, SWIG_POINTER_EXCEPTION|0) ) return NULL; } ecode2 = SWIG_AsVal_int(obj1, &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "prelude_client_recv_idmef" "', argument " "2"" of type '" "int""'"); } arg2 = (int)(val2); { Py_BEGIN_ALLOW_THREADS result = (int)prelude_client_recv_idmef(arg1,arg2,arg3); Py_END_ALLOW_THREADS } { if ( result < 0 ) { swig_python_raise_exception(result); resultobj = NULL; } else { resultobj = PyInt_FromLong(result); } } { if ( result >= 0 ) resultobj = SWIG_NewPointerObj((void *) * arg3, SWIGTYPE_p_idmef_message, 0); } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_prelude_client_destroy(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; prelude_client_t *arg1 = (prelude_client_t *) 0 ; prelude_client_exit_status_t arg2 ; int val2 ; int ecode2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:prelude_client_destroy",&obj0,&obj1)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_prelude_client, SWIG_POINTER_EXCEPTION|0) ) return NULL; } ecode2 = SWIG_AsVal_int(obj1, &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "prelude_client_destroy" "', argument " "2"" of type '" "prelude_client_exit_status_t""'"); } arg2 = (prelude_client_exit_status_t)(val2); { Py_BEGIN_ALLOW_THREADS prelude_client_destroy(arg1,arg2); Py_END_ALLOW_THREADS } resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_prelude_client_set_flags(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; prelude_client_t *arg1 = (prelude_client_t *) 0 ; prelude_client_flags_t arg2 ; int val2 ; int ecode2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; int result; if (!PyArg_ParseTuple(args,(char *)"OO:prelude_client_set_flags",&obj0,&obj1)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_prelude_client, SWIG_POINTER_EXCEPTION|0) ) return NULL; } ecode2 = SWIG_AsVal_int(obj1, &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "prelude_client_set_flags" "', argument " "2"" of type '" "prelude_client_flags_t""'"); } arg2 = (prelude_client_flags_t)(val2); { Py_BEGIN_ALLOW_THREADS result = (int)prelude_client_set_flags(arg1,arg2); Py_END_ALLOW_THREADS } { if ( result < 0 ) { swig_python_raise_exception(result); resultobj = NULL; } else { resultobj = PyInt_FromLong(result); } } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_prelude_client_set_config_filename(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; prelude_client_t *arg1 = (prelude_client_t *) 0 ; char *arg2 = (char *) 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; int result; if (!PyArg_ParseTuple(args,(char *)"OO:prelude_client_set_config_filename",&obj0,&obj1)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_prelude_client, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { if ( obj1 == Py_None ) arg2 = NULL; else if ( PyString_Check(obj1) ) arg2 = PyString_AsString(obj1); else { PyErr_Format(PyExc_TypeError, "expected None or string, %s found", obj1->ob_type->tp_name); return NULL; } } { Py_BEGIN_ALLOW_THREADS result = (int)prelude_client_set_config_filename(arg1,(char const *)arg2); Py_END_ALLOW_THREADS } { if ( result < 0 ) { swig_python_raise_exception(result); resultobj = NULL; } else { resultobj = PyInt_FromLong(result); } } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_prelude_client_get_config_filename(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; prelude_client_t *arg1 = (prelude_client_t *) 0 ; PyObject * obj0 = 0 ; char *result = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:prelude_client_get_config_filename",&obj0)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_prelude_client, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { Py_BEGIN_ALLOW_THREADS result = (char *)prelude_client_get_config_filename(arg1); Py_END_ALLOW_THREADS } resultobj = SWIG_FromCharPtr((const char *)result); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_prelude_client_get_profile(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; prelude_client_t *arg1 = (prelude_client_t *) 0 ; PyObject * obj0 = 0 ; prelude_client_profile_t *result = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:prelude_client_get_profile",&obj0)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_prelude_client, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { Py_BEGIN_ALLOW_THREADS result = (prelude_client_profile_t *)prelude_client_get_profile(arg1); Py_END_ALLOW_THREADS } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_prelude_client_profile, 0 | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_prelude_client_new_msgbuf(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; prelude_client_t *arg1 = (prelude_client_t *) 0 ; prelude_msgbuf_t **arg2 = (prelude_msgbuf_t **) 0 ; prelude_msgbuf_t *tmp2 ; PyObject * obj0 = 0 ; int result; { arg2 = (prelude_msgbuf_t **) &tmp2; } if (!PyArg_ParseTuple(args,(char *)"O:prelude_client_new_msgbuf",&obj0)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_prelude_client, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { Py_BEGIN_ALLOW_THREADS result = (int)prelude_client_new_msgbuf(arg1,arg2); Py_END_ALLOW_THREADS } { if ( result < 0 ) { swig_python_raise_exception(result); resultobj = NULL; } else { resultobj = PyInt_FromLong(result); } } { if ( result >= 0 ) resultobj = SWIG_NewPointerObj((void *) * arg2, SWIGTYPE_p_prelude_msgbuf, 0); } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_prelude_client_handle_msg_default(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; prelude_client_t *arg1 = (prelude_client_t *) 0 ; prelude_msg_t *arg2 = (prelude_msg_t *) 0 ; prelude_msgbuf_t *arg3 = (prelude_msgbuf_t *) 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; PyObject * obj2 = 0 ; int result; if (!PyArg_ParseTuple(args,(char *)"OOO:prelude_client_handle_msg_default",&obj0,&obj1,&obj2)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_prelude_client, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { if ( obj1 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj1, (void **)&arg2, SWIGTYPE_p_prelude_msg, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { if ( obj2 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj2, (void **)&arg3, SWIGTYPE_p_prelude_msgbuf, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { Py_BEGIN_ALLOW_THREADS result = (int)prelude_client_handle_msg_default(arg1,arg2,arg3); Py_END_ALLOW_THREADS } { if ( result < 0 ) { swig_python_raise_exception(result); resultobj = NULL; } else { resultobj = PyInt_FromLong(result); } } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap__prelude_client_register_options(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; int result; if (!PyArg_ParseTuple(args,(char *)":_prelude_client_register_options")) SWIG_fail; { Py_BEGIN_ALLOW_THREADS result = (int)_prelude_client_register_options(); Py_END_ALLOW_THREADS } { if ( result < 0 ) { swig_python_raise_exception(result); resultobj = NULL; } else { resultobj = PyInt_FromLong(result); } } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_prelude_client_get_setup_error(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; prelude_client_t *arg1 = (prelude_client_t *) 0 ; PyObject * obj0 = 0 ; char *result = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:prelude_client_get_setup_error",&obj0)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_prelude_client, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { Py_BEGIN_ALLOW_THREADS result = (char *)prelude_client_get_setup_error(arg1); Py_END_ALLOW_THREADS } resultobj = SWIG_FromCharPtr((const char *)result); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_prelude_client_is_setup_needed(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; int arg1 ; int val1 ; int ecode1 = 0 ; PyObject * obj0 = 0 ; prelude_bool_t result; if (!PyArg_ParseTuple(args,(char *)"O:prelude_client_is_setup_needed",&obj0)) SWIG_fail; ecode1 = SWIG_AsVal_int(obj0, &val1); if (!SWIG_IsOK(ecode1)) { SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "prelude_client_is_setup_needed" "', argument " "1"" of type '" "int""'"); } arg1 = (int)(val1); { Py_BEGIN_ALLOW_THREADS result = (prelude_bool_t)prelude_client_is_setup_needed(arg1); Py_END_ALLOW_THREADS } resultobj = SWIG_From_int((int)(result)); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_prelude_client_print_setup_error(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; prelude_client_t *arg1 = (prelude_client_t *) 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:prelude_client_print_setup_error",&obj0)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_prelude_client, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { Py_BEGIN_ALLOW_THREADS prelude_client_print_setup_error(arg1); Py_END_ALLOW_THREADS } resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap__prelude_client_profile_init(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; prelude_client_profile_t *arg1 = (prelude_client_profile_t *) 0 ; PyObject * obj0 = 0 ; int result; if (!PyArg_ParseTuple(args,(char *)"O:_prelude_client_profile_init",&obj0)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_prelude_client_profile, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { Py_BEGIN_ALLOW_THREADS result = (int)_prelude_client_profile_init(arg1); Py_END_ALLOW_THREADS } { if ( result < 0 ) { swig_python_raise_exception(result); resultobj = NULL; } else { resultobj = PyInt_FromLong(result); } } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap__prelude_client_profile_new(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; prelude_client_profile_t **arg1 = (prelude_client_profile_t **) 0 ; prelude_client_profile_t *tmp1 ; int result; { arg1 = (prelude_client_profile_t **) &tmp1; } if (!PyArg_ParseTuple(args,(char *)":_prelude_client_profile_new")) SWIG_fail; { Py_BEGIN_ALLOW_THREADS result = (int)_prelude_client_profile_new(arg1); Py_END_ALLOW_THREADS } { if ( result < 0 ) { swig_python_raise_exception(result); resultobj = NULL; } else { resultobj = PyInt_FromLong(result); } } { if ( result >= 0 ) resultobj = SWIG_NewPointerObj((void *) * arg1, SWIGTYPE_p_prelude_client_profile, 0); } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_prelude_client_profile_new(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; prelude_client_profile_t **arg1 = (prelude_client_profile_t **) 0 ; char *arg2 = (char *) 0 ; prelude_client_profile_t *tmp1 ; PyObject * obj0 = 0 ; int result; { arg1 = (prelude_client_profile_t **) &tmp1; } if (!PyArg_ParseTuple(args,(char *)"O:prelude_client_profile_new",&obj0)) SWIG_fail; { if ( obj0 == Py_None ) arg2 = NULL; else if ( PyString_Check(obj0) ) arg2 = PyString_AsString(obj0); else { PyErr_Format(PyExc_TypeError, "expected None or string, %s found", obj0->ob_type->tp_name); return NULL; } } { Py_BEGIN_ALLOW_THREADS result = (int)prelude_client_profile_new(arg1,(char const *)arg2); Py_END_ALLOW_THREADS } { if ( result < 0 ) { swig_python_raise_exception(result); resultobj = NULL; } else { resultobj = PyInt_FromLong(result); } } { if ( result >= 0 ) resultobj = SWIG_NewPointerObj((void *) * arg1, SWIGTYPE_p_prelude_client_profile, 0); } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_prelude_client_profile_ref(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; prelude_client_profile_t *arg1 = (prelude_client_profile_t *) 0 ; PyObject * obj0 = 0 ; prelude_client_profile_t *result = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:prelude_client_profile_ref",&obj0)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_prelude_client_profile, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { Py_BEGIN_ALLOW_THREADS result = (prelude_client_profile_t *)prelude_client_profile_ref(arg1); Py_END_ALLOW_THREADS } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_prelude_client_profile, 0 | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_prelude_client_profile_destroy(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; prelude_client_profile_t *arg1 = (prelude_client_profile_t *) 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:prelude_client_profile_destroy",&obj0)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_prelude_client_profile, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { Py_BEGIN_ALLOW_THREADS prelude_client_profile_destroy(arg1); Py_END_ALLOW_THREADS } resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_prelude_client_profile_get_config_filename(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; prelude_client_profile_t *arg1 = (prelude_client_profile_t *) 0 ; char *arg2 = (char *) 0 ; size_t arg3 ; int res2 ; char *buf2 = 0 ; int alloc2 = 0 ; size_t val3 ; int ecode3 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; PyObject * obj2 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OOO:prelude_client_profile_get_config_filename",&obj0,&obj1,&obj2)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_prelude_client_profile, SWIG_POINTER_EXCEPTION|0) ) return NULL; } res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "prelude_client_profile_get_config_filename" "', argument " "2"" of type '" "char *""'"); } arg2 = (char *)(buf2); ecode3 = SWIG_AsVal_size_t(obj2, &val3); if (!SWIG_IsOK(ecode3)) { SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "prelude_client_profile_get_config_filename" "', argument " "3"" of type '" "size_t""'"); } arg3 = (size_t)(val3); { Py_BEGIN_ALLOW_THREADS prelude_client_profile_get_config_filename((struct prelude_client_profile const *)arg1,arg2,arg3); Py_END_ALLOW_THREADS } resultobj = SWIG_Py_Void(); if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); return resultobj; fail: if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); return NULL; } SWIGINTERN PyObject *_wrap_prelude_client_profile_get_default_config_dirname(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; prelude_client_profile_t *arg1 = (prelude_client_profile_t *) 0 ; char *arg2 = (char *) 0 ; size_t arg3 ; int res2 ; char *buf2 = 0 ; int alloc2 = 0 ; size_t val3 ; int ecode3 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; PyObject * obj2 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OOO:prelude_client_profile_get_default_config_dirname",&obj0,&obj1,&obj2)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_prelude_client_profile, SWIG_POINTER_EXCEPTION|0) ) return NULL; } res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "prelude_client_profile_get_default_config_dirname" "', argument " "2"" of type '" "char *""'"); } arg2 = (char *)(buf2); ecode3 = SWIG_AsVal_size_t(obj2, &val3); if (!SWIG_IsOK(ecode3)) { SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "prelude_client_profile_get_default_config_dirname" "', argument " "3"" of type '" "size_t""'"); } arg3 = (size_t)(val3); { Py_BEGIN_ALLOW_THREADS prelude_client_profile_get_default_config_dirname((struct prelude_client_profile const *)arg1,arg2,arg3); Py_END_ALLOW_THREADS } resultobj = SWIG_Py_Void(); if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); return resultobj; fail: if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); return NULL; } SWIGINTERN PyObject *_wrap_prelude_client_profile_get_analyzerid_filename(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; prelude_client_profile_t *arg1 = (prelude_client_profile_t *) 0 ; char *arg2 = (char *) 0 ; size_t arg3 ; int res2 ; char *buf2 = 0 ; int alloc2 = 0 ; size_t val3 ; int ecode3 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; PyObject * obj2 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OOO:prelude_client_profile_get_analyzerid_filename",&obj0,&obj1,&obj2)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_prelude_client_profile, SWIG_POINTER_EXCEPTION|0) ) return NULL; } res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "prelude_client_profile_get_analyzerid_filename" "', argument " "2"" of type '" "char *""'"); } arg2 = (char *)(buf2); ecode3 = SWIG_AsVal_size_t(obj2, &val3); if (!SWIG_IsOK(ecode3)) { SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "prelude_client_profile_get_analyzerid_filename" "', argument " "3"" of type '" "size_t""'"); } arg3 = (size_t)(val3); { Py_BEGIN_ALLOW_THREADS prelude_client_profile_get_analyzerid_filename((struct prelude_client_profile const *)arg1,arg2,arg3); Py_END_ALLOW_THREADS } resultobj = SWIG_Py_Void(); if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); return resultobj; fail: if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); return NULL; } SWIGINTERN PyObject *_wrap_prelude_client_profile_get_tls_key_filename(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; prelude_client_profile_t *arg1 = (prelude_client_profile_t *) 0 ; char *arg2 = (char *) 0 ; size_t arg3 ; int res2 ; char *buf2 = 0 ; int alloc2 = 0 ; size_t val3 ; int ecode3 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; PyObject * obj2 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OOO:prelude_client_profile_get_tls_key_filename",&obj0,&obj1,&obj2)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_prelude_client_profile, SWIG_POINTER_EXCEPTION|0) ) return NULL; } res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "prelude_client_profile_get_tls_key_filename" "', argument " "2"" of type '" "char *""'"); } arg2 = (char *)(buf2); ecode3 = SWIG_AsVal_size_t(obj2, &val3); if (!SWIG_IsOK(ecode3)) { SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "prelude_client_profile_get_tls_key_filename" "', argument " "3"" of type '" "size_t""'"); } arg3 = (size_t)(val3); { Py_BEGIN_ALLOW_THREADS prelude_client_profile_get_tls_key_filename((struct prelude_client_profile const *)arg1,arg2,arg3); Py_END_ALLOW_THREADS } resultobj = SWIG_Py_Void(); if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); return resultobj; fail: if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); return NULL; } SWIGINTERN PyObject *_wrap_prelude_client_profile_get_tls_server_ca_cert_filename(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; prelude_client_profile_t *arg1 = (prelude_client_profile_t *) 0 ; char *arg2 = (char *) 0 ; size_t arg3 ; int res2 ; char *buf2 = 0 ; int alloc2 = 0 ; size_t val3 ; int ecode3 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; PyObject * obj2 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OOO:prelude_client_profile_get_tls_server_ca_cert_filename",&obj0,&obj1,&obj2)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_prelude_client_profile, SWIG_POINTER_EXCEPTION|0) ) return NULL; } res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "prelude_client_profile_get_tls_server_ca_cert_filename" "', argument " "2"" of type '" "char *""'"); } arg2 = (char *)(buf2); ecode3 = SWIG_AsVal_size_t(obj2, &val3); if (!SWIG_IsOK(ecode3)) { SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "prelude_client_profile_get_tls_server_ca_cert_filename" "', argument " "3"" of type '" "size_t""'"); } arg3 = (size_t)(val3); { Py_BEGIN_ALLOW_THREADS prelude_client_profile_get_tls_server_ca_cert_filename((struct prelude_client_profile const *)arg1,arg2,arg3); Py_END_ALLOW_THREADS } resultobj = SWIG_Py_Void(); if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); return resultobj; fail: if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); return NULL; } SWIGINTERN PyObject *_wrap_prelude_client_profile_get_tls_server_keycert_filename(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; prelude_client_profile_t *arg1 = (prelude_client_profile_t *) 0 ; char *arg2 = (char *) 0 ; size_t arg3 ; int res2 ; char *buf2 = 0 ; int alloc2 = 0 ; size_t val3 ; int ecode3 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; PyObject * obj2 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OOO:prelude_client_profile_get_tls_server_keycert_filename",&obj0,&obj1,&obj2)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_prelude_client_profile, SWIG_POINTER_EXCEPTION|0) ) return NULL; } res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "prelude_client_profile_get_tls_server_keycert_filename" "', argument " "2"" of type '" "char *""'"); } arg2 = (char *)(buf2); ecode3 = SWIG_AsVal_size_t(obj2, &val3); if (!SWIG_IsOK(ecode3)) { SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "prelude_client_profile_get_tls_server_keycert_filename" "', argument " "3"" of type '" "size_t""'"); } arg3 = (size_t)(val3); { Py_BEGIN_ALLOW_THREADS prelude_client_profile_get_tls_server_keycert_filename((struct prelude_client_profile const *)arg1,arg2,arg3); Py_END_ALLOW_THREADS } resultobj = SWIG_Py_Void(); if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); return resultobj; fail: if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); return NULL; } SWIGINTERN PyObject *_wrap_prelude_client_profile_get_tls_server_crl_filename(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; prelude_client_profile_t *arg1 = (prelude_client_profile_t *) 0 ; char *arg2 = (char *) 0 ; size_t arg3 ; int res2 ; char *buf2 = 0 ; int alloc2 = 0 ; size_t val3 ; int ecode3 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; PyObject * obj2 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OOO:prelude_client_profile_get_tls_server_crl_filename",&obj0,&obj1,&obj2)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_prelude_client_profile, SWIG_POINTER_EXCEPTION|0) ) return NULL; } res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "prelude_client_profile_get_tls_server_crl_filename" "', argument " "2"" of type '" "char *""'"); } arg2 = (char *)(buf2); ecode3 = SWIG_AsVal_size_t(obj2, &val3); if (!SWIG_IsOK(ecode3)) { SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "prelude_client_profile_get_tls_server_crl_filename" "', argument " "3"" of type '" "size_t""'"); } arg3 = (size_t)(val3); { Py_BEGIN_ALLOW_THREADS prelude_client_profile_get_tls_server_crl_filename((struct prelude_client_profile const *)arg1,arg2,arg3); Py_END_ALLOW_THREADS } resultobj = SWIG_Py_Void(); if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); return resultobj; fail: if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); return NULL; } SWIGINTERN PyObject *_wrap_prelude_client_profile_get_tls_client_keycert_filename(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; prelude_client_profile_t *arg1 = (prelude_client_profile_t *) 0 ; char *arg2 = (char *) 0 ; size_t arg3 ; int res2 ; char *buf2 = 0 ; int alloc2 = 0 ; size_t val3 ; int ecode3 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; PyObject * obj2 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OOO:prelude_client_profile_get_tls_client_keycert_filename",&obj0,&obj1,&obj2)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_prelude_client_profile, SWIG_POINTER_EXCEPTION|0) ) return NULL; } res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "prelude_client_profile_get_tls_client_keycert_filename" "', argument " "2"" of type '" "char *""'"); } arg2 = (char *)(buf2); ecode3 = SWIG_AsVal_size_t(obj2, &val3); if (!SWIG_IsOK(ecode3)) { SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "prelude_client_profile_get_tls_client_keycert_filename" "', argument " "3"" of type '" "size_t""'"); } arg3 = (size_t)(val3); { Py_BEGIN_ALLOW_THREADS prelude_client_profile_get_tls_client_keycert_filename((struct prelude_client_profile const *)arg1,arg2,arg3); Py_END_ALLOW_THREADS } resultobj = SWIG_Py_Void(); if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); return resultobj; fail: if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); return NULL; } SWIGINTERN PyObject *_wrap_prelude_client_profile_get_tls_client_trusted_cert_filename(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; prelude_client_profile_t *arg1 = (prelude_client_profile_t *) 0 ; char *arg2 = (char *) 0 ; size_t arg3 ; int res2 ; char *buf2 = 0 ; int alloc2 = 0 ; size_t val3 ; int ecode3 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; PyObject * obj2 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OOO:prelude_client_profile_get_tls_client_trusted_cert_filename",&obj0,&obj1,&obj2)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_prelude_client_profile, SWIG_POINTER_EXCEPTION|0) ) return NULL; } res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "prelude_client_profile_get_tls_client_trusted_cert_filename" "', argument " "2"" of type '" "char *""'"); } arg2 = (char *)(buf2); ecode3 = SWIG_AsVal_size_t(obj2, &val3); if (!SWIG_IsOK(ecode3)) { SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "prelude_client_profile_get_tls_client_trusted_cert_filename" "', argument " "3"" of type '" "size_t""'"); } arg3 = (size_t)(val3); { Py_BEGIN_ALLOW_THREADS prelude_client_profile_get_tls_client_trusted_cert_filename((struct prelude_client_profile const *)arg1,arg2,arg3); Py_END_ALLOW_THREADS } resultobj = SWIG_Py_Void(); if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); return resultobj; fail: if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); return NULL; } SWIGINTERN PyObject *_wrap_prelude_client_profile_get_backup_dirname(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; prelude_client_profile_t *arg1 = (prelude_client_profile_t *) 0 ; char *arg2 = (char *) 0 ; size_t arg3 ; int res2 ; char *buf2 = 0 ; int alloc2 = 0 ; size_t val3 ; int ecode3 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; PyObject * obj2 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OOO:prelude_client_profile_get_backup_dirname",&obj0,&obj1,&obj2)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_prelude_client_profile, SWIG_POINTER_EXCEPTION|0) ) return NULL; } res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "prelude_client_profile_get_backup_dirname" "', argument " "2"" of type '" "char *""'"); } arg2 = (char *)(buf2); ecode3 = SWIG_AsVal_size_t(obj2, &val3); if (!SWIG_IsOK(ecode3)) { SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "prelude_client_profile_get_backup_dirname" "', argument " "3"" of type '" "size_t""'"); } arg3 = (size_t)(val3); { Py_BEGIN_ALLOW_THREADS prelude_client_profile_get_backup_dirname((struct prelude_client_profile const *)arg1,arg2,arg3); Py_END_ALLOW_THREADS } resultobj = SWIG_Py_Void(); if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); return resultobj; fail: if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); return NULL; } SWIGINTERN PyObject *_wrap_prelude_client_profile_get_profile_dirname(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; prelude_client_profile_t *arg1 = (prelude_client_profile_t *) 0 ; char *arg2 = (char *) 0 ; size_t arg3 ; int res2 ; char *buf2 = 0 ; int alloc2 = 0 ; size_t val3 ; int ecode3 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; PyObject * obj2 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OOO:prelude_client_profile_get_profile_dirname",&obj0,&obj1,&obj2)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_prelude_client_profile, SWIG_POINTER_EXCEPTION|0) ) return NULL; } res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "prelude_client_profile_get_profile_dirname" "', argument " "2"" of type '" "char *""'"); } arg2 = (char *)(buf2); ecode3 = SWIG_AsVal_size_t(obj2, &val3); if (!SWIG_IsOK(ecode3)) { SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "prelude_client_profile_get_profile_dirname" "', argument " "3"" of type '" "size_t""'"); } arg3 = (size_t)(val3); { Py_BEGIN_ALLOW_THREADS prelude_client_profile_get_profile_dirname((struct prelude_client_profile const *)arg1,arg2,arg3); Py_END_ALLOW_THREADS } resultobj = SWIG_Py_Void(); if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); return resultobj; fail: if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); return NULL; } SWIGINTERN PyObject *_wrap_prelude_client_profile_set_uid(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; prelude_client_profile_t *arg1 = (prelude_client_profile_t *) 0 ; prelude_uid_t arg2 ; int val2 ; int ecode2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:prelude_client_profile_set_uid",&obj0,&obj1)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_prelude_client_profile, SWIG_POINTER_EXCEPTION|0) ) return NULL; } ecode2 = SWIG_AsVal_int(obj1, &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "prelude_client_profile_set_uid" "', argument " "2"" of type '" "prelude_uid_t""'"); } arg2 = (prelude_uid_t)(val2); { Py_BEGIN_ALLOW_THREADS prelude_client_profile_set_uid(arg1,arg2); Py_END_ALLOW_THREADS } resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_prelude_client_profile_get_uid(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; prelude_client_profile_t *arg1 = (prelude_client_profile_t *) 0 ; PyObject * obj0 = 0 ; prelude_uid_t result; if (!PyArg_ParseTuple(args,(char *)"O:prelude_client_profile_get_uid",&obj0)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_prelude_client_profile, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { Py_BEGIN_ALLOW_THREADS result = (prelude_uid_t)prelude_client_profile_get_uid((struct prelude_client_profile const *)arg1); Py_END_ALLOW_THREADS } { if ( result < 0 ) { swig_python_raise_exception(result); resultobj = NULL; } else { resultobj = PyInt_FromLong(result); } } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_prelude_client_profile_set_gid(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; prelude_client_profile_t *arg1 = (prelude_client_profile_t *) 0 ; prelude_uid_t arg2 ; int val2 ; int ecode2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:prelude_client_profile_set_gid",&obj0,&obj1)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_prelude_client_profile, SWIG_POINTER_EXCEPTION|0) ) return NULL; } ecode2 = SWIG_AsVal_int(obj1, &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "prelude_client_profile_set_gid" "', argument " "2"" of type '" "prelude_uid_t""'"); } arg2 = (prelude_uid_t)(val2); { Py_BEGIN_ALLOW_THREADS prelude_client_profile_set_gid(arg1,arg2); Py_END_ALLOW_THREADS } resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_prelude_client_profile_get_gid(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; prelude_client_profile_t *arg1 = (prelude_client_profile_t *) 0 ; PyObject * obj0 = 0 ; prelude_gid_t result; if (!PyArg_ParseTuple(args,(char *)"O:prelude_client_profile_get_gid",&obj0)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_prelude_client_profile, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { Py_BEGIN_ALLOW_THREADS result = (prelude_gid_t)prelude_client_profile_get_gid((struct prelude_client_profile const *)arg1); Py_END_ALLOW_THREADS } { if ( result < 0 ) { swig_python_raise_exception(result); resultobj = NULL; } else { resultobj = PyInt_FromLong(result); } } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_prelude_client_profile_set_name(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; prelude_client_profile_t *arg1 = (prelude_client_profile_t *) 0 ; char *arg2 = (char *) 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; int result; if (!PyArg_ParseTuple(args,(char *)"OO:prelude_client_profile_set_name",&obj0,&obj1)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_prelude_client_profile, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { if ( obj1 == Py_None ) arg2 = NULL; else if ( PyString_Check(obj1) ) arg2 = PyString_AsString(obj1); else { PyErr_Format(PyExc_TypeError, "expected None or string, %s found", obj1->ob_type->tp_name); return NULL; } } { Py_BEGIN_ALLOW_THREADS result = (int)prelude_client_profile_set_name(arg1,(char const *)arg2); Py_END_ALLOW_THREADS } { if ( result < 0 ) { swig_python_raise_exception(result); resultobj = NULL; } else { resultobj = PyInt_FromLong(result); } } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_prelude_client_profile_get_name(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; prelude_client_profile_t *arg1 = (prelude_client_profile_t *) 0 ; PyObject * obj0 = 0 ; char *result = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:prelude_client_profile_get_name",&obj0)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_prelude_client_profile, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { Py_BEGIN_ALLOW_THREADS result = (char *)prelude_client_profile_get_name((struct prelude_client_profile const *)arg1); Py_END_ALLOW_THREADS } resultobj = SWIG_FromCharPtr((const char *)result); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_prelude_client_profile_get_analyzerid(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; prelude_client_profile_t *arg1 = (prelude_client_profile_t *) 0 ; PyObject * obj0 = 0 ; uint64_t result; if (!PyArg_ParseTuple(args,(char *)"O:prelude_client_profile_get_analyzerid",&obj0)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_prelude_client_profile, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { Py_BEGIN_ALLOW_THREADS result = (uint64_t)prelude_client_profile_get_analyzerid((struct prelude_client_profile const *)arg1); Py_END_ALLOW_THREADS } resultobj = SWIG_From_unsigned_SS_long_SS_long((unsigned long long)(result)); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_prelude_client_profile_set_analyzerid(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; prelude_client_profile_t *arg1 = (prelude_client_profile_t *) 0 ; uint64_t arg2 ; unsigned long long val2 ; int ecode2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:prelude_client_profile_set_analyzerid",&obj0,&obj1)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_prelude_client_profile, SWIG_POINTER_EXCEPTION|0) ) return NULL; } ecode2 = SWIG_AsVal_unsigned_SS_long_SS_long(obj1, &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "prelude_client_profile_set_analyzerid" "', argument " "2"" of type '" "uint64_t""'"); } arg2 = (uint64_t)(val2); { Py_BEGIN_ALLOW_THREADS prelude_client_profile_set_analyzerid(arg1,arg2); Py_END_ALLOW_THREADS } resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_prelude_client_profile_get_credentials(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; prelude_client_profile_t *arg1 = (prelude_client_profile_t *) 0 ; void **arg2 = (void **) 0 ; void *argp2 = 0 ; int res2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; int result; if (!PyArg_ParseTuple(args,(char *)"OO:prelude_client_profile_get_credentials",&obj0,&obj1)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_prelude_client_profile, SWIG_POINTER_EXCEPTION|0) ) return NULL; } res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_p_void, 0 | 0 ); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "prelude_client_profile_get_credentials" "', argument " "2"" of type '" "void **""'"); } arg2 = (void **)(argp2); { Py_BEGIN_ALLOW_THREADS result = (int)prelude_client_profile_get_credentials(arg1,arg2); Py_END_ALLOW_THREADS } { if ( result < 0 ) { swig_python_raise_exception(result); resultobj = NULL; } else { resultobj = PyInt_FromLong(result); } } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_prelude_client_profile_set_prefix(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; prelude_client_profile_t *arg1 = (prelude_client_profile_t *) 0 ; char *arg2 = (char *) 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; int result; if (!PyArg_ParseTuple(args,(char *)"OO:prelude_client_profile_set_prefix",&obj0,&obj1)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_prelude_client_profile, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { if ( obj1 == Py_None ) arg2 = NULL; else if ( PyString_Check(obj1) ) arg2 = PyString_AsString(obj1); else { PyErr_Format(PyExc_TypeError, "expected None or string, %s found", obj1->ob_type->tp_name); return NULL; } } { Py_BEGIN_ALLOW_THREADS result = (int)prelude_client_profile_set_prefix(arg1,(char const *)arg2); Py_END_ALLOW_THREADS } { if ( result < 0 ) { swig_python_raise_exception(result); resultobj = NULL; } else { resultobj = PyInt_FromLong(result); } } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_prelude_client_profile_get_prefix(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; prelude_client_profile_t *arg1 = (prelude_client_profile_t *) 0 ; char *arg2 = (char *) 0 ; size_t arg3 ; int res2 ; char *buf2 = 0 ; int alloc2 = 0 ; size_t val3 ; int ecode3 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; PyObject * obj2 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OOO:prelude_client_profile_get_prefix",&obj0,&obj1,&obj2)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_prelude_client_profile, SWIG_POINTER_EXCEPTION|0) ) return NULL; } res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "prelude_client_profile_get_prefix" "', argument " "2"" of type '" "char *""'"); } arg2 = (char *)(buf2); ecode3 = SWIG_AsVal_size_t(obj2, &val3); if (!SWIG_IsOK(ecode3)) { SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "prelude_client_profile_get_prefix" "', argument " "3"" of type '" "size_t""'"); } arg3 = (size_t)(val3); { Py_BEGIN_ALLOW_THREADS prelude_client_profile_get_prefix((struct prelude_client_profile const *)arg1,arg2,arg3); Py_END_ALLOW_THREADS } resultobj = SWIG_Py_Void(); if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); return resultobj; fail: if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); return NULL; } SWIGINTERN PyObject *_wrap_idmef_additional_data_type_to_numeric(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; char *arg1 = (char *) 0 ; PyObject * obj0 = 0 ; idmef_additional_data_type_t result; if (!PyArg_ParseTuple(args,(char *)"O:idmef_additional_data_type_to_numeric",&obj0)) SWIG_fail; { if ( obj0 == Py_None ) arg1 = NULL; else if ( PyString_Check(obj0) ) arg1 = PyString_AsString(obj0); else { PyErr_Format(PyExc_TypeError, "expected None or string, %s found", obj0->ob_type->tp_name); return NULL; } } { Py_BEGIN_ALLOW_THREADS result = (idmef_additional_data_type_t)idmef_additional_data_type_to_numeric((char const *)arg1); Py_END_ALLOW_THREADS } resultobj = SWIG_From_int((int)(result)); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_additional_data_type_to_string(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_additional_data_type_t arg1 ; int val1 ; int ecode1 = 0 ; PyObject * obj0 = 0 ; char *result = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:idmef_additional_data_type_to_string",&obj0)) SWIG_fail; ecode1 = SWIG_AsVal_int(obj0, &val1); if (!SWIG_IsOK(ecode1)) { SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "idmef_additional_data_type_to_string" "', argument " "1"" of type '" "idmef_additional_data_type_t""'"); } arg1 = (idmef_additional_data_type_t)(val1); { Py_BEGIN_ALLOW_THREADS result = (char *)idmef_additional_data_type_to_string(arg1); Py_END_ALLOW_THREADS } resultobj = SWIG_FromCharPtr((const char *)result); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_additional_data_new(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_additional_data_t **arg1 = (idmef_additional_data_t **) 0 ; idmef_additional_data_t *tmp1 ; int result; { arg1 = (idmef_additional_data_t **) &tmp1; } if (!PyArg_ParseTuple(args,(char *)":idmef_additional_data_new")) SWIG_fail; { Py_BEGIN_ALLOW_THREADS result = (int)idmef_additional_data_new(arg1); Py_END_ALLOW_THREADS } { if ( result < 0 ) { swig_python_raise_exception(result); resultobj = NULL; } else { resultobj = PyInt_FromLong(result); } } { if ( result >= 0 ) resultobj = SWIG_NewPointerObj((void *) * arg1, SWIGTYPE_p_idmef_additional_data, 0); } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_additional_data_copy(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_additional_data_t *arg1 = (idmef_additional_data_t *) 0 ; idmef_additional_data_t *arg2 = (idmef_additional_data_t *) 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; int result; if (!PyArg_ParseTuple(args,(char *)"OO:idmef_additional_data_copy",&obj0,&obj1)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_additional_data, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { if ( obj1 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj1, (void **)&arg2, SWIGTYPE_p_idmef_additional_data, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { Py_BEGIN_ALLOW_THREADS result = (int)idmef_additional_data_copy((struct idmef_additional_data const *)arg1,arg2); Py_END_ALLOW_THREADS } { if ( result < 0 ) { swig_python_raise_exception(result); resultobj = NULL; } else { resultobj = PyInt_FromLong(result); } } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_additional_data_clone(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_additional_data_t *arg1 = (idmef_additional_data_t *) 0 ; idmef_additional_data_t **arg2 = (idmef_additional_data_t **) 0 ; idmef_additional_data_t *tmp2 ; PyObject * obj0 = 0 ; int result; { arg2 = (idmef_additional_data_t **) &tmp2; } if (!PyArg_ParseTuple(args,(char *)"O:idmef_additional_data_clone",&obj0)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_additional_data, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { Py_BEGIN_ALLOW_THREADS result = (int)idmef_additional_data_clone(arg1,arg2); Py_END_ALLOW_THREADS } { if ( result < 0 ) { swig_python_raise_exception(result); resultobj = NULL; } else { resultobj = PyInt_FromLong(result); } } { if ( result >= 0 ) resultobj = SWIG_NewPointerObj((void *) * arg2, SWIGTYPE_p_idmef_additional_data, 0); } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_additional_data_compare(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_additional_data_t *arg1 = (idmef_additional_data_t *) 0 ; idmef_additional_data_t *arg2 = (idmef_additional_data_t *) 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; int result; if (!PyArg_ParseTuple(args,(char *)"OO:idmef_additional_data_compare",&obj0,&obj1)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_additional_data, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { if ( obj1 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj1, (void **)&arg2, SWIGTYPE_p_idmef_additional_data, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { Py_BEGIN_ALLOW_THREADS result = (int)idmef_additional_data_compare((struct idmef_additional_data const *)arg1,(struct idmef_additional_data const *)arg2); Py_END_ALLOW_THREADS } { resultobj = PyInt_FromLong(result); } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_additional_data_ref(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_additional_data_t *arg1 = (idmef_additional_data_t *) 0 ; PyObject * obj0 = 0 ; idmef_additional_data_t *result = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:idmef_additional_data_ref",&obj0)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_additional_data, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { Py_BEGIN_ALLOW_THREADS result = (idmef_additional_data_t *)idmef_additional_data_ref(arg1); Py_END_ALLOW_THREADS } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_idmef_additional_data, 0 | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_additional_data_destroy(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_additional_data_t *arg1 = (idmef_additional_data_t *) 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:idmef_additional_data_destroy",&obj0)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_additional_data, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { Py_BEGIN_ALLOW_THREADS idmef_additional_data_destroy(arg1); Py_END_ALLOW_THREADS } resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_additional_data_get_type(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_additional_data_t *arg1 = (idmef_additional_data_t *) 0 ; PyObject * obj0 = 0 ; idmef_additional_data_type_t result; if (!PyArg_ParseTuple(args,(char *)"O:idmef_additional_data_get_type",&obj0)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_additional_data, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { Py_BEGIN_ALLOW_THREADS result = (idmef_additional_data_type_t)idmef_additional_data_get_type(arg1); Py_END_ALLOW_THREADS } resultobj = SWIG_From_int((int)(result)); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_additional_data_set_type(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_additional_data_t *arg1 = (idmef_additional_data_t *) 0 ; idmef_additional_data_type_t arg2 ; int val2 ; int ecode2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:idmef_additional_data_set_type",&obj0,&obj1)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_additional_data, SWIG_POINTER_EXCEPTION|0) ) return NULL; } ecode2 = SWIG_AsVal_int(obj1, &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "idmef_additional_data_set_type" "', argument " "2"" of type '" "idmef_additional_data_type_t""'"); } arg2 = (idmef_additional_data_type_t)(val2); { Py_BEGIN_ALLOW_THREADS idmef_additional_data_set_type(arg1,arg2); Py_END_ALLOW_THREADS } resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_additional_data_new_type(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_additional_data_t *arg1 = (idmef_additional_data_t *) 0 ; idmef_additional_data_type_t **arg2 = (idmef_additional_data_type_t **) 0 ; void *argp2 = 0 ; int res2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; int result; if (!PyArg_ParseTuple(args,(char *)"OO:idmef_additional_data_new_type",&obj0,&obj1)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_additional_data, SWIG_POINTER_EXCEPTION|0) ) return NULL; } res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_p_idmef_additional_data_type_t, 0 | 0 ); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "idmef_additional_data_new_type" "', argument " "2"" of type '" "idmef_additional_data_type_t **""'"); } arg2 = (idmef_additional_data_type_t **)(argp2); { Py_BEGIN_ALLOW_THREADS result = (int)idmef_additional_data_new_type(arg1,arg2); Py_END_ALLOW_THREADS } { if ( result < 0 ) { swig_python_raise_exception(result); resultobj = NULL; } else { resultobj = PyInt_FromLong(result); } } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_additional_data_get_meaning(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_additional_data_t *arg1 = (idmef_additional_data_t *) 0 ; PyObject * obj0 = 0 ; prelude_string_t *result = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:idmef_additional_data_get_meaning",&obj0)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_additional_data, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { Py_BEGIN_ALLOW_THREADS result = (prelude_string_t *)idmef_additional_data_get_meaning(arg1); Py_END_ALLOW_THREADS } { resultobj = swig_python_string(result); } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_additional_data_set_meaning(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_additional_data_t *arg1 = (idmef_additional_data_t *) 0 ; prelude_string_t *arg2 = (prelude_string_t *) 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:idmef_additional_data_set_meaning",&obj0,&obj1)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_additional_data, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { int ret; ret = prelude_string_new_dup_fast(&(arg2), PyString_AsString(obj1), PyString_Size(obj1)); if ( ret < 0 ) { swig_python_raise_exception(ret); return NULL; } } { Py_BEGIN_ALLOW_THREADS idmef_additional_data_set_meaning(arg1,arg2); Py_END_ALLOW_THREADS } resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_additional_data_new_meaning(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_additional_data_t *arg1 = (idmef_additional_data_t *) 0 ; prelude_string_t **arg2 = (prelude_string_t **) 0 ; void *argp2 = 0 ; int res2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; int result; if (!PyArg_ParseTuple(args,(char *)"OO:idmef_additional_data_new_meaning",&obj0,&obj1)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_additional_data, SWIG_POINTER_EXCEPTION|0) ) return NULL; } res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_p_prelude_string_t, 0 | 0 ); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "idmef_additional_data_new_meaning" "', argument " "2"" of type '" "prelude_string_t **""'"); } arg2 = (prelude_string_t **)(argp2); { Py_BEGIN_ALLOW_THREADS result = (int)idmef_additional_data_new_meaning(arg1,arg2); Py_END_ALLOW_THREADS } { if ( result < 0 ) { swig_python_raise_exception(result); resultobj = NULL; } else { resultobj = PyInt_FromLong(result); } } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_additional_data_get_data(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_additional_data_t *arg1 = (idmef_additional_data_t *) 0 ; PyObject * obj0 = 0 ; idmef_data_t *result = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:idmef_additional_data_get_data",&obj0)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_additional_data, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { Py_BEGIN_ALLOW_THREADS result = (idmef_data_t *)idmef_additional_data_get_data(arg1); Py_END_ALLOW_THREADS } { resultobj = swig_python_data(result); } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_additional_data_set_data(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_additional_data_t *arg1 = (idmef_additional_data_t *) 0 ; idmef_data_t *arg2 = (idmef_data_t *) 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:idmef_additional_data_set_data",&obj0,&obj1)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_additional_data, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { if ( obj1 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj1, (void **)&arg2, SWIGTYPE_p_idmef_data_t, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { Py_BEGIN_ALLOW_THREADS idmef_additional_data_set_data(arg1,arg2); Py_END_ALLOW_THREADS } resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_additional_data_new_data(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_additional_data_t *arg1 = (idmef_additional_data_t *) 0 ; idmef_data_t **arg2 = (idmef_data_t **) 0 ; idmef_data_t *tmp2 ; PyObject * obj0 = 0 ; int result; { arg2 = (idmef_data_t **) &tmp2; } if (!PyArg_ParseTuple(args,(char *)"O:idmef_additional_data_new_data",&obj0)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_additional_data, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { Py_BEGIN_ALLOW_THREADS result = (int)idmef_additional_data_new_data(arg1,arg2); Py_END_ALLOW_THREADS } { if ( result < 0 ) { swig_python_raise_exception(result); resultobj = NULL; } else { resultobj = PyInt_FromLong(result); } } { if ( result >= 0 ) resultobj = SWIG_NewPointerObj((void *) * arg2, SWIGTYPE_p_idmef_data_t, 0); } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_reference_origin_to_numeric(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; char *arg1 = (char *) 0 ; PyObject * obj0 = 0 ; idmef_reference_origin_t result; if (!PyArg_ParseTuple(args,(char *)"O:idmef_reference_origin_to_numeric",&obj0)) SWIG_fail; { if ( obj0 == Py_None ) arg1 = NULL; else if ( PyString_Check(obj0) ) arg1 = PyString_AsString(obj0); else { PyErr_Format(PyExc_TypeError, "expected None or string, %s found", obj0->ob_type->tp_name); return NULL; } } { Py_BEGIN_ALLOW_THREADS result = (idmef_reference_origin_t)idmef_reference_origin_to_numeric((char const *)arg1); Py_END_ALLOW_THREADS } resultobj = SWIG_From_int((int)(result)); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_reference_origin_to_string(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_reference_origin_t arg1 ; int val1 ; int ecode1 = 0 ; PyObject * obj0 = 0 ; char *result = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:idmef_reference_origin_to_string",&obj0)) SWIG_fail; ecode1 = SWIG_AsVal_int(obj0, &val1); if (!SWIG_IsOK(ecode1)) { SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "idmef_reference_origin_to_string" "', argument " "1"" of type '" "idmef_reference_origin_t""'"); } arg1 = (idmef_reference_origin_t)(val1); { Py_BEGIN_ALLOW_THREADS result = (char *)idmef_reference_origin_to_string(arg1); Py_END_ALLOW_THREADS } resultobj = SWIG_FromCharPtr((const char *)result); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_reference_new(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_reference_t **arg1 = (idmef_reference_t **) 0 ; idmef_reference_t *tmp1 ; int result; { arg1 = (idmef_reference_t **) &tmp1; } if (!PyArg_ParseTuple(args,(char *)":idmef_reference_new")) SWIG_fail; { Py_BEGIN_ALLOW_THREADS result = (int)idmef_reference_new(arg1); Py_END_ALLOW_THREADS } { if ( result < 0 ) { swig_python_raise_exception(result); resultobj = NULL; } else { resultobj = PyInt_FromLong(result); } } { if ( result >= 0 ) resultobj = SWIG_NewPointerObj((void *) * arg1, SWIGTYPE_p_idmef_reference, 0); } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_reference_copy(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_reference_t *arg1 = (idmef_reference_t *) 0 ; idmef_reference_t *arg2 = (idmef_reference_t *) 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; int result; if (!PyArg_ParseTuple(args,(char *)"OO:idmef_reference_copy",&obj0,&obj1)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_reference, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { if ( obj1 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj1, (void **)&arg2, SWIGTYPE_p_idmef_reference, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { Py_BEGIN_ALLOW_THREADS result = (int)idmef_reference_copy((struct idmef_reference const *)arg1,arg2); Py_END_ALLOW_THREADS } { if ( result < 0 ) { swig_python_raise_exception(result); resultobj = NULL; } else { resultobj = PyInt_FromLong(result); } } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_reference_clone(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_reference_t *arg1 = (idmef_reference_t *) 0 ; idmef_reference_t **arg2 = (idmef_reference_t **) 0 ; idmef_reference_t *tmp2 ; PyObject * obj0 = 0 ; int result; { arg2 = (idmef_reference_t **) &tmp2; } if (!PyArg_ParseTuple(args,(char *)"O:idmef_reference_clone",&obj0)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_reference, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { Py_BEGIN_ALLOW_THREADS result = (int)idmef_reference_clone(arg1,arg2); Py_END_ALLOW_THREADS } { if ( result < 0 ) { swig_python_raise_exception(result); resultobj = NULL; } else { resultobj = PyInt_FromLong(result); } } { if ( result >= 0 ) resultobj = SWIG_NewPointerObj((void *) * arg2, SWIGTYPE_p_idmef_reference, 0); } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_reference_compare(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_reference_t *arg1 = (idmef_reference_t *) 0 ; idmef_reference_t *arg2 = (idmef_reference_t *) 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; int result; if (!PyArg_ParseTuple(args,(char *)"OO:idmef_reference_compare",&obj0,&obj1)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_reference, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { if ( obj1 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj1, (void **)&arg2, SWIGTYPE_p_idmef_reference, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { Py_BEGIN_ALLOW_THREADS result = (int)idmef_reference_compare((struct idmef_reference const *)arg1,(struct idmef_reference const *)arg2); Py_END_ALLOW_THREADS } { resultobj = PyInt_FromLong(result); } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_reference_ref(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_reference_t *arg1 = (idmef_reference_t *) 0 ; PyObject * obj0 = 0 ; idmef_reference_t *result = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:idmef_reference_ref",&obj0)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_reference, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { Py_BEGIN_ALLOW_THREADS result = (idmef_reference_t *)idmef_reference_ref(arg1); Py_END_ALLOW_THREADS } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_idmef_reference, 0 | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_reference_destroy(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_reference_t *arg1 = (idmef_reference_t *) 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:idmef_reference_destroy",&obj0)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_reference, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { Py_BEGIN_ALLOW_THREADS idmef_reference_destroy(arg1); Py_END_ALLOW_THREADS } resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_reference_get_origin(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_reference_t *arg1 = (idmef_reference_t *) 0 ; PyObject * obj0 = 0 ; idmef_reference_origin_t result; if (!PyArg_ParseTuple(args,(char *)"O:idmef_reference_get_origin",&obj0)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_reference, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { Py_BEGIN_ALLOW_THREADS result = (idmef_reference_origin_t)idmef_reference_get_origin(arg1); Py_END_ALLOW_THREADS } resultobj = SWIG_From_int((int)(result)); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_reference_set_origin(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_reference_t *arg1 = (idmef_reference_t *) 0 ; idmef_reference_origin_t arg2 ; int val2 ; int ecode2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:idmef_reference_set_origin",&obj0,&obj1)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_reference, SWIG_POINTER_EXCEPTION|0) ) return NULL; } ecode2 = SWIG_AsVal_int(obj1, &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "idmef_reference_set_origin" "', argument " "2"" of type '" "idmef_reference_origin_t""'"); } arg2 = (idmef_reference_origin_t)(val2); { Py_BEGIN_ALLOW_THREADS idmef_reference_set_origin(arg1,arg2); Py_END_ALLOW_THREADS } resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_reference_new_origin(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_reference_t *arg1 = (idmef_reference_t *) 0 ; idmef_reference_origin_t **arg2 = (idmef_reference_origin_t **) 0 ; void *argp2 = 0 ; int res2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; int result; if (!PyArg_ParseTuple(args,(char *)"OO:idmef_reference_new_origin",&obj0,&obj1)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_reference, SWIG_POINTER_EXCEPTION|0) ) return NULL; } res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_p_idmef_reference_origin_t, 0 | 0 ); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "idmef_reference_new_origin" "', argument " "2"" of type '" "idmef_reference_origin_t **""'"); } arg2 = (idmef_reference_origin_t **)(argp2); { Py_BEGIN_ALLOW_THREADS result = (int)idmef_reference_new_origin(arg1,arg2); Py_END_ALLOW_THREADS } { if ( result < 0 ) { swig_python_raise_exception(result); resultobj = NULL; } else { resultobj = PyInt_FromLong(result); } } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_reference_get_name(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_reference_t *arg1 = (idmef_reference_t *) 0 ; PyObject * obj0 = 0 ; prelude_string_t *result = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:idmef_reference_get_name",&obj0)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_reference, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { Py_BEGIN_ALLOW_THREADS result = (prelude_string_t *)idmef_reference_get_name(arg1); Py_END_ALLOW_THREADS } { resultobj = swig_python_string(result); } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_reference_set_name(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_reference_t *arg1 = (idmef_reference_t *) 0 ; prelude_string_t *arg2 = (prelude_string_t *) 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:idmef_reference_set_name",&obj0,&obj1)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_reference, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { int ret; ret = prelude_string_new_dup_fast(&(arg2), PyString_AsString(obj1), PyString_Size(obj1)); if ( ret < 0 ) { swig_python_raise_exception(ret); return NULL; } } { Py_BEGIN_ALLOW_THREADS idmef_reference_set_name(arg1,arg2); Py_END_ALLOW_THREADS } resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_reference_new_name(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_reference_t *arg1 = (idmef_reference_t *) 0 ; prelude_string_t **arg2 = (prelude_string_t **) 0 ; void *argp2 = 0 ; int res2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; int result; if (!PyArg_ParseTuple(args,(char *)"OO:idmef_reference_new_name",&obj0,&obj1)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_reference, SWIG_POINTER_EXCEPTION|0) ) return NULL; } res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_p_prelude_string_t, 0 | 0 ); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "idmef_reference_new_name" "', argument " "2"" of type '" "prelude_string_t **""'"); } arg2 = (prelude_string_t **)(argp2); { Py_BEGIN_ALLOW_THREADS result = (int)idmef_reference_new_name(arg1,arg2); Py_END_ALLOW_THREADS } { if ( result < 0 ) { swig_python_raise_exception(result); resultobj = NULL; } else { resultobj = PyInt_FromLong(result); } } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_reference_get_url(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_reference_t *arg1 = (idmef_reference_t *) 0 ; PyObject * obj0 = 0 ; prelude_string_t *result = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:idmef_reference_get_url",&obj0)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_reference, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { Py_BEGIN_ALLOW_THREADS result = (prelude_string_t *)idmef_reference_get_url(arg1); Py_END_ALLOW_THREADS } { resultobj = swig_python_string(result); } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_reference_set_url(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_reference_t *arg1 = (idmef_reference_t *) 0 ; prelude_string_t *arg2 = (prelude_string_t *) 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:idmef_reference_set_url",&obj0,&obj1)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_reference, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { int ret; ret = prelude_string_new_dup_fast(&(arg2), PyString_AsString(obj1), PyString_Size(obj1)); if ( ret < 0 ) { swig_python_raise_exception(ret); return NULL; } } { Py_BEGIN_ALLOW_THREADS idmef_reference_set_url(arg1,arg2); Py_END_ALLOW_THREADS } resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_reference_new_url(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_reference_t *arg1 = (idmef_reference_t *) 0 ; prelude_string_t **arg2 = (prelude_string_t **) 0 ; void *argp2 = 0 ; int res2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; int result; if (!PyArg_ParseTuple(args,(char *)"OO:idmef_reference_new_url",&obj0,&obj1)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_reference, SWIG_POINTER_EXCEPTION|0) ) return NULL; } res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_p_prelude_string_t, 0 | 0 ); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "idmef_reference_new_url" "', argument " "2"" of type '" "prelude_string_t **""'"); } arg2 = (prelude_string_t **)(argp2); { Py_BEGIN_ALLOW_THREADS result = (int)idmef_reference_new_url(arg1,arg2); Py_END_ALLOW_THREADS } { if ( result < 0 ) { swig_python_raise_exception(result); resultobj = NULL; } else { resultobj = PyInt_FromLong(result); } } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_reference_get_meaning(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_reference_t *arg1 = (idmef_reference_t *) 0 ; PyObject * obj0 = 0 ; prelude_string_t *result = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:idmef_reference_get_meaning",&obj0)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_reference, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { Py_BEGIN_ALLOW_THREADS result = (prelude_string_t *)idmef_reference_get_meaning(arg1); Py_END_ALLOW_THREADS } { resultobj = swig_python_string(result); } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_reference_set_meaning(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_reference_t *arg1 = (idmef_reference_t *) 0 ; prelude_string_t *arg2 = (prelude_string_t *) 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:idmef_reference_set_meaning",&obj0,&obj1)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_reference, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { int ret; ret = prelude_string_new_dup_fast(&(arg2), PyString_AsString(obj1), PyString_Size(obj1)); if ( ret < 0 ) { swig_python_raise_exception(ret); return NULL; } } { Py_BEGIN_ALLOW_THREADS idmef_reference_set_meaning(arg1,arg2); Py_END_ALLOW_THREADS } resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_reference_new_meaning(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_reference_t *arg1 = (idmef_reference_t *) 0 ; prelude_string_t **arg2 = (prelude_string_t **) 0 ; void *argp2 = 0 ; int res2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; int result; if (!PyArg_ParseTuple(args,(char *)"OO:idmef_reference_new_meaning",&obj0,&obj1)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_reference, SWIG_POINTER_EXCEPTION|0) ) return NULL; } res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_p_prelude_string_t, 0 | 0 ); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "idmef_reference_new_meaning" "', argument " "2"" of type '" "prelude_string_t **""'"); } arg2 = (prelude_string_t **)(argp2); { Py_BEGIN_ALLOW_THREADS result = (int)idmef_reference_new_meaning(arg1,arg2); Py_END_ALLOW_THREADS } { if ( result < 0 ) { swig_python_raise_exception(result); resultobj = NULL; } else { resultobj = PyInt_FromLong(result); } } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_classification_new(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_classification_t **arg1 = (idmef_classification_t **) 0 ; idmef_classification_t *tmp1 ; int result; { arg1 = (idmef_classification_t **) &tmp1; } if (!PyArg_ParseTuple(args,(char *)":idmef_classification_new")) SWIG_fail; { Py_BEGIN_ALLOW_THREADS result = (int)idmef_classification_new(arg1); Py_END_ALLOW_THREADS } { if ( result < 0 ) { swig_python_raise_exception(result); resultobj = NULL; } else { resultobj = PyInt_FromLong(result); } } { if ( result >= 0 ) resultobj = SWIG_NewPointerObj((void *) * arg1, SWIGTYPE_p_idmef_classification, 0); } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_classification_copy(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_classification_t *arg1 = (idmef_classification_t *) 0 ; idmef_classification_t *arg2 = (idmef_classification_t *) 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; int result; if (!PyArg_ParseTuple(args,(char *)"OO:idmef_classification_copy",&obj0,&obj1)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_classification, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { if ( obj1 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj1, (void **)&arg2, SWIGTYPE_p_idmef_classification, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { Py_BEGIN_ALLOW_THREADS result = (int)idmef_classification_copy((struct idmef_classification const *)arg1,arg2); Py_END_ALLOW_THREADS } { if ( result < 0 ) { swig_python_raise_exception(result); resultobj = NULL; } else { resultobj = PyInt_FromLong(result); } } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_classification_clone(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_classification_t *arg1 = (idmef_classification_t *) 0 ; idmef_classification_t **arg2 = (idmef_classification_t **) 0 ; idmef_classification_t *tmp2 ; PyObject * obj0 = 0 ; int result; { arg2 = (idmef_classification_t **) &tmp2; } if (!PyArg_ParseTuple(args,(char *)"O:idmef_classification_clone",&obj0)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_classification, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { Py_BEGIN_ALLOW_THREADS result = (int)idmef_classification_clone(arg1,arg2); Py_END_ALLOW_THREADS } { if ( result < 0 ) { swig_python_raise_exception(result); resultobj = NULL; } else { resultobj = PyInt_FromLong(result); } } { if ( result >= 0 ) resultobj = SWIG_NewPointerObj((void *) * arg2, SWIGTYPE_p_idmef_classification, 0); } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_classification_compare(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_classification_t *arg1 = (idmef_classification_t *) 0 ; idmef_classification_t *arg2 = (idmef_classification_t *) 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; int result; if (!PyArg_ParseTuple(args,(char *)"OO:idmef_classification_compare",&obj0,&obj1)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_classification, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { if ( obj1 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj1, (void **)&arg2, SWIGTYPE_p_idmef_classification, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { Py_BEGIN_ALLOW_THREADS result = (int)idmef_classification_compare((struct idmef_classification const *)arg1,(struct idmef_classification const *)arg2); Py_END_ALLOW_THREADS } { resultobj = PyInt_FromLong(result); } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_classification_ref(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_classification_t *arg1 = (idmef_classification_t *) 0 ; PyObject * obj0 = 0 ; idmef_classification_t *result = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:idmef_classification_ref",&obj0)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_classification, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { Py_BEGIN_ALLOW_THREADS result = (idmef_classification_t *)idmef_classification_ref(arg1); Py_END_ALLOW_THREADS } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_idmef_classification, 0 | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_classification_destroy(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_classification_t *arg1 = (idmef_classification_t *) 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:idmef_classification_destroy",&obj0)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_classification, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { Py_BEGIN_ALLOW_THREADS idmef_classification_destroy(arg1); Py_END_ALLOW_THREADS } resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_classification_get_ident(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_classification_t *arg1 = (idmef_classification_t *) 0 ; PyObject * obj0 = 0 ; prelude_string_t *result = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:idmef_classification_get_ident",&obj0)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_classification, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { Py_BEGIN_ALLOW_THREADS result = (prelude_string_t *)idmef_classification_get_ident(arg1); Py_END_ALLOW_THREADS } { resultobj = swig_python_string(result); } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_classification_set_ident(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_classification_t *arg1 = (idmef_classification_t *) 0 ; prelude_string_t *arg2 = (prelude_string_t *) 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:idmef_classification_set_ident",&obj0,&obj1)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_classification, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { int ret; ret = prelude_string_new_dup_fast(&(arg2), PyString_AsString(obj1), PyString_Size(obj1)); if ( ret < 0 ) { swig_python_raise_exception(ret); return NULL; } } { Py_BEGIN_ALLOW_THREADS idmef_classification_set_ident(arg1,arg2); Py_END_ALLOW_THREADS } resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_classification_new_ident(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_classification_t *arg1 = (idmef_classification_t *) 0 ; prelude_string_t **arg2 = (prelude_string_t **) 0 ; void *argp2 = 0 ; int res2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; int result; if (!PyArg_ParseTuple(args,(char *)"OO:idmef_classification_new_ident",&obj0,&obj1)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_classification, SWIG_POINTER_EXCEPTION|0) ) return NULL; } res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_p_prelude_string_t, 0 | 0 ); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "idmef_classification_new_ident" "', argument " "2"" of type '" "prelude_string_t **""'"); } arg2 = (prelude_string_t **)(argp2); { Py_BEGIN_ALLOW_THREADS result = (int)idmef_classification_new_ident(arg1,arg2); Py_END_ALLOW_THREADS } { if ( result < 0 ) { swig_python_raise_exception(result); resultobj = NULL; } else { resultobj = PyInt_FromLong(result); } } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_classification_get_text(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_classification_t *arg1 = (idmef_classification_t *) 0 ; PyObject * obj0 = 0 ; prelude_string_t *result = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:idmef_classification_get_text",&obj0)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_classification, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { Py_BEGIN_ALLOW_THREADS result = (prelude_string_t *)idmef_classification_get_text(arg1); Py_END_ALLOW_THREADS } { resultobj = swig_python_string(result); } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_classification_set_text(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_classification_t *arg1 = (idmef_classification_t *) 0 ; prelude_string_t *arg2 = (prelude_string_t *) 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:idmef_classification_set_text",&obj0,&obj1)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_classification, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { int ret; ret = prelude_string_new_dup_fast(&(arg2), PyString_AsString(obj1), PyString_Size(obj1)); if ( ret < 0 ) { swig_python_raise_exception(ret); return NULL; } } { Py_BEGIN_ALLOW_THREADS idmef_classification_set_text(arg1,arg2); Py_END_ALLOW_THREADS } resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_classification_new_text(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_classification_t *arg1 = (idmef_classification_t *) 0 ; prelude_string_t **arg2 = (prelude_string_t **) 0 ; void *argp2 = 0 ; int res2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; int result; if (!PyArg_ParseTuple(args,(char *)"OO:idmef_classification_new_text",&obj0,&obj1)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_classification, SWIG_POINTER_EXCEPTION|0) ) return NULL; } res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_p_prelude_string_t, 0 | 0 ); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "idmef_classification_new_text" "', argument " "2"" of type '" "prelude_string_t **""'"); } arg2 = (prelude_string_t **)(argp2); { Py_BEGIN_ALLOW_THREADS result = (int)idmef_classification_new_text(arg1,arg2); Py_END_ALLOW_THREADS } { if ( result < 0 ) { swig_python_raise_exception(result); resultobj = NULL; } else { resultobj = PyInt_FromLong(result); } } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_classification_get_next_reference(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_classification_t *arg1 = (idmef_classification_t *) 0 ; idmef_reference_t *arg2 = (idmef_reference_t *) 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; idmef_reference_t *result = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:idmef_classification_get_next_reference",&obj0,&obj1)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_classification, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { if ( obj1 == Py_None ) { arg2 = NULL; } else { if ( SWIG_ConvertPtr(obj1, (void **)&arg2, SWIGTYPE_p_idmef_reference, SWIG_POINTER_EXCEPTION|0) ) return NULL; } } { Py_BEGIN_ALLOW_THREADS result = (idmef_reference_t *)idmef_classification_get_next_reference(arg1,arg2); Py_END_ALLOW_THREADS } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_idmef_reference, 0 | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_classification_set_reference(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_classification_t *arg1 = (idmef_classification_t *) 0 ; idmef_reference_t *arg2 = (idmef_reference_t *) 0 ; int arg3 ; int val3 ; int ecode3 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; PyObject * obj2 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OOO:idmef_classification_set_reference",&obj0,&obj1,&obj2)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_classification, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { if ( obj1 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj1, (void **)&arg2, SWIGTYPE_p_idmef_reference, SWIG_POINTER_EXCEPTION|0) ) return NULL; } ecode3 = SWIG_AsVal_int(obj2, &val3); if (!SWIG_IsOK(ecode3)) { SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "idmef_classification_set_reference" "', argument " "3"" of type '" "int""'"); } arg3 = (int)(val3); { Py_BEGIN_ALLOW_THREADS idmef_classification_set_reference(arg1,arg2,arg3); Py_END_ALLOW_THREADS } resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_classification_new_reference(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_classification_t *arg1 = (idmef_classification_t *) 0 ; idmef_reference_t **arg2 = (idmef_reference_t **) 0 ; int arg3 ; idmef_reference_t *tmp2 ; int val3 ; int ecode3 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; int result; { arg2 = (idmef_reference_t **) &tmp2; } if (!PyArg_ParseTuple(args,(char *)"OO:idmef_classification_new_reference",&obj0,&obj1)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_classification, SWIG_POINTER_EXCEPTION|0) ) return NULL; } ecode3 = SWIG_AsVal_int(obj1, &val3); if (!SWIG_IsOK(ecode3)) { SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "idmef_classification_new_reference" "', argument " "3"" of type '" "int""'"); } arg3 = (int)(val3); { Py_BEGIN_ALLOW_THREADS result = (int)idmef_classification_new_reference(arg1,arg2,arg3); Py_END_ALLOW_THREADS } { if ( result < 0 ) { swig_python_raise_exception(result); resultobj = NULL; } else { resultobj = PyInt_FromLong(result); } } { if ( result >= 0 ) resultobj = SWIG_NewPointerObj((void *) * arg2, SWIGTYPE_p_idmef_reference, 0); } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_user_id_type_to_numeric(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; char *arg1 = (char *) 0 ; PyObject * obj0 = 0 ; idmef_user_id_type_t result; if (!PyArg_ParseTuple(args,(char *)"O:idmef_user_id_type_to_numeric",&obj0)) SWIG_fail; { if ( obj0 == Py_None ) arg1 = NULL; else if ( PyString_Check(obj0) ) arg1 = PyString_AsString(obj0); else { PyErr_Format(PyExc_TypeError, "expected None or string, %s found", obj0->ob_type->tp_name); return NULL; } } { Py_BEGIN_ALLOW_THREADS result = (idmef_user_id_type_t)idmef_user_id_type_to_numeric((char const *)arg1); Py_END_ALLOW_THREADS } resultobj = SWIG_From_int((int)(result)); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_user_id_type_to_string(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_user_id_type_t arg1 ; int val1 ; int ecode1 = 0 ; PyObject * obj0 = 0 ; char *result = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:idmef_user_id_type_to_string",&obj0)) SWIG_fail; ecode1 = SWIG_AsVal_int(obj0, &val1); if (!SWIG_IsOK(ecode1)) { SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "idmef_user_id_type_to_string" "', argument " "1"" of type '" "idmef_user_id_type_t""'"); } arg1 = (idmef_user_id_type_t)(val1); { Py_BEGIN_ALLOW_THREADS result = (char *)idmef_user_id_type_to_string(arg1); Py_END_ALLOW_THREADS } resultobj = SWIG_FromCharPtr((const char *)result); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_user_id_new(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_user_id_t **arg1 = (idmef_user_id_t **) 0 ; idmef_user_id_t *tmp1 ; int result; { arg1 = (idmef_user_id_t **) &tmp1; } if (!PyArg_ParseTuple(args,(char *)":idmef_user_id_new")) SWIG_fail; { Py_BEGIN_ALLOW_THREADS result = (int)idmef_user_id_new(arg1); Py_END_ALLOW_THREADS } { if ( result < 0 ) { swig_python_raise_exception(result); resultobj = NULL; } else { resultobj = PyInt_FromLong(result); } } { if ( result >= 0 ) resultobj = SWIG_NewPointerObj((void *) * arg1, SWIGTYPE_p_idmef_user_id, 0); } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_user_id_copy(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_user_id_t *arg1 = (idmef_user_id_t *) 0 ; idmef_user_id_t *arg2 = (idmef_user_id_t *) 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; int result; if (!PyArg_ParseTuple(args,(char *)"OO:idmef_user_id_copy",&obj0,&obj1)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_user_id, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { if ( obj1 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj1, (void **)&arg2, SWIGTYPE_p_idmef_user_id, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { Py_BEGIN_ALLOW_THREADS result = (int)idmef_user_id_copy((struct idmef_user_id const *)arg1,arg2); Py_END_ALLOW_THREADS } { if ( result < 0 ) { swig_python_raise_exception(result); resultobj = NULL; } else { resultobj = PyInt_FromLong(result); } } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_user_id_clone(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_user_id_t *arg1 = (idmef_user_id_t *) 0 ; idmef_user_id_t **arg2 = (idmef_user_id_t **) 0 ; idmef_user_id_t *tmp2 ; PyObject * obj0 = 0 ; int result; { arg2 = (idmef_user_id_t **) &tmp2; } if (!PyArg_ParseTuple(args,(char *)"O:idmef_user_id_clone",&obj0)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_user_id, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { Py_BEGIN_ALLOW_THREADS result = (int)idmef_user_id_clone(arg1,arg2); Py_END_ALLOW_THREADS } { if ( result < 0 ) { swig_python_raise_exception(result); resultobj = NULL; } else { resultobj = PyInt_FromLong(result); } } { if ( result >= 0 ) resultobj = SWIG_NewPointerObj((void *) * arg2, SWIGTYPE_p_idmef_user_id, 0); } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_user_id_compare(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_user_id_t *arg1 = (idmef_user_id_t *) 0 ; idmef_user_id_t *arg2 = (idmef_user_id_t *) 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; int result; if (!PyArg_ParseTuple(args,(char *)"OO:idmef_user_id_compare",&obj0,&obj1)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_user_id, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { if ( obj1 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj1, (void **)&arg2, SWIGTYPE_p_idmef_user_id, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { Py_BEGIN_ALLOW_THREADS result = (int)idmef_user_id_compare((struct idmef_user_id const *)arg1,(struct idmef_user_id const *)arg2); Py_END_ALLOW_THREADS } { resultobj = PyInt_FromLong(result); } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_user_id_ref(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_user_id_t *arg1 = (idmef_user_id_t *) 0 ; PyObject * obj0 = 0 ; idmef_user_id_t *result = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:idmef_user_id_ref",&obj0)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_user_id, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { Py_BEGIN_ALLOW_THREADS result = (idmef_user_id_t *)idmef_user_id_ref(arg1); Py_END_ALLOW_THREADS } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_idmef_user_id, 0 | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_user_id_destroy(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_user_id_t *arg1 = (idmef_user_id_t *) 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:idmef_user_id_destroy",&obj0)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_user_id, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { Py_BEGIN_ALLOW_THREADS idmef_user_id_destroy(arg1); Py_END_ALLOW_THREADS } resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_user_id_get_ident(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_user_id_t *arg1 = (idmef_user_id_t *) 0 ; PyObject * obj0 = 0 ; prelude_string_t *result = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:idmef_user_id_get_ident",&obj0)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_user_id, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { Py_BEGIN_ALLOW_THREADS result = (prelude_string_t *)idmef_user_id_get_ident(arg1); Py_END_ALLOW_THREADS } { resultobj = swig_python_string(result); } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_user_id_set_ident(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_user_id_t *arg1 = (idmef_user_id_t *) 0 ; prelude_string_t *arg2 = (prelude_string_t *) 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:idmef_user_id_set_ident",&obj0,&obj1)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_user_id, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { int ret; ret = prelude_string_new_dup_fast(&(arg2), PyString_AsString(obj1), PyString_Size(obj1)); if ( ret < 0 ) { swig_python_raise_exception(ret); return NULL; } } { Py_BEGIN_ALLOW_THREADS idmef_user_id_set_ident(arg1,arg2); Py_END_ALLOW_THREADS } resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_user_id_new_ident(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_user_id_t *arg1 = (idmef_user_id_t *) 0 ; prelude_string_t **arg2 = (prelude_string_t **) 0 ; void *argp2 = 0 ; int res2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; int result; if (!PyArg_ParseTuple(args,(char *)"OO:idmef_user_id_new_ident",&obj0,&obj1)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_user_id, SWIG_POINTER_EXCEPTION|0) ) return NULL; } res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_p_prelude_string_t, 0 | 0 ); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "idmef_user_id_new_ident" "', argument " "2"" of type '" "prelude_string_t **""'"); } arg2 = (prelude_string_t **)(argp2); { Py_BEGIN_ALLOW_THREADS result = (int)idmef_user_id_new_ident(arg1,arg2); Py_END_ALLOW_THREADS } { if ( result < 0 ) { swig_python_raise_exception(result); resultobj = NULL; } else { resultobj = PyInt_FromLong(result); } } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_user_id_get_type(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_user_id_t *arg1 = (idmef_user_id_t *) 0 ; PyObject * obj0 = 0 ; idmef_user_id_type_t result; if (!PyArg_ParseTuple(args,(char *)"O:idmef_user_id_get_type",&obj0)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_user_id, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { Py_BEGIN_ALLOW_THREADS result = (idmef_user_id_type_t)idmef_user_id_get_type(arg1); Py_END_ALLOW_THREADS } resultobj = SWIG_From_int((int)(result)); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_user_id_set_type(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_user_id_t *arg1 = (idmef_user_id_t *) 0 ; idmef_user_id_type_t arg2 ; int val2 ; int ecode2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:idmef_user_id_set_type",&obj0,&obj1)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_user_id, SWIG_POINTER_EXCEPTION|0) ) return NULL; } ecode2 = SWIG_AsVal_int(obj1, &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "idmef_user_id_set_type" "', argument " "2"" of type '" "idmef_user_id_type_t""'"); } arg2 = (idmef_user_id_type_t)(val2); { Py_BEGIN_ALLOW_THREADS idmef_user_id_set_type(arg1,arg2); Py_END_ALLOW_THREADS } resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_user_id_new_type(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_user_id_t *arg1 = (idmef_user_id_t *) 0 ; idmef_user_id_type_t **arg2 = (idmef_user_id_type_t **) 0 ; void *argp2 = 0 ; int res2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; int result; if (!PyArg_ParseTuple(args,(char *)"OO:idmef_user_id_new_type",&obj0,&obj1)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_user_id, SWIG_POINTER_EXCEPTION|0) ) return NULL; } res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_p_idmef_user_id_type_t, 0 | 0 ); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "idmef_user_id_new_type" "', argument " "2"" of type '" "idmef_user_id_type_t **""'"); } arg2 = (idmef_user_id_type_t **)(argp2); { Py_BEGIN_ALLOW_THREADS result = (int)idmef_user_id_new_type(arg1,arg2); Py_END_ALLOW_THREADS } { if ( result < 0 ) { swig_python_raise_exception(result); resultobj = NULL; } else { resultobj = PyInt_FromLong(result); } } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_user_id_get_tty(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_user_id_t *arg1 = (idmef_user_id_t *) 0 ; PyObject * obj0 = 0 ; prelude_string_t *result = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:idmef_user_id_get_tty",&obj0)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_user_id, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { Py_BEGIN_ALLOW_THREADS result = (prelude_string_t *)idmef_user_id_get_tty(arg1); Py_END_ALLOW_THREADS } { resultobj = swig_python_string(result); } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_user_id_set_tty(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_user_id_t *arg1 = (idmef_user_id_t *) 0 ; prelude_string_t *arg2 = (prelude_string_t *) 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:idmef_user_id_set_tty",&obj0,&obj1)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_user_id, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { int ret; ret = prelude_string_new_dup_fast(&(arg2), PyString_AsString(obj1), PyString_Size(obj1)); if ( ret < 0 ) { swig_python_raise_exception(ret); return NULL; } } { Py_BEGIN_ALLOW_THREADS idmef_user_id_set_tty(arg1,arg2); Py_END_ALLOW_THREADS } resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_user_id_new_tty(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_user_id_t *arg1 = (idmef_user_id_t *) 0 ; prelude_string_t **arg2 = (prelude_string_t **) 0 ; void *argp2 = 0 ; int res2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; int result; if (!PyArg_ParseTuple(args,(char *)"OO:idmef_user_id_new_tty",&obj0,&obj1)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_user_id, SWIG_POINTER_EXCEPTION|0) ) return NULL; } res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_p_prelude_string_t, 0 | 0 ); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "idmef_user_id_new_tty" "', argument " "2"" of type '" "prelude_string_t **""'"); } arg2 = (prelude_string_t **)(argp2); { Py_BEGIN_ALLOW_THREADS result = (int)idmef_user_id_new_tty(arg1,arg2); Py_END_ALLOW_THREADS } { if ( result < 0 ) { swig_python_raise_exception(result); resultobj = NULL; } else { resultobj = PyInt_FromLong(result); } } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_user_id_get_name(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_user_id_t *arg1 = (idmef_user_id_t *) 0 ; PyObject * obj0 = 0 ; prelude_string_t *result = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:idmef_user_id_get_name",&obj0)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_user_id, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { Py_BEGIN_ALLOW_THREADS result = (prelude_string_t *)idmef_user_id_get_name(arg1); Py_END_ALLOW_THREADS } { resultobj = swig_python_string(result); } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_user_id_set_name(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_user_id_t *arg1 = (idmef_user_id_t *) 0 ; prelude_string_t *arg2 = (prelude_string_t *) 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:idmef_user_id_set_name",&obj0,&obj1)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_user_id, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { int ret; ret = prelude_string_new_dup_fast(&(arg2), PyString_AsString(obj1), PyString_Size(obj1)); if ( ret < 0 ) { swig_python_raise_exception(ret); return NULL; } } { Py_BEGIN_ALLOW_THREADS idmef_user_id_set_name(arg1,arg2); Py_END_ALLOW_THREADS } resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_user_id_new_name(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_user_id_t *arg1 = (idmef_user_id_t *) 0 ; prelude_string_t **arg2 = (prelude_string_t **) 0 ; void *argp2 = 0 ; int res2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; int result; if (!PyArg_ParseTuple(args,(char *)"OO:idmef_user_id_new_name",&obj0,&obj1)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_user_id, SWIG_POINTER_EXCEPTION|0) ) return NULL; } res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_p_prelude_string_t, 0 | 0 ); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "idmef_user_id_new_name" "', argument " "2"" of type '" "prelude_string_t **""'"); } arg2 = (prelude_string_t **)(argp2); { Py_BEGIN_ALLOW_THREADS result = (int)idmef_user_id_new_name(arg1,arg2); Py_END_ALLOW_THREADS } { if ( result < 0 ) { swig_python_raise_exception(result); resultobj = NULL; } else { resultobj = PyInt_FromLong(result); } } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_user_id_unset_number(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_user_id_t *arg1 = (idmef_user_id_t *) 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:idmef_user_id_unset_number",&obj0)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_user_id, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { Py_BEGIN_ALLOW_THREADS idmef_user_id_unset_number(arg1); Py_END_ALLOW_THREADS } resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_user_id_get_number(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_user_id_t *arg1 = (idmef_user_id_t *) 0 ; PyObject * obj0 = 0 ; uint32_t *result = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:idmef_user_id_get_number",&obj0)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_user_id, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { Py_BEGIN_ALLOW_THREADS result = (uint32_t *)idmef_user_id_get_number(arg1); Py_END_ALLOW_THREADS } { if (result != NULL) { resultobj = PyLong_FromUnsignedLong(*result); } else { resultobj = Py_None; } } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_user_id_set_number(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_user_id_t *arg1 = (idmef_user_id_t *) 0 ; uint32_t arg2 ; unsigned int val2 ; int ecode2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:idmef_user_id_set_number",&obj0,&obj1)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_user_id, SWIG_POINTER_EXCEPTION|0) ) return NULL; } ecode2 = SWIG_AsVal_unsigned_SS_int(obj1, &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "idmef_user_id_set_number" "', argument " "2"" of type '" "uint32_t""'"); } arg2 = (uint32_t)(val2); { Py_BEGIN_ALLOW_THREADS idmef_user_id_set_number(arg1,arg2); Py_END_ALLOW_THREADS } resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_user_id_new_number(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_user_id_t *arg1 = (idmef_user_id_t *) 0 ; uint32_t **arg2 = (uint32_t **) 0 ; void *argp2 = 0 ; int res2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; int result; if (!PyArg_ParseTuple(args,(char *)"OO:idmef_user_id_new_number",&obj0,&obj1)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_user_id, SWIG_POINTER_EXCEPTION|0) ) return NULL; } res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_p_unsigned_int, 0 | 0 ); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "idmef_user_id_new_number" "', argument " "2"" of type '" "uint32_t **""'"); } arg2 = (uint32_t **)(argp2); { Py_BEGIN_ALLOW_THREADS result = (int)idmef_user_id_new_number(arg1,arg2); Py_END_ALLOW_THREADS } { if ( result < 0 ) { swig_python_raise_exception(result); resultobj = NULL; } else { resultobj = PyInt_FromLong(result); } } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_user_category_to_numeric(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; char *arg1 = (char *) 0 ; PyObject * obj0 = 0 ; idmef_user_category_t result; if (!PyArg_ParseTuple(args,(char *)"O:idmef_user_category_to_numeric",&obj0)) SWIG_fail; { if ( obj0 == Py_None ) arg1 = NULL; else if ( PyString_Check(obj0) ) arg1 = PyString_AsString(obj0); else { PyErr_Format(PyExc_TypeError, "expected None or string, %s found", obj0->ob_type->tp_name); return NULL; } } { Py_BEGIN_ALLOW_THREADS result = (idmef_user_category_t)idmef_user_category_to_numeric((char const *)arg1); Py_END_ALLOW_THREADS } resultobj = SWIG_From_int((int)(result)); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_user_category_to_string(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_user_category_t arg1 ; int val1 ; int ecode1 = 0 ; PyObject * obj0 = 0 ; char *result = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:idmef_user_category_to_string",&obj0)) SWIG_fail; ecode1 = SWIG_AsVal_int(obj0, &val1); if (!SWIG_IsOK(ecode1)) { SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "idmef_user_category_to_string" "', argument " "1"" of type '" "idmef_user_category_t""'"); } arg1 = (idmef_user_category_t)(val1); { Py_BEGIN_ALLOW_THREADS result = (char *)idmef_user_category_to_string(arg1); Py_END_ALLOW_THREADS } resultobj = SWIG_FromCharPtr((const char *)result); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_user_new(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_user_t **arg1 = (idmef_user_t **) 0 ; idmef_user_t *tmp1 ; int result; { arg1 = (idmef_user_t **) &tmp1; } if (!PyArg_ParseTuple(args,(char *)":idmef_user_new")) SWIG_fail; { Py_BEGIN_ALLOW_THREADS result = (int)idmef_user_new(arg1); Py_END_ALLOW_THREADS } { if ( result < 0 ) { swig_python_raise_exception(result); resultobj = NULL; } else { resultobj = PyInt_FromLong(result); } } { if ( result >= 0 ) resultobj = SWIG_NewPointerObj((void *) * arg1, SWIGTYPE_p_idmef_user, 0); } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_user_copy(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_user_t *arg1 = (idmef_user_t *) 0 ; idmef_user_t *arg2 = (idmef_user_t *) 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; int result; if (!PyArg_ParseTuple(args,(char *)"OO:idmef_user_copy",&obj0,&obj1)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_user, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { if ( obj1 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj1, (void **)&arg2, SWIGTYPE_p_idmef_user, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { Py_BEGIN_ALLOW_THREADS result = (int)idmef_user_copy((struct idmef_user const *)arg1,arg2); Py_END_ALLOW_THREADS } { if ( result < 0 ) { swig_python_raise_exception(result); resultobj = NULL; } else { resultobj = PyInt_FromLong(result); } } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_user_clone(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_user_t *arg1 = (idmef_user_t *) 0 ; idmef_user_t **arg2 = (idmef_user_t **) 0 ; idmef_user_t *tmp2 ; PyObject * obj0 = 0 ; int result; { arg2 = (idmef_user_t **) &tmp2; } if (!PyArg_ParseTuple(args,(char *)"O:idmef_user_clone",&obj0)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_user, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { Py_BEGIN_ALLOW_THREADS result = (int)idmef_user_clone(arg1,arg2); Py_END_ALLOW_THREADS } { if ( result < 0 ) { swig_python_raise_exception(result); resultobj = NULL; } else { resultobj = PyInt_FromLong(result); } } { if ( result >= 0 ) resultobj = SWIG_NewPointerObj((void *) * arg2, SWIGTYPE_p_idmef_user, 0); } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_user_compare(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_user_t *arg1 = (idmef_user_t *) 0 ; idmef_user_t *arg2 = (idmef_user_t *) 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; int result; if (!PyArg_ParseTuple(args,(char *)"OO:idmef_user_compare",&obj0,&obj1)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_user, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { if ( obj1 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj1, (void **)&arg2, SWIGTYPE_p_idmef_user, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { Py_BEGIN_ALLOW_THREADS result = (int)idmef_user_compare((struct idmef_user const *)arg1,(struct idmef_user const *)arg2); Py_END_ALLOW_THREADS } { resultobj = PyInt_FromLong(result); } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_user_ref(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_user_t *arg1 = (idmef_user_t *) 0 ; PyObject * obj0 = 0 ; idmef_user_t *result = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:idmef_user_ref",&obj0)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_user, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { Py_BEGIN_ALLOW_THREADS result = (idmef_user_t *)idmef_user_ref(arg1); Py_END_ALLOW_THREADS } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_idmef_user, 0 | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_user_destroy(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_user_t *arg1 = (idmef_user_t *) 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:idmef_user_destroy",&obj0)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_user, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { Py_BEGIN_ALLOW_THREADS idmef_user_destroy(arg1); Py_END_ALLOW_THREADS } resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_user_get_ident(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_user_t *arg1 = (idmef_user_t *) 0 ; PyObject * obj0 = 0 ; prelude_string_t *result = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:idmef_user_get_ident",&obj0)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_user, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { Py_BEGIN_ALLOW_THREADS result = (prelude_string_t *)idmef_user_get_ident(arg1); Py_END_ALLOW_THREADS } { resultobj = swig_python_string(result); } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_user_set_ident(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_user_t *arg1 = (idmef_user_t *) 0 ; prelude_string_t *arg2 = (prelude_string_t *) 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:idmef_user_set_ident",&obj0,&obj1)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_user, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { int ret; ret = prelude_string_new_dup_fast(&(arg2), PyString_AsString(obj1), PyString_Size(obj1)); if ( ret < 0 ) { swig_python_raise_exception(ret); return NULL; } } { Py_BEGIN_ALLOW_THREADS idmef_user_set_ident(arg1,arg2); Py_END_ALLOW_THREADS } resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_user_new_ident(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_user_t *arg1 = (idmef_user_t *) 0 ; prelude_string_t **arg2 = (prelude_string_t **) 0 ; void *argp2 = 0 ; int res2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; int result; if (!PyArg_ParseTuple(args,(char *)"OO:idmef_user_new_ident",&obj0,&obj1)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_user, SWIG_POINTER_EXCEPTION|0) ) return NULL; } res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_p_prelude_string_t, 0 | 0 ); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "idmef_user_new_ident" "', argument " "2"" of type '" "prelude_string_t **""'"); } arg2 = (prelude_string_t **)(argp2); { Py_BEGIN_ALLOW_THREADS result = (int)idmef_user_new_ident(arg1,arg2); Py_END_ALLOW_THREADS } { if ( result < 0 ) { swig_python_raise_exception(result); resultobj = NULL; } else { resultobj = PyInt_FromLong(result); } } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_user_get_category(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_user_t *arg1 = (idmef_user_t *) 0 ; PyObject * obj0 = 0 ; idmef_user_category_t result; if (!PyArg_ParseTuple(args,(char *)"O:idmef_user_get_category",&obj0)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_user, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { Py_BEGIN_ALLOW_THREADS result = (idmef_user_category_t)idmef_user_get_category(arg1); Py_END_ALLOW_THREADS } resultobj = SWIG_From_int((int)(result)); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_user_set_category(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_user_t *arg1 = (idmef_user_t *) 0 ; idmef_user_category_t arg2 ; int val2 ; int ecode2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:idmef_user_set_category",&obj0,&obj1)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_user, SWIG_POINTER_EXCEPTION|0) ) return NULL; } ecode2 = SWIG_AsVal_int(obj1, &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "idmef_user_set_category" "', argument " "2"" of type '" "idmef_user_category_t""'"); } arg2 = (idmef_user_category_t)(val2); { Py_BEGIN_ALLOW_THREADS idmef_user_set_category(arg1,arg2); Py_END_ALLOW_THREADS } resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_user_new_category(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_user_t *arg1 = (idmef_user_t *) 0 ; idmef_user_category_t **arg2 = (idmef_user_category_t **) 0 ; void *argp2 = 0 ; int res2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; int result; if (!PyArg_ParseTuple(args,(char *)"OO:idmef_user_new_category",&obj0,&obj1)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_user, SWIG_POINTER_EXCEPTION|0) ) return NULL; } res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_p_idmef_user_category_t, 0 | 0 ); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "idmef_user_new_category" "', argument " "2"" of type '" "idmef_user_category_t **""'"); } arg2 = (idmef_user_category_t **)(argp2); { Py_BEGIN_ALLOW_THREADS result = (int)idmef_user_new_category(arg1,arg2); Py_END_ALLOW_THREADS } { if ( result < 0 ) { swig_python_raise_exception(result); resultobj = NULL; } else { resultobj = PyInt_FromLong(result); } } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_user_get_next_user_id(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_user_t *arg1 = (idmef_user_t *) 0 ; idmef_user_id_t *arg2 = (idmef_user_id_t *) 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; idmef_user_id_t *result = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:idmef_user_get_next_user_id",&obj0,&obj1)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_user, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { if ( obj1 == Py_None ) { arg2 = NULL; } else { if ( SWIG_ConvertPtr(obj1, (void **)&arg2, SWIGTYPE_p_idmef_user_id, SWIG_POINTER_EXCEPTION|0) ) return NULL; } } { Py_BEGIN_ALLOW_THREADS result = (idmef_user_id_t *)idmef_user_get_next_user_id(arg1,arg2); Py_END_ALLOW_THREADS } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_idmef_user_id, 0 | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_user_set_user_id(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_user_t *arg1 = (idmef_user_t *) 0 ; idmef_user_id_t *arg2 = (idmef_user_id_t *) 0 ; int arg3 ; int val3 ; int ecode3 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; PyObject * obj2 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OOO:idmef_user_set_user_id",&obj0,&obj1,&obj2)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_user, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { if ( obj1 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj1, (void **)&arg2, SWIGTYPE_p_idmef_user_id, SWIG_POINTER_EXCEPTION|0) ) return NULL; } ecode3 = SWIG_AsVal_int(obj2, &val3); if (!SWIG_IsOK(ecode3)) { SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "idmef_user_set_user_id" "', argument " "3"" of type '" "int""'"); } arg3 = (int)(val3); { Py_BEGIN_ALLOW_THREADS idmef_user_set_user_id(arg1,arg2,arg3); Py_END_ALLOW_THREADS } resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_user_new_user_id(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_user_t *arg1 = (idmef_user_t *) 0 ; idmef_user_id_t **arg2 = (idmef_user_id_t **) 0 ; int arg3 ; idmef_user_id_t *tmp2 ; int val3 ; int ecode3 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; int result; { arg2 = (idmef_user_id_t **) &tmp2; } if (!PyArg_ParseTuple(args,(char *)"OO:idmef_user_new_user_id",&obj0,&obj1)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_user, SWIG_POINTER_EXCEPTION|0) ) return NULL; } ecode3 = SWIG_AsVal_int(obj1, &val3); if (!SWIG_IsOK(ecode3)) { SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "idmef_user_new_user_id" "', argument " "3"" of type '" "int""'"); } arg3 = (int)(val3); { Py_BEGIN_ALLOW_THREADS result = (int)idmef_user_new_user_id(arg1,arg2,arg3); Py_END_ALLOW_THREADS } { if ( result < 0 ) { swig_python_raise_exception(result); resultobj = NULL; } else { resultobj = PyInt_FromLong(result); } } { if ( result >= 0 ) resultobj = SWIG_NewPointerObj((void *) * arg2, SWIGTYPE_p_idmef_user_id, 0); } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_address_category_to_numeric(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; char *arg1 = (char *) 0 ; PyObject * obj0 = 0 ; idmef_address_category_t result; if (!PyArg_ParseTuple(args,(char *)"O:idmef_address_category_to_numeric",&obj0)) SWIG_fail; { if ( obj0 == Py_None ) arg1 = NULL; else if ( PyString_Check(obj0) ) arg1 = PyString_AsString(obj0); else { PyErr_Format(PyExc_TypeError, "expected None or string, %s found", obj0->ob_type->tp_name); return NULL; } } { Py_BEGIN_ALLOW_THREADS result = (idmef_address_category_t)idmef_address_category_to_numeric((char const *)arg1); Py_END_ALLOW_THREADS } resultobj = SWIG_From_int((int)(result)); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_address_category_to_string(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_address_category_t arg1 ; int val1 ; int ecode1 = 0 ; PyObject * obj0 = 0 ; char *result = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:idmef_address_category_to_string",&obj0)) SWIG_fail; ecode1 = SWIG_AsVal_int(obj0, &val1); if (!SWIG_IsOK(ecode1)) { SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "idmef_address_category_to_string" "', argument " "1"" of type '" "idmef_address_category_t""'"); } arg1 = (idmef_address_category_t)(val1); { Py_BEGIN_ALLOW_THREADS result = (char *)idmef_address_category_to_string(arg1); Py_END_ALLOW_THREADS } resultobj = SWIG_FromCharPtr((const char *)result); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_address_new(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_address_t **arg1 = (idmef_address_t **) 0 ; idmef_address_t *tmp1 ; int result; { arg1 = (idmef_address_t **) &tmp1; } if (!PyArg_ParseTuple(args,(char *)":idmef_address_new")) SWIG_fail; { Py_BEGIN_ALLOW_THREADS result = (int)idmef_address_new(arg1); Py_END_ALLOW_THREADS } { if ( result < 0 ) { swig_python_raise_exception(result); resultobj = NULL; } else { resultobj = PyInt_FromLong(result); } } { if ( result >= 0 ) resultobj = SWIG_NewPointerObj((void *) * arg1, SWIGTYPE_p_idmef_address, 0); } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_address_copy(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_address_t *arg1 = (idmef_address_t *) 0 ; idmef_address_t *arg2 = (idmef_address_t *) 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; int result; if (!PyArg_ParseTuple(args,(char *)"OO:idmef_address_copy",&obj0,&obj1)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_address, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { if ( obj1 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj1, (void **)&arg2, SWIGTYPE_p_idmef_address, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { Py_BEGIN_ALLOW_THREADS result = (int)idmef_address_copy((struct idmef_address const *)arg1,arg2); Py_END_ALLOW_THREADS } { if ( result < 0 ) { swig_python_raise_exception(result); resultobj = NULL; } else { resultobj = PyInt_FromLong(result); } } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_address_clone(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_address_t *arg1 = (idmef_address_t *) 0 ; idmef_address_t **arg2 = (idmef_address_t **) 0 ; idmef_address_t *tmp2 ; PyObject * obj0 = 0 ; int result; { arg2 = (idmef_address_t **) &tmp2; } if (!PyArg_ParseTuple(args,(char *)"O:idmef_address_clone",&obj0)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_address, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { Py_BEGIN_ALLOW_THREADS result = (int)idmef_address_clone(arg1,arg2); Py_END_ALLOW_THREADS } { if ( result < 0 ) { swig_python_raise_exception(result); resultobj = NULL; } else { resultobj = PyInt_FromLong(result); } } { if ( result >= 0 ) resultobj = SWIG_NewPointerObj((void *) * arg2, SWIGTYPE_p_idmef_address, 0); } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_address_compare(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_address_t *arg1 = (idmef_address_t *) 0 ; idmef_address_t *arg2 = (idmef_address_t *) 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; int result; if (!PyArg_ParseTuple(args,(char *)"OO:idmef_address_compare",&obj0,&obj1)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_address, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { if ( obj1 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj1, (void **)&arg2, SWIGTYPE_p_idmef_address, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { Py_BEGIN_ALLOW_THREADS result = (int)idmef_address_compare((struct idmef_address const *)arg1,(struct idmef_address const *)arg2); Py_END_ALLOW_THREADS } { resultobj = PyInt_FromLong(result); } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_address_ref(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_address_t *arg1 = (idmef_address_t *) 0 ; PyObject * obj0 = 0 ; idmef_address_t *result = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:idmef_address_ref",&obj0)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_address, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { Py_BEGIN_ALLOW_THREADS result = (idmef_address_t *)idmef_address_ref(arg1); Py_END_ALLOW_THREADS } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_idmef_address, 0 | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_address_destroy(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_address_t *arg1 = (idmef_address_t *) 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:idmef_address_destroy",&obj0)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_address, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { Py_BEGIN_ALLOW_THREADS idmef_address_destroy(arg1); Py_END_ALLOW_THREADS } resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_address_get_ident(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_address_t *arg1 = (idmef_address_t *) 0 ; PyObject * obj0 = 0 ; prelude_string_t *result = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:idmef_address_get_ident",&obj0)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_address, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { Py_BEGIN_ALLOW_THREADS result = (prelude_string_t *)idmef_address_get_ident(arg1); Py_END_ALLOW_THREADS } { resultobj = swig_python_string(result); } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_address_set_ident(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_address_t *arg1 = (idmef_address_t *) 0 ; prelude_string_t *arg2 = (prelude_string_t *) 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:idmef_address_set_ident",&obj0,&obj1)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_address, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { int ret; ret = prelude_string_new_dup_fast(&(arg2), PyString_AsString(obj1), PyString_Size(obj1)); if ( ret < 0 ) { swig_python_raise_exception(ret); return NULL; } } { Py_BEGIN_ALLOW_THREADS idmef_address_set_ident(arg1,arg2); Py_END_ALLOW_THREADS } resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_address_new_ident(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_address_t *arg1 = (idmef_address_t *) 0 ; prelude_string_t **arg2 = (prelude_string_t **) 0 ; void *argp2 = 0 ; int res2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; int result; if (!PyArg_ParseTuple(args,(char *)"OO:idmef_address_new_ident",&obj0,&obj1)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_address, SWIG_POINTER_EXCEPTION|0) ) return NULL; } res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_p_prelude_string_t, 0 | 0 ); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "idmef_address_new_ident" "', argument " "2"" of type '" "prelude_string_t **""'"); } arg2 = (prelude_string_t **)(argp2); { Py_BEGIN_ALLOW_THREADS result = (int)idmef_address_new_ident(arg1,arg2); Py_END_ALLOW_THREADS } { if ( result < 0 ) { swig_python_raise_exception(result); resultobj = NULL; } else { resultobj = PyInt_FromLong(result); } } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_address_get_category(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_address_t *arg1 = (idmef_address_t *) 0 ; PyObject * obj0 = 0 ; idmef_address_category_t result; if (!PyArg_ParseTuple(args,(char *)"O:idmef_address_get_category",&obj0)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_address, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { Py_BEGIN_ALLOW_THREADS result = (idmef_address_category_t)idmef_address_get_category(arg1); Py_END_ALLOW_THREADS } resultobj = SWIG_From_int((int)(result)); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_address_set_category(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_address_t *arg1 = (idmef_address_t *) 0 ; idmef_address_category_t arg2 ; int val2 ; int ecode2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:idmef_address_set_category",&obj0,&obj1)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_address, SWIG_POINTER_EXCEPTION|0) ) return NULL; } ecode2 = SWIG_AsVal_int(obj1, &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "idmef_address_set_category" "', argument " "2"" of type '" "idmef_address_category_t""'"); } arg2 = (idmef_address_category_t)(val2); { Py_BEGIN_ALLOW_THREADS idmef_address_set_category(arg1,arg2); Py_END_ALLOW_THREADS } resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_address_new_category(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_address_t *arg1 = (idmef_address_t *) 0 ; idmef_address_category_t **arg2 = (idmef_address_category_t **) 0 ; void *argp2 = 0 ; int res2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; int result; if (!PyArg_ParseTuple(args,(char *)"OO:idmef_address_new_category",&obj0,&obj1)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_address, SWIG_POINTER_EXCEPTION|0) ) return NULL; } res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_p_idmef_address_category_t, 0 | 0 ); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "idmef_address_new_category" "', argument " "2"" of type '" "idmef_address_category_t **""'"); } arg2 = (idmef_address_category_t **)(argp2); { Py_BEGIN_ALLOW_THREADS result = (int)idmef_address_new_category(arg1,arg2); Py_END_ALLOW_THREADS } { if ( result < 0 ) { swig_python_raise_exception(result); resultobj = NULL; } else { resultobj = PyInt_FromLong(result); } } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_address_get_vlan_name(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_address_t *arg1 = (idmef_address_t *) 0 ; PyObject * obj0 = 0 ; prelude_string_t *result = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:idmef_address_get_vlan_name",&obj0)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_address, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { Py_BEGIN_ALLOW_THREADS result = (prelude_string_t *)idmef_address_get_vlan_name(arg1); Py_END_ALLOW_THREADS } { resultobj = swig_python_string(result); } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_address_set_vlan_name(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_address_t *arg1 = (idmef_address_t *) 0 ; prelude_string_t *arg2 = (prelude_string_t *) 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:idmef_address_set_vlan_name",&obj0,&obj1)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_address, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { int ret; ret = prelude_string_new_dup_fast(&(arg2), PyString_AsString(obj1), PyString_Size(obj1)); if ( ret < 0 ) { swig_python_raise_exception(ret); return NULL; } } { Py_BEGIN_ALLOW_THREADS idmef_address_set_vlan_name(arg1,arg2); Py_END_ALLOW_THREADS } resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_address_new_vlan_name(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_address_t *arg1 = (idmef_address_t *) 0 ; prelude_string_t **arg2 = (prelude_string_t **) 0 ; void *argp2 = 0 ; int res2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; int result; if (!PyArg_ParseTuple(args,(char *)"OO:idmef_address_new_vlan_name",&obj0,&obj1)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_address, SWIG_POINTER_EXCEPTION|0) ) return NULL; } res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_p_prelude_string_t, 0 | 0 ); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "idmef_address_new_vlan_name" "', argument " "2"" of type '" "prelude_string_t **""'"); } arg2 = (prelude_string_t **)(argp2); { Py_BEGIN_ALLOW_THREADS result = (int)idmef_address_new_vlan_name(arg1,arg2); Py_END_ALLOW_THREADS } { if ( result < 0 ) { swig_python_raise_exception(result); resultobj = NULL; } else { resultobj = PyInt_FromLong(result); } } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_address_unset_vlan_num(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_address_t *arg1 = (idmef_address_t *) 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:idmef_address_unset_vlan_num",&obj0)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_address, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { Py_BEGIN_ALLOW_THREADS idmef_address_unset_vlan_num(arg1); Py_END_ALLOW_THREADS } resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_address_get_vlan_num(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_address_t *arg1 = (idmef_address_t *) 0 ; PyObject * obj0 = 0 ; int32_t *result = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:idmef_address_get_vlan_num",&obj0)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_address, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { Py_BEGIN_ALLOW_THREADS result = (int32_t *)idmef_address_get_vlan_num(arg1); Py_END_ALLOW_THREADS } { if (result != NULL) { resultobj = PyLong_FromLong(*result); } else { resultobj = Py_None; } } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_address_set_vlan_num(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_address_t *arg1 = (idmef_address_t *) 0 ; int32_t arg2 ; int val2 ; int ecode2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:idmef_address_set_vlan_num",&obj0,&obj1)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_address, SWIG_POINTER_EXCEPTION|0) ) return NULL; } ecode2 = SWIG_AsVal_int(obj1, &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "idmef_address_set_vlan_num" "', argument " "2"" of type '" "int32_t""'"); } arg2 = (int32_t)(val2); { Py_BEGIN_ALLOW_THREADS idmef_address_set_vlan_num(arg1,arg2); Py_END_ALLOW_THREADS } resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_address_new_vlan_num(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_address_t *arg1 = (idmef_address_t *) 0 ; int32_t **arg2 = (int32_t **) 0 ; void *argp2 = 0 ; int res2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; int result; if (!PyArg_ParseTuple(args,(char *)"OO:idmef_address_new_vlan_num",&obj0,&obj1)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_address, SWIG_POINTER_EXCEPTION|0) ) return NULL; } res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_p_int, 0 | 0 ); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "idmef_address_new_vlan_num" "', argument " "2"" of type '" "int32_t **""'"); } arg2 = (int32_t **)(argp2); { Py_BEGIN_ALLOW_THREADS result = (int)idmef_address_new_vlan_num(arg1,arg2); Py_END_ALLOW_THREADS } { if ( result < 0 ) { swig_python_raise_exception(result); resultobj = NULL; } else { resultobj = PyInt_FromLong(result); } } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_address_get_address(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_address_t *arg1 = (idmef_address_t *) 0 ; PyObject * obj0 = 0 ; prelude_string_t *result = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:idmef_address_get_address",&obj0)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_address, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { Py_BEGIN_ALLOW_THREADS result = (prelude_string_t *)idmef_address_get_address(arg1); Py_END_ALLOW_THREADS } { resultobj = swig_python_string(result); } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_address_set_address(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_address_t *arg1 = (idmef_address_t *) 0 ; prelude_string_t *arg2 = (prelude_string_t *) 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:idmef_address_set_address",&obj0,&obj1)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_address, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { int ret; ret = prelude_string_new_dup_fast(&(arg2), PyString_AsString(obj1), PyString_Size(obj1)); if ( ret < 0 ) { swig_python_raise_exception(ret); return NULL; } } { Py_BEGIN_ALLOW_THREADS idmef_address_set_address(arg1,arg2); Py_END_ALLOW_THREADS } resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_address_new_address(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_address_t *arg1 = (idmef_address_t *) 0 ; prelude_string_t **arg2 = (prelude_string_t **) 0 ; void *argp2 = 0 ; int res2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; int result; if (!PyArg_ParseTuple(args,(char *)"OO:idmef_address_new_address",&obj0,&obj1)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_address, SWIG_POINTER_EXCEPTION|0) ) return NULL; } res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_p_prelude_string_t, 0 | 0 ); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "idmef_address_new_address" "', argument " "2"" of type '" "prelude_string_t **""'"); } arg2 = (prelude_string_t **)(argp2); { Py_BEGIN_ALLOW_THREADS result = (int)idmef_address_new_address(arg1,arg2); Py_END_ALLOW_THREADS } { if ( result < 0 ) { swig_python_raise_exception(result); resultobj = NULL; } else { resultobj = PyInt_FromLong(result); } } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_address_get_netmask(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_address_t *arg1 = (idmef_address_t *) 0 ; PyObject * obj0 = 0 ; prelude_string_t *result = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:idmef_address_get_netmask",&obj0)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_address, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { Py_BEGIN_ALLOW_THREADS result = (prelude_string_t *)idmef_address_get_netmask(arg1); Py_END_ALLOW_THREADS } { resultobj = swig_python_string(result); } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_address_set_netmask(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_address_t *arg1 = (idmef_address_t *) 0 ; prelude_string_t *arg2 = (prelude_string_t *) 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:idmef_address_set_netmask",&obj0,&obj1)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_address, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { int ret; ret = prelude_string_new_dup_fast(&(arg2), PyString_AsString(obj1), PyString_Size(obj1)); if ( ret < 0 ) { swig_python_raise_exception(ret); return NULL; } } { Py_BEGIN_ALLOW_THREADS idmef_address_set_netmask(arg1,arg2); Py_END_ALLOW_THREADS } resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_address_new_netmask(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_address_t *arg1 = (idmef_address_t *) 0 ; prelude_string_t **arg2 = (prelude_string_t **) 0 ; void *argp2 = 0 ; int res2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; int result; if (!PyArg_ParseTuple(args,(char *)"OO:idmef_address_new_netmask",&obj0,&obj1)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_address, SWIG_POINTER_EXCEPTION|0) ) return NULL; } res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_p_prelude_string_t, 0 | 0 ); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "idmef_address_new_netmask" "', argument " "2"" of type '" "prelude_string_t **""'"); } arg2 = (prelude_string_t **)(argp2); { Py_BEGIN_ALLOW_THREADS result = (int)idmef_address_new_netmask(arg1,arg2); Py_END_ALLOW_THREADS } { if ( result < 0 ) { swig_python_raise_exception(result); resultobj = NULL; } else { resultobj = PyInt_FromLong(result); } } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_process_new(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_process_t **arg1 = (idmef_process_t **) 0 ; idmef_process_t *tmp1 ; int result; { arg1 = (idmef_process_t **) &tmp1; } if (!PyArg_ParseTuple(args,(char *)":idmef_process_new")) SWIG_fail; { Py_BEGIN_ALLOW_THREADS result = (int)idmef_process_new(arg1); Py_END_ALLOW_THREADS } { if ( result < 0 ) { swig_python_raise_exception(result); resultobj = NULL; } else { resultobj = PyInt_FromLong(result); } } { if ( result >= 0 ) resultobj = SWIG_NewPointerObj((void *) * arg1, SWIGTYPE_p_idmef_process, 0); } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_process_copy(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_process_t *arg1 = (idmef_process_t *) 0 ; idmef_process_t *arg2 = (idmef_process_t *) 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; int result; if (!PyArg_ParseTuple(args,(char *)"OO:idmef_process_copy",&obj0,&obj1)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_process, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { if ( obj1 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj1, (void **)&arg2, SWIGTYPE_p_idmef_process, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { Py_BEGIN_ALLOW_THREADS result = (int)idmef_process_copy((struct idmef_process const *)arg1,arg2); Py_END_ALLOW_THREADS } { if ( result < 0 ) { swig_python_raise_exception(result); resultobj = NULL; } else { resultobj = PyInt_FromLong(result); } } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_process_clone(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_process_t *arg1 = (idmef_process_t *) 0 ; idmef_process_t **arg2 = (idmef_process_t **) 0 ; idmef_process_t *tmp2 ; PyObject * obj0 = 0 ; int result; { arg2 = (idmef_process_t **) &tmp2; } if (!PyArg_ParseTuple(args,(char *)"O:idmef_process_clone",&obj0)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_process, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { Py_BEGIN_ALLOW_THREADS result = (int)idmef_process_clone(arg1,arg2); Py_END_ALLOW_THREADS } { if ( result < 0 ) { swig_python_raise_exception(result); resultobj = NULL; } else { resultobj = PyInt_FromLong(result); } } { if ( result >= 0 ) resultobj = SWIG_NewPointerObj((void *) * arg2, SWIGTYPE_p_idmef_process, 0); } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_process_compare(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_process_t *arg1 = (idmef_process_t *) 0 ; idmef_process_t *arg2 = (idmef_process_t *) 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; int result; if (!PyArg_ParseTuple(args,(char *)"OO:idmef_process_compare",&obj0,&obj1)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_process, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { if ( obj1 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj1, (void **)&arg2, SWIGTYPE_p_idmef_process, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { Py_BEGIN_ALLOW_THREADS result = (int)idmef_process_compare((struct idmef_process const *)arg1,(struct idmef_process const *)arg2); Py_END_ALLOW_THREADS } { resultobj = PyInt_FromLong(result); } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_process_ref(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_process_t *arg1 = (idmef_process_t *) 0 ; PyObject * obj0 = 0 ; idmef_process_t *result = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:idmef_process_ref",&obj0)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_process, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { Py_BEGIN_ALLOW_THREADS result = (idmef_process_t *)idmef_process_ref(arg1); Py_END_ALLOW_THREADS } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_idmef_process, 0 | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_process_destroy(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_process_t *arg1 = (idmef_process_t *) 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:idmef_process_destroy",&obj0)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_process, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { Py_BEGIN_ALLOW_THREADS idmef_process_destroy(arg1); Py_END_ALLOW_THREADS } resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_process_get_ident(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_process_t *arg1 = (idmef_process_t *) 0 ; PyObject * obj0 = 0 ; prelude_string_t *result = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:idmef_process_get_ident",&obj0)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_process, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { Py_BEGIN_ALLOW_THREADS result = (prelude_string_t *)idmef_process_get_ident(arg1); Py_END_ALLOW_THREADS } { resultobj = swig_python_string(result); } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_process_set_ident(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_process_t *arg1 = (idmef_process_t *) 0 ; prelude_string_t *arg2 = (prelude_string_t *) 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:idmef_process_set_ident",&obj0,&obj1)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_process, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { int ret; ret = prelude_string_new_dup_fast(&(arg2), PyString_AsString(obj1), PyString_Size(obj1)); if ( ret < 0 ) { swig_python_raise_exception(ret); return NULL; } } { Py_BEGIN_ALLOW_THREADS idmef_process_set_ident(arg1,arg2); Py_END_ALLOW_THREADS } resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_process_new_ident(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_process_t *arg1 = (idmef_process_t *) 0 ; prelude_string_t **arg2 = (prelude_string_t **) 0 ; void *argp2 = 0 ; int res2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; int result; if (!PyArg_ParseTuple(args,(char *)"OO:idmef_process_new_ident",&obj0,&obj1)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_process, SWIG_POINTER_EXCEPTION|0) ) return NULL; } res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_p_prelude_string_t, 0 | 0 ); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "idmef_process_new_ident" "', argument " "2"" of type '" "prelude_string_t **""'"); } arg2 = (prelude_string_t **)(argp2); { Py_BEGIN_ALLOW_THREADS result = (int)idmef_process_new_ident(arg1,arg2); Py_END_ALLOW_THREADS } { if ( result < 0 ) { swig_python_raise_exception(result); resultobj = NULL; } else { resultobj = PyInt_FromLong(result); } } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_process_get_name(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_process_t *arg1 = (idmef_process_t *) 0 ; PyObject * obj0 = 0 ; prelude_string_t *result = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:idmef_process_get_name",&obj0)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_process, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { Py_BEGIN_ALLOW_THREADS result = (prelude_string_t *)idmef_process_get_name(arg1); Py_END_ALLOW_THREADS } { resultobj = swig_python_string(result); } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_process_set_name(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_process_t *arg1 = (idmef_process_t *) 0 ; prelude_string_t *arg2 = (prelude_string_t *) 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:idmef_process_set_name",&obj0,&obj1)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_process, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { int ret; ret = prelude_string_new_dup_fast(&(arg2), PyString_AsString(obj1), PyString_Size(obj1)); if ( ret < 0 ) { swig_python_raise_exception(ret); return NULL; } } { Py_BEGIN_ALLOW_THREADS idmef_process_set_name(arg1,arg2); Py_END_ALLOW_THREADS } resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_process_new_name(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_process_t *arg1 = (idmef_process_t *) 0 ; prelude_string_t **arg2 = (prelude_string_t **) 0 ; void *argp2 = 0 ; int res2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; int result; if (!PyArg_ParseTuple(args,(char *)"OO:idmef_process_new_name",&obj0,&obj1)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_process, SWIG_POINTER_EXCEPTION|0) ) return NULL; } res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_p_prelude_string_t, 0 | 0 ); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "idmef_process_new_name" "', argument " "2"" of type '" "prelude_string_t **""'"); } arg2 = (prelude_string_t **)(argp2); { Py_BEGIN_ALLOW_THREADS result = (int)idmef_process_new_name(arg1,arg2); Py_END_ALLOW_THREADS } { if ( result < 0 ) { swig_python_raise_exception(result); resultobj = NULL; } else { resultobj = PyInt_FromLong(result); } } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_process_unset_pid(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_process_t *arg1 = (idmef_process_t *) 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:idmef_process_unset_pid",&obj0)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_process, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { Py_BEGIN_ALLOW_THREADS idmef_process_unset_pid(arg1); Py_END_ALLOW_THREADS } resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_process_get_pid(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_process_t *arg1 = (idmef_process_t *) 0 ; PyObject * obj0 = 0 ; uint32_t *result = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:idmef_process_get_pid",&obj0)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_process, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { Py_BEGIN_ALLOW_THREADS result = (uint32_t *)idmef_process_get_pid(arg1); Py_END_ALLOW_THREADS } { if (result != NULL) { resultobj = PyLong_FromUnsignedLong(*result); } else { resultobj = Py_None; } } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_process_set_pid(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_process_t *arg1 = (idmef_process_t *) 0 ; uint32_t arg2 ; unsigned int val2 ; int ecode2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:idmef_process_set_pid",&obj0,&obj1)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_process, SWIG_POINTER_EXCEPTION|0) ) return NULL; } ecode2 = SWIG_AsVal_unsigned_SS_int(obj1, &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "idmef_process_set_pid" "', argument " "2"" of type '" "uint32_t""'"); } arg2 = (uint32_t)(val2); { Py_BEGIN_ALLOW_THREADS idmef_process_set_pid(arg1,arg2); Py_END_ALLOW_THREADS } resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_process_new_pid(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_process_t *arg1 = (idmef_process_t *) 0 ; uint32_t **arg2 = (uint32_t **) 0 ; void *argp2 = 0 ; int res2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; int result; if (!PyArg_ParseTuple(args,(char *)"OO:idmef_process_new_pid",&obj0,&obj1)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_process, SWIG_POINTER_EXCEPTION|0) ) return NULL; } res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_p_unsigned_int, 0 | 0 ); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "idmef_process_new_pid" "', argument " "2"" of type '" "uint32_t **""'"); } arg2 = (uint32_t **)(argp2); { Py_BEGIN_ALLOW_THREADS result = (int)idmef_process_new_pid(arg1,arg2); Py_END_ALLOW_THREADS } { if ( result < 0 ) { swig_python_raise_exception(result); resultobj = NULL; } else { resultobj = PyInt_FromLong(result); } } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_process_get_path(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_process_t *arg1 = (idmef_process_t *) 0 ; PyObject * obj0 = 0 ; prelude_string_t *result = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:idmef_process_get_path",&obj0)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_process, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { Py_BEGIN_ALLOW_THREADS result = (prelude_string_t *)idmef_process_get_path(arg1); Py_END_ALLOW_THREADS } { resultobj = swig_python_string(result); } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_process_set_path(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_process_t *arg1 = (idmef_process_t *) 0 ; prelude_string_t *arg2 = (prelude_string_t *) 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:idmef_process_set_path",&obj0,&obj1)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_process, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { int ret; ret = prelude_string_new_dup_fast(&(arg2), PyString_AsString(obj1), PyString_Size(obj1)); if ( ret < 0 ) { swig_python_raise_exception(ret); return NULL; } } { Py_BEGIN_ALLOW_THREADS idmef_process_set_path(arg1,arg2); Py_END_ALLOW_THREADS } resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_process_new_path(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_process_t *arg1 = (idmef_process_t *) 0 ; prelude_string_t **arg2 = (prelude_string_t **) 0 ; void *argp2 = 0 ; int res2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; int result; if (!PyArg_ParseTuple(args,(char *)"OO:idmef_process_new_path",&obj0,&obj1)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_process, SWIG_POINTER_EXCEPTION|0) ) return NULL; } res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_p_prelude_string_t, 0 | 0 ); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "idmef_process_new_path" "', argument " "2"" of type '" "prelude_string_t **""'"); } arg2 = (prelude_string_t **)(argp2); { Py_BEGIN_ALLOW_THREADS result = (int)idmef_process_new_path(arg1,arg2); Py_END_ALLOW_THREADS } { if ( result < 0 ) { swig_python_raise_exception(result); resultobj = NULL; } else { resultobj = PyInt_FromLong(result); } } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_process_get_next_arg(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_process_t *arg1 = (idmef_process_t *) 0 ; prelude_string_t *arg2 = (prelude_string_t *) 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; prelude_string_t *result = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:idmef_process_get_next_arg",&obj0,&obj1)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_process, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { if ( obj1 == Py_None ) { arg2 = NULL; } else { if ( SWIG_ConvertPtr(obj1, (void **)&arg2, SWIGTYPE_p_prelude_string_t, SWIG_POINTER_EXCEPTION|0) ) return NULL; } } { Py_BEGIN_ALLOW_THREADS result = (prelude_string_t *)idmef_process_get_next_arg(arg1,arg2); Py_END_ALLOW_THREADS } { resultobj = swig_python_string(result); } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_process_set_arg(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_process_t *arg1 = (idmef_process_t *) 0 ; prelude_string_t *arg2 = (prelude_string_t *) 0 ; int arg3 ; int val3 ; int ecode3 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; PyObject * obj2 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OOO:idmef_process_set_arg",&obj0,&obj1,&obj2)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_process, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { int ret; ret = prelude_string_new_dup_fast(&(arg2), PyString_AsString(obj1), PyString_Size(obj1)); if ( ret < 0 ) { swig_python_raise_exception(ret); return NULL; } } ecode3 = SWIG_AsVal_int(obj2, &val3); if (!SWIG_IsOK(ecode3)) { SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "idmef_process_set_arg" "', argument " "3"" of type '" "int""'"); } arg3 = (int)(val3); { Py_BEGIN_ALLOW_THREADS idmef_process_set_arg(arg1,arg2,arg3); Py_END_ALLOW_THREADS } resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_process_new_arg(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_process_t *arg1 = (idmef_process_t *) 0 ; prelude_string_t **arg2 = (prelude_string_t **) 0 ; int arg3 ; void *argp2 = 0 ; int res2 = 0 ; int val3 ; int ecode3 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; PyObject * obj2 = 0 ; int result; if (!PyArg_ParseTuple(args,(char *)"OOO:idmef_process_new_arg",&obj0,&obj1,&obj2)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_process, SWIG_POINTER_EXCEPTION|0) ) return NULL; } res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_p_prelude_string_t, 0 | 0 ); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "idmef_process_new_arg" "', argument " "2"" of type '" "prelude_string_t **""'"); } arg2 = (prelude_string_t **)(argp2); ecode3 = SWIG_AsVal_int(obj2, &val3); if (!SWIG_IsOK(ecode3)) { SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "idmef_process_new_arg" "', argument " "3"" of type '" "int""'"); } arg3 = (int)(val3); { Py_BEGIN_ALLOW_THREADS result = (int)idmef_process_new_arg(arg1,arg2,arg3); Py_END_ALLOW_THREADS } { if ( result < 0 ) { swig_python_raise_exception(result); resultobj = NULL; } else { resultobj = PyInt_FromLong(result); } } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_process_get_next_env(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_process_t *arg1 = (idmef_process_t *) 0 ; prelude_string_t *arg2 = (prelude_string_t *) 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; prelude_string_t *result = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:idmef_process_get_next_env",&obj0,&obj1)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_process, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { if ( obj1 == Py_None ) { arg2 = NULL; } else { if ( SWIG_ConvertPtr(obj1, (void **)&arg2, SWIGTYPE_p_prelude_string_t, SWIG_POINTER_EXCEPTION|0) ) return NULL; } } { Py_BEGIN_ALLOW_THREADS result = (prelude_string_t *)idmef_process_get_next_env(arg1,arg2); Py_END_ALLOW_THREADS } { resultobj = swig_python_string(result); } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_process_set_env(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_process_t *arg1 = (idmef_process_t *) 0 ; prelude_string_t *arg2 = (prelude_string_t *) 0 ; int arg3 ; int val3 ; int ecode3 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; PyObject * obj2 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OOO:idmef_process_set_env",&obj0,&obj1,&obj2)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_process, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { int ret; ret = prelude_string_new_dup_fast(&(arg2), PyString_AsString(obj1), PyString_Size(obj1)); if ( ret < 0 ) { swig_python_raise_exception(ret); return NULL; } } ecode3 = SWIG_AsVal_int(obj2, &val3); if (!SWIG_IsOK(ecode3)) { SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "idmef_process_set_env" "', argument " "3"" of type '" "int""'"); } arg3 = (int)(val3); { Py_BEGIN_ALLOW_THREADS idmef_process_set_env(arg1,arg2,arg3); Py_END_ALLOW_THREADS } resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_process_new_env(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_process_t *arg1 = (idmef_process_t *) 0 ; prelude_string_t **arg2 = (prelude_string_t **) 0 ; int arg3 ; void *argp2 = 0 ; int res2 = 0 ; int val3 ; int ecode3 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; PyObject * obj2 = 0 ; int result; if (!PyArg_ParseTuple(args,(char *)"OOO:idmef_process_new_env",&obj0,&obj1,&obj2)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_process, SWIG_POINTER_EXCEPTION|0) ) return NULL; } res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_p_prelude_string_t, 0 | 0 ); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "idmef_process_new_env" "', argument " "2"" of type '" "prelude_string_t **""'"); } arg2 = (prelude_string_t **)(argp2); ecode3 = SWIG_AsVal_int(obj2, &val3); if (!SWIG_IsOK(ecode3)) { SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "idmef_process_new_env" "', argument " "3"" of type '" "int""'"); } arg3 = (int)(val3); { Py_BEGIN_ALLOW_THREADS result = (int)idmef_process_new_env(arg1,arg2,arg3); Py_END_ALLOW_THREADS } { if ( result < 0 ) { swig_python_raise_exception(result); resultobj = NULL; } else { resultobj = PyInt_FromLong(result); } } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_web_service_new(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_web_service_t **arg1 = (idmef_web_service_t **) 0 ; idmef_web_service_t *tmp1 ; int result; { arg1 = (idmef_web_service_t **) &tmp1; } if (!PyArg_ParseTuple(args,(char *)":idmef_web_service_new")) SWIG_fail; { Py_BEGIN_ALLOW_THREADS result = (int)idmef_web_service_new(arg1); Py_END_ALLOW_THREADS } { if ( result < 0 ) { swig_python_raise_exception(result); resultobj = NULL; } else { resultobj = PyInt_FromLong(result); } } { if ( result >= 0 ) resultobj = SWIG_NewPointerObj((void *) * arg1, SWIGTYPE_p_idmef_web_service, 0); } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_web_service_copy(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_web_service_t *arg1 = (idmef_web_service_t *) 0 ; idmef_web_service_t *arg2 = (idmef_web_service_t *) 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; int result; if (!PyArg_ParseTuple(args,(char *)"OO:idmef_web_service_copy",&obj0,&obj1)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_web_service, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { if ( obj1 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj1, (void **)&arg2, SWIGTYPE_p_idmef_web_service, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { Py_BEGIN_ALLOW_THREADS result = (int)idmef_web_service_copy((struct idmef_web_service const *)arg1,arg2); Py_END_ALLOW_THREADS } { if ( result < 0 ) { swig_python_raise_exception(result); resultobj = NULL; } else { resultobj = PyInt_FromLong(result); } } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_web_service_clone(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_web_service_t *arg1 = (idmef_web_service_t *) 0 ; idmef_web_service_t **arg2 = (idmef_web_service_t **) 0 ; idmef_web_service_t *tmp2 ; PyObject * obj0 = 0 ; int result; { arg2 = (idmef_web_service_t **) &tmp2; } if (!PyArg_ParseTuple(args,(char *)"O:idmef_web_service_clone",&obj0)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_web_service, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { Py_BEGIN_ALLOW_THREADS result = (int)idmef_web_service_clone(arg1,arg2); Py_END_ALLOW_THREADS } { if ( result < 0 ) { swig_python_raise_exception(result); resultobj = NULL; } else { resultobj = PyInt_FromLong(result); } } { if ( result >= 0 ) resultobj = SWIG_NewPointerObj((void *) * arg2, SWIGTYPE_p_idmef_web_service, 0); } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_web_service_compare(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_web_service_t *arg1 = (idmef_web_service_t *) 0 ; idmef_web_service_t *arg2 = (idmef_web_service_t *) 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; int result; if (!PyArg_ParseTuple(args,(char *)"OO:idmef_web_service_compare",&obj0,&obj1)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_web_service, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { if ( obj1 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj1, (void **)&arg2, SWIGTYPE_p_idmef_web_service, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { Py_BEGIN_ALLOW_THREADS result = (int)idmef_web_service_compare((struct idmef_web_service const *)arg1,(struct idmef_web_service const *)arg2); Py_END_ALLOW_THREADS } { resultobj = PyInt_FromLong(result); } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_web_service_ref(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_web_service_t *arg1 = (idmef_web_service_t *) 0 ; PyObject * obj0 = 0 ; idmef_web_service_t *result = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:idmef_web_service_ref",&obj0)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_web_service, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { Py_BEGIN_ALLOW_THREADS result = (idmef_web_service_t *)idmef_web_service_ref(arg1); Py_END_ALLOW_THREADS } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_idmef_web_service, 0 | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_web_service_destroy(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_web_service_t *arg1 = (idmef_web_service_t *) 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:idmef_web_service_destroy",&obj0)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_web_service, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { Py_BEGIN_ALLOW_THREADS idmef_web_service_destroy(arg1); Py_END_ALLOW_THREADS } resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_web_service_get_url(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_web_service_t *arg1 = (idmef_web_service_t *) 0 ; PyObject * obj0 = 0 ; prelude_string_t *result = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:idmef_web_service_get_url",&obj0)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_web_service, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { Py_BEGIN_ALLOW_THREADS result = (prelude_string_t *)idmef_web_service_get_url(arg1); Py_END_ALLOW_THREADS } { resultobj = swig_python_string(result); } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_web_service_set_url(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_web_service_t *arg1 = (idmef_web_service_t *) 0 ; prelude_string_t *arg2 = (prelude_string_t *) 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:idmef_web_service_set_url",&obj0,&obj1)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_web_service, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { int ret; ret = prelude_string_new_dup_fast(&(arg2), PyString_AsString(obj1), PyString_Size(obj1)); if ( ret < 0 ) { swig_python_raise_exception(ret); return NULL; } } { Py_BEGIN_ALLOW_THREADS idmef_web_service_set_url(arg1,arg2); Py_END_ALLOW_THREADS } resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_web_service_new_url(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_web_service_t *arg1 = (idmef_web_service_t *) 0 ; prelude_string_t **arg2 = (prelude_string_t **) 0 ; void *argp2 = 0 ; int res2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; int result; if (!PyArg_ParseTuple(args,(char *)"OO:idmef_web_service_new_url",&obj0,&obj1)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_web_service, SWIG_POINTER_EXCEPTION|0) ) return NULL; } res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_p_prelude_string_t, 0 | 0 ); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "idmef_web_service_new_url" "', argument " "2"" of type '" "prelude_string_t **""'"); } arg2 = (prelude_string_t **)(argp2); { Py_BEGIN_ALLOW_THREADS result = (int)idmef_web_service_new_url(arg1,arg2); Py_END_ALLOW_THREADS } { if ( result < 0 ) { swig_python_raise_exception(result); resultobj = NULL; } else { resultobj = PyInt_FromLong(result); } } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_web_service_get_cgi(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_web_service_t *arg1 = (idmef_web_service_t *) 0 ; PyObject * obj0 = 0 ; prelude_string_t *result = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:idmef_web_service_get_cgi",&obj0)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_web_service, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { Py_BEGIN_ALLOW_THREADS result = (prelude_string_t *)idmef_web_service_get_cgi(arg1); Py_END_ALLOW_THREADS } { resultobj = swig_python_string(result); } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_web_service_set_cgi(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_web_service_t *arg1 = (idmef_web_service_t *) 0 ; prelude_string_t *arg2 = (prelude_string_t *) 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:idmef_web_service_set_cgi",&obj0,&obj1)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_web_service, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { int ret; ret = prelude_string_new_dup_fast(&(arg2), PyString_AsString(obj1), PyString_Size(obj1)); if ( ret < 0 ) { swig_python_raise_exception(ret); return NULL; } } { Py_BEGIN_ALLOW_THREADS idmef_web_service_set_cgi(arg1,arg2); Py_END_ALLOW_THREADS } resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_web_service_new_cgi(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_web_service_t *arg1 = (idmef_web_service_t *) 0 ; prelude_string_t **arg2 = (prelude_string_t **) 0 ; void *argp2 = 0 ; int res2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; int result; if (!PyArg_ParseTuple(args,(char *)"OO:idmef_web_service_new_cgi",&obj0,&obj1)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_web_service, SWIG_POINTER_EXCEPTION|0) ) return NULL; } res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_p_prelude_string_t, 0 | 0 ); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "idmef_web_service_new_cgi" "', argument " "2"" of type '" "prelude_string_t **""'"); } arg2 = (prelude_string_t **)(argp2); { Py_BEGIN_ALLOW_THREADS result = (int)idmef_web_service_new_cgi(arg1,arg2); Py_END_ALLOW_THREADS } { if ( result < 0 ) { swig_python_raise_exception(result); resultobj = NULL; } else { resultobj = PyInt_FromLong(result); } } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_web_service_get_http_method(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_web_service_t *arg1 = (idmef_web_service_t *) 0 ; PyObject * obj0 = 0 ; prelude_string_t *result = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:idmef_web_service_get_http_method",&obj0)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_web_service, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { Py_BEGIN_ALLOW_THREADS result = (prelude_string_t *)idmef_web_service_get_http_method(arg1); Py_END_ALLOW_THREADS } { resultobj = swig_python_string(result); } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_web_service_set_http_method(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_web_service_t *arg1 = (idmef_web_service_t *) 0 ; prelude_string_t *arg2 = (prelude_string_t *) 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:idmef_web_service_set_http_method",&obj0,&obj1)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_web_service, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { int ret; ret = prelude_string_new_dup_fast(&(arg2), PyString_AsString(obj1), PyString_Size(obj1)); if ( ret < 0 ) { swig_python_raise_exception(ret); return NULL; } } { Py_BEGIN_ALLOW_THREADS idmef_web_service_set_http_method(arg1,arg2); Py_END_ALLOW_THREADS } resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_web_service_new_http_method(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_web_service_t *arg1 = (idmef_web_service_t *) 0 ; prelude_string_t **arg2 = (prelude_string_t **) 0 ; void *argp2 = 0 ; int res2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; int result; if (!PyArg_ParseTuple(args,(char *)"OO:idmef_web_service_new_http_method",&obj0,&obj1)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_web_service, SWIG_POINTER_EXCEPTION|0) ) return NULL; } res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_p_prelude_string_t, 0 | 0 ); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "idmef_web_service_new_http_method" "', argument " "2"" of type '" "prelude_string_t **""'"); } arg2 = (prelude_string_t **)(argp2); { Py_BEGIN_ALLOW_THREADS result = (int)idmef_web_service_new_http_method(arg1,arg2); Py_END_ALLOW_THREADS } { if ( result < 0 ) { swig_python_raise_exception(result); resultobj = NULL; } else { resultobj = PyInt_FromLong(result); } } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_web_service_get_next_arg(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_web_service_t *arg1 = (idmef_web_service_t *) 0 ; prelude_string_t *arg2 = (prelude_string_t *) 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; prelude_string_t *result = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:idmef_web_service_get_next_arg",&obj0,&obj1)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_web_service, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { if ( obj1 == Py_None ) { arg2 = NULL; } else { if ( SWIG_ConvertPtr(obj1, (void **)&arg2, SWIGTYPE_p_prelude_string_t, SWIG_POINTER_EXCEPTION|0) ) return NULL; } } { Py_BEGIN_ALLOW_THREADS result = (prelude_string_t *)idmef_web_service_get_next_arg(arg1,arg2); Py_END_ALLOW_THREADS } { resultobj = swig_python_string(result); } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_web_service_set_arg(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_web_service_t *arg1 = (idmef_web_service_t *) 0 ; prelude_string_t *arg2 = (prelude_string_t *) 0 ; int arg3 ; int val3 ; int ecode3 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; PyObject * obj2 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OOO:idmef_web_service_set_arg",&obj0,&obj1,&obj2)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_web_service, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { int ret; ret = prelude_string_new_dup_fast(&(arg2), PyString_AsString(obj1), PyString_Size(obj1)); if ( ret < 0 ) { swig_python_raise_exception(ret); return NULL; } } ecode3 = SWIG_AsVal_int(obj2, &val3); if (!SWIG_IsOK(ecode3)) { SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "idmef_web_service_set_arg" "', argument " "3"" of type '" "int""'"); } arg3 = (int)(val3); { Py_BEGIN_ALLOW_THREADS idmef_web_service_set_arg(arg1,arg2,arg3); Py_END_ALLOW_THREADS } resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_web_service_new_arg(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_web_service_t *arg1 = (idmef_web_service_t *) 0 ; prelude_string_t **arg2 = (prelude_string_t **) 0 ; int arg3 ; void *argp2 = 0 ; int res2 = 0 ; int val3 ; int ecode3 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; PyObject * obj2 = 0 ; int result; if (!PyArg_ParseTuple(args,(char *)"OOO:idmef_web_service_new_arg",&obj0,&obj1,&obj2)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_web_service, SWIG_POINTER_EXCEPTION|0) ) return NULL; } res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_p_prelude_string_t, 0 | 0 ); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "idmef_web_service_new_arg" "', argument " "2"" of type '" "prelude_string_t **""'"); } arg2 = (prelude_string_t **)(argp2); ecode3 = SWIG_AsVal_int(obj2, &val3); if (!SWIG_IsOK(ecode3)) { SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "idmef_web_service_new_arg" "', argument " "3"" of type '" "int""'"); } arg3 = (int)(val3); { Py_BEGIN_ALLOW_THREADS result = (int)idmef_web_service_new_arg(arg1,arg2,arg3); Py_END_ALLOW_THREADS } { if ( result < 0 ) { swig_python_raise_exception(result); resultobj = NULL; } else { resultobj = PyInt_FromLong(result); } } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_snmp_service_new(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_snmp_service_t **arg1 = (idmef_snmp_service_t **) 0 ; idmef_snmp_service_t *tmp1 ; int result; { arg1 = (idmef_snmp_service_t **) &tmp1; } if (!PyArg_ParseTuple(args,(char *)":idmef_snmp_service_new")) SWIG_fail; { Py_BEGIN_ALLOW_THREADS result = (int)idmef_snmp_service_new(arg1); Py_END_ALLOW_THREADS } { if ( result < 0 ) { swig_python_raise_exception(result); resultobj = NULL; } else { resultobj = PyInt_FromLong(result); } } { if ( result >= 0 ) resultobj = SWIG_NewPointerObj((void *) * arg1, SWIGTYPE_p_idmef_snmp_service, 0); } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_snmp_service_copy(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_snmp_service_t *arg1 = (idmef_snmp_service_t *) 0 ; idmef_snmp_service_t *arg2 = (idmef_snmp_service_t *) 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; int result; if (!PyArg_ParseTuple(args,(char *)"OO:idmef_snmp_service_copy",&obj0,&obj1)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_snmp_service, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { if ( obj1 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj1, (void **)&arg2, SWIGTYPE_p_idmef_snmp_service, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { Py_BEGIN_ALLOW_THREADS result = (int)idmef_snmp_service_copy((struct idmef_snmp_service const *)arg1,arg2); Py_END_ALLOW_THREADS } { if ( result < 0 ) { swig_python_raise_exception(result); resultobj = NULL; } else { resultobj = PyInt_FromLong(result); } } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_snmp_service_clone(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_snmp_service_t *arg1 = (idmef_snmp_service_t *) 0 ; idmef_snmp_service_t **arg2 = (idmef_snmp_service_t **) 0 ; idmef_snmp_service_t *tmp2 ; PyObject * obj0 = 0 ; int result; { arg2 = (idmef_snmp_service_t **) &tmp2; } if (!PyArg_ParseTuple(args,(char *)"O:idmef_snmp_service_clone",&obj0)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_snmp_service, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { Py_BEGIN_ALLOW_THREADS result = (int)idmef_snmp_service_clone(arg1,arg2); Py_END_ALLOW_THREADS } { if ( result < 0 ) { swig_python_raise_exception(result); resultobj = NULL; } else { resultobj = PyInt_FromLong(result); } } { if ( result >= 0 ) resultobj = SWIG_NewPointerObj((void *) * arg2, SWIGTYPE_p_idmef_snmp_service, 0); } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_snmp_service_compare(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_snmp_service_t *arg1 = (idmef_snmp_service_t *) 0 ; idmef_snmp_service_t *arg2 = (idmef_snmp_service_t *) 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; int result; if (!PyArg_ParseTuple(args,(char *)"OO:idmef_snmp_service_compare",&obj0,&obj1)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_snmp_service, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { if ( obj1 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj1, (void **)&arg2, SWIGTYPE_p_idmef_snmp_service, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { Py_BEGIN_ALLOW_THREADS result = (int)idmef_snmp_service_compare((struct idmef_snmp_service const *)arg1,(struct idmef_snmp_service const *)arg2); Py_END_ALLOW_THREADS } { resultobj = PyInt_FromLong(result); } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_snmp_service_ref(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_snmp_service_t *arg1 = (idmef_snmp_service_t *) 0 ; PyObject * obj0 = 0 ; idmef_snmp_service_t *result = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:idmef_snmp_service_ref",&obj0)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_snmp_service, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { Py_BEGIN_ALLOW_THREADS result = (idmef_snmp_service_t *)idmef_snmp_service_ref(arg1); Py_END_ALLOW_THREADS } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_idmef_snmp_service, 0 | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_snmp_service_destroy(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_snmp_service_t *arg1 = (idmef_snmp_service_t *) 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:idmef_snmp_service_destroy",&obj0)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_snmp_service, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { Py_BEGIN_ALLOW_THREADS idmef_snmp_service_destroy(arg1); Py_END_ALLOW_THREADS } resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_snmp_service_get_oid(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_snmp_service_t *arg1 = (idmef_snmp_service_t *) 0 ; PyObject * obj0 = 0 ; prelude_string_t *result = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:idmef_snmp_service_get_oid",&obj0)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_snmp_service, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { Py_BEGIN_ALLOW_THREADS result = (prelude_string_t *)idmef_snmp_service_get_oid(arg1); Py_END_ALLOW_THREADS } { resultobj = swig_python_string(result); } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_snmp_service_set_oid(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_snmp_service_t *arg1 = (idmef_snmp_service_t *) 0 ; prelude_string_t *arg2 = (prelude_string_t *) 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:idmef_snmp_service_set_oid",&obj0,&obj1)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_snmp_service, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { int ret; ret = prelude_string_new_dup_fast(&(arg2), PyString_AsString(obj1), PyString_Size(obj1)); if ( ret < 0 ) { swig_python_raise_exception(ret); return NULL; } } { Py_BEGIN_ALLOW_THREADS idmef_snmp_service_set_oid(arg1,arg2); Py_END_ALLOW_THREADS } resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_snmp_service_new_oid(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_snmp_service_t *arg1 = (idmef_snmp_service_t *) 0 ; prelude_string_t **arg2 = (prelude_string_t **) 0 ; void *argp2 = 0 ; int res2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; int result; if (!PyArg_ParseTuple(args,(char *)"OO:idmef_snmp_service_new_oid",&obj0,&obj1)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_snmp_service, SWIG_POINTER_EXCEPTION|0) ) return NULL; } res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_p_prelude_string_t, 0 | 0 ); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "idmef_snmp_service_new_oid" "', argument " "2"" of type '" "prelude_string_t **""'"); } arg2 = (prelude_string_t **)(argp2); { Py_BEGIN_ALLOW_THREADS result = (int)idmef_snmp_service_new_oid(arg1,arg2); Py_END_ALLOW_THREADS } { if ( result < 0 ) { swig_python_raise_exception(result); resultobj = NULL; } else { resultobj = PyInt_FromLong(result); } } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_snmp_service_unset_message_processing_model(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_snmp_service_t *arg1 = (idmef_snmp_service_t *) 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:idmef_snmp_service_unset_message_processing_model",&obj0)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_snmp_service, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { Py_BEGIN_ALLOW_THREADS idmef_snmp_service_unset_message_processing_model(arg1); Py_END_ALLOW_THREADS } resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_snmp_service_get_message_processing_model(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_snmp_service_t *arg1 = (idmef_snmp_service_t *) 0 ; PyObject * obj0 = 0 ; uint32_t *result = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:idmef_snmp_service_get_message_processing_model",&obj0)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_snmp_service, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { Py_BEGIN_ALLOW_THREADS result = (uint32_t *)idmef_snmp_service_get_message_processing_model(arg1); Py_END_ALLOW_THREADS } { if (result != NULL) { resultobj = PyLong_FromUnsignedLong(*result); } else { resultobj = Py_None; } } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_snmp_service_set_message_processing_model(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_snmp_service_t *arg1 = (idmef_snmp_service_t *) 0 ; uint32_t arg2 ; unsigned int val2 ; int ecode2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:idmef_snmp_service_set_message_processing_model",&obj0,&obj1)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_snmp_service, SWIG_POINTER_EXCEPTION|0) ) return NULL; } ecode2 = SWIG_AsVal_unsigned_SS_int(obj1, &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "idmef_snmp_service_set_message_processing_model" "', argument " "2"" of type '" "uint32_t""'"); } arg2 = (uint32_t)(val2); { Py_BEGIN_ALLOW_THREADS idmef_snmp_service_set_message_processing_model(arg1,arg2); Py_END_ALLOW_THREADS } resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_snmp_service_new_message_processing_model(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_snmp_service_t *arg1 = (idmef_snmp_service_t *) 0 ; uint32_t **arg2 = (uint32_t **) 0 ; void *argp2 = 0 ; int res2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; int result; if (!PyArg_ParseTuple(args,(char *)"OO:idmef_snmp_service_new_message_processing_model",&obj0,&obj1)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_snmp_service, SWIG_POINTER_EXCEPTION|0) ) return NULL; } res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_p_unsigned_int, 0 | 0 ); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "idmef_snmp_service_new_message_processing_model" "', argument " "2"" of type '" "uint32_t **""'"); } arg2 = (uint32_t **)(argp2); { Py_BEGIN_ALLOW_THREADS result = (int)idmef_snmp_service_new_message_processing_model(arg1,arg2); Py_END_ALLOW_THREADS } { if ( result < 0 ) { swig_python_raise_exception(result); resultobj = NULL; } else { resultobj = PyInt_FromLong(result); } } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_snmp_service_unset_security_model(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_snmp_service_t *arg1 = (idmef_snmp_service_t *) 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:idmef_snmp_service_unset_security_model",&obj0)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_snmp_service, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { Py_BEGIN_ALLOW_THREADS idmef_snmp_service_unset_security_model(arg1); Py_END_ALLOW_THREADS } resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_snmp_service_get_security_model(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_snmp_service_t *arg1 = (idmef_snmp_service_t *) 0 ; PyObject * obj0 = 0 ; uint32_t *result = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:idmef_snmp_service_get_security_model",&obj0)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_snmp_service, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { Py_BEGIN_ALLOW_THREADS result = (uint32_t *)idmef_snmp_service_get_security_model(arg1); Py_END_ALLOW_THREADS } { if (result != NULL) { resultobj = PyLong_FromUnsignedLong(*result); } else { resultobj = Py_None; } } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_snmp_service_set_security_model(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_snmp_service_t *arg1 = (idmef_snmp_service_t *) 0 ; uint32_t arg2 ; unsigned int val2 ; int ecode2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:idmef_snmp_service_set_security_model",&obj0,&obj1)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_snmp_service, SWIG_POINTER_EXCEPTION|0) ) return NULL; } ecode2 = SWIG_AsVal_unsigned_SS_int(obj1, &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "idmef_snmp_service_set_security_model" "', argument " "2"" of type '" "uint32_t""'"); } arg2 = (uint32_t)(val2); { Py_BEGIN_ALLOW_THREADS idmef_snmp_service_set_security_model(arg1,arg2); Py_END_ALLOW_THREADS } resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_snmp_service_new_security_model(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_snmp_service_t *arg1 = (idmef_snmp_service_t *) 0 ; uint32_t **arg2 = (uint32_t **) 0 ; void *argp2 = 0 ; int res2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; int result; if (!PyArg_ParseTuple(args,(char *)"OO:idmef_snmp_service_new_security_model",&obj0,&obj1)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_snmp_service, SWIG_POINTER_EXCEPTION|0) ) return NULL; } res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_p_unsigned_int, 0 | 0 ); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "idmef_snmp_service_new_security_model" "', argument " "2"" of type '" "uint32_t **""'"); } arg2 = (uint32_t **)(argp2); { Py_BEGIN_ALLOW_THREADS result = (int)idmef_snmp_service_new_security_model(arg1,arg2); Py_END_ALLOW_THREADS } { if ( result < 0 ) { swig_python_raise_exception(result); resultobj = NULL; } else { resultobj = PyInt_FromLong(result); } } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_snmp_service_get_security_name(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_snmp_service_t *arg1 = (idmef_snmp_service_t *) 0 ; PyObject * obj0 = 0 ; prelude_string_t *result = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:idmef_snmp_service_get_security_name",&obj0)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_snmp_service, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { Py_BEGIN_ALLOW_THREADS result = (prelude_string_t *)idmef_snmp_service_get_security_name(arg1); Py_END_ALLOW_THREADS } { resultobj = swig_python_string(result); } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_snmp_service_set_security_name(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_snmp_service_t *arg1 = (idmef_snmp_service_t *) 0 ; prelude_string_t *arg2 = (prelude_string_t *) 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:idmef_snmp_service_set_security_name",&obj0,&obj1)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_snmp_service, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { int ret; ret = prelude_string_new_dup_fast(&(arg2), PyString_AsString(obj1), PyString_Size(obj1)); if ( ret < 0 ) { swig_python_raise_exception(ret); return NULL; } } { Py_BEGIN_ALLOW_THREADS idmef_snmp_service_set_security_name(arg1,arg2); Py_END_ALLOW_THREADS } resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_snmp_service_new_security_name(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_snmp_service_t *arg1 = (idmef_snmp_service_t *) 0 ; prelude_string_t **arg2 = (prelude_string_t **) 0 ; void *argp2 = 0 ; int res2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; int result; if (!PyArg_ParseTuple(args,(char *)"OO:idmef_snmp_service_new_security_name",&obj0,&obj1)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_snmp_service, SWIG_POINTER_EXCEPTION|0) ) return NULL; } res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_p_prelude_string_t, 0 | 0 ); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "idmef_snmp_service_new_security_name" "', argument " "2"" of type '" "prelude_string_t **""'"); } arg2 = (prelude_string_t **)(argp2); { Py_BEGIN_ALLOW_THREADS result = (int)idmef_snmp_service_new_security_name(arg1,arg2); Py_END_ALLOW_THREADS } { if ( result < 0 ) { swig_python_raise_exception(result); resultobj = NULL; } else { resultobj = PyInt_FromLong(result); } } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_snmp_service_unset_security_level(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_snmp_service_t *arg1 = (idmef_snmp_service_t *) 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:idmef_snmp_service_unset_security_level",&obj0)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_snmp_service, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { Py_BEGIN_ALLOW_THREADS idmef_snmp_service_unset_security_level(arg1); Py_END_ALLOW_THREADS } resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_snmp_service_get_security_level(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_snmp_service_t *arg1 = (idmef_snmp_service_t *) 0 ; PyObject * obj0 = 0 ; uint32_t *result = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:idmef_snmp_service_get_security_level",&obj0)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_snmp_service, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { Py_BEGIN_ALLOW_THREADS result = (uint32_t *)idmef_snmp_service_get_security_level(arg1); Py_END_ALLOW_THREADS } { if (result != NULL) { resultobj = PyLong_FromUnsignedLong(*result); } else { resultobj = Py_None; } } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_snmp_service_set_security_level(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_snmp_service_t *arg1 = (idmef_snmp_service_t *) 0 ; uint32_t arg2 ; unsigned int val2 ; int ecode2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:idmef_snmp_service_set_security_level",&obj0,&obj1)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_snmp_service, SWIG_POINTER_EXCEPTION|0) ) return NULL; } ecode2 = SWIG_AsVal_unsigned_SS_int(obj1, &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "idmef_snmp_service_set_security_level" "', argument " "2"" of type '" "uint32_t""'"); } arg2 = (uint32_t)(val2); { Py_BEGIN_ALLOW_THREADS idmef_snmp_service_set_security_level(arg1,arg2); Py_END_ALLOW_THREADS } resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_snmp_service_new_security_level(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_snmp_service_t *arg1 = (idmef_snmp_service_t *) 0 ; uint32_t **arg2 = (uint32_t **) 0 ; void *argp2 = 0 ; int res2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; int result; if (!PyArg_ParseTuple(args,(char *)"OO:idmef_snmp_service_new_security_level",&obj0,&obj1)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_snmp_service, SWIG_POINTER_EXCEPTION|0) ) return NULL; } res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_p_unsigned_int, 0 | 0 ); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "idmef_snmp_service_new_security_level" "', argument " "2"" of type '" "uint32_t **""'"); } arg2 = (uint32_t **)(argp2); { Py_BEGIN_ALLOW_THREADS result = (int)idmef_snmp_service_new_security_level(arg1,arg2); Py_END_ALLOW_THREADS } { if ( result < 0 ) { swig_python_raise_exception(result); resultobj = NULL; } else { resultobj = PyInt_FromLong(result); } } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_snmp_service_get_context_name(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_snmp_service_t *arg1 = (idmef_snmp_service_t *) 0 ; PyObject * obj0 = 0 ; prelude_string_t *result = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:idmef_snmp_service_get_context_name",&obj0)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_snmp_service, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { Py_BEGIN_ALLOW_THREADS result = (prelude_string_t *)idmef_snmp_service_get_context_name(arg1); Py_END_ALLOW_THREADS } { resultobj = swig_python_string(result); } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_snmp_service_set_context_name(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_snmp_service_t *arg1 = (idmef_snmp_service_t *) 0 ; prelude_string_t *arg2 = (prelude_string_t *) 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:idmef_snmp_service_set_context_name",&obj0,&obj1)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_snmp_service, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { int ret; ret = prelude_string_new_dup_fast(&(arg2), PyString_AsString(obj1), PyString_Size(obj1)); if ( ret < 0 ) { swig_python_raise_exception(ret); return NULL; } } { Py_BEGIN_ALLOW_THREADS idmef_snmp_service_set_context_name(arg1,arg2); Py_END_ALLOW_THREADS } resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_snmp_service_new_context_name(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_snmp_service_t *arg1 = (idmef_snmp_service_t *) 0 ; prelude_string_t **arg2 = (prelude_string_t **) 0 ; void *argp2 = 0 ; int res2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; int result; if (!PyArg_ParseTuple(args,(char *)"OO:idmef_snmp_service_new_context_name",&obj0,&obj1)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_snmp_service, SWIG_POINTER_EXCEPTION|0) ) return NULL; } res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_p_prelude_string_t, 0 | 0 ); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "idmef_snmp_service_new_context_name" "', argument " "2"" of type '" "prelude_string_t **""'"); } arg2 = (prelude_string_t **)(argp2); { Py_BEGIN_ALLOW_THREADS result = (int)idmef_snmp_service_new_context_name(arg1,arg2); Py_END_ALLOW_THREADS } { if ( result < 0 ) { swig_python_raise_exception(result); resultobj = NULL; } else { resultobj = PyInt_FromLong(result); } } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_snmp_service_get_context_engine_id(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_snmp_service_t *arg1 = (idmef_snmp_service_t *) 0 ; PyObject * obj0 = 0 ; prelude_string_t *result = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:idmef_snmp_service_get_context_engine_id",&obj0)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_snmp_service, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { Py_BEGIN_ALLOW_THREADS result = (prelude_string_t *)idmef_snmp_service_get_context_engine_id(arg1); Py_END_ALLOW_THREADS } { resultobj = swig_python_string(result); } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_snmp_service_set_context_engine_id(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_snmp_service_t *arg1 = (idmef_snmp_service_t *) 0 ; prelude_string_t *arg2 = (prelude_string_t *) 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:idmef_snmp_service_set_context_engine_id",&obj0,&obj1)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_snmp_service, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { int ret; ret = prelude_string_new_dup_fast(&(arg2), PyString_AsString(obj1), PyString_Size(obj1)); if ( ret < 0 ) { swig_python_raise_exception(ret); return NULL; } } { Py_BEGIN_ALLOW_THREADS idmef_snmp_service_set_context_engine_id(arg1,arg2); Py_END_ALLOW_THREADS } resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_snmp_service_new_context_engine_id(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_snmp_service_t *arg1 = (idmef_snmp_service_t *) 0 ; prelude_string_t **arg2 = (prelude_string_t **) 0 ; void *argp2 = 0 ; int res2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; int result; if (!PyArg_ParseTuple(args,(char *)"OO:idmef_snmp_service_new_context_engine_id",&obj0,&obj1)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_snmp_service, SWIG_POINTER_EXCEPTION|0) ) return NULL; } res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_p_prelude_string_t, 0 | 0 ); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "idmef_snmp_service_new_context_engine_id" "', argument " "2"" of type '" "prelude_string_t **""'"); } arg2 = (prelude_string_t **)(argp2); { Py_BEGIN_ALLOW_THREADS result = (int)idmef_snmp_service_new_context_engine_id(arg1,arg2); Py_END_ALLOW_THREADS } { if ( result < 0 ) { swig_python_raise_exception(result); resultobj = NULL; } else { resultobj = PyInt_FromLong(result); } } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_snmp_service_get_command(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_snmp_service_t *arg1 = (idmef_snmp_service_t *) 0 ; PyObject * obj0 = 0 ; prelude_string_t *result = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:idmef_snmp_service_get_command",&obj0)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_snmp_service, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { Py_BEGIN_ALLOW_THREADS result = (prelude_string_t *)idmef_snmp_service_get_command(arg1); Py_END_ALLOW_THREADS } { resultobj = swig_python_string(result); } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_snmp_service_set_command(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_snmp_service_t *arg1 = (idmef_snmp_service_t *) 0 ; prelude_string_t *arg2 = (prelude_string_t *) 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:idmef_snmp_service_set_command",&obj0,&obj1)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_snmp_service, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { int ret; ret = prelude_string_new_dup_fast(&(arg2), PyString_AsString(obj1), PyString_Size(obj1)); if ( ret < 0 ) { swig_python_raise_exception(ret); return NULL; } } { Py_BEGIN_ALLOW_THREADS idmef_snmp_service_set_command(arg1,arg2); Py_END_ALLOW_THREADS } resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_snmp_service_new_command(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_snmp_service_t *arg1 = (idmef_snmp_service_t *) 0 ; prelude_string_t **arg2 = (prelude_string_t **) 0 ; void *argp2 = 0 ; int res2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; int result; if (!PyArg_ParseTuple(args,(char *)"OO:idmef_snmp_service_new_command",&obj0,&obj1)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_snmp_service, SWIG_POINTER_EXCEPTION|0) ) return NULL; } res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_p_prelude_string_t, 0 | 0 ); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "idmef_snmp_service_new_command" "', argument " "2"" of type '" "prelude_string_t **""'"); } arg2 = (prelude_string_t **)(argp2); { Py_BEGIN_ALLOW_THREADS result = (int)idmef_snmp_service_new_command(arg1,arg2); Py_END_ALLOW_THREADS } { if ( result < 0 ) { swig_python_raise_exception(result); resultobj = NULL; } else { resultobj = PyInt_FromLong(result); } } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_snmp_service_get_community(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_snmp_service_t *arg1 = (idmef_snmp_service_t *) 0 ; PyObject * obj0 = 0 ; prelude_string_t *result = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:idmef_snmp_service_get_community",&obj0)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_snmp_service, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { Py_BEGIN_ALLOW_THREADS result = (prelude_string_t *)idmef_snmp_service_get_community(arg1); Py_END_ALLOW_THREADS } { resultobj = swig_python_string(result); } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_snmp_service_set_community(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_snmp_service_t *arg1 = (idmef_snmp_service_t *) 0 ; prelude_string_t *arg2 = (prelude_string_t *) 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:idmef_snmp_service_set_community",&obj0,&obj1)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_snmp_service, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { int ret; ret = prelude_string_new_dup_fast(&(arg2), PyString_AsString(obj1), PyString_Size(obj1)); if ( ret < 0 ) { swig_python_raise_exception(ret); return NULL; } } { Py_BEGIN_ALLOW_THREADS idmef_snmp_service_set_community(arg1,arg2); Py_END_ALLOW_THREADS } resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_snmp_service_new_community(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_snmp_service_t *arg1 = (idmef_snmp_service_t *) 0 ; prelude_string_t **arg2 = (prelude_string_t **) 0 ; void *argp2 = 0 ; int res2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; int result; if (!PyArg_ParseTuple(args,(char *)"OO:idmef_snmp_service_new_community",&obj0,&obj1)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_snmp_service, SWIG_POINTER_EXCEPTION|0) ) return NULL; } res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_p_prelude_string_t, 0 | 0 ); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "idmef_snmp_service_new_community" "', argument " "2"" of type '" "prelude_string_t **""'"); } arg2 = (prelude_string_t **)(argp2); { Py_BEGIN_ALLOW_THREADS result = (int)idmef_snmp_service_new_community(arg1,arg2); Py_END_ALLOW_THREADS } { if ( result < 0 ) { swig_python_raise_exception(result); resultobj = NULL; } else { resultobj = PyInt_FromLong(result); } } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_service_type_to_numeric(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; char *arg1 = (char *) 0 ; PyObject * obj0 = 0 ; idmef_service_type_t result; if (!PyArg_ParseTuple(args,(char *)"O:idmef_service_type_to_numeric",&obj0)) SWIG_fail; { if ( obj0 == Py_None ) arg1 = NULL; else if ( PyString_Check(obj0) ) arg1 = PyString_AsString(obj0); else { PyErr_Format(PyExc_TypeError, "expected None or string, %s found", obj0->ob_type->tp_name); return NULL; } } { Py_BEGIN_ALLOW_THREADS result = (idmef_service_type_t)idmef_service_type_to_numeric((char const *)arg1); Py_END_ALLOW_THREADS } resultobj = SWIG_From_int((int)(result)); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_service_type_to_string(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_service_type_t arg1 ; int val1 ; int ecode1 = 0 ; PyObject * obj0 = 0 ; char *result = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:idmef_service_type_to_string",&obj0)) SWIG_fail; ecode1 = SWIG_AsVal_int(obj0, &val1); if (!SWIG_IsOK(ecode1)) { SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "idmef_service_type_to_string" "', argument " "1"" of type '" "idmef_service_type_t""'"); } arg1 = (idmef_service_type_t)(val1); { Py_BEGIN_ALLOW_THREADS result = (char *)idmef_service_type_to_string(arg1); Py_END_ALLOW_THREADS } resultobj = SWIG_FromCharPtr((const char *)result); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_service_new(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_service_t **arg1 = (idmef_service_t **) 0 ; idmef_service_t *tmp1 ; int result; { arg1 = (idmef_service_t **) &tmp1; } if (!PyArg_ParseTuple(args,(char *)":idmef_service_new")) SWIG_fail; { Py_BEGIN_ALLOW_THREADS result = (int)idmef_service_new(arg1); Py_END_ALLOW_THREADS } { if ( result < 0 ) { swig_python_raise_exception(result); resultobj = NULL; } else { resultobj = PyInt_FromLong(result); } } { if ( result >= 0 ) resultobj = SWIG_NewPointerObj((void *) * arg1, SWIGTYPE_p_idmef_service, 0); } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_service_copy(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_service_t *arg1 = (idmef_service_t *) 0 ; idmef_service_t *arg2 = (idmef_service_t *) 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; int result; if (!PyArg_ParseTuple(args,(char *)"OO:idmef_service_copy",&obj0,&obj1)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_service, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { if ( obj1 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj1, (void **)&arg2, SWIGTYPE_p_idmef_service, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { Py_BEGIN_ALLOW_THREADS result = (int)idmef_service_copy((struct idmef_service const *)arg1,arg2); Py_END_ALLOW_THREADS } { if ( result < 0 ) { swig_python_raise_exception(result); resultobj = NULL; } else { resultobj = PyInt_FromLong(result); } } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_service_clone(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_service_t *arg1 = (idmef_service_t *) 0 ; idmef_service_t **arg2 = (idmef_service_t **) 0 ; idmef_service_t *tmp2 ; PyObject * obj0 = 0 ; int result; { arg2 = (idmef_service_t **) &tmp2; } if (!PyArg_ParseTuple(args,(char *)"O:idmef_service_clone",&obj0)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_service, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { Py_BEGIN_ALLOW_THREADS result = (int)idmef_service_clone(arg1,arg2); Py_END_ALLOW_THREADS } { if ( result < 0 ) { swig_python_raise_exception(result); resultobj = NULL; } else { resultobj = PyInt_FromLong(result); } } { if ( result >= 0 ) resultobj = SWIG_NewPointerObj((void *) * arg2, SWIGTYPE_p_idmef_service, 0); } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_service_compare(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_service_t *arg1 = (idmef_service_t *) 0 ; idmef_service_t *arg2 = (idmef_service_t *) 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; int result; if (!PyArg_ParseTuple(args,(char *)"OO:idmef_service_compare",&obj0,&obj1)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_service, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { if ( obj1 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj1, (void **)&arg2, SWIGTYPE_p_idmef_service, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { Py_BEGIN_ALLOW_THREADS result = (int)idmef_service_compare((struct idmef_service const *)arg1,(struct idmef_service const *)arg2); Py_END_ALLOW_THREADS } { resultobj = PyInt_FromLong(result); } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_service_ref(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_service_t *arg1 = (idmef_service_t *) 0 ; PyObject * obj0 = 0 ; idmef_service_t *result = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:idmef_service_ref",&obj0)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_service, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { Py_BEGIN_ALLOW_THREADS result = (idmef_service_t *)idmef_service_ref(arg1); Py_END_ALLOW_THREADS } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_idmef_service, 0 | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_service_destroy(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_service_t *arg1 = (idmef_service_t *) 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:idmef_service_destroy",&obj0)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_service, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { Py_BEGIN_ALLOW_THREADS idmef_service_destroy(arg1); Py_END_ALLOW_THREADS } resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_service_get_ident(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_service_t *arg1 = (idmef_service_t *) 0 ; PyObject * obj0 = 0 ; prelude_string_t *result = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:idmef_service_get_ident",&obj0)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_service, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { Py_BEGIN_ALLOW_THREADS result = (prelude_string_t *)idmef_service_get_ident(arg1); Py_END_ALLOW_THREADS } { resultobj = swig_python_string(result); } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_service_set_ident(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_service_t *arg1 = (idmef_service_t *) 0 ; prelude_string_t *arg2 = (prelude_string_t *) 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:idmef_service_set_ident",&obj0,&obj1)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_service, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { int ret; ret = prelude_string_new_dup_fast(&(arg2), PyString_AsString(obj1), PyString_Size(obj1)); if ( ret < 0 ) { swig_python_raise_exception(ret); return NULL; } } { Py_BEGIN_ALLOW_THREADS idmef_service_set_ident(arg1,arg2); Py_END_ALLOW_THREADS } resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_service_new_ident(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_service_t *arg1 = (idmef_service_t *) 0 ; prelude_string_t **arg2 = (prelude_string_t **) 0 ; void *argp2 = 0 ; int res2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; int result; if (!PyArg_ParseTuple(args,(char *)"OO:idmef_service_new_ident",&obj0,&obj1)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_service, SWIG_POINTER_EXCEPTION|0) ) return NULL; } res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_p_prelude_string_t, 0 | 0 ); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "idmef_service_new_ident" "', argument " "2"" of type '" "prelude_string_t **""'"); } arg2 = (prelude_string_t **)(argp2); { Py_BEGIN_ALLOW_THREADS result = (int)idmef_service_new_ident(arg1,arg2); Py_END_ALLOW_THREADS } { if ( result < 0 ) { swig_python_raise_exception(result); resultobj = NULL; } else { resultobj = PyInt_FromLong(result); } } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_service_unset_ip_version(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_service_t *arg1 = (idmef_service_t *) 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:idmef_service_unset_ip_version",&obj0)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_service, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { Py_BEGIN_ALLOW_THREADS idmef_service_unset_ip_version(arg1); Py_END_ALLOW_THREADS } resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_service_get_ip_version(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_service_t *arg1 = (idmef_service_t *) 0 ; PyObject * obj0 = 0 ; uint8_t *result = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:idmef_service_get_ip_version",&obj0)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_service, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { Py_BEGIN_ALLOW_THREADS result = (uint8_t *)idmef_service_get_ip_version(arg1); Py_END_ALLOW_THREADS } { if (result != NULL) { resultobj = PyLong_FromUnsignedLong(*result); } else { resultobj = Py_None; } } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_service_set_ip_version(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_service_t *arg1 = (idmef_service_t *) 0 ; uint8_t arg2 ; unsigned char val2 ; int ecode2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:idmef_service_set_ip_version",&obj0,&obj1)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_service, SWIG_POINTER_EXCEPTION|0) ) return NULL; } ecode2 = SWIG_AsVal_unsigned_SS_char(obj1, &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "idmef_service_set_ip_version" "', argument " "2"" of type '" "uint8_t""'"); } arg2 = (uint8_t)(val2); { Py_BEGIN_ALLOW_THREADS idmef_service_set_ip_version(arg1,arg2); Py_END_ALLOW_THREADS } resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_service_new_ip_version(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_service_t *arg1 = (idmef_service_t *) 0 ; uint8_t **arg2 = (uint8_t **) 0 ; void *argp2 = 0 ; int res2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; int result; if (!PyArg_ParseTuple(args,(char *)"OO:idmef_service_new_ip_version",&obj0,&obj1)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_service, SWIG_POINTER_EXCEPTION|0) ) return NULL; } res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_p_unsigned_char, 0 | 0 ); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "idmef_service_new_ip_version" "', argument " "2"" of type '" "uint8_t **""'"); } arg2 = (uint8_t **)(argp2); { Py_BEGIN_ALLOW_THREADS result = (int)idmef_service_new_ip_version(arg1,arg2); Py_END_ALLOW_THREADS } { if ( result < 0 ) { swig_python_raise_exception(result); resultobj = NULL; } else { resultobj = PyInt_FromLong(result); } } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_service_unset_iana_protocol_number(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_service_t *arg1 = (idmef_service_t *) 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:idmef_service_unset_iana_protocol_number",&obj0)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_service, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { Py_BEGIN_ALLOW_THREADS idmef_service_unset_iana_protocol_number(arg1); Py_END_ALLOW_THREADS } resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_service_get_iana_protocol_number(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_service_t *arg1 = (idmef_service_t *) 0 ; PyObject * obj0 = 0 ; uint8_t *result = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:idmef_service_get_iana_protocol_number",&obj0)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_service, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { Py_BEGIN_ALLOW_THREADS result = (uint8_t *)idmef_service_get_iana_protocol_number(arg1); Py_END_ALLOW_THREADS } { if (result != NULL) { resultobj = PyLong_FromUnsignedLong(*result); } else { resultobj = Py_None; } } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_service_set_iana_protocol_number(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_service_t *arg1 = (idmef_service_t *) 0 ; uint8_t arg2 ; unsigned char val2 ; int ecode2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:idmef_service_set_iana_protocol_number",&obj0,&obj1)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_service, SWIG_POINTER_EXCEPTION|0) ) return NULL; } ecode2 = SWIG_AsVal_unsigned_SS_char(obj1, &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "idmef_service_set_iana_protocol_number" "', argument " "2"" of type '" "uint8_t""'"); } arg2 = (uint8_t)(val2); { Py_BEGIN_ALLOW_THREADS idmef_service_set_iana_protocol_number(arg1,arg2); Py_END_ALLOW_THREADS } resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_service_new_iana_protocol_number(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_service_t *arg1 = (idmef_service_t *) 0 ; uint8_t **arg2 = (uint8_t **) 0 ; void *argp2 = 0 ; int res2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; int result; if (!PyArg_ParseTuple(args,(char *)"OO:idmef_service_new_iana_protocol_number",&obj0,&obj1)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_service, SWIG_POINTER_EXCEPTION|0) ) return NULL; } res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_p_unsigned_char, 0 | 0 ); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "idmef_service_new_iana_protocol_number" "', argument " "2"" of type '" "uint8_t **""'"); } arg2 = (uint8_t **)(argp2); { Py_BEGIN_ALLOW_THREADS result = (int)idmef_service_new_iana_protocol_number(arg1,arg2); Py_END_ALLOW_THREADS } { if ( result < 0 ) { swig_python_raise_exception(result); resultobj = NULL; } else { resultobj = PyInt_FromLong(result); } } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_service_get_iana_protocol_name(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_service_t *arg1 = (idmef_service_t *) 0 ; PyObject * obj0 = 0 ; prelude_string_t *result = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:idmef_service_get_iana_protocol_name",&obj0)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_service, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { Py_BEGIN_ALLOW_THREADS result = (prelude_string_t *)idmef_service_get_iana_protocol_name(arg1); Py_END_ALLOW_THREADS } { resultobj = swig_python_string(result); } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_service_set_iana_protocol_name(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_service_t *arg1 = (idmef_service_t *) 0 ; prelude_string_t *arg2 = (prelude_string_t *) 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:idmef_service_set_iana_protocol_name",&obj0,&obj1)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_service, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { int ret; ret = prelude_string_new_dup_fast(&(arg2), PyString_AsString(obj1), PyString_Size(obj1)); if ( ret < 0 ) { swig_python_raise_exception(ret); return NULL; } } { Py_BEGIN_ALLOW_THREADS idmef_service_set_iana_protocol_name(arg1,arg2); Py_END_ALLOW_THREADS } resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_service_new_iana_protocol_name(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_service_t *arg1 = (idmef_service_t *) 0 ; prelude_string_t **arg2 = (prelude_string_t **) 0 ; void *argp2 = 0 ; int res2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; int result; if (!PyArg_ParseTuple(args,(char *)"OO:idmef_service_new_iana_protocol_name",&obj0,&obj1)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_service, SWIG_POINTER_EXCEPTION|0) ) return NULL; } res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_p_prelude_string_t, 0 | 0 ); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "idmef_service_new_iana_protocol_name" "', argument " "2"" of type '" "prelude_string_t **""'"); } arg2 = (prelude_string_t **)(argp2); { Py_BEGIN_ALLOW_THREADS result = (int)idmef_service_new_iana_protocol_name(arg1,arg2); Py_END_ALLOW_THREADS } { if ( result < 0 ) { swig_python_raise_exception(result); resultobj = NULL; } else { resultobj = PyInt_FromLong(result); } } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_service_get_name(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_service_t *arg1 = (idmef_service_t *) 0 ; PyObject * obj0 = 0 ; prelude_string_t *result = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:idmef_service_get_name",&obj0)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_service, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { Py_BEGIN_ALLOW_THREADS result = (prelude_string_t *)idmef_service_get_name(arg1); Py_END_ALLOW_THREADS } { resultobj = swig_python_string(result); } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_service_set_name(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_service_t *arg1 = (idmef_service_t *) 0 ; prelude_string_t *arg2 = (prelude_string_t *) 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:idmef_service_set_name",&obj0,&obj1)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_service, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { int ret; ret = prelude_string_new_dup_fast(&(arg2), PyString_AsString(obj1), PyString_Size(obj1)); if ( ret < 0 ) { swig_python_raise_exception(ret); return NULL; } } { Py_BEGIN_ALLOW_THREADS idmef_service_set_name(arg1,arg2); Py_END_ALLOW_THREADS } resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_service_new_name(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_service_t *arg1 = (idmef_service_t *) 0 ; prelude_string_t **arg2 = (prelude_string_t **) 0 ; void *argp2 = 0 ; int res2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; int result; if (!PyArg_ParseTuple(args,(char *)"OO:idmef_service_new_name",&obj0,&obj1)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_service, SWIG_POINTER_EXCEPTION|0) ) return NULL; } res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_p_prelude_string_t, 0 | 0 ); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "idmef_service_new_name" "', argument " "2"" of type '" "prelude_string_t **""'"); } arg2 = (prelude_string_t **)(argp2); { Py_BEGIN_ALLOW_THREADS result = (int)idmef_service_new_name(arg1,arg2); Py_END_ALLOW_THREADS } { if ( result < 0 ) { swig_python_raise_exception(result); resultobj = NULL; } else { resultobj = PyInt_FromLong(result); } } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_service_unset_port(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_service_t *arg1 = (idmef_service_t *) 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:idmef_service_unset_port",&obj0)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_service, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { Py_BEGIN_ALLOW_THREADS idmef_service_unset_port(arg1); Py_END_ALLOW_THREADS } resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_service_get_port(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_service_t *arg1 = (idmef_service_t *) 0 ; PyObject * obj0 = 0 ; uint16_t *result = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:idmef_service_get_port",&obj0)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_service, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { Py_BEGIN_ALLOW_THREADS result = (uint16_t *)idmef_service_get_port(arg1); Py_END_ALLOW_THREADS } { if (result != NULL) { resultobj = PyLong_FromUnsignedLong(*result); } else { resultobj = Py_None; } } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_service_set_port(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_service_t *arg1 = (idmef_service_t *) 0 ; uint16_t arg2 ; unsigned short val2 ; int ecode2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:idmef_service_set_port",&obj0,&obj1)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_service, SWIG_POINTER_EXCEPTION|0) ) return NULL; } ecode2 = SWIG_AsVal_unsigned_SS_short(obj1, &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "idmef_service_set_port" "', argument " "2"" of type '" "uint16_t""'"); } arg2 = (uint16_t)(val2); { Py_BEGIN_ALLOW_THREADS idmef_service_set_port(arg1,arg2); Py_END_ALLOW_THREADS } resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_service_new_port(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_service_t *arg1 = (idmef_service_t *) 0 ; uint16_t **arg2 = (uint16_t **) 0 ; void *argp2 = 0 ; int res2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; int result; if (!PyArg_ParseTuple(args,(char *)"OO:idmef_service_new_port",&obj0,&obj1)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_service, SWIG_POINTER_EXCEPTION|0) ) return NULL; } res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_p_unsigned_short, 0 | 0 ); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "idmef_service_new_port" "', argument " "2"" of type '" "uint16_t **""'"); } arg2 = (uint16_t **)(argp2); { Py_BEGIN_ALLOW_THREADS result = (int)idmef_service_new_port(arg1,arg2); Py_END_ALLOW_THREADS } { if ( result < 0 ) { swig_python_raise_exception(result); resultobj = NULL; } else { resultobj = PyInt_FromLong(result); } } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_service_get_portlist(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_service_t *arg1 = (idmef_service_t *) 0 ; PyObject * obj0 = 0 ; prelude_string_t *result = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:idmef_service_get_portlist",&obj0)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_service, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { Py_BEGIN_ALLOW_THREADS result = (prelude_string_t *)idmef_service_get_portlist(arg1); Py_END_ALLOW_THREADS } { resultobj = swig_python_string(result); } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_service_set_portlist(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_service_t *arg1 = (idmef_service_t *) 0 ; prelude_string_t *arg2 = (prelude_string_t *) 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:idmef_service_set_portlist",&obj0,&obj1)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_service, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { int ret; ret = prelude_string_new_dup_fast(&(arg2), PyString_AsString(obj1), PyString_Size(obj1)); if ( ret < 0 ) { swig_python_raise_exception(ret); return NULL; } } { Py_BEGIN_ALLOW_THREADS idmef_service_set_portlist(arg1,arg2); Py_END_ALLOW_THREADS } resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_service_new_portlist(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_service_t *arg1 = (idmef_service_t *) 0 ; prelude_string_t **arg2 = (prelude_string_t **) 0 ; void *argp2 = 0 ; int res2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; int result; if (!PyArg_ParseTuple(args,(char *)"OO:idmef_service_new_portlist",&obj0,&obj1)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_service, SWIG_POINTER_EXCEPTION|0) ) return NULL; } res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_p_prelude_string_t, 0 | 0 ); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "idmef_service_new_portlist" "', argument " "2"" of type '" "prelude_string_t **""'"); } arg2 = (prelude_string_t **)(argp2); { Py_BEGIN_ALLOW_THREADS result = (int)idmef_service_new_portlist(arg1,arg2); Py_END_ALLOW_THREADS } { if ( result < 0 ) { swig_python_raise_exception(result); resultobj = NULL; } else { resultobj = PyInt_FromLong(result); } } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_service_get_protocol(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_service_t *arg1 = (idmef_service_t *) 0 ; PyObject * obj0 = 0 ; prelude_string_t *result = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:idmef_service_get_protocol",&obj0)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_service, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { Py_BEGIN_ALLOW_THREADS result = (prelude_string_t *)idmef_service_get_protocol(arg1); Py_END_ALLOW_THREADS } { resultobj = swig_python_string(result); } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_service_set_protocol(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_service_t *arg1 = (idmef_service_t *) 0 ; prelude_string_t *arg2 = (prelude_string_t *) 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:idmef_service_set_protocol",&obj0,&obj1)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_service, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { int ret; ret = prelude_string_new_dup_fast(&(arg2), PyString_AsString(obj1), PyString_Size(obj1)); if ( ret < 0 ) { swig_python_raise_exception(ret); return NULL; } } { Py_BEGIN_ALLOW_THREADS idmef_service_set_protocol(arg1,arg2); Py_END_ALLOW_THREADS } resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_service_new_protocol(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_service_t *arg1 = (idmef_service_t *) 0 ; prelude_string_t **arg2 = (prelude_string_t **) 0 ; void *argp2 = 0 ; int res2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; int result; if (!PyArg_ParseTuple(args,(char *)"OO:idmef_service_new_protocol",&obj0,&obj1)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_service, SWIG_POINTER_EXCEPTION|0) ) return NULL; } res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_p_prelude_string_t, 0 | 0 ); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "idmef_service_new_protocol" "', argument " "2"" of type '" "prelude_string_t **""'"); } arg2 = (prelude_string_t **)(argp2); { Py_BEGIN_ALLOW_THREADS result = (int)idmef_service_new_protocol(arg1,arg2); Py_END_ALLOW_THREADS } { if ( result < 0 ) { swig_python_raise_exception(result); resultobj = NULL; } else { resultobj = PyInt_FromLong(result); } } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_service_get_type(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_service_t *arg1 = (idmef_service_t *) 0 ; PyObject * obj0 = 0 ; idmef_service_type_t result; if (!PyArg_ParseTuple(args,(char *)"O:idmef_service_get_type",&obj0)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_service, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { Py_BEGIN_ALLOW_THREADS result = (idmef_service_type_t)idmef_service_get_type(arg1); Py_END_ALLOW_THREADS } resultobj = SWIG_From_int((int)(result)); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_service_get_web_service(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_service_t *arg1 = (idmef_service_t *) 0 ; PyObject * obj0 = 0 ; idmef_web_service_t *result = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:idmef_service_get_web_service",&obj0)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_service, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { Py_BEGIN_ALLOW_THREADS result = (idmef_web_service_t *)idmef_service_get_web_service(arg1); Py_END_ALLOW_THREADS } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_idmef_web_service, 0 | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_service_set_web_service(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_service_t *arg1 = (idmef_service_t *) 0 ; idmef_web_service_t *arg2 = (idmef_web_service_t *) 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:idmef_service_set_web_service",&obj0,&obj1)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_service, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { if ( obj1 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj1, (void **)&arg2, SWIGTYPE_p_idmef_web_service, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { Py_BEGIN_ALLOW_THREADS idmef_service_set_web_service(arg1,arg2); Py_END_ALLOW_THREADS } resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_service_new_web_service(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_service_t *arg1 = (idmef_service_t *) 0 ; idmef_web_service_t **arg2 = (idmef_web_service_t **) 0 ; idmef_web_service_t *tmp2 ; PyObject * obj0 = 0 ; int result; { arg2 = (idmef_web_service_t **) &tmp2; } if (!PyArg_ParseTuple(args,(char *)"O:idmef_service_new_web_service",&obj0)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_service, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { Py_BEGIN_ALLOW_THREADS result = (int)idmef_service_new_web_service(arg1,arg2); Py_END_ALLOW_THREADS } { if ( result < 0 ) { swig_python_raise_exception(result); resultobj = NULL; } else { resultobj = PyInt_FromLong(result); } } { if ( result >= 0 ) resultobj = SWIG_NewPointerObj((void *) * arg2, SWIGTYPE_p_idmef_web_service, 0); } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_service_get_snmp_service(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_service_t *arg1 = (idmef_service_t *) 0 ; PyObject * obj0 = 0 ; idmef_snmp_service_t *result = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:idmef_service_get_snmp_service",&obj0)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_service, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { Py_BEGIN_ALLOW_THREADS result = (idmef_snmp_service_t *)idmef_service_get_snmp_service(arg1); Py_END_ALLOW_THREADS } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_idmef_snmp_service, 0 | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_service_set_snmp_service(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_service_t *arg1 = (idmef_service_t *) 0 ; idmef_snmp_service_t *arg2 = (idmef_snmp_service_t *) 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:idmef_service_set_snmp_service",&obj0,&obj1)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_service, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { if ( obj1 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj1, (void **)&arg2, SWIGTYPE_p_idmef_snmp_service, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { Py_BEGIN_ALLOW_THREADS idmef_service_set_snmp_service(arg1,arg2); Py_END_ALLOW_THREADS } resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_service_new_snmp_service(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_service_t *arg1 = (idmef_service_t *) 0 ; idmef_snmp_service_t **arg2 = (idmef_snmp_service_t **) 0 ; idmef_snmp_service_t *tmp2 ; PyObject * obj0 = 0 ; int result; { arg2 = (idmef_snmp_service_t **) &tmp2; } if (!PyArg_ParseTuple(args,(char *)"O:idmef_service_new_snmp_service",&obj0)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_service, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { Py_BEGIN_ALLOW_THREADS result = (int)idmef_service_new_snmp_service(arg1,arg2); Py_END_ALLOW_THREADS } { if ( result < 0 ) { swig_python_raise_exception(result); resultobj = NULL; } else { resultobj = PyInt_FromLong(result); } } { if ( result >= 0 ) resultobj = SWIG_NewPointerObj((void *) * arg2, SWIGTYPE_p_idmef_snmp_service, 0); } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_node_category_to_numeric(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; char *arg1 = (char *) 0 ; PyObject * obj0 = 0 ; idmef_node_category_t result; if (!PyArg_ParseTuple(args,(char *)"O:idmef_node_category_to_numeric",&obj0)) SWIG_fail; { if ( obj0 == Py_None ) arg1 = NULL; else if ( PyString_Check(obj0) ) arg1 = PyString_AsString(obj0); else { PyErr_Format(PyExc_TypeError, "expected None or string, %s found", obj0->ob_type->tp_name); return NULL; } } { Py_BEGIN_ALLOW_THREADS result = (idmef_node_category_t)idmef_node_category_to_numeric((char const *)arg1); Py_END_ALLOW_THREADS } resultobj = SWIG_From_int((int)(result)); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_node_category_to_string(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_node_category_t arg1 ; int val1 ; int ecode1 = 0 ; PyObject * obj0 = 0 ; char *result = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:idmef_node_category_to_string",&obj0)) SWIG_fail; ecode1 = SWIG_AsVal_int(obj0, &val1); if (!SWIG_IsOK(ecode1)) { SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "idmef_node_category_to_string" "', argument " "1"" of type '" "idmef_node_category_t""'"); } arg1 = (idmef_node_category_t)(val1); { Py_BEGIN_ALLOW_THREADS result = (char *)idmef_node_category_to_string(arg1); Py_END_ALLOW_THREADS } resultobj = SWIG_FromCharPtr((const char *)result); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_node_new(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_node_t **arg1 = (idmef_node_t **) 0 ; idmef_node_t *tmp1 ; int result; { arg1 = (idmef_node_t **) &tmp1; } if (!PyArg_ParseTuple(args,(char *)":idmef_node_new")) SWIG_fail; { Py_BEGIN_ALLOW_THREADS result = (int)idmef_node_new(arg1); Py_END_ALLOW_THREADS } { if ( result < 0 ) { swig_python_raise_exception(result); resultobj = NULL; } else { resultobj = PyInt_FromLong(result); } } { if ( result >= 0 ) resultobj = SWIG_NewPointerObj((void *) * arg1, SWIGTYPE_p_idmef_node, 0); } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_node_copy(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_node_t *arg1 = (idmef_node_t *) 0 ; idmef_node_t *arg2 = (idmef_node_t *) 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; int result; if (!PyArg_ParseTuple(args,(char *)"OO:idmef_node_copy",&obj0,&obj1)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_node, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { if ( obj1 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj1, (void **)&arg2, SWIGTYPE_p_idmef_node, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { Py_BEGIN_ALLOW_THREADS result = (int)idmef_node_copy((struct idmef_node const *)arg1,arg2); Py_END_ALLOW_THREADS } { if ( result < 0 ) { swig_python_raise_exception(result); resultobj = NULL; } else { resultobj = PyInt_FromLong(result); } } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_node_clone(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_node_t *arg1 = (idmef_node_t *) 0 ; idmef_node_t **arg2 = (idmef_node_t **) 0 ; idmef_node_t *tmp2 ; PyObject * obj0 = 0 ; int result; { arg2 = (idmef_node_t **) &tmp2; } if (!PyArg_ParseTuple(args,(char *)"O:idmef_node_clone",&obj0)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_node, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { Py_BEGIN_ALLOW_THREADS result = (int)idmef_node_clone(arg1,arg2); Py_END_ALLOW_THREADS } { if ( result < 0 ) { swig_python_raise_exception(result); resultobj = NULL; } else { resultobj = PyInt_FromLong(result); } } { if ( result >= 0 ) resultobj = SWIG_NewPointerObj((void *) * arg2, SWIGTYPE_p_idmef_node, 0); } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_node_compare(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_node_t *arg1 = (idmef_node_t *) 0 ; idmef_node_t *arg2 = (idmef_node_t *) 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; int result; if (!PyArg_ParseTuple(args,(char *)"OO:idmef_node_compare",&obj0,&obj1)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_node, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { if ( obj1 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj1, (void **)&arg2, SWIGTYPE_p_idmef_node, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { Py_BEGIN_ALLOW_THREADS result = (int)idmef_node_compare((struct idmef_node const *)arg1,(struct idmef_node const *)arg2); Py_END_ALLOW_THREADS } { resultobj = PyInt_FromLong(result); } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_node_ref(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_node_t *arg1 = (idmef_node_t *) 0 ; PyObject * obj0 = 0 ; idmef_node_t *result = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:idmef_node_ref",&obj0)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_node, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { Py_BEGIN_ALLOW_THREADS result = (idmef_node_t *)idmef_node_ref(arg1); Py_END_ALLOW_THREADS } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_idmef_node, 0 | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_node_destroy(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_node_t *arg1 = (idmef_node_t *) 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:idmef_node_destroy",&obj0)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_node, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { Py_BEGIN_ALLOW_THREADS idmef_node_destroy(arg1); Py_END_ALLOW_THREADS } resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_node_get_ident(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_node_t *arg1 = (idmef_node_t *) 0 ; PyObject * obj0 = 0 ; prelude_string_t *result = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:idmef_node_get_ident",&obj0)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_node, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { Py_BEGIN_ALLOW_THREADS result = (prelude_string_t *)idmef_node_get_ident(arg1); Py_END_ALLOW_THREADS } { resultobj = swig_python_string(result); } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_node_set_ident(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_node_t *arg1 = (idmef_node_t *) 0 ; prelude_string_t *arg2 = (prelude_string_t *) 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:idmef_node_set_ident",&obj0,&obj1)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_node, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { int ret; ret = prelude_string_new_dup_fast(&(arg2), PyString_AsString(obj1), PyString_Size(obj1)); if ( ret < 0 ) { swig_python_raise_exception(ret); return NULL; } } { Py_BEGIN_ALLOW_THREADS idmef_node_set_ident(arg1,arg2); Py_END_ALLOW_THREADS } resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_node_new_ident(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_node_t *arg1 = (idmef_node_t *) 0 ; prelude_string_t **arg2 = (prelude_string_t **) 0 ; void *argp2 = 0 ; int res2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; int result; if (!PyArg_ParseTuple(args,(char *)"OO:idmef_node_new_ident",&obj0,&obj1)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_node, SWIG_POINTER_EXCEPTION|0) ) return NULL; } res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_p_prelude_string_t, 0 | 0 ); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "idmef_node_new_ident" "', argument " "2"" of type '" "prelude_string_t **""'"); } arg2 = (prelude_string_t **)(argp2); { Py_BEGIN_ALLOW_THREADS result = (int)idmef_node_new_ident(arg1,arg2); Py_END_ALLOW_THREADS } { if ( result < 0 ) { swig_python_raise_exception(result); resultobj = NULL; } else { resultobj = PyInt_FromLong(result); } } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_node_get_category(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_node_t *arg1 = (idmef_node_t *) 0 ; PyObject * obj0 = 0 ; idmef_node_category_t result; if (!PyArg_ParseTuple(args,(char *)"O:idmef_node_get_category",&obj0)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_node, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { Py_BEGIN_ALLOW_THREADS result = (idmef_node_category_t)idmef_node_get_category(arg1); Py_END_ALLOW_THREADS } resultobj = SWIG_From_int((int)(result)); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_node_set_category(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_node_t *arg1 = (idmef_node_t *) 0 ; idmef_node_category_t arg2 ; int val2 ; int ecode2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:idmef_node_set_category",&obj0,&obj1)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_node, SWIG_POINTER_EXCEPTION|0) ) return NULL; } ecode2 = SWIG_AsVal_int(obj1, &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "idmef_node_set_category" "', argument " "2"" of type '" "idmef_node_category_t""'"); } arg2 = (idmef_node_category_t)(val2); { Py_BEGIN_ALLOW_THREADS idmef_node_set_category(arg1,arg2); Py_END_ALLOW_THREADS } resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_node_new_category(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_node_t *arg1 = (idmef_node_t *) 0 ; idmef_node_category_t **arg2 = (idmef_node_category_t **) 0 ; void *argp2 = 0 ; int res2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; int result; if (!PyArg_ParseTuple(args,(char *)"OO:idmef_node_new_category",&obj0,&obj1)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_node, SWIG_POINTER_EXCEPTION|0) ) return NULL; } res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_p_idmef_node_category_t, 0 | 0 ); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "idmef_node_new_category" "', argument " "2"" of type '" "idmef_node_category_t **""'"); } arg2 = (idmef_node_category_t **)(argp2); { Py_BEGIN_ALLOW_THREADS result = (int)idmef_node_new_category(arg1,arg2); Py_END_ALLOW_THREADS } { if ( result < 0 ) { swig_python_raise_exception(result); resultobj = NULL; } else { resultobj = PyInt_FromLong(result); } } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_node_get_location(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_node_t *arg1 = (idmef_node_t *) 0 ; PyObject * obj0 = 0 ; prelude_string_t *result = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:idmef_node_get_location",&obj0)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_node, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { Py_BEGIN_ALLOW_THREADS result = (prelude_string_t *)idmef_node_get_location(arg1); Py_END_ALLOW_THREADS } { resultobj = swig_python_string(result); } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_node_set_location(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_node_t *arg1 = (idmef_node_t *) 0 ; prelude_string_t *arg2 = (prelude_string_t *) 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:idmef_node_set_location",&obj0,&obj1)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_node, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { int ret; ret = prelude_string_new_dup_fast(&(arg2), PyString_AsString(obj1), PyString_Size(obj1)); if ( ret < 0 ) { swig_python_raise_exception(ret); return NULL; } } { Py_BEGIN_ALLOW_THREADS idmef_node_set_location(arg1,arg2); Py_END_ALLOW_THREADS } resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_node_new_location(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_node_t *arg1 = (idmef_node_t *) 0 ; prelude_string_t **arg2 = (prelude_string_t **) 0 ; void *argp2 = 0 ; int res2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; int result; if (!PyArg_ParseTuple(args,(char *)"OO:idmef_node_new_location",&obj0,&obj1)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_node, SWIG_POINTER_EXCEPTION|0) ) return NULL; } res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_p_prelude_string_t, 0 | 0 ); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "idmef_node_new_location" "', argument " "2"" of type '" "prelude_string_t **""'"); } arg2 = (prelude_string_t **)(argp2); { Py_BEGIN_ALLOW_THREADS result = (int)idmef_node_new_location(arg1,arg2); Py_END_ALLOW_THREADS } { if ( result < 0 ) { swig_python_raise_exception(result); resultobj = NULL; } else { resultobj = PyInt_FromLong(result); } } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_node_get_name(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_node_t *arg1 = (idmef_node_t *) 0 ; PyObject * obj0 = 0 ; prelude_string_t *result = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:idmef_node_get_name",&obj0)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_node, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { Py_BEGIN_ALLOW_THREADS result = (prelude_string_t *)idmef_node_get_name(arg1); Py_END_ALLOW_THREADS } { resultobj = swig_python_string(result); } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_node_set_name(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_node_t *arg1 = (idmef_node_t *) 0 ; prelude_string_t *arg2 = (prelude_string_t *) 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:idmef_node_set_name",&obj0,&obj1)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_node, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { int ret; ret = prelude_string_new_dup_fast(&(arg2), PyString_AsString(obj1), PyString_Size(obj1)); if ( ret < 0 ) { swig_python_raise_exception(ret); return NULL; } } { Py_BEGIN_ALLOW_THREADS idmef_node_set_name(arg1,arg2); Py_END_ALLOW_THREADS } resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_node_new_name(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_node_t *arg1 = (idmef_node_t *) 0 ; prelude_string_t **arg2 = (prelude_string_t **) 0 ; void *argp2 = 0 ; int res2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; int result; if (!PyArg_ParseTuple(args,(char *)"OO:idmef_node_new_name",&obj0,&obj1)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_node, SWIG_POINTER_EXCEPTION|0) ) return NULL; } res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_p_prelude_string_t, 0 | 0 ); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "idmef_node_new_name" "', argument " "2"" of type '" "prelude_string_t **""'"); } arg2 = (prelude_string_t **)(argp2); { Py_BEGIN_ALLOW_THREADS result = (int)idmef_node_new_name(arg1,arg2); Py_END_ALLOW_THREADS } { if ( result < 0 ) { swig_python_raise_exception(result); resultobj = NULL; } else { resultobj = PyInt_FromLong(result); } } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_node_get_next_address(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_node_t *arg1 = (idmef_node_t *) 0 ; idmef_address_t *arg2 = (idmef_address_t *) 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; idmef_address_t *result = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:idmef_node_get_next_address",&obj0,&obj1)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_node, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { if ( obj1 == Py_None ) { arg2 = NULL; } else { if ( SWIG_ConvertPtr(obj1, (void **)&arg2, SWIGTYPE_p_idmef_address, SWIG_POINTER_EXCEPTION|0) ) return NULL; } } { Py_BEGIN_ALLOW_THREADS result = (idmef_address_t *)idmef_node_get_next_address(arg1,arg2); Py_END_ALLOW_THREADS } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_idmef_address, 0 | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_node_set_address(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_node_t *arg1 = (idmef_node_t *) 0 ; idmef_address_t *arg2 = (idmef_address_t *) 0 ; int arg3 ; int val3 ; int ecode3 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; PyObject * obj2 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OOO:idmef_node_set_address",&obj0,&obj1,&obj2)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_node, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { if ( obj1 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj1, (void **)&arg2, SWIGTYPE_p_idmef_address, SWIG_POINTER_EXCEPTION|0) ) return NULL; } ecode3 = SWIG_AsVal_int(obj2, &val3); if (!SWIG_IsOK(ecode3)) { SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "idmef_node_set_address" "', argument " "3"" of type '" "int""'"); } arg3 = (int)(val3); { Py_BEGIN_ALLOW_THREADS idmef_node_set_address(arg1,arg2,arg3); Py_END_ALLOW_THREADS } resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_node_new_address(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_node_t *arg1 = (idmef_node_t *) 0 ; idmef_address_t **arg2 = (idmef_address_t **) 0 ; int arg3 ; idmef_address_t *tmp2 ; int val3 ; int ecode3 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; int result; { arg2 = (idmef_address_t **) &tmp2; } if (!PyArg_ParseTuple(args,(char *)"OO:idmef_node_new_address",&obj0,&obj1)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_node, SWIG_POINTER_EXCEPTION|0) ) return NULL; } ecode3 = SWIG_AsVal_int(obj1, &val3); if (!SWIG_IsOK(ecode3)) { SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "idmef_node_new_address" "', argument " "3"" of type '" "int""'"); } arg3 = (int)(val3); { Py_BEGIN_ALLOW_THREADS result = (int)idmef_node_new_address(arg1,arg2,arg3); Py_END_ALLOW_THREADS } { if ( result < 0 ) { swig_python_raise_exception(result); resultobj = NULL; } else { resultobj = PyInt_FromLong(result); } } { if ( result >= 0 ) resultobj = SWIG_NewPointerObj((void *) * arg2, SWIGTYPE_p_idmef_address, 0); } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_source_spoofed_to_numeric(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; char *arg1 = (char *) 0 ; PyObject * obj0 = 0 ; idmef_source_spoofed_t result; if (!PyArg_ParseTuple(args,(char *)"O:idmef_source_spoofed_to_numeric",&obj0)) SWIG_fail; { if ( obj0 == Py_None ) arg1 = NULL; else if ( PyString_Check(obj0) ) arg1 = PyString_AsString(obj0); else { PyErr_Format(PyExc_TypeError, "expected None or string, %s found", obj0->ob_type->tp_name); return NULL; } } { Py_BEGIN_ALLOW_THREADS result = (idmef_source_spoofed_t)idmef_source_spoofed_to_numeric((char const *)arg1); Py_END_ALLOW_THREADS } resultobj = SWIG_From_int((int)(result)); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_source_spoofed_to_string(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_source_spoofed_t arg1 ; int val1 ; int ecode1 = 0 ; PyObject * obj0 = 0 ; char *result = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:idmef_source_spoofed_to_string",&obj0)) SWIG_fail; ecode1 = SWIG_AsVal_int(obj0, &val1); if (!SWIG_IsOK(ecode1)) { SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "idmef_source_spoofed_to_string" "', argument " "1"" of type '" "idmef_source_spoofed_t""'"); } arg1 = (idmef_source_spoofed_t)(val1); { Py_BEGIN_ALLOW_THREADS result = (char *)idmef_source_spoofed_to_string(arg1); Py_END_ALLOW_THREADS } resultobj = SWIG_FromCharPtr((const char *)result); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_source_new(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_source_t **arg1 = (idmef_source_t **) 0 ; idmef_source_t *tmp1 ; int result; { arg1 = (idmef_source_t **) &tmp1; } if (!PyArg_ParseTuple(args,(char *)":idmef_source_new")) SWIG_fail; { Py_BEGIN_ALLOW_THREADS result = (int)idmef_source_new(arg1); Py_END_ALLOW_THREADS } { if ( result < 0 ) { swig_python_raise_exception(result); resultobj = NULL; } else { resultobj = PyInt_FromLong(result); } } { if ( result >= 0 ) resultobj = SWIG_NewPointerObj((void *) * arg1, SWIGTYPE_p_idmef_source, 0); } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_source_copy(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_source_t *arg1 = (idmef_source_t *) 0 ; idmef_source_t *arg2 = (idmef_source_t *) 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; int result; if (!PyArg_ParseTuple(args,(char *)"OO:idmef_source_copy",&obj0,&obj1)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_source, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { if ( obj1 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj1, (void **)&arg2, SWIGTYPE_p_idmef_source, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { Py_BEGIN_ALLOW_THREADS result = (int)idmef_source_copy((struct idmef_source const *)arg1,arg2); Py_END_ALLOW_THREADS } { if ( result < 0 ) { swig_python_raise_exception(result); resultobj = NULL; } else { resultobj = PyInt_FromLong(result); } } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_source_clone(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_source_t *arg1 = (idmef_source_t *) 0 ; idmef_source_t **arg2 = (idmef_source_t **) 0 ; idmef_source_t *tmp2 ; PyObject * obj0 = 0 ; int result; { arg2 = (idmef_source_t **) &tmp2; } if (!PyArg_ParseTuple(args,(char *)"O:idmef_source_clone",&obj0)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_source, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { Py_BEGIN_ALLOW_THREADS result = (int)idmef_source_clone(arg1,arg2); Py_END_ALLOW_THREADS } { if ( result < 0 ) { swig_python_raise_exception(result); resultobj = NULL; } else { resultobj = PyInt_FromLong(result); } } { if ( result >= 0 ) resultobj = SWIG_NewPointerObj((void *) * arg2, SWIGTYPE_p_idmef_source, 0); } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_source_compare(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_source_t *arg1 = (idmef_source_t *) 0 ; idmef_source_t *arg2 = (idmef_source_t *) 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; int result; if (!PyArg_ParseTuple(args,(char *)"OO:idmef_source_compare",&obj0,&obj1)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_source, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { if ( obj1 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj1, (void **)&arg2, SWIGTYPE_p_idmef_source, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { Py_BEGIN_ALLOW_THREADS result = (int)idmef_source_compare((struct idmef_source const *)arg1,(struct idmef_source const *)arg2); Py_END_ALLOW_THREADS } { resultobj = PyInt_FromLong(result); } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_source_ref(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_source_t *arg1 = (idmef_source_t *) 0 ; PyObject * obj0 = 0 ; idmef_source_t *result = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:idmef_source_ref",&obj0)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_source, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { Py_BEGIN_ALLOW_THREADS result = (idmef_source_t *)idmef_source_ref(arg1); Py_END_ALLOW_THREADS } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_idmef_source, 0 | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_source_destroy(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_source_t *arg1 = (idmef_source_t *) 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:idmef_source_destroy",&obj0)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_source, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { Py_BEGIN_ALLOW_THREADS idmef_source_destroy(arg1); Py_END_ALLOW_THREADS } resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_source_get_ident(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_source_t *arg1 = (idmef_source_t *) 0 ; PyObject * obj0 = 0 ; prelude_string_t *result = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:idmef_source_get_ident",&obj0)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_source, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { Py_BEGIN_ALLOW_THREADS result = (prelude_string_t *)idmef_source_get_ident(arg1); Py_END_ALLOW_THREADS } { resultobj = swig_python_string(result); } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_source_set_ident(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_source_t *arg1 = (idmef_source_t *) 0 ; prelude_string_t *arg2 = (prelude_string_t *) 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:idmef_source_set_ident",&obj0,&obj1)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_source, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { int ret; ret = prelude_string_new_dup_fast(&(arg2), PyString_AsString(obj1), PyString_Size(obj1)); if ( ret < 0 ) { swig_python_raise_exception(ret); return NULL; } } { Py_BEGIN_ALLOW_THREADS idmef_source_set_ident(arg1,arg2); Py_END_ALLOW_THREADS } resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_source_new_ident(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_source_t *arg1 = (idmef_source_t *) 0 ; prelude_string_t **arg2 = (prelude_string_t **) 0 ; void *argp2 = 0 ; int res2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; int result; if (!PyArg_ParseTuple(args,(char *)"OO:idmef_source_new_ident",&obj0,&obj1)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_source, SWIG_POINTER_EXCEPTION|0) ) return NULL; } res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_p_prelude_string_t, 0 | 0 ); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "idmef_source_new_ident" "', argument " "2"" of type '" "prelude_string_t **""'"); } arg2 = (prelude_string_t **)(argp2); { Py_BEGIN_ALLOW_THREADS result = (int)idmef_source_new_ident(arg1,arg2); Py_END_ALLOW_THREADS } { if ( result < 0 ) { swig_python_raise_exception(result); resultobj = NULL; } else { resultobj = PyInt_FromLong(result); } } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_source_get_spoofed(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_source_t *arg1 = (idmef_source_t *) 0 ; PyObject * obj0 = 0 ; idmef_source_spoofed_t result; if (!PyArg_ParseTuple(args,(char *)"O:idmef_source_get_spoofed",&obj0)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_source, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { Py_BEGIN_ALLOW_THREADS result = (idmef_source_spoofed_t)idmef_source_get_spoofed(arg1); Py_END_ALLOW_THREADS } resultobj = SWIG_From_int((int)(result)); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_source_set_spoofed(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_source_t *arg1 = (idmef_source_t *) 0 ; idmef_source_spoofed_t arg2 ; int val2 ; int ecode2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:idmef_source_set_spoofed",&obj0,&obj1)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_source, SWIG_POINTER_EXCEPTION|0) ) return NULL; } ecode2 = SWIG_AsVal_int(obj1, &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "idmef_source_set_spoofed" "', argument " "2"" of type '" "idmef_source_spoofed_t""'"); } arg2 = (idmef_source_spoofed_t)(val2); { Py_BEGIN_ALLOW_THREADS idmef_source_set_spoofed(arg1,arg2); Py_END_ALLOW_THREADS } resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_source_new_spoofed(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_source_t *arg1 = (idmef_source_t *) 0 ; idmef_source_spoofed_t **arg2 = (idmef_source_spoofed_t **) 0 ; void *argp2 = 0 ; int res2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; int result; if (!PyArg_ParseTuple(args,(char *)"OO:idmef_source_new_spoofed",&obj0,&obj1)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_source, SWIG_POINTER_EXCEPTION|0) ) return NULL; } res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_p_idmef_source_spoofed_t, 0 | 0 ); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "idmef_source_new_spoofed" "', argument " "2"" of type '" "idmef_source_spoofed_t **""'"); } arg2 = (idmef_source_spoofed_t **)(argp2); { Py_BEGIN_ALLOW_THREADS result = (int)idmef_source_new_spoofed(arg1,arg2); Py_END_ALLOW_THREADS } { if ( result < 0 ) { swig_python_raise_exception(result); resultobj = NULL; } else { resultobj = PyInt_FromLong(result); } } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_source_get_interface(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_source_t *arg1 = (idmef_source_t *) 0 ; PyObject * obj0 = 0 ; prelude_string_t *result = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:idmef_source_get_interface",&obj0)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_source, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { Py_BEGIN_ALLOW_THREADS result = (prelude_string_t *)idmef_source_get_interface(arg1); Py_END_ALLOW_THREADS } { resultobj = swig_python_string(result); } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_source_set_interface(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_source_t *arg1 = (idmef_source_t *) 0 ; prelude_string_t *arg2 = (prelude_string_t *) 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:idmef_source_set_interface",&obj0,&obj1)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_source, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { int ret; ret = prelude_string_new_dup_fast(&(arg2), PyString_AsString(obj1), PyString_Size(obj1)); if ( ret < 0 ) { swig_python_raise_exception(ret); return NULL; } } { Py_BEGIN_ALLOW_THREADS idmef_source_set_interface(arg1,arg2); Py_END_ALLOW_THREADS } resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_source_new_interface(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_source_t *arg1 = (idmef_source_t *) 0 ; prelude_string_t **arg2 = (prelude_string_t **) 0 ; void *argp2 = 0 ; int res2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; int result; if (!PyArg_ParseTuple(args,(char *)"OO:idmef_source_new_interface",&obj0,&obj1)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_source, SWIG_POINTER_EXCEPTION|0) ) return NULL; } res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_p_prelude_string_t, 0 | 0 ); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "idmef_source_new_interface" "', argument " "2"" of type '" "prelude_string_t **""'"); } arg2 = (prelude_string_t **)(argp2); { Py_BEGIN_ALLOW_THREADS result = (int)idmef_source_new_interface(arg1,arg2); Py_END_ALLOW_THREADS } { if ( result < 0 ) { swig_python_raise_exception(result); resultobj = NULL; } else { resultobj = PyInt_FromLong(result); } } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_source_get_node(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_source_t *arg1 = (idmef_source_t *) 0 ; PyObject * obj0 = 0 ; idmef_node_t *result = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:idmef_source_get_node",&obj0)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_source, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { Py_BEGIN_ALLOW_THREADS result = (idmef_node_t *)idmef_source_get_node(arg1); Py_END_ALLOW_THREADS } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_idmef_node, 0 | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_source_set_node(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_source_t *arg1 = (idmef_source_t *) 0 ; idmef_node_t *arg2 = (idmef_node_t *) 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:idmef_source_set_node",&obj0,&obj1)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_source, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { if ( obj1 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj1, (void **)&arg2, SWIGTYPE_p_idmef_node, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { Py_BEGIN_ALLOW_THREADS idmef_source_set_node(arg1,arg2); Py_END_ALLOW_THREADS } resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_source_new_node(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_source_t *arg1 = (idmef_source_t *) 0 ; idmef_node_t **arg2 = (idmef_node_t **) 0 ; idmef_node_t *tmp2 ; PyObject * obj0 = 0 ; int result; { arg2 = (idmef_node_t **) &tmp2; } if (!PyArg_ParseTuple(args,(char *)"O:idmef_source_new_node",&obj0)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_source, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { Py_BEGIN_ALLOW_THREADS result = (int)idmef_source_new_node(arg1,arg2); Py_END_ALLOW_THREADS } { if ( result < 0 ) { swig_python_raise_exception(result); resultobj = NULL; } else { resultobj = PyInt_FromLong(result); } } { if ( result >= 0 ) resultobj = SWIG_NewPointerObj((void *) * arg2, SWIGTYPE_p_idmef_node, 0); } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_source_get_user(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_source_t *arg1 = (idmef_source_t *) 0 ; PyObject * obj0 = 0 ; idmef_user_t *result = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:idmef_source_get_user",&obj0)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_source, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { Py_BEGIN_ALLOW_THREADS result = (idmef_user_t *)idmef_source_get_user(arg1); Py_END_ALLOW_THREADS } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_idmef_user, 0 | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_source_set_user(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_source_t *arg1 = (idmef_source_t *) 0 ; idmef_user_t *arg2 = (idmef_user_t *) 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:idmef_source_set_user",&obj0,&obj1)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_source, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { if ( obj1 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj1, (void **)&arg2, SWIGTYPE_p_idmef_user, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { Py_BEGIN_ALLOW_THREADS idmef_source_set_user(arg1,arg2); Py_END_ALLOW_THREADS } resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_source_new_user(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_source_t *arg1 = (idmef_source_t *) 0 ; idmef_user_t **arg2 = (idmef_user_t **) 0 ; idmef_user_t *tmp2 ; PyObject * obj0 = 0 ; int result; { arg2 = (idmef_user_t **) &tmp2; } if (!PyArg_ParseTuple(args,(char *)"O:idmef_source_new_user",&obj0)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_source, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { Py_BEGIN_ALLOW_THREADS result = (int)idmef_source_new_user(arg1,arg2); Py_END_ALLOW_THREADS } { if ( result < 0 ) { swig_python_raise_exception(result); resultobj = NULL; } else { resultobj = PyInt_FromLong(result); } } { if ( result >= 0 ) resultobj = SWIG_NewPointerObj((void *) * arg2, SWIGTYPE_p_idmef_user, 0); } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_source_get_process(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_source_t *arg1 = (idmef_source_t *) 0 ; PyObject * obj0 = 0 ; idmef_process_t *result = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:idmef_source_get_process",&obj0)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_source, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { Py_BEGIN_ALLOW_THREADS result = (idmef_process_t *)idmef_source_get_process(arg1); Py_END_ALLOW_THREADS } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_idmef_process, 0 | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_source_set_process(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_source_t *arg1 = (idmef_source_t *) 0 ; idmef_process_t *arg2 = (idmef_process_t *) 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:idmef_source_set_process",&obj0,&obj1)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_source, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { if ( obj1 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj1, (void **)&arg2, SWIGTYPE_p_idmef_process, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { Py_BEGIN_ALLOW_THREADS idmef_source_set_process(arg1,arg2); Py_END_ALLOW_THREADS } resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_source_new_process(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_source_t *arg1 = (idmef_source_t *) 0 ; idmef_process_t **arg2 = (idmef_process_t **) 0 ; idmef_process_t *tmp2 ; PyObject * obj0 = 0 ; int result; { arg2 = (idmef_process_t **) &tmp2; } if (!PyArg_ParseTuple(args,(char *)"O:idmef_source_new_process",&obj0)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_source, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { Py_BEGIN_ALLOW_THREADS result = (int)idmef_source_new_process(arg1,arg2); Py_END_ALLOW_THREADS } { if ( result < 0 ) { swig_python_raise_exception(result); resultobj = NULL; } else { resultobj = PyInt_FromLong(result); } } { if ( result >= 0 ) resultobj = SWIG_NewPointerObj((void *) * arg2, SWIGTYPE_p_idmef_process, 0); } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_source_get_service(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_source_t *arg1 = (idmef_source_t *) 0 ; PyObject * obj0 = 0 ; idmef_service_t *result = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:idmef_source_get_service",&obj0)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_source, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { Py_BEGIN_ALLOW_THREADS result = (idmef_service_t *)idmef_source_get_service(arg1); Py_END_ALLOW_THREADS } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_idmef_service, 0 | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_source_set_service(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_source_t *arg1 = (idmef_source_t *) 0 ; idmef_service_t *arg2 = (idmef_service_t *) 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:idmef_source_set_service",&obj0,&obj1)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_source, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { if ( obj1 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj1, (void **)&arg2, SWIGTYPE_p_idmef_service, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { Py_BEGIN_ALLOW_THREADS idmef_source_set_service(arg1,arg2); Py_END_ALLOW_THREADS } resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_source_new_service(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_source_t *arg1 = (idmef_source_t *) 0 ; idmef_service_t **arg2 = (idmef_service_t **) 0 ; idmef_service_t *tmp2 ; PyObject * obj0 = 0 ; int result; { arg2 = (idmef_service_t **) &tmp2; } if (!PyArg_ParseTuple(args,(char *)"O:idmef_source_new_service",&obj0)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_source, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { Py_BEGIN_ALLOW_THREADS result = (int)idmef_source_new_service(arg1,arg2); Py_END_ALLOW_THREADS } { if ( result < 0 ) { swig_python_raise_exception(result); resultobj = NULL; } else { resultobj = PyInt_FromLong(result); } } { if ( result >= 0 ) resultobj = SWIG_NewPointerObj((void *) * arg2, SWIGTYPE_p_idmef_service, 0); } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_file_access_new(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_file_access_t **arg1 = (idmef_file_access_t **) 0 ; idmef_file_access_t *tmp1 ; int result; { arg1 = (idmef_file_access_t **) &tmp1; } if (!PyArg_ParseTuple(args,(char *)":idmef_file_access_new")) SWIG_fail; { Py_BEGIN_ALLOW_THREADS result = (int)idmef_file_access_new(arg1); Py_END_ALLOW_THREADS } { if ( result < 0 ) { swig_python_raise_exception(result); resultobj = NULL; } else { resultobj = PyInt_FromLong(result); } } { if ( result >= 0 ) resultobj = SWIG_NewPointerObj((void *) * arg1, SWIGTYPE_p_idmef_file_access, 0); } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_file_access_copy(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_file_access_t *arg1 = (idmef_file_access_t *) 0 ; idmef_file_access_t *arg2 = (idmef_file_access_t *) 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; int result; if (!PyArg_ParseTuple(args,(char *)"OO:idmef_file_access_copy",&obj0,&obj1)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_file_access, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { if ( obj1 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj1, (void **)&arg2, SWIGTYPE_p_idmef_file_access, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { Py_BEGIN_ALLOW_THREADS result = (int)idmef_file_access_copy((struct idmef_file_access const *)arg1,arg2); Py_END_ALLOW_THREADS } { if ( result < 0 ) { swig_python_raise_exception(result); resultobj = NULL; } else { resultobj = PyInt_FromLong(result); } } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_file_access_clone(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_file_access_t *arg1 = (idmef_file_access_t *) 0 ; idmef_file_access_t **arg2 = (idmef_file_access_t **) 0 ; idmef_file_access_t *tmp2 ; PyObject * obj0 = 0 ; int result; { arg2 = (idmef_file_access_t **) &tmp2; } if (!PyArg_ParseTuple(args,(char *)"O:idmef_file_access_clone",&obj0)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_file_access, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { Py_BEGIN_ALLOW_THREADS result = (int)idmef_file_access_clone(arg1,arg2); Py_END_ALLOW_THREADS } { if ( result < 0 ) { swig_python_raise_exception(result); resultobj = NULL; } else { resultobj = PyInt_FromLong(result); } } { if ( result >= 0 ) resultobj = SWIG_NewPointerObj((void *) * arg2, SWIGTYPE_p_idmef_file_access, 0); } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_file_access_compare(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_file_access_t *arg1 = (idmef_file_access_t *) 0 ; idmef_file_access_t *arg2 = (idmef_file_access_t *) 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; int result; if (!PyArg_ParseTuple(args,(char *)"OO:idmef_file_access_compare",&obj0,&obj1)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_file_access, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { if ( obj1 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj1, (void **)&arg2, SWIGTYPE_p_idmef_file_access, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { Py_BEGIN_ALLOW_THREADS result = (int)idmef_file_access_compare((struct idmef_file_access const *)arg1,(struct idmef_file_access const *)arg2); Py_END_ALLOW_THREADS } { resultobj = PyInt_FromLong(result); } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_file_access_ref(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_file_access_t *arg1 = (idmef_file_access_t *) 0 ; PyObject * obj0 = 0 ; idmef_file_access_t *result = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:idmef_file_access_ref",&obj0)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_file_access, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { Py_BEGIN_ALLOW_THREADS result = (idmef_file_access_t *)idmef_file_access_ref(arg1); Py_END_ALLOW_THREADS } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_idmef_file_access, 0 | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_file_access_destroy(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_file_access_t *arg1 = (idmef_file_access_t *) 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:idmef_file_access_destroy",&obj0)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_file_access, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { Py_BEGIN_ALLOW_THREADS idmef_file_access_destroy(arg1); Py_END_ALLOW_THREADS } resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_file_access_get_user_id(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_file_access_t *arg1 = (idmef_file_access_t *) 0 ; PyObject * obj0 = 0 ; idmef_user_id_t *result = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:idmef_file_access_get_user_id",&obj0)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_file_access, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { Py_BEGIN_ALLOW_THREADS result = (idmef_user_id_t *)idmef_file_access_get_user_id(arg1); Py_END_ALLOW_THREADS } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_idmef_user_id, 0 | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_file_access_set_user_id(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_file_access_t *arg1 = (idmef_file_access_t *) 0 ; idmef_user_id_t *arg2 = (idmef_user_id_t *) 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:idmef_file_access_set_user_id",&obj0,&obj1)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_file_access, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { if ( obj1 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj1, (void **)&arg2, SWIGTYPE_p_idmef_user_id, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { Py_BEGIN_ALLOW_THREADS idmef_file_access_set_user_id(arg1,arg2); Py_END_ALLOW_THREADS } resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_file_access_new_user_id(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_file_access_t *arg1 = (idmef_file_access_t *) 0 ; idmef_user_id_t **arg2 = (idmef_user_id_t **) 0 ; idmef_user_id_t *tmp2 ; PyObject * obj0 = 0 ; int result; { arg2 = (idmef_user_id_t **) &tmp2; } if (!PyArg_ParseTuple(args,(char *)"O:idmef_file_access_new_user_id",&obj0)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_file_access, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { Py_BEGIN_ALLOW_THREADS result = (int)idmef_file_access_new_user_id(arg1,arg2); Py_END_ALLOW_THREADS } { if ( result < 0 ) { swig_python_raise_exception(result); resultobj = NULL; } else { resultobj = PyInt_FromLong(result); } } { if ( result >= 0 ) resultobj = SWIG_NewPointerObj((void *) * arg2, SWIGTYPE_p_idmef_user_id, 0); } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_file_access_get_next_permission(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_file_access_t *arg1 = (idmef_file_access_t *) 0 ; prelude_string_t *arg2 = (prelude_string_t *) 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; prelude_string_t *result = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:idmef_file_access_get_next_permission",&obj0,&obj1)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_file_access, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { if ( obj1 == Py_None ) { arg2 = NULL; } else { if ( SWIG_ConvertPtr(obj1, (void **)&arg2, SWIGTYPE_p_prelude_string_t, SWIG_POINTER_EXCEPTION|0) ) return NULL; } } { Py_BEGIN_ALLOW_THREADS result = (prelude_string_t *)idmef_file_access_get_next_permission(arg1,arg2); Py_END_ALLOW_THREADS } { resultobj = swig_python_string(result); } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_file_access_set_permission(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_file_access_t *arg1 = (idmef_file_access_t *) 0 ; prelude_string_t *arg2 = (prelude_string_t *) 0 ; int arg3 ; int val3 ; int ecode3 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; PyObject * obj2 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OOO:idmef_file_access_set_permission",&obj0,&obj1,&obj2)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_file_access, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { int ret; ret = prelude_string_new_dup_fast(&(arg2), PyString_AsString(obj1), PyString_Size(obj1)); if ( ret < 0 ) { swig_python_raise_exception(ret); return NULL; } } ecode3 = SWIG_AsVal_int(obj2, &val3); if (!SWIG_IsOK(ecode3)) { SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "idmef_file_access_set_permission" "', argument " "3"" of type '" "int""'"); } arg3 = (int)(val3); { Py_BEGIN_ALLOW_THREADS idmef_file_access_set_permission(arg1,arg2,arg3); Py_END_ALLOW_THREADS } resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_file_access_new_permission(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_file_access_t *arg1 = (idmef_file_access_t *) 0 ; prelude_string_t **arg2 = (prelude_string_t **) 0 ; int arg3 ; void *argp2 = 0 ; int res2 = 0 ; int val3 ; int ecode3 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; PyObject * obj2 = 0 ; int result; if (!PyArg_ParseTuple(args,(char *)"OOO:idmef_file_access_new_permission",&obj0,&obj1,&obj2)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_file_access, SWIG_POINTER_EXCEPTION|0) ) return NULL; } res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_p_prelude_string_t, 0 | 0 ); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "idmef_file_access_new_permission" "', argument " "2"" of type '" "prelude_string_t **""'"); } arg2 = (prelude_string_t **)(argp2); ecode3 = SWIG_AsVal_int(obj2, &val3); if (!SWIG_IsOK(ecode3)) { SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "idmef_file_access_new_permission" "', argument " "3"" of type '" "int""'"); } arg3 = (int)(val3); { Py_BEGIN_ALLOW_THREADS result = (int)idmef_file_access_new_permission(arg1,arg2,arg3); Py_END_ALLOW_THREADS } { if ( result < 0 ) { swig_python_raise_exception(result); resultobj = NULL; } else { resultobj = PyInt_FromLong(result); } } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_inode_new(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_inode_t **arg1 = (idmef_inode_t **) 0 ; idmef_inode_t *tmp1 ; int result; { arg1 = (idmef_inode_t **) &tmp1; } if (!PyArg_ParseTuple(args,(char *)":idmef_inode_new")) SWIG_fail; { Py_BEGIN_ALLOW_THREADS result = (int)idmef_inode_new(arg1); Py_END_ALLOW_THREADS } { if ( result < 0 ) { swig_python_raise_exception(result); resultobj = NULL; } else { resultobj = PyInt_FromLong(result); } } { if ( result >= 0 ) resultobj = SWIG_NewPointerObj((void *) * arg1, SWIGTYPE_p_idmef_inode, 0); } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_inode_copy(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_inode_t *arg1 = (idmef_inode_t *) 0 ; idmef_inode_t *arg2 = (idmef_inode_t *) 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; int result; if (!PyArg_ParseTuple(args,(char *)"OO:idmef_inode_copy",&obj0,&obj1)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_inode, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { if ( obj1 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj1, (void **)&arg2, SWIGTYPE_p_idmef_inode, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { Py_BEGIN_ALLOW_THREADS result = (int)idmef_inode_copy((struct idmef_inode const *)arg1,arg2); Py_END_ALLOW_THREADS } { if ( result < 0 ) { swig_python_raise_exception(result); resultobj = NULL; } else { resultobj = PyInt_FromLong(result); } } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_inode_clone(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_inode_t *arg1 = (idmef_inode_t *) 0 ; idmef_inode_t **arg2 = (idmef_inode_t **) 0 ; idmef_inode_t *tmp2 ; PyObject * obj0 = 0 ; int result; { arg2 = (idmef_inode_t **) &tmp2; } if (!PyArg_ParseTuple(args,(char *)"O:idmef_inode_clone",&obj0)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_inode, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { Py_BEGIN_ALLOW_THREADS result = (int)idmef_inode_clone(arg1,arg2); Py_END_ALLOW_THREADS } { if ( result < 0 ) { swig_python_raise_exception(result); resultobj = NULL; } else { resultobj = PyInt_FromLong(result); } } { if ( result >= 0 ) resultobj = SWIG_NewPointerObj((void *) * arg2, SWIGTYPE_p_idmef_inode, 0); } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_inode_compare(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_inode_t *arg1 = (idmef_inode_t *) 0 ; idmef_inode_t *arg2 = (idmef_inode_t *) 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; int result; if (!PyArg_ParseTuple(args,(char *)"OO:idmef_inode_compare",&obj0,&obj1)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_inode, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { if ( obj1 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj1, (void **)&arg2, SWIGTYPE_p_idmef_inode, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { Py_BEGIN_ALLOW_THREADS result = (int)idmef_inode_compare((struct idmef_inode const *)arg1,(struct idmef_inode const *)arg2); Py_END_ALLOW_THREADS } { resultobj = PyInt_FromLong(result); } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_inode_ref(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_inode_t *arg1 = (idmef_inode_t *) 0 ; PyObject * obj0 = 0 ; idmef_inode_t *result = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:idmef_inode_ref",&obj0)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_inode, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { Py_BEGIN_ALLOW_THREADS result = (idmef_inode_t *)idmef_inode_ref(arg1); Py_END_ALLOW_THREADS } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_idmef_inode, 0 | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_inode_destroy(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_inode_t *arg1 = (idmef_inode_t *) 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:idmef_inode_destroy",&obj0)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_inode, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { Py_BEGIN_ALLOW_THREADS idmef_inode_destroy(arg1); Py_END_ALLOW_THREADS } resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_inode_get_change_time(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_inode_t *arg1 = (idmef_inode_t *) 0 ; PyObject * obj0 = 0 ; idmef_time_t *result = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:idmef_inode_get_change_time",&obj0)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_inode, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { Py_BEGIN_ALLOW_THREADS result = (idmef_time_t *)idmef_inode_get_change_time(arg1); Py_END_ALLOW_THREADS } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_idmef_time, 0 | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_inode_set_change_time(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_inode_t *arg1 = (idmef_inode_t *) 0 ; idmef_time_t *arg2 = (idmef_time_t *) 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:idmef_inode_set_change_time",&obj0,&obj1)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_inode, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { if ( obj1 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj1, (void **)&arg2, SWIGTYPE_p_idmef_time, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { Py_BEGIN_ALLOW_THREADS idmef_inode_set_change_time(arg1,arg2); Py_END_ALLOW_THREADS } resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_inode_new_change_time(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_inode_t *arg1 = (idmef_inode_t *) 0 ; idmef_time_t **arg2 = (idmef_time_t **) 0 ; idmef_time_t *tmp2 ; PyObject * obj0 = 0 ; int result; { arg2 = (idmef_time_t **) &tmp2; } if (!PyArg_ParseTuple(args,(char *)"O:idmef_inode_new_change_time",&obj0)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_inode, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { Py_BEGIN_ALLOW_THREADS result = (int)idmef_inode_new_change_time(arg1,arg2); Py_END_ALLOW_THREADS } { if ( result < 0 ) { swig_python_raise_exception(result); resultobj = NULL; } else { resultobj = PyInt_FromLong(result); } } { if ( result >= 0 ) resultobj = SWIG_NewPointerObj((void *) * arg2, SWIGTYPE_p_idmef_time, 0); } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_inode_unset_number(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_inode_t *arg1 = (idmef_inode_t *) 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:idmef_inode_unset_number",&obj0)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_inode, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { Py_BEGIN_ALLOW_THREADS idmef_inode_unset_number(arg1); Py_END_ALLOW_THREADS } resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_inode_get_number(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_inode_t *arg1 = (idmef_inode_t *) 0 ; PyObject * obj0 = 0 ; uint32_t *result = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:idmef_inode_get_number",&obj0)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_inode, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { Py_BEGIN_ALLOW_THREADS result = (uint32_t *)idmef_inode_get_number(arg1); Py_END_ALLOW_THREADS } { if (result != NULL) { resultobj = PyLong_FromUnsignedLong(*result); } else { resultobj = Py_None; } } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_inode_set_number(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_inode_t *arg1 = (idmef_inode_t *) 0 ; uint32_t arg2 ; unsigned int val2 ; int ecode2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:idmef_inode_set_number",&obj0,&obj1)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_inode, SWIG_POINTER_EXCEPTION|0) ) return NULL; } ecode2 = SWIG_AsVal_unsigned_SS_int(obj1, &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "idmef_inode_set_number" "', argument " "2"" of type '" "uint32_t""'"); } arg2 = (uint32_t)(val2); { Py_BEGIN_ALLOW_THREADS idmef_inode_set_number(arg1,arg2); Py_END_ALLOW_THREADS } resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_inode_new_number(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_inode_t *arg1 = (idmef_inode_t *) 0 ; uint32_t **arg2 = (uint32_t **) 0 ; void *argp2 = 0 ; int res2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; int result; if (!PyArg_ParseTuple(args,(char *)"OO:idmef_inode_new_number",&obj0,&obj1)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_inode, SWIG_POINTER_EXCEPTION|0) ) return NULL; } res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_p_unsigned_int, 0 | 0 ); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "idmef_inode_new_number" "', argument " "2"" of type '" "uint32_t **""'"); } arg2 = (uint32_t **)(argp2); { Py_BEGIN_ALLOW_THREADS result = (int)idmef_inode_new_number(arg1,arg2); Py_END_ALLOW_THREADS } { if ( result < 0 ) { swig_python_raise_exception(result); resultobj = NULL; } else { resultobj = PyInt_FromLong(result); } } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_inode_unset_major_device(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_inode_t *arg1 = (idmef_inode_t *) 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:idmef_inode_unset_major_device",&obj0)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_inode, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { Py_BEGIN_ALLOW_THREADS idmef_inode_unset_major_device(arg1); Py_END_ALLOW_THREADS } resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_inode_get_major_device(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_inode_t *arg1 = (idmef_inode_t *) 0 ; PyObject * obj0 = 0 ; uint32_t *result = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:idmef_inode_get_major_device",&obj0)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_inode, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { Py_BEGIN_ALLOW_THREADS result = (uint32_t *)idmef_inode_get_major_device(arg1); Py_END_ALLOW_THREADS } { if (result != NULL) { resultobj = PyLong_FromUnsignedLong(*result); } else { resultobj = Py_None; } } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_inode_set_major_device(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_inode_t *arg1 = (idmef_inode_t *) 0 ; uint32_t arg2 ; unsigned int val2 ; int ecode2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:idmef_inode_set_major_device",&obj0,&obj1)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_inode, SWIG_POINTER_EXCEPTION|0) ) return NULL; } ecode2 = SWIG_AsVal_unsigned_SS_int(obj1, &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "idmef_inode_set_major_device" "', argument " "2"" of type '" "uint32_t""'"); } arg2 = (uint32_t)(val2); { Py_BEGIN_ALLOW_THREADS idmef_inode_set_major_device(arg1,arg2); Py_END_ALLOW_THREADS } resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_inode_new_major_device(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_inode_t *arg1 = (idmef_inode_t *) 0 ; uint32_t **arg2 = (uint32_t **) 0 ; void *argp2 = 0 ; int res2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; int result; if (!PyArg_ParseTuple(args,(char *)"OO:idmef_inode_new_major_device",&obj0,&obj1)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_inode, SWIG_POINTER_EXCEPTION|0) ) return NULL; } res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_p_unsigned_int, 0 | 0 ); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "idmef_inode_new_major_device" "', argument " "2"" of type '" "uint32_t **""'"); } arg2 = (uint32_t **)(argp2); { Py_BEGIN_ALLOW_THREADS result = (int)idmef_inode_new_major_device(arg1,arg2); Py_END_ALLOW_THREADS } { if ( result < 0 ) { swig_python_raise_exception(result); resultobj = NULL; } else { resultobj = PyInt_FromLong(result); } } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_inode_unset_minor_device(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_inode_t *arg1 = (idmef_inode_t *) 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:idmef_inode_unset_minor_device",&obj0)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_inode, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { Py_BEGIN_ALLOW_THREADS idmef_inode_unset_minor_device(arg1); Py_END_ALLOW_THREADS } resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_inode_get_minor_device(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_inode_t *arg1 = (idmef_inode_t *) 0 ; PyObject * obj0 = 0 ; uint32_t *result = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:idmef_inode_get_minor_device",&obj0)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_inode, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { Py_BEGIN_ALLOW_THREADS result = (uint32_t *)idmef_inode_get_minor_device(arg1); Py_END_ALLOW_THREADS } { if (result != NULL) { resultobj = PyLong_FromUnsignedLong(*result); } else { resultobj = Py_None; } } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_inode_set_minor_device(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_inode_t *arg1 = (idmef_inode_t *) 0 ; uint32_t arg2 ; unsigned int val2 ; int ecode2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:idmef_inode_set_minor_device",&obj0,&obj1)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_inode, SWIG_POINTER_EXCEPTION|0) ) return NULL; } ecode2 = SWIG_AsVal_unsigned_SS_int(obj1, &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "idmef_inode_set_minor_device" "', argument " "2"" of type '" "uint32_t""'"); } arg2 = (uint32_t)(val2); { Py_BEGIN_ALLOW_THREADS idmef_inode_set_minor_device(arg1,arg2); Py_END_ALLOW_THREADS } resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_inode_new_minor_device(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_inode_t *arg1 = (idmef_inode_t *) 0 ; uint32_t **arg2 = (uint32_t **) 0 ; void *argp2 = 0 ; int res2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; int result; if (!PyArg_ParseTuple(args,(char *)"OO:idmef_inode_new_minor_device",&obj0,&obj1)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_inode, SWIG_POINTER_EXCEPTION|0) ) return NULL; } res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_p_unsigned_int, 0 | 0 ); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "idmef_inode_new_minor_device" "', argument " "2"" of type '" "uint32_t **""'"); } arg2 = (uint32_t **)(argp2); { Py_BEGIN_ALLOW_THREADS result = (int)idmef_inode_new_minor_device(arg1,arg2); Py_END_ALLOW_THREADS } { if ( result < 0 ) { swig_python_raise_exception(result); resultobj = NULL; } else { resultobj = PyInt_FromLong(result); } } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_inode_unset_c_major_device(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_inode_t *arg1 = (idmef_inode_t *) 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:idmef_inode_unset_c_major_device",&obj0)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_inode, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { Py_BEGIN_ALLOW_THREADS idmef_inode_unset_c_major_device(arg1); Py_END_ALLOW_THREADS } resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_inode_get_c_major_device(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_inode_t *arg1 = (idmef_inode_t *) 0 ; PyObject * obj0 = 0 ; uint32_t *result = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:idmef_inode_get_c_major_device",&obj0)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_inode, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { Py_BEGIN_ALLOW_THREADS result = (uint32_t *)idmef_inode_get_c_major_device(arg1); Py_END_ALLOW_THREADS } { if (result != NULL) { resultobj = PyLong_FromUnsignedLong(*result); } else { resultobj = Py_None; } } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_inode_set_c_major_device(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_inode_t *arg1 = (idmef_inode_t *) 0 ; uint32_t arg2 ; unsigned int val2 ; int ecode2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:idmef_inode_set_c_major_device",&obj0,&obj1)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_inode, SWIG_POINTER_EXCEPTION|0) ) return NULL; } ecode2 = SWIG_AsVal_unsigned_SS_int(obj1, &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "idmef_inode_set_c_major_device" "', argument " "2"" of type '" "uint32_t""'"); } arg2 = (uint32_t)(val2); { Py_BEGIN_ALLOW_THREADS idmef_inode_set_c_major_device(arg1,arg2); Py_END_ALLOW_THREADS } resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_inode_new_c_major_device(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_inode_t *arg1 = (idmef_inode_t *) 0 ; uint32_t **arg2 = (uint32_t **) 0 ; void *argp2 = 0 ; int res2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; int result; if (!PyArg_ParseTuple(args,(char *)"OO:idmef_inode_new_c_major_device",&obj0,&obj1)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_inode, SWIG_POINTER_EXCEPTION|0) ) return NULL; } res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_p_unsigned_int, 0 | 0 ); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "idmef_inode_new_c_major_device" "', argument " "2"" of type '" "uint32_t **""'"); } arg2 = (uint32_t **)(argp2); { Py_BEGIN_ALLOW_THREADS result = (int)idmef_inode_new_c_major_device(arg1,arg2); Py_END_ALLOW_THREADS } { if ( result < 0 ) { swig_python_raise_exception(result); resultobj = NULL; } else { resultobj = PyInt_FromLong(result); } } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_inode_unset_c_minor_device(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_inode_t *arg1 = (idmef_inode_t *) 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:idmef_inode_unset_c_minor_device",&obj0)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_inode, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { Py_BEGIN_ALLOW_THREADS idmef_inode_unset_c_minor_device(arg1); Py_END_ALLOW_THREADS } resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_inode_get_c_minor_device(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_inode_t *arg1 = (idmef_inode_t *) 0 ; PyObject * obj0 = 0 ; uint32_t *result = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:idmef_inode_get_c_minor_device",&obj0)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_inode, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { Py_BEGIN_ALLOW_THREADS result = (uint32_t *)idmef_inode_get_c_minor_device(arg1); Py_END_ALLOW_THREADS } { if (result != NULL) { resultobj = PyLong_FromUnsignedLong(*result); } else { resultobj = Py_None; } } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_inode_set_c_minor_device(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_inode_t *arg1 = (idmef_inode_t *) 0 ; uint32_t arg2 ; unsigned int val2 ; int ecode2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:idmef_inode_set_c_minor_device",&obj0,&obj1)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_inode, SWIG_POINTER_EXCEPTION|0) ) return NULL; } ecode2 = SWIG_AsVal_unsigned_SS_int(obj1, &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "idmef_inode_set_c_minor_device" "', argument " "2"" of type '" "uint32_t""'"); } arg2 = (uint32_t)(val2); { Py_BEGIN_ALLOW_THREADS idmef_inode_set_c_minor_device(arg1,arg2); Py_END_ALLOW_THREADS } resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_inode_new_c_minor_device(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_inode_t *arg1 = (idmef_inode_t *) 0 ; uint32_t **arg2 = (uint32_t **) 0 ; void *argp2 = 0 ; int res2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; int result; if (!PyArg_ParseTuple(args,(char *)"OO:idmef_inode_new_c_minor_device",&obj0,&obj1)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_inode, SWIG_POINTER_EXCEPTION|0) ) return NULL; } res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_p_unsigned_int, 0 | 0 ); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "idmef_inode_new_c_minor_device" "', argument " "2"" of type '" "uint32_t **""'"); } arg2 = (uint32_t **)(argp2); { Py_BEGIN_ALLOW_THREADS result = (int)idmef_inode_new_c_minor_device(arg1,arg2); Py_END_ALLOW_THREADS } { if ( result < 0 ) { swig_python_raise_exception(result); resultobj = NULL; } else { resultobj = PyInt_FromLong(result); } } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_checksum_algorithm_to_numeric(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; char *arg1 = (char *) 0 ; PyObject * obj0 = 0 ; idmef_checksum_algorithm_t result; if (!PyArg_ParseTuple(args,(char *)"O:idmef_checksum_algorithm_to_numeric",&obj0)) SWIG_fail; { if ( obj0 == Py_None ) arg1 = NULL; else if ( PyString_Check(obj0) ) arg1 = PyString_AsString(obj0); else { PyErr_Format(PyExc_TypeError, "expected None or string, %s found", obj0->ob_type->tp_name); return NULL; } } { Py_BEGIN_ALLOW_THREADS result = (idmef_checksum_algorithm_t)idmef_checksum_algorithm_to_numeric((char const *)arg1); Py_END_ALLOW_THREADS } resultobj = SWIG_From_int((int)(result)); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_checksum_algorithm_to_string(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_checksum_algorithm_t arg1 ; int val1 ; int ecode1 = 0 ; PyObject * obj0 = 0 ; char *result = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:idmef_checksum_algorithm_to_string",&obj0)) SWIG_fail; ecode1 = SWIG_AsVal_int(obj0, &val1); if (!SWIG_IsOK(ecode1)) { SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "idmef_checksum_algorithm_to_string" "', argument " "1"" of type '" "idmef_checksum_algorithm_t""'"); } arg1 = (idmef_checksum_algorithm_t)(val1); { Py_BEGIN_ALLOW_THREADS result = (char *)idmef_checksum_algorithm_to_string(arg1); Py_END_ALLOW_THREADS } resultobj = SWIG_FromCharPtr((const char *)result); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_checksum_new(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_checksum_t **arg1 = (idmef_checksum_t **) 0 ; idmef_checksum_t *tmp1 ; int result; { arg1 = (idmef_checksum_t **) &tmp1; } if (!PyArg_ParseTuple(args,(char *)":idmef_checksum_new")) SWIG_fail; { Py_BEGIN_ALLOW_THREADS result = (int)idmef_checksum_new(arg1); Py_END_ALLOW_THREADS } { if ( result < 0 ) { swig_python_raise_exception(result); resultobj = NULL; } else { resultobj = PyInt_FromLong(result); } } { if ( result >= 0 ) resultobj = SWIG_NewPointerObj((void *) * arg1, SWIGTYPE_p_idmef_checksum, 0); } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_checksum_copy(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_checksum_t *arg1 = (idmef_checksum_t *) 0 ; idmef_checksum_t *arg2 = (idmef_checksum_t *) 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; int result; if (!PyArg_ParseTuple(args,(char *)"OO:idmef_checksum_copy",&obj0,&obj1)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_checksum, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { if ( obj1 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj1, (void **)&arg2, SWIGTYPE_p_idmef_checksum, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { Py_BEGIN_ALLOW_THREADS result = (int)idmef_checksum_copy((struct idmef_checksum const *)arg1,arg2); Py_END_ALLOW_THREADS } { if ( result < 0 ) { swig_python_raise_exception(result); resultobj = NULL; } else { resultobj = PyInt_FromLong(result); } } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_checksum_clone(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_checksum_t *arg1 = (idmef_checksum_t *) 0 ; idmef_checksum_t **arg2 = (idmef_checksum_t **) 0 ; idmef_checksum_t *tmp2 ; PyObject * obj0 = 0 ; int result; { arg2 = (idmef_checksum_t **) &tmp2; } if (!PyArg_ParseTuple(args,(char *)"O:idmef_checksum_clone",&obj0)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_checksum, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { Py_BEGIN_ALLOW_THREADS result = (int)idmef_checksum_clone(arg1,arg2); Py_END_ALLOW_THREADS } { if ( result < 0 ) { swig_python_raise_exception(result); resultobj = NULL; } else { resultobj = PyInt_FromLong(result); } } { if ( result >= 0 ) resultobj = SWIG_NewPointerObj((void *) * arg2, SWIGTYPE_p_idmef_checksum, 0); } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_checksum_compare(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_checksum_t *arg1 = (idmef_checksum_t *) 0 ; idmef_checksum_t *arg2 = (idmef_checksum_t *) 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; int result; if (!PyArg_ParseTuple(args,(char *)"OO:idmef_checksum_compare",&obj0,&obj1)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_checksum, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { if ( obj1 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj1, (void **)&arg2, SWIGTYPE_p_idmef_checksum, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { Py_BEGIN_ALLOW_THREADS result = (int)idmef_checksum_compare((struct idmef_checksum const *)arg1,(struct idmef_checksum const *)arg2); Py_END_ALLOW_THREADS } { resultobj = PyInt_FromLong(result); } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_checksum_ref(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_checksum_t *arg1 = (idmef_checksum_t *) 0 ; PyObject * obj0 = 0 ; idmef_checksum_t *result = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:idmef_checksum_ref",&obj0)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_checksum, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { Py_BEGIN_ALLOW_THREADS result = (idmef_checksum_t *)idmef_checksum_ref(arg1); Py_END_ALLOW_THREADS } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_idmef_checksum, 0 | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_checksum_destroy(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_checksum_t *arg1 = (idmef_checksum_t *) 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:idmef_checksum_destroy",&obj0)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_checksum, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { Py_BEGIN_ALLOW_THREADS idmef_checksum_destroy(arg1); Py_END_ALLOW_THREADS } resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_checksum_get_value(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_checksum_t *arg1 = (idmef_checksum_t *) 0 ; PyObject * obj0 = 0 ; prelude_string_t *result = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:idmef_checksum_get_value",&obj0)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_checksum, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { Py_BEGIN_ALLOW_THREADS result = (prelude_string_t *)idmef_checksum_get_value(arg1); Py_END_ALLOW_THREADS } { resultobj = swig_python_string(result); } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_checksum_set_value(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_checksum_t *arg1 = (idmef_checksum_t *) 0 ; prelude_string_t *arg2 = (prelude_string_t *) 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:idmef_checksum_set_value",&obj0,&obj1)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_checksum, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { int ret; ret = prelude_string_new_dup_fast(&(arg2), PyString_AsString(obj1), PyString_Size(obj1)); if ( ret < 0 ) { swig_python_raise_exception(ret); return NULL; } } { Py_BEGIN_ALLOW_THREADS idmef_checksum_set_value(arg1,arg2); Py_END_ALLOW_THREADS } resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_checksum_new_value(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_checksum_t *arg1 = (idmef_checksum_t *) 0 ; prelude_string_t **arg2 = (prelude_string_t **) 0 ; void *argp2 = 0 ; int res2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; int result; if (!PyArg_ParseTuple(args,(char *)"OO:idmef_checksum_new_value",&obj0,&obj1)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_checksum, SWIG_POINTER_EXCEPTION|0) ) return NULL; } res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_p_prelude_string_t, 0 | 0 ); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "idmef_checksum_new_value" "', argument " "2"" of type '" "prelude_string_t **""'"); } arg2 = (prelude_string_t **)(argp2); { Py_BEGIN_ALLOW_THREADS result = (int)idmef_checksum_new_value(arg1,arg2); Py_END_ALLOW_THREADS } { if ( result < 0 ) { swig_python_raise_exception(result); resultobj = NULL; } else { resultobj = PyInt_FromLong(result); } } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_checksum_get_key(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_checksum_t *arg1 = (idmef_checksum_t *) 0 ; PyObject * obj0 = 0 ; prelude_string_t *result = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:idmef_checksum_get_key",&obj0)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_checksum, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { Py_BEGIN_ALLOW_THREADS result = (prelude_string_t *)idmef_checksum_get_key(arg1); Py_END_ALLOW_THREADS } { resultobj = swig_python_string(result); } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_checksum_set_key(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_checksum_t *arg1 = (idmef_checksum_t *) 0 ; prelude_string_t *arg2 = (prelude_string_t *) 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:idmef_checksum_set_key",&obj0,&obj1)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_checksum, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { int ret; ret = prelude_string_new_dup_fast(&(arg2), PyString_AsString(obj1), PyString_Size(obj1)); if ( ret < 0 ) { swig_python_raise_exception(ret); return NULL; } } { Py_BEGIN_ALLOW_THREADS idmef_checksum_set_key(arg1,arg2); Py_END_ALLOW_THREADS } resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_checksum_new_key(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_checksum_t *arg1 = (idmef_checksum_t *) 0 ; prelude_string_t **arg2 = (prelude_string_t **) 0 ; void *argp2 = 0 ; int res2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; int result; if (!PyArg_ParseTuple(args,(char *)"OO:idmef_checksum_new_key",&obj0,&obj1)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_checksum, SWIG_POINTER_EXCEPTION|0) ) return NULL; } res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_p_prelude_string_t, 0 | 0 ); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "idmef_checksum_new_key" "', argument " "2"" of type '" "prelude_string_t **""'"); } arg2 = (prelude_string_t **)(argp2); { Py_BEGIN_ALLOW_THREADS result = (int)idmef_checksum_new_key(arg1,arg2); Py_END_ALLOW_THREADS } { if ( result < 0 ) { swig_python_raise_exception(result); resultobj = NULL; } else { resultobj = PyInt_FromLong(result); } } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_checksum_get_algorithm(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_checksum_t *arg1 = (idmef_checksum_t *) 0 ; PyObject * obj0 = 0 ; idmef_checksum_algorithm_t result; if (!PyArg_ParseTuple(args,(char *)"O:idmef_checksum_get_algorithm",&obj0)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_checksum, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { Py_BEGIN_ALLOW_THREADS result = (idmef_checksum_algorithm_t)idmef_checksum_get_algorithm(arg1); Py_END_ALLOW_THREADS } resultobj = SWIG_From_int((int)(result)); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_checksum_set_algorithm(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_checksum_t *arg1 = (idmef_checksum_t *) 0 ; idmef_checksum_algorithm_t arg2 ; int val2 ; int ecode2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:idmef_checksum_set_algorithm",&obj0,&obj1)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_checksum, SWIG_POINTER_EXCEPTION|0) ) return NULL; } ecode2 = SWIG_AsVal_int(obj1, &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "idmef_checksum_set_algorithm" "', argument " "2"" of type '" "idmef_checksum_algorithm_t""'"); } arg2 = (idmef_checksum_algorithm_t)(val2); { Py_BEGIN_ALLOW_THREADS idmef_checksum_set_algorithm(arg1,arg2); Py_END_ALLOW_THREADS } resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_checksum_new_algorithm(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_checksum_t *arg1 = (idmef_checksum_t *) 0 ; idmef_checksum_algorithm_t **arg2 = (idmef_checksum_algorithm_t **) 0 ; void *argp2 = 0 ; int res2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; int result; if (!PyArg_ParseTuple(args,(char *)"OO:idmef_checksum_new_algorithm",&obj0,&obj1)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_checksum, SWIG_POINTER_EXCEPTION|0) ) return NULL; } res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_p_idmef_checksum_algorithm_t, 0 | 0 ); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "idmef_checksum_new_algorithm" "', argument " "2"" of type '" "idmef_checksum_algorithm_t **""'"); } arg2 = (idmef_checksum_algorithm_t **)(argp2); { Py_BEGIN_ALLOW_THREADS result = (int)idmef_checksum_new_algorithm(arg1,arg2); Py_END_ALLOW_THREADS } { if ( result < 0 ) { swig_python_raise_exception(result); resultobj = NULL; } else { resultobj = PyInt_FromLong(result); } } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_file_category_to_numeric(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; char *arg1 = (char *) 0 ; PyObject * obj0 = 0 ; idmef_file_category_t result; if (!PyArg_ParseTuple(args,(char *)"O:idmef_file_category_to_numeric",&obj0)) SWIG_fail; { if ( obj0 == Py_None ) arg1 = NULL; else if ( PyString_Check(obj0) ) arg1 = PyString_AsString(obj0); else { PyErr_Format(PyExc_TypeError, "expected None or string, %s found", obj0->ob_type->tp_name); return NULL; } } { Py_BEGIN_ALLOW_THREADS result = (idmef_file_category_t)idmef_file_category_to_numeric((char const *)arg1); Py_END_ALLOW_THREADS } resultobj = SWIG_From_int((int)(result)); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_file_category_to_string(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_file_category_t arg1 ; int val1 ; int ecode1 = 0 ; PyObject * obj0 = 0 ; char *result = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:idmef_file_category_to_string",&obj0)) SWIG_fail; ecode1 = SWIG_AsVal_int(obj0, &val1); if (!SWIG_IsOK(ecode1)) { SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "idmef_file_category_to_string" "', argument " "1"" of type '" "idmef_file_category_t""'"); } arg1 = (idmef_file_category_t)(val1); { Py_BEGIN_ALLOW_THREADS result = (char *)idmef_file_category_to_string(arg1); Py_END_ALLOW_THREADS } resultobj = SWIG_FromCharPtr((const char *)result); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_file_fstype_to_numeric(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; char *arg1 = (char *) 0 ; PyObject * obj0 = 0 ; idmef_file_fstype_t result; if (!PyArg_ParseTuple(args,(char *)"O:idmef_file_fstype_to_numeric",&obj0)) SWIG_fail; { if ( obj0 == Py_None ) arg1 = NULL; else if ( PyString_Check(obj0) ) arg1 = PyString_AsString(obj0); else { PyErr_Format(PyExc_TypeError, "expected None or string, %s found", obj0->ob_type->tp_name); return NULL; } } { Py_BEGIN_ALLOW_THREADS result = (idmef_file_fstype_t)idmef_file_fstype_to_numeric((char const *)arg1); Py_END_ALLOW_THREADS } resultobj = SWIG_From_int((int)(result)); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_file_fstype_to_string(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_file_fstype_t arg1 ; int val1 ; int ecode1 = 0 ; PyObject * obj0 = 0 ; char *result = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:idmef_file_fstype_to_string",&obj0)) SWIG_fail; ecode1 = SWIG_AsVal_int(obj0, &val1); if (!SWIG_IsOK(ecode1)) { SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "idmef_file_fstype_to_string" "', argument " "1"" of type '" "idmef_file_fstype_t""'"); } arg1 = (idmef_file_fstype_t)(val1); { Py_BEGIN_ALLOW_THREADS result = (char *)idmef_file_fstype_to_string(arg1); Py_END_ALLOW_THREADS } resultobj = SWIG_FromCharPtr((const char *)result); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_file_new(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_file_t **arg1 = (idmef_file_t **) 0 ; idmef_file_t *tmp1 ; int result; { arg1 = (idmef_file_t **) &tmp1; } if (!PyArg_ParseTuple(args,(char *)":idmef_file_new")) SWIG_fail; { Py_BEGIN_ALLOW_THREADS result = (int)idmef_file_new(arg1); Py_END_ALLOW_THREADS } { if ( result < 0 ) { swig_python_raise_exception(result); resultobj = NULL; } else { resultobj = PyInt_FromLong(result); } } { if ( result >= 0 ) resultobj = SWIG_NewPointerObj((void *) * arg1, SWIGTYPE_p_idmef_file, 0); } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_file_copy(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_file_t *arg1 = (idmef_file_t *) 0 ; idmef_file_t *arg2 = (idmef_file_t *) 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; int result; if (!PyArg_ParseTuple(args,(char *)"OO:idmef_file_copy",&obj0,&obj1)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_file, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { if ( obj1 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj1, (void **)&arg2, SWIGTYPE_p_idmef_file, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { Py_BEGIN_ALLOW_THREADS result = (int)idmef_file_copy((struct idmef_file const *)arg1,arg2); Py_END_ALLOW_THREADS } { if ( result < 0 ) { swig_python_raise_exception(result); resultobj = NULL; } else { resultobj = PyInt_FromLong(result); } } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_file_clone(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_file_t *arg1 = (idmef_file_t *) 0 ; idmef_file_t **arg2 = (idmef_file_t **) 0 ; idmef_file_t *tmp2 ; PyObject * obj0 = 0 ; int result; { arg2 = (idmef_file_t **) &tmp2; } if (!PyArg_ParseTuple(args,(char *)"O:idmef_file_clone",&obj0)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_file, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { Py_BEGIN_ALLOW_THREADS result = (int)idmef_file_clone(arg1,arg2); Py_END_ALLOW_THREADS } { if ( result < 0 ) { swig_python_raise_exception(result); resultobj = NULL; } else { resultobj = PyInt_FromLong(result); } } { if ( result >= 0 ) resultobj = SWIG_NewPointerObj((void *) * arg2, SWIGTYPE_p_idmef_file, 0); } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_file_compare(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_file_t *arg1 = (idmef_file_t *) 0 ; idmef_file_t *arg2 = (idmef_file_t *) 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; int result; if (!PyArg_ParseTuple(args,(char *)"OO:idmef_file_compare",&obj0,&obj1)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_file, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { if ( obj1 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj1, (void **)&arg2, SWIGTYPE_p_idmef_file, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { Py_BEGIN_ALLOW_THREADS result = (int)idmef_file_compare((struct idmef_file const *)arg1,(struct idmef_file const *)arg2); Py_END_ALLOW_THREADS } { resultobj = PyInt_FromLong(result); } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_file_ref(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_file_t *arg1 = (idmef_file_t *) 0 ; PyObject * obj0 = 0 ; idmef_file_t *result = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:idmef_file_ref",&obj0)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_file, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { Py_BEGIN_ALLOW_THREADS result = (idmef_file_t *)idmef_file_ref(arg1); Py_END_ALLOW_THREADS } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_idmef_file, 0 | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_file_destroy(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_file_t *arg1 = (idmef_file_t *) 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:idmef_file_destroy",&obj0)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_file, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { Py_BEGIN_ALLOW_THREADS idmef_file_destroy(arg1); Py_END_ALLOW_THREADS } resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_file_get_ident(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_file_t *arg1 = (idmef_file_t *) 0 ; PyObject * obj0 = 0 ; prelude_string_t *result = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:idmef_file_get_ident",&obj0)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_file, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { Py_BEGIN_ALLOW_THREADS result = (prelude_string_t *)idmef_file_get_ident(arg1); Py_END_ALLOW_THREADS } { resultobj = swig_python_string(result); } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_file_set_ident(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_file_t *arg1 = (idmef_file_t *) 0 ; prelude_string_t *arg2 = (prelude_string_t *) 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:idmef_file_set_ident",&obj0,&obj1)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_file, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { int ret; ret = prelude_string_new_dup_fast(&(arg2), PyString_AsString(obj1), PyString_Size(obj1)); if ( ret < 0 ) { swig_python_raise_exception(ret); return NULL; } } { Py_BEGIN_ALLOW_THREADS idmef_file_set_ident(arg1,arg2); Py_END_ALLOW_THREADS } resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_file_new_ident(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_file_t *arg1 = (idmef_file_t *) 0 ; prelude_string_t **arg2 = (prelude_string_t **) 0 ; void *argp2 = 0 ; int res2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; int result; if (!PyArg_ParseTuple(args,(char *)"OO:idmef_file_new_ident",&obj0,&obj1)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_file, SWIG_POINTER_EXCEPTION|0) ) return NULL; } res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_p_prelude_string_t, 0 | 0 ); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "idmef_file_new_ident" "', argument " "2"" of type '" "prelude_string_t **""'"); } arg2 = (prelude_string_t **)(argp2); { Py_BEGIN_ALLOW_THREADS result = (int)idmef_file_new_ident(arg1,arg2); Py_END_ALLOW_THREADS } { if ( result < 0 ) { swig_python_raise_exception(result); resultobj = NULL; } else { resultobj = PyInt_FromLong(result); } } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_file_get_name(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_file_t *arg1 = (idmef_file_t *) 0 ; PyObject * obj0 = 0 ; prelude_string_t *result = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:idmef_file_get_name",&obj0)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_file, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { Py_BEGIN_ALLOW_THREADS result = (prelude_string_t *)idmef_file_get_name(arg1); Py_END_ALLOW_THREADS } { resultobj = swig_python_string(result); } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_file_set_name(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_file_t *arg1 = (idmef_file_t *) 0 ; prelude_string_t *arg2 = (prelude_string_t *) 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:idmef_file_set_name",&obj0,&obj1)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_file, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { int ret; ret = prelude_string_new_dup_fast(&(arg2), PyString_AsString(obj1), PyString_Size(obj1)); if ( ret < 0 ) { swig_python_raise_exception(ret); return NULL; } } { Py_BEGIN_ALLOW_THREADS idmef_file_set_name(arg1,arg2); Py_END_ALLOW_THREADS } resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_file_new_name(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_file_t *arg1 = (idmef_file_t *) 0 ; prelude_string_t **arg2 = (prelude_string_t **) 0 ; void *argp2 = 0 ; int res2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; int result; if (!PyArg_ParseTuple(args,(char *)"OO:idmef_file_new_name",&obj0,&obj1)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_file, SWIG_POINTER_EXCEPTION|0) ) return NULL; } res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_p_prelude_string_t, 0 | 0 ); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "idmef_file_new_name" "', argument " "2"" of type '" "prelude_string_t **""'"); } arg2 = (prelude_string_t **)(argp2); { Py_BEGIN_ALLOW_THREADS result = (int)idmef_file_new_name(arg1,arg2); Py_END_ALLOW_THREADS } { if ( result < 0 ) { swig_python_raise_exception(result); resultobj = NULL; } else { resultobj = PyInt_FromLong(result); } } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_file_get_path(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_file_t *arg1 = (idmef_file_t *) 0 ; PyObject * obj0 = 0 ; prelude_string_t *result = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:idmef_file_get_path",&obj0)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_file, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { Py_BEGIN_ALLOW_THREADS result = (prelude_string_t *)idmef_file_get_path(arg1); Py_END_ALLOW_THREADS } { resultobj = swig_python_string(result); } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_file_set_path(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_file_t *arg1 = (idmef_file_t *) 0 ; prelude_string_t *arg2 = (prelude_string_t *) 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:idmef_file_set_path",&obj0,&obj1)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_file, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { int ret; ret = prelude_string_new_dup_fast(&(arg2), PyString_AsString(obj1), PyString_Size(obj1)); if ( ret < 0 ) { swig_python_raise_exception(ret); return NULL; } } { Py_BEGIN_ALLOW_THREADS idmef_file_set_path(arg1,arg2); Py_END_ALLOW_THREADS } resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_file_new_path(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_file_t *arg1 = (idmef_file_t *) 0 ; prelude_string_t **arg2 = (prelude_string_t **) 0 ; void *argp2 = 0 ; int res2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; int result; if (!PyArg_ParseTuple(args,(char *)"OO:idmef_file_new_path",&obj0,&obj1)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_file, SWIG_POINTER_EXCEPTION|0) ) return NULL; } res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_p_prelude_string_t, 0 | 0 ); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "idmef_file_new_path" "', argument " "2"" of type '" "prelude_string_t **""'"); } arg2 = (prelude_string_t **)(argp2); { Py_BEGIN_ALLOW_THREADS result = (int)idmef_file_new_path(arg1,arg2); Py_END_ALLOW_THREADS } { if ( result < 0 ) { swig_python_raise_exception(result); resultobj = NULL; } else { resultobj = PyInt_FromLong(result); } } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_file_get_create_time(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_file_t *arg1 = (idmef_file_t *) 0 ; PyObject * obj0 = 0 ; idmef_time_t *result = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:idmef_file_get_create_time",&obj0)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_file, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { Py_BEGIN_ALLOW_THREADS result = (idmef_time_t *)idmef_file_get_create_time(arg1); Py_END_ALLOW_THREADS } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_idmef_time, 0 | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_file_set_create_time(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_file_t *arg1 = (idmef_file_t *) 0 ; idmef_time_t *arg2 = (idmef_time_t *) 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:idmef_file_set_create_time",&obj0,&obj1)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_file, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { if ( obj1 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj1, (void **)&arg2, SWIGTYPE_p_idmef_time, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { Py_BEGIN_ALLOW_THREADS idmef_file_set_create_time(arg1,arg2); Py_END_ALLOW_THREADS } resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_file_new_create_time(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_file_t *arg1 = (idmef_file_t *) 0 ; idmef_time_t **arg2 = (idmef_time_t **) 0 ; idmef_time_t *tmp2 ; PyObject * obj0 = 0 ; int result; { arg2 = (idmef_time_t **) &tmp2; } if (!PyArg_ParseTuple(args,(char *)"O:idmef_file_new_create_time",&obj0)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_file, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { Py_BEGIN_ALLOW_THREADS result = (int)idmef_file_new_create_time(arg1,arg2); Py_END_ALLOW_THREADS } { if ( result < 0 ) { swig_python_raise_exception(result); resultobj = NULL; } else { resultobj = PyInt_FromLong(result); } } { if ( result >= 0 ) resultobj = SWIG_NewPointerObj((void *) * arg2, SWIGTYPE_p_idmef_time, 0); } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_file_get_modify_time(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_file_t *arg1 = (idmef_file_t *) 0 ; PyObject * obj0 = 0 ; idmef_time_t *result = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:idmef_file_get_modify_time",&obj0)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_file, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { Py_BEGIN_ALLOW_THREADS result = (idmef_time_t *)idmef_file_get_modify_time(arg1); Py_END_ALLOW_THREADS } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_idmef_time, 0 | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_file_set_modify_time(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_file_t *arg1 = (idmef_file_t *) 0 ; idmef_time_t *arg2 = (idmef_time_t *) 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:idmef_file_set_modify_time",&obj0,&obj1)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_file, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { if ( obj1 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj1, (void **)&arg2, SWIGTYPE_p_idmef_time, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { Py_BEGIN_ALLOW_THREADS idmef_file_set_modify_time(arg1,arg2); Py_END_ALLOW_THREADS } resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_file_new_modify_time(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_file_t *arg1 = (idmef_file_t *) 0 ; idmef_time_t **arg2 = (idmef_time_t **) 0 ; idmef_time_t *tmp2 ; PyObject * obj0 = 0 ; int result; { arg2 = (idmef_time_t **) &tmp2; } if (!PyArg_ParseTuple(args,(char *)"O:idmef_file_new_modify_time",&obj0)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_file, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { Py_BEGIN_ALLOW_THREADS result = (int)idmef_file_new_modify_time(arg1,arg2); Py_END_ALLOW_THREADS } { if ( result < 0 ) { swig_python_raise_exception(result); resultobj = NULL; } else { resultobj = PyInt_FromLong(result); } } { if ( result >= 0 ) resultobj = SWIG_NewPointerObj((void *) * arg2, SWIGTYPE_p_idmef_time, 0); } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_file_get_access_time(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_file_t *arg1 = (idmef_file_t *) 0 ; PyObject * obj0 = 0 ; idmef_time_t *result = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:idmef_file_get_access_time",&obj0)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_file, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { Py_BEGIN_ALLOW_THREADS result = (idmef_time_t *)idmef_file_get_access_time(arg1); Py_END_ALLOW_THREADS } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_idmef_time, 0 | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_file_set_access_time(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_file_t *arg1 = (idmef_file_t *) 0 ; idmef_time_t *arg2 = (idmef_time_t *) 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:idmef_file_set_access_time",&obj0,&obj1)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_file, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { if ( obj1 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj1, (void **)&arg2, SWIGTYPE_p_idmef_time, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { Py_BEGIN_ALLOW_THREADS idmef_file_set_access_time(arg1,arg2); Py_END_ALLOW_THREADS } resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_file_new_access_time(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_file_t *arg1 = (idmef_file_t *) 0 ; idmef_time_t **arg2 = (idmef_time_t **) 0 ; idmef_time_t *tmp2 ; PyObject * obj0 = 0 ; int result; { arg2 = (idmef_time_t **) &tmp2; } if (!PyArg_ParseTuple(args,(char *)"O:idmef_file_new_access_time",&obj0)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_file, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { Py_BEGIN_ALLOW_THREADS result = (int)idmef_file_new_access_time(arg1,arg2); Py_END_ALLOW_THREADS } { if ( result < 0 ) { swig_python_raise_exception(result); resultobj = NULL; } else { resultobj = PyInt_FromLong(result); } } { if ( result >= 0 ) resultobj = SWIG_NewPointerObj((void *) * arg2, SWIGTYPE_p_idmef_time, 0); } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_file_unset_data_size(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_file_t *arg1 = (idmef_file_t *) 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:idmef_file_unset_data_size",&obj0)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_file, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { Py_BEGIN_ALLOW_THREADS idmef_file_unset_data_size(arg1); Py_END_ALLOW_THREADS } resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_file_get_data_size(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_file_t *arg1 = (idmef_file_t *) 0 ; PyObject * obj0 = 0 ; uint64_t *result = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:idmef_file_get_data_size",&obj0)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_file, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { Py_BEGIN_ALLOW_THREADS result = (uint64_t *)idmef_file_get_data_size(arg1); Py_END_ALLOW_THREADS } { if (result != NULL) { resultobj = PyLong_FromUnsignedLongLong(*result); } else { resultobj = Py_None; } } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_file_set_data_size(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_file_t *arg1 = (idmef_file_t *) 0 ; uint64_t arg2 ; unsigned long long val2 ; int ecode2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:idmef_file_set_data_size",&obj0,&obj1)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_file, SWIG_POINTER_EXCEPTION|0) ) return NULL; } ecode2 = SWIG_AsVal_unsigned_SS_long_SS_long(obj1, &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "idmef_file_set_data_size" "', argument " "2"" of type '" "uint64_t""'"); } arg2 = (uint64_t)(val2); { Py_BEGIN_ALLOW_THREADS idmef_file_set_data_size(arg1,arg2); Py_END_ALLOW_THREADS } resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_file_new_data_size(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_file_t *arg1 = (idmef_file_t *) 0 ; uint64_t **arg2 = (uint64_t **) 0 ; void *argp2 = 0 ; int res2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; int result; if (!PyArg_ParseTuple(args,(char *)"OO:idmef_file_new_data_size",&obj0,&obj1)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_file, SWIG_POINTER_EXCEPTION|0) ) return NULL; } res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_p_unsigned_long_long, 0 | 0 ); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "idmef_file_new_data_size" "', argument " "2"" of type '" "uint64_t **""'"); } arg2 = (uint64_t **)(argp2); { Py_BEGIN_ALLOW_THREADS result = (int)idmef_file_new_data_size(arg1,arg2); Py_END_ALLOW_THREADS } { if ( result < 0 ) { swig_python_raise_exception(result); resultobj = NULL; } else { resultobj = PyInt_FromLong(result); } } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_file_unset_disk_size(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_file_t *arg1 = (idmef_file_t *) 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:idmef_file_unset_disk_size",&obj0)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_file, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { Py_BEGIN_ALLOW_THREADS idmef_file_unset_disk_size(arg1); Py_END_ALLOW_THREADS } resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_file_get_disk_size(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_file_t *arg1 = (idmef_file_t *) 0 ; PyObject * obj0 = 0 ; uint64_t *result = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:idmef_file_get_disk_size",&obj0)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_file, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { Py_BEGIN_ALLOW_THREADS result = (uint64_t *)idmef_file_get_disk_size(arg1); Py_END_ALLOW_THREADS } { if (result != NULL) { resultobj = PyLong_FromUnsignedLongLong(*result); } else { resultobj = Py_None; } } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_file_set_disk_size(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_file_t *arg1 = (idmef_file_t *) 0 ; uint64_t arg2 ; unsigned long long val2 ; int ecode2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:idmef_file_set_disk_size",&obj0,&obj1)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_file, SWIG_POINTER_EXCEPTION|0) ) return NULL; } ecode2 = SWIG_AsVal_unsigned_SS_long_SS_long(obj1, &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "idmef_file_set_disk_size" "', argument " "2"" of type '" "uint64_t""'"); } arg2 = (uint64_t)(val2); { Py_BEGIN_ALLOW_THREADS idmef_file_set_disk_size(arg1,arg2); Py_END_ALLOW_THREADS } resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_file_new_disk_size(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_file_t *arg1 = (idmef_file_t *) 0 ; uint64_t **arg2 = (uint64_t **) 0 ; void *argp2 = 0 ; int res2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; int result; if (!PyArg_ParseTuple(args,(char *)"OO:idmef_file_new_disk_size",&obj0,&obj1)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_file, SWIG_POINTER_EXCEPTION|0) ) return NULL; } res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_p_unsigned_long_long, 0 | 0 ); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "idmef_file_new_disk_size" "', argument " "2"" of type '" "uint64_t **""'"); } arg2 = (uint64_t **)(argp2); { Py_BEGIN_ALLOW_THREADS result = (int)idmef_file_new_disk_size(arg1,arg2); Py_END_ALLOW_THREADS } { if ( result < 0 ) { swig_python_raise_exception(result); resultobj = NULL; } else { resultobj = PyInt_FromLong(result); } } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_file_get_next_file_access(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_file_t *arg1 = (idmef_file_t *) 0 ; idmef_file_access_t *arg2 = (idmef_file_access_t *) 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; idmef_file_access_t *result = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:idmef_file_get_next_file_access",&obj0,&obj1)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_file, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { if ( obj1 == Py_None ) { arg2 = NULL; } else { if ( SWIG_ConvertPtr(obj1, (void **)&arg2, SWIGTYPE_p_idmef_file_access, SWIG_POINTER_EXCEPTION|0) ) return NULL; } } { Py_BEGIN_ALLOW_THREADS result = (idmef_file_access_t *)idmef_file_get_next_file_access(arg1,arg2); Py_END_ALLOW_THREADS } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_idmef_file_access, 0 | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_file_set_file_access(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_file_t *arg1 = (idmef_file_t *) 0 ; idmef_file_access_t *arg2 = (idmef_file_access_t *) 0 ; int arg3 ; int val3 ; int ecode3 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; PyObject * obj2 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OOO:idmef_file_set_file_access",&obj0,&obj1,&obj2)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_file, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { if ( obj1 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj1, (void **)&arg2, SWIGTYPE_p_idmef_file_access, SWIG_POINTER_EXCEPTION|0) ) return NULL; } ecode3 = SWIG_AsVal_int(obj2, &val3); if (!SWIG_IsOK(ecode3)) { SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "idmef_file_set_file_access" "', argument " "3"" of type '" "int""'"); } arg3 = (int)(val3); { Py_BEGIN_ALLOW_THREADS idmef_file_set_file_access(arg1,arg2,arg3); Py_END_ALLOW_THREADS } resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_file_new_file_access(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_file_t *arg1 = (idmef_file_t *) 0 ; idmef_file_access_t **arg2 = (idmef_file_access_t **) 0 ; int arg3 ; idmef_file_access_t *tmp2 ; int val3 ; int ecode3 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; int result; { arg2 = (idmef_file_access_t **) &tmp2; } if (!PyArg_ParseTuple(args,(char *)"OO:idmef_file_new_file_access",&obj0,&obj1)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_file, SWIG_POINTER_EXCEPTION|0) ) return NULL; } ecode3 = SWIG_AsVal_int(obj1, &val3); if (!SWIG_IsOK(ecode3)) { SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "idmef_file_new_file_access" "', argument " "3"" of type '" "int""'"); } arg3 = (int)(val3); { Py_BEGIN_ALLOW_THREADS result = (int)idmef_file_new_file_access(arg1,arg2,arg3); Py_END_ALLOW_THREADS } { if ( result < 0 ) { swig_python_raise_exception(result); resultobj = NULL; } else { resultobj = PyInt_FromLong(result); } } { if ( result >= 0 ) resultobj = SWIG_NewPointerObj((void *) * arg2, SWIGTYPE_p_idmef_file_access, 0); } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_file_get_next_linkage(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_file_t *arg1 = (idmef_file_t *) 0 ; idmef_linkage_t *arg2 = (idmef_linkage_t *) 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; idmef_linkage_t *result = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:idmef_file_get_next_linkage",&obj0,&obj1)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_file, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { if ( obj1 == Py_None ) { arg2 = NULL; } else { if ( SWIG_ConvertPtr(obj1, (void **)&arg2, SWIGTYPE_p_idmef_linkage, SWIG_POINTER_EXCEPTION|0) ) return NULL; } } { Py_BEGIN_ALLOW_THREADS result = (idmef_linkage_t *)idmef_file_get_next_linkage(arg1,arg2); Py_END_ALLOW_THREADS } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_idmef_linkage, 0 | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_file_set_linkage(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_file_t *arg1 = (idmef_file_t *) 0 ; idmef_linkage_t *arg2 = (idmef_linkage_t *) 0 ; int arg3 ; int val3 ; int ecode3 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; PyObject * obj2 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OOO:idmef_file_set_linkage",&obj0,&obj1,&obj2)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_file, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { if ( obj1 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj1, (void **)&arg2, SWIGTYPE_p_idmef_linkage, SWIG_POINTER_EXCEPTION|0) ) return NULL; } ecode3 = SWIG_AsVal_int(obj2, &val3); if (!SWIG_IsOK(ecode3)) { SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "idmef_file_set_linkage" "', argument " "3"" of type '" "int""'"); } arg3 = (int)(val3); { Py_BEGIN_ALLOW_THREADS idmef_file_set_linkage(arg1,arg2,arg3); Py_END_ALLOW_THREADS } resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_file_new_linkage(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_file_t *arg1 = (idmef_file_t *) 0 ; idmef_linkage_t **arg2 = (idmef_linkage_t **) 0 ; int arg3 ; idmef_linkage_t *tmp2 ; int val3 ; int ecode3 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; int result; { arg2 = (idmef_linkage_t **) &tmp2; } if (!PyArg_ParseTuple(args,(char *)"OO:idmef_file_new_linkage",&obj0,&obj1)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_file, SWIG_POINTER_EXCEPTION|0) ) return NULL; } ecode3 = SWIG_AsVal_int(obj1, &val3); if (!SWIG_IsOK(ecode3)) { SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "idmef_file_new_linkage" "', argument " "3"" of type '" "int""'"); } arg3 = (int)(val3); { Py_BEGIN_ALLOW_THREADS result = (int)idmef_file_new_linkage(arg1,arg2,arg3); Py_END_ALLOW_THREADS } { if ( result < 0 ) { swig_python_raise_exception(result); resultobj = NULL; } else { resultobj = PyInt_FromLong(result); } } { if ( result >= 0 ) resultobj = SWIG_NewPointerObj((void *) * arg2, SWIGTYPE_p_idmef_linkage, 0); } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_file_get_inode(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_file_t *arg1 = (idmef_file_t *) 0 ; PyObject * obj0 = 0 ; idmef_inode_t *result = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:idmef_file_get_inode",&obj0)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_file, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { Py_BEGIN_ALLOW_THREADS result = (idmef_inode_t *)idmef_file_get_inode(arg1); Py_END_ALLOW_THREADS } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_idmef_inode, 0 | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_file_set_inode(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_file_t *arg1 = (idmef_file_t *) 0 ; idmef_inode_t *arg2 = (idmef_inode_t *) 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:idmef_file_set_inode",&obj0,&obj1)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_file, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { if ( obj1 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj1, (void **)&arg2, SWIGTYPE_p_idmef_inode, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { Py_BEGIN_ALLOW_THREADS idmef_file_set_inode(arg1,arg2); Py_END_ALLOW_THREADS } resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_file_new_inode(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_file_t *arg1 = (idmef_file_t *) 0 ; idmef_inode_t **arg2 = (idmef_inode_t **) 0 ; idmef_inode_t *tmp2 ; PyObject * obj0 = 0 ; int result; { arg2 = (idmef_inode_t **) &tmp2; } if (!PyArg_ParseTuple(args,(char *)"O:idmef_file_new_inode",&obj0)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_file, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { Py_BEGIN_ALLOW_THREADS result = (int)idmef_file_new_inode(arg1,arg2); Py_END_ALLOW_THREADS } { if ( result < 0 ) { swig_python_raise_exception(result); resultobj = NULL; } else { resultobj = PyInt_FromLong(result); } } { if ( result >= 0 ) resultobj = SWIG_NewPointerObj((void *) * arg2, SWIGTYPE_p_idmef_inode, 0); } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_file_get_next_checksum(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_file_t *arg1 = (idmef_file_t *) 0 ; idmef_checksum_t *arg2 = (idmef_checksum_t *) 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; idmef_checksum_t *result = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:idmef_file_get_next_checksum",&obj0,&obj1)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_file, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { if ( obj1 == Py_None ) { arg2 = NULL; } else { if ( SWIG_ConvertPtr(obj1, (void **)&arg2, SWIGTYPE_p_idmef_checksum, SWIG_POINTER_EXCEPTION|0) ) return NULL; } } { Py_BEGIN_ALLOW_THREADS result = (idmef_checksum_t *)idmef_file_get_next_checksum(arg1,arg2); Py_END_ALLOW_THREADS } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_idmef_checksum, 0 | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_file_set_checksum(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_file_t *arg1 = (idmef_file_t *) 0 ; idmef_checksum_t *arg2 = (idmef_checksum_t *) 0 ; int arg3 ; int val3 ; int ecode3 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; PyObject * obj2 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OOO:idmef_file_set_checksum",&obj0,&obj1,&obj2)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_file, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { if ( obj1 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj1, (void **)&arg2, SWIGTYPE_p_idmef_checksum, SWIG_POINTER_EXCEPTION|0) ) return NULL; } ecode3 = SWIG_AsVal_int(obj2, &val3); if (!SWIG_IsOK(ecode3)) { SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "idmef_file_set_checksum" "', argument " "3"" of type '" "int""'"); } arg3 = (int)(val3); { Py_BEGIN_ALLOW_THREADS idmef_file_set_checksum(arg1,arg2,arg3); Py_END_ALLOW_THREADS } resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_file_new_checksum(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_file_t *arg1 = (idmef_file_t *) 0 ; idmef_checksum_t **arg2 = (idmef_checksum_t **) 0 ; int arg3 ; idmef_checksum_t *tmp2 ; int val3 ; int ecode3 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; int result; { arg2 = (idmef_checksum_t **) &tmp2; } if (!PyArg_ParseTuple(args,(char *)"OO:idmef_file_new_checksum",&obj0,&obj1)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_file, SWIG_POINTER_EXCEPTION|0) ) return NULL; } ecode3 = SWIG_AsVal_int(obj1, &val3); if (!SWIG_IsOK(ecode3)) { SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "idmef_file_new_checksum" "', argument " "3"" of type '" "int""'"); } arg3 = (int)(val3); { Py_BEGIN_ALLOW_THREADS result = (int)idmef_file_new_checksum(arg1,arg2,arg3); Py_END_ALLOW_THREADS } { if ( result < 0 ) { swig_python_raise_exception(result); resultobj = NULL; } else { resultobj = PyInt_FromLong(result); } } { if ( result >= 0 ) resultobj = SWIG_NewPointerObj((void *) * arg2, SWIGTYPE_p_idmef_checksum, 0); } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_file_get_category(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_file_t *arg1 = (idmef_file_t *) 0 ; PyObject * obj0 = 0 ; idmef_file_category_t result; if (!PyArg_ParseTuple(args,(char *)"O:idmef_file_get_category",&obj0)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_file, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { Py_BEGIN_ALLOW_THREADS result = (idmef_file_category_t)idmef_file_get_category(arg1); Py_END_ALLOW_THREADS } resultobj = SWIG_From_int((int)(result)); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_file_set_category(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_file_t *arg1 = (idmef_file_t *) 0 ; idmef_file_category_t arg2 ; int val2 ; int ecode2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:idmef_file_set_category",&obj0,&obj1)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_file, SWIG_POINTER_EXCEPTION|0) ) return NULL; } ecode2 = SWIG_AsVal_int(obj1, &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "idmef_file_set_category" "', argument " "2"" of type '" "idmef_file_category_t""'"); } arg2 = (idmef_file_category_t)(val2); { Py_BEGIN_ALLOW_THREADS idmef_file_set_category(arg1,arg2); Py_END_ALLOW_THREADS } resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_file_new_category(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_file_t *arg1 = (idmef_file_t *) 0 ; idmef_file_category_t **arg2 = (idmef_file_category_t **) 0 ; void *argp2 = 0 ; int res2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; int result; if (!PyArg_ParseTuple(args,(char *)"OO:idmef_file_new_category",&obj0,&obj1)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_file, SWIG_POINTER_EXCEPTION|0) ) return NULL; } res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_p_idmef_file_category_t, 0 | 0 ); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "idmef_file_new_category" "', argument " "2"" of type '" "idmef_file_category_t **""'"); } arg2 = (idmef_file_category_t **)(argp2); { Py_BEGIN_ALLOW_THREADS result = (int)idmef_file_new_category(arg1,arg2); Py_END_ALLOW_THREADS } { if ( result < 0 ) { swig_python_raise_exception(result); resultobj = NULL; } else { resultobj = PyInt_FromLong(result); } } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_file_unset_fstype(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_file_t *arg1 = (idmef_file_t *) 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:idmef_file_unset_fstype",&obj0)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_file, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { Py_BEGIN_ALLOW_THREADS idmef_file_unset_fstype(arg1); Py_END_ALLOW_THREADS } resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_file_get_fstype(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_file_t *arg1 = (idmef_file_t *) 0 ; PyObject * obj0 = 0 ; idmef_file_fstype_t *result = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:idmef_file_get_fstype",&obj0)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_file, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { Py_BEGIN_ALLOW_THREADS result = (idmef_file_fstype_t *)idmef_file_get_fstype(arg1); Py_END_ALLOW_THREADS } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_idmef_file_fstype_t, 0 | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_file_set_fstype(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_file_t *arg1 = (idmef_file_t *) 0 ; idmef_file_fstype_t arg2 ; int val2 ; int ecode2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:idmef_file_set_fstype",&obj0,&obj1)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_file, SWIG_POINTER_EXCEPTION|0) ) return NULL; } ecode2 = SWIG_AsVal_int(obj1, &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "idmef_file_set_fstype" "', argument " "2"" of type '" "idmef_file_fstype_t""'"); } arg2 = (idmef_file_fstype_t)(val2); { Py_BEGIN_ALLOW_THREADS idmef_file_set_fstype(arg1,arg2); Py_END_ALLOW_THREADS } resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_file_new_fstype(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_file_t *arg1 = (idmef_file_t *) 0 ; idmef_file_fstype_t **arg2 = (idmef_file_fstype_t **) 0 ; void *argp2 = 0 ; int res2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; int result; if (!PyArg_ParseTuple(args,(char *)"OO:idmef_file_new_fstype",&obj0,&obj1)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_file, SWIG_POINTER_EXCEPTION|0) ) return NULL; } res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_p_idmef_file_fstype_t, 0 | 0 ); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "idmef_file_new_fstype" "', argument " "2"" of type '" "idmef_file_fstype_t **""'"); } arg2 = (idmef_file_fstype_t **)(argp2); { Py_BEGIN_ALLOW_THREADS result = (int)idmef_file_new_fstype(arg1,arg2); Py_END_ALLOW_THREADS } { if ( result < 0 ) { swig_python_raise_exception(result); resultobj = NULL; } else { resultobj = PyInt_FromLong(result); } } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_file_get_file_type(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_file_t *arg1 = (idmef_file_t *) 0 ; PyObject * obj0 = 0 ; prelude_string_t *result = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:idmef_file_get_file_type",&obj0)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_file, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { Py_BEGIN_ALLOW_THREADS result = (prelude_string_t *)idmef_file_get_file_type(arg1); Py_END_ALLOW_THREADS } { resultobj = swig_python_string(result); } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_file_set_file_type(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_file_t *arg1 = (idmef_file_t *) 0 ; prelude_string_t *arg2 = (prelude_string_t *) 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:idmef_file_set_file_type",&obj0,&obj1)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_file, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { int ret; ret = prelude_string_new_dup_fast(&(arg2), PyString_AsString(obj1), PyString_Size(obj1)); if ( ret < 0 ) { swig_python_raise_exception(ret); return NULL; } } { Py_BEGIN_ALLOW_THREADS idmef_file_set_file_type(arg1,arg2); Py_END_ALLOW_THREADS } resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_file_new_file_type(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_file_t *arg1 = (idmef_file_t *) 0 ; prelude_string_t **arg2 = (prelude_string_t **) 0 ; void *argp2 = 0 ; int res2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; int result; if (!PyArg_ParseTuple(args,(char *)"OO:idmef_file_new_file_type",&obj0,&obj1)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_file, SWIG_POINTER_EXCEPTION|0) ) return NULL; } res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_p_prelude_string_t, 0 | 0 ); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "idmef_file_new_file_type" "', argument " "2"" of type '" "prelude_string_t **""'"); } arg2 = (prelude_string_t **)(argp2); { Py_BEGIN_ALLOW_THREADS result = (int)idmef_file_new_file_type(arg1,arg2); Py_END_ALLOW_THREADS } { if ( result < 0 ) { swig_python_raise_exception(result); resultobj = NULL; } else { resultobj = PyInt_FromLong(result); } } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_linkage_category_to_numeric(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; char *arg1 = (char *) 0 ; PyObject * obj0 = 0 ; idmef_linkage_category_t result; if (!PyArg_ParseTuple(args,(char *)"O:idmef_linkage_category_to_numeric",&obj0)) SWIG_fail; { if ( obj0 == Py_None ) arg1 = NULL; else if ( PyString_Check(obj0) ) arg1 = PyString_AsString(obj0); else { PyErr_Format(PyExc_TypeError, "expected None or string, %s found", obj0->ob_type->tp_name); return NULL; } } { Py_BEGIN_ALLOW_THREADS result = (idmef_linkage_category_t)idmef_linkage_category_to_numeric((char const *)arg1); Py_END_ALLOW_THREADS } resultobj = SWIG_From_int((int)(result)); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_linkage_category_to_string(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_linkage_category_t arg1 ; int val1 ; int ecode1 = 0 ; PyObject * obj0 = 0 ; char *result = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:idmef_linkage_category_to_string",&obj0)) SWIG_fail; ecode1 = SWIG_AsVal_int(obj0, &val1); if (!SWIG_IsOK(ecode1)) { SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "idmef_linkage_category_to_string" "', argument " "1"" of type '" "idmef_linkage_category_t""'"); } arg1 = (idmef_linkage_category_t)(val1); { Py_BEGIN_ALLOW_THREADS result = (char *)idmef_linkage_category_to_string(arg1); Py_END_ALLOW_THREADS } resultobj = SWIG_FromCharPtr((const char *)result); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_linkage_new(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_linkage_t **arg1 = (idmef_linkage_t **) 0 ; idmef_linkage_t *tmp1 ; int result; { arg1 = (idmef_linkage_t **) &tmp1; } if (!PyArg_ParseTuple(args,(char *)":idmef_linkage_new")) SWIG_fail; { Py_BEGIN_ALLOW_THREADS result = (int)idmef_linkage_new(arg1); Py_END_ALLOW_THREADS } { if ( result < 0 ) { swig_python_raise_exception(result); resultobj = NULL; } else { resultobj = PyInt_FromLong(result); } } { if ( result >= 0 ) resultobj = SWIG_NewPointerObj((void *) * arg1, SWIGTYPE_p_idmef_linkage, 0); } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_linkage_copy(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_linkage_t *arg1 = (idmef_linkage_t *) 0 ; idmef_linkage_t *arg2 = (idmef_linkage_t *) 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; int result; if (!PyArg_ParseTuple(args,(char *)"OO:idmef_linkage_copy",&obj0,&obj1)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_linkage, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { if ( obj1 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj1, (void **)&arg2, SWIGTYPE_p_idmef_linkage, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { Py_BEGIN_ALLOW_THREADS result = (int)idmef_linkage_copy((struct idmef_linkage const *)arg1,arg2); Py_END_ALLOW_THREADS } { if ( result < 0 ) { swig_python_raise_exception(result); resultobj = NULL; } else { resultobj = PyInt_FromLong(result); } } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_linkage_clone(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_linkage_t *arg1 = (idmef_linkage_t *) 0 ; idmef_linkage_t **arg2 = (idmef_linkage_t **) 0 ; idmef_linkage_t *tmp2 ; PyObject * obj0 = 0 ; int result; { arg2 = (idmef_linkage_t **) &tmp2; } if (!PyArg_ParseTuple(args,(char *)"O:idmef_linkage_clone",&obj0)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_linkage, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { Py_BEGIN_ALLOW_THREADS result = (int)idmef_linkage_clone(arg1,arg2); Py_END_ALLOW_THREADS } { if ( result < 0 ) { swig_python_raise_exception(result); resultobj = NULL; } else { resultobj = PyInt_FromLong(result); } } { if ( result >= 0 ) resultobj = SWIG_NewPointerObj((void *) * arg2, SWIGTYPE_p_idmef_linkage, 0); } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_linkage_compare(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_linkage_t *arg1 = (idmef_linkage_t *) 0 ; idmef_linkage_t *arg2 = (idmef_linkage_t *) 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; int result; if (!PyArg_ParseTuple(args,(char *)"OO:idmef_linkage_compare",&obj0,&obj1)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_linkage, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { if ( obj1 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj1, (void **)&arg2, SWIGTYPE_p_idmef_linkage, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { Py_BEGIN_ALLOW_THREADS result = (int)idmef_linkage_compare((struct idmef_linkage const *)arg1,(struct idmef_linkage const *)arg2); Py_END_ALLOW_THREADS } { resultobj = PyInt_FromLong(result); } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_linkage_ref(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_linkage_t *arg1 = (idmef_linkage_t *) 0 ; PyObject * obj0 = 0 ; idmef_linkage_t *result = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:idmef_linkage_ref",&obj0)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_linkage, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { Py_BEGIN_ALLOW_THREADS result = (idmef_linkage_t *)idmef_linkage_ref(arg1); Py_END_ALLOW_THREADS } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_idmef_linkage, 0 | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_linkage_destroy(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_linkage_t *arg1 = (idmef_linkage_t *) 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:idmef_linkage_destroy",&obj0)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_linkage, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { Py_BEGIN_ALLOW_THREADS idmef_linkage_destroy(arg1); Py_END_ALLOW_THREADS } resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_linkage_get_category(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_linkage_t *arg1 = (idmef_linkage_t *) 0 ; PyObject * obj0 = 0 ; idmef_linkage_category_t result; if (!PyArg_ParseTuple(args,(char *)"O:idmef_linkage_get_category",&obj0)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_linkage, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { Py_BEGIN_ALLOW_THREADS result = (idmef_linkage_category_t)idmef_linkage_get_category(arg1); Py_END_ALLOW_THREADS } resultobj = SWIG_From_int((int)(result)); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_linkage_set_category(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_linkage_t *arg1 = (idmef_linkage_t *) 0 ; idmef_linkage_category_t arg2 ; int val2 ; int ecode2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:idmef_linkage_set_category",&obj0,&obj1)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_linkage, SWIG_POINTER_EXCEPTION|0) ) return NULL; } ecode2 = SWIG_AsVal_int(obj1, &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "idmef_linkage_set_category" "', argument " "2"" of type '" "idmef_linkage_category_t""'"); } arg2 = (idmef_linkage_category_t)(val2); { Py_BEGIN_ALLOW_THREADS idmef_linkage_set_category(arg1,arg2); Py_END_ALLOW_THREADS } resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_linkage_new_category(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_linkage_t *arg1 = (idmef_linkage_t *) 0 ; idmef_linkage_category_t **arg2 = (idmef_linkage_category_t **) 0 ; void *argp2 = 0 ; int res2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; int result; if (!PyArg_ParseTuple(args,(char *)"OO:idmef_linkage_new_category",&obj0,&obj1)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_linkage, SWIG_POINTER_EXCEPTION|0) ) return NULL; } res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_p_idmef_linkage_category_t, 0 | 0 ); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "idmef_linkage_new_category" "', argument " "2"" of type '" "idmef_linkage_category_t **""'"); } arg2 = (idmef_linkage_category_t **)(argp2); { Py_BEGIN_ALLOW_THREADS result = (int)idmef_linkage_new_category(arg1,arg2); Py_END_ALLOW_THREADS } { if ( result < 0 ) { swig_python_raise_exception(result); resultobj = NULL; } else { resultobj = PyInt_FromLong(result); } } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_linkage_get_name(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_linkage_t *arg1 = (idmef_linkage_t *) 0 ; PyObject * obj0 = 0 ; prelude_string_t *result = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:idmef_linkage_get_name",&obj0)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_linkage, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { Py_BEGIN_ALLOW_THREADS result = (prelude_string_t *)idmef_linkage_get_name(arg1); Py_END_ALLOW_THREADS } { resultobj = swig_python_string(result); } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_linkage_set_name(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_linkage_t *arg1 = (idmef_linkage_t *) 0 ; prelude_string_t *arg2 = (prelude_string_t *) 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:idmef_linkage_set_name",&obj0,&obj1)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_linkage, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { int ret; ret = prelude_string_new_dup_fast(&(arg2), PyString_AsString(obj1), PyString_Size(obj1)); if ( ret < 0 ) { swig_python_raise_exception(ret); return NULL; } } { Py_BEGIN_ALLOW_THREADS idmef_linkage_set_name(arg1,arg2); Py_END_ALLOW_THREADS } resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_linkage_new_name(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_linkage_t *arg1 = (idmef_linkage_t *) 0 ; prelude_string_t **arg2 = (prelude_string_t **) 0 ; void *argp2 = 0 ; int res2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; int result; if (!PyArg_ParseTuple(args,(char *)"OO:idmef_linkage_new_name",&obj0,&obj1)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_linkage, SWIG_POINTER_EXCEPTION|0) ) return NULL; } res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_p_prelude_string_t, 0 | 0 ); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "idmef_linkage_new_name" "', argument " "2"" of type '" "prelude_string_t **""'"); } arg2 = (prelude_string_t **)(argp2); { Py_BEGIN_ALLOW_THREADS result = (int)idmef_linkage_new_name(arg1,arg2); Py_END_ALLOW_THREADS } { if ( result < 0 ) { swig_python_raise_exception(result); resultobj = NULL; } else { resultobj = PyInt_FromLong(result); } } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_linkage_get_path(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_linkage_t *arg1 = (idmef_linkage_t *) 0 ; PyObject * obj0 = 0 ; prelude_string_t *result = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:idmef_linkage_get_path",&obj0)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_linkage, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { Py_BEGIN_ALLOW_THREADS result = (prelude_string_t *)idmef_linkage_get_path(arg1); Py_END_ALLOW_THREADS } { resultobj = swig_python_string(result); } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_linkage_set_path(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_linkage_t *arg1 = (idmef_linkage_t *) 0 ; prelude_string_t *arg2 = (prelude_string_t *) 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:idmef_linkage_set_path",&obj0,&obj1)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_linkage, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { int ret; ret = prelude_string_new_dup_fast(&(arg2), PyString_AsString(obj1), PyString_Size(obj1)); if ( ret < 0 ) { swig_python_raise_exception(ret); return NULL; } } { Py_BEGIN_ALLOW_THREADS idmef_linkage_set_path(arg1,arg2); Py_END_ALLOW_THREADS } resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_linkage_new_path(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_linkage_t *arg1 = (idmef_linkage_t *) 0 ; prelude_string_t **arg2 = (prelude_string_t **) 0 ; void *argp2 = 0 ; int res2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; int result; if (!PyArg_ParseTuple(args,(char *)"OO:idmef_linkage_new_path",&obj0,&obj1)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_linkage, SWIG_POINTER_EXCEPTION|0) ) return NULL; } res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_p_prelude_string_t, 0 | 0 ); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "idmef_linkage_new_path" "', argument " "2"" of type '" "prelude_string_t **""'"); } arg2 = (prelude_string_t **)(argp2); { Py_BEGIN_ALLOW_THREADS result = (int)idmef_linkage_new_path(arg1,arg2); Py_END_ALLOW_THREADS } { if ( result < 0 ) { swig_python_raise_exception(result); resultobj = NULL; } else { resultobj = PyInt_FromLong(result); } } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_linkage_get_file(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_linkage_t *arg1 = (idmef_linkage_t *) 0 ; PyObject * obj0 = 0 ; idmef_file_t *result = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:idmef_linkage_get_file",&obj0)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_linkage, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { Py_BEGIN_ALLOW_THREADS result = (idmef_file_t *)idmef_linkage_get_file(arg1); Py_END_ALLOW_THREADS } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_idmef_file, 0 | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_linkage_set_file(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_linkage_t *arg1 = (idmef_linkage_t *) 0 ; idmef_file_t *arg2 = (idmef_file_t *) 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:idmef_linkage_set_file",&obj0,&obj1)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_linkage, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { if ( obj1 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj1, (void **)&arg2, SWIGTYPE_p_idmef_file, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { Py_BEGIN_ALLOW_THREADS idmef_linkage_set_file(arg1,arg2); Py_END_ALLOW_THREADS } resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_linkage_new_file(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_linkage_t *arg1 = (idmef_linkage_t *) 0 ; idmef_file_t **arg2 = (idmef_file_t **) 0 ; idmef_file_t *tmp2 ; PyObject * obj0 = 0 ; int result; { arg2 = (idmef_file_t **) &tmp2; } if (!PyArg_ParseTuple(args,(char *)"O:idmef_linkage_new_file",&obj0)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_linkage, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { Py_BEGIN_ALLOW_THREADS result = (int)idmef_linkage_new_file(arg1,arg2); Py_END_ALLOW_THREADS } { if ( result < 0 ) { swig_python_raise_exception(result); resultobj = NULL; } else { resultobj = PyInt_FromLong(result); } } { if ( result >= 0 ) resultobj = SWIG_NewPointerObj((void *) * arg2, SWIGTYPE_p_idmef_file, 0); } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_target_decoy_to_numeric(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; char *arg1 = (char *) 0 ; PyObject * obj0 = 0 ; idmef_target_decoy_t result; if (!PyArg_ParseTuple(args,(char *)"O:idmef_target_decoy_to_numeric",&obj0)) SWIG_fail; { if ( obj0 == Py_None ) arg1 = NULL; else if ( PyString_Check(obj0) ) arg1 = PyString_AsString(obj0); else { PyErr_Format(PyExc_TypeError, "expected None or string, %s found", obj0->ob_type->tp_name); return NULL; } } { Py_BEGIN_ALLOW_THREADS result = (idmef_target_decoy_t)idmef_target_decoy_to_numeric((char const *)arg1); Py_END_ALLOW_THREADS } resultobj = SWIG_From_int((int)(result)); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_target_decoy_to_string(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_target_decoy_t arg1 ; int val1 ; int ecode1 = 0 ; PyObject * obj0 = 0 ; char *result = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:idmef_target_decoy_to_string",&obj0)) SWIG_fail; ecode1 = SWIG_AsVal_int(obj0, &val1); if (!SWIG_IsOK(ecode1)) { SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "idmef_target_decoy_to_string" "', argument " "1"" of type '" "idmef_target_decoy_t""'"); } arg1 = (idmef_target_decoy_t)(val1); { Py_BEGIN_ALLOW_THREADS result = (char *)idmef_target_decoy_to_string(arg1); Py_END_ALLOW_THREADS } resultobj = SWIG_FromCharPtr((const char *)result); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_target_new(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_target_t **arg1 = (idmef_target_t **) 0 ; idmef_target_t *tmp1 ; int result; { arg1 = (idmef_target_t **) &tmp1; } if (!PyArg_ParseTuple(args,(char *)":idmef_target_new")) SWIG_fail; { Py_BEGIN_ALLOW_THREADS result = (int)idmef_target_new(arg1); Py_END_ALLOW_THREADS } { if ( result < 0 ) { swig_python_raise_exception(result); resultobj = NULL; } else { resultobj = PyInt_FromLong(result); } } { if ( result >= 0 ) resultobj = SWIG_NewPointerObj((void *) * arg1, SWIGTYPE_p_idmef_target, 0); } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_target_copy(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_target_t *arg1 = (idmef_target_t *) 0 ; idmef_target_t *arg2 = (idmef_target_t *) 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; int result; if (!PyArg_ParseTuple(args,(char *)"OO:idmef_target_copy",&obj0,&obj1)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_target, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { if ( obj1 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj1, (void **)&arg2, SWIGTYPE_p_idmef_target, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { Py_BEGIN_ALLOW_THREADS result = (int)idmef_target_copy((struct idmef_target const *)arg1,arg2); Py_END_ALLOW_THREADS } { if ( result < 0 ) { swig_python_raise_exception(result); resultobj = NULL; } else { resultobj = PyInt_FromLong(result); } } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_target_clone(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_target_t *arg1 = (idmef_target_t *) 0 ; idmef_target_t **arg2 = (idmef_target_t **) 0 ; idmef_target_t *tmp2 ; PyObject * obj0 = 0 ; int result; { arg2 = (idmef_target_t **) &tmp2; } if (!PyArg_ParseTuple(args,(char *)"O:idmef_target_clone",&obj0)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_target, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { Py_BEGIN_ALLOW_THREADS result = (int)idmef_target_clone(arg1,arg2); Py_END_ALLOW_THREADS } { if ( result < 0 ) { swig_python_raise_exception(result); resultobj = NULL; } else { resultobj = PyInt_FromLong(result); } } { if ( result >= 0 ) resultobj = SWIG_NewPointerObj((void *) * arg2, SWIGTYPE_p_idmef_target, 0); } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_target_compare(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_target_t *arg1 = (idmef_target_t *) 0 ; idmef_target_t *arg2 = (idmef_target_t *) 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; int result; if (!PyArg_ParseTuple(args,(char *)"OO:idmef_target_compare",&obj0,&obj1)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_target, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { if ( obj1 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj1, (void **)&arg2, SWIGTYPE_p_idmef_target, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { Py_BEGIN_ALLOW_THREADS result = (int)idmef_target_compare((struct idmef_target const *)arg1,(struct idmef_target const *)arg2); Py_END_ALLOW_THREADS } { resultobj = PyInt_FromLong(result); } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_target_ref(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_target_t *arg1 = (idmef_target_t *) 0 ; PyObject * obj0 = 0 ; idmef_target_t *result = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:idmef_target_ref",&obj0)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_target, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { Py_BEGIN_ALLOW_THREADS result = (idmef_target_t *)idmef_target_ref(arg1); Py_END_ALLOW_THREADS } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_idmef_target, 0 | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_target_destroy(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_target_t *arg1 = (idmef_target_t *) 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:idmef_target_destroy",&obj0)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_target, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { Py_BEGIN_ALLOW_THREADS idmef_target_destroy(arg1); Py_END_ALLOW_THREADS } resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_target_get_ident(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_target_t *arg1 = (idmef_target_t *) 0 ; PyObject * obj0 = 0 ; prelude_string_t *result = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:idmef_target_get_ident",&obj0)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_target, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { Py_BEGIN_ALLOW_THREADS result = (prelude_string_t *)idmef_target_get_ident(arg1); Py_END_ALLOW_THREADS } { resultobj = swig_python_string(result); } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_target_set_ident(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_target_t *arg1 = (idmef_target_t *) 0 ; prelude_string_t *arg2 = (prelude_string_t *) 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:idmef_target_set_ident",&obj0,&obj1)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_target, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { int ret; ret = prelude_string_new_dup_fast(&(arg2), PyString_AsString(obj1), PyString_Size(obj1)); if ( ret < 0 ) { swig_python_raise_exception(ret); return NULL; } } { Py_BEGIN_ALLOW_THREADS idmef_target_set_ident(arg1,arg2); Py_END_ALLOW_THREADS } resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_target_new_ident(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_target_t *arg1 = (idmef_target_t *) 0 ; prelude_string_t **arg2 = (prelude_string_t **) 0 ; void *argp2 = 0 ; int res2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; int result; if (!PyArg_ParseTuple(args,(char *)"OO:idmef_target_new_ident",&obj0,&obj1)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_target, SWIG_POINTER_EXCEPTION|0) ) return NULL; } res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_p_prelude_string_t, 0 | 0 ); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "idmef_target_new_ident" "', argument " "2"" of type '" "prelude_string_t **""'"); } arg2 = (prelude_string_t **)(argp2); { Py_BEGIN_ALLOW_THREADS result = (int)idmef_target_new_ident(arg1,arg2); Py_END_ALLOW_THREADS } { if ( result < 0 ) { swig_python_raise_exception(result); resultobj = NULL; } else { resultobj = PyInt_FromLong(result); } } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_target_get_decoy(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_target_t *arg1 = (idmef_target_t *) 0 ; PyObject * obj0 = 0 ; idmef_target_decoy_t result; if (!PyArg_ParseTuple(args,(char *)"O:idmef_target_get_decoy",&obj0)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_target, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { Py_BEGIN_ALLOW_THREADS result = (idmef_target_decoy_t)idmef_target_get_decoy(arg1); Py_END_ALLOW_THREADS } resultobj = SWIG_From_int((int)(result)); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_target_set_decoy(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_target_t *arg1 = (idmef_target_t *) 0 ; idmef_target_decoy_t arg2 ; int val2 ; int ecode2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:idmef_target_set_decoy",&obj0,&obj1)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_target, SWIG_POINTER_EXCEPTION|0) ) return NULL; } ecode2 = SWIG_AsVal_int(obj1, &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "idmef_target_set_decoy" "', argument " "2"" of type '" "idmef_target_decoy_t""'"); } arg2 = (idmef_target_decoy_t)(val2); { Py_BEGIN_ALLOW_THREADS idmef_target_set_decoy(arg1,arg2); Py_END_ALLOW_THREADS } resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_target_new_decoy(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_target_t *arg1 = (idmef_target_t *) 0 ; idmef_target_decoy_t **arg2 = (idmef_target_decoy_t **) 0 ; void *argp2 = 0 ; int res2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; int result; if (!PyArg_ParseTuple(args,(char *)"OO:idmef_target_new_decoy",&obj0,&obj1)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_target, SWIG_POINTER_EXCEPTION|0) ) return NULL; } res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_p_idmef_target_decoy_t, 0 | 0 ); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "idmef_target_new_decoy" "', argument " "2"" of type '" "idmef_target_decoy_t **""'"); } arg2 = (idmef_target_decoy_t **)(argp2); { Py_BEGIN_ALLOW_THREADS result = (int)idmef_target_new_decoy(arg1,arg2); Py_END_ALLOW_THREADS } { if ( result < 0 ) { swig_python_raise_exception(result); resultobj = NULL; } else { resultobj = PyInt_FromLong(result); } } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_target_get_interface(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_target_t *arg1 = (idmef_target_t *) 0 ; PyObject * obj0 = 0 ; prelude_string_t *result = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:idmef_target_get_interface",&obj0)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_target, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { Py_BEGIN_ALLOW_THREADS result = (prelude_string_t *)idmef_target_get_interface(arg1); Py_END_ALLOW_THREADS } { resultobj = swig_python_string(result); } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_target_set_interface(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_target_t *arg1 = (idmef_target_t *) 0 ; prelude_string_t *arg2 = (prelude_string_t *) 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:idmef_target_set_interface",&obj0,&obj1)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_target, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { int ret; ret = prelude_string_new_dup_fast(&(arg2), PyString_AsString(obj1), PyString_Size(obj1)); if ( ret < 0 ) { swig_python_raise_exception(ret); return NULL; } } { Py_BEGIN_ALLOW_THREADS idmef_target_set_interface(arg1,arg2); Py_END_ALLOW_THREADS } resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_target_new_interface(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_target_t *arg1 = (idmef_target_t *) 0 ; prelude_string_t **arg2 = (prelude_string_t **) 0 ; void *argp2 = 0 ; int res2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; int result; if (!PyArg_ParseTuple(args,(char *)"OO:idmef_target_new_interface",&obj0,&obj1)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_target, SWIG_POINTER_EXCEPTION|0) ) return NULL; } res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_p_prelude_string_t, 0 | 0 ); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "idmef_target_new_interface" "', argument " "2"" of type '" "prelude_string_t **""'"); } arg2 = (prelude_string_t **)(argp2); { Py_BEGIN_ALLOW_THREADS result = (int)idmef_target_new_interface(arg1,arg2); Py_END_ALLOW_THREADS } { if ( result < 0 ) { swig_python_raise_exception(result); resultobj = NULL; } else { resultobj = PyInt_FromLong(result); } } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_target_get_node(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_target_t *arg1 = (idmef_target_t *) 0 ; PyObject * obj0 = 0 ; idmef_node_t *result = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:idmef_target_get_node",&obj0)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_target, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { Py_BEGIN_ALLOW_THREADS result = (idmef_node_t *)idmef_target_get_node(arg1); Py_END_ALLOW_THREADS } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_idmef_node, 0 | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_target_set_node(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_target_t *arg1 = (idmef_target_t *) 0 ; idmef_node_t *arg2 = (idmef_node_t *) 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:idmef_target_set_node",&obj0,&obj1)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_target, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { if ( obj1 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj1, (void **)&arg2, SWIGTYPE_p_idmef_node, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { Py_BEGIN_ALLOW_THREADS idmef_target_set_node(arg1,arg2); Py_END_ALLOW_THREADS } resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_target_new_node(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_target_t *arg1 = (idmef_target_t *) 0 ; idmef_node_t **arg2 = (idmef_node_t **) 0 ; idmef_node_t *tmp2 ; PyObject * obj0 = 0 ; int result; { arg2 = (idmef_node_t **) &tmp2; } if (!PyArg_ParseTuple(args,(char *)"O:idmef_target_new_node",&obj0)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_target, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { Py_BEGIN_ALLOW_THREADS result = (int)idmef_target_new_node(arg1,arg2); Py_END_ALLOW_THREADS } { if ( result < 0 ) { swig_python_raise_exception(result); resultobj = NULL; } else { resultobj = PyInt_FromLong(result); } } { if ( result >= 0 ) resultobj = SWIG_NewPointerObj((void *) * arg2, SWIGTYPE_p_idmef_node, 0); } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_target_get_user(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_target_t *arg1 = (idmef_target_t *) 0 ; PyObject * obj0 = 0 ; idmef_user_t *result = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:idmef_target_get_user",&obj0)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_target, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { Py_BEGIN_ALLOW_THREADS result = (idmef_user_t *)idmef_target_get_user(arg1); Py_END_ALLOW_THREADS } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_idmef_user, 0 | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_target_set_user(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_target_t *arg1 = (idmef_target_t *) 0 ; idmef_user_t *arg2 = (idmef_user_t *) 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:idmef_target_set_user",&obj0,&obj1)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_target, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { if ( obj1 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj1, (void **)&arg2, SWIGTYPE_p_idmef_user, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { Py_BEGIN_ALLOW_THREADS idmef_target_set_user(arg1,arg2); Py_END_ALLOW_THREADS } resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_target_new_user(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_target_t *arg1 = (idmef_target_t *) 0 ; idmef_user_t **arg2 = (idmef_user_t **) 0 ; idmef_user_t *tmp2 ; PyObject * obj0 = 0 ; int result; { arg2 = (idmef_user_t **) &tmp2; } if (!PyArg_ParseTuple(args,(char *)"O:idmef_target_new_user",&obj0)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_target, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { Py_BEGIN_ALLOW_THREADS result = (int)idmef_target_new_user(arg1,arg2); Py_END_ALLOW_THREADS } { if ( result < 0 ) { swig_python_raise_exception(result); resultobj = NULL; } else { resultobj = PyInt_FromLong(result); } } { if ( result >= 0 ) resultobj = SWIG_NewPointerObj((void *) * arg2, SWIGTYPE_p_idmef_user, 0); } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_target_get_process(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_target_t *arg1 = (idmef_target_t *) 0 ; PyObject * obj0 = 0 ; idmef_process_t *result = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:idmef_target_get_process",&obj0)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_target, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { Py_BEGIN_ALLOW_THREADS result = (idmef_process_t *)idmef_target_get_process(arg1); Py_END_ALLOW_THREADS } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_idmef_process, 0 | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_target_set_process(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_target_t *arg1 = (idmef_target_t *) 0 ; idmef_process_t *arg2 = (idmef_process_t *) 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:idmef_target_set_process",&obj0,&obj1)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_target, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { if ( obj1 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj1, (void **)&arg2, SWIGTYPE_p_idmef_process, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { Py_BEGIN_ALLOW_THREADS idmef_target_set_process(arg1,arg2); Py_END_ALLOW_THREADS } resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_target_new_process(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_target_t *arg1 = (idmef_target_t *) 0 ; idmef_process_t **arg2 = (idmef_process_t **) 0 ; idmef_process_t *tmp2 ; PyObject * obj0 = 0 ; int result; { arg2 = (idmef_process_t **) &tmp2; } if (!PyArg_ParseTuple(args,(char *)"O:idmef_target_new_process",&obj0)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_target, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { Py_BEGIN_ALLOW_THREADS result = (int)idmef_target_new_process(arg1,arg2); Py_END_ALLOW_THREADS } { if ( result < 0 ) { swig_python_raise_exception(result); resultobj = NULL; } else { resultobj = PyInt_FromLong(result); } } { if ( result >= 0 ) resultobj = SWIG_NewPointerObj((void *) * arg2, SWIGTYPE_p_idmef_process, 0); } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_target_get_service(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_target_t *arg1 = (idmef_target_t *) 0 ; PyObject * obj0 = 0 ; idmef_service_t *result = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:idmef_target_get_service",&obj0)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_target, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { Py_BEGIN_ALLOW_THREADS result = (idmef_service_t *)idmef_target_get_service(arg1); Py_END_ALLOW_THREADS } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_idmef_service, 0 | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_target_set_service(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_target_t *arg1 = (idmef_target_t *) 0 ; idmef_service_t *arg2 = (idmef_service_t *) 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:idmef_target_set_service",&obj0,&obj1)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_target, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { if ( obj1 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj1, (void **)&arg2, SWIGTYPE_p_idmef_service, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { Py_BEGIN_ALLOW_THREADS idmef_target_set_service(arg1,arg2); Py_END_ALLOW_THREADS } resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_target_new_service(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_target_t *arg1 = (idmef_target_t *) 0 ; idmef_service_t **arg2 = (idmef_service_t **) 0 ; idmef_service_t *tmp2 ; PyObject * obj0 = 0 ; int result; { arg2 = (idmef_service_t **) &tmp2; } if (!PyArg_ParseTuple(args,(char *)"O:idmef_target_new_service",&obj0)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_target, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { Py_BEGIN_ALLOW_THREADS result = (int)idmef_target_new_service(arg1,arg2); Py_END_ALLOW_THREADS } { if ( result < 0 ) { swig_python_raise_exception(result); resultobj = NULL; } else { resultobj = PyInt_FromLong(result); } } { if ( result >= 0 ) resultobj = SWIG_NewPointerObj((void *) * arg2, SWIGTYPE_p_idmef_service, 0); } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_target_get_next_file(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_target_t *arg1 = (idmef_target_t *) 0 ; idmef_file_t *arg2 = (idmef_file_t *) 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; idmef_file_t *result = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:idmef_target_get_next_file",&obj0,&obj1)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_target, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { if ( obj1 == Py_None ) { arg2 = NULL; } else { if ( SWIG_ConvertPtr(obj1, (void **)&arg2, SWIGTYPE_p_idmef_file, SWIG_POINTER_EXCEPTION|0) ) return NULL; } } { Py_BEGIN_ALLOW_THREADS result = (idmef_file_t *)idmef_target_get_next_file(arg1,arg2); Py_END_ALLOW_THREADS } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_idmef_file, 0 | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_target_set_file(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_target_t *arg1 = (idmef_target_t *) 0 ; idmef_file_t *arg2 = (idmef_file_t *) 0 ; int arg3 ; int val3 ; int ecode3 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; PyObject * obj2 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OOO:idmef_target_set_file",&obj0,&obj1,&obj2)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_target, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { if ( obj1 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj1, (void **)&arg2, SWIGTYPE_p_idmef_file, SWIG_POINTER_EXCEPTION|0) ) return NULL; } ecode3 = SWIG_AsVal_int(obj2, &val3); if (!SWIG_IsOK(ecode3)) { SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "idmef_target_set_file" "', argument " "3"" of type '" "int""'"); } arg3 = (int)(val3); { Py_BEGIN_ALLOW_THREADS idmef_target_set_file(arg1,arg2,arg3); Py_END_ALLOW_THREADS } resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_target_new_file(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_target_t *arg1 = (idmef_target_t *) 0 ; idmef_file_t **arg2 = (idmef_file_t **) 0 ; int arg3 ; idmef_file_t *tmp2 ; int val3 ; int ecode3 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; int result; { arg2 = (idmef_file_t **) &tmp2; } if (!PyArg_ParseTuple(args,(char *)"OO:idmef_target_new_file",&obj0,&obj1)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_target, SWIG_POINTER_EXCEPTION|0) ) return NULL; } ecode3 = SWIG_AsVal_int(obj1, &val3); if (!SWIG_IsOK(ecode3)) { SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "idmef_target_new_file" "', argument " "3"" of type '" "int""'"); } arg3 = (int)(val3); { Py_BEGIN_ALLOW_THREADS result = (int)idmef_target_new_file(arg1,arg2,arg3); Py_END_ALLOW_THREADS } { if ( result < 0 ) { swig_python_raise_exception(result); resultobj = NULL; } else { resultobj = PyInt_FromLong(result); } } { if ( result >= 0 ) resultobj = SWIG_NewPointerObj((void *) * arg2, SWIGTYPE_p_idmef_file, 0); } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_analyzer_new(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_analyzer_t **arg1 = (idmef_analyzer_t **) 0 ; idmef_analyzer_t *tmp1 ; int result; { arg1 = (idmef_analyzer_t **) &tmp1; } if (!PyArg_ParseTuple(args,(char *)":idmef_analyzer_new")) SWIG_fail; { Py_BEGIN_ALLOW_THREADS result = (int)idmef_analyzer_new(arg1); Py_END_ALLOW_THREADS } { if ( result < 0 ) { swig_python_raise_exception(result); resultobj = NULL; } else { resultobj = PyInt_FromLong(result); } } { if ( result >= 0 ) resultobj = SWIG_NewPointerObj((void *) * arg1, SWIGTYPE_p_idmef_analyzer, 0); } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_analyzer_copy(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_analyzer_t *arg1 = (idmef_analyzer_t *) 0 ; idmef_analyzer_t *arg2 = (idmef_analyzer_t *) 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; int result; if (!PyArg_ParseTuple(args,(char *)"OO:idmef_analyzer_copy",&obj0,&obj1)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_analyzer, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { if ( obj1 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj1, (void **)&arg2, SWIGTYPE_p_idmef_analyzer, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { Py_BEGIN_ALLOW_THREADS result = (int)idmef_analyzer_copy((struct idmef_analyzer const *)arg1,arg2); Py_END_ALLOW_THREADS } { if ( result < 0 ) { swig_python_raise_exception(result); resultobj = NULL; } else { resultobj = PyInt_FromLong(result); } } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_analyzer_clone(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_analyzer_t *arg1 = (idmef_analyzer_t *) 0 ; idmef_analyzer_t **arg2 = (idmef_analyzer_t **) 0 ; idmef_analyzer_t *tmp2 ; PyObject * obj0 = 0 ; int result; { arg2 = (idmef_analyzer_t **) &tmp2; } if (!PyArg_ParseTuple(args,(char *)"O:idmef_analyzer_clone",&obj0)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_analyzer, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { Py_BEGIN_ALLOW_THREADS result = (int)idmef_analyzer_clone(arg1,arg2); Py_END_ALLOW_THREADS } { if ( result < 0 ) { swig_python_raise_exception(result); resultobj = NULL; } else { resultobj = PyInt_FromLong(result); } } { if ( result >= 0 ) resultobj = SWIG_NewPointerObj((void *) * arg2, SWIGTYPE_p_idmef_analyzer, 0); } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_analyzer_compare(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_analyzer_t *arg1 = (idmef_analyzer_t *) 0 ; idmef_analyzer_t *arg2 = (idmef_analyzer_t *) 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; int result; if (!PyArg_ParseTuple(args,(char *)"OO:idmef_analyzer_compare",&obj0,&obj1)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_analyzer, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { if ( obj1 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj1, (void **)&arg2, SWIGTYPE_p_idmef_analyzer, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { Py_BEGIN_ALLOW_THREADS result = (int)idmef_analyzer_compare((struct idmef_analyzer const *)arg1,(struct idmef_analyzer const *)arg2); Py_END_ALLOW_THREADS } { resultobj = PyInt_FromLong(result); } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_analyzer_ref(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_analyzer_t *arg1 = (idmef_analyzer_t *) 0 ; PyObject * obj0 = 0 ; idmef_analyzer_t *result = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:idmef_analyzer_ref",&obj0)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_analyzer, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { Py_BEGIN_ALLOW_THREADS result = (idmef_analyzer_t *)idmef_analyzer_ref(arg1); Py_END_ALLOW_THREADS } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_idmef_analyzer, 0 | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_analyzer_destroy(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_analyzer_t *arg1 = (idmef_analyzer_t *) 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:idmef_analyzer_destroy",&obj0)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_analyzer, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { Py_BEGIN_ALLOW_THREADS idmef_analyzer_destroy(arg1); Py_END_ALLOW_THREADS } resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_analyzer_get_analyzerid(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_analyzer_t *arg1 = (idmef_analyzer_t *) 0 ; PyObject * obj0 = 0 ; prelude_string_t *result = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:idmef_analyzer_get_analyzerid",&obj0)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_analyzer, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { Py_BEGIN_ALLOW_THREADS result = (prelude_string_t *)idmef_analyzer_get_analyzerid(arg1); Py_END_ALLOW_THREADS } { resultobj = swig_python_string(result); } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_analyzer_set_analyzerid(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_analyzer_t *arg1 = (idmef_analyzer_t *) 0 ; prelude_string_t *arg2 = (prelude_string_t *) 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:idmef_analyzer_set_analyzerid",&obj0,&obj1)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_analyzer, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { int ret; ret = prelude_string_new_dup_fast(&(arg2), PyString_AsString(obj1), PyString_Size(obj1)); if ( ret < 0 ) { swig_python_raise_exception(ret); return NULL; } } { Py_BEGIN_ALLOW_THREADS idmef_analyzer_set_analyzerid(arg1,arg2); Py_END_ALLOW_THREADS } resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_analyzer_new_analyzerid(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_analyzer_t *arg1 = (idmef_analyzer_t *) 0 ; prelude_string_t **arg2 = (prelude_string_t **) 0 ; void *argp2 = 0 ; int res2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; int result; if (!PyArg_ParseTuple(args,(char *)"OO:idmef_analyzer_new_analyzerid",&obj0,&obj1)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_analyzer, SWIG_POINTER_EXCEPTION|0) ) return NULL; } res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_p_prelude_string_t, 0 | 0 ); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "idmef_analyzer_new_analyzerid" "', argument " "2"" of type '" "prelude_string_t **""'"); } arg2 = (prelude_string_t **)(argp2); { Py_BEGIN_ALLOW_THREADS result = (int)idmef_analyzer_new_analyzerid(arg1,arg2); Py_END_ALLOW_THREADS } { if ( result < 0 ) { swig_python_raise_exception(result); resultobj = NULL; } else { resultobj = PyInt_FromLong(result); } } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_analyzer_get_name(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_analyzer_t *arg1 = (idmef_analyzer_t *) 0 ; PyObject * obj0 = 0 ; prelude_string_t *result = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:idmef_analyzer_get_name",&obj0)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_analyzer, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { Py_BEGIN_ALLOW_THREADS result = (prelude_string_t *)idmef_analyzer_get_name(arg1); Py_END_ALLOW_THREADS } { resultobj = swig_python_string(result); } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_analyzer_set_name(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_analyzer_t *arg1 = (idmef_analyzer_t *) 0 ; prelude_string_t *arg2 = (prelude_string_t *) 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:idmef_analyzer_set_name",&obj0,&obj1)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_analyzer, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { int ret; ret = prelude_string_new_dup_fast(&(arg2), PyString_AsString(obj1), PyString_Size(obj1)); if ( ret < 0 ) { swig_python_raise_exception(ret); return NULL; } } { Py_BEGIN_ALLOW_THREADS idmef_analyzer_set_name(arg1,arg2); Py_END_ALLOW_THREADS } resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_analyzer_new_name(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_analyzer_t *arg1 = (idmef_analyzer_t *) 0 ; prelude_string_t **arg2 = (prelude_string_t **) 0 ; void *argp2 = 0 ; int res2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; int result; if (!PyArg_ParseTuple(args,(char *)"OO:idmef_analyzer_new_name",&obj0,&obj1)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_analyzer, SWIG_POINTER_EXCEPTION|0) ) return NULL; } res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_p_prelude_string_t, 0 | 0 ); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "idmef_analyzer_new_name" "', argument " "2"" of type '" "prelude_string_t **""'"); } arg2 = (prelude_string_t **)(argp2); { Py_BEGIN_ALLOW_THREADS result = (int)idmef_analyzer_new_name(arg1,arg2); Py_END_ALLOW_THREADS } { if ( result < 0 ) { swig_python_raise_exception(result); resultobj = NULL; } else { resultobj = PyInt_FromLong(result); } } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_analyzer_get_manufacturer(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_analyzer_t *arg1 = (idmef_analyzer_t *) 0 ; PyObject * obj0 = 0 ; prelude_string_t *result = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:idmef_analyzer_get_manufacturer",&obj0)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_analyzer, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { Py_BEGIN_ALLOW_THREADS result = (prelude_string_t *)idmef_analyzer_get_manufacturer(arg1); Py_END_ALLOW_THREADS } { resultobj = swig_python_string(result); } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_analyzer_set_manufacturer(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_analyzer_t *arg1 = (idmef_analyzer_t *) 0 ; prelude_string_t *arg2 = (prelude_string_t *) 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:idmef_analyzer_set_manufacturer",&obj0,&obj1)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_analyzer, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { int ret; ret = prelude_string_new_dup_fast(&(arg2), PyString_AsString(obj1), PyString_Size(obj1)); if ( ret < 0 ) { swig_python_raise_exception(ret); return NULL; } } { Py_BEGIN_ALLOW_THREADS idmef_analyzer_set_manufacturer(arg1,arg2); Py_END_ALLOW_THREADS } resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_analyzer_new_manufacturer(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_analyzer_t *arg1 = (idmef_analyzer_t *) 0 ; prelude_string_t **arg2 = (prelude_string_t **) 0 ; void *argp2 = 0 ; int res2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; int result; if (!PyArg_ParseTuple(args,(char *)"OO:idmef_analyzer_new_manufacturer",&obj0,&obj1)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_analyzer, SWIG_POINTER_EXCEPTION|0) ) return NULL; } res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_p_prelude_string_t, 0 | 0 ); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "idmef_analyzer_new_manufacturer" "', argument " "2"" of type '" "prelude_string_t **""'"); } arg2 = (prelude_string_t **)(argp2); { Py_BEGIN_ALLOW_THREADS result = (int)idmef_analyzer_new_manufacturer(arg1,arg2); Py_END_ALLOW_THREADS } { if ( result < 0 ) { swig_python_raise_exception(result); resultobj = NULL; } else { resultobj = PyInt_FromLong(result); } } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_analyzer_get_model(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_analyzer_t *arg1 = (idmef_analyzer_t *) 0 ; PyObject * obj0 = 0 ; prelude_string_t *result = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:idmef_analyzer_get_model",&obj0)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_analyzer, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { Py_BEGIN_ALLOW_THREADS result = (prelude_string_t *)idmef_analyzer_get_model(arg1); Py_END_ALLOW_THREADS } { resultobj = swig_python_string(result); } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_analyzer_set_model(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_analyzer_t *arg1 = (idmef_analyzer_t *) 0 ; prelude_string_t *arg2 = (prelude_string_t *) 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:idmef_analyzer_set_model",&obj0,&obj1)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_analyzer, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { int ret; ret = prelude_string_new_dup_fast(&(arg2), PyString_AsString(obj1), PyString_Size(obj1)); if ( ret < 0 ) { swig_python_raise_exception(ret); return NULL; } } { Py_BEGIN_ALLOW_THREADS idmef_analyzer_set_model(arg1,arg2); Py_END_ALLOW_THREADS } resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_analyzer_new_model(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_analyzer_t *arg1 = (idmef_analyzer_t *) 0 ; prelude_string_t **arg2 = (prelude_string_t **) 0 ; void *argp2 = 0 ; int res2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; int result; if (!PyArg_ParseTuple(args,(char *)"OO:idmef_analyzer_new_model",&obj0,&obj1)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_analyzer, SWIG_POINTER_EXCEPTION|0) ) return NULL; } res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_p_prelude_string_t, 0 | 0 ); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "idmef_analyzer_new_model" "', argument " "2"" of type '" "prelude_string_t **""'"); } arg2 = (prelude_string_t **)(argp2); { Py_BEGIN_ALLOW_THREADS result = (int)idmef_analyzer_new_model(arg1,arg2); Py_END_ALLOW_THREADS } { if ( result < 0 ) { swig_python_raise_exception(result); resultobj = NULL; } else { resultobj = PyInt_FromLong(result); } } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_analyzer_get_version(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_analyzer_t *arg1 = (idmef_analyzer_t *) 0 ; PyObject * obj0 = 0 ; prelude_string_t *result = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:idmef_analyzer_get_version",&obj0)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_analyzer, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { Py_BEGIN_ALLOW_THREADS result = (prelude_string_t *)idmef_analyzer_get_version(arg1); Py_END_ALLOW_THREADS } { resultobj = swig_python_string(result); } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_analyzer_set_version(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_analyzer_t *arg1 = (idmef_analyzer_t *) 0 ; prelude_string_t *arg2 = (prelude_string_t *) 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:idmef_analyzer_set_version",&obj0,&obj1)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_analyzer, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { int ret; ret = prelude_string_new_dup_fast(&(arg2), PyString_AsString(obj1), PyString_Size(obj1)); if ( ret < 0 ) { swig_python_raise_exception(ret); return NULL; } } { Py_BEGIN_ALLOW_THREADS idmef_analyzer_set_version(arg1,arg2); Py_END_ALLOW_THREADS } resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_analyzer_new_version(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_analyzer_t *arg1 = (idmef_analyzer_t *) 0 ; prelude_string_t **arg2 = (prelude_string_t **) 0 ; void *argp2 = 0 ; int res2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; int result; if (!PyArg_ParseTuple(args,(char *)"OO:idmef_analyzer_new_version",&obj0,&obj1)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_analyzer, SWIG_POINTER_EXCEPTION|0) ) return NULL; } res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_p_prelude_string_t, 0 | 0 ); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "idmef_analyzer_new_version" "', argument " "2"" of type '" "prelude_string_t **""'"); } arg2 = (prelude_string_t **)(argp2); { Py_BEGIN_ALLOW_THREADS result = (int)idmef_analyzer_new_version(arg1,arg2); Py_END_ALLOW_THREADS } { if ( result < 0 ) { swig_python_raise_exception(result); resultobj = NULL; } else { resultobj = PyInt_FromLong(result); } } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_analyzer_get_class(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_analyzer_t *arg1 = (idmef_analyzer_t *) 0 ; PyObject * obj0 = 0 ; prelude_string_t *result = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:idmef_analyzer_get_class",&obj0)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_analyzer, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { Py_BEGIN_ALLOW_THREADS result = (prelude_string_t *)idmef_analyzer_get_class(arg1); Py_END_ALLOW_THREADS } { resultobj = swig_python_string(result); } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_analyzer_set_class(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_analyzer_t *arg1 = (idmef_analyzer_t *) 0 ; prelude_string_t *arg2 = (prelude_string_t *) 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:idmef_analyzer_set_class",&obj0,&obj1)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_analyzer, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { int ret; ret = prelude_string_new_dup_fast(&(arg2), PyString_AsString(obj1), PyString_Size(obj1)); if ( ret < 0 ) { swig_python_raise_exception(ret); return NULL; } } { Py_BEGIN_ALLOW_THREADS idmef_analyzer_set_class(arg1,arg2); Py_END_ALLOW_THREADS } resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_analyzer_new_class(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_analyzer_t *arg1 = (idmef_analyzer_t *) 0 ; prelude_string_t **arg2 = (prelude_string_t **) 0 ; void *argp2 = 0 ; int res2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; int result; if (!PyArg_ParseTuple(args,(char *)"OO:idmef_analyzer_new_class",&obj0,&obj1)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_analyzer, SWIG_POINTER_EXCEPTION|0) ) return NULL; } res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_p_prelude_string_t, 0 | 0 ); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "idmef_analyzer_new_class" "', argument " "2"" of type '" "prelude_string_t **""'"); } arg2 = (prelude_string_t **)(argp2); { Py_BEGIN_ALLOW_THREADS result = (int)idmef_analyzer_new_class(arg1,arg2); Py_END_ALLOW_THREADS } { if ( result < 0 ) { swig_python_raise_exception(result); resultobj = NULL; } else { resultobj = PyInt_FromLong(result); } } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_analyzer_get_ostype(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_analyzer_t *arg1 = (idmef_analyzer_t *) 0 ; PyObject * obj0 = 0 ; prelude_string_t *result = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:idmef_analyzer_get_ostype",&obj0)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_analyzer, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { Py_BEGIN_ALLOW_THREADS result = (prelude_string_t *)idmef_analyzer_get_ostype(arg1); Py_END_ALLOW_THREADS } { resultobj = swig_python_string(result); } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_analyzer_set_ostype(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_analyzer_t *arg1 = (idmef_analyzer_t *) 0 ; prelude_string_t *arg2 = (prelude_string_t *) 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:idmef_analyzer_set_ostype",&obj0,&obj1)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_analyzer, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { int ret; ret = prelude_string_new_dup_fast(&(arg2), PyString_AsString(obj1), PyString_Size(obj1)); if ( ret < 0 ) { swig_python_raise_exception(ret); return NULL; } } { Py_BEGIN_ALLOW_THREADS idmef_analyzer_set_ostype(arg1,arg2); Py_END_ALLOW_THREADS } resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_analyzer_new_ostype(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_analyzer_t *arg1 = (idmef_analyzer_t *) 0 ; prelude_string_t **arg2 = (prelude_string_t **) 0 ; void *argp2 = 0 ; int res2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; int result; if (!PyArg_ParseTuple(args,(char *)"OO:idmef_analyzer_new_ostype",&obj0,&obj1)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_analyzer, SWIG_POINTER_EXCEPTION|0) ) return NULL; } res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_p_prelude_string_t, 0 | 0 ); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "idmef_analyzer_new_ostype" "', argument " "2"" of type '" "prelude_string_t **""'"); } arg2 = (prelude_string_t **)(argp2); { Py_BEGIN_ALLOW_THREADS result = (int)idmef_analyzer_new_ostype(arg1,arg2); Py_END_ALLOW_THREADS } { if ( result < 0 ) { swig_python_raise_exception(result); resultobj = NULL; } else { resultobj = PyInt_FromLong(result); } } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_analyzer_get_osversion(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_analyzer_t *arg1 = (idmef_analyzer_t *) 0 ; PyObject * obj0 = 0 ; prelude_string_t *result = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:idmef_analyzer_get_osversion",&obj0)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_analyzer, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { Py_BEGIN_ALLOW_THREADS result = (prelude_string_t *)idmef_analyzer_get_osversion(arg1); Py_END_ALLOW_THREADS } { resultobj = swig_python_string(result); } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_analyzer_set_osversion(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_analyzer_t *arg1 = (idmef_analyzer_t *) 0 ; prelude_string_t *arg2 = (prelude_string_t *) 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:idmef_analyzer_set_osversion",&obj0,&obj1)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_analyzer, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { int ret; ret = prelude_string_new_dup_fast(&(arg2), PyString_AsString(obj1), PyString_Size(obj1)); if ( ret < 0 ) { swig_python_raise_exception(ret); return NULL; } } { Py_BEGIN_ALLOW_THREADS idmef_analyzer_set_osversion(arg1,arg2); Py_END_ALLOW_THREADS } resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_analyzer_new_osversion(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_analyzer_t *arg1 = (idmef_analyzer_t *) 0 ; prelude_string_t **arg2 = (prelude_string_t **) 0 ; void *argp2 = 0 ; int res2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; int result; if (!PyArg_ParseTuple(args,(char *)"OO:idmef_analyzer_new_osversion",&obj0,&obj1)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_analyzer, SWIG_POINTER_EXCEPTION|0) ) return NULL; } res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_p_prelude_string_t, 0 | 0 ); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "idmef_analyzer_new_osversion" "', argument " "2"" of type '" "prelude_string_t **""'"); } arg2 = (prelude_string_t **)(argp2); { Py_BEGIN_ALLOW_THREADS result = (int)idmef_analyzer_new_osversion(arg1,arg2); Py_END_ALLOW_THREADS } { if ( result < 0 ) { swig_python_raise_exception(result); resultobj = NULL; } else { resultobj = PyInt_FromLong(result); } } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_analyzer_get_node(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_analyzer_t *arg1 = (idmef_analyzer_t *) 0 ; PyObject * obj0 = 0 ; idmef_node_t *result = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:idmef_analyzer_get_node",&obj0)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_analyzer, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { Py_BEGIN_ALLOW_THREADS result = (idmef_node_t *)idmef_analyzer_get_node(arg1); Py_END_ALLOW_THREADS } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_idmef_node, 0 | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_analyzer_set_node(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_analyzer_t *arg1 = (idmef_analyzer_t *) 0 ; idmef_node_t *arg2 = (idmef_node_t *) 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:idmef_analyzer_set_node",&obj0,&obj1)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_analyzer, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { if ( obj1 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj1, (void **)&arg2, SWIGTYPE_p_idmef_node, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { Py_BEGIN_ALLOW_THREADS idmef_analyzer_set_node(arg1,arg2); Py_END_ALLOW_THREADS } resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_analyzer_new_node(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_analyzer_t *arg1 = (idmef_analyzer_t *) 0 ; idmef_node_t **arg2 = (idmef_node_t **) 0 ; idmef_node_t *tmp2 ; PyObject * obj0 = 0 ; int result; { arg2 = (idmef_node_t **) &tmp2; } if (!PyArg_ParseTuple(args,(char *)"O:idmef_analyzer_new_node",&obj0)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_analyzer, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { Py_BEGIN_ALLOW_THREADS result = (int)idmef_analyzer_new_node(arg1,arg2); Py_END_ALLOW_THREADS } { if ( result < 0 ) { swig_python_raise_exception(result); resultobj = NULL; } else { resultobj = PyInt_FromLong(result); } } { if ( result >= 0 ) resultobj = SWIG_NewPointerObj((void *) * arg2, SWIGTYPE_p_idmef_node, 0); } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_analyzer_get_process(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_analyzer_t *arg1 = (idmef_analyzer_t *) 0 ; PyObject * obj0 = 0 ; idmef_process_t *result = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:idmef_analyzer_get_process",&obj0)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_analyzer, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { Py_BEGIN_ALLOW_THREADS result = (idmef_process_t *)idmef_analyzer_get_process(arg1); Py_END_ALLOW_THREADS } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_idmef_process, 0 | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_analyzer_set_process(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_analyzer_t *arg1 = (idmef_analyzer_t *) 0 ; idmef_process_t *arg2 = (idmef_process_t *) 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:idmef_analyzer_set_process",&obj0,&obj1)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_analyzer, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { if ( obj1 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj1, (void **)&arg2, SWIGTYPE_p_idmef_process, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { Py_BEGIN_ALLOW_THREADS idmef_analyzer_set_process(arg1,arg2); Py_END_ALLOW_THREADS } resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_analyzer_new_process(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_analyzer_t *arg1 = (idmef_analyzer_t *) 0 ; idmef_process_t **arg2 = (idmef_process_t **) 0 ; idmef_process_t *tmp2 ; PyObject * obj0 = 0 ; int result; { arg2 = (idmef_process_t **) &tmp2; } if (!PyArg_ParseTuple(args,(char *)"O:idmef_analyzer_new_process",&obj0)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_analyzer, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { Py_BEGIN_ALLOW_THREADS result = (int)idmef_analyzer_new_process(arg1,arg2); Py_END_ALLOW_THREADS } { if ( result < 0 ) { swig_python_raise_exception(result); resultobj = NULL; } else { resultobj = PyInt_FromLong(result); } } { if ( result >= 0 ) resultobj = SWIG_NewPointerObj((void *) * arg2, SWIGTYPE_p_idmef_process, 0); } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_alertident_new(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_alertident_t **arg1 = (idmef_alertident_t **) 0 ; PyObject * obj0 = 0 ; int result; if (!PyArg_ParseTuple(args,(char *)"O:idmef_alertident_new",&obj0)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_p_idmef_alertident, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { Py_BEGIN_ALLOW_THREADS result = (int)idmef_alertident_new(arg1); Py_END_ALLOW_THREADS } { if ( result < 0 ) { swig_python_raise_exception(result); resultobj = NULL; } else { resultobj = PyInt_FromLong(result); } } { if ( result >= 0 ) resultobj = SWIG_NewPointerObj((void *) * arg1, SWIGTYPE_p_idmef_alertident, 0); } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_alertident_copy(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_alertident_t *arg1 = (idmef_alertident_t *) 0 ; idmef_alertident_t *arg2 = (idmef_alertident_t *) 0 ; void *argp1 = 0 ; int res1 = 0 ; void *argp2 = 0 ; int res2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; int result; if (!PyArg_ParseTuple(args,(char *)"OO:idmef_alertident_copy",&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_idmef_alertident, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "idmef_alertident_copy" "', argument " "1"" of type '" "idmef_alertident_t const *""'"); } arg1 = (idmef_alertident_t *)(argp1); res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_idmef_alertident, 0 | 0 ); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "idmef_alertident_copy" "', argument " "2"" of type '" "idmef_alertident_t *""'"); } arg2 = (idmef_alertident_t *)(argp2); { Py_BEGIN_ALLOW_THREADS result = (int)idmef_alertident_copy((struct idmef_alertident const *)arg1,arg2); Py_END_ALLOW_THREADS } { if ( result < 0 ) { swig_python_raise_exception(result); resultobj = NULL; } else { resultobj = PyInt_FromLong(result); } } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_alertident_clone(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_alertident_t *arg1 = (idmef_alertident_t *) 0 ; idmef_alertident_t **arg2 = (idmef_alertident_t **) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; int result; if (!PyArg_ParseTuple(args,(char *)"OO:idmef_alertident_clone",&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_idmef_alertident, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "idmef_alertident_clone" "', argument " "1"" of type '" "idmef_alertident_t *""'"); } arg1 = (idmef_alertident_t *)(argp1); { if ( obj1 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj1, (void **)&arg2, SWIGTYPE_p_p_idmef_alertident, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { Py_BEGIN_ALLOW_THREADS result = (int)idmef_alertident_clone(arg1,arg2); Py_END_ALLOW_THREADS } { if ( result < 0 ) { swig_python_raise_exception(result); resultobj = NULL; } else { resultobj = PyInt_FromLong(result); } } { if ( result >= 0 ) resultobj = SWIG_NewPointerObj((void *) * arg2, SWIGTYPE_p_idmef_alertident, 0); } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_alertident_compare(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_alertident_t *arg1 = (idmef_alertident_t *) 0 ; idmef_alertident_t *arg2 = (idmef_alertident_t *) 0 ; void *argp1 = 0 ; int res1 = 0 ; void *argp2 = 0 ; int res2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; int result; if (!PyArg_ParseTuple(args,(char *)"OO:idmef_alertident_compare",&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_idmef_alertident, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "idmef_alertident_compare" "', argument " "1"" of type '" "idmef_alertident_t const *""'"); } arg1 = (idmef_alertident_t *)(argp1); res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_idmef_alertident, 0 | 0 ); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "idmef_alertident_compare" "', argument " "2"" of type '" "idmef_alertident_t const *""'"); } arg2 = (idmef_alertident_t *)(argp2); { Py_BEGIN_ALLOW_THREADS result = (int)idmef_alertident_compare((struct idmef_alertident const *)arg1,(struct idmef_alertident const *)arg2); Py_END_ALLOW_THREADS } { resultobj = PyInt_FromLong(result); } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_alertident_ref(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_alertident_t *arg1 = (idmef_alertident_t *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; idmef_alertident_t *result = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:idmef_alertident_ref",&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_idmef_alertident, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "idmef_alertident_ref" "', argument " "1"" of type '" "idmef_alertident_t *""'"); } arg1 = (idmef_alertident_t *)(argp1); { Py_BEGIN_ALLOW_THREADS result = (idmef_alertident_t *)idmef_alertident_ref(arg1); Py_END_ALLOW_THREADS } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_idmef_alertident, 0 | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_alertident_destroy(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_alertident_t *arg1 = (idmef_alertident_t *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:idmef_alertident_destroy",&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_idmef_alertident, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "idmef_alertident_destroy" "', argument " "1"" of type '" "idmef_alertident_t *""'"); } arg1 = (idmef_alertident_t *)(argp1); { Py_BEGIN_ALLOW_THREADS idmef_alertident_destroy(arg1); Py_END_ALLOW_THREADS } resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_alertident_get_alertident(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_alertident_t *arg1 = (idmef_alertident_t *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; prelude_string_t *result = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:idmef_alertident_get_alertident",&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_idmef_alertident, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "idmef_alertident_get_alertident" "', argument " "1"" of type '" "idmef_alertident_t *""'"); } arg1 = (idmef_alertident_t *)(argp1); { Py_BEGIN_ALLOW_THREADS result = (prelude_string_t *)idmef_alertident_get_alertident(arg1); Py_END_ALLOW_THREADS } { resultobj = swig_python_string(result); } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_alertident_set_alertident(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_alertident_t *arg1 = (idmef_alertident_t *) 0 ; prelude_string_t *arg2 = (prelude_string_t *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:idmef_alertident_set_alertident",&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_idmef_alertident, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "idmef_alertident_set_alertident" "', argument " "1"" of type '" "idmef_alertident_t *""'"); } arg1 = (idmef_alertident_t *)(argp1); { int ret; ret = prelude_string_new_dup_fast(&(arg2), PyString_AsString(obj1), PyString_Size(obj1)); if ( ret < 0 ) { swig_python_raise_exception(ret); return NULL; } } { Py_BEGIN_ALLOW_THREADS idmef_alertident_set_alertident(arg1,arg2); Py_END_ALLOW_THREADS } resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_alertident_new_alertident(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_alertident_t *arg1 = (idmef_alertident_t *) 0 ; prelude_string_t **arg2 = (prelude_string_t **) 0 ; void *argp1 = 0 ; int res1 = 0 ; void *argp2 = 0 ; int res2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; int result; if (!PyArg_ParseTuple(args,(char *)"OO:idmef_alertident_new_alertident",&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_idmef_alertident, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "idmef_alertident_new_alertident" "', argument " "1"" of type '" "idmef_alertident_t *""'"); } arg1 = (idmef_alertident_t *)(argp1); res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_p_prelude_string_t, 0 | 0 ); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "idmef_alertident_new_alertident" "', argument " "2"" of type '" "prelude_string_t **""'"); } arg2 = (prelude_string_t **)(argp2); { Py_BEGIN_ALLOW_THREADS result = (int)idmef_alertident_new_alertident(arg1,arg2); Py_END_ALLOW_THREADS } { if ( result < 0 ) { swig_python_raise_exception(result); resultobj = NULL; } else { resultobj = PyInt_FromLong(result); } } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_alertident_get_analyzerid(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_alertident_t *arg1 = (idmef_alertident_t *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; prelude_string_t *result = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:idmef_alertident_get_analyzerid",&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_idmef_alertident, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "idmef_alertident_get_analyzerid" "', argument " "1"" of type '" "idmef_alertident_t *""'"); } arg1 = (idmef_alertident_t *)(argp1); { Py_BEGIN_ALLOW_THREADS result = (prelude_string_t *)idmef_alertident_get_analyzerid(arg1); Py_END_ALLOW_THREADS } { resultobj = swig_python_string(result); } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_alertident_set_analyzerid(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_alertident_t *arg1 = (idmef_alertident_t *) 0 ; prelude_string_t *arg2 = (prelude_string_t *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:idmef_alertident_set_analyzerid",&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_idmef_alertident, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "idmef_alertident_set_analyzerid" "', argument " "1"" of type '" "idmef_alertident_t *""'"); } arg1 = (idmef_alertident_t *)(argp1); { int ret; ret = prelude_string_new_dup_fast(&(arg2), PyString_AsString(obj1), PyString_Size(obj1)); if ( ret < 0 ) { swig_python_raise_exception(ret); return NULL; } } { Py_BEGIN_ALLOW_THREADS idmef_alertident_set_analyzerid(arg1,arg2); Py_END_ALLOW_THREADS } resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_alertident_new_analyzerid(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_alertident_t *arg1 = (idmef_alertident_t *) 0 ; prelude_string_t **arg2 = (prelude_string_t **) 0 ; void *argp1 = 0 ; int res1 = 0 ; void *argp2 = 0 ; int res2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; int result; if (!PyArg_ParseTuple(args,(char *)"OO:idmef_alertident_new_analyzerid",&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_idmef_alertident, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "idmef_alertident_new_analyzerid" "', argument " "1"" of type '" "idmef_alertident_t *""'"); } arg1 = (idmef_alertident_t *)(argp1); res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_p_prelude_string_t, 0 | 0 ); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "idmef_alertident_new_analyzerid" "', argument " "2"" of type '" "prelude_string_t **""'"); } arg2 = (prelude_string_t **)(argp2); { Py_BEGIN_ALLOW_THREADS result = (int)idmef_alertident_new_analyzerid(arg1,arg2); Py_END_ALLOW_THREADS } { if ( result < 0 ) { swig_python_raise_exception(result); resultobj = NULL; } else { resultobj = PyInt_FromLong(result); } } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_impact_severity_to_numeric(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; char *arg1 = (char *) 0 ; PyObject * obj0 = 0 ; idmef_impact_severity_t result; if (!PyArg_ParseTuple(args,(char *)"O:idmef_impact_severity_to_numeric",&obj0)) SWIG_fail; { if ( obj0 == Py_None ) arg1 = NULL; else if ( PyString_Check(obj0) ) arg1 = PyString_AsString(obj0); else { PyErr_Format(PyExc_TypeError, "expected None or string, %s found", obj0->ob_type->tp_name); return NULL; } } { Py_BEGIN_ALLOW_THREADS result = (idmef_impact_severity_t)idmef_impact_severity_to_numeric((char const *)arg1); Py_END_ALLOW_THREADS } resultobj = SWIG_From_int((int)(result)); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_impact_severity_to_string(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_impact_severity_t arg1 ; int val1 ; int ecode1 = 0 ; PyObject * obj0 = 0 ; char *result = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:idmef_impact_severity_to_string",&obj0)) SWIG_fail; ecode1 = SWIG_AsVal_int(obj0, &val1); if (!SWIG_IsOK(ecode1)) { SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "idmef_impact_severity_to_string" "', argument " "1"" of type '" "idmef_impact_severity_t""'"); } arg1 = (idmef_impact_severity_t)(val1); { Py_BEGIN_ALLOW_THREADS result = (char *)idmef_impact_severity_to_string(arg1); Py_END_ALLOW_THREADS } resultobj = SWIG_FromCharPtr((const char *)result); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_impact_completion_to_numeric(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; char *arg1 = (char *) 0 ; PyObject * obj0 = 0 ; idmef_impact_completion_t result; if (!PyArg_ParseTuple(args,(char *)"O:idmef_impact_completion_to_numeric",&obj0)) SWIG_fail; { if ( obj0 == Py_None ) arg1 = NULL; else if ( PyString_Check(obj0) ) arg1 = PyString_AsString(obj0); else { PyErr_Format(PyExc_TypeError, "expected None or string, %s found", obj0->ob_type->tp_name); return NULL; } } { Py_BEGIN_ALLOW_THREADS result = (idmef_impact_completion_t)idmef_impact_completion_to_numeric((char const *)arg1); Py_END_ALLOW_THREADS } resultobj = SWIG_From_int((int)(result)); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_impact_completion_to_string(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_impact_completion_t arg1 ; int val1 ; int ecode1 = 0 ; PyObject * obj0 = 0 ; char *result = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:idmef_impact_completion_to_string",&obj0)) SWIG_fail; ecode1 = SWIG_AsVal_int(obj0, &val1); if (!SWIG_IsOK(ecode1)) { SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "idmef_impact_completion_to_string" "', argument " "1"" of type '" "idmef_impact_completion_t""'"); } arg1 = (idmef_impact_completion_t)(val1); { Py_BEGIN_ALLOW_THREADS result = (char *)idmef_impact_completion_to_string(arg1); Py_END_ALLOW_THREADS } resultobj = SWIG_FromCharPtr((const char *)result); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_impact_type_to_numeric(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; char *arg1 = (char *) 0 ; PyObject * obj0 = 0 ; idmef_impact_type_t result; if (!PyArg_ParseTuple(args,(char *)"O:idmef_impact_type_to_numeric",&obj0)) SWIG_fail; { if ( obj0 == Py_None ) arg1 = NULL; else if ( PyString_Check(obj0) ) arg1 = PyString_AsString(obj0); else { PyErr_Format(PyExc_TypeError, "expected None or string, %s found", obj0->ob_type->tp_name); return NULL; } } { Py_BEGIN_ALLOW_THREADS result = (idmef_impact_type_t)idmef_impact_type_to_numeric((char const *)arg1); Py_END_ALLOW_THREADS } resultobj = SWIG_From_int((int)(result)); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_impact_type_to_string(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_impact_type_t arg1 ; int val1 ; int ecode1 = 0 ; PyObject * obj0 = 0 ; char *result = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:idmef_impact_type_to_string",&obj0)) SWIG_fail; ecode1 = SWIG_AsVal_int(obj0, &val1); if (!SWIG_IsOK(ecode1)) { SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "idmef_impact_type_to_string" "', argument " "1"" of type '" "idmef_impact_type_t""'"); } arg1 = (idmef_impact_type_t)(val1); { Py_BEGIN_ALLOW_THREADS result = (char *)idmef_impact_type_to_string(arg1); Py_END_ALLOW_THREADS } resultobj = SWIG_FromCharPtr((const char *)result); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_impact_new(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_impact_t **arg1 = (idmef_impact_t **) 0 ; idmef_impact_t *tmp1 ; int result; { arg1 = (idmef_impact_t **) &tmp1; } if (!PyArg_ParseTuple(args,(char *)":idmef_impact_new")) SWIG_fail; { Py_BEGIN_ALLOW_THREADS result = (int)idmef_impact_new(arg1); Py_END_ALLOW_THREADS } { if ( result < 0 ) { swig_python_raise_exception(result); resultobj = NULL; } else { resultobj = PyInt_FromLong(result); } } { if ( result >= 0 ) resultobj = SWIG_NewPointerObj((void *) * arg1, SWIGTYPE_p_idmef_impact, 0); } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_impact_copy(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_impact_t *arg1 = (idmef_impact_t *) 0 ; idmef_impact_t *arg2 = (idmef_impact_t *) 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; int result; if (!PyArg_ParseTuple(args,(char *)"OO:idmef_impact_copy",&obj0,&obj1)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_impact, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { if ( obj1 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj1, (void **)&arg2, SWIGTYPE_p_idmef_impact, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { Py_BEGIN_ALLOW_THREADS result = (int)idmef_impact_copy((struct idmef_impact const *)arg1,arg2); Py_END_ALLOW_THREADS } { if ( result < 0 ) { swig_python_raise_exception(result); resultobj = NULL; } else { resultobj = PyInt_FromLong(result); } } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_impact_clone(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_impact_t *arg1 = (idmef_impact_t *) 0 ; idmef_impact_t **arg2 = (idmef_impact_t **) 0 ; idmef_impact_t *tmp2 ; PyObject * obj0 = 0 ; int result; { arg2 = (idmef_impact_t **) &tmp2; } if (!PyArg_ParseTuple(args,(char *)"O:idmef_impact_clone",&obj0)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_impact, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { Py_BEGIN_ALLOW_THREADS result = (int)idmef_impact_clone(arg1,arg2); Py_END_ALLOW_THREADS } { if ( result < 0 ) { swig_python_raise_exception(result); resultobj = NULL; } else { resultobj = PyInt_FromLong(result); } } { if ( result >= 0 ) resultobj = SWIG_NewPointerObj((void *) * arg2, SWIGTYPE_p_idmef_impact, 0); } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_impact_compare(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_impact_t *arg1 = (idmef_impact_t *) 0 ; idmef_impact_t *arg2 = (idmef_impact_t *) 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; int result; if (!PyArg_ParseTuple(args,(char *)"OO:idmef_impact_compare",&obj0,&obj1)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_impact, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { if ( obj1 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj1, (void **)&arg2, SWIGTYPE_p_idmef_impact, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { Py_BEGIN_ALLOW_THREADS result = (int)idmef_impact_compare((struct idmef_impact const *)arg1,(struct idmef_impact const *)arg2); Py_END_ALLOW_THREADS } { resultobj = PyInt_FromLong(result); } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_impact_ref(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_impact_t *arg1 = (idmef_impact_t *) 0 ; PyObject * obj0 = 0 ; idmef_impact_t *result = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:idmef_impact_ref",&obj0)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_impact, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { Py_BEGIN_ALLOW_THREADS result = (idmef_impact_t *)idmef_impact_ref(arg1); Py_END_ALLOW_THREADS } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_idmef_impact, 0 | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_impact_destroy(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_impact_t *arg1 = (idmef_impact_t *) 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:idmef_impact_destroy",&obj0)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_impact, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { Py_BEGIN_ALLOW_THREADS idmef_impact_destroy(arg1); Py_END_ALLOW_THREADS } resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_impact_unset_severity(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_impact_t *arg1 = (idmef_impact_t *) 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:idmef_impact_unset_severity",&obj0)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_impact, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { Py_BEGIN_ALLOW_THREADS idmef_impact_unset_severity(arg1); Py_END_ALLOW_THREADS } resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_impact_get_severity(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_impact_t *arg1 = (idmef_impact_t *) 0 ; PyObject * obj0 = 0 ; idmef_impact_severity_t *result = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:idmef_impact_get_severity",&obj0)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_impact, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { Py_BEGIN_ALLOW_THREADS result = (idmef_impact_severity_t *)idmef_impact_get_severity(arg1); Py_END_ALLOW_THREADS } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_idmef_impact_severity_t, 0 | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_impact_set_severity(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_impact_t *arg1 = (idmef_impact_t *) 0 ; idmef_impact_severity_t arg2 ; int val2 ; int ecode2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:idmef_impact_set_severity",&obj0,&obj1)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_impact, SWIG_POINTER_EXCEPTION|0) ) return NULL; } ecode2 = SWIG_AsVal_int(obj1, &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "idmef_impact_set_severity" "', argument " "2"" of type '" "idmef_impact_severity_t""'"); } arg2 = (idmef_impact_severity_t)(val2); { Py_BEGIN_ALLOW_THREADS idmef_impact_set_severity(arg1,arg2); Py_END_ALLOW_THREADS } resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_impact_new_severity(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_impact_t *arg1 = (idmef_impact_t *) 0 ; idmef_impact_severity_t **arg2 = (idmef_impact_severity_t **) 0 ; void *argp2 = 0 ; int res2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; int result; if (!PyArg_ParseTuple(args,(char *)"OO:idmef_impact_new_severity",&obj0,&obj1)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_impact, SWIG_POINTER_EXCEPTION|0) ) return NULL; } res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_p_idmef_impact_severity_t, 0 | 0 ); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "idmef_impact_new_severity" "', argument " "2"" of type '" "idmef_impact_severity_t **""'"); } arg2 = (idmef_impact_severity_t **)(argp2); { Py_BEGIN_ALLOW_THREADS result = (int)idmef_impact_new_severity(arg1,arg2); Py_END_ALLOW_THREADS } { if ( result < 0 ) { swig_python_raise_exception(result); resultobj = NULL; } else { resultobj = PyInt_FromLong(result); } } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_impact_unset_completion(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_impact_t *arg1 = (idmef_impact_t *) 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:idmef_impact_unset_completion",&obj0)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_impact, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { Py_BEGIN_ALLOW_THREADS idmef_impact_unset_completion(arg1); Py_END_ALLOW_THREADS } resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_impact_get_completion(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_impact_t *arg1 = (idmef_impact_t *) 0 ; PyObject * obj0 = 0 ; idmef_impact_completion_t *result = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:idmef_impact_get_completion",&obj0)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_impact, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { Py_BEGIN_ALLOW_THREADS result = (idmef_impact_completion_t *)idmef_impact_get_completion(arg1); Py_END_ALLOW_THREADS } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_idmef_impact_completion_t, 0 | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_impact_set_completion(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_impact_t *arg1 = (idmef_impact_t *) 0 ; idmef_impact_completion_t arg2 ; int val2 ; int ecode2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:idmef_impact_set_completion",&obj0,&obj1)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_impact, SWIG_POINTER_EXCEPTION|0) ) return NULL; } ecode2 = SWIG_AsVal_int(obj1, &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "idmef_impact_set_completion" "', argument " "2"" of type '" "idmef_impact_completion_t""'"); } arg2 = (idmef_impact_completion_t)(val2); { Py_BEGIN_ALLOW_THREADS idmef_impact_set_completion(arg1,arg2); Py_END_ALLOW_THREADS } resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_impact_new_completion(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_impact_t *arg1 = (idmef_impact_t *) 0 ; idmef_impact_completion_t **arg2 = (idmef_impact_completion_t **) 0 ; void *argp2 = 0 ; int res2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; int result; if (!PyArg_ParseTuple(args,(char *)"OO:idmef_impact_new_completion",&obj0,&obj1)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_impact, SWIG_POINTER_EXCEPTION|0) ) return NULL; } res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_p_idmef_impact_completion_t, 0 | 0 ); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "idmef_impact_new_completion" "', argument " "2"" of type '" "idmef_impact_completion_t **""'"); } arg2 = (idmef_impact_completion_t **)(argp2); { Py_BEGIN_ALLOW_THREADS result = (int)idmef_impact_new_completion(arg1,arg2); Py_END_ALLOW_THREADS } { if ( result < 0 ) { swig_python_raise_exception(result); resultobj = NULL; } else { resultobj = PyInt_FromLong(result); } } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_impact_get_type(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_impact_t *arg1 = (idmef_impact_t *) 0 ; PyObject * obj0 = 0 ; idmef_impact_type_t result; if (!PyArg_ParseTuple(args,(char *)"O:idmef_impact_get_type",&obj0)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_impact, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { Py_BEGIN_ALLOW_THREADS result = (idmef_impact_type_t)idmef_impact_get_type(arg1); Py_END_ALLOW_THREADS } resultobj = SWIG_From_int((int)(result)); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_impact_set_type(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_impact_t *arg1 = (idmef_impact_t *) 0 ; idmef_impact_type_t arg2 ; int val2 ; int ecode2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:idmef_impact_set_type",&obj0,&obj1)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_impact, SWIG_POINTER_EXCEPTION|0) ) return NULL; } ecode2 = SWIG_AsVal_int(obj1, &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "idmef_impact_set_type" "', argument " "2"" of type '" "idmef_impact_type_t""'"); } arg2 = (idmef_impact_type_t)(val2); { Py_BEGIN_ALLOW_THREADS idmef_impact_set_type(arg1,arg2); Py_END_ALLOW_THREADS } resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_impact_new_type(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_impact_t *arg1 = (idmef_impact_t *) 0 ; idmef_impact_type_t **arg2 = (idmef_impact_type_t **) 0 ; void *argp2 = 0 ; int res2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; int result; if (!PyArg_ParseTuple(args,(char *)"OO:idmef_impact_new_type",&obj0,&obj1)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_impact, SWIG_POINTER_EXCEPTION|0) ) return NULL; } res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_p_idmef_impact_type_t, 0 | 0 ); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "idmef_impact_new_type" "', argument " "2"" of type '" "idmef_impact_type_t **""'"); } arg2 = (idmef_impact_type_t **)(argp2); { Py_BEGIN_ALLOW_THREADS result = (int)idmef_impact_new_type(arg1,arg2); Py_END_ALLOW_THREADS } { if ( result < 0 ) { swig_python_raise_exception(result); resultobj = NULL; } else { resultobj = PyInt_FromLong(result); } } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_impact_get_description(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_impact_t *arg1 = (idmef_impact_t *) 0 ; PyObject * obj0 = 0 ; prelude_string_t *result = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:idmef_impact_get_description",&obj0)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_impact, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { Py_BEGIN_ALLOW_THREADS result = (prelude_string_t *)idmef_impact_get_description(arg1); Py_END_ALLOW_THREADS } { resultobj = swig_python_string(result); } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_impact_set_description(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_impact_t *arg1 = (idmef_impact_t *) 0 ; prelude_string_t *arg2 = (prelude_string_t *) 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:idmef_impact_set_description",&obj0,&obj1)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_impact, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { int ret; ret = prelude_string_new_dup_fast(&(arg2), PyString_AsString(obj1), PyString_Size(obj1)); if ( ret < 0 ) { swig_python_raise_exception(ret); return NULL; } } { Py_BEGIN_ALLOW_THREADS idmef_impact_set_description(arg1,arg2); Py_END_ALLOW_THREADS } resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_impact_new_description(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_impact_t *arg1 = (idmef_impact_t *) 0 ; prelude_string_t **arg2 = (prelude_string_t **) 0 ; void *argp2 = 0 ; int res2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; int result; if (!PyArg_ParseTuple(args,(char *)"OO:idmef_impact_new_description",&obj0,&obj1)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_impact, SWIG_POINTER_EXCEPTION|0) ) return NULL; } res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_p_prelude_string_t, 0 | 0 ); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "idmef_impact_new_description" "', argument " "2"" of type '" "prelude_string_t **""'"); } arg2 = (prelude_string_t **)(argp2); { Py_BEGIN_ALLOW_THREADS result = (int)idmef_impact_new_description(arg1,arg2); Py_END_ALLOW_THREADS } { if ( result < 0 ) { swig_python_raise_exception(result); resultobj = NULL; } else { resultobj = PyInt_FromLong(result); } } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_action_category_to_numeric(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; char *arg1 = (char *) 0 ; PyObject * obj0 = 0 ; idmef_action_category_t result; if (!PyArg_ParseTuple(args,(char *)"O:idmef_action_category_to_numeric",&obj0)) SWIG_fail; { if ( obj0 == Py_None ) arg1 = NULL; else if ( PyString_Check(obj0) ) arg1 = PyString_AsString(obj0); else { PyErr_Format(PyExc_TypeError, "expected None or string, %s found", obj0->ob_type->tp_name); return NULL; } } { Py_BEGIN_ALLOW_THREADS result = (idmef_action_category_t)idmef_action_category_to_numeric((char const *)arg1); Py_END_ALLOW_THREADS } resultobj = SWIG_From_int((int)(result)); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_action_category_to_string(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_action_category_t arg1 ; int val1 ; int ecode1 = 0 ; PyObject * obj0 = 0 ; char *result = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:idmef_action_category_to_string",&obj0)) SWIG_fail; ecode1 = SWIG_AsVal_int(obj0, &val1); if (!SWIG_IsOK(ecode1)) { SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "idmef_action_category_to_string" "', argument " "1"" of type '" "idmef_action_category_t""'"); } arg1 = (idmef_action_category_t)(val1); { Py_BEGIN_ALLOW_THREADS result = (char *)idmef_action_category_to_string(arg1); Py_END_ALLOW_THREADS } resultobj = SWIG_FromCharPtr((const char *)result); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_action_new(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_action_t **arg1 = (idmef_action_t **) 0 ; idmef_action_t *tmp1 ; int result; { arg1 = (idmef_action_t **) &tmp1; } if (!PyArg_ParseTuple(args,(char *)":idmef_action_new")) SWIG_fail; { Py_BEGIN_ALLOW_THREADS result = (int)idmef_action_new(arg1); Py_END_ALLOW_THREADS } { if ( result < 0 ) { swig_python_raise_exception(result); resultobj = NULL; } else { resultobj = PyInt_FromLong(result); } } { if ( result >= 0 ) resultobj = SWIG_NewPointerObj((void *) * arg1, SWIGTYPE_p_idmef_action, 0); } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_action_copy(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_action_t *arg1 = (idmef_action_t *) 0 ; idmef_action_t *arg2 = (idmef_action_t *) 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; int result; if (!PyArg_ParseTuple(args,(char *)"OO:idmef_action_copy",&obj0,&obj1)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_action, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { if ( obj1 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj1, (void **)&arg2, SWIGTYPE_p_idmef_action, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { Py_BEGIN_ALLOW_THREADS result = (int)idmef_action_copy((struct idmef_action const *)arg1,arg2); Py_END_ALLOW_THREADS } { if ( result < 0 ) { swig_python_raise_exception(result); resultobj = NULL; } else { resultobj = PyInt_FromLong(result); } } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_action_clone(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_action_t *arg1 = (idmef_action_t *) 0 ; idmef_action_t **arg2 = (idmef_action_t **) 0 ; idmef_action_t *tmp2 ; PyObject * obj0 = 0 ; int result; { arg2 = (idmef_action_t **) &tmp2; } if (!PyArg_ParseTuple(args,(char *)"O:idmef_action_clone",&obj0)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_action, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { Py_BEGIN_ALLOW_THREADS result = (int)idmef_action_clone(arg1,arg2); Py_END_ALLOW_THREADS } { if ( result < 0 ) { swig_python_raise_exception(result); resultobj = NULL; } else { resultobj = PyInt_FromLong(result); } } { if ( result >= 0 ) resultobj = SWIG_NewPointerObj((void *) * arg2, SWIGTYPE_p_idmef_action, 0); } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_action_compare(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_action_t *arg1 = (idmef_action_t *) 0 ; idmef_action_t *arg2 = (idmef_action_t *) 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; int result; if (!PyArg_ParseTuple(args,(char *)"OO:idmef_action_compare",&obj0,&obj1)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_action, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { if ( obj1 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj1, (void **)&arg2, SWIGTYPE_p_idmef_action, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { Py_BEGIN_ALLOW_THREADS result = (int)idmef_action_compare((struct idmef_action const *)arg1,(struct idmef_action const *)arg2); Py_END_ALLOW_THREADS } { resultobj = PyInt_FromLong(result); } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_action_ref(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_action_t *arg1 = (idmef_action_t *) 0 ; PyObject * obj0 = 0 ; idmef_action_t *result = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:idmef_action_ref",&obj0)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_action, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { Py_BEGIN_ALLOW_THREADS result = (idmef_action_t *)idmef_action_ref(arg1); Py_END_ALLOW_THREADS } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_idmef_action, 0 | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_action_destroy(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_action_t *arg1 = (idmef_action_t *) 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:idmef_action_destroy",&obj0)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_action, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { Py_BEGIN_ALLOW_THREADS idmef_action_destroy(arg1); Py_END_ALLOW_THREADS } resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_action_get_category(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_action_t *arg1 = (idmef_action_t *) 0 ; PyObject * obj0 = 0 ; idmef_action_category_t result; if (!PyArg_ParseTuple(args,(char *)"O:idmef_action_get_category",&obj0)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_action, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { Py_BEGIN_ALLOW_THREADS result = (idmef_action_category_t)idmef_action_get_category(arg1); Py_END_ALLOW_THREADS } resultobj = SWIG_From_int((int)(result)); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_action_set_category(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_action_t *arg1 = (idmef_action_t *) 0 ; idmef_action_category_t arg2 ; int val2 ; int ecode2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:idmef_action_set_category",&obj0,&obj1)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_action, SWIG_POINTER_EXCEPTION|0) ) return NULL; } ecode2 = SWIG_AsVal_int(obj1, &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "idmef_action_set_category" "', argument " "2"" of type '" "idmef_action_category_t""'"); } arg2 = (idmef_action_category_t)(val2); { Py_BEGIN_ALLOW_THREADS idmef_action_set_category(arg1,arg2); Py_END_ALLOW_THREADS } resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_action_new_category(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_action_t *arg1 = (idmef_action_t *) 0 ; idmef_action_category_t **arg2 = (idmef_action_category_t **) 0 ; void *argp2 = 0 ; int res2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; int result; if (!PyArg_ParseTuple(args,(char *)"OO:idmef_action_new_category",&obj0,&obj1)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_action, SWIG_POINTER_EXCEPTION|0) ) return NULL; } res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_p_idmef_action_category_t, 0 | 0 ); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "idmef_action_new_category" "', argument " "2"" of type '" "idmef_action_category_t **""'"); } arg2 = (idmef_action_category_t **)(argp2); { Py_BEGIN_ALLOW_THREADS result = (int)idmef_action_new_category(arg1,arg2); Py_END_ALLOW_THREADS } { if ( result < 0 ) { swig_python_raise_exception(result); resultobj = NULL; } else { resultobj = PyInt_FromLong(result); } } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_action_get_description(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_action_t *arg1 = (idmef_action_t *) 0 ; PyObject * obj0 = 0 ; prelude_string_t *result = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:idmef_action_get_description",&obj0)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_action, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { Py_BEGIN_ALLOW_THREADS result = (prelude_string_t *)idmef_action_get_description(arg1); Py_END_ALLOW_THREADS } { resultobj = swig_python_string(result); } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_action_set_description(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_action_t *arg1 = (idmef_action_t *) 0 ; prelude_string_t *arg2 = (prelude_string_t *) 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:idmef_action_set_description",&obj0,&obj1)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_action, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { int ret; ret = prelude_string_new_dup_fast(&(arg2), PyString_AsString(obj1), PyString_Size(obj1)); if ( ret < 0 ) { swig_python_raise_exception(ret); return NULL; } } { Py_BEGIN_ALLOW_THREADS idmef_action_set_description(arg1,arg2); Py_END_ALLOW_THREADS } resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_action_new_description(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_action_t *arg1 = (idmef_action_t *) 0 ; prelude_string_t **arg2 = (prelude_string_t **) 0 ; void *argp2 = 0 ; int res2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; int result; if (!PyArg_ParseTuple(args,(char *)"OO:idmef_action_new_description",&obj0,&obj1)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_action, SWIG_POINTER_EXCEPTION|0) ) return NULL; } res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_p_prelude_string_t, 0 | 0 ); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "idmef_action_new_description" "', argument " "2"" of type '" "prelude_string_t **""'"); } arg2 = (prelude_string_t **)(argp2); { Py_BEGIN_ALLOW_THREADS result = (int)idmef_action_new_description(arg1,arg2); Py_END_ALLOW_THREADS } { if ( result < 0 ) { swig_python_raise_exception(result); resultobj = NULL; } else { resultobj = PyInt_FromLong(result); } } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_confidence_rating_to_numeric(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; char *arg1 = (char *) 0 ; PyObject * obj0 = 0 ; idmef_confidence_rating_t result; if (!PyArg_ParseTuple(args,(char *)"O:idmef_confidence_rating_to_numeric",&obj0)) SWIG_fail; { if ( obj0 == Py_None ) arg1 = NULL; else if ( PyString_Check(obj0) ) arg1 = PyString_AsString(obj0); else { PyErr_Format(PyExc_TypeError, "expected None or string, %s found", obj0->ob_type->tp_name); return NULL; } } { Py_BEGIN_ALLOW_THREADS result = (idmef_confidence_rating_t)idmef_confidence_rating_to_numeric((char const *)arg1); Py_END_ALLOW_THREADS } resultobj = SWIG_From_int((int)(result)); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_confidence_rating_to_string(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_confidence_rating_t arg1 ; int val1 ; int ecode1 = 0 ; PyObject * obj0 = 0 ; char *result = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:idmef_confidence_rating_to_string",&obj0)) SWIG_fail; ecode1 = SWIG_AsVal_int(obj0, &val1); if (!SWIG_IsOK(ecode1)) { SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "idmef_confidence_rating_to_string" "', argument " "1"" of type '" "idmef_confidence_rating_t""'"); } arg1 = (idmef_confidence_rating_t)(val1); { Py_BEGIN_ALLOW_THREADS result = (char *)idmef_confidence_rating_to_string(arg1); Py_END_ALLOW_THREADS } resultobj = SWIG_FromCharPtr((const char *)result); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_confidence_new(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_confidence_t **arg1 = (idmef_confidence_t **) 0 ; idmef_confidence_t *tmp1 ; int result; { arg1 = (idmef_confidence_t **) &tmp1; } if (!PyArg_ParseTuple(args,(char *)":idmef_confidence_new")) SWIG_fail; { Py_BEGIN_ALLOW_THREADS result = (int)idmef_confidence_new(arg1); Py_END_ALLOW_THREADS } { if ( result < 0 ) { swig_python_raise_exception(result); resultobj = NULL; } else { resultobj = PyInt_FromLong(result); } } { if ( result >= 0 ) resultobj = SWIG_NewPointerObj((void *) * arg1, SWIGTYPE_p_idmef_confidence, 0); } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_confidence_copy(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_confidence_t *arg1 = (idmef_confidence_t *) 0 ; idmef_confidence_t *arg2 = (idmef_confidence_t *) 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; int result; if (!PyArg_ParseTuple(args,(char *)"OO:idmef_confidence_copy",&obj0,&obj1)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_confidence, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { if ( obj1 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj1, (void **)&arg2, SWIGTYPE_p_idmef_confidence, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { Py_BEGIN_ALLOW_THREADS result = (int)idmef_confidence_copy((struct idmef_confidence const *)arg1,arg2); Py_END_ALLOW_THREADS } { if ( result < 0 ) { swig_python_raise_exception(result); resultobj = NULL; } else { resultobj = PyInt_FromLong(result); } } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_confidence_clone(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_confidence_t *arg1 = (idmef_confidence_t *) 0 ; idmef_confidence_t **arg2 = (idmef_confidence_t **) 0 ; idmef_confidence_t *tmp2 ; PyObject * obj0 = 0 ; int result; { arg2 = (idmef_confidence_t **) &tmp2; } if (!PyArg_ParseTuple(args,(char *)"O:idmef_confidence_clone",&obj0)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_confidence, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { Py_BEGIN_ALLOW_THREADS result = (int)idmef_confidence_clone(arg1,arg2); Py_END_ALLOW_THREADS } { if ( result < 0 ) { swig_python_raise_exception(result); resultobj = NULL; } else { resultobj = PyInt_FromLong(result); } } { if ( result >= 0 ) resultobj = SWIG_NewPointerObj((void *) * arg2, SWIGTYPE_p_idmef_confidence, 0); } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_confidence_compare(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_confidence_t *arg1 = (idmef_confidence_t *) 0 ; idmef_confidence_t *arg2 = (idmef_confidence_t *) 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; int result; if (!PyArg_ParseTuple(args,(char *)"OO:idmef_confidence_compare",&obj0,&obj1)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_confidence, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { if ( obj1 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj1, (void **)&arg2, SWIGTYPE_p_idmef_confidence, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { Py_BEGIN_ALLOW_THREADS result = (int)idmef_confidence_compare((struct idmef_confidence const *)arg1,(struct idmef_confidence const *)arg2); Py_END_ALLOW_THREADS } { resultobj = PyInt_FromLong(result); } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_confidence_ref(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_confidence_t *arg1 = (idmef_confidence_t *) 0 ; PyObject * obj0 = 0 ; idmef_confidence_t *result = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:idmef_confidence_ref",&obj0)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_confidence, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { Py_BEGIN_ALLOW_THREADS result = (idmef_confidence_t *)idmef_confidence_ref(arg1); Py_END_ALLOW_THREADS } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_idmef_confidence, 0 | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_confidence_destroy(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_confidence_t *arg1 = (idmef_confidence_t *) 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:idmef_confidence_destroy",&obj0)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_confidence, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { Py_BEGIN_ALLOW_THREADS idmef_confidence_destroy(arg1); Py_END_ALLOW_THREADS } resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_confidence_get_rating(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_confidence_t *arg1 = (idmef_confidence_t *) 0 ; PyObject * obj0 = 0 ; idmef_confidence_rating_t result; if (!PyArg_ParseTuple(args,(char *)"O:idmef_confidence_get_rating",&obj0)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_confidence, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { Py_BEGIN_ALLOW_THREADS result = (idmef_confidence_rating_t)idmef_confidence_get_rating(arg1); Py_END_ALLOW_THREADS } resultobj = SWIG_From_int((int)(result)); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_confidence_set_rating(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_confidence_t *arg1 = (idmef_confidence_t *) 0 ; idmef_confidence_rating_t arg2 ; int val2 ; int ecode2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:idmef_confidence_set_rating",&obj0,&obj1)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_confidence, SWIG_POINTER_EXCEPTION|0) ) return NULL; } ecode2 = SWIG_AsVal_int(obj1, &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "idmef_confidence_set_rating" "', argument " "2"" of type '" "idmef_confidence_rating_t""'"); } arg2 = (idmef_confidence_rating_t)(val2); { Py_BEGIN_ALLOW_THREADS idmef_confidence_set_rating(arg1,arg2); Py_END_ALLOW_THREADS } resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_confidence_new_rating(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_confidence_t *arg1 = (idmef_confidence_t *) 0 ; idmef_confidence_rating_t **arg2 = (idmef_confidence_rating_t **) 0 ; void *argp2 = 0 ; int res2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; int result; if (!PyArg_ParseTuple(args,(char *)"OO:idmef_confidence_new_rating",&obj0,&obj1)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_confidence, SWIG_POINTER_EXCEPTION|0) ) return NULL; } res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_p_idmef_confidence_rating_t, 0 | 0 ); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "idmef_confidence_new_rating" "', argument " "2"" of type '" "idmef_confidence_rating_t **""'"); } arg2 = (idmef_confidence_rating_t **)(argp2); { Py_BEGIN_ALLOW_THREADS result = (int)idmef_confidence_new_rating(arg1,arg2); Py_END_ALLOW_THREADS } { if ( result < 0 ) { swig_python_raise_exception(result); resultobj = NULL; } else { resultobj = PyInt_FromLong(result); } } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_confidence_get_confidence(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_confidence_t *arg1 = (idmef_confidence_t *) 0 ; PyObject * obj0 = 0 ; float result; if (!PyArg_ParseTuple(args,(char *)"O:idmef_confidence_get_confidence",&obj0)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_confidence, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { Py_BEGIN_ALLOW_THREADS result = (float)idmef_confidence_get_confidence(arg1); Py_END_ALLOW_THREADS } resultobj = SWIG_From_float((float)(result)); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_confidence_set_confidence(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_confidence_t *arg1 = (idmef_confidence_t *) 0 ; float arg2 ; float val2 ; int ecode2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:idmef_confidence_set_confidence",&obj0,&obj1)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_confidence, SWIG_POINTER_EXCEPTION|0) ) return NULL; } ecode2 = SWIG_AsVal_float(obj1, &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "idmef_confidence_set_confidence" "', argument " "2"" of type '" "float""'"); } arg2 = (float)(val2); { Py_BEGIN_ALLOW_THREADS idmef_confidence_set_confidence(arg1,arg2); Py_END_ALLOW_THREADS } resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_confidence_new_confidence(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_confidence_t *arg1 = (idmef_confidence_t *) 0 ; float **arg2 = (float **) 0 ; void *argp2 = 0 ; int res2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; int result; if (!PyArg_ParseTuple(args,(char *)"OO:idmef_confidence_new_confidence",&obj0,&obj1)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_confidence, SWIG_POINTER_EXCEPTION|0) ) return NULL; } res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_p_float, 0 | 0 ); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "idmef_confidence_new_confidence" "', argument " "2"" of type '" "float **""'"); } arg2 = (float **)(argp2); { Py_BEGIN_ALLOW_THREADS result = (int)idmef_confidence_new_confidence(arg1,arg2); Py_END_ALLOW_THREADS } { if ( result < 0 ) { swig_python_raise_exception(result); resultobj = NULL; } else { resultobj = PyInt_FromLong(result); } } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_assessment_new(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_assessment_t **arg1 = (idmef_assessment_t **) 0 ; idmef_assessment_t *tmp1 ; int result; { arg1 = (idmef_assessment_t **) &tmp1; } if (!PyArg_ParseTuple(args,(char *)":idmef_assessment_new")) SWIG_fail; { Py_BEGIN_ALLOW_THREADS result = (int)idmef_assessment_new(arg1); Py_END_ALLOW_THREADS } { if ( result < 0 ) { swig_python_raise_exception(result); resultobj = NULL; } else { resultobj = PyInt_FromLong(result); } } { if ( result >= 0 ) resultobj = SWIG_NewPointerObj((void *) * arg1, SWIGTYPE_p_idmef_assessment, 0); } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_assessment_copy(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_assessment_t *arg1 = (idmef_assessment_t *) 0 ; idmef_assessment_t *arg2 = (idmef_assessment_t *) 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; int result; if (!PyArg_ParseTuple(args,(char *)"OO:idmef_assessment_copy",&obj0,&obj1)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_assessment, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { if ( obj1 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj1, (void **)&arg2, SWIGTYPE_p_idmef_assessment, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { Py_BEGIN_ALLOW_THREADS result = (int)idmef_assessment_copy((struct idmef_assessment const *)arg1,arg2); Py_END_ALLOW_THREADS } { if ( result < 0 ) { swig_python_raise_exception(result); resultobj = NULL; } else { resultobj = PyInt_FromLong(result); } } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_assessment_clone(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_assessment_t *arg1 = (idmef_assessment_t *) 0 ; idmef_assessment_t **arg2 = (idmef_assessment_t **) 0 ; idmef_assessment_t *tmp2 ; PyObject * obj0 = 0 ; int result; { arg2 = (idmef_assessment_t **) &tmp2; } if (!PyArg_ParseTuple(args,(char *)"O:idmef_assessment_clone",&obj0)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_assessment, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { Py_BEGIN_ALLOW_THREADS result = (int)idmef_assessment_clone(arg1,arg2); Py_END_ALLOW_THREADS } { if ( result < 0 ) { swig_python_raise_exception(result); resultobj = NULL; } else { resultobj = PyInt_FromLong(result); } } { if ( result >= 0 ) resultobj = SWIG_NewPointerObj((void *) * arg2, SWIGTYPE_p_idmef_assessment, 0); } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_assessment_compare(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_assessment_t *arg1 = (idmef_assessment_t *) 0 ; idmef_assessment_t *arg2 = (idmef_assessment_t *) 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; int result; if (!PyArg_ParseTuple(args,(char *)"OO:idmef_assessment_compare",&obj0,&obj1)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_assessment, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { if ( obj1 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj1, (void **)&arg2, SWIGTYPE_p_idmef_assessment, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { Py_BEGIN_ALLOW_THREADS result = (int)idmef_assessment_compare((struct idmef_assessment const *)arg1,(struct idmef_assessment const *)arg2); Py_END_ALLOW_THREADS } { resultobj = PyInt_FromLong(result); } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_assessment_ref(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_assessment_t *arg1 = (idmef_assessment_t *) 0 ; PyObject * obj0 = 0 ; idmef_assessment_t *result = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:idmef_assessment_ref",&obj0)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_assessment, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { Py_BEGIN_ALLOW_THREADS result = (idmef_assessment_t *)idmef_assessment_ref(arg1); Py_END_ALLOW_THREADS } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_idmef_assessment, 0 | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_assessment_destroy(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_assessment_t *arg1 = (idmef_assessment_t *) 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:idmef_assessment_destroy",&obj0)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_assessment, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { Py_BEGIN_ALLOW_THREADS idmef_assessment_destroy(arg1); Py_END_ALLOW_THREADS } resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_assessment_get_impact(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_assessment_t *arg1 = (idmef_assessment_t *) 0 ; PyObject * obj0 = 0 ; idmef_impact_t *result = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:idmef_assessment_get_impact",&obj0)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_assessment, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { Py_BEGIN_ALLOW_THREADS result = (idmef_impact_t *)idmef_assessment_get_impact(arg1); Py_END_ALLOW_THREADS } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_idmef_impact, 0 | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_assessment_set_impact(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_assessment_t *arg1 = (idmef_assessment_t *) 0 ; idmef_impact_t *arg2 = (idmef_impact_t *) 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:idmef_assessment_set_impact",&obj0,&obj1)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_assessment, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { if ( obj1 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj1, (void **)&arg2, SWIGTYPE_p_idmef_impact, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { Py_BEGIN_ALLOW_THREADS idmef_assessment_set_impact(arg1,arg2); Py_END_ALLOW_THREADS } resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_assessment_new_impact(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_assessment_t *arg1 = (idmef_assessment_t *) 0 ; idmef_impact_t **arg2 = (idmef_impact_t **) 0 ; idmef_impact_t *tmp2 ; PyObject * obj0 = 0 ; int result; { arg2 = (idmef_impact_t **) &tmp2; } if (!PyArg_ParseTuple(args,(char *)"O:idmef_assessment_new_impact",&obj0)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_assessment, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { Py_BEGIN_ALLOW_THREADS result = (int)idmef_assessment_new_impact(arg1,arg2); Py_END_ALLOW_THREADS } { if ( result < 0 ) { swig_python_raise_exception(result); resultobj = NULL; } else { resultobj = PyInt_FromLong(result); } } { if ( result >= 0 ) resultobj = SWIG_NewPointerObj((void *) * arg2, SWIGTYPE_p_idmef_impact, 0); } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_assessment_get_next_action(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_assessment_t *arg1 = (idmef_assessment_t *) 0 ; idmef_action_t *arg2 = (idmef_action_t *) 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; idmef_action_t *result = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:idmef_assessment_get_next_action",&obj0,&obj1)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_assessment, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { if ( obj1 == Py_None ) { arg2 = NULL; } else { if ( SWIG_ConvertPtr(obj1, (void **)&arg2, SWIGTYPE_p_idmef_action, SWIG_POINTER_EXCEPTION|0) ) return NULL; } } { Py_BEGIN_ALLOW_THREADS result = (idmef_action_t *)idmef_assessment_get_next_action(arg1,arg2); Py_END_ALLOW_THREADS } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_idmef_action, 0 | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_assessment_set_action(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_assessment_t *arg1 = (idmef_assessment_t *) 0 ; idmef_action_t *arg2 = (idmef_action_t *) 0 ; int arg3 ; int val3 ; int ecode3 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; PyObject * obj2 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OOO:idmef_assessment_set_action",&obj0,&obj1,&obj2)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_assessment, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { if ( obj1 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj1, (void **)&arg2, SWIGTYPE_p_idmef_action, SWIG_POINTER_EXCEPTION|0) ) return NULL; } ecode3 = SWIG_AsVal_int(obj2, &val3); if (!SWIG_IsOK(ecode3)) { SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "idmef_assessment_set_action" "', argument " "3"" of type '" "int""'"); } arg3 = (int)(val3); { Py_BEGIN_ALLOW_THREADS idmef_assessment_set_action(arg1,arg2,arg3); Py_END_ALLOW_THREADS } resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_assessment_new_action(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_assessment_t *arg1 = (idmef_assessment_t *) 0 ; idmef_action_t **arg2 = (idmef_action_t **) 0 ; int arg3 ; idmef_action_t *tmp2 ; int val3 ; int ecode3 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; int result; { arg2 = (idmef_action_t **) &tmp2; } if (!PyArg_ParseTuple(args,(char *)"OO:idmef_assessment_new_action",&obj0,&obj1)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_assessment, SWIG_POINTER_EXCEPTION|0) ) return NULL; } ecode3 = SWIG_AsVal_int(obj1, &val3); if (!SWIG_IsOK(ecode3)) { SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "idmef_assessment_new_action" "', argument " "3"" of type '" "int""'"); } arg3 = (int)(val3); { Py_BEGIN_ALLOW_THREADS result = (int)idmef_assessment_new_action(arg1,arg2,arg3); Py_END_ALLOW_THREADS } { if ( result < 0 ) { swig_python_raise_exception(result); resultobj = NULL; } else { resultobj = PyInt_FromLong(result); } } { if ( result >= 0 ) resultobj = SWIG_NewPointerObj((void *) * arg2, SWIGTYPE_p_idmef_action, 0); } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_assessment_get_confidence(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_assessment_t *arg1 = (idmef_assessment_t *) 0 ; PyObject * obj0 = 0 ; idmef_confidence_t *result = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:idmef_assessment_get_confidence",&obj0)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_assessment, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { Py_BEGIN_ALLOW_THREADS result = (idmef_confidence_t *)idmef_assessment_get_confidence(arg1); Py_END_ALLOW_THREADS } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_idmef_confidence, 0 | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_assessment_set_confidence(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_assessment_t *arg1 = (idmef_assessment_t *) 0 ; idmef_confidence_t *arg2 = (idmef_confidence_t *) 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:idmef_assessment_set_confidence",&obj0,&obj1)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_assessment, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { if ( obj1 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj1, (void **)&arg2, SWIGTYPE_p_idmef_confidence, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { Py_BEGIN_ALLOW_THREADS idmef_assessment_set_confidence(arg1,arg2); Py_END_ALLOW_THREADS } resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_assessment_new_confidence(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_assessment_t *arg1 = (idmef_assessment_t *) 0 ; idmef_confidence_t **arg2 = (idmef_confidence_t **) 0 ; idmef_confidence_t *tmp2 ; PyObject * obj0 = 0 ; int result; { arg2 = (idmef_confidence_t **) &tmp2; } if (!PyArg_ParseTuple(args,(char *)"O:idmef_assessment_new_confidence",&obj0)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_assessment, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { Py_BEGIN_ALLOW_THREADS result = (int)idmef_assessment_new_confidence(arg1,arg2); Py_END_ALLOW_THREADS } { if ( result < 0 ) { swig_python_raise_exception(result); resultobj = NULL; } else { resultobj = PyInt_FromLong(result); } } { if ( result >= 0 ) resultobj = SWIG_NewPointerObj((void *) * arg2, SWIGTYPE_p_idmef_confidence, 0); } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_tool_alert_new(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_tool_alert_t **arg1 = (idmef_tool_alert_t **) 0 ; idmef_tool_alert_t *tmp1 ; int result; { arg1 = (idmef_tool_alert_t **) &tmp1; } if (!PyArg_ParseTuple(args,(char *)":idmef_tool_alert_new")) SWIG_fail; { Py_BEGIN_ALLOW_THREADS result = (int)idmef_tool_alert_new(arg1); Py_END_ALLOW_THREADS } { if ( result < 0 ) { swig_python_raise_exception(result); resultobj = NULL; } else { resultobj = PyInt_FromLong(result); } } { if ( result >= 0 ) resultobj = SWIG_NewPointerObj((void *) * arg1, SWIGTYPE_p_idmef_tool_alert, 0); } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_tool_alert_copy(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_tool_alert_t *arg1 = (idmef_tool_alert_t *) 0 ; idmef_tool_alert_t *arg2 = (idmef_tool_alert_t *) 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; int result; if (!PyArg_ParseTuple(args,(char *)"OO:idmef_tool_alert_copy",&obj0,&obj1)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_tool_alert, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { if ( obj1 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj1, (void **)&arg2, SWIGTYPE_p_idmef_tool_alert, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { Py_BEGIN_ALLOW_THREADS result = (int)idmef_tool_alert_copy((struct idmef_tool_alert const *)arg1,arg2); Py_END_ALLOW_THREADS } { if ( result < 0 ) { swig_python_raise_exception(result); resultobj = NULL; } else { resultobj = PyInt_FromLong(result); } } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_tool_alert_clone(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_tool_alert_t *arg1 = (idmef_tool_alert_t *) 0 ; idmef_tool_alert_t **arg2 = (idmef_tool_alert_t **) 0 ; idmef_tool_alert_t *tmp2 ; PyObject * obj0 = 0 ; int result; { arg2 = (idmef_tool_alert_t **) &tmp2; } if (!PyArg_ParseTuple(args,(char *)"O:idmef_tool_alert_clone",&obj0)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_tool_alert, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { Py_BEGIN_ALLOW_THREADS result = (int)idmef_tool_alert_clone(arg1,arg2); Py_END_ALLOW_THREADS } { if ( result < 0 ) { swig_python_raise_exception(result); resultobj = NULL; } else { resultobj = PyInt_FromLong(result); } } { if ( result >= 0 ) resultobj = SWIG_NewPointerObj((void *) * arg2, SWIGTYPE_p_idmef_tool_alert, 0); } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_tool_alert_compare(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_tool_alert_t *arg1 = (idmef_tool_alert_t *) 0 ; idmef_tool_alert_t *arg2 = (idmef_tool_alert_t *) 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; int result; if (!PyArg_ParseTuple(args,(char *)"OO:idmef_tool_alert_compare",&obj0,&obj1)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_tool_alert, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { if ( obj1 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj1, (void **)&arg2, SWIGTYPE_p_idmef_tool_alert, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { Py_BEGIN_ALLOW_THREADS result = (int)idmef_tool_alert_compare((struct idmef_tool_alert const *)arg1,(struct idmef_tool_alert const *)arg2); Py_END_ALLOW_THREADS } { resultobj = PyInt_FromLong(result); } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_tool_alert_ref(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_tool_alert_t *arg1 = (idmef_tool_alert_t *) 0 ; PyObject * obj0 = 0 ; idmef_tool_alert_t *result = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:idmef_tool_alert_ref",&obj0)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_tool_alert, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { Py_BEGIN_ALLOW_THREADS result = (idmef_tool_alert_t *)idmef_tool_alert_ref(arg1); Py_END_ALLOW_THREADS } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_idmef_tool_alert, 0 | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_tool_alert_destroy(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_tool_alert_t *arg1 = (idmef_tool_alert_t *) 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:idmef_tool_alert_destroy",&obj0)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_tool_alert, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { Py_BEGIN_ALLOW_THREADS idmef_tool_alert_destroy(arg1); Py_END_ALLOW_THREADS } resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_tool_alert_get_name(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_tool_alert_t *arg1 = (idmef_tool_alert_t *) 0 ; PyObject * obj0 = 0 ; prelude_string_t *result = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:idmef_tool_alert_get_name",&obj0)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_tool_alert, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { Py_BEGIN_ALLOW_THREADS result = (prelude_string_t *)idmef_tool_alert_get_name(arg1); Py_END_ALLOW_THREADS } { resultobj = swig_python_string(result); } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_tool_alert_set_name(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_tool_alert_t *arg1 = (idmef_tool_alert_t *) 0 ; prelude_string_t *arg2 = (prelude_string_t *) 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:idmef_tool_alert_set_name",&obj0,&obj1)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_tool_alert, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { int ret; ret = prelude_string_new_dup_fast(&(arg2), PyString_AsString(obj1), PyString_Size(obj1)); if ( ret < 0 ) { swig_python_raise_exception(ret); return NULL; } } { Py_BEGIN_ALLOW_THREADS idmef_tool_alert_set_name(arg1,arg2); Py_END_ALLOW_THREADS } resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_tool_alert_new_name(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_tool_alert_t *arg1 = (idmef_tool_alert_t *) 0 ; prelude_string_t **arg2 = (prelude_string_t **) 0 ; void *argp2 = 0 ; int res2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; int result; if (!PyArg_ParseTuple(args,(char *)"OO:idmef_tool_alert_new_name",&obj0,&obj1)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_tool_alert, SWIG_POINTER_EXCEPTION|0) ) return NULL; } res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_p_prelude_string_t, 0 | 0 ); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "idmef_tool_alert_new_name" "', argument " "2"" of type '" "prelude_string_t **""'"); } arg2 = (prelude_string_t **)(argp2); { Py_BEGIN_ALLOW_THREADS result = (int)idmef_tool_alert_new_name(arg1,arg2); Py_END_ALLOW_THREADS } { if ( result < 0 ) { swig_python_raise_exception(result); resultobj = NULL; } else { resultobj = PyInt_FromLong(result); } } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_tool_alert_get_command(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_tool_alert_t *arg1 = (idmef_tool_alert_t *) 0 ; PyObject * obj0 = 0 ; prelude_string_t *result = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:idmef_tool_alert_get_command",&obj0)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_tool_alert, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { Py_BEGIN_ALLOW_THREADS result = (prelude_string_t *)idmef_tool_alert_get_command(arg1); Py_END_ALLOW_THREADS } { resultobj = swig_python_string(result); } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_tool_alert_set_command(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_tool_alert_t *arg1 = (idmef_tool_alert_t *) 0 ; prelude_string_t *arg2 = (prelude_string_t *) 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:idmef_tool_alert_set_command",&obj0,&obj1)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_tool_alert, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { int ret; ret = prelude_string_new_dup_fast(&(arg2), PyString_AsString(obj1), PyString_Size(obj1)); if ( ret < 0 ) { swig_python_raise_exception(ret); return NULL; } } { Py_BEGIN_ALLOW_THREADS idmef_tool_alert_set_command(arg1,arg2); Py_END_ALLOW_THREADS } resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_tool_alert_new_command(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_tool_alert_t *arg1 = (idmef_tool_alert_t *) 0 ; prelude_string_t **arg2 = (prelude_string_t **) 0 ; void *argp2 = 0 ; int res2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; int result; if (!PyArg_ParseTuple(args,(char *)"OO:idmef_tool_alert_new_command",&obj0,&obj1)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_tool_alert, SWIG_POINTER_EXCEPTION|0) ) return NULL; } res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_p_prelude_string_t, 0 | 0 ); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "idmef_tool_alert_new_command" "', argument " "2"" of type '" "prelude_string_t **""'"); } arg2 = (prelude_string_t **)(argp2); { Py_BEGIN_ALLOW_THREADS result = (int)idmef_tool_alert_new_command(arg1,arg2); Py_END_ALLOW_THREADS } { if ( result < 0 ) { swig_python_raise_exception(result); resultobj = NULL; } else { resultobj = PyInt_FromLong(result); } } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_tool_alert_get_next_alertident(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_tool_alert_t *arg1 = (idmef_tool_alert_t *) 0 ; idmef_alertident_t *arg2 = (idmef_alertident_t *) 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; idmef_alertident_t *result = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:idmef_tool_alert_get_next_alertident",&obj0,&obj1)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_tool_alert, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { if ( obj1 == Py_None ) { arg2 = NULL; } else { if ( SWIG_ConvertPtr(obj1, (void **)&arg2, SWIGTYPE_p_idmef_alertident, SWIG_POINTER_EXCEPTION|0) ) return NULL; } } { Py_BEGIN_ALLOW_THREADS result = (idmef_alertident_t *)idmef_tool_alert_get_next_alertident(arg1,arg2); Py_END_ALLOW_THREADS } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_idmef_alertident, 0 | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_tool_alert_set_alertident(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_tool_alert_t *arg1 = (idmef_tool_alert_t *) 0 ; idmef_alertident_t *arg2 = (idmef_alertident_t *) 0 ; int arg3 ; void *argp2 = 0 ; int res2 = 0 ; int val3 ; int ecode3 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; PyObject * obj2 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OOO:idmef_tool_alert_set_alertident",&obj0,&obj1,&obj2)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_tool_alert, SWIG_POINTER_EXCEPTION|0) ) return NULL; } res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_idmef_alertident, 0 | 0 ); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "idmef_tool_alert_set_alertident" "', argument " "2"" of type '" "idmef_alertident_t *""'"); } arg2 = (idmef_alertident_t *)(argp2); ecode3 = SWIG_AsVal_int(obj2, &val3); if (!SWIG_IsOK(ecode3)) { SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "idmef_tool_alert_set_alertident" "', argument " "3"" of type '" "int""'"); } arg3 = (int)(val3); { Py_BEGIN_ALLOW_THREADS idmef_tool_alert_set_alertident(arg1,arg2,arg3); Py_END_ALLOW_THREADS } resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_tool_alert_new_alertident(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_tool_alert_t *arg1 = (idmef_tool_alert_t *) 0 ; idmef_alertident_t **arg2 = (idmef_alertident_t **) 0 ; int arg3 ; int val3 ; int ecode3 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; PyObject * obj2 = 0 ; int result; if (!PyArg_ParseTuple(args,(char *)"OOO:idmef_tool_alert_new_alertident",&obj0,&obj1,&obj2)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_tool_alert, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { if ( obj1 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj1, (void **)&arg2, SWIGTYPE_p_p_idmef_alertident, SWIG_POINTER_EXCEPTION|0) ) return NULL; } ecode3 = SWIG_AsVal_int(obj2, &val3); if (!SWIG_IsOK(ecode3)) { SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "idmef_tool_alert_new_alertident" "', argument " "3"" of type '" "int""'"); } arg3 = (int)(val3); { Py_BEGIN_ALLOW_THREADS result = (int)idmef_tool_alert_new_alertident(arg1,arg2,arg3); Py_END_ALLOW_THREADS } { if ( result < 0 ) { swig_python_raise_exception(result); resultobj = NULL; } else { resultobj = PyInt_FromLong(result); } } { if ( result >= 0 ) resultobj = SWIG_NewPointerObj((void *) * arg2, SWIGTYPE_p_idmef_alertident, 0); } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_correlation_alert_new(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_correlation_alert_t **arg1 = (idmef_correlation_alert_t **) 0 ; idmef_correlation_alert_t *tmp1 ; int result; { arg1 = (idmef_correlation_alert_t **) &tmp1; } if (!PyArg_ParseTuple(args,(char *)":idmef_correlation_alert_new")) SWIG_fail; { Py_BEGIN_ALLOW_THREADS result = (int)idmef_correlation_alert_new(arg1); Py_END_ALLOW_THREADS } { if ( result < 0 ) { swig_python_raise_exception(result); resultobj = NULL; } else { resultobj = PyInt_FromLong(result); } } { if ( result >= 0 ) resultobj = SWIG_NewPointerObj((void *) * arg1, SWIGTYPE_p_idmef_correlation_alert, 0); } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_correlation_alert_copy(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_correlation_alert_t *arg1 = (idmef_correlation_alert_t *) 0 ; idmef_correlation_alert_t *arg2 = (idmef_correlation_alert_t *) 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; int result; if (!PyArg_ParseTuple(args,(char *)"OO:idmef_correlation_alert_copy",&obj0,&obj1)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_correlation_alert, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { if ( obj1 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj1, (void **)&arg2, SWIGTYPE_p_idmef_correlation_alert, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { Py_BEGIN_ALLOW_THREADS result = (int)idmef_correlation_alert_copy((struct idmef_correlation_alert const *)arg1,arg2); Py_END_ALLOW_THREADS } { if ( result < 0 ) { swig_python_raise_exception(result); resultobj = NULL; } else { resultobj = PyInt_FromLong(result); } } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_correlation_alert_clone(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_correlation_alert_t *arg1 = (idmef_correlation_alert_t *) 0 ; idmef_correlation_alert_t **arg2 = (idmef_correlation_alert_t **) 0 ; idmef_correlation_alert_t *tmp2 ; PyObject * obj0 = 0 ; int result; { arg2 = (idmef_correlation_alert_t **) &tmp2; } if (!PyArg_ParseTuple(args,(char *)"O:idmef_correlation_alert_clone",&obj0)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_correlation_alert, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { Py_BEGIN_ALLOW_THREADS result = (int)idmef_correlation_alert_clone(arg1,arg2); Py_END_ALLOW_THREADS } { if ( result < 0 ) { swig_python_raise_exception(result); resultobj = NULL; } else { resultobj = PyInt_FromLong(result); } } { if ( result >= 0 ) resultobj = SWIG_NewPointerObj((void *) * arg2, SWIGTYPE_p_idmef_correlation_alert, 0); } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_correlation_alert_compare(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_correlation_alert_t *arg1 = (idmef_correlation_alert_t *) 0 ; idmef_correlation_alert_t *arg2 = (idmef_correlation_alert_t *) 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; int result; if (!PyArg_ParseTuple(args,(char *)"OO:idmef_correlation_alert_compare",&obj0,&obj1)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_correlation_alert, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { if ( obj1 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj1, (void **)&arg2, SWIGTYPE_p_idmef_correlation_alert, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { Py_BEGIN_ALLOW_THREADS result = (int)idmef_correlation_alert_compare((struct idmef_correlation_alert const *)arg1,(struct idmef_correlation_alert const *)arg2); Py_END_ALLOW_THREADS } { resultobj = PyInt_FromLong(result); } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_correlation_alert_ref(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_correlation_alert_t *arg1 = (idmef_correlation_alert_t *) 0 ; PyObject * obj0 = 0 ; idmef_correlation_alert_t *result = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:idmef_correlation_alert_ref",&obj0)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_correlation_alert, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { Py_BEGIN_ALLOW_THREADS result = (idmef_correlation_alert_t *)idmef_correlation_alert_ref(arg1); Py_END_ALLOW_THREADS } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_idmef_correlation_alert, 0 | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_correlation_alert_destroy(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_correlation_alert_t *arg1 = (idmef_correlation_alert_t *) 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:idmef_correlation_alert_destroy",&obj0)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_correlation_alert, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { Py_BEGIN_ALLOW_THREADS idmef_correlation_alert_destroy(arg1); Py_END_ALLOW_THREADS } resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_correlation_alert_get_name(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_correlation_alert_t *arg1 = (idmef_correlation_alert_t *) 0 ; PyObject * obj0 = 0 ; prelude_string_t *result = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:idmef_correlation_alert_get_name",&obj0)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_correlation_alert, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { Py_BEGIN_ALLOW_THREADS result = (prelude_string_t *)idmef_correlation_alert_get_name(arg1); Py_END_ALLOW_THREADS } { resultobj = swig_python_string(result); } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_correlation_alert_set_name(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_correlation_alert_t *arg1 = (idmef_correlation_alert_t *) 0 ; prelude_string_t *arg2 = (prelude_string_t *) 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:idmef_correlation_alert_set_name",&obj0,&obj1)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_correlation_alert, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { int ret; ret = prelude_string_new_dup_fast(&(arg2), PyString_AsString(obj1), PyString_Size(obj1)); if ( ret < 0 ) { swig_python_raise_exception(ret); return NULL; } } { Py_BEGIN_ALLOW_THREADS idmef_correlation_alert_set_name(arg1,arg2); Py_END_ALLOW_THREADS } resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_correlation_alert_new_name(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_correlation_alert_t *arg1 = (idmef_correlation_alert_t *) 0 ; prelude_string_t **arg2 = (prelude_string_t **) 0 ; void *argp2 = 0 ; int res2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; int result; if (!PyArg_ParseTuple(args,(char *)"OO:idmef_correlation_alert_new_name",&obj0,&obj1)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_correlation_alert, SWIG_POINTER_EXCEPTION|0) ) return NULL; } res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_p_prelude_string_t, 0 | 0 ); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "idmef_correlation_alert_new_name" "', argument " "2"" of type '" "prelude_string_t **""'"); } arg2 = (prelude_string_t **)(argp2); { Py_BEGIN_ALLOW_THREADS result = (int)idmef_correlation_alert_new_name(arg1,arg2); Py_END_ALLOW_THREADS } { if ( result < 0 ) { swig_python_raise_exception(result); resultobj = NULL; } else { resultobj = PyInt_FromLong(result); } } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_correlation_alert_get_next_alertident(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_correlation_alert_t *arg1 = (idmef_correlation_alert_t *) 0 ; idmef_alertident_t *arg2 = (idmef_alertident_t *) 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; idmef_alertident_t *result = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:idmef_correlation_alert_get_next_alertident",&obj0,&obj1)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_correlation_alert, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { if ( obj1 == Py_None ) { arg2 = NULL; } else { if ( SWIG_ConvertPtr(obj1, (void **)&arg2, SWIGTYPE_p_idmef_alertident, SWIG_POINTER_EXCEPTION|0) ) return NULL; } } { Py_BEGIN_ALLOW_THREADS result = (idmef_alertident_t *)idmef_correlation_alert_get_next_alertident(arg1,arg2); Py_END_ALLOW_THREADS } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_idmef_alertident, 0 | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_correlation_alert_set_alertident(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_correlation_alert_t *arg1 = (idmef_correlation_alert_t *) 0 ; idmef_alertident_t *arg2 = (idmef_alertident_t *) 0 ; int arg3 ; void *argp2 = 0 ; int res2 = 0 ; int val3 ; int ecode3 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; PyObject * obj2 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OOO:idmef_correlation_alert_set_alertident",&obj0,&obj1,&obj2)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_correlation_alert, SWIG_POINTER_EXCEPTION|0) ) return NULL; } res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_idmef_alertident, 0 | 0 ); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "idmef_correlation_alert_set_alertident" "', argument " "2"" of type '" "idmef_alertident_t *""'"); } arg2 = (idmef_alertident_t *)(argp2); ecode3 = SWIG_AsVal_int(obj2, &val3); if (!SWIG_IsOK(ecode3)) { SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "idmef_correlation_alert_set_alertident" "', argument " "3"" of type '" "int""'"); } arg3 = (int)(val3); { Py_BEGIN_ALLOW_THREADS idmef_correlation_alert_set_alertident(arg1,arg2,arg3); Py_END_ALLOW_THREADS } resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_correlation_alert_new_alertident(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_correlation_alert_t *arg1 = (idmef_correlation_alert_t *) 0 ; idmef_alertident_t **arg2 = (idmef_alertident_t **) 0 ; int arg3 ; int val3 ; int ecode3 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; PyObject * obj2 = 0 ; int result; if (!PyArg_ParseTuple(args,(char *)"OOO:idmef_correlation_alert_new_alertident",&obj0,&obj1,&obj2)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_correlation_alert, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { if ( obj1 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj1, (void **)&arg2, SWIGTYPE_p_p_idmef_alertident, SWIG_POINTER_EXCEPTION|0) ) return NULL; } ecode3 = SWIG_AsVal_int(obj2, &val3); if (!SWIG_IsOK(ecode3)) { SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "idmef_correlation_alert_new_alertident" "', argument " "3"" of type '" "int""'"); } arg3 = (int)(val3); { Py_BEGIN_ALLOW_THREADS result = (int)idmef_correlation_alert_new_alertident(arg1,arg2,arg3); Py_END_ALLOW_THREADS } { if ( result < 0 ) { swig_python_raise_exception(result); resultobj = NULL; } else { resultobj = PyInt_FromLong(result); } } { if ( result >= 0 ) resultobj = SWIG_NewPointerObj((void *) * arg2, SWIGTYPE_p_idmef_alertident, 0); } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_overflow_alert_new(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_overflow_alert_t **arg1 = (idmef_overflow_alert_t **) 0 ; idmef_overflow_alert_t *tmp1 ; int result; { arg1 = (idmef_overflow_alert_t **) &tmp1; } if (!PyArg_ParseTuple(args,(char *)":idmef_overflow_alert_new")) SWIG_fail; { Py_BEGIN_ALLOW_THREADS result = (int)idmef_overflow_alert_new(arg1); Py_END_ALLOW_THREADS } { if ( result < 0 ) { swig_python_raise_exception(result); resultobj = NULL; } else { resultobj = PyInt_FromLong(result); } } { if ( result >= 0 ) resultobj = SWIG_NewPointerObj((void *) * arg1, SWIGTYPE_p_idmef_overflow_alert, 0); } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_overflow_alert_copy(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_overflow_alert_t *arg1 = (idmef_overflow_alert_t *) 0 ; idmef_overflow_alert_t *arg2 = (idmef_overflow_alert_t *) 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; int result; if (!PyArg_ParseTuple(args,(char *)"OO:idmef_overflow_alert_copy",&obj0,&obj1)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_overflow_alert, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { if ( obj1 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj1, (void **)&arg2, SWIGTYPE_p_idmef_overflow_alert, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { Py_BEGIN_ALLOW_THREADS result = (int)idmef_overflow_alert_copy((struct idmef_overflow_alert const *)arg1,arg2); Py_END_ALLOW_THREADS } { if ( result < 0 ) { swig_python_raise_exception(result); resultobj = NULL; } else { resultobj = PyInt_FromLong(result); } } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_overflow_alert_clone(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_overflow_alert_t *arg1 = (idmef_overflow_alert_t *) 0 ; idmef_overflow_alert_t **arg2 = (idmef_overflow_alert_t **) 0 ; idmef_overflow_alert_t *tmp2 ; PyObject * obj0 = 0 ; int result; { arg2 = (idmef_overflow_alert_t **) &tmp2; } if (!PyArg_ParseTuple(args,(char *)"O:idmef_overflow_alert_clone",&obj0)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_overflow_alert, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { Py_BEGIN_ALLOW_THREADS result = (int)idmef_overflow_alert_clone(arg1,arg2); Py_END_ALLOW_THREADS } { if ( result < 0 ) { swig_python_raise_exception(result); resultobj = NULL; } else { resultobj = PyInt_FromLong(result); } } { if ( result >= 0 ) resultobj = SWIG_NewPointerObj((void *) * arg2, SWIGTYPE_p_idmef_overflow_alert, 0); } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_overflow_alert_compare(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_overflow_alert_t *arg1 = (idmef_overflow_alert_t *) 0 ; idmef_overflow_alert_t *arg2 = (idmef_overflow_alert_t *) 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; int result; if (!PyArg_ParseTuple(args,(char *)"OO:idmef_overflow_alert_compare",&obj0,&obj1)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_overflow_alert, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { if ( obj1 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj1, (void **)&arg2, SWIGTYPE_p_idmef_overflow_alert, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { Py_BEGIN_ALLOW_THREADS result = (int)idmef_overflow_alert_compare((struct idmef_overflow_alert const *)arg1,(struct idmef_overflow_alert const *)arg2); Py_END_ALLOW_THREADS } { resultobj = PyInt_FromLong(result); } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_overflow_alert_ref(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_overflow_alert_t *arg1 = (idmef_overflow_alert_t *) 0 ; PyObject * obj0 = 0 ; idmef_overflow_alert_t *result = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:idmef_overflow_alert_ref",&obj0)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_overflow_alert, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { Py_BEGIN_ALLOW_THREADS result = (idmef_overflow_alert_t *)idmef_overflow_alert_ref(arg1); Py_END_ALLOW_THREADS } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_idmef_overflow_alert, 0 | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_overflow_alert_destroy(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_overflow_alert_t *arg1 = (idmef_overflow_alert_t *) 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:idmef_overflow_alert_destroy",&obj0)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_overflow_alert, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { Py_BEGIN_ALLOW_THREADS idmef_overflow_alert_destroy(arg1); Py_END_ALLOW_THREADS } resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_overflow_alert_get_program(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_overflow_alert_t *arg1 = (idmef_overflow_alert_t *) 0 ; PyObject * obj0 = 0 ; prelude_string_t *result = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:idmef_overflow_alert_get_program",&obj0)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_overflow_alert, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { Py_BEGIN_ALLOW_THREADS result = (prelude_string_t *)idmef_overflow_alert_get_program(arg1); Py_END_ALLOW_THREADS } { resultobj = swig_python_string(result); } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_overflow_alert_set_program(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_overflow_alert_t *arg1 = (idmef_overflow_alert_t *) 0 ; prelude_string_t *arg2 = (prelude_string_t *) 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:idmef_overflow_alert_set_program",&obj0,&obj1)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_overflow_alert, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { int ret; ret = prelude_string_new_dup_fast(&(arg2), PyString_AsString(obj1), PyString_Size(obj1)); if ( ret < 0 ) { swig_python_raise_exception(ret); return NULL; } } { Py_BEGIN_ALLOW_THREADS idmef_overflow_alert_set_program(arg1,arg2); Py_END_ALLOW_THREADS } resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_overflow_alert_new_program(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_overflow_alert_t *arg1 = (idmef_overflow_alert_t *) 0 ; prelude_string_t **arg2 = (prelude_string_t **) 0 ; void *argp2 = 0 ; int res2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; int result; if (!PyArg_ParseTuple(args,(char *)"OO:idmef_overflow_alert_new_program",&obj0,&obj1)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_overflow_alert, SWIG_POINTER_EXCEPTION|0) ) return NULL; } res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_p_prelude_string_t, 0 | 0 ); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "idmef_overflow_alert_new_program" "', argument " "2"" of type '" "prelude_string_t **""'"); } arg2 = (prelude_string_t **)(argp2); { Py_BEGIN_ALLOW_THREADS result = (int)idmef_overflow_alert_new_program(arg1,arg2); Py_END_ALLOW_THREADS } { if ( result < 0 ) { swig_python_raise_exception(result); resultobj = NULL; } else { resultobj = PyInt_FromLong(result); } } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_overflow_alert_unset_size(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_overflow_alert_t *arg1 = (idmef_overflow_alert_t *) 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:idmef_overflow_alert_unset_size",&obj0)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_overflow_alert, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { Py_BEGIN_ALLOW_THREADS idmef_overflow_alert_unset_size(arg1); Py_END_ALLOW_THREADS } resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_overflow_alert_get_size(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_overflow_alert_t *arg1 = (idmef_overflow_alert_t *) 0 ; PyObject * obj0 = 0 ; uint32_t *result = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:idmef_overflow_alert_get_size",&obj0)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_overflow_alert, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { Py_BEGIN_ALLOW_THREADS result = (uint32_t *)idmef_overflow_alert_get_size(arg1); Py_END_ALLOW_THREADS } { if (result != NULL) { resultobj = PyLong_FromUnsignedLong(*result); } else { resultobj = Py_None; } } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_overflow_alert_set_size(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_overflow_alert_t *arg1 = (idmef_overflow_alert_t *) 0 ; uint32_t arg2 ; unsigned int val2 ; int ecode2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:idmef_overflow_alert_set_size",&obj0,&obj1)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_overflow_alert, SWIG_POINTER_EXCEPTION|0) ) return NULL; } ecode2 = SWIG_AsVal_unsigned_SS_int(obj1, &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "idmef_overflow_alert_set_size" "', argument " "2"" of type '" "uint32_t""'"); } arg2 = (uint32_t)(val2); { Py_BEGIN_ALLOW_THREADS idmef_overflow_alert_set_size(arg1,arg2); Py_END_ALLOW_THREADS } resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_overflow_alert_new_size(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_overflow_alert_t *arg1 = (idmef_overflow_alert_t *) 0 ; uint32_t **arg2 = (uint32_t **) 0 ; void *argp2 = 0 ; int res2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; int result; if (!PyArg_ParseTuple(args,(char *)"OO:idmef_overflow_alert_new_size",&obj0,&obj1)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_overflow_alert, SWIG_POINTER_EXCEPTION|0) ) return NULL; } res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_p_unsigned_int, 0 | 0 ); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "idmef_overflow_alert_new_size" "', argument " "2"" of type '" "uint32_t **""'"); } arg2 = (uint32_t **)(argp2); { Py_BEGIN_ALLOW_THREADS result = (int)idmef_overflow_alert_new_size(arg1,arg2); Py_END_ALLOW_THREADS } { if ( result < 0 ) { swig_python_raise_exception(result); resultobj = NULL; } else { resultobj = PyInt_FromLong(result); } } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_overflow_alert_get_buffer(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_overflow_alert_t *arg1 = (idmef_overflow_alert_t *) 0 ; PyObject * obj0 = 0 ; idmef_data_t *result = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:idmef_overflow_alert_get_buffer",&obj0)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_overflow_alert, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { Py_BEGIN_ALLOW_THREADS result = (idmef_data_t *)idmef_overflow_alert_get_buffer(arg1); Py_END_ALLOW_THREADS } { resultobj = swig_python_data(result); } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_overflow_alert_set_buffer(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_overflow_alert_t *arg1 = (idmef_overflow_alert_t *) 0 ; idmef_data_t *arg2 = (idmef_data_t *) 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:idmef_overflow_alert_set_buffer",&obj0,&obj1)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_overflow_alert, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { if ( obj1 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj1, (void **)&arg2, SWIGTYPE_p_idmef_data_t, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { Py_BEGIN_ALLOW_THREADS idmef_overflow_alert_set_buffer(arg1,arg2); Py_END_ALLOW_THREADS } resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_overflow_alert_new_buffer(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_overflow_alert_t *arg1 = (idmef_overflow_alert_t *) 0 ; idmef_data_t **arg2 = (idmef_data_t **) 0 ; idmef_data_t *tmp2 ; PyObject * obj0 = 0 ; int result; { arg2 = (idmef_data_t **) &tmp2; } if (!PyArg_ParseTuple(args,(char *)"O:idmef_overflow_alert_new_buffer",&obj0)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_overflow_alert, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { Py_BEGIN_ALLOW_THREADS result = (int)idmef_overflow_alert_new_buffer(arg1,arg2); Py_END_ALLOW_THREADS } { if ( result < 0 ) { swig_python_raise_exception(result); resultobj = NULL; } else { resultobj = PyInt_FromLong(result); } } { if ( result >= 0 ) resultobj = SWIG_NewPointerObj((void *) * arg2, SWIGTYPE_p_idmef_data_t, 0); } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_alert_type_to_numeric(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; char *arg1 = (char *) 0 ; PyObject * obj0 = 0 ; idmef_alert_type_t result; if (!PyArg_ParseTuple(args,(char *)"O:idmef_alert_type_to_numeric",&obj0)) SWIG_fail; { if ( obj0 == Py_None ) arg1 = NULL; else if ( PyString_Check(obj0) ) arg1 = PyString_AsString(obj0); else { PyErr_Format(PyExc_TypeError, "expected None or string, %s found", obj0->ob_type->tp_name); return NULL; } } { Py_BEGIN_ALLOW_THREADS result = (idmef_alert_type_t)idmef_alert_type_to_numeric((char const *)arg1); Py_END_ALLOW_THREADS } resultobj = SWIG_From_int((int)(result)); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_alert_type_to_string(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_alert_type_t arg1 ; int val1 ; int ecode1 = 0 ; PyObject * obj0 = 0 ; char *result = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:idmef_alert_type_to_string",&obj0)) SWIG_fail; ecode1 = SWIG_AsVal_int(obj0, &val1); if (!SWIG_IsOK(ecode1)) { SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "idmef_alert_type_to_string" "', argument " "1"" of type '" "idmef_alert_type_t""'"); } arg1 = (idmef_alert_type_t)(val1); { Py_BEGIN_ALLOW_THREADS result = (char *)idmef_alert_type_to_string(arg1); Py_END_ALLOW_THREADS } resultobj = SWIG_FromCharPtr((const char *)result); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_alert_new(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_alert_t **arg1 = (idmef_alert_t **) 0 ; idmef_alert_t *tmp1 ; int result; { arg1 = (idmef_alert_t **) &tmp1; } if (!PyArg_ParseTuple(args,(char *)":idmef_alert_new")) SWIG_fail; { Py_BEGIN_ALLOW_THREADS result = (int)idmef_alert_new(arg1); Py_END_ALLOW_THREADS } { if ( result < 0 ) { swig_python_raise_exception(result); resultobj = NULL; } else { resultobj = PyInt_FromLong(result); } } { if ( result >= 0 ) resultobj = SWIG_NewPointerObj((void *) * arg1, SWIGTYPE_p_idmef_alert, 0); } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_alert_copy(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_alert_t *arg1 = (idmef_alert_t *) 0 ; idmef_alert_t *arg2 = (idmef_alert_t *) 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; int result; if (!PyArg_ParseTuple(args,(char *)"OO:idmef_alert_copy",&obj0,&obj1)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_alert, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { if ( obj1 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj1, (void **)&arg2, SWIGTYPE_p_idmef_alert, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { Py_BEGIN_ALLOW_THREADS result = (int)idmef_alert_copy((struct idmef_alert const *)arg1,arg2); Py_END_ALLOW_THREADS } { if ( result < 0 ) { swig_python_raise_exception(result); resultobj = NULL; } else { resultobj = PyInt_FromLong(result); } } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_alert_clone(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_alert_t *arg1 = (idmef_alert_t *) 0 ; idmef_alert_t **arg2 = (idmef_alert_t **) 0 ; idmef_alert_t *tmp2 ; PyObject * obj0 = 0 ; int result; { arg2 = (idmef_alert_t **) &tmp2; } if (!PyArg_ParseTuple(args,(char *)"O:idmef_alert_clone",&obj0)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_alert, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { Py_BEGIN_ALLOW_THREADS result = (int)idmef_alert_clone(arg1,arg2); Py_END_ALLOW_THREADS } { if ( result < 0 ) { swig_python_raise_exception(result); resultobj = NULL; } else { resultobj = PyInt_FromLong(result); } } { if ( result >= 0 ) resultobj = SWIG_NewPointerObj((void *) * arg2, SWIGTYPE_p_idmef_alert, 0); } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_alert_compare(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_alert_t *arg1 = (idmef_alert_t *) 0 ; idmef_alert_t *arg2 = (idmef_alert_t *) 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; int result; if (!PyArg_ParseTuple(args,(char *)"OO:idmef_alert_compare",&obj0,&obj1)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_alert, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { if ( obj1 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj1, (void **)&arg2, SWIGTYPE_p_idmef_alert, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { Py_BEGIN_ALLOW_THREADS result = (int)idmef_alert_compare((struct idmef_alert const *)arg1,(struct idmef_alert const *)arg2); Py_END_ALLOW_THREADS } { resultobj = PyInt_FromLong(result); } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_alert_ref(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_alert_t *arg1 = (idmef_alert_t *) 0 ; PyObject * obj0 = 0 ; idmef_alert_t *result = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:idmef_alert_ref",&obj0)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_alert, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { Py_BEGIN_ALLOW_THREADS result = (idmef_alert_t *)idmef_alert_ref(arg1); Py_END_ALLOW_THREADS } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_idmef_alert, 0 | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_alert_destroy(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_alert_t *arg1 = (idmef_alert_t *) 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:idmef_alert_destroy",&obj0)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_alert, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { Py_BEGIN_ALLOW_THREADS idmef_alert_destroy(arg1); Py_END_ALLOW_THREADS } resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_alert_get_messageid(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_alert_t *arg1 = (idmef_alert_t *) 0 ; PyObject * obj0 = 0 ; prelude_string_t *result = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:idmef_alert_get_messageid",&obj0)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_alert, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { Py_BEGIN_ALLOW_THREADS result = (prelude_string_t *)idmef_alert_get_messageid(arg1); Py_END_ALLOW_THREADS } { resultobj = swig_python_string(result); } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_alert_set_messageid(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_alert_t *arg1 = (idmef_alert_t *) 0 ; prelude_string_t *arg2 = (prelude_string_t *) 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:idmef_alert_set_messageid",&obj0,&obj1)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_alert, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { int ret; ret = prelude_string_new_dup_fast(&(arg2), PyString_AsString(obj1), PyString_Size(obj1)); if ( ret < 0 ) { swig_python_raise_exception(ret); return NULL; } } { Py_BEGIN_ALLOW_THREADS idmef_alert_set_messageid(arg1,arg2); Py_END_ALLOW_THREADS } resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_alert_new_messageid(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_alert_t *arg1 = (idmef_alert_t *) 0 ; prelude_string_t **arg2 = (prelude_string_t **) 0 ; void *argp2 = 0 ; int res2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; int result; if (!PyArg_ParseTuple(args,(char *)"OO:idmef_alert_new_messageid",&obj0,&obj1)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_alert, SWIG_POINTER_EXCEPTION|0) ) return NULL; } res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_p_prelude_string_t, 0 | 0 ); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "idmef_alert_new_messageid" "', argument " "2"" of type '" "prelude_string_t **""'"); } arg2 = (prelude_string_t **)(argp2); { Py_BEGIN_ALLOW_THREADS result = (int)idmef_alert_new_messageid(arg1,arg2); Py_END_ALLOW_THREADS } { if ( result < 0 ) { swig_python_raise_exception(result); resultobj = NULL; } else { resultobj = PyInt_FromLong(result); } } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_alert_get_next_analyzer(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_alert_t *arg1 = (idmef_alert_t *) 0 ; idmef_analyzer_t *arg2 = (idmef_analyzer_t *) 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; idmef_analyzer_t *result = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:idmef_alert_get_next_analyzer",&obj0,&obj1)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_alert, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { if ( obj1 == Py_None ) { arg2 = NULL; } else { if ( SWIG_ConvertPtr(obj1, (void **)&arg2, SWIGTYPE_p_idmef_analyzer, SWIG_POINTER_EXCEPTION|0) ) return NULL; } } { Py_BEGIN_ALLOW_THREADS result = (idmef_analyzer_t *)idmef_alert_get_next_analyzer(arg1,arg2); Py_END_ALLOW_THREADS } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_idmef_analyzer, 0 | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_alert_set_analyzer(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_alert_t *arg1 = (idmef_alert_t *) 0 ; idmef_analyzer_t *arg2 = (idmef_analyzer_t *) 0 ; int arg3 ; int val3 ; int ecode3 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; PyObject * obj2 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OOO:idmef_alert_set_analyzer",&obj0,&obj1,&obj2)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_alert, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { if ( obj1 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj1, (void **)&arg2, SWIGTYPE_p_idmef_analyzer, SWIG_POINTER_EXCEPTION|0) ) return NULL; } ecode3 = SWIG_AsVal_int(obj2, &val3); if (!SWIG_IsOK(ecode3)) { SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "idmef_alert_set_analyzer" "', argument " "3"" of type '" "int""'"); } arg3 = (int)(val3); { Py_BEGIN_ALLOW_THREADS idmef_alert_set_analyzer(arg1,arg2,arg3); Py_END_ALLOW_THREADS } resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_alert_new_analyzer(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_alert_t *arg1 = (idmef_alert_t *) 0 ; idmef_analyzer_t **arg2 = (idmef_analyzer_t **) 0 ; int arg3 ; idmef_analyzer_t *tmp2 ; int val3 ; int ecode3 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; int result; { arg2 = (idmef_analyzer_t **) &tmp2; } if (!PyArg_ParseTuple(args,(char *)"OO:idmef_alert_new_analyzer",&obj0,&obj1)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_alert, SWIG_POINTER_EXCEPTION|0) ) return NULL; } ecode3 = SWIG_AsVal_int(obj1, &val3); if (!SWIG_IsOK(ecode3)) { SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "idmef_alert_new_analyzer" "', argument " "3"" of type '" "int""'"); } arg3 = (int)(val3); { Py_BEGIN_ALLOW_THREADS result = (int)idmef_alert_new_analyzer(arg1,arg2,arg3); Py_END_ALLOW_THREADS } { if ( result < 0 ) { swig_python_raise_exception(result); resultobj = NULL; } else { resultobj = PyInt_FromLong(result); } } { if ( result >= 0 ) resultobj = SWIG_NewPointerObj((void *) * arg2, SWIGTYPE_p_idmef_analyzer, 0); } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_alert_get_create_time(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_alert_t *arg1 = (idmef_alert_t *) 0 ; PyObject * obj0 = 0 ; idmef_time_t *result = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:idmef_alert_get_create_time",&obj0)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_alert, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { Py_BEGIN_ALLOW_THREADS result = (idmef_time_t *)idmef_alert_get_create_time(arg1); Py_END_ALLOW_THREADS } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_idmef_time, 0 | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_alert_set_create_time(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_alert_t *arg1 = (idmef_alert_t *) 0 ; idmef_time_t *arg2 = (idmef_time_t *) 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:idmef_alert_set_create_time",&obj0,&obj1)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_alert, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { if ( obj1 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj1, (void **)&arg2, SWIGTYPE_p_idmef_time, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { Py_BEGIN_ALLOW_THREADS idmef_alert_set_create_time(arg1,arg2); Py_END_ALLOW_THREADS } resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_alert_new_create_time(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_alert_t *arg1 = (idmef_alert_t *) 0 ; idmef_time_t **arg2 = (idmef_time_t **) 0 ; idmef_time_t *tmp2 ; PyObject * obj0 = 0 ; int result; { arg2 = (idmef_time_t **) &tmp2; } if (!PyArg_ParseTuple(args,(char *)"O:idmef_alert_new_create_time",&obj0)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_alert, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { Py_BEGIN_ALLOW_THREADS result = (int)idmef_alert_new_create_time(arg1,arg2); Py_END_ALLOW_THREADS } { if ( result < 0 ) { swig_python_raise_exception(result); resultobj = NULL; } else { resultobj = PyInt_FromLong(result); } } { if ( result >= 0 ) resultobj = SWIG_NewPointerObj((void *) * arg2, SWIGTYPE_p_idmef_time, 0); } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_alert_get_classification(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_alert_t *arg1 = (idmef_alert_t *) 0 ; PyObject * obj0 = 0 ; idmef_classification_t *result = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:idmef_alert_get_classification",&obj0)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_alert, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { Py_BEGIN_ALLOW_THREADS result = (idmef_classification_t *)idmef_alert_get_classification(arg1); Py_END_ALLOW_THREADS } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_idmef_classification, 0 | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_alert_set_classification(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_alert_t *arg1 = (idmef_alert_t *) 0 ; idmef_classification_t *arg2 = (idmef_classification_t *) 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:idmef_alert_set_classification",&obj0,&obj1)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_alert, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { if ( obj1 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj1, (void **)&arg2, SWIGTYPE_p_idmef_classification, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { Py_BEGIN_ALLOW_THREADS idmef_alert_set_classification(arg1,arg2); Py_END_ALLOW_THREADS } resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_alert_new_classification(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_alert_t *arg1 = (idmef_alert_t *) 0 ; idmef_classification_t **arg2 = (idmef_classification_t **) 0 ; idmef_classification_t *tmp2 ; PyObject * obj0 = 0 ; int result; { arg2 = (idmef_classification_t **) &tmp2; } if (!PyArg_ParseTuple(args,(char *)"O:idmef_alert_new_classification",&obj0)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_alert, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { Py_BEGIN_ALLOW_THREADS result = (int)idmef_alert_new_classification(arg1,arg2); Py_END_ALLOW_THREADS } { if ( result < 0 ) { swig_python_raise_exception(result); resultobj = NULL; } else { resultobj = PyInt_FromLong(result); } } { if ( result >= 0 ) resultobj = SWIG_NewPointerObj((void *) * arg2, SWIGTYPE_p_idmef_classification, 0); } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_alert_get_detect_time(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_alert_t *arg1 = (idmef_alert_t *) 0 ; PyObject * obj0 = 0 ; idmef_time_t *result = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:idmef_alert_get_detect_time",&obj0)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_alert, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { Py_BEGIN_ALLOW_THREADS result = (idmef_time_t *)idmef_alert_get_detect_time(arg1); Py_END_ALLOW_THREADS } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_idmef_time, 0 | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_alert_set_detect_time(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_alert_t *arg1 = (idmef_alert_t *) 0 ; idmef_time_t *arg2 = (idmef_time_t *) 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:idmef_alert_set_detect_time",&obj0,&obj1)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_alert, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { if ( obj1 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj1, (void **)&arg2, SWIGTYPE_p_idmef_time, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { Py_BEGIN_ALLOW_THREADS idmef_alert_set_detect_time(arg1,arg2); Py_END_ALLOW_THREADS } resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_alert_new_detect_time(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_alert_t *arg1 = (idmef_alert_t *) 0 ; idmef_time_t **arg2 = (idmef_time_t **) 0 ; idmef_time_t *tmp2 ; PyObject * obj0 = 0 ; int result; { arg2 = (idmef_time_t **) &tmp2; } if (!PyArg_ParseTuple(args,(char *)"O:idmef_alert_new_detect_time",&obj0)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_alert, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { Py_BEGIN_ALLOW_THREADS result = (int)idmef_alert_new_detect_time(arg1,arg2); Py_END_ALLOW_THREADS } { if ( result < 0 ) { swig_python_raise_exception(result); resultobj = NULL; } else { resultobj = PyInt_FromLong(result); } } { if ( result >= 0 ) resultobj = SWIG_NewPointerObj((void *) * arg2, SWIGTYPE_p_idmef_time, 0); } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_alert_get_analyzer_time(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_alert_t *arg1 = (idmef_alert_t *) 0 ; PyObject * obj0 = 0 ; idmef_time_t *result = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:idmef_alert_get_analyzer_time",&obj0)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_alert, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { Py_BEGIN_ALLOW_THREADS result = (idmef_time_t *)idmef_alert_get_analyzer_time(arg1); Py_END_ALLOW_THREADS } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_idmef_time, 0 | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_alert_set_analyzer_time(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_alert_t *arg1 = (idmef_alert_t *) 0 ; idmef_time_t *arg2 = (idmef_time_t *) 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:idmef_alert_set_analyzer_time",&obj0,&obj1)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_alert, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { if ( obj1 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj1, (void **)&arg2, SWIGTYPE_p_idmef_time, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { Py_BEGIN_ALLOW_THREADS idmef_alert_set_analyzer_time(arg1,arg2); Py_END_ALLOW_THREADS } resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_alert_new_analyzer_time(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_alert_t *arg1 = (idmef_alert_t *) 0 ; idmef_time_t **arg2 = (idmef_time_t **) 0 ; idmef_time_t *tmp2 ; PyObject * obj0 = 0 ; int result; { arg2 = (idmef_time_t **) &tmp2; } if (!PyArg_ParseTuple(args,(char *)"O:idmef_alert_new_analyzer_time",&obj0)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_alert, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { Py_BEGIN_ALLOW_THREADS result = (int)idmef_alert_new_analyzer_time(arg1,arg2); Py_END_ALLOW_THREADS } { if ( result < 0 ) { swig_python_raise_exception(result); resultobj = NULL; } else { resultobj = PyInt_FromLong(result); } } { if ( result >= 0 ) resultobj = SWIG_NewPointerObj((void *) * arg2, SWIGTYPE_p_idmef_time, 0); } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_alert_get_next_source(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_alert_t *arg1 = (idmef_alert_t *) 0 ; idmef_source_t *arg2 = (idmef_source_t *) 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; idmef_source_t *result = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:idmef_alert_get_next_source",&obj0,&obj1)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_alert, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { if ( obj1 == Py_None ) { arg2 = NULL; } else { if ( SWIG_ConvertPtr(obj1, (void **)&arg2, SWIGTYPE_p_idmef_source, SWIG_POINTER_EXCEPTION|0) ) return NULL; } } { Py_BEGIN_ALLOW_THREADS result = (idmef_source_t *)idmef_alert_get_next_source(arg1,arg2); Py_END_ALLOW_THREADS } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_idmef_source, 0 | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_alert_set_source(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_alert_t *arg1 = (idmef_alert_t *) 0 ; idmef_source_t *arg2 = (idmef_source_t *) 0 ; int arg3 ; int val3 ; int ecode3 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; PyObject * obj2 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OOO:idmef_alert_set_source",&obj0,&obj1,&obj2)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_alert, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { if ( obj1 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj1, (void **)&arg2, SWIGTYPE_p_idmef_source, SWIG_POINTER_EXCEPTION|0) ) return NULL; } ecode3 = SWIG_AsVal_int(obj2, &val3); if (!SWIG_IsOK(ecode3)) { SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "idmef_alert_set_source" "', argument " "3"" of type '" "int""'"); } arg3 = (int)(val3); { Py_BEGIN_ALLOW_THREADS idmef_alert_set_source(arg1,arg2,arg3); Py_END_ALLOW_THREADS } resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_alert_new_source(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_alert_t *arg1 = (idmef_alert_t *) 0 ; idmef_source_t **arg2 = (idmef_source_t **) 0 ; int arg3 ; idmef_source_t *tmp2 ; int val3 ; int ecode3 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; int result; { arg2 = (idmef_source_t **) &tmp2; } if (!PyArg_ParseTuple(args,(char *)"OO:idmef_alert_new_source",&obj0,&obj1)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_alert, SWIG_POINTER_EXCEPTION|0) ) return NULL; } ecode3 = SWIG_AsVal_int(obj1, &val3); if (!SWIG_IsOK(ecode3)) { SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "idmef_alert_new_source" "', argument " "3"" of type '" "int""'"); } arg3 = (int)(val3); { Py_BEGIN_ALLOW_THREADS result = (int)idmef_alert_new_source(arg1,arg2,arg3); Py_END_ALLOW_THREADS } { if ( result < 0 ) { swig_python_raise_exception(result); resultobj = NULL; } else { resultobj = PyInt_FromLong(result); } } { if ( result >= 0 ) resultobj = SWIG_NewPointerObj((void *) * arg2, SWIGTYPE_p_idmef_source, 0); } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_alert_get_next_target(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_alert_t *arg1 = (idmef_alert_t *) 0 ; idmef_target_t *arg2 = (idmef_target_t *) 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; idmef_target_t *result = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:idmef_alert_get_next_target",&obj0,&obj1)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_alert, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { if ( obj1 == Py_None ) { arg2 = NULL; } else { if ( SWIG_ConvertPtr(obj1, (void **)&arg2, SWIGTYPE_p_idmef_target, SWIG_POINTER_EXCEPTION|0) ) return NULL; } } { Py_BEGIN_ALLOW_THREADS result = (idmef_target_t *)idmef_alert_get_next_target(arg1,arg2); Py_END_ALLOW_THREADS } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_idmef_target, 0 | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_alert_set_target(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_alert_t *arg1 = (idmef_alert_t *) 0 ; idmef_target_t *arg2 = (idmef_target_t *) 0 ; int arg3 ; int val3 ; int ecode3 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; PyObject * obj2 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OOO:idmef_alert_set_target",&obj0,&obj1,&obj2)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_alert, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { if ( obj1 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj1, (void **)&arg2, SWIGTYPE_p_idmef_target, SWIG_POINTER_EXCEPTION|0) ) return NULL; } ecode3 = SWIG_AsVal_int(obj2, &val3); if (!SWIG_IsOK(ecode3)) { SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "idmef_alert_set_target" "', argument " "3"" of type '" "int""'"); } arg3 = (int)(val3); { Py_BEGIN_ALLOW_THREADS idmef_alert_set_target(arg1,arg2,arg3); Py_END_ALLOW_THREADS } resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_alert_new_target(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_alert_t *arg1 = (idmef_alert_t *) 0 ; idmef_target_t **arg2 = (idmef_target_t **) 0 ; int arg3 ; idmef_target_t *tmp2 ; int val3 ; int ecode3 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; int result; { arg2 = (idmef_target_t **) &tmp2; } if (!PyArg_ParseTuple(args,(char *)"OO:idmef_alert_new_target",&obj0,&obj1)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_alert, SWIG_POINTER_EXCEPTION|0) ) return NULL; } ecode3 = SWIG_AsVal_int(obj1, &val3); if (!SWIG_IsOK(ecode3)) { SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "idmef_alert_new_target" "', argument " "3"" of type '" "int""'"); } arg3 = (int)(val3); { Py_BEGIN_ALLOW_THREADS result = (int)idmef_alert_new_target(arg1,arg2,arg3); Py_END_ALLOW_THREADS } { if ( result < 0 ) { swig_python_raise_exception(result); resultobj = NULL; } else { resultobj = PyInt_FromLong(result); } } { if ( result >= 0 ) resultobj = SWIG_NewPointerObj((void *) * arg2, SWIGTYPE_p_idmef_target, 0); } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_alert_get_assessment(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_alert_t *arg1 = (idmef_alert_t *) 0 ; PyObject * obj0 = 0 ; idmef_assessment_t *result = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:idmef_alert_get_assessment",&obj0)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_alert, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { Py_BEGIN_ALLOW_THREADS result = (idmef_assessment_t *)idmef_alert_get_assessment(arg1); Py_END_ALLOW_THREADS } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_idmef_assessment, 0 | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_alert_set_assessment(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_alert_t *arg1 = (idmef_alert_t *) 0 ; idmef_assessment_t *arg2 = (idmef_assessment_t *) 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:idmef_alert_set_assessment",&obj0,&obj1)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_alert, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { if ( obj1 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj1, (void **)&arg2, SWIGTYPE_p_idmef_assessment, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { Py_BEGIN_ALLOW_THREADS idmef_alert_set_assessment(arg1,arg2); Py_END_ALLOW_THREADS } resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_alert_new_assessment(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_alert_t *arg1 = (idmef_alert_t *) 0 ; idmef_assessment_t **arg2 = (idmef_assessment_t **) 0 ; idmef_assessment_t *tmp2 ; PyObject * obj0 = 0 ; int result; { arg2 = (idmef_assessment_t **) &tmp2; } if (!PyArg_ParseTuple(args,(char *)"O:idmef_alert_new_assessment",&obj0)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_alert, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { Py_BEGIN_ALLOW_THREADS result = (int)idmef_alert_new_assessment(arg1,arg2); Py_END_ALLOW_THREADS } { if ( result < 0 ) { swig_python_raise_exception(result); resultobj = NULL; } else { resultobj = PyInt_FromLong(result); } } { if ( result >= 0 ) resultobj = SWIG_NewPointerObj((void *) * arg2, SWIGTYPE_p_idmef_assessment, 0); } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_alert_get_next_additional_data(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_alert_t *arg1 = (idmef_alert_t *) 0 ; idmef_additional_data_t *arg2 = (idmef_additional_data_t *) 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; idmef_additional_data_t *result = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:idmef_alert_get_next_additional_data",&obj0,&obj1)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_alert, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { if ( obj1 == Py_None ) { arg2 = NULL; } else { if ( SWIG_ConvertPtr(obj1, (void **)&arg2, SWIGTYPE_p_idmef_additional_data, SWIG_POINTER_EXCEPTION|0) ) return NULL; } } { Py_BEGIN_ALLOW_THREADS result = (idmef_additional_data_t *)idmef_alert_get_next_additional_data(arg1,arg2); Py_END_ALLOW_THREADS } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_idmef_additional_data, 0 | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_alert_set_additional_data(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_alert_t *arg1 = (idmef_alert_t *) 0 ; idmef_additional_data_t *arg2 = (idmef_additional_data_t *) 0 ; int arg3 ; int val3 ; int ecode3 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; PyObject * obj2 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OOO:idmef_alert_set_additional_data",&obj0,&obj1,&obj2)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_alert, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { if ( obj1 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj1, (void **)&arg2, SWIGTYPE_p_idmef_additional_data, SWIG_POINTER_EXCEPTION|0) ) return NULL; } ecode3 = SWIG_AsVal_int(obj2, &val3); if (!SWIG_IsOK(ecode3)) { SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "idmef_alert_set_additional_data" "', argument " "3"" of type '" "int""'"); } arg3 = (int)(val3); { Py_BEGIN_ALLOW_THREADS idmef_alert_set_additional_data(arg1,arg2,arg3); Py_END_ALLOW_THREADS } resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_alert_new_additional_data(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_alert_t *arg1 = (idmef_alert_t *) 0 ; idmef_additional_data_t **arg2 = (idmef_additional_data_t **) 0 ; int arg3 ; idmef_additional_data_t *tmp2 ; int val3 ; int ecode3 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; int result; { arg2 = (idmef_additional_data_t **) &tmp2; } if (!PyArg_ParseTuple(args,(char *)"OO:idmef_alert_new_additional_data",&obj0,&obj1)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_alert, SWIG_POINTER_EXCEPTION|0) ) return NULL; } ecode3 = SWIG_AsVal_int(obj1, &val3); if (!SWIG_IsOK(ecode3)) { SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "idmef_alert_new_additional_data" "', argument " "3"" of type '" "int""'"); } arg3 = (int)(val3); { Py_BEGIN_ALLOW_THREADS result = (int)idmef_alert_new_additional_data(arg1,arg2,arg3); Py_END_ALLOW_THREADS } { if ( result < 0 ) { swig_python_raise_exception(result); resultobj = NULL; } else { resultobj = PyInt_FromLong(result); } } { if ( result >= 0 ) resultobj = SWIG_NewPointerObj((void *) * arg2, SWIGTYPE_p_idmef_additional_data, 0); } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_alert_get_type(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_alert_t *arg1 = (idmef_alert_t *) 0 ; PyObject * obj0 = 0 ; idmef_alert_type_t result; if (!PyArg_ParseTuple(args,(char *)"O:idmef_alert_get_type",&obj0)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_alert, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { Py_BEGIN_ALLOW_THREADS result = (idmef_alert_type_t)idmef_alert_get_type(arg1); Py_END_ALLOW_THREADS } resultobj = SWIG_From_int((int)(result)); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_alert_get_tool_alert(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_alert_t *arg1 = (idmef_alert_t *) 0 ; PyObject * obj0 = 0 ; idmef_tool_alert_t *result = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:idmef_alert_get_tool_alert",&obj0)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_alert, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { Py_BEGIN_ALLOW_THREADS result = (idmef_tool_alert_t *)idmef_alert_get_tool_alert(arg1); Py_END_ALLOW_THREADS } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_idmef_tool_alert, 0 | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_alert_set_tool_alert(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_alert_t *arg1 = (idmef_alert_t *) 0 ; idmef_tool_alert_t *arg2 = (idmef_tool_alert_t *) 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:idmef_alert_set_tool_alert",&obj0,&obj1)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_alert, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { if ( obj1 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj1, (void **)&arg2, SWIGTYPE_p_idmef_tool_alert, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { Py_BEGIN_ALLOW_THREADS idmef_alert_set_tool_alert(arg1,arg2); Py_END_ALLOW_THREADS } resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_alert_new_tool_alert(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_alert_t *arg1 = (idmef_alert_t *) 0 ; idmef_tool_alert_t **arg2 = (idmef_tool_alert_t **) 0 ; idmef_tool_alert_t *tmp2 ; PyObject * obj0 = 0 ; int result; { arg2 = (idmef_tool_alert_t **) &tmp2; } if (!PyArg_ParseTuple(args,(char *)"O:idmef_alert_new_tool_alert",&obj0)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_alert, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { Py_BEGIN_ALLOW_THREADS result = (int)idmef_alert_new_tool_alert(arg1,arg2); Py_END_ALLOW_THREADS } { if ( result < 0 ) { swig_python_raise_exception(result); resultobj = NULL; } else { resultobj = PyInt_FromLong(result); } } { if ( result >= 0 ) resultobj = SWIG_NewPointerObj((void *) * arg2, SWIGTYPE_p_idmef_tool_alert, 0); } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_alert_get_correlation_alert(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_alert_t *arg1 = (idmef_alert_t *) 0 ; PyObject * obj0 = 0 ; idmef_correlation_alert_t *result = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:idmef_alert_get_correlation_alert",&obj0)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_alert, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { Py_BEGIN_ALLOW_THREADS result = (idmef_correlation_alert_t *)idmef_alert_get_correlation_alert(arg1); Py_END_ALLOW_THREADS } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_idmef_correlation_alert, 0 | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_alert_set_correlation_alert(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_alert_t *arg1 = (idmef_alert_t *) 0 ; idmef_correlation_alert_t *arg2 = (idmef_correlation_alert_t *) 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:idmef_alert_set_correlation_alert",&obj0,&obj1)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_alert, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { if ( obj1 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj1, (void **)&arg2, SWIGTYPE_p_idmef_correlation_alert, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { Py_BEGIN_ALLOW_THREADS idmef_alert_set_correlation_alert(arg1,arg2); Py_END_ALLOW_THREADS } resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_alert_new_correlation_alert(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_alert_t *arg1 = (idmef_alert_t *) 0 ; idmef_correlation_alert_t **arg2 = (idmef_correlation_alert_t **) 0 ; idmef_correlation_alert_t *tmp2 ; PyObject * obj0 = 0 ; int result; { arg2 = (idmef_correlation_alert_t **) &tmp2; } if (!PyArg_ParseTuple(args,(char *)"O:idmef_alert_new_correlation_alert",&obj0)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_alert, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { Py_BEGIN_ALLOW_THREADS result = (int)idmef_alert_new_correlation_alert(arg1,arg2); Py_END_ALLOW_THREADS } { if ( result < 0 ) { swig_python_raise_exception(result); resultobj = NULL; } else { resultobj = PyInt_FromLong(result); } } { if ( result >= 0 ) resultobj = SWIG_NewPointerObj((void *) * arg2, SWIGTYPE_p_idmef_correlation_alert, 0); } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_alert_get_overflow_alert(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_alert_t *arg1 = (idmef_alert_t *) 0 ; PyObject * obj0 = 0 ; idmef_overflow_alert_t *result = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:idmef_alert_get_overflow_alert",&obj0)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_alert, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { Py_BEGIN_ALLOW_THREADS result = (idmef_overflow_alert_t *)idmef_alert_get_overflow_alert(arg1); Py_END_ALLOW_THREADS } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_idmef_overflow_alert, 0 | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_alert_set_overflow_alert(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_alert_t *arg1 = (idmef_alert_t *) 0 ; idmef_overflow_alert_t *arg2 = (idmef_overflow_alert_t *) 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:idmef_alert_set_overflow_alert",&obj0,&obj1)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_alert, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { if ( obj1 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj1, (void **)&arg2, SWIGTYPE_p_idmef_overflow_alert, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { Py_BEGIN_ALLOW_THREADS idmef_alert_set_overflow_alert(arg1,arg2); Py_END_ALLOW_THREADS } resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_alert_new_overflow_alert(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_alert_t *arg1 = (idmef_alert_t *) 0 ; idmef_overflow_alert_t **arg2 = (idmef_overflow_alert_t **) 0 ; idmef_overflow_alert_t *tmp2 ; PyObject * obj0 = 0 ; int result; { arg2 = (idmef_overflow_alert_t **) &tmp2; } if (!PyArg_ParseTuple(args,(char *)"O:idmef_alert_new_overflow_alert",&obj0)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_alert, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { Py_BEGIN_ALLOW_THREADS result = (int)idmef_alert_new_overflow_alert(arg1,arg2); Py_END_ALLOW_THREADS } { if ( result < 0 ) { swig_python_raise_exception(result); resultobj = NULL; } else { resultobj = PyInt_FromLong(result); } } { if ( result >= 0 ) resultobj = SWIG_NewPointerObj((void *) * arg2, SWIGTYPE_p_idmef_overflow_alert, 0); } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_heartbeat_new(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_heartbeat_t **arg1 = (idmef_heartbeat_t **) 0 ; idmef_heartbeat_t *tmp1 ; int result; { arg1 = (idmef_heartbeat_t **) &tmp1; } if (!PyArg_ParseTuple(args,(char *)":idmef_heartbeat_new")) SWIG_fail; { Py_BEGIN_ALLOW_THREADS result = (int)idmef_heartbeat_new(arg1); Py_END_ALLOW_THREADS } { if ( result < 0 ) { swig_python_raise_exception(result); resultobj = NULL; } else { resultobj = PyInt_FromLong(result); } } { if ( result >= 0 ) resultobj = SWIG_NewPointerObj((void *) * arg1, SWIGTYPE_p_idmef_heartbeat, 0); } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_heartbeat_copy(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_heartbeat_t *arg1 = (idmef_heartbeat_t *) 0 ; idmef_heartbeat_t *arg2 = (idmef_heartbeat_t *) 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; int result; if (!PyArg_ParseTuple(args,(char *)"OO:idmef_heartbeat_copy",&obj0,&obj1)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_heartbeat, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { if ( obj1 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj1, (void **)&arg2, SWIGTYPE_p_idmef_heartbeat, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { Py_BEGIN_ALLOW_THREADS result = (int)idmef_heartbeat_copy((struct idmef_heartbeat const *)arg1,arg2); Py_END_ALLOW_THREADS } { if ( result < 0 ) { swig_python_raise_exception(result); resultobj = NULL; } else { resultobj = PyInt_FromLong(result); } } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_heartbeat_clone(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_heartbeat_t *arg1 = (idmef_heartbeat_t *) 0 ; idmef_heartbeat_t **arg2 = (idmef_heartbeat_t **) 0 ; idmef_heartbeat_t *tmp2 ; PyObject * obj0 = 0 ; int result; { arg2 = (idmef_heartbeat_t **) &tmp2; } if (!PyArg_ParseTuple(args,(char *)"O:idmef_heartbeat_clone",&obj0)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_heartbeat, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { Py_BEGIN_ALLOW_THREADS result = (int)idmef_heartbeat_clone(arg1,arg2); Py_END_ALLOW_THREADS } { if ( result < 0 ) { swig_python_raise_exception(result); resultobj = NULL; } else { resultobj = PyInt_FromLong(result); } } { if ( result >= 0 ) resultobj = SWIG_NewPointerObj((void *) * arg2, SWIGTYPE_p_idmef_heartbeat, 0); } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_heartbeat_compare(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_heartbeat_t *arg1 = (idmef_heartbeat_t *) 0 ; idmef_heartbeat_t *arg2 = (idmef_heartbeat_t *) 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; int result; if (!PyArg_ParseTuple(args,(char *)"OO:idmef_heartbeat_compare",&obj0,&obj1)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_heartbeat, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { if ( obj1 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj1, (void **)&arg2, SWIGTYPE_p_idmef_heartbeat, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { Py_BEGIN_ALLOW_THREADS result = (int)idmef_heartbeat_compare((struct idmef_heartbeat const *)arg1,(struct idmef_heartbeat const *)arg2); Py_END_ALLOW_THREADS } { resultobj = PyInt_FromLong(result); } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_heartbeat_ref(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_heartbeat_t *arg1 = (idmef_heartbeat_t *) 0 ; PyObject * obj0 = 0 ; idmef_heartbeat_t *result = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:idmef_heartbeat_ref",&obj0)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_heartbeat, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { Py_BEGIN_ALLOW_THREADS result = (idmef_heartbeat_t *)idmef_heartbeat_ref(arg1); Py_END_ALLOW_THREADS } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_idmef_heartbeat, 0 | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_heartbeat_destroy(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_heartbeat_t *arg1 = (idmef_heartbeat_t *) 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:idmef_heartbeat_destroy",&obj0)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_heartbeat, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { Py_BEGIN_ALLOW_THREADS idmef_heartbeat_destroy(arg1); Py_END_ALLOW_THREADS } resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_heartbeat_get_messageid(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_heartbeat_t *arg1 = (idmef_heartbeat_t *) 0 ; PyObject * obj0 = 0 ; prelude_string_t *result = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:idmef_heartbeat_get_messageid",&obj0)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_heartbeat, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { Py_BEGIN_ALLOW_THREADS result = (prelude_string_t *)idmef_heartbeat_get_messageid(arg1); Py_END_ALLOW_THREADS } { resultobj = swig_python_string(result); } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_heartbeat_set_messageid(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_heartbeat_t *arg1 = (idmef_heartbeat_t *) 0 ; prelude_string_t *arg2 = (prelude_string_t *) 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:idmef_heartbeat_set_messageid",&obj0,&obj1)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_heartbeat, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { int ret; ret = prelude_string_new_dup_fast(&(arg2), PyString_AsString(obj1), PyString_Size(obj1)); if ( ret < 0 ) { swig_python_raise_exception(ret); return NULL; } } { Py_BEGIN_ALLOW_THREADS idmef_heartbeat_set_messageid(arg1,arg2); Py_END_ALLOW_THREADS } resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_heartbeat_new_messageid(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_heartbeat_t *arg1 = (idmef_heartbeat_t *) 0 ; prelude_string_t **arg2 = (prelude_string_t **) 0 ; void *argp2 = 0 ; int res2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; int result; if (!PyArg_ParseTuple(args,(char *)"OO:idmef_heartbeat_new_messageid",&obj0,&obj1)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_heartbeat, SWIG_POINTER_EXCEPTION|0) ) return NULL; } res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_p_prelude_string_t, 0 | 0 ); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "idmef_heartbeat_new_messageid" "', argument " "2"" of type '" "prelude_string_t **""'"); } arg2 = (prelude_string_t **)(argp2); { Py_BEGIN_ALLOW_THREADS result = (int)idmef_heartbeat_new_messageid(arg1,arg2); Py_END_ALLOW_THREADS } { if ( result < 0 ) { swig_python_raise_exception(result); resultobj = NULL; } else { resultobj = PyInt_FromLong(result); } } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_heartbeat_get_next_analyzer(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_heartbeat_t *arg1 = (idmef_heartbeat_t *) 0 ; idmef_analyzer_t *arg2 = (idmef_analyzer_t *) 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; idmef_analyzer_t *result = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:idmef_heartbeat_get_next_analyzer",&obj0,&obj1)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_heartbeat, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { if ( obj1 == Py_None ) { arg2 = NULL; } else { if ( SWIG_ConvertPtr(obj1, (void **)&arg2, SWIGTYPE_p_idmef_analyzer, SWIG_POINTER_EXCEPTION|0) ) return NULL; } } { Py_BEGIN_ALLOW_THREADS result = (idmef_analyzer_t *)idmef_heartbeat_get_next_analyzer(arg1,arg2); Py_END_ALLOW_THREADS } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_idmef_analyzer, 0 | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_heartbeat_set_analyzer(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_heartbeat_t *arg1 = (idmef_heartbeat_t *) 0 ; idmef_analyzer_t *arg2 = (idmef_analyzer_t *) 0 ; int arg3 ; int val3 ; int ecode3 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; PyObject * obj2 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OOO:idmef_heartbeat_set_analyzer",&obj0,&obj1,&obj2)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_heartbeat, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { if ( obj1 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj1, (void **)&arg2, SWIGTYPE_p_idmef_analyzer, SWIG_POINTER_EXCEPTION|0) ) return NULL; } ecode3 = SWIG_AsVal_int(obj2, &val3); if (!SWIG_IsOK(ecode3)) { SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "idmef_heartbeat_set_analyzer" "', argument " "3"" of type '" "int""'"); } arg3 = (int)(val3); { Py_BEGIN_ALLOW_THREADS idmef_heartbeat_set_analyzer(arg1,arg2,arg3); Py_END_ALLOW_THREADS } resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_heartbeat_new_analyzer(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_heartbeat_t *arg1 = (idmef_heartbeat_t *) 0 ; idmef_analyzer_t **arg2 = (idmef_analyzer_t **) 0 ; int arg3 ; idmef_analyzer_t *tmp2 ; int val3 ; int ecode3 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; int result; { arg2 = (idmef_analyzer_t **) &tmp2; } if (!PyArg_ParseTuple(args,(char *)"OO:idmef_heartbeat_new_analyzer",&obj0,&obj1)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_heartbeat, SWIG_POINTER_EXCEPTION|0) ) return NULL; } ecode3 = SWIG_AsVal_int(obj1, &val3); if (!SWIG_IsOK(ecode3)) { SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "idmef_heartbeat_new_analyzer" "', argument " "3"" of type '" "int""'"); } arg3 = (int)(val3); { Py_BEGIN_ALLOW_THREADS result = (int)idmef_heartbeat_new_analyzer(arg1,arg2,arg3); Py_END_ALLOW_THREADS } { if ( result < 0 ) { swig_python_raise_exception(result); resultobj = NULL; } else { resultobj = PyInt_FromLong(result); } } { if ( result >= 0 ) resultobj = SWIG_NewPointerObj((void *) * arg2, SWIGTYPE_p_idmef_analyzer, 0); } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_heartbeat_get_create_time(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_heartbeat_t *arg1 = (idmef_heartbeat_t *) 0 ; PyObject * obj0 = 0 ; idmef_time_t *result = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:idmef_heartbeat_get_create_time",&obj0)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_heartbeat, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { Py_BEGIN_ALLOW_THREADS result = (idmef_time_t *)idmef_heartbeat_get_create_time(arg1); Py_END_ALLOW_THREADS } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_idmef_time, 0 | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_heartbeat_set_create_time(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_heartbeat_t *arg1 = (idmef_heartbeat_t *) 0 ; idmef_time_t *arg2 = (idmef_time_t *) 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:idmef_heartbeat_set_create_time",&obj0,&obj1)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_heartbeat, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { if ( obj1 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj1, (void **)&arg2, SWIGTYPE_p_idmef_time, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { Py_BEGIN_ALLOW_THREADS idmef_heartbeat_set_create_time(arg1,arg2); Py_END_ALLOW_THREADS } resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_heartbeat_new_create_time(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_heartbeat_t *arg1 = (idmef_heartbeat_t *) 0 ; idmef_time_t **arg2 = (idmef_time_t **) 0 ; idmef_time_t *tmp2 ; PyObject * obj0 = 0 ; int result; { arg2 = (idmef_time_t **) &tmp2; } if (!PyArg_ParseTuple(args,(char *)"O:idmef_heartbeat_new_create_time",&obj0)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_heartbeat, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { Py_BEGIN_ALLOW_THREADS result = (int)idmef_heartbeat_new_create_time(arg1,arg2); Py_END_ALLOW_THREADS } { if ( result < 0 ) { swig_python_raise_exception(result); resultobj = NULL; } else { resultobj = PyInt_FromLong(result); } } { if ( result >= 0 ) resultobj = SWIG_NewPointerObj((void *) * arg2, SWIGTYPE_p_idmef_time, 0); } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_heartbeat_get_analyzer_time(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_heartbeat_t *arg1 = (idmef_heartbeat_t *) 0 ; PyObject * obj0 = 0 ; idmef_time_t *result = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:idmef_heartbeat_get_analyzer_time",&obj0)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_heartbeat, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { Py_BEGIN_ALLOW_THREADS result = (idmef_time_t *)idmef_heartbeat_get_analyzer_time(arg1); Py_END_ALLOW_THREADS } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_idmef_time, 0 | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_heartbeat_set_analyzer_time(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_heartbeat_t *arg1 = (idmef_heartbeat_t *) 0 ; idmef_time_t *arg2 = (idmef_time_t *) 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:idmef_heartbeat_set_analyzer_time",&obj0,&obj1)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_heartbeat, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { if ( obj1 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj1, (void **)&arg2, SWIGTYPE_p_idmef_time, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { Py_BEGIN_ALLOW_THREADS idmef_heartbeat_set_analyzer_time(arg1,arg2); Py_END_ALLOW_THREADS } resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_heartbeat_new_analyzer_time(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_heartbeat_t *arg1 = (idmef_heartbeat_t *) 0 ; idmef_time_t **arg2 = (idmef_time_t **) 0 ; idmef_time_t *tmp2 ; PyObject * obj0 = 0 ; int result; { arg2 = (idmef_time_t **) &tmp2; } if (!PyArg_ParseTuple(args,(char *)"O:idmef_heartbeat_new_analyzer_time",&obj0)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_heartbeat, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { Py_BEGIN_ALLOW_THREADS result = (int)idmef_heartbeat_new_analyzer_time(arg1,arg2); Py_END_ALLOW_THREADS } { if ( result < 0 ) { swig_python_raise_exception(result); resultobj = NULL; } else { resultobj = PyInt_FromLong(result); } } { if ( result >= 0 ) resultobj = SWIG_NewPointerObj((void *) * arg2, SWIGTYPE_p_idmef_time, 0); } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_heartbeat_unset_heartbeat_interval(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_heartbeat_t *arg1 = (idmef_heartbeat_t *) 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:idmef_heartbeat_unset_heartbeat_interval",&obj0)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_heartbeat, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { Py_BEGIN_ALLOW_THREADS idmef_heartbeat_unset_heartbeat_interval(arg1); Py_END_ALLOW_THREADS } resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_heartbeat_get_heartbeat_interval(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_heartbeat_t *arg1 = (idmef_heartbeat_t *) 0 ; PyObject * obj0 = 0 ; uint32_t *result = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:idmef_heartbeat_get_heartbeat_interval",&obj0)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_heartbeat, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { Py_BEGIN_ALLOW_THREADS result = (uint32_t *)idmef_heartbeat_get_heartbeat_interval(arg1); Py_END_ALLOW_THREADS } { if (result != NULL) { resultobj = PyLong_FromUnsignedLong(*result); } else { resultobj = Py_None; } } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_heartbeat_set_heartbeat_interval(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_heartbeat_t *arg1 = (idmef_heartbeat_t *) 0 ; uint32_t arg2 ; unsigned int val2 ; int ecode2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:idmef_heartbeat_set_heartbeat_interval",&obj0,&obj1)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_heartbeat, SWIG_POINTER_EXCEPTION|0) ) return NULL; } ecode2 = SWIG_AsVal_unsigned_SS_int(obj1, &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "idmef_heartbeat_set_heartbeat_interval" "', argument " "2"" of type '" "uint32_t""'"); } arg2 = (uint32_t)(val2); { Py_BEGIN_ALLOW_THREADS idmef_heartbeat_set_heartbeat_interval(arg1,arg2); Py_END_ALLOW_THREADS } resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_heartbeat_new_heartbeat_interval(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_heartbeat_t *arg1 = (idmef_heartbeat_t *) 0 ; uint32_t **arg2 = (uint32_t **) 0 ; void *argp2 = 0 ; int res2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; int result; if (!PyArg_ParseTuple(args,(char *)"OO:idmef_heartbeat_new_heartbeat_interval",&obj0,&obj1)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_heartbeat, SWIG_POINTER_EXCEPTION|0) ) return NULL; } res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_p_unsigned_int, 0 | 0 ); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "idmef_heartbeat_new_heartbeat_interval" "', argument " "2"" of type '" "uint32_t **""'"); } arg2 = (uint32_t **)(argp2); { Py_BEGIN_ALLOW_THREADS result = (int)idmef_heartbeat_new_heartbeat_interval(arg1,arg2); Py_END_ALLOW_THREADS } { if ( result < 0 ) { swig_python_raise_exception(result); resultobj = NULL; } else { resultobj = PyInt_FromLong(result); } } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_heartbeat_get_next_additional_data(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_heartbeat_t *arg1 = (idmef_heartbeat_t *) 0 ; idmef_additional_data_t *arg2 = (idmef_additional_data_t *) 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; idmef_additional_data_t *result = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:idmef_heartbeat_get_next_additional_data",&obj0,&obj1)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_heartbeat, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { if ( obj1 == Py_None ) { arg2 = NULL; } else { if ( SWIG_ConvertPtr(obj1, (void **)&arg2, SWIGTYPE_p_idmef_additional_data, SWIG_POINTER_EXCEPTION|0) ) return NULL; } } { Py_BEGIN_ALLOW_THREADS result = (idmef_additional_data_t *)idmef_heartbeat_get_next_additional_data(arg1,arg2); Py_END_ALLOW_THREADS } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_idmef_additional_data, 0 | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_heartbeat_set_additional_data(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_heartbeat_t *arg1 = (idmef_heartbeat_t *) 0 ; idmef_additional_data_t *arg2 = (idmef_additional_data_t *) 0 ; int arg3 ; int val3 ; int ecode3 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; PyObject * obj2 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OOO:idmef_heartbeat_set_additional_data",&obj0,&obj1,&obj2)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_heartbeat, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { if ( obj1 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj1, (void **)&arg2, SWIGTYPE_p_idmef_additional_data, SWIG_POINTER_EXCEPTION|0) ) return NULL; } ecode3 = SWIG_AsVal_int(obj2, &val3); if (!SWIG_IsOK(ecode3)) { SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "idmef_heartbeat_set_additional_data" "', argument " "3"" of type '" "int""'"); } arg3 = (int)(val3); { Py_BEGIN_ALLOW_THREADS idmef_heartbeat_set_additional_data(arg1,arg2,arg3); Py_END_ALLOW_THREADS } resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_heartbeat_new_additional_data(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_heartbeat_t *arg1 = (idmef_heartbeat_t *) 0 ; idmef_additional_data_t **arg2 = (idmef_additional_data_t **) 0 ; int arg3 ; idmef_additional_data_t *tmp2 ; int val3 ; int ecode3 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; int result; { arg2 = (idmef_additional_data_t **) &tmp2; } if (!PyArg_ParseTuple(args,(char *)"OO:idmef_heartbeat_new_additional_data",&obj0,&obj1)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_heartbeat, SWIG_POINTER_EXCEPTION|0) ) return NULL; } ecode3 = SWIG_AsVal_int(obj1, &val3); if (!SWIG_IsOK(ecode3)) { SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "idmef_heartbeat_new_additional_data" "', argument " "3"" of type '" "int""'"); } arg3 = (int)(val3); { Py_BEGIN_ALLOW_THREADS result = (int)idmef_heartbeat_new_additional_data(arg1,arg2,arg3); Py_END_ALLOW_THREADS } { if ( result < 0 ) { swig_python_raise_exception(result); resultobj = NULL; } else { resultobj = PyInt_FromLong(result); } } { if ( result >= 0 ) resultobj = SWIG_NewPointerObj((void *) * arg2, SWIGTYPE_p_idmef_additional_data, 0); } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_message_type_to_numeric(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; char *arg1 = (char *) 0 ; PyObject * obj0 = 0 ; idmef_message_type_t result; if (!PyArg_ParseTuple(args,(char *)"O:idmef_message_type_to_numeric",&obj0)) SWIG_fail; { if ( obj0 == Py_None ) arg1 = NULL; else if ( PyString_Check(obj0) ) arg1 = PyString_AsString(obj0); else { PyErr_Format(PyExc_TypeError, "expected None or string, %s found", obj0->ob_type->tp_name); return NULL; } } { Py_BEGIN_ALLOW_THREADS result = (idmef_message_type_t)idmef_message_type_to_numeric((char const *)arg1); Py_END_ALLOW_THREADS } resultobj = SWIG_From_int((int)(result)); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_message_type_to_string(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_message_type_t arg1 ; int val1 ; int ecode1 = 0 ; PyObject * obj0 = 0 ; char *result = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:idmef_message_type_to_string",&obj0)) SWIG_fail; ecode1 = SWIG_AsVal_int(obj0, &val1); if (!SWIG_IsOK(ecode1)) { SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "idmef_message_type_to_string" "', argument " "1"" of type '" "idmef_message_type_t""'"); } arg1 = (idmef_message_type_t)(val1); { Py_BEGIN_ALLOW_THREADS result = (char *)idmef_message_type_to_string(arg1); Py_END_ALLOW_THREADS } resultobj = SWIG_FromCharPtr((const char *)result); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_message_new(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_message_t **arg1 = (idmef_message_t **) 0 ; idmef_message_t *tmp1 ; int result; { arg1 = (idmef_message_t **) &tmp1; } if (!PyArg_ParseTuple(args,(char *)":idmef_message_new")) SWIG_fail; { Py_BEGIN_ALLOW_THREADS result = (int)idmef_message_new(arg1); Py_END_ALLOW_THREADS } { if ( result < 0 ) { swig_python_raise_exception(result); resultobj = NULL; } else { resultobj = PyInt_FromLong(result); } } { if ( result >= 0 ) resultobj = SWIG_NewPointerObj((void *) * arg1, SWIGTYPE_p_idmef_message, 0); } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_message_copy(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_message_t *arg1 = (idmef_message_t *) 0 ; idmef_message_t *arg2 = (idmef_message_t *) 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; int result; if (!PyArg_ParseTuple(args,(char *)"OO:idmef_message_copy",&obj0,&obj1)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_message, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { if ( obj1 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj1, (void **)&arg2, SWIGTYPE_p_idmef_message, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { Py_BEGIN_ALLOW_THREADS result = (int)idmef_message_copy((struct idmef_message const *)arg1,arg2); Py_END_ALLOW_THREADS } { if ( result < 0 ) { swig_python_raise_exception(result); resultobj = NULL; } else { resultobj = PyInt_FromLong(result); } } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_message_clone(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_message_t *arg1 = (idmef_message_t *) 0 ; idmef_message_t **arg2 = (idmef_message_t **) 0 ; idmef_message_t *tmp2 ; PyObject * obj0 = 0 ; int result; { arg2 = (idmef_message_t **) &tmp2; } if (!PyArg_ParseTuple(args,(char *)"O:idmef_message_clone",&obj0)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_message, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { Py_BEGIN_ALLOW_THREADS result = (int)idmef_message_clone(arg1,arg2); Py_END_ALLOW_THREADS } { if ( result < 0 ) { swig_python_raise_exception(result); resultobj = NULL; } else { resultobj = PyInt_FromLong(result); } } { if ( result >= 0 ) resultobj = SWIG_NewPointerObj((void *) * arg2, SWIGTYPE_p_idmef_message, 0); } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_message_compare(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_message_t *arg1 = (idmef_message_t *) 0 ; idmef_message_t *arg2 = (idmef_message_t *) 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; int result; if (!PyArg_ParseTuple(args,(char *)"OO:idmef_message_compare",&obj0,&obj1)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_message, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { if ( obj1 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj1, (void **)&arg2, SWIGTYPE_p_idmef_message, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { Py_BEGIN_ALLOW_THREADS result = (int)idmef_message_compare((struct idmef_message const *)arg1,(struct idmef_message const *)arg2); Py_END_ALLOW_THREADS } { resultobj = PyInt_FromLong(result); } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_message_ref(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_message_t *arg1 = (idmef_message_t *) 0 ; PyObject * obj0 = 0 ; idmef_message_t *result = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:idmef_message_ref",&obj0)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_message, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { Py_BEGIN_ALLOW_THREADS result = (idmef_message_t *)idmef_message_ref(arg1); Py_END_ALLOW_THREADS } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_idmef_message, 0 | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_message_destroy(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_message_t *arg1 = (idmef_message_t *) 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:idmef_message_destroy",&obj0)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_message, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { Py_BEGIN_ALLOW_THREADS idmef_message_destroy(arg1); Py_END_ALLOW_THREADS } resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_message_get_version(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_message_t *arg1 = (idmef_message_t *) 0 ; PyObject * obj0 = 0 ; prelude_string_t *result = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:idmef_message_get_version",&obj0)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_message, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { Py_BEGIN_ALLOW_THREADS result = (prelude_string_t *)idmef_message_get_version(arg1); Py_END_ALLOW_THREADS } { resultobj = swig_python_string(result); } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_message_set_version(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_message_t *arg1 = (idmef_message_t *) 0 ; prelude_string_t *arg2 = (prelude_string_t *) 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:idmef_message_set_version",&obj0,&obj1)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_message, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { int ret; ret = prelude_string_new_dup_fast(&(arg2), PyString_AsString(obj1), PyString_Size(obj1)); if ( ret < 0 ) { swig_python_raise_exception(ret); return NULL; } } { Py_BEGIN_ALLOW_THREADS idmef_message_set_version(arg1,arg2); Py_END_ALLOW_THREADS } resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_message_new_version(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_message_t *arg1 = (idmef_message_t *) 0 ; prelude_string_t **arg2 = (prelude_string_t **) 0 ; void *argp2 = 0 ; int res2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; int result; if (!PyArg_ParseTuple(args,(char *)"OO:idmef_message_new_version",&obj0,&obj1)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_message, SWIG_POINTER_EXCEPTION|0) ) return NULL; } res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_p_prelude_string_t, 0 | 0 ); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "idmef_message_new_version" "', argument " "2"" of type '" "prelude_string_t **""'"); } arg2 = (prelude_string_t **)(argp2); { Py_BEGIN_ALLOW_THREADS result = (int)idmef_message_new_version(arg1,arg2); Py_END_ALLOW_THREADS } { if ( result < 0 ) { swig_python_raise_exception(result); resultobj = NULL; } else { resultobj = PyInt_FromLong(result); } } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_message_get_type(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_message_t *arg1 = (idmef_message_t *) 0 ; PyObject * obj0 = 0 ; idmef_message_type_t result; if (!PyArg_ParseTuple(args,(char *)"O:idmef_message_get_type",&obj0)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_message, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { Py_BEGIN_ALLOW_THREADS result = (idmef_message_type_t)idmef_message_get_type(arg1); Py_END_ALLOW_THREADS } resultobj = SWIG_From_int((int)(result)); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_message_get_alert(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_message_t *arg1 = (idmef_message_t *) 0 ; PyObject * obj0 = 0 ; idmef_alert_t *result = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:idmef_message_get_alert",&obj0)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_message, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { Py_BEGIN_ALLOW_THREADS result = (idmef_alert_t *)idmef_message_get_alert(arg1); Py_END_ALLOW_THREADS } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_idmef_alert, 0 | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_message_set_alert(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_message_t *arg1 = (idmef_message_t *) 0 ; idmef_alert_t *arg2 = (idmef_alert_t *) 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:idmef_message_set_alert",&obj0,&obj1)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_message, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { if ( obj1 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj1, (void **)&arg2, SWIGTYPE_p_idmef_alert, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { Py_BEGIN_ALLOW_THREADS idmef_message_set_alert(arg1,arg2); Py_END_ALLOW_THREADS } resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_message_new_alert(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_message_t *arg1 = (idmef_message_t *) 0 ; idmef_alert_t **arg2 = (idmef_alert_t **) 0 ; idmef_alert_t *tmp2 ; PyObject * obj0 = 0 ; int result; { arg2 = (idmef_alert_t **) &tmp2; } if (!PyArg_ParseTuple(args,(char *)"O:idmef_message_new_alert",&obj0)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_message, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { Py_BEGIN_ALLOW_THREADS result = (int)idmef_message_new_alert(arg1,arg2); Py_END_ALLOW_THREADS } { if ( result < 0 ) { swig_python_raise_exception(result); resultobj = NULL; } else { resultobj = PyInt_FromLong(result); } } { if ( result >= 0 ) resultobj = SWIG_NewPointerObj((void *) * arg2, SWIGTYPE_p_idmef_alert, 0); } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_message_get_heartbeat(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_message_t *arg1 = (idmef_message_t *) 0 ; PyObject * obj0 = 0 ; idmef_heartbeat_t *result = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:idmef_message_get_heartbeat",&obj0)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_message, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { Py_BEGIN_ALLOW_THREADS result = (idmef_heartbeat_t *)idmef_message_get_heartbeat(arg1); Py_END_ALLOW_THREADS } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_idmef_heartbeat, 0 | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_message_set_heartbeat(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_message_t *arg1 = (idmef_message_t *) 0 ; idmef_heartbeat_t *arg2 = (idmef_heartbeat_t *) 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:idmef_message_set_heartbeat",&obj0,&obj1)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_message, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { if ( obj1 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj1, (void **)&arg2, SWIGTYPE_p_idmef_heartbeat, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { Py_BEGIN_ALLOW_THREADS idmef_message_set_heartbeat(arg1,arg2); Py_END_ALLOW_THREADS } resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_message_new_heartbeat(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_message_t *arg1 = (idmef_message_t *) 0 ; idmef_heartbeat_t **arg2 = (idmef_heartbeat_t **) 0 ; idmef_heartbeat_t *tmp2 ; PyObject * obj0 = 0 ; int result; { arg2 = (idmef_heartbeat_t **) &tmp2; } if (!PyArg_ParseTuple(args,(char *)"O:idmef_message_new_heartbeat",&obj0)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_message, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { Py_BEGIN_ALLOW_THREADS result = (int)idmef_message_new_heartbeat(arg1,arg2); Py_END_ALLOW_THREADS } { if ( result < 0 ) { swig_python_raise_exception(result); resultobj = NULL; } else { resultobj = PyInt_FromLong(result); } } { if ( result >= 0 ) resultobj = SWIG_NewPointerObj((void *) * arg2, SWIGTYPE_p_idmef_heartbeat, 0); } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_message_set_pmsg(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_message_t *arg1 = (idmef_message_t *) 0 ; prelude_msg_t *arg2 = (prelude_msg_t *) 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:idmef_message_set_pmsg",&obj0,&obj1)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_message, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { if ( obj1 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj1, (void **)&arg2, SWIGTYPE_p_prelude_msg, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { Py_BEGIN_ALLOW_THREADS idmef_message_set_pmsg(arg1,arg2); Py_END_ALLOW_THREADS } resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_message_get_pmsg(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_message_t *arg1 = (idmef_message_t *) 0 ; PyObject * obj0 = 0 ; prelude_msg_t *result = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:idmef_message_get_pmsg",&obj0)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_message, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { Py_BEGIN_ALLOW_THREADS result = (prelude_msg_t *)idmef_message_get_pmsg(arg1); Py_END_ALLOW_THREADS } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_prelude_msg, 0 | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_value_new_int8(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_value_t **arg1 = (idmef_value_t **) 0 ; int8_t arg2 ; idmef_value_t *tmp1 ; char val2 ; int ecode2 = 0 ; PyObject * obj0 = 0 ; int result; { arg1 = (idmef_value_t **) &tmp1; } if (!PyArg_ParseTuple(args,(char *)"O:idmef_value_new_int8",&obj0)) SWIG_fail; ecode2 = SWIG_AsVal_char(obj0, &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "idmef_value_new_int8" "', argument " "2"" of type '" "int8_t""'"); } arg2 = (int8_t)(val2); { Py_BEGIN_ALLOW_THREADS result = (int)idmef_value_new_int8(arg1,arg2); Py_END_ALLOW_THREADS } { if ( result < 0 ) { swig_python_raise_exception(result); resultobj = NULL; } else { resultobj = PyInt_FromLong(result); } } { if ( result >= 0 ) resultobj = SWIG_NewPointerObj((void *) * arg1, SWIGTYPE_p_idmef_value, 0); } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_value_new_uint8(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_value_t **arg1 = (idmef_value_t **) 0 ; uint8_t arg2 ; idmef_value_t *tmp1 ; unsigned char val2 ; int ecode2 = 0 ; PyObject * obj0 = 0 ; int result; { arg1 = (idmef_value_t **) &tmp1; } if (!PyArg_ParseTuple(args,(char *)"O:idmef_value_new_uint8",&obj0)) SWIG_fail; ecode2 = SWIG_AsVal_unsigned_SS_char(obj0, &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "idmef_value_new_uint8" "', argument " "2"" of type '" "uint8_t""'"); } arg2 = (uint8_t)(val2); { Py_BEGIN_ALLOW_THREADS result = (int)idmef_value_new_uint8(arg1,arg2); Py_END_ALLOW_THREADS } { if ( result < 0 ) { swig_python_raise_exception(result); resultobj = NULL; } else { resultobj = PyInt_FromLong(result); } } { if ( result >= 0 ) resultobj = SWIG_NewPointerObj((void *) * arg1, SWIGTYPE_p_idmef_value, 0); } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_value_new_int16(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_value_t **arg1 = (idmef_value_t **) 0 ; int16_t arg2 ; idmef_value_t *tmp1 ; short val2 ; int ecode2 = 0 ; PyObject * obj0 = 0 ; int result; { arg1 = (idmef_value_t **) &tmp1; } if (!PyArg_ParseTuple(args,(char *)"O:idmef_value_new_int16",&obj0)) SWIG_fail; ecode2 = SWIG_AsVal_short(obj0, &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "idmef_value_new_int16" "', argument " "2"" of type '" "int16_t""'"); } arg2 = (int16_t)(val2); { Py_BEGIN_ALLOW_THREADS result = (int)idmef_value_new_int16(arg1,arg2); Py_END_ALLOW_THREADS } { if ( result < 0 ) { swig_python_raise_exception(result); resultobj = NULL; } else { resultobj = PyInt_FromLong(result); } } { if ( result >= 0 ) resultobj = SWIG_NewPointerObj((void *) * arg1, SWIGTYPE_p_idmef_value, 0); } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_value_new_uint16(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_value_t **arg1 = (idmef_value_t **) 0 ; uint16_t arg2 ; idmef_value_t *tmp1 ; unsigned short val2 ; int ecode2 = 0 ; PyObject * obj0 = 0 ; int result; { arg1 = (idmef_value_t **) &tmp1; } if (!PyArg_ParseTuple(args,(char *)"O:idmef_value_new_uint16",&obj0)) SWIG_fail; ecode2 = SWIG_AsVal_unsigned_SS_short(obj0, &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "idmef_value_new_uint16" "', argument " "2"" of type '" "uint16_t""'"); } arg2 = (uint16_t)(val2); { Py_BEGIN_ALLOW_THREADS result = (int)idmef_value_new_uint16(arg1,arg2); Py_END_ALLOW_THREADS } { if ( result < 0 ) { swig_python_raise_exception(result); resultobj = NULL; } else { resultobj = PyInt_FromLong(result); } } { if ( result >= 0 ) resultobj = SWIG_NewPointerObj((void *) * arg1, SWIGTYPE_p_idmef_value, 0); } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_value_new_int32(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_value_t **arg1 = (idmef_value_t **) 0 ; int32_t arg2 ; idmef_value_t *tmp1 ; int val2 ; int ecode2 = 0 ; PyObject * obj0 = 0 ; int result; { arg1 = (idmef_value_t **) &tmp1; } if (!PyArg_ParseTuple(args,(char *)"O:idmef_value_new_int32",&obj0)) SWIG_fail; ecode2 = SWIG_AsVal_int(obj0, &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "idmef_value_new_int32" "', argument " "2"" of type '" "int32_t""'"); } arg2 = (int32_t)(val2); { Py_BEGIN_ALLOW_THREADS result = (int)idmef_value_new_int32(arg1,arg2); Py_END_ALLOW_THREADS } { if ( result < 0 ) { swig_python_raise_exception(result); resultobj = NULL; } else { resultobj = PyInt_FromLong(result); } } { if ( result >= 0 ) resultobj = SWIG_NewPointerObj((void *) * arg1, SWIGTYPE_p_idmef_value, 0); } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_value_new_uint32(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_value_t **arg1 = (idmef_value_t **) 0 ; uint32_t arg2 ; idmef_value_t *tmp1 ; unsigned int val2 ; int ecode2 = 0 ; PyObject * obj0 = 0 ; int result; { arg1 = (idmef_value_t **) &tmp1; } if (!PyArg_ParseTuple(args,(char *)"O:idmef_value_new_uint32",&obj0)) SWIG_fail; ecode2 = SWIG_AsVal_unsigned_SS_int(obj0, &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "idmef_value_new_uint32" "', argument " "2"" of type '" "uint32_t""'"); } arg2 = (uint32_t)(val2); { Py_BEGIN_ALLOW_THREADS result = (int)idmef_value_new_uint32(arg1,arg2); Py_END_ALLOW_THREADS } { if ( result < 0 ) { swig_python_raise_exception(result); resultobj = NULL; } else { resultobj = PyInt_FromLong(result); } } { if ( result >= 0 ) resultobj = SWIG_NewPointerObj((void *) * arg1, SWIGTYPE_p_idmef_value, 0); } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_value_new_int64(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_value_t **arg1 = (idmef_value_t **) 0 ; int64_t arg2 ; idmef_value_t *tmp1 ; long long val2 ; int ecode2 = 0 ; PyObject * obj0 = 0 ; int result; { arg1 = (idmef_value_t **) &tmp1; } if (!PyArg_ParseTuple(args,(char *)"O:idmef_value_new_int64",&obj0)) SWIG_fail; ecode2 = SWIG_AsVal_long_SS_long(obj0, &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "idmef_value_new_int64" "', argument " "2"" of type '" "int64_t""'"); } arg2 = (int64_t)(val2); { Py_BEGIN_ALLOW_THREADS result = (int)idmef_value_new_int64(arg1,arg2); Py_END_ALLOW_THREADS } { if ( result < 0 ) { swig_python_raise_exception(result); resultobj = NULL; } else { resultobj = PyInt_FromLong(result); } } { if ( result >= 0 ) resultobj = SWIG_NewPointerObj((void *) * arg1, SWIGTYPE_p_idmef_value, 0); } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_value_new_uint64(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_value_t **arg1 = (idmef_value_t **) 0 ; uint64_t arg2 ; idmef_value_t *tmp1 ; unsigned long long val2 ; int ecode2 = 0 ; PyObject * obj0 = 0 ; int result; { arg1 = (idmef_value_t **) &tmp1; } if (!PyArg_ParseTuple(args,(char *)"O:idmef_value_new_uint64",&obj0)) SWIG_fail; ecode2 = SWIG_AsVal_unsigned_SS_long_SS_long(obj0, &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "idmef_value_new_uint64" "', argument " "2"" of type '" "uint64_t""'"); } arg2 = (uint64_t)(val2); { Py_BEGIN_ALLOW_THREADS result = (int)idmef_value_new_uint64(arg1,arg2); Py_END_ALLOW_THREADS } { if ( result < 0 ) { swig_python_raise_exception(result); resultobj = NULL; } else { resultobj = PyInt_FromLong(result); } } { if ( result >= 0 ) resultobj = SWIG_NewPointerObj((void *) * arg1, SWIGTYPE_p_idmef_value, 0); } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_value_new_float(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_value_t **arg1 = (idmef_value_t **) 0 ; float arg2 ; idmef_value_t *tmp1 ; float val2 ; int ecode2 = 0 ; PyObject * obj0 = 0 ; int result; { arg1 = (idmef_value_t **) &tmp1; } if (!PyArg_ParseTuple(args,(char *)"O:idmef_value_new_float",&obj0)) SWIG_fail; ecode2 = SWIG_AsVal_float(obj0, &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "idmef_value_new_float" "', argument " "2"" of type '" "float""'"); } arg2 = (float)(val2); { Py_BEGIN_ALLOW_THREADS result = (int)idmef_value_new_float(arg1,arg2); Py_END_ALLOW_THREADS } { if ( result < 0 ) { swig_python_raise_exception(result); resultobj = NULL; } else { resultobj = PyInt_FromLong(result); } } { if ( result >= 0 ) resultobj = SWIG_NewPointerObj((void *) * arg1, SWIGTYPE_p_idmef_value, 0); } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_value_new_double(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_value_t **arg1 = (idmef_value_t **) 0 ; double arg2 ; idmef_value_t *tmp1 ; double val2 ; int ecode2 = 0 ; PyObject * obj0 = 0 ; int result; { arg1 = (idmef_value_t **) &tmp1; } if (!PyArg_ParseTuple(args,(char *)"O:idmef_value_new_double",&obj0)) SWIG_fail; ecode2 = SWIG_AsVal_double(obj0, &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "idmef_value_new_double" "', argument " "2"" of type '" "double""'"); } arg2 = (double)(val2); { Py_BEGIN_ALLOW_THREADS result = (int)idmef_value_new_double(arg1,arg2); Py_END_ALLOW_THREADS } { if ( result < 0 ) { swig_python_raise_exception(result); resultobj = NULL; } else { resultobj = PyInt_FromLong(result); } } { if ( result >= 0 ) resultobj = SWIG_NewPointerObj((void *) * arg1, SWIGTYPE_p_idmef_value, 0); } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_value_new_string(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_value_t **arg1 = (idmef_value_t **) 0 ; prelude_string_t *arg2 = (prelude_string_t *) 0 ; idmef_value_t *tmp1 ; PyObject * obj0 = 0 ; int result; { arg1 = (idmef_value_t **) &tmp1; } if (!PyArg_ParseTuple(args,(char *)"O:idmef_value_new_string",&obj0)) SWIG_fail; { int ret; ret = prelude_string_new_dup_fast(&(arg2), PyString_AsString(obj0), PyString_Size(obj0)); if ( ret < 0 ) { swig_python_raise_exception(ret); return NULL; } } { Py_BEGIN_ALLOW_THREADS result = (int)idmef_value_new_string(arg1,arg2); Py_END_ALLOW_THREADS } { if ( result < 0 ) { swig_python_raise_exception(result); resultobj = NULL; } else { resultobj = PyInt_FromLong(result); } } { if ( result >= 0 ) resultobj = SWIG_NewPointerObj((void *) * arg1, SWIGTYPE_p_idmef_value, 0); } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_value_new_time(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_value_t **arg1 = (idmef_value_t **) 0 ; idmef_time_t *arg2 = (idmef_time_t *) 0 ; idmef_value_t *tmp1 ; PyObject * obj0 = 0 ; int result; { arg1 = (idmef_value_t **) &tmp1; } if (!PyArg_ParseTuple(args,(char *)"O:idmef_value_new_time",&obj0)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg2, SWIGTYPE_p_idmef_time, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { Py_BEGIN_ALLOW_THREADS result = (int)idmef_value_new_time(arg1,arg2); Py_END_ALLOW_THREADS } { if ( result < 0 ) { swig_python_raise_exception(result); resultobj = NULL; } else { resultobj = PyInt_FromLong(result); } } { if ( result >= 0 ) resultobj = SWIG_NewPointerObj((void *) * arg1, SWIGTYPE_p_idmef_value, 0); } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_value_new_data(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_value_t **arg1 = (idmef_value_t **) 0 ; idmef_data_t *arg2 = (idmef_data_t *) 0 ; idmef_value_t *tmp1 ; PyObject * obj0 = 0 ; int result; { arg1 = (idmef_value_t **) &tmp1; } if (!PyArg_ParseTuple(args,(char *)"O:idmef_value_new_data",&obj0)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg2, SWIGTYPE_p_idmef_data_t, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { Py_BEGIN_ALLOW_THREADS result = (int)idmef_value_new_data(arg1,arg2); Py_END_ALLOW_THREADS } { if ( result < 0 ) { swig_python_raise_exception(result); resultobj = NULL; } else { resultobj = PyInt_FromLong(result); } } { if ( result >= 0 ) resultobj = SWIG_NewPointerObj((void *) * arg1, SWIGTYPE_p_idmef_value, 0); } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_value_new_class(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_value_t **arg1 = (idmef_value_t **) 0 ; idmef_class_id_t arg2 ; void *arg3 = (void *) 0 ; idmef_value_t *tmp1 ; int val2 ; int ecode2 = 0 ; int res3 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; int result; { arg1 = (idmef_value_t **) &tmp1; } if (!PyArg_ParseTuple(args,(char *)"OO:idmef_value_new_class",&obj0,&obj1)) SWIG_fail; ecode2 = SWIG_AsVal_int(obj0, &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "idmef_value_new_class" "', argument " "2"" of type '" "idmef_class_id_t""'"); } arg2 = (idmef_class_id_t)(val2); res3 = SWIG_ConvertPtr(obj1,SWIG_as_voidptrptr(&arg3), 0, 0); if (!SWIG_IsOK(res3)) { SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "idmef_value_new_class" "', argument " "3"" of type '" "void *""'"); } { Py_BEGIN_ALLOW_THREADS result = (int)idmef_value_new_class(arg1,arg2,arg3); Py_END_ALLOW_THREADS } { if ( result < 0 ) { swig_python_raise_exception(result); resultobj = NULL; } else { resultobj = PyInt_FromLong(result); } } { if ( result >= 0 ) resultobj = SWIG_NewPointerObj((void *) * arg1, SWIGTYPE_p_idmef_value, 0); } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_value_new_list(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_value_t **arg1 = (idmef_value_t **) 0 ; idmef_value_t *tmp1 ; int result; { arg1 = (idmef_value_t **) &tmp1; } if (!PyArg_ParseTuple(args,(char *)":idmef_value_new_list")) SWIG_fail; { Py_BEGIN_ALLOW_THREADS result = (int)idmef_value_new_list(arg1); Py_END_ALLOW_THREADS } { if ( result < 0 ) { swig_python_raise_exception(result); resultobj = NULL; } else { resultobj = PyInt_FromLong(result); } } { if ( result >= 0 ) resultobj = SWIG_NewPointerObj((void *) * arg1, SWIGTYPE_p_idmef_value, 0); } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_value_new_enum(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_value_t **arg1 = (idmef_value_t **) 0 ; idmef_class_id_t arg2 ; char *arg3 = (char *) 0 ; idmef_value_t *tmp1 ; int val2 ; int ecode2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; int result; { arg1 = (idmef_value_t **) &tmp1; } if (!PyArg_ParseTuple(args,(char *)"OO:idmef_value_new_enum",&obj0,&obj1)) SWIG_fail; ecode2 = SWIG_AsVal_int(obj0, &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "idmef_value_new_enum" "', argument " "2"" of type '" "idmef_class_id_t""'"); } arg2 = (idmef_class_id_t)(val2); { if ( obj1 == Py_None ) arg3 = NULL; else if ( PyString_Check(obj1) ) arg3 = PyString_AsString(obj1); else { PyErr_Format(PyExc_TypeError, "expected None or string, %s found", obj1->ob_type->tp_name); return NULL; } } { Py_BEGIN_ALLOW_THREADS result = (int)idmef_value_new_enum(arg1,arg2,(char const *)arg3); Py_END_ALLOW_THREADS } { if ( result < 0 ) { swig_python_raise_exception(result); resultobj = NULL; } else { resultobj = PyInt_FromLong(result); } } { if ( result >= 0 ) resultobj = SWIG_NewPointerObj((void *) * arg1, SWIGTYPE_p_idmef_value, 0); } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_value_new_enum_from_string(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_value_t **arg1 = (idmef_value_t **) 0 ; idmef_class_id_t arg2 ; char *arg3 = (char *) 0 ; idmef_value_t *tmp1 ; int val2 ; int ecode2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; int result; { arg1 = (idmef_value_t **) &tmp1; } if (!PyArg_ParseTuple(args,(char *)"OO:idmef_value_new_enum_from_string",&obj0,&obj1)) SWIG_fail; ecode2 = SWIG_AsVal_int(obj0, &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "idmef_value_new_enum_from_string" "', argument " "2"" of type '" "idmef_class_id_t""'"); } arg2 = (idmef_class_id_t)(val2); { if ( obj1 == Py_None ) arg3 = NULL; else if ( PyString_Check(obj1) ) arg3 = PyString_AsString(obj1); else { PyErr_Format(PyExc_TypeError, "expected None or string, %s found", obj1->ob_type->tp_name); return NULL; } } { Py_BEGIN_ALLOW_THREADS result = (int)idmef_value_new_enum_from_string(arg1,arg2,(char const *)arg3); Py_END_ALLOW_THREADS } { if ( result < 0 ) { swig_python_raise_exception(result); resultobj = NULL; } else { resultobj = PyInt_FromLong(result); } } { if ( result >= 0 ) resultobj = SWIG_NewPointerObj((void *) * arg1, SWIGTYPE_p_idmef_value, 0); } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_value_new_enum_from_numeric(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_value_t **arg1 = (idmef_value_t **) 0 ; idmef_class_id_t arg2 ; int arg3 ; idmef_value_t *tmp1 ; int val2 ; int ecode2 = 0 ; int val3 ; int ecode3 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; int result; { arg1 = (idmef_value_t **) &tmp1; } if (!PyArg_ParseTuple(args,(char *)"OO:idmef_value_new_enum_from_numeric",&obj0,&obj1)) SWIG_fail; ecode2 = SWIG_AsVal_int(obj0, &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "idmef_value_new_enum_from_numeric" "', argument " "2"" of type '" "idmef_class_id_t""'"); } arg2 = (idmef_class_id_t)(val2); ecode3 = SWIG_AsVal_int(obj1, &val3); if (!SWIG_IsOK(ecode3)) { SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "idmef_value_new_enum_from_numeric" "', argument " "3"" of type '" "int""'"); } arg3 = (int)(val3); { Py_BEGIN_ALLOW_THREADS result = (int)idmef_value_new_enum_from_numeric(arg1,arg2,arg3); Py_END_ALLOW_THREADS } { if ( result < 0 ) { swig_python_raise_exception(result); resultobj = NULL; } else { resultobj = PyInt_FromLong(result); } } { if ( result >= 0 ) resultobj = SWIG_NewPointerObj((void *) * arg1, SWIGTYPE_p_idmef_value, 0); } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_value_set_int8(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_value_t *arg1 = (idmef_value_t *) 0 ; int8_t arg2 ; char val2 ; int ecode2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; int result; if (!PyArg_ParseTuple(args,(char *)"OO:idmef_value_set_int8",&obj0,&obj1)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_value, SWIG_POINTER_EXCEPTION|0) ) return NULL; } ecode2 = SWIG_AsVal_char(obj1, &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "idmef_value_set_int8" "', argument " "2"" of type '" "int8_t""'"); } arg2 = (int8_t)(val2); { Py_BEGIN_ALLOW_THREADS result = (int)idmef_value_set_int8(arg1,arg2); Py_END_ALLOW_THREADS } { if ( result < 0 ) { swig_python_raise_exception(result); resultobj = NULL; } else { resultobj = PyInt_FromLong(result); } } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_value_set_uint8(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_value_t *arg1 = (idmef_value_t *) 0 ; uint8_t arg2 ; unsigned char val2 ; int ecode2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; int result; if (!PyArg_ParseTuple(args,(char *)"OO:idmef_value_set_uint8",&obj0,&obj1)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_value, SWIG_POINTER_EXCEPTION|0) ) return NULL; } ecode2 = SWIG_AsVal_unsigned_SS_char(obj1, &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "idmef_value_set_uint8" "', argument " "2"" of type '" "uint8_t""'"); } arg2 = (uint8_t)(val2); { Py_BEGIN_ALLOW_THREADS result = (int)idmef_value_set_uint8(arg1,arg2); Py_END_ALLOW_THREADS } { if ( result < 0 ) { swig_python_raise_exception(result); resultobj = NULL; } else { resultobj = PyInt_FromLong(result); } } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_value_set_int16(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_value_t *arg1 = (idmef_value_t *) 0 ; int16_t arg2 ; short val2 ; int ecode2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; int result; if (!PyArg_ParseTuple(args,(char *)"OO:idmef_value_set_int16",&obj0,&obj1)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_value, SWIG_POINTER_EXCEPTION|0) ) return NULL; } ecode2 = SWIG_AsVal_short(obj1, &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "idmef_value_set_int16" "', argument " "2"" of type '" "int16_t""'"); } arg2 = (int16_t)(val2); { Py_BEGIN_ALLOW_THREADS result = (int)idmef_value_set_int16(arg1,arg2); Py_END_ALLOW_THREADS } { if ( result < 0 ) { swig_python_raise_exception(result); resultobj = NULL; } else { resultobj = PyInt_FromLong(result); } } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_value_set_uint16(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_value_t *arg1 = (idmef_value_t *) 0 ; uint16_t arg2 ; unsigned short val2 ; int ecode2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; int result; if (!PyArg_ParseTuple(args,(char *)"OO:idmef_value_set_uint16",&obj0,&obj1)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_value, SWIG_POINTER_EXCEPTION|0) ) return NULL; } ecode2 = SWIG_AsVal_unsigned_SS_short(obj1, &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "idmef_value_set_uint16" "', argument " "2"" of type '" "uint16_t""'"); } arg2 = (uint16_t)(val2); { Py_BEGIN_ALLOW_THREADS result = (int)idmef_value_set_uint16(arg1,arg2); Py_END_ALLOW_THREADS } { if ( result < 0 ) { swig_python_raise_exception(result); resultobj = NULL; } else { resultobj = PyInt_FromLong(result); } } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_value_set_int32(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_value_t *arg1 = (idmef_value_t *) 0 ; int32_t arg2 ; int val2 ; int ecode2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; int result; if (!PyArg_ParseTuple(args,(char *)"OO:idmef_value_set_int32",&obj0,&obj1)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_value, SWIG_POINTER_EXCEPTION|0) ) return NULL; } ecode2 = SWIG_AsVal_int(obj1, &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "idmef_value_set_int32" "', argument " "2"" of type '" "int32_t""'"); } arg2 = (int32_t)(val2); { Py_BEGIN_ALLOW_THREADS result = (int)idmef_value_set_int32(arg1,arg2); Py_END_ALLOW_THREADS } { if ( result < 0 ) { swig_python_raise_exception(result); resultobj = NULL; } else { resultobj = PyInt_FromLong(result); } } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_value_set_uint32(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_value_t *arg1 = (idmef_value_t *) 0 ; uint32_t arg2 ; unsigned int val2 ; int ecode2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; int result; if (!PyArg_ParseTuple(args,(char *)"OO:idmef_value_set_uint32",&obj0,&obj1)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_value, SWIG_POINTER_EXCEPTION|0) ) return NULL; } ecode2 = SWIG_AsVal_unsigned_SS_int(obj1, &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "idmef_value_set_uint32" "', argument " "2"" of type '" "uint32_t""'"); } arg2 = (uint32_t)(val2); { Py_BEGIN_ALLOW_THREADS result = (int)idmef_value_set_uint32(arg1,arg2); Py_END_ALLOW_THREADS } { if ( result < 0 ) { swig_python_raise_exception(result); resultobj = NULL; } else { resultobj = PyInt_FromLong(result); } } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_value_set_int64(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_value_t *arg1 = (idmef_value_t *) 0 ; int64_t arg2 ; long long val2 ; int ecode2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; int result; if (!PyArg_ParseTuple(args,(char *)"OO:idmef_value_set_int64",&obj0,&obj1)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_value, SWIG_POINTER_EXCEPTION|0) ) return NULL; } ecode2 = SWIG_AsVal_long_SS_long(obj1, &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "idmef_value_set_int64" "', argument " "2"" of type '" "int64_t""'"); } arg2 = (int64_t)(val2); { Py_BEGIN_ALLOW_THREADS result = (int)idmef_value_set_int64(arg1,arg2); Py_END_ALLOW_THREADS } { if ( result < 0 ) { swig_python_raise_exception(result); resultobj = NULL; } else { resultobj = PyInt_FromLong(result); } } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_value_set_uint64(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_value_t *arg1 = (idmef_value_t *) 0 ; uint64_t arg2 ; unsigned long long val2 ; int ecode2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; int result; if (!PyArg_ParseTuple(args,(char *)"OO:idmef_value_set_uint64",&obj0,&obj1)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_value, SWIG_POINTER_EXCEPTION|0) ) return NULL; } ecode2 = SWIG_AsVal_unsigned_SS_long_SS_long(obj1, &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "idmef_value_set_uint64" "', argument " "2"" of type '" "uint64_t""'"); } arg2 = (uint64_t)(val2); { Py_BEGIN_ALLOW_THREADS result = (int)idmef_value_set_uint64(arg1,arg2); Py_END_ALLOW_THREADS } { if ( result < 0 ) { swig_python_raise_exception(result); resultobj = NULL; } else { resultobj = PyInt_FromLong(result); } } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_value_set_float(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_value_t *arg1 = (idmef_value_t *) 0 ; float arg2 ; float val2 ; int ecode2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; int result; if (!PyArg_ParseTuple(args,(char *)"OO:idmef_value_set_float",&obj0,&obj1)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_value, SWIG_POINTER_EXCEPTION|0) ) return NULL; } ecode2 = SWIG_AsVal_float(obj1, &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "idmef_value_set_float" "', argument " "2"" of type '" "float""'"); } arg2 = (float)(val2); { Py_BEGIN_ALLOW_THREADS result = (int)idmef_value_set_float(arg1,arg2); Py_END_ALLOW_THREADS } { if ( result < 0 ) { swig_python_raise_exception(result); resultobj = NULL; } else { resultobj = PyInt_FromLong(result); } } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_value_set_double(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_value_t *arg1 = (idmef_value_t *) 0 ; double arg2 ; double val2 ; int ecode2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; int result; if (!PyArg_ParseTuple(args,(char *)"OO:idmef_value_set_double",&obj0,&obj1)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_value, SWIG_POINTER_EXCEPTION|0) ) return NULL; } ecode2 = SWIG_AsVal_double(obj1, &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "idmef_value_set_double" "', argument " "2"" of type '" "double""'"); } arg2 = (double)(val2); { Py_BEGIN_ALLOW_THREADS result = (int)idmef_value_set_double(arg1,arg2); Py_END_ALLOW_THREADS } { if ( result < 0 ) { swig_python_raise_exception(result); resultobj = NULL; } else { resultobj = PyInt_FromLong(result); } } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_value_set_string(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_value_t *arg1 = (idmef_value_t *) 0 ; prelude_string_t *arg2 = (prelude_string_t *) 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; int result; if (!PyArg_ParseTuple(args,(char *)"OO:idmef_value_set_string",&obj0,&obj1)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_value, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { int ret; ret = prelude_string_new_dup_fast(&(arg2), PyString_AsString(obj1), PyString_Size(obj1)); if ( ret < 0 ) { swig_python_raise_exception(ret); return NULL; } } { Py_BEGIN_ALLOW_THREADS result = (int)idmef_value_set_string(arg1,arg2); Py_END_ALLOW_THREADS } { if ( result < 0 ) { swig_python_raise_exception(result); resultobj = NULL; } else { resultobj = PyInt_FromLong(result); } } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_value_set_time(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_value_t *arg1 = (idmef_value_t *) 0 ; idmef_time_t *arg2 = (idmef_time_t *) 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; int result; if (!PyArg_ParseTuple(args,(char *)"OO:idmef_value_set_time",&obj0,&obj1)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_value, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { if ( obj1 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj1, (void **)&arg2, SWIGTYPE_p_idmef_time, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { Py_BEGIN_ALLOW_THREADS result = (int)idmef_value_set_time(arg1,arg2); Py_END_ALLOW_THREADS } { if ( result < 0 ) { swig_python_raise_exception(result); resultobj = NULL; } else { resultobj = PyInt_FromLong(result); } } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_value_set_data(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_value_t *arg1 = (idmef_value_t *) 0 ; idmef_data_t *arg2 = (idmef_data_t *) 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; int result; if (!PyArg_ParseTuple(args,(char *)"OO:idmef_value_set_data",&obj0,&obj1)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_value, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { if ( obj1 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj1, (void **)&arg2, SWIGTYPE_p_idmef_data_t, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { Py_BEGIN_ALLOW_THREADS result = (int)idmef_value_set_data(arg1,arg2); Py_END_ALLOW_THREADS } { if ( result < 0 ) { swig_python_raise_exception(result); resultobj = NULL; } else { resultobj = PyInt_FromLong(result); } } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_value_set_enum(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_value_t *arg1 = (idmef_value_t *) 0 ; idmef_class_id_t arg2 ; char *arg3 = (char *) 0 ; int val2 ; int ecode2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; PyObject * obj2 = 0 ; int result; if (!PyArg_ParseTuple(args,(char *)"OOO:idmef_value_set_enum",&obj0,&obj1,&obj2)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_value, SWIG_POINTER_EXCEPTION|0) ) return NULL; } ecode2 = SWIG_AsVal_int(obj1, &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "idmef_value_set_enum" "', argument " "2"" of type '" "idmef_class_id_t""'"); } arg2 = (idmef_class_id_t)(val2); { if ( obj2 == Py_None ) arg3 = NULL; else if ( PyString_Check(obj2) ) arg3 = PyString_AsString(obj2); else { PyErr_Format(PyExc_TypeError, "expected None or string, %s found", obj2->ob_type->tp_name); return NULL; } } { Py_BEGIN_ALLOW_THREADS result = (int)idmef_value_set_enum(arg1,arg2,(char const *)arg3); Py_END_ALLOW_THREADS } { if ( result < 0 ) { swig_python_raise_exception(result); resultobj = NULL; } else { resultobj = PyInt_FromLong(result); } } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_value_set_enum_from_string(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_value_t *arg1 = (idmef_value_t *) 0 ; idmef_class_id_t arg2 ; char *arg3 = (char *) 0 ; int val2 ; int ecode2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; PyObject * obj2 = 0 ; int result; if (!PyArg_ParseTuple(args,(char *)"OOO:idmef_value_set_enum_from_string",&obj0,&obj1,&obj2)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_value, SWIG_POINTER_EXCEPTION|0) ) return NULL; } ecode2 = SWIG_AsVal_int(obj1, &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "idmef_value_set_enum_from_string" "', argument " "2"" of type '" "idmef_class_id_t""'"); } arg2 = (idmef_class_id_t)(val2); { if ( obj2 == Py_None ) arg3 = NULL; else if ( PyString_Check(obj2) ) arg3 = PyString_AsString(obj2); else { PyErr_Format(PyExc_TypeError, "expected None or string, %s found", obj2->ob_type->tp_name); return NULL; } } { Py_BEGIN_ALLOW_THREADS result = (int)idmef_value_set_enum_from_string(arg1,arg2,(char const *)arg3); Py_END_ALLOW_THREADS } { if ( result < 0 ) { swig_python_raise_exception(result); resultobj = NULL; } else { resultobj = PyInt_FromLong(result); } } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_value_set_enum_from_numeric(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_value_t *arg1 = (idmef_value_t *) 0 ; idmef_class_id_t arg2 ; int arg3 ; int val2 ; int ecode2 = 0 ; int val3 ; int ecode3 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; PyObject * obj2 = 0 ; int result; if (!PyArg_ParseTuple(args,(char *)"OOO:idmef_value_set_enum_from_numeric",&obj0,&obj1,&obj2)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_value, SWIG_POINTER_EXCEPTION|0) ) return NULL; } ecode2 = SWIG_AsVal_int(obj1, &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "idmef_value_set_enum_from_numeric" "', argument " "2"" of type '" "idmef_class_id_t""'"); } arg2 = (idmef_class_id_t)(val2); ecode3 = SWIG_AsVal_int(obj2, &val3); if (!SWIG_IsOK(ecode3)) { SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "idmef_value_set_enum_from_numeric" "', argument " "3"" of type '" "int""'"); } arg3 = (int)(val3); { Py_BEGIN_ALLOW_THREADS result = (int)idmef_value_set_enum_from_numeric(arg1,arg2,arg3); Py_END_ALLOW_THREADS } { if ( result < 0 ) { swig_python_raise_exception(result); resultobj = NULL; } else { resultobj = PyInt_FromLong(result); } } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_value_set_class(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_value_t *arg1 = (idmef_value_t *) 0 ; idmef_class_id_t arg2 ; void *arg3 = (void *) 0 ; int val2 ; int ecode2 = 0 ; int res3 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; PyObject * obj2 = 0 ; int result; if (!PyArg_ParseTuple(args,(char *)"OOO:idmef_value_set_class",&obj0,&obj1,&obj2)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_value, SWIG_POINTER_EXCEPTION|0) ) return NULL; } ecode2 = SWIG_AsVal_int(obj1, &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "idmef_value_set_class" "', argument " "2"" of type '" "idmef_class_id_t""'"); } arg2 = (idmef_class_id_t)(val2); res3 = SWIG_ConvertPtr(obj2,SWIG_as_voidptrptr(&arg3), 0, 0); if (!SWIG_IsOK(res3)) { SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "idmef_value_set_class" "', argument " "3"" of type '" "void *""'"); } { Py_BEGIN_ALLOW_THREADS result = (int)idmef_value_set_class(arg1,arg2,arg3); Py_END_ALLOW_THREADS } { if ( result < 0 ) { swig_python_raise_exception(result); resultobj = NULL; } else { resultobj = PyInt_FromLong(result); } } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_value_new(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_value_t **arg1 = (idmef_value_t **) 0 ; idmef_value_type_id_t arg2 ; void *arg3 = (void *) 0 ; idmef_value_t *tmp1 ; int val2 ; int ecode2 = 0 ; int res3 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; int result; { arg1 = (idmef_value_t **) &tmp1; } if (!PyArg_ParseTuple(args,(char *)"OO:idmef_value_new",&obj0,&obj1)) SWIG_fail; ecode2 = SWIG_AsVal_int(obj0, &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "idmef_value_new" "', argument " "2"" of type '" "idmef_value_type_id_t""'"); } arg2 = (idmef_value_type_id_t)(val2); res3 = SWIG_ConvertPtr(obj1,SWIG_as_voidptrptr(&arg3), 0, 0); if (!SWIG_IsOK(res3)) { SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "idmef_value_new" "', argument " "3"" of type '" "void *""'"); } { Py_BEGIN_ALLOW_THREADS result = (int)idmef_value_new(arg1,arg2,arg3); Py_END_ALLOW_THREADS } { if ( result < 0 ) { swig_python_raise_exception(result); resultobj = NULL; } else { resultobj = PyInt_FromLong(result); } } { if ( result >= 0 ) resultobj = SWIG_NewPointerObj((void *) * arg1, SWIGTYPE_p_idmef_value, 0); } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_value_new_from_path(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_value_t **arg1 = (idmef_value_t **) 0 ; idmef_path_t *arg2 = (idmef_path_t *) 0 ; char *arg3 = (char *) 0 ; idmef_value_t *tmp1 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; int result; { arg1 = (idmef_value_t **) &tmp1; } if (!PyArg_ParseTuple(args,(char *)"OO:idmef_value_new_from_path",&obj0,&obj1)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg2, SWIGTYPE_p_idmef_path, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { if ( obj1 == Py_None ) arg3 = NULL; else if ( PyString_Check(obj1) ) arg3 = PyString_AsString(obj1); else { PyErr_Format(PyExc_TypeError, "expected None or string, %s found", obj1->ob_type->tp_name); return NULL; } } { Py_BEGIN_ALLOW_THREADS result = (int)idmef_value_new_from_path(arg1,arg2,(char const *)arg3); Py_END_ALLOW_THREADS } { if ( result < 0 ) { swig_python_raise_exception(result); resultobj = NULL; } else { resultobj = PyInt_FromLong(result); } } { if ( result >= 0 ) resultobj = SWIG_NewPointerObj((void *) * arg1, SWIGTYPE_p_idmef_value, 0); } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_value_new_from_string(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_value_t **arg1 = (idmef_value_t **) 0 ; idmef_value_type_id_t arg2 ; char *arg3 = (char *) 0 ; idmef_value_t *tmp1 ; int val2 ; int ecode2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; int result; { arg1 = (idmef_value_t **) &tmp1; } if (!PyArg_ParseTuple(args,(char *)"OO:idmef_value_new_from_string",&obj0,&obj1)) SWIG_fail; ecode2 = SWIG_AsVal_int(obj0, &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "idmef_value_new_from_string" "', argument " "2"" of type '" "idmef_value_type_id_t""'"); } arg2 = (idmef_value_type_id_t)(val2); { if ( obj1 == Py_None ) arg3 = NULL; else if ( PyString_Check(obj1) ) arg3 = PyString_AsString(obj1); else { PyErr_Format(PyExc_TypeError, "expected None or string, %s found", obj1->ob_type->tp_name); return NULL; } } { Py_BEGIN_ALLOW_THREADS result = (int)idmef_value_new_from_string(arg1,arg2,(char const *)arg3); Py_END_ALLOW_THREADS } { if ( result < 0 ) { swig_python_raise_exception(result); resultobj = NULL; } else { resultobj = PyInt_FromLong(result); } } { if ( result >= 0 ) resultobj = SWIG_NewPointerObj((void *) * arg1, SWIGTYPE_p_idmef_value, 0); } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_value_get_int8(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_value_t *arg1 = (idmef_value_t *) 0 ; PyObject * obj0 = 0 ; int8_t result; if (!PyArg_ParseTuple(args,(char *)"O:idmef_value_get_int8",&obj0)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_value, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { Py_BEGIN_ALLOW_THREADS result = (int8_t)idmef_value_get_int8((struct idmef_value const *)arg1); Py_END_ALLOW_THREADS } resultobj = SWIG_From_char((char)(result)); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_value_get_uint8(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_value_t *arg1 = (idmef_value_t *) 0 ; PyObject * obj0 = 0 ; uint8_t result; if (!PyArg_ParseTuple(args,(char *)"O:idmef_value_get_uint8",&obj0)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_value, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { Py_BEGIN_ALLOW_THREADS result = (uint8_t)idmef_value_get_uint8((struct idmef_value const *)arg1); Py_END_ALLOW_THREADS } resultobj = SWIG_From_unsigned_SS_char((unsigned char)(result)); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_value_get_int16(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_value_t *arg1 = (idmef_value_t *) 0 ; PyObject * obj0 = 0 ; int16_t result; if (!PyArg_ParseTuple(args,(char *)"O:idmef_value_get_int16",&obj0)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_value, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { Py_BEGIN_ALLOW_THREADS result = (int16_t)idmef_value_get_int16((struct idmef_value const *)arg1); Py_END_ALLOW_THREADS } resultobj = SWIG_From_short((short)(result)); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_value_get_uint16(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_value_t *arg1 = (idmef_value_t *) 0 ; PyObject * obj0 = 0 ; uint16_t result; if (!PyArg_ParseTuple(args,(char *)"O:idmef_value_get_uint16",&obj0)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_value, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { Py_BEGIN_ALLOW_THREADS result = (uint16_t)idmef_value_get_uint16((struct idmef_value const *)arg1); Py_END_ALLOW_THREADS } resultobj = SWIG_From_unsigned_SS_short((unsigned short)(result)); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_value_get_int32(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_value_t *arg1 = (idmef_value_t *) 0 ; PyObject * obj0 = 0 ; int32_t result; if (!PyArg_ParseTuple(args,(char *)"O:idmef_value_get_int32",&obj0)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_value, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { Py_BEGIN_ALLOW_THREADS result = (int32_t)idmef_value_get_int32((struct idmef_value const *)arg1); Py_END_ALLOW_THREADS } { resultobj = PyInt_FromLong(result); } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_value_get_uint32(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_value_t *arg1 = (idmef_value_t *) 0 ; PyObject * obj0 = 0 ; uint32_t result; if (!PyArg_ParseTuple(args,(char *)"O:idmef_value_get_uint32",&obj0)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_value, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { Py_BEGIN_ALLOW_THREADS result = (uint32_t)idmef_value_get_uint32((struct idmef_value const *)arg1); Py_END_ALLOW_THREADS } { resultobj = PyLong_FromUnsignedLong(result); } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_value_get_int64(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_value_t *arg1 = (idmef_value_t *) 0 ; PyObject * obj0 = 0 ; int64_t result; if (!PyArg_ParseTuple(args,(char *)"O:idmef_value_get_int64",&obj0)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_value, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { Py_BEGIN_ALLOW_THREADS result = (int64_t)idmef_value_get_int64((struct idmef_value const *)arg1); Py_END_ALLOW_THREADS } resultobj = SWIG_From_long_SS_long((long long)(result)); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_value_get_uint64(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_value_t *arg1 = (idmef_value_t *) 0 ; PyObject * obj0 = 0 ; uint64_t result; if (!PyArg_ParseTuple(args,(char *)"O:idmef_value_get_uint64",&obj0)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_value, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { Py_BEGIN_ALLOW_THREADS result = (uint64_t)idmef_value_get_uint64((struct idmef_value const *)arg1); Py_END_ALLOW_THREADS } resultobj = SWIG_From_unsigned_SS_long_SS_long((unsigned long long)(result)); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_value_get_enum(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_value_t *arg1 = (idmef_value_t *) 0 ; PyObject * obj0 = 0 ; int result; if (!PyArg_ParseTuple(args,(char *)"O:idmef_value_get_enum",&obj0)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_value, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { Py_BEGIN_ALLOW_THREADS result = (int)idmef_value_get_enum((struct idmef_value const *)arg1); Py_END_ALLOW_THREADS } { if ( result < 0 ) { swig_python_raise_exception(result); resultobj = NULL; } else { resultobj = PyInt_FromLong(result); } } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_value_get_float(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_value_t *arg1 = (idmef_value_t *) 0 ; PyObject * obj0 = 0 ; float result; if (!PyArg_ParseTuple(args,(char *)"O:idmef_value_get_float",&obj0)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_value, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { Py_BEGIN_ALLOW_THREADS result = (float)idmef_value_get_float((struct idmef_value const *)arg1); Py_END_ALLOW_THREADS } resultobj = SWIG_From_float((float)(result)); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_value_get_double(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_value_t *arg1 = (idmef_value_t *) 0 ; PyObject * obj0 = 0 ; double result; if (!PyArg_ParseTuple(args,(char *)"O:idmef_value_get_double",&obj0)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_value, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { Py_BEGIN_ALLOW_THREADS result = (double)idmef_value_get_double((struct idmef_value const *)arg1); Py_END_ALLOW_THREADS } resultobj = SWIG_From_double((double)(result)); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_value_get_time(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_value_t *arg1 = (idmef_value_t *) 0 ; PyObject * obj0 = 0 ; idmef_time_t *result = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:idmef_value_get_time",&obj0)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_value, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { Py_BEGIN_ALLOW_THREADS result = (idmef_time_t *)idmef_value_get_time((struct idmef_value const *)arg1); Py_END_ALLOW_THREADS } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_idmef_time, 0 | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_value_get_data(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_value_t *arg1 = (idmef_value_t *) 0 ; PyObject * obj0 = 0 ; idmef_data_t *result = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:idmef_value_get_data",&obj0)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_value, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { Py_BEGIN_ALLOW_THREADS result = (idmef_data_t *)idmef_value_get_data((struct idmef_value const *)arg1); Py_END_ALLOW_THREADS } { resultobj = swig_python_data(result); } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_value_get_string(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_value_t *arg1 = (idmef_value_t *) 0 ; PyObject * obj0 = 0 ; prelude_string_t *result = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:idmef_value_get_string",&obj0)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_value, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { Py_BEGIN_ALLOW_THREADS result = (prelude_string_t *)idmef_value_get_string((struct idmef_value const *)arg1); Py_END_ALLOW_THREADS } { resultobj = swig_python_string(result); } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_value_list_add(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_value_t *arg1 = (idmef_value_t *) 0 ; idmef_value_t *arg2 = (idmef_value_t *) 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; int result; if (!PyArg_ParseTuple(args,(char *)"OO:idmef_value_list_add",&obj0,&obj1)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_value, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { if ( obj1 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj1, (void **)&arg2, SWIGTYPE_p_idmef_value, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { Py_BEGIN_ALLOW_THREADS result = (int)idmef_value_list_add(arg1,arg2); Py_END_ALLOW_THREADS } { if ( result < 0 ) { swig_python_raise_exception(result); resultobj = NULL; } else { resultobj = PyInt_FromLong(result); } } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_value_is_list(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_value_t *arg1 = (idmef_value_t *) 0 ; PyObject * obj0 = 0 ; prelude_bool_t result; if (!PyArg_ParseTuple(args,(char *)"O:idmef_value_is_list",&obj0)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_value, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { Py_BEGIN_ALLOW_THREADS result = (prelude_bool_t)idmef_value_is_list((struct idmef_value const *)arg1); Py_END_ALLOW_THREADS } resultobj = SWIG_From_int((int)(result)); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_value_list_is_empty(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_value_t *arg1 = (idmef_value_t *) 0 ; PyObject * obj0 = 0 ; prelude_bool_t result; if (!PyArg_ParseTuple(args,(char *)"O:idmef_value_list_is_empty",&obj0)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_value, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { Py_BEGIN_ALLOW_THREADS result = (prelude_bool_t)idmef_value_list_is_empty((struct idmef_value const *)arg1); Py_END_ALLOW_THREADS } resultobj = SWIG_From_int((int)(result)); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_value_have_own_data(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_value_t *arg1 = (idmef_value_t *) 0 ; PyObject * obj0 = 0 ; int result; if (!PyArg_ParseTuple(args,(char *)"O:idmef_value_have_own_data",&obj0)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_value, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { Py_BEGIN_ALLOW_THREADS result = (int)idmef_value_have_own_data(arg1); Py_END_ALLOW_THREADS } { if ( result < 0 ) { swig_python_raise_exception(result); resultobj = NULL; } else { resultobj = PyInt_FromLong(result); } } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_value_dont_have_own_data(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_value_t *arg1 = (idmef_value_t *) 0 ; PyObject * obj0 = 0 ; int result; if (!PyArg_ParseTuple(args,(char *)"O:idmef_value_dont_have_own_data",&obj0)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_value, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { Py_BEGIN_ALLOW_THREADS result = (int)idmef_value_dont_have_own_data(arg1); Py_END_ALLOW_THREADS } { if ( result < 0 ) { swig_python_raise_exception(result); resultobj = NULL; } else { resultobj = PyInt_FromLong(result); } } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_value_get_type(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_value_t *arg1 = (idmef_value_t *) 0 ; PyObject * obj0 = 0 ; idmef_value_type_id_t result; if (!PyArg_ParseTuple(args,(char *)"O:idmef_value_get_type",&obj0)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_value, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { Py_BEGIN_ALLOW_THREADS result = (idmef_value_type_id_t)idmef_value_get_type((struct idmef_value const *)arg1); Py_END_ALLOW_THREADS } resultobj = SWIG_From_int((int)(result)); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_value_get_class(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_value_t *arg1 = (idmef_value_t *) 0 ; PyObject * obj0 = 0 ; idmef_class_id_t result; if (!PyArg_ParseTuple(args,(char *)"O:idmef_value_get_class",&obj0)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_value, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { Py_BEGIN_ALLOW_THREADS result = (idmef_class_id_t)idmef_value_get_class((struct idmef_value const *)arg1); Py_END_ALLOW_THREADS } { if ( result < 0 ) { swig_python_raise_exception(result); resultobj = NULL; } else { resultobj = PyInt_FromLong(result); } } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_value_get_object(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_value_t *arg1 = (idmef_value_t *) 0 ; PyObject * obj0 = 0 ; void *result = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:idmef_value_get_object",&obj0)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_value, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { Py_BEGIN_ALLOW_THREADS result = (void *)idmef_value_get_object((struct idmef_value const *)arg1); Py_END_ALLOW_THREADS } { void *swig_type; swig_type = swig_idmef_value_get_descriptor(arg1); if ( ! swig_type ) { resultobj = Py_None; Py_INCREF(Py_None); } else { resultobj = SWIG_NewPointerObj(result, swig_type, 0); } } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_value_iterate(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_value_t *arg1 = (idmef_value_t *) 0 ; int (*arg2)(idmef_value_t *,void *) = (int (*)(idmef_value_t *,void *)) 0 ; void *arg3 = (void *) 0 ; int res3 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; PyObject * obj2 = 0 ; int result; if (!PyArg_ParseTuple(args,(char *)"OOO:idmef_value_iterate",&obj0,&obj1,&obj2)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_value, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { int res = SWIG_ConvertFunctionPtr(obj1, (void**)(&arg2), SWIGTYPE_p_f_p_struct_idmef_value_p_void__int); if (!SWIG_IsOK(res)) { SWIG_exception_fail(SWIG_ArgError(res), "in method '" "idmef_value_iterate" "', argument " "2"" of type '" "int (*)(idmef_value_t *,void *)""'"); } } res3 = SWIG_ConvertPtr(obj2,SWIG_as_voidptrptr(&arg3), 0, 0); if (!SWIG_IsOK(res3)) { SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "idmef_value_iterate" "', argument " "3"" of type '" "void *""'"); } { Py_BEGIN_ALLOW_THREADS result = (int)idmef_value_iterate((struct idmef_value const *)arg1,arg2,arg3); Py_END_ALLOW_THREADS } { if ( result < 0 ) { swig_python_raise_exception(result); resultobj = NULL; } else { resultobj = PyInt_FromLong(result); } } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_value_iterate_reversed(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_value_t *arg1 = (idmef_value_t *) 0 ; int (*arg2)(idmef_value_t *,void *) = (int (*)(idmef_value_t *,void *)) 0 ; void *arg3 = (void *) 0 ; int res3 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; PyObject * obj2 = 0 ; int result; if (!PyArg_ParseTuple(args,(char *)"OOO:idmef_value_iterate_reversed",&obj0,&obj1,&obj2)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_value, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { int res = SWIG_ConvertFunctionPtr(obj1, (void**)(&arg2), SWIGTYPE_p_f_p_struct_idmef_value_p_void__int); if (!SWIG_IsOK(res)) { SWIG_exception_fail(SWIG_ArgError(res), "in method '" "idmef_value_iterate_reversed" "', argument " "2"" of type '" "int (*)(idmef_value_t *,void *)""'"); } } res3 = SWIG_ConvertPtr(obj2,SWIG_as_voidptrptr(&arg3), 0, 0); if (!SWIG_IsOK(res3)) { SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "idmef_value_iterate_reversed" "', argument " "3"" of type '" "void *""'"); } { Py_BEGIN_ALLOW_THREADS result = (int)idmef_value_iterate_reversed((struct idmef_value const *)arg1,arg2,arg3); Py_END_ALLOW_THREADS } { if ( result < 0 ) { swig_python_raise_exception(result); resultobj = NULL; } else { resultobj = PyInt_FromLong(result); } } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_value_get_nth(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_value_t *arg1 = (idmef_value_t *) 0 ; int arg2 ; int val2 ; int ecode2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; idmef_value_t *result = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:idmef_value_get_nth",&obj0,&obj1)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_value, SWIG_POINTER_EXCEPTION|0) ) return NULL; } ecode2 = SWIG_AsVal_int(obj1, &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "idmef_value_get_nth" "', argument " "2"" of type '" "int""'"); } arg2 = (int)(val2); { Py_BEGIN_ALLOW_THREADS result = (idmef_value_t *)idmef_value_get_nth((struct idmef_value const *)arg1,arg2); Py_END_ALLOW_THREADS } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_idmef_value, 0 | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_value_get_count(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_value_t *arg1 = (idmef_value_t *) 0 ; PyObject * obj0 = 0 ; int result; if (!PyArg_ParseTuple(args,(char *)"O:idmef_value_get_count",&obj0)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_value, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { Py_BEGIN_ALLOW_THREADS result = (int)idmef_value_get_count((struct idmef_value const *)arg1); Py_END_ALLOW_THREADS } { if ( result < 0 ) { swig_python_raise_exception(result); resultobj = NULL; } else { resultobj = PyInt_FromLong(result); } } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_value_clone(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_value_t *arg1 = (idmef_value_t *) 0 ; idmef_value_t **arg2 = (idmef_value_t **) 0 ; idmef_value_t *tmp2 ; PyObject * obj0 = 0 ; int result; { arg2 = (idmef_value_t **) &tmp2; } if (!PyArg_ParseTuple(args,(char *)"O:idmef_value_clone",&obj0)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_value, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { Py_BEGIN_ALLOW_THREADS result = (int)idmef_value_clone((struct idmef_value const *)arg1,arg2); Py_END_ALLOW_THREADS } { if ( result < 0 ) { swig_python_raise_exception(result); resultobj = NULL; } else { resultobj = PyInt_FromLong(result); } } { if ( result >= 0 ) resultobj = SWIG_NewPointerObj((void *) * arg2, SWIGTYPE_p_idmef_value, 0); } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_value_ref(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_value_t *arg1 = (idmef_value_t *) 0 ; PyObject * obj0 = 0 ; idmef_value_t *result = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:idmef_value_ref",&obj0)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_value, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { Py_BEGIN_ALLOW_THREADS result = (idmef_value_t *)idmef_value_ref(arg1); Py_END_ALLOW_THREADS } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_idmef_value, 0 | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_value_print(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_value_t *arg1 = (idmef_value_t *) 0 ; prelude_io_t *arg2 = (prelude_io_t *) 0 ; void *argp2 = 0 ; int res2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; int result; if (!PyArg_ParseTuple(args,(char *)"OO:idmef_value_print",&obj0,&obj1)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_value, SWIG_POINTER_EXCEPTION|0) ) return NULL; } res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_prelude_io_t, 0 | 0 ); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "idmef_value_print" "', argument " "2"" of type '" "prelude_io_t *""'"); } arg2 = (prelude_io_t *)(argp2); { Py_BEGIN_ALLOW_THREADS result = (int)idmef_value_print((struct idmef_value const *)arg1,arg2); Py_END_ALLOW_THREADS } { if ( result < 0 ) { swig_python_raise_exception(result); resultobj = NULL; } else { resultobj = PyInt_FromLong(result); } } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_value_to_string(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_value_t *arg1 = (idmef_value_t *) 0 ; prelude_string_t *arg2 = (prelude_string_t *) 0 ; PyObject * obj0 = 0 ; int result; { int ret; ret = prelude_string_new(&(arg2)); if ( ret < 0 ) { swig_python_raise_exception(ret); return NULL; } } if (!PyArg_ParseTuple(args,(char *)"O:idmef_value_to_string",&obj0)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_value, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { Py_BEGIN_ALLOW_THREADS result = (int)idmef_value_to_string((struct idmef_value const *)arg1,arg2); Py_END_ALLOW_THREADS } { if ( result < 0 ) { swig_python_raise_exception(result); resultobj = NULL; } else { resultobj = PyInt_FromLong(result); } } { if ( result >= 0 ) resultobj = PyString_FromStringAndSize(prelude_string_get_string(arg2), prelude_string_get_len(arg2)); prelude_string_destroy(arg2); } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_value_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_value_t *arg1 = (idmef_value_t *) 0 ; void *arg2 = (void *) 0 ; int res2 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; int result; if (!PyArg_ParseTuple(args,(char *)"OO:idmef_value_get",&obj0,&obj1)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_value, SWIG_POINTER_EXCEPTION|0) ) return NULL; } res2 = SWIG_ConvertPtr(obj1,SWIG_as_voidptrptr(&arg2), 0, 0); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "idmef_value_get" "', argument " "2"" of type '" "void *""'"); } { Py_BEGIN_ALLOW_THREADS result = (int)idmef_value_get((struct idmef_value const *)arg1,arg2); Py_END_ALLOW_THREADS } { if ( result < 0 ) { swig_python_raise_exception(result); resultobj = NULL; } else { resultobj = PyInt_FromLong(result); } } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_value_match(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_value_t *arg1 = (idmef_value_t *) 0 ; idmef_value_t *arg2 = (idmef_value_t *) 0 ; idmef_criterion_operator_t arg3 ; int val3 ; int ecode3 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; PyObject * obj2 = 0 ; int result; if (!PyArg_ParseTuple(args,(char *)"OOO:idmef_value_match",&obj0,&obj1,&obj2)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_value, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { if ( obj1 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj1, (void **)&arg2, SWIGTYPE_p_idmef_value, SWIG_POINTER_EXCEPTION|0) ) return NULL; } ecode3 = SWIG_AsVal_int(obj2, &val3); if (!SWIG_IsOK(ecode3)) { SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "idmef_value_match" "', argument " "3"" of type '" "idmef_criterion_operator_t""'"); } arg3 = (idmef_criterion_operator_t)(val3); { Py_BEGIN_ALLOW_THREADS result = (int)idmef_value_match(arg1,arg2,arg3); Py_END_ALLOW_THREADS } { if ( result < 0 ) { swig_python_raise_exception(result); resultobj = NULL; } else { resultobj = PyInt_FromLong(result); } } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_value_check_operator(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_value_t *arg1 = (idmef_value_t *) 0 ; idmef_criterion_operator_t arg2 ; int val2 ; int ecode2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; int result; if (!PyArg_ParseTuple(args,(char *)"OO:idmef_value_check_operator",&obj0,&obj1)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_value, SWIG_POINTER_EXCEPTION|0) ) return NULL; } ecode2 = SWIG_AsVal_int(obj1, &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "idmef_value_check_operator" "', argument " "2"" of type '" "idmef_criterion_operator_t""'"); } arg2 = (idmef_criterion_operator_t)(val2); { Py_BEGIN_ALLOW_THREADS result = (int)idmef_value_check_operator((struct idmef_value const *)arg1,arg2); Py_END_ALLOW_THREADS } { if ( result < 0 ) { swig_python_raise_exception(result); resultobj = NULL; } else { resultobj = PyInt_FromLong(result); } } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_value_get_applicable_operators(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_value_t *arg1 = (idmef_value_t *) 0 ; idmef_criterion_operator_t *arg2 = (idmef_criterion_operator_t *) 0 ; void *argp2 = 0 ; int res2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; int result; if (!PyArg_ParseTuple(args,(char *)"OO:idmef_value_get_applicable_operators",&obj0,&obj1)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_value, SWIG_POINTER_EXCEPTION|0) ) return NULL; } res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_idmef_criterion_operator_t, 0 | 0 ); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "idmef_value_get_applicable_operators" "', argument " "2"" of type '" "idmef_criterion_operator_t *""'"); } arg2 = (idmef_criterion_operator_t *)(argp2); { Py_BEGIN_ALLOW_THREADS result = (int)idmef_value_get_applicable_operators((struct idmef_value const *)arg1,arg2); Py_END_ALLOW_THREADS } { if ( result < 0 ) { swig_python_raise_exception(result); resultobj = NULL; } else { resultobj = PyInt_FromLong(result); } } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_value_destroy(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_value_t *arg1 = (idmef_value_t *) 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:idmef_value_destroy",&obj0)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_value, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { Py_BEGIN_ALLOW_THREADS idmef_value_destroy(arg1); Py_END_ALLOW_THREADS } resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_path_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_path_t *arg1 = (idmef_path_t *) 0 ; idmef_message_t *arg2 = (idmef_message_t *) 0 ; idmef_value_t **arg3 = (idmef_value_t **) 0 ; idmef_value_t *tmp3 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; int result; { arg3 = (idmef_value_t **) &tmp3; } if (!PyArg_ParseTuple(args,(char *)"OO:idmef_path_get",&obj0,&obj1)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_path, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { if ( obj1 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj1, (void **)&arg2, SWIGTYPE_p_idmef_message, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { Py_BEGIN_ALLOW_THREADS result = (int)idmef_path_get((struct idmef_path const *)arg1,arg2,arg3); Py_END_ALLOW_THREADS } { if ( result < 0 ) { swig_python_raise_exception(result); resultobj = NULL; } else { resultobj = PyInt_FromLong(result); } } { if ( PyInt_AsLong(resultobj) == 0 ) { resultobj = Py_None; Py_INCREF(Py_None); } else if ( PyInt_AsLong(resultobj) > 0 ) { resultobj = SWIG_NewPointerObj((void *) * arg3, SWIGTYPE_p_idmef_value, 0); } } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_path_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_path_t *arg1 = (idmef_path_t *) 0 ; idmef_message_t *arg2 = (idmef_message_t *) 0 ; idmef_value_t *arg3 = (idmef_value_t *) 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; PyObject * obj2 = 0 ; int result; if (!PyArg_ParseTuple(args,(char *)"OOO:idmef_path_set",&obj0,&obj1,&obj2)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_path, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { if ( obj1 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj1, (void **)&arg2, SWIGTYPE_p_idmef_message, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { if ( obj2 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj2, (void **)&arg3, SWIGTYPE_p_idmef_value, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { Py_BEGIN_ALLOW_THREADS result = (int)idmef_path_set((struct idmef_path const *)arg1,arg2,arg3); Py_END_ALLOW_THREADS } { if ( result < 0 ) { swig_python_raise_exception(result); resultobj = NULL; } else { resultobj = PyInt_FromLong(result); } } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_path_new__varargs__(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *varargs) { PyObject *resultobj = 0; idmef_path_t **arg1 = (idmef_path_t **) 0 ; char *arg2 = (char *) 0 ; void *arg3 = 0 ; idmef_path_t *tmp1 ; PyObject * obj0 = 0 ; int result; { arg1 = (idmef_path_t **) &tmp1; } if (!PyArg_ParseTuple(args,(char *)"O:idmef_path_new",&obj0)) SWIG_fail; { if ( obj0 == Py_None ) arg2 = NULL; else if ( PyString_Check(obj0) ) arg2 = PyString_AsString(obj0); else { PyErr_Format(PyExc_TypeError, "expected None or string, %s found", obj0->ob_type->tp_name); return NULL; } } { Py_BEGIN_ALLOW_THREADS result = (int)idmef_path_new(arg1,(char const *)arg2,arg3); Py_END_ALLOW_THREADS } { if ( result < 0 ) { swig_python_raise_exception(result); resultobj = NULL; } else { resultobj = PyInt_FromLong(result); } } { if ( result >= 0 ) resultobj = SWIG_NewPointerObj((void *) * arg1, SWIGTYPE_p_idmef_path, 0); } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_path_new(PyObject *self, PyObject *args) { PyObject *resultobj; PyObject *varargs; PyObject *newargs; newargs = PyTuple_GetSlice(args,0,1); varargs = PyTuple_GetSlice(args,1,PyTuple_Size(args)+1); resultobj = _wrap_idmef_path_new__varargs__(self,newargs,varargs); Py_XDECREF(newargs); Py_XDECREF(varargs); return resultobj; } SWIGINTERN PyObject *_wrap_idmef_path_new_fast(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_path_t **arg1 = (idmef_path_t **) 0 ; char *arg2 = (char *) 0 ; idmef_path_t *tmp1 ; PyObject * obj0 = 0 ; int result; { arg1 = (idmef_path_t **) &tmp1; } if (!PyArg_ParseTuple(args,(char *)"O:idmef_path_new_fast",&obj0)) SWIG_fail; { if ( obj0 == Py_None ) arg2 = NULL; else if ( PyString_Check(obj0) ) arg2 = PyString_AsString(obj0); else { PyErr_Format(PyExc_TypeError, "expected None or string, %s found", obj0->ob_type->tp_name); return NULL; } } { Py_BEGIN_ALLOW_THREADS result = (int)idmef_path_new_fast(arg1,(char const *)arg2); Py_END_ALLOW_THREADS } { if ( result < 0 ) { swig_python_raise_exception(result); resultobj = NULL; } else { resultobj = PyInt_FromLong(result); } } { if ( result >= 0 ) resultobj = SWIG_NewPointerObj((void *) * arg1, SWIGTYPE_p_idmef_path, 0); } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_path_get_class(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_path_t *arg1 = (idmef_path_t *) 0 ; int arg2 ; int val2 ; int ecode2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; idmef_class_id_t result; if (!PyArg_ParseTuple(args,(char *)"OO:idmef_path_get_class",&obj0,&obj1)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_path, SWIG_POINTER_EXCEPTION|0) ) return NULL; } ecode2 = SWIG_AsVal_int(obj1, &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "idmef_path_get_class" "', argument " "2"" of type '" "int""'"); } arg2 = (int)(val2); { Py_BEGIN_ALLOW_THREADS result = (idmef_class_id_t)idmef_path_get_class((struct idmef_path const *)arg1,arg2); Py_END_ALLOW_THREADS } { if ( result < 0 ) { swig_python_raise_exception(result); resultobj = NULL; } else { resultobj = PyInt_FromLong(result); } } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_path_get_value_type(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_path_t *arg1 = (idmef_path_t *) 0 ; int arg2 ; int val2 ; int ecode2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; idmef_value_type_id_t result; if (!PyArg_ParseTuple(args,(char *)"OO:idmef_path_get_value_type",&obj0,&obj1)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_path, SWIG_POINTER_EXCEPTION|0) ) return NULL; } ecode2 = SWIG_AsVal_int(obj1, &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "idmef_path_get_value_type" "', argument " "2"" of type '" "int""'"); } arg2 = (int)(val2); { Py_BEGIN_ALLOW_THREADS result = (idmef_value_type_id_t)idmef_path_get_value_type((struct idmef_path const *)arg1,arg2); Py_END_ALLOW_THREADS } resultobj = SWIG_From_int((int)(result)); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_path_set_index(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_path_t *arg1 = (idmef_path_t *) 0 ; unsigned int arg2 ; int arg3 ; unsigned int val2 ; int ecode2 = 0 ; int val3 ; int ecode3 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; PyObject * obj2 = 0 ; int result; if (!PyArg_ParseTuple(args,(char *)"OOO:idmef_path_set_index",&obj0,&obj1,&obj2)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_path, SWIG_POINTER_EXCEPTION|0) ) return NULL; } ecode2 = SWIG_AsVal_unsigned_SS_int(obj1, &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "idmef_path_set_index" "', argument " "2"" of type '" "unsigned int""'"); } arg2 = (unsigned int)(val2); ecode3 = SWIG_AsVal_int(obj2, &val3); if (!SWIG_IsOK(ecode3)) { SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "idmef_path_set_index" "', argument " "3"" of type '" "int""'"); } arg3 = (int)(val3); { Py_BEGIN_ALLOW_THREADS result = (int)idmef_path_set_index(arg1,arg2,arg3); Py_END_ALLOW_THREADS } { if ( result < 0 ) { swig_python_raise_exception(result); resultobj = NULL; } else { resultobj = PyInt_FromLong(result); } } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_path_undefine_index(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_path_t *arg1 = (idmef_path_t *) 0 ; unsigned int arg2 ; unsigned int val2 ; int ecode2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; int result; if (!PyArg_ParseTuple(args,(char *)"OO:idmef_path_undefine_index",&obj0,&obj1)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_path, SWIG_POINTER_EXCEPTION|0) ) return NULL; } ecode2 = SWIG_AsVal_unsigned_SS_int(obj1, &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "idmef_path_undefine_index" "', argument " "2"" of type '" "unsigned int""'"); } arg2 = (unsigned int)(val2); { Py_BEGIN_ALLOW_THREADS result = (int)idmef_path_undefine_index(arg1,arg2); Py_END_ALLOW_THREADS } { if ( result < 0 ) { swig_python_raise_exception(result); resultobj = NULL; } else { resultobj = PyInt_FromLong(result); } } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_path_get_index(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_path_t *arg1 = (idmef_path_t *) 0 ; unsigned int arg2 ; unsigned int val2 ; int ecode2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; int result; if (!PyArg_ParseTuple(args,(char *)"OO:idmef_path_get_index",&obj0,&obj1)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_path, SWIG_POINTER_EXCEPTION|0) ) return NULL; } ecode2 = SWIG_AsVal_unsigned_SS_int(obj1, &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "idmef_path_get_index" "', argument " "2"" of type '" "unsigned int""'"); } arg2 = (unsigned int)(val2); { Py_BEGIN_ALLOW_THREADS result = (int)idmef_path_get_index((struct idmef_path const *)arg1,arg2); Py_END_ALLOW_THREADS } { if ( result < 0 ) { swig_python_raise_exception(result); resultobj = NULL; } else { resultobj = PyInt_FromLong(result); } } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_path_make_child(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_path_t *arg1 = (idmef_path_t *) 0 ; char *arg2 = (char *) 0 ; int arg3 ; int val3 ; int ecode3 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; PyObject * obj2 = 0 ; int result; if (!PyArg_ParseTuple(args,(char *)"OOO:idmef_path_make_child",&obj0,&obj1,&obj2)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_path, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { if ( obj1 == Py_None ) arg2 = NULL; else if ( PyString_Check(obj1) ) arg2 = PyString_AsString(obj1); else { PyErr_Format(PyExc_TypeError, "expected None or string, %s found", obj1->ob_type->tp_name); return NULL; } } ecode3 = SWIG_AsVal_int(obj2, &val3); if (!SWIG_IsOK(ecode3)) { SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "idmef_path_make_child" "', argument " "3"" of type '" "int""'"); } arg3 = (int)(val3); { Py_BEGIN_ALLOW_THREADS result = (int)idmef_path_make_child(arg1,(char const *)arg2,arg3); Py_END_ALLOW_THREADS } { if ( result < 0 ) { swig_python_raise_exception(result); resultobj = NULL; } else { resultobj = PyInt_FromLong(result); } } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_path_make_parent(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_path_t *arg1 = (idmef_path_t *) 0 ; PyObject * obj0 = 0 ; int result; if (!PyArg_ParseTuple(args,(char *)"O:idmef_path_make_parent",&obj0)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_path, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { Py_BEGIN_ALLOW_THREADS result = (int)idmef_path_make_parent(arg1); Py_END_ALLOW_THREADS } { if ( result < 0 ) { swig_python_raise_exception(result); resultobj = NULL; } else { resultobj = PyInt_FromLong(result); } } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_path_destroy(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_path_t *arg1 = (idmef_path_t *) 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:idmef_path_destroy",&obj0)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_path, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { Py_BEGIN_ALLOW_THREADS idmef_path_destroy(arg1); Py_END_ALLOW_THREADS } resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_path_ncompare(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_path_t *arg1 = (idmef_path_t *) 0 ; idmef_path_t *arg2 = (idmef_path_t *) 0 ; unsigned int arg3 ; unsigned int val3 ; int ecode3 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; PyObject * obj2 = 0 ; int result; if (!PyArg_ParseTuple(args,(char *)"OOO:idmef_path_ncompare",&obj0,&obj1,&obj2)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_path, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { if ( obj1 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj1, (void **)&arg2, SWIGTYPE_p_idmef_path, SWIG_POINTER_EXCEPTION|0) ) return NULL; } ecode3 = SWIG_AsVal_unsigned_SS_int(obj2, &val3); if (!SWIG_IsOK(ecode3)) { SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "idmef_path_ncompare" "', argument " "3"" of type '" "unsigned int""'"); } arg3 = (unsigned int)(val3); { Py_BEGIN_ALLOW_THREADS result = (int)idmef_path_ncompare((struct idmef_path const *)arg1,(struct idmef_path const *)arg2,arg3); Py_END_ALLOW_THREADS } { resultobj = PyInt_FromLong(result); } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_path_compare(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_path_t *arg1 = (idmef_path_t *) 0 ; idmef_path_t *arg2 = (idmef_path_t *) 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; int result; if (!PyArg_ParseTuple(args,(char *)"OO:idmef_path_compare",&obj0,&obj1)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_path, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { if ( obj1 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj1, (void **)&arg2, SWIGTYPE_p_idmef_path, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { Py_BEGIN_ALLOW_THREADS result = (int)idmef_path_compare((struct idmef_path const *)arg1,(struct idmef_path const *)arg2); Py_END_ALLOW_THREADS } { resultobj = PyInt_FromLong(result); } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_path_clone(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_path_t *arg1 = (idmef_path_t *) 0 ; idmef_path_t **arg2 = (idmef_path_t **) 0 ; idmef_path_t *tmp2 ; PyObject * obj0 = 0 ; int result; { arg2 = (idmef_path_t **) &tmp2; } if (!PyArg_ParseTuple(args,(char *)"O:idmef_path_clone",&obj0)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_path, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { Py_BEGIN_ALLOW_THREADS result = (int)idmef_path_clone((struct idmef_path const *)arg1,arg2); Py_END_ALLOW_THREADS } { if ( result < 0 ) { swig_python_raise_exception(result); resultobj = NULL; } else { resultobj = PyInt_FromLong(result); } } { if ( result >= 0 ) resultobj = SWIG_NewPointerObj((void *) * arg2, SWIGTYPE_p_idmef_path, 0); } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_path_ref(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_path_t *arg1 = (idmef_path_t *) 0 ; PyObject * obj0 = 0 ; idmef_path_t *result = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:idmef_path_ref",&obj0)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_path, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { Py_BEGIN_ALLOW_THREADS result = (idmef_path_t *)idmef_path_ref(arg1); Py_END_ALLOW_THREADS } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_idmef_path, 0 | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_path_get_name(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_path_t *arg1 = (idmef_path_t *) 0 ; int arg2 ; int val2 ; int ecode2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; char *result = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:idmef_path_get_name",&obj0,&obj1)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_path, SWIG_POINTER_EXCEPTION|0) ) return NULL; } ecode2 = SWIG_AsVal_int(obj1, &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "idmef_path_get_name" "', argument " "2"" of type '" "int""'"); } arg2 = (int)(val2); { Py_BEGIN_ALLOW_THREADS result = (char *)idmef_path_get_name((struct idmef_path const *)arg1,arg2); Py_END_ALLOW_THREADS } resultobj = SWIG_FromCharPtr((const char *)result); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_path_is_ambiguous(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_path_t *arg1 = (idmef_path_t *) 0 ; PyObject * obj0 = 0 ; prelude_bool_t result; if (!PyArg_ParseTuple(args,(char *)"O:idmef_path_is_ambiguous",&obj0)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_path, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { Py_BEGIN_ALLOW_THREADS result = (prelude_bool_t)idmef_path_is_ambiguous((struct idmef_path const *)arg1); Py_END_ALLOW_THREADS } resultobj = SWIG_From_int((int)(result)); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_path_has_lists(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_path_t *arg1 = (idmef_path_t *) 0 ; PyObject * obj0 = 0 ; int result; if (!PyArg_ParseTuple(args,(char *)"O:idmef_path_has_lists",&obj0)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_path, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { Py_BEGIN_ALLOW_THREADS result = (int)idmef_path_has_lists((struct idmef_path const *)arg1); Py_END_ALLOW_THREADS } { if ( result < 0 ) { swig_python_raise_exception(result); resultobj = NULL; } else { resultobj = PyInt_FromLong(result); } } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_path_is_list(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_path_t *arg1 = (idmef_path_t *) 0 ; int arg2 ; int val2 ; int ecode2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; prelude_bool_t result; if (!PyArg_ParseTuple(args,(char *)"OO:idmef_path_is_list",&obj0,&obj1)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_path, SWIG_POINTER_EXCEPTION|0) ) return NULL; } ecode2 = SWIG_AsVal_int(obj1, &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "idmef_path_is_list" "', argument " "2"" of type '" "int""'"); } arg2 = (int)(val2); { Py_BEGIN_ALLOW_THREADS result = (prelude_bool_t)idmef_path_is_list((struct idmef_path const *)arg1,arg2); Py_END_ALLOW_THREADS } resultobj = SWIG_From_int((int)(result)); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_path_get_depth(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_path_t *arg1 = (idmef_path_t *) 0 ; PyObject * obj0 = 0 ; unsigned int result; if (!PyArg_ParseTuple(args,(char *)"O:idmef_path_get_depth",&obj0)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_path, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { Py_BEGIN_ALLOW_THREADS result = (unsigned int)idmef_path_get_depth((struct idmef_path const *)arg1); Py_END_ALLOW_THREADS } resultobj = SWIG_From_unsigned_SS_int((unsigned int)(result)); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_path_check_operator(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_path_t *arg1 = (idmef_path_t *) 0 ; idmef_criterion_operator_t arg2 ; int val2 ; int ecode2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; int result; if (!PyArg_ParseTuple(args,(char *)"OO:idmef_path_check_operator",&obj0,&obj1)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_path, SWIG_POINTER_EXCEPTION|0) ) return NULL; } ecode2 = SWIG_AsVal_int(obj1, &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "idmef_path_check_operator" "', argument " "2"" of type '" "idmef_criterion_operator_t""'"); } arg2 = (idmef_criterion_operator_t)(val2); { Py_BEGIN_ALLOW_THREADS result = (int)idmef_path_check_operator((struct idmef_path const *)arg1,arg2); Py_END_ALLOW_THREADS } { if ( result < 0 ) { swig_python_raise_exception(result); resultobj = NULL; } else { resultobj = PyInt_FromLong(result); } } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_path_get_applicable_operators(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_path_t *arg1 = (idmef_path_t *) 0 ; idmef_criterion_operator_t *arg2 = (idmef_criterion_operator_t *) 0 ; void *argp2 = 0 ; int res2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; int result; if (!PyArg_ParseTuple(args,(char *)"OO:idmef_path_get_applicable_operators",&obj0,&obj1)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_path, SWIG_POINTER_EXCEPTION|0) ) return NULL; } res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_idmef_criterion_operator_t, 0 | 0 ); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "idmef_path_get_applicable_operators" "', argument " "2"" of type '" "idmef_criterion_operator_t *""'"); } arg2 = (idmef_criterion_operator_t *)(argp2); { Py_BEGIN_ALLOW_THREADS result = (int)idmef_path_get_applicable_operators((struct idmef_path const *)arg1,arg2); Py_END_ALLOW_THREADS } { if ( result < 0 ) { swig_python_raise_exception(result); resultobj = NULL; } else { resultobj = PyInt_FromLong(result); } } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_time_refcount_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; struct idmef_time *arg1 = (struct idmef_time *) 0 ; int arg2 ; void *argp1 = 0 ; int res1 = 0 ; int val2 ; int ecode2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:idmef_time_refcount_set",&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_idmef_time, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "idmef_time_refcount_set" "', argument " "1"" of type '" "struct idmef_time *""'"); } arg1 = (struct idmef_time *)(argp1); ecode2 = SWIG_AsVal_int(obj1, &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "idmef_time_refcount_set" "', argument " "2"" of type '" "int""'"); } arg2 = (int)(val2); if (arg1) (arg1)->refcount = arg2; resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_time_refcount_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; struct idmef_time *arg1 = (struct idmef_time *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; int result; if (!PyArg_ParseTuple(args,(char *)"O:idmef_time_refcount_get",&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_idmef_time, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "idmef_time_refcount_get" "', argument " "1"" of type '" "struct idmef_time *""'"); } arg1 = (struct idmef_time *)(argp1); result = (int) ((arg1)->refcount); { if ( result < 0 ) { swig_python_raise_exception(result); resultobj = NULL; } else { resultobj = PyInt_FromLong(result); } } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_time_sec_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; struct idmef_time *arg1 = (struct idmef_time *) 0 ; uint32_t arg2 ; void *argp1 = 0 ; int res1 = 0 ; unsigned int val2 ; int ecode2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:idmef_time_sec_set",&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_idmef_time, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "idmef_time_sec_set" "', argument " "1"" of type '" "struct idmef_time *""'"); } arg1 = (struct idmef_time *)(argp1); ecode2 = SWIG_AsVal_unsigned_SS_int(obj1, &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "idmef_time_sec_set" "', argument " "2"" of type '" "uint32_t""'"); } arg2 = (uint32_t)(val2); if (arg1) (arg1)->sec = arg2; resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_time_sec_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; struct idmef_time *arg1 = (struct idmef_time *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; uint32_t result; if (!PyArg_ParseTuple(args,(char *)"O:idmef_time_sec_get",&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_idmef_time, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "idmef_time_sec_get" "', argument " "1"" of type '" "struct idmef_time *""'"); } arg1 = (struct idmef_time *)(argp1); result = (uint32_t) ((arg1)->sec); { resultobj = PyLong_FromUnsignedLong(result); } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_time_usec_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; struct idmef_time *arg1 = (struct idmef_time *) 0 ; uint32_t arg2 ; void *argp1 = 0 ; int res1 = 0 ; unsigned int val2 ; int ecode2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:idmef_time_usec_set",&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_idmef_time, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "idmef_time_usec_set" "', argument " "1"" of type '" "struct idmef_time *""'"); } arg1 = (struct idmef_time *)(argp1); ecode2 = SWIG_AsVal_unsigned_SS_int(obj1, &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "idmef_time_usec_set" "', argument " "2"" of type '" "uint32_t""'"); } arg2 = (uint32_t)(val2); if (arg1) (arg1)->usec = arg2; resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_time_usec_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; struct idmef_time *arg1 = (struct idmef_time *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; uint32_t result; if (!PyArg_ParseTuple(args,(char *)"O:idmef_time_usec_get",&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_idmef_time, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "idmef_time_usec_get" "', argument " "1"" of type '" "struct idmef_time *""'"); } arg1 = (struct idmef_time *)(argp1); result = (uint32_t) ((arg1)->usec); { resultobj = PyLong_FromUnsignedLong(result); } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_time_gmt_offset_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; struct idmef_time *arg1 = (struct idmef_time *) 0 ; int32_t arg2 ; void *argp1 = 0 ; int res1 = 0 ; int val2 ; int ecode2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:idmef_time_gmt_offset_set",&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_idmef_time, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "idmef_time_gmt_offset_set" "', argument " "1"" of type '" "struct idmef_time *""'"); } arg1 = (struct idmef_time *)(argp1); ecode2 = SWIG_AsVal_int(obj1, &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "idmef_time_gmt_offset_set" "', argument " "2"" of type '" "int32_t""'"); } arg2 = (int32_t)(val2); if (arg1) (arg1)->gmt_offset = arg2; resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_time_gmt_offset_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; struct idmef_time *arg1 = (struct idmef_time *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; int32_t result; if (!PyArg_ParseTuple(args,(char *)"O:idmef_time_gmt_offset_get",&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_idmef_time, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "idmef_time_gmt_offset_get" "', argument " "1"" of type '" "struct idmef_time *""'"); } arg1 = (struct idmef_time *)(argp1); result = (int32_t) ((arg1)->gmt_offset); { resultobj = PyInt_FromLong(result); } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_new_idmef_time(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; struct idmef_time *result = 0 ; if (!PyArg_ParseTuple(args,(char *)":new_idmef_time")) SWIG_fail; { Py_BEGIN_ALLOW_THREADS result = (struct idmef_time *)calloc(1, sizeof(struct idmef_time)); Py_END_ALLOW_THREADS } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_idmef_time, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_delete_idmef_time(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; struct idmef_time *arg1 = (struct idmef_time *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:delete_idmef_time",&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_idmef_time, SWIG_POINTER_DISOWN | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_idmef_time" "', argument " "1"" of type '" "struct idmef_time *""'"); } arg1 = (struct idmef_time *)(argp1); { Py_BEGIN_ALLOW_THREADS free((char *) arg1); Py_END_ALLOW_THREADS } resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_time_ref(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_time_t *arg1 = (idmef_time_t *) 0 ; PyObject * obj0 = 0 ; idmef_time_t *result = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:idmef_time_ref",&obj0)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_time, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { Py_BEGIN_ALLOW_THREADS result = (idmef_time_t *)idmef_time_ref(arg1); Py_END_ALLOW_THREADS } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_idmef_time, 0 | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_time_new(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_time_t **arg1 = (idmef_time_t **) 0 ; idmef_time_t *tmp1 ; int result; { arg1 = (idmef_time_t **) &tmp1; } if (!PyArg_ParseTuple(args,(char *)":idmef_time_new")) SWIG_fail; { Py_BEGIN_ALLOW_THREADS result = (int)idmef_time_new(arg1); Py_END_ALLOW_THREADS } { if ( result < 0 ) { swig_python_raise_exception(result); resultobj = NULL; } else { resultobj = PyInt_FromLong(result); } } { if ( result >= 0 ) resultobj = SWIG_NewPointerObj((void *) * arg1, SWIGTYPE_p_idmef_time, 0); } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_time_new_from_time(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_time_t **arg1 = (idmef_time_t **) 0 ; time_t *arg2 = (time_t *) 0 ; idmef_time_t *tmp1 ; time_t tmp2 ; PyObject * obj0 = 0 ; int result; { arg1 = (idmef_time_t **) &tmp1; } if (!PyArg_ParseTuple(args,(char *)"O:idmef_time_new_from_time",&obj0)) SWIG_fail; { if ( PyInt_Check(obj0) ) tmp2 = (time_t) PyInt_AsLong(obj0); else if ( PyLong_Check(obj0) ) tmp2 = (time_t) PyLong_AsUnsignedLong(obj0); else { PyErr_Format(PyExc_TypeError, "expected int or long, %s found", obj0->ob_type->tp_name); return NULL; } arg2 = &tmp2; } { Py_BEGIN_ALLOW_THREADS result = (int)idmef_time_new_from_time(arg1,(time_t const *)arg2); Py_END_ALLOW_THREADS } { if ( result < 0 ) { swig_python_raise_exception(result); resultobj = NULL; } else { resultobj = PyInt_FromLong(result); } } { if ( result >= 0 ) resultobj = SWIG_NewPointerObj((void *) * arg1, SWIGTYPE_p_idmef_time, 0); } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_time_new_from_gettimeofday(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_time_t **arg1 = (idmef_time_t **) 0 ; idmef_time_t *tmp1 ; int result; { arg1 = (idmef_time_t **) &tmp1; } if (!PyArg_ParseTuple(args,(char *)":idmef_time_new_from_gettimeofday")) SWIG_fail; { Py_BEGIN_ALLOW_THREADS result = (int)idmef_time_new_from_gettimeofday(arg1); Py_END_ALLOW_THREADS } { if ( result < 0 ) { swig_python_raise_exception(result); resultobj = NULL; } else { resultobj = PyInt_FromLong(result); } } { if ( result >= 0 ) resultobj = SWIG_NewPointerObj((void *) * arg1, SWIGTYPE_p_idmef_time, 0); } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_time_new_from_string(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_time_t **arg1 = (idmef_time_t **) 0 ; char *arg2 = (char *) 0 ; idmef_time_t *tmp1 ; PyObject * obj0 = 0 ; int result; { arg1 = (idmef_time_t **) &tmp1; } if (!PyArg_ParseTuple(args,(char *)"O:idmef_time_new_from_string",&obj0)) SWIG_fail; { if ( obj0 == Py_None ) arg2 = NULL; else if ( PyString_Check(obj0) ) arg2 = PyString_AsString(obj0); else { PyErr_Format(PyExc_TypeError, "expected None or string, %s found", obj0->ob_type->tp_name); return NULL; } } { Py_BEGIN_ALLOW_THREADS result = (int)idmef_time_new_from_string(arg1,(char const *)arg2); Py_END_ALLOW_THREADS } { if ( result < 0 ) { swig_python_raise_exception(result); resultobj = NULL; } else { resultobj = PyInt_FromLong(result); } } { if ( result >= 0 ) resultobj = SWIG_NewPointerObj((void *) * arg1, SWIGTYPE_p_idmef_time, 0); } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_time_new_from_ntpstamp(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_time_t **arg1 = (idmef_time_t **) 0 ; char *arg2 = (char *) 0 ; idmef_time_t *tmp1 ; PyObject * obj0 = 0 ; int result; { arg1 = (idmef_time_t **) &tmp1; } if (!PyArg_ParseTuple(args,(char *)"O:idmef_time_new_from_ntpstamp",&obj0)) SWIG_fail; { if ( obj0 == Py_None ) arg2 = NULL; else if ( PyString_Check(obj0) ) arg2 = PyString_AsString(obj0); else { PyErr_Format(PyExc_TypeError, "expected None or string, %s found", obj0->ob_type->tp_name); return NULL; } } { Py_BEGIN_ALLOW_THREADS result = (int)idmef_time_new_from_ntpstamp(arg1,(char const *)arg2); Py_END_ALLOW_THREADS } { if ( result < 0 ) { swig_python_raise_exception(result); resultobj = NULL; } else { resultobj = PyInt_FromLong(result); } } { if ( result >= 0 ) resultobj = SWIG_NewPointerObj((void *) * arg1, SWIGTYPE_p_idmef_time, 0); } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_time_new_from_timeval(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_time_t **arg1 = (idmef_time_t **) 0 ; struct timeval *arg2 = (struct timeval *) 0 ; idmef_time_t *tmp1 ; void *argp2 = 0 ; int res2 = 0 ; PyObject * obj0 = 0 ; int result; { arg1 = (idmef_time_t **) &tmp1; } if (!PyArg_ParseTuple(args,(char *)"O:idmef_time_new_from_timeval",&obj0)) SWIG_fail; res2 = SWIG_ConvertPtr(obj0, &argp2,SWIGTYPE_p_timeval, 0 | 0 ); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "idmef_time_new_from_timeval" "', argument " "2"" of type '" "struct timeval const *""'"); } arg2 = (struct timeval *)(argp2); { Py_BEGIN_ALLOW_THREADS result = (int)idmef_time_new_from_timeval(arg1,(struct timeval const *)arg2); Py_END_ALLOW_THREADS } { if ( result < 0 ) { swig_python_raise_exception(result); resultobj = NULL; } else { resultobj = PyInt_FromLong(result); } } { if ( result >= 0 ) resultobj = SWIG_NewPointerObj((void *) * arg1, SWIGTYPE_p_idmef_time, 0); } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_time_set_from_time(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_time_t *arg1 = (idmef_time_t *) 0 ; time_t *arg2 = (time_t *) 0 ; time_t tmp2 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:idmef_time_set_from_time",&obj0,&obj1)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_time, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { if ( PyInt_Check(obj1) ) tmp2 = (time_t) PyInt_AsLong(obj1); else if ( PyLong_Check(obj1) ) tmp2 = (time_t) PyLong_AsUnsignedLong(obj1); else { PyErr_Format(PyExc_TypeError, "expected int or long, %s found", obj1->ob_type->tp_name); return NULL; } arg2 = &tmp2; } { Py_BEGIN_ALLOW_THREADS idmef_time_set_from_time(arg1,(time_t const *)arg2); Py_END_ALLOW_THREADS } resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_time_set_from_gettimeofday(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_time_t *arg1 = (idmef_time_t *) 0 ; PyObject * obj0 = 0 ; int result; if (!PyArg_ParseTuple(args,(char *)"O:idmef_time_set_from_gettimeofday",&obj0)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_time, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { Py_BEGIN_ALLOW_THREADS result = (int)idmef_time_set_from_gettimeofday(arg1); Py_END_ALLOW_THREADS } { if ( result < 0 ) { swig_python_raise_exception(result); resultobj = NULL; } else { resultobj = PyInt_FromLong(result); } } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_time_set_from_string(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_time_t *arg1 = (idmef_time_t *) 0 ; char *arg2 = (char *) 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; int result; if (!PyArg_ParseTuple(args,(char *)"OO:idmef_time_set_from_string",&obj0,&obj1)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_time, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { if ( obj1 == Py_None ) arg2 = NULL; else if ( PyString_Check(obj1) ) arg2 = PyString_AsString(obj1); else { PyErr_Format(PyExc_TypeError, "expected None or string, %s found", obj1->ob_type->tp_name); return NULL; } } { Py_BEGIN_ALLOW_THREADS result = (int)idmef_time_set_from_string(arg1,(char const *)arg2); Py_END_ALLOW_THREADS } { if ( result < 0 ) { swig_python_raise_exception(result); resultobj = NULL; } else { resultobj = PyInt_FromLong(result); } } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_time_set_from_ntpstamp(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_time_t *arg1 = (idmef_time_t *) 0 ; char *arg2 = (char *) 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; int result; if (!PyArg_ParseTuple(args,(char *)"OO:idmef_time_set_from_ntpstamp",&obj0,&obj1)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_time, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { if ( obj1 == Py_None ) arg2 = NULL; else if ( PyString_Check(obj1) ) arg2 = PyString_AsString(obj1); else { PyErr_Format(PyExc_TypeError, "expected None or string, %s found", obj1->ob_type->tp_name); return NULL; } } { Py_BEGIN_ALLOW_THREADS result = (int)idmef_time_set_from_ntpstamp(arg1,(char const *)arg2); Py_END_ALLOW_THREADS } { if ( result < 0 ) { swig_python_raise_exception(result); resultobj = NULL; } else { resultobj = PyInt_FromLong(result); } } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_time_set_from_timeval(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_time_t *arg1 = (idmef_time_t *) 0 ; struct timeval *arg2 = (struct timeval *) 0 ; void *argp2 = 0 ; int res2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; int result; if (!PyArg_ParseTuple(args,(char *)"OO:idmef_time_set_from_timeval",&obj0,&obj1)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_time, SWIG_POINTER_EXCEPTION|0) ) return NULL; } res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_timeval, 0 | 0 ); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "idmef_time_set_from_timeval" "', argument " "2"" of type '" "struct timeval const *""'"); } arg2 = (struct timeval *)(argp2); { Py_BEGIN_ALLOW_THREADS result = (int)idmef_time_set_from_timeval(arg1,(struct timeval const *)arg2); Py_END_ALLOW_THREADS } { if ( result < 0 ) { swig_python_raise_exception(result); resultobj = NULL; } else { resultobj = PyInt_FromLong(result); } } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_time_destroy_internal(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_time_t *arg1 = (idmef_time_t *) 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:idmef_time_destroy_internal",&obj0)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_time, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { Py_BEGIN_ALLOW_THREADS idmef_time_destroy_internal(arg1); Py_END_ALLOW_THREADS } resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_time_destroy(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_time_t *arg1 = (idmef_time_t *) 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:idmef_time_destroy",&obj0)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_time, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { Py_BEGIN_ALLOW_THREADS idmef_time_destroy(arg1); Py_END_ALLOW_THREADS } resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_time_clone(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_time_t *arg1 = (idmef_time_t *) 0 ; idmef_time_t **arg2 = (idmef_time_t **) 0 ; idmef_time_t *tmp2 ; PyObject * obj0 = 0 ; int result; { arg2 = (idmef_time_t **) &tmp2; } if (!PyArg_ParseTuple(args,(char *)"O:idmef_time_clone",&obj0)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_time, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { Py_BEGIN_ALLOW_THREADS result = (int)idmef_time_clone((struct idmef_time const *)arg1,arg2); Py_END_ALLOW_THREADS } { if ( result < 0 ) { swig_python_raise_exception(result); resultobj = NULL; } else { resultobj = PyInt_FromLong(result); } } { if ( result >= 0 ) resultobj = SWIG_NewPointerObj((void *) * arg2, SWIGTYPE_p_idmef_time, 0); } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_time_copy(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_time_t *arg1 = (idmef_time_t *) 0 ; idmef_time_t *arg2 = (idmef_time_t *) 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; int result; if (!PyArg_ParseTuple(args,(char *)"OO:idmef_time_copy",&obj0,&obj1)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_time, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { if ( obj1 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj1, (void **)&arg2, SWIGTYPE_p_idmef_time, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { Py_BEGIN_ALLOW_THREADS result = (int)idmef_time_copy((struct idmef_time const *)arg1,arg2); Py_END_ALLOW_THREADS } { if ( result < 0 ) { swig_python_raise_exception(result); resultobj = NULL; } else { resultobj = PyInt_FromLong(result); } } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_time_set_sec(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_time_t *arg1 = (idmef_time_t *) 0 ; uint32_t arg2 ; unsigned int val2 ; int ecode2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:idmef_time_set_sec",&obj0,&obj1)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_time, SWIG_POINTER_EXCEPTION|0) ) return NULL; } ecode2 = SWIG_AsVal_unsigned_SS_int(obj1, &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "idmef_time_set_sec" "', argument " "2"" of type '" "uint32_t""'"); } arg2 = (uint32_t)(val2); { Py_BEGIN_ALLOW_THREADS idmef_time_set_sec(arg1,arg2); Py_END_ALLOW_THREADS } resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_time_set_usec(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_time_t *arg1 = (idmef_time_t *) 0 ; uint32_t arg2 ; unsigned int val2 ; int ecode2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:idmef_time_set_usec",&obj0,&obj1)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_time, SWIG_POINTER_EXCEPTION|0) ) return NULL; } ecode2 = SWIG_AsVal_unsigned_SS_int(obj1, &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "idmef_time_set_usec" "', argument " "2"" of type '" "uint32_t""'"); } arg2 = (uint32_t)(val2); { Py_BEGIN_ALLOW_THREADS idmef_time_set_usec(arg1,arg2); Py_END_ALLOW_THREADS } resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_time_set_gmt_offset(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_time_t *arg1 = (idmef_time_t *) 0 ; int32_t arg2 ; int val2 ; int ecode2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:idmef_time_set_gmt_offset",&obj0,&obj1)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_time, SWIG_POINTER_EXCEPTION|0) ) return NULL; } ecode2 = SWIG_AsVal_int(obj1, &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "idmef_time_set_gmt_offset" "', argument " "2"" of type '" "int32_t""'"); } arg2 = (int32_t)(val2); { Py_BEGIN_ALLOW_THREADS idmef_time_set_gmt_offset(arg1,arg2); Py_END_ALLOW_THREADS } resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_time_get_sec(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_time_t *arg1 = (idmef_time_t *) 0 ; PyObject * obj0 = 0 ; uint32_t result; if (!PyArg_ParseTuple(args,(char *)"O:idmef_time_get_sec",&obj0)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_time, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { Py_BEGIN_ALLOW_THREADS result = (uint32_t)idmef_time_get_sec((struct idmef_time const *)arg1); Py_END_ALLOW_THREADS } { resultobj = PyLong_FromUnsignedLong(result); } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_time_get_usec(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_time_t *arg1 = (idmef_time_t *) 0 ; PyObject * obj0 = 0 ; uint32_t result; if (!PyArg_ParseTuple(args,(char *)"O:idmef_time_get_usec",&obj0)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_time, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { Py_BEGIN_ALLOW_THREADS result = (uint32_t)idmef_time_get_usec((struct idmef_time const *)arg1); Py_END_ALLOW_THREADS } { resultobj = PyLong_FromUnsignedLong(result); } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_time_get_gmt_offset(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_time_t *arg1 = (idmef_time_t *) 0 ; PyObject * obj0 = 0 ; int32_t result; if (!PyArg_ParseTuple(args,(char *)"O:idmef_time_get_gmt_offset",&obj0)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_time, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { Py_BEGIN_ALLOW_THREADS result = (int32_t)idmef_time_get_gmt_offset((struct idmef_time const *)arg1); Py_END_ALLOW_THREADS } { resultobj = PyInt_FromLong(result); } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_time_to_string(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_time_t *arg1 = (idmef_time_t *) 0 ; prelude_string_t *arg2 = (prelude_string_t *) 0 ; PyObject * obj0 = 0 ; int result; { int ret; ret = prelude_string_new(&(arg2)); if ( ret < 0 ) { swig_python_raise_exception(ret); return NULL; } } if (!PyArg_ParseTuple(args,(char *)"O:idmef_time_to_string",&obj0)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_time, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { Py_BEGIN_ALLOW_THREADS result = (int)idmef_time_to_string((struct idmef_time const *)arg1,arg2); Py_END_ALLOW_THREADS } { if ( result < 0 ) { swig_python_raise_exception(result); resultobj = NULL; } else { resultobj = PyInt_FromLong(result); } } { if ( result >= 0 ) resultobj = PyString_FromStringAndSize(prelude_string_get_string(arg2), prelude_string_get_len(arg2)); prelude_string_destroy(arg2); } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_time_to_ntpstamp(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_time_t *arg1 = (idmef_time_t *) 0 ; prelude_string_t *arg2 = (prelude_string_t *) 0 ; PyObject * obj0 = 0 ; int result; { int ret; ret = prelude_string_new(&(arg2)); if ( ret < 0 ) { swig_python_raise_exception(ret); return NULL; } } if (!PyArg_ParseTuple(args,(char *)"O:idmef_time_to_ntpstamp",&obj0)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_time, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { Py_BEGIN_ALLOW_THREADS result = (int)idmef_time_to_ntpstamp((struct idmef_time const *)arg1,arg2); Py_END_ALLOW_THREADS } { if ( result < 0 ) { swig_python_raise_exception(result); resultobj = NULL; } else { resultobj = PyInt_FromLong(result); } } { if ( result >= 0 ) resultobj = PyString_FromStringAndSize(prelude_string_get_string(arg2), prelude_string_get_len(arg2)); prelude_string_destroy(arg2); } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_time_compare(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_time_t *arg1 = (idmef_time_t *) 0 ; idmef_time_t *arg2 = (idmef_time_t *) 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; int result; if (!PyArg_ParseTuple(args,(char *)"OO:idmef_time_compare",&obj0,&obj1)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_time, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { if ( obj1 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj1, (void **)&arg2, SWIGTYPE_p_idmef_time, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { Py_BEGIN_ALLOW_THREADS result = (int)idmef_time_compare((struct idmef_time const *)arg1,(struct idmef_time const *)arg2); Py_END_ALLOW_THREADS } { resultobj = PyInt_FromLong(result); } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_data_t_refcount_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_data_t *arg1 = (idmef_data_t *) 0 ; int arg2 ; int val2 ; int ecode2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:idmef_data_t_refcount_set",&obj0,&obj1)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_data_t, SWIG_POINTER_EXCEPTION|0) ) return NULL; } ecode2 = SWIG_AsVal_int(obj1, &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "idmef_data_t_refcount_set" "', argument " "2"" of type '" "int""'"); } arg2 = (int)(val2); if (arg1) (arg1)->refcount = arg2; resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_data_t_refcount_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_data_t *arg1 = (idmef_data_t *) 0 ; PyObject * obj0 = 0 ; int result; if (!PyArg_ParseTuple(args,(char *)"O:idmef_data_t_refcount_get",&obj0)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_data_t, SWIG_POINTER_EXCEPTION|0) ) return NULL; } result = (int) ((arg1)->refcount); { if ( result < 0 ) { swig_python_raise_exception(result); resultobj = NULL; } else { resultobj = PyInt_FromLong(result); } } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_data_t_flags_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_data_t *arg1 = (idmef_data_t *) 0 ; int arg2 ; int val2 ; int ecode2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:idmef_data_t_flags_set",&obj0,&obj1)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_data_t, SWIG_POINTER_EXCEPTION|0) ) return NULL; } ecode2 = SWIG_AsVal_int(obj1, &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "idmef_data_t_flags_set" "', argument " "2"" of type '" "int""'"); } arg2 = (int)(val2); if (arg1) (arg1)->flags = arg2; resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_data_t_flags_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_data_t *arg1 = (idmef_data_t *) 0 ; PyObject * obj0 = 0 ; int result; if (!PyArg_ParseTuple(args,(char *)"O:idmef_data_t_flags_get",&obj0)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_data_t, SWIG_POINTER_EXCEPTION|0) ) return NULL; } result = (int) ((arg1)->flags); { if ( result < 0 ) { swig_python_raise_exception(result); resultobj = NULL; } else { resultobj = PyInt_FromLong(result); } } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_data_t_type_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_data_t *arg1 = (idmef_data_t *) 0 ; idmef_data_type_t arg2 ; int val2 ; int ecode2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:idmef_data_t_type_set",&obj0,&obj1)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_data_t, SWIG_POINTER_EXCEPTION|0) ) return NULL; } ecode2 = SWIG_AsVal_int(obj1, &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "idmef_data_t_type_set" "', argument " "2"" of type '" "idmef_data_type_t""'"); } arg2 = (idmef_data_type_t)(val2); if (arg1) (arg1)->type = arg2; resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_data_t_type_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_data_t *arg1 = (idmef_data_t *) 0 ; PyObject * obj0 = 0 ; idmef_data_type_t result; if (!PyArg_ParseTuple(args,(char *)"O:idmef_data_t_type_get",&obj0)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_data_t, SWIG_POINTER_EXCEPTION|0) ) return NULL; } result = (idmef_data_type_t) ((arg1)->type); resultobj = SWIG_From_int((int)(result)); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_data_t_len_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_data_t *arg1 = (idmef_data_t *) 0 ; size_t arg2 ; size_t val2 ; int ecode2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:idmef_data_t_len_set",&obj0,&obj1)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_data_t, SWIG_POINTER_EXCEPTION|0) ) return NULL; } ecode2 = SWIG_AsVal_size_t(obj1, &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "idmef_data_t_len_set" "', argument " "2"" of type '" "size_t""'"); } arg2 = (size_t)(val2); if (arg1) (arg1)->len = arg2; resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_data_t_len_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_data_t *arg1 = (idmef_data_t *) 0 ; PyObject * obj0 = 0 ; size_t result; if (!PyArg_ParseTuple(args,(char *)"O:idmef_data_t_len_get",&obj0)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_data_t, SWIG_POINTER_EXCEPTION|0) ) return NULL; } result = ((arg1)->len); resultobj = SWIG_From_size_t((size_t)(result)); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_data_t_list_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_data_t *arg1 = (idmef_data_t *) 0 ; prelude_list_t arg2 ; void *argp2 ; int res2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:idmef_data_t_list_set",&obj0,&obj1)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_data_t, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_prelude_list_t, 0 ); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "idmef_data_t_list_set" "', argument " "2"" of type '" "prelude_list_t""'"); } if (!argp2) { SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "idmef_data_t_list_set" "', argument " "2"" of type '" "prelude_list_t""'"); } else { arg2 = *((prelude_list_t *)(argp2)); } } if (arg1) (arg1)->list = arg2; resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_data_t_list_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_data_t *arg1 = (idmef_data_t *) 0 ; PyObject * obj0 = 0 ; prelude_list_t result; if (!PyArg_ParseTuple(args,(char *)"O:idmef_data_t_list_get",&obj0)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_data_t, SWIG_POINTER_EXCEPTION|0) ) return NULL; } result = ((arg1)->list); resultobj = SWIG_NewPointerObj((prelude_list_t *)memcpy((prelude_list_t *)malloc(sizeof(prelude_list_t)),&result,sizeof(prelude_list_t)), SWIGTYPE_p_prelude_list_t, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_data_t_data_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_data_t *arg1 = (idmef_data_t *) 0 ; PyObject * obj0 = 0 ; idmef_data_t_data *result = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:idmef_data_t_data_get",&obj0)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_data_t, SWIG_POINTER_EXCEPTION|0) ) return NULL; } result = (idmef_data_t_data *)& ((arg1)->data); resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_idmef_data_t_data, 0 | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_new_idmef_data_t(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_data_t *result = 0 ; if (!PyArg_ParseTuple(args,(char *)":new_idmef_data_t")) SWIG_fail; { Py_BEGIN_ALLOW_THREADS result = (idmef_data_t *)calloc(1, sizeof(idmef_data_t)); Py_END_ALLOW_THREADS } { resultobj = swig_python_data(result); } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_delete_idmef_data_t(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_data_t *arg1 = (idmef_data_t *) 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:delete_idmef_data_t",&obj0)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_data_t, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { Py_BEGIN_ALLOW_THREADS free((char *) arg1); Py_END_ALLOW_THREADS } resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_data_t_data_char_data_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_data_t_data *arg1 = (idmef_data_t_data *) 0 ; char arg2 ; void *argp1 = 0 ; int res1 = 0 ; char val2 ; int ecode2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:idmef_data_t_data_char_data_set",&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_idmef_data_t_data, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "idmef_data_t_data_char_data_set" "', argument " "1"" of type '" "idmef_data_t_data *""'"); } arg1 = (idmef_data_t_data *)(argp1); ecode2 = SWIG_AsVal_char(obj1, &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "idmef_data_t_data_char_data_set" "', argument " "2"" of type '" "char""'"); } arg2 = (char)(val2); if (arg1) (arg1)->char_data = arg2; resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_data_t_data_char_data_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_data_t_data *arg1 = (idmef_data_t_data *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; char result; if (!PyArg_ParseTuple(args,(char *)"O:idmef_data_t_data_char_data_get",&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_idmef_data_t_data, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "idmef_data_t_data_char_data_get" "', argument " "1"" of type '" "idmef_data_t_data *""'"); } arg1 = (idmef_data_t_data *)(argp1); result = (char) ((arg1)->char_data); resultobj = SWIG_From_char((char)(result)); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_data_t_data_byte_data_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_data_t_data *arg1 = (idmef_data_t_data *) 0 ; uint8_t arg2 ; void *argp1 = 0 ; int res1 = 0 ; unsigned char val2 ; int ecode2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:idmef_data_t_data_byte_data_set",&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_idmef_data_t_data, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "idmef_data_t_data_byte_data_set" "', argument " "1"" of type '" "idmef_data_t_data *""'"); } arg1 = (idmef_data_t_data *)(argp1); ecode2 = SWIG_AsVal_unsigned_SS_char(obj1, &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "idmef_data_t_data_byte_data_set" "', argument " "2"" of type '" "uint8_t""'"); } arg2 = (uint8_t)(val2); if (arg1) (arg1)->byte_data = arg2; resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_data_t_data_byte_data_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_data_t_data *arg1 = (idmef_data_t_data *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; uint8_t result; if (!PyArg_ParseTuple(args,(char *)"O:idmef_data_t_data_byte_data_get",&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_idmef_data_t_data, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "idmef_data_t_data_byte_data_get" "', argument " "1"" of type '" "idmef_data_t_data *""'"); } arg1 = (idmef_data_t_data *)(argp1); result = (uint8_t) ((arg1)->byte_data); resultobj = SWIG_From_unsigned_SS_char((unsigned char)(result)); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_data_t_data_uint32_data_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_data_t_data *arg1 = (idmef_data_t_data *) 0 ; uint32_t arg2 ; void *argp1 = 0 ; int res1 = 0 ; unsigned int val2 ; int ecode2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:idmef_data_t_data_uint32_data_set",&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_idmef_data_t_data, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "idmef_data_t_data_uint32_data_set" "', argument " "1"" of type '" "idmef_data_t_data *""'"); } arg1 = (idmef_data_t_data *)(argp1); ecode2 = SWIG_AsVal_unsigned_SS_int(obj1, &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "idmef_data_t_data_uint32_data_set" "', argument " "2"" of type '" "uint32_t""'"); } arg2 = (uint32_t)(val2); if (arg1) (arg1)->uint32_data = arg2; resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_data_t_data_uint32_data_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_data_t_data *arg1 = (idmef_data_t_data *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; uint32_t result; if (!PyArg_ParseTuple(args,(char *)"O:idmef_data_t_data_uint32_data_get",&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_idmef_data_t_data, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "idmef_data_t_data_uint32_data_get" "', argument " "1"" of type '" "idmef_data_t_data *""'"); } arg1 = (idmef_data_t_data *)(argp1); result = (uint32_t) ((arg1)->uint32_data); { resultobj = PyLong_FromUnsignedLong(result); } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_data_t_data_uint64_data_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_data_t_data *arg1 = (idmef_data_t_data *) 0 ; uint64_t arg2 ; void *argp1 = 0 ; int res1 = 0 ; unsigned long long val2 ; int ecode2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:idmef_data_t_data_uint64_data_set",&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_idmef_data_t_data, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "idmef_data_t_data_uint64_data_set" "', argument " "1"" of type '" "idmef_data_t_data *""'"); } arg1 = (idmef_data_t_data *)(argp1); ecode2 = SWIG_AsVal_unsigned_SS_long_SS_long(obj1, &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "idmef_data_t_data_uint64_data_set" "', argument " "2"" of type '" "uint64_t""'"); } arg2 = (uint64_t)(val2); if (arg1) (arg1)->uint64_data = arg2; resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_data_t_data_uint64_data_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_data_t_data *arg1 = (idmef_data_t_data *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; uint64_t result; if (!PyArg_ParseTuple(args,(char *)"O:idmef_data_t_data_uint64_data_get",&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_idmef_data_t_data, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "idmef_data_t_data_uint64_data_get" "', argument " "1"" of type '" "idmef_data_t_data *""'"); } arg1 = (idmef_data_t_data *)(argp1); result = (uint64_t) ((arg1)->uint64_data); resultobj = SWIG_From_unsigned_SS_long_SS_long((unsigned long long)(result)); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_data_t_data_float_data_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_data_t_data *arg1 = (idmef_data_t_data *) 0 ; float arg2 ; void *argp1 = 0 ; int res1 = 0 ; float val2 ; int ecode2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:idmef_data_t_data_float_data_set",&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_idmef_data_t_data, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "idmef_data_t_data_float_data_set" "', argument " "1"" of type '" "idmef_data_t_data *""'"); } arg1 = (idmef_data_t_data *)(argp1); ecode2 = SWIG_AsVal_float(obj1, &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "idmef_data_t_data_float_data_set" "', argument " "2"" of type '" "float""'"); } arg2 = (float)(val2); if (arg1) (arg1)->float_data = arg2; resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_data_t_data_float_data_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_data_t_data *arg1 = (idmef_data_t_data *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; float result; if (!PyArg_ParseTuple(args,(char *)"O:idmef_data_t_data_float_data_get",&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_idmef_data_t_data, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "idmef_data_t_data_float_data_get" "', argument " "1"" of type '" "idmef_data_t_data *""'"); } arg1 = (idmef_data_t_data *)(argp1); result = (float) ((arg1)->float_data); resultobj = SWIG_From_float((float)(result)); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_data_t_data_rw_data_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_data_t_data *arg1 = (idmef_data_t_data *) 0 ; void *arg2 = (void *) 0 ; void *argp1 = 0 ; int res1 = 0 ; int res2 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:idmef_data_t_data_rw_data_set",&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_idmef_data_t_data, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "idmef_data_t_data_rw_data_set" "', argument " "1"" of type '" "idmef_data_t_data *""'"); } arg1 = (idmef_data_t_data *)(argp1); res2 = SWIG_ConvertPtr(obj1,SWIG_as_voidptrptr(&arg2), 0, SWIG_POINTER_DISOWN); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "idmef_data_t_data_rw_data_set" "', argument " "2"" of type '" "void *""'"); } if (arg1) (arg1)->rw_data = arg2; resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_data_t_data_rw_data_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_data_t_data *arg1 = (idmef_data_t_data *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; void *result = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:idmef_data_t_data_rw_data_get",&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_idmef_data_t_data, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "idmef_data_t_data_rw_data_get" "', argument " "1"" of type '" "idmef_data_t_data *""'"); } arg1 = (idmef_data_t_data *)(argp1); result = (void *) ((arg1)->rw_data); resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_void, 0 | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_data_t_data_ro_data_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_data_t_data *arg1 = (idmef_data_t_data *) 0 ; void *arg2 = (void *) 0 ; void *argp1 = 0 ; int res1 = 0 ; int res2 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:idmef_data_t_data_ro_data_set",&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_idmef_data_t_data, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "idmef_data_t_data_ro_data_set" "', argument " "1"" of type '" "idmef_data_t_data *""'"); } arg1 = (idmef_data_t_data *)(argp1); res2 = SWIG_ConvertPtr(obj1,SWIG_as_voidptrptr(&arg2), 0, SWIG_POINTER_DISOWN); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "idmef_data_t_data_ro_data_set" "', argument " "2"" of type '" "void const *""'"); } if (arg1) (arg1)->ro_data = (void const *)arg2; resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_data_t_data_ro_data_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_data_t_data *arg1 = (idmef_data_t_data *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; void *result = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:idmef_data_t_data_ro_data_get",&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_idmef_data_t_data, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "idmef_data_t_data_ro_data_get" "', argument " "1"" of type '" "idmef_data_t_data *""'"); } arg1 = (idmef_data_t_data *)(argp1); result = (void *) ((arg1)->ro_data); resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_void, 0 | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_new_idmef_data_t_data(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_data_t_data *result = 0 ; if (!PyArg_ParseTuple(args,(char *)":new_idmef_data_t_data")) SWIG_fail; { Py_BEGIN_ALLOW_THREADS result = (idmef_data_t_data *)calloc(1, sizeof(idmef_data_t_data)); Py_END_ALLOW_THREADS } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_idmef_data_t_data, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_delete_idmef_data_t_data(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_data_t_data *arg1 = (idmef_data_t_data *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:delete_idmef_data_t_data",&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_idmef_data_t_data, SWIG_POINTER_DISOWN | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_idmef_data_t_data" "', argument " "1"" of type '" "idmef_data_t_data *""'"); } arg1 = (idmef_data_t_data *)(argp1); { Py_BEGIN_ALLOW_THREADS free((char *) arg1); Py_END_ALLOW_THREADS } resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_data_new(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_data_t **arg1 = (idmef_data_t **) 0 ; idmef_data_t *tmp1 ; int result; { arg1 = (idmef_data_t **) &tmp1; } if (!PyArg_ParseTuple(args,(char *)":idmef_data_new")) SWIG_fail; { Py_BEGIN_ALLOW_THREADS result = (int)idmef_data_new(arg1); Py_END_ALLOW_THREADS } { if ( result < 0 ) { swig_python_raise_exception(result); resultobj = NULL; } else { resultobj = PyInt_FromLong(result); } } { if ( result >= 0 ) resultobj = SWIG_NewPointerObj((void *) * arg1, SWIGTYPE_p_idmef_data_t, 0); } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_data_ref(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_data_t *arg1 = (idmef_data_t *) 0 ; PyObject * obj0 = 0 ; idmef_data_t *result = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:idmef_data_ref",&obj0)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_data_t, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { Py_BEGIN_ALLOW_THREADS result = (idmef_data_t *)idmef_data_ref(arg1); Py_END_ALLOW_THREADS } { resultobj = swig_python_data(result); } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_data_new_char(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_data_t **arg1 = (idmef_data_t **) 0 ; char arg2 ; idmef_data_t *tmp1 ; char val2 ; int ecode2 = 0 ; PyObject * obj0 = 0 ; int result; { arg1 = (idmef_data_t **) &tmp1; } if (!PyArg_ParseTuple(args,(char *)"O:idmef_data_new_char",&obj0)) SWIG_fail; ecode2 = SWIG_AsVal_char(obj0, &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "idmef_data_new_char" "', argument " "2"" of type '" "char""'"); } arg2 = (char)(val2); { Py_BEGIN_ALLOW_THREADS result = (int)idmef_data_new_char(arg1,arg2); Py_END_ALLOW_THREADS } { if ( result < 0 ) { swig_python_raise_exception(result); resultobj = NULL; } else { resultobj = PyInt_FromLong(result); } } { if ( result >= 0 ) resultobj = SWIG_NewPointerObj((void *) * arg1, SWIGTYPE_p_idmef_data_t, 0); } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_data_new_byte(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_data_t **arg1 = (idmef_data_t **) 0 ; uint8_t arg2 ; idmef_data_t *tmp1 ; unsigned char val2 ; int ecode2 = 0 ; PyObject * obj0 = 0 ; int result; { arg1 = (idmef_data_t **) &tmp1; } if (!PyArg_ParseTuple(args,(char *)"O:idmef_data_new_byte",&obj0)) SWIG_fail; ecode2 = SWIG_AsVal_unsigned_SS_char(obj0, &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "idmef_data_new_byte" "', argument " "2"" of type '" "uint8_t""'"); } arg2 = (uint8_t)(val2); { Py_BEGIN_ALLOW_THREADS result = (int)idmef_data_new_byte(arg1,arg2); Py_END_ALLOW_THREADS } { if ( result < 0 ) { swig_python_raise_exception(result); resultobj = NULL; } else { resultobj = PyInt_FromLong(result); } } { if ( result >= 0 ) resultobj = SWIG_NewPointerObj((void *) * arg1, SWIGTYPE_p_idmef_data_t, 0); } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_data_new_uint32(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_data_t **arg1 = (idmef_data_t **) 0 ; uint32_t arg2 ; idmef_data_t *tmp1 ; unsigned int val2 ; int ecode2 = 0 ; PyObject * obj0 = 0 ; int result; { arg1 = (idmef_data_t **) &tmp1; } if (!PyArg_ParseTuple(args,(char *)"O:idmef_data_new_uint32",&obj0)) SWIG_fail; ecode2 = SWIG_AsVal_unsigned_SS_int(obj0, &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "idmef_data_new_uint32" "', argument " "2"" of type '" "uint32_t""'"); } arg2 = (uint32_t)(val2); { Py_BEGIN_ALLOW_THREADS result = (int)idmef_data_new_uint32(arg1,arg2); Py_END_ALLOW_THREADS } { if ( result < 0 ) { swig_python_raise_exception(result); resultobj = NULL; } else { resultobj = PyInt_FromLong(result); } } { if ( result >= 0 ) resultobj = SWIG_NewPointerObj((void *) * arg1, SWIGTYPE_p_idmef_data_t, 0); } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_data_new_uint64(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_data_t **arg1 = (idmef_data_t **) 0 ; uint64_t arg2 ; idmef_data_t *tmp1 ; unsigned long long val2 ; int ecode2 = 0 ; PyObject * obj0 = 0 ; int result; { arg1 = (idmef_data_t **) &tmp1; } if (!PyArg_ParseTuple(args,(char *)"O:idmef_data_new_uint64",&obj0)) SWIG_fail; ecode2 = SWIG_AsVal_unsigned_SS_long_SS_long(obj0, &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "idmef_data_new_uint64" "', argument " "2"" of type '" "uint64_t""'"); } arg2 = (uint64_t)(val2); { Py_BEGIN_ALLOW_THREADS result = (int)idmef_data_new_uint64(arg1,arg2); Py_END_ALLOW_THREADS } { if ( result < 0 ) { swig_python_raise_exception(result); resultobj = NULL; } else { resultobj = PyInt_FromLong(result); } } { if ( result >= 0 ) resultobj = SWIG_NewPointerObj((void *) * arg1, SWIGTYPE_p_idmef_data_t, 0); } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_data_new_float(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_data_t **arg1 = (idmef_data_t **) 0 ; float arg2 ; idmef_data_t *tmp1 ; float val2 ; int ecode2 = 0 ; PyObject * obj0 = 0 ; int result; { arg1 = (idmef_data_t **) &tmp1; } if (!PyArg_ParseTuple(args,(char *)"O:idmef_data_new_float",&obj0)) SWIG_fail; ecode2 = SWIG_AsVal_float(obj0, &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "idmef_data_new_float" "', argument " "2"" of type '" "float""'"); } arg2 = (float)(val2); { Py_BEGIN_ALLOW_THREADS result = (int)idmef_data_new_float(arg1,arg2); Py_END_ALLOW_THREADS } { if ( result < 0 ) { swig_python_raise_exception(result); resultobj = NULL; } else { resultobj = PyInt_FromLong(result); } } { if ( result >= 0 ) resultobj = SWIG_NewPointerObj((void *) * arg1, SWIGTYPE_p_idmef_data_t, 0); } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_data_set_char(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_data_t *arg1 = (idmef_data_t *) 0 ; char arg2 ; char val2 ; int ecode2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:idmef_data_set_char",&obj0,&obj1)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_data_t, SWIG_POINTER_EXCEPTION|0) ) return NULL; } ecode2 = SWIG_AsVal_char(obj1, &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "idmef_data_set_char" "', argument " "2"" of type '" "char""'"); } arg2 = (char)(val2); { Py_BEGIN_ALLOW_THREADS idmef_data_set_char(arg1,arg2); Py_END_ALLOW_THREADS } resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_data_set_byte(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_data_t *arg1 = (idmef_data_t *) 0 ; uint8_t arg2 ; unsigned char val2 ; int ecode2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:idmef_data_set_byte",&obj0,&obj1)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_data_t, SWIG_POINTER_EXCEPTION|0) ) return NULL; } ecode2 = SWIG_AsVal_unsigned_SS_char(obj1, &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "idmef_data_set_byte" "', argument " "2"" of type '" "uint8_t""'"); } arg2 = (uint8_t)(val2); { Py_BEGIN_ALLOW_THREADS idmef_data_set_byte(arg1,arg2); Py_END_ALLOW_THREADS } resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_data_set_uint32(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_data_t *arg1 = (idmef_data_t *) 0 ; uint32_t arg2 ; unsigned int val2 ; int ecode2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:idmef_data_set_uint32",&obj0,&obj1)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_data_t, SWIG_POINTER_EXCEPTION|0) ) return NULL; } ecode2 = SWIG_AsVal_unsigned_SS_int(obj1, &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "idmef_data_set_uint32" "', argument " "2"" of type '" "uint32_t""'"); } arg2 = (uint32_t)(val2); { Py_BEGIN_ALLOW_THREADS idmef_data_set_uint32(arg1,arg2); Py_END_ALLOW_THREADS } resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_data_set_uint64(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_data_t *arg1 = (idmef_data_t *) 0 ; uint64_t arg2 ; unsigned long long val2 ; int ecode2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:idmef_data_set_uint64",&obj0,&obj1)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_data_t, SWIG_POINTER_EXCEPTION|0) ) return NULL; } ecode2 = SWIG_AsVal_unsigned_SS_long_SS_long(obj1, &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "idmef_data_set_uint64" "', argument " "2"" of type '" "uint64_t""'"); } arg2 = (uint64_t)(val2); { Py_BEGIN_ALLOW_THREADS idmef_data_set_uint64(arg1,arg2); Py_END_ALLOW_THREADS } resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_data_set_float(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_data_t *arg1 = (idmef_data_t *) 0 ; float arg2 ; float val2 ; int ecode2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:idmef_data_set_float",&obj0,&obj1)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_data_t, SWIG_POINTER_EXCEPTION|0) ) return NULL; } ecode2 = SWIG_AsVal_float(obj1, &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "idmef_data_set_float" "', argument " "2"" of type '" "float""'"); } arg2 = (float)(val2); { Py_BEGIN_ALLOW_THREADS idmef_data_set_float(arg1,arg2); Py_END_ALLOW_THREADS } resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_data_set_ptr_dup_fast(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_data_t *arg1 = (idmef_data_t *) 0 ; idmef_data_type_t arg2 ; void *arg3 = (void *) 0 ; size_t arg4 ; int val2 ; int ecode2 = 0 ; int res3 ; size_t val4 ; int ecode4 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; PyObject * obj2 = 0 ; PyObject * obj3 = 0 ; int result; if (!PyArg_ParseTuple(args,(char *)"OOOO:idmef_data_set_ptr_dup_fast",&obj0,&obj1,&obj2,&obj3)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_data_t, SWIG_POINTER_EXCEPTION|0) ) return NULL; } ecode2 = SWIG_AsVal_int(obj1, &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "idmef_data_set_ptr_dup_fast" "', argument " "2"" of type '" "idmef_data_type_t""'"); } arg2 = (idmef_data_type_t)(val2); res3 = SWIG_ConvertPtr(obj2,SWIG_as_voidptrptr(&arg3), 0, 0); if (!SWIG_IsOK(res3)) { SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "idmef_data_set_ptr_dup_fast" "', argument " "3"" of type '" "void const *""'"); } ecode4 = SWIG_AsVal_size_t(obj3, &val4); if (!SWIG_IsOK(ecode4)) { SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "idmef_data_set_ptr_dup_fast" "', argument " "4"" of type '" "size_t""'"); } arg4 = (size_t)(val4); { Py_BEGIN_ALLOW_THREADS result = (int)idmef_data_set_ptr_dup_fast(arg1,arg2,(void const *)arg3,arg4); Py_END_ALLOW_THREADS } { if ( result < 0 ) { swig_python_raise_exception(result); resultobj = NULL; } else { resultobj = PyInt_FromLong(result); } } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_data_set_ptr_ref_fast(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_data_t *arg1 = (idmef_data_t *) 0 ; idmef_data_type_t arg2 ; void *arg3 = (void *) 0 ; size_t arg4 ; int val2 ; int ecode2 = 0 ; int res3 ; size_t val4 ; int ecode4 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; PyObject * obj2 = 0 ; PyObject * obj3 = 0 ; int result; if (!PyArg_ParseTuple(args,(char *)"OOOO:idmef_data_set_ptr_ref_fast",&obj0,&obj1,&obj2,&obj3)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_data_t, SWIG_POINTER_EXCEPTION|0) ) return NULL; } ecode2 = SWIG_AsVal_int(obj1, &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "idmef_data_set_ptr_ref_fast" "', argument " "2"" of type '" "idmef_data_type_t""'"); } arg2 = (idmef_data_type_t)(val2); res3 = SWIG_ConvertPtr(obj2,SWIG_as_voidptrptr(&arg3), 0, 0); if (!SWIG_IsOK(res3)) { SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "idmef_data_set_ptr_ref_fast" "', argument " "3"" of type '" "void const *""'"); } ecode4 = SWIG_AsVal_size_t(obj3, &val4); if (!SWIG_IsOK(ecode4)) { SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "idmef_data_set_ptr_ref_fast" "', argument " "4"" of type '" "size_t""'"); } arg4 = (size_t)(val4); { Py_BEGIN_ALLOW_THREADS result = (int)idmef_data_set_ptr_ref_fast(arg1,arg2,(void const *)arg3,arg4); Py_END_ALLOW_THREADS } { if ( result < 0 ) { swig_python_raise_exception(result); resultobj = NULL; } else { resultobj = PyInt_FromLong(result); } } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_data_set_ptr_nodup_fast(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_data_t *arg1 = (idmef_data_t *) 0 ; idmef_data_type_t arg2 ; void *arg3 = (void *) 0 ; size_t arg4 ; int val2 ; int ecode2 = 0 ; int res3 ; size_t val4 ; int ecode4 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; PyObject * obj2 = 0 ; PyObject * obj3 = 0 ; int result; if (!PyArg_ParseTuple(args,(char *)"OOOO:idmef_data_set_ptr_nodup_fast",&obj0,&obj1,&obj2,&obj3)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_data_t, SWIG_POINTER_EXCEPTION|0) ) return NULL; } ecode2 = SWIG_AsVal_int(obj1, &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "idmef_data_set_ptr_nodup_fast" "', argument " "2"" of type '" "idmef_data_type_t""'"); } arg2 = (idmef_data_type_t)(val2); res3 = SWIG_ConvertPtr(obj2,SWIG_as_voidptrptr(&arg3), 0, 0); if (!SWIG_IsOK(res3)) { SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "idmef_data_set_ptr_nodup_fast" "', argument " "3"" of type '" "void *""'"); } ecode4 = SWIG_AsVal_size_t(obj3, &val4); if (!SWIG_IsOK(ecode4)) { SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "idmef_data_set_ptr_nodup_fast" "', argument " "4"" of type '" "size_t""'"); } arg4 = (size_t)(val4); { Py_BEGIN_ALLOW_THREADS result = (int)idmef_data_set_ptr_nodup_fast(arg1,arg2,arg3,arg4); Py_END_ALLOW_THREADS } { if ( result < 0 ) { swig_python_raise_exception(result); resultobj = NULL; } else { resultobj = PyInt_FromLong(result); } } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_data_new_ptr_dup_fast(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_data_t **arg1 = (idmef_data_t **) 0 ; idmef_data_type_t arg2 ; void *arg3 = (void *) 0 ; size_t arg4 ; idmef_data_t *tmp1 ; int val2 ; int ecode2 = 0 ; int res3 ; size_t val4 ; int ecode4 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; PyObject * obj2 = 0 ; int result; { arg1 = (idmef_data_t **) &tmp1; } if (!PyArg_ParseTuple(args,(char *)"OOO:idmef_data_new_ptr_dup_fast",&obj0,&obj1,&obj2)) SWIG_fail; ecode2 = SWIG_AsVal_int(obj0, &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "idmef_data_new_ptr_dup_fast" "', argument " "2"" of type '" "idmef_data_type_t""'"); } arg2 = (idmef_data_type_t)(val2); res3 = SWIG_ConvertPtr(obj1,SWIG_as_voidptrptr(&arg3), 0, 0); if (!SWIG_IsOK(res3)) { SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "idmef_data_new_ptr_dup_fast" "', argument " "3"" of type '" "void const *""'"); } ecode4 = SWIG_AsVal_size_t(obj2, &val4); if (!SWIG_IsOK(ecode4)) { SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "idmef_data_new_ptr_dup_fast" "', argument " "4"" of type '" "size_t""'"); } arg4 = (size_t)(val4); { Py_BEGIN_ALLOW_THREADS result = (int)idmef_data_new_ptr_dup_fast(arg1,arg2,(void const *)arg3,arg4); Py_END_ALLOW_THREADS } { if ( result < 0 ) { swig_python_raise_exception(result); resultobj = NULL; } else { resultobj = PyInt_FromLong(result); } } { if ( result >= 0 ) resultobj = SWIG_NewPointerObj((void *) * arg1, SWIGTYPE_p_idmef_data_t, 0); } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_data_new_ptr_ref_fast(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_data_t **arg1 = (idmef_data_t **) 0 ; idmef_data_type_t arg2 ; void *arg3 = (void *) 0 ; size_t arg4 ; idmef_data_t *tmp1 ; int val2 ; int ecode2 = 0 ; int res3 ; size_t val4 ; int ecode4 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; PyObject * obj2 = 0 ; int result; { arg1 = (idmef_data_t **) &tmp1; } if (!PyArg_ParseTuple(args,(char *)"OOO:idmef_data_new_ptr_ref_fast",&obj0,&obj1,&obj2)) SWIG_fail; ecode2 = SWIG_AsVal_int(obj0, &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "idmef_data_new_ptr_ref_fast" "', argument " "2"" of type '" "idmef_data_type_t""'"); } arg2 = (idmef_data_type_t)(val2); res3 = SWIG_ConvertPtr(obj1,SWIG_as_voidptrptr(&arg3), 0, 0); if (!SWIG_IsOK(res3)) { SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "idmef_data_new_ptr_ref_fast" "', argument " "3"" of type '" "void const *""'"); } ecode4 = SWIG_AsVal_size_t(obj2, &val4); if (!SWIG_IsOK(ecode4)) { SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "idmef_data_new_ptr_ref_fast" "', argument " "4"" of type '" "size_t""'"); } arg4 = (size_t)(val4); { Py_BEGIN_ALLOW_THREADS result = (int)idmef_data_new_ptr_ref_fast(arg1,arg2,(void const *)arg3,arg4); Py_END_ALLOW_THREADS } { if ( result < 0 ) { swig_python_raise_exception(result); resultobj = NULL; } else { resultobj = PyInt_FromLong(result); } } { if ( result >= 0 ) resultobj = SWIG_NewPointerObj((void *) * arg1, SWIGTYPE_p_idmef_data_t, 0); } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_data_new_ptr_nodup_fast(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_data_t **arg1 = (idmef_data_t **) 0 ; idmef_data_type_t arg2 ; void *arg3 = (void *) 0 ; size_t arg4 ; idmef_data_t *tmp1 ; int val2 ; int ecode2 = 0 ; int res3 ; size_t val4 ; int ecode4 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; PyObject * obj2 = 0 ; int result; { arg1 = (idmef_data_t **) &tmp1; } if (!PyArg_ParseTuple(args,(char *)"OOO:idmef_data_new_ptr_nodup_fast",&obj0,&obj1,&obj2)) SWIG_fail; ecode2 = SWIG_AsVal_int(obj0, &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "idmef_data_new_ptr_nodup_fast" "', argument " "2"" of type '" "idmef_data_type_t""'"); } arg2 = (idmef_data_type_t)(val2); res3 = SWIG_ConvertPtr(obj1,SWIG_as_voidptrptr(&arg3), 0, 0); if (!SWIG_IsOK(res3)) { SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "idmef_data_new_ptr_nodup_fast" "', argument " "3"" of type '" "void *""'"); } ecode4 = SWIG_AsVal_size_t(obj2, &val4); if (!SWIG_IsOK(ecode4)) { SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "idmef_data_new_ptr_nodup_fast" "', argument " "4"" of type '" "size_t""'"); } arg4 = (size_t)(val4); { Py_BEGIN_ALLOW_THREADS result = (int)idmef_data_new_ptr_nodup_fast(arg1,arg2,arg3,arg4); Py_END_ALLOW_THREADS } { if ( result < 0 ) { swig_python_raise_exception(result); resultobj = NULL; } else { resultobj = PyInt_FromLong(result); } } { if ( result >= 0 ) resultobj = SWIG_NewPointerObj((void *) * arg1, SWIGTYPE_p_idmef_data_t, 0); } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_data_set_char_string_dup_fast(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_data_t *arg1 = (idmef_data_t *) 0 ; char *arg2 = (char *) 0 ; size_t arg3 ; size_t val3 ; int ecode3 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; PyObject * obj2 = 0 ; int result; if (!PyArg_ParseTuple(args,(char *)"OOO:idmef_data_set_char_string_dup_fast",&obj0,&obj1,&obj2)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_data_t, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { if ( obj1 == Py_None ) arg2 = NULL; else if ( PyString_Check(obj1) ) arg2 = PyString_AsString(obj1); else { PyErr_Format(PyExc_TypeError, "expected None or string, %s found", obj1->ob_type->tp_name); return NULL; } } ecode3 = SWIG_AsVal_size_t(obj2, &val3); if (!SWIG_IsOK(ecode3)) { SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "idmef_data_set_char_string_dup_fast" "', argument " "3"" of type '" "size_t""'"); } arg3 = (size_t)(val3); { Py_BEGIN_ALLOW_THREADS result = (int)idmef_data_set_char_string_dup_fast(arg1,(char const *)arg2,arg3); Py_END_ALLOW_THREADS } { if ( result < 0 ) { swig_python_raise_exception(result); resultobj = NULL; } else { resultobj = PyInt_FromLong(result); } } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_data_new_char_string_dup_fast(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_data_t **arg1 = (idmef_data_t **) 0 ; char *arg2 = (char *) 0 ; size_t arg3 ; idmef_data_t *tmp1 ; size_t val3 ; int ecode3 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; int result; { arg1 = (idmef_data_t **) &tmp1; } if (!PyArg_ParseTuple(args,(char *)"OO:idmef_data_new_char_string_dup_fast",&obj0,&obj1)) SWIG_fail; { if ( obj0 == Py_None ) arg2 = NULL; else if ( PyString_Check(obj0) ) arg2 = PyString_AsString(obj0); else { PyErr_Format(PyExc_TypeError, "expected None or string, %s found", obj0->ob_type->tp_name); return NULL; } } ecode3 = SWIG_AsVal_size_t(obj1, &val3); if (!SWIG_IsOK(ecode3)) { SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "idmef_data_new_char_string_dup_fast" "', argument " "3"" of type '" "size_t""'"); } arg3 = (size_t)(val3); { Py_BEGIN_ALLOW_THREADS result = (int)idmef_data_new_char_string_dup_fast(arg1,(char const *)arg2,arg3); Py_END_ALLOW_THREADS } { if ( result < 0 ) { swig_python_raise_exception(result); resultobj = NULL; } else { resultobj = PyInt_FromLong(result); } } { if ( result >= 0 ) resultobj = SWIG_NewPointerObj((void *) * arg1, SWIGTYPE_p_idmef_data_t, 0); } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_data_new_char_string_ref_fast(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_data_t **arg1 = (idmef_data_t **) 0 ; char *arg2 = (char *) 0 ; size_t arg3 ; idmef_data_t *tmp1 ; size_t val3 ; int ecode3 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; int result; { arg1 = (idmef_data_t **) &tmp1; } if (!PyArg_ParseTuple(args,(char *)"OO:idmef_data_new_char_string_ref_fast",&obj0,&obj1)) SWIG_fail; { if ( obj0 == Py_None ) arg2 = NULL; else if ( PyString_Check(obj0) ) arg2 = PyString_AsString(obj0); else { PyErr_Format(PyExc_TypeError, "expected None or string, %s found", obj0->ob_type->tp_name); return NULL; } } ecode3 = SWIG_AsVal_size_t(obj1, &val3); if (!SWIG_IsOK(ecode3)) { SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "idmef_data_new_char_string_ref_fast" "', argument " "3"" of type '" "size_t""'"); } arg3 = (size_t)(val3); { Py_BEGIN_ALLOW_THREADS result = (int)idmef_data_new_char_string_ref_fast(arg1,(char const *)arg2,arg3); Py_END_ALLOW_THREADS } { if ( result < 0 ) { swig_python_raise_exception(result); resultobj = NULL; } else { resultobj = PyInt_FromLong(result); } } { if ( result >= 0 ) resultobj = SWIG_NewPointerObj((void *) * arg1, SWIGTYPE_p_idmef_data_t, 0); } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_data_new_char_string_nodup_fast(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_data_t **arg1 = (idmef_data_t **) 0 ; char *arg2 = (char *) 0 ; size_t arg3 ; idmef_data_t *tmp1 ; int res2 ; char *buf2 = 0 ; int alloc2 = 0 ; size_t val3 ; int ecode3 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; int result; { arg1 = (idmef_data_t **) &tmp1; } if (!PyArg_ParseTuple(args,(char *)"OO:idmef_data_new_char_string_nodup_fast",&obj0,&obj1)) SWIG_fail; res2 = SWIG_AsCharPtrAndSize(obj0, &buf2, NULL, &alloc2); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "idmef_data_new_char_string_nodup_fast" "', argument " "2"" of type '" "char *""'"); } arg2 = (char *)(buf2); ecode3 = SWIG_AsVal_size_t(obj1, &val3); if (!SWIG_IsOK(ecode3)) { SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "idmef_data_new_char_string_nodup_fast" "', argument " "3"" of type '" "size_t""'"); } arg3 = (size_t)(val3); { Py_BEGIN_ALLOW_THREADS result = (int)idmef_data_new_char_string_nodup_fast(arg1,arg2,arg3); Py_END_ALLOW_THREADS } { if ( result < 0 ) { swig_python_raise_exception(result); resultobj = NULL; } else { resultobj = PyInt_FromLong(result); } } { if ( result >= 0 ) resultobj = SWIG_NewPointerObj((void *) * arg1, SWIGTYPE_p_idmef_data_t, 0); } if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); return resultobj; fail: if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); return NULL; } SWIGINTERN PyObject *_wrap_idmef_data_set_char_string_ref_fast(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_data_t *arg1 = (idmef_data_t *) 0 ; char *arg2 = (char *) 0 ; size_t arg3 ; size_t val3 ; int ecode3 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; PyObject * obj2 = 0 ; int result; if (!PyArg_ParseTuple(args,(char *)"OOO:idmef_data_set_char_string_ref_fast",&obj0,&obj1,&obj2)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_data_t, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { if ( obj1 == Py_None ) arg2 = NULL; else if ( PyString_Check(obj1) ) arg2 = PyString_AsString(obj1); else { PyErr_Format(PyExc_TypeError, "expected None or string, %s found", obj1->ob_type->tp_name); return NULL; } } ecode3 = SWIG_AsVal_size_t(obj2, &val3); if (!SWIG_IsOK(ecode3)) { SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "idmef_data_set_char_string_ref_fast" "', argument " "3"" of type '" "size_t""'"); } arg3 = (size_t)(val3); { Py_BEGIN_ALLOW_THREADS result = (int)idmef_data_set_char_string_ref_fast(arg1,(char const *)arg2,arg3); Py_END_ALLOW_THREADS } { if ( result < 0 ) { swig_python_raise_exception(result); resultobj = NULL; } else { resultobj = PyInt_FromLong(result); } } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_data_set_char_string_nodup_fast(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_data_t *arg1 = (idmef_data_t *) 0 ; char *arg2 = (char *) 0 ; size_t arg3 ; int res2 ; char *buf2 = 0 ; int alloc2 = 0 ; size_t val3 ; int ecode3 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; PyObject * obj2 = 0 ; int result; if (!PyArg_ParseTuple(args,(char *)"OOO:idmef_data_set_char_string_nodup_fast",&obj0,&obj1,&obj2)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_data_t, SWIG_POINTER_EXCEPTION|0) ) return NULL; } res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "idmef_data_set_char_string_nodup_fast" "', argument " "2"" of type '" "char *""'"); } arg2 = (char *)(buf2); ecode3 = SWIG_AsVal_size_t(obj2, &val3); if (!SWIG_IsOK(ecode3)) { SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "idmef_data_set_char_string_nodup_fast" "', argument " "3"" of type '" "size_t""'"); } arg3 = (size_t)(val3); { Py_BEGIN_ALLOW_THREADS result = (int)idmef_data_set_char_string_nodup_fast(arg1,arg2,arg3); Py_END_ALLOW_THREADS } { if ( result < 0 ) { swig_python_raise_exception(result); resultobj = NULL; } else { resultobj = PyInt_FromLong(result); } } if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); return resultobj; fail: if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); return NULL; } SWIGINTERN PyObject *_wrap_idmef_data_new_char_string_ref(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_data_t **arg1 = (idmef_data_t **) 0 ; char *arg2 = (char *) 0 ; idmef_data_t *tmp1 ; PyObject * obj0 = 0 ; int result; { arg1 = (idmef_data_t **) &tmp1; } if (!PyArg_ParseTuple(args,(char *)"O:idmef_data_new_char_string_ref",&obj0)) SWIG_fail; { if ( obj0 == Py_None ) arg2 = NULL; else if ( PyString_Check(obj0) ) arg2 = PyString_AsString(obj0); else { PyErr_Format(PyExc_TypeError, "expected None or string, %s found", obj0->ob_type->tp_name); return NULL; } } { Py_BEGIN_ALLOW_THREADS result = (int)idmef_data_new_char_string_ref(arg1,(char const *)arg2); Py_END_ALLOW_THREADS } { if ( result < 0 ) { swig_python_raise_exception(result); resultobj = NULL; } else { resultobj = PyInt_FromLong(result); } } { if ( result >= 0 ) resultobj = SWIG_NewPointerObj((void *) * arg1, SWIGTYPE_p_idmef_data_t, 0); } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_data_new_char_string_dup(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_data_t **arg1 = (idmef_data_t **) 0 ; char *arg2 = (char *) 0 ; idmef_data_t *tmp1 ; PyObject * obj0 = 0 ; int result; { arg1 = (idmef_data_t **) &tmp1; } if (!PyArg_ParseTuple(args,(char *)"O:idmef_data_new_char_string_dup",&obj0)) SWIG_fail; { if ( obj0 == Py_None ) arg2 = NULL; else if ( PyString_Check(obj0) ) arg2 = PyString_AsString(obj0); else { PyErr_Format(PyExc_TypeError, "expected None or string, %s found", obj0->ob_type->tp_name); return NULL; } } { Py_BEGIN_ALLOW_THREADS result = (int)idmef_data_new_char_string_dup(arg1,(char const *)arg2); Py_END_ALLOW_THREADS } { if ( result < 0 ) { swig_python_raise_exception(result); resultobj = NULL; } else { resultobj = PyInt_FromLong(result); } } { if ( result >= 0 ) resultobj = SWIG_NewPointerObj((void *) * arg1, SWIGTYPE_p_idmef_data_t, 0); } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_data_new_char_string_nodup(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_data_t **arg1 = (idmef_data_t **) 0 ; char *arg2 = (char *) 0 ; idmef_data_t *tmp1 ; int res2 ; char *buf2 = 0 ; int alloc2 = 0 ; PyObject * obj0 = 0 ; int result; { arg1 = (idmef_data_t **) &tmp1; } if (!PyArg_ParseTuple(args,(char *)"O:idmef_data_new_char_string_nodup",&obj0)) SWIG_fail; res2 = SWIG_AsCharPtrAndSize(obj0, &buf2, NULL, &alloc2); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "idmef_data_new_char_string_nodup" "', argument " "2"" of type '" "char *""'"); } arg2 = (char *)(buf2); { Py_BEGIN_ALLOW_THREADS result = (int)idmef_data_new_char_string_nodup(arg1,arg2); Py_END_ALLOW_THREADS } { if ( result < 0 ) { swig_python_raise_exception(result); resultobj = NULL; } else { resultobj = PyInt_FromLong(result); } } { if ( result >= 0 ) resultobj = SWIG_NewPointerObj((void *) * arg1, SWIGTYPE_p_idmef_data_t, 0); } if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); return resultobj; fail: if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); return NULL; } SWIGINTERN PyObject *_wrap_idmef_data_set_char_string_ref(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_data_t *arg1 = (idmef_data_t *) 0 ; char *arg2 = (char *) 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; int result; if (!PyArg_ParseTuple(args,(char *)"OO:idmef_data_set_char_string_ref",&obj0,&obj1)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_data_t, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { if ( obj1 == Py_None ) arg2 = NULL; else if ( PyString_Check(obj1) ) arg2 = PyString_AsString(obj1); else { PyErr_Format(PyExc_TypeError, "expected None or string, %s found", obj1->ob_type->tp_name); return NULL; } } { Py_BEGIN_ALLOW_THREADS result = (int)idmef_data_set_char_string_ref(arg1,(char const *)arg2); Py_END_ALLOW_THREADS } { if ( result < 0 ) { swig_python_raise_exception(result); resultobj = NULL; } else { resultobj = PyInt_FromLong(result); } } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_data_set_char_string_dup(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_data_t *arg1 = (idmef_data_t *) 0 ; char *arg2 = (char *) 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; int result; if (!PyArg_ParseTuple(args,(char *)"OO:idmef_data_set_char_string_dup",&obj0,&obj1)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_data_t, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { if ( obj1 == Py_None ) arg2 = NULL; else if ( PyString_Check(obj1) ) arg2 = PyString_AsString(obj1); else { PyErr_Format(PyExc_TypeError, "expected None or string, %s found", obj1->ob_type->tp_name); return NULL; } } { Py_BEGIN_ALLOW_THREADS result = (int)idmef_data_set_char_string_dup(arg1,(char const *)arg2); Py_END_ALLOW_THREADS } { if ( result < 0 ) { swig_python_raise_exception(result); resultobj = NULL; } else { resultobj = PyInt_FromLong(result); } } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_data_set_char_string_nodup(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_data_t *arg1 = (idmef_data_t *) 0 ; char *arg2 = (char *) 0 ; int res2 ; char *buf2 = 0 ; int alloc2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; int result; if (!PyArg_ParseTuple(args,(char *)"OO:idmef_data_set_char_string_nodup",&obj0,&obj1)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_data_t, SWIG_POINTER_EXCEPTION|0) ) return NULL; } res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "idmef_data_set_char_string_nodup" "', argument " "2"" of type '" "char *""'"); } arg2 = (char *)(buf2); { Py_BEGIN_ALLOW_THREADS result = (int)idmef_data_set_char_string_nodup(arg1,arg2); Py_END_ALLOW_THREADS } { if ( result < 0 ) { swig_python_raise_exception(result); resultobj = NULL; } else { resultobj = PyInt_FromLong(result); } } if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); return resultobj; fail: if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); return NULL; } SWIGINTERN PyObject *_wrap_idmef_data_new_byte_string_ref(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_data_t **arg1 = (idmef_data_t **) 0 ; unsigned char *arg2 = (unsigned char *) 0 ; size_t arg3 ; idmef_data_t *tmp1 ; size_t val3 ; int ecode3 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; int result; { arg1 = (idmef_data_t **) &tmp1; } if (!PyArg_ParseTuple(args,(char *)"OO:idmef_data_new_byte_string_ref",&obj0,&obj1)) SWIG_fail; { if ( PyString_Check(obj0) ) arg2 = (unsigned char *) PyString_AsString(obj0); else { PyErr_Format(PyExc_TypeError, "expected string, %s found", obj0->ob_type->tp_name); return NULL; } } ecode3 = SWIG_AsVal_size_t(obj1, &val3); if (!SWIG_IsOK(ecode3)) { SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "idmef_data_new_byte_string_ref" "', argument " "3"" of type '" "size_t""'"); } arg3 = (size_t)(val3); { Py_BEGIN_ALLOW_THREADS result = (int)idmef_data_new_byte_string_ref(arg1,(unsigned char const *)arg2,arg3); Py_END_ALLOW_THREADS } { if ( result < 0 ) { swig_python_raise_exception(result); resultobj = NULL; } else { resultobj = PyInt_FromLong(result); } } { if ( result >= 0 ) resultobj = SWIG_NewPointerObj((void *) * arg1, SWIGTYPE_p_idmef_data_t, 0); } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_data_new_byte_string_dup(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_data_t **arg1 = (idmef_data_t **) 0 ; unsigned char *arg2 = (unsigned char *) 0 ; size_t arg3 ; idmef_data_t *tmp1 ; size_t val3 ; int ecode3 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; int result; { arg1 = (idmef_data_t **) &tmp1; } if (!PyArg_ParseTuple(args,(char *)"OO:idmef_data_new_byte_string_dup",&obj0,&obj1)) SWIG_fail; { if ( PyString_Check(obj0) ) arg2 = (unsigned char *) PyString_AsString(obj0); else { PyErr_Format(PyExc_TypeError, "expected string, %s found", obj0->ob_type->tp_name); return NULL; } } ecode3 = SWIG_AsVal_size_t(obj1, &val3); if (!SWIG_IsOK(ecode3)) { SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "idmef_data_new_byte_string_dup" "', argument " "3"" of type '" "size_t""'"); } arg3 = (size_t)(val3); { Py_BEGIN_ALLOW_THREADS result = (int)idmef_data_new_byte_string_dup(arg1,(unsigned char const *)arg2,arg3); Py_END_ALLOW_THREADS } { if ( result < 0 ) { swig_python_raise_exception(result); resultobj = NULL; } else { resultobj = PyInt_FromLong(result); } } { if ( result >= 0 ) resultobj = SWIG_NewPointerObj((void *) * arg1, SWIGTYPE_p_idmef_data_t, 0); } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_data_new_byte_string_nodup(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_data_t **arg1 = (idmef_data_t **) 0 ; unsigned char *arg2 = (unsigned char *) 0 ; size_t arg3 ; idmef_data_t *tmp1 ; void *argp2 = 0 ; int res2 = 0 ; size_t val3 ; int ecode3 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; int result; { arg1 = (idmef_data_t **) &tmp1; } if (!PyArg_ParseTuple(args,(char *)"OO:idmef_data_new_byte_string_nodup",&obj0,&obj1)) SWIG_fail; res2 = SWIG_ConvertPtr(obj0, &argp2,SWIGTYPE_p_unsigned_char, 0 | 0 ); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "idmef_data_new_byte_string_nodup" "', argument " "2"" of type '" "unsigned char *""'"); } arg2 = (unsigned char *)(argp2); ecode3 = SWIG_AsVal_size_t(obj1, &val3); if (!SWIG_IsOK(ecode3)) { SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "idmef_data_new_byte_string_nodup" "', argument " "3"" of type '" "size_t""'"); } arg3 = (size_t)(val3); { Py_BEGIN_ALLOW_THREADS result = (int)idmef_data_new_byte_string_nodup(arg1,arg2,arg3); Py_END_ALLOW_THREADS } { if ( result < 0 ) { swig_python_raise_exception(result); resultobj = NULL; } else { resultobj = PyInt_FromLong(result); } } { if ( result >= 0 ) resultobj = SWIG_NewPointerObj((void *) * arg1, SWIGTYPE_p_idmef_data_t, 0); } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_data_set_byte_string_ref(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_data_t *arg1 = (idmef_data_t *) 0 ; unsigned char *arg2 = (unsigned char *) 0 ; size_t arg3 ; size_t val3 ; int ecode3 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; PyObject * obj2 = 0 ; int result; if (!PyArg_ParseTuple(args,(char *)"OOO:idmef_data_set_byte_string_ref",&obj0,&obj1,&obj2)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_data_t, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { if ( PyString_Check(obj1) ) arg2 = (unsigned char *) PyString_AsString(obj1); else { PyErr_Format(PyExc_TypeError, "expected string, %s found", obj1->ob_type->tp_name); return NULL; } } ecode3 = SWIG_AsVal_size_t(obj2, &val3); if (!SWIG_IsOK(ecode3)) { SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "idmef_data_set_byte_string_ref" "', argument " "3"" of type '" "size_t""'"); } arg3 = (size_t)(val3); { Py_BEGIN_ALLOW_THREADS result = (int)idmef_data_set_byte_string_ref(arg1,(unsigned char const *)arg2,arg3); Py_END_ALLOW_THREADS } { if ( result < 0 ) { swig_python_raise_exception(result); resultobj = NULL; } else { resultobj = PyInt_FromLong(result); } } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_data_set_byte_string_dup(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_data_t *arg1 = (idmef_data_t *) 0 ; unsigned char *arg2 = (unsigned char *) 0 ; size_t arg3 ; size_t val3 ; int ecode3 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; PyObject * obj2 = 0 ; int result; if (!PyArg_ParseTuple(args,(char *)"OOO:idmef_data_set_byte_string_dup",&obj0,&obj1,&obj2)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_data_t, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { if ( PyString_Check(obj1) ) arg2 = (unsigned char *) PyString_AsString(obj1); else { PyErr_Format(PyExc_TypeError, "expected string, %s found", obj1->ob_type->tp_name); return NULL; } } ecode3 = SWIG_AsVal_size_t(obj2, &val3); if (!SWIG_IsOK(ecode3)) { SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "idmef_data_set_byte_string_dup" "', argument " "3"" of type '" "size_t""'"); } arg3 = (size_t)(val3); { Py_BEGIN_ALLOW_THREADS result = (int)idmef_data_set_byte_string_dup(arg1,(unsigned char const *)arg2,arg3); Py_END_ALLOW_THREADS } { if ( result < 0 ) { swig_python_raise_exception(result); resultobj = NULL; } else { resultobj = PyInt_FromLong(result); } } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_data_set_byte_string_nodup(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_data_t *arg1 = (idmef_data_t *) 0 ; unsigned char *arg2 = (unsigned char *) 0 ; size_t arg3 ; void *argp2 = 0 ; int res2 = 0 ; size_t val3 ; int ecode3 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; PyObject * obj2 = 0 ; int result; if (!PyArg_ParseTuple(args,(char *)"OOO:idmef_data_set_byte_string_nodup",&obj0,&obj1,&obj2)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_data_t, SWIG_POINTER_EXCEPTION|0) ) return NULL; } res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_unsigned_char, 0 | 0 ); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "idmef_data_set_byte_string_nodup" "', argument " "2"" of type '" "unsigned char *""'"); } arg2 = (unsigned char *)(argp2); ecode3 = SWIG_AsVal_size_t(obj2, &val3); if (!SWIG_IsOK(ecode3)) { SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "idmef_data_set_byte_string_nodup" "', argument " "3"" of type '" "size_t""'"); } arg3 = (size_t)(val3); { Py_BEGIN_ALLOW_THREADS result = (int)idmef_data_set_byte_string_nodup(arg1,arg2,arg3); Py_END_ALLOW_THREADS } { if ( result < 0 ) { swig_python_raise_exception(result); resultobj = NULL; } else { resultobj = PyInt_FromLong(result); } } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_data_destroy(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_data_t *arg1 = (idmef_data_t *) 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:idmef_data_destroy",&obj0)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_data_t, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { Py_BEGIN_ALLOW_THREADS idmef_data_destroy(arg1); Py_END_ALLOW_THREADS } resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_data_copy_ref(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_data_t *arg1 = (idmef_data_t *) 0 ; idmef_data_t *arg2 = (idmef_data_t *) 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; int result; if (!PyArg_ParseTuple(args,(char *)"OO:idmef_data_copy_ref",&obj0,&obj1)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_data_t, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { if ( obj1 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj1, (void **)&arg2, SWIGTYPE_p_idmef_data_t, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { Py_BEGIN_ALLOW_THREADS result = (int)idmef_data_copy_ref((idmef_data_t const *)arg1,arg2); Py_END_ALLOW_THREADS } { if ( result < 0 ) { swig_python_raise_exception(result); resultobj = NULL; } else { resultobj = PyInt_FromLong(result); } } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_data_copy_dup(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_data_t *arg1 = (idmef_data_t *) 0 ; idmef_data_t *arg2 = (idmef_data_t *) 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; int result; if (!PyArg_ParseTuple(args,(char *)"OO:idmef_data_copy_dup",&obj0,&obj1)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_data_t, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { if ( obj1 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj1, (void **)&arg2, SWIGTYPE_p_idmef_data_t, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { Py_BEGIN_ALLOW_THREADS result = (int)idmef_data_copy_dup((idmef_data_t const *)arg1,arg2); Py_END_ALLOW_THREADS } { if ( result < 0 ) { swig_python_raise_exception(result); resultobj = NULL; } else { resultobj = PyInt_FromLong(result); } } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_data_clone(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_data_t *arg1 = (idmef_data_t *) 0 ; idmef_data_t **arg2 = (idmef_data_t **) 0 ; idmef_data_t *tmp2 ; PyObject * obj0 = 0 ; int result; { arg2 = (idmef_data_t **) &tmp2; } if (!PyArg_ParseTuple(args,(char *)"O:idmef_data_clone",&obj0)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_data_t, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { Py_BEGIN_ALLOW_THREADS result = (int)idmef_data_clone((idmef_data_t const *)arg1,arg2); Py_END_ALLOW_THREADS } { if ( result < 0 ) { swig_python_raise_exception(result); resultobj = NULL; } else { resultobj = PyInt_FromLong(result); } } { if ( result >= 0 ) resultobj = SWIG_NewPointerObj((void *) * arg2, SWIGTYPE_p_idmef_data_t, 0); } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_data_get_type(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_data_t *arg1 = (idmef_data_t *) 0 ; PyObject * obj0 = 0 ; idmef_data_type_t result; if (!PyArg_ParseTuple(args,(char *)"O:idmef_data_get_type",&obj0)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_data_t, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { Py_BEGIN_ALLOW_THREADS result = (idmef_data_type_t)idmef_data_get_type((idmef_data_t const *)arg1); Py_END_ALLOW_THREADS } resultobj = SWIG_From_int((int)(result)); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_data_get_len(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_data_t *arg1 = (idmef_data_t *) 0 ; PyObject * obj0 = 0 ; size_t result; if (!PyArg_ParseTuple(args,(char *)"O:idmef_data_get_len",&obj0)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_data_t, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { Py_BEGIN_ALLOW_THREADS result = idmef_data_get_len((idmef_data_t const *)arg1); Py_END_ALLOW_THREADS } resultobj = SWIG_From_size_t((size_t)(result)); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_data_get_data(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_data_t *arg1 = (idmef_data_t *) 0 ; PyObject * obj0 = 0 ; void *result = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:idmef_data_get_data",&obj0)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_data_t, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { Py_BEGIN_ALLOW_THREADS result = (void *)idmef_data_get_data((idmef_data_t const *)arg1); Py_END_ALLOW_THREADS } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_void, 0 | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_data_get_char(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_data_t *arg1 = (idmef_data_t *) 0 ; PyObject * obj0 = 0 ; char result; if (!PyArg_ParseTuple(args,(char *)"O:idmef_data_get_char",&obj0)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_data_t, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { Py_BEGIN_ALLOW_THREADS result = (char)idmef_data_get_char((idmef_data_t const *)arg1); Py_END_ALLOW_THREADS } resultobj = SWIG_From_char((char)(result)); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_data_get_byte(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_data_t *arg1 = (idmef_data_t *) 0 ; PyObject * obj0 = 0 ; uint8_t result; if (!PyArg_ParseTuple(args,(char *)"O:idmef_data_get_byte",&obj0)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_data_t, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { Py_BEGIN_ALLOW_THREADS result = (uint8_t)idmef_data_get_byte((idmef_data_t const *)arg1); Py_END_ALLOW_THREADS } resultobj = SWIG_From_unsigned_SS_char((unsigned char)(result)); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_data_get_uint32(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_data_t *arg1 = (idmef_data_t *) 0 ; PyObject * obj0 = 0 ; uint32_t result; if (!PyArg_ParseTuple(args,(char *)"O:idmef_data_get_uint32",&obj0)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_data_t, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { Py_BEGIN_ALLOW_THREADS result = (uint32_t)idmef_data_get_uint32((idmef_data_t const *)arg1); Py_END_ALLOW_THREADS } { resultobj = PyLong_FromUnsignedLong(result); } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_data_get_uint64(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_data_t *arg1 = (idmef_data_t *) 0 ; PyObject * obj0 = 0 ; uint64_t result; if (!PyArg_ParseTuple(args,(char *)"O:idmef_data_get_uint64",&obj0)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_data_t, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { Py_BEGIN_ALLOW_THREADS result = (uint64_t)idmef_data_get_uint64((idmef_data_t const *)arg1); Py_END_ALLOW_THREADS } resultobj = SWIG_From_unsigned_SS_long_SS_long((unsigned long long)(result)); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_data_get_float(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_data_t *arg1 = (idmef_data_t *) 0 ; PyObject * obj0 = 0 ; float result; if (!PyArg_ParseTuple(args,(char *)"O:idmef_data_get_float",&obj0)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_data_t, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { Py_BEGIN_ALLOW_THREADS result = (float)idmef_data_get_float((idmef_data_t const *)arg1); Py_END_ALLOW_THREADS } resultobj = SWIG_From_float((float)(result)); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_data_get_char_string(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_data_t *arg1 = (idmef_data_t *) 0 ; PyObject * obj0 = 0 ; char *result = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:idmef_data_get_char_string",&obj0)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_data_t, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { Py_BEGIN_ALLOW_THREADS result = (char *)idmef_data_get_char_string((idmef_data_t const *)arg1); Py_END_ALLOW_THREADS } resultobj = SWIG_FromCharPtr((const char *)result); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_data_get_byte_string(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_data_t *arg1 = (idmef_data_t *) 0 ; PyObject * obj0 = 0 ; unsigned char *result = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:idmef_data_get_byte_string",&obj0)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_data_t, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { Py_BEGIN_ALLOW_THREADS result = (unsigned char *)idmef_data_get_byte_string((idmef_data_t const *)arg1); Py_END_ALLOW_THREADS } { if ( result ) resultobj = PyString_FromStringAndSize((char *) result, idmef_data_get_len(arg1)); else resultobj = Py_BuildValue((char *) ""); } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_data_is_empty(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_data_t *arg1 = (idmef_data_t *) 0 ; PyObject * obj0 = 0 ; prelude_bool_t result; if (!PyArg_ParseTuple(args,(char *)"O:idmef_data_is_empty",&obj0)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_data_t, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { Py_BEGIN_ALLOW_THREADS result = (prelude_bool_t)idmef_data_is_empty((idmef_data_t const *)arg1); Py_END_ALLOW_THREADS } resultobj = SWIG_From_int((int)(result)); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_data_to_string(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_data_t *arg1 = (idmef_data_t *) 0 ; prelude_string_t *arg2 = (prelude_string_t *) 0 ; PyObject * obj0 = 0 ; int result; { int ret; ret = prelude_string_new(&(arg2)); if ( ret < 0 ) { swig_python_raise_exception(ret); return NULL; } } if (!PyArg_ParseTuple(args,(char *)"O:idmef_data_to_string",&obj0)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_data_t, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { Py_BEGIN_ALLOW_THREADS result = (int)idmef_data_to_string((idmef_data_t const *)arg1,arg2); Py_END_ALLOW_THREADS } { if ( result < 0 ) { swig_python_raise_exception(result); resultobj = NULL; } else { resultobj = PyInt_FromLong(result); } } { if ( result >= 0 ) resultobj = PyString_FromStringAndSize(prelude_string_get_string(arg2), prelude_string_get_len(arg2)); prelude_string_destroy(arg2); } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_data_destroy_internal(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_data_t *arg1 = (idmef_data_t *) 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:idmef_data_destroy_internal",&obj0)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_data_t, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { Py_BEGIN_ALLOW_THREADS idmef_data_destroy_internal(arg1); Py_END_ALLOW_THREADS } resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_data_compare(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_data_t *arg1 = (idmef_data_t *) 0 ; idmef_data_t *arg2 = (idmef_data_t *) 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; int result; if (!PyArg_ParseTuple(args,(char *)"OO:idmef_data_compare",&obj0,&obj1)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_data_t, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { if ( obj1 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj1, (void **)&arg2, SWIGTYPE_p_idmef_data_t, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { Py_BEGIN_ALLOW_THREADS result = (int)idmef_data_compare((idmef_data_t const *)arg1,(idmef_data_t const *)arg2); Py_END_ALLOW_THREADS } { resultobj = PyInt_FromLong(result); } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_criterion_operator_to_string(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_criterion_operator_t arg1 ; int val1 ; int ecode1 = 0 ; PyObject * obj0 = 0 ; char *result = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:idmef_criterion_operator_to_string",&obj0)) SWIG_fail; ecode1 = SWIG_AsVal_int(obj0, &val1); if (!SWIG_IsOK(ecode1)) { SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "idmef_criterion_operator_to_string" "', argument " "1"" of type '" "idmef_criterion_operator_t""'"); } arg1 = (idmef_criterion_operator_t)(val1); { Py_BEGIN_ALLOW_THREADS result = (char *)idmef_criterion_operator_to_string(arg1); Py_END_ALLOW_THREADS } resultobj = SWIG_FromCharPtr((const char *)result); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_criterion_new(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_criterion_t **arg1 = (idmef_criterion_t **) 0 ; idmef_path_t *arg2 = (idmef_path_t *) 0 ; idmef_criterion_value_t *arg3 = (idmef_criterion_value_t *) 0 ; idmef_criterion_operator_t arg4 ; void *argp1 = 0 ; int res1 = 0 ; void *argp3 = 0 ; int res3 = 0 ; int val4 ; int ecode4 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; PyObject * obj2 = 0 ; PyObject * obj3 = 0 ; int result; if (!PyArg_ParseTuple(args,(char *)"OOOO:idmef_criterion_new",&obj0,&obj1,&obj2,&obj3)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_p_idmef_criterion, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "idmef_criterion_new" "', argument " "1"" of type '" "idmef_criterion_t **""'"); } arg1 = (idmef_criterion_t **)(argp1); { if ( obj1 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj1, (void **)&arg2, SWIGTYPE_p_idmef_path, SWIG_POINTER_EXCEPTION|0) ) return NULL; } res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_idmef_criterion_value_t, 0 | 0 ); if (!SWIG_IsOK(res3)) { SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "idmef_criterion_new" "', argument " "3"" of type '" "idmef_criterion_value_t *""'"); } arg3 = (idmef_criterion_value_t *)(argp3); ecode4 = SWIG_AsVal_int(obj3, &val4); if (!SWIG_IsOK(ecode4)) { SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "idmef_criterion_new" "', argument " "4"" of type '" "idmef_criterion_operator_t""'"); } arg4 = (idmef_criterion_operator_t)(val4); { Py_BEGIN_ALLOW_THREADS result = (int)idmef_criterion_new(arg1,arg2,arg3,arg4); Py_END_ALLOW_THREADS } { if ( result < 0 ) { swig_python_raise_exception(result); resultobj = NULL; } else { resultobj = PyInt_FromLong(result); } } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_criterion_destroy(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_criterion_t *arg1 = (idmef_criterion_t *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:idmef_criterion_destroy",&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_idmef_criterion, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "idmef_criterion_destroy" "', argument " "1"" of type '" "idmef_criterion_t *""'"); } arg1 = (idmef_criterion_t *)(argp1); { Py_BEGIN_ALLOW_THREADS idmef_criterion_destroy(arg1); Py_END_ALLOW_THREADS } resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_criteria_ref(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_criteria_t *arg1 = (idmef_criteria_t *) 0 ; PyObject * obj0 = 0 ; idmef_criteria_t *result = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:idmef_criteria_ref",&obj0)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_criteria, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { Py_BEGIN_ALLOW_THREADS result = (idmef_criteria_t *)idmef_criteria_ref(arg1); Py_END_ALLOW_THREADS } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_idmef_criteria, 0 | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_criterion_clone(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_criterion_t *arg1 = (idmef_criterion_t *) 0 ; idmef_criterion_t **arg2 = (idmef_criterion_t **) 0 ; void *argp1 = 0 ; int res1 = 0 ; void *argp2 = 0 ; int res2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; int result; if (!PyArg_ParseTuple(args,(char *)"OO:idmef_criterion_clone",&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_idmef_criterion, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "idmef_criterion_clone" "', argument " "1"" of type '" "idmef_criterion_t const *""'"); } arg1 = (idmef_criterion_t *)(argp1); res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_p_idmef_criterion, 0 | 0 ); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "idmef_criterion_clone" "', argument " "2"" of type '" "idmef_criterion_t **""'"); } arg2 = (idmef_criterion_t **)(argp2); { Py_BEGIN_ALLOW_THREADS result = (int)idmef_criterion_clone((struct idmef_criterion const *)arg1,arg2); Py_END_ALLOW_THREADS } { if ( result < 0 ) { swig_python_raise_exception(result); resultobj = NULL; } else { resultobj = PyInt_FromLong(result); } } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_criterion_print(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_criterion_t *arg1 = (idmef_criterion_t *) 0 ; prelude_io_t *arg2 = (prelude_io_t *) 0 ; void *argp1 = 0 ; int res1 = 0 ; void *argp2 = 0 ; int res2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; int result; if (!PyArg_ParseTuple(args,(char *)"OO:idmef_criterion_print",&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_idmef_criterion, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "idmef_criterion_print" "', argument " "1"" of type '" "idmef_criterion_t const *""'"); } arg1 = (idmef_criterion_t *)(argp1); res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_prelude_io_t, 0 | 0 ); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "idmef_criterion_print" "', argument " "2"" of type '" "prelude_io_t *""'"); } arg2 = (prelude_io_t *)(argp2); { Py_BEGIN_ALLOW_THREADS result = (int)idmef_criterion_print((struct idmef_criterion const *)arg1,arg2); Py_END_ALLOW_THREADS } { if ( result < 0 ) { swig_python_raise_exception(result); resultobj = NULL; } else { resultobj = PyInt_FromLong(result); } } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_criterion_to_string(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_criterion_t *arg1 = (idmef_criterion_t *) 0 ; prelude_string_t *arg2 = (prelude_string_t *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; int result; { int ret; ret = prelude_string_new(&(arg2)); if ( ret < 0 ) { swig_python_raise_exception(ret); return NULL; } } if (!PyArg_ParseTuple(args,(char *)"O:idmef_criterion_to_string",&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_idmef_criterion, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "idmef_criterion_to_string" "', argument " "1"" of type '" "idmef_criterion_t const *""'"); } arg1 = (idmef_criterion_t *)(argp1); { Py_BEGIN_ALLOW_THREADS result = (int)idmef_criterion_to_string((struct idmef_criterion const *)arg1,arg2); Py_END_ALLOW_THREADS } { if ( result < 0 ) { swig_python_raise_exception(result); resultobj = NULL; } else { resultobj = PyInt_FromLong(result); } } { if ( result >= 0 ) resultobj = PyString_FromStringAndSize(prelude_string_get_string(arg2), prelude_string_get_len(arg2)); prelude_string_destroy(arg2); } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_criterion_get_path(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_criterion_t *arg1 = (idmef_criterion_t *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; idmef_path_t *result = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:idmef_criterion_get_path",&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_idmef_criterion, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "idmef_criterion_get_path" "', argument " "1"" of type '" "idmef_criterion_t const *""'"); } arg1 = (idmef_criterion_t *)(argp1); { Py_BEGIN_ALLOW_THREADS result = (idmef_path_t *)idmef_criterion_get_path((struct idmef_criterion const *)arg1); Py_END_ALLOW_THREADS } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_idmef_path, 0 | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_criterion_get_value(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_criterion_t *arg1 = (idmef_criterion_t *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; idmef_criterion_value_t *result = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:idmef_criterion_get_value",&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_idmef_criterion, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "idmef_criterion_get_value" "', argument " "1"" of type '" "idmef_criterion_t const *""'"); } arg1 = (idmef_criterion_t *)(argp1); { Py_BEGIN_ALLOW_THREADS result = (idmef_criterion_value_t *)idmef_criterion_get_value((struct idmef_criterion const *)arg1); Py_END_ALLOW_THREADS } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_idmef_criterion_value_t, 0 | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_criterion_get_operator(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_criterion_t *arg1 = (idmef_criterion_t *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; idmef_criterion_operator_t result; if (!PyArg_ParseTuple(args,(char *)"O:idmef_criterion_get_operator",&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_idmef_criterion, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "idmef_criterion_get_operator" "', argument " "1"" of type '" "idmef_criterion_t const *""'"); } arg1 = (idmef_criterion_t *)(argp1); { Py_BEGIN_ALLOW_THREADS result = (idmef_criterion_operator_t)idmef_criterion_get_operator((struct idmef_criterion const *)arg1); Py_END_ALLOW_THREADS } resultobj = SWIG_From_int((int)(result)); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_criterion_match(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_criterion_t *arg1 = (idmef_criterion_t *) 0 ; idmef_message_t *arg2 = (idmef_message_t *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; int result; if (!PyArg_ParseTuple(args,(char *)"OO:idmef_criterion_match",&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_idmef_criterion, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "idmef_criterion_match" "', argument " "1"" of type '" "idmef_criterion_t const *""'"); } arg1 = (idmef_criterion_t *)(argp1); { if ( obj1 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj1, (void **)&arg2, SWIGTYPE_p_idmef_message, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { Py_BEGIN_ALLOW_THREADS result = (int)idmef_criterion_match((struct idmef_criterion const *)arg1,arg2); Py_END_ALLOW_THREADS } { if ( result < 0 ) { swig_python_raise_exception(result); resultobj = NULL; } else { resultobj = PyInt_FromLong(result); } } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_criteria_new(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_criteria_t **arg1 = (idmef_criteria_t **) 0 ; idmef_criteria_t *tmp1 ; int result; { arg1 = (idmef_criteria_t **) &tmp1; } if (!PyArg_ParseTuple(args,(char *)":idmef_criteria_new")) SWIG_fail; { Py_BEGIN_ALLOW_THREADS result = (int)idmef_criteria_new(arg1); Py_END_ALLOW_THREADS } { if ( result < 0 ) { swig_python_raise_exception(result); resultobj = NULL; } else { resultobj = PyInt_FromLong(result); } } { if ( result >= 0 ) resultobj = SWIG_NewPointerObj((void *) * arg1, SWIGTYPE_p_idmef_criteria, 0); } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_criteria_destroy(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_criteria_t *arg1 = (idmef_criteria_t *) 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:idmef_criteria_destroy",&obj0)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_criteria, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { Py_BEGIN_ALLOW_THREADS idmef_criteria_destroy(arg1); Py_END_ALLOW_THREADS } resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_criteria_clone(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_criteria_t *arg1 = (idmef_criteria_t *) 0 ; idmef_criteria_t **arg2 = (idmef_criteria_t **) 0 ; idmef_criteria_t *tmp2 ; PyObject * obj0 = 0 ; int result; { arg2 = (idmef_criteria_t **) &tmp2; } if (!PyArg_ParseTuple(args,(char *)"O:idmef_criteria_clone",&obj0)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_criteria, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { Py_BEGIN_ALLOW_THREADS result = (int)idmef_criteria_clone(arg1,arg2); Py_END_ALLOW_THREADS } { if ( result < 0 ) { swig_python_raise_exception(result); resultobj = NULL; } else { resultobj = PyInt_FromLong(result); } } { if ( result >= 0 ) resultobj = SWIG_NewPointerObj((void *) * arg2, SWIGTYPE_p_idmef_criteria, 0); } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_criteria_print(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_criteria_t *arg1 = (idmef_criteria_t *) 0 ; prelude_io_t *arg2 = (prelude_io_t *) 0 ; void *argp2 = 0 ; int res2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; int result; if (!PyArg_ParseTuple(args,(char *)"OO:idmef_criteria_print",&obj0,&obj1)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_criteria, SWIG_POINTER_EXCEPTION|0) ) return NULL; } res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_prelude_io_t, 0 | 0 ); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "idmef_criteria_print" "', argument " "2"" of type '" "prelude_io_t *""'"); } arg2 = (prelude_io_t *)(argp2); { Py_BEGIN_ALLOW_THREADS result = (int)idmef_criteria_print((struct idmef_criteria const *)arg1,arg2); Py_END_ALLOW_THREADS } { if ( result < 0 ) { swig_python_raise_exception(result); resultobj = NULL; } else { resultobj = PyInt_FromLong(result); } } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_criteria_to_string(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_criteria_t *arg1 = (idmef_criteria_t *) 0 ; prelude_string_t *arg2 = (prelude_string_t *) 0 ; PyObject * obj0 = 0 ; int result; { int ret; ret = prelude_string_new(&(arg2)); if ( ret < 0 ) { swig_python_raise_exception(ret); return NULL; } } if (!PyArg_ParseTuple(args,(char *)"O:idmef_criteria_to_string",&obj0)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_criteria, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { Py_BEGIN_ALLOW_THREADS result = (int)idmef_criteria_to_string((struct idmef_criteria const *)arg1,arg2); Py_END_ALLOW_THREADS } { if ( result < 0 ) { swig_python_raise_exception(result); resultobj = NULL; } else { resultobj = PyInt_FromLong(result); } } { if ( result >= 0 ) resultobj = PyString_FromStringAndSize(prelude_string_get_string(arg2), prelude_string_get_len(arg2)); prelude_string_destroy(arg2); } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_criteria_is_criterion(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_criteria_t *arg1 = (idmef_criteria_t *) 0 ; PyObject * obj0 = 0 ; prelude_bool_t result; if (!PyArg_ParseTuple(args,(char *)"O:idmef_criteria_is_criterion",&obj0)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_criteria, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { Py_BEGIN_ALLOW_THREADS result = (prelude_bool_t)idmef_criteria_is_criterion((struct idmef_criteria const *)arg1); Py_END_ALLOW_THREADS } resultobj = SWIG_From_int((int)(result)); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_criteria_get_criterion(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_criteria_t *arg1 = (idmef_criteria_t *) 0 ; PyObject * obj0 = 0 ; idmef_criterion_t *result = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:idmef_criteria_get_criterion",&obj0)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_criteria, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { Py_BEGIN_ALLOW_THREADS result = (idmef_criterion_t *)idmef_criteria_get_criterion((struct idmef_criteria const *)arg1); Py_END_ALLOW_THREADS } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_idmef_criterion, 0 | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_criteria_set_criterion(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_criteria_t *arg1 = (idmef_criteria_t *) 0 ; idmef_criterion_t *arg2 = (idmef_criterion_t *) 0 ; void *argp2 = 0 ; int res2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:idmef_criteria_set_criterion",&obj0,&obj1)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_criteria, SWIG_POINTER_EXCEPTION|0) ) return NULL; } res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_idmef_criterion, 0 | 0 ); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "idmef_criteria_set_criterion" "', argument " "2"" of type '" "idmef_criterion_t *""'"); } arg2 = (idmef_criterion_t *)(argp2); { Py_BEGIN_ALLOW_THREADS idmef_criteria_set_criterion(arg1,arg2); Py_END_ALLOW_THREADS } resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_criteria_or_criteria(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_criteria_t *arg1 = (idmef_criteria_t *) 0 ; idmef_criteria_t *arg2 = (idmef_criteria_t *) 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:idmef_criteria_or_criteria",&obj0,&obj1)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_criteria, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { if ( obj1 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj1, (void **)&arg2, SWIGTYPE_p_idmef_criteria, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { Py_BEGIN_ALLOW_THREADS idmef_criteria_or_criteria(arg1,arg2); Py_END_ALLOW_THREADS } resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_criteria_and_criteria(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_criteria_t *arg1 = (idmef_criteria_t *) 0 ; idmef_criteria_t *arg2 = (idmef_criteria_t *) 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; int result; if (!PyArg_ParseTuple(args,(char *)"OO:idmef_criteria_and_criteria",&obj0,&obj1)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_criteria, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { if ( obj1 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj1, (void **)&arg2, SWIGTYPE_p_idmef_criteria, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { Py_BEGIN_ALLOW_THREADS result = (int)idmef_criteria_and_criteria(arg1,arg2); Py_END_ALLOW_THREADS } { if ( result < 0 ) { swig_python_raise_exception(result); resultobj = NULL; } else { resultobj = PyInt_FromLong(result); } } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_criteria_match(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_criteria_t *arg1 = (idmef_criteria_t *) 0 ; idmef_message_t *arg2 = (idmef_message_t *) 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; int result; if (!PyArg_ParseTuple(args,(char *)"OO:idmef_criteria_match",&obj0,&obj1)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_criteria, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { if ( obj1 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj1, (void **)&arg2, SWIGTYPE_p_idmef_message, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { Py_BEGIN_ALLOW_THREADS result = (int)idmef_criteria_match((struct idmef_criteria const *)arg1,arg2); Py_END_ALLOW_THREADS } { if ( result < 0 ) { swig_python_raise_exception(result); resultobj = NULL; } else { resultobj = PyInt_FromLong(result); } } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_criteria_get_or(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_criteria_t *arg1 = (idmef_criteria_t *) 0 ; PyObject * obj0 = 0 ; idmef_criteria_t *result = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:idmef_criteria_get_or",&obj0)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_criteria, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { Py_BEGIN_ALLOW_THREADS result = (idmef_criteria_t *)idmef_criteria_get_or((struct idmef_criteria const *)arg1); Py_END_ALLOW_THREADS } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_idmef_criteria, 0 | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_criteria_get_and(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_criteria_t *arg1 = (idmef_criteria_t *) 0 ; PyObject * obj0 = 0 ; idmef_criteria_t *result = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:idmef_criteria_get_and",&obj0)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_criteria, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { Py_BEGIN_ALLOW_THREADS result = (idmef_criteria_t *)idmef_criteria_get_and((struct idmef_criteria const *)arg1); Py_END_ALLOW_THREADS } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_idmef_criteria, 0 | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_criteria_new_from_string(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_criteria_t **arg1 = (idmef_criteria_t **) 0 ; char *arg2 = (char *) 0 ; idmef_criteria_t *tmp1 ; PyObject * obj0 = 0 ; int result; { arg1 = (idmef_criteria_t **) &tmp1; } if (!PyArg_ParseTuple(args,(char *)"O:idmef_criteria_new_from_string",&obj0)) SWIG_fail; { if ( obj0 == Py_None ) arg2 = NULL; else if ( PyString_Check(obj0) ) arg2 = PyString_AsString(obj0); else { PyErr_Format(PyExc_TypeError, "expected None or string, %s found", obj0->ob_type->tp_name); return NULL; } } { Py_BEGIN_ALLOW_THREADS result = (int)idmef_criteria_new_from_string(arg1,(char const *)arg2); Py_END_ALLOW_THREADS } { if ( result < 0 ) { swig_python_raise_exception(result); resultobj = NULL; } else { resultobj = PyInt_FromLong(result); } } { if ( result >= 0 ) resultobj = SWIG_NewPointerObj((void *) * arg1, SWIGTYPE_p_idmef_criteria, 0); } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_criteria_set_negation(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_criteria_t *arg1 = (idmef_criteria_t *) 0 ; prelude_bool_t arg2 ; int val2 ; int ecode2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:idmef_criteria_set_negation",&obj0,&obj1)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_criteria, SWIG_POINTER_EXCEPTION|0) ) return NULL; } ecode2 = SWIG_AsVal_int(obj1, &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "idmef_criteria_set_negation" "', argument " "2"" of type '" "prelude_bool_t""'"); } arg2 = (prelude_bool_t)(val2); { Py_BEGIN_ALLOW_THREADS idmef_criteria_set_negation(arg1,arg2); Py_END_ALLOW_THREADS } resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_criteria_get_negation(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_criteria_t *arg1 = (idmef_criteria_t *) 0 ; PyObject * obj0 = 0 ; prelude_bool_t result; if (!PyArg_ParseTuple(args,(char *)"O:idmef_criteria_get_negation",&obj0)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_criteria, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { Py_BEGIN_ALLOW_THREADS result = (prelude_bool_t)idmef_criteria_get_negation((struct idmef_criteria const *)arg1); Py_END_ALLOW_THREADS } resultobj = SWIG_From_int((int)(result)); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_additional_data_read(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_additional_data_t *arg1 = (idmef_additional_data_t *) 0 ; prelude_msg_t *arg2 = (prelude_msg_t *) 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; int result; if (!PyArg_ParseTuple(args,(char *)"OO:idmef_additional_data_read",&obj0,&obj1)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_additional_data, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { if ( obj1 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj1, (void **)&arg2, SWIGTYPE_p_prelude_msg, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { Py_BEGIN_ALLOW_THREADS result = (int)idmef_additional_data_read(arg1,arg2); Py_END_ALLOW_THREADS } { if ( result < 0 ) { swig_python_raise_exception(result); resultobj = NULL; } else { resultobj = PyInt_FromLong(result); } } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_reference_read(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_reference_t *arg1 = (idmef_reference_t *) 0 ; prelude_msg_t *arg2 = (prelude_msg_t *) 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; int result; if (!PyArg_ParseTuple(args,(char *)"OO:idmef_reference_read",&obj0,&obj1)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_reference, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { if ( obj1 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj1, (void **)&arg2, SWIGTYPE_p_prelude_msg, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { Py_BEGIN_ALLOW_THREADS result = (int)idmef_reference_read(arg1,arg2); Py_END_ALLOW_THREADS } { if ( result < 0 ) { swig_python_raise_exception(result); resultobj = NULL; } else { resultobj = PyInt_FromLong(result); } } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_classification_read(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_classification_t *arg1 = (idmef_classification_t *) 0 ; prelude_msg_t *arg2 = (prelude_msg_t *) 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; int result; if (!PyArg_ParseTuple(args,(char *)"OO:idmef_classification_read",&obj0,&obj1)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_classification, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { if ( obj1 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj1, (void **)&arg2, SWIGTYPE_p_prelude_msg, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { Py_BEGIN_ALLOW_THREADS result = (int)idmef_classification_read(arg1,arg2); Py_END_ALLOW_THREADS } { if ( result < 0 ) { swig_python_raise_exception(result); resultobj = NULL; } else { resultobj = PyInt_FromLong(result); } } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_user_id_read(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_user_id_t *arg1 = (idmef_user_id_t *) 0 ; prelude_msg_t *arg2 = (prelude_msg_t *) 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; int result; if (!PyArg_ParseTuple(args,(char *)"OO:idmef_user_id_read",&obj0,&obj1)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_user_id, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { if ( obj1 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj1, (void **)&arg2, SWIGTYPE_p_prelude_msg, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { Py_BEGIN_ALLOW_THREADS result = (int)idmef_user_id_read(arg1,arg2); Py_END_ALLOW_THREADS } { if ( result < 0 ) { swig_python_raise_exception(result); resultobj = NULL; } else { resultobj = PyInt_FromLong(result); } } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_user_read(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_user_t *arg1 = (idmef_user_t *) 0 ; prelude_msg_t *arg2 = (prelude_msg_t *) 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; int result; if (!PyArg_ParseTuple(args,(char *)"OO:idmef_user_read",&obj0,&obj1)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_user, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { if ( obj1 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj1, (void **)&arg2, SWIGTYPE_p_prelude_msg, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { Py_BEGIN_ALLOW_THREADS result = (int)idmef_user_read(arg1,arg2); Py_END_ALLOW_THREADS } { if ( result < 0 ) { swig_python_raise_exception(result); resultobj = NULL; } else { resultobj = PyInt_FromLong(result); } } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_address_read(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_address_t *arg1 = (idmef_address_t *) 0 ; prelude_msg_t *arg2 = (prelude_msg_t *) 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; int result; if (!PyArg_ParseTuple(args,(char *)"OO:idmef_address_read",&obj0,&obj1)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_address, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { if ( obj1 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj1, (void **)&arg2, SWIGTYPE_p_prelude_msg, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { Py_BEGIN_ALLOW_THREADS result = (int)idmef_address_read(arg1,arg2); Py_END_ALLOW_THREADS } { if ( result < 0 ) { swig_python_raise_exception(result); resultobj = NULL; } else { resultobj = PyInt_FromLong(result); } } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_process_read(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_process_t *arg1 = (idmef_process_t *) 0 ; prelude_msg_t *arg2 = (prelude_msg_t *) 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; int result; if (!PyArg_ParseTuple(args,(char *)"OO:idmef_process_read",&obj0,&obj1)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_process, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { if ( obj1 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj1, (void **)&arg2, SWIGTYPE_p_prelude_msg, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { Py_BEGIN_ALLOW_THREADS result = (int)idmef_process_read(arg1,arg2); Py_END_ALLOW_THREADS } { if ( result < 0 ) { swig_python_raise_exception(result); resultobj = NULL; } else { resultobj = PyInt_FromLong(result); } } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_web_service_read(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_web_service_t *arg1 = (idmef_web_service_t *) 0 ; prelude_msg_t *arg2 = (prelude_msg_t *) 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; int result; if (!PyArg_ParseTuple(args,(char *)"OO:idmef_web_service_read",&obj0,&obj1)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_web_service, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { if ( obj1 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj1, (void **)&arg2, SWIGTYPE_p_prelude_msg, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { Py_BEGIN_ALLOW_THREADS result = (int)idmef_web_service_read(arg1,arg2); Py_END_ALLOW_THREADS } { if ( result < 0 ) { swig_python_raise_exception(result); resultobj = NULL; } else { resultobj = PyInt_FromLong(result); } } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_snmp_service_read(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_snmp_service_t *arg1 = (idmef_snmp_service_t *) 0 ; prelude_msg_t *arg2 = (prelude_msg_t *) 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; int result; if (!PyArg_ParseTuple(args,(char *)"OO:idmef_snmp_service_read",&obj0,&obj1)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_snmp_service, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { if ( obj1 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj1, (void **)&arg2, SWIGTYPE_p_prelude_msg, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { Py_BEGIN_ALLOW_THREADS result = (int)idmef_snmp_service_read(arg1,arg2); Py_END_ALLOW_THREADS } { if ( result < 0 ) { swig_python_raise_exception(result); resultobj = NULL; } else { resultobj = PyInt_FromLong(result); } } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_service_read(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_service_t *arg1 = (idmef_service_t *) 0 ; prelude_msg_t *arg2 = (prelude_msg_t *) 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; int result; if (!PyArg_ParseTuple(args,(char *)"OO:idmef_service_read",&obj0,&obj1)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_service, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { if ( obj1 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj1, (void **)&arg2, SWIGTYPE_p_prelude_msg, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { Py_BEGIN_ALLOW_THREADS result = (int)idmef_service_read(arg1,arg2); Py_END_ALLOW_THREADS } { if ( result < 0 ) { swig_python_raise_exception(result); resultobj = NULL; } else { resultobj = PyInt_FromLong(result); } } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_node_read(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_node_t *arg1 = (idmef_node_t *) 0 ; prelude_msg_t *arg2 = (prelude_msg_t *) 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; int result; if (!PyArg_ParseTuple(args,(char *)"OO:idmef_node_read",&obj0,&obj1)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_node, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { if ( obj1 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj1, (void **)&arg2, SWIGTYPE_p_prelude_msg, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { Py_BEGIN_ALLOW_THREADS result = (int)idmef_node_read(arg1,arg2); Py_END_ALLOW_THREADS } { if ( result < 0 ) { swig_python_raise_exception(result); resultobj = NULL; } else { resultobj = PyInt_FromLong(result); } } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_source_read(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_source_t *arg1 = (idmef_source_t *) 0 ; prelude_msg_t *arg2 = (prelude_msg_t *) 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; int result; if (!PyArg_ParseTuple(args,(char *)"OO:idmef_source_read",&obj0,&obj1)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_source, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { if ( obj1 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj1, (void **)&arg2, SWIGTYPE_p_prelude_msg, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { Py_BEGIN_ALLOW_THREADS result = (int)idmef_source_read(arg1,arg2); Py_END_ALLOW_THREADS } { if ( result < 0 ) { swig_python_raise_exception(result); resultobj = NULL; } else { resultobj = PyInt_FromLong(result); } } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_file_access_read(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_file_access_t *arg1 = (idmef_file_access_t *) 0 ; prelude_msg_t *arg2 = (prelude_msg_t *) 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; int result; if (!PyArg_ParseTuple(args,(char *)"OO:idmef_file_access_read",&obj0,&obj1)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_file_access, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { if ( obj1 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj1, (void **)&arg2, SWIGTYPE_p_prelude_msg, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { Py_BEGIN_ALLOW_THREADS result = (int)idmef_file_access_read(arg1,arg2); Py_END_ALLOW_THREADS } { if ( result < 0 ) { swig_python_raise_exception(result); resultobj = NULL; } else { resultobj = PyInt_FromLong(result); } } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_inode_read(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_inode_t *arg1 = (idmef_inode_t *) 0 ; prelude_msg_t *arg2 = (prelude_msg_t *) 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; int result; if (!PyArg_ParseTuple(args,(char *)"OO:idmef_inode_read",&obj0,&obj1)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_inode, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { if ( obj1 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj1, (void **)&arg2, SWIGTYPE_p_prelude_msg, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { Py_BEGIN_ALLOW_THREADS result = (int)idmef_inode_read(arg1,arg2); Py_END_ALLOW_THREADS } { if ( result < 0 ) { swig_python_raise_exception(result); resultobj = NULL; } else { resultobj = PyInt_FromLong(result); } } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_checksum_read(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_checksum_t *arg1 = (idmef_checksum_t *) 0 ; prelude_msg_t *arg2 = (prelude_msg_t *) 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; int result; if (!PyArg_ParseTuple(args,(char *)"OO:idmef_checksum_read",&obj0,&obj1)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_checksum, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { if ( obj1 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj1, (void **)&arg2, SWIGTYPE_p_prelude_msg, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { Py_BEGIN_ALLOW_THREADS result = (int)idmef_checksum_read(arg1,arg2); Py_END_ALLOW_THREADS } { if ( result < 0 ) { swig_python_raise_exception(result); resultobj = NULL; } else { resultobj = PyInt_FromLong(result); } } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_file_read(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_file_t *arg1 = (idmef_file_t *) 0 ; prelude_msg_t *arg2 = (prelude_msg_t *) 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; int result; if (!PyArg_ParseTuple(args,(char *)"OO:idmef_file_read",&obj0,&obj1)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_file, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { if ( obj1 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj1, (void **)&arg2, SWIGTYPE_p_prelude_msg, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { Py_BEGIN_ALLOW_THREADS result = (int)idmef_file_read(arg1,arg2); Py_END_ALLOW_THREADS } { if ( result < 0 ) { swig_python_raise_exception(result); resultobj = NULL; } else { resultobj = PyInt_FromLong(result); } } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_linkage_read(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_linkage_t *arg1 = (idmef_linkage_t *) 0 ; prelude_msg_t *arg2 = (prelude_msg_t *) 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; int result; if (!PyArg_ParseTuple(args,(char *)"OO:idmef_linkage_read",&obj0,&obj1)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_linkage, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { if ( obj1 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj1, (void **)&arg2, SWIGTYPE_p_prelude_msg, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { Py_BEGIN_ALLOW_THREADS result = (int)idmef_linkage_read(arg1,arg2); Py_END_ALLOW_THREADS } { if ( result < 0 ) { swig_python_raise_exception(result); resultobj = NULL; } else { resultobj = PyInt_FromLong(result); } } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_target_read(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_target_t *arg1 = (idmef_target_t *) 0 ; prelude_msg_t *arg2 = (prelude_msg_t *) 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; int result; if (!PyArg_ParseTuple(args,(char *)"OO:idmef_target_read",&obj0,&obj1)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_target, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { if ( obj1 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj1, (void **)&arg2, SWIGTYPE_p_prelude_msg, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { Py_BEGIN_ALLOW_THREADS result = (int)idmef_target_read(arg1,arg2); Py_END_ALLOW_THREADS } { if ( result < 0 ) { swig_python_raise_exception(result); resultobj = NULL; } else { resultobj = PyInt_FromLong(result); } } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_analyzer_read(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_analyzer_t *arg1 = (idmef_analyzer_t *) 0 ; prelude_msg_t *arg2 = (prelude_msg_t *) 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; int result; if (!PyArg_ParseTuple(args,(char *)"OO:idmef_analyzer_read",&obj0,&obj1)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_analyzer, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { if ( obj1 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj1, (void **)&arg2, SWIGTYPE_p_prelude_msg, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { Py_BEGIN_ALLOW_THREADS result = (int)idmef_analyzer_read(arg1,arg2); Py_END_ALLOW_THREADS } { if ( result < 0 ) { swig_python_raise_exception(result); resultobj = NULL; } else { resultobj = PyInt_FromLong(result); } } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_alertident_read(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_alertident_t *arg1 = (idmef_alertident_t *) 0 ; prelude_msg_t *arg2 = (prelude_msg_t *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; int result; if (!PyArg_ParseTuple(args,(char *)"OO:idmef_alertident_read",&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_idmef_alertident, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "idmef_alertident_read" "', argument " "1"" of type '" "idmef_alertident_t *""'"); } arg1 = (idmef_alertident_t *)(argp1); { if ( obj1 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj1, (void **)&arg2, SWIGTYPE_p_prelude_msg, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { Py_BEGIN_ALLOW_THREADS result = (int)idmef_alertident_read(arg1,arg2); Py_END_ALLOW_THREADS } { if ( result < 0 ) { swig_python_raise_exception(result); resultobj = NULL; } else { resultobj = PyInt_FromLong(result); } } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_impact_read(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_impact_t *arg1 = (idmef_impact_t *) 0 ; prelude_msg_t *arg2 = (prelude_msg_t *) 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; int result; if (!PyArg_ParseTuple(args,(char *)"OO:idmef_impact_read",&obj0,&obj1)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_impact, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { if ( obj1 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj1, (void **)&arg2, SWIGTYPE_p_prelude_msg, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { Py_BEGIN_ALLOW_THREADS result = (int)idmef_impact_read(arg1,arg2); Py_END_ALLOW_THREADS } { if ( result < 0 ) { swig_python_raise_exception(result); resultobj = NULL; } else { resultobj = PyInt_FromLong(result); } } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_action_read(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_action_t *arg1 = (idmef_action_t *) 0 ; prelude_msg_t *arg2 = (prelude_msg_t *) 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; int result; if (!PyArg_ParseTuple(args,(char *)"OO:idmef_action_read",&obj0,&obj1)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_action, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { if ( obj1 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj1, (void **)&arg2, SWIGTYPE_p_prelude_msg, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { Py_BEGIN_ALLOW_THREADS result = (int)idmef_action_read(arg1,arg2); Py_END_ALLOW_THREADS } { if ( result < 0 ) { swig_python_raise_exception(result); resultobj = NULL; } else { resultobj = PyInt_FromLong(result); } } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_confidence_read(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_confidence_t *arg1 = (idmef_confidence_t *) 0 ; prelude_msg_t *arg2 = (prelude_msg_t *) 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; int result; if (!PyArg_ParseTuple(args,(char *)"OO:idmef_confidence_read",&obj0,&obj1)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_confidence, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { if ( obj1 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj1, (void **)&arg2, SWIGTYPE_p_prelude_msg, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { Py_BEGIN_ALLOW_THREADS result = (int)idmef_confidence_read(arg1,arg2); Py_END_ALLOW_THREADS } { if ( result < 0 ) { swig_python_raise_exception(result); resultobj = NULL; } else { resultobj = PyInt_FromLong(result); } } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_assessment_read(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_assessment_t *arg1 = (idmef_assessment_t *) 0 ; prelude_msg_t *arg2 = (prelude_msg_t *) 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; int result; if (!PyArg_ParseTuple(args,(char *)"OO:idmef_assessment_read",&obj0,&obj1)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_assessment, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { if ( obj1 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj1, (void **)&arg2, SWIGTYPE_p_prelude_msg, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { Py_BEGIN_ALLOW_THREADS result = (int)idmef_assessment_read(arg1,arg2); Py_END_ALLOW_THREADS } { if ( result < 0 ) { swig_python_raise_exception(result); resultobj = NULL; } else { resultobj = PyInt_FromLong(result); } } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_tool_alert_read(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_tool_alert_t *arg1 = (idmef_tool_alert_t *) 0 ; prelude_msg_t *arg2 = (prelude_msg_t *) 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; int result; if (!PyArg_ParseTuple(args,(char *)"OO:idmef_tool_alert_read",&obj0,&obj1)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_tool_alert, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { if ( obj1 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj1, (void **)&arg2, SWIGTYPE_p_prelude_msg, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { Py_BEGIN_ALLOW_THREADS result = (int)idmef_tool_alert_read(arg1,arg2); Py_END_ALLOW_THREADS } { if ( result < 0 ) { swig_python_raise_exception(result); resultobj = NULL; } else { resultobj = PyInt_FromLong(result); } } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_correlation_alert_read(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_correlation_alert_t *arg1 = (idmef_correlation_alert_t *) 0 ; prelude_msg_t *arg2 = (prelude_msg_t *) 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; int result; if (!PyArg_ParseTuple(args,(char *)"OO:idmef_correlation_alert_read",&obj0,&obj1)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_correlation_alert, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { if ( obj1 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj1, (void **)&arg2, SWIGTYPE_p_prelude_msg, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { Py_BEGIN_ALLOW_THREADS result = (int)idmef_correlation_alert_read(arg1,arg2); Py_END_ALLOW_THREADS } { if ( result < 0 ) { swig_python_raise_exception(result); resultobj = NULL; } else { resultobj = PyInt_FromLong(result); } } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_overflow_alert_read(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_overflow_alert_t *arg1 = (idmef_overflow_alert_t *) 0 ; prelude_msg_t *arg2 = (prelude_msg_t *) 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; int result; if (!PyArg_ParseTuple(args,(char *)"OO:idmef_overflow_alert_read",&obj0,&obj1)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_overflow_alert, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { if ( obj1 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj1, (void **)&arg2, SWIGTYPE_p_prelude_msg, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { Py_BEGIN_ALLOW_THREADS result = (int)idmef_overflow_alert_read(arg1,arg2); Py_END_ALLOW_THREADS } { if ( result < 0 ) { swig_python_raise_exception(result); resultobj = NULL; } else { resultobj = PyInt_FromLong(result); } } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_alert_read(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_alert_t *arg1 = (idmef_alert_t *) 0 ; prelude_msg_t *arg2 = (prelude_msg_t *) 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; int result; if (!PyArg_ParseTuple(args,(char *)"OO:idmef_alert_read",&obj0,&obj1)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_alert, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { if ( obj1 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj1, (void **)&arg2, SWIGTYPE_p_prelude_msg, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { Py_BEGIN_ALLOW_THREADS result = (int)idmef_alert_read(arg1,arg2); Py_END_ALLOW_THREADS } { if ( result < 0 ) { swig_python_raise_exception(result); resultobj = NULL; } else { resultobj = PyInt_FromLong(result); } } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_heartbeat_read(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_heartbeat_t *arg1 = (idmef_heartbeat_t *) 0 ; prelude_msg_t *arg2 = (prelude_msg_t *) 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; int result; if (!PyArg_ParseTuple(args,(char *)"OO:idmef_heartbeat_read",&obj0,&obj1)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_heartbeat, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { if ( obj1 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj1, (void **)&arg2, SWIGTYPE_p_prelude_msg, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { Py_BEGIN_ALLOW_THREADS result = (int)idmef_heartbeat_read(arg1,arg2); Py_END_ALLOW_THREADS } { if ( result < 0 ) { swig_python_raise_exception(result); resultobj = NULL; } else { resultobj = PyInt_FromLong(result); } } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_message_read(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_message_t *arg1 = (idmef_message_t *) 0 ; prelude_msg_t *arg2 = (prelude_msg_t *) 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; int result; if (!PyArg_ParseTuple(args,(char *)"OO:idmef_message_read",&obj0,&obj1)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_message, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { if ( obj1 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj1, (void **)&arg2, SWIGTYPE_p_prelude_msg, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { Py_BEGIN_ALLOW_THREADS result = (int)idmef_message_read(arg1,arg2); Py_END_ALLOW_THREADS } { if ( result < 0 ) { swig_python_raise_exception(result); resultobj = NULL; } else { resultobj = PyInt_FromLong(result); } } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_additional_data_write(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_additional_data_t *arg1 = (idmef_additional_data_t *) 0 ; prelude_msgbuf_t *arg2 = (prelude_msgbuf_t *) 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; int result; if (!PyArg_ParseTuple(args,(char *)"OO:idmef_additional_data_write",&obj0,&obj1)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_additional_data, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { if ( obj1 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj1, (void **)&arg2, SWIGTYPE_p_prelude_msgbuf, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { Py_BEGIN_ALLOW_THREADS result = (int)idmef_additional_data_write(arg1,arg2); Py_END_ALLOW_THREADS } { if ( result < 0 ) { swig_python_raise_exception(result); resultobj = NULL; } else { resultobj = PyInt_FromLong(result); } } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_reference_write(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_reference_t *arg1 = (idmef_reference_t *) 0 ; prelude_msgbuf_t *arg2 = (prelude_msgbuf_t *) 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; int result; if (!PyArg_ParseTuple(args,(char *)"OO:idmef_reference_write",&obj0,&obj1)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_reference, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { if ( obj1 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj1, (void **)&arg2, SWIGTYPE_p_prelude_msgbuf, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { Py_BEGIN_ALLOW_THREADS result = (int)idmef_reference_write(arg1,arg2); Py_END_ALLOW_THREADS } { if ( result < 0 ) { swig_python_raise_exception(result); resultobj = NULL; } else { resultobj = PyInt_FromLong(result); } } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_classification_write(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_classification_t *arg1 = (idmef_classification_t *) 0 ; prelude_msgbuf_t *arg2 = (prelude_msgbuf_t *) 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; int result; if (!PyArg_ParseTuple(args,(char *)"OO:idmef_classification_write",&obj0,&obj1)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_classification, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { if ( obj1 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj1, (void **)&arg2, SWIGTYPE_p_prelude_msgbuf, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { Py_BEGIN_ALLOW_THREADS result = (int)idmef_classification_write(arg1,arg2); Py_END_ALLOW_THREADS } { if ( result < 0 ) { swig_python_raise_exception(result); resultobj = NULL; } else { resultobj = PyInt_FromLong(result); } } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_user_id_write(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_user_id_t *arg1 = (idmef_user_id_t *) 0 ; prelude_msgbuf_t *arg2 = (prelude_msgbuf_t *) 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; int result; if (!PyArg_ParseTuple(args,(char *)"OO:idmef_user_id_write",&obj0,&obj1)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_user_id, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { if ( obj1 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj1, (void **)&arg2, SWIGTYPE_p_prelude_msgbuf, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { Py_BEGIN_ALLOW_THREADS result = (int)idmef_user_id_write(arg1,arg2); Py_END_ALLOW_THREADS } { if ( result < 0 ) { swig_python_raise_exception(result); resultobj = NULL; } else { resultobj = PyInt_FromLong(result); } } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_user_write(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_user_t *arg1 = (idmef_user_t *) 0 ; prelude_msgbuf_t *arg2 = (prelude_msgbuf_t *) 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; int result; if (!PyArg_ParseTuple(args,(char *)"OO:idmef_user_write",&obj0,&obj1)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_user, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { if ( obj1 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj1, (void **)&arg2, SWIGTYPE_p_prelude_msgbuf, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { Py_BEGIN_ALLOW_THREADS result = (int)idmef_user_write(arg1,arg2); Py_END_ALLOW_THREADS } { if ( result < 0 ) { swig_python_raise_exception(result); resultobj = NULL; } else { resultobj = PyInt_FromLong(result); } } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_address_write(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_address_t *arg1 = (idmef_address_t *) 0 ; prelude_msgbuf_t *arg2 = (prelude_msgbuf_t *) 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; int result; if (!PyArg_ParseTuple(args,(char *)"OO:idmef_address_write",&obj0,&obj1)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_address, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { if ( obj1 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj1, (void **)&arg2, SWIGTYPE_p_prelude_msgbuf, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { Py_BEGIN_ALLOW_THREADS result = (int)idmef_address_write(arg1,arg2); Py_END_ALLOW_THREADS } { if ( result < 0 ) { swig_python_raise_exception(result); resultobj = NULL; } else { resultobj = PyInt_FromLong(result); } } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_process_write(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_process_t *arg1 = (idmef_process_t *) 0 ; prelude_msgbuf_t *arg2 = (prelude_msgbuf_t *) 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; int result; if (!PyArg_ParseTuple(args,(char *)"OO:idmef_process_write",&obj0,&obj1)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_process, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { if ( obj1 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj1, (void **)&arg2, SWIGTYPE_p_prelude_msgbuf, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { Py_BEGIN_ALLOW_THREADS result = (int)idmef_process_write(arg1,arg2); Py_END_ALLOW_THREADS } { if ( result < 0 ) { swig_python_raise_exception(result); resultobj = NULL; } else { resultobj = PyInt_FromLong(result); } } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_web_service_write(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_web_service_t *arg1 = (idmef_web_service_t *) 0 ; prelude_msgbuf_t *arg2 = (prelude_msgbuf_t *) 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; int result; if (!PyArg_ParseTuple(args,(char *)"OO:idmef_web_service_write",&obj0,&obj1)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_web_service, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { if ( obj1 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj1, (void **)&arg2, SWIGTYPE_p_prelude_msgbuf, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { Py_BEGIN_ALLOW_THREADS result = (int)idmef_web_service_write(arg1,arg2); Py_END_ALLOW_THREADS } { if ( result < 0 ) { swig_python_raise_exception(result); resultobj = NULL; } else { resultobj = PyInt_FromLong(result); } } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_snmp_service_write(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_snmp_service_t *arg1 = (idmef_snmp_service_t *) 0 ; prelude_msgbuf_t *arg2 = (prelude_msgbuf_t *) 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; int result; if (!PyArg_ParseTuple(args,(char *)"OO:idmef_snmp_service_write",&obj0,&obj1)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_snmp_service, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { if ( obj1 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj1, (void **)&arg2, SWIGTYPE_p_prelude_msgbuf, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { Py_BEGIN_ALLOW_THREADS result = (int)idmef_snmp_service_write(arg1,arg2); Py_END_ALLOW_THREADS } { if ( result < 0 ) { swig_python_raise_exception(result); resultobj = NULL; } else { resultobj = PyInt_FromLong(result); } } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_service_write(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_service_t *arg1 = (idmef_service_t *) 0 ; prelude_msgbuf_t *arg2 = (prelude_msgbuf_t *) 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; int result; if (!PyArg_ParseTuple(args,(char *)"OO:idmef_service_write",&obj0,&obj1)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_service, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { if ( obj1 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj1, (void **)&arg2, SWIGTYPE_p_prelude_msgbuf, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { Py_BEGIN_ALLOW_THREADS result = (int)idmef_service_write(arg1,arg2); Py_END_ALLOW_THREADS } { if ( result < 0 ) { swig_python_raise_exception(result); resultobj = NULL; } else { resultobj = PyInt_FromLong(result); } } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_node_write(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_node_t *arg1 = (idmef_node_t *) 0 ; prelude_msgbuf_t *arg2 = (prelude_msgbuf_t *) 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; int result; if (!PyArg_ParseTuple(args,(char *)"OO:idmef_node_write",&obj0,&obj1)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_node, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { if ( obj1 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj1, (void **)&arg2, SWIGTYPE_p_prelude_msgbuf, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { Py_BEGIN_ALLOW_THREADS result = (int)idmef_node_write(arg1,arg2); Py_END_ALLOW_THREADS } { if ( result < 0 ) { swig_python_raise_exception(result); resultobj = NULL; } else { resultobj = PyInt_FromLong(result); } } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_source_write(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_source_t *arg1 = (idmef_source_t *) 0 ; prelude_msgbuf_t *arg2 = (prelude_msgbuf_t *) 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; int result; if (!PyArg_ParseTuple(args,(char *)"OO:idmef_source_write",&obj0,&obj1)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_source, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { if ( obj1 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj1, (void **)&arg2, SWIGTYPE_p_prelude_msgbuf, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { Py_BEGIN_ALLOW_THREADS result = (int)idmef_source_write(arg1,arg2); Py_END_ALLOW_THREADS } { if ( result < 0 ) { swig_python_raise_exception(result); resultobj = NULL; } else { resultobj = PyInt_FromLong(result); } } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_file_access_write(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_file_access_t *arg1 = (idmef_file_access_t *) 0 ; prelude_msgbuf_t *arg2 = (prelude_msgbuf_t *) 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; int result; if (!PyArg_ParseTuple(args,(char *)"OO:idmef_file_access_write",&obj0,&obj1)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_file_access, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { if ( obj1 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj1, (void **)&arg2, SWIGTYPE_p_prelude_msgbuf, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { Py_BEGIN_ALLOW_THREADS result = (int)idmef_file_access_write(arg1,arg2); Py_END_ALLOW_THREADS } { if ( result < 0 ) { swig_python_raise_exception(result); resultobj = NULL; } else { resultobj = PyInt_FromLong(result); } } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_inode_write(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_inode_t *arg1 = (idmef_inode_t *) 0 ; prelude_msgbuf_t *arg2 = (prelude_msgbuf_t *) 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; int result; if (!PyArg_ParseTuple(args,(char *)"OO:idmef_inode_write",&obj0,&obj1)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_inode, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { if ( obj1 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj1, (void **)&arg2, SWIGTYPE_p_prelude_msgbuf, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { Py_BEGIN_ALLOW_THREADS result = (int)idmef_inode_write(arg1,arg2); Py_END_ALLOW_THREADS } { if ( result < 0 ) { swig_python_raise_exception(result); resultobj = NULL; } else { resultobj = PyInt_FromLong(result); } } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_checksum_write(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_checksum_t *arg1 = (idmef_checksum_t *) 0 ; prelude_msgbuf_t *arg2 = (prelude_msgbuf_t *) 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; int result; if (!PyArg_ParseTuple(args,(char *)"OO:idmef_checksum_write",&obj0,&obj1)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_checksum, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { if ( obj1 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj1, (void **)&arg2, SWIGTYPE_p_prelude_msgbuf, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { Py_BEGIN_ALLOW_THREADS result = (int)idmef_checksum_write(arg1,arg2); Py_END_ALLOW_THREADS } { if ( result < 0 ) { swig_python_raise_exception(result); resultobj = NULL; } else { resultobj = PyInt_FromLong(result); } } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_file_write(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_file_t *arg1 = (idmef_file_t *) 0 ; prelude_msgbuf_t *arg2 = (prelude_msgbuf_t *) 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; int result; if (!PyArg_ParseTuple(args,(char *)"OO:idmef_file_write",&obj0,&obj1)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_file, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { if ( obj1 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj1, (void **)&arg2, SWIGTYPE_p_prelude_msgbuf, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { Py_BEGIN_ALLOW_THREADS result = (int)idmef_file_write(arg1,arg2); Py_END_ALLOW_THREADS } { if ( result < 0 ) { swig_python_raise_exception(result); resultobj = NULL; } else { resultobj = PyInt_FromLong(result); } } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_linkage_write(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_linkage_t *arg1 = (idmef_linkage_t *) 0 ; prelude_msgbuf_t *arg2 = (prelude_msgbuf_t *) 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; int result; if (!PyArg_ParseTuple(args,(char *)"OO:idmef_linkage_write",&obj0,&obj1)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_linkage, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { if ( obj1 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj1, (void **)&arg2, SWIGTYPE_p_prelude_msgbuf, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { Py_BEGIN_ALLOW_THREADS result = (int)idmef_linkage_write(arg1,arg2); Py_END_ALLOW_THREADS } { if ( result < 0 ) { swig_python_raise_exception(result); resultobj = NULL; } else { resultobj = PyInt_FromLong(result); } } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_target_write(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_target_t *arg1 = (idmef_target_t *) 0 ; prelude_msgbuf_t *arg2 = (prelude_msgbuf_t *) 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; int result; if (!PyArg_ParseTuple(args,(char *)"OO:idmef_target_write",&obj0,&obj1)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_target, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { if ( obj1 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj1, (void **)&arg2, SWIGTYPE_p_prelude_msgbuf, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { Py_BEGIN_ALLOW_THREADS result = (int)idmef_target_write(arg1,arg2); Py_END_ALLOW_THREADS } { if ( result < 0 ) { swig_python_raise_exception(result); resultobj = NULL; } else { resultobj = PyInt_FromLong(result); } } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_analyzer_write(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_analyzer_t *arg1 = (idmef_analyzer_t *) 0 ; prelude_msgbuf_t *arg2 = (prelude_msgbuf_t *) 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; int result; if (!PyArg_ParseTuple(args,(char *)"OO:idmef_analyzer_write",&obj0,&obj1)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_analyzer, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { if ( obj1 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj1, (void **)&arg2, SWIGTYPE_p_prelude_msgbuf, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { Py_BEGIN_ALLOW_THREADS result = (int)idmef_analyzer_write(arg1,arg2); Py_END_ALLOW_THREADS } { if ( result < 0 ) { swig_python_raise_exception(result); resultobj = NULL; } else { resultobj = PyInt_FromLong(result); } } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_alertident_write(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_alertident_t *arg1 = (idmef_alertident_t *) 0 ; prelude_msgbuf_t *arg2 = (prelude_msgbuf_t *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; int result; if (!PyArg_ParseTuple(args,(char *)"OO:idmef_alertident_write",&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_idmef_alertident, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "idmef_alertident_write" "', argument " "1"" of type '" "idmef_alertident_t *""'"); } arg1 = (idmef_alertident_t *)(argp1); { if ( obj1 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj1, (void **)&arg2, SWIGTYPE_p_prelude_msgbuf, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { Py_BEGIN_ALLOW_THREADS result = (int)idmef_alertident_write(arg1,arg2); Py_END_ALLOW_THREADS } { if ( result < 0 ) { swig_python_raise_exception(result); resultobj = NULL; } else { resultobj = PyInt_FromLong(result); } } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_impact_write(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_impact_t *arg1 = (idmef_impact_t *) 0 ; prelude_msgbuf_t *arg2 = (prelude_msgbuf_t *) 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; int result; if (!PyArg_ParseTuple(args,(char *)"OO:idmef_impact_write",&obj0,&obj1)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_impact, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { if ( obj1 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj1, (void **)&arg2, SWIGTYPE_p_prelude_msgbuf, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { Py_BEGIN_ALLOW_THREADS result = (int)idmef_impact_write(arg1,arg2); Py_END_ALLOW_THREADS } { if ( result < 0 ) { swig_python_raise_exception(result); resultobj = NULL; } else { resultobj = PyInt_FromLong(result); } } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_action_write(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_action_t *arg1 = (idmef_action_t *) 0 ; prelude_msgbuf_t *arg2 = (prelude_msgbuf_t *) 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; int result; if (!PyArg_ParseTuple(args,(char *)"OO:idmef_action_write",&obj0,&obj1)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_action, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { if ( obj1 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj1, (void **)&arg2, SWIGTYPE_p_prelude_msgbuf, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { Py_BEGIN_ALLOW_THREADS result = (int)idmef_action_write(arg1,arg2); Py_END_ALLOW_THREADS } { if ( result < 0 ) { swig_python_raise_exception(result); resultobj = NULL; } else { resultobj = PyInt_FromLong(result); } } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_confidence_write(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_confidence_t *arg1 = (idmef_confidence_t *) 0 ; prelude_msgbuf_t *arg2 = (prelude_msgbuf_t *) 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; int result; if (!PyArg_ParseTuple(args,(char *)"OO:idmef_confidence_write",&obj0,&obj1)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_confidence, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { if ( obj1 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj1, (void **)&arg2, SWIGTYPE_p_prelude_msgbuf, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { Py_BEGIN_ALLOW_THREADS result = (int)idmef_confidence_write(arg1,arg2); Py_END_ALLOW_THREADS } { if ( result < 0 ) { swig_python_raise_exception(result); resultobj = NULL; } else { resultobj = PyInt_FromLong(result); } } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_assessment_write(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_assessment_t *arg1 = (idmef_assessment_t *) 0 ; prelude_msgbuf_t *arg2 = (prelude_msgbuf_t *) 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; int result; if (!PyArg_ParseTuple(args,(char *)"OO:idmef_assessment_write",&obj0,&obj1)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_assessment, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { if ( obj1 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj1, (void **)&arg2, SWIGTYPE_p_prelude_msgbuf, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { Py_BEGIN_ALLOW_THREADS result = (int)idmef_assessment_write(arg1,arg2); Py_END_ALLOW_THREADS } { if ( result < 0 ) { swig_python_raise_exception(result); resultobj = NULL; } else { resultobj = PyInt_FromLong(result); } } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_tool_alert_write(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_tool_alert_t *arg1 = (idmef_tool_alert_t *) 0 ; prelude_msgbuf_t *arg2 = (prelude_msgbuf_t *) 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; int result; if (!PyArg_ParseTuple(args,(char *)"OO:idmef_tool_alert_write",&obj0,&obj1)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_tool_alert, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { if ( obj1 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj1, (void **)&arg2, SWIGTYPE_p_prelude_msgbuf, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { Py_BEGIN_ALLOW_THREADS result = (int)idmef_tool_alert_write(arg1,arg2); Py_END_ALLOW_THREADS } { if ( result < 0 ) { swig_python_raise_exception(result); resultobj = NULL; } else { resultobj = PyInt_FromLong(result); } } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_correlation_alert_write(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_correlation_alert_t *arg1 = (idmef_correlation_alert_t *) 0 ; prelude_msgbuf_t *arg2 = (prelude_msgbuf_t *) 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; int result; if (!PyArg_ParseTuple(args,(char *)"OO:idmef_correlation_alert_write",&obj0,&obj1)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_correlation_alert, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { if ( obj1 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj1, (void **)&arg2, SWIGTYPE_p_prelude_msgbuf, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { Py_BEGIN_ALLOW_THREADS result = (int)idmef_correlation_alert_write(arg1,arg2); Py_END_ALLOW_THREADS } { if ( result < 0 ) { swig_python_raise_exception(result); resultobj = NULL; } else { resultobj = PyInt_FromLong(result); } } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_overflow_alert_write(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_overflow_alert_t *arg1 = (idmef_overflow_alert_t *) 0 ; prelude_msgbuf_t *arg2 = (prelude_msgbuf_t *) 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; int result; if (!PyArg_ParseTuple(args,(char *)"OO:idmef_overflow_alert_write",&obj0,&obj1)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_overflow_alert, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { if ( obj1 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj1, (void **)&arg2, SWIGTYPE_p_prelude_msgbuf, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { Py_BEGIN_ALLOW_THREADS result = (int)idmef_overflow_alert_write(arg1,arg2); Py_END_ALLOW_THREADS } { if ( result < 0 ) { swig_python_raise_exception(result); resultobj = NULL; } else { resultobj = PyInt_FromLong(result); } } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_alert_write(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_alert_t *arg1 = (idmef_alert_t *) 0 ; prelude_msgbuf_t *arg2 = (prelude_msgbuf_t *) 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; int result; if (!PyArg_ParseTuple(args,(char *)"OO:idmef_alert_write",&obj0,&obj1)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_alert, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { if ( obj1 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj1, (void **)&arg2, SWIGTYPE_p_prelude_msgbuf, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { Py_BEGIN_ALLOW_THREADS result = (int)idmef_alert_write(arg1,arg2); Py_END_ALLOW_THREADS } { if ( result < 0 ) { swig_python_raise_exception(result); resultobj = NULL; } else { resultobj = PyInt_FromLong(result); } } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_heartbeat_write(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_heartbeat_t *arg1 = (idmef_heartbeat_t *) 0 ; prelude_msgbuf_t *arg2 = (prelude_msgbuf_t *) 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; int result; if (!PyArg_ParseTuple(args,(char *)"OO:idmef_heartbeat_write",&obj0,&obj1)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_heartbeat, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { if ( obj1 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj1, (void **)&arg2, SWIGTYPE_p_prelude_msgbuf, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { Py_BEGIN_ALLOW_THREADS result = (int)idmef_heartbeat_write(arg1,arg2); Py_END_ALLOW_THREADS } { if ( result < 0 ) { swig_python_raise_exception(result); resultobj = NULL; } else { resultobj = PyInt_FromLong(result); } } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_message_write(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_message_t *arg1 = (idmef_message_t *) 0 ; prelude_msgbuf_t *arg2 = (prelude_msgbuf_t *) 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; int result; if (!PyArg_ParseTuple(args,(char *)"OO:idmef_message_write",&obj0,&obj1)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_message, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { if ( obj1 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj1, (void **)&arg2, SWIGTYPE_p_prelude_msgbuf, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { Py_BEGIN_ALLOW_THREADS result = (int)idmef_message_write(arg1,arg2); Py_END_ALLOW_THREADS } { if ( result < 0 ) { swig_python_raise_exception(result); resultobj = NULL; } else { resultobj = PyInt_FromLong(result); } } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_additional_data_new_real(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_additional_data_t **arg1 = (idmef_additional_data_t **) 0 ; float arg2 ; idmef_additional_data_t *tmp1 ; float val2 ; int ecode2 = 0 ; PyObject * obj0 = 0 ; int result; { arg1 = (idmef_additional_data_t **) &tmp1; } if (!PyArg_ParseTuple(args,(char *)"O:idmef_additional_data_new_real",&obj0)) SWIG_fail; ecode2 = SWIG_AsVal_float(obj0, &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "idmef_additional_data_new_real" "', argument " "2"" of type '" "float""'"); } arg2 = (float)(val2); { Py_BEGIN_ALLOW_THREADS result = (int)idmef_additional_data_new_real(arg1,arg2); Py_END_ALLOW_THREADS } { if ( result < 0 ) { swig_python_raise_exception(result); resultobj = NULL; } else { resultobj = PyInt_FromLong(result); } } { if ( result >= 0 ) resultobj = SWIG_NewPointerObj((void *) * arg1, SWIGTYPE_p_idmef_additional_data, 0); } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_additional_data_new_byte(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_additional_data_t **arg1 = (idmef_additional_data_t **) 0 ; uint8_t arg2 ; idmef_additional_data_t *tmp1 ; unsigned char val2 ; int ecode2 = 0 ; PyObject * obj0 = 0 ; int result; { arg1 = (idmef_additional_data_t **) &tmp1; } if (!PyArg_ParseTuple(args,(char *)"O:idmef_additional_data_new_byte",&obj0)) SWIG_fail; ecode2 = SWIG_AsVal_unsigned_SS_char(obj0, &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "idmef_additional_data_new_byte" "', argument " "2"" of type '" "uint8_t""'"); } arg2 = (uint8_t)(val2); { Py_BEGIN_ALLOW_THREADS result = (int)idmef_additional_data_new_byte(arg1,arg2); Py_END_ALLOW_THREADS } { if ( result < 0 ) { swig_python_raise_exception(result); resultobj = NULL; } else { resultobj = PyInt_FromLong(result); } } { if ( result >= 0 ) resultobj = SWIG_NewPointerObj((void *) * arg1, SWIGTYPE_p_idmef_additional_data, 0); } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_additional_data_new_integer(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_additional_data_t **arg1 = (idmef_additional_data_t **) 0 ; uint32_t arg2 ; idmef_additional_data_t *tmp1 ; unsigned int val2 ; int ecode2 = 0 ; PyObject * obj0 = 0 ; int result; { arg1 = (idmef_additional_data_t **) &tmp1; } if (!PyArg_ParseTuple(args,(char *)"O:idmef_additional_data_new_integer",&obj0)) SWIG_fail; ecode2 = SWIG_AsVal_unsigned_SS_int(obj0, &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "idmef_additional_data_new_integer" "', argument " "2"" of type '" "uint32_t""'"); } arg2 = (uint32_t)(val2); { Py_BEGIN_ALLOW_THREADS result = (int)idmef_additional_data_new_integer(arg1,arg2); Py_END_ALLOW_THREADS } { if ( result < 0 ) { swig_python_raise_exception(result); resultobj = NULL; } else { resultobj = PyInt_FromLong(result); } } { if ( result >= 0 ) resultobj = SWIG_NewPointerObj((void *) * arg1, SWIGTYPE_p_idmef_additional_data, 0); } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_additional_data_new_boolean(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_additional_data_t **arg1 = (idmef_additional_data_t **) 0 ; prelude_bool_t arg2 ; idmef_additional_data_t *tmp1 ; int val2 ; int ecode2 = 0 ; PyObject * obj0 = 0 ; int result; { arg1 = (idmef_additional_data_t **) &tmp1; } if (!PyArg_ParseTuple(args,(char *)"O:idmef_additional_data_new_boolean",&obj0)) SWIG_fail; ecode2 = SWIG_AsVal_int(obj0, &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "idmef_additional_data_new_boolean" "', argument " "2"" of type '" "prelude_bool_t""'"); } arg2 = (prelude_bool_t)(val2); { Py_BEGIN_ALLOW_THREADS result = (int)idmef_additional_data_new_boolean(arg1,arg2); Py_END_ALLOW_THREADS } { if ( result < 0 ) { swig_python_raise_exception(result); resultobj = NULL; } else { resultobj = PyInt_FromLong(result); } } { if ( result >= 0 ) resultobj = SWIG_NewPointerObj((void *) * arg1, SWIGTYPE_p_idmef_additional_data, 0); } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_additional_data_new_character(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_additional_data_t **arg1 = (idmef_additional_data_t **) 0 ; char arg2 ; idmef_additional_data_t *tmp1 ; char val2 ; int ecode2 = 0 ; PyObject * obj0 = 0 ; int result; { arg1 = (idmef_additional_data_t **) &tmp1; } if (!PyArg_ParseTuple(args,(char *)"O:idmef_additional_data_new_character",&obj0)) SWIG_fail; ecode2 = SWIG_AsVal_char(obj0, &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "idmef_additional_data_new_character" "', argument " "2"" of type '" "char""'"); } arg2 = (char)(val2); { Py_BEGIN_ALLOW_THREADS result = (int)idmef_additional_data_new_character(arg1,arg2); Py_END_ALLOW_THREADS } { if ( result < 0 ) { swig_python_raise_exception(result); resultobj = NULL; } else { resultobj = PyInt_FromLong(result); } } { if ( result >= 0 ) resultobj = SWIG_NewPointerObj((void *) * arg1, SWIGTYPE_p_idmef_additional_data, 0); } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_additional_data_set_real(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_additional_data_t *arg1 = (idmef_additional_data_t *) 0 ; float arg2 ; float val2 ; int ecode2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:idmef_additional_data_set_real",&obj0,&obj1)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_additional_data, SWIG_POINTER_EXCEPTION|0) ) return NULL; } ecode2 = SWIG_AsVal_float(obj1, &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "idmef_additional_data_set_real" "', argument " "2"" of type '" "float""'"); } arg2 = (float)(val2); { Py_BEGIN_ALLOW_THREADS idmef_additional_data_set_real(arg1,arg2); Py_END_ALLOW_THREADS } resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_additional_data_set_byte(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_additional_data_t *arg1 = (idmef_additional_data_t *) 0 ; uint8_t arg2 ; unsigned char val2 ; int ecode2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:idmef_additional_data_set_byte",&obj0,&obj1)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_additional_data, SWIG_POINTER_EXCEPTION|0) ) return NULL; } ecode2 = SWIG_AsVal_unsigned_SS_char(obj1, &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "idmef_additional_data_set_byte" "', argument " "2"" of type '" "uint8_t""'"); } arg2 = (uint8_t)(val2); { Py_BEGIN_ALLOW_THREADS idmef_additional_data_set_byte(arg1,arg2); Py_END_ALLOW_THREADS } resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_additional_data_set_integer(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_additional_data_t *arg1 = (idmef_additional_data_t *) 0 ; uint32_t arg2 ; unsigned int val2 ; int ecode2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:idmef_additional_data_set_integer",&obj0,&obj1)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_additional_data, SWIG_POINTER_EXCEPTION|0) ) return NULL; } ecode2 = SWIG_AsVal_unsigned_SS_int(obj1, &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "idmef_additional_data_set_integer" "', argument " "2"" of type '" "uint32_t""'"); } arg2 = (uint32_t)(val2); { Py_BEGIN_ALLOW_THREADS idmef_additional_data_set_integer(arg1,arg2); Py_END_ALLOW_THREADS } resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_additional_data_set_boolean(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_additional_data_t *arg1 = (idmef_additional_data_t *) 0 ; prelude_bool_t arg2 ; int val2 ; int ecode2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:idmef_additional_data_set_boolean",&obj0,&obj1)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_additional_data, SWIG_POINTER_EXCEPTION|0) ) return NULL; } ecode2 = SWIG_AsVal_int(obj1, &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "idmef_additional_data_set_boolean" "', argument " "2"" of type '" "prelude_bool_t""'"); } arg2 = (prelude_bool_t)(val2); { Py_BEGIN_ALLOW_THREADS idmef_additional_data_set_boolean(arg1,arg2); Py_END_ALLOW_THREADS } resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_additional_data_set_character(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_additional_data_t *arg1 = (idmef_additional_data_t *) 0 ; char arg2 ; char val2 ; int ecode2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:idmef_additional_data_set_character",&obj0,&obj1)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_additional_data, SWIG_POINTER_EXCEPTION|0) ) return NULL; } ecode2 = SWIG_AsVal_char(obj1, &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "idmef_additional_data_set_character" "', argument " "2"" of type '" "char""'"); } arg2 = (char)(val2); { Py_BEGIN_ALLOW_THREADS idmef_additional_data_set_character(arg1,arg2); Py_END_ALLOW_THREADS } resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_additional_data_new_string_ref_fast(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_additional_data_t **arg1 = (idmef_additional_data_t **) 0 ; char *arg2 = (char *) 0 ; size_t arg3 ; idmef_additional_data_t *tmp1 ; PyObject * obj0 = 0 ; int result; { arg1 = (idmef_additional_data_t **) &tmp1; } if (!PyArg_ParseTuple(args,(char *)"O:idmef_additional_data_new_string_ref_fast",&obj0)) SWIG_fail; { if ( ! PyString_Check(obj0) ) { PyErr_SetString(PyExc_ValueError, "Expected a string"); return NULL; } arg2 = PyString_AsString(obj0); arg3 = PyString_Size(obj0); } { Py_BEGIN_ALLOW_THREADS result = (int)idmef_additional_data_new_string_ref_fast(arg1,(char const *)arg2,arg3); Py_END_ALLOW_THREADS } { if ( result < 0 ) { swig_python_raise_exception(result); resultobj = NULL; } else { resultobj = PyInt_FromLong(result); } } { if ( result >= 0 ) resultobj = SWIG_NewPointerObj((void *) * arg1, SWIGTYPE_p_idmef_additional_data, 0); } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_additional_data_new_string_ref(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_additional_data_t **arg1 = (idmef_additional_data_t **) 0 ; char *arg2 = (char *) 0 ; idmef_additional_data_t *tmp1 ; PyObject * obj0 = 0 ; int result; { arg1 = (idmef_additional_data_t **) &tmp1; } if (!PyArg_ParseTuple(args,(char *)"O:idmef_additional_data_new_string_ref",&obj0)) SWIG_fail; { if ( obj0 == Py_None ) arg2 = NULL; else if ( PyString_Check(obj0) ) arg2 = PyString_AsString(obj0); else { PyErr_Format(PyExc_TypeError, "expected None or string, %s found", obj0->ob_type->tp_name); return NULL; } } { Py_BEGIN_ALLOW_THREADS result = (int)idmef_additional_data_new_string_ref(arg1,(char const *)arg2); Py_END_ALLOW_THREADS } { if ( result < 0 ) { swig_python_raise_exception(result); resultobj = NULL; } else { resultobj = PyInt_FromLong(result); } } { if ( result >= 0 ) resultobj = SWIG_NewPointerObj((void *) * arg1, SWIGTYPE_p_idmef_additional_data, 0); } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_additional_data_set_string_ref_fast(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_additional_data_t *arg1 = (idmef_additional_data_t *) 0 ; char *arg2 = (char *) 0 ; size_t arg3 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; int result; if (!PyArg_ParseTuple(args,(char *)"OO:idmef_additional_data_set_string_ref_fast",&obj0,&obj1)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_additional_data, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { if ( ! PyString_Check(obj1) ) { PyErr_SetString(PyExc_ValueError, "Expected a string"); return NULL; } arg2 = PyString_AsString(obj1); arg3 = PyString_Size(obj1); } { Py_BEGIN_ALLOW_THREADS result = (int)idmef_additional_data_set_string_ref_fast(arg1,(char const *)arg2,arg3); Py_END_ALLOW_THREADS } { if ( result < 0 ) { swig_python_raise_exception(result); resultobj = NULL; } else { resultobj = PyInt_FromLong(result); } } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_additional_data_set_string_ref(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_additional_data_t *arg1 = (idmef_additional_data_t *) 0 ; char *arg2 = (char *) 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; int result; if (!PyArg_ParseTuple(args,(char *)"OO:idmef_additional_data_set_string_ref",&obj0,&obj1)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_additional_data, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { if ( obj1 == Py_None ) arg2 = NULL; else if ( PyString_Check(obj1) ) arg2 = PyString_AsString(obj1); else { PyErr_Format(PyExc_TypeError, "expected None or string, %s found", obj1->ob_type->tp_name); return NULL; } } { Py_BEGIN_ALLOW_THREADS result = (int)idmef_additional_data_set_string_ref(arg1,(char const *)arg2); Py_END_ALLOW_THREADS } { if ( result < 0 ) { swig_python_raise_exception(result); resultobj = NULL; } else { resultobj = PyInt_FromLong(result); } } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_additional_data_new_string_dup_fast(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_additional_data_t **arg1 = (idmef_additional_data_t **) 0 ; char *arg2 = (char *) 0 ; size_t arg3 ; idmef_additional_data_t *tmp1 ; PyObject * obj0 = 0 ; int result; { arg1 = (idmef_additional_data_t **) &tmp1; } if (!PyArg_ParseTuple(args,(char *)"O:idmef_additional_data_new_string_dup_fast",&obj0)) SWIG_fail; { if ( ! PyString_Check(obj0) ) { PyErr_SetString(PyExc_ValueError, "Expected a string"); return NULL; } arg2 = PyString_AsString(obj0); arg3 = PyString_Size(obj0); } { Py_BEGIN_ALLOW_THREADS result = (int)idmef_additional_data_new_string_dup_fast(arg1,(char const *)arg2,arg3); Py_END_ALLOW_THREADS } { if ( result < 0 ) { swig_python_raise_exception(result); resultobj = NULL; } else { resultobj = PyInt_FromLong(result); } } { if ( result >= 0 ) resultobj = SWIG_NewPointerObj((void *) * arg1, SWIGTYPE_p_idmef_additional_data, 0); } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_additional_data_new_string_dup(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_additional_data_t **arg1 = (idmef_additional_data_t **) 0 ; char *arg2 = (char *) 0 ; idmef_additional_data_t *tmp1 ; PyObject * obj0 = 0 ; int result; { arg1 = (idmef_additional_data_t **) &tmp1; } if (!PyArg_ParseTuple(args,(char *)"O:idmef_additional_data_new_string_dup",&obj0)) SWIG_fail; { if ( obj0 == Py_None ) arg2 = NULL; else if ( PyString_Check(obj0) ) arg2 = PyString_AsString(obj0); else { PyErr_Format(PyExc_TypeError, "expected None or string, %s found", obj0->ob_type->tp_name); return NULL; } } { Py_BEGIN_ALLOW_THREADS result = (int)idmef_additional_data_new_string_dup(arg1,(char const *)arg2); Py_END_ALLOW_THREADS } { if ( result < 0 ) { swig_python_raise_exception(result); resultobj = NULL; } else { resultobj = PyInt_FromLong(result); } } { if ( result >= 0 ) resultobj = SWIG_NewPointerObj((void *) * arg1, SWIGTYPE_p_idmef_additional_data, 0); } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_additional_data_set_string_dup_fast(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_additional_data_t *arg1 = (idmef_additional_data_t *) 0 ; char *arg2 = (char *) 0 ; size_t arg3 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; int result; if (!PyArg_ParseTuple(args,(char *)"OO:idmef_additional_data_set_string_dup_fast",&obj0,&obj1)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_additional_data, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { if ( ! PyString_Check(obj1) ) { PyErr_SetString(PyExc_ValueError, "Expected a string"); return NULL; } arg2 = PyString_AsString(obj1); arg3 = PyString_Size(obj1); } { Py_BEGIN_ALLOW_THREADS result = (int)idmef_additional_data_set_string_dup_fast(arg1,(char const *)arg2,arg3); Py_END_ALLOW_THREADS } { if ( result < 0 ) { swig_python_raise_exception(result); resultobj = NULL; } else { resultobj = PyInt_FromLong(result); } } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_additional_data_set_string_dup(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_additional_data_t *arg1 = (idmef_additional_data_t *) 0 ; char *arg2 = (char *) 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; int result; if (!PyArg_ParseTuple(args,(char *)"OO:idmef_additional_data_set_string_dup",&obj0,&obj1)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_additional_data, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { if ( obj1 == Py_None ) arg2 = NULL; else if ( PyString_Check(obj1) ) arg2 = PyString_AsString(obj1); else { PyErr_Format(PyExc_TypeError, "expected None or string, %s found", obj1->ob_type->tp_name); return NULL; } } { Py_BEGIN_ALLOW_THREADS result = (int)idmef_additional_data_set_string_dup(arg1,(char const *)arg2); Py_END_ALLOW_THREADS } { if ( result < 0 ) { swig_python_raise_exception(result); resultobj = NULL; } else { resultobj = PyInt_FromLong(result); } } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_additional_data_new_string_nodup_fast(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_additional_data_t **arg1 = (idmef_additional_data_t **) 0 ; char *arg2 = (char *) 0 ; size_t arg3 ; idmef_additional_data_t *tmp1 ; PyObject * obj0 = 0 ; int result; { arg1 = (idmef_additional_data_t **) &tmp1; } if (!PyArg_ParseTuple(args,(char *)"O:idmef_additional_data_new_string_nodup_fast",&obj0)) SWIG_fail; { if ( ! PyString_Check(obj0) ) { PyErr_SetString(PyExc_ValueError, "Expected a string"); return NULL; } arg2 = PyString_AsString(obj0); arg3 = PyString_Size(obj0); } { Py_BEGIN_ALLOW_THREADS result = (int)idmef_additional_data_new_string_nodup_fast(arg1,arg2,arg3); Py_END_ALLOW_THREADS } { if ( result < 0 ) { swig_python_raise_exception(result); resultobj = NULL; } else { resultobj = PyInt_FromLong(result); } } { if ( result >= 0 ) resultobj = SWIG_NewPointerObj((void *) * arg1, SWIGTYPE_p_idmef_additional_data, 0); } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_additional_data_new_string_nodup(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_additional_data_t **arg1 = (idmef_additional_data_t **) 0 ; char *arg2 = (char *) 0 ; idmef_additional_data_t *tmp1 ; int res2 ; char *buf2 = 0 ; int alloc2 = 0 ; PyObject * obj0 = 0 ; int result; { arg1 = (idmef_additional_data_t **) &tmp1; } if (!PyArg_ParseTuple(args,(char *)"O:idmef_additional_data_new_string_nodup",&obj0)) SWIG_fail; res2 = SWIG_AsCharPtrAndSize(obj0, &buf2, NULL, &alloc2); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "idmef_additional_data_new_string_nodup" "', argument " "2"" of type '" "char *""'"); } arg2 = (char *)(buf2); { Py_BEGIN_ALLOW_THREADS result = (int)idmef_additional_data_new_string_nodup(arg1,arg2); Py_END_ALLOW_THREADS } { if ( result < 0 ) { swig_python_raise_exception(result); resultobj = NULL; } else { resultobj = PyInt_FromLong(result); } } { if ( result >= 0 ) resultobj = SWIG_NewPointerObj((void *) * arg1, SWIGTYPE_p_idmef_additional_data, 0); } if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); return resultobj; fail: if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); return NULL; } SWIGINTERN PyObject *_wrap_idmef_additional_data_set_string_nodup_fast(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_additional_data_t *arg1 = (idmef_additional_data_t *) 0 ; char *arg2 = (char *) 0 ; size_t arg3 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; int result; if (!PyArg_ParseTuple(args,(char *)"OO:idmef_additional_data_set_string_nodup_fast",&obj0,&obj1)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_additional_data, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { if ( ! PyString_Check(obj1) ) { PyErr_SetString(PyExc_ValueError, "Expected a string"); return NULL; } arg2 = PyString_AsString(obj1); arg3 = PyString_Size(obj1); } { Py_BEGIN_ALLOW_THREADS result = (int)idmef_additional_data_set_string_nodup_fast(arg1,arg2,arg3); Py_END_ALLOW_THREADS } { if ( result < 0 ) { swig_python_raise_exception(result); resultobj = NULL; } else { resultobj = PyInt_FromLong(result); } } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_additional_data_set_string_nodup(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_additional_data_t *arg1 = (idmef_additional_data_t *) 0 ; char *arg2 = (char *) 0 ; int res2 ; char *buf2 = 0 ; int alloc2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; int result; if (!PyArg_ParseTuple(args,(char *)"OO:idmef_additional_data_set_string_nodup",&obj0,&obj1)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_additional_data, SWIG_POINTER_EXCEPTION|0) ) return NULL; } res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "idmef_additional_data_set_string_nodup" "', argument " "2"" of type '" "char *""'"); } arg2 = (char *)(buf2); { Py_BEGIN_ALLOW_THREADS result = (int)idmef_additional_data_set_string_nodup(arg1,arg2); Py_END_ALLOW_THREADS } { if ( result < 0 ) { swig_python_raise_exception(result); resultobj = NULL; } else { resultobj = PyInt_FromLong(result); } } if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); return resultobj; fail: if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); return NULL; } SWIGINTERN PyObject *_wrap_idmef_additional_data_new_ntpstamp_ref_fast(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_additional_data_t **arg1 = (idmef_additional_data_t **) 0 ; char *arg2 = (char *) 0 ; size_t arg3 ; idmef_additional_data_t *tmp1 ; PyObject * obj0 = 0 ; int result; { arg1 = (idmef_additional_data_t **) &tmp1; } if (!PyArg_ParseTuple(args,(char *)"O:idmef_additional_data_new_ntpstamp_ref_fast",&obj0)) SWIG_fail; { if ( ! PyString_Check(obj0) ) { PyErr_SetString(PyExc_ValueError, "Expected a string"); return NULL; } arg2 = PyString_AsString(obj0); arg3 = PyString_Size(obj0); } { Py_BEGIN_ALLOW_THREADS result = (int)idmef_additional_data_new_ntpstamp_ref_fast(arg1,(char const *)arg2,arg3); Py_END_ALLOW_THREADS } { if ( result < 0 ) { swig_python_raise_exception(result); resultobj = NULL; } else { resultobj = PyInt_FromLong(result); } } { if ( result >= 0 ) resultobj = SWIG_NewPointerObj((void *) * arg1, SWIGTYPE_p_idmef_additional_data, 0); } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_additional_data_new_ntpstamp_ref(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_additional_data_t **arg1 = (idmef_additional_data_t **) 0 ; char *arg2 = (char *) 0 ; idmef_additional_data_t *tmp1 ; PyObject * obj0 = 0 ; int result; { arg1 = (idmef_additional_data_t **) &tmp1; } if (!PyArg_ParseTuple(args,(char *)"O:idmef_additional_data_new_ntpstamp_ref",&obj0)) SWIG_fail; { if ( obj0 == Py_None ) arg2 = NULL; else if ( PyString_Check(obj0) ) arg2 = PyString_AsString(obj0); else { PyErr_Format(PyExc_TypeError, "expected None or string, %s found", obj0->ob_type->tp_name); return NULL; } } { Py_BEGIN_ALLOW_THREADS result = (int)idmef_additional_data_new_ntpstamp_ref(arg1,(char const *)arg2); Py_END_ALLOW_THREADS } { if ( result < 0 ) { swig_python_raise_exception(result); resultobj = NULL; } else { resultobj = PyInt_FromLong(result); } } { if ( result >= 0 ) resultobj = SWIG_NewPointerObj((void *) * arg1, SWIGTYPE_p_idmef_additional_data, 0); } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_additional_data_set_ntpstamp_ref_fast(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_additional_data_t *arg1 = (idmef_additional_data_t *) 0 ; char *arg2 = (char *) 0 ; size_t arg3 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; int result; if (!PyArg_ParseTuple(args,(char *)"OO:idmef_additional_data_set_ntpstamp_ref_fast",&obj0,&obj1)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_additional_data, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { if ( ! PyString_Check(obj1) ) { PyErr_SetString(PyExc_ValueError, "Expected a string"); return NULL; } arg2 = PyString_AsString(obj1); arg3 = PyString_Size(obj1); } { Py_BEGIN_ALLOW_THREADS result = (int)idmef_additional_data_set_ntpstamp_ref_fast(arg1,(char const *)arg2,arg3); Py_END_ALLOW_THREADS } { if ( result < 0 ) { swig_python_raise_exception(result); resultobj = NULL; } else { resultobj = PyInt_FromLong(result); } } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_additional_data_set_ntpstamp_ref(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_additional_data_t *arg1 = (idmef_additional_data_t *) 0 ; char *arg2 = (char *) 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; int result; if (!PyArg_ParseTuple(args,(char *)"OO:idmef_additional_data_set_ntpstamp_ref",&obj0,&obj1)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_additional_data, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { if ( obj1 == Py_None ) arg2 = NULL; else if ( PyString_Check(obj1) ) arg2 = PyString_AsString(obj1); else { PyErr_Format(PyExc_TypeError, "expected None or string, %s found", obj1->ob_type->tp_name); return NULL; } } { Py_BEGIN_ALLOW_THREADS result = (int)idmef_additional_data_set_ntpstamp_ref(arg1,(char const *)arg2); Py_END_ALLOW_THREADS } { if ( result < 0 ) { swig_python_raise_exception(result); resultobj = NULL; } else { resultobj = PyInt_FromLong(result); } } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_additional_data_new_ntpstamp_dup_fast(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_additional_data_t **arg1 = (idmef_additional_data_t **) 0 ; char *arg2 = (char *) 0 ; size_t arg3 ; idmef_additional_data_t *tmp1 ; PyObject * obj0 = 0 ; int result; { arg1 = (idmef_additional_data_t **) &tmp1; } if (!PyArg_ParseTuple(args,(char *)"O:idmef_additional_data_new_ntpstamp_dup_fast",&obj0)) SWIG_fail; { if ( ! PyString_Check(obj0) ) { PyErr_SetString(PyExc_ValueError, "Expected a string"); return NULL; } arg2 = PyString_AsString(obj0); arg3 = PyString_Size(obj0); } { Py_BEGIN_ALLOW_THREADS result = (int)idmef_additional_data_new_ntpstamp_dup_fast(arg1,(char const *)arg2,arg3); Py_END_ALLOW_THREADS } { if ( result < 0 ) { swig_python_raise_exception(result); resultobj = NULL; } else { resultobj = PyInt_FromLong(result); } } { if ( result >= 0 ) resultobj = SWIG_NewPointerObj((void *) * arg1, SWIGTYPE_p_idmef_additional_data, 0); } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_additional_data_new_ntpstamp_dup(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_additional_data_t **arg1 = (idmef_additional_data_t **) 0 ; char *arg2 = (char *) 0 ; idmef_additional_data_t *tmp1 ; PyObject * obj0 = 0 ; int result; { arg1 = (idmef_additional_data_t **) &tmp1; } if (!PyArg_ParseTuple(args,(char *)"O:idmef_additional_data_new_ntpstamp_dup",&obj0)) SWIG_fail; { if ( obj0 == Py_None ) arg2 = NULL; else if ( PyString_Check(obj0) ) arg2 = PyString_AsString(obj0); else { PyErr_Format(PyExc_TypeError, "expected None or string, %s found", obj0->ob_type->tp_name); return NULL; } } { Py_BEGIN_ALLOW_THREADS result = (int)idmef_additional_data_new_ntpstamp_dup(arg1,(char const *)arg2); Py_END_ALLOW_THREADS } { if ( result < 0 ) { swig_python_raise_exception(result); resultobj = NULL; } else { resultobj = PyInt_FromLong(result); } } { if ( result >= 0 ) resultobj = SWIG_NewPointerObj((void *) * arg1, SWIGTYPE_p_idmef_additional_data, 0); } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_additional_data_set_ntpstamp_dup_fast(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_additional_data_t *arg1 = (idmef_additional_data_t *) 0 ; char *arg2 = (char *) 0 ; size_t arg3 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; int result; if (!PyArg_ParseTuple(args,(char *)"OO:idmef_additional_data_set_ntpstamp_dup_fast",&obj0,&obj1)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_additional_data, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { if ( ! PyString_Check(obj1) ) { PyErr_SetString(PyExc_ValueError, "Expected a string"); return NULL; } arg2 = PyString_AsString(obj1); arg3 = PyString_Size(obj1); } { Py_BEGIN_ALLOW_THREADS result = (int)idmef_additional_data_set_ntpstamp_dup_fast(arg1,(char const *)arg2,arg3); Py_END_ALLOW_THREADS } { if ( result < 0 ) { swig_python_raise_exception(result); resultobj = NULL; } else { resultobj = PyInt_FromLong(result); } } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_additional_data_set_ntpstamp_dup(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_additional_data_t *arg1 = (idmef_additional_data_t *) 0 ; char *arg2 = (char *) 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; int result; if (!PyArg_ParseTuple(args,(char *)"OO:idmef_additional_data_set_ntpstamp_dup",&obj0,&obj1)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_additional_data, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { if ( obj1 == Py_None ) arg2 = NULL; else if ( PyString_Check(obj1) ) arg2 = PyString_AsString(obj1); else { PyErr_Format(PyExc_TypeError, "expected None or string, %s found", obj1->ob_type->tp_name); return NULL; } } { Py_BEGIN_ALLOW_THREADS result = (int)idmef_additional_data_set_ntpstamp_dup(arg1,(char const *)arg2); Py_END_ALLOW_THREADS } { if ( result < 0 ) { swig_python_raise_exception(result); resultobj = NULL; } else { resultobj = PyInt_FromLong(result); } } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_additional_data_new_ntpstamp_nodup_fast(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_additional_data_t **arg1 = (idmef_additional_data_t **) 0 ; char *arg2 = (char *) 0 ; size_t arg3 ; idmef_additional_data_t *tmp1 ; PyObject * obj0 = 0 ; int result; { arg1 = (idmef_additional_data_t **) &tmp1; } if (!PyArg_ParseTuple(args,(char *)"O:idmef_additional_data_new_ntpstamp_nodup_fast",&obj0)) SWIG_fail; { if ( ! PyString_Check(obj0) ) { PyErr_SetString(PyExc_ValueError, "Expected a string"); return NULL; } arg2 = PyString_AsString(obj0); arg3 = PyString_Size(obj0); } { Py_BEGIN_ALLOW_THREADS result = (int)idmef_additional_data_new_ntpstamp_nodup_fast(arg1,arg2,arg3); Py_END_ALLOW_THREADS } { if ( result < 0 ) { swig_python_raise_exception(result); resultobj = NULL; } else { resultobj = PyInt_FromLong(result); } } { if ( result >= 0 ) resultobj = SWIG_NewPointerObj((void *) * arg1, SWIGTYPE_p_idmef_additional_data, 0); } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_additional_data_new_ntpstamp_nodup(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_additional_data_t **arg1 = (idmef_additional_data_t **) 0 ; char *arg2 = (char *) 0 ; idmef_additional_data_t *tmp1 ; int res2 ; char *buf2 = 0 ; int alloc2 = 0 ; PyObject * obj0 = 0 ; int result; { arg1 = (idmef_additional_data_t **) &tmp1; } if (!PyArg_ParseTuple(args,(char *)"O:idmef_additional_data_new_ntpstamp_nodup",&obj0)) SWIG_fail; res2 = SWIG_AsCharPtrAndSize(obj0, &buf2, NULL, &alloc2); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "idmef_additional_data_new_ntpstamp_nodup" "', argument " "2"" of type '" "char *""'"); } arg2 = (char *)(buf2); { Py_BEGIN_ALLOW_THREADS result = (int)idmef_additional_data_new_ntpstamp_nodup(arg1,arg2); Py_END_ALLOW_THREADS } { if ( result < 0 ) { swig_python_raise_exception(result); resultobj = NULL; } else { resultobj = PyInt_FromLong(result); } } { if ( result >= 0 ) resultobj = SWIG_NewPointerObj((void *) * arg1, SWIGTYPE_p_idmef_additional_data, 0); } if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); return resultobj; fail: if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); return NULL; } SWIGINTERN PyObject *_wrap_idmef_additional_data_set_ntpstamp_nodup_fast(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_additional_data_t *arg1 = (idmef_additional_data_t *) 0 ; char *arg2 = (char *) 0 ; size_t arg3 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; int result; if (!PyArg_ParseTuple(args,(char *)"OO:idmef_additional_data_set_ntpstamp_nodup_fast",&obj0,&obj1)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_additional_data, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { if ( ! PyString_Check(obj1) ) { PyErr_SetString(PyExc_ValueError, "Expected a string"); return NULL; } arg2 = PyString_AsString(obj1); arg3 = PyString_Size(obj1); } { Py_BEGIN_ALLOW_THREADS result = (int)idmef_additional_data_set_ntpstamp_nodup_fast(arg1,arg2,arg3); Py_END_ALLOW_THREADS } { if ( result < 0 ) { swig_python_raise_exception(result); resultobj = NULL; } else { resultobj = PyInt_FromLong(result); } } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_additional_data_set_ntpstamp_nodup(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_additional_data_t *arg1 = (idmef_additional_data_t *) 0 ; char *arg2 = (char *) 0 ; int res2 ; char *buf2 = 0 ; int alloc2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; int result; if (!PyArg_ParseTuple(args,(char *)"OO:idmef_additional_data_set_ntpstamp_nodup",&obj0,&obj1)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_additional_data, SWIG_POINTER_EXCEPTION|0) ) return NULL; } res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "idmef_additional_data_set_ntpstamp_nodup" "', argument " "2"" of type '" "char *""'"); } arg2 = (char *)(buf2); { Py_BEGIN_ALLOW_THREADS result = (int)idmef_additional_data_set_ntpstamp_nodup(arg1,arg2); Py_END_ALLOW_THREADS } { if ( result < 0 ) { swig_python_raise_exception(result); resultobj = NULL; } else { resultobj = PyInt_FromLong(result); } } if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); return resultobj; fail: if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); return NULL; } SWIGINTERN PyObject *_wrap_idmef_additional_data_new_date_time_ref_fast(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_additional_data_t **arg1 = (idmef_additional_data_t **) 0 ; char *arg2 = (char *) 0 ; size_t arg3 ; idmef_additional_data_t *tmp1 ; PyObject * obj0 = 0 ; int result; { arg1 = (idmef_additional_data_t **) &tmp1; } if (!PyArg_ParseTuple(args,(char *)"O:idmef_additional_data_new_date_time_ref_fast",&obj0)) SWIG_fail; { if ( ! PyString_Check(obj0) ) { PyErr_SetString(PyExc_ValueError, "Expected a string"); return NULL; } arg2 = PyString_AsString(obj0); arg3 = PyString_Size(obj0); } { Py_BEGIN_ALLOW_THREADS result = (int)idmef_additional_data_new_date_time_ref_fast(arg1,(char const *)arg2,arg3); Py_END_ALLOW_THREADS } { if ( result < 0 ) { swig_python_raise_exception(result); resultobj = NULL; } else { resultobj = PyInt_FromLong(result); } } { if ( result >= 0 ) resultobj = SWIG_NewPointerObj((void *) * arg1, SWIGTYPE_p_idmef_additional_data, 0); } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_additional_data_new_date_time_ref(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_additional_data_t **arg1 = (idmef_additional_data_t **) 0 ; char *arg2 = (char *) 0 ; idmef_additional_data_t *tmp1 ; PyObject * obj0 = 0 ; int result; { arg1 = (idmef_additional_data_t **) &tmp1; } if (!PyArg_ParseTuple(args,(char *)"O:idmef_additional_data_new_date_time_ref",&obj0)) SWIG_fail; { if ( obj0 == Py_None ) arg2 = NULL; else if ( PyString_Check(obj0) ) arg2 = PyString_AsString(obj0); else { PyErr_Format(PyExc_TypeError, "expected None or string, %s found", obj0->ob_type->tp_name); return NULL; } } { Py_BEGIN_ALLOW_THREADS result = (int)idmef_additional_data_new_date_time_ref(arg1,(char const *)arg2); Py_END_ALLOW_THREADS } { if ( result < 0 ) { swig_python_raise_exception(result); resultobj = NULL; } else { resultobj = PyInt_FromLong(result); } } { if ( result >= 0 ) resultobj = SWIG_NewPointerObj((void *) * arg1, SWIGTYPE_p_idmef_additional_data, 0); } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_additional_data_set_date_time_ref_fast(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_additional_data_t *arg1 = (idmef_additional_data_t *) 0 ; char *arg2 = (char *) 0 ; size_t arg3 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; int result; if (!PyArg_ParseTuple(args,(char *)"OO:idmef_additional_data_set_date_time_ref_fast",&obj0,&obj1)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_additional_data, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { if ( ! PyString_Check(obj1) ) { PyErr_SetString(PyExc_ValueError, "Expected a string"); return NULL; } arg2 = PyString_AsString(obj1); arg3 = PyString_Size(obj1); } { Py_BEGIN_ALLOW_THREADS result = (int)idmef_additional_data_set_date_time_ref_fast(arg1,(char const *)arg2,arg3); Py_END_ALLOW_THREADS } { if ( result < 0 ) { swig_python_raise_exception(result); resultobj = NULL; } else { resultobj = PyInt_FromLong(result); } } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_additional_data_set_date_time_ref(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_additional_data_t *arg1 = (idmef_additional_data_t *) 0 ; char *arg2 = (char *) 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; int result; if (!PyArg_ParseTuple(args,(char *)"OO:idmef_additional_data_set_date_time_ref",&obj0,&obj1)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_additional_data, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { if ( obj1 == Py_None ) arg2 = NULL; else if ( PyString_Check(obj1) ) arg2 = PyString_AsString(obj1); else { PyErr_Format(PyExc_TypeError, "expected None or string, %s found", obj1->ob_type->tp_name); return NULL; } } { Py_BEGIN_ALLOW_THREADS result = (int)idmef_additional_data_set_date_time_ref(arg1,(char const *)arg2); Py_END_ALLOW_THREADS } { if ( result < 0 ) { swig_python_raise_exception(result); resultobj = NULL; } else { resultobj = PyInt_FromLong(result); } } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_additional_data_new_date_time_dup_fast(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_additional_data_t **arg1 = (idmef_additional_data_t **) 0 ; char *arg2 = (char *) 0 ; size_t arg3 ; idmef_additional_data_t *tmp1 ; PyObject * obj0 = 0 ; int result; { arg1 = (idmef_additional_data_t **) &tmp1; } if (!PyArg_ParseTuple(args,(char *)"O:idmef_additional_data_new_date_time_dup_fast",&obj0)) SWIG_fail; { if ( ! PyString_Check(obj0) ) { PyErr_SetString(PyExc_ValueError, "Expected a string"); return NULL; } arg2 = PyString_AsString(obj0); arg3 = PyString_Size(obj0); } { Py_BEGIN_ALLOW_THREADS result = (int)idmef_additional_data_new_date_time_dup_fast(arg1,(char const *)arg2,arg3); Py_END_ALLOW_THREADS } { if ( result < 0 ) { swig_python_raise_exception(result); resultobj = NULL; } else { resultobj = PyInt_FromLong(result); } } { if ( result >= 0 ) resultobj = SWIG_NewPointerObj((void *) * arg1, SWIGTYPE_p_idmef_additional_data, 0); } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_additional_data_new_date_time_dup(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_additional_data_t **arg1 = (idmef_additional_data_t **) 0 ; char *arg2 = (char *) 0 ; idmef_additional_data_t *tmp1 ; PyObject * obj0 = 0 ; int result; { arg1 = (idmef_additional_data_t **) &tmp1; } if (!PyArg_ParseTuple(args,(char *)"O:idmef_additional_data_new_date_time_dup",&obj0)) SWIG_fail; { if ( obj0 == Py_None ) arg2 = NULL; else if ( PyString_Check(obj0) ) arg2 = PyString_AsString(obj0); else { PyErr_Format(PyExc_TypeError, "expected None or string, %s found", obj0->ob_type->tp_name); return NULL; } } { Py_BEGIN_ALLOW_THREADS result = (int)idmef_additional_data_new_date_time_dup(arg1,(char const *)arg2); Py_END_ALLOW_THREADS } { if ( result < 0 ) { swig_python_raise_exception(result); resultobj = NULL; } else { resultobj = PyInt_FromLong(result); } } { if ( result >= 0 ) resultobj = SWIG_NewPointerObj((void *) * arg1, SWIGTYPE_p_idmef_additional_data, 0); } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_additional_data_set_date_time_dup_fast(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_additional_data_t *arg1 = (idmef_additional_data_t *) 0 ; char *arg2 = (char *) 0 ; size_t arg3 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; int result; if (!PyArg_ParseTuple(args,(char *)"OO:idmef_additional_data_set_date_time_dup_fast",&obj0,&obj1)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_additional_data, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { if ( ! PyString_Check(obj1) ) { PyErr_SetString(PyExc_ValueError, "Expected a string"); return NULL; } arg2 = PyString_AsString(obj1); arg3 = PyString_Size(obj1); } { Py_BEGIN_ALLOW_THREADS result = (int)idmef_additional_data_set_date_time_dup_fast(arg1,(char const *)arg2,arg3); Py_END_ALLOW_THREADS } { if ( result < 0 ) { swig_python_raise_exception(result); resultobj = NULL; } else { resultobj = PyInt_FromLong(result); } } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_additional_data_set_date_time_dup(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_additional_data_t *arg1 = (idmef_additional_data_t *) 0 ; char *arg2 = (char *) 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; int result; if (!PyArg_ParseTuple(args,(char *)"OO:idmef_additional_data_set_date_time_dup",&obj0,&obj1)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_additional_data, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { if ( obj1 == Py_None ) arg2 = NULL; else if ( PyString_Check(obj1) ) arg2 = PyString_AsString(obj1); else { PyErr_Format(PyExc_TypeError, "expected None or string, %s found", obj1->ob_type->tp_name); return NULL; } } { Py_BEGIN_ALLOW_THREADS result = (int)idmef_additional_data_set_date_time_dup(arg1,(char const *)arg2); Py_END_ALLOW_THREADS } { if ( result < 0 ) { swig_python_raise_exception(result); resultobj = NULL; } else { resultobj = PyInt_FromLong(result); } } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_additional_data_new_date_time_nodup_fast(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_additional_data_t **arg1 = (idmef_additional_data_t **) 0 ; char *arg2 = (char *) 0 ; size_t arg3 ; idmef_additional_data_t *tmp1 ; PyObject * obj0 = 0 ; int result; { arg1 = (idmef_additional_data_t **) &tmp1; } if (!PyArg_ParseTuple(args,(char *)"O:idmef_additional_data_new_date_time_nodup_fast",&obj0)) SWIG_fail; { if ( ! PyString_Check(obj0) ) { PyErr_SetString(PyExc_ValueError, "Expected a string"); return NULL; } arg2 = PyString_AsString(obj0); arg3 = PyString_Size(obj0); } { Py_BEGIN_ALLOW_THREADS result = (int)idmef_additional_data_new_date_time_nodup_fast(arg1,arg2,arg3); Py_END_ALLOW_THREADS } { if ( result < 0 ) { swig_python_raise_exception(result); resultobj = NULL; } else { resultobj = PyInt_FromLong(result); } } { if ( result >= 0 ) resultobj = SWIG_NewPointerObj((void *) * arg1, SWIGTYPE_p_idmef_additional_data, 0); } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_additional_data_new_date_time_nodup(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_additional_data_t **arg1 = (idmef_additional_data_t **) 0 ; char *arg2 = (char *) 0 ; idmef_additional_data_t *tmp1 ; int res2 ; char *buf2 = 0 ; int alloc2 = 0 ; PyObject * obj0 = 0 ; int result; { arg1 = (idmef_additional_data_t **) &tmp1; } if (!PyArg_ParseTuple(args,(char *)"O:idmef_additional_data_new_date_time_nodup",&obj0)) SWIG_fail; res2 = SWIG_AsCharPtrAndSize(obj0, &buf2, NULL, &alloc2); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "idmef_additional_data_new_date_time_nodup" "', argument " "2"" of type '" "char *""'"); } arg2 = (char *)(buf2); { Py_BEGIN_ALLOW_THREADS result = (int)idmef_additional_data_new_date_time_nodup(arg1,arg2); Py_END_ALLOW_THREADS } { if ( result < 0 ) { swig_python_raise_exception(result); resultobj = NULL; } else { resultobj = PyInt_FromLong(result); } } { if ( result >= 0 ) resultobj = SWIG_NewPointerObj((void *) * arg1, SWIGTYPE_p_idmef_additional_data, 0); } if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); return resultobj; fail: if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); return NULL; } SWIGINTERN PyObject *_wrap_idmef_additional_data_set_date_time_nodup_fast(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_additional_data_t *arg1 = (idmef_additional_data_t *) 0 ; char *arg2 = (char *) 0 ; size_t arg3 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; int result; if (!PyArg_ParseTuple(args,(char *)"OO:idmef_additional_data_set_date_time_nodup_fast",&obj0,&obj1)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_additional_data, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { if ( ! PyString_Check(obj1) ) { PyErr_SetString(PyExc_ValueError, "Expected a string"); return NULL; } arg2 = PyString_AsString(obj1); arg3 = PyString_Size(obj1); } { Py_BEGIN_ALLOW_THREADS result = (int)idmef_additional_data_set_date_time_nodup_fast(arg1,arg2,arg3); Py_END_ALLOW_THREADS } { if ( result < 0 ) { swig_python_raise_exception(result); resultobj = NULL; } else { resultobj = PyInt_FromLong(result); } } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_additional_data_set_date_time_nodup(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_additional_data_t *arg1 = (idmef_additional_data_t *) 0 ; char *arg2 = (char *) 0 ; int res2 ; char *buf2 = 0 ; int alloc2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; int result; if (!PyArg_ParseTuple(args,(char *)"OO:idmef_additional_data_set_date_time_nodup",&obj0,&obj1)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_additional_data, SWIG_POINTER_EXCEPTION|0) ) return NULL; } res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "idmef_additional_data_set_date_time_nodup" "', argument " "2"" of type '" "char *""'"); } arg2 = (char *)(buf2); { Py_BEGIN_ALLOW_THREADS result = (int)idmef_additional_data_set_date_time_nodup(arg1,arg2); Py_END_ALLOW_THREADS } { if ( result < 0 ) { swig_python_raise_exception(result); resultobj = NULL; } else { resultobj = PyInt_FromLong(result); } } if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); return resultobj; fail: if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); return NULL; } SWIGINTERN PyObject *_wrap_idmef_additional_data_new_portlist_ref_fast(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_additional_data_t **arg1 = (idmef_additional_data_t **) 0 ; char *arg2 = (char *) 0 ; size_t arg3 ; idmef_additional_data_t *tmp1 ; PyObject * obj0 = 0 ; int result; { arg1 = (idmef_additional_data_t **) &tmp1; } if (!PyArg_ParseTuple(args,(char *)"O:idmef_additional_data_new_portlist_ref_fast",&obj0)) SWIG_fail; { if ( ! PyString_Check(obj0) ) { PyErr_SetString(PyExc_ValueError, "Expected a string"); return NULL; } arg2 = PyString_AsString(obj0); arg3 = PyString_Size(obj0); } { Py_BEGIN_ALLOW_THREADS result = (int)idmef_additional_data_new_portlist_ref_fast(arg1,(char const *)arg2,arg3); Py_END_ALLOW_THREADS } { if ( result < 0 ) { swig_python_raise_exception(result); resultobj = NULL; } else { resultobj = PyInt_FromLong(result); } } { if ( result >= 0 ) resultobj = SWIG_NewPointerObj((void *) * arg1, SWIGTYPE_p_idmef_additional_data, 0); } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_additional_data_new_portlist_ref(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_additional_data_t **arg1 = (idmef_additional_data_t **) 0 ; char *arg2 = (char *) 0 ; idmef_additional_data_t *tmp1 ; PyObject * obj0 = 0 ; int result; { arg1 = (idmef_additional_data_t **) &tmp1; } if (!PyArg_ParseTuple(args,(char *)"O:idmef_additional_data_new_portlist_ref",&obj0)) SWIG_fail; { if ( obj0 == Py_None ) arg2 = NULL; else if ( PyString_Check(obj0) ) arg2 = PyString_AsString(obj0); else { PyErr_Format(PyExc_TypeError, "expected None or string, %s found", obj0->ob_type->tp_name); return NULL; } } { Py_BEGIN_ALLOW_THREADS result = (int)idmef_additional_data_new_portlist_ref(arg1,(char const *)arg2); Py_END_ALLOW_THREADS } { if ( result < 0 ) { swig_python_raise_exception(result); resultobj = NULL; } else { resultobj = PyInt_FromLong(result); } } { if ( result >= 0 ) resultobj = SWIG_NewPointerObj((void *) * arg1, SWIGTYPE_p_idmef_additional_data, 0); } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_additional_data_set_portlist_ref_fast(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_additional_data_t *arg1 = (idmef_additional_data_t *) 0 ; char *arg2 = (char *) 0 ; size_t arg3 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; int result; if (!PyArg_ParseTuple(args,(char *)"OO:idmef_additional_data_set_portlist_ref_fast",&obj0,&obj1)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_additional_data, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { if ( ! PyString_Check(obj1) ) { PyErr_SetString(PyExc_ValueError, "Expected a string"); return NULL; } arg2 = PyString_AsString(obj1); arg3 = PyString_Size(obj1); } { Py_BEGIN_ALLOW_THREADS result = (int)idmef_additional_data_set_portlist_ref_fast(arg1,(char const *)arg2,arg3); Py_END_ALLOW_THREADS } { if ( result < 0 ) { swig_python_raise_exception(result); resultobj = NULL; } else { resultobj = PyInt_FromLong(result); } } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_additional_data_set_portlist_ref(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_additional_data_t *arg1 = (idmef_additional_data_t *) 0 ; char *arg2 = (char *) 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; int result; if (!PyArg_ParseTuple(args,(char *)"OO:idmef_additional_data_set_portlist_ref",&obj0,&obj1)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_additional_data, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { if ( obj1 == Py_None ) arg2 = NULL; else if ( PyString_Check(obj1) ) arg2 = PyString_AsString(obj1); else { PyErr_Format(PyExc_TypeError, "expected None or string, %s found", obj1->ob_type->tp_name); return NULL; } } { Py_BEGIN_ALLOW_THREADS result = (int)idmef_additional_data_set_portlist_ref(arg1,(char const *)arg2); Py_END_ALLOW_THREADS } { if ( result < 0 ) { swig_python_raise_exception(result); resultobj = NULL; } else { resultobj = PyInt_FromLong(result); } } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_additional_data_new_portlist_dup_fast(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_additional_data_t **arg1 = (idmef_additional_data_t **) 0 ; char *arg2 = (char *) 0 ; size_t arg3 ; idmef_additional_data_t *tmp1 ; PyObject * obj0 = 0 ; int result; { arg1 = (idmef_additional_data_t **) &tmp1; } if (!PyArg_ParseTuple(args,(char *)"O:idmef_additional_data_new_portlist_dup_fast",&obj0)) SWIG_fail; { if ( ! PyString_Check(obj0) ) { PyErr_SetString(PyExc_ValueError, "Expected a string"); return NULL; } arg2 = PyString_AsString(obj0); arg3 = PyString_Size(obj0); } { Py_BEGIN_ALLOW_THREADS result = (int)idmef_additional_data_new_portlist_dup_fast(arg1,(char const *)arg2,arg3); Py_END_ALLOW_THREADS } { if ( result < 0 ) { swig_python_raise_exception(result); resultobj = NULL; } else { resultobj = PyInt_FromLong(result); } } { if ( result >= 0 ) resultobj = SWIG_NewPointerObj((void *) * arg1, SWIGTYPE_p_idmef_additional_data, 0); } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_additional_data_new_portlist_dup(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_additional_data_t **arg1 = (idmef_additional_data_t **) 0 ; char *arg2 = (char *) 0 ; idmef_additional_data_t *tmp1 ; PyObject * obj0 = 0 ; int result; { arg1 = (idmef_additional_data_t **) &tmp1; } if (!PyArg_ParseTuple(args,(char *)"O:idmef_additional_data_new_portlist_dup",&obj0)) SWIG_fail; { if ( obj0 == Py_None ) arg2 = NULL; else if ( PyString_Check(obj0) ) arg2 = PyString_AsString(obj0); else { PyErr_Format(PyExc_TypeError, "expected None or string, %s found", obj0->ob_type->tp_name); return NULL; } } { Py_BEGIN_ALLOW_THREADS result = (int)idmef_additional_data_new_portlist_dup(arg1,(char const *)arg2); Py_END_ALLOW_THREADS } { if ( result < 0 ) { swig_python_raise_exception(result); resultobj = NULL; } else { resultobj = PyInt_FromLong(result); } } { if ( result >= 0 ) resultobj = SWIG_NewPointerObj((void *) * arg1, SWIGTYPE_p_idmef_additional_data, 0); } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_additional_data_set_portlist_dup_fast(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_additional_data_t *arg1 = (idmef_additional_data_t *) 0 ; char *arg2 = (char *) 0 ; size_t arg3 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; int result; if (!PyArg_ParseTuple(args,(char *)"OO:idmef_additional_data_set_portlist_dup_fast",&obj0,&obj1)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_additional_data, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { if ( ! PyString_Check(obj1) ) { PyErr_SetString(PyExc_ValueError, "Expected a string"); return NULL; } arg2 = PyString_AsString(obj1); arg3 = PyString_Size(obj1); } { Py_BEGIN_ALLOW_THREADS result = (int)idmef_additional_data_set_portlist_dup_fast(arg1,(char const *)arg2,arg3); Py_END_ALLOW_THREADS } { if ( result < 0 ) { swig_python_raise_exception(result); resultobj = NULL; } else { resultobj = PyInt_FromLong(result); } } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_additional_data_set_portlist_dup(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_additional_data_t *arg1 = (idmef_additional_data_t *) 0 ; char *arg2 = (char *) 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; int result; if (!PyArg_ParseTuple(args,(char *)"OO:idmef_additional_data_set_portlist_dup",&obj0,&obj1)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_additional_data, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { if ( obj1 == Py_None ) arg2 = NULL; else if ( PyString_Check(obj1) ) arg2 = PyString_AsString(obj1); else { PyErr_Format(PyExc_TypeError, "expected None or string, %s found", obj1->ob_type->tp_name); return NULL; } } { Py_BEGIN_ALLOW_THREADS result = (int)idmef_additional_data_set_portlist_dup(arg1,(char const *)arg2); Py_END_ALLOW_THREADS } { if ( result < 0 ) { swig_python_raise_exception(result); resultobj = NULL; } else { resultobj = PyInt_FromLong(result); } } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_additional_data_new_portlist_nodup_fast(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_additional_data_t **arg1 = (idmef_additional_data_t **) 0 ; char *arg2 = (char *) 0 ; size_t arg3 ; idmef_additional_data_t *tmp1 ; PyObject * obj0 = 0 ; int result; { arg1 = (idmef_additional_data_t **) &tmp1; } if (!PyArg_ParseTuple(args,(char *)"O:idmef_additional_data_new_portlist_nodup_fast",&obj0)) SWIG_fail; { if ( ! PyString_Check(obj0) ) { PyErr_SetString(PyExc_ValueError, "Expected a string"); return NULL; } arg2 = PyString_AsString(obj0); arg3 = PyString_Size(obj0); } { Py_BEGIN_ALLOW_THREADS result = (int)idmef_additional_data_new_portlist_nodup_fast(arg1,arg2,arg3); Py_END_ALLOW_THREADS } { if ( result < 0 ) { swig_python_raise_exception(result); resultobj = NULL; } else { resultobj = PyInt_FromLong(result); } } { if ( result >= 0 ) resultobj = SWIG_NewPointerObj((void *) * arg1, SWIGTYPE_p_idmef_additional_data, 0); } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_additional_data_new_portlist_nodup(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_additional_data_t **arg1 = (idmef_additional_data_t **) 0 ; char *arg2 = (char *) 0 ; idmef_additional_data_t *tmp1 ; int res2 ; char *buf2 = 0 ; int alloc2 = 0 ; PyObject * obj0 = 0 ; int result; { arg1 = (idmef_additional_data_t **) &tmp1; } if (!PyArg_ParseTuple(args,(char *)"O:idmef_additional_data_new_portlist_nodup",&obj0)) SWIG_fail; res2 = SWIG_AsCharPtrAndSize(obj0, &buf2, NULL, &alloc2); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "idmef_additional_data_new_portlist_nodup" "', argument " "2"" of type '" "char *""'"); } arg2 = (char *)(buf2); { Py_BEGIN_ALLOW_THREADS result = (int)idmef_additional_data_new_portlist_nodup(arg1,arg2); Py_END_ALLOW_THREADS } { if ( result < 0 ) { swig_python_raise_exception(result); resultobj = NULL; } else { resultobj = PyInt_FromLong(result); } } { if ( result >= 0 ) resultobj = SWIG_NewPointerObj((void *) * arg1, SWIGTYPE_p_idmef_additional_data, 0); } if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); return resultobj; fail: if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); return NULL; } SWIGINTERN PyObject *_wrap_idmef_additional_data_set_portlist_nodup_fast(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_additional_data_t *arg1 = (idmef_additional_data_t *) 0 ; char *arg2 = (char *) 0 ; size_t arg3 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; int result; if (!PyArg_ParseTuple(args,(char *)"OO:idmef_additional_data_set_portlist_nodup_fast",&obj0,&obj1)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_additional_data, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { if ( ! PyString_Check(obj1) ) { PyErr_SetString(PyExc_ValueError, "Expected a string"); return NULL; } arg2 = PyString_AsString(obj1); arg3 = PyString_Size(obj1); } { Py_BEGIN_ALLOW_THREADS result = (int)idmef_additional_data_set_portlist_nodup_fast(arg1,arg2,arg3); Py_END_ALLOW_THREADS } { if ( result < 0 ) { swig_python_raise_exception(result); resultobj = NULL; } else { resultobj = PyInt_FromLong(result); } } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_additional_data_set_portlist_nodup(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_additional_data_t *arg1 = (idmef_additional_data_t *) 0 ; char *arg2 = (char *) 0 ; int res2 ; char *buf2 = 0 ; int alloc2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; int result; if (!PyArg_ParseTuple(args,(char *)"OO:idmef_additional_data_set_portlist_nodup",&obj0,&obj1)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_additional_data, SWIG_POINTER_EXCEPTION|0) ) return NULL; } res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "idmef_additional_data_set_portlist_nodup" "', argument " "2"" of type '" "char *""'"); } arg2 = (char *)(buf2); { Py_BEGIN_ALLOW_THREADS result = (int)idmef_additional_data_set_portlist_nodup(arg1,arg2); Py_END_ALLOW_THREADS } { if ( result < 0 ) { swig_python_raise_exception(result); resultobj = NULL; } else { resultobj = PyInt_FromLong(result); } } if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); return resultobj; fail: if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); return NULL; } SWIGINTERN PyObject *_wrap_idmef_additional_data_new_xml_ref_fast(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_additional_data_t **arg1 = (idmef_additional_data_t **) 0 ; char *arg2 = (char *) 0 ; size_t arg3 ; idmef_additional_data_t *tmp1 ; PyObject * obj0 = 0 ; int result; { arg1 = (idmef_additional_data_t **) &tmp1; } if (!PyArg_ParseTuple(args,(char *)"O:idmef_additional_data_new_xml_ref_fast",&obj0)) SWIG_fail; { if ( ! PyString_Check(obj0) ) { PyErr_SetString(PyExc_ValueError, "Expected a string"); return NULL; } arg2 = PyString_AsString(obj0); arg3 = PyString_Size(obj0); } { Py_BEGIN_ALLOW_THREADS result = (int)idmef_additional_data_new_xml_ref_fast(arg1,(char const *)arg2,arg3); Py_END_ALLOW_THREADS } { if ( result < 0 ) { swig_python_raise_exception(result); resultobj = NULL; } else { resultobj = PyInt_FromLong(result); } } { if ( result >= 0 ) resultobj = SWIG_NewPointerObj((void *) * arg1, SWIGTYPE_p_idmef_additional_data, 0); } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_additional_data_new_xml_ref(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_additional_data_t **arg1 = (idmef_additional_data_t **) 0 ; char *arg2 = (char *) 0 ; idmef_additional_data_t *tmp1 ; PyObject * obj0 = 0 ; int result; { arg1 = (idmef_additional_data_t **) &tmp1; } if (!PyArg_ParseTuple(args,(char *)"O:idmef_additional_data_new_xml_ref",&obj0)) SWIG_fail; { if ( obj0 == Py_None ) arg2 = NULL; else if ( PyString_Check(obj0) ) arg2 = PyString_AsString(obj0); else { PyErr_Format(PyExc_TypeError, "expected None or string, %s found", obj0->ob_type->tp_name); return NULL; } } { Py_BEGIN_ALLOW_THREADS result = (int)idmef_additional_data_new_xml_ref(arg1,(char const *)arg2); Py_END_ALLOW_THREADS } { if ( result < 0 ) { swig_python_raise_exception(result); resultobj = NULL; } else { resultobj = PyInt_FromLong(result); } } { if ( result >= 0 ) resultobj = SWIG_NewPointerObj((void *) * arg1, SWIGTYPE_p_idmef_additional_data, 0); } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_additional_data_set_xml_ref_fast(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_additional_data_t *arg1 = (idmef_additional_data_t *) 0 ; char *arg2 = (char *) 0 ; size_t arg3 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; int result; if (!PyArg_ParseTuple(args,(char *)"OO:idmef_additional_data_set_xml_ref_fast",&obj0,&obj1)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_additional_data, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { if ( ! PyString_Check(obj1) ) { PyErr_SetString(PyExc_ValueError, "Expected a string"); return NULL; } arg2 = PyString_AsString(obj1); arg3 = PyString_Size(obj1); } { Py_BEGIN_ALLOW_THREADS result = (int)idmef_additional_data_set_xml_ref_fast(arg1,(char const *)arg2,arg3); Py_END_ALLOW_THREADS } { if ( result < 0 ) { swig_python_raise_exception(result); resultobj = NULL; } else { resultobj = PyInt_FromLong(result); } } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_additional_data_set_xml_ref(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_additional_data_t *arg1 = (idmef_additional_data_t *) 0 ; char *arg2 = (char *) 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; int result; if (!PyArg_ParseTuple(args,(char *)"OO:idmef_additional_data_set_xml_ref",&obj0,&obj1)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_additional_data, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { if ( obj1 == Py_None ) arg2 = NULL; else if ( PyString_Check(obj1) ) arg2 = PyString_AsString(obj1); else { PyErr_Format(PyExc_TypeError, "expected None or string, %s found", obj1->ob_type->tp_name); return NULL; } } { Py_BEGIN_ALLOW_THREADS result = (int)idmef_additional_data_set_xml_ref(arg1,(char const *)arg2); Py_END_ALLOW_THREADS } { if ( result < 0 ) { swig_python_raise_exception(result); resultobj = NULL; } else { resultobj = PyInt_FromLong(result); } } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_additional_data_new_xml_dup_fast(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_additional_data_t **arg1 = (idmef_additional_data_t **) 0 ; char *arg2 = (char *) 0 ; size_t arg3 ; idmef_additional_data_t *tmp1 ; PyObject * obj0 = 0 ; int result; { arg1 = (idmef_additional_data_t **) &tmp1; } if (!PyArg_ParseTuple(args,(char *)"O:idmef_additional_data_new_xml_dup_fast",&obj0)) SWIG_fail; { if ( ! PyString_Check(obj0) ) { PyErr_SetString(PyExc_ValueError, "Expected a string"); return NULL; } arg2 = PyString_AsString(obj0); arg3 = PyString_Size(obj0); } { Py_BEGIN_ALLOW_THREADS result = (int)idmef_additional_data_new_xml_dup_fast(arg1,(char const *)arg2,arg3); Py_END_ALLOW_THREADS } { if ( result < 0 ) { swig_python_raise_exception(result); resultobj = NULL; } else { resultobj = PyInt_FromLong(result); } } { if ( result >= 0 ) resultobj = SWIG_NewPointerObj((void *) * arg1, SWIGTYPE_p_idmef_additional_data, 0); } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_additional_data_new_xml_dup(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_additional_data_t **arg1 = (idmef_additional_data_t **) 0 ; char *arg2 = (char *) 0 ; idmef_additional_data_t *tmp1 ; PyObject * obj0 = 0 ; int result; { arg1 = (idmef_additional_data_t **) &tmp1; } if (!PyArg_ParseTuple(args,(char *)"O:idmef_additional_data_new_xml_dup",&obj0)) SWIG_fail; { if ( obj0 == Py_None ) arg2 = NULL; else if ( PyString_Check(obj0) ) arg2 = PyString_AsString(obj0); else { PyErr_Format(PyExc_TypeError, "expected None or string, %s found", obj0->ob_type->tp_name); return NULL; } } { Py_BEGIN_ALLOW_THREADS result = (int)idmef_additional_data_new_xml_dup(arg1,(char const *)arg2); Py_END_ALLOW_THREADS } { if ( result < 0 ) { swig_python_raise_exception(result); resultobj = NULL; } else { resultobj = PyInt_FromLong(result); } } { if ( result >= 0 ) resultobj = SWIG_NewPointerObj((void *) * arg1, SWIGTYPE_p_idmef_additional_data, 0); } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_additional_data_set_xml_dup_fast(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_additional_data_t *arg1 = (idmef_additional_data_t *) 0 ; char *arg2 = (char *) 0 ; size_t arg3 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; int result; if (!PyArg_ParseTuple(args,(char *)"OO:idmef_additional_data_set_xml_dup_fast",&obj0,&obj1)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_additional_data, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { if ( ! PyString_Check(obj1) ) { PyErr_SetString(PyExc_ValueError, "Expected a string"); return NULL; } arg2 = PyString_AsString(obj1); arg3 = PyString_Size(obj1); } { Py_BEGIN_ALLOW_THREADS result = (int)idmef_additional_data_set_xml_dup_fast(arg1,(char const *)arg2,arg3); Py_END_ALLOW_THREADS } { if ( result < 0 ) { swig_python_raise_exception(result); resultobj = NULL; } else { resultobj = PyInt_FromLong(result); } } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_additional_data_set_xml_dup(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_additional_data_t *arg1 = (idmef_additional_data_t *) 0 ; char *arg2 = (char *) 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; int result; if (!PyArg_ParseTuple(args,(char *)"OO:idmef_additional_data_set_xml_dup",&obj0,&obj1)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_additional_data, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { if ( obj1 == Py_None ) arg2 = NULL; else if ( PyString_Check(obj1) ) arg2 = PyString_AsString(obj1); else { PyErr_Format(PyExc_TypeError, "expected None or string, %s found", obj1->ob_type->tp_name); return NULL; } } { Py_BEGIN_ALLOW_THREADS result = (int)idmef_additional_data_set_xml_dup(arg1,(char const *)arg2); Py_END_ALLOW_THREADS } { if ( result < 0 ) { swig_python_raise_exception(result); resultobj = NULL; } else { resultobj = PyInt_FromLong(result); } } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_additional_data_new_xml_nodup_fast(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_additional_data_t **arg1 = (idmef_additional_data_t **) 0 ; char *arg2 = (char *) 0 ; size_t arg3 ; idmef_additional_data_t *tmp1 ; PyObject * obj0 = 0 ; int result; { arg1 = (idmef_additional_data_t **) &tmp1; } if (!PyArg_ParseTuple(args,(char *)"O:idmef_additional_data_new_xml_nodup_fast",&obj0)) SWIG_fail; { if ( ! PyString_Check(obj0) ) { PyErr_SetString(PyExc_ValueError, "Expected a string"); return NULL; } arg2 = PyString_AsString(obj0); arg3 = PyString_Size(obj0); } { Py_BEGIN_ALLOW_THREADS result = (int)idmef_additional_data_new_xml_nodup_fast(arg1,arg2,arg3); Py_END_ALLOW_THREADS } { if ( result < 0 ) { swig_python_raise_exception(result); resultobj = NULL; } else { resultobj = PyInt_FromLong(result); } } { if ( result >= 0 ) resultobj = SWIG_NewPointerObj((void *) * arg1, SWIGTYPE_p_idmef_additional_data, 0); } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_additional_data_new_xml_nodup(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_additional_data_t **arg1 = (idmef_additional_data_t **) 0 ; char *arg2 = (char *) 0 ; idmef_additional_data_t *tmp1 ; int res2 ; char *buf2 = 0 ; int alloc2 = 0 ; PyObject * obj0 = 0 ; int result; { arg1 = (idmef_additional_data_t **) &tmp1; } if (!PyArg_ParseTuple(args,(char *)"O:idmef_additional_data_new_xml_nodup",&obj0)) SWIG_fail; res2 = SWIG_AsCharPtrAndSize(obj0, &buf2, NULL, &alloc2); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "idmef_additional_data_new_xml_nodup" "', argument " "2"" of type '" "char *""'"); } arg2 = (char *)(buf2); { Py_BEGIN_ALLOW_THREADS result = (int)idmef_additional_data_new_xml_nodup(arg1,arg2); Py_END_ALLOW_THREADS } { if ( result < 0 ) { swig_python_raise_exception(result); resultobj = NULL; } else { resultobj = PyInt_FromLong(result); } } { if ( result >= 0 ) resultobj = SWIG_NewPointerObj((void *) * arg1, SWIGTYPE_p_idmef_additional_data, 0); } if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); return resultobj; fail: if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); return NULL; } SWIGINTERN PyObject *_wrap_idmef_additional_data_set_xml_nodup_fast(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_additional_data_t *arg1 = (idmef_additional_data_t *) 0 ; char *arg2 = (char *) 0 ; size_t arg3 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; int result; if (!PyArg_ParseTuple(args,(char *)"OO:idmef_additional_data_set_xml_nodup_fast",&obj0,&obj1)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_additional_data, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { if ( ! PyString_Check(obj1) ) { PyErr_SetString(PyExc_ValueError, "Expected a string"); return NULL; } arg2 = PyString_AsString(obj1); arg3 = PyString_Size(obj1); } { Py_BEGIN_ALLOW_THREADS result = (int)idmef_additional_data_set_xml_nodup_fast(arg1,arg2,arg3); Py_END_ALLOW_THREADS } { if ( result < 0 ) { swig_python_raise_exception(result); resultobj = NULL; } else { resultobj = PyInt_FromLong(result); } } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_additional_data_set_xml_nodup(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_additional_data_t *arg1 = (idmef_additional_data_t *) 0 ; char *arg2 = (char *) 0 ; int res2 ; char *buf2 = 0 ; int alloc2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; int result; if (!PyArg_ParseTuple(args,(char *)"OO:idmef_additional_data_set_xml_nodup",&obj0,&obj1)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_additional_data, SWIG_POINTER_EXCEPTION|0) ) return NULL; } res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "idmef_additional_data_set_xml_nodup" "', argument " "2"" of type '" "char *""'"); } arg2 = (char *)(buf2); { Py_BEGIN_ALLOW_THREADS result = (int)idmef_additional_data_set_xml_nodup(arg1,arg2); Py_END_ALLOW_THREADS } { if ( result < 0 ) { swig_python_raise_exception(result); resultobj = NULL; } else { resultobj = PyInt_FromLong(result); } } if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); return resultobj; fail: if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); return NULL; } SWIGINTERN PyObject *_wrap_idmef_additional_data_new_byte_string_ref(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_additional_data_t **arg1 = (idmef_additional_data_t **) 0 ; unsigned char *arg2 = (unsigned char *) 0 ; size_t arg3 ; idmef_additional_data_t *tmp1 ; PyObject * obj0 = 0 ; int result; { arg1 = (idmef_additional_data_t **) &tmp1; } if (!PyArg_ParseTuple(args,(char *)"O:idmef_additional_data_new_byte_string_ref",&obj0)) SWIG_fail; { if ( ! PyString_Check(obj0) ) { PyErr_SetString(PyExc_ValueError, "Expected a string"); return NULL; } arg2 = (unsigned char *) PyString_AsString(obj0); arg3 = PyString_Size(obj0); } { Py_BEGIN_ALLOW_THREADS result = (int)idmef_additional_data_new_byte_string_ref(arg1,(unsigned char const *)arg2,arg3); Py_END_ALLOW_THREADS } { if ( result < 0 ) { swig_python_raise_exception(result); resultobj = NULL; } else { resultobj = PyInt_FromLong(result); } } { if ( result >= 0 ) resultobj = SWIG_NewPointerObj((void *) * arg1, SWIGTYPE_p_idmef_additional_data, 0); } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_additional_data_set_byte_string_ref(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_additional_data_t *arg1 = (idmef_additional_data_t *) 0 ; unsigned char *arg2 = (unsigned char *) 0 ; size_t arg3 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; int result; if (!PyArg_ParseTuple(args,(char *)"OO:idmef_additional_data_set_byte_string_ref",&obj0,&obj1)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_additional_data, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { if ( ! PyString_Check(obj1) ) { PyErr_SetString(PyExc_ValueError, "Expected a string"); return NULL; } arg2 = (unsigned char *) PyString_AsString(obj1); arg3 = PyString_Size(obj1); } { Py_BEGIN_ALLOW_THREADS result = (int)idmef_additional_data_set_byte_string_ref(arg1,(unsigned char const *)arg2,arg3); Py_END_ALLOW_THREADS } { if ( result < 0 ) { swig_python_raise_exception(result); resultobj = NULL; } else { resultobj = PyInt_FromLong(result); } } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_additional_data_new_byte_string_dup(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_additional_data_t **arg1 = (idmef_additional_data_t **) 0 ; unsigned char *arg2 = (unsigned char *) 0 ; size_t arg3 ; idmef_additional_data_t *tmp1 ; PyObject * obj0 = 0 ; int result; { arg1 = (idmef_additional_data_t **) &tmp1; } if (!PyArg_ParseTuple(args,(char *)"O:idmef_additional_data_new_byte_string_dup",&obj0)) SWIG_fail; { if ( ! PyString_Check(obj0) ) { PyErr_SetString(PyExc_ValueError, "Expected a string"); return NULL; } arg2 = (unsigned char *) PyString_AsString(obj0); arg3 = PyString_Size(obj0); } { Py_BEGIN_ALLOW_THREADS result = (int)idmef_additional_data_new_byte_string_dup(arg1,(unsigned char const *)arg2,arg3); Py_END_ALLOW_THREADS } { if ( result < 0 ) { swig_python_raise_exception(result); resultobj = NULL; } else { resultobj = PyInt_FromLong(result); } } { if ( result >= 0 ) resultobj = SWIG_NewPointerObj((void *) * arg1, SWIGTYPE_p_idmef_additional_data, 0); } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_additional_data_set_byte_string_dup(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_additional_data_t *arg1 = (idmef_additional_data_t *) 0 ; unsigned char *arg2 = (unsigned char *) 0 ; size_t arg3 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; int result; if (!PyArg_ParseTuple(args,(char *)"OO:idmef_additional_data_set_byte_string_dup",&obj0,&obj1)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_additional_data, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { if ( ! PyString_Check(obj1) ) { PyErr_SetString(PyExc_ValueError, "Expected a string"); return NULL; } arg2 = (unsigned char *) PyString_AsString(obj1); arg3 = PyString_Size(obj1); } { Py_BEGIN_ALLOW_THREADS result = (int)idmef_additional_data_set_byte_string_dup(arg1,(unsigned char const *)arg2,arg3); Py_END_ALLOW_THREADS } { if ( result < 0 ) { swig_python_raise_exception(result); resultobj = NULL; } else { resultobj = PyInt_FromLong(result); } } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_additional_data_new_byte_string_nodup(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_additional_data_t **arg1 = (idmef_additional_data_t **) 0 ; unsigned char *arg2 = (unsigned char *) 0 ; size_t arg3 ; idmef_additional_data_t *tmp1 ; PyObject * obj0 = 0 ; int result; { arg1 = (idmef_additional_data_t **) &tmp1; } if (!PyArg_ParseTuple(args,(char *)"O:idmef_additional_data_new_byte_string_nodup",&obj0)) SWIG_fail; { if ( ! PyString_Check(obj0) ) { PyErr_SetString(PyExc_ValueError, "Expected a string"); return NULL; } arg2 = (unsigned char *) PyString_AsString(obj0); arg3 = PyString_Size(obj0); } { Py_BEGIN_ALLOW_THREADS result = (int)idmef_additional_data_new_byte_string_nodup(arg1,arg2,arg3); Py_END_ALLOW_THREADS } { if ( result < 0 ) { swig_python_raise_exception(result); resultobj = NULL; } else { resultobj = PyInt_FromLong(result); } } { if ( result >= 0 ) resultobj = SWIG_NewPointerObj((void *) * arg1, SWIGTYPE_p_idmef_additional_data, 0); } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_additional_data_set_byte_string_nodup(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_additional_data_t *arg1 = (idmef_additional_data_t *) 0 ; unsigned char *arg2 = (unsigned char *) 0 ; size_t arg3 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; int result; if (!PyArg_ParseTuple(args,(char *)"OO:idmef_additional_data_set_byte_string_nodup",&obj0,&obj1)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_additional_data, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { if ( ! PyString_Check(obj1) ) { PyErr_SetString(PyExc_ValueError, "Expected a string"); return NULL; } arg2 = (unsigned char *) PyString_AsString(obj1); arg3 = PyString_Size(obj1); } { Py_BEGIN_ALLOW_THREADS result = (int)idmef_additional_data_set_byte_string_nodup(arg1,arg2,arg3); Py_END_ALLOW_THREADS } { if ( result < 0 ) { swig_python_raise_exception(result); resultobj = NULL; } else { resultobj = PyInt_FromLong(result); } } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_additional_data_copy_ref(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_additional_data_t *arg1 = (idmef_additional_data_t *) 0 ; idmef_additional_data_t *arg2 = (idmef_additional_data_t *) 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; int result; if (!PyArg_ParseTuple(args,(char *)"OO:idmef_additional_data_copy_ref",&obj0,&obj1)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_additional_data, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { if ( obj1 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj1, (void **)&arg2, SWIGTYPE_p_idmef_additional_data, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { Py_BEGIN_ALLOW_THREADS result = (int)idmef_additional_data_copy_ref(arg1,arg2); Py_END_ALLOW_THREADS } { if ( result < 0 ) { swig_python_raise_exception(result); resultobj = NULL; } else { resultobj = PyInt_FromLong(result); } } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_additional_data_copy_dup(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_additional_data_t *arg1 = (idmef_additional_data_t *) 0 ; idmef_additional_data_t *arg2 = (idmef_additional_data_t *) 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; int result; if (!PyArg_ParseTuple(args,(char *)"OO:idmef_additional_data_copy_dup",&obj0,&obj1)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_additional_data, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { if ( obj1 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj1, (void **)&arg2, SWIGTYPE_p_idmef_additional_data, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { Py_BEGIN_ALLOW_THREADS result = (int)idmef_additional_data_copy_dup(arg1,arg2); Py_END_ALLOW_THREADS } { if ( result < 0 ) { swig_python_raise_exception(result); resultobj = NULL; } else { resultobj = PyInt_FromLong(result); } } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_additional_data_get_real(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_additional_data_t *arg1 = (idmef_additional_data_t *) 0 ; PyObject * obj0 = 0 ; float result; if (!PyArg_ParseTuple(args,(char *)"O:idmef_additional_data_get_real",&obj0)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_additional_data, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { Py_BEGIN_ALLOW_THREADS result = (float)idmef_additional_data_get_real(arg1); Py_END_ALLOW_THREADS } resultobj = SWIG_From_float((float)(result)); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_additional_data_get_integer(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_additional_data_t *arg1 = (idmef_additional_data_t *) 0 ; PyObject * obj0 = 0 ; uint32_t result; if (!PyArg_ParseTuple(args,(char *)"O:idmef_additional_data_get_integer",&obj0)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_additional_data, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { Py_BEGIN_ALLOW_THREADS result = (uint32_t)idmef_additional_data_get_integer(arg1); Py_END_ALLOW_THREADS } { resultobj = PyLong_FromUnsignedLong(result); } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_additional_data_get_boolean(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_additional_data_t *arg1 = (idmef_additional_data_t *) 0 ; PyObject * obj0 = 0 ; prelude_bool_t result; if (!PyArg_ParseTuple(args,(char *)"O:idmef_additional_data_get_boolean",&obj0)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_additional_data, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { Py_BEGIN_ALLOW_THREADS result = (prelude_bool_t)idmef_additional_data_get_boolean(arg1); Py_END_ALLOW_THREADS } resultobj = SWIG_From_int((int)(result)); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_additional_data_get_character(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_additional_data_t *arg1 = (idmef_additional_data_t *) 0 ; PyObject * obj0 = 0 ; char result; if (!PyArg_ParseTuple(args,(char *)"O:idmef_additional_data_get_character",&obj0)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_additional_data, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { Py_BEGIN_ALLOW_THREADS result = (char)idmef_additional_data_get_character(arg1); Py_END_ALLOW_THREADS } resultobj = SWIG_From_char((char)(result)); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_additional_data_get_byte(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_additional_data_t *arg1 = (idmef_additional_data_t *) 0 ; PyObject * obj0 = 0 ; uint8_t result; if (!PyArg_ParseTuple(args,(char *)"O:idmef_additional_data_get_byte",&obj0)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_additional_data, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { Py_BEGIN_ALLOW_THREADS result = (uint8_t)idmef_additional_data_get_byte(arg1); Py_END_ALLOW_THREADS } resultobj = SWIG_From_unsigned_SS_char((unsigned char)(result)); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_additional_data_get_len(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_additional_data_t *arg1 = (idmef_additional_data_t *) 0 ; PyObject * obj0 = 0 ; size_t result; if (!PyArg_ParseTuple(args,(char *)"O:idmef_additional_data_get_len",&obj0)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_additional_data, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { Py_BEGIN_ALLOW_THREADS result = idmef_additional_data_get_len(arg1); Py_END_ALLOW_THREADS } resultobj = SWIG_From_size_t((size_t)(result)); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_additional_data_is_empty(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_additional_data_t *arg1 = (idmef_additional_data_t *) 0 ; PyObject * obj0 = 0 ; prelude_bool_t result; if (!PyArg_ParseTuple(args,(char *)"O:idmef_additional_data_is_empty",&obj0)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_additional_data, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { Py_BEGIN_ALLOW_THREADS result = (prelude_bool_t)idmef_additional_data_is_empty(arg1); Py_END_ALLOW_THREADS } resultobj = SWIG_From_int((int)(result)); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_additional_data_data_to_string(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_additional_data_t *arg1 = (idmef_additional_data_t *) 0 ; prelude_string_t *arg2 = (prelude_string_t *) 0 ; PyObject * obj0 = 0 ; int result; { int ret; ret = prelude_string_new(&(arg2)); if ( ret < 0 ) { swig_python_raise_exception(ret); return NULL; } } if (!PyArg_ParseTuple(args,(char *)"O:idmef_additional_data_data_to_string",&obj0)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_idmef_additional_data, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { Py_BEGIN_ALLOW_THREADS result = (int)idmef_additional_data_data_to_string(arg1,arg2); Py_END_ALLOW_THREADS } { if ( result < 0 ) { swig_python_raise_exception(result); resultobj = NULL; } else { resultobj = PyInt_FromLong(result); } } { if ( result >= 0 ) resultobj = PyString_FromStringAndSize(prelude_string_get_string(arg2), prelude_string_get_len(arg2)); prelude_string_destroy(arg2); } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_value_type_class_t_object_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_value_type_class_t *arg1 = (idmef_value_type_class_t *) 0 ; void *arg2 = (void *) 0 ; void *argp1 = 0 ; int res1 = 0 ; int res2 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:idmef_value_type_class_t_object_set",&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_idmef_value_type_class_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "idmef_value_type_class_t_object_set" "', argument " "1"" of type '" "idmef_value_type_class_t *""'"); } arg1 = (idmef_value_type_class_t *)(argp1); res2 = SWIG_ConvertPtr(obj1,SWIG_as_voidptrptr(&arg2), 0, SWIG_POINTER_DISOWN); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "idmef_value_type_class_t_object_set" "', argument " "2"" of type '" "void *""'"); } if (arg1) (arg1)->object = arg2; resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_value_type_class_t_object_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_value_type_class_t *arg1 = (idmef_value_type_class_t *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; void *result = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:idmef_value_type_class_t_object_get",&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_idmef_value_type_class_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "idmef_value_type_class_t_object_get" "', argument " "1"" of type '" "idmef_value_type_class_t *""'"); } arg1 = (idmef_value_type_class_t *)(argp1); result = (void *) ((arg1)->object); resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_void, 0 | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_value_type_class_t_class_id_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_value_type_class_t *arg1 = (idmef_value_type_class_t *) 0 ; int arg2 ; void *argp1 = 0 ; int res1 = 0 ; int val2 ; int ecode2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:idmef_value_type_class_t_class_id_set",&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_idmef_value_type_class_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "idmef_value_type_class_t_class_id_set" "', argument " "1"" of type '" "idmef_value_type_class_t *""'"); } arg1 = (idmef_value_type_class_t *)(argp1); ecode2 = SWIG_AsVal_int(obj1, &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "idmef_value_type_class_t_class_id_set" "', argument " "2"" of type '" "int""'"); } arg2 = (int)(val2); if (arg1) (arg1)->class_id = arg2; resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_value_type_class_t_class_id_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_value_type_class_t *arg1 = (idmef_value_type_class_t *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; int result; if (!PyArg_ParseTuple(args,(char *)"O:idmef_value_type_class_t_class_id_get",&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_idmef_value_type_class_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "idmef_value_type_class_t_class_id_get" "', argument " "1"" of type '" "idmef_value_type_class_t *""'"); } arg1 = (idmef_value_type_class_t *)(argp1); result = (int) ((arg1)->class_id); { if ( result < 0 ) { swig_python_raise_exception(result); resultobj = NULL; } else { resultobj = PyInt_FromLong(result); } } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_new_idmef_value_type_class_t(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_value_type_class_t *result = 0 ; if (!PyArg_ParseTuple(args,(char *)":new_idmef_value_type_class_t")) SWIG_fail; { Py_BEGIN_ALLOW_THREADS result = (idmef_value_type_class_t *)calloc(1, sizeof(idmef_value_type_class_t)); Py_END_ALLOW_THREADS } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_idmef_value_type_class_t, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_delete_idmef_value_type_class_t(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_value_type_class_t *arg1 = (idmef_value_type_class_t *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:delete_idmef_value_type_class_t",&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_idmef_value_type_class_t, SWIG_POINTER_DISOWN | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_idmef_value_type_class_t" "', argument " "1"" of type '" "idmef_value_type_class_t *""'"); } arg1 = (idmef_value_type_class_t *)(argp1); { Py_BEGIN_ALLOW_THREADS free((char *) arg1); Py_END_ALLOW_THREADS } resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_value_type_enum_t_value_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_value_type_enum_t *arg1 = (idmef_value_type_enum_t *) 0 ; int arg2 ; void *argp1 = 0 ; int res1 = 0 ; int val2 ; int ecode2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:idmef_value_type_enum_t_value_set",&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_idmef_value_type_enum_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "idmef_value_type_enum_t_value_set" "', argument " "1"" of type '" "idmef_value_type_enum_t *""'"); } arg1 = (idmef_value_type_enum_t *)(argp1); ecode2 = SWIG_AsVal_int(obj1, &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "idmef_value_type_enum_t_value_set" "', argument " "2"" of type '" "int""'"); } arg2 = (int)(val2); if (arg1) (arg1)->value = arg2; resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_value_type_enum_t_value_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_value_type_enum_t *arg1 = (idmef_value_type_enum_t *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; int result; if (!PyArg_ParseTuple(args,(char *)"O:idmef_value_type_enum_t_value_get",&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_idmef_value_type_enum_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "idmef_value_type_enum_t_value_get" "', argument " "1"" of type '" "idmef_value_type_enum_t *""'"); } arg1 = (idmef_value_type_enum_t *)(argp1); result = (int) ((arg1)->value); { if ( result < 0 ) { swig_python_raise_exception(result); resultobj = NULL; } else { resultobj = PyInt_FromLong(result); } } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_value_type_enum_t_class_id_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_value_type_enum_t *arg1 = (idmef_value_type_enum_t *) 0 ; int arg2 ; void *argp1 = 0 ; int res1 = 0 ; int val2 ; int ecode2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:idmef_value_type_enum_t_class_id_set",&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_idmef_value_type_enum_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "idmef_value_type_enum_t_class_id_set" "', argument " "1"" of type '" "idmef_value_type_enum_t *""'"); } arg1 = (idmef_value_type_enum_t *)(argp1); ecode2 = SWIG_AsVal_int(obj1, &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "idmef_value_type_enum_t_class_id_set" "', argument " "2"" of type '" "int""'"); } arg2 = (int)(val2); if (arg1) (arg1)->class_id = arg2; resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_value_type_enum_t_class_id_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_value_type_enum_t *arg1 = (idmef_value_type_enum_t *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; int result; if (!PyArg_ParseTuple(args,(char *)"O:idmef_value_type_enum_t_class_id_get",&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_idmef_value_type_enum_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "idmef_value_type_enum_t_class_id_get" "', argument " "1"" of type '" "idmef_value_type_enum_t *""'"); } arg1 = (idmef_value_type_enum_t *)(argp1); result = (int) ((arg1)->class_id); { if ( result < 0 ) { swig_python_raise_exception(result); resultobj = NULL; } else { resultobj = PyInt_FromLong(result); } } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_new_idmef_value_type_enum_t(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_value_type_enum_t *result = 0 ; if (!PyArg_ParseTuple(args,(char *)":new_idmef_value_type_enum_t")) SWIG_fail; { Py_BEGIN_ALLOW_THREADS result = (idmef_value_type_enum_t *)calloc(1, sizeof(idmef_value_type_enum_t)); Py_END_ALLOW_THREADS } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_idmef_value_type_enum_t, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_delete_idmef_value_type_enum_t(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_value_type_enum_t *arg1 = (idmef_value_type_enum_t *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:delete_idmef_value_type_enum_t",&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_idmef_value_type_enum_t, SWIG_POINTER_DISOWN | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_idmef_value_type_enum_t" "', argument " "1"" of type '" "idmef_value_type_enum_t *""'"); } arg1 = (idmef_value_type_enum_t *)(argp1); { Py_BEGIN_ALLOW_THREADS free((char *) arg1); Py_END_ALLOW_THREADS } resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_value_type_data_t_int8_val_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_value_type_data_t *arg1 = (idmef_value_type_data_t *) 0 ; int8_t arg2 ; void *argp1 = 0 ; int res1 = 0 ; char val2 ; int ecode2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:idmef_value_type_data_t_int8_val_set",&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_idmef_value_type_data_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "idmef_value_type_data_t_int8_val_set" "', argument " "1"" of type '" "idmef_value_type_data_t *""'"); } arg1 = (idmef_value_type_data_t *)(argp1); ecode2 = SWIG_AsVal_char(obj1, &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "idmef_value_type_data_t_int8_val_set" "', argument " "2"" of type '" "int8_t""'"); } arg2 = (int8_t)(val2); if (arg1) (arg1)->int8_val = arg2; resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_value_type_data_t_int8_val_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_value_type_data_t *arg1 = (idmef_value_type_data_t *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; int8_t result; if (!PyArg_ParseTuple(args,(char *)"O:idmef_value_type_data_t_int8_val_get",&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_idmef_value_type_data_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "idmef_value_type_data_t_int8_val_get" "', argument " "1"" of type '" "idmef_value_type_data_t *""'"); } arg1 = (idmef_value_type_data_t *)(argp1); result = (int8_t) ((arg1)->int8_val); resultobj = SWIG_From_char((char)(result)); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_value_type_data_t_uint8_val_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_value_type_data_t *arg1 = (idmef_value_type_data_t *) 0 ; uint8_t arg2 ; void *argp1 = 0 ; int res1 = 0 ; unsigned char val2 ; int ecode2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:idmef_value_type_data_t_uint8_val_set",&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_idmef_value_type_data_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "idmef_value_type_data_t_uint8_val_set" "', argument " "1"" of type '" "idmef_value_type_data_t *""'"); } arg1 = (idmef_value_type_data_t *)(argp1); ecode2 = SWIG_AsVal_unsigned_SS_char(obj1, &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "idmef_value_type_data_t_uint8_val_set" "', argument " "2"" of type '" "uint8_t""'"); } arg2 = (uint8_t)(val2); if (arg1) (arg1)->uint8_val = arg2; resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_value_type_data_t_uint8_val_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_value_type_data_t *arg1 = (idmef_value_type_data_t *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; uint8_t result; if (!PyArg_ParseTuple(args,(char *)"O:idmef_value_type_data_t_uint8_val_get",&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_idmef_value_type_data_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "idmef_value_type_data_t_uint8_val_get" "', argument " "1"" of type '" "idmef_value_type_data_t *""'"); } arg1 = (idmef_value_type_data_t *)(argp1); result = (uint8_t) ((arg1)->uint8_val); resultobj = SWIG_From_unsigned_SS_char((unsigned char)(result)); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_value_type_data_t_int16_val_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_value_type_data_t *arg1 = (idmef_value_type_data_t *) 0 ; int16_t arg2 ; void *argp1 = 0 ; int res1 = 0 ; short val2 ; int ecode2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:idmef_value_type_data_t_int16_val_set",&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_idmef_value_type_data_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "idmef_value_type_data_t_int16_val_set" "', argument " "1"" of type '" "idmef_value_type_data_t *""'"); } arg1 = (idmef_value_type_data_t *)(argp1); ecode2 = SWIG_AsVal_short(obj1, &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "idmef_value_type_data_t_int16_val_set" "', argument " "2"" of type '" "int16_t""'"); } arg2 = (int16_t)(val2); if (arg1) (arg1)->int16_val = arg2; resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_value_type_data_t_int16_val_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_value_type_data_t *arg1 = (idmef_value_type_data_t *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; int16_t result; if (!PyArg_ParseTuple(args,(char *)"O:idmef_value_type_data_t_int16_val_get",&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_idmef_value_type_data_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "idmef_value_type_data_t_int16_val_get" "', argument " "1"" of type '" "idmef_value_type_data_t *""'"); } arg1 = (idmef_value_type_data_t *)(argp1); result = (int16_t) ((arg1)->int16_val); resultobj = SWIG_From_short((short)(result)); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_value_type_data_t_uint16_val_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_value_type_data_t *arg1 = (idmef_value_type_data_t *) 0 ; uint16_t arg2 ; void *argp1 = 0 ; int res1 = 0 ; unsigned short val2 ; int ecode2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:idmef_value_type_data_t_uint16_val_set",&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_idmef_value_type_data_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "idmef_value_type_data_t_uint16_val_set" "', argument " "1"" of type '" "idmef_value_type_data_t *""'"); } arg1 = (idmef_value_type_data_t *)(argp1); ecode2 = SWIG_AsVal_unsigned_SS_short(obj1, &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "idmef_value_type_data_t_uint16_val_set" "', argument " "2"" of type '" "uint16_t""'"); } arg2 = (uint16_t)(val2); if (arg1) (arg1)->uint16_val = arg2; resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_value_type_data_t_uint16_val_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_value_type_data_t *arg1 = (idmef_value_type_data_t *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; uint16_t result; if (!PyArg_ParseTuple(args,(char *)"O:idmef_value_type_data_t_uint16_val_get",&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_idmef_value_type_data_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "idmef_value_type_data_t_uint16_val_get" "', argument " "1"" of type '" "idmef_value_type_data_t *""'"); } arg1 = (idmef_value_type_data_t *)(argp1); result = (uint16_t) ((arg1)->uint16_val); resultobj = SWIG_From_unsigned_SS_short((unsigned short)(result)); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_value_type_data_t_int32_val_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_value_type_data_t *arg1 = (idmef_value_type_data_t *) 0 ; int32_t arg2 ; void *argp1 = 0 ; int res1 = 0 ; int val2 ; int ecode2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:idmef_value_type_data_t_int32_val_set",&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_idmef_value_type_data_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "idmef_value_type_data_t_int32_val_set" "', argument " "1"" of type '" "idmef_value_type_data_t *""'"); } arg1 = (idmef_value_type_data_t *)(argp1); ecode2 = SWIG_AsVal_int(obj1, &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "idmef_value_type_data_t_int32_val_set" "', argument " "2"" of type '" "int32_t""'"); } arg2 = (int32_t)(val2); if (arg1) (arg1)->int32_val = arg2; resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_value_type_data_t_int32_val_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_value_type_data_t *arg1 = (idmef_value_type_data_t *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; int32_t result; if (!PyArg_ParseTuple(args,(char *)"O:idmef_value_type_data_t_int32_val_get",&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_idmef_value_type_data_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "idmef_value_type_data_t_int32_val_get" "', argument " "1"" of type '" "idmef_value_type_data_t *""'"); } arg1 = (idmef_value_type_data_t *)(argp1); result = (int32_t) ((arg1)->int32_val); { resultobj = PyInt_FromLong(result); } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_value_type_data_t_uint32_val_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_value_type_data_t *arg1 = (idmef_value_type_data_t *) 0 ; uint32_t arg2 ; void *argp1 = 0 ; int res1 = 0 ; unsigned int val2 ; int ecode2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:idmef_value_type_data_t_uint32_val_set",&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_idmef_value_type_data_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "idmef_value_type_data_t_uint32_val_set" "', argument " "1"" of type '" "idmef_value_type_data_t *""'"); } arg1 = (idmef_value_type_data_t *)(argp1); ecode2 = SWIG_AsVal_unsigned_SS_int(obj1, &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "idmef_value_type_data_t_uint32_val_set" "', argument " "2"" of type '" "uint32_t""'"); } arg2 = (uint32_t)(val2); if (arg1) (arg1)->uint32_val = arg2; resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_value_type_data_t_uint32_val_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_value_type_data_t *arg1 = (idmef_value_type_data_t *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; uint32_t result; if (!PyArg_ParseTuple(args,(char *)"O:idmef_value_type_data_t_uint32_val_get",&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_idmef_value_type_data_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "idmef_value_type_data_t_uint32_val_get" "', argument " "1"" of type '" "idmef_value_type_data_t *""'"); } arg1 = (idmef_value_type_data_t *)(argp1); result = (uint32_t) ((arg1)->uint32_val); { resultobj = PyLong_FromUnsignedLong(result); } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_value_type_data_t_int64_val_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_value_type_data_t *arg1 = (idmef_value_type_data_t *) 0 ; int64_t arg2 ; void *argp1 = 0 ; int res1 = 0 ; long long val2 ; int ecode2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:idmef_value_type_data_t_int64_val_set",&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_idmef_value_type_data_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "idmef_value_type_data_t_int64_val_set" "', argument " "1"" of type '" "idmef_value_type_data_t *""'"); } arg1 = (idmef_value_type_data_t *)(argp1); ecode2 = SWIG_AsVal_long_SS_long(obj1, &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "idmef_value_type_data_t_int64_val_set" "', argument " "2"" of type '" "int64_t""'"); } arg2 = (int64_t)(val2); if (arg1) (arg1)->int64_val = arg2; resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_value_type_data_t_int64_val_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_value_type_data_t *arg1 = (idmef_value_type_data_t *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; int64_t result; if (!PyArg_ParseTuple(args,(char *)"O:idmef_value_type_data_t_int64_val_get",&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_idmef_value_type_data_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "idmef_value_type_data_t_int64_val_get" "', argument " "1"" of type '" "idmef_value_type_data_t *""'"); } arg1 = (idmef_value_type_data_t *)(argp1); result = (int64_t) ((arg1)->int64_val); resultobj = SWIG_From_long_SS_long((long long)(result)); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_value_type_data_t_uint64_val_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_value_type_data_t *arg1 = (idmef_value_type_data_t *) 0 ; uint64_t arg2 ; void *argp1 = 0 ; int res1 = 0 ; unsigned long long val2 ; int ecode2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:idmef_value_type_data_t_uint64_val_set",&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_idmef_value_type_data_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "idmef_value_type_data_t_uint64_val_set" "', argument " "1"" of type '" "idmef_value_type_data_t *""'"); } arg1 = (idmef_value_type_data_t *)(argp1); ecode2 = SWIG_AsVal_unsigned_SS_long_SS_long(obj1, &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "idmef_value_type_data_t_uint64_val_set" "', argument " "2"" of type '" "uint64_t""'"); } arg2 = (uint64_t)(val2); if (arg1) (arg1)->uint64_val = arg2; resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_value_type_data_t_uint64_val_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_value_type_data_t *arg1 = (idmef_value_type_data_t *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; uint64_t result; if (!PyArg_ParseTuple(args,(char *)"O:idmef_value_type_data_t_uint64_val_get",&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_idmef_value_type_data_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "idmef_value_type_data_t_uint64_val_get" "', argument " "1"" of type '" "idmef_value_type_data_t *""'"); } arg1 = (idmef_value_type_data_t *)(argp1); result = (uint64_t) ((arg1)->uint64_val); resultobj = SWIG_From_unsigned_SS_long_SS_long((unsigned long long)(result)); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_value_type_data_t_float_val_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_value_type_data_t *arg1 = (idmef_value_type_data_t *) 0 ; float arg2 ; void *argp1 = 0 ; int res1 = 0 ; float val2 ; int ecode2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:idmef_value_type_data_t_float_val_set",&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_idmef_value_type_data_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "idmef_value_type_data_t_float_val_set" "', argument " "1"" of type '" "idmef_value_type_data_t *""'"); } arg1 = (idmef_value_type_data_t *)(argp1); ecode2 = SWIG_AsVal_float(obj1, &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "idmef_value_type_data_t_float_val_set" "', argument " "2"" of type '" "float""'"); } arg2 = (float)(val2); if (arg1) (arg1)->float_val = arg2; resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_value_type_data_t_float_val_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_value_type_data_t *arg1 = (idmef_value_type_data_t *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; float result; if (!PyArg_ParseTuple(args,(char *)"O:idmef_value_type_data_t_float_val_get",&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_idmef_value_type_data_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "idmef_value_type_data_t_float_val_get" "', argument " "1"" of type '" "idmef_value_type_data_t *""'"); } arg1 = (idmef_value_type_data_t *)(argp1); result = (float) ((arg1)->float_val); resultobj = SWIG_From_float((float)(result)); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_value_type_data_t_double_val_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_value_type_data_t *arg1 = (idmef_value_type_data_t *) 0 ; double arg2 ; void *argp1 = 0 ; int res1 = 0 ; double val2 ; int ecode2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:idmef_value_type_data_t_double_val_set",&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_idmef_value_type_data_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "idmef_value_type_data_t_double_val_set" "', argument " "1"" of type '" "idmef_value_type_data_t *""'"); } arg1 = (idmef_value_type_data_t *)(argp1); ecode2 = SWIG_AsVal_double(obj1, &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "idmef_value_type_data_t_double_val_set" "', argument " "2"" of type '" "double""'"); } arg2 = (double)(val2); if (arg1) (arg1)->double_val = arg2; resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_value_type_data_t_double_val_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_value_type_data_t *arg1 = (idmef_value_type_data_t *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; double result; if (!PyArg_ParseTuple(args,(char *)"O:idmef_value_type_data_t_double_val_get",&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_idmef_value_type_data_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "idmef_value_type_data_t_double_val_get" "', argument " "1"" of type '" "idmef_value_type_data_t *""'"); } arg1 = (idmef_value_type_data_t *)(argp1); result = (double) ((arg1)->double_val); resultobj = SWIG_From_double((double)(result)); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_value_type_data_t_string_val_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_value_type_data_t *arg1 = (idmef_value_type_data_t *) 0 ; prelude_string_t *arg2 = (prelude_string_t *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:idmef_value_type_data_t_string_val_set",&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_idmef_value_type_data_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "idmef_value_type_data_t_string_val_set" "', argument " "1"" of type '" "idmef_value_type_data_t *""'"); } arg1 = (idmef_value_type_data_t *)(argp1); { int ret; ret = prelude_string_new_dup_fast(&(arg2), PyString_AsString(obj1), PyString_Size(obj1)); if ( ret < 0 ) { swig_python_raise_exception(ret); return NULL; } } if (arg1) (arg1)->string_val = arg2; resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_value_type_data_t_string_val_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_value_type_data_t *arg1 = (idmef_value_type_data_t *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; prelude_string_t *result = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:idmef_value_type_data_t_string_val_get",&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_idmef_value_type_data_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "idmef_value_type_data_t_string_val_get" "', argument " "1"" of type '" "idmef_value_type_data_t *""'"); } arg1 = (idmef_value_type_data_t *)(argp1); result = (prelude_string_t *) ((arg1)->string_val); { resultobj = swig_python_string(result); } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_value_type_data_t_time_val_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_value_type_data_t *arg1 = (idmef_value_type_data_t *) 0 ; idmef_time_t *arg2 = (idmef_time_t *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:idmef_value_type_data_t_time_val_set",&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_idmef_value_type_data_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "idmef_value_type_data_t_time_val_set" "', argument " "1"" of type '" "idmef_value_type_data_t *""'"); } arg1 = (idmef_value_type_data_t *)(argp1); { if ( obj1 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj1, (void **)&arg2, SWIGTYPE_p_idmef_time, SWIG_POINTER_EXCEPTION|0) ) return NULL; } if (arg1) (arg1)->time_val = arg2; resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_value_type_data_t_time_val_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_value_type_data_t *arg1 = (idmef_value_type_data_t *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; idmef_time_t *result = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:idmef_value_type_data_t_time_val_get",&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_idmef_value_type_data_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "idmef_value_type_data_t_time_val_get" "', argument " "1"" of type '" "idmef_value_type_data_t *""'"); } arg1 = (idmef_value_type_data_t *)(argp1); result = (idmef_time_t *) ((arg1)->time_val); resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_idmef_time, 0 | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_value_type_data_t_data_val_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_value_type_data_t *arg1 = (idmef_value_type_data_t *) 0 ; idmef_data_t *arg2 = (idmef_data_t *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:idmef_value_type_data_t_data_val_set",&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_idmef_value_type_data_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "idmef_value_type_data_t_data_val_set" "', argument " "1"" of type '" "idmef_value_type_data_t *""'"); } arg1 = (idmef_value_type_data_t *)(argp1); { if ( obj1 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj1, (void **)&arg2, SWIGTYPE_p_idmef_data_t, SWIG_POINTER_EXCEPTION|0) ) return NULL; } if (arg1) (arg1)->data_val = arg2; resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_value_type_data_t_data_val_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_value_type_data_t *arg1 = (idmef_value_type_data_t *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; idmef_data_t *result = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:idmef_value_type_data_t_data_val_get",&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_idmef_value_type_data_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "idmef_value_type_data_t_data_val_get" "', argument " "1"" of type '" "idmef_value_type_data_t *""'"); } arg1 = (idmef_value_type_data_t *)(argp1); result = (idmef_data_t *) ((arg1)->data_val); { resultobj = swig_python_data(result); } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_value_type_data_t_list_val_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_value_type_data_t *arg1 = (idmef_value_type_data_t *) 0 ; prelude_list_t arg2 ; void *argp1 = 0 ; int res1 = 0 ; void *argp2 ; int res2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:idmef_value_type_data_t_list_val_set",&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_idmef_value_type_data_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "idmef_value_type_data_t_list_val_set" "', argument " "1"" of type '" "idmef_value_type_data_t *""'"); } arg1 = (idmef_value_type_data_t *)(argp1); { res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_prelude_list_t, 0 ); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "idmef_value_type_data_t_list_val_set" "', argument " "2"" of type '" "prelude_list_t""'"); } if (!argp2) { SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "idmef_value_type_data_t_list_val_set" "', argument " "2"" of type '" "prelude_list_t""'"); } else { arg2 = *((prelude_list_t *)(argp2)); } } if (arg1) (arg1)->list_val = arg2; resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_value_type_data_t_list_val_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_value_type_data_t *arg1 = (idmef_value_type_data_t *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; prelude_list_t result; if (!PyArg_ParseTuple(args,(char *)"O:idmef_value_type_data_t_list_val_get",&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_idmef_value_type_data_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "idmef_value_type_data_t_list_val_get" "', argument " "1"" of type '" "idmef_value_type_data_t *""'"); } arg1 = (idmef_value_type_data_t *)(argp1); result = ((arg1)->list_val); resultobj = SWIG_NewPointerObj((prelude_list_t *)memcpy((prelude_list_t *)malloc(sizeof(prelude_list_t)),&result,sizeof(prelude_list_t)), SWIGTYPE_p_prelude_list_t, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_value_type_data_t_enum_val_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_value_type_data_t *arg1 = (idmef_value_type_data_t *) 0 ; idmef_value_type_enum_t *arg2 = (idmef_value_type_enum_t *) 0 ; void *argp1 = 0 ; int res1 = 0 ; void *argp2 = 0 ; int res2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:idmef_value_type_data_t_enum_val_set",&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_idmef_value_type_data_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "idmef_value_type_data_t_enum_val_set" "', argument " "1"" of type '" "idmef_value_type_data_t *""'"); } arg1 = (idmef_value_type_data_t *)(argp1); res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_idmef_value_type_enum_t, 0 | 0 ); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "idmef_value_type_data_t_enum_val_set" "', argument " "2"" of type '" "idmef_value_type_enum_t *""'"); } arg2 = (idmef_value_type_enum_t *)(argp2); if (arg1) (arg1)->enum_val = *arg2; resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_value_type_data_t_enum_val_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_value_type_data_t *arg1 = (idmef_value_type_data_t *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; idmef_value_type_enum_t *result = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:idmef_value_type_data_t_enum_val_get",&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_idmef_value_type_data_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "idmef_value_type_data_t_enum_val_get" "', argument " "1"" of type '" "idmef_value_type_data_t *""'"); } arg1 = (idmef_value_type_data_t *)(argp1); result = (idmef_value_type_enum_t *)& ((arg1)->enum_val); resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_idmef_value_type_enum_t, 0 | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_value_type_data_t_class_val_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_value_type_data_t *arg1 = (idmef_value_type_data_t *) 0 ; idmef_value_type_class_t *arg2 = (idmef_value_type_class_t *) 0 ; void *argp1 = 0 ; int res1 = 0 ; void *argp2 = 0 ; int res2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:idmef_value_type_data_t_class_val_set",&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_idmef_value_type_data_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "idmef_value_type_data_t_class_val_set" "', argument " "1"" of type '" "idmef_value_type_data_t *""'"); } arg1 = (idmef_value_type_data_t *)(argp1); res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_idmef_value_type_class_t, 0 | 0 ); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "idmef_value_type_data_t_class_val_set" "', argument " "2"" of type '" "idmef_value_type_class_t *""'"); } arg2 = (idmef_value_type_class_t *)(argp2); if (arg1) (arg1)->class_val = *arg2; resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_value_type_data_t_class_val_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_value_type_data_t *arg1 = (idmef_value_type_data_t *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; idmef_value_type_class_t *result = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:idmef_value_type_data_t_class_val_get",&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_idmef_value_type_data_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "idmef_value_type_data_t_class_val_get" "', argument " "1"" of type '" "idmef_value_type_data_t *""'"); } arg1 = (idmef_value_type_data_t *)(argp1); result = (idmef_value_type_class_t *)& ((arg1)->class_val); resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_idmef_value_type_class_t, 0 | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_new_idmef_value_type_data_t(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_value_type_data_t *result = 0 ; if (!PyArg_ParseTuple(args,(char *)":new_idmef_value_type_data_t")) SWIG_fail; { Py_BEGIN_ALLOW_THREADS result = (idmef_value_type_data_t *)calloc(1, sizeof(idmef_value_type_data_t)); Py_END_ALLOW_THREADS } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_idmef_value_type_data_t, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_delete_idmef_value_type_data_t(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_value_type_data_t *arg1 = (idmef_value_type_data_t *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:delete_idmef_value_type_data_t",&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_idmef_value_type_data_t, SWIG_POINTER_DISOWN | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_idmef_value_type_data_t" "', argument " "1"" of type '" "idmef_value_type_data_t *""'"); } arg1 = (idmef_value_type_data_t *)(argp1); { Py_BEGIN_ALLOW_THREADS free((char *) arg1); Py_END_ALLOW_THREADS } resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_value_type_t_id_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_value_type_t *arg1 = (idmef_value_type_t *) 0 ; idmef_value_type_id_t arg2 ; void *argp1 = 0 ; int res1 = 0 ; int val2 ; int ecode2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:idmef_value_type_t_id_set",&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_idmef_value_type_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "idmef_value_type_t_id_set" "', argument " "1"" of type '" "idmef_value_type_t *""'"); } arg1 = (idmef_value_type_t *)(argp1); ecode2 = SWIG_AsVal_int(obj1, &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "idmef_value_type_t_id_set" "', argument " "2"" of type '" "idmef_value_type_id_t""'"); } arg2 = (idmef_value_type_id_t)(val2); if (arg1) (arg1)->id = arg2; resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_value_type_t_id_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_value_type_t *arg1 = (idmef_value_type_t *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; idmef_value_type_id_t result; if (!PyArg_ParseTuple(args,(char *)"O:idmef_value_type_t_id_get",&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_idmef_value_type_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "idmef_value_type_t_id_get" "', argument " "1"" of type '" "idmef_value_type_t *""'"); } arg1 = (idmef_value_type_t *)(argp1); result = (idmef_value_type_id_t) ((arg1)->id); resultobj = SWIG_From_int((int)(result)); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_value_type_t_data_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_value_type_t *arg1 = (idmef_value_type_t *) 0 ; idmef_value_type_data_t *arg2 = (idmef_value_type_data_t *) 0 ; void *argp1 = 0 ; int res1 = 0 ; void *argp2 = 0 ; int res2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:idmef_value_type_t_data_set",&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_idmef_value_type_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "idmef_value_type_t_data_set" "', argument " "1"" of type '" "idmef_value_type_t *""'"); } arg1 = (idmef_value_type_t *)(argp1); res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_idmef_value_type_data_t, 0 | 0 ); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "idmef_value_type_t_data_set" "', argument " "2"" of type '" "idmef_value_type_data_t *""'"); } arg2 = (idmef_value_type_data_t *)(argp2); if (arg1) (arg1)->data = *arg2; resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_value_type_t_data_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_value_type_t *arg1 = (idmef_value_type_t *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; idmef_value_type_data_t *result = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:idmef_value_type_t_data_get",&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_idmef_value_type_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "idmef_value_type_t_data_get" "', argument " "1"" of type '" "idmef_value_type_t *""'"); } arg1 = (idmef_value_type_t *)(argp1); result = (idmef_value_type_data_t *)& ((arg1)->data); resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_idmef_value_type_data_t, 0 | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_new_idmef_value_type_t(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_value_type_t *result = 0 ; if (!PyArg_ParseTuple(args,(char *)":new_idmef_value_type_t")) SWIG_fail; { Py_BEGIN_ALLOW_THREADS result = (idmef_value_type_t *)calloc(1, sizeof(idmef_value_type_t)); Py_END_ALLOW_THREADS } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_idmef_value_type_t, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_delete_idmef_value_type_t(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_value_type_t *arg1 = (idmef_value_type_t *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:delete_idmef_value_type_t",&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_idmef_value_type_t, SWIG_POINTER_DISOWN | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_idmef_value_type_t" "', argument " "1"" of type '" "idmef_value_type_t *""'"); } arg1 = (idmef_value_type_t *)(argp1); { Py_BEGIN_ALLOW_THREADS free((char *) arg1); Py_END_ALLOW_THREADS } resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_value_type_ref(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_value_type_t *arg1 = (idmef_value_type_t *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; int result; if (!PyArg_ParseTuple(args,(char *)"O:idmef_value_type_ref",&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_idmef_value_type_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "idmef_value_type_ref" "', argument " "1"" of type '" "idmef_value_type_t const *""'"); } arg1 = (idmef_value_type_t *)(argp1); { Py_BEGIN_ALLOW_THREADS result = (int)idmef_value_type_ref((idmef_value_type_t const *)arg1); Py_END_ALLOW_THREADS } { if ( result < 0 ) { swig_python_raise_exception(result); resultobj = NULL; } else { resultobj = PyInt_FromLong(result); } } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_value_type_copy(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_value_type_t *arg1 = (idmef_value_type_t *) 0 ; void *arg2 = (void *) 0 ; void *argp1 = 0 ; int res1 = 0 ; int res2 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; int result; if (!PyArg_ParseTuple(args,(char *)"OO:idmef_value_type_copy",&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_idmef_value_type_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "idmef_value_type_copy" "', argument " "1"" of type '" "idmef_value_type_t const *""'"); } arg1 = (idmef_value_type_t *)(argp1); res2 = SWIG_ConvertPtr(obj1,SWIG_as_voidptrptr(&arg2), 0, 0); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "idmef_value_type_copy" "', argument " "2"" of type '" "void *""'"); } { Py_BEGIN_ALLOW_THREADS result = (int)idmef_value_type_copy((idmef_value_type_t const *)arg1,arg2); Py_END_ALLOW_THREADS } { if ( result < 0 ) { swig_python_raise_exception(result); resultobj = NULL; } else { resultobj = PyInt_FromLong(result); } } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_value_type_read(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_value_type_t *arg1 = (idmef_value_type_t *) 0 ; char *arg2 = (char *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; int result; if (!PyArg_ParseTuple(args,(char *)"OO:idmef_value_type_read",&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_idmef_value_type_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "idmef_value_type_read" "', argument " "1"" of type '" "idmef_value_type_t *""'"); } arg1 = (idmef_value_type_t *)(argp1); { if ( obj1 == Py_None ) arg2 = NULL; else if ( PyString_Check(obj1) ) arg2 = PyString_AsString(obj1); else { PyErr_Format(PyExc_TypeError, "expected None or string, %s found", obj1->ob_type->tp_name); return NULL; } } { Py_BEGIN_ALLOW_THREADS result = (int)idmef_value_type_read(arg1,(char const *)arg2); Py_END_ALLOW_THREADS } { if ( result < 0 ) { swig_python_raise_exception(result); resultobj = NULL; } else { resultobj = PyInt_FromLong(result); } } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_value_type_write(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_value_type_t *arg1 = (idmef_value_type_t *) 0 ; prelude_string_t *arg2 = (prelude_string_t *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; int result; { int ret; ret = prelude_string_new(&(arg2)); if ( ret < 0 ) { swig_python_raise_exception(ret); return NULL; } } if (!PyArg_ParseTuple(args,(char *)"O:idmef_value_type_write",&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_idmef_value_type_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "idmef_value_type_write" "', argument " "1"" of type '" "idmef_value_type_t const *""'"); } arg1 = (idmef_value_type_t *)(argp1); { Py_BEGIN_ALLOW_THREADS result = (int)idmef_value_type_write((idmef_value_type_t const *)arg1,arg2); Py_END_ALLOW_THREADS } { if ( result < 0 ) { swig_python_raise_exception(result); resultobj = NULL; } else { resultobj = PyInt_FromLong(result); } } { if ( result >= 0 ) resultobj = PyString_FromStringAndSize(prelude_string_get_string(arg2), prelude_string_get_len(arg2)); prelude_string_destroy(arg2); } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_value_type_destroy(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_value_type_t *arg1 = (idmef_value_type_t *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:idmef_value_type_destroy",&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_idmef_value_type_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "idmef_value_type_destroy" "', argument " "1"" of type '" "idmef_value_type_t *""'"); } arg1 = (idmef_value_type_t *)(argp1); { Py_BEGIN_ALLOW_THREADS idmef_value_type_destroy(arg1); Py_END_ALLOW_THREADS } resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_value_type_clone(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_value_type_t *arg1 = (idmef_value_type_t *) 0 ; idmef_value_type_t *arg2 = (idmef_value_type_t *) 0 ; void *argp1 = 0 ; int res1 = 0 ; void *argp2 = 0 ; int res2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; int result; if (!PyArg_ParseTuple(args,(char *)"OO:idmef_value_type_clone",&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_idmef_value_type_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "idmef_value_type_clone" "', argument " "1"" of type '" "idmef_value_type_t const *""'"); } arg1 = (idmef_value_type_t *)(argp1); res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_idmef_value_type_t, 0 | 0 ); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "idmef_value_type_clone" "', argument " "2"" of type '" "idmef_value_type_t *""'"); } arg2 = (idmef_value_type_t *)(argp2); { Py_BEGIN_ALLOW_THREADS result = (int)idmef_value_type_clone((idmef_value_type_t const *)arg1,arg2); Py_END_ALLOW_THREADS } { if ( result < 0 ) { swig_python_raise_exception(result); resultobj = NULL; } else { resultobj = PyInt_FromLong(result); } } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_value_type_compare(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_value_type_t *arg1 = (idmef_value_type_t *) 0 ; idmef_value_type_t *arg2 = (idmef_value_type_t *) 0 ; idmef_criterion_operator_t arg3 ; void *argp1 = 0 ; int res1 = 0 ; void *argp2 = 0 ; int res2 = 0 ; int val3 ; int ecode3 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; PyObject * obj2 = 0 ; int result; if (!PyArg_ParseTuple(args,(char *)"OOO:idmef_value_type_compare",&obj0,&obj1,&obj2)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_idmef_value_type_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "idmef_value_type_compare" "', argument " "1"" of type '" "idmef_value_type_t const *""'"); } arg1 = (idmef_value_type_t *)(argp1); res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_idmef_value_type_t, 0 | 0 ); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "idmef_value_type_compare" "', argument " "2"" of type '" "idmef_value_type_t const *""'"); } arg2 = (idmef_value_type_t *)(argp2); ecode3 = SWIG_AsVal_int(obj2, &val3); if (!SWIG_IsOK(ecode3)) { SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "idmef_value_type_compare" "', argument " "3"" of type '" "idmef_criterion_operator_t""'"); } arg3 = (idmef_criterion_operator_t)(val3); { Py_BEGIN_ALLOW_THREADS result = (int)idmef_value_type_compare((idmef_value_type_t const *)arg1,(idmef_value_type_t const *)arg2,arg3); Py_END_ALLOW_THREADS } { if ( result < 0 ) { swig_python_raise_exception(result); resultobj = NULL; } else { resultobj = PyInt_FromLong(result); } } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_value_type_check_operator(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_value_type_id_t arg1 ; idmef_criterion_operator_t arg2 ; int val1 ; int ecode1 = 0 ; int val2 ; int ecode2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; int result; if (!PyArg_ParseTuple(args,(char *)"OO:idmef_value_type_check_operator",&obj0,&obj1)) SWIG_fail; ecode1 = SWIG_AsVal_int(obj0, &val1); if (!SWIG_IsOK(ecode1)) { SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "idmef_value_type_check_operator" "', argument " "1"" of type '" "idmef_value_type_id_t""'"); } arg1 = (idmef_value_type_id_t)(val1); ecode2 = SWIG_AsVal_int(obj1, &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "idmef_value_type_check_operator" "', argument " "2"" of type '" "idmef_criterion_operator_t""'"); } arg2 = (idmef_criterion_operator_t)(val2); { Py_BEGIN_ALLOW_THREADS result = (int)idmef_value_type_check_operator(arg1,arg2); Py_END_ALLOW_THREADS } { if ( result < 0 ) { swig_python_raise_exception(result); resultobj = NULL; } else { resultobj = PyInt_FromLong(result); } } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_value_type_get_applicable_operators(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_value_type_id_t arg1 ; idmef_criterion_operator_t *arg2 = (idmef_criterion_operator_t *) 0 ; int val1 ; int ecode1 = 0 ; void *argp2 = 0 ; int res2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; int result; if (!PyArg_ParseTuple(args,(char *)"OO:idmef_value_type_get_applicable_operators",&obj0,&obj1)) SWIG_fail; ecode1 = SWIG_AsVal_int(obj0, &val1); if (!SWIG_IsOK(ecode1)) { SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "idmef_value_type_get_applicable_operators" "', argument " "1"" of type '" "idmef_value_type_id_t""'"); } arg1 = (idmef_value_type_id_t)(val1); res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_idmef_criterion_operator_t, 0 | 0 ); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "idmef_value_type_get_applicable_operators" "', argument " "2"" of type '" "idmef_criterion_operator_t *""'"); } arg2 = (idmef_criterion_operator_t *)(argp2); { Py_BEGIN_ALLOW_THREADS result = (int)idmef_value_type_get_applicable_operators(arg1,arg2); Py_END_ALLOW_THREADS } { if ( result < 0 ) { swig_python_raise_exception(result); resultobj = NULL; } else { resultobj = PyInt_FromLong(result); } } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_value_type_to_string(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_value_type_id_t arg1 ; int val1 ; int ecode1 = 0 ; PyObject * obj0 = 0 ; char *result = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:idmef_value_type_to_string",&obj0)) SWIG_fail; ecode1 = SWIG_AsVal_int(obj0, &val1); if (!SWIG_IsOK(ecode1)) { SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "idmef_value_type_to_string" "', argument " "1"" of type '" "idmef_value_type_id_t""'"); } arg1 = (idmef_value_type_id_t)(val1); { Py_BEGIN_ALLOW_THREADS result = (char *)idmef_value_type_to_string(arg1); Py_END_ALLOW_THREADS } resultobj = SWIG_FromCharPtr((const char *)result); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_class_is_child_list(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_class_id_t arg1 ; idmef_class_child_id_t arg2 ; int val1 ; int ecode1 = 0 ; int val2 ; int ecode2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; prelude_bool_t result; if (!PyArg_ParseTuple(args,(char *)"OO:idmef_class_is_child_list",&obj0,&obj1)) SWIG_fail; ecode1 = SWIG_AsVal_int(obj0, &val1); if (!SWIG_IsOK(ecode1)) { SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "idmef_class_is_child_list" "', argument " "1"" of type '" "idmef_class_id_t""'"); } arg1 = (idmef_class_id_t)(val1); ecode2 = SWIG_AsVal_int(obj1, &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "idmef_class_is_child_list" "', argument " "2"" of type '" "idmef_class_child_id_t""'"); } arg2 = (idmef_class_child_id_t)(val2); { Py_BEGIN_ALLOW_THREADS result = (prelude_bool_t)idmef_class_is_child_list(arg1,arg2); Py_END_ALLOW_THREADS } resultobj = SWIG_From_int((int)(result)); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_class_get_child_class(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_class_id_t arg1 ; idmef_class_child_id_t arg2 ; int val1 ; int ecode1 = 0 ; int val2 ; int ecode2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; idmef_class_id_t result; if (!PyArg_ParseTuple(args,(char *)"OO:idmef_class_get_child_class",&obj0,&obj1)) SWIG_fail; ecode1 = SWIG_AsVal_int(obj0, &val1); if (!SWIG_IsOK(ecode1)) { SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "idmef_class_get_child_class" "', argument " "1"" of type '" "idmef_class_id_t""'"); } arg1 = (idmef_class_id_t)(val1); ecode2 = SWIG_AsVal_int(obj1, &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "idmef_class_get_child_class" "', argument " "2"" of type '" "idmef_class_child_id_t""'"); } arg2 = (idmef_class_child_id_t)(val2); { Py_BEGIN_ALLOW_THREADS result = (idmef_class_id_t)idmef_class_get_child_class(arg1,arg2); Py_END_ALLOW_THREADS } { if ( result < 0 ) { swig_python_raise_exception(result); resultobj = NULL; } else { resultobj = PyInt_FromLong(result); } } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_class_get_child_value_type(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_class_id_t arg1 ; idmef_class_child_id_t arg2 ; int val1 ; int ecode1 = 0 ; int val2 ; int ecode2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; idmef_value_type_id_t result; if (!PyArg_ParseTuple(args,(char *)"OO:idmef_class_get_child_value_type",&obj0,&obj1)) SWIG_fail; ecode1 = SWIG_AsVal_int(obj0, &val1); if (!SWIG_IsOK(ecode1)) { SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "idmef_class_get_child_value_type" "', argument " "1"" of type '" "idmef_class_id_t""'"); } arg1 = (idmef_class_id_t)(val1); ecode2 = SWIG_AsVal_int(obj1, &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "idmef_class_get_child_value_type" "', argument " "2"" of type '" "idmef_class_child_id_t""'"); } arg2 = (idmef_class_child_id_t)(val2); { Py_BEGIN_ALLOW_THREADS result = (idmef_value_type_id_t)idmef_class_get_child_value_type(arg1,arg2); Py_END_ALLOW_THREADS } resultobj = SWIG_From_int((int)(result)); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_class_enum_to_numeric(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_class_id_t arg1 ; char *arg2 = (char *) 0 ; int val1 ; int ecode1 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; int result; if (!PyArg_ParseTuple(args,(char *)"OO:idmef_class_enum_to_numeric",&obj0,&obj1)) SWIG_fail; ecode1 = SWIG_AsVal_int(obj0, &val1); if (!SWIG_IsOK(ecode1)) { SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "idmef_class_enum_to_numeric" "', argument " "1"" of type '" "idmef_class_id_t""'"); } arg1 = (idmef_class_id_t)(val1); { if ( obj1 == Py_None ) arg2 = NULL; else if ( PyString_Check(obj1) ) arg2 = PyString_AsString(obj1); else { PyErr_Format(PyExc_TypeError, "expected None or string, %s found", obj1->ob_type->tp_name); return NULL; } } { Py_BEGIN_ALLOW_THREADS result = (int)idmef_class_enum_to_numeric(arg1,(char const *)arg2); Py_END_ALLOW_THREADS } { if ( result < 0 ) { swig_python_raise_exception(result); resultobj = NULL; } else { resultobj = PyInt_FromLong(result); } } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_class_enum_to_string(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_class_id_t arg1 ; int arg2 ; int val1 ; int ecode1 = 0 ; int val2 ; int ecode2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; char *result = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:idmef_class_enum_to_string",&obj0,&obj1)) SWIG_fail; ecode1 = SWIG_AsVal_int(obj0, &val1); if (!SWIG_IsOK(ecode1)) { SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "idmef_class_enum_to_string" "', argument " "1"" of type '" "idmef_class_id_t""'"); } arg1 = (idmef_class_id_t)(val1); ecode2 = SWIG_AsVal_int(obj1, &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "idmef_class_enum_to_string" "', argument " "2"" of type '" "int""'"); } arg2 = (int)(val2); { Py_BEGIN_ALLOW_THREADS result = (char *)idmef_class_enum_to_string(arg1,arg2); Py_END_ALLOW_THREADS } resultobj = SWIG_FromCharPtr((const char *)result); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_class_get_child(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; void *arg1 = (void *) 0 ; idmef_class_id_t arg2 ; idmef_class_child_id_t arg3 ; void **arg4 = (void **) 0 ; int res1 ; int val2 ; int ecode2 = 0 ; int val3 ; int ecode3 = 0 ; void *argp4 = 0 ; int res4 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; PyObject * obj2 = 0 ; PyObject * obj3 = 0 ; int result; if (!PyArg_ParseTuple(args,(char *)"OOOO:idmef_class_get_child",&obj0,&obj1,&obj2,&obj3)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0,SWIG_as_voidptrptr(&arg1), 0, 0); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "idmef_class_get_child" "', argument " "1"" of type '" "void *""'"); } ecode2 = SWIG_AsVal_int(obj1, &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "idmef_class_get_child" "', argument " "2"" of type '" "idmef_class_id_t""'"); } arg2 = (idmef_class_id_t)(val2); ecode3 = SWIG_AsVal_int(obj2, &val3); if (!SWIG_IsOK(ecode3)) { SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "idmef_class_get_child" "', argument " "3"" of type '" "idmef_class_child_id_t""'"); } arg3 = (idmef_class_child_id_t)(val3); res4 = SWIG_ConvertPtr(obj3, &argp4,SWIGTYPE_p_p_void, 0 | 0 ); if (!SWIG_IsOK(res4)) { SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "idmef_class_get_child" "', argument " "4"" of type '" "void **""'"); } arg4 = (void **)(argp4); { Py_BEGIN_ALLOW_THREADS result = (int)idmef_class_get_child(arg1,arg2,arg3,arg4); Py_END_ALLOW_THREADS } { if ( result < 0 ) { swig_python_raise_exception(result); resultobj = NULL; } else { resultobj = PyInt_FromLong(result); } } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_class_new_child(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; void *arg1 = (void *) 0 ; idmef_class_id_t arg2 ; idmef_class_child_id_t arg3 ; int arg4 ; void **arg5 = (void **) 0 ; int res1 ; int val2 ; int ecode2 = 0 ; int val3 ; int ecode3 = 0 ; int val4 ; int ecode4 = 0 ; void *argp5 = 0 ; int res5 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; PyObject * obj2 = 0 ; PyObject * obj3 = 0 ; PyObject * obj4 = 0 ; int result; if (!PyArg_ParseTuple(args,(char *)"OOOOO:idmef_class_new_child",&obj0,&obj1,&obj2,&obj3,&obj4)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0,SWIG_as_voidptrptr(&arg1), 0, 0); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "idmef_class_new_child" "', argument " "1"" of type '" "void *""'"); } ecode2 = SWIG_AsVal_int(obj1, &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "idmef_class_new_child" "', argument " "2"" of type '" "idmef_class_id_t""'"); } arg2 = (idmef_class_id_t)(val2); ecode3 = SWIG_AsVal_int(obj2, &val3); if (!SWIG_IsOK(ecode3)) { SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "idmef_class_new_child" "', argument " "3"" of type '" "idmef_class_child_id_t""'"); } arg3 = (idmef_class_child_id_t)(val3); ecode4 = SWIG_AsVal_int(obj3, &val4); if (!SWIG_IsOK(ecode4)) { SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "idmef_class_new_child" "', argument " "4"" of type '" "int""'"); } arg4 = (int)(val4); res5 = SWIG_ConvertPtr(obj4, &argp5,SWIGTYPE_p_p_void, 0 | 0 ); if (!SWIG_IsOK(res5)) { SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "idmef_class_new_child" "', argument " "5"" of type '" "void **""'"); } arg5 = (void **)(argp5); { Py_BEGIN_ALLOW_THREADS result = (int)idmef_class_new_child(arg1,arg2,arg3,arg4,arg5); Py_END_ALLOW_THREADS } { if ( result < 0 ) { swig_python_raise_exception(result); resultobj = NULL; } else { resultobj = PyInt_FromLong(result); } } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_class_destroy_child(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; void *arg1 = (void *) 0 ; idmef_class_id_t arg2 ; idmef_class_child_id_t arg3 ; int arg4 ; int res1 ; int val2 ; int ecode2 = 0 ; int val3 ; int ecode3 = 0 ; int val4 ; int ecode4 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; PyObject * obj2 = 0 ; PyObject * obj3 = 0 ; int result; if (!PyArg_ParseTuple(args,(char *)"OOOO:idmef_class_destroy_child",&obj0,&obj1,&obj2,&obj3)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0,SWIG_as_voidptrptr(&arg1), 0, 0); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "idmef_class_destroy_child" "', argument " "1"" of type '" "void *""'"); } ecode2 = SWIG_AsVal_int(obj1, &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "idmef_class_destroy_child" "', argument " "2"" of type '" "idmef_class_id_t""'"); } arg2 = (idmef_class_id_t)(val2); ecode3 = SWIG_AsVal_int(obj2, &val3); if (!SWIG_IsOK(ecode3)) { SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "idmef_class_destroy_child" "', argument " "3"" of type '" "idmef_class_child_id_t""'"); } arg3 = (idmef_class_child_id_t)(val3); ecode4 = SWIG_AsVal_int(obj3, &val4); if (!SWIG_IsOK(ecode4)) { SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "idmef_class_destroy_child" "', argument " "4"" of type '" "int""'"); } arg4 = (int)(val4); { Py_BEGIN_ALLOW_THREADS result = (int)idmef_class_destroy_child(arg1,arg2,arg3,arg4); Py_END_ALLOW_THREADS } { if ( result < 0 ) { swig_python_raise_exception(result); resultobj = NULL; } else { resultobj = PyInt_FromLong(result); } } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_class_find(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; char *arg1 = (char *) 0 ; PyObject * obj0 = 0 ; idmef_class_id_t result; if (!PyArg_ParseTuple(args,(char *)"O:idmef_class_find",&obj0)) SWIG_fail; { if ( obj0 == Py_None ) arg1 = NULL; else if ( PyString_Check(obj0) ) arg1 = PyString_AsString(obj0); else { PyErr_Format(PyExc_TypeError, "expected None or string, %s found", obj0->ob_type->tp_name); return NULL; } } { Py_BEGIN_ALLOW_THREADS result = (idmef_class_id_t)idmef_class_find((char const *)arg1); Py_END_ALLOW_THREADS } { if ( result < 0 ) { swig_python_raise_exception(result); resultobj = NULL; } else { resultobj = PyInt_FromLong(result); } } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_class_find_child(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_class_id_t arg1 ; char *arg2 = (char *) 0 ; int val1 ; int ecode1 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; idmef_class_child_id_t result; if (!PyArg_ParseTuple(args,(char *)"OO:idmef_class_find_child",&obj0,&obj1)) SWIG_fail; ecode1 = SWIG_AsVal_int(obj0, &val1); if (!SWIG_IsOK(ecode1)) { SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "idmef_class_find_child" "', argument " "1"" of type '" "idmef_class_id_t""'"); } arg1 = (idmef_class_id_t)(val1); { if ( obj1 == Py_None ) arg2 = NULL; else if ( PyString_Check(obj1) ) arg2 = PyString_AsString(obj1); else { PyErr_Format(PyExc_TypeError, "expected None or string, %s found", obj1->ob_type->tp_name); return NULL; } } { Py_BEGIN_ALLOW_THREADS result = (idmef_class_child_id_t)idmef_class_find_child(arg1,(char const *)arg2); Py_END_ALLOW_THREADS } { if ( result < 0 ) { swig_python_raise_exception(result); resultobj = NULL; } else { resultobj = PyInt_FromLong(result); } } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_class_get_name(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_class_id_t arg1 ; int val1 ; int ecode1 = 0 ; PyObject * obj0 = 0 ; char *result = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:idmef_class_get_name",&obj0)) SWIG_fail; ecode1 = SWIG_AsVal_int(obj0, &val1); if (!SWIG_IsOK(ecode1)) { SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "idmef_class_get_name" "', argument " "1"" of type '" "idmef_class_id_t""'"); } arg1 = (idmef_class_id_t)(val1); { Py_BEGIN_ALLOW_THREADS result = (char *)idmef_class_get_name(arg1); Py_END_ALLOW_THREADS } resultobj = SWIG_FromCharPtr((const char *)result); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_class_get_child_name(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_class_id_t arg1 ; idmef_class_child_id_t arg2 ; int val1 ; int ecode1 = 0 ; int val2 ; int ecode2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; char *result = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:idmef_class_get_child_name",&obj0,&obj1)) SWIG_fail; ecode1 = SWIG_AsVal_int(obj0, &val1); if (!SWIG_IsOK(ecode1)) { SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "idmef_class_get_child_name" "', argument " "1"" of type '" "idmef_class_id_t""'"); } arg1 = (idmef_class_id_t)(val1); ecode2 = SWIG_AsVal_int(obj1, &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "idmef_class_get_child_name" "', argument " "2"" of type '" "idmef_class_child_id_t""'"); } arg2 = (idmef_class_child_id_t)(val2); { Py_BEGIN_ALLOW_THREADS result = (char *)idmef_class_get_child_name(arg1,arg2); Py_END_ALLOW_THREADS } resultobj = SWIG_FromCharPtr((const char *)result); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_class_copy(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_class_id_t arg1 ; void *arg2 = (void *) 0 ; void *arg3 = (void *) 0 ; int val1 ; int ecode1 = 0 ; int res2 ; int res3 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; PyObject * obj2 = 0 ; int result; if (!PyArg_ParseTuple(args,(char *)"OOO:idmef_class_copy",&obj0,&obj1,&obj2)) SWIG_fail; ecode1 = SWIG_AsVal_int(obj0, &val1); if (!SWIG_IsOK(ecode1)) { SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "idmef_class_copy" "', argument " "1"" of type '" "idmef_class_id_t""'"); } arg1 = (idmef_class_id_t)(val1); res2 = SWIG_ConvertPtr(obj1,SWIG_as_voidptrptr(&arg2), 0, 0); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "idmef_class_copy" "', argument " "2"" of type '" "void const *""'"); } res3 = SWIG_ConvertPtr(obj2,SWIG_as_voidptrptr(&arg3), 0, 0); if (!SWIG_IsOK(res3)) { SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "idmef_class_copy" "', argument " "3"" of type '" "void *""'"); } { Py_BEGIN_ALLOW_THREADS result = (int)idmef_class_copy(arg1,(void const *)arg2,arg3); Py_END_ALLOW_THREADS } { if ( result < 0 ) { swig_python_raise_exception(result); resultobj = NULL; } else { resultobj = PyInt_FromLong(result); } } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_class_clone(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_class_id_t arg1 ; void *arg2 = (void *) 0 ; void **arg3 = (void **) 0 ; int val1 ; int ecode1 = 0 ; int res2 ; void *argp3 = 0 ; int res3 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; PyObject * obj2 = 0 ; int result; if (!PyArg_ParseTuple(args,(char *)"OOO:idmef_class_clone",&obj0,&obj1,&obj2)) SWIG_fail; ecode1 = SWIG_AsVal_int(obj0, &val1); if (!SWIG_IsOK(ecode1)) { SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "idmef_class_clone" "', argument " "1"" of type '" "idmef_class_id_t""'"); } arg1 = (idmef_class_id_t)(val1); res2 = SWIG_ConvertPtr(obj1,SWIG_as_voidptrptr(&arg2), 0, 0); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "idmef_class_clone" "', argument " "2"" of type '" "void const *""'"); } res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_p_void, 0 | 0 ); if (!SWIG_IsOK(res3)) { SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "idmef_class_clone" "', argument " "3"" of type '" "void **""'"); } arg3 = (void **)(argp3); { Py_BEGIN_ALLOW_THREADS result = (int)idmef_class_clone(arg1,(void const *)arg2,arg3); Py_END_ALLOW_THREADS } { if ( result < 0 ) { swig_python_raise_exception(result); resultobj = NULL; } else { resultobj = PyInt_FromLong(result); } } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_class_compare(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_class_id_t arg1 ; void *arg2 = (void *) 0 ; void *arg3 = (void *) 0 ; int val1 ; int ecode1 = 0 ; int res2 ; int res3 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; PyObject * obj2 = 0 ; int result; if (!PyArg_ParseTuple(args,(char *)"OOO:idmef_class_compare",&obj0,&obj1,&obj2)) SWIG_fail; ecode1 = SWIG_AsVal_int(obj0, &val1); if (!SWIG_IsOK(ecode1)) { SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "idmef_class_compare" "', argument " "1"" of type '" "idmef_class_id_t""'"); } arg1 = (idmef_class_id_t)(val1); res2 = SWIG_ConvertPtr(obj1,SWIG_as_voidptrptr(&arg2), 0, 0); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "idmef_class_compare" "', argument " "2"" of type '" "void const *""'"); } res3 = SWIG_ConvertPtr(obj2,SWIG_as_voidptrptr(&arg3), 0, 0); if (!SWIG_IsOK(res3)) { SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "idmef_class_compare" "', argument " "3"" of type '" "void const *""'"); } { Py_BEGIN_ALLOW_THREADS result = (int)idmef_class_compare(arg1,(void const *)arg2,(void const *)arg3); Py_END_ALLOW_THREADS } { if ( result < 0 ) { swig_python_raise_exception(result); resultobj = NULL; } else { resultobj = PyInt_FromLong(result); } } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_class_ref(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_class_id_t arg1 ; void *arg2 = (void *) 0 ; int val1 ; int ecode1 = 0 ; int res2 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; int result; if (!PyArg_ParseTuple(args,(char *)"OO:idmef_class_ref",&obj0,&obj1)) SWIG_fail; ecode1 = SWIG_AsVal_int(obj0, &val1); if (!SWIG_IsOK(ecode1)) { SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "idmef_class_ref" "', argument " "1"" of type '" "idmef_class_id_t""'"); } arg1 = (idmef_class_id_t)(val1); res2 = SWIG_ConvertPtr(obj1,SWIG_as_voidptrptr(&arg2), 0, 0); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "idmef_class_ref" "', argument " "2"" of type '" "void *""'"); } { Py_BEGIN_ALLOW_THREADS result = (int)idmef_class_ref(arg1,arg2); Py_END_ALLOW_THREADS } { if ( result < 0 ) { swig_python_raise_exception(result); resultobj = NULL; } else { resultobj = PyInt_FromLong(result); } } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_idmef_class_destroy(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_class_id_t arg1 ; void *arg2 = (void *) 0 ; int val1 ; int ecode1 = 0 ; int res2 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; int result; if (!PyArg_ParseTuple(args,(char *)"OO:idmef_class_destroy",&obj0,&obj1)) SWIG_fail; ecode1 = SWIG_AsVal_int(obj0, &val1); if (!SWIG_IsOK(ecode1)) { SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "idmef_class_destroy" "', argument " "1"" of type '" "idmef_class_id_t""'"); } arg1 = (idmef_class_id_t)(val1); res2 = SWIG_ConvertPtr(obj1,SWIG_as_voidptrptr(&arg2), 0, 0); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "idmef_class_destroy" "', argument " "2"" of type '" "void *""'"); } { Py_BEGIN_ALLOW_THREADS result = (int)idmef_class_destroy(arg1,arg2); Py_END_ALLOW_THREADS } { if ( result < 0 ) { swig_python_raise_exception(result); resultobj = NULL; } else { resultobj = PyInt_FromLong(result); } } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_prelude_connection_destroy(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; prelude_connection_t *arg1 = (prelude_connection_t *) 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:prelude_connection_destroy",&obj0)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_prelude_connection, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { Py_BEGIN_ALLOW_THREADS prelude_connection_destroy(arg1); Py_END_ALLOW_THREADS } resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_prelude_connection_ref(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; prelude_connection_t *arg1 = (prelude_connection_t *) 0 ; PyObject * obj0 = 0 ; prelude_connection_t *result = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:prelude_connection_ref",&obj0)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_prelude_connection, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { Py_BEGIN_ALLOW_THREADS result = (prelude_connection_t *)prelude_connection_ref(arg1); Py_END_ALLOW_THREADS } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_prelude_connection, 0 | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_prelude_connection_send(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; prelude_connection_t *arg1 = (prelude_connection_t *) 0 ; prelude_msg_t *arg2 = (prelude_msg_t *) 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; int result; if (!PyArg_ParseTuple(args,(char *)"OO:prelude_connection_send",&obj0,&obj1)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_prelude_connection, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { if ( obj1 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj1, (void **)&arg2, SWIGTYPE_p_prelude_msg, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { Py_BEGIN_ALLOW_THREADS result = (int)prelude_connection_send(arg1,arg2); Py_END_ALLOW_THREADS } { if ( result < 0 ) { swig_python_raise_exception(result); resultobj = NULL; } else { resultobj = PyInt_FromLong(result); } } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_prelude_connection_recv(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; prelude_connection_t *arg1 = (prelude_connection_t *) 0 ; prelude_msg_t **arg2 = (prelude_msg_t **) 0 ; prelude_msg_t *tmp2 ; PyObject * obj0 = 0 ; int result; { tmp2 = NULL; arg2 = (prelude_msg_t **) &tmp2; } if (!PyArg_ParseTuple(args,(char *)"O:prelude_connection_recv",&obj0)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_prelude_connection, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { Py_BEGIN_ALLOW_THREADS result = (int)prelude_connection_recv(arg1,arg2); Py_END_ALLOW_THREADS } { if ( result < 0 ) { swig_python_raise_exception(result); resultobj = NULL; } else { resultobj = PyInt_FromLong(result); } } { if ( result >= 0 ) resultobj = SWIG_NewPointerObj((void *) * arg2, SWIGTYPE_p_prelude_msg, 0); } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_prelude_connection_recv_idmef(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; prelude_connection_t *arg1 = (prelude_connection_t *) 0 ; idmef_message_t **arg2 = (idmef_message_t **) 0 ; idmef_message_t *tmp2 ; PyObject * obj0 = 0 ; int result; { arg2 = (idmef_message_t **) &tmp2; } if (!PyArg_ParseTuple(args,(char *)"O:prelude_connection_recv_idmef",&obj0)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_prelude_connection, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { Py_BEGIN_ALLOW_THREADS result = (int)prelude_connection_recv_idmef(arg1,arg2); Py_END_ALLOW_THREADS } { if ( result < 0 ) { swig_python_raise_exception(result); resultobj = NULL; } else { resultobj = PyInt_FromLong(result); } } { if ( result >= 0 ) resultobj = SWIG_NewPointerObj((void *) * arg2, SWIGTYPE_p_idmef_message, 0); } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_prelude_connection_connect(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; prelude_connection_t *arg1 = (prelude_connection_t *) 0 ; prelude_client_profile_t *arg2 = (prelude_client_profile_t *) 0 ; prelude_connection_permission_t arg3 ; int val3 ; int ecode3 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; PyObject * obj2 = 0 ; int result; if (!PyArg_ParseTuple(args,(char *)"OOO:prelude_connection_connect",&obj0,&obj1,&obj2)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_prelude_connection, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { if ( obj1 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj1, (void **)&arg2, SWIGTYPE_p_prelude_client_profile, SWIG_POINTER_EXCEPTION|0) ) return NULL; } ecode3 = SWIG_AsVal_int(obj2, &val3); if (!SWIG_IsOK(ecode3)) { SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "prelude_connection_connect" "', argument " "3"" of type '" "prelude_connection_permission_t""'"); } arg3 = (prelude_connection_permission_t)(val3); { Py_BEGIN_ALLOW_THREADS result = (int)prelude_connection_connect(arg1,arg2,arg3); Py_END_ALLOW_THREADS } { if ( result < 0 ) { swig_python_raise_exception(result); resultobj = NULL; } else { resultobj = PyInt_FromLong(result); } } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_prelude_connection_forward(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; prelude_connection_t *arg1 = (prelude_connection_t *) 0 ; prelude_io_t *arg2 = (prelude_io_t *) 0 ; size_t arg3 ; void *argp2 = 0 ; int res2 = 0 ; size_t val3 ; int ecode3 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; PyObject * obj2 = 0 ; ssize_t result; if (!PyArg_ParseTuple(args,(char *)"OOO:prelude_connection_forward",&obj0,&obj1,&obj2)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_prelude_connection, SWIG_POINTER_EXCEPTION|0) ) return NULL; } res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_prelude_io_t, 0 | 0 ); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "prelude_connection_forward" "', argument " "2"" of type '" "prelude_io_t *""'"); } arg2 = (prelude_io_t *)(argp2); ecode3 = SWIG_AsVal_size_t(obj2, &val3); if (!SWIG_IsOK(ecode3)) { SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "prelude_connection_forward" "', argument " "3"" of type '" "size_t""'"); } arg3 = (size_t)(val3); { Py_BEGIN_ALLOW_THREADS result = prelude_connection_forward(arg1,arg2,arg3); Py_END_ALLOW_THREADS } resultobj = SWIG_NewPointerObj((ssize_t *)memcpy((ssize_t *)malloc(sizeof(ssize_t)),&result,sizeof(ssize_t)), SWIGTYPE_p_ssize_t, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_prelude_connection_get_local_addr(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; prelude_connection_t *arg1 = (prelude_connection_t *) 0 ; PyObject * obj0 = 0 ; char *result = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:prelude_connection_get_local_addr",&obj0)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_prelude_connection, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { Py_BEGIN_ALLOW_THREADS result = (char *)prelude_connection_get_local_addr(arg1); Py_END_ALLOW_THREADS } resultobj = SWIG_FromCharPtr((const char *)result); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_prelude_connection_get_local_port(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; prelude_connection_t *arg1 = (prelude_connection_t *) 0 ; PyObject * obj0 = 0 ; unsigned int result; if (!PyArg_ParseTuple(args,(char *)"O:prelude_connection_get_local_port",&obj0)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_prelude_connection, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { Py_BEGIN_ALLOW_THREADS result = (unsigned int)prelude_connection_get_local_port(arg1); Py_END_ALLOW_THREADS } resultobj = SWIG_From_unsigned_SS_int((unsigned int)(result)); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_prelude_connection_get_peer_addr(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; prelude_connection_t *arg1 = (prelude_connection_t *) 0 ; PyObject * obj0 = 0 ; char *result = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:prelude_connection_get_peer_addr",&obj0)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_prelude_connection, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { Py_BEGIN_ALLOW_THREADS result = (char *)prelude_connection_get_peer_addr(arg1); Py_END_ALLOW_THREADS } resultobj = SWIG_FromCharPtr((const char *)result); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_prelude_connection_get_peer_port(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; prelude_connection_t *arg1 = (prelude_connection_t *) 0 ; PyObject * obj0 = 0 ; unsigned int result; if (!PyArg_ParseTuple(args,(char *)"O:prelude_connection_get_peer_port",&obj0)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_prelude_connection, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { Py_BEGIN_ALLOW_THREADS result = (unsigned int)prelude_connection_get_peer_port(arg1); Py_END_ALLOW_THREADS } resultobj = SWIG_From_unsigned_SS_int((unsigned int)(result)); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_prelude_connection_is_alive(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; prelude_connection_t *arg1 = (prelude_connection_t *) 0 ; PyObject * obj0 = 0 ; prelude_bool_t result; if (!PyArg_ParseTuple(args,(char *)"O:prelude_connection_is_alive",&obj0)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_prelude_connection, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { Py_BEGIN_ALLOW_THREADS result = (prelude_bool_t)prelude_connection_is_alive(arg1); Py_END_ALLOW_THREADS } resultobj = SWIG_From_int((int)(result)); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_prelude_connection_get_fd(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; prelude_connection_t *arg1 = (prelude_connection_t *) 0 ; PyObject * obj0 = 0 ; prelude_io_t *result = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:prelude_connection_get_fd",&obj0)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_prelude_connection, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { Py_BEGIN_ALLOW_THREADS result = (prelude_io_t *)prelude_connection_get_fd(arg1); Py_END_ALLOW_THREADS } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_prelude_io_t, 0 | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_prelude_connection_close(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; prelude_connection_t *arg1 = (prelude_connection_t *) 0 ; PyObject * obj0 = 0 ; int result; if (!PyArg_ParseTuple(args,(char *)"O:prelude_connection_close",&obj0)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_prelude_connection, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { Py_BEGIN_ALLOW_THREADS result = (int)prelude_connection_close(arg1); Py_END_ALLOW_THREADS } { if ( result < 0 ) { swig_python_raise_exception(result); resultobj = NULL; } else { resultobj = PyInt_FromLong(result); } } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_prelude_connection_set_fd_ref(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; prelude_connection_t *arg1 = (prelude_connection_t *) 0 ; prelude_io_t *arg2 = (prelude_io_t *) 0 ; void *argp2 = 0 ; int res2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:prelude_connection_set_fd_ref",&obj0,&obj1)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_prelude_connection, SWIG_POINTER_EXCEPTION|0) ) return NULL; } res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_prelude_io_t, 0 | 0 ); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "prelude_connection_set_fd_ref" "', argument " "2"" of type '" "prelude_io_t *""'"); } arg2 = (prelude_io_t *)(argp2); { Py_BEGIN_ALLOW_THREADS prelude_connection_set_fd_ref(arg1,arg2); Py_END_ALLOW_THREADS } resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_prelude_connection_set_fd_nodup(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; prelude_connection_t *arg1 = (prelude_connection_t *) 0 ; prelude_io_t *arg2 = (prelude_io_t *) 0 ; void *argp2 = 0 ; int res2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:prelude_connection_set_fd_nodup",&obj0,&obj1)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_prelude_connection, SWIG_POINTER_EXCEPTION|0) ) return NULL; } res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_prelude_io_t, 0 | 0 ); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "prelude_connection_set_fd_nodup" "', argument " "2"" of type '" "prelude_io_t *""'"); } arg2 = (prelude_io_t *)(argp2); { Py_BEGIN_ALLOW_THREADS prelude_connection_set_fd_nodup(arg1,arg2); Py_END_ALLOW_THREADS } resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_prelude_connection_set_state(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; prelude_connection_t *arg1 = (prelude_connection_t *) 0 ; prelude_connection_state_t arg2 ; int val2 ; int ecode2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:prelude_connection_set_state",&obj0,&obj1)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_prelude_connection, SWIG_POINTER_EXCEPTION|0) ) return NULL; } ecode2 = SWIG_AsVal_int(obj1, &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "prelude_connection_set_state" "', argument " "2"" of type '" "prelude_connection_state_t""'"); } arg2 = (prelude_connection_state_t)(val2); { Py_BEGIN_ALLOW_THREADS prelude_connection_set_state(arg1,arg2); Py_END_ALLOW_THREADS } resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_prelude_connection_get_state(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; prelude_connection_t *arg1 = (prelude_connection_t *) 0 ; PyObject * obj0 = 0 ; prelude_connection_state_t result; if (!PyArg_ParseTuple(args,(char *)"O:prelude_connection_get_state",&obj0)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_prelude_connection, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { Py_BEGIN_ALLOW_THREADS result = (prelude_connection_state_t)prelude_connection_get_state(arg1); Py_END_ALLOW_THREADS } resultobj = SWIG_From_int((int)(result)); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_prelude_connection_set_data(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; prelude_connection_t *arg1 = (prelude_connection_t *) 0 ; void *arg2 = (void *) 0 ; int res2 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:prelude_connection_set_data",&obj0,&obj1)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_prelude_connection, SWIG_POINTER_EXCEPTION|0) ) return NULL; } res2 = SWIG_ConvertPtr(obj1,SWIG_as_voidptrptr(&arg2), 0, 0); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "prelude_connection_set_data" "', argument " "2"" of type '" "void *""'"); } { Py_BEGIN_ALLOW_THREADS prelude_connection_set_data(arg1,arg2); Py_END_ALLOW_THREADS } resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_prelude_connection_get_data(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; prelude_connection_t *arg1 = (prelude_connection_t *) 0 ; PyObject * obj0 = 0 ; void *result = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:prelude_connection_get_data",&obj0)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_prelude_connection, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { Py_BEGIN_ALLOW_THREADS result = (void *)prelude_connection_get_data(arg1); Py_END_ALLOW_THREADS } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_void, 0 | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_prelude_connection_get_default_socket_filename(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; char *result = 0 ; if (!PyArg_ParseTuple(args,(char *)":prelude_connection_get_default_socket_filename")) SWIG_fail; { Py_BEGIN_ALLOW_THREADS result = (char *)prelude_connection_get_default_socket_filename(); Py_END_ALLOW_THREADS } resultobj = SWIG_FromCharPtr((const char *)result); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_prelude_connection_get_permission(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; prelude_connection_t *arg1 = (prelude_connection_t *) 0 ; PyObject * obj0 = 0 ; prelude_connection_permission_t result; if (!PyArg_ParseTuple(args,(char *)"O:prelude_connection_get_permission",&obj0)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_prelude_connection, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { Py_BEGIN_ALLOW_THREADS result = (prelude_connection_permission_t)prelude_connection_get_permission(arg1); Py_END_ALLOW_THREADS } resultobj = SWIG_From_int((int)(result)); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_prelude_connection_get_peer_analyzerid(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; prelude_connection_t *arg1 = (prelude_connection_t *) 0 ; PyObject * obj0 = 0 ; uint64_t result; if (!PyArg_ParseTuple(args,(char *)"O:prelude_connection_get_peer_analyzerid",&obj0)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_prelude_connection, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { Py_BEGIN_ALLOW_THREADS result = (uint64_t)prelude_connection_get_peer_analyzerid(arg1); Py_END_ALLOW_THREADS } resultobj = SWIG_From_unsigned_SS_long_SS_long((unsigned long long)(result)); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_prelude_connection_set_peer_analyzerid(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; prelude_connection_t *arg1 = (prelude_connection_t *) 0 ; uint64_t arg2 ; unsigned long long val2 ; int ecode2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:prelude_connection_set_peer_analyzerid",&obj0,&obj1)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_prelude_connection, SWIG_POINTER_EXCEPTION|0) ) return NULL; } ecode2 = SWIG_AsVal_unsigned_SS_long_SS_long(obj1, &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "prelude_connection_set_peer_analyzerid" "', argument " "2"" of type '" "uint64_t""'"); } arg2 = (uint64_t)(val2); { Py_BEGIN_ALLOW_THREADS prelude_connection_set_peer_analyzerid(arg1,arg2); Py_END_ALLOW_THREADS } resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_prelude_connection_new(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; prelude_connection_t **arg1 = (prelude_connection_t **) 0 ; char *arg2 = (char *) 0 ; prelude_connection_t *tmp1 ; PyObject * obj0 = 0 ; int result; { arg1 = (prelude_connection_t **) &tmp1; } if (!PyArg_ParseTuple(args,(char *)"O:prelude_connection_new",&obj0)) SWIG_fail; { if ( obj0 == Py_None ) arg2 = NULL; else if ( PyString_Check(obj0) ) arg2 = PyString_AsString(obj0); else { PyErr_Format(PyExc_TypeError, "expected None or string, %s found", obj0->ob_type->tp_name); return NULL; } } { Py_BEGIN_ALLOW_THREADS result = (int)prelude_connection_new(arg1,(char const *)arg2); Py_END_ALLOW_THREADS } { if ( result < 0 ) { swig_python_raise_exception(result); resultobj = NULL; } else { resultobj = PyInt_FromLong(result); } } { if ( result >= 0 ) resultobj = SWIG_NewPointerObj((void *) * arg1, SWIGTYPE_p_prelude_connection, 0); } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_prelude_connection_new_msgbuf(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; prelude_connection_t *arg1 = (prelude_connection_t *) 0 ; prelude_msgbuf_t **arg2 = (prelude_msgbuf_t **) 0 ; prelude_msgbuf_t *tmp2 ; PyObject * obj0 = 0 ; int result; { arg2 = (prelude_msgbuf_t **) &tmp2; } if (!PyArg_ParseTuple(args,(char *)"O:prelude_connection_new_msgbuf",&obj0)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_prelude_connection, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { Py_BEGIN_ALLOW_THREADS result = (int)prelude_connection_new_msgbuf(arg1,arg2); Py_END_ALLOW_THREADS } { if ( result < 0 ) { swig_python_raise_exception(result); resultobj = NULL; } else { resultobj = PyInt_FromLong(result); } } { if ( result >= 0 ) resultobj = SWIG_NewPointerObj((void *) * arg2, SWIGTYPE_p_prelude_msgbuf, 0); } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_prelude_connection_permission_to_string(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; prelude_connection_permission_t arg1 ; prelude_string_t *arg2 = (prelude_string_t *) 0 ; int val1 ; int ecode1 = 0 ; PyObject * obj0 = 0 ; int result; { int ret; ret = prelude_string_new(&(arg2)); if ( ret < 0 ) { swig_python_raise_exception(ret); return NULL; } } if (!PyArg_ParseTuple(args,(char *)"O:prelude_connection_permission_to_string",&obj0)) SWIG_fail; ecode1 = SWIG_AsVal_int(obj0, &val1); if (!SWIG_IsOK(ecode1)) { SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "prelude_connection_permission_to_string" "', argument " "1"" of type '" "prelude_connection_permission_t""'"); } arg1 = (prelude_connection_permission_t)(val1); { Py_BEGIN_ALLOW_THREADS result = (int)prelude_connection_permission_to_string(arg1,arg2); Py_END_ALLOW_THREADS } { if ( result < 0 ) { swig_python_raise_exception(result); resultobj = NULL; } else { resultobj = PyInt_FromLong(result); } } { if ( result >= 0 ) resultobj = PyString_FromStringAndSize(prelude_string_get_string(arg2), prelude_string_get_len(arg2)); prelude_string_destroy(arg2); } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_prelude_connection_permission_new_from_string(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; prelude_connection_permission_t *arg1 = (prelude_connection_permission_t *) 0 ; char *arg2 = (char *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; int result; if (!PyArg_ParseTuple(args,(char *)"OO:prelude_connection_permission_new_from_string",&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_prelude_connection_permission_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "prelude_connection_permission_new_from_string" "', argument " "1"" of type '" "prelude_connection_permission_t *""'"); } arg1 = (prelude_connection_permission_t *)(argp1); { if ( obj1 == Py_None ) arg2 = NULL; else if ( PyString_Check(obj1) ) arg2 = PyString_AsString(obj1); else { PyErr_Format(PyExc_TypeError, "expected None or string, %s found", obj1->ob_type->tp_name); return NULL; } } { Py_BEGIN_ALLOW_THREADS result = (int)prelude_connection_permission_new_from_string(arg1,(char const *)arg2); Py_END_ALLOW_THREADS } { if ( result < 0 ) { swig_python_raise_exception(result); resultobj = NULL; } else { resultobj = PyInt_FromLong(result); } } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_prelude_connection_pool_broadcast(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; prelude_connection_pool_t *arg1 = (prelude_connection_pool_t *) 0 ; prelude_msg_t *arg2 = (prelude_msg_t *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:prelude_connection_pool_broadcast",&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_prelude_connection_pool, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "prelude_connection_pool_broadcast" "', argument " "1"" of type '" "prelude_connection_pool_t *""'"); } arg1 = (prelude_connection_pool_t *)(argp1); { if ( obj1 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj1, (void **)&arg2, SWIGTYPE_p_prelude_msg, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { Py_BEGIN_ALLOW_THREADS prelude_connection_pool_broadcast(arg1,arg2); Py_END_ALLOW_THREADS } resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_prelude_connection_pool_broadcast_async(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; prelude_connection_pool_t *arg1 = (prelude_connection_pool_t *) 0 ; prelude_msg_t *arg2 = (prelude_msg_t *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:prelude_connection_pool_broadcast_async",&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_prelude_connection_pool, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "prelude_connection_pool_broadcast_async" "', argument " "1"" of type '" "prelude_connection_pool_t *""'"); } arg1 = (prelude_connection_pool_t *)(argp1); { if ( obj1 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj1, (void **)&arg2, SWIGTYPE_p_prelude_msg, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { Py_BEGIN_ALLOW_THREADS prelude_connection_pool_broadcast_async(arg1,arg2); Py_END_ALLOW_THREADS } resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_prelude_connection_pool_init(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; prelude_connection_pool_t *arg1 = (prelude_connection_pool_t *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; int result; if (!PyArg_ParseTuple(args,(char *)"O:prelude_connection_pool_init",&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_prelude_connection_pool, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "prelude_connection_pool_init" "', argument " "1"" of type '" "prelude_connection_pool_t *""'"); } arg1 = (prelude_connection_pool_t *)(argp1); { Py_BEGIN_ALLOW_THREADS result = (int)prelude_connection_pool_init(arg1); Py_END_ALLOW_THREADS } { if ( result < 0 ) { swig_python_raise_exception(result); resultobj = NULL; } else { resultobj = PyInt_FromLong(result); } } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_prelude_connection_pool_new(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; prelude_connection_pool_t **arg1 = (prelude_connection_pool_t **) 0 ; prelude_client_profile_t *arg2 = (prelude_client_profile_t *) 0 ; prelude_connection_permission_t arg3 ; void *argp1 = 0 ; int res1 = 0 ; int val3 ; int ecode3 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; PyObject * obj2 = 0 ; int result; if (!PyArg_ParseTuple(args,(char *)"OOO:prelude_connection_pool_new",&obj0,&obj1,&obj2)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_p_prelude_connection_pool, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "prelude_connection_pool_new" "', argument " "1"" of type '" "prelude_connection_pool_t **""'"); } arg1 = (prelude_connection_pool_t **)(argp1); { if ( obj1 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj1, (void **)&arg2, SWIGTYPE_p_prelude_client_profile, SWIG_POINTER_EXCEPTION|0) ) return NULL; } ecode3 = SWIG_AsVal_int(obj2, &val3); if (!SWIG_IsOK(ecode3)) { SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "prelude_connection_pool_new" "', argument " "3"" of type '" "prelude_connection_permission_t""'"); } arg3 = (prelude_connection_permission_t)(val3); { Py_BEGIN_ALLOW_THREADS result = (int)prelude_connection_pool_new(arg1,arg2,arg3); Py_END_ALLOW_THREADS } { if ( result < 0 ) { swig_python_raise_exception(result); resultobj = NULL; } else { resultobj = PyInt_FromLong(result); } } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_prelude_connection_pool_get_connection_list(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; prelude_connection_pool_t *arg1 = (prelude_connection_pool_t *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; prelude_list_t *result = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:prelude_connection_pool_get_connection_list",&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_prelude_connection_pool, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "prelude_connection_pool_get_connection_list" "', argument " "1"" of type '" "prelude_connection_pool_t *""'"); } arg1 = (prelude_connection_pool_t *)(argp1); { Py_BEGIN_ALLOW_THREADS result = (prelude_list_t *)prelude_connection_pool_get_connection_list(arg1); Py_END_ALLOW_THREADS } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_prelude_list_t, 0 | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_prelude_connection_pool_add_connection(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; prelude_connection_pool_t *arg1 = (prelude_connection_pool_t *) 0 ; prelude_connection_t *arg2 = (prelude_connection_t *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; int result; if (!PyArg_ParseTuple(args,(char *)"OO:prelude_connection_pool_add_connection",&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_prelude_connection_pool, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "prelude_connection_pool_add_connection" "', argument " "1"" of type '" "prelude_connection_pool_t *""'"); } arg1 = (prelude_connection_pool_t *)(argp1); { if ( obj1 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj1, (void **)&arg2, SWIGTYPE_p_prelude_connection, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { Py_BEGIN_ALLOW_THREADS result = (int)prelude_connection_pool_add_connection(arg1,arg2); Py_END_ALLOW_THREADS } { if ( result < 0 ) { swig_python_raise_exception(result); resultobj = NULL; } else { resultobj = PyInt_FromLong(result); } } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_prelude_connection_pool_del_connection(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; prelude_connection_pool_t *arg1 = (prelude_connection_pool_t *) 0 ; prelude_connection_t *arg2 = (prelude_connection_t *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; int result; if (!PyArg_ParseTuple(args,(char *)"OO:prelude_connection_pool_del_connection",&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_prelude_connection_pool, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "prelude_connection_pool_del_connection" "', argument " "1"" of type '" "prelude_connection_pool_t *""'"); } arg1 = (prelude_connection_pool_t *)(argp1); { if ( obj1 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj1, (void **)&arg2, SWIGTYPE_p_prelude_connection, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { Py_BEGIN_ALLOW_THREADS result = (int)prelude_connection_pool_del_connection(arg1,arg2); Py_END_ALLOW_THREADS } { if ( result < 0 ) { swig_python_raise_exception(result); resultobj = NULL; } else { resultobj = PyInt_FromLong(result); } } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_prelude_connection_pool_set_connection_dead(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; prelude_connection_pool_t *arg1 = (prelude_connection_pool_t *) 0 ; prelude_connection_t *arg2 = (prelude_connection_t *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; int result; if (!PyArg_ParseTuple(args,(char *)"OO:prelude_connection_pool_set_connection_dead",&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_prelude_connection_pool, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "prelude_connection_pool_set_connection_dead" "', argument " "1"" of type '" "prelude_connection_pool_t *""'"); } arg1 = (prelude_connection_pool_t *)(argp1); { if ( obj1 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj1, (void **)&arg2, SWIGTYPE_p_prelude_connection, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { Py_BEGIN_ALLOW_THREADS result = (int)prelude_connection_pool_set_connection_dead(arg1,arg2); Py_END_ALLOW_THREADS } { if ( result < 0 ) { swig_python_raise_exception(result); resultobj = NULL; } else { resultobj = PyInt_FromLong(result); } } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_prelude_connection_pool_set_connection_alive(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; prelude_connection_pool_t *arg1 = (prelude_connection_pool_t *) 0 ; prelude_connection_t *arg2 = (prelude_connection_t *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; int result; if (!PyArg_ParseTuple(args,(char *)"OO:prelude_connection_pool_set_connection_alive",&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_prelude_connection_pool, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "prelude_connection_pool_set_connection_alive" "', argument " "1"" of type '" "prelude_connection_pool_t *""'"); } arg1 = (prelude_connection_pool_t *)(argp1); { if ( obj1 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj1, (void **)&arg2, SWIGTYPE_p_prelude_connection, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { Py_BEGIN_ALLOW_THREADS result = (int)prelude_connection_pool_set_connection_alive(arg1,arg2); Py_END_ALLOW_THREADS } { if ( result < 0 ) { swig_python_raise_exception(result); resultobj = NULL; } else { resultobj = PyInt_FromLong(result); } } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_prelude_connection_pool_set_connection_string(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; prelude_connection_pool_t *arg1 = (prelude_connection_pool_t *) 0 ; char *arg2 = (char *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; int result; if (!PyArg_ParseTuple(args,(char *)"OO:prelude_connection_pool_set_connection_string",&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_prelude_connection_pool, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "prelude_connection_pool_set_connection_string" "', argument " "1"" of type '" "prelude_connection_pool_t *""'"); } arg1 = (prelude_connection_pool_t *)(argp1); { if ( obj1 == Py_None ) arg2 = NULL; else if ( PyString_Check(obj1) ) arg2 = PyString_AsString(obj1); else { PyErr_Format(PyExc_TypeError, "expected None or string, %s found", obj1->ob_type->tp_name); return NULL; } } { Py_BEGIN_ALLOW_THREADS result = (int)prelude_connection_pool_set_connection_string(arg1,(char const *)arg2); Py_END_ALLOW_THREADS } { if ( result < 0 ) { swig_python_raise_exception(result); resultobj = NULL; } else { resultobj = PyInt_FromLong(result); } } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_prelude_connection_pool_get_connection_string(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; prelude_connection_pool_t *arg1 = (prelude_connection_pool_t *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; char *result = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:prelude_connection_pool_get_connection_string",&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_prelude_connection_pool, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "prelude_connection_pool_get_connection_string" "', argument " "1"" of type '" "prelude_connection_pool_t *""'"); } arg1 = (prelude_connection_pool_t *)(argp1); { Py_BEGIN_ALLOW_THREADS result = (char *)prelude_connection_pool_get_connection_string(arg1); Py_END_ALLOW_THREADS } resultobj = SWIG_FromCharPtr((const char *)result); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_prelude_connection_pool_destroy(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; prelude_connection_pool_t *arg1 = (prelude_connection_pool_t *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:prelude_connection_pool_destroy",&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_prelude_connection_pool, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "prelude_connection_pool_destroy" "', argument " "1"" of type '" "prelude_connection_pool_t *""'"); } arg1 = (prelude_connection_pool_t *)(argp1); { Py_BEGIN_ALLOW_THREADS prelude_connection_pool_destroy(arg1); Py_END_ALLOW_THREADS } resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_prelude_connection_pool_ref(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; prelude_connection_pool_t *arg1 = (prelude_connection_pool_t *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; prelude_connection_pool_t *result = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:prelude_connection_pool_ref",&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_prelude_connection_pool, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "prelude_connection_pool_ref" "', argument " "1"" of type '" "prelude_connection_pool_t *""'"); } arg1 = (prelude_connection_pool_t *)(argp1); { Py_BEGIN_ALLOW_THREADS result = (prelude_connection_pool_t *)prelude_connection_pool_ref(arg1); Py_END_ALLOW_THREADS } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_prelude_connection_pool, 0 | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_prelude_connection_pool_get_flags(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; prelude_connection_pool_t *arg1 = (prelude_connection_pool_t *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; prelude_connection_pool_flags_t result; if (!PyArg_ParseTuple(args,(char *)"O:prelude_connection_pool_get_flags",&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_prelude_connection_pool, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "prelude_connection_pool_get_flags" "', argument " "1"" of type '" "prelude_connection_pool_t *""'"); } arg1 = (prelude_connection_pool_t *)(argp1); { Py_BEGIN_ALLOW_THREADS result = (prelude_connection_pool_flags_t)prelude_connection_pool_get_flags(arg1); Py_END_ALLOW_THREADS } resultobj = SWIG_From_int((int)(result)); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_prelude_connection_pool_set_flags(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; prelude_connection_pool_t *arg1 = (prelude_connection_pool_t *) 0 ; prelude_connection_pool_flags_t arg2 ; void *argp1 = 0 ; int res1 = 0 ; int val2 ; int ecode2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:prelude_connection_pool_set_flags",&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_prelude_connection_pool, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "prelude_connection_pool_set_flags" "', argument " "1"" of type '" "prelude_connection_pool_t *""'"); } arg1 = (prelude_connection_pool_t *)(argp1); ecode2 = SWIG_AsVal_int(obj1, &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "prelude_connection_pool_set_flags" "', argument " "2"" of type '" "prelude_connection_pool_flags_t""'"); } arg2 = (prelude_connection_pool_flags_t)(val2); { Py_BEGIN_ALLOW_THREADS prelude_connection_pool_set_flags(arg1,arg2); Py_END_ALLOW_THREADS } resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_prelude_connection_pool_set_required_permission(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; prelude_connection_pool_t *arg1 = (prelude_connection_pool_t *) 0 ; prelude_connection_permission_t arg2 ; void *argp1 = 0 ; int res1 = 0 ; int val2 ; int ecode2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:prelude_connection_pool_set_required_permission",&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_prelude_connection_pool, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "prelude_connection_pool_set_required_permission" "', argument " "1"" of type '" "prelude_connection_pool_t *""'"); } arg1 = (prelude_connection_pool_t *)(argp1); ecode2 = SWIG_AsVal_int(obj1, &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "prelude_connection_pool_set_required_permission" "', argument " "2"" of type '" "prelude_connection_permission_t""'"); } arg2 = (prelude_connection_permission_t)(val2); { Py_BEGIN_ALLOW_THREADS prelude_connection_pool_set_required_permission(arg1,arg2); Py_END_ALLOW_THREADS } resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_prelude_connection_pool_set_data(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; prelude_connection_pool_t *arg1 = (prelude_connection_pool_t *) 0 ; void *arg2 = (void *) 0 ; void *argp1 = 0 ; int res1 = 0 ; int res2 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:prelude_connection_pool_set_data",&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_prelude_connection_pool, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "prelude_connection_pool_set_data" "', argument " "1"" of type '" "prelude_connection_pool_t *""'"); } arg1 = (prelude_connection_pool_t *)(argp1); res2 = SWIG_ConvertPtr(obj1,SWIG_as_voidptrptr(&arg2), 0, 0); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "prelude_connection_pool_set_data" "', argument " "2"" of type '" "void *""'"); } { Py_BEGIN_ALLOW_THREADS prelude_connection_pool_set_data(arg1,arg2); Py_END_ALLOW_THREADS } resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_prelude_connection_pool_get_data(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; prelude_connection_pool_t *arg1 = (prelude_connection_pool_t *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; void *result = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:prelude_connection_pool_get_data",&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_prelude_connection_pool, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "prelude_connection_pool_get_data" "', argument " "1"" of type '" "prelude_connection_pool_t *""'"); } arg1 = (prelude_connection_pool_t *)(argp1); { Py_BEGIN_ALLOW_THREADS result = (void *)prelude_connection_pool_get_data(arg1); Py_END_ALLOW_THREADS } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_void, 0 | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_prelude_connection_pool_recv(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; prelude_connection_pool_t *arg1 = (prelude_connection_pool_t *) 0 ; int arg2 ; prelude_connection_t **arg3 = (prelude_connection_t **) 0 ; prelude_msg_t **arg4 = (prelude_msg_t **) 0 ; void *argp1 = 0 ; int res1 = 0 ; int val2 ; int ecode2 = 0 ; prelude_connection_t *tmp3 ; prelude_msg_t *tmp4 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; int result; { arg3 = (prelude_connection_t **) &tmp3; } { tmp4 = NULL; arg4 = (prelude_msg_t **) &tmp4; } if (!PyArg_ParseTuple(args,(char *)"OO:prelude_connection_pool_recv",&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_prelude_connection_pool, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "prelude_connection_pool_recv" "', argument " "1"" of type '" "prelude_connection_pool_t *""'"); } arg1 = (prelude_connection_pool_t *)(argp1); ecode2 = SWIG_AsVal_int(obj1, &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "prelude_connection_pool_recv" "', argument " "2"" of type '" "int""'"); } arg2 = (int)(val2); { Py_BEGIN_ALLOW_THREADS result = (int)prelude_connection_pool_recv(arg1,arg2,arg3,arg4); Py_END_ALLOW_THREADS } { if ( result < 0 ) { swig_python_raise_exception(result); resultobj = NULL; } else { resultobj = PyInt_FromLong(result); } } { if ( result >= 0 ) resultobj = SWIG_NewPointerObj((void *) * arg3, SWIGTYPE_p_prelude_connection, 0); } { if ( result >= 0 ) resultobj = SWIG_NewPointerObj((void *) * arg4, SWIGTYPE_p_prelude_msg, 0); } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_prelude_connection_pool_check_event(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; prelude_connection_pool_t *arg1 = (prelude_connection_pool_t *) 0 ; int arg2 ; int (*arg3)(prelude_connection_pool_t *,prelude_connection_pool_event_t,prelude_connection_t *,void *) = (int (*)(prelude_connection_pool_t *,prelude_connection_pool_event_t,prelude_connection_t *,void *)) 0 ; void *arg4 = (void *) 0 ; void *argp1 = 0 ; int res1 = 0 ; int val2 ; int ecode2 = 0 ; int res4 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; PyObject * obj2 = 0 ; PyObject * obj3 = 0 ; int result; if (!PyArg_ParseTuple(args,(char *)"OOOO:prelude_connection_pool_check_event",&obj0,&obj1,&obj2,&obj3)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_prelude_connection_pool, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "prelude_connection_pool_check_event" "', argument " "1"" of type '" "prelude_connection_pool_t *""'"); } arg1 = (prelude_connection_pool_t *)(argp1); ecode2 = SWIG_AsVal_int(obj1, &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "prelude_connection_pool_check_event" "', argument " "2"" of type '" "int""'"); } arg2 = (int)(val2); { int res = SWIG_ConvertFunctionPtr(obj2, (void**)(&arg3), SWIGTYPE_p_f_p_struct_prelude_connection_pool_enum_prelude_connection_pool_event_t_p_struct_prelude_connection_p_void__int); if (!SWIG_IsOK(res)) { SWIG_exception_fail(SWIG_ArgError(res), "in method '" "prelude_connection_pool_check_event" "', argument " "3"" of type '" "int (*)(prelude_connection_pool_t *,prelude_connection_pool_event_t,prelude_connection_t *,void *)""'"); } } res4 = SWIG_ConvertPtr(obj3,SWIG_as_voidptrptr(&arg4), 0, 0); if (!SWIG_IsOK(res4)) { SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "prelude_connection_pool_check_event" "', argument " "4"" of type '" "void *""'"); } { Py_BEGIN_ALLOW_THREADS result = (int)prelude_connection_pool_check_event(arg1,arg2,arg3,arg4); Py_END_ALLOW_THREADS } { if ( result < 0 ) { swig_python_raise_exception(result); resultobj = NULL; } else { resultobj = PyInt_FromLong(result); } } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_prelude_connection_pool_set_global_event_handler(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; prelude_connection_pool_t *arg1 = (prelude_connection_pool_t *) 0 ; prelude_connection_pool_event_t arg2 ; int (*arg3)(prelude_connection_pool_t *,prelude_connection_pool_event_t) = (int (*)(prelude_connection_pool_t *,prelude_connection_pool_event_t)) 0 ; void *argp1 = 0 ; int res1 = 0 ; int val2 ; int ecode2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; PyObject * obj2 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OOO:prelude_connection_pool_set_global_event_handler",&obj0,&obj1,&obj2)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_prelude_connection_pool, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "prelude_connection_pool_set_global_event_handler" "', argument " "1"" of type '" "prelude_connection_pool_t *""'"); } arg1 = (prelude_connection_pool_t *)(argp1); ecode2 = SWIG_AsVal_int(obj1, &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "prelude_connection_pool_set_global_event_handler" "', argument " "2"" of type '" "prelude_connection_pool_event_t""'"); } arg2 = (prelude_connection_pool_event_t)(val2); { int res = SWIG_ConvertFunctionPtr(obj2, (void**)(&arg3), SWIGTYPE_p_f_p_struct_prelude_connection_pool_enum_prelude_connection_pool_event_t__int); if (!SWIG_IsOK(res)) { SWIG_exception_fail(SWIG_ArgError(res), "in method '" "prelude_connection_pool_set_global_event_handler" "', argument " "3"" of type '" "int (*)(prelude_connection_pool_t *,prelude_connection_pool_event_t)""'"); } } { Py_BEGIN_ALLOW_THREADS prelude_connection_pool_set_global_event_handler(arg1,arg2,arg3); Py_END_ALLOW_THREADS } resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_prelude_connection_pool_set_event_handler(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; prelude_connection_pool_t *arg1 = (prelude_connection_pool_t *) 0 ; prelude_connection_pool_event_t arg2 ; int (*arg3)(prelude_connection_pool_t *,prelude_connection_pool_event_t,prelude_connection_t *) = (int (*)(prelude_connection_pool_t *,prelude_connection_pool_event_t,prelude_connection_t *)) 0 ; void *argp1 = 0 ; int res1 = 0 ; int val2 ; int ecode2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; PyObject * obj2 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OOO:prelude_connection_pool_set_event_handler",&obj0,&obj1,&obj2)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_prelude_connection_pool, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "prelude_connection_pool_set_event_handler" "', argument " "1"" of type '" "prelude_connection_pool_t *""'"); } arg1 = (prelude_connection_pool_t *)(argp1); ecode2 = SWIG_AsVal_int(obj1, &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "prelude_connection_pool_set_event_handler" "', argument " "2"" of type '" "prelude_connection_pool_event_t""'"); } arg2 = (prelude_connection_pool_event_t)(val2); { int res = SWIG_ConvertFunctionPtr(obj2, (void**)(&arg3), SWIGTYPE_p_f_p_struct_prelude_connection_pool_enum_prelude_connection_pool_event_t_p_struct_prelude_connection__int); if (!SWIG_IsOK(res)) { SWIG_exception_fail(SWIG_ArgError(res), "in method '" "prelude_connection_pool_set_event_handler" "', argument " "3"" of type '" "int (*)(prelude_connection_pool_t *,prelude_connection_pool_event_t,prelude_connection_t *)""'"); } } { Py_BEGIN_ALLOW_THREADS prelude_connection_pool_set_event_handler(arg1,arg2,arg3); Py_END_ALLOW_THREADS } resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_prelude_option_set_priority(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; prelude_option_t *arg1 = (prelude_option_t *) 0 ; prelude_option_priority_t arg2 ; void *argp1 = 0 ; int res1 = 0 ; int val2 ; int ecode2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:prelude_option_set_priority",&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_prelude_option, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "prelude_option_set_priority" "', argument " "1"" of type '" "prelude_option_t *""'"); } arg1 = (prelude_option_t *)(argp1); ecode2 = SWIG_AsVal_int(obj1, &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "prelude_option_set_priority" "', argument " "2"" of type '" "prelude_option_priority_t""'"); } arg2 = (prelude_option_priority_t)(val2); { Py_BEGIN_ALLOW_THREADS prelude_option_set_priority(arg1,arg2); Py_END_ALLOW_THREADS } resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_prelude_option_print(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; prelude_option_t *arg1 = (prelude_option_t *) 0 ; prelude_option_type_t arg2 ; int arg3 ; FILE *arg4 = (FILE *) 0 ; void *argp1 = 0 ; int res1 = 0 ; int val2 ; int ecode2 = 0 ; int val3 ; int ecode3 = 0 ; void *argp4 = 0 ; int res4 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; PyObject * obj2 = 0 ; PyObject * obj3 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OOOO:prelude_option_print",&obj0,&obj1,&obj2,&obj3)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_prelude_option, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "prelude_option_print" "', argument " "1"" of type '" "prelude_option_t *""'"); } arg1 = (prelude_option_t *)(argp1); ecode2 = SWIG_AsVal_int(obj1, &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "prelude_option_print" "', argument " "2"" of type '" "prelude_option_type_t""'"); } arg2 = (prelude_option_type_t)(val2); ecode3 = SWIG_AsVal_int(obj2, &val3); if (!SWIG_IsOK(ecode3)) { SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "prelude_option_print" "', argument " "3"" of type '" "int""'"); } arg3 = (int)(val3); res4 = SWIG_ConvertPtr(obj3, &argp4,SWIGTYPE_p_FILE, 0 | 0 ); if (!SWIG_IsOK(res4)) { SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "prelude_option_print" "', argument " "4"" of type '" "FILE *""'"); } arg4 = (FILE *)(argp4); { Py_BEGIN_ALLOW_THREADS prelude_option_print(arg1,arg2,arg3,arg4); Py_END_ALLOW_THREADS } resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_prelude_option_wide_send_msg(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; prelude_msgbuf_t *arg1 = (prelude_msgbuf_t *) 0 ; void *arg2 = (void *) 0 ; int res2 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; int result; if (!PyArg_ParseTuple(args,(char *)"OO:prelude_option_wide_send_msg",&obj0,&obj1)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_prelude_msgbuf, SWIG_POINTER_EXCEPTION|0) ) return NULL; } res2 = SWIG_ConvertPtr(obj1,SWIG_as_voidptrptr(&arg2), 0, 0); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "prelude_option_wide_send_msg" "', argument " "2"" of type '" "void *""'"); } { Py_BEGIN_ALLOW_THREADS result = (int)prelude_option_wide_send_msg(arg1,arg2); Py_END_ALLOW_THREADS } { if ( result < 0 ) { swig_python_raise_exception(result); resultobj = NULL; } else { resultobj = PyInt_FromLong(result); } } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_prelude_option_destroy(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; prelude_option_t *arg1 = (prelude_option_t *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:prelude_option_destroy",&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_prelude_option, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "prelude_option_destroy" "', argument " "1"" of type '" "prelude_option_t *""'"); } arg1 = (prelude_option_t *)(argp1); { Py_BEGIN_ALLOW_THREADS prelude_option_destroy(arg1); Py_END_ALLOW_THREADS } resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_prelude_option_read(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; prelude_option_t *arg1 = (prelude_option_t *) 0 ; char **arg2 = (char **) 0 ; int *arg3 = (int *) 0 ; char **arg4 = (char **) 0 ; prelude_string_t **arg5 = (prelude_string_t **) 0 ; void *arg6 = (void *) 0 ; void *argp1 = 0 ; int res1 = 0 ; void *argp2 = 0 ; int res2 = 0 ; int tmp3 ; void *argp5 = 0 ; int res5 = 0 ; int res6 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; PyObject * obj2 = 0 ; PyObject * obj3 = 0 ; PyObject * obj4 = 0 ; PyObject * obj5 = 0 ; int result; if (!PyArg_ParseTuple(args,(char *)"OOOOOO:prelude_option_read",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_prelude_option, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "prelude_option_read" "', argument " "1"" of type '" "prelude_option_t *""'"); } arg1 = (prelude_option_t *)(argp1); res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_p_char, 0 | 0 ); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "prelude_option_read" "', argument " "2"" of type '" "char const **""'"); } arg2 = (char **)(argp2); { tmp3 = PyInt_AsLong(obj2); arg3 = &tmp3; } { /* Check if is a list */ if ( PyList_Check(obj3) ) { int size = PyList_Size(obj3); int i = 0; arg4 = (char **) malloc((size+1) * sizeof(char *)); for ( i = 0; i < size; i++ ) { PyObject *o = PyList_GetItem(obj3,i); if ( PyString_Check(o) ) arg4[i] = PyString_AsString(PyList_GetItem(obj3, i)); else { PyErr_SetString(PyExc_TypeError, "list must contain strings"); free(arg4); return NULL; } } arg4[i] = 0; } else { PyErr_SetString(PyExc_TypeError, "not a list"); return NULL; } } res5 = SWIG_ConvertPtr(obj4, &argp5,SWIGTYPE_p_p_prelude_string_t, 0 | 0 ); if (!SWIG_IsOK(res5)) { SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "prelude_option_read" "', argument " "5"" of type '" "prelude_string_t **""'"); } arg5 = (prelude_string_t **)(argp5); res6 = SWIG_ConvertPtr(obj5,SWIG_as_voidptrptr(&arg6), 0, 0); if (!SWIG_IsOK(res6)) { SWIG_exception_fail(SWIG_ArgError(res6), "in method '" "prelude_option_read" "', argument " "6"" of type '" "void *""'"); } { Py_BEGIN_ALLOW_THREADS result = (int)prelude_option_read(arg1,(char const **)arg2,arg3,arg4,arg5,arg6); Py_END_ALLOW_THREADS } { if ( result < 0 ) { swig_python_raise_exception(result); resultobj = NULL; } else { resultobj = PyInt_FromLong(result); } } { free(arg4); } return resultobj; fail: { free(arg4); } return NULL; } SWIGINTERN PyObject *_wrap_prelude_option_add(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; prelude_option_t *arg1 = (prelude_option_t *) 0 ; prelude_option_t **arg2 = (prelude_option_t **) 0 ; prelude_option_type_t arg3 ; char arg4 ; char *arg5 = (char *) 0 ; char *arg6 = (char *) 0 ; prelude_option_argument_t arg7 ; int (*arg8)(prelude_option_t *,char const *,prelude_string_t *,void *) = (int (*)(prelude_option_t *,char const *,prelude_string_t *,void *)) 0 ; int (*arg9)(prelude_option_t *,prelude_string_t *,void *) = (int (*)(prelude_option_t *,prelude_string_t *,void *)) 0 ; void *argp1 = 0 ; int res1 = 0 ; void *argp2 = 0 ; int res2 = 0 ; int val3 ; int ecode3 = 0 ; char val4 ; int ecode4 = 0 ; int val7 ; int ecode7 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; PyObject * obj2 = 0 ; PyObject * obj3 = 0 ; PyObject * obj4 = 0 ; PyObject * obj5 = 0 ; PyObject * obj6 = 0 ; PyObject * obj7 = 0 ; PyObject * obj8 = 0 ; int result; if (!PyArg_ParseTuple(args,(char *)"OOOOOOOOO:prelude_option_add",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6,&obj7,&obj8)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_prelude_option, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "prelude_option_add" "', argument " "1"" of type '" "prelude_option_t *""'"); } arg1 = (prelude_option_t *)(argp1); res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_p_prelude_option, 0 | 0 ); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "prelude_option_add" "', argument " "2"" of type '" "prelude_option_t **""'"); } arg2 = (prelude_option_t **)(argp2); ecode3 = SWIG_AsVal_int(obj2, &val3); if (!SWIG_IsOK(ecode3)) { SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "prelude_option_add" "', argument " "3"" of type '" "prelude_option_type_t""'"); } arg3 = (prelude_option_type_t)(val3); ecode4 = SWIG_AsVal_char(obj3, &val4); if (!SWIG_IsOK(ecode4)) { SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "prelude_option_add" "', argument " "4"" of type '" "char""'"); } arg4 = (char)(val4); { if ( obj4 == Py_None ) arg5 = NULL; else if ( PyString_Check(obj4) ) arg5 = PyString_AsString(obj4); else { PyErr_Format(PyExc_TypeError, "expected None or string, %s found", obj4->ob_type->tp_name); return NULL; } } { if ( obj5 == Py_None ) arg6 = NULL; else if ( PyString_Check(obj5) ) arg6 = PyString_AsString(obj5); else { PyErr_Format(PyExc_TypeError, "expected None or string, %s found", obj5->ob_type->tp_name); return NULL; } } ecode7 = SWIG_AsVal_int(obj6, &val7); if (!SWIG_IsOK(ecode7)) { SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "prelude_option_add" "', argument " "7"" of type '" "prelude_option_argument_t""'"); } arg7 = (prelude_option_argument_t)(val7); { int res = SWIG_ConvertFunctionPtr(obj7, (void**)(&arg8), SWIGTYPE_p_f_p_struct_prelude_option_p_q_const__char_p_prelude_string_t_p_void__int); if (!SWIG_IsOK(res)) { SWIG_exception_fail(SWIG_ArgError(res), "in method '" "prelude_option_add" "', argument " "8"" of type '" "int (*)(prelude_option_t *,char const *,prelude_string_t *,void *)""'"); } } { int res = SWIG_ConvertFunctionPtr(obj8, (void**)(&arg9), SWIGTYPE_p_f_p_struct_prelude_option_p_prelude_string_t_p_void__int); if (!SWIG_IsOK(res)) { SWIG_exception_fail(SWIG_ArgError(res), "in method '" "prelude_option_add" "', argument " "9"" of type '" "int (*)(prelude_option_t *,prelude_string_t *,void *)""'"); } } { Py_BEGIN_ALLOW_THREADS result = (int)prelude_option_add(arg1,arg2,arg3,arg4,(char const *)arg5,(char const *)arg6,arg7,arg8,arg9); Py_END_ALLOW_THREADS } { if ( result < 0 ) { swig_python_raise_exception(result); resultobj = NULL; } else { resultobj = PyInt_FromLong(result); } } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_prelude_option_set_type(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; prelude_option_t *arg1 = (prelude_option_t *) 0 ; prelude_option_type_t arg2 ; void *argp1 = 0 ; int res1 = 0 ; int val2 ; int ecode2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:prelude_option_set_type",&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_prelude_option, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "prelude_option_set_type" "', argument " "1"" of type '" "prelude_option_t *""'"); } arg1 = (prelude_option_t *)(argp1); ecode2 = SWIG_AsVal_int(obj1, &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "prelude_option_set_type" "', argument " "2"" of type '" "prelude_option_type_t""'"); } arg2 = (prelude_option_type_t)(val2); { Py_BEGIN_ALLOW_THREADS prelude_option_set_type(arg1,arg2); Py_END_ALLOW_THREADS } resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_prelude_option_get_type(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; prelude_option_t *arg1 = (prelude_option_t *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; prelude_option_type_t result; if (!PyArg_ParseTuple(args,(char *)"O:prelude_option_get_type",&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_prelude_option, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "prelude_option_get_type" "', argument " "1"" of type '" "prelude_option_t *""'"); } arg1 = (prelude_option_t *)(argp1); { Py_BEGIN_ALLOW_THREADS result = (prelude_option_type_t)prelude_option_get_type(arg1); Py_END_ALLOW_THREADS } resultobj = SWIG_From_int((int)(result)); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_prelude_option_set_warnings(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; prelude_option_warning_t arg1 ; prelude_option_warning_t *arg2 = (prelude_option_warning_t *) 0 ; int val1 ; int ecode1 = 0 ; void *argp2 = 0 ; int res2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:prelude_option_set_warnings",&obj0,&obj1)) SWIG_fail; ecode1 = SWIG_AsVal_int(obj0, &val1); if (!SWIG_IsOK(ecode1)) { SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "prelude_option_set_warnings" "', argument " "1"" of type '" "prelude_option_warning_t""'"); } arg1 = (prelude_option_warning_t)(val1); res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_prelude_option_warning_t, 0 | 0 ); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "prelude_option_set_warnings" "', argument " "2"" of type '" "prelude_option_warning_t *""'"); } arg2 = (prelude_option_warning_t *)(argp2); { Py_BEGIN_ALLOW_THREADS prelude_option_set_warnings(arg1,arg2); Py_END_ALLOW_THREADS } resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_prelude_option_get_shortname(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; prelude_option_t *arg1 = (prelude_option_t *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; char result; if (!PyArg_ParseTuple(args,(char *)"O:prelude_option_get_shortname",&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_prelude_option, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "prelude_option_get_shortname" "', argument " "1"" of type '" "prelude_option_t *""'"); } arg1 = (prelude_option_t *)(argp1); { Py_BEGIN_ALLOW_THREADS result = (char)prelude_option_get_shortname(arg1); Py_END_ALLOW_THREADS } resultobj = SWIG_From_char((char)(result)); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_prelude_option_get_longname(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; prelude_option_t *arg1 = (prelude_option_t *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; char *result = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:prelude_option_get_longname",&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_prelude_option, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "prelude_option_get_longname" "', argument " "1"" of type '" "prelude_option_t *""'"); } arg1 = (prelude_option_t *)(argp1); { Py_BEGIN_ALLOW_THREADS result = (char *)prelude_option_get_longname(arg1); Py_END_ALLOW_THREADS } resultobj = SWIG_FromCharPtr((const char *)result); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap__prelude_option_set_private_data(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; prelude_option_t *arg1 = (prelude_option_t *) 0 ; void *arg2 = (void *) 0 ; void *argp1 = 0 ; int res1 = 0 ; int res2 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:_prelude_option_set_private_data",&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_prelude_option, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "_prelude_option_set_private_data" "', argument " "1"" of type '" "prelude_option_t *""'"); } arg1 = (prelude_option_t *)(argp1); res2 = SWIG_ConvertPtr(obj1,SWIG_as_voidptrptr(&arg2), 0, 0); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "_prelude_option_set_private_data" "', argument " "2"" of type '" "void *""'"); } { Py_BEGIN_ALLOW_THREADS _prelude_option_set_private_data(arg1,arg2); Py_END_ALLOW_THREADS } resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap__prelude_option_get_private_data(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; prelude_option_t *arg1 = (prelude_option_t *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; void *result = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:_prelude_option_get_private_data",&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_prelude_option, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "_prelude_option_get_private_data" "', argument " "1"" of type '" "prelude_option_t *""'"); } arg1 = (prelude_option_t *)(argp1); { Py_BEGIN_ALLOW_THREADS result = (void *)_prelude_option_get_private_data(arg1); Py_END_ALLOW_THREADS } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_void, 0 | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_prelude_option_set_data(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; prelude_option_t *arg1 = (prelude_option_t *) 0 ; void *arg2 = (void *) 0 ; void *argp1 = 0 ; int res1 = 0 ; int res2 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:prelude_option_set_data",&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_prelude_option, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "prelude_option_set_data" "', argument " "1"" of type '" "prelude_option_t *""'"); } arg1 = (prelude_option_t *)(argp1); res2 = SWIG_ConvertPtr(obj1,SWIG_as_voidptrptr(&arg2), 0, 0); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "prelude_option_set_data" "', argument " "2"" of type '" "void *""'"); } { Py_BEGIN_ALLOW_THREADS prelude_option_set_data(arg1,arg2); Py_END_ALLOW_THREADS } resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_prelude_option_get_data(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; prelude_option_t *arg1 = (prelude_option_t *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; void *result = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:prelude_option_get_data",&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_prelude_option, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "prelude_option_get_data" "', argument " "1"" of type '" "prelude_option_t *""'"); } arg1 = (prelude_option_t *)(argp1); { Py_BEGIN_ALLOW_THREADS result = (void *)prelude_option_get_data(arg1); Py_END_ALLOW_THREADS } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_void, 0 | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_prelude_option_invoke_commit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; prelude_option_t *arg1 = (prelude_option_t *) 0 ; char *arg2 = (char *) 0 ; prelude_string_t *arg3 = (prelude_string_t *) 0 ; void *arg4 = (void *) 0 ; void *argp1 = 0 ; int res1 = 0 ; int res4 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; PyObject * obj2 = 0 ; PyObject * obj3 = 0 ; int result; if (!PyArg_ParseTuple(args,(char *)"OOOO:prelude_option_invoke_commit",&obj0,&obj1,&obj2,&obj3)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_prelude_option, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "prelude_option_invoke_commit" "', argument " "1"" of type '" "prelude_option_t *""'"); } arg1 = (prelude_option_t *)(argp1); { if ( obj1 == Py_None ) arg2 = NULL; else if ( PyString_Check(obj1) ) arg2 = PyString_AsString(obj1); else { PyErr_Format(PyExc_TypeError, "expected None or string, %s found", obj1->ob_type->tp_name); return NULL; } } { int ret; ret = prelude_string_new_dup_fast(&(arg3), PyString_AsString(obj2), PyString_Size(obj2)); if ( ret < 0 ) { swig_python_raise_exception(ret); return NULL; } } res4 = SWIG_ConvertPtr(obj3,SWIG_as_voidptrptr(&arg4), 0, 0); if (!SWIG_IsOK(res4)) { SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "prelude_option_invoke_commit" "', argument " "4"" of type '" "void *""'"); } { Py_BEGIN_ALLOW_THREADS result = (int)prelude_option_invoke_commit(arg1,(char const *)arg2,arg3,arg4); Py_END_ALLOW_THREADS } { if ( result < 0 ) { swig_python_raise_exception(result); resultobj = NULL; } else { resultobj = PyInt_FromLong(result); } } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_prelude_option_invoke_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; prelude_option_t *arg1 = (prelude_option_t *) 0 ; char *arg2 = (char *) 0 ; prelude_string_t *arg3 = (prelude_string_t *) 0 ; void **arg4 = (void **) 0 ; void *argp1 = 0 ; int res1 = 0 ; void *argp4 = 0 ; int res4 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; PyObject * obj2 = 0 ; PyObject * obj3 = 0 ; int result; if (!PyArg_ParseTuple(args,(char *)"OOOO:prelude_option_invoke_set",&obj0,&obj1,&obj2,&obj3)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_prelude_option, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "prelude_option_invoke_set" "', argument " "1"" of type '" "prelude_option_t *""'"); } arg1 = (prelude_option_t *)(argp1); { if ( obj1 == Py_None ) arg2 = NULL; else if ( PyString_Check(obj1) ) arg2 = PyString_AsString(obj1); else { PyErr_Format(PyExc_TypeError, "expected None or string, %s found", obj1->ob_type->tp_name); return NULL; } } { int ret; ret = prelude_string_new_dup_fast(&(arg3), PyString_AsString(obj2), PyString_Size(obj2)); if ( ret < 0 ) { swig_python_raise_exception(ret); return NULL; } } res4 = SWIG_ConvertPtr(obj3, &argp4,SWIGTYPE_p_p_void, 0 | 0 ); if (!SWIG_IsOK(res4)) { SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "prelude_option_invoke_set" "', argument " "4"" of type '" "void **""'"); } arg4 = (void **)(argp4); { Py_BEGIN_ALLOW_THREADS result = (int)prelude_option_invoke_set(arg1,(char const *)arg2,arg3,arg4); Py_END_ALLOW_THREADS } { if ( result < 0 ) { swig_python_raise_exception(result); resultobj = NULL; } else { resultobj = PyInt_FromLong(result); } } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_prelude_option_invoke_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; prelude_option_t *arg1 = (prelude_option_t *) 0 ; char *arg2 = (char *) 0 ; prelude_string_t *arg3 = (prelude_string_t *) 0 ; void *arg4 = (void *) 0 ; void *argp1 = 0 ; int res1 = 0 ; int res4 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; PyObject * obj2 = 0 ; PyObject * obj3 = 0 ; int result; if (!PyArg_ParseTuple(args,(char *)"OOOO:prelude_option_invoke_get",&obj0,&obj1,&obj2,&obj3)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_prelude_option, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "prelude_option_invoke_get" "', argument " "1"" of type '" "prelude_option_t *""'"); } arg1 = (prelude_option_t *)(argp1); { if ( obj1 == Py_None ) arg2 = NULL; else if ( PyString_Check(obj1) ) arg2 = PyString_AsString(obj1); else { PyErr_Format(PyExc_TypeError, "expected None or string, %s found", obj1->ob_type->tp_name); return NULL; } } { int ret; ret = prelude_string_new_dup_fast(&(arg3), PyString_AsString(obj2), PyString_Size(obj2)); if ( ret < 0 ) { swig_python_raise_exception(ret); return NULL; } } res4 = SWIG_ConvertPtr(obj3,SWIG_as_voidptrptr(&arg4), 0, 0); if (!SWIG_IsOK(res4)) { SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "prelude_option_invoke_get" "', argument " "4"" of type '" "void *""'"); } { Py_BEGIN_ALLOW_THREADS result = (int)prelude_option_invoke_get(arg1,(char const *)arg2,arg3,arg4); Py_END_ALLOW_THREADS } { if ( result < 0 ) { swig_python_raise_exception(result); resultobj = NULL; } else { resultobj = PyInt_FromLong(result); } } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_prelude_option_invoke_destroy(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; prelude_option_t *arg1 = (prelude_option_t *) 0 ; char *arg2 = (char *) 0 ; prelude_string_t *arg3 = (prelude_string_t *) 0 ; void *arg4 = (void *) 0 ; void *argp1 = 0 ; int res1 = 0 ; int res4 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; PyObject * obj2 = 0 ; PyObject * obj3 = 0 ; int result; if (!PyArg_ParseTuple(args,(char *)"OOOO:prelude_option_invoke_destroy",&obj0,&obj1,&obj2,&obj3)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_prelude_option, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "prelude_option_invoke_destroy" "', argument " "1"" of type '" "prelude_option_t *""'"); } arg1 = (prelude_option_t *)(argp1); { if ( obj1 == Py_None ) arg2 = NULL; else if ( PyString_Check(obj1) ) arg2 = PyString_AsString(obj1); else { PyErr_Format(PyExc_TypeError, "expected None or string, %s found", obj1->ob_type->tp_name); return NULL; } } { int ret; ret = prelude_string_new_dup_fast(&(arg3), PyString_AsString(obj2), PyString_Size(obj2)); if ( ret < 0 ) { swig_python_raise_exception(ret); return NULL; } } res4 = SWIG_ConvertPtr(obj3,SWIG_as_voidptrptr(&arg4), 0, 0); if (!SWIG_IsOK(res4)) { SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "prelude_option_invoke_destroy" "', argument " "4"" of type '" "void *""'"); } { Py_BEGIN_ALLOW_THREADS result = (int)prelude_option_invoke_destroy(arg1,(char const *)arg2,arg3,arg4); Py_END_ALLOW_THREADS } { if ( result < 0 ) { swig_python_raise_exception(result); resultobj = NULL; } else { resultobj = PyInt_FromLong(result); } } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_prelude_option_new_root(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; prelude_option_t **arg1 = (prelude_option_t **) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; int result; if (!PyArg_ParseTuple(args,(char *)"O:prelude_option_new_root",&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_p_prelude_option, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "prelude_option_new_root" "', argument " "1"" of type '" "prelude_option_t **""'"); } arg1 = (prelude_option_t **)(argp1); { Py_BEGIN_ALLOW_THREADS result = (int)prelude_option_new_root(arg1); Py_END_ALLOW_THREADS } { if ( result < 0 ) { swig_python_raise_exception(result); resultobj = NULL; } else { resultobj = PyInt_FromLong(result); } } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_prelude_option_new(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; prelude_option_t *arg1 = (prelude_option_t *) 0 ; prelude_option_t **arg2 = (prelude_option_t **) 0 ; void *argp1 = 0 ; int res1 = 0 ; void *argp2 = 0 ; int res2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; int result; if (!PyArg_ParseTuple(args,(char *)"OO:prelude_option_new",&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_prelude_option, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "prelude_option_new" "', argument " "1"" of type '" "prelude_option_t *""'"); } arg1 = (prelude_option_t *)(argp1); res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_p_prelude_option, 0 | 0 ); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "prelude_option_new" "', argument " "2"" of type '" "prelude_option_t **""'"); } arg2 = (prelude_option_t **)(argp2); { Py_BEGIN_ALLOW_THREADS result = (int)prelude_option_new(arg1,arg2); Py_END_ALLOW_THREADS } { if ( result < 0 ) { swig_python_raise_exception(result); resultobj = NULL; } else { resultobj = PyInt_FromLong(result); } } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_prelude_option_set_longopt(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; prelude_option_t *arg1 = (prelude_option_t *) 0 ; char *arg2 = (char *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:prelude_option_set_longopt",&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_prelude_option, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "prelude_option_set_longopt" "', argument " "1"" of type '" "prelude_option_t *""'"); } arg1 = (prelude_option_t *)(argp1); { if ( obj1 == Py_None ) arg2 = NULL; else if ( PyString_Check(obj1) ) arg2 = PyString_AsString(obj1); else { PyErr_Format(PyExc_TypeError, "expected None or string, %s found", obj1->ob_type->tp_name); return NULL; } } { Py_BEGIN_ALLOW_THREADS prelude_option_set_longopt(arg1,(char const *)arg2); Py_END_ALLOW_THREADS } resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_prelude_option_get_longopt(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; prelude_option_t *arg1 = (prelude_option_t *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; char *result = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:prelude_option_get_longopt",&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_prelude_option, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "prelude_option_get_longopt" "', argument " "1"" of type '" "prelude_option_t *""'"); } arg1 = (prelude_option_t *)(argp1); { Py_BEGIN_ALLOW_THREADS result = (char *)prelude_option_get_longopt(arg1); Py_END_ALLOW_THREADS } resultobj = SWIG_FromCharPtr((const char *)result); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_prelude_option_set_description(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; prelude_option_t *arg1 = (prelude_option_t *) 0 ; char *arg2 = (char *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:prelude_option_set_description",&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_prelude_option, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "prelude_option_set_description" "', argument " "1"" of type '" "prelude_option_t *""'"); } arg1 = (prelude_option_t *)(argp1); { if ( obj1 == Py_None ) arg2 = NULL; else if ( PyString_Check(obj1) ) arg2 = PyString_AsString(obj1); else { PyErr_Format(PyExc_TypeError, "expected None or string, %s found", obj1->ob_type->tp_name); return NULL; } } { Py_BEGIN_ALLOW_THREADS prelude_option_set_description(arg1,(char const *)arg2); Py_END_ALLOW_THREADS } resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_prelude_option_get_description(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; prelude_option_t *arg1 = (prelude_option_t *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; char *result = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:prelude_option_get_description",&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_prelude_option, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "prelude_option_get_description" "', argument " "1"" of type '" "prelude_option_t *""'"); } arg1 = (prelude_option_t *)(argp1); { Py_BEGIN_ALLOW_THREADS result = (char *)prelude_option_get_description(arg1); Py_END_ALLOW_THREADS } resultobj = SWIG_FromCharPtr((const char *)result); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_prelude_option_set_has_arg(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; prelude_option_t *arg1 = (prelude_option_t *) 0 ; prelude_option_argument_t arg2 ; void *argp1 = 0 ; int res1 = 0 ; int val2 ; int ecode2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:prelude_option_set_has_arg",&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_prelude_option, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "prelude_option_set_has_arg" "', argument " "1"" of type '" "prelude_option_t *""'"); } arg1 = (prelude_option_t *)(argp1); ecode2 = SWIG_AsVal_int(obj1, &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "prelude_option_set_has_arg" "', argument " "2"" of type '" "prelude_option_argument_t""'"); } arg2 = (prelude_option_argument_t)(val2); { Py_BEGIN_ALLOW_THREADS prelude_option_set_has_arg(arg1,arg2); Py_END_ALLOW_THREADS } resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_prelude_option_get_has_arg(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; prelude_option_t *arg1 = (prelude_option_t *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; prelude_option_argument_t result; if (!PyArg_ParseTuple(args,(char *)"O:prelude_option_get_has_arg",&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_prelude_option, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "prelude_option_get_has_arg" "', argument " "1"" of type '" "prelude_option_t *""'"); } arg1 = (prelude_option_t *)(argp1); { Py_BEGIN_ALLOW_THREADS result = (prelude_option_argument_t)prelude_option_get_has_arg(arg1); Py_END_ALLOW_THREADS } resultobj = SWIG_From_int((int)(result)); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_prelude_option_set_value(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; prelude_option_t *arg1 = (prelude_option_t *) 0 ; char *arg2 = (char *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:prelude_option_set_value",&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_prelude_option, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "prelude_option_set_value" "', argument " "1"" of type '" "prelude_option_t *""'"); } arg1 = (prelude_option_t *)(argp1); { if ( obj1 == Py_None ) arg2 = NULL; else if ( PyString_Check(obj1) ) arg2 = PyString_AsString(obj1); else { PyErr_Format(PyExc_TypeError, "expected None or string, %s found", obj1->ob_type->tp_name); return NULL; } } { Py_BEGIN_ALLOW_THREADS prelude_option_set_value(arg1,(char const *)arg2); Py_END_ALLOW_THREADS } resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_prelude_option_get_value(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; prelude_option_t *arg1 = (prelude_option_t *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; char *result = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:prelude_option_get_value",&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_prelude_option, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "prelude_option_get_value" "', argument " "1"" of type '" "prelude_option_t *""'"); } arg1 = (prelude_option_t *)(argp1); { Py_BEGIN_ALLOW_THREADS result = (char *)prelude_option_get_value(arg1); Py_END_ALLOW_THREADS } resultobj = SWIG_FromCharPtr((const char *)result); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_prelude_option_set_help(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; prelude_option_t *arg1 = (prelude_option_t *) 0 ; char *arg2 = (char *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:prelude_option_set_help",&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_prelude_option, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "prelude_option_set_help" "', argument " "1"" of type '" "prelude_option_t *""'"); } arg1 = (prelude_option_t *)(argp1); { if ( obj1 == Py_None ) arg2 = NULL; else if ( PyString_Check(obj1) ) arg2 = PyString_AsString(obj1); else { PyErr_Format(PyExc_TypeError, "expected None or string, %s found", obj1->ob_type->tp_name); return NULL; } } { Py_BEGIN_ALLOW_THREADS prelude_option_set_help(arg1,(char const *)arg2); Py_END_ALLOW_THREADS } resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_prelude_option_get_help(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; prelude_option_t *arg1 = (prelude_option_t *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; char *result = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:prelude_option_get_help",&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_prelude_option, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "prelude_option_get_help" "', argument " "1"" of type '" "prelude_option_t *""'"); } arg1 = (prelude_option_t *)(argp1); { Py_BEGIN_ALLOW_THREADS result = (char *)prelude_option_get_help(arg1); Py_END_ALLOW_THREADS } resultobj = SWIG_FromCharPtr((const char *)result); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_prelude_option_set_input_validation_regex(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; prelude_option_t *arg1 = (prelude_option_t *) 0 ; char *arg2 = (char *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:prelude_option_set_input_validation_regex",&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_prelude_option, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "prelude_option_set_input_validation_regex" "', argument " "1"" of type '" "prelude_option_t *""'"); } arg1 = (prelude_option_t *)(argp1); { if ( obj1 == Py_None ) arg2 = NULL; else if ( PyString_Check(obj1) ) arg2 = PyString_AsString(obj1); else { PyErr_Format(PyExc_TypeError, "expected None or string, %s found", obj1->ob_type->tp_name); return NULL; } } { Py_BEGIN_ALLOW_THREADS prelude_option_set_input_validation_regex(arg1,(char const *)arg2); Py_END_ALLOW_THREADS } resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_prelude_option_get_input_validation_regex(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; prelude_option_t *arg1 = (prelude_option_t *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; char *result = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:prelude_option_get_input_validation_regex",&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_prelude_option, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "prelude_option_get_input_validation_regex" "', argument " "1"" of type '" "prelude_option_t *""'"); } arg1 = (prelude_option_t *)(argp1); { Py_BEGIN_ALLOW_THREADS result = (char *)prelude_option_get_input_validation_regex(arg1); Py_END_ALLOW_THREADS } resultobj = SWIG_FromCharPtr((const char *)result); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_prelude_option_set_input_type(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; prelude_option_t *arg1 = (prelude_option_t *) 0 ; prelude_option_input_type_t arg2 ; void *argp1 = 0 ; int res1 = 0 ; int val2 ; int ecode2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:prelude_option_set_input_type",&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_prelude_option, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "prelude_option_set_input_type" "', argument " "1"" of type '" "prelude_option_t *""'"); } arg1 = (prelude_option_t *)(argp1); ecode2 = SWIG_AsVal_int(obj1, &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "prelude_option_set_input_type" "', argument " "2"" of type '" "prelude_option_input_type_t""'"); } arg2 = (prelude_option_input_type_t)(val2); { Py_BEGIN_ALLOW_THREADS prelude_option_set_input_type(arg1,arg2); Py_END_ALLOW_THREADS } resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_prelude_option_get_input_type(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; prelude_option_t *arg1 = (prelude_option_t *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; prelude_option_input_type_t result; if (!PyArg_ParseTuple(args,(char *)"O:prelude_option_get_input_type",&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_prelude_option, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "prelude_option_get_input_type" "', argument " "1"" of type '" "prelude_option_t *""'"); } arg1 = (prelude_option_t *)(argp1); { Py_BEGIN_ALLOW_THREADS result = (prelude_option_input_type_t)prelude_option_get_input_type(arg1); Py_END_ALLOW_THREADS } resultobj = SWIG_From_int((int)(result)); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_prelude_option_get_optlist(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; prelude_option_t *arg1 = (prelude_option_t *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; prelude_list_t *result = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:prelude_option_get_optlist",&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_prelude_option, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "prelude_option_get_optlist" "', argument " "1"" of type '" "prelude_option_t *""'"); } arg1 = (prelude_option_t *)(argp1); { Py_BEGIN_ALLOW_THREADS result = (prelude_list_t *)prelude_option_get_optlist(arg1); Py_END_ALLOW_THREADS } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_prelude_list_t, 0 | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_prelude_option_get_next(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; prelude_option_t *arg1 = (prelude_option_t *) 0 ; prelude_option_t *arg2 = (prelude_option_t *) 0 ; void *argp1 = 0 ; int res1 = 0 ; void *argp2 = 0 ; int res2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; prelude_option_t *result = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:prelude_option_get_next",&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_prelude_option, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "prelude_option_get_next" "', argument " "1"" of type '" "prelude_option_t *""'"); } arg1 = (prelude_option_t *)(argp1); res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_prelude_option, 0 | 0 ); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "prelude_option_get_next" "', argument " "2"" of type '" "prelude_option_t *""'"); } arg2 = (prelude_option_t *)(argp2); { Py_BEGIN_ALLOW_THREADS result = (prelude_option_t *)prelude_option_get_next(arg1,arg2); Py_END_ALLOW_THREADS } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_prelude_option, 0 | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_prelude_option_has_optlist(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; prelude_option_t *arg1 = (prelude_option_t *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; prelude_bool_t result; if (!PyArg_ParseTuple(args,(char *)"O:prelude_option_has_optlist",&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_prelude_option, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "prelude_option_has_optlist" "', argument " "1"" of type '" "prelude_option_t *""'"); } arg1 = (prelude_option_t *)(argp1); { Py_BEGIN_ALLOW_THREADS result = (prelude_bool_t)prelude_option_has_optlist(arg1); Py_END_ALLOW_THREADS } resultobj = SWIG_From_int((int)(result)); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_prelude_option_get_parent(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; prelude_option_t *arg1 = (prelude_option_t *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; prelude_option_t *result = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:prelude_option_get_parent",&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_prelude_option, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "prelude_option_get_parent" "', argument " "1"" of type '" "prelude_option_t *""'"); } arg1 = (prelude_option_t *)(argp1); { Py_BEGIN_ALLOW_THREADS result = (prelude_option_t *)prelude_option_get_parent(arg1); Py_END_ALLOW_THREADS } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_prelude_option, 0 | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_prelude_option_set_destroy_callback(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; prelude_option_t *arg1 = (prelude_option_t *) 0 ; prelude_option_destroy_callback_t arg2 = (prelude_option_destroy_callback_t) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:prelude_option_set_destroy_callback",&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_prelude_option, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "prelude_option_set_destroy_callback" "', argument " "1"" of type '" "prelude_option_t *""'"); } arg1 = (prelude_option_t *)(argp1); { int res = SWIG_ConvertFunctionPtr(obj1, (void**)(&arg2), SWIGTYPE_p_f_p_struct_prelude_option_p_prelude_string_t_p_void__int); if (!SWIG_IsOK(res)) { SWIG_exception_fail(SWIG_ArgError(res), "in method '" "prelude_option_set_destroy_callback" "', argument " "2"" of type '" "prelude_option_destroy_callback_t""'"); } } { Py_BEGIN_ALLOW_THREADS prelude_option_set_destroy_callback(arg1,arg2); Py_END_ALLOW_THREADS } resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_prelude_option_get_destroy_callback(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; prelude_option_t *arg1 = (prelude_option_t *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; prelude_option_destroy_callback_t result; if (!PyArg_ParseTuple(args,(char *)"O:prelude_option_get_destroy_callback",&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_prelude_option, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "prelude_option_get_destroy_callback" "', argument " "1"" of type '" "prelude_option_t *""'"); } arg1 = (prelude_option_t *)(argp1); { Py_BEGIN_ALLOW_THREADS result = (prelude_option_destroy_callback_t)prelude_option_get_destroy_callback(arg1); Py_END_ALLOW_THREADS } resultobj = SWIG_NewFunctionPtrObj((void *)(result), SWIGTYPE_p_f_p_struct_prelude_option_p_prelude_string_t_p_void__int); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_prelude_option_set_set_callback(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; prelude_option_t *arg1 = (prelude_option_t *) 0 ; prelude_option_set_callback_t arg2 = (prelude_option_set_callback_t) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:prelude_option_set_set_callback",&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_prelude_option, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "prelude_option_set_set_callback" "', argument " "1"" of type '" "prelude_option_t *""'"); } arg1 = (prelude_option_t *)(argp1); { int res = SWIG_ConvertFunctionPtr(obj1, (void**)(&arg2), SWIGTYPE_p_f_p_struct_prelude_option_p_q_const__char_p_prelude_string_t_p_void__int); if (!SWIG_IsOK(res)) { SWIG_exception_fail(SWIG_ArgError(res), "in method '" "prelude_option_set_set_callback" "', argument " "2"" of type '" "prelude_option_set_callback_t""'"); } } { Py_BEGIN_ALLOW_THREADS prelude_option_set_set_callback(arg1,arg2); Py_END_ALLOW_THREADS } resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_prelude_option_get_set_callback(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; prelude_option_t *arg1 = (prelude_option_t *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; prelude_option_set_callback_t result; if (!PyArg_ParseTuple(args,(char *)"O:prelude_option_get_set_callback",&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_prelude_option, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "prelude_option_get_set_callback" "', argument " "1"" of type '" "prelude_option_t *""'"); } arg1 = (prelude_option_t *)(argp1); { Py_BEGIN_ALLOW_THREADS result = (prelude_option_set_callback_t)prelude_option_get_set_callback(arg1); Py_END_ALLOW_THREADS } resultobj = SWIG_NewFunctionPtrObj((void *)(result), SWIGTYPE_p_f_p_struct_prelude_option_p_q_const__char_p_prelude_string_t_p_void__int); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_prelude_option_set_get_callback(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; prelude_option_t *arg1 = (prelude_option_t *) 0 ; int (*arg2)(prelude_option_t *,prelude_string_t *,void *) = (int (*)(prelude_option_t *,prelude_string_t *,void *)) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:prelude_option_set_get_callback",&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_prelude_option, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "prelude_option_set_get_callback" "', argument " "1"" of type '" "prelude_option_t *""'"); } arg1 = (prelude_option_t *)(argp1); { int res = SWIG_ConvertFunctionPtr(obj1, (void**)(&arg2), SWIGTYPE_p_f_p_struct_prelude_option_p_prelude_string_t_p_void__int); if (!SWIG_IsOK(res)) { SWIG_exception_fail(SWIG_ArgError(res), "in method '" "prelude_option_set_get_callback" "', argument " "2"" of type '" "int (*)(prelude_option_t *,prelude_string_t *,void *)""'"); } } { Py_BEGIN_ALLOW_THREADS prelude_option_set_get_callback(arg1,arg2); Py_END_ALLOW_THREADS } resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_prelude_option_get_get_callback(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; prelude_option_t *arg1 = (prelude_option_t *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; prelude_option_get_callback_t result; if (!PyArg_ParseTuple(args,(char *)"O:prelude_option_get_get_callback",&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_prelude_option, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "prelude_option_get_get_callback" "', argument " "1"" of type '" "prelude_option_t *""'"); } arg1 = (prelude_option_t *)(argp1); { Py_BEGIN_ALLOW_THREADS result = (prelude_option_get_callback_t)prelude_option_get_get_callback(arg1); Py_END_ALLOW_THREADS } resultobj = SWIG_NewFunctionPtrObj((void *)(result), SWIGTYPE_p_f_p_struct_prelude_option_p_prelude_string_t_p_void__int); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_prelude_option_set_commit_callback(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; prelude_option_t *arg1 = (prelude_option_t *) 0 ; prelude_option_commit_callback_t arg2 = (prelude_option_commit_callback_t) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:prelude_option_set_commit_callback",&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_prelude_option, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "prelude_option_set_commit_callback" "', argument " "1"" of type '" "prelude_option_t *""'"); } arg1 = (prelude_option_t *)(argp1); { int res = SWIG_ConvertFunctionPtr(obj1, (void**)(&arg2), SWIGTYPE_p_f_p_struct_prelude_option_p_prelude_string_t_p_void__int); if (!SWIG_IsOK(res)) { SWIG_exception_fail(SWIG_ArgError(res), "in method '" "prelude_option_set_commit_callback" "', argument " "2"" of type '" "prelude_option_commit_callback_t""'"); } } { Py_BEGIN_ALLOW_THREADS prelude_option_set_commit_callback(arg1,arg2); Py_END_ALLOW_THREADS } resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_prelude_option_get_commit_callback(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; prelude_option_t *arg1 = (prelude_option_t *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; prelude_option_commit_callback_t result; if (!PyArg_ParseTuple(args,(char *)"O:prelude_option_get_commit_callback",&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_prelude_option, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "prelude_option_get_commit_callback" "', argument " "1"" of type '" "prelude_option_t *""'"); } arg1 = (prelude_option_t *)(argp1); { Py_BEGIN_ALLOW_THREADS result = (prelude_option_commit_callback_t)prelude_option_get_commit_callback(arg1); Py_END_ALLOW_THREADS } resultobj = SWIG_NewFunctionPtrObj((void *)(result), SWIGTYPE_p_f_p_struct_prelude_option_p_prelude_string_t_p_void__int); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_prelude_option_set_default_context(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; prelude_option_t *arg1 = (prelude_option_t *) 0 ; void *arg2 = (void *) 0 ; void *argp1 = 0 ; int res1 = 0 ; int res2 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:prelude_option_set_default_context",&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_prelude_option, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "prelude_option_set_default_context" "', argument " "1"" of type '" "prelude_option_t *""'"); } arg1 = (prelude_option_t *)(argp1); res2 = SWIG_ConvertPtr(obj1,SWIG_as_voidptrptr(&arg2), 0, 0); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "prelude_option_set_default_context" "', argument " "2"" of type '" "void *""'"); } { Py_BEGIN_ALLOW_THREADS prelude_option_set_default_context(arg1,arg2); Py_END_ALLOW_THREADS } resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_prelude_option_new_context(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; prelude_option_t *arg1 = (prelude_option_t *) 0 ; prelude_option_context_t **arg2 = (prelude_option_context_t **) 0 ; char *arg3 = (char *) 0 ; void *arg4 = (void *) 0 ; void *argp1 = 0 ; int res1 = 0 ; void *argp2 = 0 ; int res2 = 0 ; int res4 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; PyObject * obj2 = 0 ; PyObject * obj3 = 0 ; int result; if (!PyArg_ParseTuple(args,(char *)"OOOO:prelude_option_new_context",&obj0,&obj1,&obj2,&obj3)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_prelude_option, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "prelude_option_new_context" "', argument " "1"" of type '" "prelude_option_t *""'"); } arg1 = (prelude_option_t *)(argp1); res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_p_prelude_option_context, 0 | 0 ); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "prelude_option_new_context" "', argument " "2"" of type '" "prelude_option_context_t **""'"); } arg2 = (prelude_option_context_t **)(argp2); { if ( obj2 == Py_None ) arg3 = NULL; else if ( PyString_Check(obj2) ) arg3 = PyString_AsString(obj2); else { PyErr_Format(PyExc_TypeError, "expected None or string, %s found", obj2->ob_type->tp_name); return NULL; } } res4 = SWIG_ConvertPtr(obj3,SWIG_as_voidptrptr(&arg4), 0, 0); if (!SWIG_IsOK(res4)) { SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "prelude_option_new_context" "', argument " "4"" of type '" "void *""'"); } { Py_BEGIN_ALLOW_THREADS result = (int)prelude_option_new_context(arg1,arg2,(char const *)arg3,arg4); Py_END_ALLOW_THREADS } { if ( result < 0 ) { swig_python_raise_exception(result); resultobj = NULL; } else { resultobj = PyInt_FromLong(result); } } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_prelude_option_context_destroy(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; prelude_option_context_t *arg1 = (prelude_option_context_t *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:prelude_option_context_destroy",&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_prelude_option_context, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "prelude_option_context_destroy" "', argument " "1"" of type '" "prelude_option_context_t *""'"); } arg1 = (prelude_option_context_t *)(argp1); { Py_BEGIN_ALLOW_THREADS prelude_option_context_destroy(arg1); Py_END_ALLOW_THREADS } resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_prelude_option_context_get_data(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; prelude_option_context_t *arg1 = (prelude_option_context_t *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; void *result = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:prelude_option_context_get_data",&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_prelude_option_context, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "prelude_option_context_get_data" "', argument " "1"" of type '" "prelude_option_context_t *""'"); } arg1 = (prelude_option_context_t *)(argp1); { Py_BEGIN_ALLOW_THREADS result = (void *)prelude_option_context_get_data(arg1); Py_END_ALLOW_THREADS } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_void, 0 | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_prelude_option_context_set_data(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; prelude_option_context_t *arg1 = (prelude_option_context_t *) 0 ; void *arg2 = (void *) 0 ; void *argp1 = 0 ; int res1 = 0 ; int res2 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:prelude_option_context_set_data",&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_prelude_option_context, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "prelude_option_context_set_data" "', argument " "1"" of type '" "prelude_option_context_t *""'"); } arg1 = (prelude_option_context_t *)(argp1); res2 = SWIG_ConvertPtr(obj1,SWIG_as_voidptrptr(&arg2), 0, 0); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "prelude_option_context_set_data" "', argument " "2"" of type '" "void *""'"); } { Py_BEGIN_ALLOW_THREADS prelude_option_context_set_data(arg1,arg2); Py_END_ALLOW_THREADS } resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_prelude_option_search(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; prelude_option_t *arg1 = (prelude_option_t *) 0 ; char *arg2 = (char *) 0 ; prelude_option_type_t arg3 ; prelude_bool_t arg4 ; void *argp1 = 0 ; int res1 = 0 ; int val3 ; int ecode3 = 0 ; int val4 ; int ecode4 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; PyObject * obj2 = 0 ; PyObject * obj3 = 0 ; prelude_option_t *result = 0 ; if (!PyArg_ParseTuple(args,(char *)"OOOO:prelude_option_search",&obj0,&obj1,&obj2,&obj3)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_prelude_option, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "prelude_option_search" "', argument " "1"" of type '" "prelude_option_t *""'"); } arg1 = (prelude_option_t *)(argp1); { if ( obj1 == Py_None ) arg2 = NULL; else if ( PyString_Check(obj1) ) arg2 = PyString_AsString(obj1); else { PyErr_Format(PyExc_TypeError, "expected None or string, %s found", obj1->ob_type->tp_name); return NULL; } } ecode3 = SWIG_AsVal_int(obj2, &val3); if (!SWIG_IsOK(ecode3)) { SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "prelude_option_search" "', argument " "3"" of type '" "prelude_option_type_t""'"); } arg3 = (prelude_option_type_t)(val3); ecode4 = SWIG_AsVal_int(obj3, &val4); if (!SWIG_IsOK(ecode4)) { SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "prelude_option_search" "', argument " "4"" of type '" "prelude_bool_t""'"); } arg4 = (prelude_bool_t)(val4); { Py_BEGIN_ALLOW_THREADS result = (prelude_option_t *)prelude_option_search(arg1,(char const *)arg2,arg3,arg4); Py_END_ALLOW_THREADS } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_prelude_option, 0 | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_prelude_option_search_context(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; prelude_option_t *arg1 = (prelude_option_t *) 0 ; char *arg2 = (char *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; prelude_option_context_t *result = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:prelude_option_search_context",&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_prelude_option, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "prelude_option_search_context" "', argument " "1"" of type '" "prelude_option_t *""'"); } arg1 = (prelude_option_t *)(argp1); { if ( obj1 == Py_None ) arg2 = NULL; else if ( PyString_Check(obj1) ) arg2 = PyString_AsString(obj1); else { PyErr_Format(PyExc_TypeError, "expected None or string, %s found", obj1->ob_type->tp_name); return NULL; } } { Py_BEGIN_ALLOW_THREADS result = (prelude_option_context_t *)prelude_option_search_context(arg1,(char const *)arg2); Py_END_ALLOW_THREADS } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_prelude_option_context, 0 | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_prelude_option_push_request(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; prelude_msgbuf_t *arg1 = (prelude_msgbuf_t *) 0 ; int arg2 ; char *arg3 = (char *) 0 ; int val2 ; int ecode2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; PyObject * obj2 = 0 ; int result; if (!PyArg_ParseTuple(args,(char *)"OOO:prelude_option_push_request",&obj0,&obj1,&obj2)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_prelude_msgbuf, SWIG_POINTER_EXCEPTION|0) ) return NULL; } ecode2 = SWIG_AsVal_int(obj1, &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "prelude_option_push_request" "', argument " "2"" of type '" "int""'"); } arg2 = (int)(val2); { if ( obj2 == Py_None ) arg3 = NULL; else if ( PyString_Check(obj2) ) arg3 = PyString_AsString(obj2); else { PyErr_Format(PyExc_TypeError, "expected None or string, %s found", obj2->ob_type->tp_name); return NULL; } } { Py_BEGIN_ALLOW_THREADS result = (int)prelude_option_push_request(arg1,arg2,(char const *)arg3); Py_END_ALLOW_THREADS } { if ( result < 0 ) { swig_python_raise_exception(result); resultobj = NULL; } else { resultobj = PyInt_FromLong(result); } } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_prelude_option_new_request(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; prelude_msgbuf_t *arg1 = (prelude_msgbuf_t *) 0 ; uint32_t arg2 ; uint64_t *arg3 = (uint64_t *) 0 ; size_t arg4 ; unsigned int val2 ; int ecode2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; PyObject * obj2 = 0 ; int result; if (!PyArg_ParseTuple(args,(char *)"OOO:prelude_option_new_request",&obj0,&obj1,&obj2)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_prelude_msgbuf, SWIG_POINTER_EXCEPTION|0) ) return NULL; } ecode2 = SWIG_AsVal_unsigned_SS_int(obj1, &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "prelude_option_new_request" "', argument " "2"" of type '" "uint32_t""'"); } arg2 = (uint32_t)(val2); { int i; arg4 = PyList_Size(obj2); arg3 = malloc(arg4 * sizeof(uint64_t)); for ( i = 0; i < arg4; i++ ) { PyObject *o = PyList_GetItem(obj2, i); if ( PyInt_Check(o) ) arg3[i] = (unsigned long) PyInt_AsLong(o); else arg3[i] = PyLong_AsUnsignedLongLong(o); } } { Py_BEGIN_ALLOW_THREADS result = (int)prelude_option_new_request(arg1,arg2,arg3,arg4); Py_END_ALLOW_THREADS } { if ( result < 0 ) { swig_python_raise_exception(result); resultobj = NULL; } else { resultobj = PyInt_FromLong(result); } } { free(arg3); } return resultobj; fail: { free(arg3); } return NULL; } SWIGINTERN PyObject *_wrap_prelude_option_process_request(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; prelude_client_t *arg1 = (prelude_client_t *) 0 ; prelude_msg_t *arg2 = (prelude_msg_t *) 0 ; prelude_msgbuf_t *arg3 = (prelude_msgbuf_t *) 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; PyObject * obj2 = 0 ; int result; if (!PyArg_ParseTuple(args,(char *)"OOO:prelude_option_process_request",&obj0,&obj1,&obj2)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_prelude_client, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { if ( obj1 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj1, (void **)&arg2, SWIGTYPE_p_prelude_msg, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { if ( obj2 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj2, (void **)&arg3, SWIGTYPE_p_prelude_msgbuf, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { Py_BEGIN_ALLOW_THREADS result = (int)prelude_option_process_request(arg1,arg2,arg3); Py_END_ALLOW_THREADS } { if ( result < 0 ) { swig_python_raise_exception(result); resultobj = NULL; } else { resultobj = PyInt_FromLong(result); } } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_prelude_option_recv_reply(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; prelude_msg_t *arg1 = (prelude_msg_t *) 0 ; uint64_t *arg2 = (uint64_t *) 0 ; uint32_t *arg3 = (uint32_t *) 0 ; void **arg4 = (void **) 0 ; uint64_t tmp_source_id2 ; uint32_t tmp_request_id2 ; void *tmp_value2 ; PyObject * obj0 = 0 ; int result; { tmp_source_id2 = 0; tmp_request_id2 = 0; arg2 = &tmp_source_id2; arg3 = &tmp_request_id2; arg4 = &tmp_value2; } if (!PyArg_ParseTuple(args,(char *)"O:prelude_option_recv_reply",&obj0)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_prelude_msg, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { Py_BEGIN_ALLOW_THREADS result = (int)prelude_option_recv_reply(arg1,arg2,arg3,arg4); Py_END_ALLOW_THREADS } { if ( result < 0 ) { swig_python_raise_exception(result); resultobj = NULL; } else { resultobj = PyInt_FromLong(result); } } { int ret = PyInt_AsLong(resultobj); PyObject *tuple = PyTuple_New(4); PyObject *value_obj = Py_None; PyTuple_SetItem(tuple, 0, PyLong_FromUnsignedLongLong(*arg2)); PyTuple_SetItem(tuple, 1, PyLong_FromUnsignedLong(*arg3)); PyTuple_SetItem(tuple, 2, PyInt_FromLong(ret)); if ( *arg4 ) { switch ( ret ) { case PRELUDE_OPTION_REPLY_TYPE_LIST: value_obj = SWIG_NewPointerObj((void *) * arg4, SWIG_TypeQuery("prelude_option_t *"), 0); break; default: value_obj = PyString_FromString(* arg4); break; } } else { value_obj = Py_None; Py_INCREF(Py_None); } PyTuple_SetItem(tuple, 3, value_obj); resultobj = tuple; } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_prelude_msg_read(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; prelude_msg_t **arg1 = (prelude_msg_t **) 0 ; prelude_io_t *arg2 = (prelude_io_t *) 0 ; prelude_msg_t *tmp1 ; void *argp2 = 0 ; int res2 = 0 ; PyObject * obj0 = 0 ; int result; { arg1 = (prelude_msg_t **) &tmp1; } if (!PyArg_ParseTuple(args,(char *)"O:prelude_msg_read",&obj0)) SWIG_fail; res2 = SWIG_ConvertPtr(obj0, &argp2,SWIGTYPE_p_prelude_io_t, 0 | 0 ); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "prelude_msg_read" "', argument " "2"" of type '" "prelude_io_t *""'"); } arg2 = (prelude_io_t *)(argp2); { Py_BEGIN_ALLOW_THREADS result = (int)prelude_msg_read(arg1,arg2); Py_END_ALLOW_THREADS } { if ( result < 0 ) { swig_python_raise_exception(result); resultobj = NULL; } else { resultobj = PyInt_FromLong(result); } } { if ( result >= 0 ) resultobj = SWIG_NewPointerObj((void *) * arg1, SWIGTYPE_p_prelude_msg, 0); } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_prelude_msg_forward(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; prelude_msg_t *arg1 = (prelude_msg_t *) 0 ; prelude_io_t *arg2 = (prelude_io_t *) 0 ; prelude_io_t *arg3 = (prelude_io_t *) 0 ; void *argp2 = 0 ; int res2 = 0 ; void *argp3 = 0 ; int res3 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; PyObject * obj2 = 0 ; int result; if (!PyArg_ParseTuple(args,(char *)"OOO:prelude_msg_forward",&obj0,&obj1,&obj2)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_prelude_msg, SWIG_POINTER_EXCEPTION|0) ) return NULL; } res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_prelude_io_t, 0 | 0 ); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "prelude_msg_forward" "', argument " "2"" of type '" "prelude_io_t *""'"); } arg2 = (prelude_io_t *)(argp2); res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_prelude_io_t, 0 | 0 ); if (!SWIG_IsOK(res3)) { SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "prelude_msg_forward" "', argument " "3"" of type '" "prelude_io_t *""'"); } arg3 = (prelude_io_t *)(argp3); { Py_BEGIN_ALLOW_THREADS result = (int)prelude_msg_forward(arg1,arg2,arg3); Py_END_ALLOW_THREADS } { if ( result < 0 ) { swig_python_raise_exception(result); resultobj = NULL; } else { resultobj = PyInt_FromLong(result); } } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_prelude_msg_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; prelude_msg_t *arg1 = (prelude_msg_t *) 0 ; uint8_t *arg2 = (uint8_t *) 0 ; uint32_t *arg3 = (uint32_t *) 0 ; void **arg4 = (void **) 0 ; void *argp2 = 0 ; int res2 = 0 ; void *argp3 = 0 ; int res3 = 0 ; void *argp4 = 0 ; int res4 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; PyObject * obj2 = 0 ; PyObject * obj3 = 0 ; int result; if (!PyArg_ParseTuple(args,(char *)"OOOO:prelude_msg_get",&obj0,&obj1,&obj2,&obj3)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_prelude_msg, SWIG_POINTER_EXCEPTION|0) ) return NULL; } res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_unsigned_char, 0 | 0 ); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "prelude_msg_get" "', argument " "2"" of type '" "uint8_t *""'"); } arg2 = (uint8_t *)(argp2); res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_unsigned_int, 0 | 0 ); if (!SWIG_IsOK(res3)) { SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "prelude_msg_get" "', argument " "3"" of type '" "uint32_t *""'"); } arg3 = (uint32_t *)(argp3); res4 = SWIG_ConvertPtr(obj3, &argp4,SWIGTYPE_p_p_void, 0 | 0 ); if (!SWIG_IsOK(res4)) { SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "prelude_msg_get" "', argument " "4"" of type '" "void **""'"); } arg4 = (void **)(argp4); { Py_BEGIN_ALLOW_THREADS result = (int)prelude_msg_get(arg1,arg2,arg3,arg4); Py_END_ALLOW_THREADS } { if ( result < 0 ) { swig_python_raise_exception(result); resultobj = NULL; } else { resultobj = PyInt_FromLong(result); } } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_prelude_msg_recycle(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; prelude_msg_t *arg1 = (prelude_msg_t *) 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:prelude_msg_recycle",&obj0)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_prelude_msg, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { Py_BEGIN_ALLOW_THREADS prelude_msg_recycle(arg1); Py_END_ALLOW_THREADS } resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_prelude_msg_mark_end(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; prelude_msg_t *arg1 = (prelude_msg_t *) 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:prelude_msg_mark_end",&obj0)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_prelude_msg, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { Py_BEGIN_ALLOW_THREADS prelude_msg_mark_end(arg1); Py_END_ALLOW_THREADS } resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_prelude_msg_dynamic_new(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; prelude_msg_t **arg1 = (prelude_msg_t **) 0 ; int (*arg2)(prelude_msg_t **,void *) = (int (*)(prelude_msg_t **,void *)) 0 ; void *arg3 = (void *) 0 ; prelude_msg_t *tmp1 ; int res3 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; int result; { arg1 = (prelude_msg_t **) &tmp1; } if (!PyArg_ParseTuple(args,(char *)"OO:prelude_msg_dynamic_new",&obj0,&obj1)) SWIG_fail; { int res = SWIG_ConvertFunctionPtr(obj0, (void**)(&arg2), SWIGTYPE_p_f_p_p_struct_prelude_msg_p_void__int); if (!SWIG_IsOK(res)) { SWIG_exception_fail(SWIG_ArgError(res), "in method '" "prelude_msg_dynamic_new" "', argument " "2"" of type '" "int (*)(prelude_msg_t **,void *)""'"); } } res3 = SWIG_ConvertPtr(obj1,SWIG_as_voidptrptr(&arg3), 0, 0); if (!SWIG_IsOK(res3)) { SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "prelude_msg_dynamic_new" "', argument " "3"" of type '" "void *""'"); } { Py_BEGIN_ALLOW_THREADS result = (int)prelude_msg_dynamic_new(arg1,arg2,arg3); Py_END_ALLOW_THREADS } { if ( result < 0 ) { swig_python_raise_exception(result); resultobj = NULL; } else { resultobj = PyInt_FromLong(result); } } { if ( result >= 0 ) resultobj = SWIG_NewPointerObj((void *) * arg1, SWIGTYPE_p_prelude_msg, 0); } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_prelude_msg_new(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; prelude_msg_t **arg1 = (prelude_msg_t **) 0 ; size_t arg2 ; size_t arg3 ; uint8_t arg4 ; prelude_msg_priority_t arg5 ; prelude_msg_t *tmp1 ; size_t val2 ; int ecode2 = 0 ; size_t val3 ; int ecode3 = 0 ; unsigned char val4 ; int ecode4 = 0 ; int val5 ; int ecode5 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; PyObject * obj2 = 0 ; PyObject * obj3 = 0 ; int result; { arg1 = (prelude_msg_t **) &tmp1; } if (!PyArg_ParseTuple(args,(char *)"OOOO:prelude_msg_new",&obj0,&obj1,&obj2,&obj3)) SWIG_fail; ecode2 = SWIG_AsVal_size_t(obj0, &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "prelude_msg_new" "', argument " "2"" of type '" "size_t""'"); } arg2 = (size_t)(val2); ecode3 = SWIG_AsVal_size_t(obj1, &val3); if (!SWIG_IsOK(ecode3)) { SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "prelude_msg_new" "', argument " "3"" of type '" "size_t""'"); } arg3 = (size_t)(val3); ecode4 = SWIG_AsVal_unsigned_SS_char(obj2, &val4); if (!SWIG_IsOK(ecode4)) { SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "prelude_msg_new" "', argument " "4"" of type '" "uint8_t""'"); } arg4 = (uint8_t)(val4); ecode5 = SWIG_AsVal_int(obj3, &val5); if (!SWIG_IsOK(ecode5)) { SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "prelude_msg_new" "', argument " "5"" of type '" "prelude_msg_priority_t""'"); } arg5 = (prelude_msg_priority_t)(val5); { Py_BEGIN_ALLOW_THREADS result = (int)prelude_msg_new(arg1,arg2,arg3,arg4,arg5); Py_END_ALLOW_THREADS } { if ( result < 0 ) { swig_python_raise_exception(result); resultobj = NULL; } else { resultobj = PyInt_FromLong(result); } } { if ( result >= 0 ) resultobj = SWIG_NewPointerObj((void *) * arg1, SWIGTYPE_p_prelude_msg, 0); } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_prelude_msg_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; prelude_msg_t *arg1 = (prelude_msg_t *) 0 ; uint8_t arg2 ; uint32_t arg3 ; void *arg4 = (void *) 0 ; unsigned char val2 ; int ecode2 = 0 ; unsigned int val3 ; int ecode3 = 0 ; int res4 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; PyObject * obj2 = 0 ; PyObject * obj3 = 0 ; int result; if (!PyArg_ParseTuple(args,(char *)"OOOO:prelude_msg_set",&obj0,&obj1,&obj2,&obj3)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_prelude_msg, SWIG_POINTER_EXCEPTION|0) ) return NULL; } ecode2 = SWIG_AsVal_unsigned_SS_char(obj1, &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "prelude_msg_set" "', argument " "2"" of type '" "uint8_t""'"); } arg2 = (uint8_t)(val2); ecode3 = SWIG_AsVal_unsigned_SS_int(obj2, &val3); if (!SWIG_IsOK(ecode3)) { SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "prelude_msg_set" "', argument " "3"" of type '" "uint32_t""'"); } arg3 = (uint32_t)(val3); res4 = SWIG_ConvertPtr(obj3,SWIG_as_voidptrptr(&arg4), 0, 0); if (!SWIG_IsOK(res4)) { SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "prelude_msg_set" "', argument " "4"" of type '" "void const *""'"); } { Py_BEGIN_ALLOW_THREADS result = (int)prelude_msg_set(arg1,arg2,arg3,(void const *)arg4); Py_END_ALLOW_THREADS } { if ( result < 0 ) { swig_python_raise_exception(result); resultobj = NULL; } else { resultobj = PyInt_FromLong(result); } } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_prelude_msg_write(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; prelude_msg_t *arg1 = (prelude_msg_t *) 0 ; prelude_io_t *arg2 = (prelude_io_t *) 0 ; void *argp2 = 0 ; int res2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; int result; if (!PyArg_ParseTuple(args,(char *)"OO:prelude_msg_write",&obj0,&obj1)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_prelude_msg, SWIG_POINTER_EXCEPTION|0) ) return NULL; } res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_prelude_io_t, 0 | 0 ); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "prelude_msg_write" "', argument " "2"" of type '" "prelude_io_t *""'"); } arg2 = (prelude_io_t *)(argp2); { Py_BEGIN_ALLOW_THREADS result = (int)prelude_msg_write(arg1,arg2); Py_END_ALLOW_THREADS } { if ( result < 0 ) { swig_python_raise_exception(result); resultobj = NULL; } else { resultobj = PyInt_FromLong(result); } } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_prelude_msg_set_tag(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; prelude_msg_t *arg1 = (prelude_msg_t *) 0 ; uint8_t arg2 ; unsigned char val2 ; int ecode2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:prelude_msg_set_tag",&obj0,&obj1)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_prelude_msg, SWIG_POINTER_EXCEPTION|0) ) return NULL; } ecode2 = SWIG_AsVal_unsigned_SS_char(obj1, &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "prelude_msg_set_tag" "', argument " "2"" of type '" "uint8_t""'"); } arg2 = (uint8_t)(val2); { Py_BEGIN_ALLOW_THREADS prelude_msg_set_tag(arg1,arg2); Py_END_ALLOW_THREADS } resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_prelude_msg_set_priority(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; prelude_msg_t *arg1 = (prelude_msg_t *) 0 ; prelude_msg_priority_t arg2 ; int val2 ; int ecode2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:prelude_msg_set_priority",&obj0,&obj1)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_prelude_msg, SWIG_POINTER_EXCEPTION|0) ) return NULL; } ecode2 = SWIG_AsVal_int(obj1, &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "prelude_msg_set_priority" "', argument " "2"" of type '" "prelude_msg_priority_t""'"); } arg2 = (prelude_msg_priority_t)(val2); { Py_BEGIN_ALLOW_THREADS prelude_msg_set_priority(arg1,arg2); Py_END_ALLOW_THREADS } resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_prelude_msg_get_tag(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; prelude_msg_t *arg1 = (prelude_msg_t *) 0 ; PyObject * obj0 = 0 ; uint8_t result; if (!PyArg_ParseTuple(args,(char *)"O:prelude_msg_get_tag",&obj0)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_prelude_msg, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { Py_BEGIN_ALLOW_THREADS result = (uint8_t)prelude_msg_get_tag(arg1); Py_END_ALLOW_THREADS } resultobj = SWIG_From_unsigned_SS_char((unsigned char)(result)); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_prelude_msg_get_priority(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; prelude_msg_t *arg1 = (prelude_msg_t *) 0 ; PyObject * obj0 = 0 ; prelude_msg_priority_t result; if (!PyArg_ParseTuple(args,(char *)"O:prelude_msg_get_priority",&obj0)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_prelude_msg, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { Py_BEGIN_ALLOW_THREADS result = (prelude_msg_priority_t)prelude_msg_get_priority(arg1); Py_END_ALLOW_THREADS } resultobj = SWIG_From_int((int)(result)); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_prelude_msg_get_len(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; prelude_msg_t *arg1 = (prelude_msg_t *) 0 ; PyObject * obj0 = 0 ; uint32_t result; if (!PyArg_ParseTuple(args,(char *)"O:prelude_msg_get_len",&obj0)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_prelude_msg, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { Py_BEGIN_ALLOW_THREADS result = (uint32_t)prelude_msg_get_len(arg1); Py_END_ALLOW_THREADS } { resultobj = PyLong_FromUnsignedLong(result); } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_prelude_msg_get_datalen(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; prelude_msg_t *arg1 = (prelude_msg_t *) 0 ; PyObject * obj0 = 0 ; uint32_t result; if (!PyArg_ParseTuple(args,(char *)"O:prelude_msg_get_datalen",&obj0)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_prelude_msg, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { Py_BEGIN_ALLOW_THREADS result = (uint32_t)prelude_msg_get_datalen(arg1); Py_END_ALLOW_THREADS } { resultobj = PyLong_FromUnsignedLong(result); } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_prelude_msg_get_message_data(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; prelude_msg_t *arg1 = (prelude_msg_t *) 0 ; PyObject * obj0 = 0 ; unsigned char *result = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:prelude_msg_get_message_data",&obj0)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_prelude_msg, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { Py_BEGIN_ALLOW_THREADS result = (unsigned char *)prelude_msg_get_message_data(arg1); Py_END_ALLOW_THREADS } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_unsigned_char, 0 | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_prelude_msg_get_time(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; prelude_msg_t *arg1 = (prelude_msg_t *) 0 ; struct timeval *arg2 = (struct timeval *) 0 ; void *argp2 = 0 ; int res2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; struct timeval *result = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:prelude_msg_get_time",&obj0,&obj1)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_prelude_msg, SWIG_POINTER_EXCEPTION|0) ) return NULL; } res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_timeval, 0 | 0 ); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "prelude_msg_get_time" "', argument " "2"" of type '" "struct timeval *""'"); } arg2 = (struct timeval *)(argp2); { Py_BEGIN_ALLOW_THREADS result = (struct timeval *)prelude_msg_get_time(arg1,arg2); Py_END_ALLOW_THREADS } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_timeval, 0 | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_prelude_msg_is_empty(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; prelude_msg_t *arg1 = (prelude_msg_t *) 0 ; PyObject * obj0 = 0 ; int result; if (!PyArg_ParseTuple(args,(char *)"O:prelude_msg_is_empty",&obj0)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_prelude_msg, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { Py_BEGIN_ALLOW_THREADS result = (int)prelude_msg_is_empty(arg1); Py_END_ALLOW_THREADS } { if ( result < 0 ) { swig_python_raise_exception(result); resultobj = NULL; } else { resultobj = PyInt_FromLong(result); } } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_prelude_msg_is_fragment(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; prelude_msg_t *arg1 = (prelude_msg_t *) 0 ; PyObject * obj0 = 0 ; int result; if (!PyArg_ParseTuple(args,(char *)"O:prelude_msg_is_fragment",&obj0)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_prelude_msg, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { Py_BEGIN_ALLOW_THREADS result = (int)prelude_msg_is_fragment(arg1); Py_END_ALLOW_THREADS } { if ( result < 0 ) { swig_python_raise_exception(result); resultobj = NULL; } else { resultobj = PyInt_FromLong(result); } } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_prelude_msg_destroy(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; prelude_msg_t *arg1 = (prelude_msg_t *) 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:prelude_msg_destroy",&obj0)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_prelude_msg, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { Py_BEGIN_ALLOW_THREADS prelude_msg_destroy(arg1); Py_END_ALLOW_THREADS } resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_prelude_msg_set_callback(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; prelude_msg_t *arg1 = (prelude_msg_t *) 0 ; int (*arg2)(prelude_msg_t **,void *) = (int (*)(prelude_msg_t **,void *)) 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:prelude_msg_set_callback",&obj0,&obj1)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_prelude_msg, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { int res = SWIG_ConvertFunctionPtr(obj1, (void**)(&arg2), SWIGTYPE_p_f_p_p_struct_prelude_msg_p_void__int); if (!SWIG_IsOK(res)) { SWIG_exception_fail(SWIG_ArgError(res), "in method '" "prelude_msg_set_callback" "', argument " "2"" of type '" "int (*)(prelude_msg_t **,void *)""'"); } } { Py_BEGIN_ALLOW_THREADS prelude_msg_set_callback(arg1,arg2); Py_END_ALLOW_THREADS } resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_prelude_msg_set_data(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; prelude_msg_t *arg1 = (prelude_msg_t *) 0 ; void *arg2 = (void *) 0 ; int res2 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:prelude_msg_set_data",&obj0,&obj1)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_prelude_msg, SWIG_POINTER_EXCEPTION|0) ) return NULL; } res2 = SWIG_ConvertPtr(obj1,SWIG_as_voidptrptr(&arg2), 0, 0); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "prelude_msg_set_data" "', argument " "2"" of type '" "void *""'"); } { Py_BEGIN_ALLOW_THREADS prelude_msg_set_data(arg1,arg2); Py_END_ALLOW_THREADS } resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_prelude_msg_ref(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; prelude_msg_t *arg1 = (prelude_msg_t *) 0 ; PyObject * obj0 = 0 ; prelude_msg_t *result = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:prelude_msg_ref",&obj0)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_prelude_msg, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { Py_BEGIN_ALLOW_THREADS result = (prelude_msg_t *)prelude_msg_ref(arg1); Py_END_ALLOW_THREADS } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_prelude_msg, 0 | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap__prelude_log__varargs__(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *varargs) { PyObject *resultobj = 0; prelude_log_t arg1 ; char *arg2 = (char *) 0 ; char *arg3 = (char *) 0 ; int arg4 ; char *arg5 = (char *) 0 ; void *arg6 = 0 ; int val1 ; int ecode1 = 0 ; int val4 ; int ecode4 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; PyObject * obj2 = 0 ; PyObject * obj3 = 0 ; PyObject * obj4 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OOOOO:_prelude_log",&obj0,&obj1,&obj2,&obj3,&obj4)) SWIG_fail; ecode1 = SWIG_AsVal_int(obj0, &val1); if (!SWIG_IsOK(ecode1)) { SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "_prelude_log" "', argument " "1"" of type '" "prelude_log_t""'"); } arg1 = (prelude_log_t)(val1); { if ( obj1 == Py_None ) arg2 = NULL; else if ( PyString_Check(obj1) ) arg2 = PyString_AsString(obj1); else { PyErr_Format(PyExc_TypeError, "expected None or string, %s found", obj1->ob_type->tp_name); return NULL; } } { if ( obj2 == Py_None ) arg3 = NULL; else if ( PyString_Check(obj2) ) arg3 = PyString_AsString(obj2); else { PyErr_Format(PyExc_TypeError, "expected None or string, %s found", obj2->ob_type->tp_name); return NULL; } } ecode4 = SWIG_AsVal_int(obj3, &val4); if (!SWIG_IsOK(ecode4)) { SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "_prelude_log" "', argument " "4"" of type '" "int""'"); } arg4 = (int)(val4); { if ( obj4 == Py_None ) arg5 = NULL; else if ( PyString_Check(obj4) ) arg5 = PyString_AsString(obj4); else { PyErr_Format(PyExc_TypeError, "expected None or string, %s found", obj4->ob_type->tp_name); return NULL; } } { Py_BEGIN_ALLOW_THREADS _prelude_log(arg1,(char const *)arg2,(char const *)arg3,arg4,(char const *)arg5,arg6); Py_END_ALLOW_THREADS } resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap__prelude_log(PyObject *self, PyObject *args) { PyObject *resultobj; PyObject *varargs; PyObject *newargs; newargs = PyTuple_GetSlice(args,0,5); varargs = PyTuple_GetSlice(args,5,PyTuple_Size(args)+1); resultobj = _wrap__prelude_log__varargs__(self,newargs,varargs); Py_XDECREF(newargs); Py_XDECREF(varargs); return resultobj; } SWIGINTERN PyObject *_wrap_prelude_log__varargs__(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *varargs) { PyObject *resultobj = 0; prelude_log_t arg1 ; char *arg2 = (char *) 0 ; void *arg3 = 0 ; int val1 ; int ecode1 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:prelude_log",&obj0,&obj1)) SWIG_fail; ecode1 = SWIG_AsVal_int(obj0, &val1); if (!SWIG_IsOK(ecode1)) { SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "prelude_log" "', argument " "1"" of type '" "prelude_log_t""'"); } arg1 = (prelude_log_t)(val1); { if ( obj1 == Py_None ) arg2 = NULL; else if ( PyString_Check(obj1) ) arg2 = PyString_AsString(obj1); else { PyErr_Format(PyExc_TypeError, "expected None or string, %s found", obj1->ob_type->tp_name); return NULL; } } { Py_BEGIN_ALLOW_THREADS prelude_log(arg1,(char const *)arg2,arg3); Py_END_ALLOW_THREADS } resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_prelude_log(PyObject *self, PyObject *args) { PyObject *resultobj; PyObject *varargs; PyObject *newargs; newargs = PyTuple_GetSlice(args,0,2); varargs = PyTuple_GetSlice(args,2,PyTuple_Size(args)+1); resultobj = _wrap_prelude_log__varargs__(self,newargs,varargs); Py_XDECREF(newargs); Py_XDECREF(varargs); return resultobj; } SWIGINTERN PyObject *_wrap_prelude_log_debug__varargs__(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *varargs) { PyObject *resultobj = 0; prelude_log_t arg1 ; char *arg2 = (char *) 0 ; void *arg3 = 0 ; int val1 ; int ecode1 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:prelude_log_debug",&obj0,&obj1)) SWIG_fail; ecode1 = SWIG_AsVal_int(obj0, &val1); if (!SWIG_IsOK(ecode1)) { SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "prelude_log_debug" "', argument " "1"" of type '" "prelude_log_t""'"); } arg1 = (prelude_log_t)(val1); { if ( obj1 == Py_None ) arg2 = NULL; else if ( PyString_Check(obj1) ) arg2 = PyString_AsString(obj1); else { PyErr_Format(PyExc_TypeError, "expected None or string, %s found", obj1->ob_type->tp_name); return NULL; } } { Py_BEGIN_ALLOW_THREADS prelude_log_debug(arg1,(char const *)arg2,arg3); Py_END_ALLOW_THREADS } resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_prelude_log_debug(PyObject *self, PyObject *args) { PyObject *resultobj; PyObject *varargs; PyObject *newargs; newargs = PyTuple_GetSlice(args,0,2); varargs = PyTuple_GetSlice(args,2,PyTuple_Size(args)+1); resultobj = _wrap_prelude_log_debug__varargs__(self,newargs,varargs); Py_XDECREF(newargs); Py_XDECREF(varargs); return resultobj; } SWIGINTERN PyObject *_wrap_prelude_log_set_level(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; prelude_log_t arg1 ; int val1 ; int ecode1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:prelude_log_set_level",&obj0)) SWIG_fail; ecode1 = SWIG_AsVal_int(obj0, &val1); if (!SWIG_IsOK(ecode1)) { SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "prelude_log_set_level" "', argument " "1"" of type '" "prelude_log_t""'"); } arg1 = (prelude_log_t)(val1); { Py_BEGIN_ALLOW_THREADS prelude_log_set_level(arg1); Py_END_ALLOW_THREADS } resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_prelude_log_set_debug_level(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; int arg1 ; int val1 ; int ecode1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:prelude_log_set_debug_level",&obj0)) SWIG_fail; ecode1 = SWIG_AsVal_int(obj0, &val1); if (!SWIG_IsOK(ecode1)) { SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "prelude_log_set_debug_level" "', argument " "1"" of type '" "int""'"); } arg1 = (int)(val1); { Py_BEGIN_ALLOW_THREADS prelude_log_set_debug_level(arg1); Py_END_ALLOW_THREADS } resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_prelude_log_get_flags(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; prelude_log_flags_t result; if (!PyArg_ParseTuple(args,(char *)":prelude_log_get_flags")) SWIG_fail; { Py_BEGIN_ALLOW_THREADS result = (prelude_log_flags_t)prelude_log_get_flags(); Py_END_ALLOW_THREADS } resultobj = SWIG_From_int((int)(result)); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_prelude_log_set_flags(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; prelude_log_flags_t arg1 ; int val1 ; int ecode1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:prelude_log_set_flags",&obj0)) SWIG_fail; ecode1 = SWIG_AsVal_int(obj0, &val1); if (!SWIG_IsOK(ecode1)) { SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "prelude_log_set_flags" "', argument " "1"" of type '" "prelude_log_flags_t""'"); } arg1 = (prelude_log_flags_t)(val1); { Py_BEGIN_ALLOW_THREADS prelude_log_set_flags(arg1); Py_END_ALLOW_THREADS } resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_prelude_log_get_prefix(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; char *result = 0 ; if (!PyArg_ParseTuple(args,(char *)":prelude_log_get_prefix")) SWIG_fail; { Py_BEGIN_ALLOW_THREADS result = (char *)prelude_log_get_prefix(); Py_END_ALLOW_THREADS } resultobj = SWIG_FromCharPtr((const char *)result); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_prelude_log_set_prefix(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; char *arg1 = (char *) 0 ; int res1 ; char *buf1 = 0 ; int alloc1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:prelude_log_set_prefix",&obj0)) SWIG_fail; res1 = SWIG_AsCharPtrAndSize(obj0, &buf1, NULL, &alloc1); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "prelude_log_set_prefix" "', argument " "1"" of type '" "char *""'"); } arg1 = (char *)(buf1); { Py_BEGIN_ALLOW_THREADS prelude_log_set_prefix(arg1); Py_END_ALLOW_THREADS } resultobj = SWIG_Py_Void(); if (alloc1 == SWIG_NEWOBJ) free((char*)buf1); return resultobj; fail: if (alloc1 == SWIG_NEWOBJ) free((char*)buf1); return NULL; } SWIGINTERN PyObject *_wrap_prelude_log_set_callback(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; void (*arg1)(prelude_log_t,char const *) = (void (*)(prelude_log_t,char const *)) 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:prelude_log_set_callback",&obj0)) SWIG_fail; { int res = SWIG_ConvertFunctionPtr(obj0, (void**)(&arg1), SWIGTYPE_p_f_enum_prelude_log_t_p_q_const__char__void); if (!SWIG_IsOK(res)) { SWIG_exception_fail(SWIG_ArgError(res), "in method '" "prelude_log_set_callback" "', argument " "1"" of type '" "void (*)(prelude_log_t,char const *)""'"); } } { Py_BEGIN_ALLOW_THREADS prelude_log_set_callback(arg1); Py_END_ALLOW_THREADS } resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_prelude_log_set_logfile(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; char *arg1 = (char *) 0 ; PyObject * obj0 = 0 ; int result; if (!PyArg_ParseTuple(args,(char *)"O:prelude_log_set_logfile",&obj0)) SWIG_fail; { if ( obj0 == Py_None ) arg1 = NULL; else if ( PyString_Check(obj0) ) arg1 = PyString_AsString(obj0); else { PyErr_Format(PyExc_TypeError, "expected None or string, %s found", obj0->ob_type->tp_name); return NULL; } } { Py_BEGIN_ALLOW_THREADS result = (int)prelude_log_set_logfile((char const *)arg1); Py_END_ALLOW_THREADS } { if ( result < 0 ) { swig_python_raise_exception(result); resultobj = NULL; } else { resultobj = PyInt_FromLong(result); } } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap__prelude_log_set_abort_level(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; prelude_log_t arg1 ; int val1 ; int ecode1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:_prelude_log_set_abort_level",&obj0)) SWIG_fail; ecode1 = SWIG_AsVal_int(obj0, &val1); if (!SWIG_IsOK(ecode1)) { SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "_prelude_log_set_abort_level" "', argument " "1"" of type '" "prelude_log_t""'"); } arg1 = (prelude_log_t)(val1); { Py_BEGIN_ALLOW_THREADS _prelude_log_set_abort_level(arg1); Py_END_ALLOW_THREADS } resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap__prelude_log_set_abort_level_from_string(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; char *arg1 = (char *) 0 ; PyObject * obj0 = 0 ; int result; if (!PyArg_ParseTuple(args,(char *)"O:_prelude_log_set_abort_level_from_string",&obj0)) SWIG_fail; { if ( obj0 == Py_None ) arg1 = NULL; else if ( PyString_Check(obj0) ) arg1 = PyString_AsString(obj0); else { PyErr_Format(PyExc_TypeError, "expected None or string, %s found", obj0->ob_type->tp_name); return NULL; } } { Py_BEGIN_ALLOW_THREADS result = (int)_prelude_log_set_abort_level_from_string((char const *)arg1); Py_END_ALLOW_THREADS } { if ( result < 0 ) { swig_python_raise_exception(result); resultobj = NULL; } else { resultobj = PyInt_FromLong(result); } } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_prelude_msgbuf_new(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; prelude_msgbuf_t **arg1 = (prelude_msgbuf_t **) 0 ; prelude_msgbuf_t *tmp1 ; int result; { arg1 = (prelude_msgbuf_t **) &tmp1; } if (!PyArg_ParseTuple(args,(char *)":prelude_msgbuf_new")) SWIG_fail; { Py_BEGIN_ALLOW_THREADS result = (int)prelude_msgbuf_new(arg1); Py_END_ALLOW_THREADS } { if ( result < 0 ) { swig_python_raise_exception(result); resultobj = NULL; } else { resultobj = PyInt_FromLong(result); } } { if ( result >= 0 ) resultobj = SWIG_NewPointerObj((void *) * arg1, SWIGTYPE_p_prelude_msgbuf, 0); } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_prelude_msgbuf_destroy(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; prelude_msgbuf_t *arg1 = (prelude_msgbuf_t *) 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:prelude_msgbuf_destroy",&obj0)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_prelude_msgbuf, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { Py_BEGIN_ALLOW_THREADS prelude_msgbuf_destroy(arg1); Py_END_ALLOW_THREADS } resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_prelude_msgbuf_mark_end(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; prelude_msgbuf_t *arg1 = (prelude_msgbuf_t *) 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:prelude_msgbuf_mark_end",&obj0)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_prelude_msgbuf, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { Py_BEGIN_ALLOW_THREADS prelude_msgbuf_mark_end(arg1); Py_END_ALLOW_THREADS } resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_prelude_msgbuf_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; prelude_msgbuf_t *arg1 = (prelude_msgbuf_t *) 0 ; uint8_t arg2 ; uint32_t arg3 ; void *arg4 = (void *) 0 ; unsigned char val2 ; int ecode2 = 0 ; unsigned int val3 ; int ecode3 = 0 ; int res4 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; PyObject * obj2 = 0 ; PyObject * obj3 = 0 ; int result; if (!PyArg_ParseTuple(args,(char *)"OOOO:prelude_msgbuf_set",&obj0,&obj1,&obj2,&obj3)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_prelude_msgbuf, SWIG_POINTER_EXCEPTION|0) ) return NULL; } ecode2 = SWIG_AsVal_unsigned_SS_char(obj1, &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "prelude_msgbuf_set" "', argument " "2"" of type '" "uint8_t""'"); } arg2 = (uint8_t)(val2); ecode3 = SWIG_AsVal_unsigned_SS_int(obj2, &val3); if (!SWIG_IsOK(ecode3)) { SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "prelude_msgbuf_set" "', argument " "3"" of type '" "uint32_t""'"); } arg3 = (uint32_t)(val3); res4 = SWIG_ConvertPtr(obj3,SWIG_as_voidptrptr(&arg4), 0, 0); if (!SWIG_IsOK(res4)) { SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "prelude_msgbuf_set" "', argument " "4"" of type '" "void const *""'"); } { Py_BEGIN_ALLOW_THREADS result = (int)prelude_msgbuf_set(arg1,arg2,arg3,(void const *)arg4); Py_END_ALLOW_THREADS } { if ( result < 0 ) { swig_python_raise_exception(result); resultobj = NULL; } else { resultobj = PyInt_FromLong(result); } } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_prelude_msgbuf_get_msg(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; prelude_msgbuf_t *arg1 = (prelude_msgbuf_t *) 0 ; PyObject * obj0 = 0 ; prelude_msg_t *result = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:prelude_msgbuf_get_msg",&obj0)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_prelude_msgbuf, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { Py_BEGIN_ALLOW_THREADS result = (prelude_msg_t *)prelude_msgbuf_get_msg(arg1); Py_END_ALLOW_THREADS } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_prelude_msg, 0 | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_prelude_msgbuf_set_callback(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; prelude_msgbuf_t *arg1 = (prelude_msgbuf_t *) 0 ; int (*arg2)(prelude_msgbuf_t *,prelude_msg_t *) = (int (*)(prelude_msgbuf_t *,prelude_msg_t *)) 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:prelude_msgbuf_set_callback",&obj0,&obj1)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_prelude_msgbuf, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { int res = SWIG_ConvertFunctionPtr(obj1, (void**)(&arg2), SWIGTYPE_p_f_p_struct_prelude_msgbuf_p_struct_prelude_msg__int); if (!SWIG_IsOK(res)) { SWIG_exception_fail(SWIG_ArgError(res), "in method '" "prelude_msgbuf_set_callback" "', argument " "2"" of type '" "int (*)(prelude_msgbuf_t *,prelude_msg_t *)""'"); } } { Py_BEGIN_ALLOW_THREADS prelude_msgbuf_set_callback(arg1,arg2); Py_END_ALLOW_THREADS } resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_prelude_msgbuf_set_data(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; prelude_msgbuf_t *arg1 = (prelude_msgbuf_t *) 0 ; void *arg2 = (void *) 0 ; int res2 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:prelude_msgbuf_set_data",&obj0,&obj1)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_prelude_msgbuf, SWIG_POINTER_EXCEPTION|0) ) return NULL; } res2 = SWIG_ConvertPtr(obj1,SWIG_as_voidptrptr(&arg2), 0, 0); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "prelude_msgbuf_set_data" "', argument " "2"" of type '" "void *""'"); } { Py_BEGIN_ALLOW_THREADS prelude_msgbuf_set_data(arg1,arg2); Py_END_ALLOW_THREADS } resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_prelude_msgbuf_get_data(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; prelude_msgbuf_t *arg1 = (prelude_msgbuf_t *) 0 ; PyObject * obj0 = 0 ; void *result = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:prelude_msgbuf_get_data",&obj0)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_prelude_msgbuf, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { Py_BEGIN_ALLOW_THREADS result = (void *)prelude_msgbuf_get_data(arg1); Py_END_ALLOW_THREADS } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_void, 0 | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_prelude_msgbuf_set_flags(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; prelude_msgbuf_t *arg1 = (prelude_msgbuf_t *) 0 ; prelude_msgbuf_flags_t arg2 ; int val2 ; int ecode2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:prelude_msgbuf_set_flags",&obj0,&obj1)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_prelude_msgbuf, SWIG_POINTER_EXCEPTION|0) ) return NULL; } ecode2 = SWIG_AsVal_int(obj1, &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "prelude_msgbuf_set_flags" "', argument " "2"" of type '" "prelude_msgbuf_flags_t""'"); } arg2 = (prelude_msgbuf_flags_t)(val2); { Py_BEGIN_ALLOW_THREADS prelude_msgbuf_set_flags(arg1,arg2); Py_END_ALLOW_THREADS } resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_prelude_msgbuf_get_flags(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; prelude_msgbuf_t *arg1 = (prelude_msgbuf_t *) 0 ; PyObject * obj0 = 0 ; prelude_msgbuf_flags_t result; if (!PyArg_ParseTuple(args,(char *)"O:prelude_msgbuf_get_flags",&obj0)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_prelude_msgbuf, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { Py_BEGIN_ALLOW_THREADS result = (prelude_msgbuf_flags_t)prelude_msgbuf_get_flags(arg1); Py_END_ALLOW_THREADS } resultobj = SWIG_From_int((int)(result)); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_prelude_timer_t_list_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; prelude_timer_t *arg1 = (prelude_timer_t *) 0 ; prelude_list_t arg2 ; void *argp1 = 0 ; int res1 = 0 ; void *argp2 ; int res2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:prelude_timer_t_list_set",&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_prelude_timer_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "prelude_timer_t_list_set" "', argument " "1"" of type '" "prelude_timer_t *""'"); } arg1 = (prelude_timer_t *)(argp1); { res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_prelude_list_t, 0 ); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "prelude_timer_t_list_set" "', argument " "2"" of type '" "prelude_list_t""'"); } if (!argp2) { SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "prelude_timer_t_list_set" "', argument " "2"" of type '" "prelude_list_t""'"); } else { arg2 = *((prelude_list_t *)(argp2)); } } if (arg1) (arg1)->list = arg2; resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_prelude_timer_t_list_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; prelude_timer_t *arg1 = (prelude_timer_t *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; prelude_list_t result; if (!PyArg_ParseTuple(args,(char *)"O:prelude_timer_t_list_get",&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_prelude_timer_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "prelude_timer_t_list_get" "', argument " "1"" of type '" "prelude_timer_t *""'"); } arg1 = (prelude_timer_t *)(argp1); result = ((arg1)->list); resultobj = SWIG_NewPointerObj((prelude_list_t *)memcpy((prelude_list_t *)malloc(sizeof(prelude_list_t)),&result,sizeof(prelude_list_t)), SWIGTYPE_p_prelude_list_t, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_prelude_timer_t_expire_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; prelude_timer_t *arg1 = (prelude_timer_t *) 0 ; int arg2 ; void *argp1 = 0 ; int res1 = 0 ; int val2 ; int ecode2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:prelude_timer_t_expire_set",&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_prelude_timer_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "prelude_timer_t_expire_set" "', argument " "1"" of type '" "prelude_timer_t *""'"); } arg1 = (prelude_timer_t *)(argp1); ecode2 = SWIG_AsVal_int(obj1, &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "prelude_timer_t_expire_set" "', argument " "2"" of type '" "int""'"); } arg2 = (int)(val2); if (arg1) (arg1)->expire = arg2; resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_prelude_timer_t_expire_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; prelude_timer_t *arg1 = (prelude_timer_t *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; int result; if (!PyArg_ParseTuple(args,(char *)"O:prelude_timer_t_expire_get",&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_prelude_timer_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "prelude_timer_t_expire_get" "', argument " "1"" of type '" "prelude_timer_t *""'"); } arg1 = (prelude_timer_t *)(argp1); result = (int) ((arg1)->expire); { if ( result < 0 ) { swig_python_raise_exception(result); resultobj = NULL; } else { resultobj = PyInt_FromLong(result); } } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_prelude_timer_t_start_time_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; prelude_timer_t *arg1 = (prelude_timer_t *) 0 ; time_t arg2 ; void *argp1 = 0 ; int res1 = 0 ; void *argp2 ; int res2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:prelude_timer_t_start_time_set",&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_prelude_timer_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "prelude_timer_t_start_time_set" "', argument " "1"" of type '" "prelude_timer_t *""'"); } arg1 = (prelude_timer_t *)(argp1); { res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_time_t, 0 ); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "prelude_timer_t_start_time_set" "', argument " "2"" of type '" "time_t""'"); } if (!argp2) { SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "prelude_timer_t_start_time_set" "', argument " "2"" of type '" "time_t""'"); } else { arg2 = *((time_t *)(argp2)); } } if (arg1) (arg1)->start_time = arg2; resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_prelude_timer_t_start_time_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; prelude_timer_t *arg1 = (prelude_timer_t *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; time_t result; if (!PyArg_ParseTuple(args,(char *)"O:prelude_timer_t_start_time_get",&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_prelude_timer_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "prelude_timer_t_start_time_get" "', argument " "1"" of type '" "prelude_timer_t *""'"); } arg1 = (prelude_timer_t *)(argp1); result = ((arg1)->start_time); resultobj = SWIG_NewPointerObj((time_t *)memcpy((time_t *)malloc(sizeof(time_t)),&result,sizeof(time_t)), SWIGTYPE_p_time_t, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_prelude_timer_t_data_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; prelude_timer_t *arg1 = (prelude_timer_t *) 0 ; void *arg2 = (void *) 0 ; void *argp1 = 0 ; int res1 = 0 ; int res2 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:prelude_timer_t_data_set",&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_prelude_timer_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "prelude_timer_t_data_set" "', argument " "1"" of type '" "prelude_timer_t *""'"); } arg1 = (prelude_timer_t *)(argp1); res2 = SWIG_ConvertPtr(obj1,SWIG_as_voidptrptr(&arg2), 0, SWIG_POINTER_DISOWN); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "prelude_timer_t_data_set" "', argument " "2"" of type '" "void *""'"); } if (arg1) (arg1)->data = arg2; resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_prelude_timer_t_data_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; prelude_timer_t *arg1 = (prelude_timer_t *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; void *result = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:prelude_timer_t_data_get",&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_prelude_timer_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "prelude_timer_t_data_get" "', argument " "1"" of type '" "prelude_timer_t *""'"); } arg1 = (prelude_timer_t *)(argp1); result = (void *) ((arg1)->data); resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_void, 0 | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_prelude_timer_t_function_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; prelude_timer_t *arg1 = (prelude_timer_t *) 0 ; void (*arg2)(void *) = (void (*)(void *)) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:prelude_timer_t_function_set",&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_prelude_timer_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "prelude_timer_t_function_set" "', argument " "1"" of type '" "prelude_timer_t *""'"); } arg1 = (prelude_timer_t *)(argp1); { int res = SWIG_ConvertFunctionPtr(obj1, (void**)(&arg2), SWIGTYPE_p_f_p_void__void); if (!SWIG_IsOK(res)) { SWIG_exception_fail(SWIG_ArgError(res), "in method '" "prelude_timer_t_function_set" "', argument " "2"" of type '" "void (*)(void *)""'"); } } if (arg1) (arg1)->function = arg2; resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_prelude_timer_t_function_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; prelude_timer_t *arg1 = (prelude_timer_t *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; void (*result)(void *) = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:prelude_timer_t_function_get",&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_prelude_timer_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "prelude_timer_t_function_get" "', argument " "1"" of type '" "prelude_timer_t *""'"); } arg1 = (prelude_timer_t *)(argp1); result = (void (*)(void *)) ((arg1)->function); resultobj = SWIG_NewFunctionPtrObj((void *)(result), SWIGTYPE_p_f_p_void__void); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_new_prelude_timer_t(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; prelude_timer_t *result = 0 ; if (!PyArg_ParseTuple(args,(char *)":new_prelude_timer_t")) SWIG_fail; { Py_BEGIN_ALLOW_THREADS result = (prelude_timer_t *)calloc(1, sizeof(prelude_timer_t)); Py_END_ALLOW_THREADS } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_prelude_timer_t, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_delete_prelude_timer_t(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; prelude_timer_t *arg1 = (prelude_timer_t *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:delete_prelude_timer_t",&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_prelude_timer_t, SWIG_POINTER_DISOWN | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_prelude_timer_t" "', argument " "1"" of type '" "prelude_timer_t *""'"); } arg1 = (prelude_timer_t *)(argp1); { Py_BEGIN_ALLOW_THREADS free((char *) arg1); Py_END_ALLOW_THREADS } resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_prelude_timer_init(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; prelude_timer_t *arg1 = (prelude_timer_t *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:prelude_timer_init",&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_prelude_timer_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "prelude_timer_init" "', argument " "1"" of type '" "prelude_timer_t *""'"); } arg1 = (prelude_timer_t *)(argp1); { Py_BEGIN_ALLOW_THREADS prelude_timer_init(arg1); Py_END_ALLOW_THREADS } resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_prelude_timer_init_list(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; prelude_timer_t *arg1 = (prelude_timer_t *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:prelude_timer_init_list",&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_prelude_timer_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "prelude_timer_init_list" "', argument " "1"" of type '" "prelude_timer_t *""'"); } arg1 = (prelude_timer_t *)(argp1); { Py_BEGIN_ALLOW_THREADS prelude_timer_init_list(arg1); Py_END_ALLOW_THREADS } resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_prelude_timer_reset(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; prelude_timer_t *arg1 = (prelude_timer_t *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:prelude_timer_reset",&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_prelude_timer_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "prelude_timer_reset" "', argument " "1"" of type '" "prelude_timer_t *""'"); } arg1 = (prelude_timer_t *)(argp1); { Py_BEGIN_ALLOW_THREADS prelude_timer_reset(arg1); Py_END_ALLOW_THREADS } resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_prelude_timer_destroy(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; prelude_timer_t *arg1 = (prelude_timer_t *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:prelude_timer_destroy",&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_prelude_timer_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "prelude_timer_destroy" "', argument " "1"" of type '" "prelude_timer_t *""'"); } arg1 = (prelude_timer_t *)(argp1); { Py_BEGIN_ALLOW_THREADS prelude_timer_destroy(arg1); Py_END_ALLOW_THREADS } resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_prelude_timer_wake_up(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; if (!PyArg_ParseTuple(args,(char *)":prelude_timer_wake_up")) SWIG_fail; { Py_BEGIN_ALLOW_THREADS prelude_timer_wake_up(); Py_END_ALLOW_THREADS } resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_prelude_timer_flush(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; if (!PyArg_ParseTuple(args,(char *)":prelude_timer_flush")) SWIG_fail; { Py_BEGIN_ALLOW_THREADS prelude_timer_flush(); Py_END_ALLOW_THREADS } resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_prelude_timer_lock_critical_region(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; if (!PyArg_ParseTuple(args,(char *)":prelude_timer_lock_critical_region")) SWIG_fail; { Py_BEGIN_ALLOW_THREADS prelude_timer_lock_critical_region(); Py_END_ALLOW_THREADS } resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_prelude_timer_unlock_critical_region(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; if (!PyArg_ParseTuple(args,(char *)":prelude_timer_unlock_critical_region")) SWIG_fail; { Py_BEGIN_ALLOW_THREADS prelude_timer_unlock_critical_region(); Py_END_ALLOW_THREADS } resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap__prelude_timer_init(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; int result; if (!PyArg_ParseTuple(args,(char *)":_prelude_timer_init")) SWIG_fail; { Py_BEGIN_ALLOW_THREADS result = (int)_prelude_timer_init(); Py_END_ALLOW_THREADS } { if ( result < 0 ) { swig_python_raise_exception(result); resultobj = NULL; } else { resultobj = PyInt_FromLong(result); } } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap__prelude_timer_fork_prepare(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; if (!PyArg_ParseTuple(args,(char *)":_prelude_timer_fork_prepare")) SWIG_fail; { Py_BEGIN_ALLOW_THREADS _prelude_timer_fork_prepare(); Py_END_ALLOW_THREADS } resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap__prelude_timer_fork_parent(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; if (!PyArg_ParseTuple(args,(char *)":_prelude_timer_fork_parent")) SWIG_fail; { Py_BEGIN_ALLOW_THREADS _prelude_timer_fork_parent(); Py_END_ALLOW_THREADS } resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap__prelude_timer_fork_child(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; if (!PyArg_ParseTuple(args,(char *)":_prelude_timer_fork_child")) SWIG_fail; { Py_BEGIN_ALLOW_THREADS _prelude_timer_fork_child(); Py_END_ALLOW_THREADS } resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_prelude_error_is_verbose(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; prelude_error_t arg1 ; int val1 ; int ecode1 = 0 ; PyObject * obj0 = 0 ; prelude_bool_t result; if (!PyArg_ParseTuple(args,(char *)"O:prelude_error_is_verbose",&obj0)) SWIG_fail; ecode1 = SWIG_AsVal_int(obj0, &val1); if (!SWIG_IsOK(ecode1)) { SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "prelude_error_is_verbose" "', argument " "1"" of type '" "prelude_error_t""'"); } arg1 = (prelude_error_t)(val1); { Py_BEGIN_ALLOW_THREADS result = (prelude_bool_t)prelude_error_is_verbose(arg1); Py_END_ALLOW_THREADS } resultobj = SWIG_From_int((int)(result)); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_prelude_error_get_code(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; prelude_error_t arg1 ; int val1 ; int ecode1 = 0 ; PyObject * obj0 = 0 ; prelude_error_code_t result; if (!PyArg_ParseTuple(args,(char *)"O:prelude_error_get_code",&obj0)) SWIG_fail; ecode1 = SWIG_AsVal_int(obj0, &val1); if (!SWIG_IsOK(ecode1)) { SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "prelude_error_get_code" "', argument " "1"" of type '" "prelude_error_t""'"); } arg1 = (prelude_error_t)(val1); { Py_BEGIN_ALLOW_THREADS result = (prelude_error_code_t)prelude_error_get_code(arg1); Py_END_ALLOW_THREADS } resultobj = SWIG_From_int((int)(result)); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_prelude_error_get_source(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; prelude_error_t arg1 ; int val1 ; int ecode1 = 0 ; PyObject * obj0 = 0 ; prelude_error_source_t result; if (!PyArg_ParseTuple(args,(char *)"O:prelude_error_get_source",&obj0)) SWIG_fail; ecode1 = SWIG_AsVal_int(obj0, &val1); if (!SWIG_IsOK(ecode1)) { SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "prelude_error_get_source" "', argument " "1"" of type '" "prelude_error_t""'"); } arg1 = (prelude_error_t)(val1); { Py_BEGIN_ALLOW_THREADS result = (prelude_error_source_t)prelude_error_get_source(arg1); Py_END_ALLOW_THREADS } resultobj = SWIG_From_int((int)(result)); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_prelude_error_code_from_errno(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; int arg1 ; int val1 ; int ecode1 = 0 ; PyObject * obj0 = 0 ; prelude_error_code_t result; if (!PyArg_ParseTuple(args,(char *)"O:prelude_error_code_from_errno",&obj0)) SWIG_fail; ecode1 = SWIG_AsVal_int(obj0, &val1); if (!SWIG_IsOK(ecode1)) { SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "prelude_error_code_from_errno" "', argument " "1"" of type '" "int""'"); } arg1 = (int)(val1); { Py_BEGIN_ALLOW_THREADS result = (prelude_error_code_t)prelude_error_code_from_errno(arg1); Py_END_ALLOW_THREADS } resultobj = SWIG_From_int((int)(result)); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_prelude_error_make(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; prelude_error_source_t arg1 ; prelude_error_code_t arg2 ; int val1 ; int ecode1 = 0 ; int val2 ; int ecode2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; prelude_error_t result; if (!PyArg_ParseTuple(args,(char *)"OO:prelude_error_make",&obj0,&obj1)) SWIG_fail; ecode1 = SWIG_AsVal_int(obj0, &val1); if (!SWIG_IsOK(ecode1)) { SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "prelude_error_make" "', argument " "1"" of type '" "prelude_error_source_t""'"); } arg1 = (prelude_error_source_t)(val1); ecode2 = SWIG_AsVal_int(obj1, &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "prelude_error_make" "', argument " "2"" of type '" "prelude_error_code_t""'"); } arg2 = (prelude_error_code_t)(val2); { Py_BEGIN_ALLOW_THREADS result = (prelude_error_t)prelude_error_make(arg1,arg2); Py_END_ALLOW_THREADS } { if ( result < 0 ) { swig_python_raise_exception(result); resultobj = NULL; } else { resultobj = PyInt_FromLong(result); } } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_prelude_error_make_from_errno(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; prelude_error_source_t arg1 ; int arg2 ; int val1 ; int ecode1 = 0 ; int val2 ; int ecode2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; prelude_error_t result; if (!PyArg_ParseTuple(args,(char *)"OO:prelude_error_make_from_errno",&obj0,&obj1)) SWIG_fail; ecode1 = SWIG_AsVal_int(obj0, &val1); if (!SWIG_IsOK(ecode1)) { SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "prelude_error_make_from_errno" "', argument " "1"" of type '" "prelude_error_source_t""'"); } arg1 = (prelude_error_source_t)(val1); ecode2 = SWIG_AsVal_int(obj1, &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "prelude_error_make_from_errno" "', argument " "2"" of type '" "int""'"); } arg2 = (int)(val2); { Py_BEGIN_ALLOW_THREADS result = (prelude_error_t)prelude_error_make_from_errno(arg1,arg2); Py_END_ALLOW_THREADS } { if ( result < 0 ) { swig_python_raise_exception(result); resultobj = NULL; } else { resultobj = PyInt_FromLong(result); } } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_prelude_perror__varargs__(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *varargs) { PyObject *resultobj = 0; prelude_error_t arg1 ; char *arg2 = (char *) 0 ; void *arg3 = 0 ; int val1 ; int ecode1 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:prelude_perror",&obj0,&obj1)) SWIG_fail; ecode1 = SWIG_AsVal_int(obj0, &val1); if (!SWIG_IsOK(ecode1)) { SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "prelude_perror" "', argument " "1"" of type '" "prelude_error_t""'"); } arg1 = (prelude_error_t)(val1); { if ( obj1 == Py_None ) arg2 = NULL; else if ( PyString_Check(obj1) ) arg2 = PyString_AsString(obj1); else { PyErr_Format(PyExc_TypeError, "expected None or string, %s found", obj1->ob_type->tp_name); return NULL; } } { Py_BEGIN_ALLOW_THREADS prelude_perror(arg1,(char const *)arg2,arg3); Py_END_ALLOW_THREADS } resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_prelude_perror(PyObject *self, PyObject *args) { PyObject *resultobj; PyObject *varargs; PyObject *newargs; newargs = PyTuple_GetSlice(args,0,2); varargs = PyTuple_GetSlice(args,2,PyTuple_Size(args)+1); resultobj = _wrap_prelude_perror__varargs__(self,newargs,varargs); Py_XDECREF(newargs); Py_XDECREF(varargs); return resultobj; } SWIGINTERN PyObject *_wrap_prelude_strerror(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; prelude_error_t arg1 ; int val1 ; int ecode1 = 0 ; PyObject * obj0 = 0 ; char *result = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:prelude_strerror",&obj0)) SWIG_fail; ecode1 = SWIG_AsVal_int(obj0, &val1); if (!SWIG_IsOK(ecode1)) { SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "prelude_strerror" "', argument " "1"" of type '" "prelude_error_t""'"); } arg1 = (prelude_error_t)(val1); { Py_BEGIN_ALLOW_THREADS result = (char *)prelude_strerror(arg1); Py_END_ALLOW_THREADS } resultobj = SWIG_FromCharPtr((const char *)result); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_prelude_strsource(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; prelude_error_t arg1 ; int val1 ; int ecode1 = 0 ; PyObject * obj0 = 0 ; char *result = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:prelude_strsource",&obj0)) SWIG_fail; ecode1 = SWIG_AsVal_int(obj0, &val1); if (!SWIG_IsOK(ecode1)) { SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "prelude_strsource" "', argument " "1"" of type '" "prelude_error_t""'"); } arg1 = (prelude_error_t)(val1); { Py_BEGIN_ALLOW_THREADS result = (char *)prelude_strsource(arg1); Py_END_ALLOW_THREADS } resultobj = SWIG_FromCharPtr((const char *)result); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_prelude_error_code_to_errno(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; prelude_error_code_t arg1 ; int val1 ; int ecode1 = 0 ; PyObject * obj0 = 0 ; int result; if (!PyArg_ParseTuple(args,(char *)"O:prelude_error_code_to_errno",&obj0)) SWIG_fail; ecode1 = SWIG_AsVal_int(obj0, &val1); if (!SWIG_IsOK(ecode1)) { SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "prelude_error_code_to_errno" "', argument " "1"" of type '" "prelude_error_code_t""'"); } arg1 = (prelude_error_code_t)(val1); { Py_BEGIN_ALLOW_THREADS result = (int)prelude_error_code_to_errno(arg1); Py_END_ALLOW_THREADS } { if ( result < 0 ) { swig_python_raise_exception(result); resultobj = NULL; } else { resultobj = PyInt_FromLong(result); } } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_prelude_error_verbose_make__varargs__(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *varargs) { PyObject *resultobj = 0; prelude_error_source_t arg1 ; prelude_error_code_t arg2 ; char *arg3 = (char *) 0 ; void *arg4 = 0 ; int val1 ; int ecode1 = 0 ; int val2 ; int ecode2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; PyObject * obj2 = 0 ; prelude_error_t result; if (!PyArg_ParseTuple(args,(char *)"OOO:prelude_error_verbose_make",&obj0,&obj1,&obj2)) SWIG_fail; ecode1 = SWIG_AsVal_int(obj0, &val1); if (!SWIG_IsOK(ecode1)) { SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "prelude_error_verbose_make" "', argument " "1"" of type '" "prelude_error_source_t""'"); } arg1 = (prelude_error_source_t)(val1); ecode2 = SWIG_AsVal_int(obj1, &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "prelude_error_verbose_make" "', argument " "2"" of type '" "prelude_error_code_t""'"); } arg2 = (prelude_error_code_t)(val2); { if ( obj2 == Py_None ) arg3 = NULL; else if ( PyString_Check(obj2) ) arg3 = PyString_AsString(obj2); else { PyErr_Format(PyExc_TypeError, "expected None or string, %s found", obj2->ob_type->tp_name); return NULL; } } { Py_BEGIN_ALLOW_THREADS result = (prelude_error_t)prelude_error_verbose_make(arg1,arg2,(char const *)arg3,arg4); Py_END_ALLOW_THREADS } { if ( result < 0 ) { swig_python_raise_exception(result); resultobj = NULL; } else { resultobj = PyInt_FromLong(result); } } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_prelude_error_verbose_make(PyObject *self, PyObject *args) { PyObject *resultobj; PyObject *varargs; PyObject *newargs; newargs = PyTuple_GetSlice(args,0,3); varargs = PyTuple_GetSlice(args,3,PyTuple_Size(args)+1); resultobj = _wrap_prelude_error_verbose_make__varargs__(self,newargs,varargs); Py_XDECREF(newargs); Py_XDECREF(varargs); return resultobj; } SWIGINTERN PyObject *_wrap_prelude_error(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; prelude_error_code_t arg1 ; int val1 ; int ecode1 = 0 ; PyObject * obj0 = 0 ; prelude_error_t result; if (!PyArg_ParseTuple(args,(char *)"O:prelude_error",&obj0)) SWIG_fail; ecode1 = SWIG_AsVal_int(obj0, &val1); if (!SWIG_IsOK(ecode1)) { SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "prelude_error" "', argument " "1"" of type '" "prelude_error_code_t""'"); } arg1 = (prelude_error_code_t)(val1); { Py_BEGIN_ALLOW_THREADS result = (prelude_error_t)prelude_error(arg1); Py_END_ALLOW_THREADS } { if ( result < 0 ) { swig_python_raise_exception(result); resultobj = NULL; } else { resultobj = PyInt_FromLong(result); } } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_prelude_error_verbose__varargs__(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *varargs) { PyObject *resultobj = 0; prelude_error_code_t arg1 ; char *arg2 = (char *) 0 ; void *arg3 = 0 ; int val1 ; int ecode1 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; prelude_error_t result; if (!PyArg_ParseTuple(args,(char *)"OO:prelude_error_verbose",&obj0,&obj1)) SWIG_fail; ecode1 = SWIG_AsVal_int(obj0, &val1); if (!SWIG_IsOK(ecode1)) { SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "prelude_error_verbose" "', argument " "1"" of type '" "prelude_error_code_t""'"); } arg1 = (prelude_error_code_t)(val1); { if ( obj1 == Py_None ) arg2 = NULL; else if ( PyString_Check(obj1) ) arg2 = PyString_AsString(obj1); else { PyErr_Format(PyExc_TypeError, "expected None or string, %s found", obj1->ob_type->tp_name); return NULL; } } { Py_BEGIN_ALLOW_THREADS result = (prelude_error_t)prelude_error_verbose(arg1,(char const *)arg2,arg3); Py_END_ALLOW_THREADS } { if ( result < 0 ) { swig_python_raise_exception(result); resultobj = NULL; } else { resultobj = PyInt_FromLong(result); } } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_prelude_error_verbose(PyObject *self, PyObject *args) { PyObject *resultobj; PyObject *varargs; PyObject *newargs; newargs = PyTuple_GetSlice(args,0,2); varargs = PyTuple_GetSlice(args,2,PyTuple_Size(args)+1); resultobj = _wrap_prelude_error_verbose__varargs__(self,newargs,varargs); Py_XDECREF(newargs); Py_XDECREF(varargs); return resultobj; } SWIGINTERN PyObject *_wrap_prelude_error_from_errno(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; int arg1 ; int val1 ; int ecode1 = 0 ; PyObject * obj0 = 0 ; prelude_error_t result; if (!PyArg_ParseTuple(args,(char *)"O:prelude_error_from_errno",&obj0)) SWIG_fail; ecode1 = SWIG_AsVal_int(obj0, &val1); if (!SWIG_IsOK(ecode1)) { SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "prelude_error_from_errno" "', argument " "1"" of type '" "int""'"); } arg1 = (int)(val1); { Py_BEGIN_ALLOW_THREADS result = (prelude_error_t)prelude_error_from_errno(arg1); Py_END_ALLOW_THREADS } { if ( result < 0 ) { swig_python_raise_exception(result); resultobj = NULL; } else { resultobj = PyInt_FromLong(result); } } return resultobj; fail: return NULL; } static PyMethodDef SwigMethods[] = { { (char *)"SWIG_PyInstanceMethod_New", (PyCFunction)SWIG_PyInstanceMethod_New, METH_O, NULL}, { (char *)"prelude_init", _wrap_prelude_init, METH_VARARGS, NULL}, { (char *)"prelude_deinit", _wrap_prelude_deinit, METH_VARARGS, NULL}, { (char *)"prelude_check_version", _wrap_prelude_check_version, METH_VARARGS, NULL}, { (char *)"prelude_thread_init", _wrap_prelude_thread_init, METH_VARARGS, NULL}, { (char *)"prelude_fork_prepare", _wrap_prelude_fork_prepare, METH_VARARGS, NULL}, { (char *)"prelude_fork_parent", _wrap_prelude_fork_parent, METH_VARARGS, NULL}, { (char *)"prelude_fork_child", _wrap_prelude_fork_child, METH_VARARGS, NULL}, { (char *)"prelude_client_get_unique_ident", _wrap_prelude_client_get_unique_ident, METH_VARARGS, NULL}, { (char *)"prelude_client_set_connection_pool", _wrap_prelude_client_set_connection_pool, METH_VARARGS, NULL}, { (char *)"prelude_client_get_connection_pool", _wrap_prelude_client_get_connection_pool, METH_VARARGS, NULL}, { (char *)"prelude_client_start", _wrap_prelude_client_start, METH_VARARGS, NULL}, { (char *)"prelude_client_init", _wrap_prelude_client_init, METH_VARARGS, NULL}, { (char *)"prelude_client_new", _wrap_prelude_client_new, METH_VARARGS, NULL}, { (char *)"prelude_client_ref", _wrap_prelude_client_ref, METH_VARARGS, NULL}, { (char *)"prelude_client_get_analyzer", _wrap_prelude_client_get_analyzer, METH_VARARGS, NULL}, { (char *)"prelude_client_get_flags", _wrap_prelude_client_get_flags, METH_VARARGS, NULL}, { (char *)"prelude_client_set_required_permission", _wrap_prelude_client_set_required_permission, METH_VARARGS, NULL}, { (char *)"prelude_client_get_required_permission", _wrap_prelude_client_get_required_permission, METH_VARARGS, NULL}, { (char *)"prelude_client_send_msg", _wrap_prelude_client_send_msg, METH_VARARGS, NULL}, { (char *)"prelude_client_recv_msg", _wrap_prelude_client_recv_msg, METH_VARARGS, NULL}, { (char *)"prelude_client_set_heartbeat_cb", _wrap_prelude_client_set_heartbeat_cb, METH_VARARGS, NULL}, { (char *)"prelude_client_send_idmef", _wrap_prelude_client_send_idmef, METH_VARARGS, NULL}, { (char *)"prelude_client_recv_idmef", _wrap_prelude_client_recv_idmef, METH_VARARGS, NULL}, { (char *)"prelude_client_destroy", _wrap_prelude_client_destroy, METH_VARARGS, NULL}, { (char *)"prelude_client_set_flags", _wrap_prelude_client_set_flags, METH_VARARGS, NULL}, { (char *)"prelude_client_set_config_filename", _wrap_prelude_client_set_config_filename, METH_VARARGS, NULL}, { (char *)"prelude_client_get_config_filename", _wrap_prelude_client_get_config_filename, METH_VARARGS, NULL}, { (char *)"prelude_client_get_profile", _wrap_prelude_client_get_profile, METH_VARARGS, NULL}, { (char *)"prelude_client_new_msgbuf", _wrap_prelude_client_new_msgbuf, METH_VARARGS, NULL}, { (char *)"prelude_client_handle_msg_default", _wrap_prelude_client_handle_msg_default, METH_VARARGS, NULL}, { (char *)"_prelude_client_register_options", _wrap__prelude_client_register_options, METH_VARARGS, NULL}, { (char *)"prelude_client_get_setup_error", _wrap_prelude_client_get_setup_error, METH_VARARGS, NULL}, { (char *)"prelude_client_is_setup_needed", _wrap_prelude_client_is_setup_needed, METH_VARARGS, NULL}, { (char *)"prelude_client_print_setup_error", _wrap_prelude_client_print_setup_error, METH_VARARGS, NULL}, { (char *)"_prelude_client_profile_init", _wrap__prelude_client_profile_init, METH_VARARGS, NULL}, { (char *)"_prelude_client_profile_new", _wrap__prelude_client_profile_new, METH_VARARGS, NULL}, { (char *)"prelude_client_profile_new", _wrap_prelude_client_profile_new, METH_VARARGS, NULL}, { (char *)"prelude_client_profile_ref", _wrap_prelude_client_profile_ref, METH_VARARGS, NULL}, { (char *)"prelude_client_profile_destroy", _wrap_prelude_client_profile_destroy, METH_VARARGS, NULL}, { (char *)"prelude_client_profile_get_config_filename", _wrap_prelude_client_profile_get_config_filename, METH_VARARGS, NULL}, { (char *)"prelude_client_profile_get_default_config_dirname", _wrap_prelude_client_profile_get_default_config_dirname, METH_VARARGS, NULL}, { (char *)"prelude_client_profile_get_analyzerid_filename", _wrap_prelude_client_profile_get_analyzerid_filename, METH_VARARGS, NULL}, { (char *)"prelude_client_profile_get_tls_key_filename", _wrap_prelude_client_profile_get_tls_key_filename, METH_VARARGS, NULL}, { (char *)"prelude_client_profile_get_tls_server_ca_cert_filename", _wrap_prelude_client_profile_get_tls_server_ca_cert_filename, METH_VARARGS, NULL}, { (char *)"prelude_client_profile_get_tls_server_keycert_filename", _wrap_prelude_client_profile_get_tls_server_keycert_filename, METH_VARARGS, NULL}, { (char *)"prelude_client_profile_get_tls_server_crl_filename", _wrap_prelude_client_profile_get_tls_server_crl_filename, METH_VARARGS, NULL}, { (char *)"prelude_client_profile_get_tls_client_keycert_filename", _wrap_prelude_client_profile_get_tls_client_keycert_filename, METH_VARARGS, NULL}, { (char *)"prelude_client_profile_get_tls_client_trusted_cert_filename", _wrap_prelude_client_profile_get_tls_client_trusted_cert_filename, METH_VARARGS, NULL}, { (char *)"prelude_client_profile_get_backup_dirname", _wrap_prelude_client_profile_get_backup_dirname, METH_VARARGS, NULL}, { (char *)"prelude_client_profile_get_profile_dirname", _wrap_prelude_client_profile_get_profile_dirname, METH_VARARGS, NULL}, { (char *)"prelude_client_profile_set_uid", _wrap_prelude_client_profile_set_uid, METH_VARARGS, NULL}, { (char *)"prelude_client_profile_get_uid", _wrap_prelude_client_profile_get_uid, METH_VARARGS, NULL}, { (char *)"prelude_client_profile_set_gid", _wrap_prelude_client_profile_set_gid, METH_VARARGS, NULL}, { (char *)"prelude_client_profile_get_gid", _wrap_prelude_client_profile_get_gid, METH_VARARGS, NULL}, { (char *)"prelude_client_profile_set_name", _wrap_prelude_client_profile_set_name, METH_VARARGS, NULL}, { (char *)"prelude_client_profile_get_name", _wrap_prelude_client_profile_get_name, METH_VARARGS, NULL}, { (char *)"prelude_client_profile_get_analyzerid", _wrap_prelude_client_profile_get_analyzerid, METH_VARARGS, NULL}, { (char *)"prelude_client_profile_set_analyzerid", _wrap_prelude_client_profile_set_analyzerid, METH_VARARGS, NULL}, { (char *)"prelude_client_profile_get_credentials", _wrap_prelude_client_profile_get_credentials, METH_VARARGS, NULL}, { (char *)"prelude_client_profile_set_prefix", _wrap_prelude_client_profile_set_prefix, METH_VARARGS, NULL}, { (char *)"prelude_client_profile_get_prefix", _wrap_prelude_client_profile_get_prefix, METH_VARARGS, NULL}, { (char *)"idmef_additional_data_type_to_numeric", _wrap_idmef_additional_data_type_to_numeric, METH_VARARGS, NULL}, { (char *)"idmef_additional_data_type_to_string", _wrap_idmef_additional_data_type_to_string, METH_VARARGS, NULL}, { (char *)"idmef_additional_data_new", _wrap_idmef_additional_data_new, METH_VARARGS, NULL}, { (char *)"idmef_additional_data_copy", _wrap_idmef_additional_data_copy, METH_VARARGS, NULL}, { (char *)"idmef_additional_data_clone", _wrap_idmef_additional_data_clone, METH_VARARGS, NULL}, { (char *)"idmef_additional_data_compare", _wrap_idmef_additional_data_compare, METH_VARARGS, NULL}, { (char *)"idmef_additional_data_ref", _wrap_idmef_additional_data_ref, METH_VARARGS, NULL}, { (char *)"idmef_additional_data_destroy", _wrap_idmef_additional_data_destroy, METH_VARARGS, NULL}, { (char *)"idmef_additional_data_get_type", _wrap_idmef_additional_data_get_type, METH_VARARGS, NULL}, { (char *)"idmef_additional_data_set_type", _wrap_idmef_additional_data_set_type, METH_VARARGS, NULL}, { (char *)"idmef_additional_data_new_type", _wrap_idmef_additional_data_new_type, METH_VARARGS, NULL}, { (char *)"idmef_additional_data_get_meaning", _wrap_idmef_additional_data_get_meaning, METH_VARARGS, NULL}, { (char *)"idmef_additional_data_set_meaning", _wrap_idmef_additional_data_set_meaning, METH_VARARGS, NULL}, { (char *)"idmef_additional_data_new_meaning", _wrap_idmef_additional_data_new_meaning, METH_VARARGS, NULL}, { (char *)"idmef_additional_data_get_data", _wrap_idmef_additional_data_get_data, METH_VARARGS, NULL}, { (char *)"idmef_additional_data_set_data", _wrap_idmef_additional_data_set_data, METH_VARARGS, NULL}, { (char *)"idmef_additional_data_new_data", _wrap_idmef_additional_data_new_data, METH_VARARGS, NULL}, { (char *)"idmef_reference_origin_to_numeric", _wrap_idmef_reference_origin_to_numeric, METH_VARARGS, NULL}, { (char *)"idmef_reference_origin_to_string", _wrap_idmef_reference_origin_to_string, METH_VARARGS, NULL}, { (char *)"idmef_reference_new", _wrap_idmef_reference_new, METH_VARARGS, NULL}, { (char *)"idmef_reference_copy", _wrap_idmef_reference_copy, METH_VARARGS, NULL}, { (char *)"idmef_reference_clone", _wrap_idmef_reference_clone, METH_VARARGS, NULL}, { (char *)"idmef_reference_compare", _wrap_idmef_reference_compare, METH_VARARGS, NULL}, { (char *)"idmef_reference_ref", _wrap_idmef_reference_ref, METH_VARARGS, NULL}, { (char *)"idmef_reference_destroy", _wrap_idmef_reference_destroy, METH_VARARGS, NULL}, { (char *)"idmef_reference_get_origin", _wrap_idmef_reference_get_origin, METH_VARARGS, NULL}, { (char *)"idmef_reference_set_origin", _wrap_idmef_reference_set_origin, METH_VARARGS, NULL}, { (char *)"idmef_reference_new_origin", _wrap_idmef_reference_new_origin, METH_VARARGS, NULL}, { (char *)"idmef_reference_get_name", _wrap_idmef_reference_get_name, METH_VARARGS, NULL}, { (char *)"idmef_reference_set_name", _wrap_idmef_reference_set_name, METH_VARARGS, NULL}, { (char *)"idmef_reference_new_name", _wrap_idmef_reference_new_name, METH_VARARGS, NULL}, { (char *)"idmef_reference_get_url", _wrap_idmef_reference_get_url, METH_VARARGS, NULL}, { (char *)"idmef_reference_set_url", _wrap_idmef_reference_set_url, METH_VARARGS, NULL}, { (char *)"idmef_reference_new_url", _wrap_idmef_reference_new_url, METH_VARARGS, NULL}, { (char *)"idmef_reference_get_meaning", _wrap_idmef_reference_get_meaning, METH_VARARGS, NULL}, { (char *)"idmef_reference_set_meaning", _wrap_idmef_reference_set_meaning, METH_VARARGS, NULL}, { (char *)"idmef_reference_new_meaning", _wrap_idmef_reference_new_meaning, METH_VARARGS, NULL}, { (char *)"idmef_classification_new", _wrap_idmef_classification_new, METH_VARARGS, NULL}, { (char *)"idmef_classification_copy", _wrap_idmef_classification_copy, METH_VARARGS, NULL}, { (char *)"idmef_classification_clone", _wrap_idmef_classification_clone, METH_VARARGS, NULL}, { (char *)"idmef_classification_compare", _wrap_idmef_classification_compare, METH_VARARGS, NULL}, { (char *)"idmef_classification_ref", _wrap_idmef_classification_ref, METH_VARARGS, NULL}, { (char *)"idmef_classification_destroy", _wrap_idmef_classification_destroy, METH_VARARGS, NULL}, { (char *)"idmef_classification_get_ident", _wrap_idmef_classification_get_ident, METH_VARARGS, NULL}, { (char *)"idmef_classification_set_ident", _wrap_idmef_classification_set_ident, METH_VARARGS, NULL}, { (char *)"idmef_classification_new_ident", _wrap_idmef_classification_new_ident, METH_VARARGS, NULL}, { (char *)"idmef_classification_get_text", _wrap_idmef_classification_get_text, METH_VARARGS, NULL}, { (char *)"idmef_classification_set_text", _wrap_idmef_classification_set_text, METH_VARARGS, NULL}, { (char *)"idmef_classification_new_text", _wrap_idmef_classification_new_text, METH_VARARGS, NULL}, { (char *)"idmef_classification_get_next_reference", _wrap_idmef_classification_get_next_reference, METH_VARARGS, NULL}, { (char *)"idmef_classification_set_reference", _wrap_idmef_classification_set_reference, METH_VARARGS, NULL}, { (char *)"idmef_classification_new_reference", _wrap_idmef_classification_new_reference, METH_VARARGS, NULL}, { (char *)"idmef_user_id_type_to_numeric", _wrap_idmef_user_id_type_to_numeric, METH_VARARGS, NULL}, { (char *)"idmef_user_id_type_to_string", _wrap_idmef_user_id_type_to_string, METH_VARARGS, NULL}, { (char *)"idmef_user_id_new", _wrap_idmef_user_id_new, METH_VARARGS, NULL}, { (char *)"idmef_user_id_copy", _wrap_idmef_user_id_copy, METH_VARARGS, NULL}, { (char *)"idmef_user_id_clone", _wrap_idmef_user_id_clone, METH_VARARGS, NULL}, { (char *)"idmef_user_id_compare", _wrap_idmef_user_id_compare, METH_VARARGS, NULL}, { (char *)"idmef_user_id_ref", _wrap_idmef_user_id_ref, METH_VARARGS, NULL}, { (char *)"idmef_user_id_destroy", _wrap_idmef_user_id_destroy, METH_VARARGS, NULL}, { (char *)"idmef_user_id_get_ident", _wrap_idmef_user_id_get_ident, METH_VARARGS, NULL}, { (char *)"idmef_user_id_set_ident", _wrap_idmef_user_id_set_ident, METH_VARARGS, NULL}, { (char *)"idmef_user_id_new_ident", _wrap_idmef_user_id_new_ident, METH_VARARGS, NULL}, { (char *)"idmef_user_id_get_type", _wrap_idmef_user_id_get_type, METH_VARARGS, NULL}, { (char *)"idmef_user_id_set_type", _wrap_idmef_user_id_set_type, METH_VARARGS, NULL}, { (char *)"idmef_user_id_new_type", _wrap_idmef_user_id_new_type, METH_VARARGS, NULL}, { (char *)"idmef_user_id_get_tty", _wrap_idmef_user_id_get_tty, METH_VARARGS, NULL}, { (char *)"idmef_user_id_set_tty", _wrap_idmef_user_id_set_tty, METH_VARARGS, NULL}, { (char *)"idmef_user_id_new_tty", _wrap_idmef_user_id_new_tty, METH_VARARGS, NULL}, { (char *)"idmef_user_id_get_name", _wrap_idmef_user_id_get_name, METH_VARARGS, NULL}, { (char *)"idmef_user_id_set_name", _wrap_idmef_user_id_set_name, METH_VARARGS, NULL}, { (char *)"idmef_user_id_new_name", _wrap_idmef_user_id_new_name, METH_VARARGS, NULL}, { (char *)"idmef_user_id_unset_number", _wrap_idmef_user_id_unset_number, METH_VARARGS, NULL}, { (char *)"idmef_user_id_get_number", _wrap_idmef_user_id_get_number, METH_VARARGS, NULL}, { (char *)"idmef_user_id_set_number", _wrap_idmef_user_id_set_number, METH_VARARGS, NULL}, { (char *)"idmef_user_id_new_number", _wrap_idmef_user_id_new_number, METH_VARARGS, NULL}, { (char *)"idmef_user_category_to_numeric", _wrap_idmef_user_category_to_numeric, METH_VARARGS, NULL}, { (char *)"idmef_user_category_to_string", _wrap_idmef_user_category_to_string, METH_VARARGS, NULL}, { (char *)"idmef_user_new", _wrap_idmef_user_new, METH_VARARGS, NULL}, { (char *)"idmef_user_copy", _wrap_idmef_user_copy, METH_VARARGS, NULL}, { (char *)"idmef_user_clone", _wrap_idmef_user_clone, METH_VARARGS, NULL}, { (char *)"idmef_user_compare", _wrap_idmef_user_compare, METH_VARARGS, NULL}, { (char *)"idmef_user_ref", _wrap_idmef_user_ref, METH_VARARGS, NULL}, { (char *)"idmef_user_destroy", _wrap_idmef_user_destroy, METH_VARARGS, NULL}, { (char *)"idmef_user_get_ident", _wrap_idmef_user_get_ident, METH_VARARGS, NULL}, { (char *)"idmef_user_set_ident", _wrap_idmef_user_set_ident, METH_VARARGS, NULL}, { (char *)"idmef_user_new_ident", _wrap_idmef_user_new_ident, METH_VARARGS, NULL}, { (char *)"idmef_user_get_category", _wrap_idmef_user_get_category, METH_VARARGS, NULL}, { (char *)"idmef_user_set_category", _wrap_idmef_user_set_category, METH_VARARGS, NULL}, { (char *)"idmef_user_new_category", _wrap_idmef_user_new_category, METH_VARARGS, NULL}, { (char *)"idmef_user_get_next_user_id", _wrap_idmef_user_get_next_user_id, METH_VARARGS, NULL}, { (char *)"idmef_user_set_user_id", _wrap_idmef_user_set_user_id, METH_VARARGS, NULL}, { (char *)"idmef_user_new_user_id", _wrap_idmef_user_new_user_id, METH_VARARGS, NULL}, { (char *)"idmef_address_category_to_numeric", _wrap_idmef_address_category_to_numeric, METH_VARARGS, NULL}, { (char *)"idmef_address_category_to_string", _wrap_idmef_address_category_to_string, METH_VARARGS, NULL}, { (char *)"idmef_address_new", _wrap_idmef_address_new, METH_VARARGS, NULL}, { (char *)"idmef_address_copy", _wrap_idmef_address_copy, METH_VARARGS, NULL}, { (char *)"idmef_address_clone", _wrap_idmef_address_clone, METH_VARARGS, NULL}, { (char *)"idmef_address_compare", _wrap_idmef_address_compare, METH_VARARGS, NULL}, { (char *)"idmef_address_ref", _wrap_idmef_address_ref, METH_VARARGS, NULL}, { (char *)"idmef_address_destroy", _wrap_idmef_address_destroy, METH_VARARGS, NULL}, { (char *)"idmef_address_get_ident", _wrap_idmef_address_get_ident, METH_VARARGS, NULL}, { (char *)"idmef_address_set_ident", _wrap_idmef_address_set_ident, METH_VARARGS, NULL}, { (char *)"idmef_address_new_ident", _wrap_idmef_address_new_ident, METH_VARARGS, NULL}, { (char *)"idmef_address_get_category", _wrap_idmef_address_get_category, METH_VARARGS, NULL}, { (char *)"idmef_address_set_category", _wrap_idmef_address_set_category, METH_VARARGS, NULL}, { (char *)"idmef_address_new_category", _wrap_idmef_address_new_category, METH_VARARGS, NULL}, { (char *)"idmef_address_get_vlan_name", _wrap_idmef_address_get_vlan_name, METH_VARARGS, NULL}, { (char *)"idmef_address_set_vlan_name", _wrap_idmef_address_set_vlan_name, METH_VARARGS, NULL}, { (char *)"idmef_address_new_vlan_name", _wrap_idmef_address_new_vlan_name, METH_VARARGS, NULL}, { (char *)"idmef_address_unset_vlan_num", _wrap_idmef_address_unset_vlan_num, METH_VARARGS, NULL}, { (char *)"idmef_address_get_vlan_num", _wrap_idmef_address_get_vlan_num, METH_VARARGS, NULL}, { (char *)"idmef_address_set_vlan_num", _wrap_idmef_address_set_vlan_num, METH_VARARGS, NULL}, { (char *)"idmef_address_new_vlan_num", _wrap_idmef_address_new_vlan_num, METH_VARARGS, NULL}, { (char *)"idmef_address_get_address", _wrap_idmef_address_get_address, METH_VARARGS, NULL}, { (char *)"idmef_address_set_address", _wrap_idmef_address_set_address, METH_VARARGS, NULL}, { (char *)"idmef_address_new_address", _wrap_idmef_address_new_address, METH_VARARGS, NULL}, { (char *)"idmef_address_get_netmask", _wrap_idmef_address_get_netmask, METH_VARARGS, NULL}, { (char *)"idmef_address_set_netmask", _wrap_idmef_address_set_netmask, METH_VARARGS, NULL}, { (char *)"idmef_address_new_netmask", _wrap_idmef_address_new_netmask, METH_VARARGS, NULL}, { (char *)"idmef_process_new", _wrap_idmef_process_new, METH_VARARGS, NULL}, { (char *)"idmef_process_copy", _wrap_idmef_process_copy, METH_VARARGS, NULL}, { (char *)"idmef_process_clone", _wrap_idmef_process_clone, METH_VARARGS, NULL}, { (char *)"idmef_process_compare", _wrap_idmef_process_compare, METH_VARARGS, NULL}, { (char *)"idmef_process_ref", _wrap_idmef_process_ref, METH_VARARGS, NULL}, { (char *)"idmef_process_destroy", _wrap_idmef_process_destroy, METH_VARARGS, NULL}, { (char *)"idmef_process_get_ident", _wrap_idmef_process_get_ident, METH_VARARGS, NULL}, { (char *)"idmef_process_set_ident", _wrap_idmef_process_set_ident, METH_VARARGS, NULL}, { (char *)"idmef_process_new_ident", _wrap_idmef_process_new_ident, METH_VARARGS, NULL}, { (char *)"idmef_process_get_name", _wrap_idmef_process_get_name, METH_VARARGS, NULL}, { (char *)"idmef_process_set_name", _wrap_idmef_process_set_name, METH_VARARGS, NULL}, { (char *)"idmef_process_new_name", _wrap_idmef_process_new_name, METH_VARARGS, NULL}, { (char *)"idmef_process_unset_pid", _wrap_idmef_process_unset_pid, METH_VARARGS, NULL}, { (char *)"idmef_process_get_pid", _wrap_idmef_process_get_pid, METH_VARARGS, NULL}, { (char *)"idmef_process_set_pid", _wrap_idmef_process_set_pid, METH_VARARGS, NULL}, { (char *)"idmef_process_new_pid", _wrap_idmef_process_new_pid, METH_VARARGS, NULL}, { (char *)"idmef_process_get_path", _wrap_idmef_process_get_path, METH_VARARGS, NULL}, { (char *)"idmef_process_set_path", _wrap_idmef_process_set_path, METH_VARARGS, NULL}, { (char *)"idmef_process_new_path", _wrap_idmef_process_new_path, METH_VARARGS, NULL}, { (char *)"idmef_process_get_next_arg", _wrap_idmef_process_get_next_arg, METH_VARARGS, NULL}, { (char *)"idmef_process_set_arg", _wrap_idmef_process_set_arg, METH_VARARGS, NULL}, { (char *)"idmef_process_new_arg", _wrap_idmef_process_new_arg, METH_VARARGS, NULL}, { (char *)"idmef_process_get_next_env", _wrap_idmef_process_get_next_env, METH_VARARGS, NULL}, { (char *)"idmef_process_set_env", _wrap_idmef_process_set_env, METH_VARARGS, NULL}, { (char *)"idmef_process_new_env", _wrap_idmef_process_new_env, METH_VARARGS, NULL}, { (char *)"idmef_web_service_new", _wrap_idmef_web_service_new, METH_VARARGS, NULL}, { (char *)"idmef_web_service_copy", _wrap_idmef_web_service_copy, METH_VARARGS, NULL}, { (char *)"idmef_web_service_clone", _wrap_idmef_web_service_clone, METH_VARARGS, NULL}, { (char *)"idmef_web_service_compare", _wrap_idmef_web_service_compare, METH_VARARGS, NULL}, { (char *)"idmef_web_service_ref", _wrap_idmef_web_service_ref, METH_VARARGS, NULL}, { (char *)"idmef_web_service_destroy", _wrap_idmef_web_service_destroy, METH_VARARGS, NULL}, { (char *)"idmef_web_service_get_url", _wrap_idmef_web_service_get_url, METH_VARARGS, NULL}, { (char *)"idmef_web_service_set_url", _wrap_idmef_web_service_set_url, METH_VARARGS, NULL}, { (char *)"idmef_web_service_new_url", _wrap_idmef_web_service_new_url, METH_VARARGS, NULL}, { (char *)"idmef_web_service_get_cgi", _wrap_idmef_web_service_get_cgi, METH_VARARGS, NULL}, { (char *)"idmef_web_service_set_cgi", _wrap_idmef_web_service_set_cgi, METH_VARARGS, NULL}, { (char *)"idmef_web_service_new_cgi", _wrap_idmef_web_service_new_cgi, METH_VARARGS, NULL}, { (char *)"idmef_web_service_get_http_method", _wrap_idmef_web_service_get_http_method, METH_VARARGS, NULL}, { (char *)"idmef_web_service_set_http_method", _wrap_idmef_web_service_set_http_method, METH_VARARGS, NULL}, { (char *)"idmef_web_service_new_http_method", _wrap_idmef_web_service_new_http_method, METH_VARARGS, NULL}, { (char *)"idmef_web_service_get_next_arg", _wrap_idmef_web_service_get_next_arg, METH_VARARGS, NULL}, { (char *)"idmef_web_service_set_arg", _wrap_idmef_web_service_set_arg, METH_VARARGS, NULL}, { (char *)"idmef_web_service_new_arg", _wrap_idmef_web_service_new_arg, METH_VARARGS, NULL}, { (char *)"idmef_snmp_service_new", _wrap_idmef_snmp_service_new, METH_VARARGS, NULL}, { (char *)"idmef_snmp_service_copy", _wrap_idmef_snmp_service_copy, METH_VARARGS, NULL}, { (char *)"idmef_snmp_service_clone", _wrap_idmef_snmp_service_clone, METH_VARARGS, NULL}, { (char *)"idmef_snmp_service_compare", _wrap_idmef_snmp_service_compare, METH_VARARGS, NULL}, { (char *)"idmef_snmp_service_ref", _wrap_idmef_snmp_service_ref, METH_VARARGS, NULL}, { (char *)"idmef_snmp_service_destroy", _wrap_idmef_snmp_service_destroy, METH_VARARGS, NULL}, { (char *)"idmef_snmp_service_get_oid", _wrap_idmef_snmp_service_get_oid, METH_VARARGS, NULL}, { (char *)"idmef_snmp_service_set_oid", _wrap_idmef_snmp_service_set_oid, METH_VARARGS, NULL}, { (char *)"idmef_snmp_service_new_oid", _wrap_idmef_snmp_service_new_oid, METH_VARARGS, NULL}, { (char *)"idmef_snmp_service_unset_message_processing_model", _wrap_idmef_snmp_service_unset_message_processing_model, METH_VARARGS, NULL}, { (char *)"idmef_snmp_service_get_message_processing_model", _wrap_idmef_snmp_service_get_message_processing_model, METH_VARARGS, NULL}, { (char *)"idmef_snmp_service_set_message_processing_model", _wrap_idmef_snmp_service_set_message_processing_model, METH_VARARGS, NULL}, { (char *)"idmef_snmp_service_new_message_processing_model", _wrap_idmef_snmp_service_new_message_processing_model, METH_VARARGS, NULL}, { (char *)"idmef_snmp_service_unset_security_model", _wrap_idmef_snmp_service_unset_security_model, METH_VARARGS, NULL}, { (char *)"idmef_snmp_service_get_security_model", _wrap_idmef_snmp_service_get_security_model, METH_VARARGS, NULL}, { (char *)"idmef_snmp_service_set_security_model", _wrap_idmef_snmp_service_set_security_model, METH_VARARGS, NULL}, { (char *)"idmef_snmp_service_new_security_model", _wrap_idmef_snmp_service_new_security_model, METH_VARARGS, NULL}, { (char *)"idmef_snmp_service_get_security_name", _wrap_idmef_snmp_service_get_security_name, METH_VARARGS, NULL}, { (char *)"idmef_snmp_service_set_security_name", _wrap_idmef_snmp_service_set_security_name, METH_VARARGS, NULL}, { (char *)"idmef_snmp_service_new_security_name", _wrap_idmef_snmp_service_new_security_name, METH_VARARGS, NULL}, { (char *)"idmef_snmp_service_unset_security_level", _wrap_idmef_snmp_service_unset_security_level, METH_VARARGS, NULL}, { (char *)"idmef_snmp_service_get_security_level", _wrap_idmef_snmp_service_get_security_level, METH_VARARGS, NULL}, { (char *)"idmef_snmp_service_set_security_level", _wrap_idmef_snmp_service_set_security_level, METH_VARARGS, NULL}, { (char *)"idmef_snmp_service_new_security_level", _wrap_idmef_snmp_service_new_security_level, METH_VARARGS, NULL}, { (char *)"idmef_snmp_service_get_context_name", _wrap_idmef_snmp_service_get_context_name, METH_VARARGS, NULL}, { (char *)"idmef_snmp_service_set_context_name", _wrap_idmef_snmp_service_set_context_name, METH_VARARGS, NULL}, { (char *)"idmef_snmp_service_new_context_name", _wrap_idmef_snmp_service_new_context_name, METH_VARARGS, NULL}, { (char *)"idmef_snmp_service_get_context_engine_id", _wrap_idmef_snmp_service_get_context_engine_id, METH_VARARGS, NULL}, { (char *)"idmef_snmp_service_set_context_engine_id", _wrap_idmef_snmp_service_set_context_engine_id, METH_VARARGS, NULL}, { (char *)"idmef_snmp_service_new_context_engine_id", _wrap_idmef_snmp_service_new_context_engine_id, METH_VARARGS, NULL}, { (char *)"idmef_snmp_service_get_command", _wrap_idmef_snmp_service_get_command, METH_VARARGS, NULL}, { (char *)"idmef_snmp_service_set_command", _wrap_idmef_snmp_service_set_command, METH_VARARGS, NULL}, { (char *)"idmef_snmp_service_new_command", _wrap_idmef_snmp_service_new_command, METH_VARARGS, NULL}, { (char *)"idmef_snmp_service_get_community", _wrap_idmef_snmp_service_get_community, METH_VARARGS, NULL}, { (char *)"idmef_snmp_service_set_community", _wrap_idmef_snmp_service_set_community, METH_VARARGS, NULL}, { (char *)"idmef_snmp_service_new_community", _wrap_idmef_snmp_service_new_community, METH_VARARGS, NULL}, { (char *)"idmef_service_type_to_numeric", _wrap_idmef_service_type_to_numeric, METH_VARARGS, NULL}, { (char *)"idmef_service_type_to_string", _wrap_idmef_service_type_to_string, METH_VARARGS, NULL}, { (char *)"idmef_service_new", _wrap_idmef_service_new, METH_VARARGS, NULL}, { (char *)"idmef_service_copy", _wrap_idmef_service_copy, METH_VARARGS, NULL}, { (char *)"idmef_service_clone", _wrap_idmef_service_clone, METH_VARARGS, NULL}, { (char *)"idmef_service_compare", _wrap_idmef_service_compare, METH_VARARGS, NULL}, { (char *)"idmef_service_ref", _wrap_idmef_service_ref, METH_VARARGS, NULL}, { (char *)"idmef_service_destroy", _wrap_idmef_service_destroy, METH_VARARGS, NULL}, { (char *)"idmef_service_get_ident", _wrap_idmef_service_get_ident, METH_VARARGS, NULL}, { (char *)"idmef_service_set_ident", _wrap_idmef_service_set_ident, METH_VARARGS, NULL}, { (char *)"idmef_service_new_ident", _wrap_idmef_service_new_ident, METH_VARARGS, NULL}, { (char *)"idmef_service_unset_ip_version", _wrap_idmef_service_unset_ip_version, METH_VARARGS, NULL}, { (char *)"idmef_service_get_ip_version", _wrap_idmef_service_get_ip_version, METH_VARARGS, NULL}, { (char *)"idmef_service_set_ip_version", _wrap_idmef_service_set_ip_version, METH_VARARGS, NULL}, { (char *)"idmef_service_new_ip_version", _wrap_idmef_service_new_ip_version, METH_VARARGS, NULL}, { (char *)"idmef_service_unset_iana_protocol_number", _wrap_idmef_service_unset_iana_protocol_number, METH_VARARGS, NULL}, { (char *)"idmef_service_get_iana_protocol_number", _wrap_idmef_service_get_iana_protocol_number, METH_VARARGS, NULL}, { (char *)"idmef_service_set_iana_protocol_number", _wrap_idmef_service_set_iana_protocol_number, METH_VARARGS, NULL}, { (char *)"idmef_service_new_iana_protocol_number", _wrap_idmef_service_new_iana_protocol_number, METH_VARARGS, NULL}, { (char *)"idmef_service_get_iana_protocol_name", _wrap_idmef_service_get_iana_protocol_name, METH_VARARGS, NULL}, { (char *)"idmef_service_set_iana_protocol_name", _wrap_idmef_service_set_iana_protocol_name, METH_VARARGS, NULL}, { (char *)"idmef_service_new_iana_protocol_name", _wrap_idmef_service_new_iana_protocol_name, METH_VARARGS, NULL}, { (char *)"idmef_service_get_name", _wrap_idmef_service_get_name, METH_VARARGS, NULL}, { (char *)"idmef_service_set_name", _wrap_idmef_service_set_name, METH_VARARGS, NULL}, { (char *)"idmef_service_new_name", _wrap_idmef_service_new_name, METH_VARARGS, NULL}, { (char *)"idmef_service_unset_port", _wrap_idmef_service_unset_port, METH_VARARGS, NULL}, { (char *)"idmef_service_get_port", _wrap_idmef_service_get_port, METH_VARARGS, NULL}, { (char *)"idmef_service_set_port", _wrap_idmef_service_set_port, METH_VARARGS, NULL}, { (char *)"idmef_service_new_port", _wrap_idmef_service_new_port, METH_VARARGS, NULL}, { (char *)"idmef_service_get_portlist", _wrap_idmef_service_get_portlist, METH_VARARGS, NULL}, { (char *)"idmef_service_set_portlist", _wrap_idmef_service_set_portlist, METH_VARARGS, NULL}, { (char *)"idmef_service_new_portlist", _wrap_idmef_service_new_portlist, METH_VARARGS, NULL}, { (char *)"idmef_service_get_protocol", _wrap_idmef_service_get_protocol, METH_VARARGS, NULL}, { (char *)"idmef_service_set_protocol", _wrap_idmef_service_set_protocol, METH_VARARGS, NULL}, { (char *)"idmef_service_new_protocol", _wrap_idmef_service_new_protocol, METH_VARARGS, NULL}, { (char *)"idmef_service_get_type", _wrap_idmef_service_get_type, METH_VARARGS, NULL}, { (char *)"idmef_service_get_web_service", _wrap_idmef_service_get_web_service, METH_VARARGS, NULL}, { (char *)"idmef_service_set_web_service", _wrap_idmef_service_set_web_service, METH_VARARGS, NULL}, { (char *)"idmef_service_new_web_service", _wrap_idmef_service_new_web_service, METH_VARARGS, NULL}, { (char *)"idmef_service_get_snmp_service", _wrap_idmef_service_get_snmp_service, METH_VARARGS, NULL}, { (char *)"idmef_service_set_snmp_service", _wrap_idmef_service_set_snmp_service, METH_VARARGS, NULL}, { (char *)"idmef_service_new_snmp_service", _wrap_idmef_service_new_snmp_service, METH_VARARGS, NULL}, { (char *)"idmef_node_category_to_numeric", _wrap_idmef_node_category_to_numeric, METH_VARARGS, NULL}, { (char *)"idmef_node_category_to_string", _wrap_idmef_node_category_to_string, METH_VARARGS, NULL}, { (char *)"idmef_node_new", _wrap_idmef_node_new, METH_VARARGS, NULL}, { (char *)"idmef_node_copy", _wrap_idmef_node_copy, METH_VARARGS, NULL}, { (char *)"idmef_node_clone", _wrap_idmef_node_clone, METH_VARARGS, NULL}, { (char *)"idmef_node_compare", _wrap_idmef_node_compare, METH_VARARGS, NULL}, { (char *)"idmef_node_ref", _wrap_idmef_node_ref, METH_VARARGS, NULL}, { (char *)"idmef_node_destroy", _wrap_idmef_node_destroy, METH_VARARGS, NULL}, { (char *)"idmef_node_get_ident", _wrap_idmef_node_get_ident, METH_VARARGS, NULL}, { (char *)"idmef_node_set_ident", _wrap_idmef_node_set_ident, METH_VARARGS, NULL}, { (char *)"idmef_node_new_ident", _wrap_idmef_node_new_ident, METH_VARARGS, NULL}, { (char *)"idmef_node_get_category", _wrap_idmef_node_get_category, METH_VARARGS, NULL}, { (char *)"idmef_node_set_category", _wrap_idmef_node_set_category, METH_VARARGS, NULL}, { (char *)"idmef_node_new_category", _wrap_idmef_node_new_category, METH_VARARGS, NULL}, { (char *)"idmef_node_get_location", _wrap_idmef_node_get_location, METH_VARARGS, NULL}, { (char *)"idmef_node_set_location", _wrap_idmef_node_set_location, METH_VARARGS, NULL}, { (char *)"idmef_node_new_location", _wrap_idmef_node_new_location, METH_VARARGS, NULL}, { (char *)"idmef_node_get_name", _wrap_idmef_node_get_name, METH_VARARGS, NULL}, { (char *)"idmef_node_set_name", _wrap_idmef_node_set_name, METH_VARARGS, NULL}, { (char *)"idmef_node_new_name", _wrap_idmef_node_new_name, METH_VARARGS, NULL}, { (char *)"idmef_node_get_next_address", _wrap_idmef_node_get_next_address, METH_VARARGS, NULL}, { (char *)"idmef_node_set_address", _wrap_idmef_node_set_address, METH_VARARGS, NULL}, { (char *)"idmef_node_new_address", _wrap_idmef_node_new_address, METH_VARARGS, NULL}, { (char *)"idmef_source_spoofed_to_numeric", _wrap_idmef_source_spoofed_to_numeric, METH_VARARGS, NULL}, { (char *)"idmef_source_spoofed_to_string", _wrap_idmef_source_spoofed_to_string, METH_VARARGS, NULL}, { (char *)"idmef_source_new", _wrap_idmef_source_new, METH_VARARGS, NULL}, { (char *)"idmef_source_copy", _wrap_idmef_source_copy, METH_VARARGS, NULL}, { (char *)"idmef_source_clone", _wrap_idmef_source_clone, METH_VARARGS, NULL}, { (char *)"idmef_source_compare", _wrap_idmef_source_compare, METH_VARARGS, NULL}, { (char *)"idmef_source_ref", _wrap_idmef_source_ref, METH_VARARGS, NULL}, { (char *)"idmef_source_destroy", _wrap_idmef_source_destroy, METH_VARARGS, NULL}, { (char *)"idmef_source_get_ident", _wrap_idmef_source_get_ident, METH_VARARGS, NULL}, { (char *)"idmef_source_set_ident", _wrap_idmef_source_set_ident, METH_VARARGS, NULL}, { (char *)"idmef_source_new_ident", _wrap_idmef_source_new_ident, METH_VARARGS, NULL}, { (char *)"idmef_source_get_spoofed", _wrap_idmef_source_get_spoofed, METH_VARARGS, NULL}, { (char *)"idmef_source_set_spoofed", _wrap_idmef_source_set_spoofed, METH_VARARGS, NULL}, { (char *)"idmef_source_new_spoofed", _wrap_idmef_source_new_spoofed, METH_VARARGS, NULL}, { (char *)"idmef_source_get_interface", _wrap_idmef_source_get_interface, METH_VARARGS, NULL}, { (char *)"idmef_source_set_interface", _wrap_idmef_source_set_interface, METH_VARARGS, NULL}, { (char *)"idmef_source_new_interface", _wrap_idmef_source_new_interface, METH_VARARGS, NULL}, { (char *)"idmef_source_get_node", _wrap_idmef_source_get_node, METH_VARARGS, NULL}, { (char *)"idmef_source_set_node", _wrap_idmef_source_set_node, METH_VARARGS, NULL}, { (char *)"idmef_source_new_node", _wrap_idmef_source_new_node, METH_VARARGS, NULL}, { (char *)"idmef_source_get_user", _wrap_idmef_source_get_user, METH_VARARGS, NULL}, { (char *)"idmef_source_set_user", _wrap_idmef_source_set_user, METH_VARARGS, NULL}, { (char *)"idmef_source_new_user", _wrap_idmef_source_new_user, METH_VARARGS, NULL}, { (char *)"idmef_source_get_process", _wrap_idmef_source_get_process, METH_VARARGS, NULL}, { (char *)"idmef_source_set_process", _wrap_idmef_source_set_process, METH_VARARGS, NULL}, { (char *)"idmef_source_new_process", _wrap_idmef_source_new_process, METH_VARARGS, NULL}, { (char *)"idmef_source_get_service", _wrap_idmef_source_get_service, METH_VARARGS, NULL}, { (char *)"idmef_source_set_service", _wrap_idmef_source_set_service, METH_VARARGS, NULL}, { (char *)"idmef_source_new_service", _wrap_idmef_source_new_service, METH_VARARGS, NULL}, { (char *)"idmef_file_access_new", _wrap_idmef_file_access_new, METH_VARARGS, NULL}, { (char *)"idmef_file_access_copy", _wrap_idmef_file_access_copy, METH_VARARGS, NULL}, { (char *)"idmef_file_access_clone", _wrap_idmef_file_access_clone, METH_VARARGS, NULL}, { (char *)"idmef_file_access_compare", _wrap_idmef_file_access_compare, METH_VARARGS, NULL}, { (char *)"idmef_file_access_ref", _wrap_idmef_file_access_ref, METH_VARARGS, NULL}, { (char *)"idmef_file_access_destroy", _wrap_idmef_file_access_destroy, METH_VARARGS, NULL}, { (char *)"idmef_file_access_get_user_id", _wrap_idmef_file_access_get_user_id, METH_VARARGS, NULL}, { (char *)"idmef_file_access_set_user_id", _wrap_idmef_file_access_set_user_id, METH_VARARGS, NULL}, { (char *)"idmef_file_access_new_user_id", _wrap_idmef_file_access_new_user_id, METH_VARARGS, NULL}, { (char *)"idmef_file_access_get_next_permission", _wrap_idmef_file_access_get_next_permission, METH_VARARGS, NULL}, { (char *)"idmef_file_access_set_permission", _wrap_idmef_file_access_set_permission, METH_VARARGS, NULL}, { (char *)"idmef_file_access_new_permission", _wrap_idmef_file_access_new_permission, METH_VARARGS, NULL}, { (char *)"idmef_inode_new", _wrap_idmef_inode_new, METH_VARARGS, NULL}, { (char *)"idmef_inode_copy", _wrap_idmef_inode_copy, METH_VARARGS, NULL}, { (char *)"idmef_inode_clone", _wrap_idmef_inode_clone, METH_VARARGS, NULL}, { (char *)"idmef_inode_compare", _wrap_idmef_inode_compare, METH_VARARGS, NULL}, { (char *)"idmef_inode_ref", _wrap_idmef_inode_ref, METH_VARARGS, NULL}, { (char *)"idmef_inode_destroy", _wrap_idmef_inode_destroy, METH_VARARGS, NULL}, { (char *)"idmef_inode_get_change_time", _wrap_idmef_inode_get_change_time, METH_VARARGS, NULL}, { (char *)"idmef_inode_set_change_time", _wrap_idmef_inode_set_change_time, METH_VARARGS, NULL}, { (char *)"idmef_inode_new_change_time", _wrap_idmef_inode_new_change_time, METH_VARARGS, NULL}, { (char *)"idmef_inode_unset_number", _wrap_idmef_inode_unset_number, METH_VARARGS, NULL}, { (char *)"idmef_inode_get_number", _wrap_idmef_inode_get_number, METH_VARARGS, NULL}, { (char *)"idmef_inode_set_number", _wrap_idmef_inode_set_number, METH_VARARGS, NULL}, { (char *)"idmef_inode_new_number", _wrap_idmef_inode_new_number, METH_VARARGS, NULL}, { (char *)"idmef_inode_unset_major_device", _wrap_idmef_inode_unset_major_device, METH_VARARGS, NULL}, { (char *)"idmef_inode_get_major_device", _wrap_idmef_inode_get_major_device, METH_VARARGS, NULL}, { (char *)"idmef_inode_set_major_device", _wrap_idmef_inode_set_major_device, METH_VARARGS, NULL}, { (char *)"idmef_inode_new_major_device", _wrap_idmef_inode_new_major_device, METH_VARARGS, NULL}, { (char *)"idmef_inode_unset_minor_device", _wrap_idmef_inode_unset_minor_device, METH_VARARGS, NULL}, { (char *)"idmef_inode_get_minor_device", _wrap_idmef_inode_get_minor_device, METH_VARARGS, NULL}, { (char *)"idmef_inode_set_minor_device", _wrap_idmef_inode_set_minor_device, METH_VARARGS, NULL}, { (char *)"idmef_inode_new_minor_device", _wrap_idmef_inode_new_minor_device, METH_VARARGS, NULL}, { (char *)"idmef_inode_unset_c_major_device", _wrap_idmef_inode_unset_c_major_device, METH_VARARGS, NULL}, { (char *)"idmef_inode_get_c_major_device", _wrap_idmef_inode_get_c_major_device, METH_VARARGS, NULL}, { (char *)"idmef_inode_set_c_major_device", _wrap_idmef_inode_set_c_major_device, METH_VARARGS, NULL}, { (char *)"idmef_inode_new_c_major_device", _wrap_idmef_inode_new_c_major_device, METH_VARARGS, NULL}, { (char *)"idmef_inode_unset_c_minor_device", _wrap_idmef_inode_unset_c_minor_device, METH_VARARGS, NULL}, { (char *)"idmef_inode_get_c_minor_device", _wrap_idmef_inode_get_c_minor_device, METH_VARARGS, NULL}, { (char *)"idmef_inode_set_c_minor_device", _wrap_idmef_inode_set_c_minor_device, METH_VARARGS, NULL}, { (char *)"idmef_inode_new_c_minor_device", _wrap_idmef_inode_new_c_minor_device, METH_VARARGS, NULL}, { (char *)"idmef_checksum_algorithm_to_numeric", _wrap_idmef_checksum_algorithm_to_numeric, METH_VARARGS, NULL}, { (char *)"idmef_checksum_algorithm_to_string", _wrap_idmef_checksum_algorithm_to_string, METH_VARARGS, NULL}, { (char *)"idmef_checksum_new", _wrap_idmef_checksum_new, METH_VARARGS, NULL}, { (char *)"idmef_checksum_copy", _wrap_idmef_checksum_copy, METH_VARARGS, NULL}, { (char *)"idmef_checksum_clone", _wrap_idmef_checksum_clone, METH_VARARGS, NULL}, { (char *)"idmef_checksum_compare", _wrap_idmef_checksum_compare, METH_VARARGS, NULL}, { (char *)"idmef_checksum_ref", _wrap_idmef_checksum_ref, METH_VARARGS, NULL}, { (char *)"idmef_checksum_destroy", _wrap_idmef_checksum_destroy, METH_VARARGS, NULL}, { (char *)"idmef_checksum_get_value", _wrap_idmef_checksum_get_value, METH_VARARGS, NULL}, { (char *)"idmef_checksum_set_value", _wrap_idmef_checksum_set_value, METH_VARARGS, NULL}, { (char *)"idmef_checksum_new_value", _wrap_idmef_checksum_new_value, METH_VARARGS, NULL}, { (char *)"idmef_checksum_get_key", _wrap_idmef_checksum_get_key, METH_VARARGS, NULL}, { (char *)"idmef_checksum_set_key", _wrap_idmef_checksum_set_key, METH_VARARGS, NULL}, { (char *)"idmef_checksum_new_key", _wrap_idmef_checksum_new_key, METH_VARARGS, NULL}, { (char *)"idmef_checksum_get_algorithm", _wrap_idmef_checksum_get_algorithm, METH_VARARGS, NULL}, { (char *)"idmef_checksum_set_algorithm", _wrap_idmef_checksum_set_algorithm, METH_VARARGS, NULL}, { (char *)"idmef_checksum_new_algorithm", _wrap_idmef_checksum_new_algorithm, METH_VARARGS, NULL}, { (char *)"idmef_file_category_to_numeric", _wrap_idmef_file_category_to_numeric, METH_VARARGS, NULL}, { (char *)"idmef_file_category_to_string", _wrap_idmef_file_category_to_string, METH_VARARGS, NULL}, { (char *)"idmef_file_fstype_to_numeric", _wrap_idmef_file_fstype_to_numeric, METH_VARARGS, NULL}, { (char *)"idmef_file_fstype_to_string", _wrap_idmef_file_fstype_to_string, METH_VARARGS, NULL}, { (char *)"idmef_file_new", _wrap_idmef_file_new, METH_VARARGS, NULL}, { (char *)"idmef_file_copy", _wrap_idmef_file_copy, METH_VARARGS, NULL}, { (char *)"idmef_file_clone", _wrap_idmef_file_clone, METH_VARARGS, NULL}, { (char *)"idmef_file_compare", _wrap_idmef_file_compare, METH_VARARGS, NULL}, { (char *)"idmef_file_ref", _wrap_idmef_file_ref, METH_VARARGS, NULL}, { (char *)"idmef_file_destroy", _wrap_idmef_file_destroy, METH_VARARGS, NULL}, { (char *)"idmef_file_get_ident", _wrap_idmef_file_get_ident, METH_VARARGS, NULL}, { (char *)"idmef_file_set_ident", _wrap_idmef_file_set_ident, METH_VARARGS, NULL}, { (char *)"idmef_file_new_ident", _wrap_idmef_file_new_ident, METH_VARARGS, NULL}, { (char *)"idmef_file_get_name", _wrap_idmef_file_get_name, METH_VARARGS, NULL}, { (char *)"idmef_file_set_name", _wrap_idmef_file_set_name, METH_VARARGS, NULL}, { (char *)"idmef_file_new_name", _wrap_idmef_file_new_name, METH_VARARGS, NULL}, { (char *)"idmef_file_get_path", _wrap_idmef_file_get_path, METH_VARARGS, NULL}, { (char *)"idmef_file_set_path", _wrap_idmef_file_set_path, METH_VARARGS, NULL}, { (char *)"idmef_file_new_path", _wrap_idmef_file_new_path, METH_VARARGS, NULL}, { (char *)"idmef_file_get_create_time", _wrap_idmef_file_get_create_time, METH_VARARGS, NULL}, { (char *)"idmef_file_set_create_time", _wrap_idmef_file_set_create_time, METH_VARARGS, NULL}, { (char *)"idmef_file_new_create_time", _wrap_idmef_file_new_create_time, METH_VARARGS, NULL}, { (char *)"idmef_file_get_modify_time", _wrap_idmef_file_get_modify_time, METH_VARARGS, NULL}, { (char *)"idmef_file_set_modify_time", _wrap_idmef_file_set_modify_time, METH_VARARGS, NULL}, { (char *)"idmef_file_new_modify_time", _wrap_idmef_file_new_modify_time, METH_VARARGS, NULL}, { (char *)"idmef_file_get_access_time", _wrap_idmef_file_get_access_time, METH_VARARGS, NULL}, { (char *)"idmef_file_set_access_time", _wrap_idmef_file_set_access_time, METH_VARARGS, NULL}, { (char *)"idmef_file_new_access_time", _wrap_idmef_file_new_access_time, METH_VARARGS, NULL}, { (char *)"idmef_file_unset_data_size", _wrap_idmef_file_unset_data_size, METH_VARARGS, NULL}, { (char *)"idmef_file_get_data_size", _wrap_idmef_file_get_data_size, METH_VARARGS, NULL}, { (char *)"idmef_file_set_data_size", _wrap_idmef_file_set_data_size, METH_VARARGS, NULL}, { (char *)"idmef_file_new_data_size", _wrap_idmef_file_new_data_size, METH_VARARGS, NULL}, { (char *)"idmef_file_unset_disk_size", _wrap_idmef_file_unset_disk_size, METH_VARARGS, NULL}, { (char *)"idmef_file_get_disk_size", _wrap_idmef_file_get_disk_size, METH_VARARGS, NULL}, { (char *)"idmef_file_set_disk_size", _wrap_idmef_file_set_disk_size, METH_VARARGS, NULL}, { (char *)"idmef_file_new_disk_size", _wrap_idmef_file_new_disk_size, METH_VARARGS, NULL}, { (char *)"idmef_file_get_next_file_access", _wrap_idmef_file_get_next_file_access, METH_VARARGS, NULL}, { (char *)"idmef_file_set_file_access", _wrap_idmef_file_set_file_access, METH_VARARGS, NULL}, { (char *)"idmef_file_new_file_access", _wrap_idmef_file_new_file_access, METH_VARARGS, NULL}, { (char *)"idmef_file_get_next_linkage", _wrap_idmef_file_get_next_linkage, METH_VARARGS, NULL}, { (char *)"idmef_file_set_linkage", _wrap_idmef_file_set_linkage, METH_VARARGS, NULL}, { (char *)"idmef_file_new_linkage", _wrap_idmef_file_new_linkage, METH_VARARGS, NULL}, { (char *)"idmef_file_get_inode", _wrap_idmef_file_get_inode, METH_VARARGS, NULL}, { (char *)"idmef_file_set_inode", _wrap_idmef_file_set_inode, METH_VARARGS, NULL}, { (char *)"idmef_file_new_inode", _wrap_idmef_file_new_inode, METH_VARARGS, NULL}, { (char *)"idmef_file_get_next_checksum", _wrap_idmef_file_get_next_checksum, METH_VARARGS, NULL}, { (char *)"idmef_file_set_checksum", _wrap_idmef_file_set_checksum, METH_VARARGS, NULL}, { (char *)"idmef_file_new_checksum", _wrap_idmef_file_new_checksum, METH_VARARGS, NULL}, { (char *)"idmef_file_get_category", _wrap_idmef_file_get_category, METH_VARARGS, NULL}, { (char *)"idmef_file_set_category", _wrap_idmef_file_set_category, METH_VARARGS, NULL}, { (char *)"idmef_file_new_category", _wrap_idmef_file_new_category, METH_VARARGS, NULL}, { (char *)"idmef_file_unset_fstype", _wrap_idmef_file_unset_fstype, METH_VARARGS, NULL}, { (char *)"idmef_file_get_fstype", _wrap_idmef_file_get_fstype, METH_VARARGS, NULL}, { (char *)"idmef_file_set_fstype", _wrap_idmef_file_set_fstype, METH_VARARGS, NULL}, { (char *)"idmef_file_new_fstype", _wrap_idmef_file_new_fstype, METH_VARARGS, NULL}, { (char *)"idmef_file_get_file_type", _wrap_idmef_file_get_file_type, METH_VARARGS, NULL}, { (char *)"idmef_file_set_file_type", _wrap_idmef_file_set_file_type, METH_VARARGS, NULL}, { (char *)"idmef_file_new_file_type", _wrap_idmef_file_new_file_type, METH_VARARGS, NULL}, { (char *)"idmef_linkage_category_to_numeric", _wrap_idmef_linkage_category_to_numeric, METH_VARARGS, NULL}, { (char *)"idmef_linkage_category_to_string", _wrap_idmef_linkage_category_to_string, METH_VARARGS, NULL}, { (char *)"idmef_linkage_new", _wrap_idmef_linkage_new, METH_VARARGS, NULL}, { (char *)"idmef_linkage_copy", _wrap_idmef_linkage_copy, METH_VARARGS, NULL}, { (char *)"idmef_linkage_clone", _wrap_idmef_linkage_clone, METH_VARARGS, NULL}, { (char *)"idmef_linkage_compare", _wrap_idmef_linkage_compare, METH_VARARGS, NULL}, { (char *)"idmef_linkage_ref", _wrap_idmef_linkage_ref, METH_VARARGS, NULL}, { (char *)"idmef_linkage_destroy", _wrap_idmef_linkage_destroy, METH_VARARGS, NULL}, { (char *)"idmef_linkage_get_category", _wrap_idmef_linkage_get_category, METH_VARARGS, NULL}, { (char *)"idmef_linkage_set_category", _wrap_idmef_linkage_set_category, METH_VARARGS, NULL}, { (char *)"idmef_linkage_new_category", _wrap_idmef_linkage_new_category, METH_VARARGS, NULL}, { (char *)"idmef_linkage_get_name", _wrap_idmef_linkage_get_name, METH_VARARGS, NULL}, { (char *)"idmef_linkage_set_name", _wrap_idmef_linkage_set_name, METH_VARARGS, NULL}, { (char *)"idmef_linkage_new_name", _wrap_idmef_linkage_new_name, METH_VARARGS, NULL}, { (char *)"idmef_linkage_get_path", _wrap_idmef_linkage_get_path, METH_VARARGS, NULL}, { (char *)"idmef_linkage_set_path", _wrap_idmef_linkage_set_path, METH_VARARGS, NULL}, { (char *)"idmef_linkage_new_path", _wrap_idmef_linkage_new_path, METH_VARARGS, NULL}, { (char *)"idmef_linkage_get_file", _wrap_idmef_linkage_get_file, METH_VARARGS, NULL}, { (char *)"idmef_linkage_set_file", _wrap_idmef_linkage_set_file, METH_VARARGS, NULL}, { (char *)"idmef_linkage_new_file", _wrap_idmef_linkage_new_file, METH_VARARGS, NULL}, { (char *)"idmef_target_decoy_to_numeric", _wrap_idmef_target_decoy_to_numeric, METH_VARARGS, NULL}, { (char *)"idmef_target_decoy_to_string", _wrap_idmef_target_decoy_to_string, METH_VARARGS, NULL}, { (char *)"idmef_target_new", _wrap_idmef_target_new, METH_VARARGS, NULL}, { (char *)"idmef_target_copy", _wrap_idmef_target_copy, METH_VARARGS, NULL}, { (char *)"idmef_target_clone", _wrap_idmef_target_clone, METH_VARARGS, NULL}, { (char *)"idmef_target_compare", _wrap_idmef_target_compare, METH_VARARGS, NULL}, { (char *)"idmef_target_ref", _wrap_idmef_target_ref, METH_VARARGS, NULL}, { (char *)"idmef_target_destroy", _wrap_idmef_target_destroy, METH_VARARGS, NULL}, { (char *)"idmef_target_get_ident", _wrap_idmef_target_get_ident, METH_VARARGS, NULL}, { (char *)"idmef_target_set_ident", _wrap_idmef_target_set_ident, METH_VARARGS, NULL}, { (char *)"idmef_target_new_ident", _wrap_idmef_target_new_ident, METH_VARARGS, NULL}, { (char *)"idmef_target_get_decoy", _wrap_idmef_target_get_decoy, METH_VARARGS, NULL}, { (char *)"idmef_target_set_decoy", _wrap_idmef_target_set_decoy, METH_VARARGS, NULL}, { (char *)"idmef_target_new_decoy", _wrap_idmef_target_new_decoy, METH_VARARGS, NULL}, { (char *)"idmef_target_get_interface", _wrap_idmef_target_get_interface, METH_VARARGS, NULL}, { (char *)"idmef_target_set_interface", _wrap_idmef_target_set_interface, METH_VARARGS, NULL}, { (char *)"idmef_target_new_interface", _wrap_idmef_target_new_interface, METH_VARARGS, NULL}, { (char *)"idmef_target_get_node", _wrap_idmef_target_get_node, METH_VARARGS, NULL}, { (char *)"idmef_target_set_node", _wrap_idmef_target_set_node, METH_VARARGS, NULL}, { (char *)"idmef_target_new_node", _wrap_idmef_target_new_node, METH_VARARGS, NULL}, { (char *)"idmef_target_get_user", _wrap_idmef_target_get_user, METH_VARARGS, NULL}, { (char *)"idmef_target_set_user", _wrap_idmef_target_set_user, METH_VARARGS, NULL}, { (char *)"idmef_target_new_user", _wrap_idmef_target_new_user, METH_VARARGS, NULL}, { (char *)"idmef_target_get_process", _wrap_idmef_target_get_process, METH_VARARGS, NULL}, { (char *)"idmef_target_set_process", _wrap_idmef_target_set_process, METH_VARARGS, NULL}, { (char *)"idmef_target_new_process", _wrap_idmef_target_new_process, METH_VARARGS, NULL}, { (char *)"idmef_target_get_service", _wrap_idmef_target_get_service, METH_VARARGS, NULL}, { (char *)"idmef_target_set_service", _wrap_idmef_target_set_service, METH_VARARGS, NULL}, { (char *)"idmef_target_new_service", _wrap_idmef_target_new_service, METH_VARARGS, NULL}, { (char *)"idmef_target_get_next_file", _wrap_idmef_target_get_next_file, METH_VARARGS, NULL}, { (char *)"idmef_target_set_file", _wrap_idmef_target_set_file, METH_VARARGS, NULL}, { (char *)"idmef_target_new_file", _wrap_idmef_target_new_file, METH_VARARGS, NULL}, { (char *)"idmef_analyzer_new", _wrap_idmef_analyzer_new, METH_VARARGS, NULL}, { (char *)"idmef_analyzer_copy", _wrap_idmef_analyzer_copy, METH_VARARGS, NULL}, { (char *)"idmef_analyzer_clone", _wrap_idmef_analyzer_clone, METH_VARARGS, NULL}, { (char *)"idmef_analyzer_compare", _wrap_idmef_analyzer_compare, METH_VARARGS, NULL}, { (char *)"idmef_analyzer_ref", _wrap_idmef_analyzer_ref, METH_VARARGS, NULL}, { (char *)"idmef_analyzer_destroy", _wrap_idmef_analyzer_destroy, METH_VARARGS, NULL}, { (char *)"idmef_analyzer_get_analyzerid", _wrap_idmef_analyzer_get_analyzerid, METH_VARARGS, NULL}, { (char *)"idmef_analyzer_set_analyzerid", _wrap_idmef_analyzer_set_analyzerid, METH_VARARGS, NULL}, { (char *)"idmef_analyzer_new_analyzerid", _wrap_idmef_analyzer_new_analyzerid, METH_VARARGS, NULL}, { (char *)"idmef_analyzer_get_name", _wrap_idmef_analyzer_get_name, METH_VARARGS, NULL}, { (char *)"idmef_analyzer_set_name", _wrap_idmef_analyzer_set_name, METH_VARARGS, NULL}, { (char *)"idmef_analyzer_new_name", _wrap_idmef_analyzer_new_name, METH_VARARGS, NULL}, { (char *)"idmef_analyzer_get_manufacturer", _wrap_idmef_analyzer_get_manufacturer, METH_VARARGS, NULL}, { (char *)"idmef_analyzer_set_manufacturer", _wrap_idmef_analyzer_set_manufacturer, METH_VARARGS, NULL}, { (char *)"idmef_analyzer_new_manufacturer", _wrap_idmef_analyzer_new_manufacturer, METH_VARARGS, NULL}, { (char *)"idmef_analyzer_get_model", _wrap_idmef_analyzer_get_model, METH_VARARGS, NULL}, { (char *)"idmef_analyzer_set_model", _wrap_idmef_analyzer_set_model, METH_VARARGS, NULL}, { (char *)"idmef_analyzer_new_model", _wrap_idmef_analyzer_new_model, METH_VARARGS, NULL}, { (char *)"idmef_analyzer_get_version", _wrap_idmef_analyzer_get_version, METH_VARARGS, NULL}, { (char *)"idmef_analyzer_set_version", _wrap_idmef_analyzer_set_version, METH_VARARGS, NULL}, { (char *)"idmef_analyzer_new_version", _wrap_idmef_analyzer_new_version, METH_VARARGS, NULL}, { (char *)"idmef_analyzer_get_class", _wrap_idmef_analyzer_get_class, METH_VARARGS, NULL}, { (char *)"idmef_analyzer_set_class", _wrap_idmef_analyzer_set_class, METH_VARARGS, NULL}, { (char *)"idmef_analyzer_new_class", _wrap_idmef_analyzer_new_class, METH_VARARGS, NULL}, { (char *)"idmef_analyzer_get_ostype", _wrap_idmef_analyzer_get_ostype, METH_VARARGS, NULL}, { (char *)"idmef_analyzer_set_ostype", _wrap_idmef_analyzer_set_ostype, METH_VARARGS, NULL}, { (char *)"idmef_analyzer_new_ostype", _wrap_idmef_analyzer_new_ostype, METH_VARARGS, NULL}, { (char *)"idmef_analyzer_get_osversion", _wrap_idmef_analyzer_get_osversion, METH_VARARGS, NULL}, { (char *)"idmef_analyzer_set_osversion", _wrap_idmef_analyzer_set_osversion, METH_VARARGS, NULL}, { (char *)"idmef_analyzer_new_osversion", _wrap_idmef_analyzer_new_osversion, METH_VARARGS, NULL}, { (char *)"idmef_analyzer_get_node", _wrap_idmef_analyzer_get_node, METH_VARARGS, NULL}, { (char *)"idmef_analyzer_set_node", _wrap_idmef_analyzer_set_node, METH_VARARGS, NULL}, { (char *)"idmef_analyzer_new_node", _wrap_idmef_analyzer_new_node, METH_VARARGS, NULL}, { (char *)"idmef_analyzer_get_process", _wrap_idmef_analyzer_get_process, METH_VARARGS, NULL}, { (char *)"idmef_analyzer_set_process", _wrap_idmef_analyzer_set_process, METH_VARARGS, NULL}, { (char *)"idmef_analyzer_new_process", _wrap_idmef_analyzer_new_process, METH_VARARGS, NULL}, { (char *)"idmef_alertident_new", _wrap_idmef_alertident_new, METH_VARARGS, NULL}, { (char *)"idmef_alertident_copy", _wrap_idmef_alertident_copy, METH_VARARGS, NULL}, { (char *)"idmef_alertident_clone", _wrap_idmef_alertident_clone, METH_VARARGS, NULL}, { (char *)"idmef_alertident_compare", _wrap_idmef_alertident_compare, METH_VARARGS, NULL}, { (char *)"idmef_alertident_ref", _wrap_idmef_alertident_ref, METH_VARARGS, NULL}, { (char *)"idmef_alertident_destroy", _wrap_idmef_alertident_destroy, METH_VARARGS, NULL}, { (char *)"idmef_alertident_get_alertident", _wrap_idmef_alertident_get_alertident, METH_VARARGS, NULL}, { (char *)"idmef_alertident_set_alertident", _wrap_idmef_alertident_set_alertident, METH_VARARGS, NULL}, { (char *)"idmef_alertident_new_alertident", _wrap_idmef_alertident_new_alertident, METH_VARARGS, NULL}, { (char *)"idmef_alertident_get_analyzerid", _wrap_idmef_alertident_get_analyzerid, METH_VARARGS, NULL}, { (char *)"idmef_alertident_set_analyzerid", _wrap_idmef_alertident_set_analyzerid, METH_VARARGS, NULL}, { (char *)"idmef_alertident_new_analyzerid", _wrap_idmef_alertident_new_analyzerid, METH_VARARGS, NULL}, { (char *)"idmef_impact_severity_to_numeric", _wrap_idmef_impact_severity_to_numeric, METH_VARARGS, NULL}, { (char *)"idmef_impact_severity_to_string", _wrap_idmef_impact_severity_to_string, METH_VARARGS, NULL}, { (char *)"idmef_impact_completion_to_numeric", _wrap_idmef_impact_completion_to_numeric, METH_VARARGS, NULL}, { (char *)"idmef_impact_completion_to_string", _wrap_idmef_impact_completion_to_string, METH_VARARGS, NULL}, { (char *)"idmef_impact_type_to_numeric", _wrap_idmef_impact_type_to_numeric, METH_VARARGS, NULL}, { (char *)"idmef_impact_type_to_string", _wrap_idmef_impact_type_to_string, METH_VARARGS, NULL}, { (char *)"idmef_impact_new", _wrap_idmef_impact_new, METH_VARARGS, NULL}, { (char *)"idmef_impact_copy", _wrap_idmef_impact_copy, METH_VARARGS, NULL}, { (char *)"idmef_impact_clone", _wrap_idmef_impact_clone, METH_VARARGS, NULL}, { (char *)"idmef_impact_compare", _wrap_idmef_impact_compare, METH_VARARGS, NULL}, { (char *)"idmef_impact_ref", _wrap_idmef_impact_ref, METH_VARARGS, NULL}, { (char *)"idmef_impact_destroy", _wrap_idmef_impact_destroy, METH_VARARGS, NULL}, { (char *)"idmef_impact_unset_severity", _wrap_idmef_impact_unset_severity, METH_VARARGS, NULL}, { (char *)"idmef_impact_get_severity", _wrap_idmef_impact_get_severity, METH_VARARGS, NULL}, { (char *)"idmef_impact_set_severity", _wrap_idmef_impact_set_severity, METH_VARARGS, NULL}, { (char *)"idmef_impact_new_severity", _wrap_idmef_impact_new_severity, METH_VARARGS, NULL}, { (char *)"idmef_impact_unset_completion", _wrap_idmef_impact_unset_completion, METH_VARARGS, NULL}, { (char *)"idmef_impact_get_completion", _wrap_idmef_impact_get_completion, METH_VARARGS, NULL}, { (char *)"idmef_impact_set_completion", _wrap_idmef_impact_set_completion, METH_VARARGS, NULL}, { (char *)"idmef_impact_new_completion", _wrap_idmef_impact_new_completion, METH_VARARGS, NULL}, { (char *)"idmef_impact_get_type", _wrap_idmef_impact_get_type, METH_VARARGS, NULL}, { (char *)"idmef_impact_set_type", _wrap_idmef_impact_set_type, METH_VARARGS, NULL}, { (char *)"idmef_impact_new_type", _wrap_idmef_impact_new_type, METH_VARARGS, NULL}, { (char *)"idmef_impact_get_description", _wrap_idmef_impact_get_description, METH_VARARGS, NULL}, { (char *)"idmef_impact_set_description", _wrap_idmef_impact_set_description, METH_VARARGS, NULL}, { (char *)"idmef_impact_new_description", _wrap_idmef_impact_new_description, METH_VARARGS, NULL}, { (char *)"idmef_action_category_to_numeric", _wrap_idmef_action_category_to_numeric, METH_VARARGS, NULL}, { (char *)"idmef_action_category_to_string", _wrap_idmef_action_category_to_string, METH_VARARGS, NULL}, { (char *)"idmef_action_new", _wrap_idmef_action_new, METH_VARARGS, NULL}, { (char *)"idmef_action_copy", _wrap_idmef_action_copy, METH_VARARGS, NULL}, { (char *)"idmef_action_clone", _wrap_idmef_action_clone, METH_VARARGS, NULL}, { (char *)"idmef_action_compare", _wrap_idmef_action_compare, METH_VARARGS, NULL}, { (char *)"idmef_action_ref", _wrap_idmef_action_ref, METH_VARARGS, NULL}, { (char *)"idmef_action_destroy", _wrap_idmef_action_destroy, METH_VARARGS, NULL}, { (char *)"idmef_action_get_category", _wrap_idmef_action_get_category, METH_VARARGS, NULL}, { (char *)"idmef_action_set_category", _wrap_idmef_action_set_category, METH_VARARGS, NULL}, { (char *)"idmef_action_new_category", _wrap_idmef_action_new_category, METH_VARARGS, NULL}, { (char *)"idmef_action_get_description", _wrap_idmef_action_get_description, METH_VARARGS, NULL}, { (char *)"idmef_action_set_description", _wrap_idmef_action_set_description, METH_VARARGS, NULL}, { (char *)"idmef_action_new_description", _wrap_idmef_action_new_description, METH_VARARGS, NULL}, { (char *)"idmef_confidence_rating_to_numeric", _wrap_idmef_confidence_rating_to_numeric, METH_VARARGS, NULL}, { (char *)"idmef_confidence_rating_to_string", _wrap_idmef_confidence_rating_to_string, METH_VARARGS, NULL}, { (char *)"idmef_confidence_new", _wrap_idmef_confidence_new, METH_VARARGS, NULL}, { (char *)"idmef_confidence_copy", _wrap_idmef_confidence_copy, METH_VARARGS, NULL}, { (char *)"idmef_confidence_clone", _wrap_idmef_confidence_clone, METH_VARARGS, NULL}, { (char *)"idmef_confidence_compare", _wrap_idmef_confidence_compare, METH_VARARGS, NULL}, { (char *)"idmef_confidence_ref", _wrap_idmef_confidence_ref, METH_VARARGS, NULL}, { (char *)"idmef_confidence_destroy", _wrap_idmef_confidence_destroy, METH_VARARGS, NULL}, { (char *)"idmef_confidence_get_rating", _wrap_idmef_confidence_get_rating, METH_VARARGS, NULL}, { (char *)"idmef_confidence_set_rating", _wrap_idmef_confidence_set_rating, METH_VARARGS, NULL}, { (char *)"idmef_confidence_new_rating", _wrap_idmef_confidence_new_rating, METH_VARARGS, NULL}, { (char *)"idmef_confidence_get_confidence", _wrap_idmef_confidence_get_confidence, METH_VARARGS, NULL}, { (char *)"idmef_confidence_set_confidence", _wrap_idmef_confidence_set_confidence, METH_VARARGS, NULL}, { (char *)"idmef_confidence_new_confidence", _wrap_idmef_confidence_new_confidence, METH_VARARGS, NULL}, { (char *)"idmef_assessment_new", _wrap_idmef_assessment_new, METH_VARARGS, NULL}, { (char *)"idmef_assessment_copy", _wrap_idmef_assessment_copy, METH_VARARGS, NULL}, { (char *)"idmef_assessment_clone", _wrap_idmef_assessment_clone, METH_VARARGS, NULL}, { (char *)"idmef_assessment_compare", _wrap_idmef_assessment_compare, METH_VARARGS, NULL}, { (char *)"idmef_assessment_ref", _wrap_idmef_assessment_ref, METH_VARARGS, NULL}, { (char *)"idmef_assessment_destroy", _wrap_idmef_assessment_destroy, METH_VARARGS, NULL}, { (char *)"idmef_assessment_get_impact", _wrap_idmef_assessment_get_impact, METH_VARARGS, NULL}, { (char *)"idmef_assessment_set_impact", _wrap_idmef_assessment_set_impact, METH_VARARGS, NULL}, { (char *)"idmef_assessment_new_impact", _wrap_idmef_assessment_new_impact, METH_VARARGS, NULL}, { (char *)"idmef_assessment_get_next_action", _wrap_idmef_assessment_get_next_action, METH_VARARGS, NULL}, { (char *)"idmef_assessment_set_action", _wrap_idmef_assessment_set_action, METH_VARARGS, NULL}, { (char *)"idmef_assessment_new_action", _wrap_idmef_assessment_new_action, METH_VARARGS, NULL}, { (char *)"idmef_assessment_get_confidence", _wrap_idmef_assessment_get_confidence, METH_VARARGS, NULL}, { (char *)"idmef_assessment_set_confidence", _wrap_idmef_assessment_set_confidence, METH_VARARGS, NULL}, { (char *)"idmef_assessment_new_confidence", _wrap_idmef_assessment_new_confidence, METH_VARARGS, NULL}, { (char *)"idmef_tool_alert_new", _wrap_idmef_tool_alert_new, METH_VARARGS, NULL}, { (char *)"idmef_tool_alert_copy", _wrap_idmef_tool_alert_copy, METH_VARARGS, NULL}, { (char *)"idmef_tool_alert_clone", _wrap_idmef_tool_alert_clone, METH_VARARGS, NULL}, { (char *)"idmef_tool_alert_compare", _wrap_idmef_tool_alert_compare, METH_VARARGS, NULL}, { (char *)"idmef_tool_alert_ref", _wrap_idmef_tool_alert_ref, METH_VARARGS, NULL}, { (char *)"idmef_tool_alert_destroy", _wrap_idmef_tool_alert_destroy, METH_VARARGS, NULL}, { (char *)"idmef_tool_alert_get_name", _wrap_idmef_tool_alert_get_name, METH_VARARGS, NULL}, { (char *)"idmef_tool_alert_set_name", _wrap_idmef_tool_alert_set_name, METH_VARARGS, NULL}, { (char *)"idmef_tool_alert_new_name", _wrap_idmef_tool_alert_new_name, METH_VARARGS, NULL}, { (char *)"idmef_tool_alert_get_command", _wrap_idmef_tool_alert_get_command, METH_VARARGS, NULL}, { (char *)"idmef_tool_alert_set_command", _wrap_idmef_tool_alert_set_command, METH_VARARGS, NULL}, { (char *)"idmef_tool_alert_new_command", _wrap_idmef_tool_alert_new_command, METH_VARARGS, NULL}, { (char *)"idmef_tool_alert_get_next_alertident", _wrap_idmef_tool_alert_get_next_alertident, METH_VARARGS, NULL}, { (char *)"idmef_tool_alert_set_alertident", _wrap_idmef_tool_alert_set_alertident, METH_VARARGS, NULL}, { (char *)"idmef_tool_alert_new_alertident", _wrap_idmef_tool_alert_new_alertident, METH_VARARGS, NULL}, { (char *)"idmef_correlation_alert_new", _wrap_idmef_correlation_alert_new, METH_VARARGS, NULL}, { (char *)"idmef_correlation_alert_copy", _wrap_idmef_correlation_alert_copy, METH_VARARGS, NULL}, { (char *)"idmef_correlation_alert_clone", _wrap_idmef_correlation_alert_clone, METH_VARARGS, NULL}, { (char *)"idmef_correlation_alert_compare", _wrap_idmef_correlation_alert_compare, METH_VARARGS, NULL}, { (char *)"idmef_correlation_alert_ref", _wrap_idmef_correlation_alert_ref, METH_VARARGS, NULL}, { (char *)"idmef_correlation_alert_destroy", _wrap_idmef_correlation_alert_destroy, METH_VARARGS, NULL}, { (char *)"idmef_correlation_alert_get_name", _wrap_idmef_correlation_alert_get_name, METH_VARARGS, NULL}, { (char *)"idmef_correlation_alert_set_name", _wrap_idmef_correlation_alert_set_name, METH_VARARGS, NULL}, { (char *)"idmef_correlation_alert_new_name", _wrap_idmef_correlation_alert_new_name, METH_VARARGS, NULL}, { (char *)"idmef_correlation_alert_get_next_alertident", _wrap_idmef_correlation_alert_get_next_alertident, METH_VARARGS, NULL}, { (char *)"idmef_correlation_alert_set_alertident", _wrap_idmef_correlation_alert_set_alertident, METH_VARARGS, NULL}, { (char *)"idmef_correlation_alert_new_alertident", _wrap_idmef_correlation_alert_new_alertident, METH_VARARGS, NULL}, { (char *)"idmef_overflow_alert_new", _wrap_idmef_overflow_alert_new, METH_VARARGS, NULL}, { (char *)"idmef_overflow_alert_copy", _wrap_idmef_overflow_alert_copy, METH_VARARGS, NULL}, { (char *)"idmef_overflow_alert_clone", _wrap_idmef_overflow_alert_clone, METH_VARARGS, NULL}, { (char *)"idmef_overflow_alert_compare", _wrap_idmef_overflow_alert_compare, METH_VARARGS, NULL}, { (char *)"idmef_overflow_alert_ref", _wrap_idmef_overflow_alert_ref, METH_VARARGS, NULL}, { (char *)"idmef_overflow_alert_destroy", _wrap_idmef_overflow_alert_destroy, METH_VARARGS, NULL}, { (char *)"idmef_overflow_alert_get_program", _wrap_idmef_overflow_alert_get_program, METH_VARARGS, NULL}, { (char *)"idmef_overflow_alert_set_program", _wrap_idmef_overflow_alert_set_program, METH_VARARGS, NULL}, { (char *)"idmef_overflow_alert_new_program", _wrap_idmef_overflow_alert_new_program, METH_VARARGS, NULL}, { (char *)"idmef_overflow_alert_unset_size", _wrap_idmef_overflow_alert_unset_size, METH_VARARGS, NULL}, { (char *)"idmef_overflow_alert_get_size", _wrap_idmef_overflow_alert_get_size, METH_VARARGS, NULL}, { (char *)"idmef_overflow_alert_set_size", _wrap_idmef_overflow_alert_set_size, METH_VARARGS, NULL}, { (char *)"idmef_overflow_alert_new_size", _wrap_idmef_overflow_alert_new_size, METH_VARARGS, NULL}, { (char *)"idmef_overflow_alert_get_buffer", _wrap_idmef_overflow_alert_get_buffer, METH_VARARGS, NULL}, { (char *)"idmef_overflow_alert_set_buffer", _wrap_idmef_overflow_alert_set_buffer, METH_VARARGS, NULL}, { (char *)"idmef_overflow_alert_new_buffer", _wrap_idmef_overflow_alert_new_buffer, METH_VARARGS, NULL}, { (char *)"idmef_alert_type_to_numeric", _wrap_idmef_alert_type_to_numeric, METH_VARARGS, NULL}, { (char *)"idmef_alert_type_to_string", _wrap_idmef_alert_type_to_string, METH_VARARGS, NULL}, { (char *)"idmef_alert_new", _wrap_idmef_alert_new, METH_VARARGS, NULL}, { (char *)"idmef_alert_copy", _wrap_idmef_alert_copy, METH_VARARGS, NULL}, { (char *)"idmef_alert_clone", _wrap_idmef_alert_clone, METH_VARARGS, NULL}, { (char *)"idmef_alert_compare", _wrap_idmef_alert_compare, METH_VARARGS, NULL}, { (char *)"idmef_alert_ref", _wrap_idmef_alert_ref, METH_VARARGS, NULL}, { (char *)"idmef_alert_destroy", _wrap_idmef_alert_destroy, METH_VARARGS, NULL}, { (char *)"idmef_alert_get_messageid", _wrap_idmef_alert_get_messageid, METH_VARARGS, NULL}, { (char *)"idmef_alert_set_messageid", _wrap_idmef_alert_set_messageid, METH_VARARGS, NULL}, { (char *)"idmef_alert_new_messageid", _wrap_idmef_alert_new_messageid, METH_VARARGS, NULL}, { (char *)"idmef_alert_get_next_analyzer", _wrap_idmef_alert_get_next_analyzer, METH_VARARGS, NULL}, { (char *)"idmef_alert_set_analyzer", _wrap_idmef_alert_set_analyzer, METH_VARARGS, NULL}, { (char *)"idmef_alert_new_analyzer", _wrap_idmef_alert_new_analyzer, METH_VARARGS, NULL}, { (char *)"idmef_alert_get_create_time", _wrap_idmef_alert_get_create_time, METH_VARARGS, NULL}, { (char *)"idmef_alert_set_create_time", _wrap_idmef_alert_set_create_time, METH_VARARGS, NULL}, { (char *)"idmef_alert_new_create_time", _wrap_idmef_alert_new_create_time, METH_VARARGS, NULL}, { (char *)"idmef_alert_get_classification", _wrap_idmef_alert_get_classification, METH_VARARGS, NULL}, { (char *)"idmef_alert_set_classification", _wrap_idmef_alert_set_classification, METH_VARARGS, NULL}, { (char *)"idmef_alert_new_classification", _wrap_idmef_alert_new_classification, METH_VARARGS, NULL}, { (char *)"idmef_alert_get_detect_time", _wrap_idmef_alert_get_detect_time, METH_VARARGS, NULL}, { (char *)"idmef_alert_set_detect_time", _wrap_idmef_alert_set_detect_time, METH_VARARGS, NULL}, { (char *)"idmef_alert_new_detect_time", _wrap_idmef_alert_new_detect_time, METH_VARARGS, NULL}, { (char *)"idmef_alert_get_analyzer_time", _wrap_idmef_alert_get_analyzer_time, METH_VARARGS, NULL}, { (char *)"idmef_alert_set_analyzer_time", _wrap_idmef_alert_set_analyzer_time, METH_VARARGS, NULL}, { (char *)"idmef_alert_new_analyzer_time", _wrap_idmef_alert_new_analyzer_time, METH_VARARGS, NULL}, { (char *)"idmef_alert_get_next_source", _wrap_idmef_alert_get_next_source, METH_VARARGS, NULL}, { (char *)"idmef_alert_set_source", _wrap_idmef_alert_set_source, METH_VARARGS, NULL}, { (char *)"idmef_alert_new_source", _wrap_idmef_alert_new_source, METH_VARARGS, NULL}, { (char *)"idmef_alert_get_next_target", _wrap_idmef_alert_get_next_target, METH_VARARGS, NULL}, { (char *)"idmef_alert_set_target", _wrap_idmef_alert_set_target, METH_VARARGS, NULL}, { (char *)"idmef_alert_new_target", _wrap_idmef_alert_new_target, METH_VARARGS, NULL}, { (char *)"idmef_alert_get_assessment", _wrap_idmef_alert_get_assessment, METH_VARARGS, NULL}, { (char *)"idmef_alert_set_assessment", _wrap_idmef_alert_set_assessment, METH_VARARGS, NULL}, { (char *)"idmef_alert_new_assessment", _wrap_idmef_alert_new_assessment, METH_VARARGS, NULL}, { (char *)"idmef_alert_get_next_additional_data", _wrap_idmef_alert_get_next_additional_data, METH_VARARGS, NULL}, { (char *)"idmef_alert_set_additional_data", _wrap_idmef_alert_set_additional_data, METH_VARARGS, NULL}, { (char *)"idmef_alert_new_additional_data", _wrap_idmef_alert_new_additional_data, METH_VARARGS, NULL}, { (char *)"idmef_alert_get_type", _wrap_idmef_alert_get_type, METH_VARARGS, NULL}, { (char *)"idmef_alert_get_tool_alert", _wrap_idmef_alert_get_tool_alert, METH_VARARGS, NULL}, { (char *)"idmef_alert_set_tool_alert", _wrap_idmef_alert_set_tool_alert, METH_VARARGS, NULL}, { (char *)"idmef_alert_new_tool_alert", _wrap_idmef_alert_new_tool_alert, METH_VARARGS, NULL}, { (char *)"idmef_alert_get_correlation_alert", _wrap_idmef_alert_get_correlation_alert, METH_VARARGS, NULL}, { (char *)"idmef_alert_set_correlation_alert", _wrap_idmef_alert_set_correlation_alert, METH_VARARGS, NULL}, { (char *)"idmef_alert_new_correlation_alert", _wrap_idmef_alert_new_correlation_alert, METH_VARARGS, NULL}, { (char *)"idmef_alert_get_overflow_alert", _wrap_idmef_alert_get_overflow_alert, METH_VARARGS, NULL}, { (char *)"idmef_alert_set_overflow_alert", _wrap_idmef_alert_set_overflow_alert, METH_VARARGS, NULL}, { (char *)"idmef_alert_new_overflow_alert", _wrap_idmef_alert_new_overflow_alert, METH_VARARGS, NULL}, { (char *)"idmef_heartbeat_new", _wrap_idmef_heartbeat_new, METH_VARARGS, NULL}, { (char *)"idmef_heartbeat_copy", _wrap_idmef_heartbeat_copy, METH_VARARGS, NULL}, { (char *)"idmef_heartbeat_clone", _wrap_idmef_heartbeat_clone, METH_VARARGS, NULL}, { (char *)"idmef_heartbeat_compare", _wrap_idmef_heartbeat_compare, METH_VARARGS, NULL}, { (char *)"idmef_heartbeat_ref", _wrap_idmef_heartbeat_ref, METH_VARARGS, NULL}, { (char *)"idmef_heartbeat_destroy", _wrap_idmef_heartbeat_destroy, METH_VARARGS, NULL}, { (char *)"idmef_heartbeat_get_messageid", _wrap_idmef_heartbeat_get_messageid, METH_VARARGS, NULL}, { (char *)"idmef_heartbeat_set_messageid", _wrap_idmef_heartbeat_set_messageid, METH_VARARGS, NULL}, { (char *)"idmef_heartbeat_new_messageid", _wrap_idmef_heartbeat_new_messageid, METH_VARARGS, NULL}, { (char *)"idmef_heartbeat_get_next_analyzer", _wrap_idmef_heartbeat_get_next_analyzer, METH_VARARGS, NULL}, { (char *)"idmef_heartbeat_set_analyzer", _wrap_idmef_heartbeat_set_analyzer, METH_VARARGS, NULL}, { (char *)"idmef_heartbeat_new_analyzer", _wrap_idmef_heartbeat_new_analyzer, METH_VARARGS, NULL}, { (char *)"idmef_heartbeat_get_create_time", _wrap_idmef_heartbeat_get_create_time, METH_VARARGS, NULL}, { (char *)"idmef_heartbeat_set_create_time", _wrap_idmef_heartbeat_set_create_time, METH_VARARGS, NULL}, { (char *)"idmef_heartbeat_new_create_time", _wrap_idmef_heartbeat_new_create_time, METH_VARARGS, NULL}, { (char *)"idmef_heartbeat_get_analyzer_time", _wrap_idmef_heartbeat_get_analyzer_time, METH_VARARGS, NULL}, { (char *)"idmef_heartbeat_set_analyzer_time", _wrap_idmef_heartbeat_set_analyzer_time, METH_VARARGS, NULL}, { (char *)"idmef_heartbeat_new_analyzer_time", _wrap_idmef_heartbeat_new_analyzer_time, METH_VARARGS, NULL}, { (char *)"idmef_heartbeat_unset_heartbeat_interval", _wrap_idmef_heartbeat_unset_heartbeat_interval, METH_VARARGS, NULL}, { (char *)"idmef_heartbeat_get_heartbeat_interval", _wrap_idmef_heartbeat_get_heartbeat_interval, METH_VARARGS, NULL}, { (char *)"idmef_heartbeat_set_heartbeat_interval", _wrap_idmef_heartbeat_set_heartbeat_interval, METH_VARARGS, NULL}, { (char *)"idmef_heartbeat_new_heartbeat_interval", _wrap_idmef_heartbeat_new_heartbeat_interval, METH_VARARGS, NULL}, { (char *)"idmef_heartbeat_get_next_additional_data", _wrap_idmef_heartbeat_get_next_additional_data, METH_VARARGS, NULL}, { (char *)"idmef_heartbeat_set_additional_data", _wrap_idmef_heartbeat_set_additional_data, METH_VARARGS, NULL}, { (char *)"idmef_heartbeat_new_additional_data", _wrap_idmef_heartbeat_new_additional_data, METH_VARARGS, NULL}, { (char *)"idmef_message_type_to_numeric", _wrap_idmef_message_type_to_numeric, METH_VARARGS, NULL}, { (char *)"idmef_message_type_to_string", _wrap_idmef_message_type_to_string, METH_VARARGS, NULL}, { (char *)"idmef_message_new", _wrap_idmef_message_new, METH_VARARGS, NULL}, { (char *)"idmef_message_copy", _wrap_idmef_message_copy, METH_VARARGS, NULL}, { (char *)"idmef_message_clone", _wrap_idmef_message_clone, METH_VARARGS, NULL}, { (char *)"idmef_message_compare", _wrap_idmef_message_compare, METH_VARARGS, NULL}, { (char *)"idmef_message_ref", _wrap_idmef_message_ref, METH_VARARGS, NULL}, { (char *)"idmef_message_destroy", _wrap_idmef_message_destroy, METH_VARARGS, NULL}, { (char *)"idmef_message_get_version", _wrap_idmef_message_get_version, METH_VARARGS, NULL}, { (char *)"idmef_message_set_version", _wrap_idmef_message_set_version, METH_VARARGS, NULL}, { (char *)"idmef_message_new_version", _wrap_idmef_message_new_version, METH_VARARGS, NULL}, { (char *)"idmef_message_get_type", _wrap_idmef_message_get_type, METH_VARARGS, NULL}, { (char *)"idmef_message_get_alert", _wrap_idmef_message_get_alert, METH_VARARGS, NULL}, { (char *)"idmef_message_set_alert", _wrap_idmef_message_set_alert, METH_VARARGS, NULL}, { (char *)"idmef_message_new_alert", _wrap_idmef_message_new_alert, METH_VARARGS, NULL}, { (char *)"idmef_message_get_heartbeat", _wrap_idmef_message_get_heartbeat, METH_VARARGS, NULL}, { (char *)"idmef_message_set_heartbeat", _wrap_idmef_message_set_heartbeat, METH_VARARGS, NULL}, { (char *)"idmef_message_new_heartbeat", _wrap_idmef_message_new_heartbeat, METH_VARARGS, NULL}, { (char *)"idmef_message_set_pmsg", _wrap_idmef_message_set_pmsg, METH_VARARGS, NULL}, { (char *)"idmef_message_get_pmsg", _wrap_idmef_message_get_pmsg, METH_VARARGS, NULL}, { (char *)"idmef_value_new_int8", _wrap_idmef_value_new_int8, METH_VARARGS, NULL}, { (char *)"idmef_value_new_uint8", _wrap_idmef_value_new_uint8, METH_VARARGS, NULL}, { (char *)"idmef_value_new_int16", _wrap_idmef_value_new_int16, METH_VARARGS, NULL}, { (char *)"idmef_value_new_uint16", _wrap_idmef_value_new_uint16, METH_VARARGS, NULL}, { (char *)"idmef_value_new_int32", _wrap_idmef_value_new_int32, METH_VARARGS, NULL}, { (char *)"idmef_value_new_uint32", _wrap_idmef_value_new_uint32, METH_VARARGS, NULL}, { (char *)"idmef_value_new_int64", _wrap_idmef_value_new_int64, METH_VARARGS, NULL}, { (char *)"idmef_value_new_uint64", _wrap_idmef_value_new_uint64, METH_VARARGS, NULL}, { (char *)"idmef_value_new_float", _wrap_idmef_value_new_float, METH_VARARGS, NULL}, { (char *)"idmef_value_new_double", _wrap_idmef_value_new_double, METH_VARARGS, NULL}, { (char *)"idmef_value_new_string", _wrap_idmef_value_new_string, METH_VARARGS, NULL}, { (char *)"idmef_value_new_time", _wrap_idmef_value_new_time, METH_VARARGS, NULL}, { (char *)"idmef_value_new_data", _wrap_idmef_value_new_data, METH_VARARGS, NULL}, { (char *)"idmef_value_new_class", _wrap_idmef_value_new_class, METH_VARARGS, NULL}, { (char *)"idmef_value_new_list", _wrap_idmef_value_new_list, METH_VARARGS, NULL}, { (char *)"idmef_value_new_enum", _wrap_idmef_value_new_enum, METH_VARARGS, NULL}, { (char *)"idmef_value_new_enum_from_string", _wrap_idmef_value_new_enum_from_string, METH_VARARGS, NULL}, { (char *)"idmef_value_new_enum_from_numeric", _wrap_idmef_value_new_enum_from_numeric, METH_VARARGS, NULL}, { (char *)"idmef_value_set_int8", _wrap_idmef_value_set_int8, METH_VARARGS, NULL}, { (char *)"idmef_value_set_uint8", _wrap_idmef_value_set_uint8, METH_VARARGS, NULL}, { (char *)"idmef_value_set_int16", _wrap_idmef_value_set_int16, METH_VARARGS, NULL}, { (char *)"idmef_value_set_uint16", _wrap_idmef_value_set_uint16, METH_VARARGS, NULL}, { (char *)"idmef_value_set_int32", _wrap_idmef_value_set_int32, METH_VARARGS, NULL}, { (char *)"idmef_value_set_uint32", _wrap_idmef_value_set_uint32, METH_VARARGS, NULL}, { (char *)"idmef_value_set_int64", _wrap_idmef_value_set_int64, METH_VARARGS, NULL}, { (char *)"idmef_value_set_uint64", _wrap_idmef_value_set_uint64, METH_VARARGS, NULL}, { (char *)"idmef_value_set_float", _wrap_idmef_value_set_float, METH_VARARGS, NULL}, { (char *)"idmef_value_set_double", _wrap_idmef_value_set_double, METH_VARARGS, NULL}, { (char *)"idmef_value_set_string", _wrap_idmef_value_set_string, METH_VARARGS, NULL}, { (char *)"idmef_value_set_time", _wrap_idmef_value_set_time, METH_VARARGS, NULL}, { (char *)"idmef_value_set_data", _wrap_idmef_value_set_data, METH_VARARGS, NULL}, { (char *)"idmef_value_set_enum", _wrap_idmef_value_set_enum, METH_VARARGS, NULL}, { (char *)"idmef_value_set_enum_from_string", _wrap_idmef_value_set_enum_from_string, METH_VARARGS, NULL}, { (char *)"idmef_value_set_enum_from_numeric", _wrap_idmef_value_set_enum_from_numeric, METH_VARARGS, NULL}, { (char *)"idmef_value_set_class", _wrap_idmef_value_set_class, METH_VARARGS, NULL}, { (char *)"idmef_value_new", _wrap_idmef_value_new, METH_VARARGS, NULL}, { (char *)"idmef_value_new_from_path", _wrap_idmef_value_new_from_path, METH_VARARGS, NULL}, { (char *)"idmef_value_new_from_string", _wrap_idmef_value_new_from_string, METH_VARARGS, NULL}, { (char *)"idmef_value_get_int8", _wrap_idmef_value_get_int8, METH_VARARGS, NULL}, { (char *)"idmef_value_get_uint8", _wrap_idmef_value_get_uint8, METH_VARARGS, NULL}, { (char *)"idmef_value_get_int16", _wrap_idmef_value_get_int16, METH_VARARGS, NULL}, { (char *)"idmef_value_get_uint16", _wrap_idmef_value_get_uint16, METH_VARARGS, NULL}, { (char *)"idmef_value_get_int32", _wrap_idmef_value_get_int32, METH_VARARGS, NULL}, { (char *)"idmef_value_get_uint32", _wrap_idmef_value_get_uint32, METH_VARARGS, NULL}, { (char *)"idmef_value_get_int64", _wrap_idmef_value_get_int64, METH_VARARGS, NULL}, { (char *)"idmef_value_get_uint64", _wrap_idmef_value_get_uint64, METH_VARARGS, NULL}, { (char *)"idmef_value_get_enum", _wrap_idmef_value_get_enum, METH_VARARGS, NULL}, { (char *)"idmef_value_get_float", _wrap_idmef_value_get_float, METH_VARARGS, NULL}, { (char *)"idmef_value_get_double", _wrap_idmef_value_get_double, METH_VARARGS, NULL}, { (char *)"idmef_value_get_time", _wrap_idmef_value_get_time, METH_VARARGS, NULL}, { (char *)"idmef_value_get_data", _wrap_idmef_value_get_data, METH_VARARGS, NULL}, { (char *)"idmef_value_get_string", _wrap_idmef_value_get_string, METH_VARARGS, NULL}, { (char *)"idmef_value_list_add", _wrap_idmef_value_list_add, METH_VARARGS, NULL}, { (char *)"idmef_value_is_list", _wrap_idmef_value_is_list, METH_VARARGS, NULL}, { (char *)"idmef_value_list_is_empty", _wrap_idmef_value_list_is_empty, METH_VARARGS, NULL}, { (char *)"idmef_value_have_own_data", _wrap_idmef_value_have_own_data, METH_VARARGS, NULL}, { (char *)"idmef_value_dont_have_own_data", _wrap_idmef_value_dont_have_own_data, METH_VARARGS, NULL}, { (char *)"idmef_value_get_type", _wrap_idmef_value_get_type, METH_VARARGS, NULL}, { (char *)"idmef_value_get_class", _wrap_idmef_value_get_class, METH_VARARGS, NULL}, { (char *)"idmef_value_get_object", _wrap_idmef_value_get_object, METH_VARARGS, NULL}, { (char *)"idmef_value_iterate", _wrap_idmef_value_iterate, METH_VARARGS, NULL}, { (char *)"idmef_value_iterate_reversed", _wrap_idmef_value_iterate_reversed, METH_VARARGS, NULL}, { (char *)"idmef_value_get_nth", _wrap_idmef_value_get_nth, METH_VARARGS, NULL}, { (char *)"idmef_value_get_count", _wrap_idmef_value_get_count, METH_VARARGS, NULL}, { (char *)"idmef_value_clone", _wrap_idmef_value_clone, METH_VARARGS, NULL}, { (char *)"idmef_value_ref", _wrap_idmef_value_ref, METH_VARARGS, NULL}, { (char *)"idmef_value_print", _wrap_idmef_value_print, METH_VARARGS, NULL}, { (char *)"idmef_value_to_string", _wrap_idmef_value_to_string, METH_VARARGS, NULL}, { (char *)"idmef_value_get", _wrap_idmef_value_get, METH_VARARGS, NULL}, { (char *)"idmef_value_match", _wrap_idmef_value_match, METH_VARARGS, NULL}, { (char *)"idmef_value_check_operator", _wrap_idmef_value_check_operator, METH_VARARGS, NULL}, { (char *)"idmef_value_get_applicable_operators", _wrap_idmef_value_get_applicable_operators, METH_VARARGS, NULL}, { (char *)"idmef_value_destroy", _wrap_idmef_value_destroy, METH_VARARGS, NULL}, { (char *)"idmef_path_get", _wrap_idmef_path_get, METH_VARARGS, NULL}, { (char *)"idmef_path_set", _wrap_idmef_path_set, METH_VARARGS, NULL}, { (char *)"idmef_path_new", _wrap_idmef_path_new, METH_VARARGS, NULL}, { (char *)"idmef_path_new_fast", _wrap_idmef_path_new_fast, METH_VARARGS, NULL}, { (char *)"idmef_path_get_class", _wrap_idmef_path_get_class, METH_VARARGS, NULL}, { (char *)"idmef_path_get_value_type", _wrap_idmef_path_get_value_type, METH_VARARGS, NULL}, { (char *)"idmef_path_set_index", _wrap_idmef_path_set_index, METH_VARARGS, NULL}, { (char *)"idmef_path_undefine_index", _wrap_idmef_path_undefine_index, METH_VARARGS, NULL}, { (char *)"idmef_path_get_index", _wrap_idmef_path_get_index, METH_VARARGS, NULL}, { (char *)"idmef_path_make_child", _wrap_idmef_path_make_child, METH_VARARGS, NULL}, { (char *)"idmef_path_make_parent", _wrap_idmef_path_make_parent, METH_VARARGS, NULL}, { (char *)"idmef_path_destroy", _wrap_idmef_path_destroy, METH_VARARGS, NULL}, { (char *)"idmef_path_ncompare", _wrap_idmef_path_ncompare, METH_VARARGS, NULL}, { (char *)"idmef_path_compare", _wrap_idmef_path_compare, METH_VARARGS, NULL}, { (char *)"idmef_path_clone", _wrap_idmef_path_clone, METH_VARARGS, NULL}, { (char *)"idmef_path_ref", _wrap_idmef_path_ref, METH_VARARGS, NULL}, { (char *)"idmef_path_get_name", _wrap_idmef_path_get_name, METH_VARARGS, NULL}, { (char *)"idmef_path_is_ambiguous", _wrap_idmef_path_is_ambiguous, METH_VARARGS, NULL}, { (char *)"idmef_path_has_lists", _wrap_idmef_path_has_lists, METH_VARARGS, NULL}, { (char *)"idmef_path_is_list", _wrap_idmef_path_is_list, METH_VARARGS, NULL}, { (char *)"idmef_path_get_depth", _wrap_idmef_path_get_depth, METH_VARARGS, NULL}, { (char *)"idmef_path_check_operator", _wrap_idmef_path_check_operator, METH_VARARGS, NULL}, { (char *)"idmef_path_get_applicable_operators", _wrap_idmef_path_get_applicable_operators, METH_VARARGS, NULL}, { (char *)"idmef_time_refcount_set", _wrap_idmef_time_refcount_set, METH_VARARGS, NULL}, { (char *)"idmef_time_refcount_get", _wrap_idmef_time_refcount_get, METH_VARARGS, NULL}, { (char *)"idmef_time_sec_set", _wrap_idmef_time_sec_set, METH_VARARGS, NULL}, { (char *)"idmef_time_sec_get", _wrap_idmef_time_sec_get, METH_VARARGS, NULL}, { (char *)"idmef_time_usec_set", _wrap_idmef_time_usec_set, METH_VARARGS, NULL}, { (char *)"idmef_time_usec_get", _wrap_idmef_time_usec_get, METH_VARARGS, NULL}, { (char *)"idmef_time_gmt_offset_set", _wrap_idmef_time_gmt_offset_set, METH_VARARGS, NULL}, { (char *)"idmef_time_gmt_offset_get", _wrap_idmef_time_gmt_offset_get, METH_VARARGS, NULL}, { (char *)"new_idmef_time", _wrap_new_idmef_time, METH_VARARGS, NULL}, { (char *)"delete_idmef_time", _wrap_delete_idmef_time, METH_VARARGS, NULL}, { (char *)"idmef_time_ref", _wrap_idmef_time_ref, METH_VARARGS, NULL}, { (char *)"idmef_time_new", _wrap_idmef_time_new, METH_VARARGS, NULL}, { (char *)"idmef_time_new_from_time", _wrap_idmef_time_new_from_time, METH_VARARGS, NULL}, { (char *)"idmef_time_new_from_gettimeofday", _wrap_idmef_time_new_from_gettimeofday, METH_VARARGS, NULL}, { (char *)"idmef_time_new_from_string", _wrap_idmef_time_new_from_string, METH_VARARGS, NULL}, { (char *)"idmef_time_new_from_ntpstamp", _wrap_idmef_time_new_from_ntpstamp, METH_VARARGS, NULL}, { (char *)"idmef_time_new_from_timeval", _wrap_idmef_time_new_from_timeval, METH_VARARGS, NULL}, { (char *)"idmef_time_set_from_time", _wrap_idmef_time_set_from_time, METH_VARARGS, NULL}, { (char *)"idmef_time_set_from_gettimeofday", _wrap_idmef_time_set_from_gettimeofday, METH_VARARGS, NULL}, { (char *)"idmef_time_set_from_string", _wrap_idmef_time_set_from_string, METH_VARARGS, NULL}, { (char *)"idmef_time_set_from_ntpstamp", _wrap_idmef_time_set_from_ntpstamp, METH_VARARGS, NULL}, { (char *)"idmef_time_set_from_timeval", _wrap_idmef_time_set_from_timeval, METH_VARARGS, NULL}, { (char *)"idmef_time_destroy_internal", _wrap_idmef_time_destroy_internal, METH_VARARGS, NULL}, { (char *)"idmef_time_destroy", _wrap_idmef_time_destroy, METH_VARARGS, NULL}, { (char *)"idmef_time_clone", _wrap_idmef_time_clone, METH_VARARGS, NULL}, { (char *)"idmef_time_copy", _wrap_idmef_time_copy, METH_VARARGS, NULL}, { (char *)"idmef_time_set_sec", _wrap_idmef_time_set_sec, METH_VARARGS, NULL}, { (char *)"idmef_time_set_usec", _wrap_idmef_time_set_usec, METH_VARARGS, NULL}, { (char *)"idmef_time_set_gmt_offset", _wrap_idmef_time_set_gmt_offset, METH_VARARGS, NULL}, { (char *)"idmef_time_get_sec", _wrap_idmef_time_get_sec, METH_VARARGS, NULL}, { (char *)"idmef_time_get_usec", _wrap_idmef_time_get_usec, METH_VARARGS, NULL}, { (char *)"idmef_time_get_gmt_offset", _wrap_idmef_time_get_gmt_offset, METH_VARARGS, NULL}, { (char *)"idmef_time_to_string", _wrap_idmef_time_to_string, METH_VARARGS, NULL}, { (char *)"idmef_time_to_ntpstamp", _wrap_idmef_time_to_ntpstamp, METH_VARARGS, NULL}, { (char *)"idmef_time_compare", _wrap_idmef_time_compare, METH_VARARGS, NULL}, { (char *)"idmef_data_t_refcount_set", _wrap_idmef_data_t_refcount_set, METH_VARARGS, NULL}, { (char *)"idmef_data_t_refcount_get", _wrap_idmef_data_t_refcount_get, METH_VARARGS, NULL}, { (char *)"idmef_data_t_flags_set", _wrap_idmef_data_t_flags_set, METH_VARARGS, NULL}, { (char *)"idmef_data_t_flags_get", _wrap_idmef_data_t_flags_get, METH_VARARGS, NULL}, { (char *)"idmef_data_t_type_set", _wrap_idmef_data_t_type_set, METH_VARARGS, NULL}, { (char *)"idmef_data_t_type_get", _wrap_idmef_data_t_type_get, METH_VARARGS, NULL}, { (char *)"idmef_data_t_len_set", _wrap_idmef_data_t_len_set, METH_VARARGS, NULL}, { (char *)"idmef_data_t_len_get", _wrap_idmef_data_t_len_get, METH_VARARGS, NULL}, { (char *)"idmef_data_t_list_set", _wrap_idmef_data_t_list_set, METH_VARARGS, NULL}, { (char *)"idmef_data_t_list_get", _wrap_idmef_data_t_list_get, METH_VARARGS, NULL}, { (char *)"idmef_data_t_data_get", _wrap_idmef_data_t_data_get, METH_VARARGS, NULL}, { (char *)"new_idmef_data_t", _wrap_new_idmef_data_t, METH_VARARGS, NULL}, { (char *)"delete_idmef_data_t", _wrap_delete_idmef_data_t, METH_VARARGS, NULL}, { (char *)"idmef_data_t_data_char_data_set", _wrap_idmef_data_t_data_char_data_set, METH_VARARGS, NULL}, { (char *)"idmef_data_t_data_char_data_get", _wrap_idmef_data_t_data_char_data_get, METH_VARARGS, NULL}, { (char *)"idmef_data_t_data_byte_data_set", _wrap_idmef_data_t_data_byte_data_set, METH_VARARGS, NULL}, { (char *)"idmef_data_t_data_byte_data_get", _wrap_idmef_data_t_data_byte_data_get, METH_VARARGS, NULL}, { (char *)"idmef_data_t_data_uint32_data_set", _wrap_idmef_data_t_data_uint32_data_set, METH_VARARGS, NULL}, { (char *)"idmef_data_t_data_uint32_data_get", _wrap_idmef_data_t_data_uint32_data_get, METH_VARARGS, NULL}, { (char *)"idmef_data_t_data_uint64_data_set", _wrap_idmef_data_t_data_uint64_data_set, METH_VARARGS, NULL}, { (char *)"idmef_data_t_data_uint64_data_get", _wrap_idmef_data_t_data_uint64_data_get, METH_VARARGS, NULL}, { (char *)"idmef_data_t_data_float_data_set", _wrap_idmef_data_t_data_float_data_set, METH_VARARGS, NULL}, { (char *)"idmef_data_t_data_float_data_get", _wrap_idmef_data_t_data_float_data_get, METH_VARARGS, NULL}, { (char *)"idmef_data_t_data_rw_data_set", _wrap_idmef_data_t_data_rw_data_set, METH_VARARGS, NULL}, { (char *)"idmef_data_t_data_rw_data_get", _wrap_idmef_data_t_data_rw_data_get, METH_VARARGS, NULL}, { (char *)"idmef_data_t_data_ro_data_set", _wrap_idmef_data_t_data_ro_data_set, METH_VARARGS, NULL}, { (char *)"idmef_data_t_data_ro_data_get", _wrap_idmef_data_t_data_ro_data_get, METH_VARARGS, NULL}, { (char *)"new_idmef_data_t_data", _wrap_new_idmef_data_t_data, METH_VARARGS, NULL}, { (char *)"delete_idmef_data_t_data", _wrap_delete_idmef_data_t_data, METH_VARARGS, NULL}, { (char *)"idmef_data_new", _wrap_idmef_data_new, METH_VARARGS, NULL}, { (char *)"idmef_data_ref", _wrap_idmef_data_ref, METH_VARARGS, NULL}, { (char *)"idmef_data_new_char", _wrap_idmef_data_new_char, METH_VARARGS, NULL}, { (char *)"idmef_data_new_byte", _wrap_idmef_data_new_byte, METH_VARARGS, NULL}, { (char *)"idmef_data_new_uint32", _wrap_idmef_data_new_uint32, METH_VARARGS, NULL}, { (char *)"idmef_data_new_uint64", _wrap_idmef_data_new_uint64, METH_VARARGS, NULL}, { (char *)"idmef_data_new_float", _wrap_idmef_data_new_float, METH_VARARGS, NULL}, { (char *)"idmef_data_set_char", _wrap_idmef_data_set_char, METH_VARARGS, NULL}, { (char *)"idmef_data_set_byte", _wrap_idmef_data_set_byte, METH_VARARGS, NULL}, { (char *)"idmef_data_set_uint32", _wrap_idmef_data_set_uint32, METH_VARARGS, NULL}, { (char *)"idmef_data_set_uint64", _wrap_idmef_data_set_uint64, METH_VARARGS, NULL}, { (char *)"idmef_data_set_float", _wrap_idmef_data_set_float, METH_VARARGS, NULL}, { (char *)"idmef_data_set_ptr_dup_fast", _wrap_idmef_data_set_ptr_dup_fast, METH_VARARGS, NULL}, { (char *)"idmef_data_set_ptr_ref_fast", _wrap_idmef_data_set_ptr_ref_fast, METH_VARARGS, NULL}, { (char *)"idmef_data_set_ptr_nodup_fast", _wrap_idmef_data_set_ptr_nodup_fast, METH_VARARGS, NULL}, { (char *)"idmef_data_new_ptr_dup_fast", _wrap_idmef_data_new_ptr_dup_fast, METH_VARARGS, NULL}, { (char *)"idmef_data_new_ptr_ref_fast", _wrap_idmef_data_new_ptr_ref_fast, METH_VARARGS, NULL}, { (char *)"idmef_data_new_ptr_nodup_fast", _wrap_idmef_data_new_ptr_nodup_fast, METH_VARARGS, NULL}, { (char *)"idmef_data_set_char_string_dup_fast", _wrap_idmef_data_set_char_string_dup_fast, METH_VARARGS, NULL}, { (char *)"idmef_data_new_char_string_dup_fast", _wrap_idmef_data_new_char_string_dup_fast, METH_VARARGS, NULL}, { (char *)"idmef_data_new_char_string_ref_fast", _wrap_idmef_data_new_char_string_ref_fast, METH_VARARGS, NULL}, { (char *)"idmef_data_new_char_string_nodup_fast", _wrap_idmef_data_new_char_string_nodup_fast, METH_VARARGS, NULL}, { (char *)"idmef_data_set_char_string_ref_fast", _wrap_idmef_data_set_char_string_ref_fast, METH_VARARGS, NULL}, { (char *)"idmef_data_set_char_string_nodup_fast", _wrap_idmef_data_set_char_string_nodup_fast, METH_VARARGS, NULL}, { (char *)"idmef_data_new_char_string_ref", _wrap_idmef_data_new_char_string_ref, METH_VARARGS, NULL}, { (char *)"idmef_data_new_char_string_dup", _wrap_idmef_data_new_char_string_dup, METH_VARARGS, NULL}, { (char *)"idmef_data_new_char_string_nodup", _wrap_idmef_data_new_char_string_nodup, METH_VARARGS, NULL}, { (char *)"idmef_data_set_char_string_ref", _wrap_idmef_data_set_char_string_ref, METH_VARARGS, NULL}, { (char *)"idmef_data_set_char_string_dup", _wrap_idmef_data_set_char_string_dup, METH_VARARGS, NULL}, { (char *)"idmef_data_set_char_string_nodup", _wrap_idmef_data_set_char_string_nodup, METH_VARARGS, NULL}, { (char *)"idmef_data_new_byte_string_ref", _wrap_idmef_data_new_byte_string_ref, METH_VARARGS, NULL}, { (char *)"idmef_data_new_byte_string_dup", _wrap_idmef_data_new_byte_string_dup, METH_VARARGS, NULL}, { (char *)"idmef_data_new_byte_string_nodup", _wrap_idmef_data_new_byte_string_nodup, METH_VARARGS, NULL}, { (char *)"idmef_data_set_byte_string_ref", _wrap_idmef_data_set_byte_string_ref, METH_VARARGS, NULL}, { (char *)"idmef_data_set_byte_string_dup", _wrap_idmef_data_set_byte_string_dup, METH_VARARGS, NULL}, { (char *)"idmef_data_set_byte_string_nodup", _wrap_idmef_data_set_byte_string_nodup, METH_VARARGS, NULL}, { (char *)"idmef_data_destroy", _wrap_idmef_data_destroy, METH_VARARGS, NULL}, { (char *)"idmef_data_copy_ref", _wrap_idmef_data_copy_ref, METH_VARARGS, NULL}, { (char *)"idmef_data_copy_dup", _wrap_idmef_data_copy_dup, METH_VARARGS, NULL}, { (char *)"idmef_data_clone", _wrap_idmef_data_clone, METH_VARARGS, NULL}, { (char *)"idmef_data_get_type", _wrap_idmef_data_get_type, METH_VARARGS, NULL}, { (char *)"idmef_data_get_len", _wrap_idmef_data_get_len, METH_VARARGS, NULL}, { (char *)"idmef_data_get_data", _wrap_idmef_data_get_data, METH_VARARGS, NULL}, { (char *)"idmef_data_get_char", _wrap_idmef_data_get_char, METH_VARARGS, NULL}, { (char *)"idmef_data_get_byte", _wrap_idmef_data_get_byte, METH_VARARGS, NULL}, { (char *)"idmef_data_get_uint32", _wrap_idmef_data_get_uint32, METH_VARARGS, NULL}, { (char *)"idmef_data_get_uint64", _wrap_idmef_data_get_uint64, METH_VARARGS, NULL}, { (char *)"idmef_data_get_float", _wrap_idmef_data_get_float, METH_VARARGS, NULL}, { (char *)"idmef_data_get_char_string", _wrap_idmef_data_get_char_string, METH_VARARGS, NULL}, { (char *)"idmef_data_get_byte_string", _wrap_idmef_data_get_byte_string, METH_VARARGS, NULL}, { (char *)"idmef_data_is_empty", _wrap_idmef_data_is_empty, METH_VARARGS, NULL}, { (char *)"idmef_data_to_string", _wrap_idmef_data_to_string, METH_VARARGS, NULL}, { (char *)"idmef_data_destroy_internal", _wrap_idmef_data_destroy_internal, METH_VARARGS, NULL}, { (char *)"idmef_data_compare", _wrap_idmef_data_compare, METH_VARARGS, NULL}, { (char *)"idmef_criterion_operator_to_string", _wrap_idmef_criterion_operator_to_string, METH_VARARGS, NULL}, { (char *)"idmef_criterion_new", _wrap_idmef_criterion_new, METH_VARARGS, NULL}, { (char *)"idmef_criterion_destroy", _wrap_idmef_criterion_destroy, METH_VARARGS, NULL}, { (char *)"idmef_criteria_ref", _wrap_idmef_criteria_ref, METH_VARARGS, NULL}, { (char *)"idmef_criterion_clone", _wrap_idmef_criterion_clone, METH_VARARGS, NULL}, { (char *)"idmef_criterion_print", _wrap_idmef_criterion_print, METH_VARARGS, NULL}, { (char *)"idmef_criterion_to_string", _wrap_idmef_criterion_to_string, METH_VARARGS, NULL}, { (char *)"idmef_criterion_get_path", _wrap_idmef_criterion_get_path, METH_VARARGS, NULL}, { (char *)"idmef_criterion_get_value", _wrap_idmef_criterion_get_value, METH_VARARGS, NULL}, { (char *)"idmef_criterion_get_operator", _wrap_idmef_criterion_get_operator, METH_VARARGS, NULL}, { (char *)"idmef_criterion_match", _wrap_idmef_criterion_match, METH_VARARGS, NULL}, { (char *)"idmef_criteria_new", _wrap_idmef_criteria_new, METH_VARARGS, NULL}, { (char *)"idmef_criteria_destroy", _wrap_idmef_criteria_destroy, METH_VARARGS, NULL}, { (char *)"idmef_criteria_clone", _wrap_idmef_criteria_clone, METH_VARARGS, NULL}, { (char *)"idmef_criteria_print", _wrap_idmef_criteria_print, METH_VARARGS, NULL}, { (char *)"idmef_criteria_to_string", _wrap_idmef_criteria_to_string, METH_VARARGS, NULL}, { (char *)"idmef_criteria_is_criterion", _wrap_idmef_criteria_is_criterion, METH_VARARGS, NULL}, { (char *)"idmef_criteria_get_criterion", _wrap_idmef_criteria_get_criterion, METH_VARARGS, NULL}, { (char *)"idmef_criteria_set_criterion", _wrap_idmef_criteria_set_criterion, METH_VARARGS, NULL}, { (char *)"idmef_criteria_or_criteria", _wrap_idmef_criteria_or_criteria, METH_VARARGS, NULL}, { (char *)"idmef_criteria_and_criteria", _wrap_idmef_criteria_and_criteria, METH_VARARGS, NULL}, { (char *)"idmef_criteria_match", _wrap_idmef_criteria_match, METH_VARARGS, NULL}, { (char *)"idmef_criteria_get_or", _wrap_idmef_criteria_get_or, METH_VARARGS, NULL}, { (char *)"idmef_criteria_get_and", _wrap_idmef_criteria_get_and, METH_VARARGS, NULL}, { (char *)"idmef_criteria_new_from_string", _wrap_idmef_criteria_new_from_string, METH_VARARGS, NULL}, { (char *)"idmef_criteria_set_negation", _wrap_idmef_criteria_set_negation, METH_VARARGS, NULL}, { (char *)"idmef_criteria_get_negation", _wrap_idmef_criteria_get_negation, METH_VARARGS, NULL}, { (char *)"idmef_additional_data_read", _wrap_idmef_additional_data_read, METH_VARARGS, NULL}, { (char *)"idmef_reference_read", _wrap_idmef_reference_read, METH_VARARGS, NULL}, { (char *)"idmef_classification_read", _wrap_idmef_classification_read, METH_VARARGS, NULL}, { (char *)"idmef_user_id_read", _wrap_idmef_user_id_read, METH_VARARGS, NULL}, { (char *)"idmef_user_read", _wrap_idmef_user_read, METH_VARARGS, NULL}, { (char *)"idmef_address_read", _wrap_idmef_address_read, METH_VARARGS, NULL}, { (char *)"idmef_process_read", _wrap_idmef_process_read, METH_VARARGS, NULL}, { (char *)"idmef_web_service_read", _wrap_idmef_web_service_read, METH_VARARGS, NULL}, { (char *)"idmef_snmp_service_read", _wrap_idmef_snmp_service_read, METH_VARARGS, NULL}, { (char *)"idmef_service_read", _wrap_idmef_service_read, METH_VARARGS, NULL}, { (char *)"idmef_node_read", _wrap_idmef_node_read, METH_VARARGS, NULL}, { (char *)"idmef_source_read", _wrap_idmef_source_read, METH_VARARGS, NULL}, { (char *)"idmef_file_access_read", _wrap_idmef_file_access_read, METH_VARARGS, NULL}, { (char *)"idmef_inode_read", _wrap_idmef_inode_read, METH_VARARGS, NULL}, { (char *)"idmef_checksum_read", _wrap_idmef_checksum_read, METH_VARARGS, NULL}, { (char *)"idmef_file_read", _wrap_idmef_file_read, METH_VARARGS, NULL}, { (char *)"idmef_linkage_read", _wrap_idmef_linkage_read, METH_VARARGS, NULL}, { (char *)"idmef_target_read", _wrap_idmef_target_read, METH_VARARGS, NULL}, { (char *)"idmef_analyzer_read", _wrap_idmef_analyzer_read, METH_VARARGS, NULL}, { (char *)"idmef_alertident_read", _wrap_idmef_alertident_read, METH_VARARGS, NULL}, { (char *)"idmef_impact_read", _wrap_idmef_impact_read, METH_VARARGS, NULL}, { (char *)"idmef_action_read", _wrap_idmef_action_read, METH_VARARGS, NULL}, { (char *)"idmef_confidence_read", _wrap_idmef_confidence_read, METH_VARARGS, NULL}, { (char *)"idmef_assessment_read", _wrap_idmef_assessment_read, METH_VARARGS, NULL}, { (char *)"idmef_tool_alert_read", _wrap_idmef_tool_alert_read, METH_VARARGS, NULL}, { (char *)"idmef_correlation_alert_read", _wrap_idmef_correlation_alert_read, METH_VARARGS, NULL}, { (char *)"idmef_overflow_alert_read", _wrap_idmef_overflow_alert_read, METH_VARARGS, NULL}, { (char *)"idmef_alert_read", _wrap_idmef_alert_read, METH_VARARGS, NULL}, { (char *)"idmef_heartbeat_read", _wrap_idmef_heartbeat_read, METH_VARARGS, NULL}, { (char *)"idmef_message_read", _wrap_idmef_message_read, METH_VARARGS, NULL}, { (char *)"idmef_additional_data_write", _wrap_idmef_additional_data_write, METH_VARARGS, NULL}, { (char *)"idmef_reference_write", _wrap_idmef_reference_write, METH_VARARGS, NULL}, { (char *)"idmef_classification_write", _wrap_idmef_classification_write, METH_VARARGS, NULL}, { (char *)"idmef_user_id_write", _wrap_idmef_user_id_write, METH_VARARGS, NULL}, { (char *)"idmef_user_write", _wrap_idmef_user_write, METH_VARARGS, NULL}, { (char *)"idmef_address_write", _wrap_idmef_address_write, METH_VARARGS, NULL}, { (char *)"idmef_process_write", _wrap_idmef_process_write, METH_VARARGS, NULL}, { (char *)"idmef_web_service_write", _wrap_idmef_web_service_write, METH_VARARGS, NULL}, { (char *)"idmef_snmp_service_write", _wrap_idmef_snmp_service_write, METH_VARARGS, NULL}, { (char *)"idmef_service_write", _wrap_idmef_service_write, METH_VARARGS, NULL}, { (char *)"idmef_node_write", _wrap_idmef_node_write, METH_VARARGS, NULL}, { (char *)"idmef_source_write", _wrap_idmef_source_write, METH_VARARGS, NULL}, { (char *)"idmef_file_access_write", _wrap_idmef_file_access_write, METH_VARARGS, NULL}, { (char *)"idmef_inode_write", _wrap_idmef_inode_write, METH_VARARGS, NULL}, { (char *)"idmef_checksum_write", _wrap_idmef_checksum_write, METH_VARARGS, NULL}, { (char *)"idmef_file_write", _wrap_idmef_file_write, METH_VARARGS, NULL}, { (char *)"idmef_linkage_write", _wrap_idmef_linkage_write, METH_VARARGS, NULL}, { (char *)"idmef_target_write", _wrap_idmef_target_write, METH_VARARGS, NULL}, { (char *)"idmef_analyzer_write", _wrap_idmef_analyzer_write, METH_VARARGS, NULL}, { (char *)"idmef_alertident_write", _wrap_idmef_alertident_write, METH_VARARGS, NULL}, { (char *)"idmef_impact_write", _wrap_idmef_impact_write, METH_VARARGS, NULL}, { (char *)"idmef_action_write", _wrap_idmef_action_write, METH_VARARGS, NULL}, { (char *)"idmef_confidence_write", _wrap_idmef_confidence_write, METH_VARARGS, NULL}, { (char *)"idmef_assessment_write", _wrap_idmef_assessment_write, METH_VARARGS, NULL}, { (char *)"idmef_tool_alert_write", _wrap_idmef_tool_alert_write, METH_VARARGS, NULL}, { (char *)"idmef_correlation_alert_write", _wrap_idmef_correlation_alert_write, METH_VARARGS, NULL}, { (char *)"idmef_overflow_alert_write", _wrap_idmef_overflow_alert_write, METH_VARARGS, NULL}, { (char *)"idmef_alert_write", _wrap_idmef_alert_write, METH_VARARGS, NULL}, { (char *)"idmef_heartbeat_write", _wrap_idmef_heartbeat_write, METH_VARARGS, NULL}, { (char *)"idmef_message_write", _wrap_idmef_message_write, METH_VARARGS, NULL}, { (char *)"idmef_additional_data_new_real", _wrap_idmef_additional_data_new_real, METH_VARARGS, NULL}, { (char *)"idmef_additional_data_new_byte", _wrap_idmef_additional_data_new_byte, METH_VARARGS, NULL}, { (char *)"idmef_additional_data_new_integer", _wrap_idmef_additional_data_new_integer, METH_VARARGS, NULL}, { (char *)"idmef_additional_data_new_boolean", _wrap_idmef_additional_data_new_boolean, METH_VARARGS, NULL}, { (char *)"idmef_additional_data_new_character", _wrap_idmef_additional_data_new_character, METH_VARARGS, NULL}, { (char *)"idmef_additional_data_set_real", _wrap_idmef_additional_data_set_real, METH_VARARGS, NULL}, { (char *)"idmef_additional_data_set_byte", _wrap_idmef_additional_data_set_byte, METH_VARARGS, NULL}, { (char *)"idmef_additional_data_set_integer", _wrap_idmef_additional_data_set_integer, METH_VARARGS, NULL}, { (char *)"idmef_additional_data_set_boolean", _wrap_idmef_additional_data_set_boolean, METH_VARARGS, NULL}, { (char *)"idmef_additional_data_set_character", _wrap_idmef_additional_data_set_character, METH_VARARGS, NULL}, { (char *)"idmef_additional_data_new_string_ref_fast", _wrap_idmef_additional_data_new_string_ref_fast, METH_VARARGS, NULL}, { (char *)"idmef_additional_data_new_string_ref", _wrap_idmef_additional_data_new_string_ref, METH_VARARGS, NULL}, { (char *)"idmef_additional_data_set_string_ref_fast", _wrap_idmef_additional_data_set_string_ref_fast, METH_VARARGS, NULL}, { (char *)"idmef_additional_data_set_string_ref", _wrap_idmef_additional_data_set_string_ref, METH_VARARGS, NULL}, { (char *)"idmef_additional_data_new_string_dup_fast", _wrap_idmef_additional_data_new_string_dup_fast, METH_VARARGS, NULL}, { (char *)"idmef_additional_data_new_string_dup", _wrap_idmef_additional_data_new_string_dup, METH_VARARGS, NULL}, { (char *)"idmef_additional_data_set_string_dup_fast", _wrap_idmef_additional_data_set_string_dup_fast, METH_VARARGS, NULL}, { (char *)"idmef_additional_data_set_string_dup", _wrap_idmef_additional_data_set_string_dup, METH_VARARGS, NULL}, { (char *)"idmef_additional_data_new_string_nodup_fast", _wrap_idmef_additional_data_new_string_nodup_fast, METH_VARARGS, NULL}, { (char *)"idmef_additional_data_new_string_nodup", _wrap_idmef_additional_data_new_string_nodup, METH_VARARGS, NULL}, { (char *)"idmef_additional_data_set_string_nodup_fast", _wrap_idmef_additional_data_set_string_nodup_fast, METH_VARARGS, NULL}, { (char *)"idmef_additional_data_set_string_nodup", _wrap_idmef_additional_data_set_string_nodup, METH_VARARGS, NULL}, { (char *)"idmef_additional_data_new_ntpstamp_ref_fast", _wrap_idmef_additional_data_new_ntpstamp_ref_fast, METH_VARARGS, NULL}, { (char *)"idmef_additional_data_new_ntpstamp_ref", _wrap_idmef_additional_data_new_ntpstamp_ref, METH_VARARGS, NULL}, { (char *)"idmef_additional_data_set_ntpstamp_ref_fast", _wrap_idmef_additional_data_set_ntpstamp_ref_fast, METH_VARARGS, NULL}, { (char *)"idmef_additional_data_set_ntpstamp_ref", _wrap_idmef_additional_data_set_ntpstamp_ref, METH_VARARGS, NULL}, { (char *)"idmef_additional_data_new_ntpstamp_dup_fast", _wrap_idmef_additional_data_new_ntpstamp_dup_fast, METH_VARARGS, NULL}, { (char *)"idmef_additional_data_new_ntpstamp_dup", _wrap_idmef_additional_data_new_ntpstamp_dup, METH_VARARGS, NULL}, { (char *)"idmef_additional_data_set_ntpstamp_dup_fast", _wrap_idmef_additional_data_set_ntpstamp_dup_fast, METH_VARARGS, NULL}, { (char *)"idmef_additional_data_set_ntpstamp_dup", _wrap_idmef_additional_data_set_ntpstamp_dup, METH_VARARGS, NULL}, { (char *)"idmef_additional_data_new_ntpstamp_nodup_fast", _wrap_idmef_additional_data_new_ntpstamp_nodup_fast, METH_VARARGS, NULL}, { (char *)"idmef_additional_data_new_ntpstamp_nodup", _wrap_idmef_additional_data_new_ntpstamp_nodup, METH_VARARGS, NULL}, { (char *)"idmef_additional_data_set_ntpstamp_nodup_fast", _wrap_idmef_additional_data_set_ntpstamp_nodup_fast, METH_VARARGS, NULL}, { (char *)"idmef_additional_data_set_ntpstamp_nodup", _wrap_idmef_additional_data_set_ntpstamp_nodup, METH_VARARGS, NULL}, { (char *)"idmef_additional_data_new_date_time_ref_fast", _wrap_idmef_additional_data_new_date_time_ref_fast, METH_VARARGS, NULL}, { (char *)"idmef_additional_data_new_date_time_ref", _wrap_idmef_additional_data_new_date_time_ref, METH_VARARGS, NULL}, { (char *)"idmef_additional_data_set_date_time_ref_fast", _wrap_idmef_additional_data_set_date_time_ref_fast, METH_VARARGS, NULL}, { (char *)"idmef_additional_data_set_date_time_ref", _wrap_idmef_additional_data_set_date_time_ref, METH_VARARGS, NULL}, { (char *)"idmef_additional_data_new_date_time_dup_fast", _wrap_idmef_additional_data_new_date_time_dup_fast, METH_VARARGS, NULL}, { (char *)"idmef_additional_data_new_date_time_dup", _wrap_idmef_additional_data_new_date_time_dup, METH_VARARGS, NULL}, { (char *)"idmef_additional_data_set_date_time_dup_fast", _wrap_idmef_additional_data_set_date_time_dup_fast, METH_VARARGS, NULL}, { (char *)"idmef_additional_data_set_date_time_dup", _wrap_idmef_additional_data_set_date_time_dup, METH_VARARGS, NULL}, { (char *)"idmef_additional_data_new_date_time_nodup_fast", _wrap_idmef_additional_data_new_date_time_nodup_fast, METH_VARARGS, NULL}, { (char *)"idmef_additional_data_new_date_time_nodup", _wrap_idmef_additional_data_new_date_time_nodup, METH_VARARGS, NULL}, { (char *)"idmef_additional_data_set_date_time_nodup_fast", _wrap_idmef_additional_data_set_date_time_nodup_fast, METH_VARARGS, NULL}, { (char *)"idmef_additional_data_set_date_time_nodup", _wrap_idmef_additional_data_set_date_time_nodup, METH_VARARGS, NULL}, { (char *)"idmef_additional_data_new_portlist_ref_fast", _wrap_idmef_additional_data_new_portlist_ref_fast, METH_VARARGS, NULL}, { (char *)"idmef_additional_data_new_portlist_ref", _wrap_idmef_additional_data_new_portlist_ref, METH_VARARGS, NULL}, { (char *)"idmef_additional_data_set_portlist_ref_fast", _wrap_idmef_additional_data_set_portlist_ref_fast, METH_VARARGS, NULL}, { (char *)"idmef_additional_data_set_portlist_ref", _wrap_idmef_additional_data_set_portlist_ref, METH_VARARGS, NULL}, { (char *)"idmef_additional_data_new_portlist_dup_fast", _wrap_idmef_additional_data_new_portlist_dup_fast, METH_VARARGS, NULL}, { (char *)"idmef_additional_data_new_portlist_dup", _wrap_idmef_additional_data_new_portlist_dup, METH_VARARGS, NULL}, { (char *)"idmef_additional_data_set_portlist_dup_fast", _wrap_idmef_additional_data_set_portlist_dup_fast, METH_VARARGS, NULL}, { (char *)"idmef_additional_data_set_portlist_dup", _wrap_idmef_additional_data_set_portlist_dup, METH_VARARGS, NULL}, { (char *)"idmef_additional_data_new_portlist_nodup_fast", _wrap_idmef_additional_data_new_portlist_nodup_fast, METH_VARARGS, NULL}, { (char *)"idmef_additional_data_new_portlist_nodup", _wrap_idmef_additional_data_new_portlist_nodup, METH_VARARGS, NULL}, { (char *)"idmef_additional_data_set_portlist_nodup_fast", _wrap_idmef_additional_data_set_portlist_nodup_fast, METH_VARARGS, NULL}, { (char *)"idmef_additional_data_set_portlist_nodup", _wrap_idmef_additional_data_set_portlist_nodup, METH_VARARGS, NULL}, { (char *)"idmef_additional_data_new_xml_ref_fast", _wrap_idmef_additional_data_new_xml_ref_fast, METH_VARARGS, NULL}, { (char *)"idmef_additional_data_new_xml_ref", _wrap_idmef_additional_data_new_xml_ref, METH_VARARGS, NULL}, { (char *)"idmef_additional_data_set_xml_ref_fast", _wrap_idmef_additional_data_set_xml_ref_fast, METH_VARARGS, NULL}, { (char *)"idmef_additional_data_set_xml_ref", _wrap_idmef_additional_data_set_xml_ref, METH_VARARGS, NULL}, { (char *)"idmef_additional_data_new_xml_dup_fast", _wrap_idmef_additional_data_new_xml_dup_fast, METH_VARARGS, NULL}, { (char *)"idmef_additional_data_new_xml_dup", _wrap_idmef_additional_data_new_xml_dup, METH_VARARGS, NULL}, { (char *)"idmef_additional_data_set_xml_dup_fast", _wrap_idmef_additional_data_set_xml_dup_fast, METH_VARARGS, NULL}, { (char *)"idmef_additional_data_set_xml_dup", _wrap_idmef_additional_data_set_xml_dup, METH_VARARGS, NULL}, { (char *)"idmef_additional_data_new_xml_nodup_fast", _wrap_idmef_additional_data_new_xml_nodup_fast, METH_VARARGS, NULL}, { (char *)"idmef_additional_data_new_xml_nodup", _wrap_idmef_additional_data_new_xml_nodup, METH_VARARGS, NULL}, { (char *)"idmef_additional_data_set_xml_nodup_fast", _wrap_idmef_additional_data_set_xml_nodup_fast, METH_VARARGS, NULL}, { (char *)"idmef_additional_data_set_xml_nodup", _wrap_idmef_additional_data_set_xml_nodup, METH_VARARGS, NULL}, { (char *)"idmef_additional_data_new_byte_string_ref", _wrap_idmef_additional_data_new_byte_string_ref, METH_VARARGS, NULL}, { (char *)"idmef_additional_data_set_byte_string_ref", _wrap_idmef_additional_data_set_byte_string_ref, METH_VARARGS, NULL}, { (char *)"idmef_additional_data_new_byte_string_dup", _wrap_idmef_additional_data_new_byte_string_dup, METH_VARARGS, NULL}, { (char *)"idmef_additional_data_set_byte_string_dup", _wrap_idmef_additional_data_set_byte_string_dup, METH_VARARGS, NULL}, { (char *)"idmef_additional_data_new_byte_string_nodup", _wrap_idmef_additional_data_new_byte_string_nodup, METH_VARARGS, NULL}, { (char *)"idmef_additional_data_set_byte_string_nodup", _wrap_idmef_additional_data_set_byte_string_nodup, METH_VARARGS, NULL}, { (char *)"idmef_additional_data_copy_ref", _wrap_idmef_additional_data_copy_ref, METH_VARARGS, NULL}, { (char *)"idmef_additional_data_copy_dup", _wrap_idmef_additional_data_copy_dup, METH_VARARGS, NULL}, { (char *)"idmef_additional_data_get_real", _wrap_idmef_additional_data_get_real, METH_VARARGS, NULL}, { (char *)"idmef_additional_data_get_integer", _wrap_idmef_additional_data_get_integer, METH_VARARGS, NULL}, { (char *)"idmef_additional_data_get_boolean", _wrap_idmef_additional_data_get_boolean, METH_VARARGS, NULL}, { (char *)"idmef_additional_data_get_character", _wrap_idmef_additional_data_get_character, METH_VARARGS, NULL}, { (char *)"idmef_additional_data_get_byte", _wrap_idmef_additional_data_get_byte, METH_VARARGS, NULL}, { (char *)"idmef_additional_data_get_len", _wrap_idmef_additional_data_get_len, METH_VARARGS, NULL}, { (char *)"idmef_additional_data_is_empty", _wrap_idmef_additional_data_is_empty, METH_VARARGS, NULL}, { (char *)"idmef_additional_data_data_to_string", _wrap_idmef_additional_data_data_to_string, METH_VARARGS, NULL}, { (char *)"idmef_value_type_class_t_object_set", _wrap_idmef_value_type_class_t_object_set, METH_VARARGS, NULL}, { (char *)"idmef_value_type_class_t_object_get", _wrap_idmef_value_type_class_t_object_get, METH_VARARGS, NULL}, { (char *)"idmef_value_type_class_t_class_id_set", _wrap_idmef_value_type_class_t_class_id_set, METH_VARARGS, NULL}, { (char *)"idmef_value_type_class_t_class_id_get", _wrap_idmef_value_type_class_t_class_id_get, METH_VARARGS, NULL}, { (char *)"new_idmef_value_type_class_t", _wrap_new_idmef_value_type_class_t, METH_VARARGS, NULL}, { (char *)"delete_idmef_value_type_class_t", _wrap_delete_idmef_value_type_class_t, METH_VARARGS, NULL}, { (char *)"idmef_value_type_enum_t_value_set", _wrap_idmef_value_type_enum_t_value_set, METH_VARARGS, NULL}, { (char *)"idmef_value_type_enum_t_value_get", _wrap_idmef_value_type_enum_t_value_get, METH_VARARGS, NULL}, { (char *)"idmef_value_type_enum_t_class_id_set", _wrap_idmef_value_type_enum_t_class_id_set, METH_VARARGS, NULL}, { (char *)"idmef_value_type_enum_t_class_id_get", _wrap_idmef_value_type_enum_t_class_id_get, METH_VARARGS, NULL}, { (char *)"new_idmef_value_type_enum_t", _wrap_new_idmef_value_type_enum_t, METH_VARARGS, NULL}, { (char *)"delete_idmef_value_type_enum_t", _wrap_delete_idmef_value_type_enum_t, METH_VARARGS, NULL}, { (char *)"idmef_value_type_data_t_int8_val_set", _wrap_idmef_value_type_data_t_int8_val_set, METH_VARARGS, NULL}, { (char *)"idmef_value_type_data_t_int8_val_get", _wrap_idmef_value_type_data_t_int8_val_get, METH_VARARGS, NULL}, { (char *)"idmef_value_type_data_t_uint8_val_set", _wrap_idmef_value_type_data_t_uint8_val_set, METH_VARARGS, NULL}, { (char *)"idmef_value_type_data_t_uint8_val_get", _wrap_idmef_value_type_data_t_uint8_val_get, METH_VARARGS, NULL}, { (char *)"idmef_value_type_data_t_int16_val_set", _wrap_idmef_value_type_data_t_int16_val_set, METH_VARARGS, NULL}, { (char *)"idmef_value_type_data_t_int16_val_get", _wrap_idmef_value_type_data_t_int16_val_get, METH_VARARGS, NULL}, { (char *)"idmef_value_type_data_t_uint16_val_set", _wrap_idmef_value_type_data_t_uint16_val_set, METH_VARARGS, NULL}, { (char *)"idmef_value_type_data_t_uint16_val_get", _wrap_idmef_value_type_data_t_uint16_val_get, METH_VARARGS, NULL}, { (char *)"idmef_value_type_data_t_int32_val_set", _wrap_idmef_value_type_data_t_int32_val_set, METH_VARARGS, NULL}, { (char *)"idmef_value_type_data_t_int32_val_get", _wrap_idmef_value_type_data_t_int32_val_get, METH_VARARGS, NULL}, { (char *)"idmef_value_type_data_t_uint32_val_set", _wrap_idmef_value_type_data_t_uint32_val_set, METH_VARARGS, NULL}, { (char *)"idmef_value_type_data_t_uint32_val_get", _wrap_idmef_value_type_data_t_uint32_val_get, METH_VARARGS, NULL}, { (char *)"idmef_value_type_data_t_int64_val_set", _wrap_idmef_value_type_data_t_int64_val_set, METH_VARARGS, NULL}, { (char *)"idmef_value_type_data_t_int64_val_get", _wrap_idmef_value_type_data_t_int64_val_get, METH_VARARGS, NULL}, { (char *)"idmef_value_type_data_t_uint64_val_set", _wrap_idmef_value_type_data_t_uint64_val_set, METH_VARARGS, NULL}, { (char *)"idmef_value_type_data_t_uint64_val_get", _wrap_idmef_value_type_data_t_uint64_val_get, METH_VARARGS, NULL}, { (char *)"idmef_value_type_data_t_float_val_set", _wrap_idmef_value_type_data_t_float_val_set, METH_VARARGS, NULL}, { (char *)"idmef_value_type_data_t_float_val_get", _wrap_idmef_value_type_data_t_float_val_get, METH_VARARGS, NULL}, { (char *)"idmef_value_type_data_t_double_val_set", _wrap_idmef_value_type_data_t_double_val_set, METH_VARARGS, NULL}, { (char *)"idmef_value_type_data_t_double_val_get", _wrap_idmef_value_type_data_t_double_val_get, METH_VARARGS, NULL}, { (char *)"idmef_value_type_data_t_string_val_set", _wrap_idmef_value_type_data_t_string_val_set, METH_VARARGS, NULL}, { (char *)"idmef_value_type_data_t_string_val_get", _wrap_idmef_value_type_data_t_string_val_get, METH_VARARGS, NULL}, { (char *)"idmef_value_type_data_t_time_val_set", _wrap_idmef_value_type_data_t_time_val_set, METH_VARARGS, NULL}, { (char *)"idmef_value_type_data_t_time_val_get", _wrap_idmef_value_type_data_t_time_val_get, METH_VARARGS, NULL}, { (char *)"idmef_value_type_data_t_data_val_set", _wrap_idmef_value_type_data_t_data_val_set, METH_VARARGS, NULL}, { (char *)"idmef_value_type_data_t_data_val_get", _wrap_idmef_value_type_data_t_data_val_get, METH_VARARGS, NULL}, { (char *)"idmef_value_type_data_t_list_val_set", _wrap_idmef_value_type_data_t_list_val_set, METH_VARARGS, NULL}, { (char *)"idmef_value_type_data_t_list_val_get", _wrap_idmef_value_type_data_t_list_val_get, METH_VARARGS, NULL}, { (char *)"idmef_value_type_data_t_enum_val_set", _wrap_idmef_value_type_data_t_enum_val_set, METH_VARARGS, NULL}, { (char *)"idmef_value_type_data_t_enum_val_get", _wrap_idmef_value_type_data_t_enum_val_get, METH_VARARGS, NULL}, { (char *)"idmef_value_type_data_t_class_val_set", _wrap_idmef_value_type_data_t_class_val_set, METH_VARARGS, NULL}, { (char *)"idmef_value_type_data_t_class_val_get", _wrap_idmef_value_type_data_t_class_val_get, METH_VARARGS, NULL}, { (char *)"new_idmef_value_type_data_t", _wrap_new_idmef_value_type_data_t, METH_VARARGS, NULL}, { (char *)"delete_idmef_value_type_data_t", _wrap_delete_idmef_value_type_data_t, METH_VARARGS, NULL}, { (char *)"idmef_value_type_t_id_set", _wrap_idmef_value_type_t_id_set, METH_VARARGS, NULL}, { (char *)"idmef_value_type_t_id_get", _wrap_idmef_value_type_t_id_get, METH_VARARGS, NULL}, { (char *)"idmef_value_type_t_data_set", _wrap_idmef_value_type_t_data_set, METH_VARARGS, NULL}, { (char *)"idmef_value_type_t_data_get", _wrap_idmef_value_type_t_data_get, METH_VARARGS, NULL}, { (char *)"new_idmef_value_type_t", _wrap_new_idmef_value_type_t, METH_VARARGS, NULL}, { (char *)"delete_idmef_value_type_t", _wrap_delete_idmef_value_type_t, METH_VARARGS, NULL}, { (char *)"idmef_value_type_ref", _wrap_idmef_value_type_ref, METH_VARARGS, NULL}, { (char *)"idmef_value_type_copy", _wrap_idmef_value_type_copy, METH_VARARGS, NULL}, { (char *)"idmef_value_type_read", _wrap_idmef_value_type_read, METH_VARARGS, NULL}, { (char *)"idmef_value_type_write", _wrap_idmef_value_type_write, METH_VARARGS, NULL}, { (char *)"idmef_value_type_destroy", _wrap_idmef_value_type_destroy, METH_VARARGS, NULL}, { (char *)"idmef_value_type_clone", _wrap_idmef_value_type_clone, METH_VARARGS, NULL}, { (char *)"idmef_value_type_compare", _wrap_idmef_value_type_compare, METH_VARARGS, NULL}, { (char *)"idmef_value_type_check_operator", _wrap_idmef_value_type_check_operator, METH_VARARGS, NULL}, { (char *)"idmef_value_type_get_applicable_operators", _wrap_idmef_value_type_get_applicable_operators, METH_VARARGS, NULL}, { (char *)"idmef_value_type_to_string", _wrap_idmef_value_type_to_string, METH_VARARGS, NULL}, { (char *)"idmef_class_is_child_list", _wrap_idmef_class_is_child_list, METH_VARARGS, NULL}, { (char *)"idmef_class_get_child_class", _wrap_idmef_class_get_child_class, METH_VARARGS, NULL}, { (char *)"idmef_class_get_child_value_type", _wrap_idmef_class_get_child_value_type, METH_VARARGS, NULL}, { (char *)"idmef_class_enum_to_numeric", _wrap_idmef_class_enum_to_numeric, METH_VARARGS, NULL}, { (char *)"idmef_class_enum_to_string", _wrap_idmef_class_enum_to_string, METH_VARARGS, NULL}, { (char *)"idmef_class_get_child", _wrap_idmef_class_get_child, METH_VARARGS, NULL}, { (char *)"idmef_class_new_child", _wrap_idmef_class_new_child, METH_VARARGS, NULL}, { (char *)"idmef_class_destroy_child", _wrap_idmef_class_destroy_child, METH_VARARGS, NULL}, { (char *)"idmef_class_find", _wrap_idmef_class_find, METH_VARARGS, NULL}, { (char *)"idmef_class_find_child", _wrap_idmef_class_find_child, METH_VARARGS, NULL}, { (char *)"idmef_class_get_name", _wrap_idmef_class_get_name, METH_VARARGS, NULL}, { (char *)"idmef_class_get_child_name", _wrap_idmef_class_get_child_name, METH_VARARGS, NULL}, { (char *)"idmef_class_copy", _wrap_idmef_class_copy, METH_VARARGS, NULL}, { (char *)"idmef_class_clone", _wrap_idmef_class_clone, METH_VARARGS, NULL}, { (char *)"idmef_class_compare", _wrap_idmef_class_compare, METH_VARARGS, NULL}, { (char *)"idmef_class_ref", _wrap_idmef_class_ref, METH_VARARGS, NULL}, { (char *)"idmef_class_destroy", _wrap_idmef_class_destroy, METH_VARARGS, NULL}, { (char *)"prelude_connection_destroy", _wrap_prelude_connection_destroy, METH_VARARGS, NULL}, { (char *)"prelude_connection_ref", _wrap_prelude_connection_ref, METH_VARARGS, NULL}, { (char *)"prelude_connection_send", _wrap_prelude_connection_send, METH_VARARGS, NULL}, { (char *)"prelude_connection_recv", _wrap_prelude_connection_recv, METH_VARARGS, NULL}, { (char *)"prelude_connection_recv_idmef", _wrap_prelude_connection_recv_idmef, METH_VARARGS, NULL}, { (char *)"prelude_connection_connect", _wrap_prelude_connection_connect, METH_VARARGS, NULL}, { (char *)"prelude_connection_forward", _wrap_prelude_connection_forward, METH_VARARGS, NULL}, { (char *)"prelude_connection_get_local_addr", _wrap_prelude_connection_get_local_addr, METH_VARARGS, NULL}, { (char *)"prelude_connection_get_local_port", _wrap_prelude_connection_get_local_port, METH_VARARGS, NULL}, { (char *)"prelude_connection_get_peer_addr", _wrap_prelude_connection_get_peer_addr, METH_VARARGS, NULL}, { (char *)"prelude_connection_get_peer_port", _wrap_prelude_connection_get_peer_port, METH_VARARGS, NULL}, { (char *)"prelude_connection_is_alive", _wrap_prelude_connection_is_alive, METH_VARARGS, NULL}, { (char *)"prelude_connection_get_fd", _wrap_prelude_connection_get_fd, METH_VARARGS, NULL}, { (char *)"prelude_connection_close", _wrap_prelude_connection_close, METH_VARARGS, NULL}, { (char *)"prelude_connection_set_fd_ref", _wrap_prelude_connection_set_fd_ref, METH_VARARGS, NULL}, { (char *)"prelude_connection_set_fd_nodup", _wrap_prelude_connection_set_fd_nodup, METH_VARARGS, NULL}, { (char *)"prelude_connection_set_state", _wrap_prelude_connection_set_state, METH_VARARGS, NULL}, { (char *)"prelude_connection_get_state", _wrap_prelude_connection_get_state, METH_VARARGS, NULL}, { (char *)"prelude_connection_set_data", _wrap_prelude_connection_set_data, METH_VARARGS, NULL}, { (char *)"prelude_connection_get_data", _wrap_prelude_connection_get_data, METH_VARARGS, NULL}, { (char *)"prelude_connection_get_default_socket_filename", _wrap_prelude_connection_get_default_socket_filename, METH_VARARGS, NULL}, { (char *)"prelude_connection_get_permission", _wrap_prelude_connection_get_permission, METH_VARARGS, NULL}, { (char *)"prelude_connection_get_peer_analyzerid", _wrap_prelude_connection_get_peer_analyzerid, METH_VARARGS, NULL}, { (char *)"prelude_connection_set_peer_analyzerid", _wrap_prelude_connection_set_peer_analyzerid, METH_VARARGS, NULL}, { (char *)"prelude_connection_new", _wrap_prelude_connection_new, METH_VARARGS, NULL}, { (char *)"prelude_connection_new_msgbuf", _wrap_prelude_connection_new_msgbuf, METH_VARARGS, NULL}, { (char *)"prelude_connection_permission_to_string", _wrap_prelude_connection_permission_to_string, METH_VARARGS, NULL}, { (char *)"prelude_connection_permission_new_from_string", _wrap_prelude_connection_permission_new_from_string, METH_VARARGS, NULL}, { (char *)"prelude_connection_pool_broadcast", _wrap_prelude_connection_pool_broadcast, METH_VARARGS, NULL}, { (char *)"prelude_connection_pool_broadcast_async", _wrap_prelude_connection_pool_broadcast_async, METH_VARARGS, NULL}, { (char *)"prelude_connection_pool_init", _wrap_prelude_connection_pool_init, METH_VARARGS, NULL}, { (char *)"prelude_connection_pool_new", _wrap_prelude_connection_pool_new, METH_VARARGS, NULL}, { (char *)"prelude_connection_pool_get_connection_list", _wrap_prelude_connection_pool_get_connection_list, METH_VARARGS, NULL}, { (char *)"prelude_connection_pool_add_connection", _wrap_prelude_connection_pool_add_connection, METH_VARARGS, NULL}, { (char *)"prelude_connection_pool_del_connection", _wrap_prelude_connection_pool_del_connection, METH_VARARGS, NULL}, { (char *)"prelude_connection_pool_set_connection_dead", _wrap_prelude_connection_pool_set_connection_dead, METH_VARARGS, NULL}, { (char *)"prelude_connection_pool_set_connection_alive", _wrap_prelude_connection_pool_set_connection_alive, METH_VARARGS, NULL}, { (char *)"prelude_connection_pool_set_connection_string", _wrap_prelude_connection_pool_set_connection_string, METH_VARARGS, NULL}, { (char *)"prelude_connection_pool_get_connection_string", _wrap_prelude_connection_pool_get_connection_string, METH_VARARGS, NULL}, { (char *)"prelude_connection_pool_destroy", _wrap_prelude_connection_pool_destroy, METH_VARARGS, NULL}, { (char *)"prelude_connection_pool_ref", _wrap_prelude_connection_pool_ref, METH_VARARGS, NULL}, { (char *)"prelude_connection_pool_get_flags", _wrap_prelude_connection_pool_get_flags, METH_VARARGS, NULL}, { (char *)"prelude_connection_pool_set_flags", _wrap_prelude_connection_pool_set_flags, METH_VARARGS, NULL}, { (char *)"prelude_connection_pool_set_required_permission", _wrap_prelude_connection_pool_set_required_permission, METH_VARARGS, NULL}, { (char *)"prelude_connection_pool_set_data", _wrap_prelude_connection_pool_set_data, METH_VARARGS, NULL}, { (char *)"prelude_connection_pool_get_data", _wrap_prelude_connection_pool_get_data, METH_VARARGS, NULL}, { (char *)"prelude_connection_pool_recv", _wrap_prelude_connection_pool_recv, METH_VARARGS, NULL}, { (char *)"prelude_connection_pool_check_event", _wrap_prelude_connection_pool_check_event, METH_VARARGS, NULL}, { (char *)"prelude_connection_pool_set_global_event_handler", _wrap_prelude_connection_pool_set_global_event_handler, METH_VARARGS, NULL}, { (char *)"prelude_connection_pool_set_event_handler", _wrap_prelude_connection_pool_set_event_handler, METH_VARARGS, NULL}, { (char *)"prelude_option_set_priority", _wrap_prelude_option_set_priority, METH_VARARGS, NULL}, { (char *)"prelude_option_print", _wrap_prelude_option_print, METH_VARARGS, NULL}, { (char *)"prelude_option_wide_send_msg", _wrap_prelude_option_wide_send_msg, METH_VARARGS, NULL}, { (char *)"prelude_option_destroy", _wrap_prelude_option_destroy, METH_VARARGS, NULL}, { (char *)"prelude_option_read", _wrap_prelude_option_read, METH_VARARGS, NULL}, { (char *)"prelude_option_add", _wrap_prelude_option_add, METH_VARARGS, NULL}, { (char *)"prelude_option_set_type", _wrap_prelude_option_set_type, METH_VARARGS, NULL}, { (char *)"prelude_option_get_type", _wrap_prelude_option_get_type, METH_VARARGS, NULL}, { (char *)"prelude_option_set_warnings", _wrap_prelude_option_set_warnings, METH_VARARGS, NULL}, { (char *)"prelude_option_get_shortname", _wrap_prelude_option_get_shortname, METH_VARARGS, NULL}, { (char *)"prelude_option_get_longname", _wrap_prelude_option_get_longname, METH_VARARGS, NULL}, { (char *)"_prelude_option_set_private_data", _wrap__prelude_option_set_private_data, METH_VARARGS, NULL}, { (char *)"_prelude_option_get_private_data", _wrap__prelude_option_get_private_data, METH_VARARGS, NULL}, { (char *)"prelude_option_set_data", _wrap_prelude_option_set_data, METH_VARARGS, NULL}, { (char *)"prelude_option_get_data", _wrap_prelude_option_get_data, METH_VARARGS, NULL}, { (char *)"prelude_option_invoke_commit", _wrap_prelude_option_invoke_commit, METH_VARARGS, NULL}, { (char *)"prelude_option_invoke_set", _wrap_prelude_option_invoke_set, METH_VARARGS, NULL}, { (char *)"prelude_option_invoke_get", _wrap_prelude_option_invoke_get, METH_VARARGS, NULL}, { (char *)"prelude_option_invoke_destroy", _wrap_prelude_option_invoke_destroy, METH_VARARGS, NULL}, { (char *)"prelude_option_new_root", _wrap_prelude_option_new_root, METH_VARARGS, NULL}, { (char *)"prelude_option_new", _wrap_prelude_option_new, METH_VARARGS, NULL}, { (char *)"prelude_option_set_longopt", _wrap_prelude_option_set_longopt, METH_VARARGS, NULL}, { (char *)"prelude_option_get_longopt", _wrap_prelude_option_get_longopt, METH_VARARGS, NULL}, { (char *)"prelude_option_set_description", _wrap_prelude_option_set_description, METH_VARARGS, NULL}, { (char *)"prelude_option_get_description", _wrap_prelude_option_get_description, METH_VARARGS, NULL}, { (char *)"prelude_option_set_has_arg", _wrap_prelude_option_set_has_arg, METH_VARARGS, NULL}, { (char *)"prelude_option_get_has_arg", _wrap_prelude_option_get_has_arg, METH_VARARGS, NULL}, { (char *)"prelude_option_set_value", _wrap_prelude_option_set_value, METH_VARARGS, NULL}, { (char *)"prelude_option_get_value", _wrap_prelude_option_get_value, METH_VARARGS, NULL}, { (char *)"prelude_option_set_help", _wrap_prelude_option_set_help, METH_VARARGS, NULL}, { (char *)"prelude_option_get_help", _wrap_prelude_option_get_help, METH_VARARGS, NULL}, { (char *)"prelude_option_set_input_validation_regex", _wrap_prelude_option_set_input_validation_regex, METH_VARARGS, NULL}, { (char *)"prelude_option_get_input_validation_regex", _wrap_prelude_option_get_input_validation_regex, METH_VARARGS, NULL}, { (char *)"prelude_option_set_input_type", _wrap_prelude_option_set_input_type, METH_VARARGS, NULL}, { (char *)"prelude_option_get_input_type", _wrap_prelude_option_get_input_type, METH_VARARGS, NULL}, { (char *)"prelude_option_get_optlist", _wrap_prelude_option_get_optlist, METH_VARARGS, NULL}, { (char *)"prelude_option_get_next", _wrap_prelude_option_get_next, METH_VARARGS, NULL}, { (char *)"prelude_option_has_optlist", _wrap_prelude_option_has_optlist, METH_VARARGS, NULL}, { (char *)"prelude_option_get_parent", _wrap_prelude_option_get_parent, METH_VARARGS, NULL}, { (char *)"prelude_option_set_destroy_callback", _wrap_prelude_option_set_destroy_callback, METH_VARARGS, NULL}, { (char *)"prelude_option_get_destroy_callback", _wrap_prelude_option_get_destroy_callback, METH_VARARGS, NULL}, { (char *)"prelude_option_set_set_callback", _wrap_prelude_option_set_set_callback, METH_VARARGS, NULL}, { (char *)"prelude_option_get_set_callback", _wrap_prelude_option_get_set_callback, METH_VARARGS, NULL}, { (char *)"prelude_option_set_get_callback", _wrap_prelude_option_set_get_callback, METH_VARARGS, NULL}, { (char *)"prelude_option_get_get_callback", _wrap_prelude_option_get_get_callback, METH_VARARGS, NULL}, { (char *)"prelude_option_set_commit_callback", _wrap_prelude_option_set_commit_callback, METH_VARARGS, NULL}, { (char *)"prelude_option_get_commit_callback", _wrap_prelude_option_get_commit_callback, METH_VARARGS, NULL}, { (char *)"prelude_option_set_default_context", _wrap_prelude_option_set_default_context, METH_VARARGS, NULL}, { (char *)"prelude_option_new_context", _wrap_prelude_option_new_context, METH_VARARGS, NULL}, { (char *)"prelude_option_context_destroy", _wrap_prelude_option_context_destroy, METH_VARARGS, NULL}, { (char *)"prelude_option_context_get_data", _wrap_prelude_option_context_get_data, METH_VARARGS, NULL}, { (char *)"prelude_option_context_set_data", _wrap_prelude_option_context_set_data, METH_VARARGS, NULL}, { (char *)"prelude_option_search", _wrap_prelude_option_search, METH_VARARGS, NULL}, { (char *)"prelude_option_search_context", _wrap_prelude_option_search_context, METH_VARARGS, NULL}, { (char *)"prelude_option_push_request", _wrap_prelude_option_push_request, METH_VARARGS, NULL}, { (char *)"prelude_option_new_request", _wrap_prelude_option_new_request, METH_VARARGS, NULL}, { (char *)"prelude_option_process_request", _wrap_prelude_option_process_request, METH_VARARGS, NULL}, { (char *)"prelude_option_recv_reply", _wrap_prelude_option_recv_reply, METH_VARARGS, NULL}, { (char *)"prelude_msg_read", _wrap_prelude_msg_read, METH_VARARGS, NULL}, { (char *)"prelude_msg_forward", _wrap_prelude_msg_forward, METH_VARARGS, NULL}, { (char *)"prelude_msg_get", _wrap_prelude_msg_get, METH_VARARGS, NULL}, { (char *)"prelude_msg_recycle", _wrap_prelude_msg_recycle, METH_VARARGS, NULL}, { (char *)"prelude_msg_mark_end", _wrap_prelude_msg_mark_end, METH_VARARGS, NULL}, { (char *)"prelude_msg_dynamic_new", _wrap_prelude_msg_dynamic_new, METH_VARARGS, NULL}, { (char *)"prelude_msg_new", _wrap_prelude_msg_new, METH_VARARGS, NULL}, { (char *)"prelude_msg_set", _wrap_prelude_msg_set, METH_VARARGS, NULL}, { (char *)"prelude_msg_write", _wrap_prelude_msg_write, METH_VARARGS, NULL}, { (char *)"prelude_msg_set_tag", _wrap_prelude_msg_set_tag, METH_VARARGS, NULL}, { (char *)"prelude_msg_set_priority", _wrap_prelude_msg_set_priority, METH_VARARGS, NULL}, { (char *)"prelude_msg_get_tag", _wrap_prelude_msg_get_tag, METH_VARARGS, NULL}, { (char *)"prelude_msg_get_priority", _wrap_prelude_msg_get_priority, METH_VARARGS, NULL}, { (char *)"prelude_msg_get_len", _wrap_prelude_msg_get_len, METH_VARARGS, NULL}, { (char *)"prelude_msg_get_datalen", _wrap_prelude_msg_get_datalen, METH_VARARGS, NULL}, { (char *)"prelude_msg_get_message_data", _wrap_prelude_msg_get_message_data, METH_VARARGS, NULL}, { (char *)"prelude_msg_get_time", _wrap_prelude_msg_get_time, METH_VARARGS, NULL}, { (char *)"prelude_msg_is_empty", _wrap_prelude_msg_is_empty, METH_VARARGS, NULL}, { (char *)"prelude_msg_is_fragment", _wrap_prelude_msg_is_fragment, METH_VARARGS, NULL}, { (char *)"prelude_msg_destroy", _wrap_prelude_msg_destroy, METH_VARARGS, NULL}, { (char *)"prelude_msg_set_callback", _wrap_prelude_msg_set_callback, METH_VARARGS, NULL}, { (char *)"prelude_msg_set_data", _wrap_prelude_msg_set_data, METH_VARARGS, NULL}, { (char *)"prelude_msg_ref", _wrap_prelude_msg_ref, METH_VARARGS, NULL}, { (char *)"_prelude_log", _wrap__prelude_log, METH_VARARGS, NULL}, { (char *)"prelude_log", _wrap_prelude_log, METH_VARARGS, NULL}, { (char *)"prelude_log_debug", _wrap_prelude_log_debug, METH_VARARGS, NULL}, { (char *)"prelude_log_set_level", _wrap_prelude_log_set_level, METH_VARARGS, NULL}, { (char *)"prelude_log_set_debug_level", _wrap_prelude_log_set_debug_level, METH_VARARGS, NULL}, { (char *)"prelude_log_get_flags", _wrap_prelude_log_get_flags, METH_VARARGS, NULL}, { (char *)"prelude_log_set_flags", _wrap_prelude_log_set_flags, METH_VARARGS, NULL}, { (char *)"prelude_log_get_prefix", _wrap_prelude_log_get_prefix, METH_VARARGS, NULL}, { (char *)"prelude_log_set_prefix", _wrap_prelude_log_set_prefix, METH_VARARGS, NULL}, { (char *)"prelude_log_set_callback", _wrap_prelude_log_set_callback, METH_VARARGS, NULL}, { (char *)"prelude_log_set_logfile", _wrap_prelude_log_set_logfile, METH_VARARGS, NULL}, { (char *)"_prelude_log_set_abort_level", _wrap__prelude_log_set_abort_level, METH_VARARGS, NULL}, { (char *)"_prelude_log_set_abort_level_from_string", _wrap__prelude_log_set_abort_level_from_string, METH_VARARGS, NULL}, { (char *)"prelude_msgbuf_new", _wrap_prelude_msgbuf_new, METH_VARARGS, NULL}, { (char *)"prelude_msgbuf_destroy", _wrap_prelude_msgbuf_destroy, METH_VARARGS, NULL}, { (char *)"prelude_msgbuf_mark_end", _wrap_prelude_msgbuf_mark_end, METH_VARARGS, NULL}, { (char *)"prelude_msgbuf_set", _wrap_prelude_msgbuf_set, METH_VARARGS, NULL}, { (char *)"prelude_msgbuf_get_msg", _wrap_prelude_msgbuf_get_msg, METH_VARARGS, NULL}, { (char *)"prelude_msgbuf_set_callback", _wrap_prelude_msgbuf_set_callback, METH_VARARGS, NULL}, { (char *)"prelude_msgbuf_set_data", _wrap_prelude_msgbuf_set_data, METH_VARARGS, NULL}, { (char *)"prelude_msgbuf_get_data", _wrap_prelude_msgbuf_get_data, METH_VARARGS, NULL}, { (char *)"prelude_msgbuf_set_flags", _wrap_prelude_msgbuf_set_flags, METH_VARARGS, NULL}, { (char *)"prelude_msgbuf_get_flags", _wrap_prelude_msgbuf_get_flags, METH_VARARGS, NULL}, { (char *)"prelude_timer_t_list_set", _wrap_prelude_timer_t_list_set, METH_VARARGS, NULL}, { (char *)"prelude_timer_t_list_get", _wrap_prelude_timer_t_list_get, METH_VARARGS, NULL}, { (char *)"prelude_timer_t_expire_set", _wrap_prelude_timer_t_expire_set, METH_VARARGS, NULL}, { (char *)"prelude_timer_t_expire_get", _wrap_prelude_timer_t_expire_get, METH_VARARGS, NULL}, { (char *)"prelude_timer_t_start_time_set", _wrap_prelude_timer_t_start_time_set, METH_VARARGS, NULL}, { (char *)"prelude_timer_t_start_time_get", _wrap_prelude_timer_t_start_time_get, METH_VARARGS, NULL}, { (char *)"prelude_timer_t_data_set", _wrap_prelude_timer_t_data_set, METH_VARARGS, NULL}, { (char *)"prelude_timer_t_data_get", _wrap_prelude_timer_t_data_get, METH_VARARGS, NULL}, { (char *)"prelude_timer_t_function_set", _wrap_prelude_timer_t_function_set, METH_VARARGS, NULL}, { (char *)"prelude_timer_t_function_get", _wrap_prelude_timer_t_function_get, METH_VARARGS, NULL}, { (char *)"new_prelude_timer_t", _wrap_new_prelude_timer_t, METH_VARARGS, NULL}, { (char *)"delete_prelude_timer_t", _wrap_delete_prelude_timer_t, METH_VARARGS, NULL}, { (char *)"prelude_timer_init", _wrap_prelude_timer_init, METH_VARARGS, NULL}, { (char *)"prelude_timer_init_list", _wrap_prelude_timer_init_list, METH_VARARGS, NULL}, { (char *)"prelude_timer_reset", _wrap_prelude_timer_reset, METH_VARARGS, NULL}, { (char *)"prelude_timer_destroy", _wrap_prelude_timer_destroy, METH_VARARGS, NULL}, { (char *)"prelude_timer_wake_up", _wrap_prelude_timer_wake_up, METH_VARARGS, NULL}, { (char *)"prelude_timer_flush", _wrap_prelude_timer_flush, METH_VARARGS, NULL}, { (char *)"prelude_timer_lock_critical_region", _wrap_prelude_timer_lock_critical_region, METH_VARARGS, NULL}, { (char *)"prelude_timer_unlock_critical_region", _wrap_prelude_timer_unlock_critical_region, METH_VARARGS, NULL}, { (char *)"_prelude_timer_init", _wrap__prelude_timer_init, METH_VARARGS, NULL}, { (char *)"_prelude_timer_fork_prepare", _wrap__prelude_timer_fork_prepare, METH_VARARGS, NULL}, { (char *)"_prelude_timer_fork_parent", _wrap__prelude_timer_fork_parent, METH_VARARGS, NULL}, { (char *)"_prelude_timer_fork_child", _wrap__prelude_timer_fork_child, METH_VARARGS, NULL}, { (char *)"prelude_error_is_verbose", _wrap_prelude_error_is_verbose, METH_VARARGS, NULL}, { (char *)"prelude_error_get_code", _wrap_prelude_error_get_code, METH_VARARGS, NULL}, { (char *)"prelude_error_get_source", _wrap_prelude_error_get_source, METH_VARARGS, NULL}, { (char *)"prelude_error_code_from_errno", _wrap_prelude_error_code_from_errno, METH_VARARGS, NULL}, { (char *)"prelude_error_make", _wrap_prelude_error_make, METH_VARARGS, NULL}, { (char *)"prelude_error_make_from_errno", _wrap_prelude_error_make_from_errno, METH_VARARGS, NULL}, { (char *)"prelude_perror", _wrap_prelude_perror, METH_VARARGS, NULL}, { (char *)"prelude_strerror", _wrap_prelude_strerror, METH_VARARGS, NULL}, { (char *)"prelude_strsource", _wrap_prelude_strsource, METH_VARARGS, NULL}, { (char *)"prelude_error_code_to_errno", _wrap_prelude_error_code_to_errno, METH_VARARGS, NULL}, { (char *)"prelude_error_verbose_make", _wrap_prelude_error_verbose_make, METH_VARARGS, NULL}, { (char *)"prelude_error", _wrap_prelude_error, METH_VARARGS, NULL}, { (char *)"prelude_error_verbose", _wrap_prelude_error_verbose, METH_VARARGS, NULL}, { (char *)"prelude_error_from_errno", _wrap_prelude_error_from_errno, METH_VARARGS, NULL}, { NULL, NULL, 0, NULL } }; /* -------- TYPE CONVERSION AND EQUIVALENCE RULES (BEGIN) -------- */ static swig_type_info _swigt__p_FILE = {"_p_FILE", "FILE *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_char = {"_p_char", "char *|int8_t *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_f_enum_prelude_log_t_p_q_const__char__void = {"_p_f_enum_prelude_log_t_p_q_const__char__void", "void (*)(enum prelude_log_t,char const *)|void (*)(prelude_log_t,char const *)", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_f_p_p_struct_prelude_msg_p_void__int = {"_p_f_p_p_struct_prelude_msg_p_void__int", "int (*)(struct prelude_msg **,void *)|int (*)(prelude_msg_t **,void *)", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_f_p_struct_idmef_value_p_void__int = {"_p_f_p_struct_idmef_value_p_void__int", "int (*)(struct idmef_value *,void *)|int (*)(idmef_value_t *,void *)", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_f_p_struct_prelude_client_p_struct_idmef_message__void = {"_p_f_p_struct_prelude_client_p_struct_idmef_message__void", "void (*)(prelude_client_t *,idmef_message_t *)|void (*)(struct prelude_client *,struct idmef_message *)", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_f_p_struct_prelude_connection_pool_enum_prelude_connection_pool_event_t__int = {"_p_f_p_struct_prelude_connection_pool_enum_prelude_connection_pool_event_t__int", "int (*)(prelude_connection_pool_t *,prelude_connection_pool_event_t)|int (*)(struct prelude_connection_pool *,enum prelude_connection_pool_event_t)", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_f_p_struct_prelude_connection_pool_enum_prelude_connection_pool_event_t_p_struct_prelude_connection__int = {"_p_f_p_struct_prelude_connection_pool_enum_prelude_connection_pool_event_t_p_struct_prelude_connection__int", "int (*)(prelude_connection_pool_t *,prelude_connection_pool_event_t,prelude_connection_t *)|int (*)(struct prelude_connection_pool *,enum prelude_connection_pool_event_t,struct prelude_connection *)", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_f_p_struct_prelude_connection_pool_enum_prelude_connection_pool_event_t_p_struct_prelude_connection_p_void__int = {"_p_f_p_struct_prelude_connection_pool_enum_prelude_connection_pool_event_t_p_struct_prelude_connection_p_void__int", "int (*)(prelude_connection_pool_t *,prelude_connection_pool_event_t,prelude_connection_t *,void *)|int (*)(struct prelude_connection_pool *,enum prelude_connection_pool_event_t,struct prelude_connection *,void *)", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_f_p_struct_prelude_msgbuf_p_struct_prelude_msg__int = {"_p_f_p_struct_prelude_msgbuf_p_struct_prelude_msg__int", "int (*)(struct prelude_msgbuf *,struct prelude_msg *)|int (*)(prelude_msgbuf_t *,prelude_msg_t *)", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_f_p_struct_prelude_option_p_prelude_string_t_p_void__int = {"_p_f_p_struct_prelude_option_p_prelude_string_t_p_void__int", "int (*)(prelude_option_t *,prelude_string_t *,void *)|prelude_option_destroy_callback_t|prelude_option_get_callback_t|prelude_option_commit_callback_t|int (*)(struct prelude_option *,prelude_string_t *,void *)", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_f_p_struct_prelude_option_p_q_const__char_p_prelude_string_t_p_void__int = {"_p_f_p_struct_prelude_option_p_q_const__char_p_prelude_string_t_p_void__int", "int (*)(struct prelude_option *,char const *,prelude_string_t *,void *)|int (*)(prelude_option_t *,char const *,prelude_string_t *,void *)|prelude_option_set_callback_t", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_f_p_void__void = {"_p_f_p_void__void", "void (*)(void *)", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_idmef_action = {"_p_idmef_action", "idmef_action_t *|struct idmef_action *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_idmef_action_category_t = {"_p_idmef_action_category_t", "enum idmef_action_category_t *|idmef_action_category_t *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_idmef_additional_data = {"_p_idmef_additional_data", "struct idmef_additional_data *|idmef_additional_data_t *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_idmef_additional_data_type_t = {"_p_idmef_additional_data_type_t", "enum idmef_additional_data_type_t *|idmef_additional_data_type_t *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_idmef_address = {"_p_idmef_address", "idmef_address_t *|struct idmef_address *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_idmef_address_category_t = {"_p_idmef_address_category_t", "enum idmef_address_category_t *|idmef_address_category_t *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_idmef_alert = {"_p_idmef_alert", "idmef_alert_t *|struct idmef_alert *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_idmef_alert_type_t = {"_p_idmef_alert_type_t", "enum idmef_alert_type_t *|idmef_alert_type_t *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_idmef_alertident = {"_p_idmef_alertident", "struct idmef_alertident *|idmef_alertident_t *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_idmef_analyzer = {"_p_idmef_analyzer", "struct idmef_analyzer *|idmef_analyzer_t *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_idmef_assessment = {"_p_idmef_assessment", "idmef_assessment_t *|struct idmef_assessment *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_idmef_checksum = {"_p_idmef_checksum", "struct idmef_checksum *|idmef_checksum_t *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_idmef_checksum_algorithm_t = {"_p_idmef_checksum_algorithm_t", "enum idmef_checksum_algorithm_t *|idmef_checksum_algorithm_t *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_idmef_classification = {"_p_idmef_classification", "idmef_classification_t *|struct idmef_classification *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_idmef_confidence = {"_p_idmef_confidence", "struct idmef_confidence *|idmef_confidence_t *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_idmef_confidence_rating_t = {"_p_idmef_confidence_rating_t", "enum idmef_confidence_rating_t *|idmef_confidence_rating_t *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_idmef_correlation_alert = {"_p_idmef_correlation_alert", "idmef_correlation_alert_t *|struct idmef_correlation_alert *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_idmef_criteria = {"_p_idmef_criteria", "idmef_criteria_t *|struct idmef_criteria *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_idmef_criterion = {"_p_idmef_criterion", "idmef_criterion_t *|struct idmef_criterion *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_idmef_criterion_operator_t = {"_p_idmef_criterion_operator_t", "enum idmef_criterion_operator_t *|idmef_criterion_operator_t *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_idmef_criterion_value_t = {"_p_idmef_criterion_value_t", "idmef_criterion_value_t *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_idmef_data_t = {"_p_idmef_data_t", "idmef_data_t *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_idmef_data_t_data = {"_p_idmef_data_t_data", "idmef_data_t_data *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_idmef_data_type_t = {"_p_idmef_data_type_t", "enum idmef_data_type_t *|idmef_data_type_t *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_idmef_file = {"_p_idmef_file", "idmef_file_t *|struct idmef_file *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_idmef_file_access = {"_p_idmef_file_access", "struct idmef_file_access *|idmef_file_access_t *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_idmef_file_category_t = {"_p_idmef_file_category_t", "enum idmef_file_category_t *|idmef_file_category_t *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_idmef_file_fstype_t = {"_p_idmef_file_fstype_t", "enum idmef_file_fstype_t *|idmef_file_fstype_t *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_idmef_heartbeat = {"_p_idmef_heartbeat", "idmef_heartbeat_t *|struct idmef_heartbeat *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_idmef_impact = {"_p_idmef_impact", "idmef_impact_t *|struct idmef_impact *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_idmef_impact_completion_t = {"_p_idmef_impact_completion_t", "enum idmef_impact_completion_t *|idmef_impact_completion_t *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_idmef_impact_severity_t = {"_p_idmef_impact_severity_t", "enum idmef_impact_severity_t *|idmef_impact_severity_t *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_idmef_impact_type_t = {"_p_idmef_impact_type_t", "enum idmef_impact_type_t *|idmef_impact_type_t *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_idmef_inode = {"_p_idmef_inode", "struct idmef_inode *|idmef_inode_t *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_idmef_linkage = {"_p_idmef_linkage", "struct idmef_linkage *|idmef_linkage_t *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_idmef_linkage_category_t = {"_p_idmef_linkage_category_t", "enum idmef_linkage_category_t *|idmef_linkage_category_t *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_idmef_message = {"_p_idmef_message", "struct idmef_message *|idmef_message_t *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_idmef_message_type_t = {"_p_idmef_message_type_t", "enum idmef_message_type_t *|idmef_message_type_t *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_idmef_node = {"_p_idmef_node", "struct idmef_node *|idmef_node_t *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_idmef_node_category_t = {"_p_idmef_node_category_t", "enum idmef_node_category_t *|idmef_node_category_t *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_idmef_overflow_alert = {"_p_idmef_overflow_alert", "idmef_overflow_alert_t *|struct idmef_overflow_alert *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_idmef_path = {"_p_idmef_path", "idmef_path_t *|struct idmef_path *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_idmef_process = {"_p_idmef_process", "struct idmef_process *|idmef_process_t *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_idmef_reference = {"_p_idmef_reference", "struct idmef_reference *|idmef_reference_t *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_idmef_reference_origin_t = {"_p_idmef_reference_origin_t", "enum idmef_reference_origin_t *|idmef_reference_origin_t *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_idmef_service = {"_p_idmef_service", "idmef_service_t *|struct idmef_service *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_idmef_service_type_t = {"_p_idmef_service_type_t", "enum idmef_service_type_t *|idmef_service_type_t *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_idmef_snmp_service = {"_p_idmef_snmp_service", "idmef_snmp_service_t *|struct idmef_snmp_service *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_idmef_source = {"_p_idmef_source", "struct idmef_source *|idmef_source_t *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_idmef_source_spoofed_t = {"_p_idmef_source_spoofed_t", "enum idmef_source_spoofed_t *|idmef_source_spoofed_t *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_idmef_target = {"_p_idmef_target", "idmef_target_t *|struct idmef_target *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_idmef_target_decoy_t = {"_p_idmef_target_decoy_t", "enum idmef_target_decoy_t *|idmef_target_decoy_t *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_idmef_time = {"_p_idmef_time", "struct idmef_time *|idmef_time_t *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_idmef_tool_alert = {"_p_idmef_tool_alert", "idmef_tool_alert_t *|struct idmef_tool_alert *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_idmef_user = {"_p_idmef_user", "struct idmef_user *|idmef_user_t *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_idmef_user_category_t = {"_p_idmef_user_category_t", "enum idmef_user_category_t *|idmef_user_category_t *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_idmef_user_id = {"_p_idmef_user_id", "struct idmef_user_id *|idmef_user_id_t *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_idmef_user_id_type_t = {"_p_idmef_user_id_type_t", "enum idmef_user_id_type_t *|idmef_user_id_type_t *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_idmef_value = {"_p_idmef_value", "struct idmef_value *|idmef_value_t *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_idmef_value_type_class_t = {"_p_idmef_value_type_class_t", "idmef_value_type_class_t *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_idmef_value_type_data_t = {"_p_idmef_value_type_data_t", "idmef_value_type_data_t *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_idmef_value_type_enum_t = {"_p_idmef_value_type_enum_t", "idmef_value_type_enum_t *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_idmef_value_type_id_t = {"_p_idmef_value_type_id_t", "enum idmef_value_type_id_t *|idmef_value_type_id_t *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_idmef_value_type_t = {"_p_idmef_value_type_t", "idmef_value_type_t *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_idmef_web_service = {"_p_idmef_web_service", "idmef_web_service_t *|struct idmef_web_service *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_int = {"_p_int", "int *|int32_t *|prelude_uid_t *|prelude_gid_t *|idmef_class_child_id_t *|idmef_class_id_t *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_long_long = {"_p_long_long", "int64_t *|long long *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_p_char = {"_p_p_char", "char **", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_p_float = {"_p_p_float", "float **", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_p_idmef_action = {"_p_p_idmef_action", "struct idmef_action **|idmef_action_t **", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_p_idmef_action_category_t = {"_p_p_idmef_action_category_t", "enum idmef_action_category_t **|idmef_action_category_t **", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_p_idmef_additional_data = {"_p_p_idmef_additional_data", "idmef_additional_data_t **|struct idmef_additional_data **", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_p_idmef_additional_data_type_t = {"_p_p_idmef_additional_data_type_t", "enum idmef_additional_data_type_t **|idmef_additional_data_type_t **", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_p_idmef_address = {"_p_p_idmef_address", "idmef_address_t **|struct idmef_address **", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_p_idmef_address_category_t = {"_p_p_idmef_address_category_t", "enum idmef_address_category_t **|idmef_address_category_t **", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_p_idmef_alert = {"_p_p_idmef_alert", "struct idmef_alert **|idmef_alert_t **", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_p_idmef_alertident = {"_p_p_idmef_alertident", "struct idmef_alertident **|idmef_alertident_t **", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_p_idmef_analyzer = {"_p_p_idmef_analyzer", "idmef_analyzer_t **|struct idmef_analyzer **", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_p_idmef_assessment = {"_p_p_idmef_assessment", "struct idmef_assessment **|idmef_assessment_t **", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_p_idmef_checksum = {"_p_p_idmef_checksum", "struct idmef_checksum **|idmef_checksum_t **", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_p_idmef_checksum_algorithm_t = {"_p_p_idmef_checksum_algorithm_t", "enum idmef_checksum_algorithm_t **|idmef_checksum_algorithm_t **", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_p_idmef_classification = {"_p_p_idmef_classification", "struct idmef_classification **|idmef_classification_t **", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_p_idmef_confidence = {"_p_p_idmef_confidence", "struct idmef_confidence **|idmef_confidence_t **", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_p_idmef_confidence_rating_t = {"_p_p_idmef_confidence_rating_t", "enum idmef_confidence_rating_t **|idmef_confidence_rating_t **", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_p_idmef_correlation_alert = {"_p_p_idmef_correlation_alert", "struct idmef_correlation_alert **|idmef_correlation_alert_t **", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_p_idmef_criteria = {"_p_p_idmef_criteria", "struct idmef_criteria **|idmef_criteria_t **", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_p_idmef_criterion = {"_p_p_idmef_criterion", "struct idmef_criterion **|idmef_criterion_t **", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_p_idmef_data_t = {"_p_p_idmef_data_t", "idmef_data_t **", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_p_idmef_file = {"_p_p_idmef_file", "struct idmef_file **|idmef_file_t **", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_p_idmef_file_access = {"_p_p_idmef_file_access", "idmef_file_access_t **|struct idmef_file_access **", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_p_idmef_file_category_t = {"_p_p_idmef_file_category_t", "enum idmef_file_category_t **|idmef_file_category_t **", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_p_idmef_file_fstype_t = {"_p_p_idmef_file_fstype_t", "enum idmef_file_fstype_t **|idmef_file_fstype_t **", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_p_idmef_heartbeat = {"_p_p_idmef_heartbeat", "struct idmef_heartbeat **|idmef_heartbeat_t **", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_p_idmef_impact = {"_p_p_idmef_impact", "struct idmef_impact **|idmef_impact_t **", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_p_idmef_impact_completion_t = {"_p_p_idmef_impact_completion_t", "enum idmef_impact_completion_t **|idmef_impact_completion_t **", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_p_idmef_impact_severity_t = {"_p_p_idmef_impact_severity_t", "enum idmef_impact_severity_t **|idmef_impact_severity_t **", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_p_idmef_impact_type_t = {"_p_p_idmef_impact_type_t", "enum idmef_impact_type_t **|idmef_impact_type_t **", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_p_idmef_inode = {"_p_p_idmef_inode", "struct idmef_inode **|idmef_inode_t **", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_p_idmef_linkage = {"_p_p_idmef_linkage", "idmef_linkage_t **|struct idmef_linkage **", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_p_idmef_linkage_category_t = {"_p_p_idmef_linkage_category_t", "enum idmef_linkage_category_t **|idmef_linkage_category_t **", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_p_idmef_message = {"_p_p_idmef_message", "idmef_message_t **|struct idmef_message **", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_p_idmef_node = {"_p_p_idmef_node", "struct idmef_node **|idmef_node_t **", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_p_idmef_node_category_t = {"_p_p_idmef_node_category_t", "enum idmef_node_category_t **|idmef_node_category_t **", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_p_idmef_overflow_alert = {"_p_p_idmef_overflow_alert", "struct idmef_overflow_alert **|idmef_overflow_alert_t **", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_p_idmef_path = {"_p_p_idmef_path", "idmef_path_t **|struct idmef_path **", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_p_idmef_process = {"_p_p_idmef_process", "idmef_process_t **|struct idmef_process **", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_p_idmef_reference = {"_p_p_idmef_reference", "struct idmef_reference **|idmef_reference_t **", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_p_idmef_reference_origin_t = {"_p_p_idmef_reference_origin_t", "enum idmef_reference_origin_t **|idmef_reference_origin_t **", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_p_idmef_service = {"_p_p_idmef_service", "idmef_service_t **|struct idmef_service **", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_p_idmef_snmp_service = {"_p_p_idmef_snmp_service", "idmef_snmp_service_t **|struct idmef_snmp_service **", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_p_idmef_source = {"_p_p_idmef_source", "struct idmef_source **|idmef_source_t **", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_p_idmef_source_spoofed_t = {"_p_p_idmef_source_spoofed_t", "enum idmef_source_spoofed_t **|idmef_source_spoofed_t **", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_p_idmef_target = {"_p_p_idmef_target", "struct idmef_target **|idmef_target_t **", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_p_idmef_target_decoy_t = {"_p_p_idmef_target_decoy_t", "enum idmef_target_decoy_t **|idmef_target_decoy_t **", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_p_idmef_time = {"_p_p_idmef_time", "idmef_time_t **|struct idmef_time **", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_p_idmef_tool_alert = {"_p_p_idmef_tool_alert", "struct idmef_tool_alert **|idmef_tool_alert_t **", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_p_idmef_user = {"_p_p_idmef_user", "idmef_user_t **|struct idmef_user **", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_p_idmef_user_category_t = {"_p_p_idmef_user_category_t", "enum idmef_user_category_t **|idmef_user_category_t **", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_p_idmef_user_id = {"_p_p_idmef_user_id", "idmef_user_id_t **|struct idmef_user_id **", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_p_idmef_user_id_type_t = {"_p_p_idmef_user_id_type_t", "enum idmef_user_id_type_t **|idmef_user_id_type_t **", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_p_idmef_value = {"_p_p_idmef_value", "idmef_value_t **|struct idmef_value **", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_p_idmef_web_service = {"_p_p_idmef_web_service", "idmef_web_service_t **|struct idmef_web_service **", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_p_int = {"_p_p_int", "int32_t **|int **", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_p_prelude_client = {"_p_p_prelude_client", "struct prelude_client **|prelude_client_t **", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_p_prelude_client_profile = {"_p_p_prelude_client_profile", "struct prelude_client_profile **|prelude_client_profile_t **", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_p_prelude_connection = {"_p_p_prelude_connection", "struct prelude_connection **|prelude_connection_t **", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_p_prelude_connection_pool = {"_p_p_prelude_connection_pool", "struct prelude_connection_pool **|prelude_connection_pool_t **", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_p_prelude_msg = {"_p_p_prelude_msg", "prelude_msg_t **|struct prelude_msg **", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_p_prelude_msgbuf = {"_p_p_prelude_msgbuf", "struct prelude_msgbuf **|prelude_msgbuf_t **", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_p_prelude_option = {"_p_p_prelude_option", "struct prelude_option **|prelude_option_t **", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_p_prelude_option_context = {"_p_p_prelude_option_context", "struct prelude_option_context **|prelude_option_context_t **", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_p_prelude_string_t = {"_p_p_prelude_string_t", "prelude_string_t **", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_p_unsigned_char = {"_p_p_unsigned_char", "uint8_t **|unsigned char **", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_p_unsigned_int = {"_p_p_unsigned_int", "uint32_t **|unsigned int **", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_p_unsigned_long_long = {"_p_p_unsigned_long_long", "unsigned long long **|uint64_t **", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_p_unsigned_short = {"_p_p_unsigned_short", "unsigned short **|uint16_t **", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_p_void = {"_p_p_void", "void **", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_prelude_bool_t = {"_p_prelude_bool_t", "enum prelude_bool_t *|prelude_bool_t *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_prelude_client = {"_p_prelude_client", "prelude_client_t *|struct prelude_client *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_prelude_client_exit_status_t = {"_p_prelude_client_exit_status_t", "enum prelude_client_exit_status_t *|prelude_client_exit_status_t *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_prelude_client_flags_t = {"_p_prelude_client_flags_t", "enum prelude_client_flags_t *|prelude_client_flags_t *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_prelude_client_profile = {"_p_prelude_client_profile", "prelude_client_profile_t *|struct prelude_client_profile *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_prelude_connection = {"_p_prelude_connection", "prelude_connection_t *|struct prelude_connection *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_prelude_connection_permission_t = {"_p_prelude_connection_permission_t", "enum prelude_connection_permission_t *|prelude_connection_permission_t *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_prelude_connection_pool = {"_p_prelude_connection_pool", "struct prelude_connection_pool *|prelude_connection_pool_t *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_prelude_connection_pool_event_t = {"_p_prelude_connection_pool_event_t", "enum prelude_connection_pool_event_t *|prelude_connection_pool_event_t *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_prelude_connection_pool_flags_t = {"_p_prelude_connection_pool_flags_t", "enum prelude_connection_pool_flags_t *|prelude_connection_pool_flags_t *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_prelude_connection_state_t = {"_p_prelude_connection_state_t", "enum prelude_connection_state_t *|prelude_connection_state_t *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_prelude_error_code_t = {"_p_prelude_error_code_t", "enum prelude_error_code_t *|prelude_error_code_t *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_prelude_error_source_t = {"_p_prelude_error_source_t", "enum prelude_error_source_t *|prelude_error_source_t *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_prelude_ident_t = {"_p_prelude_ident_t", "prelude_ident_t *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_prelude_io_t = {"_p_prelude_io_t", "prelude_io_t *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_prelude_list_t = {"_p_prelude_list_t", "prelude_list_t *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_prelude_log_flags_t = {"_p_prelude_log_flags_t", "enum prelude_log_flags_t *|prelude_log_flags_t *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_prelude_log_t = {"_p_prelude_log_t", "enum prelude_log_t *|prelude_log_t *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_prelude_msg = {"_p_prelude_msg", "struct prelude_msg *|prelude_msg_t *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_prelude_msg_priority_t = {"_p_prelude_msg_priority_t", "enum prelude_msg_priority_t *|prelude_msg_priority_t *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_prelude_msgbuf = {"_p_prelude_msgbuf", "struct prelude_msgbuf *|prelude_msgbuf_t *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_prelude_msgbuf_flags_t = {"_p_prelude_msgbuf_flags_t", "enum prelude_msgbuf_flags_t *|prelude_msgbuf_flags_t *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_prelude_option = {"_p_prelude_option", "prelude_option_t *|struct prelude_option *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_prelude_option_argument_t = {"_p_prelude_option_argument_t", "enum prelude_option_argument_t *|prelude_option_argument_t *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_prelude_option_context = {"_p_prelude_option_context", "struct prelude_option_context *|prelude_option_context_t *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_prelude_option_input_type_t = {"_p_prelude_option_input_type_t", "enum prelude_option_input_type_t *|prelude_option_input_type_t *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_prelude_option_priority_t = {"_p_prelude_option_priority_t", "enum prelude_option_priority_t *|prelude_option_priority_t *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_prelude_option_type_t = {"_p_prelude_option_type_t", "enum prelude_option_type_t *|prelude_option_type_t *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_prelude_option_warning_t = {"_p_prelude_option_warning_t", "enum prelude_option_warning_t *|prelude_option_warning_t *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_prelude_string_t = {"_p_prelude_string_t", "prelude_string_t *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_prelude_timer_t = {"_p_prelude_timer_t", "prelude_timer_t *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_short = {"_p_short", "short *|int16_t *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_ssize_t = {"_p_ssize_t", "ssize_t *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_time_t = {"_p_time_t", "time_t *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_timeval = {"_p_timeval", "struct timeval *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_unsigned_char = {"_p_unsigned_char", "unsigned char *|uint8_t *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_unsigned_int = {"_p_unsigned_int", "uint32_t *|unsigned int *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_unsigned_long_long = {"_p_unsigned_long_long", "uint64_t *|unsigned long long *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_unsigned_short = {"_p_unsigned_short", "unsigned short *|uint16_t *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_void = {"_p_void", "void *", 0, 0, (void*)0, 0}; static swig_type_info *swig_type_initial[] = { &_swigt__p_FILE, &_swigt__p_char, &_swigt__p_f_enum_prelude_log_t_p_q_const__char__void, &_swigt__p_f_p_p_struct_prelude_msg_p_void__int, &_swigt__p_f_p_struct_idmef_value_p_void__int, &_swigt__p_f_p_struct_prelude_client_p_struct_idmef_message__void, &_swigt__p_f_p_struct_prelude_connection_pool_enum_prelude_connection_pool_event_t__int, &_swigt__p_f_p_struct_prelude_connection_pool_enum_prelude_connection_pool_event_t_p_struct_prelude_connection__int, &_swigt__p_f_p_struct_prelude_connection_pool_enum_prelude_connection_pool_event_t_p_struct_prelude_connection_p_void__int, &_swigt__p_f_p_struct_prelude_msgbuf_p_struct_prelude_msg__int, &_swigt__p_f_p_struct_prelude_option_p_prelude_string_t_p_void__int, &_swigt__p_f_p_struct_prelude_option_p_q_const__char_p_prelude_string_t_p_void__int, &_swigt__p_f_p_void__void, &_swigt__p_idmef_action, &_swigt__p_idmef_action_category_t, &_swigt__p_idmef_additional_data, &_swigt__p_idmef_additional_data_type_t, &_swigt__p_idmef_address, &_swigt__p_idmef_address_category_t, &_swigt__p_idmef_alert, &_swigt__p_idmef_alert_type_t, &_swigt__p_idmef_alertident, &_swigt__p_idmef_analyzer, &_swigt__p_idmef_assessment, &_swigt__p_idmef_checksum, &_swigt__p_idmef_checksum_algorithm_t, &_swigt__p_idmef_classification, &_swigt__p_idmef_confidence, &_swigt__p_idmef_confidence_rating_t, &_swigt__p_idmef_correlation_alert, &_swigt__p_idmef_criteria, &_swigt__p_idmef_criterion, &_swigt__p_idmef_criterion_operator_t, &_swigt__p_idmef_criterion_value_t, &_swigt__p_idmef_data_t, &_swigt__p_idmef_data_t_data, &_swigt__p_idmef_data_type_t, &_swigt__p_idmef_file, &_swigt__p_idmef_file_access, &_swigt__p_idmef_file_category_t, &_swigt__p_idmef_file_fstype_t, &_swigt__p_idmef_heartbeat, &_swigt__p_idmef_impact, &_swigt__p_idmef_impact_completion_t, &_swigt__p_idmef_impact_severity_t, &_swigt__p_idmef_impact_type_t, &_swigt__p_idmef_inode, &_swigt__p_idmef_linkage, &_swigt__p_idmef_linkage_category_t, &_swigt__p_idmef_message, &_swigt__p_idmef_message_type_t, &_swigt__p_idmef_node, &_swigt__p_idmef_node_category_t, &_swigt__p_idmef_overflow_alert, &_swigt__p_idmef_path, &_swigt__p_idmef_process, &_swigt__p_idmef_reference, &_swigt__p_idmef_reference_origin_t, &_swigt__p_idmef_service, &_swigt__p_idmef_service_type_t, &_swigt__p_idmef_snmp_service, &_swigt__p_idmef_source, &_swigt__p_idmef_source_spoofed_t, &_swigt__p_idmef_target, &_swigt__p_idmef_target_decoy_t, &_swigt__p_idmef_time, &_swigt__p_idmef_tool_alert, &_swigt__p_idmef_user, &_swigt__p_idmef_user_category_t, &_swigt__p_idmef_user_id, &_swigt__p_idmef_user_id_type_t, &_swigt__p_idmef_value, &_swigt__p_idmef_value_type_class_t, &_swigt__p_idmef_value_type_data_t, &_swigt__p_idmef_value_type_enum_t, &_swigt__p_idmef_value_type_id_t, &_swigt__p_idmef_value_type_t, &_swigt__p_idmef_web_service, &_swigt__p_int, &_swigt__p_long_long, &_swigt__p_p_char, &_swigt__p_p_float, &_swigt__p_p_idmef_action, &_swigt__p_p_idmef_action_category_t, &_swigt__p_p_idmef_additional_data, &_swigt__p_p_idmef_additional_data_type_t, &_swigt__p_p_idmef_address, &_swigt__p_p_idmef_address_category_t, &_swigt__p_p_idmef_alert, &_swigt__p_p_idmef_alertident, &_swigt__p_p_idmef_analyzer, &_swigt__p_p_idmef_assessment, &_swigt__p_p_idmef_checksum, &_swigt__p_p_idmef_checksum_algorithm_t, &_swigt__p_p_idmef_classification, &_swigt__p_p_idmef_confidence, &_swigt__p_p_idmef_confidence_rating_t, &_swigt__p_p_idmef_correlation_alert, &_swigt__p_p_idmef_criteria, &_swigt__p_p_idmef_criterion, &_swigt__p_p_idmef_data_t, &_swigt__p_p_idmef_file, &_swigt__p_p_idmef_file_access, &_swigt__p_p_idmef_file_category_t, &_swigt__p_p_idmef_file_fstype_t, &_swigt__p_p_idmef_heartbeat, &_swigt__p_p_idmef_impact, &_swigt__p_p_idmef_impact_completion_t, &_swigt__p_p_idmef_impact_severity_t, &_swigt__p_p_idmef_impact_type_t, &_swigt__p_p_idmef_inode, &_swigt__p_p_idmef_linkage, &_swigt__p_p_idmef_linkage_category_t, &_swigt__p_p_idmef_message, &_swigt__p_p_idmef_node, &_swigt__p_p_idmef_node_category_t, &_swigt__p_p_idmef_overflow_alert, &_swigt__p_p_idmef_path, &_swigt__p_p_idmef_process, &_swigt__p_p_idmef_reference, &_swigt__p_p_idmef_reference_origin_t, &_swigt__p_p_idmef_service, &_swigt__p_p_idmef_snmp_service, &_swigt__p_p_idmef_source, &_swigt__p_p_idmef_source_spoofed_t, &_swigt__p_p_idmef_target, &_swigt__p_p_idmef_target_decoy_t, &_swigt__p_p_idmef_time, &_swigt__p_p_idmef_tool_alert, &_swigt__p_p_idmef_user, &_swigt__p_p_idmef_user_category_t, &_swigt__p_p_idmef_user_id, &_swigt__p_p_idmef_user_id_type_t, &_swigt__p_p_idmef_value, &_swigt__p_p_idmef_web_service, &_swigt__p_p_int, &_swigt__p_p_prelude_client, &_swigt__p_p_prelude_client_profile, &_swigt__p_p_prelude_connection, &_swigt__p_p_prelude_connection_pool, &_swigt__p_p_prelude_msg, &_swigt__p_p_prelude_msgbuf, &_swigt__p_p_prelude_option, &_swigt__p_p_prelude_option_context, &_swigt__p_p_prelude_string_t, &_swigt__p_p_unsigned_char, &_swigt__p_p_unsigned_int, &_swigt__p_p_unsigned_long_long, &_swigt__p_p_unsigned_short, &_swigt__p_p_void, &_swigt__p_prelude_bool_t, &_swigt__p_prelude_client, &_swigt__p_prelude_client_exit_status_t, &_swigt__p_prelude_client_flags_t, &_swigt__p_prelude_client_profile, &_swigt__p_prelude_connection, &_swigt__p_prelude_connection_permission_t, &_swigt__p_prelude_connection_pool, &_swigt__p_prelude_connection_pool_event_t, &_swigt__p_prelude_connection_pool_flags_t, &_swigt__p_prelude_connection_state_t, &_swigt__p_prelude_error_code_t, &_swigt__p_prelude_error_source_t, &_swigt__p_prelude_ident_t, &_swigt__p_prelude_io_t, &_swigt__p_prelude_list_t, &_swigt__p_prelude_log_flags_t, &_swigt__p_prelude_log_t, &_swigt__p_prelude_msg, &_swigt__p_prelude_msg_priority_t, &_swigt__p_prelude_msgbuf, &_swigt__p_prelude_msgbuf_flags_t, &_swigt__p_prelude_option, &_swigt__p_prelude_option_argument_t, &_swigt__p_prelude_option_context, &_swigt__p_prelude_option_input_type_t, &_swigt__p_prelude_option_priority_t, &_swigt__p_prelude_option_type_t, &_swigt__p_prelude_option_warning_t, &_swigt__p_prelude_string_t, &_swigt__p_prelude_timer_t, &_swigt__p_short, &_swigt__p_ssize_t, &_swigt__p_time_t, &_swigt__p_timeval, &_swigt__p_unsigned_char, &_swigt__p_unsigned_int, &_swigt__p_unsigned_long_long, &_swigt__p_unsigned_short, &_swigt__p_void, }; static swig_cast_info _swigc__p_FILE[] = { {&_swigt__p_FILE, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_char[] = { {&_swigt__p_char, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_f_enum_prelude_log_t_p_q_const__char__void[] = { {&_swigt__p_f_enum_prelude_log_t_p_q_const__char__void, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_f_p_p_struct_prelude_msg_p_void__int[] = { {&_swigt__p_f_p_p_struct_prelude_msg_p_void__int, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_f_p_struct_idmef_value_p_void__int[] = { {&_swigt__p_f_p_struct_idmef_value_p_void__int, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_f_p_struct_prelude_client_p_struct_idmef_message__void[] = { {&_swigt__p_f_p_struct_prelude_client_p_struct_idmef_message__void, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_f_p_struct_prelude_connection_pool_enum_prelude_connection_pool_event_t__int[] = { {&_swigt__p_f_p_struct_prelude_connection_pool_enum_prelude_connection_pool_event_t__int, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_f_p_struct_prelude_connection_pool_enum_prelude_connection_pool_event_t_p_struct_prelude_connection__int[] = { {&_swigt__p_f_p_struct_prelude_connection_pool_enum_prelude_connection_pool_event_t_p_struct_prelude_connection__int, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_f_p_struct_prelude_connection_pool_enum_prelude_connection_pool_event_t_p_struct_prelude_connection_p_void__int[] = { {&_swigt__p_f_p_struct_prelude_connection_pool_enum_prelude_connection_pool_event_t_p_struct_prelude_connection_p_void__int, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_f_p_struct_prelude_msgbuf_p_struct_prelude_msg__int[] = { {&_swigt__p_f_p_struct_prelude_msgbuf_p_struct_prelude_msg__int, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_f_p_struct_prelude_option_p_prelude_string_t_p_void__int[] = { {&_swigt__p_f_p_struct_prelude_option_p_prelude_string_t_p_void__int, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_f_p_struct_prelude_option_p_q_const__char_p_prelude_string_t_p_void__int[] = { {&_swigt__p_f_p_struct_prelude_option_p_q_const__char_p_prelude_string_t_p_void__int, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_f_p_void__void[] = { {&_swigt__p_f_p_void__void, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_idmef_action[] = { {&_swigt__p_idmef_action, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_idmef_action_category_t[] = { {&_swigt__p_idmef_action_category_t, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_idmef_additional_data[] = { {&_swigt__p_idmef_additional_data, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_idmef_additional_data_type_t[] = { {&_swigt__p_idmef_additional_data_type_t, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_idmef_address[] = { {&_swigt__p_idmef_address, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_idmef_address_category_t[] = { {&_swigt__p_idmef_address_category_t, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_idmef_alert[] = { {&_swigt__p_idmef_alert, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_idmef_alert_type_t[] = { {&_swigt__p_idmef_alert_type_t, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_idmef_alertident[] = { {&_swigt__p_idmef_alertident, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_idmef_analyzer[] = { {&_swigt__p_idmef_analyzer, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_idmef_assessment[] = { {&_swigt__p_idmef_assessment, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_idmef_checksum[] = { {&_swigt__p_idmef_checksum, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_idmef_checksum_algorithm_t[] = { {&_swigt__p_idmef_checksum_algorithm_t, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_idmef_classification[] = { {&_swigt__p_idmef_classification, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_idmef_confidence[] = { {&_swigt__p_idmef_confidence, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_idmef_confidence_rating_t[] = { {&_swigt__p_idmef_confidence_rating_t, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_idmef_correlation_alert[] = { {&_swigt__p_idmef_correlation_alert, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_idmef_criteria[] = { {&_swigt__p_idmef_criteria, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_idmef_criterion[] = { {&_swigt__p_idmef_criterion, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_idmef_criterion_operator_t[] = { {&_swigt__p_idmef_criterion_operator_t, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_idmef_criterion_value_t[] = { {&_swigt__p_idmef_criterion_value_t, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_idmef_data_t[] = { {&_swigt__p_idmef_data_t, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_idmef_data_t_data[] = { {&_swigt__p_idmef_data_t_data, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_idmef_data_type_t[] = { {&_swigt__p_idmef_data_type_t, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_idmef_file[] = { {&_swigt__p_idmef_file, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_idmef_file_access[] = { {&_swigt__p_idmef_file_access, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_idmef_file_category_t[] = { {&_swigt__p_idmef_file_category_t, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_idmef_file_fstype_t[] = { {&_swigt__p_idmef_file_fstype_t, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_idmef_heartbeat[] = { {&_swigt__p_idmef_heartbeat, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_idmef_impact[] = { {&_swigt__p_idmef_impact, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_idmef_impact_completion_t[] = { {&_swigt__p_idmef_impact_completion_t, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_idmef_impact_severity_t[] = { {&_swigt__p_idmef_impact_severity_t, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_idmef_impact_type_t[] = { {&_swigt__p_idmef_impact_type_t, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_idmef_inode[] = { {&_swigt__p_idmef_inode, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_idmef_linkage[] = { {&_swigt__p_idmef_linkage, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_idmef_linkage_category_t[] = { {&_swigt__p_idmef_linkage_category_t, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_idmef_message[] = { {&_swigt__p_idmef_message, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_idmef_message_type_t[] = { {&_swigt__p_idmef_message_type_t, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_idmef_node[] = { {&_swigt__p_idmef_node, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_idmef_node_category_t[] = { {&_swigt__p_idmef_node_category_t, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_idmef_overflow_alert[] = { {&_swigt__p_idmef_overflow_alert, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_idmef_path[] = { {&_swigt__p_idmef_path, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_idmef_process[] = { {&_swigt__p_idmef_process, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_idmef_reference[] = { {&_swigt__p_idmef_reference, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_idmef_reference_origin_t[] = { {&_swigt__p_idmef_reference_origin_t, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_idmef_service[] = { {&_swigt__p_idmef_service, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_idmef_service_type_t[] = { {&_swigt__p_idmef_service_type_t, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_idmef_snmp_service[] = { {&_swigt__p_idmef_snmp_service, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_idmef_source[] = { {&_swigt__p_idmef_source, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_idmef_source_spoofed_t[] = { {&_swigt__p_idmef_source_spoofed_t, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_idmef_target[] = { {&_swigt__p_idmef_target, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_idmef_target_decoy_t[] = { {&_swigt__p_idmef_target_decoy_t, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_idmef_time[] = { {&_swigt__p_idmef_time, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_idmef_tool_alert[] = { {&_swigt__p_idmef_tool_alert, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_idmef_user[] = { {&_swigt__p_idmef_user, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_idmef_user_category_t[] = { {&_swigt__p_idmef_user_category_t, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_idmef_user_id[] = { {&_swigt__p_idmef_user_id, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_idmef_user_id_type_t[] = { {&_swigt__p_idmef_user_id_type_t, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_idmef_value[] = { {&_swigt__p_idmef_value, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_idmef_value_type_class_t[] = { {&_swigt__p_idmef_value_type_class_t, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_idmef_value_type_data_t[] = { {&_swigt__p_idmef_value_type_data_t, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_idmef_value_type_enum_t[] = { {&_swigt__p_idmef_value_type_enum_t, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_idmef_value_type_id_t[] = { {&_swigt__p_idmef_value_type_id_t, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_idmef_value_type_t[] = { {&_swigt__p_idmef_value_type_t, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_idmef_web_service[] = { {&_swigt__p_idmef_web_service, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_int[] = { {&_swigt__p_int, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_long_long[] = { {&_swigt__p_long_long, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_p_char[] = { {&_swigt__p_p_char, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_p_float[] = { {&_swigt__p_p_float, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_p_idmef_action[] = { {&_swigt__p_p_idmef_action, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_p_idmef_action_category_t[] = { {&_swigt__p_p_idmef_action_category_t, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_p_idmef_additional_data[] = { {&_swigt__p_p_idmef_additional_data, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_p_idmef_additional_data_type_t[] = { {&_swigt__p_p_idmef_additional_data_type_t, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_p_idmef_address[] = { {&_swigt__p_p_idmef_address, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_p_idmef_address_category_t[] = { {&_swigt__p_p_idmef_address_category_t, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_p_idmef_alert[] = { {&_swigt__p_p_idmef_alert, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_p_idmef_alertident[] = { {&_swigt__p_p_idmef_alertident, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_p_idmef_analyzer[] = { {&_swigt__p_p_idmef_analyzer, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_p_idmef_assessment[] = { {&_swigt__p_p_idmef_assessment, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_p_idmef_checksum[] = { {&_swigt__p_p_idmef_checksum, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_p_idmef_checksum_algorithm_t[] = { {&_swigt__p_p_idmef_checksum_algorithm_t, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_p_idmef_classification[] = { {&_swigt__p_p_idmef_classification, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_p_idmef_confidence[] = { {&_swigt__p_p_idmef_confidence, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_p_idmef_confidence_rating_t[] = { {&_swigt__p_p_idmef_confidence_rating_t, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_p_idmef_correlation_alert[] = { {&_swigt__p_p_idmef_correlation_alert, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_p_idmef_criteria[] = { {&_swigt__p_p_idmef_criteria, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_p_idmef_criterion[] = { {&_swigt__p_p_idmef_criterion, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_p_idmef_data_t[] = { {&_swigt__p_p_idmef_data_t, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_p_idmef_file[] = { {&_swigt__p_p_idmef_file, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_p_idmef_file_access[] = { {&_swigt__p_p_idmef_file_access, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_p_idmef_file_category_t[] = { {&_swigt__p_p_idmef_file_category_t, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_p_idmef_file_fstype_t[] = { {&_swigt__p_p_idmef_file_fstype_t, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_p_idmef_heartbeat[] = { {&_swigt__p_p_idmef_heartbeat, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_p_idmef_impact[] = { {&_swigt__p_p_idmef_impact, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_p_idmef_impact_completion_t[] = { {&_swigt__p_p_idmef_impact_completion_t, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_p_idmef_impact_severity_t[] = { {&_swigt__p_p_idmef_impact_severity_t, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_p_idmef_impact_type_t[] = { {&_swigt__p_p_idmef_impact_type_t, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_p_idmef_inode[] = { {&_swigt__p_p_idmef_inode, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_p_idmef_linkage[] = { {&_swigt__p_p_idmef_linkage, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_p_idmef_linkage_category_t[] = { {&_swigt__p_p_idmef_linkage_category_t, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_p_idmef_message[] = { {&_swigt__p_p_idmef_message, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_p_idmef_node[] = { {&_swigt__p_p_idmef_node, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_p_idmef_node_category_t[] = { {&_swigt__p_p_idmef_node_category_t, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_p_idmef_overflow_alert[] = { {&_swigt__p_p_idmef_overflow_alert, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_p_idmef_path[] = { {&_swigt__p_p_idmef_path, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_p_idmef_process[] = { {&_swigt__p_p_idmef_process, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_p_idmef_reference[] = { {&_swigt__p_p_idmef_reference, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_p_idmef_reference_origin_t[] = { {&_swigt__p_p_idmef_reference_origin_t, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_p_idmef_service[] = { {&_swigt__p_p_idmef_service, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_p_idmef_snmp_service[] = { {&_swigt__p_p_idmef_snmp_service, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_p_idmef_source[] = { {&_swigt__p_p_idmef_source, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_p_idmef_source_spoofed_t[] = { {&_swigt__p_p_idmef_source_spoofed_t, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_p_idmef_target[] = { {&_swigt__p_p_idmef_target, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_p_idmef_target_decoy_t[] = { {&_swigt__p_p_idmef_target_decoy_t, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_p_idmef_time[] = { {&_swigt__p_p_idmef_time, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_p_idmef_tool_alert[] = { {&_swigt__p_p_idmef_tool_alert, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_p_idmef_user[] = { {&_swigt__p_p_idmef_user, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_p_idmef_user_category_t[] = { {&_swigt__p_p_idmef_user_category_t, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_p_idmef_user_id[] = { {&_swigt__p_p_idmef_user_id, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_p_idmef_user_id_type_t[] = { {&_swigt__p_p_idmef_user_id_type_t, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_p_idmef_value[] = { {&_swigt__p_p_idmef_value, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_p_idmef_web_service[] = { {&_swigt__p_p_idmef_web_service, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_p_int[] = { {&_swigt__p_p_int, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_p_prelude_client[] = { {&_swigt__p_p_prelude_client, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_p_prelude_client_profile[] = { {&_swigt__p_p_prelude_client_profile, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_p_prelude_connection[] = { {&_swigt__p_p_prelude_connection, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_p_prelude_connection_pool[] = { {&_swigt__p_p_prelude_connection_pool, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_p_prelude_msg[] = { {&_swigt__p_p_prelude_msg, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_p_prelude_msgbuf[] = { {&_swigt__p_p_prelude_msgbuf, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_p_prelude_option[] = { {&_swigt__p_p_prelude_option, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_p_prelude_option_context[] = { {&_swigt__p_p_prelude_option_context, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_p_prelude_string_t[] = { {&_swigt__p_p_prelude_string_t, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_p_unsigned_char[] = { {&_swigt__p_p_unsigned_char, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_p_unsigned_int[] = { {&_swigt__p_p_unsigned_int, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_p_unsigned_long_long[] = { {&_swigt__p_p_unsigned_long_long, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_p_unsigned_short[] = { {&_swigt__p_p_unsigned_short, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_p_void[] = { {&_swigt__p_p_void, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_prelude_bool_t[] = { {&_swigt__p_prelude_bool_t, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_prelude_client[] = { {&_swigt__p_prelude_client, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_prelude_client_exit_status_t[] = { {&_swigt__p_prelude_client_exit_status_t, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_prelude_client_flags_t[] = { {&_swigt__p_prelude_client_flags_t, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_prelude_client_profile[] = { {&_swigt__p_prelude_client_profile, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_prelude_connection[] = { {&_swigt__p_prelude_connection, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_prelude_connection_permission_t[] = { {&_swigt__p_prelude_connection_permission_t, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_prelude_connection_pool[] = { {&_swigt__p_prelude_connection_pool, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_prelude_connection_pool_event_t[] = { {&_swigt__p_prelude_connection_pool_event_t, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_prelude_connection_pool_flags_t[] = { {&_swigt__p_prelude_connection_pool_flags_t, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_prelude_connection_state_t[] = { {&_swigt__p_prelude_connection_state_t, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_prelude_error_code_t[] = { {&_swigt__p_prelude_error_code_t, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_prelude_error_source_t[] = { {&_swigt__p_prelude_error_source_t, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_prelude_ident_t[] = { {&_swigt__p_prelude_ident_t, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_prelude_io_t[] = { {&_swigt__p_prelude_io_t, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_prelude_list_t[] = { {&_swigt__p_prelude_list_t, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_prelude_log_flags_t[] = { {&_swigt__p_prelude_log_flags_t, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_prelude_log_t[] = { {&_swigt__p_prelude_log_t, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_prelude_msg[] = { {&_swigt__p_prelude_msg, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_prelude_msg_priority_t[] = { {&_swigt__p_prelude_msg_priority_t, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_prelude_msgbuf[] = { {&_swigt__p_prelude_msgbuf, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_prelude_msgbuf_flags_t[] = { {&_swigt__p_prelude_msgbuf_flags_t, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_prelude_option[] = { {&_swigt__p_prelude_option, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_prelude_option_argument_t[] = { {&_swigt__p_prelude_option_argument_t, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_prelude_option_context[] = { {&_swigt__p_prelude_option_context, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_prelude_option_input_type_t[] = { {&_swigt__p_prelude_option_input_type_t, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_prelude_option_priority_t[] = { {&_swigt__p_prelude_option_priority_t, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_prelude_option_type_t[] = { {&_swigt__p_prelude_option_type_t, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_prelude_option_warning_t[] = { {&_swigt__p_prelude_option_warning_t, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_prelude_string_t[] = { {&_swigt__p_prelude_string_t, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_prelude_timer_t[] = { {&_swigt__p_prelude_timer_t, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_short[] = { {&_swigt__p_short, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_ssize_t[] = { {&_swigt__p_ssize_t, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_time_t[] = { {&_swigt__p_time_t, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_timeval[] = { {&_swigt__p_timeval, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_unsigned_char[] = { {&_swigt__p_unsigned_char, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_unsigned_int[] = { {&_swigt__p_unsigned_int, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_unsigned_long_long[] = { {&_swigt__p_unsigned_long_long, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_unsigned_short[] = { {&_swigt__p_unsigned_short, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_void[] = { {&_swigt__p_void, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info *swig_cast_initial[] = { _swigc__p_FILE, _swigc__p_char, _swigc__p_f_enum_prelude_log_t_p_q_const__char__void, _swigc__p_f_p_p_struct_prelude_msg_p_void__int, _swigc__p_f_p_struct_idmef_value_p_void__int, _swigc__p_f_p_struct_prelude_client_p_struct_idmef_message__void, _swigc__p_f_p_struct_prelude_connection_pool_enum_prelude_connection_pool_event_t__int, _swigc__p_f_p_struct_prelude_connection_pool_enum_prelude_connection_pool_event_t_p_struct_prelude_connection__int, _swigc__p_f_p_struct_prelude_connection_pool_enum_prelude_connection_pool_event_t_p_struct_prelude_connection_p_void__int, _swigc__p_f_p_struct_prelude_msgbuf_p_struct_prelude_msg__int, _swigc__p_f_p_struct_prelude_option_p_prelude_string_t_p_void__int, _swigc__p_f_p_struct_prelude_option_p_q_const__char_p_prelude_string_t_p_void__int, _swigc__p_f_p_void__void, _swigc__p_idmef_action, _swigc__p_idmef_action_category_t, _swigc__p_idmef_additional_data, _swigc__p_idmef_additional_data_type_t, _swigc__p_idmef_address, _swigc__p_idmef_address_category_t, _swigc__p_idmef_alert, _swigc__p_idmef_alert_type_t, _swigc__p_idmef_alertident, _swigc__p_idmef_analyzer, _swigc__p_idmef_assessment, _swigc__p_idmef_checksum, _swigc__p_idmef_checksum_algorithm_t, _swigc__p_idmef_classification, _swigc__p_idmef_confidence, _swigc__p_idmef_confidence_rating_t, _swigc__p_idmef_correlation_alert, _swigc__p_idmef_criteria, _swigc__p_idmef_criterion, _swigc__p_idmef_criterion_operator_t, _swigc__p_idmef_criterion_value_t, _swigc__p_idmef_data_t, _swigc__p_idmef_data_t_data, _swigc__p_idmef_data_type_t, _swigc__p_idmef_file, _swigc__p_idmef_file_access, _swigc__p_idmef_file_category_t, _swigc__p_idmef_file_fstype_t, _swigc__p_idmef_heartbeat, _swigc__p_idmef_impact, _swigc__p_idmef_impact_completion_t, _swigc__p_idmef_impact_severity_t, _swigc__p_idmef_impact_type_t, _swigc__p_idmef_inode, _swigc__p_idmef_linkage, _swigc__p_idmef_linkage_category_t, _swigc__p_idmef_message, _swigc__p_idmef_message_type_t, _swigc__p_idmef_node, _swigc__p_idmef_node_category_t, _swigc__p_idmef_overflow_alert, _swigc__p_idmef_path, _swigc__p_idmef_process, _swigc__p_idmef_reference, _swigc__p_idmef_reference_origin_t, _swigc__p_idmef_service, _swigc__p_idmef_service_type_t, _swigc__p_idmef_snmp_service, _swigc__p_idmef_source, _swigc__p_idmef_source_spoofed_t, _swigc__p_idmef_target, _swigc__p_idmef_target_decoy_t, _swigc__p_idmef_time, _swigc__p_idmef_tool_alert, _swigc__p_idmef_user, _swigc__p_idmef_user_category_t, _swigc__p_idmef_user_id, _swigc__p_idmef_user_id_type_t, _swigc__p_idmef_value, _swigc__p_idmef_value_type_class_t, _swigc__p_idmef_value_type_data_t, _swigc__p_idmef_value_type_enum_t, _swigc__p_idmef_value_type_id_t, _swigc__p_idmef_value_type_t, _swigc__p_idmef_web_service, _swigc__p_int, _swigc__p_long_long, _swigc__p_p_char, _swigc__p_p_float, _swigc__p_p_idmef_action, _swigc__p_p_idmef_action_category_t, _swigc__p_p_idmef_additional_data, _swigc__p_p_idmef_additional_data_type_t, _swigc__p_p_idmef_address, _swigc__p_p_idmef_address_category_t, _swigc__p_p_idmef_alert, _swigc__p_p_idmef_alertident, _swigc__p_p_idmef_analyzer, _swigc__p_p_idmef_assessment, _swigc__p_p_idmef_checksum, _swigc__p_p_idmef_checksum_algorithm_t, _swigc__p_p_idmef_classification, _swigc__p_p_idmef_confidence, _swigc__p_p_idmef_confidence_rating_t, _swigc__p_p_idmef_correlation_alert, _swigc__p_p_idmef_criteria, _swigc__p_p_idmef_criterion, _swigc__p_p_idmef_data_t, _swigc__p_p_idmef_file, _swigc__p_p_idmef_file_access, _swigc__p_p_idmef_file_category_t, _swigc__p_p_idmef_file_fstype_t, _swigc__p_p_idmef_heartbeat, _swigc__p_p_idmef_impact, _swigc__p_p_idmef_impact_completion_t, _swigc__p_p_idmef_impact_severity_t, _swigc__p_p_idmef_impact_type_t, _swigc__p_p_idmef_inode, _swigc__p_p_idmef_linkage, _swigc__p_p_idmef_linkage_category_t, _swigc__p_p_idmef_message, _swigc__p_p_idmef_node, _swigc__p_p_idmef_node_category_t, _swigc__p_p_idmef_overflow_alert, _swigc__p_p_idmef_path, _swigc__p_p_idmef_process, _swigc__p_p_idmef_reference, _swigc__p_p_idmef_reference_origin_t, _swigc__p_p_idmef_service, _swigc__p_p_idmef_snmp_service, _swigc__p_p_idmef_source, _swigc__p_p_idmef_source_spoofed_t, _swigc__p_p_idmef_target, _swigc__p_p_idmef_target_decoy_t, _swigc__p_p_idmef_time, _swigc__p_p_idmef_tool_alert, _swigc__p_p_idmef_user, _swigc__p_p_idmef_user_category_t, _swigc__p_p_idmef_user_id, _swigc__p_p_idmef_user_id_type_t, _swigc__p_p_idmef_value, _swigc__p_p_idmef_web_service, _swigc__p_p_int, _swigc__p_p_prelude_client, _swigc__p_p_prelude_client_profile, _swigc__p_p_prelude_connection, _swigc__p_p_prelude_connection_pool, _swigc__p_p_prelude_msg, _swigc__p_p_prelude_msgbuf, _swigc__p_p_prelude_option, _swigc__p_p_prelude_option_context, _swigc__p_p_prelude_string_t, _swigc__p_p_unsigned_char, _swigc__p_p_unsigned_int, _swigc__p_p_unsigned_long_long, _swigc__p_p_unsigned_short, _swigc__p_p_void, _swigc__p_prelude_bool_t, _swigc__p_prelude_client, _swigc__p_prelude_client_exit_status_t, _swigc__p_prelude_client_flags_t, _swigc__p_prelude_client_profile, _swigc__p_prelude_connection, _swigc__p_prelude_connection_permission_t, _swigc__p_prelude_connection_pool, _swigc__p_prelude_connection_pool_event_t, _swigc__p_prelude_connection_pool_flags_t, _swigc__p_prelude_connection_state_t, _swigc__p_prelude_error_code_t, _swigc__p_prelude_error_source_t, _swigc__p_prelude_ident_t, _swigc__p_prelude_io_t, _swigc__p_prelude_list_t, _swigc__p_prelude_log_flags_t, _swigc__p_prelude_log_t, _swigc__p_prelude_msg, _swigc__p_prelude_msg_priority_t, _swigc__p_prelude_msgbuf, _swigc__p_prelude_msgbuf_flags_t, _swigc__p_prelude_option, _swigc__p_prelude_option_argument_t, _swigc__p_prelude_option_context, _swigc__p_prelude_option_input_type_t, _swigc__p_prelude_option_priority_t, _swigc__p_prelude_option_type_t, _swigc__p_prelude_option_warning_t, _swigc__p_prelude_string_t, _swigc__p_prelude_timer_t, _swigc__p_short, _swigc__p_ssize_t, _swigc__p_time_t, _swigc__p_timeval, _swigc__p_unsigned_char, _swigc__p_unsigned_int, _swigc__p_unsigned_long_long, _swigc__p_unsigned_short, _swigc__p_void, }; /* -------- TYPE CONVERSION AND EQUIVALENCE RULES (END) -------- */ static swig_const_info swig_const_table[] = { {0, 0, 0, 0.0, 0, 0}}; #ifdef __cplusplus } #endif /* ----------------------------------------------------------------------------- * Type initialization: * This problem is tough by the requirement that no dynamic * memory is used. Also, since swig_type_info structures store pointers to * swig_cast_info structures and swig_cast_info structures store pointers back * to swig_type_info structures, we need some lookup code at initialization. * The idea is that swig generates all the structures that are needed. * The runtime then collects these partially filled structures. * The SWIG_InitializeModule function takes these initial arrays out of * swig_module, and does all the lookup, filling in the swig_module.types * array with the correct data and linking the correct swig_cast_info * structures together. * * The generated swig_type_info structures are assigned staticly to an initial * array. We just loop through that array, and handle each type individually. * First we lookup if this type has been already loaded, and if so, use the * loaded structure instead of the generated one. Then we have to fill in the * cast linked list. The cast data is initially stored in something like a * two-dimensional array. Each row corresponds to a type (there are the same * number of rows as there are in the swig_type_initial array). Each entry in * a column is one of the swig_cast_info structures for that type. * The cast_initial array is actually an array of arrays, because each row has * a variable number of columns. So to actually build the cast linked list, * we find the array of casts associated with the type, and loop through it * adding the casts to the list. The one last trick we need to do is making * sure the type pointer in the swig_cast_info struct is correct. * * First off, we lookup the cast->type name to see if it is already loaded. * There are three cases to handle: * 1) If the cast->type has already been loaded AND the type we are adding * casting info to has not been loaded (it is in this module), THEN we * replace the cast->type pointer with the type pointer that has already * been loaded. * 2) If BOTH types (the one we are adding casting info to, and the * cast->type) are loaded, THEN the cast info has already been loaded by * the previous module so we just ignore it. * 3) Finally, if cast->type has not already been loaded, then we add that * swig_cast_info to the linked list (because the cast->type) pointer will * be correct. * ----------------------------------------------------------------------------- */ #ifdef __cplusplus extern "C" { #if 0 } /* c-mode */ #endif #endif #if 0 #define SWIGRUNTIME_DEBUG #endif SWIGRUNTIME void SWIG_InitializeModule(void *clientdata) { size_t i; swig_module_info *module_head, *iter; int found, init; clientdata = clientdata; /* check to see if the circular list has been setup, if not, set it up */ if (swig_module.next==0) { /* Initialize the swig_module */ swig_module.type_initial = swig_type_initial; swig_module.cast_initial = swig_cast_initial; swig_module.next = &swig_module; init = 1; } else { init = 0; } /* Try and load any already created modules */ module_head = SWIG_GetModule(clientdata); if (!module_head) { /* This is the first module loaded for this interpreter */ /* so set the swig module into the interpreter */ SWIG_SetModule(clientdata, &swig_module); module_head = &swig_module; } else { /* the interpreter has loaded a SWIG module, but has it loaded this one? */ found=0; iter=module_head; do { if (iter==&swig_module) { found=1; break; } iter=iter->next; } while (iter!= module_head); /* if the is found in the list, then all is done and we may leave */ if (found) return; /* otherwise we must add out module into the list */ swig_module.next = module_head->next; module_head->next = &swig_module; } /* When multiple interpeters are used, a module could have already been initialized in a different interpreter, but not yet have a pointer in this interpreter. In this case, we do not want to continue adding types... everything should be set up already */ if (init == 0) return; /* Now work on filling in swig_module.types */ #ifdef SWIGRUNTIME_DEBUG printf("SWIG_InitializeModule: size %d\n", swig_module.size); #endif for (i = 0; i < swig_module.size; ++i) { swig_type_info *type = 0; swig_type_info *ret; swig_cast_info *cast; #ifdef SWIGRUNTIME_DEBUG printf("SWIG_InitializeModule: type %d %s\n", i, swig_module.type_initial[i]->name); #endif /* if there is another module already loaded */ if (swig_module.next != &swig_module) { type = SWIG_MangledTypeQueryModule(swig_module.next, &swig_module, swig_module.type_initial[i]->name); } if (type) { /* Overwrite clientdata field */ #ifdef SWIGRUNTIME_DEBUG printf("SWIG_InitializeModule: found type %s\n", type->name); #endif if (swig_module.type_initial[i]->clientdata) { type->clientdata = swig_module.type_initial[i]->clientdata; #ifdef SWIGRUNTIME_DEBUG printf("SWIG_InitializeModule: found and overwrite type %s \n", type->name); #endif } } else { type = swig_module.type_initial[i]; } /* Insert casting types */ cast = swig_module.cast_initial[i]; while (cast->type) { /* Don't need to add information already in the list */ ret = 0; #ifdef SWIGRUNTIME_DEBUG printf("SWIG_InitializeModule: look cast %s\n", cast->type->name); #endif if (swig_module.next != &swig_module) { ret = SWIG_MangledTypeQueryModule(swig_module.next, &swig_module, cast->type->name); #ifdef SWIGRUNTIME_DEBUG if (ret) printf("SWIG_InitializeModule: found cast %s\n", ret->name); #endif } if (ret) { if (type == swig_module.type_initial[i]) { #ifdef SWIGRUNTIME_DEBUG printf("SWIG_InitializeModule: skip old type %s\n", ret->name); #endif cast->type = ret; ret = 0; } else { /* Check for casting already in the list */ swig_cast_info *ocast = SWIG_TypeCheck(ret->name, type); #ifdef SWIGRUNTIME_DEBUG if (ocast) printf("SWIG_InitializeModule: skip old cast %s\n", ret->name); #endif if (!ocast) ret = 0; } } if (!ret) { #ifdef SWIGRUNTIME_DEBUG printf("SWIG_InitializeModule: adding cast %s\n", cast->type->name); #endif if (type->cast) { type->cast->prev = cast; cast->next = type->cast; } type->cast = cast; } cast++; } /* Set entry in modules->types array equal to the type */ swig_module.types[i] = type; } swig_module.types[i] = 0; #ifdef SWIGRUNTIME_DEBUG printf("**** SWIG_InitializeModule: Cast List ******\n"); for (i = 0; i < swig_module.size; ++i) { int j = 0; swig_cast_info *cast = swig_module.cast_initial[i]; printf("SWIG_InitializeModule: type %d %s\n", i, swig_module.type_initial[i]->name); while (cast->type) { printf("SWIG_InitializeModule: cast type %s\n", cast->type->name); cast++; ++j; } printf("---- Total casts: %d\n",j); } printf("**** SWIG_InitializeModule: Cast List ******\n"); #endif } /* This function will propagate the clientdata field of type to * any new swig_type_info structures that have been added into the list * of equivalent types. It is like calling * SWIG_TypeClientData(type, clientdata) a second time. */ SWIGRUNTIME void SWIG_PropagateClientData(void) { size_t i; swig_cast_info *equiv; static int init_run = 0; if (init_run) return; init_run = 1; for (i = 0; i < swig_module.size; i++) { if (swig_module.types[i]->clientdata) { equiv = swig_module.types[i]->cast; while (equiv) { if (!equiv->converter) { if (equiv->type && !equiv->type->clientdata) SWIG_TypeClientData(equiv->type, swig_module.types[i]->clientdata); } equiv = equiv->next; } } } } #ifdef __cplusplus #if 0 { /* c-mode */ #endif } #endif #ifdef __cplusplus extern "C" { #endif /* Python-specific SWIG API */ #define SWIG_newvarlink() SWIG_Python_newvarlink() #define SWIG_addvarlink(p, name, get_attr, set_attr) SWIG_Python_addvarlink(p, name, get_attr, set_attr) #define SWIG_InstallConstants(d, constants) SWIG_Python_InstallConstants(d, constants) /* ----------------------------------------------------------------------------- * global variable support code. * ----------------------------------------------------------------------------- */ typedef struct swig_globalvar { char *name; /* Name of global variable */ PyObject *(*get_attr)(void); /* Return the current value */ int (*set_attr)(PyObject *); /* Set the value */ struct swig_globalvar *next; } swig_globalvar; typedef struct swig_varlinkobject { PyObject_HEAD swig_globalvar *vars; } swig_varlinkobject; SWIGINTERN PyObject * swig_varlink_repr(swig_varlinkobject *SWIGUNUSEDPARM(v)) { #if PY_VERSION_HEX >= 0x03000000 return PyUnicode_InternFromString(""); #else return PyString_FromString(""); #endif } SWIGINTERN PyObject * swig_varlink_str(swig_varlinkobject *v) { #if PY_VERSION_HEX >= 0x03000000 PyObject *str = PyUnicode_InternFromString("("); PyObject *tail; PyObject *joined; swig_globalvar *var; for (var = v->vars; var; var=var->next) { tail = PyUnicode_FromString(var->name); joined = PyUnicode_Concat(str, tail); Py_DecRef(str); Py_DecRef(tail); str = joined; if (var->next) { tail = PyUnicode_InternFromString(", "); joined = PyUnicode_Concat(str, tail); Py_DecRef(str); Py_DecRef(tail); str = joined; } } tail = PyUnicode_InternFromString(")"); joined = PyUnicode_Concat(str, tail); Py_DecRef(str); Py_DecRef(tail); str = joined; #else PyObject *str = PyString_FromString("("); swig_globalvar *var; for (var = v->vars; var; var=var->next) { PyString_ConcatAndDel(&str,PyString_FromString(var->name)); if (var->next) PyString_ConcatAndDel(&str,PyString_FromString(", ")); } PyString_ConcatAndDel(&str,PyString_FromString(")")); #endif return str; } SWIGINTERN int swig_varlink_print(swig_varlinkobject *v, FILE *fp, int SWIGUNUSEDPARM(flags)) { char *tmp; PyObject *str = swig_varlink_str(v); fprintf(fp,"Swig global variables "); fprintf(fp,"%s\n", tmp = SWIG_Python_str_AsChar(str)); SWIG_Python_str_DelForPy3(tmp); Py_DECREF(str); return 0; } SWIGINTERN void swig_varlink_dealloc(swig_varlinkobject *v) { swig_globalvar *var = v->vars; while (var) { swig_globalvar *n = var->next; free(var->name); free(var); var = n; } } SWIGINTERN PyObject * swig_varlink_getattr(swig_varlinkobject *v, char *n) { PyObject *res = NULL; swig_globalvar *var = v->vars; while (var) { if (strcmp(var->name,n) == 0) { res = (*var->get_attr)(); break; } var = var->next; } if (res == NULL && !PyErr_Occurred()) { PyErr_SetString(PyExc_NameError,"Unknown C global variable"); } return res; } SWIGINTERN int swig_varlink_setattr(swig_varlinkobject *v, char *n, PyObject *p) { int res = 1; swig_globalvar *var = v->vars; while (var) { if (strcmp(var->name,n) == 0) { res = (*var->set_attr)(p); break; } var = var->next; } if (res == 1 && !PyErr_Occurred()) { PyErr_SetString(PyExc_NameError,"Unknown C global variable"); } return res; } SWIGINTERN PyTypeObject* swig_varlink_type(void) { static char varlink__doc__[] = "Swig var link object"; static PyTypeObject varlink_type; static int type_init = 0; if (!type_init) { const PyTypeObject tmp = { /* PyObject header changed in Python 3 */ #if PY_VERSION_HEX >= 0x03000000 PyVarObject_HEAD_INIT(&PyType_Type, 0) #else PyObject_HEAD_INIT(NULL) 0, /* Number of items in variable part (ob_size) */ #endif (char *)"swigvarlink", /* Type name (tp_name) */ sizeof(swig_varlinkobject), /* Basic size (tp_basicsize) */ 0, /* Itemsize (tp_itemsize) */ (destructor) swig_varlink_dealloc, /* Deallocator (tp_dealloc) */ (printfunc) swig_varlink_print, /* Print (tp_print) */ (getattrfunc) swig_varlink_getattr, /* get attr (tp_getattr) */ (setattrfunc) swig_varlink_setattr, /* Set attr (tp_setattr) */ 0, /* tp_compare */ (reprfunc) swig_varlink_repr, /* tp_repr */ 0, /* tp_as_number */ 0, /* tp_as_sequence */ 0, /* tp_as_mapping */ 0, /* tp_hash */ 0, /* tp_call */ (reprfunc) swig_varlink_str, /* tp_str */ 0, /* tp_getattro */ 0, /* tp_setattro */ 0, /* tp_as_buffer */ 0, /* tp_flags */ varlink__doc__, /* tp_doc */ 0, /* tp_traverse */ 0, /* tp_clear */ 0, /* tp_richcompare */ 0, /* tp_weaklistoffset */ #if PY_VERSION_HEX >= 0x02020000 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /* tp_iter -> tp_weaklist */ #endif #if PY_VERSION_HEX >= 0x02030000 0, /* tp_del */ #endif #ifdef COUNT_ALLOCS 0,0,0,0 /* tp_alloc -> tp_next */ #endif }; varlink_type = tmp; /* for Python 3 we already assigned ob_type in PyVarObject_HEAD_INIT() */ #if PY_VERSION_HEX < 0x03000000 varlink_type.ob_type = &PyType_Type; #endif type_init = 1; } return &varlink_type; } /* Create a variable linking object for use later */ SWIGINTERN PyObject * SWIG_Python_newvarlink(void) { swig_varlinkobject *result = PyObject_NEW(swig_varlinkobject, swig_varlink_type()); if (result) { result->vars = 0; } return ((PyObject*) result); } SWIGINTERN void SWIG_Python_addvarlink(PyObject *p, char *name, PyObject *(*get_attr)(void), int (*set_attr)(PyObject *p)) { swig_varlinkobject *v = (swig_varlinkobject *) p; swig_globalvar *gv = (swig_globalvar *) malloc(sizeof(swig_globalvar)); if (gv) { size_t size = strlen(name)+1; gv->name = (char *)malloc(size); if (gv->name) { strncpy(gv->name,name,size); gv->get_attr = get_attr; gv->set_attr = set_attr; gv->next = v->vars; } } v->vars = gv; } SWIGINTERN PyObject * SWIG_globals(void) { static PyObject *_SWIG_globals = 0; if (!_SWIG_globals) _SWIG_globals = SWIG_newvarlink(); return _SWIG_globals; } /* ----------------------------------------------------------------------------- * constants/methods manipulation * ----------------------------------------------------------------------------- */ /* Install Constants */ SWIGINTERN void SWIG_Python_InstallConstants(PyObject *d, swig_const_info constants[]) { PyObject *obj = 0; size_t i; for (i = 0; constants[i].type; ++i) { switch(constants[i].type) { case SWIG_PY_POINTER: obj = SWIG_NewPointerObj(constants[i].pvalue, *(constants[i]).ptype,0); break; case SWIG_PY_BINARY: obj = SWIG_NewPackedObj(constants[i].pvalue, constants[i].lvalue, *(constants[i].ptype)); break; default: obj = 0; break; } if (obj) { PyDict_SetItemString(d, constants[i].name, obj); Py_DECREF(obj); } } } /* -----------------------------------------------------------------------------*/ /* Fix SwigMethods to carry the callback ptrs when needed */ /* -----------------------------------------------------------------------------*/ SWIGINTERN void SWIG_Python_FixMethods(PyMethodDef *methods, swig_const_info *const_table, swig_type_info **types, swig_type_info **types_initial) { size_t i; for (i = 0; methods[i].ml_name; ++i) { const char *c = methods[i].ml_doc; if (c && (c = strstr(c, "swig_ptr: "))) { int j; swig_const_info *ci = 0; const char *name = c + 10; for (j = 0; const_table[j].type; ++j) { if (strncmp(const_table[j].name, name, strlen(const_table[j].name)) == 0) { ci = &(const_table[j]); break; } } if (ci) { size_t shift = (ci->ptype) - types; swig_type_info *ty = types_initial[shift]; size_t ldoc = (c - methods[i].ml_doc); size_t lptr = strlen(ty->name)+2*sizeof(void*)+2; char *ndoc = (char*)malloc(ldoc + lptr + 10); if (ndoc) { char *buff = ndoc; void *ptr = (ci->type == SWIG_PY_POINTER) ? ci->pvalue : 0; if (ptr) { strncpy(buff, methods[i].ml_doc, ldoc); buff += ldoc; strncpy(buff, "swig_ptr: ", 10); buff += 10; SWIG_PackVoidPtr(buff, ptr, ty->name, lptr); methods[i].ml_doc = ndoc; } } } } } } #ifdef __cplusplus } #endif /* -----------------------------------------------------------------------------* * Partial Init method * -----------------------------------------------------------------------------*/ #ifdef __cplusplus extern "C" #endif SWIGEXPORT #if PY_VERSION_HEX >= 0x03000000 PyObject* #else void #endif SWIG_init(void) { PyObject *m, *d; #if PY_VERSION_HEX >= 0x03000000 static struct PyModuleDef SWIG_module = { PyModuleDef_HEAD_INIT, (char *) SWIG_name, NULL, -1, SwigMethods, NULL, NULL, NULL, NULL }; #endif /* Fix SwigMethods to carry the callback ptrs when needed */ SWIG_Python_FixMethods(SwigMethods, swig_const_table, swig_types, swig_type_initial); #if PY_VERSION_HEX >= 0x03000000 m = PyModule_Create(&SWIG_module); #else m = Py_InitModule((char *) SWIG_name, SwigMethods); #endif d = PyModule_GetDict(m); SWIG_InitializeModule(0); SWIG_InstallConstants(d,swig_const_table); SWIG_Python_SetConstant(d, "IDMEF_LIST_APPEND",SWIG_From_int((int)(IDMEF_LIST_APPEND))); SWIG_Python_SetConstant(d, "IDMEF_LIST_PREPEND",SWIG_From_int((int)(IDMEF_LIST_PREPEND))); SWIG_Python_SetConstant(d, "PRELUDE_BOOL_TRUE",SWIG_From_int((int)(PRELUDE_BOOL_TRUE))); SWIG_Python_SetConstant(d, "PRELUDE_BOOL_FALSE",SWIG_From_int((int)(PRELUDE_BOOL_FALSE))); SWIG_Python_SetConstant(d, "LIBPRELUDE_VERSION",SWIG_FromCharPtr("1.0.0rc1")); SWIG_Python_SetConstant(d, "PRELUDE_CLIENT_EXIT_STATUS_SUCCESS",SWIG_From_int((int)(PRELUDE_CLIENT_EXIT_STATUS_SUCCESS))); SWIG_Python_SetConstant(d, "PRELUDE_CLIENT_EXIT_STATUS_FAILURE",SWIG_From_int((int)(PRELUDE_CLIENT_EXIT_STATUS_FAILURE))); SWIG_Python_SetConstant(d, "PRELUDE_CLIENT_FLAGS_ASYNC_SEND",SWIG_From_int((int)(PRELUDE_CLIENT_FLAGS_ASYNC_SEND))); SWIG_Python_SetConstant(d, "PRELUDE_CLIENT_FLAGS_ASYNC_TIMER",SWIG_From_int((int)(PRELUDE_CLIENT_FLAGS_ASYNC_TIMER))); SWIG_Python_SetConstant(d, "PRELUDE_CLIENT_FLAGS_HEARTBEAT",SWIG_From_int((int)(PRELUDE_CLIENT_FLAGS_HEARTBEAT))); SWIG_Python_SetConstant(d, "PRELUDE_CLIENT_FLAGS_CONNECT",SWIG_From_int((int)(PRELUDE_CLIENT_FLAGS_CONNECT))); SWIG_Python_SetConstant(d, "PRELUDE_CLIENT_FLAGS_AUTOCONFIG",SWIG_From_int((int)(PRELUDE_CLIENT_FLAGS_AUTOCONFIG))); SWIG_Python_SetConstant(d, "IDMEF_ADDITIONAL_DATA_TYPE_ERROR",SWIG_From_int((int)(IDMEF_ADDITIONAL_DATA_TYPE_ERROR))); SWIG_Python_SetConstant(d, "IDMEF_ADDITIONAL_DATA_TYPE_STRING",SWIG_From_int((int)(IDMEF_ADDITIONAL_DATA_TYPE_STRING))); SWIG_Python_SetConstant(d, "IDMEF_ADDITIONAL_DATA_TYPE_BYTE",SWIG_From_int((int)(IDMEF_ADDITIONAL_DATA_TYPE_BYTE))); SWIG_Python_SetConstant(d, "IDMEF_ADDITIONAL_DATA_TYPE_CHARACTER",SWIG_From_int((int)(IDMEF_ADDITIONAL_DATA_TYPE_CHARACTER))); SWIG_Python_SetConstant(d, "IDMEF_ADDITIONAL_DATA_TYPE_DATE_TIME",SWIG_From_int((int)(IDMEF_ADDITIONAL_DATA_TYPE_DATE_TIME))); SWIG_Python_SetConstant(d, "IDMEF_ADDITIONAL_DATA_TYPE_INTEGER",SWIG_From_int((int)(IDMEF_ADDITIONAL_DATA_TYPE_INTEGER))); SWIG_Python_SetConstant(d, "IDMEF_ADDITIONAL_DATA_TYPE_NTPSTAMP",SWIG_From_int((int)(IDMEF_ADDITIONAL_DATA_TYPE_NTPSTAMP))); SWIG_Python_SetConstant(d, "IDMEF_ADDITIONAL_DATA_TYPE_PORTLIST",SWIG_From_int((int)(IDMEF_ADDITIONAL_DATA_TYPE_PORTLIST))); SWIG_Python_SetConstant(d, "IDMEF_ADDITIONAL_DATA_TYPE_REAL",SWIG_From_int((int)(IDMEF_ADDITIONAL_DATA_TYPE_REAL))); SWIG_Python_SetConstant(d, "IDMEF_ADDITIONAL_DATA_TYPE_BOOLEAN",SWIG_From_int((int)(IDMEF_ADDITIONAL_DATA_TYPE_BOOLEAN))); SWIG_Python_SetConstant(d, "IDMEF_ADDITIONAL_DATA_TYPE_BYTE_STRING",SWIG_From_int((int)(IDMEF_ADDITIONAL_DATA_TYPE_BYTE_STRING))); SWIG_Python_SetConstant(d, "IDMEF_ADDITIONAL_DATA_TYPE_XML",SWIG_From_int((int)(IDMEF_ADDITIONAL_DATA_TYPE_XML))); SWIG_Python_SetConstant(d, "IDMEF_REFERENCE_ORIGIN_ERROR",SWIG_From_int((int)(IDMEF_REFERENCE_ORIGIN_ERROR))); SWIG_Python_SetConstant(d, "IDMEF_REFERENCE_ORIGIN_UNKNOWN",SWIG_From_int((int)(IDMEF_REFERENCE_ORIGIN_UNKNOWN))); SWIG_Python_SetConstant(d, "IDMEF_REFERENCE_ORIGIN_VENDOR_SPECIFIC",SWIG_From_int((int)(IDMEF_REFERENCE_ORIGIN_VENDOR_SPECIFIC))); SWIG_Python_SetConstant(d, "IDMEF_REFERENCE_ORIGIN_USER_SPECIFIC",SWIG_From_int((int)(IDMEF_REFERENCE_ORIGIN_USER_SPECIFIC))); SWIG_Python_SetConstant(d, "IDMEF_REFERENCE_ORIGIN_BUGTRAQID",SWIG_From_int((int)(IDMEF_REFERENCE_ORIGIN_BUGTRAQID))); SWIG_Python_SetConstant(d, "IDMEF_REFERENCE_ORIGIN_CVE",SWIG_From_int((int)(IDMEF_REFERENCE_ORIGIN_CVE))); SWIG_Python_SetConstant(d, "IDMEF_REFERENCE_ORIGIN_OSVDB",SWIG_From_int((int)(IDMEF_REFERENCE_ORIGIN_OSVDB))); SWIG_Python_SetConstant(d, "IDMEF_USER_ID_TYPE_ORIGINAL_ERROR",SWIG_From_int((int)(IDMEF_USER_ID_TYPE_ORIGINAL_ERROR))); SWIG_Python_SetConstant(d, "IDMEF_USER_ID_TYPE_ORIGINAL_USER",SWIG_From_int((int)(IDMEF_USER_ID_TYPE_ORIGINAL_USER))); SWIG_Python_SetConstant(d, "IDMEF_USER_ID_TYPE_CURRENT_USER",SWIG_From_int((int)(IDMEF_USER_ID_TYPE_CURRENT_USER))); SWIG_Python_SetConstant(d, "IDMEF_USER_ID_TYPE_TARGET_USER",SWIG_From_int((int)(IDMEF_USER_ID_TYPE_TARGET_USER))); SWIG_Python_SetConstant(d, "IDMEF_USER_ID_TYPE_USER_PRIVS",SWIG_From_int((int)(IDMEF_USER_ID_TYPE_USER_PRIVS))); SWIG_Python_SetConstant(d, "IDMEF_USER_ID_TYPE_CURRENT_GROUP",SWIG_From_int((int)(IDMEF_USER_ID_TYPE_CURRENT_GROUP))); SWIG_Python_SetConstant(d, "IDMEF_USER_ID_TYPE_GROUP_PRIVS",SWIG_From_int((int)(IDMEF_USER_ID_TYPE_GROUP_PRIVS))); SWIG_Python_SetConstant(d, "IDMEF_USER_ID_TYPE_OTHER_PRIVS",SWIG_From_int((int)(IDMEF_USER_ID_TYPE_OTHER_PRIVS))); SWIG_Python_SetConstant(d, "IDMEF_USER_CATEGORY_ERROR",SWIG_From_int((int)(IDMEF_USER_CATEGORY_ERROR))); SWIG_Python_SetConstant(d, "IDMEF_USER_CATEGORY_UNKNOWN",SWIG_From_int((int)(IDMEF_USER_CATEGORY_UNKNOWN))); SWIG_Python_SetConstant(d, "IDMEF_USER_CATEGORY_APPLICATION",SWIG_From_int((int)(IDMEF_USER_CATEGORY_APPLICATION))); SWIG_Python_SetConstant(d, "IDMEF_USER_CATEGORY_OS_DEVICE",SWIG_From_int((int)(IDMEF_USER_CATEGORY_OS_DEVICE))); SWIG_Python_SetConstant(d, "IDMEF_ADDRESS_CATEGORY_ERROR",SWIG_From_int((int)(IDMEF_ADDRESS_CATEGORY_ERROR))); SWIG_Python_SetConstant(d, "IDMEF_ADDRESS_CATEGORY_UNKNOWN",SWIG_From_int((int)(IDMEF_ADDRESS_CATEGORY_UNKNOWN))); SWIG_Python_SetConstant(d, "IDMEF_ADDRESS_CATEGORY_ATM",SWIG_From_int((int)(IDMEF_ADDRESS_CATEGORY_ATM))); SWIG_Python_SetConstant(d, "IDMEF_ADDRESS_CATEGORY_E_MAIL",SWIG_From_int((int)(IDMEF_ADDRESS_CATEGORY_E_MAIL))); SWIG_Python_SetConstant(d, "IDMEF_ADDRESS_CATEGORY_LOTUS_NOTES",SWIG_From_int((int)(IDMEF_ADDRESS_CATEGORY_LOTUS_NOTES))); SWIG_Python_SetConstant(d, "IDMEF_ADDRESS_CATEGORY_MAC",SWIG_From_int((int)(IDMEF_ADDRESS_CATEGORY_MAC))); SWIG_Python_SetConstant(d, "IDMEF_ADDRESS_CATEGORY_SNA",SWIG_From_int((int)(IDMEF_ADDRESS_CATEGORY_SNA))); SWIG_Python_SetConstant(d, "IDMEF_ADDRESS_CATEGORY_VM",SWIG_From_int((int)(IDMEF_ADDRESS_CATEGORY_VM))); SWIG_Python_SetConstant(d, "IDMEF_ADDRESS_CATEGORY_IPV4_ADDR",SWIG_From_int((int)(IDMEF_ADDRESS_CATEGORY_IPV4_ADDR))); SWIG_Python_SetConstant(d, "IDMEF_ADDRESS_CATEGORY_IPV4_ADDR_HEX",SWIG_From_int((int)(IDMEF_ADDRESS_CATEGORY_IPV4_ADDR_HEX))); SWIG_Python_SetConstant(d, "IDMEF_ADDRESS_CATEGORY_IPV4_NET",SWIG_From_int((int)(IDMEF_ADDRESS_CATEGORY_IPV4_NET))); SWIG_Python_SetConstant(d, "IDMEF_ADDRESS_CATEGORY_IPV4_NET_MASK",SWIG_From_int((int)(IDMEF_ADDRESS_CATEGORY_IPV4_NET_MASK))); SWIG_Python_SetConstant(d, "IDMEF_ADDRESS_CATEGORY_IPV6_ADDR",SWIG_From_int((int)(IDMEF_ADDRESS_CATEGORY_IPV6_ADDR))); SWIG_Python_SetConstant(d, "IDMEF_ADDRESS_CATEGORY_IPV6_ADDR_HEX",SWIG_From_int((int)(IDMEF_ADDRESS_CATEGORY_IPV6_ADDR_HEX))); SWIG_Python_SetConstant(d, "IDMEF_ADDRESS_CATEGORY_IPV6_NET",SWIG_From_int((int)(IDMEF_ADDRESS_CATEGORY_IPV6_NET))); SWIG_Python_SetConstant(d, "IDMEF_ADDRESS_CATEGORY_IPV6_NET_MASK",SWIG_From_int((int)(IDMEF_ADDRESS_CATEGORY_IPV6_NET_MASK))); SWIG_Python_SetConstant(d, "IDMEF_SERVICE_TYPE_ERROR",SWIG_From_int((int)(IDMEF_SERVICE_TYPE_ERROR))); SWIG_Python_SetConstant(d, "IDMEF_SERVICE_TYPE_DEFAULT",SWIG_From_int((int)(IDMEF_SERVICE_TYPE_DEFAULT))); SWIG_Python_SetConstant(d, "IDMEF_SERVICE_TYPE_WEB",SWIG_From_int((int)(IDMEF_SERVICE_TYPE_WEB))); SWIG_Python_SetConstant(d, "IDMEF_SERVICE_TYPE_SNMP",SWIG_From_int((int)(IDMEF_SERVICE_TYPE_SNMP))); SWIG_Python_SetConstant(d, "IDMEF_NODE_CATEGORY_ERROR",SWIG_From_int((int)(IDMEF_NODE_CATEGORY_ERROR))); SWIG_Python_SetConstant(d, "IDMEF_NODE_CATEGORY_UNKNOWN",SWIG_From_int((int)(IDMEF_NODE_CATEGORY_UNKNOWN))); SWIG_Python_SetConstant(d, "IDMEF_NODE_CATEGORY_ADS",SWIG_From_int((int)(IDMEF_NODE_CATEGORY_ADS))); SWIG_Python_SetConstant(d, "IDMEF_NODE_CATEGORY_AFS",SWIG_From_int((int)(IDMEF_NODE_CATEGORY_AFS))); SWIG_Python_SetConstant(d, "IDMEF_NODE_CATEGORY_CODA",SWIG_From_int((int)(IDMEF_NODE_CATEGORY_CODA))); SWIG_Python_SetConstant(d, "IDMEF_NODE_CATEGORY_DFS",SWIG_From_int((int)(IDMEF_NODE_CATEGORY_DFS))); SWIG_Python_SetConstant(d, "IDMEF_NODE_CATEGORY_DNS",SWIG_From_int((int)(IDMEF_NODE_CATEGORY_DNS))); SWIG_Python_SetConstant(d, "IDMEF_NODE_CATEGORY_HOSTS",SWIG_From_int((int)(IDMEF_NODE_CATEGORY_HOSTS))); SWIG_Python_SetConstant(d, "IDMEF_NODE_CATEGORY_KERBEROS",SWIG_From_int((int)(IDMEF_NODE_CATEGORY_KERBEROS))); SWIG_Python_SetConstant(d, "IDMEF_NODE_CATEGORY_NDS",SWIG_From_int((int)(IDMEF_NODE_CATEGORY_NDS))); SWIG_Python_SetConstant(d, "IDMEF_NODE_CATEGORY_NIS",SWIG_From_int((int)(IDMEF_NODE_CATEGORY_NIS))); SWIG_Python_SetConstant(d, "IDMEF_NODE_CATEGORY_NISPLUS",SWIG_From_int((int)(IDMEF_NODE_CATEGORY_NISPLUS))); SWIG_Python_SetConstant(d, "IDMEF_NODE_CATEGORY_NT",SWIG_From_int((int)(IDMEF_NODE_CATEGORY_NT))); SWIG_Python_SetConstant(d, "IDMEF_NODE_CATEGORY_WFW",SWIG_From_int((int)(IDMEF_NODE_CATEGORY_WFW))); SWIG_Python_SetConstant(d, "IDMEF_SOURCE_SPOOFED_ERROR",SWIG_From_int((int)(IDMEF_SOURCE_SPOOFED_ERROR))); SWIG_Python_SetConstant(d, "IDMEF_SOURCE_SPOOFED_UNKNOWN",SWIG_From_int((int)(IDMEF_SOURCE_SPOOFED_UNKNOWN))); SWIG_Python_SetConstant(d, "IDMEF_SOURCE_SPOOFED_YES",SWIG_From_int((int)(IDMEF_SOURCE_SPOOFED_YES))); SWIG_Python_SetConstant(d, "IDMEF_SOURCE_SPOOFED_NO",SWIG_From_int((int)(IDMEF_SOURCE_SPOOFED_NO))); SWIG_Python_SetConstant(d, "IDMEF_CHECKSUM_ALGORITHM_ERROR",SWIG_From_int((int)(IDMEF_CHECKSUM_ALGORITHM_ERROR))); SWIG_Python_SetConstant(d, "IDMEF_CHECKSUM_ALGORITHM_MD4",SWIG_From_int((int)(IDMEF_CHECKSUM_ALGORITHM_MD4))); SWIG_Python_SetConstant(d, "IDMEF_CHECKSUM_ALGORITHM_MD5",SWIG_From_int((int)(IDMEF_CHECKSUM_ALGORITHM_MD5))); SWIG_Python_SetConstant(d, "IDMEF_CHECKSUM_ALGORITHM_SHA1",SWIG_From_int((int)(IDMEF_CHECKSUM_ALGORITHM_SHA1))); SWIG_Python_SetConstant(d, "IDMEF_CHECKSUM_ALGORITHM_SHA2_256",SWIG_From_int((int)(IDMEF_CHECKSUM_ALGORITHM_SHA2_256))); SWIG_Python_SetConstant(d, "IDMEF_CHECKSUM_ALGORITHM_SHA2_384",SWIG_From_int((int)(IDMEF_CHECKSUM_ALGORITHM_SHA2_384))); SWIG_Python_SetConstant(d, "IDMEF_CHECKSUM_ALGORITHM_SHA2_512",SWIG_From_int((int)(IDMEF_CHECKSUM_ALGORITHM_SHA2_512))); SWIG_Python_SetConstant(d, "IDMEF_CHECKSUM_ALGORITHM_CRC_32",SWIG_From_int((int)(IDMEF_CHECKSUM_ALGORITHM_CRC_32))); SWIG_Python_SetConstant(d, "IDMEF_CHECKSUM_ALGORITHM_HAVAL",SWIG_From_int((int)(IDMEF_CHECKSUM_ALGORITHM_HAVAL))); SWIG_Python_SetConstant(d, "IDMEF_CHECKSUM_ALGORITHM_TIGER",SWIG_From_int((int)(IDMEF_CHECKSUM_ALGORITHM_TIGER))); SWIG_Python_SetConstant(d, "IDMEF_CHECKSUM_ALGORITHM_GOST",SWIG_From_int((int)(IDMEF_CHECKSUM_ALGORITHM_GOST))); SWIG_Python_SetConstant(d, "IDMEF_FILE_CATEGORY_ERROR",SWIG_From_int((int)(IDMEF_FILE_CATEGORY_ERROR))); SWIG_Python_SetConstant(d, "IDMEF_FILE_CATEGORY_CURRENT",SWIG_From_int((int)(IDMEF_FILE_CATEGORY_CURRENT))); SWIG_Python_SetConstant(d, "IDMEF_FILE_CATEGORY_ORIGINAL",SWIG_From_int((int)(IDMEF_FILE_CATEGORY_ORIGINAL))); SWIG_Python_SetConstant(d, "IDMEF_FILE_FSTYPE_ERROR",SWIG_From_int((int)(IDMEF_FILE_FSTYPE_ERROR))); SWIG_Python_SetConstant(d, "IDMEF_FILE_FSTYPE_UFS",SWIG_From_int((int)(IDMEF_FILE_FSTYPE_UFS))); SWIG_Python_SetConstant(d, "IDMEF_FILE_FSTYPE_EFS",SWIG_From_int((int)(IDMEF_FILE_FSTYPE_EFS))); SWIG_Python_SetConstant(d, "IDMEF_FILE_FSTYPE_NFS",SWIG_From_int((int)(IDMEF_FILE_FSTYPE_NFS))); SWIG_Python_SetConstant(d, "IDMEF_FILE_FSTYPE_AFS",SWIG_From_int((int)(IDMEF_FILE_FSTYPE_AFS))); SWIG_Python_SetConstant(d, "IDMEF_FILE_FSTYPE_NTFS",SWIG_From_int((int)(IDMEF_FILE_FSTYPE_NTFS))); SWIG_Python_SetConstant(d, "IDMEF_FILE_FSTYPE_FAT16",SWIG_From_int((int)(IDMEF_FILE_FSTYPE_FAT16))); SWIG_Python_SetConstant(d, "IDMEF_FILE_FSTYPE_FAT32",SWIG_From_int((int)(IDMEF_FILE_FSTYPE_FAT32))); SWIG_Python_SetConstant(d, "IDMEF_FILE_FSTYPE_PCFS",SWIG_From_int((int)(IDMEF_FILE_FSTYPE_PCFS))); SWIG_Python_SetConstant(d, "IDMEF_FILE_FSTYPE_JOLIET",SWIG_From_int((int)(IDMEF_FILE_FSTYPE_JOLIET))); SWIG_Python_SetConstant(d, "IDMEF_FILE_FSTYPE_ISO9660",SWIG_From_int((int)(IDMEF_FILE_FSTYPE_ISO9660))); SWIG_Python_SetConstant(d, "IDMEF_LINKAGE_CATEGORY_ERROR",SWIG_From_int((int)(IDMEF_LINKAGE_CATEGORY_ERROR))); SWIG_Python_SetConstant(d, "IDMEF_LINKAGE_CATEGORY_HARD_LINK",SWIG_From_int((int)(IDMEF_LINKAGE_CATEGORY_HARD_LINK))); SWIG_Python_SetConstant(d, "IDMEF_LINKAGE_CATEGORY_MOUNT_POINT",SWIG_From_int((int)(IDMEF_LINKAGE_CATEGORY_MOUNT_POINT))); SWIG_Python_SetConstant(d, "IDMEF_LINKAGE_CATEGORY_REPARSE_POINT",SWIG_From_int((int)(IDMEF_LINKAGE_CATEGORY_REPARSE_POINT))); SWIG_Python_SetConstant(d, "IDMEF_LINKAGE_CATEGORY_SHORTCUT",SWIG_From_int((int)(IDMEF_LINKAGE_CATEGORY_SHORTCUT))); SWIG_Python_SetConstant(d, "IDMEF_LINKAGE_CATEGORY_STREAM",SWIG_From_int((int)(IDMEF_LINKAGE_CATEGORY_STREAM))); SWIG_Python_SetConstant(d, "IDMEF_LINKAGE_CATEGORY_SYMBOLIC_LINK",SWIG_From_int((int)(IDMEF_LINKAGE_CATEGORY_SYMBOLIC_LINK))); SWIG_Python_SetConstant(d, "IDMEF_TARGET_DECOY_ERROR",SWIG_From_int((int)(IDMEF_TARGET_DECOY_ERROR))); SWIG_Python_SetConstant(d, "IDMEF_TARGET_DECOY_UNKNOWN",SWIG_From_int((int)(IDMEF_TARGET_DECOY_UNKNOWN))); SWIG_Python_SetConstant(d, "IDMEF_TARGET_DECOY_YES",SWIG_From_int((int)(IDMEF_TARGET_DECOY_YES))); SWIG_Python_SetConstant(d, "IDMEF_TARGET_DECOY_NO",SWIG_From_int((int)(IDMEF_TARGET_DECOY_NO))); SWIG_Python_SetConstant(d, "IDMEF_IMPACT_SEVERITY_ERROR",SWIG_From_int((int)(IDMEF_IMPACT_SEVERITY_ERROR))); SWIG_Python_SetConstant(d, "IDMEF_IMPACT_SEVERITY_INFO",SWIG_From_int((int)(IDMEF_IMPACT_SEVERITY_INFO))); SWIG_Python_SetConstant(d, "IDMEF_IMPACT_SEVERITY_LOW",SWIG_From_int((int)(IDMEF_IMPACT_SEVERITY_LOW))); SWIG_Python_SetConstant(d, "IDMEF_IMPACT_SEVERITY_MEDIUM",SWIG_From_int((int)(IDMEF_IMPACT_SEVERITY_MEDIUM))); SWIG_Python_SetConstant(d, "IDMEF_IMPACT_SEVERITY_HIGH",SWIG_From_int((int)(IDMEF_IMPACT_SEVERITY_HIGH))); SWIG_Python_SetConstant(d, "IDMEF_IMPACT_COMPLETION_ERROR",SWIG_From_int((int)(IDMEF_IMPACT_COMPLETION_ERROR))); SWIG_Python_SetConstant(d, "IDMEF_IMPACT_COMPLETION_FAILED",SWIG_From_int((int)(IDMEF_IMPACT_COMPLETION_FAILED))); SWIG_Python_SetConstant(d, "IDMEF_IMPACT_COMPLETION_SUCCEEDED",SWIG_From_int((int)(IDMEF_IMPACT_COMPLETION_SUCCEEDED))); SWIG_Python_SetConstant(d, "IDMEF_IMPACT_TYPE_ERROR",SWIG_From_int((int)(IDMEF_IMPACT_TYPE_ERROR))); SWIG_Python_SetConstant(d, "IDMEF_IMPACT_TYPE_OTHER",SWIG_From_int((int)(IDMEF_IMPACT_TYPE_OTHER))); SWIG_Python_SetConstant(d, "IDMEF_IMPACT_TYPE_ADMIN",SWIG_From_int((int)(IDMEF_IMPACT_TYPE_ADMIN))); SWIG_Python_SetConstant(d, "IDMEF_IMPACT_TYPE_DOS",SWIG_From_int((int)(IDMEF_IMPACT_TYPE_DOS))); SWIG_Python_SetConstant(d, "IDMEF_IMPACT_TYPE_FILE",SWIG_From_int((int)(IDMEF_IMPACT_TYPE_FILE))); SWIG_Python_SetConstant(d, "IDMEF_IMPACT_TYPE_RECON",SWIG_From_int((int)(IDMEF_IMPACT_TYPE_RECON))); SWIG_Python_SetConstant(d, "IDMEF_IMPACT_TYPE_USER",SWIG_From_int((int)(IDMEF_IMPACT_TYPE_USER))); SWIG_Python_SetConstant(d, "IDMEF_ACTION_CATEGORY_ERROR",SWIG_From_int((int)(IDMEF_ACTION_CATEGORY_ERROR))); SWIG_Python_SetConstant(d, "IDMEF_ACTION_CATEGORY_OTHER",SWIG_From_int((int)(IDMEF_ACTION_CATEGORY_OTHER))); SWIG_Python_SetConstant(d, "IDMEF_ACTION_CATEGORY_BLOCK_INSTALLED",SWIG_From_int((int)(IDMEF_ACTION_CATEGORY_BLOCK_INSTALLED))); SWIG_Python_SetConstant(d, "IDMEF_ACTION_CATEGORY_NOTIFICATION_SENT",SWIG_From_int((int)(IDMEF_ACTION_CATEGORY_NOTIFICATION_SENT))); SWIG_Python_SetConstant(d, "IDMEF_ACTION_CATEGORY_TAKEN_OFFLINE",SWIG_From_int((int)(IDMEF_ACTION_CATEGORY_TAKEN_OFFLINE))); SWIG_Python_SetConstant(d, "IDMEF_CONFIDENCE_RATING_ERROR",SWIG_From_int((int)(IDMEF_CONFIDENCE_RATING_ERROR))); SWIG_Python_SetConstant(d, "IDMEF_CONFIDENCE_RATING_NUMERIC",SWIG_From_int((int)(IDMEF_CONFIDENCE_RATING_NUMERIC))); SWIG_Python_SetConstant(d, "IDMEF_CONFIDENCE_RATING_LOW",SWIG_From_int((int)(IDMEF_CONFIDENCE_RATING_LOW))); SWIG_Python_SetConstant(d, "IDMEF_CONFIDENCE_RATING_MEDIUM",SWIG_From_int((int)(IDMEF_CONFIDENCE_RATING_MEDIUM))); SWIG_Python_SetConstant(d, "IDMEF_CONFIDENCE_RATING_HIGH",SWIG_From_int((int)(IDMEF_CONFIDENCE_RATING_HIGH))); SWIG_Python_SetConstant(d, "IDMEF_ALERT_TYPE_ERROR",SWIG_From_int((int)(IDMEF_ALERT_TYPE_ERROR))); SWIG_Python_SetConstant(d, "IDMEF_ALERT_TYPE_DEFAULT",SWIG_From_int((int)(IDMEF_ALERT_TYPE_DEFAULT))); SWIG_Python_SetConstant(d, "IDMEF_ALERT_TYPE_TOOL",SWIG_From_int((int)(IDMEF_ALERT_TYPE_TOOL))); SWIG_Python_SetConstant(d, "IDMEF_ALERT_TYPE_CORRELATION",SWIG_From_int((int)(IDMEF_ALERT_TYPE_CORRELATION))); SWIG_Python_SetConstant(d, "IDMEF_ALERT_TYPE_OVERFLOW",SWIG_From_int((int)(IDMEF_ALERT_TYPE_OVERFLOW))); SWIG_Python_SetConstant(d, "IDMEF_MESSAGE_TYPE_ERROR",SWIG_From_int((int)(IDMEF_MESSAGE_TYPE_ERROR))); SWIG_Python_SetConstant(d, "IDMEF_MESSAGE_TYPE_ALERT",SWIG_From_int((int)(IDMEF_MESSAGE_TYPE_ALERT))); SWIG_Python_SetConstant(d, "IDMEF_MESSAGE_TYPE_HEARTBEAT",SWIG_From_int((int)(IDMEF_MESSAGE_TYPE_HEARTBEAT))); SWIG_Python_SetConstant(d, "IDMEF_CLASS_ID_ADDITIONAL_DATA_TYPE",SWIG_From_int((int)(3))); SWIG_Python_SetConstant(d, "IDMEF_CLASS_ID_ADDITIONAL_DATA",SWIG_From_int((int)(4))); SWIG_Python_SetConstant(d, "IDMEF_CLASS_ID_REFERENCE_ORIGIN",SWIG_From_int((int)(5))); SWIG_Python_SetConstant(d, "IDMEF_CLASS_ID_REFERENCE",SWIG_From_int((int)(50))); SWIG_Python_SetConstant(d, "IDMEF_CLASS_ID_CLASSIFICATION",SWIG_From_int((int)(6))); SWIG_Python_SetConstant(d, "IDMEF_CLASS_ID_USER_ID_TYPE",SWIG_From_int((int)(7))); SWIG_Python_SetConstant(d, "IDMEF_CLASS_ID_USER_ID",SWIG_From_int((int)(8))); SWIG_Python_SetConstant(d, "IDMEF_CLASS_ID_USER_CATEGORY",SWIG_From_int((int)(9))); SWIG_Python_SetConstant(d, "IDMEF_CLASS_ID_USER",SWIG_From_int((int)(10))); SWIG_Python_SetConstant(d, "IDMEF_CLASS_ID_ADDRESS_CATEGORY",SWIG_From_int((int)(11))); SWIG_Python_SetConstant(d, "IDMEF_CLASS_ID_ADDRESS",SWIG_From_int((int)(12))); SWIG_Python_SetConstant(d, "IDMEF_CLASS_ID_PROCESS",SWIG_From_int((int)(13))); SWIG_Python_SetConstant(d, "IDMEF_CLASS_ID_WEB_SERVICE",SWIG_From_int((int)(14))); SWIG_Python_SetConstant(d, "IDMEF_CLASS_ID_SNMP_SERVICE",SWIG_From_int((int)(15))); SWIG_Python_SetConstant(d, "IDMEF_CLASS_ID_SERVICE_TYPE",SWIG_From_int((int)(16))); SWIG_Python_SetConstant(d, "IDMEF_CLASS_ID_SERVICE",SWIG_From_int((int)(17))); SWIG_Python_SetConstant(d, "IDMEF_CLASS_ID_NODE_CATEGORY",SWIG_From_int((int)(18))); SWIG_Python_SetConstant(d, "IDMEF_CLASS_ID_NODE",SWIG_From_int((int)(19))); SWIG_Python_SetConstant(d, "IDMEF_CLASS_ID_SOURCE_SPOOFED",SWIG_From_int((int)(20))); SWIG_Python_SetConstant(d, "IDMEF_CLASS_ID_SOURCE",SWIG_From_int((int)(21))); SWIG_Python_SetConstant(d, "IDMEF_CLASS_ID_FILE_ACCESS",SWIG_From_int((int)(22))); SWIG_Python_SetConstant(d, "IDMEF_CLASS_ID_INODE",SWIG_From_int((int)(23))); SWIG_Python_SetConstant(d, "IDMEF_CLASS_ID_CHECKSUM_ALGORITHM",SWIG_From_int((int)(53))); SWIG_Python_SetConstant(d, "IDMEF_CLASS_ID_CHECKSUM",SWIG_From_int((int)(52))); SWIG_Python_SetConstant(d, "IDMEF_CLASS_ID_FILE_CATEGORY",SWIG_From_int((int)(24))); SWIG_Python_SetConstant(d, "IDMEF_CLASS_ID_FILE_FSTYPE",SWIG_From_int((int)(25))); SWIG_Python_SetConstant(d, "IDMEF_CLASS_ID_FILE",SWIG_From_int((int)(26))); SWIG_Python_SetConstant(d, "IDMEF_CLASS_ID_LINKAGE_CATEGORY",SWIG_From_int((int)(27))); SWIG_Python_SetConstant(d, "IDMEF_CLASS_ID_LINKAGE",SWIG_From_int((int)(28))); SWIG_Python_SetConstant(d, "IDMEF_CLASS_ID_TARGET_DECOY",SWIG_From_int((int)(29))); SWIG_Python_SetConstant(d, "IDMEF_CLASS_ID_TARGET",SWIG_From_int((int)(30))); SWIG_Python_SetConstant(d, "IDMEF_CLASS_ID_ANALYZER",SWIG_From_int((int)(31))); SWIG_Python_SetConstant(d, "IDMEF_CLASS_ID_ALERTIDENT",SWIG_From_int((int)(32))); SWIG_Python_SetConstant(d, "IDMEF_CLASS_ID_IMPACT_SEVERITY",SWIG_From_int((int)(33))); SWIG_Python_SetConstant(d, "IDMEF_CLASS_ID_IMPACT_COMPLETION",SWIG_From_int((int)(34))); SWIG_Python_SetConstant(d, "IDMEF_CLASS_ID_IMPACT_TYPE",SWIG_From_int((int)(35))); SWIG_Python_SetConstant(d, "IDMEF_CLASS_ID_IMPACT",SWIG_From_int((int)(36))); SWIG_Python_SetConstant(d, "IDMEF_CLASS_ID_ACTION_CATEGORY",SWIG_From_int((int)(37))); SWIG_Python_SetConstant(d, "IDMEF_CLASS_ID_ACTION",SWIG_From_int((int)(38))); SWIG_Python_SetConstant(d, "IDMEF_CLASS_ID_CONFIDENCE_RATING",SWIG_From_int((int)(39))); SWIG_Python_SetConstant(d, "IDMEF_CLASS_ID_CONFIDENCE",SWIG_From_int((int)(40))); SWIG_Python_SetConstant(d, "IDMEF_CLASS_ID_ASSESSMENT",SWIG_From_int((int)(41))); SWIG_Python_SetConstant(d, "IDMEF_CLASS_ID_TOOL_ALERT",SWIG_From_int((int)(42))); SWIG_Python_SetConstant(d, "IDMEF_CLASS_ID_CORRELATION_ALERT",SWIG_From_int((int)(43))); SWIG_Python_SetConstant(d, "IDMEF_CLASS_ID_OVERFLOW_ALERT",SWIG_From_int((int)(44))); SWIG_Python_SetConstant(d, "IDMEF_CLASS_ID_ALERT_TYPE",SWIG_From_int((int)(45))); SWIG_Python_SetConstant(d, "IDMEF_CLASS_ID_ALERT",SWIG_From_int((int)(46))); SWIG_Python_SetConstant(d, "IDMEF_CLASS_ID_HEARTBEAT",SWIG_From_int((int)(47))); SWIG_Python_SetConstant(d, "IDMEF_CLASS_ID_MESSAGE_TYPE",SWIG_From_int((int)(48))); SWIG_Python_SetConstant(d, "IDMEF_CLASS_ID_MESSAGE",SWIG_From_int((int)(49))); SWIG_Python_SetConstant(d, "IDMEF_DATA_TYPE_UNKNOWN",SWIG_From_int((int)(IDMEF_DATA_TYPE_UNKNOWN))); SWIG_Python_SetConstant(d, "IDMEF_DATA_TYPE_CHAR",SWIG_From_int((int)(IDMEF_DATA_TYPE_CHAR))); SWIG_Python_SetConstant(d, "IDMEF_DATA_TYPE_BYTE",SWIG_From_int((int)(IDMEF_DATA_TYPE_BYTE))); SWIG_Python_SetConstant(d, "IDMEF_DATA_TYPE_UINT32",SWIG_From_int((int)(IDMEF_DATA_TYPE_UINT32))); SWIG_Python_SetConstant(d, "IDMEF_DATA_TYPE_UINT64",SWIG_From_int((int)(IDMEF_DATA_TYPE_UINT64))); SWIG_Python_SetConstant(d, "IDMEF_DATA_TYPE_FLOAT",SWIG_From_int((int)(IDMEF_DATA_TYPE_FLOAT))); SWIG_Python_SetConstant(d, "IDMEF_DATA_TYPE_CHAR_STRING",SWIG_From_int((int)(IDMEF_DATA_TYPE_CHAR_STRING))); SWIG_Python_SetConstant(d, "IDMEF_DATA_TYPE_BYTE_STRING",SWIG_From_int((int)(IDMEF_DATA_TYPE_BYTE_STRING))); SWIG_Python_SetConstant(d, "IDMEF_CRITERION_OPERATOR_NOT",SWIG_From_int((int)(IDMEF_CRITERION_OPERATOR_NOT))); SWIG_Python_SetConstant(d, "IDMEF_CRITERION_OPERATOR_NOCASE",SWIG_From_int((int)(IDMEF_CRITERION_OPERATOR_NOCASE))); SWIG_Python_SetConstant(d, "IDMEF_CRITERION_OPERATOR_EQUAL",SWIG_From_int((int)(IDMEF_CRITERION_OPERATOR_EQUAL))); SWIG_Python_SetConstant(d, "IDMEF_CRITERION_OPERATOR_EQUAL_NOCASE",SWIG_From_int((int)(IDMEF_CRITERION_OPERATOR_EQUAL_NOCASE))); SWIG_Python_SetConstant(d, "IDMEF_CRITERION_OPERATOR_NOT_EQUAL",SWIG_From_int((int)(IDMEF_CRITERION_OPERATOR_NOT_EQUAL))); SWIG_Python_SetConstant(d, "IDMEF_CRITERION_OPERATOR_NOT_EQUAL_NOCASE",SWIG_From_int((int)(IDMEF_CRITERION_OPERATOR_NOT_EQUAL_NOCASE))); SWIG_Python_SetConstant(d, "IDMEF_CRITERION_OPERATOR_LESSER",SWIG_From_int((int)(IDMEF_CRITERION_OPERATOR_LESSER))); SWIG_Python_SetConstant(d, "IDMEF_CRITERION_OPERATOR_LESSER_OR_EQUAL",SWIG_From_int((int)(IDMEF_CRITERION_OPERATOR_LESSER_OR_EQUAL))); SWIG_Python_SetConstant(d, "IDMEF_CRITERION_OPERATOR_GREATER",SWIG_From_int((int)(IDMEF_CRITERION_OPERATOR_GREATER))); SWIG_Python_SetConstant(d, "IDMEF_CRITERION_OPERATOR_GREATER_OR_EQUAL",SWIG_From_int((int)(IDMEF_CRITERION_OPERATOR_GREATER_OR_EQUAL))); SWIG_Python_SetConstant(d, "IDMEF_CRITERION_OPERATOR_SUBSTR",SWIG_From_int((int)(IDMEF_CRITERION_OPERATOR_SUBSTR))); SWIG_Python_SetConstant(d, "IDMEF_CRITERION_OPERATOR_SUBSTR_NOCASE",SWIG_From_int((int)(IDMEF_CRITERION_OPERATOR_SUBSTR_NOCASE))); SWIG_Python_SetConstant(d, "IDMEF_CRITERION_OPERATOR_NOT_SUBSTR",SWIG_From_int((int)(IDMEF_CRITERION_OPERATOR_NOT_SUBSTR))); SWIG_Python_SetConstant(d, "IDMEF_CRITERION_OPERATOR_NOT_SUBSTR_NOCASE",SWIG_From_int((int)(IDMEF_CRITERION_OPERATOR_NOT_SUBSTR_NOCASE))); SWIG_Python_SetConstant(d, "IDMEF_CRITERION_OPERATOR_REGEX",SWIG_From_int((int)(IDMEF_CRITERION_OPERATOR_REGEX))); SWIG_Python_SetConstant(d, "IDMEF_CRITERION_OPERATOR_REGEX_NOCASE",SWIG_From_int((int)(IDMEF_CRITERION_OPERATOR_REGEX_NOCASE))); SWIG_Python_SetConstant(d, "IDMEF_CRITERION_OPERATOR_NOT_REGEX",SWIG_From_int((int)(IDMEF_CRITERION_OPERATOR_NOT_REGEX))); SWIG_Python_SetConstant(d, "IDMEF_CRITERION_OPERATOR_NOT_REGEX_NOCASE",SWIG_From_int((int)(IDMEF_CRITERION_OPERATOR_NOT_REGEX_NOCASE))); SWIG_Python_SetConstant(d, "IDMEF_CRITERION_OPERATOR_NULL",SWIG_From_int((int)(IDMEF_CRITERION_OPERATOR_NULL))); SWIG_Python_SetConstant(d, "IDMEF_CRITERION_OPERATOR_NOT_NULL",SWIG_From_int((int)(IDMEF_CRITERION_OPERATOR_NOT_NULL))); SWIG_Python_SetConstant(d, "IDMEF_VALUE_TYPE_ERROR",SWIG_From_int((int)(IDMEF_VALUE_TYPE_ERROR))); SWIG_Python_SetConstant(d, "IDMEF_VALUE_TYPE_UNKNOWN",SWIG_From_int((int)(IDMEF_VALUE_TYPE_UNKNOWN))); SWIG_Python_SetConstant(d, "IDMEF_VALUE_TYPE_INT8",SWIG_From_int((int)(IDMEF_VALUE_TYPE_INT8))); SWIG_Python_SetConstant(d, "IDMEF_VALUE_TYPE_UINT8",SWIG_From_int((int)(IDMEF_VALUE_TYPE_UINT8))); SWIG_Python_SetConstant(d, "IDMEF_VALUE_TYPE_INT16",SWIG_From_int((int)(IDMEF_VALUE_TYPE_INT16))); SWIG_Python_SetConstant(d, "IDMEF_VALUE_TYPE_UINT16",SWIG_From_int((int)(IDMEF_VALUE_TYPE_UINT16))); SWIG_Python_SetConstant(d, "IDMEF_VALUE_TYPE_INT32",SWIG_From_int((int)(IDMEF_VALUE_TYPE_INT32))); SWIG_Python_SetConstant(d, "IDMEF_VALUE_TYPE_UINT32",SWIG_From_int((int)(IDMEF_VALUE_TYPE_UINT32))); SWIG_Python_SetConstant(d, "IDMEF_VALUE_TYPE_INT64",SWIG_From_int((int)(IDMEF_VALUE_TYPE_INT64))); SWIG_Python_SetConstant(d, "IDMEF_VALUE_TYPE_UINT64",SWIG_From_int((int)(IDMEF_VALUE_TYPE_UINT64))); SWIG_Python_SetConstant(d, "IDMEF_VALUE_TYPE_FLOAT",SWIG_From_int((int)(IDMEF_VALUE_TYPE_FLOAT))); SWIG_Python_SetConstant(d, "IDMEF_VALUE_TYPE_DOUBLE",SWIG_From_int((int)(IDMEF_VALUE_TYPE_DOUBLE))); SWIG_Python_SetConstant(d, "IDMEF_VALUE_TYPE_STRING",SWIG_From_int((int)(IDMEF_VALUE_TYPE_STRING))); SWIG_Python_SetConstant(d, "IDMEF_VALUE_TYPE_TIME",SWIG_From_int((int)(IDMEF_VALUE_TYPE_TIME))); SWIG_Python_SetConstant(d, "IDMEF_VALUE_TYPE_DATA",SWIG_From_int((int)(IDMEF_VALUE_TYPE_DATA))); SWIG_Python_SetConstant(d, "IDMEF_VALUE_TYPE_ENUM",SWIG_From_int((int)(IDMEF_VALUE_TYPE_ENUM))); SWIG_Python_SetConstant(d, "IDMEF_VALUE_TYPE_LIST",SWIG_From_int((int)(IDMEF_VALUE_TYPE_LIST))); SWIG_Python_SetConstant(d, "IDMEF_VALUE_TYPE_CLASS",SWIG_From_int((int)(IDMEF_VALUE_TYPE_CLASS))); SWIG_Python_SetConstant(d, "PRELUDE_CONNECTION_PERMISSION_IDMEF_READ",SWIG_From_int((int)(PRELUDE_CONNECTION_PERMISSION_IDMEF_READ))); SWIG_Python_SetConstant(d, "PRELUDE_CONNECTION_PERMISSION_ADMIN_READ",SWIG_From_int((int)(PRELUDE_CONNECTION_PERMISSION_ADMIN_READ))); SWIG_Python_SetConstant(d, "PRELUDE_CONNECTION_PERMISSION_IDMEF_WRITE",SWIG_From_int((int)(PRELUDE_CONNECTION_PERMISSION_IDMEF_WRITE))); SWIG_Python_SetConstant(d, "PRELUDE_CONNECTION_PERMISSION_ADMIN_WRITE",SWIG_From_int((int)(PRELUDE_CONNECTION_PERMISSION_ADMIN_WRITE))); SWIG_Python_SetConstant(d, "PRELUDE_CONNECTION_STATE_ESTABLISHED",SWIG_From_int((int)(PRELUDE_CONNECTION_STATE_ESTABLISHED))); SWIG_Python_SetConstant(d, "PRELUDE_CONNECTION_POOL_FLAGS_RECONNECT",SWIG_From_int((int)(PRELUDE_CONNECTION_POOL_FLAGS_RECONNECT))); SWIG_Python_SetConstant(d, "PRELUDE_CONNECTION_POOL_FLAGS_FAILOVER",SWIG_From_int((int)(PRELUDE_CONNECTION_POOL_FLAGS_FAILOVER))); SWIG_Python_SetConstant(d, "PRELUDE_CONNECTION_POOL_EVENT_INPUT",SWIG_From_int((int)(PRELUDE_CONNECTION_POOL_EVENT_INPUT))); SWIG_Python_SetConstant(d, "PRELUDE_CONNECTION_POOL_EVENT_DEAD",SWIG_From_int((int)(PRELUDE_CONNECTION_POOL_EVENT_DEAD))); SWIG_Python_SetConstant(d, "PRELUDE_CONNECTION_POOL_EVENT_ALIVE",SWIG_From_int((int)(PRELUDE_CONNECTION_POOL_EVENT_ALIVE))); SWIG_Python_SetConstant(d, "PRELUDE_OPTION_TYPE_CLI",SWIG_From_int((int)(PRELUDE_OPTION_TYPE_CLI))); SWIG_Python_SetConstant(d, "PRELUDE_OPTION_TYPE_CFG",SWIG_From_int((int)(PRELUDE_OPTION_TYPE_CFG))); SWIG_Python_SetConstant(d, "PRELUDE_OPTION_TYPE_WIDE",SWIG_From_int((int)(PRELUDE_OPTION_TYPE_WIDE))); SWIG_Python_SetConstant(d, "PRELUDE_OPTION_TYPE_CONTEXT",SWIG_From_int((int)(PRELUDE_OPTION_TYPE_CONTEXT))); SWIG_Python_SetConstant(d, "PRELUDE_OPTION_TYPE_ROOT",SWIG_From_int((int)(PRELUDE_OPTION_TYPE_ROOT))); SWIG_Python_SetConstant(d, "PRELUDE_OPTION_TYPE_DESTROY",SWIG_From_int((int)(PRELUDE_OPTION_TYPE_DESTROY))); SWIG_Python_SetConstant(d, "PRELUDE_OPTION_INPUT_TYPE_STRING",SWIG_From_int((int)(PRELUDE_OPTION_INPUT_TYPE_STRING))); SWIG_Python_SetConstant(d, "PRELUDE_OPTION_INPUT_TYPE_INTEGER",SWIG_From_int((int)(PRELUDE_OPTION_INPUT_TYPE_INTEGER))); SWIG_Python_SetConstant(d, "PRELUDE_OPTION_INPUT_TYPE_BOOLEAN",SWIG_From_int((int)(PRELUDE_OPTION_INPUT_TYPE_BOOLEAN))); SWIG_Python_SetConstant(d, "PRELUDE_OPTION_ARGUMENT_REQUIRED",SWIG_From_int((int)(PRELUDE_OPTION_ARGUMENT_REQUIRED))); SWIG_Python_SetConstant(d, "PRELUDE_OPTION_ARGUMENT_OPTIONAL",SWIG_From_int((int)(PRELUDE_OPTION_ARGUMENT_OPTIONAL))); SWIG_Python_SetConstant(d, "PRELUDE_OPTION_ARGUMENT_NONE",SWIG_From_int((int)(PRELUDE_OPTION_ARGUMENT_NONE))); SWIG_Python_SetConstant(d, "PRELUDE_OPTION_PRIORITY_IMMEDIATE",SWIG_From_int((int)(PRELUDE_OPTION_PRIORITY_IMMEDIATE))); SWIG_Python_SetConstant(d, "PRELUDE_OPTION_PRIORITY_FIRST",SWIG_From_int((int)(PRELUDE_OPTION_PRIORITY_FIRST))); SWIG_Python_SetConstant(d, "PRELUDE_OPTION_PRIORITY_NONE",SWIG_From_int((int)(PRELUDE_OPTION_PRIORITY_NONE))); SWIG_Python_SetConstant(d, "PRELUDE_OPTION_PRIORITY_LAST",SWIG_From_int((int)(PRELUDE_OPTION_PRIORITY_LAST))); SWIG_Python_SetConstant(d, "PRELUDE_OPTION_WARNING_OPTION",SWIG_From_int((int)(PRELUDE_OPTION_WARNING_OPTION))); SWIG_Python_SetConstant(d, "PRELUDE_OPTION_WARNING_ARG",SWIG_From_int((int)(PRELUDE_OPTION_WARNING_ARG))); SWIG_Python_SetConstant(d, "PRELUDE_OPTION_REPLY_TYPE_SET",SWIG_From_int((int)(0x01))); SWIG_Python_SetConstant(d, "PRELUDE_OPTION_REPLY_TYPE_GET",SWIG_From_int((int)(0x02))); SWIG_Python_SetConstant(d, "PRELUDE_OPTION_REPLY_TYPE_LIST",SWIG_From_int((int)(0x04))); SWIG_Python_SetConstant(d, "PRELUDE_OPTION_REPLY_TYPE_ERROR",SWIG_From_int((int)(0x08))); SWIG_Python_SetConstant(d, "PRELUDE_MSG_PRIORITY_NONE",SWIG_From_int((int)(PRELUDE_MSG_PRIORITY_NONE))); SWIG_Python_SetConstant(d, "PRELUDE_MSG_PRIORITY_LOW",SWIG_From_int((int)(PRELUDE_MSG_PRIORITY_LOW))); SWIG_Python_SetConstant(d, "PRELUDE_MSG_PRIORITY_MID",SWIG_From_int((int)(PRELUDE_MSG_PRIORITY_MID))); SWIG_Python_SetConstant(d, "PRELUDE_MSG_PRIORITY_HIGH",SWIG_From_int((int)(PRELUDE_MSG_PRIORITY_HIGH))); SWIG_Python_SetConstant(d, "PRELUDE_MSG_IDMEF",SWIG_From_int((int)(0))); SWIG_Python_SetConstant(d, "PRELUDE_MSG_ID",SWIG_From_int((int)(3))); SWIG_Python_SetConstant(d, "PRELUDE_MSG_AUTH",SWIG_From_int((int)(4))); SWIG_Python_SetConstant(d, "PRELUDE_MSG_CM",SWIG_From_int((int)(5))); SWIG_Python_SetConstant(d, "PRELUDE_MSG_CONNECTION_CAPABILITY",SWIG_From_int((int)(6))); SWIG_Python_SetConstant(d, "PRELUDE_MSG_OPTION_REQUEST",SWIG_From_int((int)(7))); SWIG_Python_SetConstant(d, "PRELUDE_MSG_OPTION_REPLY",SWIG_From_int((int)(8))); SWIG_Python_SetConstant(d, "PRELUDE_MSG_ID_DECLARE",SWIG_From_int((int)(0))); SWIG_Python_SetConstant(d, "PRELUDE_MSG_AUTH_SUCCEED",SWIG_From_int((int)(6))); SWIG_Python_SetConstant(d, "PRELUDE_MSG_AUTH_FAILED",SWIG_From_int((int)(7))); SWIG_Python_SetConstant(d, "PRELUDE_MSG_CM_FIREWALL",SWIG_From_int((int)(0))); SWIG_Python_SetConstant(d, "PRELUDE_MSG_CM_THROTTLE",SWIG_From_int((int)(1))); SWIG_Python_SetConstant(d, "PRELUDE_MSG_CM_ISLAND",SWIG_From_int((int)(2))); SWIG_Python_SetConstant(d, "PRELUDE_MSG_CM_FEATURE",SWIG_From_int((int)(3))); SWIG_Python_SetConstant(d, "PRELUDE_MSG_OPTION_TARGET_ID",SWIG_From_int((int)(0))); SWIG_Python_SetConstant(d, "PRELUDE_MSG_OPTION_LIST",SWIG_From_int((int)(2))); SWIG_Python_SetConstant(d, "PRELUDE_MSG_OPTION_VALUE",SWIG_From_int((int)(3))); SWIG_Python_SetConstant(d, "PRELUDE_MSG_OPTION_SET",SWIG_From_int((int)(4))); SWIG_Python_SetConstant(d, "PRELUDE_MSG_OPTION_GET",SWIG_From_int((int)(5))); SWIG_Python_SetConstant(d, "PRELUDE_MSG_OPTION_REQUEST_ID",SWIG_From_int((int)(6))); SWIG_Python_SetConstant(d, "PRELUDE_MSG_OPTION_ERROR",SWIG_From_int((int)(7))); SWIG_Python_SetConstant(d, "PRELUDE_MSG_OPTION_START",SWIG_From_int((int)(8))); SWIG_Python_SetConstant(d, "PRELUDE_MSG_OPTION_END",SWIG_From_int((int)(9))); SWIG_Python_SetConstant(d, "PRELUDE_MSG_OPTION_NAME",SWIG_From_int((int)(10))); SWIG_Python_SetConstant(d, "PRELUDE_MSG_OPTION_DESC",SWIG_From_int((int)(11))); SWIG_Python_SetConstant(d, "PRELUDE_MSG_OPTION_HAS_ARG",SWIG_From_int((int)(12))); SWIG_Python_SetConstant(d, "PRELUDE_MSG_OPTION_HELP",SWIG_From_int((int)(13))); SWIG_Python_SetConstant(d, "PRELUDE_MSG_OPTION_INPUT_VALIDATION",SWIG_From_int((int)(14))); SWIG_Python_SetConstant(d, "PRELUDE_MSG_OPTION_INPUT_TYPE",SWIG_From_int((int)(15))); SWIG_Python_SetConstant(d, "PRELUDE_MSG_OPTION_ARG",SWIG_From_int((int)(16))); SWIG_Python_SetConstant(d, "PRELUDE_MSG_OPTION_TYPE",SWIG_From_int((int)(17))); SWIG_Python_SetConstant(d, "PRELUDE_MSG_OPTION_DESTROY",SWIG_From_int((int)(18))); SWIG_Python_SetConstant(d, "PRELUDE_MSG_OPTION_COMMIT",SWIG_From_int((int)(19))); SWIG_Python_SetConstant(d, "PRELUDE_MSG_OPTION_HOP",SWIG_From_int((int)(20))); SWIG_Python_SetConstant(d, "PRELUDE_MSG_OPTION_TARGET_INSTANCE_ID",SWIG_From_int((int)(21))); SWIG_Python_SetConstant(d, "PRELUDE_LOG_CRIT",SWIG_From_int((int)(PRELUDE_LOG_CRIT))); SWIG_Python_SetConstant(d, "PRELUDE_LOG_ERR",SWIG_From_int((int)(PRELUDE_LOG_ERR))); SWIG_Python_SetConstant(d, "PRELUDE_LOG_WARN",SWIG_From_int((int)(PRELUDE_LOG_WARN))); SWIG_Python_SetConstant(d, "PRELUDE_LOG_INFO",SWIG_From_int((int)(PRELUDE_LOG_INFO))); SWIG_Python_SetConstant(d, "PRELUDE_LOG_DEBUG",SWIG_From_int((int)(PRELUDE_LOG_DEBUG))); SWIG_Python_SetConstant(d, "PRELUDE_LOG_FLAGS_QUIET",SWIG_From_int((int)(PRELUDE_LOG_FLAGS_QUIET))); SWIG_Python_SetConstant(d, "PRELUDE_LOG_FLAGS_SYSLOG",SWIG_From_int((int)(PRELUDE_LOG_FLAGS_SYSLOG))); SWIG_Python_SetConstant(d, "PRELUDE_MSGBUF_FLAGS_ASYNC",SWIG_From_int((int)(PRELUDE_MSGBUF_FLAGS_ASYNC))); SWIG_Python_SetConstant(d, "PRELUDE_ERROR_SYSTEM_ERROR",SWIG_From_int((int)((1 << 15)))); SWIG_Python_SetConstant(d, "PRELUDE_ERROR_SOURCE_UNKNOWN",SWIG_From_int((int)(PRELUDE_ERROR_SOURCE_UNKNOWN))); SWIG_Python_SetConstant(d, "PRELUDE_ERROR_SOURCE_IO",SWIG_From_int((int)(PRELUDE_ERROR_SOURCE_IO))); SWIG_Python_SetConstant(d, "PRELUDE_ERROR_SOURCE_MESSAGE",SWIG_From_int((int)(PRELUDE_ERROR_SOURCE_MESSAGE))); SWIG_Python_SetConstant(d, "PRELUDE_ERROR_SOURCE_FAILOVER",SWIG_From_int((int)(PRELUDE_ERROR_SOURCE_FAILOVER))); SWIG_Python_SetConstant(d, "PRELUDE_ERROR_SOURCE_CLIENT",SWIG_From_int((int)(PRELUDE_ERROR_SOURCE_CLIENT))); SWIG_Python_SetConstant(d, "PRELUDE_ERROR_SOURCE_CLIENT_PROFILE",SWIG_From_int((int)(PRELUDE_ERROR_SOURCE_CLIENT_PROFILE))); SWIG_Python_SetConstant(d, "PRELUDE_ERROR_SOURCE_EXTRACT",SWIG_From_int((int)(PRELUDE_ERROR_SOURCE_EXTRACT))); SWIG_Python_SetConstant(d, "PRELUDE_ERROR_SOURCE_CONNECTION",SWIG_From_int((int)(PRELUDE_ERROR_SOURCE_CONNECTION))); SWIG_Python_SetConstant(d, "PRELUDE_ERROR_SOURCE_CONNECTION_POOL",SWIG_From_int((int)(PRELUDE_ERROR_SOURCE_CONNECTION_POOL))); SWIG_Python_SetConstant(d, "PRELUDE_ERROR_SOURCE_CONFIG_ENGINE",SWIG_From_int((int)(PRELUDE_ERROR_SOURCE_CONFIG_ENGINE))); SWIG_Python_SetConstant(d, "PRELUDE_ERROR_SOURCE_STRING",SWIG_From_int((int)(PRELUDE_ERROR_SOURCE_STRING))); SWIG_Python_SetConstant(d, "PRELUDE_ERROR_SOURCE_IDMEF_TREE_WRAP",SWIG_From_int((int)(PRELUDE_ERROR_SOURCE_IDMEF_TREE_WRAP))); SWIG_Python_SetConstant(d, "PRELUDE_ERROR_SOURCE_IDMEF_PATH",SWIG_From_int((int)(PRELUDE_ERROR_SOURCE_IDMEF_PATH))); SWIG_Python_SetConstant(d, "PRELUDE_ERROR_SOURCE_IDMEF_TYPE",SWIG_From_int((int)(PRELUDE_ERROR_SOURCE_IDMEF_TYPE))); SWIG_Python_SetConstant(d, "PRELUDE_ERROR_SOURCE_IDMEF_MESSAGE_READ",SWIG_From_int((int)(PRELUDE_ERROR_SOURCE_IDMEF_MESSAGE_READ))); SWIG_Python_SetConstant(d, "PRELUDE_ERROR_SOURCE_IDMEF_CRITERIA",SWIG_From_int((int)(PRELUDE_ERROR_SOURCE_IDMEF_CRITERIA))); SWIG_Python_SetConstant(d, "PRELUDE_ERROR_SOURCE_IDMEF_VALUE_TYPE",SWIG_From_int((int)(PRELUDE_ERROR_SOURCE_IDMEF_VALUE_TYPE))); SWIG_Python_SetConstant(d, "PRELUDE_ERROR_SOURCE_PRELUDEDB",SWIG_From_int((int)(PRELUDE_ERROR_SOURCE_PRELUDEDB))); SWIG_Python_SetConstant(d, "PRELUDE_ERROR_NO_ERROR",SWIG_From_int((int)(PRELUDE_ERROR_NO_ERROR))); SWIG_Python_SetConstant(d, "PRELUDE_ERROR_GENERIC",SWIG_From_int((int)(PRELUDE_ERROR_GENERIC))); SWIG_Python_SetConstant(d, "PRELUDE_ERROR_TLS",SWIG_From_int((int)(PRELUDE_ERROR_TLS))); SWIG_Python_SetConstant(d, "PRELUDE_ERROR_INVAL_LENGTH",SWIG_From_int((int)(PRELUDE_ERROR_INVAL_LENGTH))); SWIG_Python_SetConstant(d, "PRELUDE_ERROR_INVAL_MESSAGE",SWIG_From_int((int)(PRELUDE_ERROR_INVAL_MESSAGE))); SWIG_Python_SetConstant(d, "PRELUDE_ERROR_PROTOCOL_VERSION",SWIG_From_int((int)(PRELUDE_ERROR_PROTOCOL_VERSION))); SWIG_Python_SetConstant(d, "PRELUDE_ERROR_EOF",SWIG_From_int((int)(PRELUDE_ERROR_EOF))); SWIG_Python_SetConstant(d, "PRELUDE_ERROR_PROFILE",SWIG_From_int((int)(PRELUDE_ERROR_PROFILE))); SWIG_Python_SetConstant(d, "PRELUDE_ERROR_TLS_AUTH_REJECTED",SWIG_From_int((int)(PRELUDE_ERROR_TLS_AUTH_REJECTED))); SWIG_Python_SetConstant(d, "PRELUDE_ERROR_INVAL_INT8",SWIG_From_int((int)(PRELUDE_ERROR_INVAL_INT8))); SWIG_Python_SetConstant(d, "PRELUDE_ERROR_INVAL_INT16",SWIG_From_int((int)(PRELUDE_ERROR_INVAL_INT16))); SWIG_Python_SetConstant(d, "PRELUDE_ERROR_INVAL_INT32",SWIG_From_int((int)(PRELUDE_ERROR_INVAL_INT32))); SWIG_Python_SetConstant(d, "PRELUDE_ERROR_INVAL_INT64",SWIG_From_int((int)(PRELUDE_ERROR_INVAL_INT64))); SWIG_Python_SetConstant(d, "PRELUDE_ERROR_INVAL_FLOAT",SWIG_From_int((int)(PRELUDE_ERROR_INVAL_FLOAT))); SWIG_Python_SetConstant(d, "PRELUDE_ERROR_INVAL_CHAR",SWIG_From_int((int)(PRELUDE_ERROR_INVAL_CHAR))); SWIG_Python_SetConstant(d, "PRELUDE_ERROR_INVAL_IDMEF_TIME",SWIG_From_int((int)(PRELUDE_ERROR_INVAL_IDMEF_TIME))); SWIG_Python_SetConstant(d, "PRELUDE_ERROR_CONNECTION_STRING",SWIG_From_int((int)(PRELUDE_ERROR_CONNECTION_STRING))); SWIG_Python_SetConstant(d, "PRELUDE_ERROR_IDMEF_VALUE_TYPE_UNKNOWN",SWIG_From_int((int)(PRELUDE_ERROR_IDMEF_VALUE_TYPE_UNKNOWN))); SWIG_Python_SetConstant(d, "PRELUDE_ERROR_IDMEF_VALUE_TYPE_COPY_UNAVAILABLE",SWIG_From_int((int)(PRELUDE_ERROR_IDMEF_VALUE_TYPE_COPY_UNAVAILABLE))); SWIG_Python_SetConstant(d, "PRELUDE_ERROR_IDMEF_VALUE_TYPE_CLONE_UNAVAILABLE",SWIG_From_int((int)(PRELUDE_ERROR_IDMEF_VALUE_TYPE_CLONE_UNAVAILABLE))); SWIG_Python_SetConstant(d, "PRELUDE_ERROR_IDMEF_VALUE_TYPE_COMPARE_UNAVAILABLE",SWIG_From_int((int)(PRELUDE_ERROR_IDMEF_VALUE_TYPE_COMPARE_UNAVAILABLE))); SWIG_Python_SetConstant(d, "PRELUDE_ERROR_IDMEF_VALUE_TYPE_READ_UNAVAILABLE",SWIG_From_int((int)(PRELUDE_ERROR_IDMEF_VALUE_TYPE_READ_UNAVAILABLE))); SWIG_Python_SetConstant(d, "PRELUDE_ERROR_IDMEF_VALUE_TYPE_WRITE_UNAVAILABLE",SWIG_From_int((int)(PRELUDE_ERROR_IDMEF_VALUE_TYPE_WRITE_UNAVAILABLE))); SWIG_Python_SetConstant(d, "PRELUDE_ERROR_IDMEF_VALUE_TYPE_COMPARE_MISMATCH",SWIG_From_int((int)(PRELUDE_ERROR_IDMEF_VALUE_TYPE_COMPARE_MISMATCH))); SWIG_Python_SetConstant(d, "PRELUDE_ERROR_IDMEF_VALUE_TYPE_PARSE",SWIG_From_int((int)(PRELUDE_ERROR_IDMEF_VALUE_TYPE_PARSE))); SWIG_Python_SetConstant(d, "PRELUDE_ERROR_IDMEF_CLASS_UNKNOWN",SWIG_From_int((int)(PRELUDE_ERROR_IDMEF_CLASS_UNKNOWN))); SWIG_Python_SetConstant(d, "PRELUDE_ERROR_IDMEF_CLASS_UNKNOWN_CHILD",SWIG_From_int((int)(PRELUDE_ERROR_IDMEF_CLASS_UNKNOWN_CHILD))); SWIG_Python_SetConstant(d, "PRELUDE_ERROR_IDMEF_CLASS_UNKNOWN_NAME",SWIG_From_int((int)(PRELUDE_ERROR_IDMEF_CLASS_UNKNOWN_NAME))); SWIG_Python_SetConstant(d, "PRELUDE_ERROR_IDMEF_PATH_LENGTH",SWIG_From_int((int)(PRELUDE_ERROR_IDMEF_PATH_LENGTH))); SWIG_Python_SetConstant(d, "PRELUDE_ERROR_IDMEF_PATH_DEPTH",SWIG_From_int((int)(PRELUDE_ERROR_IDMEF_PATH_DEPTH))); SWIG_Python_SetConstant(d, "PRELUDE_ERROR_IDMEF_PATH_PARENT_ROOT",SWIG_From_int((int)(PRELUDE_ERROR_IDMEF_PATH_PARENT_ROOT))); SWIG_Python_SetConstant(d, "PRELUDE_ERROR_IDMEF_PATH_NTH",SWIG_From_int((int)(PRELUDE_ERROR_IDMEF_PATH_NTH))); SWIG_Python_SetConstant(d, "PRELUDE_ERROR_IDMEF_PATH_MISS_INDEX",SWIG_From_int((int)(PRELUDE_ERROR_IDMEF_PATH_MISS_INDEX))); SWIG_Python_SetConstant(d, "PRELUDE_ERROR_IDMEF_PATH_INTEGRITY",SWIG_From_int((int)(PRELUDE_ERROR_IDMEF_PATH_INTEGRITY))); SWIG_Python_SetConstant(d, "PRELUDE_ERROR_IDMEF_PATH_INDEX_RESERVED",SWIG_From_int((int)(PRELUDE_ERROR_IDMEF_PATH_INDEX_RESERVED))); SWIG_Python_SetConstant(d, "PRELUDE_ERROR_IDMEF_PATH_INDEX_FORBIDDEN",SWIG_From_int((int)(PRELUDE_ERROR_IDMEF_PATH_INDEX_FORBIDDEN))); SWIG_Python_SetConstant(d, "PRELUDE_ERROR_IDMEF_PATH_INDEX_UNDEFINED",SWIG_From_int((int)(PRELUDE_ERROR_IDMEF_PATH_INDEX_UNDEFINED))); SWIG_Python_SetConstant(d, "PRELUDE_ERROR_IDMEF_TREE_INDEX_UNDEFINED",SWIG_From_int((int)(PRELUDE_ERROR_IDMEF_TREE_INDEX_UNDEFINED))); SWIG_Python_SetConstant(d, "PRELUDE_ERROR_IDMEF_UNKNOWN_ENUM_STRING",SWIG_From_int((int)(PRELUDE_ERROR_IDMEF_UNKNOWN_ENUM_STRING))); SWIG_Python_SetConstant(d, "PRELUDE_ERROR_IDMEF_UNKNOWN_TAG",SWIG_From_int((int)(PRELUDE_ERROR_IDMEF_UNKNOWN_TAG))); SWIG_Python_SetConstant(d, "PRELUDE_ERROR_DAEMONIZE_LOCK_HELD",SWIG_From_int((int)(PRELUDE_ERROR_DAEMONIZE_LOCK_HELD))); SWIG_Python_SetConstant(d, "PRELUDE_ERROR_PLUGIN_LTDL_INIT",SWIG_From_int((int)(PRELUDE_ERROR_PLUGIN_LTDL_INIT))); SWIG_Python_SetConstant(d, "PRELUDE_ERROR_STRING_NOT_NULL_TERMINATED",SWIG_From_int((int)(PRELUDE_ERROR_STRING_NOT_NULL_TERMINATED))); SWIG_Python_SetConstant(d, "PRELUDE_ERROR_CANT_RESOLVE",SWIG_From_int((int)(PRELUDE_ERROR_CANT_RESOLVE))); SWIG_Python_SetConstant(d, "PRELUDE_ERROR_UNKNOWN_PERMISSION_TYPE",SWIG_From_int((int)(PRELUDE_ERROR_UNKNOWN_PERMISSION_TYPE))); SWIG_Python_SetConstant(d, "PRELUDE_ERROR_UNKNOWN_PERMISSION_BIT",SWIG_From_int((int)(PRELUDE_ERROR_UNKNOWN_PERMISSION_BIT))); SWIG_Python_SetConstant(d, "PRELUDE_ERROR_IDMEF_CRITERIA_PARSE",SWIG_From_int((int)(PRELUDE_ERROR_IDMEF_CRITERIA_PARSE))); SWIG_Python_SetConstant(d, "PRELUDE_ERROR_IDMEF_CRITERION_UNSUPPORTED_OPERATOR",SWIG_From_int((int)(PRELUDE_ERROR_IDMEF_CRITERION_UNSUPPORTED_OPERATOR))); SWIG_Python_SetConstant(d, "PRELUDE_ERROR_IDMEF_CRITERION_INVALID_REGEX",SWIG_From_int((int)(PRELUDE_ERROR_IDMEF_CRITERION_INVALID_REGEX))); SWIG_Python_SetConstant(d, "PRELUDE_ERROR_TLS_WARNING_ALERT",SWIG_From_int((int)(PRELUDE_ERROR_TLS_WARNING_ALERT))); SWIG_Python_SetConstant(d, "PRELUDE_ERROR_TLS_FATAL_ALERT",SWIG_From_int((int)(PRELUDE_ERROR_TLS_FATAL_ALERT))); SWIG_Python_SetConstant(d, "PRELUDE_ERROR_IDMEF_CLASS_CHILD_NOT_CLASS",SWIG_From_int((int)(PRELUDE_ERROR_IDMEF_CLASS_CHILD_NOT_CLASS))); SWIG_Python_SetConstant(d, "PRELUDE_ERROR_ASSERTION",SWIG_From_int((int)(PRELUDE_ERROR_ASSERTION))); SWIG_Python_SetConstant(d, "PRELUDE_ERROR_IDMEF_VALUE_TYPE_REF_UNAVAILABLE",SWIG_From_int((int)(PRELUDE_ERROR_IDMEF_VALUE_TYPE_REF_UNAVAILABLE))); SWIG_Python_SetConstant(d, "PRELUDE_ERROR_UNKNOWN_ERRNO",SWIG_From_int((int)(PRELUDE_ERROR_UNKNOWN_ERRNO))); SWIG_Python_SetConstant(d, "PRELUDE_ERROR_E2BIG",SWIG_From_int((int)(PRELUDE_ERROR_E2BIG))); SWIG_Python_SetConstant(d, "PRELUDE_ERROR_EACCES",SWIG_From_int((int)(PRELUDE_ERROR_EACCES))); SWIG_Python_SetConstant(d, "PRELUDE_ERROR_EADDRINUSE",SWIG_From_int((int)(PRELUDE_ERROR_EADDRINUSE))); SWIG_Python_SetConstant(d, "PRELUDE_ERROR_EADDRNOTAVAIL",SWIG_From_int((int)(PRELUDE_ERROR_EADDRNOTAVAIL))); SWIG_Python_SetConstant(d, "PRELUDE_ERROR_EADV",SWIG_From_int((int)(PRELUDE_ERROR_EADV))); SWIG_Python_SetConstant(d, "PRELUDE_ERROR_EAFNOSUPPORT",SWIG_From_int((int)(PRELUDE_ERROR_EAFNOSUPPORT))); SWIG_Python_SetConstant(d, "PRELUDE_ERROR_EAGAIN",SWIG_From_int((int)(PRELUDE_ERROR_EAGAIN))); SWIG_Python_SetConstant(d, "PRELUDE_ERROR_EALREADY",SWIG_From_int((int)(PRELUDE_ERROR_EALREADY))); SWIG_Python_SetConstant(d, "PRELUDE_ERROR_EAUTH",SWIG_From_int((int)(PRELUDE_ERROR_EAUTH))); SWIG_Python_SetConstant(d, "PRELUDE_ERROR_EBACKGROUND",SWIG_From_int((int)(PRELUDE_ERROR_EBACKGROUND))); SWIG_Python_SetConstant(d, "PRELUDE_ERROR_EBADE",SWIG_From_int((int)(PRELUDE_ERROR_EBADE))); SWIG_Python_SetConstant(d, "PRELUDE_ERROR_EBADF",SWIG_From_int((int)(PRELUDE_ERROR_EBADF))); SWIG_Python_SetConstant(d, "PRELUDE_ERROR_EBADFD",SWIG_From_int((int)(PRELUDE_ERROR_EBADFD))); SWIG_Python_SetConstant(d, "PRELUDE_ERROR_EBADMSG",SWIG_From_int((int)(PRELUDE_ERROR_EBADMSG))); SWIG_Python_SetConstant(d, "PRELUDE_ERROR_EBADR",SWIG_From_int((int)(PRELUDE_ERROR_EBADR))); SWIG_Python_SetConstant(d, "PRELUDE_ERROR_EBADRPC",SWIG_From_int((int)(PRELUDE_ERROR_EBADRPC))); SWIG_Python_SetConstant(d, "PRELUDE_ERROR_EBADRQC",SWIG_From_int((int)(PRELUDE_ERROR_EBADRQC))); SWIG_Python_SetConstant(d, "PRELUDE_ERROR_EBADSLT",SWIG_From_int((int)(PRELUDE_ERROR_EBADSLT))); SWIG_Python_SetConstant(d, "PRELUDE_ERROR_EBFONT",SWIG_From_int((int)(PRELUDE_ERROR_EBFONT))); SWIG_Python_SetConstant(d, "PRELUDE_ERROR_EBUSY",SWIG_From_int((int)(PRELUDE_ERROR_EBUSY))); SWIG_Python_SetConstant(d, "PRELUDE_ERROR_ECANCELED",SWIG_From_int((int)(PRELUDE_ERROR_ECANCELED))); SWIG_Python_SetConstant(d, "PRELUDE_ERROR_ECHILD",SWIG_From_int((int)(PRELUDE_ERROR_ECHILD))); SWIG_Python_SetConstant(d, "PRELUDE_ERROR_ECHRNG",SWIG_From_int((int)(PRELUDE_ERROR_ECHRNG))); SWIG_Python_SetConstant(d, "PRELUDE_ERROR_ECOMM",SWIG_From_int((int)(PRELUDE_ERROR_ECOMM))); SWIG_Python_SetConstant(d, "PRELUDE_ERROR_ECONNABORTED",SWIG_From_int((int)(PRELUDE_ERROR_ECONNABORTED))); SWIG_Python_SetConstant(d, "PRELUDE_ERROR_ECONNREFUSED",SWIG_From_int((int)(PRELUDE_ERROR_ECONNREFUSED))); SWIG_Python_SetConstant(d, "PRELUDE_ERROR_ECONNRESET",SWIG_From_int((int)(PRELUDE_ERROR_ECONNRESET))); SWIG_Python_SetConstant(d, "PRELUDE_ERROR_ED",SWIG_From_int((int)(PRELUDE_ERROR_ED))); SWIG_Python_SetConstant(d, "PRELUDE_ERROR_EDEADLK",SWIG_From_int((int)(PRELUDE_ERROR_EDEADLK))); SWIG_Python_SetConstant(d, "PRELUDE_ERROR_EDEADLOCK",SWIG_From_int((int)(PRELUDE_ERROR_EDEADLOCK))); SWIG_Python_SetConstant(d, "PRELUDE_ERROR_EDESTADDRREQ",SWIG_From_int((int)(PRELUDE_ERROR_EDESTADDRREQ))); SWIG_Python_SetConstant(d, "PRELUDE_ERROR_EDIED",SWIG_From_int((int)(PRELUDE_ERROR_EDIED))); SWIG_Python_SetConstant(d, "PRELUDE_ERROR_EDOM",SWIG_From_int((int)(PRELUDE_ERROR_EDOM))); SWIG_Python_SetConstant(d, "PRELUDE_ERROR_EDOTDOT",SWIG_From_int((int)(PRELUDE_ERROR_EDOTDOT))); SWIG_Python_SetConstant(d, "PRELUDE_ERROR_EDQUOT",SWIG_From_int((int)(PRELUDE_ERROR_EDQUOT))); SWIG_Python_SetConstant(d, "PRELUDE_ERROR_EEXIST",SWIG_From_int((int)(PRELUDE_ERROR_EEXIST))); SWIG_Python_SetConstant(d, "PRELUDE_ERROR_EFAULT",SWIG_From_int((int)(PRELUDE_ERROR_EFAULT))); SWIG_Python_SetConstant(d, "PRELUDE_ERROR_EFBIG",SWIG_From_int((int)(PRELUDE_ERROR_EFBIG))); SWIG_Python_SetConstant(d, "PRELUDE_ERROR_EFTYPE",SWIG_From_int((int)(PRELUDE_ERROR_EFTYPE))); SWIG_Python_SetConstant(d, "PRELUDE_ERROR_EGRATUITOUS",SWIG_From_int((int)(PRELUDE_ERROR_EGRATUITOUS))); SWIG_Python_SetConstant(d, "PRELUDE_ERROR_EGREGIOUS",SWIG_From_int((int)(PRELUDE_ERROR_EGREGIOUS))); SWIG_Python_SetConstant(d, "PRELUDE_ERROR_EHOSTDOWN",SWIG_From_int((int)(PRELUDE_ERROR_EHOSTDOWN))); SWIG_Python_SetConstant(d, "PRELUDE_ERROR_EHOSTUNREACH",SWIG_From_int((int)(PRELUDE_ERROR_EHOSTUNREACH))); SWIG_Python_SetConstant(d, "PRELUDE_ERROR_EIDRM",SWIG_From_int((int)(PRELUDE_ERROR_EIDRM))); SWIG_Python_SetConstant(d, "PRELUDE_ERROR_EIEIO",SWIG_From_int((int)(PRELUDE_ERROR_EIEIO))); SWIG_Python_SetConstant(d, "PRELUDE_ERROR_EILSEQ",SWIG_From_int((int)(PRELUDE_ERROR_EILSEQ))); SWIG_Python_SetConstant(d, "PRELUDE_ERROR_EINPROGRESS",SWIG_From_int((int)(PRELUDE_ERROR_EINPROGRESS))); SWIG_Python_SetConstant(d, "PRELUDE_ERROR_EINTR",SWIG_From_int((int)(PRELUDE_ERROR_EINTR))); SWIG_Python_SetConstant(d, "PRELUDE_ERROR_EINVAL",SWIG_From_int((int)(PRELUDE_ERROR_EINVAL))); SWIG_Python_SetConstant(d, "PRELUDE_ERROR_EIO",SWIG_From_int((int)(PRELUDE_ERROR_EIO))); SWIG_Python_SetConstant(d, "PRELUDE_ERROR_EISCONN",SWIG_From_int((int)(PRELUDE_ERROR_EISCONN))); SWIG_Python_SetConstant(d, "PRELUDE_ERROR_EISDIR",SWIG_From_int((int)(PRELUDE_ERROR_EISDIR))); SWIG_Python_SetConstant(d, "PRELUDE_ERROR_EISNAM",SWIG_From_int((int)(PRELUDE_ERROR_EISNAM))); SWIG_Python_SetConstant(d, "PRELUDE_ERROR_EL2HLT",SWIG_From_int((int)(PRELUDE_ERROR_EL2HLT))); SWIG_Python_SetConstant(d, "PRELUDE_ERROR_EL2NSYNC",SWIG_From_int((int)(PRELUDE_ERROR_EL2NSYNC))); SWIG_Python_SetConstant(d, "PRELUDE_ERROR_EL3HLT",SWIG_From_int((int)(PRELUDE_ERROR_EL3HLT))); SWIG_Python_SetConstant(d, "PRELUDE_ERROR_EL3RST",SWIG_From_int((int)(PRELUDE_ERROR_EL3RST))); SWIG_Python_SetConstant(d, "PRELUDE_ERROR_ELIBACC",SWIG_From_int((int)(PRELUDE_ERROR_ELIBACC))); SWIG_Python_SetConstant(d, "PRELUDE_ERROR_ELIBBAD",SWIG_From_int((int)(PRELUDE_ERROR_ELIBBAD))); SWIG_Python_SetConstant(d, "PRELUDE_ERROR_ELIBEXEC",SWIG_From_int((int)(PRELUDE_ERROR_ELIBEXEC))); SWIG_Python_SetConstant(d, "PRELUDE_ERROR_ELIBMAX",SWIG_From_int((int)(PRELUDE_ERROR_ELIBMAX))); SWIG_Python_SetConstant(d, "PRELUDE_ERROR_ELIBSCN",SWIG_From_int((int)(PRELUDE_ERROR_ELIBSCN))); SWIG_Python_SetConstant(d, "PRELUDE_ERROR_ELNRNG",SWIG_From_int((int)(PRELUDE_ERROR_ELNRNG))); SWIG_Python_SetConstant(d, "PRELUDE_ERROR_ELOOP",SWIG_From_int((int)(PRELUDE_ERROR_ELOOP))); SWIG_Python_SetConstant(d, "PRELUDE_ERROR_EMEDIUMTYPE",SWIG_From_int((int)(PRELUDE_ERROR_EMEDIUMTYPE))); SWIG_Python_SetConstant(d, "PRELUDE_ERROR_EMFILE",SWIG_From_int((int)(PRELUDE_ERROR_EMFILE))); SWIG_Python_SetConstant(d, "PRELUDE_ERROR_EMLINK",SWIG_From_int((int)(PRELUDE_ERROR_EMLINK))); SWIG_Python_SetConstant(d, "PRELUDE_ERROR_EMSGSIZE",SWIG_From_int((int)(PRELUDE_ERROR_EMSGSIZE))); SWIG_Python_SetConstant(d, "PRELUDE_ERROR_EMULTIHOP",SWIG_From_int((int)(PRELUDE_ERROR_EMULTIHOP))); SWIG_Python_SetConstant(d, "PRELUDE_ERROR_ENAMETOOLONG",SWIG_From_int((int)(PRELUDE_ERROR_ENAMETOOLONG))); SWIG_Python_SetConstant(d, "PRELUDE_ERROR_ENAVAIL",SWIG_From_int((int)(PRELUDE_ERROR_ENAVAIL))); SWIG_Python_SetConstant(d, "PRELUDE_ERROR_ENEEDAUTH",SWIG_From_int((int)(PRELUDE_ERROR_ENEEDAUTH))); SWIG_Python_SetConstant(d, "PRELUDE_ERROR_ENETDOWN",SWIG_From_int((int)(PRELUDE_ERROR_ENETDOWN))); SWIG_Python_SetConstant(d, "PRELUDE_ERROR_ENETRESET",SWIG_From_int((int)(PRELUDE_ERROR_ENETRESET))); SWIG_Python_SetConstant(d, "PRELUDE_ERROR_ENETUNREACH",SWIG_From_int((int)(PRELUDE_ERROR_ENETUNREACH))); SWIG_Python_SetConstant(d, "PRELUDE_ERROR_ENFILE",SWIG_From_int((int)(PRELUDE_ERROR_ENFILE))); SWIG_Python_SetConstant(d, "PRELUDE_ERROR_ENOANO",SWIG_From_int((int)(PRELUDE_ERROR_ENOANO))); SWIG_Python_SetConstant(d, "PRELUDE_ERROR_ENOBUFS",SWIG_From_int((int)(PRELUDE_ERROR_ENOBUFS))); SWIG_Python_SetConstant(d, "PRELUDE_ERROR_ENOCSI",SWIG_From_int((int)(PRELUDE_ERROR_ENOCSI))); SWIG_Python_SetConstant(d, "PRELUDE_ERROR_ENODATA",SWIG_From_int((int)(PRELUDE_ERROR_ENODATA))); SWIG_Python_SetConstant(d, "PRELUDE_ERROR_ENODEV",SWIG_From_int((int)(PRELUDE_ERROR_ENODEV))); SWIG_Python_SetConstant(d, "PRELUDE_ERROR_ENOENT",SWIG_From_int((int)(PRELUDE_ERROR_ENOENT))); SWIG_Python_SetConstant(d, "PRELUDE_ERROR_ENOEXEC",SWIG_From_int((int)(PRELUDE_ERROR_ENOEXEC))); SWIG_Python_SetConstant(d, "PRELUDE_ERROR_ENOLCK",SWIG_From_int((int)(PRELUDE_ERROR_ENOLCK))); SWIG_Python_SetConstant(d, "PRELUDE_ERROR_ENOLINK",SWIG_From_int((int)(PRELUDE_ERROR_ENOLINK))); SWIG_Python_SetConstant(d, "PRELUDE_ERROR_ENOMEDIUM",SWIG_From_int((int)(PRELUDE_ERROR_ENOMEDIUM))); SWIG_Python_SetConstant(d, "PRELUDE_ERROR_ENOMEM",SWIG_From_int((int)(PRELUDE_ERROR_ENOMEM))); SWIG_Python_SetConstant(d, "PRELUDE_ERROR_ENOMSG",SWIG_From_int((int)(PRELUDE_ERROR_ENOMSG))); SWIG_Python_SetConstant(d, "PRELUDE_ERROR_ENONET",SWIG_From_int((int)(PRELUDE_ERROR_ENONET))); SWIG_Python_SetConstant(d, "PRELUDE_ERROR_ENOPKG",SWIG_From_int((int)(PRELUDE_ERROR_ENOPKG))); SWIG_Python_SetConstant(d, "PRELUDE_ERROR_ENOPROTOOPT",SWIG_From_int((int)(PRELUDE_ERROR_ENOPROTOOPT))); SWIG_Python_SetConstant(d, "PRELUDE_ERROR_ENOSPC",SWIG_From_int((int)(PRELUDE_ERROR_ENOSPC))); SWIG_Python_SetConstant(d, "PRELUDE_ERROR_ENOSR",SWIG_From_int((int)(PRELUDE_ERROR_ENOSR))); SWIG_Python_SetConstant(d, "PRELUDE_ERROR_ENOSTR",SWIG_From_int((int)(PRELUDE_ERROR_ENOSTR))); SWIG_Python_SetConstant(d, "PRELUDE_ERROR_ENOSYS",SWIG_From_int((int)(PRELUDE_ERROR_ENOSYS))); SWIG_Python_SetConstant(d, "PRELUDE_ERROR_ENOTBLK",SWIG_From_int((int)(PRELUDE_ERROR_ENOTBLK))); SWIG_Python_SetConstant(d, "PRELUDE_ERROR_ENOTCONN",SWIG_From_int((int)(PRELUDE_ERROR_ENOTCONN))); SWIG_Python_SetConstant(d, "PRELUDE_ERROR_ENOTDIR",SWIG_From_int((int)(PRELUDE_ERROR_ENOTDIR))); SWIG_Python_SetConstant(d, "PRELUDE_ERROR_ENOTEMPTY",SWIG_From_int((int)(PRELUDE_ERROR_ENOTEMPTY))); SWIG_Python_SetConstant(d, "PRELUDE_ERROR_ENOTNAM",SWIG_From_int((int)(PRELUDE_ERROR_ENOTNAM))); SWIG_Python_SetConstant(d, "PRELUDE_ERROR_ENOTSOCK",SWIG_From_int((int)(PRELUDE_ERROR_ENOTSOCK))); SWIG_Python_SetConstant(d, "PRELUDE_ERROR_ENOTSUP",SWIG_From_int((int)(PRELUDE_ERROR_ENOTSUP))); SWIG_Python_SetConstant(d, "PRELUDE_ERROR_ENOTTY",SWIG_From_int((int)(PRELUDE_ERROR_ENOTTY))); SWIG_Python_SetConstant(d, "PRELUDE_ERROR_ENOTUNIQ",SWIG_From_int((int)(PRELUDE_ERROR_ENOTUNIQ))); SWIG_Python_SetConstant(d, "PRELUDE_ERROR_ENXIO",SWIG_From_int((int)(PRELUDE_ERROR_ENXIO))); SWIG_Python_SetConstant(d, "PRELUDE_ERROR_EOPNOTSUPP",SWIG_From_int((int)(PRELUDE_ERROR_EOPNOTSUPP))); SWIG_Python_SetConstant(d, "PRELUDE_ERROR_EOVERFLOW",SWIG_From_int((int)(PRELUDE_ERROR_EOVERFLOW))); SWIG_Python_SetConstant(d, "PRELUDE_ERROR_EPERM",SWIG_From_int((int)(PRELUDE_ERROR_EPERM))); SWIG_Python_SetConstant(d, "PRELUDE_ERROR_EPFNOSUPPORT",SWIG_From_int((int)(PRELUDE_ERROR_EPFNOSUPPORT))); SWIG_Python_SetConstant(d, "PRELUDE_ERROR_EPIPE",SWIG_From_int((int)(PRELUDE_ERROR_EPIPE))); SWIG_Python_SetConstant(d, "PRELUDE_ERROR_EPROCLIM",SWIG_From_int((int)(PRELUDE_ERROR_EPROCLIM))); SWIG_Python_SetConstant(d, "PRELUDE_ERROR_EPROCUNAVAIL",SWIG_From_int((int)(PRELUDE_ERROR_EPROCUNAVAIL))); SWIG_Python_SetConstant(d, "PRELUDE_ERROR_EPROGMISMATCH",SWIG_From_int((int)(PRELUDE_ERROR_EPROGMISMATCH))); SWIG_Python_SetConstant(d, "PRELUDE_ERROR_EPROGUNAVAIL",SWIG_From_int((int)(PRELUDE_ERROR_EPROGUNAVAIL))); SWIG_Python_SetConstant(d, "PRELUDE_ERROR_EPROTO",SWIG_From_int((int)(PRELUDE_ERROR_EPROTO))); SWIG_Python_SetConstant(d, "PRELUDE_ERROR_EPROTONOSUPPORT",SWIG_From_int((int)(PRELUDE_ERROR_EPROTONOSUPPORT))); SWIG_Python_SetConstant(d, "PRELUDE_ERROR_EPROTOTYPE",SWIG_From_int((int)(PRELUDE_ERROR_EPROTOTYPE))); SWIG_Python_SetConstant(d, "PRELUDE_ERROR_ERANGE",SWIG_From_int((int)(PRELUDE_ERROR_ERANGE))); SWIG_Python_SetConstant(d, "PRELUDE_ERROR_EREMCHG",SWIG_From_int((int)(PRELUDE_ERROR_EREMCHG))); SWIG_Python_SetConstant(d, "PRELUDE_ERROR_EREMOTE",SWIG_From_int((int)(PRELUDE_ERROR_EREMOTE))); SWIG_Python_SetConstant(d, "PRELUDE_ERROR_EREMOTEIO",SWIG_From_int((int)(PRELUDE_ERROR_EREMOTEIO))); SWIG_Python_SetConstant(d, "PRELUDE_ERROR_ERESTART",SWIG_From_int((int)(PRELUDE_ERROR_ERESTART))); SWIG_Python_SetConstant(d, "PRELUDE_ERROR_EROFS",SWIG_From_int((int)(PRELUDE_ERROR_EROFS))); SWIG_Python_SetConstant(d, "PRELUDE_ERROR_ERPCMISMATCH",SWIG_From_int((int)(PRELUDE_ERROR_ERPCMISMATCH))); SWIG_Python_SetConstant(d, "PRELUDE_ERROR_ESHUTDOWN",SWIG_From_int((int)(PRELUDE_ERROR_ESHUTDOWN))); SWIG_Python_SetConstant(d, "PRELUDE_ERROR_ESOCKTNOSUPPORT",SWIG_From_int((int)(PRELUDE_ERROR_ESOCKTNOSUPPORT))); SWIG_Python_SetConstant(d, "PRELUDE_ERROR_ESPIPE",SWIG_From_int((int)(PRELUDE_ERROR_ESPIPE))); SWIG_Python_SetConstant(d, "PRELUDE_ERROR_ESRCH",SWIG_From_int((int)(PRELUDE_ERROR_ESRCH))); SWIG_Python_SetConstant(d, "PRELUDE_ERROR_ESRMNT",SWIG_From_int((int)(PRELUDE_ERROR_ESRMNT))); SWIG_Python_SetConstant(d, "PRELUDE_ERROR_ESTALE",SWIG_From_int((int)(PRELUDE_ERROR_ESTALE))); SWIG_Python_SetConstant(d, "PRELUDE_ERROR_ESTRPIPE",SWIG_From_int((int)(PRELUDE_ERROR_ESTRPIPE))); SWIG_Python_SetConstant(d, "PRELUDE_ERROR_ETIME",SWIG_From_int((int)(PRELUDE_ERROR_ETIME))); SWIG_Python_SetConstant(d, "PRELUDE_ERROR_ETIMEDOUT",SWIG_From_int((int)(PRELUDE_ERROR_ETIMEDOUT))); SWIG_Python_SetConstant(d, "PRELUDE_ERROR_ETOOMANYREFS",SWIG_From_int((int)(PRELUDE_ERROR_ETOOMANYREFS))); SWIG_Python_SetConstant(d, "PRELUDE_ERROR_ETXTBSY",SWIG_From_int((int)(PRELUDE_ERROR_ETXTBSY))); SWIG_Python_SetConstant(d, "PRELUDE_ERROR_EUCLEAN",SWIG_From_int((int)(PRELUDE_ERROR_EUCLEAN))); SWIG_Python_SetConstant(d, "PRELUDE_ERROR_EUNATCH",SWIG_From_int((int)(PRELUDE_ERROR_EUNATCH))); SWIG_Python_SetConstant(d, "PRELUDE_ERROR_EUSERS",SWIG_From_int((int)(PRELUDE_ERROR_EUSERS))); SWIG_Python_SetConstant(d, "PRELUDE_ERROR_EWOULDBLOCK",SWIG_From_int((int)(PRELUDE_ERROR_EWOULDBLOCK))); SWIG_Python_SetConstant(d, "PRELUDE_ERROR_EXDEV",SWIG_From_int((int)(PRELUDE_ERROR_EXDEV))); SWIG_Python_SetConstant(d, "PRELUDE_ERROR_EXFULL",SWIG_From_int((int)(PRELUDE_ERROR_EXFULL))); #if PY_VERSION_HEX >= 0x03000000 return m; #else return; #endif } libprelude-1.0.0/bindings/low-level/python/Makefile.in0000664000076400007640000012544211347714453017704 00000000000000# Makefile.in generated by automake 1.11.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, # Inc. # This Makefile.in 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. @SET_MAKE@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ target_triplet = @target@ subdir = bindings/low-level/python DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in \ $(srcdir)/setup.py.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/libmissing/m4/00gnulib.m4 \ $(top_srcdir)/libmissing/m4/alloca.m4 \ $(top_srcdir)/libmissing/m4/arpa_inet_h.m4 \ $(top_srcdir)/libmissing/m4/btowc.m4 \ $(top_srcdir)/libmissing/m4/close.m4 \ $(top_srcdir)/libmissing/m4/codeset.m4 \ $(top_srcdir)/libmissing/m4/cond.m4 \ $(top_srcdir)/libmissing/m4/dos.m4 \ $(top_srcdir)/libmissing/m4/dup2.m4 \ $(top_srcdir)/libmissing/m4/errno_h.m4 \ $(top_srcdir)/libmissing/m4/exponentd.m4 \ $(top_srcdir)/libmissing/m4/exponentf.m4 \ $(top_srcdir)/libmissing/m4/exponentl.m4 \ $(top_srcdir)/libmissing/m4/extensions.m4 \ $(top_srcdir)/libmissing/m4/fclose.m4 \ $(top_srcdir)/libmissing/m4/fcntl-o.m4 \ $(top_srcdir)/libmissing/m4/fcntl_h.m4 \ $(top_srcdir)/libmissing/m4/float_h.m4 \ $(top_srcdir)/libmissing/m4/fopen.m4 \ $(top_srcdir)/libmissing/m4/fpieee.m4 \ $(top_srcdir)/libmissing/m4/frexp.m4 \ $(top_srcdir)/libmissing/m4/frexpl.m4 \ $(top_srcdir)/libmissing/m4/fseeko.m4 \ $(top_srcdir)/libmissing/m4/ftw.m4 \ $(top_srcdir)/libmissing/m4/getaddrinfo.m4 \ $(top_srcdir)/libmissing/m4/getdelim.m4 \ $(top_srcdir)/libmissing/m4/gethostname.m4 \ $(top_srcdir)/libmissing/m4/getline.m4 \ $(top_srcdir)/libmissing/m4/getpagesize.m4 \ $(top_srcdir)/libmissing/m4/getpass.m4 \ $(top_srcdir)/libmissing/m4/gettimeofday.m4 \ $(top_srcdir)/libmissing/m4/glibc21.m4 \ $(top_srcdir)/libmissing/m4/gnulib-common.m4 \ $(top_srcdir)/libmissing/m4/gnulib-comp.m4 \ $(top_srcdir)/libmissing/m4/gnulib-tool.m4 \ $(top_srcdir)/libmissing/m4/hostent.m4 \ $(top_srcdir)/libmissing/m4/include_next.m4 \ $(top_srcdir)/libmissing/m4/inet_ntop.m4 \ $(top_srcdir)/libmissing/m4/inet_pton.m4 \ $(top_srcdir)/libmissing/m4/intmax_t.m4 \ $(top_srcdir)/libmissing/m4/inttypes_h.m4 \ $(top_srcdir)/libmissing/m4/isnand.m4 \ $(top_srcdir)/libmissing/m4/isnanf.m4 \ $(top_srcdir)/libmissing/m4/isnanl.m4 \ $(top_srcdir)/libmissing/m4/langinfo_h.m4 \ $(top_srcdir)/libmissing/m4/ldexpl.m4 \ $(top_srcdir)/libmissing/m4/lib-ld.m4 \ $(top_srcdir)/libmissing/m4/lib-link.m4 \ $(top_srcdir)/libmissing/m4/lib-prefix.m4 \ $(top_srcdir)/libmissing/m4/localcharset.m4 \ $(top_srcdir)/libmissing/m4/locale-fr.m4 \ $(top_srcdir)/libmissing/m4/locale-ja.m4 \ $(top_srcdir)/libmissing/m4/locale-tr.m4 \ $(top_srcdir)/libmissing/m4/locale-zh.m4 \ $(top_srcdir)/libmissing/m4/lock.m4 \ $(top_srcdir)/libmissing/m4/longlong.m4 \ $(top_srcdir)/libmissing/m4/lseek.m4 \ $(top_srcdir)/libmissing/m4/lstat.m4 \ $(top_srcdir)/libmissing/m4/malloc.m4 \ $(top_srcdir)/libmissing/m4/math_h.m4 \ $(top_srcdir)/libmissing/m4/mbrtowc.m4 \ $(top_srcdir)/libmissing/m4/mbsinit.m4 \ $(top_srcdir)/libmissing/m4/mbstate_t.m4 \ $(top_srcdir)/libmissing/m4/memchr.m4 \ $(top_srcdir)/libmissing/m4/memmem.m4 \ $(top_srcdir)/libmissing/m4/minmax.m4 \ $(top_srcdir)/libmissing/m4/mktime.m4 \ $(top_srcdir)/libmissing/m4/mmap-anon.m4 \ $(top_srcdir)/libmissing/m4/mode_t.m4 \ $(top_srcdir)/libmissing/m4/multiarch.m4 \ $(top_srcdir)/libmissing/m4/netdb_h.m4 \ $(top_srcdir)/libmissing/m4/netinet_in_h.m4 \ $(top_srcdir)/libmissing/m4/nl_langinfo.m4 \ $(top_srcdir)/libmissing/m4/nocrash.m4 \ $(top_srcdir)/libmissing/m4/onceonly.m4 \ $(top_srcdir)/libmissing/m4/open.m4 \ $(top_srcdir)/libmissing/m4/pathmax.m4 \ $(top_srcdir)/libmissing/m4/perror.m4 \ $(top_srcdir)/libmissing/m4/poll.m4 \ $(top_srcdir)/libmissing/m4/printf-frexp.m4 \ $(top_srcdir)/libmissing/m4/printf-frexpl.m4 \ $(top_srcdir)/libmissing/m4/printf.m4 \ $(top_srcdir)/libmissing/m4/realloc.m4 \ $(top_srcdir)/libmissing/m4/regex.m4 \ $(top_srcdir)/libmissing/m4/relocatable-lib.m4 \ $(top_srcdir)/libmissing/m4/select.m4 \ $(top_srcdir)/libmissing/m4/servent.m4 \ $(top_srcdir)/libmissing/m4/signal_h.m4 \ $(top_srcdir)/libmissing/m4/signalblocking.m4 \ $(top_srcdir)/libmissing/m4/signbit.m4 \ $(top_srcdir)/libmissing/m4/size_max.m4 \ $(top_srcdir)/libmissing/m4/sleep.m4 \ $(top_srcdir)/libmissing/m4/snprintf-posix.m4 \ $(top_srcdir)/libmissing/m4/snprintf.m4 \ $(top_srcdir)/libmissing/m4/sockets.m4 \ $(top_srcdir)/libmissing/m4/socklen.m4 \ $(top_srcdir)/libmissing/m4/sockpfaf.m4 \ $(top_srcdir)/libmissing/m4/ssize_t.m4 \ $(top_srcdir)/libmissing/m4/stat.m4 \ $(top_srcdir)/libmissing/m4/stdbool.m4 \ $(top_srcdir)/libmissing/m4/stddef_h.m4 \ $(top_srcdir)/libmissing/m4/stdint.m4 \ $(top_srcdir)/libmissing/m4/stdint_h.m4 \ $(top_srcdir)/libmissing/m4/stdio_h.m4 \ $(top_srcdir)/libmissing/m4/stdlib_h.m4 \ $(top_srcdir)/libmissing/m4/strcase.m4 \ $(top_srcdir)/libmissing/m4/strcasestr.m4 \ $(top_srcdir)/libmissing/m4/strdup.m4 \ $(top_srcdir)/libmissing/m4/strerror.m4 \ $(top_srcdir)/libmissing/m4/string_h.m4 \ $(top_srcdir)/libmissing/m4/strings_h.m4 \ $(top_srcdir)/libmissing/m4/strndup.m4 \ $(top_srcdir)/libmissing/m4/strnlen.m4 \ $(top_srcdir)/libmissing/m4/strptime.m4 \ $(top_srcdir)/libmissing/m4/strsep.m4 \ $(top_srcdir)/libmissing/m4/symlink.m4 \ $(top_srcdir)/libmissing/m4/sys_ioctl_h.m4 \ $(top_srcdir)/libmissing/m4/sys_select_h.m4 \ $(top_srcdir)/libmissing/m4/sys_socket_h.m4 \ $(top_srcdir)/libmissing/m4/sys_stat_h.m4 \ $(top_srcdir)/libmissing/m4/sys_time_h.m4 \ $(top_srcdir)/libmissing/m4/sys_utsname_h.m4 \ $(top_srcdir)/libmissing/m4/thread.m4 \ $(top_srcdir)/libmissing/m4/threadlib.m4 \ $(top_srcdir)/libmissing/m4/time_h.m4 \ $(top_srcdir)/libmissing/m4/time_r.m4 \ $(top_srcdir)/libmissing/m4/timegm.m4 \ $(top_srcdir)/libmissing/m4/tls.m4 \ $(top_srcdir)/libmissing/m4/tm_gmtoff.m4 \ $(top_srcdir)/libmissing/m4/uname.m4 \ $(top_srcdir)/libmissing/m4/ungetc.m4 \ $(top_srcdir)/libmissing/m4/unistd_h.m4 \ $(top_srcdir)/libmissing/m4/vasnprintf.m4 \ $(top_srcdir)/libmissing/m4/vsnprintf-posix.m4 \ $(top_srcdir)/libmissing/m4/vsnprintf.m4 \ $(top_srcdir)/libmissing/m4/warn-on-use.m4 \ $(top_srcdir)/libmissing/m4/wchar.m4 \ $(top_srcdir)/libmissing/m4/wchar_t.m4 \ $(top_srcdir)/libmissing/m4/wcrtomb.m4 \ $(top_srcdir)/libmissing/m4/wctob.m4 \ $(top_srcdir)/libmissing/m4/wctype.m4 \ $(top_srcdir)/libmissing/m4/wint_t.m4 \ $(top_srcdir)/libmissing/m4/write.m4 \ $(top_srcdir)/libmissing/m4/xsize.m4 \ $(top_srcdir)/libmissing/m4/yield.m4 \ $(top_srcdir)/m4/ac_compile_check_sizeof.m4 \ $(top_srcdir)/m4/am_path_ruby.m4 $(top_srcdir)/m4/argz.m4 \ $(top_srcdir)/m4/as-ac-expand.m4 \ $(top_srcdir)/m4/ax_c_check_flag.m4 \ $(top_srcdir)/m4/ax_check_aligned_access_required.m4 \ $(top_srcdir)/m4/ax_create_prelude_inttypes_h.m4 \ $(top_srcdir)/m4/ax_ld_check_flag.m4 \ $(top_srcdir)/m4/gtk-doc.m4 $(top_srcdir)/m4/libgcrypt.m4 \ $(top_srcdir)/m4/libgnutls-extra.m4 \ $(top_srcdir)/m4/libgnutls.m4 $(top_srcdir)/m4/libtool.m4 \ $(top_srcdir)/m4/ltdl.m4 $(top_srcdir)/m4/ltoptions.m4 \ $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/m4/pkg.m4 \ $(top_srcdir)/configure.in am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = setup.py CONFIG_CLEAN_VPATH_FILES = SOURCES = DIST_SOURCES = DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ ALLOCA = @ALLOCA@ ALLOCA_H = @ALLOCA_H@ AMTAR = @AMTAR@ APPLE_UNIVERSAL_BUILD = @APPLE_UNIVERSAL_BUILD@ AR = @AR@ ARGZ_H = @ARGZ_H@ AS = @AS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ BINDINGS_CC = @BINDINGS_CC@ BINDIR = @BINDIR@ BITSIZEOF_PTRDIFF_T = @BITSIZEOF_PTRDIFF_T@ BITSIZEOF_SIG_ATOMIC_T = @BITSIZEOF_SIG_ATOMIC_T@ BITSIZEOF_SIZE_T = @BITSIZEOF_SIZE_T@ BITSIZEOF_WCHAR_T = @BITSIZEOF_WCHAR_T@ BITSIZEOF_WINT_T = @BITSIZEOF_WINT_T@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CC_FOR_BUILD = @CC_FOR_BUILD@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EMULTIHOP_HIDDEN = @EMULTIHOP_HIDDEN@ EMULTIHOP_VALUE = @EMULTIHOP_VALUE@ ENOLINK_HIDDEN = @ENOLINK_HIDDEN@ ENOLINK_VALUE = @ENOLINK_VALUE@ EOVERFLOW_HIDDEN = @EOVERFLOW_HIDDEN@ EOVERFLOW_VALUE = @EOVERFLOW_VALUE@ ERRNO_H = @ERRNO_H@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ FLOAT_H = @FLOAT_H@ GETADDRINFO_LIB = @GETADDRINFO_LIB@ GETHOSTNAME_LIB = @GETHOSTNAME_LIB@ GLIBC21 = @GLIBC21@ GNULIB_ACCEPT = @GNULIB_ACCEPT@ GNULIB_ACCEPT4 = @GNULIB_ACCEPT4@ GNULIB_ACOSL = @GNULIB_ACOSL@ GNULIB_ASINL = @GNULIB_ASINL@ GNULIB_ATANL = @GNULIB_ATANL@ GNULIB_ATOLL = @GNULIB_ATOLL@ GNULIB_BIND = @GNULIB_BIND@ GNULIB_BTOWC = @GNULIB_BTOWC@ GNULIB_CALLOC_POSIX = @GNULIB_CALLOC_POSIX@ GNULIB_CANONICALIZE_FILE_NAME = @GNULIB_CANONICALIZE_FILE_NAME@ GNULIB_CEILF = @GNULIB_CEILF@ GNULIB_CEILL = @GNULIB_CEILL@ GNULIB_CHOWN = @GNULIB_CHOWN@ GNULIB_CLOSE = @GNULIB_CLOSE@ GNULIB_CONNECT = @GNULIB_CONNECT@ GNULIB_COSL = @GNULIB_COSL@ GNULIB_DPRINTF = @GNULIB_DPRINTF@ GNULIB_DUP2 = @GNULIB_DUP2@ GNULIB_DUP3 = @GNULIB_DUP3@ GNULIB_ENVIRON = @GNULIB_ENVIRON@ GNULIB_EUIDACCESS = @GNULIB_EUIDACCESS@ GNULIB_EXPL = @GNULIB_EXPL@ GNULIB_FACCESSAT = @GNULIB_FACCESSAT@ GNULIB_FCHDIR = @GNULIB_FCHDIR@ GNULIB_FCHMODAT = @GNULIB_FCHMODAT@ GNULIB_FCHOWNAT = @GNULIB_FCHOWNAT@ GNULIB_FCLOSE = @GNULIB_FCLOSE@ GNULIB_FCNTL = @GNULIB_FCNTL@ GNULIB_FFLUSH = @GNULIB_FFLUSH@ GNULIB_FLOORF = @GNULIB_FLOORF@ GNULIB_FLOORL = @GNULIB_FLOORL@ GNULIB_FOPEN = @GNULIB_FOPEN@ GNULIB_FPRINTF = @GNULIB_FPRINTF@ GNULIB_FPRINTF_POSIX = @GNULIB_FPRINTF_POSIX@ GNULIB_FPURGE = @GNULIB_FPURGE@ GNULIB_FPUTC = @GNULIB_FPUTC@ GNULIB_FPUTS = @GNULIB_FPUTS@ GNULIB_FREOPEN = @GNULIB_FREOPEN@ GNULIB_FREXP = @GNULIB_FREXP@ GNULIB_FREXPL = @GNULIB_FREXPL@ GNULIB_FSEEK = @GNULIB_FSEEK@ GNULIB_FSEEKO = @GNULIB_FSEEKO@ GNULIB_FSTATAT = @GNULIB_FSTATAT@ GNULIB_FSYNC = @GNULIB_FSYNC@ GNULIB_FTELL = @GNULIB_FTELL@ GNULIB_FTELLO = @GNULIB_FTELLO@ GNULIB_FTRUNCATE = @GNULIB_FTRUNCATE@ GNULIB_FUTIMENS = @GNULIB_FUTIMENS@ GNULIB_FWRITE = @GNULIB_FWRITE@ GNULIB_GETADDRINFO = @GNULIB_GETADDRINFO@ GNULIB_GETCWD = @GNULIB_GETCWD@ GNULIB_GETDELIM = @GNULIB_GETDELIM@ GNULIB_GETDOMAINNAME = @GNULIB_GETDOMAINNAME@ GNULIB_GETDTABLESIZE = @GNULIB_GETDTABLESIZE@ GNULIB_GETGROUPS = @GNULIB_GETGROUPS@ GNULIB_GETHOSTNAME = @GNULIB_GETHOSTNAME@ GNULIB_GETLINE = @GNULIB_GETLINE@ GNULIB_GETLOADAVG = @GNULIB_GETLOADAVG@ GNULIB_GETLOGIN = @GNULIB_GETLOGIN@ GNULIB_GETLOGIN_R = @GNULIB_GETLOGIN_R@ GNULIB_GETPAGESIZE = @GNULIB_GETPAGESIZE@ GNULIB_GETPEERNAME = @GNULIB_GETPEERNAME@ GNULIB_GETSOCKNAME = @GNULIB_GETSOCKNAME@ GNULIB_GETSOCKOPT = @GNULIB_GETSOCKOPT@ GNULIB_GETSUBOPT = @GNULIB_GETSUBOPT@ GNULIB_GETTIMEOFDAY = @GNULIB_GETTIMEOFDAY@ GNULIB_GETUSERSHELL = @GNULIB_GETUSERSHELL@ GNULIB_INET_NTOP = @GNULIB_INET_NTOP@ GNULIB_INET_PTON = @GNULIB_INET_PTON@ GNULIB_IOCTL = @GNULIB_IOCTL@ GNULIB_ISFINITE = @GNULIB_ISFINITE@ GNULIB_ISINF = @GNULIB_ISINF@ GNULIB_ISNAN = @GNULIB_ISNAN@ GNULIB_ISNAND = @GNULIB_ISNAND@ GNULIB_ISNANF = @GNULIB_ISNANF@ GNULIB_ISNANL = @GNULIB_ISNANL@ GNULIB_LCHMOD = @GNULIB_LCHMOD@ GNULIB_LCHOWN = @GNULIB_LCHOWN@ GNULIB_LDEXPL = @GNULIB_LDEXPL@ GNULIB_LINK = @GNULIB_LINK@ GNULIB_LINKAT = @GNULIB_LINKAT@ GNULIB_LISTEN = @GNULIB_LISTEN@ GNULIB_LOGL = @GNULIB_LOGL@ GNULIB_LSEEK = @GNULIB_LSEEK@ GNULIB_LSTAT = @GNULIB_LSTAT@ GNULIB_MALLOC_POSIX = @GNULIB_MALLOC_POSIX@ GNULIB_MBRLEN = @GNULIB_MBRLEN@ GNULIB_MBRTOWC = @GNULIB_MBRTOWC@ GNULIB_MBSCASECMP = @GNULIB_MBSCASECMP@ GNULIB_MBSCASESTR = @GNULIB_MBSCASESTR@ GNULIB_MBSCHR = @GNULIB_MBSCHR@ GNULIB_MBSCSPN = @GNULIB_MBSCSPN@ GNULIB_MBSINIT = @GNULIB_MBSINIT@ GNULIB_MBSLEN = @GNULIB_MBSLEN@ GNULIB_MBSNCASECMP = @GNULIB_MBSNCASECMP@ GNULIB_MBSNLEN = @GNULIB_MBSNLEN@ GNULIB_MBSNRTOWCS = @GNULIB_MBSNRTOWCS@ GNULIB_MBSPBRK = @GNULIB_MBSPBRK@ GNULIB_MBSPCASECMP = @GNULIB_MBSPCASECMP@ GNULIB_MBSRCHR = @GNULIB_MBSRCHR@ GNULIB_MBSRTOWCS = @GNULIB_MBSRTOWCS@ GNULIB_MBSSEP = @GNULIB_MBSSEP@ GNULIB_MBSSPN = @GNULIB_MBSSPN@ GNULIB_MBSSTR = @GNULIB_MBSSTR@ GNULIB_MBSTOK_R = @GNULIB_MBSTOK_R@ GNULIB_MEMCHR = @GNULIB_MEMCHR@ GNULIB_MEMMEM = @GNULIB_MEMMEM@ GNULIB_MEMPCPY = @GNULIB_MEMPCPY@ GNULIB_MEMRCHR = @GNULIB_MEMRCHR@ GNULIB_MKDIRAT = @GNULIB_MKDIRAT@ GNULIB_MKDTEMP = @GNULIB_MKDTEMP@ GNULIB_MKFIFO = @GNULIB_MKFIFO@ GNULIB_MKFIFOAT = @GNULIB_MKFIFOAT@ GNULIB_MKNOD = @GNULIB_MKNOD@ GNULIB_MKNODAT = @GNULIB_MKNODAT@ GNULIB_MKOSTEMP = @GNULIB_MKOSTEMP@ GNULIB_MKOSTEMPS = @GNULIB_MKOSTEMPS@ GNULIB_MKSTEMP = @GNULIB_MKSTEMP@ GNULIB_MKSTEMPS = @GNULIB_MKSTEMPS@ GNULIB_NL_LANGINFO = @GNULIB_NL_LANGINFO@ GNULIB_OBSTACK_PRINTF = @GNULIB_OBSTACK_PRINTF@ GNULIB_OBSTACK_PRINTF_POSIX = @GNULIB_OBSTACK_PRINTF_POSIX@ GNULIB_OPEN = @GNULIB_OPEN@ GNULIB_OPENAT = @GNULIB_OPENAT@ GNULIB_PERROR = @GNULIB_PERROR@ GNULIB_PIPE2 = @GNULIB_PIPE2@ GNULIB_POPEN = @GNULIB_POPEN@ GNULIB_PREAD = @GNULIB_PREAD@ GNULIB_PRINTF = @GNULIB_PRINTF@ GNULIB_PRINTF_POSIX = @GNULIB_PRINTF_POSIX@ GNULIB_PUTC = @GNULIB_PUTC@ GNULIB_PUTCHAR = @GNULIB_PUTCHAR@ GNULIB_PUTENV = @GNULIB_PUTENV@ GNULIB_PUTS = @GNULIB_PUTS@ GNULIB_RANDOM_R = @GNULIB_RANDOM_R@ GNULIB_RAWMEMCHR = @GNULIB_RAWMEMCHR@ GNULIB_READLINK = @GNULIB_READLINK@ GNULIB_READLINKAT = @GNULIB_READLINKAT@ GNULIB_REALLOC_POSIX = @GNULIB_REALLOC_POSIX@ GNULIB_REALPATH = @GNULIB_REALPATH@ GNULIB_RECV = @GNULIB_RECV@ GNULIB_RECVFROM = @GNULIB_RECVFROM@ GNULIB_REMOVE = @GNULIB_REMOVE@ GNULIB_RENAME = @GNULIB_RENAME@ GNULIB_RENAMEAT = @GNULIB_RENAMEAT@ GNULIB_RMDIR = @GNULIB_RMDIR@ GNULIB_ROUND = @GNULIB_ROUND@ GNULIB_ROUNDF = @GNULIB_ROUNDF@ GNULIB_ROUNDL = @GNULIB_ROUNDL@ GNULIB_RPMATCH = @GNULIB_RPMATCH@ GNULIB_SELECT = @GNULIB_SELECT@ GNULIB_SEND = @GNULIB_SEND@ GNULIB_SENDTO = @GNULIB_SENDTO@ GNULIB_SETENV = @GNULIB_SETENV@ GNULIB_SETSOCKOPT = @GNULIB_SETSOCKOPT@ GNULIB_SHUTDOWN = @GNULIB_SHUTDOWN@ GNULIB_SIGACTION = @GNULIB_SIGACTION@ GNULIB_SIGNAL_H_SIGPIPE = @GNULIB_SIGNAL_H_SIGPIPE@ GNULIB_SIGNBIT = @GNULIB_SIGNBIT@ GNULIB_SIGPROCMASK = @GNULIB_SIGPROCMASK@ GNULIB_SINL = @GNULIB_SINL@ GNULIB_SLEEP = @GNULIB_SLEEP@ GNULIB_SNPRINTF = @GNULIB_SNPRINTF@ GNULIB_SOCKET = @GNULIB_SOCKET@ GNULIB_SPRINTF_POSIX = @GNULIB_SPRINTF_POSIX@ GNULIB_SQRTL = @GNULIB_SQRTL@ GNULIB_STAT = @GNULIB_STAT@ GNULIB_STDIO_H_SIGPIPE = @GNULIB_STDIO_H_SIGPIPE@ GNULIB_STPCPY = @GNULIB_STPCPY@ GNULIB_STPNCPY = @GNULIB_STPNCPY@ GNULIB_STRCASESTR = @GNULIB_STRCASESTR@ GNULIB_STRCHRNUL = @GNULIB_STRCHRNUL@ GNULIB_STRDUP = @GNULIB_STRDUP@ GNULIB_STRERROR = @GNULIB_STRERROR@ GNULIB_STRNDUP = @GNULIB_STRNDUP@ GNULIB_STRNLEN = @GNULIB_STRNLEN@ GNULIB_STRPBRK = @GNULIB_STRPBRK@ GNULIB_STRSEP = @GNULIB_STRSEP@ GNULIB_STRSIGNAL = @GNULIB_STRSIGNAL@ GNULIB_STRSTR = @GNULIB_STRSTR@ GNULIB_STRTOD = @GNULIB_STRTOD@ GNULIB_STRTOK_R = @GNULIB_STRTOK_R@ GNULIB_STRTOLL = @GNULIB_STRTOLL@ GNULIB_STRTOULL = @GNULIB_STRTOULL@ GNULIB_STRVERSCMP = @GNULIB_STRVERSCMP@ GNULIB_SYMLINK = @GNULIB_SYMLINK@ GNULIB_SYMLINKAT = @GNULIB_SYMLINKAT@ GNULIB_TANL = @GNULIB_TANL@ GNULIB_TRUNC = @GNULIB_TRUNC@ GNULIB_TRUNCF = @GNULIB_TRUNCF@ GNULIB_TRUNCL = @GNULIB_TRUNCL@ GNULIB_UNAME = @GNULIB_UNAME@ GNULIB_UNISTD_H_GETOPT = @GNULIB_UNISTD_H_GETOPT@ GNULIB_UNISTD_H_SIGPIPE = @GNULIB_UNISTD_H_SIGPIPE@ GNULIB_UNLINK = @GNULIB_UNLINK@ GNULIB_UNLINKAT = @GNULIB_UNLINKAT@ GNULIB_UNSETENV = @GNULIB_UNSETENV@ GNULIB_USLEEP = @GNULIB_USLEEP@ GNULIB_UTIMENSAT = @GNULIB_UTIMENSAT@ GNULIB_VASPRINTF = @GNULIB_VASPRINTF@ GNULIB_VDPRINTF = @GNULIB_VDPRINTF@ GNULIB_VFPRINTF = @GNULIB_VFPRINTF@ GNULIB_VFPRINTF_POSIX = @GNULIB_VFPRINTF_POSIX@ GNULIB_VPRINTF = @GNULIB_VPRINTF@ GNULIB_VPRINTF_POSIX = @GNULIB_VPRINTF_POSIX@ GNULIB_VSNPRINTF = @GNULIB_VSNPRINTF@ GNULIB_VSPRINTF_POSIX = @GNULIB_VSPRINTF_POSIX@ GNULIB_WCRTOMB = @GNULIB_WCRTOMB@ GNULIB_WCSNRTOMBS = @GNULIB_WCSNRTOMBS@ GNULIB_WCSRTOMBS = @GNULIB_WCSRTOMBS@ GNULIB_WCTOB = @GNULIB_WCTOB@ GNULIB_WCWIDTH = @GNULIB_WCWIDTH@ GNULIB_WRITE = @GNULIB_WRITE@ GREP = @GREP@ GTKDOC_CHECK = @GTKDOC_CHECK@ HAVE_ACCEPT4 = @HAVE_ACCEPT4@ HAVE_ACOSL = @HAVE_ACOSL@ HAVE_ARPA_INET_H = @HAVE_ARPA_INET_H@ HAVE_ASINL = @HAVE_ASINL@ HAVE_ATANL = @HAVE_ATANL@ HAVE_ATOLL = @HAVE_ATOLL@ HAVE_BTOWC = @HAVE_BTOWC@ HAVE_CALLOC_POSIX = @HAVE_CALLOC_POSIX@ HAVE_CANONICALIZE_FILE_NAME = @HAVE_CANONICALIZE_FILE_NAME@ HAVE_CHOWN = @HAVE_CHOWN@ HAVE_COSL = @HAVE_COSL@ HAVE_CXX = @HAVE_CXX@ HAVE_DECL_ACOSL = @HAVE_DECL_ACOSL@ HAVE_DECL_ASINL = @HAVE_DECL_ASINL@ HAVE_DECL_ATANL = @HAVE_DECL_ATANL@ HAVE_DECL_COSL = @HAVE_DECL_COSL@ HAVE_DECL_ENVIRON = @HAVE_DECL_ENVIRON@ HAVE_DECL_EXPL = @HAVE_DECL_EXPL@ HAVE_DECL_FPURGE = @HAVE_DECL_FPURGE@ HAVE_DECL_FREEADDRINFO = @HAVE_DECL_FREEADDRINFO@ HAVE_DECL_FREXPL = @HAVE_DECL_FREXPL@ HAVE_DECL_GAI_STRERROR = @HAVE_DECL_GAI_STRERROR@ HAVE_DECL_GETADDRINFO = @HAVE_DECL_GETADDRINFO@ HAVE_DECL_GETDELIM = @HAVE_DECL_GETDELIM@ HAVE_DECL_GETLINE = @HAVE_DECL_GETLINE@ HAVE_DECL_GETLOADAVG = @HAVE_DECL_GETLOADAVG@ HAVE_DECL_GETLOGIN_R = @HAVE_DECL_GETLOGIN_R@ HAVE_DECL_GETNAMEINFO = @HAVE_DECL_GETNAMEINFO@ HAVE_DECL_INET_NTOP = @HAVE_DECL_INET_NTOP@ HAVE_DECL_INET_PTON = @HAVE_DECL_INET_PTON@ HAVE_DECL_LDEXPL = @HAVE_DECL_LDEXPL@ HAVE_DECL_LOGL = @HAVE_DECL_LOGL@ HAVE_DECL_MEMMEM = @HAVE_DECL_MEMMEM@ HAVE_DECL_MEMRCHR = @HAVE_DECL_MEMRCHR@ HAVE_DECL_OBSTACK_PRINTF = @HAVE_DECL_OBSTACK_PRINTF@ HAVE_DECL_SINL = @HAVE_DECL_SINL@ HAVE_DECL_SNPRINTF = @HAVE_DECL_SNPRINTF@ HAVE_DECL_SQRTL = @HAVE_DECL_SQRTL@ HAVE_DECL_STRDUP = @HAVE_DECL_STRDUP@ HAVE_DECL_STRERROR = @HAVE_DECL_STRERROR@ HAVE_DECL_STRNCASECMP = @HAVE_DECL_STRNCASECMP@ HAVE_DECL_STRNDUP = @HAVE_DECL_STRNDUP@ HAVE_DECL_STRNLEN = @HAVE_DECL_STRNLEN@ HAVE_DECL_STRSIGNAL = @HAVE_DECL_STRSIGNAL@ HAVE_DECL_STRTOK_R = @HAVE_DECL_STRTOK_R@ HAVE_DECL_TANL = @HAVE_DECL_TANL@ HAVE_DECL_TRUNC = @HAVE_DECL_TRUNC@ HAVE_DECL_TRUNCF = @HAVE_DECL_TRUNCF@ HAVE_DECL_VSNPRINTF = @HAVE_DECL_VSNPRINTF@ HAVE_DECL_WCTOB = @HAVE_DECL_WCTOB@ HAVE_DECL_WCWIDTH = @HAVE_DECL_WCWIDTH@ HAVE_DPRINTF = @HAVE_DPRINTF@ HAVE_DUP2 = @HAVE_DUP2@ HAVE_DUP3 = @HAVE_DUP3@ HAVE_EUIDACCESS = @HAVE_EUIDACCESS@ HAVE_EXPL = @HAVE_EXPL@ HAVE_FACCESSAT = @HAVE_FACCESSAT@ HAVE_FCHMODAT = @HAVE_FCHMODAT@ HAVE_FCHOWNAT = @HAVE_FCHOWNAT@ HAVE_FCNTL = @HAVE_FCNTL@ HAVE_FSTATAT = @HAVE_FSTATAT@ HAVE_FSYNC = @HAVE_FSYNC@ HAVE_FTRUNCATE = @HAVE_FTRUNCATE@ HAVE_FUTIMENS = @HAVE_FUTIMENS@ HAVE_GETDOMAINNAME = @HAVE_GETDOMAINNAME@ HAVE_GETDTABLESIZE = @HAVE_GETDTABLESIZE@ HAVE_GETGROUPS = @HAVE_GETGROUPS@ HAVE_GETHOSTNAME = @HAVE_GETHOSTNAME@ HAVE_GETLOGIN = @HAVE_GETLOGIN@ HAVE_GETPAGESIZE = @HAVE_GETPAGESIZE@ HAVE_GETSUBOPT = @HAVE_GETSUBOPT@ HAVE_GETUSERSHELL = @HAVE_GETUSERSHELL@ HAVE_INTTYPES_H = @HAVE_INTTYPES_H@ HAVE_ISNAND = @HAVE_ISNAND@ HAVE_ISNANF = @HAVE_ISNANF@ HAVE_ISNANL = @HAVE_ISNANL@ HAVE_ISWCNTRL = @HAVE_ISWCNTRL@ HAVE_LANGINFO_CODESET = @HAVE_LANGINFO_CODESET@ HAVE_LANGINFO_ERA = @HAVE_LANGINFO_ERA@ HAVE_LANGINFO_H = @HAVE_LANGINFO_H@ HAVE_LCHMOD = @HAVE_LCHMOD@ HAVE_LCHOWN = @HAVE_LCHOWN@ HAVE_LINK = @HAVE_LINK@ HAVE_LINKAT = @HAVE_LINKAT@ HAVE_LOGL = @HAVE_LOGL@ HAVE_LONG_LONG_INT = @HAVE_LONG_LONG_INT@ HAVE_LSTAT = @HAVE_LSTAT@ HAVE_MALLOC_POSIX = @HAVE_MALLOC_POSIX@ HAVE_MBRLEN = @HAVE_MBRLEN@ HAVE_MBRTOWC = @HAVE_MBRTOWC@ HAVE_MBSINIT = @HAVE_MBSINIT@ HAVE_MBSLEN = @HAVE_MBSLEN@ HAVE_MBSNRTOWCS = @HAVE_MBSNRTOWCS@ HAVE_MBSRTOWCS = @HAVE_MBSRTOWCS@ HAVE_MEMPCPY = @HAVE_MEMPCPY@ HAVE_MKDIRAT = @HAVE_MKDIRAT@ HAVE_MKDTEMP = @HAVE_MKDTEMP@ HAVE_MKFIFO = @HAVE_MKFIFO@ HAVE_MKFIFOAT = @HAVE_MKFIFOAT@ HAVE_MKNOD = @HAVE_MKNOD@ HAVE_MKNODAT = @HAVE_MKNODAT@ HAVE_MKOSTEMP = @HAVE_MKOSTEMP@ HAVE_MKOSTEMPS = @HAVE_MKOSTEMPS@ HAVE_MKSTEMPS = @HAVE_MKSTEMPS@ HAVE_NETDB_H = @HAVE_NETDB_H@ HAVE_NETINET_IN_H = @HAVE_NETINET_IN_H@ HAVE_NL_LANGINFO = @HAVE_NL_LANGINFO@ HAVE_OPENAT = @HAVE_OPENAT@ HAVE_OS_H = @HAVE_OS_H@ HAVE_PIPE2 = @HAVE_PIPE2@ HAVE_POSIX_SIGNALBLOCKING = @HAVE_POSIX_SIGNALBLOCKING@ HAVE_PREAD = @HAVE_PREAD@ HAVE_RANDOM_H = @HAVE_RANDOM_H@ HAVE_RANDOM_R = @HAVE_RANDOM_R@ HAVE_RAWMEMCHR = @HAVE_RAWMEMCHR@ HAVE_READLINK = @HAVE_READLINK@ HAVE_READLINKAT = @HAVE_READLINKAT@ HAVE_REALLOC_POSIX = @HAVE_REALLOC_POSIX@ HAVE_REALPATH = @HAVE_REALPATH@ HAVE_RENAMEAT = @HAVE_RENAMEAT@ HAVE_RPMATCH = @HAVE_RPMATCH@ HAVE_SA_FAMILY_T = @HAVE_SA_FAMILY_T@ HAVE_SETENV = @HAVE_SETENV@ HAVE_SIGACTION = @HAVE_SIGACTION@ HAVE_SIGINFO_T = @HAVE_SIGINFO_T@ HAVE_SIGNED_SIG_ATOMIC_T = @HAVE_SIGNED_SIG_ATOMIC_T@ HAVE_SIGNED_WCHAR_T = @HAVE_SIGNED_WCHAR_T@ HAVE_SIGNED_WINT_T = @HAVE_SIGNED_WINT_T@ HAVE_SIGSET_T = @HAVE_SIGSET_T@ HAVE_SINL = @HAVE_SINL@ HAVE_SLEEP = @HAVE_SLEEP@ HAVE_SQRTL = @HAVE_SQRTL@ HAVE_STDINT_H = @HAVE_STDINT_H@ HAVE_STPCPY = @HAVE_STPCPY@ HAVE_STPNCPY = @HAVE_STPNCPY@ HAVE_STRCASECMP = @HAVE_STRCASECMP@ HAVE_STRCASESTR = @HAVE_STRCASESTR@ HAVE_STRCHRNUL = @HAVE_STRCHRNUL@ HAVE_STRPBRK = @HAVE_STRPBRK@ HAVE_STRSEP = @HAVE_STRSEP@ HAVE_STRTOD = @HAVE_STRTOD@ HAVE_STRTOLL = @HAVE_STRTOLL@ HAVE_STRTOULL = @HAVE_STRTOULL@ HAVE_STRUCT_ADDRINFO = @HAVE_STRUCT_ADDRINFO@ HAVE_STRUCT_RANDOM_DATA = @HAVE_STRUCT_RANDOM_DATA@ HAVE_STRUCT_SIGACTION_SA_SIGACTION = @HAVE_STRUCT_SIGACTION_SA_SIGACTION@ HAVE_STRUCT_SOCKADDR_STORAGE = @HAVE_STRUCT_SOCKADDR_STORAGE@ HAVE_STRUCT_TIMEVAL = @HAVE_STRUCT_TIMEVAL@ HAVE_STRUCT_UTSNAME = @HAVE_STRUCT_UTSNAME@ HAVE_STRVERSCMP = @HAVE_STRVERSCMP@ HAVE_SYMLINK = @HAVE_SYMLINK@ HAVE_SYMLINKAT = @HAVE_SYMLINKAT@ HAVE_SYS_BITYPES_H = @HAVE_SYS_BITYPES_H@ HAVE_SYS_INTTYPES_H = @HAVE_SYS_INTTYPES_H@ HAVE_SYS_IOCTL_H = @HAVE_SYS_IOCTL_H@ HAVE_SYS_LOADAVG_H = @HAVE_SYS_LOADAVG_H@ HAVE_SYS_PARAM_H = @HAVE_SYS_PARAM_H@ HAVE_SYS_SELECT_H = @HAVE_SYS_SELECT_H@ HAVE_SYS_SOCKET_H = @HAVE_SYS_SOCKET_H@ HAVE_SYS_TIME_H = @HAVE_SYS_TIME_H@ HAVE_SYS_TYPES_H = @HAVE_SYS_TYPES_H@ HAVE_SYS_UTSNAME_H = @HAVE_SYS_UTSNAME_H@ HAVE_TANL = @HAVE_TANL@ HAVE_TYPE_VOLATILE_SIG_ATOMIC_T = @HAVE_TYPE_VOLATILE_SIG_ATOMIC_T@ HAVE_UNAME = @HAVE_UNAME@ HAVE_UNISTD_H = @HAVE_UNISTD_H@ HAVE_UNLINKAT = @HAVE_UNLINKAT@ HAVE_UNSETENV = @HAVE_UNSETENV@ HAVE_UNSIGNED_LONG_LONG_INT = @HAVE_UNSIGNED_LONG_LONG_INT@ HAVE_USLEEP = @HAVE_USLEEP@ HAVE_UTIMENSAT = @HAVE_UTIMENSAT@ HAVE_VASPRINTF = @HAVE_VASPRINTF@ HAVE_VDPRINTF = @HAVE_VDPRINTF@ HAVE_WCHAR_H = @HAVE_WCHAR_H@ HAVE_WCHAR_T = @HAVE_WCHAR_T@ HAVE_WCRTOMB = @HAVE_WCRTOMB@ HAVE_WCSNRTOMBS = @HAVE_WCSNRTOMBS@ HAVE_WCSRTOMBS = @HAVE_WCSRTOMBS@ HAVE_WCTYPE_H = @HAVE_WCTYPE_H@ HAVE_WINSOCK2_H = @HAVE_WINSOCK2_H@ HAVE_WINT_T = @HAVE_WINT_T@ HAVE_WS2TCPIP_H = @HAVE_WS2TCPIP_H@ HAVE__BOOL = @HAVE__BOOL@ HOSTENT_LIB = @HOSTENT_LIB@ HTML_DIR = @HTML_DIR@ INCLTDL = @INCLTDL@ INCLUDE_NEXT = @INCLUDE_NEXT@ INCLUDE_NEXT_AS_FIRST_DIRECTIVE = @INCLUDE_NEXT_AS_FIRST_DIRECTIVE@ INET_NTOP_LIB = @INET_NTOP_LIB@ INET_PTON_LIB = @INET_PTON_LIB@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LD = @LD@ LDFLAGS = @LDFLAGS@ LEX = @LEX@ LEXLIB = @LEXLIB@ LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@ LIBADD_DL = @LIBADD_DL@ LIBADD_DLD_LINK = @LIBADD_DLD_LINK@ LIBADD_DLOPEN = @LIBADD_DLOPEN@ LIBADD_SHL_LOAD = @LIBADD_SHL_LOAD@ LIBDIR = @LIBDIR@ LIBGCRYPT_CFLAGS = @LIBGCRYPT_CFLAGS@ LIBGCRYPT_CONFIG = @LIBGCRYPT_CONFIG@ LIBGCRYPT_LIBS = @LIBGCRYPT_LIBS@ LIBGNUTLS_CFLAGS = @LIBGNUTLS_CFLAGS@ LIBGNUTLS_CONFIG = @LIBGNUTLS_CONFIG@ LIBGNUTLS_EXTRA_CFLAGS = @LIBGNUTLS_EXTRA_CFLAGS@ LIBGNUTLS_EXTRA_CONFIG = @LIBGNUTLS_EXTRA_CONFIG@ LIBGNUTLS_EXTRA_LIBS = @LIBGNUTLS_EXTRA_LIBS@ LIBGNUTLS_LIBS = @LIBGNUTLS_LIBS@ LIBINTL = @LIBINTL@ LIBLTDL = @LIBLTDL@ LIBMULTITHREAD = @LIBMULTITHREAD@ LIBOBJS = @LIBOBJS@ LIBPRELUDECPP_SONAME = @LIBPRELUDECPP_SONAME@ LIBPRELUDE_CFLAGS = @LIBPRELUDE_CFLAGS@ LIBPRELUDE_LIBS = @LIBPRELUDE_LIBS@ LIBPRELUDE_SONAME = @LIBPRELUDE_SONAME@ LIBPTH = @LIBPTH@ LIBPTH_PREFIX = @LIBPTH_PREFIX@ LIBS = @LIBS@ LIBSOCKET = @LIBSOCKET@ LIBTESTS_LIBDEPS = @LIBTESTS_LIBDEPS@ LIBTHREAD = @LIBTHREAD@ LIBTOOL = @LIBTOOL@ LIPO = @LIPO@ LN_S = @LN_S@ LOCALCHARSET_TESTS_ENVIRONMENT = @LOCALCHARSET_TESTS_ENVIRONMENT@ LOCALE_FR = @LOCALE_FR@ LOCALE_FR_UTF8 = @LOCALE_FR_UTF8@ LOCALE_JA = @LOCALE_JA@ LOCALE_TR_UTF8 = @LOCALE_TR_UTF8@ LOCALE_ZH_CN = @LOCALE_ZH_CN@ LOCALSTATEDIR = @LOCALSTATEDIR@ LTALLOCA = @LTALLOCA@ LTDLDEPS = @LTDLDEPS@ LTDLINCL = @LTDLINCL@ LTDLOPEN = @LTDLOPEN@ LTLIBINTL = @LTLIBINTL@ LTLIBMULTITHREAD = @LTLIBMULTITHREAD@ LTLIBOBJS = @LTLIBOBJS@ LTLIBPTH = @LTLIBPTH@ LTLIBTHREAD = @LTLIBTHREAD@ LT_CONFIG_H = @LT_CONFIG_H@ LT_DLLOADERS = @LT_DLLOADERS@ LT_DLPREOPEN = @LT_DLPREOPEN@ LUA_CFLAGS = @LUA_CFLAGS@ LUA_CONFIG = @LUA_CONFIG@ LUA_LIBS = @LUA_LIBS@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MKDIR_P = @MKDIR_P@ NETDB_H = @NETDB_H@ NETINET_IN_H = @NETINET_IN_H@ NEXT_ARPA_INET_H = @NEXT_ARPA_INET_H@ NEXT_AS_FIRST_DIRECTIVE_ARPA_INET_H = @NEXT_AS_FIRST_DIRECTIVE_ARPA_INET_H@ NEXT_AS_FIRST_DIRECTIVE_ERRNO_H = @NEXT_AS_FIRST_DIRECTIVE_ERRNO_H@ NEXT_AS_FIRST_DIRECTIVE_FCNTL_H = @NEXT_AS_FIRST_DIRECTIVE_FCNTL_H@ NEXT_AS_FIRST_DIRECTIVE_FLOAT_H = @NEXT_AS_FIRST_DIRECTIVE_FLOAT_H@ NEXT_AS_FIRST_DIRECTIVE_LANGINFO_H = @NEXT_AS_FIRST_DIRECTIVE_LANGINFO_H@ NEXT_AS_FIRST_DIRECTIVE_MATH_H = @NEXT_AS_FIRST_DIRECTIVE_MATH_H@ NEXT_AS_FIRST_DIRECTIVE_NETDB_H = @NEXT_AS_FIRST_DIRECTIVE_NETDB_H@ NEXT_AS_FIRST_DIRECTIVE_NETINET_IN_H = @NEXT_AS_FIRST_DIRECTIVE_NETINET_IN_H@ NEXT_AS_FIRST_DIRECTIVE_SIGNAL_H = @NEXT_AS_FIRST_DIRECTIVE_SIGNAL_H@ NEXT_AS_FIRST_DIRECTIVE_STDDEF_H = @NEXT_AS_FIRST_DIRECTIVE_STDDEF_H@ NEXT_AS_FIRST_DIRECTIVE_STDINT_H = @NEXT_AS_FIRST_DIRECTIVE_STDINT_H@ NEXT_AS_FIRST_DIRECTIVE_STDIO_H = @NEXT_AS_FIRST_DIRECTIVE_STDIO_H@ NEXT_AS_FIRST_DIRECTIVE_STDLIB_H = @NEXT_AS_FIRST_DIRECTIVE_STDLIB_H@ NEXT_AS_FIRST_DIRECTIVE_STRINGS_H = @NEXT_AS_FIRST_DIRECTIVE_STRINGS_H@ NEXT_AS_FIRST_DIRECTIVE_STRING_H = @NEXT_AS_FIRST_DIRECTIVE_STRING_H@ NEXT_AS_FIRST_DIRECTIVE_SYS_IOCTL_H = @NEXT_AS_FIRST_DIRECTIVE_SYS_IOCTL_H@ NEXT_AS_FIRST_DIRECTIVE_SYS_SELECT_H = @NEXT_AS_FIRST_DIRECTIVE_SYS_SELECT_H@ NEXT_AS_FIRST_DIRECTIVE_SYS_SOCKET_H = @NEXT_AS_FIRST_DIRECTIVE_SYS_SOCKET_H@ NEXT_AS_FIRST_DIRECTIVE_SYS_STAT_H = @NEXT_AS_FIRST_DIRECTIVE_SYS_STAT_H@ NEXT_AS_FIRST_DIRECTIVE_SYS_TIME_H = @NEXT_AS_FIRST_DIRECTIVE_SYS_TIME_H@ NEXT_AS_FIRST_DIRECTIVE_SYS_UTSNAME_H = @NEXT_AS_FIRST_DIRECTIVE_SYS_UTSNAME_H@ NEXT_AS_FIRST_DIRECTIVE_TIME_H = @NEXT_AS_FIRST_DIRECTIVE_TIME_H@ NEXT_AS_FIRST_DIRECTIVE_UNISTD_H = @NEXT_AS_FIRST_DIRECTIVE_UNISTD_H@ NEXT_AS_FIRST_DIRECTIVE_WCHAR_H = @NEXT_AS_FIRST_DIRECTIVE_WCHAR_H@ NEXT_AS_FIRST_DIRECTIVE_WCTYPE_H = @NEXT_AS_FIRST_DIRECTIVE_WCTYPE_H@ NEXT_ERRNO_H = @NEXT_ERRNO_H@ NEXT_FCNTL_H = @NEXT_FCNTL_H@ NEXT_FLOAT_H = @NEXT_FLOAT_H@ NEXT_LANGINFO_H = @NEXT_LANGINFO_H@ NEXT_MATH_H = @NEXT_MATH_H@ NEXT_NETDB_H = @NEXT_NETDB_H@ NEXT_NETINET_IN_H = @NEXT_NETINET_IN_H@ NEXT_SIGNAL_H = @NEXT_SIGNAL_H@ NEXT_STDDEF_H = @NEXT_STDDEF_H@ NEXT_STDINT_H = @NEXT_STDINT_H@ NEXT_STDIO_H = @NEXT_STDIO_H@ NEXT_STDLIB_H = @NEXT_STDLIB_H@ NEXT_STRINGS_H = @NEXT_STRINGS_H@ NEXT_STRING_H = @NEXT_STRING_H@ NEXT_SYS_IOCTL_H = @NEXT_SYS_IOCTL_H@ NEXT_SYS_SELECT_H = @NEXT_SYS_SELECT_H@ NEXT_SYS_SOCKET_H = @NEXT_SYS_SOCKET_H@ NEXT_SYS_STAT_H = @NEXT_SYS_STAT_H@ NEXT_SYS_TIME_H = @NEXT_SYS_TIME_H@ NEXT_SYS_UTSNAME_H = @NEXT_SYS_UTSNAME_H@ NEXT_TIME_H = @NEXT_TIME_H@ NEXT_UNISTD_H = @NEXT_UNISTD_H@ NEXT_WCHAR_H = @NEXT_WCHAR_H@ NEXT_WCTYPE_H = @NEXT_WCTYPE_H@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PCFLAGS = @PCFLAGS@ PERL = @PERL@ PERL_EXTRA_PARAMS = @PERL_EXTRA_PARAMS@ PKG_CONFIG = @PKG_CONFIG@ POLL_H = @POLL_H@ PRAGMA_SYSTEM_HEADER = @PRAGMA_SYSTEM_HEADER@ PRELUDE_ADMIN_CFLAGS = @PRELUDE_ADMIN_CFLAGS@ PRELUDE_ADMIN_LIBS = @PRELUDE_ADMIN_LIBS@ PRELUDE_CONFIG_DIR = @PRELUDE_CONFIG_DIR@ PRELUDE_SPOOL_DIR = @PRELUDE_SPOOL_DIR@ PTHREAD_CFLAGS = @PTHREAD_CFLAGS@ PTHREAD_LDFLAGS = @PTHREAD_LDFLAGS@ PTHREAD_LIBS = @PTHREAD_LIBS@ PTRDIFF_T_SUFFIX = @PTRDIFF_T_SUFFIX@ PYTHON = @PYTHON@ RANLIB = @RANLIB@ RELOCATABLE = @RELOCATABLE@ REPLACE_BTOWC = @REPLACE_BTOWC@ REPLACE_CANONICALIZE_FILE_NAME = @REPLACE_CANONICALIZE_FILE_NAME@ REPLACE_CEILF = @REPLACE_CEILF@ REPLACE_CEILL = @REPLACE_CEILL@ REPLACE_CHOWN = @REPLACE_CHOWN@ REPLACE_CLOSE = @REPLACE_CLOSE@ REPLACE_DPRINTF = @REPLACE_DPRINTF@ REPLACE_DUP = @REPLACE_DUP@ REPLACE_DUP2 = @REPLACE_DUP2@ REPLACE_FCHDIR = @REPLACE_FCHDIR@ REPLACE_FCHOWNAT = @REPLACE_FCHOWNAT@ REPLACE_FCLOSE = @REPLACE_FCLOSE@ REPLACE_FCNTL = @REPLACE_FCNTL@ REPLACE_FFLUSH = @REPLACE_FFLUSH@ REPLACE_FLOORF = @REPLACE_FLOORF@ REPLACE_FLOORL = @REPLACE_FLOORL@ REPLACE_FOPEN = @REPLACE_FOPEN@ REPLACE_FPRINTF = @REPLACE_FPRINTF@ REPLACE_FPURGE = @REPLACE_FPURGE@ REPLACE_FREOPEN = @REPLACE_FREOPEN@ REPLACE_FREXP = @REPLACE_FREXP@ REPLACE_FREXPL = @REPLACE_FREXPL@ REPLACE_FSEEK = @REPLACE_FSEEK@ REPLACE_FSEEKO = @REPLACE_FSEEKO@ REPLACE_FSTAT = @REPLACE_FSTAT@ REPLACE_FSTATAT = @REPLACE_FSTATAT@ REPLACE_FTELL = @REPLACE_FTELL@ REPLACE_FTELLO = @REPLACE_FTELLO@ REPLACE_FUTIMENS = @REPLACE_FUTIMENS@ REPLACE_GETCWD = @REPLACE_GETCWD@ REPLACE_GETDELIM = @REPLACE_GETDELIM@ REPLACE_GETGROUPS = @REPLACE_GETGROUPS@ REPLACE_GETLINE = @REPLACE_GETLINE@ REPLACE_GETPAGESIZE = @REPLACE_GETPAGESIZE@ REPLACE_GETTIMEOFDAY = @REPLACE_GETTIMEOFDAY@ REPLACE_HUGE_VAL = @REPLACE_HUGE_VAL@ REPLACE_ISFINITE = @REPLACE_ISFINITE@ REPLACE_ISINF = @REPLACE_ISINF@ REPLACE_ISNAN = @REPLACE_ISNAN@ REPLACE_ISWCNTRL = @REPLACE_ISWCNTRL@ REPLACE_LCHOWN = @REPLACE_LCHOWN@ REPLACE_LDEXPL = @REPLACE_LDEXPL@ REPLACE_LINK = @REPLACE_LINK@ REPLACE_LINKAT = @REPLACE_LINKAT@ REPLACE_LOCALTIME_R = @REPLACE_LOCALTIME_R@ REPLACE_LSEEK = @REPLACE_LSEEK@ REPLACE_LSTAT = @REPLACE_LSTAT@ REPLACE_MBRLEN = @REPLACE_MBRLEN@ REPLACE_MBRTOWC = @REPLACE_MBRTOWC@ REPLACE_MBSINIT = @REPLACE_MBSINIT@ REPLACE_MBSNRTOWCS = @REPLACE_MBSNRTOWCS@ REPLACE_MBSRTOWCS = @REPLACE_MBSRTOWCS@ REPLACE_MBSTATE_T = @REPLACE_MBSTATE_T@ REPLACE_MEMCHR = @REPLACE_MEMCHR@ REPLACE_MEMMEM = @REPLACE_MEMMEM@ REPLACE_MKDIR = @REPLACE_MKDIR@ REPLACE_MKFIFO = @REPLACE_MKFIFO@ REPLACE_MKNOD = @REPLACE_MKNOD@ REPLACE_MKSTEMP = @REPLACE_MKSTEMP@ REPLACE_MKTIME = @REPLACE_MKTIME@ REPLACE_NAN = @REPLACE_NAN@ REPLACE_NANOSLEEP = @REPLACE_NANOSLEEP@ REPLACE_NL_LANGINFO = @REPLACE_NL_LANGINFO@ REPLACE_NULL = @REPLACE_NULL@ REPLACE_OBSTACK_PRINTF = @REPLACE_OBSTACK_PRINTF@ REPLACE_OPEN = @REPLACE_OPEN@ REPLACE_OPENAT = @REPLACE_OPENAT@ REPLACE_PERROR = @REPLACE_PERROR@ REPLACE_POPEN = @REPLACE_POPEN@ REPLACE_PREAD = @REPLACE_PREAD@ REPLACE_PRINTF = @REPLACE_PRINTF@ REPLACE_PUTENV = @REPLACE_PUTENV@ REPLACE_READLINK = @REPLACE_READLINK@ REPLACE_REALPATH = @REPLACE_REALPATH@ REPLACE_REMOVE = @REPLACE_REMOVE@ REPLACE_RENAME = @REPLACE_RENAME@ REPLACE_RENAMEAT = @REPLACE_RENAMEAT@ REPLACE_RMDIR = @REPLACE_RMDIR@ REPLACE_ROUND = @REPLACE_ROUND@ REPLACE_ROUNDF = @REPLACE_ROUNDF@ REPLACE_ROUNDL = @REPLACE_ROUNDL@ REPLACE_SELECT = @REPLACE_SELECT@ REPLACE_SETENV = @REPLACE_SETENV@ REPLACE_SIGNBIT = @REPLACE_SIGNBIT@ REPLACE_SIGNBIT_USING_GCC = @REPLACE_SIGNBIT_USING_GCC@ REPLACE_SLEEP = @REPLACE_SLEEP@ REPLACE_SNPRINTF = @REPLACE_SNPRINTF@ REPLACE_SPRINTF = @REPLACE_SPRINTF@ REPLACE_STAT = @REPLACE_STAT@ REPLACE_STDIO_WRITE_FUNCS = @REPLACE_STDIO_WRITE_FUNCS@ REPLACE_STRCASESTR = @REPLACE_STRCASESTR@ REPLACE_STRDUP = @REPLACE_STRDUP@ REPLACE_STRERROR = @REPLACE_STRERROR@ REPLACE_STRNDUP = @REPLACE_STRNDUP@ REPLACE_STRPTIME = @REPLACE_STRPTIME@ REPLACE_STRSIGNAL = @REPLACE_STRSIGNAL@ REPLACE_STRSTR = @REPLACE_STRSTR@ REPLACE_STRTOD = @REPLACE_STRTOD@ REPLACE_STRTOK_R = @REPLACE_STRTOK_R@ REPLACE_SYMLINK = @REPLACE_SYMLINK@ REPLACE_TIMEGM = @REPLACE_TIMEGM@ REPLACE_TRUNCL = @REPLACE_TRUNCL@ REPLACE_UNLINK = @REPLACE_UNLINK@ REPLACE_UNLINKAT = @REPLACE_UNLINKAT@ REPLACE_UNSETENV = @REPLACE_UNSETENV@ REPLACE_USLEEP = @REPLACE_USLEEP@ REPLACE_UTIMENSAT = @REPLACE_UTIMENSAT@ REPLACE_VASPRINTF = @REPLACE_VASPRINTF@ REPLACE_VDPRINTF = @REPLACE_VDPRINTF@ REPLACE_VFPRINTF = @REPLACE_VFPRINTF@ REPLACE_VPRINTF = @REPLACE_VPRINTF@ REPLACE_VSNPRINTF = @REPLACE_VSNPRINTF@ REPLACE_VSPRINTF = @REPLACE_VSPRINTF@ REPLACE_WCRTOMB = @REPLACE_WCRTOMB@ REPLACE_WCSNRTOMBS = @REPLACE_WCSNRTOMBS@ REPLACE_WCSRTOMBS = @REPLACE_WCSRTOMBS@ REPLACE_WCTOB = @REPLACE_WCTOB@ REPLACE_WCWIDTH = @REPLACE_WCWIDTH@ REPLACE_WRITE = @REPLACE_WRITE@ RUBY = @RUBY@ RUBY_CCFLAGS = @RUBY_CCFLAGS@ RUBY_EXEC_PREFIX = @RUBY_EXEC_PREFIX@ RUBY_INCLUDES = @RUBY_INCLUDES@ RUBY_LIBS = @RUBY_LIBS@ RUBY_PLATFORM = @RUBY_PLATFORM@ RUBY_PREFIX = @RUBY_PREFIX@ RUBY_VERSION = @RUBY_VERSION@ SED = @SED@ SERVENT_LIB = @SERVENT_LIB@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ SIG_ATOMIC_T_SUFFIX = @SIG_ATOMIC_T_SUFFIX@ SIZE_T_SUFFIX = @SIZE_T_SUFFIX@ STDBOOL_H = @STDBOOL_H@ STDDEF_H = @STDDEF_H@ STDINT_H = @STDINT_H@ STRIP = @STRIP@ SWIG = @SWIG@ SYSCONFDIR = @SYSCONFDIR@ SYS_IOCTL_H_HAVE_WINSOCK2_H = @SYS_IOCTL_H_HAVE_WINSOCK2_H@ SYS_IOCTL_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS = @SYS_IOCTL_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS@ SYS_SOCKET_H = @SYS_SOCKET_H@ SYS_TIME_H_DEFINES_STRUCT_TIMESPEC = @SYS_TIME_H_DEFINES_STRUCT_TIMESPEC@ TIME_H_DEFINES_STRUCT_TIMESPEC = @TIME_H_DEFINES_STRUCT_TIMESPEC@ UNDEFINE_STRTOK_R = @UNDEFINE_STRTOK_R@ UNISTD_H_HAVE_WINSOCK2_H = @UNISTD_H_HAVE_WINSOCK2_H@ UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS = @UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS@ VALGRIND = @VALGRIND@ VERSION = @VERSION@ WCHAR_T_SUFFIX = @WCHAR_T_SUFFIX@ WCTYPE_H = @WCTYPE_H@ WINT_T_SUFFIX = @WINT_T_SUFFIX@ YACC = @YACC@ YFLAGS = @YFLAGS@ YIELD_LIB = @YIELD_LIB@ __PRELUDE_64BIT_FORMAT_PREFIX = @__PRELUDE_64BIT_FORMAT_PREFIX@ __PRELUDE_HAVE_64BIT_LONG = @__PRELUDE_HAVE_64BIT_LONG@ __PRELUDE_HAVE_INTTYPES_H = @__PRELUDE_HAVE_INTTYPES_H@ __PRELUDE_HAVE_STDINT_H = @__PRELUDE_HAVE_STDINT_H@ __PRELUDE_STDINT_HAVE_UINT16 = @__PRELUDE_STDINT_HAVE_UINT16@ __PRELUDE_STDINT_HAVE_UINT32 = @__PRELUDE_STDINT_HAVE_UINT32@ __PRELUDE_STDINT_HAVE_UINT64 = @__PRELUDE_STDINT_HAVE_UINT64@ __PRELUDE_STDINT_HAVE_UINT8 = @__PRELUDE_STDINT_HAVE_UINT8@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ gl_LIBOBJS = @gl_LIBOBJS@ gl_LTLIBOBJS = @gl_LTLIBOBJS@ gltests_LIBOBJS = @gltests_LIBOBJS@ gltests_LTLIBOBJS = @gltests_LTLIBOBJS@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ lt_ECHO = @lt_ECHO@ ltdl_LIBOBJS = @ltdl_LIBOBJS@ ltdl_LTLIBOBJS = @ltdl_LTLIBOBJS@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ pkgrbexecdir = @pkgrbexecdir@ pkgrubydir = @pkgrubydir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ rbexecdir = @rbexecdir@ rubydir = @rubydir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sys_symbol_underscore = @sys_symbol_underscore@ sysconfdir = @sysconfdir@ target = @target@ target_alias = @target_alias@ target_cpu = @target_cpu@ target_os = @target_os@ target_vendor = @target_vendor@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ @HAVE_PYTHON_TRUE@EXTRA_DIST = libprelude-python.i prelude.py _prelude.c all: all-am .SUFFIXES: $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu bindings/low-level/python/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu bindings/low-level/python/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): setup.py: $(top_builddir)/config.status $(srcdir)/setup.py.in cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs tags: TAGS TAGS: ctags: CTAGS CTAGS: distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile installdirs: install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." @HAVE_PYTHON_FALSE@clean-local: @HAVE_PYTHON_FALSE@install-exec-hook: @HAVE_PYTHON_FALSE@uninstall-hook: clean: clean-am clean-am: clean-generic clean-libtool clean-local mostlyclean-am distclean: distclean-am -rm -f Makefile distclean-am: clean-am distclean-generic dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: @$(NORMAL_INSTALL) $(MAKE) $(AM_MAKEFLAGS) install-exec-hook install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-generic mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: @$(NORMAL_INSTALL) $(MAKE) $(AM_MAKEFLAGS) uninstall-hook .MAKE: install-am install-exec-am install-strip uninstall-am .PHONY: all all-am check check-am clean clean-generic clean-libtool \ clean-local distclean distclean-generic distclean-libtool \ distdir dvi dvi-am html html-am info info-am install \ install-am install-data install-data-am install-dvi \ install-dvi-am install-exec install-exec-am install-exec-hook \ install-html install-html-am install-info install-info-am \ install-man install-pdf install-pdf-am install-ps \ install-ps-am install-strip installcheck installcheck-am \ installdirs maintainer-clean maintainer-clean-generic \ mostlyclean mostlyclean-generic mostlyclean-libtool pdf pdf-am \ ps ps-am uninstall uninstall-am uninstall-hook @HAVE_PYTHON_TRUE@all-am: python-build @HAVE_PYTHON_TRUE@python-build: _prelude.c @HAVE_PYTHON_TRUE@ CC="$(BINDINGS_CC)" $(PYTHON) setup.py build @HAVE_PYTHON_TRUE@install-exec-hook: @HAVE_PYTHON_TRUE@ $(PYTHON) setup.py install `test -n "$(DESTDIR)" && echo --root $(DESTDIR)` @HAVE_PYTHON_TRUE@uninstall-hook: @HAVE_PYTHON_TRUE@ $(PYTHON) setup.py uninstall `test -n "$(DESTDIR)" && echo --root $(DESTDIR)` @HAVE_PYTHON_TRUE@clean-local: @HAVE_PYTHON_TRUE@ $(PYTHON) setup.py clean -a @HAVE_PYTHON_TRUE@_prelude.c: $(top_srcdir)/bindings/low-level/libprelude.i libprelude-python.i @HAVE_PYTHON_TRUE@@HAVE_SWIG_TRUE@ $(SWIG) -I$(top_srcdir)/bindings -I$(top_srcdir)/src/include -I$(top_srcdir)/src/libprelude-error -o $@ -python -noproxy -interface _prelude -module _prelude $(top_srcdir)/bindings/low-level/libprelude.i -include $(top_srcdir)/git.mk # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: libprelude-1.0.0/bindings/low-level/python/setup.py.in0000664000076400007640000000476611330563446017757 00000000000000import sys, os from os.path import abspath, exists import shutil from distutils.sysconfig import get_python_lib from distutils.core import setup, Extension FILES_TO_BE_COPIED = ("_prelude.c", "prelude.py") def split_args(s): import re return re.split("\s+", s.strip()) def get_root(): try: return sys.argv[sys.argv.index("--root") + 1] except ValueError: return "" def is_system_wide_install(): return os.access(get_python_lib(), os.W_OK) def builddir_is_srcdir(): return abspath("@top_srcdir@") == abspath("@top_builddir@") def pre_install(): if not is_system_wide_install(): sys.argv.extend(["--prefix", "@prefix@"]) def pre_build(): if not builddir_is_srcdir(): for file in FILES_TO_BE_COPIED: src = "@top_srcdir@/bindings/low-level/python/" + file dst = "@top_builddir@/bindings/low-level/python/" + file if not exists(dst): shutil.copy(src, dst) def pre_clean(): if not builddir_is_srcdir(): for file in FILES_TO_BE_COPIED: exists(file) and os.remove(file) def uninstall(): if is_system_wide_install(): prefix = None else: prefix = "@prefix@" for f in "prelude.py", "prelude.pyc", "_prelude.so": file = get_root() + "/" + get_python_lib(prefix=prefix) + "/" + f exists(file) and os.remove(file) file = get_root() + "/" + get_python_lib(plat_specific=True, prefix=prefix) + "/" + f exists(file) and os.remove(file) sys.exit(0) commands = { "install": pre_install, "build": pre_build, "clean": pre_clean, "uninstall": uninstall, } if len(sys.argv) > 1 and commands.has_key(sys.argv[1]): commands[sys.argv[1]]() setup(name="prelude", version="@VERSION@", description="Low-level Python bindings for the Prelude Library", author="PreludeIDS Technologies", url="http://www.prelude-ids.com", package_dir={'prelude': '@top_srcdir@/bindings/low-level/python'}, py_modules=["prelude"], ext_modules=[Extension("_prelude", ["_prelude.c"], extra_compile_args=split_args("-I@top_builddir@ -I@top_srcdir@/src/include -I@top_builddir@/src/include -I@top_builddir@/src/libprelude-error -I@top_srcdir@/bindings"), library_dirs=[ "@top_builddir@/src/.libs/" ], extra_link_args=split_args("-lprelude @LIBPRELUDE_LIBS@ @LIBADD_DL@ @LTLIBTHREAD@"))]) libprelude-1.0.0/bindings/low-level/python/prelude.py0000664000076400007640000000044311202225026017621 00000000000000from _prelude import * class PreludeError(Exception): def __init__(self, errno, strerror=None): self.errno = errno self._strerror = strerror def __str__(self): if self._strerror: return self._strerror return prelude_strerror(self.errno) libprelude-1.0.0/bindings/low-level/libprelude.i0000664000076400007640000001367711330537773016625 00000000000000/***** * * Copyright (C) 2003, 2004, 2005 PreludeIDS Technologies. All Rights Reserved. * Author: Nicolas Delon * * This file is part of the Prelude library. * * 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; see the file COPYING. If not, write to * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. * *****/ #define inline %{ #include #include #include #include #include "prelude.h" #include "prelude-log.h" #include "prelude-msg.h" #include "prelude-option.h" #include "prelude-option-wide.h" #include "idmef.h" #include "idmef-message-write.h" #include "idmef-message-print.h" #include "idmef-additional-data.h" #include "idmef-tree-wrap.h" #include "prelude-inttypes.h" %} %constant int IDMEF_LIST_APPEND = IDMEF_LIST_APPEND; %constant int IDMEF_LIST_PREPEND = IDMEF_LIST_PREPEND; typedef char int8_t; typedef unsigned char uint8_t; typedef short int16_t; typedef unsigned short uint16_t; typedef int int32_t; typedef unsigned int uint32_t; typedef long long int64_t; typedef unsigned long long uint64_t; %ignore prelude_error_t; typedef signed int prelude_error_t; typedef enum { PRELUDE_BOOL_TRUE = TRUE, PRELUDE_BOOL_FALSE = FALSE } prelude_bool_t; %typemap(in, numinputs=0) (uint64_t *source_id, uint32_t *request_id, void **value) (uint64_t tmp_source_id, uint32_t tmp_request_id, void *tmp_value) { tmp_source_id = 0; tmp_request_id = 0; $1 = &tmp_source_id; $2 = &tmp_request_id; $3 = &tmp_value; }; %include idmef-value-class-mapping.i #ifdef SWIGPYTHON %include libprelude-python.i #endif /* ! SWIGPYTHON */ #ifdef SWIGPERL %include perl/libprelude_perl.i #endif /* ! SWIGPERL */ /* * Double pointer typemap */ %apply SWIGTYPE **OUTPARAM { prelude_client_t **, prelude_client_profile_t **, prelude_msgbuf_t **, prelude_msg_t **, prelude_connection_t **, idmef_path_t **, idmef_value_t **, idmef_criteria_t **, idmef_time_t **, idmef_data_t ** }; %apply SWIGTYPE **OUTPARAM { idmef_additional_data_t **, idmef_reference_t **, idmef_classification_t **, idmef_user_id_t **, idmef_user_t **, idmef_address_t **, idmef_process_t **, idmef_web_service_t **, idmef_snmp_service_t **, idmef_service_t **, idmef_node_t **, idmef_source_t **, idmef_file_access_t **, idmef_inode_t **, idmef_linkage_t **, idmef_checksum_t **, idmef_file_t **, idmef_target_t **, idmef_analyzer_t **, idmef_alertident_t **, idmef_impact_t **, idmef_action_t **, idmef_confidence_t **, idmef_assessment_t **, idmef_tool_alert_t **, idmef_correlation_alert_t **, idmef_overflow_alert_t **, idmef_alert_t **, idmef_heartbeat_t **, idmef_message_t ** }; /* * Check for nil input */ %apply SWIGTYPE *INPARAM { idmef_additional_data_t *, idmef_reference_t *, idmef_classification_t *, idmef_user_id_t *, idmef_user_t *, idmef_address_t *, idmef_process_t *, idmef_web_service_t *, idmef_snmp_service_t *, idmef_service_t *, idmef_node_t *, idmef_source_t *, idmef_file_access_t *, idmef_inode_t *, idmef_linkage_t *, idmef_checksum_t *, idmef_file_t *, idmef_target_t *, idmef_analyzer_t *, idmef_alertident_t **, idmef_impact_t *, idmef_action_t *, idmef_confidence_t *, idmef_assessment_t *, idmef_tool_alert_t *, idmef_correlation_alert_t *, idmef_overflow_alert_t *, idmef_alert_t *, idmef_heartbeat_t *, idmef_message_t *, prelude_client_t *, prelude_client_profile_t *, prelude_msgbuf_t *, prelude_msg_t *, prelude_connection_t *, idmef_path_t *, idmef_value_t *, idmef_criteria_t *, idmef_time_t *, idmef_data_t * }; /* the following typemaps are used to allow NULL pointers to be passed * to _get_next_* functions */ %apply SWIGTYPE *LISTEDPARAM { idmef_reference_t *reference_cur, idmef_user_id_t *user_id_cur, prelude_string_t *prelude_string_cur, idmef_address_t *address_cur, idmef_file_access_t *file_access_cur, idmef_linkage_t *linkage_cur, idmef_checksum_t *checksum_cur, idmef_file_t *file_cur, idmef_action_t *action_cur, idmef_alertident_t *alertident_cur, idmef_analyzer_t *analyzer_cur, idmef_source_t *source_cur, idmef_target_t *target_cur, idmef_additional_data_t *additional_data_cur }; /* For functions returning pointer to integer, return the integer * or the NULL equivalent directly */ %apply INTPOINTER * { int8_t *, int16_t *, int32_t * }; %apply UINTPOINTER * { uint8_t *, uint16_t *, uint32_t * }; %apply INT64POINTER * { int64_t * }; %apply UINT64POINTER * { uint64_t * }; %ignore idmef_path_new_v; %ignore prelude_string_vprintf; %ignore _prelude_log_v; %ignore prelude_error_verbose_make_v; %include "prelude.h" %include "prelude-client.h" %include "prelude-client-profile.h" %include "idmef-tree-wrap.h" %include "idmef-value.h" %include "idmef-path.h" %include "idmef-time.h" %include "idmef-data.h" %include "idmef-criteria.h" %include "idmef-message-read.h" %include "idmef-message-write.h" %include "idmef-additional-data.h" %include "idmef-value-type.h" %include "idmef-class.h" %include "prelude-connection.h" %include "prelude-connection-pool.h" %include "prelude-option.h" %include "prelude-option-wide.h" %include "prelude-msg.h" %include "prelude-message-id.h" %include "prelude-log.h" %include "prelude-msgbuf.h" %include "prelude-timer.h" %include "prelude-error.h" typedef signed int prelude_error_t; libprelude-1.0.0/bindings/low-level/Makefile.am0000664000076400007640000000467111330537773016352 00000000000000BINDING_DEPENDS=libprelude.i perl/libprelude_perl.i idmef-value-class-mapping.i $(top_srcdir)/src/include/prelude-client.h $(top_srcdir)/src/include/idmef-tree-wrap.h $(top_srcdir)/src/include/idmef-value.h $(top_srcdir)/src/include/idmef-path.h $(top_srcdir)/src/include/idmef-time.h $(top_srcdir)/src/include/idmef-data.h $(top_srcdir)/src/include/prelude-string.h $(top_srcdir)/src/include/idmef-criteria.h $(top_srcdir)/src/include/prelude-msgbuf.h $(top_srcdir)/src/include/idmef-message-write.h $(top_srcdir)/src/include/idmef-message-print.h $(top_srcdir)/src/include/idmef-value-type.h $(top_srcdir)/src/include/idmef-class.h $(top_srcdir)/src/include/prelude-connection.h $(top_srcdir)/src/include/prelude-option.h $(top_srcdir)/src/include/prelude-option-wide.h $(top_srcdir)/src/include/prelude-message-id.h $(top_srcdir)/src/include/prelude-log.h SUBDIRS = python EXTRA_DIST = libprelude.i perl/libprelude_perl.i idmef-value-class-mapping.i perl/Makefile.PL.in perl/Prelude.c perl/Prelude.pm CLEANFILES = perl/pm_to_blib perl/Prelude.o perl/blib python/build MAINTAINERCLEANFILES = perl/Makefile \ perl/Makefile.old \ perl/Prelude.bs \ perl/Prelude.c \ python/_prelude.c all-am: perl if HAVE_PERL perl: perl-build else perl: endif if HAVE_PERL # # Workaround invalid Makefile generated by MakeMaker when UTF-8 is enabled. # perl-makefile: cd perl && LANG="" DESTDIR=$(DESTDIR) LIBDIR=$(libdir) $(PERL) Makefile.PL @PERL_EXTRA_PARAMS@ CC="$(BINDINGS_CC)" else perl-makefile: endif # proxy classes are an option for swig <= 1.3.19 and are activated by default with swig > 1.3.19 # as we don't want proxy classes, we must explicitly tell swig > 1.3.19 (that support the -noproxy option) # to not generate them perl/Prelude.c: $(BINDING_DEPENDS) if HAVE_SWIG $(SWIG) -I$(top_srcdir)/bindings -I$(top_srcdir)/src/include -I$(top_srcdir)/src/libprelude-error -o $@ -perl5 -nopm \ `$(SWIG) -perl5 -help 2>&1 | grep noproxy > /dev/null && echo -noproxy` libprelude.i endif perl-build: perl/Prelude.c perl-makefile cd perl && $(MAKE) LD_RUN_PATH="" install-exec-hook: perl-makefile if HAVE_PERL cd perl && $(MAKE) LD_RUN_PATH="" install endif uninstall-hook: perl-makefile if HAVE_PERL cd perl && $(MAKE) uninstall endif clean-local: if HAVE_PERL cd perl && if test -f Makefile; then $(MAKE) clean; fi endif -include $(top_srcdir)/git.mk libprelude-1.0.0/bindings/low-level/Makefile.in0000664000076400007640000014640211347714453016362 00000000000000# Makefile.in generated by automake 1.11.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, # Inc. # This Makefile.in 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. @SET_MAKE@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ target_triplet = @target@ subdir = bindings/low-level DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/libmissing/m4/00gnulib.m4 \ $(top_srcdir)/libmissing/m4/alloca.m4 \ $(top_srcdir)/libmissing/m4/arpa_inet_h.m4 \ $(top_srcdir)/libmissing/m4/btowc.m4 \ $(top_srcdir)/libmissing/m4/close.m4 \ $(top_srcdir)/libmissing/m4/codeset.m4 \ $(top_srcdir)/libmissing/m4/cond.m4 \ $(top_srcdir)/libmissing/m4/dos.m4 \ $(top_srcdir)/libmissing/m4/dup2.m4 \ $(top_srcdir)/libmissing/m4/errno_h.m4 \ $(top_srcdir)/libmissing/m4/exponentd.m4 \ $(top_srcdir)/libmissing/m4/exponentf.m4 \ $(top_srcdir)/libmissing/m4/exponentl.m4 \ $(top_srcdir)/libmissing/m4/extensions.m4 \ $(top_srcdir)/libmissing/m4/fclose.m4 \ $(top_srcdir)/libmissing/m4/fcntl-o.m4 \ $(top_srcdir)/libmissing/m4/fcntl_h.m4 \ $(top_srcdir)/libmissing/m4/float_h.m4 \ $(top_srcdir)/libmissing/m4/fopen.m4 \ $(top_srcdir)/libmissing/m4/fpieee.m4 \ $(top_srcdir)/libmissing/m4/frexp.m4 \ $(top_srcdir)/libmissing/m4/frexpl.m4 \ $(top_srcdir)/libmissing/m4/fseeko.m4 \ $(top_srcdir)/libmissing/m4/ftw.m4 \ $(top_srcdir)/libmissing/m4/getaddrinfo.m4 \ $(top_srcdir)/libmissing/m4/getdelim.m4 \ $(top_srcdir)/libmissing/m4/gethostname.m4 \ $(top_srcdir)/libmissing/m4/getline.m4 \ $(top_srcdir)/libmissing/m4/getpagesize.m4 \ $(top_srcdir)/libmissing/m4/getpass.m4 \ $(top_srcdir)/libmissing/m4/gettimeofday.m4 \ $(top_srcdir)/libmissing/m4/glibc21.m4 \ $(top_srcdir)/libmissing/m4/gnulib-common.m4 \ $(top_srcdir)/libmissing/m4/gnulib-comp.m4 \ $(top_srcdir)/libmissing/m4/gnulib-tool.m4 \ $(top_srcdir)/libmissing/m4/hostent.m4 \ $(top_srcdir)/libmissing/m4/include_next.m4 \ $(top_srcdir)/libmissing/m4/inet_ntop.m4 \ $(top_srcdir)/libmissing/m4/inet_pton.m4 \ $(top_srcdir)/libmissing/m4/intmax_t.m4 \ $(top_srcdir)/libmissing/m4/inttypes_h.m4 \ $(top_srcdir)/libmissing/m4/isnand.m4 \ $(top_srcdir)/libmissing/m4/isnanf.m4 \ $(top_srcdir)/libmissing/m4/isnanl.m4 \ $(top_srcdir)/libmissing/m4/langinfo_h.m4 \ $(top_srcdir)/libmissing/m4/ldexpl.m4 \ $(top_srcdir)/libmissing/m4/lib-ld.m4 \ $(top_srcdir)/libmissing/m4/lib-link.m4 \ $(top_srcdir)/libmissing/m4/lib-prefix.m4 \ $(top_srcdir)/libmissing/m4/localcharset.m4 \ $(top_srcdir)/libmissing/m4/locale-fr.m4 \ $(top_srcdir)/libmissing/m4/locale-ja.m4 \ $(top_srcdir)/libmissing/m4/locale-tr.m4 \ $(top_srcdir)/libmissing/m4/locale-zh.m4 \ $(top_srcdir)/libmissing/m4/lock.m4 \ $(top_srcdir)/libmissing/m4/longlong.m4 \ $(top_srcdir)/libmissing/m4/lseek.m4 \ $(top_srcdir)/libmissing/m4/lstat.m4 \ $(top_srcdir)/libmissing/m4/malloc.m4 \ $(top_srcdir)/libmissing/m4/math_h.m4 \ $(top_srcdir)/libmissing/m4/mbrtowc.m4 \ $(top_srcdir)/libmissing/m4/mbsinit.m4 \ $(top_srcdir)/libmissing/m4/mbstate_t.m4 \ $(top_srcdir)/libmissing/m4/memchr.m4 \ $(top_srcdir)/libmissing/m4/memmem.m4 \ $(top_srcdir)/libmissing/m4/minmax.m4 \ $(top_srcdir)/libmissing/m4/mktime.m4 \ $(top_srcdir)/libmissing/m4/mmap-anon.m4 \ $(top_srcdir)/libmissing/m4/mode_t.m4 \ $(top_srcdir)/libmissing/m4/multiarch.m4 \ $(top_srcdir)/libmissing/m4/netdb_h.m4 \ $(top_srcdir)/libmissing/m4/netinet_in_h.m4 \ $(top_srcdir)/libmissing/m4/nl_langinfo.m4 \ $(top_srcdir)/libmissing/m4/nocrash.m4 \ $(top_srcdir)/libmissing/m4/onceonly.m4 \ $(top_srcdir)/libmissing/m4/open.m4 \ $(top_srcdir)/libmissing/m4/pathmax.m4 \ $(top_srcdir)/libmissing/m4/perror.m4 \ $(top_srcdir)/libmissing/m4/poll.m4 \ $(top_srcdir)/libmissing/m4/printf-frexp.m4 \ $(top_srcdir)/libmissing/m4/printf-frexpl.m4 \ $(top_srcdir)/libmissing/m4/printf.m4 \ $(top_srcdir)/libmissing/m4/realloc.m4 \ $(top_srcdir)/libmissing/m4/regex.m4 \ $(top_srcdir)/libmissing/m4/relocatable-lib.m4 \ $(top_srcdir)/libmissing/m4/select.m4 \ $(top_srcdir)/libmissing/m4/servent.m4 \ $(top_srcdir)/libmissing/m4/signal_h.m4 \ $(top_srcdir)/libmissing/m4/signalblocking.m4 \ $(top_srcdir)/libmissing/m4/signbit.m4 \ $(top_srcdir)/libmissing/m4/size_max.m4 \ $(top_srcdir)/libmissing/m4/sleep.m4 \ $(top_srcdir)/libmissing/m4/snprintf-posix.m4 \ $(top_srcdir)/libmissing/m4/snprintf.m4 \ $(top_srcdir)/libmissing/m4/sockets.m4 \ $(top_srcdir)/libmissing/m4/socklen.m4 \ $(top_srcdir)/libmissing/m4/sockpfaf.m4 \ $(top_srcdir)/libmissing/m4/ssize_t.m4 \ $(top_srcdir)/libmissing/m4/stat.m4 \ $(top_srcdir)/libmissing/m4/stdbool.m4 \ $(top_srcdir)/libmissing/m4/stddef_h.m4 \ $(top_srcdir)/libmissing/m4/stdint.m4 \ $(top_srcdir)/libmissing/m4/stdint_h.m4 \ $(top_srcdir)/libmissing/m4/stdio_h.m4 \ $(top_srcdir)/libmissing/m4/stdlib_h.m4 \ $(top_srcdir)/libmissing/m4/strcase.m4 \ $(top_srcdir)/libmissing/m4/strcasestr.m4 \ $(top_srcdir)/libmissing/m4/strdup.m4 \ $(top_srcdir)/libmissing/m4/strerror.m4 \ $(top_srcdir)/libmissing/m4/string_h.m4 \ $(top_srcdir)/libmissing/m4/strings_h.m4 \ $(top_srcdir)/libmissing/m4/strndup.m4 \ $(top_srcdir)/libmissing/m4/strnlen.m4 \ $(top_srcdir)/libmissing/m4/strptime.m4 \ $(top_srcdir)/libmissing/m4/strsep.m4 \ $(top_srcdir)/libmissing/m4/symlink.m4 \ $(top_srcdir)/libmissing/m4/sys_ioctl_h.m4 \ $(top_srcdir)/libmissing/m4/sys_select_h.m4 \ $(top_srcdir)/libmissing/m4/sys_socket_h.m4 \ $(top_srcdir)/libmissing/m4/sys_stat_h.m4 \ $(top_srcdir)/libmissing/m4/sys_time_h.m4 \ $(top_srcdir)/libmissing/m4/sys_utsname_h.m4 \ $(top_srcdir)/libmissing/m4/thread.m4 \ $(top_srcdir)/libmissing/m4/threadlib.m4 \ $(top_srcdir)/libmissing/m4/time_h.m4 \ $(top_srcdir)/libmissing/m4/time_r.m4 \ $(top_srcdir)/libmissing/m4/timegm.m4 \ $(top_srcdir)/libmissing/m4/tls.m4 \ $(top_srcdir)/libmissing/m4/tm_gmtoff.m4 \ $(top_srcdir)/libmissing/m4/uname.m4 \ $(top_srcdir)/libmissing/m4/ungetc.m4 \ $(top_srcdir)/libmissing/m4/unistd_h.m4 \ $(top_srcdir)/libmissing/m4/vasnprintf.m4 \ $(top_srcdir)/libmissing/m4/vsnprintf-posix.m4 \ $(top_srcdir)/libmissing/m4/vsnprintf.m4 \ $(top_srcdir)/libmissing/m4/warn-on-use.m4 \ $(top_srcdir)/libmissing/m4/wchar.m4 \ $(top_srcdir)/libmissing/m4/wchar_t.m4 \ $(top_srcdir)/libmissing/m4/wcrtomb.m4 \ $(top_srcdir)/libmissing/m4/wctob.m4 \ $(top_srcdir)/libmissing/m4/wctype.m4 \ $(top_srcdir)/libmissing/m4/wint_t.m4 \ $(top_srcdir)/libmissing/m4/write.m4 \ $(top_srcdir)/libmissing/m4/xsize.m4 \ $(top_srcdir)/libmissing/m4/yield.m4 \ $(top_srcdir)/m4/ac_compile_check_sizeof.m4 \ $(top_srcdir)/m4/am_path_ruby.m4 $(top_srcdir)/m4/argz.m4 \ $(top_srcdir)/m4/as-ac-expand.m4 \ $(top_srcdir)/m4/ax_c_check_flag.m4 \ $(top_srcdir)/m4/ax_check_aligned_access_required.m4 \ $(top_srcdir)/m4/ax_create_prelude_inttypes_h.m4 \ $(top_srcdir)/m4/ax_ld_check_flag.m4 \ $(top_srcdir)/m4/gtk-doc.m4 $(top_srcdir)/m4/libgcrypt.m4 \ $(top_srcdir)/m4/libgnutls-extra.m4 \ $(top_srcdir)/m4/libgnutls.m4 $(top_srcdir)/m4/libtool.m4 \ $(top_srcdir)/m4/ltdl.m4 $(top_srcdir)/m4/ltoptions.m4 \ $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/m4/pkg.m4 \ $(top_srcdir)/configure.in am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = SOURCES = DIST_SOURCES = RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \ html-recursive info-recursive install-data-recursive \ install-dvi-recursive install-exec-recursive \ install-html-recursive install-info-recursive \ install-pdf-recursive install-ps-recursive install-recursive \ installcheck-recursive installdirs-recursive pdf-recursive \ ps-recursive uninstall-recursive RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ distclean-recursive maintainer-clean-recursive AM_RECURSIVE_TARGETS = $(RECURSIVE_TARGETS:-recursive=) \ $(RECURSIVE_CLEAN_TARGETS:-recursive=) tags TAGS ctags CTAGS \ distdir ETAGS = etags CTAGS = ctags DIST_SUBDIRS = $(SUBDIRS) DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) am__relativize = \ dir0=`pwd`; \ sed_first='s,^\([^/]*\)/.*$$,\1,'; \ sed_rest='s,^[^/]*/*,,'; \ sed_last='s,^.*/\([^/]*\)$$,\1,'; \ sed_butlast='s,/*[^/]*$$,,'; \ while test -n "$$dir1"; do \ first=`echo "$$dir1" | sed -e "$$sed_first"`; \ if test "$$first" != "."; then \ if test "$$first" = ".."; then \ dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \ dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \ else \ first2=`echo "$$dir2" | sed -e "$$sed_first"`; \ if test "$$first2" = "$$first"; then \ dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \ else \ dir2="../$$dir2"; \ fi; \ dir0="$$dir0"/"$$first"; \ fi; \ fi; \ dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \ done; \ reldir="$$dir2" ACLOCAL = @ACLOCAL@ ALLOCA = @ALLOCA@ ALLOCA_H = @ALLOCA_H@ AMTAR = @AMTAR@ APPLE_UNIVERSAL_BUILD = @APPLE_UNIVERSAL_BUILD@ AR = @AR@ ARGZ_H = @ARGZ_H@ AS = @AS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ BINDINGS_CC = @BINDINGS_CC@ BINDIR = @BINDIR@ BITSIZEOF_PTRDIFF_T = @BITSIZEOF_PTRDIFF_T@ BITSIZEOF_SIG_ATOMIC_T = @BITSIZEOF_SIG_ATOMIC_T@ BITSIZEOF_SIZE_T = @BITSIZEOF_SIZE_T@ BITSIZEOF_WCHAR_T = @BITSIZEOF_WCHAR_T@ BITSIZEOF_WINT_T = @BITSIZEOF_WINT_T@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CC_FOR_BUILD = @CC_FOR_BUILD@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EMULTIHOP_HIDDEN = @EMULTIHOP_HIDDEN@ EMULTIHOP_VALUE = @EMULTIHOP_VALUE@ ENOLINK_HIDDEN = @ENOLINK_HIDDEN@ ENOLINK_VALUE = @ENOLINK_VALUE@ EOVERFLOW_HIDDEN = @EOVERFLOW_HIDDEN@ EOVERFLOW_VALUE = @EOVERFLOW_VALUE@ ERRNO_H = @ERRNO_H@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ FLOAT_H = @FLOAT_H@ GETADDRINFO_LIB = @GETADDRINFO_LIB@ GETHOSTNAME_LIB = @GETHOSTNAME_LIB@ GLIBC21 = @GLIBC21@ GNULIB_ACCEPT = @GNULIB_ACCEPT@ GNULIB_ACCEPT4 = @GNULIB_ACCEPT4@ GNULIB_ACOSL = @GNULIB_ACOSL@ GNULIB_ASINL = @GNULIB_ASINL@ GNULIB_ATANL = @GNULIB_ATANL@ GNULIB_ATOLL = @GNULIB_ATOLL@ GNULIB_BIND = @GNULIB_BIND@ GNULIB_BTOWC = @GNULIB_BTOWC@ GNULIB_CALLOC_POSIX = @GNULIB_CALLOC_POSIX@ GNULIB_CANONICALIZE_FILE_NAME = @GNULIB_CANONICALIZE_FILE_NAME@ GNULIB_CEILF = @GNULIB_CEILF@ GNULIB_CEILL = @GNULIB_CEILL@ GNULIB_CHOWN = @GNULIB_CHOWN@ GNULIB_CLOSE = @GNULIB_CLOSE@ GNULIB_CONNECT = @GNULIB_CONNECT@ GNULIB_COSL = @GNULIB_COSL@ GNULIB_DPRINTF = @GNULIB_DPRINTF@ GNULIB_DUP2 = @GNULIB_DUP2@ GNULIB_DUP3 = @GNULIB_DUP3@ GNULIB_ENVIRON = @GNULIB_ENVIRON@ GNULIB_EUIDACCESS = @GNULIB_EUIDACCESS@ GNULIB_EXPL = @GNULIB_EXPL@ GNULIB_FACCESSAT = @GNULIB_FACCESSAT@ GNULIB_FCHDIR = @GNULIB_FCHDIR@ GNULIB_FCHMODAT = @GNULIB_FCHMODAT@ GNULIB_FCHOWNAT = @GNULIB_FCHOWNAT@ GNULIB_FCLOSE = @GNULIB_FCLOSE@ GNULIB_FCNTL = @GNULIB_FCNTL@ GNULIB_FFLUSH = @GNULIB_FFLUSH@ GNULIB_FLOORF = @GNULIB_FLOORF@ GNULIB_FLOORL = @GNULIB_FLOORL@ GNULIB_FOPEN = @GNULIB_FOPEN@ GNULIB_FPRINTF = @GNULIB_FPRINTF@ GNULIB_FPRINTF_POSIX = @GNULIB_FPRINTF_POSIX@ GNULIB_FPURGE = @GNULIB_FPURGE@ GNULIB_FPUTC = @GNULIB_FPUTC@ GNULIB_FPUTS = @GNULIB_FPUTS@ GNULIB_FREOPEN = @GNULIB_FREOPEN@ GNULIB_FREXP = @GNULIB_FREXP@ GNULIB_FREXPL = @GNULIB_FREXPL@ GNULIB_FSEEK = @GNULIB_FSEEK@ GNULIB_FSEEKO = @GNULIB_FSEEKO@ GNULIB_FSTATAT = @GNULIB_FSTATAT@ GNULIB_FSYNC = @GNULIB_FSYNC@ GNULIB_FTELL = @GNULIB_FTELL@ GNULIB_FTELLO = @GNULIB_FTELLO@ GNULIB_FTRUNCATE = @GNULIB_FTRUNCATE@ GNULIB_FUTIMENS = @GNULIB_FUTIMENS@ GNULIB_FWRITE = @GNULIB_FWRITE@ GNULIB_GETADDRINFO = @GNULIB_GETADDRINFO@ GNULIB_GETCWD = @GNULIB_GETCWD@ GNULIB_GETDELIM = @GNULIB_GETDELIM@ GNULIB_GETDOMAINNAME = @GNULIB_GETDOMAINNAME@ GNULIB_GETDTABLESIZE = @GNULIB_GETDTABLESIZE@ GNULIB_GETGROUPS = @GNULIB_GETGROUPS@ GNULIB_GETHOSTNAME = @GNULIB_GETHOSTNAME@ GNULIB_GETLINE = @GNULIB_GETLINE@ GNULIB_GETLOADAVG = @GNULIB_GETLOADAVG@ GNULIB_GETLOGIN = @GNULIB_GETLOGIN@ GNULIB_GETLOGIN_R = @GNULIB_GETLOGIN_R@ GNULIB_GETPAGESIZE = @GNULIB_GETPAGESIZE@ GNULIB_GETPEERNAME = @GNULIB_GETPEERNAME@ GNULIB_GETSOCKNAME = @GNULIB_GETSOCKNAME@ GNULIB_GETSOCKOPT = @GNULIB_GETSOCKOPT@ GNULIB_GETSUBOPT = @GNULIB_GETSUBOPT@ GNULIB_GETTIMEOFDAY = @GNULIB_GETTIMEOFDAY@ GNULIB_GETUSERSHELL = @GNULIB_GETUSERSHELL@ GNULIB_INET_NTOP = @GNULIB_INET_NTOP@ GNULIB_INET_PTON = @GNULIB_INET_PTON@ GNULIB_IOCTL = @GNULIB_IOCTL@ GNULIB_ISFINITE = @GNULIB_ISFINITE@ GNULIB_ISINF = @GNULIB_ISINF@ GNULIB_ISNAN = @GNULIB_ISNAN@ GNULIB_ISNAND = @GNULIB_ISNAND@ GNULIB_ISNANF = @GNULIB_ISNANF@ GNULIB_ISNANL = @GNULIB_ISNANL@ GNULIB_LCHMOD = @GNULIB_LCHMOD@ GNULIB_LCHOWN = @GNULIB_LCHOWN@ GNULIB_LDEXPL = @GNULIB_LDEXPL@ GNULIB_LINK = @GNULIB_LINK@ GNULIB_LINKAT = @GNULIB_LINKAT@ GNULIB_LISTEN = @GNULIB_LISTEN@ GNULIB_LOGL = @GNULIB_LOGL@ GNULIB_LSEEK = @GNULIB_LSEEK@ GNULIB_LSTAT = @GNULIB_LSTAT@ GNULIB_MALLOC_POSIX = @GNULIB_MALLOC_POSIX@ GNULIB_MBRLEN = @GNULIB_MBRLEN@ GNULIB_MBRTOWC = @GNULIB_MBRTOWC@ GNULIB_MBSCASECMP = @GNULIB_MBSCASECMP@ GNULIB_MBSCASESTR = @GNULIB_MBSCASESTR@ GNULIB_MBSCHR = @GNULIB_MBSCHR@ GNULIB_MBSCSPN = @GNULIB_MBSCSPN@ GNULIB_MBSINIT = @GNULIB_MBSINIT@ GNULIB_MBSLEN = @GNULIB_MBSLEN@ GNULIB_MBSNCASECMP = @GNULIB_MBSNCASECMP@ GNULIB_MBSNLEN = @GNULIB_MBSNLEN@ GNULIB_MBSNRTOWCS = @GNULIB_MBSNRTOWCS@ GNULIB_MBSPBRK = @GNULIB_MBSPBRK@ GNULIB_MBSPCASECMP = @GNULIB_MBSPCASECMP@ GNULIB_MBSRCHR = @GNULIB_MBSRCHR@ GNULIB_MBSRTOWCS = @GNULIB_MBSRTOWCS@ GNULIB_MBSSEP = @GNULIB_MBSSEP@ GNULIB_MBSSPN = @GNULIB_MBSSPN@ GNULIB_MBSSTR = @GNULIB_MBSSTR@ GNULIB_MBSTOK_R = @GNULIB_MBSTOK_R@ GNULIB_MEMCHR = @GNULIB_MEMCHR@ GNULIB_MEMMEM = @GNULIB_MEMMEM@ GNULIB_MEMPCPY = @GNULIB_MEMPCPY@ GNULIB_MEMRCHR = @GNULIB_MEMRCHR@ GNULIB_MKDIRAT = @GNULIB_MKDIRAT@ GNULIB_MKDTEMP = @GNULIB_MKDTEMP@ GNULIB_MKFIFO = @GNULIB_MKFIFO@ GNULIB_MKFIFOAT = @GNULIB_MKFIFOAT@ GNULIB_MKNOD = @GNULIB_MKNOD@ GNULIB_MKNODAT = @GNULIB_MKNODAT@ GNULIB_MKOSTEMP = @GNULIB_MKOSTEMP@ GNULIB_MKOSTEMPS = @GNULIB_MKOSTEMPS@ GNULIB_MKSTEMP = @GNULIB_MKSTEMP@ GNULIB_MKSTEMPS = @GNULIB_MKSTEMPS@ GNULIB_NL_LANGINFO = @GNULIB_NL_LANGINFO@ GNULIB_OBSTACK_PRINTF = @GNULIB_OBSTACK_PRINTF@ GNULIB_OBSTACK_PRINTF_POSIX = @GNULIB_OBSTACK_PRINTF_POSIX@ GNULIB_OPEN = @GNULIB_OPEN@ GNULIB_OPENAT = @GNULIB_OPENAT@ GNULIB_PERROR = @GNULIB_PERROR@ GNULIB_PIPE2 = @GNULIB_PIPE2@ GNULIB_POPEN = @GNULIB_POPEN@ GNULIB_PREAD = @GNULIB_PREAD@ GNULIB_PRINTF = @GNULIB_PRINTF@ GNULIB_PRINTF_POSIX = @GNULIB_PRINTF_POSIX@ GNULIB_PUTC = @GNULIB_PUTC@ GNULIB_PUTCHAR = @GNULIB_PUTCHAR@ GNULIB_PUTENV = @GNULIB_PUTENV@ GNULIB_PUTS = @GNULIB_PUTS@ GNULIB_RANDOM_R = @GNULIB_RANDOM_R@ GNULIB_RAWMEMCHR = @GNULIB_RAWMEMCHR@ GNULIB_READLINK = @GNULIB_READLINK@ GNULIB_READLINKAT = @GNULIB_READLINKAT@ GNULIB_REALLOC_POSIX = @GNULIB_REALLOC_POSIX@ GNULIB_REALPATH = @GNULIB_REALPATH@ GNULIB_RECV = @GNULIB_RECV@ GNULIB_RECVFROM = @GNULIB_RECVFROM@ GNULIB_REMOVE = @GNULIB_REMOVE@ GNULIB_RENAME = @GNULIB_RENAME@ GNULIB_RENAMEAT = @GNULIB_RENAMEAT@ GNULIB_RMDIR = @GNULIB_RMDIR@ GNULIB_ROUND = @GNULIB_ROUND@ GNULIB_ROUNDF = @GNULIB_ROUNDF@ GNULIB_ROUNDL = @GNULIB_ROUNDL@ GNULIB_RPMATCH = @GNULIB_RPMATCH@ GNULIB_SELECT = @GNULIB_SELECT@ GNULIB_SEND = @GNULIB_SEND@ GNULIB_SENDTO = @GNULIB_SENDTO@ GNULIB_SETENV = @GNULIB_SETENV@ GNULIB_SETSOCKOPT = @GNULIB_SETSOCKOPT@ GNULIB_SHUTDOWN = @GNULIB_SHUTDOWN@ GNULIB_SIGACTION = @GNULIB_SIGACTION@ GNULIB_SIGNAL_H_SIGPIPE = @GNULIB_SIGNAL_H_SIGPIPE@ GNULIB_SIGNBIT = @GNULIB_SIGNBIT@ GNULIB_SIGPROCMASK = @GNULIB_SIGPROCMASK@ GNULIB_SINL = @GNULIB_SINL@ GNULIB_SLEEP = @GNULIB_SLEEP@ GNULIB_SNPRINTF = @GNULIB_SNPRINTF@ GNULIB_SOCKET = @GNULIB_SOCKET@ GNULIB_SPRINTF_POSIX = @GNULIB_SPRINTF_POSIX@ GNULIB_SQRTL = @GNULIB_SQRTL@ GNULIB_STAT = @GNULIB_STAT@ GNULIB_STDIO_H_SIGPIPE = @GNULIB_STDIO_H_SIGPIPE@ GNULIB_STPCPY = @GNULIB_STPCPY@ GNULIB_STPNCPY = @GNULIB_STPNCPY@ GNULIB_STRCASESTR = @GNULIB_STRCASESTR@ GNULIB_STRCHRNUL = @GNULIB_STRCHRNUL@ GNULIB_STRDUP = @GNULIB_STRDUP@ GNULIB_STRERROR = @GNULIB_STRERROR@ GNULIB_STRNDUP = @GNULIB_STRNDUP@ GNULIB_STRNLEN = @GNULIB_STRNLEN@ GNULIB_STRPBRK = @GNULIB_STRPBRK@ GNULIB_STRSEP = @GNULIB_STRSEP@ GNULIB_STRSIGNAL = @GNULIB_STRSIGNAL@ GNULIB_STRSTR = @GNULIB_STRSTR@ GNULIB_STRTOD = @GNULIB_STRTOD@ GNULIB_STRTOK_R = @GNULIB_STRTOK_R@ GNULIB_STRTOLL = @GNULIB_STRTOLL@ GNULIB_STRTOULL = @GNULIB_STRTOULL@ GNULIB_STRVERSCMP = @GNULIB_STRVERSCMP@ GNULIB_SYMLINK = @GNULIB_SYMLINK@ GNULIB_SYMLINKAT = @GNULIB_SYMLINKAT@ GNULIB_TANL = @GNULIB_TANL@ GNULIB_TRUNC = @GNULIB_TRUNC@ GNULIB_TRUNCF = @GNULIB_TRUNCF@ GNULIB_TRUNCL = @GNULIB_TRUNCL@ GNULIB_UNAME = @GNULIB_UNAME@ GNULIB_UNISTD_H_GETOPT = @GNULIB_UNISTD_H_GETOPT@ GNULIB_UNISTD_H_SIGPIPE = @GNULIB_UNISTD_H_SIGPIPE@ GNULIB_UNLINK = @GNULIB_UNLINK@ GNULIB_UNLINKAT = @GNULIB_UNLINKAT@ GNULIB_UNSETENV = @GNULIB_UNSETENV@ GNULIB_USLEEP = @GNULIB_USLEEP@ GNULIB_UTIMENSAT = @GNULIB_UTIMENSAT@ GNULIB_VASPRINTF = @GNULIB_VASPRINTF@ GNULIB_VDPRINTF = @GNULIB_VDPRINTF@ GNULIB_VFPRINTF = @GNULIB_VFPRINTF@ GNULIB_VFPRINTF_POSIX = @GNULIB_VFPRINTF_POSIX@ GNULIB_VPRINTF = @GNULIB_VPRINTF@ GNULIB_VPRINTF_POSIX = @GNULIB_VPRINTF_POSIX@ GNULIB_VSNPRINTF = @GNULIB_VSNPRINTF@ GNULIB_VSPRINTF_POSIX = @GNULIB_VSPRINTF_POSIX@ GNULIB_WCRTOMB = @GNULIB_WCRTOMB@ GNULIB_WCSNRTOMBS = @GNULIB_WCSNRTOMBS@ GNULIB_WCSRTOMBS = @GNULIB_WCSRTOMBS@ GNULIB_WCTOB = @GNULIB_WCTOB@ GNULIB_WCWIDTH = @GNULIB_WCWIDTH@ GNULIB_WRITE = @GNULIB_WRITE@ GREP = @GREP@ GTKDOC_CHECK = @GTKDOC_CHECK@ HAVE_ACCEPT4 = @HAVE_ACCEPT4@ HAVE_ACOSL = @HAVE_ACOSL@ HAVE_ARPA_INET_H = @HAVE_ARPA_INET_H@ HAVE_ASINL = @HAVE_ASINL@ HAVE_ATANL = @HAVE_ATANL@ HAVE_ATOLL = @HAVE_ATOLL@ HAVE_BTOWC = @HAVE_BTOWC@ HAVE_CALLOC_POSIX = @HAVE_CALLOC_POSIX@ HAVE_CANONICALIZE_FILE_NAME = @HAVE_CANONICALIZE_FILE_NAME@ HAVE_CHOWN = @HAVE_CHOWN@ HAVE_COSL = @HAVE_COSL@ HAVE_CXX = @HAVE_CXX@ HAVE_DECL_ACOSL = @HAVE_DECL_ACOSL@ HAVE_DECL_ASINL = @HAVE_DECL_ASINL@ HAVE_DECL_ATANL = @HAVE_DECL_ATANL@ HAVE_DECL_COSL = @HAVE_DECL_COSL@ HAVE_DECL_ENVIRON = @HAVE_DECL_ENVIRON@ HAVE_DECL_EXPL = @HAVE_DECL_EXPL@ HAVE_DECL_FPURGE = @HAVE_DECL_FPURGE@ HAVE_DECL_FREEADDRINFO = @HAVE_DECL_FREEADDRINFO@ HAVE_DECL_FREXPL = @HAVE_DECL_FREXPL@ HAVE_DECL_GAI_STRERROR = @HAVE_DECL_GAI_STRERROR@ HAVE_DECL_GETADDRINFO = @HAVE_DECL_GETADDRINFO@ HAVE_DECL_GETDELIM = @HAVE_DECL_GETDELIM@ HAVE_DECL_GETLINE = @HAVE_DECL_GETLINE@ HAVE_DECL_GETLOADAVG = @HAVE_DECL_GETLOADAVG@ HAVE_DECL_GETLOGIN_R = @HAVE_DECL_GETLOGIN_R@ HAVE_DECL_GETNAMEINFO = @HAVE_DECL_GETNAMEINFO@ HAVE_DECL_INET_NTOP = @HAVE_DECL_INET_NTOP@ HAVE_DECL_INET_PTON = @HAVE_DECL_INET_PTON@ HAVE_DECL_LDEXPL = @HAVE_DECL_LDEXPL@ HAVE_DECL_LOGL = @HAVE_DECL_LOGL@ HAVE_DECL_MEMMEM = @HAVE_DECL_MEMMEM@ HAVE_DECL_MEMRCHR = @HAVE_DECL_MEMRCHR@ HAVE_DECL_OBSTACK_PRINTF = @HAVE_DECL_OBSTACK_PRINTF@ HAVE_DECL_SINL = @HAVE_DECL_SINL@ HAVE_DECL_SNPRINTF = @HAVE_DECL_SNPRINTF@ HAVE_DECL_SQRTL = @HAVE_DECL_SQRTL@ HAVE_DECL_STRDUP = @HAVE_DECL_STRDUP@ HAVE_DECL_STRERROR = @HAVE_DECL_STRERROR@ HAVE_DECL_STRNCASECMP = @HAVE_DECL_STRNCASECMP@ HAVE_DECL_STRNDUP = @HAVE_DECL_STRNDUP@ HAVE_DECL_STRNLEN = @HAVE_DECL_STRNLEN@ HAVE_DECL_STRSIGNAL = @HAVE_DECL_STRSIGNAL@ HAVE_DECL_STRTOK_R = @HAVE_DECL_STRTOK_R@ HAVE_DECL_TANL = @HAVE_DECL_TANL@ HAVE_DECL_TRUNC = @HAVE_DECL_TRUNC@ HAVE_DECL_TRUNCF = @HAVE_DECL_TRUNCF@ HAVE_DECL_VSNPRINTF = @HAVE_DECL_VSNPRINTF@ HAVE_DECL_WCTOB = @HAVE_DECL_WCTOB@ HAVE_DECL_WCWIDTH = @HAVE_DECL_WCWIDTH@ HAVE_DPRINTF = @HAVE_DPRINTF@ HAVE_DUP2 = @HAVE_DUP2@ HAVE_DUP3 = @HAVE_DUP3@ HAVE_EUIDACCESS = @HAVE_EUIDACCESS@ HAVE_EXPL = @HAVE_EXPL@ HAVE_FACCESSAT = @HAVE_FACCESSAT@ HAVE_FCHMODAT = @HAVE_FCHMODAT@ HAVE_FCHOWNAT = @HAVE_FCHOWNAT@ HAVE_FCNTL = @HAVE_FCNTL@ HAVE_FSTATAT = @HAVE_FSTATAT@ HAVE_FSYNC = @HAVE_FSYNC@ HAVE_FTRUNCATE = @HAVE_FTRUNCATE@ HAVE_FUTIMENS = @HAVE_FUTIMENS@ HAVE_GETDOMAINNAME = @HAVE_GETDOMAINNAME@ HAVE_GETDTABLESIZE = @HAVE_GETDTABLESIZE@ HAVE_GETGROUPS = @HAVE_GETGROUPS@ HAVE_GETHOSTNAME = @HAVE_GETHOSTNAME@ HAVE_GETLOGIN = @HAVE_GETLOGIN@ HAVE_GETPAGESIZE = @HAVE_GETPAGESIZE@ HAVE_GETSUBOPT = @HAVE_GETSUBOPT@ HAVE_GETUSERSHELL = @HAVE_GETUSERSHELL@ HAVE_INTTYPES_H = @HAVE_INTTYPES_H@ HAVE_ISNAND = @HAVE_ISNAND@ HAVE_ISNANF = @HAVE_ISNANF@ HAVE_ISNANL = @HAVE_ISNANL@ HAVE_ISWCNTRL = @HAVE_ISWCNTRL@ HAVE_LANGINFO_CODESET = @HAVE_LANGINFO_CODESET@ HAVE_LANGINFO_ERA = @HAVE_LANGINFO_ERA@ HAVE_LANGINFO_H = @HAVE_LANGINFO_H@ HAVE_LCHMOD = @HAVE_LCHMOD@ HAVE_LCHOWN = @HAVE_LCHOWN@ HAVE_LINK = @HAVE_LINK@ HAVE_LINKAT = @HAVE_LINKAT@ HAVE_LOGL = @HAVE_LOGL@ HAVE_LONG_LONG_INT = @HAVE_LONG_LONG_INT@ HAVE_LSTAT = @HAVE_LSTAT@ HAVE_MALLOC_POSIX = @HAVE_MALLOC_POSIX@ HAVE_MBRLEN = @HAVE_MBRLEN@ HAVE_MBRTOWC = @HAVE_MBRTOWC@ HAVE_MBSINIT = @HAVE_MBSINIT@ HAVE_MBSLEN = @HAVE_MBSLEN@ HAVE_MBSNRTOWCS = @HAVE_MBSNRTOWCS@ HAVE_MBSRTOWCS = @HAVE_MBSRTOWCS@ HAVE_MEMPCPY = @HAVE_MEMPCPY@ HAVE_MKDIRAT = @HAVE_MKDIRAT@ HAVE_MKDTEMP = @HAVE_MKDTEMP@ HAVE_MKFIFO = @HAVE_MKFIFO@ HAVE_MKFIFOAT = @HAVE_MKFIFOAT@ HAVE_MKNOD = @HAVE_MKNOD@ HAVE_MKNODAT = @HAVE_MKNODAT@ HAVE_MKOSTEMP = @HAVE_MKOSTEMP@ HAVE_MKOSTEMPS = @HAVE_MKOSTEMPS@ HAVE_MKSTEMPS = @HAVE_MKSTEMPS@ HAVE_NETDB_H = @HAVE_NETDB_H@ HAVE_NETINET_IN_H = @HAVE_NETINET_IN_H@ HAVE_NL_LANGINFO = @HAVE_NL_LANGINFO@ HAVE_OPENAT = @HAVE_OPENAT@ HAVE_OS_H = @HAVE_OS_H@ HAVE_PIPE2 = @HAVE_PIPE2@ HAVE_POSIX_SIGNALBLOCKING = @HAVE_POSIX_SIGNALBLOCKING@ HAVE_PREAD = @HAVE_PREAD@ HAVE_RANDOM_H = @HAVE_RANDOM_H@ HAVE_RANDOM_R = @HAVE_RANDOM_R@ HAVE_RAWMEMCHR = @HAVE_RAWMEMCHR@ HAVE_READLINK = @HAVE_READLINK@ HAVE_READLINKAT = @HAVE_READLINKAT@ HAVE_REALLOC_POSIX = @HAVE_REALLOC_POSIX@ HAVE_REALPATH = @HAVE_REALPATH@ HAVE_RENAMEAT = @HAVE_RENAMEAT@ HAVE_RPMATCH = @HAVE_RPMATCH@ HAVE_SA_FAMILY_T = @HAVE_SA_FAMILY_T@ HAVE_SETENV = @HAVE_SETENV@ HAVE_SIGACTION = @HAVE_SIGACTION@ HAVE_SIGINFO_T = @HAVE_SIGINFO_T@ HAVE_SIGNED_SIG_ATOMIC_T = @HAVE_SIGNED_SIG_ATOMIC_T@ HAVE_SIGNED_WCHAR_T = @HAVE_SIGNED_WCHAR_T@ HAVE_SIGNED_WINT_T = @HAVE_SIGNED_WINT_T@ HAVE_SIGSET_T = @HAVE_SIGSET_T@ HAVE_SINL = @HAVE_SINL@ HAVE_SLEEP = @HAVE_SLEEP@ HAVE_SQRTL = @HAVE_SQRTL@ HAVE_STDINT_H = @HAVE_STDINT_H@ HAVE_STPCPY = @HAVE_STPCPY@ HAVE_STPNCPY = @HAVE_STPNCPY@ HAVE_STRCASECMP = @HAVE_STRCASECMP@ HAVE_STRCASESTR = @HAVE_STRCASESTR@ HAVE_STRCHRNUL = @HAVE_STRCHRNUL@ HAVE_STRPBRK = @HAVE_STRPBRK@ HAVE_STRSEP = @HAVE_STRSEP@ HAVE_STRTOD = @HAVE_STRTOD@ HAVE_STRTOLL = @HAVE_STRTOLL@ HAVE_STRTOULL = @HAVE_STRTOULL@ HAVE_STRUCT_ADDRINFO = @HAVE_STRUCT_ADDRINFO@ HAVE_STRUCT_RANDOM_DATA = @HAVE_STRUCT_RANDOM_DATA@ HAVE_STRUCT_SIGACTION_SA_SIGACTION = @HAVE_STRUCT_SIGACTION_SA_SIGACTION@ HAVE_STRUCT_SOCKADDR_STORAGE = @HAVE_STRUCT_SOCKADDR_STORAGE@ HAVE_STRUCT_TIMEVAL = @HAVE_STRUCT_TIMEVAL@ HAVE_STRUCT_UTSNAME = @HAVE_STRUCT_UTSNAME@ HAVE_STRVERSCMP = @HAVE_STRVERSCMP@ HAVE_SYMLINK = @HAVE_SYMLINK@ HAVE_SYMLINKAT = @HAVE_SYMLINKAT@ HAVE_SYS_BITYPES_H = @HAVE_SYS_BITYPES_H@ HAVE_SYS_INTTYPES_H = @HAVE_SYS_INTTYPES_H@ HAVE_SYS_IOCTL_H = @HAVE_SYS_IOCTL_H@ HAVE_SYS_LOADAVG_H = @HAVE_SYS_LOADAVG_H@ HAVE_SYS_PARAM_H = @HAVE_SYS_PARAM_H@ HAVE_SYS_SELECT_H = @HAVE_SYS_SELECT_H@ HAVE_SYS_SOCKET_H = @HAVE_SYS_SOCKET_H@ HAVE_SYS_TIME_H = @HAVE_SYS_TIME_H@ HAVE_SYS_TYPES_H = @HAVE_SYS_TYPES_H@ HAVE_SYS_UTSNAME_H = @HAVE_SYS_UTSNAME_H@ HAVE_TANL = @HAVE_TANL@ HAVE_TYPE_VOLATILE_SIG_ATOMIC_T = @HAVE_TYPE_VOLATILE_SIG_ATOMIC_T@ HAVE_UNAME = @HAVE_UNAME@ HAVE_UNISTD_H = @HAVE_UNISTD_H@ HAVE_UNLINKAT = @HAVE_UNLINKAT@ HAVE_UNSETENV = @HAVE_UNSETENV@ HAVE_UNSIGNED_LONG_LONG_INT = @HAVE_UNSIGNED_LONG_LONG_INT@ HAVE_USLEEP = @HAVE_USLEEP@ HAVE_UTIMENSAT = @HAVE_UTIMENSAT@ HAVE_VASPRINTF = @HAVE_VASPRINTF@ HAVE_VDPRINTF = @HAVE_VDPRINTF@ HAVE_WCHAR_H = @HAVE_WCHAR_H@ HAVE_WCHAR_T = @HAVE_WCHAR_T@ HAVE_WCRTOMB = @HAVE_WCRTOMB@ HAVE_WCSNRTOMBS = @HAVE_WCSNRTOMBS@ HAVE_WCSRTOMBS = @HAVE_WCSRTOMBS@ HAVE_WCTYPE_H = @HAVE_WCTYPE_H@ HAVE_WINSOCK2_H = @HAVE_WINSOCK2_H@ HAVE_WINT_T = @HAVE_WINT_T@ HAVE_WS2TCPIP_H = @HAVE_WS2TCPIP_H@ HAVE__BOOL = @HAVE__BOOL@ HOSTENT_LIB = @HOSTENT_LIB@ HTML_DIR = @HTML_DIR@ INCLTDL = @INCLTDL@ INCLUDE_NEXT = @INCLUDE_NEXT@ INCLUDE_NEXT_AS_FIRST_DIRECTIVE = @INCLUDE_NEXT_AS_FIRST_DIRECTIVE@ INET_NTOP_LIB = @INET_NTOP_LIB@ INET_PTON_LIB = @INET_PTON_LIB@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LD = @LD@ LDFLAGS = @LDFLAGS@ LEX = @LEX@ LEXLIB = @LEXLIB@ LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@ LIBADD_DL = @LIBADD_DL@ LIBADD_DLD_LINK = @LIBADD_DLD_LINK@ LIBADD_DLOPEN = @LIBADD_DLOPEN@ LIBADD_SHL_LOAD = @LIBADD_SHL_LOAD@ LIBDIR = @LIBDIR@ LIBGCRYPT_CFLAGS = @LIBGCRYPT_CFLAGS@ LIBGCRYPT_CONFIG = @LIBGCRYPT_CONFIG@ LIBGCRYPT_LIBS = @LIBGCRYPT_LIBS@ LIBGNUTLS_CFLAGS = @LIBGNUTLS_CFLAGS@ LIBGNUTLS_CONFIG = @LIBGNUTLS_CONFIG@ LIBGNUTLS_EXTRA_CFLAGS = @LIBGNUTLS_EXTRA_CFLAGS@ LIBGNUTLS_EXTRA_CONFIG = @LIBGNUTLS_EXTRA_CONFIG@ LIBGNUTLS_EXTRA_LIBS = @LIBGNUTLS_EXTRA_LIBS@ LIBGNUTLS_LIBS = @LIBGNUTLS_LIBS@ LIBINTL = @LIBINTL@ LIBLTDL = @LIBLTDL@ LIBMULTITHREAD = @LIBMULTITHREAD@ LIBOBJS = @LIBOBJS@ LIBPRELUDECPP_SONAME = @LIBPRELUDECPP_SONAME@ LIBPRELUDE_CFLAGS = @LIBPRELUDE_CFLAGS@ LIBPRELUDE_LIBS = @LIBPRELUDE_LIBS@ LIBPRELUDE_SONAME = @LIBPRELUDE_SONAME@ LIBPTH = @LIBPTH@ LIBPTH_PREFIX = @LIBPTH_PREFIX@ LIBS = @LIBS@ LIBSOCKET = @LIBSOCKET@ LIBTESTS_LIBDEPS = @LIBTESTS_LIBDEPS@ LIBTHREAD = @LIBTHREAD@ LIBTOOL = @LIBTOOL@ LIPO = @LIPO@ LN_S = @LN_S@ LOCALCHARSET_TESTS_ENVIRONMENT = @LOCALCHARSET_TESTS_ENVIRONMENT@ LOCALE_FR = @LOCALE_FR@ LOCALE_FR_UTF8 = @LOCALE_FR_UTF8@ LOCALE_JA = @LOCALE_JA@ LOCALE_TR_UTF8 = @LOCALE_TR_UTF8@ LOCALE_ZH_CN = @LOCALE_ZH_CN@ LOCALSTATEDIR = @LOCALSTATEDIR@ LTALLOCA = @LTALLOCA@ LTDLDEPS = @LTDLDEPS@ LTDLINCL = @LTDLINCL@ LTDLOPEN = @LTDLOPEN@ LTLIBINTL = @LTLIBINTL@ LTLIBMULTITHREAD = @LTLIBMULTITHREAD@ LTLIBOBJS = @LTLIBOBJS@ LTLIBPTH = @LTLIBPTH@ LTLIBTHREAD = @LTLIBTHREAD@ LT_CONFIG_H = @LT_CONFIG_H@ LT_DLLOADERS = @LT_DLLOADERS@ LT_DLPREOPEN = @LT_DLPREOPEN@ LUA_CFLAGS = @LUA_CFLAGS@ LUA_CONFIG = @LUA_CONFIG@ LUA_LIBS = @LUA_LIBS@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MKDIR_P = @MKDIR_P@ NETDB_H = @NETDB_H@ NETINET_IN_H = @NETINET_IN_H@ NEXT_ARPA_INET_H = @NEXT_ARPA_INET_H@ NEXT_AS_FIRST_DIRECTIVE_ARPA_INET_H = @NEXT_AS_FIRST_DIRECTIVE_ARPA_INET_H@ NEXT_AS_FIRST_DIRECTIVE_ERRNO_H = @NEXT_AS_FIRST_DIRECTIVE_ERRNO_H@ NEXT_AS_FIRST_DIRECTIVE_FCNTL_H = @NEXT_AS_FIRST_DIRECTIVE_FCNTL_H@ NEXT_AS_FIRST_DIRECTIVE_FLOAT_H = @NEXT_AS_FIRST_DIRECTIVE_FLOAT_H@ NEXT_AS_FIRST_DIRECTIVE_LANGINFO_H = @NEXT_AS_FIRST_DIRECTIVE_LANGINFO_H@ NEXT_AS_FIRST_DIRECTIVE_MATH_H = @NEXT_AS_FIRST_DIRECTIVE_MATH_H@ NEXT_AS_FIRST_DIRECTIVE_NETDB_H = @NEXT_AS_FIRST_DIRECTIVE_NETDB_H@ NEXT_AS_FIRST_DIRECTIVE_NETINET_IN_H = @NEXT_AS_FIRST_DIRECTIVE_NETINET_IN_H@ NEXT_AS_FIRST_DIRECTIVE_SIGNAL_H = @NEXT_AS_FIRST_DIRECTIVE_SIGNAL_H@ NEXT_AS_FIRST_DIRECTIVE_STDDEF_H = @NEXT_AS_FIRST_DIRECTIVE_STDDEF_H@ NEXT_AS_FIRST_DIRECTIVE_STDINT_H = @NEXT_AS_FIRST_DIRECTIVE_STDINT_H@ NEXT_AS_FIRST_DIRECTIVE_STDIO_H = @NEXT_AS_FIRST_DIRECTIVE_STDIO_H@ NEXT_AS_FIRST_DIRECTIVE_STDLIB_H = @NEXT_AS_FIRST_DIRECTIVE_STDLIB_H@ NEXT_AS_FIRST_DIRECTIVE_STRINGS_H = @NEXT_AS_FIRST_DIRECTIVE_STRINGS_H@ NEXT_AS_FIRST_DIRECTIVE_STRING_H = @NEXT_AS_FIRST_DIRECTIVE_STRING_H@ NEXT_AS_FIRST_DIRECTIVE_SYS_IOCTL_H = @NEXT_AS_FIRST_DIRECTIVE_SYS_IOCTL_H@ NEXT_AS_FIRST_DIRECTIVE_SYS_SELECT_H = @NEXT_AS_FIRST_DIRECTIVE_SYS_SELECT_H@ NEXT_AS_FIRST_DIRECTIVE_SYS_SOCKET_H = @NEXT_AS_FIRST_DIRECTIVE_SYS_SOCKET_H@ NEXT_AS_FIRST_DIRECTIVE_SYS_STAT_H = @NEXT_AS_FIRST_DIRECTIVE_SYS_STAT_H@ NEXT_AS_FIRST_DIRECTIVE_SYS_TIME_H = @NEXT_AS_FIRST_DIRECTIVE_SYS_TIME_H@ NEXT_AS_FIRST_DIRECTIVE_SYS_UTSNAME_H = @NEXT_AS_FIRST_DIRECTIVE_SYS_UTSNAME_H@ NEXT_AS_FIRST_DIRECTIVE_TIME_H = @NEXT_AS_FIRST_DIRECTIVE_TIME_H@ NEXT_AS_FIRST_DIRECTIVE_UNISTD_H = @NEXT_AS_FIRST_DIRECTIVE_UNISTD_H@ NEXT_AS_FIRST_DIRECTIVE_WCHAR_H = @NEXT_AS_FIRST_DIRECTIVE_WCHAR_H@ NEXT_AS_FIRST_DIRECTIVE_WCTYPE_H = @NEXT_AS_FIRST_DIRECTIVE_WCTYPE_H@ NEXT_ERRNO_H = @NEXT_ERRNO_H@ NEXT_FCNTL_H = @NEXT_FCNTL_H@ NEXT_FLOAT_H = @NEXT_FLOAT_H@ NEXT_LANGINFO_H = @NEXT_LANGINFO_H@ NEXT_MATH_H = @NEXT_MATH_H@ NEXT_NETDB_H = @NEXT_NETDB_H@ NEXT_NETINET_IN_H = @NEXT_NETINET_IN_H@ NEXT_SIGNAL_H = @NEXT_SIGNAL_H@ NEXT_STDDEF_H = @NEXT_STDDEF_H@ NEXT_STDINT_H = @NEXT_STDINT_H@ NEXT_STDIO_H = @NEXT_STDIO_H@ NEXT_STDLIB_H = @NEXT_STDLIB_H@ NEXT_STRINGS_H = @NEXT_STRINGS_H@ NEXT_STRING_H = @NEXT_STRING_H@ NEXT_SYS_IOCTL_H = @NEXT_SYS_IOCTL_H@ NEXT_SYS_SELECT_H = @NEXT_SYS_SELECT_H@ NEXT_SYS_SOCKET_H = @NEXT_SYS_SOCKET_H@ NEXT_SYS_STAT_H = @NEXT_SYS_STAT_H@ NEXT_SYS_TIME_H = @NEXT_SYS_TIME_H@ NEXT_SYS_UTSNAME_H = @NEXT_SYS_UTSNAME_H@ NEXT_TIME_H = @NEXT_TIME_H@ NEXT_UNISTD_H = @NEXT_UNISTD_H@ NEXT_WCHAR_H = @NEXT_WCHAR_H@ NEXT_WCTYPE_H = @NEXT_WCTYPE_H@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PCFLAGS = @PCFLAGS@ PERL = @PERL@ PERL_EXTRA_PARAMS = @PERL_EXTRA_PARAMS@ PKG_CONFIG = @PKG_CONFIG@ POLL_H = @POLL_H@ PRAGMA_SYSTEM_HEADER = @PRAGMA_SYSTEM_HEADER@ PRELUDE_ADMIN_CFLAGS = @PRELUDE_ADMIN_CFLAGS@ PRELUDE_ADMIN_LIBS = @PRELUDE_ADMIN_LIBS@ PRELUDE_CONFIG_DIR = @PRELUDE_CONFIG_DIR@ PRELUDE_SPOOL_DIR = @PRELUDE_SPOOL_DIR@ PTHREAD_CFLAGS = @PTHREAD_CFLAGS@ PTHREAD_LDFLAGS = @PTHREAD_LDFLAGS@ PTHREAD_LIBS = @PTHREAD_LIBS@ PTRDIFF_T_SUFFIX = @PTRDIFF_T_SUFFIX@ PYTHON = @PYTHON@ RANLIB = @RANLIB@ RELOCATABLE = @RELOCATABLE@ REPLACE_BTOWC = @REPLACE_BTOWC@ REPLACE_CANONICALIZE_FILE_NAME = @REPLACE_CANONICALIZE_FILE_NAME@ REPLACE_CEILF = @REPLACE_CEILF@ REPLACE_CEILL = @REPLACE_CEILL@ REPLACE_CHOWN = @REPLACE_CHOWN@ REPLACE_CLOSE = @REPLACE_CLOSE@ REPLACE_DPRINTF = @REPLACE_DPRINTF@ REPLACE_DUP = @REPLACE_DUP@ REPLACE_DUP2 = @REPLACE_DUP2@ REPLACE_FCHDIR = @REPLACE_FCHDIR@ REPLACE_FCHOWNAT = @REPLACE_FCHOWNAT@ REPLACE_FCLOSE = @REPLACE_FCLOSE@ REPLACE_FCNTL = @REPLACE_FCNTL@ REPLACE_FFLUSH = @REPLACE_FFLUSH@ REPLACE_FLOORF = @REPLACE_FLOORF@ REPLACE_FLOORL = @REPLACE_FLOORL@ REPLACE_FOPEN = @REPLACE_FOPEN@ REPLACE_FPRINTF = @REPLACE_FPRINTF@ REPLACE_FPURGE = @REPLACE_FPURGE@ REPLACE_FREOPEN = @REPLACE_FREOPEN@ REPLACE_FREXP = @REPLACE_FREXP@ REPLACE_FREXPL = @REPLACE_FREXPL@ REPLACE_FSEEK = @REPLACE_FSEEK@ REPLACE_FSEEKO = @REPLACE_FSEEKO@ REPLACE_FSTAT = @REPLACE_FSTAT@ REPLACE_FSTATAT = @REPLACE_FSTATAT@ REPLACE_FTELL = @REPLACE_FTELL@ REPLACE_FTELLO = @REPLACE_FTELLO@ REPLACE_FUTIMENS = @REPLACE_FUTIMENS@ REPLACE_GETCWD = @REPLACE_GETCWD@ REPLACE_GETDELIM = @REPLACE_GETDELIM@ REPLACE_GETGROUPS = @REPLACE_GETGROUPS@ REPLACE_GETLINE = @REPLACE_GETLINE@ REPLACE_GETPAGESIZE = @REPLACE_GETPAGESIZE@ REPLACE_GETTIMEOFDAY = @REPLACE_GETTIMEOFDAY@ REPLACE_HUGE_VAL = @REPLACE_HUGE_VAL@ REPLACE_ISFINITE = @REPLACE_ISFINITE@ REPLACE_ISINF = @REPLACE_ISINF@ REPLACE_ISNAN = @REPLACE_ISNAN@ REPLACE_ISWCNTRL = @REPLACE_ISWCNTRL@ REPLACE_LCHOWN = @REPLACE_LCHOWN@ REPLACE_LDEXPL = @REPLACE_LDEXPL@ REPLACE_LINK = @REPLACE_LINK@ REPLACE_LINKAT = @REPLACE_LINKAT@ REPLACE_LOCALTIME_R = @REPLACE_LOCALTIME_R@ REPLACE_LSEEK = @REPLACE_LSEEK@ REPLACE_LSTAT = @REPLACE_LSTAT@ REPLACE_MBRLEN = @REPLACE_MBRLEN@ REPLACE_MBRTOWC = @REPLACE_MBRTOWC@ REPLACE_MBSINIT = @REPLACE_MBSINIT@ REPLACE_MBSNRTOWCS = @REPLACE_MBSNRTOWCS@ REPLACE_MBSRTOWCS = @REPLACE_MBSRTOWCS@ REPLACE_MBSTATE_T = @REPLACE_MBSTATE_T@ REPLACE_MEMCHR = @REPLACE_MEMCHR@ REPLACE_MEMMEM = @REPLACE_MEMMEM@ REPLACE_MKDIR = @REPLACE_MKDIR@ REPLACE_MKFIFO = @REPLACE_MKFIFO@ REPLACE_MKNOD = @REPLACE_MKNOD@ REPLACE_MKSTEMP = @REPLACE_MKSTEMP@ REPLACE_MKTIME = @REPLACE_MKTIME@ REPLACE_NAN = @REPLACE_NAN@ REPLACE_NANOSLEEP = @REPLACE_NANOSLEEP@ REPLACE_NL_LANGINFO = @REPLACE_NL_LANGINFO@ REPLACE_NULL = @REPLACE_NULL@ REPLACE_OBSTACK_PRINTF = @REPLACE_OBSTACK_PRINTF@ REPLACE_OPEN = @REPLACE_OPEN@ REPLACE_OPENAT = @REPLACE_OPENAT@ REPLACE_PERROR = @REPLACE_PERROR@ REPLACE_POPEN = @REPLACE_POPEN@ REPLACE_PREAD = @REPLACE_PREAD@ REPLACE_PRINTF = @REPLACE_PRINTF@ REPLACE_PUTENV = @REPLACE_PUTENV@ REPLACE_READLINK = @REPLACE_READLINK@ REPLACE_REALPATH = @REPLACE_REALPATH@ REPLACE_REMOVE = @REPLACE_REMOVE@ REPLACE_RENAME = @REPLACE_RENAME@ REPLACE_RENAMEAT = @REPLACE_RENAMEAT@ REPLACE_RMDIR = @REPLACE_RMDIR@ REPLACE_ROUND = @REPLACE_ROUND@ REPLACE_ROUNDF = @REPLACE_ROUNDF@ REPLACE_ROUNDL = @REPLACE_ROUNDL@ REPLACE_SELECT = @REPLACE_SELECT@ REPLACE_SETENV = @REPLACE_SETENV@ REPLACE_SIGNBIT = @REPLACE_SIGNBIT@ REPLACE_SIGNBIT_USING_GCC = @REPLACE_SIGNBIT_USING_GCC@ REPLACE_SLEEP = @REPLACE_SLEEP@ REPLACE_SNPRINTF = @REPLACE_SNPRINTF@ REPLACE_SPRINTF = @REPLACE_SPRINTF@ REPLACE_STAT = @REPLACE_STAT@ REPLACE_STDIO_WRITE_FUNCS = @REPLACE_STDIO_WRITE_FUNCS@ REPLACE_STRCASESTR = @REPLACE_STRCASESTR@ REPLACE_STRDUP = @REPLACE_STRDUP@ REPLACE_STRERROR = @REPLACE_STRERROR@ REPLACE_STRNDUP = @REPLACE_STRNDUP@ REPLACE_STRPTIME = @REPLACE_STRPTIME@ REPLACE_STRSIGNAL = @REPLACE_STRSIGNAL@ REPLACE_STRSTR = @REPLACE_STRSTR@ REPLACE_STRTOD = @REPLACE_STRTOD@ REPLACE_STRTOK_R = @REPLACE_STRTOK_R@ REPLACE_SYMLINK = @REPLACE_SYMLINK@ REPLACE_TIMEGM = @REPLACE_TIMEGM@ REPLACE_TRUNCL = @REPLACE_TRUNCL@ REPLACE_UNLINK = @REPLACE_UNLINK@ REPLACE_UNLINKAT = @REPLACE_UNLINKAT@ REPLACE_UNSETENV = @REPLACE_UNSETENV@ REPLACE_USLEEP = @REPLACE_USLEEP@ REPLACE_UTIMENSAT = @REPLACE_UTIMENSAT@ REPLACE_VASPRINTF = @REPLACE_VASPRINTF@ REPLACE_VDPRINTF = @REPLACE_VDPRINTF@ REPLACE_VFPRINTF = @REPLACE_VFPRINTF@ REPLACE_VPRINTF = @REPLACE_VPRINTF@ REPLACE_VSNPRINTF = @REPLACE_VSNPRINTF@ REPLACE_VSPRINTF = @REPLACE_VSPRINTF@ REPLACE_WCRTOMB = @REPLACE_WCRTOMB@ REPLACE_WCSNRTOMBS = @REPLACE_WCSNRTOMBS@ REPLACE_WCSRTOMBS = @REPLACE_WCSRTOMBS@ REPLACE_WCTOB = @REPLACE_WCTOB@ REPLACE_WCWIDTH = @REPLACE_WCWIDTH@ REPLACE_WRITE = @REPLACE_WRITE@ RUBY = @RUBY@ RUBY_CCFLAGS = @RUBY_CCFLAGS@ RUBY_EXEC_PREFIX = @RUBY_EXEC_PREFIX@ RUBY_INCLUDES = @RUBY_INCLUDES@ RUBY_LIBS = @RUBY_LIBS@ RUBY_PLATFORM = @RUBY_PLATFORM@ RUBY_PREFIX = @RUBY_PREFIX@ RUBY_VERSION = @RUBY_VERSION@ SED = @SED@ SERVENT_LIB = @SERVENT_LIB@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ SIG_ATOMIC_T_SUFFIX = @SIG_ATOMIC_T_SUFFIX@ SIZE_T_SUFFIX = @SIZE_T_SUFFIX@ STDBOOL_H = @STDBOOL_H@ STDDEF_H = @STDDEF_H@ STDINT_H = @STDINT_H@ STRIP = @STRIP@ SWIG = @SWIG@ SYSCONFDIR = @SYSCONFDIR@ SYS_IOCTL_H_HAVE_WINSOCK2_H = @SYS_IOCTL_H_HAVE_WINSOCK2_H@ SYS_IOCTL_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS = @SYS_IOCTL_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS@ SYS_SOCKET_H = @SYS_SOCKET_H@ SYS_TIME_H_DEFINES_STRUCT_TIMESPEC = @SYS_TIME_H_DEFINES_STRUCT_TIMESPEC@ TIME_H_DEFINES_STRUCT_TIMESPEC = @TIME_H_DEFINES_STRUCT_TIMESPEC@ UNDEFINE_STRTOK_R = @UNDEFINE_STRTOK_R@ UNISTD_H_HAVE_WINSOCK2_H = @UNISTD_H_HAVE_WINSOCK2_H@ UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS = @UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS@ VALGRIND = @VALGRIND@ VERSION = @VERSION@ WCHAR_T_SUFFIX = @WCHAR_T_SUFFIX@ WCTYPE_H = @WCTYPE_H@ WINT_T_SUFFIX = @WINT_T_SUFFIX@ YACC = @YACC@ YFLAGS = @YFLAGS@ YIELD_LIB = @YIELD_LIB@ __PRELUDE_64BIT_FORMAT_PREFIX = @__PRELUDE_64BIT_FORMAT_PREFIX@ __PRELUDE_HAVE_64BIT_LONG = @__PRELUDE_HAVE_64BIT_LONG@ __PRELUDE_HAVE_INTTYPES_H = @__PRELUDE_HAVE_INTTYPES_H@ __PRELUDE_HAVE_STDINT_H = @__PRELUDE_HAVE_STDINT_H@ __PRELUDE_STDINT_HAVE_UINT16 = @__PRELUDE_STDINT_HAVE_UINT16@ __PRELUDE_STDINT_HAVE_UINT32 = @__PRELUDE_STDINT_HAVE_UINT32@ __PRELUDE_STDINT_HAVE_UINT64 = @__PRELUDE_STDINT_HAVE_UINT64@ __PRELUDE_STDINT_HAVE_UINT8 = @__PRELUDE_STDINT_HAVE_UINT8@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ gl_LIBOBJS = @gl_LIBOBJS@ gl_LTLIBOBJS = @gl_LTLIBOBJS@ gltests_LIBOBJS = @gltests_LIBOBJS@ gltests_LTLIBOBJS = @gltests_LTLIBOBJS@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ lt_ECHO = @lt_ECHO@ ltdl_LIBOBJS = @ltdl_LIBOBJS@ ltdl_LTLIBOBJS = @ltdl_LTLIBOBJS@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ pkgrbexecdir = @pkgrbexecdir@ pkgrubydir = @pkgrubydir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ rbexecdir = @rbexecdir@ rubydir = @rubydir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sys_symbol_underscore = @sys_symbol_underscore@ sysconfdir = @sysconfdir@ target = @target@ target_alias = @target_alias@ target_cpu = @target_cpu@ target_os = @target_os@ target_vendor = @target_vendor@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ BINDING_DEPENDS = libprelude.i perl/libprelude_perl.i idmef-value-class-mapping.i $(top_srcdir)/src/include/prelude-client.h $(top_srcdir)/src/include/idmef-tree-wrap.h $(top_srcdir)/src/include/idmef-value.h $(top_srcdir)/src/include/idmef-path.h $(top_srcdir)/src/include/idmef-time.h $(top_srcdir)/src/include/idmef-data.h $(top_srcdir)/src/include/prelude-string.h $(top_srcdir)/src/include/idmef-criteria.h $(top_srcdir)/src/include/prelude-msgbuf.h $(top_srcdir)/src/include/idmef-message-write.h $(top_srcdir)/src/include/idmef-message-print.h $(top_srcdir)/src/include/idmef-value-type.h $(top_srcdir)/src/include/idmef-class.h $(top_srcdir)/src/include/prelude-connection.h $(top_srcdir)/src/include/prelude-option.h $(top_srcdir)/src/include/prelude-option-wide.h $(top_srcdir)/src/include/prelude-message-id.h $(top_srcdir)/src/include/prelude-log.h SUBDIRS = python EXTRA_DIST = libprelude.i perl/libprelude_perl.i idmef-value-class-mapping.i perl/Makefile.PL.in perl/Prelude.c perl/Prelude.pm CLEANFILES = perl/pm_to_blib perl/Prelude.o perl/blib python/build MAINTAINERCLEANFILES = perl/Makefile \ perl/Makefile.old \ perl/Prelude.bs \ perl/Prelude.c \ python/_prelude.c all: all-recursive .SUFFIXES: $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu bindings/low-level/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu bindings/low-level/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs # This directory's subdirectories are mostly independent; you can cd # into them and run `make' without going through this Makefile. # To change the values of `make' variables: instead of editing Makefiles, # (1) if the variable is set in `config.status', edit `config.status' # (which will cause the Makefiles to be regenerated when you run `make'); # (2) otherwise, pass the desired values on the `make' command line. $(RECURSIVE_TARGETS): @fail= failcom='exit 1'; \ for f in x $$MAKEFLAGS; do \ case $$f in \ *=* | --[!k]*);; \ *k*) failcom='fail=yes';; \ esac; \ done; \ dot_seen=no; \ target=`echo $@ | sed s/-recursive//`; \ list='$(SUBDIRS)'; for subdir in $$list; do \ echo "Making $$target in $$subdir"; \ if test "$$subdir" = "."; then \ dot_seen=yes; \ local_target="$$target-am"; \ else \ local_target="$$target"; \ fi; \ ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ || eval $$failcom; \ done; \ if test "$$dot_seen" = "no"; then \ $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ fi; test -z "$$fail" $(RECURSIVE_CLEAN_TARGETS): @fail= failcom='exit 1'; \ for f in x $$MAKEFLAGS; do \ case $$f in \ *=* | --[!k]*);; \ *k*) failcom='fail=yes';; \ esac; \ done; \ dot_seen=no; \ case "$@" in \ distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ *) list='$(SUBDIRS)' ;; \ esac; \ rev=''; for subdir in $$list; do \ if test "$$subdir" = "."; then :; else \ rev="$$subdir $$rev"; \ fi; \ done; \ rev="$$rev ."; \ target=`echo $@ | sed s/-recursive//`; \ for subdir in $$rev; do \ echo "Making $$target in $$subdir"; \ if test "$$subdir" = "."; then \ local_target="$$target-am"; \ else \ local_target="$$target"; \ fi; \ ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ || eval $$failcom; \ done && test -z "$$fail" tags-recursive: list='$(SUBDIRS)'; for subdir in $$list; do \ test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \ done ctags-recursive: list='$(SUBDIRS)'; for subdir in $$list; do \ test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \ done ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ mkid -fID $$unique tags: TAGS TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) set x; \ here=`pwd`; \ if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ include_option=--etags-include; \ empty_fix=.; \ else \ include_option=--include; \ empty_fix=; \ fi; \ list='$(SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ test ! -f $$subdir/TAGS || \ set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \ fi; \ done; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: CTAGS CTAGS: ctags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ test -d "$(distdir)/$$subdir" \ || $(MKDIR_P) "$(distdir)/$$subdir" \ || exit 1; \ fi; \ done @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ dir1=$$subdir; dir2="$(distdir)/$$subdir"; \ $(am__relativize); \ new_distdir=$$reldir; \ dir1=$$subdir; dir2="$(top_distdir)"; \ $(am__relativize); \ new_top_distdir=$$reldir; \ echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \ echo " am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \ ($(am__cd) $$subdir && \ $(MAKE) $(AM_MAKEFLAGS) \ top_distdir="$$new_top_distdir" \ distdir="$$new_distdir" \ am__remove_distdir=: \ am__skip_length_check=: \ am__skip_mode_fix=: \ distdir) \ || exit 1; \ fi; \ done check-am: all-am check: check-recursive all-am: Makefile installdirs: installdirs-recursive installdirs-am: install: install-recursive install-exec: install-exec-recursive install-data: install-data-recursive uninstall: uninstall-recursive install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-recursive install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES) distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES) clean: clean-recursive clean-am: clean-generic clean-libtool clean-local mostlyclean-am distclean: distclean-recursive -rm -f Makefile distclean-am: clean-am distclean-generic distclean-tags dvi: dvi-recursive dvi-am: html: html-recursive html-am: info: info-recursive info-am: install-data-am: install-dvi: install-dvi-recursive install-dvi-am: install-exec-am: @$(NORMAL_INSTALL) $(MAKE) $(AM_MAKEFLAGS) install-exec-hook install-html: install-html-recursive install-html-am: install-info: install-info-recursive install-info-am: install-man: install-pdf: install-pdf-recursive install-pdf-am: install-ps: install-ps-recursive install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-recursive -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-recursive mostlyclean-am: mostlyclean-generic mostlyclean-libtool pdf: pdf-recursive pdf-am: ps: ps-recursive ps-am: uninstall-am: @$(NORMAL_INSTALL) $(MAKE) $(AM_MAKEFLAGS) uninstall-hook .MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) ctags-recursive \ install-am install-exec-am install-strip tags-recursive \ uninstall-am .PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \ all all-am check check-am clean clean-generic clean-libtool \ clean-local ctags ctags-recursive distclean distclean-generic \ distclean-libtool distclean-tags distdir dvi dvi-am html \ html-am info info-am install install-am install-data \ install-data-am install-dvi install-dvi-am install-exec \ install-exec-am install-exec-hook install-html install-html-am \ install-info install-info-am install-man install-pdf \ install-pdf-am install-ps install-ps-am install-strip \ installcheck installcheck-am installdirs installdirs-am \ maintainer-clean maintainer-clean-generic mostlyclean \ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ tags tags-recursive uninstall uninstall-am uninstall-hook all-am: perl @HAVE_PERL_TRUE@perl: perl-build @HAVE_PERL_FALSE@perl: # # Workaround invalid Makefile generated by MakeMaker when UTF-8 is enabled. # @HAVE_PERL_TRUE@perl-makefile: @HAVE_PERL_TRUE@ cd perl && LANG="" DESTDIR=$(DESTDIR) LIBDIR=$(libdir) $(PERL) Makefile.PL @PERL_EXTRA_PARAMS@ CC="$(BINDINGS_CC)" @HAVE_PERL_FALSE@perl-makefile: # proxy classes are an option for swig <= 1.3.19 and are activated by default with swig > 1.3.19 # as we don't want proxy classes, we must explicitly tell swig > 1.3.19 (that support the -noproxy option) # to not generate them perl/Prelude.c: $(BINDING_DEPENDS) @HAVE_SWIG_TRUE@ $(SWIG) -I$(top_srcdir)/bindings -I$(top_srcdir)/src/include -I$(top_srcdir)/src/libprelude-error -o $@ -perl5 -nopm \ @HAVE_SWIG_TRUE@ `$(SWIG) -perl5 -help 2>&1 | grep noproxy > /dev/null && echo -noproxy` libprelude.i perl-build: perl/Prelude.c perl-makefile cd perl && $(MAKE) LD_RUN_PATH="" install-exec-hook: perl-makefile @HAVE_PERL_TRUE@ cd perl && $(MAKE) LD_RUN_PATH="" install uninstall-hook: perl-makefile @HAVE_PERL_TRUE@ cd perl && $(MAKE) uninstall clean-local: @HAVE_PERL_TRUE@ cd perl && if test -f Makefile; then $(MAKE) clean; fi -include $(top_srcdir)/git.mk # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: libprelude-1.0.0/bindings/low-level/idmef-value-class-mapping.i0000664000076400007640000000664411202225026021403 00000000000000 /***** * * Copyright (C) 2005 PreludeIDS Technologies. All Rights Reserved. * Author: Yoann Vandoorselaere * * This file is part of the Prelude library. * * 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; see the file COPYING. If not, write to * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. * *****/ /* Auto-generated by the GenerateIDMEFValueClassSwigMapping package */ %{ void *swig_idmef_value_get_descriptor(idmef_value_t *value) { unsigned int i = 0; idmef_class_id_t wanted_class = idmef_value_get_class(value); const struct { idmef_class_id_t classid; const char *classname; } tbl[] = { { IDMEF_CLASS_ID_ADDITIONAL_DATA, "idmef_additional_data_t *" }, { IDMEF_CLASS_ID_CLASSIFICATION, "idmef_classification_t *" }, { IDMEF_CLASS_ID_USER_ID, "idmef_user_id_t *" }, { IDMEF_CLASS_ID_USER, "idmef_user_t *" }, { IDMEF_CLASS_ID_ADDRESS, "idmef_address_t *" }, { IDMEF_CLASS_ID_PROCESS, "idmef_process_t *" }, { IDMEF_CLASS_ID_WEB_SERVICE, "idmef_web_service_t *" }, { IDMEF_CLASS_ID_SNMP_SERVICE, "idmef_snmp_service_t *" }, { IDMEF_CLASS_ID_SERVICE, "idmef_service_t *" }, { IDMEF_CLASS_ID_NODE, "idmef_node_t *" }, { IDMEF_CLASS_ID_SOURCE, "idmef_source_t *" }, { IDMEF_CLASS_ID_FILE_ACCESS, "idmef_file_access_t *" }, { IDMEF_CLASS_ID_INODE, "idmef_inode_t *" }, { IDMEF_CLASS_ID_FILE, "idmef_file_t *" }, { IDMEF_CLASS_ID_LINKAGE, "idmef_linkage_t *" }, { IDMEF_CLASS_ID_TARGET, "idmef_target_t *" }, { IDMEF_CLASS_ID_ANALYZER, "idmef_analyzer_t *" }, { IDMEF_CLASS_ID_ALERTIDENT, "idmef_alertident_t *" }, { IDMEF_CLASS_ID_IMPACT, "idmef_impact_t *" }, { IDMEF_CLASS_ID_ACTION, "idmef_action_t *" }, { IDMEF_CLASS_ID_CONFIDENCE, "idmef_confidence_t *" }, { IDMEF_CLASS_ID_ASSESSMENT, "idmef_assessment_t *" }, { IDMEF_CLASS_ID_TOOL_ALERT, "idmef_tool_alert_t *" }, { IDMEF_CLASS_ID_CORRELATION_ALERT, "idmef_correlation_alert_t *" }, { IDMEF_CLASS_ID_OVERFLOW_ALERT, "idmef_overflow_alert_t *" }, { IDMEF_CLASS_ID_ALERT, "idmef_alert_t *" }, { IDMEF_CLASS_ID_HEARTBEAT, "idmef_heartbeat_t *" }, { IDMEF_CLASS_ID_MESSAGE, "idmef_message_t *" }, { IDMEF_CLASS_ID_REFERENCE, "idmef_reference_t *" }, { IDMEF_CLASS_ID_CHECKSUM, "idmef_checksum_t *" }, { 0, NULL } }; for ( i = 0; tbl[i].classname != NULL; i++ ) { if ( tbl[i].classid == wanted_class ) return SWIG_TypeQuery(tbl[i].classname); } return NULL; } %} libprelude-1.0.0/bindings/lua/0000775000076400007640000000000011347714755013246 500000000000000libprelude-1.0.0/bindings/lua/Makefile.am0000664000076400007640000000161511225122036015201 00000000000000if HAVE_EASY_BINDINGS EXTRA_DIST = libpreludecpp-lua.i PreludeEasy.cxx if HAVE_LUA AM_CPPFLAGS = -I@top_srcdir@ -I@top_builddir@/src/include -I@top_srcdir@/src/include -I@top_builddir@/src/libprelude-error -I@top_srcdir@/bindings/c++/include @LUA_CFLAGS@ -I@top_srcdir@/libmissing -I@top_builddir@/libmissing PreludeEasy_la_LDFLAGS = -module -avoid-version @LUA_LIBS@ PreludeEasy_la_LIBADD = $(top_builddir)/bindings/c++/.libs/libpreludecpp.la PreludeEasy_la_SOURCES = PreludeEasy.cxx PreludeEasydir = $(libdir) PreludeEasy_LTLIBRARIES = PreludeEasy.la PreludeEasy.cxx: $(top_srcdir)/bindings/c++/include/*.hxx $(top_srcdir)/bindings/libpreludecpp.i libpreludecpp-lua.i if HAVE_SWIG $(SWIG) -c++ -I$(top_srcdir)/bindings -I$(top_srcdir)/bindings/c++/include -I$(top_srcdir)/src/include -I$(top_srcdir)/src/libprelude-error -lua -o $@ libpreludecpp.i endif endif endif -include $(top_srcdir)/git.mk libprelude-1.0.0/bindings/lua/Makefile.in0000664000076400007640000014375611347714453015246 00000000000000# Makefile.in generated by automake 1.11.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, # Inc. # This Makefile.in 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. @SET_MAKE@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ target_triplet = @target@ subdir = bindings/lua DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/libmissing/m4/00gnulib.m4 \ $(top_srcdir)/libmissing/m4/alloca.m4 \ $(top_srcdir)/libmissing/m4/arpa_inet_h.m4 \ $(top_srcdir)/libmissing/m4/btowc.m4 \ $(top_srcdir)/libmissing/m4/close.m4 \ $(top_srcdir)/libmissing/m4/codeset.m4 \ $(top_srcdir)/libmissing/m4/cond.m4 \ $(top_srcdir)/libmissing/m4/dos.m4 \ $(top_srcdir)/libmissing/m4/dup2.m4 \ $(top_srcdir)/libmissing/m4/errno_h.m4 \ $(top_srcdir)/libmissing/m4/exponentd.m4 \ $(top_srcdir)/libmissing/m4/exponentf.m4 \ $(top_srcdir)/libmissing/m4/exponentl.m4 \ $(top_srcdir)/libmissing/m4/extensions.m4 \ $(top_srcdir)/libmissing/m4/fclose.m4 \ $(top_srcdir)/libmissing/m4/fcntl-o.m4 \ $(top_srcdir)/libmissing/m4/fcntl_h.m4 \ $(top_srcdir)/libmissing/m4/float_h.m4 \ $(top_srcdir)/libmissing/m4/fopen.m4 \ $(top_srcdir)/libmissing/m4/fpieee.m4 \ $(top_srcdir)/libmissing/m4/frexp.m4 \ $(top_srcdir)/libmissing/m4/frexpl.m4 \ $(top_srcdir)/libmissing/m4/fseeko.m4 \ $(top_srcdir)/libmissing/m4/ftw.m4 \ $(top_srcdir)/libmissing/m4/getaddrinfo.m4 \ $(top_srcdir)/libmissing/m4/getdelim.m4 \ $(top_srcdir)/libmissing/m4/gethostname.m4 \ $(top_srcdir)/libmissing/m4/getline.m4 \ $(top_srcdir)/libmissing/m4/getpagesize.m4 \ $(top_srcdir)/libmissing/m4/getpass.m4 \ $(top_srcdir)/libmissing/m4/gettimeofday.m4 \ $(top_srcdir)/libmissing/m4/glibc21.m4 \ $(top_srcdir)/libmissing/m4/gnulib-common.m4 \ $(top_srcdir)/libmissing/m4/gnulib-comp.m4 \ $(top_srcdir)/libmissing/m4/gnulib-tool.m4 \ $(top_srcdir)/libmissing/m4/hostent.m4 \ $(top_srcdir)/libmissing/m4/include_next.m4 \ $(top_srcdir)/libmissing/m4/inet_ntop.m4 \ $(top_srcdir)/libmissing/m4/inet_pton.m4 \ $(top_srcdir)/libmissing/m4/intmax_t.m4 \ $(top_srcdir)/libmissing/m4/inttypes_h.m4 \ $(top_srcdir)/libmissing/m4/isnand.m4 \ $(top_srcdir)/libmissing/m4/isnanf.m4 \ $(top_srcdir)/libmissing/m4/isnanl.m4 \ $(top_srcdir)/libmissing/m4/langinfo_h.m4 \ $(top_srcdir)/libmissing/m4/ldexpl.m4 \ $(top_srcdir)/libmissing/m4/lib-ld.m4 \ $(top_srcdir)/libmissing/m4/lib-link.m4 \ $(top_srcdir)/libmissing/m4/lib-prefix.m4 \ $(top_srcdir)/libmissing/m4/localcharset.m4 \ $(top_srcdir)/libmissing/m4/locale-fr.m4 \ $(top_srcdir)/libmissing/m4/locale-ja.m4 \ $(top_srcdir)/libmissing/m4/locale-tr.m4 \ $(top_srcdir)/libmissing/m4/locale-zh.m4 \ $(top_srcdir)/libmissing/m4/lock.m4 \ $(top_srcdir)/libmissing/m4/longlong.m4 \ $(top_srcdir)/libmissing/m4/lseek.m4 \ $(top_srcdir)/libmissing/m4/lstat.m4 \ $(top_srcdir)/libmissing/m4/malloc.m4 \ $(top_srcdir)/libmissing/m4/math_h.m4 \ $(top_srcdir)/libmissing/m4/mbrtowc.m4 \ $(top_srcdir)/libmissing/m4/mbsinit.m4 \ $(top_srcdir)/libmissing/m4/mbstate_t.m4 \ $(top_srcdir)/libmissing/m4/memchr.m4 \ $(top_srcdir)/libmissing/m4/memmem.m4 \ $(top_srcdir)/libmissing/m4/minmax.m4 \ $(top_srcdir)/libmissing/m4/mktime.m4 \ $(top_srcdir)/libmissing/m4/mmap-anon.m4 \ $(top_srcdir)/libmissing/m4/mode_t.m4 \ $(top_srcdir)/libmissing/m4/multiarch.m4 \ $(top_srcdir)/libmissing/m4/netdb_h.m4 \ $(top_srcdir)/libmissing/m4/netinet_in_h.m4 \ $(top_srcdir)/libmissing/m4/nl_langinfo.m4 \ $(top_srcdir)/libmissing/m4/nocrash.m4 \ $(top_srcdir)/libmissing/m4/onceonly.m4 \ $(top_srcdir)/libmissing/m4/open.m4 \ $(top_srcdir)/libmissing/m4/pathmax.m4 \ $(top_srcdir)/libmissing/m4/perror.m4 \ $(top_srcdir)/libmissing/m4/poll.m4 \ $(top_srcdir)/libmissing/m4/printf-frexp.m4 \ $(top_srcdir)/libmissing/m4/printf-frexpl.m4 \ $(top_srcdir)/libmissing/m4/printf.m4 \ $(top_srcdir)/libmissing/m4/realloc.m4 \ $(top_srcdir)/libmissing/m4/regex.m4 \ $(top_srcdir)/libmissing/m4/relocatable-lib.m4 \ $(top_srcdir)/libmissing/m4/select.m4 \ $(top_srcdir)/libmissing/m4/servent.m4 \ $(top_srcdir)/libmissing/m4/signal_h.m4 \ $(top_srcdir)/libmissing/m4/signalblocking.m4 \ $(top_srcdir)/libmissing/m4/signbit.m4 \ $(top_srcdir)/libmissing/m4/size_max.m4 \ $(top_srcdir)/libmissing/m4/sleep.m4 \ $(top_srcdir)/libmissing/m4/snprintf-posix.m4 \ $(top_srcdir)/libmissing/m4/snprintf.m4 \ $(top_srcdir)/libmissing/m4/sockets.m4 \ $(top_srcdir)/libmissing/m4/socklen.m4 \ $(top_srcdir)/libmissing/m4/sockpfaf.m4 \ $(top_srcdir)/libmissing/m4/ssize_t.m4 \ $(top_srcdir)/libmissing/m4/stat.m4 \ $(top_srcdir)/libmissing/m4/stdbool.m4 \ $(top_srcdir)/libmissing/m4/stddef_h.m4 \ $(top_srcdir)/libmissing/m4/stdint.m4 \ $(top_srcdir)/libmissing/m4/stdint_h.m4 \ $(top_srcdir)/libmissing/m4/stdio_h.m4 \ $(top_srcdir)/libmissing/m4/stdlib_h.m4 \ $(top_srcdir)/libmissing/m4/strcase.m4 \ $(top_srcdir)/libmissing/m4/strcasestr.m4 \ $(top_srcdir)/libmissing/m4/strdup.m4 \ $(top_srcdir)/libmissing/m4/strerror.m4 \ $(top_srcdir)/libmissing/m4/string_h.m4 \ $(top_srcdir)/libmissing/m4/strings_h.m4 \ $(top_srcdir)/libmissing/m4/strndup.m4 \ $(top_srcdir)/libmissing/m4/strnlen.m4 \ $(top_srcdir)/libmissing/m4/strptime.m4 \ $(top_srcdir)/libmissing/m4/strsep.m4 \ $(top_srcdir)/libmissing/m4/symlink.m4 \ $(top_srcdir)/libmissing/m4/sys_ioctl_h.m4 \ $(top_srcdir)/libmissing/m4/sys_select_h.m4 \ $(top_srcdir)/libmissing/m4/sys_socket_h.m4 \ $(top_srcdir)/libmissing/m4/sys_stat_h.m4 \ $(top_srcdir)/libmissing/m4/sys_time_h.m4 \ $(top_srcdir)/libmissing/m4/sys_utsname_h.m4 \ $(top_srcdir)/libmissing/m4/thread.m4 \ $(top_srcdir)/libmissing/m4/threadlib.m4 \ $(top_srcdir)/libmissing/m4/time_h.m4 \ $(top_srcdir)/libmissing/m4/time_r.m4 \ $(top_srcdir)/libmissing/m4/timegm.m4 \ $(top_srcdir)/libmissing/m4/tls.m4 \ $(top_srcdir)/libmissing/m4/tm_gmtoff.m4 \ $(top_srcdir)/libmissing/m4/uname.m4 \ $(top_srcdir)/libmissing/m4/ungetc.m4 \ $(top_srcdir)/libmissing/m4/unistd_h.m4 \ $(top_srcdir)/libmissing/m4/vasnprintf.m4 \ $(top_srcdir)/libmissing/m4/vsnprintf-posix.m4 \ $(top_srcdir)/libmissing/m4/vsnprintf.m4 \ $(top_srcdir)/libmissing/m4/warn-on-use.m4 \ $(top_srcdir)/libmissing/m4/wchar.m4 \ $(top_srcdir)/libmissing/m4/wchar_t.m4 \ $(top_srcdir)/libmissing/m4/wcrtomb.m4 \ $(top_srcdir)/libmissing/m4/wctob.m4 \ $(top_srcdir)/libmissing/m4/wctype.m4 \ $(top_srcdir)/libmissing/m4/wint_t.m4 \ $(top_srcdir)/libmissing/m4/write.m4 \ $(top_srcdir)/libmissing/m4/xsize.m4 \ $(top_srcdir)/libmissing/m4/yield.m4 \ $(top_srcdir)/m4/ac_compile_check_sizeof.m4 \ $(top_srcdir)/m4/am_path_ruby.m4 $(top_srcdir)/m4/argz.m4 \ $(top_srcdir)/m4/as-ac-expand.m4 \ $(top_srcdir)/m4/ax_c_check_flag.m4 \ $(top_srcdir)/m4/ax_check_aligned_access_required.m4 \ $(top_srcdir)/m4/ax_create_prelude_inttypes_h.m4 \ $(top_srcdir)/m4/ax_ld_check_flag.m4 \ $(top_srcdir)/m4/gtk-doc.m4 $(top_srcdir)/m4/libgcrypt.m4 \ $(top_srcdir)/m4/libgnutls-extra.m4 \ $(top_srcdir)/m4/libgnutls.m4 $(top_srcdir)/m4/libtool.m4 \ $(top_srcdir)/m4/ltdl.m4 $(top_srcdir)/m4/ltoptions.m4 \ $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/m4/pkg.m4 \ $(top_srcdir)/configure.in am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; am__install_max = 40 am__nobase_strip_setup = \ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` am__nobase_strip = \ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" am__nobase_list = $(am__nobase_strip_setup); \ for p in $$list; do echo "$$p $$p"; done | \ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ if (++n[$$2] == $(am__install_max)) \ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ END { for (dir in files) print dir, files[dir] }' am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' am__installdirs = "$(DESTDIR)$(PreludeEasydir)" LTLIBRARIES = $(PreludeEasy_LTLIBRARIES) @HAVE_EASY_BINDINGS_TRUE@@HAVE_LUA_TRUE@PreludeEasy_la_DEPENDENCIES = $(top_builddir)/bindings/c++/.libs/libpreludecpp.la am__PreludeEasy_la_SOURCES_DIST = PreludeEasy.cxx @HAVE_EASY_BINDINGS_TRUE@@HAVE_LUA_TRUE@am_PreludeEasy_la_OBJECTS = \ @HAVE_EASY_BINDINGS_TRUE@@HAVE_LUA_TRUE@ PreludeEasy.lo PreludeEasy_la_OBJECTS = $(am_PreludeEasy_la_OBJECTS) PreludeEasy_la_LINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CXXLD) $(AM_CXXFLAGS) \ $(CXXFLAGS) $(PreludeEasy_la_LDFLAGS) $(LDFLAGS) -o $@ @HAVE_EASY_BINDINGS_TRUE@@HAVE_LUA_TRUE@am_PreludeEasy_la_rpath = \ @HAVE_EASY_BINDINGS_TRUE@@HAVE_LUA_TRUE@ -rpath \ @HAVE_EASY_BINDINGS_TRUE@@HAVE_LUA_TRUE@ $(PreludeEasydir) DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles am__mv = mv -f CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) LTCXXCOMPILE = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) CXXLD = $(CXX) CXXLINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=link $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) \ $(LDFLAGS) -o $@ SOURCES = $(PreludeEasy_la_SOURCES) DIST_SOURCES = $(am__PreludeEasy_la_SOURCES_DIST) ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ ALLOCA = @ALLOCA@ ALLOCA_H = @ALLOCA_H@ AMTAR = @AMTAR@ APPLE_UNIVERSAL_BUILD = @APPLE_UNIVERSAL_BUILD@ AR = @AR@ ARGZ_H = @ARGZ_H@ AS = @AS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ BINDINGS_CC = @BINDINGS_CC@ BINDIR = @BINDIR@ BITSIZEOF_PTRDIFF_T = @BITSIZEOF_PTRDIFF_T@ BITSIZEOF_SIG_ATOMIC_T = @BITSIZEOF_SIG_ATOMIC_T@ BITSIZEOF_SIZE_T = @BITSIZEOF_SIZE_T@ BITSIZEOF_WCHAR_T = @BITSIZEOF_WCHAR_T@ BITSIZEOF_WINT_T = @BITSIZEOF_WINT_T@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CC_FOR_BUILD = @CC_FOR_BUILD@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EMULTIHOP_HIDDEN = @EMULTIHOP_HIDDEN@ EMULTIHOP_VALUE = @EMULTIHOP_VALUE@ ENOLINK_HIDDEN = @ENOLINK_HIDDEN@ ENOLINK_VALUE = @ENOLINK_VALUE@ EOVERFLOW_HIDDEN = @EOVERFLOW_HIDDEN@ EOVERFLOW_VALUE = @EOVERFLOW_VALUE@ ERRNO_H = @ERRNO_H@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ FLOAT_H = @FLOAT_H@ GETADDRINFO_LIB = @GETADDRINFO_LIB@ GETHOSTNAME_LIB = @GETHOSTNAME_LIB@ GLIBC21 = @GLIBC21@ GNULIB_ACCEPT = @GNULIB_ACCEPT@ GNULIB_ACCEPT4 = @GNULIB_ACCEPT4@ GNULIB_ACOSL = @GNULIB_ACOSL@ GNULIB_ASINL = @GNULIB_ASINL@ GNULIB_ATANL = @GNULIB_ATANL@ GNULIB_ATOLL = @GNULIB_ATOLL@ GNULIB_BIND = @GNULIB_BIND@ GNULIB_BTOWC = @GNULIB_BTOWC@ GNULIB_CALLOC_POSIX = @GNULIB_CALLOC_POSIX@ GNULIB_CANONICALIZE_FILE_NAME = @GNULIB_CANONICALIZE_FILE_NAME@ GNULIB_CEILF = @GNULIB_CEILF@ GNULIB_CEILL = @GNULIB_CEILL@ GNULIB_CHOWN = @GNULIB_CHOWN@ GNULIB_CLOSE = @GNULIB_CLOSE@ GNULIB_CONNECT = @GNULIB_CONNECT@ GNULIB_COSL = @GNULIB_COSL@ GNULIB_DPRINTF = @GNULIB_DPRINTF@ GNULIB_DUP2 = @GNULIB_DUP2@ GNULIB_DUP3 = @GNULIB_DUP3@ GNULIB_ENVIRON = @GNULIB_ENVIRON@ GNULIB_EUIDACCESS = @GNULIB_EUIDACCESS@ GNULIB_EXPL = @GNULIB_EXPL@ GNULIB_FACCESSAT = @GNULIB_FACCESSAT@ GNULIB_FCHDIR = @GNULIB_FCHDIR@ GNULIB_FCHMODAT = @GNULIB_FCHMODAT@ GNULIB_FCHOWNAT = @GNULIB_FCHOWNAT@ GNULIB_FCLOSE = @GNULIB_FCLOSE@ GNULIB_FCNTL = @GNULIB_FCNTL@ GNULIB_FFLUSH = @GNULIB_FFLUSH@ GNULIB_FLOORF = @GNULIB_FLOORF@ GNULIB_FLOORL = @GNULIB_FLOORL@ GNULIB_FOPEN = @GNULIB_FOPEN@ GNULIB_FPRINTF = @GNULIB_FPRINTF@ GNULIB_FPRINTF_POSIX = @GNULIB_FPRINTF_POSIX@ GNULIB_FPURGE = @GNULIB_FPURGE@ GNULIB_FPUTC = @GNULIB_FPUTC@ GNULIB_FPUTS = @GNULIB_FPUTS@ GNULIB_FREOPEN = @GNULIB_FREOPEN@ GNULIB_FREXP = @GNULIB_FREXP@ GNULIB_FREXPL = @GNULIB_FREXPL@ GNULIB_FSEEK = @GNULIB_FSEEK@ GNULIB_FSEEKO = @GNULIB_FSEEKO@ GNULIB_FSTATAT = @GNULIB_FSTATAT@ GNULIB_FSYNC = @GNULIB_FSYNC@ GNULIB_FTELL = @GNULIB_FTELL@ GNULIB_FTELLO = @GNULIB_FTELLO@ GNULIB_FTRUNCATE = @GNULIB_FTRUNCATE@ GNULIB_FUTIMENS = @GNULIB_FUTIMENS@ GNULIB_FWRITE = @GNULIB_FWRITE@ GNULIB_GETADDRINFO = @GNULIB_GETADDRINFO@ GNULIB_GETCWD = @GNULIB_GETCWD@ GNULIB_GETDELIM = @GNULIB_GETDELIM@ GNULIB_GETDOMAINNAME = @GNULIB_GETDOMAINNAME@ GNULIB_GETDTABLESIZE = @GNULIB_GETDTABLESIZE@ GNULIB_GETGROUPS = @GNULIB_GETGROUPS@ GNULIB_GETHOSTNAME = @GNULIB_GETHOSTNAME@ GNULIB_GETLINE = @GNULIB_GETLINE@ GNULIB_GETLOADAVG = @GNULIB_GETLOADAVG@ GNULIB_GETLOGIN = @GNULIB_GETLOGIN@ GNULIB_GETLOGIN_R = @GNULIB_GETLOGIN_R@ GNULIB_GETPAGESIZE = @GNULIB_GETPAGESIZE@ GNULIB_GETPEERNAME = @GNULIB_GETPEERNAME@ GNULIB_GETSOCKNAME = @GNULIB_GETSOCKNAME@ GNULIB_GETSOCKOPT = @GNULIB_GETSOCKOPT@ GNULIB_GETSUBOPT = @GNULIB_GETSUBOPT@ GNULIB_GETTIMEOFDAY = @GNULIB_GETTIMEOFDAY@ GNULIB_GETUSERSHELL = @GNULIB_GETUSERSHELL@ GNULIB_INET_NTOP = @GNULIB_INET_NTOP@ GNULIB_INET_PTON = @GNULIB_INET_PTON@ GNULIB_IOCTL = @GNULIB_IOCTL@ GNULIB_ISFINITE = @GNULIB_ISFINITE@ GNULIB_ISINF = @GNULIB_ISINF@ GNULIB_ISNAN = @GNULIB_ISNAN@ GNULIB_ISNAND = @GNULIB_ISNAND@ GNULIB_ISNANF = @GNULIB_ISNANF@ GNULIB_ISNANL = @GNULIB_ISNANL@ GNULIB_LCHMOD = @GNULIB_LCHMOD@ GNULIB_LCHOWN = @GNULIB_LCHOWN@ GNULIB_LDEXPL = @GNULIB_LDEXPL@ GNULIB_LINK = @GNULIB_LINK@ GNULIB_LINKAT = @GNULIB_LINKAT@ GNULIB_LISTEN = @GNULIB_LISTEN@ GNULIB_LOGL = @GNULIB_LOGL@ GNULIB_LSEEK = @GNULIB_LSEEK@ GNULIB_LSTAT = @GNULIB_LSTAT@ GNULIB_MALLOC_POSIX = @GNULIB_MALLOC_POSIX@ GNULIB_MBRLEN = @GNULIB_MBRLEN@ GNULIB_MBRTOWC = @GNULIB_MBRTOWC@ GNULIB_MBSCASECMP = @GNULIB_MBSCASECMP@ GNULIB_MBSCASESTR = @GNULIB_MBSCASESTR@ GNULIB_MBSCHR = @GNULIB_MBSCHR@ GNULIB_MBSCSPN = @GNULIB_MBSCSPN@ GNULIB_MBSINIT = @GNULIB_MBSINIT@ GNULIB_MBSLEN = @GNULIB_MBSLEN@ GNULIB_MBSNCASECMP = @GNULIB_MBSNCASECMP@ GNULIB_MBSNLEN = @GNULIB_MBSNLEN@ GNULIB_MBSNRTOWCS = @GNULIB_MBSNRTOWCS@ GNULIB_MBSPBRK = @GNULIB_MBSPBRK@ GNULIB_MBSPCASECMP = @GNULIB_MBSPCASECMP@ GNULIB_MBSRCHR = @GNULIB_MBSRCHR@ GNULIB_MBSRTOWCS = @GNULIB_MBSRTOWCS@ GNULIB_MBSSEP = @GNULIB_MBSSEP@ GNULIB_MBSSPN = @GNULIB_MBSSPN@ GNULIB_MBSSTR = @GNULIB_MBSSTR@ GNULIB_MBSTOK_R = @GNULIB_MBSTOK_R@ GNULIB_MEMCHR = @GNULIB_MEMCHR@ GNULIB_MEMMEM = @GNULIB_MEMMEM@ GNULIB_MEMPCPY = @GNULIB_MEMPCPY@ GNULIB_MEMRCHR = @GNULIB_MEMRCHR@ GNULIB_MKDIRAT = @GNULIB_MKDIRAT@ GNULIB_MKDTEMP = @GNULIB_MKDTEMP@ GNULIB_MKFIFO = @GNULIB_MKFIFO@ GNULIB_MKFIFOAT = @GNULIB_MKFIFOAT@ GNULIB_MKNOD = @GNULIB_MKNOD@ GNULIB_MKNODAT = @GNULIB_MKNODAT@ GNULIB_MKOSTEMP = @GNULIB_MKOSTEMP@ GNULIB_MKOSTEMPS = @GNULIB_MKOSTEMPS@ GNULIB_MKSTEMP = @GNULIB_MKSTEMP@ GNULIB_MKSTEMPS = @GNULIB_MKSTEMPS@ GNULIB_NL_LANGINFO = @GNULIB_NL_LANGINFO@ GNULIB_OBSTACK_PRINTF = @GNULIB_OBSTACK_PRINTF@ GNULIB_OBSTACK_PRINTF_POSIX = @GNULIB_OBSTACK_PRINTF_POSIX@ GNULIB_OPEN = @GNULIB_OPEN@ GNULIB_OPENAT = @GNULIB_OPENAT@ GNULIB_PERROR = @GNULIB_PERROR@ GNULIB_PIPE2 = @GNULIB_PIPE2@ GNULIB_POPEN = @GNULIB_POPEN@ GNULIB_PREAD = @GNULIB_PREAD@ GNULIB_PRINTF = @GNULIB_PRINTF@ GNULIB_PRINTF_POSIX = @GNULIB_PRINTF_POSIX@ GNULIB_PUTC = @GNULIB_PUTC@ GNULIB_PUTCHAR = @GNULIB_PUTCHAR@ GNULIB_PUTENV = @GNULIB_PUTENV@ GNULIB_PUTS = @GNULIB_PUTS@ GNULIB_RANDOM_R = @GNULIB_RANDOM_R@ GNULIB_RAWMEMCHR = @GNULIB_RAWMEMCHR@ GNULIB_READLINK = @GNULIB_READLINK@ GNULIB_READLINKAT = @GNULIB_READLINKAT@ GNULIB_REALLOC_POSIX = @GNULIB_REALLOC_POSIX@ GNULIB_REALPATH = @GNULIB_REALPATH@ GNULIB_RECV = @GNULIB_RECV@ GNULIB_RECVFROM = @GNULIB_RECVFROM@ GNULIB_REMOVE = @GNULIB_REMOVE@ GNULIB_RENAME = @GNULIB_RENAME@ GNULIB_RENAMEAT = @GNULIB_RENAMEAT@ GNULIB_RMDIR = @GNULIB_RMDIR@ GNULIB_ROUND = @GNULIB_ROUND@ GNULIB_ROUNDF = @GNULIB_ROUNDF@ GNULIB_ROUNDL = @GNULIB_ROUNDL@ GNULIB_RPMATCH = @GNULIB_RPMATCH@ GNULIB_SELECT = @GNULIB_SELECT@ GNULIB_SEND = @GNULIB_SEND@ GNULIB_SENDTO = @GNULIB_SENDTO@ GNULIB_SETENV = @GNULIB_SETENV@ GNULIB_SETSOCKOPT = @GNULIB_SETSOCKOPT@ GNULIB_SHUTDOWN = @GNULIB_SHUTDOWN@ GNULIB_SIGACTION = @GNULIB_SIGACTION@ GNULIB_SIGNAL_H_SIGPIPE = @GNULIB_SIGNAL_H_SIGPIPE@ GNULIB_SIGNBIT = @GNULIB_SIGNBIT@ GNULIB_SIGPROCMASK = @GNULIB_SIGPROCMASK@ GNULIB_SINL = @GNULIB_SINL@ GNULIB_SLEEP = @GNULIB_SLEEP@ GNULIB_SNPRINTF = @GNULIB_SNPRINTF@ GNULIB_SOCKET = @GNULIB_SOCKET@ GNULIB_SPRINTF_POSIX = @GNULIB_SPRINTF_POSIX@ GNULIB_SQRTL = @GNULIB_SQRTL@ GNULIB_STAT = @GNULIB_STAT@ GNULIB_STDIO_H_SIGPIPE = @GNULIB_STDIO_H_SIGPIPE@ GNULIB_STPCPY = @GNULIB_STPCPY@ GNULIB_STPNCPY = @GNULIB_STPNCPY@ GNULIB_STRCASESTR = @GNULIB_STRCASESTR@ GNULIB_STRCHRNUL = @GNULIB_STRCHRNUL@ GNULIB_STRDUP = @GNULIB_STRDUP@ GNULIB_STRERROR = @GNULIB_STRERROR@ GNULIB_STRNDUP = @GNULIB_STRNDUP@ GNULIB_STRNLEN = @GNULIB_STRNLEN@ GNULIB_STRPBRK = @GNULIB_STRPBRK@ GNULIB_STRSEP = @GNULIB_STRSEP@ GNULIB_STRSIGNAL = @GNULIB_STRSIGNAL@ GNULIB_STRSTR = @GNULIB_STRSTR@ GNULIB_STRTOD = @GNULIB_STRTOD@ GNULIB_STRTOK_R = @GNULIB_STRTOK_R@ GNULIB_STRTOLL = @GNULIB_STRTOLL@ GNULIB_STRTOULL = @GNULIB_STRTOULL@ GNULIB_STRVERSCMP = @GNULIB_STRVERSCMP@ GNULIB_SYMLINK = @GNULIB_SYMLINK@ GNULIB_SYMLINKAT = @GNULIB_SYMLINKAT@ GNULIB_TANL = @GNULIB_TANL@ GNULIB_TRUNC = @GNULIB_TRUNC@ GNULIB_TRUNCF = @GNULIB_TRUNCF@ GNULIB_TRUNCL = @GNULIB_TRUNCL@ GNULIB_UNAME = @GNULIB_UNAME@ GNULIB_UNISTD_H_GETOPT = @GNULIB_UNISTD_H_GETOPT@ GNULIB_UNISTD_H_SIGPIPE = @GNULIB_UNISTD_H_SIGPIPE@ GNULIB_UNLINK = @GNULIB_UNLINK@ GNULIB_UNLINKAT = @GNULIB_UNLINKAT@ GNULIB_UNSETENV = @GNULIB_UNSETENV@ GNULIB_USLEEP = @GNULIB_USLEEP@ GNULIB_UTIMENSAT = @GNULIB_UTIMENSAT@ GNULIB_VASPRINTF = @GNULIB_VASPRINTF@ GNULIB_VDPRINTF = @GNULIB_VDPRINTF@ GNULIB_VFPRINTF = @GNULIB_VFPRINTF@ GNULIB_VFPRINTF_POSIX = @GNULIB_VFPRINTF_POSIX@ GNULIB_VPRINTF = @GNULIB_VPRINTF@ GNULIB_VPRINTF_POSIX = @GNULIB_VPRINTF_POSIX@ GNULIB_VSNPRINTF = @GNULIB_VSNPRINTF@ GNULIB_VSPRINTF_POSIX = @GNULIB_VSPRINTF_POSIX@ GNULIB_WCRTOMB = @GNULIB_WCRTOMB@ GNULIB_WCSNRTOMBS = @GNULIB_WCSNRTOMBS@ GNULIB_WCSRTOMBS = @GNULIB_WCSRTOMBS@ GNULIB_WCTOB = @GNULIB_WCTOB@ GNULIB_WCWIDTH = @GNULIB_WCWIDTH@ GNULIB_WRITE = @GNULIB_WRITE@ GREP = @GREP@ GTKDOC_CHECK = @GTKDOC_CHECK@ HAVE_ACCEPT4 = @HAVE_ACCEPT4@ HAVE_ACOSL = @HAVE_ACOSL@ HAVE_ARPA_INET_H = @HAVE_ARPA_INET_H@ HAVE_ASINL = @HAVE_ASINL@ HAVE_ATANL = @HAVE_ATANL@ HAVE_ATOLL = @HAVE_ATOLL@ HAVE_BTOWC = @HAVE_BTOWC@ HAVE_CALLOC_POSIX = @HAVE_CALLOC_POSIX@ HAVE_CANONICALIZE_FILE_NAME = @HAVE_CANONICALIZE_FILE_NAME@ HAVE_CHOWN = @HAVE_CHOWN@ HAVE_COSL = @HAVE_COSL@ HAVE_CXX = @HAVE_CXX@ HAVE_DECL_ACOSL = @HAVE_DECL_ACOSL@ HAVE_DECL_ASINL = @HAVE_DECL_ASINL@ HAVE_DECL_ATANL = @HAVE_DECL_ATANL@ HAVE_DECL_COSL = @HAVE_DECL_COSL@ HAVE_DECL_ENVIRON = @HAVE_DECL_ENVIRON@ HAVE_DECL_EXPL = @HAVE_DECL_EXPL@ HAVE_DECL_FPURGE = @HAVE_DECL_FPURGE@ HAVE_DECL_FREEADDRINFO = @HAVE_DECL_FREEADDRINFO@ HAVE_DECL_FREXPL = @HAVE_DECL_FREXPL@ HAVE_DECL_GAI_STRERROR = @HAVE_DECL_GAI_STRERROR@ HAVE_DECL_GETADDRINFO = @HAVE_DECL_GETADDRINFO@ HAVE_DECL_GETDELIM = @HAVE_DECL_GETDELIM@ HAVE_DECL_GETLINE = @HAVE_DECL_GETLINE@ HAVE_DECL_GETLOADAVG = @HAVE_DECL_GETLOADAVG@ HAVE_DECL_GETLOGIN_R = @HAVE_DECL_GETLOGIN_R@ HAVE_DECL_GETNAMEINFO = @HAVE_DECL_GETNAMEINFO@ HAVE_DECL_INET_NTOP = @HAVE_DECL_INET_NTOP@ HAVE_DECL_INET_PTON = @HAVE_DECL_INET_PTON@ HAVE_DECL_LDEXPL = @HAVE_DECL_LDEXPL@ HAVE_DECL_LOGL = @HAVE_DECL_LOGL@ HAVE_DECL_MEMMEM = @HAVE_DECL_MEMMEM@ HAVE_DECL_MEMRCHR = @HAVE_DECL_MEMRCHR@ HAVE_DECL_OBSTACK_PRINTF = @HAVE_DECL_OBSTACK_PRINTF@ HAVE_DECL_SINL = @HAVE_DECL_SINL@ HAVE_DECL_SNPRINTF = @HAVE_DECL_SNPRINTF@ HAVE_DECL_SQRTL = @HAVE_DECL_SQRTL@ HAVE_DECL_STRDUP = @HAVE_DECL_STRDUP@ HAVE_DECL_STRERROR = @HAVE_DECL_STRERROR@ HAVE_DECL_STRNCASECMP = @HAVE_DECL_STRNCASECMP@ HAVE_DECL_STRNDUP = @HAVE_DECL_STRNDUP@ HAVE_DECL_STRNLEN = @HAVE_DECL_STRNLEN@ HAVE_DECL_STRSIGNAL = @HAVE_DECL_STRSIGNAL@ HAVE_DECL_STRTOK_R = @HAVE_DECL_STRTOK_R@ HAVE_DECL_TANL = @HAVE_DECL_TANL@ HAVE_DECL_TRUNC = @HAVE_DECL_TRUNC@ HAVE_DECL_TRUNCF = @HAVE_DECL_TRUNCF@ HAVE_DECL_VSNPRINTF = @HAVE_DECL_VSNPRINTF@ HAVE_DECL_WCTOB = @HAVE_DECL_WCTOB@ HAVE_DECL_WCWIDTH = @HAVE_DECL_WCWIDTH@ HAVE_DPRINTF = @HAVE_DPRINTF@ HAVE_DUP2 = @HAVE_DUP2@ HAVE_DUP3 = @HAVE_DUP3@ HAVE_EUIDACCESS = @HAVE_EUIDACCESS@ HAVE_EXPL = @HAVE_EXPL@ HAVE_FACCESSAT = @HAVE_FACCESSAT@ HAVE_FCHMODAT = @HAVE_FCHMODAT@ HAVE_FCHOWNAT = @HAVE_FCHOWNAT@ HAVE_FCNTL = @HAVE_FCNTL@ HAVE_FSTATAT = @HAVE_FSTATAT@ HAVE_FSYNC = @HAVE_FSYNC@ HAVE_FTRUNCATE = @HAVE_FTRUNCATE@ HAVE_FUTIMENS = @HAVE_FUTIMENS@ HAVE_GETDOMAINNAME = @HAVE_GETDOMAINNAME@ HAVE_GETDTABLESIZE = @HAVE_GETDTABLESIZE@ HAVE_GETGROUPS = @HAVE_GETGROUPS@ HAVE_GETHOSTNAME = @HAVE_GETHOSTNAME@ HAVE_GETLOGIN = @HAVE_GETLOGIN@ HAVE_GETPAGESIZE = @HAVE_GETPAGESIZE@ HAVE_GETSUBOPT = @HAVE_GETSUBOPT@ HAVE_GETUSERSHELL = @HAVE_GETUSERSHELL@ HAVE_INTTYPES_H = @HAVE_INTTYPES_H@ HAVE_ISNAND = @HAVE_ISNAND@ HAVE_ISNANF = @HAVE_ISNANF@ HAVE_ISNANL = @HAVE_ISNANL@ HAVE_ISWCNTRL = @HAVE_ISWCNTRL@ HAVE_LANGINFO_CODESET = @HAVE_LANGINFO_CODESET@ HAVE_LANGINFO_ERA = @HAVE_LANGINFO_ERA@ HAVE_LANGINFO_H = @HAVE_LANGINFO_H@ HAVE_LCHMOD = @HAVE_LCHMOD@ HAVE_LCHOWN = @HAVE_LCHOWN@ HAVE_LINK = @HAVE_LINK@ HAVE_LINKAT = @HAVE_LINKAT@ HAVE_LOGL = @HAVE_LOGL@ HAVE_LONG_LONG_INT = @HAVE_LONG_LONG_INT@ HAVE_LSTAT = @HAVE_LSTAT@ HAVE_MALLOC_POSIX = @HAVE_MALLOC_POSIX@ HAVE_MBRLEN = @HAVE_MBRLEN@ HAVE_MBRTOWC = @HAVE_MBRTOWC@ HAVE_MBSINIT = @HAVE_MBSINIT@ HAVE_MBSLEN = @HAVE_MBSLEN@ HAVE_MBSNRTOWCS = @HAVE_MBSNRTOWCS@ HAVE_MBSRTOWCS = @HAVE_MBSRTOWCS@ HAVE_MEMPCPY = @HAVE_MEMPCPY@ HAVE_MKDIRAT = @HAVE_MKDIRAT@ HAVE_MKDTEMP = @HAVE_MKDTEMP@ HAVE_MKFIFO = @HAVE_MKFIFO@ HAVE_MKFIFOAT = @HAVE_MKFIFOAT@ HAVE_MKNOD = @HAVE_MKNOD@ HAVE_MKNODAT = @HAVE_MKNODAT@ HAVE_MKOSTEMP = @HAVE_MKOSTEMP@ HAVE_MKOSTEMPS = @HAVE_MKOSTEMPS@ HAVE_MKSTEMPS = @HAVE_MKSTEMPS@ HAVE_NETDB_H = @HAVE_NETDB_H@ HAVE_NETINET_IN_H = @HAVE_NETINET_IN_H@ HAVE_NL_LANGINFO = @HAVE_NL_LANGINFO@ HAVE_OPENAT = @HAVE_OPENAT@ HAVE_OS_H = @HAVE_OS_H@ HAVE_PIPE2 = @HAVE_PIPE2@ HAVE_POSIX_SIGNALBLOCKING = @HAVE_POSIX_SIGNALBLOCKING@ HAVE_PREAD = @HAVE_PREAD@ HAVE_RANDOM_H = @HAVE_RANDOM_H@ HAVE_RANDOM_R = @HAVE_RANDOM_R@ HAVE_RAWMEMCHR = @HAVE_RAWMEMCHR@ HAVE_READLINK = @HAVE_READLINK@ HAVE_READLINKAT = @HAVE_READLINKAT@ HAVE_REALLOC_POSIX = @HAVE_REALLOC_POSIX@ HAVE_REALPATH = @HAVE_REALPATH@ HAVE_RENAMEAT = @HAVE_RENAMEAT@ HAVE_RPMATCH = @HAVE_RPMATCH@ HAVE_SA_FAMILY_T = @HAVE_SA_FAMILY_T@ HAVE_SETENV = @HAVE_SETENV@ HAVE_SIGACTION = @HAVE_SIGACTION@ HAVE_SIGINFO_T = @HAVE_SIGINFO_T@ HAVE_SIGNED_SIG_ATOMIC_T = @HAVE_SIGNED_SIG_ATOMIC_T@ HAVE_SIGNED_WCHAR_T = @HAVE_SIGNED_WCHAR_T@ HAVE_SIGNED_WINT_T = @HAVE_SIGNED_WINT_T@ HAVE_SIGSET_T = @HAVE_SIGSET_T@ HAVE_SINL = @HAVE_SINL@ HAVE_SLEEP = @HAVE_SLEEP@ HAVE_SQRTL = @HAVE_SQRTL@ HAVE_STDINT_H = @HAVE_STDINT_H@ HAVE_STPCPY = @HAVE_STPCPY@ HAVE_STPNCPY = @HAVE_STPNCPY@ HAVE_STRCASECMP = @HAVE_STRCASECMP@ HAVE_STRCASESTR = @HAVE_STRCASESTR@ HAVE_STRCHRNUL = @HAVE_STRCHRNUL@ HAVE_STRPBRK = @HAVE_STRPBRK@ HAVE_STRSEP = @HAVE_STRSEP@ HAVE_STRTOD = @HAVE_STRTOD@ HAVE_STRTOLL = @HAVE_STRTOLL@ HAVE_STRTOULL = @HAVE_STRTOULL@ HAVE_STRUCT_ADDRINFO = @HAVE_STRUCT_ADDRINFO@ HAVE_STRUCT_RANDOM_DATA = @HAVE_STRUCT_RANDOM_DATA@ HAVE_STRUCT_SIGACTION_SA_SIGACTION = @HAVE_STRUCT_SIGACTION_SA_SIGACTION@ HAVE_STRUCT_SOCKADDR_STORAGE = @HAVE_STRUCT_SOCKADDR_STORAGE@ HAVE_STRUCT_TIMEVAL = @HAVE_STRUCT_TIMEVAL@ HAVE_STRUCT_UTSNAME = @HAVE_STRUCT_UTSNAME@ HAVE_STRVERSCMP = @HAVE_STRVERSCMP@ HAVE_SYMLINK = @HAVE_SYMLINK@ HAVE_SYMLINKAT = @HAVE_SYMLINKAT@ HAVE_SYS_BITYPES_H = @HAVE_SYS_BITYPES_H@ HAVE_SYS_INTTYPES_H = @HAVE_SYS_INTTYPES_H@ HAVE_SYS_IOCTL_H = @HAVE_SYS_IOCTL_H@ HAVE_SYS_LOADAVG_H = @HAVE_SYS_LOADAVG_H@ HAVE_SYS_PARAM_H = @HAVE_SYS_PARAM_H@ HAVE_SYS_SELECT_H = @HAVE_SYS_SELECT_H@ HAVE_SYS_SOCKET_H = @HAVE_SYS_SOCKET_H@ HAVE_SYS_TIME_H = @HAVE_SYS_TIME_H@ HAVE_SYS_TYPES_H = @HAVE_SYS_TYPES_H@ HAVE_SYS_UTSNAME_H = @HAVE_SYS_UTSNAME_H@ HAVE_TANL = @HAVE_TANL@ HAVE_TYPE_VOLATILE_SIG_ATOMIC_T = @HAVE_TYPE_VOLATILE_SIG_ATOMIC_T@ HAVE_UNAME = @HAVE_UNAME@ HAVE_UNISTD_H = @HAVE_UNISTD_H@ HAVE_UNLINKAT = @HAVE_UNLINKAT@ HAVE_UNSETENV = @HAVE_UNSETENV@ HAVE_UNSIGNED_LONG_LONG_INT = @HAVE_UNSIGNED_LONG_LONG_INT@ HAVE_USLEEP = @HAVE_USLEEP@ HAVE_UTIMENSAT = @HAVE_UTIMENSAT@ HAVE_VASPRINTF = @HAVE_VASPRINTF@ HAVE_VDPRINTF = @HAVE_VDPRINTF@ HAVE_WCHAR_H = @HAVE_WCHAR_H@ HAVE_WCHAR_T = @HAVE_WCHAR_T@ HAVE_WCRTOMB = @HAVE_WCRTOMB@ HAVE_WCSNRTOMBS = @HAVE_WCSNRTOMBS@ HAVE_WCSRTOMBS = @HAVE_WCSRTOMBS@ HAVE_WCTYPE_H = @HAVE_WCTYPE_H@ HAVE_WINSOCK2_H = @HAVE_WINSOCK2_H@ HAVE_WINT_T = @HAVE_WINT_T@ HAVE_WS2TCPIP_H = @HAVE_WS2TCPIP_H@ HAVE__BOOL = @HAVE__BOOL@ HOSTENT_LIB = @HOSTENT_LIB@ HTML_DIR = @HTML_DIR@ INCLTDL = @INCLTDL@ INCLUDE_NEXT = @INCLUDE_NEXT@ INCLUDE_NEXT_AS_FIRST_DIRECTIVE = @INCLUDE_NEXT_AS_FIRST_DIRECTIVE@ INET_NTOP_LIB = @INET_NTOP_LIB@ INET_PTON_LIB = @INET_PTON_LIB@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LD = @LD@ LDFLAGS = @LDFLAGS@ LEX = @LEX@ LEXLIB = @LEXLIB@ LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@ LIBADD_DL = @LIBADD_DL@ LIBADD_DLD_LINK = @LIBADD_DLD_LINK@ LIBADD_DLOPEN = @LIBADD_DLOPEN@ LIBADD_SHL_LOAD = @LIBADD_SHL_LOAD@ LIBDIR = @LIBDIR@ LIBGCRYPT_CFLAGS = @LIBGCRYPT_CFLAGS@ LIBGCRYPT_CONFIG = @LIBGCRYPT_CONFIG@ LIBGCRYPT_LIBS = @LIBGCRYPT_LIBS@ LIBGNUTLS_CFLAGS = @LIBGNUTLS_CFLAGS@ LIBGNUTLS_CONFIG = @LIBGNUTLS_CONFIG@ LIBGNUTLS_EXTRA_CFLAGS = @LIBGNUTLS_EXTRA_CFLAGS@ LIBGNUTLS_EXTRA_CONFIG = @LIBGNUTLS_EXTRA_CONFIG@ LIBGNUTLS_EXTRA_LIBS = @LIBGNUTLS_EXTRA_LIBS@ LIBGNUTLS_LIBS = @LIBGNUTLS_LIBS@ LIBINTL = @LIBINTL@ LIBLTDL = @LIBLTDL@ LIBMULTITHREAD = @LIBMULTITHREAD@ LIBOBJS = @LIBOBJS@ LIBPRELUDECPP_SONAME = @LIBPRELUDECPP_SONAME@ LIBPRELUDE_CFLAGS = @LIBPRELUDE_CFLAGS@ LIBPRELUDE_LIBS = @LIBPRELUDE_LIBS@ LIBPRELUDE_SONAME = @LIBPRELUDE_SONAME@ LIBPTH = @LIBPTH@ LIBPTH_PREFIX = @LIBPTH_PREFIX@ LIBS = @LIBS@ LIBSOCKET = @LIBSOCKET@ LIBTESTS_LIBDEPS = @LIBTESTS_LIBDEPS@ LIBTHREAD = @LIBTHREAD@ LIBTOOL = @LIBTOOL@ LIPO = @LIPO@ LN_S = @LN_S@ LOCALCHARSET_TESTS_ENVIRONMENT = @LOCALCHARSET_TESTS_ENVIRONMENT@ LOCALE_FR = @LOCALE_FR@ LOCALE_FR_UTF8 = @LOCALE_FR_UTF8@ LOCALE_JA = @LOCALE_JA@ LOCALE_TR_UTF8 = @LOCALE_TR_UTF8@ LOCALE_ZH_CN = @LOCALE_ZH_CN@ LOCALSTATEDIR = @LOCALSTATEDIR@ LTALLOCA = @LTALLOCA@ LTDLDEPS = @LTDLDEPS@ LTDLINCL = @LTDLINCL@ LTDLOPEN = @LTDLOPEN@ LTLIBINTL = @LTLIBINTL@ LTLIBMULTITHREAD = @LTLIBMULTITHREAD@ LTLIBOBJS = @LTLIBOBJS@ LTLIBPTH = @LTLIBPTH@ LTLIBTHREAD = @LTLIBTHREAD@ LT_CONFIG_H = @LT_CONFIG_H@ LT_DLLOADERS = @LT_DLLOADERS@ LT_DLPREOPEN = @LT_DLPREOPEN@ LUA_CFLAGS = @LUA_CFLAGS@ LUA_CONFIG = @LUA_CONFIG@ LUA_LIBS = @LUA_LIBS@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MKDIR_P = @MKDIR_P@ NETDB_H = @NETDB_H@ NETINET_IN_H = @NETINET_IN_H@ NEXT_ARPA_INET_H = @NEXT_ARPA_INET_H@ NEXT_AS_FIRST_DIRECTIVE_ARPA_INET_H = @NEXT_AS_FIRST_DIRECTIVE_ARPA_INET_H@ NEXT_AS_FIRST_DIRECTIVE_ERRNO_H = @NEXT_AS_FIRST_DIRECTIVE_ERRNO_H@ NEXT_AS_FIRST_DIRECTIVE_FCNTL_H = @NEXT_AS_FIRST_DIRECTIVE_FCNTL_H@ NEXT_AS_FIRST_DIRECTIVE_FLOAT_H = @NEXT_AS_FIRST_DIRECTIVE_FLOAT_H@ NEXT_AS_FIRST_DIRECTIVE_LANGINFO_H = @NEXT_AS_FIRST_DIRECTIVE_LANGINFO_H@ NEXT_AS_FIRST_DIRECTIVE_MATH_H = @NEXT_AS_FIRST_DIRECTIVE_MATH_H@ NEXT_AS_FIRST_DIRECTIVE_NETDB_H = @NEXT_AS_FIRST_DIRECTIVE_NETDB_H@ NEXT_AS_FIRST_DIRECTIVE_NETINET_IN_H = @NEXT_AS_FIRST_DIRECTIVE_NETINET_IN_H@ NEXT_AS_FIRST_DIRECTIVE_SIGNAL_H = @NEXT_AS_FIRST_DIRECTIVE_SIGNAL_H@ NEXT_AS_FIRST_DIRECTIVE_STDDEF_H = @NEXT_AS_FIRST_DIRECTIVE_STDDEF_H@ NEXT_AS_FIRST_DIRECTIVE_STDINT_H = @NEXT_AS_FIRST_DIRECTIVE_STDINT_H@ NEXT_AS_FIRST_DIRECTIVE_STDIO_H = @NEXT_AS_FIRST_DIRECTIVE_STDIO_H@ NEXT_AS_FIRST_DIRECTIVE_STDLIB_H = @NEXT_AS_FIRST_DIRECTIVE_STDLIB_H@ NEXT_AS_FIRST_DIRECTIVE_STRINGS_H = @NEXT_AS_FIRST_DIRECTIVE_STRINGS_H@ NEXT_AS_FIRST_DIRECTIVE_STRING_H = @NEXT_AS_FIRST_DIRECTIVE_STRING_H@ NEXT_AS_FIRST_DIRECTIVE_SYS_IOCTL_H = @NEXT_AS_FIRST_DIRECTIVE_SYS_IOCTL_H@ NEXT_AS_FIRST_DIRECTIVE_SYS_SELECT_H = @NEXT_AS_FIRST_DIRECTIVE_SYS_SELECT_H@ NEXT_AS_FIRST_DIRECTIVE_SYS_SOCKET_H = @NEXT_AS_FIRST_DIRECTIVE_SYS_SOCKET_H@ NEXT_AS_FIRST_DIRECTIVE_SYS_STAT_H = @NEXT_AS_FIRST_DIRECTIVE_SYS_STAT_H@ NEXT_AS_FIRST_DIRECTIVE_SYS_TIME_H = @NEXT_AS_FIRST_DIRECTIVE_SYS_TIME_H@ NEXT_AS_FIRST_DIRECTIVE_SYS_UTSNAME_H = @NEXT_AS_FIRST_DIRECTIVE_SYS_UTSNAME_H@ NEXT_AS_FIRST_DIRECTIVE_TIME_H = @NEXT_AS_FIRST_DIRECTIVE_TIME_H@ NEXT_AS_FIRST_DIRECTIVE_UNISTD_H = @NEXT_AS_FIRST_DIRECTIVE_UNISTD_H@ NEXT_AS_FIRST_DIRECTIVE_WCHAR_H = @NEXT_AS_FIRST_DIRECTIVE_WCHAR_H@ NEXT_AS_FIRST_DIRECTIVE_WCTYPE_H = @NEXT_AS_FIRST_DIRECTIVE_WCTYPE_H@ NEXT_ERRNO_H = @NEXT_ERRNO_H@ NEXT_FCNTL_H = @NEXT_FCNTL_H@ NEXT_FLOAT_H = @NEXT_FLOAT_H@ NEXT_LANGINFO_H = @NEXT_LANGINFO_H@ NEXT_MATH_H = @NEXT_MATH_H@ NEXT_NETDB_H = @NEXT_NETDB_H@ NEXT_NETINET_IN_H = @NEXT_NETINET_IN_H@ NEXT_SIGNAL_H = @NEXT_SIGNAL_H@ NEXT_STDDEF_H = @NEXT_STDDEF_H@ NEXT_STDINT_H = @NEXT_STDINT_H@ NEXT_STDIO_H = @NEXT_STDIO_H@ NEXT_STDLIB_H = @NEXT_STDLIB_H@ NEXT_STRINGS_H = @NEXT_STRINGS_H@ NEXT_STRING_H = @NEXT_STRING_H@ NEXT_SYS_IOCTL_H = @NEXT_SYS_IOCTL_H@ NEXT_SYS_SELECT_H = @NEXT_SYS_SELECT_H@ NEXT_SYS_SOCKET_H = @NEXT_SYS_SOCKET_H@ NEXT_SYS_STAT_H = @NEXT_SYS_STAT_H@ NEXT_SYS_TIME_H = @NEXT_SYS_TIME_H@ NEXT_SYS_UTSNAME_H = @NEXT_SYS_UTSNAME_H@ NEXT_TIME_H = @NEXT_TIME_H@ NEXT_UNISTD_H = @NEXT_UNISTD_H@ NEXT_WCHAR_H = @NEXT_WCHAR_H@ NEXT_WCTYPE_H = @NEXT_WCTYPE_H@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PCFLAGS = @PCFLAGS@ PERL = @PERL@ PERL_EXTRA_PARAMS = @PERL_EXTRA_PARAMS@ PKG_CONFIG = @PKG_CONFIG@ POLL_H = @POLL_H@ PRAGMA_SYSTEM_HEADER = @PRAGMA_SYSTEM_HEADER@ PRELUDE_ADMIN_CFLAGS = @PRELUDE_ADMIN_CFLAGS@ PRELUDE_ADMIN_LIBS = @PRELUDE_ADMIN_LIBS@ PRELUDE_CONFIG_DIR = @PRELUDE_CONFIG_DIR@ PRELUDE_SPOOL_DIR = @PRELUDE_SPOOL_DIR@ PTHREAD_CFLAGS = @PTHREAD_CFLAGS@ PTHREAD_LDFLAGS = @PTHREAD_LDFLAGS@ PTHREAD_LIBS = @PTHREAD_LIBS@ PTRDIFF_T_SUFFIX = @PTRDIFF_T_SUFFIX@ PYTHON = @PYTHON@ RANLIB = @RANLIB@ RELOCATABLE = @RELOCATABLE@ REPLACE_BTOWC = @REPLACE_BTOWC@ REPLACE_CANONICALIZE_FILE_NAME = @REPLACE_CANONICALIZE_FILE_NAME@ REPLACE_CEILF = @REPLACE_CEILF@ REPLACE_CEILL = @REPLACE_CEILL@ REPLACE_CHOWN = @REPLACE_CHOWN@ REPLACE_CLOSE = @REPLACE_CLOSE@ REPLACE_DPRINTF = @REPLACE_DPRINTF@ REPLACE_DUP = @REPLACE_DUP@ REPLACE_DUP2 = @REPLACE_DUP2@ REPLACE_FCHDIR = @REPLACE_FCHDIR@ REPLACE_FCHOWNAT = @REPLACE_FCHOWNAT@ REPLACE_FCLOSE = @REPLACE_FCLOSE@ REPLACE_FCNTL = @REPLACE_FCNTL@ REPLACE_FFLUSH = @REPLACE_FFLUSH@ REPLACE_FLOORF = @REPLACE_FLOORF@ REPLACE_FLOORL = @REPLACE_FLOORL@ REPLACE_FOPEN = @REPLACE_FOPEN@ REPLACE_FPRINTF = @REPLACE_FPRINTF@ REPLACE_FPURGE = @REPLACE_FPURGE@ REPLACE_FREOPEN = @REPLACE_FREOPEN@ REPLACE_FREXP = @REPLACE_FREXP@ REPLACE_FREXPL = @REPLACE_FREXPL@ REPLACE_FSEEK = @REPLACE_FSEEK@ REPLACE_FSEEKO = @REPLACE_FSEEKO@ REPLACE_FSTAT = @REPLACE_FSTAT@ REPLACE_FSTATAT = @REPLACE_FSTATAT@ REPLACE_FTELL = @REPLACE_FTELL@ REPLACE_FTELLO = @REPLACE_FTELLO@ REPLACE_FUTIMENS = @REPLACE_FUTIMENS@ REPLACE_GETCWD = @REPLACE_GETCWD@ REPLACE_GETDELIM = @REPLACE_GETDELIM@ REPLACE_GETGROUPS = @REPLACE_GETGROUPS@ REPLACE_GETLINE = @REPLACE_GETLINE@ REPLACE_GETPAGESIZE = @REPLACE_GETPAGESIZE@ REPLACE_GETTIMEOFDAY = @REPLACE_GETTIMEOFDAY@ REPLACE_HUGE_VAL = @REPLACE_HUGE_VAL@ REPLACE_ISFINITE = @REPLACE_ISFINITE@ REPLACE_ISINF = @REPLACE_ISINF@ REPLACE_ISNAN = @REPLACE_ISNAN@ REPLACE_ISWCNTRL = @REPLACE_ISWCNTRL@ REPLACE_LCHOWN = @REPLACE_LCHOWN@ REPLACE_LDEXPL = @REPLACE_LDEXPL@ REPLACE_LINK = @REPLACE_LINK@ REPLACE_LINKAT = @REPLACE_LINKAT@ REPLACE_LOCALTIME_R = @REPLACE_LOCALTIME_R@ REPLACE_LSEEK = @REPLACE_LSEEK@ REPLACE_LSTAT = @REPLACE_LSTAT@ REPLACE_MBRLEN = @REPLACE_MBRLEN@ REPLACE_MBRTOWC = @REPLACE_MBRTOWC@ REPLACE_MBSINIT = @REPLACE_MBSINIT@ REPLACE_MBSNRTOWCS = @REPLACE_MBSNRTOWCS@ REPLACE_MBSRTOWCS = @REPLACE_MBSRTOWCS@ REPLACE_MBSTATE_T = @REPLACE_MBSTATE_T@ REPLACE_MEMCHR = @REPLACE_MEMCHR@ REPLACE_MEMMEM = @REPLACE_MEMMEM@ REPLACE_MKDIR = @REPLACE_MKDIR@ REPLACE_MKFIFO = @REPLACE_MKFIFO@ REPLACE_MKNOD = @REPLACE_MKNOD@ REPLACE_MKSTEMP = @REPLACE_MKSTEMP@ REPLACE_MKTIME = @REPLACE_MKTIME@ REPLACE_NAN = @REPLACE_NAN@ REPLACE_NANOSLEEP = @REPLACE_NANOSLEEP@ REPLACE_NL_LANGINFO = @REPLACE_NL_LANGINFO@ REPLACE_NULL = @REPLACE_NULL@ REPLACE_OBSTACK_PRINTF = @REPLACE_OBSTACK_PRINTF@ REPLACE_OPEN = @REPLACE_OPEN@ REPLACE_OPENAT = @REPLACE_OPENAT@ REPLACE_PERROR = @REPLACE_PERROR@ REPLACE_POPEN = @REPLACE_POPEN@ REPLACE_PREAD = @REPLACE_PREAD@ REPLACE_PRINTF = @REPLACE_PRINTF@ REPLACE_PUTENV = @REPLACE_PUTENV@ REPLACE_READLINK = @REPLACE_READLINK@ REPLACE_REALPATH = @REPLACE_REALPATH@ REPLACE_REMOVE = @REPLACE_REMOVE@ REPLACE_RENAME = @REPLACE_RENAME@ REPLACE_RENAMEAT = @REPLACE_RENAMEAT@ REPLACE_RMDIR = @REPLACE_RMDIR@ REPLACE_ROUND = @REPLACE_ROUND@ REPLACE_ROUNDF = @REPLACE_ROUNDF@ REPLACE_ROUNDL = @REPLACE_ROUNDL@ REPLACE_SELECT = @REPLACE_SELECT@ REPLACE_SETENV = @REPLACE_SETENV@ REPLACE_SIGNBIT = @REPLACE_SIGNBIT@ REPLACE_SIGNBIT_USING_GCC = @REPLACE_SIGNBIT_USING_GCC@ REPLACE_SLEEP = @REPLACE_SLEEP@ REPLACE_SNPRINTF = @REPLACE_SNPRINTF@ REPLACE_SPRINTF = @REPLACE_SPRINTF@ REPLACE_STAT = @REPLACE_STAT@ REPLACE_STDIO_WRITE_FUNCS = @REPLACE_STDIO_WRITE_FUNCS@ REPLACE_STRCASESTR = @REPLACE_STRCASESTR@ REPLACE_STRDUP = @REPLACE_STRDUP@ REPLACE_STRERROR = @REPLACE_STRERROR@ REPLACE_STRNDUP = @REPLACE_STRNDUP@ REPLACE_STRPTIME = @REPLACE_STRPTIME@ REPLACE_STRSIGNAL = @REPLACE_STRSIGNAL@ REPLACE_STRSTR = @REPLACE_STRSTR@ REPLACE_STRTOD = @REPLACE_STRTOD@ REPLACE_STRTOK_R = @REPLACE_STRTOK_R@ REPLACE_SYMLINK = @REPLACE_SYMLINK@ REPLACE_TIMEGM = @REPLACE_TIMEGM@ REPLACE_TRUNCL = @REPLACE_TRUNCL@ REPLACE_UNLINK = @REPLACE_UNLINK@ REPLACE_UNLINKAT = @REPLACE_UNLINKAT@ REPLACE_UNSETENV = @REPLACE_UNSETENV@ REPLACE_USLEEP = @REPLACE_USLEEP@ REPLACE_UTIMENSAT = @REPLACE_UTIMENSAT@ REPLACE_VASPRINTF = @REPLACE_VASPRINTF@ REPLACE_VDPRINTF = @REPLACE_VDPRINTF@ REPLACE_VFPRINTF = @REPLACE_VFPRINTF@ REPLACE_VPRINTF = @REPLACE_VPRINTF@ REPLACE_VSNPRINTF = @REPLACE_VSNPRINTF@ REPLACE_VSPRINTF = @REPLACE_VSPRINTF@ REPLACE_WCRTOMB = @REPLACE_WCRTOMB@ REPLACE_WCSNRTOMBS = @REPLACE_WCSNRTOMBS@ REPLACE_WCSRTOMBS = @REPLACE_WCSRTOMBS@ REPLACE_WCTOB = @REPLACE_WCTOB@ REPLACE_WCWIDTH = @REPLACE_WCWIDTH@ REPLACE_WRITE = @REPLACE_WRITE@ RUBY = @RUBY@ RUBY_CCFLAGS = @RUBY_CCFLAGS@ RUBY_EXEC_PREFIX = @RUBY_EXEC_PREFIX@ RUBY_INCLUDES = @RUBY_INCLUDES@ RUBY_LIBS = @RUBY_LIBS@ RUBY_PLATFORM = @RUBY_PLATFORM@ RUBY_PREFIX = @RUBY_PREFIX@ RUBY_VERSION = @RUBY_VERSION@ SED = @SED@ SERVENT_LIB = @SERVENT_LIB@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ SIG_ATOMIC_T_SUFFIX = @SIG_ATOMIC_T_SUFFIX@ SIZE_T_SUFFIX = @SIZE_T_SUFFIX@ STDBOOL_H = @STDBOOL_H@ STDDEF_H = @STDDEF_H@ STDINT_H = @STDINT_H@ STRIP = @STRIP@ SWIG = @SWIG@ SYSCONFDIR = @SYSCONFDIR@ SYS_IOCTL_H_HAVE_WINSOCK2_H = @SYS_IOCTL_H_HAVE_WINSOCK2_H@ SYS_IOCTL_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS = @SYS_IOCTL_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS@ SYS_SOCKET_H = @SYS_SOCKET_H@ SYS_TIME_H_DEFINES_STRUCT_TIMESPEC = @SYS_TIME_H_DEFINES_STRUCT_TIMESPEC@ TIME_H_DEFINES_STRUCT_TIMESPEC = @TIME_H_DEFINES_STRUCT_TIMESPEC@ UNDEFINE_STRTOK_R = @UNDEFINE_STRTOK_R@ UNISTD_H_HAVE_WINSOCK2_H = @UNISTD_H_HAVE_WINSOCK2_H@ UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS = @UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS@ VALGRIND = @VALGRIND@ VERSION = @VERSION@ WCHAR_T_SUFFIX = @WCHAR_T_SUFFIX@ WCTYPE_H = @WCTYPE_H@ WINT_T_SUFFIX = @WINT_T_SUFFIX@ YACC = @YACC@ YFLAGS = @YFLAGS@ YIELD_LIB = @YIELD_LIB@ __PRELUDE_64BIT_FORMAT_PREFIX = @__PRELUDE_64BIT_FORMAT_PREFIX@ __PRELUDE_HAVE_64BIT_LONG = @__PRELUDE_HAVE_64BIT_LONG@ __PRELUDE_HAVE_INTTYPES_H = @__PRELUDE_HAVE_INTTYPES_H@ __PRELUDE_HAVE_STDINT_H = @__PRELUDE_HAVE_STDINT_H@ __PRELUDE_STDINT_HAVE_UINT16 = @__PRELUDE_STDINT_HAVE_UINT16@ __PRELUDE_STDINT_HAVE_UINT32 = @__PRELUDE_STDINT_HAVE_UINT32@ __PRELUDE_STDINT_HAVE_UINT64 = @__PRELUDE_STDINT_HAVE_UINT64@ __PRELUDE_STDINT_HAVE_UINT8 = @__PRELUDE_STDINT_HAVE_UINT8@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ gl_LIBOBJS = @gl_LIBOBJS@ gl_LTLIBOBJS = @gl_LTLIBOBJS@ gltests_LIBOBJS = @gltests_LIBOBJS@ gltests_LTLIBOBJS = @gltests_LTLIBOBJS@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ lt_ECHO = @lt_ECHO@ ltdl_LIBOBJS = @ltdl_LIBOBJS@ ltdl_LTLIBOBJS = @ltdl_LTLIBOBJS@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ pkgrbexecdir = @pkgrbexecdir@ pkgrubydir = @pkgrubydir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ rbexecdir = @rbexecdir@ rubydir = @rubydir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sys_symbol_underscore = @sys_symbol_underscore@ sysconfdir = @sysconfdir@ target = @target@ target_alias = @target_alias@ target_cpu = @target_cpu@ target_os = @target_os@ target_vendor = @target_vendor@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ @HAVE_EASY_BINDINGS_TRUE@EXTRA_DIST = libpreludecpp-lua.i PreludeEasy.cxx @HAVE_EASY_BINDINGS_TRUE@@HAVE_LUA_TRUE@AM_CPPFLAGS = -I@top_srcdir@ -I@top_builddir@/src/include -I@top_srcdir@/src/include -I@top_builddir@/src/libprelude-error -I@top_srcdir@/bindings/c++/include @LUA_CFLAGS@ -I@top_srcdir@/libmissing -I@top_builddir@/libmissing @HAVE_EASY_BINDINGS_TRUE@@HAVE_LUA_TRUE@PreludeEasy_la_LDFLAGS = -module -avoid-version @LUA_LIBS@ @HAVE_EASY_BINDINGS_TRUE@@HAVE_LUA_TRUE@PreludeEasy_la_LIBADD = $(top_builddir)/bindings/c++/.libs/libpreludecpp.la @HAVE_EASY_BINDINGS_TRUE@@HAVE_LUA_TRUE@PreludeEasy_la_SOURCES = PreludeEasy.cxx @HAVE_EASY_BINDINGS_TRUE@@HAVE_LUA_TRUE@PreludeEasydir = $(libdir) @HAVE_EASY_BINDINGS_TRUE@@HAVE_LUA_TRUE@PreludeEasy_LTLIBRARIES = PreludeEasy.la all: all-am .SUFFIXES: .SUFFIXES: .cxx .lo .o .obj $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu bindings/lua/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu bindings/lua/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): install-PreludeEasyLTLIBRARIES: $(PreludeEasy_LTLIBRARIES) @$(NORMAL_INSTALL) test -z "$(PreludeEasydir)" || $(MKDIR_P) "$(DESTDIR)$(PreludeEasydir)" @list='$(PreludeEasy_LTLIBRARIES)'; test -n "$(PreludeEasydir)" || list=; \ list2=; for p in $$list; do \ if test -f $$p; then \ list2="$$list2 $$p"; \ else :; fi; \ done; \ test -z "$$list2" || { \ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(PreludeEasydir)'"; \ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(PreludeEasydir)"; \ } uninstall-PreludeEasyLTLIBRARIES: @$(NORMAL_UNINSTALL) @list='$(PreludeEasy_LTLIBRARIES)'; test -n "$(PreludeEasydir)" || list=; \ for p in $$list; do \ $(am__strip_dir) \ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(PreludeEasydir)/$$f'"; \ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(PreludeEasydir)/$$f"; \ done clean-PreludeEasyLTLIBRARIES: -test -z "$(PreludeEasy_LTLIBRARIES)" || rm -f $(PreludeEasy_LTLIBRARIES) @list='$(PreludeEasy_LTLIBRARIES)'; for p in $$list; do \ dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ test "$$dir" != "$$p" || dir=.; \ echo "rm -f \"$${dir}/so_locations\""; \ rm -f "$${dir}/so_locations"; \ done PreludeEasy.la: $(PreludeEasy_la_OBJECTS) $(PreludeEasy_la_DEPENDENCIES) $(PreludeEasy_la_LINK) $(am_PreludeEasy_la_rpath) $(PreludeEasy_la_OBJECTS) $(PreludeEasy_la_LIBADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/PreludeEasy.Plo@am__quote@ .cxx.o: @am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ $< .cxx.obj: @am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'` .cxx.lo: @am__fastdepCXX_TRUE@ $(LTCXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(LTCXXCOMPILE) -c -o $@ $< mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ mkid -fID $$unique tags: TAGS TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) set x; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: CTAGS CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(LTLIBRARIES) installdirs: for dir in "$(DESTDIR)$(PreludeEasydir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-PreludeEasyLTLIBRARIES clean-generic clean-libtool \ mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-PreludeEasyLTLIBRARIES install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-PreludeEasyLTLIBRARIES .MAKE: install-am install-strip .PHONY: CTAGS GTAGS all all-am check check-am clean \ clean-PreludeEasyLTLIBRARIES clean-generic clean-libtool ctags \ distclean distclean-compile distclean-generic \ distclean-libtool distclean-tags distdir dvi dvi-am html \ html-am info info-am install install-PreludeEasyLTLIBRARIES \ install-am install-data install-data-am install-dvi \ install-dvi-am install-exec install-exec-am install-html \ install-html-am install-info install-info-am install-man \ install-pdf install-pdf-am install-ps install-ps-am \ install-strip installcheck installcheck-am installdirs \ maintainer-clean maintainer-clean-generic mostlyclean \ mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ pdf pdf-am ps ps-am tags uninstall \ uninstall-PreludeEasyLTLIBRARIES uninstall-am @HAVE_EASY_BINDINGS_TRUE@@HAVE_LUA_TRUE@PreludeEasy.cxx: $(top_srcdir)/bindings/c++/include/*.hxx $(top_srcdir)/bindings/libpreludecpp.i libpreludecpp-lua.i @HAVE_EASY_BINDINGS_TRUE@@HAVE_LUA_TRUE@@HAVE_SWIG_TRUE@ $(SWIG) -c++ -I$(top_srcdir)/bindings -I$(top_srcdir)/bindings/c++/include -I$(top_srcdir)/src/include -I$(top_srcdir)/src/libprelude-error -lua -o $@ libpreludecpp.i -include $(top_srcdir)/git.mk # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: libprelude-1.0.0/bindings/lua/libpreludecpp-lua.i0000664000076400007640000002564411225122037016741 00000000000000# Exception map %typemap(throws) Prelude::PreludeError %{ SWIG_exception(SWIG_RuntimeError, $1.what()); %}; # Lua overloading fixes %ignore IDMEFCriteria(std::string const &); %ignore IDMEFValue(int8_t); %ignore IDMEFValue(uint8_t); %ignore IDMEFValue(int16_t); %ignore IDMEFValue(uint16_t); %ignore IDMEFValue(int32_t); %ignore IDMEFValue(uint32_t); %ignore IDMEFValue(int64_t); %ignore IDMEFValue(uint64_t); %ignore IDMEFValue(float); %ignore IDMEFValue(std::string); %ignore Set(Prelude::IDMEF &, int8_t); %ignore Set(Prelude::IDMEF &, uint8_t); %ignore Set(Prelude::IDMEF &, int16_t); %ignore Set(Prelude::IDMEF &, uint16_t); %ignore Set(Prelude::IDMEF &, int32_t); %ignore Set(Prelude::IDMEF &, uint32_t); %ignore Set(Prelude::IDMEF &, int64_t); %ignore Set(Prelude::IDMEF &, uint64_t); %ignore Set(Prelude::IDMEF &, float); %ignore Set(Prelude::IDMEF &, std::string); %ignore Set(char const *, int8_t); %ignore Set(char const *, uint8_t); %ignore Set(char const *, int16_t); %ignore Set(char const *, uint16_t); %ignore Set(char const *, int32_t); %ignore Set(char const *, uint32_t); %ignore Set(char const *, int64_t); %ignore Set(char const *, uint64_t); %ignore Set(char const *, float); %ignore Set(char const *, std::string); # Conversion not allowed %ignore *::operator =; %ignore *::operator int() const; %ignore *::operator long() const; %ignore *::operator int32_t() const; %ignore *::operator uint32_t() const; %ignore *::operator int64_t() const; %ignore *::operator uint64_t() const; %ignore *::operator float() const; %ignore *::operator double() const; %ignore *::operator Prelude::IDMEFTime() const; %ignore operator <<; %ignore operator >>; %rename (__str__) *::operator const char *() const; %header { char *my_strdup(const char *in) { char *out = new char[strlen(in) + 1]; strcpy(out, in); return out; } } %ignore Prelude::IDMEFCriteria::operator const std::string() const; %newobject Prelude::IDMEFCriteria::__str__; %extend Prelude::IDMEFCriteria { char *__str__() { return my_strdup(self->ToString().c_str()); } } %ignore Prelude::IDMEFTime::operator const std::string() const; %newobject Prelude::IDMEFTime::__str__; %extend Prelude::IDMEFTime { char *__str__() { return my_strdup(self->ToString().c_str()); } } %ignore Prelude::IDMEF::operator const std::string() const; %newobject Prelude::IDMEF::__str__; %extend Prelude::IDMEF { char *__str__() { return my_strdup(self->ToString().c_str()); } } %header %{ #define SWIG_From_int(result) lua_pushnumber(L, (lua_Number) result) #define SWIG_From_float(result) lua_pushnumber(L, (lua_Number) result) #define SWIG_From_double(result) lua_pushnumber(L, (lua_Number) result) #define SWIG_From_unsigned_SS_int(result) lua_pushnumber(L, (lua_Number) result) #define SWIG_From_long_SS_long(result) lua_pushnumber(L, (lua_Number) result) #define SWIG_From_unsigned_SS_long_SS_long(result) lua_pushnumber(L, (lua_Number) result) #define SWIG_FromCharPtr(result) lua_pushstring(L, result) #define SWIG_FromCharPtrAndSize(result, len) lua_pushlstring(L, result, len) extern "C" { int IDMEFValue_to_SWIG(lua_State* L, const IDMEFValue &result); } %} /* tell squid not to cast void * value */ %typemap(in) void *nocast_p { FILE **pf; pf = (FILE **)lua_touserdata(L, $input); if (pf == NULL) { lua_pushstring(L,"Argument is not a file"); SWIG_fail; } $1 = *pf; } %fragment("TransitionFunc", "header") { static int __prelude_log_func; static lua_State *__lua_state = NULL; static gl_thread_t __initial_thread; static void _cb_lua_log(int level, const char *str) { if ( (gl_thread_t) gl_thread_self() != __initial_thread ) return; lua_rawgeti(__lua_state, LUA_REGISTRYINDEX, __prelude_log_func); lua_pushnumber(__lua_state, level); lua_pushstring(__lua_state, str); lua_call(__lua_state, 2, 0); } static int _cb_lua_write(prelude_msgbuf_t *fd, prelude_msg_t *msg) { size_t ret; FILE *f = (FILE *) prelude_msgbuf_get_data(fd); ret = fwrite((const char *)prelude_msg_get_message_data(msg), 1, prelude_msg_get_len(msg), f); if ( ret != prelude_msg_get_len(msg) ) return prelude_error_from_errno(errno); prelude_msg_recycle(msg); return 0; } static ssize_t _cb_lua_read(prelude_io_t *fd, void *buf, size_t size) { ssize_t ret; FILE *f = (FILE *) prelude_io_get_fdptr(fd); ret = fread(buf, 1, size, f); if ( ret < 0 ) ret = prelude_error_from_errno(errno); else if ( ret == 0 ) ret = prelude_error(PRELUDE_ERROR_EOF); return ret; } }; %typemap(in, fragment="TransitionFunc") void (*log_cb)(int level, const char *log) { if ( ! lua_isfunction(L, -1) ) SWIG_exception(SWIG_ValueError, "Argument should be a function"); if ( __lua_state ) luaL_unref(L, LUA_REGISTRYINDEX, __prelude_log_func); __prelude_log_func = luaL_ref(L, LUA_REGISTRYINDEX); $1 = _cb_lua_log; __lua_state = L; }; %extend Prelude::IDMEF { void Write(void *nocast_p) { self->_genericWrite(_cb_lua_write, nocast_p); } void Read(void *nocast_p) { self->_genericRead(_cb_lua_read, nocast_p); } } %fragment("IDMEFValueList_to_SWIG", "header") { int IDMEFValueList_to_SWIG(lua_State *L, const Prelude::IDMEFValue &value) { bool is_list; int index = 0, ret; std::vector result = value; std::vector::const_iterator i; lua_newtable(L); for ( i = result.begin(); i != result.end(); i++ ) { ret = lua_checkstack(L, 2); if ( ret < 0 ) return ret; is_list = (i->GetType() == IDMEF_VALUE_TYPE_LIST); if ( is_list ) lua_pushnumber(L, ++index); ret = IDMEFValue_to_SWIG(L, *i); if ( ret < 0 ) return -1; if ( is_list ) lua_settable(L, -3); else lua_rawseti(L, -2, ++index); } return 1; } } %fragment("IDMEFValue_to_SWIG", "wrapper", fragment="IDMEFValueList_to_SWIG") { int IDMEFValue_to_SWIG(lua_State* L, const IDMEFValue &result) { int ret = 1; std::stringstream s; idmef_value_t *value = result; idmef_value_type_id_t type = result.GetType(); if ( type == IDMEF_VALUE_TYPE_STRING ) { prelude_string_t *str = idmef_value_get_string(value); SWIG_FromCharPtrAndSize(prelude_string_get_string(str), prelude_string_get_len(str)); } else if ( type == IDMEF_VALUE_TYPE_INT8 ) SWIG_From_int(idmef_value_get_int8(value)); else if ( type == IDMEF_VALUE_TYPE_UINT8 ) SWIG_From_unsigned_SS_int(idmef_value_get_uint8(value)); else if ( type == IDMEF_VALUE_TYPE_INT16 ) SWIG_From_int(idmef_value_get_int16(value)); else if ( type == IDMEF_VALUE_TYPE_UINT16 ) SWIG_From_unsigned_SS_int(idmef_value_get_uint16(value)); else if ( type == IDMEF_VALUE_TYPE_INT32 ) SWIG_From_int(idmef_value_get_int32(value)); else if ( type == IDMEF_VALUE_TYPE_UINT32 ) SWIG_From_unsigned_SS_int(idmef_value_get_uint32(value)); else if ( type == IDMEF_VALUE_TYPE_INT64 ) SWIG_From_long_SS_long(idmef_value_get_int64(value)); else if ( type == IDMEF_VALUE_TYPE_UINT64 ) SWIG_From_unsigned_SS_long_SS_long(idmef_value_get_uint64(value)); else if ( type == IDMEF_VALUE_TYPE_FLOAT ) SWIG_From_float(idmef_value_get_float(value)); else if ( type == IDMEF_VALUE_TYPE_DOUBLE ) SWIG_From_double(idmef_value_get_double(value)); else if ( type == IDMEF_VALUE_TYPE_ENUM ) { const char *s = idmef_class_enum_to_string(idmef_value_get_class(value), idmef_value_get_enum(value)); SWIG_FromCharPtr(s); } else if ( type == IDMEF_VALUE_TYPE_TIME ) { Prelude::IDMEFTime *time = new Prelude::IDMEFTime(idmef_time_ref(idmef_value_get_time(value))); SWIG_NewPointerObj(L, time, SWIGTYPE_p_Prelude__IDMEFTime, 1); } else if ( type == IDMEF_VALUE_TYPE_LIST ) ret = IDMEFValueList_to_SWIG(L, result); else if ( type == IDMEF_VALUE_TYPE_DATA ) { idmef_data_t *d = idmef_value_get_data(value); idmef_data_type_t t = idmef_data_get_type(d); if ( t == IDMEF_DATA_TYPE_CHAR || t == IDMEF_DATA_TYPE_CHAR_STRING || t == IDMEF_DATA_TYPE_BYTE || t == IDMEF_DATA_TYPE_BYTE_STRING ) SWIG_FromCharPtrAndSize((const char *)idmef_data_get_data(d), idmef_data_get_len(d)); else if ( t == IDMEF_DATA_TYPE_FLOAT ) SWIG_From_float(idmef_data_get_float(d)); else if ( t == IDMEF_DATA_TYPE_UINT32 ) SWIG_From_unsigned_SS_int(idmef_data_get_uint32(d)); else if ( t == IDMEF_DATA_TYPE_UINT64 ) SWIG_From_unsigned_SS_long_SS_long(idmef_data_get_uint64(d)); } else return -1; return ret; } } %typemap(out, fragment="IDMEFValue_to_SWIG") Prelude::IDMEFValue { int ret; if ( $1.IsNull() ) { lua_pushnil(L); SWIG_arg = 1; } else { SWIG_arg = IDMEFValue_to_SWIG(L, $1); if ( SWIG_arg < 0 ) { std::stringstream s; s << "IDMEFValue typemap does not handle value of type '" << idmef_value_type_to_string($1.GetType()) << "'"; SWIG_exception(SWIG_ValueError, s.str().c_str()); } } }; #define MAX(x, y) ((x) > (y) ? (x) : (y)) %init { int argc = 0, ret; static char *argv[1024]; __initial_thread = (gl_thread_t) gl_thread_self(); lua_getglobal(L, "arg"); if ( ! lua_istable(L, -1) ) return; lua_pushnil(L); while ( lua_next(L, -2) != 0 ) { int idx; const char *val; idx = lua_tonumber(L, -2); val = lua_tostring(L, -1); lua_pop(L, 1); if ( idx < 0 ) continue; if ( idx >= ((sizeof(argv) / sizeof(char *)) - 1) ) throw PreludeError("Argument index too large"); argv[idx] = strdup(val); argc = MAX(idx, argc); } argc++; argv[argc] = NULL; ret = prelude_init(&argc, argv); if ( ret < 0 ) throw PreludeError(ret); } libprelude-1.0.0/bindings/lua/PreludeEasy.cxx0000664000076400007640000112461611330606204016124 00000000000000/* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). * Version 1.3.40 * * This file is not intended to be easily readable and contains a number of * coding conventions designed to improve portability and efficiency. Do not make * changes to this file unless you know what you are doing--modify the SWIG * interface file instead. * ----------------------------------------------------------------------------- */ #define SWIGLUA #ifdef __cplusplus /* SwigValueWrapper is described in swig.swg */ template class SwigValueWrapper { struct SwigMovePointer { T *ptr; SwigMovePointer(T *p) : ptr(p) { } ~SwigMovePointer() { delete ptr; } SwigMovePointer& operator=(SwigMovePointer& rhs) { T* oldptr = ptr; ptr = 0; delete oldptr; ptr = rhs.ptr; rhs.ptr = 0; return *this; } } pointer; SwigValueWrapper& operator=(const SwigValueWrapper& rhs); SwigValueWrapper(const SwigValueWrapper& rhs); public: SwigValueWrapper() : pointer(0) { } SwigValueWrapper& operator=(const T& t) { SwigMovePointer tmp(new T(t)); pointer = tmp; return *this; } operator T&() const { return *pointer.ptr; } T *operator&() { return pointer.ptr; } }; template T SwigValueInit() { return T(); } #endif /* ----------------------------------------------------------------------------- * This section contains generic SWIG labels for method/variable * declarations/attributes, and other compiler dependent labels. * ----------------------------------------------------------------------------- */ /* template workaround for compilers that cannot correctly implement the C++ standard */ #ifndef SWIGTEMPLATEDISAMBIGUATOR # if defined(__SUNPRO_CC) && (__SUNPRO_CC <= 0x560) # define SWIGTEMPLATEDISAMBIGUATOR template # elif defined(__HP_aCC) /* Needed even with `aCC -AA' when `aCC -V' reports HP ANSI C++ B3910B A.03.55 */ /* If we find a maximum version that requires this, the test would be __HP_aCC <= 35500 for A.03.55 */ # define SWIGTEMPLATEDISAMBIGUATOR template # else # define SWIGTEMPLATEDISAMBIGUATOR # endif #endif /* inline attribute */ #ifndef SWIGINLINE # if defined(__cplusplus) || (defined(__GNUC__) && !defined(__STRICT_ANSI__)) # define SWIGINLINE inline # else # define SWIGINLINE # endif #endif /* attribute recognised by some compilers to avoid 'unused' warnings */ #ifndef SWIGUNUSED # if defined(__GNUC__) # if !(defined(__cplusplus)) || (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4)) # define SWIGUNUSED __attribute__ ((__unused__)) # else # define SWIGUNUSED # endif # elif defined(__ICC) # define SWIGUNUSED __attribute__ ((__unused__)) # else # define SWIGUNUSED # endif #endif #ifndef SWIG_MSC_UNSUPPRESS_4505 # if defined(_MSC_VER) # pragma warning(disable : 4505) /* unreferenced local function has been removed */ # endif #endif #ifndef SWIGUNUSEDPARM # ifdef __cplusplus # define SWIGUNUSEDPARM(p) # else # define SWIGUNUSEDPARM(p) p SWIGUNUSED # endif #endif /* internal SWIG method */ #ifndef SWIGINTERN # define SWIGINTERN static SWIGUNUSED #endif /* internal inline SWIG method */ #ifndef SWIGINTERNINLINE # define SWIGINTERNINLINE SWIGINTERN SWIGINLINE #endif /* exporting methods */ #if (__GNUC__ >= 4) || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4) # ifndef GCC_HASCLASSVISIBILITY # define GCC_HASCLASSVISIBILITY # endif #endif #ifndef SWIGEXPORT # if defined(_WIN32) || defined(__WIN32__) || defined(__CYGWIN__) # if defined(STATIC_LINKED) # define SWIGEXPORT # else # define SWIGEXPORT __declspec(dllexport) # endif # else # if defined(__GNUC__) && defined(GCC_HASCLASSVISIBILITY) # define SWIGEXPORT __attribute__ ((visibility("default"))) # else # define SWIGEXPORT # endif # endif #endif /* calling conventions for Windows */ #ifndef SWIGSTDCALL # if defined(_WIN32) || defined(__WIN32__) || defined(__CYGWIN__) # define SWIGSTDCALL __stdcall # else # define SWIGSTDCALL # endif #endif /* Deal with Microsoft's attempt at deprecating C standard runtime functions */ #if !defined(SWIG_NO_CRT_SECURE_NO_DEPRECATE) && defined(_MSC_VER) && !defined(_CRT_SECURE_NO_DEPRECATE) # define _CRT_SECURE_NO_DEPRECATE #endif /* Deal with Microsoft's attempt at deprecating methods in the standard C++ library */ #if !defined(SWIG_NO_SCL_SECURE_NO_DEPRECATE) && defined(_MSC_VER) && !defined(_SCL_SECURE_NO_DEPRECATE) # define _SCL_SECURE_NO_DEPRECATE #endif /* ----------------------------------------------------------------------------- * swigrun.swg * * This file contains generic C API SWIG runtime support for pointer * type checking. * ----------------------------------------------------------------------------- */ /* This should only be incremented when either the layout of swig_type_info changes, or for whatever reason, the runtime changes incompatibly */ #define SWIG_RUNTIME_VERSION "4" /* define SWIG_TYPE_TABLE_NAME as "SWIG_TYPE_TABLE" */ #ifdef SWIG_TYPE_TABLE # define SWIG_QUOTE_STRING(x) #x # define SWIG_EXPAND_AND_QUOTE_STRING(x) SWIG_QUOTE_STRING(x) # define SWIG_TYPE_TABLE_NAME SWIG_EXPAND_AND_QUOTE_STRING(SWIG_TYPE_TABLE) #else # define SWIG_TYPE_TABLE_NAME #endif /* You can use the SWIGRUNTIME and SWIGRUNTIMEINLINE macros for creating a static or dynamic library from the SWIG runtime code. In 99.9% of the cases, SWIG just needs to declare them as 'static'. But only do this if strictly necessary, ie, if you have problems with your compiler or suchlike. */ #ifndef SWIGRUNTIME # define SWIGRUNTIME SWIGINTERN #endif #ifndef SWIGRUNTIMEINLINE # define SWIGRUNTIMEINLINE SWIGRUNTIME SWIGINLINE #endif /* Generic buffer size */ #ifndef SWIG_BUFFER_SIZE # define SWIG_BUFFER_SIZE 1024 #endif /* Flags for pointer conversions */ #define SWIG_POINTER_DISOWN 0x1 #define SWIG_CAST_NEW_MEMORY 0x2 /* Flags for new pointer objects */ #define SWIG_POINTER_OWN 0x1 /* Flags/methods for returning states. The SWIG conversion methods, as ConvertPtr, return and integer that tells if the conversion was successful or not. And if not, an error code can be returned (see swigerrors.swg for the codes). Use the following macros/flags to set or process the returning states. In old versions of SWIG, code such as the following was usually written: if (SWIG_ConvertPtr(obj,vptr,ty.flags) != -1) { // success code } else { //fail code } Now you can be more explicit: int res = SWIG_ConvertPtr(obj,vptr,ty.flags); if (SWIG_IsOK(res)) { // success code } else { // fail code } which is the same really, but now you can also do Type *ptr; int res = SWIG_ConvertPtr(obj,(void **)(&ptr),ty.flags); if (SWIG_IsOK(res)) { // success code if (SWIG_IsNewObj(res) { ... delete *ptr; } else { ... } } else { // fail code } I.e., now SWIG_ConvertPtr can return new objects and you can identify the case and take care of the deallocation. Of course that also requires SWIG_ConvertPtr to return new result values, such as int SWIG_ConvertPtr(obj, ptr,...) { if () { if () { *ptr = ; return SWIG_NEWOBJ; } else { *ptr = ; return SWIG_OLDOBJ; } } else { return SWIG_BADOBJ; } } Of course, returning the plain '0(success)/-1(fail)' still works, but you can be more explicit by returning SWIG_BADOBJ, SWIG_ERROR or any of the SWIG errors code. Finally, if the SWIG_CASTRANK_MODE is enabled, the result code allows to return the 'cast rank', for example, if you have this int food(double) int fooi(int); and you call food(1) // cast rank '1' (1 -> 1.0) fooi(1) // cast rank '0' just use the SWIG_AddCast()/SWIG_CheckState() */ #define SWIG_OK (0) #define SWIG_ERROR (-1) #define SWIG_IsOK(r) (r >= 0) #define SWIG_ArgError(r) ((r != SWIG_ERROR) ? r : SWIG_TypeError) /* The CastRankLimit says how many bits are used for the cast rank */ #define SWIG_CASTRANKLIMIT (1 << 8) /* The NewMask denotes the object was created (using new/malloc) */ #define SWIG_NEWOBJMASK (SWIG_CASTRANKLIMIT << 1) /* The TmpMask is for in/out typemaps that use temporal objects */ #define SWIG_TMPOBJMASK (SWIG_NEWOBJMASK << 1) /* Simple returning values */ #define SWIG_BADOBJ (SWIG_ERROR) #define SWIG_OLDOBJ (SWIG_OK) #define SWIG_NEWOBJ (SWIG_OK | SWIG_NEWOBJMASK) #define SWIG_TMPOBJ (SWIG_OK | SWIG_TMPOBJMASK) /* Check, add and del mask methods */ #define SWIG_AddNewMask(r) (SWIG_IsOK(r) ? (r | SWIG_NEWOBJMASK) : r) #define SWIG_DelNewMask(r) (SWIG_IsOK(r) ? (r & ~SWIG_NEWOBJMASK) : r) #define SWIG_IsNewObj(r) (SWIG_IsOK(r) && (r & SWIG_NEWOBJMASK)) #define SWIG_AddTmpMask(r) (SWIG_IsOK(r) ? (r | SWIG_TMPOBJMASK) : r) #define SWIG_DelTmpMask(r) (SWIG_IsOK(r) ? (r & ~SWIG_TMPOBJMASK) : r) #define SWIG_IsTmpObj(r) (SWIG_IsOK(r) && (r & SWIG_TMPOBJMASK)) /* Cast-Rank Mode */ #if defined(SWIG_CASTRANK_MODE) # ifndef SWIG_TypeRank # define SWIG_TypeRank unsigned long # endif # ifndef SWIG_MAXCASTRANK /* Default cast allowed */ # define SWIG_MAXCASTRANK (2) # endif # define SWIG_CASTRANKMASK ((SWIG_CASTRANKLIMIT) -1) # define SWIG_CastRank(r) (r & SWIG_CASTRANKMASK) SWIGINTERNINLINE int SWIG_AddCast(int r) { return SWIG_IsOK(r) ? ((SWIG_CastRank(r) < SWIG_MAXCASTRANK) ? (r + 1) : SWIG_ERROR) : r; } SWIGINTERNINLINE int SWIG_CheckState(int r) { return SWIG_IsOK(r) ? SWIG_CastRank(r) + 1 : 0; } #else /* no cast-rank mode */ # define SWIG_AddCast # define SWIG_CheckState(r) (SWIG_IsOK(r) ? 1 : 0) #endif #include #ifdef __cplusplus extern "C" { #endif typedef void *(*swig_converter_func)(void *, int *); typedef struct swig_type_info *(*swig_dycast_func)(void **); /* Structure to store information on one type */ typedef struct swig_type_info { const char *name; /* mangled name of this type */ const char *str; /* human readable name of this type */ swig_dycast_func dcast; /* dynamic cast function down a hierarchy */ struct swig_cast_info *cast; /* linked list of types that can cast into this type */ void *clientdata; /* language specific type data */ int owndata; /* flag if the structure owns the clientdata */ } swig_type_info; /* Structure to store a type and conversion function used for casting */ typedef struct swig_cast_info { swig_type_info *type; /* pointer to type that is equivalent to this type */ swig_converter_func converter; /* function to cast the void pointers */ struct swig_cast_info *next; /* pointer to next cast in linked list */ struct swig_cast_info *prev; /* pointer to the previous cast */ } swig_cast_info; /* Structure used to store module information * Each module generates one structure like this, and the runtime collects * all of these structures and stores them in a circularly linked list.*/ typedef struct swig_module_info { swig_type_info **types; /* Array of pointers to swig_type_info structures that are in this module */ size_t size; /* Number of types in this module */ struct swig_module_info *next; /* Pointer to next element in circularly linked list */ swig_type_info **type_initial; /* Array of initially generated type structures */ swig_cast_info **cast_initial; /* Array of initially generated casting structures */ void *clientdata; /* Language specific module data */ } swig_module_info; /* Compare two type names skipping the space characters, therefore "char*" == "char *" and "Class" == "Class", etc. Return 0 when the two name types are equivalent, as in strncmp, but skipping ' '. */ SWIGRUNTIME int SWIG_TypeNameComp(const char *f1, const char *l1, const char *f2, const char *l2) { for (;(f1 != l1) && (f2 != l2); ++f1, ++f2) { while ((*f1 == ' ') && (f1 != l1)) ++f1; while ((*f2 == ' ') && (f2 != l2)) ++f2; if (*f1 != *f2) return (*f1 > *f2) ? 1 : -1; } return (int)((l1 - f1) - (l2 - f2)); } /* Check type equivalence in a name list like ||... Return 0 if not equal, 1 if equal */ SWIGRUNTIME int SWIG_TypeEquiv(const char *nb, const char *tb) { int equiv = 0; const char* te = tb + strlen(tb); const char* ne = nb; while (!equiv && *ne) { for (nb = ne; *ne; ++ne) { if (*ne == '|') break; } equiv = (SWIG_TypeNameComp(nb, ne, tb, te) == 0) ? 1 : 0; if (*ne) ++ne; } return equiv; } /* Check type equivalence in a name list like ||... Return 0 if equal, -1 if nb < tb, 1 if nb > tb */ SWIGRUNTIME int SWIG_TypeCompare(const char *nb, const char *tb) { int equiv = 0; const char* te = tb + strlen(tb); const char* ne = nb; while (!equiv && *ne) { for (nb = ne; *ne; ++ne) { if (*ne == '|') break; } equiv = (SWIG_TypeNameComp(nb, ne, tb, te) == 0) ? 1 : 0; if (*ne) ++ne; } return equiv; } /* Check the typename */ SWIGRUNTIME swig_cast_info * SWIG_TypeCheck(const char *c, swig_type_info *ty) { if (ty) { swig_cast_info *iter = ty->cast; while (iter) { if (strcmp(iter->type->name, c) == 0) { if (iter == ty->cast) return iter; /* Move iter to the top of the linked list */ iter->prev->next = iter->next; if (iter->next) iter->next->prev = iter->prev; iter->next = ty->cast; iter->prev = 0; if (ty->cast) ty->cast->prev = iter; ty->cast = iter; return iter; } iter = iter->next; } } return 0; } /* Identical to SWIG_TypeCheck, except strcmp is replaced with a pointer comparison */ SWIGRUNTIME swig_cast_info * SWIG_TypeCheckStruct(swig_type_info *from, swig_type_info *ty) { if (ty) { swig_cast_info *iter = ty->cast; while (iter) { if (iter->type == from) { if (iter == ty->cast) return iter; /* Move iter to the top of the linked list */ iter->prev->next = iter->next; if (iter->next) iter->next->prev = iter->prev; iter->next = ty->cast; iter->prev = 0; if (ty->cast) ty->cast->prev = iter; ty->cast = iter; return iter; } iter = iter->next; } } return 0; } /* Cast a pointer up an inheritance hierarchy */ SWIGRUNTIMEINLINE void * SWIG_TypeCast(swig_cast_info *ty, void *ptr, int *newmemory) { return ((!ty) || (!ty->converter)) ? ptr : (*ty->converter)(ptr, newmemory); } /* Dynamic pointer casting. Down an inheritance hierarchy */ SWIGRUNTIME swig_type_info * SWIG_TypeDynamicCast(swig_type_info *ty, void **ptr) { swig_type_info *lastty = ty; if (!ty || !ty->dcast) return ty; while (ty && (ty->dcast)) { ty = (*ty->dcast)(ptr); if (ty) lastty = ty; } return lastty; } /* Return the name associated with this type */ SWIGRUNTIMEINLINE const char * SWIG_TypeName(const swig_type_info *ty) { return ty->name; } /* Return the pretty name associated with this type, that is an unmangled type name in a form presentable to the user. */ SWIGRUNTIME const char * SWIG_TypePrettyName(const swig_type_info *type) { /* The "str" field contains the equivalent pretty names of the type, separated by vertical-bar characters. We choose to print the last name, as it is often (?) the most specific. */ if (!type) return NULL; if (type->str != NULL) { const char *last_name = type->str; const char *s; for (s = type->str; *s; s++) if (*s == '|') last_name = s+1; return last_name; } else return type->name; } /* Set the clientdata field for a type */ SWIGRUNTIME void SWIG_TypeClientData(swig_type_info *ti, void *clientdata) { swig_cast_info *cast = ti->cast; /* if (ti->clientdata == clientdata) return; */ ti->clientdata = clientdata; while (cast) { if (!cast->converter) { swig_type_info *tc = cast->type; if (!tc->clientdata) { SWIG_TypeClientData(tc, clientdata); } } cast = cast->next; } } SWIGRUNTIME void SWIG_TypeNewClientData(swig_type_info *ti, void *clientdata) { SWIG_TypeClientData(ti, clientdata); ti->owndata = 1; } /* Search for a swig_type_info structure only by mangled name Search is a O(log #types) We start searching at module start, and finish searching when start == end. Note: if start == end at the beginning of the function, we go all the way around the circular list. */ SWIGRUNTIME swig_type_info * SWIG_MangledTypeQueryModule(swig_module_info *start, swig_module_info *end, const char *name) { swig_module_info *iter = start; do { if (iter->size) { register size_t l = 0; register size_t r = iter->size - 1; do { /* since l+r >= 0, we can (>> 1) instead (/ 2) */ register size_t i = (l + r) >> 1; const char *iname = iter->types[i]->name; if (iname) { register int compare = strcmp(name, iname); if (compare == 0) { return iter->types[i]; } else if (compare < 0) { if (i) { r = i - 1; } else { break; } } else if (compare > 0) { l = i + 1; } } else { break; /* should never happen */ } } while (l <= r); } iter = iter->next; } while (iter != end); return 0; } /* Search for a swig_type_info structure for either a mangled name or a human readable name. It first searches the mangled names of the types, which is a O(log #types) If a type is not found it then searches the human readable names, which is O(#types). We start searching at module start, and finish searching when start == end. Note: if start == end at the beginning of the function, we go all the way around the circular list. */ SWIGRUNTIME swig_type_info * SWIG_TypeQueryModule(swig_module_info *start, swig_module_info *end, const char *name) { /* STEP 1: Search the name field using binary search */ swig_type_info *ret = SWIG_MangledTypeQueryModule(start, end, name); if (ret) { return ret; } else { /* STEP 2: If the type hasn't been found, do a complete search of the str field (the human readable name) */ swig_module_info *iter = start; do { register size_t i = 0; for (; i < iter->size; ++i) { if (iter->types[i]->str && (SWIG_TypeEquiv(iter->types[i]->str, name))) return iter->types[i]; } iter = iter->next; } while (iter != end); } /* neither found a match */ return 0; } /* Pack binary data into a string */ SWIGRUNTIME char * SWIG_PackData(char *c, void *ptr, size_t sz) { static const char hex[17] = "0123456789abcdef"; register const unsigned char *u = (unsigned char *) ptr; register const unsigned char *eu = u + sz; for (; u != eu; ++u) { register unsigned char uu = *u; *(c++) = hex[(uu & 0xf0) >> 4]; *(c++) = hex[uu & 0xf]; } return c; } /* Unpack binary data from a string */ SWIGRUNTIME const char * SWIG_UnpackData(const char *c, void *ptr, size_t sz) { register unsigned char *u = (unsigned char *) ptr; register const unsigned char *eu = u + sz; for (; u != eu; ++u) { register char d = *(c++); register unsigned char uu; if ((d >= '0') && (d <= '9')) uu = ((d - '0') << 4); else if ((d >= 'a') && (d <= 'f')) uu = ((d - ('a'-10)) << 4); else return (char *) 0; d = *(c++); if ((d >= '0') && (d <= '9')) uu |= (d - '0'); else if ((d >= 'a') && (d <= 'f')) uu |= (d - ('a'-10)); else return (char *) 0; *u = uu; } return c; } /* Pack 'void *' into a string buffer. */ SWIGRUNTIME char * SWIG_PackVoidPtr(char *buff, void *ptr, const char *name, size_t bsz) { char *r = buff; if ((2*sizeof(void *) + 2) > bsz) return 0; *(r++) = '_'; r = SWIG_PackData(r,&ptr,sizeof(void *)); if (strlen(name) + 1 > (bsz - (r - buff))) return 0; strcpy(r,name); return buff; } SWIGRUNTIME const char * SWIG_UnpackVoidPtr(const char *c, void **ptr, const char *name) { if (*c != '_') { if (strcmp(c,"NULL") == 0) { *ptr = (void *) 0; return name; } else { return 0; } } return SWIG_UnpackData(++c,ptr,sizeof(void *)); } SWIGRUNTIME char * SWIG_PackDataName(char *buff, void *ptr, size_t sz, const char *name, size_t bsz) { char *r = buff; size_t lname = (name ? strlen(name) : 0); if ((2*sz + 2 + lname) > bsz) return 0; *(r++) = '_'; r = SWIG_PackData(r,ptr,sz); if (lname) { strncpy(r,name,lname+1); } else { *r = 0; } return buff; } SWIGRUNTIME const char * SWIG_UnpackDataName(const char *c, void *ptr, size_t sz, const char *name) { if (*c != '_') { if (strcmp(c,"NULL") == 0) { memset(ptr,0,sz); return name; } else { return 0; } } return SWIG_UnpackData(++c,ptr,sz); } #ifdef __cplusplus } #endif /* ----------------------------------------------------------------------------- * See the LICENSE file for information on copyright, usage and redistribution * of SWIG, and the README file for authors - http://www.swig.org/release.html. * * luarun.swg * * This file contains the runtime support for Lua modules * and includes code for managing global variables and pointer * type checking. * ----------------------------------------------------------------------------- */ #ifdef __cplusplus extern "C" { #endif #include "lua.h" #include "lauxlib.h" #include /* for malloc */ #include /* for a few sanity tests */ /* ----------------------------------------------------------------------------- * global swig types * ----------------------------------------------------------------------------- */ /* Constant table */ #define SWIG_LUA_INT 1 #define SWIG_LUA_FLOAT 2 #define SWIG_LUA_STRING 3 #define SWIG_LUA_POINTER 4 #define SWIG_LUA_BINARY 5 #define SWIG_LUA_CHAR 6 /* Structure for variable linking table */ typedef struct { const char *name; lua_CFunction get; lua_CFunction set; } swig_lua_var_info; /* Constant information structure */ typedef struct { int type; char *name; long lvalue; double dvalue; void *pvalue; swig_type_info **ptype; } swig_lua_const_info; typedef struct { const char *name; lua_CFunction method; } swig_lua_method; typedef struct { const char *name; lua_CFunction getmethod; lua_CFunction setmethod; } swig_lua_attribute; typedef struct swig_lua_class { const char *name; swig_type_info **type; lua_CFunction constructor; void (*destructor)(void *); swig_lua_method *methods; swig_lua_attribute *attributes; struct swig_lua_class **bases; const char **base_names; } swig_lua_class; /* this is the struct for wrappering all pointers in SwigLua */ typedef struct { swig_type_info *type; int own; /* 1 if owned & must be destroyed */ void *ptr; } swig_lua_userdata; /* this is the struct for wrapping arbitary packed binary data (currently it is only used for member function pointers) the data ordering is similar to swig_lua_userdata, but it is currently not possible to tell the two structures apart within Swig, other than by looking at the type */ typedef struct { swig_type_info *type; int own; /* 1 if owned & must be destroyed */ char data[1]; /* arbitary amount of data */ } swig_lua_rawdata; /* Common SWIG API */ #define SWIG_NewPointerObj(L, ptr, type, owner) SWIG_Lua_NewPointerObj(L, (void *)ptr, type, owner) #define SWIG_ConvertPtr(L,idx, ptr, type, flags) SWIG_Lua_ConvertPtr(L,idx,ptr,type,flags) #define SWIG_MustGetPtr(L,idx, type,flags, argnum,fnname) SWIG_Lua_MustGetPtr(L,idx, type,flags, argnum,fnname) /* for C++ member pointers, ie, member methods */ #define SWIG_ConvertMember(L, idx, ptr, sz, ty) SWIG_Lua_ConvertPacked(L, idx, ptr, sz, ty) #define SWIG_NewMemberObj(L, ptr, sz, type) SWIG_Lua_NewPackedObj(L, ptr, sz, type) /* Runtime API */ #define SWIG_GetModule(clientdata) SWIG_Lua_GetModule((lua_State*)(clientdata)) #define SWIG_SetModule(clientdata, pointer) SWIG_Lua_SetModule((lua_State*) (clientdata), pointer) #define SWIG_MODULE_CLIENTDATA_TYPE lua_State* /* Contract support */ #define SWIG_contract_assert(expr, msg) \ if (!(expr)) { lua_pushstring(L, (char *) msg); goto fail; } else /* helper #defines */ #define SWIG_fail {goto fail;} #define SWIG_fail_arg(func_name,argnum,type) \ {lua_pushfstring(L,"Error in %s (arg %d), expected '%s' got '%s'",\ func_name,argnum,type,SWIG_Lua_typename(L,argnum));\ goto fail;} #define SWIG_fail_ptr(func_name,argnum,type) \ SWIG_fail_arg(func_name,argnum,(type && type->str)?type->str:"void*") #define SWIG_check_num_args(func_name,a,b) \ if (lua_gettop(L)b) \ {lua_pushfstring(L,"Error in %s expected %d..%d args, got %d",func_name,a,b,lua_gettop(L));\ goto fail;} #define SWIG_Lua_get_table(L,n) \ (lua_pushstring(L, n), lua_rawget(L,-2)) #define SWIG_Lua_add_function(L,n,f) \ (lua_pushstring(L, n), \ lua_pushcfunction(L, f), \ lua_rawset(L,-3)) /* special helper for allowing 'nil' for usertypes */ #define SWIG_isptrtype(L,I) (lua_isuserdata(L,I) || lua_isnil(L,I)) #ifdef __cplusplus /* Special helper for member function pointers it gets the address, casts it, then dereferences it */ //#define SWIG_mem_fn_as_voidptr(a) (*((char**)&(a))) #endif /* storing/access of swig_module_info */ SWIGRUNTIME swig_module_info * SWIG_Lua_GetModule(lua_State* L) { swig_module_info *ret = 0; lua_pushstring(L,"swig_runtime_data_type_pointer" SWIG_RUNTIME_VERSION SWIG_TYPE_TABLE_NAME); lua_rawget(L,LUA_REGISTRYINDEX); if (lua_islightuserdata(L,-1)) ret=(swig_module_info*)lua_touserdata(L,-1); lua_pop(L,1); /* tidy */ return ret; } SWIGRUNTIME void SWIG_Lua_SetModule(lua_State* L, swig_module_info *module) { /* add this all into the Lua registry: */ lua_pushstring(L,"swig_runtime_data_type_pointer" SWIG_RUNTIME_VERSION SWIG_TYPE_TABLE_NAME); lua_pushlightuserdata(L,(void*)module); lua_rawset(L,LUA_REGISTRYINDEX); } /* ----------------------------------------------------------------------------- * global variable support code: modules * ----------------------------------------------------------------------------- */ /* this function is called when trying to set an immutable. default value is to print an error. This can removed with a compile flag SWIGLUA_IGNORE_SET_IMMUTABLE */ SWIGINTERN int SWIG_Lua_set_immutable(lua_State* L) { /* there should be 1 param passed in: the new value */ #ifndef SWIGLUA_IGNORE_SET_IMMUTABLE lua_pop(L,1); /* remove it */ lua_pushstring(L,"This variable is immutable"); lua_error(L); #endif return 0; /* should not return anything */ } /* the module.get method used for getting linked data */ SWIGINTERN int SWIG_Lua_module_get(lua_State* L) { /* there should be 2 params passed in (1) table (not the meta table) (2) string name of the attribute printf("SWIG_Lua_module_get %p(%s) '%s'\n", lua_topointer(L,1),lua_typename(L,lua_type(L,1)), lua_tostring(L,2)); */ /* get the metatable */ assert(lua_istable(L,1)); /* just in case */ lua_getmetatable(L,1); /* get the metatable */ assert(lua_istable(L,-1)); /* just in case */ SWIG_Lua_get_table(L,".get"); /* get the .get table */ lua_remove(L,3); /* remove metatable */ if (lua_istable(L,-1)) { /* look for the key in the .get table */ lua_pushvalue(L,2); /* key */ lua_rawget(L,-2); lua_remove(L,3); /* remove .get */ if (lua_iscfunction(L,-1)) { /* found it so call the fn & return its value */ lua_call(L,0,1); return 1; } lua_pop(L,1); /* remove the top */ } lua_pop(L,1); /* remove the .get */ lua_pushnil(L); /* return a nil */ return 1; } /* the module.set method used for setting linked data */ SWIGINTERN int SWIG_Lua_module_set(lua_State* L) { /* there should be 3 params passed in (1) table (not the meta table) (2) string name of the attribute (3) any for the new value */ /* get the metatable */ assert(lua_istable(L,1)); /* just in case */ lua_getmetatable(L,1); /* get the metatable */ assert(lua_istable(L,-1)); /* just in case */ SWIG_Lua_get_table(L,".set"); /* get the .set table */ lua_remove(L,4); /* remove metatable */ if (lua_istable(L,-1)) { /* look for the key in the .set table */ lua_pushvalue(L,2); /* key */ lua_rawget(L,-2); lua_remove(L,4); /* remove .set */ if (lua_iscfunction(L,-1)) { /* found it so call the fn & return its value */ lua_pushvalue(L,3); /* value */ lua_call(L,1,0); return 0; } } lua_settop(L,3); /* reset back to start */ /* we now have the table, key & new value, so just set directly */ lua_rawset(L,1); /* add direct */ return 0; } /* registering a module in lua */ SWIGINTERN void SWIG_Lua_module_begin(lua_State* L,const char* name) { assert(lua_istable(L,-1)); /* just in case */ lua_pushstring(L,name); lua_newtable(L); /* the table */ /* add meta table */ lua_newtable(L); /* the meta table */ SWIG_Lua_add_function(L,"__index",SWIG_Lua_module_get); SWIG_Lua_add_function(L,"__newindex",SWIG_Lua_module_set); lua_pushstring(L,".get"); lua_newtable(L); /* the .get table */ lua_rawset(L,-3); /* add .get into metatable */ lua_pushstring(L,".set"); lua_newtable(L); /* the .set table */ lua_rawset(L,-3); /* add .set into metatable */ lua_setmetatable(L,-2); /* sets meta table in module */ lua_rawset(L,-3); /* add module into parent */ SWIG_Lua_get_table(L,name); /* get the table back out */ } /* ending the register */ SWIGINTERN void SWIG_Lua_module_end(lua_State* L) { lua_pop(L,1); /* tidy stack (remove module) */ } /* adding a linked variable to the module */ SWIGINTERN void SWIG_Lua_module_add_variable(lua_State* L,const char* name,lua_CFunction getFn,lua_CFunction setFn) { assert(lua_istable(L,-1)); /* just in case */ lua_getmetatable(L,-1); /* get the metatable */ assert(lua_istable(L,-1)); /* just in case */ SWIG_Lua_get_table(L,".get"); /* find the .get table */ assert(lua_istable(L,-1)); /* should be a table: */ SWIG_Lua_add_function(L,name,getFn); lua_pop(L,1); /* tidy stack (remove table) */ if (setFn) /* if there is a set fn */ { SWIG_Lua_get_table(L,".set"); /* find the .set table */ assert(lua_istable(L,-1)); /* should be a table: */ SWIG_Lua_add_function(L,name,setFn); lua_pop(L,1); /* tidy stack (remove table) */ } lua_pop(L,1); /* tidy stack (remove meta) */ } /* adding a function module */ SWIGINTERN void SWIG_Lua_module_add_function(lua_State* L,const char* name,lua_CFunction fn) { SWIG_Lua_add_function(L,name,fn); } /* ----------------------------------------------------------------------------- * global variable support code: classes * ----------------------------------------------------------------------------- */ /* the class.get method, performs the lookup of class attributes */ SWIGINTERN int SWIG_Lua_class_get(lua_State* L) { /* there should be 2 params passed in (1) userdata (not the meta table) (2) string name of the attribute */ assert(lua_isuserdata(L,-2)); /* just in case */ lua_getmetatable(L,-2); /* get the meta table */ assert(lua_istable(L,-1)); /* just in case */ SWIG_Lua_get_table(L,".get"); /* find the .get table */ assert(lua_istable(L,-1)); /* just in case */ /* look for the key in the .get table */ lua_pushvalue(L,2); /* key */ lua_rawget(L,-2); lua_remove(L,-2); /* stack tidy, remove .get table */ if (lua_iscfunction(L,-1)) { /* found it so call the fn & return its value */ lua_pushvalue(L,1); /* the userdata */ lua_call(L,1,1); /* 1 value in (userdata),1 out (result) */ lua_remove(L,-2); /* stack tidy, remove metatable */ return 1; } lua_pop(L,1); /* remove whatever was there */ /* ok, so try the .fn table */ SWIG_Lua_get_table(L,".fn"); /* find the .get table */ assert(lua_istable(L,-1)); /* just in case */ lua_pushvalue(L,2); /* key */ lua_rawget(L,-2); /* look for the fn */ lua_remove(L,-2); /* stack tidy, remove .fn table */ if (lua_isfunction(L,-1)) /* note: if its a C function or lua function */ { /* found it so return the fn & let lua call it */ lua_remove(L,-2); /* stack tidy, remove metatable */ return 1; } lua_pop(L,1); /* remove whatever was there */ /* NEW: looks for the __getitem() fn this is a user provided get fn */ SWIG_Lua_get_table(L,"__getitem"); /* find the __getitem fn */ if (lua_iscfunction(L,-1)) /* if its there */ { /* found it so call the fn & return its value */ lua_pushvalue(L,1); /* the userdata */ lua_pushvalue(L,2); /* the parameter */ lua_call(L,2,1); /* 2 value in (userdata),1 out (result) */ lua_remove(L,-2); /* stack tidy, remove metatable */ return 1; } return 0; /* sorry not known */ } /* the class.set method, performs the lookup of class attributes */ SWIGINTERN int SWIG_Lua_class_set(lua_State* L) { /* there should be 3 params passed in (1) table (not the meta table) (2) string name of the attribute (3) any for the new value printf("SWIG_Lua_class_set %p(%s) '%s' %p(%s)\n", lua_topointer(L,1),lua_typename(L,lua_type(L,1)), lua_tostring(L,2), lua_topointer(L,3),lua_typename(L,lua_type(L,3)));*/ assert(lua_isuserdata(L,1)); /* just in case */ lua_getmetatable(L,1); /* get the meta table */ assert(lua_istable(L,-1)); /* just in case */ SWIG_Lua_get_table(L,".set"); /* find the .set table */ if (lua_istable(L,-1)) { /* look for the key in the .set table */ lua_pushvalue(L,2); /* key */ lua_rawget(L,-2); if (lua_iscfunction(L,-1)) { /* found it so call the fn & return its value */ lua_pushvalue(L,1); /* userdata */ lua_pushvalue(L,3); /* value */ lua_call(L,2,0); return 0; } lua_pop(L,1); /* remove the value */ } lua_pop(L,1); /* remove the value .set table */ /* NEW: looks for the __setitem() fn this is a user provided set fn */ SWIG_Lua_get_table(L,"__setitem"); /* find the fn */ if (lua_iscfunction(L,-1)) /* if its there */ { /* found it so call the fn & return its value */ lua_pushvalue(L,1); /* the userdata */ lua_pushvalue(L,2); /* the parameter */ lua_pushvalue(L,3); /* the value */ lua_call(L,3,0); /* 3 values in ,0 out */ lua_remove(L,-2); /* stack tidy, remove metatable */ return 1; } return 0; } /* the class.destruct method called by the interpreter */ SWIGINTERN int SWIG_Lua_class_destruct(lua_State* L) { /* there should be 1 params passed in (1) userdata (not the meta table) */ swig_lua_userdata* usr; swig_lua_class* clss; assert(lua_isuserdata(L,-1)); /* just in case */ usr=(swig_lua_userdata*)lua_touserdata(L,-1); /* get it */ /* if must be destroyed & has a destructor */ if (usr->own) /* if must be destroyed */ { clss=(swig_lua_class*)usr->type->clientdata; /* get the class */ if (clss && clss->destructor) /* there is a destroy fn */ { clss->destructor(usr->ptr); /* bye bye */ } } return 0; } /* gets the swig class registry (or creates it) */ SWIGINTERN void SWIG_Lua_get_class_registry(lua_State* L) { /* add this all into the swig registry: */ lua_pushstring(L,"SWIG"); lua_rawget(L,LUA_REGISTRYINDEX); /* get the registry */ if (!lua_istable(L,-1)) /* not there */ { /* must be first time, so add it */ lua_pop(L,1); /* remove the result */ lua_pushstring(L,"SWIG"); lua_newtable(L); lua_rawset(L,LUA_REGISTRYINDEX); /* then get it */ lua_pushstring(L,"SWIG"); lua_rawget(L,LUA_REGISTRYINDEX); } } /* helper fn to get the classes metatable from the register */ SWIGINTERN void SWIG_Lua_get_class_metatable(lua_State* L,const char* cname) { SWIG_Lua_get_class_registry(L); /* get the registry */ lua_pushstring(L,cname); /* get the name */ lua_rawget(L,-2); /* get it */ lua_remove(L,-2); /* tidy up (remove registry) */ } /* helper add a variable to a registered class */ SWIGINTERN void SWIG_Lua_add_class_variable(lua_State* L,const char* name,lua_CFunction getFn,lua_CFunction setFn) { assert(lua_istable(L,-1)); /* just in case */ SWIG_Lua_get_table(L,".get"); /* find the .get table */ assert(lua_istable(L,-1)); /* just in case */ SWIG_Lua_add_function(L,name,getFn); lua_pop(L,1); /* tidy stack (remove table) */ if (setFn) { SWIG_Lua_get_table(L,".set"); /* find the .set table */ assert(lua_istable(L,-1)); /* just in case */ SWIG_Lua_add_function(L,name,setFn); lua_pop(L,1); /* tidy stack (remove table) */ } } /* helper to recursively add class details (attributes & operations) */ SWIGINTERN void SWIG_Lua_add_class_details(lua_State* L,swig_lua_class* clss) { int i; /* call all the base classes first: we can then override these later: */ for(i=0;clss->bases[i];i++) { SWIG_Lua_add_class_details(L,clss->bases[i]); } /* add fns */ for(i=0;clss->attributes[i].name;i++){ SWIG_Lua_add_class_variable(L,clss->attributes[i].name,clss->attributes[i].getmethod,clss->attributes[i].setmethod); } /* add methods to the metatable */ SWIG_Lua_get_table(L,".fn"); /* find the .fn table */ assert(lua_istable(L,-1)); /* just in case */ for(i=0;clss->methods[i].name;i++){ SWIG_Lua_add_function(L,clss->methods[i].name,clss->methods[i].method); } lua_pop(L,1); /* tidy stack (remove table) */ /* add operator overloads these look ANY method which start with "__" and assume they are operator overloads & add them to the metatable (this might mess up is someone defines a method __gc (the destructor)*/ for(i=0;clss->methods[i].name;i++){ if (clss->methods[i].name[0]=='_' && clss->methods[i].name[1]=='_'){ SWIG_Lua_add_function(L,clss->methods[i].name,clss->methods[i].method); } } } /* set up the base classes pointers. Each class structure has a list of pointers to the base class structures. This function fills them. It cannot be done at compile time, as this will not work with hireachies spread over more than one swig file. Therefore it must be done at runtime, querying the SWIG type system. */ SWIGINTERN void SWIG_Lua_init_base_class(lua_State* L,swig_lua_class* clss) { int i=0; swig_module_info* module=SWIG_GetModule(L); for(i=0;clss->base_names[i];i++) { if (clss->bases[i]==0) /* not found yet */ { /* lookup and cache the base class */ swig_type_info *info = SWIG_TypeQueryModule(module,module,clss->base_names[i]); if (info) clss->bases[i] = (swig_lua_class *) info->clientdata; } } } /* performs the entire class registration process */ SWIGINTERN void SWIG_Lua_class_register(lua_State* L,swig_lua_class* clss) { /* add its constructor to module with the name of the class so you can do MyClass(...) as well as new_MyClass(...) BUT only if a constructor is defined (this overcomes the problem of pure virtual classes without constructors)*/ if (clss->constructor) SWIG_Lua_add_function(L,clss->name,clss->constructor); SWIG_Lua_get_class_registry(L); /* get the registry */ lua_pushstring(L,clss->name); /* get the name */ lua_newtable(L); /* create the metatable */ /* add string of class name called ".type" */ lua_pushstring(L,".type"); lua_pushstring(L,clss->name); lua_rawset(L,-3); /* add a table called ".get" */ lua_pushstring(L,".get"); lua_newtable(L); lua_rawset(L,-3); /* add a table called ".set" */ lua_pushstring(L,".set"); lua_newtable(L); lua_rawset(L,-3); /* add a table called ".fn" */ lua_pushstring(L,".fn"); lua_newtable(L); lua_rawset(L,-3); /* add accessor fns for using the .get,.set&.fn */ SWIG_Lua_add_function(L,"__index",SWIG_Lua_class_get); SWIG_Lua_add_function(L,"__newindex",SWIG_Lua_class_set); SWIG_Lua_add_function(L,"__gc",SWIG_Lua_class_destruct); /* add it */ lua_rawset(L,-3); /* metatable into registry */ lua_pop(L,1); /* tidy stack (remove registry) */ SWIG_Lua_get_class_metatable(L,clss->name); SWIG_Lua_add_class_details(L,clss); /* recursive adding of details (atts & ops) */ lua_pop(L,1); /* tidy stack (remove class metatable) */ } /* ----------------------------------------------------------------------------- * Class/structure conversion fns * ----------------------------------------------------------------------------- */ /* helper to add metatable to new lua object */ SWIGINTERN void _SWIG_Lua_AddMetatable(lua_State* L,swig_type_info *type) { if (type->clientdata) /* there is clientdata: so add the metatable */ { SWIG_Lua_get_class_metatable(L,((swig_lua_class*)(type->clientdata))->name); if (lua_istable(L,-1)) { lua_setmetatable(L,-2); } else { lua_pop(L,1); } } } /* pushes a new object into the lua stack */ SWIGRUNTIME void SWIG_Lua_NewPointerObj(lua_State* L,void* ptr,swig_type_info *type, int own) { swig_lua_userdata* usr; if (!ptr){ lua_pushnil(L); return; } usr=(swig_lua_userdata*)lua_newuserdata(L,sizeof(swig_lua_userdata)); /* get data */ usr->ptr=ptr; /* set the ptr */ usr->type=type; usr->own=own; _SWIG_Lua_AddMetatable(L,type); /* add metatable */ } /* takes a object from the lua stack & converts it into an object of the correct type (if possible) */ SWIGRUNTIME int SWIG_Lua_ConvertPtr(lua_State* L,int index,void** ptr,swig_type_info *type,int flags) { swig_lua_userdata* usr; swig_cast_info *cast; if (lua_isnil(L,index)){*ptr=0; return SWIG_OK;} /* special case: lua nil => NULL pointer */ usr=(swig_lua_userdata*)lua_touserdata(L,index); /* get data */ if (usr) { if (flags & SWIG_POINTER_DISOWN) /* must disown the object */ { usr->own=0; } if (!type) /* special cast void*, no casting fn */ { *ptr=usr->ptr; return SWIG_OK; /* ok */ } cast=SWIG_TypeCheckStruct(usr->type,type); /* performs normal type checking */ if (cast) { int newmemory = 0; *ptr=SWIG_TypeCast(cast,usr->ptr,&newmemory); assert(!newmemory); /* newmemory handling not yet implemented */ return SWIG_OK; /* ok */ } } return SWIG_ERROR; /* error */ } SWIGRUNTIME void* SWIG_Lua_MustGetPtr(lua_State* L,int index,swig_type_info *type,int flags, int argnum,const char* func_name){ void* result; if (!SWIG_IsOK(SWIG_ConvertPtr(L,index,&result,type,flags))){ lua_pushfstring(L,"Error in %s, expected a %s at argument number %d\n", func_name,(type && type->str)?type->str:"void*",argnum); lua_error(L); } return result; } /* pushes a packed userdata. user for member fn pointers only */ SWIGRUNTIME void SWIG_Lua_NewPackedObj(lua_State* L,void* ptr,size_t size,swig_type_info *type) { swig_lua_rawdata* raw; assert(ptr); /* not acceptable to pass in a NULL value */ raw=(swig_lua_rawdata*)lua_newuserdata(L,sizeof(swig_lua_rawdata)-1+size); /* alloc data */ raw->type=type; raw->own=0; memcpy(raw->data,ptr,size); /* copy the data */ _SWIG_Lua_AddMetatable(L,type); /* add metatable */ } /* converts a packed userdata. user for member fn pointers only */ SWIGRUNTIME int SWIG_Lua_ConvertPacked(lua_State* L,int index,void* ptr,size_t size,swig_type_info *type) { swig_lua_rawdata* raw; raw=(swig_lua_rawdata*)lua_touserdata(L,index); /* get data */ if (!raw) return SWIG_ERROR; /* error */ if (type==0 || type==raw->type) /* void* or identical type */ { memcpy(ptr,raw->data,size); /* copy it */ return SWIG_OK; /* ok */ } return SWIG_ERROR; /* error */ } /* a function to get the typestring of a piece of data */ SWIGRUNTIME const char *SWIG_Lua_typename(lua_State *L, int tp) { swig_lua_userdata* usr; if (lua_isuserdata(L,tp)) { usr=(swig_lua_userdata*)lua_touserdata(L,1); /* get data */ if (usr && usr->type && usr->type->str) return usr->type->str; return "userdata (unknown type)"; } return lua_typename(L,lua_type(L,tp)); } /* lua callable function to get the userdata's type */ SWIGRUNTIME int SWIG_Lua_type(lua_State* L) { lua_pushstring(L,SWIG_Lua_typename(L,1)); return 1; } /* lua callable function to compare userdata's value the issue is that two userdata may point to the same thing but to lua, they are different objects */ SWIGRUNTIME int SWIG_Lua_equal(lua_State* L) { int result; swig_lua_userdata *usr1,*usr2; if (!lua_isuserdata(L,1) || !lua_isuserdata(L,2)) /* just in case */ return 0; /* nil reply */ usr1=(swig_lua_userdata*)lua_touserdata(L,1); /* get data */ usr2=(swig_lua_userdata*)lua_touserdata(L,2); /* get data */ /*result=(usr1->ptr==usr2->ptr && usr1->type==usr2->type); only works if type is the same*/ result=(usr1->ptr==usr2->ptr); lua_pushboolean(L,result); return 1; } /* ----------------------------------------------------------------------------- * global variable support code: class/struct typemap functions * ----------------------------------------------------------------------------- */ /* Install Constants */ SWIGINTERN void SWIG_Lua_InstallConstants(lua_State* L, swig_lua_const_info constants[]) { int i; for (i = 0; constants[i].type; i++) { switch(constants[i].type) { case SWIG_LUA_INT: lua_pushstring(L,constants[i].name); lua_pushnumber(L,(lua_Number)constants[i].lvalue); lua_rawset(L,-3); break; case SWIG_LUA_FLOAT: lua_pushstring(L,constants[i].name); lua_pushnumber(L,(lua_Number)constants[i].dvalue); lua_rawset(L,-3); break; case SWIG_LUA_CHAR: lua_pushstring(L,constants[i].name); lua_pushfstring(L,"%c",(char)constants[i].lvalue); lua_rawset(L,-3); break; case SWIG_LUA_STRING: lua_pushstring(L,constants[i].name); lua_pushstring(L,(char *) constants[i].pvalue); lua_rawset(L,-3); break; case SWIG_LUA_POINTER: lua_pushstring(L,constants[i].name); SWIG_NewPointerObj(L,constants[i].pvalue, *(constants[i]).ptype,0); lua_rawset(L,-3); break; case SWIG_LUA_BINARY: lua_pushstring(L,constants[i].name); SWIG_NewMemberObj(L,constants[i].pvalue,constants[i].lvalue,*(constants[i]).ptype); lua_rawset(L,-3); break; default: break; } } } /* ----------------------------------------------------------------------------- * executing lua code from within the wrapper * ----------------------------------------------------------------------------- */ #ifndef SWIG_DOSTRING_FAIL /* Allows redefining of error function */ #define SWIG_DOSTRING_FAIL(S) fprintf(stderr,"%s\n",S) #endif /* Executes a C string in Lua a really simple way of calling lua from C Unfortunately lua keeps changing its API's, so we need a conditional compile In lua 5.0.X its lua_dostring() In lua 5.1.X its luaL_dostring() */ SWIGINTERN int SWIG_Lua_dostring(lua_State *L, const char* str) { int ok,top; if (str==0 || str[0]==0) return 0; /* nothing to do */ top=lua_gettop(L); /* save stack */ #if (defined(LUA_VERSION_NUM) && (LUA_VERSION_NUM>=501)) ok=luaL_dostring(L,str); /* looks like this is lua 5.1.X or later, good */ #else ok=lua_dostring(L,str); /* might be lua 5.0.x, using lua_dostring */ #endif if (ok!=0) { SWIG_DOSTRING_FAIL(lua_tostring(L,-1)); } lua_settop(L,top); /* restore the stack */ return ok; } #ifdef __cplusplus } #endif /* ------------------------------ end luarun.swg ------------------------------ */ /* Errors in SWIG */ #define SWIG_UnknownError -1 #define SWIG_IOError -2 #define SWIG_RuntimeError -3 #define SWIG_IndexError -4 #define SWIG_TypeError -5 #define SWIG_DivisionByZero -6 #define SWIG_OverflowError -7 #define SWIG_SyntaxError -8 #define SWIG_ValueError -9 #define SWIG_SystemError -10 #define SWIG_AttributeError -11 #define SWIG_MemoryError -12 #define SWIG_NullReferenceError -13 /* -------- TYPES TABLE (BEGIN) -------- */ #define SWIGTYPE_p_Prelude__Client swig_types[0] #define SWIGTYPE_p_Prelude__ClientEasy swig_types[1] #define SWIGTYPE_p_Prelude__ClientProfile swig_types[2] #define SWIGTYPE_p_Prelude__Connection swig_types[3] #define SWIGTYPE_p_Prelude__ConnectionPool swig_types[4] #define SWIGTYPE_p_Prelude__IDMEF swig_types[5] #define SWIGTYPE_p_Prelude__IDMEFCriteria swig_types[6] #define SWIGTYPE_p_Prelude__IDMEFCriterion swig_types[7] #define SWIGTYPE_p_Prelude__IDMEFPath swig_types[8] #define SWIGTYPE_p_Prelude__IDMEFTime swig_types[9] #define SWIGTYPE_p_Prelude__IDMEFValue swig_types[10] #define SWIGTYPE_p_Prelude__PreludeError swig_types[11] #define SWIGTYPE_p_Prelude__PreludeLog swig_types[12] #define SWIGTYPE_p_char swig_types[13] #define SWIGTYPE_p_f_int_p_q_const__char__void swig_types[14] #define SWIGTYPE_p_idmef_class_id_t swig_types[15] #define SWIGTYPE_p_idmef_criteria_t swig_types[16] #define SWIGTYPE_p_idmef_criterion_operator_t swig_types[17] #define SWIGTYPE_p_idmef_message_t swig_types[18] #define SWIGTYPE_p_idmef_path_t swig_types[19] #define SWIGTYPE_p_idmef_time_t swig_types[20] #define SWIGTYPE_p_idmef_value_t swig_types[21] #define SWIGTYPE_p_idmef_value_type_id_t swig_types[22] #define SWIGTYPE_p_int swig_types[23] #define SWIGTYPE_p_long_long swig_types[24] #define SWIGTYPE_p_prelude_client_profile_t swig_types[25] #define SWIGTYPE_p_prelude_client_t swig_types[26] #define SWIGTYPE_p_prelude_connection_pool_t swig_types[27] #define SWIGTYPE_p_prelude_connection_t swig_types[28] #define SWIGTYPE_p_short swig_types[29] #define SWIGTYPE_p_std__exception swig_types[30] #define SWIGTYPE_p_std__string swig_types[31] #define SWIGTYPE_p_std__vectorT_Prelude__Connection_t swig_types[32] #define SWIGTYPE_p_std__vectorT_Prelude__IDMEFValue_t swig_types[33] #define SWIGTYPE_p_time_t swig_types[34] #define SWIGTYPE_p_timeval swig_types[35] #define SWIGTYPE_p_unsigned_char swig_types[36] #define SWIGTYPE_p_unsigned_int swig_types[37] #define SWIGTYPE_p_unsigned_long_long swig_types[38] #define SWIGTYPE_p_unsigned_short swig_types[39] #define SWIGTYPE_p_void swig_types[40] static swig_type_info *swig_types[42]; static swig_module_info swig_module = {swig_types, 41, 0, 0, 0, 0}; #define SWIG_TypeQuery(name) SWIG_TypeQueryModule(&swig_module, &swig_module, name) #define SWIG_MangledTypeQuery(name) SWIG_MangledTypeQueryModule(&swig_module, &swig_module, name) /* -------- TYPES TABLE (END) -------- */ #define SWIG_name "PreludeEasy" #define SWIG_init luaopen_PreludeEasy #define SWIG_init_user luaopen_PreludeEasy_user #define SWIG_LUACODE luaopen_PreludeEasy_luacode namespace swig { typedef struct{} LANGUAGE_OBJ; } #include #include #include #define SWIG_exception(a,b)\ { lua_pushfstring(L,"%s:%s",#a,b);SWIG_fail; } #include #include #include #ifndef SWIGPYTHON # include "config.h" # include "glthread/thread.h" #endif #include "prelude.hxx" #include "prelude-log.hxx" #include "prelude-error.hxx" #include "prelude-connection.hxx" #include "prelude-connection-pool.hxx" #include "prelude-client-profile.hxx" #include "prelude-client.hxx" #include "prelude-client-easy.hxx" #include "idmef-criteria.hxx" #include "idmef-value.hxx" #include "idmef-path.hxx" #include "idmef-time.hxx" #include "idmef.hxx" using namespace Prelude; char *my_strdup(const char *in) { char *out = new char[strlen(in) + 1]; strcpy(out, in); return out; } #define SWIG_From_int(result) lua_pushnumber(L, (lua_Number) result) #define SWIG_From_float(result) lua_pushnumber(L, (lua_Number) result) #define SWIG_From_double(result) lua_pushnumber(L, (lua_Number) result) #define SWIG_From_unsigned_SS_int(result) lua_pushnumber(L, (lua_Number) result) #define SWIG_From_long_SS_long(result) lua_pushnumber(L, (lua_Number) result) #define SWIG_From_unsigned_SS_long_SS_long(result) lua_pushnumber(L, (lua_Number) result) #define SWIG_FromCharPtr(result) lua_pushstring(L, result) #define SWIG_FromCharPtrAndSize(result, len) lua_pushlstring(L, result, len) extern "C" { int IDMEFValue_to_SWIG(lua_State* L, const IDMEFValue &result); } static int __prelude_log_func; static lua_State *__lua_state = NULL; static gl_thread_t __initial_thread; static void _cb_lua_log(int level, const char *str) { if ( (gl_thread_t) gl_thread_self() != __initial_thread ) return; lua_rawgeti(__lua_state, LUA_REGISTRYINDEX, __prelude_log_func); lua_pushnumber(__lua_state, level); lua_pushstring(__lua_state, str); lua_call(__lua_state, 2, 0); } static int _cb_lua_write(prelude_msgbuf_t *fd, prelude_msg_t *msg) { size_t ret; FILE *f = (FILE *) prelude_msgbuf_get_data(fd); ret = fwrite((const char *)prelude_msg_get_message_data(msg), 1, prelude_msg_get_len(msg), f); if ( ret != prelude_msg_get_len(msg) ) return prelude_error_from_errno(errno); prelude_msg_recycle(msg); return 0; } static ssize_t _cb_lua_read(prelude_io_t *fd, void *buf, size_t size) { ssize_t ret; FILE *f = (FILE *) prelude_io_get_fdptr(fd); ret = fread(buf, 1, size, f); if ( ret < 0 ) ret = prelude_error_from_errno(errno); else if ( ret == 0 ) ret = prelude_error(PRELUDE_ERROR_EOF); return ret; } SWIGINTERN char *Prelude_IDMEFCriteria___str__(Prelude::IDMEFCriteria *self){ return my_strdup(self->ToString().c_str()); } int IDMEFValueList_to_SWIG(lua_State *L, const Prelude::IDMEFValue &value) { bool is_list; int index = 0, ret; std::vector result = value; std::vector::const_iterator i; lua_newtable(L); for ( i = result.begin(); i != result.end(); i++ ) { ret = lua_checkstack(L, 2); if ( ret < 0 ) return ret; is_list = (i->GetType() == IDMEF_VALUE_TYPE_LIST); if ( is_list ) lua_pushnumber(L, ++index); ret = IDMEFValue_to_SWIG(L, *i); if ( ret < 0 ) return -1; if ( is_list ) lua_settable(L, -3); else lua_rawseti(L, -2, ++index); } return 1; } SWIGINTERN char *Prelude_IDMEFTime___str__(Prelude::IDMEFTime *self){ return my_strdup(self->ToString().c_str()); } SWIGINTERN char *Prelude_IDMEF___str__(Prelude::IDMEF *self){ return my_strdup(self->ToString().c_str()); } SWIGINTERN void Prelude_IDMEF_Write(Prelude::IDMEF *self,void *nocast_p){ self->_genericWrite(_cb_lua_write, nocast_p); } SWIGINTERN void Prelude_IDMEF_Read(Prelude::IDMEF *self,void *nocast_p){ self->_genericRead(_cb_lua_read, nocast_p); } #ifdef __cplusplus extern "C" { #endif static int _wrap_new_string__SWIG_0(lua_State* L) { int SWIG_arg = 0; std::string *result = 0 ; SWIG_check_num_args("std::string",0,0) result = (std::string *)new std::string(); SWIG_NewPointerObj(L,result,SWIGTYPE_p_std__string,1); SWIG_arg++; return SWIG_arg; if(0) SWIG_fail; fail: lua_error(L); return SWIG_arg; } static int _wrap_new_string__SWIG_1(lua_State* L) { int SWIG_arg = 0; char *arg1 = (char *) 0 ; std::string *result = 0 ; SWIG_check_num_args("std::string",1,1) if(!lua_isstring(L,1)) SWIG_fail_arg("std::string",1,"char const *"); arg1 = (char *)lua_tostring(L, 1); result = (std::string *)new std::string((char const *)arg1); SWIG_NewPointerObj(L,result,SWIGTYPE_p_std__string,1); SWIG_arg++; return SWIG_arg; if(0) SWIG_fail; fail: lua_error(L); return SWIG_arg; } static int _wrap_new_string(lua_State* L) { int argc; int argv[2]={ 1,2 }; argc = lua_gettop(L); if (argc == 0) { return _wrap_new_string__SWIG_0(L); } if (argc == 1) { int _v; { _v = lua_isstring(L,argv[0]); } if (_v) { return _wrap_new_string__SWIG_1(L); } } lua_pushstring(L,"Wrong arguments for overloaded function 'new_string'\n" " Possible C/C++ prototypes are:\n" " std::string()\n" " std::string(char const *)\n"); lua_error(L);return 0; } static int _wrap_string_size(lua_State* L) { int SWIG_arg = 0; std::string *arg1 = (std::string *) 0 ; unsigned int result; SWIG_check_num_args("size",1,1) if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("size",1,"std::string const *"); if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_std__string,0))){ SWIG_fail_ptr("string_size",1,SWIGTYPE_p_std__string); } result = (unsigned int)((std::string const *)arg1)->size(); lua_pushnumber(L, (lua_Number) result); SWIG_arg++; return SWIG_arg; if(0) SWIG_fail; fail: lua_error(L); return SWIG_arg; } static int _wrap_string_length(lua_State* L) { int SWIG_arg = 0; std::string *arg1 = (std::string *) 0 ; unsigned int result; SWIG_check_num_args("length",1,1) if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("length",1,"std::string const *"); if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_std__string,0))){ SWIG_fail_ptr("string_length",1,SWIGTYPE_p_std__string); } result = (unsigned int)((std::string const *)arg1)->length(); lua_pushnumber(L, (lua_Number) result); SWIG_arg++; return SWIG_arg; if(0) SWIG_fail; fail: lua_error(L); return SWIG_arg; } static int _wrap_string_empty(lua_State* L) { int SWIG_arg = 0; std::string *arg1 = (std::string *) 0 ; bool result; SWIG_check_num_args("empty",1,1) if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("empty",1,"std::string const *"); if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_std__string,0))){ SWIG_fail_ptr("string_empty",1,SWIGTYPE_p_std__string); } result = (bool)((std::string const *)arg1)->empty(); lua_pushboolean(L,(int)(result!=0)); SWIG_arg++; return SWIG_arg; if(0) SWIG_fail; fail: lua_error(L); return SWIG_arg; } static int _wrap_string_c_str(lua_State* L) { int SWIG_arg = 0; std::string *arg1 = (std::string *) 0 ; char *result = 0 ; SWIG_check_num_args("c_str",1,1) if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("c_str",1,"std::string const *"); if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_std__string,0))){ SWIG_fail_ptr("string_c_str",1,SWIGTYPE_p_std__string); } result = (char *)((std::string const *)arg1)->c_str(); lua_pushstring(L,(const char*)result); SWIG_arg++; return SWIG_arg; if(0) SWIG_fail; fail: lua_error(L); return SWIG_arg; } static int _wrap_string_data(lua_State* L) { int SWIG_arg = 0; std::string *arg1 = (std::string *) 0 ; char *result = 0 ; SWIG_check_num_args("data",1,1) if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("data",1,"std::string const *"); if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_std__string,0))){ SWIG_fail_ptr("string_data",1,SWIGTYPE_p_std__string); } result = (char *)((std::string const *)arg1)->data(); lua_pushstring(L,(const char*)result); SWIG_arg++; return SWIG_arg; if(0) SWIG_fail; fail: lua_error(L); return SWIG_arg; } static int _wrap_string_assign(lua_State* L) { int SWIG_arg = 0; std::string *arg1 = (std::string *) 0 ; char *arg2 = (char *) 0 ; SWIG_check_num_args("assign",2,2) if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("assign",1,"std::string *"); if(!lua_isstring(L,2)) SWIG_fail_arg("assign",2,"char const *"); if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_std__string,0))){ SWIG_fail_ptr("string_assign",1,SWIGTYPE_p_std__string); } arg2 = (char *)lua_tostring(L, 2); (arg1)->assign((char const *)arg2); return SWIG_arg; if(0) SWIG_fail; fail: lua_error(L); return SWIG_arg; } static void swig_delete_string(void *obj) { std::string *arg1 = (std::string *) obj; delete arg1; } static swig_lua_method swig_std_string_methods[] = { {"size", _wrap_string_size}, {"length", _wrap_string_length}, {"empty", _wrap_string_empty}, {"c_str", _wrap_string_c_str}, {"data", _wrap_string_data}, {"assign", _wrap_string_assign}, {0,0} }; static swig_lua_attribute swig_std_string_attributes[] = { {0,0,0} }; static swig_lua_class *swig_std_string_bases[] = {0}; static const char *swig_std_string_base_names[] = {0}; static swig_lua_class _wrap_class_std_string = { "string", &SWIGTYPE_p_std__string,_wrap_new_string, swig_delete_string, swig_std_string_methods, swig_std_string_attributes, swig_std_string_bases, swig_std_string_base_names }; static int _wrap_CheckVersion__SWIG_0(lua_State* L) { int SWIG_arg = 0; char *arg1 = (char *) 0 ; char *result = 0 ; SWIG_check_num_args("CheckVersion",1,1) if(!lua_isstring(L,1)) SWIG_fail_arg("CheckVersion",1,"char const *"); arg1 = (char *)lua_tostring(L, 1); try { result = (char *)CheckVersion((char const *)arg1); } catch(Prelude::PreludeError &_e) { SWIG_exception(SWIG_RuntimeError, (&_e)->what()); } lua_pushstring(L,(const char*)result); SWIG_arg++; return SWIG_arg; if(0) SWIG_fail; fail: lua_error(L); return SWIG_arg; } static int _wrap_CheckVersion__SWIG_1(lua_State* L) { int SWIG_arg = 0; char *result = 0 ; SWIG_check_num_args("CheckVersion",0,0) try { result = (char *)CheckVersion(); } catch(Prelude::PreludeError &_e) { SWIG_exception(SWIG_RuntimeError, (&_e)->what()); } lua_pushstring(L,(const char*)result); SWIG_arg++; return SWIG_arg; if(0) SWIG_fail; fail: lua_error(L); return SWIG_arg; } static int _wrap_CheckVersion(lua_State* L) { int argc; int argv[2]={ 1,2 }; argc = lua_gettop(L); if (argc == 0) { return _wrap_CheckVersion__SWIG_1(L); } if (argc == 1) { int _v; { _v = lua_isstring(L,argv[0]); } if (_v) { return _wrap_CheckVersion__SWIG_0(L); } } lua_pushstring(L,"Wrong arguments for overloaded function 'CheckVersion'\n" " Possible C/C++ prototypes are:\n" " CheckVersion(char const *)\n" " CheckVersion()\n"); lua_error(L);return 0; } static int _wrap_PreludeLog_SetLevel(lua_State* L) { int SWIG_arg = 0; int arg1 ; SWIG_check_num_args("Prelude::PreludeLog::SetLevel",1,1) if(!lua_isnumber(L,1)) SWIG_fail_arg("Prelude::PreludeLog::SetLevel",1,"int"); arg1 = (int)lua_tonumber(L, 1); try { Prelude::PreludeLog::SetLevel(arg1); } catch(Prelude::PreludeError &_e) { SWIG_exception(SWIG_RuntimeError, (&_e)->what()); } return SWIG_arg; if(0) SWIG_fail; fail: lua_error(L); return SWIG_arg; } static int _wrap_PreludeLog_SetDebugLevel(lua_State* L) { int SWIG_arg = 0; int arg1 ; SWIG_check_num_args("Prelude::PreludeLog::SetDebugLevel",1,1) if(!lua_isnumber(L,1)) SWIG_fail_arg("Prelude::PreludeLog::SetDebugLevel",1,"int"); arg1 = (int)lua_tonumber(L, 1); try { Prelude::PreludeLog::SetDebugLevel(arg1); } catch(Prelude::PreludeError &_e) { SWIG_exception(SWIG_RuntimeError, (&_e)->what()); } return SWIG_arg; if(0) SWIG_fail; fail: lua_error(L); return SWIG_arg; } static int _wrap_PreludeLog_SetFlags(lua_State* L) { int SWIG_arg = 0; int arg1 ; SWIG_check_num_args("Prelude::PreludeLog::SetFlags",1,1) if(!lua_isnumber(L,1)) SWIG_fail_arg("Prelude::PreludeLog::SetFlags",1,"int"); arg1 = (int)lua_tonumber(L, 1); try { Prelude::PreludeLog::SetFlags(arg1); } catch(Prelude::PreludeError &_e) { SWIG_exception(SWIG_RuntimeError, (&_e)->what()); } return SWIG_arg; if(0) SWIG_fail; fail: lua_error(L); return SWIG_arg; } static int _wrap_PreludeLog_GetFlags(lua_State* L) { int SWIG_arg = 0; int result; SWIG_check_num_args("Prelude::PreludeLog::GetFlags",0,0) try { result = (int)Prelude::PreludeLog::GetFlags(); } catch(Prelude::PreludeError &_e) { SWIG_exception(SWIG_RuntimeError, (&_e)->what()); } lua_pushnumber(L, (lua_Number) result); SWIG_arg++; return SWIG_arg; if(0) SWIG_fail; fail: lua_error(L); return SWIG_arg; } static int _wrap_PreludeLog_SetLogfile(lua_State* L) { int SWIG_arg = 0; char *arg1 = (char *) 0 ; SWIG_check_num_args("Prelude::PreludeLog::SetLogfile",1,1) if(!lua_isstring(L,1)) SWIG_fail_arg("Prelude::PreludeLog::SetLogfile",1,"char const *"); arg1 = (char *)lua_tostring(L, 1); try { Prelude::PreludeLog::SetLogfile((char const *)arg1); } catch(Prelude::PreludeError &_e) { SWIG_exception(SWIG_RuntimeError, (&_e)->what()); } return SWIG_arg; if(0) SWIG_fail; fail: lua_error(L); return SWIG_arg; } static int _wrap_PreludeLog_SetCallback(lua_State* L) { int SWIG_arg = 0; void (*arg1)(int,char const *) = (void (*)(int,char const *)) 0 ; SWIG_check_num_args("Prelude::PreludeLog::SetCallback",1,1) { if ( ! lua_isfunction(L, -1) ) SWIG_exception(SWIG_ValueError, "Argument should be a function"); if ( __lua_state ) luaL_unref(L, LUA_REGISTRYINDEX, __prelude_log_func); __prelude_log_func = luaL_ref(L, LUA_REGISTRYINDEX); arg1 = _cb_lua_log; __lua_state = L; } try { Prelude::PreludeLog::SetCallback(arg1); } catch(Prelude::PreludeError &_e) { SWIG_exception(SWIG_RuntimeError, (&_e)->what()); } return SWIG_arg; if(0) SWIG_fail; fail: lua_error(L); return SWIG_arg; } static int _wrap_new_PreludeLog(lua_State* L) { int SWIG_arg = 0; Prelude::PreludeLog *result = 0 ; SWIG_check_num_args("Prelude::PreludeLog::PreludeLog",0,0) result = (Prelude::PreludeLog *)new Prelude::PreludeLog(); SWIG_NewPointerObj(L,result,SWIGTYPE_p_Prelude__PreludeLog,1); SWIG_arg++; return SWIG_arg; if(0) SWIG_fail; fail: lua_error(L); return SWIG_arg; } static void swig_delete_PreludeLog(void *obj) { Prelude::PreludeLog *arg1 = (Prelude::PreludeLog *) obj; delete arg1; } static swig_lua_method swig_Prelude_PreludeLog_methods[] = { {0,0} }; static swig_lua_attribute swig_Prelude_PreludeLog_attributes[] = { {0,0,0} }; static swig_lua_class *swig_Prelude_PreludeLog_bases[] = {0}; static const char *swig_Prelude_PreludeLog_base_names[] = {0}; static swig_lua_class _wrap_class_Prelude_PreludeLog = { "PreludeLog", &SWIGTYPE_p_Prelude__PreludeLog,_wrap_new_PreludeLog, swig_delete_PreludeLog, swig_Prelude_PreludeLog_methods, swig_Prelude_PreludeLog_attributes, swig_Prelude_PreludeLog_bases, swig_Prelude_PreludeLog_base_names }; static int _wrap_new_PreludeError__SWIG_0(lua_State* L) { int SWIG_arg = 0; int arg1 ; Prelude::PreludeError *result = 0 ; SWIG_check_num_args("Prelude::PreludeError",1,1) if(!lua_isnumber(L,1)) SWIG_fail_arg("Prelude::PreludeError",1,"int"); arg1 = (int)lua_tonumber(L, 1); try { result = (Prelude::PreludeError *)new Prelude::PreludeError(arg1); } catch(Prelude::PreludeError &_e) { SWIG_exception(SWIG_RuntimeError, (&_e)->what()); } SWIG_NewPointerObj(L,result,SWIGTYPE_p_Prelude__PreludeError,1); SWIG_arg++; return SWIG_arg; if(0) SWIG_fail; fail: lua_error(L); return SWIG_arg; } static int _wrap_new_PreludeError__SWIG_1(lua_State* L) { int SWIG_arg = 0; std::string arg1 ; Prelude::PreludeError *result = 0 ; SWIG_check_num_args("Prelude::PreludeError",1,1) if(!lua_isstring(L,1)) SWIG_fail_arg("Prelude::PreludeError",1,"std::string const"); (&arg1)->assign(lua_tostring(L,1),lua_strlen(L,1)); try { result = (Prelude::PreludeError *)new Prelude::PreludeError(arg1); } catch(Prelude::PreludeError &_e) { SWIG_exception(SWIG_RuntimeError, (&_e)->what()); } SWIG_NewPointerObj(L,result,SWIGTYPE_p_Prelude__PreludeError,1); SWIG_arg++; return SWIG_arg; if(0) SWIG_fail; fail: lua_error(L); return SWIG_arg; } static int _wrap_new_PreludeError(lua_State* L) { int argc; int argv[2]={ 1,2 }; argc = lua_gettop(L); if (argc == 1) { int _v; { _v = lua_isnumber(L,argv[0]); } if (_v) { return _wrap_new_PreludeError__SWIG_0(L); } } if (argc == 1) { int _v; { _v = lua_isstring(L,argv[0]); } if (_v) { return _wrap_new_PreludeError__SWIG_1(L); } } lua_pushstring(L,"Wrong arguments for overloaded function 'new_PreludeError'\n" " Possible C/C++ prototypes are:\n" " Prelude::PreludeError(int)\n" " Prelude::PreludeError(std::string const)\n"); lua_error(L);return 0; } static int _wrap_PreludeError_what(lua_State* L) { int SWIG_arg = 0; Prelude::PreludeError *arg1 = (Prelude::PreludeError *) 0 ; char *result = 0 ; SWIG_check_num_args("what",1,1) if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("what",1,"Prelude::PreludeError const *"); if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Prelude__PreludeError,0))){ SWIG_fail_ptr("PreludeError_what",1,SWIGTYPE_p_Prelude__PreludeError); } try { result = (char *)((Prelude::PreludeError const *)arg1)->what(); } catch(Prelude::PreludeError &_e) { SWIG_exception(SWIG_RuntimeError, (&_e)->what()); } lua_pushstring(L,(const char*)result); SWIG_arg++; return SWIG_arg; if(0) SWIG_fail; fail: lua_error(L); return SWIG_arg; } static void swig_delete_PreludeError(void *obj) { Prelude::PreludeError *arg1 = (Prelude::PreludeError *) obj; delete arg1; } static swig_lua_method swig_Prelude_PreludeError_methods[] = { {"what", _wrap_PreludeError_what}, {0,0} }; static swig_lua_attribute swig_Prelude_PreludeError_attributes[] = { {0,0,0} }; static swig_lua_class *swig_Prelude_PreludeError_bases[] = {0}; static const char *swig_Prelude_PreludeError_base_names[] = {0}; static swig_lua_class _wrap_class_Prelude_PreludeError = { "PreludeError", &SWIGTYPE_p_Prelude__PreludeError,_wrap_new_PreludeError, swig_delete_PreludeError, swig_Prelude_PreludeError_methods, swig_Prelude_PreludeError_attributes, swig_Prelude_PreludeError_bases, swig_Prelude_PreludeError_base_names }; static int _wrap_new_Connection__SWIG_0(lua_State* L) { int SWIG_arg = 0; Prelude::Connection *result = 0 ; SWIG_check_num_args("Prelude::Connection",0,0) try { result = (Prelude::Connection *)new Prelude::Connection(); } catch(Prelude::PreludeError &_e) { SWIG_exception(SWIG_RuntimeError, (&_e)->what()); } SWIG_NewPointerObj(L,result,SWIGTYPE_p_Prelude__Connection,1); SWIG_arg++; return SWIG_arg; if(0) SWIG_fail; fail: lua_error(L); return SWIG_arg; } static int _wrap_new_Connection__SWIG_1(lua_State* L) { int SWIG_arg = 0; char *arg1 = (char *) 0 ; Prelude::Connection *result = 0 ; SWIG_check_num_args("Prelude::Connection",1,1) if(!lua_isstring(L,1)) SWIG_fail_arg("Prelude::Connection",1,"char const *"); arg1 = (char *)lua_tostring(L, 1); try { result = (Prelude::Connection *)new Prelude::Connection((char const *)arg1); } catch(Prelude::PreludeError &_e) { SWIG_exception(SWIG_RuntimeError, (&_e)->what()); } SWIG_NewPointerObj(L,result,SWIGTYPE_p_Prelude__Connection,1); SWIG_arg++; return SWIG_arg; if(0) SWIG_fail; fail: lua_error(L); return SWIG_arg; } static int _wrap_new_Connection__SWIG_2(lua_State* L) { int SWIG_arg = 0; Prelude::Connection *arg1 = 0 ; Prelude::Connection *result = 0 ; SWIG_check_num_args("Prelude::Connection",1,1) if(!lua_isuserdata(L,1)) SWIG_fail_arg("Prelude::Connection",1,"Prelude::Connection const &"); if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Prelude__Connection,0))){ SWIG_fail_ptr("new_Connection",1,SWIGTYPE_p_Prelude__Connection); } try { result = (Prelude::Connection *)new Prelude::Connection((Prelude::Connection const &)*arg1); } catch(Prelude::PreludeError &_e) { SWIG_exception(SWIG_RuntimeError, (&_e)->what()); } SWIG_NewPointerObj(L,result,SWIGTYPE_p_Prelude__Connection,1); SWIG_arg++; return SWIG_arg; if(0) SWIG_fail; fail: lua_error(L); return SWIG_arg; } static int _wrap_new_Connection__SWIG_3(lua_State* L) { int SWIG_arg = 0; prelude_connection_t *arg1 = (prelude_connection_t *) 0 ; bool arg2 ; Prelude::Connection *result = 0 ; SWIG_check_num_args("Prelude::Connection",2,2) if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Prelude::Connection",1,"prelude_connection_t *"); if(!lua_isboolean(L,2)) SWIG_fail_arg("Prelude::Connection",2,"bool"); if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_prelude_connection_t,0))){ SWIG_fail_ptr("new_Connection",1,SWIGTYPE_p_prelude_connection_t); } arg2 = (lua_toboolean(L, 2)!=0); try { result = (Prelude::Connection *)new Prelude::Connection(arg1,arg2); } catch(Prelude::PreludeError &_e) { SWIG_exception(SWIG_RuntimeError, (&_e)->what()); } SWIG_NewPointerObj(L,result,SWIGTYPE_p_Prelude__Connection,1); SWIG_arg++; return SWIG_arg; if(0) SWIG_fail; fail: lua_error(L); return SWIG_arg; } static int _wrap_new_Connection__SWIG_4(lua_State* L) { int SWIG_arg = 0; prelude_connection_t *arg1 = (prelude_connection_t *) 0 ; Prelude::Connection *result = 0 ; SWIG_check_num_args("Prelude::Connection",1,1) if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Prelude::Connection",1,"prelude_connection_t *"); if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_prelude_connection_t,0))){ SWIG_fail_ptr("new_Connection",1,SWIGTYPE_p_prelude_connection_t); } try { result = (Prelude::Connection *)new Prelude::Connection(arg1); } catch(Prelude::PreludeError &_e) { SWIG_exception(SWIG_RuntimeError, (&_e)->what()); } SWIG_NewPointerObj(L,result,SWIGTYPE_p_Prelude__Connection,1); SWIG_arg++; return SWIG_arg; if(0) SWIG_fail; fail: lua_error(L); return SWIG_arg; } static int _wrap_new_Connection(lua_State* L) { int argc; int argv[3]={ 1,2,3 }; argc = lua_gettop(L); if (argc == 0) { return _wrap_new_Connection__SWIG_0(L); } if (argc == 1) { int _v; { void *ptr; if (lua_isuserdata(L,argv[0])==0 || SWIG_ConvertPtr(L,argv[0], (void **) &ptr, SWIGTYPE_p_Prelude__Connection, 0)) { _v = 0; } else { _v = 1; } } if (_v) { return _wrap_new_Connection__SWIG_2(L); } } if (argc == 1) { int _v; { void *ptr; if (SWIG_isptrtype(L,argv[0])==0 || SWIG_ConvertPtr(L,argv[0], (void **) &ptr, SWIGTYPE_p_prelude_connection_t, 0)) { _v = 0; } else { _v = 1; } } if (_v) { return _wrap_new_Connection__SWIG_4(L); } } if (argc == 1) { int _v; { _v = lua_isstring(L,argv[0]); } if (_v) { return _wrap_new_Connection__SWIG_1(L); } } if (argc == 2) { int _v; { void *ptr; if (SWIG_isptrtype(L,argv[0])==0 || SWIG_ConvertPtr(L,argv[0], (void **) &ptr, SWIGTYPE_p_prelude_connection_t, 0)) { _v = 0; } else { _v = 1; } } if (_v) { { _v = lua_isboolean(L,argv[1]); } if (_v) { return _wrap_new_Connection__SWIG_3(L); } } } lua_pushstring(L,"Wrong arguments for overloaded function 'new_Connection'\n" " Possible C/C++ prototypes are:\n" " Prelude::Connection()\n" " Prelude::Connection(char const *)\n" " Prelude::Connection(Prelude::Connection const &)\n" " Prelude::Connection(prelude_connection_t *,bool)\n" " Prelude::Connection(prelude_connection_t *)\n"); lua_error(L);return 0; } static int _wrap_Connection_GetConnection(lua_State* L) { int SWIG_arg = 0; Prelude::Connection *arg1 = (Prelude::Connection *) 0 ; prelude_connection_t *result = 0 ; SWIG_check_num_args("GetConnection",1,1) if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("GetConnection",1,"Prelude::Connection *"); if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Prelude__Connection,0))){ SWIG_fail_ptr("Connection_GetConnection",1,SWIGTYPE_p_Prelude__Connection); } try { result = (prelude_connection_t *)(arg1)->GetConnection(); } catch(Prelude::PreludeError &_e) { SWIG_exception(SWIG_RuntimeError, (&_e)->what()); } SWIG_NewPointerObj(L,result,SWIGTYPE_p_prelude_connection_t,0); SWIG_arg++; return SWIG_arg; if(0) SWIG_fail; fail: lua_error(L); return SWIG_arg; } static int _wrap_Connection_Close(lua_State* L) { int SWIG_arg = 0; Prelude::Connection *arg1 = (Prelude::Connection *) 0 ; SWIG_check_num_args("Close",1,1) if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Close",1,"Prelude::Connection *"); if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Prelude__Connection,0))){ SWIG_fail_ptr("Connection_Close",1,SWIGTYPE_p_Prelude__Connection); } try { (arg1)->Close(); } catch(Prelude::PreludeError &_e) { SWIG_exception(SWIG_RuntimeError, (&_e)->what()); } return SWIG_arg; if(0) SWIG_fail; fail: lua_error(L); return SWIG_arg; } static int _wrap_Connection_Connect(lua_State* L) { int SWIG_arg = 0; Prelude::Connection *arg1 = (Prelude::Connection *) 0 ; Prelude::ClientProfile *arg2 = 0 ; int arg3 ; SWIG_check_num_args("Connect",3,3) if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Connect",1,"Prelude::Connection *"); if(!lua_isuserdata(L,2)) SWIG_fail_arg("Connect",2,"Prelude::ClientProfile &"); if(!lua_isnumber(L,3)) SWIG_fail_arg("Connect",3,"int"); if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Prelude__Connection,0))){ SWIG_fail_ptr("Connection_Connect",1,SWIGTYPE_p_Prelude__Connection); } if (!SWIG_IsOK(SWIG_ConvertPtr(L,2,(void**)&arg2,SWIGTYPE_p_Prelude__ClientProfile,0))){ SWIG_fail_ptr("Connection_Connect",2,SWIGTYPE_p_Prelude__ClientProfile); } arg3 = (int)lua_tonumber(L, 3); try { (arg1)->Connect(*arg2,arg3); } catch(Prelude::PreludeError &_e) { SWIG_exception(SWIG_RuntimeError, (&_e)->what()); } return SWIG_arg; if(0) SWIG_fail; fail: lua_error(L); return SWIG_arg; } static int _wrap_Connection_SetState(lua_State* L) { int SWIG_arg = 0; Prelude::Connection *arg1 = (Prelude::Connection *) 0 ; int arg2 ; SWIG_check_num_args("SetState",2,2) if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("SetState",1,"Prelude::Connection *"); if(!lua_isnumber(L,2)) SWIG_fail_arg("SetState",2,"int"); if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Prelude__Connection,0))){ SWIG_fail_ptr("Connection_SetState",1,SWIGTYPE_p_Prelude__Connection); } arg2 = (int)lua_tonumber(L, 2); try { (arg1)->SetState(arg2); } catch(Prelude::PreludeError &_e) { SWIG_exception(SWIG_RuntimeError, (&_e)->what()); } return SWIG_arg; if(0) SWIG_fail; fail: lua_error(L); return SWIG_arg; } static int _wrap_Connection_GetState(lua_State* L) { int SWIG_arg = 0; Prelude::Connection *arg1 = (Prelude::Connection *) 0 ; int result; SWIG_check_num_args("GetState",1,1) if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("GetState",1,"Prelude::Connection *"); if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Prelude__Connection,0))){ SWIG_fail_ptr("Connection_GetState",1,SWIGTYPE_p_Prelude__Connection); } try { result = (int)(arg1)->GetState(); } catch(Prelude::PreludeError &_e) { SWIG_exception(SWIG_RuntimeError, (&_e)->what()); } lua_pushnumber(L, (lua_Number) result); SWIG_arg++; return SWIG_arg; if(0) SWIG_fail; fail: lua_error(L); return SWIG_arg; } static int _wrap_Connection_SetData(lua_State* L) { int SWIG_arg = 0; Prelude::Connection *arg1 = (Prelude::Connection *) 0 ; void *arg2 = (void *) 0 ; SWIG_check_num_args("SetData",2,2) if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("SetData",1,"Prelude::Connection *"); if(!SWIG_isptrtype(L,2)) SWIG_fail_arg("SetData",2,"void *"); if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Prelude__Connection,0))){ SWIG_fail_ptr("Connection_SetData",1,SWIGTYPE_p_Prelude__Connection); } arg2=(void *)SWIG_MustGetPtr(L,2,0,0,2,"Connection_SetData"); try { (arg1)->SetData(arg2); } catch(Prelude::PreludeError &_e) { SWIG_exception(SWIG_RuntimeError, (&_e)->what()); } return SWIG_arg; if(0) SWIG_fail; fail: lua_error(L); return SWIG_arg; } static int _wrap_Connection_GetData(lua_State* L) { int SWIG_arg = 0; Prelude::Connection *arg1 = (Prelude::Connection *) 0 ; void *result = 0 ; SWIG_check_num_args("GetData",1,1) if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("GetData",1,"Prelude::Connection *"); if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Prelude__Connection,0))){ SWIG_fail_ptr("Connection_GetData",1,SWIGTYPE_p_Prelude__Connection); } try { result = (void *)(arg1)->GetData(); } catch(Prelude::PreludeError &_e) { SWIG_exception(SWIG_RuntimeError, (&_e)->what()); } SWIG_NewPointerObj(L,result,SWIGTYPE_p_void,0); SWIG_arg++; return SWIG_arg; if(0) SWIG_fail; fail: lua_error(L); return SWIG_arg; } static int _wrap_Connection_GetPermission(lua_State* L) { int SWIG_arg = 0; Prelude::Connection *arg1 = (Prelude::Connection *) 0 ; int result; SWIG_check_num_args("GetPermission",1,1) if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("GetPermission",1,"Prelude::Connection *"); if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Prelude__Connection,0))){ SWIG_fail_ptr("Connection_GetPermission",1,SWIGTYPE_p_Prelude__Connection); } try { result = (int)(arg1)->GetPermission(); } catch(Prelude::PreludeError &_e) { SWIG_exception(SWIG_RuntimeError, (&_e)->what()); } lua_pushnumber(L, (lua_Number) result); SWIG_arg++; return SWIG_arg; if(0) SWIG_fail; fail: lua_error(L); return SWIG_arg; } static int _wrap_Connection_SetPeerAnalyzerid(lua_State* L) { int SWIG_arg = 0; Prelude::Connection *arg1 = (Prelude::Connection *) 0 ; uint64_t arg2 ; SWIG_check_num_args("SetPeerAnalyzerid",2,2) if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("SetPeerAnalyzerid",1,"Prelude::Connection *"); if(!lua_isnumber(L,2)) SWIG_fail_arg("SetPeerAnalyzerid",2,"uint64_t"); if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Prelude__Connection,0))){ SWIG_fail_ptr("Connection_SetPeerAnalyzerid",1,SWIGTYPE_p_Prelude__Connection); } arg2 = (uint64_t)lua_tonumber(L, 2); try { (arg1)->SetPeerAnalyzerid(arg2); } catch(Prelude::PreludeError &_e) { SWIG_exception(SWIG_RuntimeError, (&_e)->what()); } return SWIG_arg; if(0) SWIG_fail; fail: lua_error(L); return SWIG_arg; } static int _wrap_Connection_GetPeerAnalyzerid(lua_State* L) { int SWIG_arg = 0; Prelude::Connection *arg1 = (Prelude::Connection *) 0 ; uint64_t result; SWIG_check_num_args("GetPeerAnalyzerid",1,1) if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("GetPeerAnalyzerid",1,"Prelude::Connection *"); if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Prelude__Connection,0))){ SWIG_fail_ptr("Connection_GetPeerAnalyzerid",1,SWIGTYPE_p_Prelude__Connection); } try { result = (uint64_t)(arg1)->GetPeerAnalyzerid(); } catch(Prelude::PreludeError &_e) { SWIG_exception(SWIG_RuntimeError, (&_e)->what()); } lua_pushnumber(L, (lua_Number) result); SWIG_arg++; return SWIG_arg; if(0) SWIG_fail; fail: lua_error(L); return SWIG_arg; } static int _wrap_Connection_GetLocalAddr(lua_State* L) { int SWIG_arg = 0; Prelude::Connection *arg1 = (Prelude::Connection *) 0 ; char *result = 0 ; SWIG_check_num_args("GetLocalAddr",1,1) if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("GetLocalAddr",1,"Prelude::Connection *"); if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Prelude__Connection,0))){ SWIG_fail_ptr("Connection_GetLocalAddr",1,SWIGTYPE_p_Prelude__Connection); } try { result = (char *)(arg1)->GetLocalAddr(); } catch(Prelude::PreludeError &_e) { SWIG_exception(SWIG_RuntimeError, (&_e)->what()); } lua_pushstring(L,(const char*)result); SWIG_arg++; return SWIG_arg; if(0) SWIG_fail; fail: lua_error(L); return SWIG_arg; } static int _wrap_Connection_GetLocalPort(lua_State* L) { int SWIG_arg = 0; Prelude::Connection *arg1 = (Prelude::Connection *) 0 ; unsigned int result; SWIG_check_num_args("GetLocalPort",1,1) if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("GetLocalPort",1,"Prelude::Connection *"); if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Prelude__Connection,0))){ SWIG_fail_ptr("Connection_GetLocalPort",1,SWIGTYPE_p_Prelude__Connection); } try { result = (unsigned int)(arg1)->GetLocalPort(); } catch(Prelude::PreludeError &_e) { SWIG_exception(SWIG_RuntimeError, (&_e)->what()); } lua_pushnumber(L, (lua_Number) result); SWIG_arg++; return SWIG_arg; if(0) SWIG_fail; fail: lua_error(L); return SWIG_arg; } static int _wrap_Connection_GetPeerAddr(lua_State* L) { int SWIG_arg = 0; Prelude::Connection *arg1 = (Prelude::Connection *) 0 ; char *result = 0 ; SWIG_check_num_args("GetPeerAddr",1,1) if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("GetPeerAddr",1,"Prelude::Connection *"); if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Prelude__Connection,0))){ SWIG_fail_ptr("Connection_GetPeerAddr",1,SWIGTYPE_p_Prelude__Connection); } try { result = (char *)(arg1)->GetPeerAddr(); } catch(Prelude::PreludeError &_e) { SWIG_exception(SWIG_RuntimeError, (&_e)->what()); } lua_pushstring(L,(const char*)result); SWIG_arg++; return SWIG_arg; if(0) SWIG_fail; fail: lua_error(L); return SWIG_arg; } static int _wrap_Connection_GetPeerPort(lua_State* L) { int SWIG_arg = 0; Prelude::Connection *arg1 = (Prelude::Connection *) 0 ; unsigned int result; SWIG_check_num_args("GetPeerPort",1,1) if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("GetPeerPort",1,"Prelude::Connection *"); if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Prelude__Connection,0))){ SWIG_fail_ptr("Connection_GetPeerPort",1,SWIGTYPE_p_Prelude__Connection); } try { result = (unsigned int)(arg1)->GetPeerPort(); } catch(Prelude::PreludeError &_e) { SWIG_exception(SWIG_RuntimeError, (&_e)->what()); } lua_pushnumber(L, (lua_Number) result); SWIG_arg++; return SWIG_arg; if(0) SWIG_fail; fail: lua_error(L); return SWIG_arg; } static int _wrap_Connection_IsAlive(lua_State* L) { int SWIG_arg = 0; Prelude::Connection *arg1 = (Prelude::Connection *) 0 ; bool result; SWIG_check_num_args("IsAlive",1,1) if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("IsAlive",1,"Prelude::Connection *"); if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Prelude__Connection,0))){ SWIG_fail_ptr("Connection_IsAlive",1,SWIGTYPE_p_Prelude__Connection); } try { result = (bool)(arg1)->IsAlive(); } catch(Prelude::PreludeError &_e) { SWIG_exception(SWIG_RuntimeError, (&_e)->what()); } lua_pushboolean(L,(int)(result!=0)); SWIG_arg++; return SWIG_arg; if(0) SWIG_fail; fail: lua_error(L); return SWIG_arg; } static int _wrap_Connection_GetFd(lua_State* L) { int SWIG_arg = 0; Prelude::Connection *arg1 = (Prelude::Connection *) 0 ; int result; SWIG_check_num_args("GetFd",1,1) if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("GetFd",1,"Prelude::Connection *"); if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Prelude__Connection,0))){ SWIG_fail_ptr("Connection_GetFd",1,SWIGTYPE_p_Prelude__Connection); } try { result = (int)(arg1)->GetFd(); } catch(Prelude::PreludeError &_e) { SWIG_exception(SWIG_RuntimeError, (&_e)->what()); } lua_pushnumber(L, (lua_Number) result); SWIG_arg++; return SWIG_arg; if(0) SWIG_fail; fail: lua_error(L); return SWIG_arg; } static int _wrap_Connection_RecvIDMEF(lua_State* L) { int SWIG_arg = 0; Prelude::Connection *arg1 = (Prelude::Connection *) 0 ; Prelude::IDMEF result; SWIG_check_num_args("RecvIDMEF",1,1) if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("RecvIDMEF",1,"Prelude::Connection *"); if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Prelude__Connection,0))){ SWIG_fail_ptr("Connection_RecvIDMEF",1,SWIGTYPE_p_Prelude__Connection); } try { result = (arg1)->RecvIDMEF(); } catch(Prelude::PreludeError &_e) { SWIG_exception(SWIG_RuntimeError, (&_e)->what()); } { Prelude::IDMEF * resultptr = new Prelude::IDMEF((const Prelude::IDMEF &) result); SWIG_NewPointerObj(L,(void *) resultptr,SWIGTYPE_p_Prelude__IDMEF,1); SWIG_arg++; } return SWIG_arg; if(0) SWIG_fail; fail: lua_error(L); return SWIG_arg; } static void swig_delete_Connection(void *obj) { Prelude::Connection *arg1 = (Prelude::Connection *) obj; delete arg1; } static swig_lua_method swig_Prelude_Connection_methods[] = { {"GetConnection", _wrap_Connection_GetConnection}, {"Close", _wrap_Connection_Close}, {"Connect", _wrap_Connection_Connect}, {"SetState", _wrap_Connection_SetState}, {"GetState", _wrap_Connection_GetState}, {"SetData", _wrap_Connection_SetData}, {"GetData", _wrap_Connection_GetData}, {"GetPermission", _wrap_Connection_GetPermission}, {"SetPeerAnalyzerid", _wrap_Connection_SetPeerAnalyzerid}, {"GetPeerAnalyzerid", _wrap_Connection_GetPeerAnalyzerid}, {"GetLocalAddr", _wrap_Connection_GetLocalAddr}, {"GetLocalPort", _wrap_Connection_GetLocalPort}, {"GetPeerAddr", _wrap_Connection_GetPeerAddr}, {"GetPeerPort", _wrap_Connection_GetPeerPort}, {"IsAlive", _wrap_Connection_IsAlive}, {"GetFd", _wrap_Connection_GetFd}, {"RecvIDMEF", _wrap_Connection_RecvIDMEF}, {0,0} }; static swig_lua_attribute swig_Prelude_Connection_attributes[] = { {0,0,0} }; static swig_lua_class *swig_Prelude_Connection_bases[] = {0}; static const char *swig_Prelude_Connection_base_names[] = {0}; static swig_lua_class _wrap_class_Prelude_Connection = { "Connection", &SWIGTYPE_p_Prelude__Connection,_wrap_new_Connection, swig_delete_Connection, swig_Prelude_Connection_methods, swig_Prelude_Connection_attributes, swig_Prelude_Connection_bases, swig_Prelude_Connection_base_names }; static int _wrap_new_ConnectionPool__SWIG_0(lua_State* L) { int SWIG_arg = 0; Prelude::ConnectionPool *result = 0 ; SWIG_check_num_args("Prelude::ConnectionPool",0,0) try { result = (Prelude::ConnectionPool *)new Prelude::ConnectionPool(); } catch(Prelude::PreludeError &_e) { SWIG_exception(SWIG_RuntimeError, (&_e)->what()); } SWIG_NewPointerObj(L,result,SWIGTYPE_p_Prelude__ConnectionPool,1); SWIG_arg++; return SWIG_arg; if(0) SWIG_fail; fail: lua_error(L); return SWIG_arg; } static int _wrap_new_ConnectionPool__SWIG_1(lua_State* L) { int SWIG_arg = 0; prelude_connection_pool_t *arg1 = (prelude_connection_pool_t *) 0 ; Prelude::ConnectionPool *result = 0 ; SWIG_check_num_args("Prelude::ConnectionPool",1,1) if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Prelude::ConnectionPool",1,"prelude_connection_pool_t *"); if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_prelude_connection_pool_t,0))){ SWIG_fail_ptr("new_ConnectionPool",1,SWIGTYPE_p_prelude_connection_pool_t); } try { result = (Prelude::ConnectionPool *)new Prelude::ConnectionPool(arg1); } catch(Prelude::PreludeError &_e) { SWIG_exception(SWIG_RuntimeError, (&_e)->what()); } SWIG_NewPointerObj(L,result,SWIGTYPE_p_Prelude__ConnectionPool,1); SWIG_arg++; return SWIG_arg; if(0) SWIG_fail; fail: lua_error(L); return SWIG_arg; } static int _wrap_new_ConnectionPool__SWIG_2(lua_State* L) { int SWIG_arg = 0; Prelude::ConnectionPool *arg1 = 0 ; Prelude::ConnectionPool *result = 0 ; SWIG_check_num_args("Prelude::ConnectionPool",1,1) if(!lua_isuserdata(L,1)) SWIG_fail_arg("Prelude::ConnectionPool",1,"Prelude::ConnectionPool const &"); if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Prelude__ConnectionPool,0))){ SWIG_fail_ptr("new_ConnectionPool",1,SWIGTYPE_p_Prelude__ConnectionPool); } try { result = (Prelude::ConnectionPool *)new Prelude::ConnectionPool((Prelude::ConnectionPool const &)*arg1); } catch(Prelude::PreludeError &_e) { SWIG_exception(SWIG_RuntimeError, (&_e)->what()); } SWIG_NewPointerObj(L,result,SWIGTYPE_p_Prelude__ConnectionPool,1); SWIG_arg++; return SWIG_arg; if(0) SWIG_fail; fail: lua_error(L); return SWIG_arg; } static int _wrap_new_ConnectionPool__SWIG_3(lua_State* L) { int SWIG_arg = 0; Prelude::ClientProfile *arg1 = 0 ; int arg2 ; Prelude::ConnectionPool *result = 0 ; SWIG_check_num_args("Prelude::ConnectionPool",2,2) if(!lua_isuserdata(L,1)) SWIG_fail_arg("Prelude::ConnectionPool",1,"Prelude::ClientProfile &"); if(!lua_isnumber(L,2)) SWIG_fail_arg("Prelude::ConnectionPool",2,"int"); if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Prelude__ClientProfile,0))){ SWIG_fail_ptr("new_ConnectionPool",1,SWIGTYPE_p_Prelude__ClientProfile); } arg2 = (int)lua_tonumber(L, 2); try { result = (Prelude::ConnectionPool *)new Prelude::ConnectionPool(*arg1,arg2); } catch(Prelude::PreludeError &_e) { SWIG_exception(SWIG_RuntimeError, (&_e)->what()); } SWIG_NewPointerObj(L,result,SWIGTYPE_p_Prelude__ConnectionPool,1); SWIG_arg++; return SWIG_arg; if(0) SWIG_fail; fail: lua_error(L); return SWIG_arg; } static int _wrap_new_ConnectionPool(lua_State* L) { int argc; int argv[3]={ 1,2,3 }; argc = lua_gettop(L); if (argc == 0) { return _wrap_new_ConnectionPool__SWIG_0(L); } if (argc == 1) { int _v; { void *ptr; if (SWIG_isptrtype(L,argv[0])==0 || SWIG_ConvertPtr(L,argv[0], (void **) &ptr, SWIGTYPE_p_prelude_connection_pool_t, 0)) { _v = 0; } else { _v = 1; } } if (_v) { return _wrap_new_ConnectionPool__SWIG_1(L); } } if (argc == 1) { int _v; { void *ptr; if (lua_isuserdata(L,argv[0])==0 || SWIG_ConvertPtr(L,argv[0], (void **) &ptr, SWIGTYPE_p_Prelude__ConnectionPool, 0)) { _v = 0; } else { _v = 1; } } if (_v) { return _wrap_new_ConnectionPool__SWIG_2(L); } } if (argc == 2) { int _v; { void *ptr; if (lua_isuserdata(L,argv[0])==0 || SWIG_ConvertPtr(L,argv[0], (void **) &ptr, SWIGTYPE_p_Prelude__ClientProfile, 0)) { _v = 0; } else { _v = 1; } } if (_v) { { _v = lua_isnumber(L,argv[1]); } if (_v) { return _wrap_new_ConnectionPool__SWIG_3(L); } } } lua_pushstring(L,"Wrong arguments for overloaded function 'new_ConnectionPool'\n" " Possible C/C++ prototypes are:\n" " Prelude::ConnectionPool()\n" " Prelude::ConnectionPool(prelude_connection_pool_t *)\n" " Prelude::ConnectionPool(Prelude::ConnectionPool const &)\n" " Prelude::ConnectionPool(Prelude::ClientProfile &,int)\n"); lua_error(L);return 0; } static int _wrap_ConnectionPool_Init(lua_State* L) { int SWIG_arg = 0; Prelude::ConnectionPool *arg1 = (Prelude::ConnectionPool *) 0 ; SWIG_check_num_args("Init",1,1) if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Init",1,"Prelude::ConnectionPool *"); if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Prelude__ConnectionPool,0))){ SWIG_fail_ptr("ConnectionPool_Init",1,SWIGTYPE_p_Prelude__ConnectionPool); } try { (arg1)->Init(); } catch(Prelude::PreludeError &_e) { SWIG_exception(SWIG_RuntimeError, (&_e)->what()); } return SWIG_arg; if(0) SWIG_fail; fail: lua_error(L); return SWIG_arg; } static int _wrap_ConnectionPool_SetConnectionString(lua_State* L) { int SWIG_arg = 0; Prelude::ConnectionPool *arg1 = (Prelude::ConnectionPool *) 0 ; char *arg2 = (char *) 0 ; SWIG_check_num_args("SetConnectionString",2,2) if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("SetConnectionString",1,"Prelude::ConnectionPool *"); if(!lua_isstring(L,2)) SWIG_fail_arg("SetConnectionString",2,"char const *"); if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Prelude__ConnectionPool,0))){ SWIG_fail_ptr("ConnectionPool_SetConnectionString",1,SWIGTYPE_p_Prelude__ConnectionPool); } arg2 = (char *)lua_tostring(L, 2); try { (arg1)->SetConnectionString((char const *)arg2); } catch(Prelude::PreludeError &_e) { SWIG_exception(SWIG_RuntimeError, (&_e)->what()); } return SWIG_arg; if(0) SWIG_fail; fail: lua_error(L); return SWIG_arg; } static int _wrap_ConnectionPool_GetConnectionString(lua_State* L) { int SWIG_arg = 0; Prelude::ConnectionPool *arg1 = (Prelude::ConnectionPool *) 0 ; char *result = 0 ; SWIG_check_num_args("GetConnectionString",1,1) if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("GetConnectionString",1,"Prelude::ConnectionPool *"); if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Prelude__ConnectionPool,0))){ SWIG_fail_ptr("ConnectionPool_GetConnectionString",1,SWIGTYPE_p_Prelude__ConnectionPool); } try { result = (char *)(arg1)->GetConnectionString(); } catch(Prelude::PreludeError &_e) { SWIG_exception(SWIG_RuntimeError, (&_e)->what()); } lua_pushstring(L,(const char*)result); SWIG_arg++; return SWIG_arg; if(0) SWIG_fail; fail: lua_error(L); return SWIG_arg; } static int _wrap_ConnectionPool_GetConnectionList(lua_State* L) { int SWIG_arg = 0; Prelude::ConnectionPool *arg1 = (Prelude::ConnectionPool *) 0 ; std::vector< Prelude::Connection > result; SWIG_check_num_args("GetConnectionList",1,1) if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("GetConnectionList",1,"Prelude::ConnectionPool *"); if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Prelude__ConnectionPool,0))){ SWIG_fail_ptr("ConnectionPool_GetConnectionList",1,SWIGTYPE_p_Prelude__ConnectionPool); } try { result = (arg1)->GetConnectionList(); } catch(Prelude::PreludeError &_e) { SWIG_exception(SWIG_RuntimeError, (&_e)->what()); } { std::vector< Prelude::Connection > * resultptr = new std::vector< Prelude::Connection >((const std::vector< Prelude::Connection > &) result); SWIG_NewPointerObj(L,(void *) resultptr,SWIGTYPE_p_std__vectorT_Prelude__Connection_t,1); SWIG_arg++; } return SWIG_arg; if(0) SWIG_fail; fail: lua_error(L); return SWIG_arg; } static int _wrap_ConnectionPool_SetFlags(lua_State* L) { int SWIG_arg = 0; Prelude::ConnectionPool *arg1 = (Prelude::ConnectionPool *) 0 ; int arg2 ; SWIG_check_num_args("SetFlags",2,2) if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("SetFlags",1,"Prelude::ConnectionPool *"); if(!lua_isnumber(L,2)) SWIG_fail_arg("SetFlags",2,"int"); if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Prelude__ConnectionPool,0))){ SWIG_fail_ptr("ConnectionPool_SetFlags",1,SWIGTYPE_p_Prelude__ConnectionPool); } arg2 = (int)lua_tonumber(L, 2); try { (arg1)->SetFlags(arg2); } catch(Prelude::PreludeError &_e) { SWIG_exception(SWIG_RuntimeError, (&_e)->what()); } return SWIG_arg; if(0) SWIG_fail; fail: lua_error(L); return SWIG_arg; } static int _wrap_ConnectionPool_GetFlags(lua_State* L) { int SWIG_arg = 0; Prelude::ConnectionPool *arg1 = (Prelude::ConnectionPool *) 0 ; int result; SWIG_check_num_args("GetFlags",1,1) if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("GetFlags",1,"Prelude::ConnectionPool *"); if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Prelude__ConnectionPool,0))){ SWIG_fail_ptr("ConnectionPool_GetFlags",1,SWIGTYPE_p_Prelude__ConnectionPool); } try { result = (int)(arg1)->GetFlags(); } catch(Prelude::PreludeError &_e) { SWIG_exception(SWIG_RuntimeError, (&_e)->what()); } lua_pushnumber(L, (lua_Number) result); SWIG_arg++; return SWIG_arg; if(0) SWIG_fail; fail: lua_error(L); return SWIG_arg; } static int _wrap_ConnectionPool_SetData(lua_State* L) { int SWIG_arg = 0; Prelude::ConnectionPool *arg1 = (Prelude::ConnectionPool *) 0 ; void *arg2 = (void *) 0 ; SWIG_check_num_args("SetData",2,2) if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("SetData",1,"Prelude::ConnectionPool *"); if(!SWIG_isptrtype(L,2)) SWIG_fail_arg("SetData",2,"void *"); if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Prelude__ConnectionPool,0))){ SWIG_fail_ptr("ConnectionPool_SetData",1,SWIGTYPE_p_Prelude__ConnectionPool); } arg2=(void *)SWIG_MustGetPtr(L,2,0,0,2,"ConnectionPool_SetData"); try { (arg1)->SetData(arg2); } catch(Prelude::PreludeError &_e) { SWIG_exception(SWIG_RuntimeError, (&_e)->what()); } return SWIG_arg; if(0) SWIG_fail; fail: lua_error(L); return SWIG_arg; } static int _wrap_ConnectionPool_GetData(lua_State* L) { int SWIG_arg = 0; Prelude::ConnectionPool *arg1 = (Prelude::ConnectionPool *) 0 ; void *result = 0 ; SWIG_check_num_args("GetData",1,1) if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("GetData",1,"Prelude::ConnectionPool *"); if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Prelude__ConnectionPool,0))){ SWIG_fail_ptr("ConnectionPool_GetData",1,SWIGTYPE_p_Prelude__ConnectionPool); } try { result = (void *)(arg1)->GetData(); } catch(Prelude::PreludeError &_e) { SWIG_exception(SWIG_RuntimeError, (&_e)->what()); } SWIG_NewPointerObj(L,result,SWIGTYPE_p_void,0); SWIG_arg++; return SWIG_arg; if(0) SWIG_fail; fail: lua_error(L); return SWIG_arg; } static int _wrap_ConnectionPool_AddConnection(lua_State* L) { int SWIG_arg = 0; Prelude::ConnectionPool *arg1 = (Prelude::ConnectionPool *) 0 ; Prelude::Connection arg2 ; Prelude::Connection *argp2 ; SWIG_check_num_args("AddConnection",2,2) if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("AddConnection",1,"Prelude::ConnectionPool *"); if(!lua_isuserdata(L,2)) SWIG_fail_arg("AddConnection",2,"Prelude::Connection"); if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Prelude__ConnectionPool,0))){ SWIG_fail_ptr("ConnectionPool_AddConnection",1,SWIGTYPE_p_Prelude__ConnectionPool); } if (!SWIG_IsOK(SWIG_ConvertPtr(L,2,(void**)&argp2,SWIGTYPE_p_Prelude__Connection,0))){ SWIG_fail_ptr("ConnectionPool_AddConnection",2,SWIGTYPE_p_Prelude__Connection); } arg2 = *argp2; try { (arg1)->AddConnection(arg2); } catch(Prelude::PreludeError &_e) { SWIG_exception(SWIG_RuntimeError, (&_e)->what()); } return SWIG_arg; if(0) SWIG_fail; fail: lua_error(L); return SWIG_arg; } static int _wrap_ConnectionPool_DelConnection(lua_State* L) { int SWIG_arg = 0; Prelude::ConnectionPool *arg1 = (Prelude::ConnectionPool *) 0 ; Prelude::Connection arg2 ; Prelude::Connection *argp2 ; SWIG_check_num_args("DelConnection",2,2) if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("DelConnection",1,"Prelude::ConnectionPool *"); if(!lua_isuserdata(L,2)) SWIG_fail_arg("DelConnection",2,"Prelude::Connection"); if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Prelude__ConnectionPool,0))){ SWIG_fail_ptr("ConnectionPool_DelConnection",1,SWIGTYPE_p_Prelude__ConnectionPool); } if (!SWIG_IsOK(SWIG_ConvertPtr(L,2,(void**)&argp2,SWIGTYPE_p_Prelude__Connection,0))){ SWIG_fail_ptr("ConnectionPool_DelConnection",2,SWIGTYPE_p_Prelude__Connection); } arg2 = *argp2; try { (arg1)->DelConnection(arg2); } catch(Prelude::PreludeError &_e) { SWIG_exception(SWIG_RuntimeError, (&_e)->what()); } return SWIG_arg; if(0) SWIG_fail; fail: lua_error(L); return SWIG_arg; } static int _wrap_ConnectionPool_SetConnectionAlive(lua_State* L) { int SWIG_arg = 0; Prelude::ConnectionPool *arg1 = (Prelude::ConnectionPool *) 0 ; Prelude::Connection *arg2 = 0 ; SWIG_check_num_args("SetConnectionAlive",2,2) if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("SetConnectionAlive",1,"Prelude::ConnectionPool *"); if(!lua_isuserdata(L,2)) SWIG_fail_arg("SetConnectionAlive",2,"Prelude::Connection &"); if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Prelude__ConnectionPool,0))){ SWIG_fail_ptr("ConnectionPool_SetConnectionAlive",1,SWIGTYPE_p_Prelude__ConnectionPool); } if (!SWIG_IsOK(SWIG_ConvertPtr(L,2,(void**)&arg2,SWIGTYPE_p_Prelude__Connection,0))){ SWIG_fail_ptr("ConnectionPool_SetConnectionAlive",2,SWIGTYPE_p_Prelude__Connection); } try { (arg1)->SetConnectionAlive(*arg2); } catch(Prelude::PreludeError &_e) { SWIG_exception(SWIG_RuntimeError, (&_e)->what()); } return SWIG_arg; if(0) SWIG_fail; fail: lua_error(L); return SWIG_arg; } static int _wrap_ConnectionPool_SetConnectionDead(lua_State* L) { int SWIG_arg = 0; Prelude::ConnectionPool *arg1 = (Prelude::ConnectionPool *) 0 ; Prelude::Connection *arg2 = 0 ; SWIG_check_num_args("SetConnectionDead",2,2) if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("SetConnectionDead",1,"Prelude::ConnectionPool *"); if(!lua_isuserdata(L,2)) SWIG_fail_arg("SetConnectionDead",2,"Prelude::Connection &"); if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Prelude__ConnectionPool,0))){ SWIG_fail_ptr("ConnectionPool_SetConnectionDead",1,SWIGTYPE_p_Prelude__ConnectionPool); } if (!SWIG_IsOK(SWIG_ConvertPtr(L,2,(void**)&arg2,SWIGTYPE_p_Prelude__Connection,0))){ SWIG_fail_ptr("ConnectionPool_SetConnectionDead",2,SWIGTYPE_p_Prelude__Connection); } try { (arg1)->SetConnectionDead(*arg2); } catch(Prelude::PreludeError &_e) { SWIG_exception(SWIG_RuntimeError, (&_e)->what()); } return SWIG_arg; if(0) SWIG_fail; fail: lua_error(L); return SWIG_arg; } static int _wrap_ConnectionPool_SetRequiredPermission(lua_State* L) { int SWIG_arg = 0; Prelude::ConnectionPool *arg1 = (Prelude::ConnectionPool *) 0 ; int arg2 ; SWIG_check_num_args("SetRequiredPermission",2,2) if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("SetRequiredPermission",1,"Prelude::ConnectionPool *"); if(!lua_isnumber(L,2)) SWIG_fail_arg("SetRequiredPermission",2,"int"); if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Prelude__ConnectionPool,0))){ SWIG_fail_ptr("ConnectionPool_SetRequiredPermission",1,SWIGTYPE_p_Prelude__ConnectionPool); } arg2 = (int)lua_tonumber(L, 2); try { (arg1)->SetRequiredPermission(arg2); } catch(Prelude::PreludeError &_e) { SWIG_exception(SWIG_RuntimeError, (&_e)->what()); } return SWIG_arg; if(0) SWIG_fail; fail: lua_error(L); return SWIG_arg; } static void swig_delete_ConnectionPool(void *obj) { Prelude::ConnectionPool *arg1 = (Prelude::ConnectionPool *) obj; delete arg1; } static swig_lua_method swig_Prelude_ConnectionPool_methods[] = { {"Init", _wrap_ConnectionPool_Init}, {"SetConnectionString", _wrap_ConnectionPool_SetConnectionString}, {"GetConnectionString", _wrap_ConnectionPool_GetConnectionString}, {"GetConnectionList", _wrap_ConnectionPool_GetConnectionList}, {"SetFlags", _wrap_ConnectionPool_SetFlags}, {"GetFlags", _wrap_ConnectionPool_GetFlags}, {"SetData", _wrap_ConnectionPool_SetData}, {"GetData", _wrap_ConnectionPool_GetData}, {"AddConnection", _wrap_ConnectionPool_AddConnection}, {"DelConnection", _wrap_ConnectionPool_DelConnection}, {"SetConnectionAlive", _wrap_ConnectionPool_SetConnectionAlive}, {"SetConnectionDead", _wrap_ConnectionPool_SetConnectionDead}, {"SetRequiredPermission", _wrap_ConnectionPool_SetRequiredPermission}, {0,0} }; static swig_lua_attribute swig_Prelude_ConnectionPool_attributes[] = { {0,0,0} }; static swig_lua_class *swig_Prelude_ConnectionPool_bases[] = {0}; static const char *swig_Prelude_ConnectionPool_base_names[] = {0}; static swig_lua_class _wrap_class_Prelude_ConnectionPool = { "ConnectionPool", &SWIGTYPE_p_Prelude__ConnectionPool,_wrap_new_ConnectionPool, swig_delete_ConnectionPool, swig_Prelude_ConnectionPool_methods, swig_Prelude_ConnectionPool_attributes, swig_Prelude_ConnectionPool_bases, swig_Prelude_ConnectionPool_base_names }; static int _wrap_new_ClientProfile__SWIG_0(lua_State* L) { int SWIG_arg = 0; Prelude::ClientProfile *result = 0 ; SWIG_check_num_args("Prelude::ClientProfile",0,0) try { result = (Prelude::ClientProfile *)new Prelude::ClientProfile(); } catch(Prelude::PreludeError &_e) { SWIG_exception(SWIG_RuntimeError, (&_e)->what()); } SWIG_NewPointerObj(L,result,SWIGTYPE_p_Prelude__ClientProfile,1); SWIG_arg++; return SWIG_arg; if(0) SWIG_fail; fail: lua_error(L); return SWIG_arg; } static int _wrap_new_ClientProfile__SWIG_1(lua_State* L) { int SWIG_arg = 0; char *arg1 = (char *) 0 ; Prelude::ClientProfile *result = 0 ; SWIG_check_num_args("Prelude::ClientProfile",1,1) if(!lua_isstring(L,1)) SWIG_fail_arg("Prelude::ClientProfile",1,"char const *"); arg1 = (char *)lua_tostring(L, 1); try { result = (Prelude::ClientProfile *)new Prelude::ClientProfile((char const *)arg1); } catch(Prelude::PreludeError &_e) { SWIG_exception(SWIG_RuntimeError, (&_e)->what()); } SWIG_NewPointerObj(L,result,SWIGTYPE_p_Prelude__ClientProfile,1); SWIG_arg++; return SWIG_arg; if(0) SWIG_fail; fail: lua_error(L); return SWIG_arg; } static int _wrap_new_ClientProfile__SWIG_2(lua_State* L) { int SWIG_arg = 0; prelude_client_profile_t *arg1 = (prelude_client_profile_t *) 0 ; Prelude::ClientProfile *result = 0 ; SWIG_check_num_args("Prelude::ClientProfile",1,1) if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Prelude::ClientProfile",1,"prelude_client_profile_t *"); if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_prelude_client_profile_t,0))){ SWIG_fail_ptr("new_ClientProfile",1,SWIGTYPE_p_prelude_client_profile_t); } try { result = (Prelude::ClientProfile *)new Prelude::ClientProfile(arg1); } catch(Prelude::PreludeError &_e) { SWIG_exception(SWIG_RuntimeError, (&_e)->what()); } SWIG_NewPointerObj(L,result,SWIGTYPE_p_Prelude__ClientProfile,1); SWIG_arg++; return SWIG_arg; if(0) SWIG_fail; fail: lua_error(L); return SWIG_arg; } static int _wrap_new_ClientProfile__SWIG_3(lua_State* L) { int SWIG_arg = 0; Prelude::ClientProfile *arg1 = 0 ; Prelude::ClientProfile *result = 0 ; SWIG_check_num_args("Prelude::ClientProfile",1,1) if(!lua_isuserdata(L,1)) SWIG_fail_arg("Prelude::ClientProfile",1,"Prelude::ClientProfile const &"); if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Prelude__ClientProfile,0))){ SWIG_fail_ptr("new_ClientProfile",1,SWIGTYPE_p_Prelude__ClientProfile); } try { result = (Prelude::ClientProfile *)new Prelude::ClientProfile((Prelude::ClientProfile const &)*arg1); } catch(Prelude::PreludeError &_e) { SWIG_exception(SWIG_RuntimeError, (&_e)->what()); } SWIG_NewPointerObj(L,result,SWIGTYPE_p_Prelude__ClientProfile,1); SWIG_arg++; return SWIG_arg; if(0) SWIG_fail; fail: lua_error(L); return SWIG_arg; } static int _wrap_new_ClientProfile(lua_State* L) { int argc; int argv[2]={ 1,2 }; argc = lua_gettop(L); if (argc == 0) { return _wrap_new_ClientProfile__SWIG_0(L); } if (argc == 1) { int _v; { void *ptr; if (SWIG_isptrtype(L,argv[0])==0 || SWIG_ConvertPtr(L,argv[0], (void **) &ptr, SWIGTYPE_p_prelude_client_profile_t, 0)) { _v = 0; } else { _v = 1; } } if (_v) { return _wrap_new_ClientProfile__SWIG_2(L); } } if (argc == 1) { int _v; { void *ptr; if (lua_isuserdata(L,argv[0])==0 || SWIG_ConvertPtr(L,argv[0], (void **) &ptr, SWIGTYPE_p_Prelude__ClientProfile, 0)) { _v = 0; } else { _v = 1; } } if (_v) { return _wrap_new_ClientProfile__SWIG_3(L); } } if (argc == 1) { int _v; { _v = lua_isstring(L,argv[0]); } if (_v) { return _wrap_new_ClientProfile__SWIG_1(L); } } lua_pushstring(L,"Wrong arguments for overloaded function 'new_ClientProfile'\n" " Possible C/C++ prototypes are:\n" " Prelude::ClientProfile()\n" " Prelude::ClientProfile(char const *)\n" " Prelude::ClientProfile(prelude_client_profile_t *)\n" " Prelude::ClientProfile(Prelude::ClientProfile const &)\n"); lua_error(L);return 0; } static int _wrap_ClientProfile_GetUid(lua_State* L) { int SWIG_arg = 0; Prelude::ClientProfile *arg1 = (Prelude::ClientProfile *) 0 ; int result; SWIG_check_num_args("GetUid",1,1) if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("GetUid",1,"Prelude::ClientProfile *"); if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Prelude__ClientProfile,0))){ SWIG_fail_ptr("ClientProfile_GetUid",1,SWIGTYPE_p_Prelude__ClientProfile); } try { result = (int)(arg1)->GetUid(); } catch(Prelude::PreludeError &_e) { SWIG_exception(SWIG_RuntimeError, (&_e)->what()); } lua_pushnumber(L, (lua_Number) result); SWIG_arg++; return SWIG_arg; if(0) SWIG_fail; fail: lua_error(L); return SWIG_arg; } static int _wrap_ClientProfile_GetGid(lua_State* L) { int SWIG_arg = 0; Prelude::ClientProfile *arg1 = (Prelude::ClientProfile *) 0 ; int result; SWIG_check_num_args("GetGid",1,1) if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("GetGid",1,"Prelude::ClientProfile *"); if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Prelude__ClientProfile,0))){ SWIG_fail_ptr("ClientProfile_GetGid",1,SWIGTYPE_p_Prelude__ClientProfile); } try { result = (int)(arg1)->GetGid(); } catch(Prelude::PreludeError &_e) { SWIG_exception(SWIG_RuntimeError, (&_e)->what()); } lua_pushnumber(L, (lua_Number) result); SWIG_arg++; return SWIG_arg; if(0) SWIG_fail; fail: lua_error(L); return SWIG_arg; } static int _wrap_ClientProfile_GetName(lua_State* L) { int SWIG_arg = 0; Prelude::ClientProfile *arg1 = (Prelude::ClientProfile *) 0 ; char *result = 0 ; SWIG_check_num_args("GetName",1,1) if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("GetName",1,"Prelude::ClientProfile *"); if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Prelude__ClientProfile,0))){ SWIG_fail_ptr("ClientProfile_GetName",1,SWIGTYPE_p_Prelude__ClientProfile); } try { result = (char *)(arg1)->GetName(); } catch(Prelude::PreludeError &_e) { SWIG_exception(SWIG_RuntimeError, (&_e)->what()); } lua_pushstring(L,(const char*)result); SWIG_arg++; return SWIG_arg; if(0) SWIG_fail; fail: lua_error(L); return SWIG_arg; } static int _wrap_ClientProfile_SetName(lua_State* L) { int SWIG_arg = 0; Prelude::ClientProfile *arg1 = (Prelude::ClientProfile *) 0 ; char *arg2 = (char *) 0 ; int result; SWIG_check_num_args("SetName",2,2) if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("SetName",1,"Prelude::ClientProfile *"); if(!lua_isstring(L,2)) SWIG_fail_arg("SetName",2,"char const *"); if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Prelude__ClientProfile,0))){ SWIG_fail_ptr("ClientProfile_SetName",1,SWIGTYPE_p_Prelude__ClientProfile); } arg2 = (char *)lua_tostring(L, 2); try { result = (int)(arg1)->SetName((char const *)arg2); } catch(Prelude::PreludeError &_e) { SWIG_exception(SWIG_RuntimeError, (&_e)->what()); } lua_pushnumber(L, (lua_Number) result); SWIG_arg++; return SWIG_arg; if(0) SWIG_fail; fail: lua_error(L); return SWIG_arg; } static int _wrap_ClientProfile_GetAnalyzerId__SWIG_0(lua_State* L) { int SWIG_arg = 0; Prelude::ClientProfile *arg1 = (Prelude::ClientProfile *) 0 ; uint64_t result; SWIG_check_num_args("GetAnalyzerId",1,1) if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("GetAnalyzerId",1,"Prelude::ClientProfile *"); if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Prelude__ClientProfile,0))){ SWIG_fail_ptr("ClientProfile_GetAnalyzerId",1,SWIGTYPE_p_Prelude__ClientProfile); } try { result = (uint64_t)(arg1)->GetAnalyzerId(); } catch(Prelude::PreludeError &_e) { SWIG_exception(SWIG_RuntimeError, (&_e)->what()); } lua_pushnumber(L, (lua_Number) result); SWIG_arg++; return SWIG_arg; if(0) SWIG_fail; fail: lua_error(L); return SWIG_arg; } static int _wrap_ClientProfile_GetAnalyzerId__SWIG_1(lua_State* L) { int SWIG_arg = 0; Prelude::ClientProfile *arg1 = (Prelude::ClientProfile *) 0 ; uint64_t arg2 ; SWIG_check_num_args("GetAnalyzerId",2,2) if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("GetAnalyzerId",1,"Prelude::ClientProfile *"); if(!lua_isnumber(L,2)) SWIG_fail_arg("GetAnalyzerId",2,"uint64_t"); if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Prelude__ClientProfile,0))){ SWIG_fail_ptr("ClientProfile_GetAnalyzerId",1,SWIGTYPE_p_Prelude__ClientProfile); } arg2 = (uint64_t)lua_tonumber(L, 2); try { (arg1)->GetAnalyzerId(arg2); } catch(Prelude::PreludeError &_e) { SWIG_exception(SWIG_RuntimeError, (&_e)->what()); } return SWIG_arg; if(0) SWIG_fail; fail: lua_error(L); return SWIG_arg; } static int _wrap_ClientProfile_GetAnalyzerId(lua_State* L) { int argc; int argv[3]={ 1,2,3 }; argc = lua_gettop(L); if (argc == 1) { int _v; { void *ptr; if (SWIG_isptrtype(L,argv[0])==0 || SWIG_ConvertPtr(L,argv[0], (void **) &ptr, SWIGTYPE_p_Prelude__ClientProfile, 0)) { _v = 0; } else { _v = 1; } } if (_v) { return _wrap_ClientProfile_GetAnalyzerId__SWIG_0(L); } } if (argc == 2) { int _v; { void *ptr; if (SWIG_isptrtype(L,argv[0])==0 || SWIG_ConvertPtr(L,argv[0], (void **) &ptr, SWIGTYPE_p_Prelude__ClientProfile, 0)) { _v = 0; } else { _v = 1; } } if (_v) { { _v = lua_isnumber(L,argv[1]); } if (_v) { return _wrap_ClientProfile_GetAnalyzerId__SWIG_1(L); } } } lua_pushstring(L,"Wrong arguments for overloaded function 'ClientProfile_GetAnalyzerId'\n" " Possible C/C++ prototypes are:\n" " GetAnalyzerId(Prelude::ClientProfile *)\n" " GetAnalyzerId(Prelude::ClientProfile *,uint64_t)\n"); lua_error(L);return 0; } static int _wrap_ClientProfile_GetConfigFilename(lua_State* L) { int SWIG_arg = 0; Prelude::ClientProfile *arg1 = (Prelude::ClientProfile *) 0 ; std::string result; SWIG_check_num_args("GetConfigFilename",1,1) if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("GetConfigFilename",1,"Prelude::ClientProfile *"); if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Prelude__ClientProfile,0))){ SWIG_fail_ptr("ClientProfile_GetConfigFilename",1,SWIGTYPE_p_Prelude__ClientProfile); } try { result = (arg1)->GetConfigFilename(); } catch(Prelude::PreludeError &_e) { SWIG_exception(SWIG_RuntimeError, (&_e)->what()); } lua_pushlstring(L,(&result)->data(),(&result)->size()); SWIG_arg++; return SWIG_arg; if(0) SWIG_fail; fail: lua_error(L); return SWIG_arg; } static int _wrap_ClientProfile_GetAnalyzeridFilename(lua_State* L) { int SWIG_arg = 0; Prelude::ClientProfile *arg1 = (Prelude::ClientProfile *) 0 ; std::string result; SWIG_check_num_args("GetAnalyzeridFilename",1,1) if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("GetAnalyzeridFilename",1,"Prelude::ClientProfile *"); if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Prelude__ClientProfile,0))){ SWIG_fail_ptr("ClientProfile_GetAnalyzeridFilename",1,SWIGTYPE_p_Prelude__ClientProfile); } try { result = (arg1)->GetAnalyzeridFilename(); } catch(Prelude::PreludeError &_e) { SWIG_exception(SWIG_RuntimeError, (&_e)->what()); } lua_pushlstring(L,(&result)->data(),(&result)->size()); SWIG_arg++; return SWIG_arg; if(0) SWIG_fail; fail: lua_error(L); return SWIG_arg; } static int _wrap_ClientProfile_GetTlsKeyFilename(lua_State* L) { int SWIG_arg = 0; Prelude::ClientProfile *arg1 = (Prelude::ClientProfile *) 0 ; std::string result; SWIG_check_num_args("GetTlsKeyFilename",1,1) if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("GetTlsKeyFilename",1,"Prelude::ClientProfile *"); if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Prelude__ClientProfile,0))){ SWIG_fail_ptr("ClientProfile_GetTlsKeyFilename",1,SWIGTYPE_p_Prelude__ClientProfile); } try { result = (arg1)->GetTlsKeyFilename(); } catch(Prelude::PreludeError &_e) { SWIG_exception(SWIG_RuntimeError, (&_e)->what()); } lua_pushlstring(L,(&result)->data(),(&result)->size()); SWIG_arg++; return SWIG_arg; if(0) SWIG_fail; fail: lua_error(L); return SWIG_arg; } static int _wrap_ClientProfile_GetTlsServerCaCertFilename(lua_State* L) { int SWIG_arg = 0; Prelude::ClientProfile *arg1 = (Prelude::ClientProfile *) 0 ; std::string result; SWIG_check_num_args("GetTlsServerCaCertFilename",1,1) if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("GetTlsServerCaCertFilename",1,"Prelude::ClientProfile *"); if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Prelude__ClientProfile,0))){ SWIG_fail_ptr("ClientProfile_GetTlsServerCaCertFilename",1,SWIGTYPE_p_Prelude__ClientProfile); } try { result = (arg1)->GetTlsServerCaCertFilename(); } catch(Prelude::PreludeError &_e) { SWIG_exception(SWIG_RuntimeError, (&_e)->what()); } lua_pushlstring(L,(&result)->data(),(&result)->size()); SWIG_arg++; return SWIG_arg; if(0) SWIG_fail; fail: lua_error(L); return SWIG_arg; } static int _wrap_ClientProfile_GetTlsServerKeyCertFilename(lua_State* L) { int SWIG_arg = 0; Prelude::ClientProfile *arg1 = (Prelude::ClientProfile *) 0 ; std::string result; SWIG_check_num_args("GetTlsServerKeyCertFilename",1,1) if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("GetTlsServerKeyCertFilename",1,"Prelude::ClientProfile *"); if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Prelude__ClientProfile,0))){ SWIG_fail_ptr("ClientProfile_GetTlsServerKeyCertFilename",1,SWIGTYPE_p_Prelude__ClientProfile); } try { result = (arg1)->GetTlsServerKeyCertFilename(); } catch(Prelude::PreludeError &_e) { SWIG_exception(SWIG_RuntimeError, (&_e)->what()); } lua_pushlstring(L,(&result)->data(),(&result)->size()); SWIG_arg++; return SWIG_arg; if(0) SWIG_fail; fail: lua_error(L); return SWIG_arg; } static int _wrap_ClientProfile_GetTlsServerCrlFilename(lua_State* L) { int SWIG_arg = 0; Prelude::ClientProfile *arg1 = (Prelude::ClientProfile *) 0 ; std::string result; SWIG_check_num_args("GetTlsServerCrlFilename",1,1) if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("GetTlsServerCrlFilename",1,"Prelude::ClientProfile *"); if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Prelude__ClientProfile,0))){ SWIG_fail_ptr("ClientProfile_GetTlsServerCrlFilename",1,SWIGTYPE_p_Prelude__ClientProfile); } try { result = (arg1)->GetTlsServerCrlFilename(); } catch(Prelude::PreludeError &_e) { SWIG_exception(SWIG_RuntimeError, (&_e)->what()); } lua_pushlstring(L,(&result)->data(),(&result)->size()); SWIG_arg++; return SWIG_arg; if(0) SWIG_fail; fail: lua_error(L); return SWIG_arg; } static int _wrap_ClientProfile_GetTlsClientKeyCertFilename(lua_State* L) { int SWIG_arg = 0; Prelude::ClientProfile *arg1 = (Prelude::ClientProfile *) 0 ; std::string result; SWIG_check_num_args("GetTlsClientKeyCertFilename",1,1) if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("GetTlsClientKeyCertFilename",1,"Prelude::ClientProfile *"); if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Prelude__ClientProfile,0))){ SWIG_fail_ptr("ClientProfile_GetTlsClientKeyCertFilename",1,SWIGTYPE_p_Prelude__ClientProfile); } try { result = (arg1)->GetTlsClientKeyCertFilename(); } catch(Prelude::PreludeError &_e) { SWIG_exception(SWIG_RuntimeError, (&_e)->what()); } lua_pushlstring(L,(&result)->data(),(&result)->size()); SWIG_arg++; return SWIG_arg; if(0) SWIG_fail; fail: lua_error(L); return SWIG_arg; } static int _wrap_ClientProfile_GetTlsClientTrustedCertFilename(lua_State* L) { int SWIG_arg = 0; Prelude::ClientProfile *arg1 = (Prelude::ClientProfile *) 0 ; std::string result; SWIG_check_num_args("GetTlsClientTrustedCertFilename",1,1) if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("GetTlsClientTrustedCertFilename",1,"Prelude::ClientProfile *"); if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Prelude__ClientProfile,0))){ SWIG_fail_ptr("ClientProfile_GetTlsClientTrustedCertFilename",1,SWIGTYPE_p_Prelude__ClientProfile); } try { result = (arg1)->GetTlsClientTrustedCertFilename(); } catch(Prelude::PreludeError &_e) { SWIG_exception(SWIG_RuntimeError, (&_e)->what()); } lua_pushlstring(L,(&result)->data(),(&result)->size()); SWIG_arg++; return SWIG_arg; if(0) SWIG_fail; fail: lua_error(L); return SWIG_arg; } static int _wrap_ClientProfile_GetBackupDirname(lua_State* L) { int SWIG_arg = 0; Prelude::ClientProfile *arg1 = (Prelude::ClientProfile *) 0 ; std::string result; SWIG_check_num_args("GetBackupDirname",1,1) if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("GetBackupDirname",1,"Prelude::ClientProfile *"); if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Prelude__ClientProfile,0))){ SWIG_fail_ptr("ClientProfile_GetBackupDirname",1,SWIGTYPE_p_Prelude__ClientProfile); } try { result = (arg1)->GetBackupDirname(); } catch(Prelude::PreludeError &_e) { SWIG_exception(SWIG_RuntimeError, (&_e)->what()); } lua_pushlstring(L,(&result)->data(),(&result)->size()); SWIG_arg++; return SWIG_arg; if(0) SWIG_fail; fail: lua_error(L); return SWIG_arg; } static int _wrap_ClientProfile_GetProfileDirname(lua_State* L) { int SWIG_arg = 0; Prelude::ClientProfile *arg1 = (Prelude::ClientProfile *) 0 ; std::string result; SWIG_check_num_args("GetProfileDirname",1,1) if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("GetProfileDirname",1,"Prelude::ClientProfile *"); if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Prelude__ClientProfile,0))){ SWIG_fail_ptr("ClientProfile_GetProfileDirname",1,SWIGTYPE_p_Prelude__ClientProfile); } try { result = (arg1)->GetProfileDirname(); } catch(Prelude::PreludeError &_e) { SWIG_exception(SWIG_RuntimeError, (&_e)->what()); } lua_pushlstring(L,(&result)->data(),(&result)->size()); SWIG_arg++; return SWIG_arg; if(0) SWIG_fail; fail: lua_error(L); return SWIG_arg; } static int _wrap_ClientProfile_SetPrefix(lua_State* L) { int SWIG_arg = 0; Prelude::ClientProfile *arg1 = (Prelude::ClientProfile *) 0 ; char *arg2 = (char *) 0 ; SWIG_check_num_args("SetPrefix",2,2) if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("SetPrefix",1,"Prelude::ClientProfile *"); if(!lua_isstring(L,2)) SWIG_fail_arg("SetPrefix",2,"char const *"); if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Prelude__ClientProfile,0))){ SWIG_fail_ptr("ClientProfile_SetPrefix",1,SWIGTYPE_p_Prelude__ClientProfile); } arg2 = (char *)lua_tostring(L, 2); try { (arg1)->SetPrefix((char const *)arg2); } catch(Prelude::PreludeError &_e) { SWIG_exception(SWIG_RuntimeError, (&_e)->what()); } return SWIG_arg; if(0) SWIG_fail; fail: lua_error(L); return SWIG_arg; } static int _wrap_ClientProfile_GetPrefix(lua_State* L) { int SWIG_arg = 0; Prelude::ClientProfile *arg1 = (Prelude::ClientProfile *) 0 ; std::string result; SWIG_check_num_args("GetPrefix",1,1) if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("GetPrefix",1,"Prelude::ClientProfile *"); if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Prelude__ClientProfile,0))){ SWIG_fail_ptr("ClientProfile_GetPrefix",1,SWIGTYPE_p_Prelude__ClientProfile); } try { result = (arg1)->GetPrefix(); } catch(Prelude::PreludeError &_e) { SWIG_exception(SWIG_RuntimeError, (&_e)->what()); } lua_pushlstring(L,(&result)->data(),(&result)->size()); SWIG_arg++; return SWIG_arg; if(0) SWIG_fail; fail: lua_error(L); return SWIG_arg; } static void swig_delete_ClientProfile(void *obj) { Prelude::ClientProfile *arg1 = (Prelude::ClientProfile *) obj; delete arg1; } static swig_lua_method swig_Prelude_ClientProfile_methods[] = { {"GetUid", _wrap_ClientProfile_GetUid}, {"GetGid", _wrap_ClientProfile_GetGid}, {"GetName", _wrap_ClientProfile_GetName}, {"SetName", _wrap_ClientProfile_SetName}, {"GetAnalyzerId", _wrap_ClientProfile_GetAnalyzerId}, {"GetConfigFilename", _wrap_ClientProfile_GetConfigFilename}, {"GetAnalyzeridFilename", _wrap_ClientProfile_GetAnalyzeridFilename}, {"GetTlsKeyFilename", _wrap_ClientProfile_GetTlsKeyFilename}, {"GetTlsServerCaCertFilename", _wrap_ClientProfile_GetTlsServerCaCertFilename}, {"GetTlsServerKeyCertFilename", _wrap_ClientProfile_GetTlsServerKeyCertFilename}, {"GetTlsServerCrlFilename", _wrap_ClientProfile_GetTlsServerCrlFilename}, {"GetTlsClientKeyCertFilename", _wrap_ClientProfile_GetTlsClientKeyCertFilename}, {"GetTlsClientTrustedCertFilename", _wrap_ClientProfile_GetTlsClientTrustedCertFilename}, {"GetBackupDirname", _wrap_ClientProfile_GetBackupDirname}, {"GetProfileDirname", _wrap_ClientProfile_GetProfileDirname}, {"SetPrefix", _wrap_ClientProfile_SetPrefix}, {"GetPrefix", _wrap_ClientProfile_GetPrefix}, {0,0} }; static swig_lua_attribute swig_Prelude_ClientProfile_attributes[] = { {0,0,0} }; static swig_lua_class *swig_Prelude_ClientProfile_bases[] = {0}; static const char *swig_Prelude_ClientProfile_base_names[] = {0}; static swig_lua_class _wrap_class_Prelude_ClientProfile = { "ClientProfile", &SWIGTYPE_p_Prelude__ClientProfile,_wrap_new_ClientProfile, swig_delete_ClientProfile, swig_Prelude_ClientProfile_methods, swig_Prelude_ClientProfile_attributes, swig_Prelude_ClientProfile_bases, swig_Prelude_ClientProfile_base_names }; static int _wrap_new_Client__SWIG_0(lua_State* L) { int SWIG_arg = 0; char *arg1 = (char *) 0 ; Prelude::Client *result = 0 ; SWIG_check_num_args("Prelude::Client",1,1) if(!lua_isstring(L,1)) SWIG_fail_arg("Prelude::Client",1,"char const *"); arg1 = (char *)lua_tostring(L, 1); try { result = (Prelude::Client *)new Prelude::Client((char const *)arg1); } catch(Prelude::PreludeError &_e) { SWIG_exception(SWIG_RuntimeError, (&_e)->what()); } SWIG_NewPointerObj(L,result,SWIGTYPE_p_Prelude__Client,1); SWIG_arg++; return SWIG_arg; if(0) SWIG_fail; fail: lua_error(L); return SWIG_arg; } static int _wrap_new_Client__SWIG_1(lua_State* L) { int SWIG_arg = 0; Prelude::Client *arg1 = 0 ; Prelude::Client *result = 0 ; SWIG_check_num_args("Prelude::Client",1,1) if(!lua_isuserdata(L,1)) SWIG_fail_arg("Prelude::Client",1,"Prelude::Client const &"); if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Prelude__Client,0))){ SWIG_fail_ptr("new_Client",1,SWIGTYPE_p_Prelude__Client); } try { result = (Prelude::Client *)new Prelude::Client((Prelude::Client const &)*arg1); } catch(Prelude::PreludeError &_e) { SWIG_exception(SWIG_RuntimeError, (&_e)->what()); } SWIG_NewPointerObj(L,result,SWIGTYPE_p_Prelude__Client,1); SWIG_arg++; return SWIG_arg; if(0) SWIG_fail; fail: lua_error(L); return SWIG_arg; } static int _wrap_new_Client(lua_State* L) { int argc; int argv[2]={ 1,2 }; argc = lua_gettop(L); if (argc == 1) { int _v; { void *ptr; if (lua_isuserdata(L,argv[0])==0 || SWIG_ConvertPtr(L,argv[0], (void **) &ptr, SWIGTYPE_p_Prelude__Client, 0)) { _v = 0; } else { _v = 1; } } if (_v) { return _wrap_new_Client__SWIG_1(L); } } if (argc == 1) { int _v; { _v = lua_isstring(L,argv[0]); } if (_v) { return _wrap_new_Client__SWIG_0(L); } } lua_pushstring(L,"Wrong arguments for overloaded function 'new_Client'\n" " Possible C/C++ prototypes are:\n" " Prelude::Client(char const *)\n" " Prelude::Client(Prelude::Client const &)\n"); lua_error(L);return 0; } static int _wrap_Client_Start(lua_State* L) { int SWIG_arg = 0; Prelude::Client *arg1 = (Prelude::Client *) 0 ; SWIG_check_num_args("Start",1,1) if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Start",1,"Prelude::Client *"); if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Prelude__Client,0))){ SWIG_fail_ptr("Client_Start",1,SWIGTYPE_p_Prelude__Client); } try { (arg1)->Start(); } catch(Prelude::PreludeError &_e) { SWIG_exception(SWIG_RuntimeError, (&_e)->what()); } return SWIG_arg; if(0) SWIG_fail; fail: lua_error(L); return SWIG_arg; } static int _wrap_Client_Init(lua_State* L) { int SWIG_arg = 0; Prelude::Client *arg1 = (Prelude::Client *) 0 ; SWIG_check_num_args("Init",1,1) if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Init",1,"Prelude::Client *"); if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Prelude__Client,0))){ SWIG_fail_ptr("Client_Init",1,SWIGTYPE_p_Prelude__Client); } try { (arg1)->Init(); } catch(Prelude::PreludeError &_e) { SWIG_exception(SWIG_RuntimeError, (&_e)->what()); } return SWIG_arg; if(0) SWIG_fail; fail: lua_error(L); return SWIG_arg; } static int _wrap_Client_GetClient(lua_State* L) { int SWIG_arg = 0; Prelude::Client *arg1 = (Prelude::Client *) 0 ; prelude_client_t *result = 0 ; SWIG_check_num_args("GetClient",1,1) if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("GetClient",1,"Prelude::Client *"); if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Prelude__Client,0))){ SWIG_fail_ptr("Client_GetClient",1,SWIGTYPE_p_Prelude__Client); } try { result = (prelude_client_t *)(arg1)->GetClient(); } catch(Prelude::PreludeError &_e) { SWIG_exception(SWIG_RuntimeError, (&_e)->what()); } SWIG_NewPointerObj(L,result,SWIGTYPE_p_prelude_client_t,0); SWIG_arg++; return SWIG_arg; if(0) SWIG_fail; fail: lua_error(L); return SWIG_arg; } static int _wrap_Client_SendIDMEF(lua_State* L) { int SWIG_arg = 0; Prelude::Client *arg1 = (Prelude::Client *) 0 ; Prelude::IDMEF *arg2 = 0 ; SWIG_check_num_args("SendIDMEF",2,2) if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("SendIDMEF",1,"Prelude::Client *"); if(!lua_isuserdata(L,2)) SWIG_fail_arg("SendIDMEF",2,"Prelude::IDMEF const &"); if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Prelude__Client,0))){ SWIG_fail_ptr("Client_SendIDMEF",1,SWIGTYPE_p_Prelude__Client); } if (!SWIG_IsOK(SWIG_ConvertPtr(L,2,(void**)&arg2,SWIGTYPE_p_Prelude__IDMEF,0))){ SWIG_fail_ptr("Client_SendIDMEF",2,SWIGTYPE_p_Prelude__IDMEF); } try { (arg1)->SendIDMEF((Prelude::IDMEF const &)*arg2); } catch(Prelude::PreludeError &_e) { SWIG_exception(SWIG_RuntimeError, (&_e)->what()); } return SWIG_arg; if(0) SWIG_fail; fail: lua_error(L); return SWIG_arg; } static int _wrap_Client_RecvIDMEF__SWIG_0(lua_State* L) { int SWIG_arg = 0; Prelude::Client *arg1 = (Prelude::Client *) 0 ; Prelude::IDMEF *arg2 = 0 ; int arg3 ; int result; SWIG_check_num_args("RecvIDMEF",3,3) if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("RecvIDMEF",1,"Prelude::Client *"); if(!lua_isuserdata(L,2)) SWIG_fail_arg("RecvIDMEF",2,"Prelude::IDMEF &"); if(!lua_isnumber(L,3)) SWIG_fail_arg("RecvIDMEF",3,"int"); if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Prelude__Client,0))){ SWIG_fail_ptr("Client_RecvIDMEF",1,SWIGTYPE_p_Prelude__Client); } if (!SWIG_IsOK(SWIG_ConvertPtr(L,2,(void**)&arg2,SWIGTYPE_p_Prelude__IDMEF,0))){ SWIG_fail_ptr("Client_RecvIDMEF",2,SWIGTYPE_p_Prelude__IDMEF); } arg3 = (int)lua_tonumber(L, 3); try { result = (int)(arg1)->RecvIDMEF(*arg2,arg3); } catch(Prelude::PreludeError &_e) { SWIG_exception(SWIG_RuntimeError, (&_e)->what()); } lua_pushnumber(L, (lua_Number) result); SWIG_arg++; return SWIG_arg; if(0) SWIG_fail; fail: lua_error(L); return SWIG_arg; } static int _wrap_Client_RecvIDMEF__SWIG_1(lua_State* L) { int SWIG_arg = 0; Prelude::Client *arg1 = (Prelude::Client *) 0 ; Prelude::IDMEF *arg2 = 0 ; int result; SWIG_check_num_args("RecvIDMEF",2,2) if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("RecvIDMEF",1,"Prelude::Client *"); if(!lua_isuserdata(L,2)) SWIG_fail_arg("RecvIDMEF",2,"Prelude::IDMEF &"); if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Prelude__Client,0))){ SWIG_fail_ptr("Client_RecvIDMEF",1,SWIGTYPE_p_Prelude__Client); } if (!SWIG_IsOK(SWIG_ConvertPtr(L,2,(void**)&arg2,SWIGTYPE_p_Prelude__IDMEF,0))){ SWIG_fail_ptr("Client_RecvIDMEF",2,SWIGTYPE_p_Prelude__IDMEF); } try { result = (int)(arg1)->RecvIDMEF(*arg2); } catch(Prelude::PreludeError &_e) { SWIG_exception(SWIG_RuntimeError, (&_e)->what()); } lua_pushnumber(L, (lua_Number) result); SWIG_arg++; return SWIG_arg; if(0) SWIG_fail; fail: lua_error(L); return SWIG_arg; } static int _wrap_Client_RecvIDMEF(lua_State* L) { int argc; int argv[4]={ 1,2,3,4 }; argc = lua_gettop(L); if (argc == 2) { int _v; { void *ptr; if (SWIG_isptrtype(L,argv[0])==0 || SWIG_ConvertPtr(L,argv[0], (void **) &ptr, SWIGTYPE_p_Prelude__Client, 0)) { _v = 0; } else { _v = 1; } } if (_v) { { void *ptr; if (lua_isuserdata(L,argv[1])==0 || SWIG_ConvertPtr(L,argv[1], (void **) &ptr, SWIGTYPE_p_Prelude__IDMEF, 0)) { _v = 0; } else { _v = 1; } } if (_v) { return _wrap_Client_RecvIDMEF__SWIG_1(L); } } } if (argc == 3) { int _v; { void *ptr; if (SWIG_isptrtype(L,argv[0])==0 || SWIG_ConvertPtr(L,argv[0], (void **) &ptr, SWIGTYPE_p_Prelude__Client, 0)) { _v = 0; } else { _v = 1; } } if (_v) { { void *ptr; if (lua_isuserdata(L,argv[1])==0 || SWIG_ConvertPtr(L,argv[1], (void **) &ptr, SWIGTYPE_p_Prelude__IDMEF, 0)) { _v = 0; } else { _v = 1; } } if (_v) { { _v = lua_isnumber(L,argv[2]); } if (_v) { return _wrap_Client_RecvIDMEF__SWIG_0(L); } } } } lua_pushstring(L,"Wrong arguments for overloaded function 'Client_RecvIDMEF'\n" " Possible C/C++ prototypes are:\n" " RecvIDMEF(Prelude::Client *,Prelude::IDMEF &,int)\n" " RecvIDMEF(Prelude::Client *,Prelude::IDMEF &)\n"); lua_error(L);return 0; } static int _wrap_Client_GetFlags(lua_State* L) { int SWIG_arg = 0; Prelude::Client *arg1 = (Prelude::Client *) 0 ; int result; SWIG_check_num_args("GetFlags",1,1) if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("GetFlags",1,"Prelude::Client *"); if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Prelude__Client,0))){ SWIG_fail_ptr("Client_GetFlags",1,SWIGTYPE_p_Prelude__Client); } try { result = (int)(arg1)->GetFlags(); } catch(Prelude::PreludeError &_e) { SWIG_exception(SWIG_RuntimeError, (&_e)->what()); } lua_pushnumber(L, (lua_Number) result); SWIG_arg++; return SWIG_arg; if(0) SWIG_fail; fail: lua_error(L); return SWIG_arg; } static int _wrap_Client_SetFlags(lua_State* L) { int SWIG_arg = 0; Prelude::Client *arg1 = (Prelude::Client *) 0 ; int arg2 ; SWIG_check_num_args("SetFlags",2,2) if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("SetFlags",1,"Prelude::Client *"); if(!lua_isnumber(L,2)) SWIG_fail_arg("SetFlags",2,"int"); if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Prelude__Client,0))){ SWIG_fail_ptr("Client_SetFlags",1,SWIGTYPE_p_Prelude__Client); } arg2 = (int)lua_tonumber(L, 2); try { (arg1)->SetFlags(arg2); } catch(Prelude::PreludeError &_e) { SWIG_exception(SWIG_RuntimeError, (&_e)->what()); } return SWIG_arg; if(0) SWIG_fail; fail: lua_error(L); return SWIG_arg; } static int _wrap_Client_GetRequiredPermission(lua_State* L) { int SWIG_arg = 0; Prelude::Client *arg1 = (Prelude::Client *) 0 ; int result; SWIG_check_num_args("GetRequiredPermission",1,1) if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("GetRequiredPermission",1,"Prelude::Client *"); if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Prelude__Client,0))){ SWIG_fail_ptr("Client_GetRequiredPermission",1,SWIGTYPE_p_Prelude__Client); } try { result = (int)(arg1)->GetRequiredPermission(); } catch(Prelude::PreludeError &_e) { SWIG_exception(SWIG_RuntimeError, (&_e)->what()); } lua_pushnumber(L, (lua_Number) result); SWIG_arg++; return SWIG_arg; if(0) SWIG_fail; fail: lua_error(L); return SWIG_arg; } static int _wrap_Client_SetRequiredPermission(lua_State* L) { int SWIG_arg = 0; Prelude::Client *arg1 = (Prelude::Client *) 0 ; int arg2 ; SWIG_check_num_args("SetRequiredPermission",2,2) if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("SetRequiredPermission",1,"Prelude::Client *"); if(!lua_isnumber(L,2)) SWIG_fail_arg("SetRequiredPermission",2,"int"); if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Prelude__Client,0))){ SWIG_fail_ptr("Client_SetRequiredPermission",1,SWIGTYPE_p_Prelude__Client); } arg2 = (int)lua_tonumber(L, 2); try { (arg1)->SetRequiredPermission(arg2); } catch(Prelude::PreludeError &_e) { SWIG_exception(SWIG_RuntimeError, (&_e)->what()); } return SWIG_arg; if(0) SWIG_fail; fail: lua_error(L); return SWIG_arg; } static int _wrap_Client_GetConfigFilename(lua_State* L) { int SWIG_arg = 0; Prelude::Client *arg1 = (Prelude::Client *) 0 ; char *result = 0 ; SWIG_check_num_args("GetConfigFilename",1,1) if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("GetConfigFilename",1,"Prelude::Client *"); if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Prelude__Client,0))){ SWIG_fail_ptr("Client_GetConfigFilename",1,SWIGTYPE_p_Prelude__Client); } try { result = (char *)(arg1)->GetConfigFilename(); } catch(Prelude::PreludeError &_e) { SWIG_exception(SWIG_RuntimeError, (&_e)->what()); } lua_pushstring(L,(const char*)result); SWIG_arg++; return SWIG_arg; if(0) SWIG_fail; fail: lua_error(L); return SWIG_arg; } static int _wrap_Client_SetConfigFilename(lua_State* L) { int SWIG_arg = 0; Prelude::Client *arg1 = (Prelude::Client *) 0 ; char *arg2 = (char *) 0 ; SWIG_check_num_args("SetConfigFilename",2,2) if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("SetConfigFilename",1,"Prelude::Client *"); if(!lua_isstring(L,2)) SWIG_fail_arg("SetConfigFilename",2,"char const *"); if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Prelude__Client,0))){ SWIG_fail_ptr("Client_SetConfigFilename",1,SWIGTYPE_p_Prelude__Client); } arg2 = (char *)lua_tostring(L, 2); try { (arg1)->SetConfigFilename((char const *)arg2); } catch(Prelude::PreludeError &_e) { SWIG_exception(SWIG_RuntimeError, (&_e)->what()); } return SWIG_arg; if(0) SWIG_fail; fail: lua_error(L); return SWIG_arg; } static int _wrap_Client_GetConnectionPool(lua_State* L) { int SWIG_arg = 0; Prelude::Client *arg1 = (Prelude::Client *) 0 ; Prelude::ConnectionPool *result = 0 ; SWIG_check_num_args("GetConnectionPool",1,1) if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("GetConnectionPool",1,"Prelude::Client *"); if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Prelude__Client,0))){ SWIG_fail_ptr("Client_GetConnectionPool",1,SWIGTYPE_p_Prelude__Client); } try { result = (Prelude::ConnectionPool *) &(arg1)->GetConnectionPool(); } catch(Prelude::PreludeError &_e) { SWIG_exception(SWIG_RuntimeError, (&_e)->what()); } SWIG_NewPointerObj(L,result,SWIGTYPE_p_Prelude__ConnectionPool,0); SWIG_arg++; return SWIG_arg; if(0) SWIG_fail; fail: lua_error(L); return SWIG_arg; } static int _wrap_Client_SetConnectionPool(lua_State* L) { int SWIG_arg = 0; Prelude::Client *arg1 = (Prelude::Client *) 0 ; Prelude::ConnectionPool arg2 ; Prelude::ConnectionPool *argp2 ; SWIG_check_num_args("SetConnectionPool",2,2) if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("SetConnectionPool",1,"Prelude::Client *"); if(!lua_isuserdata(L,2)) SWIG_fail_arg("SetConnectionPool",2,"Prelude::ConnectionPool"); if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Prelude__Client,0))){ SWIG_fail_ptr("Client_SetConnectionPool",1,SWIGTYPE_p_Prelude__Client); } if (!SWIG_IsOK(SWIG_ConvertPtr(L,2,(void**)&argp2,SWIGTYPE_p_Prelude__ConnectionPool,0))){ SWIG_fail_ptr("Client_SetConnectionPool",2,SWIGTYPE_p_Prelude__ConnectionPool); } arg2 = *argp2; try { (arg1)->SetConnectionPool(arg2); } catch(Prelude::PreludeError &_e) { SWIG_exception(SWIG_RuntimeError, (&_e)->what()); } return SWIG_arg; if(0) SWIG_fail; fail: lua_error(L); return SWIG_arg; } static int _wrap_Client_SetRecvTimeout(lua_State* L) { int SWIG_arg = 0; Prelude::Client *arg1 = 0 ; int arg2 ; Prelude::Client *result = 0 ; SWIG_check_num_args("Prelude::Client::SetRecvTimeout",2,2) if(!lua_isuserdata(L,1)) SWIG_fail_arg("Prelude::Client::SetRecvTimeout",1,"Prelude::Client &"); if(!lua_isnumber(L,2)) SWIG_fail_arg("Prelude::Client::SetRecvTimeout",2,"int"); if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Prelude__Client,0))){ SWIG_fail_ptr("Client_SetRecvTimeout",1,SWIGTYPE_p_Prelude__Client); } arg2 = (int)lua_tonumber(L, 2); try { result = (Prelude::Client *) &Prelude::Client::SetRecvTimeout(*arg1,arg2); } catch(Prelude::PreludeError &_e) { SWIG_exception(SWIG_RuntimeError, (&_e)->what()); } SWIG_NewPointerObj(L,result,SWIGTYPE_p_Prelude__Client,0); SWIG_arg++; return SWIG_arg; if(0) SWIG_fail; fail: lua_error(L); return SWIG_arg; } static void swig_delete_Client(void *obj) { Prelude::Client *arg1 = (Prelude::Client *) obj; delete arg1; } static swig_lua_method swig_Prelude_Client_methods[] = { {"Start", _wrap_Client_Start}, {"Init", _wrap_Client_Init}, {"GetClient", _wrap_Client_GetClient}, {"SendIDMEF", _wrap_Client_SendIDMEF}, {"RecvIDMEF", _wrap_Client_RecvIDMEF}, {"GetFlags", _wrap_Client_GetFlags}, {"SetFlags", _wrap_Client_SetFlags}, {"GetRequiredPermission", _wrap_Client_GetRequiredPermission}, {"SetRequiredPermission", _wrap_Client_SetRequiredPermission}, {"GetConfigFilename", _wrap_Client_GetConfigFilename}, {"SetConfigFilename", _wrap_Client_SetConfigFilename}, {"GetConnectionPool", _wrap_Client_GetConnectionPool}, {"SetConnectionPool", _wrap_Client_SetConnectionPool}, {0,0} }; static swig_lua_attribute swig_Prelude_Client_attributes[] = { {0,0,0} }; static swig_lua_class *swig_Prelude_Client_bases[] = {0,0}; static const char *swig_Prelude_Client_base_names[] = {"Prelude::ClientProfile *",0}; static swig_lua_class _wrap_class_Prelude_Client = { "Client", &SWIGTYPE_p_Prelude__Client,_wrap_new_Client, swig_delete_Client, swig_Prelude_Client_methods, swig_Prelude_Client_attributes, swig_Prelude_Client_bases, swig_Prelude_Client_base_names }; static int _wrap_new_ClientEasy__SWIG_0(lua_State* L) { int SWIG_arg = 0; char *arg1 = (char *) 0 ; int arg2 ; char *arg3 = (char *) 0 ; char *arg4 = (char *) 0 ; char *arg5 = (char *) 0 ; char *arg6 = (char *) 0 ; Prelude::ClientEasy *result = 0 ; SWIG_check_num_args("Prelude::ClientEasy",6,6) if(!lua_isstring(L,1)) SWIG_fail_arg("Prelude::ClientEasy",1,"char const *"); if(!lua_isnumber(L,2)) SWIG_fail_arg("Prelude::ClientEasy",2,"int"); if(!lua_isstring(L,3)) SWIG_fail_arg("Prelude::ClientEasy",3,"char const *"); if(!lua_isstring(L,4)) SWIG_fail_arg("Prelude::ClientEasy",4,"char const *"); if(!lua_isstring(L,5)) SWIG_fail_arg("Prelude::ClientEasy",5,"char const *"); if(!lua_isstring(L,6)) SWIG_fail_arg("Prelude::ClientEasy",6,"char const *"); arg1 = (char *)lua_tostring(L, 1); arg2 = (int)lua_tonumber(L, 2); arg3 = (char *)lua_tostring(L, 3); arg4 = (char *)lua_tostring(L, 4); arg5 = (char *)lua_tostring(L, 5); arg6 = (char *)lua_tostring(L, 6); try { result = (Prelude::ClientEasy *)new Prelude::ClientEasy((char const *)arg1,arg2,(char const *)arg3,(char const *)arg4,(char const *)arg5,(char const *)arg6); } catch(Prelude::PreludeError &_e) { SWIG_exception(SWIG_RuntimeError, (&_e)->what()); } SWIG_NewPointerObj(L,result,SWIGTYPE_p_Prelude__ClientEasy,1); SWIG_arg++; return SWIG_arg; if(0) SWIG_fail; fail: lua_error(L); return SWIG_arg; } static int _wrap_new_ClientEasy__SWIG_1(lua_State* L) { int SWIG_arg = 0; char *arg1 = (char *) 0 ; int arg2 ; char *arg3 = (char *) 0 ; char *arg4 = (char *) 0 ; char *arg5 = (char *) 0 ; Prelude::ClientEasy *result = 0 ; SWIG_check_num_args("Prelude::ClientEasy",5,5) if(!lua_isstring(L,1)) SWIG_fail_arg("Prelude::ClientEasy",1,"char const *"); if(!lua_isnumber(L,2)) SWIG_fail_arg("Prelude::ClientEasy",2,"int"); if(!lua_isstring(L,3)) SWIG_fail_arg("Prelude::ClientEasy",3,"char const *"); if(!lua_isstring(L,4)) SWIG_fail_arg("Prelude::ClientEasy",4,"char const *"); if(!lua_isstring(L,5)) SWIG_fail_arg("Prelude::ClientEasy",5,"char const *"); arg1 = (char *)lua_tostring(L, 1); arg2 = (int)lua_tonumber(L, 2); arg3 = (char *)lua_tostring(L, 3); arg4 = (char *)lua_tostring(L, 4); arg5 = (char *)lua_tostring(L, 5); try { result = (Prelude::ClientEasy *)new Prelude::ClientEasy((char const *)arg1,arg2,(char const *)arg3,(char const *)arg4,(char const *)arg5); } catch(Prelude::PreludeError &_e) { SWIG_exception(SWIG_RuntimeError, (&_e)->what()); } SWIG_NewPointerObj(L,result,SWIGTYPE_p_Prelude__ClientEasy,1); SWIG_arg++; return SWIG_arg; if(0) SWIG_fail; fail: lua_error(L); return SWIG_arg; } static int _wrap_new_ClientEasy__SWIG_2(lua_State* L) { int SWIG_arg = 0; char *arg1 = (char *) 0 ; int arg2 ; char *arg3 = (char *) 0 ; char *arg4 = (char *) 0 ; Prelude::ClientEasy *result = 0 ; SWIG_check_num_args("Prelude::ClientEasy",4,4) if(!lua_isstring(L,1)) SWIG_fail_arg("Prelude::ClientEasy",1,"char const *"); if(!lua_isnumber(L,2)) SWIG_fail_arg("Prelude::ClientEasy",2,"int"); if(!lua_isstring(L,3)) SWIG_fail_arg("Prelude::ClientEasy",3,"char const *"); if(!lua_isstring(L,4)) SWIG_fail_arg("Prelude::ClientEasy",4,"char const *"); arg1 = (char *)lua_tostring(L, 1); arg2 = (int)lua_tonumber(L, 2); arg3 = (char *)lua_tostring(L, 3); arg4 = (char *)lua_tostring(L, 4); try { result = (Prelude::ClientEasy *)new Prelude::ClientEasy((char const *)arg1,arg2,(char const *)arg3,(char const *)arg4); } catch(Prelude::PreludeError &_e) { SWIG_exception(SWIG_RuntimeError, (&_e)->what()); } SWIG_NewPointerObj(L,result,SWIGTYPE_p_Prelude__ClientEasy,1); SWIG_arg++; return SWIG_arg; if(0) SWIG_fail; fail: lua_error(L); return SWIG_arg; } static int _wrap_new_ClientEasy__SWIG_3(lua_State* L) { int SWIG_arg = 0; char *arg1 = (char *) 0 ; int arg2 ; char *arg3 = (char *) 0 ; Prelude::ClientEasy *result = 0 ; SWIG_check_num_args("Prelude::ClientEasy",3,3) if(!lua_isstring(L,1)) SWIG_fail_arg("Prelude::ClientEasy",1,"char const *"); if(!lua_isnumber(L,2)) SWIG_fail_arg("Prelude::ClientEasy",2,"int"); if(!lua_isstring(L,3)) SWIG_fail_arg("Prelude::ClientEasy",3,"char const *"); arg1 = (char *)lua_tostring(L, 1); arg2 = (int)lua_tonumber(L, 2); arg3 = (char *)lua_tostring(L, 3); try { result = (Prelude::ClientEasy *)new Prelude::ClientEasy((char const *)arg1,arg2,(char const *)arg3); } catch(Prelude::PreludeError &_e) { SWIG_exception(SWIG_RuntimeError, (&_e)->what()); } SWIG_NewPointerObj(L,result,SWIGTYPE_p_Prelude__ClientEasy,1); SWIG_arg++; return SWIG_arg; if(0) SWIG_fail; fail: lua_error(L); return SWIG_arg; } static int _wrap_new_ClientEasy__SWIG_4(lua_State* L) { int SWIG_arg = 0; char *arg1 = (char *) 0 ; int arg2 ; Prelude::ClientEasy *result = 0 ; SWIG_check_num_args("Prelude::ClientEasy",2,2) if(!lua_isstring(L,1)) SWIG_fail_arg("Prelude::ClientEasy",1,"char const *"); if(!lua_isnumber(L,2)) SWIG_fail_arg("Prelude::ClientEasy",2,"int"); arg1 = (char *)lua_tostring(L, 1); arg2 = (int)lua_tonumber(L, 2); try { result = (Prelude::ClientEasy *)new Prelude::ClientEasy((char const *)arg1,arg2); } catch(Prelude::PreludeError &_e) { SWIG_exception(SWIG_RuntimeError, (&_e)->what()); } SWIG_NewPointerObj(L,result,SWIGTYPE_p_Prelude__ClientEasy,1); SWIG_arg++; return SWIG_arg; if(0) SWIG_fail; fail: lua_error(L); return SWIG_arg; } static int _wrap_new_ClientEasy__SWIG_5(lua_State* L) { int SWIG_arg = 0; char *arg1 = (char *) 0 ; Prelude::ClientEasy *result = 0 ; SWIG_check_num_args("Prelude::ClientEasy",1,1) if(!lua_isstring(L,1)) SWIG_fail_arg("Prelude::ClientEasy",1,"char const *"); arg1 = (char *)lua_tostring(L, 1); try { result = (Prelude::ClientEasy *)new Prelude::ClientEasy((char const *)arg1); } catch(Prelude::PreludeError &_e) { SWIG_exception(SWIG_RuntimeError, (&_e)->what()); } SWIG_NewPointerObj(L,result,SWIGTYPE_p_Prelude__ClientEasy,1); SWIG_arg++; return SWIG_arg; if(0) SWIG_fail; fail: lua_error(L); return SWIG_arg; } static int _wrap_new_ClientEasy(lua_State* L) { int argc; int argv[7]={ 1,2,3,4,5,6,7 }; argc = lua_gettop(L); if (argc == 1) { int _v; { _v = lua_isstring(L,argv[0]); } if (_v) { return _wrap_new_ClientEasy__SWIG_5(L); } } if (argc == 2) { int _v; { _v = lua_isstring(L,argv[0]); } if (_v) { { _v = lua_isnumber(L,argv[1]); } if (_v) { return _wrap_new_ClientEasy__SWIG_4(L); } } } if (argc == 3) { int _v; { _v = lua_isstring(L,argv[0]); } if (_v) { { _v = lua_isnumber(L,argv[1]); } if (_v) { { _v = lua_isstring(L,argv[2]); } if (_v) { return _wrap_new_ClientEasy__SWIG_3(L); } } } } if (argc == 4) { int _v; { _v = lua_isstring(L,argv[0]); } if (_v) { { _v = lua_isnumber(L,argv[1]); } if (_v) { { _v = lua_isstring(L,argv[2]); } if (_v) { { _v = lua_isstring(L,argv[3]); } if (_v) { return _wrap_new_ClientEasy__SWIG_2(L); } } } } } if (argc == 5) { int _v; { _v = lua_isstring(L,argv[0]); } if (_v) { { _v = lua_isnumber(L,argv[1]); } if (_v) { { _v = lua_isstring(L,argv[2]); } if (_v) { { _v = lua_isstring(L,argv[3]); } if (_v) { { _v = lua_isstring(L,argv[4]); } if (_v) { return _wrap_new_ClientEasy__SWIG_1(L); } } } } } } if (argc == 6) { int _v; { _v = lua_isstring(L,argv[0]); } if (_v) { { _v = lua_isnumber(L,argv[1]); } if (_v) { { _v = lua_isstring(L,argv[2]); } if (_v) { { _v = lua_isstring(L,argv[3]); } if (_v) { { _v = lua_isstring(L,argv[4]); } if (_v) { { _v = lua_isstring(L,argv[5]); } if (_v) { return _wrap_new_ClientEasy__SWIG_0(L); } } } } } } } lua_pushstring(L,"Wrong arguments for overloaded function 'new_ClientEasy'\n" " Possible C/C++ prototypes are:\n" " Prelude::ClientEasy(char const *,int,char const *,char const *,char const *,char const *)\n" " Prelude::ClientEasy(char const *,int,char const *,char const *,char const *)\n" " Prelude::ClientEasy(char const *,int,char const *,char const *)\n" " Prelude::ClientEasy(char const *,int,char const *)\n" " Prelude::ClientEasy(char const *,int)\n" " Prelude::ClientEasy(char const *)\n"); lua_error(L);return 0; } static void swig_delete_ClientEasy(void *obj) { Prelude::ClientEasy *arg1 = (Prelude::ClientEasy *) obj; delete arg1; } static swig_lua_method swig_Prelude_ClientEasy_methods[] = { {0,0} }; static swig_lua_attribute swig_Prelude_ClientEasy_attributes[] = { {0,0,0} }; static swig_lua_class *swig_Prelude_ClientEasy_bases[] = {0,0}; static const char *swig_Prelude_ClientEasy_base_names[] = {"Prelude::Client *",0}; static swig_lua_class _wrap_class_Prelude_ClientEasy = { "ClientEasy", &SWIGTYPE_p_Prelude__ClientEasy,_wrap_new_ClientEasy, swig_delete_ClientEasy, swig_Prelude_ClientEasy_methods, swig_Prelude_ClientEasy_attributes, swig_Prelude_ClientEasy_bases, swig_Prelude_ClientEasy_base_names }; static int _wrap_new_IDMEFCriterion(lua_State* L) { int SWIG_arg = 0; Prelude::IDMEFCriterion *result = 0 ; SWIG_check_num_args("Prelude::IDMEFCriterion::IDMEFCriterion",0,0) result = (Prelude::IDMEFCriterion *)new Prelude::IDMEFCriterion(); SWIG_NewPointerObj(L,result,SWIGTYPE_p_Prelude__IDMEFCriterion,1); SWIG_arg++; return SWIG_arg; if(0) SWIG_fail; fail: lua_error(L); return SWIG_arg; } static void swig_delete_IDMEFCriterion(void *obj) { Prelude::IDMEFCriterion *arg1 = (Prelude::IDMEFCriterion *) obj; delete arg1; } static swig_lua_method swig_Prelude_IDMEFCriterion_methods[] = { {0,0} }; static swig_lua_attribute swig_Prelude_IDMEFCriterion_attributes[] = { {0,0,0} }; static swig_lua_class *swig_Prelude_IDMEFCriterion_bases[] = {0}; static const char *swig_Prelude_IDMEFCriterion_base_names[] = {0}; static swig_lua_class _wrap_class_Prelude_IDMEFCriterion = { "IDMEFCriterion", &SWIGTYPE_p_Prelude__IDMEFCriterion,_wrap_new_IDMEFCriterion, swig_delete_IDMEFCriterion, swig_Prelude_IDMEFCriterion_methods, swig_Prelude_IDMEFCriterion_attributes, swig_Prelude_IDMEFCriterion_bases, swig_Prelude_IDMEFCriterion_base_names }; static int _wrap_new_IDMEFCriteria__SWIG_0(lua_State* L) { int SWIG_arg = 0; Prelude::IDMEFCriteria *result = 0 ; SWIG_check_num_args("Prelude::IDMEFCriteria",0,0) try { result = (Prelude::IDMEFCriteria *)new Prelude::IDMEFCriteria(); } catch(Prelude::PreludeError &_e) { SWIG_exception(SWIG_RuntimeError, (&_e)->what()); } SWIG_NewPointerObj(L,result,SWIGTYPE_p_Prelude__IDMEFCriteria,1); SWIG_arg++; return SWIG_arg; if(0) SWIG_fail; fail: lua_error(L); return SWIG_arg; } static int _wrap_new_IDMEFCriteria__SWIG_1(lua_State* L) { int SWIG_arg = 0; Prelude::IDMEFCriteria *arg1 = 0 ; Prelude::IDMEFCriteria *result = 0 ; SWIG_check_num_args("Prelude::IDMEFCriteria",1,1) if(!lua_isuserdata(L,1)) SWIG_fail_arg("Prelude::IDMEFCriteria",1,"Prelude::IDMEFCriteria const &"); if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Prelude__IDMEFCriteria,0))){ SWIG_fail_ptr("new_IDMEFCriteria",1,SWIGTYPE_p_Prelude__IDMEFCriteria); } try { result = (Prelude::IDMEFCriteria *)new Prelude::IDMEFCriteria((Prelude::IDMEFCriteria const &)*arg1); } catch(Prelude::PreludeError &_e) { SWIG_exception(SWIG_RuntimeError, (&_e)->what()); } SWIG_NewPointerObj(L,result,SWIGTYPE_p_Prelude__IDMEFCriteria,1); SWIG_arg++; return SWIG_arg; if(0) SWIG_fail; fail: lua_error(L); return SWIG_arg; } static int _wrap_new_IDMEFCriteria__SWIG_2(lua_State* L) { int SWIG_arg = 0; char *arg1 = (char *) 0 ; Prelude::IDMEFCriteria *result = 0 ; SWIG_check_num_args("Prelude::IDMEFCriteria",1,1) if(!lua_isstring(L,1)) SWIG_fail_arg("Prelude::IDMEFCriteria",1,"char const *"); arg1 = (char *)lua_tostring(L, 1); try { result = (Prelude::IDMEFCriteria *)new Prelude::IDMEFCriteria((char const *)arg1); } catch(Prelude::PreludeError &_e) { SWIG_exception(SWIG_RuntimeError, (&_e)->what()); } SWIG_NewPointerObj(L,result,SWIGTYPE_p_Prelude__IDMEFCriteria,1); SWIG_arg++; return SWIG_arg; if(0) SWIG_fail; fail: lua_error(L); return SWIG_arg; } static int _wrap_new_IDMEFCriteria__SWIG_3(lua_State* L) { int SWIG_arg = 0; idmef_criteria_t *arg1 = (idmef_criteria_t *) 0 ; Prelude::IDMEFCriteria *result = 0 ; SWIG_check_num_args("Prelude::IDMEFCriteria",1,1) if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Prelude::IDMEFCriteria",1,"idmef_criteria_t *"); if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_idmef_criteria_t,0))){ SWIG_fail_ptr("new_IDMEFCriteria",1,SWIGTYPE_p_idmef_criteria_t); } try { result = (Prelude::IDMEFCriteria *)new Prelude::IDMEFCriteria(arg1); } catch(Prelude::PreludeError &_e) { SWIG_exception(SWIG_RuntimeError, (&_e)->what()); } SWIG_NewPointerObj(L,result,SWIGTYPE_p_Prelude__IDMEFCriteria,1); SWIG_arg++; return SWIG_arg; if(0) SWIG_fail; fail: lua_error(L); return SWIG_arg; } static int _wrap_new_IDMEFCriteria(lua_State* L) { int argc; int argv[2]={ 1,2 }; argc = lua_gettop(L); if (argc == 0) { return _wrap_new_IDMEFCriteria__SWIG_0(L); } if (argc == 1) { int _v; { void *ptr; if (lua_isuserdata(L,argv[0])==0 || SWIG_ConvertPtr(L,argv[0], (void **) &ptr, SWIGTYPE_p_Prelude__IDMEFCriteria, 0)) { _v = 0; } else { _v = 1; } } if (_v) { return _wrap_new_IDMEFCriteria__SWIG_1(L); } } if (argc == 1) { int _v; { void *ptr; if (SWIG_isptrtype(L,argv[0])==0 || SWIG_ConvertPtr(L,argv[0], (void **) &ptr, SWIGTYPE_p_idmef_criteria_t, 0)) { _v = 0; } else { _v = 1; } } if (_v) { return _wrap_new_IDMEFCriteria__SWIG_3(L); } } if (argc == 1) { int _v; { _v = lua_isstring(L,argv[0]); } if (_v) { return _wrap_new_IDMEFCriteria__SWIG_2(L); } } lua_pushstring(L,"Wrong arguments for overloaded function 'new_IDMEFCriteria'\n" " Possible C/C++ prototypes are:\n" " Prelude::IDMEFCriteria()\n" " Prelude::IDMEFCriteria(Prelude::IDMEFCriteria const &)\n" " Prelude::IDMEFCriteria(char const *)\n" " Prelude::IDMEFCriteria(idmef_criteria_t *)\n"); lua_error(L);return 0; } static int _wrap_IDMEFCriteria_Match(lua_State* L) { int SWIG_arg = 0; Prelude::IDMEFCriteria *arg1 = (Prelude::IDMEFCriteria *) 0 ; Prelude::IDMEF *arg2 = (Prelude::IDMEF *) 0 ; int result; SWIG_check_num_args("Match",2,2) if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Match",1,"Prelude::IDMEFCriteria *"); if(!SWIG_isptrtype(L,2)) SWIG_fail_arg("Match",2,"Prelude::IDMEF *"); if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Prelude__IDMEFCriteria,0))){ SWIG_fail_ptr("IDMEFCriteria_Match",1,SWIGTYPE_p_Prelude__IDMEFCriteria); } if (!SWIG_IsOK(SWIG_ConvertPtr(L,2,(void**)&arg2,SWIGTYPE_p_Prelude__IDMEF,0))){ SWIG_fail_ptr("IDMEFCriteria_Match",2,SWIGTYPE_p_Prelude__IDMEF); } try { result = (int)(arg1)->Match(arg2); } catch(Prelude::PreludeError &_e) { SWIG_exception(SWIG_RuntimeError, (&_e)->what()); } lua_pushnumber(L, (lua_Number) result); SWIG_arg++; return SWIG_arg; if(0) SWIG_fail; fail: lua_error(L); return SWIG_arg; } static int _wrap_IDMEFCriteria_Clone(lua_State* L) { int SWIG_arg = 0; Prelude::IDMEFCriteria *arg1 = (Prelude::IDMEFCriteria *) 0 ; Prelude::IDMEFCriteria result; SWIG_check_num_args("Clone",1,1) if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Clone",1,"Prelude::IDMEFCriteria *"); if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Prelude__IDMEFCriteria,0))){ SWIG_fail_ptr("IDMEFCriteria_Clone",1,SWIGTYPE_p_Prelude__IDMEFCriteria); } try { result = (arg1)->Clone(); } catch(Prelude::PreludeError &_e) { SWIG_exception(SWIG_RuntimeError, (&_e)->what()); } { Prelude::IDMEFCriteria * resultptr = new Prelude::IDMEFCriteria((const Prelude::IDMEFCriteria &) result); SWIG_NewPointerObj(L,(void *) resultptr,SWIGTYPE_p_Prelude__IDMEFCriteria,1); SWIG_arg++; } return SWIG_arg; if(0) SWIG_fail; fail: lua_error(L); return SWIG_arg; } static int _wrap_IDMEFCriteria_ANDCriteria(lua_State* L) { int SWIG_arg = 0; Prelude::IDMEFCriteria *arg1 = (Prelude::IDMEFCriteria *) 0 ; Prelude::IDMEFCriteria *arg2 = 0 ; SWIG_check_num_args("ANDCriteria",2,2) if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("ANDCriteria",1,"Prelude::IDMEFCriteria *"); if(!lua_isuserdata(L,2)) SWIG_fail_arg("ANDCriteria",2,"Prelude::IDMEFCriteria const &"); if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Prelude__IDMEFCriteria,0))){ SWIG_fail_ptr("IDMEFCriteria_ANDCriteria",1,SWIGTYPE_p_Prelude__IDMEFCriteria); } if (!SWIG_IsOK(SWIG_ConvertPtr(L,2,(void**)&arg2,SWIGTYPE_p_Prelude__IDMEFCriteria,0))){ SWIG_fail_ptr("IDMEFCriteria_ANDCriteria",2,SWIGTYPE_p_Prelude__IDMEFCriteria); } try { (arg1)->ANDCriteria((Prelude::IDMEFCriteria const &)*arg2); } catch(Prelude::PreludeError &_e) { SWIG_exception(SWIG_RuntimeError, (&_e)->what()); } return SWIG_arg; if(0) SWIG_fail; fail: lua_error(L); return SWIG_arg; } static int _wrap_IDMEFCriteria_ORCriteria(lua_State* L) { int SWIG_arg = 0; Prelude::IDMEFCriteria *arg1 = (Prelude::IDMEFCriteria *) 0 ; Prelude::IDMEFCriteria *arg2 = 0 ; SWIG_check_num_args("ORCriteria",2,2) if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("ORCriteria",1,"Prelude::IDMEFCriteria *"); if(!lua_isuserdata(L,2)) SWIG_fail_arg("ORCriteria",2,"Prelude::IDMEFCriteria const &"); if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Prelude__IDMEFCriteria,0))){ SWIG_fail_ptr("IDMEFCriteria_ORCriteria",1,SWIGTYPE_p_Prelude__IDMEFCriteria); } if (!SWIG_IsOK(SWIG_ConvertPtr(L,2,(void**)&arg2,SWIGTYPE_p_Prelude__IDMEFCriteria,0))){ SWIG_fail_ptr("IDMEFCriteria_ORCriteria",2,SWIGTYPE_p_Prelude__IDMEFCriteria); } try { (arg1)->ORCriteria((Prelude::IDMEFCriteria const &)*arg2); } catch(Prelude::PreludeError &_e) { SWIG_exception(SWIG_RuntimeError, (&_e)->what()); } return SWIG_arg; if(0) SWIG_fail; fail: lua_error(L); return SWIG_arg; } static int _wrap_IDMEFCriteria_ToString(lua_State* L) { int SWIG_arg = 0; Prelude::IDMEFCriteria *arg1 = (Prelude::IDMEFCriteria *) 0 ; std::string result; SWIG_check_num_args("ToString",1,1) if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("ToString",1,"Prelude::IDMEFCriteria const *"); if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Prelude__IDMEFCriteria,0))){ SWIG_fail_ptr("IDMEFCriteria_ToString",1,SWIGTYPE_p_Prelude__IDMEFCriteria); } try { result = ((Prelude::IDMEFCriteria const *)arg1)->ToString(); } catch(Prelude::PreludeError &_e) { SWIG_exception(SWIG_RuntimeError, (&_e)->what()); } lua_pushlstring(L,(&result)->data(),(&result)->size()); SWIG_arg++; return SWIG_arg; if(0) SWIG_fail; fail: lua_error(L); return SWIG_arg; } static int _wrap_IDMEFCriteria___tostring(lua_State* L) { int SWIG_arg = 0; Prelude::IDMEFCriteria *arg1 = (Prelude::IDMEFCriteria *) 0 ; char *result = 0 ; SWIG_check_num_args("__str__",1,1) if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("__str__",1,"Prelude::IDMEFCriteria *"); if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Prelude__IDMEFCriteria,0))){ SWIG_fail_ptr("IDMEFCriteria___tostring",1,SWIGTYPE_p_Prelude__IDMEFCriteria); } result = (char *)Prelude_IDMEFCriteria___str__(arg1); lua_pushstring(L,(const char*)result); SWIG_arg++; delete [] result; return SWIG_arg; if(0) SWIG_fail; fail: lua_error(L); return SWIG_arg; } static void swig_delete_IDMEFCriteria(void *obj) { Prelude::IDMEFCriteria *arg1 = (Prelude::IDMEFCriteria *) obj; delete arg1; } static swig_lua_method swig_Prelude_IDMEFCriteria_methods[] = { {"Match", _wrap_IDMEFCriteria_Match}, {"Clone", _wrap_IDMEFCriteria_Clone}, {"ANDCriteria", _wrap_IDMEFCriteria_ANDCriteria}, {"ORCriteria", _wrap_IDMEFCriteria_ORCriteria}, {"ToString", _wrap_IDMEFCriteria_ToString}, {"__tostring", _wrap_IDMEFCriteria___tostring}, {0,0} }; static swig_lua_attribute swig_Prelude_IDMEFCriteria_attributes[] = { {0,0,0} }; static swig_lua_class *swig_Prelude_IDMEFCriteria_bases[] = {0}; static const char *swig_Prelude_IDMEFCriteria_base_names[] = {0}; static swig_lua_class _wrap_class_Prelude_IDMEFCriteria = { "IDMEFCriteria", &SWIGTYPE_p_Prelude__IDMEFCriteria,_wrap_new_IDMEFCriteria, swig_delete_IDMEFCriteria, swig_Prelude_IDMEFCriteria_methods, swig_Prelude_IDMEFCriteria_attributes, swig_Prelude_IDMEFCriteria_bases, swig_Prelude_IDMEFCriteria_base_names }; static int _wrap_IDMEFValue_GetType(lua_State* L) { int SWIG_arg = 0; Prelude::IDMEFValue *arg1 = (Prelude::IDMEFValue *) 0 ; idmef_value_type_id_t result; SWIG_check_num_args("GetType",1,1) if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("GetType",1,"Prelude::IDMEFValue const *"); if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Prelude__IDMEFValue,0))){ SWIG_fail_ptr("IDMEFValue_GetType",1,SWIGTYPE_p_Prelude__IDMEFValue); } try { result = ((Prelude::IDMEFValue const *)arg1)->GetType(); } catch(Prelude::PreludeError &_e) { SWIG_exception(SWIG_RuntimeError, (&_e)->what()); } { idmef_value_type_id_t * resultptr = new idmef_value_type_id_t((const idmef_value_type_id_t &) result); SWIG_NewPointerObj(L,(void *) resultptr,SWIGTYPE_p_idmef_value_type_id_t,1); SWIG_arg++; } return SWIG_arg; if(0) SWIG_fail; fail: lua_error(L); return SWIG_arg; } static int _wrap_IDMEFValue_IsNull(lua_State* L) { int SWIG_arg = 0; Prelude::IDMEFValue *arg1 = (Prelude::IDMEFValue *) 0 ; bool result; SWIG_check_num_args("IsNull",1,1) if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("IsNull",1,"Prelude::IDMEFValue const *"); if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Prelude__IDMEFValue,0))){ SWIG_fail_ptr("IDMEFValue_IsNull",1,SWIGTYPE_p_Prelude__IDMEFValue); } try { result = (bool)((Prelude::IDMEFValue const *)arg1)->IsNull(); } catch(Prelude::PreludeError &_e) { SWIG_exception(SWIG_RuntimeError, (&_e)->what()); } lua_pushboolean(L,(int)(result!=0)); SWIG_arg++; return SWIG_arg; if(0) SWIG_fail; fail: lua_error(L); return SWIG_arg; } static int _wrap_new_IDMEFValue__SWIG_0(lua_State* L) { int SWIG_arg = 0; Prelude::IDMEFValue *result = 0 ; SWIG_check_num_args("Prelude::IDMEFValue",0,0) try { result = (Prelude::IDMEFValue *)new Prelude::IDMEFValue(); } catch(Prelude::PreludeError &_e) { SWIG_exception(SWIG_RuntimeError, (&_e)->what()); } SWIG_NewPointerObj(L,result,SWIGTYPE_p_Prelude__IDMEFValue,1); SWIG_arg++; return SWIG_arg; if(0) SWIG_fail; fail: lua_error(L); return SWIG_arg; } static int _wrap_new_IDMEFValue__SWIG_1(lua_State* L) { int SWIG_arg = 0; Prelude::IDMEFValue *arg1 = 0 ; Prelude::IDMEFValue *result = 0 ; SWIG_check_num_args("Prelude::IDMEFValue",1,1) if(!lua_isuserdata(L,1)) SWIG_fail_arg("Prelude::IDMEFValue",1,"Prelude::IDMEFValue const &"); if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Prelude__IDMEFValue,0))){ SWIG_fail_ptr("new_IDMEFValue",1,SWIGTYPE_p_Prelude__IDMEFValue); } try { result = (Prelude::IDMEFValue *)new Prelude::IDMEFValue((Prelude::IDMEFValue const &)*arg1); } catch(Prelude::PreludeError &_e) { SWIG_exception(SWIG_RuntimeError, (&_e)->what()); } SWIG_NewPointerObj(L,result,SWIGTYPE_p_Prelude__IDMEFValue,1); SWIG_arg++; return SWIG_arg; if(0) SWIG_fail; fail: lua_error(L); return SWIG_arg; } static int _wrap_new_IDMEFValue__SWIG_2(lua_State* L) { int SWIG_arg = 0; std::vector< Prelude::IDMEFValue > arg1 ; std::vector< Prelude::IDMEFValue > *argp1 ; Prelude::IDMEFValue *result = 0 ; SWIG_check_num_args("Prelude::IDMEFValue",1,1) if(!lua_isuserdata(L,1)) SWIG_fail_arg("Prelude::IDMEFValue",1,"std::vector< Prelude::IDMEFValue >"); if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&argp1,SWIGTYPE_p_std__vectorT_Prelude__IDMEFValue_t,0))){ SWIG_fail_ptr("new_IDMEFValue",1,SWIGTYPE_p_std__vectorT_Prelude__IDMEFValue_t); } arg1 = *argp1; try { result = (Prelude::IDMEFValue *)new Prelude::IDMEFValue(arg1); } catch(Prelude::PreludeError &_e) { SWIG_exception(SWIG_RuntimeError, (&_e)->what()); } SWIG_NewPointerObj(L,result,SWIGTYPE_p_Prelude__IDMEFValue,1); SWIG_arg++; return SWIG_arg; if(0) SWIG_fail; fail: lua_error(L); return SWIG_arg; } static int _wrap_new_IDMEFValue__SWIG_3(lua_State* L) { int SWIG_arg = 0; idmef_value_t *arg1 = (idmef_value_t *) 0 ; Prelude::IDMEFValue *result = 0 ; SWIG_check_num_args("Prelude::IDMEFValue",1,1) if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Prelude::IDMEFValue",1,"idmef_value_t *"); if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_idmef_value_t,0))){ SWIG_fail_ptr("new_IDMEFValue",1,SWIGTYPE_p_idmef_value_t); } try { result = (Prelude::IDMEFValue *)new Prelude::IDMEFValue(arg1); } catch(Prelude::PreludeError &_e) { SWIG_exception(SWIG_RuntimeError, (&_e)->what()); } SWIG_NewPointerObj(L,result,SWIGTYPE_p_Prelude__IDMEFValue,1); SWIG_arg++; return SWIG_arg; if(0) SWIG_fail; fail: lua_error(L); return SWIG_arg; } static int _wrap_new_IDMEFValue__SWIG_4(lua_State* L) { int SWIG_arg = 0; char *arg1 = (char *) 0 ; Prelude::IDMEFValue *result = 0 ; SWIG_check_num_args("Prelude::IDMEFValue",1,1) if(!lua_isstring(L,1)) SWIG_fail_arg("Prelude::IDMEFValue",1,"char const *"); arg1 = (char *)lua_tostring(L, 1); try { result = (Prelude::IDMEFValue *)new Prelude::IDMEFValue((char const *)arg1); } catch(Prelude::PreludeError &_e) { SWIG_exception(SWIG_RuntimeError, (&_e)->what()); } SWIG_NewPointerObj(L,result,SWIGTYPE_p_Prelude__IDMEFValue,1); SWIG_arg++; return SWIG_arg; if(0) SWIG_fail; fail: lua_error(L); return SWIG_arg; } static int _wrap_new_IDMEFValue__SWIG_5(lua_State* L) { int SWIG_arg = 0; double arg1 ; Prelude::IDMEFValue *result = 0 ; SWIG_check_num_args("Prelude::IDMEFValue",1,1) if(!lua_isnumber(L,1)) SWIG_fail_arg("Prelude::IDMEFValue",1,"double"); arg1 = (double)lua_tonumber(L, 1); try { result = (Prelude::IDMEFValue *)new Prelude::IDMEFValue(arg1); } catch(Prelude::PreludeError &_e) { SWIG_exception(SWIG_RuntimeError, (&_e)->what()); } SWIG_NewPointerObj(L,result,SWIGTYPE_p_Prelude__IDMEFValue,1); SWIG_arg++; return SWIG_arg; if(0) SWIG_fail; fail: lua_error(L); return SWIG_arg; } static int _wrap_new_IDMEFValue__SWIG_6(lua_State* L) { int SWIG_arg = 0; Prelude::IDMEFTime *arg1 = 0 ; Prelude::IDMEFValue *result = 0 ; SWIG_check_num_args("Prelude::IDMEFValue",1,1) if(!lua_isuserdata(L,1)) SWIG_fail_arg("Prelude::IDMEFValue",1,"Prelude::IDMEFTime &"); if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Prelude__IDMEFTime,0))){ SWIG_fail_ptr("new_IDMEFValue",1,SWIGTYPE_p_Prelude__IDMEFTime); } try { result = (Prelude::IDMEFValue *)new Prelude::IDMEFValue(*arg1); } catch(Prelude::PreludeError &_e) { SWIG_exception(SWIG_RuntimeError, (&_e)->what()); } SWIG_NewPointerObj(L,result,SWIGTYPE_p_Prelude__IDMEFValue,1); SWIG_arg++; return SWIG_arg; if(0) SWIG_fail; fail: lua_error(L); return SWIG_arg; } static int _wrap_new_IDMEFValue(lua_State* L) { int argc; int argv[2]={ 1,2 }; argc = lua_gettop(L); if (argc == 0) { return _wrap_new_IDMEFValue__SWIG_0(L); } if (argc == 1) { int _v; { void *ptr; if (lua_isuserdata(L,argv[0])==0 || SWIG_ConvertPtr(L,argv[0], (void **) &ptr, SWIGTYPE_p_Prelude__IDMEFValue, 0)) { _v = 0; } else { _v = 1; } } if (_v) { return _wrap_new_IDMEFValue__SWIG_1(L); } } if (argc == 1) { int _v; { void *ptr; if (lua_isuserdata(L,argv[0])==0 || SWIG_ConvertPtr(L,argv[0], (void **) &ptr, SWIGTYPE_p_std__vectorT_Prelude__IDMEFValue_t, 0)) { _v = 0; } else { _v = 1; } } if (_v) { return _wrap_new_IDMEFValue__SWIG_2(L); } } if (argc == 1) { int _v; { void *ptr; if (SWIG_isptrtype(L,argv[0])==0 || SWIG_ConvertPtr(L,argv[0], (void **) &ptr, SWIGTYPE_p_idmef_value_t, 0)) { _v = 0; } else { _v = 1; } } if (_v) { return _wrap_new_IDMEFValue__SWIG_3(L); } } if (argc == 1) { int _v; { void *ptr; if (lua_isuserdata(L,argv[0])==0 || SWIG_ConvertPtr(L,argv[0], (void **) &ptr, SWIGTYPE_p_Prelude__IDMEFTime, 0)) { _v = 0; } else { _v = 1; } } if (_v) { return _wrap_new_IDMEFValue__SWIG_6(L); } } if (argc == 1) { int _v; { _v = lua_isnumber(L,argv[0]); } if (_v) { return _wrap_new_IDMEFValue__SWIG_5(L); } } if (argc == 1) { int _v; { _v = lua_isstring(L,argv[0]); } if (_v) { return _wrap_new_IDMEFValue__SWIG_4(L); } } lua_pushstring(L,"Wrong arguments for overloaded function 'new_IDMEFValue'\n" " Possible C/C++ prototypes are:\n" " Prelude::IDMEFValue()\n" " Prelude::IDMEFValue(Prelude::IDMEFValue const &)\n" " Prelude::IDMEFValue(std::vector< Prelude::IDMEFValue >)\n" " Prelude::IDMEFValue(idmef_value_t *)\n" " Prelude::IDMEFValue(char const *)\n" " Prelude::IDMEFValue(double)\n" " Prelude::IDMEFValue(Prelude::IDMEFTime &)\n"); lua_error(L);return 0; } static int _wrap_IDMEFValue_Match(lua_State* L) { int SWIG_arg = 0; Prelude::IDMEFValue *arg1 = (Prelude::IDMEFValue *) 0 ; Prelude::IDMEFValue *arg2 = 0 ; int arg3 ; int result; SWIG_check_num_args("Match",3,3) if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Match",1,"Prelude::IDMEFValue *"); if(!lua_isuserdata(L,2)) SWIG_fail_arg("Match",2,"Prelude::IDMEFValue const &"); if(!lua_isnumber(L,3)) SWIG_fail_arg("Match",3,"int"); if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Prelude__IDMEFValue,0))){ SWIG_fail_ptr("IDMEFValue_Match",1,SWIGTYPE_p_Prelude__IDMEFValue); } if (!SWIG_IsOK(SWIG_ConvertPtr(L,2,(void**)&arg2,SWIGTYPE_p_Prelude__IDMEFValue,0))){ SWIG_fail_ptr("IDMEFValue_Match",2,SWIGTYPE_p_Prelude__IDMEFValue); } arg3 = (int)lua_tonumber(L, 3); try { result = (int)(arg1)->Match((Prelude::IDMEFValue const &)*arg2,arg3); } catch(Prelude::PreludeError &_e) { SWIG_exception(SWIG_RuntimeError, (&_e)->what()); } lua_pushnumber(L, (lua_Number) result); SWIG_arg++; return SWIG_arg; if(0) SWIG_fail; fail: lua_error(L); return SWIG_arg; } int IDMEFValue_to_SWIG(lua_State* L, const IDMEFValue &result) { int ret = 1; std::stringstream s; idmef_value_t *value = result; idmef_value_type_id_t type = result.GetType(); if ( type == IDMEF_VALUE_TYPE_STRING ) { prelude_string_t *str = idmef_value_get_string(value); SWIG_FromCharPtrAndSize(prelude_string_get_string(str), prelude_string_get_len(str)); } else if ( type == IDMEF_VALUE_TYPE_INT8 ) SWIG_From_int(idmef_value_get_int8(value)); else if ( type == IDMEF_VALUE_TYPE_UINT8 ) SWIG_From_unsigned_SS_int(idmef_value_get_uint8(value)); else if ( type == IDMEF_VALUE_TYPE_INT16 ) SWIG_From_int(idmef_value_get_int16(value)); else if ( type == IDMEF_VALUE_TYPE_UINT16 ) SWIG_From_unsigned_SS_int(idmef_value_get_uint16(value)); else if ( type == IDMEF_VALUE_TYPE_INT32 ) SWIG_From_int(idmef_value_get_int32(value)); else if ( type == IDMEF_VALUE_TYPE_UINT32 ) SWIG_From_unsigned_SS_int(idmef_value_get_uint32(value)); else if ( type == IDMEF_VALUE_TYPE_INT64 ) SWIG_From_long_SS_long(idmef_value_get_int64(value)); else if ( type == IDMEF_VALUE_TYPE_UINT64 ) SWIG_From_unsigned_SS_long_SS_long(idmef_value_get_uint64(value)); else if ( type == IDMEF_VALUE_TYPE_FLOAT ) SWIG_From_float(idmef_value_get_float(value)); else if ( type == IDMEF_VALUE_TYPE_DOUBLE ) SWIG_From_double(idmef_value_get_double(value)); else if ( type == IDMEF_VALUE_TYPE_ENUM ) { const char *s = idmef_class_enum_to_string(idmef_value_get_class(value), idmef_value_get_enum(value)); SWIG_FromCharPtr(s); } else if ( type == IDMEF_VALUE_TYPE_TIME ) { Prelude::IDMEFTime *time = new Prelude::IDMEFTime(idmef_time_ref(idmef_value_get_time(value))); SWIG_NewPointerObj(L, time, SWIGTYPE_p_Prelude__IDMEFTime, 1); } else if ( type == IDMEF_VALUE_TYPE_LIST ) ret = IDMEFValueList_to_SWIG(L, result); else if ( type == IDMEF_VALUE_TYPE_DATA ) { idmef_data_t *d = idmef_value_get_data(value); idmef_data_type_t t = idmef_data_get_type(d); if ( t == IDMEF_DATA_TYPE_CHAR || t == IDMEF_DATA_TYPE_CHAR_STRING || t == IDMEF_DATA_TYPE_BYTE || t == IDMEF_DATA_TYPE_BYTE_STRING ) SWIG_FromCharPtrAndSize((const char *)idmef_data_get_data(d), idmef_data_get_len(d)); else if ( t == IDMEF_DATA_TYPE_FLOAT ) SWIG_From_float(idmef_data_get_float(d)); else if ( t == IDMEF_DATA_TYPE_UINT32 ) SWIG_From_unsigned_SS_int(idmef_data_get_uint32(d)); else if ( t == IDMEF_DATA_TYPE_UINT64 ) SWIG_From_unsigned_SS_long_SS_long(idmef_data_get_uint64(d)); } else return -1; return ret; } static int _wrap_IDMEFValue_Clone(lua_State* L) { int SWIG_arg = 0; Prelude::IDMEFValue *arg1 = (Prelude::IDMEFValue *) 0 ; Prelude::IDMEFValue result; SWIG_check_num_args("Clone",1,1) if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Clone",1,"Prelude::IDMEFValue const *"); if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Prelude__IDMEFValue,0))){ SWIG_fail_ptr("IDMEFValue_Clone",1,SWIGTYPE_p_Prelude__IDMEFValue); } try { result = ((Prelude::IDMEFValue const *)arg1)->Clone(); } catch(Prelude::PreludeError &_e) { SWIG_exception(SWIG_RuntimeError, (&_e)->what()); } { int ret; if ( (&result)->IsNull() ) { lua_pushnil(L); SWIG_arg = 1; } else { SWIG_arg = IDMEFValue_to_SWIG(L, result); if ( SWIG_arg < 0 ) { std::stringstream s; s << "IDMEFValue typemap does not handle value of type '" << idmef_value_type_to_string((&result)->GetType()) << "'"; SWIG_exception(SWIG_ValueError, s.str().c_str()); } } } return SWIG_arg; if(0) SWIG_fail; fail: lua_error(L); return SWIG_arg; } static void swig_delete_IDMEFValue(void *obj) { Prelude::IDMEFValue *arg1 = (Prelude::IDMEFValue *) obj; delete arg1; } static swig_lua_method swig_Prelude_IDMEFValue_methods[] = { {"GetType", _wrap_IDMEFValue_GetType}, {"IsNull", _wrap_IDMEFValue_IsNull}, {"Match", _wrap_IDMEFValue_Match}, {"Clone", _wrap_IDMEFValue_Clone}, {0,0} }; static swig_lua_attribute swig_Prelude_IDMEFValue_attributes[] = { {0,0,0} }; static swig_lua_class *swig_Prelude_IDMEFValue_bases[] = {0}; static const char *swig_Prelude_IDMEFValue_base_names[] = {0}; static swig_lua_class _wrap_class_Prelude_IDMEFValue = { "IDMEFValue", &SWIGTYPE_p_Prelude__IDMEFValue,_wrap_new_IDMEFValue, swig_delete_IDMEFValue, swig_Prelude_IDMEFValue_methods, swig_Prelude_IDMEFValue_attributes, swig_Prelude_IDMEFValue_bases, swig_Prelude_IDMEFValue_base_names }; static int _wrap_new_IDMEFPath__SWIG_0(lua_State* L) { int SWIG_arg = 0; char *arg1 = (char *) 0 ; Prelude::IDMEFPath *result = 0 ; SWIG_check_num_args("Prelude::IDMEFPath",1,1) if(!lua_isstring(L,1)) SWIG_fail_arg("Prelude::IDMEFPath",1,"char const *"); arg1 = (char *)lua_tostring(L, 1); try { result = (Prelude::IDMEFPath *)new Prelude::IDMEFPath((char const *)arg1); } catch(Prelude::PreludeError &_e) { SWIG_exception(SWIG_RuntimeError, (&_e)->what()); } SWIG_NewPointerObj(L,result,SWIGTYPE_p_Prelude__IDMEFPath,1); SWIG_arg++; return SWIG_arg; if(0) SWIG_fail; fail: lua_error(L); return SWIG_arg; } static int _wrap_new_IDMEFPath__SWIG_1(lua_State* L) { int SWIG_arg = 0; idmef_path_t *arg1 = (idmef_path_t *) 0 ; Prelude::IDMEFPath *result = 0 ; SWIG_check_num_args("Prelude::IDMEFPath",1,1) if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Prelude::IDMEFPath",1,"idmef_path_t *"); if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_idmef_path_t,0))){ SWIG_fail_ptr("new_IDMEFPath",1,SWIGTYPE_p_idmef_path_t); } try { result = (Prelude::IDMEFPath *)new Prelude::IDMEFPath(arg1); } catch(Prelude::PreludeError &_e) { SWIG_exception(SWIG_RuntimeError, (&_e)->what()); } SWIG_NewPointerObj(L,result,SWIGTYPE_p_Prelude__IDMEFPath,1); SWIG_arg++; return SWIG_arg; if(0) SWIG_fail; fail: lua_error(L); return SWIG_arg; } static int _wrap_new_IDMEFPath__SWIG_2(lua_State* L) { int SWIG_arg = 0; Prelude::IDMEFPath *arg1 = 0 ; Prelude::IDMEFPath *result = 0 ; SWIG_check_num_args("Prelude::IDMEFPath",1,1) if(!lua_isuserdata(L,1)) SWIG_fail_arg("Prelude::IDMEFPath",1,"Prelude::IDMEFPath const &"); if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Prelude__IDMEFPath,0))){ SWIG_fail_ptr("new_IDMEFPath",1,SWIGTYPE_p_Prelude__IDMEFPath); } try { result = (Prelude::IDMEFPath *)new Prelude::IDMEFPath((Prelude::IDMEFPath const &)*arg1); } catch(Prelude::PreludeError &_e) { SWIG_exception(SWIG_RuntimeError, (&_e)->what()); } SWIG_NewPointerObj(L,result,SWIGTYPE_p_Prelude__IDMEFPath,1); SWIG_arg++; return SWIG_arg; if(0) SWIG_fail; fail: lua_error(L); return SWIG_arg; } static int _wrap_new_IDMEFPath(lua_State* L) { int argc; int argv[2]={ 1,2 }; argc = lua_gettop(L); if (argc == 1) { int _v; { void *ptr; if (SWIG_isptrtype(L,argv[0])==0 || SWIG_ConvertPtr(L,argv[0], (void **) &ptr, SWIGTYPE_p_idmef_path_t, 0)) { _v = 0; } else { _v = 1; } } if (_v) { return _wrap_new_IDMEFPath__SWIG_1(L); } } if (argc == 1) { int _v; { void *ptr; if (lua_isuserdata(L,argv[0])==0 || SWIG_ConvertPtr(L,argv[0], (void **) &ptr, SWIGTYPE_p_Prelude__IDMEFPath, 0)) { _v = 0; } else { _v = 1; } } if (_v) { return _wrap_new_IDMEFPath__SWIG_2(L); } } if (argc == 1) { int _v; { _v = lua_isstring(L,argv[0]); } if (_v) { return _wrap_new_IDMEFPath__SWIG_0(L); } } lua_pushstring(L,"Wrong arguments for overloaded function 'new_IDMEFPath'\n" " Possible C/C++ prototypes are:\n" " Prelude::IDMEFPath(char const *)\n" " Prelude::IDMEFPath(idmef_path_t *)\n" " Prelude::IDMEFPath(Prelude::IDMEFPath const &)\n"); lua_error(L);return 0; } static int _wrap_IDMEFPath_Get(lua_State* L) { int SWIG_arg = 0; Prelude::IDMEFPath *arg1 = (Prelude::IDMEFPath *) 0 ; Prelude::IDMEF *arg2 = 0 ; Prelude::IDMEFValue result; SWIG_check_num_args("Get",2,2) if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Get",1,"Prelude::IDMEFPath *"); if(!lua_isuserdata(L,2)) SWIG_fail_arg("Get",2,"Prelude::IDMEF &"); if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Prelude__IDMEFPath,0))){ SWIG_fail_ptr("IDMEFPath_Get",1,SWIGTYPE_p_Prelude__IDMEFPath); } if (!SWIG_IsOK(SWIG_ConvertPtr(L,2,(void**)&arg2,SWIGTYPE_p_Prelude__IDMEF,0))){ SWIG_fail_ptr("IDMEFPath_Get",2,SWIGTYPE_p_Prelude__IDMEF); } try { result = (arg1)->Get(*arg2); } catch(Prelude::PreludeError &_e) { SWIG_exception(SWIG_RuntimeError, (&_e)->what()); } { int ret; if ( (&result)->IsNull() ) { lua_pushnil(L); SWIG_arg = 1; } else { SWIG_arg = IDMEFValue_to_SWIG(L, result); if ( SWIG_arg < 0 ) { std::stringstream s; s << "IDMEFValue typemap does not handle value of type '" << idmef_value_type_to_string((&result)->GetType()) << "'"; SWIG_exception(SWIG_ValueError, s.str().c_str()); } } } return SWIG_arg; if(0) SWIG_fail; fail: lua_error(L); return SWIG_arg; } static int _wrap_IDMEFPath_Set__SWIG_0(lua_State* L) { int SWIG_arg = 0; Prelude::IDMEFPath *arg1 = (Prelude::IDMEFPath *) 0 ; Prelude::IDMEF *arg2 = 0 ; std::vector< Prelude::IDMEFValue > arg3 ; std::vector< Prelude::IDMEFValue > *argp3 ; SWIG_check_num_args("Set",3,3) if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Set",1,"Prelude::IDMEFPath *"); if(!lua_isuserdata(L,2)) SWIG_fail_arg("Set",2,"Prelude::IDMEF &"); if(!lua_isuserdata(L,3)) SWIG_fail_arg("Set",3,"std::vector< Prelude::IDMEFValue >"); if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Prelude__IDMEFPath,0))){ SWIG_fail_ptr("IDMEFPath_Set",1,SWIGTYPE_p_Prelude__IDMEFPath); } if (!SWIG_IsOK(SWIG_ConvertPtr(L,2,(void**)&arg2,SWIGTYPE_p_Prelude__IDMEF,0))){ SWIG_fail_ptr("IDMEFPath_Set",2,SWIGTYPE_p_Prelude__IDMEF); } if (!SWIG_IsOK(SWIG_ConvertPtr(L,3,(void**)&argp3,SWIGTYPE_p_std__vectorT_Prelude__IDMEFValue_t,0))){ SWIG_fail_ptr("IDMEFPath_Set",3,SWIGTYPE_p_std__vectorT_Prelude__IDMEFValue_t); } arg3 = *argp3; try { (arg1)->Set(*arg2,arg3); } catch(Prelude::PreludeError &_e) { SWIG_exception(SWIG_RuntimeError, (&_e)->what()); } return SWIG_arg; if(0) SWIG_fail; fail: lua_error(L); return SWIG_arg; } static int _wrap_IDMEFPath_Set__SWIG_1(lua_State* L) { int SWIG_arg = 0; Prelude::IDMEFPath *arg1 = (Prelude::IDMEFPath *) 0 ; Prelude::IDMEF *arg2 = 0 ; Prelude::IDMEFValue *arg3 = (Prelude::IDMEFValue *) 0 ; SWIG_check_num_args("Set",3,3) if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Set",1,"Prelude::IDMEFPath *"); if(!lua_isuserdata(L,2)) SWIG_fail_arg("Set",2,"Prelude::IDMEF &"); if(!SWIG_isptrtype(L,3)) SWIG_fail_arg("Set",3,"Prelude::IDMEFValue *"); if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Prelude__IDMEFPath,0))){ SWIG_fail_ptr("IDMEFPath_Set",1,SWIGTYPE_p_Prelude__IDMEFPath); } if (!SWIG_IsOK(SWIG_ConvertPtr(L,2,(void**)&arg2,SWIGTYPE_p_Prelude__IDMEF,0))){ SWIG_fail_ptr("IDMEFPath_Set",2,SWIGTYPE_p_Prelude__IDMEF); } if (!SWIG_IsOK(SWIG_ConvertPtr(L,3,(void**)&arg3,SWIGTYPE_p_Prelude__IDMEFValue,0))){ SWIG_fail_ptr("IDMEFPath_Set",3,SWIGTYPE_p_Prelude__IDMEFValue); } try { (arg1)->Set(*arg2,arg3); } catch(Prelude::PreludeError &_e) { SWIG_exception(SWIG_RuntimeError, (&_e)->what()); } return SWIG_arg; if(0) SWIG_fail; fail: lua_error(L); return SWIG_arg; } static int _wrap_IDMEFPath_Set__SWIG_2(lua_State* L) { int SWIG_arg = 0; Prelude::IDMEFPath *arg1 = (Prelude::IDMEFPath *) 0 ; Prelude::IDMEF *arg2 = 0 ; Prelude::IDMEFTime *arg3 = 0 ; SWIG_check_num_args("Set",3,3) if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Set",1,"Prelude::IDMEFPath *"); if(!lua_isuserdata(L,2)) SWIG_fail_arg("Set",2,"Prelude::IDMEF &"); if(!lua_isuserdata(L,3)) SWIG_fail_arg("Set",3,"Prelude::IDMEFTime &"); if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Prelude__IDMEFPath,0))){ SWIG_fail_ptr("IDMEFPath_Set",1,SWIGTYPE_p_Prelude__IDMEFPath); } if (!SWIG_IsOK(SWIG_ConvertPtr(L,2,(void**)&arg2,SWIGTYPE_p_Prelude__IDMEF,0))){ SWIG_fail_ptr("IDMEFPath_Set",2,SWIGTYPE_p_Prelude__IDMEF); } if (!SWIG_IsOK(SWIG_ConvertPtr(L,3,(void**)&arg3,SWIGTYPE_p_Prelude__IDMEFTime,0))){ SWIG_fail_ptr("IDMEFPath_Set",3,SWIGTYPE_p_Prelude__IDMEFTime); } try { (arg1)->Set(*arg2,*arg3); } catch(Prelude::PreludeError &_e) { SWIG_exception(SWIG_RuntimeError, (&_e)->what()); } return SWIG_arg; if(0) SWIG_fail; fail: lua_error(L); return SWIG_arg; } static int _wrap_IDMEFPath_Set__SWIG_3(lua_State* L) { int SWIG_arg = 0; Prelude::IDMEFPath *arg1 = (Prelude::IDMEFPath *) 0 ; Prelude::IDMEF *arg2 = 0 ; char *arg3 = (char *) 0 ; SWIG_check_num_args("Set",3,3) if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Set",1,"Prelude::IDMEFPath *"); if(!lua_isuserdata(L,2)) SWIG_fail_arg("Set",2,"Prelude::IDMEF &"); if(!lua_isstring(L,3)) SWIG_fail_arg("Set",3,"char const *"); if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Prelude__IDMEFPath,0))){ SWIG_fail_ptr("IDMEFPath_Set",1,SWIGTYPE_p_Prelude__IDMEFPath); } if (!SWIG_IsOK(SWIG_ConvertPtr(L,2,(void**)&arg2,SWIGTYPE_p_Prelude__IDMEF,0))){ SWIG_fail_ptr("IDMEFPath_Set",2,SWIGTYPE_p_Prelude__IDMEF); } arg3 = (char *)lua_tostring(L, 3); try { (arg1)->Set(*arg2,(char const *)arg3); } catch(Prelude::PreludeError &_e) { SWIG_exception(SWIG_RuntimeError, (&_e)->what()); } return SWIG_arg; if(0) SWIG_fail; fail: lua_error(L); return SWIG_arg; } static int _wrap_IDMEFPath_Set__SWIG_4(lua_State* L) { int SWIG_arg = 0; Prelude::IDMEFPath *arg1 = (Prelude::IDMEFPath *) 0 ; Prelude::IDMEF *arg2 = 0 ; double arg3 ; SWIG_check_num_args("Set",3,3) if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Set",1,"Prelude::IDMEFPath *"); if(!lua_isuserdata(L,2)) SWIG_fail_arg("Set",2,"Prelude::IDMEF &"); if(!lua_isnumber(L,3)) SWIG_fail_arg("Set",3,"double"); if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Prelude__IDMEFPath,0))){ SWIG_fail_ptr("IDMEFPath_Set",1,SWIGTYPE_p_Prelude__IDMEFPath); } if (!SWIG_IsOK(SWIG_ConvertPtr(L,2,(void**)&arg2,SWIGTYPE_p_Prelude__IDMEF,0))){ SWIG_fail_ptr("IDMEFPath_Set",2,SWIGTYPE_p_Prelude__IDMEF); } arg3 = (double)lua_tonumber(L, 3); try { (arg1)->Set(*arg2,arg3); } catch(Prelude::PreludeError &_e) { SWIG_exception(SWIG_RuntimeError, (&_e)->what()); } return SWIG_arg; if(0) SWIG_fail; fail: lua_error(L); return SWIG_arg; } static int _wrap_IDMEFPath_Set(lua_State* L) { int argc; int argv[4]={ 1,2,3,4 }; argc = lua_gettop(L); if (argc == 3) { int _v; { void *ptr; if (SWIG_isptrtype(L,argv[0])==0 || SWIG_ConvertPtr(L,argv[0], (void **) &ptr, SWIGTYPE_p_Prelude__IDMEFPath, 0)) { _v = 0; } else { _v = 1; } } if (_v) { { void *ptr; if (lua_isuserdata(L,argv[1])==0 || SWIG_ConvertPtr(L,argv[1], (void **) &ptr, SWIGTYPE_p_Prelude__IDMEF, 0)) { _v = 0; } else { _v = 1; } } if (_v) { { void *ptr; if (lua_isuserdata(L,argv[2])==0 || SWIG_ConvertPtr(L,argv[2], (void **) &ptr, SWIGTYPE_p_std__vectorT_Prelude__IDMEFValue_t, 0)) { _v = 0; } else { _v = 1; } } if (_v) { return _wrap_IDMEFPath_Set__SWIG_0(L); } } } } if (argc == 3) { int _v; { void *ptr; if (SWIG_isptrtype(L,argv[0])==0 || SWIG_ConvertPtr(L,argv[0], (void **) &ptr, SWIGTYPE_p_Prelude__IDMEFPath, 0)) { _v = 0; } else { _v = 1; } } if (_v) { { void *ptr; if (lua_isuserdata(L,argv[1])==0 || SWIG_ConvertPtr(L,argv[1], (void **) &ptr, SWIGTYPE_p_Prelude__IDMEF, 0)) { _v = 0; } else { _v = 1; } } if (_v) { { void *ptr; if (SWIG_isptrtype(L,argv[2])==0 || SWIG_ConvertPtr(L,argv[2], (void **) &ptr, SWIGTYPE_p_Prelude__IDMEFValue, 0)) { _v = 0; } else { _v = 1; } } if (_v) { return _wrap_IDMEFPath_Set__SWIG_1(L); } } } } if (argc == 3) { int _v; { void *ptr; if (SWIG_isptrtype(L,argv[0])==0 || SWIG_ConvertPtr(L,argv[0], (void **) &ptr, SWIGTYPE_p_Prelude__IDMEFPath, 0)) { _v = 0; } else { _v = 1; } } if (_v) { { void *ptr; if (lua_isuserdata(L,argv[1])==0 || SWIG_ConvertPtr(L,argv[1], (void **) &ptr, SWIGTYPE_p_Prelude__IDMEF, 0)) { _v = 0; } else { _v = 1; } } if (_v) { { void *ptr; if (lua_isuserdata(L,argv[2])==0 || SWIG_ConvertPtr(L,argv[2], (void **) &ptr, SWIGTYPE_p_Prelude__IDMEFTime, 0)) { _v = 0; } else { _v = 1; } } if (_v) { return _wrap_IDMEFPath_Set__SWIG_2(L); } } } } if (argc == 3) { int _v; { void *ptr; if (SWIG_isptrtype(L,argv[0])==0 || SWIG_ConvertPtr(L,argv[0], (void **) &ptr, SWIGTYPE_p_Prelude__IDMEFPath, 0)) { _v = 0; } else { _v = 1; } } if (_v) { { void *ptr; if (lua_isuserdata(L,argv[1])==0 || SWIG_ConvertPtr(L,argv[1], (void **) &ptr, SWIGTYPE_p_Prelude__IDMEF, 0)) { _v = 0; } else { _v = 1; } } if (_v) { { _v = lua_isnumber(L,argv[2]); } if (_v) { return _wrap_IDMEFPath_Set__SWIG_4(L); } } } } if (argc == 3) { int _v; { void *ptr; if (SWIG_isptrtype(L,argv[0])==0 || SWIG_ConvertPtr(L,argv[0], (void **) &ptr, SWIGTYPE_p_Prelude__IDMEFPath, 0)) { _v = 0; } else { _v = 1; } } if (_v) { { void *ptr; if (lua_isuserdata(L,argv[1])==0 || SWIG_ConvertPtr(L,argv[1], (void **) &ptr, SWIGTYPE_p_Prelude__IDMEF, 0)) { _v = 0; } else { _v = 1; } } if (_v) { { _v = lua_isstring(L,argv[2]); } if (_v) { return _wrap_IDMEFPath_Set__SWIG_3(L); } } } } lua_pushstring(L,"Wrong arguments for overloaded function 'IDMEFPath_Set'\n" " Possible C/C++ prototypes are:\n" " Set(Prelude::IDMEFPath *,Prelude::IDMEF &,std::vector< Prelude::IDMEFValue >)\n" " Set(Prelude::IDMEFPath *,Prelude::IDMEF &,Prelude::IDMEFValue *)\n" " Set(Prelude::IDMEFPath *,Prelude::IDMEF &,Prelude::IDMEFTime &)\n" " Set(Prelude::IDMEFPath *,Prelude::IDMEF &,char const *)\n" " Set(Prelude::IDMEFPath *,Prelude::IDMEF &,double)\n"); lua_error(L);return 0; } static int _wrap_IDMEFPath_GetClass__SWIG_0(lua_State* L) { int SWIG_arg = 0; Prelude::IDMEFPath *arg1 = (Prelude::IDMEFPath *) 0 ; int arg2 ; idmef_class_id_t result; SWIG_check_num_args("GetClass",2,2) if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("GetClass",1,"Prelude::IDMEFPath *"); if(!lua_isnumber(L,2)) SWIG_fail_arg("GetClass",2,"int"); if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Prelude__IDMEFPath,0))){ SWIG_fail_ptr("IDMEFPath_GetClass",1,SWIGTYPE_p_Prelude__IDMEFPath); } arg2 = (int)lua_tonumber(L, 2); try { result = (arg1)->GetClass(arg2); } catch(Prelude::PreludeError &_e) { SWIG_exception(SWIG_RuntimeError, (&_e)->what()); } { idmef_class_id_t * resultptr = new idmef_class_id_t((const idmef_class_id_t &) result); SWIG_NewPointerObj(L,(void *) resultptr,SWIGTYPE_p_idmef_class_id_t,1); SWIG_arg++; } return SWIG_arg; if(0) SWIG_fail; fail: lua_error(L); return SWIG_arg; } static int _wrap_IDMEFPath_GetClass__SWIG_1(lua_State* L) { int SWIG_arg = 0; Prelude::IDMEFPath *arg1 = (Prelude::IDMEFPath *) 0 ; idmef_class_id_t result; SWIG_check_num_args("GetClass",1,1) if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("GetClass",1,"Prelude::IDMEFPath *"); if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Prelude__IDMEFPath,0))){ SWIG_fail_ptr("IDMEFPath_GetClass",1,SWIGTYPE_p_Prelude__IDMEFPath); } try { result = (arg1)->GetClass(); } catch(Prelude::PreludeError &_e) { SWIG_exception(SWIG_RuntimeError, (&_e)->what()); } { idmef_class_id_t * resultptr = new idmef_class_id_t((const idmef_class_id_t &) result); SWIG_NewPointerObj(L,(void *) resultptr,SWIGTYPE_p_idmef_class_id_t,1); SWIG_arg++; } return SWIG_arg; if(0) SWIG_fail; fail: lua_error(L); return SWIG_arg; } static int _wrap_IDMEFPath_GetClass(lua_State* L) { int argc; int argv[3]={ 1,2,3 }; argc = lua_gettop(L); if (argc == 1) { int _v; { void *ptr; if (SWIG_isptrtype(L,argv[0])==0 || SWIG_ConvertPtr(L,argv[0], (void **) &ptr, SWIGTYPE_p_Prelude__IDMEFPath, 0)) { _v = 0; } else { _v = 1; } } if (_v) { return _wrap_IDMEFPath_GetClass__SWIG_1(L); } } if (argc == 2) { int _v; { void *ptr; if (SWIG_isptrtype(L,argv[0])==0 || SWIG_ConvertPtr(L,argv[0], (void **) &ptr, SWIGTYPE_p_Prelude__IDMEFPath, 0)) { _v = 0; } else { _v = 1; } } if (_v) { { _v = lua_isnumber(L,argv[1]); } if (_v) { return _wrap_IDMEFPath_GetClass__SWIG_0(L); } } } lua_pushstring(L,"Wrong arguments for overloaded function 'IDMEFPath_GetClass'\n" " Possible C/C++ prototypes are:\n" " GetClass(Prelude::IDMEFPath *,int)\n" " GetClass(Prelude::IDMEFPath *)\n"); lua_error(L);return 0; } static int _wrap_IDMEFPath_GetValueType__SWIG_0(lua_State* L) { int SWIG_arg = 0; Prelude::IDMEFPath *arg1 = (Prelude::IDMEFPath *) 0 ; int arg2 ; idmef_value_type_id_t result; SWIG_check_num_args("GetValueType",2,2) if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("GetValueType",1,"Prelude::IDMEFPath *"); if(!lua_isnumber(L,2)) SWIG_fail_arg("GetValueType",2,"int"); if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Prelude__IDMEFPath,0))){ SWIG_fail_ptr("IDMEFPath_GetValueType",1,SWIGTYPE_p_Prelude__IDMEFPath); } arg2 = (int)lua_tonumber(L, 2); try { result = (arg1)->GetValueType(arg2); } catch(Prelude::PreludeError &_e) { SWIG_exception(SWIG_RuntimeError, (&_e)->what()); } { idmef_value_type_id_t * resultptr = new idmef_value_type_id_t((const idmef_value_type_id_t &) result); SWIG_NewPointerObj(L,(void *) resultptr,SWIGTYPE_p_idmef_value_type_id_t,1); SWIG_arg++; } return SWIG_arg; if(0) SWIG_fail; fail: lua_error(L); return SWIG_arg; } static int _wrap_IDMEFPath_GetValueType__SWIG_1(lua_State* L) { int SWIG_arg = 0; Prelude::IDMEFPath *arg1 = (Prelude::IDMEFPath *) 0 ; idmef_value_type_id_t result; SWIG_check_num_args("GetValueType",1,1) if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("GetValueType",1,"Prelude::IDMEFPath *"); if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Prelude__IDMEFPath,0))){ SWIG_fail_ptr("IDMEFPath_GetValueType",1,SWIGTYPE_p_Prelude__IDMEFPath); } try { result = (arg1)->GetValueType(); } catch(Prelude::PreludeError &_e) { SWIG_exception(SWIG_RuntimeError, (&_e)->what()); } { idmef_value_type_id_t * resultptr = new idmef_value_type_id_t((const idmef_value_type_id_t &) result); SWIG_NewPointerObj(L,(void *) resultptr,SWIGTYPE_p_idmef_value_type_id_t,1); SWIG_arg++; } return SWIG_arg; if(0) SWIG_fail; fail: lua_error(L); return SWIG_arg; } static int _wrap_IDMEFPath_GetValueType(lua_State* L) { int argc; int argv[3]={ 1,2,3 }; argc = lua_gettop(L); if (argc == 1) { int _v; { void *ptr; if (SWIG_isptrtype(L,argv[0])==0 || SWIG_ConvertPtr(L,argv[0], (void **) &ptr, SWIGTYPE_p_Prelude__IDMEFPath, 0)) { _v = 0; } else { _v = 1; } } if (_v) { return _wrap_IDMEFPath_GetValueType__SWIG_1(L); } } if (argc == 2) { int _v; { void *ptr; if (SWIG_isptrtype(L,argv[0])==0 || SWIG_ConvertPtr(L,argv[0], (void **) &ptr, SWIGTYPE_p_Prelude__IDMEFPath, 0)) { _v = 0; } else { _v = 1; } } if (_v) { { _v = lua_isnumber(L,argv[1]); } if (_v) { return _wrap_IDMEFPath_GetValueType__SWIG_0(L); } } } lua_pushstring(L,"Wrong arguments for overloaded function 'IDMEFPath_GetValueType'\n" " Possible C/C++ prototypes are:\n" " GetValueType(Prelude::IDMEFPath *,int)\n" " GetValueType(Prelude::IDMEFPath *)\n"); lua_error(L);return 0; } static int _wrap_IDMEFPath_SetIndex__SWIG_0(lua_State* L) { int SWIG_arg = 0; Prelude::IDMEFPath *arg1 = (Prelude::IDMEFPath *) 0 ; unsigned int arg2 ; int arg3 ; int result; SWIG_check_num_args("SetIndex",3,3) if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("SetIndex",1,"Prelude::IDMEFPath *"); if(!lua_isnumber(L,2)) SWIG_fail_arg("SetIndex",2,"unsigned int"); if(!lua_isnumber(L,3)) SWIG_fail_arg("SetIndex",3,"int"); if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Prelude__IDMEFPath,0))){ SWIG_fail_ptr("IDMEFPath_SetIndex",1,SWIGTYPE_p_Prelude__IDMEFPath); } SWIG_contract_assert((lua_tonumber(L,2)>=0),"number must not be negative") arg2 = (unsigned int)lua_tonumber(L, 2); arg3 = (int)lua_tonumber(L, 3); try { result = (int)(arg1)->SetIndex(arg2,arg3); } catch(Prelude::PreludeError &_e) { SWIG_exception(SWIG_RuntimeError, (&_e)->what()); } lua_pushnumber(L, (lua_Number) result); SWIG_arg++; return SWIG_arg; if(0) SWIG_fail; fail: lua_error(L); return SWIG_arg; } static int _wrap_IDMEFPath_SetIndex__SWIG_1(lua_State* L) { int SWIG_arg = 0; Prelude::IDMEFPath *arg1 = (Prelude::IDMEFPath *) 0 ; unsigned int arg2 ; int result; SWIG_check_num_args("SetIndex",2,2) if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("SetIndex",1,"Prelude::IDMEFPath *"); if(!lua_isnumber(L,2)) SWIG_fail_arg("SetIndex",2,"unsigned int"); if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Prelude__IDMEFPath,0))){ SWIG_fail_ptr("IDMEFPath_SetIndex",1,SWIGTYPE_p_Prelude__IDMEFPath); } SWIG_contract_assert((lua_tonumber(L,2)>=0),"number must not be negative") arg2 = (unsigned int)lua_tonumber(L, 2); try { result = (int)(arg1)->SetIndex(arg2); } catch(Prelude::PreludeError &_e) { SWIG_exception(SWIG_RuntimeError, (&_e)->what()); } lua_pushnumber(L, (lua_Number) result); SWIG_arg++; return SWIG_arg; if(0) SWIG_fail; fail: lua_error(L); return SWIG_arg; } static int _wrap_IDMEFPath_SetIndex(lua_State* L) { int argc; int argv[4]={ 1,2,3,4 }; argc = lua_gettop(L); if (argc == 2) { int _v; { void *ptr; if (SWIG_isptrtype(L,argv[0])==0 || SWIG_ConvertPtr(L,argv[0], (void **) &ptr, SWIGTYPE_p_Prelude__IDMEFPath, 0)) { _v = 0; } else { _v = 1; } } if (_v) { { _v = lua_isnumber(L,argv[1]); } if (_v) { return _wrap_IDMEFPath_SetIndex__SWIG_1(L); } } } if (argc == 3) { int _v; { void *ptr; if (SWIG_isptrtype(L,argv[0])==0 || SWIG_ConvertPtr(L,argv[0], (void **) &ptr, SWIGTYPE_p_Prelude__IDMEFPath, 0)) { _v = 0; } else { _v = 1; } } if (_v) { { _v = lua_isnumber(L,argv[1]); } if (_v) { { _v = lua_isnumber(L,argv[2]); } if (_v) { return _wrap_IDMEFPath_SetIndex__SWIG_0(L); } } } } lua_pushstring(L,"Wrong arguments for overloaded function 'IDMEFPath_SetIndex'\n" " Possible C/C++ prototypes are:\n" " SetIndex(Prelude::IDMEFPath *,unsigned int,int)\n" " SetIndex(Prelude::IDMEFPath *,unsigned int)\n"); lua_error(L);return 0; } static int _wrap_IDMEFPath_UndefineIndex__SWIG_0(lua_State* L) { int SWIG_arg = 0; Prelude::IDMEFPath *arg1 = (Prelude::IDMEFPath *) 0 ; int arg2 ; int result; SWIG_check_num_args("UndefineIndex",2,2) if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("UndefineIndex",1,"Prelude::IDMEFPath *"); if(!lua_isnumber(L,2)) SWIG_fail_arg("UndefineIndex",2,"int"); if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Prelude__IDMEFPath,0))){ SWIG_fail_ptr("IDMEFPath_UndefineIndex",1,SWIGTYPE_p_Prelude__IDMEFPath); } arg2 = (int)lua_tonumber(L, 2); try { result = (int)(arg1)->UndefineIndex(arg2); } catch(Prelude::PreludeError &_e) { SWIG_exception(SWIG_RuntimeError, (&_e)->what()); } lua_pushnumber(L, (lua_Number) result); SWIG_arg++; return SWIG_arg; if(0) SWIG_fail; fail: lua_error(L); return SWIG_arg; } static int _wrap_IDMEFPath_UndefineIndex__SWIG_1(lua_State* L) { int SWIG_arg = 0; Prelude::IDMEFPath *arg1 = (Prelude::IDMEFPath *) 0 ; int result; SWIG_check_num_args("UndefineIndex",1,1) if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("UndefineIndex",1,"Prelude::IDMEFPath *"); if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Prelude__IDMEFPath,0))){ SWIG_fail_ptr("IDMEFPath_UndefineIndex",1,SWIGTYPE_p_Prelude__IDMEFPath); } try { result = (int)(arg1)->UndefineIndex(); } catch(Prelude::PreludeError &_e) { SWIG_exception(SWIG_RuntimeError, (&_e)->what()); } lua_pushnumber(L, (lua_Number) result); SWIG_arg++; return SWIG_arg; if(0) SWIG_fail; fail: lua_error(L); return SWIG_arg; } static int _wrap_IDMEFPath_UndefineIndex(lua_State* L) { int argc; int argv[3]={ 1,2,3 }; argc = lua_gettop(L); if (argc == 1) { int _v; { void *ptr; if (SWIG_isptrtype(L,argv[0])==0 || SWIG_ConvertPtr(L,argv[0], (void **) &ptr, SWIGTYPE_p_Prelude__IDMEFPath, 0)) { _v = 0; } else { _v = 1; } } if (_v) { return _wrap_IDMEFPath_UndefineIndex__SWIG_1(L); } } if (argc == 2) { int _v; { void *ptr; if (SWIG_isptrtype(L,argv[0])==0 || SWIG_ConvertPtr(L,argv[0], (void **) &ptr, SWIGTYPE_p_Prelude__IDMEFPath, 0)) { _v = 0; } else { _v = 1; } } if (_v) { { _v = lua_isnumber(L,argv[1]); } if (_v) { return _wrap_IDMEFPath_UndefineIndex__SWIG_0(L); } } } lua_pushstring(L,"Wrong arguments for overloaded function 'IDMEFPath_UndefineIndex'\n" " Possible C/C++ prototypes are:\n" " UndefineIndex(Prelude::IDMEFPath *,int)\n" " UndefineIndex(Prelude::IDMEFPath *)\n"); lua_error(L);return 0; } static int _wrap_IDMEFPath_GetIndex__SWIG_0(lua_State* L) { int SWIG_arg = 0; Prelude::IDMEFPath *arg1 = (Prelude::IDMEFPath *) 0 ; int arg2 ; int result; SWIG_check_num_args("GetIndex",2,2) if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("GetIndex",1,"Prelude::IDMEFPath *"); if(!lua_isnumber(L,2)) SWIG_fail_arg("GetIndex",2,"int"); if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Prelude__IDMEFPath,0))){ SWIG_fail_ptr("IDMEFPath_GetIndex",1,SWIGTYPE_p_Prelude__IDMEFPath); } arg2 = (int)lua_tonumber(L, 2); try { result = (int)(arg1)->GetIndex(arg2); } catch(Prelude::PreludeError &_e) { SWIG_exception(SWIG_RuntimeError, (&_e)->what()); } lua_pushnumber(L, (lua_Number) result); SWIG_arg++; return SWIG_arg; if(0) SWIG_fail; fail: lua_error(L); return SWIG_arg; } static int _wrap_IDMEFPath_GetIndex__SWIG_1(lua_State* L) { int SWIG_arg = 0; Prelude::IDMEFPath *arg1 = (Prelude::IDMEFPath *) 0 ; int result; SWIG_check_num_args("GetIndex",1,1) if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("GetIndex",1,"Prelude::IDMEFPath *"); if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Prelude__IDMEFPath,0))){ SWIG_fail_ptr("IDMEFPath_GetIndex",1,SWIGTYPE_p_Prelude__IDMEFPath); } try { result = (int)(arg1)->GetIndex(); } catch(Prelude::PreludeError &_e) { SWIG_exception(SWIG_RuntimeError, (&_e)->what()); } lua_pushnumber(L, (lua_Number) result); SWIG_arg++; return SWIG_arg; if(0) SWIG_fail; fail: lua_error(L); return SWIG_arg; } static int _wrap_IDMEFPath_GetIndex(lua_State* L) { int argc; int argv[3]={ 1,2,3 }; argc = lua_gettop(L); if (argc == 1) { int _v; { void *ptr; if (SWIG_isptrtype(L,argv[0])==0 || SWIG_ConvertPtr(L,argv[0], (void **) &ptr, SWIGTYPE_p_Prelude__IDMEFPath, 0)) { _v = 0; } else { _v = 1; } } if (_v) { return _wrap_IDMEFPath_GetIndex__SWIG_1(L); } } if (argc == 2) { int _v; { void *ptr; if (SWIG_isptrtype(L,argv[0])==0 || SWIG_ConvertPtr(L,argv[0], (void **) &ptr, SWIGTYPE_p_Prelude__IDMEFPath, 0)) { _v = 0; } else { _v = 1; } } if (_v) { { _v = lua_isnumber(L,argv[1]); } if (_v) { return _wrap_IDMEFPath_GetIndex__SWIG_0(L); } } } lua_pushstring(L,"Wrong arguments for overloaded function 'IDMEFPath_GetIndex'\n" " Possible C/C++ prototypes are:\n" " GetIndex(Prelude::IDMEFPath *,int)\n" " GetIndex(Prelude::IDMEFPath *)\n"); lua_error(L);return 0; } static int _wrap_IDMEFPath_MakeChild(lua_State* L) { int SWIG_arg = 0; Prelude::IDMEFPath *arg1 = (Prelude::IDMEFPath *) 0 ; char *arg2 = (char *) 0 ; unsigned int arg3 ; int result; SWIG_check_num_args("MakeChild",3,3) if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("MakeChild",1,"Prelude::IDMEFPath *"); if(!lua_isstring(L,2)) SWIG_fail_arg("MakeChild",2,"char const *"); if(!lua_isnumber(L,3)) SWIG_fail_arg("MakeChild",3,"unsigned int"); if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Prelude__IDMEFPath,0))){ SWIG_fail_ptr("IDMEFPath_MakeChild",1,SWIGTYPE_p_Prelude__IDMEFPath); } arg2 = (char *)lua_tostring(L, 2); SWIG_contract_assert((lua_tonumber(L,3)>=0),"number must not be negative") arg3 = (unsigned int)lua_tonumber(L, 3); try { result = (int)(arg1)->MakeChild((char const *)arg2,arg3); } catch(Prelude::PreludeError &_e) { SWIG_exception(SWIG_RuntimeError, (&_e)->what()); } lua_pushnumber(L, (lua_Number) result); SWIG_arg++; return SWIG_arg; if(0) SWIG_fail; fail: lua_error(L); return SWIG_arg; } static int _wrap_IDMEFPath_MakeParent(lua_State* L) { int SWIG_arg = 0; Prelude::IDMEFPath *arg1 = (Prelude::IDMEFPath *) 0 ; int result; SWIG_check_num_args("MakeParent",1,1) if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("MakeParent",1,"Prelude::IDMEFPath *"); if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Prelude__IDMEFPath,0))){ SWIG_fail_ptr("IDMEFPath_MakeParent",1,SWIGTYPE_p_Prelude__IDMEFPath); } try { result = (int)(arg1)->MakeParent(); } catch(Prelude::PreludeError &_e) { SWIG_exception(SWIG_RuntimeError, (&_e)->what()); } lua_pushnumber(L, (lua_Number) result); SWIG_arg++; return SWIG_arg; if(0) SWIG_fail; fail: lua_error(L); return SWIG_arg; } static int _wrap_IDMEFPath_Compare__SWIG_0(lua_State* L) { int SWIG_arg = 0; Prelude::IDMEFPath *arg1 = (Prelude::IDMEFPath *) 0 ; Prelude::IDMEFPath *arg2 = (Prelude::IDMEFPath *) 0 ; int arg3 ; int result; SWIG_check_num_args("Compare",3,3) if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Compare",1,"Prelude::IDMEFPath *"); if(!SWIG_isptrtype(L,2)) SWIG_fail_arg("Compare",2,"Prelude::IDMEFPath *"); if(!lua_isnumber(L,3)) SWIG_fail_arg("Compare",3,"int"); if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Prelude__IDMEFPath,0))){ SWIG_fail_ptr("IDMEFPath_Compare",1,SWIGTYPE_p_Prelude__IDMEFPath); } if (!SWIG_IsOK(SWIG_ConvertPtr(L,2,(void**)&arg2,SWIGTYPE_p_Prelude__IDMEFPath,0))){ SWIG_fail_ptr("IDMEFPath_Compare",2,SWIGTYPE_p_Prelude__IDMEFPath); } arg3 = (int)lua_tonumber(L, 3); try { result = (int)(arg1)->Compare(arg2,arg3); } catch(Prelude::PreludeError &_e) { SWIG_exception(SWIG_RuntimeError, (&_e)->what()); } lua_pushnumber(L, (lua_Number) result); SWIG_arg++; return SWIG_arg; if(0) SWIG_fail; fail: lua_error(L); return SWIG_arg; } static int _wrap_IDMEFPath_Compare__SWIG_1(lua_State* L) { int SWIG_arg = 0; Prelude::IDMEFPath *arg1 = (Prelude::IDMEFPath *) 0 ; Prelude::IDMEFPath *arg2 = (Prelude::IDMEFPath *) 0 ; int result; SWIG_check_num_args("Compare",2,2) if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Compare",1,"Prelude::IDMEFPath *"); if(!SWIG_isptrtype(L,2)) SWIG_fail_arg("Compare",2,"Prelude::IDMEFPath *"); if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Prelude__IDMEFPath,0))){ SWIG_fail_ptr("IDMEFPath_Compare",1,SWIGTYPE_p_Prelude__IDMEFPath); } if (!SWIG_IsOK(SWIG_ConvertPtr(L,2,(void**)&arg2,SWIGTYPE_p_Prelude__IDMEFPath,0))){ SWIG_fail_ptr("IDMEFPath_Compare",2,SWIGTYPE_p_Prelude__IDMEFPath); } try { result = (int)(arg1)->Compare(arg2); } catch(Prelude::PreludeError &_e) { SWIG_exception(SWIG_RuntimeError, (&_e)->what()); } lua_pushnumber(L, (lua_Number) result); SWIG_arg++; return SWIG_arg; if(0) SWIG_fail; fail: lua_error(L); return SWIG_arg; } static int _wrap_IDMEFPath_Compare(lua_State* L) { int argc; int argv[4]={ 1,2,3,4 }; argc = lua_gettop(L); if (argc == 2) { int _v; { void *ptr; if (SWIG_isptrtype(L,argv[0])==0 || SWIG_ConvertPtr(L,argv[0], (void **) &ptr, SWIGTYPE_p_Prelude__IDMEFPath, 0)) { _v = 0; } else { _v = 1; } } if (_v) { { void *ptr; if (SWIG_isptrtype(L,argv[1])==0 || SWIG_ConvertPtr(L,argv[1], (void **) &ptr, SWIGTYPE_p_Prelude__IDMEFPath, 0)) { _v = 0; } else { _v = 1; } } if (_v) { return _wrap_IDMEFPath_Compare__SWIG_1(L); } } } if (argc == 3) { int _v; { void *ptr; if (SWIG_isptrtype(L,argv[0])==0 || SWIG_ConvertPtr(L,argv[0], (void **) &ptr, SWIGTYPE_p_Prelude__IDMEFPath, 0)) { _v = 0; } else { _v = 1; } } if (_v) { { void *ptr; if (SWIG_isptrtype(L,argv[1])==0 || SWIG_ConvertPtr(L,argv[1], (void **) &ptr, SWIGTYPE_p_Prelude__IDMEFPath, 0)) { _v = 0; } else { _v = 1; } } if (_v) { { _v = lua_isnumber(L,argv[2]); } if (_v) { return _wrap_IDMEFPath_Compare__SWIG_0(L); } } } } lua_pushstring(L,"Wrong arguments for overloaded function 'IDMEFPath_Compare'\n" " Possible C/C++ prototypes are:\n" " Compare(Prelude::IDMEFPath *,Prelude::IDMEFPath *,int)\n" " Compare(Prelude::IDMEFPath *,Prelude::IDMEFPath *)\n"); lua_error(L);return 0; } static int _wrap_IDMEFPath_Clone(lua_State* L) { int SWIG_arg = 0; Prelude::IDMEFPath *arg1 = (Prelude::IDMEFPath *) 0 ; SwigValueWrapper< Prelude::IDMEFPath > result; SWIG_check_num_args("Clone",1,1) if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Clone",1,"Prelude::IDMEFPath *"); if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Prelude__IDMEFPath,0))){ SWIG_fail_ptr("IDMEFPath_Clone",1,SWIGTYPE_p_Prelude__IDMEFPath); } try { result = (arg1)->Clone(); } catch(Prelude::PreludeError &_e) { SWIG_exception(SWIG_RuntimeError, (&_e)->what()); } { Prelude::IDMEFPath * resultptr = new Prelude::IDMEFPath((const Prelude::IDMEFPath &) result); SWIG_NewPointerObj(L,(void *) resultptr,SWIGTYPE_p_Prelude__IDMEFPath,1); SWIG_arg++; } return SWIG_arg; if(0) SWIG_fail; fail: lua_error(L); return SWIG_arg; } static int _wrap_IDMEFPath_CheckOperator(lua_State* L) { int SWIG_arg = 0; Prelude::IDMEFPath *arg1 = (Prelude::IDMEFPath *) 0 ; idmef_criterion_operator_t arg2 ; idmef_criterion_operator_t *argp2 ; int result; SWIG_check_num_args("CheckOperator",2,2) if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("CheckOperator",1,"Prelude::IDMEFPath *"); if(!lua_isuserdata(L,2)) SWIG_fail_arg("CheckOperator",2,"idmef_criterion_operator_t"); if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Prelude__IDMEFPath,0))){ SWIG_fail_ptr("IDMEFPath_CheckOperator",1,SWIGTYPE_p_Prelude__IDMEFPath); } if (!SWIG_IsOK(SWIG_ConvertPtr(L,2,(void**)&argp2,SWIGTYPE_p_idmef_criterion_operator_t,0))){ SWIG_fail_ptr("IDMEFPath_CheckOperator",2,SWIGTYPE_p_idmef_criterion_operator_t); } arg2 = *argp2; try { result = (int)(arg1)->CheckOperator(arg2); } catch(Prelude::PreludeError &_e) { SWIG_exception(SWIG_RuntimeError, (&_e)->what()); } lua_pushnumber(L, (lua_Number) result); SWIG_arg++; return SWIG_arg; if(0) SWIG_fail; fail: lua_error(L); return SWIG_arg; } static int _wrap_IDMEFPath_GetApplicableOperators(lua_State* L) { int SWIG_arg = 0; Prelude::IDMEFPath *arg1 = (Prelude::IDMEFPath *) 0 ; idmef_criterion_operator_t result; SWIG_check_num_args("GetApplicableOperators",1,1) if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("GetApplicableOperators",1,"Prelude::IDMEFPath *"); if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Prelude__IDMEFPath,0))){ SWIG_fail_ptr("IDMEFPath_GetApplicableOperators",1,SWIGTYPE_p_Prelude__IDMEFPath); } try { result = (arg1)->GetApplicableOperators(); } catch(Prelude::PreludeError &_e) { SWIG_exception(SWIG_RuntimeError, (&_e)->what()); } { idmef_criterion_operator_t * resultptr = new idmef_criterion_operator_t((const idmef_criterion_operator_t &) result); SWIG_NewPointerObj(L,(void *) resultptr,SWIGTYPE_p_idmef_criterion_operator_t,1); SWIG_arg++; } return SWIG_arg; if(0) SWIG_fail; fail: lua_error(L); return SWIG_arg; } static int _wrap_IDMEFPath_GetName__SWIG_0(lua_State* L) { int SWIG_arg = 0; Prelude::IDMEFPath *arg1 = (Prelude::IDMEFPath *) 0 ; int arg2 ; char *result = 0 ; SWIG_check_num_args("GetName",2,2) if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("GetName",1,"Prelude::IDMEFPath *"); if(!lua_isnumber(L,2)) SWIG_fail_arg("GetName",2,"int"); if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Prelude__IDMEFPath,0))){ SWIG_fail_ptr("IDMEFPath_GetName",1,SWIGTYPE_p_Prelude__IDMEFPath); } arg2 = (int)lua_tonumber(L, 2); try { result = (char *)(arg1)->GetName(arg2); } catch(Prelude::PreludeError &_e) { SWIG_exception(SWIG_RuntimeError, (&_e)->what()); } lua_pushstring(L,(const char*)result); SWIG_arg++; return SWIG_arg; if(0) SWIG_fail; fail: lua_error(L); return SWIG_arg; } static int _wrap_IDMEFPath_GetName__SWIG_1(lua_State* L) { int SWIG_arg = 0; Prelude::IDMEFPath *arg1 = (Prelude::IDMEFPath *) 0 ; char *result = 0 ; SWIG_check_num_args("GetName",1,1) if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("GetName",1,"Prelude::IDMEFPath *"); if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Prelude__IDMEFPath,0))){ SWIG_fail_ptr("IDMEFPath_GetName",1,SWIGTYPE_p_Prelude__IDMEFPath); } try { result = (char *)(arg1)->GetName(); } catch(Prelude::PreludeError &_e) { SWIG_exception(SWIG_RuntimeError, (&_e)->what()); } lua_pushstring(L,(const char*)result); SWIG_arg++; return SWIG_arg; if(0) SWIG_fail; fail: lua_error(L); return SWIG_arg; } static int _wrap_IDMEFPath_GetName(lua_State* L) { int argc; int argv[3]={ 1,2,3 }; argc = lua_gettop(L); if (argc == 1) { int _v; { void *ptr; if (SWIG_isptrtype(L,argv[0])==0 || SWIG_ConvertPtr(L,argv[0], (void **) &ptr, SWIGTYPE_p_Prelude__IDMEFPath, 0)) { _v = 0; } else { _v = 1; } } if (_v) { return _wrap_IDMEFPath_GetName__SWIG_1(L); } } if (argc == 2) { int _v; { void *ptr; if (SWIG_isptrtype(L,argv[0])==0 || SWIG_ConvertPtr(L,argv[0], (void **) &ptr, SWIGTYPE_p_Prelude__IDMEFPath, 0)) { _v = 0; } else { _v = 1; } } if (_v) { { _v = lua_isnumber(L,argv[1]); } if (_v) { return _wrap_IDMEFPath_GetName__SWIG_0(L); } } } lua_pushstring(L,"Wrong arguments for overloaded function 'IDMEFPath_GetName'\n" " Possible C/C++ prototypes are:\n" " GetName(Prelude::IDMEFPath *,int)\n" " GetName(Prelude::IDMEFPath *)\n"); lua_error(L);return 0; } static int _wrap_IDMEFPath_IsAmbiguous(lua_State* L) { int SWIG_arg = 0; Prelude::IDMEFPath *arg1 = (Prelude::IDMEFPath *) 0 ; bool result; SWIG_check_num_args("IsAmbiguous",1,1) if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("IsAmbiguous",1,"Prelude::IDMEFPath *"); if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Prelude__IDMEFPath,0))){ SWIG_fail_ptr("IDMEFPath_IsAmbiguous",1,SWIGTYPE_p_Prelude__IDMEFPath); } try { result = (bool)(arg1)->IsAmbiguous(); } catch(Prelude::PreludeError &_e) { SWIG_exception(SWIG_RuntimeError, (&_e)->what()); } lua_pushboolean(L,(int)(result!=0)); SWIG_arg++; return SWIG_arg; if(0) SWIG_fail; fail: lua_error(L); return SWIG_arg; } static int _wrap_IDMEFPath_HasLists(lua_State* L) { int SWIG_arg = 0; Prelude::IDMEFPath *arg1 = (Prelude::IDMEFPath *) 0 ; int result; SWIG_check_num_args("HasLists",1,1) if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("HasLists",1,"Prelude::IDMEFPath *"); if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Prelude__IDMEFPath,0))){ SWIG_fail_ptr("IDMEFPath_HasLists",1,SWIGTYPE_p_Prelude__IDMEFPath); } try { result = (int)(arg1)->HasLists(); } catch(Prelude::PreludeError &_e) { SWIG_exception(SWIG_RuntimeError, (&_e)->what()); } lua_pushnumber(L, (lua_Number) result); SWIG_arg++; return SWIG_arg; if(0) SWIG_fail; fail: lua_error(L); return SWIG_arg; } static int _wrap_IDMEFPath_IsList__SWIG_0(lua_State* L) { int SWIG_arg = 0; Prelude::IDMEFPath *arg1 = (Prelude::IDMEFPath *) 0 ; int arg2 ; bool result; SWIG_check_num_args("IsList",2,2) if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("IsList",1,"Prelude::IDMEFPath *"); if(!lua_isnumber(L,2)) SWIG_fail_arg("IsList",2,"int"); if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Prelude__IDMEFPath,0))){ SWIG_fail_ptr("IDMEFPath_IsList",1,SWIGTYPE_p_Prelude__IDMEFPath); } arg2 = (int)lua_tonumber(L, 2); try { result = (bool)(arg1)->IsList(arg2); } catch(Prelude::PreludeError &_e) { SWIG_exception(SWIG_RuntimeError, (&_e)->what()); } lua_pushboolean(L,(int)(result!=0)); SWIG_arg++; return SWIG_arg; if(0) SWIG_fail; fail: lua_error(L); return SWIG_arg; } static int _wrap_IDMEFPath_IsList__SWIG_1(lua_State* L) { int SWIG_arg = 0; Prelude::IDMEFPath *arg1 = (Prelude::IDMEFPath *) 0 ; bool result; SWIG_check_num_args("IsList",1,1) if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("IsList",1,"Prelude::IDMEFPath *"); if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Prelude__IDMEFPath,0))){ SWIG_fail_ptr("IDMEFPath_IsList",1,SWIGTYPE_p_Prelude__IDMEFPath); } try { result = (bool)(arg1)->IsList(); } catch(Prelude::PreludeError &_e) { SWIG_exception(SWIG_RuntimeError, (&_e)->what()); } lua_pushboolean(L,(int)(result!=0)); SWIG_arg++; return SWIG_arg; if(0) SWIG_fail; fail: lua_error(L); return SWIG_arg; } static int _wrap_IDMEFPath_IsList(lua_State* L) { int argc; int argv[3]={ 1,2,3 }; argc = lua_gettop(L); if (argc == 1) { int _v; { void *ptr; if (SWIG_isptrtype(L,argv[0])==0 || SWIG_ConvertPtr(L,argv[0], (void **) &ptr, SWIGTYPE_p_Prelude__IDMEFPath, 0)) { _v = 0; } else { _v = 1; } } if (_v) { return _wrap_IDMEFPath_IsList__SWIG_1(L); } } if (argc == 2) { int _v; { void *ptr; if (SWIG_isptrtype(L,argv[0])==0 || SWIG_ConvertPtr(L,argv[0], (void **) &ptr, SWIGTYPE_p_Prelude__IDMEFPath, 0)) { _v = 0; } else { _v = 1; } } if (_v) { { _v = lua_isnumber(L,argv[1]); } if (_v) { return _wrap_IDMEFPath_IsList__SWIG_0(L); } } } lua_pushstring(L,"Wrong arguments for overloaded function 'IDMEFPath_IsList'\n" " Possible C/C++ prototypes are:\n" " IsList(Prelude::IDMEFPath *,int)\n" " IsList(Prelude::IDMEFPath *)\n"); lua_error(L);return 0; } static int _wrap_IDMEFPath_GetDepth(lua_State* L) { int SWIG_arg = 0; Prelude::IDMEFPath *arg1 = (Prelude::IDMEFPath *) 0 ; unsigned int result; SWIG_check_num_args("GetDepth",1,1) if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("GetDepth",1,"Prelude::IDMEFPath *"); if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Prelude__IDMEFPath,0))){ SWIG_fail_ptr("IDMEFPath_GetDepth",1,SWIGTYPE_p_Prelude__IDMEFPath); } try { result = (unsigned int)(arg1)->GetDepth(); } catch(Prelude::PreludeError &_e) { SWIG_exception(SWIG_RuntimeError, (&_e)->what()); } lua_pushnumber(L, (lua_Number) result); SWIG_arg++; return SWIG_arg; if(0) SWIG_fail; fail: lua_error(L); return SWIG_arg; } static void swig_delete_IDMEFPath(void *obj) { Prelude::IDMEFPath *arg1 = (Prelude::IDMEFPath *) obj; delete arg1; } static swig_lua_method swig_Prelude_IDMEFPath_methods[] = { {"Get", _wrap_IDMEFPath_Get}, {"Set", _wrap_IDMEFPath_Set}, {"GetClass", _wrap_IDMEFPath_GetClass}, {"GetValueType", _wrap_IDMEFPath_GetValueType}, {"SetIndex", _wrap_IDMEFPath_SetIndex}, {"UndefineIndex", _wrap_IDMEFPath_UndefineIndex}, {"GetIndex", _wrap_IDMEFPath_GetIndex}, {"MakeChild", _wrap_IDMEFPath_MakeChild}, {"MakeParent", _wrap_IDMEFPath_MakeParent}, {"Compare", _wrap_IDMEFPath_Compare}, {"Clone", _wrap_IDMEFPath_Clone}, {"CheckOperator", _wrap_IDMEFPath_CheckOperator}, {"GetApplicableOperators", _wrap_IDMEFPath_GetApplicableOperators}, {"GetName", _wrap_IDMEFPath_GetName}, {"IsAmbiguous", _wrap_IDMEFPath_IsAmbiguous}, {"HasLists", _wrap_IDMEFPath_HasLists}, {"IsList", _wrap_IDMEFPath_IsList}, {"GetDepth", _wrap_IDMEFPath_GetDepth}, {0,0} }; static swig_lua_attribute swig_Prelude_IDMEFPath_attributes[] = { {0,0,0} }; static swig_lua_class *swig_Prelude_IDMEFPath_bases[] = {0}; static const char *swig_Prelude_IDMEFPath_base_names[] = {0}; static swig_lua_class _wrap_class_Prelude_IDMEFPath = { "IDMEFPath", &SWIGTYPE_p_Prelude__IDMEFPath,_wrap_new_IDMEFPath, swig_delete_IDMEFPath, swig_Prelude_IDMEFPath_methods, swig_Prelude_IDMEFPath_attributes, swig_Prelude_IDMEFPath_bases, swig_Prelude_IDMEFPath_base_names }; static int _wrap_new_IDMEFTime__SWIG_0(lua_State* L) { int SWIG_arg = 0; Prelude::IDMEFTime *result = 0 ; SWIG_check_num_args("Prelude::IDMEFTime",0,0) try { result = (Prelude::IDMEFTime *)new Prelude::IDMEFTime(); } catch(Prelude::PreludeError &_e) { SWIG_exception(SWIG_RuntimeError, (&_e)->what()); } SWIG_NewPointerObj(L,result,SWIGTYPE_p_Prelude__IDMEFTime,1); SWIG_arg++; return SWIG_arg; if(0) SWIG_fail; fail: lua_error(L); return SWIG_arg; } static int _wrap_new_IDMEFTime__SWIG_1(lua_State* L) { int SWIG_arg = 0; idmef_time_t *arg1 = (idmef_time_t *) 0 ; Prelude::IDMEFTime *result = 0 ; SWIG_check_num_args("Prelude::IDMEFTime",1,1) if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Prelude::IDMEFTime",1,"idmef_time_t *"); if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_idmef_time_t,0))){ SWIG_fail_ptr("new_IDMEFTime",1,SWIGTYPE_p_idmef_time_t); } try { result = (Prelude::IDMEFTime *)new Prelude::IDMEFTime(arg1); } catch(Prelude::PreludeError &_e) { SWIG_exception(SWIG_RuntimeError, (&_e)->what()); } SWIG_NewPointerObj(L,result,SWIGTYPE_p_Prelude__IDMEFTime,1); SWIG_arg++; return SWIG_arg; if(0) SWIG_fail; fail: lua_error(L); return SWIG_arg; } static int _wrap_new_IDMEFTime__SWIG_2(lua_State* L) { int SWIG_arg = 0; time_t *arg1 = (time_t *) 0 ; Prelude::IDMEFTime *result = 0 ; SWIG_check_num_args("Prelude::IDMEFTime",1,1) if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Prelude::IDMEFTime",1,"time_t const *"); if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_time_t,0))){ SWIG_fail_ptr("new_IDMEFTime",1,SWIGTYPE_p_time_t); } try { result = (Prelude::IDMEFTime *)new Prelude::IDMEFTime((time_t const *)arg1); } catch(Prelude::PreludeError &_e) { SWIG_exception(SWIG_RuntimeError, (&_e)->what()); } SWIG_NewPointerObj(L,result,SWIGTYPE_p_Prelude__IDMEFTime,1); SWIG_arg++; return SWIG_arg; if(0) SWIG_fail; fail: lua_error(L); return SWIG_arg; } static int _wrap_new_IDMEFTime__SWIG_3(lua_State* L) { int SWIG_arg = 0; char *arg1 = (char *) 0 ; Prelude::IDMEFTime *result = 0 ; SWIG_check_num_args("Prelude::IDMEFTime",1,1) if(!lua_isstring(L,1)) SWIG_fail_arg("Prelude::IDMEFTime",1,"char const *"); arg1 = (char *)lua_tostring(L, 1); try { result = (Prelude::IDMEFTime *)new Prelude::IDMEFTime((char const *)arg1); } catch(Prelude::PreludeError &_e) { SWIG_exception(SWIG_RuntimeError, (&_e)->what()); } SWIG_NewPointerObj(L,result,SWIGTYPE_p_Prelude__IDMEFTime,1); SWIG_arg++; return SWIG_arg; if(0) SWIG_fail; fail: lua_error(L); return SWIG_arg; } static int _wrap_new_IDMEFTime__SWIG_4(lua_State* L) { int SWIG_arg = 0; timeval *arg1 = (timeval *) 0 ; Prelude::IDMEFTime *result = 0 ; SWIG_check_num_args("Prelude::IDMEFTime",1,1) if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Prelude::IDMEFTime",1,"timeval const *"); if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_timeval,0))){ SWIG_fail_ptr("new_IDMEFTime",1,SWIGTYPE_p_timeval); } try { result = (Prelude::IDMEFTime *)new Prelude::IDMEFTime((timeval const *)arg1); } catch(Prelude::PreludeError &_e) { SWIG_exception(SWIG_RuntimeError, (&_e)->what()); } SWIG_NewPointerObj(L,result,SWIGTYPE_p_Prelude__IDMEFTime,1); SWIG_arg++; return SWIG_arg; if(0) SWIG_fail; fail: lua_error(L); return SWIG_arg; } static int _wrap_new_IDMEFTime__SWIG_5(lua_State* L) { int SWIG_arg = 0; Prelude::IDMEFTime *arg1 = 0 ; Prelude::IDMEFTime *result = 0 ; SWIG_check_num_args("Prelude::IDMEFTime",1,1) if(!lua_isuserdata(L,1)) SWIG_fail_arg("Prelude::IDMEFTime",1,"Prelude::IDMEFTime const &"); if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Prelude__IDMEFTime,0))){ SWIG_fail_ptr("new_IDMEFTime",1,SWIGTYPE_p_Prelude__IDMEFTime); } try { result = (Prelude::IDMEFTime *)new Prelude::IDMEFTime((Prelude::IDMEFTime const &)*arg1); } catch(Prelude::PreludeError &_e) { SWIG_exception(SWIG_RuntimeError, (&_e)->what()); } SWIG_NewPointerObj(L,result,SWIGTYPE_p_Prelude__IDMEFTime,1); SWIG_arg++; return SWIG_arg; if(0) SWIG_fail; fail: lua_error(L); return SWIG_arg; } static int _wrap_new_IDMEFTime(lua_State* L) { int argc; int argv[2]={ 1,2 }; argc = lua_gettop(L); if (argc == 0) { return _wrap_new_IDMEFTime__SWIG_0(L); } if (argc == 1) { int _v; { void *ptr; if (SWIG_isptrtype(L,argv[0])==0 || SWIG_ConvertPtr(L,argv[0], (void **) &ptr, SWIGTYPE_p_idmef_time_t, 0)) { _v = 0; } else { _v = 1; } } if (_v) { return _wrap_new_IDMEFTime__SWIG_1(L); } } if (argc == 1) { int _v; { void *ptr; if (SWIG_isptrtype(L,argv[0])==0 || SWIG_ConvertPtr(L,argv[0], (void **) &ptr, SWIGTYPE_p_time_t, 0)) { _v = 0; } else { _v = 1; } } if (_v) { return _wrap_new_IDMEFTime__SWIG_2(L); } } if (argc == 1) { int _v; { void *ptr; if (SWIG_isptrtype(L,argv[0])==0 || SWIG_ConvertPtr(L,argv[0], (void **) &ptr, SWIGTYPE_p_timeval, 0)) { _v = 0; } else { _v = 1; } } if (_v) { return _wrap_new_IDMEFTime__SWIG_4(L); } } if (argc == 1) { int _v; { void *ptr; if (lua_isuserdata(L,argv[0])==0 || SWIG_ConvertPtr(L,argv[0], (void **) &ptr, SWIGTYPE_p_Prelude__IDMEFTime, 0)) { _v = 0; } else { _v = 1; } } if (_v) { return _wrap_new_IDMEFTime__SWIG_5(L); } } if (argc == 1) { int _v; { _v = lua_isstring(L,argv[0]); } if (_v) { return _wrap_new_IDMEFTime__SWIG_3(L); } } lua_pushstring(L,"Wrong arguments for overloaded function 'new_IDMEFTime'\n" " Possible C/C++ prototypes are:\n" " Prelude::IDMEFTime()\n" " Prelude::IDMEFTime(idmef_time_t *)\n" " Prelude::IDMEFTime(time_t const *)\n" " Prelude::IDMEFTime(char const *)\n" " Prelude::IDMEFTime(timeval const *)\n" " Prelude::IDMEFTime(Prelude::IDMEFTime const &)\n"); lua_error(L);return 0; } static int _wrap_IDMEFTime_Set__SWIG_0(lua_State* L) { int SWIG_arg = 0; Prelude::IDMEFTime *arg1 = (Prelude::IDMEFTime *) 0 ; SWIG_check_num_args("Set",1,1) if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Set",1,"Prelude::IDMEFTime *"); if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Prelude__IDMEFTime,0))){ SWIG_fail_ptr("IDMEFTime_Set",1,SWIGTYPE_p_Prelude__IDMEFTime); } try { (arg1)->Set(); } catch(Prelude::PreludeError &_e) { SWIG_exception(SWIG_RuntimeError, (&_e)->what()); } return SWIG_arg; if(0) SWIG_fail; fail: lua_error(L); return SWIG_arg; } static int _wrap_IDMEFTime_Set__SWIG_1(lua_State* L) { int SWIG_arg = 0; Prelude::IDMEFTime *arg1 = (Prelude::IDMEFTime *) 0 ; time_t *arg2 = (time_t *) 0 ; SWIG_check_num_args("Set",2,2) if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Set",1,"Prelude::IDMEFTime *"); if(!SWIG_isptrtype(L,2)) SWIG_fail_arg("Set",2,"time_t const *"); if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Prelude__IDMEFTime,0))){ SWIG_fail_ptr("IDMEFTime_Set",1,SWIGTYPE_p_Prelude__IDMEFTime); } if (!SWIG_IsOK(SWIG_ConvertPtr(L,2,(void**)&arg2,SWIGTYPE_p_time_t,0))){ SWIG_fail_ptr("IDMEFTime_Set",2,SWIGTYPE_p_time_t); } try { (arg1)->Set((time_t const *)arg2); } catch(Prelude::PreludeError &_e) { SWIG_exception(SWIG_RuntimeError, (&_e)->what()); } return SWIG_arg; if(0) SWIG_fail; fail: lua_error(L); return SWIG_arg; } static int _wrap_IDMEFTime_Set__SWIG_2(lua_State* L) { int SWIG_arg = 0; Prelude::IDMEFTime *arg1 = (Prelude::IDMEFTime *) 0 ; char *arg2 = (char *) 0 ; SWIG_check_num_args("Set",2,2) if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Set",1,"Prelude::IDMEFTime *"); if(!lua_isstring(L,2)) SWIG_fail_arg("Set",2,"char const *"); if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Prelude__IDMEFTime,0))){ SWIG_fail_ptr("IDMEFTime_Set",1,SWIGTYPE_p_Prelude__IDMEFTime); } arg2 = (char *)lua_tostring(L, 2); try { (arg1)->Set((char const *)arg2); } catch(Prelude::PreludeError &_e) { SWIG_exception(SWIG_RuntimeError, (&_e)->what()); } return SWIG_arg; if(0) SWIG_fail; fail: lua_error(L); return SWIG_arg; } static int _wrap_IDMEFTime_Set__SWIG_3(lua_State* L) { int SWIG_arg = 0; Prelude::IDMEFTime *arg1 = (Prelude::IDMEFTime *) 0 ; timeval *arg2 = (timeval *) 0 ; SWIG_check_num_args("Set",2,2) if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Set",1,"Prelude::IDMEFTime *"); if(!SWIG_isptrtype(L,2)) SWIG_fail_arg("Set",2,"timeval const *"); if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Prelude__IDMEFTime,0))){ SWIG_fail_ptr("IDMEFTime_Set",1,SWIGTYPE_p_Prelude__IDMEFTime); } if (!SWIG_IsOK(SWIG_ConvertPtr(L,2,(void**)&arg2,SWIGTYPE_p_timeval,0))){ SWIG_fail_ptr("IDMEFTime_Set",2,SWIGTYPE_p_timeval); } try { (arg1)->Set((timeval const *)arg2); } catch(Prelude::PreludeError &_e) { SWIG_exception(SWIG_RuntimeError, (&_e)->what()); } return SWIG_arg; if(0) SWIG_fail; fail: lua_error(L); return SWIG_arg; } static int _wrap_IDMEFTime_Set(lua_State* L) { int argc; int argv[3]={ 1,2,3 }; argc = lua_gettop(L); if (argc == 1) { int _v; { void *ptr; if (SWIG_isptrtype(L,argv[0])==0 || SWIG_ConvertPtr(L,argv[0], (void **) &ptr, SWIGTYPE_p_Prelude__IDMEFTime, 0)) { _v = 0; } else { _v = 1; } } if (_v) { return _wrap_IDMEFTime_Set__SWIG_0(L); } } if (argc == 2) { int _v; { void *ptr; if (SWIG_isptrtype(L,argv[0])==0 || SWIG_ConvertPtr(L,argv[0], (void **) &ptr, SWIGTYPE_p_Prelude__IDMEFTime, 0)) { _v = 0; } else { _v = 1; } } if (_v) { { void *ptr; if (SWIG_isptrtype(L,argv[1])==0 || SWIG_ConvertPtr(L,argv[1], (void **) &ptr, SWIGTYPE_p_time_t, 0)) { _v = 0; } else { _v = 1; } } if (_v) { return _wrap_IDMEFTime_Set__SWIG_1(L); } } } if (argc == 2) { int _v; { void *ptr; if (SWIG_isptrtype(L,argv[0])==0 || SWIG_ConvertPtr(L,argv[0], (void **) &ptr, SWIGTYPE_p_Prelude__IDMEFTime, 0)) { _v = 0; } else { _v = 1; } } if (_v) { { void *ptr; if (SWIG_isptrtype(L,argv[1])==0 || SWIG_ConvertPtr(L,argv[1], (void **) &ptr, SWIGTYPE_p_timeval, 0)) { _v = 0; } else { _v = 1; } } if (_v) { return _wrap_IDMEFTime_Set__SWIG_3(L); } } } if (argc == 2) { int _v; { void *ptr; if (SWIG_isptrtype(L,argv[0])==0 || SWIG_ConvertPtr(L,argv[0], (void **) &ptr, SWIGTYPE_p_Prelude__IDMEFTime, 0)) { _v = 0; } else { _v = 1; } } if (_v) { { _v = lua_isstring(L,argv[1]); } if (_v) { return _wrap_IDMEFTime_Set__SWIG_2(L); } } } lua_pushstring(L,"Wrong arguments for overloaded function 'IDMEFTime_Set'\n" " Possible C/C++ prototypes are:\n" " Set(Prelude::IDMEFTime *)\n" " Set(Prelude::IDMEFTime *,time_t const *)\n" " Set(Prelude::IDMEFTime *,char const *)\n" " Set(Prelude::IDMEFTime *,timeval const *)\n"); lua_error(L);return 0; } static int _wrap_IDMEFTime_SetSec(lua_State* L) { int SWIG_arg = 0; Prelude::IDMEFTime *arg1 = (Prelude::IDMEFTime *) 0 ; uint32_t arg2 ; SWIG_check_num_args("SetSec",2,2) if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("SetSec",1,"Prelude::IDMEFTime *"); if(!lua_isnumber(L,2)) SWIG_fail_arg("SetSec",2,"uint32_t"); if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Prelude__IDMEFTime,0))){ SWIG_fail_ptr("IDMEFTime_SetSec",1,SWIGTYPE_p_Prelude__IDMEFTime); } SWIG_contract_assert((lua_tonumber(L,2)>=0),"number must not be negative") arg2 = (uint32_t)lua_tonumber(L, 2); try { (arg1)->SetSec(arg2); } catch(Prelude::PreludeError &_e) { SWIG_exception(SWIG_RuntimeError, (&_e)->what()); } return SWIG_arg; if(0) SWIG_fail; fail: lua_error(L); return SWIG_arg; } static int _wrap_IDMEFTime_SetUSec(lua_State* L) { int SWIG_arg = 0; Prelude::IDMEFTime *arg1 = (Prelude::IDMEFTime *) 0 ; uint32_t arg2 ; SWIG_check_num_args("SetUSec",2,2) if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("SetUSec",1,"Prelude::IDMEFTime *"); if(!lua_isnumber(L,2)) SWIG_fail_arg("SetUSec",2,"uint32_t"); if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Prelude__IDMEFTime,0))){ SWIG_fail_ptr("IDMEFTime_SetUSec",1,SWIGTYPE_p_Prelude__IDMEFTime); } SWIG_contract_assert((lua_tonumber(L,2)>=0),"number must not be negative") arg2 = (uint32_t)lua_tonumber(L, 2); try { (arg1)->SetUSec(arg2); } catch(Prelude::PreludeError &_e) { SWIG_exception(SWIG_RuntimeError, (&_e)->what()); } return SWIG_arg; if(0) SWIG_fail; fail: lua_error(L); return SWIG_arg; } static int _wrap_IDMEFTime_SetGmtOffset(lua_State* L) { int SWIG_arg = 0; Prelude::IDMEFTime *arg1 = (Prelude::IDMEFTime *) 0 ; int32_t arg2 ; SWIG_check_num_args("SetGmtOffset",2,2) if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("SetGmtOffset",1,"Prelude::IDMEFTime *"); if(!lua_isnumber(L,2)) SWIG_fail_arg("SetGmtOffset",2,"int32_t"); if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Prelude__IDMEFTime,0))){ SWIG_fail_ptr("IDMEFTime_SetGmtOffset",1,SWIGTYPE_p_Prelude__IDMEFTime); } arg2 = (int32_t)lua_tonumber(L, 2); try { (arg1)->SetGmtOffset(arg2); } catch(Prelude::PreludeError &_e) { SWIG_exception(SWIG_RuntimeError, (&_e)->what()); } return SWIG_arg; if(0) SWIG_fail; fail: lua_error(L); return SWIG_arg; } static int _wrap_IDMEFTime_GetSec(lua_State* L) { int SWIG_arg = 0; Prelude::IDMEFTime *arg1 = (Prelude::IDMEFTime *) 0 ; uint32_t result; SWIG_check_num_args("GetSec",1,1) if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("GetSec",1,"Prelude::IDMEFTime const *"); if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Prelude__IDMEFTime,0))){ SWIG_fail_ptr("IDMEFTime_GetSec",1,SWIGTYPE_p_Prelude__IDMEFTime); } try { result = (uint32_t)((Prelude::IDMEFTime const *)arg1)->GetSec(); } catch(Prelude::PreludeError &_e) { SWIG_exception(SWIG_RuntimeError, (&_e)->what()); } lua_pushnumber(L, (lua_Number) result); SWIG_arg++; return SWIG_arg; if(0) SWIG_fail; fail: lua_error(L); return SWIG_arg; } static int _wrap_IDMEFTime_GetUSec(lua_State* L) { int SWIG_arg = 0; Prelude::IDMEFTime *arg1 = (Prelude::IDMEFTime *) 0 ; uint32_t result; SWIG_check_num_args("GetUSec",1,1) if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("GetUSec",1,"Prelude::IDMEFTime const *"); if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Prelude__IDMEFTime,0))){ SWIG_fail_ptr("IDMEFTime_GetUSec",1,SWIGTYPE_p_Prelude__IDMEFTime); } try { result = (uint32_t)((Prelude::IDMEFTime const *)arg1)->GetUSec(); } catch(Prelude::PreludeError &_e) { SWIG_exception(SWIG_RuntimeError, (&_e)->what()); } lua_pushnumber(L, (lua_Number) result); SWIG_arg++; return SWIG_arg; if(0) SWIG_fail; fail: lua_error(L); return SWIG_arg; } static int _wrap_IDMEFTime_GetGmtOffset(lua_State* L) { int SWIG_arg = 0; Prelude::IDMEFTime *arg1 = (Prelude::IDMEFTime *) 0 ; int32_t result; SWIG_check_num_args("GetGmtOffset",1,1) if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("GetGmtOffset",1,"Prelude::IDMEFTime const *"); if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Prelude__IDMEFTime,0))){ SWIG_fail_ptr("IDMEFTime_GetGmtOffset",1,SWIGTYPE_p_Prelude__IDMEFTime); } try { result = (int32_t)((Prelude::IDMEFTime const *)arg1)->GetGmtOffset(); } catch(Prelude::PreludeError &_e) { SWIG_exception(SWIG_RuntimeError, (&_e)->what()); } lua_pushnumber(L, (lua_Number) result); SWIG_arg++; return SWIG_arg; if(0) SWIG_fail; fail: lua_error(L); return SWIG_arg; } static int _wrap_IDMEFTime_Clone(lua_State* L) { int SWIG_arg = 0; Prelude::IDMEFTime *arg1 = (Prelude::IDMEFTime *) 0 ; Prelude::IDMEFTime result; SWIG_check_num_args("Clone",1,1) if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Clone",1,"Prelude::IDMEFTime *"); if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Prelude__IDMEFTime,0))){ SWIG_fail_ptr("IDMEFTime_Clone",1,SWIGTYPE_p_Prelude__IDMEFTime); } try { result = (arg1)->Clone(); } catch(Prelude::PreludeError &_e) { SWIG_exception(SWIG_RuntimeError, (&_e)->what()); } { Prelude::IDMEFTime * resultptr = new Prelude::IDMEFTime((const Prelude::IDMEFTime &) result); SWIG_NewPointerObj(L,(void *) resultptr,SWIGTYPE_p_Prelude__IDMEFTime,1); SWIG_arg++; } return SWIG_arg; if(0) SWIG_fail; fail: lua_error(L); return SWIG_arg; } static int _wrap_IDMEFTime_ToString(lua_State* L) { int SWIG_arg = 0; Prelude::IDMEFTime *arg1 = (Prelude::IDMEFTime *) 0 ; std::string result; SWIG_check_num_args("ToString",1,1) if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("ToString",1,"Prelude::IDMEFTime const *"); if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Prelude__IDMEFTime,0))){ SWIG_fail_ptr("IDMEFTime_ToString",1,SWIGTYPE_p_Prelude__IDMEFTime); } try { result = ((Prelude::IDMEFTime const *)arg1)->ToString(); } catch(Prelude::PreludeError &_e) { SWIG_exception(SWIG_RuntimeError, (&_e)->what()); } lua_pushlstring(L,(&result)->data(),(&result)->size()); SWIG_arg++; return SWIG_arg; if(0) SWIG_fail; fail: lua_error(L); return SWIG_arg; } static int _wrap_IDMEFTime___le(lua_State* L) { int SWIG_arg = 0; Prelude::IDMEFTime *arg1 = (Prelude::IDMEFTime *) 0 ; Prelude::IDMEFTime *arg2 = 0 ; bool result; SWIG_check_num_args("operator <=",2,2) if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("operator <=",1,"Prelude::IDMEFTime *"); if(!lua_isuserdata(L,2)) SWIG_fail_arg("operator <=",2,"Prelude::IDMEFTime const &"); if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Prelude__IDMEFTime,0))){ SWIG_fail_ptr("IDMEFTime___le",1,SWIGTYPE_p_Prelude__IDMEFTime); } if (!SWIG_IsOK(SWIG_ConvertPtr(L,2,(void**)&arg2,SWIGTYPE_p_Prelude__IDMEFTime,0))){ SWIG_fail_ptr("IDMEFTime___le",2,SWIGTYPE_p_Prelude__IDMEFTime); } try { result = (bool)(arg1)->operator <=((Prelude::IDMEFTime const &)*arg2); } catch(Prelude::PreludeError &_e) { SWIG_exception(SWIG_RuntimeError, (&_e)->what()); } lua_pushboolean(L,(int)(result!=0)); SWIG_arg++; return SWIG_arg; if(0) SWIG_fail; fail: lua_error(L); return SWIG_arg; } static int _wrap_IDMEFTime___eq(lua_State* L) { int SWIG_arg = 0; Prelude::IDMEFTime *arg1 = (Prelude::IDMEFTime *) 0 ; Prelude::IDMEFTime *arg2 = 0 ; bool result; SWIG_check_num_args("operator ==",2,2) if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("operator ==",1,"Prelude::IDMEFTime *"); if(!lua_isuserdata(L,2)) SWIG_fail_arg("operator ==",2,"Prelude::IDMEFTime const &"); if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Prelude__IDMEFTime,0))){ SWIG_fail_ptr("IDMEFTime___eq",1,SWIGTYPE_p_Prelude__IDMEFTime); } if (!SWIG_IsOK(SWIG_ConvertPtr(L,2,(void**)&arg2,SWIGTYPE_p_Prelude__IDMEFTime,0))){ SWIG_fail_ptr("IDMEFTime___eq",2,SWIGTYPE_p_Prelude__IDMEFTime); } try { result = (bool)(arg1)->operator ==((Prelude::IDMEFTime const &)*arg2); } catch(Prelude::PreludeError &_e) { SWIG_exception(SWIG_RuntimeError, (&_e)->what()); } lua_pushboolean(L,(int)(result!=0)); SWIG_arg++; return SWIG_arg; if(0) SWIG_fail; fail: lua_error(L); return SWIG_arg; } static int _wrap_IDMEFTime___lt(lua_State* L) { int SWIG_arg = 0; Prelude::IDMEFTime *arg1 = (Prelude::IDMEFTime *) 0 ; Prelude::IDMEFTime *arg2 = 0 ; bool result; SWIG_check_num_args("operator <",2,2) if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("operator <",1,"Prelude::IDMEFTime *"); if(!lua_isuserdata(L,2)) SWIG_fail_arg("operator <",2,"Prelude::IDMEFTime const &"); if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Prelude__IDMEFTime,0))){ SWIG_fail_ptr("IDMEFTime___lt",1,SWIGTYPE_p_Prelude__IDMEFTime); } if (!SWIG_IsOK(SWIG_ConvertPtr(L,2,(void**)&arg2,SWIGTYPE_p_Prelude__IDMEFTime,0))){ SWIG_fail_ptr("IDMEFTime___lt",2,SWIGTYPE_p_Prelude__IDMEFTime); } try { result = (bool)(arg1)->operator <((Prelude::IDMEFTime const &)*arg2); } catch(Prelude::PreludeError &_e) { SWIG_exception(SWIG_RuntimeError, (&_e)->what()); } lua_pushboolean(L,(int)(result!=0)); SWIG_arg++; return SWIG_arg; if(0) SWIG_fail; fail: lua_error(L); return SWIG_arg; } static int _wrap_IDMEFTime___tostring(lua_State* L) { int SWIG_arg = 0; Prelude::IDMEFTime *arg1 = (Prelude::IDMEFTime *) 0 ; char *result = 0 ; SWIG_check_num_args("__str__",1,1) if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("__str__",1,"Prelude::IDMEFTime *"); if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Prelude__IDMEFTime,0))){ SWIG_fail_ptr("IDMEFTime___tostring",1,SWIGTYPE_p_Prelude__IDMEFTime); } result = (char *)Prelude_IDMEFTime___str__(arg1); lua_pushstring(L,(const char*)result); SWIG_arg++; delete [] result; return SWIG_arg; if(0) SWIG_fail; fail: lua_error(L); return SWIG_arg; } static void swig_delete_IDMEFTime(void *obj) { Prelude::IDMEFTime *arg1 = (Prelude::IDMEFTime *) obj; delete arg1; } static swig_lua_method swig_Prelude_IDMEFTime_methods[] = { {"Set", _wrap_IDMEFTime_Set}, {"SetSec", _wrap_IDMEFTime_SetSec}, {"SetUSec", _wrap_IDMEFTime_SetUSec}, {"SetGmtOffset", _wrap_IDMEFTime_SetGmtOffset}, {"GetSec", _wrap_IDMEFTime_GetSec}, {"GetUSec", _wrap_IDMEFTime_GetUSec}, {"GetGmtOffset", _wrap_IDMEFTime_GetGmtOffset}, {"Clone", _wrap_IDMEFTime_Clone}, {"ToString", _wrap_IDMEFTime_ToString}, {"__le", _wrap_IDMEFTime___le}, {"__eq", _wrap_IDMEFTime___eq}, {"__lt", _wrap_IDMEFTime___lt}, {"__tostring", _wrap_IDMEFTime___tostring}, {0,0} }; static swig_lua_attribute swig_Prelude_IDMEFTime_attributes[] = { {0,0,0} }; static swig_lua_class *swig_Prelude_IDMEFTime_bases[] = {0}; static const char *swig_Prelude_IDMEFTime_base_names[] = {0}; static swig_lua_class _wrap_class_Prelude_IDMEFTime = { "IDMEFTime", &SWIGTYPE_p_Prelude__IDMEFTime,_wrap_new_IDMEFTime, swig_delete_IDMEFTime, swig_Prelude_IDMEFTime_methods, swig_Prelude_IDMEFTime_attributes, swig_Prelude_IDMEFTime_bases, swig_Prelude_IDMEFTime_base_names }; static int _wrap_new_IDMEF__SWIG_0(lua_State* L) { int SWIG_arg = 0; Prelude::IDMEF *result = 0 ; SWIG_check_num_args("Prelude::IDMEF",0,0) try { result = (Prelude::IDMEF *)new Prelude::IDMEF(); } catch(Prelude::PreludeError &_e) { SWIG_exception(SWIG_RuntimeError, (&_e)->what()); } SWIG_NewPointerObj(L,result,SWIGTYPE_p_Prelude__IDMEF,1); SWIG_arg++; return SWIG_arg; if(0) SWIG_fail; fail: lua_error(L); return SWIG_arg; } static int _wrap_new_IDMEF__SWIG_1(lua_State* L) { int SWIG_arg = 0; Prelude::IDMEF *arg1 = 0 ; Prelude::IDMEF *result = 0 ; SWIG_check_num_args("Prelude::IDMEF",1,1) if(!lua_isuserdata(L,1)) SWIG_fail_arg("Prelude::IDMEF",1,"Prelude::IDMEF const &"); if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Prelude__IDMEF,0))){ SWIG_fail_ptr("new_IDMEF",1,SWIGTYPE_p_Prelude__IDMEF); } try { result = (Prelude::IDMEF *)new Prelude::IDMEF((Prelude::IDMEF const &)*arg1); } catch(Prelude::PreludeError &_e) { SWIG_exception(SWIG_RuntimeError, (&_e)->what()); } SWIG_NewPointerObj(L,result,SWIGTYPE_p_Prelude__IDMEF,1); SWIG_arg++; return SWIG_arg; if(0) SWIG_fail; fail: lua_error(L); return SWIG_arg; } static int _wrap_new_IDMEF__SWIG_2(lua_State* L) { int SWIG_arg = 0; idmef_message_t *arg1 = (idmef_message_t *) 0 ; Prelude::IDMEF *result = 0 ; SWIG_check_num_args("Prelude::IDMEF",1,1) if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Prelude::IDMEF",1,"idmef_message_t *"); if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_idmef_message_t,0))){ SWIG_fail_ptr("new_IDMEF",1,SWIGTYPE_p_idmef_message_t); } try { result = (Prelude::IDMEF *)new Prelude::IDMEF(arg1); } catch(Prelude::PreludeError &_e) { SWIG_exception(SWIG_RuntimeError, (&_e)->what()); } SWIG_NewPointerObj(L,result,SWIGTYPE_p_Prelude__IDMEF,1); SWIG_arg++; return SWIG_arg; if(0) SWIG_fail; fail: lua_error(L); return SWIG_arg; } static int _wrap_new_IDMEF(lua_State* L) { int argc; int argv[2]={ 1,2 }; argc = lua_gettop(L); if (argc == 0) { return _wrap_new_IDMEF__SWIG_0(L); } if (argc == 1) { int _v; { void *ptr; if (lua_isuserdata(L,argv[0])==0 || SWIG_ConvertPtr(L,argv[0], (void **) &ptr, SWIGTYPE_p_Prelude__IDMEF, 0)) { _v = 0; } else { _v = 1; } } if (_v) { return _wrap_new_IDMEF__SWIG_1(L); } } if (argc == 1) { int _v; { void *ptr; if (SWIG_isptrtype(L,argv[0])==0 || SWIG_ConvertPtr(L,argv[0], (void **) &ptr, SWIGTYPE_p_idmef_message_t, 0)) { _v = 0; } else { _v = 1; } } if (_v) { return _wrap_new_IDMEF__SWIG_2(L); } } lua_pushstring(L,"Wrong arguments for overloaded function 'new_IDMEF'\n" " Possible C/C++ prototypes are:\n" " Prelude::IDMEF()\n" " Prelude::IDMEF(Prelude::IDMEF const &)\n" " Prelude::IDMEF(idmef_message_t *)\n"); lua_error(L);return 0; } static int _wrap_IDMEF_Set__SWIG_0(lua_State* L) { int SWIG_arg = 0; Prelude::IDMEF *arg1 = (Prelude::IDMEF *) 0 ; char *arg2 = (char *) 0 ; std::vector< Prelude::IDMEFValue > arg3 ; std::vector< Prelude::IDMEFValue > *argp3 ; SWIG_check_num_args("Set",3,3) if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Set",1,"Prelude::IDMEF *"); if(!lua_isstring(L,2)) SWIG_fail_arg("Set",2,"char const *"); if(!lua_isuserdata(L,3)) SWIG_fail_arg("Set",3,"std::vector< Prelude::IDMEFValue >"); if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Prelude__IDMEF,0))){ SWIG_fail_ptr("IDMEF_Set",1,SWIGTYPE_p_Prelude__IDMEF); } arg2 = (char *)lua_tostring(L, 2); if (!SWIG_IsOK(SWIG_ConvertPtr(L,3,(void**)&argp3,SWIGTYPE_p_std__vectorT_Prelude__IDMEFValue_t,0))){ SWIG_fail_ptr("IDMEF_Set",3,SWIGTYPE_p_std__vectorT_Prelude__IDMEFValue_t); } arg3 = *argp3; try { (arg1)->Set((char const *)arg2,arg3); } catch(Prelude::PreludeError &_e) { SWIG_exception(SWIG_RuntimeError, (&_e)->what()); } return SWIG_arg; if(0) SWIG_fail; fail: lua_error(L); return SWIG_arg; } static int _wrap_IDMEF_Set__SWIG_1(lua_State* L) { int SWIG_arg = 0; Prelude::IDMEF *arg1 = (Prelude::IDMEF *) 0 ; char *arg2 = (char *) 0 ; Prelude::IDMEFValue *arg3 = (Prelude::IDMEFValue *) 0 ; SWIG_check_num_args("Set",3,3) if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Set",1,"Prelude::IDMEF *"); if(!lua_isstring(L,2)) SWIG_fail_arg("Set",2,"char const *"); if(!SWIG_isptrtype(L,3)) SWIG_fail_arg("Set",3,"Prelude::IDMEFValue *"); if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Prelude__IDMEF,0))){ SWIG_fail_ptr("IDMEF_Set",1,SWIGTYPE_p_Prelude__IDMEF); } arg2 = (char *)lua_tostring(L, 2); if (!SWIG_IsOK(SWIG_ConvertPtr(L,3,(void**)&arg3,SWIGTYPE_p_Prelude__IDMEFValue,0))){ SWIG_fail_ptr("IDMEF_Set",3,SWIGTYPE_p_Prelude__IDMEFValue); } try { (arg1)->Set((char const *)arg2,arg3); } catch(Prelude::PreludeError &_e) { SWIG_exception(SWIG_RuntimeError, (&_e)->what()); } return SWIG_arg; if(0) SWIG_fail; fail: lua_error(L); return SWIG_arg; } static int _wrap_IDMEF_Set__SWIG_2(lua_State* L) { int SWIG_arg = 0; Prelude::IDMEF *arg1 = (Prelude::IDMEF *) 0 ; char *arg2 = (char *) 0 ; Prelude::IDMEFTime *arg3 = 0 ; SWIG_check_num_args("Set",3,3) if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Set",1,"Prelude::IDMEF *"); if(!lua_isstring(L,2)) SWIG_fail_arg("Set",2,"char const *"); if(!lua_isuserdata(L,3)) SWIG_fail_arg("Set",3,"Prelude::IDMEFTime &"); if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Prelude__IDMEF,0))){ SWIG_fail_ptr("IDMEF_Set",1,SWIGTYPE_p_Prelude__IDMEF); } arg2 = (char *)lua_tostring(L, 2); if (!SWIG_IsOK(SWIG_ConvertPtr(L,3,(void**)&arg3,SWIGTYPE_p_Prelude__IDMEFTime,0))){ SWIG_fail_ptr("IDMEF_Set",3,SWIGTYPE_p_Prelude__IDMEFTime); } try { (arg1)->Set((char const *)arg2,*arg3); } catch(Prelude::PreludeError &_e) { SWIG_exception(SWIG_RuntimeError, (&_e)->what()); } return SWIG_arg; if(0) SWIG_fail; fail: lua_error(L); return SWIG_arg; } static int _wrap_IDMEF_Set__SWIG_3(lua_State* L) { int SWIG_arg = 0; Prelude::IDMEF *arg1 = (Prelude::IDMEF *) 0 ; char *arg2 = (char *) 0 ; char *arg3 = (char *) 0 ; SWIG_check_num_args("Set",3,3) if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Set",1,"Prelude::IDMEF *"); if(!lua_isstring(L,2)) SWIG_fail_arg("Set",2,"char const *"); if(!lua_isstring(L,3)) SWIG_fail_arg("Set",3,"char const *"); if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Prelude__IDMEF,0))){ SWIG_fail_ptr("IDMEF_Set",1,SWIGTYPE_p_Prelude__IDMEF); } arg2 = (char *)lua_tostring(L, 2); arg3 = (char *)lua_tostring(L, 3); try { (arg1)->Set((char const *)arg2,(char const *)arg3); } catch(Prelude::PreludeError &_e) { SWIG_exception(SWIG_RuntimeError, (&_e)->what()); } return SWIG_arg; if(0) SWIG_fail; fail: lua_error(L); return SWIG_arg; } static int _wrap_IDMEF_Set__SWIG_4(lua_State* L) { int SWIG_arg = 0; Prelude::IDMEF *arg1 = (Prelude::IDMEF *) 0 ; char *arg2 = (char *) 0 ; double arg3 ; SWIG_check_num_args("Set",3,3) if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Set",1,"Prelude::IDMEF *"); if(!lua_isstring(L,2)) SWIG_fail_arg("Set",2,"char const *"); if(!lua_isnumber(L,3)) SWIG_fail_arg("Set",3,"double"); if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Prelude__IDMEF,0))){ SWIG_fail_ptr("IDMEF_Set",1,SWIGTYPE_p_Prelude__IDMEF); } arg2 = (char *)lua_tostring(L, 2); arg3 = (double)lua_tonumber(L, 3); try { (arg1)->Set((char const *)arg2,arg3); } catch(Prelude::PreludeError &_e) { SWIG_exception(SWIG_RuntimeError, (&_e)->what()); } return SWIG_arg; if(0) SWIG_fail; fail: lua_error(L); return SWIG_arg; } static int _wrap_IDMEF_Set(lua_State* L) { int argc; int argv[4]={ 1,2,3,4 }; argc = lua_gettop(L); if (argc == 3) { int _v; { void *ptr; if (SWIG_isptrtype(L,argv[0])==0 || SWIG_ConvertPtr(L,argv[0], (void **) &ptr, SWIGTYPE_p_Prelude__IDMEF, 0)) { _v = 0; } else { _v = 1; } } if (_v) { { _v = lua_isstring(L,argv[1]); } if (_v) { { void *ptr; if (lua_isuserdata(L,argv[2])==0 || SWIG_ConvertPtr(L,argv[2], (void **) &ptr, SWIGTYPE_p_std__vectorT_Prelude__IDMEFValue_t, 0)) { _v = 0; } else { _v = 1; } } if (_v) { return _wrap_IDMEF_Set__SWIG_0(L); } } } } if (argc == 3) { int _v; { void *ptr; if (SWIG_isptrtype(L,argv[0])==0 || SWIG_ConvertPtr(L,argv[0], (void **) &ptr, SWIGTYPE_p_Prelude__IDMEF, 0)) { _v = 0; } else { _v = 1; } } if (_v) { { _v = lua_isstring(L,argv[1]); } if (_v) { { void *ptr; if (SWIG_isptrtype(L,argv[2])==0 || SWIG_ConvertPtr(L,argv[2], (void **) &ptr, SWIGTYPE_p_Prelude__IDMEFValue, 0)) { _v = 0; } else { _v = 1; } } if (_v) { return _wrap_IDMEF_Set__SWIG_1(L); } } } } if (argc == 3) { int _v; { void *ptr; if (SWIG_isptrtype(L,argv[0])==0 || SWIG_ConvertPtr(L,argv[0], (void **) &ptr, SWIGTYPE_p_Prelude__IDMEF, 0)) { _v = 0; } else { _v = 1; } } if (_v) { { _v = lua_isstring(L,argv[1]); } if (_v) { { void *ptr; if (lua_isuserdata(L,argv[2])==0 || SWIG_ConvertPtr(L,argv[2], (void **) &ptr, SWIGTYPE_p_Prelude__IDMEFTime, 0)) { _v = 0; } else { _v = 1; } } if (_v) { return _wrap_IDMEF_Set__SWIG_2(L); } } } } if (argc == 3) { int _v; { void *ptr; if (SWIG_isptrtype(L,argv[0])==0 || SWIG_ConvertPtr(L,argv[0], (void **) &ptr, SWIGTYPE_p_Prelude__IDMEF, 0)) { _v = 0; } else { _v = 1; } } if (_v) { { _v = lua_isstring(L,argv[1]); } if (_v) { { _v = lua_isnumber(L,argv[2]); } if (_v) { return _wrap_IDMEF_Set__SWIG_4(L); } } } } if (argc == 3) { int _v; { void *ptr; if (SWIG_isptrtype(L,argv[0])==0 || SWIG_ConvertPtr(L,argv[0], (void **) &ptr, SWIGTYPE_p_Prelude__IDMEF, 0)) { _v = 0; } else { _v = 1; } } if (_v) { { _v = lua_isstring(L,argv[1]); } if (_v) { { _v = lua_isstring(L,argv[2]); } if (_v) { return _wrap_IDMEF_Set__SWIG_3(L); } } } } lua_pushstring(L,"Wrong arguments for overloaded function 'IDMEF_Set'\n" " Possible C/C++ prototypes are:\n" " Set(Prelude::IDMEF *,char const *,std::vector< Prelude::IDMEFValue >)\n" " Set(Prelude::IDMEF *,char const *,Prelude::IDMEFValue *)\n" " Set(Prelude::IDMEF *,char const *,Prelude::IDMEFTime &)\n" " Set(Prelude::IDMEF *,char const *,char const *)\n" " Set(Prelude::IDMEF *,char const *,double)\n"); lua_error(L);return 0; } static int _wrap_IDMEF_Get(lua_State* L) { int SWIG_arg = 0; Prelude::IDMEF *arg1 = (Prelude::IDMEF *) 0 ; char *arg2 = (char *) 0 ; Prelude::IDMEFValue result; SWIG_check_num_args("Get",2,2) if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Get",1,"Prelude::IDMEF *"); if(!lua_isstring(L,2)) SWIG_fail_arg("Get",2,"char const *"); if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Prelude__IDMEF,0))){ SWIG_fail_ptr("IDMEF_Get",1,SWIGTYPE_p_Prelude__IDMEF); } arg2 = (char *)lua_tostring(L, 2); try { result = (arg1)->Get((char const *)arg2); } catch(Prelude::PreludeError &_e) { SWIG_exception(SWIG_RuntimeError, (&_e)->what()); } { int ret; if ( (&result)->IsNull() ) { lua_pushnil(L); SWIG_arg = 1; } else { SWIG_arg = IDMEFValue_to_SWIG(L, result); if ( SWIG_arg < 0 ) { std::stringstream s; s << "IDMEFValue typemap does not handle value of type '" << idmef_value_type_to_string((&result)->GetType()) << "'"; SWIG_exception(SWIG_ValueError, s.str().c_str()); } } } return SWIG_arg; if(0) SWIG_fail; fail: lua_error(L); return SWIG_arg; } static int _wrap_IDMEF_Clone(lua_State* L) { int SWIG_arg = 0; Prelude::IDMEF *arg1 = (Prelude::IDMEF *) 0 ; Prelude::IDMEF *arg2 = 0 ; Prelude::IDMEF result; SWIG_check_num_args("Clone",2,2) if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Clone",1,"Prelude::IDMEF *"); if(!lua_isuserdata(L,2)) SWIG_fail_arg("Clone",2,"Prelude::IDMEF const &"); if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Prelude__IDMEF,0))){ SWIG_fail_ptr("IDMEF_Clone",1,SWIGTYPE_p_Prelude__IDMEF); } if (!SWIG_IsOK(SWIG_ConvertPtr(L,2,(void**)&arg2,SWIGTYPE_p_Prelude__IDMEF,0))){ SWIG_fail_ptr("IDMEF_Clone",2,SWIGTYPE_p_Prelude__IDMEF); } try { result = (arg1)->Clone((Prelude::IDMEF const &)*arg2); } catch(Prelude::PreludeError &_e) { SWIG_exception(SWIG_RuntimeError, (&_e)->what()); } { Prelude::IDMEF * resultptr = new Prelude::IDMEF((const Prelude::IDMEF &) result); SWIG_NewPointerObj(L,(void *) resultptr,SWIGTYPE_p_Prelude__IDMEF,1); SWIG_arg++; } return SWIG_arg; if(0) SWIG_fail; fail: lua_error(L); return SWIG_arg; } static int _wrap_IDMEF_ToString(lua_State* L) { int SWIG_arg = 0; Prelude::IDMEF *arg1 = (Prelude::IDMEF *) 0 ; std::string result; SWIG_check_num_args("ToString",1,1) if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("ToString",1,"Prelude::IDMEF const *"); if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Prelude__IDMEF,0))){ SWIG_fail_ptr("IDMEF_ToString",1,SWIGTYPE_p_Prelude__IDMEF); } try { result = ((Prelude::IDMEF const *)arg1)->ToString(); } catch(Prelude::PreludeError &_e) { SWIG_exception(SWIG_RuntimeError, (&_e)->what()); } lua_pushlstring(L,(&result)->data(),(&result)->size()); SWIG_arg++; return SWIG_arg; if(0) SWIG_fail; fail: lua_error(L); return SWIG_arg; } static int _wrap_IDMEF___tostring(lua_State* L) { int SWIG_arg = 0; Prelude::IDMEF *arg1 = (Prelude::IDMEF *) 0 ; char *result = 0 ; SWIG_check_num_args("__str__",1,1) if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("__str__",1,"Prelude::IDMEF *"); if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Prelude__IDMEF,0))){ SWIG_fail_ptr("IDMEF___tostring",1,SWIGTYPE_p_Prelude__IDMEF); } result = (char *)Prelude_IDMEF___str__(arg1); lua_pushstring(L,(const char*)result); SWIG_arg++; delete [] result; return SWIG_arg; if(0) SWIG_fail; fail: lua_error(L); return SWIG_arg; } static int _wrap_IDMEF_Write(lua_State* L) { int SWIG_arg = 0; Prelude::IDMEF *arg1 = (Prelude::IDMEF *) 0 ; void *arg2 = (void *) 0 ; SWIG_check_num_args("Write",2,2) if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Write",1,"Prelude::IDMEF *"); if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Prelude__IDMEF,0))){ SWIG_fail_ptr("IDMEF_Write",1,SWIGTYPE_p_Prelude__IDMEF); } { FILE **pf; pf = (FILE **)lua_touserdata(L, 2); if (pf == NULL) { lua_pushstring(L,"Argument is not a file"); SWIG_fail; } arg2 = *pf; } Prelude_IDMEF_Write(arg1,arg2); return SWIG_arg; if(0) SWIG_fail; fail: lua_error(L); return SWIG_arg; } static int _wrap_IDMEF_Read(lua_State* L) { int SWIG_arg = 0; Prelude::IDMEF *arg1 = (Prelude::IDMEF *) 0 ; void *arg2 = (void *) 0 ; SWIG_check_num_args("Read",2,2) if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Read",1,"Prelude::IDMEF *"); if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Prelude__IDMEF,0))){ SWIG_fail_ptr("IDMEF_Read",1,SWIGTYPE_p_Prelude__IDMEF); } { FILE **pf; pf = (FILE **)lua_touserdata(L, 2); if (pf == NULL) { lua_pushstring(L,"Argument is not a file"); SWIG_fail; } arg2 = *pf; } Prelude_IDMEF_Read(arg1,arg2); return SWIG_arg; if(0) SWIG_fail; fail: lua_error(L); return SWIG_arg; } static void swig_delete_IDMEF(void *obj) { Prelude::IDMEF *arg1 = (Prelude::IDMEF *) obj; delete arg1; } static swig_lua_method swig_Prelude_IDMEF_methods[] = { {"Set", _wrap_IDMEF_Set}, {"Get", _wrap_IDMEF_Get}, {"Clone", _wrap_IDMEF_Clone}, {"ToString", _wrap_IDMEF_ToString}, {"__tostring", _wrap_IDMEF___tostring}, {"Write", _wrap_IDMEF_Write}, {"Read", _wrap_IDMEF_Read}, {0,0} }; static swig_lua_attribute swig_Prelude_IDMEF_attributes[] = { {0,0,0} }; static swig_lua_class *swig_Prelude_IDMEF_bases[] = {0}; static const char *swig_Prelude_IDMEF_base_names[] = {0}; static swig_lua_class _wrap_class_Prelude_IDMEF = { "IDMEF", &SWIGTYPE_p_Prelude__IDMEF,_wrap_new_IDMEF, swig_delete_IDMEF, swig_Prelude_IDMEF_methods, swig_Prelude_IDMEF_attributes, swig_Prelude_IDMEF_bases, swig_Prelude_IDMEF_base_names }; #ifdef __cplusplus } #endif static const struct luaL_reg swig_commands[] = { { "CheckVersion",_wrap_CheckVersion}, { "PreludeLog_SetLevel", _wrap_PreludeLog_SetLevel}, { "PreludeLog_SetDebugLevel", _wrap_PreludeLog_SetDebugLevel}, { "PreludeLog_SetFlags", _wrap_PreludeLog_SetFlags}, { "PreludeLog_GetFlags", _wrap_PreludeLog_GetFlags}, { "PreludeLog_SetLogfile", _wrap_PreludeLog_SetLogfile}, { "PreludeLog_SetCallback", _wrap_PreludeLog_SetCallback}, { "Client_SetRecvTimeout", _wrap_Client_SetRecvTimeout}, {0,0} }; static swig_lua_var_info swig_variables[] = { {0,0,0} }; static swig_lua_const_info swig_constants[] = { { SWIG_LUA_INT, (char *)"PreludeLog_DEBUG", (long) Prelude::PreludeLog::DEBUG, 0, 0, 0}, { SWIG_LUA_INT, (char *)"PreludeLog_INFO", (long) Prelude::PreludeLog::INFO, 0, 0, 0}, { SWIG_LUA_INT, (char *)"PreludeLog_WARNING", (long) Prelude::PreludeLog::WARNING, 0, 0, 0}, { SWIG_LUA_INT, (char *)"PreludeLog_ERROR", (long) Prelude::PreludeLog::ERROR, 0, 0, 0}, { SWIG_LUA_INT, (char *)"PreludeLog_CRITICAL", (long) Prelude::PreludeLog::CRITICAL, 0, 0, 0}, { SWIG_LUA_INT, (char *)"PreludeLog_QUIET", (long) Prelude::PreludeLog::QUIET, 0, 0, 0}, { SWIG_LUA_INT, (char *)"PreludeLog_SYSLOG", (long) Prelude::PreludeLog::SYSLOG, 0, 0, 0}, { SWIG_LUA_INT, (char *)"Client_ASYNC_SEND", (long) Prelude::Client::ASYNC_SEND, 0, 0, 0}, { SWIG_LUA_INT, (char *)"Client_FLAGS_ASYNC_SEND", (long) Prelude::Client::FLAGS_ASYNC_SEND, 0, 0, 0}, { SWIG_LUA_INT, (char *)"Client_ASYNC_TIMER", (long) Prelude::Client::ASYNC_TIMER, 0, 0, 0}, { SWIG_LUA_INT, (char *)"Client_FLAGS_ASYNC_TIMER", (long) Prelude::Client::FLAGS_ASYNC_TIMER, 0, 0, 0}, { SWIG_LUA_INT, (char *)"Client_HEARTBEAT", (long) Prelude::Client::HEARTBEAT, 0, 0, 0}, { SWIG_LUA_INT, (char *)"Client_FLAGS_HEARTBEAT", (long) Prelude::Client::FLAGS_HEARTBEAT, 0, 0, 0}, { SWIG_LUA_INT, (char *)"Client_CONNECT", (long) Prelude::Client::CONNECT, 0, 0, 0}, { SWIG_LUA_INT, (char *)"Client_FLAGS_CONNECT", (long) Prelude::Client::FLAGS_CONNECT, 0, 0, 0}, { SWIG_LUA_INT, (char *)"Client_AUTOCONFIG", (long) Prelude::Client::AUTOCONFIG, 0, 0, 0}, { SWIG_LUA_INT, (char *)"Client_FLAGS_AUTOCONFIG", (long) Prelude::Client::FLAGS_AUTOCONFIG, 0, 0, 0}, { SWIG_LUA_INT, (char *)"Client_IDMEF_READ", (long) Prelude::Client::IDMEF_READ, 0, 0, 0}, { SWIG_LUA_INT, (char *)"Client_PERMISSION_IDMEF_READ", (long) Prelude::Client::PERMISSION_IDMEF_READ, 0, 0, 0}, { SWIG_LUA_INT, (char *)"Client_ADMIN_READ", (long) Prelude::Client::ADMIN_READ, 0, 0, 0}, { SWIG_LUA_INT, (char *)"Client_PERMISSION_ADMIN_READ", (long) Prelude::Client::PERMISSION_ADMIN_READ, 0, 0, 0}, { SWIG_LUA_INT, (char *)"Client_IDMEF_WRITE", (long) Prelude::Client::IDMEF_WRITE, 0, 0, 0}, { SWIG_LUA_INT, (char *)"Client_PERMISSION_IDMEF_WRITE", (long) Prelude::Client::PERMISSION_IDMEF_WRITE, 0, 0, 0}, { SWIG_LUA_INT, (char *)"Client_ADMIN_WRITE", (long) Prelude::Client::ADMIN_WRITE, 0, 0, 0}, { SWIG_LUA_INT, (char *)"Client_PERMISSION_ADMIN_WRITE", (long) Prelude::Client::PERMISSION_ADMIN_WRITE, 0, 0, 0}, { SWIG_LUA_INT, (char *)"IDMEFCriterion_OPERATOR_NOT", (long) Prelude::IDMEFCriterion::OPERATOR_NOT, 0, 0, 0}, { SWIG_LUA_INT, (char *)"IDMEFCriterion_OPERATOR_NOCASE", (long) Prelude::IDMEFCriterion::OPERATOR_NOCASE, 0, 0, 0}, { SWIG_LUA_INT, (char *)"IDMEFCriterion_OPERATOR_EQUAL", (long) Prelude::IDMEFCriterion::OPERATOR_EQUAL, 0, 0, 0}, { SWIG_LUA_INT, (char *)"IDMEFCriterion_OPERATOR_EQUAL_NOCASE", (long) Prelude::IDMEFCriterion::OPERATOR_EQUAL_NOCASE, 0, 0, 0}, { SWIG_LUA_INT, (char *)"IDMEFCriterion_OPERATOR_NOT_EQUAL", (long) Prelude::IDMEFCriterion::OPERATOR_NOT_EQUAL, 0, 0, 0}, { SWIG_LUA_INT, (char *)"IDMEFCriterion_OPERATOR_NOT_EQUAL_NOCASE", (long) Prelude::IDMEFCriterion::OPERATOR_NOT_EQUAL_NOCASE, 0, 0, 0}, { SWIG_LUA_INT, (char *)"IDMEFCriterion_OPERATOR_LESSER", (long) Prelude::IDMEFCriterion::OPERATOR_LESSER, 0, 0, 0}, { SWIG_LUA_INT, (char *)"IDMEFCriterion_OPERATOR_LESSER_OR_EQUAL", (long) Prelude::IDMEFCriterion::OPERATOR_LESSER_OR_EQUAL, 0, 0, 0}, { SWIG_LUA_INT, (char *)"IDMEFCriterion_OPERATOR_GREATER", (long) Prelude::IDMEFCriterion::OPERATOR_GREATER, 0, 0, 0}, { SWIG_LUA_INT, (char *)"IDMEFCriterion_OPERATOR_GREATER_OR_EQUAL", (long) Prelude::IDMEFCriterion::OPERATOR_GREATER_OR_EQUAL, 0, 0, 0}, { SWIG_LUA_INT, (char *)"IDMEFCriterion_OPERATOR_SUBSTR", (long) Prelude::IDMEFCriterion::OPERATOR_SUBSTR, 0, 0, 0}, { SWIG_LUA_INT, (char *)"IDMEFCriterion_OPERATOR_SUBSTR_NOCASE", (long) Prelude::IDMEFCriterion::OPERATOR_SUBSTR_NOCASE, 0, 0, 0}, { SWIG_LUA_INT, (char *)"IDMEFCriterion_OPERATOR_NOT_SUBSTR", (long) Prelude::IDMEFCriterion::OPERATOR_NOT_SUBSTR, 0, 0, 0}, { SWIG_LUA_INT, (char *)"IDMEFCriterion_OPERATOR_NOT_SUBSTR_NOCASE", (long) Prelude::IDMEFCriterion::OPERATOR_NOT_SUBSTR_NOCASE, 0, 0, 0}, { SWIG_LUA_INT, (char *)"IDMEFCriterion_OPERATOR_REGEX", (long) Prelude::IDMEFCriterion::OPERATOR_REGEX, 0, 0, 0}, { SWIG_LUA_INT, (char *)"IDMEFCriterion_OPERATOR_REGEX_NOCASE", (long) Prelude::IDMEFCriterion::OPERATOR_REGEX_NOCASE, 0, 0, 0}, { SWIG_LUA_INT, (char *)"IDMEFCriterion_OPERATOR_NOT_REGEX", (long) Prelude::IDMEFCriterion::OPERATOR_NOT_REGEX, 0, 0, 0}, { SWIG_LUA_INT, (char *)"IDMEFCriterion_OPERATOR_NOT_REGEX_NOCASE", (long) Prelude::IDMEFCriterion::OPERATOR_NOT_REGEX_NOCASE, 0, 0, 0}, { SWIG_LUA_INT, (char *)"IDMEFCriterion_OPERATOR_NULL", (long) Prelude::IDMEFCriterion::OPERATOR_NULL, 0, 0, 0}, { SWIG_LUA_INT, (char *)"IDMEFCriterion_OPERATOR_NOT_NULL", (long) Prelude::IDMEFCriterion::OPERATOR_NOT_NULL, 0, 0, 0}, {0,0,0,0,0,0} }; /* -------- TYPE CONVERSION AND EQUIVALENCE RULES (BEGIN) -------- */ static void *_p_Prelude__ClientTo_p_Prelude__ClientProfile(void *x, int *SWIGUNUSEDPARM(newmemory)) { return (void *)((Prelude::ClientProfile *) ((Prelude::Client *) x)); } static void *_p_Prelude__ClientEasyTo_p_Prelude__ClientProfile(void *x, int *SWIGUNUSEDPARM(newmemory)) { return (void *)((Prelude::ClientProfile *) (Prelude::Client *) ((Prelude::ClientEasy *) x)); } static void *_p_Prelude__PreludeErrorTo_p_std__exception(void *x, int *SWIGUNUSEDPARM(newmemory)) { return (void *)((std::exception *) ((Prelude::PreludeError *) x)); } static void *_p_Prelude__ClientEasyTo_p_Prelude__Client(void *x, int *SWIGUNUSEDPARM(newmemory)) { return (void *)((Prelude::Client *) ((Prelude::ClientEasy *) x)); } static swig_type_info _swigt__p_Prelude__Client = {"_p_Prelude__Client", "Prelude::Client *", 0, 0, (void*)&_wrap_class_Prelude_Client, 0}; static swig_type_info _swigt__p_Prelude__ClientEasy = {"_p_Prelude__ClientEasy", "Prelude::ClientEasy *", 0, 0, (void*)&_wrap_class_Prelude_ClientEasy, 0}; static swig_type_info _swigt__p_Prelude__ClientProfile = {"_p_Prelude__ClientProfile", "Prelude::ClientProfile *", 0, 0, (void*)&_wrap_class_Prelude_ClientProfile, 0}; static swig_type_info _swigt__p_Prelude__Connection = {"_p_Prelude__Connection", "Prelude::Connection *", 0, 0, (void*)&_wrap_class_Prelude_Connection, 0}; static swig_type_info _swigt__p_Prelude__ConnectionPool = {"_p_Prelude__ConnectionPool", "Prelude::ConnectionPool *", 0, 0, (void*)&_wrap_class_Prelude_ConnectionPool, 0}; static swig_type_info _swigt__p_Prelude__IDMEF = {"_p_Prelude__IDMEF", "Prelude::IDMEF *", 0, 0, (void*)&_wrap_class_Prelude_IDMEF, 0}; static swig_type_info _swigt__p_Prelude__IDMEFCriteria = {"_p_Prelude__IDMEFCriteria", "Prelude::IDMEFCriteria *", 0, 0, (void*)&_wrap_class_Prelude_IDMEFCriteria, 0}; static swig_type_info _swigt__p_Prelude__IDMEFCriterion = {"_p_Prelude__IDMEFCriterion", "Prelude::IDMEFCriterion *", 0, 0, (void*)&_wrap_class_Prelude_IDMEFCriterion, 0}; static swig_type_info _swigt__p_Prelude__IDMEFPath = {"_p_Prelude__IDMEFPath", "Prelude::IDMEFPath *", 0, 0, (void*)&_wrap_class_Prelude_IDMEFPath, 0}; static swig_type_info _swigt__p_Prelude__IDMEFTime = {"_p_Prelude__IDMEFTime", "Prelude::IDMEFTime *", 0, 0, (void*)&_wrap_class_Prelude_IDMEFTime, 0}; static swig_type_info _swigt__p_Prelude__IDMEFValue = {"_p_Prelude__IDMEFValue", "Prelude::IDMEFValue *", 0, 0, (void*)&_wrap_class_Prelude_IDMEFValue, 0}; static swig_type_info _swigt__p_Prelude__PreludeError = {"_p_Prelude__PreludeError", "Prelude::PreludeError *", 0, 0, (void*)&_wrap_class_Prelude_PreludeError, 0}; static swig_type_info _swigt__p_Prelude__PreludeLog = {"_p_Prelude__PreludeLog", "Prelude::PreludeLog *", 0, 0, (void*)&_wrap_class_Prelude_PreludeLog, 0}; static swig_type_info _swigt__p_char = {"_p_char", "char *|int8_t *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_f_int_p_q_const__char__void = {"_p_f_int_p_q_const__char__void", "void (*)(int,char const *)", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_idmef_class_id_t = {"_p_idmef_class_id_t", "idmef_class_id_t *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_idmef_criteria_t = {"_p_idmef_criteria_t", "idmef_criteria_t *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_idmef_criterion_operator_t = {"_p_idmef_criterion_operator_t", "idmef_criterion_operator_t *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_idmef_message_t = {"_p_idmef_message_t", "idmef_message_t *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_idmef_path_t = {"_p_idmef_path_t", "idmef_path_t *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_idmef_time_t = {"_p_idmef_time_t", "idmef_time_t *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_idmef_value_t = {"_p_idmef_value_t", "idmef_value_t *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_idmef_value_type_id_t = {"_p_idmef_value_type_id_t", "idmef_value_type_id_t *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_int = {"_p_int", "int *|int32_t *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_long_long = {"_p_long_long", "int64_t *|long long *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_prelude_client_profile_t = {"_p_prelude_client_profile_t", "prelude_client_profile_t *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_prelude_client_t = {"_p_prelude_client_t", "prelude_client_t *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_prelude_connection_pool_t = {"_p_prelude_connection_pool_t", "prelude_connection_pool_t *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_prelude_connection_t = {"_p_prelude_connection_t", "prelude_connection_t *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_short = {"_p_short", "short *|int16_t *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_std__exception = {"_p_std__exception", "std::exception *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_std__string = {"_p_std__string", "std::string *", 0, 0, (void*)&_wrap_class_std_string, 0}; static swig_type_info _swigt__p_std__vectorT_Prelude__Connection_t = {"_p_std__vectorT_Prelude__Connection_t", "std::vector< Prelude::Connection > *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_std__vectorT_Prelude__IDMEFValue_t = {"_p_std__vectorT_Prelude__IDMEFValue_t", "std::vector< Prelude::IDMEFValue > *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_time_t = {"_p_time_t", "time_t *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_timeval = {"_p_timeval", "timeval *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_unsigned_char = {"_p_unsigned_char", "unsigned char *|uint8_t *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_unsigned_int = {"_p_unsigned_int", "uint32_t *|unsigned int *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_unsigned_long_long = {"_p_unsigned_long_long", "uint64_t *|unsigned long long *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_unsigned_short = {"_p_unsigned_short", "unsigned short *|uint16_t *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_void = {"_p_void", "void *", 0, 0, (void*)0, 0}; static swig_type_info *swig_type_initial[] = { &_swigt__p_Prelude__Client, &_swigt__p_Prelude__ClientEasy, &_swigt__p_Prelude__ClientProfile, &_swigt__p_Prelude__Connection, &_swigt__p_Prelude__ConnectionPool, &_swigt__p_Prelude__IDMEF, &_swigt__p_Prelude__IDMEFCriteria, &_swigt__p_Prelude__IDMEFCriterion, &_swigt__p_Prelude__IDMEFPath, &_swigt__p_Prelude__IDMEFTime, &_swigt__p_Prelude__IDMEFValue, &_swigt__p_Prelude__PreludeError, &_swigt__p_Prelude__PreludeLog, &_swigt__p_char, &_swigt__p_f_int_p_q_const__char__void, &_swigt__p_idmef_class_id_t, &_swigt__p_idmef_criteria_t, &_swigt__p_idmef_criterion_operator_t, &_swigt__p_idmef_message_t, &_swigt__p_idmef_path_t, &_swigt__p_idmef_time_t, &_swigt__p_idmef_value_t, &_swigt__p_idmef_value_type_id_t, &_swigt__p_int, &_swigt__p_long_long, &_swigt__p_prelude_client_profile_t, &_swigt__p_prelude_client_t, &_swigt__p_prelude_connection_pool_t, &_swigt__p_prelude_connection_t, &_swigt__p_short, &_swigt__p_std__exception, &_swigt__p_std__string, &_swigt__p_std__vectorT_Prelude__Connection_t, &_swigt__p_std__vectorT_Prelude__IDMEFValue_t, &_swigt__p_time_t, &_swigt__p_timeval, &_swigt__p_unsigned_char, &_swigt__p_unsigned_int, &_swigt__p_unsigned_long_long, &_swigt__p_unsigned_short, &_swigt__p_void, }; static swig_cast_info _swigc__p_Prelude__Client[] = { {&_swigt__p_Prelude__Client, 0, 0, 0}, {&_swigt__p_Prelude__ClientEasy, _p_Prelude__ClientEasyTo_p_Prelude__Client, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_Prelude__ClientEasy[] = { {&_swigt__p_Prelude__ClientEasy, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_Prelude__ClientProfile[] = { {&_swigt__p_Prelude__Client, _p_Prelude__ClientTo_p_Prelude__ClientProfile, 0, 0}, {&_swigt__p_Prelude__ClientProfile, 0, 0, 0}, {&_swigt__p_Prelude__ClientEasy, _p_Prelude__ClientEasyTo_p_Prelude__ClientProfile, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_Prelude__Connection[] = { {&_swigt__p_Prelude__Connection, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_Prelude__ConnectionPool[] = { {&_swigt__p_Prelude__ConnectionPool, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_Prelude__IDMEF[] = { {&_swigt__p_Prelude__IDMEF, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_Prelude__IDMEFCriteria[] = { {&_swigt__p_Prelude__IDMEFCriteria, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_Prelude__IDMEFCriterion[] = { {&_swigt__p_Prelude__IDMEFCriterion, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_Prelude__IDMEFPath[] = { {&_swigt__p_Prelude__IDMEFPath, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_Prelude__IDMEFTime[] = { {&_swigt__p_Prelude__IDMEFTime, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_Prelude__IDMEFValue[] = { {&_swigt__p_Prelude__IDMEFValue, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_Prelude__PreludeError[] = { {&_swigt__p_Prelude__PreludeError, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_Prelude__PreludeLog[] = { {&_swigt__p_Prelude__PreludeLog, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_char[] = { {&_swigt__p_char, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_f_int_p_q_const__char__void[] = { {&_swigt__p_f_int_p_q_const__char__void, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_idmef_class_id_t[] = { {&_swigt__p_idmef_class_id_t, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_idmef_criteria_t[] = { {&_swigt__p_idmef_criteria_t, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_idmef_criterion_operator_t[] = { {&_swigt__p_idmef_criterion_operator_t, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_idmef_message_t[] = { {&_swigt__p_idmef_message_t, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_idmef_path_t[] = { {&_swigt__p_idmef_path_t, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_idmef_time_t[] = { {&_swigt__p_idmef_time_t, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_idmef_value_t[] = { {&_swigt__p_idmef_value_t, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_idmef_value_type_id_t[] = { {&_swigt__p_idmef_value_type_id_t, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_int[] = { {&_swigt__p_int, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_long_long[] = { {&_swigt__p_long_long, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_prelude_client_profile_t[] = { {&_swigt__p_prelude_client_profile_t, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_prelude_client_t[] = { {&_swigt__p_prelude_client_t, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_prelude_connection_pool_t[] = { {&_swigt__p_prelude_connection_pool_t, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_prelude_connection_t[] = { {&_swigt__p_prelude_connection_t, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_short[] = { {&_swigt__p_short, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_std__exception[] = { {&_swigt__p_std__exception, 0, 0, 0}, {&_swigt__p_Prelude__PreludeError, _p_Prelude__PreludeErrorTo_p_std__exception, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_std__string[] = { {&_swigt__p_std__string, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_std__vectorT_Prelude__Connection_t[] = { {&_swigt__p_std__vectorT_Prelude__Connection_t, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_std__vectorT_Prelude__IDMEFValue_t[] = { {&_swigt__p_std__vectorT_Prelude__IDMEFValue_t, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_time_t[] = { {&_swigt__p_time_t, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_timeval[] = { {&_swigt__p_timeval, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_unsigned_char[] = { {&_swigt__p_unsigned_char, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_unsigned_int[] = { {&_swigt__p_unsigned_int, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_unsigned_long_long[] = { {&_swigt__p_unsigned_long_long, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_unsigned_short[] = { {&_swigt__p_unsigned_short, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_void[] = { {&_swigt__p_void, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info *swig_cast_initial[] = { _swigc__p_Prelude__Client, _swigc__p_Prelude__ClientEasy, _swigc__p_Prelude__ClientProfile, _swigc__p_Prelude__Connection, _swigc__p_Prelude__ConnectionPool, _swigc__p_Prelude__IDMEF, _swigc__p_Prelude__IDMEFCriteria, _swigc__p_Prelude__IDMEFCriterion, _swigc__p_Prelude__IDMEFPath, _swigc__p_Prelude__IDMEFTime, _swigc__p_Prelude__IDMEFValue, _swigc__p_Prelude__PreludeError, _swigc__p_Prelude__PreludeLog, _swigc__p_char, _swigc__p_f_int_p_q_const__char__void, _swigc__p_idmef_class_id_t, _swigc__p_idmef_criteria_t, _swigc__p_idmef_criterion_operator_t, _swigc__p_idmef_message_t, _swigc__p_idmef_path_t, _swigc__p_idmef_time_t, _swigc__p_idmef_value_t, _swigc__p_idmef_value_type_id_t, _swigc__p_int, _swigc__p_long_long, _swigc__p_prelude_client_profile_t, _swigc__p_prelude_client_t, _swigc__p_prelude_connection_pool_t, _swigc__p_prelude_connection_t, _swigc__p_short, _swigc__p_std__exception, _swigc__p_std__string, _swigc__p_std__vectorT_Prelude__Connection_t, _swigc__p_std__vectorT_Prelude__IDMEFValue_t, _swigc__p_time_t, _swigc__p_timeval, _swigc__p_unsigned_char, _swigc__p_unsigned_int, _swigc__p_unsigned_long_long, _swigc__p_unsigned_short, _swigc__p_void, }; /* -------- TYPE CONVERSION AND EQUIVALENCE RULES (END) -------- */ /* ----------------------------------------------------------------------------- * Type initialization: * This problem is tough by the requirement that no dynamic * memory is used. Also, since swig_type_info structures store pointers to * swig_cast_info structures and swig_cast_info structures store pointers back * to swig_type_info structures, we need some lookup code at initialization. * The idea is that swig generates all the structures that are needed. * The runtime then collects these partially filled structures. * The SWIG_InitializeModule function takes these initial arrays out of * swig_module, and does all the lookup, filling in the swig_module.types * array with the correct data and linking the correct swig_cast_info * structures together. * * The generated swig_type_info structures are assigned staticly to an initial * array. We just loop through that array, and handle each type individually. * First we lookup if this type has been already loaded, and if so, use the * loaded structure instead of the generated one. Then we have to fill in the * cast linked list. The cast data is initially stored in something like a * two-dimensional array. Each row corresponds to a type (there are the same * number of rows as there are in the swig_type_initial array). Each entry in * a column is one of the swig_cast_info structures for that type. * The cast_initial array is actually an array of arrays, because each row has * a variable number of columns. So to actually build the cast linked list, * we find the array of casts associated with the type, and loop through it * adding the casts to the list. The one last trick we need to do is making * sure the type pointer in the swig_cast_info struct is correct. * * First off, we lookup the cast->type name to see if it is already loaded. * There are three cases to handle: * 1) If the cast->type has already been loaded AND the type we are adding * casting info to has not been loaded (it is in this module), THEN we * replace the cast->type pointer with the type pointer that has already * been loaded. * 2) If BOTH types (the one we are adding casting info to, and the * cast->type) are loaded, THEN the cast info has already been loaded by * the previous module so we just ignore it. * 3) Finally, if cast->type has not already been loaded, then we add that * swig_cast_info to the linked list (because the cast->type) pointer will * be correct. * ----------------------------------------------------------------------------- */ #ifdef __cplusplus extern "C" { #if 0 } /* c-mode */ #endif #endif #if 0 #define SWIGRUNTIME_DEBUG #endif SWIGRUNTIME void SWIG_InitializeModule(void *clientdata) { size_t i; swig_module_info *module_head, *iter; int found, init; clientdata = clientdata; /* check to see if the circular list has been setup, if not, set it up */ if (swig_module.next==0) { /* Initialize the swig_module */ swig_module.type_initial = swig_type_initial; swig_module.cast_initial = swig_cast_initial; swig_module.next = &swig_module; init = 1; } else { init = 0; } /* Try and load any already created modules */ module_head = SWIG_GetModule(clientdata); if (!module_head) { /* This is the first module loaded for this interpreter */ /* so set the swig module into the interpreter */ SWIG_SetModule(clientdata, &swig_module); module_head = &swig_module; } else { /* the interpreter has loaded a SWIG module, but has it loaded this one? */ found=0; iter=module_head; do { if (iter==&swig_module) { found=1; break; } iter=iter->next; } while (iter!= module_head); /* if the is found in the list, then all is done and we may leave */ if (found) return; /* otherwise we must add out module into the list */ swig_module.next = module_head->next; module_head->next = &swig_module; } /* When multiple interpeters are used, a module could have already been initialized in a different interpreter, but not yet have a pointer in this interpreter. In this case, we do not want to continue adding types... everything should be set up already */ if (init == 0) return; /* Now work on filling in swig_module.types */ #ifdef SWIGRUNTIME_DEBUG printf("SWIG_InitializeModule: size %d\n", swig_module.size); #endif for (i = 0; i < swig_module.size; ++i) { swig_type_info *type = 0; swig_type_info *ret; swig_cast_info *cast; #ifdef SWIGRUNTIME_DEBUG printf("SWIG_InitializeModule: type %d %s\n", i, swig_module.type_initial[i]->name); #endif /* if there is another module already loaded */ if (swig_module.next != &swig_module) { type = SWIG_MangledTypeQueryModule(swig_module.next, &swig_module, swig_module.type_initial[i]->name); } if (type) { /* Overwrite clientdata field */ #ifdef SWIGRUNTIME_DEBUG printf("SWIG_InitializeModule: found type %s\n", type->name); #endif if (swig_module.type_initial[i]->clientdata) { type->clientdata = swig_module.type_initial[i]->clientdata; #ifdef SWIGRUNTIME_DEBUG printf("SWIG_InitializeModule: found and overwrite type %s \n", type->name); #endif } } else { type = swig_module.type_initial[i]; } /* Insert casting types */ cast = swig_module.cast_initial[i]; while (cast->type) { /* Don't need to add information already in the list */ ret = 0; #ifdef SWIGRUNTIME_DEBUG printf("SWIG_InitializeModule: look cast %s\n", cast->type->name); #endif if (swig_module.next != &swig_module) { ret = SWIG_MangledTypeQueryModule(swig_module.next, &swig_module, cast->type->name); #ifdef SWIGRUNTIME_DEBUG if (ret) printf("SWIG_InitializeModule: found cast %s\n", ret->name); #endif } if (ret) { if (type == swig_module.type_initial[i]) { #ifdef SWIGRUNTIME_DEBUG printf("SWIG_InitializeModule: skip old type %s\n", ret->name); #endif cast->type = ret; ret = 0; } else { /* Check for casting already in the list */ swig_cast_info *ocast = SWIG_TypeCheck(ret->name, type); #ifdef SWIGRUNTIME_DEBUG if (ocast) printf("SWIG_InitializeModule: skip old cast %s\n", ret->name); #endif if (!ocast) ret = 0; } } if (!ret) { #ifdef SWIGRUNTIME_DEBUG printf("SWIG_InitializeModule: adding cast %s\n", cast->type->name); #endif if (type->cast) { type->cast->prev = cast; cast->next = type->cast; } type->cast = cast; } cast++; } /* Set entry in modules->types array equal to the type */ swig_module.types[i] = type; } swig_module.types[i] = 0; #ifdef SWIGRUNTIME_DEBUG printf("**** SWIG_InitializeModule: Cast List ******\n"); for (i = 0; i < swig_module.size; ++i) { int j = 0; swig_cast_info *cast = swig_module.cast_initial[i]; printf("SWIG_InitializeModule: type %d %s\n", i, swig_module.type_initial[i]->name); while (cast->type) { printf("SWIG_InitializeModule: cast type %s\n", cast->type->name); cast++; ++j; } printf("---- Total casts: %d\n",j); } printf("**** SWIG_InitializeModule: Cast List ******\n"); #endif } /* This function will propagate the clientdata field of type to * any new swig_type_info structures that have been added into the list * of equivalent types. It is like calling * SWIG_TypeClientData(type, clientdata) a second time. */ SWIGRUNTIME void SWIG_PropagateClientData(void) { size_t i; swig_cast_info *equiv; static int init_run = 0; if (init_run) return; init_run = 1; for (i = 0; i < swig_module.size; i++) { if (swig_module.types[i]->clientdata) { equiv = swig_module.types[i]->cast; while (equiv) { if (!equiv->converter) { if (equiv->type && !equiv->type->clientdata) SWIG_TypeClientData(equiv->type, swig_module.types[i]->clientdata); } equiv = equiv->next; } } } } #ifdef __cplusplus #if 0 { /* c-mode */ #endif } #endif /* Forward declaration of where the user's %init{} gets inserted */ void SWIG_init_user(lua_State* L ); #ifdef __cplusplus extern "C" { #endif /* this is the initialization function added at the very end of the code the function is always called SWIG_init, but an eariler #define will rename it */ SWIGEXPORT int SWIG_init(lua_State* L) { int i; /* start with global table */ lua_pushvalue(L,LUA_GLOBALSINDEX); /* SWIG's internal initalisation */ SWIG_InitializeModule((void*)L); SWIG_PropagateClientData(); /* add a global fn */ SWIG_Lua_add_function(L,"swig_type",SWIG_Lua_type); SWIG_Lua_add_function(L,"swig_equals",SWIG_Lua_equal); /* begin the module (its a table with the same name as the module) */ SWIG_Lua_module_begin(L,SWIG_name); /* add commands/functions */ for (i = 0; swig_commands[i].name; i++){ SWIG_Lua_module_add_function(L,swig_commands[i].name,swig_commands[i].func); } /* add variables */ for (i = 0; swig_variables[i].name; i++){ SWIG_Lua_module_add_variable(L,swig_variables[i].name,swig_variables[i].get,swig_variables[i].set); } /* set up base class pointers (the hierachy) */ for (i = 0; swig_types[i]; i++){ if (swig_types[i]->clientdata){ SWIG_Lua_init_base_class(L,(swig_lua_class*)(swig_types[i]->clientdata)); } } /* additional registration structs & classes in lua */ for (i = 0; swig_types[i]; i++){ if (swig_types[i]->clientdata){ SWIG_Lua_class_register(L,(swig_lua_class*)(swig_types[i]->clientdata)); } } /* constants */ SWIG_Lua_InstallConstants(L,swig_constants); /* invoke user-specific initialization */ SWIG_init_user(L); /* end module */ lua_pop(L,1); /* tidy stack (remove module table)*/ lua_pop(L,1); /* tidy stack (remove global table)*/ return 1; } #ifdef __cplusplus } #endif const char* SWIG_LUACODE= ""; void SWIG_init_user(lua_State* L) { int argc = 0, ret; static char *argv[1024]; __initial_thread = (gl_thread_t) gl_thread_self(); lua_getglobal(L, "arg"); if ( ! lua_istable(L, -1) ) return; lua_pushnil(L); while ( lua_next(L, -2) != 0 ) { int idx; const char *val; idx = lua_tonumber(L, -2); val = lua_tostring(L, -1); lua_pop(L, 1); if ( idx < 0 ) continue; if ( idx >= ((sizeof(argv) / sizeof(char *)) - 1) ) throw PreludeError("Argument index too large"); argv[idx] = strdup(val); argc = ((idx) > (argc) ? (idx) : (argc)); } argc++; argv[argc] = NULL; ret = prelude_init(&argc, argv); if ( ret < 0 ) throw PreludeError(ret); /* exec Lua code if applicable */ SWIG_Lua_dostring(L,SWIG_LUACODE); } libprelude-1.0.0/bindings/libpreludecpp.i0000664000076400007640000001536111330606162015377 00000000000000%module PreludeEasy %include "std_string.i" %include "std_vector.i" %include "exception.i" %{ #include #include #ifndef SWIGPYTHON # include "config.h" # include "glthread/thread.h" #endif #include "prelude.hxx" #include "prelude-log.hxx" #include "prelude-error.hxx" #include "prelude-connection.hxx" #include "prelude-connection-pool.hxx" #include "prelude-client-profile.hxx" #include "prelude-client.hxx" #include "prelude-client-easy.hxx" #include "idmef-criteria.hxx" #include "idmef-value.hxx" #include "idmef-path.hxx" #include "idmef-time.hxx" #include "idmef.hxx" using namespace Prelude; %} typedef char int8_t; typedef unsigned char uint8_t; typedef short int16_t; typedef unsigned short uint16_t; typedef int int32_t; typedef unsigned int uint32_t; typedef long long int64_t; typedef unsigned long long uint64_t; %ignore prelude_error_t; typedef signed int prelude_error_t; #ifdef SWIGPERL %include perl/libpreludecpp-perl.i #endif #ifdef SWIGPYTHON %include libpreludecpp-python.i #endif #ifdef SWIGRUBY %include libpreludecpp-ruby.i #endif #ifdef SWIGLUA %include libpreludecpp-lua.i #endif %catches(Prelude::PreludeError); %ignore operator <<(std::ostream &os, const Prelude::IDMEF &idmef); %ignore operator >>(std::istream &is, const Prelude::IDMEF &idmef); %template() std::vector; %template() std::vector; %template() std::vector; %fragment("IDMEFValue_to_SWIG", "header", fragment="IDMEFValueList_to_SWIG", fragment="SWIG_From_float") { int IDMEFValue_to_SWIG(const IDMEFValue &result, TARGET_LANGUAGE_OUTPUT_TYPE ret) { std::stringstream s; idmef_value_t *value = result; idmef_value_type_id_t type = result.GetType(); if ( type == IDMEF_VALUE_TYPE_STRING ) { prelude_string_t *str = idmef_value_get_string(value); *ret = SWIG_FromCharPtrAndSize(prelude_string_get_string(str), prelude_string_get_len(str)); } else if ( type == IDMEF_VALUE_TYPE_INT8 ) *ret = SWIG_From_int(idmef_value_get_int8(value)); else if ( type == IDMEF_VALUE_TYPE_UINT8 ) *ret = SWIG_From_unsigned_SS_int(idmef_value_get_uint8(value)); else if ( type == IDMEF_VALUE_TYPE_INT16 ) *ret = SWIG_From_int(idmef_value_get_int16(value)); else if ( type == IDMEF_VALUE_TYPE_UINT16 ) *ret = SWIG_From_unsigned_SS_int(idmef_value_get_uint16(value)); else if ( type == IDMEF_VALUE_TYPE_INT32 ) *ret = SWIG_From_int(idmef_value_get_int32(value)); else if ( type == IDMEF_VALUE_TYPE_UINT32 ) *ret = SWIG_From_unsigned_SS_int(idmef_value_get_uint32(value)); else if ( type == IDMEF_VALUE_TYPE_INT64 ) *ret = SWIG_From_long_SS_long(idmef_value_get_int64(value)); else if ( type == IDMEF_VALUE_TYPE_UINT64 ) *ret = SWIG_From_unsigned_SS_long_SS_long(idmef_value_get_uint64(value)); else if ( type == IDMEF_VALUE_TYPE_FLOAT ) *ret = SWIG_From_float(idmef_value_get_float(value)); else if ( type == IDMEF_VALUE_TYPE_DOUBLE ) *ret = SWIG_From_double(idmef_value_get_double(value)); else if ( type == IDMEF_VALUE_TYPE_ENUM ) { const char *s = idmef_class_enum_to_string(idmef_value_get_class(value), idmef_value_get_enum(value)); *ret = SWIG_FromCharPtr(s); } else if ( type == IDMEF_VALUE_TYPE_TIME ) { IDMEFTime time = result; *ret = SWIG_NewPointerObj(new IDMEFTime(time), SWIGTYPE_p_Prelude__IDMEFTime, 1); } else if ( type == IDMEF_VALUE_TYPE_LIST ) *ret = IDMEFValueList_to_SWIG(result); else if ( type == IDMEF_VALUE_TYPE_DATA ) { idmef_data_t *d = idmef_value_get_data(value); idmef_data_type_t t = idmef_data_get_type(d); if ( t == IDMEF_DATA_TYPE_CHAR || t == IDMEF_DATA_TYPE_BYTE || t == IDMEF_DATA_TYPE_BYTE_STRING ) *ret = SWIG_FromCharPtrAndSize((const char *)idmef_data_get_data(d), idmef_data_get_len(d)); else if ( t == IDMEF_DATA_TYPE_CHAR_STRING ) *ret = SWIG_FromCharPtrAndSize((const char *)idmef_data_get_data(d), idmef_data_get_len(d) - 1); else if ( t == IDMEF_DATA_TYPE_FLOAT ) *ret = SWIG_From_float(idmef_data_get_float(d)); else if ( t == IDMEF_DATA_TYPE_UINT32 ) *ret = SWIG_From_unsigned_SS_int(idmef_data_get_uint32(d)); else if ( t == IDMEF_DATA_TYPE_UINT64 ) *ret = SWIG_From_unsigned_SS_long_SS_long(idmef_data_get_uint64(d)); } else if ( type == IDMEF_VALUE_TYPE_CLASS ) *ret = SWIG_NewPointerObj(new IDMEFValue(idmef_value_ref(value)), SWIGTYPE_p_Prelude__IDMEFValue, 1); else return -1; return 0; } } %ignore Prelude::IDMEFValue::operator int8_t() const; %ignore Prelude::IDMEFValue::operator uint8_t() const; %ignore Prelude::IDMEFValue::operator int16_t() const; %ignore Prelude::IDMEFValue::operator uint16_t() const; %ignore Prelude::IDMEFValue::operator int32_t() const; %ignore Prelude::IDMEFValue::operator uint32_t() const; %ignore Prelude::IDMEFValue::operator int64_t() const; %ignore Prelude::IDMEFValue::operator uint64_t() const; %ignore Prelude::IDMEFValue::operator float() const; %ignore Prelude::IDMEFValue::operator double() const; %ignore Prelude::IDMEFValue::operator const char*() const; %ignore Prelude::IDMEFValue::operator std::vector() const; %ignore Prelude::IDMEFValue::operator Prelude::IDMEFTime() const; /* * Force SWIG to use the IDMEFValue * version of the Set() function, * so that the user might provide NULL IDMEFValue. */ %ignore Prelude::IDMEF::Set(char const *, Prelude::IDMEFValue &value); %ignore Prelude::IDMEFPath::Set(Prelude::IDMEF &, Prelude::IDMEFValue &); %ignore idmef_path_t; %ignore idmef_criteria_t; %ignore prelude_client_t; %ignore prelude_client_profile_t; %ignore prelude_connection_t; %ignore prelude_connection_pool_t; %ignore operator prelude_connection_t *(); %ignore operator prelude_connection_pool_t *(); %ignore operator idmef_message_t *() const; %ignore operator idmef_time_t *() const; %ignore operator idmef_value_t *() const; %ignore operator prelude_client_profile_t *() const; %include prelude.hxx %include prelude-log.hxx %include prelude-error.hxx %include prelude-connection.hxx %include prelude-connection-pool.hxx %include prelude-client-profile.hxx %include prelude-client.hxx %include prelude-client-easy.hxx %include idmef-criteria.hxx %include idmef-value.hxx %include idmef-path.hxx %include idmef-time.hxx %include idmef.hxx libprelude-1.0.0/libltdl/0000775000076400007640000000000011347714751012312 500000000000000libprelude-1.0.0/libltdl/slist.c0000644000076400007640000002305711347714404013534 00000000000000/* slist.c -- generalised singly linked lists Copyright (C) 2000, 2004, 2007, 2008 Free Software Foundation, Inc. Written by Gary V. Vaughan, 2000 NOTE: The canonical source of this file is maintained with the GNU Libtool package. Report bugs to bug-libtool@gnu.org. GNU Libltdl is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. As a special exception to the GNU Lesser General Public License, if you distribute this file as part of a program or library that is built using GNU Libtool, you may include this file under the same distribution terms that you use for the rest of that program. GNU Libltdl 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 Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with GNU Libltdl; see the file COPYING.LIB. If not, a copy can be downloaded from http://www.gnu.org/licenses/lgpl.html, or obtained by writing to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ #include #include "slist.h" #include static SList * slist_sort_merge (SList *left, SList *right, SListCompare *compare, void *userdata); /* Call DELETE repeatedly on each element of HEAD. CAVEAT: If you call this when HEAD is the start of a list of boxed items, you must remember that each item passed back to your DELETE function will be a boxed item that must be slist_unbox()ed before operating on its contents. e.g. void boxed_delete (void *item) { item_free (slist_unbox (item)); } ... slist = slist_delete (slist, boxed_delete); ... */ SList * slist_delete (SList *head, void (*delete_fct) (void *item)) { assert (delete_fct); while (head) { SList *next = head->next; (*delete_fct) (head); head = next; } return 0; } /* Call FIND repeatedly with MATCHDATA and each item of *PHEAD, until FIND returns non-NULL, or the list is exhausted. If a match is found the matching item is destructively removed from *PHEAD, and the value returned by the matching call to FIND is returned. CAVEAT: To avoid memory leaks, unless you already have the address of the stale item, you should probably return that from FIND if it makes a successful match. Don't forget to slist_unbox() every item in a boxed list before operating on its contents. */ void * slist_remove (SList **phead, SListCallback *find, void *matchdata) { SList *stale = 0; void *result = 0; assert (find); if (!phead || !*phead) return 0; /* Does the head of the passed list match? */ result = (*find) (*phead, matchdata); if (result) { stale = *phead; *phead = stale->next; } /* what about the rest of the elements? */ else { SList *head; for (head = *phead; head->next; head = head->next) { result = (*find) (head->next, matchdata); if (result) { stale = head->next; head->next = stale->next; break; } } } return result; } /* Call FIND repeatedly with each element of SLIST and MATCHDATA, until FIND returns non-NULL, or the list is exhausted. If a match is found the value returned by the matching call to FIND is returned. */ void * slist_find (SList *slist, SListCallback *find, void *matchdata) { void *result = 0; assert (find); for (; slist; slist = slist->next) { result = (*find) (slist, matchdata); if (result) break; } return result; } /* Return a single list, composed by destructively concatenating the items in HEAD and TAIL. The values of HEAD and TAIL are undefined after calling this function. CAVEAT: Don't mix boxed and unboxed items in a single list. e.g. slist1 = slist_concat (slist1, slist2); */ SList * slist_concat (SList *head, SList *tail) { SList *last; if (!head) { return tail; } last = head; while (last->next) last = last->next; last->next = tail; return head; } /* Return a single list, composed by destructively appending all of the items in SLIST to ITEM. The values of ITEM and SLIST are undefined after calling this function. CAVEAT: Don't mix boxed and unboxed items in a single list. e.g. slist1 = slist_cons (slist_box (data), slist1); */ SList * slist_cons (SList *item, SList *slist) { if (!item) { return slist; } assert (!item->next); item->next = slist; return item; } /* Return a list starting at the second item of SLIST. */ SList * slist_tail (SList *slist) { return slist ? slist->next : NULL; } /* Return a list starting at the Nth item of SLIST. If SLIST is less than N items long, NULL is returned. Just to be confusing, list items are counted from 1, to get the 2nd element of slist: e.g. shared_list = slist_nth (slist, 2); */ SList * slist_nth (SList *slist, size_t n) { for (;n > 1 && slist; n--) slist = slist->next; return slist; } /* Return the number of items in SLIST. We start counting from 1, so the length of a list with no items is 0, and so on. */ size_t slist_length (SList *slist) { size_t n; for (n = 0; slist; ++n) slist = slist->next; return n; } /* Destructively reverse the order of items in SLIST. The value of SLIST is undefined after calling this function. CAVEAT: You must store the result of this function, or you might not be able to get all the items except the first one back again. e.g. slist = slist_reverse (slist); */ SList * slist_reverse (SList *slist) { SList *result = 0; SList *next; while (slist) { next = slist->next; slist->next = result; result = slist; slist = next; } return result; } /* Call FOREACH once for each item in SLIST, passing both the item and USERDATA on each call. */ void * slist_foreach (SList *slist, SListCallback *foreach, void *userdata) { void *result = 0; assert (foreach); while (slist) { SList *next = slist->next; result = (*foreach) (slist, userdata); if (result) break; slist = next; } return result; } /* Destructively merge the items of two ordered lists LEFT and RIGHT, returning a single sorted list containing the items of both -- Part of the quicksort algorithm. The values of LEFT and RIGHT are undefined after calling this function. At each iteration, add another item to the merged list by taking the lowest valued item from the head of either LEFT or RIGHT, determined by passing those items and USERDATA to COMPARE. COMPARE should return less than 0 if the head of LEFT has the lower value, greater than 0 if the head of RIGHT has the lower value, otherwise 0. */ static SList * slist_sort_merge (SList *left, SList *right, SListCompare *compare, void *userdata) { SList merged, *insert; insert = &merged; while (left && right) { if ((*compare) (left, right, userdata) <= 0) { insert = insert->next = left; left = left->next; } else { insert = insert->next = right; right = right->next; } } insert->next = left ? left : right; return merged.next; } /* Perform a destructive quicksort on the items in SLIST, by repeatedly calling COMPARE with a pair of items from SLIST along with USERDATA at every iteration. COMPARE is a function as defined above for slist_sort_merge(). The value of SLIST is undefined after calling this function. e.g. slist = slist_sort (slist, compare, 0); */ SList * slist_sort (SList *slist, SListCompare *compare, void *userdata) { SList *left, *right; if (!slist) return slist; /* Be sure that LEFT and RIGHT never contain the same item. */ left = slist; right = slist->next; /* Skip two items with RIGHT and one with SLIST, until RIGHT falls off the end. SLIST must be about half way along. */ while (right && (right = right->next)) { if (!right || !(right = right->next)) break; slist = slist->next; } right = slist->next; slist->next = 0; /* Sort LEFT and RIGHT, then merge the two. */ return slist_sort_merge (slist_sort (left, compare, userdata), slist_sort (right, compare, userdata), compare, userdata); } /* Aside from using the functions above to manage chained structures of any type that has a NEXT pointer as its first field, SLISTs can be comprised of boxed items. The boxes are chained together in that case, so there is no need for a NEXT field in the item proper. Some care must be taken to slist_box and slist_unbox each item in a boxed list at the appropriate points to avoid leaking the memory used for the boxes. It us usually a very bad idea to mix boxed and non-boxed items in a single list. */ /* Return a `boxed' freshly mallocated 1 element list containing USERDATA. */ SList * slist_box (const void *userdata) { SList *item = (SList *) malloc (sizeof *item); if (item) { item->next = 0; item->userdata = userdata; } return item; } /* Return the contents of a `boxed' ITEM, recycling the box itself. */ void * slist_unbox (SList *item) { void *userdata = 0; if (item) { /* Strip the const, because responsibility for this memory passes to the caller on return. */ userdata = (void *) item->userdata; free (item); } return userdata; } libprelude-1.0.0/libltdl/argz_.h0000644000076400007640000000425411347714403013502 00000000000000/* lt__argz.h -- internal argz interface for non-glibc systems Copyright (C) 2004, 2007, 2008 Free Software Foundation, Inc. Written by Gary V. Vaughan, 2004 NOTE: The canonical source of this file is maintained with the GNU Libtool package. Report bugs to bug-libtool@gnu.org. GNU Libltdl is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. As a special exception to the GNU Lesser General Public License, if you distribute this file as part of a program or library that is built using GNU Libtool, you may include this file under the same distribution terms that you use for the rest of that program. GNU Libltdl 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 Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with GNU Libltdl; see the file COPYING.LIB. If not, a copy can be downloaded from http://www.gnu.org/licenses/lgpl.html, or obtained by writing to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ #if !defined(LT__ARGZ_H) #define LT__ARGZ_H 1 #include #define __need_error_t #include #include #if defined(LTDL) # include "lt__glibc.h" # include "lt_system.h" #else # define LT_SCOPE #endif #if defined(__cplusplus) extern "C" { #endif LT_SCOPE error_t argz_append (char **pargz, size_t *pargz_len, const char *buf, size_t buf_len); LT_SCOPE error_t argz_create_sep(const char *str, int delim, char **pargz, size_t *pargz_len); LT_SCOPE error_t argz_insert (char **pargz, size_t *pargz_len, char *before, const char *entry); LT_SCOPE char * argz_next (char *argz, size_t argz_len, const char *entry); LT_SCOPE void argz_stringify (char *argz, size_t argz_len, int sep); #if defined(__cplusplus) } #endif #if !defined(LTDL) # undef LT_SCOPE #endif #endif /*!defined(LT__ARGZ_H)*/ libprelude-1.0.0/libltdl/lt_error.c0000644000076400007640000000562111347714404014223 00000000000000/* lt_error.c -- error propogation interface Copyright (C) 1999, 2000, 2001, 2004, 2005, 2007 Free Software Foundation, Inc. Written by Thomas Tanner, 1999 NOTE: The canonical source of this file is maintained with the GNU Libtool package. Report bugs to bug-libtool@gnu.org. GNU Libltdl is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. As a special exception to the GNU Lesser General Public License, if you distribute this file as part of a program or library that is built using GNU Libtool, you may include this file under the same distribution terms that you use for the rest of that program. GNU Libltdl 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 Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with GNU Libltdl; see the file COPYING.LIB. If not, a copy can be downloaded from http://www.gnu.org/licenses/lgpl.html, or obtained by writing to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ #include "lt__private.h" #include "lt_error.h" static const char *last_error = 0; static const char error_strings[LT_ERROR_MAX][LT_ERROR_LEN_MAX + 1] = { #define LT_ERROR(name, diagnostic) diagnostic, lt_dlerror_table #undef LT_ERROR }; static const char **user_error_strings = 0; static int errorcount = LT_ERROR_MAX; int lt_dladderror (const char *diagnostic) { int errindex = 0; int result = -1; const char **temp = (const char **) 0; assert (diagnostic); errindex = errorcount - LT_ERROR_MAX; temp = REALLOC (const char *, user_error_strings, 1 + errindex); if (temp) { user_error_strings = temp; user_error_strings[errindex] = diagnostic; result = errorcount++; } return result; } int lt_dlseterror (int errindex) { int errors = 0; if (errindex >= errorcount || errindex < 0) { /* Ack! Error setting the error message! */ LT__SETERROR (INVALID_ERRORCODE); ++errors; } else if (errindex < LT_ERROR_MAX) { /* No error setting the error message! */ LT__SETERRORSTR (error_strings[errindex]); } else { /* No error setting the error message! */ LT__SETERRORSTR (user_error_strings[errindex - LT_ERROR_MAX]); } return errors; } const char * lt__error_string (int errorcode) { assert (errorcode >= 0); assert (errorcode < LT_ERROR_MAX); return error_strings[errorcode]; } const char * lt__get_last_error (void) { return last_error; } const char * lt__set_last_error (const char *errormsg) { return last_error = errormsg; } libprelude-1.0.0/libltdl/libltdl/0000775000076400007640000000000011347714751013740 500000000000000libprelude-1.0.0/libltdl/libltdl/lt_error.h0000644000076400007640000000707211347714404015660 00000000000000/* lt_error.h -- error propogation interface Copyright (C) 1999, 2000, 2001, 2004, 2007 Free Software Foundation, Inc. Written by Thomas Tanner, 1999 NOTE: The canonical source of this file is maintained with the GNU Libtool package. Report bugs to bug-libtool@gnu.org. GNU Libltdl is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. As a special exception to the GNU Lesser General Public License, if you distribute this file as part of a program or library that is built using GNU Libtool, you may include this file under the same distribution terms that you use for the rest of that program. GNU Libltdl 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 Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with GNU Libltdl; see the file COPYING.LIB. If not, a copy can be downloaded from http://www.gnu.org/licenses/lgpl.html, or obtained by writing to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ /* Only include this header file once. */ #if !defined(LT_ERROR_H) #define LT_ERROR_H 1 #include LT_BEGIN_C_DECLS /* Defining error strings alongside their symbolic names in a macro in this way allows us to expand the macro in different contexts with confidence that the enumeration of symbolic names will map correctly onto the table of error strings. \0 is appended to the strings to expilicitely initialize the string terminator. */ #define lt_dlerror_table \ LT_ERROR(UNKNOWN, "unknown error\0") \ LT_ERROR(DLOPEN_NOT_SUPPORTED, "dlopen support not available\0") \ LT_ERROR(INVALID_LOADER, "invalid loader\0") \ LT_ERROR(INIT_LOADER, "loader initialization failed\0") \ LT_ERROR(REMOVE_LOADER, "loader removal failed\0") \ LT_ERROR(FILE_NOT_FOUND, "file not found\0") \ LT_ERROR(DEPLIB_NOT_FOUND, "dependency library not found\0") \ LT_ERROR(NO_SYMBOLS, "no symbols defined\0") \ LT_ERROR(CANNOT_OPEN, "can't open the module\0") \ LT_ERROR(CANNOT_CLOSE, "can't close the module\0") \ LT_ERROR(SYMBOL_NOT_FOUND, "symbol not found\0") \ LT_ERROR(NO_MEMORY, "not enough memory\0") \ LT_ERROR(INVALID_HANDLE, "invalid module handle\0") \ LT_ERROR(BUFFER_OVERFLOW, "internal buffer overflow\0") \ LT_ERROR(INVALID_ERRORCODE, "invalid errorcode\0") \ LT_ERROR(SHUTDOWN, "library already shutdown\0") \ LT_ERROR(CLOSE_RESIDENT_MODULE, "can't close resident module\0") \ LT_ERROR(INVALID_MUTEX_ARGS, "internal error (code withdrawn)\0")\ LT_ERROR(INVALID_POSITION, "invalid search path insert position\0")\ LT_ERROR(CONFLICTING_FLAGS, "symbol visibility can be global or local\0") /* Enumerate the symbolic error names. */ enum { #define LT_ERROR(name, diagnostic) LT_CONC(LT_ERROR_, name), lt_dlerror_table #undef LT_ERROR LT_ERROR_MAX }; /* Should be max of the error string lengths above (plus one for C++) */ #define LT_ERROR_LEN_MAX (41) /* These functions are only useful from inside custom module loaders. */ LT_SCOPE int lt_dladderror (const char *diagnostic); LT_SCOPE int lt_dlseterror (int errorcode); LT_END_C_DECLS #endif /*!defined(LT_ERROR_H)*/ libprelude-1.0.0/libltdl/libltdl/lt__alloc.h0000644000076400007640000000422311347714403015752 00000000000000/* lt__alloc.h -- internal memory management interface Copyright (C) 2004 Free Software Foundation, Inc. Written by Gary V. Vaughan, 2004 NOTE: The canonical source of this file is maintained with the GNU Libtool package. Report bugs to bug-libtool@gnu.org. GNU Libltdl is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. As a special exception to the GNU Lesser General Public License, if you distribute this file as part of a program or library that is built using GNU Libtool, you may include this file under the same distribution terms that you use for the rest of that program. GNU Libltdl 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 Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with GNU Libltdl; see the file COPYING.LIB. If not, a copy can be downloaded from http://www.gnu.org/licenses/lgpl.html, or obtained by writing to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ #if !defined(LT__ALLOC_H) #define LT__ALLOC_H 1 #include "lt_system.h" LT_BEGIN_C_DECLS #define MALLOC(tp, n) (tp*) lt__malloc((n) * sizeof(tp)) #define REALLOC(tp, mem, n) (tp*) lt__realloc((mem), (n) * sizeof(tp)) #define FREE(mem) LT_STMT_START { \ if (mem) { free ((void *)mem); mem = NULL; } } LT_STMT_END #define MEMREASSIGN(p, q) LT_STMT_START { \ if ((p) != (q)) { if (p) free (p); (p) = (q); (q) = 0; } \ } LT_STMT_END /* If set, this function is called when memory allocation has failed. */ LT_SCOPE void (*lt__alloc_die) (void); LT_SCOPE void *lt__malloc (size_t n); LT_SCOPE void *lt__zalloc (size_t n); LT_SCOPE void *lt__realloc (void *mem, size_t n); LT_SCOPE void *lt__memdup (void const *mem, size_t n); LT_SCOPE char *lt__strdup (const char *string); LT_END_C_DECLS #endif /*!defined(LT__ALLOC_H)*/ libprelude-1.0.0/libltdl/libltdl/lt_system.h0000644000076400007640000001143011347714404016044 00000000000000/* lt_system.h -- system portability abstraction layer Copyright (C) 2004, 2007 Free Software Foundation, Inc. Written by Gary V. Vaughan, 2004 NOTE: The canonical source of this file is maintained with the GNU Libtool package. Report bugs to bug-libtool@gnu.org. GNU Libltdl is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. As a special exception to the GNU Lesser General Public License, if you distribute this file as part of a program or library that is built using GNU Libtool, you may include this file under the same distribution terms that you use for the rest of that program. GNU Libltdl 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 Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with GNU Libltdl; see the file COPYING.LIB. If not, a copy can be downloaded from http://www.gnu.org/licenses/lgpl.html, or obtained by writing to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ #if !defined(LT_SYSTEM_H) #define LT_SYSTEM_H 1 #include #include #include /* Some systems do not define EXIT_*, even with STDC_HEADERS. */ #if !defined(EXIT_SUCCESS) # define EXIT_SUCCESS 0 #endif #if !defined(EXIT_FAILURE) # define EXIT_FAILURE 1 #endif /* Just pick a big number... */ #define LT_FILENAME_MAX 2048 /* Saves on those hard to debug '\0' typos.... */ #define LT_EOS_CHAR '\0' /* LTDL_BEGIN_C_DECLS should be used at the beginning of your declarations, so that C++ compilers don't mangle their names. Use LTDL_END_C_DECLS at the end of C declarations. */ #if defined(__cplusplus) # define LT_BEGIN_C_DECLS extern "C" { # define LT_END_C_DECLS } #else # define LT_BEGIN_C_DECLS /* empty */ # define LT_END_C_DECLS /* empty */ #endif /* LT_STMT_START/END are used to create macros which expand to a a single compound statement in a portable way. */ #if defined (__GNUC__) && !defined (__STRICT_ANSI__) && !defined (__cplusplus) # define LT_STMT_START (void)( # define LT_STMT_END ) #else # if (defined (sun) || defined (__sun__)) # define LT_STMT_START if (1) # define LT_STMT_END else (void)0 # else # define LT_STMT_START do # define LT_STMT_END while (0) # endif #endif /* Canonicalise Windows and Cygwin recognition macros. To match the values set by recent Cygwin compilers, make sure that if __CYGWIN__ is defined (after canonicalisation), __WINDOWS__ is NOT! */ #if defined(__CYGWIN32__) && !defined(__CYGWIN__) # define __CYGWIN__ __CYGWIN32__ #endif #if defined(__CYGWIN__) # if defined(__WINDOWS__) # undef __WINDOWS__ # endif #elif defined(_WIN32) # define __WINDOWS__ _WIN32 #elif defined(WIN32) # define __WINDOWS__ WIN32 #endif #if defined(__CYGWIN__) && defined(__WINDOWS__) # undef __WINDOWS__ #endif /* DLL building support on win32 hosts; mostly to workaround their ridiculous implementation of data symbol exporting. */ #if !defined(LT_SCOPE) # if defined(__WINDOWS__) || defined(__CYGWIN__) # if defined(DLL_EXPORT) /* defined by libtool (if required) */ # define LT_SCOPE extern __declspec(dllexport) # endif # if defined(LIBLTDL_DLL_IMPORT) /* define if linking with this dll */ /* note: cygwin/mingw compilers can rely instead on auto-import */ # define LT_SCOPE extern __declspec(dllimport) # endif # endif # if !defined(LT_SCOPE) /* static linking or !__WINDOWS__ */ # define LT_SCOPE extern # endif #endif #if defined(__WINDOWS__) /* LT_DIRSEP_CHAR is accepted *in addition* to '/' as a directory separator when it is set. */ # define LT_DIRSEP_CHAR '\\' # define LT_PATHSEP_CHAR ';' #else # define LT_PATHSEP_CHAR ':' #endif #if defined(_MSC_VER) /* Visual Studio */ # define R_OK 4 #endif /* fopen() mode flags for reading a text file */ #undef LT_READTEXT_MODE #if defined(__WINDOWS__) || defined(__CYGWIN__) # define LT_READTEXT_MODE "rt" #else # define LT_READTEXT_MODE "r" #endif /* The extra indirection to the LT__STR and LT__CONC macros is required so that if the arguments to LT_STR() (or LT_CONC()) are themselves macros, they will be expanded before being quoted. */ #ifndef LT_STR # define LT__STR(arg) #arg # define LT_STR(arg) LT__STR(arg) #endif #ifndef LT_CONC # define LT__CONC(a, b) a##b # define LT_CONC(a, b) LT__CONC(a, b) #endif #ifndef LT_CONC3 # define LT__CONC3(a, b, c) a##b##c # define LT_CONC3(a, b, c) LT__CONC3(a, b, c) #endif #endif /*!defined(LT_SYSTEM_H)*/ libprelude-1.0.0/libltdl/libltdl/lt_dlloader.h0000644000076400007640000000616411347714403016315 00000000000000/* lt_dlloader.h -- dynamic library loader interface Copyright (C) 2004, 2007, 2008 Free Software Foundation, Inc. Written by Gary V. Vaughan, 2004 NOTE: The canonical source of this file is maintained with the GNU Libtool package. Report bugs to bug-libtool@gnu.org. GNU Libltdl is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. As a special exception to the GNU Lesser General Public License, if you distribute this file as part of a program or library that is built using GNU Libtool, you may include this file under the same distribution terms that you use for the rest of that program. GNU Libltdl 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 Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with GNU Libltdl; see the file COPYING.LIB. If not, a copy can be downloaded from http://www.gnu.org/licenses/lgpl.html, or obtained by writing to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ #if !defined(LT_DLLOADER_H) #define LT_DLLOADER_H 1 #include LT_BEGIN_C_DECLS typedef void * lt_dlloader; typedef void * lt_module; typedef void * lt_user_data; typedef struct lt__advise * lt_dladvise; /* Function pointer types for module loader vtable entries: */ typedef lt_module lt_module_open (lt_user_data data, const char *filename, lt_dladvise advise); typedef int lt_module_close (lt_user_data data, lt_module module); typedef void * lt_find_sym (lt_user_data data, lt_module module, const char *symbolname); typedef int lt_dlloader_init (lt_user_data data); typedef int lt_dlloader_exit (lt_user_data data); /* Default priority is LT_DLLOADER_PREPEND if none is explicitly given. */ typedef enum { LT_DLLOADER_PREPEND = 0, LT_DLLOADER_APPEND } lt_dlloader_priority; /* This structure defines a module loader, as populated by the get_vtable entry point of each loader. */ typedef struct { const char * name; const char * sym_prefix; lt_module_open * module_open; lt_module_close * module_close; lt_find_sym * find_sym; lt_dlloader_init * dlloader_init; lt_dlloader_exit * dlloader_exit; lt_user_data dlloader_data; lt_dlloader_priority priority; } lt_dlvtable; LT_SCOPE int lt_dlloader_add (const lt_dlvtable *vtable); LT_SCOPE lt_dlloader lt_dlloader_next (const lt_dlloader loader); LT_SCOPE lt_dlvtable * lt_dlloader_remove (char *name); LT_SCOPE const lt_dlvtable *lt_dlloader_find (char *name); LT_SCOPE const lt_dlvtable *lt_dlloader_get (lt_dlloader loader); /* Type of a function to get a loader's vtable: */ typedef const lt_dlvtable *lt_get_vtable (lt_user_data data); #ifdef LT_DEBUG_LOADERS LT_SCOPE void lt_dlloader_dump (void); #endif LT_END_C_DECLS #endif /*!defined(LT_DLLOADER_H)*/ libprelude-1.0.0/libltdl/libltdl/lt__strl.h0000644000076400007640000000370011347714403015643 00000000000000/* lt__strl.h -- size-bounded string copying and concatenation Copyright (C) 2004, 2006 Free Software Foundation, Inc. Written by Bob Friesenhahn, 2004 NOTE: The canonical source of this file is maintained with the GNU Libtool package. Report bugs to bug-libtool@gnu.org. GNU Libltdl is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. As a special exception to the GNU Lesser General Public License, if you distribute this file as part of a program or library that is built using GNU Libtool, you may include this file under the same distribution terms that you use for the rest of that program. GNU Libltdl 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 Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with GNU Libltdl; see the file COPYING.LIB. If not, a copy can be downloaded from http://www.gnu.org/licenses/lgpl.html, or obtained by writing to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ #if !defined(LT__STRL_H) #define LT__STRL_H 1 #if defined(LT_CONFIG_H) # include LT_CONFIG_H #else # include #endif #include #include "lt_system.h" #if !defined(HAVE_STRLCAT) # define strlcat(dst,src,dstsize) lt_strlcat(dst,src,dstsize) LT_SCOPE size_t lt_strlcat(char *dst, const char *src, const size_t dstsize); #endif /* !defined(HAVE_STRLCAT) */ #if !defined(HAVE_STRLCPY) # define strlcpy(dst,src,dstsize) lt_strlcpy(dst,src,dstsize) LT_SCOPE size_t lt_strlcpy(char *dst, const char *src, const size_t dstsize); #endif /* !defined(HAVE_STRLCPY) */ #endif /*!defined(LT__STRL_H)*/ libprelude-1.0.0/libltdl/libltdl/slist.h0000644000076400007640000000617611347714404015172 00000000000000/* slist.h -- generalised singly linked lists Copyright (C) 2000, 2004 Free Software Foundation, Inc. Written by Gary V. Vaughan, 2000 NOTE: The canonical source of this file is maintained with the GNU Libtool package. Report bugs to bug-libtool@gnu.org. GNU Libltdl is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. As a special exception to the GNU Lesser General Public License, if you distribute this file as part of a program or library that is built using GNU Libtool, you may include this file under the same distribution terms that you use for the rest of that program. GNU Libltdl 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 Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with GNU Libltdl; see the file COPYING.LIB. If not, a copy can be downloaded from http://www.gnu.org/licenses/lgpl.html, or obtained by writing to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ /* A generalised list. This is deliberately transparent so that you can make the NEXT field of all your chained data structures first, and then cast them to `(SList *)' so that they can be manipulated by this API. Alternatively, you can generate raw SList elements using slist_new(), and put the element data in the USERDATA field. Either way you get to manage the memory involved by yourself. */ #if !defined(SLIST_H) #define SLIST_H 1 #if defined(LTDL) # include # include #else # define LT_SCOPE #endif #if defined(__cplusplus) extern "C" { #endif typedef struct slist { struct slist *next; /* chain forward pointer*/ const void *userdata; /* for boxed `SList' item */ } SList; typedef void * SListCallback (SList *item, void *userdata); typedef int SListCompare (const SList *item1, const SList *item2, void *userdata); LT_SCOPE SList *slist_concat (SList *head, SList *tail); LT_SCOPE SList *slist_cons (SList *item, SList *slist); LT_SCOPE SList *slist_delete (SList *slist, void (*delete_fct) (void *item)); LT_SCOPE void * slist_remove (SList **phead, SListCallback *find, void *matchdata); LT_SCOPE SList *slist_reverse (SList *slist); LT_SCOPE SList *slist_sort (SList *slist, SListCompare *compare, void *userdata); LT_SCOPE SList *slist_tail (SList *slist); LT_SCOPE SList *slist_nth (SList *slist, size_t n); LT_SCOPE void * slist_find (SList *slist, SListCallback *find, void *matchdata); LT_SCOPE size_t slist_length (SList *slist); LT_SCOPE void * slist_foreach (SList *slist, SListCallback *foreach, void *userdata); LT_SCOPE SList *slist_box (const void *userdata); LT_SCOPE void * slist_unbox (SList *item); #if defined(__cplusplus) } #endif #if !defined(LTDL) # undef LT_SCOPE #endif #endif /*!defined(SLIST_H)*/ libprelude-1.0.0/libltdl/libltdl/lt__private.h0000644000076400007640000001065011347714403016333 00000000000000/* lt__private.h -- internal apis for libltdl Copyright (C) 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. Written by Gary V. Vaughan, 2004 NOTE: The canonical source of this file is maintained with the GNU Libtool package. Report bugs to bug-libtool@gnu.org. This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. As a special exception to the GNU Lesser General Public License, if you distribute this file as part of a program or library that is built using GNU libtool, you may include this file under the same distribution terms that you use for the rest of that program. GNU Libltdl 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 Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with GNU Libltdl; see the file COPYING.LIB. If not, a copy con be downloaded from http://www.gnu.org/licenses/lgpl.html, or obtained by writing to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ #if !defined(LT__PRIVATE_H) #define LT__PRIVATE_H 1 #if defined(LT_CONFIG_H) # include LT_CONFIG_H #else # include #endif #include #include #include #include #include #if defined(HAVE_UNISTD_H) # include #endif /* Import internal interfaces... */ #include "lt__alloc.h" #include "lt__dirent.h" #include "lt__strl.h" #include "lt__glibc.h" /* ...and all exported interfaces. */ #include "ltdl.h" #if defined(WITH_DMALLOC) # include #endif /* DLL building support on win32 hosts; mostly to workaround their ridiculous implementation of data symbol exporting. */ #ifndef LT_GLOBAL_DATA # if defined(__WINDOWS__) || defined(__CYGWIN__) # if defined(DLL_EXPORT) /* defined by libtool (if required) */ # define LT_GLOBAL_DATA __declspec(dllexport) # endif # endif # ifndef LT_GLOBAL_DATA # define LT_GLOBAL_DATA /* static linking or !__WINDOWS__ */ # endif #endif #ifndef __attribute__ # if __GNUC__ < 2 || (__GNUC__ == 2 && __GNUC_MINOR__ < 8) || __STRICT_ANSI__ # define __attribute__(x) # endif #endif #ifndef LT__UNUSED # define LT__UNUSED __attribute__ ((__unused__)) #endif LT_BEGIN_C_DECLS #if !defined(errno) extern int errno; #endif LT_SCOPE void lt__alloc_die_callback (void); /* For readability: */ #define strneq(s1, s2) (strcmp((s1), (s2)) != 0) #define streq(s1, s2) (!strcmp((s1), (s2))) /* --- OPAQUE STRUCTURES DECLARED IN LTDL.H --- */ /* This type is used for the array of interface data sets in each handler. */ typedef struct { lt_dlinterface_id key; void * data; } lt_interface_data; struct lt__handle { lt_dlhandle next; const lt_dlvtable * vtable; /* dlopening interface */ lt_dlinfo info; /* user visible fields */ int depcount; /* number of dependencies */ lt_dlhandle * deplibs; /* dependencies */ lt_module module; /* system module handle */ void * system; /* system specific data */ lt_interface_data * interface_data; /* per caller associated data */ int flags; /* various boolean stats */ }; struct lt__advise { unsigned int try_ext:1; /* try system library extensions. */ unsigned int is_resident:1; /* module can't be unloaded. */ unsigned int is_symglobal:1; /* module symbols can satisfy subsequently loaded modules. */ unsigned int is_symlocal:1; /* module symbols are only available locally. */ unsigned int try_preload_only:1;/* only preloaded modules will be tried. */ }; /* --- ERROR HANDLING --- */ /* Extract the diagnostic strings from the error table macro in the same order as the enumerated indices in lt_error.h. */ #define LT__STRERROR(name) lt__error_string(LT_CONC(LT_ERROR_,name)) #define LT__GETERROR(lvalue) (lvalue) = lt__get_last_error() #define LT__SETERRORSTR(errormsg) lt__set_last_error(errormsg) #define LT__SETERROR(errorcode) LT__SETERRORSTR(LT__STRERROR(errorcode)) LT_SCOPE const char *lt__error_string (int errorcode); LT_SCOPE const char *lt__get_last_error (void); LT_SCOPE const char *lt__set_last_error (const char *errormsg); LT_END_C_DECLS #endif /*!defined(LT__PRIVATE_H)*/ libprelude-1.0.0/libltdl/libltdl/lt__glibc.h0000644000076400007640000000524011347714403015740 00000000000000/* lt__glibc.h -- support for non glibc environments Copyright (C) 2004, 2006, 2007 Free Software Foundation, Inc. Written by Gary V. Vaughan, 2004 NOTE: The canonical source of this file is maintained with the GNU Libtool package. Report bugs to bug-libtool@gnu.org. GNU Libltdl is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. As a special exception to the GNU Lesser General Public License, if you distribute this file as part of a program or library that is built using GNU Libtool, you may include this file under the same distribution terms that you use for the rest of that program. GNU Libltdl 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 Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with GNU Libltdl; see the file COPYING.LIB. If not, a copy can be downloaded from http://www.gnu.org/licenses/lgpl.html, or obtained by writing to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ #if !defined(LT__GLIBC_H) #define LT__GLIBC_H 1 #if defined(LT_CONFIG_H) # include LT_CONFIG_H #else # include #endif #if !defined(HAVE_ARGZ_H) || !defined(HAVE_WORKING_ARGZ) /* Redefine any glibc symbols we reimplement to import the implementations into our lt__ namespace so we don't ever clash with the system library if our clients use argz_* from there in addition to libltdl. */ # undef argz_append # define argz_append lt__argz_append # undef argz_create_sep # define argz_create_sep lt__argz_create_sep # undef argz_insert # define argz_insert lt__argz_insert # undef argz_next # define argz_next lt__argz_next # undef argz_stringify # define argz_stringify lt__argz_stringify #endif #ifdef __cplusplus extern "C" { #endif #include #ifdef __cplusplus } #endif # define slist_concat lt__slist_concat # define slist_cons lt__slist_cons # define slist_delete lt__slist_delete # define slist_remove lt__slist_remove # define slist_reverse lt__slist_reverse # define slist_sort lt__slist_sort # define slist_tail lt__slist_tail # define slist_nth lt__slist_nth # define slist_find lt__slist_find # define slist_length lt__slist_length # define slist_foreach lt__slist_foreach # define slist_box lt__slist_box # define slist_unbox lt__slist_unbox #include #endif /*!defined(LT__GLIBC_H)*/ libprelude-1.0.0/libltdl/libltdl/lt__dirent.h0000644000076400007640000000472411347714403016153 00000000000000/* lt__dirent.h -- internal directory entry scanning interface Copyright (C) 2001, 2004, 2006 Free Software Foundation, Inc. Written by Bob Friesenhahn, 2001 NOTE: The canonical source of this file is maintained with the GNU Libtool package. Report bugs to bug-libtool@gnu.org. GNU Libltdl is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. As a special exception to the GNU Lesser General Public License, if you distribute this file as part of a program or library that is built using GNU Libtool, you may include this file under the same distribution terms that you use for the rest of that program. GNU Libltdl 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 Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with GNU Libltdl; see the file COPYING.LIB. If not, a copy can be downloaded from http://www.gnu.org/licenses/lgpl.html, or obtained by writing to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ #if !defined(LT__DIRENT_H) #define LT__DIRENT_H 1 #if defined(LT_CONFIG_H) # include LT_CONFIG_H #else # include #endif #include "lt_system.h" #ifdef HAVE_DIRENT_H /* We have a fully operational dirent subsystem. */ # include # define D_NAMLEN(dirent) (strlen((dirent)->d_name)) #elif defined __WINDOWS__ /* Use some wrapper code to emulate dirent on windows.. */ # define WINDOWS_DIRENT_EMULATION 1 # include # define D_NAMLEN(dirent) (strlen((dirent)->d_name)) # define dirent lt__dirent # define DIR lt__DIR # define opendir lt__opendir # define readdir lt__readdir # define closedir lt__closedir LT_BEGIN_C_DECLS struct dirent { char d_name[LT_FILENAME_MAX]; int d_namlen; }; typedef struct { HANDLE hSearch; WIN32_FIND_DATA Win32FindData; BOOL firsttime; struct dirent file_info; } DIR; LT_SCOPE DIR * opendir (const char *path); LT_SCOPE struct dirent *readdir (DIR *entry); LT_SCOPE void closedir (DIR *entry); LT_END_C_DECLS #else /* !defined(__WINDOWS__)*/ ERROR - cannot find dirent #endif /*!defined(__WINDOWS__)*/ #endif /*!defined(LT__DIRENT_H)*/ libprelude-1.0.0/libltdl/ltdl.h0000644000076400007640000001312311347714404013333 00000000000000/* ltdl.h -- generic dlopen functions Copyright (C) 1998-2000, 2004, 2005, 2007, 2008 Free Software Foundation, Inc. Written by Thomas Tanner, 1998 NOTE: The canonical source of this file is maintained with the GNU Libtool package. Report bugs to bug-libtool@gnu.org. GNU Libltdl is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. As a special exception to the GNU Lesser General Public License, if you distribute this file as part of a program or library that is built using GNU Libtool, you may include this file under the same distribution terms that you use for the rest of that program. GNU Libltdl 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 Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with GNU Libltdl; see the file COPYING.LIB. If not, a copy can be downloaded from http://www.gnu.org/licenses/lgpl.html, or obtained by writing to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ /* Only include this header file once. */ #if !defined(LTDL_H) #define LTDL_H 1 #include #include #include LT_BEGIN_C_DECLS /* LT_STRLEN can be used safely on NULL pointers. */ #define LT_STRLEN(s) (((s) && (s)[0]) ? strlen (s) : 0) /* --- DYNAMIC MODULE LOADING API --- */ typedef struct lt__handle *lt_dlhandle; /* A loaded module. */ /* Initialisation and finalisation functions for libltdl. */ LT_SCOPE int lt_dlinit (void); LT_SCOPE int lt_dlexit (void); /* Module search path manipulation. */ LT_SCOPE int lt_dladdsearchdir (const char *search_dir); LT_SCOPE int lt_dlinsertsearchdir (const char *before, const char *search_dir); LT_SCOPE int lt_dlsetsearchpath (const char *search_path); LT_SCOPE const char *lt_dlgetsearchpath (void); LT_SCOPE int lt_dlforeachfile ( const char *search_path, int (*func) (const char *filename, void *data), void *data); /* User module loading advisors. */ LT_SCOPE int lt_dladvise_init (lt_dladvise *advise); LT_SCOPE int lt_dladvise_destroy (lt_dladvise *advise); LT_SCOPE int lt_dladvise_ext (lt_dladvise *advise); LT_SCOPE int lt_dladvise_resident (lt_dladvise *advise); LT_SCOPE int lt_dladvise_local (lt_dladvise *advise); LT_SCOPE int lt_dladvise_global (lt_dladvise *advise); LT_SCOPE int lt_dladvise_preload (lt_dladvise *advise); /* Portable libltdl versions of the system dlopen() API. */ LT_SCOPE lt_dlhandle lt_dlopen (const char *filename); LT_SCOPE lt_dlhandle lt_dlopenext (const char *filename); LT_SCOPE lt_dlhandle lt_dlopenadvise (const char *filename, lt_dladvise advise); LT_SCOPE void * lt_dlsym (lt_dlhandle handle, const char *name); LT_SCOPE const char *lt_dlerror (void); LT_SCOPE int lt_dlclose (lt_dlhandle handle); /* --- PRELOADED MODULE SUPPORT --- */ /* A preopened symbol. Arrays of this type comprise the exported symbols for a dlpreopened module. */ typedef struct { const char *name; void *address; } lt_dlsymlist; typedef int lt_dlpreload_callback_func (lt_dlhandle handle); LT_SCOPE int lt_dlpreload (const lt_dlsymlist *preloaded); LT_SCOPE int lt_dlpreload_default (const lt_dlsymlist *preloaded); LT_SCOPE int lt_dlpreload_open (const char *originator, lt_dlpreload_callback_func *func); #define lt_preloaded_symbols lt__PROGRAM__LTX_preloaded_symbols #define LTDL_SET_PRELOADED_SYMBOLS() LT_STMT_START{ \ extern const lt_dlsymlist lt_preloaded_symbols[]; \ lt_dlpreload_default(lt_preloaded_symbols); \ }LT_STMT_END /* --- MODULE INFORMATION --- */ /* Associating user data with loaded modules. */ typedef void * lt_dlinterface_id; typedef int lt_dlhandle_interface (lt_dlhandle handle, const char *id_string); LT_SCOPE lt_dlinterface_id lt_dlinterface_register (const char *id_string, lt_dlhandle_interface *iface); LT_SCOPE void lt_dlinterface_free (lt_dlinterface_id key); LT_SCOPE void * lt_dlcaller_set_data (lt_dlinterface_id key, lt_dlhandle handle, void *data); LT_SCOPE void * lt_dlcaller_get_data (lt_dlinterface_id key, lt_dlhandle handle); /* Read only information pertaining to a loaded module. */ typedef struct { char * filename; /* file name */ char * name; /* module name */ int ref_count; /* number of times lt_dlopened minus number of times lt_dlclosed. */ unsigned int is_resident:1; /* module can't be unloaded. */ unsigned int is_symglobal:1; /* module symbols can satisfy subsequently loaded modules. */ unsigned int is_symlocal:1; /* module symbols are only available locally. */ } lt_dlinfo; LT_SCOPE const lt_dlinfo *lt_dlgetinfo (lt_dlhandle handle); LT_SCOPE lt_dlhandle lt_dlhandle_iterate (lt_dlinterface_id iface, lt_dlhandle place); LT_SCOPE lt_dlhandle lt_dlhandle_fetch (lt_dlinterface_id iface, const char *module_name); LT_SCOPE int lt_dlhandle_map (lt_dlinterface_id iface, int (*func) (lt_dlhandle handle, void *data), void *data); /* Deprecated module residency management API. */ LT_SCOPE int lt_dlmakeresident (lt_dlhandle handle); LT_SCOPE int lt_dlisresident (lt_dlhandle handle); #define lt_ptr void * LT_END_C_DECLS #endif /*!defined(LTDL_H)*/ libprelude-1.0.0/libltdl/Makefile.am0000664000076400007640000001170211347714404014262 00000000000000## -- Process this file with automake to produce ## ## Copyright (C) 2003, 2004, 2005, 2007 Free Software Foundation, Inc. ## Written by Gary V. Vaughan, 2003 ## ## NOTE: The canonical source of this file is maintained with the ## GNU Libtool package. Report bugs to bug-libtool@gnu.org. ## ## GNU Libltdl is free software; you can redistribute it and/or ## modify it under the terms of the GNU Lesser General Public ## License as published by the Free Software Foundation; either ## version 2 of the License, or (at your option) any later version. ## ## As a special exception to the GNU Lesser General Public License, ## if you distribute this file as part of a program or library that ## is built using GNU libtool, you may include this file under the ## same distribution terms that you use for the rest of that program. ## ## GNU Libltdl 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 Lesser General Public License for more details. ## ## You should have received a copy of the GNU LesserGeneral Public ## License along with GNU Libltdl; see the file COPYING.LIB. If not, a ## copy can be downloaded from http://www.gnu.org/licenses/lgpl.html, ## or obtained by writing to the Free Software Foundation, Inc., ## 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ##### ACLOCAL_AMFLAGS = -I m4 AUTOMAKE_OPTIONS = foreign AM_CPPFLAGS = AM_LDFLAGS = BUILT_SOURCES = include_HEADERS = noinst_LTLIBRARIES = lib_LTLIBRARIES = EXTRA_LTLIBRARIES = EXTRA_DIST = CLEANFILES = MOSTLYCLEANFILES = # -I$(srcdir) is needed for user that built libltdl with a sub-Automake # (not as a sub-package!) using 'nostdinc': AM_CPPFLAGS += -DLT_CONFIG_H='<$(LT_CONFIG_H)>' \ -DLTDL -I. -I$(srcdir) -Ilibltdl \ -I$(srcdir)/libltdl -I$(srcdir)/libltdl AM_LDFLAGS += -no-undefined LTDL_VERSION_INFO = -version-info 9:1:2 noinst_LTLIBRARIES += $(LT_DLLOADERS) if INSTALL_LTDL ltdlincludedir = $(includedir)/libltdl ltdlinclude_HEADERS = libltdl/lt_system.h \ libltdl/lt_error.h \ libltdl/lt_dlloader.h include_HEADERS += ltdl.h lib_LTLIBRARIES += libltdl.la endif if CONVENIENCE_LTDL noinst_LTLIBRARIES += libltdlc.la endif libltdl_la_SOURCES = libltdl/lt__alloc.h \ libltdl/lt__dirent.h \ libltdl/lt__glibc.h \ libltdl/lt__private.h \ libltdl/lt__strl.h \ libltdl/lt_dlloader.h \ libltdl/lt_error.h \ libltdl/lt_system.h \ libltdl/slist.h \ loaders/preopen.c \ lt__alloc.c \ lt_dlloader.c \ lt_error.c \ ltdl.c \ ltdl.h \ slist.c EXTRA_DIST += lt__dirent.c \ lt__strl.c libltdl_la_CPPFLAGS = -DLTDLOPEN=$(LTDLOPEN) $(AM_CPPFLAGS) libltdl_la_LDFLAGS = $(AM_LDFLAGS) $(LTDL_VERSION_INFO) $(LT_DLPREOPEN) libltdl_la_LIBADD = $(ltdl_LTLIBOBJS) libltdl_la_DEPENDENCIES = $(LT_DLLOADERS) $(ltdl_LTLIBOBJS) libltdlc_la_SOURCES = $(libltdl_la_SOURCES) libltdlc_la_CPPFLAGS = -DLTDLOPEN=$(LTDLOPEN)c $(AM_CPPFLAGS) libltdlc_la_LDFLAGS = $(AM_LDFLAGS) $(LT_DLPREOPEN) libltdlc_la_LIBADD = $(libltdl_la_LIBADD) libltdlc_la_DEPENDENCIES= $(libltdl_la_DEPENDENCIES) ## The loaders are preopened by libltdl, itself always built from ## pic-objects (either as a shared library, or a convenience library), ## so the loaders themselves must be made from pic-objects too. We ## use convenience libraries for that purpose: EXTRA_LTLIBRARIES += dlopen.la \ dld_link.la \ dyld.la \ load_add_on.la \ loadlibrary.la \ shl_load.la dlopen_la_SOURCES = loaders/dlopen.c dlopen_la_LDFLAGS = -module -avoid-version dlopen_la_LIBADD = $(LIBADD_DLOPEN) dld_link_la_SOURCES = loaders/dld_link.c dld_link_la_LDFLAGS = -module -avoid-version dld_link_la_LIBADD = -ldld dyld_la_SOURCES = loaders/dyld.c dyld_la_LDFLAGS = -module -avoid-version load_add_on_la_SOURCES = loaders/load_add_on.c load_add_on_la_LDFLAGS = -module -avoid-version loadlibrary_la_SOURCES = loaders/loadlibrary.c loadlibrary_la_LDFLAGS = -module -avoid-version shl_load_la_SOURCES = loaders/shl_load.c shl_load_la_LDFLAGS = -module -avoid-version shl_load_la_LIBADD = $(LIBADD_SHL_LOAD) ## Make sure these will be cleaned even when they're not built by default: CLEANFILES += libltdl.la \ libltdlc.la \ libdlloader.la ## Automake-1.9.6 doesn't clean subdir AC_LIBOBJ compiled objects ## automatically: CLEANFILES += $(ltdl_LIBOBJS) $(ltdl_LTLIBOBJS) EXTRA_DIST += COPYING.LIB \ README ## --------------------------- ## ## Gnulib snippets ## ## --------------------------- ## BUILT_SOURCES += $(ARGZ_H) EXTRA_DIST += argz_.h \ argz.c # We need the following in order to create an when the system # doesn't have one that works with the given compiler. all-local $(lib_OBJECTS): $(ARGZ_H) argz.h: argz_.h $(mkinstalldirs) . cp $(srcdir)/argz_.h $@-t mv $@-t $@ MOSTLYCLEANFILES += argz.h \ argz.h-t libprelude-1.0.0/libltdl/README0000644000076400007640000000276611347714403013115 00000000000000This is GNU libltdl, a system independent dlopen wrapper for GNU libtool. It supports the following dlopen interfaces: * dlopen (Solaris, Linux and various BSD flavors) * shl_load (HP-UX) * LoadLibrary (Win16 and Win32) * load_add_on (BeOS) * GNU DLD (emulates dynamic linking for static libraries) * dyld (darwin/Mac OS X) * libtool's dlpreopen -- Copyright (C) 1999, 2003 Free Software Foundation, Inc. Written by Thomas Tanner, 1999 This file is part of GNU Libtool. GNU Libtool 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. As a special exception to the GNU General Public License, if you distribute this file as part of a program or library that is built using GNU Libtool, you may include this file under the same distribution terms that you use for the rest of that program. GNU Libtool 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 GNU Libtool; see the file COPYING. If not, a copy can be downloaded from http://www.gnu.org/licenses/gpl.html, or obtained by writing to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. libprelude-1.0.0/libltdl/ltdl.c0000644000076400007640000015124511347714404013336 00000000000000/* ltdl.c -- system independent dlopen wrapper Copyright (C) 1998, 1999, 2000, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. Written by Thomas Tanner, 1998 NOTE: The canonical source of this file is maintained with the GNU Libtool package. Report bugs to bug-libtool@gnu.org. GNU Libltdl is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. As a special exception to the GNU Lesser General Public License, if you distribute this file as part of a program or library that is built using GNU Libtool, you may include this file under the same distribution terms that you use for the rest of that program. GNU Libltdl 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 Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with GNU Libltdl; see the file COPYING.LIB. If not, a copy can be downloaded from http://www.gnu.org/licenses/lgpl.html, or obtained by writing to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ #include "lt__private.h" #include "lt_system.h" #include "lt_dlloader.h" /* --- MANIFEST CONSTANTS --- */ /* Standard libltdl search path environment variable name */ #undef LTDL_SEARCHPATH_VAR #define LTDL_SEARCHPATH_VAR "LTDL_LIBRARY_PATH" /* Standard libtool archive file extension. */ #undef LT_ARCHIVE_EXT #define LT_ARCHIVE_EXT ".la" /* max. filename length */ #if !defined(LT_FILENAME_MAX) # define LT_FILENAME_MAX 1024 #endif #if !defined(LT_LIBEXT) # define LT_LIBEXT "a" #endif /* This is the maximum symbol size that won't require malloc/free */ #undef LT_SYMBOL_LENGTH #define LT_SYMBOL_LENGTH 128 /* This accounts for the _LTX_ separator */ #undef LT_SYMBOL_OVERHEAD #define LT_SYMBOL_OVERHEAD 5 /* Various boolean flags can be stored in the flags field of an lt_dlhandle... */ #define LT_DLIS_RESIDENT(handle) ((handle)->info.is_resident) #define LT_DLIS_SYMGLOBAL(handle) ((handle)->info.is_symglobal) #define LT_DLIS_SYMLOCAL(handle) ((handle)->info.is_symlocal) static const char objdir[] = LT_OBJDIR; static const char archive_ext[] = LT_ARCHIVE_EXT; static const char libext[] = LT_LIBEXT; #if defined(LT_MODULE_EXT) static const char shlib_ext[] = LT_MODULE_EXT; #endif #if defined(LT_DLSEARCH_PATH) static const char sys_dlsearch_path[] = LT_DLSEARCH_PATH; #endif /* --- DYNAMIC MODULE LOADING --- */ /* The type of a function used at each iteration of foreach_dirinpath(). */ typedef int foreach_callback_func (char *filename, void *data1, void *data2); /* foreachfile_callback itself calls a function of this type: */ typedef int file_worker_func (const char *filename, void *data); static int foreach_dirinpath (const char *search_path, const char *base_name, foreach_callback_func *func, void *data1, void *data2); static int find_file_callback (char *filename, void *data1, void *data2); static int find_handle_callback (char *filename, void *data, void *ignored); static int foreachfile_callback (char *filename, void *data1, void *data2); static int canonicalize_path (const char *path, char **pcanonical); static int argzize_path (const char *path, char **pargz, size_t *pargz_len); static FILE *find_file (const char *search_path, const char *base_name, char **pdir); static lt_dlhandle *find_handle (const char *search_path, const char *base_name, lt_dlhandle *handle, lt_dladvise advise); static int find_module (lt_dlhandle *handle, const char *dir, const char *libdir, const char *dlname, const char *old_name, int installed, lt_dladvise advise); static int has_library_ext (const char *filename); static int load_deplibs (lt_dlhandle handle, char *deplibs); static int trim (char **dest, const char *str); static int try_dlopen (lt_dlhandle *handle, const char *filename, const char *ext, lt_dladvise advise); static int tryall_dlopen (lt_dlhandle *handle, const char *filename, lt_dladvise padvise, const lt_dlvtable *vtable); static int unload_deplibs (lt_dlhandle handle); static int lt_argz_insert (char **pargz, size_t *pargz_len, char *before, const char *entry); static int lt_argz_insertinorder (char **pargz, size_t *pargz_len, const char *entry); static int lt_argz_insertdir (char **pargz, size_t *pargz_len, const char *dirnam, struct dirent *dp); static int lt_dlpath_insertdir (char **ppath, char *before, const char *dir); static int list_files_by_dir (const char *dirnam, char **pargz, size_t *pargz_len); static int file_not_found (void); #ifdef HAVE_LIBDLLOADER static int loader_init_callback (lt_dlhandle handle); #endif /* HAVE_LIBDLLOADER */ static int loader_init (lt_get_vtable *vtable_func, lt_user_data data); static char *user_search_path= 0; static lt_dlhandle handles = 0; static int initialized = 0; /* Our memory failure callback sets the error message to be passed back up to the client, so we must be careful to return from mallocation callers if allocation fails (as this callback returns!!). */ void lt__alloc_die_callback (void) { LT__SETERROR (NO_MEMORY); } #ifdef HAVE_LIBDLLOADER /* This function is called to initialise each preloaded module loader, and hook it into the list of loaders to be used when attempting to dlopen an application module. */ static int loader_init_callback (lt_dlhandle handle) { lt_get_vtable *vtable_func = (lt_get_vtable *) lt_dlsym (handle, "get_vtable"); return loader_init (vtable_func, 0); } #endif /* HAVE_LIBDLLOADER */ static int loader_init (lt_get_vtable *vtable_func, lt_user_data data) { const lt_dlvtable *vtable = 0; int errors = 0; if (vtable_func) { vtable = (*vtable_func) (data); } /* lt_dlloader_add will LT__SETERROR if it fails. */ errors += lt_dlloader_add (vtable); assert (errors || vtable); if ((!errors) && vtable->dlloader_init) { if ((*vtable->dlloader_init) (vtable->dlloader_data)) { LT__SETERROR (INIT_LOADER); ++errors; } } return errors; } /* Bootstrap the loader loading with the preopening loader. */ #define get_vtable preopen_LTX_get_vtable #define preloaded_symbols LT_CONC3(lt_, LTDLOPEN, _LTX_preloaded_symbols) LT_BEGIN_C_DECLS LT_SCOPE const lt_dlvtable * get_vtable (lt_user_data data); LT_END_C_DECLS #ifdef HAVE_LIBDLLOADER extern lt_dlsymlist preloaded_symbols; #endif /* Initialize libltdl. */ int lt_dlinit (void) { int errors = 0; /* Initialize only at first call. */ if (++initialized == 1) { lt__alloc_die = lt__alloc_die_callback; handles = 0; user_search_path = 0; /* empty search path */ /* First set up the statically loaded preload module loader, so we can use it to preopen the other loaders we linked in at compile time. */ errors += loader_init (get_vtable, 0); /* Now open all the preloaded module loaders, so the application can use _them_ to lt_dlopen its own modules. */ #ifdef HAVE_LIBDLLOADER if (!errors) { errors += lt_dlpreload (&preloaded_symbols); } if (!errors) { errors += lt_dlpreload_open (LT_STR(LTDLOPEN), loader_init_callback); } #endif /* HAVE_LIBDLLOADER */ } #ifdef LT_DEBUG_LOADERS lt_dlloader_dump(); #endif return errors; } int lt_dlexit (void) { /* shut down libltdl */ lt_dlloader *loader = 0; lt_dlhandle handle = handles; int errors = 0; if (!initialized) { LT__SETERROR (SHUTDOWN); ++errors; goto done; } /* shut down only at last call. */ if (--initialized == 0) { int level; while (handles && LT_DLIS_RESIDENT (handles)) { handles = handles->next; } /* close all modules */ for (level = 1; handle; ++level) { lt_dlhandle cur = handles; int saw_nonresident = 0; while (cur) { lt_dlhandle tmp = cur; cur = cur->next; if (!LT_DLIS_RESIDENT (tmp)) { saw_nonresident = 1; if (tmp->info.ref_count <= level) { if (lt_dlclose (tmp)) { ++errors; } /* Make sure that the handle pointed to by 'cur' still exists. lt_dlclose recursively closes dependent libraries which removes them from the linked list. One of these might be the one pointed to by 'cur'. */ if (cur) { for (tmp = handles; tmp; tmp = tmp->next) if (tmp == cur) break; if (! tmp) cur = handles; } } } } /* done if only resident modules are left */ if (!saw_nonresident) break; } /* When removing loaders, we can only find out failure by testing the error string, so avoid a spurious one from an earlier failed command. */ if (!errors) LT__SETERRORSTR (0); /* close all loaders */ for (loader = (lt_dlloader *) lt_dlloader_next (NULL); loader;) { lt_dlloader *next = (lt_dlloader *) lt_dlloader_next (loader); lt_dlvtable *vtable = (lt_dlvtable *) lt_dlloader_get (loader); if ((vtable = lt_dlloader_remove ((char *) vtable->name))) { FREE (vtable); } else { /* ignore errors due to resident modules */ const char *err; LT__GETERROR (err); if (err) ++errors; } loader = next; } FREE(user_search_path); } done: return errors; } /* Try VTABLE or, if VTABLE is NULL, all available loaders for FILENAME. If the library is not successfully loaded, return non-zero. Otherwise, the dlhandle is stored at the address given in PHANDLE. */ static int tryall_dlopen (lt_dlhandle *phandle, const char *filename, lt_dladvise advise, const lt_dlvtable *vtable) { lt_dlhandle handle = handles; const char * saved_error = 0; int errors = 0; #ifdef LT_DEBUG_LOADERS fprintf (stderr, "tryall_dlopen (%s, %s)\n", filename ? filename : "(null)", vtable ? vtable->name : "(ALL)"); #endif LT__GETERROR (saved_error); /* check whether the module was already opened */ for (;handle; handle = handle->next) { if ((handle->info.filename == filename) /* dlopen self: 0 == 0 */ || (handle->info.filename && filename && streq (handle->info.filename, filename))) { break; } } if (handle) { ++handle->info.ref_count; *phandle = handle; goto done; } handle = *phandle; if (filename) { /* Comment out the check of file permissions using access. This call seems to always return -1 with error EACCES. */ /* We need to catch missing file errors early so that file_not_found() can detect what happened. if (access (filename, R_OK) != 0) { LT__SETERROR (FILE_NOT_FOUND); ++errors; goto done; } */ handle->info.filename = lt__strdup (filename); if (!handle->info.filename) { ++errors; goto done; } } else { handle->info.filename = 0; } { lt_dlloader loader = lt_dlloader_next (0); const lt_dlvtable *loader_vtable; do { if (vtable) loader_vtable = vtable; else loader_vtable = lt_dlloader_get (loader); #ifdef LT_DEBUG_LOADERS fprintf (stderr, "Calling %s->module_open (%s)\n", (loader_vtable && loader_vtable->name) ? loader_vtable->name : "(null)", filename ? filename : "(null)"); #endif handle->module = (*loader_vtable->module_open) (loader_vtable->dlloader_data, filename, advise); #ifdef LT_DEBUG_LOADERS fprintf (stderr, " Result: %s\n", handle->module ? "Success" : "Failed"); #endif if (handle->module != 0) { if (advise) { handle->info.is_resident = advise->is_resident; handle->info.is_symglobal = advise->is_symglobal; handle->info.is_symlocal = advise->is_symlocal; } break; } } while (!vtable && (loader = lt_dlloader_next (loader))); /* If VTABLE was given but couldn't open the module, or VTABLE wasn't given but we exhausted all loaders without opening the module, bail out! */ if ((vtable && !handle->module) || (!vtable && !loader)) { FREE (handle->info.filename); ++errors; goto done; } handle->vtable = loader_vtable; } LT__SETERRORSTR (saved_error); done: return errors; } static int tryall_dlopen_module (lt_dlhandle *handle, const char *prefix, const char *dirname, const char *dlname, lt_dladvise advise) { int error = 0; char *filename = 0; size_t filename_len = 0; size_t dirname_len = LT_STRLEN (dirname); assert (handle); assert (dirname); assert (dlname); #if defined(LT_DIRSEP_CHAR) /* Only canonicalized names (i.e. with DIRSEP chars already converted) should make it into this function: */ assert (strchr (dirname, LT_DIRSEP_CHAR) == 0); #endif if (dirname_len > 0) if (dirname[dirname_len -1] == '/') --dirname_len; filename_len = dirname_len + 1 + LT_STRLEN (dlname); /* Allocate memory, and combine DIRNAME and MODULENAME into it. The PREFIX (if any) is handled below. */ filename = MALLOC (char, filename_len + 1); if (!filename) return 1; sprintf (filename, "%.*s/%s", (int) dirname_len, dirname, dlname); /* Now that we have combined DIRNAME and MODULENAME, if there is also a PREFIX to contend with, simply recurse with the arguments shuffled. Otherwise, attempt to open FILENAME as a module. */ if (prefix) { error += tryall_dlopen_module (handle, (const char *) 0, prefix, filename, advise); } else if (tryall_dlopen (handle, filename, advise, 0) != 0) { ++error; } FREE (filename); return error; } static int find_module (lt_dlhandle *handle, const char *dir, const char *libdir, const char *dlname, const char *old_name, int installed, lt_dladvise advise) { /* Try to open the old library first; if it was dlpreopened, we want the preopened version of it, even if a dlopenable module is available. */ if (old_name && tryall_dlopen (handle, old_name, advise, lt_dlloader_find ("lt_preopen") ) == 0) { return 0; } /* Try to open the dynamic library. */ if (dlname) { /* try to open the installed module */ if (installed && libdir) { if (tryall_dlopen_module (handle, (const char *) 0, libdir, dlname, advise) == 0) return 0; } /* try to open the not-installed module */ if (!installed) { if (tryall_dlopen_module (handle, dir, objdir, dlname, advise) == 0) return 0; } /* maybe it was moved to another directory */ { if (dir && (tryall_dlopen_module (handle, (const char *) 0, dir, dlname, advise) == 0)) return 0; } } return 1; } static int canonicalize_path (const char *path, char **pcanonical) { char *canonical = 0; assert (path && *path); assert (pcanonical); canonical = MALLOC (char, 1+ LT_STRLEN (path)); if (!canonical) return 1; { size_t dest = 0; size_t src; for (src = 0; path[src] != LT_EOS_CHAR; ++src) { /* Path separators are not copied to the beginning or end of the destination, or if another separator would follow immediately. */ if (path[src] == LT_PATHSEP_CHAR) { if ((dest == 0) || (path[1+ src] == LT_PATHSEP_CHAR) || (path[1+ src] == LT_EOS_CHAR)) continue; } /* Anything other than a directory separator is copied verbatim. */ if ((path[src] != '/') #if defined(LT_DIRSEP_CHAR) && (path[src] != LT_DIRSEP_CHAR) #endif ) { canonical[dest++] = path[src]; } /* Directory separators are converted and copied only if they are not at the end of a path -- i.e. before a path separator or NULL terminator. */ else if ((path[1+ src] != LT_PATHSEP_CHAR) && (path[1+ src] != LT_EOS_CHAR) #if defined(LT_DIRSEP_CHAR) && (path[1+ src] != LT_DIRSEP_CHAR) #endif && (path[1+ src] != '/')) { canonical[dest++] = '/'; } } /* Add an end-of-string marker at the end. */ canonical[dest] = LT_EOS_CHAR; } /* Assign new value. */ *pcanonical = canonical; return 0; } static int argzize_path (const char *path, char **pargz, size_t *pargz_len) { error_t error; assert (path); assert (pargz); assert (pargz_len); if ((error = argz_create_sep (path, LT_PATHSEP_CHAR, pargz, pargz_len))) { switch (error) { case ENOMEM: LT__SETERROR (NO_MEMORY); break; default: LT__SETERROR (UNKNOWN); break; } return 1; } return 0; } /* Repeatedly call FUNC with each LT_PATHSEP_CHAR delimited element of SEARCH_PATH and references to DATA1 and DATA2, until FUNC returns non-zero or all elements are exhausted. If BASE_NAME is non-NULL, it is appended to each SEARCH_PATH element before FUNC is called. */ static int foreach_dirinpath (const char *search_path, const char *base_name, foreach_callback_func *func, void *data1, void *data2) { int result = 0; size_t filenamesize = 0; size_t lenbase = LT_STRLEN (base_name); size_t argz_len = 0; char *argz = 0; char *filename = 0; char *canonical = 0; if (!search_path || !*search_path) { LT__SETERROR (FILE_NOT_FOUND); goto cleanup; } if (canonicalize_path (search_path, &canonical) != 0) goto cleanup; if (argzize_path (canonical, &argz, &argz_len) != 0) goto cleanup; { char *dir_name = 0; while ((dir_name = argz_next (argz, argz_len, dir_name))) { size_t lendir = LT_STRLEN (dir_name); if (1+ lendir + lenbase >= filenamesize) { FREE (filename); filenamesize = 1+ lendir + 1+ lenbase; /* "/d" + '/' + "f" + '\0' */ filename = MALLOC (char, filenamesize); if (!filename) goto cleanup; } assert (filenamesize > lendir); strcpy (filename, dir_name); if (base_name && *base_name) { if (filename[lendir -1] != '/') filename[lendir++] = '/'; strcpy (filename +lendir, base_name); } if ((result = (*func) (filename, data1, data2))) { break; } } } cleanup: FREE (argz); FREE (canonical); FREE (filename); return result; } /* If FILEPATH can be opened, store the name of the directory component in DATA1, and the opened FILE* structure address in DATA2. Otherwise DATA1 is unchanged, but DATA2 is set to a pointer to NULL. */ static int find_file_callback (char *filename, void *data1, void *data2) { char **pdir = (char **) data1; FILE **pfile = (FILE **) data2; int is_done = 0; assert (filename && *filename); assert (pdir); assert (pfile); if ((*pfile = fopen (filename, LT_READTEXT_MODE))) { char *dirend = strrchr (filename, '/'); if (dirend > filename) *dirend = LT_EOS_CHAR; FREE (*pdir); *pdir = lt__strdup (filename); is_done = (*pdir == 0) ? -1 : 1; } return is_done; } static FILE * find_file (const char *search_path, const char *base_name, char **pdir) { FILE *file = 0; foreach_dirinpath (search_path, base_name, find_file_callback, pdir, &file); return file; } static int find_handle_callback (char *filename, void *data, void *data2) { lt_dlhandle *phandle = (lt_dlhandle *) data; int notfound = access (filename, R_OK); lt_dladvise advise = (lt_dladvise) data2; /* Bail out if file cannot be read... */ if (notfound) return 0; /* Try to dlopen the file, but do not continue searching in any case. */ if (tryall_dlopen (phandle, filename, advise, 0) != 0) *phandle = 0; return 1; } /* If HANDLE was found return it, otherwise return 0. If HANDLE was found but could not be opened, *HANDLE will be set to 0. */ static lt_dlhandle * find_handle (const char *search_path, const char *base_name, lt_dlhandle *phandle, lt_dladvise advise) { if (!search_path) return 0; if (!foreach_dirinpath (search_path, base_name, find_handle_callback, phandle, advise)) return 0; return phandle; } #if !defined(LTDL_DLOPEN_DEPLIBS) static int load_deplibs (lt_dlhandle handle, char * LT__UNUSED deplibs) { handle->depcount = 0; return 0; } #else /* defined(LTDL_DLOPEN_DEPLIBS) */ static int load_deplibs (lt_dlhandle handle, char *deplibs) { char *p, *save_search_path = 0; int depcount = 0; int i; char **names = 0; int errors = 0; handle->depcount = 0; if (!deplibs) { return errors; } ++errors; if (user_search_path) { save_search_path = lt__strdup (user_search_path); if (!save_search_path) goto cleanup; } /* extract search paths and count deplibs */ p = deplibs; while (*p) { if (!isspace ((unsigned char) *p)) { char *end = p+1; while (*end && !isspace((unsigned char) *end)) { ++end; } if (strncmp(p, "-L", 2) == 0 || strncmp(p, "-R", 2) == 0) { char save = *end; *end = 0; /* set a temporary string terminator */ if (lt_dladdsearchdir(p+2)) { goto cleanup; } *end = save; } else { ++depcount; } p = end; } else { ++p; } } if (!depcount) { errors = 0; goto cleanup; } names = MALLOC (char *, depcount); if (!names) goto cleanup; /* now only extract the actual deplibs */ depcount = 0; p = deplibs; while (*p) { if (isspace ((unsigned char) *p)) { ++p; } else { char *end = p+1; while (*end && !isspace ((unsigned char) *end)) { ++end; } if (strncmp(p, "-L", 2) != 0 && strncmp(p, "-R", 2) != 0) { char *name; char save = *end; *end = 0; /* set a temporary string terminator */ if (strncmp(p, "-l", 2) == 0) { size_t name_len = 3+ /* "lib" */ LT_STRLEN (p + 2); name = MALLOC (char, 1+ name_len); if (name) sprintf (name, "lib%s", p+2); } else name = lt__strdup(p); if (!name) goto cleanup_names; names[depcount++] = name; *end = save; } p = end; } } /* load the deplibs (in reverse order) At this stage, don't worry if the deplibs do not load correctly, they may already be statically linked into the loading application for instance. There will be a more enlightening error message later on if the loaded module cannot resolve all of its symbols. */ if (depcount) { lt_dlhandle cur = handle; int j = 0; cur->deplibs = MALLOC (lt_dlhandle, depcount); if (!cur->deplibs) goto cleanup_names; for (i = 0; i < depcount; ++i) { cur->deplibs[j] = lt_dlopenext(names[depcount-1-i]); if (cur->deplibs[j]) { ++j; } } cur->depcount = j; /* Number of successfully loaded deplibs */ errors = 0; } cleanup_names: for (i = 0; i < depcount; ++i) { FREE (names[i]); } cleanup: FREE (names); /* restore the old search path */ if (save_search_path) { MEMREASSIGN (user_search_path, save_search_path); } return errors; } #endif /* defined(LTDL_DLOPEN_DEPLIBS) */ static int unload_deplibs (lt_dlhandle handle) { int i; int errors = 0; lt_dlhandle cur = handle; if (cur->depcount) { for (i = 0; i < cur->depcount; ++i) { if (!LT_DLIS_RESIDENT (cur->deplibs[i])) { errors += lt_dlclose (cur->deplibs[i]); } } FREE (cur->deplibs); } return errors; } static int trim (char **dest, const char *str) { /* remove the leading and trailing "'" from str and store the result in dest */ const char *end = strrchr (str, '\''); size_t len = LT_STRLEN (str); char *tmp; FREE (*dest); if (!end) return 1; if (len > 3 && str[0] == '\'') { tmp = MALLOC (char, end - str); if (!tmp) return 1; memcpy(tmp, &str[1], (end - str) - 1); tmp[(end - str) - 1] = LT_EOS_CHAR; *dest = tmp; } else { *dest = 0; } return 0; } /* Read the .la file FILE. */ static int parse_dotla_file(FILE *file, char **dlname, char **libdir, char **deplibs, char **old_name, int *installed) { int errors = 0; size_t line_len = LT_FILENAME_MAX; char * line = MALLOC (char, line_len); if (!line) { LT__SETERROR (FILE_NOT_FOUND); return 1; } while (!feof (file)) { line[line_len-2] = '\0'; if (!fgets (line, (int) line_len, file)) { break; } /* Handle the case where we occasionally need to read a line that is longer than the initial buffer size. Behave even if the file contains NUL bytes due to corruption. */ while (line[line_len-2] != '\0' && line[line_len-2] != '\n' && !feof (file)) { line = REALLOC (char, line, line_len *2); if (!line) { ++errors; goto cleanup; } line[line_len * 2 - 2] = '\0'; if (!fgets (&line[line_len -1], (int) line_len +1, file)) { break; } line_len *= 2; } if (line[0] == '\n' || line[0] == '#') { continue; } #undef STR_DLNAME #define STR_DLNAME "dlname=" if (strncmp (line, STR_DLNAME, sizeof (STR_DLNAME) - 1) == 0) { errors += trim (dlname, &line[sizeof (STR_DLNAME) - 1]); } #undef STR_OLD_LIBRARY #define STR_OLD_LIBRARY "old_library=" else if (strncmp (line, STR_OLD_LIBRARY, sizeof (STR_OLD_LIBRARY) - 1) == 0) { errors += trim (old_name, &line[sizeof (STR_OLD_LIBRARY) - 1]); } #undef STR_LIBDIR #define STR_LIBDIR "libdir=" else if (strncmp (line, STR_LIBDIR, sizeof (STR_LIBDIR) - 1) == 0) { errors += trim (libdir, &line[sizeof(STR_LIBDIR) - 1]); } #undef STR_DL_DEPLIBS #define STR_DL_DEPLIBS "dependency_libs=" else if (strncmp (line, STR_DL_DEPLIBS, sizeof (STR_DL_DEPLIBS) - 1) == 0) { errors += trim (deplibs, &line[sizeof (STR_DL_DEPLIBS) - 1]); } else if (streq (line, "installed=yes\n")) { *installed = 1; } else if (streq (line, "installed=no\n")) { *installed = 0; } #undef STR_LIBRARY_NAMES #define STR_LIBRARY_NAMES "library_names=" else if (!*dlname && strncmp (line, STR_LIBRARY_NAMES, sizeof (STR_LIBRARY_NAMES) - 1) == 0) { char *last_libname; errors += trim (dlname, &line[sizeof (STR_LIBRARY_NAMES) - 1]); if (!errors && *dlname && (last_libname = strrchr (*dlname, ' ')) != 0) { last_libname = lt__strdup (last_libname + 1); if (!last_libname) { ++errors; goto cleanup; } MEMREASSIGN (*dlname, last_libname); } } if (errors) break; } cleanup: FREE (line); return errors; } /* Try to open FILENAME as a module. */ static int try_dlopen (lt_dlhandle *phandle, const char *filename, const char *ext, lt_dladvise advise) { const char * saved_error = 0; char * archive_name = 0; char * canonical = 0; char * base_name = 0; char * dir = 0; char * name = 0; char * attempt = 0; int errors = 0; lt_dlhandle newhandle; assert (phandle); assert (*phandle == 0); #ifdef LT_DEBUG_LOADERS fprintf (stderr, "try_dlopen (%s, %s)\n", filename ? filename : "(null)", ext ? ext : "(null)"); #endif LT__GETERROR (saved_error); /* dlopen self? */ if (!filename) { *phandle = (lt_dlhandle) lt__zalloc (sizeof (struct lt__handle)); if (*phandle == 0) return 1; newhandle = *phandle; /* lt_dlclose()ing yourself is very bad! Disallow it. */ newhandle->info.is_resident = 1; if (tryall_dlopen (&newhandle, 0, advise, 0) != 0) { FREE (*phandle); return 1; } goto register_handle; } assert (filename && *filename); if (ext) { attempt = MALLOC (char, LT_STRLEN (filename) + LT_STRLEN (ext) + 1); if (!attempt) return 1; sprintf(attempt, "%s%s", filename, ext); } else { attempt = lt__strdup (filename); if (!attempt) return 1; } /* Doing this immediately allows internal functions to safely assume only canonicalized paths are passed. */ if (canonicalize_path (attempt, &canonical) != 0) { ++errors; goto cleanup; } /* If the canonical module name is a path (relative or absolute) then split it into a directory part and a name part. */ base_name = strrchr (canonical, '/'); if (base_name) { size_t dirlen = (1+ base_name) - canonical; dir = MALLOC (char, 1+ dirlen); if (!dir) { ++errors; goto cleanup; } strncpy (dir, canonical, dirlen); dir[dirlen] = LT_EOS_CHAR; ++base_name; } else MEMREASSIGN (base_name, canonical); assert (base_name && *base_name); ext = strrchr (base_name, '.'); if (!ext) { ext = base_name + LT_STRLEN (base_name); } /* extract the module name from the file name */ name = MALLOC (char, ext - base_name + 1); if (!name) { ++errors; goto cleanup; } /* canonicalize the module name */ { int i; for (i = 0; i < ext - base_name; ++i) { if (isalnum ((unsigned char)(base_name[i]))) { name[i] = base_name[i]; } else { name[i] = '_'; } } name[ext - base_name] = LT_EOS_CHAR; } /* Before trawling through the filesystem in search of a module, check whether we are opening a preloaded module. */ if (!dir) { const lt_dlvtable *vtable = lt_dlloader_find ("lt_preopen"); if (vtable) { /* name + "." + libext + NULL */ archive_name = MALLOC (char, LT_STRLEN (name) + LT_STRLEN (libext) + 2); *phandle = (lt_dlhandle) lt__zalloc (sizeof (struct lt__handle)); if ((*phandle == NULL) || (archive_name == NULL)) { ++errors; goto cleanup; } newhandle = *phandle; /* Preloaded modules are always named according to their old archive name. */ sprintf (archive_name, "%s.%s", name, libext); if (tryall_dlopen (&newhandle, archive_name, advise, vtable) == 0) { goto register_handle; } /* If we're still here, there was no matching preloaded module, so put things back as we found them, and continue searching. */ FREE (*phandle); newhandle = NULL; } } /* If we are allowing only preloaded modules, and we didn't find anything yet, give up on the search here. */ if (advise && advise->try_preload_only) { goto cleanup; } /* Check whether we are opening a libtool module (.la extension). */ if (ext && streq (ext, archive_ext)) { /* this seems to be a libtool module */ FILE * file = 0; char * dlname = 0; char * old_name = 0; char * libdir = 0; char * deplibs = 0; /* if we can't find the installed flag, it is probably an installed libtool archive, produced with an old version of libtool */ int installed = 1; /* Now try to open the .la file. If there is no directory name component, try to find it first in user_search_path and then other prescribed paths. Otherwise (or in any case if the module was not yet found) try opening just the module name as passed. */ if (!dir) { const char *search_path = user_search_path; if (search_path) file = find_file (user_search_path, base_name, &dir); if (!file) { search_path = getenv (LTDL_SEARCHPATH_VAR); if (search_path) file = find_file (search_path, base_name, &dir); } #if defined(LT_MODULE_PATH_VAR) if (!file) { search_path = getenv (LT_MODULE_PATH_VAR); if (search_path) file = find_file (search_path, base_name, &dir); } #endif #if defined(LT_DLSEARCH_PATH) if (!file && *sys_dlsearch_path) { file = find_file (sys_dlsearch_path, base_name, &dir); } #endif } else { file = fopen (attempt, LT_READTEXT_MODE); } /* If we didn't find the file by now, it really isn't there. Set the status flag, and bail out. */ if (!file) { LT__SETERROR (FILE_NOT_FOUND); ++errors; goto cleanup; } /* read the .la file */ if (parse_dotla_file(file, &dlname, &libdir, &deplibs, &old_name, &installed) != 0) ++errors; fclose (file); /* allocate the handle */ *phandle = (lt_dlhandle) lt__zalloc (sizeof (struct lt__handle)); if (*phandle == 0) ++errors; if (errors) { FREE (dlname); FREE (old_name); FREE (libdir); FREE (deplibs); FREE (*phandle); goto cleanup; } assert (*phandle); if (load_deplibs (*phandle, deplibs) == 0) { newhandle = *phandle; /* find_module may replace newhandle */ if (find_module (&newhandle, dir, libdir, dlname, old_name, installed, advise)) { unload_deplibs (*phandle); ++errors; } } else { ++errors; } FREE (dlname); FREE (old_name); FREE (libdir); FREE (deplibs); if (errors) { FREE (*phandle); goto cleanup; } if (*phandle != newhandle) { unload_deplibs (*phandle); } } else { /* not a libtool module */ *phandle = (lt_dlhandle) lt__zalloc (sizeof (struct lt__handle)); if (*phandle == 0) { ++errors; goto cleanup; } newhandle = *phandle; /* If the module has no directory name component, try to find it first in user_search_path and then other prescribed paths. Otherwise (or in any case if the module was not yet found) try opening just the module name as passed. */ if ((dir || (!find_handle (user_search_path, base_name, &newhandle, advise) && !find_handle (getenv (LTDL_SEARCHPATH_VAR), base_name, &newhandle, advise) #if defined(LT_MODULE_PATH_VAR) && !find_handle (getenv (LT_MODULE_PATH_VAR), base_name, &newhandle, advise) #endif #if defined(LT_DLSEARCH_PATH) && !find_handle (sys_dlsearch_path, base_name, &newhandle, advise) #endif ))) { if (tryall_dlopen (&newhandle, attempt, advise, 0) != 0) { newhandle = NULL; } } if (!newhandle) { FREE (*phandle); ++errors; goto cleanup; } } register_handle: MEMREASSIGN (*phandle, newhandle); if ((*phandle)->info.ref_count == 0) { (*phandle)->info.ref_count = 1; MEMREASSIGN ((*phandle)->info.name, name); (*phandle)->next = handles; handles = *phandle; } LT__SETERRORSTR (saved_error); cleanup: FREE (dir); FREE (attempt); FREE (name); if (!canonical) /* was MEMREASSIGNed */ FREE (base_name); FREE (canonical); FREE (archive_name); return errors; } /* If the last error messge store was `FILE_NOT_FOUND', then return non-zero. */ static int file_not_found (void) { const char *error = 0; LT__GETERROR (error); if (error == LT__STRERROR (FILE_NOT_FOUND)) return 1; return 0; } /* Unless FILENAME already bears a suitable library extension, then return 0. */ static int has_library_ext (const char *filename) { char * ext = 0; assert (filename); ext = strrchr (filename, '.'); if (ext && ((streq (ext, archive_ext)) #if defined(LT_MODULE_EXT) || (streq (ext, shlib_ext)) #endif )) { return 1; } return 0; } /* Initialise and configure a user lt_dladvise opaque object. */ int lt_dladvise_init (lt_dladvise *padvise) { lt_dladvise advise = (lt_dladvise) lt__zalloc (sizeof (struct lt__advise)); *padvise = advise; return (advise ? 0 : 1); } int lt_dladvise_destroy (lt_dladvise *padvise) { if (padvise) FREE(*padvise); return 0; } int lt_dladvise_ext (lt_dladvise *padvise) { assert (padvise && *padvise); (*padvise)->try_ext = 1; return 0; } int lt_dladvise_resident (lt_dladvise *padvise) { assert (padvise && *padvise); (*padvise)->is_resident = 1; return 0; } int lt_dladvise_local (lt_dladvise *padvise) { assert (padvise && *padvise); (*padvise)->is_symlocal = 1; return 0; } int lt_dladvise_global (lt_dladvise *padvise) { assert (padvise && *padvise); (*padvise)->is_symglobal = 1; return 0; } int lt_dladvise_preload (lt_dladvise *padvise) { assert (padvise && *padvise); (*padvise)->try_preload_only = 1; return 0; } /* Libtool-1.5.x interface for loading a new module named FILENAME. */ lt_dlhandle lt_dlopen (const char *filename) { return lt_dlopenadvise (filename, NULL); } /* If FILENAME has an ARCHIVE_EXT or MODULE_EXT extension, try to open the FILENAME as passed. Otherwise try appending ARCHIVE_EXT, and if a file is still not found try again with MODULE_EXT appended instead. */ lt_dlhandle lt_dlopenext (const char *filename) { lt_dlhandle handle = 0; lt_dladvise advise; if (!lt_dladvise_init (&advise) && !lt_dladvise_ext (&advise)) handle = lt_dlopenadvise (filename, advise); lt_dladvise_destroy (&advise); return handle; } lt_dlhandle lt_dlopenadvise (const char *filename, lt_dladvise advise) { lt_dlhandle handle = 0; int errors = 0; /* Can't have symbols hidden and visible at the same time! */ if (advise && advise->is_symlocal && advise->is_symglobal) { LT__SETERROR (CONFLICTING_FLAGS); return 0; } if (!filename || !advise || !advise->try_ext || has_library_ext (filename)) { /* Just incase we missed a code path in try_dlopen() that reports an error, but forgot to reset handle... */ if (try_dlopen (&handle, filename, NULL, advise) != 0) return 0; return handle; } else if (filename && *filename) { /* First try appending ARCHIVE_EXT. */ errors += try_dlopen (&handle, filename, archive_ext, advise); /* If we found FILENAME, stop searching -- whether we were able to load the file as a module or not. If the file exists but loading failed, it is better to return an error message here than to report FILE_NOT_FOUND when the alternatives (foo.so etc) are not in the module search path. */ if (handle || ((errors > 0) && !file_not_found ())) return handle; #if defined(LT_MODULE_EXT) /* Try appending SHLIB_EXT. */ errors = try_dlopen (&handle, filename, shlib_ext, advise); /* As before, if the file was found but loading failed, return now with the current error message. */ if (handle || ((errors > 0) && !file_not_found ())) return handle; #endif } /* Still here? Then we really did fail to locate any of the file names we tried. */ LT__SETERROR (FILE_NOT_FOUND); return 0; } static int lt_argz_insert (char **pargz, size_t *pargz_len, char *before, const char *entry) { error_t error; /* Prior to Sep 8, 2005, newlib had a bug where argz_insert(pargz, pargz_len, NULL, entry) failed with EINVAL. */ if (before) error = argz_insert (pargz, pargz_len, before, entry); else error = argz_append (pargz, pargz_len, entry, 1 + strlen (entry)); if (error) { switch (error) { case ENOMEM: LT__SETERROR (NO_MEMORY); break; default: LT__SETERROR (UNKNOWN); break; } return 1; } return 0; } static int lt_argz_insertinorder (char **pargz, size_t *pargz_len, const char *entry) { char *before = 0; assert (pargz); assert (pargz_len); assert (entry && *entry); if (*pargz) while ((before = argz_next (*pargz, *pargz_len, before))) { int cmp = strcmp (entry, before); if (cmp < 0) break; if (cmp == 0) return 0; /* No duplicates! */ } return lt_argz_insert (pargz, pargz_len, before, entry); } static int lt_argz_insertdir (char **pargz, size_t *pargz_len, const char *dirnam, struct dirent *dp) { char *buf = 0; size_t buf_len = 0; char *end = 0; size_t end_offset = 0; size_t dir_len = 0; int errors = 0; assert (pargz); assert (pargz_len); assert (dp); dir_len = LT_STRLEN (dirnam); end = dp->d_name + D_NAMLEN(dp); /* Ignore version numbers. */ { char *p; for (p = end; p -1 > dp->d_name; --p) if (strchr (".0123456789", p[-1]) == 0) break; if (*p == '.') end = p; } /* Ignore filename extension. */ { char *p; for (p = end -1; p > dp->d_name; --p) if (*p == '.') { end = p; break; } } /* Prepend the directory name. */ end_offset = end - dp->d_name; buf_len = dir_len + 1+ end_offset; buf = MALLOC (char, 1+ buf_len); if (!buf) return ++errors; assert (buf); strcpy (buf, dirnam); strcat (buf, "/"); strncat (buf, dp->d_name, end_offset); buf[buf_len] = LT_EOS_CHAR; /* Try to insert (in order) into ARGZ/ARGZ_LEN. */ if (lt_argz_insertinorder (pargz, pargz_len, buf) != 0) ++errors; FREE (buf); return errors; } static int list_files_by_dir (const char *dirnam, char **pargz, size_t *pargz_len) { DIR *dirp = 0; int errors = 0; assert (dirnam && *dirnam); assert (pargz); assert (pargz_len); assert (dirnam[LT_STRLEN(dirnam) -1] != '/'); dirp = opendir (dirnam); if (dirp) { struct dirent *dp = 0; while ((dp = readdir (dirp))) if (dp->d_name[0] != '.') if (lt_argz_insertdir (pargz, pargz_len, dirnam, dp)) { ++errors; break; } closedir (dirp); } else ++errors; return errors; } /* If there are any files in DIRNAME, call the function passed in DATA1 (with the name of each file and DATA2 as arguments). */ static int foreachfile_callback (char *dirname, void *data1, void *data2) { file_worker_func *func = *(file_worker_func **) data1; int is_done = 0; char *argz = 0; size_t argz_len = 0; if (list_files_by_dir (dirname, &argz, &argz_len) != 0) goto cleanup; if (!argz) goto cleanup; { char *filename = 0; while ((filename = argz_next (argz, argz_len, filename))) if ((is_done = (*func) (filename, data2))) break; } cleanup: FREE (argz); return is_done; } /* Call FUNC for each unique extensionless file in SEARCH_PATH, along with DATA. The filenames passed to FUNC would be suitable for passing to lt_dlopenext. The extensions are stripped so that individual modules do not generate several entries (e.g. libfoo.la, libfoo.so, libfoo.so.1, libfoo.so.1.0.0). If SEARCH_PATH is NULL, then the same directories that lt_dlopen would search are examined. */ int lt_dlforeachfile (const char *search_path, int (*func) (const char *filename, void *data), void *data) { int is_done = 0; file_worker_func **fpptr = &func; if (search_path) { /* If a specific path was passed, search only the directories listed in it. */ is_done = foreach_dirinpath (search_path, 0, foreachfile_callback, fpptr, data); } else { /* Otherwise search the default paths. */ is_done = foreach_dirinpath (user_search_path, 0, foreachfile_callback, fpptr, data); if (!is_done) { is_done = foreach_dirinpath (getenv(LTDL_SEARCHPATH_VAR), 0, foreachfile_callback, fpptr, data); } #if defined(LT_MODULE_PATH_VAR) if (!is_done) { is_done = foreach_dirinpath (getenv(LT_MODULE_PATH_VAR), 0, foreachfile_callback, fpptr, data); } #endif #if defined(LT_DLSEARCH_PATH) if (!is_done && *sys_dlsearch_path) { is_done = foreach_dirinpath (sys_dlsearch_path, 0, foreachfile_callback, fpptr, data); } #endif } return is_done; } int lt_dlclose (lt_dlhandle handle) { lt_dlhandle cur, last; int errors = 0; /* check whether the handle is valid */ last = cur = handles; while (cur && handle != cur) { last = cur; cur = cur->next; } if (!cur) { LT__SETERROR (INVALID_HANDLE); ++errors; goto done; } cur = handle; cur->info.ref_count--; /* Note that even with resident modules, we must track the ref_count correctly incase the user decides to reset the residency flag later (even though the API makes no provision for that at the moment). */ if (cur->info.ref_count <= 0 && !LT_DLIS_RESIDENT (cur)) { lt_user_data data = cur->vtable->dlloader_data; if (cur != handles) { last->next = cur->next; } else { handles = cur->next; } errors += cur->vtable->module_close (data, cur->module); errors += unload_deplibs (handle); /* It is up to the callers to free the data itself. */ FREE (cur->interface_data); FREE (cur->info.filename); FREE (cur->info.name); FREE (cur); goto done; } if (LT_DLIS_RESIDENT (handle)) { LT__SETERROR (CLOSE_RESIDENT_MODULE); ++errors; } done: return errors; } void * lt_dlsym (lt_dlhandle place, const char *symbol) { size_t lensym; char lsym[LT_SYMBOL_LENGTH]; char *sym; void *address; lt_user_data data; lt_dlhandle handle; if (!place) { LT__SETERROR (INVALID_HANDLE); return 0; } handle = place; if (!symbol) { LT__SETERROR (SYMBOL_NOT_FOUND); return 0; } lensym = LT_STRLEN (symbol) + LT_STRLEN (handle->vtable->sym_prefix) + LT_STRLEN (handle->info.name); if (lensym + LT_SYMBOL_OVERHEAD < LT_SYMBOL_LENGTH) { sym = lsym; } else { sym = MALLOC (char, lensym + LT_SYMBOL_OVERHEAD + 1); if (!sym) { LT__SETERROR (BUFFER_OVERFLOW); return 0; } } data = handle->vtable->dlloader_data; if (handle->info.name) { const char *saved_error; LT__GETERROR (saved_error); /* this is a libtool module */ if (handle->vtable->sym_prefix) { strcpy(sym, handle->vtable->sym_prefix); strcat(sym, handle->info.name); } else { strcpy(sym, handle->info.name); } strcat(sym, "_LTX_"); strcat(sym, symbol); /* try "modulename_LTX_symbol" */ address = handle->vtable->find_sym (data, handle->module, sym); if (address) { if (sym != lsym) { FREE (sym); } return address; } LT__SETERRORSTR (saved_error); } /* otherwise try "symbol" */ if (handle->vtable->sym_prefix) { strcpy(sym, handle->vtable->sym_prefix); strcat(sym, symbol); } else { strcpy(sym, symbol); } address = handle->vtable->find_sym (data, handle->module, sym); if (sym != lsym) { FREE (sym); } return address; } const char * lt_dlerror (void) { const char *error; LT__GETERROR (error); LT__SETERRORSTR (0); return error ? error : NULL; } static int lt_dlpath_insertdir (char **ppath, char *before, const char *dir) { int errors = 0; char *canonical = 0; char *argz = 0; size_t argz_len = 0; assert (ppath); assert (dir && *dir); if (canonicalize_path (dir, &canonical) != 0) { ++errors; goto cleanup; } assert (canonical && *canonical); /* If *PPATH is empty, set it to DIR. */ if (*ppath == 0) { assert (!before); /* BEFORE cannot be set without PPATH. */ assert (dir); /* Without DIR, don't call this function! */ *ppath = lt__strdup (dir); if (*ppath == 0) ++errors; goto cleanup; } assert (ppath && *ppath); if (argzize_path (*ppath, &argz, &argz_len) != 0) { ++errors; goto cleanup; } /* Convert BEFORE into an equivalent offset into ARGZ. This only works if *PPATH is already canonicalized, and hence does not change length with respect to ARGZ. We canonicalize each entry as it is added to the search path, and don't call this function with (uncanonicalized) user paths, so this is a fair assumption. */ if (before) { assert (*ppath <= before); assert ((int) (before - *ppath) <= (int) strlen (*ppath)); before = before - *ppath + argz; } if (lt_argz_insert (&argz, &argz_len, before, dir) != 0) { ++errors; goto cleanup; } argz_stringify (argz, argz_len, LT_PATHSEP_CHAR); MEMREASSIGN(*ppath, argz); cleanup: FREE (argz); FREE (canonical); return errors; } int lt_dladdsearchdir (const char *search_dir) { int errors = 0; if (search_dir && *search_dir) { if (lt_dlpath_insertdir (&user_search_path, 0, search_dir) != 0) ++errors; } return errors; } int lt_dlinsertsearchdir (const char *before, const char *search_dir) { int errors = 0; if (before) { if ((before < user_search_path) || (before >= user_search_path + LT_STRLEN (user_search_path))) { LT__SETERROR (INVALID_POSITION); return 1; } } if (search_dir && *search_dir) { if (lt_dlpath_insertdir (&user_search_path, (char *) before, search_dir) != 0) { ++errors; } } return errors; } int lt_dlsetsearchpath (const char *search_path) { int errors = 0; FREE (user_search_path); if (!search_path || !LT_STRLEN (search_path)) { return errors; } if (canonicalize_path (search_path, &user_search_path) != 0) ++errors; return errors; } const char * lt_dlgetsearchpath (void) { const char *saved_path; saved_path = user_search_path; return saved_path; } int lt_dlmakeresident (lt_dlhandle handle) { int errors = 0; if (!handle) { LT__SETERROR (INVALID_HANDLE); ++errors; } else { handle->info.is_resident = 1; } return errors; } int lt_dlisresident (lt_dlhandle handle) { if (!handle) { LT__SETERROR (INVALID_HANDLE); return -1; } return LT_DLIS_RESIDENT (handle); } /* --- MODULE INFORMATION --- */ typedef struct { const char *id_string; lt_dlhandle_interface *iface; } lt__interface_id; lt_dlinterface_id lt_dlinterface_register (const char *id_string, lt_dlhandle_interface *iface) { lt__interface_id *interface_id = (lt__interface_id *) lt__malloc (sizeof *interface_id); /* If lt__malloc fails, it will LT__SETERROR (NO_MEMORY), which can then be detected with lt_dlerror() if we return 0. */ if (interface_id) { interface_id->id_string = lt__strdup (id_string); if (!interface_id->id_string) FREE (interface_id); else interface_id->iface = iface; } return (lt_dlinterface_id) interface_id; } void lt_dlinterface_free (lt_dlinterface_id key) { lt__interface_id *interface_id = (lt__interface_id *)key; FREE (interface_id->id_string); FREE (interface_id); } void * lt_dlcaller_set_data (lt_dlinterface_id key, lt_dlhandle handle, void *data) { int n_elements = 0; void *stale = (void *) 0; lt_dlhandle cur = handle; int i; if (cur->interface_data) while (cur->interface_data[n_elements].key) ++n_elements; for (i = 0; i < n_elements; ++i) { if (cur->interface_data[i].key == key) { stale = cur->interface_data[i].data; break; } } /* Ensure that there is enough room in this handle's interface_data array to accept a new element (and an empty end marker). */ if (i == n_elements) { lt_interface_data *temp = REALLOC (lt_interface_data, cur->interface_data, 2+ n_elements); if (!temp) { stale = 0; goto done; } cur->interface_data = temp; /* We only need this if we needed to allocate a new interface_data. */ cur->interface_data[i].key = key; cur->interface_data[1+ i].key = 0; } cur->interface_data[i].data = data; done: return stale; } void * lt_dlcaller_get_data (lt_dlinterface_id key, lt_dlhandle handle) { void *result = (void *) 0; lt_dlhandle cur = handle; /* Locate the index of the element with a matching KEY. */ if (cur->interface_data) { int i; for (i = 0; cur->interface_data[i].key; ++i) { if (cur->interface_data[i].key == key) { result = cur->interface_data[i].data; break; } } } return result; } const lt_dlinfo * lt_dlgetinfo (lt_dlhandle handle) { if (!handle) { LT__SETERROR (INVALID_HANDLE); return 0; } return &(handle->info); } lt_dlhandle lt_dlhandle_iterate (lt_dlinterface_id iface, lt_dlhandle place) { lt_dlhandle handle = place; lt__interface_id *iterator = (lt__interface_id *) iface; assert (iface); /* iface is a required argument */ if (!handle) handle = handles; else handle = handle->next; /* advance while the interface check fails */ while (handle && iterator->iface && ((*iterator->iface) (handle, iterator->id_string) != 0)) { handle = handle->next; } return handle; } lt_dlhandle lt_dlhandle_fetch (lt_dlinterface_id iface, const char *module_name) { lt_dlhandle handle = 0; assert (iface); /* iface is a required argument */ while ((handle = lt_dlhandle_iterate (iface, handle))) { lt_dlhandle cur = handle; if (cur && cur->info.name && streq (cur->info.name, module_name)) break; } return handle; } int lt_dlhandle_map (lt_dlinterface_id iface, int (*func) (lt_dlhandle handle, void *data), void *data) { lt__interface_id *iterator = (lt__interface_id *) iface; lt_dlhandle cur = handles; assert (iface); /* iface is a required argument */ while (cur) { int errorcode = 0; /* advance while the interface check fails */ while (cur && iterator->iface && ((*iterator->iface) (cur, iterator->id_string) != 0)) { cur = cur->next; } if ((errorcode = (*func) (cur, data)) != 0) return errorcode; } return 0; } libprelude-1.0.0/libltdl/lt__dirent.c0000644000076400007640000000573211347714403014520 00000000000000/* lt__dirent.c -- internal directory entry scanning interface Copyright (C) 2001, 2004 Free Software Foundation, Inc. Written by Bob Friesenhahn, 2001 NOTE: The canonical source of this file is maintained with the GNU Libtool package. Report bugs to bug-libtool@gnu.org. GNU Libltdl is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. As a special exception to the GNU Lesser General Public License, if you distribute this file as part of a program or library that is built using GNU Libtool, you may include this file under the same distribution terms that you use for the rest of that program. GNU Libltdl 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 Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with GNU Libltdl; see the file COPYING.LIB. If not, a copy can be downloaded from http://www.gnu.org/licenses/lgpl.html, or obtained by writing to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ #include "lt__private.h" #include #include #include "lt__dirent.h" #if defined(__WINDOWS__) void closedir (DIR *entry) { assert (entry != (DIR *) NULL); FindClose (entry->hSearch); free ((void *) entry); } DIR * opendir (const char *path) { char file_spec[LT_FILENAME_MAX]; DIR *entry; assert (path != (char *) 0); if (lt_strlcpy (file_spec, path, sizeof file_spec) >= sizeof file_spec || lt_strlcat (file_spec, "\\", sizeof file_spec) >= sizeof file_spec) return (DIR *) 0; entry = (DIR *) malloc (sizeof(DIR)); if (entry != (DIR *) 0) { entry->firsttime = TRUE; entry->hSearch = FindFirstFile (file_spec, &entry->Win32FindData); if (entry->hSearch == INVALID_HANDLE_VALUE) { if (lt_strlcat (file_spec, "\\*.*", sizeof file_spec) < sizeof file_spec) { entry->hSearch = FindFirstFile (file_spec, &entry->Win32FindData); } if (entry->hSearch == INVALID_HANDLE_VALUE) { entry = (free (entry), (DIR *) 0); } } } return entry; } struct dirent * readdir (DIR *entry) { int status; if (entry == (DIR *) 0) return (struct dirent *) 0; if (!entry->firsttime) { status = FindNextFile (entry->hSearch, &entry->Win32FindData); if (status == 0) return (struct dirent *) 0; } entry->firsttime = FALSE; if (lt_strlcpy (entry->file_info.d_name, entry->Win32FindData.cFileName, sizeof entry->file_info.d_name) >= sizeof entry->file_info.d_name) return (struct dirent *) 0; entry->file_info.d_namlen = strlen (entry->file_info.d_name); return &entry->file_info; } #endif /*defined(__WINDOWS__)*/ libprelude-1.0.0/libltdl/Makefile.in0000664000076400007640000022710711347714455014311 00000000000000# Makefile.in generated by automake 1.11.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, # Inc. # This Makefile.in 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. @SET_MAKE@ ##### VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ target_triplet = @target@ @INSTALL_LTDL_TRUE@am__append_1 = ltdl.h @INSTALL_LTDL_TRUE@am__append_2 = libltdl.la @CONVENIENCE_LTDL_TRUE@am__append_3 = libltdlc.la subdir = libltdl DIST_COMMON = README $(am__include_HEADERS_DIST) \ $(am__ltdlinclude_HEADERS_DIST) $(srcdir)/Makefile.am \ $(srcdir)/Makefile.in COPYING.LIB ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/libmissing/m4/00gnulib.m4 \ $(top_srcdir)/libmissing/m4/alloca.m4 \ $(top_srcdir)/libmissing/m4/arpa_inet_h.m4 \ $(top_srcdir)/libmissing/m4/btowc.m4 \ $(top_srcdir)/libmissing/m4/close.m4 \ $(top_srcdir)/libmissing/m4/codeset.m4 \ $(top_srcdir)/libmissing/m4/cond.m4 \ $(top_srcdir)/libmissing/m4/dos.m4 \ $(top_srcdir)/libmissing/m4/dup2.m4 \ $(top_srcdir)/libmissing/m4/errno_h.m4 \ $(top_srcdir)/libmissing/m4/exponentd.m4 \ $(top_srcdir)/libmissing/m4/exponentf.m4 \ $(top_srcdir)/libmissing/m4/exponentl.m4 \ $(top_srcdir)/libmissing/m4/extensions.m4 \ $(top_srcdir)/libmissing/m4/fclose.m4 \ $(top_srcdir)/libmissing/m4/fcntl-o.m4 \ $(top_srcdir)/libmissing/m4/fcntl_h.m4 \ $(top_srcdir)/libmissing/m4/float_h.m4 \ $(top_srcdir)/libmissing/m4/fopen.m4 \ $(top_srcdir)/libmissing/m4/fpieee.m4 \ $(top_srcdir)/libmissing/m4/frexp.m4 \ $(top_srcdir)/libmissing/m4/frexpl.m4 \ $(top_srcdir)/libmissing/m4/fseeko.m4 \ $(top_srcdir)/libmissing/m4/ftw.m4 \ $(top_srcdir)/libmissing/m4/getaddrinfo.m4 \ $(top_srcdir)/libmissing/m4/getdelim.m4 \ $(top_srcdir)/libmissing/m4/gethostname.m4 \ $(top_srcdir)/libmissing/m4/getline.m4 \ $(top_srcdir)/libmissing/m4/getpagesize.m4 \ $(top_srcdir)/libmissing/m4/getpass.m4 \ $(top_srcdir)/libmissing/m4/gettimeofday.m4 \ $(top_srcdir)/libmissing/m4/glibc21.m4 \ $(top_srcdir)/libmissing/m4/gnulib-common.m4 \ $(top_srcdir)/libmissing/m4/gnulib-comp.m4 \ $(top_srcdir)/libmissing/m4/gnulib-tool.m4 \ $(top_srcdir)/libmissing/m4/hostent.m4 \ $(top_srcdir)/libmissing/m4/include_next.m4 \ $(top_srcdir)/libmissing/m4/inet_ntop.m4 \ $(top_srcdir)/libmissing/m4/inet_pton.m4 \ $(top_srcdir)/libmissing/m4/intmax_t.m4 \ $(top_srcdir)/libmissing/m4/inttypes_h.m4 \ $(top_srcdir)/libmissing/m4/isnand.m4 \ $(top_srcdir)/libmissing/m4/isnanf.m4 \ $(top_srcdir)/libmissing/m4/isnanl.m4 \ $(top_srcdir)/libmissing/m4/langinfo_h.m4 \ $(top_srcdir)/libmissing/m4/ldexpl.m4 \ $(top_srcdir)/libmissing/m4/lib-ld.m4 \ $(top_srcdir)/libmissing/m4/lib-link.m4 \ $(top_srcdir)/libmissing/m4/lib-prefix.m4 \ $(top_srcdir)/libmissing/m4/localcharset.m4 \ $(top_srcdir)/libmissing/m4/locale-fr.m4 \ $(top_srcdir)/libmissing/m4/locale-ja.m4 \ $(top_srcdir)/libmissing/m4/locale-tr.m4 \ $(top_srcdir)/libmissing/m4/locale-zh.m4 \ $(top_srcdir)/libmissing/m4/lock.m4 \ $(top_srcdir)/libmissing/m4/longlong.m4 \ $(top_srcdir)/libmissing/m4/lseek.m4 \ $(top_srcdir)/libmissing/m4/lstat.m4 \ $(top_srcdir)/libmissing/m4/malloc.m4 \ $(top_srcdir)/libmissing/m4/math_h.m4 \ $(top_srcdir)/libmissing/m4/mbrtowc.m4 \ $(top_srcdir)/libmissing/m4/mbsinit.m4 \ $(top_srcdir)/libmissing/m4/mbstate_t.m4 \ $(top_srcdir)/libmissing/m4/memchr.m4 \ $(top_srcdir)/libmissing/m4/memmem.m4 \ $(top_srcdir)/libmissing/m4/minmax.m4 \ $(top_srcdir)/libmissing/m4/mktime.m4 \ $(top_srcdir)/libmissing/m4/mmap-anon.m4 \ $(top_srcdir)/libmissing/m4/mode_t.m4 \ $(top_srcdir)/libmissing/m4/multiarch.m4 \ $(top_srcdir)/libmissing/m4/netdb_h.m4 \ $(top_srcdir)/libmissing/m4/netinet_in_h.m4 \ $(top_srcdir)/libmissing/m4/nl_langinfo.m4 \ $(top_srcdir)/libmissing/m4/nocrash.m4 \ $(top_srcdir)/libmissing/m4/onceonly.m4 \ $(top_srcdir)/libmissing/m4/open.m4 \ $(top_srcdir)/libmissing/m4/pathmax.m4 \ $(top_srcdir)/libmissing/m4/perror.m4 \ $(top_srcdir)/libmissing/m4/poll.m4 \ $(top_srcdir)/libmissing/m4/printf-frexp.m4 \ $(top_srcdir)/libmissing/m4/printf-frexpl.m4 \ $(top_srcdir)/libmissing/m4/printf.m4 \ $(top_srcdir)/libmissing/m4/realloc.m4 \ $(top_srcdir)/libmissing/m4/regex.m4 \ $(top_srcdir)/libmissing/m4/relocatable-lib.m4 \ $(top_srcdir)/libmissing/m4/select.m4 \ $(top_srcdir)/libmissing/m4/servent.m4 \ $(top_srcdir)/libmissing/m4/signal_h.m4 \ $(top_srcdir)/libmissing/m4/signalblocking.m4 \ $(top_srcdir)/libmissing/m4/signbit.m4 \ $(top_srcdir)/libmissing/m4/size_max.m4 \ $(top_srcdir)/libmissing/m4/sleep.m4 \ $(top_srcdir)/libmissing/m4/snprintf-posix.m4 \ $(top_srcdir)/libmissing/m4/snprintf.m4 \ $(top_srcdir)/libmissing/m4/sockets.m4 \ $(top_srcdir)/libmissing/m4/socklen.m4 \ $(top_srcdir)/libmissing/m4/sockpfaf.m4 \ $(top_srcdir)/libmissing/m4/ssize_t.m4 \ $(top_srcdir)/libmissing/m4/stat.m4 \ $(top_srcdir)/libmissing/m4/stdbool.m4 \ $(top_srcdir)/libmissing/m4/stddef_h.m4 \ $(top_srcdir)/libmissing/m4/stdint.m4 \ $(top_srcdir)/libmissing/m4/stdint_h.m4 \ $(top_srcdir)/libmissing/m4/stdio_h.m4 \ $(top_srcdir)/libmissing/m4/stdlib_h.m4 \ $(top_srcdir)/libmissing/m4/strcase.m4 \ $(top_srcdir)/libmissing/m4/strcasestr.m4 \ $(top_srcdir)/libmissing/m4/strdup.m4 \ $(top_srcdir)/libmissing/m4/strerror.m4 \ $(top_srcdir)/libmissing/m4/string_h.m4 \ $(top_srcdir)/libmissing/m4/strings_h.m4 \ $(top_srcdir)/libmissing/m4/strndup.m4 \ $(top_srcdir)/libmissing/m4/strnlen.m4 \ $(top_srcdir)/libmissing/m4/strptime.m4 \ $(top_srcdir)/libmissing/m4/strsep.m4 \ $(top_srcdir)/libmissing/m4/symlink.m4 \ $(top_srcdir)/libmissing/m4/sys_ioctl_h.m4 \ $(top_srcdir)/libmissing/m4/sys_select_h.m4 \ $(top_srcdir)/libmissing/m4/sys_socket_h.m4 \ $(top_srcdir)/libmissing/m4/sys_stat_h.m4 \ $(top_srcdir)/libmissing/m4/sys_time_h.m4 \ $(top_srcdir)/libmissing/m4/sys_utsname_h.m4 \ $(top_srcdir)/libmissing/m4/thread.m4 \ $(top_srcdir)/libmissing/m4/threadlib.m4 \ $(top_srcdir)/libmissing/m4/time_h.m4 \ $(top_srcdir)/libmissing/m4/time_r.m4 \ $(top_srcdir)/libmissing/m4/timegm.m4 \ $(top_srcdir)/libmissing/m4/tls.m4 \ $(top_srcdir)/libmissing/m4/tm_gmtoff.m4 \ $(top_srcdir)/libmissing/m4/uname.m4 \ $(top_srcdir)/libmissing/m4/ungetc.m4 \ $(top_srcdir)/libmissing/m4/unistd_h.m4 \ $(top_srcdir)/libmissing/m4/vasnprintf.m4 \ $(top_srcdir)/libmissing/m4/vsnprintf-posix.m4 \ $(top_srcdir)/libmissing/m4/vsnprintf.m4 \ $(top_srcdir)/libmissing/m4/warn-on-use.m4 \ $(top_srcdir)/libmissing/m4/wchar.m4 \ $(top_srcdir)/libmissing/m4/wchar_t.m4 \ $(top_srcdir)/libmissing/m4/wcrtomb.m4 \ $(top_srcdir)/libmissing/m4/wctob.m4 \ $(top_srcdir)/libmissing/m4/wctype.m4 \ $(top_srcdir)/libmissing/m4/wint_t.m4 \ $(top_srcdir)/libmissing/m4/write.m4 \ $(top_srcdir)/libmissing/m4/xsize.m4 \ $(top_srcdir)/libmissing/m4/yield.m4 \ $(top_srcdir)/m4/ac_compile_check_sizeof.m4 \ $(top_srcdir)/m4/am_path_ruby.m4 $(top_srcdir)/m4/argz.m4 \ $(top_srcdir)/m4/as-ac-expand.m4 \ $(top_srcdir)/m4/ax_c_check_flag.m4 \ $(top_srcdir)/m4/ax_check_aligned_access_required.m4 \ $(top_srcdir)/m4/ax_create_prelude_inttypes_h.m4 \ $(top_srcdir)/m4/ax_ld_check_flag.m4 \ $(top_srcdir)/m4/gtk-doc.m4 $(top_srcdir)/m4/libgcrypt.m4 \ $(top_srcdir)/m4/libgnutls-extra.m4 \ $(top_srcdir)/m4/libgnutls.m4 $(top_srcdir)/m4/libtool.m4 \ $(top_srcdir)/m4/ltdl.m4 $(top_srcdir)/m4/ltoptions.m4 \ $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/m4/pkg.m4 \ $(top_srcdir)/configure.in am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; am__install_max = 40 am__nobase_strip_setup = \ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` am__nobase_strip = \ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" am__nobase_list = $(am__nobase_strip_setup); \ for p in $$list; do echo "$$p $$p"; done | \ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ if (++n[$$2] == $(am__install_max)) \ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ END { for (dir in files) print dir, files[dir] }' am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' am__installdirs = "$(DESTDIR)$(libdir)" "$(DESTDIR)$(includedir)" \ "$(DESTDIR)$(ltdlincludedir)" LTLIBRARIES = $(lib_LTLIBRARIES) $(noinst_LTLIBRARIES) dld_link_la_DEPENDENCIES = am_dld_link_la_OBJECTS = dld_link.lo dld_link_la_OBJECTS = $(am_dld_link_la_OBJECTS) dld_link_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(dld_link_la_LDFLAGS) $(LDFLAGS) -o $@ am__DEPENDENCIES_1 = dlopen_la_DEPENDENCIES = $(am__DEPENDENCIES_1) am_dlopen_la_OBJECTS = dlopen.lo dlopen_la_OBJECTS = $(am_dlopen_la_OBJECTS) dlopen_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(dlopen_la_LDFLAGS) $(LDFLAGS) -o $@ dyld_la_LIBADD = am_dyld_la_OBJECTS = dyld.lo dyld_la_OBJECTS = $(am_dyld_la_OBJECTS) dyld_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(dyld_la_LDFLAGS) \ $(LDFLAGS) -o $@ am_libltdl_la_OBJECTS = libltdl_la-preopen.lo libltdl_la-lt__alloc.lo \ libltdl_la-lt_dlloader.lo libltdl_la-lt_error.lo \ libltdl_la-ltdl.lo libltdl_la-slist.lo libltdl_la_OBJECTS = $(am_libltdl_la_OBJECTS) libltdl_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(libltdl_la_LDFLAGS) $(LDFLAGS) -o $@ @INSTALL_LTDL_TRUE@am_libltdl_la_rpath = -rpath $(libdir) am__DEPENDENCIES_2 = $(am__DEPENDENCIES_1) am__objects_1 = libltdlc_la-preopen.lo libltdlc_la-lt__alloc.lo \ libltdlc_la-lt_dlloader.lo libltdlc_la-lt_error.lo \ libltdlc_la-ltdl.lo libltdlc_la-slist.lo am_libltdlc_la_OBJECTS = $(am__objects_1) libltdlc_la_OBJECTS = $(am_libltdlc_la_OBJECTS) libltdlc_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(libltdlc_la_LDFLAGS) $(LDFLAGS) -o $@ @CONVENIENCE_LTDL_TRUE@am_libltdlc_la_rpath = load_add_on_la_LIBADD = am_load_add_on_la_OBJECTS = load_add_on.lo load_add_on_la_OBJECTS = $(am_load_add_on_la_OBJECTS) load_add_on_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(load_add_on_la_LDFLAGS) $(LDFLAGS) -o $@ loadlibrary_la_LIBADD = am_loadlibrary_la_OBJECTS = loadlibrary.lo loadlibrary_la_OBJECTS = $(am_loadlibrary_la_OBJECTS) loadlibrary_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(loadlibrary_la_LDFLAGS) $(LDFLAGS) -o $@ shl_load_la_DEPENDENCIES = $(am__DEPENDENCIES_1) am_shl_load_la_OBJECTS = shl_load.lo shl_load_la_OBJECTS = $(am_shl_load_la_OBJECTS) shl_load_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(shl_load_la_LDFLAGS) $(LDFLAGS) -o $@ DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) CCLD = $(CC) LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ $(LDFLAGS) -o $@ SOURCES = $(dld_link_la_SOURCES) $(dlopen_la_SOURCES) \ $(dyld_la_SOURCES) $(libltdl_la_SOURCES) \ $(libltdlc_la_SOURCES) $(load_add_on_la_SOURCES) \ $(loadlibrary_la_SOURCES) $(shl_load_la_SOURCES) DIST_SOURCES = $(dld_link_la_SOURCES) $(dlopen_la_SOURCES) \ $(dyld_la_SOURCES) $(libltdl_la_SOURCES) \ $(libltdlc_la_SOURCES) $(load_add_on_la_SOURCES) \ $(loadlibrary_la_SOURCES) $(shl_load_la_SOURCES) am__include_HEADERS_DIST = ltdl.h am__ltdlinclude_HEADERS_DIST = libltdl/lt_system.h libltdl/lt_error.h \ libltdl/lt_dlloader.h HEADERS = $(include_HEADERS) $(ltdlinclude_HEADERS) ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ ALLOCA = @ALLOCA@ ALLOCA_H = @ALLOCA_H@ AMTAR = @AMTAR@ APPLE_UNIVERSAL_BUILD = @APPLE_UNIVERSAL_BUILD@ AR = @AR@ ARGZ_H = @ARGZ_H@ AS = @AS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ BINDINGS_CC = @BINDINGS_CC@ BINDIR = @BINDIR@ BITSIZEOF_PTRDIFF_T = @BITSIZEOF_PTRDIFF_T@ BITSIZEOF_SIG_ATOMIC_T = @BITSIZEOF_SIG_ATOMIC_T@ BITSIZEOF_SIZE_T = @BITSIZEOF_SIZE_T@ BITSIZEOF_WCHAR_T = @BITSIZEOF_WCHAR_T@ BITSIZEOF_WINT_T = @BITSIZEOF_WINT_T@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CC_FOR_BUILD = @CC_FOR_BUILD@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EMULTIHOP_HIDDEN = @EMULTIHOP_HIDDEN@ EMULTIHOP_VALUE = @EMULTIHOP_VALUE@ ENOLINK_HIDDEN = @ENOLINK_HIDDEN@ ENOLINK_VALUE = @ENOLINK_VALUE@ EOVERFLOW_HIDDEN = @EOVERFLOW_HIDDEN@ EOVERFLOW_VALUE = @EOVERFLOW_VALUE@ ERRNO_H = @ERRNO_H@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ FLOAT_H = @FLOAT_H@ GETADDRINFO_LIB = @GETADDRINFO_LIB@ GETHOSTNAME_LIB = @GETHOSTNAME_LIB@ GLIBC21 = @GLIBC21@ GNULIB_ACCEPT = @GNULIB_ACCEPT@ GNULIB_ACCEPT4 = @GNULIB_ACCEPT4@ GNULIB_ACOSL = @GNULIB_ACOSL@ GNULIB_ASINL = @GNULIB_ASINL@ GNULIB_ATANL = @GNULIB_ATANL@ GNULIB_ATOLL = @GNULIB_ATOLL@ GNULIB_BIND = @GNULIB_BIND@ GNULIB_BTOWC = @GNULIB_BTOWC@ GNULIB_CALLOC_POSIX = @GNULIB_CALLOC_POSIX@ GNULIB_CANONICALIZE_FILE_NAME = @GNULIB_CANONICALIZE_FILE_NAME@ GNULIB_CEILF = @GNULIB_CEILF@ GNULIB_CEILL = @GNULIB_CEILL@ GNULIB_CHOWN = @GNULIB_CHOWN@ GNULIB_CLOSE = @GNULIB_CLOSE@ GNULIB_CONNECT = @GNULIB_CONNECT@ GNULIB_COSL = @GNULIB_COSL@ GNULIB_DPRINTF = @GNULIB_DPRINTF@ GNULIB_DUP2 = @GNULIB_DUP2@ GNULIB_DUP3 = @GNULIB_DUP3@ GNULIB_ENVIRON = @GNULIB_ENVIRON@ GNULIB_EUIDACCESS = @GNULIB_EUIDACCESS@ GNULIB_EXPL = @GNULIB_EXPL@ GNULIB_FACCESSAT = @GNULIB_FACCESSAT@ GNULIB_FCHDIR = @GNULIB_FCHDIR@ GNULIB_FCHMODAT = @GNULIB_FCHMODAT@ GNULIB_FCHOWNAT = @GNULIB_FCHOWNAT@ GNULIB_FCLOSE = @GNULIB_FCLOSE@ GNULIB_FCNTL = @GNULIB_FCNTL@ GNULIB_FFLUSH = @GNULIB_FFLUSH@ GNULIB_FLOORF = @GNULIB_FLOORF@ GNULIB_FLOORL = @GNULIB_FLOORL@ GNULIB_FOPEN = @GNULIB_FOPEN@ GNULIB_FPRINTF = @GNULIB_FPRINTF@ GNULIB_FPRINTF_POSIX = @GNULIB_FPRINTF_POSIX@ GNULIB_FPURGE = @GNULIB_FPURGE@ GNULIB_FPUTC = @GNULIB_FPUTC@ GNULIB_FPUTS = @GNULIB_FPUTS@ GNULIB_FREOPEN = @GNULIB_FREOPEN@ GNULIB_FREXP = @GNULIB_FREXP@ GNULIB_FREXPL = @GNULIB_FREXPL@ GNULIB_FSEEK = @GNULIB_FSEEK@ GNULIB_FSEEKO = @GNULIB_FSEEKO@ GNULIB_FSTATAT = @GNULIB_FSTATAT@ GNULIB_FSYNC = @GNULIB_FSYNC@ GNULIB_FTELL = @GNULIB_FTELL@ GNULIB_FTELLO = @GNULIB_FTELLO@ GNULIB_FTRUNCATE = @GNULIB_FTRUNCATE@ GNULIB_FUTIMENS = @GNULIB_FUTIMENS@ GNULIB_FWRITE = @GNULIB_FWRITE@ GNULIB_GETADDRINFO = @GNULIB_GETADDRINFO@ GNULIB_GETCWD = @GNULIB_GETCWD@ GNULIB_GETDELIM = @GNULIB_GETDELIM@ GNULIB_GETDOMAINNAME = @GNULIB_GETDOMAINNAME@ GNULIB_GETDTABLESIZE = @GNULIB_GETDTABLESIZE@ GNULIB_GETGROUPS = @GNULIB_GETGROUPS@ GNULIB_GETHOSTNAME = @GNULIB_GETHOSTNAME@ GNULIB_GETLINE = @GNULIB_GETLINE@ GNULIB_GETLOADAVG = @GNULIB_GETLOADAVG@ GNULIB_GETLOGIN = @GNULIB_GETLOGIN@ GNULIB_GETLOGIN_R = @GNULIB_GETLOGIN_R@ GNULIB_GETPAGESIZE = @GNULIB_GETPAGESIZE@ GNULIB_GETPEERNAME = @GNULIB_GETPEERNAME@ GNULIB_GETSOCKNAME = @GNULIB_GETSOCKNAME@ GNULIB_GETSOCKOPT = @GNULIB_GETSOCKOPT@ GNULIB_GETSUBOPT = @GNULIB_GETSUBOPT@ GNULIB_GETTIMEOFDAY = @GNULIB_GETTIMEOFDAY@ GNULIB_GETUSERSHELL = @GNULIB_GETUSERSHELL@ GNULIB_INET_NTOP = @GNULIB_INET_NTOP@ GNULIB_INET_PTON = @GNULIB_INET_PTON@ GNULIB_IOCTL = @GNULIB_IOCTL@ GNULIB_ISFINITE = @GNULIB_ISFINITE@ GNULIB_ISINF = @GNULIB_ISINF@ GNULIB_ISNAN = @GNULIB_ISNAN@ GNULIB_ISNAND = @GNULIB_ISNAND@ GNULIB_ISNANF = @GNULIB_ISNANF@ GNULIB_ISNANL = @GNULIB_ISNANL@ GNULIB_LCHMOD = @GNULIB_LCHMOD@ GNULIB_LCHOWN = @GNULIB_LCHOWN@ GNULIB_LDEXPL = @GNULIB_LDEXPL@ GNULIB_LINK = @GNULIB_LINK@ GNULIB_LINKAT = @GNULIB_LINKAT@ GNULIB_LISTEN = @GNULIB_LISTEN@ GNULIB_LOGL = @GNULIB_LOGL@ GNULIB_LSEEK = @GNULIB_LSEEK@ GNULIB_LSTAT = @GNULIB_LSTAT@ GNULIB_MALLOC_POSIX = @GNULIB_MALLOC_POSIX@ GNULIB_MBRLEN = @GNULIB_MBRLEN@ GNULIB_MBRTOWC = @GNULIB_MBRTOWC@ GNULIB_MBSCASECMP = @GNULIB_MBSCASECMP@ GNULIB_MBSCASESTR = @GNULIB_MBSCASESTR@ GNULIB_MBSCHR = @GNULIB_MBSCHR@ GNULIB_MBSCSPN = @GNULIB_MBSCSPN@ GNULIB_MBSINIT = @GNULIB_MBSINIT@ GNULIB_MBSLEN = @GNULIB_MBSLEN@ GNULIB_MBSNCASECMP = @GNULIB_MBSNCASECMP@ GNULIB_MBSNLEN = @GNULIB_MBSNLEN@ GNULIB_MBSNRTOWCS = @GNULIB_MBSNRTOWCS@ GNULIB_MBSPBRK = @GNULIB_MBSPBRK@ GNULIB_MBSPCASECMP = @GNULIB_MBSPCASECMP@ GNULIB_MBSRCHR = @GNULIB_MBSRCHR@ GNULIB_MBSRTOWCS = @GNULIB_MBSRTOWCS@ GNULIB_MBSSEP = @GNULIB_MBSSEP@ GNULIB_MBSSPN = @GNULIB_MBSSPN@ GNULIB_MBSSTR = @GNULIB_MBSSTR@ GNULIB_MBSTOK_R = @GNULIB_MBSTOK_R@ GNULIB_MEMCHR = @GNULIB_MEMCHR@ GNULIB_MEMMEM = @GNULIB_MEMMEM@ GNULIB_MEMPCPY = @GNULIB_MEMPCPY@ GNULIB_MEMRCHR = @GNULIB_MEMRCHR@ GNULIB_MKDIRAT = @GNULIB_MKDIRAT@ GNULIB_MKDTEMP = @GNULIB_MKDTEMP@ GNULIB_MKFIFO = @GNULIB_MKFIFO@ GNULIB_MKFIFOAT = @GNULIB_MKFIFOAT@ GNULIB_MKNOD = @GNULIB_MKNOD@ GNULIB_MKNODAT = @GNULIB_MKNODAT@ GNULIB_MKOSTEMP = @GNULIB_MKOSTEMP@ GNULIB_MKOSTEMPS = @GNULIB_MKOSTEMPS@ GNULIB_MKSTEMP = @GNULIB_MKSTEMP@ GNULIB_MKSTEMPS = @GNULIB_MKSTEMPS@ GNULIB_NL_LANGINFO = @GNULIB_NL_LANGINFO@ GNULIB_OBSTACK_PRINTF = @GNULIB_OBSTACK_PRINTF@ GNULIB_OBSTACK_PRINTF_POSIX = @GNULIB_OBSTACK_PRINTF_POSIX@ GNULIB_OPEN = @GNULIB_OPEN@ GNULIB_OPENAT = @GNULIB_OPENAT@ GNULIB_PERROR = @GNULIB_PERROR@ GNULIB_PIPE2 = @GNULIB_PIPE2@ GNULIB_POPEN = @GNULIB_POPEN@ GNULIB_PREAD = @GNULIB_PREAD@ GNULIB_PRINTF = @GNULIB_PRINTF@ GNULIB_PRINTF_POSIX = @GNULIB_PRINTF_POSIX@ GNULIB_PUTC = @GNULIB_PUTC@ GNULIB_PUTCHAR = @GNULIB_PUTCHAR@ GNULIB_PUTENV = @GNULIB_PUTENV@ GNULIB_PUTS = @GNULIB_PUTS@ GNULIB_RANDOM_R = @GNULIB_RANDOM_R@ GNULIB_RAWMEMCHR = @GNULIB_RAWMEMCHR@ GNULIB_READLINK = @GNULIB_READLINK@ GNULIB_READLINKAT = @GNULIB_READLINKAT@ GNULIB_REALLOC_POSIX = @GNULIB_REALLOC_POSIX@ GNULIB_REALPATH = @GNULIB_REALPATH@ GNULIB_RECV = @GNULIB_RECV@ GNULIB_RECVFROM = @GNULIB_RECVFROM@ GNULIB_REMOVE = @GNULIB_REMOVE@ GNULIB_RENAME = @GNULIB_RENAME@ GNULIB_RENAMEAT = @GNULIB_RENAMEAT@ GNULIB_RMDIR = @GNULIB_RMDIR@ GNULIB_ROUND = @GNULIB_ROUND@ GNULIB_ROUNDF = @GNULIB_ROUNDF@ GNULIB_ROUNDL = @GNULIB_ROUNDL@ GNULIB_RPMATCH = @GNULIB_RPMATCH@ GNULIB_SELECT = @GNULIB_SELECT@ GNULIB_SEND = @GNULIB_SEND@ GNULIB_SENDTO = @GNULIB_SENDTO@ GNULIB_SETENV = @GNULIB_SETENV@ GNULIB_SETSOCKOPT = @GNULIB_SETSOCKOPT@ GNULIB_SHUTDOWN = @GNULIB_SHUTDOWN@ GNULIB_SIGACTION = @GNULIB_SIGACTION@ GNULIB_SIGNAL_H_SIGPIPE = @GNULIB_SIGNAL_H_SIGPIPE@ GNULIB_SIGNBIT = @GNULIB_SIGNBIT@ GNULIB_SIGPROCMASK = @GNULIB_SIGPROCMASK@ GNULIB_SINL = @GNULIB_SINL@ GNULIB_SLEEP = @GNULIB_SLEEP@ GNULIB_SNPRINTF = @GNULIB_SNPRINTF@ GNULIB_SOCKET = @GNULIB_SOCKET@ GNULIB_SPRINTF_POSIX = @GNULIB_SPRINTF_POSIX@ GNULIB_SQRTL = @GNULIB_SQRTL@ GNULIB_STAT = @GNULIB_STAT@ GNULIB_STDIO_H_SIGPIPE = @GNULIB_STDIO_H_SIGPIPE@ GNULIB_STPCPY = @GNULIB_STPCPY@ GNULIB_STPNCPY = @GNULIB_STPNCPY@ GNULIB_STRCASESTR = @GNULIB_STRCASESTR@ GNULIB_STRCHRNUL = @GNULIB_STRCHRNUL@ GNULIB_STRDUP = @GNULIB_STRDUP@ GNULIB_STRERROR = @GNULIB_STRERROR@ GNULIB_STRNDUP = @GNULIB_STRNDUP@ GNULIB_STRNLEN = @GNULIB_STRNLEN@ GNULIB_STRPBRK = @GNULIB_STRPBRK@ GNULIB_STRSEP = @GNULIB_STRSEP@ GNULIB_STRSIGNAL = @GNULIB_STRSIGNAL@ GNULIB_STRSTR = @GNULIB_STRSTR@ GNULIB_STRTOD = @GNULIB_STRTOD@ GNULIB_STRTOK_R = @GNULIB_STRTOK_R@ GNULIB_STRTOLL = @GNULIB_STRTOLL@ GNULIB_STRTOULL = @GNULIB_STRTOULL@ GNULIB_STRVERSCMP = @GNULIB_STRVERSCMP@ GNULIB_SYMLINK = @GNULIB_SYMLINK@ GNULIB_SYMLINKAT = @GNULIB_SYMLINKAT@ GNULIB_TANL = @GNULIB_TANL@ GNULIB_TRUNC = @GNULIB_TRUNC@ GNULIB_TRUNCF = @GNULIB_TRUNCF@ GNULIB_TRUNCL = @GNULIB_TRUNCL@ GNULIB_UNAME = @GNULIB_UNAME@ GNULIB_UNISTD_H_GETOPT = @GNULIB_UNISTD_H_GETOPT@ GNULIB_UNISTD_H_SIGPIPE = @GNULIB_UNISTD_H_SIGPIPE@ GNULIB_UNLINK = @GNULIB_UNLINK@ GNULIB_UNLINKAT = @GNULIB_UNLINKAT@ GNULIB_UNSETENV = @GNULIB_UNSETENV@ GNULIB_USLEEP = @GNULIB_USLEEP@ GNULIB_UTIMENSAT = @GNULIB_UTIMENSAT@ GNULIB_VASPRINTF = @GNULIB_VASPRINTF@ GNULIB_VDPRINTF = @GNULIB_VDPRINTF@ GNULIB_VFPRINTF = @GNULIB_VFPRINTF@ GNULIB_VFPRINTF_POSIX = @GNULIB_VFPRINTF_POSIX@ GNULIB_VPRINTF = @GNULIB_VPRINTF@ GNULIB_VPRINTF_POSIX = @GNULIB_VPRINTF_POSIX@ GNULIB_VSNPRINTF = @GNULIB_VSNPRINTF@ GNULIB_VSPRINTF_POSIX = @GNULIB_VSPRINTF_POSIX@ GNULIB_WCRTOMB = @GNULIB_WCRTOMB@ GNULIB_WCSNRTOMBS = @GNULIB_WCSNRTOMBS@ GNULIB_WCSRTOMBS = @GNULIB_WCSRTOMBS@ GNULIB_WCTOB = @GNULIB_WCTOB@ GNULIB_WCWIDTH = @GNULIB_WCWIDTH@ GNULIB_WRITE = @GNULIB_WRITE@ GREP = @GREP@ GTKDOC_CHECK = @GTKDOC_CHECK@ HAVE_ACCEPT4 = @HAVE_ACCEPT4@ HAVE_ACOSL = @HAVE_ACOSL@ HAVE_ARPA_INET_H = @HAVE_ARPA_INET_H@ HAVE_ASINL = @HAVE_ASINL@ HAVE_ATANL = @HAVE_ATANL@ HAVE_ATOLL = @HAVE_ATOLL@ HAVE_BTOWC = @HAVE_BTOWC@ HAVE_CALLOC_POSIX = @HAVE_CALLOC_POSIX@ HAVE_CANONICALIZE_FILE_NAME = @HAVE_CANONICALIZE_FILE_NAME@ HAVE_CHOWN = @HAVE_CHOWN@ HAVE_COSL = @HAVE_COSL@ HAVE_CXX = @HAVE_CXX@ HAVE_DECL_ACOSL = @HAVE_DECL_ACOSL@ HAVE_DECL_ASINL = @HAVE_DECL_ASINL@ HAVE_DECL_ATANL = @HAVE_DECL_ATANL@ HAVE_DECL_COSL = @HAVE_DECL_COSL@ HAVE_DECL_ENVIRON = @HAVE_DECL_ENVIRON@ HAVE_DECL_EXPL = @HAVE_DECL_EXPL@ HAVE_DECL_FPURGE = @HAVE_DECL_FPURGE@ HAVE_DECL_FREEADDRINFO = @HAVE_DECL_FREEADDRINFO@ HAVE_DECL_FREXPL = @HAVE_DECL_FREXPL@ HAVE_DECL_GAI_STRERROR = @HAVE_DECL_GAI_STRERROR@ HAVE_DECL_GETADDRINFO = @HAVE_DECL_GETADDRINFO@ HAVE_DECL_GETDELIM = @HAVE_DECL_GETDELIM@ HAVE_DECL_GETLINE = @HAVE_DECL_GETLINE@ HAVE_DECL_GETLOADAVG = @HAVE_DECL_GETLOADAVG@ HAVE_DECL_GETLOGIN_R = @HAVE_DECL_GETLOGIN_R@ HAVE_DECL_GETNAMEINFO = @HAVE_DECL_GETNAMEINFO@ HAVE_DECL_INET_NTOP = @HAVE_DECL_INET_NTOP@ HAVE_DECL_INET_PTON = @HAVE_DECL_INET_PTON@ HAVE_DECL_LDEXPL = @HAVE_DECL_LDEXPL@ HAVE_DECL_LOGL = @HAVE_DECL_LOGL@ HAVE_DECL_MEMMEM = @HAVE_DECL_MEMMEM@ HAVE_DECL_MEMRCHR = @HAVE_DECL_MEMRCHR@ HAVE_DECL_OBSTACK_PRINTF = @HAVE_DECL_OBSTACK_PRINTF@ HAVE_DECL_SINL = @HAVE_DECL_SINL@ HAVE_DECL_SNPRINTF = @HAVE_DECL_SNPRINTF@ HAVE_DECL_SQRTL = @HAVE_DECL_SQRTL@ HAVE_DECL_STRDUP = @HAVE_DECL_STRDUP@ HAVE_DECL_STRERROR = @HAVE_DECL_STRERROR@ HAVE_DECL_STRNCASECMP = @HAVE_DECL_STRNCASECMP@ HAVE_DECL_STRNDUP = @HAVE_DECL_STRNDUP@ HAVE_DECL_STRNLEN = @HAVE_DECL_STRNLEN@ HAVE_DECL_STRSIGNAL = @HAVE_DECL_STRSIGNAL@ HAVE_DECL_STRTOK_R = @HAVE_DECL_STRTOK_R@ HAVE_DECL_TANL = @HAVE_DECL_TANL@ HAVE_DECL_TRUNC = @HAVE_DECL_TRUNC@ HAVE_DECL_TRUNCF = @HAVE_DECL_TRUNCF@ HAVE_DECL_VSNPRINTF = @HAVE_DECL_VSNPRINTF@ HAVE_DECL_WCTOB = @HAVE_DECL_WCTOB@ HAVE_DECL_WCWIDTH = @HAVE_DECL_WCWIDTH@ HAVE_DPRINTF = @HAVE_DPRINTF@ HAVE_DUP2 = @HAVE_DUP2@ HAVE_DUP3 = @HAVE_DUP3@ HAVE_EUIDACCESS = @HAVE_EUIDACCESS@ HAVE_EXPL = @HAVE_EXPL@ HAVE_FACCESSAT = @HAVE_FACCESSAT@ HAVE_FCHMODAT = @HAVE_FCHMODAT@ HAVE_FCHOWNAT = @HAVE_FCHOWNAT@ HAVE_FCNTL = @HAVE_FCNTL@ HAVE_FSTATAT = @HAVE_FSTATAT@ HAVE_FSYNC = @HAVE_FSYNC@ HAVE_FTRUNCATE = @HAVE_FTRUNCATE@ HAVE_FUTIMENS = @HAVE_FUTIMENS@ HAVE_GETDOMAINNAME = @HAVE_GETDOMAINNAME@ HAVE_GETDTABLESIZE = @HAVE_GETDTABLESIZE@ HAVE_GETGROUPS = @HAVE_GETGROUPS@ HAVE_GETHOSTNAME = @HAVE_GETHOSTNAME@ HAVE_GETLOGIN = @HAVE_GETLOGIN@ HAVE_GETPAGESIZE = @HAVE_GETPAGESIZE@ HAVE_GETSUBOPT = @HAVE_GETSUBOPT@ HAVE_GETUSERSHELL = @HAVE_GETUSERSHELL@ HAVE_INTTYPES_H = @HAVE_INTTYPES_H@ HAVE_ISNAND = @HAVE_ISNAND@ HAVE_ISNANF = @HAVE_ISNANF@ HAVE_ISNANL = @HAVE_ISNANL@ HAVE_ISWCNTRL = @HAVE_ISWCNTRL@ HAVE_LANGINFO_CODESET = @HAVE_LANGINFO_CODESET@ HAVE_LANGINFO_ERA = @HAVE_LANGINFO_ERA@ HAVE_LANGINFO_H = @HAVE_LANGINFO_H@ HAVE_LCHMOD = @HAVE_LCHMOD@ HAVE_LCHOWN = @HAVE_LCHOWN@ HAVE_LINK = @HAVE_LINK@ HAVE_LINKAT = @HAVE_LINKAT@ HAVE_LOGL = @HAVE_LOGL@ HAVE_LONG_LONG_INT = @HAVE_LONG_LONG_INT@ HAVE_LSTAT = @HAVE_LSTAT@ HAVE_MALLOC_POSIX = @HAVE_MALLOC_POSIX@ HAVE_MBRLEN = @HAVE_MBRLEN@ HAVE_MBRTOWC = @HAVE_MBRTOWC@ HAVE_MBSINIT = @HAVE_MBSINIT@ HAVE_MBSLEN = @HAVE_MBSLEN@ HAVE_MBSNRTOWCS = @HAVE_MBSNRTOWCS@ HAVE_MBSRTOWCS = @HAVE_MBSRTOWCS@ HAVE_MEMPCPY = @HAVE_MEMPCPY@ HAVE_MKDIRAT = @HAVE_MKDIRAT@ HAVE_MKDTEMP = @HAVE_MKDTEMP@ HAVE_MKFIFO = @HAVE_MKFIFO@ HAVE_MKFIFOAT = @HAVE_MKFIFOAT@ HAVE_MKNOD = @HAVE_MKNOD@ HAVE_MKNODAT = @HAVE_MKNODAT@ HAVE_MKOSTEMP = @HAVE_MKOSTEMP@ HAVE_MKOSTEMPS = @HAVE_MKOSTEMPS@ HAVE_MKSTEMPS = @HAVE_MKSTEMPS@ HAVE_NETDB_H = @HAVE_NETDB_H@ HAVE_NETINET_IN_H = @HAVE_NETINET_IN_H@ HAVE_NL_LANGINFO = @HAVE_NL_LANGINFO@ HAVE_OPENAT = @HAVE_OPENAT@ HAVE_OS_H = @HAVE_OS_H@ HAVE_PIPE2 = @HAVE_PIPE2@ HAVE_POSIX_SIGNALBLOCKING = @HAVE_POSIX_SIGNALBLOCKING@ HAVE_PREAD = @HAVE_PREAD@ HAVE_RANDOM_H = @HAVE_RANDOM_H@ HAVE_RANDOM_R = @HAVE_RANDOM_R@ HAVE_RAWMEMCHR = @HAVE_RAWMEMCHR@ HAVE_READLINK = @HAVE_READLINK@ HAVE_READLINKAT = @HAVE_READLINKAT@ HAVE_REALLOC_POSIX = @HAVE_REALLOC_POSIX@ HAVE_REALPATH = @HAVE_REALPATH@ HAVE_RENAMEAT = @HAVE_RENAMEAT@ HAVE_RPMATCH = @HAVE_RPMATCH@ HAVE_SA_FAMILY_T = @HAVE_SA_FAMILY_T@ HAVE_SETENV = @HAVE_SETENV@ HAVE_SIGACTION = @HAVE_SIGACTION@ HAVE_SIGINFO_T = @HAVE_SIGINFO_T@ HAVE_SIGNED_SIG_ATOMIC_T = @HAVE_SIGNED_SIG_ATOMIC_T@ HAVE_SIGNED_WCHAR_T = @HAVE_SIGNED_WCHAR_T@ HAVE_SIGNED_WINT_T = @HAVE_SIGNED_WINT_T@ HAVE_SIGSET_T = @HAVE_SIGSET_T@ HAVE_SINL = @HAVE_SINL@ HAVE_SLEEP = @HAVE_SLEEP@ HAVE_SQRTL = @HAVE_SQRTL@ HAVE_STDINT_H = @HAVE_STDINT_H@ HAVE_STPCPY = @HAVE_STPCPY@ HAVE_STPNCPY = @HAVE_STPNCPY@ HAVE_STRCASECMP = @HAVE_STRCASECMP@ HAVE_STRCASESTR = @HAVE_STRCASESTR@ HAVE_STRCHRNUL = @HAVE_STRCHRNUL@ HAVE_STRPBRK = @HAVE_STRPBRK@ HAVE_STRSEP = @HAVE_STRSEP@ HAVE_STRTOD = @HAVE_STRTOD@ HAVE_STRTOLL = @HAVE_STRTOLL@ HAVE_STRTOULL = @HAVE_STRTOULL@ HAVE_STRUCT_ADDRINFO = @HAVE_STRUCT_ADDRINFO@ HAVE_STRUCT_RANDOM_DATA = @HAVE_STRUCT_RANDOM_DATA@ HAVE_STRUCT_SIGACTION_SA_SIGACTION = @HAVE_STRUCT_SIGACTION_SA_SIGACTION@ HAVE_STRUCT_SOCKADDR_STORAGE = @HAVE_STRUCT_SOCKADDR_STORAGE@ HAVE_STRUCT_TIMEVAL = @HAVE_STRUCT_TIMEVAL@ HAVE_STRUCT_UTSNAME = @HAVE_STRUCT_UTSNAME@ HAVE_STRVERSCMP = @HAVE_STRVERSCMP@ HAVE_SYMLINK = @HAVE_SYMLINK@ HAVE_SYMLINKAT = @HAVE_SYMLINKAT@ HAVE_SYS_BITYPES_H = @HAVE_SYS_BITYPES_H@ HAVE_SYS_INTTYPES_H = @HAVE_SYS_INTTYPES_H@ HAVE_SYS_IOCTL_H = @HAVE_SYS_IOCTL_H@ HAVE_SYS_LOADAVG_H = @HAVE_SYS_LOADAVG_H@ HAVE_SYS_PARAM_H = @HAVE_SYS_PARAM_H@ HAVE_SYS_SELECT_H = @HAVE_SYS_SELECT_H@ HAVE_SYS_SOCKET_H = @HAVE_SYS_SOCKET_H@ HAVE_SYS_TIME_H = @HAVE_SYS_TIME_H@ HAVE_SYS_TYPES_H = @HAVE_SYS_TYPES_H@ HAVE_SYS_UTSNAME_H = @HAVE_SYS_UTSNAME_H@ HAVE_TANL = @HAVE_TANL@ HAVE_TYPE_VOLATILE_SIG_ATOMIC_T = @HAVE_TYPE_VOLATILE_SIG_ATOMIC_T@ HAVE_UNAME = @HAVE_UNAME@ HAVE_UNISTD_H = @HAVE_UNISTD_H@ HAVE_UNLINKAT = @HAVE_UNLINKAT@ HAVE_UNSETENV = @HAVE_UNSETENV@ HAVE_UNSIGNED_LONG_LONG_INT = @HAVE_UNSIGNED_LONG_LONG_INT@ HAVE_USLEEP = @HAVE_USLEEP@ HAVE_UTIMENSAT = @HAVE_UTIMENSAT@ HAVE_VASPRINTF = @HAVE_VASPRINTF@ HAVE_VDPRINTF = @HAVE_VDPRINTF@ HAVE_WCHAR_H = @HAVE_WCHAR_H@ HAVE_WCHAR_T = @HAVE_WCHAR_T@ HAVE_WCRTOMB = @HAVE_WCRTOMB@ HAVE_WCSNRTOMBS = @HAVE_WCSNRTOMBS@ HAVE_WCSRTOMBS = @HAVE_WCSRTOMBS@ HAVE_WCTYPE_H = @HAVE_WCTYPE_H@ HAVE_WINSOCK2_H = @HAVE_WINSOCK2_H@ HAVE_WINT_T = @HAVE_WINT_T@ HAVE_WS2TCPIP_H = @HAVE_WS2TCPIP_H@ HAVE__BOOL = @HAVE__BOOL@ HOSTENT_LIB = @HOSTENT_LIB@ HTML_DIR = @HTML_DIR@ INCLTDL = @INCLTDL@ INCLUDE_NEXT = @INCLUDE_NEXT@ INCLUDE_NEXT_AS_FIRST_DIRECTIVE = @INCLUDE_NEXT_AS_FIRST_DIRECTIVE@ INET_NTOP_LIB = @INET_NTOP_LIB@ INET_PTON_LIB = @INET_PTON_LIB@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LD = @LD@ LDFLAGS = @LDFLAGS@ LEX = @LEX@ LEXLIB = @LEXLIB@ LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@ LIBADD_DL = @LIBADD_DL@ LIBADD_DLD_LINK = @LIBADD_DLD_LINK@ LIBADD_DLOPEN = @LIBADD_DLOPEN@ LIBADD_SHL_LOAD = @LIBADD_SHL_LOAD@ LIBDIR = @LIBDIR@ LIBGCRYPT_CFLAGS = @LIBGCRYPT_CFLAGS@ LIBGCRYPT_CONFIG = @LIBGCRYPT_CONFIG@ LIBGCRYPT_LIBS = @LIBGCRYPT_LIBS@ LIBGNUTLS_CFLAGS = @LIBGNUTLS_CFLAGS@ LIBGNUTLS_CONFIG = @LIBGNUTLS_CONFIG@ LIBGNUTLS_EXTRA_CFLAGS = @LIBGNUTLS_EXTRA_CFLAGS@ LIBGNUTLS_EXTRA_CONFIG = @LIBGNUTLS_EXTRA_CONFIG@ LIBGNUTLS_EXTRA_LIBS = @LIBGNUTLS_EXTRA_LIBS@ LIBGNUTLS_LIBS = @LIBGNUTLS_LIBS@ LIBINTL = @LIBINTL@ LIBLTDL = @LIBLTDL@ LIBMULTITHREAD = @LIBMULTITHREAD@ LIBOBJS = @LIBOBJS@ LIBPRELUDECPP_SONAME = @LIBPRELUDECPP_SONAME@ LIBPRELUDE_CFLAGS = @LIBPRELUDE_CFLAGS@ LIBPRELUDE_LIBS = @LIBPRELUDE_LIBS@ LIBPRELUDE_SONAME = @LIBPRELUDE_SONAME@ LIBPTH = @LIBPTH@ LIBPTH_PREFIX = @LIBPTH_PREFIX@ LIBS = @LIBS@ LIBSOCKET = @LIBSOCKET@ LIBTESTS_LIBDEPS = @LIBTESTS_LIBDEPS@ LIBTHREAD = @LIBTHREAD@ LIBTOOL = @LIBTOOL@ LIPO = @LIPO@ LN_S = @LN_S@ LOCALCHARSET_TESTS_ENVIRONMENT = @LOCALCHARSET_TESTS_ENVIRONMENT@ LOCALE_FR = @LOCALE_FR@ LOCALE_FR_UTF8 = @LOCALE_FR_UTF8@ LOCALE_JA = @LOCALE_JA@ LOCALE_TR_UTF8 = @LOCALE_TR_UTF8@ LOCALE_ZH_CN = @LOCALE_ZH_CN@ LOCALSTATEDIR = @LOCALSTATEDIR@ LTALLOCA = @LTALLOCA@ LTDLDEPS = @LTDLDEPS@ LTDLINCL = @LTDLINCL@ LTDLOPEN = @LTDLOPEN@ LTLIBINTL = @LTLIBINTL@ LTLIBMULTITHREAD = @LTLIBMULTITHREAD@ LTLIBOBJS = @LTLIBOBJS@ LTLIBPTH = @LTLIBPTH@ LTLIBTHREAD = @LTLIBTHREAD@ LT_CONFIG_H = @LT_CONFIG_H@ LT_DLLOADERS = @LT_DLLOADERS@ LT_DLPREOPEN = @LT_DLPREOPEN@ LUA_CFLAGS = @LUA_CFLAGS@ LUA_CONFIG = @LUA_CONFIG@ LUA_LIBS = @LUA_LIBS@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MKDIR_P = @MKDIR_P@ NETDB_H = @NETDB_H@ NETINET_IN_H = @NETINET_IN_H@ NEXT_ARPA_INET_H = @NEXT_ARPA_INET_H@ NEXT_AS_FIRST_DIRECTIVE_ARPA_INET_H = @NEXT_AS_FIRST_DIRECTIVE_ARPA_INET_H@ NEXT_AS_FIRST_DIRECTIVE_ERRNO_H = @NEXT_AS_FIRST_DIRECTIVE_ERRNO_H@ NEXT_AS_FIRST_DIRECTIVE_FCNTL_H = @NEXT_AS_FIRST_DIRECTIVE_FCNTL_H@ NEXT_AS_FIRST_DIRECTIVE_FLOAT_H = @NEXT_AS_FIRST_DIRECTIVE_FLOAT_H@ NEXT_AS_FIRST_DIRECTIVE_LANGINFO_H = @NEXT_AS_FIRST_DIRECTIVE_LANGINFO_H@ NEXT_AS_FIRST_DIRECTIVE_MATH_H = @NEXT_AS_FIRST_DIRECTIVE_MATH_H@ NEXT_AS_FIRST_DIRECTIVE_NETDB_H = @NEXT_AS_FIRST_DIRECTIVE_NETDB_H@ NEXT_AS_FIRST_DIRECTIVE_NETINET_IN_H = @NEXT_AS_FIRST_DIRECTIVE_NETINET_IN_H@ NEXT_AS_FIRST_DIRECTIVE_SIGNAL_H = @NEXT_AS_FIRST_DIRECTIVE_SIGNAL_H@ NEXT_AS_FIRST_DIRECTIVE_STDDEF_H = @NEXT_AS_FIRST_DIRECTIVE_STDDEF_H@ NEXT_AS_FIRST_DIRECTIVE_STDINT_H = @NEXT_AS_FIRST_DIRECTIVE_STDINT_H@ NEXT_AS_FIRST_DIRECTIVE_STDIO_H = @NEXT_AS_FIRST_DIRECTIVE_STDIO_H@ NEXT_AS_FIRST_DIRECTIVE_STDLIB_H = @NEXT_AS_FIRST_DIRECTIVE_STDLIB_H@ NEXT_AS_FIRST_DIRECTIVE_STRINGS_H = @NEXT_AS_FIRST_DIRECTIVE_STRINGS_H@ NEXT_AS_FIRST_DIRECTIVE_STRING_H = @NEXT_AS_FIRST_DIRECTIVE_STRING_H@ NEXT_AS_FIRST_DIRECTIVE_SYS_IOCTL_H = @NEXT_AS_FIRST_DIRECTIVE_SYS_IOCTL_H@ NEXT_AS_FIRST_DIRECTIVE_SYS_SELECT_H = @NEXT_AS_FIRST_DIRECTIVE_SYS_SELECT_H@ NEXT_AS_FIRST_DIRECTIVE_SYS_SOCKET_H = @NEXT_AS_FIRST_DIRECTIVE_SYS_SOCKET_H@ NEXT_AS_FIRST_DIRECTIVE_SYS_STAT_H = @NEXT_AS_FIRST_DIRECTIVE_SYS_STAT_H@ NEXT_AS_FIRST_DIRECTIVE_SYS_TIME_H = @NEXT_AS_FIRST_DIRECTIVE_SYS_TIME_H@ NEXT_AS_FIRST_DIRECTIVE_SYS_UTSNAME_H = @NEXT_AS_FIRST_DIRECTIVE_SYS_UTSNAME_H@ NEXT_AS_FIRST_DIRECTIVE_TIME_H = @NEXT_AS_FIRST_DIRECTIVE_TIME_H@ NEXT_AS_FIRST_DIRECTIVE_UNISTD_H = @NEXT_AS_FIRST_DIRECTIVE_UNISTD_H@ NEXT_AS_FIRST_DIRECTIVE_WCHAR_H = @NEXT_AS_FIRST_DIRECTIVE_WCHAR_H@ NEXT_AS_FIRST_DIRECTIVE_WCTYPE_H = @NEXT_AS_FIRST_DIRECTIVE_WCTYPE_H@ NEXT_ERRNO_H = @NEXT_ERRNO_H@ NEXT_FCNTL_H = @NEXT_FCNTL_H@ NEXT_FLOAT_H = @NEXT_FLOAT_H@ NEXT_LANGINFO_H = @NEXT_LANGINFO_H@ NEXT_MATH_H = @NEXT_MATH_H@ NEXT_NETDB_H = @NEXT_NETDB_H@ NEXT_NETINET_IN_H = @NEXT_NETINET_IN_H@ NEXT_SIGNAL_H = @NEXT_SIGNAL_H@ NEXT_STDDEF_H = @NEXT_STDDEF_H@ NEXT_STDINT_H = @NEXT_STDINT_H@ NEXT_STDIO_H = @NEXT_STDIO_H@ NEXT_STDLIB_H = @NEXT_STDLIB_H@ NEXT_STRINGS_H = @NEXT_STRINGS_H@ NEXT_STRING_H = @NEXT_STRING_H@ NEXT_SYS_IOCTL_H = @NEXT_SYS_IOCTL_H@ NEXT_SYS_SELECT_H = @NEXT_SYS_SELECT_H@ NEXT_SYS_SOCKET_H = @NEXT_SYS_SOCKET_H@ NEXT_SYS_STAT_H = @NEXT_SYS_STAT_H@ NEXT_SYS_TIME_H = @NEXT_SYS_TIME_H@ NEXT_SYS_UTSNAME_H = @NEXT_SYS_UTSNAME_H@ NEXT_TIME_H = @NEXT_TIME_H@ NEXT_UNISTD_H = @NEXT_UNISTD_H@ NEXT_WCHAR_H = @NEXT_WCHAR_H@ NEXT_WCTYPE_H = @NEXT_WCTYPE_H@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PCFLAGS = @PCFLAGS@ PERL = @PERL@ PERL_EXTRA_PARAMS = @PERL_EXTRA_PARAMS@ PKG_CONFIG = @PKG_CONFIG@ POLL_H = @POLL_H@ PRAGMA_SYSTEM_HEADER = @PRAGMA_SYSTEM_HEADER@ PRELUDE_ADMIN_CFLAGS = @PRELUDE_ADMIN_CFLAGS@ PRELUDE_ADMIN_LIBS = @PRELUDE_ADMIN_LIBS@ PRELUDE_CONFIG_DIR = @PRELUDE_CONFIG_DIR@ PRELUDE_SPOOL_DIR = @PRELUDE_SPOOL_DIR@ PTHREAD_CFLAGS = @PTHREAD_CFLAGS@ PTHREAD_LDFLAGS = @PTHREAD_LDFLAGS@ PTHREAD_LIBS = @PTHREAD_LIBS@ PTRDIFF_T_SUFFIX = @PTRDIFF_T_SUFFIX@ PYTHON = @PYTHON@ RANLIB = @RANLIB@ RELOCATABLE = @RELOCATABLE@ REPLACE_BTOWC = @REPLACE_BTOWC@ REPLACE_CANONICALIZE_FILE_NAME = @REPLACE_CANONICALIZE_FILE_NAME@ REPLACE_CEILF = @REPLACE_CEILF@ REPLACE_CEILL = @REPLACE_CEILL@ REPLACE_CHOWN = @REPLACE_CHOWN@ REPLACE_CLOSE = @REPLACE_CLOSE@ REPLACE_DPRINTF = @REPLACE_DPRINTF@ REPLACE_DUP = @REPLACE_DUP@ REPLACE_DUP2 = @REPLACE_DUP2@ REPLACE_FCHDIR = @REPLACE_FCHDIR@ REPLACE_FCHOWNAT = @REPLACE_FCHOWNAT@ REPLACE_FCLOSE = @REPLACE_FCLOSE@ REPLACE_FCNTL = @REPLACE_FCNTL@ REPLACE_FFLUSH = @REPLACE_FFLUSH@ REPLACE_FLOORF = @REPLACE_FLOORF@ REPLACE_FLOORL = @REPLACE_FLOORL@ REPLACE_FOPEN = @REPLACE_FOPEN@ REPLACE_FPRINTF = @REPLACE_FPRINTF@ REPLACE_FPURGE = @REPLACE_FPURGE@ REPLACE_FREOPEN = @REPLACE_FREOPEN@ REPLACE_FREXP = @REPLACE_FREXP@ REPLACE_FREXPL = @REPLACE_FREXPL@ REPLACE_FSEEK = @REPLACE_FSEEK@ REPLACE_FSEEKO = @REPLACE_FSEEKO@ REPLACE_FSTAT = @REPLACE_FSTAT@ REPLACE_FSTATAT = @REPLACE_FSTATAT@ REPLACE_FTELL = @REPLACE_FTELL@ REPLACE_FTELLO = @REPLACE_FTELLO@ REPLACE_FUTIMENS = @REPLACE_FUTIMENS@ REPLACE_GETCWD = @REPLACE_GETCWD@ REPLACE_GETDELIM = @REPLACE_GETDELIM@ REPLACE_GETGROUPS = @REPLACE_GETGROUPS@ REPLACE_GETLINE = @REPLACE_GETLINE@ REPLACE_GETPAGESIZE = @REPLACE_GETPAGESIZE@ REPLACE_GETTIMEOFDAY = @REPLACE_GETTIMEOFDAY@ REPLACE_HUGE_VAL = @REPLACE_HUGE_VAL@ REPLACE_ISFINITE = @REPLACE_ISFINITE@ REPLACE_ISINF = @REPLACE_ISINF@ REPLACE_ISNAN = @REPLACE_ISNAN@ REPLACE_ISWCNTRL = @REPLACE_ISWCNTRL@ REPLACE_LCHOWN = @REPLACE_LCHOWN@ REPLACE_LDEXPL = @REPLACE_LDEXPL@ REPLACE_LINK = @REPLACE_LINK@ REPLACE_LINKAT = @REPLACE_LINKAT@ REPLACE_LOCALTIME_R = @REPLACE_LOCALTIME_R@ REPLACE_LSEEK = @REPLACE_LSEEK@ REPLACE_LSTAT = @REPLACE_LSTAT@ REPLACE_MBRLEN = @REPLACE_MBRLEN@ REPLACE_MBRTOWC = @REPLACE_MBRTOWC@ REPLACE_MBSINIT = @REPLACE_MBSINIT@ REPLACE_MBSNRTOWCS = @REPLACE_MBSNRTOWCS@ REPLACE_MBSRTOWCS = @REPLACE_MBSRTOWCS@ REPLACE_MBSTATE_T = @REPLACE_MBSTATE_T@ REPLACE_MEMCHR = @REPLACE_MEMCHR@ REPLACE_MEMMEM = @REPLACE_MEMMEM@ REPLACE_MKDIR = @REPLACE_MKDIR@ REPLACE_MKFIFO = @REPLACE_MKFIFO@ REPLACE_MKNOD = @REPLACE_MKNOD@ REPLACE_MKSTEMP = @REPLACE_MKSTEMP@ REPLACE_MKTIME = @REPLACE_MKTIME@ REPLACE_NAN = @REPLACE_NAN@ REPLACE_NANOSLEEP = @REPLACE_NANOSLEEP@ REPLACE_NL_LANGINFO = @REPLACE_NL_LANGINFO@ REPLACE_NULL = @REPLACE_NULL@ REPLACE_OBSTACK_PRINTF = @REPLACE_OBSTACK_PRINTF@ REPLACE_OPEN = @REPLACE_OPEN@ REPLACE_OPENAT = @REPLACE_OPENAT@ REPLACE_PERROR = @REPLACE_PERROR@ REPLACE_POPEN = @REPLACE_POPEN@ REPLACE_PREAD = @REPLACE_PREAD@ REPLACE_PRINTF = @REPLACE_PRINTF@ REPLACE_PUTENV = @REPLACE_PUTENV@ REPLACE_READLINK = @REPLACE_READLINK@ REPLACE_REALPATH = @REPLACE_REALPATH@ REPLACE_REMOVE = @REPLACE_REMOVE@ REPLACE_RENAME = @REPLACE_RENAME@ REPLACE_RENAMEAT = @REPLACE_RENAMEAT@ REPLACE_RMDIR = @REPLACE_RMDIR@ REPLACE_ROUND = @REPLACE_ROUND@ REPLACE_ROUNDF = @REPLACE_ROUNDF@ REPLACE_ROUNDL = @REPLACE_ROUNDL@ REPLACE_SELECT = @REPLACE_SELECT@ REPLACE_SETENV = @REPLACE_SETENV@ REPLACE_SIGNBIT = @REPLACE_SIGNBIT@ REPLACE_SIGNBIT_USING_GCC = @REPLACE_SIGNBIT_USING_GCC@ REPLACE_SLEEP = @REPLACE_SLEEP@ REPLACE_SNPRINTF = @REPLACE_SNPRINTF@ REPLACE_SPRINTF = @REPLACE_SPRINTF@ REPLACE_STAT = @REPLACE_STAT@ REPLACE_STDIO_WRITE_FUNCS = @REPLACE_STDIO_WRITE_FUNCS@ REPLACE_STRCASESTR = @REPLACE_STRCASESTR@ REPLACE_STRDUP = @REPLACE_STRDUP@ REPLACE_STRERROR = @REPLACE_STRERROR@ REPLACE_STRNDUP = @REPLACE_STRNDUP@ REPLACE_STRPTIME = @REPLACE_STRPTIME@ REPLACE_STRSIGNAL = @REPLACE_STRSIGNAL@ REPLACE_STRSTR = @REPLACE_STRSTR@ REPLACE_STRTOD = @REPLACE_STRTOD@ REPLACE_STRTOK_R = @REPLACE_STRTOK_R@ REPLACE_SYMLINK = @REPLACE_SYMLINK@ REPLACE_TIMEGM = @REPLACE_TIMEGM@ REPLACE_TRUNCL = @REPLACE_TRUNCL@ REPLACE_UNLINK = @REPLACE_UNLINK@ REPLACE_UNLINKAT = @REPLACE_UNLINKAT@ REPLACE_UNSETENV = @REPLACE_UNSETENV@ REPLACE_USLEEP = @REPLACE_USLEEP@ REPLACE_UTIMENSAT = @REPLACE_UTIMENSAT@ REPLACE_VASPRINTF = @REPLACE_VASPRINTF@ REPLACE_VDPRINTF = @REPLACE_VDPRINTF@ REPLACE_VFPRINTF = @REPLACE_VFPRINTF@ REPLACE_VPRINTF = @REPLACE_VPRINTF@ REPLACE_VSNPRINTF = @REPLACE_VSNPRINTF@ REPLACE_VSPRINTF = @REPLACE_VSPRINTF@ REPLACE_WCRTOMB = @REPLACE_WCRTOMB@ REPLACE_WCSNRTOMBS = @REPLACE_WCSNRTOMBS@ REPLACE_WCSRTOMBS = @REPLACE_WCSRTOMBS@ REPLACE_WCTOB = @REPLACE_WCTOB@ REPLACE_WCWIDTH = @REPLACE_WCWIDTH@ REPLACE_WRITE = @REPLACE_WRITE@ RUBY = @RUBY@ RUBY_CCFLAGS = @RUBY_CCFLAGS@ RUBY_EXEC_PREFIX = @RUBY_EXEC_PREFIX@ RUBY_INCLUDES = @RUBY_INCLUDES@ RUBY_LIBS = @RUBY_LIBS@ RUBY_PLATFORM = @RUBY_PLATFORM@ RUBY_PREFIX = @RUBY_PREFIX@ RUBY_VERSION = @RUBY_VERSION@ SED = @SED@ SERVENT_LIB = @SERVENT_LIB@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ SIG_ATOMIC_T_SUFFIX = @SIG_ATOMIC_T_SUFFIX@ SIZE_T_SUFFIX = @SIZE_T_SUFFIX@ STDBOOL_H = @STDBOOL_H@ STDDEF_H = @STDDEF_H@ STDINT_H = @STDINT_H@ STRIP = @STRIP@ SWIG = @SWIG@ SYSCONFDIR = @SYSCONFDIR@ SYS_IOCTL_H_HAVE_WINSOCK2_H = @SYS_IOCTL_H_HAVE_WINSOCK2_H@ SYS_IOCTL_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS = @SYS_IOCTL_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS@ SYS_SOCKET_H = @SYS_SOCKET_H@ SYS_TIME_H_DEFINES_STRUCT_TIMESPEC = @SYS_TIME_H_DEFINES_STRUCT_TIMESPEC@ TIME_H_DEFINES_STRUCT_TIMESPEC = @TIME_H_DEFINES_STRUCT_TIMESPEC@ UNDEFINE_STRTOK_R = @UNDEFINE_STRTOK_R@ UNISTD_H_HAVE_WINSOCK2_H = @UNISTD_H_HAVE_WINSOCK2_H@ UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS = @UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS@ VALGRIND = @VALGRIND@ VERSION = @VERSION@ WCHAR_T_SUFFIX = @WCHAR_T_SUFFIX@ WCTYPE_H = @WCTYPE_H@ WINT_T_SUFFIX = @WINT_T_SUFFIX@ YACC = @YACC@ YFLAGS = @YFLAGS@ YIELD_LIB = @YIELD_LIB@ __PRELUDE_64BIT_FORMAT_PREFIX = @__PRELUDE_64BIT_FORMAT_PREFIX@ __PRELUDE_HAVE_64BIT_LONG = @__PRELUDE_HAVE_64BIT_LONG@ __PRELUDE_HAVE_INTTYPES_H = @__PRELUDE_HAVE_INTTYPES_H@ __PRELUDE_HAVE_STDINT_H = @__PRELUDE_HAVE_STDINT_H@ __PRELUDE_STDINT_HAVE_UINT16 = @__PRELUDE_STDINT_HAVE_UINT16@ __PRELUDE_STDINT_HAVE_UINT32 = @__PRELUDE_STDINT_HAVE_UINT32@ __PRELUDE_STDINT_HAVE_UINT64 = @__PRELUDE_STDINT_HAVE_UINT64@ __PRELUDE_STDINT_HAVE_UINT8 = @__PRELUDE_STDINT_HAVE_UINT8@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ gl_LIBOBJS = @gl_LIBOBJS@ gl_LTLIBOBJS = @gl_LTLIBOBJS@ gltests_LIBOBJS = @gltests_LIBOBJS@ gltests_LTLIBOBJS = @gltests_LTLIBOBJS@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ lt_ECHO = @lt_ECHO@ ltdl_LIBOBJS = @ltdl_LIBOBJS@ ltdl_LTLIBOBJS = @ltdl_LTLIBOBJS@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ pkgrbexecdir = @pkgrbexecdir@ pkgrubydir = @pkgrubydir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ rbexecdir = @rbexecdir@ rubydir = @rubydir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sys_symbol_underscore = @sys_symbol_underscore@ sysconfdir = @sysconfdir@ target = @target@ target_alias = @target_alias@ target_cpu = @target_cpu@ target_os = @target_os@ target_vendor = @target_vendor@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ ACLOCAL_AMFLAGS = -I m4 AUTOMAKE_OPTIONS = foreign # -I$(srcdir) is needed for user that built libltdl with a sub-Automake # (not as a sub-package!) using 'nostdinc': AM_CPPFLAGS = -DLT_CONFIG_H='<$(LT_CONFIG_H)>' -DLTDL -I. -I$(srcdir) \ -Ilibltdl -I$(srcdir)/libltdl -I$(srcdir)/libltdl AM_LDFLAGS = -no-undefined BUILT_SOURCES = $(ARGZ_H) include_HEADERS = $(am__append_1) noinst_LTLIBRARIES = $(LT_DLLOADERS) $(am__append_3) lib_LTLIBRARIES = $(am__append_2) EXTRA_LTLIBRARIES = dlopen.la dld_link.la dyld.la load_add_on.la \ loadlibrary.la shl_load.la EXTRA_DIST = lt__dirent.c lt__strl.c COPYING.LIB README argz_.h argz.c CLEANFILES = libltdl.la libltdlc.la libdlloader.la $(ltdl_LIBOBJS) \ $(ltdl_LTLIBOBJS) MOSTLYCLEANFILES = argz.h argz.h-t LTDL_VERSION_INFO = -version-info 9:1:2 @INSTALL_LTDL_TRUE@ltdlincludedir = $(includedir)/libltdl @INSTALL_LTDL_TRUE@ltdlinclude_HEADERS = libltdl/lt_system.h \ @INSTALL_LTDL_TRUE@ libltdl/lt_error.h \ @INSTALL_LTDL_TRUE@ libltdl/lt_dlloader.h libltdl_la_SOURCES = libltdl/lt__alloc.h \ libltdl/lt__dirent.h \ libltdl/lt__glibc.h \ libltdl/lt__private.h \ libltdl/lt__strl.h \ libltdl/lt_dlloader.h \ libltdl/lt_error.h \ libltdl/lt_system.h \ libltdl/slist.h \ loaders/preopen.c \ lt__alloc.c \ lt_dlloader.c \ lt_error.c \ ltdl.c \ ltdl.h \ slist.c libltdl_la_CPPFLAGS = -DLTDLOPEN=$(LTDLOPEN) $(AM_CPPFLAGS) libltdl_la_LDFLAGS = $(AM_LDFLAGS) $(LTDL_VERSION_INFO) $(LT_DLPREOPEN) libltdl_la_LIBADD = $(ltdl_LTLIBOBJS) libltdl_la_DEPENDENCIES = $(LT_DLLOADERS) $(ltdl_LTLIBOBJS) libltdlc_la_SOURCES = $(libltdl_la_SOURCES) libltdlc_la_CPPFLAGS = -DLTDLOPEN=$(LTDLOPEN)c $(AM_CPPFLAGS) libltdlc_la_LDFLAGS = $(AM_LDFLAGS) $(LT_DLPREOPEN) libltdlc_la_LIBADD = $(libltdl_la_LIBADD) libltdlc_la_DEPENDENCIES = $(libltdl_la_DEPENDENCIES) dlopen_la_SOURCES = loaders/dlopen.c dlopen_la_LDFLAGS = -module -avoid-version dlopen_la_LIBADD = $(LIBADD_DLOPEN) dld_link_la_SOURCES = loaders/dld_link.c dld_link_la_LDFLAGS = -module -avoid-version dld_link_la_LIBADD = -ldld dyld_la_SOURCES = loaders/dyld.c dyld_la_LDFLAGS = -module -avoid-version load_add_on_la_SOURCES = loaders/load_add_on.c load_add_on_la_LDFLAGS = -module -avoid-version loadlibrary_la_SOURCES = loaders/loadlibrary.c loadlibrary_la_LDFLAGS = -module -avoid-version shl_load_la_SOURCES = loaders/shl_load.c shl_load_la_LDFLAGS = -module -avoid-version shl_load_la_LIBADD = $(LIBADD_SHL_LOAD) all: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) all-am .SUFFIXES: .SUFFIXES: .c .lo .o .obj $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign libltdl/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --foreign libltdl/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): install-libLTLIBRARIES: $(lib_LTLIBRARIES) @$(NORMAL_INSTALL) test -z "$(libdir)" || $(MKDIR_P) "$(DESTDIR)$(libdir)" @list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \ list2=; for p in $$list; do \ if test -f $$p; then \ list2="$$list2 $$p"; \ else :; fi; \ done; \ test -z "$$list2" || { \ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(libdir)'"; \ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(libdir)"; \ } uninstall-libLTLIBRARIES: @$(NORMAL_UNINSTALL) @list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \ for p in $$list; do \ $(am__strip_dir) \ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(libdir)/$$f'"; \ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(libdir)/$$f"; \ done clean-libLTLIBRARIES: -test -z "$(lib_LTLIBRARIES)" || rm -f $(lib_LTLIBRARIES) @list='$(lib_LTLIBRARIES)'; for p in $$list; do \ dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ test "$$dir" != "$$p" || dir=.; \ echo "rm -f \"$${dir}/so_locations\""; \ rm -f "$${dir}/so_locations"; \ done clean-noinstLTLIBRARIES: -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) @list='$(noinst_LTLIBRARIES)'; for p in $$list; do \ dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ test "$$dir" != "$$p" || dir=.; \ echo "rm -f \"$${dir}/so_locations\""; \ rm -f "$${dir}/so_locations"; \ done dld_link.la: $(dld_link_la_OBJECTS) $(dld_link_la_DEPENDENCIES) $(dld_link_la_LINK) $(dld_link_la_OBJECTS) $(dld_link_la_LIBADD) $(LIBS) dlopen.la: $(dlopen_la_OBJECTS) $(dlopen_la_DEPENDENCIES) $(dlopen_la_LINK) $(dlopen_la_OBJECTS) $(dlopen_la_LIBADD) $(LIBS) dyld.la: $(dyld_la_OBJECTS) $(dyld_la_DEPENDENCIES) $(dyld_la_LINK) $(dyld_la_OBJECTS) $(dyld_la_LIBADD) $(LIBS) libltdl.la: $(libltdl_la_OBJECTS) $(libltdl_la_DEPENDENCIES) $(libltdl_la_LINK) $(am_libltdl_la_rpath) $(libltdl_la_OBJECTS) $(libltdl_la_LIBADD) $(LIBS) libltdlc.la: $(libltdlc_la_OBJECTS) $(libltdlc_la_DEPENDENCIES) $(libltdlc_la_LINK) $(am_libltdlc_la_rpath) $(libltdlc_la_OBJECTS) $(libltdlc_la_LIBADD) $(LIBS) load_add_on.la: $(load_add_on_la_OBJECTS) $(load_add_on_la_DEPENDENCIES) $(load_add_on_la_LINK) $(load_add_on_la_OBJECTS) $(load_add_on_la_LIBADD) $(LIBS) loadlibrary.la: $(loadlibrary_la_OBJECTS) $(loadlibrary_la_DEPENDENCIES) $(loadlibrary_la_LINK) $(loadlibrary_la_OBJECTS) $(loadlibrary_la_LIBADD) $(LIBS) shl_load.la: $(shl_load_la_OBJECTS) $(shl_load_la_DEPENDENCIES) $(shl_load_la_LINK) $(shl_load_la_OBJECTS) $(shl_load_la_LIBADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dld_link.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dlopen.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dyld.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libltdl_la-lt__alloc.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libltdl_la-lt_dlloader.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libltdl_la-lt_error.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libltdl_la-ltdl.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libltdl_la-preopen.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libltdl_la-slist.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libltdlc_la-lt__alloc.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libltdlc_la-lt_dlloader.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libltdlc_la-lt_error.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libltdlc_la-ltdl.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libltdlc_la-preopen.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libltdlc_la-slist.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/load_add_on.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/loadlibrary.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/shl_load.Plo@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(COMPILE) -c $< .c.obj: @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` .c.lo: @am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< dld_link.lo: loaders/dld_link.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT dld_link.lo -MD -MP -MF $(DEPDIR)/dld_link.Tpo -c -o dld_link.lo `test -f 'loaders/dld_link.c' || echo '$(srcdir)/'`loaders/dld_link.c @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/dld_link.Tpo $(DEPDIR)/dld_link.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='loaders/dld_link.c' object='dld_link.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o dld_link.lo `test -f 'loaders/dld_link.c' || echo '$(srcdir)/'`loaders/dld_link.c dlopen.lo: loaders/dlopen.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT dlopen.lo -MD -MP -MF $(DEPDIR)/dlopen.Tpo -c -o dlopen.lo `test -f 'loaders/dlopen.c' || echo '$(srcdir)/'`loaders/dlopen.c @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/dlopen.Tpo $(DEPDIR)/dlopen.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='loaders/dlopen.c' object='dlopen.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o dlopen.lo `test -f 'loaders/dlopen.c' || echo '$(srcdir)/'`loaders/dlopen.c dyld.lo: loaders/dyld.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT dyld.lo -MD -MP -MF $(DEPDIR)/dyld.Tpo -c -o dyld.lo `test -f 'loaders/dyld.c' || echo '$(srcdir)/'`loaders/dyld.c @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/dyld.Tpo $(DEPDIR)/dyld.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='loaders/dyld.c' object='dyld.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o dyld.lo `test -f 'loaders/dyld.c' || echo '$(srcdir)/'`loaders/dyld.c libltdl_la-preopen.lo: loaders/preopen.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libltdl_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libltdl_la-preopen.lo -MD -MP -MF $(DEPDIR)/libltdl_la-preopen.Tpo -c -o libltdl_la-preopen.lo `test -f 'loaders/preopen.c' || echo '$(srcdir)/'`loaders/preopen.c @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libltdl_la-preopen.Tpo $(DEPDIR)/libltdl_la-preopen.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='loaders/preopen.c' object='libltdl_la-preopen.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libltdl_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libltdl_la-preopen.lo `test -f 'loaders/preopen.c' || echo '$(srcdir)/'`loaders/preopen.c libltdl_la-lt__alloc.lo: lt__alloc.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libltdl_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libltdl_la-lt__alloc.lo -MD -MP -MF $(DEPDIR)/libltdl_la-lt__alloc.Tpo -c -o libltdl_la-lt__alloc.lo `test -f 'lt__alloc.c' || echo '$(srcdir)/'`lt__alloc.c @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libltdl_la-lt__alloc.Tpo $(DEPDIR)/libltdl_la-lt__alloc.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='lt__alloc.c' object='libltdl_la-lt__alloc.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libltdl_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libltdl_la-lt__alloc.lo `test -f 'lt__alloc.c' || echo '$(srcdir)/'`lt__alloc.c libltdl_la-lt_dlloader.lo: lt_dlloader.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libltdl_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libltdl_la-lt_dlloader.lo -MD -MP -MF $(DEPDIR)/libltdl_la-lt_dlloader.Tpo -c -o libltdl_la-lt_dlloader.lo `test -f 'lt_dlloader.c' || echo '$(srcdir)/'`lt_dlloader.c @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libltdl_la-lt_dlloader.Tpo $(DEPDIR)/libltdl_la-lt_dlloader.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='lt_dlloader.c' object='libltdl_la-lt_dlloader.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libltdl_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libltdl_la-lt_dlloader.lo `test -f 'lt_dlloader.c' || echo '$(srcdir)/'`lt_dlloader.c libltdl_la-lt_error.lo: lt_error.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libltdl_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libltdl_la-lt_error.lo -MD -MP -MF $(DEPDIR)/libltdl_la-lt_error.Tpo -c -o libltdl_la-lt_error.lo `test -f 'lt_error.c' || echo '$(srcdir)/'`lt_error.c @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libltdl_la-lt_error.Tpo $(DEPDIR)/libltdl_la-lt_error.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='lt_error.c' object='libltdl_la-lt_error.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libltdl_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libltdl_la-lt_error.lo `test -f 'lt_error.c' || echo '$(srcdir)/'`lt_error.c libltdl_la-ltdl.lo: ltdl.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libltdl_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libltdl_la-ltdl.lo -MD -MP -MF $(DEPDIR)/libltdl_la-ltdl.Tpo -c -o libltdl_la-ltdl.lo `test -f 'ltdl.c' || echo '$(srcdir)/'`ltdl.c @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libltdl_la-ltdl.Tpo $(DEPDIR)/libltdl_la-ltdl.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='ltdl.c' object='libltdl_la-ltdl.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libltdl_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libltdl_la-ltdl.lo `test -f 'ltdl.c' || echo '$(srcdir)/'`ltdl.c libltdl_la-slist.lo: slist.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libltdl_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libltdl_la-slist.lo -MD -MP -MF $(DEPDIR)/libltdl_la-slist.Tpo -c -o libltdl_la-slist.lo `test -f 'slist.c' || echo '$(srcdir)/'`slist.c @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libltdl_la-slist.Tpo $(DEPDIR)/libltdl_la-slist.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='slist.c' object='libltdl_la-slist.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libltdl_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libltdl_la-slist.lo `test -f 'slist.c' || echo '$(srcdir)/'`slist.c libltdlc_la-preopen.lo: loaders/preopen.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libltdlc_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libltdlc_la-preopen.lo -MD -MP -MF $(DEPDIR)/libltdlc_la-preopen.Tpo -c -o libltdlc_la-preopen.lo `test -f 'loaders/preopen.c' || echo '$(srcdir)/'`loaders/preopen.c @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libltdlc_la-preopen.Tpo $(DEPDIR)/libltdlc_la-preopen.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='loaders/preopen.c' object='libltdlc_la-preopen.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libltdlc_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libltdlc_la-preopen.lo `test -f 'loaders/preopen.c' || echo '$(srcdir)/'`loaders/preopen.c libltdlc_la-lt__alloc.lo: lt__alloc.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libltdlc_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libltdlc_la-lt__alloc.lo -MD -MP -MF $(DEPDIR)/libltdlc_la-lt__alloc.Tpo -c -o libltdlc_la-lt__alloc.lo `test -f 'lt__alloc.c' || echo '$(srcdir)/'`lt__alloc.c @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libltdlc_la-lt__alloc.Tpo $(DEPDIR)/libltdlc_la-lt__alloc.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='lt__alloc.c' object='libltdlc_la-lt__alloc.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libltdlc_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libltdlc_la-lt__alloc.lo `test -f 'lt__alloc.c' || echo '$(srcdir)/'`lt__alloc.c libltdlc_la-lt_dlloader.lo: lt_dlloader.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libltdlc_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libltdlc_la-lt_dlloader.lo -MD -MP -MF $(DEPDIR)/libltdlc_la-lt_dlloader.Tpo -c -o libltdlc_la-lt_dlloader.lo `test -f 'lt_dlloader.c' || echo '$(srcdir)/'`lt_dlloader.c @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libltdlc_la-lt_dlloader.Tpo $(DEPDIR)/libltdlc_la-lt_dlloader.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='lt_dlloader.c' object='libltdlc_la-lt_dlloader.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libltdlc_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libltdlc_la-lt_dlloader.lo `test -f 'lt_dlloader.c' || echo '$(srcdir)/'`lt_dlloader.c libltdlc_la-lt_error.lo: lt_error.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libltdlc_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libltdlc_la-lt_error.lo -MD -MP -MF $(DEPDIR)/libltdlc_la-lt_error.Tpo -c -o libltdlc_la-lt_error.lo `test -f 'lt_error.c' || echo '$(srcdir)/'`lt_error.c @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libltdlc_la-lt_error.Tpo $(DEPDIR)/libltdlc_la-lt_error.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='lt_error.c' object='libltdlc_la-lt_error.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libltdlc_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libltdlc_la-lt_error.lo `test -f 'lt_error.c' || echo '$(srcdir)/'`lt_error.c libltdlc_la-ltdl.lo: ltdl.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libltdlc_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libltdlc_la-ltdl.lo -MD -MP -MF $(DEPDIR)/libltdlc_la-ltdl.Tpo -c -o libltdlc_la-ltdl.lo `test -f 'ltdl.c' || echo '$(srcdir)/'`ltdl.c @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libltdlc_la-ltdl.Tpo $(DEPDIR)/libltdlc_la-ltdl.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='ltdl.c' object='libltdlc_la-ltdl.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libltdlc_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libltdlc_la-ltdl.lo `test -f 'ltdl.c' || echo '$(srcdir)/'`ltdl.c libltdlc_la-slist.lo: slist.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libltdlc_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libltdlc_la-slist.lo -MD -MP -MF $(DEPDIR)/libltdlc_la-slist.Tpo -c -o libltdlc_la-slist.lo `test -f 'slist.c' || echo '$(srcdir)/'`slist.c @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libltdlc_la-slist.Tpo $(DEPDIR)/libltdlc_la-slist.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='slist.c' object='libltdlc_la-slist.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libltdlc_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libltdlc_la-slist.lo `test -f 'slist.c' || echo '$(srcdir)/'`slist.c load_add_on.lo: loaders/load_add_on.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT load_add_on.lo -MD -MP -MF $(DEPDIR)/load_add_on.Tpo -c -o load_add_on.lo `test -f 'loaders/load_add_on.c' || echo '$(srcdir)/'`loaders/load_add_on.c @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/load_add_on.Tpo $(DEPDIR)/load_add_on.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='loaders/load_add_on.c' object='load_add_on.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o load_add_on.lo `test -f 'loaders/load_add_on.c' || echo '$(srcdir)/'`loaders/load_add_on.c loadlibrary.lo: loaders/loadlibrary.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT loadlibrary.lo -MD -MP -MF $(DEPDIR)/loadlibrary.Tpo -c -o loadlibrary.lo `test -f 'loaders/loadlibrary.c' || echo '$(srcdir)/'`loaders/loadlibrary.c @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/loadlibrary.Tpo $(DEPDIR)/loadlibrary.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='loaders/loadlibrary.c' object='loadlibrary.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o loadlibrary.lo `test -f 'loaders/loadlibrary.c' || echo '$(srcdir)/'`loaders/loadlibrary.c shl_load.lo: loaders/shl_load.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT shl_load.lo -MD -MP -MF $(DEPDIR)/shl_load.Tpo -c -o shl_load.lo `test -f 'loaders/shl_load.c' || echo '$(srcdir)/'`loaders/shl_load.c @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/shl_load.Tpo $(DEPDIR)/shl_load.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='loaders/shl_load.c' object='shl_load.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o shl_load.lo `test -f 'loaders/shl_load.c' || echo '$(srcdir)/'`loaders/shl_load.c mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs install-includeHEADERS: $(include_HEADERS) @$(NORMAL_INSTALL) test -z "$(includedir)" || $(MKDIR_P) "$(DESTDIR)$(includedir)" @list='$(include_HEADERS)'; test -n "$(includedir)" || list=; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ done | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_HEADER) $$files '$(DESTDIR)$(includedir)'"; \ $(INSTALL_HEADER) $$files "$(DESTDIR)$(includedir)" || exit $$?; \ done uninstall-includeHEADERS: @$(NORMAL_UNINSTALL) @list='$(include_HEADERS)'; test -n "$(includedir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ test -n "$$files" || exit 0; \ echo " ( cd '$(DESTDIR)$(includedir)' && rm -f" $$files ")"; \ cd "$(DESTDIR)$(includedir)" && rm -f $$files install-ltdlincludeHEADERS: $(ltdlinclude_HEADERS) @$(NORMAL_INSTALL) test -z "$(ltdlincludedir)" || $(MKDIR_P) "$(DESTDIR)$(ltdlincludedir)" @list='$(ltdlinclude_HEADERS)'; test -n "$(ltdlincludedir)" || list=; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ done | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_HEADER) $$files '$(DESTDIR)$(ltdlincludedir)'"; \ $(INSTALL_HEADER) $$files "$(DESTDIR)$(ltdlincludedir)" || exit $$?; \ done uninstall-ltdlincludeHEADERS: @$(NORMAL_UNINSTALL) @list='$(ltdlinclude_HEADERS)'; test -n "$(ltdlincludedir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ test -n "$$files" || exit 0; \ echo " ( cd '$(DESTDIR)$(ltdlincludedir)' && rm -f" $$files ")"; \ cd "$(DESTDIR)$(ltdlincludedir)" && rm -f $$files ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ mkid -fID $$unique tags: TAGS TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) set x; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: CTAGS CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) check-am all-am: Makefile $(LTLIBRARIES) $(HEADERS) installdirs: for dir in "$(DESTDIR)$(libdir)" "$(DESTDIR)$(includedir)" "$(DESTDIR)$(ltdlincludedir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: -test -z "$(MOSTLYCLEANFILES)" || rm -f $(MOSTLYCLEANFILES) clean-generic: -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES) distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." -test -z "$(BUILT_SOURCES)" || rm -f $(BUILT_SOURCES) clean: clean-am clean-am: clean-generic clean-libLTLIBRARIES clean-libtool \ clean-noinstLTLIBRARIES mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-includeHEADERS install-ltdlincludeHEADERS install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-libLTLIBRARIES install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-includeHEADERS uninstall-libLTLIBRARIES \ uninstall-ltdlincludeHEADERS .MAKE: all check install install-am install-strip .PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ clean-libLTLIBRARIES clean-libtool clean-noinstLTLIBRARIES \ ctags distclean distclean-compile distclean-generic \ distclean-libtool distclean-tags distdir dvi dvi-am html \ html-am info info-am install install-am install-data \ install-data-am install-dvi install-dvi-am install-exec \ install-exec-am install-html install-html-am \ install-includeHEADERS install-info install-info-am \ install-libLTLIBRARIES install-ltdlincludeHEADERS install-man \ install-pdf install-pdf-am install-ps install-ps-am \ install-strip installcheck installcheck-am installdirs \ maintainer-clean maintainer-clean-generic mostlyclean \ mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ pdf pdf-am ps ps-am tags uninstall uninstall-am \ uninstall-includeHEADERS uninstall-libLTLIBRARIES \ uninstall-ltdlincludeHEADERS # We need the following in order to create an when the system # doesn't have one that works with the given compiler. all-local $(lib_OBJECTS): $(ARGZ_H) argz.h: argz_.h $(mkinstalldirs) . cp $(srcdir)/argz_.h $@-t mv $@-t $@ # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: libprelude-1.0.0/libltdl/lt__strl.c0000644000076400007640000000702611347714403014215 00000000000000/* lt__strl.c -- size-bounded string copying and concatenation Copyright (C) 2004 Free Software Foundation, Inc. Written by Bob Friesenhahn, 2004 NOTE: The canonical source of this file is maintained with the GNU Libtool package. Report bugs to bug-libtool@gnu.org. GNU Libltdl is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. As a special exception to the GNU Lesser General Public License, if you distribute this file as part of a program or library that is built using GNU Libtool, you may include this file under the same distribution terms that you use for the rest of that program. GNU Libltdl 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 Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with GNU Libltdl; see the file COPYING.LIB. If not, a copy can be downloaded from http://www.gnu.org/licenses/lgpl.html, or obtained by writing to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ #include #include #include "lt__strl.h" /* lt_strlcat appends the NULL-terminated string src to the end of dst. It will append at most dstsize - strlen(dst) - 1 bytes, NULL-terminating the result. The total length of the string which would have been created given sufficient buffer size (may be longer than dstsize) is returned. This function substitutes for strlcat() which is available under NetBSD, FreeBSD and Solaris 9. Buffer overflow can be checked as follows: if (lt_strlcat(dst, src, dstsize) >= dstsize) return -1; */ #if !defined(HAVE_STRLCAT) size_t lt_strlcat(char *dst, const char *src, const size_t dstsize) { size_t length; char *p; const char *q; assert(dst != NULL); assert(src != (const char *) NULL); assert(dstsize >= 1); length=strlen(dst); /* Copy remaining characters from src while constraining length to size - 1. */ for ( p = dst + length, q = src; (*q != 0) && (length < dstsize - 1) ; length++, p++, q++ ) *p = *q; dst[length]='\0'; /* Add remaining length of src to length. */ while (*q++) length++; return length; } #endif /* !defined(HAVE_STRLCAT) */ /* lt_strlcpy copies up to dstsize - 1 characters from the NULL-terminated string src to dst, NULL-terminating the result. The total length of the string which would have been created given sufficient buffer size (may be longer than dstsize) is returned. This function substitutes for strlcpy() which is available under OpenBSD, FreeBSD and Solaris 9. Buffer overflow can be checked as follows: if (lt_strlcpy(dst, src, dstsize) >= dstsize) return -1; */ #if !defined(HAVE_STRLCPY) size_t lt_strlcpy(char *dst, const char *src, const size_t dstsize) { size_t length=0; char *p; const char *q; assert(dst != NULL); assert(src != (const char *) NULL); assert(dstsize >= 1); /* Copy src to dst within bounds of size-1. */ for ( p=dst, q=src, length=0 ; (*q != 0) && (length < dstsize-1) ; length++, p++, q++ ) *p = *q; dst[length]='\0'; /* Add remaining length of src to length. */ while (*q++) length++; return length; } #endif /* !defined(HAVE_STRLCPY) */ libprelude-1.0.0/libltdl/lt__alloc.c0000644000076400007640000000435511347714404014326 00000000000000/* lt__alloc.c -- internal memory management interface Copyright (C) 2004, 2006, 2007 Free Software Foundation, Inc. Written by Gary V. Vaughan, 2004 NOTE: The canonical source of this file is maintained with the GNU Libtool package. Report bugs to bug-libtool@gnu.org. GNU Libltdl is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. As a special exception to the GNU Lesser General Public License, if you distribute this file as part of a program or library that is built using GNU Libtool, you may include this file under the same distribution terms that you use for the rest of that program. GNU Libltdl 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 Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with GNU Libltdl; see the file COPYING.LIB. If not, a copy can be downloaded from http://www.gnu.org/licenses/lgpl.html, or obtained by writing to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ #include "lt__private.h" #include #include "lt__alloc.h" static void alloc_die_default (void); void (*lt__alloc_die) (void) = alloc_die_default; /* Unless overridden, exit on memory failure. */ static void alloc_die_default (void) { fprintf (stderr, "Out of memory.\n"); exit (EXIT_FAILURE); } void * lt__malloc (size_t n) { void *mem; if (! (mem = malloc (n))) (*lt__alloc_die) (); return mem; } void * lt__zalloc (size_t n) { void *mem; if ((mem = lt__malloc (n))) memset (mem, 0, n); return mem; } void * lt__realloc (void *mem, size_t n) { if (! (mem = realloc (mem, n))) (*lt__alloc_die) (); return mem; } void * lt__memdup (void const *mem, size_t n) { void *newmem; if ((newmem = lt__malloc (n))) return memcpy (newmem, mem, n); return 0; } char * lt__strdup (const char *string) { return (char *) lt__memdup (string, strlen (string) +1); } libprelude-1.0.0/libltdl/lt_dlloader.c0000644000076400007640000001363611347714404014665 00000000000000/* lt_dlloader.c -- dynamic library loader interface Copyright (C) 2004, 2007, 2008 Free Software Foundation, Inc. Written by Gary V. Vaughan, 2004 NOTE: The canonical source of this file is maintained with the GNU Libtool package. Report bugs to bug-libtool@gnu.org. GNU Libltdl is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. As a special exception to the GNU Lesser General Public License, if you distribute this file as part of a program or library that is built using GNU Libtool, you may include this file under the same distribution terms that you use for the rest of that program. GNU Libltdl 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 Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with GNU Libltdl; see the file COPYING.LIB. If not, a copy can be downloaded from http://www.gnu.org/licenses/lgpl.html, or obtained by writing to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ #include "lt__private.h" #include "lt_dlloader.h" #define RETURN_SUCCESS 0 #define RETURN_FAILURE 1 static void * loader_callback (SList *item, void *userdata); /* A list of all the dlloaders we know about, each stored as a boxed SList item: */ static SList *loaders = 0; /* Return NULL, unless the loader in this ITEM has a matching name, in which case we return the matching item so that its address is passed back out (for possible freeing) by slist_remove. */ static void * loader_callback (SList *item, void *userdata) { const lt_dlvtable *vtable = (const lt_dlvtable *) item->userdata; const char * name = (const char *) userdata; assert (vtable); return streq (vtable->name, name) ? (void *) item : NULL; } /* Hook VTABLE into our global LOADERS list according to its own PRIORITY field value. */ int lt_dlloader_add (const lt_dlvtable *vtable) { SList *item; if ((vtable == 0) /* diagnose invalid vtable fields */ || (vtable->module_open == 0) || (vtable->module_close == 0) || (vtable->find_sym == 0) || ((vtable->priority != LT_DLLOADER_PREPEND) && (vtable->priority != LT_DLLOADER_APPEND))) { LT__SETERROR (INVALID_LOADER); return RETURN_FAILURE; } item = slist_box (vtable); if (!item) { (*lt__alloc_die) (); /* Let the caller know something went wrong if lt__alloc_die doesn't abort. */ return RETURN_FAILURE; } if (vtable->priority == LT_DLLOADER_PREPEND) { loaders = slist_cons (item, loaders); } else { assert (vtable->priority == LT_DLLOADER_APPEND); loaders = slist_concat (loaders, item); } return RETURN_SUCCESS; } #ifdef LT_DEBUG_LOADERS static void * loader_dump_callback (SList *item, void *userdata) { const lt_dlvtable *vtable = (const lt_dlvtable *) item->userdata; fprintf (stderr, ", %s", (vtable && vtable->name) ? vtable->name : "(null)"); return 0; } void lt_dlloader_dump (void) { fprintf (stderr, "loaders: "); if (!loaders) { fprintf (stderr, "(empty)"); } else { const lt_dlvtable *head = (const lt_dlvtable *) loaders->userdata; fprintf (stderr, "%s", (head && head->name) ? head->name : "(null)"); if (slist_tail (loaders)) slist_foreach (slist_tail (loaders), loader_dump_callback, NULL); } fprintf (stderr, "\n"); } #endif /* An iterator for the global loader list: if LOADER is NULL, then return the first element, otherwise the following element. */ lt_dlloader lt_dlloader_next (lt_dlloader loader) { SList *item = (SList *) loader; return (lt_dlloader) (item ? item->next : loaders); } /* Non-destructive unboxing of a loader. */ const lt_dlvtable * lt_dlloader_get (lt_dlloader loader) { return (const lt_dlvtable *) (loader ? ((SList *) loader)->userdata : NULL); } /* Return the contents of the first item in the global loader list with a matching NAME after removing it from that list. If there was no match, return NULL; if there is an error, return NULL and set an error for lt_dlerror; do not set an error if only resident modules need this loader; in either case, the loader list is not changed if NULL is returned. */ lt_dlvtable * lt_dlloader_remove (char *name) { const lt_dlvtable * vtable = lt_dlloader_find (name); static const char id_string[] = "lt_dlloader_remove"; lt_dlinterface_id iface; lt_dlhandle handle = 0; int in_use = 0; int in_use_by_resident = 0; if (!vtable) { LT__SETERROR (INVALID_LOADER); return 0; } /* Fail if there are any open modules which use this loader. */ iface = lt_dlinterface_register (id_string, NULL); while ((handle = lt_dlhandle_iterate (iface, handle))) { lt_dlhandle cur = handle; if (cur->vtable == vtable) { in_use = 1; if (lt_dlisresident (handle)) in_use_by_resident = 1; } } lt_dlinterface_free (iface); if (in_use) { if (!in_use_by_resident) LT__SETERROR (REMOVE_LOADER); return 0; } /* Call the loader finalisation function. */ if (vtable && vtable->dlloader_exit) { if ((*vtable->dlloader_exit) (vtable->dlloader_data) != 0) { /* If there is an exit function, and it returns non-zero then it must set an error, and we will not remove it from the list. */ return 0; } } /* If we got this far, remove the loader from our global list. */ return (lt_dlvtable *) slist_unbox ((SList *) slist_remove (&loaders, loader_callback, name)); } const lt_dlvtable * lt_dlloader_find (char *name) { return lt_dlloader_get (slist_find (loaders, loader_callback, name)); } libprelude-1.0.0/libltdl/loaders/0000775000076400007640000000000011347714751013743 500000000000000libprelude-1.0.0/libltdl/loaders/loadlibrary.c0000644000076400007640000001507711347714403016335 00000000000000/* loader-loadlibrary.c -- dynamic linking for Win32 Copyright (C) 1998, 1999, 2000, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. Written by Thomas Tanner, 1998 NOTE: The canonical source of this file is maintained with the GNU Libtool package. Report bugs to bug-libtool@gnu.org. GNU Libltdl is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. As a special exception to the GNU Lesser General Public License, if you distribute this file as part of a program or library that is built using GNU Libtool, you may include this file under the same distribution terms that you use for the rest of that program. GNU Libltdl 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 Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with GNU Libltdl; see the file COPYING.LIB. If not, a copy can be downloaded from http://www.gnu.org/licenses/lgpl.html, or obtained by writing to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ #include "lt__private.h" #include "lt_dlloader.h" #if defined(__CYGWIN__) # include #endif /* Use the preprocessor to rename non-static symbols to avoid namespace collisions when the loader code is statically linked into libltdl. Use the "_LTX_" prefix so that the symbol addresses can be fetched from the preloaded symbol list by lt_dlsym(): */ #define get_vtable loadlibrary_LTX_get_vtable LT_BEGIN_C_DECLS LT_SCOPE lt_dlvtable *get_vtable (lt_user_data loader_data); LT_END_C_DECLS /* Boilerplate code to set up the vtable for hooking this loader into libltdl's loader list: */ static int vl_exit (lt_user_data loader_data); static lt_module vm_open (lt_user_data loader_data, const char *filename, lt_dladvise advise); static int vm_close (lt_user_data loader_data, lt_module module); static void * vm_sym (lt_user_data loader_data, lt_module module, const char *symbolname); static lt_dlinterface_id iface_id = 0; static lt_dlvtable *vtable = 0; /* Return the vtable for this loader, only the name and sym_prefix attributes (plus the virtual function implementations, obviously) change between loaders. */ lt_dlvtable * get_vtable (lt_user_data loader_data) { if (!vtable) { vtable = (lt_dlvtable *) lt__zalloc (sizeof *vtable); iface_id = lt_dlinterface_register ("ltdl loadlibrary", NULL); } if (vtable && !vtable->name) { vtable->name = "lt_loadlibrary"; vtable->module_open = vm_open; vtable->module_close = vm_close; vtable->find_sym = vm_sym; vtable->dlloader_exit = vl_exit; vtable->dlloader_data = loader_data; vtable->priority = LT_DLLOADER_APPEND; } if (vtable && (vtable->dlloader_data != loader_data)) { LT__SETERROR (INIT_LOADER); return 0; } return vtable; } /* --- IMPLEMENTATION --- */ #include /* A function called through the vtable when this loader is no longer needed by the application. */ static int vl_exit (lt_user_data LT__UNUSED loader_data) { vtable = NULL; return 0; } /* A function called through the vtable to open a module with this loader. Returns an opaque representation of the newly opened module for processing with this loader's other vtable functions. */ static lt_module vm_open (lt_user_data LT__UNUSED loader_data, const char *filename, lt_dladvise LT__UNUSED advise) { lt_module module = 0; char *ext; char wpath[MAX_PATH]; size_t len; if (!filename) { /* Get the name of main module */ *wpath = 0; GetModuleFileName (NULL, wpath, sizeof (wpath)); filename = wpath; } else { len = LT_STRLEN (filename); if (len >= MAX_PATH) { LT__SETERROR (CANNOT_OPEN); return 0; } #if HAVE_DECL_CYGWIN_CONV_PATH if (cygwin_conv_path (CCP_POSIX_TO_WIN_A, filename, wpath, MAX_PATH)) { LT__SETERROR (CANNOT_OPEN); return 0; } len = 0; #elif defined(__CYGWIN__) cygwin_conv_to_full_win32_path (filename, wpath); len = 0; #else strcpy(wpath, filename); #endif ext = strrchr (wpath, '.'); if (!ext) { /* Append a `.' to stop Windows from adding an implicit `.dll' extension. */ if (!len) len = LT_STRLEN (wpath); if (len + 1 >= MAX_PATH) { LT__SETERROR (CANNOT_OPEN); return 0; } wpath[len] = '.'; wpath[len+1] = '\0'; } } { /* Silence dialog from LoadLibrary on some failures. No way to get the error mode, but to set it, so set it twice to preserve any previous flags. */ UINT errormode = SetErrorMode(SEM_FAILCRITICALERRORS); SetErrorMode(errormode | SEM_FAILCRITICALERRORS); module = LoadLibrary (wpath); /* Restore the error mode. */ SetErrorMode(errormode); } /* libltdl expects this function to fail if it is unable to physically load the library. Sadly, LoadLibrary will search the loaded libraries for a match and return one of them if the path search load fails. We check whether LoadLibrary is returning a handle to an already loaded module, and simulate failure if we find one. */ { lt_dlhandle cur = 0; while ((cur = lt_dlhandle_iterate (iface_id, cur))) { if (!cur->module) { cur = 0; break; } if (cur->module == module) { break; } } if (cur || !module) { LT__SETERROR (CANNOT_OPEN); module = 0; } } return module; } /* A function called through the vtable when a particular module should be unloaded. */ static int vm_close (lt_user_data LT__UNUSED loader_data, lt_module module) { int errors = 0; if (FreeLibrary((HMODULE) module) == 0) { LT__SETERROR (CANNOT_CLOSE); ++errors; } return errors; } /* A function called through the vtable to get the address of a symbol loaded from a particular module. */ static void * vm_sym (lt_user_data LT__UNUSED loader_data, lt_module module, const char *name) { void *address = (void *) GetProcAddress ((HMODULE) module, name); if (!address) { LT__SETERROR (SYMBOL_NOT_FOUND); } return address; } libprelude-1.0.0/libltdl/loaders/dyld.c0000644000076400007640000003253611347714403014764 00000000000000/* loader-dyld.c -- dynamic linking on darwin and OS X Copyright (C) 1998, 1999, 2000, 2004, 2006, 2007, 2008 Free Software Foundation, Inc. Written by Peter O'Gorman, 1998 NOTE: The canonical source of this file is maintained with the GNU Libtool package. Report bugs to bug-libtool@gnu.org. GNU Libltdl is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. As a special exception to the GNU Lesser General Public License, if you distribute this file as part of a program or library that is built using GNU Libtool, you may include this file under the same distribution terms that you use for the rest of that program. GNU Libltdl 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 Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with GNU Libltdl; see the file COPYING.LIB. If not, a copy can be downloaded from http://www.gnu.org/licenses/lgpl.html, or obtained by writing to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ #include "lt__private.h" #include "lt_dlloader.h" /* Use the preprocessor to rename non-static symbols to avoid namespace collisions when the loader code is statically linked into libltdl. Use the "_LTX_" prefix so that the symbol addresses can be fetched from the preloaded symbol list by lt_dlsym(): */ #define get_vtable dyld_LTX_get_vtable LT_BEGIN_C_DECLS LT_SCOPE lt_dlvtable *get_vtable (lt_user_data loader_data); LT_END_C_DECLS /* Boilerplate code to set up the vtable for hooking this loader into libltdl's loader list: */ static int vl_init (lt_user_data loader_data); static int vl_exit (lt_user_data loader_data); static lt_module vm_open (lt_user_data loader_data, const char *filename, lt_dladvise advise); static int vm_close (lt_user_data loader_data, lt_module module); static void * vm_sym (lt_user_data loader_data, lt_module module, const char *symbolname); static lt_dlvtable *vtable = 0; /* Return the vtable for this loader, only the name and sym_prefix attributes (plus the virtual function implementations, obviously) change between loaders. */ lt_dlvtable * get_vtable (lt_user_data loader_data) { if (!vtable) { vtable = lt__zalloc (sizeof *vtable); } if (vtable && !vtable->name) { vtable->name = "lt_dyld"; vtable->sym_prefix = "_"; vtable->dlloader_init = vl_init; vtable->module_open = vm_open; vtable->module_close = vm_close; vtable->find_sym = vm_sym; vtable->dlloader_exit = vl_exit; vtable->dlloader_data = loader_data; vtable->priority = LT_DLLOADER_APPEND; } if (vtable && (vtable->dlloader_data != loader_data)) { LT__SETERROR (INIT_LOADER); return 0; } return vtable; } /* --- IMPLEMENTATION --- */ #if defined(HAVE_MACH_O_DYLD_H) # if !defined(__APPLE_CC__) && !defined(__MWERKS__) && !defined(__private_extern__) /* Is this correct? Does it still function properly? */ # define __private_extern__ extern # endif # include #endif #include /* We have to put some stuff here that isn't in older dyld.h files */ #if !defined(ENUM_DYLD_BOOL) # define ENUM_DYLD_BOOL # undef FALSE # undef TRUE enum DYLD_BOOL { FALSE, TRUE }; #endif #if !defined(LC_REQ_DYLD) # define LC_REQ_DYLD 0x80000000 #endif #if !defined(LC_LOAD_WEAK_DYLIB) # define LC_LOAD_WEAK_DYLIB (0x18 | LC_REQ_DYLD) #endif #if !defined(NSADDIMAGE_OPTION_NONE) # define NSADDIMAGE_OPTION_NONE 0x0 #endif #if !defined(NSADDIMAGE_OPTION_RETURN_ON_ERROR) # define NSADDIMAGE_OPTION_RETURN_ON_ERROR 0x1 #endif #if !defined(NSADDIMAGE_OPTION_WITH_SEARCHING) # define NSADDIMAGE_OPTION_WITH_SEARCHING 0x2 #endif #if !defined(NSADDIMAGE_OPTION_RETURN_ONLY_IF_LOADED) # define NSADDIMAGE_OPTION_RETURN_ONLY_IF_LOADED 0x4 #endif #if !defined(NSADDIMAGE_OPTION_MATCH_FILENAME_BY_INSTALLNAME) # define NSADDIMAGE_OPTION_MATCH_FILENAME_BY_INSTALLNAME 0x8 #endif #if !defined(NSLOOKUPSYMBOLINIMAGE_OPTION_BIND) # define NSLOOKUPSYMBOLINIMAGE_OPTION_BIND 0x0 #endif #if !defined(NSLOOKUPSYMBOLINIMAGE_OPTION_BIND_NOW) # define NSLOOKUPSYMBOLINIMAGE_OPTION_BIND_NOW 0x1 #endif #if !defined(NSLOOKUPSYMBOLINIMAGE_OPTION_BIND_FULLY) # define NSLOOKUPSYMBOLINIMAGE_OPTION_BIND_FULLY 0x2 #endif #if !defined(NSLOOKUPSYMBOLINIMAGE_OPTION_RETURN_ON_ERROR) # define NSLOOKUPSYMBOLINIMAGE_OPTION_RETURN_ON_ERROR 0x4 #endif #define LT__SYMLOOKUP_OPTS (NSLOOKUPSYMBOLINIMAGE_OPTION_BIND_NOW \ | NSLOOKUPSYMBOLINIMAGE_OPTION_RETURN_ON_ERROR) #if defined(__BIG_ENDIAN__) # define LT__MAGIC MH_MAGIC #else # define LT__MAGIC MH_CIGAM #endif #define DYLD__SETMYERROR(errmsg) LT__SETERRORSTR (dylderror (errmsg)) #define DYLD__SETERROR(errcode) DYLD__SETMYERROR (LT__STRERROR (errcode)) typedef struct mach_header mach_header; typedef struct dylib_command dylib_command; static const char *dylderror (const char *errmsg); static const mach_header *lt__nsmodule_get_header (NSModule module); static const char *lt__header_get_instnam (const mach_header *mh); static const mach_header *lt__match_loadedlib (const char *name); static NSSymbol lt__linkedlib_symbol (const char *symname, const mach_header *mh); static const mach_header *(*lt__addimage) (const char *image_name, unsigned long options) = 0; static NSSymbol (*lt__image_symbol) (const mach_header *image, const char *symbolName, unsigned long options) = 0; static enum DYLD_BOOL (*lt__image_symbol_p) (const mach_header *image, const char *symbolName) = 0; static enum DYLD_BOOL (*lt__module_export) (NSModule module) = 0; static int dyld_cannot_close = 0; /* A function called through the vtable when this loader is no longer needed by the application. */ static int vl_exit (lt_user_data LT__UNUSED loader_data) { vtable = NULL; return 0; } /* A function called through the vtable to initialise this loader. */ static int vl_init (lt_user_data loader_data) { int errors = 0; if (! dyld_cannot_close) { if (!_dyld_present ()) { ++errors; } else { (void) _dyld_func_lookup ("__dyld_NSAddImage", (unsigned long*) <__addimage); (void) _dyld_func_lookup ("__dyld_NSLookupSymbolInImage", (unsigned long*)<__image_symbol); (void) _dyld_func_lookup ("__dyld_NSIsSymbolNameDefinedInImage", (unsigned long*) <__image_symbol_p); (void) _dyld_func_lookup ("__dyld_NSMakePrivateModulePublic", (unsigned long*) <__module_export); dyld_cannot_close = lt_dladderror ("can't close a dylib"); } } return errors; } /* A function called through the vtable to open a module with this loader. Returns an opaque representation of the newly opened module for processing with this loader's other vtable functions. */ static lt_module vm_open (lt_user_data loader_data, const char *filename, lt_dladvise LT__UNUSED advise) { lt_module module = 0; NSObjectFileImage ofi = 0; if (!filename) { return (lt_module) -1; } switch (NSCreateObjectFileImageFromFile (filename, &ofi)) { case NSObjectFileImageSuccess: module = NSLinkModule (ofi, filename, NSLINKMODULE_OPTION_RETURN_ON_ERROR | NSLINKMODULE_OPTION_PRIVATE | NSLINKMODULE_OPTION_BINDNOW); NSDestroyObjectFileImage (ofi); if (module) { lt__module_export (module); } break; case NSObjectFileImageInappropriateFile: if (lt__image_symbol_p && lt__image_symbol) { module = (lt_module) lt__addimage(filename, NSADDIMAGE_OPTION_RETURN_ON_ERROR); } break; case NSObjectFileImageFailure: case NSObjectFileImageArch: case NSObjectFileImageFormat: case NSObjectFileImageAccess: /*NOWORK*/ break; } if (!module) { DYLD__SETERROR (CANNOT_OPEN); } return module; } /* A function called through the vtable when a particular module should be unloaded. */ static int vm_close (lt_user_data loader_data, lt_module module) { int errors = 0; if (module != (lt_module) -1) { const mach_header *mh = (const mach_header *) module; int flags = 0; if (mh->magic == LT__MAGIC) { lt_dlseterror (dyld_cannot_close); ++errors; } else { /* Currently, if a module contains c++ static destructors and it is unloaded, we get a segfault in atexit(), due to compiler and dynamic loader differences of opinion, this works around that. */ if ((const struct section *) NULL != getsectbynamefromheader (lt__nsmodule_get_header (module), "__DATA", "__mod_term_func")) { flags |= NSUNLINKMODULE_OPTION_KEEP_MEMORY_MAPPED; } #if defined(__ppc__) flags |= NSUNLINKMODULE_OPTION_RESET_LAZY_REFERENCES; #endif if (!NSUnLinkModule (module, flags)) { DYLD__SETERROR (CANNOT_CLOSE); ++errors; } } } return errors; } /* A function called through the vtable to get the address of a symbol loaded from a particular module. */ static void * vm_sym (lt_user_data loader_data, lt_module module, const char *name) { NSSymbol *nssym = 0; const mach_header *mh = (const mach_header *) module; char saveError[256] = "Symbol not found"; if (module == (lt_module) -1) { void *address, *unused; _dyld_lookup_and_bind (name, (unsigned long*) &address, &unused); return address; } if (mh->magic == LT__MAGIC) { if (lt__image_symbol_p && lt__image_symbol) { if (lt__image_symbol_p (mh, name)) { nssym = lt__image_symbol (mh, name, LT__SYMLOOKUP_OPTS); } } } else { nssym = NSLookupSymbolInModule (module, name); } if (!nssym) { strncpy (saveError, dylderror (LT__STRERROR (SYMBOL_NOT_FOUND)), 255); saveError[255] = 0; if (!mh) { mh = (mach_header *)lt__nsmodule_get_header (module); } nssym = lt__linkedlib_symbol (name, mh); } if (!nssym) { LT__SETERRORSTR (saveError); } return nssym ? NSAddressOfSymbol (nssym) : 0; } /* --- HELPER FUNCTIONS --- */ /* Return the dyld error string, or the passed in error string if none. */ static const char * dylderror (const char *errmsg) { NSLinkEditErrors ler; int lerno; const char *file; const char *errstr; NSLinkEditError (&ler, &lerno, &file, &errstr); if (! (errstr && *errstr)) { errstr = errmsg; } return errstr; } /* There should probably be an apple dyld api for this. */ static const mach_header * lt__nsmodule_get_header (NSModule module) { int i = _dyld_image_count(); const char *modname = NSNameOfModule (module); const mach_header *mh = 0; if (!modname) return NULL; while (i > 0) { --i; if (strneq (_dyld_get_image_name (i), modname)) { mh = _dyld_get_image_header (i); break; } } return mh; } /* NSAddImage is also used to get the loaded image, but it only works if the lib is installed, for uninstalled libs we need to check the install_names against each other. Note that this is still broken if DYLD_IMAGE_SUFFIX is set and a different lib was loaded as a result. */ static const char * lt__header_get_instnam (const mach_header *mh) { unsigned long offset = sizeof(mach_header); const char* result = 0; int j; for (j = 0; j < mh->ncmds; j++) { struct load_command *lc; lc = (struct load_command*) (((unsigned long) mh) + offset); if (LC_ID_DYLIB == lc->cmd) { result=(char*)(((dylib_command*) lc)->dylib.name.offset + (unsigned long) lc); } offset += lc->cmdsize; } return result; } static const mach_header * lt__match_loadedlib (const char *name) { const mach_header *mh = 0; int i = _dyld_image_count(); while (i > 0) { const char *id; --i; id = lt__header_get_instnam (_dyld_get_image_header (i)); if (id && strneq (id, name)) { mh = _dyld_get_image_header (i); break; } } return mh; } /* Safe to assume our mh is good. */ static NSSymbol lt__linkedlib_symbol (const char *symname, const mach_header *mh) { NSSymbol symbol = 0; if (lt__image_symbol && NSIsSymbolNameDefined (symname)) { unsigned long offset = sizeof(mach_header); struct load_command *lc; int j; for (j = 0; j < mh->ncmds; j++) { lc = (struct load_command*) (((unsigned long) mh) + offset); if ((LC_LOAD_DYLIB == lc->cmd) || (LC_LOAD_WEAK_DYLIB == lc->cmd)) { unsigned long base = ((dylib_command *) lc)->dylib.name.offset; char *name = (char *) (base + (unsigned long) lc); const mach_header *mh1 = lt__match_loadedlib (name); if (!mh1) { /* Maybe NSAddImage can find it */ mh1 = lt__addimage (name, NSADDIMAGE_OPTION_RETURN_ONLY_IF_LOADED | NSADDIMAGE_OPTION_WITH_SEARCHING | NSADDIMAGE_OPTION_RETURN_ON_ERROR); } if (mh1) { symbol = lt__image_symbol (mh1, symname, LT__SYMLOOKUP_OPTS); if (symbol) break; } } offset += lc->cmdsize; } } return symbol; } libprelude-1.0.0/libltdl/loaders/preopen.c0000644000076400007640000002245511347714404015500 00000000000000/* loader-preopen.c -- emulate dynamic linking using preloaded_symbols Copyright (C) 1998, 1999, 2000, 2004, 2006, 2007, 2008 Free Software Foundation, Inc. Written by Thomas Tanner, 1998 NOTE: The canonical source of this file is maintained with the GNU Libtool package. Report bugs to bug-libtool@gnu.org. GNU Libltdl is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. As a special exception to the GNU Lesser General Public License, if you distribute this file as part of a program or library that is built using GNU Libtool, you may include this file under the same distribution terms that you use for the rest of that program. GNU Libltdl 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 Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with GNU Libltdl; see the file COPYING.LIB. If not, a copy can be downloaded from http://www.gnu.org/licenses/lgpl.html, or obtained by writing to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ #include "lt__private.h" #include "lt_dlloader.h" /* Use the preprocessor to rename non-static symbols to avoid namespace collisions when the loader code is statically linked into libltdl. Use the "_LTX_" prefix so that the symbol addresses can be fetched from the preloaded symbol list by lt_dlsym(): */ #define get_vtable preopen_LTX_get_vtable LT_BEGIN_C_DECLS LT_SCOPE lt_dlvtable *get_vtable (lt_user_data loader_data); LT_END_C_DECLS /* Boilerplate code to set up the vtable for hooking this loader into libltdl's loader list: */ static int vl_init (lt_user_data loader_data); static int vl_exit (lt_user_data loader_data); static lt_module vm_open (lt_user_data loader_data, const char *filename, lt_dladvise advise); static int vm_close (lt_user_data loader_data, lt_module module); static void * vm_sym (lt_user_data loader_data, lt_module module, const char *symbolname); static lt_dlvtable *vtable = 0; /* Return the vtable for this loader, only the name and sym_prefix attributes (plus the virtual function implementations, obviously) change between loaders. */ lt_dlvtable * get_vtable (lt_user_data loader_data) { if (!vtable) { vtable = (lt_dlvtable *) lt__zalloc (sizeof *vtable); } if (vtable && !vtable->name) { vtable->name = "lt_preopen"; vtable->sym_prefix = 0; vtable->module_open = vm_open; vtable->module_close = vm_close; vtable->find_sym = vm_sym; vtable->dlloader_init = vl_init; vtable->dlloader_exit = vl_exit; vtable->dlloader_data = loader_data; vtable->priority = LT_DLLOADER_PREPEND; } if (vtable && (vtable->dlloader_data != loader_data)) { LT__SETERROR (INIT_LOADER); return 0; } return vtable; } /* --- IMPLEMENTATION --- */ /* Wrapper type to chain together symbol lists of various origins. */ typedef struct symlist_chain { struct symlist_chain *next; const lt_dlsymlist *symlist; } symlist_chain; static int add_symlist (const lt_dlsymlist *symlist); static int free_symlists (void); /* The start of the symbol lists chain. */ static symlist_chain *preloaded_symlists = 0; /* A symbol list preloaded before lt_init() was called. */ static const lt_dlsymlist *default_preloaded_symbols = 0; /* A function called through the vtable to initialise this loader. */ static int vl_init (lt_user_data LT__UNUSED loader_data) { int errors = 0; preloaded_symlists = 0; if (default_preloaded_symbols) { errors = lt_dlpreload (default_preloaded_symbols); } return errors; } /* A function called through the vtable when this loader is no longer needed by the application. */ static int vl_exit (lt_user_data LT__UNUSED loader_data) { vtable = NULL; free_symlists (); return 0; } /* A function called through the vtable to open a module with this loader. Returns an opaque representation of the newly opened module for processing with this loader's other vtable functions. */ static lt_module vm_open (lt_user_data LT__UNUSED loader_data, const char *filename, lt_dladvise LT__UNUSED advise) { symlist_chain *lists; lt_module module = 0; if (!preloaded_symlists) { LT__SETERROR (NO_SYMBOLS); goto done; } /* Can't use NULL as the reflective symbol header, as NULL is used to mark the end of the entire symbol list. Self-dlpreopened symbols follow this magic number, chosen to be an unlikely clash with a real module name. */ if (!filename) { filename = "@PROGRAM@"; } for (lists = preloaded_symlists; lists; lists = lists->next) { const lt_dlsymlist *symbol; for (symbol= lists->symlist; symbol->name; ++symbol) { if (!symbol->address && streq (symbol->name, filename)) { /* If the next symbol's name and address is 0, it means the module just contains the originator and no symbols. In this case we pretend that we never saw the module and hope that some other loader will be able to load the module and have access to its symbols */ const lt_dlsymlist *next_symbol = symbol +1; if (next_symbol->address && next_symbol->name) { module = (lt_module) lists->symlist; goto done; } } } } LT__SETERROR (FILE_NOT_FOUND); done: return module; } /* A function called through the vtable when a particular module should be unloaded. */ static int vm_close (lt_user_data LT__UNUSED loader_data, lt_module LT__UNUSED module) { /* Just to silence gcc -Wall */ module = 0; return 0; } /* A function called through the vtable to get the address of a symbol loaded from a particular module. */ static void * vm_sym (lt_user_data LT__UNUSED loader_data, lt_module module, const char *name) { lt_dlsymlist *symbol = (lt_dlsymlist*) module; symbol +=2; /* Skip header (originator then libname). */ while (symbol->name) { if (streq (symbol->name, name)) { return symbol->address; } ++symbol; } LT__SETERROR (SYMBOL_NOT_FOUND); return 0; } /* --- HELPER FUNCTIONS --- */ /* The symbol lists themselves are not allocated from the heap, but we can unhook them and free up the chain of links between them. */ static int free_symlists (void) { symlist_chain *lists; lists = preloaded_symlists; while (lists) { symlist_chain *next = lists->next; FREE (lists); lists = next; } preloaded_symlists = 0; return 0; } /* Add a new symbol list to the global chain. */ static int add_symlist (const lt_dlsymlist *symlist) { symlist_chain *lists; int errors = 0; /* Search for duplicate entries: */ for (lists = preloaded_symlists; lists && lists->symlist != symlist; lists = lists->next) /*NOWORK*/; /* Don't add the same list twice: */ if (!lists) { symlist_chain *tmp = (symlist_chain *) lt__zalloc (sizeof *tmp); if (tmp) { tmp->symlist = symlist; tmp->next = preloaded_symlists; preloaded_symlists = tmp; } else { ++errors; } } return errors; } /* --- PRELOADING API CALL IMPLEMENTATIONS --- */ /* Save a default symbol list for later. */ int lt_dlpreload_default (const lt_dlsymlist *preloaded) { default_preloaded_symbols = preloaded; return 0; } /* Add a symbol list to the global chain, or with a NULL argument, revert to just the default list. */ int lt_dlpreload (const lt_dlsymlist *preloaded) { int errors = 0; if (preloaded) { errors = add_symlist (preloaded); } else { free_symlists(); if (default_preloaded_symbols) { errors = lt_dlpreload (default_preloaded_symbols); } } return errors; } /* Open all the preloaded modules from the named originator, executing a callback for each one. If ORIGINATOR is NULL, then call FUNC for each preloaded module from the program itself. */ int lt_dlpreload_open (const char *originator, lt_dlpreload_callback_func *func) { symlist_chain *list; int errors = 0; int found = 0; /* For each symlist in the chain... */ for (list = preloaded_symlists; list; list = list->next) { /* ...that was preloaded by the requesting ORIGINATOR... */ if ((originator && streq (list->symlist->name, originator)) || (!originator && streq (list->symlist->name, "@PROGRAM@"))) { const lt_dlsymlist *symbol; unsigned int idx = 0; ++found; /* ...load the symbols per source compilation unit: (we preincrement the index to skip over the originator entry) */ while ((symbol = &list->symlist[++idx])->name != 0) { if ((symbol->address == 0) && (strneq (symbol->name, "@PROGRAM@"))) { lt_dlhandle handle = lt_dlopen (symbol->name); if (handle == 0) { ++errors; } else { errors += (*func) (handle); } } } } } if (!found) { LT__SETERROR(CANNOT_OPEN); ++errors; } return errors; } libprelude-1.0.0/libltdl/loaders/load_add_on.c0000644000076400007640000001130411347714403016241 00000000000000/* loader-load_add_on.c -- dynamic linking for BeOS Copyright (C) 1998, 1999, 2000, 2004, 2006, 2007, 2008 Free Software Foundation, Inc. Written by Thomas Tanner, 1998 NOTE: The canonical source of this file is maintained with the GNU Libtool package. Report bugs to bug-libtool@gnu.org. GNU Libltdl is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. As a special exception to the GNU Lesser General Public License, if you distribute this file as part of a program or library that is built using GNU Libtool, you may include this file under the same distribution terms that you use for the rest of that program. GNU Libltdl 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 Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with GNU Libltdl; see the file COPYING.LIB. If not, a copy can be downloaded from http://www.gnu.org/licenses/lgpl.html, or obtained by writing to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ #include "lt__private.h" #include "lt_dlloader.h" /* Use the preprocessor to rename non-static symbols to avoid namespace collisions when the loader code is statically linked into libltdl. Use the "_LTX_" prefix so that the symbol addresses can be fetched from the preloaded symbol list by lt_dlsym(): */ #define get_vtable load_add_on_LTX_get_vtable LT_BEGIN_C_DECLS LT_SCOPE lt_dlvtable *get_vtable (lt_user_data loader_data); LT_END_C_DECLS /* Boilerplate code to set up the vtable for hooking this loader into libltdl's loader list: */ static int vl_exit (lt_user_data loader_data); static lt_module vm_open (lt_user_data loader_data, const char *filename, lt_dladvise advise); static int vm_close (lt_user_data loader_data, lt_module module); static void * vm_sym (lt_user_data loader_data, lt_module module, const char *symbolname); static lt_dlvtable *vtable = 0; /* Return the vtable for this loader, only the name and sym_prefix attributes (plus the virtual function implementations, obviously) change between loaders. */ lt_dlvtable * get_vtable (lt_user_data loader_data) { if (!vtable) { vtable = lt__zalloc (sizeof *vtable); } if (vtable && !vtable->name) { vtable->name = "lt_load_add_on"; vtable->module_open = vm_open; vtable->module_close = vm_close; vtable->find_sym = vm_sym; vtable->dlloader_exit = vl_exit; vtable->dlloader_data = loader_data; vtable->priority = LT_DLLOADER_APPEND; } if (vtable && (vtable->dlloader_data != loader_data)) { LT__SETERROR (INIT_LOADER); return 0; } return vtable; } /* --- IMPLEMENTATION --- */ #include /* A function called through the vtable when this loader is no longer needed by the application. */ static int vl_exit (lt_user_data LT__UNUSED loader_data) { vtable = NULL; return 0; } /* A function called through the vtable to open a module with this loader. Returns an opaque representation of the newly opened module for processing with this loader's other vtable functions. */ static lt_module vm_open (lt_user_data LT__UNUSED loader_data, const char *filename, lt_dladvise LT__UNUSED advise) { image_id image = 0; if (filename) { image = load_add_on (filename); } else { image_info info; int32 cookie = 0; if (get_next_image_info (0, &cookie, &info) == B_OK) image = load_add_on (info.name); } if (image <= 0) { LT__SETERROR (CANNOT_OPEN); image = 0; } return (lt_module) image; } /* A function called through the vtable when a particular module should be unloaded. */ static int vm_close (lt_user_data LT__UNUSED loader_data, lt_module module) { int errors = 0; if (unload_add_on ((image_id) module) != B_OK) { LT__SETERROR (CANNOT_CLOSE); ++errors; } return errors; } /* A function called through the vtable to get the address of a symbol loaded from a particular module. */ static void * vm_sym (lt_user_data LT__UNUSED loader_data, lt_module module, const char *name) { void *address = 0; image_id image = (image_id) module; if (get_image_symbol (image, name, B_SYMBOL_TYPE_ANY, address) != B_OK) { LT__SETERROR (SYMBOL_NOT_FOUND); address = 0; } return address; } libprelude-1.0.0/libltdl/loaders/dlopen.c0000644000076400007640000001434111347714403015303 00000000000000/* loader-dlopen.c -- dynamic linking with dlopen/dlsym Copyright (C) 1998, 1999, 2000, 2004, 2006, 2007, 2008 Free Software Foundation, Inc. Written by Thomas Tanner, 1998 NOTE: The canonical source of this file is maintained with the GNU Libtool package. Report bugs to bug-libtool@gnu.org. GNU Libltdl is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. As a special exception to the GNU Lesser General Public License, if you distribute this file as part of a program or library that is built using GNU Libtool, you may include this file under the same distribution terms that you use for the rest of that program. GNU Libltdl 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 Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with GNU Libltdl; see the file COPYING.LIB. If not, a copy can be downloaded from http://www.gnu.org/licenses/lgpl.html, or obtained by writing to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ #include "lt__private.h" #include "lt_dlloader.h" /* Use the preprocessor to rename non-static symbols to avoid namespace collisions when the loader code is statically linked into libltdl. Use the "_LTX_" prefix so that the symbol addresses can be fetched from the preloaded symbol list by lt_dlsym(): */ #define get_vtable dlopen_LTX_get_vtable LT_BEGIN_C_DECLS LT_SCOPE lt_dlvtable *get_vtable (lt_user_data loader_data); LT_END_C_DECLS /* Boilerplate code to set up the vtable for hooking this loader into libltdl's loader list: */ static int vl_exit (lt_user_data loader_data); static lt_module vm_open (lt_user_data loader_data, const char *filename, lt_dladvise advise); static int vm_close (lt_user_data loader_data, lt_module module); static void * vm_sym (lt_user_data loader_data, lt_module module, const char *symbolname); static lt_dlvtable *vtable = 0; /* Return the vtable for this loader, only the name and sym_prefix attributes (plus the virtual function implementations, obviously) change between loaders. */ lt_dlvtable * get_vtable (lt_user_data loader_data) { if (!vtable) { vtable = (lt_dlvtable *) lt__zalloc (sizeof *vtable); } if (vtable && !vtable->name) { vtable->name = "lt_dlopen"; #if defined(DLSYM_USCORE) vtable->sym_prefix = "_"; #endif vtable->module_open = vm_open; vtable->module_close = vm_close; vtable->find_sym = vm_sym; vtable->dlloader_exit = vl_exit; vtable->dlloader_data = loader_data; vtable->priority = LT_DLLOADER_PREPEND; } if (vtable && (vtable->dlloader_data != loader_data)) { LT__SETERROR (INIT_LOADER); return 0; } return vtable; } /* --- IMPLEMENTATION --- */ #if defined(HAVE_DLFCN_H) # include #endif #if defined(HAVE_SYS_DL_H) # include #endif /* We may have to define LT_LAZY_OR_NOW in the command line if we find out it does not work in some platform. */ #if !defined(LT_LAZY_OR_NOW) # if defined(RTLD_LAZY) # define LT_LAZY_OR_NOW RTLD_LAZY # else # if defined(DL_LAZY) # define LT_LAZY_OR_NOW DL_LAZY # endif # endif /* !RTLD_LAZY */ #endif #if !defined(LT_LAZY_OR_NOW) # if defined(RTLD_NOW) # define LT_LAZY_OR_NOW RTLD_NOW # else # if defined(DL_NOW) # define LT_LAZY_OR_NOW DL_NOW # endif # endif /* !RTLD_NOW */ #endif #if !defined(LT_LAZY_OR_NOW) # define LT_LAZY_OR_NOW 0 #endif /* !LT_LAZY_OR_NOW */ /* We only support local and global symbols from modules for loaders that provide such a thing, otherwise the system default is used. */ #if !defined(RTLD_GLOBAL) # if defined(DL_GLOBAL) # define RTLD_GLOBAL DL_GLOBAL # endif #endif /* !RTLD_GLOBAL */ #if !defined(RTLD_LOCAL) # if defined(DL_LOCAL) # define RTLD_LOCAL DL_LOCAL # endif #endif /* !RTLD_LOCAL */ #if defined(HAVE_DLERROR) # define DLERROR(arg) dlerror () #else # define DLERROR(arg) LT__STRERROR (arg) #endif #define DL__SETERROR(errorcode) \ LT__SETERRORSTR (DLERROR (errorcode)) /* A function called through the vtable when this loader is no longer needed by the application. */ static int vl_exit (lt_user_data LT__UNUSED loader_data) { vtable = NULL; return 0; } /* A function called through the vtable to open a module with this loader. Returns an opaque representation of the newly opened module for processing with this loader's other vtable functions. */ static lt_module vm_open (lt_user_data LT__UNUSED loader_data, const char *filename, lt_dladvise advise) { int module_flags = LT_LAZY_OR_NOW; lt_module module; if (advise) { #ifdef RTLD_GLOBAL /* If there is some means of asking for global symbol resolution, do so. */ if (advise->is_symglobal) module_flags |= RTLD_GLOBAL; #else /* Otherwise, reset that bit so the caller can tell it wasn't acted on. */ advise->is_symglobal = 0; #endif /* And similarly for local only symbol resolution. */ #ifdef RTLD_LOCAL if (advise->is_symlocal) module_flags |= RTLD_LOCAL; #else advise->is_symlocal = 0; #endif } module = dlopen (filename, module_flags); if (!module) { DL__SETERROR (CANNOT_OPEN); } return module; } /* A function called through the vtable when a particular module should be unloaded. */ static int vm_close (lt_user_data LT__UNUSED loader_data, lt_module module) { int errors = 0; if (dlclose (module) != 0) { DL__SETERROR (CANNOT_CLOSE); ++errors; } return errors; } /* A function called through the vtable to get the address of a symbol loaded from a particular module. */ static void * vm_sym (lt_user_data LT__UNUSED loader_data, lt_module module, const char *name) { void *address = dlsym (module, name); if (!address) { DL__SETERROR (SYMBOL_NOT_FOUND); } return address; } libprelude-1.0.0/libltdl/loaders/shl_load.c0000644000076400007640000001507611347714403015615 00000000000000/* loader-shl_load.c -- dynamic linking with shl_load (HP-UX) Copyright (C) 1998, 1999, 2000, 2004, 2006, 2007, 2008 Free Software Foundation, Inc. Written by Thomas Tanner, 1998 NOTE: The canonical source of this file is maintained with the GNU Libtool package. Report bugs to bug-libtool@gnu.org. GNU Libltdl is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. As a special exception to the GNU Lesser General Public License, if you distribute this file as part of a program or library that is built using GNU Libtool, you may include this file under the same distribution terms that you use for the rest of that program. GNU Libltdl 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 Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with GNU Libltdl; see the file COPYING.LIB. If not, a copy can be downloaded from http://www.gnu.org/licenses/lgpl.html, or obtained by writing to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ #include "lt__private.h" #include "lt_dlloader.h" /* Use the preprocessor to rename non-static symbols to avoid namespace collisions when the loader code is statically linked into libltdl. Use the "_LTX_" prefix so that the symbol addresses can be fetched from the preloaded symbol list by lt_dlsym(): */ #define get_vtable shl_load_LTX_get_vtable LT_BEGIN_C_DECLS LT_SCOPE lt_dlvtable *get_vtable (lt_user_data loader_data); LT_END_C_DECLS /* Boilerplate code to set up the vtable for hooking this loader into libltdl's loader list: */ static int vl_exit (lt_user_data loader_data); static lt_module vm_open (lt_user_data loader_data, const char *filename, lt_dladvise advise); static int vm_close (lt_user_data loader_data, lt_module module); static void * vm_sym (lt_user_data loader_data, lt_module module, const char *symbolname); static lt_dlvtable *vtable = 0; /* Return the vtable for this loader, only the name and sym_prefix attributes (plus the virtual function implementations, obviously) change between loaders. */ lt_dlvtable * get_vtable (lt_user_data loader_data) { if (!vtable) { vtable = lt__zalloc (sizeof *vtable); } if (vtable && !vtable->name) { vtable->name = "lt_shl_load"; vtable->module_open = vm_open; vtable->module_close = vm_close; vtable->find_sym = vm_sym; vtable->dlloader_exit = vl_exit; vtable->dlloader_data = loader_data; vtable->priority = LT_DLLOADER_APPEND; } if (vtable && (vtable->dlloader_data != loader_data)) { LT__SETERROR (INIT_LOADER); return 0; } return vtable; } /* --- IMPLEMENTATION --- */ #if defined(HAVE_DL_H) # include #endif /* some flags are missing on some systems, so we provide * harmless defaults. * * Mandatory: * BIND_IMMEDIATE - Resolve symbol references when the library is loaded. * BIND_DEFERRED - Delay code symbol resolution until actual reference. * * Optionally: * BIND_FIRST - Place the library at the head of the symbol search * order. * BIND_NONFATAL - The default BIND_IMMEDIATE behavior is to treat all * unsatisfied symbols as fatal. This flag allows * binding of unsatisfied code symbols to be deferred * until use. * [Perl: For certain libraries, like DCE, deferred * binding often causes run time problems. Adding * BIND_NONFATAL to BIND_IMMEDIATE still allows * unresolved references in situations like this.] * BIND_NOSTART - Do not call the initializer for the shared library * when the library is loaded, nor on a future call to * shl_unload(). * BIND_VERBOSE - Print verbose messages concerning possible * unsatisfied symbols. * * hp9000s700/hp9000s800: * BIND_RESTRICTED - Restrict symbols visible by the library to those * present at library load time. * DYNAMIC_PATH - Allow the loader to dynamically search for the * library specified by the path argument. */ #if !defined(DYNAMIC_PATH) # define DYNAMIC_PATH 0 #endif #if !defined(BIND_RESTRICTED) # define BIND_RESTRICTED 0 #endif #define LT_BIND_FLAGS (BIND_IMMEDIATE | BIND_NONFATAL | DYNAMIC_PATH) /* A function called through the vtable when this loader is no longer needed by the application. */ static int vl_exit (lt_user_data LT__UNUSED loader_data) { vtable = NULL; return 0; } /* A function called through the vtable to open a module with this loader. Returns an opaque representation of the newly opened module for processing with this loader's other vtable functions. */ static lt_module vm_open (lt_user_data LT__UNUSED loader_data, const char *filename, lt_dladvise LT__UNUSED advise) { static shl_t self = (shl_t) 0; lt_module module = shl_load (filename, LT_BIND_FLAGS, 0L); /* Since searching for a symbol against a NULL module handle will also look in everything else that was already loaded and exported with the -E compiler flag, we always cache a handle saved before any modules are loaded. */ if (!self) { void *address; shl_findsym (&self, "main", TYPE_UNDEFINED, &address); } if (!filename) { module = self; } else { module = shl_load (filename, LT_BIND_FLAGS, 0L); if (!module) { LT__SETERROR (CANNOT_OPEN); } } return module; } /* A function called through the vtable when a particular module should be unloaded. */ static int vm_close (lt_user_data LT__UNUSED loader_data, lt_module module) { int errors = 0; if (module && (shl_unload ((shl_t) (module)) != 0)) { LT__SETERROR (CANNOT_CLOSE); ++errors; } return errors; } /* A function called through the vtable to get the address of a symbol loaded from a particular module. */ static void * vm_sym (lt_user_data LT__UNUSED loader_data, lt_module module, const char *name) { void *address = 0; /* sys_shl_open should never return a NULL module handle */ if (module == (lt_module) 0) { LT__SETERROR (INVALID_HANDLE); } else if (!shl_findsym((shl_t*) &module, name, TYPE_UNDEFINED, &address)) { if (!address) { LT__SETERROR (SYMBOL_NOT_FOUND); } } return address; } libprelude-1.0.0/libltdl/loaders/dld_link.c0000644000076400007640000001074111347714403015602 00000000000000/* loader-dld_link.c -- dynamic linking with dld Copyright (C) 1998, 1999, 2000, 2004, 2006, 2007, 2008 Free Software Foundation, Inc. Written by Thomas Tanner, 1998 NOTE: The canonical source of this file is maintained with the GNU Libtool package. Report bugs to bug-libtool@gnu.org. GNU Libltdl is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. As a special exception to the GNU Lesser General Public License, if you distribute this file as part of a program or library that is built using GNU Libtool, you may include this file under the same distribution terms that you use for the rest of that program. GNU Libltdl 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 Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with GNU Libltdl; see the file COPYING.LIB. If not, a copy can be downloaded from http://www.gnu.org/licenses/lgpl.html, or obtained by writing to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ #include "lt__private.h" #include "lt_dlloader.h" /* Use the preprocessor to rename non-static symbols to avoid namespace collisions when the loader code is statically linked into libltdl. Use the "_LTX_" prefix so that the symbol addresses can be fetched from the preloaded symbol list by lt_dlsym(): */ #define get_vtable dld_link_LTX_get_vtable LT_BEGIN_C_DECLS LT_SCOPE lt_dlvtable *get_vtable (lt_user_data loader_data); LT_END_C_DECLS /* Boilerplate code to set up the vtable for hooking this loader into libltdl's loader list: */ static int vl_exit (lt_user_data loader_data); static lt_module vm_open (lt_user_data loader_data, const char *filename, lt_dladvise advise); static int vm_close (lt_user_data loader_data, lt_module module); static void * vm_sym (lt_user_data loader_data, lt_module module, const char *symbolname); static lt_dlvtable *vtable = 0; /* Return the vtable for this loader, only the name and sym_prefix attributes (plus the virtual function implementations, obviously) change between loaders. */ lt_dlvtable * get_vtable (lt_user_data loader_data) { if (!vtable) { vtable = lt__zalloc (sizeof *vtable); } if (vtable && !vtable->name) { vtable->name = "lt_dld_link"; vtable->module_open = vm_open; vtable->module_close = vm_close; vtable->find_sym = vm_sym; vtable->dlloader_exit = vl_exit; vtable->dlloader_data = loader_data; vtable->priority = LT_DLLOADER_APPEND; } if (vtable && (vtable->dlloader_data != loader_data)) { LT__SETERROR (INIT_LOADER); return 0; } return vtable; } /* --- IMPLEMENTATION --- */ #if defined(HAVE_DLD_H) # include #endif /* A function called through the vtable when this loader is no longer needed by the application. */ static int vl_exit (lt_user_data LT__UNUSED loader_data) { vtable = NULL; return 0; } /* A function called through the vtable to open a module with this loader. Returns an opaque representation of the newly opened module for processing with this loader's other vtable functions. */ static lt_module vm_open (lt_user_data LT__UNUSED loader_data, const char *filename, lt_dladvise LT__UNUSED advise) { lt_module module = lt__strdup (filename); if (dld_link (filename) != 0) { LT__SETERROR (CANNOT_OPEN); FREE (module); } return module; } /* A function called through the vtable when a particular module should be unloaded. */ static int vm_close (lt_user_data LT__UNUSED loader_data, lt_module module) { int errors = 0; if (dld_unlink_by_file ((char*)(module), 1) != 0) { LT__SETERROR (CANNOT_CLOSE); ++errors; } else { FREE (module); } return errors; } /* A function called through the vtable to get the address of a symbol loaded from a particular module. */ static void * vm_sym (lt_user_data LT__UNUSED loader_data, lt_module LT__UNUSED module, const char *name) { void *address = dld_get_func (name); if (!address) { LT__SETERROR (SYMBOL_NOT_FOUND); } return address; } libprelude-1.0.0/libltdl/argz.c0000644000076400007640000001341711347714403013337 00000000000000/* argz.c -- argz implementation for non-glibc systems Copyright (C) 2004, 2006, 2007, 2008 Free Software Foundation, Inc. Written by Gary V. Vaughan, 2004 NOTE: The canonical source of this file is maintained with the GNU Libtool package. Report bugs to bug-libtool@gnu.org. GNU Libltdl is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. As a special exception to the GNU Lesser General Public License, if you distribute this file as part of a program or library that is built using GNU Libtool, you may include this file under the same distribution terms that you use for the rest of that program. GNU Libltdl 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 Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with GNU Libltdl; see the file COPYING.LIB. If not, a copy can be downloaded from http://www.gnu.org/licenses/lgpl.html, or obtained by writing to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ #if defined(LTDL) && defined LT_CONFIG_H # include LT_CONFIG_H #else # include #endif #include #include #include #include #include #include #include #define EOS_CHAR '\0' error_t argz_append (char **pargz, size_t *pargz_len, const char *buf, size_t buf_len) { size_t argz_len; char *argz; assert (pargz); assert (pargz_len); assert ((*pargz && *pargz_len) || (!*pargz && !*pargz_len)); /* If nothing needs to be appended, no more work is required. */ if (buf_len == 0) return 0; /* Ensure there is enough room to append BUF_LEN. */ argz_len = *pargz_len + buf_len; argz = (char *) realloc (*pargz, argz_len); if (!argz) return ENOMEM; /* Copy characters from BUF after terminating '\0' in ARGZ. */ memcpy (argz + *pargz_len, buf, buf_len); /* Assign new values. */ *pargz = argz; *pargz_len = argz_len; return 0; } error_t argz_create_sep (const char *str, int delim, char **pargz, size_t *pargz_len) { size_t argz_len; char *argz = 0; assert (str); assert (pargz); assert (pargz_len); /* Make a copy of STR, but replacing each occurrence of DELIM with '\0'. */ argz_len = 1+ strlen (str); if (argz_len) { const char *p; char *q; argz = (char *) malloc (argz_len); if (!argz) return ENOMEM; for (p = str, q = argz; *p != EOS_CHAR; ++p) { if (*p == delim) { /* Ignore leading delimiters, and fold consecutive delimiters in STR into a single '\0' in ARGZ. */ if ((q > argz) && (q[-1] != EOS_CHAR)) *q++ = EOS_CHAR; else --argz_len; } else *q++ = *p; } /* Copy terminating EOS_CHAR. */ *q = *p; } /* If ARGZ_LEN has shrunk to nothing, release ARGZ's memory. */ if (!argz_len) argz = (free (argz), (char *) 0); /* Assign new values. */ *pargz = argz; *pargz_len = argz_len; return 0; } error_t argz_insert (char **pargz, size_t *pargz_len, char *before, const char *entry) { assert (pargz); assert (pargz_len); assert (entry && *entry); /* No BEFORE address indicates ENTRY should be inserted after the current last element. */ if (!before) return argz_append (pargz, pargz_len, entry, 1+ strlen (entry)); /* This probably indicates a programmer error, but to preserve semantics, scan back to the start of an entry if BEFORE points into the middle of it. */ while ((before > *pargz) && (before[-1] != EOS_CHAR)) --before; { size_t entry_len = 1+ strlen (entry); size_t argz_len = *pargz_len + entry_len; size_t offset = before - *pargz; char *argz = (char *) realloc (*pargz, argz_len); if (!argz) return ENOMEM; /* Make BEFORE point to the equivalent offset in ARGZ that it used to have in *PARGZ incase realloc() moved the block. */ before = argz + offset; /* Move the ARGZ entries starting at BEFORE up into the new space at the end -- making room to copy ENTRY into the resulting gap. */ memmove (before + entry_len, before, *pargz_len - offset); memcpy (before, entry, entry_len); /* Assign new values. */ *pargz = argz; *pargz_len = argz_len; } return 0; } char * argz_next (char *argz, size_t argz_len, const char *entry) { assert ((argz && argz_len) || (!argz && !argz_len)); if (entry) { /* Either ARGZ/ARGZ_LEN is empty, or ENTRY points into an address within the ARGZ vector. */ assert ((!argz && !argz_len) || ((argz <= entry) && (entry < (argz + argz_len)))); /* Move to the char immediately after the terminating '\0' of ENTRY. */ entry = 1+ strchr (entry, EOS_CHAR); /* Return either the new ENTRY, or else NULL if ARGZ is exhausted. */ return (entry >= argz + argz_len) ? 0 : (char *) entry; } else { /* This should probably be flagged as a programmer error, since starting an argz_next loop with the iterator set to ARGZ is safer. To preserve semantics, handle the NULL case by returning the start of ARGZ (if any). */ if (argz_len > 0) return argz; else return 0; } } void argz_stringify (char *argz, size_t argz_len, int sep) { assert ((argz && argz_len) || (!argz && !argz_len)); if (sep) { --argz_len; /* don't stringify the terminating EOS */ while (--argz_len > 0) { if (argz[argz_len] == EOS_CHAR) argz[argz_len] = sep; } } } libprelude-1.0.0/libltdl/COPYING.LIB0000644000076400007640000006365611347714403013702 00000000000000 GNU LESSER GENERAL PUBLIC LICENSE Version 2.1, February 1999 Copyright (C) 1991, 1999 Free Software Foundation, Inc. 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. [This is the first released version of the Lesser GPL. It also counts as the successor of the GNU Library Public License, version 2, hence the version number 2.1.] Preamble The licenses for most software are designed to take away your freedom to share and change it. By contrast, the GNU General Public Licenses are intended to guarantee your freedom to share and change free software--to make sure the software is free for all its users. This license, the Lesser General Public License, applies to some specially designated software packages--typically libraries--of the Free Software Foundation and other authors who decide to use it. You can use it too, but we suggest you first think carefully about whether this license or the ordinary General Public License is the better strategy to use in any particular case, based on the explanations below. When we speak of free software, we are referring to freedom of use, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for this service if you wish); that you receive source code or can get it if you want it; that you can change the software and use pieces of it in new free programs; and that you are informed that you can do these things. To protect your rights, we need to make restrictions that forbid distributors to deny you these rights or to ask you to surrender these rights. These restrictions translate to certain responsibilities for you if you distribute copies of the library or if you modify it. For example, if you distribute copies of the library, whether gratis or for a fee, you must give the recipients all the rights that we gave you. You must make sure that they, too, receive or can get the source code. If you link other code with the library, you must provide complete object files to the recipients, so that they can relink them with the library after making changes to the library and recompiling it. And you must show them these terms so they know their rights. We protect your rights with a two-step method: (1) we copyright the library, and (2) we offer you this license, which gives you legal permission to copy, distribute and/or modify the library. To protect each distributor, we want to make it very clear that there is no warranty for the free library. Also, if the library is modified by someone else and passed on, the recipients should know that what they have is not the original version, so that the original author's reputation will not be affected by problems that might be introduced by others. ^L Finally, software patents pose a constant threat to the existence of any free program. We wish to make sure that a company cannot effectively restrict the users of a free program by obtaining a restrictive license from a patent holder. Therefore, we insist that any patent license obtained for a version of the library must be consistent with the full freedom of use specified in this license. Most GNU software, including some libraries, is covered by the ordinary GNU General Public License. This license, the GNU Lesser General Public License, applies to certain designated libraries, and is quite different from the ordinary General Public License. We use this license for certain libraries in order to permit linking those libraries into non-free programs. When a program is linked with a library, whether statically or using a shared library, the combination of the two is legally speaking a combined work, a derivative of the original library. The ordinary General Public License therefore permits such linking only if the entire combination fits its criteria of freedom. The Lesser General Public License permits more lax criteria for linking other code with the library. We call this license the "Lesser" General Public License because it does Less to protect the user's freedom than the ordinary General Public License. It also provides other free software developers Less of an advantage over competing non-free programs. These disadvantages are the reason we use the ordinary General Public License for many libraries. However, the Lesser license provides advantages in certain special circumstances. For example, on rare occasions, there may be a special need to encourage the widest possible use of a certain library, so that it becomes a de-facto standard. To achieve this, non-free programs must be allowed to use the library. A more frequent case is that a free library does the same job as widely used non-free libraries. In this case, there is little to gain by limiting the free library to free software only, so we use the Lesser General Public License. In other cases, permission to use a particular library in non-free programs enables a greater number of people to use a large body of free software. For example, permission to use the GNU C Library in non-free programs enables many more people to use the whole GNU operating system, as well as its variant, the GNU/Linux operating system. Although the Lesser General Public License is Less protective of the users' freedom, it does ensure that the user of a program that is linked with the Library has the freedom and the wherewithal to run that program using a modified version of the Library. The precise terms and conditions for copying, distribution and modification follow. Pay close attention to the difference between a "work based on the library" and a "work that uses the library". The former contains code derived from the library, whereas the latter must be combined with the library in order to run. ^L GNU LESSER GENERAL PUBLIC LICENSE TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION 0. This License Agreement applies to any software library or other program which contains a notice placed by the copyright holder or other authorized party saying it may be distributed under the terms of this Lesser General Public License (also called "this License"). Each licensee is addressed as "you". A "library" means a collection of software functions and/or data prepared so as to be conveniently linked with application programs (which use some of those functions and data) to form executables. The "Library", below, refers to any such software library or work which has been distributed under these terms. A "work based on the Library" means either the Library or any derivative work under copyright law: that is to say, a work containing the Library or a portion of it, either verbatim or with modifications and/or translated straightforwardly into another language. (Hereinafter, translation is included without limitation in the term "modification".) "Source code" for a work means the preferred form of the work for making modifications to it. For a library, complete source code means all the source code for all modules it contains, plus any associated interface definition files, plus the scripts used to control compilation and installation of the library. Activities other than copying, distribution and modification are not covered by this License; they are outside its scope. The act of running a program using the Library is not restricted, and output from such a program is covered only if its contents constitute a work based on the Library (independent of the use of the Library in a tool for writing it). Whether that is true depends on what the Library does and what the program that uses the Library does. 1. You may copy and distribute verbatim copies of the Library's complete source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice and disclaimer of warranty; keep intact all the notices that refer to this License and to the absence of any warranty; and distribute a copy of this License along with the Library. You may charge a fee for the physical act of transferring a copy, and you may at your option offer warranty protection in exchange for a fee. 2. You may modify your copy or copies of the Library or any portion of it, thus forming a work based on the Library, and copy and distribute such modifications or work under the terms of Section 1 above, provided that you also meet all of these conditions: a) The modified work must itself be a software library. b) You must cause the files modified to carry prominent notices stating that you changed the files and the date of any change. c) You must cause the whole of the work to be licensed at no charge to all third parties under the terms of this License. d) If a facility in the modified Library refers to a function or a table of data to be supplied by an application program that uses the facility, other than as an argument passed when the facility is invoked, then you must make a good faith effort to ensure that, in the event an application does not supply such function or table, the facility still operates, and performs whatever part of its purpose remains meaningful. (For example, a function in a library to compute square roots has a purpose that is entirely well-defined independent of the application. Therefore, Subsection 2d requires that any application-supplied function or table used by this function must be optional: if the application does not supply it, the square root function must still compute square roots.) These requirements apply to the modified work as a whole. If identifiable sections of that work are not derived from the Library, and can be reasonably considered independent and separate works in themselves, then this License, and its terms, do not apply to those sections when you distribute them as separate works. But when you distribute the same sections as part of a whole which is a work based on the Library, the distribution of the whole must be on the terms of this License, whose permissions for other licensees extend to the entire whole, and thus to each and every part regardless of who wrote it. Thus, it is not the intent of this section to claim rights or contest your rights to work written entirely by you; rather, the intent is to exercise the right to control the distribution of derivative or collective works based on the Library. In addition, mere aggregation of another work not based on the Library with the Library (or with a work based on the Library) on a volume of a storage or distribution medium does not bring the other work under the scope of this License. 3. You may opt to apply the terms of the ordinary GNU General Public License instead of this License to a given copy of the Library. To do this, you must alter all the notices that refer to this License, so that they refer to the ordinary GNU General Public License, version 2, instead of to this License. (If a newer version than version 2 of the ordinary GNU General Public License has appeared, then you can specify that version instead if you wish.) Do not make any other change in these notices. ^L Once this change is made in a given copy, it is irreversible for that copy, so the ordinary GNU General Public License applies to all subsequent copies and derivative works made from that copy. This option is useful when you wish to copy part of the code of the Library into a program that is not a library. 4. You may copy and distribute the Library (or a portion or derivative of it, under Section 2) in object code or executable form under the terms of Sections 1 and 2 above provided that you accompany it with the complete corresponding machine-readable source code, which must be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange. If distribution of object code is made by offering access to copy from a designated place, then offering equivalent access to copy the source code from the same place satisfies the requirement to distribute the source code, even though third parties are not compelled to copy the source along with the object code. 5. A program that contains no derivative of any portion of the Library, but is designed to work with the Library by being compiled or linked with it, is called a "work that uses the Library". Such a work, in isolation, is not a derivative work of the Library, and therefore falls outside the scope of this License. However, linking a "work that uses the Library" with the Library creates an executable that is a derivative of the Library (because it contains portions of the Library), rather than a "work that uses the library". The executable is therefore covered by this License. Section 6 states terms for distribution of such executables. When a "work that uses the Library" uses material from a header file that is part of the Library, the object code for the work may be a derivative work of the Library even though the source code is not. Whether this is true is especially significant if the work can be linked without the Library, or if the work is itself a library. The threshold for this to be true is not precisely defined by law. If such an object file uses only numerical parameters, data structure layouts and accessors, and small macros and small inline functions (ten lines or less in length), then the use of the object file is unrestricted, regardless of whether it is legally a derivative work. (Executables containing this object code plus portions of the Library will still fall under Section 6.) Otherwise, if the work is a derivative of the Library, you may distribute the object code for the work under the terms of Section 6. Any executables containing that work also fall under Section 6, whether or not they are linked directly with the Library itself. ^L 6. As an exception to the Sections above, you may also combine or link a "work that uses the Library" with the Library to produce a work containing portions of the Library, and distribute that work under terms of your choice, provided that the terms permit modification of the work for the customer's own use and reverse engineering for debugging such modifications. You must give prominent notice with each copy of the work that the Library is used in it and that the Library and its use are covered by this License. You must supply a copy of this License. If the work during execution displays copyright notices, you must include the copyright notice for the Library among them, as well as a reference directing the user to the copy of this License. Also, you must do one of these things: a) Accompany the work with the complete corresponding machine-readable source code for the Library including whatever changes were used in the work (which must be distributed under Sections 1 and 2 above); and, if the work is an executable linked with the Library, with the complete machine-readable "work that uses the Library", as object code and/or source code, so that the user can modify the Library and then relink to produce a modified executable containing the modified Library. (It is understood that the user who changes the contents of definitions files in the Library will not necessarily be able to recompile the application to use the modified definitions.) b) Use a suitable shared library mechanism for linking with the Library. A suitable mechanism is one that (1) uses at run time a copy of the library already present on the user's computer system, rather than copying library functions into the executable, and (2) will operate properly with a modified version of the library, if the user installs one, as long as the modified version is interface-compatible with the version that the work was made with. c) Accompany the work with a written offer, valid for at least three years, to give the same user the materials specified in Subsection 6a, above, for a charge no more than the cost of performing this distribution. d) If distribution of the work is made by offering access to copy from a designated place, offer equivalent access to copy the above specified materials from the same place. e) Verify that the user has already received a copy of these materials or that you have already sent this user a copy. For an executable, the required form of the "work that uses the Library" must include any data and utility programs needed for reproducing the executable from it. However, as a special exception, the materials to be distributed need not include anything that is normally distributed (in either source or binary form) with the major components (compiler, kernel, and so on) of the operating system on which the executable runs, unless that component itself accompanies the executable. It may happen that this requirement contradicts the license restrictions of other proprietary libraries that do not normally accompany the operating system. Such a contradiction means you cannot use both them and the Library together in an executable that you distribute. ^L 7. You may place library facilities that are a work based on the Library side-by-side in a single library together with other library facilities not covered by this License, and distribute such a combined library, provided that the separate distribution of the work based on the Library and of the other library facilities is otherwise permitted, and provided that you do these two things: a) Accompany the combined library with a copy of the same work based on the Library, uncombined with any other library facilities. This must be distributed under the terms of the Sections above. b) Give prominent notice with the combined library of the fact that part of it is a work based on the Library, and explaining where to find the accompanying uncombined form of the same work. 8. You may not copy, modify, sublicense, link with, or distribute the Library except as expressly provided under this License. Any attempt otherwise to copy, modify, sublicense, link with, or distribute the Library is void, and will automatically terminate your rights under this License. However, parties who have received copies, or rights, from you under this License will not have their licenses terminated so long as such parties remain in full compliance. 9. You are not required to accept this License, since you have not signed it. However, nothing else grants you permission to modify or distribute the Library or its derivative works. These actions are prohibited by law if you do not accept this License. Therefore, by modifying or distributing the Library (or any work based on the Library), you indicate your acceptance of this License to do so, and all its terms and conditions for copying, distributing or modifying the Library or works based on it. 10. Each time you redistribute the Library (or any work based on the Library), the recipient automatically receives a license from the original licensor to copy, distribute, link with or modify the Library subject to these terms and conditions. You may not impose any further restrictions on the recipients' exercise of the rights granted herein. You are not responsible for enforcing compliance by third parties with this License. ^L 11. If, as a consequence of a court judgment or allegation of patent infringement or for any other reason (not limited to patent issues), conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot distribute so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not distribute the Library at all. For example, if a patent license would not permit royalty-free redistribution of the Library by all those who receive copies directly or indirectly through you, then the only way you could satisfy both it and this License would be to refrain entirely from distribution of the Library. If any portion of this section is held invalid or unenforceable under any particular circumstance, the balance of the section is intended to apply, and the section as a whole is intended to apply in other circumstances. It is not the purpose of this section to induce you to infringe any patents or other property right claims or to contest validity of any such claims; this section has the sole purpose of protecting the integrity of the free software distribution system which is implemented by public license practices. Many people have made generous contributions to the wide range of software distributed through that system in reliance on consistent application of that system; it is up to the author/donor to decide if he or she is willing to distribute software through any other system and a licensee cannot impose that choice. This section is intended to make thoroughly clear what is believed to be a consequence of the rest of this License. 12. If the distribution and/or use of the Library is restricted in certain countries either by patents or by copyrighted interfaces, the original copyright holder who places the Library under this License may add an explicit geographical distribution limitation excluding those countries, so that distribution is permitted only in or among countries not thus excluded. In such case, this License incorporates the limitation as if written in the body of this License. 13. The Free Software Foundation may publish revised and/or new versions of the Lesser General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. Each version is given a distinguishing version number. If the Library specifies a version number of this License which applies to it and "any later version", you have the option of following the terms and conditions either of that version or of any later version published by the Free Software Foundation. If the Library does not specify a license version number, you may choose any version ever published by the Free Software Foundation. ^L 14. If you wish to incorporate parts of the Library into other free programs whose distribution conditions are incompatible with these, write to the author to ask for permission. For software which is copyrighted by the Free Software Foundation, write to the Free Software Foundation; we sometimes make exceptions for this. Our decision will be guided by the two goals of preserving the free status of all derivatives of our free software and of promoting the sharing and reuse of software generally. NO WARRANTY 15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. END OF TERMS AND CONDITIONS ^L How to Apply These Terms to Your New Libraries If you develop a new library, and you want it to be of the greatest possible use to the public, we recommend making it free software that everyone can redistribute and change. You can do so by permitting redistribution under these terms (or, alternatively, under the terms of the ordinary General Public License). To apply these terms, attach the following notices to the library. It is safest to attach them to the start of each source file to most effectively convey the exclusion of warranty; and each file should have at least the "copyright" line and a pointer to where the full notice is found. Copyright (C) This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This library 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 Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA Also add information on how to contact you by electronic and paper mail. You should also get your employer (if you work as a programmer) or your school, if any, to sign a "copyright disclaimer" for the library, if necessary. Here is a sample; alter the names: Yoyodyne, Inc., hereby disclaims all copyright interest in the library `Frob' (a library for tweaking knobs) written by James Random Hacker. , 1 April 1990 Ty Coon, President of Vice That's all there is to it! libprelude-1.0.0/prelude-admin/0000775000076400007640000000000011347714754013415 500000000000000libprelude-1.0.0/prelude-admin/tls-register.h0000664000076400007640000000355011202225026016110 00000000000000/***** * * Copyright (C) 2004, 2005 PreludeIDS Technologies. All Rights Reserved. * Author: Yoann Vandoorselaere * * This file is part of the Prelude library. * * 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; see the file COPYING. If not, write to * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. * *****/ #include "tls-util.h" int tls_request_certificate(prelude_client_profile_t *cp, prelude_io_t *fd, gnutls_x509_privkey key, prelude_connection_permission_t permission); int tls_handle_certificate_request(const char *srcinfo, prelude_client_profile_t *cp, prelude_io_t *fd, gnutls_x509_privkey cakey, gnutls_x509_crt cacrt, gnutls_x509_crt crt); gnutls_x509_privkey tls_load_privkey(prelude_client_profile_t *cp); int tls_load_ca_certificate(prelude_client_profile_t *cp, gnutls_x509_privkey key, gnutls_x509_crt *crt); int tls_load_ca_signed_certificate(prelude_client_profile_t *cp, gnutls_x509_privkey cakey, gnutls_x509_crt cacrt, gnutls_x509_crt *crt); int tls_revoke_analyzer(prelude_client_profile_t *cp, gnutls_x509_privkey key, gnutls_x509_crt crt, uint64_t revoked_analyzerid); libprelude-1.0.0/prelude-admin/Makefile.am0000664000076400007640000000133711202312107015345 00000000000000AM_CPPFLAGS = @PCFLAGS@ -I$(top_builddir)/src/include -I$(top_srcdir)/src/include -I$(top_builddir)/libmissing -I$(top_srcdir)/libmissing -I$(top_builddir)/src/libprelude-error @LIBPRELUDE_CFLAGS@ @LIBGNUTLS_CFLAGS@ @PRELUDE_ADMIN_CFLAGS@ bin_PROGRAMS = prelude-admin bin_SCRIPTS = prelude-adduser prelude_admin_LDADD = $(top_builddir)/src/config-engine.lo \ $(top_builddir)/src/variable.lo \ $(top_builddir)/src/libprelude.la \ @PRELUDE_ADMIN_LIBS@ \ ../libmissing/libmissing.la $(GETADDRINFO_LIB) $(HOSTENT_LIB) $(LTLIBINTL) $(LTLIBTHREAD) $(SERVENT_LIB) prelude_admin_SOURCES = \ prelude-admin.c \ server.c \ tls-register.c noinst_HEADERS = tls-register.h server.h -include $(top_srcdir)/git.mk libprelude-1.0.0/prelude-admin/Makefile.in0000664000076400007640000014674411347714456015421 00000000000000# Makefile.in generated by automake 1.11.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, # Inc. # This Makefile.in 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. @SET_MAKE@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ target_triplet = @target@ bin_PROGRAMS = prelude-admin$(EXEEXT) subdir = prelude-admin DIST_COMMON = $(noinst_HEADERS) $(srcdir)/Makefile.am \ $(srcdir)/Makefile.in $(srcdir)/prelude-adduser.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/libmissing/m4/00gnulib.m4 \ $(top_srcdir)/libmissing/m4/alloca.m4 \ $(top_srcdir)/libmissing/m4/arpa_inet_h.m4 \ $(top_srcdir)/libmissing/m4/btowc.m4 \ $(top_srcdir)/libmissing/m4/close.m4 \ $(top_srcdir)/libmissing/m4/codeset.m4 \ $(top_srcdir)/libmissing/m4/cond.m4 \ $(top_srcdir)/libmissing/m4/dos.m4 \ $(top_srcdir)/libmissing/m4/dup2.m4 \ $(top_srcdir)/libmissing/m4/errno_h.m4 \ $(top_srcdir)/libmissing/m4/exponentd.m4 \ $(top_srcdir)/libmissing/m4/exponentf.m4 \ $(top_srcdir)/libmissing/m4/exponentl.m4 \ $(top_srcdir)/libmissing/m4/extensions.m4 \ $(top_srcdir)/libmissing/m4/fclose.m4 \ $(top_srcdir)/libmissing/m4/fcntl-o.m4 \ $(top_srcdir)/libmissing/m4/fcntl_h.m4 \ $(top_srcdir)/libmissing/m4/float_h.m4 \ $(top_srcdir)/libmissing/m4/fopen.m4 \ $(top_srcdir)/libmissing/m4/fpieee.m4 \ $(top_srcdir)/libmissing/m4/frexp.m4 \ $(top_srcdir)/libmissing/m4/frexpl.m4 \ $(top_srcdir)/libmissing/m4/fseeko.m4 \ $(top_srcdir)/libmissing/m4/ftw.m4 \ $(top_srcdir)/libmissing/m4/getaddrinfo.m4 \ $(top_srcdir)/libmissing/m4/getdelim.m4 \ $(top_srcdir)/libmissing/m4/gethostname.m4 \ $(top_srcdir)/libmissing/m4/getline.m4 \ $(top_srcdir)/libmissing/m4/getpagesize.m4 \ $(top_srcdir)/libmissing/m4/getpass.m4 \ $(top_srcdir)/libmissing/m4/gettimeofday.m4 \ $(top_srcdir)/libmissing/m4/glibc21.m4 \ $(top_srcdir)/libmissing/m4/gnulib-common.m4 \ $(top_srcdir)/libmissing/m4/gnulib-comp.m4 \ $(top_srcdir)/libmissing/m4/gnulib-tool.m4 \ $(top_srcdir)/libmissing/m4/hostent.m4 \ $(top_srcdir)/libmissing/m4/include_next.m4 \ $(top_srcdir)/libmissing/m4/inet_ntop.m4 \ $(top_srcdir)/libmissing/m4/inet_pton.m4 \ $(top_srcdir)/libmissing/m4/intmax_t.m4 \ $(top_srcdir)/libmissing/m4/inttypes_h.m4 \ $(top_srcdir)/libmissing/m4/isnand.m4 \ $(top_srcdir)/libmissing/m4/isnanf.m4 \ $(top_srcdir)/libmissing/m4/isnanl.m4 \ $(top_srcdir)/libmissing/m4/langinfo_h.m4 \ $(top_srcdir)/libmissing/m4/ldexpl.m4 \ $(top_srcdir)/libmissing/m4/lib-ld.m4 \ $(top_srcdir)/libmissing/m4/lib-link.m4 \ $(top_srcdir)/libmissing/m4/lib-prefix.m4 \ $(top_srcdir)/libmissing/m4/localcharset.m4 \ $(top_srcdir)/libmissing/m4/locale-fr.m4 \ $(top_srcdir)/libmissing/m4/locale-ja.m4 \ $(top_srcdir)/libmissing/m4/locale-tr.m4 \ $(top_srcdir)/libmissing/m4/locale-zh.m4 \ $(top_srcdir)/libmissing/m4/lock.m4 \ $(top_srcdir)/libmissing/m4/longlong.m4 \ $(top_srcdir)/libmissing/m4/lseek.m4 \ $(top_srcdir)/libmissing/m4/lstat.m4 \ $(top_srcdir)/libmissing/m4/malloc.m4 \ $(top_srcdir)/libmissing/m4/math_h.m4 \ $(top_srcdir)/libmissing/m4/mbrtowc.m4 \ $(top_srcdir)/libmissing/m4/mbsinit.m4 \ $(top_srcdir)/libmissing/m4/mbstate_t.m4 \ $(top_srcdir)/libmissing/m4/memchr.m4 \ $(top_srcdir)/libmissing/m4/memmem.m4 \ $(top_srcdir)/libmissing/m4/minmax.m4 \ $(top_srcdir)/libmissing/m4/mktime.m4 \ $(top_srcdir)/libmissing/m4/mmap-anon.m4 \ $(top_srcdir)/libmissing/m4/mode_t.m4 \ $(top_srcdir)/libmissing/m4/multiarch.m4 \ $(top_srcdir)/libmissing/m4/netdb_h.m4 \ $(top_srcdir)/libmissing/m4/netinet_in_h.m4 \ $(top_srcdir)/libmissing/m4/nl_langinfo.m4 \ $(top_srcdir)/libmissing/m4/nocrash.m4 \ $(top_srcdir)/libmissing/m4/onceonly.m4 \ $(top_srcdir)/libmissing/m4/open.m4 \ $(top_srcdir)/libmissing/m4/pathmax.m4 \ $(top_srcdir)/libmissing/m4/perror.m4 \ $(top_srcdir)/libmissing/m4/poll.m4 \ $(top_srcdir)/libmissing/m4/printf-frexp.m4 \ $(top_srcdir)/libmissing/m4/printf-frexpl.m4 \ $(top_srcdir)/libmissing/m4/printf.m4 \ $(top_srcdir)/libmissing/m4/realloc.m4 \ $(top_srcdir)/libmissing/m4/regex.m4 \ $(top_srcdir)/libmissing/m4/relocatable-lib.m4 \ $(top_srcdir)/libmissing/m4/select.m4 \ $(top_srcdir)/libmissing/m4/servent.m4 \ $(top_srcdir)/libmissing/m4/signal_h.m4 \ $(top_srcdir)/libmissing/m4/signalblocking.m4 \ $(top_srcdir)/libmissing/m4/signbit.m4 \ $(top_srcdir)/libmissing/m4/size_max.m4 \ $(top_srcdir)/libmissing/m4/sleep.m4 \ $(top_srcdir)/libmissing/m4/snprintf-posix.m4 \ $(top_srcdir)/libmissing/m4/snprintf.m4 \ $(top_srcdir)/libmissing/m4/sockets.m4 \ $(top_srcdir)/libmissing/m4/socklen.m4 \ $(top_srcdir)/libmissing/m4/sockpfaf.m4 \ $(top_srcdir)/libmissing/m4/ssize_t.m4 \ $(top_srcdir)/libmissing/m4/stat.m4 \ $(top_srcdir)/libmissing/m4/stdbool.m4 \ $(top_srcdir)/libmissing/m4/stddef_h.m4 \ $(top_srcdir)/libmissing/m4/stdint.m4 \ $(top_srcdir)/libmissing/m4/stdint_h.m4 \ $(top_srcdir)/libmissing/m4/stdio_h.m4 \ $(top_srcdir)/libmissing/m4/stdlib_h.m4 \ $(top_srcdir)/libmissing/m4/strcase.m4 \ $(top_srcdir)/libmissing/m4/strcasestr.m4 \ $(top_srcdir)/libmissing/m4/strdup.m4 \ $(top_srcdir)/libmissing/m4/strerror.m4 \ $(top_srcdir)/libmissing/m4/string_h.m4 \ $(top_srcdir)/libmissing/m4/strings_h.m4 \ $(top_srcdir)/libmissing/m4/strndup.m4 \ $(top_srcdir)/libmissing/m4/strnlen.m4 \ $(top_srcdir)/libmissing/m4/strptime.m4 \ $(top_srcdir)/libmissing/m4/strsep.m4 \ $(top_srcdir)/libmissing/m4/symlink.m4 \ $(top_srcdir)/libmissing/m4/sys_ioctl_h.m4 \ $(top_srcdir)/libmissing/m4/sys_select_h.m4 \ $(top_srcdir)/libmissing/m4/sys_socket_h.m4 \ $(top_srcdir)/libmissing/m4/sys_stat_h.m4 \ $(top_srcdir)/libmissing/m4/sys_time_h.m4 \ $(top_srcdir)/libmissing/m4/sys_utsname_h.m4 \ $(top_srcdir)/libmissing/m4/thread.m4 \ $(top_srcdir)/libmissing/m4/threadlib.m4 \ $(top_srcdir)/libmissing/m4/time_h.m4 \ $(top_srcdir)/libmissing/m4/time_r.m4 \ $(top_srcdir)/libmissing/m4/timegm.m4 \ $(top_srcdir)/libmissing/m4/tls.m4 \ $(top_srcdir)/libmissing/m4/tm_gmtoff.m4 \ $(top_srcdir)/libmissing/m4/uname.m4 \ $(top_srcdir)/libmissing/m4/ungetc.m4 \ $(top_srcdir)/libmissing/m4/unistd_h.m4 \ $(top_srcdir)/libmissing/m4/vasnprintf.m4 \ $(top_srcdir)/libmissing/m4/vsnprintf-posix.m4 \ $(top_srcdir)/libmissing/m4/vsnprintf.m4 \ $(top_srcdir)/libmissing/m4/warn-on-use.m4 \ $(top_srcdir)/libmissing/m4/wchar.m4 \ $(top_srcdir)/libmissing/m4/wchar_t.m4 \ $(top_srcdir)/libmissing/m4/wcrtomb.m4 \ $(top_srcdir)/libmissing/m4/wctob.m4 \ $(top_srcdir)/libmissing/m4/wctype.m4 \ $(top_srcdir)/libmissing/m4/wint_t.m4 \ $(top_srcdir)/libmissing/m4/write.m4 \ $(top_srcdir)/libmissing/m4/xsize.m4 \ $(top_srcdir)/libmissing/m4/yield.m4 \ $(top_srcdir)/m4/ac_compile_check_sizeof.m4 \ $(top_srcdir)/m4/am_path_ruby.m4 $(top_srcdir)/m4/argz.m4 \ $(top_srcdir)/m4/as-ac-expand.m4 \ $(top_srcdir)/m4/ax_c_check_flag.m4 \ $(top_srcdir)/m4/ax_check_aligned_access_required.m4 \ $(top_srcdir)/m4/ax_create_prelude_inttypes_h.m4 \ $(top_srcdir)/m4/ax_ld_check_flag.m4 \ $(top_srcdir)/m4/gtk-doc.m4 $(top_srcdir)/m4/libgcrypt.m4 \ $(top_srcdir)/m4/libgnutls-extra.m4 \ $(top_srcdir)/m4/libgnutls.m4 $(top_srcdir)/m4/libtool.m4 \ $(top_srcdir)/m4/ltdl.m4 $(top_srcdir)/m4/ltoptions.m4 \ $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/m4/pkg.m4 \ $(top_srcdir)/configure.in am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = prelude-adduser CONFIG_CLEAN_VPATH_FILES = am__installdirs = "$(DESTDIR)$(bindir)" "$(DESTDIR)$(bindir)" PROGRAMS = $(bin_PROGRAMS) am_prelude_admin_OBJECTS = prelude-admin.$(OBJEXT) server.$(OBJEXT) \ tls-register.$(OBJEXT) prelude_admin_OBJECTS = $(am_prelude_admin_OBJECTS) am__DEPENDENCIES_1 = prelude_admin_DEPENDENCIES = $(top_builddir)/src/config-engine.lo \ $(top_builddir)/src/variable.lo \ $(top_builddir)/src/libprelude.la ../libmissing/libmissing.la \ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \ $(am__DEPENDENCIES_1) am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; am__install_max = 40 am__nobase_strip_setup = \ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` am__nobase_strip = \ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" am__nobase_list = $(am__nobase_strip_setup); \ for p in $$list; do echo "$$p $$p"; done | \ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ if (++n[$$2] == $(am__install_max)) \ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ END { for (dir in files) print dir, files[dir] }' am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' SCRIPTS = $(bin_SCRIPTS) DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) CCLD = $(CC) LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ $(LDFLAGS) -o $@ SOURCES = $(prelude_admin_SOURCES) DIST_SOURCES = $(prelude_admin_SOURCES) HEADERS = $(noinst_HEADERS) ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ ALLOCA = @ALLOCA@ ALLOCA_H = @ALLOCA_H@ AMTAR = @AMTAR@ APPLE_UNIVERSAL_BUILD = @APPLE_UNIVERSAL_BUILD@ AR = @AR@ ARGZ_H = @ARGZ_H@ AS = @AS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ BINDINGS_CC = @BINDINGS_CC@ BINDIR = @BINDIR@ BITSIZEOF_PTRDIFF_T = @BITSIZEOF_PTRDIFF_T@ BITSIZEOF_SIG_ATOMIC_T = @BITSIZEOF_SIG_ATOMIC_T@ BITSIZEOF_SIZE_T = @BITSIZEOF_SIZE_T@ BITSIZEOF_WCHAR_T = @BITSIZEOF_WCHAR_T@ BITSIZEOF_WINT_T = @BITSIZEOF_WINT_T@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CC_FOR_BUILD = @CC_FOR_BUILD@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EMULTIHOP_HIDDEN = @EMULTIHOP_HIDDEN@ EMULTIHOP_VALUE = @EMULTIHOP_VALUE@ ENOLINK_HIDDEN = @ENOLINK_HIDDEN@ ENOLINK_VALUE = @ENOLINK_VALUE@ EOVERFLOW_HIDDEN = @EOVERFLOW_HIDDEN@ EOVERFLOW_VALUE = @EOVERFLOW_VALUE@ ERRNO_H = @ERRNO_H@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ FLOAT_H = @FLOAT_H@ GETADDRINFO_LIB = @GETADDRINFO_LIB@ GETHOSTNAME_LIB = @GETHOSTNAME_LIB@ GLIBC21 = @GLIBC21@ GNULIB_ACCEPT = @GNULIB_ACCEPT@ GNULIB_ACCEPT4 = @GNULIB_ACCEPT4@ GNULIB_ACOSL = @GNULIB_ACOSL@ GNULIB_ASINL = @GNULIB_ASINL@ GNULIB_ATANL = @GNULIB_ATANL@ GNULIB_ATOLL = @GNULIB_ATOLL@ GNULIB_BIND = @GNULIB_BIND@ GNULIB_BTOWC = @GNULIB_BTOWC@ GNULIB_CALLOC_POSIX = @GNULIB_CALLOC_POSIX@ GNULIB_CANONICALIZE_FILE_NAME = @GNULIB_CANONICALIZE_FILE_NAME@ GNULIB_CEILF = @GNULIB_CEILF@ GNULIB_CEILL = @GNULIB_CEILL@ GNULIB_CHOWN = @GNULIB_CHOWN@ GNULIB_CLOSE = @GNULIB_CLOSE@ GNULIB_CONNECT = @GNULIB_CONNECT@ GNULIB_COSL = @GNULIB_COSL@ GNULIB_DPRINTF = @GNULIB_DPRINTF@ GNULIB_DUP2 = @GNULIB_DUP2@ GNULIB_DUP3 = @GNULIB_DUP3@ GNULIB_ENVIRON = @GNULIB_ENVIRON@ GNULIB_EUIDACCESS = @GNULIB_EUIDACCESS@ GNULIB_EXPL = @GNULIB_EXPL@ GNULIB_FACCESSAT = @GNULIB_FACCESSAT@ GNULIB_FCHDIR = @GNULIB_FCHDIR@ GNULIB_FCHMODAT = @GNULIB_FCHMODAT@ GNULIB_FCHOWNAT = @GNULIB_FCHOWNAT@ GNULIB_FCLOSE = @GNULIB_FCLOSE@ GNULIB_FCNTL = @GNULIB_FCNTL@ GNULIB_FFLUSH = @GNULIB_FFLUSH@ GNULIB_FLOORF = @GNULIB_FLOORF@ GNULIB_FLOORL = @GNULIB_FLOORL@ GNULIB_FOPEN = @GNULIB_FOPEN@ GNULIB_FPRINTF = @GNULIB_FPRINTF@ GNULIB_FPRINTF_POSIX = @GNULIB_FPRINTF_POSIX@ GNULIB_FPURGE = @GNULIB_FPURGE@ GNULIB_FPUTC = @GNULIB_FPUTC@ GNULIB_FPUTS = @GNULIB_FPUTS@ GNULIB_FREOPEN = @GNULIB_FREOPEN@ GNULIB_FREXP = @GNULIB_FREXP@ GNULIB_FREXPL = @GNULIB_FREXPL@ GNULIB_FSEEK = @GNULIB_FSEEK@ GNULIB_FSEEKO = @GNULIB_FSEEKO@ GNULIB_FSTATAT = @GNULIB_FSTATAT@ GNULIB_FSYNC = @GNULIB_FSYNC@ GNULIB_FTELL = @GNULIB_FTELL@ GNULIB_FTELLO = @GNULIB_FTELLO@ GNULIB_FTRUNCATE = @GNULIB_FTRUNCATE@ GNULIB_FUTIMENS = @GNULIB_FUTIMENS@ GNULIB_FWRITE = @GNULIB_FWRITE@ GNULIB_GETADDRINFO = @GNULIB_GETADDRINFO@ GNULIB_GETCWD = @GNULIB_GETCWD@ GNULIB_GETDELIM = @GNULIB_GETDELIM@ GNULIB_GETDOMAINNAME = @GNULIB_GETDOMAINNAME@ GNULIB_GETDTABLESIZE = @GNULIB_GETDTABLESIZE@ GNULIB_GETGROUPS = @GNULIB_GETGROUPS@ GNULIB_GETHOSTNAME = @GNULIB_GETHOSTNAME@ GNULIB_GETLINE = @GNULIB_GETLINE@ GNULIB_GETLOADAVG = @GNULIB_GETLOADAVG@ GNULIB_GETLOGIN = @GNULIB_GETLOGIN@ GNULIB_GETLOGIN_R = @GNULIB_GETLOGIN_R@ GNULIB_GETPAGESIZE = @GNULIB_GETPAGESIZE@ GNULIB_GETPEERNAME = @GNULIB_GETPEERNAME@ GNULIB_GETSOCKNAME = @GNULIB_GETSOCKNAME@ GNULIB_GETSOCKOPT = @GNULIB_GETSOCKOPT@ GNULIB_GETSUBOPT = @GNULIB_GETSUBOPT@ GNULIB_GETTIMEOFDAY = @GNULIB_GETTIMEOFDAY@ GNULIB_GETUSERSHELL = @GNULIB_GETUSERSHELL@ GNULIB_INET_NTOP = @GNULIB_INET_NTOP@ GNULIB_INET_PTON = @GNULIB_INET_PTON@ GNULIB_IOCTL = @GNULIB_IOCTL@ GNULIB_ISFINITE = @GNULIB_ISFINITE@ GNULIB_ISINF = @GNULIB_ISINF@ GNULIB_ISNAN = @GNULIB_ISNAN@ GNULIB_ISNAND = @GNULIB_ISNAND@ GNULIB_ISNANF = @GNULIB_ISNANF@ GNULIB_ISNANL = @GNULIB_ISNANL@ GNULIB_LCHMOD = @GNULIB_LCHMOD@ GNULIB_LCHOWN = @GNULIB_LCHOWN@ GNULIB_LDEXPL = @GNULIB_LDEXPL@ GNULIB_LINK = @GNULIB_LINK@ GNULIB_LINKAT = @GNULIB_LINKAT@ GNULIB_LISTEN = @GNULIB_LISTEN@ GNULIB_LOGL = @GNULIB_LOGL@ GNULIB_LSEEK = @GNULIB_LSEEK@ GNULIB_LSTAT = @GNULIB_LSTAT@ GNULIB_MALLOC_POSIX = @GNULIB_MALLOC_POSIX@ GNULIB_MBRLEN = @GNULIB_MBRLEN@ GNULIB_MBRTOWC = @GNULIB_MBRTOWC@ GNULIB_MBSCASECMP = @GNULIB_MBSCASECMP@ GNULIB_MBSCASESTR = @GNULIB_MBSCASESTR@ GNULIB_MBSCHR = @GNULIB_MBSCHR@ GNULIB_MBSCSPN = @GNULIB_MBSCSPN@ GNULIB_MBSINIT = @GNULIB_MBSINIT@ GNULIB_MBSLEN = @GNULIB_MBSLEN@ GNULIB_MBSNCASECMP = @GNULIB_MBSNCASECMP@ GNULIB_MBSNLEN = @GNULIB_MBSNLEN@ GNULIB_MBSNRTOWCS = @GNULIB_MBSNRTOWCS@ GNULIB_MBSPBRK = @GNULIB_MBSPBRK@ GNULIB_MBSPCASECMP = @GNULIB_MBSPCASECMP@ GNULIB_MBSRCHR = @GNULIB_MBSRCHR@ GNULIB_MBSRTOWCS = @GNULIB_MBSRTOWCS@ GNULIB_MBSSEP = @GNULIB_MBSSEP@ GNULIB_MBSSPN = @GNULIB_MBSSPN@ GNULIB_MBSSTR = @GNULIB_MBSSTR@ GNULIB_MBSTOK_R = @GNULIB_MBSTOK_R@ GNULIB_MEMCHR = @GNULIB_MEMCHR@ GNULIB_MEMMEM = @GNULIB_MEMMEM@ GNULIB_MEMPCPY = @GNULIB_MEMPCPY@ GNULIB_MEMRCHR = @GNULIB_MEMRCHR@ GNULIB_MKDIRAT = @GNULIB_MKDIRAT@ GNULIB_MKDTEMP = @GNULIB_MKDTEMP@ GNULIB_MKFIFO = @GNULIB_MKFIFO@ GNULIB_MKFIFOAT = @GNULIB_MKFIFOAT@ GNULIB_MKNOD = @GNULIB_MKNOD@ GNULIB_MKNODAT = @GNULIB_MKNODAT@ GNULIB_MKOSTEMP = @GNULIB_MKOSTEMP@ GNULIB_MKOSTEMPS = @GNULIB_MKOSTEMPS@ GNULIB_MKSTEMP = @GNULIB_MKSTEMP@ GNULIB_MKSTEMPS = @GNULIB_MKSTEMPS@ GNULIB_NL_LANGINFO = @GNULIB_NL_LANGINFO@ GNULIB_OBSTACK_PRINTF = @GNULIB_OBSTACK_PRINTF@ GNULIB_OBSTACK_PRINTF_POSIX = @GNULIB_OBSTACK_PRINTF_POSIX@ GNULIB_OPEN = @GNULIB_OPEN@ GNULIB_OPENAT = @GNULIB_OPENAT@ GNULIB_PERROR = @GNULIB_PERROR@ GNULIB_PIPE2 = @GNULIB_PIPE2@ GNULIB_POPEN = @GNULIB_POPEN@ GNULIB_PREAD = @GNULIB_PREAD@ GNULIB_PRINTF = @GNULIB_PRINTF@ GNULIB_PRINTF_POSIX = @GNULIB_PRINTF_POSIX@ GNULIB_PUTC = @GNULIB_PUTC@ GNULIB_PUTCHAR = @GNULIB_PUTCHAR@ GNULIB_PUTENV = @GNULIB_PUTENV@ GNULIB_PUTS = @GNULIB_PUTS@ GNULIB_RANDOM_R = @GNULIB_RANDOM_R@ GNULIB_RAWMEMCHR = @GNULIB_RAWMEMCHR@ GNULIB_READLINK = @GNULIB_READLINK@ GNULIB_READLINKAT = @GNULIB_READLINKAT@ GNULIB_REALLOC_POSIX = @GNULIB_REALLOC_POSIX@ GNULIB_REALPATH = @GNULIB_REALPATH@ GNULIB_RECV = @GNULIB_RECV@ GNULIB_RECVFROM = @GNULIB_RECVFROM@ GNULIB_REMOVE = @GNULIB_REMOVE@ GNULIB_RENAME = @GNULIB_RENAME@ GNULIB_RENAMEAT = @GNULIB_RENAMEAT@ GNULIB_RMDIR = @GNULIB_RMDIR@ GNULIB_ROUND = @GNULIB_ROUND@ GNULIB_ROUNDF = @GNULIB_ROUNDF@ GNULIB_ROUNDL = @GNULIB_ROUNDL@ GNULIB_RPMATCH = @GNULIB_RPMATCH@ GNULIB_SELECT = @GNULIB_SELECT@ GNULIB_SEND = @GNULIB_SEND@ GNULIB_SENDTO = @GNULIB_SENDTO@ GNULIB_SETENV = @GNULIB_SETENV@ GNULIB_SETSOCKOPT = @GNULIB_SETSOCKOPT@ GNULIB_SHUTDOWN = @GNULIB_SHUTDOWN@ GNULIB_SIGACTION = @GNULIB_SIGACTION@ GNULIB_SIGNAL_H_SIGPIPE = @GNULIB_SIGNAL_H_SIGPIPE@ GNULIB_SIGNBIT = @GNULIB_SIGNBIT@ GNULIB_SIGPROCMASK = @GNULIB_SIGPROCMASK@ GNULIB_SINL = @GNULIB_SINL@ GNULIB_SLEEP = @GNULIB_SLEEP@ GNULIB_SNPRINTF = @GNULIB_SNPRINTF@ GNULIB_SOCKET = @GNULIB_SOCKET@ GNULIB_SPRINTF_POSIX = @GNULIB_SPRINTF_POSIX@ GNULIB_SQRTL = @GNULIB_SQRTL@ GNULIB_STAT = @GNULIB_STAT@ GNULIB_STDIO_H_SIGPIPE = @GNULIB_STDIO_H_SIGPIPE@ GNULIB_STPCPY = @GNULIB_STPCPY@ GNULIB_STPNCPY = @GNULIB_STPNCPY@ GNULIB_STRCASESTR = @GNULIB_STRCASESTR@ GNULIB_STRCHRNUL = @GNULIB_STRCHRNUL@ GNULIB_STRDUP = @GNULIB_STRDUP@ GNULIB_STRERROR = @GNULIB_STRERROR@ GNULIB_STRNDUP = @GNULIB_STRNDUP@ GNULIB_STRNLEN = @GNULIB_STRNLEN@ GNULIB_STRPBRK = @GNULIB_STRPBRK@ GNULIB_STRSEP = @GNULIB_STRSEP@ GNULIB_STRSIGNAL = @GNULIB_STRSIGNAL@ GNULIB_STRSTR = @GNULIB_STRSTR@ GNULIB_STRTOD = @GNULIB_STRTOD@ GNULIB_STRTOK_R = @GNULIB_STRTOK_R@ GNULIB_STRTOLL = @GNULIB_STRTOLL@ GNULIB_STRTOULL = @GNULIB_STRTOULL@ GNULIB_STRVERSCMP = @GNULIB_STRVERSCMP@ GNULIB_SYMLINK = @GNULIB_SYMLINK@ GNULIB_SYMLINKAT = @GNULIB_SYMLINKAT@ GNULIB_TANL = @GNULIB_TANL@ GNULIB_TRUNC = @GNULIB_TRUNC@ GNULIB_TRUNCF = @GNULIB_TRUNCF@ GNULIB_TRUNCL = @GNULIB_TRUNCL@ GNULIB_UNAME = @GNULIB_UNAME@ GNULIB_UNISTD_H_GETOPT = @GNULIB_UNISTD_H_GETOPT@ GNULIB_UNISTD_H_SIGPIPE = @GNULIB_UNISTD_H_SIGPIPE@ GNULIB_UNLINK = @GNULIB_UNLINK@ GNULIB_UNLINKAT = @GNULIB_UNLINKAT@ GNULIB_UNSETENV = @GNULIB_UNSETENV@ GNULIB_USLEEP = @GNULIB_USLEEP@ GNULIB_UTIMENSAT = @GNULIB_UTIMENSAT@ GNULIB_VASPRINTF = @GNULIB_VASPRINTF@ GNULIB_VDPRINTF = @GNULIB_VDPRINTF@ GNULIB_VFPRINTF = @GNULIB_VFPRINTF@ GNULIB_VFPRINTF_POSIX = @GNULIB_VFPRINTF_POSIX@ GNULIB_VPRINTF = @GNULIB_VPRINTF@ GNULIB_VPRINTF_POSIX = @GNULIB_VPRINTF_POSIX@ GNULIB_VSNPRINTF = @GNULIB_VSNPRINTF@ GNULIB_VSPRINTF_POSIX = @GNULIB_VSPRINTF_POSIX@ GNULIB_WCRTOMB = @GNULIB_WCRTOMB@ GNULIB_WCSNRTOMBS = @GNULIB_WCSNRTOMBS@ GNULIB_WCSRTOMBS = @GNULIB_WCSRTOMBS@ GNULIB_WCTOB = @GNULIB_WCTOB@ GNULIB_WCWIDTH = @GNULIB_WCWIDTH@ GNULIB_WRITE = @GNULIB_WRITE@ GREP = @GREP@ GTKDOC_CHECK = @GTKDOC_CHECK@ HAVE_ACCEPT4 = @HAVE_ACCEPT4@ HAVE_ACOSL = @HAVE_ACOSL@ HAVE_ARPA_INET_H = @HAVE_ARPA_INET_H@ HAVE_ASINL = @HAVE_ASINL@ HAVE_ATANL = @HAVE_ATANL@ HAVE_ATOLL = @HAVE_ATOLL@ HAVE_BTOWC = @HAVE_BTOWC@ HAVE_CALLOC_POSIX = @HAVE_CALLOC_POSIX@ HAVE_CANONICALIZE_FILE_NAME = @HAVE_CANONICALIZE_FILE_NAME@ HAVE_CHOWN = @HAVE_CHOWN@ HAVE_COSL = @HAVE_COSL@ HAVE_CXX = @HAVE_CXX@ HAVE_DECL_ACOSL = @HAVE_DECL_ACOSL@ HAVE_DECL_ASINL = @HAVE_DECL_ASINL@ HAVE_DECL_ATANL = @HAVE_DECL_ATANL@ HAVE_DECL_COSL = @HAVE_DECL_COSL@ HAVE_DECL_ENVIRON = @HAVE_DECL_ENVIRON@ HAVE_DECL_EXPL = @HAVE_DECL_EXPL@ HAVE_DECL_FPURGE = @HAVE_DECL_FPURGE@ HAVE_DECL_FREEADDRINFO = @HAVE_DECL_FREEADDRINFO@ HAVE_DECL_FREXPL = @HAVE_DECL_FREXPL@ HAVE_DECL_GAI_STRERROR = @HAVE_DECL_GAI_STRERROR@ HAVE_DECL_GETADDRINFO = @HAVE_DECL_GETADDRINFO@ HAVE_DECL_GETDELIM = @HAVE_DECL_GETDELIM@ HAVE_DECL_GETLINE = @HAVE_DECL_GETLINE@ HAVE_DECL_GETLOADAVG = @HAVE_DECL_GETLOADAVG@ HAVE_DECL_GETLOGIN_R = @HAVE_DECL_GETLOGIN_R@ HAVE_DECL_GETNAMEINFO = @HAVE_DECL_GETNAMEINFO@ HAVE_DECL_INET_NTOP = @HAVE_DECL_INET_NTOP@ HAVE_DECL_INET_PTON = @HAVE_DECL_INET_PTON@ HAVE_DECL_LDEXPL = @HAVE_DECL_LDEXPL@ HAVE_DECL_LOGL = @HAVE_DECL_LOGL@ HAVE_DECL_MEMMEM = @HAVE_DECL_MEMMEM@ HAVE_DECL_MEMRCHR = @HAVE_DECL_MEMRCHR@ HAVE_DECL_OBSTACK_PRINTF = @HAVE_DECL_OBSTACK_PRINTF@ HAVE_DECL_SINL = @HAVE_DECL_SINL@ HAVE_DECL_SNPRINTF = @HAVE_DECL_SNPRINTF@ HAVE_DECL_SQRTL = @HAVE_DECL_SQRTL@ HAVE_DECL_STRDUP = @HAVE_DECL_STRDUP@ HAVE_DECL_STRERROR = @HAVE_DECL_STRERROR@ HAVE_DECL_STRNCASECMP = @HAVE_DECL_STRNCASECMP@ HAVE_DECL_STRNDUP = @HAVE_DECL_STRNDUP@ HAVE_DECL_STRNLEN = @HAVE_DECL_STRNLEN@ HAVE_DECL_STRSIGNAL = @HAVE_DECL_STRSIGNAL@ HAVE_DECL_STRTOK_R = @HAVE_DECL_STRTOK_R@ HAVE_DECL_TANL = @HAVE_DECL_TANL@ HAVE_DECL_TRUNC = @HAVE_DECL_TRUNC@ HAVE_DECL_TRUNCF = @HAVE_DECL_TRUNCF@ HAVE_DECL_VSNPRINTF = @HAVE_DECL_VSNPRINTF@ HAVE_DECL_WCTOB = @HAVE_DECL_WCTOB@ HAVE_DECL_WCWIDTH = @HAVE_DECL_WCWIDTH@ HAVE_DPRINTF = @HAVE_DPRINTF@ HAVE_DUP2 = @HAVE_DUP2@ HAVE_DUP3 = @HAVE_DUP3@ HAVE_EUIDACCESS = @HAVE_EUIDACCESS@ HAVE_EXPL = @HAVE_EXPL@ HAVE_FACCESSAT = @HAVE_FACCESSAT@ HAVE_FCHMODAT = @HAVE_FCHMODAT@ HAVE_FCHOWNAT = @HAVE_FCHOWNAT@ HAVE_FCNTL = @HAVE_FCNTL@ HAVE_FSTATAT = @HAVE_FSTATAT@ HAVE_FSYNC = @HAVE_FSYNC@ HAVE_FTRUNCATE = @HAVE_FTRUNCATE@ HAVE_FUTIMENS = @HAVE_FUTIMENS@ HAVE_GETDOMAINNAME = @HAVE_GETDOMAINNAME@ HAVE_GETDTABLESIZE = @HAVE_GETDTABLESIZE@ HAVE_GETGROUPS = @HAVE_GETGROUPS@ HAVE_GETHOSTNAME = @HAVE_GETHOSTNAME@ HAVE_GETLOGIN = @HAVE_GETLOGIN@ HAVE_GETPAGESIZE = @HAVE_GETPAGESIZE@ HAVE_GETSUBOPT = @HAVE_GETSUBOPT@ HAVE_GETUSERSHELL = @HAVE_GETUSERSHELL@ HAVE_INTTYPES_H = @HAVE_INTTYPES_H@ HAVE_ISNAND = @HAVE_ISNAND@ HAVE_ISNANF = @HAVE_ISNANF@ HAVE_ISNANL = @HAVE_ISNANL@ HAVE_ISWCNTRL = @HAVE_ISWCNTRL@ HAVE_LANGINFO_CODESET = @HAVE_LANGINFO_CODESET@ HAVE_LANGINFO_ERA = @HAVE_LANGINFO_ERA@ HAVE_LANGINFO_H = @HAVE_LANGINFO_H@ HAVE_LCHMOD = @HAVE_LCHMOD@ HAVE_LCHOWN = @HAVE_LCHOWN@ HAVE_LINK = @HAVE_LINK@ HAVE_LINKAT = @HAVE_LINKAT@ HAVE_LOGL = @HAVE_LOGL@ HAVE_LONG_LONG_INT = @HAVE_LONG_LONG_INT@ HAVE_LSTAT = @HAVE_LSTAT@ HAVE_MALLOC_POSIX = @HAVE_MALLOC_POSIX@ HAVE_MBRLEN = @HAVE_MBRLEN@ HAVE_MBRTOWC = @HAVE_MBRTOWC@ HAVE_MBSINIT = @HAVE_MBSINIT@ HAVE_MBSLEN = @HAVE_MBSLEN@ HAVE_MBSNRTOWCS = @HAVE_MBSNRTOWCS@ HAVE_MBSRTOWCS = @HAVE_MBSRTOWCS@ HAVE_MEMPCPY = @HAVE_MEMPCPY@ HAVE_MKDIRAT = @HAVE_MKDIRAT@ HAVE_MKDTEMP = @HAVE_MKDTEMP@ HAVE_MKFIFO = @HAVE_MKFIFO@ HAVE_MKFIFOAT = @HAVE_MKFIFOAT@ HAVE_MKNOD = @HAVE_MKNOD@ HAVE_MKNODAT = @HAVE_MKNODAT@ HAVE_MKOSTEMP = @HAVE_MKOSTEMP@ HAVE_MKOSTEMPS = @HAVE_MKOSTEMPS@ HAVE_MKSTEMPS = @HAVE_MKSTEMPS@ HAVE_NETDB_H = @HAVE_NETDB_H@ HAVE_NETINET_IN_H = @HAVE_NETINET_IN_H@ HAVE_NL_LANGINFO = @HAVE_NL_LANGINFO@ HAVE_OPENAT = @HAVE_OPENAT@ HAVE_OS_H = @HAVE_OS_H@ HAVE_PIPE2 = @HAVE_PIPE2@ HAVE_POSIX_SIGNALBLOCKING = @HAVE_POSIX_SIGNALBLOCKING@ HAVE_PREAD = @HAVE_PREAD@ HAVE_RANDOM_H = @HAVE_RANDOM_H@ HAVE_RANDOM_R = @HAVE_RANDOM_R@ HAVE_RAWMEMCHR = @HAVE_RAWMEMCHR@ HAVE_READLINK = @HAVE_READLINK@ HAVE_READLINKAT = @HAVE_READLINKAT@ HAVE_REALLOC_POSIX = @HAVE_REALLOC_POSIX@ HAVE_REALPATH = @HAVE_REALPATH@ HAVE_RENAMEAT = @HAVE_RENAMEAT@ HAVE_RPMATCH = @HAVE_RPMATCH@ HAVE_SA_FAMILY_T = @HAVE_SA_FAMILY_T@ HAVE_SETENV = @HAVE_SETENV@ HAVE_SIGACTION = @HAVE_SIGACTION@ HAVE_SIGINFO_T = @HAVE_SIGINFO_T@ HAVE_SIGNED_SIG_ATOMIC_T = @HAVE_SIGNED_SIG_ATOMIC_T@ HAVE_SIGNED_WCHAR_T = @HAVE_SIGNED_WCHAR_T@ HAVE_SIGNED_WINT_T = @HAVE_SIGNED_WINT_T@ HAVE_SIGSET_T = @HAVE_SIGSET_T@ HAVE_SINL = @HAVE_SINL@ HAVE_SLEEP = @HAVE_SLEEP@ HAVE_SQRTL = @HAVE_SQRTL@ HAVE_STDINT_H = @HAVE_STDINT_H@ HAVE_STPCPY = @HAVE_STPCPY@ HAVE_STPNCPY = @HAVE_STPNCPY@ HAVE_STRCASECMP = @HAVE_STRCASECMP@ HAVE_STRCASESTR = @HAVE_STRCASESTR@ HAVE_STRCHRNUL = @HAVE_STRCHRNUL@ HAVE_STRPBRK = @HAVE_STRPBRK@ HAVE_STRSEP = @HAVE_STRSEP@ HAVE_STRTOD = @HAVE_STRTOD@ HAVE_STRTOLL = @HAVE_STRTOLL@ HAVE_STRTOULL = @HAVE_STRTOULL@ HAVE_STRUCT_ADDRINFO = @HAVE_STRUCT_ADDRINFO@ HAVE_STRUCT_RANDOM_DATA = @HAVE_STRUCT_RANDOM_DATA@ HAVE_STRUCT_SIGACTION_SA_SIGACTION = @HAVE_STRUCT_SIGACTION_SA_SIGACTION@ HAVE_STRUCT_SOCKADDR_STORAGE = @HAVE_STRUCT_SOCKADDR_STORAGE@ HAVE_STRUCT_TIMEVAL = @HAVE_STRUCT_TIMEVAL@ HAVE_STRUCT_UTSNAME = @HAVE_STRUCT_UTSNAME@ HAVE_STRVERSCMP = @HAVE_STRVERSCMP@ HAVE_SYMLINK = @HAVE_SYMLINK@ HAVE_SYMLINKAT = @HAVE_SYMLINKAT@ HAVE_SYS_BITYPES_H = @HAVE_SYS_BITYPES_H@ HAVE_SYS_INTTYPES_H = @HAVE_SYS_INTTYPES_H@ HAVE_SYS_IOCTL_H = @HAVE_SYS_IOCTL_H@ HAVE_SYS_LOADAVG_H = @HAVE_SYS_LOADAVG_H@ HAVE_SYS_PARAM_H = @HAVE_SYS_PARAM_H@ HAVE_SYS_SELECT_H = @HAVE_SYS_SELECT_H@ HAVE_SYS_SOCKET_H = @HAVE_SYS_SOCKET_H@ HAVE_SYS_TIME_H = @HAVE_SYS_TIME_H@ HAVE_SYS_TYPES_H = @HAVE_SYS_TYPES_H@ HAVE_SYS_UTSNAME_H = @HAVE_SYS_UTSNAME_H@ HAVE_TANL = @HAVE_TANL@ HAVE_TYPE_VOLATILE_SIG_ATOMIC_T = @HAVE_TYPE_VOLATILE_SIG_ATOMIC_T@ HAVE_UNAME = @HAVE_UNAME@ HAVE_UNISTD_H = @HAVE_UNISTD_H@ HAVE_UNLINKAT = @HAVE_UNLINKAT@ HAVE_UNSETENV = @HAVE_UNSETENV@ HAVE_UNSIGNED_LONG_LONG_INT = @HAVE_UNSIGNED_LONG_LONG_INT@ HAVE_USLEEP = @HAVE_USLEEP@ HAVE_UTIMENSAT = @HAVE_UTIMENSAT@ HAVE_VASPRINTF = @HAVE_VASPRINTF@ HAVE_VDPRINTF = @HAVE_VDPRINTF@ HAVE_WCHAR_H = @HAVE_WCHAR_H@ HAVE_WCHAR_T = @HAVE_WCHAR_T@ HAVE_WCRTOMB = @HAVE_WCRTOMB@ HAVE_WCSNRTOMBS = @HAVE_WCSNRTOMBS@ HAVE_WCSRTOMBS = @HAVE_WCSRTOMBS@ HAVE_WCTYPE_H = @HAVE_WCTYPE_H@ HAVE_WINSOCK2_H = @HAVE_WINSOCK2_H@ HAVE_WINT_T = @HAVE_WINT_T@ HAVE_WS2TCPIP_H = @HAVE_WS2TCPIP_H@ HAVE__BOOL = @HAVE__BOOL@ HOSTENT_LIB = @HOSTENT_LIB@ HTML_DIR = @HTML_DIR@ INCLTDL = @INCLTDL@ INCLUDE_NEXT = @INCLUDE_NEXT@ INCLUDE_NEXT_AS_FIRST_DIRECTIVE = @INCLUDE_NEXT_AS_FIRST_DIRECTIVE@ INET_NTOP_LIB = @INET_NTOP_LIB@ INET_PTON_LIB = @INET_PTON_LIB@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LD = @LD@ LDFLAGS = @LDFLAGS@ LEX = @LEX@ LEXLIB = @LEXLIB@ LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@ LIBADD_DL = @LIBADD_DL@ LIBADD_DLD_LINK = @LIBADD_DLD_LINK@ LIBADD_DLOPEN = @LIBADD_DLOPEN@ LIBADD_SHL_LOAD = @LIBADD_SHL_LOAD@ LIBDIR = @LIBDIR@ LIBGCRYPT_CFLAGS = @LIBGCRYPT_CFLAGS@ LIBGCRYPT_CONFIG = @LIBGCRYPT_CONFIG@ LIBGCRYPT_LIBS = @LIBGCRYPT_LIBS@ LIBGNUTLS_CFLAGS = @LIBGNUTLS_CFLAGS@ LIBGNUTLS_CONFIG = @LIBGNUTLS_CONFIG@ LIBGNUTLS_EXTRA_CFLAGS = @LIBGNUTLS_EXTRA_CFLAGS@ LIBGNUTLS_EXTRA_CONFIG = @LIBGNUTLS_EXTRA_CONFIG@ LIBGNUTLS_EXTRA_LIBS = @LIBGNUTLS_EXTRA_LIBS@ LIBGNUTLS_LIBS = @LIBGNUTLS_LIBS@ LIBINTL = @LIBINTL@ LIBLTDL = @LIBLTDL@ LIBMULTITHREAD = @LIBMULTITHREAD@ LIBOBJS = @LIBOBJS@ LIBPRELUDECPP_SONAME = @LIBPRELUDECPP_SONAME@ LIBPRELUDE_CFLAGS = @LIBPRELUDE_CFLAGS@ LIBPRELUDE_LIBS = @LIBPRELUDE_LIBS@ LIBPRELUDE_SONAME = @LIBPRELUDE_SONAME@ LIBPTH = @LIBPTH@ LIBPTH_PREFIX = @LIBPTH_PREFIX@ LIBS = @LIBS@ LIBSOCKET = @LIBSOCKET@ LIBTESTS_LIBDEPS = @LIBTESTS_LIBDEPS@ LIBTHREAD = @LIBTHREAD@ LIBTOOL = @LIBTOOL@ LIPO = @LIPO@ LN_S = @LN_S@ LOCALCHARSET_TESTS_ENVIRONMENT = @LOCALCHARSET_TESTS_ENVIRONMENT@ LOCALE_FR = @LOCALE_FR@ LOCALE_FR_UTF8 = @LOCALE_FR_UTF8@ LOCALE_JA = @LOCALE_JA@ LOCALE_TR_UTF8 = @LOCALE_TR_UTF8@ LOCALE_ZH_CN = @LOCALE_ZH_CN@ LOCALSTATEDIR = @LOCALSTATEDIR@ LTALLOCA = @LTALLOCA@ LTDLDEPS = @LTDLDEPS@ LTDLINCL = @LTDLINCL@ LTDLOPEN = @LTDLOPEN@ LTLIBINTL = @LTLIBINTL@ LTLIBMULTITHREAD = @LTLIBMULTITHREAD@ LTLIBOBJS = @LTLIBOBJS@ LTLIBPTH = @LTLIBPTH@ LTLIBTHREAD = @LTLIBTHREAD@ LT_CONFIG_H = @LT_CONFIG_H@ LT_DLLOADERS = @LT_DLLOADERS@ LT_DLPREOPEN = @LT_DLPREOPEN@ LUA_CFLAGS = @LUA_CFLAGS@ LUA_CONFIG = @LUA_CONFIG@ LUA_LIBS = @LUA_LIBS@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MKDIR_P = @MKDIR_P@ NETDB_H = @NETDB_H@ NETINET_IN_H = @NETINET_IN_H@ NEXT_ARPA_INET_H = @NEXT_ARPA_INET_H@ NEXT_AS_FIRST_DIRECTIVE_ARPA_INET_H = @NEXT_AS_FIRST_DIRECTIVE_ARPA_INET_H@ NEXT_AS_FIRST_DIRECTIVE_ERRNO_H = @NEXT_AS_FIRST_DIRECTIVE_ERRNO_H@ NEXT_AS_FIRST_DIRECTIVE_FCNTL_H = @NEXT_AS_FIRST_DIRECTIVE_FCNTL_H@ NEXT_AS_FIRST_DIRECTIVE_FLOAT_H = @NEXT_AS_FIRST_DIRECTIVE_FLOAT_H@ NEXT_AS_FIRST_DIRECTIVE_LANGINFO_H = @NEXT_AS_FIRST_DIRECTIVE_LANGINFO_H@ NEXT_AS_FIRST_DIRECTIVE_MATH_H = @NEXT_AS_FIRST_DIRECTIVE_MATH_H@ NEXT_AS_FIRST_DIRECTIVE_NETDB_H = @NEXT_AS_FIRST_DIRECTIVE_NETDB_H@ NEXT_AS_FIRST_DIRECTIVE_NETINET_IN_H = @NEXT_AS_FIRST_DIRECTIVE_NETINET_IN_H@ NEXT_AS_FIRST_DIRECTIVE_SIGNAL_H = @NEXT_AS_FIRST_DIRECTIVE_SIGNAL_H@ NEXT_AS_FIRST_DIRECTIVE_STDDEF_H = @NEXT_AS_FIRST_DIRECTIVE_STDDEF_H@ NEXT_AS_FIRST_DIRECTIVE_STDINT_H = @NEXT_AS_FIRST_DIRECTIVE_STDINT_H@ NEXT_AS_FIRST_DIRECTIVE_STDIO_H = @NEXT_AS_FIRST_DIRECTIVE_STDIO_H@ NEXT_AS_FIRST_DIRECTIVE_STDLIB_H = @NEXT_AS_FIRST_DIRECTIVE_STDLIB_H@ NEXT_AS_FIRST_DIRECTIVE_STRINGS_H = @NEXT_AS_FIRST_DIRECTIVE_STRINGS_H@ NEXT_AS_FIRST_DIRECTIVE_STRING_H = @NEXT_AS_FIRST_DIRECTIVE_STRING_H@ NEXT_AS_FIRST_DIRECTIVE_SYS_IOCTL_H = @NEXT_AS_FIRST_DIRECTIVE_SYS_IOCTL_H@ NEXT_AS_FIRST_DIRECTIVE_SYS_SELECT_H = @NEXT_AS_FIRST_DIRECTIVE_SYS_SELECT_H@ NEXT_AS_FIRST_DIRECTIVE_SYS_SOCKET_H = @NEXT_AS_FIRST_DIRECTIVE_SYS_SOCKET_H@ NEXT_AS_FIRST_DIRECTIVE_SYS_STAT_H = @NEXT_AS_FIRST_DIRECTIVE_SYS_STAT_H@ NEXT_AS_FIRST_DIRECTIVE_SYS_TIME_H = @NEXT_AS_FIRST_DIRECTIVE_SYS_TIME_H@ NEXT_AS_FIRST_DIRECTIVE_SYS_UTSNAME_H = @NEXT_AS_FIRST_DIRECTIVE_SYS_UTSNAME_H@ NEXT_AS_FIRST_DIRECTIVE_TIME_H = @NEXT_AS_FIRST_DIRECTIVE_TIME_H@ NEXT_AS_FIRST_DIRECTIVE_UNISTD_H = @NEXT_AS_FIRST_DIRECTIVE_UNISTD_H@ NEXT_AS_FIRST_DIRECTIVE_WCHAR_H = @NEXT_AS_FIRST_DIRECTIVE_WCHAR_H@ NEXT_AS_FIRST_DIRECTIVE_WCTYPE_H = @NEXT_AS_FIRST_DIRECTIVE_WCTYPE_H@ NEXT_ERRNO_H = @NEXT_ERRNO_H@ NEXT_FCNTL_H = @NEXT_FCNTL_H@ NEXT_FLOAT_H = @NEXT_FLOAT_H@ NEXT_LANGINFO_H = @NEXT_LANGINFO_H@ NEXT_MATH_H = @NEXT_MATH_H@ NEXT_NETDB_H = @NEXT_NETDB_H@ NEXT_NETINET_IN_H = @NEXT_NETINET_IN_H@ NEXT_SIGNAL_H = @NEXT_SIGNAL_H@ NEXT_STDDEF_H = @NEXT_STDDEF_H@ NEXT_STDINT_H = @NEXT_STDINT_H@ NEXT_STDIO_H = @NEXT_STDIO_H@ NEXT_STDLIB_H = @NEXT_STDLIB_H@ NEXT_STRINGS_H = @NEXT_STRINGS_H@ NEXT_STRING_H = @NEXT_STRING_H@ NEXT_SYS_IOCTL_H = @NEXT_SYS_IOCTL_H@ NEXT_SYS_SELECT_H = @NEXT_SYS_SELECT_H@ NEXT_SYS_SOCKET_H = @NEXT_SYS_SOCKET_H@ NEXT_SYS_STAT_H = @NEXT_SYS_STAT_H@ NEXT_SYS_TIME_H = @NEXT_SYS_TIME_H@ NEXT_SYS_UTSNAME_H = @NEXT_SYS_UTSNAME_H@ NEXT_TIME_H = @NEXT_TIME_H@ NEXT_UNISTD_H = @NEXT_UNISTD_H@ NEXT_WCHAR_H = @NEXT_WCHAR_H@ NEXT_WCTYPE_H = @NEXT_WCTYPE_H@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PCFLAGS = @PCFLAGS@ PERL = @PERL@ PERL_EXTRA_PARAMS = @PERL_EXTRA_PARAMS@ PKG_CONFIG = @PKG_CONFIG@ POLL_H = @POLL_H@ PRAGMA_SYSTEM_HEADER = @PRAGMA_SYSTEM_HEADER@ PRELUDE_ADMIN_CFLAGS = @PRELUDE_ADMIN_CFLAGS@ PRELUDE_ADMIN_LIBS = @PRELUDE_ADMIN_LIBS@ PRELUDE_CONFIG_DIR = @PRELUDE_CONFIG_DIR@ PRELUDE_SPOOL_DIR = @PRELUDE_SPOOL_DIR@ PTHREAD_CFLAGS = @PTHREAD_CFLAGS@ PTHREAD_LDFLAGS = @PTHREAD_LDFLAGS@ PTHREAD_LIBS = @PTHREAD_LIBS@ PTRDIFF_T_SUFFIX = @PTRDIFF_T_SUFFIX@ PYTHON = @PYTHON@ RANLIB = @RANLIB@ RELOCATABLE = @RELOCATABLE@ REPLACE_BTOWC = @REPLACE_BTOWC@ REPLACE_CANONICALIZE_FILE_NAME = @REPLACE_CANONICALIZE_FILE_NAME@ REPLACE_CEILF = @REPLACE_CEILF@ REPLACE_CEILL = @REPLACE_CEILL@ REPLACE_CHOWN = @REPLACE_CHOWN@ REPLACE_CLOSE = @REPLACE_CLOSE@ REPLACE_DPRINTF = @REPLACE_DPRINTF@ REPLACE_DUP = @REPLACE_DUP@ REPLACE_DUP2 = @REPLACE_DUP2@ REPLACE_FCHDIR = @REPLACE_FCHDIR@ REPLACE_FCHOWNAT = @REPLACE_FCHOWNAT@ REPLACE_FCLOSE = @REPLACE_FCLOSE@ REPLACE_FCNTL = @REPLACE_FCNTL@ REPLACE_FFLUSH = @REPLACE_FFLUSH@ REPLACE_FLOORF = @REPLACE_FLOORF@ REPLACE_FLOORL = @REPLACE_FLOORL@ REPLACE_FOPEN = @REPLACE_FOPEN@ REPLACE_FPRINTF = @REPLACE_FPRINTF@ REPLACE_FPURGE = @REPLACE_FPURGE@ REPLACE_FREOPEN = @REPLACE_FREOPEN@ REPLACE_FREXP = @REPLACE_FREXP@ REPLACE_FREXPL = @REPLACE_FREXPL@ REPLACE_FSEEK = @REPLACE_FSEEK@ REPLACE_FSEEKO = @REPLACE_FSEEKO@ REPLACE_FSTAT = @REPLACE_FSTAT@ REPLACE_FSTATAT = @REPLACE_FSTATAT@ REPLACE_FTELL = @REPLACE_FTELL@ REPLACE_FTELLO = @REPLACE_FTELLO@ REPLACE_FUTIMENS = @REPLACE_FUTIMENS@ REPLACE_GETCWD = @REPLACE_GETCWD@ REPLACE_GETDELIM = @REPLACE_GETDELIM@ REPLACE_GETGROUPS = @REPLACE_GETGROUPS@ REPLACE_GETLINE = @REPLACE_GETLINE@ REPLACE_GETPAGESIZE = @REPLACE_GETPAGESIZE@ REPLACE_GETTIMEOFDAY = @REPLACE_GETTIMEOFDAY@ REPLACE_HUGE_VAL = @REPLACE_HUGE_VAL@ REPLACE_ISFINITE = @REPLACE_ISFINITE@ REPLACE_ISINF = @REPLACE_ISINF@ REPLACE_ISNAN = @REPLACE_ISNAN@ REPLACE_ISWCNTRL = @REPLACE_ISWCNTRL@ REPLACE_LCHOWN = @REPLACE_LCHOWN@ REPLACE_LDEXPL = @REPLACE_LDEXPL@ REPLACE_LINK = @REPLACE_LINK@ REPLACE_LINKAT = @REPLACE_LINKAT@ REPLACE_LOCALTIME_R = @REPLACE_LOCALTIME_R@ REPLACE_LSEEK = @REPLACE_LSEEK@ REPLACE_LSTAT = @REPLACE_LSTAT@ REPLACE_MBRLEN = @REPLACE_MBRLEN@ REPLACE_MBRTOWC = @REPLACE_MBRTOWC@ REPLACE_MBSINIT = @REPLACE_MBSINIT@ REPLACE_MBSNRTOWCS = @REPLACE_MBSNRTOWCS@ REPLACE_MBSRTOWCS = @REPLACE_MBSRTOWCS@ REPLACE_MBSTATE_T = @REPLACE_MBSTATE_T@ REPLACE_MEMCHR = @REPLACE_MEMCHR@ REPLACE_MEMMEM = @REPLACE_MEMMEM@ REPLACE_MKDIR = @REPLACE_MKDIR@ REPLACE_MKFIFO = @REPLACE_MKFIFO@ REPLACE_MKNOD = @REPLACE_MKNOD@ REPLACE_MKSTEMP = @REPLACE_MKSTEMP@ REPLACE_MKTIME = @REPLACE_MKTIME@ REPLACE_NAN = @REPLACE_NAN@ REPLACE_NANOSLEEP = @REPLACE_NANOSLEEP@ REPLACE_NL_LANGINFO = @REPLACE_NL_LANGINFO@ REPLACE_NULL = @REPLACE_NULL@ REPLACE_OBSTACK_PRINTF = @REPLACE_OBSTACK_PRINTF@ REPLACE_OPEN = @REPLACE_OPEN@ REPLACE_OPENAT = @REPLACE_OPENAT@ REPLACE_PERROR = @REPLACE_PERROR@ REPLACE_POPEN = @REPLACE_POPEN@ REPLACE_PREAD = @REPLACE_PREAD@ REPLACE_PRINTF = @REPLACE_PRINTF@ REPLACE_PUTENV = @REPLACE_PUTENV@ REPLACE_READLINK = @REPLACE_READLINK@ REPLACE_REALPATH = @REPLACE_REALPATH@ REPLACE_REMOVE = @REPLACE_REMOVE@ REPLACE_RENAME = @REPLACE_RENAME@ REPLACE_RENAMEAT = @REPLACE_RENAMEAT@ REPLACE_RMDIR = @REPLACE_RMDIR@ REPLACE_ROUND = @REPLACE_ROUND@ REPLACE_ROUNDF = @REPLACE_ROUNDF@ REPLACE_ROUNDL = @REPLACE_ROUNDL@ REPLACE_SELECT = @REPLACE_SELECT@ REPLACE_SETENV = @REPLACE_SETENV@ REPLACE_SIGNBIT = @REPLACE_SIGNBIT@ REPLACE_SIGNBIT_USING_GCC = @REPLACE_SIGNBIT_USING_GCC@ REPLACE_SLEEP = @REPLACE_SLEEP@ REPLACE_SNPRINTF = @REPLACE_SNPRINTF@ REPLACE_SPRINTF = @REPLACE_SPRINTF@ REPLACE_STAT = @REPLACE_STAT@ REPLACE_STDIO_WRITE_FUNCS = @REPLACE_STDIO_WRITE_FUNCS@ REPLACE_STRCASESTR = @REPLACE_STRCASESTR@ REPLACE_STRDUP = @REPLACE_STRDUP@ REPLACE_STRERROR = @REPLACE_STRERROR@ REPLACE_STRNDUP = @REPLACE_STRNDUP@ REPLACE_STRPTIME = @REPLACE_STRPTIME@ REPLACE_STRSIGNAL = @REPLACE_STRSIGNAL@ REPLACE_STRSTR = @REPLACE_STRSTR@ REPLACE_STRTOD = @REPLACE_STRTOD@ REPLACE_STRTOK_R = @REPLACE_STRTOK_R@ REPLACE_SYMLINK = @REPLACE_SYMLINK@ REPLACE_TIMEGM = @REPLACE_TIMEGM@ REPLACE_TRUNCL = @REPLACE_TRUNCL@ REPLACE_UNLINK = @REPLACE_UNLINK@ REPLACE_UNLINKAT = @REPLACE_UNLINKAT@ REPLACE_UNSETENV = @REPLACE_UNSETENV@ REPLACE_USLEEP = @REPLACE_USLEEP@ REPLACE_UTIMENSAT = @REPLACE_UTIMENSAT@ REPLACE_VASPRINTF = @REPLACE_VASPRINTF@ REPLACE_VDPRINTF = @REPLACE_VDPRINTF@ REPLACE_VFPRINTF = @REPLACE_VFPRINTF@ REPLACE_VPRINTF = @REPLACE_VPRINTF@ REPLACE_VSNPRINTF = @REPLACE_VSNPRINTF@ REPLACE_VSPRINTF = @REPLACE_VSPRINTF@ REPLACE_WCRTOMB = @REPLACE_WCRTOMB@ REPLACE_WCSNRTOMBS = @REPLACE_WCSNRTOMBS@ REPLACE_WCSRTOMBS = @REPLACE_WCSRTOMBS@ REPLACE_WCTOB = @REPLACE_WCTOB@ REPLACE_WCWIDTH = @REPLACE_WCWIDTH@ REPLACE_WRITE = @REPLACE_WRITE@ RUBY = @RUBY@ RUBY_CCFLAGS = @RUBY_CCFLAGS@ RUBY_EXEC_PREFIX = @RUBY_EXEC_PREFIX@ RUBY_INCLUDES = @RUBY_INCLUDES@ RUBY_LIBS = @RUBY_LIBS@ RUBY_PLATFORM = @RUBY_PLATFORM@ RUBY_PREFIX = @RUBY_PREFIX@ RUBY_VERSION = @RUBY_VERSION@ SED = @SED@ SERVENT_LIB = @SERVENT_LIB@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ SIG_ATOMIC_T_SUFFIX = @SIG_ATOMIC_T_SUFFIX@ SIZE_T_SUFFIX = @SIZE_T_SUFFIX@ STDBOOL_H = @STDBOOL_H@ STDDEF_H = @STDDEF_H@ STDINT_H = @STDINT_H@ STRIP = @STRIP@ SWIG = @SWIG@ SYSCONFDIR = @SYSCONFDIR@ SYS_IOCTL_H_HAVE_WINSOCK2_H = @SYS_IOCTL_H_HAVE_WINSOCK2_H@ SYS_IOCTL_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS = @SYS_IOCTL_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS@ SYS_SOCKET_H = @SYS_SOCKET_H@ SYS_TIME_H_DEFINES_STRUCT_TIMESPEC = @SYS_TIME_H_DEFINES_STRUCT_TIMESPEC@ TIME_H_DEFINES_STRUCT_TIMESPEC = @TIME_H_DEFINES_STRUCT_TIMESPEC@ UNDEFINE_STRTOK_R = @UNDEFINE_STRTOK_R@ UNISTD_H_HAVE_WINSOCK2_H = @UNISTD_H_HAVE_WINSOCK2_H@ UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS = @UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS@ VALGRIND = @VALGRIND@ VERSION = @VERSION@ WCHAR_T_SUFFIX = @WCHAR_T_SUFFIX@ WCTYPE_H = @WCTYPE_H@ WINT_T_SUFFIX = @WINT_T_SUFFIX@ YACC = @YACC@ YFLAGS = @YFLAGS@ YIELD_LIB = @YIELD_LIB@ __PRELUDE_64BIT_FORMAT_PREFIX = @__PRELUDE_64BIT_FORMAT_PREFIX@ __PRELUDE_HAVE_64BIT_LONG = @__PRELUDE_HAVE_64BIT_LONG@ __PRELUDE_HAVE_INTTYPES_H = @__PRELUDE_HAVE_INTTYPES_H@ __PRELUDE_HAVE_STDINT_H = @__PRELUDE_HAVE_STDINT_H@ __PRELUDE_STDINT_HAVE_UINT16 = @__PRELUDE_STDINT_HAVE_UINT16@ __PRELUDE_STDINT_HAVE_UINT32 = @__PRELUDE_STDINT_HAVE_UINT32@ __PRELUDE_STDINT_HAVE_UINT64 = @__PRELUDE_STDINT_HAVE_UINT64@ __PRELUDE_STDINT_HAVE_UINT8 = @__PRELUDE_STDINT_HAVE_UINT8@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ gl_LIBOBJS = @gl_LIBOBJS@ gl_LTLIBOBJS = @gl_LTLIBOBJS@ gltests_LIBOBJS = @gltests_LIBOBJS@ gltests_LTLIBOBJS = @gltests_LTLIBOBJS@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ lt_ECHO = @lt_ECHO@ ltdl_LIBOBJS = @ltdl_LIBOBJS@ ltdl_LTLIBOBJS = @ltdl_LTLIBOBJS@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ pkgrbexecdir = @pkgrbexecdir@ pkgrubydir = @pkgrubydir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ rbexecdir = @rbexecdir@ rubydir = @rubydir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sys_symbol_underscore = @sys_symbol_underscore@ sysconfdir = @sysconfdir@ target = @target@ target_alias = @target_alias@ target_cpu = @target_cpu@ target_os = @target_os@ target_vendor = @target_vendor@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ AM_CPPFLAGS = @PCFLAGS@ -I$(top_builddir)/src/include -I$(top_srcdir)/src/include -I$(top_builddir)/libmissing -I$(top_srcdir)/libmissing -I$(top_builddir)/src/libprelude-error @LIBPRELUDE_CFLAGS@ @LIBGNUTLS_CFLAGS@ @PRELUDE_ADMIN_CFLAGS@ bin_SCRIPTS = prelude-adduser prelude_admin_LDADD = $(top_builddir)/src/config-engine.lo \ $(top_builddir)/src/variable.lo \ $(top_builddir)/src/libprelude.la \ @PRELUDE_ADMIN_LIBS@ \ ../libmissing/libmissing.la $(GETADDRINFO_LIB) $(HOSTENT_LIB) $(LTLIBINTL) $(LTLIBTHREAD) $(SERVENT_LIB) prelude_admin_SOURCES = \ prelude-admin.c \ server.c \ tls-register.c noinst_HEADERS = tls-register.h server.h all: all-am .SUFFIXES: .SUFFIXES: .c .lo .o .obj $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu prelude-admin/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu prelude-admin/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): prelude-adduser: $(top_builddir)/config.status $(srcdir)/prelude-adduser.in cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ install-binPROGRAMS: $(bin_PROGRAMS) @$(NORMAL_INSTALL) test -z "$(bindir)" || $(MKDIR_P) "$(DESTDIR)$(bindir)" @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ for p in $$list; do echo "$$p $$p"; done | \ sed 's/$(EXEEXT)$$//' | \ while read p p1; do if test -f $$p || test -f $$p1; \ then echo "$$p"; echo "$$p"; else :; fi; \ done | \ sed -e 'p;s,.*/,,;n;h' -e 's|.*|.|' \ -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \ sed 'N;N;N;s,\n, ,g' | \ $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \ { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \ if ($$2 == $$4) files[d] = files[d] " " $$1; \ else { print "f", $$3 "/" $$4, $$1; } } \ END { for (d in files) print "f", d, files[d] }' | \ while read type dir files; do \ if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \ test -z "$$files" || { \ echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(bindir)$$dir'"; \ $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \ } \ ; done uninstall-binPROGRAMS: @$(NORMAL_UNINSTALL) @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ files=`for p in $$list; do echo "$$p"; done | \ sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \ -e 's/$$/$(EXEEXT)/' `; \ test -n "$$list" || exit 0; \ echo " ( cd '$(DESTDIR)$(bindir)' && rm -f" $$files ")"; \ cd "$(DESTDIR)$(bindir)" && rm -f $$files clean-binPROGRAMS: @list='$(bin_PROGRAMS)'; test -n "$$list" || exit 0; \ echo " rm -f" $$list; \ rm -f $$list || exit $$?; \ test -n "$(EXEEXT)" || exit 0; \ list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ echo " rm -f" $$list; \ rm -f $$list prelude-admin$(EXEEXT): $(prelude_admin_OBJECTS) $(prelude_admin_DEPENDENCIES) @rm -f prelude-admin$(EXEEXT) $(LINK) $(prelude_admin_OBJECTS) $(prelude_admin_LDADD) $(LIBS) install-binSCRIPTS: $(bin_SCRIPTS) @$(NORMAL_INSTALL) test -z "$(bindir)" || $(MKDIR_P) "$(DESTDIR)$(bindir)" @list='$(bin_SCRIPTS)'; test -n "$(bindir)" || list=; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ if test -f "$$d$$p"; then echo "$$d$$p"; echo "$$p"; else :; fi; \ done | \ sed -e 'p;s,.*/,,;n' \ -e 'h;s|.*|.|' \ -e 'p;x;s,.*/,,;$(transform)' | sed 'N;N;N;s,\n, ,g' | \ $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1; } \ { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \ if ($$2 == $$4) { files[d] = files[d] " " $$1; \ if (++n[d] == $(am__install_max)) { \ print "f", d, files[d]; n[d] = 0; files[d] = "" } } \ else { print "f", d "/" $$4, $$1 } } \ END { for (d in files) print "f", d, files[d] }' | \ while read type dir files; do \ if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \ test -z "$$files" || { \ echo " $(INSTALL_SCRIPT) $$files '$(DESTDIR)$(bindir)$$dir'"; \ $(INSTALL_SCRIPT) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \ } \ ; done uninstall-binSCRIPTS: @$(NORMAL_UNINSTALL) @list='$(bin_SCRIPTS)'; test -n "$(bindir)" || exit 0; \ files=`for p in $$list; do echo "$$p"; done | \ sed -e 's,.*/,,;$(transform)'`; \ test -n "$$list" || exit 0; \ echo " ( cd '$(DESTDIR)$(bindir)' && rm -f" $$files ")"; \ cd "$(DESTDIR)$(bindir)" && rm -f $$files mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/prelude-admin.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/server.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tls-register.Po@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(COMPILE) -c $< .c.obj: @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` .c.lo: @am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ mkid -fID $$unique tags: TAGS TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) set x; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: CTAGS CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(PROGRAMS) $(SCRIPTS) $(HEADERS) installdirs: for dir in "$(DESTDIR)$(bindir)" "$(DESTDIR)$(bindir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-binPROGRAMS clean-generic clean-libtool mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-binPROGRAMS install-binSCRIPTS install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-binPROGRAMS uninstall-binSCRIPTS .MAKE: install-am install-strip .PHONY: CTAGS GTAGS all all-am check check-am clean clean-binPROGRAMS \ clean-generic clean-libtool ctags distclean distclean-compile \ distclean-generic distclean-libtool distclean-tags distdir dvi \ dvi-am html html-am info info-am install install-am \ install-binPROGRAMS install-binSCRIPTS install-data \ install-data-am install-dvi install-dvi-am install-exec \ install-exec-am install-html install-html-am install-info \ install-info-am install-man install-pdf install-pdf-am \ install-ps install-ps-am install-strip installcheck \ installcheck-am installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-compile \ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ tags uninstall uninstall-am uninstall-binPROGRAMS \ uninstall-binSCRIPTS -include $(top_srcdir)/git.mk # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: libprelude-1.0.0/prelude-admin/prelude-admin.c0000664000076400007640000020355611330537773016236 00000000000000 /***** * * Copyright (C) 2001, 2002, 2003, 2004, 2005 PreludeIDS Technologies. All Rights Reserved. * Author: Yoann Vandoorselaere * * This file is part of the Prelude library. * * 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; see the file COPYING. If not, write to * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. * *****/ #include "config.h" #include "libmissing.h" #include #include #include #include #include #include #include #include #include #include #include #include #include #if !((defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__) # include # include #endif #if TIME_WITH_SYS_TIME # include # include #else # if HAVE_SYS_TIME_H # include # else # include # endif #endif #include #include #include #include #include "common.h" #include "config-engine.h" #include "prelude.h" #include "idmef-message-print.h" #include "server.h" #include "tls-register.h" #if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__ # define chown(x, y, z) (0) # define fchown(x, y, z) (0) # define getuid(x) (0) # define getgid(x) (0) #endif struct rm_dir_s { prelude_list_t list; char *filename; }; struct cmdtbl { char *cmd; int argnum; int (*cmd_func)(int argc, char **argv); void (*help_func)(void); }; static const char *myprogname; static unsigned int port = 5553; static PRELUDE_LIST(rm_dir_list); static prelude_option_t *parentopt; static prelude_client_profile_t *profile; static char *addr = NULL, *one_shot_passwd = NULL, *arg_command = NULL; static prelude_bool_t gid_set = FALSE, uid_set = FALSE, detailed_listing = FALSE; static prelude_bool_t prompt_passwd = FALSE, server_keepalive = FALSE, pass_from_stdin = FALSE; int generated_key_size = 0; prelude_bool_t server_confirm = TRUE; int authority_certificate_lifetime = 0; int generated_certificate_lifetime = 0; static int64_t offset = -1, count = -1; static const char *get_tls_config(void) { static char buf[PATH_MAX]; static int initialized = 0; if ( initialized ) return buf; prelude_client_profile_get_default_config_dirname(NULL, buf, sizeof(buf)); snprintf(buf + strlen(buf), sizeof(buf) - strlen(buf), "/tls.conf"); initialized = 1; return buf; } static int chown_cb(const char *filename, const struct stat *st, int flag) { int ret; prelude_uid_t uid; prelude_gid_t gid; uid = uid_set ? prelude_client_profile_get_uid(profile) : (prelude_uid_t) -1; gid = gid_set ? prelude_client_profile_get_gid(profile) : (prelude_gid_t) -1; ret = chown(filename, uid, gid); if ( ret < 0 ) fprintf(stderr, "could not change '%s' to UID:%d GID:%d: %s.\n\n", filename, (int) uid, (int) gid, strerror(errno)); return ret; } static int do_chown(const char *name) { int ret; char dirname[PATH_MAX]; prelude_client_profile_get_profile_dirname(profile, dirname, sizeof(dirname)); ret = ftw(dirname, chown_cb, 10); if ( ret < 0 ) return -1; prelude_client_profile_get_backup_dirname(profile, dirname, sizeof(dirname)); ret = ftw(dirname, chown_cb, 10); if ( ret < 0 ) return -1; fprintf(stderr, "Changed '%s' ownership to UID:%d GID:%d.\n", name, uid_set ? (int) prelude_client_profile_get_uid(profile) : -1, gid_set ? (int) prelude_client_profile_get_gid(profile) : -1); return 0; } static void permission_warning(void) { #if !((defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__) fprintf(stderr, "* WARNING: no --uid or --gid command line options were provided.\n*\n" "* The profile will be created under the current UID (%d) and GID (%d). The\n" "* created profile should be available for writing to the program that will\n" "* be using it.\n*\n" "* Your sensor WILL NOT START without sufficient permission to load the profile.\n" "* [Please press enter if this is what you intend to do]\n", (int) prelude_client_profile_get_uid(profile), (int) prelude_client_profile_get_gid(profile)); while ( getchar() != '\n' ); #endif } static int change_permission(int exist_uid, int exist_gid) { fprintf(stderr, "* WARNING: A profile named '%s' already exist with permission UID:%d, GID:%d.\n" "* If you continue, '%s' permission will be updated to UID:%d, GID:%d.\n" "* [Please press enter if this is what you intend to do]\n", prelude_client_profile_get_name(profile), exist_uid, exist_gid, prelude_client_profile_get_name(profile), (int) prelude_client_profile_get_uid(profile), (int) prelude_client_profile_get_gid(profile)); while ( getchar() != '\n' ); return do_chown(prelude_client_profile_get_name(profile)); } static const char *lifetime_to_str(char *out, size_t size, int lifetime) { if ( ! lifetime ) snprintf(out, size, "unlimited"); else snprintf(out, size, "%d days", lifetime); return out; } static void print_tls_settings(void) { char buf1[128], buf2[128]; lifetime_to_str(buf1, sizeof(buf1), generated_certificate_lifetime); lifetime_to_str(buf2, sizeof(buf2), authority_certificate_lifetime); fprintf(stderr, "TLS Options (from: %s):\n" " --key-len=LEN : Profile private key length (default: %d bits).\n" " --cert-lifetime=DAYS : Profile certificate lifetime (default: %s).\n" " --ca-cert-lifetime=DAYS : Authority certificate lifetime (default: %s).\n" "\n", get_tls_config(), generated_key_size, buf1, buf2); } static void print_delete_help(void) { fprintf(stderr, "Usage : delete \n"); fprintf(stderr, "Example: delete my-profile\n\n"); fprintf(stderr, "Delete an analyzer profile.\n\n"); } static void print_rename_help(void) { fprintf(stderr, "Usage : rename \n" "Example: rename prelude-lml-old prelude-lml-new\n\n" "Rename an analyzer profile.\n\n"); } static void print_registration_server_help(void) { fprintf(stderr, "Usage : registration-server [options]\n" "Example: registration-server prelude-manager\n\n" "Launch a registration server for the specified Prelude-Manager profile. The\n" "profile will be created if it does not exist. Registered analyzers will be able\n" "to communicate with Prelude-Manager instance using this profile.\n\n" "Options:\n" #if !((defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__) " --uid=UID : UID or user used to create the analyzer profile.\n" " --gid=GID : GID or group used to create the analyzer profile.\n" #endif " --prompt : Prompt for a password instead of auto generating it.\n" " --passwd=PASSWD : Use provided password instead of auto generating it.\n" " --passwd-file=-|FILE : Read password from file instead of auto generating it (- for stdin).\n" " --keepalive : Register analyzer in an infinite loop.\n" " --no-confirm : Do not ask for confirmation on sensor registration.\n" " --listen : Address to listen on for registration request (default is any:5553).\n\n"); print_tls_settings(); } static void print_register_help(void) { fprintf(stderr, "Usage : register [options]\n" "Example: register prelude-lml \"idmef:w\" 192.168.0.1\n\n" "This command will register the specified analyzer profile to the remote\n" "registration server. The analyzer profile will be created if it does not exist.\n\n" "Options:\n" #if !((defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__) " --uid=UID : UID or user used to create analyzer profile.\n" " --gid=GID : GID or group used to create analyzer profile.\n" #endif " --passwd=PASSWD : Use provided password instead of prompting it.\n" " --passwd-file=-|FILE\t: Read password from file (- for stdin).\n\n"); print_tls_settings(); } static void print_add_help(void) { fprintf(stderr, "Usage : add \n" "Example: add prelude-lml\n\n" "This command will create the specified analyzer profile.\n\n" #if !((defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__) "Options:\n" " --uid=UID: UID or user used to create analyzer profile.\n" " --gid=GID: GID or group used to create analyzer profile.\n" #endif "\n"); print_tls_settings(); } static void print_chown_help(void) { fprintf(stderr, "Usage : chown <--uid|--gid>\n" "Example: chown prelude-lml --uid lmluser --gid lmlgroup\n\n" #if !((defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__) "Options:\n" " --uid=UID : UID or user used as new profile permission.\n" " --gid=GID : GID to group used as new profile permission.\n" #endif "\n"); } static void print_revoke_help(void) { fprintf(stderr, "Usage : revoke \n" "Example: revoke prelude-manager 227879253605921\n\n" "This command will revoke the analyzer using the given analyzerID from the\n" "specified profile. Analyzer using the revoked analyzerID won't be able to\n" "communicate with the profile it was revoked from anymore.\n\n"); } static void print_list_help(void) { fprintf(stderr, "Usage : list [-l]\n" "Example: list -l\n\n" "Print the list of available profile, their permissions, and the certificate\n" "issuer analyzerID.\n\n" "Options:\n" " -l --long : Print detailed listing (include uid/gid, profile analyzerID).\n" "\n"); } static void print_print_help(void) { fprintf(stderr, "Usage : print \n" "Example: print /path/to/file1 /path/to/file2 /path/to/fileN\n\n" "Print the messages within a Prelude IDMEF binary file (example: failover file)\n" "to stdout using an human readable format.\n\n" "Options:\n" " --offset=OFFSET : Skip processing until 'offset' events.\n" " --count=COUNT : Process at most 'count' events.\n" "\n"); } static void print_send_help(void) { fprintf(stderr, "Usage : send \n" "Example: send prelude-lml 192.168.0.1 /path/to/file1 /path/to/file2 /path/to/fileN\n\n" "Send the messages within a Prelude IDMEF binary file (example: failover file)\n" "to the specified Prelude-Manager address. The specified profile is used for\n" "authentication.\n\n" "Options:\n" " --offset=OFFSET : Skip processing until 'offset' events.\n" " --count=COUNT : Process at most 'count' events.\n" "\n"); } #if !((defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__) static int set_uid(prelude_option_t *opt, const char *optarg, prelude_string_t *err, void *context) { prelude_uid_t uid; const char *p; struct passwd *pw; for ( p = optarg; isdigit((int) *p); p++ ); if ( *p == 0 ) uid = atoi(optarg); else { pw = getpwnam(optarg); if ( ! pw ) { fprintf(stderr, "could not lookup user '%s'.\n", optarg); return -1; } uid = pw->pw_uid; } uid_set = TRUE; prelude_client_profile_set_uid(profile, uid); return 0; } static int set_gid(prelude_option_t *opt, const char *optarg, prelude_string_t *err, void *context) { prelude_gid_t gid; const char *p; struct group *grp; for ( p = optarg; isdigit((int) *p); p++ ); if ( *p == 0 ) gid = atoi(optarg); else { grp = getgrnam(optarg); if ( ! grp ) { fprintf(stderr, "could not lookup group '%s'.\n", optarg); return -1; } gid = grp->gr_gid; } gid_set = TRUE; prelude_client_profile_set_gid(profile, gid); return 0; } #endif static int set_offset(prelude_option_t *opt, const char *optarg, prelude_string_t *err, void *context) { offset = strtoll(optarg, NULL, 0); return 0; } static int set_count(prelude_option_t *opt, const char *optarg, prelude_string_t *err, void *context) { count = strtoll(optarg, NULL, 0); return 0; } static int set_server_keepalive(prelude_option_t *opt, const char *optarg, prelude_string_t *err, void *context) { server_keepalive = TRUE; return 0; } static int set_passwd(prelude_option_t *opt, const char *optarg, prelude_string_t *err, void *context) { one_shot_passwd = strdup(optarg); return 0; } static int set_passwd_file(prelude_option_t *opt, const char *optarg, prelude_string_t *err, void *context) { FILE *fd; size_t len; char buf[1024], *ptr; prompt_passwd = FALSE; if ( strcmp(optarg, "-") == 0 ) { fd = stdin; server_confirm = FALSE; pass_from_stdin = TRUE; } else { fd = fopen(optarg, "r"); if ( ! fd ) { fprintf(stderr, "could not open file '%s': %s\n", optarg, strerror(errno)); return -1; } } ptr = fgets(buf, sizeof(buf), fd); if ( fd != stdin ) fclose(fd); if ( ! ptr ) return -1; len = strlen(buf); if ( buf[len - 1] == '\n' ) buf[len - 1] = 0; one_shot_passwd = strdup(buf); return 0; } static int set_prompt_passwd(prelude_option_t *opt, const char *optarg, prelude_string_t *err, void *context) { prompt_passwd = TRUE; return 0; } static int set_server_no_confirm(prelude_option_t *opt, const char *optarg, prelude_string_t *err, void *context) { server_confirm = FALSE; return 0; } static int set_server_listen_address(prelude_option_t *opt, const char *optarg, prelude_string_t *err, void *context) { int ret; ret = prelude_parse_address(optarg, &addr, &port); if ( ret < 0 ) fprintf(stderr, "could not parse address '%s'.\n", optarg); return ret; } static int set_key_len(prelude_option_t *opt, const char *optarg, prelude_string_t *err, void *context) { generated_key_size = atoi(optarg); return 0; } static int set_cert_lifetime(prelude_option_t *opt, const char *optarg, prelude_string_t *err, void *context) { generated_certificate_lifetime = atoi(optarg); return 0; } static int set_ca_cert_lifetime(prelude_option_t *opt, const char *optarg, prelude_string_t *err, void *context) { authority_certificate_lifetime = atoi(optarg); return 0; } static int set_long_listing(prelude_option_t *opt, const char *optarg, prelude_string_t *err, void *context) { detailed_listing = TRUE; return 0; } static void setup_permission_options(void) { #if !((defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__) prelude_option_add(parentopt, NULL, PRELUDE_OPTION_TYPE_CLI, 'u', "uid", NULL, PRELUDE_OPTION_ARGUMENT_REQUIRED, set_uid, NULL); prelude_option_add(parentopt, NULL, PRELUDE_OPTION_TYPE_CLI, 'g', "gid", NULL, PRELUDE_OPTION_ARGUMENT_REQUIRED, set_gid, NULL); #endif } static void setup_read_options(void) { prelude_option_add(parentopt, NULL, PRELUDE_OPTION_TYPE_CLI, 'o', "offset", NULL, PRELUDE_OPTION_ARGUMENT_REQUIRED, set_offset, NULL); prelude_option_add(parentopt, NULL, PRELUDE_OPTION_TYPE_CLI, 'c', "count", NULL, PRELUDE_OPTION_ARGUMENT_REQUIRED, set_count, NULL); } static void setup_list_options(void) { prelude_option_add(parentopt, NULL, PRELUDE_OPTION_TYPE_CLI, 'l', "long", NULL, PRELUDE_OPTION_ARGUMENT_NONE, set_long_listing, NULL); } static int read_tls_setting(void) { int ret; char *ptr; config_t *cfg; unsigned int line; ret = _config_open(&cfg, get_tls_config()); if ( ret < 0 ) { prelude_perror(ret, "could not open %s", get_tls_config()); return -1; } line = 0; ptr = _config_get(cfg, NULL, "generated-key-size", &line); if ( ! ptr ) { fprintf(stderr, "%s: couldn't find \"generated-key-size\" setting.\n", get_tls_config()); goto err; } generated_key_size = atoi(ptr); free(ptr); line = 0; ptr = _config_get(cfg, NULL, "authority-certificate-lifetime", &line); if ( ! ptr ) { fprintf(stderr, "%s: couldn't find \"authority-certificate-lifetime\" setting.\n", get_tls_config()); goto err; } authority_certificate_lifetime = atoi(ptr); free(ptr); line = 0; ptr = _config_get(cfg, NULL, "generated-certificate-lifetime", &line); if ( ! ptr ) { fprintf(stderr, "%s: couldn't find \"generated-certificate-lifetime\" setting.\n", get_tls_config()); goto err; } generated_certificate_lifetime = atoi(ptr); free(ptr); err: _config_close(cfg); return (ptr) ? 0 : -1; } static void setup_tls_options(void) { int ret; ret = read_tls_setting(); if ( ret < 0 ) exit(1); prelude_option_add(parentopt, NULL, PRELUDE_OPTION_TYPE_CLI, 0, "key-len", NULL, PRELUDE_OPTION_ARGUMENT_REQUIRED, set_key_len, NULL); prelude_option_add(parentopt, NULL, PRELUDE_OPTION_TYPE_CLI, 0, "cert-lifetime", NULL, PRELUDE_OPTION_ARGUMENT_REQUIRED, set_cert_lifetime, NULL); prelude_option_add(parentopt, NULL, PRELUDE_OPTION_TYPE_CLI, 0, "ca-cert-lifetime", NULL, PRELUDE_OPTION_ARGUMENT_REQUIRED, set_ca_cert_lifetime, NULL); } static uint64_t generate_analyzerid(void) { struct timeval tv; union { uint64_t val64; uint32_t val32[2]; } combo; gettimeofday(&tv, NULL); combo.val32[0] = tv.tv_sec; combo.val32[1] = tv.tv_usec; return combo.val64; } /* * If the client provided no configuration filename, it is important * that we use the default configuration (idmef-client.conf). Here, * we do a copy of this file to the analyzer profile directory, so * that admin request to the analyzer can be saved locally for this * analyzer. */ static int create_template_config_file(prelude_client_profile_t *profile) { int ret; FILE *fd, *tfd; size_t len, wlen; char dirname[PATH_MAX], filename[PATH_MAX], buf[8192]; prelude_client_profile_get_default_config_dirname(profile, dirname, sizeof(dirname)); snprintf(dirname + strlen(dirname), sizeof(dirname) - strlen(dirname), "/idmef-client.conf"); prelude_client_profile_get_config_filename(profile, filename, sizeof(filename)); ret = access(filename, F_OK); if ( ret == 0 ) return 0; tfd = fopen(dirname, "r"); if ( ! tfd ) { fprintf(stderr, "could not open '%s' for reading: %s.\n", dirname, strerror(errno)); return -1; } fd = fopen(filename, "w"); if ( ! fd ) { fclose(tfd); fprintf(stderr, "could not open '%s' for writing: %s.\n", filename, strerror(errno)); return -1; } ret = fchown(fileno(fd), prelude_client_profile_get_uid(profile), prelude_client_profile_get_gid(profile)); if ( ret < 0 ) fprintf(stderr, "error changing '%s' ownership: %s.\n", filename, strerror(errno)); while ( fgets(buf, sizeof(buf), tfd) ) { len = strlen(buf); wlen = fwrite(buf, 1, len, fd); if ( wlen != len && ferror(fd) ) { fprintf(stderr, "error writing to '%s': %s.\n", filename, strerror(errno)); ret = -1; goto err; } } err: fclose(fd); fclose(tfd); if ( ret < 0 ) unlink(buf); return ret; } static int register_sensor_ident(const char *name, uint64_t *ident) { FILE *fd; int ret, already_exist; char buf[256], filename[256]; *ident = generate_analyzerid(); prelude_client_profile_get_analyzerid_filename(profile, filename, sizeof(filename)); already_exist = access(filename, F_OK); ret = open(filename, (already_exist == 0) ? O_RDONLY : O_CREAT|O_WRONLY, S_IRUSR|S_IWUSR|S_IRGRP); if ( ret < 0 ) { fprintf(stderr, "error opening '%s': %s.\n", filename, strerror(errno)); return -1; } fd = fdopen(ret, (already_exist == 0) ? "r" : "w"); if ( ! fd ) { close(ret); fprintf(stderr, "error opening '%s': %s.\n", filename, strerror(errno)); return -1; } if ( already_exist == 0 ) { if ( ! fgets(buf, sizeof(buf), fd) ) { fclose(fd); unlink(filename); return register_sensor_ident(name, ident); } if ( ! sscanf(buf, "%" PRELUDE_SCNu64, ident) ) { fclose(fd); unlink(filename); return register_sensor_ident(name, ident); } fclose(fd); return 0; } ret = fchown(fileno(fd), prelude_client_profile_get_uid(profile), prelude_client_profile_get_gid(profile)); if ( ret < 0 ) fprintf(stderr, "error changing '%s' ownership: %s.\n", filename, strerror(errno)); fprintf(fd, "%" PRELUDE_PRIu64 "\n", *ident); fclose(fd); return 0; } static int anon_check_passwd(prelude_io_t *fd, char *passwd) { int ret; ssize_t size; unsigned char *rbuf; size = prelude_io_write_delimited(fd, passwd, strlen(passwd) + 1); if ( size < 0 ) { fprintf(stderr, "error sending authentication token: %s.\n", prelude_strerror(size)); return -1; } size = prelude_io_read_delimited(fd, &rbuf); if ( size < 2 ) { fprintf(stderr, "error receiving authentication result: %s.\n", prelude_strerror(size)); return -1; } ret = memcmp(rbuf, "OK", 2); free(rbuf); if ( ret != 0 ) return -1; return 0; } static inline gnutls_transport_ptr fd_to_ptr(int fd) { union { gnutls_transport_ptr ptr; int fd; } data; data.fd = fd; return data.ptr; } static inline int ptr_to_fd(gnutls_transport_ptr ptr) { union { gnutls_transport_ptr ptr; int fd; } data; data.ptr = ptr; return data.fd; } static ssize_t tls_pull(gnutls_transport_ptr fd, void *buf, size_t count) { return read(ptr_to_fd(fd), buf, count); } static ssize_t tls_push(gnutls_transport_ptr fd, const void *buf, size_t count) { return write(ptr_to_fd(fd), buf, count); } static gnutls_session new_tls_session(int sock, char *passwd) { int ret; gnutls_session session; gnutls_anon_client_credentials anoncred; const int kx_priority[] = { GNUTLS_KX_ANON_DH, #ifdef GNUTLS_SRP_ENABLED GNUTLS_KX_SRP, GNUTLS_KX_SRP_DSS, GNUTLS_KX_SRP_RSA, #endif 0 }; gnutls_init(&session, GNUTLS_CLIENT); gnutls_set_default_priority(session); gnutls_kx_set_priority(session, kx_priority); #ifdef GNUTLS_SRP_ENABLED { gnutls_srp_client_credentials srpcred; gnutls_srp_allocate_client_credentials(&srpcred); gnutls_srp_set_client_credentials(srpcred, "prelude-adduser", passwd); gnutls_credentials_set(session, GNUTLS_CRD_SRP, srpcred); } #endif gnutls_anon_allocate_client_credentials(&anoncred); gnutls_credentials_set(session, GNUTLS_CRD_ANON, anoncred); gnutls_transport_set_ptr(session, fd_to_ptr(sock)); gnutls_transport_set_pull_function(session, tls_pull); gnutls_transport_set_push_function(session, tls_push); ret = gnutls_handshake(session); if ( ret < 0 ) { const char *errstr; if (ret == GNUTLS_E_WARNING_ALERT_RECEIVED || ret == GNUTLS_E_FATAL_ALERT_RECEIVED) errstr = gnutls_alert_get_name(gnutls_alert_get(session)); else errstr = gnutls_strerror(ret); fprintf(stderr, "\nGnuTLS handshake failed: %s.\n", errstr); return NULL; } return session; } static prelude_io_t *connect_manager(const char *addr, unsigned int port, char *passwd) { int ret, sock; prelude_io_t *fd; gnutls_session session; char buf[sizeof("65535")]; struct addrinfo hints, *ai; memset(&hints, 0, sizeof(hints)); snprintf(buf, sizeof(buf), "%u", port); #ifdef AI_ADDRCONFIG hints.ai_flags = AI_ADDRCONFIG; #endif hints.ai_family = PF_UNSPEC; hints.ai_socktype = SOCK_STREAM; hints.ai_protocol = IPPROTO_TCP; ret = getaddrinfo(addr, buf, &hints, &ai); if ( ret != 0 ) { fprintf(stderr, "could not resolve %s: %s.\n", addr, (ret == EAI_SYSTEM) ? strerror(errno) : gai_strerror(ret)); return NULL; } sock = socket(ai->ai_family, ai->ai_socktype, ai->ai_protocol); if ( sock < 0) { fprintf(stderr, "error creating socket: %s.\n", strerror(errno)); return NULL; } fprintf(stderr, "\nConnecting to registration server (%s:%u)... ", addr, port); fflush(stderr); ret = connect(sock, ai->ai_addr, ai->ai_addrlen); if ( ret < 0 ) { fprintf(stderr, "\ncould not connect to %s port %s: %s.\n", addr, buf, strerror(errno)); close(sock); return NULL; } session = new_tls_session(sock, passwd); if ( ! session ) return NULL; ret = prelude_io_new(&fd); if ( ret < 0 ) { fprintf(stderr, "\nerror creating an IO object.\n"); gnutls_deinit(session); close(sock); return NULL; } prelude_io_set_tls_io(fd, session); if ( gnutls_auth_get_type(session) == GNUTLS_CRD_ANON && anon_check_passwd(fd, passwd) < 0 ) { fprintf(stderr, "Authentication failed.\n"); return NULL; } fprintf(stderr, "Authentication succeeded.\n"); return fd; } static int create_directory(prelude_client_profile_t *profile, const char *dirname, int flags) { int ret; ret = mkdir(dirname, flags); if ( ret < 0 && errno != EEXIST ) { fprintf(stderr, "error creating directory %s: %s.\n", dirname, strerror(errno)); return -1; } ret = chown(dirname, prelude_client_profile_get_uid(profile), prelude_client_profile_get_gid(profile)); if ( ret < 0 ) { fprintf(stderr, "could not chown %s to %d:%d: %s.\n", dirname, (int) prelude_client_profile_get_uid(profile), (int) prelude_client_profile_get_gid(profile), strerror(errno)); return -1; } return 0; } static int setup_analyzer_files(prelude_client_profile_t *profile, uint64_t *analyzerid, gnutls_x509_privkey *key, gnutls_x509_crt *crt) { int ret; char buf[256]; const char *name; prelude_client_profile_get_profile_dirname(profile, buf, sizeof(buf)); ret = create_directory(profile, buf, S_IRWXU|S_IRGRP|S_IXGRP); if ( ret < 0 ) { fprintf(stderr, "error creating directory %s: %s.\n", buf, strerror(errno)); return -1; } *key = tls_load_privkey(profile); if ( ! *key ) return -1; name = prelude_client_profile_get_name(profile); ret = create_template_config_file(profile); if ( ret < 0 ) return -1; ret = register_sensor_ident(name, analyzerid); if ( ret < 0 ) return -1; prelude_client_profile_set_analyzerid(profile, *analyzerid); prelude_client_profile_get_backup_dirname(profile, buf, sizeof(buf)); return create_directory(profile, buf, S_IRWXU|S_IRWXG); } static int ask_one_shot_password(char **buf, const char *ask, ...) { int ret; va_list ap; char *pass1, *pass2; char str[1024], askbuf[1024]; va_start(ap, ask); vsnprintf(askbuf, sizeof(askbuf), ask, ap); va_end(ap); do { snprintf(str, sizeof(str), "Enter %s: ", askbuf); pass1 = getpass(str); if ( ! pass1 || ! (pass1 = strdup(pass1)) ) return -1; snprintf(str, sizeof(str), "Confirm %s: ", askbuf); pass2 = getpass(str); if ( ! pass2 ) { memset(pass1, 0, strlen(pass1)); free(pass1); return -1; } ret = strcmp(pass1, pass2); memset(pass2, 0, strlen(pass2)); if ( ret == 0 ) { *buf = pass1; return 0; } memset(pass1, 0, strlen(pass1)); free(pass1); } while ( TRUE ); } static int add_to_rm_dir_list(const char *filename) { struct rm_dir_s *new; new = malloc(sizeof(*new)); if ( ! new ) { fprintf(stderr, "memory exhausted.\n"); return -1; } new->filename = strdup(filename); prelude_list_add(&rm_dir_list, &new->list); return 0; } static int flush_rm_dir_list(void) { int ret; struct rm_dir_s *dir; prelude_list_t *tmp, *bkp; prelude_list_for_each_safe(&rm_dir_list, tmp, bkp) { dir = prelude_list_entry(tmp, struct rm_dir_s, list); ret = rmdir(dir->filename); if ( ret < 0 ) { fprintf(stderr, "could not delete directory %s: %s.\n", dir->filename, strerror(errno)); return -1; } prelude_list_del(&dir->list); free(dir->filename); free(dir); } return 0; } static int del_cb(const char *filename, const struct stat *st, int flag) { int ret; if ( flag != FTW_F ) return (flag == FTW_DNR) ? -1 : add_to_rm_dir_list(filename); ret = unlink(filename); if ( ret < 0 ) fprintf(stderr, "unlink %s: %s.\n", filename, strerror(errno)); return ret; } static int delete_dir(const char *dirname) { int ret; ret = ftw(dirname, del_cb, 10); if ( ret < 0 && errno != ENOENT ) { fprintf(stderr, "traversing '%s' returned an error: %s.\n", dirname, strerror(errno)); return ret; } return flush_rm_dir_list(); } static int delete_profile(prelude_client_profile_t *profile) { int ret; char buf[PATH_MAX]; prelude_client_profile_get_profile_dirname(profile, buf, sizeof(buf)); if ( access(buf, F_OK) < 0 ) { fprintf(stderr, "Could not find profile '%s'.\n", prelude_client_profile_get_name(profile)); return -1; } ret = delete_dir(buf); if ( ret < 0 ) return ret; prelude_client_profile_get_backup_dirname(profile, buf, sizeof(buf)); ret = delete_dir(buf); if ( ret < 0 ) return ret; return 0; } static int rename_cmd(int argc, char **argv) { int ret, i; prelude_string_t *err; const char *sname, *dname; char spath[256], dpath[256]; prelude_client_profile_t *sprofile, *dprofile; i = ret = prelude_option_read(parentopt, NULL, &argc, argv, &err, NULL); if ( ret < 0 ) { prelude_perror(ret, "Option error"); return -1; } if ( argc - i != 2 ) return -2; sname = argv[i]; dname = argv[i + 1]; if ( *sname == '\0' ) { fprintf(stderr, "Empty source profile name provided: '%s'.\n", argv[i]); return -1; } if ( *dname == '\0' ) { fprintf(stderr, "Empty target profile name provided: '%s'.\n", argv[i]); return -1; } ret = prelude_client_profile_new(&sprofile, sname); if ( ret < 0 ) { fprintf(stderr, "Error opening profile '%s': %s\n", sname, prelude_strerror(ret)); return -1; } ret = prelude_client_profile_new(&sprofile, dname); if ( ret == 0 ) { fprintf(stderr, "Could not rename profile '%s' to '%s': profile '%s' already exist.\n", sname, dname, dname); return -1; } ret = _prelude_client_profile_new(&dprofile); prelude_client_profile_set_name(dprofile, dname); prelude_client_profile_get_profile_dirname(sprofile, spath, sizeof(spath)); prelude_client_profile_get_profile_dirname(dprofile, dpath, sizeof(dpath)); ret = rename(spath, dpath); if ( ret < 0 ) { fprintf(stderr, "Error renaming '%s' to '%s': %s.\n", spath, dpath, strerror(errno)); return ret; } prelude_client_profile_get_backup_dirname(sprofile, spath, sizeof(spath)); prelude_client_profile_get_backup_dirname(dprofile, dpath, sizeof(dpath)); ret = rename(spath, dpath); if ( ret < 0 ) { fprintf(stderr, "error renaming '%s' to '%s': %s.\n", spath, dpath, strerror(errno)); return ret; } fprintf(stderr, "Successfully renamed profile '%s' to '%s'.\n", sname, dname); return 0; } static int get_existing_profile_owner(const char *buf) { int ret; struct stat st; ret = stat(buf, &st); if ( ret < 0 ) { if ( errno != ENOENT ) fprintf(stderr, "error stating %s: %s.\n", buf, strerror(errno)); return -1; } if ( ! uid_set ) prelude_client_profile_set_uid(profile, st.st_uid); if ( ! gid_set ) prelude_client_profile_set_gid(profile, st.st_gid); if ( (uid_set && st.st_uid != prelude_client_profile_get_uid(profile)) || (gid_set && st.st_gid != prelude_client_profile_get_gid(profile)) ) return change_permission(st.st_uid, st.st_gid); uid_set = gid_set = TRUE; return 0; } static int add_analyzer(const char *name, uint64_t *analyzerid, gnutls_x509_privkey *key, gnutls_x509_crt *crt, gnutls_x509_crt *ca_crt) { int ret; char buf[PATH_MAX]; prelude_client_profile_set_name(profile, name); prelude_client_profile_get_profile_dirname(profile, buf, sizeof(buf)); ret = get_existing_profile_owner(buf); if ( ret < 0 ) { if ( errno != ENOENT ) return -1; if ( ! uid_set && ! gid_set ) permission_warning(); if ( ! uid_set || ! gid_set ) { if ( ! uid_set ) prelude_client_profile_set_uid(profile, getuid()); if ( ! gid_set ) prelude_client_profile_set_gid(profile, getgid()); } } ret = setup_analyzer_files(profile, analyzerid, key, crt); if ( ret < 0 ) return ret; ret = tls_load_ca_certificate(profile, *key, ca_crt); if ( ret < 0 ) return ret; ret = tls_load_ca_signed_certificate(profile, *key, *ca_crt, crt); if ( ret < 0 ) return ret; return 0; } static int add_cmd(int argc, char **argv) { int ret, i; uint64_t analyzerid; prelude_string_t *err; gnutls_x509_privkey key; gnutls_x509_crt ca_crt, crt; prelude_client_profile_t *testprofile; ret = _prelude_client_profile_new(&profile); setup_permission_options(); setup_tls_options(); i = ret = prelude_option_read(parentopt, NULL, &argc, argv, &err, NULL); if ( ret < 0 ) { prelude_perror(ret, "Option error"); return -1; } if ( argc - ret != 1 ) return -2; if ( *argv[i] == '\0' ) { fprintf(stderr, "Empty profile name provided: '%s'.\n", argv[i]); return -1; } ret = prelude_client_profile_new(&testprofile, argv[i]); if ( ret == 0 ) { fprintf(stderr, "Could not create already existing profile '%s'.\n", argv[i]); return -1; } ret = add_analyzer(argv[i], &analyzerid, &key, &crt, &ca_crt); if ( ret < 0 ) goto out; gnutls_x509_privkey_deinit(key); gnutls_x509_crt_deinit(crt); gnutls_x509_crt_deinit(ca_crt); fprintf(stderr, "Created profile '%s' with analyzerID '%" PRELUDE_PRIu64 "'.\n", argv[i], analyzerid); out: if ( ret < 0 ) delete_profile(profile); return ret; } static int chown_cmd(int argc, char **argv) { int ret, i; prelude_string_t *err; _prelude_client_profile_new(&profile); setup_permission_options(); i = ret = prelude_option_read(parentopt, NULL, &argc, argv, &err, NULL); if ( ret < 0 ) { prelude_perror(ret, "Option error"); return -2; } if ( argc - i < 1 ) return -2; if ( *argv[i] == '\0' ) { fprintf(stderr, "Empty profile name provided: '%s'.\n", argv[i]); return -1; } ret = prelude_client_profile_set_name(profile, argv[i]); if ( ret < 0 ) { fprintf(stderr, "Error loading analyzer profile '%s': %s.\n\n", argv[i], prelude_strerror(ret)); return -1; } if ( ! uid_set && ! gid_set ) { fprintf(stderr, "Option --uid or --gid should be provided to change the profile permission.\n\n"); return -1; } return do_chown(argv[i]); } static int del_cmd(int argc, char **argv) { int ret, i; prelude_string_t *err; i = ret = prelude_option_read(parentopt, NULL, &argc, argv, &err, NULL); if ( ret < 0 ) return ret; if ( argc - i <= 0 ) return -2; ret = _prelude_client_profile_new(&profile); if ( ret < 0 ) { fprintf(stderr, "Error creating analyzer profile: %s.\n", prelude_strerror(ret)); return -1; } for ( ; i < argc; i++ ) { if ( *argv[i] == '\0' ) { fprintf(stderr, "Empty profile name provided: '%s'.\n", argv[i]); return -1; } ret = prelude_client_profile_set_name(profile, argv[i]); if ( ret < 0 ) { fprintf(stderr, "Error setting analyzer profile name: %s.\n", prelude_strerror(ret)); return -1; } ret = delete_profile(profile); if ( ret < 0 ) return ret; fprintf(stderr, "Successfully deleted analyzer profile '%s'.\n", argv[i]); } return 0; } static int register_cmd(int argc, char **argv) { int ret, i; prelude_io_t *fd; uint64_t analyzerid; prelude_string_t *err; gnutls_x509_privkey key; gnutls_x509_crt crt, ca_crt; prelude_connection_permission_t permission_bits; ret = _prelude_client_profile_new(&profile); setup_permission_options(); setup_tls_options(); prelude_option_add(parentopt, NULL, PRELUDE_OPTION_TYPE_CLI, 0, "passwd", NULL, PRELUDE_OPTION_ARGUMENT_REQUIRED, set_passwd, NULL); prelude_option_add(parentopt, NULL, PRELUDE_OPTION_TYPE_CLI, 0, "passwd-file", NULL, PRELUDE_OPTION_ARGUMENT_REQUIRED, set_passwd_file, NULL); i = ret = prelude_option_read(parentopt, NULL, &argc, argv, &err, NULL); if ( ret < 0 ) { prelude_perror(ret, "Option error"); return -1; } if ( argc - i < 3 ) return -2; if ( *argv[i] == '\0' ) { fprintf(stderr, "Empty profile name provided: '%s'.\n", argv[i]); return -1; } ret = prelude_connection_permission_new_from_string(&permission_bits, argv[i + 1]); if ( ret < 0 ) { fprintf(stderr, "could not parse permission: %s.\n", prelude_strerror(ret)); return -1; } ret = prelude_parse_address(strdup(argv[i + 2]), &addr, &port); if ( ret < 0 ) { fprintf(stderr, "error parsing address '%s'.\n", argv[i + 3]); return -1; } ret = add_analyzer(argv[i], &analyzerid, &key, &crt, &ca_crt); if ( ret < 0 ) return -1; fprintf(stderr, "\nYou now need to start \"%s\" registration-server on %s:\n" "example: \"%s registration-server prelude-manager\"\n\n", myprogname, argv[i + 2], myprogname); if ( ! one_shot_passwd ) { ret = ask_one_shot_password(&one_shot_passwd, "the one-shot password provided on %s", argv[i + 2]); if ( ret < 0 ) return -1; } fd = connect_manager(addr, port, one_shot_passwd); memset(one_shot_passwd, 0, strlen(one_shot_passwd)); if ( ! fd ) return -1; ret = tls_request_certificate(profile, fd, key, permission_bits); prelude_io_close(fd); prelude_io_destroy(fd); if ( ret < 0 ) return -1; fprintf(stderr, "Successful registration to %s:%u.\n\n", addr, port); return 0; } static int generate_one_shot_password(char **buf) { int i; char c, *mybuf; struct timeval tv; const int passlen = 8; const char letters[] = "01234567890abcdefghijklmnopqrstuvwxyz"; gettimeofday(&tv, NULL); srand((unsigned int) getpid() * tv.tv_usec); mybuf = malloc(passlen + 1); if ( ! mybuf ) return -1; for ( i = 0; i < passlen; i++ ) { c = letters[rand() % (sizeof(letters) - 1)]; mybuf[i] = c; } mybuf[passlen] = '\0'; *buf = mybuf; fprintf(stderr, "The \"%s\" password will be requested by \"%s register\"\n" "in order to connect. Please remove the quotes before using it.\n\n", mybuf, myprogname); return 0; } static int registration_server_cmd(int argc, char **argv) { int ret, i; uint64_t analyzerid; prelude_string_t *err; gnutls_x509_privkey key; gnutls_x509_crt ca_crt, crt; ret = _prelude_client_profile_new(&profile); prelude_option_add(parentopt, NULL, PRELUDE_OPTION_TYPE_CLI, 'k', "keepalive", NULL, PRELUDE_OPTION_ARGUMENT_NONE, set_server_keepalive, NULL); prelude_option_add(parentopt, NULL, PRELUDE_OPTION_TYPE_CLI, 0, "passwd", NULL, PRELUDE_OPTION_ARGUMENT_REQUIRED, set_passwd, NULL); prelude_option_add(parentopt, NULL, PRELUDE_OPTION_TYPE_CLI, 0, "passwd-file", NULL, PRELUDE_OPTION_ARGUMENT_REQUIRED, set_passwd_file, NULL); prelude_option_add(parentopt, NULL, PRELUDE_OPTION_TYPE_CLI, 'p', "prompt", NULL, PRELUDE_OPTION_ARGUMENT_NONE, set_prompt_passwd, NULL); prelude_option_add(parentopt, NULL, PRELUDE_OPTION_TYPE_CLI, 'n', "no-confirm", NULL, PRELUDE_OPTION_ARGUMENT_NONE, set_server_no_confirm, NULL); prelude_option_add(parentopt, NULL, PRELUDE_OPTION_TYPE_CLI, 'l', "listen", NULL, PRELUDE_OPTION_ARGUMENT_REQUIRED, set_server_listen_address, NULL); setup_permission_options(); setup_tls_options(); i = ret = prelude_option_read(parentopt, NULL, &argc, argv, &err, NULL); if ( ret < 0 ) { prelude_perror(ret, "Option error"); return -1; } if ( argc - i < 1 ) return -2; if ( *argv[i] == '\0' ) { fprintf(stderr, "Empty profile name provided: '%s'.\n", argv[i]); return -1; } if ( pass_from_stdin ) fprintf(stderr, "Warning: registration confirmation disabled as a result of reading from a pipe.\n\n"); if ( prompt_passwd && one_shot_passwd ) { fprintf(stderr, "Options --prompt, --passwd, and --passwd-file are incompatible.\n\n"); return -1; } ret = add_analyzer(argv[i], &analyzerid, &key, &crt, &ca_crt); if ( ret < 0 ) return -1; if ( prompt_passwd ) { fprintf(stderr, "\n Please enter registration one-shot password.\n" " This password will be requested by \"%s\" in order to connect.\n\n", myprogname); ret = ask_one_shot_password(&one_shot_passwd, ""); } else if ( ! one_shot_passwd ) ret = generate_one_shot_password(&one_shot_passwd); if ( ret < 0 ) return -1; ret = server_create(profile, addr, port, server_keepalive, one_shot_passwd, key, ca_crt, crt); memset(one_shot_passwd, 0, strlen(one_shot_passwd)); gnutls_x509_privkey_deinit(key); gnutls_x509_crt_deinit(crt); gnutls_x509_crt_deinit(ca_crt); return ret; } static int revoke_cmd(int argc, char **argv) { int ret, i; char *eptr = NULL; uint64_t analyzerid; prelude_string_t *err; gnutls_x509_privkey key; gnutls_x509_crt ca_crt, crt; i = ret = prelude_option_read(parentopt, NULL, &argc, argv, &err, NULL); if ( ret < 0 ) { prelude_perror(ret, "Option error"); return -1; } if ( argc - i < 2 ) return -2; if ( *argv[i] == '\0' ) { fprintf(stderr, "Empty profile name provided: '%s'.\n", argv[i]); return -1; } ret = prelude_client_profile_new(&profile, argv[i]); if ( ret < 0 ) { fprintf(stderr, "Error opening profile '%s': %s.\n", argv[i], prelude_strerror(ret)); return -1; } key = tls_load_privkey(profile); if ( ! key ) return -1; ret = tls_load_ca_certificate(profile, key, &ca_crt); if ( ret < 0 ) return -1; ret = tls_load_ca_signed_certificate(profile, key, ca_crt, &crt); if ( ret < 0 ) return -1; analyzerid = strtoull(argv[i + 1], &eptr, 0); if ( eptr != argv[i + 1] + strlen(argv[i + 1]) ) { fprintf(stderr, "Invalid analyzerid: '%s'.\n", argv[i + 1]); return -1; } ret = tls_revoke_analyzer(profile, key, crt, analyzerid); if ( ret == 0 ) fprintf(stderr, "AnalyzerID '%s' already revoked from profile '%s'.\n", argv[i + 1], argv[i]); else if ( ret == 1 ) fprintf(stderr, "Successfully revoked analyzerID '%s' from profile '%s'.\n", argv[i + 1], argv[i]); return ret; } static int read_messages(const char *filename, prelude_io_t *io, int (*process_cb)(idmef_message_t *msg, void *data), void *data) { int ret, i = 0; prelude_msg_t *msg; idmef_message_t *idmef; do { msg = NULL; ret = prelude_msg_read(&msg, io); if ( ret < 0 ) { if ( prelude_error_get_code(ret) == PRELUDE_ERROR_EOF ) return 0; fprintf(stderr, "error reading message from '%s': %s.\n", filename, prelude_strerror(ret)); return -1; } if ( offset != -1 && i++ < offset ) continue; if ( count != -1 && count-- == 0 ) return 0; ret = idmef_message_new(&idmef); if ( ret < 0 ) { fprintf(stderr, "error creating IDMEF root message: %s.\n", prelude_strerror(ret)); prelude_msg_destroy(msg); return -1; } ret = idmef_message_read(idmef, msg); if ( ret < 0 ) { fprintf(stderr, "error decoding message: %s.\n", prelude_strerror(ret)); prelude_msg_destroy(msg); idmef_message_destroy(idmef); return -1; } ret = process_cb(idmef, data); idmef_message_destroy(idmef); prelude_msg_destroy(msg); } while ( ret >= 0 ); return ret; } static int print_cb(idmef_message_t *idmef, void *data) { idmef_message_print(idmef, data); return 0; } static int print_cmd(int argc, char **argv) { FILE *fd; int i, ret; prelude_string_t *str; prelude_io_t *io, *out; setup_read_options(); i = ret = prelude_option_read(parentopt, NULL, &argc, argv, &str, NULL); if ( ret < 0 ) { prelude_perror(ret, "Option error"); return -1; } if ( argc - i < 1 ) return -2; ret = prelude_io_new(&io); if ( ret < 0 ) return ret; ret = prelude_io_new(&out); if ( ret < 0 ) return ret; prelude_io_set_file_io(out, stdout); for ( ; i < argc; i++ ) { fd = fopen(argv[i], "r"); if ( ! fd ) { fprintf(stderr, "Error opening '%s' for reading: %s.\n", argv[i], strerror(errno)); return -1; } prelude_io_set_file_io(io, fd); ret = read_messages(argv[i], io, print_cb, out); prelude_io_close(io); if ( ret < 0 ) break; } prelude_io_destroy(out); prelude_io_destroy(io); return ret; } static int send_cb(idmef_message_t *idmef, void *data) { prelude_client_send_idmef(data, idmef); return 0; } static int send_cmd(int argc, char **argv) { FILE *fd; int ret, i; prelude_io_t *io; prelude_string_t *str; prelude_client_t *client; prelude_connection_pool_t *pool; prelude_connection_pool_flags_t flags; setup_read_options(); i = ret = prelude_option_read(parentopt, NULL, &argc, argv, &str, NULL); if ( ret < 0 ) { prelude_perror(ret, "Option error"); return -1; } if ( argc - i < 3 ) return -2; if ( *argv[i] == '\0' ) { fprintf(stderr, "Empty profile name provided: '%s'.\n", argv[i]); return -1; } ret = prelude_io_new(&io); if ( ret < 0 ) return ret; ret = prelude_client_new(&client, argv[i]); if ( ret < 0 ) return ret; flags = prelude_client_get_flags(client); flags &= ~PRELUDE_CLIENT_FLAGS_HEARTBEAT; prelude_client_set_flags(client, flags); pool = prelude_client_get_connection_pool(client); flags = prelude_connection_pool_get_flags(pool); ret = prelude_client_init(client); flags &= ~(PRELUDE_CONNECTION_POOL_FLAGS_RECONNECT|PRELUDE_CONNECTION_POOL_FLAGS_FAILOVER); prelude_connection_pool_set_flags(pool, flags); prelude_connection_pool_set_connection_string(pool, argv[i + 1]); ret = prelude_client_start(client); if ( ret < 0 ) { fprintf(stderr, "Error starting prelude-client: %s.\n", prelude_strerror(ret)); return ret; } for ( i += 2; i < argc; i++ ) { fd = fopen(argv[i], "r"); if ( ! fd ) { fprintf(stderr, "error opening '%s' for reading: %s.\n", argv[i], strerror(errno)); return -1; } prelude_io_set_file_io(io, fd); ret = read_messages(argv[i], io, send_cb, client); prelude_io_close(io); if ( ret < 0 ) break; } prelude_client_destroy(client, PRELUDE_CLIENT_EXIT_STATUS_SUCCESS); return ret; } static PRELUDE_LIST(print_list); typedef struct { prelude_list_t list; unsigned int sub; char *name; char *uid; char *gid; char *analyzerid; char *permission; char *tanalyzerid; } print_entry_t; static void print_info(const char *info, unsigned int pad) { unsigned int i; size_t len = strlen(info); printf("%s", info); if ( pad < len ) { if ( pad != 0 ) putchar(' '); return; } pad -= strlen(info); for ( i = 0; i < pad; i++ ) putchar(' '); } static void print_add(unsigned int sub, const char *name, const char *uid, const char *gid, const char *analyzerid, const char *perm, const char *tanalyzerid) { print_entry_t *ent = malloc(sizeof(*ent)); ent->sub = sub; ent->name = strdup(name); ent->uid = strdup(uid); ent->gid = strdup(gid); ent->analyzerid = strdup(analyzerid); ent->permission = strdup(perm); ent->tanalyzerid = strdup(tanalyzerid); prelude_list_add_tail(&print_list, &ent->list); } static void print_added(void) { unsigned int i; print_entry_t *ent; prelude_list_t *tmp, *bkp; unsigned int mtotal = 0, mpartial = 0; unsigned int mlen_name = 0, mlen_uid = 0, mlen_gid = 0, mlen_analyzerid = 0, mlen_tanalyzerid = 0, mlen_perm = 0; prelude_list_for_each(&print_list, tmp) { ent = prelude_list_entry(tmp, print_entry_t, list); mlen_name = MAX(mlen_name, strlen(ent->name)); mlen_uid = MAX(mlen_uid, strlen(ent->uid)); mlen_gid = MAX(mlen_gid, strlen(ent->gid)); mlen_analyzerid = MAX(mlen_analyzerid, strlen(ent->analyzerid)); mlen_tanalyzerid = MAX(mlen_tanalyzerid, strlen(ent->tanalyzerid)); mlen_perm = MAX(mlen_perm, strlen(ent->permission)); } print_info("Profile", ++mlen_name); if ( detailed_listing ) { print_info("UID", ++mlen_uid); print_info("GID", ++mlen_gid); print_info("AnalyzerID", ++mlen_analyzerid); mtotal += mlen_uid + mlen_gid + mlen_analyzerid; mpartial = mlen_uid + mlen_gid + mlen_analyzerid; } print_info("Permission", ++mlen_perm); printf("Issuer AnalyzerID\n"); mpartial += mlen_name; mtotal += mlen_name + mlen_perm + ++mlen_tanalyzerid; for ( i = 0; i < mtotal; i++) putchar('-'); putchar('\n'); prelude_list_for_each_safe(&print_list, tmp, bkp) { ent = prelude_list_entry(tmp, print_entry_t, list); if ( ent->sub > 0 ) { print_info("", mpartial); } else { print_info(ent->name, mlen_name); if ( detailed_listing ) { print_info(ent->uid, mlen_uid); print_info(ent->gid, mlen_gid); print_info(ent->analyzerid, mlen_analyzerid); } } print_info(ent->permission, mlen_perm); printf("%s\n", ent->tanalyzerid); free(ent->name); free(ent->uid); free(ent->gid); free(ent->analyzerid); free(ent->permission); free(ent->tanalyzerid); prelude_list_del(&ent->list); free(ent); } } static int list_cmd(int argc, char **argv) { FILE *fd; DIR *dir; size_t size; struct stat st; struct dirent *dh; #if !((defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__) struct group *gr; struct passwd *pw; #endif gnutls_datum data; prelude_string_t *str; unsigned int cert_max, i; int ret, permission; gnutls_x509_crt certs[1024]; char dirname[PATH_MAX]; char buf[1024], analyzerid[128], uidbuf[128] = { 0 }, gidbuf[128] = { 0 }; setup_list_options(); i = ret = prelude_option_read(parentopt, NULL, &argc, argv, &str, NULL); prelude_client_profile_get_profile_dirname(NULL, dirname, sizeof(dirname)); dir = opendir(dirname); if ( ! dir ) { fprintf(stderr, "could not open '%s': %s.\n", dirname, strerror(errno)); return -1; } ret = prelude_string_new(&str); if ( ret < 0 ) { closedir(dir); return ret; } while ( (dh = readdir(dir)) ) { if ( strcmp(dh->d_name, ".") == 0 || strcmp(dh->d_name, "..") == 0 ) continue; snprintf(buf, sizeof(buf), "%s/%s", dirname, dh->d_name); ret = stat(buf, &st); if ( ret < 0 ) { if ( errno != EACCES ) fprintf(stderr, "error stating '%s': %s.\n", buf, strerror(errno)); continue; } #if !((defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__) pw = getpwuid(st.st_uid); if ( ! pw ) snprintf(uidbuf, sizeof(uidbuf), "%d", (int) st.st_uid); else snprintf(uidbuf, sizeof(uidbuf), "%s", pw->pw_name); gr = getgrgid(st.st_gid); if ( ! gr ) snprintf(gidbuf, sizeof(gidbuf), "%d", (int) st.st_gid); else snprintf(gidbuf, sizeof(gidbuf), "%s", gr->gr_name); #endif snprintf(buf, sizeof(buf), "%s/%s/analyzerid", dirname, dh->d_name); fd = fopen(buf, "r"); if ( ! fd ) snprintf(analyzerid, sizeof(analyzerid), "n/a"); else { if ( (! fgets(analyzerid, sizeof(analyzerid), fd)) || (size = strlen(analyzerid)) <= 0 ) { fprintf(stderr, "failed to read analyzerID.\n"); continue; } fclose(fd); analyzerid[size - 1] = 0; } snprintf(buf, sizeof(buf), "%s/%s/client.keycrt", dirname, dh->d_name); ret = _prelude_load_file(buf, &data.data, &size); if ( ret < 0 ) { print_add(0, dh->d_name, uidbuf, gidbuf, analyzerid, "n/a", "n/a"); continue; } data.size = (unsigned int) size; cert_max = sizeof(certs) / sizeof(*certs); ret = _prelude_tls_crt_list_import(certs, &cert_max, &data, GNUTLS_X509_FMT_PEM); if ( ret < 0 ) { fprintf(stderr, "error importing certificate listing: %s.\n", gnutls_strerror(ret)); continue; } for ( i = 0; i < cert_max; i++ ) { size = sizeof(buf); ret = gnutls_x509_crt_get_dn_by_oid(certs[i], GNUTLS_OID_X520_COMMON_NAME, 0, 0, buf, &size); if ( ret < 0 ) { fprintf(stderr, "error reading certificate CN: %s.\n", gnutls_strerror(ret)); continue; } ret = sscanf(buf, "%d", (int *) &permission); if ( ret != 1 ) continue; size = sizeof(buf); ret = gnutls_x509_crt_get_issuer_dn_by_oid(certs[i], GNUTLS_OID_X520_DN_QUALIFIER, 0, 0, buf, &size); if ( ret < 0 ) { fprintf(stderr, "error reading certificate DN: %s.\n", gnutls_strerror(ret)); continue; } prelude_connection_permission_to_string(permission, str); print_add(i, dh->d_name, uidbuf, gidbuf, analyzerid, prelude_string_get_string(str), buf); prelude_string_clear(str); gnutls_x509_crt_deinit(certs[i]); } } closedir(dir); prelude_string_destroy(str); print_added(); return 0; } static const struct cmdtbl tbl[] = { { "add", 1, add_cmd, print_add_help }, { "chown", 1, chown_cmd, print_chown_help }, { "del", 1, del_cmd, print_delete_help }, { "list", 0, list_cmd, print_list_help }, { "print", 1, print_cmd, print_print_help }, { "rename", 2, rename_cmd, print_rename_help }, { "register", 3, register_cmd, print_register_help }, { "registration-server", 1, registration_server_cmd, print_registration_server_help }, { "revoke", 2, revoke_cmd, print_revoke_help }, { "send", 3, send_cmd, print_send_help }, }; static int print_help(void) { unsigned int i; fprintf(stderr, "\nUsage %s [options] [args]\n", myprogname); fprintf(stderr, "Type \"%s \" for help on a specific subcommand.\n\n", myprogname); fprintf(stderr, "Available subcommands:\n"); for ( i = 0; i < sizeof(tbl) / sizeof(*tbl); i++ ) fprintf(stderr, " %s\n", tbl[i].cmd); exit(1); } static int print_detailed_help(prelude_option_t *opt, const char *optarg, prelude_string_t *err, void *context) { unsigned int i; for ( i = 0; i < sizeof(tbl) / sizeof(*tbl); i++ ) { if ( strcmp(arg_command, tbl[i].cmd) == 0 ) { tbl[i].help_func(); exit(0); } } print_help(); exit(0); } int main(int argc, char **argv) { int ret = -1; unsigned int i; const char *slash; slash = strrchr(argv[0], '/'); myprogname = slash ? slash + 1 : argv[0]; if ( argc < 2 ) print_help(); arg_command = argv[1]; prelude_init(NULL, NULL); ret = prelude_option_new(NULL, &parentopt); prelude_option_add(parentopt, NULL, PRELUDE_OPTION_TYPE_CLI, 'h', "help", NULL, PRELUDE_OPTION_ARGUMENT_NONE, print_detailed_help, NULL); ret = gnutls_global_init(); if ( ret < 0 ) { fprintf(stderr, "TLS initialization failed: %s", gnutls_strerror(ret)); return -1; } ret = -1; #ifdef NEED_GNUTLS_EXTRA gnutls_global_init_extra(); #endif #if !((defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__) signal(SIGPIPE, SIG_IGN); #endif umask(S_IRWXO); for ( i = 0; i < sizeof(tbl) / sizeof(*tbl); i++ ) { if ( strcmp(tbl[i].cmd, argv[1]) != 0 ) continue; ret = tbl[i].cmd_func(argc - 1, &argv[1]); if ( ret < 0 ) { if ( ret == -2 ) tbl[i].help_func(); return ret; } break; } gnutls_global_deinit(); if ( i == sizeof(tbl) / sizeof(*tbl) ) print_help(); return ret; } libprelude-1.0.0/prelude-admin/server.h0000664000076400007640000000213711202225026014772 00000000000000/***** * * Copyright (C) 2004, 2005 PreludeIDS Technologies. All Rights Reserved. * Author: Yoann Vandoorselaere * * This file is part of the Prelude library. * * 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; see the file COPYING. If not, write to * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. * *****/ int server_create(prelude_client_profile_t *cp, const char *addr, unsigned int port, prelude_bool_t keepalive, const char *pass, gnutls_x509_privkey key, gnutls_x509_crt cacrt, gnutls_x509_crt crt); libprelude-1.0.0/prelude-admin/prelude-adduser.in0000664000076400007640000000051411202225026016725 00000000000000#!/bin/sh # @configure_input@ prefix=@prefix@ exec_prefix=@exec_prefix@ bindir=@bindir@ libdir=@libdir@ datarootdir=@datarootdir@ datadir=@datadir@ echo "*" echo "* WARNING: prelude-adduser is deprecated and will be removed in the future." echo "* WARNING: Please use 'prelude-admin' instead." echo "*" $bindir/prelude-admin $@ libprelude-1.0.0/prelude-admin/server.c0000664000076400007640000003210611330537773015005 00000000000000/***** * * Copyright (C) 2004, 2005 PreludeIDS Technologies. All Rights Reserved. * Author: Yoann Vandoorselaere * * This file is part of the Prelude library. * * 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; see the file COPYING. If not, write to * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. * *****/ #include "config.h" #include "libmissing.h" #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include "prelude-client.h" #include "prelude-error.h" #include "common.h" #include "server.h" #include "tls-register.h" #define ANON_DH_BITS 1024 static const char *one_shot_passwd; static gnutls_anon_server_credentials anoncred; #ifdef GNUTLS_SRP_ENABLED static gnutls_srp_server_credentials srpcred; #endif static int anon_check_passwd(prelude_io_t *fd) { ssize_t ret; const char *result; unsigned char *rbuf; ret = prelude_io_read_delimited(fd, &rbuf); if ( ret < 0 ) { fprintf(stderr, "error receiving authentication result: %s.\n", prelude_strerror(ret)); return -1; } if ( rbuf[ret - 1] != 0 ) { fprintf(stderr, "invalid password token received.\n"); return -1; } if ( strcmp((char *) rbuf, one_shot_passwd) == 0 ) { result = "OK"; } else { result = "NOK"; fprintf(stderr, "Anonymous authentication one-shot password check failed.\n"); } free(rbuf); ret = prelude_io_write_delimited(fd, result, strlen(result)); if ( ret < 0 ) { fprintf(stderr, "error sending authentication token: %s.\n", prelude_strerror(ret)); return -1; } return *result == 'O' ? 0 : -1; } static inline gnutls_transport_ptr fd_to_ptr(int fd) { union { gnutls_transport_ptr ptr; int fd; } data; data.fd = fd; return data.ptr; } static inline int ptr_to_fd(gnutls_transport_ptr ptr) { union { gnutls_transport_ptr ptr; int fd; } data; data.ptr = ptr; return data.fd; } static ssize_t tls_pull(gnutls_transport_ptr fd, void *buf, size_t count) { return read(ptr_to_fd(fd), buf, count); } static ssize_t tls_push(gnutls_transport_ptr fd, const void *buf, size_t count) { return write(ptr_to_fd(fd), buf, count); } static gnutls_session new_tls_session(int sock) { int ret; gnutls_session session; const int kx_priority[] = { GNUTLS_KX_ANON_DH, #ifdef GNUTLS_SRP_ENABLED GNUTLS_KX_SRP, GNUTLS_KX_SRP_DSS, GNUTLS_KX_SRP_RSA, #endif 0 }; gnutls_init(&session, GNUTLS_SERVER); gnutls_set_default_priority(session); gnutls_kx_set_priority(session, kx_priority); #ifdef GNUTLS_SRP_ENABLED gnutls_credentials_set(session, GNUTLS_CRD_SRP, srpcred); gnutls_certificate_server_set_request(session, GNUTLS_CERT_IGNORE); #endif gnutls_credentials_set(session, GNUTLS_CRD_ANON, anoncred); gnutls_transport_set_ptr(session, fd_to_ptr(sock)); gnutls_transport_set_pull_function(session, tls_pull); gnutls_transport_set_push_function(session, tls_push); ret = gnutls_handshake(session); if ( ret < 0 ) { fprintf(stderr, "GnuTLS handshake failed: %s.\n", gnutls_strerror(ret)); gnutls_alert_send_appropriate(session, ret); return NULL; } return session; } static int handle_client_connection(const char *srcinfo, prelude_client_profile_t *cp, prelude_io_t *fd, gnutls_x509_privkey key, gnutls_x509_crt cacrt, gnutls_x509_crt crt) { gnutls_session session; session = new_tls_session(prelude_io_get_fd(fd)); if ( ! session ) return -1; prelude_io_set_tls_io(fd, session); if ( gnutls_auth_get_type(session) == GNUTLS_CRD_ANON && anon_check_passwd(fd) < 0 ) return -1; return tls_handle_certificate_request(srcinfo, cp, fd, key, cacrt, crt); } static int process_event(prelude_client_profile_t *cp, int server_sock, prelude_io_t *fd, gnutls_x509_privkey key, gnutls_x509_crt cacrt, gnutls_x509_crt crt) { char buf[512]; void *inaddr; socklen_t len; int ret, csock; union { struct sockaddr sa; #ifndef HAVE_IPV6 struct sockaddr_in addr; # define ADDR_PORT(x) (x).sin_port #else struct sockaddr_in6 addr; # define ADDR_PORT(x) (x).sin6_port #endif } addr; len = sizeof(addr.addr); csock = accept(server_sock, &addr.sa, &len); if ( csock < 0 ) { fprintf(stderr, "accept returned an error: %s.\n", strerror(errno)); return -1; } inaddr = prelude_sockaddr_get_inaddr(&addr.sa); if ( ! inaddr ) return -1; inet_ntop(addr.sa.sa_family, inaddr, buf, sizeof(buf)); snprintf(buf + strlen(buf), sizeof(buf) - strlen(buf), ":%u", ntohs(ADDR_PORT(addr.addr))); prelude_io_set_sys_io(fd, csock); fprintf(stderr, "\nConnection from %s...\n", buf); ret = handle_client_connection("", cp, fd, key, cacrt, crt); if ( ret == 0 ) fprintf(stderr, "%s successfully registered.\n", buf); prelude_io_close(fd); return ret; } static int wait_connection(prelude_client_profile_t *cp, int sock, struct pollfd *pfd, size_t size, int keepalive, gnutls_x509_privkey key, gnutls_x509_crt cacrt, gnutls_x509_crt crt) { size_t i; prelude_io_t *fd; int ret, active_fd; ret = prelude_io_new(&fd); if ( ret < 0 ) { fprintf(stderr, "%s: error creating a new IO object: %s.\n", prelude_strsource(ret), prelude_strerror(ret)); return -1; } do { active_fd = poll(pfd, size, -1); if ( active_fd < 0 ) { if ( errno != EINTR ) fprintf(stderr, "poll error : %s.\n", strerror(errno)); return -1; } for ( i = 0; i < size && active_fd > 0; i++ ) { if ( pfd[i].revents & POLLIN ) { active_fd--; ret = process_event(cp, pfd[i].fd, fd, key, cacrt, crt); } } } while ( keepalive || ret < 0 ); prelude_io_destroy(fd); return ret; } static int setup_server(const char *addr, unsigned int port, struct pollfd *pfd, size_t *size) { size_t i = 0; char buf[1024]; struct addrinfo hints, *ai, *ai_start; int sock, ret, on = 1, prev_family = PF_UNSPEC; snprintf(buf, sizeof(buf), "%u", port); memset(&hints, 0, sizeof(hints)); hints.ai_flags = AI_PASSIVE; hints.ai_socktype = SOCK_STREAM; hints.ai_protocol = IPPROTO_TCP; hints.ai_family = PF_UNSPEC; #ifdef AI_ADDRCONFIG hints.ai_flags |= AI_ADDRCONFIG; #endif ret = getaddrinfo(addr, buf, &hints, &ai); if ( ret != 0 ) { fprintf(stderr, "could not resolve %s: %s.\n", addr ? addr : "", (ret == EAI_SYSTEM) ? strerror(errno) : gai_strerror(ret)); return -1; } for ( ai_start = ai; ai && i < *size; ai = ai->ai_next ) { inet_ntop(ai->ai_family, prelude_sockaddr_get_inaddr(ai->ai_addr), buf, sizeof(buf)); fprintf(stderr, "Waiting for peers install request on %s:%u...\n", buf, ntohs(((struct sockaddr_in *) ai->ai_addr)->sin_port)); sock = socket(ai->ai_family, ai->ai_socktype, ai->ai_protocol); if ( sock < 0 ) { fprintf(stderr, "could not open socket for '%s': %s.\n", buf, strerror(errno)); break; } ret = setsockopt(sock, SOL_SOCKET, SO_REUSEADDR, (void *) &on, sizeof(int)); if ( ret < 0 ) fprintf(stderr, "could not set SO_REUSEADDR: %s.\n", strerror(errno)); ret = bind(sock, ai->ai_addr, ai->ai_addrlen); if ( ret < 0 ) { close(sock); /* * More information on this at: * http://lists.debian.org/debian-ipv6/2001/01/msg00031.html */ if ( errno == EADDRINUSE && ! addr && prev_family != PF_UNSPEC && ai->ai_family != prev_family ) { ret = 0; continue; } fprintf(stderr, "could not bind to '%s': %s.\n", buf, strerror(errno)); break; } ret = listen(sock, 1); if ( ret < 0 ) { close(sock); fprintf(stderr, "could not listen on '%s': %s.\n", buf, strerror(errno)); break; } pfd[i].fd = sock; pfd[i].events = POLLIN; prev_family = ai->ai_family; i++; } if ( i == 0 ) { fprintf(stderr, "could not find any address to listen on.\n"); return -1; } freeaddrinfo(ai_start); *size = i; return ret; } #ifdef GNUTLS_SRP_ENABLED static int copy_datum(gnutls_datum *dst, const gnutls_datum *src) { dst->size = src->size; dst->data = gnutls_malloc(dst->size); if ( ! dst->data ) { fprintf(stderr, "memory exhausted.\n"); return -1; } memcpy(dst->data, src->data, dst->size); return 0; } static int srp_callback(gnutls_session session, const char *username, gnutls_datum *salt, gnutls_datum *verifier, gnutls_datum *generator, gnutls_datum *prime) { int ret; if ( strcmp(username, "prelude-adduser") != 0 ) return -1; salt->size = 4; salt->data = gnutls_malloc(4); if ( ! salt->data ) { fprintf(stderr, "memory exhausted.\n"); return -1; } gcry_randomize(salt->data, salt->size, GCRY_WEAK_RANDOM); ret = copy_datum(generator, &gnutls_srp_1024_group_generator); if ( ret < 0 ) return -1; ret = copy_datum(prime, &gnutls_srp_1024_group_prime); if ( ret < 0 ) return -1; return gnutls_srp_verifier(username, one_shot_passwd, salt, generator, prime, verifier); } #endif int server_create(prelude_client_profile_t *cp, const char *addr, unsigned int port, prelude_bool_t keepalive, const char *pass, gnutls_x509_privkey key, gnutls_x509_crt cacrt, gnutls_x509_crt crt) { int sock; size_t size; struct pollfd pfd[128]; gnutls_dh_params dh_params; #ifdef GNUTLS_SRP_ENABLED int ret; ret = gnutls_srp_allocate_server_credentials(&srpcred); if ( ret < 0 ) { fprintf(stderr, "error creating SRP credentials: %s.\n", gnutls_strerror(ret)); return -1; } gnutls_srp_set_server_credentials_function(srpcred, srp_callback); #endif one_shot_passwd = pass; gnutls_anon_allocate_server_credentials(&anoncred); fprintf(stderr, "Generating %d bits Diffie-Hellman key for anonymous authentication...", ANON_DH_BITS); gnutls_dh_params_init(&dh_params); gnutls_dh_params_generate2(dh_params, ANON_DH_BITS); gnutls_anon_set_server_dh_params(anoncred, dh_params); fprintf(stderr, "\n"); size = sizeof(pfd) / sizeof(*pfd); sock = setup_server(addr, port, pfd, &size); if ( sock < 0 ) return -1; wait_connection(cp, sock, pfd, size, keepalive, key, cacrt, crt); #ifdef GNUTLS_SRP_ENABLED gnutls_srp_free_server_credentials(srpcred); #endif gnutls_anon_free_server_credentials(anoncred); return 0; } libprelude-1.0.0/prelude-admin/tls-register.c0000664000076400007640000007431111325615276016126 00000000000000/***** * * Copyright (C) 2004-2005,2006,2007 PreludeIDS Technologies. All Rights Reserved. * Author: Yoann Vandoorselaere * * This file is part of the Prelude library. * * 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; see the file COPYING. If not, write to * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. * *****/ #include "libmissing.h" #include #include #include #include #include #include #include #include #include #include #include #include "prelude-client.h" #include "prelude-error.h" #include "tls-register.h" #include "common.h" #if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__ # define fchown(x, y, z) (0) #endif extern int server_confirm; extern int generated_key_size; extern int authority_certificate_lifetime; extern int generated_certificate_lifetime; static int cmp_certificate_dn(gnutls_x509_crt crt, uint64_t wanted_dn, uint64_t wanted_issuer_dn) { int ret; char buf[128]; size_t size = sizeof(buf); ret = gnutls_x509_crt_get_dn_by_oid(crt, GNUTLS_OID_X520_DN_QUALIFIER, 0, 0, buf, &size); if ( ret < 0 ) { fprintf(stderr, "couldn't get certificate issue dn: %s.\n", gnutls_strerror(ret)); return -1; } if ( strtoull(buf, NULL, 10) != wanted_dn ) return -1; size = sizeof(buf); ret = gnutls_x509_crt_get_issuer_dn_by_oid(crt, GNUTLS_OID_X520_DN_QUALIFIER, 0, 0, buf, &size); if ( ret < 0 ) { fprintf(stderr, "couldn't get certificate issue dn: %s.\n", gnutls_strerror(ret)); return -1; } if ( strtoull(buf, NULL, 10) != wanted_issuer_dn ) return -1; return 0; } static char *const_to_char(const char *ptr) { union { char *rw; const char *ro; } hack; hack.ro = ptr; return hack.rw; } static int remove_old_certificate(const char *filename, uint64_t dn, uint64_t issuer_dn) { int ret; char buf[65536]; unsigned char *data, *datap; size_t size; FILE *fd; gnutls_datum datum; gnutls_x509_crt crt; prelude_string_t *out; ret = _prelude_load_file(filename, &data, &size); if ( ret < 0 ) { if ( prelude_error_get_code(ret) == PRELUDE_ERROR_ENOENT ) return 0; fprintf(stderr, "error loading '%s': %s.\n", filename, prelude_strerror(ret)); return ret; } ret = prelude_string_new(&out); if ( ret < 0 ) { _prelude_unload_file(data, size); return ret; } unlink(filename); fd = fopen(filename, "w"); if ( ! fd ) { fprintf(stderr, "error opening '%s' for writing: %s.\n", filename, strerror(errno)); _prelude_unload_file(data, size); prelude_string_destroy(out); return -1; } datap = data; while ( 1 ) { ret = sscanf((const char *) data, "-----BEGIN CERTIFICATE-----\n%65535[^-]%*[^\n]\n", buf); if ( ret != 1 ) { ret = 0; break; } prelude_string_sprintf(out, "-----BEGIN CERTIFICATE-----\n%s-----END CERTIFICATE-----\n", buf); datum.size = prelude_string_get_len(out); datum.data = (unsigned char *) const_to_char(prelude_string_get_string(out)); data += datum.size; ret = gnutls_x509_crt_init(&crt); if ( ret < 0 ) break; ret = gnutls_x509_crt_import(crt, &datum, GNUTLS_X509_FMT_PEM); if ( ret < 0 ) { fprintf(stderr, "error importing certificate: %s\n", gnutls_strerror(ret)); break; } ret = cmp_certificate_dn(crt, dn, issuer_dn); if ( ret == 0 ) prelude_log_debug(1, "Removing old certificate with subject=%" PRELUDE_PRIu64 " issuer=%" PRELUDE_PRIu64 ".\n", dn, issuer_dn); else { if ( fwrite(datum.data, 1, datum.size, fd) != datum.size ) fprintf(stderr, "error writing certificate: %s\n", strerror(errno)); } prelude_string_clear(out); gnutls_x509_crt_deinit(crt); } fclose(fd); _prelude_unload_file(datap, size); prelude_string_destroy(out); return ret; } static int remove_old(const char *filename, unsigned char *buf, size_t size) { int ret; char out[512]; gnutls_datum data; gnutls_x509_crt crt; uint64_t dn, issuer_dn; data.size = size; data.data = buf; gnutls_x509_crt_init(&crt); ret = gnutls_x509_crt_import(crt, &data, GNUTLS_X509_FMT_PEM); if ( ret < 0 ) { fprintf(stderr, "error importing certificate: %s.\n", gnutls_strerror(ret)); goto err; } size = sizeof(out); ret = gnutls_x509_crt_get_issuer_dn_by_oid(crt, GNUTLS_OID_X520_DN_QUALIFIER, 0, 0, out, &size); if ( ret < 0 ) { fprintf(stderr, "error reading issuer dn: %s.\n", gnutls_strerror(ret)); goto err; } issuer_dn = strtoull(out, NULL, 10); size = sizeof(out); ret = gnutls_x509_crt_get_dn_by_oid(crt, GNUTLS_OID_X520_DN_QUALIFIER, 0, 0, out, &size); if ( ret < 0 ) { fprintf(stderr, "error reading issuer dn: %s.\n", gnutls_strerror(ret)); goto err; } dn = strtoull(out, NULL, 10); ret = remove_old_certificate(filename, dn, issuer_dn); if ( ret < 0 ) return ret; err: gnutls_x509_crt_deinit(crt); return ret; } static int safe_close(int fd) { int ret; do { ret = close(fd); } while ( ret < 0 && errno == EINTR ); return ret; } static ssize_t safe_write(int fd, const unsigned char *buf, size_t size) { ssize_t ret; do { ret = write(fd, buf, size); } while ( ret < 0 && errno == EINTR ); return ret; } static int save_buf(const char *filename, prelude_uid_t uid, prelude_gid_t gid, const unsigned char *buf, size_t size) { ssize_t sret; int fd, ret, flags = 0; #if !((defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__) flags |= S_IRGRP; #endif fd = open(filename, O_CREAT|O_WRONLY|O_APPEND, S_IRUSR|S_IWUSR|flags); if ( fd < 0 ) { fprintf(stderr, "couldn't open %s for writing: %s.\n", filename, strerror(errno)); return -1; } ret = fchown(fd, uid, gid); if ( ret < 0 ) { fprintf(stderr, "could not set %s owner to UID %d GID %d: %s.\n", filename, (int) uid, (int) gid, strerror(errno)); safe_close(fd); return -1; } sret = safe_write(fd, buf, size); if ( sret < 0 || (size_t) sret != size ) { fprintf(stderr, "error writing to %s: %s.\n", filename, strerror(errno)); safe_close(fd); return -1; } return safe_close(fd); } static gnutls_x509_crt generate_certificate(prelude_client_profile_t *cp, gnutls_x509_privkey key, int expire) { int ret; char buf[1024]; gnutls_x509_crt crt; uint64_t analyzerid; size_t size = sizeof(buf); ret = gnutls_x509_crt_init(&crt); if ( ret < 0 ) { fprintf(stderr, "error creating x509 certificate: %s.\n", gnutls_strerror(ret)); return NULL; } if ( ! expire ) expire = 0x7fffffff; else expire = time(NULL) + expire * 24 * 60 * 60; gnutls_x509_crt_set_version(crt, 3); gnutls_x509_crt_set_ca_status(crt, 0); gnutls_x509_crt_set_activation_time(crt, time(NULL)); gnutls_x509_crt_set_expiration_time(crt, expire); analyzerid = prelude_client_profile_get_analyzerid(cp); ret = snprintf(buf, sizeof(buf), "%" PRELUDE_PRIu64, analyzerid); ret = gnutls_x509_crt_set_dn_by_oid(crt, GNUTLS_OID_X520_DN_QUALIFIER, 0, buf, ret); if ( ret < 0 ) { fprintf(stderr, "error setting common name: %s.\n", gnutls_strerror(ret)); return NULL; } gnutls_x509_crt_set_serial(crt, &analyzerid, sizeof(analyzerid)); if ( ! key ) return crt; gnutls_x509_crt_set_key(crt, key); ret = gnutls_x509_crt_get_key_id(crt, 0, (unsigned char *) buf, &size); if ( ret == 0 ) { ret = gnutls_x509_crt_set_subject_key_id(crt, buf, size); if ( ret < 0 ) { gnutls_x509_crt_deinit(crt); fprintf(stderr, "error setting subject key ID: %s\n", gnutls_strerror(ret)); return NULL; } } return crt; } static gnutls_x509_crt generate_signed_certificate(prelude_client_profile_t *cp, uint64_t analyzerid, gnutls_x509_crt ca_crt, gnutls_x509_privkey ca_key, gnutls_x509_crq crq) { int ret; gnutls_x509_crt crt; unsigned char buf[65535]; size_t size = sizeof(buf); crt = generate_certificate(cp, NULL, generated_certificate_lifetime); if ( ! crt ) return NULL; ret = gnutls_x509_crt_set_crq(crt, crq); if ( ret < 0 ) { fprintf(stderr, "error associating certificate with CRQ: %s.\n", gnutls_strerror(ret)); goto err; } ret = gnutls_x509_crt_set_serial(crt, &analyzerid, sizeof(analyzerid)); if ( ret < 0 ) { fprintf(stderr, "error setting certificate serial: %s.\n", gnutls_strerror(ret)); goto err; } ret = gnutls_x509_crt_get_key_id(ca_crt, 0, buf, &size); if ( ret < 0 ) { fprintf(stderr, "error getting CA key ID: %s.\n", gnutls_strerror(ret)); goto err; } ret = gnutls_x509_crt_set_authority_key_id(crt, buf, size); if ( ret < 0 ) { fprintf(stderr, "error setting authority key ID: %s?\n", gnutls_strerror(ret)); goto err; } ret = gnutls_x509_crt_sign(crt, ca_crt, ca_key); if ( ret < 0 ) { fprintf(stderr, "error signing certificate: %s.\n", gnutls_strerror(ret)); goto err; } return crt; err: gnutls_x509_crt_deinit(crt); return NULL; } static gnutls_x509_crt generate_ca_certificate(prelude_client_profile_t *cp, gnutls_x509_privkey key) { int ret; gnutls_x509_crt crt; unsigned int usage = 0; crt = generate_certificate(cp, key, authority_certificate_lifetime); if ( ! crt ) return NULL; usage |= GNUTLS_KEY_CRL_SIGN; usage |= GNUTLS_KEY_KEY_CERT_SIGN; usage |= GNUTLS_KEY_KEY_AGREEMENT; usage |= GNUTLS_KEY_KEY_ENCIPHERMENT; usage |= GNUTLS_KEY_DATA_ENCIPHERMENT; usage |= GNUTLS_KEY_DIGITAL_SIGNATURE; gnutls_x509_crt_set_ca_status(crt, 1); gnutls_x509_crt_set_key_usage(crt, usage); ret = gnutls_x509_crt_sign(crt, crt, key); if ( ret < 0 ) { fprintf(stderr, "error self-signing certificate: %s.\n", gnutls_strerror(ret)); gnutls_x509_crt_deinit(crt); return NULL; } return crt; } static void entropy_progress_cb(void *cb_data, const char *what, int printchar, int current, int total) { //printf("\nwhat='%s' printchar='%c' current='%d' total='%d\n", what, printchar, current, total); if ( printchar == '\n') printchar = 'O'; fprintf(stderr, "%c", printchar); fflush(stderr); } static gnutls_x509_privkey generate_private_key(void) { int ret; gnutls_x509_privkey key; ret = gnutls_x509_privkey_init(&key); if ( ret < 0 ) { fprintf(stderr, "error initializing private key: %s.\n", gnutls_strerror(ret)); return NULL; } gcry_set_progress_handler(entropy_progress_cb, NULL); fprintf(stderr, "Generating %d bits RSA private key... This might take a very long time.\n", generated_key_size); fprintf(stderr, "[Increasing system activity will speed-up the process].\n"); fprintf(stderr, "Generation in progress... "); fflush(stderr); ret = gnutls_x509_privkey_generate(key, GNUTLS_PK_RSA, generated_key_size, 0); if ( ret < 0 ) { fprintf(stderr, "error generating private RSA key: %s\n", gnutls_strerror(ret)); gnutls_x509_privkey_deinit(key); return NULL; } fprintf(stderr, "\n\n"); return key; } static gnutls_x509_crq generate_certificate_request(prelude_client_profile_t *cp, prelude_connection_permission_t permission, gnutls_x509_privkey key, unsigned char *buf, size_t *size) { int ret; gnutls_x509_crq crq; ret = gnutls_x509_crq_init(&crq); if ( ret < 0 ) { fprintf(stderr, "error creating certificate request: %s.\n", gnutls_strerror(ret)); return NULL; } ret = gnutls_x509_crq_set_key(crq, key); if ( ret < 0 ) { fprintf(stderr, "error setting certificate request key: %s.\n", gnutls_strerror(ret)); gnutls_x509_crq_deinit(crq); return NULL; } if ( permission ) { ret = snprintf((char *) buf, *size, "%d", (int) permission); ret = gnutls_x509_crq_set_dn_by_oid(crq, GNUTLS_OID_X520_COMMON_NAME, 0, buf, ret); if ( ret < 0 ) { fprintf(stderr, "error setting common name: %s.\n", gnutls_strerror(ret)); return NULL; } } gnutls_x509_crq_set_version(crq, 3); ret = snprintf((char*) buf, *size, "%" PRELUDE_PRIu64, prelude_client_profile_get_analyzerid(cp)); ret = gnutls_x509_crq_set_dn_by_oid(crq, GNUTLS_OID_X520_DN_QUALIFIER, 0, buf, ret); if ( ret < 0 ) { fprintf(stderr, "error setting common name: %s.\n", gnutls_strerror(ret)); return NULL; } ret = gnutls_x509_crq_sign(crq, key); if ( ret < 0 ) { fprintf(stderr, "error signing certificate request: %s.\n", gnutls_strerror(ret)); gnutls_x509_crq_deinit(crq); return NULL; } ret = gnutls_x509_crq_export(crq, GNUTLS_X509_FMT_PEM, buf, size); if ( ret < 0 ) { fprintf(stderr, "error exporting certificate request: %s.\n", gnutls_strerror(ret)); gnutls_x509_crq_deinit(crq); return NULL; } return crq; } static gnutls_x509_privkey gen_crypto(prelude_client_profile_t *cp, const char *filename, prelude_uid_t uid, prelude_gid_t gid) { int ret; char buf[65535]; gnutls_x509_privkey key; size_t size = sizeof(buf); key = generate_private_key(); if ( ! key ) { fprintf(stderr, "error while generating RSA private key.\n"); return NULL; } ret = gnutls_x509_privkey_export(key, GNUTLS_X509_FMT_PEM, buf, &size); if ( ret < 0 ) { fprintf(stderr, "error exporting private key: %s\n", gnutls_strerror(ret)); gnutls_x509_privkey_deinit(key); return NULL; } ret = save_buf(filename, uid, gid, (unsigned char *) buf, size); if ( ret < 0 ) { fprintf(stderr, "error saving private key.\n"); return NULL; } return key; } gnutls_x509_privkey tls_load_privkey(prelude_client_profile_t *cp) { int ret; size_t size; gnutls_datum data; char filename[256]; gnutls_x509_privkey key; prelude_client_profile_get_tls_key_filename(cp, filename, sizeof(filename)); ret = access(filename, F_OK); if ( ret < 0 ) return gen_crypto(cp, filename, prelude_client_profile_get_uid(cp), prelude_client_profile_get_gid(cp)); ret = _prelude_load_file(filename, &data.data, &size); if ( ret < 0 ) { fprintf(stderr, "could not load '%s': %s.\n", filename, prelude_strerror(ret)); return NULL; } data.size = (unsigned int) size; gnutls_x509_privkey_init(&key); gnutls_x509_privkey_import(key, &data, GNUTLS_X509_FMT_PEM); _prelude_unload_file(data.data, size); return key; } static char ask_req_confirmation(void) { int ret; char c; do { fprintf(stderr, "Approve registration? [y/n]: "); c = 0; while ( (ret = getchar()) != '\n' ) if ( ! c ) c = ret; if ( c == 'y' ) return c; else if ( c == 'n' ) return c; } while ( 1 ); } static int check_req(const char *srcinfo, prelude_io_t *fd, gnutls_x509_crq crq, uint64_t *analyzerid) { int ret; size_t size; char buf[128], c; prelude_string_t *out; prelude_connection_permission_t perms; size = sizeof(buf); ret = gnutls_x509_crq_get_dn_by_oid(crq, GNUTLS_OID_X520_DN_QUALIFIER, 0, 0, buf, &size); if ( ret < 0 ) { fprintf(stderr, "could not retrieve dn qualifier: %s.\n", gnutls_strerror(ret)); return -1; } *analyzerid = strtoull(buf, NULL, 10); size = sizeof(buf); ret = gnutls_x509_crq_get_dn_by_oid(crq, GNUTLS_OID_X520_COMMON_NAME, 0, 0, buf, &size); if ( ret < 0 ) { fprintf(stderr, "could not retrieve common name: %s.\n", gnutls_strerror(ret)); return -1; } perms = atoi(buf); ret = prelude_string_new(&out); if ( ret < 0 ) { prelude_perror(ret, "error creating prelude-string"); return -1; } ret = prelude_connection_permission_to_string(perms, out); if ( ret < 0 ) { prelude_perror(ret, "could not convert permission to string"); return -1; } fprintf(stderr, "Registration request for analyzerID=\"%" PRELUDE_PRIu64 "\" permission=\"%s\".\n", *analyzerid, prelude_string_get_string(out)); if ( server_confirm ) { c = ask_req_confirmation(); if ( c != 'y' ) { gnutls_alert_send(prelude_io_get_fdptr(fd), GNUTLS_AL_FATAL, GNUTLS_A_USER_CANCELED); return -1; } } prelude_string_destroy(out); return 0; } int tls_handle_certificate_request(const char *srcinfo, prelude_client_profile_t *cp, prelude_io_t *fd, gnutls_x509_privkey cakey, gnutls_x509_crt cacrt, gnutls_x509_crt crt) { ssize_t ret; size_t size; char buf[65535]; gnutls_datum data; gnutls_x509_crq crq; unsigned char *rbuf; uint64_t analyzerid; gnutls_x509_crt gencrt; /* * Read the client CRQ and generate a certificate for it. */ prelude_log_debug(1, "Waiting for client certificate request.\n"); ret = prelude_io_read_delimited(fd, &rbuf); if ( ret < 0 ) { prelude_perror(ret, "error receiving client certificate request"); return -1; } data.size = ret; data.data = rbuf; gnutls_x509_crq_init(&crq); gnutls_x509_crq_import(crq, &data, GNUTLS_X509_FMT_PEM); free(rbuf); ret = check_req(srcinfo, fd, crq, &analyzerid); if ( ret < 0 ) return ret; /* * Generate a CA signed certificate for this CRQ. */ prelude_log_debug(1, "Generating signed certificate for client.\n"); gencrt = generate_signed_certificate(cp, analyzerid, cacrt, cakey, crq); if ( ! gencrt ) { fprintf(stderr, "error generating signed certificate for this request.\n"); return -1; } gnutls_x509_crq_deinit(crq); size = sizeof(buf); gnutls_x509_crt_export(gencrt, GNUTLS_X509_FMT_PEM, buf, &size); ret = prelude_io_write_delimited(fd, buf, size); if ( ret < 0 || (size_t) ret != size ) { prelude_perror(ret, "error sending signed certificate"); return -1; } gnutls_x509_crt_deinit(gencrt); /* * write our own certificate back to the client. */ prelude_log_debug(1, "Sending server certificate to client.\n"); size = sizeof(buf); gnutls_x509_crt_export(crt, GNUTLS_X509_FMT_PEM, buf, &size); ret = prelude_io_write_delimited(fd, buf, size); if ( ret < 0 || (size_t) ret != size ) { prelude_perror(ret, "error sending signed certificate"); return -1; } return 0; } int tls_request_certificate(prelude_client_profile_t *cp, prelude_io_t *fd, gnutls_x509_privkey key, prelude_connection_permission_t permission) { ssize_t ret; ssize_t rsize; char buf[65535]; unsigned char *rbuf; gnutls_x509_crq crq; size_t size = sizeof(buf); prelude_log_debug(1, "Sending certificate request.\n"); crq = generate_certificate_request(cp, permission, key, (unsigned char *) buf, &size); if ( ! crq ) return -1; gnutls_x509_crq_deinit(crq); ret = prelude_io_write_delimited(fd, buf, size); if ( ret < 0 || (size_t) ret != size ) { prelude_perror(ret, "error sending certificate request"); return -1; } prelude_log_debug(1, "Receiving signed certificate.\n"); rsize = prelude_io_read_delimited(fd, &rbuf); if ( rsize < 0 ) { prelude_perror(rsize, "error receiving CA-signed certificate"); return -1; } prelude_client_profile_get_tls_client_keycert_filename(cp, buf, sizeof(buf)); ret = remove_old(buf, rbuf, rsize); if ( ret < 0 ) return ret; ret = save_buf(buf, prelude_client_profile_get_uid(cp), prelude_client_profile_get_gid(cp), rbuf, rsize); if ( ret < 0 ) return ret; free(rbuf); prelude_log_debug(1, "Receiving CA certificate.\n"); rsize = prelude_io_read_delimited(fd, &rbuf); if ( rsize < 0 ) { prelude_perror(rsize, "error receiving server certificate"); return rsize; } prelude_client_profile_get_tls_client_trusted_cert_filename(cp, buf, sizeof(buf)); ret = remove_old(buf, rbuf, rsize); if ( ret < 0 ) return ret; ret = save_buf(buf, prelude_client_profile_get_uid(cp), prelude_client_profile_get_gid(cp), rbuf, rsize); if ( ret < 0 ) return ret; free(rbuf); return 0; } static int crt_import(gnutls_x509_crt *crt, const char *filename) { int ret; size_t dsize; gnutls_datum data; ret = _prelude_load_file(filename, &data.data, &dsize); if ( ret < 0 ) { fprintf(stderr, "error loading '%s': %s.\n", filename, prelude_strerror(ret)); return ret; } data.size = (unsigned int) dsize; gnutls_x509_crt_init(crt); ret = gnutls_x509_crt_import(*crt, &data, GNUTLS_X509_FMT_PEM); if ( ret < 0 ) fprintf(stderr, "error importing certificate: %s.\n", gnutls_strerror(ret)); _prelude_unload_file(data.data, dsize); return ret; } static int crt_export(prelude_client_profile_t *cp, gnutls_x509_crt *crt, const char *filename) { int ret; size_t size; unsigned char buf[65535]; size = sizeof(buf); ret = gnutls_x509_crt_export(*crt, GNUTLS_X509_FMT_PEM, buf, &size); if ( ret < 0 ) { fprintf(stderr, "error exporting self-signed certificate: %s.\n", gnutls_strerror(ret)); gnutls_x509_crt_deinit(*crt); return -1; } ret = save_buf(filename, prelude_client_profile_get_uid(cp), prelude_client_profile_get_gid(cp), buf, size); if ( ret < 0 ) { fprintf(stderr, "error saving private key certificate.\n"); gnutls_x509_crt_deinit(*crt); return -1; } return 0; } int tls_load_ca_certificate(prelude_client_profile_t *cp, gnutls_x509_privkey key, gnutls_x509_crt *crt) { int ret; char filename[256]; prelude_client_profile_get_tls_server_ca_cert_filename(cp, filename, sizeof(filename)); ret = access(filename, F_OK); if ( ret == 0 ) return crt_import(crt, filename); *crt = generate_ca_certificate(cp, key); if ( ! *crt ) return -1; ret = crt_export(cp, crt, filename); if ( ret < 0 ) gnutls_x509_crt_deinit(*crt); return ret; } int tls_load_ca_signed_certificate(prelude_client_profile_t *cp, gnutls_x509_privkey cakey, gnutls_x509_crt cacrt, gnutls_x509_crt *crt) { int ret; char filename[256]; gnutls_x509_crq crq; unsigned char buf[65535]; size_t size = sizeof(buf); prelude_client_profile_get_tls_server_keycert_filename(cp, filename, sizeof(filename)); ret = access(filename, F_OK); if ( ret == 0 ) return crt_import(crt, filename); crq = generate_certificate_request(cp, 0, cakey, buf, &size); if ( ! crq ) return -1; *crt = generate_signed_certificate(cp, prelude_client_profile_get_analyzerid(cp), cacrt, cakey, crq); if ( ! *crt ) return -1; ret = crt_export(cp, crt, filename); if ( ret < 0 ) gnutls_x509_crt_deinit(*crt); return ret; } int tls_revoke_analyzer(prelude_client_profile_t *cp, gnutls_x509_privkey key, gnutls_x509_crt crt, uint64_t revoked_analyzerid) { int ret, i; size_t len, dsize; gnutls_datum data; gnutls_x509_crl crl; uint64_t analyzerid; char crlfile[PATH_MAX], buf[65535]; ret = gnutls_x509_crl_init(&crl); prelude_client_profile_get_tls_server_crl_filename(cp, crlfile, sizeof(crlfile)); ret = access(crlfile, R_OK); if ( ret == 0 ) { ret = _prelude_load_file(crlfile, &data.data, &dsize); if ( ret < 0 ) { fprintf(stderr, "error loading '%s': %s.\n", crlfile, prelude_strerror(ret)); return ret; } data.size = (unsigned int) dsize; ret = gnutls_x509_crl_import(crl, &data, GNUTLS_X509_FMT_PEM); if ( ret < 0 ) { fprintf(stderr, "error importing CRL: %s.\n", gnutls_strerror(ret)); return -1; } } for ( i = 0; i < gnutls_x509_crl_get_crt_count(crl); i++ ) { len = sizeof(analyzerid); gnutls_x509_crl_get_crt_serial(crl, i, (unsigned char *) &analyzerid, &len, NULL); if ( analyzerid == revoked_analyzerid ) return 0; } ret = gnutls_x509_crl_set_crt_serial(crl, &revoked_analyzerid, sizeof(revoked_analyzerid), time(NULL)); if ( ret < 0 ) { fprintf(stderr, "error setting CRL certificate serial: %s.\n", gnutls_strerror(ret)); return -1; } gnutls_x509_crl_set_version(crl, 2); gnutls_x509_crl_set_next_update(crl, time(NULL)); gnutls_x509_crl_set_this_update(crl, time(NULL)); ret = gnutls_x509_crl_sign(crl, crt, key); if ( ret < 0 ) { fprintf(stderr, "error signing CRL: %s.\n", gnutls_strerror(ret)); return -1; } len = sizeof(buf); ret = gnutls_x509_crl_export(crl, GNUTLS_X509_FMT_PEM, buf, &len); if ( ret < 0 ) { fprintf(stderr, "error exporting certificate revocation list: %s\n", gnutls_strerror(ret)); gnutls_x509_crl_deinit(crl); return -1; } gnutls_x509_crl_deinit(crl); unlink(crlfile); ret = save_buf(crlfile, prelude_client_profile_get_uid(cp), prelude_client_profile_get_gid(cp), (unsigned char *) buf, len); if ( ret < 0 ) { fprintf(stderr, "error saving private key.\n"); return -1; } return 1; } libprelude-1.0.0/m4/0000775000076400007640000000000011347714753011206 500000000000000libprelude-1.0.0/m4/ax_create_prelude_inttypes_h.m40000664000076400007640000000452011202225026017266 00000000000000AC_DEFUN([AX_CREATE_PRELUDE_INTTYPES_H],[ ac_prelude_inttypes_h="$1" ac_prelude_inttypes_h_temp="$1_" AC_SUBST(__PRELUDE_HAVE_STDINT_H) AC_SUBST(__PRELUDE_HAVE_INTTYPES_H) AC_SUBST(__PRELUDE_HAVE_64BIT_LONG) AC_SUBST(__PRELUDE_STDINT_HAVE_UINT8) AC_SUBST(__PRELUDE_STDINT_HAVE_UINT16) AC_SUBST(__PRELUDE_STDINT_HAVE_UINT32) AC_SUBST(__PRELUDE_STDINT_HAVE_UINT64) AC_SUBST(__PRELUDE_64BIT_FORMAT_PREFIX) ac_cv_have_stdint_h= AC_CHECK_HEADER(stdint.h, ac_cv_have_stdint_h=yes, ac_cv_have_stdint_h=no) if test "$ac_cv_have_stdint_h" = "yes" ; then __PRELUDE_HAVE_STDINT_H="#define __PRELUDE_HAVE_STDINT_H" else __PRELUDE_HAVE_STDINT_H="/* #define __PRELUDE_HAVE_STDINT_H */" fi ac_cv_have_inttypes_h= AC_CHECK_HEADER(inttypes.h, ac_cv_have_inttypes_h=yes, ac_cv_have_inttypes_h=no) if test "$ac_cv_have_inttypes_h" = "yes" ; then __PRELUDE_HAVE_INTTYPES_H="#define __PRELUDE_HAVE_INTTYPES_H" else __PRELUDE_HAVE_INTTYPES_H="/* #define __PRELUDE_HAVE_INTTYPES_H */" fi AC_COMPILE_CHECK_SIZEOF(long) if test "$ac_cv_sizeof_long" = "8" ; then __PRELUDE_HAVE_64BIT_LONG="#define __PRELUDE_HAVE_64BIT_LONG" else __PRELUDE_HAVE_64BIT_LONG="/* #define __PRELUDE_HAVE_64BIT_LONG */" fi ac_cv_have_uint8_t= AC_CHECK_TYPE([uint8_t], ac_cv_have_uint8_t=yes, ac_cv_have_uint8_t=no) if test "$ac_cv_have_uint8_t" = "yes" ; then __PRELUDE_STDINT_HAVE_UINT8="#define __PRELUDE_STDINT_HAVE_UINT8" else __PRELUDE_STDINT_HAVE_UINT8="/* #define __PRELUDE_STDINT_HAVE_UINT8 */" fi ac_cv_have_uint16_t= AC_CHECK_TYPE([uint16_t], ac_cv_have_uint16_t=yes, ac_cv_have_uint16_t=no) if test "$ac_cv_have_uint16_t" = "yes" ; then __PRELUDE_STDINT_HAVE_UINT16="#define __PRELUDE_STDINT_HAVE_UINT16" else __PRELUDE_STDINT_HAVE_UINT16="/* #define __PRELUDE_STDINT_HAVE_UINT16 */" fi ac_cv_have_uint32_t= AC_CHECK_TYPE([uint32_t], ac_cv_have_uint32_t=yes, ac_cv_have_uint32_t=no) if test "$ac_cv_have_uint32_t" = "yes" ; then __PRELUDE_STDINT_HAVE_UINT32="#define __PRELUDE_STDINT_HAVE_UINT32" else __PRELUDE_STDINT_HAVE_UINT32="/* #define __PRELUDE_STDINT_HAVE_UINT32 */" fi ac_cv_have_uint64_t= AC_CHECK_TYPE([uint64_t], ac_cv_have_uint64_t=yes, ac_cv_have_uint64_t=no) if test "$ac_cv_have_uint64_t" = "yes" ; then __PRELUDE_STDINT_HAVE_UINT64="#define __PRELUDE_STDINT_HAVE_UINT64" else __PRELUDE_STDINT_HAVE_UINT64="/* #define __PRELUDE_STDINT_HAVE_UINT64 */" fi ]) libprelude-1.0.0/m4/lt~obsolete.m40000644000076400007640000001311311347714402013726 00000000000000# lt~obsolete.m4 -- aclocal satisfying obsolete definitions. -*-Autoconf-*- # # Copyright (C) 2004, 2005, 2007 Free Software Foundation, Inc. # Written by Scott James Remnant, 2004. # # 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. # serial 4 lt~obsolete.m4 # These exist entirely to fool aclocal when bootstrapping libtool. # # In the past libtool.m4 has provided macros via AC_DEFUN (or AU_DEFUN) # which have later been changed to m4_define as they aren't part of the # exported API, or moved to Autoconf or Automake where they belong. # # The trouble is, aclocal is a bit thick. It'll see the old AC_DEFUN # in /usr/share/aclocal/libtool.m4 and remember it, then when it sees us # using a macro with the same name in our local m4/libtool.m4 it'll # pull the old libtool.m4 in (it doesn't see our shiny new m4_define # and doesn't know about Autoconf macros at all.) # # So we provide this file, which has a silly filename so it's always # included after everything else. This provides aclocal with the # AC_DEFUNs it wants, but when m4 processes it, it doesn't do anything # because those macros already exist, or will be overwritten later. # We use AC_DEFUN over AU_DEFUN for compatibility with aclocal-1.6. # # Anytime we withdraw an AC_DEFUN or AU_DEFUN, remember to add it here. # Yes, that means every name once taken will need to remain here until # we give up compatibility with versions before 1.7, at which point # we need to keep only those names which we still refer to. # This is to help aclocal find these macros, as it can't see m4_define. AC_DEFUN([LTOBSOLETE_VERSION], [m4_if([1])]) m4_ifndef([AC_LIBTOOL_LINKER_OPTION], [AC_DEFUN([AC_LIBTOOL_LINKER_OPTION])]) m4_ifndef([AC_PROG_EGREP], [AC_DEFUN([AC_PROG_EGREP])]) m4_ifndef([_LT_AC_PROG_ECHO_BACKSLASH], [AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH])]) m4_ifndef([_LT_AC_SHELL_INIT], [AC_DEFUN([_LT_AC_SHELL_INIT])]) m4_ifndef([_LT_AC_SYS_LIBPATH_AIX], [AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX])]) m4_ifndef([_LT_PROG_LTMAIN], [AC_DEFUN([_LT_PROG_LTMAIN])]) m4_ifndef([_LT_AC_TAGVAR], [AC_DEFUN([_LT_AC_TAGVAR])]) m4_ifndef([AC_LTDL_ENABLE_INSTALL], [AC_DEFUN([AC_LTDL_ENABLE_INSTALL])]) m4_ifndef([AC_LTDL_PREOPEN], [AC_DEFUN([AC_LTDL_PREOPEN])]) m4_ifndef([_LT_AC_SYS_COMPILER], [AC_DEFUN([_LT_AC_SYS_COMPILER])]) m4_ifndef([_LT_AC_LOCK], [AC_DEFUN([_LT_AC_LOCK])]) m4_ifndef([AC_LIBTOOL_SYS_OLD_ARCHIVE], [AC_DEFUN([AC_LIBTOOL_SYS_OLD_ARCHIVE])]) m4_ifndef([_LT_AC_TRY_DLOPEN_SELF], [AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF])]) m4_ifndef([AC_LIBTOOL_PROG_CC_C_O], [AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O])]) m4_ifndef([AC_LIBTOOL_SYS_HARD_LINK_LOCKS], [AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS])]) m4_ifndef([AC_LIBTOOL_OBJDIR], [AC_DEFUN([AC_LIBTOOL_OBJDIR])]) m4_ifndef([AC_LTDL_OBJDIR], [AC_DEFUN([AC_LTDL_OBJDIR])]) m4_ifndef([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH], [AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH])]) m4_ifndef([AC_LIBTOOL_SYS_LIB_STRIP], [AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP])]) m4_ifndef([AC_PATH_MAGIC], [AC_DEFUN([AC_PATH_MAGIC])]) m4_ifndef([AC_PROG_LD_GNU], [AC_DEFUN([AC_PROG_LD_GNU])]) m4_ifndef([AC_PROG_LD_RELOAD_FLAG], [AC_DEFUN([AC_PROG_LD_RELOAD_FLAG])]) m4_ifndef([AC_DEPLIBS_CHECK_METHOD], [AC_DEFUN([AC_DEPLIBS_CHECK_METHOD])]) m4_ifndef([AC_LIBTOOL_PROG_COMPILER_NO_RTTI], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI])]) m4_ifndef([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE], [AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE])]) m4_ifndef([AC_LIBTOOL_PROG_COMPILER_PIC], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC])]) m4_ifndef([AC_LIBTOOL_PROG_LD_SHLIBS], [AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS])]) m4_ifndef([AC_LIBTOOL_POSTDEP_PREDEP], [AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP])]) m4_ifndef([LT_AC_PROG_EGREP], [AC_DEFUN([LT_AC_PROG_EGREP])]) m4_ifndef([LT_AC_PROG_SED], [AC_DEFUN([LT_AC_PROG_SED])]) m4_ifndef([_LT_CC_BASENAME], [AC_DEFUN([_LT_CC_BASENAME])]) m4_ifndef([_LT_COMPILER_BOILERPLATE], [AC_DEFUN([_LT_COMPILER_BOILERPLATE])]) m4_ifndef([_LT_LINKER_BOILERPLATE], [AC_DEFUN([_LT_LINKER_BOILERPLATE])]) m4_ifndef([_AC_PROG_LIBTOOL], [AC_DEFUN([_AC_PROG_LIBTOOL])]) m4_ifndef([AC_LIBTOOL_SETUP], [AC_DEFUN([AC_LIBTOOL_SETUP])]) m4_ifndef([_LT_AC_CHECK_DLFCN], [AC_DEFUN([_LT_AC_CHECK_DLFCN])]) m4_ifndef([AC_LIBTOOL_SYS_DYNAMIC_LINKER], [AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER])]) m4_ifndef([_LT_AC_TAGCONFIG], [AC_DEFUN([_LT_AC_TAGCONFIG])]) m4_ifndef([AC_DISABLE_FAST_INSTALL], [AC_DEFUN([AC_DISABLE_FAST_INSTALL])]) m4_ifndef([_LT_AC_LANG_CXX], [AC_DEFUN([_LT_AC_LANG_CXX])]) m4_ifndef([_LT_AC_LANG_F77], [AC_DEFUN([_LT_AC_LANG_F77])]) m4_ifndef([_LT_AC_LANG_GCJ], [AC_DEFUN([_LT_AC_LANG_GCJ])]) m4_ifndef([AC_LIBTOOL_RC], [AC_DEFUN([AC_LIBTOOL_RC])]) m4_ifndef([AC_LIBTOOL_LANG_C_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG])]) m4_ifndef([_LT_AC_LANG_C_CONFIG], [AC_DEFUN([_LT_AC_LANG_C_CONFIG])]) m4_ifndef([AC_LIBTOOL_LANG_CXX_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG])]) m4_ifndef([_LT_AC_LANG_CXX_CONFIG], [AC_DEFUN([_LT_AC_LANG_CXX_CONFIG])]) m4_ifndef([AC_LIBTOOL_LANG_F77_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG])]) m4_ifndef([_LT_AC_LANG_F77_CONFIG], [AC_DEFUN([_LT_AC_LANG_F77_CONFIG])]) m4_ifndef([AC_LIBTOOL_LANG_GCJ_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG])]) m4_ifndef([_LT_AC_LANG_GCJ_CONFIG], [AC_DEFUN([_LT_AC_LANG_GCJ_CONFIG])]) m4_ifndef([AC_LIBTOOL_LANG_RC_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG])]) m4_ifndef([_LT_AC_LANG_RC_CONFIG], [AC_DEFUN([_LT_AC_LANG_RC_CONFIG])]) m4_ifndef([AC_LIBTOOL_CONFIG], [AC_DEFUN([AC_LIBTOOL_CONFIG])]) m4_ifndef([_LT_AC_FILE_LTDLL_C], [AC_DEFUN([_LT_AC_FILE_LTDLL_C])]) libprelude-1.0.0/m4/ax_c_check_flag.m40000664000076400007640000000554111202225026014411 00000000000000##### http://autoconf-archive.cryp.to/ax_c_check_flag.html # # SYNOPSIS # # AX_C_CHECK_FLAG(FLAG-TO-CHECK,[PROLOGUE],[BODY],[ACTION-IF-SUCCESS],[ACTION-IF-FAILURE]) # # DESCRIPTION # # This macro tests if the C compiler supports the flag FLAG-TO-CHECK. # If successfull execute ACTION-IF-SUCCESS otherwise # ACTION-IF-FAILURE. PROLOGUE and BODY are optional and should be # used as in AC_LANG_PROGRAM macro. # # This code is inspired from KDE_CHECK_COMPILER_FLAG macro. Thanks to # Bogdan Drozdowski for testing and bug fixes. # # LAST MODIFICATION # # 2007-11-26 # # COPYLEFT # # Copyright (c) 2007 Francesco Salvestrini # # 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, the respective Autoconf Macro's copyright # owner gives unlimited permission to copy, distribute and modify the # configure scripts that are the output of Autoconf when processing # the Macro. You need not follow the terms of the GNU General Public # License when using or distributing such scripts, even though # portions of the text of the Macro appear in them. The GNU General # Public License (GPL) does govern all other use of the material that # constitutes the Autoconf Macro. # # This special exception to the GPL applies to versions of the # Autoconf Macro released by the Autoconf Macro Archive. When you # make and distribute a modified version of the Autoconf Macro, you # may extend this special exception to the GPL to apply to your # modified version as well. AC_DEFUN([AX_C_CHECK_FLAG],[ AC_PREREQ([2.61]) AC_REQUIRE([AC_PROG_CC]) AC_REQUIRE([AC_PROG_SED]) flag=`echo "$1" | $SED 'y% .=/+-(){}<>:*,%_______________%'` AC_CACHE_CHECK([whether the C compiler accepts the $1 flag], [ax_cv_c_check_flag_$flag],[ AC_LANG_PUSH([C]) save_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS $1" AC_COMPILE_IFELSE([ AC_LANG_PROGRAM([$2],[$3]) ],[ eval "ax_cv_c_check_flag_$flag=yes" ],[ eval "ax_cv_c_check_flag_$flag=no" ]) CFLAGS="$save_CFLAGS" AC_LANG_POP ]) AS_IF([eval "test \"`echo '$ax_cv_c_check_flag_'$flag`\" = yes"],[ : $4 ],[ : $5 ]) ]) libprelude-1.0.0/m4/ax_ld_check_flag.m40000664000076400007640000000573011202225026014566 00000000000000##### http://autoconf-archive.cryp.to/ax_ld_check_flag.html # # SYNOPSIS # # AX_LD_CHECK_FLAG(FLAG-TO-CHECK,[PROLOGUE],[BODY],[ACTION-IF-SUCCESS],[ACTION-IF-FAILURE]) # # DESCRIPTION # # This macro tests if the C++ compiler supports the flag # FLAG-TO-CHECK. If successfull execute ACTION-IF-SUCCESS otherwise # ACTION-IF-FAILURE. PROLOGUE and BODY are optional and should be # used as in AC_LANG_PROGRAM macro. # # Example: # # AX_LD_CHECK_FLAG([-Wl,-L/usr/lib],[],[],[ # ... # ],[ # ... # ]) # # This code is inspired from KDE_CHECK_COMPILER_FLAG macro. Thanks to # Bogdan Drozdowski for testing and bug fixes. # # LAST MODIFICATION # # 2007-11-26 # # COPYLEFT # # Copyright (c) 2007 Francesco Salvestrini # # 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, the respective Autoconf Macro's copyright # owner gives unlimited permission to copy, distribute and modify the # configure scripts that are the output of Autoconf when processing # the Macro. You need not follow the terms of the GNU General Public # License when using or distributing such scripts, even though # portions of the text of the Macro appear in them. The GNU General # Public License (GPL) does govern all other use of the material that # constitutes the Autoconf Macro. # # This special exception to the GPL applies to versions of the # Autoconf Macro released by the Autoconf Macro Archive. When you # make and distribute a modified version of the Autoconf Macro, you # may extend this special exception to the GPL to apply to your # modified version as well. AC_DEFUN([AX_LD_CHECK_FLAG],[ AC_PREREQ([2.61]) AC_REQUIRE([AC_PROG_CXX]) AC_REQUIRE([AC_PROG_SED]) flag=`echo "$1" | $SED 'y% .=/+-(){}<>:*,%_______________%'` AC_CACHE_CHECK([whether the linker accepts the $1 flag], [ax_cv_ld_check_flag_$flag],[ #AC_LANG_PUSH([C]) save_LDFLAGS="$LDFLAGS" LDFLAGS="$LDFLAGS $1" AC_LINK_IFELSE([ AC_LANG_PROGRAM([$2],[$3]) ],[ eval "ax_cv_ld_check_flag_$flag=yes" ],[ eval "ax_cv_ld_check_flag_$flag=no" ]) LDFLAGS="$save_LDFLAGS" #AC_LANG_POP ]) AS_IF([eval "test \"`echo '$ax_cv_ld_check_flag_'$flag`\" = yes"],[ : $4 ],[ : $5 ]) ]) libprelude-1.0.0/m4/libprelude.m40000664000076400007640000001771011202225026013501 00000000000000dnl Autoconf macros for libprelude dnl $id$ # Modified for LIBPRELUDE -- Yoann Vandoorselaere # Modified for LIBGNUTLS -- nmav # Configure paths for LIBGCRYPT # Shamelessly stolen from the one of XDELTA by Owen Taylor # Werner Koch 99-12-09 dnl AM_PATH_LIBPRELUDE([MINIMUM-VERSION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND ]]], THREAD_SUPPORT) dnl Test for libprelude, and define LIBPRELUDE_PREFIX, LIBPRELUDE_CFLAGS, LIBPRELUDE_PTHREAD_CFLAGS, dnl LIBPRELUDE_LDFLAGS, and LIBPRELUDE_LIBS dnl AC_DEFUN([AM_PATH_LIBPRELUDE], [dnl dnl Get the cflags and libraries from the libprelude-config script dnl AC_ARG_WITH(libprelude-prefix, AC_HELP_STRING(--with-libprelude-prefix=PFX, Prefix where libprelude is installed (optional)), libprelude_config_prefix="$withval", libprelude_config_prefix="") if test x$libprelude_config_prefix != x ; then if test x${LIBPRELUDE_CONFIG+set} != xset ; then LIBPRELUDE_CONFIG=$libprelude_config_prefix/bin/libprelude-config fi fi AC_PATH_PROG(LIBPRELUDE_CONFIG, libprelude-config, no) if test "$LIBPRELUDE_CONFIG" != "no"; then if $($LIBPRELUDE_CONFIG --thread > /dev/null 2>&1); then LIBPRELUDE_PTHREAD_CFLAGS=`$LIBPRELUDE_CONFIG --thread --cflags` if test x$4 = xtrue || test x$4 = xyes; then libprelude_config_args="--thread" else libprelude_config_args="--no-thread" fi else LIBPRELUDE_PTHREAD_CFLAGS=`$LIBPRELUDE_CONFIG --pthread-cflags` fi fi min_libprelude_version=ifelse([$1], ,0.1.0,$1) AC_MSG_CHECKING(for libprelude - version >= $min_libprelude_version) no_libprelude="" if test "$LIBPRELUDE_CONFIG" = "no" ; then no_libprelude=yes else LIBPRELUDE_CFLAGS=`$LIBPRELUDE_CONFIG $libprelude_config_args --cflags` LIBPRELUDE_LDFLAGS=`$LIBPRELUDE_CONFIG $libprelude_config_args --ldflags` LIBPRELUDE_LIBS=`$LIBPRELUDE_CONFIG $libprelude_config_args --libs` LIBPRELUDE_PREFIX=`$LIBPRELUDE_CONFIG $libprelude_config_args --prefix` LIBPRELUDE_CONFIG_PREFIX=`$LIBPRELUDE_CONFIG $libprelude_config_args --config-prefix` libprelude_config_version=`$LIBPRELUDE_CONFIG $libprelude_config_args --version` ac_save_CFLAGS="$CFLAGS" ac_save_LDFLAGS="$LDFLAGS" ac_save_LIBS="$LIBS" CFLAGS="$CFLAGS $LIBPRELUDE_CFLAGS" LDFLAGS="$LDFLAGS $LIBPRELUDE_LDFLAGS" LIBS="$LIBS $LIBPRELUDE_LIBS" dnl dnl Now check if the installed libprelude is sufficiently new. Also sanity dnl checks the results of libprelude-config to some extent dnl rm -f conf.libpreludetest AC_TRY_RUN([ #include #include #include #include int main () { system ("touch conf.libpreludetest"); if( strcmp( prelude_check_version(NULL), "$libprelude_config_version" ) ) { printf("\n*** 'libprelude-config --version' returned %s, but LIBPRELUDE (%s)\n", "$libprelude_config_version", prelude_check_version(NULL) ); printf("*** was found! If libprelude-config was correct, then it is best\n"); printf("*** to remove the old version of LIBPRELUDE. You may also be able to fix the error\n"); printf("*** by modifying your LD_LIBRARY_PATH enviroment variable, or by editing\n"); printf("*** /etc/ld.so.conf. Make sure you have run ldconfig if that is\n"); printf("*** required on your system.\n"); printf("*** If libprelude-config was wrong, set the environment variable LIBPRELUDE_CONFIG\n"); printf("*** to point to the correct copy of libprelude-config, and remove the file config.cache\n"); printf("*** before re-running configure\n"); } else if ( strcmp(prelude_check_version(NULL), LIBPRELUDE_VERSION ) ) { printf("\n*** LIBPRELUDE header file (version %s) does not match\n", LIBPRELUDE_VERSION); printf("*** library (version %s)\n", prelude_check_version(NULL) ); } else { if ( prelude_check_version( "$min_libprelude_version" ) ) return 0; else { printf("no\n*** An old version of LIBPRELUDE (%s) was found.\n", prelude_check_version(NULL) ); printf("*** You need a version of LIBPRELUDE newer than %s. The latest version of\n", "$min_libprelude_version" ); printf("*** LIBPRELUDE is always available from http://www.prelude-ids.com/development/download/\n"); printf("*** \n"); printf("*** If you have already installed a sufficiently new version, this error\n"); printf("*** probably means that the wrong copy of the libprelude-config shell script is\n"); printf("*** being found. The easiest way to fix this is to remove the old version\n"); printf("*** of LIBPRELUDE, but you can also set the LIBPRELUDE_CONFIG environment to point to the\n"); printf("*** correct copy of libprelude-config. (In this case, you will have to\n"); printf("*** modify your LD_LIBRARY_PATH enviroment variable, or edit /etc/ld.so.conf\n"); printf("*** so that the correct libraries are found at run-time))\n"); } } return 1; } ],, no_libprelude=yes,[echo $ac_n "cross compiling; assumed OK... $ac_c"]) CFLAGS="$ac_save_CFLAGS" LIBS="$ac_save_LIBS" LDFLAGS="$ac_save_LDFLAGS" fi if test "x$no_libprelude" = x ; then AC_MSG_RESULT(yes) ifelse([$2], , :, [$2]) else if test -f conf.libpreludetest ; then : else AC_MSG_RESULT(no) fi if test "$LIBPRELUDE_CONFIG" = "no" ; then echo "*** The libprelude-config script installed by LIBPRELUDE could not be found" echo "*** If LIBPRELUDE was installed in PREFIX, make sure PREFIX/bin is in" echo "*** your path, or set the LIBPRELUDE_CONFIG environment variable to the" echo "*** full path to libprelude-config." else if test -f conf.libpreludetest ; then : else echo "*** Could not run libprelude test program, checking why..." CFLAGS="$CFLAGS $LIBPRELUDE_CFLAGS" LDFLAGS="$LDFLAGS $LIBPRELUDE_LDFLAGS" LIBS="$LIBS $LIBPRELUDE_LIBS" AC_TRY_LINK([ #include #include #include #include ], [ return !!prelude_check_version(NULL); ], [ echo "*** The test program compiled, but did not run. This usually means" echo "*** that the run-time linker is not finding LIBPRELUDE or finding the wrong" echo "*** version of LIBPRELUDE. If it is not finding LIBPRELUDE, you'll need to set your" echo "*** LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf to point" echo "*** to the installed location Also, make sure you have run ldconfig if that" echo "*** is required on your system" echo "***" echo "*** If you have an old version installed, it is best to remove it, although" echo "*** you may also be able to get things to work by modifying LD_LIBRARY_PATH" echo "***" ], [ echo "*** The test program failed to compile or link. See the file config.log for the" echo "*** exact error that occured. This usually means LIBPRELUDE was incorrectly installed" echo "*** or that you have moved LIBPRELUDE since it was installed. In the latter case, you" echo "*** may want to edit the libprelude-config script: $LIBPRELUDE_CONFIG" ]) CFLAGS="$ac_save_CFLAGS" LDFLAGS="$ac_save_LDFLAGS" LIBS="$ac_save_LIBS" fi fi LIBPRELUDE_CFLAGS="" LIBPRELUDE_LDFLAGS="" LIBPRELUDE_LIBS="" ifelse([$3], , :, [$3]) fi rm -f conf.libpreludetest AC_SUBST(LIBPRELUDE_CFLAGS) AC_SUBST(LIBPRELUDE_PTHREAD_CFLAGS) AC_SUBST(LIBPRELUDE_LDFLAGS) AC_SUBST(LIBPRELUDE_LIBS) AC_SUBST(LIBPRELUDE_PREFIX) AC_SUBST(LIBPRELUDE_CONFIG_PREFIX) m4_ifdef([LT_INIT], [AC_DEFINE([PRELUDE_APPLICATION_USE_LIBTOOL2], [], [Define whether application use libtool >= 2.0])], []) ]) dnl *-*wedit:notab*-* Please keep this as the last line. libprelude-1.0.0/m4/ltoptions.m40000644000076400007640000002724211347714377013432 00000000000000# Helper functions for option handling. -*- Autoconf -*- # # Copyright (C) 2004, 2005, 2007, 2008 Free Software Foundation, Inc. # Written by Gary V. Vaughan, 2004 # # 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. # serial 6 ltoptions.m4 # This is to help aclocal find these macros, as it can't see m4_define. AC_DEFUN([LTOPTIONS_VERSION], [m4_if([1])]) # _LT_MANGLE_OPTION(MACRO-NAME, OPTION-NAME) # ------------------------------------------ m4_define([_LT_MANGLE_OPTION], [[_LT_OPTION_]m4_bpatsubst($1__$2, [[^a-zA-Z0-9_]], [_])]) # _LT_SET_OPTION(MACRO-NAME, OPTION-NAME) # --------------------------------------- # Set option OPTION-NAME for macro MACRO-NAME, and if there is a # matching handler defined, dispatch to it. Other OPTION-NAMEs are # saved as a flag. m4_define([_LT_SET_OPTION], [m4_define(_LT_MANGLE_OPTION([$1], [$2]))dnl m4_ifdef(_LT_MANGLE_DEFUN([$1], [$2]), _LT_MANGLE_DEFUN([$1], [$2]), [m4_warning([Unknown $1 option `$2'])])[]dnl ]) # _LT_IF_OPTION(MACRO-NAME, OPTION-NAME, IF-SET, [IF-NOT-SET]) # ------------------------------------------------------------ # Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. m4_define([_LT_IF_OPTION], [m4_ifdef(_LT_MANGLE_OPTION([$1], [$2]), [$3], [$4])]) # _LT_UNLESS_OPTIONS(MACRO-NAME, OPTION-LIST, IF-NOT-SET) # ------------------------------------------------------- # Execute IF-NOT-SET unless all options in OPTION-LIST for MACRO-NAME # are set. m4_define([_LT_UNLESS_OPTIONS], [m4_foreach([_LT_Option], m4_split(m4_normalize([$2])), [m4_ifdef(_LT_MANGLE_OPTION([$1], _LT_Option), [m4_define([$0_found])])])[]dnl m4_ifdef([$0_found], [m4_undefine([$0_found])], [$3 ])[]dnl ]) # _LT_SET_OPTIONS(MACRO-NAME, OPTION-LIST) # ---------------------------------------- # OPTION-LIST is a space-separated list of Libtool options associated # with MACRO-NAME. If any OPTION has a matching handler declared with # LT_OPTION_DEFINE, dispatch to that macro; otherwise complain about # the unknown option and exit. m4_defun([_LT_SET_OPTIONS], [# Set options m4_foreach([_LT_Option], m4_split(m4_normalize([$2])), [_LT_SET_OPTION([$1], _LT_Option)]) m4_if([$1],[LT_INIT],[ dnl dnl Simply set some default values (i.e off) if boolean options were not dnl specified: _LT_UNLESS_OPTIONS([LT_INIT], [dlopen], [enable_dlopen=no ]) _LT_UNLESS_OPTIONS([LT_INIT], [win32-dll], [enable_win32_dll=no ]) dnl dnl If no reference was made to various pairs of opposing options, then dnl we run the default mode handler for the pair. For example, if neither dnl `shared' nor `disable-shared' was passed, we enable building of shared dnl archives by default: _LT_UNLESS_OPTIONS([LT_INIT], [shared disable-shared], [_LT_ENABLE_SHARED]) _LT_UNLESS_OPTIONS([LT_INIT], [static disable-static], [_LT_ENABLE_STATIC]) _LT_UNLESS_OPTIONS([LT_INIT], [pic-only no-pic], [_LT_WITH_PIC]) _LT_UNLESS_OPTIONS([LT_INIT], [fast-install disable-fast-install], [_LT_ENABLE_FAST_INSTALL]) ]) ])# _LT_SET_OPTIONS ## --------------------------------- ## ## Macros to handle LT_INIT options. ## ## --------------------------------- ## # _LT_MANGLE_DEFUN(MACRO-NAME, OPTION-NAME) # ----------------------------------------- m4_define([_LT_MANGLE_DEFUN], [[_LT_OPTION_DEFUN_]m4_bpatsubst(m4_toupper([$1__$2]), [[^A-Z0-9_]], [_])]) # LT_OPTION_DEFINE(MACRO-NAME, OPTION-NAME, CODE) # ----------------------------------------------- m4_define([LT_OPTION_DEFINE], [m4_define(_LT_MANGLE_DEFUN([$1], [$2]), [$3])[]dnl ])# LT_OPTION_DEFINE # dlopen # ------ LT_OPTION_DEFINE([LT_INIT], [dlopen], [enable_dlopen=yes ]) AU_DEFUN([AC_LIBTOOL_DLOPEN], [_LT_SET_OPTION([LT_INIT], [dlopen]) AC_DIAGNOSE([obsolete], [$0: Remove this warning and the call to _LT_SET_OPTION when you put the `dlopen' option into LT_INIT's first parameter.]) ]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_LIBTOOL_DLOPEN], []) # win32-dll # --------- # Declare package support for building win32 dll's. LT_OPTION_DEFINE([LT_INIT], [win32-dll], [enable_win32_dll=yes case $host in *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-cegcc*) AC_CHECK_TOOL(AS, as, false) AC_CHECK_TOOL(DLLTOOL, dlltool, false) AC_CHECK_TOOL(OBJDUMP, objdump, false) ;; esac test -z "$AS" && AS=as _LT_DECL([], [AS], [0], [Assembler program])dnl test -z "$DLLTOOL" && DLLTOOL=dlltool _LT_DECL([], [DLLTOOL], [0], [DLL creation program])dnl test -z "$OBJDUMP" && OBJDUMP=objdump _LT_DECL([], [OBJDUMP], [0], [Object dumper program])dnl ])# win32-dll AU_DEFUN([AC_LIBTOOL_WIN32_DLL], [AC_REQUIRE([AC_CANONICAL_HOST])dnl _LT_SET_OPTION([LT_INIT], [win32-dll]) AC_DIAGNOSE([obsolete], [$0: Remove this warning and the call to _LT_SET_OPTION when you put the `win32-dll' option into LT_INIT's first parameter.]) ]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_LIBTOOL_WIN32_DLL], []) # _LT_ENABLE_SHARED([DEFAULT]) # ---------------------------- # implement the --enable-shared flag, and supports the `shared' and # `disable-shared' LT_INIT options. # DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. m4_define([_LT_ENABLE_SHARED], [m4_define([_LT_ENABLE_SHARED_DEFAULT], [m4_if($1, no, no, yes)])dnl AC_ARG_ENABLE([shared], [AS_HELP_STRING([--enable-shared@<:@=PKGS@:>@], [build shared libraries @<:@default=]_LT_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=]_LT_ENABLE_SHARED_DEFAULT) _LT_DECL([build_libtool_libs], [enable_shared], [0], [Whether or not to build shared libraries]) ])# _LT_ENABLE_SHARED LT_OPTION_DEFINE([LT_INIT], [shared], [_LT_ENABLE_SHARED([yes])]) LT_OPTION_DEFINE([LT_INIT], [disable-shared], [_LT_ENABLE_SHARED([no])]) # Old names: AC_DEFUN([AC_ENABLE_SHARED], [_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[shared]) ]) AC_DEFUN([AC_DISABLE_SHARED], [_LT_SET_OPTION([LT_INIT], [disable-shared]) ]) AU_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)]) AU_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AM_ENABLE_SHARED], []) dnl AC_DEFUN([AM_DISABLE_SHARED], []) # _LT_ENABLE_STATIC([DEFAULT]) # ---------------------------- # implement the --enable-static flag, and support the `static' and # `disable-static' LT_INIT options. # DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. m4_define([_LT_ENABLE_STATIC], [m4_define([_LT_ENABLE_STATIC_DEFAULT], [m4_if($1, no, no, yes)])dnl AC_ARG_ENABLE([static], [AS_HELP_STRING([--enable-static@<:@=PKGS@:>@], [build static libraries @<:@default=]_LT_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=]_LT_ENABLE_STATIC_DEFAULT) _LT_DECL([build_old_libs], [enable_static], [0], [Whether or not to build static libraries]) ])# _LT_ENABLE_STATIC LT_OPTION_DEFINE([LT_INIT], [static], [_LT_ENABLE_STATIC([yes])]) LT_OPTION_DEFINE([LT_INIT], [disable-static], [_LT_ENABLE_STATIC([no])]) # Old names: AC_DEFUN([AC_ENABLE_STATIC], [_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[static]) ]) AC_DEFUN([AC_DISABLE_STATIC], [_LT_SET_OPTION([LT_INIT], [disable-static]) ]) AU_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)]) AU_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AM_ENABLE_STATIC], []) dnl AC_DEFUN([AM_DISABLE_STATIC], []) # _LT_ENABLE_FAST_INSTALL([DEFAULT]) # ---------------------------------- # implement the --enable-fast-install flag, and support the `fast-install' # and `disable-fast-install' LT_INIT options. # DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. m4_define([_LT_ENABLE_FAST_INSTALL], [m4_define([_LT_ENABLE_FAST_INSTALL_DEFAULT], [m4_if($1, no, no, yes)])dnl AC_ARG_ENABLE([fast-install], [AS_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@], [optimize for fast installation @<:@default=]_LT_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=]_LT_ENABLE_FAST_INSTALL_DEFAULT) _LT_DECL([fast_install], [enable_fast_install], [0], [Whether or not to optimize for fast installation])dnl ])# _LT_ENABLE_FAST_INSTALL LT_OPTION_DEFINE([LT_INIT], [fast-install], [_LT_ENABLE_FAST_INSTALL([yes])]) LT_OPTION_DEFINE([LT_INIT], [disable-fast-install], [_LT_ENABLE_FAST_INSTALL([no])]) # Old names: AU_DEFUN([AC_ENABLE_FAST_INSTALL], [_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[fast-install]) AC_DIAGNOSE([obsolete], [$0: Remove this warning and the call to _LT_SET_OPTION when you put the `fast-install' option into LT_INIT's first parameter.]) ]) AU_DEFUN([AC_DISABLE_FAST_INSTALL], [_LT_SET_OPTION([LT_INIT], [disable-fast-install]) AC_DIAGNOSE([obsolete], [$0: Remove this warning and the call to _LT_SET_OPTION when you put the `disable-fast-install' option into LT_INIT's first parameter.]) ]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_ENABLE_FAST_INSTALL], []) dnl AC_DEFUN([AM_DISABLE_FAST_INSTALL], []) # _LT_WITH_PIC([MODE]) # -------------------- # implement the --with-pic flag, and support the `pic-only' and `no-pic' # LT_INIT options. # MODE is either `yes' or `no'. If omitted, it defaults to `both'. m4_define([_LT_WITH_PIC], [AC_ARG_WITH([pic], [AS_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=m4_default([$1], [default]) _LT_DECL([], [pic_mode], [0], [What type of objects to build])dnl ])# _LT_WITH_PIC LT_OPTION_DEFINE([LT_INIT], [pic-only], [_LT_WITH_PIC([yes])]) LT_OPTION_DEFINE([LT_INIT], [no-pic], [_LT_WITH_PIC([no])]) # Old name: AU_DEFUN([AC_LIBTOOL_PICMODE], [_LT_SET_OPTION([LT_INIT], [pic-only]) AC_DIAGNOSE([obsolete], [$0: Remove this warning and the call to _LT_SET_OPTION when you put the `pic-only' option into LT_INIT's first parameter.]) ]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_LIBTOOL_PICMODE], []) ## ----------------- ## ## LTDL_INIT Options ## ## ----------------- ## m4_define([_LTDL_MODE], []) LT_OPTION_DEFINE([LTDL_INIT], [nonrecursive], [m4_define([_LTDL_MODE], [nonrecursive])]) LT_OPTION_DEFINE([LTDL_INIT], [recursive], [m4_define([_LTDL_MODE], [recursive])]) LT_OPTION_DEFINE([LTDL_INIT], [subproject], [m4_define([_LTDL_MODE], [subproject])]) m4_define([_LTDL_TYPE], []) LT_OPTION_DEFINE([LTDL_INIT], [installable], [m4_define([_LTDL_TYPE], [installable])]) LT_OPTION_DEFINE([LTDL_INIT], [convenience], [m4_define([_LTDL_TYPE], [convenience])]) libprelude-1.0.0/m4/libgnutls.m40000664000076400007640000001504211202225026013351 00000000000000dnl Autoconf macros for libgnutls dnl $id$ # Modified for LIBGNUTLS -- nmav # Configure paths for LIBGCRYPT # Shamelessly stolen from the one of XDELTA by Owen Taylor # Werner Koch 99-12-09 dnl AM_PATH_LIBGNUTLS([MINIMUM-VERSION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND ]]]) dnl Test for libgnutls, and define LIBGNUTLS_CFLAGS and LIBGNUTLS_LIBS dnl AC_DEFUN([AM_PATH_LIBGNUTLS], [dnl dnl Get the cflags and libraries from the libgnutls-config script dnl AC_ARG_WITH(libgnutls-prefix, AC_HELP_STRING(--with-libgnutls-prefix=PFX, [Prefix where libgnutls is installed (optional)]), libgnutls_config_prefix="$withval", libgnutls_config_prefix="") if test x$libgnutls_config_prefix != x ; then if test x${LIBGNUTLS_CONFIG+set} != xset ; then LIBGNUTLS_CONFIG=$libgnutls_config_prefix/bin/libgnutls-config fi fi AC_PATH_PROG(LIBGNUTLS_CONFIG, libgnutls-config, no) min_libgnutls_version=ifelse([$1], ,0.1.0,$1) AC_MSG_CHECKING(for libgnutls - version >= $min_libgnutls_version) no_libgnutls="" if test "$LIBGNUTLS_CONFIG" = "no" ; then no_libgnutls=yes else LIBGNUTLS_CFLAGS=`$LIBGNUTLS_CONFIG $libgnutls_config_args --cflags` LIBGNUTLS_LIBS=`$LIBGNUTLS_CONFIG $libgnutls_config_args --libs` libgnutls_config_version=`$LIBGNUTLS_CONFIG $libgnutls_config_args --version` ac_save_CFLAGS="$CFLAGS" ac_save_LIBS="$LIBS" CFLAGS="$CFLAGS $LIBGNUTLS_CFLAGS" LIBS="$LIBS $LIBGNUTLS_LIBS" dnl dnl Now check if the installed libgnutls is sufficiently new. Also sanity dnl checks the results of libgnutls-config to some extent dnl rm -f conf.libgnutlstest AC_TRY_RUN([ #include #include #include #include int main () { system ("touch conf.libgnutlstest"); if( strcmp( gnutls_check_version(NULL), "$libgnutls_config_version" ) ) { printf("\n*** 'libgnutls-config --version' returned %s, but LIBGNUTLS (%s)\n", "$libgnutls_config_version", gnutls_check_version(NULL) ); printf("*** was found! If libgnutls-config was correct, then it is best\n"); printf("*** to remove the old version of LIBGNUTLS. You may also be able to fix the error\n"); printf("*** by modifying your LD_LIBRARY_PATH enviroment variable, or by editing\n"); printf("*** /etc/ld.so.conf. Make sure you have run ldconfig if that is\n"); printf("*** required on your system.\n"); printf("*** If libgnutls-config was wrong, set the environment variable LIBGNUTLS_CONFIG\n"); printf("*** to point to the correct copy of libgnutls-config, and remove the file config.cache\n"); printf("*** before re-running configure\n"); } else if ( strcmp(gnutls_check_version(NULL), LIBGNUTLS_VERSION ) ) { printf("\n*** LIBGNUTLS header file (version %s) does not match\n", LIBGNUTLS_VERSION); printf("*** library (version %s)\n", gnutls_check_version(NULL) ); } else { if ( gnutls_check_version( "$min_libgnutls_version" ) ) { return 0; } else { printf("no\n*** An old version of LIBGNUTLS (%s) was found.\n", gnutls_check_version(NULL) ); printf("*** You need a version of LIBGNUTLS newer than %s. The latest version of\n", "$min_libgnutls_version" ); printf("*** LIBGNUTLS is always available from ftp://gnutls.hellug.gr/pub/gnutls.\n"); printf("*** \n"); printf("*** If you have already installed a sufficiently new version, this error\n"); printf("*** probably means that the wrong copy of the libgnutls-config shell script is\n"); printf("*** being found. The easiest way to fix this is to remove the old version\n"); printf("*** of LIBGNUTLS, but you can also set the LIBGNUTLS_CONFIG environment to point to the\n"); printf("*** correct copy of libgnutls-config. (In this case, you will have to\n"); printf("*** modify your LD_LIBRARY_PATH enviroment variable, or edit /etc/ld.so.conf\n"); printf("*** so that the correct libraries are found at run-time))\n"); } } return 1; } ],, no_libgnutls=yes,[echo $ac_n "cross compiling; assumed OK... $ac_c"]) CFLAGS="$ac_save_CFLAGS" LIBS="$ac_save_LIBS" fi if test "x$no_libgnutls" = x ; then AC_MSG_RESULT(yes) ifelse([$2], , :, [$2]) else if test -f conf.libgnutlstest ; then : else AC_MSG_RESULT(no) fi if test "$LIBGNUTLS_CONFIG" = "no" ; then echo "*** The libgnutls-config script installed by LIBGNUTLS could not be found" echo "*** If LIBGNUTLS was installed in PREFIX, make sure PREFIX/bin is in" echo "*** your path, or set the LIBGNUTLS_CONFIG environment variable to the" echo "*** full path to libgnutls-config." else if test -f conf.libgnutlstest ; then : else echo "*** Could not run libgnutls test program, checking why..." CFLAGS="$CFLAGS $LIBGNUTLS_CFLAGS" LIBS="$LIBS $LIBGNUTLS_LIBS" AC_TRY_LINK([ #include #include #include #include ], [ return !!gnutls_check_version(NULL); ], [ echo "*** The test program compiled, but did not run. This usually means" echo "*** that the run-time linker is not finding LIBGNUTLS or finding the wrong" echo "*** version of LIBGNUTLS. If it is not finding LIBGNUTLS, you'll need to set your" echo "*** LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf to point" echo "*** to the installed location Also, make sure you have run ldconfig if that" echo "*** is required on your system" echo "***" echo "*** If you have an old version installed, it is best to remove it, although" echo "*** you may also be able to get things to work by modifying LD_LIBRARY_PATH" echo "***" ], [ echo "*** The test program failed to compile or link. See the file config.log for the" echo "*** exact error that occured. This usually means LIBGNUTLS was incorrectly installed" echo "*** or that you have moved LIBGNUTLS since it was installed. In the latter case, you" echo "*** may want to edit the libgnutls-config script: $LIBGNUTLS_CONFIG" ]) CFLAGS="$ac_save_CFLAGS" LIBS="$ac_save_LIBS" fi fi LIBGNUTLS_CFLAGS="" LIBGNUTLS_LIBS="" ifelse([$3], , :, [$3]) fi rm -f conf.libgnutlstest AC_SUBST(LIBGNUTLS_CFLAGS) AC_SUBST(LIBGNUTLS_LIBS) ]) dnl *-*wedit:notab*-* Please keep this as the last line. libprelude-1.0.0/m4/ltversion.m40000644000076400007640000000127711347714401013410 00000000000000# ltversion.m4 -- version numbers -*- Autoconf -*- # # Copyright (C) 2004 Free Software Foundation, Inc. # Written by Scott James Remnant, 2004 # # 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. # Generated from ltversion.in. # serial 3017 ltversion.m4 # This file is part of GNU Libtool m4_define([LT_PACKAGE_VERSION], [2.2.6b]) m4_define([LT_PACKAGE_REVISION], [1.3017]) AC_DEFUN([LTVERSION_VERSION], [macro_version='2.2.6b' macro_revision='1.3017' _LT_DECL(, macro_version, 0, [Which release of libtool.m4 was used?]) _LT_DECL(, macro_revision, 0) ]) libprelude-1.0.0/m4/libtool.m40000644000076400007640000077341111347714376013050 00000000000000# libtool.m4 - Configure libtool for the host system. -*-Autoconf-*- # # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, # 2006, 2007, 2008 Free Software Foundation, Inc. # Written by Gordon Matzigkeit, 1996 # # 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. m4_define([_LT_COPYING], [dnl # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, # 2006, 2007, 2008 Free Software Foundation, Inc. # Written by Gordon Matzigkeit, 1996 # # This file is part of GNU Libtool. # # GNU Libtool 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. # # As a special exception to the GNU General Public License, # if you distribute this file as part of a program or library that # is built using GNU Libtool, you may include this file under the # same distribution terms that you use for the rest of that program. # # GNU Libtool 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 GNU Libtool; see the file COPYING. If not, a copy # can be downloaded from http://www.gnu.org/licenses/gpl.html, or # obtained by writing to the Free Software Foundation, Inc., # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ]) # serial 56 LT_INIT # LT_PREREQ(VERSION) # ------------------ # Complain and exit if this libtool version is less that VERSION. m4_defun([LT_PREREQ], [m4_if(m4_version_compare(m4_defn([LT_PACKAGE_VERSION]), [$1]), -1, [m4_default([$3], [m4_fatal([Libtool version $1 or higher is required], 63)])], [$2])]) # _LT_CHECK_BUILDDIR # ------------------ # Complain if the absolute build directory name contains unusual characters m4_defun([_LT_CHECK_BUILDDIR], [case `pwd` in *\ * | *\ *) AC_MSG_WARN([Libtool does not cope well with whitespace in `pwd`]) ;; esac ]) # LT_INIT([OPTIONS]) # ------------------ AC_DEFUN([LT_INIT], [AC_PREREQ([2.58])dnl We use AC_INCLUDES_DEFAULT AC_BEFORE([$0], [LT_LANG])dnl AC_BEFORE([$0], [LT_OUTPUT])dnl AC_BEFORE([$0], [LTDL_INIT])dnl m4_require([_LT_CHECK_BUILDDIR])dnl dnl Autoconf doesn't catch unexpanded LT_ macros by default: m4_pattern_forbid([^_?LT_[A-Z_]+$])dnl m4_pattern_allow([^(_LT_EOF|LT_DLGLOBAL|LT_DLLAZY_OR_NOW|LT_MULTI_MODULE)$])dnl dnl aclocal doesn't pull ltoptions.m4, ltsugar.m4, or ltversion.m4 dnl unless we require an AC_DEFUNed macro: AC_REQUIRE([LTOPTIONS_VERSION])dnl AC_REQUIRE([LTSUGAR_VERSION])dnl AC_REQUIRE([LTVERSION_VERSION])dnl AC_REQUIRE([LTOBSOLETE_VERSION])dnl m4_require([_LT_PROG_LTMAIN])dnl dnl Parse OPTIONS _LT_SET_OPTIONS([$0], [$1]) # This can be used to rebuild libtool when needed LIBTOOL_DEPS="$ltmain" # Always use our own libtool. LIBTOOL='$(SHELL) $(top_builddir)/libtool' AC_SUBST(LIBTOOL)dnl _LT_SETUP # Only expand once: m4_define([LT_INIT]) ])# LT_INIT # Old names: AU_ALIAS([AC_PROG_LIBTOOL], [LT_INIT]) AU_ALIAS([AM_PROG_LIBTOOL], [LT_INIT]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_PROG_LIBTOOL], []) dnl AC_DEFUN([AM_PROG_LIBTOOL], []) # _LT_CC_BASENAME(CC) # ------------------- # Calculate cc_basename. Skip known compiler wrappers and cross-prefix. m4_defun([_LT_CC_BASENAME], [for cc_temp in $1""; do case $cc_temp in compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;; distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;; \-*) ;; *) break;; esac done cc_basename=`$ECHO "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"` ]) # _LT_FILEUTILS_DEFAULTS # ---------------------- # It is okay to use these file commands and assume they have been set # sensibly after `m4_require([_LT_FILEUTILS_DEFAULTS])'. m4_defun([_LT_FILEUTILS_DEFAULTS], [: ${CP="cp -f"} : ${MV="mv -f"} : ${RM="rm -f"} ])# _LT_FILEUTILS_DEFAULTS # _LT_SETUP # --------- m4_defun([_LT_SETUP], [AC_REQUIRE([AC_CANONICAL_HOST])dnl AC_REQUIRE([AC_CANONICAL_BUILD])dnl _LT_DECL([], [host_alias], [0], [The host system])dnl _LT_DECL([], [host], [0])dnl _LT_DECL([], [host_os], [0])dnl dnl _LT_DECL([], [build_alias], [0], [The build system])dnl _LT_DECL([], [build], [0])dnl _LT_DECL([], [build_os], [0])dnl dnl AC_REQUIRE([AC_PROG_CC])dnl AC_REQUIRE([LT_PATH_LD])dnl AC_REQUIRE([LT_PATH_NM])dnl dnl AC_REQUIRE([AC_PROG_LN_S])dnl test -z "$LN_S" && LN_S="ln -s" _LT_DECL([], [LN_S], [1], [Whether we need soft or hard links])dnl dnl AC_REQUIRE([LT_CMD_MAX_LEN])dnl _LT_DECL([objext], [ac_objext], [0], [Object file suffix (normally "o")])dnl _LT_DECL([], [exeext], [0], [Executable file suffix (normally "")])dnl dnl m4_require([_LT_FILEUTILS_DEFAULTS])dnl m4_require([_LT_CHECK_SHELL_FEATURES])dnl m4_require([_LT_CMD_RELOAD])dnl m4_require([_LT_CHECK_MAGIC_METHOD])dnl m4_require([_LT_CMD_OLD_ARCHIVE])dnl m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl _LT_CONFIG_LIBTOOL_INIT([ # See if we are running on zsh, and set the options which allow our # commands through without removal of \ escapes INIT. if test -n "\${ZSH_VERSION+set}" ; then setopt NO_GLOB_SUBST fi ]) if test -n "${ZSH_VERSION+set}" ; then setopt NO_GLOB_SUBST fi _LT_CHECK_OBJDIR m4_require([_LT_TAG_COMPILER])dnl _LT_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. 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 delay expansion of an escaped single quote. delay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g' # Sed substitution to avoid accidental globbing in evaled expressions no_glob_subst='s/\*/\\\*/g' # Global variables: ofile=libtool can_build_shared=yes # All known linkers require a `.a' archive for static linking (except MSVC, # which needs '.lib'). libext=a with_gnu_ld="$lt_cv_prog_gnu_ld" old_CC="$CC" old_CFLAGS="$CFLAGS" # Set sane defaults for various variables test -z "$CC" && CC=cc test -z "$LTCC" && LTCC=$CC test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS test -z "$LD" && LD=ld test -z "$ac_objext" && ac_objext=o _LT_CC_BASENAME([$compiler]) # Only perform the check for file, if the check method requires it test -z "$MAGIC_CMD" && MAGIC_CMD=file case $deplibs_check_method in file_magic*) if test "$file_magic_cmd" = '$MAGIC_CMD'; then _LT_PATH_MAGIC fi ;; esac # Use C for the default configuration in the libtool script LT_SUPPORTED_TAG([CC]) _LT_LANG_C_CONFIG _LT_LANG_DEFAULT_CONFIG _LT_CONFIG_COMMANDS ])# _LT_SETUP # _LT_PROG_LTMAIN # --------------- # Note that this code is called both from `configure', and `config.status' # now that we use AC_CONFIG_COMMANDS to generate libtool. Notably, # `config.status' has no value for ac_aux_dir unless we are using Automake, # so we pass a copy along to make sure it has a sensible value anyway. m4_defun([_LT_PROG_LTMAIN], [m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([ltmain.sh])])dnl _LT_CONFIG_LIBTOOL_INIT([ac_aux_dir='$ac_aux_dir']) ltmain="$ac_aux_dir/ltmain.sh" ])# _LT_PROG_LTMAIN ## ------------------------------------- ## ## Accumulate code for creating libtool. ## ## ------------------------------------- ## # So that we can recreate a full libtool script including additional # tags, we accumulate the chunks of code to send to AC_CONFIG_COMMANDS # in macros and then make a single call at the end using the `libtool' # label. # _LT_CONFIG_LIBTOOL_INIT([INIT-COMMANDS]) # ---------------------------------------- # Register INIT-COMMANDS to be passed to AC_CONFIG_COMMANDS later. m4_define([_LT_CONFIG_LIBTOOL_INIT], [m4_ifval([$1], [m4_append([_LT_OUTPUT_LIBTOOL_INIT], [$1 ])])]) # Initialize. m4_define([_LT_OUTPUT_LIBTOOL_INIT]) # _LT_CONFIG_LIBTOOL([COMMANDS]) # ------------------------------ # Register COMMANDS to be passed to AC_CONFIG_COMMANDS later. m4_define([_LT_CONFIG_LIBTOOL], [m4_ifval([$1], [m4_append([_LT_OUTPUT_LIBTOOL_COMMANDS], [$1 ])])]) # Initialize. m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS]) # _LT_CONFIG_SAVE_COMMANDS([COMMANDS], [INIT_COMMANDS]) # ----------------------------------------------------- m4_defun([_LT_CONFIG_SAVE_COMMANDS], [_LT_CONFIG_LIBTOOL([$1]) _LT_CONFIG_LIBTOOL_INIT([$2]) ]) # _LT_FORMAT_COMMENT([COMMENT]) # ----------------------------- # Add leading comment marks to the start of each line, and a trailing # full-stop to the whole comment if one is not present already. m4_define([_LT_FORMAT_COMMENT], [m4_ifval([$1], [ m4_bpatsubst([m4_bpatsubst([$1], [^ *], [# ])], [['`$\]], [\\\&])]m4_bmatch([$1], [[!?.]$], [], [.]) )]) ## ------------------------ ## ## FIXME: Eliminate VARNAME ## ## ------------------------ ## # _LT_DECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION], [IS-TAGGED?]) # ------------------------------------------------------------------- # CONFIGNAME is the name given to the value in the libtool script. # VARNAME is the (base) name used in the configure script. # VALUE may be 0, 1 or 2 for a computed quote escaped value based on # VARNAME. Any other value will be used directly. m4_define([_LT_DECL], [lt_if_append_uniq([lt_decl_varnames], [$2], [, ], [lt_dict_add_subkey([lt_decl_dict], [$2], [libtool_name], [m4_ifval([$1], [$1], [$2])]) lt_dict_add_subkey([lt_decl_dict], [$2], [value], [$3]) m4_ifval([$4], [lt_dict_add_subkey([lt_decl_dict], [$2], [description], [$4])]) lt_dict_add_subkey([lt_decl_dict], [$2], [tagged?], [m4_ifval([$5], [yes], [no])])]) ]) # _LT_TAGDECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION]) # -------------------------------------------------------- m4_define([_LT_TAGDECL], [_LT_DECL([$1], [$2], [$3], [$4], [yes])]) # lt_decl_tag_varnames([SEPARATOR], [VARNAME1...]) # ------------------------------------------------ m4_define([lt_decl_tag_varnames], [_lt_decl_filter([tagged?], [yes], $@)]) # _lt_decl_filter(SUBKEY, VALUE, [SEPARATOR], [VARNAME1..]) # --------------------------------------------------------- m4_define([_lt_decl_filter], [m4_case([$#], [0], [m4_fatal([$0: too few arguments: $#])], [1], [m4_fatal([$0: too few arguments: $#: $1])], [2], [lt_dict_filter([lt_decl_dict], [$1], [$2], [], lt_decl_varnames)], [3], [lt_dict_filter([lt_decl_dict], [$1], [$2], [$3], lt_decl_varnames)], [lt_dict_filter([lt_decl_dict], $@)])[]dnl ]) # lt_decl_quote_varnames([SEPARATOR], [VARNAME1...]) # -------------------------------------------------- m4_define([lt_decl_quote_varnames], [_lt_decl_filter([value], [1], $@)]) # lt_decl_dquote_varnames([SEPARATOR], [VARNAME1...]) # --------------------------------------------------- m4_define([lt_decl_dquote_varnames], [_lt_decl_filter([value], [2], $@)]) # lt_decl_varnames_tagged([SEPARATOR], [VARNAME1...]) # --------------------------------------------------- m4_define([lt_decl_varnames_tagged], [m4_assert([$# <= 2])dnl _$0(m4_quote(m4_default([$1], [[, ]])), m4_ifval([$2], [[$2]], [m4_dquote(lt_decl_tag_varnames)]), m4_split(m4_normalize(m4_quote(_LT_TAGS)), [ ]))]) m4_define([_lt_decl_varnames_tagged], [m4_ifval([$3], [lt_combine([$1], [$2], [_], $3)])]) # lt_decl_all_varnames([SEPARATOR], [VARNAME1...]) # ------------------------------------------------ m4_define([lt_decl_all_varnames], [_$0(m4_quote(m4_default([$1], [[, ]])), m4_if([$2], [], m4_quote(lt_decl_varnames), m4_quote(m4_shift($@))))[]dnl ]) m4_define([_lt_decl_all_varnames], [lt_join($@, lt_decl_varnames_tagged([$1], lt_decl_tag_varnames([[, ]], m4_shift($@))))dnl ]) # _LT_CONFIG_STATUS_DECLARE([VARNAME]) # ------------------------------------ # Quote a variable value, and forward it to `config.status' so that its # declaration there will have the same value as in `configure'. VARNAME # must have a single quote delimited value for this to work. m4_define([_LT_CONFIG_STATUS_DECLARE], [$1='`$ECHO "X$][$1" | $Xsed -e "$delay_single_quote_subst"`']) # _LT_CONFIG_STATUS_DECLARATIONS # ------------------------------ # We delimit libtool config variables with single quotes, so when # we write them to config.status, we have to be sure to quote all # embedded single quotes properly. In configure, this macro expands # each variable declared with _LT_DECL (and _LT_TAGDECL) into: # # ='`$ECHO "X$" | $Xsed -e "$delay_single_quote_subst"`' m4_defun([_LT_CONFIG_STATUS_DECLARATIONS], [m4_foreach([_lt_var], m4_quote(lt_decl_all_varnames), [m4_n([_LT_CONFIG_STATUS_DECLARE(_lt_var)])])]) # _LT_LIBTOOL_TAGS # ---------------- # Output comment and list of tags supported by the script m4_defun([_LT_LIBTOOL_TAGS], [_LT_FORMAT_COMMENT([The names of the tagged configurations supported by this script])dnl available_tags="_LT_TAGS"dnl ]) # _LT_LIBTOOL_DECLARE(VARNAME, [TAG]) # ----------------------------------- # Extract the dictionary values for VARNAME (optionally with TAG) and # expand to a commented shell variable setting: # # # Some comment about what VAR is for. # visible_name=$lt_internal_name m4_define([_LT_LIBTOOL_DECLARE], [_LT_FORMAT_COMMENT(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [description])))[]dnl m4_pushdef([_libtool_name], m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [libtool_name])))[]dnl m4_case(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [value])), [0], [_libtool_name=[$]$1], [1], [_libtool_name=$lt_[]$1], [2], [_libtool_name=$lt_[]$1], [_libtool_name=lt_dict_fetch([lt_decl_dict], [$1], [value])])[]dnl m4_ifval([$2], [_$2])[]m4_popdef([_libtool_name])[]dnl ]) # _LT_LIBTOOL_CONFIG_VARS # ----------------------- # Produce commented declarations of non-tagged libtool config variables # suitable for insertion in the LIBTOOL CONFIG section of the `libtool' # script. Tagged libtool config variables (even for the LIBTOOL CONFIG # section) are produced by _LT_LIBTOOL_TAG_VARS. m4_defun([_LT_LIBTOOL_CONFIG_VARS], [m4_foreach([_lt_var], m4_quote(_lt_decl_filter([tagged?], [no], [], lt_decl_varnames)), [m4_n([_LT_LIBTOOL_DECLARE(_lt_var)])])]) # _LT_LIBTOOL_TAG_VARS(TAG) # ------------------------- m4_define([_LT_LIBTOOL_TAG_VARS], [m4_foreach([_lt_var], m4_quote(lt_decl_tag_varnames), [m4_n([_LT_LIBTOOL_DECLARE(_lt_var, [$1])])])]) # _LT_TAGVAR(VARNAME, [TAGNAME]) # ------------------------------ m4_define([_LT_TAGVAR], [m4_ifval([$2], [$1_$2], [$1])]) # _LT_CONFIG_COMMANDS # ------------------- # Send accumulated output to $CONFIG_STATUS. Thanks to the lists of # variables for single and double quote escaping we saved from calls # to _LT_DECL, we can put quote escaped variables declarations # into `config.status', and then the shell code to quote escape them in # for loops in `config.status'. Finally, any additional code accumulated # from calls to _LT_CONFIG_LIBTOOL_INIT is expanded. m4_defun([_LT_CONFIG_COMMANDS], [AC_PROVIDE_IFELSE([LT_OUTPUT], dnl If the libtool generation code has been placed in $CONFIG_LT, dnl instead of duplicating it all over again into config.status, dnl then we will have config.status run $CONFIG_LT later, so it dnl needs to know what name is stored there: [AC_CONFIG_COMMANDS([libtool], [$SHELL $CONFIG_LT || AS_EXIT(1)], [CONFIG_LT='$CONFIG_LT'])], dnl If the libtool generation code is destined for config.status, dnl expand the accumulated commands and init code now: [AC_CONFIG_COMMANDS([libtool], [_LT_OUTPUT_LIBTOOL_COMMANDS], [_LT_OUTPUT_LIBTOOL_COMMANDS_INIT])]) ])#_LT_CONFIG_COMMANDS # Initialize. m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS_INIT], [ # The HP-UX ksh and POSIX shell print the target directory to stdout # if CDPATH is set. (unset CDPATH) >/dev/null 2>&1 && unset CDPATH sed_quote_subst='$sed_quote_subst' double_quote_subst='$double_quote_subst' delay_variable_subst='$delay_variable_subst' _LT_CONFIG_STATUS_DECLARATIONS LTCC='$LTCC' LTCFLAGS='$LTCFLAGS' compiler='$compiler_DEFAULT' # Quote evaled strings. for var in lt_decl_all_varnames([[ \ ]], lt_decl_quote_varnames); do case \`eval \\\\\$ECHO "X\\\\\$\$var"\` in *[[\\\\\\\`\\"\\\$]]*) eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"X\\\$\$var\\" | \\\$Xsed -e \\"\\\$sed_quote_subst\\"\\\`\\\\\\"" ;; *) eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" ;; esac done # Double-quote double-evaled strings. for var in lt_decl_all_varnames([[ \ ]], lt_decl_dquote_varnames); do case \`eval \\\\\$ECHO "X\\\\\$\$var"\` in *[[\\\\\\\`\\"\\\$]]*) eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"X\\\$\$var\\" | \\\$Xsed -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\"" ;; *) eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" ;; esac done # Fix-up fallback echo if it was mangled by the above quoting rules. case \$lt_ECHO in *'\\\[$]0 --fallback-echo"')dnl " lt_ECHO=\`\$ECHO "X\$lt_ECHO" | \$Xsed -e 's/\\\\\\\\\\\\\\\[$]0 --fallback-echo"\[$]/\[$]0 --fallback-echo"/'\` ;; esac _LT_OUTPUT_LIBTOOL_INIT ]) # LT_OUTPUT # --------- # This macro allows early generation of the libtool script (before # AC_OUTPUT is called), incase it is used in configure for compilation # tests. AC_DEFUN([LT_OUTPUT], [: ${CONFIG_LT=./config.lt} AC_MSG_NOTICE([creating $CONFIG_LT]) cat >"$CONFIG_LT" <<_LTEOF #! $SHELL # Generated by $as_me. # Run this file to recreate a libtool stub with the current configuration. lt_cl_silent=false SHELL=\${CONFIG_SHELL-$SHELL} _LTEOF cat >>"$CONFIG_LT" <<\_LTEOF AS_SHELL_SANITIZE _AS_PREPARE exec AS_MESSAGE_FD>&1 exec AS_MESSAGE_LOG_FD>>config.log { echo AS_BOX([Running $as_me.]) } >&AS_MESSAGE_LOG_FD lt_cl_help="\ \`$as_me' creates a local libtool stub from the current configuration, for use in further configure time tests before the real libtool is generated. Usage: $[0] [[OPTIONS]] -h, --help print this help, then exit -V, --version print version number, then exit -q, --quiet do not print progress messages -d, --debug don't remove temporary files Report bugs to ." lt_cl_version="\ m4_ifset([AC_PACKAGE_NAME], [AC_PACKAGE_NAME ])config.lt[]dnl m4_ifset([AC_PACKAGE_VERSION], [ AC_PACKAGE_VERSION]) configured by $[0], generated by m4_PACKAGE_STRING. Copyright (C) 2008 Free Software Foundation, Inc. This config.lt script is free software; the Free Software Foundation gives unlimited permision to copy, distribute and modify it." while test $[#] != 0 do case $[1] in --version | --v* | -V ) echo "$lt_cl_version"; exit 0 ;; --help | --h* | -h ) echo "$lt_cl_help"; exit 0 ;; --debug | --d* | -d ) debug=: ;; --quiet | --q* | --silent | --s* | -q ) lt_cl_silent=: ;; -*) AC_MSG_ERROR([unrecognized option: $[1] Try \`$[0] --help' for more information.]) ;; *) AC_MSG_ERROR([unrecognized argument: $[1] Try \`$[0] --help' for more information.]) ;; esac shift done if $lt_cl_silent; then exec AS_MESSAGE_FD>/dev/null fi _LTEOF cat >>"$CONFIG_LT" <<_LTEOF _LT_OUTPUT_LIBTOOL_COMMANDS_INIT _LTEOF cat >>"$CONFIG_LT" <<\_LTEOF AC_MSG_NOTICE([creating $ofile]) _LT_OUTPUT_LIBTOOL_COMMANDS AS_EXIT(0) _LTEOF chmod +x "$CONFIG_LT" # configure is writing to config.log, but config.lt does its own redirection, # appending to config.log, which fails on DOS, as config.log is still kept # open by configure. Here we exec the FD to /dev/null, effectively closing # config.log, so it can be properly (re)opened and appended to by config.lt. if test "$no_create" != yes; then lt_cl_success=: test "$silent" = yes && lt_config_lt_args="$lt_config_lt_args --quiet" exec AS_MESSAGE_LOG_FD>/dev/null $SHELL "$CONFIG_LT" $lt_config_lt_args || lt_cl_success=false exec AS_MESSAGE_LOG_FD>>config.log $lt_cl_success || AS_EXIT(1) fi ])# LT_OUTPUT # _LT_CONFIG(TAG) # --------------- # If TAG is the built-in tag, create an initial libtool script with a # default configuration from the untagged config vars. Otherwise add code # to config.status for appending the configuration named by TAG from the # matching tagged config vars. m4_defun([_LT_CONFIG], [m4_require([_LT_FILEUTILS_DEFAULTS])dnl _LT_CONFIG_SAVE_COMMANDS([ m4_define([_LT_TAG], m4_if([$1], [], [C], [$1]))dnl m4_if(_LT_TAG, [C], [ # See if we are running on zsh, and set the options which allow our # commands through without removal of \ escapes. if test -n "${ZSH_VERSION+set}" ; then setopt NO_GLOB_SUBST fi cfgfile="${ofile}T" trap "$RM \"$cfgfile\"; exit 1" 1 2 15 $RM "$cfgfile" cat <<_LT_EOF >> "$cfgfile" #! $SHELL # `$ECHO "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services. # Generated automatically by $as_me ($PACKAGE$TIMESTAMP) $VERSION # Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: # NOTE: Changes made to this file will be lost: look at ltmain.sh. # _LT_COPYING _LT_LIBTOOL_TAGS # ### BEGIN LIBTOOL CONFIG _LT_LIBTOOL_CONFIG_VARS _LT_LIBTOOL_TAG_VARS # ### END LIBTOOL CONFIG _LT_EOF case $host_os in aix3*) cat <<\_LT_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 _LT_EOF ;; esac _LT_PROG_LTMAIN # 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 '/^# Generated shell functions inserted here/q' "$ltmain" >> "$cfgfile" \ || (rm -f "$cfgfile"; exit 1) _LT_PROG_XSI_SHELLFNS sed -n '/^# Generated shell functions inserted here/,$p' "$ltmain" >> "$cfgfile" \ || (rm -f "$cfgfile"; exit 1) mv -f "$cfgfile" "$ofile" || (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile") chmod +x "$ofile" ], [cat <<_LT_EOF >> "$ofile" dnl Unfortunately we have to use $1 here, since _LT_TAG is not expanded dnl in a comment (ie after a #). # ### BEGIN LIBTOOL TAG CONFIG: $1 _LT_LIBTOOL_TAG_VARS(_LT_TAG) # ### END LIBTOOL TAG CONFIG: $1 _LT_EOF ])dnl /m4_if ], [m4_if([$1], [], [ PACKAGE='$PACKAGE' VERSION='$VERSION' TIMESTAMP='$TIMESTAMP' RM='$RM' ofile='$ofile'], []) ])dnl /_LT_CONFIG_SAVE_COMMANDS ])# _LT_CONFIG # LT_SUPPORTED_TAG(TAG) # --------------------- # Trace this macro to discover what tags are supported by the libtool # --tag option, using: # autoconf --trace 'LT_SUPPORTED_TAG:$1' AC_DEFUN([LT_SUPPORTED_TAG], []) # C support is built-in for now m4_define([_LT_LANG_C_enabled], []) m4_define([_LT_TAGS], []) # LT_LANG(LANG) # ------------- # Enable libtool support for the given language if not already enabled. AC_DEFUN([LT_LANG], [AC_BEFORE([$0], [LT_OUTPUT])dnl m4_case([$1], [C], [_LT_LANG(C)], [C++], [_LT_LANG(CXX)], [Java], [_LT_LANG(GCJ)], [Fortran 77], [_LT_LANG(F77)], [Fortran], [_LT_LANG(FC)], [Windows Resource], [_LT_LANG(RC)], [m4_ifdef([_LT_LANG_]$1[_CONFIG], [_LT_LANG($1)], [m4_fatal([$0: unsupported language: "$1"])])])dnl ])# LT_LANG # _LT_LANG(LANGNAME) # ------------------ m4_defun([_LT_LANG], [m4_ifdef([_LT_LANG_]$1[_enabled], [], [LT_SUPPORTED_TAG([$1])dnl m4_append([_LT_TAGS], [$1 ])dnl m4_define([_LT_LANG_]$1[_enabled], [])dnl _LT_LANG_$1_CONFIG($1)])dnl ])# _LT_LANG # _LT_LANG_DEFAULT_CONFIG # ----------------------- m4_defun([_LT_LANG_DEFAULT_CONFIG], [AC_PROVIDE_IFELSE([AC_PROG_CXX], [LT_LANG(CXX)], [m4_define([AC_PROG_CXX], defn([AC_PROG_CXX])[LT_LANG(CXX)])]) AC_PROVIDE_IFELSE([AC_PROG_F77], [LT_LANG(F77)], [m4_define([AC_PROG_F77], defn([AC_PROG_F77])[LT_LANG(F77)])]) AC_PROVIDE_IFELSE([AC_PROG_FC], [LT_LANG(FC)], [m4_define([AC_PROG_FC], defn([AC_PROG_FC])[LT_LANG(FC)])]) dnl The call to [A][M_PROG_GCJ] is quoted like that to stop aclocal dnl pulling things in needlessly. AC_PROVIDE_IFELSE([AC_PROG_GCJ], [LT_LANG(GCJ)], [AC_PROVIDE_IFELSE([A][M_PROG_GCJ], [LT_LANG(GCJ)], [AC_PROVIDE_IFELSE([LT_PROG_GCJ], [LT_LANG(GCJ)], [m4_ifdef([AC_PROG_GCJ], [m4_define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[LT_LANG(GCJ)])]) m4_ifdef([A][M_PROG_GCJ], [m4_define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[LT_LANG(GCJ)])]) m4_ifdef([LT_PROG_GCJ], [m4_define([LT_PROG_GCJ], defn([LT_PROG_GCJ])[LT_LANG(GCJ)])])])])]) AC_PROVIDE_IFELSE([LT_PROG_RC], [LT_LANG(RC)], [m4_define([LT_PROG_RC], defn([LT_PROG_RC])[LT_LANG(RC)])]) ])# _LT_LANG_DEFAULT_CONFIG # Obsolete macros: AU_DEFUN([AC_LIBTOOL_CXX], [LT_LANG(C++)]) AU_DEFUN([AC_LIBTOOL_F77], [LT_LANG(Fortran 77)]) AU_DEFUN([AC_LIBTOOL_FC], [LT_LANG(Fortran)]) AU_DEFUN([AC_LIBTOOL_GCJ], [LT_LANG(Java)]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_LIBTOOL_CXX], []) dnl AC_DEFUN([AC_LIBTOOL_F77], []) dnl AC_DEFUN([AC_LIBTOOL_FC], []) dnl AC_DEFUN([AC_LIBTOOL_GCJ], []) # _LT_TAG_COMPILER # ---------------- m4_defun([_LT_TAG_COMPILER], [AC_REQUIRE([AC_PROG_CC])dnl _LT_DECL([LTCC], [CC], [1], [A C compiler])dnl _LT_DECL([LTCFLAGS], [CFLAGS], [1], [LTCC compiler flags])dnl _LT_TAGDECL([CC], [compiler], [1], [A language specific compiler])dnl _LT_TAGDECL([with_gcc], [GCC], [0], [Is the compiler the GNU compiler?])dnl # If no C compiler was specified, use CC. LTCC=${LTCC-"$CC"} # If no C compiler flags were specified, use CFLAGS. LTCFLAGS=${LTCFLAGS-"$CFLAGS"} # Allow CC to be a program name with arguments. compiler=$CC ])# _LT_TAG_COMPILER # _LT_COMPILER_BOILERPLATE # ------------------------ # Check for compiler boilerplate output or warnings with # the simple compiler test code. m4_defun([_LT_COMPILER_BOILERPLATE], [m4_require([_LT_DECL_SED])dnl ac_outfile=conftest.$ac_objext echo "$lt_simple_compile_test_code" >conftest.$ac_ext eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err _lt_compiler_boilerplate=`cat conftest.err` $RM conftest* ])# _LT_COMPILER_BOILERPLATE # _LT_LINKER_BOILERPLATE # ---------------------- # Check for linker boilerplate output or warnings with # the simple link test code. m4_defun([_LT_LINKER_BOILERPLATE], [m4_require([_LT_DECL_SED])dnl ac_outfile=conftest.$ac_objext echo "$lt_simple_link_test_code" >conftest.$ac_ext eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err _lt_linker_boilerplate=`cat conftest.err` $RM -r conftest* ])# _LT_LINKER_BOILERPLATE # _LT_REQUIRED_DARWIN_CHECKS # ------------------------- m4_defun_once([_LT_REQUIRED_DARWIN_CHECKS],[ case $host_os in rhapsody* | darwin*) AC_CHECK_TOOL([DSYMUTIL], [dsymutil], [:]) AC_CHECK_TOOL([NMEDIT], [nmedit], [:]) AC_CHECK_TOOL([LIPO], [lipo], [:]) AC_CHECK_TOOL([OTOOL], [otool], [:]) AC_CHECK_TOOL([OTOOL64], [otool64], [:]) _LT_DECL([], [DSYMUTIL], [1], [Tool to manipulate archived DWARF debug symbol files on Mac OS X]) _LT_DECL([], [NMEDIT], [1], [Tool to change global to local symbols on Mac OS X]) _LT_DECL([], [LIPO], [1], [Tool to manipulate fat objects and archives on Mac OS X]) _LT_DECL([], [OTOOL], [1], [ldd/readelf like tool for Mach-O binaries on Mac OS X]) _LT_DECL([], [OTOOL64], [1], [ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4]) AC_CACHE_CHECK([for -single_module linker flag],[lt_cv_apple_cc_single_mod], [lt_cv_apple_cc_single_mod=no if test -z "${LT_MULTI_MODULE}"; then # By default we will add the -single_module flag. You can override # by either setting the environment variable LT_MULTI_MODULE # non-empty at configure time, or by adding -multi_module to the # link flags. rm -rf libconftest.dylib* echo "int foo(void){return 1;}" > conftest.c echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ -dynamiclib -Wl,-single_module conftest.c" >&AS_MESSAGE_LOG_FD $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ -dynamiclib -Wl,-single_module conftest.c 2>conftest.err _lt_result=$? if test -f libconftest.dylib && test ! -s conftest.err && test $_lt_result = 0; then lt_cv_apple_cc_single_mod=yes else cat conftest.err >&AS_MESSAGE_LOG_FD fi rm -rf libconftest.dylib* rm -f conftest.* fi]) AC_CACHE_CHECK([for -exported_symbols_list linker flag], [lt_cv_ld_exported_symbols_list], [lt_cv_ld_exported_symbols_list=no save_LDFLAGS=$LDFLAGS echo "_main" > conftest.sym LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym" AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])], [lt_cv_ld_exported_symbols_list=yes], [lt_cv_ld_exported_symbols_list=no]) LDFLAGS="$save_LDFLAGS" ]) case $host_os in rhapsody* | darwin1.[[012]]) _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;; darwin1.*) _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; darwin*) # darwin 5.x on # if running on 10.5 or later, the deployment target defaults # to the OS version, if on x86, and 10.4, the deployment # target defaults to 10.4. Don't you love it? case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in 10.0,*86*-darwin8*|10.0,*-darwin[[91]]*) _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; 10.[[012]]*) _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; 10.*) _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; esac ;; esac if test "$lt_cv_apple_cc_single_mod" = "yes"; then _lt_dar_single_mod='$single_module' fi if test "$lt_cv_ld_exported_symbols_list" = "yes"; then _lt_dar_export_syms=' ${wl}-exported_symbols_list,$output_objdir/${libname}-symbols.expsym' else _lt_dar_export_syms='~$NMEDIT -s $output_objdir/${libname}-symbols.expsym ${lib}' fi if test "$DSYMUTIL" != ":"; then _lt_dsymutil='~$DSYMUTIL $lib || :' else _lt_dsymutil= fi ;; esac ]) # _LT_DARWIN_LINKER_FEATURES # -------------------------- # Checks for linker and compiler features on darwin m4_defun([_LT_DARWIN_LINKER_FEATURES], [ m4_require([_LT_REQUIRED_DARWIN_CHECKS]) _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_automatic, $1)=yes _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported _LT_TAGVAR(whole_archive_flag_spec, $1)='' _LT_TAGVAR(link_all_deplibs, $1)=yes _LT_TAGVAR(allow_undefined_flag, $1)="$_lt_dar_allow_undefined" case $cc_basename in ifort*) _lt_dar_can_shared=yes ;; *) _lt_dar_can_shared=$GCC ;; esac if test "$_lt_dar_can_shared" = "yes"; then output_verbose_link_cmd=echo _LT_TAGVAR(archive_cmds, $1)="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}" _LT_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}" _LT_TAGVAR(archive_expsym_cmds, $1)="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}" _LT_TAGVAR(module_expsym_cmds, $1)="sed -e 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dar_export_syms}${_lt_dsymutil}" m4_if([$1], [CXX], [ if test "$lt_cv_apple_cc_single_mod" != "yes"; then _LT_TAGVAR(archive_cmds, $1)="\$CC -r -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${_lt_dsymutil}" _LT_TAGVAR(archive_expsym_cmds, $1)="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -r -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${_lt_dar_export_syms}${_lt_dsymutil}" fi ],[]) else _LT_TAGVAR(ld_shlibs, $1)=no fi ]) # _LT_SYS_MODULE_PATH_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. m4_defun([_LT_SYS_MODULE_PATH_AIX], [m4_require([_LT_DECL_SED])dnl AC_LINK_IFELSE(AC_LANG_PROGRAM,[ lt_aix_libpath_sed=' /Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/ p } }' aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` # 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 "$lt_aix_libpath_sed"` fi],[]) if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi ])# _LT_SYS_MODULE_PATH_AIX # _LT_SHELL_INIT(ARG) # ------------------- m4_define([_LT_SHELL_INIT], [ifdef([AC_DIVERSION_NOTICE], [AC_DIVERT_PUSH(AC_DIVERSION_NOTICE)], [AC_DIVERT_PUSH(NOTICE)]) $1 AC_DIVERT_POP ])# _LT_SHELL_INIT # _LT_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. m4_defun([_LT_PROG_ECHO_BACKSLASH], [_LT_SHELL_INIT([ # Check that we are running under the correct shell. SHELL=${CONFIG_SHELL-/bin/sh} case X$lt_ECHO in X*--fallback-echo) # Remove one level of quotation (which was required for Make). ECHO=`echo "$lt_ECHO" | sed 's,\\\\\[$]\\[$]0,'[$]0','` ;; esac ECHO=${lt_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 <<_LT_EOF [$]* _LT_EOF exit 0 fi # The HP-UX ksh and POSIX shell print the target directory to stdout # if CDPATH is set. (unset CDPATH) >/dev/null 2>&1 && unset CDPATH if test -z "$lt_ECHO"; then if test "X${echo_test_string+set}" != Xset; then # find a string as large as possible, as long as the shell can cope with it for cmd in 'sed 50q "[$]0"' 'sed 20q "[$]0"' 'sed 10q "[$]0"' 'sed 2q "[$]0"' 'echo test'; do # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ... if { echo_test_string=`eval $cmd`; } 2>/dev/null && { 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. lt_ECHO=$ECHO if test "X$lt_ECHO" = "X$CONFIG_SHELL [$]0 --fallback-echo"; then lt_ECHO="$CONFIG_SHELL \\\$\[$]0 --fallback-echo" fi AC_SUBST(lt_ECHO) ]) _LT_DECL([], [SHELL], [1], [Shell to use when invoking shell scripts]) _LT_DECL([], [ECHO], [1], [An echo program that does not interpret backslashes]) ])# _LT_PROG_ECHO_BACKSLASH # _LT_ENABLE_LOCK # --------------- m4_defun([_LT_ENABLE_LOCK], [AC_ARG_ENABLE([libtool-lock], [AS_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-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \ s390*-*linux*|s390*-*tpf*|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-*kfreebsd*-gnu) LD="${LD-ld} -m elf_i386_fbsd" ;; x86_64-*linux*) LD="${LD-ld} -m elf_i386" ;; ppc64-*linux*|powerpc64-*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-*kfreebsd*-gnu) LD="${LD-ld} -m elf_x86_64_fbsd" ;; x86_64-*linux*) LD="${LD-ld} -m elf_x86_64" ;; ppc*-*linux*|powerpc*-*linux*) LD="${LD-ld} -m elf64ppc" ;; s390*-*linux*|s390*-*tpf*) 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_LINK_IFELSE([AC_LANG_PROGRAM([[]],[[]])],[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 ;; sparc*-*solaris*) # 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 *64-bit*) case $lt_cv_prog_gnu_ld in yes*) LD="${LD-ld} -m elf64_sparc" ;; *) if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then LD="${LD-ld} -64" fi ;; esac ;; esac fi rm -rf conftest* ;; esac need_locks="$enable_libtool_lock" ])# _LT_ENABLE_LOCK # _LT_CMD_OLD_ARCHIVE # ------------------- m4_defun([_LT_CMD_OLD_ARCHIVE], [AC_CHECK_TOOL(AR, ar, false) test -z "$AR" && AR=ar test -z "$AR_FLAGS" && AR_FLAGS=cru _LT_DECL([], [AR], [1], [The archiver]) _LT_DECL([], [AR_FLAGS], [1]) AC_CHECK_TOOL(STRIP, strip, :) test -z "$STRIP" && STRIP=: _LT_DECL([], [STRIP], [1], [A symbol stripping program]) AC_CHECK_TOOL(RANLIB, ranlib, :) test -z "$RANLIB" && RANLIB=: _LT_DECL([], [RANLIB], [1], [Commands used to install an old-style archive]) # Determine commands to create old-style static archives. old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs' old_postinstall_cmds='chmod 644 $oldlib' old_postuninstall_cmds= if test -n "$RANLIB"; then case $host_os in openbsd*) old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$oldlib" ;; *) old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$oldlib" ;; esac old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib" fi _LT_DECL([], [old_postinstall_cmds], [2]) _LT_DECL([], [old_postuninstall_cmds], [2]) _LT_TAGDECL([], [old_archive_cmds], [2], [Commands used to build an old-style archive]) ])# _LT_CMD_OLD_ARCHIVE # _LT_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, # [OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE]) # ---------------------------------------------------------------- # Check whether the given compiler option works AC_DEFUN([_LT_COMPILER_OPTION], [m4_require([_LT_FILEUTILS_DEFAULTS])dnl m4_require([_LT_DECL_SED])dnl AC_CACHE_CHECK([$1], [$2], [$2=no m4_if([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4]) echo "$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}\{0,1\} :&$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 other than the usual output. $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then $2=yes fi fi $RM conftest* ]) if test x"[$]$2" = xyes; then m4_if([$5], , :, [$5]) else m4_if([$6], , :, [$6]) fi ])# _LT_COMPILER_OPTION # Old name: AU_ALIAS([AC_LIBTOOL_COMPILER_OPTION], [_LT_COMPILER_OPTION]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION], []) # _LT_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, # [ACTION-SUCCESS], [ACTION-FAILURE]) # ---------------------------------------------------- # Check whether the given linker option works AC_DEFUN([_LT_LINKER_OPTION], [m4_require([_LT_FILEUTILS_DEFAULTS])dnl m4_require([_LT_DECL_SED])dnl AC_CACHE_CHECK([$1], [$2], [$2=no save_LDFLAGS="$LDFLAGS" LDFLAGS="$LDFLAGS $3" echo "$lt_simple_link_test_code" > conftest.$ac_ext if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then # The linker 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 $ECHO "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if diff conftest.exp conftest.er2 >/dev/null; then $2=yes fi else $2=yes fi fi $RM -r conftest* LDFLAGS="$save_LDFLAGS" ]) if test x"[$]$2" = xyes; then m4_if([$4], , :, [$4]) else m4_if([$5], , :, [$5]) fi ])# _LT_LINKER_OPTION # Old name: AU_ALIAS([AC_LIBTOOL_LINKER_OPTION], [_LT_LINKER_OPTION]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_LIBTOOL_LINKER_OPTION], []) # LT_CMD_MAX_LEN #--------------- AC_DEFUN([LT_CMD_MAX_LEN], [AC_REQUIRE([AC_CANONICAL_HOST])dnl # 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 teststring="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* | cegcc*) # 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; ;; amigaos*) # On AmigaOS with pdksh, this test takes hours, literally. # So we just punt and use a minimum line length of 8192. lt_cv_sys_max_cmd_len=8192; ;; netbsd* | freebsd* | openbsd* | darwin* | dragonfly*) # This has been around since 386BSD, at least. Likely further. if test -x /sbin/sysctl; then lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax` elif test -x /usr/sbin/sysctl; then lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax` else lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs fi # And add a safety zone lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` ;; interix*) # We know the value 262144 and hardcode it with a safety zone (like BSD) lt_cv_sys_max_cmd_len=196608 ;; osf*) # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not # nice to cause kernel panics so lets avoid the loop below. # First set a reasonable default. lt_cv_sys_max_cmd_len=16384 # if test -x /sbin/sysconfig; then case `/sbin/sysconfig -q proc exec_disable_arg_limit` in *1*) lt_cv_sys_max_cmd_len=-1 ;; esac fi ;; sco3.2v5*) lt_cv_sys_max_cmd_len=102400 ;; sysv5* | sco5v6* | sysv4.2uw2*) kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null` if test -n "$kargmax"; then lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[[ ]]//'` else lt_cv_sys_max_cmd_len=32768 fi ;; *) lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null` if test -n "$lt_cv_sys_max_cmd_len"; then lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` else # Make teststring a little bigger before we do anything with it. # a 1K string should be a reasonable start. for i in 1 2 3 4 5 6 7 8 ; do teststring=$teststring$teststring done SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}} # 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"`$SHELL [$]0 --fallback-echo "X$teststring$teststring" 2>/dev/null` \ = "XX$teststring$teststring"; } >/dev/null 2>&1 && test $i != 17 # 1/2 MB should be enough do i=`expr $i + 1` teststring=$teststring$teststring done # Only check the string length outside the loop. lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1` teststring= # 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` fi ;; 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 max_cmd_len=$lt_cv_sys_max_cmd_len _LT_DECL([], [max_cmd_len], [0], [What is the maximum length of a command?]) ])# LT_CMD_MAX_LEN # Old name: AU_ALIAS([AC_LIBTOOL_SYS_MAX_CMD_LEN], [LT_CMD_MAX_LEN]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN], []) # _LT_HEADER_DLFCN # ---------------- m4_defun([_LT_HEADER_DLFCN], [AC_CHECK_HEADERS([dlfcn.h], [], [], [AC_INCLUDES_DEFAULT])dnl ])# _LT_HEADER_DLFCN # _LT_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE, # ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING) # ---------------------------------------------------------------- m4_defun([_LT_TRY_DLOPEN_SELF], [m4_require([_LT_HEADER_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 <<_LT_EOF [#line __oline__ "configure" #include "confdefs.h" #if HAVE_DLFCN_H #include #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 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); */ } else puts (dlerror ()); return status; }] _LT_EOF if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then (./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null lt_status=$? case x$lt_status in x$lt_dlno_uscore) $1 ;; x$lt_dlneed_uscore) $2 ;; x$lt_dlunknown|x*) $3 ;; esac else : # compilation failed $3 fi fi rm -fr conftest* ])# _LT_TRY_DLOPEN_SELF # LT_SYS_DLOPEN_SELF # ------------------ AC_DEFUN([LT_SYS_DLOPEN_SELF], [m4_require([_LT_HEADER_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* | cegcc*) 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="-ldld"], [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="-ldld"]) ]) ]) ]) ]) ]) ;; 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" wl=$lt_prog_compiler_wl 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_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 wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\" AC_CACHE_CHECK([whether a statically linked program can dlopen itself], lt_cv_dlopen_self_static, [dnl _LT_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 _LT_DECL([dlopen_support], [enable_dlopen], [0], [Whether dlopen is supported]) _LT_DECL([dlopen_self], [enable_dlopen_self], [0], [Whether dlopen of programs is supported]) _LT_DECL([dlopen_self_static], [enable_dlopen_self_static], [0], [Whether dlopen of statically linked programs is supported]) ])# LT_SYS_DLOPEN_SELF # Old name: AU_ALIAS([AC_LIBTOOL_DLOPEN_SELF], [LT_SYS_DLOPEN_SELF]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF], []) # _LT_COMPILER_C_O([TAGNAME]) # --------------------------- # Check to see if options -c and -o are simultaneously supported by compiler. # This macro does not hard code the compiler like AC_PROG_CC_C_O. m4_defun([_LT_COMPILER_C_O], [m4_require([_LT_DECL_SED])dnl m4_require([_LT_FILEUTILS_DEFAULTS])dnl m4_require([_LT_TAG_COMPILER])dnl AC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext], [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)], [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no $RM -r conftest 2>/dev/null mkdir conftest cd conftest mkdir out echo "$lt_simple_compile_test_code" > conftest.$ac_ext 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}\{0,1\} :&$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 $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then _LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes fi fi chmod u+w . 2>&AS_MESSAGE_LOG_FD $RM conftest* # SGI C++ compiler will create directory out/ii_files/ for # template instantiation test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files $RM out/* && rmdir out cd .. $RM -r conftest $RM conftest* ]) _LT_TAGDECL([compiler_c_o], [lt_cv_prog_compiler_c_o], [1], [Does compiler simultaneously support -c and -o options?]) ])# _LT_COMPILER_C_O # _LT_COMPILER_FILE_LOCKS([TAGNAME]) # ---------------------------------- # Check to see if we can do hard links to lock some files if needed m4_defun([_LT_COMPILER_FILE_LOCKS], [m4_require([_LT_ENABLE_LOCK])dnl m4_require([_LT_FILEUTILS_DEFAULTS])dnl _LT_COMPILER_C_O([$1]) hard_links="nottested" if test "$_LT_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 _LT_DECL([], [need_locks], [1], [Must we lock files when doing compilation?]) ])# _LT_COMPILER_FILE_LOCKS # _LT_CHECK_OBJDIR # ---------------- m4_defun([_LT_CHECK_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_objdir=_libs fi rmdir .libs 2>/dev/null]) objdir=$lt_cv_objdir _LT_DECL([], [objdir], [0], [The name of the directory that contains temporary libtool files])dnl m4_pattern_allow([LT_OBJDIR])dnl AC_DEFINE_UNQUOTED(LT_OBJDIR, "$lt_cv_objdir/", [Define to the sub-directory in which libtool stores uninstalled libraries.]) ])# _LT_CHECK_OBJDIR # _LT_LINKER_HARDCODE_LIBPATH([TAGNAME]) # -------------------------------------- # Check hardcoding attributes. m4_defun([_LT_LINKER_HARDCODE_LIBPATH], [AC_MSG_CHECKING([how to hardcode library paths into programs]) _LT_TAGVAR(hardcode_action, $1)= if test -n "$_LT_TAGVAR(hardcode_libdir_flag_spec, $1)" || test -n "$_LT_TAGVAR(runpath_var, $1)" || test "X$_LT_TAGVAR(hardcode_automatic, $1)" = "Xyes" ; then # We can hardcode non-existent directories. if test "$_LT_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_TAGVAR(hardcode_shlibpath_var, $1)" != no && test "$_LT_TAGVAR(hardcode_minus_L, $1)" != no; then # Linking always hardcodes the temporary library directory. _LT_TAGVAR(hardcode_action, $1)=relink else # We can link without hardcoding, and we can hardcode nonexisting dirs. _LT_TAGVAR(hardcode_action, $1)=immediate fi else # We cannot hardcode anything, or else we can only hardcode existing # directories. _LT_TAGVAR(hardcode_action, $1)=unsupported fi AC_MSG_RESULT([$_LT_TAGVAR(hardcode_action, $1)]) if test "$_LT_TAGVAR(hardcode_action, $1)" = relink || test "$_LT_TAGVAR(inherit_rpath, $1)" = yes; 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 _LT_TAGDECL([], [hardcode_action], [0], [How to hardcode a shared library path into an executable]) ])# _LT_LINKER_HARDCODE_LIBPATH # _LT_CMD_STRIPLIB # ---------------- m4_defun([_LT_CMD_STRIPLIB], [m4_require([_LT_DECL_EGREP]) 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" old_striplib="$STRIP -S" AC_MSG_RESULT([yes]) else AC_MSG_RESULT([no]) fi ;; *) AC_MSG_RESULT([no]) ;; esac fi _LT_DECL([], [old_striplib], [1], [Commands to strip libraries]) _LT_DECL([], [striplib], [1]) ])# _LT_CMD_STRIPLIB # _LT_SYS_DYNAMIC_LINKER([TAG]) # ----------------------------- # PORTME Fill in your ld.so characteristics m4_defun([_LT_SYS_DYNAMIC_LINKER], [AC_REQUIRE([AC_CANONICAL_HOST])dnl m4_require([_LT_DECL_EGREP])dnl m4_require([_LT_FILEUTILS_DEFAULTS])dnl m4_require([_LT_DECL_OBJDUMP])dnl m4_require([_LT_DECL_SED])dnl AC_MSG_CHECKING([dynamic linker characteristics]) m4_if([$1], [], [ if test "$GCC" = yes; then case $host_os in darwin*) lt_awk_arg="/^libraries:/,/LR/" ;; *) lt_awk_arg="/^libraries:/" ;; esac lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e "s,=/,/,g"` if $ECHO "$lt_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. lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED -e 's/;/ /g'` else lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` fi # Ok, now we have the path, separated by spaces, we can step through it # and add multilib dir if necessary. lt_tmp_lt_search_path_spec= lt_multi_os_dir=`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null` for lt_sys_path in $lt_search_path_spec; do if test -d "$lt_sys_path/$lt_multi_os_dir"; then lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path/$lt_multi_os_dir" else test -d "$lt_sys_path" && \ lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path" fi done lt_search_path_spec=`$ECHO $lt_tmp_lt_search_path_spec | awk ' BEGIN {RS=" "; FS="/|\n";} { lt_foo=""; lt_count=0; for (lt_i = NF; lt_i > 0; lt_i--) { if ($lt_i != "" && $lt_i != ".") { if ($lt_i == "..") { lt_count++; } else { if (lt_count == 0) { lt_foo="/" $lt_i lt_foo; } else { lt_count--; } } } } if (lt_foo != "") { lt_freq[[lt_foo]]++; } if (lt_freq[[lt_foo]] == 1) { print lt_foo; } }'` sys_lib_search_path_spec=`$ECHO $lt_search_path_spec` else sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" fi]) library_names_spec= libname_spec='lib$name' soname_spec= shrext_cmds=".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" 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' ;; aix[[4-9]]*) 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*) case $host_cpu in powerpc) # Since July 2007 AmigaOS4 officially supports .so libraries. # When compiling the executable, add -use-dynld -Lsobjs: to the compileline. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' ;; m68k) 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' ;; esac ;; beos*) library_names_spec='${libname}${shared_ext}' dynamic_linker="$host_os ld.so" shlibpath_var=LIBRARY_PATH ;; bsdi[[45]]*) 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* | cegcc*) version_type=windows shrext_cmds=".dll" need_version=no need_lib_prefix=no case $GCC,$host_os in yes,cygwin* | yes,mingw* | yes,pw32* | yes,cegcc*) 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~ chmod a+x \$dldir/$dlname~ if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then eval '\''$striplib \$dldir/$dlname'\'' || exit \$?; fi' 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="/usr/lib /lib/w32api /lib /usr/local/lib" ;; mingw* | cegcc*) # 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 library_names_spec='${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_cmds='`test .$module = .yes && echo .so || echo .dylib`' m4_if([$1], [],[ sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"]) 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* | dragonfly*) # DragonFly does not have aout. When/if they implement a new # versioning mechanism, adjust this. if test -x /usr/bin/objformat; then objformat=`/usr/bin/objformat` else case $host_os in freebsd[[123]]*) objformat=aout ;; *) objformat=elf ;; esac fi 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 ;; freebsd3.[[2-9]]* | freebsdelf3.[[2-9]]* | \ freebsd4.[[0-5]] | freebsdelf4.[[0-5]] | freebsd4.1.1 | freebsdelf4.1.1) shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; *) # from 4.6 on, and DragonFly shlibpath_overrides_runpath=yes 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_cmds='.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_cmds='.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_cmds='.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' ;; interix[[3-9]]*) 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' dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; 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* | k*bsd*-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' finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no # Some binutils ld are patched to set DT_RUNPATH save_LDFLAGS=$LDFLAGS save_libdir=$libdir eval "libdir=/foo; wl=\"$_LT_TAGVAR(lt_prog_compiler_wl, $1)\"; \ LDFLAGS=\"\$LDFLAGS $_LT_TAGVAR(hardcode_libdir_flag_spec, $1)\"" AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])], [AS_IF([ ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null], [shlibpath_overrides_runpath=yes])]) LDFLAGS=$save_LDFLAGS libdir=$save_libdir # 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 # Add ABI-specific directories to the system library path. sys_lib_dlsearch_path_spec="/lib64 /usr/lib64 /lib /usr/lib" # Append ld.so.conf contents to the search path if test -f /etc/ld.so.conf; then lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \[$]2)); skip = 1; } { if (!skip) print \[$]0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '` sys_lib_dlsearch_path_spec="$sys_lib_dlsearch_path_spec $lt_ld_extra" fi # 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' ;; 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}${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=qnx 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=no hardcode_into_libs=yes dynamic_linker='ldqnx.so' ;; openbsd*) version_type=sunos sys_lib_dlsearch_path_spec="/usr/lib" need_lib_prefix=no # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs. case $host_os in openbsd3.3 | openbsd3.3.*) need_version=yes ;; *) need_version=no ;; esac 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_cmds=".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" ;; rdos*) dynamic_linker=no ;; 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.3*) 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 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 ;; sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) version_type=freebsd-elf need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes if test "$with_gnu_ld" = yes; then sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' else sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' case $host_os in sco3.2v5*) sys_lib_search_path_spec="$sys_lib_search_path_spec /lib" ;; esac fi sys_lib_dlsearch_path_spec='/usr/lib' ;; tpf*) # TPF is a cross-target only. Preferred cross-host = GNU/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}' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; 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 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 if test "${lt_cv_sys_lib_search_path_spec+set}" = set; then sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec" fi if test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec" fi _LT_DECL([], [variables_saved_for_relink], [1], [Variables whose values should be saved in libtool wrapper scripts and restored at link time]) _LT_DECL([], [need_lib_prefix], [0], [Do we need the "lib" prefix for modules?]) _LT_DECL([], [need_version], [0], [Do we need a version for libraries?]) _LT_DECL([], [version_type], [0], [Library versioning type]) _LT_DECL([], [runpath_var], [0], [Shared library runtime path variable]) _LT_DECL([], [shlibpath_var], [0],[Shared library path variable]) _LT_DECL([], [shlibpath_overrides_runpath], [0], [Is shlibpath searched before the hard-coded library search path?]) _LT_DECL([], [libname_spec], [1], [Format of library name prefix]) _LT_DECL([], [library_names_spec], [1], [[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]]) _LT_DECL([], [soname_spec], [1], [[The coded name of the library, if different from the real name]]) _LT_DECL([], [postinstall_cmds], [2], [Command to use after installation of a shared archive]) _LT_DECL([], [postuninstall_cmds], [2], [Command to use after uninstallation of a shared archive]) _LT_DECL([], [finish_cmds], [2], [Commands used to finish a libtool library installation in a directory]) _LT_DECL([], [finish_eval], [1], [[As "finish_cmds", except a single script fragment to be evaled but not shown]]) _LT_DECL([], [hardcode_into_libs], [0], [Whether we should hardcode library paths into libraries]) _LT_DECL([], [sys_lib_search_path_spec], [2], [Compile-time system search path for libraries]) _LT_DECL([], [sys_lib_dlsearch_path_spec], [2], [Run-time system search path for libraries]) ])# _LT_SYS_DYNAMIC_LINKER # _LT_PATH_TOOL_PREFIX(TOOL) # -------------------------- # find a file program which can recognize shared library AC_DEFUN([_LT_PATH_TOOL_PREFIX], [m4_require([_LT_DECL_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="m4_if([$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 <<_LT_EOF 1>&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 _LT_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 _LT_DECL([], [MAGIC_CMD], [0], [Used to examine libraries when file_magic_cmd begins with "file"])dnl ])# _LT_PATH_TOOL_PREFIX # Old name: AU_ALIAS([AC_PATH_TOOL_PREFIX], [_LT_PATH_TOOL_PREFIX]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_PATH_TOOL_PREFIX], []) # _LT_PATH_MAGIC # -------------- # find a file program which can recognize a shared library m4_defun([_LT_PATH_MAGIC], [_LT_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 _LT_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH) else MAGIC_CMD=: fi fi ])# _LT_PATH_MAGIC # LT_PATH_LD # ---------- # find the pathname to the GNU or non-GNU linker AC_DEFUN([LT_PATH_LD], [AC_REQUIRE([AC_PROG_CC])dnl AC_REQUIRE([AC_CANONICAL_HOST])dnl AC_REQUIRE([AC_CANONICAL_BUILD])dnl m4_require([_LT_DECL_SED])dnl m4_require([_LT_DECL_EGREP])dnl AC_ARG_WITH([gnu-ld], [AS_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])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 pathname 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 variants of GNU ld 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 2>&1; then lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' lt_cv_file_magic_cmd='func_win32_libid' else lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?' lt_cv_file_magic_cmd='$OBJDUMP -f' fi ;; cegcc) # use the weaker test based on 'objdump'. See mingw*. lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?' lt_cv_file_magic_cmd='$OBJDUMP -f' ;; darwin* | rhapsody*) lt_cv_deplibs_check_method=pass_all ;; freebsd* | dragonfly*) if echo __ELF__ | $CC -E - | $GREP __ELF__ > /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|DragonFly)/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 ;; interix[[3-9]]*) # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|\.a)$' ;; irix5* | irix6* | nonstopux*) case $LD in *-32|*"-32 ") libmagic=32-bit;; *-n32|*"-n32 ") libmagic=N32;; *-64|*"-64 ") libmagic=64-bit;; *) libmagic=never-match;; esac lt_cv_deplibs_check_method=pass_all ;; # This must be Linux ELF. linux* | k*bsd*-gnu) lt_cv_deplibs_check_method=pass_all ;; 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=pass_all ;; openbsd*) if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$' else lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' fi ;; osf3* | osf4* | osf5*) lt_cv_deplibs_check_method=pass_all ;; rdos*) lt_cv_deplibs_check_method=pass_all ;; solaris*) lt_cv_deplibs_check_method=pass_all ;; sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) lt_cv_deplibs_check_method=pass_all ;; sysv4 | sysv4.3*) 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 ;; pc) lt_cv_deplibs_check_method=pass_all ;; esac ;; tpf*) 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 _LT_DECL([], [deplibs_check_method], [1], [Method to check whether dependent libraries are shared objects]) _LT_DECL([], [file_magic_cmd], [1], [Command to use when deplibs_check_method == "file_magic"]) ])# _LT_CHECK_MAGIC_METHOD # LT_PATH_NM # ---------- # find the pathname to a BSD- or MS-compatible name lister AC_DEFUN([LT_PATH_NM], [AC_REQUIRE([AC_PROG_CC])dnl AC_CACHE_CHECK([for BSD- or MS-compatible name lister (nm)], lt_cv_path_NM, [if test -n "$NM"; then # Let the user override the test. lt_cv_path_NM="$NM" else lt_nm_to_check="${ac_tool_prefix}nm" if test -n "$ac_tool_prefix" && test "$build" = "$host"; then lt_nm_to_check="$lt_nm_to_check nm" fi for lt_tmp_nm in $lt_nm_to_check; do lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do IFS="$lt_save_ifs" test -z "$ac_dir" && ac_dir=. tmp_nm="$ac_dir/$lt_tmp_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" done : ${lt_cv_path_NM=no} fi]) if test "$lt_cv_path_NM" != "no"; then NM="$lt_cv_path_NM" else # Didn't find any BSD compatible name lister, look for dumpbin. AC_CHECK_TOOLS(DUMPBIN, ["dumpbin -symbols" "link -dump -symbols"], :) AC_SUBST([DUMPBIN]) if test "$DUMPBIN" != ":"; then NM="$DUMPBIN" fi fi test -z "$NM" && NM=nm AC_SUBST([NM]) _LT_DECL([], [NM], [1], [A BSD- or MS-compatible name lister])dnl AC_CACHE_CHECK([the name lister ($NM) interface], [lt_cv_nm_interface], [lt_cv_nm_interface="BSD nm" echo "int some_variable = 0;" > conftest.$ac_ext (eval echo "\"\$as_me:__oline__: $ac_compile\"" >&AS_MESSAGE_LOG_FD) (eval "$ac_compile" 2>conftest.err) cat conftest.err >&AS_MESSAGE_LOG_FD (eval echo "\"\$as_me:__oline__: $NM \\\"conftest.$ac_objext\\\"\"" >&AS_MESSAGE_LOG_FD) (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out) cat conftest.err >&AS_MESSAGE_LOG_FD (eval echo "\"\$as_me:__oline__: output\"" >&AS_MESSAGE_LOG_FD) cat conftest.out >&AS_MESSAGE_LOG_FD if $GREP 'External.*some_variable' conftest.out > /dev/null; then lt_cv_nm_interface="MS dumpbin" fi rm -f conftest*]) ])# LT_PATH_NM # Old names: AU_ALIAS([AM_PROG_NM], [LT_PATH_NM]) AU_ALIAS([AC_PROG_NM], [LT_PATH_NM]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AM_PROG_NM], []) dnl AC_DEFUN([AC_PROG_NM], []) # LT_LIB_M # -------- # check for math library AC_DEFUN([LT_LIB_M], [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_SUBST([LIBM]) ])# LT_LIB_M # Old name: AU_ALIAS([AC_CHECK_LIBM], [LT_LIB_M]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_CHECK_LIBM], []) # _LT_COMPILER_NO_RTTI([TAGNAME]) # ------------------------------- m4_defun([_LT_COMPILER_NO_RTTI], [m4_require([_LT_TAG_COMPILER])dnl _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= if test "$GCC" = yes; then _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' _LT_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions], lt_cv_prog_compiler_rtti_exceptions, [-fno-rtti -fno-exceptions], [], [_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"]) fi _LT_TAGDECL([no_builtin_flag], [lt_prog_compiler_no_builtin_flag], [1], [Compiler flag to turn off builtin functions]) ])# _LT_COMPILER_NO_RTTI # _LT_CMD_GLOBAL_SYMBOLS # ---------------------- m4_defun([_LT_CMD_GLOBAL_SYMBOLS], [AC_REQUIRE([AC_CANONICAL_HOST])dnl AC_REQUIRE([AC_PROG_CC])dnl AC_REQUIRE([LT_PATH_NM])dnl AC_REQUIRE([LT_PATH_LD])dnl m4_require([_LT_DECL_SED])dnl m4_require([_LT_DECL_EGREP])dnl m4_require([_LT_TAG_COMPILER])dnl # 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]]*\)' # Define system-specific variables. case $host_os in aix*) symcode='[[BCDT]]' ;; cygwin* | mingw* | pw32* | cegcc*) symcode='[[ABCDGISTW]]' ;; hpux*) if test "$host_cpu" = ia64; then symcode='[[ABCDEGRST]]' fi ;; irix* | nonstopux*) symcode='[[BCDEGRST]]' ;; osf*) symcode='[[BCDEGQRST]]' ;; solaris*) symcode='[[BDRT]]' ;; sco3.2v5*) symcode='[[DT]]' ;; sysv4.2uw2*) symcode='[[DT]]' ;; sysv5* | sco5v6* | unixware* | OpenUNIX*) symcode='[[ABDT]]' ;; sysv4) symcode='[[DFNSTU]]' ;; 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 # Transform an extracted symbol line into a proper C declaration. # Some systems (esp. on ia64) link data and code symbols differently, # so use this general approach. lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \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\\\", (void *) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (void *) \&\2},/p'" lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n -e 's/^: \([[^ ]]*\) $/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \(lib[[^ ]]*\)$/ {\"\2\", (void *) \&\2},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"lib\2\", (void *) \&\2},/p'" # 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 # Try without a prefix underscore, then with it. for ac_symprfx in "" "_"; do # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol. symxfrm="\\1 $ac_symprfx\\2 \\2" # Write the raw and C identifiers. if test "$lt_cv_nm_interface" = "MS dumpbin"; then # Fake it for dumpbin and say T for any non-static function # and D for any global variable. # Also find C++ and __fastcall symbols from MSVC++, # which start with @ or ?. lt_cv_sys_global_symbol_pipe="$AWK ['"\ " {last_section=section; section=\$ 3};"\ " /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\ " \$ 0!~/External *\|/{next};"\ " / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\ " {if(hide[section]) next};"\ " {f=0}; \$ 0~/\(\).*\|/{f=1}; {printf f ? \"T \" : \"D \"};"\ " {split(\$ 0, a, /\||\r/); split(a[2], s)};"\ " s[1]~/^[@?]/{print s[1], s[1]; next};"\ " s[1]~prfx {split(s[1],t,\"@\"); print t[1], substr(t[1],length(prfx))}"\ " ' prfx=^$ac_symprfx]" else lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[ ]]\($symcode$symcode*\)[[ ]][[ ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'" fi # Check to see that the pipe works correctly. pipe_works=no rm -f conftest* cat > conftest.$ac_ext <<_LT_EOF #ifdef __cplusplus extern "C" { #endif char nm_test_var; void nm_test_func(void); void nm_test_func(void){} #ifdef __cplusplus } #endif int main(){nm_test_var='a';nm_test_func();return(0);} _LT_EOF if AC_TRY_EVAL(ac_compile); then # Now try to grab the symbols. nlist=conftest.nm if AC_TRY_EVAL(NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $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 <<_LT_EOF > conftest.$ac_ext #ifdef __cplusplus extern "C" { #endif _LT_EOF # Now generate the symbol file. eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext' cat <<_LT_EOF >> conftest.$ac_ext /* The mapping between symbol names and symbols. */ const struct { const char *name; void *address; } lt__PROGRAM__LTX_preloaded_symbols[[]] = { { "@PROGRAM@", (void *) 0 }, _LT_EOF $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (void *) \&\2},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext cat <<\_LT_EOF >> conftest.$ac_ext {0, (void *) 0} }; /* This works around a problem in FreeBSD linker */ #ifdef FREEBSD_WORKAROUND static const void *lt_preloaded_setup() { return lt__PROGRAM__LTX_preloaded_symbols; } #endif #ifdef __cplusplus } #endif _LT_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_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 -rf 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 _LT_DECL([global_symbol_pipe], [lt_cv_sys_global_symbol_pipe], [1], [Take the output of nm and produce a listing of raw symbols and C names]) _LT_DECL([global_symbol_to_cdecl], [lt_cv_sys_global_symbol_to_cdecl], [1], [Transform the output of nm in a proper C declaration]) _LT_DECL([global_symbol_to_c_name_address], [lt_cv_sys_global_symbol_to_c_name_address], [1], [Transform the output of nm in a C name address pair]) _LT_DECL([global_symbol_to_c_name_address_lib_prefix], [lt_cv_sys_global_symbol_to_c_name_address_lib_prefix], [1], [Transform the output of nm in a C name address pair when lib prefix is needed]) ]) # _LT_CMD_GLOBAL_SYMBOLS # _LT_COMPILER_PIC([TAGNAME]) # --------------------------- m4_defun([_LT_COMPILER_PIC], [m4_require([_LT_TAG_COMPILER])dnl _LT_TAGVAR(lt_prog_compiler_wl, $1)= _LT_TAGVAR(lt_prog_compiler_pic, $1)= _LT_TAGVAR(lt_prog_compiler_static, $1)= AC_MSG_CHECKING([for $compiler option to produce PIC]) m4_if([$1], [CXX], [ # C++ specific cases for pic, static, wl, etc. if test "$GXX" = yes; then _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_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_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' fi ;; amigaos*) case $host_cpu in powerpc) # see comment about AmigaOS4 .so support _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' ;; m68k) # 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_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' ;; esac ;; beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) # PIC is the default for these OSes. ;; mingw* | cygwin* | os2* | pw32* | cegcc*) # 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). # Although the cygwin gcc ignores -fPIC, still need this for old-style # (--disable-auto-import) libraries m4_if([$1], [GCJ], [], [_LT_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_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' ;; *djgpp*) # DJGPP does not support shared libraries at all _LT_TAGVAR(lt_prog_compiler_pic, $1)= ;; interix[[3-9]]*) # Interix 3.x gcc -fpic/-fPIC options generate broken code. # Instead, we relocate shared libraries at runtime. ;; sysv4*MP*) if test -d /usr/nec; then _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic fi ;; hpux*) # PIC is the default for 64-bit PA HP-UX, but not for 32-bit # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag # sets the default TLS model and affects inlining. case $host_cpu in hppa*64*) ;; *) _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' ;; esac ;; *qnx* | *nto*) # QNX uses GNU C++, but need to define -shared option too, otherwise # it will coredump. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' ;; *) _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' ;; esac else case $host_os in aix[[4-9]]*) # All AIX code is PIC. if test "$host_cpu" = ia64; then # AIX 5 now supports IA64 processor _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' else _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' fi ;; chorus*) case $cc_basename in cxch68*) # Green Hills C++ Compiler # _LT_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_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' ;; ghcx*) # Green Hills C++ Compiler _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' ;; *) ;; esac ;; freebsd* | dragonfly*) # FreeBSD uses GNU C++ ;; hpux9* | hpux10* | hpux11*) case $cc_basename in CC*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' if test "$host_cpu" != ia64; then _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' fi ;; aCC*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' case $host_cpu in hppa*64*|ia64*) # +Z the default ;; *) _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' ;; esac ;; *) ;; esac ;; interix*) # This is c89, which is MS Visual C++ (no shared libs) # Anyone wants to do a port? ;; irix5* | irix6* | nonstopux*) case $cc_basename in CC*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' # CC pic flag -KPIC is the default. ;; *) ;; esac ;; linux* | k*bsd*-gnu) case $cc_basename in KCC*) # KAI C++ Compiler _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' ;; ecpc* ) # old Intel C++ for x86_64 which still supported -KPIC. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' ;; icpc* ) # Intel C++, used to be incompatible with GCC. # ICC 10 doesn't accept -KPIC any more. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' ;; pgCC* | pgcpp*) # Portland Group C++ compiler _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; cxx*) # Compaq C++ # Make sure the PIC flag is empty. It appears that all Alpha # Linux and Compaq Tru64 Unix objects are PIC. _LT_TAGVAR(lt_prog_compiler_pic, $1)= _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' ;; xlc* | xlC*) # IBM XL 8.0 on PPC _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic' _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink' ;; *) case `$CC -V 2>&1 | sed 5q` in *Sun\ C*) # Sun C++ 5.9 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' ;; esac ;; esac ;; lynxos*) ;; m88k*) ;; mvs*) case $cc_basename in cxx*) _LT_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall' ;; *) ;; esac ;; netbsd*) ;; *qnx* | *nto*) # QNX uses GNU C++, but need to define -shared option too, otherwise # it will coredump. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' ;; osf3* | osf4* | osf5*) case $cc_basename in KCC*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' ;; RCC*) # Rational C++ 2.4.1 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' ;; cxx*) # Digital/Compaq C++ _LT_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_TAGVAR(lt_prog_compiler_pic, $1)= _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' ;; *) ;; esac ;; psos*) ;; solaris*) case $cc_basename in CC*) # Sun C++ 4.2, 5.x and Centerline C++ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' ;; gcx*) # Green Hills C++ Compiler _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' ;; *) ;; esac ;; sunos4*) case $cc_basename in CC*) # Sun C++ 4.x _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; lcc*) # Lucid _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' ;; *) ;; esac ;; sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) case $cc_basename in CC*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; esac ;; tandem*) case $cc_basename in NCC*) # NonStop-UX NCC 3.20 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' ;; *) ;; esac ;; vxworks*) ;; *) _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no ;; esac fi ], [ if test "$GCC" = yes; then _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_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_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' fi ;; amigaos*) case $host_cpu in powerpc) # see comment about AmigaOS4 .so support _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' ;; m68k) # 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_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' ;; esac ;; beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) # PIC is the default for these OSes. ;; mingw* | cygwin* | pw32* | os2* | cegcc*) # 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). # Although the cygwin gcc ignores -fPIC, still need this for old-style # (--disable-auto-import) libraries m4_if([$1], [GCJ], [], [_LT_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_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' ;; hpux*) # PIC is the default for 64-bit PA HP-UX, but not for 32-bit # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag # sets the default TLS model and affects inlining. case $host_cpu in hppa*64*) # +Z the default ;; *) _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' ;; esac ;; interix[[3-9]]*) # Interix 3.x gcc -fpic/-fPIC options generate broken code. # Instead, we relocate shared libraries at runtime. ;; msdosdjgpp*) # Just because we use GCC doesn't mean we suddenly get shared libraries # on systems that don't support them. _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no enable_shared=no ;; *nto* | *qnx*) # QNX uses GNU C++, but need to define -shared option too, otherwise # it will coredump. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' ;; sysv4*MP*) if test -d /usr/nec; then _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic fi ;; *) _LT_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_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' if test "$host_cpu" = ia64; then # AIX 5 now supports IA64 processor _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' else _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' fi ;; mingw* | cygwin* | pw32* | os2* | cegcc*) # 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). m4_if([$1], [GCJ], [], [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) ;; hpux9* | hpux10* | hpux11*) _LT_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_TAGVAR(lt_prog_compiler_pic, $1)='+Z' ;; esac # Is there a better lt_prog_compiler_static that works with the bundled CC? _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' ;; irix5* | irix6* | nonstopux*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' # PIC (with -KPIC) is the default. _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' ;; linux* | k*bsd*-gnu) case $cc_basename in # old Intel for x86_64 which still supported -KPIC. ecc*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' ;; # icc used to be incompatible with GCC. # ICC 10 doesn't accept -KPIC any more. icc* | ifort*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' ;; # Lahey Fortran 8.1. lf95*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='--shared' _LT_TAGVAR(lt_prog_compiler_static, $1)='--static' ;; pgcc* | pgf77* | pgf90* | pgf95*) # Portland Group compilers (*not* the Pentium gcc compiler, # which looks to be a dead project) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; ccc*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' # All Alpha code is PIC. _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' ;; xl*) # IBM XL C 8.0/Fortran 10.1 on PPC _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic' _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink' ;; *) case `$CC -V 2>&1 | sed 5q` in *Sun\ C*) # Sun C 5.9 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' ;; *Sun\ F*) # Sun Fortran 8.3 passes all unrecognized flags to the linker _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' _LT_TAGVAR(lt_prog_compiler_wl, $1)='' ;; esac ;; esac ;; newsos6) _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; *nto* | *qnx*) # QNX uses GNU C++, but need to define -shared option too, otherwise # it will coredump. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' ;; osf3* | osf4* | osf5*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' # All OSF/1 code is PIC. _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' ;; rdos*) _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' ;; solaris*) _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' case $cc_basename in f77* | f90* | f95*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';; *) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';; esac ;; sunos4*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; sysv4 | sysv4.2uw2* | sysv4.3*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; sysv4*MP*) if test -d /usr/nec ;then _LT_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' fi ;; sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; unicos*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no ;; uts4*) _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; *) _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no ;; esac fi ]) case $host_os in # For platforms which do not support PIC, -DPIC is meaningless: *djgpp*) _LT_TAGVAR(lt_prog_compiler_pic, $1)= ;; *) _LT_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])" ;; esac AC_MSG_RESULT([$_LT_TAGVAR(lt_prog_compiler_pic, $1)]) _LT_TAGDECL([wl], [lt_prog_compiler_wl], [1], [How to pass a linker flag through the compiler]) # # Check to make sure the PIC flag actually works. # if test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then _LT_COMPILER_OPTION([if $compiler PIC flag $_LT_TAGVAR(lt_prog_compiler_pic, $1) works], [_LT_TAGVAR(lt_cv_prog_compiler_pic_works, $1)], [$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])], [], [case $_LT_TAGVAR(lt_prog_compiler_pic, $1) in "" | " "*) ;; *) _LT_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_TAGVAR(lt_prog_compiler_pic, $1)" ;; esac], [_LT_TAGVAR(lt_prog_compiler_pic, $1)= _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no]) fi _LT_TAGDECL([pic_flag], [lt_prog_compiler_pic], [1], [Additional compiler flags for building library objects]) # # Check to make sure the static flag actually works. # wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) eval lt_tmp_static_flag=\"$_LT_TAGVAR(lt_prog_compiler_static, $1)\" _LT_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works], _LT_TAGVAR(lt_cv_prog_compiler_static_works, $1), $lt_tmp_static_flag, [], [_LT_TAGVAR(lt_prog_compiler_static, $1)=]) _LT_TAGDECL([link_static_flag], [lt_prog_compiler_static], [1], [Compiler flag to prevent dynamic linking]) ])# _LT_COMPILER_PIC # _LT_LINKER_SHLIBS([TAGNAME]) # ---------------------------- # See if the linker supports building shared libraries. m4_defun([_LT_LINKER_SHLIBS], [AC_REQUIRE([LT_PATH_LD])dnl AC_REQUIRE([LT_PATH_NM])dnl m4_require([_LT_FILEUTILS_DEFAULTS])dnl m4_require([_LT_DECL_EGREP])dnl m4_require([_LT_DECL_SED])dnl m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl m4_require([_LT_TAG_COMPILER])dnl AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) m4_if([$1], [CXX], [ _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' case $host_os in aix[[4-9]]*) # 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_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_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_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds" ;; cygwin* | mingw* | cegcc*) _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/;/^.*[[ ]]__nm__/s/^.*[[ ]]__nm__\([[^ ]]*\)[[ ]][[^ ]]*/\1 DATA/;/^I[[ ]]/d;/^[[AITW]][[ ]]/s/.* //'\'' | sort | uniq > $export_symbols' ;; *) _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' ;; esac _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'] ], [ runpath_var= _LT_TAGVAR(allow_undefined_flag, $1)= _LT_TAGVAR(always_export_symbols, $1)=no _LT_TAGVAR(archive_cmds, $1)= _LT_TAGVAR(archive_expsym_cmds, $1)= _LT_TAGVAR(compiler_needs_object, $1)=no _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no _LT_TAGVAR(export_dynamic_flag_spec, $1)= _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' _LT_TAGVAR(hardcode_automatic, $1)=no _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_direct_absolute, $1)=no _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= _LT_TAGVAR(hardcode_libdir_separator, $1)= _LT_TAGVAR(hardcode_minus_L, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported _LT_TAGVAR(inherit_rpath, $1)=no _LT_TAGVAR(link_all_deplibs, $1)=unknown _LT_TAGVAR(module_cmds, $1)= _LT_TAGVAR(module_expsym_cmds, $1)= _LT_TAGVAR(old_archive_from_new_cmds, $1)= _LT_TAGVAR(old_archive_from_expsyms_cmds, $1)= _LT_TAGVAR(thread_safe_flag_spec, $1)= _LT_TAGVAR(whole_archive_flag_spec, $1)= # include_expsyms should be a list of space-separated symbols to be *always* # included in the symbol list _LT_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_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'] # 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. # Exclude shared library initialization/finalization symbols. dnl Note also adjust exclude_expsyms for C++ above. extract_expsyms_cmds= case $host_os in cygwin* | mingw* | pw32* | cegcc*) # 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 ;; interix*) # we just hope/assume this is gcc and not c89 (= MSVC++) with_gnu_ld=yes ;; openbsd*) with_gnu_ld=no ;; esac _LT_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}' # Set some defaults for GNU ld with shared library support. These # are reset later if shared libraries are not supported. Putting them # here allows them to be overridden if necessary. runpath_var=LD_RUN_PATH _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' _LT_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_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' else _LT_TAGVAR(whole_archive_flag_spec, $1)= fi supports_anon_versioning=no case `$LD -v 2>&1` 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 # See if GNU ld supports shared libraries. case $host_os in aix[[3-9]]*) # On AIX/PPC, the GNU linker is very broken if test "$host_cpu" != ia64; then _LT_TAGVAR(ld_shlibs, $1)=no cat <<_LT_EOF 1>&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. _LT_EOF fi ;; amigaos*) case $host_cpu in powerpc) # see comment about AmigaOS4 .so support _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='' ;; m68k) _LT_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_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(hardcode_minus_L, $1)=yes ;; esac ;; beos*) if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then _LT_TAGVAR(allow_undefined_flag, $1)=unsupported # Joseph Beckenbach says some releases of gcc # support --undefined. This deserves some investigation. FIXME _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' else _LT_TAGVAR(ld_shlibs, $1)=no fi ;; cygwin* | mingw* | pw32* | cegcc*) # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, # as there is no search path for DLLs. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(allow_undefined_flag, $1)=unsupported _LT_TAGVAR(always_export_symbols, $1)=no _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/'\'' | $SED -e '\''/^[[AITW]][[ ]]/s/.*[[ ]]//'\'' | sort | uniq > $export_symbols' if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' # If the export-symbols file already is a .def file (1st line # is EXPORTS), use it as is; otherwise, prepend... _LT_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}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' else _LT_TAGVAR(ld_shlibs, $1)=no fi ;; interix[[3-9]]*) _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=no _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. # Instead, shared libraries are loaded at an image base (0x10000000 by # default) and relocated if they conflict, which is a slow very memory # consuming and fragmenting process. To avoid this, we pick a random, # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link # time. Moving up from 0x10000000 also allows more sbrk(2) space. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' ;; gnu* | linux* | tpf* | k*bsd*-gnu) tmp_diet=no if test "$host_os" = linux-dietlibc; then case $cc_basename in diet\ *) tmp_diet=yes;; # linux-dietlibc with static linking (!diet-dyn) esac fi if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \ && test "$tmp_diet" = no then tmp_addflag= tmp_sharedflag='-shared' case $cc_basename,$host_cpu in pgcc*) # Portland Group C compiler _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive' tmp_addflag=' $pic_flag' ;; pgf77* | pgf90* | pgf95*) # Portland Group f77 and f90 compilers _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive' tmp_addflag=' $pic_flag -Mnomain' ;; ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64 tmp_addflag=' -i_dynamic' ;; efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64 tmp_addflag=' -i_dynamic -nofor_main' ;; ifc* | ifort*) # Intel Fortran compiler tmp_addflag=' -nofor_main' ;; lf95*) # Lahey Fortran 8.1 _LT_TAGVAR(whole_archive_flag_spec, $1)= tmp_sharedflag='--shared' ;; xl[[cC]]*) # IBM XL C 8.0 on PPC (deal with xlf below) tmp_sharedflag='-qmkshrobj' tmp_addflag= ;; esac case `$CC -V 2>&1 | sed 5q` in *Sun\ C*) # Sun C 5.9 _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive' _LT_TAGVAR(compiler_needs_object, $1)=yes tmp_sharedflag='-G' ;; *Sun\ F*) # Sun Fortran 8.3 tmp_sharedflag='-G' ;; esac _LT_TAGVAR(archive_cmds, $1)='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' if test "x$supports_anon_versioning" = xyes; then _LT_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 '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' fi case $cc_basename in xlf*) # IBM XL Fortran 10.1 on PPC cannot create shared libs itself _LT_TAGVAR(whole_archive_flag_spec, $1)='--whole-archive$convenience --no-whole-archive' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='-rpath $libdir' _LT_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $compiler_flags -soname $soname -o $lib' if test "x$supports_anon_versioning" = xyes; then _LT_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~ $LD -shared $libobjs $deplibs $compiler_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib' fi ;; esac else _LT_TAGVAR(ld_shlibs, $1)=no fi ;; netbsd*) if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' wlarc= else _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_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*) if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then _LT_TAGVAR(ld_shlibs, $1)=no cat <<_LT_EOF 1>&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. _LT_EOF elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_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_TAGVAR(ld_shlibs, $1)=no fi ;; sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*) case `$LD -v 2>&1` in *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.1[[0-5]].*) _LT_TAGVAR(ld_shlibs, $1)=no cat <<_LT_EOF 1>&2 *** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not *** reliably create shared libraries on SCO systems. Therefore, libtool *** is disabling shared libraries support. We urge you to upgrade GNU *** binutils to release 2.16.91.0.3 or newer. Another option is to modify *** your PATH or compiler configuration so that the native linker is *** used, and then restart. _LT_EOF ;; *) # For security reasons, it is highly recommended that you always # use absolute paths for naming shared libraries, and exclude the # DT_RUNPATH tag from executables and libraries. But doing so # requires that you compile everything twice, which is a pain. if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_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_TAGVAR(ld_shlibs, $1)=no fi ;; esac ;; sunos4*) _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' wlarc= _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; *) if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_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_TAGVAR(ld_shlibs, $1)=no fi ;; esac if test "$_LT_TAGVAR(ld_shlibs, $1)" = no; then runpath_var= _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= _LT_TAGVAR(export_dynamic_flag_spec, $1)= _LT_TAGVAR(whole_archive_flag_spec, $1)= fi else # PORTME fill in a description of your system's linker (not GNU ld) case $host_os in aix3*) _LT_TAGVAR(allow_undefined_flag, $1)=unsupported _LT_TAGVAR(always_export_symbols, $1)=yes _LT_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_TAGVAR(hardcode_minus_L, $1)=yes if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then # Neither direct hardcoding nor static linking is supported with a # broken collect2. _LT_TAGVAR(hardcode_direct, $1)=unsupported fi ;; aix[[4-9]]*) 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_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_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]].*|aix[[5-9]]*) 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_TAGVAR(archive_cmds, $1)='' _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_direct_absolute, $1)=yes _LT_TAGVAR(hardcode_libdir_separator, $1)=':' _LT_TAGVAR(link_all_deplibs, $1)=yes _LT_TAGVAR(file_list_spec, $1)='${wl}-f,' 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 : else # We have old collect2 _LT_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_TAGVAR(hardcode_minus_L, $1)=yes _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)= fi ;; esac shared_flag='-shared' if test "$aix_use_runtimelinking" = yes; then shared_flag="$shared_flag "'${wl}-G' fi 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 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall' # It seems that -bexpall does not export symbols beginning with # underscore (_), so it is better to generate a list of symbols to export. _LT_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_TAGVAR(allow_undefined_flag, $1)='-berok' # Determine the default libpath from the value encoded in an # empty executable. _LT_SYS_MODULE_PATH_AIX _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then $ECHO "X${wl}${allow_undefined_flag}" | $Xsed; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" else if test "$host_cpu" = ia64; then _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib' _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs" _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols" else # Determine the default libpath from the value encoded in an # empty executable. _LT_SYS_MODULE_PATH_AIX _LT_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_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok' _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok' # Exported symbols can be pulled into shared objects from archives _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience' _LT_TAGVAR(archive_cmds_need_lc, $1)=yes # This is similar to how AIX traditionally builds its shared libraries. _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' fi fi ;; amigaos*) case $host_cpu in powerpc) # see comment about AmigaOS4 .so support _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='' ;; m68k) _LT_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_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(hardcode_minus_L, $1)=yes ;; esac ;; bsdi[[45]]*) _LT_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic ;; cygwin* | mingw* | pw32* | cegcc*) # 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_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' _LT_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_cmds=".dll" # FIXME: Setting linknames here is a bad hack. _LT_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `$ECHO "X$deplibs" | $Xsed -e '\''s/ -lc$//'\''` -link -dll~linknames=' # The linker will automatically build a .lib file if we build a DLL. _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' # FIXME: Should let the user specify the lib program. _LT_TAGVAR(old_archive_cmds, $1)='lib -OUT:$oldlib$oldobjs$old_deplibs' _LT_TAGVAR(fix_srcfile_path, $1)='`cygpath -w "$srcfile"`' _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes ;; darwin* | rhapsody*) _LT_DARWIN_LINKER_FEATURES($1) ;; dgux*) _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; freebsd1*) _LT_TAGVAR(ld_shlibs, $1)=no ;; # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor # support. 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_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; # Unfortunately, older versions of FreeBSD 2 do not have this feature. freebsd2*) _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_minus_L, $1)=yes _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; # FreeBSD 3 and greater uses gcc -shared to do shared libraries. freebsd* | dragonfly*) _LT_TAGVAR(archive_cmds, $1)='$CC -shared -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; hpux9*) if test "$GCC" = yes; then _LT_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_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_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: _LT_TAGVAR(hardcode_direct, $1)=yes # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. _LT_TAGVAR(hardcode_minus_L, $1)=yes _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' ;; hpux10*) if test "$GCC" = yes -a "$with_gnu_ld" = no; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' else _LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' fi if test "$with_gnu_ld" = no; then _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_direct_absolute, $1)=yes _LT_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_TAGVAR(hardcode_minus_L, $1)=yes fi ;; hpux11*) if test "$GCC" = yes -a "$with_gnu_ld" = no; then case $host_cpu in hppa*64*) _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' ;; ia64*) _LT_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' ;; *) _LT_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*) _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' ;; ia64*) _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' ;; *) _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' ;; esac fi if test "$with_gnu_ld" = no; then _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: case $host_cpu in hppa*64*|ia64*) _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; *) _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_direct_absolute, $1)=yes _LT_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_TAGVAR(hardcode_minus_L, $1)=yes ;; esac fi ;; irix5* | irix6* | nonstopux*) if test "$GCC" = yes; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' # Try to use the -exported_symbol ld option, if it does not # work, assume that -exports_file does not work either and # implicitly export all symbols. save_LDFLAGS="$LDFLAGS" LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null" AC_LINK_IFELSE(int foo(void) {}, _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations ${wl}-exports_file ${wl}$export_symbols -o $lib' ) LDFLAGS="$save_LDFLAGS" else _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -exports_file $export_symbols -o $lib' fi _LT_TAGVAR(archive_cmds_need_lc, $1)='no' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: _LT_TAGVAR(inherit_rpath, $1)=yes _LT_TAGVAR(link_all_deplibs, $1)=yes ;; netbsd*) if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out else _LT_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF fi _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; newsos6) _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; *nto* | *qnx*) ;; openbsd*) if test -f /usr/libexec/ld.so; then _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_shlibpath_var, $1)=no _LT_TAGVAR(hardcode_direct_absolute, $1)=yes if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' else case $host_os in openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*) _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' ;; *) _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' ;; esac fi else _LT_TAGVAR(ld_shlibs, $1)=no fi ;; os2*) _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(hardcode_minus_L, $1)=yes _LT_TAGVAR(allow_undefined_flag, $1)=unsupported _LT_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_TAGVAR(old_archive_from_new_cmds, $1)='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def' ;; osf3*) if test "$GCC" = yes; then _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' else _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib' fi _LT_TAGVAR(archive_cmds_need_lc, $1)='no' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: ;; osf4* | osf5*) # as osf3* with the addition of -msym flag if test "$GCC" = yes; then _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' else _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -msym -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; printf "%s\\n" "-hidden">> $lib.exp~ $CC -shared${allow_undefined_flag} ${wl}-input ${wl}$lib.exp $compiler_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib~$RM $lib.exp' # Both c and cxx compiler support -rpath directly _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' fi _LT_TAGVAR(archive_cmds_need_lc, $1)='no' _LT_TAGVAR(hardcode_libdir_separator, $1)=: ;; solaris*) _LT_TAGVAR(no_undefined_flag, $1)=' -z defs' if test "$GCC" = yes; then wlarc='${wl}' _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_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}-z ${wl}text ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' else case `$CC -V 2>&1` in *"Compilers 5.0"*) wlarc='' _LT_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_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' ;; *) wlarc='${wl}' _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $compiler_flags' _LT_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} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' ;; esac fi _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' _LT_TAGVAR(hardcode_shlibpath_var, $1)=no case $host_os in solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; *) # The compiler driver will combine and reorder linker options, # but understands `-z linker_flag'. GCC discards it without `$wl', # but is careful enough not to reorder. # Supported since Solaris 2.6 (maybe 2.5.1?) if test "$GCC" = yes; then _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' else _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' fi ;; esac _LT_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_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags' else _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' fi _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_minus_L, $1)=yes _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; sysv4) case $host_vendor in sni) _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(hardcode_direct, $1)=yes # is this really true??? ;; siemens) ## LD is ld it makes a PLAMLIB ## CC just makes a GrossModule. _LT_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs' _LT_TAGVAR(hardcode_direct, $1)=no ;; motorola) _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie ;; esac runpath_var='LD_RUN_PATH' _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; sysv4.3*) _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(hardcode_shlibpath_var, $1)=no _LT_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport' ;; sysv4*MP*) if test -d /usr/nec; then _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(hardcode_shlibpath_var, $1)=no runpath_var=LD_RUN_PATH hardcode_runpath_var=yes _LT_TAGVAR(ld_shlibs, $1)=yes fi ;; sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=no runpath_var='LD_RUN_PATH' if test "$GCC" = yes; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' else _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' fi ;; sysv5* | sco3.2v5* | sco5v6*) # Note: We can NOT use -z defs as we might desire, because we do not # link with -lc, and that would cause any symbols used from libc to # always be unresolved, which means just about no library would # ever link correctly. If we're not using GNU ld we use -z text # though, which does catch some bad symbols but isn't as heavy-handed # as -z defs. _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs' _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=no _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=':' _LT_TAGVAR(link_all_deplibs, $1)=yes _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport' runpath_var='LD_RUN_PATH' if test "$GCC" = yes; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' else _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' fi ;; uts4*) _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; *) _LT_TAGVAR(ld_shlibs, $1)=no ;; esac if test x$host_vendor = xsni; then case $host in sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Blargedynsym' ;; esac fi fi ]) AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)]) test "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no _LT_TAGVAR(with_gnu_ld, $1)=$with_gnu_ld _LT_DECL([], [libext], [0], [Old archive suffix (normally "a")])dnl _LT_DECL([], [shrext_cmds], [1], [Shared library suffix (normally ".so")])dnl _LT_DECL([], [extract_expsyms_cmds], [2], [The commands to extract the exported symbol list from a shared archive]) # # Do we need to explicitly link libc? # case "x$_LT_TAGVAR(archive_cmds_need_lc, $1)" in x|xyes) # Assume -lc should be added _LT_TAGVAR(archive_cmds_need_lc, $1)=yes if test "$enable_shared" = yes && test "$GCC" = yes; then case $_LT_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* echo "$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_TAGVAR(lt_prog_compiler_wl, $1) pic_flag=$_LT_TAGVAR(lt_prog_compiler_pic, $1) compiler_flags=-v linker_flags=-v verstring= output_objdir=. libname=conftest lt_save_allow_undefined_flag=$_LT_TAGVAR(allow_undefined_flag, $1) _LT_TAGVAR(allow_undefined_flag, $1)= if AC_TRY_EVAL(_LT_TAGVAR(archive_cmds, $1) 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) then _LT_TAGVAR(archive_cmds_need_lc, $1)=no else _LT_TAGVAR(archive_cmds_need_lc, $1)=yes fi _LT_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag else cat conftest.err 1>&5 fi $RM conftest* AC_MSG_RESULT([$_LT_TAGVAR(archive_cmds_need_lc, $1)]) ;; esac fi ;; esac _LT_TAGDECL([build_libtool_need_lc], [archive_cmds_need_lc], [0], [Whether or not to add -lc for building shared libraries]) _LT_TAGDECL([allow_libtool_libs_with_static_runtimes], [enable_shared_with_static_runtimes], [0], [Whether or not to disallow shared libs when runtime libs are static]) _LT_TAGDECL([], [export_dynamic_flag_spec], [1], [Compiler flag to allow reflexive dlopens]) _LT_TAGDECL([], [whole_archive_flag_spec], [1], [Compiler flag to generate shared objects directly from archives]) _LT_TAGDECL([], [compiler_needs_object], [1], [Whether the compiler copes with passing no objects directly]) _LT_TAGDECL([], [old_archive_from_new_cmds], [2], [Create an old-style archive from a shared archive]) _LT_TAGDECL([], [old_archive_from_expsyms_cmds], [2], [Create a temporary old-style archive to link instead of a shared archive]) _LT_TAGDECL([], [archive_cmds], [2], [Commands used to build a shared archive]) _LT_TAGDECL([], [archive_expsym_cmds], [2]) _LT_TAGDECL([], [module_cmds], [2], [Commands used to build a loadable module if different from building a shared archive.]) _LT_TAGDECL([], [module_expsym_cmds], [2]) _LT_TAGDECL([], [with_gnu_ld], [1], [Whether we are building with GNU ld or not]) _LT_TAGDECL([], [allow_undefined_flag], [1], [Flag that allows shared libraries with undefined symbols to be built]) _LT_TAGDECL([], [no_undefined_flag], [1], [Flag that enforces no undefined symbols]) _LT_TAGDECL([], [hardcode_libdir_flag_spec], [1], [Flag to hardcode $libdir into a binary during linking. This must work even if $libdir does not exist]) _LT_TAGDECL([], [hardcode_libdir_flag_spec_ld], [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]]) _LT_TAGDECL([], [hardcode_libdir_separator], [1], [Whether we need a single "-rpath" flag with a separated argument]) _LT_TAGDECL([], [hardcode_direct], [0], [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the resulting binary]) _LT_TAGDECL([], [hardcode_direct_absolute], [0], [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the resulting binary and the resulting library dependency is "absolute", i.e impossible to change by setting ${shlibpath_var} if the library is relocated]) _LT_TAGDECL([], [hardcode_minus_L], [0], [Set to "yes" if using the -LDIR flag during linking hardcodes DIR into the resulting binary]) _LT_TAGDECL([], [hardcode_shlibpath_var], [0], [Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into the resulting binary]) _LT_TAGDECL([], [hardcode_automatic], [0], [Set to "yes" if building a shared library automatically hardcodes DIR into the library and all subsequent libraries and executables linked against it]) _LT_TAGDECL([], [inherit_rpath], [0], [Set to yes if linker adds runtime paths of dependent libraries to runtime path list]) _LT_TAGDECL([], [link_all_deplibs], [0], [Whether libtool must link a program against all its dependency libraries]) _LT_TAGDECL([], [fix_srcfile_path], [1], [Fix the shell variable $srcfile for the compiler]) _LT_TAGDECL([], [always_export_symbols], [0], [Set to "yes" if exported symbols are required]) _LT_TAGDECL([], [export_symbols_cmds], [2], [The commands to list exported symbols]) _LT_TAGDECL([], [exclude_expsyms], [1], [Symbols that should not be listed in the preloaded symbols]) _LT_TAGDECL([], [include_expsyms], [1], [Symbols that must always be exported]) _LT_TAGDECL([], [prelink_cmds], [2], [Commands necessary for linking programs (against libraries) with templates]) _LT_TAGDECL([], [file_list_spec], [1], [Specify filename containing input files]) dnl FIXME: Not yet implemented dnl _LT_TAGDECL([], [thread_safe_flag_spec], [1], dnl [Compiler flag to generate thread safe objects]) ])# _LT_LINKER_SHLIBS # _LT_LANG_C_CONFIG([TAG]) # ------------------------ # Ensure that the configuration variables for a C compiler are suitably # defined. These variables are subsequently used by _LT_CONFIG to write # the compiler configuration to `libtool'. m4_defun([_LT_LANG_C_CONFIG], [m4_require([_LT_DECL_EGREP])dnl 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_TAGVAR(objext, $1)=$objext # Code to be used in simple compile tests lt_simple_compile_test_code="int some_variable = 0;" # Code to be used in simple link tests lt_simple_link_test_code='int main(){return(0);}' _LT_TAG_COMPILER # Save the default compiler, since it gets overwritten when the other # tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP. compiler_DEFAULT=$CC # save warnings/boilerplate of simple test code _LT_COMPILER_BOILERPLATE _LT_LINKER_BOILERPLATE ## CAVEAT EMPTOR: ## There is no encapsulation within the following macros, do not change ## the running order or otherwise move them around unless you know exactly ## what you are doing... if test -n "$compiler"; then _LT_COMPILER_NO_RTTI($1) _LT_COMPILER_PIC($1) _LT_COMPILER_C_O($1) _LT_COMPILER_FILE_LOCKS($1) _LT_LINKER_SHLIBS($1) _LT_SYS_DYNAMIC_LINKER($1) _LT_LINKER_HARDCODE_LIBPATH($1) LT_SYS_DLOPEN_SELF _LT_CMD_STRIPLIB # Report which library types will 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 ;; aix[[4-9]]*) if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then test "$enable_shared" = yes && enable_static=no 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]) _LT_CONFIG($1) fi AC_LANG_POP CC="$lt_save_CC" ])# _LT_LANG_C_CONFIG # _LT_PROG_CXX # ------------ # Since AC_PROG_CXX is broken, in that it returns g++ if there is no c++ # compiler, we have our own version here. m4_defun([_LT_PROG_CXX], [ pushdef([AC_MSG_ERROR], [_lt_caught_CXX_error=yes]) AC_PROG_CXX if test -n "$CXX" && ( test "X$CXX" != "Xno" && ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) || (test "X$CXX" != "Xg++"))) ; then AC_PROG_CXXCPP else _lt_caught_CXX_error=yes fi popdef([AC_MSG_ERROR]) ])# _LT_PROG_CXX dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([_LT_PROG_CXX], []) # _LT_LANG_CXX_CONFIG([TAG]) # -------------------------- # Ensure that the configuration variables for a C++ compiler are suitably # defined. These variables are subsequently used by _LT_CONFIG to write # the compiler configuration to `libtool'. m4_defun([_LT_LANG_CXX_CONFIG], [AC_REQUIRE([_LT_PROG_CXX])dnl m4_require([_LT_FILEUTILS_DEFAULTS])dnl m4_require([_LT_DECL_EGREP])dnl AC_LANG_PUSH(C++) _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(allow_undefined_flag, $1)= _LT_TAGVAR(always_export_symbols, $1)=no _LT_TAGVAR(archive_expsym_cmds, $1)= _LT_TAGVAR(compiler_needs_object, $1)=no _LT_TAGVAR(export_dynamic_flag_spec, $1)= _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_direct_absolute, $1)=no _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= _LT_TAGVAR(hardcode_libdir_separator, $1)= _LT_TAGVAR(hardcode_minus_L, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported _LT_TAGVAR(hardcode_automatic, $1)=no _LT_TAGVAR(inherit_rpath, $1)=no _LT_TAGVAR(module_cmds, $1)= _LT_TAGVAR(module_expsym_cmds, $1)= _LT_TAGVAR(link_all_deplibs, $1)=unknown _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds _LT_TAGVAR(no_undefined_flag, $1)= _LT_TAGVAR(whole_archive_flag_spec, $1)= _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no # Source file extension for C++ test sources. ac_ext=cpp # Object file extension for compiled C++ test sources. objext=o _LT_TAGVAR(objext, $1)=$objext # No sense in running all these tests if we already determined that # the CXX compiler isn't working. Some variables (like enable_shared) # are currently assumed to apply to all compilers on this platform, # and will be corrupted by setting them based on a non-working compiler. if test "$_lt_caught_CXX_error" != yes; then # Code to be used in simple compile tests lt_simple_compile_test_code="int some_variable = 0;" # Code to be used in simple link tests lt_simple_link_test_code='int main(int, char *[[]]) { return(0); }' # ltmain only uses $CC for tagged configurations so make sure $CC is set. _LT_TAG_COMPILER # save warnings/boilerplate of simple test code _LT_COMPILER_BOILERPLATE _LT_LINKER_BOILERPLATE # 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 $as_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 $as_unset lt_cv_path_LD fi test -z "${LDCXX+set}" || LD=$LDCXX CC=${CXX-"c++"} compiler=$CC _LT_TAGVAR(compiler, $1)=$CC _LT_CC_BASENAME([$compiler]) if test -n "$compiler"; then # We don't want -fno-exception when compiling C++ code, so set the # no_builtin_flag separately if test "$GXX" = yes; then _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' else _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= fi if test "$GXX" = yes; then # Set up default GNU C++ configuration LT_PATH_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_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_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_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' _LT_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_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' else _LT_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_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_TAGVAR(ld_shlibs, $1)=yes case $host_os in aix3*) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; aix[[4-9]]*) 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]].*|aix[[5-9]]*) 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_TAGVAR(archive_cmds, $1)='' _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_direct_absolute, $1)=yes _LT_TAGVAR(hardcode_libdir_separator, $1)=':' _LT_TAGVAR(link_all_deplibs, $1)=yes _LT_TAGVAR(file_list_spec, $1)='${wl}-f,' 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 : else # We have old collect2 _LT_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_TAGVAR(hardcode_minus_L, $1)=yes _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)= fi esac shared_flag='-shared' if test "$aix_use_runtimelinking" = yes; then shared_flag="$shared_flag "'${wl}-G' fi 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 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall' # It seems that -bexpall does not export symbols beginning with # underscore (_), so it is better to generate a list of symbols to # export. _LT_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_TAGVAR(allow_undefined_flag, $1)='-berok' # Determine the default libpath from the value encoded in an empty # executable. _LT_SYS_MODULE_PATH_AIX _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then $ECHO "X${wl}${allow_undefined_flag}" | $Xsed; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" else if test "$host_cpu" = ia64; then _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib' _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs" _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols" else # Determine the default libpath from the value encoded in an # empty executable. _LT_SYS_MODULE_PATH_AIX _LT_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_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok' _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok' # Exported symbols can be pulled into shared objects from archives _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience' _LT_TAGVAR(archive_cmds_need_lc, $1)=yes # This is similar to how AIX traditionally builds its shared # libraries. _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' fi fi ;; beos*) if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then _LT_TAGVAR(allow_undefined_flag, $1)=unsupported # Joseph Beckenbach says some releases of gcc # support --undefined. This deserves some investigation. FIXME _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' else _LT_TAGVAR(ld_shlibs, $1)=no fi ;; chorus*) case $cc_basename in *) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; esac ;; cygwin* | mingw* | pw32* | cegcc*) # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, # as there is no search path for DLLs. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(allow_undefined_flag, $1)=unsupported _LT_TAGVAR(always_export_symbols, $1)=no _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' # If the export-symbols file already is a .def file (1st line # is EXPORTS), use it as is; otherwise, prepend... _LT_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 -nostdlib $output_objdir/$soname.def $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' else _LT_TAGVAR(ld_shlibs, $1)=no fi ;; darwin* | rhapsody*) _LT_DARWIN_LINKER_FEATURES($1) ;; dgux*) case $cc_basename in ec++*) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; ghcx*) # Green Hills C++ Compiler # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; *) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; esac ;; freebsd[[12]]*) # C++ shared libraries reported to be fairly broken before # switch to ELF _LT_TAGVAR(ld_shlibs, $1)=no ;; freebsd-elf*) _LT_TAGVAR(archive_cmds_need_lc, $1)=no ;; freebsd* | dragonfly*) # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF # conventions _LT_TAGVAR(ld_shlibs, $1)=yes ;; gnu*) ;; hpux9*) _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' _LT_TAGVAR(hardcode_direct, $1)=yes _LT_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_TAGVAR(ld_shlibs, $1)=no ;; aCC*) _LT_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 "X$list" | $Xsed' ;; *) if test "$GXX" = yes; then _LT_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_TAGVAR(ld_shlibs, $1)=no fi ;; esac ;; hpux10*|hpux11*) if test $with_gnu_ld = no; then _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: case $host_cpu in hppa*64*|ia64*) ;; *) _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' ;; esac fi case $host_cpu in hppa*64*|ia64*) _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; *) _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_direct_absolute, $1)=yes _LT_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_TAGVAR(ld_shlibs, $1)=no ;; aCC*) case $host_cpu in hppa*64*) _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; ia64*) _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; *) _LT_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 "X$list" | $Xsed' ;; *) if test "$GXX" = yes; then if test $with_gnu_ld = no; then case $host_cpu in hppa*64*) _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; ia64*) _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; *) _LT_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_TAGVAR(ld_shlibs, $1)=no fi ;; esac ;; interix[[3-9]]*) _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=no _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. # Instead, shared libraries are loaded at an image base (0x10000000 by # default) and relocated if they conflict, which is a slow very memory # consuming and fragmenting process. To avoid this, we pick a random, # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link # time. Moving up from 0x10000000 also allows more sbrk(2) space. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' ;; irix5* | irix6*) case $cc_basename in CC*) # SGI C++ _LT_TAGVAR(archive_cmds, $1)='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_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_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_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' else _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` -o $lib' fi fi _LT_TAGVAR(link_all_deplibs, $1)=yes ;; esac _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: _LT_TAGVAR(inherit_rpath, $1)=yes ;; linux* | k*bsd*-gnu) 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_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_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 "X$list" | $Xsed' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' _LT_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_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' ;; icpc* | ecpc* ) # Intel C++ with_gnu_ld=yes # version 8.0 and above of icpc choke on multiply defined symbols # if we add $predep_objects and $postdep_objects, however 7.1 and # earlier do not add the objects themselves. case `$CC -V 2>&1` in *"Version 7."*) _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_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' ;; *) # Version 8.0 or newer tmp_idyn= case $host_cpu in ia64*) tmp_idyn=' -i_dynamic';; esac _LT_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' ;; esac _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive' ;; pgCC* | pgcpp*) # Portland Group C++ compiler case `$CC -V` in *pgCC\ [[1-5]]* | *pgcpp\ [[1-5]]*) _LT_TAGVAR(prelink_cmds, $1)='tpldir=Template.dir~ rm -rf $tpldir~ $CC --prelink_objects --instantiation_dir $tpldir $objs $libobjs $compile_deplibs~ compile_command="$compile_command `find $tpldir -name \*.o | $NL2SP`"' _LT_TAGVAR(old_archive_cmds, $1)='tpldir=Template.dir~ rm -rf $tpldir~ $CC --prelink_objects --instantiation_dir $tpldir $oldobjs$old_deplibs~ $AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | $NL2SP`~ $RANLIB $oldlib' _LT_TAGVAR(archive_cmds, $1)='tpldir=Template.dir~ rm -rf $tpldir~ $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='tpldir=Template.dir~ rm -rf $tpldir~ $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib' ;; *) # Version 6 will use weak symbols _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib' ;; esac _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive' ;; cxx*) # Compaq C++ _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_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_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' _LT_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 "X$templist" | $Xsed -e "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 "X$list" | $Xsed' ;; xl*) # IBM XL 8.0 on PPC, with GNU ld _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' _LT_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' if test "x$supports_anon_versioning" = xyes; then _LT_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 -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' fi ;; *) case `$CC -V 2>&1 | sed 5q` in *Sun\ C*) # Sun C++ 5.9 _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs' _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file ${wl}$export_symbols' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive' _LT_TAGVAR(compiler_needs_object, $1)=yes # Not sure whether something based on # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 # would be better. output_verbose_link_cmd='echo' # 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_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' ;; esac ;; esac ;; lynxos*) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; m88k*) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; mvs*) case $cc_basename in cxx*) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; *) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; esac ;; netbsd*) if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags' wlarc= _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' _LT_TAGVAR(hardcode_direct, $1)=yes _LT_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::"' ;; *nto* | *qnx*) _LT_TAGVAR(ld_shlibs, $1)=yes ;; openbsd2*) # C++ shared libraries are fairly broken _LT_TAGVAR(ld_shlibs, $1)=no ;; openbsd*) if test -f /usr/libexec/ld.so; then _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_shlibpath_var, $1)=no _LT_TAGVAR(hardcode_direct_absolute, $1)=yes _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file,$export_symbols -o $lib' _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' fi output_verbose_link_cmd=echo else _LT_TAGVAR(ld_shlibs, $1)=no fi ;; osf3* | 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_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_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: # Archives containing C++ object files must be created using # the KAI C++ compiler. case $host in osf3*) _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' ;; *) _LT_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs' ;; esac ;; RCC*) # Rational C++ 2.4.1 # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; cxx*) case $host in osf3*) _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $soname `test -n "$verstring" && $ECHO "X${wl}-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' ;; *) _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib' _LT_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 "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib~ $RM $lib.exp' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' ;; esac _LT_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 "X$templist" | $Xsed -e "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 "X$list" | $Xsed' ;; *) if test "$GXX" = yes && test "$with_gnu_ld" = no; then _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' case $host in osf3*) _LT_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 "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' ;; *) _LT_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" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' ;; esac _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' _LT_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_TAGVAR(ld_shlibs, $1)=no fi ;; esac ;; psos*) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; sunos4*) case $cc_basename in CC*) # Sun C++ 4.x # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; lcc*) # Lucid # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; *) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; esac ;; solaris*) case $cc_basename in CC*) # Sun C++ 4.2, 5.x and Centerline C++ _LT_TAGVAR(archive_cmds_need_lc,$1)=yes _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs' _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' _LT_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} ${wl}-M ${wl}$lib.exp -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' _LT_TAGVAR(hardcode_shlibpath_var, $1)=no case $host_os in solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; *) # The compiler driver will combine and reorder linker options, # but understands `-z linker_flag'. # Supported since Solaris 2.6 (maybe 2.5.1?) _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' ;; esac _LT_TAGVAR(link_all_deplibs, $1)=yes output_verbose_link_cmd='echo' # 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_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' ;; gcx*) # Green Hills C++ Compiler _LT_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_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_TAGVAR(no_undefined_flag, $1)=' ${wl}-z ${wl}defs' if $CC --version | $GREP -v '^2\.7' > /dev/null; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' _LT_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_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' _LT_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_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $wl$libdir' case $host_os in solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; *) _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' ;; esac fi ;; esac ;; sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=no runpath_var='LD_RUN_PATH' case $cc_basename in CC*) _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' ;; *) _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' ;; esac ;; sysv5* | sco3.2v5* | sco5v6*) # Note: We can NOT use -z defs as we might desire, because we do not # link with -lc, and that would cause any symbols used from libc to # always be unresolved, which means just about no library would # ever link correctly. If we're not using GNU ld we use -z text # though, which does catch some bad symbols but isn't as heavy-handed # as -z defs. _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs' _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=no _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=':' _LT_TAGVAR(link_all_deplibs, $1)=yes _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport' runpath_var='LD_RUN_PATH' case $cc_basename in CC*) _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' ;; *) _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' ;; esac ;; tandem*) case $cc_basename in NCC*) # NonStop-UX NCC 3.20 # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; *) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; esac ;; vxworks*) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; *) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; esac AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)]) test "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no _LT_TAGVAR(GCC, $1)="$GXX" _LT_TAGVAR(LD, $1)="$LD" ## CAVEAT EMPTOR: ## There is no encapsulation within the following macros, do not change ## the running order or otherwise move them around unless you know exactly ## what you are doing... _LT_SYS_HIDDEN_LIBDEPS($1) _LT_COMPILER_PIC($1) _LT_COMPILER_C_O($1) _LT_COMPILER_FILE_LOCKS($1) _LT_LINKER_SHLIBS($1) _LT_SYS_DYNAMIC_LINKER($1) _LT_LINKER_HARDCODE_LIBPATH($1) _LT_CONFIG($1) fi # test -n "$compiler" CC=$lt_save_CC LDCXX=$LD LD=$lt_save_LD GCC=$lt_save_GCC 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 fi # test "$_lt_caught_CXX_error" != yes AC_LANG_POP ])# _LT_LANG_CXX_CONFIG # _LT_SYS_HIDDEN_LIBDEPS([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. m4_defun([_LT_SYS_HIDDEN_LIBDEPS], [m4_require([_LT_FILEUTILS_DEFAULTS])dnl # Dependencies to place before and after the object being linked: _LT_TAGVAR(predep_objects, $1)= _LT_TAGVAR(postdep_objects, $1)= _LT_TAGVAR(predeps, $1)= _LT_TAGVAR(postdeps, $1)= _LT_TAGVAR(compiler_lib_search_path, $1)= 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... m4_if([$1], [], [cat > conftest.$ac_ext <<_LT_EOF int a; void foo (void) { a = 0; } _LT_EOF ], [$1], [CXX], [cat > conftest.$ac_ext <<_LT_EOF class Foo { public: Foo (void) { a = 0; } private: int a; }; _LT_EOF ], [$1], [F77], [cat > conftest.$ac_ext <<_LT_EOF subroutine foo implicit none integer*4 a a=0 return end _LT_EOF ], [$1], [FC], [cat > conftest.$ac_ext <<_LT_EOF subroutine foo implicit none integer a a=0 return end _LT_EOF ], [$1], [GCJ], [cat > conftest.$ac_ext <<_LT_EOF public class foo { private int a; public void bar (void) { a = 0; } }; _LT_EOF ]) dnl Parse the compiler output and extract the necessary dnl objects, libraries and library flags. if AC_TRY_EVAL(ac_compile); then # Parse the compiler output and extract the necessary # objects, libraries and library flags. # Sentinel used to keep track of whether or not we are before # the conftest object file. pre_test_object_deps_done=no for p in `eval "$output_verbose_link_cmd"`; do case $p in -L* | -R* | -l*) # Some compilers place space between "-{L,R}" and the path. # Remove the space. if test $p = "-L" || test $p = "-R"; then prev=$p continue else prev= fi if test "$pre_test_object_deps_done" = no; then case $p in -L* | -R*) # Internal compiler library paths should come after those # provided the user. The postdeps already come after the # user supplied libs so there is no need to process them. if test -z "$_LT_TAGVAR(compiler_lib_search_path, $1)"; then _LT_TAGVAR(compiler_lib_search_path, $1)="${prev}${p}" else _LT_TAGVAR(compiler_lib_search_path, $1)="${_LT_TAGVAR(compiler_lib_search_path, $1)} ${prev}${p}" fi ;; # The "-l" case would never come before the object being # linked, so don't bother handling this case. esac else if test -z "$_LT_TAGVAR(postdeps, $1)"; then _LT_TAGVAR(postdeps, $1)="${prev}${p}" else _LT_TAGVAR(postdeps, $1)="${_LT_TAGVAR(postdeps, $1)} ${prev}${p}" fi fi ;; *.$objext) # This assumes that the test object file only shows up # once in the compiler output. if test "$p" = "conftest.$objext"; then pre_test_object_deps_done=yes continue fi if test "$pre_test_object_deps_done" = no; then if test -z "$_LT_TAGVAR(predep_objects, $1)"; then _LT_TAGVAR(predep_objects, $1)="$p" else _LT_TAGVAR(predep_objects, $1)="$_LT_TAGVAR(predep_objects, $1) $p" fi else if test -z "$_LT_TAGVAR(postdep_objects, $1)"; then _LT_TAGVAR(postdep_objects, $1)="$p" else _LT_TAGVAR(postdep_objects, $1)="$_LT_TAGVAR(postdep_objects, $1) $p" fi fi ;; *) ;; # Ignore the rest. esac done # Clean up. rm -f a.out a.exe else echo "libtool.m4: error: problem compiling $1 test program" fi $RM -f confest.$objext # PORTME: override above test on systems where it is broken m4_if([$1], [CXX], [case $host_os in interix[[3-9]]*) # Interix 3.5 installs completely hosed .la files for C++, so rather than # hack all around it, let's just trust "g++" to DTRT. _LT_TAGVAR(predep_objects,$1)= _LT_TAGVAR(postdep_objects,$1)= _LT_TAGVAR(postdeps,$1)= ;; linux*) case `$CC -V 2>&1 | sed 5q` in *Sun\ C*) # Sun C++ 5.9 # The more standards-conforming stlport4 library is # incompatible with the Cstd library. Avoid specifying # it if it's in CXXFLAGS. Ignore libCrun as # -library=stlport4 depends on it. case " $CXX $CXXFLAGS " in *" -library=stlport4 "*) solaris_use_stlport4=yes ;; esac if test "$solaris_use_stlport4" != yes; then _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun' fi ;; esac ;; solaris*) case $cc_basename in CC*) # The more standards-conforming stlport4 library is # incompatible with the Cstd library. Avoid specifying # it if it's in CXXFLAGS. Ignore libCrun as # -library=stlport4 depends on it. case " $CXX $CXXFLAGS " in *" -library=stlport4 "*) solaris_use_stlport4=yes ;; esac # Adding this requires a known-good setup of shared libraries for # Sun compiler versions before 5.6, else PIC objects from an old # archive will be linked into the output, leading to subtle bugs. if test "$solaris_use_stlport4" != yes; then _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun' fi ;; esac ;; esac ]) case " $_LT_TAGVAR(postdeps, $1) " in *" -lc "*) _LT_TAGVAR(archive_cmds_need_lc, $1)=no ;; esac _LT_TAGVAR(compiler_lib_search_dirs, $1)= if test -n "${_LT_TAGVAR(compiler_lib_search_path, $1)}"; then _LT_TAGVAR(compiler_lib_search_dirs, $1)=`echo " ${_LT_TAGVAR(compiler_lib_search_path, $1)}" | ${SED} -e 's! -L! !g' -e 's!^ !!'` fi _LT_TAGDECL([], [compiler_lib_search_dirs], [1], [The directories searched by this compiler when creating a shared library]) _LT_TAGDECL([], [predep_objects], [1], [Dependencies to place before and after the objects being linked to create a shared library]) _LT_TAGDECL([], [postdep_objects], [1]) _LT_TAGDECL([], [predeps], [1]) _LT_TAGDECL([], [postdeps], [1]) _LT_TAGDECL([], [compiler_lib_search_path], [1], [The library search path used internally by the compiler when linking a shared library]) ])# _LT_SYS_HIDDEN_LIBDEPS # _LT_PROG_F77 # ------------ # Since AC_PROG_F77 is broken, in that it returns the empty string # if there is no fortran compiler, we have our own version here. m4_defun([_LT_PROG_F77], [ pushdef([AC_MSG_ERROR], [_lt_disable_F77=yes]) AC_PROG_F77 if test -z "$F77" || test "X$F77" = "Xno"; then _lt_disable_F77=yes fi popdef([AC_MSG_ERROR]) ])# _LT_PROG_F77 dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([_LT_PROG_F77], []) # _LT_LANG_F77_CONFIG([TAG]) # -------------------------- # Ensure that the configuration variables for a Fortran 77 compiler are # suitably defined. These variables are subsequently used by _LT_CONFIG # to write the compiler configuration to `libtool'. m4_defun([_LT_LANG_F77_CONFIG], [AC_REQUIRE([_LT_PROG_F77])dnl AC_LANG_PUSH(Fortran 77) _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(allow_undefined_flag, $1)= _LT_TAGVAR(always_export_symbols, $1)=no _LT_TAGVAR(archive_expsym_cmds, $1)= _LT_TAGVAR(export_dynamic_flag_spec, $1)= _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_direct_absolute, $1)=no _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= _LT_TAGVAR(hardcode_libdir_separator, $1)= _LT_TAGVAR(hardcode_minus_L, $1)=no _LT_TAGVAR(hardcode_automatic, $1)=no _LT_TAGVAR(inherit_rpath, $1)=no _LT_TAGVAR(module_cmds, $1)= _LT_TAGVAR(module_expsym_cmds, $1)= _LT_TAGVAR(link_all_deplibs, $1)=unknown _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds _LT_TAGVAR(no_undefined_flag, $1)= _LT_TAGVAR(whole_archive_flag_spec, $1)= _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no # Source file extension for f77 test sources. ac_ext=f # Object file extension for compiled f77 test sources. objext=o _LT_TAGVAR(objext, $1)=$objext # No sense in running all these tests if we already determined that # the F77 compiler isn't working. Some variables (like enable_shared) # are currently assumed to apply to all compilers on this platform, # and will be corrupted by setting them based on a non-working compiler. if test "$_lt_disable_F77" != yes; then # Code to be used in simple compile tests lt_simple_compile_test_code="\ subroutine t return end " # Code to be used in simple link tests lt_simple_link_test_code="\ program t end " # ltmain only uses $CC for tagged configurations so make sure $CC is set. _LT_TAG_COMPILER # save warnings/boilerplate of simple test code _LT_COMPILER_BOILERPLATE _LT_LINKER_BOILERPLATE # Allow CC to be a program name with arguments. lt_save_CC="$CC" lt_save_GCC=$GCC CC=${F77-"f77"} compiler=$CC _LT_TAGVAR(compiler, $1)=$CC _LT_CC_BASENAME([$compiler]) GCC=$G77 if test -n "$compiler"; then 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 ;; aix[[4-9]]*) if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then test "$enable_shared" = yes && enable_static=no 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]) _LT_TAGVAR(GCC, $1)="$G77" _LT_TAGVAR(LD, $1)="$LD" ## CAVEAT EMPTOR: ## There is no encapsulation within the following macros, do not change ## the running order or otherwise move them around unless you know exactly ## what you are doing... _LT_COMPILER_PIC($1) _LT_COMPILER_C_O($1) _LT_COMPILER_FILE_LOCKS($1) _LT_LINKER_SHLIBS($1) _LT_SYS_DYNAMIC_LINKER($1) _LT_LINKER_HARDCODE_LIBPATH($1) _LT_CONFIG($1) fi # test -n "$compiler" GCC=$lt_save_GCC CC="$lt_save_CC" fi # test "$_lt_disable_F77" != yes AC_LANG_POP ])# _LT_LANG_F77_CONFIG # _LT_PROG_FC # ----------- # Since AC_PROG_FC is broken, in that it returns the empty string # if there is no fortran compiler, we have our own version here. m4_defun([_LT_PROG_FC], [ pushdef([AC_MSG_ERROR], [_lt_disable_FC=yes]) AC_PROG_FC if test -z "$FC" || test "X$FC" = "Xno"; then _lt_disable_FC=yes fi popdef([AC_MSG_ERROR]) ])# _LT_PROG_FC dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([_LT_PROG_FC], []) # _LT_LANG_FC_CONFIG([TAG]) # ------------------------- # Ensure that the configuration variables for a Fortran compiler are # suitably defined. These variables are subsequently used by _LT_CONFIG # to write the compiler configuration to `libtool'. m4_defun([_LT_LANG_FC_CONFIG], [AC_REQUIRE([_LT_PROG_FC])dnl AC_LANG_PUSH(Fortran) _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(allow_undefined_flag, $1)= _LT_TAGVAR(always_export_symbols, $1)=no _LT_TAGVAR(archive_expsym_cmds, $1)= _LT_TAGVAR(export_dynamic_flag_spec, $1)= _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_direct_absolute, $1)=no _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= _LT_TAGVAR(hardcode_libdir_separator, $1)= _LT_TAGVAR(hardcode_minus_L, $1)=no _LT_TAGVAR(hardcode_automatic, $1)=no _LT_TAGVAR(inherit_rpath, $1)=no _LT_TAGVAR(module_cmds, $1)= _LT_TAGVAR(module_expsym_cmds, $1)= _LT_TAGVAR(link_all_deplibs, $1)=unknown _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds _LT_TAGVAR(no_undefined_flag, $1)= _LT_TAGVAR(whole_archive_flag_spec, $1)= _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no # Source file extension for fc test sources. ac_ext=${ac_fc_srcext-f} # Object file extension for compiled fc test sources. objext=o _LT_TAGVAR(objext, $1)=$objext # No sense in running all these tests if we already determined that # the FC compiler isn't working. Some variables (like enable_shared) # are currently assumed to apply to all compilers on this platform, # and will be corrupted by setting them based on a non-working compiler. if test "$_lt_disable_FC" != yes; then # Code to be used in simple compile tests lt_simple_compile_test_code="\ subroutine t return end " # Code to be used in simple link tests lt_simple_link_test_code="\ program t end " # ltmain only uses $CC for tagged configurations so make sure $CC is set. _LT_TAG_COMPILER # save warnings/boilerplate of simple test code _LT_COMPILER_BOILERPLATE _LT_LINKER_BOILERPLATE # Allow CC to be a program name with arguments. lt_save_CC="$CC" lt_save_GCC=$GCC CC=${FC-"f95"} compiler=$CC GCC=$ac_cv_fc_compiler_gnu _LT_TAGVAR(compiler, $1)=$CC _LT_CC_BASENAME([$compiler]) if test -n "$compiler"; then 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 ;; aix[[4-9]]*) if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then test "$enable_shared" = yes && enable_static=no 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]) _LT_TAGVAR(GCC, $1)="$ac_cv_fc_compiler_gnu" _LT_TAGVAR(LD, $1)="$LD" ## CAVEAT EMPTOR: ## There is no encapsulation within the following macros, do not change ## the running order or otherwise move them around unless you know exactly ## what you are doing... _LT_SYS_HIDDEN_LIBDEPS($1) _LT_COMPILER_PIC($1) _LT_COMPILER_C_O($1) _LT_COMPILER_FILE_LOCKS($1) _LT_LINKER_SHLIBS($1) _LT_SYS_DYNAMIC_LINKER($1) _LT_LINKER_HARDCODE_LIBPATH($1) _LT_CONFIG($1) fi # test -n "$compiler" GCC=$lt_save_GCC CC="$lt_save_CC" fi # test "$_lt_disable_FC" != yes AC_LANG_POP ])# _LT_LANG_FC_CONFIG # _LT_LANG_GCJ_CONFIG([TAG]) # -------------------------- # Ensure that the configuration variables for the GNU Java Compiler compiler # are suitably defined. These variables are subsequently used by _LT_CONFIG # to write the compiler configuration to `libtool'. m4_defun([_LT_LANG_GCJ_CONFIG], [AC_REQUIRE([LT_PROG_GCJ])dnl AC_LANG_SAVE # Source file extension for Java test sources. ac_ext=java # Object file extension for compiled Java test sources. objext=o _LT_TAGVAR(objext, $1)=$objext # Code to be used in simple compile tests lt_simple_compile_test_code="class foo {}" # Code to be used in simple link tests lt_simple_link_test_code='public class conftest { public static void main(String[[]] argv) {}; }' # ltmain only uses $CC for tagged configurations so make sure $CC is set. _LT_TAG_COMPILER # save warnings/boilerplate of simple test code _LT_COMPILER_BOILERPLATE _LT_LINKER_BOILERPLATE # Allow CC to be a program name with arguments. lt_save_CC="$CC" lt_save_GCC=$GCC GCC=yes CC=${GCJ-"gcj"} compiler=$CC _LT_TAGVAR(compiler, $1)=$CC _LT_TAGVAR(LD, $1)="$LD" _LT_CC_BASENAME([$compiler]) # GCJ did not exist at the time GCC didn't implicitly link libc in. _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds ## CAVEAT EMPTOR: ## There is no encapsulation within the following macros, do not change ## the running order or otherwise move them around unless you know exactly ## what you are doing... if test -n "$compiler"; then _LT_COMPILER_NO_RTTI($1) _LT_COMPILER_PIC($1) _LT_COMPILER_C_O($1) _LT_COMPILER_FILE_LOCKS($1) _LT_LINKER_SHLIBS($1) _LT_LINKER_HARDCODE_LIBPATH($1) _LT_CONFIG($1) fi AC_LANG_RESTORE GCC=$lt_save_GCC CC="$lt_save_CC" ])# _LT_LANG_GCJ_CONFIG # _LT_LANG_RC_CONFIG([TAG]) # ------------------------- # Ensure that the configuration variables for the Windows resource compiler # are suitably defined. These variables are subsequently used by _LT_CONFIG # to write the compiler configuration to `libtool'. m4_defun([_LT_LANG_RC_CONFIG], [AC_REQUIRE([LT_PROG_RC])dnl AC_LANG_SAVE # Source file extension for RC test sources. ac_ext=rc # Object file extension for compiled RC test sources. objext=o _LT_TAGVAR(objext, $1)=$objext # Code to be used in simple compile tests lt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }' # Code to be used in simple link tests lt_simple_link_test_code="$lt_simple_compile_test_code" # ltmain only uses $CC for tagged configurations so make sure $CC is set. _LT_TAG_COMPILER # save warnings/boilerplate of simple test code _LT_COMPILER_BOILERPLATE _LT_LINKER_BOILERPLATE # Allow CC to be a program name with arguments. lt_save_CC="$CC" lt_save_GCC=$GCC GCC= CC=${RC-"windres"} compiler=$CC _LT_TAGVAR(compiler, $1)=$CC _LT_CC_BASENAME([$compiler]) _LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes if test -n "$compiler"; then : _LT_CONFIG($1) fi GCC=$lt_save_GCC AC_LANG_RESTORE CC="$lt_save_CC" ])# _LT_LANG_RC_CONFIG # LT_PROG_GCJ # ----------- AC_DEFUN([LT_PROG_GCJ], [m4_ifdef([AC_PROG_GCJ], [AC_PROG_GCJ], [m4_ifdef([A][M_PROG_GCJ], [A][M_PROG_GCJ], [AC_CHECK_TOOL(GCJ, gcj,) test "x${GCJFLAGS+set}" = xset || GCJFLAGS="-g -O2" AC_SUBST(GCJFLAGS)])])[]dnl ]) # Old name: AU_ALIAS([LT_AC_PROG_GCJ], [LT_PROG_GCJ]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([LT_AC_PROG_GCJ], []) # LT_PROG_RC # ---------- AC_DEFUN([LT_PROG_RC], [AC_CHECK_TOOL(RC, windres,) ]) # Old name: AU_ALIAS([LT_AC_PROG_RC], [LT_PROG_RC]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([LT_AC_PROG_RC], []) # _LT_DECL_EGREP # -------------- # If we don't have a new enough Autoconf to choose the best grep # available, choose the one first in the user's PATH. m4_defun([_LT_DECL_EGREP], [AC_REQUIRE([AC_PROG_EGREP])dnl AC_REQUIRE([AC_PROG_FGREP])dnl test -z "$GREP" && GREP=grep _LT_DECL([], [GREP], [1], [A grep program that handles long lines]) _LT_DECL([], [EGREP], [1], [An ERE matcher]) _LT_DECL([], [FGREP], [1], [A literal string matcher]) dnl Non-bleeding-edge autoconf doesn't subst GREP, so do it here too AC_SUBST([GREP]) ]) # _LT_DECL_OBJDUMP # -------------- # If we don't have a new enough Autoconf to choose the best objdump # available, choose the one first in the user's PATH. m4_defun([_LT_DECL_OBJDUMP], [AC_CHECK_TOOL(OBJDUMP, objdump, false) test -z "$OBJDUMP" && OBJDUMP=objdump _LT_DECL([], [OBJDUMP], [1], [An object symbol dumper]) AC_SUBST([OBJDUMP]) ]) # _LT_DECL_SED # ------------ # Check for a fully-functional sed program, that truncates # as few characters as possible. Prefer GNU sed if found. m4_defun([_LT_DECL_SED], [AC_PROG_SED test -z "$SED" && SED=sed Xsed="$SED -e 1s/^X//" _LT_DECL([], [SED], [1], [A sed program that does not truncate output]) _LT_DECL([], [Xsed], ["\$SED -e 1s/^X//"], [Sed that helps us avoid accidentally triggering echo(1) options like -n]) ])# _LT_DECL_SED m4_ifndef([AC_PROG_SED], [ ############################################################ # 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. # ############################################################ m4_defun([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 IFS=$as_save_IFS 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 && continue 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_SUBST([SED]) AC_MSG_RESULT([$SED]) ])#AC_PROG_SED ])#m4_ifndef # Old name: AU_ALIAS([LT_AC_PROG_SED], [AC_PROG_SED]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([LT_AC_PROG_SED], []) # _LT_CHECK_SHELL_FEATURES # ------------------------ # Find out whether the shell is Bourne or XSI compatible, # or has some other useful features. m4_defun([_LT_CHECK_SHELL_FEATURES], [AC_MSG_CHECKING([whether the shell understands some XSI constructs]) # Try some XSI features xsi_shell=no ( _lt_dummy="a/b/c" test "${_lt_dummy##*/},${_lt_dummy%/*},"${_lt_dummy%"$_lt_dummy"}, \ = c,a/b,, \ && eval 'test $(( 1 + 1 )) -eq 2 \ && test "${#_lt_dummy}" -eq 5' ) >/dev/null 2>&1 \ && xsi_shell=yes AC_MSG_RESULT([$xsi_shell]) _LT_CONFIG_LIBTOOL_INIT([xsi_shell='$xsi_shell']) AC_MSG_CHECKING([whether the shell understands "+="]) lt_shell_append=no ( foo=bar; set foo baz; eval "$[1]+=\$[2]" && test "$foo" = barbaz ) \ >/dev/null 2>&1 \ && lt_shell_append=yes AC_MSG_RESULT([$lt_shell_append]) _LT_CONFIG_LIBTOOL_INIT([lt_shell_append='$lt_shell_append']) if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then lt_unset=unset else lt_unset=false fi _LT_DECL([], [lt_unset], [0], [whether the shell understands "unset"])dnl # test EBCDIC or ASCII case `echo X|tr X '\101'` in A) # ASCII based system # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr lt_SP2NL='tr \040 \012' lt_NL2SP='tr \015\012 \040\040' ;; *) # EBCDIC based system lt_SP2NL='tr \100 \n' lt_NL2SP='tr \r\n \100\100' ;; esac _LT_DECL([SP2NL], [lt_SP2NL], [1], [turn spaces into newlines])dnl _LT_DECL([NL2SP], [lt_NL2SP], [1], [turn newlines into spaces])dnl ])# _LT_CHECK_SHELL_FEATURES # _LT_PROG_XSI_SHELLFNS # --------------------- # Bourne and XSI compatible variants of some useful shell functions. m4_defun([_LT_PROG_XSI_SHELLFNS], [case $xsi_shell in yes) cat << \_LT_EOF >> "$cfgfile" # func_dirname file append nondir_replacement # Compute the dirname of FILE. If nonempty, add APPEND to the result, # otherwise set result to NONDIR_REPLACEMENT. func_dirname () { case ${1} in */*) func_dirname_result="${1%/*}${2}" ;; * ) func_dirname_result="${3}" ;; esac } # func_basename file func_basename () { func_basename_result="${1##*/}" } # func_dirname_and_basename file append nondir_replacement # perform func_basename and func_dirname in a single function # call: # dirname: Compute the dirname of FILE. If nonempty, # add APPEND to the result, otherwise set result # to NONDIR_REPLACEMENT. # value returned in "$func_dirname_result" # basename: Compute filename of FILE. # value retuned in "$func_basename_result" # Implementation must be kept synchronized with func_dirname # and func_basename. For efficiency, we do not delegate to # those functions but instead duplicate the functionality here. func_dirname_and_basename () { case ${1} in */*) func_dirname_result="${1%/*}${2}" ;; * ) func_dirname_result="${3}" ;; esac func_basename_result="${1##*/}" } # func_stripname prefix suffix name # strip PREFIX and SUFFIX off of NAME. # PREFIX and SUFFIX must not contain globbing or regex special # characters, hashes, percent signs, but SUFFIX may contain a leading # dot (in which case that matches only a dot). func_stripname () { # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are # positional parameters, so assign one to ordinary parameter first. func_stripname_result=${3} func_stripname_result=${func_stripname_result#"${1}"} func_stripname_result=${func_stripname_result%"${2}"} } # func_opt_split func_opt_split () { func_opt_split_opt=${1%%=*} func_opt_split_arg=${1#*=} } # func_lo2o object func_lo2o () { case ${1} in *.lo) func_lo2o_result=${1%.lo}.${objext} ;; *) func_lo2o_result=${1} ;; esac } # func_xform libobj-or-source func_xform () { func_xform_result=${1%.*}.lo } # func_arith arithmetic-term... func_arith () { func_arith_result=$(( $[*] )) } # func_len string # STRING may not start with a hyphen. func_len () { func_len_result=${#1} } _LT_EOF ;; *) # Bourne compatible functions. cat << \_LT_EOF >> "$cfgfile" # func_dirname file append nondir_replacement # Compute the dirname of FILE. If nonempty, add APPEND to the result, # otherwise set result to NONDIR_REPLACEMENT. func_dirname () { # Extract subdirectory from the argument. func_dirname_result=`$ECHO "X${1}" | $Xsed -e "$dirname"` if test "X$func_dirname_result" = "X${1}"; then func_dirname_result="${3}" else func_dirname_result="$func_dirname_result${2}" fi } # func_basename file func_basename () { func_basename_result=`$ECHO "X${1}" | $Xsed -e "$basename"` } dnl func_dirname_and_basename dnl A portable version of this function is already defined in general.m4sh dnl so there is no need for it here. # func_stripname prefix suffix name # strip PREFIX and SUFFIX off of NAME. # PREFIX and SUFFIX must not contain globbing or regex special # characters, hashes, percent signs, but SUFFIX may contain a leading # dot (in which case that matches only a dot). # func_strip_suffix prefix name func_stripname () { case ${2} in .*) func_stripname_result=`$ECHO "X${3}" \ | $Xsed -e "s%^${1}%%" -e "s%\\\\${2}\$%%"`;; *) func_stripname_result=`$ECHO "X${3}" \ | $Xsed -e "s%^${1}%%" -e "s%${2}\$%%"`;; esac } # sed scripts: my_sed_long_opt='1s/^\(-[[^=]]*\)=.*/\1/;q' my_sed_long_arg='1s/^-[[^=]]*=//' # func_opt_split func_opt_split () { func_opt_split_opt=`$ECHO "X${1}" | $Xsed -e "$my_sed_long_opt"` func_opt_split_arg=`$ECHO "X${1}" | $Xsed -e "$my_sed_long_arg"` } # func_lo2o object func_lo2o () { func_lo2o_result=`$ECHO "X${1}" | $Xsed -e "$lo2o"` } # func_xform libobj-or-source func_xform () { func_xform_result=`$ECHO "X${1}" | $Xsed -e 's/\.[[^.]]*$/.lo/'` } # func_arith arithmetic-term... func_arith () { func_arith_result=`expr "$[@]"` } # func_len string # STRING may not start with a hyphen. func_len () { func_len_result=`expr "$[1]" : ".*" 2>/dev/null || echo $max_cmd_len` } _LT_EOF esac case $lt_shell_append in yes) cat << \_LT_EOF >> "$cfgfile" # func_append var value # Append VALUE to the end of shell variable VAR. func_append () { eval "$[1]+=\$[2]" } _LT_EOF ;; *) cat << \_LT_EOF >> "$cfgfile" # func_append var value # Append VALUE to the end of shell variable VAR. func_append () { eval "$[1]=\$$[1]\$[2]" } _LT_EOF ;; esac ]) libprelude-1.0.0/m4/argz.m40000644000076400007640000000506711347714375012341 00000000000000# Portability macros for glibc argz. -*- Autoconf -*- # # Copyright (C) 2004, 2005, 2006, 2007 Free Software Foundation, Inc. # Written by Gary V. Vaughan # # 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. # serial 5 argz.m4 AC_DEFUN([gl_FUNC_ARGZ], [gl_PREREQ_ARGZ AC_CHECK_HEADERS([argz.h], [], [], [AC_INCLUDES_DEFAULT]) AC_CHECK_TYPES([error_t], [], [AC_DEFINE([error_t], [int], [Define to a type to use for `error_t' if it is not otherwise available.]) AC_DEFINE([__error_t_defined], [1], [Define so that glibc/gnulib argp.h does not typedef error_t.])], [#if defined(HAVE_ARGZ_H) # include #endif]) ARGZ_H= AC_CHECK_FUNCS([argz_add argz_append argz_count argz_create_sep argz_insert \ argz_next argz_stringify], [], [ARGZ_H=argz.h; AC_LIBOBJ([argz])]) dnl if have system argz functions, allow forced use of dnl libltdl-supplied implementation (and default to do so dnl on "known bad" systems). Could use a runtime check, but dnl (a) detecting malloc issues is notoriously unreliable dnl (b) only known system that declares argz functions, dnl provides them, yet they are broken, is cygwin dnl releases prior to 16-Mar-2007 (1.5.24 and earlier) dnl So, it's more straightforward simply to special case dnl this for known bad systems. AS_IF([test -z "$ARGZ_H"], [AC_CACHE_CHECK( [if argz actually works], [lt_cv_sys_argz_works], [[case $host_os in #( *cygwin*) lt_cv_sys_argz_works=no if test "$cross_compiling" != no; then lt_cv_sys_argz_works="guessing no" else lt_sed_extract_leading_digits='s/^\([0-9\.]*\).*/\1/' save_IFS=$IFS IFS=-. set x `uname -r | sed -e "$lt_sed_extract_leading_digits"` IFS=$save_IFS lt_os_major=${2-0} lt_os_minor=${3-0} lt_os_micro=${4-0} if test "$lt_os_major" -gt 1 \ || { test "$lt_os_major" -eq 1 \ && { test "$lt_os_minor" -gt 5 \ || { test "$lt_os_minor" -eq 5 \ && test "$lt_os_micro" -gt 24; }; }; }; then lt_cv_sys_argz_works=yes fi fi ;; #( *) lt_cv_sys_argz_works=yes ;; esac]]) AS_IF([test $lt_cv_sys_argz_works = yes], [AC_DEFINE([HAVE_WORKING_ARGZ], 1, [This value is set to 1 to indicate that the system argz facility works])], [ARGZ_H=argz.h AC_LIBOBJ([argz])])]) AC_SUBST([ARGZ_H]) ]) # Prerequisites of lib/argz.c. AC_DEFUN([gl_PREREQ_ARGZ], [:]) libprelude-1.0.0/m4/gtk-doc.m40000644000076400007640000000245411347714316012716 00000000000000dnl -*- mode: autoconf -*- # serial 1 dnl Usage: dnl GTK_DOC_CHECK([minimum-gtk-doc-version]) AC_DEFUN([GTK_DOC_CHECK], [ AC_BEFORE([AC_PROG_LIBTOOL],[$0])dnl setup libtool first AC_BEFORE([AM_PROG_LIBTOOL],[$0])dnl setup libtool first dnl for overriding the documentation installation directory AC_ARG_WITH([html-dir], AS_HELP_STRING([--with-html-dir=PATH], [path to installed docs]),, [with_html_dir='${datadir}/gtk-doc/html']) HTML_DIR="$with_html_dir" AC_SUBST([HTML_DIR]) dnl enable/disable documentation building AC_ARG_ENABLE([gtk-doc], AS_HELP_STRING([--enable-gtk-doc], [use gtk-doc to build documentation [[default=no]]]),, [enable_gtk_doc=no]) if test x$enable_gtk_doc = xyes; then ifelse([$1],[], [PKG_CHECK_EXISTS([gtk-doc],, AC_MSG_ERROR([gtk-doc not installed and --enable-gtk-doc requested]))], [PKG_CHECK_EXISTS([gtk-doc >= $1],, AC_MSG_ERROR([You need to have gtk-doc >= $1 installed to build gtk-doc]))]) fi AC_MSG_CHECKING([whether to build gtk-doc documentation]) AC_MSG_RESULT($enable_gtk_doc) AC_PATH_PROGS(GTKDOC_CHECK,gtkdoc-check,) AM_CONDITIONAL([ENABLE_GTK_DOC], [test x$enable_gtk_doc = xyes]) AM_CONDITIONAL([GTK_DOC_USE_LIBTOOL], [test -n "$LIBTOOL"]) ]) libprelude-1.0.0/m4/ax_check_aligned_access_required.m40000664000076400007640000000633411202225026020023 00000000000000##### http://autoconf-archive.cryp.to/ax_check_aligned_access_required.html # # SYNOPSIS # # AC_CHECK_ALIGNED_ACCESS_REQUIRED # # DESCRIPTION # # While the x86 CPUs allow access to memory objects to be unaligned # it happens that most of the modern designs require objects to be # aligned - or they will fail with a buserror. That mode is quite # known by big-endian machines (sparc, etc) however the alpha cpu is # little- endian. # # The following function will test for aligned access to be required # and set a config.h define HAVE_ALIGNED_ACCESS_REQUIRED (name # derived by standard usage). Structures loaded from a file (or # mmapped to memory) should be accessed per-byte in that case to # avoid segfault type errors. # # LAST MODIFICATION # # 2006-08-17 # # COPYLEFT # # Copyright (c) 2006 Guido U. Draheim # # 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, the respective Autoconf Macro's copyright # owner gives unlimited permission to copy, distribute and modify the # configure scripts that are the output of Autoconf when processing # the Macro. You need not follow the terms of the GNU General Public # License when using or distributing such scripts, even though # portions of the text of the Macro appear in them. The GNU General # Public License (GPL) does govern all other use of the material that # constitutes the Autoconf Macro. # # This special exception to the GPL applies to versions of the # Autoconf Macro released by the Autoconf Macro Archive. When you # make and distribute a modified version of the Autoconf Macro, you # may extend this special exception to the GPL to apply to your # modified version as well. AC_DEFUN([AX_CHECK_ALIGNED_ACCESS_REQUIRED], [AC_CACHE_CHECK([if pointers to integers require aligned access], [ax_cv_have_aligned_access_required], [case "$host_cpu" in alpha*|arm*|hp*|mips*|sparc*|ia64) ax_cv_have_aligned_access_required=yes; ;; *) AC_TRY_RUN([ #include #include int main() { char* string = malloc(40); int i; for (i=0; i < 40; i++) string[[i]] = i; { void* s = string; int* p = s+1; int* q = s+2; if (*p == *q) { return 1; } } return 0; } ], [ax_cv_have_aligned_access_required=yes], [ax_cv_have_aligned_access_required=no], [ax_cv_have_aligned_access_required=no]) ;; esac ]) if test "$ax_cv_have_aligned_access_required" = yes ; then AC_DEFINE([HAVE_ALIGNED_ACCESS_REQUIRED], [1], [Define if pointers to integers require aligned access]) fi ]) libprelude-1.0.0/m4/pkg.m40000664000076400007640000001206311202225026012127 00000000000000# pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*- # # Copyright © 2004 Scott James Remnant . # # 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. # PKG_PROG_PKG_CONFIG([MIN-VERSION]) # ---------------------------------- AC_DEFUN([PKG_PROG_PKG_CONFIG], [m4_pattern_forbid([^_?PKG_[A-Z_]+$]) m4_pattern_allow([^PKG_CONFIG(_PATH)?$]) AC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility])dnl if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then AC_PATH_TOOL([PKG_CONFIG], [pkg-config]) fi if test -n "$PKG_CONFIG"; then _pkg_min_version=m4_default([$1], [0.9.0]) AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version]) if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then AC_MSG_RESULT([yes]) else AC_MSG_RESULT([no]) PKG_CONFIG="" fi fi[]dnl ])# PKG_PROG_PKG_CONFIG # PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND]) # # Check to see whether a particular set of modules exists. Similar # to PKG_CHECK_MODULES(), but does not set variables or print errors. # # # Similar to PKG_CHECK_MODULES, make sure that the first instance of # this or PKG_CHECK_MODULES is called, or make sure to call # PKG_CHECK_EXISTS manually # -------------------------------------------------------------- AC_DEFUN([PKG_CHECK_EXISTS], [AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl if test -n "$PKG_CONFIG" && \ AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then m4_ifval([$2], [$2], [:]) m4_ifvaln([$3], [else $3])dnl fi]) # _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES]) # --------------------------------------------- m4_define([_PKG_CONFIG], [if test -n "$$1"; then pkg_cv_[]$1="$$1" elif test -n "$PKG_CONFIG"; then PKG_CHECK_EXISTS([$3], [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`], [pkg_failed=yes]) else pkg_failed=untried fi[]dnl ])# _PKG_CONFIG # _PKG_SHORT_ERRORS_SUPPORTED # ----------------------------- AC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED], [AC_REQUIRE([PKG_PROG_PKG_CONFIG]) if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then _pkg_short_errors_supported=yes else _pkg_short_errors_supported=no fi[]dnl ])# _PKG_SHORT_ERRORS_SUPPORTED # PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND], # [ACTION-IF-NOT-FOUND]) # # # Note that if there is a possibility the first call to # PKG_CHECK_MODULES might not happen, you should be sure to include an # explicit call to PKG_PROG_PKG_CONFIG in your configure.ac # # # -------------------------------------------------------------- AC_DEFUN([PKG_CHECK_MODULES], [AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl AC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl AC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl pkg_failed=no AC_MSG_CHECKING([for $1]) _PKG_CONFIG([$1][_CFLAGS], [cflags], [$2]) _PKG_CONFIG([$1][_LIBS], [libs], [$2]) m4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS and $1[]_LIBS to avoid the need to call pkg-config. See the pkg-config man page for more details.]) if test $pkg_failed = yes; then _PKG_SHORT_ERRORS_SUPPORTED if test $_pkg_short_errors_supported = yes; then $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "$2" 2>&1` else $1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors "$2" 2>&1` fi # Put the nasty error message in config.log where it belongs echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD ifelse([$4], , [AC_MSG_ERROR(dnl [Package requirements ($2) were not met: $$1_PKG_ERRORS Consider adjusting the PKG_CONFIG_PATH environment variable if you installed software in a non-standard prefix. _PKG_TEXT ])], [AC_MSG_RESULT([no]) $4]) elif test $pkg_failed = untried; then ifelse([$4], , [AC_MSG_FAILURE(dnl [The pkg-config script could not be found or is too old. Make sure it is in your PATH or set the PKG_CONFIG environment variable to the full path to pkg-config. _PKG_TEXT To get pkg-config, see .])], [$4]) else $1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS $1[]_LIBS=$pkg_cv_[]$1[]_LIBS AC_MSG_RESULT([yes]) ifelse([$3], , :, [$3]) fi[]dnl ])# PKG_CHECK_MODULES libprelude-1.0.0/m4/Makefile.am0000664000076400007640000000034511211754307013151 00000000000000m4datadir = $(datadir)/aclocal dist_m4data_DATA = libprelude.m4 GITIGNOREFILES = argz.m4 \ ltdl.m4 \ libtool.m4 \ ltoptions.m4 \ ltsugar.m4 \ ltversion.m4 \ lt~obsolete.m4 -include $(top_srcdir)/git.mk libprelude-1.0.0/m4/libgcrypt.m40000664000076400007640000001011611202225026013342 00000000000000dnl Autoconf macros for libgcrypt dnl Copyright (C) 2002, 2004 Free Software Foundation, Inc. dnl dnl This file is free software; as a special exception the author gives dnl unlimited permission to copy and/or distribute it, with or without dnl modifications, as long as this notice is preserved. dnl dnl This file is distributed in the hope that it will be useful, but dnl WITHOUT ANY WARRANTY, to the extent permitted by law; without even the dnl implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. dnl AM_PATH_LIBGCRYPT([MINIMUM-VERSION, dnl [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND ]]]) dnl Test for libgcrypt and define LIBGCRYPT_CFLAGS and LIBGCRYPT_LIBS. dnl MINIMUN-VERSION is a string with the version number optionalliy prefixed dnl with the API version to also check the API compatibility. Example: dnl a MINIMUN-VERSION of 1:1.2.5 won't pass the test unless the installed dnl version of libgcrypt is at least 1.2.5 *and* the API number is 1. Using dnl this features allows to prevent build against newer versions of libgcrypt dnl with a changed API. dnl AC_DEFUN([AM_PATH_LIBGCRYPT], [ AC_ARG_WITH(libgcrypt-prefix, AC_HELP_STRING([--with-libgcrypt-prefix=PFX], [prefix where LIBGCRYPT is installed (optional)]), libgcrypt_config_prefix="$withval", libgcrypt_config_prefix="") if test x$libgcrypt_config_prefix != x ; then if test x${LIBGCRYPT_CONFIG+set} != xset ; then LIBGCRYPT_CONFIG=$libgcrypt_config_prefix/bin/libgcrypt-config fi fi AC_PATH_PROG(LIBGCRYPT_CONFIG, libgcrypt-config, no) tmp=ifelse([$1], ,1:1.2.0,$1) if echo "$tmp" | grep ':' >/dev/null 2>/dev/null ; then req_libgcrypt_api=`echo "$tmp" | sed 's/\(.*\):\(.*\)/\1/'` min_libgcrypt_version=`echo "$tmp" | sed 's/\(.*\):\(.*\)/\2/'` else req_libgcrypt_api=0 min_libgcrypt_version="$tmp" fi AC_MSG_CHECKING(for LIBGCRYPT - version >= $min_libgcrypt_version) ok=no if test "$LIBGCRYPT_CONFIG" != "no" ; then req_major=`echo $min_libgcrypt_version | \ sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\)/\1/'` req_minor=`echo $min_libgcrypt_version | \ sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\)/\2/'` req_micro=`echo $min_libgcrypt_version | \ sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\)/\3/'` libgcrypt_config_version=`$LIBGCRYPT_CONFIG --version` major=`echo $libgcrypt_config_version | \ sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\).*/\1/'` minor=`echo $libgcrypt_config_version | \ sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\).*/\2/'` micro=`echo $libgcrypt_config_version | \ sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\).*/\3/'` if test "$major" -gt "$req_major"; then ok=yes else if test "$major" -eq "$req_major"; then if test "$minor" -gt "$req_minor"; then ok=yes else if test "$minor" -eq "$req_minor"; then if test "$micro" -ge "$req_micro"; then ok=yes fi fi fi fi fi fi if test $ok = yes; then AC_MSG_RESULT(yes) else AC_MSG_RESULT(no) fi if test $ok = yes; then # If we have a recent libgcrypt, we should also check that the # API is compatible if test "$req_libgcrypt_api" -gt 0 ; then tmp=`$LIBGCRYPT_CONFIG --api-version 2>/dev/null || echo 0` if test "$tmp" -gt 0 ; then AC_MSG_CHECKING([LIBGCRYPT API version]) if test "$req_libgcrypt_api" -eq "$tmp" ; then AC_MSG_RESULT(okay) else ok=no AC_MSG_RESULT([does not match (want=$req_libgcrypt_api got=$tmp)]) fi fi fi fi if test $ok = yes; then LIBGCRYPT_CFLAGS=`$LIBGCRYPT_CONFIG --cflags` LIBGCRYPT_LIBS=`$LIBGCRYPT_CONFIG --libs` ifelse([$2], , :, [$2]) else LIBGCRYPT_CFLAGS="" LIBGCRYPT_LIBS="" ifelse([$3], , :, [$3]) fi AC_SUBST(LIBGCRYPT_CFLAGS) AC_SUBST(LIBGCRYPT_LIBS) ]) libprelude-1.0.0/m4/ltsugar.m40000644000076400007640000001042411347714400013035 00000000000000# ltsugar.m4 -- libtool m4 base layer. -*-Autoconf-*- # # Copyright (C) 2004, 2005, 2007, 2008 Free Software Foundation, Inc. # Written by Gary V. Vaughan, 2004 # # 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. # serial 6 ltsugar.m4 # This is to help aclocal find these macros, as it can't see m4_define. AC_DEFUN([LTSUGAR_VERSION], [m4_if([0.1])]) # lt_join(SEP, ARG1, [ARG2...]) # ----------------------------- # Produce ARG1SEPARG2...SEPARGn, omitting [] arguments and their # associated separator. # Needed until we can rely on m4_join from Autoconf 2.62, since all earlier # versions in m4sugar had bugs. m4_define([lt_join], [m4_if([$#], [1], [], [$#], [2], [[$2]], [m4_if([$2], [], [], [[$2]_])$0([$1], m4_shift(m4_shift($@)))])]) m4_define([_lt_join], [m4_if([$#$2], [2], [], [m4_if([$2], [], [], [[$1$2]])$0([$1], m4_shift(m4_shift($@)))])]) # lt_car(LIST) # lt_cdr(LIST) # ------------ # Manipulate m4 lists. # These macros are necessary as long as will still need to support # Autoconf-2.59 which quotes differently. m4_define([lt_car], [[$1]]) m4_define([lt_cdr], [m4_if([$#], 0, [m4_fatal([$0: cannot be called without arguments])], [$#], 1, [], [m4_dquote(m4_shift($@))])]) m4_define([lt_unquote], $1) # lt_append(MACRO-NAME, STRING, [SEPARATOR]) # ------------------------------------------ # Redefine MACRO-NAME to hold its former content plus `SEPARATOR'`STRING'. # Note that neither SEPARATOR nor STRING are expanded; they are appended # to MACRO-NAME as is (leaving the expansion for when MACRO-NAME is invoked). # No SEPARATOR is output if MACRO-NAME was previously undefined (different # than defined and empty). # # This macro is needed until we can rely on Autoconf 2.62, since earlier # versions of m4sugar mistakenly expanded SEPARATOR but not STRING. m4_define([lt_append], [m4_define([$1], m4_ifdef([$1], [m4_defn([$1])[$3]])[$2])]) # lt_combine(SEP, PREFIX-LIST, INFIX, SUFFIX1, [SUFFIX2...]) # ---------------------------------------------------------- # Produce a SEP delimited list of all paired combinations of elements of # PREFIX-LIST with SUFFIX1 through SUFFIXn. Each element of the list # has the form PREFIXmINFIXSUFFIXn. # Needed until we can rely on m4_combine added in Autoconf 2.62. m4_define([lt_combine], [m4_if(m4_eval([$# > 3]), [1], [m4_pushdef([_Lt_sep], [m4_define([_Lt_sep], m4_defn([lt_car]))])]]dnl [[m4_foreach([_Lt_prefix], [$2], [m4_foreach([_Lt_suffix], ]m4_dquote(m4_dquote(m4_shift(m4_shift(m4_shift($@)))))[, [_Lt_sep([$1])[]m4_defn([_Lt_prefix])[$3]m4_defn([_Lt_suffix])])])])]) # lt_if_append_uniq(MACRO-NAME, VARNAME, [SEPARATOR], [UNIQ], [NOT-UNIQ]) # ----------------------------------------------------------------------- # Iff MACRO-NAME does not yet contain VARNAME, then append it (delimited # by SEPARATOR if supplied) and expand UNIQ, else NOT-UNIQ. m4_define([lt_if_append_uniq], [m4_ifdef([$1], [m4_if(m4_index([$3]m4_defn([$1])[$3], [$3$2$3]), [-1], [lt_append([$1], [$2], [$3])$4], [$5])], [lt_append([$1], [$2], [$3])$4])]) # lt_dict_add(DICT, KEY, VALUE) # ----------------------------- m4_define([lt_dict_add], [m4_define([$1($2)], [$3])]) # lt_dict_add_subkey(DICT, KEY, SUBKEY, VALUE) # -------------------------------------------- m4_define([lt_dict_add_subkey], [m4_define([$1($2:$3)], [$4])]) # lt_dict_fetch(DICT, KEY, [SUBKEY]) # ---------------------------------- m4_define([lt_dict_fetch], [m4_ifval([$3], m4_ifdef([$1($2:$3)], [m4_defn([$1($2:$3)])]), m4_ifdef([$1($2)], [m4_defn([$1($2)])]))]) # lt_if_dict_fetch(DICT, KEY, [SUBKEY], VALUE, IF-TRUE, [IF-FALSE]) # ----------------------------------------------------------------- m4_define([lt_if_dict_fetch], [m4_if(lt_dict_fetch([$1], [$2], [$3]), [$4], [$5], [$6])]) # lt_dict_filter(DICT, [SUBKEY], VALUE, [SEPARATOR], KEY, [...]) # -------------------------------------------------------------- m4_define([lt_dict_filter], [m4_if([$5], [], [], [lt_join(m4_quote(m4_default([$4], [[, ]])), lt_unquote(m4_split(m4_normalize(m4_foreach(_Lt_key, lt_car([m4_shiftn(4, $@)]), [lt_if_dict_fetch([$1], _Lt_key, [$2], [$3], [_Lt_key ])])))))])[]dnl ]) libprelude-1.0.0/m4/Makefile.in0000664000076400007640000012712111347714456013177 00000000000000# Makefile.in generated by automake 1.11.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, # Inc. # This Makefile.in 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. @SET_MAKE@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ target_triplet = @target@ subdir = m4 DIST_COMMON = $(dist_m4data_DATA) $(srcdir)/Makefile.am \ $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/libmissing/m4/00gnulib.m4 \ $(top_srcdir)/libmissing/m4/alloca.m4 \ $(top_srcdir)/libmissing/m4/arpa_inet_h.m4 \ $(top_srcdir)/libmissing/m4/btowc.m4 \ $(top_srcdir)/libmissing/m4/close.m4 \ $(top_srcdir)/libmissing/m4/codeset.m4 \ $(top_srcdir)/libmissing/m4/cond.m4 \ $(top_srcdir)/libmissing/m4/dos.m4 \ $(top_srcdir)/libmissing/m4/dup2.m4 \ $(top_srcdir)/libmissing/m4/errno_h.m4 \ $(top_srcdir)/libmissing/m4/exponentd.m4 \ $(top_srcdir)/libmissing/m4/exponentf.m4 \ $(top_srcdir)/libmissing/m4/exponentl.m4 \ $(top_srcdir)/libmissing/m4/extensions.m4 \ $(top_srcdir)/libmissing/m4/fclose.m4 \ $(top_srcdir)/libmissing/m4/fcntl-o.m4 \ $(top_srcdir)/libmissing/m4/fcntl_h.m4 \ $(top_srcdir)/libmissing/m4/float_h.m4 \ $(top_srcdir)/libmissing/m4/fopen.m4 \ $(top_srcdir)/libmissing/m4/fpieee.m4 \ $(top_srcdir)/libmissing/m4/frexp.m4 \ $(top_srcdir)/libmissing/m4/frexpl.m4 \ $(top_srcdir)/libmissing/m4/fseeko.m4 \ $(top_srcdir)/libmissing/m4/ftw.m4 \ $(top_srcdir)/libmissing/m4/getaddrinfo.m4 \ $(top_srcdir)/libmissing/m4/getdelim.m4 \ $(top_srcdir)/libmissing/m4/gethostname.m4 \ $(top_srcdir)/libmissing/m4/getline.m4 \ $(top_srcdir)/libmissing/m4/getpagesize.m4 \ $(top_srcdir)/libmissing/m4/getpass.m4 \ $(top_srcdir)/libmissing/m4/gettimeofday.m4 \ $(top_srcdir)/libmissing/m4/glibc21.m4 \ $(top_srcdir)/libmissing/m4/gnulib-common.m4 \ $(top_srcdir)/libmissing/m4/gnulib-comp.m4 \ $(top_srcdir)/libmissing/m4/gnulib-tool.m4 \ $(top_srcdir)/libmissing/m4/hostent.m4 \ $(top_srcdir)/libmissing/m4/include_next.m4 \ $(top_srcdir)/libmissing/m4/inet_ntop.m4 \ $(top_srcdir)/libmissing/m4/inet_pton.m4 \ $(top_srcdir)/libmissing/m4/intmax_t.m4 \ $(top_srcdir)/libmissing/m4/inttypes_h.m4 \ $(top_srcdir)/libmissing/m4/isnand.m4 \ $(top_srcdir)/libmissing/m4/isnanf.m4 \ $(top_srcdir)/libmissing/m4/isnanl.m4 \ $(top_srcdir)/libmissing/m4/langinfo_h.m4 \ $(top_srcdir)/libmissing/m4/ldexpl.m4 \ $(top_srcdir)/libmissing/m4/lib-ld.m4 \ $(top_srcdir)/libmissing/m4/lib-link.m4 \ $(top_srcdir)/libmissing/m4/lib-prefix.m4 \ $(top_srcdir)/libmissing/m4/localcharset.m4 \ $(top_srcdir)/libmissing/m4/locale-fr.m4 \ $(top_srcdir)/libmissing/m4/locale-ja.m4 \ $(top_srcdir)/libmissing/m4/locale-tr.m4 \ $(top_srcdir)/libmissing/m4/locale-zh.m4 \ $(top_srcdir)/libmissing/m4/lock.m4 \ $(top_srcdir)/libmissing/m4/longlong.m4 \ $(top_srcdir)/libmissing/m4/lseek.m4 \ $(top_srcdir)/libmissing/m4/lstat.m4 \ $(top_srcdir)/libmissing/m4/malloc.m4 \ $(top_srcdir)/libmissing/m4/math_h.m4 \ $(top_srcdir)/libmissing/m4/mbrtowc.m4 \ $(top_srcdir)/libmissing/m4/mbsinit.m4 \ $(top_srcdir)/libmissing/m4/mbstate_t.m4 \ $(top_srcdir)/libmissing/m4/memchr.m4 \ $(top_srcdir)/libmissing/m4/memmem.m4 \ $(top_srcdir)/libmissing/m4/minmax.m4 \ $(top_srcdir)/libmissing/m4/mktime.m4 \ $(top_srcdir)/libmissing/m4/mmap-anon.m4 \ $(top_srcdir)/libmissing/m4/mode_t.m4 \ $(top_srcdir)/libmissing/m4/multiarch.m4 \ $(top_srcdir)/libmissing/m4/netdb_h.m4 \ $(top_srcdir)/libmissing/m4/netinet_in_h.m4 \ $(top_srcdir)/libmissing/m4/nl_langinfo.m4 \ $(top_srcdir)/libmissing/m4/nocrash.m4 \ $(top_srcdir)/libmissing/m4/onceonly.m4 \ $(top_srcdir)/libmissing/m4/open.m4 \ $(top_srcdir)/libmissing/m4/pathmax.m4 \ $(top_srcdir)/libmissing/m4/perror.m4 \ $(top_srcdir)/libmissing/m4/poll.m4 \ $(top_srcdir)/libmissing/m4/printf-frexp.m4 \ $(top_srcdir)/libmissing/m4/printf-frexpl.m4 \ $(top_srcdir)/libmissing/m4/printf.m4 \ $(top_srcdir)/libmissing/m4/realloc.m4 \ $(top_srcdir)/libmissing/m4/regex.m4 \ $(top_srcdir)/libmissing/m4/relocatable-lib.m4 \ $(top_srcdir)/libmissing/m4/select.m4 \ $(top_srcdir)/libmissing/m4/servent.m4 \ $(top_srcdir)/libmissing/m4/signal_h.m4 \ $(top_srcdir)/libmissing/m4/signalblocking.m4 \ $(top_srcdir)/libmissing/m4/signbit.m4 \ $(top_srcdir)/libmissing/m4/size_max.m4 \ $(top_srcdir)/libmissing/m4/sleep.m4 \ $(top_srcdir)/libmissing/m4/snprintf-posix.m4 \ $(top_srcdir)/libmissing/m4/snprintf.m4 \ $(top_srcdir)/libmissing/m4/sockets.m4 \ $(top_srcdir)/libmissing/m4/socklen.m4 \ $(top_srcdir)/libmissing/m4/sockpfaf.m4 \ $(top_srcdir)/libmissing/m4/ssize_t.m4 \ $(top_srcdir)/libmissing/m4/stat.m4 \ $(top_srcdir)/libmissing/m4/stdbool.m4 \ $(top_srcdir)/libmissing/m4/stddef_h.m4 \ $(top_srcdir)/libmissing/m4/stdint.m4 \ $(top_srcdir)/libmissing/m4/stdint_h.m4 \ $(top_srcdir)/libmissing/m4/stdio_h.m4 \ $(top_srcdir)/libmissing/m4/stdlib_h.m4 \ $(top_srcdir)/libmissing/m4/strcase.m4 \ $(top_srcdir)/libmissing/m4/strcasestr.m4 \ $(top_srcdir)/libmissing/m4/strdup.m4 \ $(top_srcdir)/libmissing/m4/strerror.m4 \ $(top_srcdir)/libmissing/m4/string_h.m4 \ $(top_srcdir)/libmissing/m4/strings_h.m4 \ $(top_srcdir)/libmissing/m4/strndup.m4 \ $(top_srcdir)/libmissing/m4/strnlen.m4 \ $(top_srcdir)/libmissing/m4/strptime.m4 \ $(top_srcdir)/libmissing/m4/strsep.m4 \ $(top_srcdir)/libmissing/m4/symlink.m4 \ $(top_srcdir)/libmissing/m4/sys_ioctl_h.m4 \ $(top_srcdir)/libmissing/m4/sys_select_h.m4 \ $(top_srcdir)/libmissing/m4/sys_socket_h.m4 \ $(top_srcdir)/libmissing/m4/sys_stat_h.m4 \ $(top_srcdir)/libmissing/m4/sys_time_h.m4 \ $(top_srcdir)/libmissing/m4/sys_utsname_h.m4 \ $(top_srcdir)/libmissing/m4/thread.m4 \ $(top_srcdir)/libmissing/m4/threadlib.m4 \ $(top_srcdir)/libmissing/m4/time_h.m4 \ $(top_srcdir)/libmissing/m4/time_r.m4 \ $(top_srcdir)/libmissing/m4/timegm.m4 \ $(top_srcdir)/libmissing/m4/tls.m4 \ $(top_srcdir)/libmissing/m4/tm_gmtoff.m4 \ $(top_srcdir)/libmissing/m4/uname.m4 \ $(top_srcdir)/libmissing/m4/ungetc.m4 \ $(top_srcdir)/libmissing/m4/unistd_h.m4 \ $(top_srcdir)/libmissing/m4/vasnprintf.m4 \ $(top_srcdir)/libmissing/m4/vsnprintf-posix.m4 \ $(top_srcdir)/libmissing/m4/vsnprintf.m4 \ $(top_srcdir)/libmissing/m4/warn-on-use.m4 \ $(top_srcdir)/libmissing/m4/wchar.m4 \ $(top_srcdir)/libmissing/m4/wchar_t.m4 \ $(top_srcdir)/libmissing/m4/wcrtomb.m4 \ $(top_srcdir)/libmissing/m4/wctob.m4 \ $(top_srcdir)/libmissing/m4/wctype.m4 \ $(top_srcdir)/libmissing/m4/wint_t.m4 \ $(top_srcdir)/libmissing/m4/write.m4 \ $(top_srcdir)/libmissing/m4/xsize.m4 \ $(top_srcdir)/libmissing/m4/yield.m4 \ $(top_srcdir)/m4/ac_compile_check_sizeof.m4 \ $(top_srcdir)/m4/am_path_ruby.m4 $(top_srcdir)/m4/argz.m4 \ $(top_srcdir)/m4/as-ac-expand.m4 \ $(top_srcdir)/m4/ax_c_check_flag.m4 \ $(top_srcdir)/m4/ax_check_aligned_access_required.m4 \ $(top_srcdir)/m4/ax_create_prelude_inttypes_h.m4 \ $(top_srcdir)/m4/ax_ld_check_flag.m4 \ $(top_srcdir)/m4/gtk-doc.m4 $(top_srcdir)/m4/libgcrypt.m4 \ $(top_srcdir)/m4/libgnutls-extra.m4 \ $(top_srcdir)/m4/libgnutls.m4 $(top_srcdir)/m4/libtool.m4 \ $(top_srcdir)/m4/ltdl.m4 $(top_srcdir)/m4/ltoptions.m4 \ $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/m4/pkg.m4 \ $(top_srcdir)/configure.in am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = SOURCES = DIST_SOURCES = am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; am__install_max = 40 am__nobase_strip_setup = \ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` am__nobase_strip = \ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" am__nobase_list = $(am__nobase_strip_setup); \ for p in $$list; do echo "$$p $$p"; done | \ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ if (++n[$$2] == $(am__install_max)) \ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ END { for (dir in files) print dir, files[dir] }' am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' am__installdirs = "$(DESTDIR)$(m4datadir)" DATA = $(dist_m4data_DATA) DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ ALLOCA = @ALLOCA@ ALLOCA_H = @ALLOCA_H@ AMTAR = @AMTAR@ APPLE_UNIVERSAL_BUILD = @APPLE_UNIVERSAL_BUILD@ AR = @AR@ ARGZ_H = @ARGZ_H@ AS = @AS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ BINDINGS_CC = @BINDINGS_CC@ BINDIR = @BINDIR@ BITSIZEOF_PTRDIFF_T = @BITSIZEOF_PTRDIFF_T@ BITSIZEOF_SIG_ATOMIC_T = @BITSIZEOF_SIG_ATOMIC_T@ BITSIZEOF_SIZE_T = @BITSIZEOF_SIZE_T@ BITSIZEOF_WCHAR_T = @BITSIZEOF_WCHAR_T@ BITSIZEOF_WINT_T = @BITSIZEOF_WINT_T@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CC_FOR_BUILD = @CC_FOR_BUILD@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EMULTIHOP_HIDDEN = @EMULTIHOP_HIDDEN@ EMULTIHOP_VALUE = @EMULTIHOP_VALUE@ ENOLINK_HIDDEN = @ENOLINK_HIDDEN@ ENOLINK_VALUE = @ENOLINK_VALUE@ EOVERFLOW_HIDDEN = @EOVERFLOW_HIDDEN@ EOVERFLOW_VALUE = @EOVERFLOW_VALUE@ ERRNO_H = @ERRNO_H@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ FLOAT_H = @FLOAT_H@ GETADDRINFO_LIB = @GETADDRINFO_LIB@ GETHOSTNAME_LIB = @GETHOSTNAME_LIB@ GLIBC21 = @GLIBC21@ GNULIB_ACCEPT = @GNULIB_ACCEPT@ GNULIB_ACCEPT4 = @GNULIB_ACCEPT4@ GNULIB_ACOSL = @GNULIB_ACOSL@ GNULIB_ASINL = @GNULIB_ASINL@ GNULIB_ATANL = @GNULIB_ATANL@ GNULIB_ATOLL = @GNULIB_ATOLL@ GNULIB_BIND = @GNULIB_BIND@ GNULIB_BTOWC = @GNULIB_BTOWC@ GNULIB_CALLOC_POSIX = @GNULIB_CALLOC_POSIX@ GNULIB_CANONICALIZE_FILE_NAME = @GNULIB_CANONICALIZE_FILE_NAME@ GNULIB_CEILF = @GNULIB_CEILF@ GNULIB_CEILL = @GNULIB_CEILL@ GNULIB_CHOWN = @GNULIB_CHOWN@ GNULIB_CLOSE = @GNULIB_CLOSE@ GNULIB_CONNECT = @GNULIB_CONNECT@ GNULIB_COSL = @GNULIB_COSL@ GNULIB_DPRINTF = @GNULIB_DPRINTF@ GNULIB_DUP2 = @GNULIB_DUP2@ GNULIB_DUP3 = @GNULIB_DUP3@ GNULIB_ENVIRON = @GNULIB_ENVIRON@ GNULIB_EUIDACCESS = @GNULIB_EUIDACCESS@ GNULIB_EXPL = @GNULIB_EXPL@ GNULIB_FACCESSAT = @GNULIB_FACCESSAT@ GNULIB_FCHDIR = @GNULIB_FCHDIR@ GNULIB_FCHMODAT = @GNULIB_FCHMODAT@ GNULIB_FCHOWNAT = @GNULIB_FCHOWNAT@ GNULIB_FCLOSE = @GNULIB_FCLOSE@ GNULIB_FCNTL = @GNULIB_FCNTL@ GNULIB_FFLUSH = @GNULIB_FFLUSH@ GNULIB_FLOORF = @GNULIB_FLOORF@ GNULIB_FLOORL = @GNULIB_FLOORL@ GNULIB_FOPEN = @GNULIB_FOPEN@ GNULIB_FPRINTF = @GNULIB_FPRINTF@ GNULIB_FPRINTF_POSIX = @GNULIB_FPRINTF_POSIX@ GNULIB_FPURGE = @GNULIB_FPURGE@ GNULIB_FPUTC = @GNULIB_FPUTC@ GNULIB_FPUTS = @GNULIB_FPUTS@ GNULIB_FREOPEN = @GNULIB_FREOPEN@ GNULIB_FREXP = @GNULIB_FREXP@ GNULIB_FREXPL = @GNULIB_FREXPL@ GNULIB_FSEEK = @GNULIB_FSEEK@ GNULIB_FSEEKO = @GNULIB_FSEEKO@ GNULIB_FSTATAT = @GNULIB_FSTATAT@ GNULIB_FSYNC = @GNULIB_FSYNC@ GNULIB_FTELL = @GNULIB_FTELL@ GNULIB_FTELLO = @GNULIB_FTELLO@ GNULIB_FTRUNCATE = @GNULIB_FTRUNCATE@ GNULIB_FUTIMENS = @GNULIB_FUTIMENS@ GNULIB_FWRITE = @GNULIB_FWRITE@ GNULIB_GETADDRINFO = @GNULIB_GETADDRINFO@ GNULIB_GETCWD = @GNULIB_GETCWD@ GNULIB_GETDELIM = @GNULIB_GETDELIM@ GNULIB_GETDOMAINNAME = @GNULIB_GETDOMAINNAME@ GNULIB_GETDTABLESIZE = @GNULIB_GETDTABLESIZE@ GNULIB_GETGROUPS = @GNULIB_GETGROUPS@ GNULIB_GETHOSTNAME = @GNULIB_GETHOSTNAME@ GNULIB_GETLINE = @GNULIB_GETLINE@ GNULIB_GETLOADAVG = @GNULIB_GETLOADAVG@ GNULIB_GETLOGIN = @GNULIB_GETLOGIN@ GNULIB_GETLOGIN_R = @GNULIB_GETLOGIN_R@ GNULIB_GETPAGESIZE = @GNULIB_GETPAGESIZE@ GNULIB_GETPEERNAME = @GNULIB_GETPEERNAME@ GNULIB_GETSOCKNAME = @GNULIB_GETSOCKNAME@ GNULIB_GETSOCKOPT = @GNULIB_GETSOCKOPT@ GNULIB_GETSUBOPT = @GNULIB_GETSUBOPT@ GNULIB_GETTIMEOFDAY = @GNULIB_GETTIMEOFDAY@ GNULIB_GETUSERSHELL = @GNULIB_GETUSERSHELL@ GNULIB_INET_NTOP = @GNULIB_INET_NTOP@ GNULIB_INET_PTON = @GNULIB_INET_PTON@ GNULIB_IOCTL = @GNULIB_IOCTL@ GNULIB_ISFINITE = @GNULIB_ISFINITE@ GNULIB_ISINF = @GNULIB_ISINF@ GNULIB_ISNAN = @GNULIB_ISNAN@ GNULIB_ISNAND = @GNULIB_ISNAND@ GNULIB_ISNANF = @GNULIB_ISNANF@ GNULIB_ISNANL = @GNULIB_ISNANL@ GNULIB_LCHMOD = @GNULIB_LCHMOD@ GNULIB_LCHOWN = @GNULIB_LCHOWN@ GNULIB_LDEXPL = @GNULIB_LDEXPL@ GNULIB_LINK = @GNULIB_LINK@ GNULIB_LINKAT = @GNULIB_LINKAT@ GNULIB_LISTEN = @GNULIB_LISTEN@ GNULIB_LOGL = @GNULIB_LOGL@ GNULIB_LSEEK = @GNULIB_LSEEK@ GNULIB_LSTAT = @GNULIB_LSTAT@ GNULIB_MALLOC_POSIX = @GNULIB_MALLOC_POSIX@ GNULIB_MBRLEN = @GNULIB_MBRLEN@ GNULIB_MBRTOWC = @GNULIB_MBRTOWC@ GNULIB_MBSCASECMP = @GNULIB_MBSCASECMP@ GNULIB_MBSCASESTR = @GNULIB_MBSCASESTR@ GNULIB_MBSCHR = @GNULIB_MBSCHR@ GNULIB_MBSCSPN = @GNULIB_MBSCSPN@ GNULIB_MBSINIT = @GNULIB_MBSINIT@ GNULIB_MBSLEN = @GNULIB_MBSLEN@ GNULIB_MBSNCASECMP = @GNULIB_MBSNCASECMP@ GNULIB_MBSNLEN = @GNULIB_MBSNLEN@ GNULIB_MBSNRTOWCS = @GNULIB_MBSNRTOWCS@ GNULIB_MBSPBRK = @GNULIB_MBSPBRK@ GNULIB_MBSPCASECMP = @GNULIB_MBSPCASECMP@ GNULIB_MBSRCHR = @GNULIB_MBSRCHR@ GNULIB_MBSRTOWCS = @GNULIB_MBSRTOWCS@ GNULIB_MBSSEP = @GNULIB_MBSSEP@ GNULIB_MBSSPN = @GNULIB_MBSSPN@ GNULIB_MBSSTR = @GNULIB_MBSSTR@ GNULIB_MBSTOK_R = @GNULIB_MBSTOK_R@ GNULIB_MEMCHR = @GNULIB_MEMCHR@ GNULIB_MEMMEM = @GNULIB_MEMMEM@ GNULIB_MEMPCPY = @GNULIB_MEMPCPY@ GNULIB_MEMRCHR = @GNULIB_MEMRCHR@ GNULIB_MKDIRAT = @GNULIB_MKDIRAT@ GNULIB_MKDTEMP = @GNULIB_MKDTEMP@ GNULIB_MKFIFO = @GNULIB_MKFIFO@ GNULIB_MKFIFOAT = @GNULIB_MKFIFOAT@ GNULIB_MKNOD = @GNULIB_MKNOD@ GNULIB_MKNODAT = @GNULIB_MKNODAT@ GNULIB_MKOSTEMP = @GNULIB_MKOSTEMP@ GNULIB_MKOSTEMPS = @GNULIB_MKOSTEMPS@ GNULIB_MKSTEMP = @GNULIB_MKSTEMP@ GNULIB_MKSTEMPS = @GNULIB_MKSTEMPS@ GNULIB_NL_LANGINFO = @GNULIB_NL_LANGINFO@ GNULIB_OBSTACK_PRINTF = @GNULIB_OBSTACK_PRINTF@ GNULIB_OBSTACK_PRINTF_POSIX = @GNULIB_OBSTACK_PRINTF_POSIX@ GNULIB_OPEN = @GNULIB_OPEN@ GNULIB_OPENAT = @GNULIB_OPENAT@ GNULIB_PERROR = @GNULIB_PERROR@ GNULIB_PIPE2 = @GNULIB_PIPE2@ GNULIB_POPEN = @GNULIB_POPEN@ GNULIB_PREAD = @GNULIB_PREAD@ GNULIB_PRINTF = @GNULIB_PRINTF@ GNULIB_PRINTF_POSIX = @GNULIB_PRINTF_POSIX@ GNULIB_PUTC = @GNULIB_PUTC@ GNULIB_PUTCHAR = @GNULIB_PUTCHAR@ GNULIB_PUTENV = @GNULIB_PUTENV@ GNULIB_PUTS = @GNULIB_PUTS@ GNULIB_RANDOM_R = @GNULIB_RANDOM_R@ GNULIB_RAWMEMCHR = @GNULIB_RAWMEMCHR@ GNULIB_READLINK = @GNULIB_READLINK@ GNULIB_READLINKAT = @GNULIB_READLINKAT@ GNULIB_REALLOC_POSIX = @GNULIB_REALLOC_POSIX@ GNULIB_REALPATH = @GNULIB_REALPATH@ GNULIB_RECV = @GNULIB_RECV@ GNULIB_RECVFROM = @GNULIB_RECVFROM@ GNULIB_REMOVE = @GNULIB_REMOVE@ GNULIB_RENAME = @GNULIB_RENAME@ GNULIB_RENAMEAT = @GNULIB_RENAMEAT@ GNULIB_RMDIR = @GNULIB_RMDIR@ GNULIB_ROUND = @GNULIB_ROUND@ GNULIB_ROUNDF = @GNULIB_ROUNDF@ GNULIB_ROUNDL = @GNULIB_ROUNDL@ GNULIB_RPMATCH = @GNULIB_RPMATCH@ GNULIB_SELECT = @GNULIB_SELECT@ GNULIB_SEND = @GNULIB_SEND@ GNULIB_SENDTO = @GNULIB_SENDTO@ GNULIB_SETENV = @GNULIB_SETENV@ GNULIB_SETSOCKOPT = @GNULIB_SETSOCKOPT@ GNULIB_SHUTDOWN = @GNULIB_SHUTDOWN@ GNULIB_SIGACTION = @GNULIB_SIGACTION@ GNULIB_SIGNAL_H_SIGPIPE = @GNULIB_SIGNAL_H_SIGPIPE@ GNULIB_SIGNBIT = @GNULIB_SIGNBIT@ GNULIB_SIGPROCMASK = @GNULIB_SIGPROCMASK@ GNULIB_SINL = @GNULIB_SINL@ GNULIB_SLEEP = @GNULIB_SLEEP@ GNULIB_SNPRINTF = @GNULIB_SNPRINTF@ GNULIB_SOCKET = @GNULIB_SOCKET@ GNULIB_SPRINTF_POSIX = @GNULIB_SPRINTF_POSIX@ GNULIB_SQRTL = @GNULIB_SQRTL@ GNULIB_STAT = @GNULIB_STAT@ GNULIB_STDIO_H_SIGPIPE = @GNULIB_STDIO_H_SIGPIPE@ GNULIB_STPCPY = @GNULIB_STPCPY@ GNULIB_STPNCPY = @GNULIB_STPNCPY@ GNULIB_STRCASESTR = @GNULIB_STRCASESTR@ GNULIB_STRCHRNUL = @GNULIB_STRCHRNUL@ GNULIB_STRDUP = @GNULIB_STRDUP@ GNULIB_STRERROR = @GNULIB_STRERROR@ GNULIB_STRNDUP = @GNULIB_STRNDUP@ GNULIB_STRNLEN = @GNULIB_STRNLEN@ GNULIB_STRPBRK = @GNULIB_STRPBRK@ GNULIB_STRSEP = @GNULIB_STRSEP@ GNULIB_STRSIGNAL = @GNULIB_STRSIGNAL@ GNULIB_STRSTR = @GNULIB_STRSTR@ GNULIB_STRTOD = @GNULIB_STRTOD@ GNULIB_STRTOK_R = @GNULIB_STRTOK_R@ GNULIB_STRTOLL = @GNULIB_STRTOLL@ GNULIB_STRTOULL = @GNULIB_STRTOULL@ GNULIB_STRVERSCMP = @GNULIB_STRVERSCMP@ GNULIB_SYMLINK = @GNULIB_SYMLINK@ GNULIB_SYMLINKAT = @GNULIB_SYMLINKAT@ GNULIB_TANL = @GNULIB_TANL@ GNULIB_TRUNC = @GNULIB_TRUNC@ GNULIB_TRUNCF = @GNULIB_TRUNCF@ GNULIB_TRUNCL = @GNULIB_TRUNCL@ GNULIB_UNAME = @GNULIB_UNAME@ GNULIB_UNISTD_H_GETOPT = @GNULIB_UNISTD_H_GETOPT@ GNULIB_UNISTD_H_SIGPIPE = @GNULIB_UNISTD_H_SIGPIPE@ GNULIB_UNLINK = @GNULIB_UNLINK@ GNULIB_UNLINKAT = @GNULIB_UNLINKAT@ GNULIB_UNSETENV = @GNULIB_UNSETENV@ GNULIB_USLEEP = @GNULIB_USLEEP@ GNULIB_UTIMENSAT = @GNULIB_UTIMENSAT@ GNULIB_VASPRINTF = @GNULIB_VASPRINTF@ GNULIB_VDPRINTF = @GNULIB_VDPRINTF@ GNULIB_VFPRINTF = @GNULIB_VFPRINTF@ GNULIB_VFPRINTF_POSIX = @GNULIB_VFPRINTF_POSIX@ GNULIB_VPRINTF = @GNULIB_VPRINTF@ GNULIB_VPRINTF_POSIX = @GNULIB_VPRINTF_POSIX@ GNULIB_VSNPRINTF = @GNULIB_VSNPRINTF@ GNULIB_VSPRINTF_POSIX = @GNULIB_VSPRINTF_POSIX@ GNULIB_WCRTOMB = @GNULIB_WCRTOMB@ GNULIB_WCSNRTOMBS = @GNULIB_WCSNRTOMBS@ GNULIB_WCSRTOMBS = @GNULIB_WCSRTOMBS@ GNULIB_WCTOB = @GNULIB_WCTOB@ GNULIB_WCWIDTH = @GNULIB_WCWIDTH@ GNULIB_WRITE = @GNULIB_WRITE@ GREP = @GREP@ GTKDOC_CHECK = @GTKDOC_CHECK@ HAVE_ACCEPT4 = @HAVE_ACCEPT4@ HAVE_ACOSL = @HAVE_ACOSL@ HAVE_ARPA_INET_H = @HAVE_ARPA_INET_H@ HAVE_ASINL = @HAVE_ASINL@ HAVE_ATANL = @HAVE_ATANL@ HAVE_ATOLL = @HAVE_ATOLL@ HAVE_BTOWC = @HAVE_BTOWC@ HAVE_CALLOC_POSIX = @HAVE_CALLOC_POSIX@ HAVE_CANONICALIZE_FILE_NAME = @HAVE_CANONICALIZE_FILE_NAME@ HAVE_CHOWN = @HAVE_CHOWN@ HAVE_COSL = @HAVE_COSL@ HAVE_CXX = @HAVE_CXX@ HAVE_DECL_ACOSL = @HAVE_DECL_ACOSL@ HAVE_DECL_ASINL = @HAVE_DECL_ASINL@ HAVE_DECL_ATANL = @HAVE_DECL_ATANL@ HAVE_DECL_COSL = @HAVE_DECL_COSL@ HAVE_DECL_ENVIRON = @HAVE_DECL_ENVIRON@ HAVE_DECL_EXPL = @HAVE_DECL_EXPL@ HAVE_DECL_FPURGE = @HAVE_DECL_FPURGE@ HAVE_DECL_FREEADDRINFO = @HAVE_DECL_FREEADDRINFO@ HAVE_DECL_FREXPL = @HAVE_DECL_FREXPL@ HAVE_DECL_GAI_STRERROR = @HAVE_DECL_GAI_STRERROR@ HAVE_DECL_GETADDRINFO = @HAVE_DECL_GETADDRINFO@ HAVE_DECL_GETDELIM = @HAVE_DECL_GETDELIM@ HAVE_DECL_GETLINE = @HAVE_DECL_GETLINE@ HAVE_DECL_GETLOADAVG = @HAVE_DECL_GETLOADAVG@ HAVE_DECL_GETLOGIN_R = @HAVE_DECL_GETLOGIN_R@ HAVE_DECL_GETNAMEINFO = @HAVE_DECL_GETNAMEINFO@ HAVE_DECL_INET_NTOP = @HAVE_DECL_INET_NTOP@ HAVE_DECL_INET_PTON = @HAVE_DECL_INET_PTON@ HAVE_DECL_LDEXPL = @HAVE_DECL_LDEXPL@ HAVE_DECL_LOGL = @HAVE_DECL_LOGL@ HAVE_DECL_MEMMEM = @HAVE_DECL_MEMMEM@ HAVE_DECL_MEMRCHR = @HAVE_DECL_MEMRCHR@ HAVE_DECL_OBSTACK_PRINTF = @HAVE_DECL_OBSTACK_PRINTF@ HAVE_DECL_SINL = @HAVE_DECL_SINL@ HAVE_DECL_SNPRINTF = @HAVE_DECL_SNPRINTF@ HAVE_DECL_SQRTL = @HAVE_DECL_SQRTL@ HAVE_DECL_STRDUP = @HAVE_DECL_STRDUP@ HAVE_DECL_STRERROR = @HAVE_DECL_STRERROR@ HAVE_DECL_STRNCASECMP = @HAVE_DECL_STRNCASECMP@ HAVE_DECL_STRNDUP = @HAVE_DECL_STRNDUP@ HAVE_DECL_STRNLEN = @HAVE_DECL_STRNLEN@ HAVE_DECL_STRSIGNAL = @HAVE_DECL_STRSIGNAL@ HAVE_DECL_STRTOK_R = @HAVE_DECL_STRTOK_R@ HAVE_DECL_TANL = @HAVE_DECL_TANL@ HAVE_DECL_TRUNC = @HAVE_DECL_TRUNC@ HAVE_DECL_TRUNCF = @HAVE_DECL_TRUNCF@ HAVE_DECL_VSNPRINTF = @HAVE_DECL_VSNPRINTF@ HAVE_DECL_WCTOB = @HAVE_DECL_WCTOB@ HAVE_DECL_WCWIDTH = @HAVE_DECL_WCWIDTH@ HAVE_DPRINTF = @HAVE_DPRINTF@ HAVE_DUP2 = @HAVE_DUP2@ HAVE_DUP3 = @HAVE_DUP3@ HAVE_EUIDACCESS = @HAVE_EUIDACCESS@ HAVE_EXPL = @HAVE_EXPL@ HAVE_FACCESSAT = @HAVE_FACCESSAT@ HAVE_FCHMODAT = @HAVE_FCHMODAT@ HAVE_FCHOWNAT = @HAVE_FCHOWNAT@ HAVE_FCNTL = @HAVE_FCNTL@ HAVE_FSTATAT = @HAVE_FSTATAT@ HAVE_FSYNC = @HAVE_FSYNC@ HAVE_FTRUNCATE = @HAVE_FTRUNCATE@ HAVE_FUTIMENS = @HAVE_FUTIMENS@ HAVE_GETDOMAINNAME = @HAVE_GETDOMAINNAME@ HAVE_GETDTABLESIZE = @HAVE_GETDTABLESIZE@ HAVE_GETGROUPS = @HAVE_GETGROUPS@ HAVE_GETHOSTNAME = @HAVE_GETHOSTNAME@ HAVE_GETLOGIN = @HAVE_GETLOGIN@ HAVE_GETPAGESIZE = @HAVE_GETPAGESIZE@ HAVE_GETSUBOPT = @HAVE_GETSUBOPT@ HAVE_GETUSERSHELL = @HAVE_GETUSERSHELL@ HAVE_INTTYPES_H = @HAVE_INTTYPES_H@ HAVE_ISNAND = @HAVE_ISNAND@ HAVE_ISNANF = @HAVE_ISNANF@ HAVE_ISNANL = @HAVE_ISNANL@ HAVE_ISWCNTRL = @HAVE_ISWCNTRL@ HAVE_LANGINFO_CODESET = @HAVE_LANGINFO_CODESET@ HAVE_LANGINFO_ERA = @HAVE_LANGINFO_ERA@ HAVE_LANGINFO_H = @HAVE_LANGINFO_H@ HAVE_LCHMOD = @HAVE_LCHMOD@ HAVE_LCHOWN = @HAVE_LCHOWN@ HAVE_LINK = @HAVE_LINK@ HAVE_LINKAT = @HAVE_LINKAT@ HAVE_LOGL = @HAVE_LOGL@ HAVE_LONG_LONG_INT = @HAVE_LONG_LONG_INT@ HAVE_LSTAT = @HAVE_LSTAT@ HAVE_MALLOC_POSIX = @HAVE_MALLOC_POSIX@ HAVE_MBRLEN = @HAVE_MBRLEN@ HAVE_MBRTOWC = @HAVE_MBRTOWC@ HAVE_MBSINIT = @HAVE_MBSINIT@ HAVE_MBSLEN = @HAVE_MBSLEN@ HAVE_MBSNRTOWCS = @HAVE_MBSNRTOWCS@ HAVE_MBSRTOWCS = @HAVE_MBSRTOWCS@ HAVE_MEMPCPY = @HAVE_MEMPCPY@ HAVE_MKDIRAT = @HAVE_MKDIRAT@ HAVE_MKDTEMP = @HAVE_MKDTEMP@ HAVE_MKFIFO = @HAVE_MKFIFO@ HAVE_MKFIFOAT = @HAVE_MKFIFOAT@ HAVE_MKNOD = @HAVE_MKNOD@ HAVE_MKNODAT = @HAVE_MKNODAT@ HAVE_MKOSTEMP = @HAVE_MKOSTEMP@ HAVE_MKOSTEMPS = @HAVE_MKOSTEMPS@ HAVE_MKSTEMPS = @HAVE_MKSTEMPS@ HAVE_NETDB_H = @HAVE_NETDB_H@ HAVE_NETINET_IN_H = @HAVE_NETINET_IN_H@ HAVE_NL_LANGINFO = @HAVE_NL_LANGINFO@ HAVE_OPENAT = @HAVE_OPENAT@ HAVE_OS_H = @HAVE_OS_H@ HAVE_PIPE2 = @HAVE_PIPE2@ HAVE_POSIX_SIGNALBLOCKING = @HAVE_POSIX_SIGNALBLOCKING@ HAVE_PREAD = @HAVE_PREAD@ HAVE_RANDOM_H = @HAVE_RANDOM_H@ HAVE_RANDOM_R = @HAVE_RANDOM_R@ HAVE_RAWMEMCHR = @HAVE_RAWMEMCHR@ HAVE_READLINK = @HAVE_READLINK@ HAVE_READLINKAT = @HAVE_READLINKAT@ HAVE_REALLOC_POSIX = @HAVE_REALLOC_POSIX@ HAVE_REALPATH = @HAVE_REALPATH@ HAVE_RENAMEAT = @HAVE_RENAMEAT@ HAVE_RPMATCH = @HAVE_RPMATCH@ HAVE_SA_FAMILY_T = @HAVE_SA_FAMILY_T@ HAVE_SETENV = @HAVE_SETENV@ HAVE_SIGACTION = @HAVE_SIGACTION@ HAVE_SIGINFO_T = @HAVE_SIGINFO_T@ HAVE_SIGNED_SIG_ATOMIC_T = @HAVE_SIGNED_SIG_ATOMIC_T@ HAVE_SIGNED_WCHAR_T = @HAVE_SIGNED_WCHAR_T@ HAVE_SIGNED_WINT_T = @HAVE_SIGNED_WINT_T@ HAVE_SIGSET_T = @HAVE_SIGSET_T@ HAVE_SINL = @HAVE_SINL@ HAVE_SLEEP = @HAVE_SLEEP@ HAVE_SQRTL = @HAVE_SQRTL@ HAVE_STDINT_H = @HAVE_STDINT_H@ HAVE_STPCPY = @HAVE_STPCPY@ HAVE_STPNCPY = @HAVE_STPNCPY@ HAVE_STRCASECMP = @HAVE_STRCASECMP@ HAVE_STRCASESTR = @HAVE_STRCASESTR@ HAVE_STRCHRNUL = @HAVE_STRCHRNUL@ HAVE_STRPBRK = @HAVE_STRPBRK@ HAVE_STRSEP = @HAVE_STRSEP@ HAVE_STRTOD = @HAVE_STRTOD@ HAVE_STRTOLL = @HAVE_STRTOLL@ HAVE_STRTOULL = @HAVE_STRTOULL@ HAVE_STRUCT_ADDRINFO = @HAVE_STRUCT_ADDRINFO@ HAVE_STRUCT_RANDOM_DATA = @HAVE_STRUCT_RANDOM_DATA@ HAVE_STRUCT_SIGACTION_SA_SIGACTION = @HAVE_STRUCT_SIGACTION_SA_SIGACTION@ HAVE_STRUCT_SOCKADDR_STORAGE = @HAVE_STRUCT_SOCKADDR_STORAGE@ HAVE_STRUCT_TIMEVAL = @HAVE_STRUCT_TIMEVAL@ HAVE_STRUCT_UTSNAME = @HAVE_STRUCT_UTSNAME@ HAVE_STRVERSCMP = @HAVE_STRVERSCMP@ HAVE_SYMLINK = @HAVE_SYMLINK@ HAVE_SYMLINKAT = @HAVE_SYMLINKAT@ HAVE_SYS_BITYPES_H = @HAVE_SYS_BITYPES_H@ HAVE_SYS_INTTYPES_H = @HAVE_SYS_INTTYPES_H@ HAVE_SYS_IOCTL_H = @HAVE_SYS_IOCTL_H@ HAVE_SYS_LOADAVG_H = @HAVE_SYS_LOADAVG_H@ HAVE_SYS_PARAM_H = @HAVE_SYS_PARAM_H@ HAVE_SYS_SELECT_H = @HAVE_SYS_SELECT_H@ HAVE_SYS_SOCKET_H = @HAVE_SYS_SOCKET_H@ HAVE_SYS_TIME_H = @HAVE_SYS_TIME_H@ HAVE_SYS_TYPES_H = @HAVE_SYS_TYPES_H@ HAVE_SYS_UTSNAME_H = @HAVE_SYS_UTSNAME_H@ HAVE_TANL = @HAVE_TANL@ HAVE_TYPE_VOLATILE_SIG_ATOMIC_T = @HAVE_TYPE_VOLATILE_SIG_ATOMIC_T@ HAVE_UNAME = @HAVE_UNAME@ HAVE_UNISTD_H = @HAVE_UNISTD_H@ HAVE_UNLINKAT = @HAVE_UNLINKAT@ HAVE_UNSETENV = @HAVE_UNSETENV@ HAVE_UNSIGNED_LONG_LONG_INT = @HAVE_UNSIGNED_LONG_LONG_INT@ HAVE_USLEEP = @HAVE_USLEEP@ HAVE_UTIMENSAT = @HAVE_UTIMENSAT@ HAVE_VASPRINTF = @HAVE_VASPRINTF@ HAVE_VDPRINTF = @HAVE_VDPRINTF@ HAVE_WCHAR_H = @HAVE_WCHAR_H@ HAVE_WCHAR_T = @HAVE_WCHAR_T@ HAVE_WCRTOMB = @HAVE_WCRTOMB@ HAVE_WCSNRTOMBS = @HAVE_WCSNRTOMBS@ HAVE_WCSRTOMBS = @HAVE_WCSRTOMBS@ HAVE_WCTYPE_H = @HAVE_WCTYPE_H@ HAVE_WINSOCK2_H = @HAVE_WINSOCK2_H@ HAVE_WINT_T = @HAVE_WINT_T@ HAVE_WS2TCPIP_H = @HAVE_WS2TCPIP_H@ HAVE__BOOL = @HAVE__BOOL@ HOSTENT_LIB = @HOSTENT_LIB@ HTML_DIR = @HTML_DIR@ INCLTDL = @INCLTDL@ INCLUDE_NEXT = @INCLUDE_NEXT@ INCLUDE_NEXT_AS_FIRST_DIRECTIVE = @INCLUDE_NEXT_AS_FIRST_DIRECTIVE@ INET_NTOP_LIB = @INET_NTOP_LIB@ INET_PTON_LIB = @INET_PTON_LIB@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LD = @LD@ LDFLAGS = @LDFLAGS@ LEX = @LEX@ LEXLIB = @LEXLIB@ LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@ LIBADD_DL = @LIBADD_DL@ LIBADD_DLD_LINK = @LIBADD_DLD_LINK@ LIBADD_DLOPEN = @LIBADD_DLOPEN@ LIBADD_SHL_LOAD = @LIBADD_SHL_LOAD@ LIBDIR = @LIBDIR@ LIBGCRYPT_CFLAGS = @LIBGCRYPT_CFLAGS@ LIBGCRYPT_CONFIG = @LIBGCRYPT_CONFIG@ LIBGCRYPT_LIBS = @LIBGCRYPT_LIBS@ LIBGNUTLS_CFLAGS = @LIBGNUTLS_CFLAGS@ LIBGNUTLS_CONFIG = @LIBGNUTLS_CONFIG@ LIBGNUTLS_EXTRA_CFLAGS = @LIBGNUTLS_EXTRA_CFLAGS@ LIBGNUTLS_EXTRA_CONFIG = @LIBGNUTLS_EXTRA_CONFIG@ LIBGNUTLS_EXTRA_LIBS = @LIBGNUTLS_EXTRA_LIBS@ LIBGNUTLS_LIBS = @LIBGNUTLS_LIBS@ LIBINTL = @LIBINTL@ LIBLTDL = @LIBLTDL@ LIBMULTITHREAD = @LIBMULTITHREAD@ LIBOBJS = @LIBOBJS@ LIBPRELUDECPP_SONAME = @LIBPRELUDECPP_SONAME@ LIBPRELUDE_CFLAGS = @LIBPRELUDE_CFLAGS@ LIBPRELUDE_LIBS = @LIBPRELUDE_LIBS@ LIBPRELUDE_SONAME = @LIBPRELUDE_SONAME@ LIBPTH = @LIBPTH@ LIBPTH_PREFIX = @LIBPTH_PREFIX@ LIBS = @LIBS@ LIBSOCKET = @LIBSOCKET@ LIBTESTS_LIBDEPS = @LIBTESTS_LIBDEPS@ LIBTHREAD = @LIBTHREAD@ LIBTOOL = @LIBTOOL@ LIPO = @LIPO@ LN_S = @LN_S@ LOCALCHARSET_TESTS_ENVIRONMENT = @LOCALCHARSET_TESTS_ENVIRONMENT@ LOCALE_FR = @LOCALE_FR@ LOCALE_FR_UTF8 = @LOCALE_FR_UTF8@ LOCALE_JA = @LOCALE_JA@ LOCALE_TR_UTF8 = @LOCALE_TR_UTF8@ LOCALE_ZH_CN = @LOCALE_ZH_CN@ LOCALSTATEDIR = @LOCALSTATEDIR@ LTALLOCA = @LTALLOCA@ LTDLDEPS = @LTDLDEPS@ LTDLINCL = @LTDLINCL@ LTDLOPEN = @LTDLOPEN@ LTLIBINTL = @LTLIBINTL@ LTLIBMULTITHREAD = @LTLIBMULTITHREAD@ LTLIBOBJS = @LTLIBOBJS@ LTLIBPTH = @LTLIBPTH@ LTLIBTHREAD = @LTLIBTHREAD@ LT_CONFIG_H = @LT_CONFIG_H@ LT_DLLOADERS = @LT_DLLOADERS@ LT_DLPREOPEN = @LT_DLPREOPEN@ LUA_CFLAGS = @LUA_CFLAGS@ LUA_CONFIG = @LUA_CONFIG@ LUA_LIBS = @LUA_LIBS@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MKDIR_P = @MKDIR_P@ NETDB_H = @NETDB_H@ NETINET_IN_H = @NETINET_IN_H@ NEXT_ARPA_INET_H = @NEXT_ARPA_INET_H@ NEXT_AS_FIRST_DIRECTIVE_ARPA_INET_H = @NEXT_AS_FIRST_DIRECTIVE_ARPA_INET_H@ NEXT_AS_FIRST_DIRECTIVE_ERRNO_H = @NEXT_AS_FIRST_DIRECTIVE_ERRNO_H@ NEXT_AS_FIRST_DIRECTIVE_FCNTL_H = @NEXT_AS_FIRST_DIRECTIVE_FCNTL_H@ NEXT_AS_FIRST_DIRECTIVE_FLOAT_H = @NEXT_AS_FIRST_DIRECTIVE_FLOAT_H@ NEXT_AS_FIRST_DIRECTIVE_LANGINFO_H = @NEXT_AS_FIRST_DIRECTIVE_LANGINFO_H@ NEXT_AS_FIRST_DIRECTIVE_MATH_H = @NEXT_AS_FIRST_DIRECTIVE_MATH_H@ NEXT_AS_FIRST_DIRECTIVE_NETDB_H = @NEXT_AS_FIRST_DIRECTIVE_NETDB_H@ NEXT_AS_FIRST_DIRECTIVE_NETINET_IN_H = @NEXT_AS_FIRST_DIRECTIVE_NETINET_IN_H@ NEXT_AS_FIRST_DIRECTIVE_SIGNAL_H = @NEXT_AS_FIRST_DIRECTIVE_SIGNAL_H@ NEXT_AS_FIRST_DIRECTIVE_STDDEF_H = @NEXT_AS_FIRST_DIRECTIVE_STDDEF_H@ NEXT_AS_FIRST_DIRECTIVE_STDINT_H = @NEXT_AS_FIRST_DIRECTIVE_STDINT_H@ NEXT_AS_FIRST_DIRECTIVE_STDIO_H = @NEXT_AS_FIRST_DIRECTIVE_STDIO_H@ NEXT_AS_FIRST_DIRECTIVE_STDLIB_H = @NEXT_AS_FIRST_DIRECTIVE_STDLIB_H@ NEXT_AS_FIRST_DIRECTIVE_STRINGS_H = @NEXT_AS_FIRST_DIRECTIVE_STRINGS_H@ NEXT_AS_FIRST_DIRECTIVE_STRING_H = @NEXT_AS_FIRST_DIRECTIVE_STRING_H@ NEXT_AS_FIRST_DIRECTIVE_SYS_IOCTL_H = @NEXT_AS_FIRST_DIRECTIVE_SYS_IOCTL_H@ NEXT_AS_FIRST_DIRECTIVE_SYS_SELECT_H = @NEXT_AS_FIRST_DIRECTIVE_SYS_SELECT_H@ NEXT_AS_FIRST_DIRECTIVE_SYS_SOCKET_H = @NEXT_AS_FIRST_DIRECTIVE_SYS_SOCKET_H@ NEXT_AS_FIRST_DIRECTIVE_SYS_STAT_H = @NEXT_AS_FIRST_DIRECTIVE_SYS_STAT_H@ NEXT_AS_FIRST_DIRECTIVE_SYS_TIME_H = @NEXT_AS_FIRST_DIRECTIVE_SYS_TIME_H@ NEXT_AS_FIRST_DIRECTIVE_SYS_UTSNAME_H = @NEXT_AS_FIRST_DIRECTIVE_SYS_UTSNAME_H@ NEXT_AS_FIRST_DIRECTIVE_TIME_H = @NEXT_AS_FIRST_DIRECTIVE_TIME_H@ NEXT_AS_FIRST_DIRECTIVE_UNISTD_H = @NEXT_AS_FIRST_DIRECTIVE_UNISTD_H@ NEXT_AS_FIRST_DIRECTIVE_WCHAR_H = @NEXT_AS_FIRST_DIRECTIVE_WCHAR_H@ NEXT_AS_FIRST_DIRECTIVE_WCTYPE_H = @NEXT_AS_FIRST_DIRECTIVE_WCTYPE_H@ NEXT_ERRNO_H = @NEXT_ERRNO_H@ NEXT_FCNTL_H = @NEXT_FCNTL_H@ NEXT_FLOAT_H = @NEXT_FLOAT_H@ NEXT_LANGINFO_H = @NEXT_LANGINFO_H@ NEXT_MATH_H = @NEXT_MATH_H@ NEXT_NETDB_H = @NEXT_NETDB_H@ NEXT_NETINET_IN_H = @NEXT_NETINET_IN_H@ NEXT_SIGNAL_H = @NEXT_SIGNAL_H@ NEXT_STDDEF_H = @NEXT_STDDEF_H@ NEXT_STDINT_H = @NEXT_STDINT_H@ NEXT_STDIO_H = @NEXT_STDIO_H@ NEXT_STDLIB_H = @NEXT_STDLIB_H@ NEXT_STRINGS_H = @NEXT_STRINGS_H@ NEXT_STRING_H = @NEXT_STRING_H@ NEXT_SYS_IOCTL_H = @NEXT_SYS_IOCTL_H@ NEXT_SYS_SELECT_H = @NEXT_SYS_SELECT_H@ NEXT_SYS_SOCKET_H = @NEXT_SYS_SOCKET_H@ NEXT_SYS_STAT_H = @NEXT_SYS_STAT_H@ NEXT_SYS_TIME_H = @NEXT_SYS_TIME_H@ NEXT_SYS_UTSNAME_H = @NEXT_SYS_UTSNAME_H@ NEXT_TIME_H = @NEXT_TIME_H@ NEXT_UNISTD_H = @NEXT_UNISTD_H@ NEXT_WCHAR_H = @NEXT_WCHAR_H@ NEXT_WCTYPE_H = @NEXT_WCTYPE_H@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PCFLAGS = @PCFLAGS@ PERL = @PERL@ PERL_EXTRA_PARAMS = @PERL_EXTRA_PARAMS@ PKG_CONFIG = @PKG_CONFIG@ POLL_H = @POLL_H@ PRAGMA_SYSTEM_HEADER = @PRAGMA_SYSTEM_HEADER@ PRELUDE_ADMIN_CFLAGS = @PRELUDE_ADMIN_CFLAGS@ PRELUDE_ADMIN_LIBS = @PRELUDE_ADMIN_LIBS@ PRELUDE_CONFIG_DIR = @PRELUDE_CONFIG_DIR@ PRELUDE_SPOOL_DIR = @PRELUDE_SPOOL_DIR@ PTHREAD_CFLAGS = @PTHREAD_CFLAGS@ PTHREAD_LDFLAGS = @PTHREAD_LDFLAGS@ PTHREAD_LIBS = @PTHREAD_LIBS@ PTRDIFF_T_SUFFIX = @PTRDIFF_T_SUFFIX@ PYTHON = @PYTHON@ RANLIB = @RANLIB@ RELOCATABLE = @RELOCATABLE@ REPLACE_BTOWC = @REPLACE_BTOWC@ REPLACE_CANONICALIZE_FILE_NAME = @REPLACE_CANONICALIZE_FILE_NAME@ REPLACE_CEILF = @REPLACE_CEILF@ REPLACE_CEILL = @REPLACE_CEILL@ REPLACE_CHOWN = @REPLACE_CHOWN@ REPLACE_CLOSE = @REPLACE_CLOSE@ REPLACE_DPRINTF = @REPLACE_DPRINTF@ REPLACE_DUP = @REPLACE_DUP@ REPLACE_DUP2 = @REPLACE_DUP2@ REPLACE_FCHDIR = @REPLACE_FCHDIR@ REPLACE_FCHOWNAT = @REPLACE_FCHOWNAT@ REPLACE_FCLOSE = @REPLACE_FCLOSE@ REPLACE_FCNTL = @REPLACE_FCNTL@ REPLACE_FFLUSH = @REPLACE_FFLUSH@ REPLACE_FLOORF = @REPLACE_FLOORF@ REPLACE_FLOORL = @REPLACE_FLOORL@ REPLACE_FOPEN = @REPLACE_FOPEN@ REPLACE_FPRINTF = @REPLACE_FPRINTF@ REPLACE_FPURGE = @REPLACE_FPURGE@ REPLACE_FREOPEN = @REPLACE_FREOPEN@ REPLACE_FREXP = @REPLACE_FREXP@ REPLACE_FREXPL = @REPLACE_FREXPL@ REPLACE_FSEEK = @REPLACE_FSEEK@ REPLACE_FSEEKO = @REPLACE_FSEEKO@ REPLACE_FSTAT = @REPLACE_FSTAT@ REPLACE_FSTATAT = @REPLACE_FSTATAT@ REPLACE_FTELL = @REPLACE_FTELL@ REPLACE_FTELLO = @REPLACE_FTELLO@ REPLACE_FUTIMENS = @REPLACE_FUTIMENS@ REPLACE_GETCWD = @REPLACE_GETCWD@ REPLACE_GETDELIM = @REPLACE_GETDELIM@ REPLACE_GETGROUPS = @REPLACE_GETGROUPS@ REPLACE_GETLINE = @REPLACE_GETLINE@ REPLACE_GETPAGESIZE = @REPLACE_GETPAGESIZE@ REPLACE_GETTIMEOFDAY = @REPLACE_GETTIMEOFDAY@ REPLACE_HUGE_VAL = @REPLACE_HUGE_VAL@ REPLACE_ISFINITE = @REPLACE_ISFINITE@ REPLACE_ISINF = @REPLACE_ISINF@ REPLACE_ISNAN = @REPLACE_ISNAN@ REPLACE_ISWCNTRL = @REPLACE_ISWCNTRL@ REPLACE_LCHOWN = @REPLACE_LCHOWN@ REPLACE_LDEXPL = @REPLACE_LDEXPL@ REPLACE_LINK = @REPLACE_LINK@ REPLACE_LINKAT = @REPLACE_LINKAT@ REPLACE_LOCALTIME_R = @REPLACE_LOCALTIME_R@ REPLACE_LSEEK = @REPLACE_LSEEK@ REPLACE_LSTAT = @REPLACE_LSTAT@ REPLACE_MBRLEN = @REPLACE_MBRLEN@ REPLACE_MBRTOWC = @REPLACE_MBRTOWC@ REPLACE_MBSINIT = @REPLACE_MBSINIT@ REPLACE_MBSNRTOWCS = @REPLACE_MBSNRTOWCS@ REPLACE_MBSRTOWCS = @REPLACE_MBSRTOWCS@ REPLACE_MBSTATE_T = @REPLACE_MBSTATE_T@ REPLACE_MEMCHR = @REPLACE_MEMCHR@ REPLACE_MEMMEM = @REPLACE_MEMMEM@ REPLACE_MKDIR = @REPLACE_MKDIR@ REPLACE_MKFIFO = @REPLACE_MKFIFO@ REPLACE_MKNOD = @REPLACE_MKNOD@ REPLACE_MKSTEMP = @REPLACE_MKSTEMP@ REPLACE_MKTIME = @REPLACE_MKTIME@ REPLACE_NAN = @REPLACE_NAN@ REPLACE_NANOSLEEP = @REPLACE_NANOSLEEP@ REPLACE_NL_LANGINFO = @REPLACE_NL_LANGINFO@ REPLACE_NULL = @REPLACE_NULL@ REPLACE_OBSTACK_PRINTF = @REPLACE_OBSTACK_PRINTF@ REPLACE_OPEN = @REPLACE_OPEN@ REPLACE_OPENAT = @REPLACE_OPENAT@ REPLACE_PERROR = @REPLACE_PERROR@ REPLACE_POPEN = @REPLACE_POPEN@ REPLACE_PREAD = @REPLACE_PREAD@ REPLACE_PRINTF = @REPLACE_PRINTF@ REPLACE_PUTENV = @REPLACE_PUTENV@ REPLACE_READLINK = @REPLACE_READLINK@ REPLACE_REALPATH = @REPLACE_REALPATH@ REPLACE_REMOVE = @REPLACE_REMOVE@ REPLACE_RENAME = @REPLACE_RENAME@ REPLACE_RENAMEAT = @REPLACE_RENAMEAT@ REPLACE_RMDIR = @REPLACE_RMDIR@ REPLACE_ROUND = @REPLACE_ROUND@ REPLACE_ROUNDF = @REPLACE_ROUNDF@ REPLACE_ROUNDL = @REPLACE_ROUNDL@ REPLACE_SELECT = @REPLACE_SELECT@ REPLACE_SETENV = @REPLACE_SETENV@ REPLACE_SIGNBIT = @REPLACE_SIGNBIT@ REPLACE_SIGNBIT_USING_GCC = @REPLACE_SIGNBIT_USING_GCC@ REPLACE_SLEEP = @REPLACE_SLEEP@ REPLACE_SNPRINTF = @REPLACE_SNPRINTF@ REPLACE_SPRINTF = @REPLACE_SPRINTF@ REPLACE_STAT = @REPLACE_STAT@ REPLACE_STDIO_WRITE_FUNCS = @REPLACE_STDIO_WRITE_FUNCS@ REPLACE_STRCASESTR = @REPLACE_STRCASESTR@ REPLACE_STRDUP = @REPLACE_STRDUP@ REPLACE_STRERROR = @REPLACE_STRERROR@ REPLACE_STRNDUP = @REPLACE_STRNDUP@ REPLACE_STRPTIME = @REPLACE_STRPTIME@ REPLACE_STRSIGNAL = @REPLACE_STRSIGNAL@ REPLACE_STRSTR = @REPLACE_STRSTR@ REPLACE_STRTOD = @REPLACE_STRTOD@ REPLACE_STRTOK_R = @REPLACE_STRTOK_R@ REPLACE_SYMLINK = @REPLACE_SYMLINK@ REPLACE_TIMEGM = @REPLACE_TIMEGM@ REPLACE_TRUNCL = @REPLACE_TRUNCL@ REPLACE_UNLINK = @REPLACE_UNLINK@ REPLACE_UNLINKAT = @REPLACE_UNLINKAT@ REPLACE_UNSETENV = @REPLACE_UNSETENV@ REPLACE_USLEEP = @REPLACE_USLEEP@ REPLACE_UTIMENSAT = @REPLACE_UTIMENSAT@ REPLACE_VASPRINTF = @REPLACE_VASPRINTF@ REPLACE_VDPRINTF = @REPLACE_VDPRINTF@ REPLACE_VFPRINTF = @REPLACE_VFPRINTF@ REPLACE_VPRINTF = @REPLACE_VPRINTF@ REPLACE_VSNPRINTF = @REPLACE_VSNPRINTF@ REPLACE_VSPRINTF = @REPLACE_VSPRINTF@ REPLACE_WCRTOMB = @REPLACE_WCRTOMB@ REPLACE_WCSNRTOMBS = @REPLACE_WCSNRTOMBS@ REPLACE_WCSRTOMBS = @REPLACE_WCSRTOMBS@ REPLACE_WCTOB = @REPLACE_WCTOB@ REPLACE_WCWIDTH = @REPLACE_WCWIDTH@ REPLACE_WRITE = @REPLACE_WRITE@ RUBY = @RUBY@ RUBY_CCFLAGS = @RUBY_CCFLAGS@ RUBY_EXEC_PREFIX = @RUBY_EXEC_PREFIX@ RUBY_INCLUDES = @RUBY_INCLUDES@ RUBY_LIBS = @RUBY_LIBS@ RUBY_PLATFORM = @RUBY_PLATFORM@ RUBY_PREFIX = @RUBY_PREFIX@ RUBY_VERSION = @RUBY_VERSION@ SED = @SED@ SERVENT_LIB = @SERVENT_LIB@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ SIG_ATOMIC_T_SUFFIX = @SIG_ATOMIC_T_SUFFIX@ SIZE_T_SUFFIX = @SIZE_T_SUFFIX@ STDBOOL_H = @STDBOOL_H@ STDDEF_H = @STDDEF_H@ STDINT_H = @STDINT_H@ STRIP = @STRIP@ SWIG = @SWIG@ SYSCONFDIR = @SYSCONFDIR@ SYS_IOCTL_H_HAVE_WINSOCK2_H = @SYS_IOCTL_H_HAVE_WINSOCK2_H@ SYS_IOCTL_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS = @SYS_IOCTL_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS@ SYS_SOCKET_H = @SYS_SOCKET_H@ SYS_TIME_H_DEFINES_STRUCT_TIMESPEC = @SYS_TIME_H_DEFINES_STRUCT_TIMESPEC@ TIME_H_DEFINES_STRUCT_TIMESPEC = @TIME_H_DEFINES_STRUCT_TIMESPEC@ UNDEFINE_STRTOK_R = @UNDEFINE_STRTOK_R@ UNISTD_H_HAVE_WINSOCK2_H = @UNISTD_H_HAVE_WINSOCK2_H@ UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS = @UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS@ VALGRIND = @VALGRIND@ VERSION = @VERSION@ WCHAR_T_SUFFIX = @WCHAR_T_SUFFIX@ WCTYPE_H = @WCTYPE_H@ WINT_T_SUFFIX = @WINT_T_SUFFIX@ YACC = @YACC@ YFLAGS = @YFLAGS@ YIELD_LIB = @YIELD_LIB@ __PRELUDE_64BIT_FORMAT_PREFIX = @__PRELUDE_64BIT_FORMAT_PREFIX@ __PRELUDE_HAVE_64BIT_LONG = @__PRELUDE_HAVE_64BIT_LONG@ __PRELUDE_HAVE_INTTYPES_H = @__PRELUDE_HAVE_INTTYPES_H@ __PRELUDE_HAVE_STDINT_H = @__PRELUDE_HAVE_STDINT_H@ __PRELUDE_STDINT_HAVE_UINT16 = @__PRELUDE_STDINT_HAVE_UINT16@ __PRELUDE_STDINT_HAVE_UINT32 = @__PRELUDE_STDINT_HAVE_UINT32@ __PRELUDE_STDINT_HAVE_UINT64 = @__PRELUDE_STDINT_HAVE_UINT64@ __PRELUDE_STDINT_HAVE_UINT8 = @__PRELUDE_STDINT_HAVE_UINT8@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ gl_LIBOBJS = @gl_LIBOBJS@ gl_LTLIBOBJS = @gl_LTLIBOBJS@ gltests_LIBOBJS = @gltests_LIBOBJS@ gltests_LTLIBOBJS = @gltests_LTLIBOBJS@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ lt_ECHO = @lt_ECHO@ ltdl_LIBOBJS = @ltdl_LIBOBJS@ ltdl_LTLIBOBJS = @ltdl_LTLIBOBJS@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ pkgrbexecdir = @pkgrbexecdir@ pkgrubydir = @pkgrubydir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ rbexecdir = @rbexecdir@ rubydir = @rubydir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sys_symbol_underscore = @sys_symbol_underscore@ sysconfdir = @sysconfdir@ target = @target@ target_alias = @target_alias@ target_cpu = @target_cpu@ target_os = @target_os@ target_vendor = @target_vendor@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ m4datadir = $(datadir)/aclocal dist_m4data_DATA = libprelude.m4 GITIGNOREFILES = argz.m4 \ ltdl.m4 \ libtool.m4 \ ltoptions.m4 \ ltsugar.m4 \ ltversion.m4 \ lt~obsolete.m4 all: all-am .SUFFIXES: $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu m4/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu m4/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs install-dist_m4dataDATA: $(dist_m4data_DATA) @$(NORMAL_INSTALL) test -z "$(m4datadir)" || $(MKDIR_P) "$(DESTDIR)$(m4datadir)" @list='$(dist_m4data_DATA)'; test -n "$(m4datadir)" || list=; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ done | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(m4datadir)'"; \ $(INSTALL_DATA) $$files "$(DESTDIR)$(m4datadir)" || exit $$?; \ done uninstall-dist_m4dataDATA: @$(NORMAL_UNINSTALL) @list='$(dist_m4data_DATA)'; test -n "$(m4datadir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ test -n "$$files" || exit 0; \ echo " ( cd '$(DESTDIR)$(m4datadir)' && rm -f" $$files ")"; \ cd "$(DESTDIR)$(m4datadir)" && rm -f $$files tags: TAGS TAGS: ctags: CTAGS CTAGS: distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(DATA) installdirs: for dir in "$(DESTDIR)$(m4datadir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic clean-libtool mostlyclean-am distclean: distclean-am -rm -f Makefile distclean-am: clean-am distclean-generic dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dist_m4dataDATA install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-generic mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-dist_m4dataDATA .MAKE: install-am install-strip .PHONY: all all-am check check-am clean clean-generic clean-libtool \ distclean distclean-generic distclean-libtool distdir dvi \ dvi-am html html-am info info-am install install-am \ install-data install-data-am install-dist_m4dataDATA \ install-dvi install-dvi-am install-exec install-exec-am \ install-html install-html-am install-info install-info-am \ install-man install-pdf install-pdf-am install-ps \ install-ps-am install-strip installcheck installcheck-am \ installdirs maintainer-clean maintainer-clean-generic \ mostlyclean mostlyclean-generic mostlyclean-libtool pdf pdf-am \ ps ps-am uninstall uninstall-am uninstall-dist_m4dataDATA -include $(top_srcdir)/git.mk # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: libprelude-1.0.0/m4/am_path_ruby.m40000664000076400007640000001164411322603366014036 00000000000000# AM_PATH_RUBY([MINIMUM-VERSION], [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND]) # --------------------------------------------------------------------------- # Adds support for distributing Ruby modules and packages. To # install modules, copy them to $(rubydir), using the ruby_RUBY # automake variable. To install a package with the same name as the # automake package, install to $(pkgrubydir), or use the # pkgruby_RUBY automake variable. # # The variables $(rbexecdir) and $(pkgrbexecdir) are provided as # locations to install ruby extension modules (shared libraries). # Another macro is required to find the appropriate flags to compile # extension modules. # AC_DEFUN([AM_PATH_RUBY], [ dnl Find a Ruby interpreter. m4_define_default([_AM_RUBY_INTERPRETER_LIST], [ruby ruby1.8 ruby1.7 ruby1.6]) m4_if([$1],[],[ dnl No version check is needed. # Find any Ruby interpreter. if test -z "$RUBY"; then AC_PATH_PROGS([RUBY], _AM_RUBY_INTERPRETER_LIST, :) fi am_display_RUBY=ruby ], [ dnl A version check is needed. if test -n "$RUBY"; then # If the user set $RUBY, use it and don't search something else. #AC_MSG_CHECKING([whether $RUBY version >= $1]) #AM_RUBY_CHECK_VERSION([$RUBY], [$1], # [AC_MSG_RESULT(yes)], # [AC_MSG_ERROR(too old)]) am_display_RUBY=$RUBY else # Otherwise, try each interpreter until we find one that satisfies # VERSION. AC_CACHE_CHECK([for a Ruby interpreter with version >= $1], [am_cv_pathless_RUBY],[ for am_cv_pathless_RUBY in _AM_RUBY_INTERPRETER_LIST none; do test "$am_cv_pathless_RUBY" = none && break #AM_RUBY_CHECK_VERSION([$am_cv_pathless_RUBY], [$1], [break]) [], [$1], [break]) done]) # Set $RUBY to the absolute path of $am_cv_pathless_RUBY. if test "$am_cv_pathless_RUBY" = none; then RUBY=: else AC_PATH_PROG([RUBY], [$am_cv_pathless_RUBY]) fi am_display_RUBY=$am_cv_pathless_RUBY fi ]) if test "$RUBY" = :; then dnl Run any user-specified action, or abort. m4_default([$3], [AC_MSG_ERROR([no suitable Ruby interpreter found])]) else dnl Query Ruby for its version number. Getting [:3] seems to be dnl the best way to do this; it's what "site.py" does in the standard dnl library. AC_CACHE_CHECK([for $am_display_RUBY version], [am_cv_ruby_version], [am_cv_ruby_version=`$RUBY -e "print RUBY_VERSION"`]) AC_SUBST([RUBY_VERSION], [$am_cv_ruby_version]) dnl Use the values of $prefix and $exec_prefix for the corresponding dnl values of RUBY_PREFIX and RUBY_EXEC_PREFIX. These are made dnl distinct variables so they can be overridden if need be. However, dnl general consensus is that you shouldn't need this ability. AC_SUBST([RUBY_PREFIX], ['${prefix}']) AC_SUBST([RUBY_EXEC_PREFIX], ['${exec_prefix}']) dnl At times (like when building shared libraries) you may want dnl to know which OS platform Ruby thinks this is. AC_CACHE_CHECK([for $am_display_RUBY platform], [am_cv_ruby_platform], [am_cv_ruby_platform=`$RUBY -e "print RUBY_PLATFORM"`]) AC_SUBST([RUBY_PLATFORM], [$am_cv_ruby_platform]) dnl Set up 4 directories: dnl rubydir -- where to install ruby scripts. AC_CACHE_CHECK([for $am_display_RUBY script directory], [am_cv_ruby_rubydir], [am_cv_ruby_rubydir=`$RUBY -rrbconfig -e "drive = File::PATH_SEPARATOR == ';' ? /\A\w:/ : /\A/; prefix = Regexp.new('\\A' + Regexp.quote(Config::CONFIG[['prefix']])); \\$prefix = Config::CONFIG[['prefix']].sub(drive, ''); \\$archdir = Config::CONFIG[['archdir']].sub(prefix, '\\$(prefix)').sub(drive, ''); print \\$archdir;"`]) AC_SUBST([rubydir], [$am_cv_ruby_rubydir]) dnl pkgrubydir -- $PACKAGE directory under rubydir. AC_SUBST([pkgrubydir], [\${rubydir}/$PACKAGE]) dnl rbexecdir -- directory for installing ruby extension modules dnl (shared libraries) AC_CACHE_CHECK([for $am_display_RUBY extension module directory], [am_cv_ruby_rbexecdir], [am_cv_ruby_rbexecdir=`$RUBY -rrbconfig -e "drive = File::PATH_SEPARATOR == ';' ? /\A\w:/ : /\A/; prefix = Regexp.new('\\A' + Regexp.quote(Config::CONFIG[['prefix']])); \\$prefix = Config::CONFIG[['prefix']].sub(drive, ''); \\$sitearchdir = Config::CONFIG[['sitearchdir']].sub(prefix, '\\$(prefix)').sub(drive, ''); print \\$sitearchdir;" 2>/dev/null || echo "${RUBY_EXEC_PREFIX}/local/lib/site_ruby/${RUBY_VERSION}/${RUBY_PLATFORM}"`]) AC_SUBST([rbexecdir], [$am_cv_ruby_rbexecdir]) RUBY_INCLUDES=`$RUBY -r rbconfig -e 'if Config::CONFIG[["archdir"]] then print " -I" + Config::CONFIG[["archdir"]] end if Config::CONFIG[["rubyhdrdir"]] then print " -I" + Config::CONFIG[["rubyhdrdir"]] end'` AC_SUBST([RUBY_INCLUDES]) dnl pkgrbexecdir -- $(rbexecdir)/$(PACKAGE) AC_SUBST([pkgrbexecdir], [\${rbexecdir}/$PACKAGE]) dnl Run any user-specified action. $2 fi ]) libprelude-1.0.0/m4/libgnutls-extra.m40000664000076400007640000001611311202225026014472 00000000000000dnl Autoconf macros for libgnutls-extra dnl $id$ # Modified for LIBGNUTLS_EXTRA -- nmav # Configure paths for LIBGCRYPT # Shamelessly stolen from the one of XDELTA by Owen Taylor # Werner Koch 99-12-09 dnl AM_PATH_LIBGNUTLS_EXTRA([MINIMUM-VERSION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND ]]]) dnl Test for libgnutls-extra, and define LIBGNUTLS_EXTRA_CFLAGS and LIBGNUTLS_EXTRA_LIBS dnl AC_DEFUN([AM_PATH_LIBGNUTLS_EXTRA], [dnl dnl Get the cflags and libraries from the libgnutls-extra-config script dnl AC_ARG_WITH(libgnutls-extra-prefix, AC_HELP_STRING(--with-libgnutls-extra-prefix=PFX, [Prefix where libgnutls-extra is installed (optional)]), libgnutls_extra_config_prefix="$withval", libgnutls_extra_config_prefix="") if test x$libgnutls_extra_config_prefix != x ; then if test x${LIBGNUTLS_EXTRA_CONFIG+set} != xset ; then LIBGNUTLS_EXTRA_CONFIG=$libgnutls_extra_config_prefix/bin/libgnutls-extra-config fi fi AC_PATH_PROG(LIBGNUTLS_EXTRA_CONFIG, libgnutls-extra-config, no) min_libgnutls_version=ifelse([$1], ,0.1.0,$1) AC_MSG_CHECKING(for libgnutls - version >= $min_libgnutls_version) no_libgnutls="" if test "$LIBGNUTLS_EXTRA_CONFIG" = "no" ; then no_libgnutls=yes else LIBGNUTLS_EXTRA_CFLAGS=`$LIBGNUTLS_EXTRA_CONFIG $libgnutls_extra_config_args --cflags` LIBGNUTLS_EXTRA_LIBS=`$LIBGNUTLS_EXTRA_CONFIG $libgnutls_extra_config_args --libs` libgnutls_extra_config_version=`$LIBGNUTLS_EXTRA_CONFIG $libgnutls_extra_config_args --version` ac_save_CFLAGS="$CFLAGS" ac_save_LIBS="$LIBS" CFLAGS="$CFLAGS $LIBGNUTLS_EXTRA_CFLAGS" LIBS="$LIBS $LIBGNUTLS_EXTRA_LIBS" dnl dnl Now check if the installed libgnutls is sufficiently new. Also sanity dnl checks the results of libgnutls-extra-config to some extent dnl rm -f conf.libgnutlstest AC_TRY_RUN([ #include #include #include #include int main () { system ("touch conf.libgnutlstest"); if( strcmp( gnutls_extra_check_version(NULL), "$libgnutls_extra_config_version" ) ) { printf("\n*** 'libgnutls-extra-config --version' returned %s, but LIBGNUTLS_EXTRA (%s)\n", "$libgnutls_extra_config_version", gnutls_extra_check_version(NULL) ); printf("*** was found! If libgnutls-extra-config was correct, then it is best\n"); printf("*** to remove the old version of LIBGNUTLS_EXTRA. You may also be able to fix the error\n"); printf("*** by modifying your LD_LIBRARY_PATH enviroment variable, or by editing\n"); printf("*** /etc/ld.so.conf. Make sure you have run ldconfig if that is\n"); printf("*** required on your system.\n"); printf("*** If libgnutls-extra-config was wrong, set the environment variable LIBGNUTLS_EXTRA_CONFIG\n"); printf("*** to point to the correct copy of libgnutls-extra-config, and remove the file config.cache\n"); printf("*** before re-running configure\n"); } else if ( strcmp(gnutls_extra_check_version(NULL), LIBGNUTLS_EXTRA_VERSION ) ) { printf("\n*** LIBGNUTLS_EXTRA header file (version %s) does not match\n", LIBGNUTLS_EXTRA_VERSION); printf("*** library (version %s). This is may be due to a different version of gnutls\n", gnutls_extra_check_version(NULL) ); printf("*** and gnutls-extra.\n"); } else { if ( gnutls_extra_check_version( "$min_libgnutls_version" ) ) { return 0; } else { printf("no\n*** An old version of LIBGNUTLS_EXTRA (%s) was found.\n", gnutls_extra_check_version(NULL) ); printf("*** You need a version of LIBGNUTLS_EXTRA newer than %s. The latest version of\n", "$min_libgnutls_version" ); printf("*** LIBGNUTLS_EXTRA is always available from ftp://gnutls.hellug.gr/pub/gnutls.\n"); printf("*** \n"); printf("*** If you have already installed a sufficiently new version, this error\n"); printf("*** probably means that the wrong copy of the libgnutls-extra-config shell script is\n"); printf("*** being found. The easiest way to fix this is to remove the old version\n"); printf("*** of LIBGNUTLS_EXTRA, but you can also set the LIBGNUTLS_EXTRA_CONFIG environment to point to the\n"); printf("*** correct copy of libgnutls-extra-config. (In this case, you will have to\n"); printf("*** modify your LD_LIBRARY_PATH enviroment variable, or edit /etc/ld.so.conf\n"); printf("*** so that the correct libraries are found at run-time))\n"); } } return 1; } ],, no_libgnutls=yes,[echo $ac_n "cross compiling; assumed OK... $ac_c"]) CFLAGS="$ac_save_CFLAGS" LIBS="$ac_save_LIBS" fi if test "x$no_libgnutls" = x ; then AC_MSG_RESULT(yes) ifelse([$2], , :, [$2]) else if test -f conf.libgnutlstest ; then : else AC_MSG_RESULT(no) fi if test "$LIBGNUTLS_EXTRA_CONFIG" = "no" ; then echo "*** The libgnutls-extra-config script installed by LIBGNUTLS_EXTRA could not be found" echo "*** If LIBGNUTLS_EXTRA was installed in PREFIX, make sure PREFIX/bin is in" echo "*** your path, or set the LIBGNUTLS_EXTRA_CONFIG environment variable to the" echo "*** full path to libgnutls-extra-config." else if test -f conf.libgnutlstest ; then : else echo "*** Could not run libgnutls test program, checking why..." CFLAGS="$CFLAGS $LIBGNUTLS_EXTRA_CFLAGS" LIBS="$LIBS $LIBGNUTLS_EXTRA_LIBS" AC_TRY_LINK([ #include #include #include #include ], [ return !!gnutls_extra_check_version(NULL); ], [ echo "*** The test program compiled, but did not run. This usually means" echo "*** that the run-time linker is not finding LIBGNUTLS_EXTRA or finding the wrong" echo "*** version of LIBGNUTLS_EXTRA. If it is not finding LIBGNUTLS_EXTRA, you'll need to set your" echo "*** LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf to point" echo "*** to the installed location Also, make sure you have run ldconfig if that" echo "*** is required on your system" echo "***" echo "*** If you have an old version installed, it is best to remove it, although" echo "*** you may also be able to get things to work by modifying LD_LIBRARY_PATH" echo "***" ], [ echo "*** The test program failed to compile or link. See the file config.log for the" echo "*** exact error that occured. This usually means LIBGNUTLS_EXTRA was incorrectly installed" echo "*** or that you have moved LIBGNUTLS_EXTRA since it was installed. In the latter case, you" echo "*** may want to edit the libgnutls-extra-config script: $LIBGNUTLS_EXTRA_CONFIG" ]) CFLAGS="$ac_save_CFLAGS" LIBS="$ac_save_LIBS" fi fi LIBGNUTLS_EXTRA_CFLAGS="" LIBGNUTLS_EXTRA_LIBS="" ifelse([$3], , :, [$3]) fi rm -f conf.libgnutlstest AC_SUBST(LIBGNUTLS_EXTRA_CFLAGS) AC_SUBST(LIBGNUTLS_EXTRA_LIBS) ]) dnl *-*wedit:notab*-* Please keep this as the last line. libprelude-1.0.0/m4/ac_compile_check_sizeof.m40000664000076400007640000000172611202225026016161 00000000000000dnl Available from the GNU Autoconf Macro Archive at: dnl http://www.gnu.org/software/ac-archive/htmldoc/ac_compile_check_sizeof.html dnl AC_DEFUN([AC_COMPILE_CHECK_SIZEOF], [changequote(<<, >>)dnl dnl The name to #define. define(<>, translit(sizeof_$1, [a-z *], [A-Z_P]))dnl dnl The cache variable name. define(<>, translit(ac_cv_sizeof_$1, [ *], [_p]))dnl changequote([, ])dnl AC_MSG_CHECKING(size of $1) AC_CACHE_VAL(AC_CV_NAME, [for ac_size in 4 8 1 2 16 $2 ; do # List sizes in rough order of prevalence. AC_TRY_COMPILE([#include "confdefs.h" #include $2 ], [switch (0) case 0: case (sizeof ($1) == $ac_size):;], AC_CV_NAME=$ac_size) if test x$AC_CV_NAME != x ; then break; fi done ]) if test x$AC_CV_NAME = x ; then AC_MSG_ERROR([cannot determine a size for $1]) fi AC_MSG_RESULT($AC_CV_NAME) AC_DEFINE_UNQUOTED(AC_TYPE_NAME, $AC_CV_NAME, [The number of bytes in type $1]) undefine([AC_TYPE_NAME])dnl undefine([AC_CV_NAME])dnl ]) libprelude-1.0.0/m4/as-ac-expand.m40000664000076400007640000000210511202225026013603 00000000000000dnl as-ac-expand.m4 0.2.0 dnl autostars m4 macro for expanding directories using configure's prefix dnl thomas@apestaart.org dnl AS_AC_EXPAND(VAR, CONFIGURE_VAR) dnl example dnl AS_AC_EXPAND(SYSCONFDIR, $sysconfdir) dnl will set SYSCONFDIR to /usr/local/etc if prefix=/usr/local AC_DEFUN([AS_AC_EXPAND], [ EXP_VAR=[$1] FROM_VAR=[$2] dnl first expand prefix and exec_prefix if necessary prefix_save=$prefix exec_prefix_save=$exec_prefix dnl if no prefix given, then use /usr/local, the default prefix if test "x$prefix" = "xNONE"; then prefix="$ac_default_prefix" fi dnl if no exec_prefix given, then use prefix if test "x$exec_prefix" = "xNONE"; then exec_prefix=$prefix fi full_var="$FROM_VAR" dnl loop until it doesn't change anymore while true; do new_full_var="`eval echo $full_var`" if test "x$new_full_var" = "x$full_var"; then break; fi full_var=$new_full_var done dnl clean up full_var=$new_full_var AC_SUBST([$1], "$full_var") dnl restore prefix and exec_prefix prefix=$prefix_save exec_prefix=$exec_prefix_save ]) libprelude-1.0.0/m4/ltdl.m40000644000076400007640000006373111347714376012340 00000000000000# ltdl.m4 - Configure ltdl for the target system. -*-Autoconf-*- # # Copyright (C) 1999-2006, 2007, 2008 Free Software Foundation, Inc. # Written by Thomas Tanner, 1999 # # 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. # serial 17 LTDL_INIT # LT_CONFIG_LTDL_DIR(DIRECTORY, [LTDL-MODE]) # ------------------------------------------ # DIRECTORY contains the libltdl sources. It is okay to call this # function multiple times, as long as the same DIRECTORY is always given. AC_DEFUN([LT_CONFIG_LTDL_DIR], [AC_BEFORE([$0], [LTDL_INIT]) _$0($*) ])# LT_CONFIG_LTDL_DIR # We break this out into a separate macro, so that we can call it safely # internally without being caught accidentally by the sed scan in libtoolize. m4_defun([_LT_CONFIG_LTDL_DIR], [dnl remove trailing slashes m4_pushdef([_ARG_DIR], m4_bpatsubst([$1], [/*$])) m4_case(_LTDL_DIR, [], [dnl only set lt_ltdl_dir if _ARG_DIR is not simply `.' m4_if(_ARG_DIR, [.], [], [m4_define([_LTDL_DIR], _ARG_DIR) _LT_SHELL_INIT([lt_ltdl_dir=']_ARG_DIR['])])], [m4_if(_ARG_DIR, _LTDL_DIR, [], [m4_fatal([multiple libltdl directories: `]_LTDL_DIR[', `]_ARG_DIR['])])]) m4_popdef([_ARG_DIR]) ])# _LT_CONFIG_LTDL_DIR # Initialise: m4_define([_LTDL_DIR], []) # _LT_BUILD_PREFIX # ---------------- # If Autoconf is new enough, expand to `${top_build_prefix}', otherwise # to `${top_builddir}/'. m4_define([_LT_BUILD_PREFIX], [m4_ifdef([AC_AUTOCONF_VERSION], [m4_if(m4_version_compare(m4_defn([AC_AUTOCONF_VERSION]), [2.62]), [-1], [m4_ifdef([_AC_HAVE_TOP_BUILD_PREFIX], [${top_build_prefix}], [${top_builddir}/])], [${top_build_prefix}])], [${top_builddir}/])[]dnl ]) # LTDL_CONVENIENCE # ---------------- # 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 # AC_CONFIG_SUBDIRS is not called here. LIBLTDL will be prefixed with # '${top_build_prefix}' if available, otherwise 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_build_prefix, top_builddir, and top_srcdir appropriately # in your Makefiles. AC_DEFUN([LTDL_CONVENIENCE], [AC_BEFORE([$0], [LTDL_INIT])dnl dnl Although the argument is deprecated and no longer documented, dnl LTDL_CONVENIENCE used to take a DIRECTORY orgument, if we have one dnl here make sure it is the same as any other declaration of libltdl's dnl location! This also ensures lt_ltdl_dir is set when configure.ac is dnl not yet using an explicit LT_CONFIG_LTDL_DIR. m4_ifval([$1], [_LT_CONFIG_LTDL_DIR([$1])])dnl _$0() ])# LTDL_CONVENIENCE # AC_LIBLTDL_CONVENIENCE accepted a directory argument in older libtools, # now we have LT_CONFIG_LTDL_DIR: AU_DEFUN([AC_LIBLTDL_CONVENIENCE], [_LT_CONFIG_LTDL_DIR([m4_default([$1], [libltdl])]) _LTDL_CONVENIENCE]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_LIBLTDL_CONVENIENCE], []) # _LTDL_CONVENIENCE # ----------------- # Code shared by LTDL_CONVENIENCE and LTDL_INIT([convenience]). m4_defun([_LTDL_CONVENIENCE], [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='_LT_BUILD_PREFIX'"${lt_ltdl_dir+$lt_ltdl_dir/}libltdlc.la" LTDLDEPS=$LIBLTDL LTDLINCL='-I${top_srcdir}'"${lt_ltdl_dir+/$lt_ltdl_dir}" AC_SUBST([LIBLTDL]) AC_SUBST([LTDLDEPS]) AC_SUBST([LTDLINCL]) # For backwards non-gettext consistent compatibility... INCLTDL="$LTDLINCL" AC_SUBST([INCLTDL]) ])# _LTDL_CONVENIENCE # LTDL_INSTALLABLE # ---------------- # 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 # AC_CONFIG_SUBDIRS is not called from here. If an installed libltdl # is not found, LIBLTDL will be prefixed with '${top_build_prefix}' if # available, otherwise 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_build_prefix, # top_builddir, and top_srcdir appropriately in your Makefiles. # In the future, this macro may have to be called after LT_INIT. AC_DEFUN([LTDL_INSTALLABLE], [AC_BEFORE([$0], [LTDL_INIT])dnl dnl Although the argument is deprecated and no longer documented, dnl LTDL_INSTALLABLE used to take a DIRECTORY orgument, if we have one dnl here make sure it is the same as any other declaration of libltdl's dnl location! This also ensures lt_ltdl_dir is set when configure.ac is dnl not yet using an explicit LT_CONFIG_LTDL_DIR. m4_ifval([$1], [_LT_CONFIG_LTDL_DIR([$1])])dnl _$0() ])# LTDL_INSTALLABLE # AC_LIBLTDL_INSTALLABLE accepted a directory argument in older libtools, # now we have LT_CONFIG_LTDL_DIR: AU_DEFUN([AC_LIBLTDL_INSTALLABLE], [_LT_CONFIG_LTDL_DIR([m4_default([$1], [libltdl])]) _LTDL_INSTALLABLE]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_LIBLTDL_INSTALLABLE], []) # _LTDL_INSTALLABLE # ----------------- # Code shared by LTDL_INSTALLABLE and LTDL_INIT([installable]). m4_defun([_LTDL_INSTALLABLE], [if test -f $prefix/lib/libltdl.la; then lt_save_LDFLAGS="$LDFLAGS" LDFLAGS="-L$prefix/lib $LDFLAGS" AC_CHECK_LIB([ltdl], [lt_dlinit], [lt_lib_ltdl=yes]) LDFLAGS="$lt_save_LDFLAGS" if test x"${lt_lib_ltdl-no}" = xyes; then if test x"$enable_ltdl_install" != xyes; then # Don't overwrite $prefix/lib/libltdl.la without --enable-ltdl-install AC_MSG_WARN([not overwriting libltdl at $prefix, force with `--enable-ltdl-install']) enable_ltdl_install=no fi elif test x"$enable_ltdl_install" = xno; then AC_MSG_WARN([libltdl not installed, but installation disabled]) fi fi # If configure.ac declared an installable ltdl, and the user didn't override # with --disable-ltdl-install, we will install the shipped libltdl. case $enable_ltdl_install in no) ac_configure_args="$ac_configure_args --enable-ltdl-install=no" LIBLTDL="-lltdl" LTDLDEPS= LTDLINCL= ;; *) enable_ltdl_install=yes ac_configure_args="$ac_configure_args --enable-ltdl-install" LIBLTDL='_LT_BUILD_PREFIX'"${lt_ltdl_dir+$lt_ltdl_dir/}libltdl.la" LTDLDEPS=$LIBLTDL LTDLINCL='-I${top_srcdir}'"${lt_ltdl_dir+/$lt_ltdl_dir}" ;; esac AC_SUBST([LIBLTDL]) AC_SUBST([LTDLDEPS]) AC_SUBST([LTDLINCL]) # For backwards non-gettext consistent compatibility... INCLTDL="$LTDLINCL" AC_SUBST([INCLTDL]) ])# LTDL_INSTALLABLE # _LTDL_MODE_DISPATCH # ------------------- m4_define([_LTDL_MODE_DISPATCH], [dnl If _LTDL_DIR is `.', then we are configuring libltdl itself: m4_if(_LTDL_DIR, [], [], dnl if _LTDL_MODE was not set already, the default value is `subproject': [m4_case(m4_default(_LTDL_MODE, [subproject]), [subproject], [AC_CONFIG_SUBDIRS(_LTDL_DIR) _LT_SHELL_INIT([lt_dlopen_dir="$lt_ltdl_dir"])], [nonrecursive], [_LT_SHELL_INIT([lt_dlopen_dir="$lt_ltdl_dir"; lt_libobj_prefix="$lt_ltdl_dir/"])], [recursive], [], [m4_fatal([unknown libltdl mode: ]_LTDL_MODE)])])dnl dnl Be careful not to expand twice: m4_define([$0], []) ])# _LTDL_MODE_DISPATCH # _LT_LIBOBJ(MODULE_NAME) # ----------------------- # Like AC_LIBOBJ, except that MODULE_NAME goes into _LT_LIBOBJS instead # of into LIBOBJS. AC_DEFUN([_LT_LIBOBJ], [ m4_pattern_allow([^_LT_LIBOBJS$]) _LT_LIBOBJS="$_LT_LIBOBJS $1.$ac_objext" ])# _LT_LIBOBJS # LTDL_INIT([OPTIONS]) # -------------------- # Clients of libltdl can use this macro to allow the installer to # choose between a shipped copy of the ltdl sources or a preinstalled # version of the library. If the shipped ltdl sources are not in a # subdirectory named libltdl, the directory name must be given by # LT_CONFIG_LTDL_DIR. AC_DEFUN([LTDL_INIT], [dnl Parse OPTIONS _LT_SET_OPTIONS([$0], [$1]) dnl We need to keep our own list of libobjs separate from our parent project, dnl and the easiest way to do that is redefine the AC_LIBOBJs macro while dnl we look for our own LIBOBJs. m4_pushdef([AC_LIBOBJ], m4_defn([_LT_LIBOBJ])) m4_pushdef([AC_LIBSOURCES]) dnl If not otherwise defined, default to the 1.5.x compatible subproject mode: m4_if(_LTDL_MODE, [], [m4_define([_LTDL_MODE], m4_default([$2], [subproject])) m4_if([-1], [m4_bregexp(_LTDL_MODE, [\(subproject\|\(non\)?recursive\)])], [m4_fatal([unknown libltdl mode: ]_LTDL_MODE)])]) AC_ARG_WITH([included_ltdl], [AS_HELP_STRING([--with-included-ltdl], [use the GNU ltdl sources included here])]) if test "x$with_included_ltdl" != xyes; then # We are not being forced to use the included libltdl sources, so # decide whether there is a useful installed version we can use. AC_CHECK_HEADER([ltdl.h], [AC_CHECK_DECL([lt_dlinterface_register], [AC_CHECK_LIB([ltdl], [lt_dladvise_preload], [with_included_ltdl=no], [with_included_ltdl=yes])], [with_included_ltdl=yes], [AC_INCLUDES_DEFAULT #include ])], [with_included_ltdl=yes], [AC_INCLUDES_DEFAULT] ) fi dnl If neither LT_CONFIG_LTDL_DIR, LTDL_CONVENIENCE nor LTDL_INSTALLABLE dnl was called yet, then for old times' sake, we assume libltdl is in an dnl eponymous directory: AC_PROVIDE_IFELSE([LT_CONFIG_LTDL_DIR], [], [_LT_CONFIG_LTDL_DIR([libltdl])]) AC_ARG_WITH([ltdl_include], [AS_HELP_STRING([--with-ltdl-include=DIR], [use the ltdl headers installed in DIR])]) if test -n "$with_ltdl_include"; then if test -f "$with_ltdl_include/ltdl.h"; then : else AC_MSG_ERROR([invalid ltdl include directory: `$with_ltdl_include']) fi else with_ltdl_include=no fi AC_ARG_WITH([ltdl_lib], [AS_HELP_STRING([--with-ltdl-lib=DIR], [use the libltdl.la installed in DIR])]) if test -n "$with_ltdl_lib"; then if test -f "$with_ltdl_lib/libltdl.la"; then : else AC_MSG_ERROR([invalid ltdl library directory: `$with_ltdl_lib']) fi else with_ltdl_lib=no fi case ,$with_included_ltdl,$with_ltdl_include,$with_ltdl_lib, in ,yes,no,no,) m4_case(m4_default(_LTDL_TYPE, [convenience]), [convenience], [_LTDL_CONVENIENCE], [installable], [_LTDL_INSTALLABLE], [m4_fatal([unknown libltdl build type: ]_LTDL_TYPE)]) ;; ,no,no,no,) # If the included ltdl is not to be used, then use the # preinstalled libltdl we found. AC_DEFINE([HAVE_LTDL], [1], [Define this if a modern libltdl is already installed]) LIBLTDL=-lltdl LTDLDEPS= LTDLINCL= ;; ,no*,no,*) AC_MSG_ERROR([`--with-ltdl-include' and `--with-ltdl-lib' options must be used together]) ;; *) with_included_ltdl=no LIBLTDL="-L$with_ltdl_lib -lltdl" LTDLDEPS= LTDLINCL="-I$with_ltdl_include" ;; esac INCLTDL="$LTDLINCL" # Report our decision... AC_MSG_CHECKING([where to find libltdl headers]) AC_MSG_RESULT([$LTDLINCL]) AC_MSG_CHECKING([where to find libltdl library]) AC_MSG_RESULT([$LIBLTDL]) _LTDL_SETUP dnl restore autoconf definition. m4_popdef([AC_LIBOBJ]) m4_popdef([AC_LIBSOURCES]) AC_CONFIG_COMMANDS_PRE([ _ltdl_libobjs= _ltdl_ltlibobjs= if test -n "$_LT_LIBOBJS"; then # Remove the extension. _lt_sed_drop_objext='s/\.o$//;s/\.obj$//' for i in `for i in $_LT_LIBOBJS; do echo "$i"; done | sed "$_lt_sed_drop_objext" | sort -u`; do _ltdl_libobjs="$_ltdl_libobjs $lt_libobj_prefix$i.$ac_objext" _ltdl_ltlibobjs="$_ltdl_ltlibobjs $lt_libobj_prefix$i.lo" done fi AC_SUBST([ltdl_LIBOBJS], [$_ltdl_libobjs]) AC_SUBST([ltdl_LTLIBOBJS], [$_ltdl_ltlibobjs]) ]) # Only expand once: m4_define([LTDL_INIT]) ])# LTDL_INIT # Old names: AU_DEFUN([AC_LIB_LTDL], [LTDL_INIT($@)]) AU_DEFUN([AC_WITH_LTDL], [LTDL_INIT($@)]) AU_DEFUN([LT_WITH_LTDL], [LTDL_INIT($@)]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_LIB_LTDL], []) dnl AC_DEFUN([AC_WITH_LTDL], []) dnl AC_DEFUN([LT_WITH_LTDL], []) # _LTDL_SETUP # ----------- # Perform all the checks necessary for compilation of the ltdl objects # -- including compiler checks and header checks. This is a public # interface mainly for the benefit of libltdl's own configure.ac, most # other users should call LTDL_INIT instead. AC_DEFUN([_LTDL_SETUP], [AC_REQUIRE([AC_PROG_CC])dnl AC_REQUIRE([LT_SYS_MODULE_EXT])dnl AC_REQUIRE([LT_SYS_MODULE_PATH])dnl AC_REQUIRE([LT_SYS_DLSEARCH_PATH])dnl AC_REQUIRE([LT_LIB_DLLOAD])dnl AC_REQUIRE([LT_SYS_SYMBOL_USCORE])dnl AC_REQUIRE([LT_FUNC_DLSYM_USCORE])dnl AC_REQUIRE([LT_SYS_DLOPEN_DEPLIBS])dnl AC_REQUIRE([gl_FUNC_ARGZ])dnl m4_require([_LT_CHECK_OBJDIR])dnl m4_require([_LT_HEADER_DLFCN])dnl m4_require([_LT_CHECK_DLPREOPEN])dnl m4_require([_LT_DECL_SED])dnl dnl Don't require this, or it will be expanded earlier than the code dnl that sets the variables it relies on: _LT_ENABLE_INSTALL dnl _LTDL_MODE specific code must be called at least once: _LTDL_MODE_DISPATCH # In order that ltdl.c can compile, find out the first AC_CONFIG_HEADERS # the user used. This is so that ltdl.h can pick up the parent projects # config.h file, The first file in AC_CONFIG_HEADERS must contain the # definitions required by ltdl.c. # FIXME: Remove use of undocumented AC_LIST_HEADERS (2.59 compatibility). AC_CONFIG_COMMANDS_PRE([dnl m4_pattern_allow([^LT_CONFIG_H$])dnl m4_ifset([AH_HEADER], [LT_CONFIG_H=AH_HEADER], [m4_ifset([AC_LIST_HEADERS], [LT_CONFIG_H=`echo "AC_LIST_HEADERS" | $SED 's,^[[ ]]*,,;s,[[ :]].*$,,'`], [])])]) AC_SUBST([LT_CONFIG_H]) AC_CHECK_HEADERS([unistd.h dl.h sys/dl.h dld.h mach-o/dyld.h dirent.h], [], [], [AC_INCLUDES_DEFAULT]) AC_CHECK_FUNCS([closedir opendir readdir], [], [AC_LIBOBJ([lt__dirent])]) AC_CHECK_FUNCS([strlcat strlcpy], [], [AC_LIBOBJ([lt__strl])]) AC_DEFINE_UNQUOTED([LT_LIBEXT],["$libext"],[The archive extension]) name=ltdl LTDLOPEN=`eval "\\$ECHO \"$libname_spec\""` AC_SUBST([LTDLOPEN]) ])# _LTDL_SETUP # _LT_ENABLE_INSTALL # ------------------ m4_define([_LT_ENABLE_INSTALL], [AC_ARG_ENABLE([ltdl-install], [AS_HELP_STRING([--enable-ltdl-install], [install libltdl])]) case ,${enable_ltdl_install},${enable_ltdl_convenience} in *yes*) ;; *) enable_ltdl_convenience=yes ;; esac m4_ifdef([AM_CONDITIONAL], [AM_CONDITIONAL(INSTALL_LTDL, test x"${enable_ltdl_install-no}" != xno) AM_CONDITIONAL(CONVENIENCE_LTDL, test x"${enable_ltdl_convenience-no}" != xno)]) ])# _LT_ENABLE_INSTALL # LT_SYS_DLOPEN_DEPLIBS # --------------------- AC_DEFUN([LT_SYS_DLOPEN_DEPLIBS], [AC_REQUIRE([AC_CANONICAL_HOST])dnl AC_CACHE_CHECK([whether deplibs are loaded by dlopen], [lt_cv_sys_dlopen_deplibs], [# PORTME does your system automatically load deplibs for dlopen? # or its logical equivalent (e.g. shl_load for HP-UX < 11) # For now, we just catch OSes we know something about -- in the # future, we'll try test this programmatically. lt_cv_sys_dlopen_deplibs=unknown case $host_os in aix3*|aix4.1.*|aix4.2.*) # Unknown whether this is true for these versions of AIX, but # we want this `case' here to explicitly catch those versions. lt_cv_sys_dlopen_deplibs=unknown ;; aix[[4-9]]*) lt_cv_sys_dlopen_deplibs=yes ;; amigaos*) case $host_cpu in powerpc) lt_cv_sys_dlopen_deplibs=no ;; esac ;; darwin*) # Assuming the user has installed a libdl from somewhere, this is true # If you are looking for one http://www.opendarwin.org/projects/dlcompat lt_cv_sys_dlopen_deplibs=yes ;; freebsd* | dragonfly*) lt_cv_sys_dlopen_deplibs=yes ;; gnu* | linux* | k*bsd*-gnu) # GNU and its variants, using gnu ld.so (Glibc) lt_cv_sys_dlopen_deplibs=yes ;; hpux10*|hpux11*) lt_cv_sys_dlopen_deplibs=yes ;; interix*) lt_cv_sys_dlopen_deplibs=yes ;; irix[[12345]]*|irix6.[[01]]*) # Catch all versions of IRIX before 6.2, and indicate that we don't # know how it worked for any of those versions. lt_cv_sys_dlopen_deplibs=unknown ;; irix*) # The case above catches anything before 6.2, and it's known that # at 6.2 and later dlopen does load deplibs. lt_cv_sys_dlopen_deplibs=yes ;; netbsd*) lt_cv_sys_dlopen_deplibs=yes ;; openbsd*) lt_cv_sys_dlopen_deplibs=yes ;; osf[[1234]]*) # dlopen did load deplibs (at least at 4.x), but until the 5.x series, # it did *not* use an RPATH in a shared library to find objects the # library depends on, so we explicitly say `no'. lt_cv_sys_dlopen_deplibs=no ;; osf5.0|osf5.0a|osf5.1) # dlopen *does* load deplibs and with the right loader patch applied # it even uses RPATH in a shared library to search for shared objects # that the library depends on, but there's no easy way to know if that # patch is installed. Since this is the case, all we can really # say is unknown -- it depends on the patch being installed. If # it is, this changes to `yes'. Without it, it would be `no'. lt_cv_sys_dlopen_deplibs=unknown ;; osf*) # the two cases above should catch all versions of osf <= 5.1. Read # the comments above for what we know about them. # At > 5.1, deplibs are loaded *and* any RPATH in a shared library # is used to find them so we can finally say `yes'. lt_cv_sys_dlopen_deplibs=yes ;; qnx*) lt_cv_sys_dlopen_deplibs=yes ;; solaris*) lt_cv_sys_dlopen_deplibs=yes ;; sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) libltdl_cv_sys_dlopen_deplibs=yes ;; esac ]) if test "$lt_cv_sys_dlopen_deplibs" != yes; then AC_DEFINE([LTDL_DLOPEN_DEPLIBS], [1], [Define if the OS needs help to load dependent libraries for dlopen().]) fi ])# LT_SYS_DLOPEN_DEPLIBS # Old name: AU_ALIAS([AC_LTDL_SYS_DLOPEN_DEPLIBS], [LT_SYS_DLOPEN_DEPLIBS]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_LTDL_SYS_DLOPEN_DEPLIBS], []) # LT_SYS_MODULE_EXT # ----------------- AC_DEFUN([LT_SYS_MODULE_EXT], [m4_require([_LT_SYS_DYNAMIC_LINKER])dnl AC_CACHE_CHECK([which extension is used for runtime loadable modules], [libltdl_cv_shlibext], [ module=yes eval libltdl_cv_shlibext=$shrext_cmds ]) if test -n "$libltdl_cv_shlibext"; then m4_pattern_allow([LT_MODULE_EXT])dnl AC_DEFINE_UNQUOTED([LT_MODULE_EXT], ["$libltdl_cv_shlibext"], [Define to the extension used for runtime loadable modules, say, ".so".]) fi ])# LT_SYS_MODULE_EXT # Old name: AU_ALIAS([AC_LTDL_SHLIBEXT], [LT_SYS_MODULE_EXT]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_LTDL_SHLIBEXT], []) # LT_SYS_MODULE_PATH # ------------------ AC_DEFUN([LT_SYS_MODULE_PATH], [m4_require([_LT_SYS_DYNAMIC_LINKER])dnl AC_CACHE_CHECK([which variable specifies run-time module search path], [lt_cv_module_path_var], [lt_cv_module_path_var="$shlibpath_var"]) if test -n "$lt_cv_module_path_var"; then m4_pattern_allow([LT_MODULE_PATH_VAR])dnl AC_DEFINE_UNQUOTED([LT_MODULE_PATH_VAR], ["$lt_cv_module_path_var"], [Define to the name of the environment variable that determines the run-time module search path.]) fi ])# LT_SYS_MODULE_PATH # Old name: AU_ALIAS([AC_LTDL_SHLIBPATH], [LT_SYS_MODULE_PATH]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_LTDL_SHLIBPATH], []) # LT_SYS_DLSEARCH_PATH # -------------------- AC_DEFUN([LT_SYS_DLSEARCH_PATH], [m4_require([_LT_SYS_DYNAMIC_LINKER])dnl AC_CACHE_CHECK([for the default library search path], [lt_cv_sys_dlsearch_path], [lt_cv_sys_dlsearch_path="$sys_lib_dlsearch_path_spec"]) if test -n "$lt_cv_sys_dlsearch_path"; then sys_dlsearch_path= for dir in $lt_cv_sys_dlsearch_path; do if test -z "$sys_dlsearch_path"; then sys_dlsearch_path="$dir" else sys_dlsearch_path="$sys_dlsearch_path$PATH_SEPARATOR$dir" fi done m4_pattern_allow([LT_DLSEARCH_PATH])dnl AC_DEFINE_UNQUOTED([LT_DLSEARCH_PATH], ["$sys_dlsearch_path"], [Define to the system default library search path.]) fi ])# LT_SYS_DLSEARCH_PATH # Old name: AU_ALIAS([AC_LTDL_SYSSEARCHPATH], [LT_SYS_DLSEARCH_PATH]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_LTDL_SYSSEARCHPATH], []) # _LT_CHECK_DLPREOPEN # ------------------- m4_defun([_LT_CHECK_DLPREOPEN], [m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl AC_CACHE_CHECK([whether libtool supports -dlopen/-dlpreopen], [libltdl_cv_preloaded_symbols], [if test -n "$lt_cv_sys_global_symbol_pipe"; then libltdl_cv_preloaded_symbols=yes else libltdl_cv_preloaded_symbols=no fi ]) if test x"$libltdl_cv_preloaded_symbols" = xyes; then AC_DEFINE([HAVE_PRELOADED_SYMBOLS], [1], [Define if libtool can extract symbol lists from object files.]) fi ])# _LT_CHECK_DLPREOPEN # LT_LIB_DLLOAD # ------------- AC_DEFUN([LT_LIB_DLLOAD], [m4_pattern_allow([^LT_DLLOADERS$]) LT_DLLOADERS= AC_SUBST([LT_DLLOADERS]) AC_LANG_PUSH([C]) LIBADD_DLOPEN= AC_SEARCH_LIBS([dlopen], [dl], [AC_DEFINE([HAVE_LIBDL], [1], [Define if you have the libdl library or equivalent.]) if test "$ac_cv_search_dlopen" != "none required" ; then LIBADD_DLOPEN="-ldl" fi libltdl_cv_lib_dl_dlopen="yes" LT_DLLOADERS="$LT_DLLOADERS ${lt_dlopen_dir+$lt_dlopen_dir/}dlopen.la"], [AC_LINK_IFELSE([AC_LANG_PROGRAM([[#if HAVE_DLFCN_H # include #endif ]], [[dlopen(0, 0);]])], [AC_DEFINE([HAVE_LIBDL], [1], [Define if you have the libdl library or equivalent.]) libltdl_cv_func_dlopen="yes" LT_DLLOADERS="$LT_DLLOADERS ${lt_dlopen_dir+$lt_dlopen_dir/}dlopen.la"], [AC_CHECK_LIB([svld], [dlopen], [AC_DEFINE([HAVE_LIBDL], [1], [Define if you have the libdl library or equivalent.]) LIBADD_DLOPEN="-lsvld" libltdl_cv_func_dlopen="yes" LT_DLLOADERS="$LT_DLLOADERS ${lt_dlopen_dir+$lt_dlopen_dir/}dlopen.la"])])]) if test x"$libltdl_cv_func_dlopen" = xyes || test x"$libltdl_cv_lib_dl_dlopen" = xyes then lt_save_LIBS="$LIBS" LIBS="$LIBS $LIBADD_DLOPEN" AC_CHECK_FUNCS([dlerror]) LIBS="$lt_save_LIBS" fi AC_SUBST([LIBADD_DLOPEN]) LIBADD_SHL_LOAD= AC_CHECK_FUNC([shl_load], [AC_DEFINE([HAVE_SHL_LOAD], [1], [Define if you have the shl_load function.]) LT_DLLOADERS="$LT_DLLOADERS ${lt_dlopen_dir+$lt_dlopen_dir/}shl_load.la"], [AC_CHECK_LIB([dld], [shl_load], [AC_DEFINE([HAVE_SHL_LOAD], [1], [Define if you have the shl_load function.]) LT_DLLOADERS="$LT_DLLOADERS ${lt_dlopen_dir+$lt_dlopen_dir/}shl_load.la" LIBADD_SHL_LOAD="-ldld"])]) AC_SUBST([LIBADD_SHL_LOAD]) case $host_os in darwin[[1567]].*) # We only want this for pre-Mac OS X 10.4. AC_CHECK_FUNC([_dyld_func_lookup], [AC_DEFINE([HAVE_DYLD], [1], [Define if you have the _dyld_func_lookup function.]) LT_DLLOADERS="$LT_DLLOADERS ${lt_dlopen_dir+$lt_dlopen_dir/}dyld.la"]) ;; beos*) LT_DLLOADERS="$LT_DLLOADERS ${lt_dlopen_dir+$lt_dlopen_dir/}load_add_on.la" ;; cygwin* | mingw* | os2* | pw32*) AC_CHECK_DECLS([cygwin_conv_path], [], [], [[#include ]]) LT_DLLOADERS="$LT_DLLOADERS ${lt_dlopen_dir+$lt_dlopen_dir/}loadlibrary.la" ;; esac AC_CHECK_LIB([dld], [dld_link], [AC_DEFINE([HAVE_DLD], [1], [Define if you have the GNU dld library.]) LT_DLLOADERS="$LT_DLLOADERS ${lt_dlopen_dir+$lt_dlopen_dir/}dld_link.la"]) AC_SUBST([LIBADD_DLD_LINK]) m4_pattern_allow([^LT_DLPREOPEN$]) LT_DLPREOPEN= if test -n "$LT_DLLOADERS" then for lt_loader in $LT_DLLOADERS; do LT_DLPREOPEN="$LT_DLPREOPEN-dlpreopen $lt_loader " done AC_DEFINE([HAVE_LIBDLLOADER], [1], [Define if libdlloader will be built on this platform]) fi AC_SUBST([LT_DLPREOPEN]) dnl This isn't used anymore, but set it for backwards compatibility LIBADD_DL="$LIBADD_DLOPEN $LIBADD_SHL_LOAD" AC_SUBST([LIBADD_DL]) AC_LANG_POP ])# LT_LIB_DLLOAD # Old name: AU_ALIAS([AC_LTDL_DLLIB], [LT_LIB_DLLOAD]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_LTDL_DLLIB], []) # LT_SYS_SYMBOL_USCORE # -------------------- # does the compiler prefix global symbols with an underscore? AC_DEFUN([LT_SYS_SYMBOL_USCORE], [m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl AC_CACHE_CHECK([for _ prefix in compiled symbols], [lt_cv_sys_symbol_underscore], [lt_cv_sys_symbol_underscore=no cat > conftest.$ac_ext <<_LT_EOF void nm_test_func(){} int main(){nm_test_func;return 0;} _LT_EOF if AC_TRY_EVAL(ac_compile); then # Now try to grab the symbols. ac_nlist=conftest.nm if AC_TRY_EVAL(NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $ac_nlist) && test -s "$ac_nlist"; then # See whether the symbols have a leading underscore. if grep '^. _nm_test_func' "$ac_nlist" >/dev/null; then lt_cv_sys_symbol_underscore=yes else if grep '^. nm_test_func ' "$ac_nlist" >/dev/null; then : else echo "configure: cannot find nm_test_func in $ac_nlist" >&AS_MESSAGE_LOG_FD fi fi else echo "configure: cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD fi else echo "configure: failed program was:" >&AS_MESSAGE_LOG_FD cat conftest.c >&AS_MESSAGE_LOG_FD fi rm -rf conftest* ]) sys_symbol_underscore=$lt_cv_sys_symbol_underscore AC_SUBST([sys_symbol_underscore]) ])# LT_SYS_SYMBOL_USCORE # Old name: AU_ALIAS([AC_LTDL_SYMBOL_USCORE], [LT_SYS_SYMBOL_USCORE]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_LTDL_SYMBOL_USCORE], []) # LT_FUNC_DLSYM_USCORE # -------------------- AC_DEFUN([LT_FUNC_DLSYM_USCORE], [AC_REQUIRE([LT_SYS_SYMBOL_USCORE])dnl if test x"$lt_cv_sys_symbol_underscore" = xyes; then if test x"$libltdl_cv_func_dlopen" = xyes || test x"$libltdl_cv_lib_dl_dlopen" = xyes ; then AC_CACHE_CHECK([whether we have to add an underscore for dlsym], [libltdl_cv_need_uscore], [libltdl_cv_need_uscore=unknown save_LIBS="$LIBS" LIBS="$LIBS $LIBADD_DLOPEN" _LT_TRY_DLOPEN_SELF( [libltdl_cv_need_uscore=no], [libltdl_cv_need_uscore=yes], [], [libltdl_cv_need_uscore=cross]) LIBS="$save_LIBS" ]) fi fi if test x"$libltdl_cv_need_uscore" = xyes; then AC_DEFINE([NEED_USCORE], [1], [Define if dlsym() requires a leading underscore in symbol names.]) fi ])# LT_FUNC_DLSYM_USCORE # Old name: AU_ALIAS([AC_LTDL_DLSYM_USCORE], [LT_FUNC_DLSYM_USCORE]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_LTDL_DLSYM_USCORE], []) libprelude-1.0.0/AUTHORS0000664000076400007640000000021611202225026011631 00000000000000The Prelude Library is brought to you by PreludeIDS Technologies (http://www.prelude-ids.com), Yoann Vandoorselaere libprelude-1.0.0/client.conf.in0000664000076400007640000000522411202225026013317 00000000000000[prelude] # This is the default configuration for program client of a manager # (sensors and agents) that use libprelude. # # Entry in this configuration file might be overriden by entry directly # provided by the sensors/agents configuration file. # Try to connect on a Manager listening on 127.0.0.1. # # server-addr = x.x.x.x:port || y.y.y.y && z.z.z.z # # This mean the emission should occur on x.x.x.x:port or, if it fail, # on y.y.y.y and z.z.z.z (if one of the two host in the AND fail, # the emission will be considered as failed involving saving the # message locally). server-addr = 127.0.0.1 # The following settings instruct the operating system when to consider # a connection dead in case sent data is left unacknowledged. # # Theses option are operating system specific, and might not work on # certain platform. In case you modify these settings on an unsupported # system, a warning message will be issued when the agent starts. # # Under Linux, the default system wide configuration is: # tcp-keepalive-time = 7200 # tcp-keepalive-probes = 9 # tcp-keepalive-intvl = 75 # # tcp-keepalive-time represents the number of seconds the connection # needs to be idle before TCP begins sending out keep-alive probes. # # tcp-keepalive-probes represent the number of not acknowledged probes # to send before considering the connection dead. # # tcp-keepalive-intvl represents the interval between subsequent # keepalive probes. # # The average time to notice a dead connection can be calculated using: # tcp-keepalive-time + (tcp-keepalive-probes * tcp-keepalive-intvl) # # Here is an example configuration: # tcp-keepalive-time = 60 # tcp-keepalive-probes = 3 # tcp-keepalive-intvl = 10 # # Using the above settings, a dead connection will be detected within # 90 seconds. # # TLS options (only available with GnuTLS 2.2.0 or higher): # # Sets priorities for the ciphers, key exchange methods, macs and # compression methods. # # "NORMAL" option enables all "secure" ciphersuites. The 256-bit # ciphers are included as a fallback only. The ciphers are sorted by # security margin. # # "SECURE128" flag enables all "secure" ciphersuites with ciphers up to # 128 bits, sorted by security margin. # # "SECURE256" flag enables all "secure" ciphersuites including the 256 # bit ciphers, sorted by security margin. # # "EXPORT" all the ciphersuites are enabled, including the low-security # 40 bit ciphers. # # "NONE" nothing is enabled. This disables even protocols and # compression methods. # # Note that much more settings might be enabled or disabled using this # option: please see gnutls_priority_init(3) for more details. # # The default settings is "NORMAL". # tls-options = NORMAL libprelude-1.0.0/configure0000775000076400007640001013277611347714444012533 00000000000000#! /bin/sh # Guess values for system-dependent variables and create Makefiles. # Generated by GNU Autoconf 2.63. # # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, # 2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. # This configure script is free software; the Free Software Foundation # gives unlimited permission to copy, distribute and modify it. ## --------------------- ## ## M4sh Initialization. ## ## --------------------- ## # Be more Bourne compatible DUALCASE=1; export DUALCASE # for MKS sh if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then emulate sh NULLCMD=: # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' setopt NO_GLOB_SUBST else case `(set -o) 2>/dev/null` in *posix*) set -o posix ;; esac fi # PATH needs CR # Avoid depending upon Character Ranges. as_cr_letters='abcdefghijklmnopqrstuvwxyz' as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' as_cr_Letters=$as_cr_letters$as_cr_LETTERS as_cr_digits='0123456789' as_cr_alnum=$as_cr_Letters$as_cr_digits as_nl=' ' export as_nl # Printing a long string crashes Solaris 7 /usr/bin/printf. as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo if (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then as_echo='printf %s\n' as_echo_n='printf %s' else if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' as_echo_n='/usr/ucb/echo -n' else as_echo_body='eval expr "X$1" : "X\\(.*\\)"' as_echo_n_body='eval arg=$1; case $arg in *"$as_nl"*) expr "X$arg" : "X\\(.*\\)$as_nl"; arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; esac; expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" ' export as_echo_n_body as_echo_n='sh -c $as_echo_n_body as_echo' fi export as_echo_body as_echo='sh -c $as_echo_body as_echo' fi # The user is always right. if test "${PATH_SEPARATOR+set}" != set; then PATH_SEPARATOR=: (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || PATH_SEPARATOR=';' } fi # Support unset when possible. if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then as_unset=unset else as_unset=false fi # IFS # We need space, tab and new line, in precisely that order. Quoting is # there to prevent editors from complaining about space-tab. # (If _AS_PATH_WALK were called with IFS unset, it would disable word # splitting by setting IFS to empty value.) IFS=" "" $as_nl" # Find who we are. Look in the path if we contain no directory separator. case $0 in *[\\/]* ) as_myself=$0 ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break done IFS=$as_save_IFS ;; esac # We did not find ourselves, most probably we were run as `sh COMMAND' # in which case we are not to be found in the path. if test "x$as_myself" = x; then as_myself=$0 fi if test ! -f "$as_myself"; then $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 { (exit 1); exit 1; } fi # Work around bugs in pre-3.0 UWIN ksh. for as_var in ENV MAIL MAILPATH do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var done PS1='$ ' PS2='> ' PS4='+ ' # NLS nuisances. LC_ALL=C export LC_ALL LANGUAGE=C export LANGUAGE # Required to use basename. if expr a : '\(a\)' >/dev/null 2>&1 && test "X`expr 00001 : '.*\(...\)'`" = X001; then as_expr=expr else as_expr=false fi if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then as_basename=basename else as_basename=false fi # Name of the executable. as_me=`$as_basename -- "$0" || $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ X"$0" : 'X\(//\)$' \| \ X"$0" : 'X\(/\)' \| . 2>/dev/null || $as_echo X/"$0" | sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/ q } /^X\/\(\/\/\)$/{ s//\1/ q } /^X\/\(\/\).*/{ s//\1/ q } s/.*/./; q'` # CDPATH. $as_unset CDPATH if test "x$CONFIG_SHELL" = x; then if (eval ":") 2>/dev/null; then as_have_required=yes else as_have_required=no fi if test $as_have_required = yes && (eval ": (as_func_return () { (exit \$1) } as_func_success () { as_func_return 0 } as_func_failure () { as_func_return 1 } as_func_ret_success () { return 0 } as_func_ret_failure () { return 1 } exitcode=0 if as_func_success; then : else exitcode=1 echo as_func_success failed. fi if as_func_failure; then exitcode=1 echo as_func_failure succeeded. fi if as_func_ret_success; then : else exitcode=1 echo as_func_ret_success failed. fi if as_func_ret_failure; then exitcode=1 echo as_func_ret_failure succeeded. fi if ( set x; as_func_ret_success y && test x = \"\$1\" ); then : else exitcode=1 echo positional parameters were not saved. fi test \$exitcode = 0) || { (exit 1); exit 1; } ( as_lineno_1=\$LINENO as_lineno_2=\$LINENO test \"x\$as_lineno_1\" != \"x\$as_lineno_2\" && test \"x\`expr \$as_lineno_1 + 1\`\" = \"x\$as_lineno_2\") || { (exit 1); exit 1; } ") 2> /dev/null; then : else as_candidate_shells= as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. case $as_dir in /*) for as_base in sh bash ksh sh5; do as_candidate_shells="$as_candidate_shells $as_dir/$as_base" done;; esac done IFS=$as_save_IFS for as_shell in $as_candidate_shells $SHELL; do # Try only shells that exist, to save several forks. if { test -f "$as_shell" || test -f "$as_shell.exe"; } && { ("$as_shell") 2> /dev/null <<\_ASEOF if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then emulate sh NULLCMD=: # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' setopt NO_GLOB_SUBST else case `(set -o) 2>/dev/null` in *posix*) set -o posix ;; esac fi : _ASEOF }; then CONFIG_SHELL=$as_shell as_have_required=yes if { "$as_shell" 2> /dev/null <<\_ASEOF if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then emulate sh NULLCMD=: # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' setopt NO_GLOB_SUBST else case `(set -o) 2>/dev/null` in *posix*) set -o posix ;; esac fi : (as_func_return () { (exit $1) } as_func_success () { as_func_return 0 } as_func_failure () { as_func_return 1 } as_func_ret_success () { return 0 } as_func_ret_failure () { return 1 } exitcode=0 if as_func_success; then : else exitcode=1 echo as_func_success failed. fi if as_func_failure; then exitcode=1 echo as_func_failure succeeded. fi if as_func_ret_success; then : else exitcode=1 echo as_func_ret_success failed. fi if as_func_ret_failure; then exitcode=1 echo as_func_ret_failure succeeded. fi if ( set x; as_func_ret_success y && test x = "$1" ); then : else exitcode=1 echo positional parameters were not saved. fi test $exitcode = 0) || { (exit 1); exit 1; } ( as_lineno_1=$LINENO as_lineno_2=$LINENO test "x$as_lineno_1" != "x$as_lineno_2" && test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2") || { (exit 1); exit 1; } _ASEOF }; then break fi fi done if test "x$CONFIG_SHELL" != x; then for as_var in BASH_ENV ENV do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var done export CONFIG_SHELL exec "$CONFIG_SHELL" "$as_myself" ${1+"$@"} fi if test $as_have_required = no; then echo This script requires a shell more modern than all the echo shells that I found on your system. Please install a echo modern shell, or manually run the script under such a echo shell if you do have one. { (exit 1); exit 1; } fi fi fi (eval "as_func_return () { (exit \$1) } as_func_success () { as_func_return 0 } as_func_failure () { as_func_return 1 } as_func_ret_success () { return 0 } as_func_ret_failure () { return 1 } exitcode=0 if as_func_success; then : else exitcode=1 echo as_func_success failed. fi if as_func_failure; then exitcode=1 echo as_func_failure succeeded. fi if as_func_ret_success; then : else exitcode=1 echo as_func_ret_success failed. fi if as_func_ret_failure; then exitcode=1 echo as_func_ret_failure succeeded. fi if ( set x; as_func_ret_success y && test x = \"\$1\" ); then : else exitcode=1 echo positional parameters were not saved. fi test \$exitcode = 0") || { echo No shell found that supports shell functions. echo Please tell bug-autoconf@gnu.org about your system, echo including any error possibly output before this message. echo This can help us improve future autoconf versions. echo Configuration will now proceed without shell functions. } as_lineno_1=$LINENO as_lineno_2=$LINENO test "x$as_lineno_1" != "x$as_lineno_2" && test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || { # Create $as_me.lineno as a copy of $as_myself, but with $LINENO # uniformly replaced by the line number. The first 'sed' inserts a # line-number line after each line using $LINENO; the second 'sed' # does the real work. The second script uses 'N' to pair each # line-number line with the line containing $LINENO, and appends # trailing '-' during substitution so that $LINENO is not a special # case at line end. # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the # scripts with optimization help from Paolo Bonzini. Blame Lee # E. McMahon (1931-1989) for sed's syntax. :-) sed -n ' p /[$]LINENO/= ' <$as_myself | sed ' s/[$]LINENO.*/&-/ t lineno b :lineno N :loop s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/ t loop s/-\n.*// ' >$as_me.lineno && chmod +x "$as_me.lineno" || { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2 { (exit 1); exit 1; }; } # Don't try to exec as it changes $[0], causing all sort of problems # (the dirname of $[0] is not the place where we might find the # original and so on. Autoconf is especially sensitive to this). . "./$as_me.lineno" # Exit status is that of the last command. exit } if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then as_dirname=dirname else as_dirname=false fi ECHO_C= ECHO_N= ECHO_T= case `echo -n x` in -n*) case `echo 'x\c'` in *c*) ECHO_T=' ';; # ECHO_T is single tab character. *) ECHO_C='\c';; esac;; *) ECHO_N='-n';; esac if expr a : '\(a\)' >/dev/null 2>&1 && test "X`expr 00001 : '.*\(...\)'`" = X001; then as_expr=expr else as_expr=false fi rm -f conf$$ conf$$.exe conf$$.file if test -d conf$$.dir; then rm -f conf$$.dir/conf$$.file else rm -f conf$$.dir mkdir conf$$.dir 2>/dev/null fi if (echo >conf$$.file) 2>/dev/null; then if ln -s conf$$.file conf$$ 2>/dev/null; then as_ln_s='ln -s' # ... but there are two gotchas: # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. # In both cases, we have to default to `cp -p'. ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || as_ln_s='cp -p' elif ln conf$$.file conf$$ 2>/dev/null; then as_ln_s=ln else as_ln_s='cp -p' fi else as_ln_s='cp -p' fi rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file rmdir conf$$.dir 2>/dev/null if mkdir -p . 2>/dev/null; then as_mkdir_p=: else test -d ./-p && rmdir ./-p as_mkdir_p=false fi if test -x / >/dev/null 2>&1; then as_test_x='test -x' else if ls -dL / >/dev/null 2>&1; then as_ls_L_option=L else as_ls_L_option= fi as_test_x=' eval sh -c '\'' if test -d "$1"; then test -d "$1/."; else case $1 in -*)set "./$1";; esac; case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in ???[sx]*):;;*)false;;esac;fi '\'' sh ' fi as_executable_p=$as_test_x # Sed expression to map a string onto a valid CPP name. as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" # Sed expression to map a string onto a valid variable name. as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" lt_ltdl_dir='libltdl' # Check that we are running under the correct shell. SHELL=${CONFIG_SHELL-/bin/sh} case X$lt_ECHO in X*--fallback-echo) # Remove one level of quotation (which was required for Make). ECHO=`echo "$lt_ECHO" | sed 's,\\\\\$\\$0,'$0','` ;; esac ECHO=${lt_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 <<_LT_EOF $* _LT_EOF exit 0 fi # The HP-UX ksh and POSIX shell print the target directory to stdout # if CDPATH is set. (unset CDPATH) >/dev/null 2>&1 && unset CDPATH if test -z "$lt_ECHO"; then if test "X${echo_test_string+set}" != Xset; then # find a string as large as possible, as long as the shell can cope with it for cmd in 'sed 50q "$0"' 'sed 20q "$0"' 'sed 10q "$0"' 'sed 2q "$0"' 'echo test'; do # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ... if { echo_test_string=`eval $cmd`; } 2>/dev/null && { 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. lt_ECHO=$ECHO if test "X$lt_ECHO" = "X$CONFIG_SHELL $0 --fallback-echo"; then lt_ECHO="$CONFIG_SHELL \\\$\$0 --fallback-echo" fi exec 7<&0 &1 # Name of the host. # hostname on some systems (SVR3.2, Linux) returns a bogus exit status, # so uname gets run too. ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q` # # Initializations. # ac_default_prefix=/usr/local ac_clean_files= ac_config_libobj_dir=. LIBOBJS= cross_compiling=no subdirs= MFLAGS= MAKEFLAGS= SHELL=${CONFIG_SHELL-/bin/sh} # Identity of this package. PACKAGE_NAME= PACKAGE_TARNAME= PACKAGE_VERSION= PACKAGE_STRING= PACKAGE_BUGREPORT= ac_unique_file="src" # Factoring default headers for most tests. ac_includes_default="\ #include #ifdef HAVE_SYS_TYPES_H # include #endif #ifdef HAVE_SYS_STAT_H # include #endif #ifdef STDC_HEADERS # include # include #else # ifdef HAVE_STDLIB_H # include # endif #endif #ifdef HAVE_STRING_H # if !defined STDC_HEADERS && defined HAVE_MEMORY_H # include # endif # include #endif #ifdef HAVE_STRINGS_H # include #endif #ifdef HAVE_INTTYPES_H # include #endif #ifdef HAVE_STDINT_H # include #endif #ifdef HAVE_UNISTD_H # include #endif" gl_use_threads_default= gl_header_list= gl_func_list= ac_subst_vars='gltests_LTLIBOBJS gltests_LIBOBJS gl_LTLIBOBJS gl_LIBOBJS ltdl_LTLIBOBJS ltdl_LIBOBJS am__EXEEXT_FALSE am__EXEEXT_TRUE LTLIBOBJS LIBOBJS BINDIR LIBDIR LOCALSTATEDIR SYSCONFDIR PRELUDE_CONFIG_DIR PRELUDE_SPOOL_DIR LIBPRELUDE_CFLAGS LIBPRELUDE_LIBS LIBPRELUDECPP_SONAME LIBPRELUDE_SONAME BINDINGS_CC PCFLAGS __PRELUDE_64BIT_FORMAT_PREFIX __PRELUDE_STDINT_HAVE_UINT64 __PRELUDE_STDINT_HAVE_UINT32 __PRELUDE_STDINT_HAVE_UINT16 __PRELUDE_STDINT_HAVE_UINT8 __PRELUDE_HAVE_64BIT_LONG __PRELUDE_HAVE_INTTYPES_H __PRELUDE_HAVE_STDINT_H GTK_DOC_USE_LIBTOOL_FALSE GTK_DOC_USE_LIBTOOL_TRUE ENABLE_GTK_DOC_FALSE ENABLE_GTK_DOC_TRUE GTKDOC_CHECK HTML_DIR LIBTESTS_LIBDEPS YIELD_LIB NEXT_AS_FIRST_DIRECTIVE_FCNTL_H NEXT_FCNTL_H REPLACE_OPENAT REPLACE_OPEN REPLACE_FCNTL HAVE_OPENAT HAVE_FCNTL GNULIB_OPENAT GNULIB_OPEN GNULIB_FCNTL LOCALE_TR_UTF8 REPLACE_ISWCNTRL WCTYPE_H HAVE_WCTYPE_H NEXT_AS_FIRST_DIRECTIVE_WCTYPE_H NEXT_WCTYPE_H HAVE_ISWCNTRL HAVE_WINT_T HAVE_WCHAR_H NEXT_AS_FIRST_DIRECTIVE_WCHAR_H NEXT_WCHAR_H HAVE_UNISTD_H NEXT_AS_FIRST_DIRECTIVE_UNISTD_H NEXT_UNISTD_H SYS_TIME_H_DEFINES_STRUCT_TIMESPEC TIME_H_DEFINES_STRUCT_TIMESPEC NEXT_AS_FIRST_DIRECTIVE_TIME_H NEXT_TIME_H HAVE_SYS_UTSNAME_H NEXT_AS_FIRST_DIRECTIVE_SYS_UTSNAME_H NEXT_SYS_UTSNAME_H HAVE_STRUCT_UTSNAME HAVE_UNAME GNULIB_UNAME NEXT_AS_FIRST_DIRECTIVE_SYS_STAT_H NEXT_SYS_STAT_H NEXT_AS_FIRST_DIRECTIVE_SYS_IOCTL_H NEXT_SYS_IOCTL_H HAVE_SYS_IOCTL_H NEXT_AS_FIRST_DIRECTIVE_STRINGS_H NEXT_STRINGS_H NEXT_AS_FIRST_DIRECTIVE_STRING_H NEXT_STRING_H HAVE_DECL_STRNCASECMP HAVE_STRCASECMP HAVE_RANDOM_H NEXT_AS_FIRST_DIRECTIVE_STDLIB_H NEXT_STDLIB_H NEXT_AS_FIRST_DIRECTIVE_STDIO_H NEXT_STDIO_H STDINT_H WINT_T_SUFFIX WCHAR_T_SUFFIX SIG_ATOMIC_T_SUFFIX SIZE_T_SUFFIX PTRDIFF_T_SUFFIX HAVE_SIGNED_WINT_T HAVE_SIGNED_WCHAR_T HAVE_SIGNED_SIG_ATOMIC_T BITSIZEOF_WINT_T BITSIZEOF_WCHAR_T BITSIZEOF_SIG_ATOMIC_T BITSIZEOF_SIZE_T BITSIZEOF_PTRDIFF_T HAVE_SYS_BITYPES_H HAVE_SYS_INTTYPES_H HAVE_STDINT_H NEXT_AS_FIRST_DIRECTIVE_STDINT_H NEXT_STDINT_H HAVE_SYS_TYPES_H HAVE_INTTYPES_H HAVE_UNSIGNED_LONG_LONG_INT HAVE_LONG_LONG_INT NEXT_AS_FIRST_DIRECTIVE_STDDEF_H NEXT_STDDEF_H STDDEF_H HAVE_WCHAR_T REPLACE_NULL HAVE__BOOL STDBOOL_H REPLACE_UTIMENSAT REPLACE_STAT REPLACE_MKNOD REPLACE_MKFIFO REPLACE_MKDIR REPLACE_LSTAT REPLACE_FUTIMENS REPLACE_FSTATAT REPLACE_FSTAT HAVE_UTIMENSAT HAVE_MKNODAT HAVE_MKNOD HAVE_MKFIFOAT HAVE_MKFIFO HAVE_MKDIRAT HAVE_LSTAT HAVE_LCHMOD HAVE_FUTIMENS HAVE_FSTATAT HAVE_FCHMODAT GNULIB_UTIMENSAT GNULIB_STAT GNULIB_MKNODAT GNULIB_MKNOD GNULIB_MKFIFOAT GNULIB_MKFIFO GNULIB_MKDIRAT GNULIB_LSTAT GNULIB_LCHMOD GNULIB_FUTIMENS GNULIB_FSTATAT GNULIB_FCHMODAT NEXT_AS_FIRST_DIRECTIVE_SIGNAL_H NEXT_SIGNAL_H HAVE_TYPE_VOLATILE_SIG_ATOMIC_T HAVE_STRUCT_SIGACTION_SA_SIGACTION HAVE_SIGACTION HAVE_SIGINFO_T HAVE_SIGSET_T HAVE_POSIX_SIGNALBLOCKING GNULIB_SIGACTION GNULIB_SIGPROCMASK GNULIB_SIGNAL_H_SIGPIPE LIBSOCKET HAVE_SYS_SELECT_H NEXT_AS_FIRST_DIRECTIVE_SYS_SELECT_H NEXT_SYS_SELECT_H REPLACE_SELECT GNULIB_SELECT RELOCATABLE POLL_H NETINET_IN_H HAVE_NETINET_IN_H NEXT_AS_FIRST_DIRECTIVE_NETINET_IN_H NEXT_NETINET_IN_H APPLE_UNIVERSAL_BUILD REPLACE_TIMEGM REPLACE_STRPTIME REPLACE_NANOSLEEP REPLACE_MKTIME REPLACE_LOCALTIME_R UNDEFINE_STRTOK_R REPLACE_STRTOK_R REPLACE_STRSIGNAL REPLACE_STRNDUP REPLACE_STRERROR REPLACE_STRCASESTR REPLACE_STRSTR REPLACE_STRDUP REPLACE_MEMMEM REPLACE_MEMCHR HAVE_STRVERSCMP HAVE_DECL_STRSIGNAL HAVE_DECL_STRERROR HAVE_DECL_STRTOK_R HAVE_STRCASESTR HAVE_STRSEP HAVE_STRPBRK HAVE_DECL_STRNLEN HAVE_DECL_STRNDUP HAVE_DECL_STRDUP HAVE_STRCHRNUL HAVE_STPNCPY HAVE_STPCPY HAVE_RAWMEMCHR HAVE_DECL_MEMRCHR HAVE_MEMPCPY HAVE_DECL_MEMMEM HAVE_MBSLEN GNULIB_STRVERSCMP GNULIB_STRSIGNAL GNULIB_STRERROR GNULIB_MBSTOK_R GNULIB_MBSSEP GNULIB_MBSSPN GNULIB_MBSPBRK GNULIB_MBSCSPN GNULIB_MBSCASESTR GNULIB_MBSPCASECMP GNULIB_MBSNCASECMP GNULIB_MBSCASECMP GNULIB_MBSSTR GNULIB_MBSRCHR GNULIB_MBSCHR GNULIB_MBSNLEN GNULIB_MBSLEN GNULIB_STRTOK_R GNULIB_STRCASESTR GNULIB_STRSTR GNULIB_STRSEP GNULIB_STRPBRK GNULIB_STRNLEN GNULIB_STRNDUP GNULIB_STRDUP GNULIB_STRCHRNUL GNULIB_STPNCPY GNULIB_STPCPY GNULIB_RAWMEMCHR GNULIB_MEMRCHR GNULIB_MEMPCPY GNULIB_MEMMEM GNULIB_MEMCHR LOCALE_FR_UTF8 LOCALE_ZH_CN LOCALE_JA NEXT_AS_FIRST_DIRECTIVE_MATH_H NEXT_MATH_H REPLACE_UNSETENV REPLACE_STRTOD REPLACE_SETENV REPLACE_REALPATH REPLACE_PUTENV REPLACE_MKSTEMP REPLACE_CANONICALIZE_FILE_NAME HAVE_UNSETENV HAVE_SYS_LOADAVG_H HAVE_STRUCT_RANDOM_DATA HAVE_STRTOULL HAVE_STRTOLL HAVE_STRTOD HAVE_SETENV HAVE_RPMATCH HAVE_REALPATH HAVE_REALLOC_POSIX HAVE_RANDOM_R HAVE_MKSTEMPS HAVE_MKOSTEMPS HAVE_MKOSTEMP HAVE_MKDTEMP HAVE_GETSUBOPT HAVE_DECL_GETLOADAVG HAVE_CANONICALIZE_FILE_NAME HAVE_CALLOC_POSIX HAVE_ATOLL GNULIB_UNSETENV GNULIB_STRTOULL GNULIB_STRTOLL GNULIB_STRTOD GNULIB_SETENV GNULIB_RPMATCH GNULIB_REALPATH GNULIB_REALLOC_POSIX GNULIB_RANDOM_R GNULIB_PUTENV GNULIB_MKSTEMPS GNULIB_MKSTEMP GNULIB_MKOSTEMPS GNULIB_MKOSTEMP GNULIB_MKDTEMP GNULIB_MALLOC_POSIX GNULIB_GETSUBOPT GNULIB_GETLOADAVG GNULIB_CANONICALIZE_FILE_NAME GNULIB_CALLOC_POSIX GNULIB_ATOLL HAVE_MALLOC_POSIX LOCALCHARSET_TESTS_ENVIRONMENT GLIBC21 HAVE_LANGINFO_ERA HAVE_LANGINFO_CODESET HAVE_LANGINFO_H NEXT_AS_FIRST_DIRECTIVE_LANGINFO_H NEXT_LANGINFO_H REPLACE_NL_LANGINFO HAVE_NL_LANGINFO GNULIB_NL_LANGINFO INET_PTON_LIB NEXT_AS_FIRST_DIRECTIVE_SYS_TIME_H NEXT_SYS_TIME_H REPLACE_GETTIMEOFDAY HAVE_SYS_TIME_H HAVE_STRUCT_TIMEVAL GNULIB_GETTIMEOFDAY LTLIBINTL LIBINTL GETHOSTNAME_LIB GETADDRINFO_LIB INET_NTOP_LIB SERVENT_LIB HOSTENT_LIB NETDB_H HAVE_NETDB_H NEXT_AS_FIRST_DIRECTIVE_NETDB_H NEXT_NETDB_H HAVE_DECL_GETNAMEINFO HAVE_DECL_GETADDRINFO HAVE_DECL_GAI_STRERROR HAVE_DECL_FREEADDRINFO HAVE_STRUCT_ADDRINFO GNULIB_GETADDRINFO REPLACE_TRUNCL REPLACE_SIGNBIT_USING_GCC REPLACE_SIGNBIT REPLACE_ROUNDL REPLACE_ROUNDF REPLACE_ROUND REPLACE_NAN REPLACE_LDEXPL REPLACE_ISNAN REPLACE_ISINF REPLACE_ISFINITE REPLACE_HUGE_VAL REPLACE_FREXPL REPLACE_FREXP REPLACE_FLOORL REPLACE_FLOORF REPLACE_CEILL REPLACE_CEILF HAVE_DECL_TRUNCF HAVE_DECL_TRUNC HAVE_DECL_TANL HAVE_DECL_SQRTL HAVE_DECL_SINL HAVE_DECL_LOGL HAVE_DECL_LDEXPL HAVE_DECL_FREXPL HAVE_DECL_EXPL HAVE_DECL_COSL HAVE_DECL_ATANL HAVE_DECL_ASINL HAVE_DECL_ACOSL HAVE_TANL HAVE_SQRTL HAVE_SINL HAVE_LOGL HAVE_ISNANL HAVE_ISNAND HAVE_ISNANF HAVE_EXPL HAVE_COSL HAVE_ATANL HAVE_ASINL HAVE_ACOSL GNULIB_TRUNCL GNULIB_TRUNCF GNULIB_TRUNC GNULIB_TANL GNULIB_SQRTL GNULIB_SINL GNULIB_SIGNBIT GNULIB_ROUNDL GNULIB_ROUNDF GNULIB_ROUND GNULIB_LOGL GNULIB_LDEXPL GNULIB_ISNANL GNULIB_ISNAND GNULIB_ISNANF GNULIB_ISNAN GNULIB_ISINF GNULIB_ISFINITE GNULIB_FREXPL GNULIB_FREXP GNULIB_FLOORL GNULIB_FLOORF GNULIB_EXPL GNULIB_COSL GNULIB_CEILL GNULIB_CEILF GNULIB_ATANL GNULIB_ASINL GNULIB_ACOSL FLOAT_H NEXT_AS_FIRST_DIRECTIVE_FLOAT_H NEXT_FLOAT_H EOVERFLOW_VALUE EOVERFLOW_HIDDEN ENOLINK_VALUE ENOLINK_HIDDEN EMULTIHOP_VALUE EMULTIHOP_HIDDEN ERRNO_H NEXT_AS_FIRST_DIRECTIVE_ERRNO_H NEXT_ERRNO_H LTLIBMULTITHREAD LIBMULTITHREAD LTLIBTHREAD LIBTHREAD LIBPTH_PREFIX LTLIBPTH LIBPTH REPLACE_VSPRINTF REPLACE_VSNPRINTF REPLACE_VPRINTF REPLACE_VFPRINTF REPLACE_VDPRINTF REPLACE_VASPRINTF REPLACE_STDIO_WRITE_FUNCS REPLACE_SPRINTF REPLACE_SNPRINTF REPLACE_RENAMEAT REPLACE_RENAME REPLACE_REMOVE REPLACE_PRINTF REPLACE_POPEN REPLACE_PERROR REPLACE_OBSTACK_PRINTF REPLACE_GETLINE REPLACE_GETDELIM REPLACE_FTELLO REPLACE_FTELL REPLACE_FSEEKO REPLACE_FSEEK REPLACE_FREOPEN REPLACE_FPURGE REPLACE_FPRINTF REPLACE_FOPEN REPLACE_FFLUSH REPLACE_FCLOSE REPLACE_DPRINTF HAVE_VDPRINTF HAVE_VASPRINTF HAVE_RENAMEAT HAVE_DPRINTF HAVE_DECL_VSNPRINTF HAVE_DECL_SNPRINTF HAVE_DECL_OBSTACK_PRINTF HAVE_DECL_GETLINE HAVE_DECL_GETDELIM HAVE_DECL_FPURGE GNULIB_VSPRINTF_POSIX GNULIB_VSNPRINTF GNULIB_VPRINTF_POSIX GNULIB_VPRINTF GNULIB_VFPRINTF_POSIX GNULIB_VFPRINTF GNULIB_VDPRINTF GNULIB_VASPRINTF GNULIB_STDIO_H_SIGPIPE GNULIB_SPRINTF_POSIX GNULIB_SNPRINTF GNULIB_RENAMEAT GNULIB_RENAME GNULIB_REMOVE GNULIB_PUTS GNULIB_PUTCHAR GNULIB_PUTC GNULIB_PRINTF_POSIX GNULIB_PRINTF GNULIB_POPEN GNULIB_PERROR GNULIB_OBSTACK_PRINTF_POSIX GNULIB_OBSTACK_PRINTF GNULIB_GETLINE GNULIB_GETDELIM GNULIB_FWRITE GNULIB_FTELLO GNULIB_FTELL GNULIB_FSEEKO GNULIB_FSEEK GNULIB_FREOPEN GNULIB_FPUTS GNULIB_FPUTC GNULIB_FPURGE GNULIB_FPRINTF_POSIX GNULIB_FPRINTF GNULIB_FOPEN GNULIB_FFLUSH GNULIB_FCLOSE GNULIB_DPRINTF LOCALE_FR REPLACE_WCWIDTH REPLACE_WCSNRTOMBS REPLACE_WCSRTOMBS REPLACE_WCRTOMB REPLACE_MBSNRTOWCS REPLACE_MBSRTOWCS REPLACE_MBRLEN REPLACE_MBRTOWC REPLACE_MBSINIT REPLACE_WCTOB REPLACE_BTOWC REPLACE_MBSTATE_T HAVE_DECL_WCWIDTH HAVE_DECL_WCTOB HAVE_WCSNRTOMBS HAVE_WCSRTOMBS HAVE_WCRTOMB HAVE_MBSNRTOWCS HAVE_MBSRTOWCS HAVE_MBRLEN HAVE_MBRTOWC HAVE_MBSINIT HAVE_BTOWC GNULIB_WCWIDTH GNULIB_WCSNRTOMBS GNULIB_WCSRTOMBS GNULIB_WCRTOMB GNULIB_MBSNRTOWCS GNULIB_MBSRTOWCS GNULIB_MBRLEN GNULIB_MBRTOWC GNULIB_MBSINIT GNULIB_WCTOB GNULIB_BTOWC NEXT_AS_FIRST_DIRECTIVE_ARPA_INET_H NEXT_ARPA_INET_H HAVE_ARPA_INET_H HAVE_DECL_INET_PTON HAVE_DECL_INET_NTOP GNULIB_INET_PTON GNULIB_INET_NTOP ALLOCA_H ALLOCA LTALLOCA SYS_SOCKET_H HAVE_WINSOCK2_H SYS_IOCTL_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS SYS_IOCTL_H_HAVE_WINSOCK2_H GNULIB_IOCTL UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS UNISTD_H_HAVE_WINSOCK2_H REPLACE_WRITE REPLACE_USLEEP REPLACE_UNLINKAT REPLACE_UNLINK REPLACE_SYMLINK REPLACE_SLEEP REPLACE_RMDIR REPLACE_READLINK REPLACE_PREAD REPLACE_LSEEK REPLACE_LINKAT REPLACE_LINK REPLACE_LCHOWN REPLACE_GETPAGESIZE REPLACE_GETGROUPS REPLACE_GETCWD REPLACE_FCHOWNAT REPLACE_FCHDIR REPLACE_DUP2 REPLACE_DUP REPLACE_CLOSE REPLACE_CHOWN HAVE_USLEEP HAVE_UNLINKAT HAVE_SYS_PARAM_H HAVE_OS_H HAVE_DECL_GETLOGIN_R HAVE_DECL_ENVIRON HAVE_SYMLINKAT HAVE_SYMLINK HAVE_SLEEP HAVE_READLINKAT HAVE_READLINK HAVE_PREAD HAVE_PIPE2 HAVE_LINKAT HAVE_LINK HAVE_LCHOWN HAVE_GETUSERSHELL HAVE_GETPAGESIZE HAVE_GETLOGIN HAVE_GETHOSTNAME HAVE_GETGROUPS HAVE_GETDTABLESIZE HAVE_GETDOMAINNAME HAVE_FTRUNCATE HAVE_FSYNC HAVE_FCHOWNAT HAVE_FACCESSAT HAVE_EUIDACCESS HAVE_DUP3 HAVE_DUP2 HAVE_CHOWN GNULIB_WRITE GNULIB_USLEEP GNULIB_UNLINKAT GNULIB_UNLINK GNULIB_UNISTD_H_SIGPIPE GNULIB_UNISTD_H_GETOPT GNULIB_SYMLINKAT GNULIB_SYMLINK GNULIB_SLEEP GNULIB_RMDIR GNULIB_READLINKAT GNULIB_READLINK GNULIB_PREAD GNULIB_PIPE2 GNULIB_LSEEK GNULIB_LINKAT GNULIB_LINK GNULIB_LCHOWN GNULIB_GETUSERSHELL GNULIB_GETPAGESIZE GNULIB_GETLOGIN_R GNULIB_GETLOGIN GNULIB_GETHOSTNAME GNULIB_GETGROUPS GNULIB_GETDTABLESIZE GNULIB_GETDOMAINNAME GNULIB_GETCWD GNULIB_FTRUNCATE GNULIB_FSYNC GNULIB_FCHOWNAT GNULIB_FCHDIR GNULIB_FACCESSAT GNULIB_EUIDACCESS GNULIB_ENVIRON GNULIB_DUP3 GNULIB_DUP2 GNULIB_CLOSE GNULIB_CHOWN HAVE_WS2TCPIP_H HAVE_SYS_SOCKET_H NEXT_AS_FIRST_DIRECTIVE_SYS_SOCKET_H NEXT_SYS_SOCKET_H PRAGMA_SYSTEM_HEADER INCLUDE_NEXT_AS_FIRST_DIRECTIVE INCLUDE_NEXT HAVE_ACCEPT4 HAVE_SA_FAMILY_T HAVE_STRUCT_SOCKADDR_STORAGE GNULIB_ACCEPT4 GNULIB_SHUTDOWN GNULIB_SETSOCKOPT GNULIB_SENDTO GNULIB_RECVFROM GNULIB_SEND GNULIB_RECV GNULIB_LISTEN GNULIB_GETSOCKOPT GNULIB_GETSOCKNAME GNULIB_GETPEERNAME GNULIB_BIND GNULIB_ACCEPT GNULIB_CONNECT GNULIB_SOCKET GL_COND_LIBTOOL_FALSE GL_COND_LIBTOOL_TRUE HAVE_VALGRIND_FALSE HAVE_VALGRIND_TRUE VALGRIND HAVE_CXX HAVE_EASY_BINDINGS_FALSE HAVE_EASY_BINDINGS_TRUE HAVE_LUA_FALSE HAVE_LUA_TRUE LUA_CONFIG LUA_LIBS LUA_CFLAGS HAVE_RUBY_FALSE HAVE_RUBY_TRUE RUBY_CCFLAGS RUBY_LIBS pkgrbexecdir RUBY_INCLUDES rbexecdir pkgrubydir rubydir RUBY_PLATFORM RUBY_EXEC_PREFIX RUBY_PREFIX RUBY_VERSION RUBY HAVE_PYTHON_FALSE HAVE_PYTHON_TRUE PYTHON PERL_EXTRA_PARAMS HAVE_PERL_FALSE HAVE_PERL_TRUE PERL HAVE_SWIG_FALSE HAVE_SWIG_TRUE SWIG LIBGCRYPT_LIBS LIBGCRYPT_CFLAGS LIBGCRYPT_CONFIG LIBGNUTLS_EXTRA_CONFIG LIBGNUTLS_EXTRA_LIBS LIBGNUTLS_EXTRA_CFLAGS PRELUDE_ADMIN_CFLAGS PRELUDE_ADMIN_LIBS LIBGNUTLS_CONFIG LIBGNUTLS_LIBS LIBGNUTLS_CFLAGS PKG_CONFIG PTHREAD_LIBS PTHREAD_CFLAGS PTHREAD_LDFLAGS CC_FOR_BUILD LTDLOPEN LT_CONFIG_H CONVENIENCE_LTDL_FALSE CONVENIENCE_LTDL_TRUE INSTALL_LTDL_FALSE INSTALL_LTDL_TRUE ARGZ_H sys_symbol_underscore LIBADD_DL LT_DLPREOPEN LIBADD_DLD_LINK LIBADD_SHL_LOAD LIBADD_DLOPEN LT_DLLOADERS INCLTDL LTDLINCL LTDLDEPS LIBLTDL CXXCPP OTOOL64 OTOOL LIPO NMEDIT DSYMUTIL lt_ECHO AR LN_S NM ac_ct_DUMPBIN DUMPBIN LD FGREP SED LIBTOOL OBJDUMP DLLTOOL AS EGREP CPP RANLIB GREP YFLAGS YACC LEXLIB LEX_OUTPUT_ROOT LEX am__fastdepCXX_FALSE am__fastdepCXX_TRUE CXXDEPMODE ac_ct_CXX CXXFLAGS CXX am__fastdepCC_FALSE am__fastdepCC_TRUE CCDEPMODE AMDEPBACKSLASH AMDEP_FALSE AMDEP_TRUE am__quote am__include DEPDIR OBJEXT EXEEXT ac_ct_CC CPPFLAGS LDFLAGS CFLAGS CC MAINT MAINTAINER_MODE_FALSE MAINTAINER_MODE_TRUE am__untar am__tar AMTAR am__leading_dot SET_MAKE AWK mkdir_p MKDIR_P INSTALL_STRIP_PROGRAM STRIP install_sh MAKEINFO AUTOHEADER AUTOMAKE AUTOCONF ACLOCAL VERSION PACKAGE CYGPATH_W am__isrc INSTALL_DATA INSTALL_SCRIPT INSTALL_PROGRAM target_os target_vendor target_cpu target host_os host_vendor host_cpu host build_os build_vendor build_cpu build target_alias host_alias build_alias LIBS ECHO_T ECHO_N ECHO_C DEFS mandir localedir libdir psdir pdfdir dvidir htmldir infodir docdir oldincludedir includedir localstatedir sharedstatedir sysconfdir datadir datarootdir libexecdir sbindir bindir program_transform_name prefix exec_prefix PACKAGE_BUGREPORT PACKAGE_STRING PACKAGE_VERSION PACKAGE_TARNAME PACKAGE_NAME PATH_SEPARATOR SHELL' ac_subst_files='' ac_user_opts=' enable_option_checking enable_maintainer_mode enable_dependency_tracking enable_threads enable_static enable_shared with_pic enable_fast_install with_gnu_ld enable_libtool_lock with_included_ltdl with_ltdl_include with_ltdl_lib enable_ltdl_install with_libgnutls_prefix with_libgnutls_extra_prefix with_libgcrypt_prefix with_swig with_perl with_perl_installdirs with_python with_lua enable_easy_bindings with_valgrind enable_largefile enable_rpath with_libpth_prefix with_included_regex enable_relocatable with_html_dir enable_gtk_doc ' ac_precious_vars='build_alias host_alias target_alias CC CFLAGS LDFLAGS LIBS CPPFLAGS CXX CXXFLAGS CCC YACC YFLAGS CPP CXXCPP CC_FOR_BUILD PKG_CONFIG LIBGNUTLS_CFLAGS LIBGNUTLS_LIBS LIBGNUTLS_EXTRA_CFLAGS LIBGNUTLS_EXTRA_LIBS LUA_CFLAGS LUA_LIBS' # Initialize some variables set by options. ac_init_help= ac_init_version=false ac_unrecognized_opts= ac_unrecognized_sep= # The variables have the same names as the options, with # dashes changed to underlines. cache_file=/dev/null exec_prefix=NONE no_create= no_recursion= prefix=NONE program_prefix=NONE program_suffix=NONE program_transform_name=s,x,x, silent= site= srcdir= verbose= x_includes=NONE x_libraries=NONE # Installation directory options. # These are left unexpanded so users can "make install exec_prefix=/foo" # and all the variables that are supposed to be based on exec_prefix # by default will actually change. # Use braces instead of parens because sh, perl, etc. also accept them. # (The list follows the same order as the GNU Coding Standards.) bindir='${exec_prefix}/bin' sbindir='${exec_prefix}/sbin' libexecdir='${exec_prefix}/libexec' datarootdir='${prefix}/share' datadir='${datarootdir}' sysconfdir='${prefix}/etc' sharedstatedir='${prefix}/com' localstatedir='${prefix}/var' includedir='${prefix}/include' oldincludedir='/usr/include' docdir='${datarootdir}/doc/${PACKAGE}' infodir='${datarootdir}/info' htmldir='${docdir}' dvidir='${docdir}' pdfdir='${docdir}' psdir='${docdir}' libdir='${exec_prefix}/lib' localedir='${datarootdir}/locale' mandir='${datarootdir}/man' ac_prev= ac_dashdash= for ac_option do # If the previous option needs an argument, assign it. if test -n "$ac_prev"; then eval $ac_prev=\$ac_option ac_prev= continue fi case $ac_option in *=*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;; *) ac_optarg=yes ;; esac # Accept the important Cygnus configure options, so we can diagnose typos. case $ac_dashdash$ac_option in --) ac_dashdash=yes ;; -bindir | --bindir | --bindi | --bind | --bin | --bi) ac_prev=bindir ;; -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*) bindir=$ac_optarg ;; -build | --build | --buil | --bui | --bu) ac_prev=build_alias ;; -build=* | --build=* | --buil=* | --bui=* | --bu=*) build_alias=$ac_optarg ;; -cache-file | --cache-file | --cache-fil | --cache-fi \ | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c) ac_prev=cache_file ;; -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*) cache_file=$ac_optarg ;; --config-cache | -C) cache_file=config.cache ;; -datadir | --datadir | --datadi | --datad) ac_prev=datadir ;; -datadir=* | --datadir=* | --datadi=* | --datad=*) datadir=$ac_optarg ;; -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \ | --dataroo | --dataro | --datar) ac_prev=datarootdir ;; -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \ | --dataroot=* | --dataroo=* | --dataro=* | --datar=*) datarootdir=$ac_optarg ;; -disable-* | --disable-*) ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && { $as_echo "$as_me: error: invalid feature name: $ac_useropt" >&2 { (exit 1); exit 1; }; } ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in *" "enable_$ac_useropt" "*) ;; *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig" ac_unrecognized_sep=', ';; esac eval enable_$ac_useropt=no ;; -docdir | --docdir | --docdi | --doc | --do) ac_prev=docdir ;; -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*) docdir=$ac_optarg ;; -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv) ac_prev=dvidir ;; -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*) dvidir=$ac_optarg ;; -enable-* | --enable-*) ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && { $as_echo "$as_me: error: invalid feature name: $ac_useropt" >&2 { (exit 1); exit 1; }; } ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in *" "enable_$ac_useropt" "*) ;; *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig" ac_unrecognized_sep=', ';; esac eval enable_$ac_useropt=\$ac_optarg ;; -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \ | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \ | --exec | --exe | --ex) ac_prev=exec_prefix ;; -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \ | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \ | --exec=* | --exe=* | --ex=*) exec_prefix=$ac_optarg ;; -gas | --gas | --ga | --g) # Obsolete; use --with-gas. with_gas=yes ;; -help | --help | --hel | --he | -h) ac_init_help=long ;; -help=r* | --help=r* | --hel=r* | --he=r* | -hr*) ac_init_help=recursive ;; -help=s* | --help=s* | --hel=s* | --he=s* | -hs*) ac_init_help=short ;; -host | --host | --hos | --ho) ac_prev=host_alias ;; -host=* | --host=* | --hos=* | --ho=*) host_alias=$ac_optarg ;; -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht) ac_prev=htmldir ;; -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \ | --ht=*) htmldir=$ac_optarg ;; -includedir | --includedir | --includedi | --included | --include \ | --includ | --inclu | --incl | --inc) ac_prev=includedir ;; -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \ | --includ=* | --inclu=* | --incl=* | --inc=*) includedir=$ac_optarg ;; -infodir | --infodir | --infodi | --infod | --info | --inf) ac_prev=infodir ;; -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*) infodir=$ac_optarg ;; -libdir | --libdir | --libdi | --libd) ac_prev=libdir ;; -libdir=* | --libdir=* | --libdi=* | --libd=*) libdir=$ac_optarg ;; -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \ | --libexe | --libex | --libe) ac_prev=libexecdir ;; -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \ | --libexe=* | --libex=* | --libe=*) libexecdir=$ac_optarg ;; -localedir | --localedir | --localedi | --localed | --locale) ac_prev=localedir ;; -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*) localedir=$ac_optarg ;; -localstatedir | --localstatedir | --localstatedi | --localstated \ | --localstate | --localstat | --localsta | --localst | --locals) ac_prev=localstatedir ;; -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \ | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*) localstatedir=$ac_optarg ;; -mandir | --mandir | --mandi | --mand | --man | --ma | --m) ac_prev=mandir ;; -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*) mandir=$ac_optarg ;; -nfp | --nfp | --nf) # Obsolete; use --without-fp. with_fp=no ;; -no-create | --no-create | --no-creat | --no-crea | --no-cre \ | --no-cr | --no-c | -n) no_create=yes ;; -no-recursion | --no-recursion | --no-recursio | --no-recursi \ | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) no_recursion=yes ;; -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \ | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \ | --oldin | --oldi | --old | --ol | --o) ac_prev=oldincludedir ;; -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \ | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \ | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*) oldincludedir=$ac_optarg ;; -prefix | --prefix | --prefi | --pref | --pre | --pr | --p) ac_prev=prefix ;; -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*) prefix=$ac_optarg ;; -program-prefix | --program-prefix | --program-prefi | --program-pref \ | --program-pre | --program-pr | --program-p) ac_prev=program_prefix ;; -program-prefix=* | --program-prefix=* | --program-prefi=* \ | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*) program_prefix=$ac_optarg ;; -program-suffix | --program-suffix | --program-suffi | --program-suff \ | --program-suf | --program-su | --program-s) ac_prev=program_suffix ;; -program-suffix=* | --program-suffix=* | --program-suffi=* \ | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*) program_suffix=$ac_optarg ;; -program-transform-name | --program-transform-name \ | --program-transform-nam | --program-transform-na \ | --program-transform-n | --program-transform- \ | --program-transform | --program-transfor \ | --program-transfo | --program-transf \ | --program-trans | --program-tran \ | --progr-tra | --program-tr | --program-t) ac_prev=program_transform_name ;; -program-transform-name=* | --program-transform-name=* \ | --program-transform-nam=* | --program-transform-na=* \ | --program-transform-n=* | --program-transform-=* \ | --program-transform=* | --program-transfor=* \ | --program-transfo=* | --program-transf=* \ | --program-trans=* | --program-tran=* \ | --progr-tra=* | --program-tr=* | --program-t=*) program_transform_name=$ac_optarg ;; -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd) ac_prev=pdfdir ;; -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*) pdfdir=$ac_optarg ;; -psdir | --psdir | --psdi | --psd | --ps) ac_prev=psdir ;; -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*) psdir=$ac_optarg ;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil) silent=yes ;; -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb) ac_prev=sbindir ;; -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \ | --sbi=* | --sb=*) sbindir=$ac_optarg ;; -sharedstatedir | --sharedstatedir | --sharedstatedi \ | --sharedstated | --sharedstate | --sharedstat | --sharedsta \ | --sharedst | --shareds | --shared | --share | --shar \ | --sha | --sh) ac_prev=sharedstatedir ;; -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \ | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \ | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \ | --sha=* | --sh=*) sharedstatedir=$ac_optarg ;; -site | --site | --sit) ac_prev=site ;; -site=* | --site=* | --sit=*) site=$ac_optarg ;; -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) ac_prev=srcdir ;; -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) srcdir=$ac_optarg ;; -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \ | --syscon | --sysco | --sysc | --sys | --sy) ac_prev=sysconfdir ;; -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \ | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*) sysconfdir=$ac_optarg ;; -target | --target | --targe | --targ | --tar | --ta | --t) ac_prev=target_alias ;; -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*) target_alias=$ac_optarg ;; -v | -verbose | --verbose | --verbos | --verbo | --verb) verbose=yes ;; -version | --version | --versio | --versi | --vers | -V) ac_init_version=: ;; -with-* | --with-*) ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && { $as_echo "$as_me: error: invalid package name: $ac_useropt" >&2 { (exit 1); exit 1; }; } ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in *" "with_$ac_useropt" "*) ;; *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig" ac_unrecognized_sep=', ';; esac eval with_$ac_useropt=\$ac_optarg ;; -without-* | --without-*) ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && { $as_echo "$as_me: error: invalid package name: $ac_useropt" >&2 { (exit 1); exit 1; }; } ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in *" "with_$ac_useropt" "*) ;; *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig" ac_unrecognized_sep=', ';; esac eval with_$ac_useropt=no ;; --x) # Obsolete; use --with-x. with_x=yes ;; -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \ | --x-incl | --x-inc | --x-in | --x-i) ac_prev=x_includes ;; -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \ | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*) x_includes=$ac_optarg ;; -x-libraries | --x-libraries | --x-librarie | --x-librari \ | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l) ac_prev=x_libraries ;; -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \ | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*) x_libraries=$ac_optarg ;; -*) { $as_echo "$as_me: error: unrecognized option: $ac_option Try \`$0 --help' for more information." >&2 { (exit 1); exit 1; }; } ;; *=*) ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='` # Reject names that are not valid shell variable names. expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null && { $as_echo "$as_me: error: invalid variable name: $ac_envvar" >&2 { (exit 1); exit 1; }; } eval $ac_envvar=\$ac_optarg export $ac_envvar ;; *) # FIXME: should be removed in autoconf 3.0. $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null && $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2 : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option} ;; esac done if test -n "$ac_prev"; then ac_option=--`echo $ac_prev | sed 's/_/-/g'` { $as_echo "$as_me: error: missing argument to $ac_option" >&2 { (exit 1); exit 1; }; } fi if test -n "$ac_unrecognized_opts"; then case $enable_option_checking in no) ;; fatal) { $as_echo "$as_me: error: unrecognized options: $ac_unrecognized_opts" >&2 { (exit 1); exit 1; }; } ;; *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;; esac fi # Check all directory arguments for consistency. for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \ datadir sysconfdir sharedstatedir localstatedir includedir \ oldincludedir docdir infodir htmldir dvidir pdfdir psdir \ libdir localedir mandir do eval ac_val=\$$ac_var # Remove trailing slashes. case $ac_val in */ ) ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'` eval $ac_var=\$ac_val;; esac # Be sure to have absolute directory names. case $ac_val in [\\/$]* | ?:[\\/]* ) continue;; NONE | '' ) case $ac_var in *prefix ) continue;; esac;; esac { $as_echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2 { (exit 1); exit 1; }; } done # There might be people who depend on the old broken behavior: `$host' # used to hold the argument of --host etc. # FIXME: To remove some day. build=$build_alias host=$host_alias target=$target_alias # FIXME: To remove some day. if test "x$host_alias" != x; then if test "x$build_alias" = x; then cross_compiling=maybe $as_echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host. If a cross compiler is detected then cross compile mode will be used." >&2 elif test "x$build_alias" != "x$host_alias"; then cross_compiling=yes fi fi ac_tool_prefix= test -n "$host_alias" && ac_tool_prefix=$host_alias- test "$silent" = yes && exec 6>/dev/null ac_pwd=`pwd` && test -n "$ac_pwd" && ac_ls_di=`ls -di .` && ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` || { $as_echo "$as_me: error: working directory cannot be determined" >&2 { (exit 1); exit 1; }; } test "X$ac_ls_di" = "X$ac_pwd_ls_di" || { $as_echo "$as_me: error: pwd does not report name of working directory" >&2 { (exit 1); exit 1; }; } # Find the source files, if location was not specified. if test -z "$srcdir"; then ac_srcdir_defaulted=yes # Try the directory containing this script, then the parent directory. ac_confdir=`$as_dirname -- "$as_myself" || $as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_myself" : 'X\(//\)[^/]' \| \ X"$as_myself" : 'X\(//\)$' \| \ X"$as_myself" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$as_myself" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` srcdir=$ac_confdir if test ! -r "$srcdir/$ac_unique_file"; then srcdir=.. fi else ac_srcdir_defaulted=no fi if test ! -r "$srcdir/$ac_unique_file"; then test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .." { $as_echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2 { (exit 1); exit 1; }; } fi ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work" ac_abs_confdir=`( cd "$srcdir" && test -r "./$ac_unique_file" || { $as_echo "$as_me: error: $ac_msg" >&2 { (exit 1); exit 1; }; } pwd)` # When building in place, set srcdir=. if test "$ac_abs_confdir" = "$ac_pwd"; then srcdir=. fi # Remove unnecessary trailing slashes from srcdir. # Double slashes in file names in object file debugging info # mess up M-x gdb in Emacs. case $srcdir in */) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;; esac for ac_var in $ac_precious_vars; do eval ac_env_${ac_var}_set=\${${ac_var}+set} eval ac_env_${ac_var}_value=\$${ac_var} eval ac_cv_env_${ac_var}_set=\${${ac_var}+set} eval ac_cv_env_${ac_var}_value=\$${ac_var} done # # Report the --help message. # if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF \`configure' configures this package to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... To assign environment variables (e.g., CC, CFLAGS...), specify them as VAR=VALUE. See below for descriptions of some of the useful variables. Defaults for the options are specified in brackets. Configuration: -h, --help display this help and exit --help=short display options specific to this package --help=recursive display the short help of all the included packages -V, --version display version information and exit -q, --quiet, --silent do not print \`checking...' messages --cache-file=FILE cache test results in FILE [disabled] -C, --config-cache alias for \`--cache-file=config.cache' -n, --no-create do not create output files --srcdir=DIR find the sources in DIR [configure dir or \`..'] Installation directories: --prefix=PREFIX install architecture-independent files in PREFIX [$ac_default_prefix] --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX [PREFIX] By default, \`make install' will install all the files in \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify an installation prefix other than \`$ac_default_prefix' using \`--prefix', for instance \`--prefix=\$HOME'. For better control, use the options below. Fine tuning of the installation directories: --bindir=DIR user executables [EPREFIX/bin] --sbindir=DIR system admin executables [EPREFIX/sbin] --libexecdir=DIR program executables [EPREFIX/libexec] --sysconfdir=DIR read-only single-machine data [PREFIX/etc] --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com] --localstatedir=DIR modifiable single-machine data [PREFIX/var] --libdir=DIR object code libraries [EPREFIX/lib] --includedir=DIR C header files [PREFIX/include] --oldincludedir=DIR C header files for non-gcc [/usr/include] --datarootdir=DIR read-only arch.-independent data root [PREFIX/share] --datadir=DIR read-only architecture-independent data [DATAROOTDIR] --infodir=DIR info documentation [DATAROOTDIR/info] --localedir=DIR locale-dependent data [DATAROOTDIR/locale] --mandir=DIR man documentation [DATAROOTDIR/man] --docdir=DIR documentation root [DATAROOTDIR/doc/PACKAGE] --htmldir=DIR html documentation [DOCDIR] --dvidir=DIR dvi documentation [DOCDIR] --pdfdir=DIR pdf documentation [DOCDIR] --psdir=DIR ps documentation [DOCDIR] _ACEOF cat <<\_ACEOF Program names: --program-prefix=PREFIX prepend PREFIX to installed program names --program-suffix=SUFFIX append SUFFIX to installed program names --program-transform-name=PROGRAM run sed PROGRAM on installed program names System types: --build=BUILD configure for building on BUILD [guessed] --host=HOST cross-compile to build programs to run on HOST [BUILD] --target=TARGET configure for building compilers for TARGET [HOST] _ACEOF fi if test -n "$ac_init_help"; then cat <<\_ACEOF Optional Features: --disable-option-checking ignore unrecognized --enable/--with options --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) --enable-FEATURE[=ARG] include FEATURE [ARG=yes] --enable-maintainer-mode enable make rules and dependencies not useful (and sometimes confusing) to the casual installer --disable-dependency-tracking speeds up one-time build --enable-dependency-tracking do not reject slow dependency extractors --enable-threads={posix|solaris|pth|win32} specify multithreading API --disable-threads build without multithread safety --enable-static[=PKGS] build static libraries [default=no] --enable-shared[=PKGS] build shared libraries [default=yes] --enable-fast-install[=PKGS] optimize for fast installation [default=yes] --disable-libtool-lock avoid locking (might break parallel builds) --enable-ltdl-install install libltdl --enable-easy-bindings Enable support for high level binding [default=yes] --disable-largefile omit support for large files --disable-rpath do not hardcode runtime library paths --enable-relocatable install a package that can be moved in the file system --enable-gtk-doc use gtk-doc to build documentation [default=no] Optional Packages: --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) --with-pic try to use only PIC/non-PIC objects [default=use both] --with-gnu-ld assume the C compiler uses GNU ld [default=no] --with-included-ltdl use the GNU ltdl sources included here --with-ltdl-include=DIR use the ltdl headers installed in DIR --with-ltdl-lib=DIR use the libltdl.la installed in DIR --with-libgnutls-prefix=PFX Prefix where libgnutls is installed (optional) --with-libgnutls-extra-prefix=PFX Prefix where libgnutls-extra is installed (optional) --with-libgcrypt-prefix=PFX prefix where LIBGCRYPT is installed (optional) --with-swig[=PATH] Re-generate perl/python bindings sources [default=auto] --with-perl[=PATH] Enable support for perl binding [default=auto] --with-perl-installdirs=[site|vendor] Specify where to install the Perl module [default=site] --with-python[=PATH] Enable support for python binding [default=auto] --with-lua-config[=PATH] Enable support for lua binding [default=auto] --with-python[=PATH] Valgrind support for unit testing [default=auto] --with-gnu-ld assume the C compiler uses GNU ld default=no --with-libpth-prefix[=DIR] search for libpth in DIR/include and DIR/lib --without-libpth-prefix don't search for libpth in includedir and libdir --without-included-regex don't compile regex; this is the default on systems with recent-enough versions of the GNU C Library (use with caution on other systems). --with-html-dir=PATH path to installed docs Some influential environment variables: CC C compiler command CFLAGS C compiler flags LDFLAGS linker flags, e.g. -L if you have libraries in a nonstandard directory LIBS libraries to pass to the linker, e.g. -l CPPFLAGS C/C++/Objective C preprocessor flags, e.g. -I if you have headers in a nonstandard directory CXX C++ compiler command CXXFLAGS C++ compiler flags YACC The `Yet Another C Compiler' implementation to use. Defaults to the first program found out of: `bison -y', `byacc', `yacc'. YFLAGS The list of arguments that will be passed by default to $YACC. This script will default YFLAGS to the empty string to avoid a default value of `-d' given by some make applications. CPP C preprocessor CXXCPP C++ preprocessor CC_FOR_BUILD build system C compiler PKG_CONFIG path to pkg-config utility LIBGNUTLS_CFLAGS C compiler flags for LIBGNUTLS, overriding pkg-config LIBGNUTLS_LIBS linker flags for LIBGNUTLS, overriding pkg-config LIBGNUTLS_EXTRA_CFLAGS C compiler flags for LIBGNUTLS_EXTRA, overriding pkg-config LIBGNUTLS_EXTRA_LIBS linker flags for LIBGNUTLS_EXTRA, overriding pkg-config LUA_CFLAGS C compiler flags for LUA, overriding pkg-config LUA_LIBS linker flags for LUA, overriding pkg-config Use these variables to override the choices made by `configure' or to help it to find libraries and programs with nonstandard names/locations. _ACEOF ac_status=$? fi if test "$ac_init_help" = "recursive"; then # If there are subdirs, report their specific --help. for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue test -d "$ac_dir" || { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } || continue ac_builddir=. case "$ac_dir" in .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` # A ".." for each directory in $ac_dir_suffix. ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` case $ac_top_builddir_sub in "") ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; esac ;; esac ac_abs_top_builddir=$ac_pwd ac_abs_builddir=$ac_pwd$ac_dir_suffix # for backward compatibility: ac_top_builddir=$ac_top_build_prefix case $srcdir in .) # We are building in place. ac_srcdir=. ac_top_srcdir=$ac_top_builddir_sub ac_abs_top_srcdir=$ac_pwd ;; [\\/]* | ?:[\\/]* ) # Absolute name. ac_srcdir=$srcdir$ac_dir_suffix; ac_top_srcdir=$srcdir ac_abs_top_srcdir=$srcdir ;; *) # Relative name. ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix ac_top_srcdir=$ac_top_build_prefix$srcdir ac_abs_top_srcdir=$ac_pwd/$srcdir ;; esac ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix cd "$ac_dir" || { ac_status=$?; continue; } # Check for guested configure. if test -f "$ac_srcdir/configure.gnu"; then echo && $SHELL "$ac_srcdir/configure.gnu" --help=recursive elif test -f "$ac_srcdir/configure"; then echo && $SHELL "$ac_srcdir/configure" --help=recursive else $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2 fi || ac_status=$? cd "$ac_pwd" || { ac_status=$?; break; } done fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF configure generated by GNU Autoconf 2.63 Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. This configure script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it. _ACEOF exit fi cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. It was created by $as_me, which was generated by GNU Autoconf 2.63. Invocation command line was $ $0 $@ _ACEOF exec 5>>config.log { cat <<_ASUNAME ## --------- ## ## Platform. ## ## --------- ## hostname = `(hostname || uname -n) 2>/dev/null | sed 1q` uname -m = `(uname -m) 2>/dev/null || echo unknown` uname -r = `(uname -r) 2>/dev/null || echo unknown` uname -s = `(uname -s) 2>/dev/null || echo unknown` uname -v = `(uname -v) 2>/dev/null || echo unknown` /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown` /bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown` /bin/arch = `(/bin/arch) 2>/dev/null || echo unknown` /usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown` /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown` /usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown` /bin/machine = `(/bin/machine) 2>/dev/null || echo unknown` /usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown` /bin/universe = `(/bin/universe) 2>/dev/null || echo unknown` _ASUNAME as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. $as_echo "PATH: $as_dir" done IFS=$as_save_IFS } >&5 cat >&5 <<_ACEOF ## ----------- ## ## Core tests. ## ## ----------- ## _ACEOF # Keep a trace of the command line. # Strip out --no-create and --no-recursion so they do not pile up. # Strip out --silent because we don't want to record it for future runs. # Also quote any args containing shell meta-characters. # Make two passes to allow for proper duplicate-argument suppression. ac_configure_args= ac_configure_args0= ac_configure_args1= ac_must_keep_next=false for ac_pass in 1 2 do for ac_arg do case $ac_arg in -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil) continue ;; *\'*) ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; esac case $ac_pass in 1) ac_configure_args0="$ac_configure_args0 '$ac_arg'" ;; 2) ac_configure_args1="$ac_configure_args1 '$ac_arg'" if test $ac_must_keep_next = true; then ac_must_keep_next=false # Got value, back to normal. else case $ac_arg in *=* | --config-cache | -C | -disable-* | --disable-* \ | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \ | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \ | -with-* | --with-* | -without-* | --without-* | --x) case "$ac_configure_args0 " in "$ac_configure_args1"*" '$ac_arg' "* ) continue ;; esac ;; -* ) ac_must_keep_next=true ;; esac fi ac_configure_args="$ac_configure_args '$ac_arg'" ;; esac done done $as_unset ac_configure_args0 || test "${ac_configure_args0+set}" != set || { ac_configure_args0=; export ac_configure_args0; } $as_unset ac_configure_args1 || test "${ac_configure_args1+set}" != set || { ac_configure_args1=; export ac_configure_args1; } # When interrupted or exit'd, cleanup temporary files, and complete # config.log. We remove comments because anyway the quotes in there # would cause problems or look ugly. # WARNING: Use '\'' to represent an apostrophe within the trap. # WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug. trap 'exit_status=$? # Save into config.log some information that might help in debugging. { echo cat <<\_ASBOX ## ---------------- ## ## Cache variables. ## ## ---------------- ## _ASBOX echo # The following way of writing the cache mishandles newlines in values, ( for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do eval ac_val=\$$ac_var case $ac_val in #( *${as_nl}*) case $ac_var in #( *_cv_*) { $as_echo "$as_me:$LINENO: WARNING: cache variable $ac_var contains a newline" >&5 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; esac case $ac_var in #( _ | IFS | as_nl) ;; #( BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( *) $as_unset $ac_var ;; esac ;; esac done (set) 2>&1 | case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #( *${as_nl}ac_space=\ *) sed -n \ "s/'\''/'\''\\\\'\'''\''/g; s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p" ;; #( *) sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" ;; esac | sort ) echo cat <<\_ASBOX ## ----------------- ## ## Output variables. ## ## ----------------- ## _ASBOX echo for ac_var in $ac_subst_vars do eval ac_val=\$$ac_var case $ac_val in *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; esac $as_echo "$ac_var='\''$ac_val'\''" done | sort echo if test -n "$ac_subst_files"; then cat <<\_ASBOX ## ------------------- ## ## File substitutions. ## ## ------------------- ## _ASBOX echo for ac_var in $ac_subst_files do eval ac_val=\$$ac_var case $ac_val in *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; esac $as_echo "$ac_var='\''$ac_val'\''" done | sort echo fi if test -s confdefs.h; then cat <<\_ASBOX ## ----------- ## ## confdefs.h. ## ## ----------- ## _ASBOX echo cat confdefs.h echo fi test "$ac_signal" != 0 && $as_echo "$as_me: caught signal $ac_signal" $as_echo "$as_me: exit $exit_status" } >&5 rm -f core *.core core.conftest.* && rm -f -r conftest* confdefs* conf$$* $ac_clean_files && exit $exit_status ' 0 for ac_signal in 1 2 13 15; do trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal done ac_signal=0 # confdefs.h avoids OS command line length limits that DEFS can exceed. rm -f -r conftest* confdefs.h # Predefined preprocessor variables. cat >>confdefs.h <<_ACEOF #define PACKAGE_NAME "$PACKAGE_NAME" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_TARNAME "$PACKAGE_TARNAME" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_VERSION "$PACKAGE_VERSION" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_STRING "$PACKAGE_STRING" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT" _ACEOF # Let the site file select an alternate cache file if it wants to. # Prefer an explicitly selected file to automatically selected ones. ac_site_file1=NONE ac_site_file2=NONE if test -n "$CONFIG_SITE"; then ac_site_file1=$CONFIG_SITE elif test "x$prefix" != xNONE; then ac_site_file1=$prefix/share/config.site ac_site_file2=$prefix/etc/config.site else ac_site_file1=$ac_default_prefix/share/config.site ac_site_file2=$ac_default_prefix/etc/config.site fi for ac_site_file in "$ac_site_file1" "$ac_site_file2" do test "x$ac_site_file" = xNONE && continue if test -r "$ac_site_file"; then { $as_echo "$as_me:$LINENO: loading site script $ac_site_file" >&5 $as_echo "$as_me: loading site script $ac_site_file" >&6;} sed 's/^/| /' "$ac_site_file" >&5 . "$ac_site_file" fi done if test -r "$cache_file"; then # Some versions of bash will fail to source /dev/null (special # files actually), so we avoid doing that. if test -f "$cache_file"; then { $as_echo "$as_me:$LINENO: loading cache $cache_file" >&5 $as_echo "$as_me: loading cache $cache_file" >&6;} case $cache_file in [\\/]* | ?:[\\/]* ) . "$cache_file";; *) . "./$cache_file";; esac fi else { $as_echo "$as_me:$LINENO: creating cache $cache_file" >&5 $as_echo "$as_me: creating cache $cache_file" >&6;} >$cache_file fi gl_header_list="$gl_header_list sys/socket.h" gl_header_list="$gl_header_list arpa/inet.h" gl_func_list="$gl_func_list btowc" gl_func_list="$gl_func_list dup2" gl_header_list="$gl_header_list errno.h" gl_header_list="$gl_header_list float.h" gl_header_list="$gl_header_list netdb.h" gl_header_list="$gl_header_list netinet/in.h" gl_func_list="$gl_func_list getdelim" gl_header_list="$gl_header_list sys/param.h" gl_header_list="$gl_header_list stdio_ext.h" gl_header_list="$gl_header_list termios.h" gl_func_list="$gl_func_list __fsetlocking" gl_func_list="$gl_func_list tcgetattr" gl_func_list="$gl_func_list tcsetattr" gl_header_list="$gl_header_list sys/time.h" gl_func_list="$gl_func_list gettimeofday" gl_header_list="$gl_header_list langinfo.h" gl_header_list="$gl_header_list math.h" gl_func_list="$gl_func_list mbsinit" gl_func_list="$gl_func_list mbrtowc" gl_header_list="$gl_header_list sys/mman.h" gl_func_list="$gl_func_list mprotect" gl_header_list="$gl_header_list unistd.h" gl_func_list="$gl_func_list alarm" gl_func_list="$gl_func_list nl_langinfo" gl_func_list="$gl_func_list pathconf" gl_header_list="$gl_header_list sys/ioctl.h" gl_header_list="$gl_header_list sys/filio.h" gl_printf_safe=yes gl_header_list="$gl_header_list locale.h" gl_func_list="$gl_func_list isblank" gl_func_list="$gl_func_list iswctype" gl_func_list="$gl_func_list wcscoll" gl_header_list="$gl_header_list sys/select.h" gl_header_list="$gl_header_list signal.h" gl_func_list="$gl_func_list sleep" gl_func_list="$gl_func_list vasnprintf" gl_func_list="$gl_func_list lstat" gl_header_list="$gl_header_list stddef.h" gl_header_list="$gl_header_list stdint.h" gl_header_list="$gl_header_list wchar.h" gl_header_list="$gl_header_list stdio.h" gl_header_list="$gl_header_list stdlib.h" gl_header_list="$gl_header_list string.h" gl_header_list="$gl_header_list strings.h" gl_func_list="$gl_func_list strndup" gl_header_list="$gl_header_list sys/stat.h" gl_header_list="$gl_header_list sys/utsname.h" gl_header_list="$gl_header_list time.h" gl_func_list="$gl_func_list wcrtomb" gl_func_list="$gl_func_list iswcntrl" gl_header_list="$gl_header_list wctype.h" gl_header_list="$gl_header_list fcntl.h" gl_header_list="$gl_header_list sys/wait.h" gl_func_list="$gl_func_list symlink" gl_func_list="$gl_func_list shutdown" gl_func_list="$gl_func_list wctob" gl_header_list="$gl_header_list sys/un.h" gl_header_list="$gl_header_list netinet/tcp.h" # Check that the precious variables saved in the cache have kept the same # value. ac_cache_corrupted=false for ac_var in $ac_precious_vars; do eval ac_old_set=\$ac_cv_env_${ac_var}_set eval ac_new_set=\$ac_env_${ac_var}_set eval ac_old_val=\$ac_cv_env_${ac_var}_value eval ac_new_val=\$ac_env_${ac_var}_value case $ac_old_set,$ac_new_set in set,) { $as_echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5 $as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;} ac_cache_corrupted=: ;; ,set) { $as_echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previous run" >&5 $as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;} ac_cache_corrupted=: ;; ,);; *) if test "x$ac_old_val" != "x$ac_new_val"; then # differences in whitespace do not lead to failure. ac_old_val_w=`echo x $ac_old_val` ac_new_val_w=`echo x $ac_new_val` if test "$ac_old_val_w" != "$ac_new_val_w"; then { $as_echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5 $as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;} ac_cache_corrupted=: else { $as_echo "$as_me:$LINENO: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5 $as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;} eval $ac_var=\$ac_old_val fi { $as_echo "$as_me:$LINENO: former value: \`$ac_old_val'" >&5 $as_echo "$as_me: former value: \`$ac_old_val'" >&2;} { $as_echo "$as_me:$LINENO: current value: \`$ac_new_val'" >&5 $as_echo "$as_me: current value: \`$ac_new_val'" >&2;} fi;; esac # Pass precious variables to config.status. if test "$ac_new_set" = set; then case $ac_new_val in *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;; *) ac_arg=$ac_var=$ac_new_val ;; esac case " $ac_configure_args " in *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy. *) ac_configure_args="$ac_configure_args '$ac_arg'" ;; esac fi done if $ac_cache_corrupted; then { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} { $as_echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5 $as_echo "$as_me: error: changes in the environment can compromise the build" >&2;} { { $as_echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5 $as_echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;} { (exit 1); exit 1; }; } fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu ac_aux_dir= for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do if test -f "$ac_dir/install-sh"; then ac_aux_dir=$ac_dir ac_install_sh="$ac_aux_dir/install-sh -c" break elif test -f "$ac_dir/install.sh"; then ac_aux_dir=$ac_dir ac_install_sh="$ac_aux_dir/install.sh -c" break elif test -f "$ac_dir/shtool"; then ac_aux_dir=$ac_dir ac_install_sh="$ac_aux_dir/shtool install -c" break fi done if test -z "$ac_aux_dir"; then { { $as_echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" >&5 $as_echo "$as_me: error: cannot find install-sh or install.sh in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" >&2;} { (exit 1); exit 1; }; } fi # These three variables are undocumented and unsupported, # and are intended to be withdrawn in a future Autoconf release. # They can cause serious problems if a builder's source tree is in a directory # whose full name contains unusual characters. ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var. ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var. ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var. # Make sure we can run config.sub. $SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 || { { $as_echo "$as_me:$LINENO: error: cannot run $SHELL $ac_aux_dir/config.sub" >&5 $as_echo "$as_me: error: cannot run $SHELL $ac_aux_dir/config.sub" >&2;} { (exit 1); exit 1; }; } { $as_echo "$as_me:$LINENO: checking build system type" >&5 $as_echo_n "checking build system type... " >&6; } if test "${ac_cv_build+set}" = set; then $as_echo_n "(cached) " >&6 else ac_build_alias=$build_alias test "x$ac_build_alias" = x && ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"` test "x$ac_build_alias" = x && { { $as_echo "$as_me:$LINENO: error: cannot guess build type; you must specify one" >&5 $as_echo "$as_me: error: cannot guess build type; you must specify one" >&2;} { (exit 1); exit 1; }; } ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` || { { $as_echo "$as_me:$LINENO: error: $SHELL $ac_aux_dir/config.sub $ac_build_alias failed" >&5 $as_echo "$as_me: error: $SHELL $ac_aux_dir/config.sub $ac_build_alias failed" >&2;} { (exit 1); exit 1; }; } fi { $as_echo "$as_me:$LINENO: result: $ac_cv_build" >&5 $as_echo "$ac_cv_build" >&6; } case $ac_cv_build in *-*-*) ;; *) { { $as_echo "$as_me:$LINENO: error: invalid value of canonical build" >&5 $as_echo "$as_me: error: invalid value of canonical build" >&2;} { (exit 1); exit 1; }; };; esac build=$ac_cv_build ac_save_IFS=$IFS; IFS='-' set x $ac_cv_build shift build_cpu=$1 build_vendor=$2 shift; shift # Remember, the first character of IFS is used to create $*, # except with old shells: build_os=$* IFS=$ac_save_IFS case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac { $as_echo "$as_me:$LINENO: checking host system type" >&5 $as_echo_n "checking host system type... " >&6; } if test "${ac_cv_host+set}" = set; then $as_echo_n "(cached) " >&6 else if test "x$host_alias" = x; then ac_cv_host=$ac_cv_build else ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` || { { $as_echo "$as_me:$LINENO: error: $SHELL $ac_aux_dir/config.sub $host_alias failed" >&5 $as_echo "$as_me: error: $SHELL $ac_aux_dir/config.sub $host_alias failed" >&2;} { (exit 1); exit 1; }; } fi fi { $as_echo "$as_me:$LINENO: result: $ac_cv_host" >&5 $as_echo "$ac_cv_host" >&6; } case $ac_cv_host in *-*-*) ;; *) { { $as_echo "$as_me:$LINENO: error: invalid value of canonical host" >&5 $as_echo "$as_me: error: invalid value of canonical host" >&2;} { (exit 1); exit 1; }; };; esac host=$ac_cv_host ac_save_IFS=$IFS; IFS='-' set x $ac_cv_host shift host_cpu=$1 host_vendor=$2 shift; shift # Remember, the first character of IFS is used to create $*, # except with old shells: host_os=$* IFS=$ac_save_IFS case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac { $as_echo "$as_me:$LINENO: checking target system type" >&5 $as_echo_n "checking target system type... " >&6; } if test "${ac_cv_target+set}" = set; then $as_echo_n "(cached) " >&6 else if test "x$target_alias" = x; then ac_cv_target=$ac_cv_host else ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` || { { $as_echo "$as_me:$LINENO: error: $SHELL $ac_aux_dir/config.sub $target_alias failed" >&5 $as_echo "$as_me: error: $SHELL $ac_aux_dir/config.sub $target_alias failed" >&2;} { (exit 1); exit 1; }; } fi fi { $as_echo "$as_me:$LINENO: result: $ac_cv_target" >&5 $as_echo "$ac_cv_target" >&6; } case $ac_cv_target in *-*-*) ;; *) { { $as_echo "$as_me:$LINENO: error: invalid value of canonical target" >&5 $as_echo "$as_me: error: invalid value of canonical target" >&2;} { (exit 1); exit 1; }; };; esac target=$ac_cv_target ac_save_IFS=$IFS; IFS='-' set x $ac_cv_target shift target_cpu=$1 target_vendor=$2 shift; shift # Remember, the first character of IFS is used to create $*, # except with old shells: target_os=$* IFS=$ac_save_IFS case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac # The aliases save the names the user supplied, while $host etc. # will get canonicalized. test -n "$target_alias" && test "$program_prefix$program_suffix$program_transform_name" = \ NONENONEs,x,x, && program_prefix=${target_alias}- libprelude_major=1 libprelude_minor=0 libprelude_micro=0 libprelude_patchlevel= libprelude_version=$libprelude_major.$libprelude_minor.$libprelude_micro$libprelude_patchlevel libprelude_current=21 libprelude_revision=1 libprelude_age=19 LIBPRELUDE_SONAME=$libprelude_current:$libprelude_revision:$libprelude_age libpreludecpp_current=3 libpreludecpp_revision=0 libpreludecpp_age=3 LIBPRELUDECPP_SONAME=$libpreludecpp_current:$libpreludecpp_revision:$libpreludecpp_age am__api_version='1.11' # Find a good install program. We prefer a C program (faster), # so one script is as good as another. But avoid the broken or # incompatible versions: # SysV /etc/install, /usr/sbin/install # SunOS /usr/etc/install # IRIX /sbin/install # AIX /bin/install # AmigaOS /C/install, which installs bootblocks on floppy discs # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag # AFS /usr/afsws/bin/install, which mishandles nonexistent args # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" # OS/2's system install, which has a completely different semantic # ./install, which can be erroneously created by make from ./install.sh. # Reject install programs that cannot install multiple files. { $as_echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5 $as_echo_n "checking for a BSD-compatible install... " >&6; } if test -z "$INSTALL"; then if test "${ac_cv_path_install+set}" = set; then $as_echo_n "(cached) " >&6 else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. # Account for people who put trailing slashes in PATH elements. case $as_dir/ in ./ | .// | /cC/* | \ /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \ ?:\\/os2\\/install\\/* | ?:\\/OS2\\/INSTALL\\/* | \ /usr/ucb/* ) ;; *) # OSF1 and SCO ODT 3.0 have their own names for install. # Don't use installbsd from OSF since it installs stuff as root # by default. for ac_prog in ginstall scoinst install; do for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then if test $ac_prog = install && grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then # AIX install. It has an incompatible calling convention. : elif test $ac_prog = install && grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then # program-specific install script used by HP pwplus--don't use. : else rm -rf conftest.one conftest.two conftest.dir echo one > conftest.one echo two > conftest.two mkdir conftest.dir if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" && test -s conftest.one && test -s conftest.two && test -s conftest.dir/conftest.one && test -s conftest.dir/conftest.two then ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c" break 3 fi fi fi done done ;; esac done IFS=$as_save_IFS rm -rf conftest.one conftest.two conftest.dir fi if test "${ac_cv_path_install+set}" = set; then INSTALL=$ac_cv_path_install else # As a last resort, use the slow shell script. Don't cache a # value for INSTALL within a source directory, because that will # break other packages using the cache if that directory is # removed, or if the value is a relative name. INSTALL=$ac_install_sh fi fi { $as_echo "$as_me:$LINENO: result: $INSTALL" >&5 $as_echo "$INSTALL" >&6; } # Use test -z because SunOS4 sh mishandles braces in ${var-val}. # It thinks the first close brace ends the variable substitution. test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}' test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}' test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' { $as_echo "$as_me:$LINENO: checking whether build environment is sane" >&5 $as_echo_n "checking whether build environment is sane... " >&6; } # Just in case sleep 1 echo timestamp > conftest.file # Reject unsafe characters in $srcdir or the absolute working directory # name. Accept space and tab only in the latter. am_lf=' ' case `pwd` in *[\\\"\#\$\&\'\`$am_lf]*) { { $as_echo "$as_me:$LINENO: error: unsafe absolute working directory name" >&5 $as_echo "$as_me: error: unsafe absolute working directory name" >&2;} { (exit 1); exit 1; }; };; esac case $srcdir in *[\\\"\#\$\&\'\`$am_lf\ \ ]*) { { $as_echo "$as_me:$LINENO: error: unsafe srcdir value: \`$srcdir'" >&5 $as_echo "$as_me: error: unsafe srcdir value: \`$srcdir'" >&2;} { (exit 1); exit 1; }; };; esac # 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". { { $as_echo "$as_me:$LINENO: error: ls -t appears to fail. Make sure there is not a broken alias in your environment" >&5 $as_echo "$as_me: error: ls -t appears to fail. Make sure there is not a broken alias in your environment" >&2;} { (exit 1); exit 1; }; } fi test "$2" = conftest.file ) then # Ok. : else { { $as_echo "$as_me:$LINENO: error: newly created file is older than distributed files! Check your system clock" >&5 $as_echo "$as_me: error: newly created file is older than distributed files! Check your system clock" >&2;} { (exit 1); exit 1; }; } fi { $as_echo "$as_me:$LINENO: result: yes" >&5 $as_echo "yes" >&6; } test "$program_prefix" != NONE && program_transform_name="s&^&$program_prefix&;$program_transform_name" # Use a double $ so make ignores it. test "$program_suffix" != NONE && program_transform_name="s&\$&$program_suffix&;$program_transform_name" # Double any \ or $. # By default was `s,x,x', remove it if useless. ac_script='s/[\\$]/&&/g;s/;s,x,x,$//' program_transform_name=`$as_echo "$program_transform_name" | sed "$ac_script"` # expand $ac_aux_dir to an absolute path am_aux_dir=`cd $ac_aux_dir && pwd` if test x"${MISSING+set}" != xset; then case $am_aux_dir in *\ * | *\ *) MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;; *) MISSING="\${SHELL} $am_aux_dir/missing" ;; esac fi # Use eval to expand $SHELL if eval "$MISSING --run true"; then am_missing_run="$MISSING --run " else am_missing_run= { $as_echo "$as_me:$LINENO: WARNING: \`missing' script is too old or missing" >&5 $as_echo "$as_me: WARNING: \`missing' script is too old or missing" >&2;} fi if test x"${install_sh}" != xset; then case $am_aux_dir in *\ * | *\ *) install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;; *) install_sh="\${SHELL} $am_aux_dir/install-sh" esac fi # 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. if test "$cross_compiling" != no; then if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args. set dummy ${ac_tool_prefix}strip; ac_word=$2 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_STRIP+set}" = set; then $as_echo_n "(cached) " >&6 else if test -n "$STRIP"; then ac_cv_prog_STRIP="$STRIP" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_STRIP="${ac_tool_prefix}strip" $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi STRIP=$ac_cv_prog_STRIP if test -n "$STRIP"; then { $as_echo "$as_me:$LINENO: result: $STRIP" >&5 $as_echo "$STRIP" >&6; } else { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_STRIP"; then ac_ct_STRIP=$STRIP # Extract the first word of "strip", so it can be a program name with args. set dummy strip; ac_word=$2 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_STRIP"; then ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_STRIP="strip" $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP if test -n "$ac_ct_STRIP"; then { $as_echo "$as_me:$LINENO: result: $ac_ct_STRIP" >&5 $as_echo "$ac_ct_STRIP" >&6; } else { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_STRIP" = x; then STRIP=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac STRIP=$ac_ct_STRIP fi else STRIP="$ac_cv_prog_STRIP" fi fi INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" { $as_echo "$as_me:$LINENO: checking for a thread-safe mkdir -p" >&5 $as_echo_n "checking for a thread-safe mkdir -p... " >&6; } if test -z "$MKDIR_P"; then if test "${ac_cv_path_mkdir+set}" = set; then $as_echo_n "(cached) " >&6 else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_prog in mkdir gmkdir; do for ac_exec_ext in '' $ac_executable_extensions; do { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; } || continue case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #( 'mkdir (GNU coreutils) '* | \ 'mkdir (coreutils) '* | \ 'mkdir (fileutils) '4.1*) ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext break 3;; esac done done done IFS=$as_save_IFS fi if test "${ac_cv_path_mkdir+set}" = set; then MKDIR_P="$ac_cv_path_mkdir -p" else # As a last resort, use the slow shell script. Don't cache a # value for MKDIR_P within a source directory, because that will # break other packages using the cache if that directory is # removed, or if the value is a relative name. test -d ./--version && rmdir ./--version MKDIR_P="$ac_install_sh -d" fi fi { $as_echo "$as_me:$LINENO: result: $MKDIR_P" >&5 $as_echo "$MKDIR_P" >&6; } mkdir_p="$MKDIR_P" case $mkdir_p in [\\/$]* | ?:[\\/]*) ;; */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;; esac for ac_prog in gawk mawk nawk awk do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_AWK+set}" = set; then $as_echo_n "(cached) " >&6 else if test -n "$AWK"; then ac_cv_prog_AWK="$AWK" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_AWK="$ac_prog" $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi AWK=$ac_cv_prog_AWK if test -n "$AWK"; then { $as_echo "$as_me:$LINENO: result: $AWK" >&5 $as_echo "$AWK" >&6; } else { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } fi test -n "$AWK" && break done { $as_echo "$as_me:$LINENO: checking whether ${MAKE-make} sets \$(MAKE)" >&5 $as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; } set x ${MAKE-make} ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'` if { as_var=ac_cv_prog_make_${ac_make}_set; eval "test \"\${$as_var+set}\" = set"; }; then $as_echo_n "(cached) " >&6 else cat >conftest.make <<\_ACEOF SHELL = /bin/sh all: @echo '@@@%%%=$(MAKE)=@@@%%%' _ACEOF # GNU make sometimes prints "make[1]: Entering...", which would confuse us. case `${MAKE-make} -f conftest.make 2>/dev/null` in *@@@%%%=?*=@@@%%%*) eval ac_cv_prog_make_${ac_make}_set=yes;; *) eval ac_cv_prog_make_${ac_make}_set=no;; esac rm -f conftest.make fi if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then { $as_echo "$as_me:$LINENO: result: yes" >&5 $as_echo "yes" >&6; } SET_MAKE= else { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } SET_MAKE="MAKE=${MAKE-make}" fi 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 if test "`cd $srcdir && pwd`" != "`pwd`"; then # Use -I$(srcdir) only when $(srcdir) != ., so that make's output # is not polluted with repeated "-I." am__isrc=' -I$(srcdir)' # test to see if srcdir already configured if test -f $srcdir/config.status; then { { $as_echo "$as_me:$LINENO: error: source directory already configured; run \"make distclean\" there first" >&5 $as_echo "$as_me: error: source directory already configured; run \"make distclean\" there first" >&2;} { (exit 1); exit 1; }; } fi 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 # Define the identity of the package. PACKAGE=libprelude VERSION=$libprelude_version cat >>confdefs.h <<_ACEOF #define PACKAGE "$PACKAGE" _ACEOF cat >>confdefs.h <<_ACEOF #define VERSION "$VERSION" _ACEOF # Some tools Automake needs. ACLOCAL=${ACLOCAL-"${am_missing_run}aclocal-${am__api_version}"} AUTOCONF=${AUTOCONF-"${am_missing_run}autoconf"} AUTOMAKE=${AUTOMAKE-"${am_missing_run}automake-${am__api_version}"} AUTOHEADER=${AUTOHEADER-"${am_missing_run}autoheader"} MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"} # We need awk for the "check" target. The system "awk" is bad on # some platforms. # Always define AMTAR for backward compatibility. AMTAR=${AMTAR-"${am_missing_run}tar"} am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -' ac_config_headers="$ac_config_headers config.h" { $as_echo "$as_me:$LINENO: checking whether to enable maintainer-specific portions of Makefiles" >&5 $as_echo_n "checking whether to enable maintainer-specific portions of Makefiles... " >&6; } # Check whether --enable-maintainer-mode was given. if test "${enable_maintainer_mode+set}" = set; then enableval=$enable_maintainer_mode; USE_MAINTAINER_MODE=$enableval else USE_MAINTAINER_MODE=no fi { $as_echo "$as_me:$LINENO: result: $USE_MAINTAINER_MODE" >&5 $as_echo "$USE_MAINTAINER_MODE" >&6; } if test $USE_MAINTAINER_MODE = yes; then MAINTAINER_MODE_TRUE= MAINTAINER_MODE_FALSE='#' else MAINTAINER_MODE_TRUE='#' MAINTAINER_MODE_FALSE= fi MAINT=$MAINTAINER_MODE_TRUE ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args. set dummy ${ac_tool_prefix}gcc; ac_word=$2 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_CC+set}" = set; then $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_CC="${ac_tool_prefix}gcc" $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { $as_echo "$as_me:$LINENO: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_CC"; then ac_ct_CC=$CC # Extract the first word of "gcc", so it can be a program name with args. set dummy gcc; ac_word=$2 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_ac_ct_CC+set}" = set; then $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_CC="gcc" $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then { $as_echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 $as_echo "$ac_ct_CC" >&6; } else { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_CC" = x; then CC="" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac CC=$ac_ct_CC fi else CC="$ac_cv_prog_CC" fi if test -z "$CC"; then if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args. set dummy ${ac_tool_prefix}cc; ac_word=$2 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_CC+set}" = set; then $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_CC="${ac_tool_prefix}cc" $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { $as_echo "$as_me:$LINENO: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } fi fi fi if test -z "$CC"; then # Extract the first word of "cc", so it can be a program name with args. set dummy cc; ac_word=$2 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_CC+set}" = set; then $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else ac_prog_rejected=no as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then ac_prog_rejected=yes continue fi ac_cv_prog_CC="cc" $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS if test $ac_prog_rejected = yes; then # We found a bogon in the path, so make sure we never use it. set dummy $ac_cv_prog_CC shift if test $# != 0; then # We chose a different compiler from the bogus one. # However, it has the same basename, so the bogon will be chosen # first if we set CC to just the basename; use the full file name. shift ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@" fi fi fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { $as_echo "$as_me:$LINENO: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$CC"; then if test -n "$ac_tool_prefix"; then for ac_prog in cl.exe do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_CC+set}" = set; then $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_CC="$ac_tool_prefix$ac_prog" $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { $as_echo "$as_me:$LINENO: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } fi test -n "$CC" && break done fi if test -z "$CC"; then ac_ct_CC=$CC for ac_prog in cl.exe do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_ac_ct_CC+set}" = set; then $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_CC="$ac_prog" $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then { $as_echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 $as_echo "$ac_ct_CC" >&6; } else { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } fi test -n "$ac_ct_CC" && break done if test "x$ac_ct_CC" = x; then CC="" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac CC=$ac_ct_CC fi fi fi test -z "$CC" && { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} { { $as_echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH See \`config.log' for more details." >&5 $as_echo "$as_me: error: no acceptable C compiler found in \$PATH See \`config.log' for more details." >&2;} { (exit 1); exit 1; }; }; } # Provide some information about the compiler. $as_echo "$as_me:$LINENO: checking for C compiler version" >&5 set X $ac_compile ac_compiler=$2 { (ac_try="$ac_compiler --version >&5" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compiler --version >&5") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } { (ac_try="$ac_compiler -v >&5" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compiler -v >&5") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } { (ac_try="$ac_compiler -V >&5" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compiler -V >&5") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { ; return 0; } _ACEOF ac_clean_files_save=$ac_clean_files ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out" # Try to create an executable without -o first, disregard a.out. # It will help us diagnose broken compilers, and finding out an intuition # of exeext. { $as_echo "$as_me:$LINENO: checking for C compiler default output file name" >&5 $as_echo_n "checking for C compiler default output file name... " >&6; } ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'` # The possible output files: ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*" ac_rmfiles= for ac_file in $ac_files do case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; * ) ac_rmfiles="$ac_rmfiles $ac_file";; esac done rm -f $ac_rmfiles if { (ac_try="$ac_link_default" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link_default") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then # Autoconf-2.13 could set the ac_cv_exeext variable to `no'. # So ignore a value of `no', otherwise this would lead to `EXEEXT = no' # in a Makefile. We should not override ac_cv_exeext if it was cached, # so that the user can short-circuit this test for compilers unknown to # Autoconf. for ac_file in $ac_files '' do test -f "$ac_file" || continue case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; [ab].out ) # We found the default executable, but exeext='' is most # certainly right. break;; *.* ) if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no; then :; else ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` fi # We set ac_cv_exeext here because the later test for it is not # safe: cross compilers may not add the suffix if given an `-o' # argument, so we may need to know it at that point already. # Even if this section looks crufty: it has the advantage of # actually working. break;; * ) break;; esac done test "$ac_cv_exeext" = no && ac_cv_exeext= else ac_file='' fi { $as_echo "$as_me:$LINENO: result: $ac_file" >&5 $as_echo "$ac_file" >&6; } if test -z "$ac_file"; then $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} { { $as_echo "$as_me:$LINENO: error: C compiler cannot create executables See \`config.log' for more details." >&5 $as_echo "$as_me: error: C compiler cannot create executables See \`config.log' for more details." >&2;} { (exit 77); exit 77; }; }; } fi ac_exeext=$ac_cv_exeext # Check that the compiler produces executables we can run. If not, either # the compiler is broken, or we cross compile. { $as_echo "$as_me:$LINENO: checking whether the C compiler works" >&5 $as_echo_n "checking whether the C compiler works... " >&6; } # FIXME: These cross compiler hacks should be removed for Autoconf 3.0 # If not cross compiling, check that we can run a simple program. if test "$cross_compiling" != yes; then if { ac_try='./$ac_file' { (case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_try") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then cross_compiling=no else if test "$cross_compiling" = maybe; then cross_compiling=yes else { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} { { $as_echo "$as_me:$LINENO: error: cannot run C compiled programs. If you meant to cross compile, use \`--host'. See \`config.log' for more details." >&5 $as_echo "$as_me: error: cannot run C compiled programs. If you meant to cross compile, use \`--host'. See \`config.log' for more details." >&2;} { (exit 1); exit 1; }; }; } fi fi fi { $as_echo "$as_me:$LINENO: result: yes" >&5 $as_echo "yes" >&6; } rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out ac_clean_files=$ac_clean_files_save # Check that the compiler produces executables we can run. If not, either # the compiler is broken, or we cross compile. { $as_echo "$as_me:$LINENO: checking whether we are cross compiling" >&5 $as_echo_n "checking whether we are cross compiling... " >&6; } { $as_echo "$as_me:$LINENO: result: $cross_compiling" >&5 $as_echo "$cross_compiling" >&6; } { $as_echo "$as_me:$LINENO: checking for suffix of executables" >&5 $as_echo_n "checking for suffix of executables... " >&6; } if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then # If both `conftest.exe' and `conftest' are `present' (well, observable) # catch `conftest.exe'. For instance with Cygwin, `ls conftest' will # work properly (i.e., refer to `conftest.exe'), while it won't with # `rm'. for ac_file in conftest.exe conftest conftest.*; do test -f "$ac_file" || continue case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` break;; * ) break;; esac done else { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} { { $as_echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link See \`config.log' for more details." >&5 $as_echo "$as_me: error: cannot compute suffix of executables: cannot compile and link See \`config.log' for more details." >&2;} { (exit 1); exit 1; }; }; } fi rm -f conftest$ac_cv_exeext { $as_echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5 $as_echo "$ac_cv_exeext" >&6; } rm -f conftest.$ac_ext EXEEXT=$ac_cv_exeext ac_exeext=$EXEEXT { $as_echo "$as_me:$LINENO: checking for suffix of object files" >&5 $as_echo_n "checking for suffix of object files... " >&6; } if test "${ac_cv_objext+set}" = set; then $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { ; return 0; } _ACEOF rm -f conftest.o conftest.obj if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then for ac_file in conftest.o conftest.obj conftest.*; do test -f "$ac_file" || continue; case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;; *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'` break;; esac done else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} { { $as_echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile See \`config.log' for more details." >&5 $as_echo "$as_me: error: cannot compute suffix of object files: cannot compile See \`config.log' for more details." >&2;} { (exit 1); exit 1; }; }; } fi rm -f conftest.$ac_cv_objext conftest.$ac_ext fi { $as_echo "$as_me:$LINENO: result: $ac_cv_objext" >&5 $as_echo "$ac_cv_objext" >&6; } OBJEXT=$ac_cv_objext ac_objext=$OBJEXT { $as_echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5 $as_echo_n "checking whether we are using the GNU C compiler... " >&6; } if test "${ac_cv_c_compiler_gnu+set}" = set; then $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { #ifndef __GNUC__ choke me #endif ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_compiler_gnu=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_compiler_gnu=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_cv_c_compiler_gnu=$ac_compiler_gnu fi { $as_echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5 $as_echo "$ac_cv_c_compiler_gnu" >&6; } if test $ac_compiler_gnu = yes; then GCC=yes else GCC= fi ac_test_CFLAGS=${CFLAGS+set} ac_save_CFLAGS=$CFLAGS { $as_echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5 $as_echo_n "checking whether $CC accepts -g... " >&6; } if test "${ac_cv_prog_cc_g+set}" = set; then $as_echo_n "(cached) " >&6 else ac_save_c_werror_flag=$ac_c_werror_flag ac_c_werror_flag=yes ac_cv_prog_cc_g=no CFLAGS="-g" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_cv_prog_cc_g=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 CFLAGS="" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then : else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_c_werror_flag=$ac_save_c_werror_flag CFLAGS="-g" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_cv_prog_cc_g=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_c_werror_flag=$ac_save_c_werror_flag fi { $as_echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5 $as_echo "$ac_cv_prog_cc_g" >&6; } if test "$ac_test_CFLAGS" = set; then CFLAGS=$ac_save_CFLAGS elif test $ac_cv_prog_cc_g = yes; then if test "$GCC" = yes; then CFLAGS="-g -O2" else CFLAGS="-g" fi else if test "$GCC" = yes; then CFLAGS="-O2" else CFLAGS= fi fi { $as_echo "$as_me:$LINENO: checking for $CC option to accept ISO C89" >&5 $as_echo_n "checking for $CC option to accept ISO C89... " >&6; } if test "${ac_cv_prog_cc_c89+set}" = set; then $as_echo_n "(cached) " >&6 else ac_cv_prog_cc_c89=no ac_save_CC=$CC cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #include #include #include /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */ struct buf { int x; }; FILE * (*rcsopen) (struct buf *, struct stat *, int); static char *e (p, i) char **p; int i; { return p[i]; } static char *f (char * (*g) (char **, int), char **p, ...) { char *s; va_list v; va_start (v,p); s = g (p, va_arg (v,int)); va_end (v); return s; } /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has function prototypes and stuff, but not '\xHH' hex character constants. These don't provoke an error unfortunately, instead are silently treated as 'x'. The following induces an error, until -std is added to get proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an array size at least. It's necessary to write '\x00'==0 to get something that's true only with -std. */ int osf4_cc_array ['\x00' == 0 ? 1 : -1]; /* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters inside strings and character constants. */ #define FOO(x) 'x' int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1]; int test (int i, double x); struct s1 {int (*f) (int a);}; struct s2 {int (*f) (double a);}; int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int); int argc; char **argv; int main () { return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]; ; return 0; } _ACEOF for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \ -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" do CC="$ac_save_CC $ac_arg" rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_cv_prog_cc_c89=$ac_arg else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f core conftest.err conftest.$ac_objext test "x$ac_cv_prog_cc_c89" != "xno" && break done rm -f conftest.$ac_ext CC=$ac_save_CC fi # AC_CACHE_VAL case "x$ac_cv_prog_cc_c89" in x) { $as_echo "$as_me:$LINENO: result: none needed" >&5 $as_echo "none needed" >&6; } ;; xno) { $as_echo "$as_me:$LINENO: result: unsupported" >&5 $as_echo "unsupported" >&6; } ;; *) CC="$CC $ac_cv_prog_cc_c89" { $as_echo "$as_me:$LINENO: result: $ac_cv_prog_cc_c89" >&5 $as_echo "$ac_cv_prog_cc_c89" >&6; } ;; esac ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu DEPDIR="${am__leading_dot}deps" ac_config_commands="$ac_config_commands depfiles" am_make=${MAKE-make} cat > confinc << 'END' am__doit: @echo this is the am__doit target .PHONY: am__doit END # If we don't find an include directive, just comment out the code. { $as_echo "$as_me:$LINENO: checking for style of include used by $am_make" >&5 $as_echo_n "checking for style of include used by $am_make... " >&6; } am__include="#" am__quote= _am_result=none # First try GNU make style include. echo "include confinc" > confmf # Ignore all kinds of additional output from `make'. case `$am_make -s -f confmf 2> /dev/null` in #( *the\ am__doit\ target*) am__include=include am__quote= _am_result=GNU ;; esac # Now try BSD make style include. if test "$am__include" = "#"; then echo '.include "confinc"' > confmf case `$am_make -s -f confmf 2> /dev/null` in #( *the\ am__doit\ target*) am__include=.include am__quote="\"" _am_result=BSD ;; esac fi { $as_echo "$as_me:$LINENO: result: $_am_result" >&5 $as_echo "$_am_result" >&6; } rm -f confinc confmf # Check whether --enable-dependency-tracking was given. if test "${enable_dependency_tracking+set}" = set; then enableval=$enable_dependency_tracking; fi if test "x$enable_dependency_tracking" != xno; then am_depcomp="$ac_aux_dir/depcomp" AMDEPBACKSLASH='\' fi if test "x$enable_dependency_tracking" != xno; then AMDEP_TRUE= AMDEP_FALSE='#' else AMDEP_TRUE='#' AMDEP_FALSE= fi depcc="$CC" am_compiler_list= { $as_echo "$as_me:$LINENO: checking dependency style of $depcc" >&5 $as_echo_n "checking dependency style of $depcc... " >&6; } if test "${am_cv_CC_dependencies_compiler_type+set}" = set; then $as_echo_n "(cached) " >&6 else 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_CC_dependencies_compiler_type=none if test "$am_compiler_list" = ""; then am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp` fi am__universal=false case " $depcc " in #( *\ -arch\ *\ -arch\ *) am__universal=true ;; esac 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 # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with # Solaris 8's {/usr,}/bin/sh. touch sub/conftst$i.h done echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf # 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. Also, some Intel # versions had trouble with output in subdirs am__obj=sub/conftest.${OBJEXT-o} am__minus_obj="-o $am__obj" case $depmode in gcc) # This depmode causes a compiler race in universal mode. test "$am__universal" = false || continue ;; 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 ;; msvisualcpp | msvcmsys) # This compiler won't grok `-c -o', but also, the minuso test has # not run yet. These depmodes are late enough in the game, and # so weak that their functioning should not be impacted. am__obj=conftest.${OBJEXT-o} am__minus_obj= ;; none) break ;; esac if depmode=$depmode \ source=sub/conftest.c object=$am__obj \ depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ >/dev/null 2>conftest.err && grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && grep $am__obj 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 # or remarks (even with -Werror). So we grep stderr for any message # that says an option was ignored or not supported. # When given -MP, icc 7.0 and 7.1 complain thusly: # icc: Command line warning: ignoring option '-M'; no argument required # The diagnosis changed in icc 8.0: # icc: Command line remark: option '-MP' not supported if (grep 'ignoring option' conftest.err || grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else am_cv_CC_dependencies_compiler_type=$depmode break fi fi done cd .. rm -rf conftest.dir else am_cv_CC_dependencies_compiler_type=none fi fi { $as_echo "$as_me:$LINENO: result: $am_cv_CC_dependencies_compiler_type" >&5 $as_echo "$am_cv_CC_dependencies_compiler_type" >&6; } CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type if test "x$enable_dependency_tracking" != xno \ && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then am__fastdepCC_TRUE= am__fastdepCC_FALSE='#' else am__fastdepCC_TRUE='#' am__fastdepCC_FALSE= fi ac_ext=cpp ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_cxx_compiler_gnu if test -z "$CXX"; then if test -n "$CCC"; then CXX=$CCC else if test -n "$ac_tool_prefix"; then for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_CXX+set}" = set; then $as_echo_n "(cached) " >&6 else if test -n "$CXX"; then ac_cv_prog_CXX="$CXX" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_CXX="$ac_tool_prefix$ac_prog" $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi CXX=$ac_cv_prog_CXX if test -n "$CXX"; then { $as_echo "$as_me:$LINENO: result: $CXX" >&5 $as_echo "$CXX" >&6; } else { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } fi test -n "$CXX" && break done fi if test -z "$CXX"; then ac_ct_CXX=$CXX for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_ac_ct_CXX+set}" = set; then $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_CXX"; then ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_CXX="$ac_prog" $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_CXX=$ac_cv_prog_ac_ct_CXX if test -n "$ac_ct_CXX"; then { $as_echo "$as_me:$LINENO: result: $ac_ct_CXX" >&5 $as_echo "$ac_ct_CXX" >&6; } else { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } fi test -n "$ac_ct_CXX" && break done if test "x$ac_ct_CXX" = x; then CXX="g++" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac CXX=$ac_ct_CXX fi fi fi fi # Provide some information about the compiler. $as_echo "$as_me:$LINENO: checking for C++ compiler version" >&5 set X $ac_compile ac_compiler=$2 { (ac_try="$ac_compiler --version >&5" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compiler --version >&5") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } { (ac_try="$ac_compiler -v >&5" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compiler -v >&5") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } { (ac_try="$ac_compiler -V >&5" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compiler -V >&5") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } { $as_echo "$as_me:$LINENO: checking whether we are using the GNU C++ compiler" >&5 $as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; } if test "${ac_cv_cxx_compiler_gnu+set}" = set; then $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { #ifndef __GNUC__ choke me #endif ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_cxx_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_compiler_gnu=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_compiler_gnu=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_cv_cxx_compiler_gnu=$ac_compiler_gnu fi { $as_echo "$as_me:$LINENO: result: $ac_cv_cxx_compiler_gnu" >&5 $as_echo "$ac_cv_cxx_compiler_gnu" >&6; } if test $ac_compiler_gnu = yes; then GXX=yes else GXX= fi ac_test_CXXFLAGS=${CXXFLAGS+set} ac_save_CXXFLAGS=$CXXFLAGS { $as_echo "$as_me:$LINENO: checking whether $CXX accepts -g" >&5 $as_echo_n "checking whether $CXX accepts -g... " >&6; } if test "${ac_cv_prog_cxx_g+set}" = set; then $as_echo_n "(cached) " >&6 else ac_save_cxx_werror_flag=$ac_cxx_werror_flag ac_cxx_werror_flag=yes ac_cv_prog_cxx_g=no CXXFLAGS="-g" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_cxx_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_cv_prog_cxx_g=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 CXXFLAGS="" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_cxx_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then : else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cxx_werror_flag=$ac_save_cxx_werror_flag CXXFLAGS="-g" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_cxx_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_cv_prog_cxx_g=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_cxx_werror_flag=$ac_save_cxx_werror_flag fi { $as_echo "$as_me:$LINENO: result: $ac_cv_prog_cxx_g" >&5 $as_echo "$ac_cv_prog_cxx_g" >&6; } if test "$ac_test_CXXFLAGS" = set; then CXXFLAGS=$ac_save_CXXFLAGS elif test $ac_cv_prog_cxx_g = yes; then if test "$GXX" = yes; then CXXFLAGS="-g -O2" else CXXFLAGS="-g" fi else if test "$GXX" = yes; then CXXFLAGS="-O2" else CXXFLAGS= fi fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu depcc="$CXX" am_compiler_list= { $as_echo "$as_me:$LINENO: checking dependency style of $depcc" >&5 $as_echo_n "checking dependency style of $depcc... " >&6; } if test "${am_cv_CXX_dependencies_compiler_type+set}" = set; then $as_echo_n "(cached) " >&6 else 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_CXX_dependencies_compiler_type=none if test "$am_compiler_list" = ""; then am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp` fi am__universal=false case " $depcc " in #( *\ -arch\ *\ -arch\ *) am__universal=true ;; esac 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 # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with # Solaris 8's {/usr,}/bin/sh. touch sub/conftst$i.h done echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf # 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. Also, some Intel # versions had trouble with output in subdirs am__obj=sub/conftest.${OBJEXT-o} am__minus_obj="-o $am__obj" case $depmode in gcc) # This depmode causes a compiler race in universal mode. test "$am__universal" = false || continue ;; 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 ;; msvisualcpp | msvcmsys) # This compiler won't grok `-c -o', but also, the minuso test has # not run yet. These depmodes are late enough in the game, and # so weak that their functioning should not be impacted. am__obj=conftest.${OBJEXT-o} am__minus_obj= ;; none) break ;; esac if depmode=$depmode \ source=sub/conftest.c object=$am__obj \ depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ >/dev/null 2>conftest.err && grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && grep $am__obj 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 # or remarks (even with -Werror). So we grep stderr for any message # that says an option was ignored or not supported. # When given -MP, icc 7.0 and 7.1 complain thusly: # icc: Command line warning: ignoring option '-M'; no argument required # The diagnosis changed in icc 8.0: # icc: Command line remark: option '-MP' not supported if (grep 'ignoring option' conftest.err || grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else am_cv_CXX_dependencies_compiler_type=$depmode break fi fi done cd .. rm -rf conftest.dir else am_cv_CXX_dependencies_compiler_type=none fi fi { $as_echo "$as_me:$LINENO: result: $am_cv_CXX_dependencies_compiler_type" >&5 $as_echo "$am_cv_CXX_dependencies_compiler_type" >&6; } CXXDEPMODE=depmode=$am_cv_CXX_dependencies_compiler_type if test "x$enable_dependency_tracking" != xno \ && test "$am_cv_CXX_dependencies_compiler_type" = gcc3; then am__fastdepCXX_TRUE= am__fastdepCXX_FALSE='#' else am__fastdepCXX_TRUE='#' am__fastdepCXX_FALSE= fi # Find a good install program. We prefer a C program (faster), # so one script is as good as another. But avoid the broken or # incompatible versions: # SysV /etc/install, /usr/sbin/install # SunOS /usr/etc/install # IRIX /sbin/install # AIX /bin/install # AmigaOS /C/install, which installs bootblocks on floppy discs # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag # AFS /usr/afsws/bin/install, which mishandles nonexistent args # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" # OS/2's system install, which has a completely different semantic # ./install, which can be erroneously created by make from ./install.sh. # Reject install programs that cannot install multiple files. { $as_echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5 $as_echo_n "checking for a BSD-compatible install... " >&6; } if test -z "$INSTALL"; then if test "${ac_cv_path_install+set}" = set; then $as_echo_n "(cached) " >&6 else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. # Account for people who put trailing slashes in PATH elements. case $as_dir/ in ./ | .// | /cC/* | \ /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \ ?:\\/os2\\/install\\/* | ?:\\/OS2\\/INSTALL\\/* | \ /usr/ucb/* ) ;; *) # OSF1 and SCO ODT 3.0 have their own names for install. # Don't use installbsd from OSF since it installs stuff as root # by default. for ac_prog in ginstall scoinst install; do for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then if test $ac_prog = install && grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then # AIX install. It has an incompatible calling convention. : elif test $ac_prog = install && grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then # program-specific install script used by HP pwplus--don't use. : else rm -rf conftest.one conftest.two conftest.dir echo one > conftest.one echo two > conftest.two mkdir conftest.dir if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" && test -s conftest.one && test -s conftest.two && test -s conftest.dir/conftest.one && test -s conftest.dir/conftest.two then ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c" break 3 fi fi fi done done ;; esac done IFS=$as_save_IFS rm -rf conftest.one conftest.two conftest.dir fi if test "${ac_cv_path_install+set}" = set; then INSTALL=$ac_cv_path_install else # As a last resort, use the slow shell script. Don't cache a # value for INSTALL within a source directory, because that will # break other packages using the cache if that directory is # removed, or if the value is a relative name. INSTALL=$ac_install_sh fi fi { $as_echo "$as_me:$LINENO: result: $INSTALL" >&5 $as_echo "$INSTALL" >&6; } # Use test -z because SunOS4 sh mishandles braces in ${var-val}. # It thinks the first close brace ends the variable substitution. test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}' test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}' test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' { $as_echo "$as_me:$LINENO: checking whether ${MAKE-make} sets \$(MAKE)" >&5 $as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; } set x ${MAKE-make} ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'` if { as_var=ac_cv_prog_make_${ac_make}_set; eval "test \"\${$as_var+set}\" = set"; }; then $as_echo_n "(cached) " >&6 else cat >conftest.make <<\_ACEOF SHELL = /bin/sh all: @echo '@@@%%%=$(MAKE)=@@@%%%' _ACEOF # GNU make sometimes prints "make[1]: Entering...", which would confuse us. case `${MAKE-make} -f conftest.make 2>/dev/null` in *@@@%%%=?*=@@@%%%*) eval ac_cv_prog_make_${ac_make}_set=yes;; *) eval ac_cv_prog_make_${ac_make}_set=no;; esac rm -f conftest.make fi if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then { $as_echo "$as_me:$LINENO: result: yes" >&5 $as_echo "yes" >&6; } SET_MAKE= else { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } SET_MAKE="MAKE=${MAKE-make}" fi for ac_prog in flex lex do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_LEX+set}" = set; then $as_echo_n "(cached) " >&6 else if test -n "$LEX"; then ac_cv_prog_LEX="$LEX" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_LEX="$ac_prog" $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi LEX=$ac_cv_prog_LEX if test -n "$LEX"; then { $as_echo "$as_me:$LINENO: result: $LEX" >&5 $as_echo "$LEX" >&6; } else { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } fi test -n "$LEX" && break done test -n "$LEX" || LEX=":" if test "x$LEX" != "x:"; then cat >conftest.l <<_ACEOF %% a { ECHO; } b { REJECT; } c { yymore (); } d { yyless (1); } e { yyless (input () != 0); } f { unput (yytext[0]); } . { BEGIN INITIAL; } %% #ifdef YYTEXT_POINTER extern char *yytext; #endif int main (void) { return ! yylex () + ! yywrap (); } _ACEOF { (ac_try="$LEX conftest.l" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$LEX conftest.l") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } { $as_echo "$as_me:$LINENO: checking lex output file root" >&5 $as_echo_n "checking lex output file root... " >&6; } if test "${ac_cv_prog_lex_root+set}" = set; then $as_echo_n "(cached) " >&6 else if test -f lex.yy.c; then ac_cv_prog_lex_root=lex.yy elif test -f lexyy.c; then ac_cv_prog_lex_root=lexyy else { { $as_echo "$as_me:$LINENO: error: cannot find output from $LEX; giving up" >&5 $as_echo "$as_me: error: cannot find output from $LEX; giving up" >&2;} { (exit 1); exit 1; }; } fi fi { $as_echo "$as_me:$LINENO: result: $ac_cv_prog_lex_root" >&5 $as_echo "$ac_cv_prog_lex_root" >&6; } LEX_OUTPUT_ROOT=$ac_cv_prog_lex_root if test -z "${LEXLIB+set}"; then { $as_echo "$as_me:$LINENO: checking lex library" >&5 $as_echo_n "checking lex library... " >&6; } if test "${ac_cv_lib_lex+set}" = set; then $as_echo_n "(cached) " >&6 else ac_save_LIBS=$LIBS ac_cv_lib_lex='none needed' for ac_lib in '' -lfl -ll; do LIBS="$ac_lib $ac_save_LIBS" cat >conftest.$ac_ext <<_ACEOF `cat $LEX_OUTPUT_ROOT.c` _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || $as_test_x conftest$ac_exeext }; then ac_cv_lib_lex=$ac_lib else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext test "$ac_cv_lib_lex" != 'none needed' && break done LIBS=$ac_save_LIBS fi { $as_echo "$as_me:$LINENO: result: $ac_cv_lib_lex" >&5 $as_echo "$ac_cv_lib_lex" >&6; } test "$ac_cv_lib_lex" != 'none needed' && LEXLIB=$ac_cv_lib_lex fi { $as_echo "$as_me:$LINENO: checking whether yytext is a pointer" >&5 $as_echo_n "checking whether yytext is a pointer... " >&6; } if test "${ac_cv_prog_lex_yytext_pointer+set}" = set; then $as_echo_n "(cached) " >&6 else # POSIX says lex can declare yytext either as a pointer or an array; the # default is implementation-dependent. Figure out which it is, since # not all implementations provide the %pointer and %array declarations. ac_cv_prog_lex_yytext_pointer=no ac_save_LIBS=$LIBS LIBS="$LEXLIB $ac_save_LIBS" cat >conftest.$ac_ext <<_ACEOF #define YYTEXT_POINTER 1 `cat $LEX_OUTPUT_ROOT.c` _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || $as_test_x conftest$ac_exeext }; then ac_cv_prog_lex_yytext_pointer=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_save_LIBS fi { $as_echo "$as_me:$LINENO: result: $ac_cv_prog_lex_yytext_pointer" >&5 $as_echo "$ac_cv_prog_lex_yytext_pointer" >&6; } if test $ac_cv_prog_lex_yytext_pointer = yes; then cat >>confdefs.h <<\_ACEOF #define YYTEXT_POINTER 1 _ACEOF fi rm -f conftest.l $LEX_OUTPUT_ROOT.c fi if test "$LEX" = :; then LEX=${am_missing_run}flex fi for ac_prog in 'bison -y' byacc do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_YACC+set}" = set; then $as_echo_n "(cached) " >&6 else if test -n "$YACC"; then ac_cv_prog_YACC="$YACC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_YACC="$ac_prog" $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi YACC=$ac_cv_prog_YACC if test -n "$YACC"; then { $as_echo "$as_me:$LINENO: result: $YACC" >&5 $as_echo "$YACC" >&6; } else { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } fi test -n "$YACC" && break done test -n "$YACC" || YACC="yacc" # Extract the first word of "grep", so it can be a program name with args. set dummy grep; ac_word=$2 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_path_GREP+set}" = set; then $as_echo_n "(cached) " >&6 else case $GREP in [\\/]* | ?:[\\/]*) ac_cv_path_GREP="$GREP" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_path_GREP="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS test -z "$ac_cv_path_GREP" && ac_cv_path_GREP="no" ;; esac fi GREP=$ac_cv_path_GREP if test -n "$GREP"; then { $as_echo "$as_me:$LINENO: result: $GREP" >&5 $as_echo "$GREP" >&6; } else { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } fi # for prelude-config.h generation BINDINGS_CC="$CC" if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args. set dummy ${ac_tool_prefix}ranlib; ac_word=$2 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_RANLIB+set}" = set; then $as_echo_n "(cached) " >&6 else if test -n "$RANLIB"; then ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib" $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi RANLIB=$ac_cv_prog_RANLIB if test -n "$RANLIB"; then { $as_echo "$as_me:$LINENO: result: $RANLIB" >&5 $as_echo "$RANLIB" >&6; } else { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_RANLIB"; then ac_ct_RANLIB=$RANLIB # Extract the first word of "ranlib", so it can be a program name with args. set dummy ranlib; ac_word=$2 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_RANLIB"; then ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_RANLIB="ranlib" $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB if test -n "$ac_ct_RANLIB"; then { $as_echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5 $as_echo "$ac_ct_RANLIB" >&6; } else { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_RANLIB" = x; then RANLIB=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac RANLIB=$ac_ct_RANLIB fi else RANLIB="$ac_cv_prog_RANLIB" fi if test "x$CC" != xcc; then { $as_echo "$as_me:$LINENO: checking whether $CC and cc understand -c and -o together" >&5 $as_echo_n "checking whether $CC and cc understand -c and -o together... " >&6; } else { $as_echo "$as_me:$LINENO: checking whether cc understands -c and -o together" >&5 $as_echo_n "checking whether cc understands -c and -o together... " >&6; } fi set dummy $CC; ac_cc=`$as_echo "$2" | sed 's/[^a-zA-Z0-9_]/_/g;s/^[0-9]/_/'` if { as_var=ac_cv_prog_cc_${ac_cc}_c_o; eval "test \"\${$as_var+set}\" = set"; }; then $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { ; return 0; } _ACEOF # Make sure it works both with $CC and with simple cc. # We do the test twice because some compilers refuse to overwrite an # existing .o file with -o, though they will create one. ac_try='$CC -c conftest.$ac_ext -o conftest2.$ac_objext >&5' rm -f conftest2.* if { (case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_try") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && test -f conftest2.$ac_objext && { (case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_try") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then eval ac_cv_prog_cc_${ac_cc}_c_o=yes if test "x$CC" != xcc; then # Test first that cc exists at all. if { ac_try='cc -c conftest.$ac_ext >&5' { (case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_try") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_try='cc -c conftest.$ac_ext -o conftest2.$ac_objext >&5' rm -f conftest2.* if { (case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_try") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && test -f conftest2.$ac_objext && { (case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_try") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then # cc works too. : else # cc exists but doesn't like -o. eval ac_cv_prog_cc_${ac_cc}_c_o=no fi fi fi else eval ac_cv_prog_cc_${ac_cc}_c_o=no fi rm -f core conftest* fi if eval test \$ac_cv_prog_cc_${ac_cc}_c_o = yes; then { $as_echo "$as_me:$LINENO: result: yes" >&5 $as_echo "yes" >&6; } else { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } cat >>confdefs.h <<\_ACEOF #define NO_MINUS_C_MINUS_O 1 _ACEOF fi # FIXME: we rely on the cache variable name because # there is no other way. set dummy $CC am_cc=`echo $2 | sed 's/[^a-zA-Z0-9_]/_/g;s/^[0-9]/_/'` eval am_t=\$ac_cv_prog_cc_${am_cc}_c_o if test "$am_t" != yes; then # Losing compiler, so override with the script. # FIXME: It is wrong to rewrite CC. # But if we don't then we get into trouble of one sort or another. # A longer-term fix would be to have automake use am__CC in this case, # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)" CC="$am_aux_dir/compile $CC" fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu { $as_echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5 $as_echo_n "checking how to run the C preprocessor... " >&6; } # On Suns, sometimes $CPP names a directory. if test -n "$CPP" && test -d "$CPP"; then CPP= fi if test -z "$CPP"; then if test "${ac_cv_prog_CPP+set}" = set; then $as_echo_n "(cached) " >&6 else # Double quotes because CPP needs to be expanded for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp" do ac_preproc_ok=false for ac_c_preproc_warn_flag in '' yes do # Use a header file that comes with gcc, so configuring glibc # with a fresh cross-compiler works. # Prefer to if __STDC__ is defined, since # exists even on freestanding compilers. # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. "Syntax error" is here to catch this case. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #ifdef __STDC__ # include #else # include #endif Syntax error _ACEOF if { (ac_try="$ac_cpp conftest.$ac_ext" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null && { test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || test ! -s conftest.err }; then : else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 # Broken: fails on valid input. continue fi rm -f conftest.err conftest.$ac_ext # OK, works on sane cases. Now check whether nonexistent headers # can be detected and how. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF if { (ac_try="$ac_cpp conftest.$ac_ext" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null && { test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || test ! -s conftest.err }; then # Broken: success on invalid input. continue else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 # Passes both tests. ac_preproc_ok=: break fi rm -f conftest.err conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. rm -f conftest.err conftest.$ac_ext if $ac_preproc_ok; then break fi done ac_cv_prog_CPP=$CPP fi CPP=$ac_cv_prog_CPP else ac_cv_prog_CPP=$CPP fi { $as_echo "$as_me:$LINENO: result: $CPP" >&5 $as_echo "$CPP" >&6; } ac_preproc_ok=false for ac_c_preproc_warn_flag in '' yes do # Use a header file that comes with gcc, so configuring glibc # with a fresh cross-compiler works. # Prefer to if __STDC__ is defined, since # exists even on freestanding compilers. # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. "Syntax error" is here to catch this case. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #ifdef __STDC__ # include #else # include #endif Syntax error _ACEOF if { (ac_try="$ac_cpp conftest.$ac_ext" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null && { test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || test ! -s conftest.err }; then : else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 # Broken: fails on valid input. continue fi rm -f conftest.err conftest.$ac_ext # OK, works on sane cases. Now check whether nonexistent headers # can be detected and how. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF if { (ac_try="$ac_cpp conftest.$ac_ext" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null && { test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || test ! -s conftest.err }; then # Broken: success on invalid input. continue else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 # Passes both tests. ac_preproc_ok=: break fi rm -f conftest.err conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. rm -f conftest.err conftest.$ac_ext if $ac_preproc_ok; then : else { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} { { $as_echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check See \`config.log' for more details." >&5 $as_echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check See \`config.log' for more details." >&2;} { (exit 1); exit 1; }; }; } fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu { $as_echo "$as_me:$LINENO: checking for grep that handles long lines and -e" >&5 $as_echo_n "checking for grep that handles long lines and -e... " >&6; } if test "${ac_cv_path_GREP+set}" = set; then $as_echo_n "(cached) " >&6 else if test -z "$GREP"; then ac_path_GREP_found=false # Loop through the user's path and test for each of PROGNAME-LIST as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_prog in grep ggrep; do for ac_exec_ext in '' $ac_executable_extensions; do ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext" { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue # Check for GNU ac_path_GREP and select it if it is found. # Check for GNU $ac_path_GREP case `"$ac_path_GREP" --version 2>&1` in *GNU*) ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;; *) ac_count=0 $as_echo_n 0123456789 >"conftest.in" while : do cat "conftest.in" "conftest.in" >"conftest.tmp" mv "conftest.tmp" "conftest.in" cp "conftest.in" "conftest.nl" $as_echo 'GREP' >> "conftest.nl" "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break ac_count=`expr $ac_count + 1` if test $ac_count -gt ${ac_path_GREP_max-0}; then # Best one so far, save it but keep looking for a better one ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_max=$ac_count fi # 10*(2^10) chars as input seems more than enough test $ac_count -gt 10 && break done rm -f conftest.in conftest.tmp conftest.nl conftest.out;; esac $ac_path_GREP_found && break 3 done done done IFS=$as_save_IFS if test -z "$ac_cv_path_GREP"; then { { $as_echo "$as_me:$LINENO: error: no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5 $as_echo "$as_me: error: no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;} { (exit 1); exit 1; }; } fi else ac_cv_path_GREP=$GREP fi fi { $as_echo "$as_me:$LINENO: result: $ac_cv_path_GREP" >&5 $as_echo "$ac_cv_path_GREP" >&6; } GREP="$ac_cv_path_GREP" { $as_echo "$as_me:$LINENO: checking for egrep" >&5 $as_echo_n "checking for egrep... " >&6; } if test "${ac_cv_path_EGREP+set}" = set; then $as_echo_n "(cached) " >&6 else if echo a | $GREP -E '(a|b)' >/dev/null 2>&1 then ac_cv_path_EGREP="$GREP -E" else if test -z "$EGREP"; then ac_path_EGREP_found=false # Loop through the user's path and test for each of PROGNAME-LIST as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_prog in egrep; do for ac_exec_ext in '' $ac_executable_extensions; do ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext" { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue # Check for GNU ac_path_EGREP and select it if it is found. # Check for GNU $ac_path_EGREP case `"$ac_path_EGREP" --version 2>&1` in *GNU*) ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;; *) ac_count=0 $as_echo_n 0123456789 >"conftest.in" while : do cat "conftest.in" "conftest.in" >"conftest.tmp" mv "conftest.tmp" "conftest.in" cp "conftest.in" "conftest.nl" $as_echo 'EGREP' >> "conftest.nl" "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break ac_count=`expr $ac_count + 1` if test $ac_count -gt ${ac_path_EGREP_max-0}; then # Best one so far, save it but keep looking for a better one ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_max=$ac_count fi # 10*(2^10) chars as input seems more than enough test $ac_count -gt 10 && break done rm -f conftest.in conftest.tmp conftest.nl conftest.out;; esac $ac_path_EGREP_found && break 3 done done done IFS=$as_save_IFS if test -z "$ac_cv_path_EGREP"; then { { $as_echo "$as_me:$LINENO: error: no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5 $as_echo "$as_me: error: no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;} { (exit 1); exit 1; }; } fi else ac_cv_path_EGREP=$EGREP fi fi fi { $as_echo "$as_me:$LINENO: result: $ac_cv_path_EGREP" >&5 $as_echo "$ac_cv_path_EGREP" >&6; } EGREP="$ac_cv_path_EGREP" { $as_echo "$as_me:$LINENO: checking for ANSI C header files" >&5 $as_echo_n "checking for ANSI C header files... " >&6; } if test "${ac_cv_header_stdc+set}" = set; then $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #include #include #include int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_cv_header_stdc=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_header_stdc=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext if test $ac_cv_header_stdc = yes; then # SunOS 4.x string.h does not declare mem*, contrary to ANSI. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "memchr" >/dev/null 2>&1; then : else ac_cv_header_stdc=no fi rm -f conftest* fi if test $ac_cv_header_stdc = yes; then # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "free" >/dev/null 2>&1; then : else ac_cv_header_stdc=no fi rm -f conftest* fi if test $ac_cv_header_stdc = yes; then # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. if test "$cross_compiling" = yes; then : else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #include #if ((' ' & 0x0FF) == 0x020) # define ISLOWER(c) ('a' <= (c) && (c) <= 'z') # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) #else # define ISLOWER(c) \ (('a' <= (c) && (c) <= 'i') \ || ('j' <= (c) && (c) <= 'r') \ || ('s' <= (c) && (c) <= 'z')) # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c)) #endif #define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) int main () { int i; for (i = 0; i < 256; i++) if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) return 2; return 0; } _ACEOF rm -f conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' { (case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_try") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then : else $as_echo "$as_me: program exited with status $ac_status" >&5 $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) ac_cv_header_stdc=no fi rm -rf conftest.dSYM rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi fi fi { $as_echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5 $as_echo "$ac_cv_header_stdc" >&6; } if test $ac_cv_header_stdc = yes; then cat >>confdefs.h <<\_ACEOF #define STDC_HEADERS 1 _ACEOF fi # On IRIX 5.3, sys/types and inttypes.h are conflicting. for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \ inttypes.h stdint.h unistd.h do as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 $as_echo_n "checking for $ac_header... " >&6; } if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default #include <$ac_header> _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then eval "$as_ac_Header=yes" else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 eval "$as_ac_Header=no" fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi ac_res=`eval 'as_val=${'$as_ac_Header'} $as_echo "$as_val"'` { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } as_val=`eval 'as_val=${'$as_ac_Header'} $as_echo "$as_val"'` if test "x$as_val" = x""yes; then cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi done if test "${ac_cv_header_minix_config_h+set}" = set; then { $as_echo "$as_me:$LINENO: checking for minix/config.h" >&5 $as_echo_n "checking for minix/config.h... " >&6; } if test "${ac_cv_header_minix_config_h+set}" = set; then $as_echo_n "(cached) " >&6 fi { $as_echo "$as_me:$LINENO: result: $ac_cv_header_minix_config_h" >&5 $as_echo "$ac_cv_header_minix_config_h" >&6; } else # Is the header compilable? { $as_echo "$as_me:$LINENO: checking minix/config.h usability" >&5 $as_echo_n "checking minix/config.h usability... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default #include _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_header_compiler=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_compiler=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext { $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 $as_echo "$ac_header_compiler" >&6; } # Is the header present? { $as_echo "$as_me:$LINENO: checking minix/config.h presence" >&5 $as_echo_n "checking minix/config.h presence... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF if { (ac_try="$ac_cpp conftest.$ac_ext" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null && { test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || test ! -s conftest.err }; then ac_header_preproc=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi rm -f conftest.err conftest.$ac_ext { $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 $as_echo "$ac_header_preproc" >&6; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in yes:no: ) { $as_echo "$as_me:$LINENO: WARNING: minix/config.h: accepted by the compiler, rejected by the preprocessor!" >&5 $as_echo "$as_me: WARNING: minix/config.h: accepted by the compiler, rejected by the preprocessor!" >&2;} { $as_echo "$as_me:$LINENO: WARNING: minix/config.h: proceeding with the compiler's result" >&5 $as_echo "$as_me: WARNING: minix/config.h: proceeding with the compiler's result" >&2;} ac_header_preproc=yes ;; no:yes:* ) { $as_echo "$as_me:$LINENO: WARNING: minix/config.h: present but cannot be compiled" >&5 $as_echo "$as_me: WARNING: minix/config.h: present but cannot be compiled" >&2;} { $as_echo "$as_me:$LINENO: WARNING: minix/config.h: check for missing prerequisite headers?" >&5 $as_echo "$as_me: WARNING: minix/config.h: check for missing prerequisite headers?" >&2;} { $as_echo "$as_me:$LINENO: WARNING: minix/config.h: see the Autoconf documentation" >&5 $as_echo "$as_me: WARNING: minix/config.h: see the Autoconf documentation" >&2;} { $as_echo "$as_me:$LINENO: WARNING: minix/config.h: section \"Present But Cannot Be Compiled\"" >&5 $as_echo "$as_me: WARNING: minix/config.h: section \"Present But Cannot Be Compiled\"" >&2;} { $as_echo "$as_me:$LINENO: WARNING: minix/config.h: proceeding with the preprocessor's result" >&5 $as_echo "$as_me: WARNING: minix/config.h: proceeding with the preprocessor's result" >&2;} { $as_echo "$as_me:$LINENO: WARNING: minix/config.h: in the future, the compiler will take precedence" >&5 $as_echo "$as_me: WARNING: minix/config.h: in the future, the compiler will take precedence" >&2;} ;; esac { $as_echo "$as_me:$LINENO: checking for minix/config.h" >&5 $as_echo_n "checking for minix/config.h... " >&6; } if test "${ac_cv_header_minix_config_h+set}" = set; then $as_echo_n "(cached) " >&6 else ac_cv_header_minix_config_h=$ac_header_preproc fi { $as_echo "$as_me:$LINENO: result: $ac_cv_header_minix_config_h" >&5 $as_echo "$ac_cv_header_minix_config_h" >&6; } fi if test "x$ac_cv_header_minix_config_h" = x""yes; then MINIX=yes else MINIX= fi if test "$MINIX" = yes; then cat >>confdefs.h <<\_ACEOF #define _POSIX_SOURCE 1 _ACEOF cat >>confdefs.h <<\_ACEOF #define _POSIX_1_SOURCE 2 _ACEOF cat >>confdefs.h <<\_ACEOF #define _MINIX 1 _ACEOF fi case "$host_os" in hpux*) cat >>confdefs.h <<\_ACEOF #define _XOPEN_SOURCE 500 _ACEOF ;; esac { $as_echo "$as_me:$LINENO: checking whether it is safe to define __EXTENSIONS__" >&5 $as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; } if test "${ac_cv_safe_to_define___extensions__+set}" = set; then $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ # define __EXTENSIONS__ 1 $ac_includes_default int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_cv_safe_to_define___extensions__=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_safe_to_define___extensions__=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:$LINENO: result: $ac_cv_safe_to_define___extensions__" >&5 $as_echo "$ac_cv_safe_to_define___extensions__" >&6; } test $ac_cv_safe_to_define___extensions__ = yes && cat >>confdefs.h <<\_ACEOF #define __EXTENSIONS__ 1 _ACEOF cat >>confdefs.h <<\_ACEOF #define _ALL_SOURCE 1 _ACEOF cat >>confdefs.h <<\_ACEOF #define _GNU_SOURCE 1 _ACEOF cat >>confdefs.h <<\_ACEOF #define _POSIX_PTHREAD_SEMANTICS 1 _ACEOF cat >>confdefs.h <<\_ACEOF #define _TANDEM_SOURCE 1 _ACEOF # IEEE behaviour is the default on all CPUs except Alpha and SH # (according to the test results of Bruno Haible's ieeefp/fenv_default.m4 # and the GCC 4.1.2 manual). case "$host_cpu" in alpha*) # On Alpha systems, a compiler option provides the behaviour. # See the ieee(3) manual page, also available at # if test -n "$GCC"; then # GCC has the option -mieee. CPPFLAGS="$CPPFLAGS -mieee" else # Compaq (ex-DEC) C has the option -ieee. CPPFLAGS="$CPPFLAGS -ieee" fi ;; sh*) if test -n "$GCC"; then # GCC has the option -mieee. CPPFLAGS="$CPPFLAGS -mieee" fi ;; esac { $as_echo "$as_me:$LINENO: checking for _LARGEFILE_SOURCE value needed for large files" >&5 $as_echo_n "checking for _LARGEFILE_SOURCE value needed for large files... " >&6; } if test "${ac_cv_sys_largefile_source+set}" = set; then $as_echo_n "(cached) " >&6 else while :; do cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include /* for off_t */ #include int main () { int (*fp) (FILE *, off_t, int) = fseeko; return fseeko (stdin, 0, 0) && fp (stdin, 0, 0); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || $as_test_x conftest$ac_exeext }; then ac_cv_sys_largefile_source=no; break else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #define _LARGEFILE_SOURCE 1 #include /* for off_t */ #include int main () { int (*fp) (FILE *, off_t, int) = fseeko; return fseeko (stdin, 0, 0) && fp (stdin, 0, 0); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || $as_test_x conftest$ac_exeext }; then ac_cv_sys_largefile_source=1; break else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext ac_cv_sys_largefile_source=unknown break done fi { $as_echo "$as_me:$LINENO: result: $ac_cv_sys_largefile_source" >&5 $as_echo "$ac_cv_sys_largefile_source" >&6; } case $ac_cv_sys_largefile_source in #( no | unknown) ;; *) cat >>confdefs.h <<_ACEOF #define _LARGEFILE_SOURCE $ac_cv_sys_largefile_source _ACEOF ;; esac rm -rf conftest* # We used to try defining _XOPEN_SOURCE=500 too, to work around a bug # in glibc 2.1.3, but that breaks too many other things. # If you want fseeko and ftello with glibc, upgrade to a fixed glibc. if test $ac_cv_sys_largefile_source != unknown; then cat >>confdefs.h <<\_ACEOF #define HAVE_FSEEKO 1 _ACEOF fi # Check whether --enable-threads was given. if test "${enable_threads+set}" = set; then enableval=$enable_threads; gl_use_threads=$enableval else if test -n "$gl_use_threads_default"; then gl_use_threads="$gl_use_threads_default" else case "$host_os" in osf*) gl_use_threads=no ;; cygwin*) case `uname -r` in 1.[0-5].*) gl_use_threads=no ;; *) gl_use_threads=yes ;; esac ;; *) gl_use_threads=yes ;; esac fi fi if test "$gl_use_threads" = yes || test "$gl_use_threads" = posix; then # For using : case "$host_os" in osf*) # On OSF/1, the compiler needs the flag -D_REENTRANT so that it # groks . cc also understands the flag -pthread, but # we don't use it because 1. gcc-2.95 doesn't understand -pthread, # 2. putting a flag into CPPFLAGS that has an effect on the linker # causes the AC_TRY_LINK test below to succeed unexpectedly, # leading to wrong values of LIBTHREAD and LTLIBTHREAD. CPPFLAGS="$CPPFLAGS -D_REENTRANT" ;; esac # Some systems optimize for single-threaded programs by default, and # need special flags to disable these optimizations. For example, the # definition of 'errno' in . case "$host_os" in aix* | freebsd*) CPPFLAGS="$CPPFLAGS -D_THREAD_SAFE" ;; solaris*) CPPFLAGS="$CPPFLAGS -D_REENTRANT" ;; esac fi case `pwd` in *\ * | *\ *) { $as_echo "$as_me:$LINENO: WARNING: Libtool does not cope well with whitespace in \`pwd\`" >&5 $as_echo "$as_me: WARNING: Libtool does not cope well with whitespace in \`pwd\`" >&2;} ;; esac macro_version='2.2.6b' macro_revision='1.3017' ltmain="$ac_aux_dir/ltmain.sh" { $as_echo "$as_me:$LINENO: checking for a sed that does not truncate output" >&5 $as_echo_n "checking for a sed that does not truncate output... " >&6; } if test "${ac_cv_path_SED+set}" = set; then $as_echo_n "(cached) " >&6 else ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/ for ac_i in 1 2 3 4 5 6 7; do ac_script="$ac_script$as_nl$ac_script" done echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed $as_unset ac_script || ac_script= if test -z "$SED"; then ac_path_SED_found=false # Loop through the user's path and test for each of PROGNAME-LIST as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_prog in sed gsed; do for ac_exec_ext in '' $ac_executable_extensions; do ac_path_SED="$as_dir/$ac_prog$ac_exec_ext" { test -f "$ac_path_SED" && $as_test_x "$ac_path_SED"; } || continue # Check for GNU ac_path_SED and select it if it is found. # Check for GNU $ac_path_SED case `"$ac_path_SED" --version 2>&1` in *GNU*) ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;; *) ac_count=0 $as_echo_n 0123456789 >"conftest.in" while : do cat "conftest.in" "conftest.in" >"conftest.tmp" mv "conftest.tmp" "conftest.in" cp "conftest.in" "conftest.nl" $as_echo '' >> "conftest.nl" "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break ac_count=`expr $ac_count + 1` if test $ac_count -gt ${ac_path_SED_max-0}; then # Best one so far, save it but keep looking for a better one ac_cv_path_SED="$ac_path_SED" ac_path_SED_max=$ac_count fi # 10*(2^10) chars as input seems more than enough test $ac_count -gt 10 && break done rm -f conftest.in conftest.tmp conftest.nl conftest.out;; esac $ac_path_SED_found && break 3 done done done IFS=$as_save_IFS if test -z "$ac_cv_path_SED"; then { { $as_echo "$as_me:$LINENO: error: no acceptable sed could be found in \$PATH" >&5 $as_echo "$as_me: error: no acceptable sed could be found in \$PATH" >&2;} { (exit 1); exit 1; }; } fi else ac_cv_path_SED=$SED fi fi { $as_echo "$as_me:$LINENO: result: $ac_cv_path_SED" >&5 $as_echo "$ac_cv_path_SED" >&6; } SED="$ac_cv_path_SED" rm -f conftest.sed test -z "$SED" && SED=sed Xsed="$SED -e 1s/^X//" { $as_echo "$as_me:$LINENO: checking for fgrep" >&5 $as_echo_n "checking for fgrep... " >&6; } if test "${ac_cv_path_FGREP+set}" = set; then $as_echo_n "(cached) " >&6 else if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1 then ac_cv_path_FGREP="$GREP -F" else if test -z "$FGREP"; then ac_path_FGREP_found=false # Loop through the user's path and test for each of PROGNAME-LIST as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_prog in fgrep; do for ac_exec_ext in '' $ac_executable_extensions; do ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext" { test -f "$ac_path_FGREP" && $as_test_x "$ac_path_FGREP"; } || continue # Check for GNU ac_path_FGREP and select it if it is found. # Check for GNU $ac_path_FGREP case `"$ac_path_FGREP" --version 2>&1` in *GNU*) ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;; *) ac_count=0 $as_echo_n 0123456789 >"conftest.in" while : do cat "conftest.in" "conftest.in" >"conftest.tmp" mv "conftest.tmp" "conftest.in" cp "conftest.in" "conftest.nl" $as_echo 'FGREP' >> "conftest.nl" "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break ac_count=`expr $ac_count + 1` if test $ac_count -gt ${ac_path_FGREP_max-0}; then # Best one so far, save it but keep looking for a better one ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_max=$ac_count fi # 10*(2^10) chars as input seems more than enough test $ac_count -gt 10 && break done rm -f conftest.in conftest.tmp conftest.nl conftest.out;; esac $ac_path_FGREP_found && break 3 done done done IFS=$as_save_IFS if test -z "$ac_cv_path_FGREP"; then { { $as_echo "$as_me:$LINENO: error: no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5 $as_echo "$as_me: error: no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;} { (exit 1); exit 1; }; } fi else ac_cv_path_FGREP=$FGREP fi fi fi { $as_echo "$as_me:$LINENO: result: $ac_cv_path_FGREP" >&5 $as_echo "$ac_cv_path_FGREP" >&6; } FGREP="$ac_cv_path_FGREP" test -z "$GREP" && GREP=grep # Check whether --with-gnu-ld was given. if test "${with_gnu_ld+set}" = set; then withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes else with_gnu_ld=no fi ac_prog=ld if test "$GCC" = yes; then # Check if gcc -print-prog-name=ld gives a path. { $as_echo "$as_me:$LINENO: checking for ld used by $CC" >&5 $as_echo_n "checking for ld used by $CC... " >&6; } 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 pathname 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 { $as_echo "$as_me:$LINENO: checking for GNU ld" >&5 $as_echo_n "checking for GNU ld... " >&6; } else { $as_echo "$as_me:$LINENO: checking for non-GNU ld" >&5 $as_echo_n "checking for non-GNU ld... " >&6; } fi if test "${lt_cv_path_LD+set}" = set; then $as_echo_n "(cached) " >&6 else 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 variants of GNU ld only accept -v. # Break only if it was the GNU/non-GNU ld that we prefer. case `"$lt_cv_path_LD" -v 2>&1 &5 $as_echo "$LD" >&6; } else { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } fi test -z "$LD" && { { $as_echo "$as_me:$LINENO: error: no acceptable ld found in \$PATH" >&5 $as_echo "$as_me: error: no acceptable ld found in \$PATH" >&2;} { (exit 1); exit 1; }; } { $as_echo "$as_me:$LINENO: checking if the linker ($LD) is GNU ld" >&5 $as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; } if test "${lt_cv_prog_gnu_ld+set}" = set; then $as_echo_n "(cached) " >&6 else # I'd rather use --version here, but apparently some GNU lds only accept -v. case `$LD -v 2>&1 &5 $as_echo "$lt_cv_prog_gnu_ld" >&6; } with_gnu_ld=$lt_cv_prog_gnu_ld { $as_echo "$as_me:$LINENO: checking for BSD- or MS-compatible name lister (nm)" >&5 $as_echo_n "checking for BSD- or MS-compatible name lister (nm)... " >&6; } if test "${lt_cv_path_NM+set}" = set; then $as_echo_n "(cached) " >&6 else if test -n "$NM"; then # Let the user override the test. lt_cv_path_NM="$NM" else lt_nm_to_check="${ac_tool_prefix}nm" if test -n "$ac_tool_prefix" && test "$build" = "$host"; then lt_nm_to_check="$lt_nm_to_check nm" fi for lt_tmp_nm in $lt_nm_to_check; do lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do IFS="$lt_save_ifs" test -z "$ac_dir" && ac_dir=. tmp_nm="$ac_dir/$lt_tmp_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" done : ${lt_cv_path_NM=no} fi fi { $as_echo "$as_me:$LINENO: result: $lt_cv_path_NM" >&5 $as_echo "$lt_cv_path_NM" >&6; } if test "$lt_cv_path_NM" != "no"; then NM="$lt_cv_path_NM" else # Didn't find any BSD compatible name lister, look for dumpbin. if test -n "$ac_tool_prefix"; then for ac_prog in "dumpbin -symbols" "link -dump -symbols" do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_DUMPBIN+set}" = set; then $as_echo_n "(cached) " >&6 else if test -n "$DUMPBIN"; then ac_cv_prog_DUMPBIN="$DUMPBIN" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_DUMPBIN="$ac_tool_prefix$ac_prog" $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi DUMPBIN=$ac_cv_prog_DUMPBIN if test -n "$DUMPBIN"; then { $as_echo "$as_me:$LINENO: result: $DUMPBIN" >&5 $as_echo "$DUMPBIN" >&6; } else { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } fi test -n "$DUMPBIN" && break done fi if test -z "$DUMPBIN"; then ac_ct_DUMPBIN=$DUMPBIN for ac_prog in "dumpbin -symbols" "link -dump -symbols" do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_ac_ct_DUMPBIN+set}" = set; then $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_DUMPBIN"; then ac_cv_prog_ac_ct_DUMPBIN="$ac_ct_DUMPBIN" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_DUMPBIN="$ac_prog" $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_DUMPBIN=$ac_cv_prog_ac_ct_DUMPBIN if test -n "$ac_ct_DUMPBIN"; then { $as_echo "$as_me:$LINENO: result: $ac_ct_DUMPBIN" >&5 $as_echo "$ac_ct_DUMPBIN" >&6; } else { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } fi test -n "$ac_ct_DUMPBIN" && break done if test "x$ac_ct_DUMPBIN" = x; then DUMPBIN=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac DUMPBIN=$ac_ct_DUMPBIN fi fi if test "$DUMPBIN" != ":"; then NM="$DUMPBIN" fi fi test -z "$NM" && NM=nm { $as_echo "$as_me:$LINENO: checking the name lister ($NM) interface" >&5 $as_echo_n "checking the name lister ($NM) interface... " >&6; } if test "${lt_cv_nm_interface+set}" = set; then $as_echo_n "(cached) " >&6 else lt_cv_nm_interface="BSD nm" echo "int some_variable = 0;" > conftest.$ac_ext (eval echo "\"\$as_me:7478: $ac_compile\"" >&5) (eval "$ac_compile" 2>conftest.err) cat conftest.err >&5 (eval echo "\"\$as_me:7481: $NM \\\"conftest.$ac_objext\\\"\"" >&5) (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out) cat conftest.err >&5 (eval echo "\"\$as_me:7484: output\"" >&5) cat conftest.out >&5 if $GREP 'External.*some_variable' conftest.out > /dev/null; then lt_cv_nm_interface="MS dumpbin" fi rm -f conftest* fi { $as_echo "$as_me:$LINENO: result: $lt_cv_nm_interface" >&5 $as_echo "$lt_cv_nm_interface" >&6; } { $as_echo "$as_me:$LINENO: checking whether ln -s works" >&5 $as_echo_n "checking whether ln -s works... " >&6; } LN_S=$as_ln_s if test "$LN_S" = "ln -s"; then { $as_echo "$as_me:$LINENO: result: yes" >&5 $as_echo "yes" >&6; } else { $as_echo "$as_me:$LINENO: result: no, using $LN_S" >&5 $as_echo "no, using $LN_S" >&6; } fi # find the maximum length of command line arguments { $as_echo "$as_me:$LINENO: checking the maximum length of command line arguments" >&5 $as_echo_n "checking the maximum length of command line arguments... " >&6; } if test "${lt_cv_sys_max_cmd_len+set}" = set; then $as_echo_n "(cached) " >&6 else i=0 teststring="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* | cegcc*) # 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; ;; amigaos*) # On AmigaOS with pdksh, this test takes hours, literally. # So we just punt and use a minimum line length of 8192. lt_cv_sys_max_cmd_len=8192; ;; netbsd* | freebsd* | openbsd* | darwin* | dragonfly*) # This has been around since 386BSD, at least. Likely further. if test -x /sbin/sysctl; then lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax` elif test -x /usr/sbin/sysctl; then lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax` else lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs fi # And add a safety zone lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` ;; interix*) # We know the value 262144 and hardcode it with a safety zone (like BSD) lt_cv_sys_max_cmd_len=196608 ;; osf*) # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not # nice to cause kernel panics so lets avoid the loop below. # First set a reasonable default. lt_cv_sys_max_cmd_len=16384 # if test -x /sbin/sysconfig; then case `/sbin/sysconfig -q proc exec_disable_arg_limit` in *1*) lt_cv_sys_max_cmd_len=-1 ;; esac fi ;; sco3.2v5*) lt_cv_sys_max_cmd_len=102400 ;; sysv5* | sco5v6* | sysv4.2uw2*) kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null` if test -n "$kargmax"; then lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[ ]//'` else lt_cv_sys_max_cmd_len=32768 fi ;; *) lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null` if test -n "$lt_cv_sys_max_cmd_len"; then lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` else # Make teststring a little bigger before we do anything with it. # a 1K string should be a reasonable start. for i in 1 2 3 4 5 6 7 8 ; do teststring=$teststring$teststring done SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}} # 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"`$SHELL $0 --fallback-echo "X$teststring$teststring" 2>/dev/null` \ = "XX$teststring$teststring"; } >/dev/null 2>&1 && test $i != 17 # 1/2 MB should be enough do i=`expr $i + 1` teststring=$teststring$teststring done # Only check the string length outside the loop. lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1` teststring= # 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` fi ;; esac fi if test -n $lt_cv_sys_max_cmd_len ; then { $as_echo "$as_me:$LINENO: result: $lt_cv_sys_max_cmd_len" >&5 $as_echo "$lt_cv_sys_max_cmd_len" >&6; } else { $as_echo "$as_me:$LINENO: result: none" >&5 $as_echo "none" >&6; } fi max_cmd_len=$lt_cv_sys_max_cmd_len : ${CP="cp -f"} : ${MV="mv -f"} : ${RM="rm -f"} { $as_echo "$as_me:$LINENO: checking whether the shell understands some XSI constructs" >&5 $as_echo_n "checking whether the shell understands some XSI constructs... " >&6; } # Try some XSI features xsi_shell=no ( _lt_dummy="a/b/c" test "${_lt_dummy##*/},${_lt_dummy%/*},"${_lt_dummy%"$_lt_dummy"}, \ = c,a/b,, \ && eval 'test $(( 1 + 1 )) -eq 2 \ && test "${#_lt_dummy}" -eq 5' ) >/dev/null 2>&1 \ && xsi_shell=yes { $as_echo "$as_me:$LINENO: result: $xsi_shell" >&5 $as_echo "$xsi_shell" >&6; } { $as_echo "$as_me:$LINENO: checking whether the shell understands \"+=\"" >&5 $as_echo_n "checking whether the shell understands \"+=\"... " >&6; } lt_shell_append=no ( foo=bar; set foo baz; eval "$1+=\$2" && test "$foo" = barbaz ) \ >/dev/null 2>&1 \ && lt_shell_append=yes { $as_echo "$as_me:$LINENO: result: $lt_shell_append" >&5 $as_echo "$lt_shell_append" >&6; } if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then lt_unset=unset else lt_unset=false fi # test EBCDIC or ASCII case `echo X|tr X '\101'` in A) # ASCII based system # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr lt_SP2NL='tr \040 \012' lt_NL2SP='tr \015\012 \040\040' ;; *) # EBCDIC based system lt_SP2NL='tr \100 \n' lt_NL2SP='tr \r\n \100\100' ;; esac { $as_echo "$as_me:$LINENO: checking for $LD option to reload object files" >&5 $as_echo_n "checking for $LD option to reload object files... " >&6; } if test "${lt_cv_ld_reload_flag+set}" = set; then $as_echo_n "(cached) " >&6 else lt_cv_ld_reload_flag='-r' fi { $as_echo "$as_me:$LINENO: result: $lt_cv_ld_reload_flag" >&5 $as_echo "$lt_cv_ld_reload_flag" >&6; } reload_flag=$lt_cv_ld_reload_flag case $reload_flag in "" | " "*) ;; *) reload_flag=" $reload_flag" ;; esac reload_cmds='$LD$reload_flag -o $output$reload_objs' case $host_os in darwin*) if test "$GCC" = yes; then reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs' else reload_cmds='$LD$reload_flag -o $output$reload_objs' fi ;; esac if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}objdump", so it can be a program name with args. set dummy ${ac_tool_prefix}objdump; ac_word=$2 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_OBJDUMP+set}" = set; then $as_echo_n "(cached) " >&6 else if test -n "$OBJDUMP"; then ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_OBJDUMP="${ac_tool_prefix}objdump" $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi OBJDUMP=$ac_cv_prog_OBJDUMP if test -n "$OBJDUMP"; then { $as_echo "$as_me:$LINENO: result: $OBJDUMP" >&5 $as_echo "$OBJDUMP" >&6; } else { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_OBJDUMP"; then ac_ct_OBJDUMP=$OBJDUMP # Extract the first word of "objdump", so it can be a program name with args. set dummy objdump; ac_word=$2 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_ac_ct_OBJDUMP+set}" = set; then $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_OBJDUMP"; then ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_OBJDUMP="objdump" $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP if test -n "$ac_ct_OBJDUMP"; then { $as_echo "$as_me:$LINENO: result: $ac_ct_OBJDUMP" >&5 $as_echo "$ac_ct_OBJDUMP" >&6; } else { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_OBJDUMP" = x; then OBJDUMP="false" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac OBJDUMP=$ac_ct_OBJDUMP fi else OBJDUMP="$ac_cv_prog_OBJDUMP" fi test -z "$OBJDUMP" && OBJDUMP=objdump { $as_echo "$as_me:$LINENO: checking how to recognize dependent libraries" >&5 $as_echo_n "checking how to recognize dependent libraries... " >&6; } if test "${lt_cv_deplibs_check_method+set}" = set; then $as_echo_n "(cached) " >&6 else lt_cv_file_magic_cmd='$MAGIC_CMD' lt_cv_file_magic_test_file= lt_cv_deplibs_check_method='unknown' # Need to set the preceding variable on all platforms that support # interlibrary dependencies. # 'none' -- dependencies not supported. # `unknown' -- same as none, but documents that we really don't know. # 'pass_all' -- all dependencies passed with no checks. # 'test_compile' -- check by making test program. # 'file_magic [[regex]]' -- check by looking for files in library path # which responds to the $file_magic_cmd with a given extended regex. # If you have `file' or equivalent on your system and you're not sure # whether `pass_all' will *always* work, you probably want this one. case $host_os in aix[4-9]*) lt_cv_deplibs_check_method=pass_all ;; beos*) lt_cv_deplibs_check_method=pass_all ;; bsdi[45]*) lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib)' lt_cv_file_magic_cmd='/usr/bin/file -L' lt_cv_file_magic_test_file=/shlib/libc.so ;; cygwin*) # func_win32_libid is a shell function defined in ltmain.sh lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' lt_cv_file_magic_cmd='func_win32_libid' ;; mingw* | pw32*) # Base MSYS/MinGW do not provide the 'file' command needed by # func_win32_libid shell function, so use a weaker test based on 'objdump', # unless we find 'file', for example because we are cross-compiling. if ( file / ) >/dev/null 2>&1; then lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' lt_cv_file_magic_cmd='func_win32_libid' else lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?' lt_cv_file_magic_cmd='$OBJDUMP -f' fi ;; cegcc) # use the weaker test based on 'objdump'. See mingw*. lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?' lt_cv_file_magic_cmd='$OBJDUMP -f' ;; darwin* | rhapsody*) lt_cv_deplibs_check_method=pass_all ;; freebsd* | dragonfly*) if echo __ELF__ | $CC -E - | $GREP __ELF__ > /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|DragonFly)/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 ;; interix[3-9]*) # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so|\.a)$' ;; irix5* | irix6* | nonstopux*) case $LD in *-32|*"-32 ") libmagic=32-bit;; *-n32|*"-n32 ") libmagic=N32;; *-64|*"-64 ") libmagic=64-bit;; *) libmagic=never-match;; esac lt_cv_deplibs_check_method=pass_all ;; # This must be Linux ELF. linux* | k*bsd*-gnu) lt_cv_deplibs_check_method=pass_all ;; 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=pass_all ;; openbsd*) if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|\.so|_pic\.a)$' else lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$' fi ;; osf3* | osf4* | osf5*) lt_cv_deplibs_check_method=pass_all ;; rdos*) lt_cv_deplibs_check_method=pass_all ;; solaris*) lt_cv_deplibs_check_method=pass_all ;; sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) lt_cv_deplibs_check_method=pass_all ;; sysv4 | sysv4.3*) 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 ;; pc) lt_cv_deplibs_check_method=pass_all ;; esac ;; tpf*) lt_cv_deplibs_check_method=pass_all ;; esac fi { $as_echo "$as_me:$LINENO: result: $lt_cv_deplibs_check_method" >&5 $as_echo "$lt_cv_deplibs_check_method" >&6; } 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 if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args. set dummy ${ac_tool_prefix}ar; ac_word=$2 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_AR+set}" = set; then $as_echo_n "(cached) " >&6 else if test -n "$AR"; then ac_cv_prog_AR="$AR" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_AR="${ac_tool_prefix}ar" $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi AR=$ac_cv_prog_AR if test -n "$AR"; then { $as_echo "$as_me:$LINENO: result: $AR" >&5 $as_echo "$AR" >&6; } else { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_AR"; then ac_ct_AR=$AR # Extract the first word of "ar", so it can be a program name with args. set dummy ar; ac_word=$2 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_ac_ct_AR+set}" = set; then $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_AR"; then ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_AR="ar" $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_AR=$ac_cv_prog_ac_ct_AR if test -n "$ac_ct_AR"; then { $as_echo "$as_me:$LINENO: result: $ac_ct_AR" >&5 $as_echo "$ac_ct_AR" >&6; } else { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_AR" = x; then AR="false" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac AR=$ac_ct_AR fi else AR="$ac_cv_prog_AR" fi test -z "$AR" && AR=ar test -z "$AR_FLAGS" && AR_FLAGS=cru if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args. set dummy ${ac_tool_prefix}strip; ac_word=$2 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_STRIP+set}" = set; then $as_echo_n "(cached) " >&6 else if test -n "$STRIP"; then ac_cv_prog_STRIP="$STRIP" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_STRIP="${ac_tool_prefix}strip" $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi STRIP=$ac_cv_prog_STRIP if test -n "$STRIP"; then { $as_echo "$as_me:$LINENO: result: $STRIP" >&5 $as_echo "$STRIP" >&6; } else { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_STRIP"; then ac_ct_STRIP=$STRIP # Extract the first word of "strip", so it can be a program name with args. set dummy strip; ac_word=$2 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_STRIP"; then ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_STRIP="strip" $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP if test -n "$ac_ct_STRIP"; then { $as_echo "$as_me:$LINENO: result: $ac_ct_STRIP" >&5 $as_echo "$ac_ct_STRIP" >&6; } else { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_STRIP" = x; then STRIP=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac STRIP=$ac_ct_STRIP fi else STRIP="$ac_cv_prog_STRIP" fi test -z "$STRIP" && STRIP=: if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args. set dummy ${ac_tool_prefix}ranlib; ac_word=$2 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_RANLIB+set}" = set; then $as_echo_n "(cached) " >&6 else if test -n "$RANLIB"; then ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib" $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi RANLIB=$ac_cv_prog_RANLIB if test -n "$RANLIB"; then { $as_echo "$as_me:$LINENO: result: $RANLIB" >&5 $as_echo "$RANLIB" >&6; } else { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_RANLIB"; then ac_ct_RANLIB=$RANLIB # Extract the first word of "ranlib", so it can be a program name with args. set dummy ranlib; ac_word=$2 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_RANLIB"; then ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_RANLIB="ranlib" $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB if test -n "$ac_ct_RANLIB"; then { $as_echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5 $as_echo "$ac_ct_RANLIB" >&6; } else { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_RANLIB" = x; then RANLIB=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac RANLIB=$ac_ct_RANLIB fi else RANLIB="$ac_cv_prog_RANLIB" fi test -z "$RANLIB" && RANLIB=: # Determine commands to create old-style static archives. old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs' old_postinstall_cmds='chmod 644 $oldlib' old_postuninstall_cmds= if test -n "$RANLIB"; then case $host_os in openbsd*) old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$oldlib" ;; *) old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$oldlib" ;; esac old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib" fi # If no C compiler was specified, use CC. LTCC=${LTCC-"$CC"} # If no C compiler flags were specified, use CFLAGS. LTCFLAGS=${LTCFLAGS-"$CFLAGS"} # Allow CC to be a program name with arguments. compiler=$CC # Check for command to grab the raw symbol name followed by C symbol from nm. { $as_echo "$as_me:$LINENO: checking command to parse $NM output from $compiler object" >&5 $as_echo_n "checking command to parse $NM output from $compiler object... " >&6; } if test "${lt_cv_sys_global_symbol_pipe+set}" = set; then $as_echo_n "(cached) " >&6 else # 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]*\)' # Define system-specific variables. case $host_os in aix*) symcode='[BCDT]' ;; cygwin* | mingw* | pw32* | cegcc*) symcode='[ABCDGISTW]' ;; hpux*) if test "$host_cpu" = ia64; then symcode='[ABCDEGRST]' fi ;; irix* | nonstopux*) symcode='[BCDEGRST]' ;; osf*) symcode='[BCDEGQRST]' ;; solaris*) symcode='[BDRT]' ;; sco3.2v5*) symcode='[DT]' ;; sysv4.2uw2*) symcode='[DT]' ;; sysv5* | sco5v6* | unixware* | OpenUNIX*) symcode='[ABDT]' ;; sysv4) symcode='[DFNSTU]' ;; 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 # Transform an extracted symbol line into a proper C declaration. # Some systems (esp. on ia64) link data and code symbols differently, # so use this general approach. lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \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\\\", (void *) 0},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/ {\"\2\", (void *) \&\2},/p'" lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n -e 's/^: \([^ ]*\) $/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([^ ]*\) \(lib[^ ]*\)$/ {\"\2\", (void *) \&\2},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/ {\"lib\2\", (void *) \&\2},/p'" # 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 # Try without a prefix underscore, then with it. for ac_symprfx in "" "_"; do # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol. symxfrm="\\1 $ac_symprfx\\2 \\2" # Write the raw and C identifiers. if test "$lt_cv_nm_interface" = "MS dumpbin"; then # Fake it for dumpbin and say T for any non-static function # and D for any global variable. # Also find C++ and __fastcall symbols from MSVC++, # which start with @ or ?. lt_cv_sys_global_symbol_pipe="$AWK '"\ " {last_section=section; section=\$ 3};"\ " /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\ " \$ 0!~/External *\|/{next};"\ " / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\ " {if(hide[section]) next};"\ " {f=0}; \$ 0~/\(\).*\|/{f=1}; {printf f ? \"T \" : \"D \"};"\ " {split(\$ 0, a, /\||\r/); split(a[2], s)};"\ " s[1]~/^[@?]/{print s[1], s[1]; next};"\ " s[1]~prfx {split(s[1],t,\"@\"); print t[1], substr(t[1],length(prfx))}"\ " ' prfx=^$ac_symprfx" else lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[ ]\($symcode$symcode*\)[ ][ ]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'" fi # Check to see that the pipe works correctly. pipe_works=no rm -f conftest* cat > conftest.$ac_ext <<_LT_EOF #ifdef __cplusplus extern "C" { #endif char nm_test_var; void nm_test_func(void); void nm_test_func(void){} #ifdef __cplusplus } #endif int main(){nm_test_var='a';nm_test_func();return(0);} _LT_EOF if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then # Now try to grab the symbols. nlist=conftest.nm if { (eval echo "$as_me:$LINENO: \"$NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist\"") >&5 (eval $NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist) 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && 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 <<_LT_EOF > conftest.$ac_ext #ifdef __cplusplus extern "C" { #endif _LT_EOF # Now generate the symbol file. eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext' cat <<_LT_EOF >> conftest.$ac_ext /* The mapping between symbol names and symbols. */ const struct { const char *name; void *address; } lt__PROGRAM__LTX_preloaded_symbols[] = { { "@PROGRAM@", (void *) 0 }, _LT_EOF $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (void *) \&\2},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext cat <<\_LT_EOF >> conftest.$ac_ext {0, (void *) 0} }; /* This works around a problem in FreeBSD linker */ #ifdef FREEBSD_WORKAROUND static const void *lt_preloaded_setup() { return lt__PROGRAM__LTX_preloaded_symbols; } #endif #ifdef __cplusplus } #endif _LT_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_prog_compiler_no_builtin_flag" if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && 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" >&5 fi else echo "cannot find nm_test_var in $nlist" >&5 fi else echo "cannot run $lt_cv_sys_global_symbol_pipe" >&5 fi else echo "$progname: failed program was:" >&5 cat conftest.$ac_ext >&5 fi rm -rf 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 fi 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 { $as_echo "$as_me:$LINENO: result: failed" >&5 $as_echo "failed" >&6; } else { $as_echo "$as_me:$LINENO: result: ok" >&5 $as_echo "ok" >&6; } fi # Check whether --enable-libtool-lock was given. if test "${enable_libtool_lock+set}" = set; then enableval=$enable_libtool_lock; fi 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 { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; 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 8686 "configure"' > conftest.$ac_ext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; 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-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \ s390*-*linux*|s390*-*tpf*|sparc*-*linux*) # Find out which ABI we are using. echo 'int i;' > conftest.$ac_ext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then case `/usr/bin/file conftest.o` in *32-bit*) case $host in x86_64-*kfreebsd*-gnu) LD="${LD-ld} -m elf_i386_fbsd" ;; x86_64-*linux*) LD="${LD-ld} -m elf_i386" ;; ppc64-*linux*|powerpc64-*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-*kfreebsd*-gnu) LD="${LD-ld} -m elf_x86_64_fbsd" ;; x86_64-*linux*) LD="${LD-ld} -m elf_x86_64" ;; ppc*-*linux*|powerpc*-*linux*) LD="${LD-ld} -m elf64ppc" ;; s390*-*linux*|s390*-*tpf*) 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" { $as_echo "$as_me:$LINENO: checking whether the C compiler needs -belf" >&5 $as_echo_n "checking whether the C compiler needs -belf... " >&6; } if test "${lt_cv_cc_needs_belf+set}" = set; then $as_echo_n "(cached) " >&6 else ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || $as_test_x conftest$ac_exeext }; then lt_cv_cc_needs_belf=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 lt_cv_cc_needs_belf=no fi rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu fi { $as_echo "$as_me:$LINENO: result: $lt_cv_cc_needs_belf" >&5 $as_echo "$lt_cv_cc_needs_belf" >&6; } 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 ;; sparc*-*solaris*) # Find out which ABI we are using. echo 'int i;' > conftest.$ac_ext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then case `/usr/bin/file conftest.o` in *64-bit*) case $lt_cv_prog_gnu_ld in yes*) LD="${LD-ld} -m elf64_sparc" ;; *) if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then LD="${LD-ld} -64" fi ;; esac ;; esac fi rm -rf conftest* ;; esac need_locks="$enable_libtool_lock" case $host_os in rhapsody* | darwin*) if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}dsymutil", so it can be a program name with args. set dummy ${ac_tool_prefix}dsymutil; ac_word=$2 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_DSYMUTIL+set}" = set; then $as_echo_n "(cached) " >&6 else if test -n "$DSYMUTIL"; then ac_cv_prog_DSYMUTIL="$DSYMUTIL" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_DSYMUTIL="${ac_tool_prefix}dsymutil" $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi DSYMUTIL=$ac_cv_prog_DSYMUTIL if test -n "$DSYMUTIL"; then { $as_echo "$as_me:$LINENO: result: $DSYMUTIL" >&5 $as_echo "$DSYMUTIL" >&6; } else { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_DSYMUTIL"; then ac_ct_DSYMUTIL=$DSYMUTIL # Extract the first word of "dsymutil", so it can be a program name with args. set dummy dsymutil; ac_word=$2 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_ac_ct_DSYMUTIL+set}" = set; then $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_DSYMUTIL"; then ac_cv_prog_ac_ct_DSYMUTIL="$ac_ct_DSYMUTIL" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_DSYMUTIL="dsymutil" $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_DSYMUTIL=$ac_cv_prog_ac_ct_DSYMUTIL if test -n "$ac_ct_DSYMUTIL"; then { $as_echo "$as_me:$LINENO: result: $ac_ct_DSYMUTIL" >&5 $as_echo "$ac_ct_DSYMUTIL" >&6; } else { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_DSYMUTIL" = x; then DSYMUTIL=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac DSYMUTIL=$ac_ct_DSYMUTIL fi else DSYMUTIL="$ac_cv_prog_DSYMUTIL" fi if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}nmedit", so it can be a program name with args. set dummy ${ac_tool_prefix}nmedit; ac_word=$2 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_NMEDIT+set}" = set; then $as_echo_n "(cached) " >&6 else if test -n "$NMEDIT"; then ac_cv_prog_NMEDIT="$NMEDIT" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_NMEDIT="${ac_tool_prefix}nmedit" $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi NMEDIT=$ac_cv_prog_NMEDIT if test -n "$NMEDIT"; then { $as_echo "$as_me:$LINENO: result: $NMEDIT" >&5 $as_echo "$NMEDIT" >&6; } else { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_NMEDIT"; then ac_ct_NMEDIT=$NMEDIT # Extract the first word of "nmedit", so it can be a program name with args. set dummy nmedit; ac_word=$2 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_ac_ct_NMEDIT+set}" = set; then $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_NMEDIT"; then ac_cv_prog_ac_ct_NMEDIT="$ac_ct_NMEDIT" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_NMEDIT="nmedit" $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_NMEDIT=$ac_cv_prog_ac_ct_NMEDIT if test -n "$ac_ct_NMEDIT"; then { $as_echo "$as_me:$LINENO: result: $ac_ct_NMEDIT" >&5 $as_echo "$ac_ct_NMEDIT" >&6; } else { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_NMEDIT" = x; then NMEDIT=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac NMEDIT=$ac_ct_NMEDIT fi else NMEDIT="$ac_cv_prog_NMEDIT" fi if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}lipo", so it can be a program name with args. set dummy ${ac_tool_prefix}lipo; ac_word=$2 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_LIPO+set}" = set; then $as_echo_n "(cached) " >&6 else if test -n "$LIPO"; then ac_cv_prog_LIPO="$LIPO" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_LIPO="${ac_tool_prefix}lipo" $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi LIPO=$ac_cv_prog_LIPO if test -n "$LIPO"; then { $as_echo "$as_me:$LINENO: result: $LIPO" >&5 $as_echo "$LIPO" >&6; } else { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_LIPO"; then ac_ct_LIPO=$LIPO # Extract the first word of "lipo", so it can be a program name with args. set dummy lipo; ac_word=$2 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_ac_ct_LIPO+set}" = set; then $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_LIPO"; then ac_cv_prog_ac_ct_LIPO="$ac_ct_LIPO" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_LIPO="lipo" $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_LIPO=$ac_cv_prog_ac_ct_LIPO if test -n "$ac_ct_LIPO"; then { $as_echo "$as_me:$LINENO: result: $ac_ct_LIPO" >&5 $as_echo "$ac_ct_LIPO" >&6; } else { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_LIPO" = x; then LIPO=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac LIPO=$ac_ct_LIPO fi else LIPO="$ac_cv_prog_LIPO" fi if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}otool", so it can be a program name with args. set dummy ${ac_tool_prefix}otool; ac_word=$2 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_OTOOL+set}" = set; then $as_echo_n "(cached) " >&6 else if test -n "$OTOOL"; then ac_cv_prog_OTOOL="$OTOOL" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_OTOOL="${ac_tool_prefix}otool" $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi OTOOL=$ac_cv_prog_OTOOL if test -n "$OTOOL"; then { $as_echo "$as_me:$LINENO: result: $OTOOL" >&5 $as_echo "$OTOOL" >&6; } else { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_OTOOL"; then ac_ct_OTOOL=$OTOOL # Extract the first word of "otool", so it can be a program name with args. set dummy otool; ac_word=$2 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_ac_ct_OTOOL+set}" = set; then $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_OTOOL"; then ac_cv_prog_ac_ct_OTOOL="$ac_ct_OTOOL" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_OTOOL="otool" $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_OTOOL=$ac_cv_prog_ac_ct_OTOOL if test -n "$ac_ct_OTOOL"; then { $as_echo "$as_me:$LINENO: result: $ac_ct_OTOOL" >&5 $as_echo "$ac_ct_OTOOL" >&6; } else { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_OTOOL" = x; then OTOOL=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac OTOOL=$ac_ct_OTOOL fi else OTOOL="$ac_cv_prog_OTOOL" fi if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}otool64", so it can be a program name with args. set dummy ${ac_tool_prefix}otool64; ac_word=$2 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_OTOOL64+set}" = set; then $as_echo_n "(cached) " >&6 else if test -n "$OTOOL64"; then ac_cv_prog_OTOOL64="$OTOOL64" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_OTOOL64="${ac_tool_prefix}otool64" $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi OTOOL64=$ac_cv_prog_OTOOL64 if test -n "$OTOOL64"; then { $as_echo "$as_me:$LINENO: result: $OTOOL64" >&5 $as_echo "$OTOOL64" >&6; } else { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_OTOOL64"; then ac_ct_OTOOL64=$OTOOL64 # Extract the first word of "otool64", so it can be a program name with args. set dummy otool64; ac_word=$2 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_ac_ct_OTOOL64+set}" = set; then $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_OTOOL64"; then ac_cv_prog_ac_ct_OTOOL64="$ac_ct_OTOOL64" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_OTOOL64="otool64" $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_OTOOL64=$ac_cv_prog_ac_ct_OTOOL64 if test -n "$ac_ct_OTOOL64"; then { $as_echo "$as_me:$LINENO: result: $ac_ct_OTOOL64" >&5 $as_echo "$ac_ct_OTOOL64" >&6; } else { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_OTOOL64" = x; then OTOOL64=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac OTOOL64=$ac_ct_OTOOL64 fi else OTOOL64="$ac_cv_prog_OTOOL64" fi { $as_echo "$as_me:$LINENO: checking for -single_module linker flag" >&5 $as_echo_n "checking for -single_module linker flag... " >&6; } if test "${lt_cv_apple_cc_single_mod+set}" = set; then $as_echo_n "(cached) " >&6 else lt_cv_apple_cc_single_mod=no if test -z "${LT_MULTI_MODULE}"; then # By default we will add the -single_module flag. You can override # by either setting the environment variable LT_MULTI_MODULE # non-empty at configure time, or by adding -multi_module to the # link flags. rm -rf libconftest.dylib* echo "int foo(void){return 1;}" > conftest.c echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ -dynamiclib -Wl,-single_module conftest.c" >&5 $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ -dynamiclib -Wl,-single_module conftest.c 2>conftest.err _lt_result=$? if test -f libconftest.dylib && test ! -s conftest.err && test $_lt_result = 0; then lt_cv_apple_cc_single_mod=yes else cat conftest.err >&5 fi rm -rf libconftest.dylib* rm -f conftest.* fi fi { $as_echo "$as_me:$LINENO: result: $lt_cv_apple_cc_single_mod" >&5 $as_echo "$lt_cv_apple_cc_single_mod" >&6; } { $as_echo "$as_me:$LINENO: checking for -exported_symbols_list linker flag" >&5 $as_echo_n "checking for -exported_symbols_list linker flag... " >&6; } if test "${lt_cv_ld_exported_symbols_list+set}" = set; then $as_echo_n "(cached) " >&6 else lt_cv_ld_exported_symbols_list=no save_LDFLAGS=$LDFLAGS echo "_main" > conftest.sym LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || $as_test_x conftest$ac_exeext }; then lt_cv_ld_exported_symbols_list=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 lt_cv_ld_exported_symbols_list=no fi rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LDFLAGS="$save_LDFLAGS" fi { $as_echo "$as_me:$LINENO: result: $lt_cv_ld_exported_symbols_list" >&5 $as_echo "$lt_cv_ld_exported_symbols_list" >&6; } case $host_os in rhapsody* | darwin1.[012]) _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;; darwin1.*) _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; darwin*) # darwin 5.x on # if running on 10.5 or later, the deployment target defaults # to the OS version, if on x86, and 10.4, the deployment # target defaults to 10.4. Don't you love it? case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in 10.0,*86*-darwin8*|10.0,*-darwin[91]*) _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; 10.[012]*) _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; 10.*) _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; esac ;; esac if test "$lt_cv_apple_cc_single_mod" = "yes"; then _lt_dar_single_mod='$single_module' fi if test "$lt_cv_ld_exported_symbols_list" = "yes"; then _lt_dar_export_syms=' ${wl}-exported_symbols_list,$output_objdir/${libname}-symbols.expsym' else _lt_dar_export_syms='~$NMEDIT -s $output_objdir/${libname}-symbols.expsym ${lib}' fi if test "$DSYMUTIL" != ":"; then _lt_dsymutil='~$DSYMUTIL $lib || :' else _lt_dsymutil= fi ;; esac for ac_header in dlfcn.h do as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 $as_echo_n "checking for $ac_header... " >&6; } if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default #include <$ac_header> _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then eval "$as_ac_Header=yes" else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 eval "$as_ac_Header=no" fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi ac_res=`eval 'as_val=${'$as_ac_Header'} $as_echo "$as_val"'` { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } as_val=`eval 'as_val=${'$as_ac_Header'} $as_echo "$as_val"'` if test "x$as_val" = x""yes; then cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi done ac_ext=cpp ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_cxx_compiler_gnu if test -z "$CXX"; then if test -n "$CCC"; then CXX=$CCC else if test -n "$ac_tool_prefix"; then for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_CXX+set}" = set; then $as_echo_n "(cached) " >&6 else if test -n "$CXX"; then ac_cv_prog_CXX="$CXX" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_CXX="$ac_tool_prefix$ac_prog" $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi CXX=$ac_cv_prog_CXX if test -n "$CXX"; then { $as_echo "$as_me:$LINENO: result: $CXX" >&5 $as_echo "$CXX" >&6; } else { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } fi test -n "$CXX" && break done fi if test -z "$CXX"; then ac_ct_CXX=$CXX for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_ac_ct_CXX+set}" = set; then $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_CXX"; then ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_CXX="$ac_prog" $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_CXX=$ac_cv_prog_ac_ct_CXX if test -n "$ac_ct_CXX"; then { $as_echo "$as_me:$LINENO: result: $ac_ct_CXX" >&5 $as_echo "$ac_ct_CXX" >&6; } else { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } fi test -n "$ac_ct_CXX" && break done if test "x$ac_ct_CXX" = x; then CXX="g++" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac CXX=$ac_ct_CXX fi fi fi fi # Provide some information about the compiler. $as_echo "$as_me:$LINENO: checking for C++ compiler version" >&5 set X $ac_compile ac_compiler=$2 { (ac_try="$ac_compiler --version >&5" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compiler --version >&5") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } { (ac_try="$ac_compiler -v >&5" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compiler -v >&5") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } { (ac_try="$ac_compiler -V >&5" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compiler -V >&5") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } { $as_echo "$as_me:$LINENO: checking whether we are using the GNU C++ compiler" >&5 $as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; } if test "${ac_cv_cxx_compiler_gnu+set}" = set; then $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { #ifndef __GNUC__ choke me #endif ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_cxx_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_compiler_gnu=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_compiler_gnu=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_cv_cxx_compiler_gnu=$ac_compiler_gnu fi { $as_echo "$as_me:$LINENO: result: $ac_cv_cxx_compiler_gnu" >&5 $as_echo "$ac_cv_cxx_compiler_gnu" >&6; } if test $ac_compiler_gnu = yes; then GXX=yes else GXX= fi ac_test_CXXFLAGS=${CXXFLAGS+set} ac_save_CXXFLAGS=$CXXFLAGS { $as_echo "$as_me:$LINENO: checking whether $CXX accepts -g" >&5 $as_echo_n "checking whether $CXX accepts -g... " >&6; } if test "${ac_cv_prog_cxx_g+set}" = set; then $as_echo_n "(cached) " >&6 else ac_save_cxx_werror_flag=$ac_cxx_werror_flag ac_cxx_werror_flag=yes ac_cv_prog_cxx_g=no CXXFLAGS="-g" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_cxx_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_cv_prog_cxx_g=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 CXXFLAGS="" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_cxx_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then : else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cxx_werror_flag=$ac_save_cxx_werror_flag CXXFLAGS="-g" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_cxx_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_cv_prog_cxx_g=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_cxx_werror_flag=$ac_save_cxx_werror_flag fi { $as_echo "$as_me:$LINENO: result: $ac_cv_prog_cxx_g" >&5 $as_echo "$ac_cv_prog_cxx_g" >&6; } if test "$ac_test_CXXFLAGS" = set; then CXXFLAGS=$ac_save_CXXFLAGS elif test $ac_cv_prog_cxx_g = yes; then if test "$GXX" = yes; then CXXFLAGS="-g -O2" else CXXFLAGS="-g" fi else if test "$GXX" = yes; then CXXFLAGS="-O2" else CXXFLAGS= fi fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu depcc="$CXX" am_compiler_list= { $as_echo "$as_me:$LINENO: checking dependency style of $depcc" >&5 $as_echo_n "checking dependency style of $depcc... " >&6; } if test "${am_cv_CXX_dependencies_compiler_type+set}" = set; then $as_echo_n "(cached) " >&6 else 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_CXX_dependencies_compiler_type=none if test "$am_compiler_list" = ""; then am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp` fi am__universal=false case " $depcc " in #( *\ -arch\ *\ -arch\ *) am__universal=true ;; esac 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 # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with # Solaris 8's {/usr,}/bin/sh. touch sub/conftst$i.h done echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf # 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. Also, some Intel # versions had trouble with output in subdirs am__obj=sub/conftest.${OBJEXT-o} am__minus_obj="-o $am__obj" case $depmode in gcc) # This depmode causes a compiler race in universal mode. test "$am__universal" = false || continue ;; 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 ;; msvisualcpp | msvcmsys) # This compiler won't grok `-c -o', but also, the minuso test has # not run yet. These depmodes are late enough in the game, and # so weak that their functioning should not be impacted. am__obj=conftest.${OBJEXT-o} am__minus_obj= ;; none) break ;; esac if depmode=$depmode \ source=sub/conftest.c object=$am__obj \ depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ >/dev/null 2>conftest.err && grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && grep $am__obj 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 # or remarks (even with -Werror). So we grep stderr for any message # that says an option was ignored or not supported. # When given -MP, icc 7.0 and 7.1 complain thusly: # icc: Command line warning: ignoring option '-M'; no argument required # The diagnosis changed in icc 8.0: # icc: Command line remark: option '-MP' not supported if (grep 'ignoring option' conftest.err || grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else am_cv_CXX_dependencies_compiler_type=$depmode break fi fi done cd .. rm -rf conftest.dir else am_cv_CXX_dependencies_compiler_type=none fi fi { $as_echo "$as_me:$LINENO: result: $am_cv_CXX_dependencies_compiler_type" >&5 $as_echo "$am_cv_CXX_dependencies_compiler_type" >&6; } CXXDEPMODE=depmode=$am_cv_CXX_dependencies_compiler_type if test "x$enable_dependency_tracking" != xno \ && test "$am_cv_CXX_dependencies_compiler_type" = gcc3; then am__fastdepCXX_TRUE= am__fastdepCXX_FALSE='#' else am__fastdepCXX_TRUE='#' am__fastdepCXX_FALSE= fi if test -n "$CXX" && ( test "X$CXX" != "Xno" && ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) || (test "X$CXX" != "Xg++"))) ; then ac_ext=cpp ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_cxx_compiler_gnu { $as_echo "$as_me:$LINENO: checking how to run the C++ preprocessor" >&5 $as_echo_n "checking how to run the C++ preprocessor... " >&6; } if test -z "$CXXCPP"; then if test "${ac_cv_prog_CXXCPP+set}" = set; then $as_echo_n "(cached) " >&6 else # Double quotes because CXXCPP needs to be expanded for CXXCPP in "$CXX -E" "/lib/cpp" do ac_preproc_ok=false for ac_cxx_preproc_warn_flag in '' yes do # Use a header file that comes with gcc, so configuring glibc # with a fresh cross-compiler works. # Prefer to if __STDC__ is defined, since # exists even on freestanding compilers. # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. "Syntax error" is here to catch this case. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #ifdef __STDC__ # include #else # include #endif Syntax error _ACEOF if { (ac_try="$ac_cpp conftest.$ac_ext" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null && { test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" || test ! -s conftest.err }; then : else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 # Broken: fails on valid input. continue fi rm -f conftest.err conftest.$ac_ext # OK, works on sane cases. Now check whether nonexistent headers # can be detected and how. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF if { (ac_try="$ac_cpp conftest.$ac_ext" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null && { test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" || test ! -s conftest.err }; then # Broken: success on invalid input. continue else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 # Passes both tests. ac_preproc_ok=: break fi rm -f conftest.err conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. rm -f conftest.err conftest.$ac_ext if $ac_preproc_ok; then break fi done ac_cv_prog_CXXCPP=$CXXCPP fi CXXCPP=$ac_cv_prog_CXXCPP else ac_cv_prog_CXXCPP=$CXXCPP fi { $as_echo "$as_me:$LINENO: result: $CXXCPP" >&5 $as_echo "$CXXCPP" >&6; } ac_preproc_ok=false for ac_cxx_preproc_warn_flag in '' yes do # Use a header file that comes with gcc, so configuring glibc # with a fresh cross-compiler works. # Prefer to if __STDC__ is defined, since # exists even on freestanding compilers. # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. "Syntax error" is here to catch this case. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #ifdef __STDC__ # include #else # include #endif Syntax error _ACEOF if { (ac_try="$ac_cpp conftest.$ac_ext" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null && { test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" || test ! -s conftest.err }; then : else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 # Broken: fails on valid input. continue fi rm -f conftest.err conftest.$ac_ext # OK, works on sane cases. Now check whether nonexistent headers # can be detected and how. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF if { (ac_try="$ac_cpp conftest.$ac_ext" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null && { test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" || test ! -s conftest.err }; then # Broken: success on invalid input. continue else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 # Passes both tests. ac_preproc_ok=: break fi rm -f conftest.err conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. rm -f conftest.err conftest.$ac_ext if $ac_preproc_ok; then : else { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} _lt_caught_CXX_error=yes; } fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu else _lt_caught_CXX_error=yes fi # Set options enable_dlopen=yes enable_win32_dll=yes case $host in *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-cegcc*) if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}as", so it can be a program name with args. set dummy ${ac_tool_prefix}as; ac_word=$2 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_AS+set}" = set; then $as_echo_n "(cached) " >&6 else if test -n "$AS"; then ac_cv_prog_AS="$AS" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_AS="${ac_tool_prefix}as" $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi AS=$ac_cv_prog_AS if test -n "$AS"; then { $as_echo "$as_me:$LINENO: result: $AS" >&5 $as_echo "$AS" >&6; } else { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_AS"; then ac_ct_AS=$AS # Extract the first word of "as", so it can be a program name with args. set dummy as; ac_word=$2 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_ac_ct_AS+set}" = set; then $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_AS"; then ac_cv_prog_ac_ct_AS="$ac_ct_AS" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_AS="as" $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_AS=$ac_cv_prog_ac_ct_AS if test -n "$ac_ct_AS"; then { $as_echo "$as_me:$LINENO: result: $ac_ct_AS" >&5 $as_echo "$ac_ct_AS" >&6; } else { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_AS" = x; then AS="false" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac AS=$ac_ct_AS fi else AS="$ac_cv_prog_AS" fi if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args. set dummy ${ac_tool_prefix}dlltool; ac_word=$2 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_DLLTOOL+set}" = set; then $as_echo_n "(cached) " >&6 else if test -n "$DLLTOOL"; then ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool" $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi DLLTOOL=$ac_cv_prog_DLLTOOL if test -n "$DLLTOOL"; then { $as_echo "$as_me:$LINENO: result: $DLLTOOL" >&5 $as_echo "$DLLTOOL" >&6; } else { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_DLLTOOL"; then ac_ct_DLLTOOL=$DLLTOOL # Extract the first word of "dlltool", so it can be a program name with args. set dummy dlltool; ac_word=$2 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_ac_ct_DLLTOOL+set}" = set; then $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_DLLTOOL"; then ac_cv_prog_ac_ct_DLLTOOL="$ac_ct_DLLTOOL" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_DLLTOOL="dlltool" $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_DLLTOOL=$ac_cv_prog_ac_ct_DLLTOOL if test -n "$ac_ct_DLLTOOL"; then { $as_echo "$as_me:$LINENO: result: $ac_ct_DLLTOOL" >&5 $as_echo "$ac_ct_DLLTOOL" >&6; } else { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_DLLTOOL" = x; then DLLTOOL="false" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac DLLTOOL=$ac_ct_DLLTOOL fi else DLLTOOL="$ac_cv_prog_DLLTOOL" fi if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}objdump", so it can be a program name with args. set dummy ${ac_tool_prefix}objdump; ac_word=$2 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_OBJDUMP+set}" = set; then $as_echo_n "(cached) " >&6 else if test -n "$OBJDUMP"; then ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_OBJDUMP="${ac_tool_prefix}objdump" $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi OBJDUMP=$ac_cv_prog_OBJDUMP if test -n "$OBJDUMP"; then { $as_echo "$as_me:$LINENO: result: $OBJDUMP" >&5 $as_echo "$OBJDUMP" >&6; } else { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_OBJDUMP"; then ac_ct_OBJDUMP=$OBJDUMP # Extract the first word of "objdump", so it can be a program name with args. set dummy objdump; ac_word=$2 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_ac_ct_OBJDUMP+set}" = set; then $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_OBJDUMP"; then ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_OBJDUMP="objdump" $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP if test -n "$ac_ct_OBJDUMP"; then { $as_echo "$as_me:$LINENO: result: $ac_ct_OBJDUMP" >&5 $as_echo "$ac_ct_OBJDUMP" >&6; } else { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_OBJDUMP" = x; then OBJDUMP="false" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac OBJDUMP=$ac_ct_OBJDUMP fi else OBJDUMP="$ac_cv_prog_OBJDUMP" fi ;; esac test -z "$AS" && AS=as test -z "$DLLTOOL" && DLLTOOL=dlltool test -z "$OBJDUMP" && OBJDUMP=objdump # Check whether --enable-static was given. if test "${enable_static+set}" = set; then enableval=$enable_static; 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 else enable_static=no fi # Check whether --enable-shared was given. if test "${enable_shared+set}" = set; then enableval=$enable_shared; 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 else enable_shared=yes fi # Check whether --with-pic was given. if test "${with_pic+set}" = set; then withval=$with_pic; pic_mode="$withval" else pic_mode=default fi test -z "$pic_mode" && pic_mode=default # Check whether --enable-fast-install was given. if test "${enable_fast_install+set}" = set; then enableval=$enable_fast_install; 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 else enable_fast_install=yes fi # This can be used to rebuild libtool when needed LIBTOOL_DEPS="$ltmain" # Always use our own libtool. LIBTOOL='$(SHELL) $(top_builddir)/libtool' test -z "$LN_S" && LN_S="ln -s" if test -n "${ZSH_VERSION+set}" ; then setopt NO_GLOB_SUBST fi { $as_echo "$as_me:$LINENO: checking for objdir" >&5 $as_echo_n "checking for objdir... " >&6; } if test "${lt_cv_objdir+set}" = set; then $as_echo_n "(cached) " >&6 else 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_objdir=_libs fi rmdir .libs 2>/dev/null fi { $as_echo "$as_me:$LINENO: result: $lt_cv_objdir" >&5 $as_echo "$lt_cv_objdir" >&6; } objdir=$lt_cv_objdir cat >>confdefs.h <<_ACEOF #define LT_OBJDIR "$lt_cv_objdir/" _ACEOF 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. 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 delay expansion of an escaped single quote. delay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g' # Sed substitution to avoid accidental globbing in evaled expressions no_glob_subst='s/\*/\\\*/g' # Global variables: ofile=libtool can_build_shared=yes # All known linkers require a `.a' archive for static linking (except MSVC, # which needs '.lib'). libext=a with_gnu_ld="$lt_cv_prog_gnu_ld" old_CC="$CC" old_CFLAGS="$CFLAGS" # Set sane defaults for various variables test -z "$CC" && CC=cc test -z "$LTCC" && LTCC=$CC test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS test -z "$LD" && LD=ld test -z "$ac_objext" && ac_objext=o for cc_temp in $compiler""; do case $cc_temp in compile | *[\\/]compile | ccache | *[\\/]ccache ) ;; distcc | *[\\/]distcc | purify | *[\\/]purify ) ;; \-*) ;; *) break;; esac done cc_basename=`$ECHO "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"` # Only perform the check for file, if the check method requires it test -z "$MAGIC_CMD" && MAGIC_CMD=file case $deplibs_check_method in file_magic*) if test "$file_magic_cmd" = '$MAGIC_CMD'; then { $as_echo "$as_me:$LINENO: checking for ${ac_tool_prefix}file" >&5 $as_echo_n "checking for ${ac_tool_prefix}file... " >&6; } if test "${lt_cv_path_MAGIC_CMD+set}" = set; then $as_echo_n "(cached) " >&6 else 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 ac_dummy="/usr/bin$PATH_SEPARATOR$PATH" for ac_dir in $ac_dummy; do IFS="$lt_save_ifs" test -z "$ac_dir" && ac_dir=. if test -f $ac_dir/${ac_tool_prefix}file; then lt_cv_path_MAGIC_CMD="$ac_dir/${ac_tool_prefix}file" 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 <<_LT_EOF 1>&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 _LT_EOF fi ;; esac fi break fi done IFS="$lt_save_ifs" MAGIC_CMD="$lt_save_MAGIC_CMD" ;; esac fi MAGIC_CMD="$lt_cv_path_MAGIC_CMD" if test -n "$MAGIC_CMD"; then { $as_echo "$as_me:$LINENO: result: $MAGIC_CMD" >&5 $as_echo "$MAGIC_CMD" >&6; } else { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } fi if test -z "$lt_cv_path_MAGIC_CMD"; then if test -n "$ac_tool_prefix"; then { $as_echo "$as_me:$LINENO: checking for file" >&5 $as_echo_n "checking for file... " >&6; } if test "${lt_cv_path_MAGIC_CMD+set}" = set; then $as_echo_n "(cached) " >&6 else 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 ac_dummy="/usr/bin$PATH_SEPARATOR$PATH" for ac_dir in $ac_dummy; do IFS="$lt_save_ifs" test -z "$ac_dir" && ac_dir=. if test -f $ac_dir/file; then lt_cv_path_MAGIC_CMD="$ac_dir/file" 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 <<_LT_EOF 1>&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 _LT_EOF fi ;; esac fi break fi done IFS="$lt_save_ifs" MAGIC_CMD="$lt_save_MAGIC_CMD" ;; esac fi MAGIC_CMD="$lt_cv_path_MAGIC_CMD" if test -n "$MAGIC_CMD"; then { $as_echo "$as_me:$LINENO: result: $MAGIC_CMD" >&5 $as_echo "$MAGIC_CMD" >&6; } else { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } fi else MAGIC_CMD=: fi fi fi ;; esac # Use C for the default configuration in the libtool script lt_save_CC="$CC" ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu # Source file extension for C test sources. ac_ext=c # Object file extension for compiled C test sources. objext=o objext=$objext # Code to be used in simple compile tests lt_simple_compile_test_code="int some_variable = 0;" # Code to be used in simple link tests lt_simple_link_test_code='int main(){return(0);}' # If no C compiler was specified, use CC. LTCC=${LTCC-"$CC"} # If no C compiler flags were specified, use CFLAGS. LTCFLAGS=${LTCFLAGS-"$CFLAGS"} # Allow CC to be a program name with arguments. compiler=$CC # Save the default compiler, since it gets overwritten when the other # tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP. compiler_DEFAULT=$CC # save warnings/boilerplate of simple test code ac_outfile=conftest.$ac_objext echo "$lt_simple_compile_test_code" >conftest.$ac_ext eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err _lt_compiler_boilerplate=`cat conftest.err` $RM conftest* ac_outfile=conftest.$ac_objext echo "$lt_simple_link_test_code" >conftest.$ac_ext eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err _lt_linker_boilerplate=`cat conftest.err` $RM -r conftest* ## CAVEAT EMPTOR: ## There is no encapsulation within the following macros, do not change ## the running order or otherwise move them around unless you know exactly ## what you are doing... if test -n "$compiler"; then lt_prog_compiler_no_builtin_flag= if test "$GCC" = yes; then lt_prog_compiler_no_builtin_flag=' -fno-builtin' { $as_echo "$as_me:$LINENO: checking if $compiler supports -fno-rtti -fno-exceptions" >&5 $as_echo_n "checking if $compiler supports -fno-rtti -fno-exceptions... " >&6; } if test "${lt_cv_prog_compiler_rtti_exceptions+set}" = set; then $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_rtti_exceptions=no ac_outfile=conftest.$ac_objext echo "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="-fno-rtti -fno-exceptions" # 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}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:11089: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 echo "$as_me:11093: \$? = $ac_status" >&5 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 other than the usual output. $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then lt_cv_prog_compiler_rtti_exceptions=yes fi fi $RM conftest* fi { $as_echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_rtti_exceptions" >&5 $as_echo "$lt_cv_prog_compiler_rtti_exceptions" >&6; } if test x"$lt_cv_prog_compiler_rtti_exceptions" = xyes; then lt_prog_compiler_no_builtin_flag="$lt_prog_compiler_no_builtin_flag -fno-rtti -fno-exceptions" else : fi fi lt_prog_compiler_wl= lt_prog_compiler_pic= lt_prog_compiler_static= { $as_echo "$as_me:$LINENO: checking for $compiler option to produce PIC" >&5 $as_echo_n "checking for $compiler option to produce PIC... " >&6; } if test "$GCC" = yes; then lt_prog_compiler_wl='-Wl,' lt_prog_compiler_static='-static' case $host_os in aix*) # All AIX code is PIC. if test "$host_cpu" = ia64; then # AIX 5 now supports IA64 processor lt_prog_compiler_static='-Bstatic' fi ;; amigaos*) case $host_cpu in powerpc) # see comment about AmigaOS4 .so support lt_prog_compiler_pic='-fPIC' ;; m68k) # 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_prog_compiler_pic='-m68020 -resident32 -malways-restore-a4' ;; esac ;; beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) # PIC is the default for these OSes. ;; mingw* | cygwin* | pw32* | os2* | cegcc*) # 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). # Although the cygwin gcc ignores -fPIC, still need this for old-style # (--disable-auto-import) libraries lt_prog_compiler_pic='-DDLL_EXPORT' ;; darwin* | rhapsody*) # PIC is the default on this platform # Common symbols not allowed in MH_DYLIB files lt_prog_compiler_pic='-fno-common' ;; hpux*) # PIC is the default for 64-bit PA HP-UX, but not for 32-bit # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag # sets the default TLS model and affects inlining. case $host_cpu in hppa*64*) # +Z the default ;; *) lt_prog_compiler_pic='-fPIC' ;; esac ;; interix[3-9]*) # Interix 3.x gcc -fpic/-fPIC options generate broken code. # Instead, we relocate shared libraries at runtime. ;; msdosdjgpp*) # Just because we use GCC doesn't mean we suddenly get shared libraries # on systems that don't support them. lt_prog_compiler_can_build_shared=no enable_shared=no ;; *nto* | *qnx*) # QNX uses GNU C++, but need to define -shared option too, otherwise # it will coredump. lt_prog_compiler_pic='-fPIC -shared' ;; sysv4*MP*) if test -d /usr/nec; then lt_prog_compiler_pic=-Kconform_pic fi ;; *) lt_prog_compiler_pic='-fPIC' ;; esac else # PORTME Check for flag to pass linker flags through the system compiler. case $host_os in aix*) lt_prog_compiler_wl='-Wl,' if test "$host_cpu" = ia64; then # AIX 5 now supports IA64 processor lt_prog_compiler_static='-Bstatic' else lt_prog_compiler_static='-bnso -bI:/lib/syscalls.exp' fi ;; mingw* | cygwin* | pw32* | os2* | cegcc*) # 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_prog_compiler_pic='-DDLL_EXPORT' ;; hpux9* | hpux10* | hpux11*) lt_prog_compiler_wl='-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_prog_compiler_pic='+Z' ;; esac # Is there a better lt_prog_compiler_static that works with the bundled CC? lt_prog_compiler_static='${wl}-a ${wl}archive' ;; irix5* | irix6* | nonstopux*) lt_prog_compiler_wl='-Wl,' # PIC (with -KPIC) is the default. lt_prog_compiler_static='-non_shared' ;; linux* | k*bsd*-gnu) case $cc_basename in # old Intel for x86_64 which still supported -KPIC. ecc*) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-static' ;; # icc used to be incompatible with GCC. # ICC 10 doesn't accept -KPIC any more. icc* | ifort*) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='-fPIC' lt_prog_compiler_static='-static' ;; # Lahey Fortran 8.1. lf95*) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='--shared' lt_prog_compiler_static='--static' ;; pgcc* | pgf77* | pgf90* | pgf95*) # Portland Group compilers (*not* the Pentium gcc compiler, # which looks to be a dead project) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='-fpic' lt_prog_compiler_static='-Bstatic' ;; ccc*) lt_prog_compiler_wl='-Wl,' # All Alpha code is PIC. lt_prog_compiler_static='-non_shared' ;; xl*) # IBM XL C 8.0/Fortran 10.1 on PPC lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='-qpic' lt_prog_compiler_static='-qstaticlink' ;; *) case `$CC -V 2>&1 | sed 5q` in *Sun\ C*) # Sun C 5.9 lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-Bstatic' lt_prog_compiler_wl='-Wl,' ;; *Sun\ F*) # Sun Fortran 8.3 passes all unrecognized flags to the linker lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-Bstatic' lt_prog_compiler_wl='' ;; esac ;; esac ;; newsos6) lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-Bstatic' ;; *nto* | *qnx*) # QNX uses GNU C++, but need to define -shared option too, otherwise # it will coredump. lt_prog_compiler_pic='-fPIC -shared' ;; osf3* | osf4* | osf5*) lt_prog_compiler_wl='-Wl,' # All OSF/1 code is PIC. lt_prog_compiler_static='-non_shared' ;; rdos*) lt_prog_compiler_static='-non_shared' ;; solaris*) lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-Bstatic' case $cc_basename in f77* | f90* | f95*) lt_prog_compiler_wl='-Qoption ld ';; *) lt_prog_compiler_wl='-Wl,';; esac ;; sunos4*) lt_prog_compiler_wl='-Qoption ld ' lt_prog_compiler_pic='-PIC' lt_prog_compiler_static='-Bstatic' ;; sysv4 | sysv4.2uw2* | sysv4.3*) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-Bstatic' ;; sysv4*MP*) if test -d /usr/nec ;then lt_prog_compiler_pic='-Kconform_pic' lt_prog_compiler_static='-Bstatic' fi ;; sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-Bstatic' ;; unicos*) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_can_build_shared=no ;; uts4*) lt_prog_compiler_pic='-pic' lt_prog_compiler_static='-Bstatic' ;; *) lt_prog_compiler_can_build_shared=no ;; esac fi case $host_os in # For platforms which do not support PIC, -DPIC is meaningless: *djgpp*) lt_prog_compiler_pic= ;; *) lt_prog_compiler_pic="$lt_prog_compiler_pic -DPIC" ;; esac { $as_echo "$as_me:$LINENO: result: $lt_prog_compiler_pic" >&5 $as_echo "$lt_prog_compiler_pic" >&6; } # # Check to make sure the PIC flag actually works. # if test -n "$lt_prog_compiler_pic"; then { $as_echo "$as_me:$LINENO: checking if $compiler PIC flag $lt_prog_compiler_pic works" >&5 $as_echo_n "checking if $compiler PIC flag $lt_prog_compiler_pic works... " >&6; } if test "${lt_cv_prog_compiler_pic_works+set}" = set; then $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_pic_works=no ac_outfile=conftest.$ac_objext echo "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="$lt_prog_compiler_pic -DPIC" # 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}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:11428: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 echo "$as_me:11432: \$? = $ac_status" >&5 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 other than the usual output. $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then lt_cv_prog_compiler_pic_works=yes fi fi $RM conftest* fi { $as_echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_pic_works" >&5 $as_echo "$lt_cv_prog_compiler_pic_works" >&6; } if test x"$lt_cv_prog_compiler_pic_works" = xyes; then case $lt_prog_compiler_pic in "" | " "*) ;; *) lt_prog_compiler_pic=" $lt_prog_compiler_pic" ;; esac else lt_prog_compiler_pic= lt_prog_compiler_can_build_shared=no fi fi # # Check to make sure the static flag actually works. # wl=$lt_prog_compiler_wl eval lt_tmp_static_flag=\"$lt_prog_compiler_static\" { $as_echo "$as_me:$LINENO: checking if $compiler static flag $lt_tmp_static_flag works" >&5 $as_echo_n "checking if $compiler static flag $lt_tmp_static_flag works... " >&6; } if test "${lt_cv_prog_compiler_static_works+set}" = set; then $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_static_works=no save_LDFLAGS="$LDFLAGS" LDFLAGS="$LDFLAGS $lt_tmp_static_flag" echo "$lt_simple_link_test_code" > conftest.$ac_ext if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then # The linker 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>&5 $ECHO "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if diff conftest.exp conftest.er2 >/dev/null; then lt_cv_prog_compiler_static_works=yes fi else lt_cv_prog_compiler_static_works=yes fi fi $RM -r conftest* LDFLAGS="$save_LDFLAGS" fi { $as_echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_static_works" >&5 $as_echo "$lt_cv_prog_compiler_static_works" >&6; } if test x"$lt_cv_prog_compiler_static_works" = xyes; then : else lt_prog_compiler_static= fi { $as_echo "$as_me:$LINENO: checking if $compiler supports -c -o file.$ac_objext" >&5 $as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; } if test "${lt_cv_prog_compiler_c_o+set}" = set; then $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_c_o=no $RM -r conftest 2>/dev/null mkdir conftest cd conftest mkdir out echo "$lt_simple_compile_test_code" > conftest.$ac_ext 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}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:11533: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 echo "$as_me:11537: \$? = $ac_status" >&5 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 $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then lt_cv_prog_compiler_c_o=yes fi fi chmod u+w . 2>&5 $RM conftest* # SGI C++ compiler will create directory out/ii_files/ for # template instantiation test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files $RM out/* && rmdir out cd .. $RM -r conftest $RM conftest* fi { $as_echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_c_o" >&5 $as_echo "$lt_cv_prog_compiler_c_o" >&6; } { $as_echo "$as_me:$LINENO: checking if $compiler supports -c -o file.$ac_objext" >&5 $as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; } if test "${lt_cv_prog_compiler_c_o+set}" = set; then $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_c_o=no $RM -r conftest 2>/dev/null mkdir conftest cd conftest mkdir out echo "$lt_simple_compile_test_code" > conftest.$ac_ext 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}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:11588: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 echo "$as_me:11592: \$? = $ac_status" >&5 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 $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then lt_cv_prog_compiler_c_o=yes fi fi chmod u+w . 2>&5 $RM conftest* # SGI C++ compiler will create directory out/ii_files/ for # template instantiation test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files $RM out/* && rmdir out cd .. $RM -r conftest $RM conftest* fi { $as_echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_c_o" >&5 $as_echo "$lt_cv_prog_compiler_c_o" >&6; } hard_links="nottested" if test "$lt_cv_prog_compiler_c_o" = no && test "$need_locks" != no; then # do not overwrite the value of need_locks provided by the user { $as_echo "$as_me:$LINENO: checking if we can lock with hard links" >&5 $as_echo_n "checking if we can lock with hard links... " >&6; } 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 { $as_echo "$as_me:$LINENO: result: $hard_links" >&5 $as_echo "$hard_links" >&6; } if test "$hard_links" = no; then { $as_echo "$as_me:$LINENO: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&5 $as_echo "$as_me: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&2;} need_locks=warn fi else need_locks=no fi { $as_echo "$as_me:$LINENO: checking whether the $compiler linker ($LD) supports shared libraries" >&5 $as_echo_n "checking whether the $compiler linker ($LD) supports shared libraries... " >&6; } runpath_var= allow_undefined_flag= always_export_symbols=no archive_cmds= archive_expsym_cmds= compiler_needs_object=no enable_shared_with_static_runtimes=no export_dynamic_flag_spec= export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' hardcode_automatic=no hardcode_direct=no hardcode_direct_absolute=no hardcode_libdir_flag_spec= hardcode_libdir_flag_spec_ld= hardcode_libdir_separator= hardcode_minus_L=no hardcode_shlibpath_var=unsupported inherit_rpath=no link_all_deplibs=unknown module_cmds= module_expsym_cmds= old_archive_from_new_cmds= old_archive_from_expsyms_cmds= thread_safe_flag_spec= whole_archive_flag_spec= # include_expsyms should be a list of space-separated symbols to be *always* # included in the symbol list include_expsyms= # 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'. exclude_expsyms='_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*' # 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. # Exclude shared library initialization/finalization symbols. extract_expsyms_cmds= case $host_os in cygwin* | mingw* | pw32* | cegcc*) # 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 ;; interix*) # we just hope/assume this is gcc and not c89 (= MSVC++) with_gnu_ld=yes ;; openbsd*) with_gnu_ld=no ;; esac ld_shlibs=yes if test "$with_gnu_ld" = yes; then # If archive_cmds runs LD, not CC, wlarc should be empty wlarc='${wl}' # Set some defaults for GNU ld with shared library support. These # are reset later if shared libraries are not supported. Putting them # here allows them to be overridden if necessary. runpath_var=LD_RUN_PATH hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' export_dynamic_flag_spec='${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 whole_archive_flag_spec="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' else whole_archive_flag_spec= fi supports_anon_versioning=no case `$LD -v 2>&1` 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 # See if GNU ld supports shared libraries. case $host_os in aix[3-9]*) # On AIX/PPC, the GNU linker is very broken if test "$host_cpu" != ia64; then ld_shlibs=no cat <<_LT_EOF 1>&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. _LT_EOF fi ;; amigaos*) case $host_cpu in powerpc) # see comment about AmigaOS4 .so support archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds='' ;; m68k) archive_cmds='$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)' hardcode_libdir_flag_spec='-L$libdir' hardcode_minus_L=yes ;; esac ;; beos*) if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then allow_undefined_flag=unsupported # Joseph Beckenbach says some releases of gcc # support --undefined. This deserves some investigation. FIXME archive_cmds='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' else ld_shlibs=no fi ;; cygwin* | mingw* | pw32* | cegcc*) # _LT_TAGVAR(hardcode_libdir_flag_spec, ) is actually meaningless, # as there is no search path for DLLs. hardcode_libdir_flag_spec='-L$libdir' allow_undefined_flag=unsupported always_export_symbols=no enable_shared_with_static_runtimes=yes export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1 DATA/'\'' | $SED -e '\''/^[AITW][ ]/s/.*[ ]//'\'' | sort | uniq > $export_symbols' if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' # If the export-symbols file already is a .def file (1st line # is EXPORTS), use it as is; otherwise, prepend... archive_expsym_cmds='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}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' else ld_shlibs=no fi ;; interix[3-9]*) hardcode_direct=no hardcode_shlibpath_var=no hardcode_libdir_flag_spec='${wl}-rpath,$libdir' export_dynamic_flag_spec='${wl}-E' # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. # Instead, shared libraries are loaded at an image base (0x10000000 by # default) and relocated if they conflict, which is a slow very memory # consuming and fragmenting process. To avoid this, we pick a random, # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link # time. Moving up from 0x10000000 also allows more sbrk(2) space. archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' archive_expsym_cmds='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' ;; gnu* | linux* | tpf* | k*bsd*-gnu) tmp_diet=no if test "$host_os" = linux-dietlibc; then case $cc_basename in diet\ *) tmp_diet=yes;; # linux-dietlibc with static linking (!diet-dyn) esac fi if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \ && test "$tmp_diet" = no then tmp_addflag= tmp_sharedflag='-shared' case $cc_basename,$host_cpu in pgcc*) # Portland Group C compiler whole_archive_flag_spec='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive' tmp_addflag=' $pic_flag' ;; pgf77* | pgf90* | pgf95*) # Portland Group f77 and f90 compilers whole_archive_flag_spec='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive' tmp_addflag=' $pic_flag -Mnomain' ;; ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64 tmp_addflag=' -i_dynamic' ;; efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64 tmp_addflag=' -i_dynamic -nofor_main' ;; ifc* | ifort*) # Intel Fortran compiler tmp_addflag=' -nofor_main' ;; lf95*) # Lahey Fortran 8.1 whole_archive_flag_spec= tmp_sharedflag='--shared' ;; xl[cC]*) # IBM XL C 8.0 on PPC (deal with xlf below) tmp_sharedflag='-qmkshrobj' tmp_addflag= ;; esac case `$CC -V 2>&1 | sed 5q` in *Sun\ C*) # Sun C 5.9 whole_archive_flag_spec='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive' compiler_needs_object=yes tmp_sharedflag='-G' ;; *Sun\ F*) # Sun Fortran 8.3 tmp_sharedflag='-G' ;; esac archive_cmds='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' if test "x$supports_anon_versioning" = xyes; then archive_expsym_cmds='echo "{ global:" > $output_objdir/$libname.ver~ cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ echo "local: *; };" >> $output_objdir/$libname.ver~ $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' fi case $cc_basename in xlf*) # IBM XL Fortran 10.1 on PPC cannot create shared libs itself whole_archive_flag_spec='--whole-archive$convenience --no-whole-archive' hardcode_libdir_flag_spec= hardcode_libdir_flag_spec_ld='-rpath $libdir' archive_cmds='$LD -shared $libobjs $deplibs $compiler_flags -soname $soname -o $lib' if test "x$supports_anon_versioning" = xyes; then archive_expsym_cmds='echo "{ global:" > $output_objdir/$libname.ver~ cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ echo "local: *; };" >> $output_objdir/$libname.ver~ $LD -shared $libobjs $deplibs $compiler_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib' fi ;; esac else ld_shlibs=no fi ;; netbsd*) if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then archive_cmds='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' wlarc= else archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' fi ;; solaris*) if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then ld_shlibs=no cat <<_LT_EOF 1>&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. _LT_EOF elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' else ld_shlibs=no fi ;; sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*) case `$LD -v 2>&1` in *\ [01].* | *\ 2.[0-9].* | *\ 2.1[0-5].*) ld_shlibs=no cat <<_LT_EOF 1>&2 *** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not *** reliably create shared libraries on SCO systems. Therefore, libtool *** is disabling shared libraries support. We urge you to upgrade GNU *** binutils to release 2.16.91.0.3 or newer. Another option is to modify *** your PATH or compiler configuration so that the native linker is *** used, and then restart. _LT_EOF ;; *) # For security reasons, it is highly recommended that you always # use absolute paths for naming shared libraries, and exclude the # DT_RUNPATH tag from executables and libraries. But doing so # requires that you compile everything twice, which is a pain. if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' else ld_shlibs=no fi ;; esac ;; sunos4*) archive_cmds='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' wlarc= hardcode_direct=yes hardcode_shlibpath_var=no ;; *) if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' else ld_shlibs=no fi ;; esac if test "$ld_shlibs" = no; then runpath_var= hardcode_libdir_flag_spec= export_dynamic_flag_spec= whole_archive_flag_spec= fi else # PORTME fill in a description of your system's linker (not GNU ld) case $host_os in aix3*) allow_undefined_flag=unsupported always_export_symbols=yes archive_expsym_cmds='$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. hardcode_minus_L=yes if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then # Neither direct hardcoding nor static linking is supported with a # broken collect2. hardcode_direct=unsupported fi ;; aix[4-9]*) 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 export_symbols_cmds='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && (substr(\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' else export_symbols_cmds='$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].*|aix[5-9]*) 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. archive_cmds='' hardcode_direct=yes hardcode_direct_absolute=yes hardcode_libdir_separator=':' link_all_deplibs=yes file_list_spec='${wl}-f,' 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 : else # We have old collect2 hardcode_direct=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 hardcode_minus_L=yes hardcode_libdir_flag_spec='-L$libdir' hardcode_libdir_separator= fi ;; esac shared_flag='-shared' if test "$aix_use_runtimelinking" = yes; then shared_flag="$shared_flag "'${wl}-G' fi 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 export_dynamic_flag_spec='${wl}-bexpall' # It seems that -bexpall does not export symbols beginning with # underscore (_), so it is better to generate a list of symbols to export. always_export_symbols=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. allow_undefined_flag='-berok' # Determine the default libpath from the value encoded in an # empty executable. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || $as_test_x conftest$ac_exeext }; then lt_aix_libpath_sed=' /Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/ p } }' aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` # 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 "$lt_aix_libpath_sed"` fi else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath" archive_expsym_cmds='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then $ECHO "X${wl}${allow_undefined_flag}" | $Xsed; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" else if test "$host_cpu" = ia64; then hardcode_libdir_flag_spec='${wl}-R $libdir:/usr/lib:/lib' allow_undefined_flag="-z nodefs" archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols" else # Determine the default libpath from the value encoded in an # empty executable. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || $as_test_x conftest$ac_exeext }; then lt_aix_libpath_sed=' /Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/ p } }' aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` # 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 "$lt_aix_libpath_sed"` fi else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi hardcode_libdir_flag_spec='${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. no_undefined_flag=' ${wl}-bernotok' allow_undefined_flag=' ${wl}-berok' # Exported symbols can be pulled into shared objects from archives whole_archive_flag_spec='$convenience' archive_cmds_need_lc=yes # This is similar to how AIX traditionally builds its shared libraries. archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' fi fi ;; amigaos*) case $host_cpu in powerpc) # see comment about AmigaOS4 .so support archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds='' ;; m68k) archive_cmds='$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)' hardcode_libdir_flag_spec='-L$libdir' hardcode_minus_L=yes ;; esac ;; bsdi[45]*) export_dynamic_flag_spec=-rdynamic ;; cygwin* | mingw* | pw32* | cegcc*) # 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. hardcode_libdir_flag_spec=' ' allow_undefined_flag=unsupported # Tell ltmain to make .lib files, not .a files. libext=lib # Tell ltmain to make .dll files, not .so files. shrext_cmds=".dll" # FIXME: Setting linknames here is a bad hack. archive_cmds='$CC -o $lib $libobjs $compiler_flags `$ECHO "X$deplibs" | $Xsed -e '\''s/ -lc$//'\''` -link -dll~linknames=' # The linker will automatically build a .lib file if we build a DLL. old_archive_from_new_cmds='true' # FIXME: Should let the user specify the lib program. old_archive_cmds='lib -OUT:$oldlib$oldobjs$old_deplibs' fix_srcfile_path='`cygpath -w "$srcfile"`' enable_shared_with_static_runtimes=yes ;; darwin* | rhapsody*) archive_cmds_need_lc=no hardcode_direct=no hardcode_automatic=yes hardcode_shlibpath_var=unsupported whole_archive_flag_spec='' link_all_deplibs=yes allow_undefined_flag="$_lt_dar_allow_undefined" case $cc_basename in ifort*) _lt_dar_can_shared=yes ;; *) _lt_dar_can_shared=$GCC ;; esac if test "$_lt_dar_can_shared" = "yes"; then output_verbose_link_cmd=echo archive_cmds="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}" module_cmds="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}" archive_expsym_cmds="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}" module_expsym_cmds="sed -e 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dar_export_syms}${_lt_dsymutil}" else ld_shlibs=no fi ;; dgux*) archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_libdir_flag_spec='-L$libdir' hardcode_shlibpath_var=no ;; freebsd1*) ld_shlibs=no ;; # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor # support. 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*) archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' hardcode_libdir_flag_spec='-R$libdir' hardcode_direct=yes hardcode_shlibpath_var=no ;; # Unfortunately, older versions of FreeBSD 2 do not have this feature. freebsd2*) archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' hardcode_direct=yes hardcode_minus_L=yes hardcode_shlibpath_var=no ;; # FreeBSD 3 and greater uses gcc -shared to do shared libraries. freebsd* | dragonfly*) archive_cmds='$CC -shared -o $lib $libobjs $deplibs $compiler_flags' hardcode_libdir_flag_spec='-R$libdir' hardcode_direct=yes hardcode_shlibpath_var=no ;; hpux9*) if test "$GCC" = yes; then archive_cmds='$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 archive_cmds='$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 hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' hardcode_libdir_separator=: hardcode_direct=yes # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. hardcode_minus_L=yes export_dynamic_flag_spec='${wl}-E' ;; hpux10*) if test "$GCC" = yes -a "$with_gnu_ld" = no; then archive_cmds='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' else archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' fi if test "$with_gnu_ld" = no; then hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' hardcode_libdir_flag_spec_ld='+b $libdir' hardcode_libdir_separator=: hardcode_direct=yes hardcode_direct_absolute=yes export_dynamic_flag_spec='${wl}-E' # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. hardcode_minus_L=yes fi ;; hpux11*) if test "$GCC" = yes -a "$with_gnu_ld" = no; then case $host_cpu in hppa*64*) archive_cmds='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' ;; ia64*) archive_cmds='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' ;; *) archive_cmds='$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*) archive_cmds='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' ;; ia64*) archive_cmds='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' ;; *) archive_cmds='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' ;; esac fi if test "$with_gnu_ld" = no; then hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' hardcode_libdir_separator=: case $host_cpu in hppa*64*|ia64*) hardcode_direct=no hardcode_shlibpath_var=no ;; *) hardcode_direct=yes hardcode_direct_absolute=yes export_dynamic_flag_spec='${wl}-E' # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. hardcode_minus_L=yes ;; esac fi ;; irix5* | irix6* | nonstopux*) if test "$GCC" = yes; then archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' # Try to use the -exported_symbol ld option, if it does not # work, assume that -exports_file does not work either and # implicitly export all symbols. save_LDFLAGS="$LDFLAGS" LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null" cat >conftest.$ac_ext <<_ACEOF int foo(void) {} _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || $as_test_x conftest$ac_exeext }; then archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations ${wl}-exports_file ${wl}$export_symbols -o $lib' else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LDFLAGS="$save_LDFLAGS" else archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib' archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -exports_file $export_symbols -o $lib' fi archive_cmds_need_lc='no' hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' hardcode_libdir_separator=: inherit_rpath=yes link_all_deplibs=yes ;; netbsd*) if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out else archive_cmds='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF fi hardcode_libdir_flag_spec='-R$libdir' hardcode_direct=yes hardcode_shlibpath_var=no ;; newsos6) archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_direct=yes hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' hardcode_libdir_separator=: hardcode_shlibpath_var=no ;; *nto* | *qnx*) ;; openbsd*) if test -f /usr/libexec/ld.so; then hardcode_direct=yes hardcode_shlibpath_var=no hardcode_direct_absolute=yes if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols' hardcode_libdir_flag_spec='${wl}-rpath,$libdir' export_dynamic_flag_spec='${wl}-E' else case $host_os in openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*) archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' hardcode_libdir_flag_spec='-R$libdir' ;; *) archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' hardcode_libdir_flag_spec='${wl}-rpath,$libdir' ;; esac fi else ld_shlibs=no fi ;; os2*) hardcode_libdir_flag_spec='-L$libdir' hardcode_minus_L=yes allow_undefined_flag=unsupported archive_cmds='$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' old_archive_from_new_cmds='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def' ;; osf3*) if test "$GCC" = yes; then allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*' archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' else allow_undefined_flag=' -expect_unresolved \*' archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib' fi archive_cmds_need_lc='no' hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' hardcode_libdir_separator=: ;; osf4* | osf5*) # as osf3* with the addition of -msym flag if test "$GCC" = yes; then allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*' archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' else allow_undefined_flag=' -expect_unresolved \*' archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -msym -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib' archive_expsym_cmds='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; printf "%s\\n" "-hidden">> $lib.exp~ $CC -shared${allow_undefined_flag} ${wl}-input ${wl}$lib.exp $compiler_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib~$RM $lib.exp' # Both c and cxx compiler support -rpath directly hardcode_libdir_flag_spec='-rpath $libdir' fi archive_cmds_need_lc='no' hardcode_libdir_separator=: ;; solaris*) no_undefined_flag=' -z defs' if test "$GCC" = yes; then wlarc='${wl}' archive_cmds='$CC -shared ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ $CC -shared ${wl}-z ${wl}text ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' else case `$CC -V 2>&1` in *"Compilers 5.0"*) wlarc='' archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' archive_expsym_cmds='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' ;; *) wlarc='${wl}' archive_cmds='$CC -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ $CC -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' ;; esac fi hardcode_libdir_flag_spec='-R$libdir' hardcode_shlibpath_var=no case $host_os in solaris2.[0-5] | solaris2.[0-5].*) ;; *) # The compiler driver will combine and reorder linker options, # but understands `-z linker_flag'. GCC discards it without `$wl', # but is careful enough not to reorder. # Supported since Solaris 2.6 (maybe 2.5.1?) if test "$GCC" = yes; then whole_archive_flag_spec='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' else whole_archive_flag_spec='-z allextract$convenience -z defaultextract' fi ;; esac link_all_deplibs=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. archive_cmds='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags' else archive_cmds='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' fi hardcode_libdir_flag_spec='-L$libdir' hardcode_direct=yes hardcode_minus_L=yes hardcode_shlibpath_var=no ;; sysv4) case $host_vendor in sni) archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_direct=yes # is this really true??? ;; siemens) ## LD is ld it makes a PLAMLIB ## CC just makes a GrossModule. archive_cmds='$LD -G -o $lib $libobjs $deplibs $linker_flags' reload_cmds='$CC -r -o $output$reload_objs' hardcode_direct=no ;; motorola) archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_direct=no #Motorola manual says yes, but my tests say they lie ;; esac runpath_var='LD_RUN_PATH' hardcode_shlibpath_var=no ;; sysv4.3*) archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_shlibpath_var=no export_dynamic_flag_spec='-Bexport' ;; sysv4*MP*) if test -d /usr/nec; then archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_shlibpath_var=no runpath_var=LD_RUN_PATH hardcode_runpath_var=yes ld_shlibs=yes fi ;; sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7* | sco3.2v5.0.[024]*) no_undefined_flag='${wl}-z,text' archive_cmds_need_lc=no hardcode_shlibpath_var=no runpath_var='LD_RUN_PATH' if test "$GCC" = yes; then archive_cmds='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' else archive_cmds='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' fi ;; sysv5* | sco3.2v5* | sco5v6*) # Note: We can NOT use -z defs as we might desire, because we do not # link with -lc, and that would cause any symbols used from libc to # always be unresolved, which means just about no library would # ever link correctly. If we're not using GNU ld we use -z text # though, which does catch some bad symbols but isn't as heavy-handed # as -z defs. no_undefined_flag='${wl}-z,text' allow_undefined_flag='${wl}-z,nodefs' archive_cmds_need_lc=no hardcode_shlibpath_var=no hardcode_libdir_flag_spec='${wl}-R,$libdir' hardcode_libdir_separator=':' link_all_deplibs=yes export_dynamic_flag_spec='${wl}-Bexport' runpath_var='LD_RUN_PATH' if test "$GCC" = yes; then archive_cmds='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' else archive_cmds='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' fi ;; uts4*) archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_libdir_flag_spec='-L$libdir' hardcode_shlibpath_var=no ;; *) ld_shlibs=no ;; esac if test x$host_vendor = xsni; then case $host in sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) export_dynamic_flag_spec='${wl}-Blargedynsym' ;; esac fi fi { $as_echo "$as_me:$LINENO: result: $ld_shlibs" >&5 $as_echo "$ld_shlibs" >&6; } test "$ld_shlibs" = no && can_build_shared=no with_gnu_ld=$with_gnu_ld # # Do we need to explicitly link libc? # case "x$archive_cmds_need_lc" in x|xyes) # Assume -lc should be added archive_cmds_need_lc=yes if test "$enable_shared" = yes && test "$GCC" = yes; then case $archive_cmds 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. { $as_echo "$as_me:$LINENO: checking whether -lc should be explicitly linked in" >&5 $as_echo_n "checking whether -lc should be explicitly linked in... " >&6; } $RM conftest* echo "$lt_simple_compile_test_code" > conftest.$ac_ext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } 2>conftest.err; then soname=conftest lib=conftest libobjs=conftest.$ac_objext deplibs= wl=$lt_prog_compiler_wl pic_flag=$lt_prog_compiler_pic compiler_flags=-v linker_flags=-v verstring= output_objdir=. libname=conftest lt_save_allow_undefined_flag=$allow_undefined_flag allow_undefined_flag= if { (eval echo "$as_me:$LINENO: \"$archive_cmds 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1\"") >&5 (eval $archive_cmds 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } then archive_cmds_need_lc=no else archive_cmds_need_lc=yes fi allow_undefined_flag=$lt_save_allow_undefined_flag else cat conftest.err 1>&5 fi $RM conftest* { $as_echo "$as_me:$LINENO: result: $archive_cmds_need_lc" >&5 $as_echo "$archive_cmds_need_lc" >&6; } ;; esac fi ;; esac { $as_echo "$as_me:$LINENO: checking dynamic linker characteristics" >&5 $as_echo_n "checking dynamic linker characteristics... " >&6; } if test "$GCC" = yes; then case $host_os in darwin*) lt_awk_arg="/^libraries:/,/LR/" ;; *) lt_awk_arg="/^libraries:/" ;; esac lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e "s,=/,/,g"` if $ECHO "$lt_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. lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED -e 's/;/ /g'` else lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` fi # Ok, now we have the path, separated by spaces, we can step through it # and add multilib dir if necessary. lt_tmp_lt_search_path_spec= lt_multi_os_dir=`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null` for lt_sys_path in $lt_search_path_spec; do if test -d "$lt_sys_path/$lt_multi_os_dir"; then lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path/$lt_multi_os_dir" else test -d "$lt_sys_path" && \ lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path" fi done lt_search_path_spec=`$ECHO $lt_tmp_lt_search_path_spec | awk ' BEGIN {RS=" "; FS="/|\n";} { lt_foo=""; lt_count=0; for (lt_i = NF; lt_i > 0; lt_i--) { if ($lt_i != "" && $lt_i != ".") { if ($lt_i == "..") { lt_count++; } else { if (lt_count == 0) { lt_foo="/" $lt_i lt_foo; } else { lt_count--; } } } } if (lt_foo != "") { lt_freq[lt_foo]++; } if (lt_freq[lt_foo] == 1) { print lt_foo; } }'` sys_lib_search_path_spec=`$ECHO $lt_search_path_spec` else sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" fi library_names_spec= libname_spec='lib$name' soname_spec= shrext_cmds=".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" 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' ;; aix[4-9]*) 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*) case $host_cpu in powerpc) # Since July 2007 AmigaOS4 officially supports .so libraries. # When compiling the executable, add -use-dynld -Lsobjs: to the compileline. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' ;; m68k) 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' ;; esac ;; beos*) library_names_spec='${libname}${shared_ext}' dynamic_linker="$host_os ld.so" shlibpath_var=LIBRARY_PATH ;; bsdi[45]*) 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* | cegcc*) version_type=windows shrext_cmds=".dll" need_version=no need_lib_prefix=no case $GCC,$host_os in yes,cygwin* | yes,mingw* | yes,pw32* | yes,cegcc*) 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~ chmod a+x \$dldir/$dlname~ if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then eval '\''$striplib \$dldir/$dlname'\'' || exit \$?; fi' 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="/usr/lib /lib/w32api /lib /usr/local/lib" ;; mingw* | cegcc*) # 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 library_names_spec='${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_cmds='`test .$module = .yes && echo .so || echo .dylib`' sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib" 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* | dragonfly*) # DragonFly does not have aout. When/if they implement a new # versioning mechanism, adjust this. if test -x /usr/bin/objformat; then objformat=`/usr/bin/objformat` else case $host_os in freebsd[123]*) objformat=aout ;; *) objformat=elf ;; esac fi 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 ;; freebsd3.[2-9]* | freebsdelf3.[2-9]* | \ freebsd4.[0-5] | freebsdelf4.[0-5] | freebsd4.1.1 | freebsdelf4.1.1) shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; *) # from 4.6 on, and DragonFly shlibpath_overrides_runpath=yes 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_cmds='.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_cmds='.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_cmds='.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' ;; interix[3-9]*) 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' dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; 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* | k*bsd*-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' finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no # Some binutils ld are patched to set DT_RUNPATH save_LDFLAGS=$LDFLAGS save_libdir=$libdir eval "libdir=/foo; wl=\"$lt_prog_compiler_wl\"; \ LDFLAGS=\"\$LDFLAGS $hardcode_libdir_flag_spec\"" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || $as_test_x conftest$ac_exeext }; then if ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null; then shlibpath_overrides_runpath=yes fi else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LDFLAGS=$save_LDFLAGS libdir=$save_libdir # 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 # Add ABI-specific directories to the system library path. sys_lib_dlsearch_path_spec="/lib64 /usr/lib64 /lib /usr/lib" # Append ld.so.conf contents to the search path if test -f /etc/ld.so.conf; then lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '` sys_lib_dlsearch_path_spec="$sys_lib_dlsearch_path_spec $lt_ld_extra" fi # 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' ;; 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}${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=qnx 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=no hardcode_into_libs=yes dynamic_linker='ldqnx.so' ;; openbsd*) version_type=sunos sys_lib_dlsearch_path_spec="/usr/lib" need_lib_prefix=no # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs. case $host_os in openbsd3.3 | openbsd3.3.*) need_version=yes ;; *) need_version=no ;; esac 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_cmds=".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" ;; rdos*) dynamic_linker=no ;; 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.3*) 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 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 ;; sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) version_type=freebsd-elf need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes if test "$with_gnu_ld" = yes; then sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' else sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' case $host_os in sco3.2v5*) sys_lib_search_path_spec="$sys_lib_search_path_spec /lib" ;; esac fi sys_lib_dlsearch_path_spec='/usr/lib' ;; tpf*) # TPF is a cross-target only. Preferred cross-host = GNU/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}' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; 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 { $as_echo "$as_me:$LINENO: result: $dynamic_linker" >&5 $as_echo "$dynamic_linker" >&6; } test "$dynamic_linker" = 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 if test "${lt_cv_sys_lib_search_path_spec+set}" = set; then sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec" fi if test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec" fi { $as_echo "$as_me:$LINENO: checking how to hardcode library paths into programs" >&5 $as_echo_n "checking how to hardcode library paths into programs... " >&6; } hardcode_action= if test -n "$hardcode_libdir_flag_spec" || test -n "$runpath_var" || test "X$hardcode_automatic" = "Xyes" ; then # We can hardcode non-existent directories. if test "$hardcode_direct" != 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_TAGVAR(hardcode_shlibpath_var, )" != no && test "$hardcode_minus_L" != no; then # Linking always hardcodes the temporary library directory. hardcode_action=relink else # We can link without hardcoding, and we can hardcode nonexisting dirs. hardcode_action=immediate fi else # We cannot hardcode anything, or else we can only hardcode existing # directories. hardcode_action=unsupported fi { $as_echo "$as_me:$LINENO: result: $hardcode_action" >&5 $as_echo "$hardcode_action" >&6; } if test "$hardcode_action" = relink || test "$inherit_rpath" = yes; 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 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* | cegcc*) 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 { $as_echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5 $as_echo_n "checking for dlopen in -ldl... " >&6; } if test "${ac_cv_lib_dl_dlopen+set}" = set; then $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ldl $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char dlopen (); int main () { return dlopen (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || $as_test_x conftest$ac_exeext }; then ac_cv_lib_dl_dlopen=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_dl_dlopen=no fi rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5 $as_echo "$ac_cv_lib_dl_dlopen" >&6; } if test "x$ac_cv_lib_dl_dlopen" = x""yes; then lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl" else lt_cv_dlopen="dyld" lt_cv_dlopen_libs= lt_cv_dlopen_self=yes fi ;; *) { $as_echo "$as_me:$LINENO: checking for shl_load" >&5 $as_echo_n "checking for shl_load... " >&6; } if test "${ac_cv_func_shl_load+set}" = set; then $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Define shl_load to an innocuous variant, in case declares shl_load. For example, HP-UX 11i declares gettimeofday. */ #define shl_load innocuous_shl_load /* System header to define __stub macros and hopefully few prototypes, which can conflict with char shl_load (); below. Prefer to if __STDC__ is defined, since exists even on freestanding compilers. */ #ifdef __STDC__ # include #else # include #endif #undef shl_load /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char shl_load (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined __stub_shl_load || defined __stub___shl_load choke me #endif int main () { return shl_load (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || $as_test_x conftest$ac_exeext }; then ac_cv_func_shl_load=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_func_shl_load=no fi rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi { $as_echo "$as_me:$LINENO: result: $ac_cv_func_shl_load" >&5 $as_echo "$ac_cv_func_shl_load" >&6; } if test "x$ac_cv_func_shl_load" = x""yes; then lt_cv_dlopen="shl_load" else { $as_echo "$as_me:$LINENO: checking for shl_load in -ldld" >&5 $as_echo_n "checking for shl_load in -ldld... " >&6; } if test "${ac_cv_lib_dld_shl_load+set}" = set; then $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ldld $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char shl_load (); int main () { return shl_load (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || $as_test_x conftest$ac_exeext }; then ac_cv_lib_dld_shl_load=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_dld_shl_load=no fi rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:$LINENO: result: $ac_cv_lib_dld_shl_load" >&5 $as_echo "$ac_cv_lib_dld_shl_load" >&6; } if test "x$ac_cv_lib_dld_shl_load" = x""yes; then lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-ldld" else { $as_echo "$as_me:$LINENO: checking for dlopen" >&5 $as_echo_n "checking for dlopen... " >&6; } if test "${ac_cv_func_dlopen+set}" = set; then $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Define dlopen to an innocuous variant, in case declares dlopen. For example, HP-UX 11i declares gettimeofday. */ #define dlopen innocuous_dlopen /* System header to define __stub macros and hopefully few prototypes, which can conflict with char dlopen (); below. Prefer to if __STDC__ is defined, since exists even on freestanding compilers. */ #ifdef __STDC__ # include #else # include #endif #undef dlopen /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char dlopen (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined __stub_dlopen || defined __stub___dlopen choke me #endif int main () { return dlopen (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || $as_test_x conftest$ac_exeext }; then ac_cv_func_dlopen=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_func_dlopen=no fi rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi { $as_echo "$as_me:$LINENO: result: $ac_cv_func_dlopen" >&5 $as_echo "$ac_cv_func_dlopen" >&6; } if test "x$ac_cv_func_dlopen" = x""yes; then lt_cv_dlopen="dlopen" else { $as_echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5 $as_echo_n "checking for dlopen in -ldl... " >&6; } if test "${ac_cv_lib_dl_dlopen+set}" = set; then $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ldl $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char dlopen (); int main () { return dlopen (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || $as_test_x conftest$ac_exeext }; then ac_cv_lib_dl_dlopen=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_dl_dlopen=no fi rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5 $as_echo "$ac_cv_lib_dl_dlopen" >&6; } if test "x$ac_cv_lib_dl_dlopen" = x""yes; then lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl" else { $as_echo "$as_me:$LINENO: checking for dlopen in -lsvld" >&5 $as_echo_n "checking for dlopen in -lsvld... " >&6; } if test "${ac_cv_lib_svld_dlopen+set}" = set; then $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lsvld $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char dlopen (); int main () { return dlopen (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || $as_test_x conftest$ac_exeext }; then ac_cv_lib_svld_dlopen=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_svld_dlopen=no fi rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:$LINENO: result: $ac_cv_lib_svld_dlopen" >&5 $as_echo "$ac_cv_lib_svld_dlopen" >&6; } if test "x$ac_cv_lib_svld_dlopen" = x""yes; then lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld" else { $as_echo "$as_me:$LINENO: checking for dld_link in -ldld" >&5 $as_echo_n "checking for dld_link in -ldld... " >&6; } if test "${ac_cv_lib_dld_dld_link+set}" = set; then $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ldld $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char dld_link (); int main () { return dld_link (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || $as_test_x conftest$ac_exeext }; then ac_cv_lib_dld_dld_link=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_dld_dld_link=no fi rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:$LINENO: result: $ac_cv_lib_dld_dld_link" >&5 $as_echo "$ac_cv_lib_dld_dld_link" >&6; } if test "x$ac_cv_lib_dld_dld_link" = x""yes; then lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-ldld" fi fi fi fi fi fi ;; 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" wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\" save_LIBS="$LIBS" LIBS="$lt_cv_dlopen_libs $LIBS" { $as_echo "$as_me:$LINENO: checking whether a program can dlopen itself" >&5 $as_echo_n "checking whether a program can dlopen itself... " >&6; } if test "${lt_cv_dlopen_self+set}" = set; then $as_echo_n "(cached) " >&6 else if test "$cross_compiling" = yes; then : lt_cv_dlopen_self=cross else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF #line 14391 "configure" #include "confdefs.h" #if HAVE_DLFCN_H #include #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 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); */ } else puts (dlerror ()); return status; } _LT_EOF if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && test -s conftest${ac_exeext} 2>/dev/null; then (./conftest; exit; ) >&5 2>/dev/null lt_status=$? case x$lt_status in x$lt_dlno_uscore) lt_cv_dlopen_self=yes ;; x$lt_dlneed_uscore) lt_cv_dlopen_self=yes ;; x$lt_dlunknown|x*) lt_cv_dlopen_self=no ;; esac else : # compilation failed lt_cv_dlopen_self=no fi fi rm -fr conftest* fi { $as_echo "$as_me:$LINENO: result: $lt_cv_dlopen_self" >&5 $as_echo "$lt_cv_dlopen_self" >&6; } if test "x$lt_cv_dlopen_self" = xyes; then wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\" { $as_echo "$as_me:$LINENO: checking whether a statically linked program can dlopen itself" >&5 $as_echo_n "checking whether a statically linked program can dlopen itself... " >&6; } if test "${lt_cv_dlopen_self_static+set}" = set; then $as_echo_n "(cached) " >&6 else if test "$cross_compiling" = yes; then : lt_cv_dlopen_self_static=cross else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF #line 14487 "configure" #include "confdefs.h" #if HAVE_DLFCN_H #include #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 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); */ } else puts (dlerror ()); return status; } _LT_EOF if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && test -s conftest${ac_exeext} 2>/dev/null; then (./conftest; exit; ) >&5 2>/dev/null lt_status=$? case x$lt_status in x$lt_dlno_uscore) lt_cv_dlopen_self_static=yes ;; x$lt_dlneed_uscore) lt_cv_dlopen_self_static=yes ;; x$lt_dlunknown|x*) lt_cv_dlopen_self_static=no ;; esac else : # compilation failed lt_cv_dlopen_self_static=no fi fi rm -fr conftest* fi { $as_echo "$as_me:$LINENO: result: $lt_cv_dlopen_self_static" >&5 $as_echo "$lt_cv_dlopen_self_static" >&6; } 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 striplib= old_striplib= { $as_echo "$as_me:$LINENO: checking whether stripping libraries is possible" >&5 $as_echo_n "checking whether stripping libraries is possible... " >&6; } 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" { $as_echo "$as_me:$LINENO: result: yes" >&5 $as_echo "yes" >&6; } 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" old_striplib="$STRIP -S" { $as_echo "$as_me:$LINENO: result: yes" >&5 $as_echo "yes" >&6; } else { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } fi ;; *) { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } ;; esac fi # Report which library types will actually be built { $as_echo "$as_me:$LINENO: checking if libtool supports shared libraries" >&5 $as_echo_n "checking if libtool supports shared libraries... " >&6; } { $as_echo "$as_me:$LINENO: result: $can_build_shared" >&5 $as_echo "$can_build_shared" >&6; } { $as_echo "$as_me:$LINENO: checking whether to build shared libraries" >&5 $as_echo_n "checking whether to build shared libraries... " >&6; } 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 ;; aix[4-9]*) if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then test "$enable_shared" = yes && enable_static=no fi ;; esac { $as_echo "$as_me:$LINENO: result: $enable_shared" >&5 $as_echo "$enable_shared" >&6; } { $as_echo "$as_me:$LINENO: checking whether to build static libraries" >&5 $as_echo_n "checking whether to build static libraries... " >&6; } # Make sure either enable_shared or enable_static is yes. test "$enable_shared" = yes || enable_static=yes { $as_echo "$as_me:$LINENO: result: $enable_static" >&5 $as_echo "$enable_static" >&6; } fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu CC="$lt_save_CC" ac_ext=cpp ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_cxx_compiler_gnu archive_cmds_need_lc_CXX=no allow_undefined_flag_CXX= always_export_symbols_CXX=no archive_expsym_cmds_CXX= compiler_needs_object_CXX=no export_dynamic_flag_spec_CXX= hardcode_direct_CXX=no hardcode_direct_absolute_CXX=no hardcode_libdir_flag_spec_CXX= hardcode_libdir_flag_spec_ld_CXX= hardcode_libdir_separator_CXX= hardcode_minus_L_CXX=no hardcode_shlibpath_var_CXX=unsupported hardcode_automatic_CXX=no inherit_rpath_CXX=no module_cmds_CXX= module_expsym_cmds_CXX= link_all_deplibs_CXX=unknown old_archive_cmds_CXX=$old_archive_cmds no_undefined_flag_CXX= whole_archive_flag_spec_CXX= enable_shared_with_static_runtimes_CXX=no # Source file extension for C++ test sources. ac_ext=cpp # Object file extension for compiled C++ test sources. objext=o objext_CXX=$objext # No sense in running all these tests if we already determined that # the CXX compiler isn't working. Some variables (like enable_shared) # are currently assumed to apply to all compilers on this platform, # and will be corrupted by setting them based on a non-working compiler. if test "$_lt_caught_CXX_error" != yes; then # Code to be used in simple compile tests lt_simple_compile_test_code="int some_variable = 0;" # Code to be used in simple link tests lt_simple_link_test_code='int main(int, char *[]) { return(0); }' # ltmain only uses $CC for tagged configurations so make sure $CC is set. # If no C compiler was specified, use CC. LTCC=${LTCC-"$CC"} # If no C compiler flags were specified, use CFLAGS. LTCFLAGS=${LTCFLAGS-"$CFLAGS"} # Allow CC to be a program name with arguments. compiler=$CC # save warnings/boilerplate of simple test code ac_outfile=conftest.$ac_objext echo "$lt_simple_compile_test_code" >conftest.$ac_ext eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err _lt_compiler_boilerplate=`cat conftest.err` $RM conftest* ac_outfile=conftest.$ac_objext echo "$lt_simple_link_test_code" >conftest.$ac_ext eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err _lt_linker_boilerplate=`cat conftest.err` $RM -r conftest* # 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 $as_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 $as_unset lt_cv_path_LD fi test -z "${LDCXX+set}" || LD=$LDCXX CC=${CXX-"c++"} compiler=$CC compiler_CXX=$CC for cc_temp in $compiler""; do case $cc_temp in compile | *[\\/]compile | ccache | *[\\/]ccache ) ;; distcc | *[\\/]distcc | purify | *[\\/]purify ) ;; \-*) ;; *) break;; esac done cc_basename=`$ECHO "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"` if test -n "$compiler"; then # We don't want -fno-exception when compiling C++ code, so set the # no_builtin_flag separately if test "$GXX" = yes; then lt_prog_compiler_no_builtin_flag_CXX=' -fno-builtin' else lt_prog_compiler_no_builtin_flag_CXX= fi if test "$GXX" = yes; then # Set up default GNU C++ configuration # Check whether --with-gnu-ld was given. if test "${with_gnu_ld+set}" = set; then withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes else with_gnu_ld=no fi ac_prog=ld if test "$GCC" = yes; then # Check if gcc -print-prog-name=ld gives a path. { $as_echo "$as_me:$LINENO: checking for ld used by $CC" >&5 $as_echo_n "checking for ld used by $CC... " >&6; } 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 pathname 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 { $as_echo "$as_me:$LINENO: checking for GNU ld" >&5 $as_echo_n "checking for GNU ld... " >&6; } else { $as_echo "$as_me:$LINENO: checking for non-GNU ld" >&5 $as_echo_n "checking for non-GNU ld... " >&6; } fi if test "${lt_cv_path_LD+set}" = set; then $as_echo_n "(cached) " >&6 else 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 variants of GNU ld only accept -v. # Break only if it was the GNU/non-GNU ld that we prefer. case `"$lt_cv_path_LD" -v 2>&1 &5 $as_echo "$LD" >&6; } else { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } fi test -z "$LD" && { { $as_echo "$as_me:$LINENO: error: no acceptable ld found in \$PATH" >&5 $as_echo "$as_me: error: no acceptable ld found in \$PATH" >&2;} { (exit 1); exit 1; }; } { $as_echo "$as_me:$LINENO: checking if the linker ($LD) is GNU ld" >&5 $as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; } if test "${lt_cv_prog_gnu_ld+set}" = set; then $as_echo_n "(cached) " >&6 else # I'd rather use --version here, but apparently some GNU lds only accept -v. case `$LD -v 2>&1 &5 $as_echo "$lt_cv_prog_gnu_ld" >&6; } with_gnu_ld=$lt_cv_prog_gnu_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 archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir' export_dynamic_flag_spec_CXX='${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 whole_archive_flag_spec_CXX="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' else whole_archive_flag_spec_CXX= 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. archive_cmds_CXX='$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 { $as_echo "$as_me:$LINENO: checking whether the $compiler linker ($LD) supports shared libraries" >&5 $as_echo_n "checking whether the $compiler linker ($LD) supports shared libraries... " >&6; } ld_shlibs_CXX=yes case $host_os in aix3*) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; aix[4-9]*) 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].*|aix[5-9]*) 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. archive_cmds_CXX='' hardcode_direct_CXX=yes hardcode_direct_absolute_CXX=yes hardcode_libdir_separator_CXX=':' link_all_deplibs_CXX=yes file_list_spec_CXX='${wl}-f,' 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 : else # We have old collect2 hardcode_direct_CXX=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 hardcode_minus_L_CXX=yes hardcode_libdir_flag_spec_CXX='-L$libdir' hardcode_libdir_separator_CXX= fi esac shared_flag='-shared' if test "$aix_use_runtimelinking" = yes; then shared_flag="$shared_flag "'${wl}-G' fi 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 export_dynamic_flag_spec_CXX='${wl}-bexpall' # It seems that -bexpall does not export symbols beginning with # underscore (_), so it is better to generate a list of symbols to # export. always_export_symbols_CXX=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. allow_undefined_flag_CXX='-berok' # Determine the default libpath from the value encoded in an empty # executable. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_cxx_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || $as_test_x conftest$ac_exeext }; then lt_aix_libpath_sed=' /Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/ p } }' aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` # 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 "$lt_aix_libpath_sed"` fi else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi hardcode_libdir_flag_spec_CXX='${wl}-blibpath:$libdir:'"$aix_libpath" archive_expsym_cmds_CXX='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then $ECHO "X${wl}${allow_undefined_flag}" | $Xsed; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" else if test "$host_cpu" = ia64; then hardcode_libdir_flag_spec_CXX='${wl}-R $libdir:/usr/lib:/lib' allow_undefined_flag_CXX="-z nodefs" archive_expsym_cmds_CXX="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols" else # Determine the default libpath from the value encoded in an # empty executable. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_cxx_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || $as_test_x conftest$ac_exeext }; then lt_aix_libpath_sed=' /Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/ p } }' aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` # 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 "$lt_aix_libpath_sed"` fi else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi hardcode_libdir_flag_spec_CXX='${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. no_undefined_flag_CXX=' ${wl}-bernotok' allow_undefined_flag_CXX=' ${wl}-berok' # Exported symbols can be pulled into shared objects from archives whole_archive_flag_spec_CXX='$convenience' archive_cmds_need_lc_CXX=yes # This is similar to how AIX traditionally builds its shared # libraries. archive_expsym_cmds_CXX="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' fi fi ;; beos*) if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then allow_undefined_flag_CXX=unsupported # Joseph Beckenbach says some releases of gcc # support --undefined. This deserves some investigation. FIXME archive_cmds_CXX='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' else ld_shlibs_CXX=no fi ;; chorus*) case $cc_basename in *) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; esac ;; cygwin* | mingw* | pw32* | cegcc*) # _LT_TAGVAR(hardcode_libdir_flag_spec, CXX) is actually meaningless, # as there is no search path for DLLs. hardcode_libdir_flag_spec_CXX='-L$libdir' allow_undefined_flag_CXX=unsupported always_export_symbols_CXX=no enable_shared_with_static_runtimes_CXX=yes if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' # If the export-symbols file already is a .def file (1st line # is EXPORTS), use it as is; otherwise, prepend... archive_expsym_cmds_CXX='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}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' else ld_shlibs_CXX=no fi ;; darwin* | rhapsody*) archive_cmds_need_lc_CXX=no hardcode_direct_CXX=no hardcode_automatic_CXX=yes hardcode_shlibpath_var_CXX=unsupported whole_archive_flag_spec_CXX='' link_all_deplibs_CXX=yes allow_undefined_flag_CXX="$_lt_dar_allow_undefined" case $cc_basename in ifort*) _lt_dar_can_shared=yes ;; *) _lt_dar_can_shared=$GCC ;; esac if test "$_lt_dar_can_shared" = "yes"; then output_verbose_link_cmd=echo archive_cmds_CXX="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}" module_cmds_CXX="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}" archive_expsym_cmds_CXX="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}" module_expsym_cmds_CXX="sed -e 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dar_export_syms}${_lt_dsymutil}" if test "$lt_cv_apple_cc_single_mod" != "yes"; then archive_cmds_CXX="\$CC -r -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${_lt_dsymutil}" archive_expsym_cmds_CXX="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -r -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${_lt_dar_export_syms}${_lt_dsymutil}" fi else ld_shlibs_CXX=no fi ;; dgux*) case $cc_basename in ec++*) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; ghcx*) # Green Hills C++ Compiler # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; *) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; esac ;; freebsd[12]*) # C++ shared libraries reported to be fairly broken before # switch to ELF ld_shlibs_CXX=no ;; freebsd-elf*) archive_cmds_need_lc_CXX=no ;; freebsd* | dragonfly*) # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF # conventions ld_shlibs_CXX=yes ;; gnu*) ;; hpux9*) hardcode_libdir_flag_spec_CXX='${wl}+b ${wl}$libdir' hardcode_libdir_separator_CXX=: export_dynamic_flag_spec_CXX='${wl}-E' hardcode_direct_CXX=yes hardcode_minus_L_CXX=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 ld_shlibs_CXX=no ;; aCC*) archive_cmds_CXX='$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 "X$list" | $Xsed' ;; *) if test "$GXX" = yes; then archive_cmds_CXX='$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 ld_shlibs_CXX=no fi ;; esac ;; hpux10*|hpux11*) if test $with_gnu_ld = no; then hardcode_libdir_flag_spec_CXX='${wl}+b ${wl}$libdir' hardcode_libdir_separator_CXX=: case $host_cpu in hppa*64*|ia64*) ;; *) export_dynamic_flag_spec_CXX='${wl}-E' ;; esac fi case $host_cpu in hppa*64*|ia64*) hardcode_direct_CXX=no hardcode_shlibpath_var_CXX=no ;; *) hardcode_direct_CXX=yes hardcode_direct_absolute_CXX=yes hardcode_minus_L_CXX=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 ld_shlibs_CXX=no ;; aCC*) case $host_cpu in hppa*64*) archive_cmds_CXX='$CC -b ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; ia64*) archive_cmds_CXX='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; *) archive_cmds_CXX='$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 "X$list" | $Xsed' ;; *) if test "$GXX" = yes; then if test $with_gnu_ld = no; then case $host_cpu in hppa*64*) archive_cmds_CXX='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; ia64*) archive_cmds_CXX='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; *) archive_cmds_CXX='$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 ld_shlibs_CXX=no fi ;; esac ;; interix[3-9]*) hardcode_direct_CXX=no hardcode_shlibpath_var_CXX=no hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir' export_dynamic_flag_spec_CXX='${wl}-E' # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. # Instead, shared libraries are loaded at an image base (0x10000000 by # default) and relocated if they conflict, which is a slow very memory # consuming and fragmenting process. To avoid this, we pick a random, # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link # time. Moving up from 0x10000000 also allows more sbrk(2) space. archive_cmds_CXX='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' archive_expsym_cmds_CXX='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' ;; irix5* | irix6*) case $cc_basename in CC*) # SGI C++ archive_cmds_CXX='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_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. old_archive_cmds_CXX='$CC -ar -WR,-u -o $oldlib $oldobjs' ;; *) if test "$GXX" = yes; then if test "$with_gnu_ld" = no; then archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' else archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` -o $lib' fi fi link_all_deplibs_CXX=yes ;; esac hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir' hardcode_libdir_separator_CXX=: inherit_rpath_CXX=yes ;; linux* | k*bsd*-gnu) 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. archive_cmds_CXX='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' archive_expsym_cmds_CXX='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 "X$list" | $Xsed' hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir' export_dynamic_flag_spec_CXX='${wl}--export-dynamic' # Archives containing C++ object files must be created using # "CC -Bstatic", where "CC" is the KAI C++ compiler. old_archive_cmds_CXX='$CC -Bstatic -o $oldlib $oldobjs' ;; icpc* | ecpc* ) # Intel C++ with_gnu_ld=yes # version 8.0 and above of icpc choke on multiply defined symbols # if we add $predep_objects and $postdep_objects, however 7.1 and # earlier do not add the objects themselves. case `$CC -V 2>&1` in *"Version 7."*) archive_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' ;; *) # Version 8.0 or newer tmp_idyn= case $host_cpu in ia64*) tmp_idyn=' -i_dynamic';; esac archive_cmds_CXX='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds_CXX='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' ;; esac archive_cmds_need_lc_CXX=no hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir' export_dynamic_flag_spec_CXX='${wl}--export-dynamic' whole_archive_flag_spec_CXX='${wl}--whole-archive$convenience ${wl}--no-whole-archive' ;; pgCC* | pgcpp*) # Portland Group C++ compiler case `$CC -V` in *pgCC\ [1-5]* | *pgcpp\ [1-5]*) prelink_cmds_CXX='tpldir=Template.dir~ rm -rf $tpldir~ $CC --prelink_objects --instantiation_dir $tpldir $objs $libobjs $compile_deplibs~ compile_command="$compile_command `find $tpldir -name \*.o | $NL2SP`"' old_archive_cmds_CXX='tpldir=Template.dir~ rm -rf $tpldir~ $CC --prelink_objects --instantiation_dir $tpldir $oldobjs$old_deplibs~ $AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | $NL2SP`~ $RANLIB $oldlib' archive_cmds_CXX='tpldir=Template.dir~ rm -rf $tpldir~ $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib' archive_expsym_cmds_CXX='tpldir=Template.dir~ rm -rf $tpldir~ $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib' ;; *) # Version 6 will use weak symbols archive_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib' archive_expsym_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib' ;; esac hardcode_libdir_flag_spec_CXX='${wl}--rpath ${wl}$libdir' export_dynamic_flag_spec_CXX='${wl}--export-dynamic' whole_archive_flag_spec_CXX='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive' ;; cxx*) # Compaq C++ archive_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds_CXX='$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 hardcode_libdir_flag_spec_CXX='-rpath $libdir' hardcode_libdir_separator_CXX=: # 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 "X$templist" | $Xsed -e "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 "X$list" | $Xsed' ;; xl*) # IBM XL 8.0 on PPC, with GNU ld hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir' export_dynamic_flag_spec_CXX='${wl}--export-dynamic' archive_cmds_CXX='$CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' if test "x$supports_anon_versioning" = xyes; then archive_expsym_cmds_CXX='echo "{ global:" > $output_objdir/$libname.ver~ cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ echo "local: *; };" >> $output_objdir/$libname.ver~ $CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' fi ;; *) case `$CC -V 2>&1 | sed 5q` in *Sun\ C*) # Sun C++ 5.9 no_undefined_flag_CXX=' -zdefs' archive_cmds_CXX='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' archive_expsym_cmds_CXX='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file ${wl}$export_symbols' hardcode_libdir_flag_spec_CXX='-R$libdir' whole_archive_flag_spec_CXX='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive' compiler_needs_object_CXX=yes # Not sure whether something based on # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 # would be better. output_verbose_link_cmd='echo' # 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. old_archive_cmds_CXX='$CC -xar -o $oldlib $oldobjs' ;; esac ;; esac ;; lynxos*) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; m88k*) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; mvs*) case $cc_basename in cxx*) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; *) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; esac ;; netbsd*) if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then archive_cmds_CXX='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags' wlarc= hardcode_libdir_flag_spec_CXX='-R$libdir' hardcode_direct_CXX=yes hardcode_shlibpath_var_CXX=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::"' ;; *nto* | *qnx*) ld_shlibs_CXX=yes ;; openbsd2*) # C++ shared libraries are fairly broken ld_shlibs_CXX=no ;; openbsd*) if test -f /usr/libexec/ld.so; then hardcode_direct_CXX=yes hardcode_shlibpath_var_CXX=no hardcode_direct_absolute_CXX=yes archive_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir' if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then archive_expsym_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file,$export_symbols -o $lib' export_dynamic_flag_spec_CXX='${wl}-E' whole_archive_flag_spec_CXX="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' fi output_verbose_link_cmd=echo else ld_shlibs_CXX=no fi ;; osf3* | 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. archive_cmds_CXX='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' hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir' hardcode_libdir_separator_CXX=: # Archives containing C++ object files must be created using # the KAI C++ compiler. case $host in osf3*) old_archive_cmds_CXX='$CC -Bstatic -o $oldlib $oldobjs' ;; *) old_archive_cmds_CXX='$CC -o $oldlib $oldobjs' ;; esac ;; RCC*) # Rational C++ 2.4.1 # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; cxx*) case $host in osf3*) allow_undefined_flag_CXX=' ${wl}-expect_unresolved ${wl}\*' archive_cmds_CXX='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $soname `test -n "$verstring" && $ECHO "X${wl}-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib' hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir' ;; *) allow_undefined_flag_CXX=' -expect_unresolved \*' archive_cmds_CXX='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib' archive_expsym_cmds_CXX='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 "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib~ $RM $lib.exp' hardcode_libdir_flag_spec_CXX='-rpath $libdir' ;; esac hardcode_libdir_separator_CXX=: # 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 "X$templist" | $Xsed -e "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 "X$list" | $Xsed' ;; *) if test "$GXX" = yes && test "$with_gnu_ld" = no; then allow_undefined_flag_CXX=' ${wl}-expect_unresolved ${wl}\*' case $host in osf3*) archive_cmds_CXX='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' ;; *) archive_cmds_CXX='$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" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' ;; esac hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir' hardcode_libdir_separator_CXX=: # 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 ld_shlibs_CXX=no fi ;; esac ;; psos*) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; sunos4*) case $cc_basename in CC*) # Sun C++ 4.x # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; lcc*) # Lucid # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; *) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; esac ;; solaris*) case $cc_basename in CC*) # Sun C++ 4.2, 5.x and Centerline C++ archive_cmds_need_lc_CXX=yes no_undefined_flag_CXX=' -zdefs' archive_cmds_CXX='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' archive_expsym_cmds_CXX='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ $CC -G${allow_undefined_flag} ${wl}-M ${wl}$lib.exp -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' hardcode_libdir_flag_spec_CXX='-R$libdir' hardcode_shlibpath_var_CXX=no case $host_os in solaris2.[0-5] | solaris2.[0-5].*) ;; *) # The compiler driver will combine and reorder linker options, # but understands `-z linker_flag'. # Supported since Solaris 2.6 (maybe 2.5.1?) whole_archive_flag_spec_CXX='-z allextract$convenience -z defaultextract' ;; esac link_all_deplibs_CXX=yes output_verbose_link_cmd='echo' # 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. old_archive_cmds_CXX='$CC -xar -o $oldlib $oldobjs' ;; gcx*) # Green Hills C++ Compiler archive_cmds_CXX='$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. old_archive_cmds_CXX='$CC $LDFLAGS -archive -o $oldlib $oldobjs' ;; *) # GNU C++ compiler with Solaris linker if test "$GXX" = yes && test "$with_gnu_ld" = no; then no_undefined_flag_CXX=' ${wl}-z ${wl}defs' if $CC --version | $GREP -v '^2\.7' > /dev/null; then archive_cmds_CXX='$CC -shared -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' archive_expsym_cmds_CXX='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. archive_cmds_CXX='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' archive_expsym_cmds_CXX='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 hardcode_libdir_flag_spec_CXX='${wl}-R $wl$libdir' case $host_os in solaris2.[0-5] | solaris2.[0-5].*) ;; *) whole_archive_flag_spec_CXX='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' ;; esac fi ;; esac ;; sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7* | sco3.2v5.0.[024]*) no_undefined_flag_CXX='${wl}-z,text' archive_cmds_need_lc_CXX=no hardcode_shlibpath_var_CXX=no runpath_var='LD_RUN_PATH' case $cc_basename in CC*) archive_cmds_CXX='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds_CXX='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' ;; *) archive_cmds_CXX='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds_CXX='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' ;; esac ;; sysv5* | sco3.2v5* | sco5v6*) # Note: We can NOT use -z defs as we might desire, because we do not # link with -lc, and that would cause any symbols used from libc to # always be unresolved, which means just about no library would # ever link correctly. If we're not using GNU ld we use -z text # though, which does catch some bad symbols but isn't as heavy-handed # as -z defs. no_undefined_flag_CXX='${wl}-z,text' allow_undefined_flag_CXX='${wl}-z,nodefs' archive_cmds_need_lc_CXX=no hardcode_shlibpath_var_CXX=no hardcode_libdir_flag_spec_CXX='${wl}-R,$libdir' hardcode_libdir_separator_CXX=':' link_all_deplibs_CXX=yes export_dynamic_flag_spec_CXX='${wl}-Bexport' runpath_var='LD_RUN_PATH' case $cc_basename in CC*) archive_cmds_CXX='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds_CXX='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' ;; *) archive_cmds_CXX='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds_CXX='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' ;; esac ;; tandem*) case $cc_basename in NCC*) # NonStop-UX NCC 3.20 # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; *) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; esac ;; vxworks*) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; *) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; esac { $as_echo "$as_me:$LINENO: result: $ld_shlibs_CXX" >&5 $as_echo "$ld_shlibs_CXX" >&6; } test "$ld_shlibs_CXX" = no && can_build_shared=no GCC_CXX="$GXX" LD_CXX="$LD" ## CAVEAT EMPTOR: ## There is no encapsulation within the following macros, do not change ## the running order or otherwise move them around unless you know exactly ## what you are doing... # Dependencies to place before and after the object being linked: predep_objects_CXX= postdep_objects_CXX= predeps_CXX= postdeps_CXX= compiler_lib_search_path_CXX= cat > conftest.$ac_ext <<_LT_EOF class Foo { public: Foo (void) { a = 0; } private: int a; }; _LT_EOF if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then # Parse the compiler output and extract the necessary # objects, libraries and library flags. # Sentinel used to keep track of whether or not we are before # the conftest object file. pre_test_object_deps_done=no for p in `eval "$output_verbose_link_cmd"`; do case $p in -L* | -R* | -l*) # Some compilers place space between "-{L,R}" and the path. # Remove the space. if test $p = "-L" || test $p = "-R"; then prev=$p continue else prev= fi if test "$pre_test_object_deps_done" = no; then case $p in -L* | -R*) # Internal compiler library paths should come after those # provided the user. The postdeps already come after the # user supplied libs so there is no need to process them. if test -z "$compiler_lib_search_path_CXX"; then compiler_lib_search_path_CXX="${prev}${p}" else compiler_lib_search_path_CXX="${compiler_lib_search_path_CXX} ${prev}${p}" fi ;; # The "-l" case would never come before the object being # linked, so don't bother handling this case. esac else if test -z "$postdeps_CXX"; then postdeps_CXX="${prev}${p}" else postdeps_CXX="${postdeps_CXX} ${prev}${p}" fi fi ;; *.$objext) # This assumes that the test object file only shows up # once in the compiler output. if test "$p" = "conftest.$objext"; then pre_test_object_deps_done=yes continue fi if test "$pre_test_object_deps_done" = no; then if test -z "$predep_objects_CXX"; then predep_objects_CXX="$p" else predep_objects_CXX="$predep_objects_CXX $p" fi else if test -z "$postdep_objects_CXX"; then postdep_objects_CXX="$p" else postdep_objects_CXX="$postdep_objects_CXX $p" fi fi ;; *) ;; # Ignore the rest. esac done # Clean up. rm -f a.out a.exe else echo "libtool.m4: error: problem compiling CXX test program" fi $RM -f confest.$objext # PORTME: override above test on systems where it is broken case $host_os in interix[3-9]*) # Interix 3.5 installs completely hosed .la files for C++, so rather than # hack all around it, let's just trust "g++" to DTRT. predep_objects_CXX= postdep_objects_CXX= postdeps_CXX= ;; linux*) case `$CC -V 2>&1 | sed 5q` in *Sun\ C*) # Sun C++ 5.9 # The more standards-conforming stlport4 library is # incompatible with the Cstd library. Avoid specifying # it if it's in CXXFLAGS. Ignore libCrun as # -library=stlport4 depends on it. case " $CXX $CXXFLAGS " in *" -library=stlport4 "*) solaris_use_stlport4=yes ;; esac if test "$solaris_use_stlport4" != yes; then postdeps_CXX='-library=Cstd -library=Crun' fi ;; esac ;; solaris*) case $cc_basename in CC*) # The more standards-conforming stlport4 library is # incompatible with the Cstd library. Avoid specifying # it if it's in CXXFLAGS. Ignore libCrun as # -library=stlport4 depends on it. case " $CXX $CXXFLAGS " in *" -library=stlport4 "*) solaris_use_stlport4=yes ;; esac # Adding this requires a known-good setup of shared libraries for # Sun compiler versions before 5.6, else PIC objects from an old # archive will be linked into the output, leading to subtle bugs. if test "$solaris_use_stlport4" != yes; then postdeps_CXX='-library=Cstd -library=Crun' fi ;; esac ;; esac case " $postdeps_CXX " in *" -lc "*) archive_cmds_need_lc_CXX=no ;; esac compiler_lib_search_dirs_CXX= if test -n "${compiler_lib_search_path_CXX}"; then compiler_lib_search_dirs_CXX=`echo " ${compiler_lib_search_path_CXX}" | ${SED} -e 's! -L! !g' -e 's!^ !!'` fi lt_prog_compiler_wl_CXX= lt_prog_compiler_pic_CXX= lt_prog_compiler_static_CXX= { $as_echo "$as_me:$LINENO: checking for $compiler option to produce PIC" >&5 $as_echo_n "checking for $compiler option to produce PIC... " >&6; } # C++ specific cases for pic, static, wl, etc. if test "$GXX" = yes; then lt_prog_compiler_wl_CXX='-Wl,' lt_prog_compiler_static_CXX='-static' case $host_os in aix*) # All AIX code is PIC. if test "$host_cpu" = ia64; then # AIX 5 now supports IA64 processor lt_prog_compiler_static_CXX='-Bstatic' fi ;; amigaos*) case $host_cpu in powerpc) # see comment about AmigaOS4 .so support lt_prog_compiler_pic_CXX='-fPIC' ;; m68k) # 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_prog_compiler_pic_CXX='-m68020 -resident32 -malways-restore-a4' ;; esac ;; beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) # PIC is the default for these OSes. ;; mingw* | cygwin* | os2* | pw32* | cegcc*) # 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). # Although the cygwin gcc ignores -fPIC, still need this for old-style # (--disable-auto-import) libraries lt_prog_compiler_pic_CXX='-DDLL_EXPORT' ;; darwin* | rhapsody*) # PIC is the default on this platform # Common symbols not allowed in MH_DYLIB files lt_prog_compiler_pic_CXX='-fno-common' ;; *djgpp*) # DJGPP does not support shared libraries at all lt_prog_compiler_pic_CXX= ;; interix[3-9]*) # Interix 3.x gcc -fpic/-fPIC options generate broken code. # Instead, we relocate shared libraries at runtime. ;; sysv4*MP*) if test -d /usr/nec; then lt_prog_compiler_pic_CXX=-Kconform_pic fi ;; hpux*) # PIC is the default for 64-bit PA HP-UX, but not for 32-bit # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag # sets the default TLS model and affects inlining. case $host_cpu in hppa*64*) ;; *) lt_prog_compiler_pic_CXX='-fPIC' ;; esac ;; *qnx* | *nto*) # QNX uses GNU C++, but need to define -shared option too, otherwise # it will coredump. lt_prog_compiler_pic_CXX='-fPIC -shared' ;; *) lt_prog_compiler_pic_CXX='-fPIC' ;; esac else case $host_os in aix[4-9]*) # All AIX code is PIC. if test "$host_cpu" = ia64; then # AIX 5 now supports IA64 processor lt_prog_compiler_static_CXX='-Bstatic' else lt_prog_compiler_static_CXX='-bnso -bI:/lib/syscalls.exp' fi ;; chorus*) case $cc_basename in cxch68*) # Green Hills C++ Compiler # _LT_TAGVAR(lt_prog_compiler_static, CXX)="--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_prog_compiler_pic_CXX='-KPIC' ;; ghcx*) # Green Hills C++ Compiler lt_prog_compiler_pic_CXX='-pic' ;; *) ;; esac ;; freebsd* | dragonfly*) # FreeBSD uses GNU C++ ;; hpux9* | hpux10* | hpux11*) case $cc_basename in CC*) lt_prog_compiler_wl_CXX='-Wl,' lt_prog_compiler_static_CXX='${wl}-a ${wl}archive' if test "$host_cpu" != ia64; then lt_prog_compiler_pic_CXX='+Z' fi ;; aCC*) lt_prog_compiler_wl_CXX='-Wl,' lt_prog_compiler_static_CXX='${wl}-a ${wl}archive' case $host_cpu in hppa*64*|ia64*) # +Z the default ;; *) lt_prog_compiler_pic_CXX='+Z' ;; esac ;; *) ;; esac ;; interix*) # This is c89, which is MS Visual C++ (no shared libs) # Anyone wants to do a port? ;; irix5* | irix6* | nonstopux*) case $cc_basename in CC*) lt_prog_compiler_wl_CXX='-Wl,' lt_prog_compiler_static_CXX='-non_shared' # CC pic flag -KPIC is the default. ;; *) ;; esac ;; linux* | k*bsd*-gnu) case $cc_basename in KCC*) # KAI C++ Compiler lt_prog_compiler_wl_CXX='--backend -Wl,' lt_prog_compiler_pic_CXX='-fPIC' ;; ecpc* ) # old Intel C++ for x86_64 which still supported -KPIC. lt_prog_compiler_wl_CXX='-Wl,' lt_prog_compiler_pic_CXX='-KPIC' lt_prog_compiler_static_CXX='-static' ;; icpc* ) # Intel C++, used to be incompatible with GCC. # ICC 10 doesn't accept -KPIC any more. lt_prog_compiler_wl_CXX='-Wl,' lt_prog_compiler_pic_CXX='-fPIC' lt_prog_compiler_static_CXX='-static' ;; pgCC* | pgcpp*) # Portland Group C++ compiler lt_prog_compiler_wl_CXX='-Wl,' lt_prog_compiler_pic_CXX='-fpic' lt_prog_compiler_static_CXX='-Bstatic' ;; cxx*) # Compaq C++ # Make sure the PIC flag is empty. It appears that all Alpha # Linux and Compaq Tru64 Unix objects are PIC. lt_prog_compiler_pic_CXX= lt_prog_compiler_static_CXX='-non_shared' ;; xlc* | xlC*) # IBM XL 8.0 on PPC lt_prog_compiler_wl_CXX='-Wl,' lt_prog_compiler_pic_CXX='-qpic' lt_prog_compiler_static_CXX='-qstaticlink' ;; *) case `$CC -V 2>&1 | sed 5q` in *Sun\ C*) # Sun C++ 5.9 lt_prog_compiler_pic_CXX='-KPIC' lt_prog_compiler_static_CXX='-Bstatic' lt_prog_compiler_wl_CXX='-Qoption ld ' ;; esac ;; esac ;; lynxos*) ;; m88k*) ;; mvs*) case $cc_basename in cxx*) lt_prog_compiler_pic_CXX='-W c,exportall' ;; *) ;; esac ;; netbsd*) ;; *qnx* | *nto*) # QNX uses GNU C++, but need to define -shared option too, otherwise # it will coredump. lt_prog_compiler_pic_CXX='-fPIC -shared' ;; osf3* | osf4* | osf5*) case $cc_basename in KCC*) lt_prog_compiler_wl_CXX='--backend -Wl,' ;; RCC*) # Rational C++ 2.4.1 lt_prog_compiler_pic_CXX='-pic' ;; cxx*) # Digital/Compaq C++ lt_prog_compiler_wl_CXX='-Wl,' # Make sure the PIC flag is empty. It appears that all Alpha # Linux and Compaq Tru64 Unix objects are PIC. lt_prog_compiler_pic_CXX= lt_prog_compiler_static_CXX='-non_shared' ;; *) ;; esac ;; psos*) ;; solaris*) case $cc_basename in CC*) # Sun C++ 4.2, 5.x and Centerline C++ lt_prog_compiler_pic_CXX='-KPIC' lt_prog_compiler_static_CXX='-Bstatic' lt_prog_compiler_wl_CXX='-Qoption ld ' ;; gcx*) # Green Hills C++ Compiler lt_prog_compiler_pic_CXX='-PIC' ;; *) ;; esac ;; sunos4*) case $cc_basename in CC*) # Sun C++ 4.x lt_prog_compiler_pic_CXX='-pic' lt_prog_compiler_static_CXX='-Bstatic' ;; lcc*) # Lucid lt_prog_compiler_pic_CXX='-pic' ;; *) ;; esac ;; sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) case $cc_basename in CC*) lt_prog_compiler_wl_CXX='-Wl,' lt_prog_compiler_pic_CXX='-KPIC' lt_prog_compiler_static_CXX='-Bstatic' ;; esac ;; tandem*) case $cc_basename in NCC*) # NonStop-UX NCC 3.20 lt_prog_compiler_pic_CXX='-KPIC' ;; *) ;; esac ;; vxworks*) ;; *) lt_prog_compiler_can_build_shared_CXX=no ;; esac fi case $host_os in # For platforms which do not support PIC, -DPIC is meaningless: *djgpp*) lt_prog_compiler_pic_CXX= ;; *) lt_prog_compiler_pic_CXX="$lt_prog_compiler_pic_CXX -DPIC" ;; esac { $as_echo "$as_me:$LINENO: result: $lt_prog_compiler_pic_CXX" >&5 $as_echo "$lt_prog_compiler_pic_CXX" >&6; } # # Check to make sure the PIC flag actually works. # if test -n "$lt_prog_compiler_pic_CXX"; then { $as_echo "$as_me:$LINENO: checking if $compiler PIC flag $lt_prog_compiler_pic_CXX works" >&5 $as_echo_n "checking if $compiler PIC flag $lt_prog_compiler_pic_CXX works... " >&6; } if test "${lt_cv_prog_compiler_pic_works_CXX+set}" = set; then $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_pic_works_CXX=no ac_outfile=conftest.$ac_objext echo "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="$lt_prog_compiler_pic_CXX -DPIC" # 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}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:16507: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 echo "$as_me:16511: \$? = $ac_status" >&5 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 other than the usual output. $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then lt_cv_prog_compiler_pic_works_CXX=yes fi fi $RM conftest* fi { $as_echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_pic_works_CXX" >&5 $as_echo "$lt_cv_prog_compiler_pic_works_CXX" >&6; } if test x"$lt_cv_prog_compiler_pic_works_CXX" = xyes; then case $lt_prog_compiler_pic_CXX in "" | " "*) ;; *) lt_prog_compiler_pic_CXX=" $lt_prog_compiler_pic_CXX" ;; esac else lt_prog_compiler_pic_CXX= lt_prog_compiler_can_build_shared_CXX=no fi fi # # Check to make sure the static flag actually works. # wl=$lt_prog_compiler_wl_CXX eval lt_tmp_static_flag=\"$lt_prog_compiler_static_CXX\" { $as_echo "$as_me:$LINENO: checking if $compiler static flag $lt_tmp_static_flag works" >&5 $as_echo_n "checking if $compiler static flag $lt_tmp_static_flag works... " >&6; } if test "${lt_cv_prog_compiler_static_works_CXX+set}" = set; then $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_static_works_CXX=no save_LDFLAGS="$LDFLAGS" LDFLAGS="$LDFLAGS $lt_tmp_static_flag" echo "$lt_simple_link_test_code" > conftest.$ac_ext if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then # The linker 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>&5 $ECHO "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if diff conftest.exp conftest.er2 >/dev/null; then lt_cv_prog_compiler_static_works_CXX=yes fi else lt_cv_prog_compiler_static_works_CXX=yes fi fi $RM -r conftest* LDFLAGS="$save_LDFLAGS" fi { $as_echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_static_works_CXX" >&5 $as_echo "$lt_cv_prog_compiler_static_works_CXX" >&6; } if test x"$lt_cv_prog_compiler_static_works_CXX" = xyes; then : else lt_prog_compiler_static_CXX= fi { $as_echo "$as_me:$LINENO: checking if $compiler supports -c -o file.$ac_objext" >&5 $as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; } if test "${lt_cv_prog_compiler_c_o_CXX+set}" = set; then $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_c_o_CXX=no $RM -r conftest 2>/dev/null mkdir conftest cd conftest mkdir out echo "$lt_simple_compile_test_code" > conftest.$ac_ext 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}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:16606: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 echo "$as_me:16610: \$? = $ac_status" >&5 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 $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then lt_cv_prog_compiler_c_o_CXX=yes fi fi chmod u+w . 2>&5 $RM conftest* # SGI C++ compiler will create directory out/ii_files/ for # template instantiation test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files $RM out/* && rmdir out cd .. $RM -r conftest $RM conftest* fi { $as_echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_c_o_CXX" >&5 $as_echo "$lt_cv_prog_compiler_c_o_CXX" >&6; } { $as_echo "$as_me:$LINENO: checking if $compiler supports -c -o file.$ac_objext" >&5 $as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; } if test "${lt_cv_prog_compiler_c_o_CXX+set}" = set; then $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_c_o_CXX=no $RM -r conftest 2>/dev/null mkdir conftest cd conftest mkdir out echo "$lt_simple_compile_test_code" > conftest.$ac_ext 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}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:16658: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 echo "$as_me:16662: \$? = $ac_status" >&5 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 $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then lt_cv_prog_compiler_c_o_CXX=yes fi fi chmod u+w . 2>&5 $RM conftest* # SGI C++ compiler will create directory out/ii_files/ for # template instantiation test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files $RM out/* && rmdir out cd .. $RM -r conftest $RM conftest* fi { $as_echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_c_o_CXX" >&5 $as_echo "$lt_cv_prog_compiler_c_o_CXX" >&6; } hard_links="nottested" if test "$lt_cv_prog_compiler_c_o_CXX" = no && test "$need_locks" != no; then # do not overwrite the value of need_locks provided by the user { $as_echo "$as_me:$LINENO: checking if we can lock with hard links" >&5 $as_echo_n "checking if we can lock with hard links... " >&6; } 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 { $as_echo "$as_me:$LINENO: result: $hard_links" >&5 $as_echo "$hard_links" >&6; } if test "$hard_links" = no; then { $as_echo "$as_me:$LINENO: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&5 $as_echo "$as_me: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&2;} need_locks=warn fi else need_locks=no fi { $as_echo "$as_me:$LINENO: checking whether the $compiler linker ($LD) supports shared libraries" >&5 $as_echo_n "checking whether the $compiler linker ($LD) supports shared libraries... " >&6; } export_symbols_cmds_CXX='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' case $host_os in aix[4-9]*) # 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 export_symbols_cmds_CXX='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && (substr(\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' else export_symbols_cmds_CXX='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && (substr(\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' fi ;; pw32*) export_symbols_cmds_CXX="$ltdll_cmds" ;; cygwin* | mingw* | cegcc*) export_symbols_cmds_CXX='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1 DATA/;/^.*[ ]__nm__/s/^.*[ ]__nm__\([^ ]*\)[ ][^ ]*/\1 DATA/;/^I[ ]/d;/^[AITW][ ]/s/.* //'\'' | sort | uniq > $export_symbols' ;; *) export_symbols_cmds_CXX='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' ;; esac exclude_expsyms_CXX='_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*' { $as_echo "$as_me:$LINENO: result: $ld_shlibs_CXX" >&5 $as_echo "$ld_shlibs_CXX" >&6; } test "$ld_shlibs_CXX" = no && can_build_shared=no with_gnu_ld_CXX=$with_gnu_ld # # Do we need to explicitly link libc? # case "x$archive_cmds_need_lc_CXX" in x|xyes) # Assume -lc should be added archive_cmds_need_lc_CXX=yes if test "$enable_shared" = yes && test "$GCC" = yes; then case $archive_cmds_CXX 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. { $as_echo "$as_me:$LINENO: checking whether -lc should be explicitly linked in" >&5 $as_echo_n "checking whether -lc should be explicitly linked in... " >&6; } $RM conftest* echo "$lt_simple_compile_test_code" > conftest.$ac_ext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } 2>conftest.err; then soname=conftest lib=conftest libobjs=conftest.$ac_objext deplibs= wl=$lt_prog_compiler_wl_CXX pic_flag=$lt_prog_compiler_pic_CXX compiler_flags=-v linker_flags=-v verstring= output_objdir=. libname=conftest lt_save_allow_undefined_flag=$allow_undefined_flag_CXX allow_undefined_flag_CXX= if { (eval echo "$as_me:$LINENO: \"$archive_cmds_CXX 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1\"") >&5 (eval $archive_cmds_CXX 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } then archive_cmds_need_lc_CXX=no else archive_cmds_need_lc_CXX=yes fi allow_undefined_flag_CXX=$lt_save_allow_undefined_flag else cat conftest.err 1>&5 fi $RM conftest* { $as_echo "$as_me:$LINENO: result: $archive_cmds_need_lc_CXX" >&5 $as_echo "$archive_cmds_need_lc_CXX" >&6; } ;; esac fi ;; esac { $as_echo "$as_me:$LINENO: checking dynamic linker characteristics" >&5 $as_echo_n "checking dynamic linker characteristics... " >&6; } library_names_spec= libname_spec='lib$name' soname_spec= shrext_cmds=".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" 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' ;; aix[4-9]*) 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*) case $host_cpu in powerpc) # Since July 2007 AmigaOS4 officially supports .so libraries. # When compiling the executable, add -use-dynld -Lsobjs: to the compileline. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' ;; m68k) 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' ;; esac ;; beos*) library_names_spec='${libname}${shared_ext}' dynamic_linker="$host_os ld.so" shlibpath_var=LIBRARY_PATH ;; bsdi[45]*) 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* | cegcc*) version_type=windows shrext_cmds=".dll" need_version=no need_lib_prefix=no case $GCC,$host_os in yes,cygwin* | yes,mingw* | yes,pw32* | yes,cegcc*) 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~ chmod a+x \$dldir/$dlname~ if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then eval '\''$striplib \$dldir/$dlname'\'' || exit \$?; fi' 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="/usr/lib /lib/w32api /lib /usr/local/lib" ;; mingw* | cegcc*) # 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 library_names_spec='${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_cmds='`test .$module = .yes && echo .so || echo .dylib`' 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* | dragonfly*) # DragonFly does not have aout. When/if they implement a new # versioning mechanism, adjust this. if test -x /usr/bin/objformat; then objformat=`/usr/bin/objformat` else case $host_os in freebsd[123]*) objformat=aout ;; *) objformat=elf ;; esac fi 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 ;; freebsd3.[2-9]* | freebsdelf3.[2-9]* | \ freebsd4.[0-5] | freebsdelf4.[0-5] | freebsd4.1.1 | freebsdelf4.1.1) shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; *) # from 4.6 on, and DragonFly shlibpath_overrides_runpath=yes 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_cmds='.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_cmds='.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_cmds='.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' ;; interix[3-9]*) 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' dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; 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* | k*bsd*-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' finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no # Some binutils ld are patched to set DT_RUNPATH save_LDFLAGS=$LDFLAGS save_libdir=$libdir eval "libdir=/foo; wl=\"$lt_prog_compiler_wl_CXX\"; \ LDFLAGS=\"\$LDFLAGS $hardcode_libdir_flag_spec_CXX\"" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_cxx_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || $as_test_x conftest$ac_exeext }; then if ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null; then shlibpath_overrides_runpath=yes fi else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LDFLAGS=$save_LDFLAGS libdir=$save_libdir # 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 # Add ABI-specific directories to the system library path. sys_lib_dlsearch_path_spec="/lib64 /usr/lib64 /lib /usr/lib" # Append ld.so.conf contents to the search path if test -f /etc/ld.so.conf; then lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '` sys_lib_dlsearch_path_spec="$sys_lib_dlsearch_path_spec $lt_ld_extra" fi # 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' ;; 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}${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=qnx 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=no hardcode_into_libs=yes dynamic_linker='ldqnx.so' ;; openbsd*) version_type=sunos sys_lib_dlsearch_path_spec="/usr/lib" need_lib_prefix=no # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs. case $host_os in openbsd3.3 | openbsd3.3.*) need_version=yes ;; *) need_version=no ;; esac 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_cmds=".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" ;; rdos*) dynamic_linker=no ;; 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.3*) 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 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 ;; sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) version_type=freebsd-elf need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes if test "$with_gnu_ld" = yes; then sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' else sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' case $host_os in sco3.2v5*) sys_lib_search_path_spec="$sys_lib_search_path_spec /lib" ;; esac fi sys_lib_dlsearch_path_spec='/usr/lib' ;; tpf*) # TPF is a cross-target only. Preferred cross-host = GNU/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}' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; 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 { $as_echo "$as_me:$LINENO: result: $dynamic_linker" >&5 $as_echo "$dynamic_linker" >&6; } test "$dynamic_linker" = 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 if test "${lt_cv_sys_lib_search_path_spec+set}" = set; then sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec" fi if test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec" fi { $as_echo "$as_me:$LINENO: checking how to hardcode library paths into programs" >&5 $as_echo_n "checking how to hardcode library paths into programs... " >&6; } hardcode_action_CXX= if test -n "$hardcode_libdir_flag_spec_CXX" || test -n "$runpath_var_CXX" || test "X$hardcode_automatic_CXX" = "Xyes" ; then # We can hardcode non-existent directories. if test "$hardcode_direct_CXX" != 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_TAGVAR(hardcode_shlibpath_var, CXX)" != no && test "$hardcode_minus_L_CXX" != no; then # Linking always hardcodes the temporary library directory. hardcode_action_CXX=relink else # We can link without hardcoding, and we can hardcode nonexisting dirs. hardcode_action_CXX=immediate fi else # We cannot hardcode anything, or else we can only hardcode existing # directories. hardcode_action_CXX=unsupported fi { $as_echo "$as_me:$LINENO: result: $hardcode_action_CXX" >&5 $as_echo "$hardcode_action_CXX" >&6; } if test "$hardcode_action_CXX" = relink || test "$inherit_rpath_CXX" = yes; 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 fi # test -n "$compiler" CC=$lt_save_CC LDCXX=$LD LD=$lt_save_LD GCC=$lt_save_GCC 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 fi # test "$_lt_caught_CXX_error" != yes ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu ac_config_commands="$ac_config_commands libtool" # Only expand once: { $as_echo "$as_me:$LINENO: checking which extension is used for runtime loadable modules" >&5 $as_echo_n "checking which extension is used for runtime loadable modules... " >&6; } if test "${libltdl_cv_shlibext+set}" = set; then $as_echo_n "(cached) " >&6 else module=yes eval libltdl_cv_shlibext=$shrext_cmds fi { $as_echo "$as_me:$LINENO: result: $libltdl_cv_shlibext" >&5 $as_echo "$libltdl_cv_shlibext" >&6; } if test -n "$libltdl_cv_shlibext"; then cat >>confdefs.h <<_ACEOF #define LT_MODULE_EXT "$libltdl_cv_shlibext" _ACEOF fi { $as_echo "$as_me:$LINENO: checking which variable specifies run-time module search path" >&5 $as_echo_n "checking which variable specifies run-time module search path... " >&6; } if test "${lt_cv_module_path_var+set}" = set; then $as_echo_n "(cached) " >&6 else lt_cv_module_path_var="$shlibpath_var" fi { $as_echo "$as_me:$LINENO: result: $lt_cv_module_path_var" >&5 $as_echo "$lt_cv_module_path_var" >&6; } if test -n "$lt_cv_module_path_var"; then cat >>confdefs.h <<_ACEOF #define LT_MODULE_PATH_VAR "$lt_cv_module_path_var" _ACEOF fi { $as_echo "$as_me:$LINENO: checking for the default library search path" >&5 $as_echo_n "checking for the default library search path... " >&6; } if test "${lt_cv_sys_dlsearch_path+set}" = set; then $as_echo_n "(cached) " >&6 else lt_cv_sys_dlsearch_path="$sys_lib_dlsearch_path_spec" fi { $as_echo "$as_me:$LINENO: result: $lt_cv_sys_dlsearch_path" >&5 $as_echo "$lt_cv_sys_dlsearch_path" >&6; } if test -n "$lt_cv_sys_dlsearch_path"; then sys_dlsearch_path= for dir in $lt_cv_sys_dlsearch_path; do if test -z "$sys_dlsearch_path"; then sys_dlsearch_path="$dir" else sys_dlsearch_path="$sys_dlsearch_path$PATH_SEPARATOR$dir" fi done cat >>confdefs.h <<_ACEOF #define LT_DLSEARCH_PATH "$sys_dlsearch_path" _ACEOF fi LT_DLLOADERS= ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu LIBADD_DLOPEN= { $as_echo "$as_me:$LINENO: checking for library containing dlopen" >&5 $as_echo_n "checking for library containing dlopen... " >&6; } if test "${ac_cv_search_dlopen+set}" = set; then $as_echo_n "(cached) " >&6 else ac_func_search_save_LIBS=$LIBS cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char dlopen (); int main () { return dlopen (); ; return 0; } _ACEOF for ac_lib in '' dl; do if test -z "$ac_lib"; then ac_res="none required" else ac_res=-l$ac_lib LIBS="-l$ac_lib $ac_func_search_save_LIBS" fi rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || $as_test_x conftest$ac_exeext }; then ac_cv_search_dlopen=$ac_res else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext if test "${ac_cv_search_dlopen+set}" = set; then break fi done if test "${ac_cv_search_dlopen+set}" = set; then : else ac_cv_search_dlopen=no fi rm conftest.$ac_ext LIBS=$ac_func_search_save_LIBS fi { $as_echo "$as_me:$LINENO: result: $ac_cv_search_dlopen" >&5 $as_echo "$ac_cv_search_dlopen" >&6; } ac_res=$ac_cv_search_dlopen if test "$ac_res" != no; then test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" cat >>confdefs.h <<\_ACEOF #define HAVE_LIBDL 1 _ACEOF if test "$ac_cv_search_dlopen" != "none required" ; then LIBADD_DLOPEN="-ldl" fi libltdl_cv_lib_dl_dlopen="yes" LT_DLLOADERS="$LT_DLLOADERS ${lt_dlopen_dir+$lt_dlopen_dir/}dlopen.la" else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #if HAVE_DLFCN_H # include #endif int main () { dlopen(0, 0); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || $as_test_x conftest$ac_exeext }; then cat >>confdefs.h <<\_ACEOF #define HAVE_LIBDL 1 _ACEOF libltdl_cv_func_dlopen="yes" LT_DLLOADERS="$LT_DLLOADERS ${lt_dlopen_dir+$lt_dlopen_dir/}dlopen.la" else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 { $as_echo "$as_me:$LINENO: checking for dlopen in -lsvld" >&5 $as_echo_n "checking for dlopen in -lsvld... " >&6; } if test "${ac_cv_lib_svld_dlopen+set}" = set; then $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lsvld $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char dlopen (); int main () { return dlopen (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || $as_test_x conftest$ac_exeext }; then ac_cv_lib_svld_dlopen=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_svld_dlopen=no fi rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:$LINENO: result: $ac_cv_lib_svld_dlopen" >&5 $as_echo "$ac_cv_lib_svld_dlopen" >&6; } if test "x$ac_cv_lib_svld_dlopen" = x""yes; then cat >>confdefs.h <<\_ACEOF #define HAVE_LIBDL 1 _ACEOF LIBADD_DLOPEN="-lsvld" libltdl_cv_func_dlopen="yes" LT_DLLOADERS="$LT_DLLOADERS ${lt_dlopen_dir+$lt_dlopen_dir/}dlopen.la" fi fi rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi if test x"$libltdl_cv_func_dlopen" = xyes || test x"$libltdl_cv_lib_dl_dlopen" = xyes then lt_save_LIBS="$LIBS" LIBS="$LIBS $LIBADD_DLOPEN" for ac_func in dlerror do as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` { $as_echo "$as_me:$LINENO: checking for $ac_func" >&5 $as_echo_n "checking for $ac_func... " >&6; } if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Define $ac_func to an innocuous variant, in case declares $ac_func. For example, HP-UX 11i declares gettimeofday. */ #define $ac_func innocuous_$ac_func /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $ac_func (); below. Prefer to if __STDC__ is defined, since exists even on freestanding compilers. */ #ifdef __STDC__ # include #else # include #endif #undef $ac_func /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char $ac_func (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined __stub_$ac_func || defined __stub___$ac_func choke me #endif int main () { return $ac_func (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || $as_test_x conftest$ac_exeext }; then eval "$as_ac_var=yes" else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 eval "$as_ac_var=no" fi rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi ac_res=`eval 'as_val=${'$as_ac_var'} $as_echo "$as_val"'` { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } as_val=`eval 'as_val=${'$as_ac_var'} $as_echo "$as_val"'` if test "x$as_val" = x""yes; then cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF fi done LIBS="$lt_save_LIBS" fi LIBADD_SHL_LOAD= { $as_echo "$as_me:$LINENO: checking for shl_load" >&5 $as_echo_n "checking for shl_load... " >&6; } if test "${ac_cv_func_shl_load+set}" = set; then $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Define shl_load to an innocuous variant, in case declares shl_load. For example, HP-UX 11i declares gettimeofday. */ #define shl_load innocuous_shl_load /* System header to define __stub macros and hopefully few prototypes, which can conflict with char shl_load (); below. Prefer to if __STDC__ is defined, since exists even on freestanding compilers. */ #ifdef __STDC__ # include #else # include #endif #undef shl_load /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char shl_load (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined __stub_shl_load || defined __stub___shl_load choke me #endif int main () { return shl_load (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || $as_test_x conftest$ac_exeext }; then ac_cv_func_shl_load=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_func_shl_load=no fi rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi { $as_echo "$as_me:$LINENO: result: $ac_cv_func_shl_load" >&5 $as_echo "$ac_cv_func_shl_load" >&6; } if test "x$ac_cv_func_shl_load" = x""yes; then cat >>confdefs.h <<\_ACEOF #define HAVE_SHL_LOAD 1 _ACEOF LT_DLLOADERS="$LT_DLLOADERS ${lt_dlopen_dir+$lt_dlopen_dir/}shl_load.la" else { $as_echo "$as_me:$LINENO: checking for shl_load in -ldld" >&5 $as_echo_n "checking for shl_load in -ldld... " >&6; } if test "${ac_cv_lib_dld_shl_load+set}" = set; then $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ldld $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char shl_load (); int main () { return shl_load (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || $as_test_x conftest$ac_exeext }; then ac_cv_lib_dld_shl_load=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_dld_shl_load=no fi rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:$LINENO: result: $ac_cv_lib_dld_shl_load" >&5 $as_echo "$ac_cv_lib_dld_shl_load" >&6; } if test "x$ac_cv_lib_dld_shl_load" = x""yes; then cat >>confdefs.h <<\_ACEOF #define HAVE_SHL_LOAD 1 _ACEOF LT_DLLOADERS="$LT_DLLOADERS ${lt_dlopen_dir+$lt_dlopen_dir/}shl_load.la" LIBADD_SHL_LOAD="-ldld" fi fi case $host_os in darwin[1567].*) # We only want this for pre-Mac OS X 10.4. { $as_echo "$as_me:$LINENO: checking for _dyld_func_lookup" >&5 $as_echo_n "checking for _dyld_func_lookup... " >&6; } if test "${ac_cv_func__dyld_func_lookup+set}" = set; then $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Define _dyld_func_lookup to an innocuous variant, in case declares _dyld_func_lookup. For example, HP-UX 11i declares gettimeofday. */ #define _dyld_func_lookup innocuous__dyld_func_lookup /* System header to define __stub macros and hopefully few prototypes, which can conflict with char _dyld_func_lookup (); below. Prefer to if __STDC__ is defined, since exists even on freestanding compilers. */ #ifdef __STDC__ # include #else # include #endif #undef _dyld_func_lookup /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char _dyld_func_lookup (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined __stub__dyld_func_lookup || defined __stub____dyld_func_lookup choke me #endif int main () { return _dyld_func_lookup (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || $as_test_x conftest$ac_exeext }; then ac_cv_func__dyld_func_lookup=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_func__dyld_func_lookup=no fi rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi { $as_echo "$as_me:$LINENO: result: $ac_cv_func__dyld_func_lookup" >&5 $as_echo "$ac_cv_func__dyld_func_lookup" >&6; } if test "x$ac_cv_func__dyld_func_lookup" = x""yes; then cat >>confdefs.h <<\_ACEOF #define HAVE_DYLD 1 _ACEOF LT_DLLOADERS="$LT_DLLOADERS ${lt_dlopen_dir+$lt_dlopen_dir/}dyld.la" fi ;; beos*) LT_DLLOADERS="$LT_DLLOADERS ${lt_dlopen_dir+$lt_dlopen_dir/}load_add_on.la" ;; cygwin* | mingw* | os2* | pw32*) { $as_echo "$as_me:$LINENO: checking whether cygwin_conv_path is declared" >&5 $as_echo_n "checking whether cygwin_conv_path is declared... " >&6; } if test "${ac_cv_have_decl_cygwin_conv_path+set}" = set; then $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include int main () { #ifndef cygwin_conv_path (void) cygwin_conv_path; #endif ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_cv_have_decl_cygwin_conv_path=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_have_decl_cygwin_conv_path=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:$LINENO: result: $ac_cv_have_decl_cygwin_conv_path" >&5 $as_echo "$ac_cv_have_decl_cygwin_conv_path" >&6; } if test "x$ac_cv_have_decl_cygwin_conv_path" = x""yes; then cat >>confdefs.h <<_ACEOF #define HAVE_DECL_CYGWIN_CONV_PATH 1 _ACEOF else cat >>confdefs.h <<_ACEOF #define HAVE_DECL_CYGWIN_CONV_PATH 0 _ACEOF fi LT_DLLOADERS="$LT_DLLOADERS ${lt_dlopen_dir+$lt_dlopen_dir/}loadlibrary.la" ;; esac { $as_echo "$as_me:$LINENO: checking for dld_link in -ldld" >&5 $as_echo_n "checking for dld_link in -ldld... " >&6; } if test "${ac_cv_lib_dld_dld_link+set}" = set; then $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ldld $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char dld_link (); int main () { return dld_link (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || $as_test_x conftest$ac_exeext }; then ac_cv_lib_dld_dld_link=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_dld_dld_link=no fi rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:$LINENO: result: $ac_cv_lib_dld_dld_link" >&5 $as_echo "$ac_cv_lib_dld_dld_link" >&6; } if test "x$ac_cv_lib_dld_dld_link" = x""yes; then cat >>confdefs.h <<\_ACEOF #define HAVE_DLD 1 _ACEOF LT_DLLOADERS="$LT_DLLOADERS ${lt_dlopen_dir+$lt_dlopen_dir/}dld_link.la" fi LT_DLPREOPEN= if test -n "$LT_DLLOADERS" then for lt_loader in $LT_DLLOADERS; do LT_DLPREOPEN="$LT_DLPREOPEN-dlpreopen $lt_loader " done cat >>confdefs.h <<\_ACEOF #define HAVE_LIBDLLOADER 1 _ACEOF fi LIBADD_DL="$LIBADD_DLOPEN $LIBADD_SHL_LOAD" ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu { $as_echo "$as_me:$LINENO: checking for _ prefix in compiled symbols" >&5 $as_echo_n "checking for _ prefix in compiled symbols... " >&6; } if test "${lt_cv_sys_symbol_underscore+set}" = set; then $as_echo_n "(cached) " >&6 else lt_cv_sys_symbol_underscore=no cat > conftest.$ac_ext <<_LT_EOF void nm_test_func(){} int main(){nm_test_func;return 0;} _LT_EOF if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then # Now try to grab the symbols. ac_nlist=conftest.nm if { (eval echo "$as_me:$LINENO: \"$NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $ac_nlist\"") >&5 (eval $NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $ac_nlist) 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && test -s "$ac_nlist"; then # See whether the symbols have a leading underscore. if grep '^. _nm_test_func' "$ac_nlist" >/dev/null; then lt_cv_sys_symbol_underscore=yes else if grep '^. nm_test_func ' "$ac_nlist" >/dev/null; then : else echo "configure: cannot find nm_test_func in $ac_nlist" >&5 fi fi else echo "configure: cannot run $lt_cv_sys_global_symbol_pipe" >&5 fi else echo "configure: failed program was:" >&5 cat conftest.c >&5 fi rm -rf conftest* fi { $as_echo "$as_me:$LINENO: result: $lt_cv_sys_symbol_underscore" >&5 $as_echo "$lt_cv_sys_symbol_underscore" >&6; } sys_symbol_underscore=$lt_cv_sys_symbol_underscore if test x"$lt_cv_sys_symbol_underscore" = xyes; then if test x"$libltdl_cv_func_dlopen" = xyes || test x"$libltdl_cv_lib_dl_dlopen" = xyes ; then { $as_echo "$as_me:$LINENO: checking whether we have to add an underscore for dlsym" >&5 $as_echo_n "checking whether we have to add an underscore for dlsym... " >&6; } if test "${libltdl_cv_need_uscore+set}" = set; then $as_echo_n "(cached) " >&6 else libltdl_cv_need_uscore=unknown save_LIBS="$LIBS" LIBS="$LIBS $LIBADD_DLOPEN" if test "$cross_compiling" = yes; then : libltdl_cv_need_uscore=cross else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF #line 18569 "configure" #include "confdefs.h" #if HAVE_DLFCN_H #include #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 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); */ } else puts (dlerror ()); return status; } _LT_EOF if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && test -s conftest${ac_exeext} 2>/dev/null; then (./conftest; exit; ) >&5 2>/dev/null lt_status=$? case x$lt_status in x$lt_dlno_uscore) libltdl_cv_need_uscore=no ;; x$lt_dlneed_uscore) libltdl_cv_need_uscore=yes ;; x$lt_dlunknown|x*) ;; esac else : # compilation failed fi fi rm -fr conftest* LIBS="$save_LIBS" fi { $as_echo "$as_me:$LINENO: result: $libltdl_cv_need_uscore" >&5 $as_echo "$libltdl_cv_need_uscore" >&6; } fi fi if test x"$libltdl_cv_need_uscore" = xyes; then cat >>confdefs.h <<\_ACEOF #define NEED_USCORE 1 _ACEOF fi { $as_echo "$as_me:$LINENO: checking whether deplibs are loaded by dlopen" >&5 $as_echo_n "checking whether deplibs are loaded by dlopen... " >&6; } if test "${lt_cv_sys_dlopen_deplibs+set}" = set; then $as_echo_n "(cached) " >&6 else # PORTME does your system automatically load deplibs for dlopen? # or its logical equivalent (e.g. shl_load for HP-UX < 11) # For now, we just catch OSes we know something about -- in the # future, we'll try test this programmatically. lt_cv_sys_dlopen_deplibs=unknown case $host_os in aix3*|aix4.1.*|aix4.2.*) # Unknown whether this is true for these versions of AIX, but # we want this `case' here to explicitly catch those versions. lt_cv_sys_dlopen_deplibs=unknown ;; aix[4-9]*) lt_cv_sys_dlopen_deplibs=yes ;; amigaos*) case $host_cpu in powerpc) lt_cv_sys_dlopen_deplibs=no ;; esac ;; darwin*) # Assuming the user has installed a libdl from somewhere, this is true # If you are looking for one http://www.opendarwin.org/projects/dlcompat lt_cv_sys_dlopen_deplibs=yes ;; freebsd* | dragonfly*) lt_cv_sys_dlopen_deplibs=yes ;; gnu* | linux* | k*bsd*-gnu) # GNU and its variants, using gnu ld.so (Glibc) lt_cv_sys_dlopen_deplibs=yes ;; hpux10*|hpux11*) lt_cv_sys_dlopen_deplibs=yes ;; interix*) lt_cv_sys_dlopen_deplibs=yes ;; irix[12345]*|irix6.[01]*) # Catch all versions of IRIX before 6.2, and indicate that we don't # know how it worked for any of those versions. lt_cv_sys_dlopen_deplibs=unknown ;; irix*) # The case above catches anything before 6.2, and it's known that # at 6.2 and later dlopen does load deplibs. lt_cv_sys_dlopen_deplibs=yes ;; netbsd*) lt_cv_sys_dlopen_deplibs=yes ;; openbsd*) lt_cv_sys_dlopen_deplibs=yes ;; osf[1234]*) # dlopen did load deplibs (at least at 4.x), but until the 5.x series, # it did *not* use an RPATH in a shared library to find objects the # library depends on, so we explicitly say `no'. lt_cv_sys_dlopen_deplibs=no ;; osf5.0|osf5.0a|osf5.1) # dlopen *does* load deplibs and with the right loader patch applied # it even uses RPATH in a shared library to search for shared objects # that the library depends on, but there's no easy way to know if that # patch is installed. Since this is the case, all we can really # say is unknown -- it depends on the patch being installed. If # it is, this changes to `yes'. Without it, it would be `no'. lt_cv_sys_dlopen_deplibs=unknown ;; osf*) # the two cases above should catch all versions of osf <= 5.1. Read # the comments above for what we know about them. # At > 5.1, deplibs are loaded *and* any RPATH in a shared library # is used to find them so we can finally say `yes'. lt_cv_sys_dlopen_deplibs=yes ;; qnx*) lt_cv_sys_dlopen_deplibs=yes ;; solaris*) lt_cv_sys_dlopen_deplibs=yes ;; sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) libltdl_cv_sys_dlopen_deplibs=yes ;; esac fi { $as_echo "$as_me:$LINENO: result: $lt_cv_sys_dlopen_deplibs" >&5 $as_echo "$lt_cv_sys_dlopen_deplibs" >&6; } if test "$lt_cv_sys_dlopen_deplibs" != yes; then cat >>confdefs.h <<\_ACEOF #define LTDL_DLOPEN_DEPLIBS 1 _ACEOF fi : for ac_header in argz.h do as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 $as_echo_n "checking for $ac_header... " >&6; } if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default #include <$ac_header> _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then eval "$as_ac_Header=yes" else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 eval "$as_ac_Header=no" fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi ac_res=`eval 'as_val=${'$as_ac_Header'} $as_echo "$as_val"'` { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } as_val=`eval 'as_val=${'$as_ac_Header'} $as_echo "$as_val"'` if test "x$as_val" = x""yes; then cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi done { $as_echo "$as_me:$LINENO: checking for error_t" >&5 $as_echo_n "checking for error_t... " >&6; } if test "${ac_cv_type_error_t+set}" = set; then $as_echo_n "(cached) " >&6 else ac_cv_type_error_t=no cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #if defined(HAVE_ARGZ_H) # include #endif int main () { if (sizeof (error_t)) return 0; ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #if defined(HAVE_ARGZ_H) # include #endif int main () { if (sizeof ((error_t))) return 0; ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then : else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_type_error_t=yes fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:$LINENO: result: $ac_cv_type_error_t" >&5 $as_echo "$ac_cv_type_error_t" >&6; } if test "x$ac_cv_type_error_t" = x""yes; then cat >>confdefs.h <<_ACEOF #define HAVE_ERROR_T 1 _ACEOF else cat >>confdefs.h <<\_ACEOF #define error_t int _ACEOF cat >>confdefs.h <<\_ACEOF #define __error_t_defined 1 _ACEOF fi ARGZ_H= for ac_func in argz_add argz_append argz_count argz_create_sep argz_insert \ argz_next argz_stringify do as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` { $as_echo "$as_me:$LINENO: checking for $ac_func" >&5 $as_echo_n "checking for $ac_func... " >&6; } if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Define $ac_func to an innocuous variant, in case declares $ac_func. For example, HP-UX 11i declares gettimeofday. */ #define $ac_func innocuous_$ac_func /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $ac_func (); below. Prefer to if __STDC__ is defined, since exists even on freestanding compilers. */ #ifdef __STDC__ # include #else # include #endif #undef $ac_func /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char $ac_func (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined __stub_$ac_func || defined __stub___$ac_func choke me #endif int main () { return $ac_func (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || $as_test_x conftest$ac_exeext }; then eval "$as_ac_var=yes" else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 eval "$as_ac_var=no" fi rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi ac_res=`eval 'as_val=${'$as_ac_var'} $as_echo "$as_val"'` { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } as_val=`eval 'as_val=${'$as_ac_var'} $as_echo "$as_val"'` if test "x$as_val" = x""yes; then cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF else ARGZ_H=argz.h; _LT_LIBOBJS="$_LT_LIBOBJS argz.$ac_objext" fi done if test -z "$ARGZ_H"; then { $as_echo "$as_me:$LINENO: checking if argz actually works" >&5 $as_echo_n "checking if argz actually works... " >&6; } if test "${lt_cv_sys_argz_works+set}" = set; then $as_echo_n "(cached) " >&6 else case $host_os in #( *cygwin*) lt_cv_sys_argz_works=no if test "$cross_compiling" != no; then lt_cv_sys_argz_works="guessing no" else lt_sed_extract_leading_digits='s/^\([0-9\.]*\).*/\1/' save_IFS=$IFS IFS=-. set x `uname -r | sed -e "$lt_sed_extract_leading_digits"` IFS=$save_IFS lt_os_major=${2-0} lt_os_minor=${3-0} lt_os_micro=${4-0} if test "$lt_os_major" -gt 1 \ || { test "$lt_os_major" -eq 1 \ && { test "$lt_os_minor" -gt 5 \ || { test "$lt_os_minor" -eq 5 \ && test "$lt_os_micro" -gt 24; }; }; }; then lt_cv_sys_argz_works=yes fi fi ;; #( *) lt_cv_sys_argz_works=yes ;; esac fi { $as_echo "$as_me:$LINENO: result: $lt_cv_sys_argz_works" >&5 $as_echo "$lt_cv_sys_argz_works" >&6; } if test $lt_cv_sys_argz_works = yes; then cat >>confdefs.h <<\_ACEOF #define HAVE_WORKING_ARGZ 1 _ACEOF else ARGZ_H=argz.h _LT_LIBOBJS="$_LT_LIBOBJS argz.$ac_objext" fi fi { $as_echo "$as_me:$LINENO: checking whether libtool supports -dlopen/-dlpreopen" >&5 $as_echo_n "checking whether libtool supports -dlopen/-dlpreopen... " >&6; } if test "${libltdl_cv_preloaded_symbols+set}" = set; then $as_echo_n "(cached) " >&6 else if test -n "$lt_cv_sys_global_symbol_pipe"; then libltdl_cv_preloaded_symbols=yes else libltdl_cv_preloaded_symbols=no fi fi { $as_echo "$as_me:$LINENO: result: $libltdl_cv_preloaded_symbols" >&5 $as_echo "$libltdl_cv_preloaded_symbols" >&6; } if test x"$libltdl_cv_preloaded_symbols" = xyes; then cat >>confdefs.h <<\_ACEOF #define HAVE_PRELOADED_SYMBOLS 1 _ACEOF fi # Set options # Check whether --with-included_ltdl was given. if test "${with_included_ltdl+set}" = set; then withval=$with_included_ltdl; fi if test "x$with_included_ltdl" != xyes; then # We are not being forced to use the included libltdl sources, so # decide whether there is a useful installed version we can use. { $as_echo "$as_me:$LINENO: checking for ltdl.h" >&5 $as_echo_n "checking for ltdl.h... " >&6; } if test "${ac_cv_header_ltdl_h+set}" = set; then $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default #include _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_cv_header_ltdl_h=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_header_ltdl_h=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:$LINENO: result: $ac_cv_header_ltdl_h" >&5 $as_echo "$ac_cv_header_ltdl_h" >&6; } if test "x$ac_cv_header_ltdl_h" = x""yes; then { $as_echo "$as_me:$LINENO: checking whether lt_dlinterface_register is declared" >&5 $as_echo_n "checking whether lt_dlinterface_register is declared... " >&6; } if test "${ac_cv_have_decl_lt_dlinterface_register+set}" = set; then $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default #include int main () { #ifndef lt_dlinterface_register (void) lt_dlinterface_register; #endif ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_cv_have_decl_lt_dlinterface_register=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_have_decl_lt_dlinterface_register=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:$LINENO: result: $ac_cv_have_decl_lt_dlinterface_register" >&5 $as_echo "$ac_cv_have_decl_lt_dlinterface_register" >&6; } if test "x$ac_cv_have_decl_lt_dlinterface_register" = x""yes; then { $as_echo "$as_me:$LINENO: checking for lt_dladvise_preload in -lltdl" >&5 $as_echo_n "checking for lt_dladvise_preload in -lltdl... " >&6; } if test "${ac_cv_lib_ltdl_lt_dladvise_preload+set}" = set; then $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lltdl $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char lt_dladvise_preload (); int main () { return lt_dladvise_preload (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || $as_test_x conftest$ac_exeext }; then ac_cv_lib_ltdl_lt_dladvise_preload=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_ltdl_lt_dladvise_preload=no fi rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:$LINENO: result: $ac_cv_lib_ltdl_lt_dladvise_preload" >&5 $as_echo "$ac_cv_lib_ltdl_lt_dladvise_preload" >&6; } if test "x$ac_cv_lib_ltdl_lt_dladvise_preload" = x""yes; then with_included_ltdl=no else with_included_ltdl=yes fi else with_included_ltdl=yes fi else with_included_ltdl=yes fi fi # Check whether --with-ltdl_include was given. if test "${with_ltdl_include+set}" = set; then withval=$with_ltdl_include; fi if test -n "$with_ltdl_include"; then if test -f "$with_ltdl_include/ltdl.h"; then : else { { $as_echo "$as_me:$LINENO: error: invalid ltdl include directory: \`$with_ltdl_include'" >&5 $as_echo "$as_me: error: invalid ltdl include directory: \`$with_ltdl_include'" >&2;} { (exit 1); exit 1; }; } fi else with_ltdl_include=no fi # Check whether --with-ltdl_lib was given. if test "${with_ltdl_lib+set}" = set; then withval=$with_ltdl_lib; fi if test -n "$with_ltdl_lib"; then if test -f "$with_ltdl_lib/libltdl.la"; then : else { { $as_echo "$as_me:$LINENO: error: invalid ltdl library directory: \`$with_ltdl_lib'" >&5 $as_echo "$as_me: error: invalid ltdl library directory: \`$with_ltdl_lib'" >&2;} { (exit 1); exit 1; }; } fi else with_ltdl_lib=no fi case ,$with_included_ltdl,$with_ltdl_include,$with_ltdl_lib, in ,yes,no,no,) case $enable_ltdl_convenience in no) { { $as_echo "$as_me:$LINENO: error: this package needs a convenience libltdl" >&5 $as_echo "$as_me: error: this package needs a convenience libltdl" >&2;} { (exit 1); exit 1; }; } ;; "") enable_ltdl_convenience=yes ac_configure_args="$ac_configure_args --enable-ltdl-convenience" ;; esac LIBLTDL='${top_build_prefix}'"${lt_ltdl_dir+$lt_ltdl_dir/}libltdlc.la" LTDLDEPS=$LIBLTDL LTDLINCL='-I${top_srcdir}'"${lt_ltdl_dir+/$lt_ltdl_dir}" # For backwards non-gettext consistent compatibility... INCLTDL="$LTDLINCL" ;; ,no,no,no,) # If the included ltdl is not to be used, then use the # preinstalled libltdl we found. cat >>confdefs.h <<\_ACEOF #define HAVE_LTDL 1 _ACEOF LIBLTDL=-lltdl LTDLDEPS= LTDLINCL= ;; ,no*,no,*) { { $as_echo "$as_me:$LINENO: error: \`--with-ltdl-include' and \`--with-ltdl-lib' options must be used together" >&5 $as_echo "$as_me: error: \`--with-ltdl-include' and \`--with-ltdl-lib' options must be used together" >&2;} { (exit 1); exit 1; }; } ;; *) with_included_ltdl=no LIBLTDL="-L$with_ltdl_lib -lltdl" LTDLDEPS= LTDLINCL="-I$with_ltdl_include" ;; esac INCLTDL="$LTDLINCL" # Report our decision... { $as_echo "$as_me:$LINENO: checking where to find libltdl headers" >&5 $as_echo_n "checking where to find libltdl headers... " >&6; } { $as_echo "$as_me:$LINENO: result: $LTDLINCL" >&5 $as_echo "$LTDLINCL" >&6; } { $as_echo "$as_me:$LINENO: checking where to find libltdl library" >&5 $as_echo_n "checking where to find libltdl library... " >&6; } { $as_echo "$as_me:$LINENO: result: $LIBLTDL" >&5 $as_echo "$LIBLTDL" >&6; } # Check whether --enable-ltdl-install was given. if test "${enable_ltdl_install+set}" = set; then enableval=$enable_ltdl_install; fi case ,${enable_ltdl_install},${enable_ltdl_convenience} in *yes*) ;; *) enable_ltdl_convenience=yes ;; esac if test x"${enable_ltdl_install-no}" != xno; then INSTALL_LTDL_TRUE= INSTALL_LTDL_FALSE='#' else INSTALL_LTDL_TRUE='#' INSTALL_LTDL_FALSE= fi if test x"${enable_ltdl_convenience-no}" != xno; then CONVENIENCE_LTDL_TRUE= CONVENIENCE_LTDL_FALSE='#' else CONVENIENCE_LTDL_TRUE='#' CONVENIENCE_LTDL_FALSE= fi # In order that ltdl.c can compile, find out the first AC_CONFIG_HEADERS # the user used. This is so that ltdl.h can pick up the parent projects # config.h file, The first file in AC_CONFIG_HEADERS must contain the # definitions required by ltdl.c. # FIXME: Remove use of undocumented AC_LIST_HEADERS (2.59 compatibility). for ac_header in unistd.h dl.h sys/dl.h dld.h mach-o/dyld.h dirent.h do as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 $as_echo_n "checking for $ac_header... " >&6; } if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default #include <$ac_header> _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then eval "$as_ac_Header=yes" else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 eval "$as_ac_Header=no" fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi ac_res=`eval 'as_val=${'$as_ac_Header'} $as_echo "$as_val"'` { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } as_val=`eval 'as_val=${'$as_ac_Header'} $as_echo "$as_val"'` if test "x$as_val" = x""yes; then cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi done for ac_func in closedir opendir readdir do as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` { $as_echo "$as_me:$LINENO: checking for $ac_func" >&5 $as_echo_n "checking for $ac_func... " >&6; } if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Define $ac_func to an innocuous variant, in case declares $ac_func. For example, HP-UX 11i declares gettimeofday. */ #define $ac_func innocuous_$ac_func /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $ac_func (); below. Prefer to if __STDC__ is defined, since exists even on freestanding compilers. */ #ifdef __STDC__ # include #else # include #endif #undef $ac_func /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char $ac_func (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined __stub_$ac_func || defined __stub___$ac_func choke me #endif int main () { return $ac_func (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || $as_test_x conftest$ac_exeext }; then eval "$as_ac_var=yes" else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 eval "$as_ac_var=no" fi rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi ac_res=`eval 'as_val=${'$as_ac_var'} $as_echo "$as_val"'` { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } as_val=`eval 'as_val=${'$as_ac_var'} $as_echo "$as_val"'` if test "x$as_val" = x""yes; then cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF else _LT_LIBOBJS="$_LT_LIBOBJS lt__dirent.$ac_objext" fi done for ac_func in strlcat strlcpy do as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` { $as_echo "$as_me:$LINENO: checking for $ac_func" >&5 $as_echo_n "checking for $ac_func... " >&6; } if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Define $ac_func to an innocuous variant, in case declares $ac_func. For example, HP-UX 11i declares gettimeofday. */ #define $ac_func innocuous_$ac_func /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $ac_func (); below. Prefer to if __STDC__ is defined, since exists even on freestanding compilers. */ #ifdef __STDC__ # include #else # include #endif #undef $ac_func /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char $ac_func (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined __stub_$ac_func || defined __stub___$ac_func choke me #endif int main () { return $ac_func (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || $as_test_x conftest$ac_exeext }; then eval "$as_ac_var=yes" else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 eval "$as_ac_var=no" fi rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi ac_res=`eval 'as_val=${'$as_ac_var'} $as_echo "$as_val"'` { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } as_val=`eval 'as_val=${'$as_ac_var'} $as_echo "$as_val"'` if test "x$as_val" = x""yes; then cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF else _LT_LIBOBJS="$_LT_LIBOBJS lt__strl.$ac_objext" fi done cat >>confdefs.h <<_ACEOF #define LT_LIBEXT "$libext" _ACEOF name=ltdl LTDLOPEN=`eval "\\$ECHO \"$libname_spec\""` # Only expand once: { $as_echo "$as_me:$LINENO: checking for cc for build" >&5 $as_echo_n "checking for cc for build... " >&6; } if test "$cross_compiling" = "yes"; then CC_FOR_BUILD="${CC_FOR_BUILD-cc}" else CC_FOR_BUILD="${CC_FOR_BUILD-$CC}" fi { $as_echo "$as_me:$LINENO: result: $CC_FOR_BUILD" >&5 $as_echo "$CC_FOR_BUILD" >&6; } case $ac_cv_prog_cc_stdc in no) ac_cv_prog_cc_c99=no; ac_cv_prog_cc_c89=no ;; *) { $as_echo "$as_me:$LINENO: checking for $CC option to accept ISO C99" >&5 $as_echo_n "checking for $CC option to accept ISO C99... " >&6; } if test "${ac_cv_prog_cc_c99+set}" = set; then $as_echo_n "(cached) " >&6 else ac_cv_prog_cc_c99=no ac_save_CC=$CC cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #include #include #include #include // Check varargs macros. These examples are taken from C99 6.10.3.5. #define debug(...) fprintf (stderr, __VA_ARGS__) #define showlist(...) puts (#__VA_ARGS__) #define report(test,...) ((test) ? puts (#test) : printf (__VA_ARGS__)) static void test_varargs_macros (void) { int x = 1234; int y = 5678; debug ("Flag"); debug ("X = %d\n", x); showlist (The first, second, and third items.); report (x>y, "x is %d but y is %d", x, y); } // Check long long types. #define BIG64 18446744073709551615ull #define BIG32 4294967295ul #define BIG_OK (BIG64 / BIG32 == 4294967297ull && BIG64 % BIG32 == 0) #if !BIG_OK your preprocessor is broken; #endif #if BIG_OK #else your preprocessor is broken; #endif static long long int bignum = -9223372036854775807LL; static unsigned long long int ubignum = BIG64; struct incomplete_array { int datasize; double data[]; }; struct named_init { int number; const wchar_t *name; double average; }; typedef const char *ccp; static inline int test_restrict (ccp restrict text) { // See if C++-style comments work. // Iterate through items via the restricted pointer. // Also check for declarations in for loops. for (unsigned int i = 0; *(text+i) != '\0'; ++i) continue; return 0; } // Check varargs and va_copy. static void test_varargs (const char *format, ...) { va_list args; va_start (args, format); va_list args_copy; va_copy (args_copy, args); const char *str; int number; float fnumber; while (*format) { switch (*format++) { case 's': // string str = va_arg (args_copy, const char *); break; case 'd': // int number = va_arg (args_copy, int); break; case 'f': // float fnumber = va_arg (args_copy, double); break; default: break; } } va_end (args_copy); va_end (args); } int main () { // Check bool. _Bool success = false; // Check restrict. if (test_restrict ("String literal") == 0) success = true; char *restrict newvar = "Another string"; // Check varargs. test_varargs ("s, d' f .", "string", 65, 34.234); test_varargs_macros (); // Check flexible array members. struct incomplete_array *ia = malloc (sizeof (struct incomplete_array) + (sizeof (double) * 10)); ia->datasize = 10; for (int i = 0; i < ia->datasize; ++i) ia->data[i] = i * 1.234; // Check named initializers. struct named_init ni = { .number = 34, .name = L"Test wide string", .average = 543.34343, }; ni.number = 58; int dynamic_array[ni.number]; dynamic_array[ni.number - 1] = 543; // work around unused variable warnings return (!success || bignum == 0LL || ubignum == 0uLL || newvar[0] == 'x' || dynamic_array[ni.number - 1] != 543); ; return 0; } _ACEOF for ac_arg in '' -std=gnu99 -std=c99 -c99 -AC99 -xc99=all -qlanglvl=extc99 do CC="$ac_save_CC $ac_arg" rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_cv_prog_cc_c99=$ac_arg else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f core conftest.err conftest.$ac_objext test "x$ac_cv_prog_cc_c99" != "xno" && break done rm -f conftest.$ac_ext CC=$ac_save_CC fi # AC_CACHE_VAL case "x$ac_cv_prog_cc_c99" in x) { $as_echo "$as_me:$LINENO: result: none needed" >&5 $as_echo "none needed" >&6; } ;; xno) { $as_echo "$as_me:$LINENO: result: unsupported" >&5 $as_echo "unsupported" >&6; } ;; *) CC="$CC $ac_cv_prog_cc_c99" { $as_echo "$as_me:$LINENO: result: $ac_cv_prog_cc_c99" >&5 $as_echo "$ac_cv_prog_cc_c99" >&6; } ;; esac if test "x$ac_cv_prog_cc_c99" != xno; then ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c99 else { $as_echo "$as_me:$LINENO: checking for $CC option to accept ISO C89" >&5 $as_echo_n "checking for $CC option to accept ISO C89... " >&6; } if test "${ac_cv_prog_cc_c89+set}" = set; then $as_echo_n "(cached) " >&6 else ac_cv_prog_cc_c89=no ac_save_CC=$CC cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #include #include #include /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */ struct buf { int x; }; FILE * (*rcsopen) (struct buf *, struct stat *, int); static char *e (p, i) char **p; int i; { return p[i]; } static char *f (char * (*g) (char **, int), char **p, ...) { char *s; va_list v; va_start (v,p); s = g (p, va_arg (v,int)); va_end (v); return s; } /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has function prototypes and stuff, but not '\xHH' hex character constants. These don't provoke an error unfortunately, instead are silently treated as 'x'. The following induces an error, until -std is added to get proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an array size at least. It's necessary to write '\x00'==0 to get something that's true only with -std. */ int osf4_cc_array ['\x00' == 0 ? 1 : -1]; /* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters inside strings and character constants. */ #define FOO(x) 'x' int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1]; int test (int i, double x); struct s1 {int (*f) (int a);}; struct s2 {int (*f) (double a);}; int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int); int argc; char **argv; int main () { return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]; ; return 0; } _ACEOF for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \ -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" do CC="$ac_save_CC $ac_arg" rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_cv_prog_cc_c89=$ac_arg else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f core conftest.err conftest.$ac_objext test "x$ac_cv_prog_cc_c89" != "xno" && break done rm -f conftest.$ac_ext CC=$ac_save_CC fi # AC_CACHE_VAL case "x$ac_cv_prog_cc_c89" in x) { $as_echo "$as_me:$LINENO: result: none needed" >&5 $as_echo "none needed" >&6; } ;; xno) { $as_echo "$as_me:$LINENO: result: unsupported" >&5 $as_echo "unsupported" >&6; } ;; *) CC="$CC $ac_cv_prog_cc_c89" { $as_echo "$as_me:$LINENO: result: $ac_cv_prog_cc_c89" >&5 $as_echo "$ac_cv_prog_cc_c89" >&6; } ;; esac if test "x$ac_cv_prog_cc_c89" != xno; then ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c89 else ac_cv_prog_cc_stdc=no fi fi ;; esac { $as_echo "$as_me:$LINENO: checking for $CC option to accept ISO Standard C" >&5 $as_echo_n "checking for $CC option to accept ISO Standard C... " >&6; } if test "${ac_cv_prog_cc_stdc+set}" = set; then $as_echo_n "(cached) " >&6 fi case $ac_cv_prog_cc_stdc in no) { $as_echo "$as_me:$LINENO: result: unsupported" >&5 $as_echo "unsupported" >&6; } ;; '') { $as_echo "$as_me:$LINENO: result: none needed" >&5 $as_echo "none needed" >&6; } ;; *) { $as_echo "$as_me:$LINENO: result: $ac_cv_prog_cc_stdc" >&5 $as_echo "$ac_cv_prog_cc_stdc" >&6; } ;; esac { $as_echo "$as_me:$LINENO: checking for an ANSI C99-conforming __func__" >&5 $as_echo_n "checking for an ANSI C99-conforming __func__... " >&6; } if test "${ac_cv_cpp_func+set}" = set; then $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { char *foo = __func__; ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_cv_cpp_func=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { char *foo = __FUNCTION__; ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_cv_cpp_func=__FUNCTION__ else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_cpp_func=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:$LINENO: result: $ac_cv_cpp_func" >&5 $as_echo "$ac_cv_cpp_func" >&6; } if test $ac_cv_cpp_func = yes; then cat >>confdefs.h <<\_ACEOF #define __PRELUDE_FUNC__ __func__ _ACEOF elif test $ac_cv_cpp_func = __FUNCTION__; then cat >>confdefs.h <<\_ACEOF #define __PRELUDE_FUNC__ __FUNCTION__ _ACEOF elif test $ac_cv_cpp_func = no; then cat >>confdefs.h <<\_ACEOF #define __PRELUDE_FUNC__ "" _ACEOF fi PTHREAD_LIBS=@LTLIBMULTITHREAD@ PTHREAD_LDFLAGS="" PTHREAD_CFLAGS=$THREADCPPFLAGS flag=`echo "-Werror -Wmissing-braces" | $SED 'y% .=/+-(){}<>:*,%_______________%'` { $as_echo "$as_me:$LINENO: checking whether the C compiler accepts the -Werror -Wmissing-braces flag" >&5 $as_echo_n "checking whether the C compiler accepts the -Werror -Wmissing-braces flag... " >&6; } if { as_var=ax_cv_c_check_flag_$flag; eval "test \"\${$as_var+set}\" = set"; }; then $as_echo_n "(cached) " >&6 else ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu save_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS -Werror -Wmissing-braces" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then eval "ax_cv_c_check_flag_$flag=yes" else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 eval "ax_cv_c_check_flag_$flag=no" fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext CFLAGS="$save_CFLAGS" ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu fi ac_res=`eval 'as_val=${'ax_cv_c_check_flag_$flag'} $as_echo "$as_val"'` { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } if eval "test \"`echo '$ax_cv_c_check_flag_'$flag`\" = yes"; then : buggy_pthread_cppflags="-Werror -Wmissing-braces" else : fi old_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS $buggy_pthread_cppflags" { $as_echo "$as_me:$LINENO: checking for buggy pthread mutex initializers" >&5 $as_echo_n "checking for buggy pthread mutex initializers... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include int main () { static pthread_mutex_t mutex = PTHREAD_MUTEX_INITIALIZER; ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then compile_ok="yes" else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 compile_ok="no" fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext CFLAGS="$old_CFLAGS" if test x$compile_ok = xyes; then { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } else { $as_echo "$as_me:$LINENO: result: yes" >&5 $as_echo "yes" >&6; } buggy_pthread_initializers="yes" fi { $as_echo "$as_me:$LINENO: checking whether byte ordering is bigendian" >&5 $as_echo_n "checking whether byte ordering is bigendian... " >&6; } if test "${ac_cv_c_bigendian+set}" = set; then $as_echo_n "(cached) " >&6 else ac_cv_c_bigendian=unknown # See if we're dealing with a universal compiler. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #ifndef __APPLE_CC__ not a universal capable compiler #endif typedef int dummy; _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then # Check for potential -arch flags. It is not universal unless # there are some -arch flags. Note that *ppc* also matches # ppc64. This check is also rather less than ideal. case "${CC} ${CFLAGS} ${CPPFLAGS} ${LDFLAGS}" in #( *-arch*ppc*|*-arch*i386*|*-arch*x86_64*) ac_cv_c_bigendian=universal;; esac else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext if test $ac_cv_c_bigendian = unknown; then # See if sys/param.h defines the BYTE_ORDER macro. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #include int main () { #if ! (defined BYTE_ORDER && defined BIG_ENDIAN \ && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \ && LITTLE_ENDIAN) bogus endian macros #endif ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then # It does; now see whether it defined to BIG_ENDIAN or not. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #include int main () { #if BYTE_ORDER != BIG_ENDIAN not big endian #endif ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_cv_c_bigendian=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_c_bigendian=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi if test $ac_cv_c_bigendian = unknown; then # See if defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris). cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include int main () { #if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN) bogus endian macros #endif ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then # It does; now see whether it defined to _BIG_ENDIAN or not. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include int main () { #ifndef _BIG_ENDIAN not big endian #endif ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_cv_c_bigendian=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_c_bigendian=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi if test $ac_cv_c_bigendian = unknown; then # Compile a test program. if test "$cross_compiling" = yes; then # Try to guess by grepping values from an object file. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ short int ascii_mm[] = { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 }; short int ascii_ii[] = { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 }; int use_ascii (int i) { return ascii_mm[i] + ascii_ii[i]; } short int ebcdic_ii[] = { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 }; short int ebcdic_mm[] = { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 }; int use_ebcdic (int i) { return ebcdic_mm[i] + ebcdic_ii[i]; } extern int foo; int main () { return use_ascii (foo) == use_ebcdic (foo); ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then ac_cv_c_bigendian=yes fi if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then if test "$ac_cv_c_bigendian" = unknown; then ac_cv_c_bigendian=no else # finding both strings is unlikely to happen, but who knows? ac_cv_c_bigendian=unknown fi fi else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default int main () { /* Are we little or big endian? From Harbison&Steele. */ union { long int l; char c[sizeof (long int)]; } u; u.l = 1; return u.c[sizeof (long int) - 1] == 1; ; return 0; } _ACEOF rm -f conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' { (case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_try") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_c_bigendian=no else $as_echo "$as_me: program exited with status $ac_status" >&5 $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) ac_cv_c_bigendian=yes fi rm -rf conftest.dSYM rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi fi fi { $as_echo "$as_me:$LINENO: result: $ac_cv_c_bigendian" >&5 $as_echo "$ac_cv_c_bigendian" >&6; } case $ac_cv_c_bigendian in #( yes) cat >>confdefs.h <<_ACEOF #define PRELUDE_WORDS_BIGENDIAN /**/ _ACEOF ;; #( no) ;; #( universal) cat >>confdefs.h <<\_ACEOF #define AC_APPLE_UNIVERSAL_BUILD 1 _ACEOF ;; #( *) { { $as_echo "$as_me:$LINENO: error: unknown endianness presetting ac_cv_c_bigendian=no (or yes) will help" >&5 $as_echo "$as_me: error: unknown endianness presetting ac_cv_c_bigendian=no (or yes) will help" >&2;} { (exit 1); exit 1; }; } ;; esac GNUTLS_MIN_VERSION=1.0.17 if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args. set dummy ${ac_tool_prefix}pkg-config; ac_word=$2 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_path_PKG_CONFIG+set}" = set; then $as_echo_n "(cached) " >&6 else case $PKG_CONFIG in [\\/]* | ?:[\\/]*) ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS ;; esac fi PKG_CONFIG=$ac_cv_path_PKG_CONFIG if test -n "$PKG_CONFIG"; then { $as_echo "$as_me:$LINENO: result: $PKG_CONFIG" >&5 $as_echo "$PKG_CONFIG" >&6; } else { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_path_PKG_CONFIG"; then ac_pt_PKG_CONFIG=$PKG_CONFIG # Extract the first word of "pkg-config", so it can be a program name with args. set dummy pkg-config; ac_word=$2 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_path_ac_pt_PKG_CONFIG+set}" = set; then $as_echo_n "(cached) " >&6 else case $ac_pt_PKG_CONFIG in [\\/]* | ?:[\\/]*) ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS ;; esac fi ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG if test -n "$ac_pt_PKG_CONFIG"; then { $as_echo "$as_me:$LINENO: result: $ac_pt_PKG_CONFIG" >&5 $as_echo "$ac_pt_PKG_CONFIG" >&6; } else { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_pt_PKG_CONFIG" = x; then PKG_CONFIG="" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac PKG_CONFIG=$ac_pt_PKG_CONFIG fi else PKG_CONFIG="$ac_cv_path_PKG_CONFIG" fi fi if test -n "$PKG_CONFIG"; then _pkg_min_version=0.9.0 { $as_echo "$as_me:$LINENO: checking pkg-config is at least version $_pkg_min_version" >&5 $as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; } if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then { $as_echo "$as_me:$LINENO: result: yes" >&5 $as_echo "yes" >&6; } else { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } PKG_CONFIG="" fi fi pkg_failed=no { $as_echo "$as_me:$LINENO: checking for LIBGNUTLS" >&5 $as_echo_n "checking for LIBGNUTLS... " >&6; } if test -n "$LIBGNUTLS_CFLAGS"; then pkg_cv_LIBGNUTLS_CFLAGS="$LIBGNUTLS_CFLAGS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"gnutls >= \$GNUTLS_MIN_VERSION\"") >&5 ($PKG_CONFIG --exists --print-errors "gnutls >= $GNUTLS_MIN_VERSION") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then pkg_cv_LIBGNUTLS_CFLAGS=`$PKG_CONFIG --cflags "gnutls >= $GNUTLS_MIN_VERSION" 2>/dev/null` else pkg_failed=yes fi else pkg_failed=untried fi if test -n "$LIBGNUTLS_LIBS"; then pkg_cv_LIBGNUTLS_LIBS="$LIBGNUTLS_LIBS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"gnutls >= \$GNUTLS_MIN_VERSION\"") >&5 ($PKG_CONFIG --exists --print-errors "gnutls >= $GNUTLS_MIN_VERSION") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then pkg_cv_LIBGNUTLS_LIBS=`$PKG_CONFIG --libs "gnutls >= $GNUTLS_MIN_VERSION" 2>/dev/null` else pkg_failed=yes fi else pkg_failed=untried fi if test $pkg_failed = yes; then if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then _pkg_short_errors_supported=yes else _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then LIBGNUTLS_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "gnutls >= $GNUTLS_MIN_VERSION" 2>&1` else LIBGNUTLS_PKG_ERRORS=`$PKG_CONFIG --print-errors "gnutls >= $GNUTLS_MIN_VERSION" 2>&1` fi # Put the nasty error message in config.log where it belongs echo "$LIBGNUTLS_PKG_ERRORS" >&5 { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } # Check whether --with-libgnutls-prefix was given. if test "${with_libgnutls_prefix+set}" = set; then withval=$with_libgnutls_prefix; libgnutls_config_prefix="$withval" else libgnutls_config_prefix="" fi if test x$libgnutls_config_prefix != x ; then if test x${LIBGNUTLS_CONFIG+set} != xset ; then LIBGNUTLS_CONFIG=$libgnutls_config_prefix/bin/libgnutls-config fi fi # Extract the first word of "libgnutls-config", so it can be a program name with args. set dummy libgnutls-config; ac_word=$2 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_path_LIBGNUTLS_CONFIG+set}" = set; then $as_echo_n "(cached) " >&6 else case $LIBGNUTLS_CONFIG in [\\/]* | ?:[\\/]*) ac_cv_path_LIBGNUTLS_CONFIG="$LIBGNUTLS_CONFIG" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_path_LIBGNUTLS_CONFIG="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS test -z "$ac_cv_path_LIBGNUTLS_CONFIG" && ac_cv_path_LIBGNUTLS_CONFIG="no" ;; esac fi LIBGNUTLS_CONFIG=$ac_cv_path_LIBGNUTLS_CONFIG if test -n "$LIBGNUTLS_CONFIG"; then { $as_echo "$as_me:$LINENO: result: $LIBGNUTLS_CONFIG" >&5 $as_echo "$LIBGNUTLS_CONFIG" >&6; } else { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } fi min_libgnutls_version=$GNUTLS_MIN_VERSION { $as_echo "$as_me:$LINENO: checking for libgnutls - version >= $min_libgnutls_version" >&5 $as_echo_n "checking for libgnutls - version >= $min_libgnutls_version... " >&6; } no_libgnutls="" if test "$LIBGNUTLS_CONFIG" = "no" ; then no_libgnutls=yes else LIBGNUTLS_CFLAGS=`$LIBGNUTLS_CONFIG $libgnutls_config_args --cflags` LIBGNUTLS_LIBS=`$LIBGNUTLS_CONFIG $libgnutls_config_args --libs` libgnutls_config_version=`$LIBGNUTLS_CONFIG $libgnutls_config_args --version` ac_save_CFLAGS="$CFLAGS" ac_save_LIBS="$LIBS" CFLAGS="$CFLAGS $LIBGNUTLS_CFLAGS" LIBS="$LIBS $LIBGNUTLS_LIBS" rm -f conf.libgnutlstest if test "$cross_compiling" = yes; then echo $ac_n "cross compiling; assumed OK... $ac_c" else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #include #include #include int main () { system ("touch conf.libgnutlstest"); if( strcmp( gnutls_check_version(NULL), "$libgnutls_config_version" ) ) { printf("\n*** 'libgnutls-config --version' returned %s, but LIBGNUTLS (%s)\n", "$libgnutls_config_version", gnutls_check_version(NULL) ); printf("*** was found! If libgnutls-config was correct, then it is best\n"); printf("*** to remove the old version of LIBGNUTLS. You may also be able to fix the error\n"); printf("*** by modifying your LD_LIBRARY_PATH enviroment variable, or by editing\n"); printf("*** /etc/ld.so.conf. Make sure you have run ldconfig if that is\n"); printf("*** required on your system.\n"); printf("*** If libgnutls-config was wrong, set the environment variable LIBGNUTLS_CONFIG\n"); printf("*** to point to the correct copy of libgnutls-config, and remove the file config.cache\n"); printf("*** before re-running configure\n"); } else if ( strcmp(gnutls_check_version(NULL), LIBGNUTLS_VERSION ) ) { printf("\n*** LIBGNUTLS header file (version %s) does not match\n", LIBGNUTLS_VERSION); printf("*** library (version %s)\n", gnutls_check_version(NULL) ); } else { if ( gnutls_check_version( "$min_libgnutls_version" ) ) { return 0; } else { printf("no\n*** An old version of LIBGNUTLS (%s) was found.\n", gnutls_check_version(NULL) ); printf("*** You need a version of LIBGNUTLS newer than %s. The latest version of\n", "$min_libgnutls_version" ); printf("*** LIBGNUTLS is always available from ftp://gnutls.hellug.gr/pub/gnutls.\n"); printf("*** \n"); printf("*** If you have already installed a sufficiently new version, this error\n"); printf("*** probably means that the wrong copy of the libgnutls-config shell script is\n"); printf("*** being found. The easiest way to fix this is to remove the old version\n"); printf("*** of LIBGNUTLS, but you can also set the LIBGNUTLS_CONFIG environment to point to the\n"); printf("*** correct copy of libgnutls-config. (In this case, you will have to\n"); printf("*** modify your LD_LIBRARY_PATH enviroment variable, or edit /etc/ld.so.conf\n"); printf("*** so that the correct libraries are found at run-time))\n"); } } return 1; } _ACEOF rm -f conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' { (case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_try") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then : else $as_echo "$as_me: program exited with status $ac_status" >&5 $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) no_libgnutls=yes fi rm -rf conftest.dSYM rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi CFLAGS="$ac_save_CFLAGS" LIBS="$ac_save_LIBS" fi if test "x$no_libgnutls" = x ; then { $as_echo "$as_me:$LINENO: result: yes" >&5 $as_echo "yes" >&6; } : else if test -f conf.libgnutlstest ; then : else { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } fi if test "$LIBGNUTLS_CONFIG" = "no" ; then echo "*** The libgnutls-config script installed by LIBGNUTLS could not be found" echo "*** If LIBGNUTLS was installed in PREFIX, make sure PREFIX/bin is in" echo "*** your path, or set the LIBGNUTLS_CONFIG environment variable to the" echo "*** full path to libgnutls-config." else if test -f conf.libgnutlstest ; then : else echo "*** Could not run libgnutls test program, checking why..." CFLAGS="$CFLAGS $LIBGNUTLS_CFLAGS" LIBS="$LIBS $LIBGNUTLS_LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #include #include #include int main () { return !!gnutls_check_version(NULL); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || $as_test_x conftest$ac_exeext }; then echo "*** The test program compiled, but did not run. This usually means" echo "*** that the run-time linker is not finding LIBGNUTLS or finding the wrong" echo "*** version of LIBGNUTLS. If it is not finding LIBGNUTLS, you'll need to set your" echo "*** LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf to point" echo "*** to the installed location Also, make sure you have run ldconfig if that" echo "*** is required on your system" echo "***" echo "*** If you have an old version installed, it is best to remove it, although" echo "*** you may also be able to get things to work by modifying LD_LIBRARY_PATH" echo "***" else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 echo "*** The test program failed to compile or link. See the file config.log for the" echo "*** exact error that occured. This usually means LIBGNUTLS was incorrectly installed" echo "*** or that you have moved LIBGNUTLS since it was installed. In the latter case, you" echo "*** may want to edit the libgnutls-config script: $LIBGNUTLS_CONFIG" fi rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext CFLAGS="$ac_save_CFLAGS" LIBS="$ac_save_LIBS" fi fi LIBGNUTLS_CFLAGS="" LIBGNUTLS_LIBS="" { { $as_echo "$as_me:$LINENO: error: $LIBGNUTLS_PKG_ERRORS" >&5 $as_echo "$as_me: error: $LIBGNUTLS_PKG_ERRORS" >&2;} { (exit 1); exit 1; }; } fi rm -f conf.libgnutlstest elif test $pkg_failed = untried; then # Check whether --with-libgnutls-prefix was given. if test "${with_libgnutls_prefix+set}" = set; then withval=$with_libgnutls_prefix; libgnutls_config_prefix="$withval" else libgnutls_config_prefix="" fi if test x$libgnutls_config_prefix != x ; then if test x${LIBGNUTLS_CONFIG+set} != xset ; then LIBGNUTLS_CONFIG=$libgnutls_config_prefix/bin/libgnutls-config fi fi # Extract the first word of "libgnutls-config", so it can be a program name with args. set dummy libgnutls-config; ac_word=$2 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_path_LIBGNUTLS_CONFIG+set}" = set; then $as_echo_n "(cached) " >&6 else case $LIBGNUTLS_CONFIG in [\\/]* | ?:[\\/]*) ac_cv_path_LIBGNUTLS_CONFIG="$LIBGNUTLS_CONFIG" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_path_LIBGNUTLS_CONFIG="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS test -z "$ac_cv_path_LIBGNUTLS_CONFIG" && ac_cv_path_LIBGNUTLS_CONFIG="no" ;; esac fi LIBGNUTLS_CONFIG=$ac_cv_path_LIBGNUTLS_CONFIG if test -n "$LIBGNUTLS_CONFIG"; then { $as_echo "$as_me:$LINENO: result: $LIBGNUTLS_CONFIG" >&5 $as_echo "$LIBGNUTLS_CONFIG" >&6; } else { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } fi min_libgnutls_version=$GNUTLS_MIN_VERSION { $as_echo "$as_me:$LINENO: checking for libgnutls - version >= $min_libgnutls_version" >&5 $as_echo_n "checking for libgnutls - version >= $min_libgnutls_version... " >&6; } no_libgnutls="" if test "$LIBGNUTLS_CONFIG" = "no" ; then no_libgnutls=yes else LIBGNUTLS_CFLAGS=`$LIBGNUTLS_CONFIG $libgnutls_config_args --cflags` LIBGNUTLS_LIBS=`$LIBGNUTLS_CONFIG $libgnutls_config_args --libs` libgnutls_config_version=`$LIBGNUTLS_CONFIG $libgnutls_config_args --version` ac_save_CFLAGS="$CFLAGS" ac_save_LIBS="$LIBS" CFLAGS="$CFLAGS $LIBGNUTLS_CFLAGS" LIBS="$LIBS $LIBGNUTLS_LIBS" rm -f conf.libgnutlstest if test "$cross_compiling" = yes; then echo $ac_n "cross compiling; assumed OK... $ac_c" else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #include #include #include int main () { system ("touch conf.libgnutlstest"); if( strcmp( gnutls_check_version(NULL), "$libgnutls_config_version" ) ) { printf("\n*** 'libgnutls-config --version' returned %s, but LIBGNUTLS (%s)\n", "$libgnutls_config_version", gnutls_check_version(NULL) ); printf("*** was found! If libgnutls-config was correct, then it is best\n"); printf("*** to remove the old version of LIBGNUTLS. You may also be able to fix the error\n"); printf("*** by modifying your LD_LIBRARY_PATH enviroment variable, or by editing\n"); printf("*** /etc/ld.so.conf. Make sure you have run ldconfig if that is\n"); printf("*** required on your system.\n"); printf("*** If libgnutls-config was wrong, set the environment variable LIBGNUTLS_CONFIG\n"); printf("*** to point to the correct copy of libgnutls-config, and remove the file config.cache\n"); printf("*** before re-running configure\n"); } else if ( strcmp(gnutls_check_version(NULL), LIBGNUTLS_VERSION ) ) { printf("\n*** LIBGNUTLS header file (version %s) does not match\n", LIBGNUTLS_VERSION); printf("*** library (version %s)\n", gnutls_check_version(NULL) ); } else { if ( gnutls_check_version( "$min_libgnutls_version" ) ) { return 0; } else { printf("no\n*** An old version of LIBGNUTLS (%s) was found.\n", gnutls_check_version(NULL) ); printf("*** You need a version of LIBGNUTLS newer than %s. The latest version of\n", "$min_libgnutls_version" ); printf("*** LIBGNUTLS is always available from ftp://gnutls.hellug.gr/pub/gnutls.\n"); printf("*** \n"); printf("*** If you have already installed a sufficiently new version, this error\n"); printf("*** probably means that the wrong copy of the libgnutls-config shell script is\n"); printf("*** being found. The easiest way to fix this is to remove the old version\n"); printf("*** of LIBGNUTLS, but you can also set the LIBGNUTLS_CONFIG environment to point to the\n"); printf("*** correct copy of libgnutls-config. (In this case, you will have to\n"); printf("*** modify your LD_LIBRARY_PATH enviroment variable, or edit /etc/ld.so.conf\n"); printf("*** so that the correct libraries are found at run-time))\n"); } } return 1; } _ACEOF rm -f conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' { (case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_try") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then : else $as_echo "$as_me: program exited with status $ac_status" >&5 $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) no_libgnutls=yes fi rm -rf conftest.dSYM rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi CFLAGS="$ac_save_CFLAGS" LIBS="$ac_save_LIBS" fi if test "x$no_libgnutls" = x ; then { $as_echo "$as_me:$LINENO: result: yes" >&5 $as_echo "yes" >&6; } : else if test -f conf.libgnutlstest ; then : else { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } fi if test "$LIBGNUTLS_CONFIG" = "no" ; then echo "*** The libgnutls-config script installed by LIBGNUTLS could not be found" echo "*** If LIBGNUTLS was installed in PREFIX, make sure PREFIX/bin is in" echo "*** your path, or set the LIBGNUTLS_CONFIG environment variable to the" echo "*** full path to libgnutls-config." else if test -f conf.libgnutlstest ; then : else echo "*** Could not run libgnutls test program, checking why..." CFLAGS="$CFLAGS $LIBGNUTLS_CFLAGS" LIBS="$LIBS $LIBGNUTLS_LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #include #include #include int main () { return !!gnutls_check_version(NULL); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || $as_test_x conftest$ac_exeext }; then echo "*** The test program compiled, but did not run. This usually means" echo "*** that the run-time linker is not finding LIBGNUTLS or finding the wrong" echo "*** version of LIBGNUTLS. If it is not finding LIBGNUTLS, you'll need to set your" echo "*** LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf to point" echo "*** to the installed location Also, make sure you have run ldconfig if that" echo "*** is required on your system" echo "***" echo "*** If you have an old version installed, it is best to remove it, although" echo "*** you may also be able to get things to work by modifying LD_LIBRARY_PATH" echo "***" else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 echo "*** The test program failed to compile or link. See the file config.log for the" echo "*** exact error that occured. This usually means LIBGNUTLS was incorrectly installed" echo "*** or that you have moved LIBGNUTLS since it was installed. In the latter case, you" echo "*** may want to edit the libgnutls-config script: $LIBGNUTLS_CONFIG" fi rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext CFLAGS="$ac_save_CFLAGS" LIBS="$ac_save_LIBS" fi fi LIBGNUTLS_CFLAGS="" LIBGNUTLS_LIBS="" { { $as_echo "$as_me:$LINENO: error: $LIBGNUTLS_PKG_ERRORS" >&5 $as_echo "$as_me: error: $LIBGNUTLS_PKG_ERRORS" >&2;} { (exit 1); exit 1; }; } fi rm -f conf.libgnutlstest else LIBGNUTLS_CFLAGS=$pkg_cv_LIBGNUTLS_CFLAGS LIBGNUTLS_LIBS=$pkg_cv_LIBGNUTLS_LIBS { $as_echo "$as_me:$LINENO: result: yes" >&5 $as_echo "yes" >&6; } : fi old_LIBS=$LIBS old_CPPFLAGS=$CPPFLAGS LIBS="$LIBGNUTLS_LIBS" CPPFLAGS="$LIBGNUTLS_CFLAGS" if test "${ac_cv_header_gnutls_gnutls_h+set}" = set; then { $as_echo "$as_me:$LINENO: checking for gnutls/gnutls.h" >&5 $as_echo_n "checking for gnutls/gnutls.h... " >&6; } if test "${ac_cv_header_gnutls_gnutls_h+set}" = set; then $as_echo_n "(cached) " >&6 fi { $as_echo "$as_me:$LINENO: result: $ac_cv_header_gnutls_gnutls_h" >&5 $as_echo "$ac_cv_header_gnutls_gnutls_h" >&6; } else # Is the header compilable? { $as_echo "$as_me:$LINENO: checking gnutls/gnutls.h usability" >&5 $as_echo_n "checking gnutls/gnutls.h usability... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default #include _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_header_compiler=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_compiler=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext { $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 $as_echo "$ac_header_compiler" >&6; } # Is the header present? { $as_echo "$as_me:$LINENO: checking gnutls/gnutls.h presence" >&5 $as_echo_n "checking gnutls/gnutls.h presence... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF if { (ac_try="$ac_cpp conftest.$ac_ext" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null && { test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || test ! -s conftest.err }; then ac_header_preproc=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi rm -f conftest.err conftest.$ac_ext { $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 $as_echo "$ac_header_preproc" >&6; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in yes:no: ) { $as_echo "$as_me:$LINENO: WARNING: gnutls/gnutls.h: accepted by the compiler, rejected by the preprocessor!" >&5 $as_echo "$as_me: WARNING: gnutls/gnutls.h: accepted by the compiler, rejected by the preprocessor!" >&2;} { $as_echo "$as_me:$LINENO: WARNING: gnutls/gnutls.h: proceeding with the compiler's result" >&5 $as_echo "$as_me: WARNING: gnutls/gnutls.h: proceeding with the compiler's result" >&2;} ac_header_preproc=yes ;; no:yes:* ) { $as_echo "$as_me:$LINENO: WARNING: gnutls/gnutls.h: present but cannot be compiled" >&5 $as_echo "$as_me: WARNING: gnutls/gnutls.h: present but cannot be compiled" >&2;} { $as_echo "$as_me:$LINENO: WARNING: gnutls/gnutls.h: check for missing prerequisite headers?" >&5 $as_echo "$as_me: WARNING: gnutls/gnutls.h: check for missing prerequisite headers?" >&2;} { $as_echo "$as_me:$LINENO: WARNING: gnutls/gnutls.h: see the Autoconf documentation" >&5 $as_echo "$as_me: WARNING: gnutls/gnutls.h: see the Autoconf documentation" >&2;} { $as_echo "$as_me:$LINENO: WARNING: gnutls/gnutls.h: section \"Present But Cannot Be Compiled\"" >&5 $as_echo "$as_me: WARNING: gnutls/gnutls.h: section \"Present But Cannot Be Compiled\"" >&2;} { $as_echo "$as_me:$LINENO: WARNING: gnutls/gnutls.h: proceeding with the preprocessor's result" >&5 $as_echo "$as_me: WARNING: gnutls/gnutls.h: proceeding with the preprocessor's result" >&2;} { $as_echo "$as_me:$LINENO: WARNING: gnutls/gnutls.h: in the future, the compiler will take precedence" >&5 $as_echo "$as_me: WARNING: gnutls/gnutls.h: in the future, the compiler will take precedence" >&2;} ;; esac { $as_echo "$as_me:$LINENO: checking for gnutls/gnutls.h" >&5 $as_echo_n "checking for gnutls/gnutls.h... " >&6; } if test "${ac_cv_header_gnutls_gnutls_h+set}" = set; then $as_echo_n "(cached) " >&6 else ac_cv_header_gnutls_gnutls_h=$ac_header_preproc fi { $as_echo "$as_me:$LINENO: result: $ac_cv_header_gnutls_gnutls_h" >&5 $as_echo "$ac_cv_header_gnutls_gnutls_h" >&6; } fi if test "x$ac_cv_header_gnutls_gnutls_h" = x""yes; then : else { { $as_echo "$as_me:$LINENO: error: \"GnuTLS development headers are required to build libprelude\"" >&5 $as_echo "$as_me: error: \"GnuTLS development headers are required to build libprelude\"" >&2;} { (exit 1); exit 1; }; } fi { $as_echo "$as_me:$LINENO: checking for gnutls_srp_verifier in -lgnutls" >&5 $as_echo_n "checking for gnutls_srp_verifier in -lgnutls... " >&6; } if test "${ac_cv_lib_gnutls_gnutls_srp_verifier+set}" = set; then $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lgnutls $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char gnutls_srp_verifier (); int main () { return gnutls_srp_verifier (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || $as_test_x conftest$ac_exeext }; then ac_cv_lib_gnutls_gnutls_srp_verifier=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_gnutls_gnutls_srp_verifier=no fi rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:$LINENO: result: $ac_cv_lib_gnutls_gnutls_srp_verifier" >&5 $as_echo "$ac_cv_lib_gnutls_gnutls_srp_verifier" >&6; } if test "x$ac_cv_lib_gnutls_gnutls_srp_verifier" = x""yes; then srp_available=yes else srp_available=no fi { $as_echo "$as_me:$LINENO: checking for gnutls_x509_crt_list_import in -lgnutls" >&5 $as_echo_n "checking for gnutls_x509_crt_list_import in -lgnutls... " >&6; } if test "${ac_cv_lib_gnutls_gnutls_x509_crt_list_import+set}" = set; then $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lgnutls $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char gnutls_x509_crt_list_import (); int main () { return gnutls_x509_crt_list_import (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || $as_test_x conftest$ac_exeext }; then ac_cv_lib_gnutls_gnutls_x509_crt_list_import=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_gnutls_gnutls_x509_crt_list_import=no fi rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:$LINENO: result: $ac_cv_lib_gnutls_gnutls_x509_crt_list_import" >&5 $as_echo "$ac_cv_lib_gnutls_gnutls_x509_crt_list_import" >&6; } if test "x$ac_cv_lib_gnutls_gnutls_x509_crt_list_import" = x""yes; then cat >>confdefs.h <<_ACEOF #define HAVE_GNUTLS_X509_CRT_LIST_IMPORT /**/ _ACEOF fi { $as_echo "$as_me:$LINENO: checking for gnutls_priority_init in -lgnutls" >&5 $as_echo_n "checking for gnutls_priority_init in -lgnutls... " >&6; } if test "${ac_cv_lib_gnutls_gnutls_priority_init+set}" = set; then $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lgnutls $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char gnutls_priority_init (); int main () { return gnutls_priority_init (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || $as_test_x conftest$ac_exeext }; then ac_cv_lib_gnutls_gnutls_priority_init=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_gnutls_gnutls_priority_init=no fi rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:$LINENO: result: $ac_cv_lib_gnutls_gnutls_priority_init" >&5 $as_echo "$ac_cv_lib_gnutls_gnutls_priority_init" >&6; } if test "x$ac_cv_lib_gnutls_gnutls_priority_init" = x""yes; then gnutls_string_priority=yes else gnutls_string_priority=no fi if test x$gnutls_string_priority = xyes; then { $as_echo "$as_me:$LINENO: checking for gnutls_priority_set in -lgnutls" >&5 $as_echo_n "checking for gnutls_priority_set in -lgnutls... " >&6; } if test "${ac_cv_lib_gnutls_gnutls_priority_set+set}" = set; then $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lgnutls $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char gnutls_priority_set (); int main () { return gnutls_priority_set (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || $as_test_x conftest$ac_exeext }; then ac_cv_lib_gnutls_gnutls_priority_set=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_gnutls_gnutls_priority_set=no fi rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:$LINENO: result: $ac_cv_lib_gnutls_gnutls_priority_set" >&5 $as_echo "$ac_cv_lib_gnutls_gnutls_priority_set" >&6; } if test "x$ac_cv_lib_gnutls_gnutls_priority_set" = x""yes; then cat >>confdefs.h <<_ACEOF #define HAVE_GNUTLS_STRING_PRIORITY /**/ _ACEOF fi fi LIBS=$old_LIBS CPPFLAGS=$old_CPPFLAGS if test x$srp_available = xno; then pkg_failed=no { $as_echo "$as_me:$LINENO: checking for LIBGNUTLS_EXTRA" >&5 $as_echo_n "checking for LIBGNUTLS_EXTRA... " >&6; } if test -n "$LIBGNUTLS_EXTRA_CFLAGS"; then pkg_cv_LIBGNUTLS_EXTRA_CFLAGS="$LIBGNUTLS_EXTRA_CFLAGS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"gnutls-extra >= \$GNUTLS_MIN_VERSION\"") >&5 ($PKG_CONFIG --exists --print-errors "gnutls-extra >= $GNUTLS_MIN_VERSION") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then pkg_cv_LIBGNUTLS_EXTRA_CFLAGS=`$PKG_CONFIG --cflags "gnutls-extra >= $GNUTLS_MIN_VERSION" 2>/dev/null` else pkg_failed=yes fi else pkg_failed=untried fi if test -n "$LIBGNUTLS_EXTRA_LIBS"; then pkg_cv_LIBGNUTLS_EXTRA_LIBS="$LIBGNUTLS_EXTRA_LIBS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"gnutls-extra >= \$GNUTLS_MIN_VERSION\"") >&5 ($PKG_CONFIG --exists --print-errors "gnutls-extra >= $GNUTLS_MIN_VERSION") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then pkg_cv_LIBGNUTLS_EXTRA_LIBS=`$PKG_CONFIG --libs "gnutls-extra >= $GNUTLS_MIN_VERSION" 2>/dev/null` else pkg_failed=yes fi else pkg_failed=untried fi if test $pkg_failed = yes; then if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then _pkg_short_errors_supported=yes else _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then LIBGNUTLS_EXTRA_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "gnutls-extra >= $GNUTLS_MIN_VERSION" 2>&1` else LIBGNUTLS_EXTRA_PKG_ERRORS=`$PKG_CONFIG --print-errors "gnutls-extra >= $GNUTLS_MIN_VERSION" 2>&1` fi # Put the nasty error message in config.log where it belongs echo "$LIBGNUTLS_EXTRA_PKG_ERRORS" >&5 { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } # Check whether --with-libgnutls-extra-prefix was given. if test "${with_libgnutls_extra_prefix+set}" = set; then withval=$with_libgnutls_extra_prefix; libgnutls_extra_config_prefix="$withval" else libgnutls_extra_config_prefix="" fi if test x$libgnutls_extra_config_prefix != x ; then if test x${LIBGNUTLS_EXTRA_CONFIG+set} != xset ; then LIBGNUTLS_EXTRA_CONFIG=$libgnutls_extra_config_prefix/bin/libgnutls-extra-config fi fi # Extract the first word of "libgnutls-extra-config", so it can be a program name with args. set dummy libgnutls-extra-config; ac_word=$2 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_path_LIBGNUTLS_EXTRA_CONFIG+set}" = set; then $as_echo_n "(cached) " >&6 else case $LIBGNUTLS_EXTRA_CONFIG in [\\/]* | ?:[\\/]*) ac_cv_path_LIBGNUTLS_EXTRA_CONFIG="$LIBGNUTLS_EXTRA_CONFIG" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_path_LIBGNUTLS_EXTRA_CONFIG="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS test -z "$ac_cv_path_LIBGNUTLS_EXTRA_CONFIG" && ac_cv_path_LIBGNUTLS_EXTRA_CONFIG="no" ;; esac fi LIBGNUTLS_EXTRA_CONFIG=$ac_cv_path_LIBGNUTLS_EXTRA_CONFIG if test -n "$LIBGNUTLS_EXTRA_CONFIG"; then { $as_echo "$as_me:$LINENO: result: $LIBGNUTLS_EXTRA_CONFIG" >&5 $as_echo "$LIBGNUTLS_EXTRA_CONFIG" >&6; } else { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } fi min_libgnutls_version=$GNUTLS_MIN_VERSION { $as_echo "$as_me:$LINENO: checking for libgnutls - version >= $min_libgnutls_version" >&5 $as_echo_n "checking for libgnutls - version >= $min_libgnutls_version... " >&6; } no_libgnutls="" if test "$LIBGNUTLS_EXTRA_CONFIG" = "no" ; then no_libgnutls=yes else LIBGNUTLS_EXTRA_CFLAGS=`$LIBGNUTLS_EXTRA_CONFIG $libgnutls_extra_config_args --cflags` LIBGNUTLS_EXTRA_LIBS=`$LIBGNUTLS_EXTRA_CONFIG $libgnutls_extra_config_args --libs` libgnutls_extra_config_version=`$LIBGNUTLS_EXTRA_CONFIG $libgnutls_extra_config_args --version` ac_save_CFLAGS="$CFLAGS" ac_save_LIBS="$LIBS" CFLAGS="$CFLAGS $LIBGNUTLS_EXTRA_CFLAGS" LIBS="$LIBS $LIBGNUTLS_EXTRA_LIBS" rm -f conf.libgnutlstest if test "$cross_compiling" = yes; then echo $ac_n "cross compiling; assumed OK... $ac_c" else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #include #include #include int main () { system ("touch conf.libgnutlstest"); if( strcmp( gnutls_extra_check_version(NULL), "$libgnutls_extra_config_version" ) ) { printf("\n*** 'libgnutls-extra-config --version' returned %s, but LIBGNUTLS_EXTRA (%s)\n", "$libgnutls_extra_config_version", gnutls_extra_check_version(NULL) ); printf("*** was found! If libgnutls-extra-config was correct, then it is best\n"); printf("*** to remove the old version of LIBGNUTLS_EXTRA. You may also be able to fix the error\n"); printf("*** by modifying your LD_LIBRARY_PATH enviroment variable, or by editing\n"); printf("*** /etc/ld.so.conf. Make sure you have run ldconfig if that is\n"); printf("*** required on your system.\n"); printf("*** If libgnutls-extra-config was wrong, set the environment variable LIBGNUTLS_EXTRA_CONFIG\n"); printf("*** to point to the correct copy of libgnutls-extra-config, and remove the file config.cache\n"); printf("*** before re-running configure\n"); } else if ( strcmp(gnutls_extra_check_version(NULL), LIBGNUTLS_EXTRA_VERSION ) ) { printf("\n*** LIBGNUTLS_EXTRA header file (version %s) does not match\n", LIBGNUTLS_EXTRA_VERSION); printf("*** library (version %s). This is may be due to a different version of gnutls\n", gnutls_extra_check_version(NULL) ); printf("*** and gnutls-extra.\n"); } else { if ( gnutls_extra_check_version( "$min_libgnutls_version" ) ) { return 0; } else { printf("no\n*** An old version of LIBGNUTLS_EXTRA (%s) was found.\n", gnutls_extra_check_version(NULL) ); printf("*** You need a version of LIBGNUTLS_EXTRA newer than %s. The latest version of\n", "$min_libgnutls_version" ); printf("*** LIBGNUTLS_EXTRA is always available from ftp://gnutls.hellug.gr/pub/gnutls.\n"); printf("*** \n"); printf("*** If you have already installed a sufficiently new version, this error\n"); printf("*** probably means that the wrong copy of the libgnutls-extra-config shell script is\n"); printf("*** being found. The easiest way to fix this is to remove the old version\n"); printf("*** of LIBGNUTLS_EXTRA, but you can also set the LIBGNUTLS_EXTRA_CONFIG environment to point to the\n"); printf("*** correct copy of libgnutls-extra-config. (In this case, you will have to\n"); printf("*** modify your LD_LIBRARY_PATH enviroment variable, or edit /etc/ld.so.conf\n"); printf("*** so that the correct libraries are found at run-time))\n"); } } return 1; } _ACEOF rm -f conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' { (case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_try") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then : else $as_echo "$as_me: program exited with status $ac_status" >&5 $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) no_libgnutls=yes fi rm -rf conftest.dSYM rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi CFLAGS="$ac_save_CFLAGS" LIBS="$ac_save_LIBS" fi if test "x$no_libgnutls" = x ; then { $as_echo "$as_me:$LINENO: result: yes" >&5 $as_echo "yes" >&6; } gnutls_extra=yes else if test -f conf.libgnutlstest ; then : else { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } fi if test "$LIBGNUTLS_EXTRA_CONFIG" = "no" ; then echo "*** The libgnutls-extra-config script installed by LIBGNUTLS_EXTRA could not be found" echo "*** If LIBGNUTLS_EXTRA was installed in PREFIX, make sure PREFIX/bin is in" echo "*** your path, or set the LIBGNUTLS_EXTRA_CONFIG environment variable to the" echo "*** full path to libgnutls-extra-config." else if test -f conf.libgnutlstest ; then : else echo "*** Could not run libgnutls test program, checking why..." CFLAGS="$CFLAGS $LIBGNUTLS_EXTRA_CFLAGS" LIBS="$LIBS $LIBGNUTLS_EXTRA_LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #include #include #include int main () { return !!gnutls_extra_check_version(NULL); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || $as_test_x conftest$ac_exeext }; then echo "*** The test program compiled, but did not run. This usually means" echo "*** that the run-time linker is not finding LIBGNUTLS_EXTRA or finding the wrong" echo "*** version of LIBGNUTLS_EXTRA. If it is not finding LIBGNUTLS_EXTRA, you'll need to set your" echo "*** LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf to point" echo "*** to the installed location Also, make sure you have run ldconfig if that" echo "*** is required on your system" echo "***" echo "*** If you have an old version installed, it is best to remove it, although" echo "*** you may also be able to get things to work by modifying LD_LIBRARY_PATH" echo "***" else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 echo "*** The test program failed to compile or link. See the file config.log for the" echo "*** exact error that occured. This usually means LIBGNUTLS_EXTRA was incorrectly installed" echo "*** or that you have moved LIBGNUTLS_EXTRA since it was installed. In the latter case, you" echo "*** may want to edit the libgnutls-extra-config script: $LIBGNUTLS_EXTRA_CONFIG" fi rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext CFLAGS="$ac_save_CFLAGS" LIBS="$ac_save_LIBS" fi fi LIBGNUTLS_EXTRA_CFLAGS="" LIBGNUTLS_EXTRA_LIBS="" gnutls_extra=no fi rm -f conf.libgnutlstest elif test $pkg_failed = untried; then # Check whether --with-libgnutls-extra-prefix was given. if test "${with_libgnutls_extra_prefix+set}" = set; then withval=$with_libgnutls_extra_prefix; libgnutls_extra_config_prefix="$withval" else libgnutls_extra_config_prefix="" fi if test x$libgnutls_extra_config_prefix != x ; then if test x${LIBGNUTLS_EXTRA_CONFIG+set} != xset ; then LIBGNUTLS_EXTRA_CONFIG=$libgnutls_extra_config_prefix/bin/libgnutls-extra-config fi fi # Extract the first word of "libgnutls-extra-config", so it can be a program name with args. set dummy libgnutls-extra-config; ac_word=$2 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_path_LIBGNUTLS_EXTRA_CONFIG+set}" = set; then $as_echo_n "(cached) " >&6 else case $LIBGNUTLS_EXTRA_CONFIG in [\\/]* | ?:[\\/]*) ac_cv_path_LIBGNUTLS_EXTRA_CONFIG="$LIBGNUTLS_EXTRA_CONFIG" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_path_LIBGNUTLS_EXTRA_CONFIG="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS test -z "$ac_cv_path_LIBGNUTLS_EXTRA_CONFIG" && ac_cv_path_LIBGNUTLS_EXTRA_CONFIG="no" ;; esac fi LIBGNUTLS_EXTRA_CONFIG=$ac_cv_path_LIBGNUTLS_EXTRA_CONFIG if test -n "$LIBGNUTLS_EXTRA_CONFIG"; then { $as_echo "$as_me:$LINENO: result: $LIBGNUTLS_EXTRA_CONFIG" >&5 $as_echo "$LIBGNUTLS_EXTRA_CONFIG" >&6; } else { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } fi min_libgnutls_version=$GNUTLS_MIN_VERSION { $as_echo "$as_me:$LINENO: checking for libgnutls - version >= $min_libgnutls_version" >&5 $as_echo_n "checking for libgnutls - version >= $min_libgnutls_version... " >&6; } no_libgnutls="" if test "$LIBGNUTLS_EXTRA_CONFIG" = "no" ; then no_libgnutls=yes else LIBGNUTLS_EXTRA_CFLAGS=`$LIBGNUTLS_EXTRA_CONFIG $libgnutls_extra_config_args --cflags` LIBGNUTLS_EXTRA_LIBS=`$LIBGNUTLS_EXTRA_CONFIG $libgnutls_extra_config_args --libs` libgnutls_extra_config_version=`$LIBGNUTLS_EXTRA_CONFIG $libgnutls_extra_config_args --version` ac_save_CFLAGS="$CFLAGS" ac_save_LIBS="$LIBS" CFLAGS="$CFLAGS $LIBGNUTLS_EXTRA_CFLAGS" LIBS="$LIBS $LIBGNUTLS_EXTRA_LIBS" rm -f conf.libgnutlstest if test "$cross_compiling" = yes; then echo $ac_n "cross compiling; assumed OK... $ac_c" else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #include #include #include int main () { system ("touch conf.libgnutlstest"); if( strcmp( gnutls_extra_check_version(NULL), "$libgnutls_extra_config_version" ) ) { printf("\n*** 'libgnutls-extra-config --version' returned %s, but LIBGNUTLS_EXTRA (%s)\n", "$libgnutls_extra_config_version", gnutls_extra_check_version(NULL) ); printf("*** was found! If libgnutls-extra-config was correct, then it is best\n"); printf("*** to remove the old version of LIBGNUTLS_EXTRA. You may also be able to fix the error\n"); printf("*** by modifying your LD_LIBRARY_PATH enviroment variable, or by editing\n"); printf("*** /etc/ld.so.conf. Make sure you have run ldconfig if that is\n"); printf("*** required on your system.\n"); printf("*** If libgnutls-extra-config was wrong, set the environment variable LIBGNUTLS_EXTRA_CONFIG\n"); printf("*** to point to the correct copy of libgnutls-extra-config, and remove the file config.cache\n"); printf("*** before re-running configure\n"); } else if ( strcmp(gnutls_extra_check_version(NULL), LIBGNUTLS_EXTRA_VERSION ) ) { printf("\n*** LIBGNUTLS_EXTRA header file (version %s) does not match\n", LIBGNUTLS_EXTRA_VERSION); printf("*** library (version %s). This is may be due to a different version of gnutls\n", gnutls_extra_check_version(NULL) ); printf("*** and gnutls-extra.\n"); } else { if ( gnutls_extra_check_version( "$min_libgnutls_version" ) ) { return 0; } else { printf("no\n*** An old version of LIBGNUTLS_EXTRA (%s) was found.\n", gnutls_extra_check_version(NULL) ); printf("*** You need a version of LIBGNUTLS_EXTRA newer than %s. The latest version of\n", "$min_libgnutls_version" ); printf("*** LIBGNUTLS_EXTRA is always available from ftp://gnutls.hellug.gr/pub/gnutls.\n"); printf("*** \n"); printf("*** If you have already installed a sufficiently new version, this error\n"); printf("*** probably means that the wrong copy of the libgnutls-extra-config shell script is\n"); printf("*** being found. The easiest way to fix this is to remove the old version\n"); printf("*** of LIBGNUTLS_EXTRA, but you can also set the LIBGNUTLS_EXTRA_CONFIG environment to point to the\n"); printf("*** correct copy of libgnutls-extra-config. (In this case, you will have to\n"); printf("*** modify your LD_LIBRARY_PATH enviroment variable, or edit /etc/ld.so.conf\n"); printf("*** so that the correct libraries are found at run-time))\n"); } } return 1; } _ACEOF rm -f conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' { (case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_try") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then : else $as_echo "$as_me: program exited with status $ac_status" >&5 $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) no_libgnutls=yes fi rm -rf conftest.dSYM rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi CFLAGS="$ac_save_CFLAGS" LIBS="$ac_save_LIBS" fi if test "x$no_libgnutls" = x ; then { $as_echo "$as_me:$LINENO: result: yes" >&5 $as_echo "yes" >&6; } gnutls_extra=yes else if test -f conf.libgnutlstest ; then : else { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } fi if test "$LIBGNUTLS_EXTRA_CONFIG" = "no" ; then echo "*** The libgnutls-extra-config script installed by LIBGNUTLS_EXTRA could not be found" echo "*** If LIBGNUTLS_EXTRA was installed in PREFIX, make sure PREFIX/bin is in" echo "*** your path, or set the LIBGNUTLS_EXTRA_CONFIG environment variable to the" echo "*** full path to libgnutls-extra-config." else if test -f conf.libgnutlstest ; then : else echo "*** Could not run libgnutls test program, checking why..." CFLAGS="$CFLAGS $LIBGNUTLS_EXTRA_CFLAGS" LIBS="$LIBS $LIBGNUTLS_EXTRA_LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #include #include #include int main () { return !!gnutls_extra_check_version(NULL); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || $as_test_x conftest$ac_exeext }; then echo "*** The test program compiled, but did not run. This usually means" echo "*** that the run-time linker is not finding LIBGNUTLS_EXTRA or finding the wrong" echo "*** version of LIBGNUTLS_EXTRA. If it is not finding LIBGNUTLS_EXTRA, you'll need to set your" echo "*** LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf to point" echo "*** to the installed location Also, make sure you have run ldconfig if that" echo "*** is required on your system" echo "***" echo "*** If you have an old version installed, it is best to remove it, although" echo "*** you may also be able to get things to work by modifying LD_LIBRARY_PATH" echo "***" else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 echo "*** The test program failed to compile or link. See the file config.log for the" echo "*** exact error that occured. This usually means LIBGNUTLS_EXTRA was incorrectly installed" echo "*** or that you have moved LIBGNUTLS_EXTRA since it was installed. In the latter case, you" echo "*** may want to edit the libgnutls-extra-config script: $LIBGNUTLS_EXTRA_CONFIG" fi rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext CFLAGS="$ac_save_CFLAGS" LIBS="$ac_save_LIBS" fi fi LIBGNUTLS_EXTRA_CFLAGS="" LIBGNUTLS_EXTRA_LIBS="" gnutls_extra=no fi rm -f conf.libgnutlstest else LIBGNUTLS_EXTRA_CFLAGS=$pkg_cv_LIBGNUTLS_EXTRA_CFLAGS LIBGNUTLS_EXTRA_LIBS=$pkg_cv_LIBGNUTLS_EXTRA_LIBS { $as_echo "$as_me:$LINENO: result: yes" >&5 $as_echo "yes" >&6; } gnutls_extra=yes fi if test x$gnutls_extra = xyes; then old_LIBS=$LIBS LIBS="$LIBGNUTLS_EXTRA_LIBS" old_CPPFLAGS=$CPPFLAGS CPPFLAGS="$LIBGNUTLS_EXTRA_CFLAGS" if test "${ac_cv_header_gnutls_extra_h+set}" = set; then { $as_echo "$as_me:$LINENO: checking for gnutls/extra.h" >&5 $as_echo_n "checking for gnutls/extra.h... " >&6; } if test "${ac_cv_header_gnutls_extra_h+set}" = set; then $as_echo_n "(cached) " >&6 fi { $as_echo "$as_me:$LINENO: result: $ac_cv_header_gnutls_extra_h" >&5 $as_echo "$ac_cv_header_gnutls_extra_h" >&6; } else # Is the header compilable? { $as_echo "$as_me:$LINENO: checking gnutls/extra.h usability" >&5 $as_echo_n "checking gnutls/extra.h usability... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default #include _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_header_compiler=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_compiler=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext { $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 $as_echo "$ac_header_compiler" >&6; } # Is the header present? { $as_echo "$as_me:$LINENO: checking gnutls/extra.h presence" >&5 $as_echo_n "checking gnutls/extra.h presence... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF if { (ac_try="$ac_cpp conftest.$ac_ext" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null && { test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || test ! -s conftest.err }; then ac_header_preproc=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi rm -f conftest.err conftest.$ac_ext { $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 $as_echo "$ac_header_preproc" >&6; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in yes:no: ) { $as_echo "$as_me:$LINENO: WARNING: gnutls/extra.h: accepted by the compiler, rejected by the preprocessor!" >&5 $as_echo "$as_me: WARNING: gnutls/extra.h: accepted by the compiler, rejected by the preprocessor!" >&2;} { $as_echo "$as_me:$LINENO: WARNING: gnutls/extra.h: proceeding with the compiler's result" >&5 $as_echo "$as_me: WARNING: gnutls/extra.h: proceeding with the compiler's result" >&2;} ac_header_preproc=yes ;; no:yes:* ) { $as_echo "$as_me:$LINENO: WARNING: gnutls/extra.h: present but cannot be compiled" >&5 $as_echo "$as_me: WARNING: gnutls/extra.h: present but cannot be compiled" >&2;} { $as_echo "$as_me:$LINENO: WARNING: gnutls/extra.h: check for missing prerequisite headers?" >&5 $as_echo "$as_me: WARNING: gnutls/extra.h: check for missing prerequisite headers?" >&2;} { $as_echo "$as_me:$LINENO: WARNING: gnutls/extra.h: see the Autoconf documentation" >&5 $as_echo "$as_me: WARNING: gnutls/extra.h: see the Autoconf documentation" >&2;} { $as_echo "$as_me:$LINENO: WARNING: gnutls/extra.h: section \"Present But Cannot Be Compiled\"" >&5 $as_echo "$as_me: WARNING: gnutls/extra.h: section \"Present But Cannot Be Compiled\"" >&2;} { $as_echo "$as_me:$LINENO: WARNING: gnutls/extra.h: proceeding with the preprocessor's result" >&5 $as_echo "$as_me: WARNING: gnutls/extra.h: proceeding with the preprocessor's result" >&2;} { $as_echo "$as_me:$LINENO: WARNING: gnutls/extra.h: in the future, the compiler will take precedence" >&5 $as_echo "$as_me: WARNING: gnutls/extra.h: in the future, the compiler will take precedence" >&2;} ;; esac { $as_echo "$as_me:$LINENO: checking for gnutls/extra.h" >&5 $as_echo_n "checking for gnutls/extra.h... " >&6; } if test "${ac_cv_header_gnutls_extra_h+set}" = set; then $as_echo_n "(cached) " >&6 else ac_cv_header_gnutls_extra_h=$ac_header_preproc fi { $as_echo "$as_me:$LINENO: result: $ac_cv_header_gnutls_extra_h" >&5 $as_echo "$ac_cv_header_gnutls_extra_h" >&6; } fi if test "x$ac_cv_header_gnutls_extra_h" = x""yes; then { $as_echo "$as_me:$LINENO: checking for gnutls_srp_verifier in -lgnutls-extra" >&5 $as_echo_n "checking for gnutls_srp_verifier in -lgnutls-extra... " >&6; } if test "${ac_cv_lib_gnutls_extra_gnutls_srp_verifier+set}" = set; then $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lgnutls-extra $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char gnutls_srp_verifier (); int main () { return gnutls_srp_verifier (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || $as_test_x conftest$ac_exeext }; then ac_cv_lib_gnutls_extra_gnutls_srp_verifier=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_gnutls_extra_gnutls_srp_verifier=no fi rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:$LINENO: result: $ac_cv_lib_gnutls_extra_gnutls_srp_verifier" >&5 $as_echo "$ac_cv_lib_gnutls_extra_gnutls_srp_verifier" >&6; } if test "x$ac_cv_lib_gnutls_extra_gnutls_srp_verifier" = x""yes; then srp_available=yes else srp_available=no fi else srp_available=no fi if test x$srp_available = xyes; then cat >>confdefs.h <<_ACEOF #define GNUTLS_SRP_ENABLED /**/ _ACEOF PRELUDE_ADMIN_CFLAGS="-DNEED_GNUTLS_EXTRA $LIBGNUTLS_EXTRA_CFLAGS" PRELUDE_ADMIN_LIBS="$LIBGNUTLS_EXTRA_LIBS" fi LIBS=$old_LIBS CPPFLAGS=$old_CPPFLAGS fi fi # Check whether --with-libgcrypt-prefix was given. if test "${with_libgcrypt_prefix+set}" = set; then withval=$with_libgcrypt_prefix; libgcrypt_config_prefix="$withval" else libgcrypt_config_prefix="" fi if test x$libgcrypt_config_prefix != x ; then if test x${LIBGCRYPT_CONFIG+set} != xset ; then LIBGCRYPT_CONFIG=$libgcrypt_config_prefix/bin/libgcrypt-config fi fi # Extract the first word of "libgcrypt-config", so it can be a program name with args. set dummy libgcrypt-config; ac_word=$2 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_path_LIBGCRYPT_CONFIG+set}" = set; then $as_echo_n "(cached) " >&6 else case $LIBGCRYPT_CONFIG in [\\/]* | ?:[\\/]*) ac_cv_path_LIBGCRYPT_CONFIG="$LIBGCRYPT_CONFIG" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_path_LIBGCRYPT_CONFIG="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS test -z "$ac_cv_path_LIBGCRYPT_CONFIG" && ac_cv_path_LIBGCRYPT_CONFIG="no" ;; esac fi LIBGCRYPT_CONFIG=$ac_cv_path_LIBGCRYPT_CONFIG if test -n "$LIBGCRYPT_CONFIG"; then { $as_echo "$as_me:$LINENO: result: $LIBGCRYPT_CONFIG" >&5 $as_echo "$LIBGCRYPT_CONFIG" >&6; } else { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } fi tmp=1:1.1.94 if echo "$tmp" | grep ':' >/dev/null 2>/dev/null ; then req_libgcrypt_api=`echo "$tmp" | sed 's/\(.*\):\(.*\)/\1/'` min_libgcrypt_version=`echo "$tmp" | sed 's/\(.*\):\(.*\)/\2/'` else req_libgcrypt_api=0 min_libgcrypt_version="$tmp" fi { $as_echo "$as_me:$LINENO: checking for LIBGCRYPT - version >= $min_libgcrypt_version" >&5 $as_echo_n "checking for LIBGCRYPT - version >= $min_libgcrypt_version... " >&6; } ok=no if test "$LIBGCRYPT_CONFIG" != "no" ; then req_major=`echo $min_libgcrypt_version | \ sed 's/\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\)/\1/'` req_minor=`echo $min_libgcrypt_version | \ sed 's/\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\)/\2/'` req_micro=`echo $min_libgcrypt_version | \ sed 's/\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\)/\3/'` libgcrypt_config_version=`$LIBGCRYPT_CONFIG --version` major=`echo $libgcrypt_config_version | \ sed 's/\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\).*/\1/'` minor=`echo $libgcrypt_config_version | \ sed 's/\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\).*/\2/'` micro=`echo $libgcrypt_config_version | \ sed 's/\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\).*/\3/'` if test "$major" -gt "$req_major"; then ok=yes else if test "$major" -eq "$req_major"; then if test "$minor" -gt "$req_minor"; then ok=yes else if test "$minor" -eq "$req_minor"; then if test "$micro" -ge "$req_micro"; then ok=yes fi fi fi fi fi fi if test $ok = yes; then { $as_echo "$as_me:$LINENO: result: yes" >&5 $as_echo "yes" >&6; } else { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } fi if test $ok = yes; then # If we have a recent libgcrypt, we should also check that the # API is compatible if test "$req_libgcrypt_api" -gt 0 ; then tmp=`$LIBGCRYPT_CONFIG --api-version 2>/dev/null || echo 0` if test "$tmp" -gt 0 ; then { $as_echo "$as_me:$LINENO: checking LIBGCRYPT API version" >&5 $as_echo_n "checking LIBGCRYPT API version... " >&6; } if test "$req_libgcrypt_api" -eq "$tmp" ; then { $as_echo "$as_me:$LINENO: result: okay" >&5 $as_echo "okay" >&6; } else ok=no { $as_echo "$as_me:$LINENO: result: does not match (want=$req_libgcrypt_api got=$tmp)" >&5 $as_echo "does not match (want=$req_libgcrypt_api got=$tmp)" >&6; } fi fi fi fi if test $ok = yes; then LIBGCRYPT_CFLAGS=`$LIBGCRYPT_CONFIG --cflags` LIBGCRYPT_LIBS=`$LIBGCRYPT_CONFIG --libs` : else LIBGCRYPT_CFLAGS="" LIBGCRYPT_LIBS="" { { $as_echo "$as_me:$LINENO: error: *** *** libgcrypt was not found. You may want to get it from *** ftp://ftp.gnupg.org/gcrypt/libgcrypt/ *** " >&5 $as_echo "$as_me: error: *** *** libgcrypt was not found. You may want to get it from *** ftp://ftp.gnupg.org/gcrypt/libgcrypt/ *** " >&2;} { (exit 1); exit 1; }; } fi LIBPRELUDE_LIBS="$LIBPRELUDE_LIBS $LIBGNUTLS_LIBS $LIBGCRYPT_LIBS" { $as_echo "$as_me:$LINENO: checking for struct sockaddr_in6" >&5 $as_echo_n "checking for struct sockaddr_in6... " >&6; } if test "${ac_cv_type_struct_sockaddr_in6+set}" = set; then $as_echo_n "(cached) " >&6 else ac_cv_type_struct_sockaddr_in6=no cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #include #include int main () { if (sizeof (struct sockaddr_in6)) return 0; ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #include #include int main () { if (sizeof ((struct sockaddr_in6))) return 0; ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then : else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_type_struct_sockaddr_in6=yes fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:$LINENO: result: $ac_cv_type_struct_sockaddr_in6" >&5 $as_echo "$ac_cv_type_struct_sockaddr_in6" >&6; } if test "x$ac_cv_type_struct_sockaddr_in6" = x""yes; then cat >>confdefs.h <<_ACEOF #define HAVE_STRUCT_SOCKADDR_IN6 1 _ACEOF have_ipv6_type=yes fi { $as_echo "$as_me:$LINENO: checking whether AF_INET6 is declared" >&5 $as_echo_n "checking whether AF_INET6 is declared... " >&6; } if test "${ac_cv_have_decl_AF_INET6+set}" = set; then $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #include #include int main () { #ifndef AF_INET6 (void) AF_INET6; #endif ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_cv_have_decl_AF_INET6=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_have_decl_AF_INET6=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:$LINENO: result: $ac_cv_have_decl_AF_INET6" >&5 $as_echo "$ac_cv_have_decl_AF_INET6" >&6; } if test "x$ac_cv_have_decl_AF_INET6" = x""yes; then have_ipv6_def=yes fi if test x$have_ipv6_type = xyes && test x$have_ipv6_def = xyes; then cat >>confdefs.h <<_ACEOF #define HAVE_IPV6 /**/ _ACEOF fi { $as_echo "$as_me:$LINENO: checking whether variadic macros are supported" >&5 $as_echo_n "checking whether variadic macros are supported... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #include #define print_me(...) printf(__VA_ARGS__) int main () { print_me("test __VA_ARGS__: %s, %d, %d", "a", 0, 1); return 0; ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then have_variadic_macros=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 have_variadic_macros=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext if test x$have_variadic_macros = xyes; then { $as_echo "$as_me:$LINENO: result: yes" >&5 $as_echo "yes" >&6; } cat >>confdefs.h <<_ACEOF #define HAVE_VARIADIC_MACROS 1 _ACEOF else { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } fi { $as_echo "$as_me:$LINENO: checking if pointers to integers require aligned access" >&5 $as_echo_n "checking if pointers to integers require aligned access... " >&6; } if test "${ax_cv_have_aligned_access_required+set}" = set; then $as_echo_n "(cached) " >&6 else case "$host_cpu" in alpha*|arm*|hp*|mips*|sparc*|ia64) ax_cv_have_aligned_access_required=yes; ;; *) if test "$cross_compiling" = yes; then ax_cv_have_aligned_access_required=no else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #include int main() { char* string = malloc(40); int i; for (i=0; i < 40; i++) string[[i]] = i; { void* s = string; int* p = s+1; int* q = s+2; if (*p == *q) { return 1; } } return 0; } _ACEOF rm -f conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' { (case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_try") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ax_cv_have_aligned_access_required=yes else $as_echo "$as_me: program exited with status $ac_status" >&5 $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) ax_cv_have_aligned_access_required=no fi rm -rf conftest.dSYM rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi ;; esac fi { $as_echo "$as_me:$LINENO: result: $ax_cv_have_aligned_access_required" >&5 $as_echo "$ax_cv_have_aligned_access_required" >&6; } if test "$ax_cv_have_aligned_access_required" = yes ; then cat >>confdefs.h <<\_ACEOF #define HAVE_ALIGNED_ACCESS_REQUIRED 1 _ACEOF fi if test "$ax_cv_have_aligned_access_required" = yes; then cat >>confdefs.h <<_ACEOF #define PRELUDE_ALIGNED_ACCESS /**/ _ACEOF fi { $as_echo "$as_me:$LINENO: checking for an implementation of va_copy()" >&5 $as_echo_n "checking for an implementation of va_copy()... " >&6; } if test "${prelude_cv_va_copy+set}" = set; then $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF #include void f (int i, ...) { va_list args1, args2; va_start (args1, i); va_copy (args2, args1); if (va_arg (args2, int) != 42 || va_arg (args1, int) != 42) exit (1); va_end (args1); va_end (args2); } int main() { f (0, 42); return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || $as_test_x conftest$ac_exeext }; then prelude_cv_va_copy=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 prelude_cv_va_copy=no fi rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi { $as_echo "$as_me:$LINENO: result: $prelude_cv_va_copy" >&5 $as_echo "$prelude_cv_va_copy" >&6; } { $as_echo "$as_me:$LINENO: checking for an implementation of __va_copy()" >&5 $as_echo_n "checking for an implementation of __va_copy()... " >&6; } if test "${prelude_cv___va_copy+set}" = set; then $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF #include void f (int i, ...) { va_list args1, args2; va_start (args1, i); __va_copy (args2, args1); if (va_arg (args2, int) != 42 || va_arg (args1, int) != 42) exit (1); va_end (args1); va_end (args2); } int main() { f (0, 42); return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || $as_test_x conftest$ac_exeext }; then prelude_cv___va_copy=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 prelude_cv___va_copy=no fi rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi { $as_echo "$as_me:$LINENO: result: $prelude_cv___va_copy" >&5 $as_echo "$prelude_cv___va_copy" >&6; } if test "x$prelude_cv_va_copy" = "xyes"; then g_va_copy_func=va_copy else if test "x$prelude_cv___va_copy" = "xyes"; then g_va_copy_func=__va_copy fi fi if test -n "$g_va_copy_func"; then cat >>confdefs.h <<_ACEOF #define PRELUDE_VA_COPY $g_va_copy_func _ACEOF fi { $as_echo "$as_me:$LINENO: checking whether va_lists can be copied by value" >&5 $as_echo_n "checking whether va_lists can be copied by value... " >&6; } if test "${prelude_cv_va_val_copy+set}" = set; then $as_echo_n "(cached) " >&6 else if test "$cross_compiling" = yes; then prelude_cv_va_val_copy=yes else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include void f (int i, ...) { va_list args1, args2; va_start (args1, i); args2 = args1; if (va_arg (args2, int) != 42 || va_arg (args1, int) != 42) exit (1); va_end (args1); va_end (args2); } int main() { f (0, 42); return 0; } _ACEOF rm -f conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' { (case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_try") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then prelude_cv_va_val_copy=yes else $as_echo "$as_me: program exited with status $ac_status" >&5 $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) prelude_cv_va_val_copy=no fi rm -rf conftest.dSYM rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi fi { $as_echo "$as_me:$LINENO: result: $prelude_cv_va_val_copy" >&5 $as_echo "$prelude_cv_va_val_copy" >&6; } if test "x$prelude_cv_va_val_copy" = "xno"; then cat >>confdefs.h <<\_ACEOF #define PRELUDE_VA_COPY_AS_ARRAY 1 _ACEOF fi # Check whether --with-swig was given. if test "${with_swig+set}" = set; then withval=$with_swig; swig_required=true; if test x$withval = xyes; then with_swig="swig"; fi else with_swig="swig" fi if test x$with_swig != xno; then # Extract the first word of "`basename $with_swig`", so it can be a program name with args. set dummy `basename $with_swig`; ac_word=$2 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_path_SWIG+set}" = set; then $as_echo_n "(cached) " >&6 else case $SWIG in [\\/]* | ?:[\\/]*) ac_cv_path_SWIG="$SWIG" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR as_dummy="`dirname $with_swig`:$PATH" for as_dir in $as_dummy do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_path_SWIG="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS test -z "$ac_cv_path_SWIG" && ac_cv_path_SWIG="no" ;; esac fi SWIG=$ac_cv_path_SWIG if test -n "$SWIG"; then { $as_echo "$as_me:$LINENO: result: $SWIG" >&5 $as_echo "$SWIG" >&6; } else { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } fi if test x$SWIG = xno; then if test x$swig_required = xtrue; then { { $as_echo "$as_me:$LINENO: error: Could not find $with_swig binary" >&5 $as_echo "$as_me: error: Could not find $with_swig binary" >&2;} { (exit 1); exit 1; }; } fi fi fi if test x$SWIG != xno; then HAVE_SWIG_TRUE= HAVE_SWIG_FALSE='#' else HAVE_SWIG_TRUE='#' HAVE_SWIG_FALSE= fi # Check whether --with-perl was given. if test "${with_perl+set}" = set; then withval=$with_perl; perl_required=true; if test x$withval = xyes; then with_perl="perl"; fi else with_perl="perl" fi if test x$with_perl != xno; then # Extract the first word of "`basename $with_perl`", so it can be a program name with args. set dummy `basename $with_perl`; ac_word=$2 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_path_PERL+set}" = set; then $as_echo_n "(cached) " >&6 else case $PERL in [\\/]* | ?:[\\/]*) ac_cv_path_PERL="$PERL" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR as_dummy="`dirname $with_perl`:$PATH" for as_dir in $as_dummy do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_path_PERL="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS test -z "$ac_cv_path_PERL" && ac_cv_path_PERL="no" ;; esac fi PERL=$ac_cv_path_PERL if test -n "$PERL"; then { $as_echo "$as_me:$LINENO: result: $PERL" >&5 $as_echo "$PERL" >&6; } else { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } fi if test x$PERL = xno; then if test x$perl_required = xtrue; then { { $as_echo "$as_me:$LINENO: error: Could not find $with_perl binary" >&5 $as_echo "$as_me: error: Could not find $with_perl binary" >&2;} { (exit 1); exit 1; }; } fi with_perl=no else PERL_CFLAGS="-I`$PERL -e 'use Config; print $Config{archlib}'`/CORE" old_CPPFLAGS="$CPPFLAGS" CPPFLAGS="$CPPFLAGS $PERL_CFLAGS" if test "${ac_cv_header_EXTERN_h+set}" = set; then { $as_echo "$as_me:$LINENO: checking for EXTERN.h" >&5 $as_echo_n "checking for EXTERN.h... " >&6; } if test "${ac_cv_header_EXTERN_h+set}" = set; then $as_echo_n "(cached) " >&6 fi { $as_echo "$as_me:$LINENO: result: $ac_cv_header_EXTERN_h" >&5 $as_echo "$ac_cv_header_EXTERN_h" >&6; } else # Is the header compilable? { $as_echo "$as_me:$LINENO: checking EXTERN.h usability" >&5 $as_echo_n "checking EXTERN.h usability... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default #include _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_header_compiler=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_compiler=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext { $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 $as_echo "$ac_header_compiler" >&6; } # Is the header present? { $as_echo "$as_me:$LINENO: checking EXTERN.h presence" >&5 $as_echo_n "checking EXTERN.h presence... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF if { (ac_try="$ac_cpp conftest.$ac_ext" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null && { test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || test ! -s conftest.err }; then ac_header_preproc=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi rm -f conftest.err conftest.$ac_ext { $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 $as_echo "$ac_header_preproc" >&6; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in yes:no: ) { $as_echo "$as_me:$LINENO: WARNING: EXTERN.h: accepted by the compiler, rejected by the preprocessor!" >&5 $as_echo "$as_me: WARNING: EXTERN.h: accepted by the compiler, rejected by the preprocessor!" >&2;} { $as_echo "$as_me:$LINENO: WARNING: EXTERN.h: proceeding with the compiler's result" >&5 $as_echo "$as_me: WARNING: EXTERN.h: proceeding with the compiler's result" >&2;} ac_header_preproc=yes ;; no:yes:* ) { $as_echo "$as_me:$LINENO: WARNING: EXTERN.h: present but cannot be compiled" >&5 $as_echo "$as_me: WARNING: EXTERN.h: present but cannot be compiled" >&2;} { $as_echo "$as_me:$LINENO: WARNING: EXTERN.h: check for missing prerequisite headers?" >&5 $as_echo "$as_me: WARNING: EXTERN.h: check for missing prerequisite headers?" >&2;} { $as_echo "$as_me:$LINENO: WARNING: EXTERN.h: see the Autoconf documentation" >&5 $as_echo "$as_me: WARNING: EXTERN.h: see the Autoconf documentation" >&2;} { $as_echo "$as_me:$LINENO: WARNING: EXTERN.h: section \"Present But Cannot Be Compiled\"" >&5 $as_echo "$as_me: WARNING: EXTERN.h: section \"Present But Cannot Be Compiled\"" >&2;} { $as_echo "$as_me:$LINENO: WARNING: EXTERN.h: proceeding with the preprocessor's result" >&5 $as_echo "$as_me: WARNING: EXTERN.h: proceeding with the preprocessor's result" >&2;} { $as_echo "$as_me:$LINENO: WARNING: EXTERN.h: in the future, the compiler will take precedence" >&5 $as_echo "$as_me: WARNING: EXTERN.h: in the future, the compiler will take precedence" >&2;} ;; esac { $as_echo "$as_me:$LINENO: checking for EXTERN.h" >&5 $as_echo_n "checking for EXTERN.h... " >&6; } if test "${ac_cv_header_EXTERN_h+set}" = set; then $as_echo_n "(cached) " >&6 else ac_cv_header_EXTERN_h=$ac_header_preproc fi { $as_echo "$as_me:$LINENO: result: $ac_cv_header_EXTERN_h" >&5 $as_echo "$ac_cv_header_EXTERN_h" >&6; } fi if test "x$ac_cv_header_EXTERN_h" = x""yes; then { $as_echo "$as_me:$LINENO: checking for perl.h" >&5 $as_echo_n "checking for perl.h... " >&6; } if test "${ac_cv_header_perl_h+set}" = set; then $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #include _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_cv_header_perl_h=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_header_perl_h=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:$LINENO: result: $ac_cv_header_perl_h" >&5 $as_echo "$ac_cv_header_perl_h" >&6; } if test "x$ac_cv_header_perl_h" = x""yes; then with_perl=yes else with_perl=no fi else with_perl=no fi CPPFLAGS="$old_CPPFLAGS" fi fi if test x$with_perl = xyes; then HAVE_PERL_TRUE= HAVE_PERL_FALSE='#' else HAVE_PERL_TRUE='#' HAVE_PERL_FALSE= fi PERL_INSTALLDIRS="site" # Check whether --with-perl-installdirs was given. if test "${with_perl_installdirs+set}" = set; then withval=$with_perl_installdirs; PERL_INSTALLDIRS="$withval" fi if test x$PERL_INSTALLDIRS != xsite && test x$PERL_INSTALLDIRS != xvendor; then { { $as_echo "$as_me:$LINENO: error: Invalid value for --with-perl-installdirs: only \"site\" or \"vendor\" supported." >&5 $as_echo "$as_me: error: Invalid value for --with-perl-installdirs: only \"site\" or \"vendor\" supported." >&2;} { (exit 1); exit 1; }; } fi PERL_EXTRA_PARAMS="INSTALLDIRS=$PERL_INSTALLDIRS" # Check whether --with-python was given. if test "${with_python+set}" = set; then withval=$with_python; python_required=true; if test x$withval = xyes; then with_python="python"; fi else with_python="python" fi if test x$with_python != xno; then # Extract the first word of "`basename $with_python`", so it can be a program name with args. set dummy `basename $with_python`; ac_word=$2 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_path_PYTHON+set}" = set; then $as_echo_n "(cached) " >&6 else case $PYTHON in [\\/]* | ?:[\\/]*) ac_cv_path_PYTHON="$PYTHON" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR as_dummy="`dirname $with_python`:$PATH" for as_dir in $as_dummy do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_path_PYTHON="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS test -z "$ac_cv_path_PYTHON" && ac_cv_path_PYTHON="no" ;; esac fi PYTHON=$ac_cv_path_PYTHON if test -n "$PYTHON"; then { $as_echo "$as_me:$LINENO: result: $PYTHON" >&5 $as_echo "$PYTHON" >&6; } else { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } fi if test x$PYTHON = xno; then if test x$python_required = xtrue; then { { $as_echo "$as_me:$LINENO: error: Could not find $with_python binary" >&5 $as_echo "$as_me: error: Could not find $with_python binary" >&2;} { (exit 1); exit 1; }; } fi with_python=no else old_CPPFLAGS="$CPPFLAGS" CPPFLAGS="-I`$PYTHON -c 'from distutils.sysconfig import get_python_inc; print get_python_inc()'`" if test "${ac_cv_header_Python_h+set}" = set; then { $as_echo "$as_me:$LINENO: checking for Python.h" >&5 $as_echo_n "checking for Python.h... " >&6; } if test "${ac_cv_header_Python_h+set}" = set; then $as_echo_n "(cached) " >&6 fi { $as_echo "$as_me:$LINENO: result: $ac_cv_header_Python_h" >&5 $as_echo "$ac_cv_header_Python_h" >&6; } else # Is the header compilable? { $as_echo "$as_me:$LINENO: checking Python.h usability" >&5 $as_echo_n "checking Python.h usability... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default #include _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_header_compiler=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_compiler=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext { $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 $as_echo "$ac_header_compiler" >&6; } # Is the header present? { $as_echo "$as_me:$LINENO: checking Python.h presence" >&5 $as_echo_n "checking Python.h presence... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF if { (ac_try="$ac_cpp conftest.$ac_ext" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null && { test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || test ! -s conftest.err }; then ac_header_preproc=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi rm -f conftest.err conftest.$ac_ext { $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 $as_echo "$ac_header_preproc" >&6; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in yes:no: ) { $as_echo "$as_me:$LINENO: WARNING: Python.h: accepted by the compiler, rejected by the preprocessor!" >&5 $as_echo "$as_me: WARNING: Python.h: accepted by the compiler, rejected by the preprocessor!" >&2;} { $as_echo "$as_me:$LINENO: WARNING: Python.h: proceeding with the compiler's result" >&5 $as_echo "$as_me: WARNING: Python.h: proceeding with the compiler's result" >&2;} ac_header_preproc=yes ;; no:yes:* ) { $as_echo "$as_me:$LINENO: WARNING: Python.h: present but cannot be compiled" >&5 $as_echo "$as_me: WARNING: Python.h: present but cannot be compiled" >&2;} { $as_echo "$as_me:$LINENO: WARNING: Python.h: check for missing prerequisite headers?" >&5 $as_echo "$as_me: WARNING: Python.h: check for missing prerequisite headers?" >&2;} { $as_echo "$as_me:$LINENO: WARNING: Python.h: see the Autoconf documentation" >&5 $as_echo "$as_me: WARNING: Python.h: see the Autoconf documentation" >&2;} { $as_echo "$as_me:$LINENO: WARNING: Python.h: section \"Present But Cannot Be Compiled\"" >&5 $as_echo "$as_me: WARNING: Python.h: section \"Present But Cannot Be Compiled\"" >&2;} { $as_echo "$as_me:$LINENO: WARNING: Python.h: proceeding with the preprocessor's result" >&5 $as_echo "$as_me: WARNING: Python.h: proceeding with the preprocessor's result" >&2;} { $as_echo "$as_me:$LINENO: WARNING: Python.h: in the future, the compiler will take precedence" >&5 $as_echo "$as_me: WARNING: Python.h: in the future, the compiler will take precedence" >&2;} ;; esac { $as_echo "$as_me:$LINENO: checking for Python.h" >&5 $as_echo_n "checking for Python.h... " >&6; } if test "${ac_cv_header_Python_h+set}" = set; then $as_echo_n "(cached) " >&6 else ac_cv_header_Python_h=$ac_header_preproc fi { $as_echo "$as_me:$LINENO: result: $ac_cv_header_Python_h" >&5 $as_echo "$ac_cv_header_Python_h" >&6; } fi if test "x$ac_cv_header_Python_h" = x""yes; then with_python=yes else with_python=no fi CPPFLAGS="$old_CPPFLAGS" fi fi if test x$with_python = xyes; then HAVE_PYTHON_TRUE= HAVE_PYTHON_FALSE='#' else HAVE_PYTHON_TRUE='#' HAVE_PYTHON_FALSE= fi # Find any Ruby interpreter. if test -z "$RUBY"; then for ac_prog in ruby ruby1.8 ruby1.7 ruby1.6 do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_path_RUBY+set}" = set; then $as_echo_n "(cached) " >&6 else case $RUBY in [\\/]* | ?:[\\/]*) ac_cv_path_RUBY="$RUBY" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_path_RUBY="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS ;; esac fi RUBY=$ac_cv_path_RUBY if test -n "$RUBY"; then { $as_echo "$as_me:$LINENO: result: $RUBY" >&5 $as_echo "$RUBY" >&6; } else { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } fi test -n "$RUBY" && break done test -n "$RUBY" || RUBY=":" fi am_display_RUBY=ruby if test "$RUBY" = :; then with_ruby=no else { $as_echo "$as_me:$LINENO: checking for $am_display_RUBY version" >&5 $as_echo_n "checking for $am_display_RUBY version... " >&6; } if test "${am_cv_ruby_version+set}" = set; then $as_echo_n "(cached) " >&6 else am_cv_ruby_version=`$RUBY -e "print RUBY_VERSION"` fi { $as_echo "$as_me:$LINENO: result: $am_cv_ruby_version" >&5 $as_echo "$am_cv_ruby_version" >&6; } RUBY_VERSION=$am_cv_ruby_version RUBY_PREFIX='${prefix}' RUBY_EXEC_PREFIX='${exec_prefix}' { $as_echo "$as_me:$LINENO: checking for $am_display_RUBY platform" >&5 $as_echo_n "checking for $am_display_RUBY platform... " >&6; } if test "${am_cv_ruby_platform+set}" = set; then $as_echo_n "(cached) " >&6 else am_cv_ruby_platform=`$RUBY -e "print RUBY_PLATFORM"` fi { $as_echo "$as_me:$LINENO: result: $am_cv_ruby_platform" >&5 $as_echo "$am_cv_ruby_platform" >&6; } RUBY_PLATFORM=$am_cv_ruby_platform { $as_echo "$as_me:$LINENO: checking for $am_display_RUBY script directory" >&5 $as_echo_n "checking for $am_display_RUBY script directory... " >&6; } if test "${am_cv_ruby_rubydir+set}" = set; then $as_echo_n "(cached) " >&6 else am_cv_ruby_rubydir=`$RUBY -rrbconfig -e "drive = File::PATH_SEPARATOR == ';' ? /\A\w:/ : /\A/; prefix = Regexp.new('\\A' + Regexp.quote(Config::CONFIG['prefix'])); \\$prefix = Config::CONFIG['prefix'].sub(drive, ''); \\$archdir = Config::CONFIG['archdir'].sub(prefix, '\\$(prefix)').sub(drive, ''); print \\$archdir;"` fi { $as_echo "$as_me:$LINENO: result: $am_cv_ruby_rubydir" >&5 $as_echo "$am_cv_ruby_rubydir" >&6; } rubydir=$am_cv_ruby_rubydir pkgrubydir=\${rubydir}/$PACKAGE { $as_echo "$as_me:$LINENO: checking for $am_display_RUBY extension module directory" >&5 $as_echo_n "checking for $am_display_RUBY extension module directory... " >&6; } if test "${am_cv_ruby_rbexecdir+set}" = set; then $as_echo_n "(cached) " >&6 else am_cv_ruby_rbexecdir=`$RUBY -rrbconfig -e "drive = File::PATH_SEPARATOR == ';' ? /\A\w:/ : /\A/; prefix = Regexp.new('\\A' + Regexp.quote(Config::CONFIG['prefix'])); \\$prefix = Config::CONFIG['prefix'].sub(drive, ''); \\$sitearchdir = Config::CONFIG['sitearchdir'].sub(prefix, '\\$(prefix)').sub(drive, ''); print \\$sitearchdir;" 2>/dev/null || echo "${RUBY_EXEC_PREFIX}/local/lib/site_ruby/${RUBY_VERSION}/${RUBY_PLATFORM}"` fi { $as_echo "$as_me:$LINENO: result: $am_cv_ruby_rbexecdir" >&5 $as_echo "$am_cv_ruby_rbexecdir" >&6; } rbexecdir=$am_cv_ruby_rbexecdir RUBY_INCLUDES=`$RUBY -r rbconfig -e 'if Config::CONFIG["archdir"] then print " -I" + Config::CONFIG["archdir"] end if Config::CONFIG["rubyhdrdir"] then print " -I" + Config::CONFIG["rubyhdrdir"] end'` pkgrbexecdir=\${rbexecdir}/$PACKAGE with_ruby=yes fi if test x$with_ruby != xno; then RUBY_ARCHDIR=`$RUBY -e 'require "rbconfig.rb"; puts Config::expand("\$(archdir)")'` RUBY_LIBRUBYARG=`$RUBY -e 'require "rbconfig.rb"; puts Config::expand("\$(LIBRUBYARG)")'` RUBY_LIBS="-L$RUBY_ARCHDIR $RUBY_LIBRUBYARG" RUBY_CCFLAGS=`$RUBY -rrbconfig -e "print Config::CONFIG['CFLAGS']"` old_CPPFLAGS="$CPPFLAGS" CPPFLAGS="$RUBY_INCLUDES" if test "${ac_cv_header_ruby_h+set}" = set; then { $as_echo "$as_me:$LINENO: checking for ruby.h" >&5 $as_echo_n "checking for ruby.h... " >&6; } if test "${ac_cv_header_ruby_h+set}" = set; then $as_echo_n "(cached) " >&6 fi { $as_echo "$as_me:$LINENO: result: $ac_cv_header_ruby_h" >&5 $as_echo "$ac_cv_header_ruby_h" >&6; } else # Is the header compilable? { $as_echo "$as_me:$LINENO: checking ruby.h usability" >&5 $as_echo_n "checking ruby.h usability... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default #include _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_header_compiler=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_compiler=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext { $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 $as_echo "$ac_header_compiler" >&6; } # Is the header present? { $as_echo "$as_me:$LINENO: checking ruby.h presence" >&5 $as_echo_n "checking ruby.h presence... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF if { (ac_try="$ac_cpp conftest.$ac_ext" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null && { test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || test ! -s conftest.err }; then ac_header_preproc=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi rm -f conftest.err conftest.$ac_ext { $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 $as_echo "$ac_header_preproc" >&6; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in yes:no: ) { $as_echo "$as_me:$LINENO: WARNING: ruby.h: accepted by the compiler, rejected by the preprocessor!" >&5 $as_echo "$as_me: WARNING: ruby.h: accepted by the compiler, rejected by the preprocessor!" >&2;} { $as_echo "$as_me:$LINENO: WARNING: ruby.h: proceeding with the compiler's result" >&5 $as_echo "$as_me: WARNING: ruby.h: proceeding with the compiler's result" >&2;} ac_header_preproc=yes ;; no:yes:* ) { $as_echo "$as_me:$LINENO: WARNING: ruby.h: present but cannot be compiled" >&5 $as_echo "$as_me: WARNING: ruby.h: present but cannot be compiled" >&2;} { $as_echo "$as_me:$LINENO: WARNING: ruby.h: check for missing prerequisite headers?" >&5 $as_echo "$as_me: WARNING: ruby.h: check for missing prerequisite headers?" >&2;} { $as_echo "$as_me:$LINENO: WARNING: ruby.h: see the Autoconf documentation" >&5 $as_echo "$as_me: WARNING: ruby.h: see the Autoconf documentation" >&2;} { $as_echo "$as_me:$LINENO: WARNING: ruby.h: section \"Present But Cannot Be Compiled\"" >&5 $as_echo "$as_me: WARNING: ruby.h: section \"Present But Cannot Be Compiled\"" >&2;} { $as_echo "$as_me:$LINENO: WARNING: ruby.h: proceeding with the preprocessor's result" >&5 $as_echo "$as_me: WARNING: ruby.h: proceeding with the preprocessor's result" >&2;} { $as_echo "$as_me:$LINENO: WARNING: ruby.h: in the future, the compiler will take precedence" >&5 $as_echo "$as_me: WARNING: ruby.h: in the future, the compiler will take precedence" >&2;} ;; esac { $as_echo "$as_me:$LINENO: checking for ruby.h" >&5 $as_echo_n "checking for ruby.h... " >&6; } if test "${ac_cv_header_ruby_h+set}" = set; then $as_echo_n "(cached) " >&6 else ac_cv_header_ruby_h=$ac_header_preproc fi { $as_echo "$as_me:$LINENO: result: $ac_cv_header_ruby_h" >&5 $as_echo "$ac_cv_header_ruby_h" >&6; } fi if test "x$ac_cv_header_ruby_h" = x""yes; then with_ruby=yes else with_ruby=no fi CPPFLAGS="$old_CPPFLAGS" fi if test x$with_ruby = xyes; then HAVE_RUBY_TRUE= HAVE_RUBY_FALSE='#' else HAVE_RUBY_TRUE='#' HAVE_RUBY_FALSE= fi # Check whether --with-lua was given. if test "${with_lua+set}" = set; then withval=$with_lua; lua_required=true; if test x$withval = xyes; then with_lua="lua-config"; fi else with_lua="lua-config" fi if test x$with_lua != xno; then lua_pkg_found=0 pkg_failed=no { $as_echo "$as_me:$LINENO: checking for LUA" >&5 $as_echo_n "checking for LUA... " >&6; } if test -n "$LUA_CFLAGS"; then pkg_cv_LUA_CFLAGS="$LUA_CFLAGS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"lua >= 5.1\"") >&5 ($PKG_CONFIG --exists --print-errors "lua >= 5.1") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then pkg_cv_LUA_CFLAGS=`$PKG_CONFIG --cflags "lua >= 5.1" 2>/dev/null` else pkg_failed=yes fi else pkg_failed=untried fi if test -n "$LUA_LIBS"; then pkg_cv_LUA_LIBS="$LUA_LIBS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"lua >= 5.1\"") >&5 ($PKG_CONFIG --exists --print-errors "lua >= 5.1") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then pkg_cv_LUA_LIBS=`$PKG_CONFIG --libs "lua >= 5.1" 2>/dev/null` else pkg_failed=yes fi else pkg_failed=untried fi if test $pkg_failed = yes; then if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then _pkg_short_errors_supported=yes else _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then LUA_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "lua >= 5.1" 2>&1` else LUA_PKG_ERRORS=`$PKG_CONFIG --print-errors "lua >= 5.1" 2>&1` fi # Put the nasty error message in config.log where it belongs echo "$LUA_PKG_ERRORS" >&5 { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } pkg_failed=no { $as_echo "$as_me:$LINENO: checking for LUA" >&5 $as_echo_n "checking for LUA... " >&6; } if test -n "$LUA_CFLAGS"; then pkg_cv_LUA_CFLAGS="$LUA_CFLAGS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"lua5.1 >= 5.1\"") >&5 ($PKG_CONFIG --exists --print-errors "lua5.1 >= 5.1") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then pkg_cv_LUA_CFLAGS=`$PKG_CONFIG --cflags "lua5.1 >= 5.1" 2>/dev/null` else pkg_failed=yes fi else pkg_failed=untried fi if test -n "$LUA_LIBS"; then pkg_cv_LUA_LIBS="$LUA_LIBS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"lua5.1 >= 5.1\"") >&5 ($PKG_CONFIG --exists --print-errors "lua5.1 >= 5.1") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then pkg_cv_LUA_LIBS=`$PKG_CONFIG --libs "lua5.1 >= 5.1" 2>/dev/null` else pkg_failed=yes fi else pkg_failed=untried fi if test $pkg_failed = yes; then if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then _pkg_short_errors_supported=yes else _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then LUA_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "lua5.1 >= 5.1" 2>&1` else LUA_PKG_ERRORS=`$PKG_CONFIG --print-errors "lua5.1 >= 5.1" 2>&1` fi # Put the nasty error message in config.log where it belongs echo "$LUA_PKG_ERRORS" >&5 { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } { $as_echo "$as_me:$LINENO: WARNING: *** lua >= 5.1 not found" >&5 $as_echo "$as_me: WARNING: *** lua >= 5.1 not found" >&2;} elif test $pkg_failed = untried; then { $as_echo "$as_me:$LINENO: WARNING: *** lua >= 5.1 not found" >&5 $as_echo "$as_me: WARNING: *** lua >= 5.1 not found" >&2;} else LUA_CFLAGS=$pkg_cv_LUA_CFLAGS LUA_LIBS=$pkg_cv_LUA_LIBS { $as_echo "$as_me:$LINENO: result: yes" >&5 $as_echo "yes" >&6; } cat >>confdefs.h <<\_ACEOF #define HAVE_LUA 1 _ACEOF cat >>confdefs.h <<\_ACEOF #define HAVE_LUA_H 1 _ACEOF lua_pkg_found=1 fi elif test $pkg_failed = untried; then pkg_failed=no { $as_echo "$as_me:$LINENO: checking for LUA" >&5 $as_echo_n "checking for LUA... " >&6; } if test -n "$LUA_CFLAGS"; then pkg_cv_LUA_CFLAGS="$LUA_CFLAGS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"lua5.1 >= 5.1\"") >&5 ($PKG_CONFIG --exists --print-errors "lua5.1 >= 5.1") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then pkg_cv_LUA_CFLAGS=`$PKG_CONFIG --cflags "lua5.1 >= 5.1" 2>/dev/null` else pkg_failed=yes fi else pkg_failed=untried fi if test -n "$LUA_LIBS"; then pkg_cv_LUA_LIBS="$LUA_LIBS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"lua5.1 >= 5.1\"") >&5 ($PKG_CONFIG --exists --print-errors "lua5.1 >= 5.1") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then pkg_cv_LUA_LIBS=`$PKG_CONFIG --libs "lua5.1 >= 5.1" 2>/dev/null` else pkg_failed=yes fi else pkg_failed=untried fi if test $pkg_failed = yes; then if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then _pkg_short_errors_supported=yes else _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then LUA_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "lua5.1 >= 5.1" 2>&1` else LUA_PKG_ERRORS=`$PKG_CONFIG --print-errors "lua5.1 >= 5.1" 2>&1` fi # Put the nasty error message in config.log where it belongs echo "$LUA_PKG_ERRORS" >&5 { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } { $as_echo "$as_me:$LINENO: WARNING: *** lua >= 5.1 not found" >&5 $as_echo "$as_me: WARNING: *** lua >= 5.1 not found" >&2;} elif test $pkg_failed = untried; then { $as_echo "$as_me:$LINENO: WARNING: *** lua >= 5.1 not found" >&5 $as_echo "$as_me: WARNING: *** lua >= 5.1 not found" >&2;} else LUA_CFLAGS=$pkg_cv_LUA_CFLAGS LUA_LIBS=$pkg_cv_LUA_LIBS { $as_echo "$as_me:$LINENO: result: yes" >&5 $as_echo "yes" >&6; } cat >>confdefs.h <<\_ACEOF #define HAVE_LUA 1 _ACEOF cat >>confdefs.h <<\_ACEOF #define HAVE_LUA_H 1 _ACEOF lua_pkg_found=1 fi else LUA_CFLAGS=$pkg_cv_LUA_CFLAGS LUA_LIBS=$pkg_cv_LUA_LIBS { $as_echo "$as_me:$LINENO: result: yes" >&5 $as_echo "yes" >&6; } cat >>confdefs.h <<\_ACEOF #define HAVE_LUA 1 _ACEOF cat >>confdefs.h <<\_ACEOF #define HAVE_LUA_H 1 _ACEOF lua_pkg_found=1 fi if test x$lua_pkg_found = x1; then old_CPPFLAGS="$CPPFLAGS" CPPFLAGS="$LUA_CFLAGS" for ac_header in lua.h lauxlib.h do as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 $as_echo_n "checking for $ac_header... " >&6; } if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then $as_echo_n "(cached) " >&6 fi ac_res=`eval 'as_val=${'$as_ac_Header'} $as_echo "$as_val"'` { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } else # Is the header compilable? { $as_echo "$as_me:$LINENO: checking $ac_header usability" >&5 $as_echo_n "checking $ac_header usability... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default #include <$ac_header> _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_header_compiler=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_compiler=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext { $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 $as_echo "$ac_header_compiler" >&6; } # Is the header present? { $as_echo "$as_me:$LINENO: checking $ac_header presence" >&5 $as_echo_n "checking $ac_header presence... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include <$ac_header> _ACEOF if { (ac_try="$ac_cpp conftest.$ac_ext" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null && { test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || test ! -s conftest.err }; then ac_header_preproc=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi rm -f conftest.err conftest.$ac_ext { $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 $as_echo "$ac_header_preproc" >&6; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in yes:no: ) { $as_echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 $as_echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 $as_echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} ac_header_preproc=yes ;; no:yes:* ) { $as_echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 $as_echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} { $as_echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 $as_echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} { $as_echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 $as_echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} { $as_echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 $as_echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 $as_echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} { $as_echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 $as_echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} ;; esac { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 $as_echo_n "checking for $ac_header... " >&6; } if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then $as_echo_n "(cached) " >&6 else eval "$as_ac_Header=\$ac_header_preproc" fi ac_res=`eval 'as_val=${'$as_ac_Header'} $as_echo "$as_val"'` { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } fi as_val=`eval 'as_val=${'$as_ac_Header'} $as_echo "$as_val"'` if test "x$as_val" = x""yes; then cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF with_lua=yes else with_lua=no; break fi done CPPFLAGS="$old_CPPFLAGS" else # Extract the first word of "`basename $with_lua`", so it can be a program name with args. set dummy `basename $with_lua`; ac_word=$2 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_path_LUA_CONFIG+set}" = set; then $as_echo_n "(cached) " >&6 else case $LUA_CONFIG in [\\/]* | ?:[\\/]*) ac_cv_path_LUA_CONFIG="$LUA_CONFIG" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR as_dummy="`dirname $with_lua`:$PATH" for as_dir in $as_dummy do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_path_LUA_CONFIG="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS test -z "$ac_cv_path_LUA_CONFIG" && ac_cv_path_LUA_CONFIG="no" ;; esac fi LUA_CONFIG=$ac_cv_path_LUA_CONFIG if test -n "$LUA_CONFIG"; then { $as_echo "$as_me:$LINENO: result: $LUA_CONFIG" >&5 $as_echo "$LUA_CONFIG" >&6; } else { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } fi if test x$LUA_CONFIG = xno; then if test x$lua_required = xtrue; then { { $as_echo "$as_me:$LINENO: error: Could not find $with_lua binary" >&5 $as_echo "$as_me: error: Could not find $with_lua binary" >&2;} { (exit 1); exit 1; }; } fi with_lua=no else LUA_CFLAGS=`$LUA_CONFIG --include --vmonly` LUA_LIBS=`$LUA_CONFIG --libs --vmonly` old_CPPFLAGS="$CPPFLAGS" CPPFLAGS="$LUA_CFLAGS" for ac_header in lua.h lauxlib.h do as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 $as_echo_n "checking for $ac_header... " >&6; } if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then $as_echo_n "(cached) " >&6 fi ac_res=`eval 'as_val=${'$as_ac_Header'} $as_echo "$as_val"'` { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } else # Is the header compilable? { $as_echo "$as_me:$LINENO: checking $ac_header usability" >&5 $as_echo_n "checking $ac_header usability... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default #include <$ac_header> _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_header_compiler=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_compiler=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext { $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 $as_echo "$ac_header_compiler" >&6; } # Is the header present? { $as_echo "$as_me:$LINENO: checking $ac_header presence" >&5 $as_echo_n "checking $ac_header presence... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include <$ac_header> _ACEOF if { (ac_try="$ac_cpp conftest.$ac_ext" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null && { test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || test ! -s conftest.err }; then ac_header_preproc=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi rm -f conftest.err conftest.$ac_ext { $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 $as_echo "$ac_header_preproc" >&6; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in yes:no: ) { $as_echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 $as_echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 $as_echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} ac_header_preproc=yes ;; no:yes:* ) { $as_echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 $as_echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} { $as_echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 $as_echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} { $as_echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 $as_echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} { $as_echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 $as_echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 $as_echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} { $as_echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 $as_echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} ;; esac { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 $as_echo_n "checking for $ac_header... " >&6; } if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then $as_echo_n "(cached) " >&6 else eval "$as_ac_Header=\$ac_header_preproc" fi ac_res=`eval 'as_val=${'$as_ac_Header'} $as_echo "$as_val"'` { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } fi as_val=`eval 'as_val=${'$as_ac_Header'} $as_echo "$as_val"'` if test "x$as_val" = x""yes; then cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF with_lua=yes else with_lua=no; break fi done CPPFLAGS="$old_CPPFLAGS" fi fi fi if test x$with_lua = xyes; then HAVE_LUA_TRUE= HAVE_LUA_FALSE='#' else HAVE_LUA_TRUE='#' HAVE_LUA_FALSE= fi # Check whether --enable-easy-bindings was given. if test "${enable_easy_bindings+set}" = set; then enableval=$enable_easy_bindings; enable_easy_bindings=$enableval else enable_easy_bindings="yes" fi if test x$enable_easy_bindings = xyes; then HAVE_EASY_BINDINGS_TRUE= HAVE_EASY_BINDINGS_FALSE='#' else HAVE_EASY_BINDINGS_TRUE='#' HAVE_EASY_BINDINGS_FALSE= fi if test x$enable_easy_bindings = xyes; then # Extract the first word of "$CXX", so it can be a program name with args. set dummy $CXX; ac_word=$2 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_HAVE_CXX+set}" = set; then $as_echo_n "(cached) " >&6 else if test -n "$HAVE_CXX"; then ac_cv_prog_HAVE_CXX="$HAVE_CXX" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_HAVE_CXX="yes" $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS test -z "$ac_cv_prog_HAVE_CXX" && ac_cv_prog_HAVE_CXX="no" fi fi HAVE_CXX=$ac_cv_prog_HAVE_CXX if test -n "$HAVE_CXX"; then { $as_echo "$as_me:$LINENO: result: $HAVE_CXX" >&5 $as_echo "$HAVE_CXX" >&6; } else { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } fi if test x$HAVE_CXX != xyes; then { { $as_echo "$as_me:$LINENO: error: Easybindings require a C++ compiler, but none were found." >&5 $as_echo "$as_me: error: Easybindings require a C++ compiler, but none were found." >&2;} { (exit 1); exit 1; }; } fi fi # Check whether --with-valgrind was given. if test "${with_valgrind+set}" = set; then withval=$with_valgrind; valgrind_required=true; if test x$withval = xyes; then with_valgrind="valgrind"; fi else with_valgrind="valgrind" fi if test x$with_valgrind != xno; then # Extract the first word of "`basename $with_valgrind`", so it can be a program name with args. set dummy `basename $with_valgrind`; ac_word=$2 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_path_VALGRIND+set}" = set; then $as_echo_n "(cached) " >&6 else case $VALGRIND in [\\/]* | ?:[\\/]*) ac_cv_path_VALGRIND="$VALGRIND" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR as_dummy="`dirname $with_valgrind`:$PATH" for as_dir in $as_dummy do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_path_VALGRIND="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS test -z "$ac_cv_path_VALGRIND" && ac_cv_path_VALGRIND="no" ;; esac fi VALGRIND=$ac_cv_path_VALGRIND if test -n "$VALGRIND"; then { $as_echo "$as_me:$LINENO: result: $VALGRIND" >&5 $as_echo "$VALGRIND" >&6; } else { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } fi if test x$VALGRIND = xno; then if test x$valgrind_required = xtrue; then { { $as_echo "$as_me:$LINENO: error: Could not find $with_valgrind binary" >&5 $as_echo "$as_me: error: Could not find $with_valgrind binary" >&2;} { (exit 1); exit 1; }; } fi with_valgrind=no else with_valgrind=yes fi fi if test x$with_valgrind = xyes; then HAVE_VALGRIND_TRUE= HAVE_VALGRIND_FALSE='#' else HAVE_VALGRIND_TRUE='#' HAVE_VALGRIND_FALSE= fi { $as_echo "$as_me:$LINENO: checking for an ANSI C-conforming const" >&5 $as_echo_n "checking for an ANSI C-conforming const... " >&6; } if test "${ac_cv_c_const+set}" = set; then $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { /* FIXME: Include the comments suggested by Paul. */ #ifndef __cplusplus /* Ultrix mips cc rejects this. */ typedef int charset[2]; const charset cs; /* SunOS 4.1.1 cc rejects this. */ char const *const *pcpcc; char **ppc; /* NEC SVR4.0.2 mips cc rejects this. */ struct point {int x, y;}; static struct point const zero = {0,0}; /* AIX XL C 1.02.0.0 rejects this. It does not let you subtract one const X* pointer from another in an arm of an if-expression whose if-part is not a constant expression */ const char *g = "string"; pcpcc = &g + (g ? g-g : 0); /* HPUX 7.0 cc rejects these. */ ++pcpcc; ppc = (char**) pcpcc; pcpcc = (char const *const *) ppc; { /* SCO 3.2v4 cc rejects this. */ char *t; char const *s = 0 ? (char *) 0 : (char const *) 0; *t++ = 0; if (s) return 0; } { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */ int x[] = {25, 17}; const int *foo = &x[0]; ++foo; } { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */ typedef const int *iptr; iptr p = 0; ++p; } { /* AIX XL C 1.02.0.0 rejects this saying "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */ struct s { int j; const int *ap[3]; }; struct s *b; b->j = 5; } { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */ const int foo = 10; if (!foo) return 0; } return !cs[0] && !zero.x; #endif ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_cv_c_const=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_c_const=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:$LINENO: result: $ac_cv_c_const" >&5 $as_echo "$ac_cv_c_const" >&6; } if test $ac_cv_c_const = no; then cat >>confdefs.h <<\_ACEOF #define const /**/ _ACEOF fi { $as_echo "$as_me:$LINENO: checking for pid_t" >&5 $as_echo_n "checking for pid_t... " >&6; } if test "${ac_cv_type_pid_t+set}" = set; then $as_echo_n "(cached) " >&6 else ac_cv_type_pid_t=no cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default int main () { if (sizeof (pid_t)) return 0; ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default int main () { if (sizeof ((pid_t))) return 0; ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then : else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_type_pid_t=yes fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:$LINENO: result: $ac_cv_type_pid_t" >&5 $as_echo "$ac_cv_type_pid_t" >&6; } if test "x$ac_cv_type_pid_t" = x""yes; then : else cat >>confdefs.h <<_ACEOF #define pid_t int _ACEOF fi { $as_echo "$as_me:$LINENO: checking for size_t" >&5 $as_echo_n "checking for size_t... " >&6; } if test "${ac_cv_type_size_t+set}" = set; then $as_echo_n "(cached) " >&6 else ac_cv_type_size_t=no cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default int main () { if (sizeof (size_t)) return 0; ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default int main () { if (sizeof ((size_t))) return 0; ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then : else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_type_size_t=yes fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:$LINENO: result: $ac_cv_type_size_t" >&5 $as_echo "$ac_cv_type_size_t" >&6; } if test "x$ac_cv_type_size_t" = x""yes; then : else cat >>confdefs.h <<_ACEOF #define size_t unsigned int _ACEOF fi { $as_echo "$as_me:$LINENO: checking for uid_t" >&5 $as_echo_n "checking for uid_t... " >&6; } if test "${ac_cv_type_uid_t+set}" = set; then $as_echo_n "(cached) " >&6 else ac_cv_type_uid_t=no cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default int main () { if (sizeof (uid_t)) return 0; ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default int main () { if (sizeof ((uid_t))) return 0; ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then : else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_type_uid_t=yes fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:$LINENO: result: $ac_cv_type_uid_t" >&5 $as_echo "$ac_cv_type_uid_t" >&6; } if test "x$ac_cv_type_uid_t" = x""yes; then cat >>confdefs.h <<_ACEOF #define HAVE_UID_T 1 _ACEOF fi { $as_echo "$as_me:$LINENO: checking for gid_t" >&5 $as_echo_n "checking for gid_t... " >&6; } if test "${ac_cv_type_gid_t+set}" = set; then $as_echo_n "(cached) " >&6 else ac_cv_type_gid_t=no cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default int main () { if (sizeof (gid_t)) return 0; ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default int main () { if (sizeof ((gid_t))) return 0; ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then : else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_type_gid_t=yes fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:$LINENO: result: $ac_cv_type_gid_t" >&5 $as_echo "$ac_cv_type_gid_t" >&6; } if test "x$ac_cv_type_gid_t" = x""yes; then cat >>confdefs.h <<_ACEOF #define HAVE_GID_T 1 _ACEOF fi { $as_echo "$as_me:$LINENO: checking whether time.h and sys/time.h may both be included" >&5 $as_echo_n "checking whether time.h and sys/time.h may both be included... " >&6; } if test "${ac_cv_header_time+set}" = set; then $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #include #include int main () { if ((struct tm *) 0) return 0; ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_cv_header_time=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_header_time=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:$LINENO: result: $ac_cv_header_time" >&5 $as_echo "$ac_cv_header_time" >&6; } if test $ac_cv_header_time = yes; then cat >>confdefs.h <<\_ACEOF #define TIME_WITH_SYS_TIME 1 _ACEOF fi { $as_echo "$as_me:$LINENO: checking for long long int" >&5 $as_echo_n "checking for long long int... " >&6; } if test "${ac_cv_type_long_long_int+set}" = set; then $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* For now, do not test the preprocessor; as of 2007 there are too many implementations with broken preprocessors. Perhaps this can be revisited in 2012. In the meantime, code should not expect #if to work with literals wider than 32 bits. */ /* Test literals. */ long long int ll = 9223372036854775807ll; long long int nll = -9223372036854775807LL; unsigned long long int ull = 18446744073709551615ULL; /* Test constant expressions. */ typedef int a[((-9223372036854775807LL < 0 && 0 < 9223372036854775807ll) ? 1 : -1)]; typedef int b[(18446744073709551615ULL <= (unsigned long long int) -1 ? 1 : -1)]; int i = 63; int main () { /* Test availability of runtime routines for shift and division. */ long long int llmax = 9223372036854775807ll; unsigned long long int ullmax = 18446744073709551615ull; return ((ll << 63) | (ll >> 63) | (ll < i) | (ll > i) | (llmax / ll) | (llmax % ll) | (ull << 63) | (ull >> 63) | (ull << i) | (ull >> i) | (ullmax / ull) | (ullmax % ull)); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || $as_test_x conftest$ac_exeext }; then if test "$cross_compiling" = yes; then ac_cv_type_long_long_int=yes else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #ifndef LLONG_MAX # define HALF \ (1LL << (sizeof (long long int) * CHAR_BIT - 2)) # define LLONG_MAX (HALF - 1 + HALF) #endif int main () { long long int n = 1; int i; for (i = 0; ; i++) { long long int m = n << i; if (m >> i != n) return 1; if (LLONG_MAX / 2 < m) break; } return 0; ; return 0; } _ACEOF rm -f conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' { (case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_try") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_type_long_long_int=yes else $as_echo "$as_me: program exited with status $ac_status" >&5 $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) ac_cv_type_long_long_int=no fi rm -rf conftest.dSYM rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_type_long_long_int=no fi rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi { $as_echo "$as_me:$LINENO: result: $ac_cv_type_long_long_int" >&5 $as_echo "$ac_cv_type_long_long_int" >&6; } if test $ac_cv_type_long_long_int = yes; then cat >>confdefs.h <<\_ACEOF #define HAVE_LONG_LONG_INT 1 _ACEOF fi { $as_echo "$as_me:$LINENO: checking for inline" >&5 $as_echo_n "checking for inline... " >&6; } if test "${ac_cv_c_inline+set}" = set; then $as_echo_n "(cached) " >&6 else ac_cv_c_inline=no for ac_kw in inline __inline__ __inline; do cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #ifndef __cplusplus typedef int foo_t; static $ac_kw foo_t static_foo () {return 0; } $ac_kw foo_t foo () {return 0; } #endif _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_cv_c_inline=$ac_kw else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext test "$ac_cv_c_inline" != no && break done fi { $as_echo "$as_me:$LINENO: result: $ac_cv_c_inline" >&5 $as_echo "$ac_cv_c_inline" >&6; } case $ac_cv_c_inline in inline | yes) ;; *) case $ac_cv_c_inline in no) ac_val=;; *) ac_val=$ac_cv_c_inline;; esac cat >>confdefs.h <<_ACEOF #ifndef __cplusplus #define inline $ac_val #endif _ACEOF ;; esac # Check whether --enable-largefile was given. if test "${enable_largefile+set}" = set; then enableval=$enable_largefile; fi if test "$enable_largefile" != no; then { $as_echo "$as_me:$LINENO: checking for special C compiler options needed for large files" >&5 $as_echo_n "checking for special C compiler options needed for large files... " >&6; } if test "${ac_cv_sys_largefile_CC+set}" = set; then $as_echo_n "(cached) " >&6 else ac_cv_sys_largefile_CC=no if test "$GCC" != yes; then ac_save_CC=$CC while :; do # IRIX 6.2 and later do not support large files by default, # so use the C compiler's -n32 option if that helps. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include /* Check that off_t can represent 2**63 - 1 correctly. We can't simply define LARGE_OFF_T to be 9223372036854775807, since some C++ compilers masquerading as C compilers incorrectly reject 9223372036854775807. */ #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 && LARGE_OFF_T % 2147483647 == 1) ? 1 : -1]; int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then break else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f core conftest.err conftest.$ac_objext CC="$CC -n32" rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_cv_sys_largefile_CC=' -n32'; break else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f core conftest.err conftest.$ac_objext break done CC=$ac_save_CC rm -f conftest.$ac_ext fi fi { $as_echo "$as_me:$LINENO: result: $ac_cv_sys_largefile_CC" >&5 $as_echo "$ac_cv_sys_largefile_CC" >&6; } if test "$ac_cv_sys_largefile_CC" != no; then CC=$CC$ac_cv_sys_largefile_CC fi { $as_echo "$as_me:$LINENO: checking for _FILE_OFFSET_BITS value needed for large files" >&5 $as_echo_n "checking for _FILE_OFFSET_BITS value needed for large files... " >&6; } if test "${ac_cv_sys_file_offset_bits+set}" = set; then $as_echo_n "(cached) " >&6 else while :; do cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include /* Check that off_t can represent 2**63 - 1 correctly. We can't simply define LARGE_OFF_T to be 9223372036854775807, since some C++ compilers masquerading as C compilers incorrectly reject 9223372036854775807. */ #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 && LARGE_OFF_T % 2147483647 == 1) ? 1 : -1]; int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_cv_sys_file_offset_bits=no; break else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #define _FILE_OFFSET_BITS 64 #include /* Check that off_t can represent 2**63 - 1 correctly. We can't simply define LARGE_OFF_T to be 9223372036854775807, since some C++ compilers masquerading as C compilers incorrectly reject 9223372036854775807. */ #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 && LARGE_OFF_T % 2147483647 == 1) ? 1 : -1]; int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_cv_sys_file_offset_bits=64; break else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_cv_sys_file_offset_bits=unknown break done fi { $as_echo "$as_me:$LINENO: result: $ac_cv_sys_file_offset_bits" >&5 $as_echo "$ac_cv_sys_file_offset_bits" >&6; } case $ac_cv_sys_file_offset_bits in #( no | unknown) ;; *) cat >>confdefs.h <<_ACEOF #define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits _ACEOF ;; esac rm -rf conftest* if test $ac_cv_sys_file_offset_bits = unknown; then { $as_echo "$as_me:$LINENO: checking for _LARGE_FILES value needed for large files" >&5 $as_echo_n "checking for _LARGE_FILES value needed for large files... " >&6; } if test "${ac_cv_sys_large_files+set}" = set; then $as_echo_n "(cached) " >&6 else while :; do cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include /* Check that off_t can represent 2**63 - 1 correctly. We can't simply define LARGE_OFF_T to be 9223372036854775807, since some C++ compilers masquerading as C compilers incorrectly reject 9223372036854775807. */ #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 && LARGE_OFF_T % 2147483647 == 1) ? 1 : -1]; int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_cv_sys_large_files=no; break else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #define _LARGE_FILES 1 #include /* Check that off_t can represent 2**63 - 1 correctly. We can't simply define LARGE_OFF_T to be 9223372036854775807, since some C++ compilers masquerading as C compilers incorrectly reject 9223372036854775807. */ #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 && LARGE_OFF_T % 2147483647 == 1) ? 1 : -1]; int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_cv_sys_large_files=1; break else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_cv_sys_large_files=unknown break done fi { $as_echo "$as_me:$LINENO: result: $ac_cv_sys_large_files" >&5 $as_echo "$ac_cv_sys_large_files" >&6; } case $ac_cv_sys_large_files in #( no | unknown) ;; *) cat >>confdefs.h <<_ACEOF #define _LARGE_FILES $ac_cv_sys_large_files _ACEOF ;; esac rm -rf conftest* fi fi GNULIB_SOCKET=0; GNULIB_CONNECT=0; GNULIB_ACCEPT=0; GNULIB_BIND=0; GNULIB_GETPEERNAME=0; GNULIB_GETSOCKNAME=0; GNULIB_GETSOCKOPT=0; GNULIB_LISTEN=0; GNULIB_RECV=0; GNULIB_SEND=0; GNULIB_RECVFROM=0; GNULIB_SENDTO=0; GNULIB_SETSOCKOPT=0; GNULIB_SHUTDOWN=0; GNULIB_ACCEPT4=0; HAVE_STRUCT_SOCKADDR_STORAGE=1; HAVE_SA_FAMILY_T=1; HAVE_ACCEPT4=1; { $as_echo "$as_me:$LINENO: checking whether the preprocessor supports include_next" >&5 $as_echo_n "checking whether the preprocessor supports include_next... " >&6; } if test "${gl_cv_have_include_next+set}" = set; then $as_echo_n "(cached) " >&6 else rm -rf conftestd1a conftestd1b conftestd2 mkdir conftestd1a conftestd1b conftestd2 cat < conftestd1a/conftest.h #define DEFINED_IN_CONFTESTD1 #include_next #ifdef DEFINED_IN_CONFTESTD2 int foo; #else #error "include_next doesn't work" #endif EOF cat < conftestd1b/conftest.h #define DEFINED_IN_CONFTESTD1 #include #include_next #ifdef DEFINED_IN_CONFTESTD2 int foo; #else #error "include_next doesn't work" #endif EOF cat < conftestd2/conftest.h #ifndef DEFINED_IN_CONFTESTD1 #error "include_next test doesn't work" #endif #define DEFINED_IN_CONFTESTD2 EOF gl_save_CPPFLAGS="$CPPFLAGS" CPPFLAGS="$gl_save_CPPFLAGS -Iconftestd1b -Iconftestd2" cat >conftest.$ac_ext <<_ACEOF #include _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then gl_cv_have_include_next=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 CPPFLAGS="$gl_save_CPPFLAGS -Iconftestd1a -Iconftestd2" cat >conftest.$ac_ext <<_ACEOF #include _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then gl_cv_have_include_next=buggy else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 gl_cv_have_include_next=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext CPPFLAGS="$gl_save_CPPFLAGS" rm -rf conftestd1a conftestd1b conftestd2 fi { $as_echo "$as_me:$LINENO: result: $gl_cv_have_include_next" >&5 $as_echo "$gl_cv_have_include_next" >&6; } PRAGMA_SYSTEM_HEADER= if test $gl_cv_have_include_next = yes; then INCLUDE_NEXT=include_next INCLUDE_NEXT_AS_FIRST_DIRECTIVE=include_next if test -n "$GCC"; then PRAGMA_SYSTEM_HEADER='#pragma GCC system_header' fi else if test $gl_cv_have_include_next = buggy; then INCLUDE_NEXT=include INCLUDE_NEXT_AS_FIRST_DIRECTIVE=include_next else INCLUDE_NEXT=include INCLUDE_NEXT_AS_FIRST_DIRECTIVE=include fi fi for ac_header in $gl_header_list do as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 $as_echo_n "checking for $ac_header... " >&6; } if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then $as_echo_n "(cached) " >&6 fi ac_res=`eval 'as_val=${'$as_ac_Header'} $as_echo "$as_val"'` { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } else # Is the header compilable? { $as_echo "$as_me:$LINENO: checking $ac_header usability" >&5 $as_echo_n "checking $ac_header usability... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default #include <$ac_header> _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_header_compiler=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_compiler=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext { $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 $as_echo "$ac_header_compiler" >&6; } # Is the header present? { $as_echo "$as_me:$LINENO: checking $ac_header presence" >&5 $as_echo_n "checking $ac_header presence... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include <$ac_header> _ACEOF if { (ac_try="$ac_cpp conftest.$ac_ext" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null && { test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || test ! -s conftest.err }; then ac_header_preproc=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi rm -f conftest.err conftest.$ac_ext { $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 $as_echo "$ac_header_preproc" >&6; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in yes:no: ) { $as_echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 $as_echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 $as_echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} ac_header_preproc=yes ;; no:yes:* ) { $as_echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 $as_echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} { $as_echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 $as_echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} { $as_echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 $as_echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} { $as_echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 $as_echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 $as_echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} { $as_echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 $as_echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} ;; esac { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 $as_echo_n "checking for $ac_header... " >&6; } if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then $as_echo_n "(cached) " >&6 else eval "$as_ac_Header=\$ac_header_preproc" fi ac_res=`eval 'as_val=${'$as_ac_Header'} $as_echo "$as_val"'` { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } fi as_val=`eval 'as_val=${'$as_ac_Header'} $as_echo "$as_val"'` if test "x$as_val" = x""yes; then cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi done GNULIB_CHOWN=0; GNULIB_CLOSE=0; GNULIB_DUP2=0; GNULIB_DUP3=0; GNULIB_ENVIRON=0; GNULIB_EUIDACCESS=0; GNULIB_FACCESSAT=0; GNULIB_FCHDIR=0; GNULIB_FCHOWNAT=0; GNULIB_FSYNC=0; GNULIB_FTRUNCATE=0; GNULIB_GETCWD=0; GNULIB_GETDOMAINNAME=0; GNULIB_GETDTABLESIZE=0; GNULIB_GETGROUPS=0; GNULIB_GETHOSTNAME=0; GNULIB_GETLOGIN=0; GNULIB_GETLOGIN_R=0; GNULIB_GETPAGESIZE=0; GNULIB_GETUSERSHELL=0; GNULIB_LCHOWN=0; GNULIB_LINK=0; GNULIB_LINKAT=0; GNULIB_LSEEK=0; GNULIB_PIPE2=0; GNULIB_PREAD=0; GNULIB_READLINK=0; GNULIB_READLINKAT=0; GNULIB_RMDIR=0; GNULIB_SLEEP=0; GNULIB_SYMLINK=0; GNULIB_SYMLINKAT=0; GNULIB_UNISTD_H_GETOPT=0; GNULIB_UNISTD_H_SIGPIPE=0; GNULIB_UNLINK=0; GNULIB_UNLINKAT=0; GNULIB_USLEEP=0; GNULIB_WRITE=0; HAVE_CHOWN=1; HAVE_DUP2=1; HAVE_DUP3=1; HAVE_EUIDACCESS=1; HAVE_FACCESSAT=1; HAVE_FCHOWNAT=1; HAVE_FSYNC=1; HAVE_FTRUNCATE=1; HAVE_GETDOMAINNAME=1; HAVE_GETDTABLESIZE=1; HAVE_GETGROUPS=1; HAVE_GETHOSTNAME=1; HAVE_GETLOGIN=1; HAVE_GETPAGESIZE=1; HAVE_GETUSERSHELL=1; HAVE_LCHOWN=1; HAVE_LINK=1; HAVE_LINKAT=1; HAVE_PIPE2=1; HAVE_PREAD=1; HAVE_READLINK=1; HAVE_READLINKAT=1; HAVE_SLEEP=1; HAVE_SYMLINK=1; HAVE_SYMLINKAT=1; HAVE_DECL_ENVIRON=1; HAVE_DECL_GETLOGIN_R=1; HAVE_OS_H=0; HAVE_SYS_PARAM_H=0; HAVE_UNLINKAT=1; HAVE_USLEEP=1; REPLACE_CHOWN=0; REPLACE_CLOSE=0; REPLACE_DUP=0; REPLACE_DUP2=0; REPLACE_FCHDIR=0; REPLACE_FCHOWNAT=0; REPLACE_GETCWD=0; REPLACE_GETGROUPS=0; REPLACE_GETPAGESIZE=0; REPLACE_LCHOWN=0; REPLACE_LINK=0; REPLACE_LINKAT=0; REPLACE_LSEEK=0; REPLACE_PREAD=0; REPLACE_READLINK=0; REPLACE_RMDIR=0; REPLACE_SLEEP=0; REPLACE_SYMLINK=0; REPLACE_UNLINK=0; REPLACE_UNLINKAT=0; REPLACE_USLEEP=0; REPLACE_WRITE=0; UNISTD_H_HAVE_WINSOCK2_H=0; UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS=0; GNULIB_IOCTL=0; SYS_IOCTL_H_HAVE_WINSOCK2_H=0; SYS_IOCTL_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS=0; { $as_echo "$as_me:$LINENO: checking whether is self-contained" >&5 $as_echo_n "checking whether is self-contained... " >&6; } if test "${gl_cv_header_sys_socket_h_selfcontained+set}" = set; then $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then gl_cv_header_sys_socket_h_selfcontained=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 gl_cv_header_sys_socket_h_selfcontained=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:$LINENO: result: $gl_cv_header_sys_socket_h_selfcontained" >&5 $as_echo "$gl_cv_header_sys_socket_h_selfcontained" >&6; } if test $gl_cv_header_sys_socket_h_selfcontained = yes; then SYS_SOCKET_H='' for ac_func in shutdown do as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` { $as_echo "$as_me:$LINENO: checking for $ac_func" >&5 $as_echo_n "checking for $ac_func... " >&6; } if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Define $ac_func to an innocuous variant, in case declares $ac_func. For example, HP-UX 11i declares gettimeofday. */ #define $ac_func innocuous_$ac_func /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $ac_func (); below. Prefer to if __STDC__ is defined, since exists even on freestanding compilers. */ #ifdef __STDC__ # include #else # include #endif #undef $ac_func /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char $ac_func (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined __stub_$ac_func || defined __stub___$ac_func choke me #endif int main () { return $ac_func (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || $as_test_x conftest$ac_exeext }; then eval "$as_ac_var=yes" else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 eval "$as_ac_var=no" fi rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi ac_res=`eval 'as_val=${'$as_ac_var'} $as_echo "$as_val"'` { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } as_val=`eval 'as_val=${'$as_ac_var'} $as_echo "$as_val"'` if test "x$as_val" = x""yes; then cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF fi done if test $ac_cv_func_shutdown = yes; then { $as_echo "$as_me:$LINENO: checking whether defines the SHUT_* macros" >&5 $as_echo_n "checking whether defines the SHUT_* macros... " >&6; } if test "${gl_cv_header_sys_socket_h_shut+set}" = set; then $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include int main () { int a[] = { SHUT_RD, SHUT_WR, SHUT_RDWR }; ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then gl_cv_header_sys_socket_h_shut=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 gl_cv_header_sys_socket_h_shut=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:$LINENO: result: $gl_cv_header_sys_socket_h_shut" >&5 $as_echo "$gl_cv_header_sys_socket_h_shut" >&6; } if test $gl_cv_header_sys_socket_h_shut = no; then SYS_SOCKET_H='sys/socket.h' fi fi else SYS_SOCKET_H='sys/socket.h' fi # We need to check for ws2tcpip.h now. : if test $gl_cv_have_include_next = yes; then gl_cv_next_sys_socket_h='<'sys/socket.h'>' else { $as_echo "$as_me:$LINENO: checking absolute name of " >&5 $as_echo_n "checking absolute name of ... " >&6; } if test "${gl_cv_next_sys_socket_h+set}" = set; then $as_echo_n "(cached) " >&6 else if test $ac_cv_header_sys_socket_h = yes; then cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF case "$host_os" in aix*) gl_absname_cpp="$ac_cpp -C" ;; *) gl_absname_cpp="$ac_cpp" ;; esac gl_cv_next_sys_socket_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 | sed -n '\#/sys/socket.h#{ s#.*"\(.*/sys/socket.h\)".*#\1# s#^/[^/]#//&# p q }'`'"' else gl_cv_next_sys_socket_h='<'sys/socket.h'>' fi fi { $as_echo "$as_me:$LINENO: result: $gl_cv_next_sys_socket_h" >&5 $as_echo "$gl_cv_next_sys_socket_h" >&6; } fi NEXT_SYS_SOCKET_H=$gl_cv_next_sys_socket_h if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next' gl_next_as_first_directive='<'sys/socket.h'>' else # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include' gl_next_as_first_directive=$gl_cv_next_sys_socket_h fi NEXT_AS_FIRST_DIRECTIVE_SYS_SOCKET_H=$gl_next_as_first_directive if test $ac_cv_header_sys_socket_h = yes; then HAVE_SYS_SOCKET_H=1 HAVE_WS2TCPIP_H=0 else HAVE_SYS_SOCKET_H=0 for ac_header in ws2tcpip.h do as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 $as_echo_n "checking for $ac_header... " >&6; } if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then $as_echo_n "(cached) " >&6 fi ac_res=`eval 'as_val=${'$as_ac_Header'} $as_echo "$as_val"'` { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } else # Is the header compilable? { $as_echo "$as_me:$LINENO: checking $ac_header usability" >&5 $as_echo_n "checking $ac_header usability... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default #include <$ac_header> _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_header_compiler=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_compiler=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext { $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 $as_echo "$ac_header_compiler" >&6; } # Is the header present? { $as_echo "$as_me:$LINENO: checking $ac_header presence" >&5 $as_echo_n "checking $ac_header presence... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include <$ac_header> _ACEOF if { (ac_try="$ac_cpp conftest.$ac_ext" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null && { test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || test ! -s conftest.err }; then ac_header_preproc=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi rm -f conftest.err conftest.$ac_ext { $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 $as_echo "$ac_header_preproc" >&6; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in yes:no: ) { $as_echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 $as_echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 $as_echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} ac_header_preproc=yes ;; no:yes:* ) { $as_echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 $as_echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} { $as_echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 $as_echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} { $as_echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 $as_echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} { $as_echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 $as_echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 $as_echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} { $as_echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 $as_echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} ;; esac { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 $as_echo_n "checking for $ac_header... " >&6; } if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then $as_echo_n "(cached) " >&6 else eval "$as_ac_Header=\$ac_header_preproc" fi ac_res=`eval 'as_val=${'$as_ac_Header'} $as_echo "$as_val"'` { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } fi as_val=`eval 'as_val=${'$as_ac_Header'} $as_echo "$as_val"'` if test "x$as_val" = x""yes; then cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi done if test $ac_cv_header_ws2tcpip_h = yes; then HAVE_WS2TCPIP_H=1 else HAVE_WS2TCPIP_H=0 fi fi { $as_echo "$as_me:$LINENO: checking for struct sockaddr_storage" >&5 $as_echo_n "checking for struct sockaddr_storage... " >&6; } if test "${ac_cv_type_struct_sockaddr_storage+set}" = set; then $as_echo_n "(cached) " >&6 else ac_cv_type_struct_sockaddr_storage=no cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* sys/types.h is not needed according to POSIX, but the sys/socket.h in i386-unknown-freebsd4.10 and powerpc-apple-darwin5.5 required it. */ #include #ifdef HAVE_SYS_SOCKET_H #include #endif #ifdef HAVE_WS2TCPIP_H #include #endif int main () { if (sizeof (struct sockaddr_storage)) return 0; ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* sys/types.h is not needed according to POSIX, but the sys/socket.h in i386-unknown-freebsd4.10 and powerpc-apple-darwin5.5 required it. */ #include #ifdef HAVE_SYS_SOCKET_H #include #endif #ifdef HAVE_WS2TCPIP_H #include #endif int main () { if (sizeof ((struct sockaddr_storage))) return 0; ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then : else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_type_struct_sockaddr_storage=yes fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:$LINENO: result: $ac_cv_type_struct_sockaddr_storage" >&5 $as_echo "$ac_cv_type_struct_sockaddr_storage" >&6; } if test "x$ac_cv_type_struct_sockaddr_storage" = x""yes; then cat >>confdefs.h <<_ACEOF #define HAVE_STRUCT_SOCKADDR_STORAGE 1 _ACEOF fi { $as_echo "$as_me:$LINENO: checking for sa_family_t" >&5 $as_echo_n "checking for sa_family_t... " >&6; } if test "${ac_cv_type_sa_family_t+set}" = set; then $as_echo_n "(cached) " >&6 else ac_cv_type_sa_family_t=no cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* sys/types.h is not needed according to POSIX, but the sys/socket.h in i386-unknown-freebsd4.10 and powerpc-apple-darwin5.5 required it. */ #include #ifdef HAVE_SYS_SOCKET_H #include #endif #ifdef HAVE_WS2TCPIP_H #include #endif int main () { if (sizeof (sa_family_t)) return 0; ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* sys/types.h is not needed according to POSIX, but the sys/socket.h in i386-unknown-freebsd4.10 and powerpc-apple-darwin5.5 required it. */ #include #ifdef HAVE_SYS_SOCKET_H #include #endif #ifdef HAVE_WS2TCPIP_H #include #endif int main () { if (sizeof ((sa_family_t))) return 0; ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then : else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_type_sa_family_t=yes fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:$LINENO: result: $ac_cv_type_sa_family_t" >&5 $as_echo "$ac_cv_type_sa_family_t" >&6; } if test "x$ac_cv_type_sa_family_t" = x""yes; then cat >>confdefs.h <<_ACEOF #define HAVE_SA_FAMILY_T 1 _ACEOF fi if test $ac_cv_type_struct_sockaddr_storage = no; then HAVE_STRUCT_SOCKADDR_STORAGE=0 SYS_SOCKET_H='sys/socket.h' fi if test $ac_cv_type_sa_family_t = no; then HAVE_SA_FAMILY_T=0 SYS_SOCKET_H='sys/socket.h' fi if test -n "$SYS_SOCKET_H"; then : if test $ac_cv_header_sys_socket_h != yes; then for ac_header in winsock2.h do as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 $as_echo_n "checking for $ac_header... " >&6; } if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then $as_echo_n "(cached) " >&6 fi ac_res=`eval 'as_val=${'$as_ac_Header'} $as_echo "$as_val"'` { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } else # Is the header compilable? { $as_echo "$as_me:$LINENO: checking $ac_header usability" >&5 $as_echo_n "checking $ac_header usability... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default #include <$ac_header> _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_header_compiler=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_compiler=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext { $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 $as_echo "$ac_header_compiler" >&6; } # Is the header present? { $as_echo "$as_me:$LINENO: checking $ac_header presence" >&5 $as_echo_n "checking $ac_header presence... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include <$ac_header> _ACEOF if { (ac_try="$ac_cpp conftest.$ac_ext" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null && { test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || test ! -s conftest.err }; then ac_header_preproc=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi rm -f conftest.err conftest.$ac_ext { $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 $as_echo "$ac_header_preproc" >&6; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in yes:no: ) { $as_echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 $as_echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 $as_echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} ac_header_preproc=yes ;; no:yes:* ) { $as_echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 $as_echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} { $as_echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 $as_echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} { $as_echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 $as_echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} { $as_echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 $as_echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 $as_echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} { $as_echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 $as_echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} ;; esac { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 $as_echo_n "checking for $ac_header... " >&6; } if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then $as_echo_n "(cached) " >&6 else eval "$as_ac_Header=\$ac_header_preproc" fi ac_res=`eval 'as_val=${'$as_ac_Header'} $as_echo "$as_val"'` { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } fi as_val=`eval 'as_val=${'$as_ac_Header'} $as_echo "$as_val"'` if test "x$as_val" = x""yes; then cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi done fi if test "$ac_cv_header_winsock2_h" = yes; then HAVE_WINSOCK2_H=1 UNISTD_H_HAVE_WINSOCK2_H=1 SYS_IOCTL_H_HAVE_WINSOCK2_H=1 else HAVE_WINSOCK2_H=0 fi fi for gl_func in socket connect accept bind getpeername getsockname getsockopt listen recv send recvfrom sendto setsockopt shutdown accept4; do as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh` { $as_echo "$as_me:$LINENO: checking whether $gl_func is declared without a macro" >&5 $as_echo_n "checking whether $gl_func is declared without a macro... " >&6; } if { as_var=$as_gl_Symbol; eval "test \"\${$as_var+set}\" = set"; }; then $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Some systems require prerequisite headers. */ #include #if !defined __GLIBC__ && HAVE_SYS_TIME_H # include #endif #include int main () { #undef $gl_func (void) $gl_func; ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then eval "$as_gl_Symbol=yes" else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 eval "$as_gl_Symbol=no" fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi ac_res=`eval 'as_val=${'$as_gl_Symbol'} $as_echo "$as_val"'` { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } as_val=`eval 'as_val=${'$as_gl_Symbol'} $as_echo "$as_val"'` if test "x$as_val" = x""yes; then cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1 _ACEOF eval ac_cv_have_decl_$gl_func=yes fi done # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works # for constant arguments. Useless! { $as_echo "$as_me:$LINENO: checking for working alloca.h" >&5 $as_echo_n "checking for working alloca.h... " >&6; } if test "${ac_cv_working_alloca_h+set}" = set; then $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include int main () { char *p = (char *) alloca (2 * sizeof (int)); if (p) return 0; ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || $as_test_x conftest$ac_exeext }; then ac_cv_working_alloca_h=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_working_alloca_h=no fi rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi { $as_echo "$as_me:$LINENO: result: $ac_cv_working_alloca_h" >&5 $as_echo "$ac_cv_working_alloca_h" >&6; } if test $ac_cv_working_alloca_h = yes; then cat >>confdefs.h <<\_ACEOF #define HAVE_ALLOCA_H 1 _ACEOF fi { $as_echo "$as_me:$LINENO: checking for alloca" >&5 $as_echo_n "checking for alloca... " >&6; } if test "${ac_cv_func_alloca_works+set}" = set; then $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #ifdef __GNUC__ # define alloca __builtin_alloca #else # ifdef _MSC_VER # include # define alloca _alloca # else # ifdef HAVE_ALLOCA_H # include # else # ifdef _AIX #pragma alloca # else # ifndef alloca /* predefined by HP cc +Olibcalls */ char *alloca (); # endif # endif # endif # endif #endif int main () { char *p = (char *) alloca (1); if (p) return 0; ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || $as_test_x conftest$ac_exeext }; then ac_cv_func_alloca_works=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_func_alloca_works=no fi rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi { $as_echo "$as_me:$LINENO: result: $ac_cv_func_alloca_works" >&5 $as_echo "$ac_cv_func_alloca_works" >&6; } if test $ac_cv_func_alloca_works = yes; then cat >>confdefs.h <<\_ACEOF #define HAVE_ALLOCA 1 _ACEOF else # The SVR3 libPW and SVR4 libucb both contain incompatible functions # that cause trouble. Some versions do not even contain alloca or # contain a buggy version. If you still want to use their alloca, # use ar to extract alloca.o from them instead of compiling alloca.c. ALLOCA=\${LIBOBJDIR}alloca.$ac_objext cat >>confdefs.h <<\_ACEOF #define C_ALLOCA 1 _ACEOF { $as_echo "$as_me:$LINENO: checking whether \`alloca.c' needs Cray hooks" >&5 $as_echo_n "checking whether \`alloca.c' needs Cray hooks... " >&6; } if test "${ac_cv_os_cray+set}" = set; then $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #if defined CRAY && ! defined CRAY2 webecray #else wenotbecray #endif _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "webecray" >/dev/null 2>&1; then ac_cv_os_cray=yes else ac_cv_os_cray=no fi rm -f conftest* fi { $as_echo "$as_me:$LINENO: result: $ac_cv_os_cray" >&5 $as_echo "$ac_cv_os_cray" >&6; } if test $ac_cv_os_cray = yes; then for ac_func in _getb67 GETB67 getb67; do as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` { $as_echo "$as_me:$LINENO: checking for $ac_func" >&5 $as_echo_n "checking for $ac_func... " >&6; } if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Define $ac_func to an innocuous variant, in case declares $ac_func. For example, HP-UX 11i declares gettimeofday. */ #define $ac_func innocuous_$ac_func /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $ac_func (); below. Prefer to if __STDC__ is defined, since exists even on freestanding compilers. */ #ifdef __STDC__ # include #else # include #endif #undef $ac_func /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char $ac_func (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined __stub_$ac_func || defined __stub___$ac_func choke me #endif int main () { return $ac_func (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || $as_test_x conftest$ac_exeext }; then eval "$as_ac_var=yes" else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 eval "$as_ac_var=no" fi rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi ac_res=`eval 'as_val=${'$as_ac_var'} $as_echo "$as_val"'` { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } as_val=`eval 'as_val=${'$as_ac_var'} $as_echo "$as_val"'` if test "x$as_val" = x""yes; then cat >>confdefs.h <<_ACEOF #define CRAY_STACKSEG_END $ac_func _ACEOF break fi done fi { $as_echo "$as_me:$LINENO: checking stack direction for C alloca" >&5 $as_echo_n "checking stack direction for C alloca... " >&6; } if test "${ac_cv_c_stack_direction+set}" = set; then $as_echo_n "(cached) " >&6 else if test "$cross_compiling" = yes; then ac_cv_c_stack_direction=0 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default int find_stack_direction () { static char *addr = 0; auto char dummy; if (addr == 0) { addr = &dummy; return find_stack_direction (); } else return (&dummy > addr) ? 1 : -1; } int main () { return find_stack_direction () < 0; } _ACEOF rm -f conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' { (case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_try") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_c_stack_direction=1 else $as_echo "$as_me: program exited with status $ac_status" >&5 $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) ac_cv_c_stack_direction=-1 fi rm -rf conftest.dSYM rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi fi { $as_echo "$as_me:$LINENO: result: $ac_cv_c_stack_direction" >&5 $as_echo "$ac_cv_c_stack_direction" >&6; } cat >>confdefs.h <<_ACEOF #define STACK_DIRECTION $ac_cv_c_stack_direction _ACEOF fi GNULIB_INET_NTOP=0; GNULIB_INET_PTON=0; HAVE_DECL_INET_NTOP=1; HAVE_DECL_INET_PTON=1; GNULIB_BTOWC=0; GNULIB_WCTOB=0; GNULIB_MBSINIT=0; GNULIB_MBRTOWC=0; GNULIB_MBRLEN=0; GNULIB_MBSRTOWCS=0; GNULIB_MBSNRTOWCS=0; GNULIB_WCRTOMB=0; GNULIB_WCSRTOMBS=0; GNULIB_WCSNRTOMBS=0; GNULIB_WCWIDTH=0; HAVE_BTOWC=1; HAVE_MBSINIT=1; HAVE_MBRTOWC=1; HAVE_MBRLEN=1; HAVE_MBSRTOWCS=1; HAVE_MBSNRTOWCS=1; HAVE_WCRTOMB=1; HAVE_WCSRTOMBS=1; HAVE_WCSNRTOMBS=1; HAVE_DECL_WCTOB=1; HAVE_DECL_WCWIDTH=1; REPLACE_MBSTATE_T=0; REPLACE_BTOWC=0; REPLACE_WCTOB=0; REPLACE_MBSINIT=0; REPLACE_MBRTOWC=0; REPLACE_MBRLEN=0; REPLACE_MBSRTOWCS=0; REPLACE_MBSNRTOWCS=0; REPLACE_WCRTOMB=0; REPLACE_WCSRTOMBS=0; REPLACE_WCSNRTOMBS=0; REPLACE_WCWIDTH=0; { $as_echo "$as_me:$LINENO: checking whether uses 'inline' correctly" >&5 $as_echo_n "checking whether uses 'inline' correctly... " >&6; } if test "${gl_cv_header_wchar_h_correct_inline+set}" = set; then $as_echo_n "(cached) " >&6 else gl_cv_header_wchar_h_correct_inline=yes cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #define wcstod renamed_wcstod #include extern int zero (void); int main () { return zero(); } _ACEOF if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then mv conftest.$ac_objext conftest1.$ac_objext cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #define wcstod renamed_wcstod #include int zero (void) { return 0; } _ACEOF if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then mv conftest.$ac_objext conftest2.$ac_objext if $CC -o conftest$ac_exeext $CFLAGS $LDFLAGS conftest1.$ac_objext conftest2.$ac_objext $LIBS >&5 2>&1; then : else gl_cv_header_wchar_h_correct_inline=no fi fi fi rm -f conftest1.$ac_objext conftest2.$ac_objext conftest$ac_exeext fi { $as_echo "$as_me:$LINENO: result: $gl_cv_header_wchar_h_correct_inline" >&5 $as_echo "$gl_cv_header_wchar_h_correct_inline" >&6; } if test $gl_cv_header_wchar_h_correct_inline = no; then { { $as_echo "$as_me:$LINENO: error: cannot be used with this compiler ($CC $CFLAGS $CPPFLAGS). This is a known interoperability problem of glibc <= 2.5 with gcc >= 4.3 in C99 mode. You have four options: - Add the flag -fgnu89-inline to CC and reconfigure, or - Fix your include files, using parts of , or - Use a gcc version older than 4.3, or - Don't use the flags -std=c99 or -std=gnu99. Configuration aborted." >&5 $as_echo "$as_me: error: cannot be used with this compiler ($CC $CFLAGS $CPPFLAGS). This is a known interoperability problem of glibc <= 2.5 with gcc >= 4.3 in C99 mode. You have four options: - Add the flag -fgnu89-inline to CC and reconfigure, or - Fix your include files, using parts of , or - Use a gcc version older than 4.3, or - Don't use the flags -std=c99 or -std=gnu99. Configuration aborted." >&2;} { (exit 1); exit 1; }; } fi for ac_func in $gl_func_list do as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` { $as_echo "$as_me:$LINENO: checking for $ac_func" >&5 $as_echo_n "checking for $ac_func... " >&6; } if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Define $ac_func to an innocuous variant, in case declares $ac_func. For example, HP-UX 11i declares gettimeofday. */ #define $ac_func innocuous_$ac_func /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $ac_func (); below. Prefer to if __STDC__ is defined, since exists even on freestanding compilers. */ #ifdef __STDC__ # include #else # include #endif #undef $ac_func /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char $ac_func (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined __stub_$ac_func || defined __stub___$ac_func choke me #endif int main () { return $ac_func (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || $as_test_x conftest$ac_exeext }; then eval "$as_ac_var=yes" else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 eval "$as_ac_var=no" fi rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi ac_res=`eval 'as_val=${'$as_ac_var'} $as_echo "$as_val"'` { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } as_val=`eval 'as_val=${'$as_ac_var'} $as_echo "$as_val"'` if test "x$as_val" = x""yes; then cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF fi done { $as_echo "$as_me:$LINENO: checking for nl_langinfo and CODESET" >&5 $as_echo_n "checking for nl_langinfo and CODESET... " >&6; } if test "${am_cv_langinfo_codeset+set}" = set; then $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include int main () { char* cs = nl_langinfo(CODESET); return !cs; ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || $as_test_x conftest$ac_exeext }; then am_cv_langinfo_codeset=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 am_cv_langinfo_codeset=no fi rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi { $as_echo "$as_me:$LINENO: result: $am_cv_langinfo_codeset" >&5 $as_echo "$am_cv_langinfo_codeset" >&6; } if test $am_cv_langinfo_codeset = yes; then cat >>confdefs.h <<\_ACEOF #define HAVE_LANGINFO_CODESET 1 _ACEOF fi { $as_echo "$as_me:$LINENO: checking for a traditional french locale" >&5 $as_echo_n "checking for a traditional french locale... " >&6; } if test "${gt_cv_locale_fr+set}" = set; then $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #include #if HAVE_LANGINFO_CODESET # include #endif #include #include struct tm t; char buf[16]; int main () { /* Check whether the given locale name is recognized by the system. */ if (setlocale (LC_ALL, "") == NULL) return 1; /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646". On MacOS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET) is empty, and the behaviour of Tcl 8.4 in this locale is not useful. On OpenBSD 4.0, when an unsupported locale is specified, setlocale() succeeds but then nl_langinfo(CODESET) is "646". In this situation, some unit tests fail. */ #if HAVE_LANGINFO_CODESET { const char *cs = nl_langinfo (CODESET); if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0) return 1; } #endif #ifdef __CYGWIN__ /* On Cygwin, avoid locale names without encoding suffix, because the locale_charset() function relies on the encoding suffix. Note that LC_ALL is set on the command line. */ if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1; #endif /* Check whether in the abbreviation of the second month, the second character (should be U+00E9: LATIN SMALL LETTER E WITH ACUTE) is only one byte long. This excludes the UTF-8 encoding. */ t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4; if (strftime (buf, sizeof (buf), "%b", &t) < 3 || buf[2] != 'v') return 1; /* Check whether the decimal separator is a comma. On NetBSD 3.0 in the fr_FR.ISO8859-1 locale, localeconv()->decimal_point are nl_langinfo(RADIXCHAR) are both ".". */ if (localeconv () ->decimal_point[0] != ',') return 1; return 0; } _ACEOF if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && test -s conftest$ac_exeext; then # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because # otherwise on MacOS X 10.3.5 the LC_TIME=C from the beginning of the # configure script would override the LC_ALL setting. Likewise for # LC_CTYPE, which is also set at the beginning of the configure script. # Test for the usual locale name. if (LC_ALL=fr_FR LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then gt_cv_locale_fr=fr_FR else # Test for the locale name with explicit encoding suffix. if (LC_ALL=fr_FR.ISO-8859-1 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then gt_cv_locale_fr=fr_FR.ISO-8859-1 else # Test for the AIX, OSF/1, FreeBSD, NetBSD, OpenBSD locale name. if (LC_ALL=fr_FR.ISO8859-1 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then gt_cv_locale_fr=fr_FR.ISO8859-1 else # Test for the HP-UX locale name. if (LC_ALL=fr_FR.iso88591 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then gt_cv_locale_fr=fr_FR.iso88591 else # Test for the Solaris 7 locale name. if (LC_ALL=fr LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then gt_cv_locale_fr=fr else # None found. gt_cv_locale_fr=none fi fi fi fi fi fi rm -fr conftest* fi { $as_echo "$as_me:$LINENO: result: $gt_cv_locale_fr" >&5 $as_echo "$gt_cv_locale_fr" >&6; } LOCALE_FR=$gt_cv_locale_fr GNULIB_DPRINTF=0; GNULIB_FCLOSE=0; GNULIB_FFLUSH=0; GNULIB_FOPEN=0; GNULIB_FPRINTF=0; GNULIB_FPRINTF_POSIX=0; GNULIB_FPURGE=0; GNULIB_FPUTC=0; GNULIB_FPUTS=0; GNULIB_FREOPEN=0; GNULIB_FSEEK=0; GNULIB_FSEEKO=0; GNULIB_FTELL=0; GNULIB_FTELLO=0; GNULIB_FWRITE=0; GNULIB_GETDELIM=0; GNULIB_GETLINE=0; GNULIB_OBSTACK_PRINTF=0; GNULIB_OBSTACK_PRINTF_POSIX=0; GNULIB_PERROR=0; GNULIB_POPEN=0; GNULIB_PRINTF=0; GNULIB_PRINTF_POSIX=0; GNULIB_PUTC=0; GNULIB_PUTCHAR=0; GNULIB_PUTS=0; GNULIB_REMOVE=0; GNULIB_RENAME=0; GNULIB_RENAMEAT=0; GNULIB_SNPRINTF=0; GNULIB_SPRINTF_POSIX=0; GNULIB_STDIO_H_SIGPIPE=0; GNULIB_VASPRINTF=0; GNULIB_VDPRINTF=0; GNULIB_VFPRINTF=0; GNULIB_VFPRINTF_POSIX=0; GNULIB_VPRINTF=0; GNULIB_VPRINTF_POSIX=0; GNULIB_VSNPRINTF=0; GNULIB_VSPRINTF_POSIX=0; HAVE_DECL_FPURGE=1; HAVE_DECL_GETDELIM=1; HAVE_DECL_GETLINE=1; HAVE_DECL_OBSTACK_PRINTF=1; HAVE_DECL_SNPRINTF=1; HAVE_DECL_VSNPRINTF=1; HAVE_DPRINTF=1; HAVE_RENAMEAT=1; HAVE_VASPRINTF=1; HAVE_VDPRINTF=1; REPLACE_DPRINTF=0; REPLACE_FCLOSE=0; REPLACE_FFLUSH=0; REPLACE_FOPEN=0; REPLACE_FPRINTF=0; REPLACE_FPURGE=0; REPLACE_FREOPEN=0; REPLACE_FSEEK=0; REPLACE_FSEEKO=0; REPLACE_FTELL=0; REPLACE_FTELLO=0; REPLACE_GETDELIM=0; REPLACE_GETLINE=0; REPLACE_OBSTACK_PRINTF=0; REPLACE_PERROR=0; REPLACE_POPEN=0; REPLACE_PRINTF=0; REPLACE_REMOVE=0; REPLACE_RENAME=0; REPLACE_RENAMEAT=0; REPLACE_SNPRINTF=0; REPLACE_SPRINTF=0; REPLACE_STDIO_WRITE_FUNCS=0; REPLACE_VASPRINTF=0; REPLACE_VDPRINTF=0; REPLACE_VFPRINTF=0; REPLACE_VPRINTF=0; REPLACE_VSNPRINTF=0; REPLACE_VSPRINTF=0; if test "X$prefix" = "XNONE"; then acl_final_prefix="$ac_default_prefix" else acl_final_prefix="$prefix" fi if test "X$exec_prefix" = "XNONE"; then acl_final_exec_prefix='${prefix}' else acl_final_exec_prefix="$exec_prefix" fi acl_save_prefix="$prefix" prefix="$acl_final_prefix" eval acl_final_exec_prefix=\"$acl_final_exec_prefix\" prefix="$acl_save_prefix" # Check whether --with-gnu-ld was given. if test "${with_gnu_ld+set}" = set; then withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes else with_gnu_ld=no fi # Prepare PATH_SEPARATOR. # The user is always right. if test "${PATH_SEPARATOR+set}" != set; then echo "#! /bin/sh" >conf$$.sh echo "exit 0" >>conf$$.sh chmod +x conf$$.sh if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then PATH_SEPARATOR=';' else PATH_SEPARATOR=: fi rm -f conf$$.sh fi ac_prog=ld if test "$GCC" = yes; then # Check if gcc -print-prog-name=ld gives a path. { $as_echo "$as_me:$LINENO: checking for ld used by GCC" >&5 $as_echo_n "checking for ld used by GCC... " >&6; } 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. [\\/]* | [A-Za-z]:[\\/]*) 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 { $as_echo "$as_me:$LINENO: checking for GNU ld" >&5 $as_echo_n "checking for GNU ld... " >&6; } else { $as_echo "$as_me:$LINENO: checking for non-GNU ld" >&5 $as_echo_n "checking for non-GNU ld... " >&6; } fi if test "${acl_cv_path_LD+set}" = set; then $as_echo_n "(cached) " >&6 else if test -z "$LD"; then IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}" for ac_dir in $PATH; do test -z "$ac_dir" && ac_dir=. if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then acl_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 `"$acl_cv_path_LD" -v 2>&1 < /dev/null` in *GNU* | *'with BFD'*) test "$with_gnu_ld" != no && break ;; *) test "$with_gnu_ld" != yes && break ;; esac fi done IFS="$ac_save_ifs" else acl_cv_path_LD="$LD" # Let the user override the test with a path. fi fi LD="$acl_cv_path_LD" if test -n "$LD"; then { $as_echo "$as_me:$LINENO: result: $LD" >&5 $as_echo "$LD" >&6; } else { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } fi test -z "$LD" && { { $as_echo "$as_me:$LINENO: error: no acceptable ld found in \$PATH" >&5 $as_echo "$as_me: error: no acceptable ld found in \$PATH" >&2;} { (exit 1); exit 1; }; } { $as_echo "$as_me:$LINENO: checking if the linker ($LD) is GNU ld" >&5 $as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; } if test "${acl_cv_prog_gnu_ld+set}" = set; then $as_echo_n "(cached) " >&6 else # I'd rather use --version here, but apparently some GNU ld's only accept -v. case `$LD -v 2>&1 &5 $as_echo "$acl_cv_prog_gnu_ld" >&6; } with_gnu_ld=$acl_cv_prog_gnu_ld { $as_echo "$as_me:$LINENO: checking for shared library run path origin" >&5 $as_echo_n "checking for shared library run path origin... " >&6; } if test "${acl_cv_rpath+set}" = set; then $as_echo_n "(cached) " >&6 else CC="$CC" GCC="$GCC" LDFLAGS="$LDFLAGS" LD="$LD" with_gnu_ld="$with_gnu_ld" \ ${CONFIG_SHELL-/bin/sh} "$ac_aux_dir/config.rpath" "$host" > conftest.sh . ./conftest.sh rm -f ./conftest.sh acl_cv_rpath=done fi { $as_echo "$as_me:$LINENO: result: $acl_cv_rpath" >&5 $as_echo "$acl_cv_rpath" >&6; } wl="$acl_cv_wl" acl_libext="$acl_cv_libext" acl_shlibext="$acl_cv_shlibext" acl_libname_spec="$acl_cv_libname_spec" acl_library_names_spec="$acl_cv_library_names_spec" acl_hardcode_libdir_flag_spec="$acl_cv_hardcode_libdir_flag_spec" acl_hardcode_libdir_separator="$acl_cv_hardcode_libdir_separator" acl_hardcode_direct="$acl_cv_hardcode_direct" acl_hardcode_minus_L="$acl_cv_hardcode_minus_L" # Check whether --enable-rpath was given. if test "${enable_rpath+set}" = set; then enableval=$enable_rpath; : else enable_rpath=yes fi acl_libdirstem=lib acl_libdirstem2= case "$host_os" in solaris*) { $as_echo "$as_me:$LINENO: checking for 64-bit host" >&5 $as_echo_n "checking for 64-bit host... " >&6; } if test "${gl_cv_solaris_64bit+set}" = set; then $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #ifdef _LP64 sixtyfour bits #endif _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "sixtyfour bits" >/dev/null 2>&1; then gl_cv_solaris_64bit=yes else gl_cv_solaris_64bit=no fi rm -f conftest* fi { $as_echo "$as_me:$LINENO: result: $gl_cv_solaris_64bit" >&5 $as_echo "$gl_cv_solaris_64bit" >&6; } if test $gl_cv_solaris_64bit = yes; then acl_libdirstem=lib/64 case "$host_cpu" in sparc*) acl_libdirstem2=lib/sparcv9 ;; i*86 | x86_64) acl_libdirstem2=lib/amd64 ;; esac fi ;; *) searchpath=`(LC_ALL=C $CC -print-search-dirs) 2>/dev/null | sed -n -e 's,^libraries: ,,p' | sed -e 's,^=,,'` if test -n "$searchpath"; then acl_save_IFS="${IFS= }"; IFS=":" for searchdir in $searchpath; do if test -d "$searchdir"; then case "$searchdir" in */lib64/ | */lib64 ) acl_libdirstem=lib64 ;; */../ | */.. ) # Better ignore directories of this form. They are misleading. ;; *) searchdir=`cd "$searchdir" && pwd` case "$searchdir" in */lib64 ) acl_libdirstem=lib64 ;; esac ;; esac fi done IFS="$acl_save_IFS" fi ;; esac test -n "$acl_libdirstem2" || acl_libdirstem2="$acl_libdirstem" gl_threads_api=none LIBTHREAD= LTLIBTHREAD= LIBMULTITHREAD= LTLIBMULTITHREAD= if test "$gl_use_threads" != no; then { $as_echo "$as_me:$LINENO: checking whether imported symbols can be declared weak" >&5 $as_echo_n "checking whether imported symbols can be declared weak... " >&6; } gl_have_weak=no cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ extern void xyzzy (); #pragma weak xyzzy int main () { xyzzy(); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || $as_test_x conftest$ac_exeext }; then gl_have_weak=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext { $as_echo "$as_me:$LINENO: result: $gl_have_weak" >&5 $as_echo "$gl_have_weak" >&6; } if test "$gl_use_threads" = yes || test "$gl_use_threads" = posix; then # On OSF/1, the compiler needs the flag -pthread or -D_REENTRANT so that # it groks . It's added above, in gl_THREADLIB_EARLY_BODY. if test "${ac_cv_header_pthread_h+set}" = set; then { $as_echo "$as_me:$LINENO: checking for pthread.h" >&5 $as_echo_n "checking for pthread.h... " >&6; } if test "${ac_cv_header_pthread_h+set}" = set; then $as_echo_n "(cached) " >&6 fi { $as_echo "$as_me:$LINENO: result: $ac_cv_header_pthread_h" >&5 $as_echo "$ac_cv_header_pthread_h" >&6; } else # Is the header compilable? { $as_echo "$as_me:$LINENO: checking pthread.h usability" >&5 $as_echo_n "checking pthread.h usability... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default #include _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_header_compiler=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_compiler=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext { $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 $as_echo "$ac_header_compiler" >&6; } # Is the header present? { $as_echo "$as_me:$LINENO: checking pthread.h presence" >&5 $as_echo_n "checking pthread.h presence... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF if { (ac_try="$ac_cpp conftest.$ac_ext" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null && { test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || test ! -s conftest.err }; then ac_header_preproc=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi rm -f conftest.err conftest.$ac_ext { $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 $as_echo "$ac_header_preproc" >&6; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in yes:no: ) { $as_echo "$as_me:$LINENO: WARNING: pthread.h: accepted by the compiler, rejected by the preprocessor!" >&5 $as_echo "$as_me: WARNING: pthread.h: accepted by the compiler, rejected by the preprocessor!" >&2;} { $as_echo "$as_me:$LINENO: WARNING: pthread.h: proceeding with the compiler's result" >&5 $as_echo "$as_me: WARNING: pthread.h: proceeding with the compiler's result" >&2;} ac_header_preproc=yes ;; no:yes:* ) { $as_echo "$as_me:$LINENO: WARNING: pthread.h: present but cannot be compiled" >&5 $as_echo "$as_me: WARNING: pthread.h: present but cannot be compiled" >&2;} { $as_echo "$as_me:$LINENO: WARNING: pthread.h: check for missing prerequisite headers?" >&5 $as_echo "$as_me: WARNING: pthread.h: check for missing prerequisite headers?" >&2;} { $as_echo "$as_me:$LINENO: WARNING: pthread.h: see the Autoconf documentation" >&5 $as_echo "$as_me: WARNING: pthread.h: see the Autoconf documentation" >&2;} { $as_echo "$as_me:$LINENO: WARNING: pthread.h: section \"Present But Cannot Be Compiled\"" >&5 $as_echo "$as_me: WARNING: pthread.h: section \"Present But Cannot Be Compiled\"" >&2;} { $as_echo "$as_me:$LINENO: WARNING: pthread.h: proceeding with the preprocessor's result" >&5 $as_echo "$as_me: WARNING: pthread.h: proceeding with the preprocessor's result" >&2;} { $as_echo "$as_me:$LINENO: WARNING: pthread.h: in the future, the compiler will take precedence" >&5 $as_echo "$as_me: WARNING: pthread.h: in the future, the compiler will take precedence" >&2;} ;; esac { $as_echo "$as_me:$LINENO: checking for pthread.h" >&5 $as_echo_n "checking for pthread.h... " >&6; } if test "${ac_cv_header_pthread_h+set}" = set; then $as_echo_n "(cached) " >&6 else ac_cv_header_pthread_h=$ac_header_preproc fi { $as_echo "$as_me:$LINENO: result: $ac_cv_header_pthread_h" >&5 $as_echo "$ac_cv_header_pthread_h" >&6; } fi if test "x$ac_cv_header_pthread_h" = x""yes; then gl_have_pthread_h=yes else gl_have_pthread_h=no fi if test "$gl_have_pthread_h" = yes; then # Other possible tests: # -lpthreads (FSU threads, PCthreads) # -lgthreads gl_have_pthread= # Test whether both pthread_mutex_lock and pthread_mutexattr_init exist # in libc. IRIX 6.5 has the first one in both libc and libpthread, but # the second one only in libpthread, and lock.c needs it. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include int main () { pthread_mutex_lock((pthread_mutex_t*)0); pthread_mutexattr_init((pthread_mutexattr_t*)0); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || $as_test_x conftest$ac_exeext }; then gl_have_pthread=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext # Test for libpthread by looking for pthread_kill. (Not pthread_self, # since it is defined as a macro on OSF/1.) if test -n "$gl_have_pthread"; then # The program links fine without libpthread. But it may actually # need to link with libpthread in order to create multiple threads. { $as_echo "$as_me:$LINENO: checking for pthread_kill in -lpthread" >&5 $as_echo_n "checking for pthread_kill in -lpthread... " >&6; } if test "${ac_cv_lib_pthread_pthread_kill+set}" = set; then $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lpthread $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char pthread_kill (); int main () { return pthread_kill (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || $as_test_x conftest$ac_exeext }; then ac_cv_lib_pthread_pthread_kill=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_pthread_pthread_kill=no fi rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:$LINENO: result: $ac_cv_lib_pthread_pthread_kill" >&5 $as_echo "$ac_cv_lib_pthread_pthread_kill" >&6; } if test "x$ac_cv_lib_pthread_pthread_kill" = x""yes; then LIBMULTITHREAD=-lpthread LTLIBMULTITHREAD=-lpthread # On Solaris and HP-UX, most pthread functions exist also in libc. # Therefore pthread_in_use() needs to actually try to create a # thread: pthread_create from libc will fail, whereas # pthread_create will actually create a thread. case "$host_os" in solaris* | hpux*) cat >>confdefs.h <<\_ACEOF #define PTHREAD_IN_USE_DETECTION_HARD 1 _ACEOF esac fi else # Some library is needed. Try libpthread and libc_r. { $as_echo "$as_me:$LINENO: checking for pthread_kill in -lpthread" >&5 $as_echo_n "checking for pthread_kill in -lpthread... " >&6; } if test "${ac_cv_lib_pthread_pthread_kill+set}" = set; then $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lpthread $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char pthread_kill (); int main () { return pthread_kill (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || $as_test_x conftest$ac_exeext }; then ac_cv_lib_pthread_pthread_kill=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_pthread_pthread_kill=no fi rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:$LINENO: result: $ac_cv_lib_pthread_pthread_kill" >&5 $as_echo "$ac_cv_lib_pthread_pthread_kill" >&6; } if test "x$ac_cv_lib_pthread_pthread_kill" = x""yes; then gl_have_pthread=yes LIBTHREAD=-lpthread LTLIBTHREAD=-lpthread LIBMULTITHREAD=-lpthread LTLIBMULTITHREAD=-lpthread fi if test -z "$gl_have_pthread"; then # For FreeBSD 4. { $as_echo "$as_me:$LINENO: checking for pthread_kill in -lc_r" >&5 $as_echo_n "checking for pthread_kill in -lc_r... " >&6; } if test "${ac_cv_lib_c_r_pthread_kill+set}" = set; then $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lc_r $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char pthread_kill (); int main () { return pthread_kill (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || $as_test_x conftest$ac_exeext }; then ac_cv_lib_c_r_pthread_kill=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_c_r_pthread_kill=no fi rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:$LINENO: result: $ac_cv_lib_c_r_pthread_kill" >&5 $as_echo "$ac_cv_lib_c_r_pthread_kill" >&6; } if test "x$ac_cv_lib_c_r_pthread_kill" = x""yes; then gl_have_pthread=yes LIBTHREAD=-lc_r LTLIBTHREAD=-lc_r LIBMULTITHREAD=-lc_r LTLIBMULTITHREAD=-lc_r fi fi fi if test -n "$gl_have_pthread"; then gl_threads_api=posix cat >>confdefs.h <<\_ACEOF #define USE_POSIX_THREADS 1 _ACEOF if test -n "$LIBMULTITHREAD" || test -n "$LTLIBMULTITHREAD"; then if test $gl_have_weak = yes; then cat >>confdefs.h <<\_ACEOF #define USE_POSIX_THREADS_WEAK 1 _ACEOF LIBTHREAD= LTLIBTHREAD= fi fi fi fi fi if test -z "$gl_have_pthread"; then if test "$gl_use_threads" = yes || test "$gl_use_threads" = solaris; then gl_have_solaristhread= gl_save_LIBS="$LIBS" LIBS="$LIBS -lthread" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #include int main () { thr_self(); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || $as_test_x conftest$ac_exeext }; then gl_have_solaristhread=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS="$gl_save_LIBS" if test -n "$gl_have_solaristhread"; then gl_threads_api=solaris LIBTHREAD=-lthread LTLIBTHREAD=-lthread LIBMULTITHREAD="$LIBTHREAD" LTLIBMULTITHREAD="$LTLIBTHREAD" cat >>confdefs.h <<\_ACEOF #define USE_SOLARIS_THREADS 1 _ACEOF if test $gl_have_weak = yes; then cat >>confdefs.h <<\_ACEOF #define USE_SOLARIS_THREADS_WEAK 1 _ACEOF LIBTHREAD= LTLIBTHREAD= fi fi fi fi if test "$gl_use_threads" = pth; then gl_save_CPPFLAGS="$CPPFLAGS" { $as_echo "$as_me:$LINENO: checking how to link with libpth" >&5 $as_echo_n "checking how to link with libpth... " >&6; } if test "${ac_cv_libpth_libs+set}" = set; then $as_echo_n "(cached) " >&6 else use_additional=yes acl_save_prefix="$prefix" prefix="$acl_final_prefix" acl_save_exec_prefix="$exec_prefix" exec_prefix="$acl_final_exec_prefix" eval additional_includedir=\"$includedir\" eval additional_libdir=\"$libdir\" exec_prefix="$acl_save_exec_prefix" prefix="$acl_save_prefix" # Check whether --with-libpth-prefix was given. if test "${with_libpth_prefix+set}" = set; then withval=$with_libpth_prefix; if test "X$withval" = "Xno"; then use_additional=no else if test "X$withval" = "X"; then acl_save_prefix="$prefix" prefix="$acl_final_prefix" acl_save_exec_prefix="$exec_prefix" exec_prefix="$acl_final_exec_prefix" eval additional_includedir=\"$includedir\" eval additional_libdir=\"$libdir\" exec_prefix="$acl_save_exec_prefix" prefix="$acl_save_prefix" else additional_includedir="$withval/include" additional_libdir="$withval/$acl_libdirstem" if test "$acl_libdirstem2" != "$acl_libdirstem" \ && ! test -d "$withval/$acl_libdirstem"; then additional_libdir="$withval/$acl_libdirstem2" fi fi fi fi LIBPTH= LTLIBPTH= INCPTH= LIBPTH_PREFIX= HAVE_LIBPTH= rpathdirs= ltrpathdirs= names_already_handled= names_next_round='pth ' while test -n "$names_next_round"; do names_this_round="$names_next_round" names_next_round= for name in $names_this_round; do already_handled= for n in $names_already_handled; do if test "$n" = "$name"; then already_handled=yes break fi done if test -z "$already_handled"; then names_already_handled="$names_already_handled $name" uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'` eval value=\"\$HAVE_LIB$uppername\" if test -n "$value"; then if test "$value" = yes; then eval value=\"\$LIB$uppername\" test -z "$value" || LIBPTH="${LIBPTH}${LIBPTH:+ }$value" eval value=\"\$LTLIB$uppername\" test -z "$value" || LTLIBPTH="${LTLIBPTH}${LTLIBPTH:+ }$value" else : fi else found_dir= found_la= found_so= found_a= eval libname=\"$acl_libname_spec\" # typically: libname=lib$name if test -n "$acl_shlibext"; then shrext=".$acl_shlibext" # typically: shrext=.so else shrext= fi if test $use_additional = yes; then dir="$additional_libdir" if test -n "$acl_shlibext"; then if test -f "$dir/$libname$shrext"; then found_dir="$dir" found_so="$dir/$libname$shrext" else if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then ver=`(cd "$dir" && \ for f in "$libname$shrext".*; do echo "$f"; done \ | sed -e "s,^$libname$shrext\\\\.,," \ | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \ | sed 1q ) 2>/dev/null` if test -n "$ver" && test -f "$dir/$libname$shrext.$ver"; then found_dir="$dir" found_so="$dir/$libname$shrext.$ver" fi else eval library_names=\"$acl_library_names_spec\" for f in $library_names; do if test -f "$dir/$f"; then found_dir="$dir" found_so="$dir/$f" break fi done fi fi fi if test "X$found_dir" = "X"; then if test -f "$dir/$libname.$acl_libext"; then found_dir="$dir" found_a="$dir/$libname.$acl_libext" fi fi if test "X$found_dir" != "X"; then if test -f "$dir/$libname.la"; then found_la="$dir/$libname.la" fi fi fi if test "X$found_dir" = "X"; then for x in $LDFLAGS $LTLIBPTH; do acl_save_prefix="$prefix" prefix="$acl_final_prefix" acl_save_exec_prefix="$exec_prefix" exec_prefix="$acl_final_exec_prefix" eval x=\"$x\" exec_prefix="$acl_save_exec_prefix" prefix="$acl_save_prefix" case "$x" in -L*) dir=`echo "X$x" | sed -e 's/^X-L//'` if test -n "$acl_shlibext"; then if test -f "$dir/$libname$shrext"; then found_dir="$dir" found_so="$dir/$libname$shrext" else if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then ver=`(cd "$dir" && \ for f in "$libname$shrext".*; do echo "$f"; done \ | sed -e "s,^$libname$shrext\\\\.,," \ | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \ | sed 1q ) 2>/dev/null` if test -n "$ver" && test -f "$dir/$libname$shrext.$ver"; then found_dir="$dir" found_so="$dir/$libname$shrext.$ver" fi else eval library_names=\"$acl_library_names_spec\" for f in $library_names; do if test -f "$dir/$f"; then found_dir="$dir" found_so="$dir/$f" break fi done fi fi fi if test "X$found_dir" = "X"; then if test -f "$dir/$libname.$acl_libext"; then found_dir="$dir" found_a="$dir/$libname.$acl_libext" fi fi if test "X$found_dir" != "X"; then if test -f "$dir/$libname.la"; then found_la="$dir/$libname.la" fi fi ;; esac if test "X$found_dir" != "X"; then break fi done fi if test "X$found_dir" != "X"; then LTLIBPTH="${LTLIBPTH}${LTLIBPTH:+ }-L$found_dir -l$name" if test "X$found_so" != "X"; then if test "$enable_rpath" = no \ || test "X$found_dir" = "X/usr/$acl_libdirstem" \ || test "X$found_dir" = "X/usr/$acl_libdirstem2"; then LIBPTH="${LIBPTH}${LIBPTH:+ }$found_so" else haveit= for x in $ltrpathdirs; do if test "X$x" = "X$found_dir"; then haveit=yes break fi done if test -z "$haveit"; then ltrpathdirs="$ltrpathdirs $found_dir" fi if test "$acl_hardcode_direct" = yes; then LIBPTH="${LIBPTH}${LIBPTH:+ }$found_so" else if test -n "$acl_hardcode_libdir_flag_spec" && test "$acl_hardcode_minus_L" = no; then LIBPTH="${LIBPTH}${LIBPTH:+ }$found_so" haveit= for x in $rpathdirs; do if test "X$x" = "X$found_dir"; then haveit=yes break fi done if test -z "$haveit"; then rpathdirs="$rpathdirs $found_dir" fi else haveit= for x in $LDFLAGS $LIBPTH; do acl_save_prefix="$prefix" prefix="$acl_final_prefix" acl_save_exec_prefix="$exec_prefix" exec_prefix="$acl_final_exec_prefix" eval x=\"$x\" exec_prefix="$acl_save_exec_prefix" prefix="$acl_save_prefix" if test "X$x" = "X-L$found_dir"; then haveit=yes break fi done if test -z "$haveit"; then LIBPTH="${LIBPTH}${LIBPTH:+ }-L$found_dir" fi if test "$acl_hardcode_minus_L" != no; then LIBPTH="${LIBPTH}${LIBPTH:+ }$found_so" else LIBPTH="${LIBPTH}${LIBPTH:+ }-l$name" fi fi fi fi else if test "X$found_a" != "X"; then LIBPTH="${LIBPTH}${LIBPTH:+ }$found_a" else LIBPTH="${LIBPTH}${LIBPTH:+ }-L$found_dir -l$name" fi fi additional_includedir= case "$found_dir" in */$acl_libdirstem | */$acl_libdirstem/) basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem/"'*$,,'` if test "$name" = 'pth'; then LIBPTH_PREFIX="$basedir" fi additional_includedir="$basedir/include" ;; */$acl_libdirstem2 | */$acl_libdirstem2/) basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem2/"'*$,,'` if test "$name" = 'pth'; then LIBPTH_PREFIX="$basedir" fi additional_includedir="$basedir/include" ;; esac if test "X$additional_includedir" != "X"; then if test "X$additional_includedir" != "X/usr/include"; then haveit= if test "X$additional_includedir" = "X/usr/local/include"; then if test -n "$GCC"; then case $host_os in linux* | gnu* | k*bsd*-gnu) haveit=yes;; esac fi fi if test -z "$haveit"; then for x in $CPPFLAGS $INCPTH; do acl_save_prefix="$prefix" prefix="$acl_final_prefix" acl_save_exec_prefix="$exec_prefix" exec_prefix="$acl_final_exec_prefix" eval x=\"$x\" exec_prefix="$acl_save_exec_prefix" prefix="$acl_save_prefix" if test "X$x" = "X-I$additional_includedir"; then haveit=yes break fi done if test -z "$haveit"; then if test -d "$additional_includedir"; then INCPTH="${INCPTH}${INCPTH:+ }-I$additional_includedir" fi fi fi fi fi if test -n "$found_la"; then save_libdir="$libdir" case "$found_la" in */* | *\\*) . "$found_la" ;; *) . "./$found_la" ;; esac libdir="$save_libdir" for dep in $dependency_libs; do case "$dep" in -L*) additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'` if test "X$additional_libdir" != "X/usr/$acl_libdirstem" \ && test "X$additional_libdir" != "X/usr/$acl_libdirstem2"; then haveit= if test "X$additional_libdir" = "X/usr/local/$acl_libdirstem" \ || test "X$additional_libdir" = "X/usr/local/$acl_libdirstem2"; then if test -n "$GCC"; then case $host_os in linux* | gnu* | k*bsd*-gnu) haveit=yes;; esac fi fi if test -z "$haveit"; then haveit= for x in $LDFLAGS $LIBPTH; do acl_save_prefix="$prefix" prefix="$acl_final_prefix" acl_save_exec_prefix="$exec_prefix" exec_prefix="$acl_final_exec_prefix" eval x=\"$x\" exec_prefix="$acl_save_exec_prefix" prefix="$acl_save_prefix" if test "X$x" = "X-L$additional_libdir"; then haveit=yes break fi done if test -z "$haveit"; then if test -d "$additional_libdir"; then LIBPTH="${LIBPTH}${LIBPTH:+ }-L$additional_libdir" fi fi haveit= for x in $LDFLAGS $LTLIBPTH; do acl_save_prefix="$prefix" prefix="$acl_final_prefix" acl_save_exec_prefix="$exec_prefix" exec_prefix="$acl_final_exec_prefix" eval x=\"$x\" exec_prefix="$acl_save_exec_prefix" prefix="$acl_save_prefix" if test "X$x" = "X-L$additional_libdir"; then haveit=yes break fi done if test -z "$haveit"; then if test -d "$additional_libdir"; then LTLIBPTH="${LTLIBPTH}${LTLIBPTH:+ }-L$additional_libdir" fi fi fi fi ;; -R*) dir=`echo "X$dep" | sed -e 's/^X-R//'` if test "$enable_rpath" != no; then haveit= for x in $rpathdirs; do if test "X$x" = "X$dir"; then haveit=yes break fi done if test -z "$haveit"; then rpathdirs="$rpathdirs $dir" fi haveit= for x in $ltrpathdirs; do if test "X$x" = "X$dir"; then haveit=yes break fi done if test -z "$haveit"; then ltrpathdirs="$ltrpathdirs $dir" fi fi ;; -l*) names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'` ;; *.la) names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'` ;; *) LIBPTH="${LIBPTH}${LIBPTH:+ }$dep" LTLIBPTH="${LTLIBPTH}${LTLIBPTH:+ }$dep" ;; esac done fi else LIBPTH="${LIBPTH}${LIBPTH:+ }-l$name" LTLIBPTH="${LTLIBPTH}${LTLIBPTH:+ }-l$name" fi fi fi done done if test "X$rpathdirs" != "X"; then if test -n "$acl_hardcode_libdir_separator"; then alldirs= for found_dir in $rpathdirs; do alldirs="${alldirs}${alldirs:+$acl_hardcode_libdir_separator}$found_dir" done acl_save_libdir="$libdir" libdir="$alldirs" eval flag=\"$acl_hardcode_libdir_flag_spec\" libdir="$acl_save_libdir" LIBPTH="${LIBPTH}${LIBPTH:+ }$flag" else for found_dir in $rpathdirs; do acl_save_libdir="$libdir" libdir="$found_dir" eval flag=\"$acl_hardcode_libdir_flag_spec\" libdir="$acl_save_libdir" LIBPTH="${LIBPTH}${LIBPTH:+ }$flag" done fi fi if test "X$ltrpathdirs" != "X"; then for found_dir in $ltrpathdirs; do LTLIBPTH="${LTLIBPTH}${LTLIBPTH:+ }-R$found_dir" done fi ac_cv_libpth_libs="$LIBPTH" ac_cv_libpth_ltlibs="$LTLIBPTH" ac_cv_libpth_cppflags="$INCPTH" ac_cv_libpth_prefix="$LIBPTH_PREFIX" fi { $as_echo "$as_me:$LINENO: result: $ac_cv_libpth_libs" >&5 $as_echo "$ac_cv_libpth_libs" >&6; } LIBPTH="$ac_cv_libpth_libs" LTLIBPTH="$ac_cv_libpth_ltlibs" INCPTH="$ac_cv_libpth_cppflags" LIBPTH_PREFIX="$ac_cv_libpth_prefix" for element in $INCPTH; do haveit= for x in $CPPFLAGS; do acl_save_prefix="$prefix" prefix="$acl_final_prefix" acl_save_exec_prefix="$exec_prefix" exec_prefix="$acl_final_exec_prefix" eval x=\"$x\" exec_prefix="$acl_save_exec_prefix" prefix="$acl_save_prefix" if test "X$x" = "X$element"; then haveit=yes break fi done if test -z "$haveit"; then CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element" fi done HAVE_LIBPTH=yes gl_have_pth= gl_save_LIBS="$LIBS" LIBS="$LIBS -lpth" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include int main () { pth_self(); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || $as_test_x conftest$ac_exeext }; then gl_have_pth=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS="$gl_save_LIBS" if test -n "$gl_have_pth"; then gl_threads_api=pth LIBTHREAD="$LIBPTH" LTLIBTHREAD="$LTLIBPTH" LIBMULTITHREAD="$LIBTHREAD" LTLIBMULTITHREAD="$LTLIBTHREAD" cat >>confdefs.h <<\_ACEOF #define USE_PTH_THREADS 1 _ACEOF if test -n "$LIBMULTITHREAD" || test -n "$LTLIBMULTITHREAD"; then if test $gl_have_weak = yes; then cat >>confdefs.h <<\_ACEOF #define USE_PTH_THREADS_WEAK 1 _ACEOF LIBTHREAD= LTLIBTHREAD= fi fi else CPPFLAGS="$gl_save_CPPFLAGS" fi fi if test -z "$gl_have_pthread"; then if test "$gl_use_threads" = yes || test "$gl_use_threads" = win32; then if { case "$host_os" in mingw*) true;; *) false;; esac }; then gl_threads_api=win32 cat >>confdefs.h <<\_ACEOF #define USE_WIN32_THREADS 1 _ACEOF fi fi fi fi { $as_echo "$as_me:$LINENO: checking for multithread API to use" >&5 $as_echo_n "checking for multithread API to use... " >&6; } { $as_echo "$as_me:$LINENO: result: $gl_threads_api" >&5 $as_echo "$gl_threads_api" >&6; } { $as_echo "$as_me:$LINENO: checking for complete errno.h" >&5 $as_echo_n "checking for complete errno.h... " >&6; } if test "${gl_cv_header_errno_h_complete+set}" = set; then $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #if !defined ENOMSG booboo #endif #if !defined EIDRM booboo #endif #if !defined ENOLINK booboo #endif #if !defined EPROTO booboo #endif #if !defined EMULTIHOP booboo #endif #if !defined EBADMSG booboo #endif #if !defined EOVERFLOW booboo #endif #if !defined ENOTSUP booboo #endif #if !defined ESTALE booboo #endif #if !defined ECANCELED booboo #endif _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "booboo" >/dev/null 2>&1; then gl_cv_header_errno_h_complete=no else gl_cv_header_errno_h_complete=yes fi rm -f conftest* fi { $as_echo "$as_me:$LINENO: result: $gl_cv_header_errno_h_complete" >&5 $as_echo "$gl_cv_header_errno_h_complete" >&6; } if test $gl_cv_header_errno_h_complete = yes; then ERRNO_H='' else : if test $gl_cv_have_include_next = yes; then gl_cv_next_errno_h='<'errno.h'>' else { $as_echo "$as_me:$LINENO: checking absolute name of " >&5 $as_echo_n "checking absolute name of ... " >&6; } if test "${gl_cv_next_errno_h+set}" = set; then $as_echo_n "(cached) " >&6 else if test $ac_cv_header_errno_h = yes; then cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF case "$host_os" in aix*) gl_absname_cpp="$ac_cpp -C" ;; *) gl_absname_cpp="$ac_cpp" ;; esac gl_cv_next_errno_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 | sed -n '\#/errno.h#{ s#.*"\(.*/errno.h\)".*#\1# s#^/[^/]#//&# p q }'`'"' else gl_cv_next_errno_h='<'errno.h'>' fi fi { $as_echo "$as_me:$LINENO: result: $gl_cv_next_errno_h" >&5 $as_echo "$gl_cv_next_errno_h" >&6; } fi NEXT_ERRNO_H=$gl_cv_next_errno_h if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next' gl_next_as_first_directive='<'errno.h'>' else # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include' gl_next_as_first_directive=$gl_cv_next_errno_h fi NEXT_AS_FIRST_DIRECTIVE_ERRNO_H=$gl_next_as_first_directive ERRNO_H='errno.h' fi if test -n "$ERRNO_H"; then { $as_echo "$as_me:$LINENO: checking for EMULTIHOP value" >&5 $as_echo_n "checking for EMULTIHOP value... " >&6; } if test "${gl_cv_header_errno_h_EMULTIHOP+set}" = set; then $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #ifdef EMULTIHOP yes #endif _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "yes" >/dev/null 2>&1; then gl_cv_header_errno_h_EMULTIHOP=yes else gl_cv_header_errno_h_EMULTIHOP=no fi rm -f conftest* if test $gl_cv_header_errno_h_EMULTIHOP = no; then cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #define _XOPEN_SOURCE_EXTENDED 1 #include #ifdef EMULTIHOP yes #endif _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "yes" >/dev/null 2>&1; then gl_cv_header_errno_h_EMULTIHOP=hidden fi rm -f conftest* if test $gl_cv_header_errno_h_EMULTIHOP = hidden; then if test "$cross_compiling" = yes; then # Depending upon the size, compute the lo and hi bounds. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #define _XOPEN_SOURCE_EXTENDED 1 #include /* The following two lines are a workaround against an autoconf-2.52 bug. */ #include #include int main () { static int test_array [1 - 2 * !((EMULTIHOP) >= 0)]; test_array [0] = 0 ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_lo=0 ac_mid=0 while :; do cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #define _XOPEN_SOURCE_EXTENDED 1 #include /* The following two lines are a workaround against an autoconf-2.52 bug. */ #include #include int main () { static int test_array [1 - 2 * !((EMULTIHOP) <= $ac_mid)]; test_array [0] = 0 ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_hi=$ac_mid; break else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_lo=`expr $ac_mid + 1` if test $ac_lo -le $ac_mid; then ac_lo= ac_hi= break fi ac_mid=`expr 2 '*' $ac_mid + 1` fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext done else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #define _XOPEN_SOURCE_EXTENDED 1 #include /* The following two lines are a workaround against an autoconf-2.52 bug. */ #include #include int main () { static int test_array [1 - 2 * !((EMULTIHOP) < 0)]; test_array [0] = 0 ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_hi=-1 ac_mid=-1 while :; do cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #define _XOPEN_SOURCE_EXTENDED 1 #include /* The following two lines are a workaround against an autoconf-2.52 bug. */ #include #include int main () { static int test_array [1 - 2 * !((EMULTIHOP) >= $ac_mid)]; test_array [0] = 0 ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_lo=$ac_mid; break else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_hi=`expr '(' $ac_mid ')' - 1` if test $ac_mid -le $ac_hi; then ac_lo= ac_hi= break fi ac_mid=`expr 2 '*' $ac_mid` fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext done else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_lo= ac_hi= fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext # Binary search between lo and hi bounds. while test "x$ac_lo" != "x$ac_hi"; do ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo` cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #define _XOPEN_SOURCE_EXTENDED 1 #include /* The following two lines are a workaround against an autoconf-2.52 bug. */ #include #include int main () { static int test_array [1 - 2 * !((EMULTIHOP) <= $ac_mid)]; test_array [0] = 0 ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_hi=$ac_mid else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_lo=`expr '(' $ac_mid ')' + 1` fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext done case $ac_lo in ?*) gl_cv_header_errno_h_EMULTIHOP=$ac_lo;; '') ;; esac else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #define _XOPEN_SOURCE_EXTENDED 1 #include /* The following two lines are a workaround against an autoconf-2.52 bug. */ #include #include static long int longval () { return EMULTIHOP; } static unsigned long int ulongval () { return EMULTIHOP; } #include #include int main () { FILE *f = fopen ("conftest.val", "w"); if (! f) return 1; if ((EMULTIHOP) < 0) { long int i = longval (); if (i != (EMULTIHOP)) return 1; fprintf (f, "%ld", i); } else { unsigned long int i = ulongval (); if (i != (EMULTIHOP)) return 1; fprintf (f, "%lu", i); } /* Do not output a trailing newline, as this causes \r\n confusion on some platforms. */ return ferror (f) || fclose (f) != 0; ; return 0; } _ACEOF rm -f conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' { (case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_try") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then gl_cv_header_errno_h_EMULTIHOP=`cat conftest.val` else $as_echo "$as_me: program exited with status $ac_status" >&5 $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -rf conftest.dSYM rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi rm -f conftest.val fi fi fi { $as_echo "$as_me:$LINENO: result: $gl_cv_header_errno_h_EMULTIHOP" >&5 $as_echo "$gl_cv_header_errno_h_EMULTIHOP" >&6; } case $gl_cv_header_errno_h_EMULTIHOP in yes | no) EMULTIHOP_HIDDEN=0; EMULTIHOP_VALUE= ;; *) EMULTIHOP_HIDDEN=1; EMULTIHOP_VALUE="$gl_cv_header_errno_h_EMULTIHOP" ;; esac fi if test -n "$ERRNO_H"; then { $as_echo "$as_me:$LINENO: checking for ENOLINK value" >&5 $as_echo_n "checking for ENOLINK value... " >&6; } if test "${gl_cv_header_errno_h_ENOLINK+set}" = set; then $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #ifdef ENOLINK yes #endif _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "yes" >/dev/null 2>&1; then gl_cv_header_errno_h_ENOLINK=yes else gl_cv_header_errno_h_ENOLINK=no fi rm -f conftest* if test $gl_cv_header_errno_h_ENOLINK = no; then cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #define _XOPEN_SOURCE_EXTENDED 1 #include #ifdef ENOLINK yes #endif _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "yes" >/dev/null 2>&1; then gl_cv_header_errno_h_ENOLINK=hidden fi rm -f conftest* if test $gl_cv_header_errno_h_ENOLINK = hidden; then if test "$cross_compiling" = yes; then # Depending upon the size, compute the lo and hi bounds. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #define _XOPEN_SOURCE_EXTENDED 1 #include /* The following two lines are a workaround against an autoconf-2.52 bug. */ #include #include int main () { static int test_array [1 - 2 * !((ENOLINK) >= 0)]; test_array [0] = 0 ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_lo=0 ac_mid=0 while :; do cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #define _XOPEN_SOURCE_EXTENDED 1 #include /* The following two lines are a workaround against an autoconf-2.52 bug. */ #include #include int main () { static int test_array [1 - 2 * !((ENOLINK) <= $ac_mid)]; test_array [0] = 0 ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_hi=$ac_mid; break else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_lo=`expr $ac_mid + 1` if test $ac_lo -le $ac_mid; then ac_lo= ac_hi= break fi ac_mid=`expr 2 '*' $ac_mid + 1` fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext done else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #define _XOPEN_SOURCE_EXTENDED 1 #include /* The following two lines are a workaround against an autoconf-2.52 bug. */ #include #include int main () { static int test_array [1 - 2 * !((ENOLINK) < 0)]; test_array [0] = 0 ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_hi=-1 ac_mid=-1 while :; do cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #define _XOPEN_SOURCE_EXTENDED 1 #include /* The following two lines are a workaround against an autoconf-2.52 bug. */ #include #include int main () { static int test_array [1 - 2 * !((ENOLINK) >= $ac_mid)]; test_array [0] = 0 ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_lo=$ac_mid; break else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_hi=`expr '(' $ac_mid ')' - 1` if test $ac_mid -le $ac_hi; then ac_lo= ac_hi= break fi ac_mid=`expr 2 '*' $ac_mid` fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext done else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_lo= ac_hi= fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext # Binary search between lo and hi bounds. while test "x$ac_lo" != "x$ac_hi"; do ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo` cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #define _XOPEN_SOURCE_EXTENDED 1 #include /* The following two lines are a workaround against an autoconf-2.52 bug. */ #include #include int main () { static int test_array [1 - 2 * !((ENOLINK) <= $ac_mid)]; test_array [0] = 0 ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_hi=$ac_mid else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_lo=`expr '(' $ac_mid ')' + 1` fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext done case $ac_lo in ?*) gl_cv_header_errno_h_ENOLINK=$ac_lo;; '') ;; esac else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #define _XOPEN_SOURCE_EXTENDED 1 #include /* The following two lines are a workaround against an autoconf-2.52 bug. */ #include #include static long int longval () { return ENOLINK; } static unsigned long int ulongval () { return ENOLINK; } #include #include int main () { FILE *f = fopen ("conftest.val", "w"); if (! f) return 1; if ((ENOLINK) < 0) { long int i = longval (); if (i != (ENOLINK)) return 1; fprintf (f, "%ld", i); } else { unsigned long int i = ulongval (); if (i != (ENOLINK)) return 1; fprintf (f, "%lu", i); } /* Do not output a trailing newline, as this causes \r\n confusion on some platforms. */ return ferror (f) || fclose (f) != 0; ; return 0; } _ACEOF rm -f conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' { (case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_try") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then gl_cv_header_errno_h_ENOLINK=`cat conftest.val` else $as_echo "$as_me: program exited with status $ac_status" >&5 $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -rf conftest.dSYM rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi rm -f conftest.val fi fi fi { $as_echo "$as_me:$LINENO: result: $gl_cv_header_errno_h_ENOLINK" >&5 $as_echo "$gl_cv_header_errno_h_ENOLINK" >&6; } case $gl_cv_header_errno_h_ENOLINK in yes | no) ENOLINK_HIDDEN=0; ENOLINK_VALUE= ;; *) ENOLINK_HIDDEN=1; ENOLINK_VALUE="$gl_cv_header_errno_h_ENOLINK" ;; esac fi if test -n "$ERRNO_H"; then { $as_echo "$as_me:$LINENO: checking for EOVERFLOW value" >&5 $as_echo_n "checking for EOVERFLOW value... " >&6; } if test "${gl_cv_header_errno_h_EOVERFLOW+set}" = set; then $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #ifdef EOVERFLOW yes #endif _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "yes" >/dev/null 2>&1; then gl_cv_header_errno_h_EOVERFLOW=yes else gl_cv_header_errno_h_EOVERFLOW=no fi rm -f conftest* if test $gl_cv_header_errno_h_EOVERFLOW = no; then cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #define _XOPEN_SOURCE_EXTENDED 1 #include #ifdef EOVERFLOW yes #endif _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "yes" >/dev/null 2>&1; then gl_cv_header_errno_h_EOVERFLOW=hidden fi rm -f conftest* if test $gl_cv_header_errno_h_EOVERFLOW = hidden; then if test "$cross_compiling" = yes; then # Depending upon the size, compute the lo and hi bounds. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #define _XOPEN_SOURCE_EXTENDED 1 #include /* The following two lines are a workaround against an autoconf-2.52 bug. */ #include #include int main () { static int test_array [1 - 2 * !((EOVERFLOW) >= 0)]; test_array [0] = 0 ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_lo=0 ac_mid=0 while :; do cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #define _XOPEN_SOURCE_EXTENDED 1 #include /* The following two lines are a workaround against an autoconf-2.52 bug. */ #include #include int main () { static int test_array [1 - 2 * !((EOVERFLOW) <= $ac_mid)]; test_array [0] = 0 ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_hi=$ac_mid; break else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_lo=`expr $ac_mid + 1` if test $ac_lo -le $ac_mid; then ac_lo= ac_hi= break fi ac_mid=`expr 2 '*' $ac_mid + 1` fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext done else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #define _XOPEN_SOURCE_EXTENDED 1 #include /* The following two lines are a workaround against an autoconf-2.52 bug. */ #include #include int main () { static int test_array [1 - 2 * !((EOVERFLOW) < 0)]; test_array [0] = 0 ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_hi=-1 ac_mid=-1 while :; do cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #define _XOPEN_SOURCE_EXTENDED 1 #include /* The following two lines are a workaround against an autoconf-2.52 bug. */ #include #include int main () { static int test_array [1 - 2 * !((EOVERFLOW) >= $ac_mid)]; test_array [0] = 0 ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_lo=$ac_mid; break else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_hi=`expr '(' $ac_mid ')' - 1` if test $ac_mid -le $ac_hi; then ac_lo= ac_hi= break fi ac_mid=`expr 2 '*' $ac_mid` fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext done else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_lo= ac_hi= fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext # Binary search between lo and hi bounds. while test "x$ac_lo" != "x$ac_hi"; do ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo` cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #define _XOPEN_SOURCE_EXTENDED 1 #include /* The following two lines are a workaround against an autoconf-2.52 bug. */ #include #include int main () { static int test_array [1 - 2 * !((EOVERFLOW) <= $ac_mid)]; test_array [0] = 0 ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_hi=$ac_mid else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_lo=`expr '(' $ac_mid ')' + 1` fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext done case $ac_lo in ?*) gl_cv_header_errno_h_EOVERFLOW=$ac_lo;; '') ;; esac else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #define _XOPEN_SOURCE_EXTENDED 1 #include /* The following two lines are a workaround against an autoconf-2.52 bug. */ #include #include static long int longval () { return EOVERFLOW; } static unsigned long int ulongval () { return EOVERFLOW; } #include #include int main () { FILE *f = fopen ("conftest.val", "w"); if (! f) return 1; if ((EOVERFLOW) < 0) { long int i = longval (); if (i != (EOVERFLOW)) return 1; fprintf (f, "%ld", i); } else { unsigned long int i = ulongval (); if (i != (EOVERFLOW)) return 1; fprintf (f, "%lu", i); } /* Do not output a trailing newline, as this causes \r\n confusion on some platforms. */ return ferror (f) || fclose (f) != 0; ; return 0; } _ACEOF rm -f conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' { (case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_try") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then gl_cv_header_errno_h_EOVERFLOW=`cat conftest.val` else $as_echo "$as_me: program exited with status $ac_status" >&5 $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -rf conftest.dSYM rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi rm -f conftest.val fi fi fi { $as_echo "$as_me:$LINENO: result: $gl_cv_header_errno_h_EOVERFLOW" >&5 $as_echo "$gl_cv_header_errno_h_EOVERFLOW" >&6; } case $gl_cv_header_errno_h_EOVERFLOW in yes | no) EOVERFLOW_HIDDEN=0; EOVERFLOW_VALUE= ;; *) EOVERFLOW_HIDDEN=1; EOVERFLOW_VALUE="$gl_cv_header_errno_h_EOVERFLOW" ;; esac fi GNULIB_ACOSL=0; GNULIB_ASINL=0; GNULIB_ATANL=0; GNULIB_CEILF=0; GNULIB_CEILL=0; GNULIB_COSL=0; GNULIB_EXPL=0; GNULIB_FLOORF=0; GNULIB_FLOORL=0; GNULIB_FREXP=0; GNULIB_FREXPL=0; GNULIB_ISFINITE=0; GNULIB_ISINF=0; GNULIB_ISNAN=0; GNULIB_ISNANF=0; GNULIB_ISNAND=0; GNULIB_ISNANL=0; GNULIB_LDEXPL=0; GNULIB_LOGL=0; GNULIB_ROUND=0; GNULIB_ROUNDF=0; GNULIB_ROUNDL=0; GNULIB_SIGNBIT=0; GNULIB_SINL=0; GNULIB_SQRTL=0; GNULIB_TANL=0; GNULIB_TRUNC=0; GNULIB_TRUNCF=0; GNULIB_TRUNCL=0; HAVE_ACOSL=1; HAVE_ASINL=1; HAVE_ATANL=1; HAVE_COSL=1; HAVE_EXPL=1; HAVE_ISNANF=1; HAVE_ISNAND=1; HAVE_ISNANL=1; HAVE_LOGL=1; HAVE_SINL=1; HAVE_SQRTL=1; HAVE_TANL=1; HAVE_DECL_ACOSL=1; HAVE_DECL_ASINL=1; HAVE_DECL_ATANL=1; HAVE_DECL_COSL=1; HAVE_DECL_EXPL=1; HAVE_DECL_FREXPL=1; HAVE_DECL_LDEXPL=1; HAVE_DECL_LOGL=1; HAVE_DECL_SINL=1; HAVE_DECL_SQRTL=1; HAVE_DECL_TANL=1; HAVE_DECL_TRUNC=1; HAVE_DECL_TRUNCF=1; REPLACE_CEILF=0; REPLACE_CEILL=0; REPLACE_FLOORF=0; REPLACE_FLOORL=0; REPLACE_FREXP=0; REPLACE_FREXPL=0; REPLACE_HUGE_VAL=0; REPLACE_ISFINITE=0; REPLACE_ISINF=0; REPLACE_ISNAN=0; REPLACE_LDEXPL=0; REPLACE_NAN=0; REPLACE_ROUND=0; REPLACE_ROUNDF=0; REPLACE_ROUNDL=0; REPLACE_SIGNBIT=0; REPLACE_SIGNBIT_USING_GCC=0; REPLACE_TRUNCL=0; { $as_echo "$as_me:$LINENO: checking whether stdin defaults to large file offsets" >&5 $as_echo_n "checking whether stdin defaults to large file offsets... " >&6; } if test "${gl_cv_var_stdin_large_offset+set}" = set; then $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include int main () { #if defined __SL64 && defined __SCLE /* cygwin */ /* Cygwin 1.5.24 and earlier fail to put stdin in 64-bit mode, making fseeko/ftello needlessly fail. This bug was fixed in 1.5.25, and it is easier to do a version check than building a runtime test. */ # include # if CYGWIN_VERSION_DLL_COMBINED < CYGWIN_VERSION_DLL_MAKE_COMBINED (1005, 25) choke me # endif #endif ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || $as_test_x conftest$ac_exeext }; then gl_cv_var_stdin_large_offset=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 gl_cv_var_stdin_large_offset=no fi rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi { $as_echo "$as_me:$LINENO: result: $gl_cv_var_stdin_large_offset" >&5 $as_echo "$gl_cv_var_stdin_large_offset" >&6; } GNULIB_GETADDRINFO=0; HAVE_STRUCT_ADDRINFO=1; HAVE_DECL_FREEADDRINFO=1; HAVE_DECL_GAI_STRERROR=1; HAVE_DECL_GETADDRINFO=1; HAVE_DECL_GETNAMEINFO=1; : : if test $gl_cv_have_include_next = yes; then gl_cv_next_netdb_h='<'netdb.h'>' else { $as_echo "$as_me:$LINENO: checking absolute name of " >&5 $as_echo_n "checking absolute name of ... " >&6; } if test "${gl_cv_next_netdb_h+set}" = set; then $as_echo_n "(cached) " >&6 else if test $ac_cv_header_netdb_h = yes; then cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF case "$host_os" in aix*) gl_absname_cpp="$ac_cpp -C" ;; *) gl_absname_cpp="$ac_cpp" ;; esac gl_cv_next_netdb_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 | sed -n '\#/netdb.h#{ s#.*"\(.*/netdb.h\)".*#\1# s#^/[^/]#//&# p q }'`'"' else gl_cv_next_netdb_h='<'netdb.h'>' fi fi { $as_echo "$as_me:$LINENO: result: $gl_cv_next_netdb_h" >&5 $as_echo "$gl_cv_next_netdb_h" >&6; } fi NEXT_NETDB_H=$gl_cv_next_netdb_h if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next' gl_next_as_first_directive='<'netdb.h'>' else # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include' gl_next_as_first_directive=$gl_cv_next_netdb_h fi NEXT_AS_FIRST_DIRECTIVE_NETDB_H=$gl_next_as_first_directive if test $ac_cv_header_netdb_h = yes; then cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include struct addrinfo a; int b = EAI_OVERFLOW; int c = AI_NUMERICSERV; int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then NETDB_H='' else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 NETDB_H='netdb.h' fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext HAVE_NETDB_H=1 else NETDB_H='netdb.h' HAVE_NETDB_H=0 fi HOSTENT_LIB= gl_saved_libs="$LIBS" { $as_echo "$as_me:$LINENO: checking for library containing gethostbyname" >&5 $as_echo_n "checking for library containing gethostbyname... " >&6; } if test "${ac_cv_search_gethostbyname+set}" = set; then $as_echo_n "(cached) " >&6 else ac_func_search_save_LIBS=$LIBS cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char gethostbyname (); int main () { return gethostbyname (); ; return 0; } _ACEOF for ac_lib in '' nsl network net; do if test -z "$ac_lib"; then ac_res="none required" else ac_res=-l$ac_lib LIBS="-l$ac_lib $ac_func_search_save_LIBS" fi rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || $as_test_x conftest$ac_exeext }; then ac_cv_search_gethostbyname=$ac_res else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext if test "${ac_cv_search_gethostbyname+set}" = set; then break fi done if test "${ac_cv_search_gethostbyname+set}" = set; then : else ac_cv_search_gethostbyname=no fi rm conftest.$ac_ext LIBS=$ac_func_search_save_LIBS fi { $as_echo "$as_me:$LINENO: result: $ac_cv_search_gethostbyname" >&5 $as_echo "$ac_cv_search_gethostbyname" >&6; } ac_res=$ac_cv_search_gethostbyname if test "$ac_res" != no; then test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" if test "$ac_cv_search_gethostbyname" != "none required"; then HOSTENT_LIB="$ac_cv_search_gethostbyname" fi fi LIBS="$gl_saved_libs" if test -z "$HOSTENT_LIB"; then for ac_func in gethostbyname do as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` { $as_echo "$as_me:$LINENO: checking for $ac_func" >&5 $as_echo_n "checking for $ac_func... " >&6; } if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Define $ac_func to an innocuous variant, in case declares $ac_func. For example, HP-UX 11i declares gettimeofday. */ #define $ac_func innocuous_$ac_func /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $ac_func (); below. Prefer to if __STDC__ is defined, since exists even on freestanding compilers. */ #ifdef __STDC__ # include #else # include #endif #undef $ac_func /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char $ac_func (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined __stub_$ac_func || defined __stub___$ac_func choke me #endif int main () { return $ac_func (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || $as_test_x conftest$ac_exeext }; then eval "$as_ac_var=yes" else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 eval "$as_ac_var=no" fi rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi ac_res=`eval 'as_val=${'$as_ac_var'} $as_echo "$as_val"'` { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } as_val=`eval 'as_val=${'$as_ac_var'} $as_echo "$as_val"'` if test "x$as_val" = x""yes; then cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF else { $as_echo "$as_me:$LINENO: checking for gethostbyname in winsock2.h and -lws2_32" >&5 $as_echo_n "checking for gethostbyname in winsock2.h and -lws2_32... " >&6; } if test "${gl_cv_w32_gethostbyname+set}" = set; then $as_echo_n "(cached) " >&6 else gl_cv_w32_gethostbyname=no gl_save_LIBS="$LIBS" LIBS="$LIBS -lws2_32" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #ifdef HAVE_WINSOCK2_H #include #endif #include int main () { gethostbyname(NULL); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || $as_test_x conftest$ac_exeext }; then gl_cv_w32_gethostbyname=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS="$gl_save_LIBS" fi { $as_echo "$as_me:$LINENO: result: $gl_cv_w32_gethostbyname" >&5 $as_echo "$gl_cv_w32_gethostbyname" >&6; } if test "$gl_cv_w32_gethostbyname" = "yes"; then HOSTENT_LIB="-lws2_32" fi fi done fi SERVENT_LIB= gl_saved_libs="$LIBS" { $as_echo "$as_me:$LINENO: checking for library containing getservbyname" >&5 $as_echo_n "checking for library containing getservbyname... " >&6; } if test "${ac_cv_search_getservbyname+set}" = set; then $as_echo_n "(cached) " >&6 else ac_func_search_save_LIBS=$LIBS cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char getservbyname (); int main () { return getservbyname (); ; return 0; } _ACEOF for ac_lib in '' socket network net; do if test -z "$ac_lib"; then ac_res="none required" else ac_res=-l$ac_lib LIBS="-l$ac_lib $ac_func_search_save_LIBS" fi rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || $as_test_x conftest$ac_exeext }; then ac_cv_search_getservbyname=$ac_res else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext if test "${ac_cv_search_getservbyname+set}" = set; then break fi done if test "${ac_cv_search_getservbyname+set}" = set; then : else ac_cv_search_getservbyname=no fi rm conftest.$ac_ext LIBS=$ac_func_search_save_LIBS fi { $as_echo "$as_me:$LINENO: result: $ac_cv_search_getservbyname" >&5 $as_echo "$ac_cv_search_getservbyname" >&6; } ac_res=$ac_cv_search_getservbyname if test "$ac_res" != no; then test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" if test "$ac_cv_search_getservbyname" != "none required"; then SERVENT_LIB="$ac_cv_search_getservbyname" fi fi LIBS="$gl_saved_libs" if test -z "$SERVENT_LIB"; then for ac_func in getservbyname do as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` { $as_echo "$as_me:$LINENO: checking for $ac_func" >&5 $as_echo_n "checking for $ac_func... " >&6; } if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Define $ac_func to an innocuous variant, in case declares $ac_func. For example, HP-UX 11i declares gettimeofday. */ #define $ac_func innocuous_$ac_func /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $ac_func (); below. Prefer to if __STDC__ is defined, since exists even on freestanding compilers. */ #ifdef __STDC__ # include #else # include #endif #undef $ac_func /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char $ac_func (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined __stub_$ac_func || defined __stub___$ac_func choke me #endif int main () { return $ac_func (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || $as_test_x conftest$ac_exeext }; then eval "$as_ac_var=yes" else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 eval "$as_ac_var=no" fi rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi ac_res=`eval 'as_val=${'$as_ac_var'} $as_echo "$as_val"'` { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } as_val=`eval 'as_val=${'$as_ac_var'} $as_echo "$as_val"'` if test "x$as_val" = x""yes; then cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF else { $as_echo "$as_me:$LINENO: checking for getservbyname in winsock2.h and -lws2_32" >&5 $as_echo_n "checking for getservbyname in winsock2.h and -lws2_32... " >&6; } if test "${gl_cv_w32_getservbyname+set}" = set; then $as_echo_n "(cached) " >&6 else gl_cv_w32_getservbyname=no gl_save_LIBS="$LIBS" LIBS="$LIBS -lws2_32" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #ifdef HAVE_WINSOCK2_H #include #endif #include int main () { getservbyname(NULL,NULL); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || $as_test_x conftest$ac_exeext }; then gl_cv_w32_getservbyname=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS="$gl_save_LIBS" fi { $as_echo "$as_me:$LINENO: result: $gl_cv_w32_getservbyname" >&5 $as_echo "$gl_cv_w32_getservbyname" >&6; } if test "$gl_cv_w32_getservbyname" = "yes"; then SERVENT_LIB="-lws2_32" fi fi done fi : { $as_echo "$as_me:$LINENO: checking for IPv4 sockets" >&5 $as_echo_n "checking for IPv4 sockets... " >&6; } if test "${gl_cv_socket_ipv4+set}" = set; then $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #ifdef HAVE_SYS_SOCKET_H #include #endif #ifdef HAVE_NETINET_IN_H #include #endif #ifdef HAVE_WINSOCK2_H #include #endif int main () { int x = AF_INET; struct in_addr y; struct sockaddr_in z; if (&x && &y && &z) return 0; ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then gl_cv_socket_ipv4=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 gl_cv_socket_ipv4=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:$LINENO: result: $gl_cv_socket_ipv4" >&5 $as_echo "$gl_cv_socket_ipv4" >&6; } if test $gl_cv_socket_ipv4 = yes; then cat >>confdefs.h <<\_ACEOF #define HAVE_IPV4 1 _ACEOF fi { $as_echo "$as_me:$LINENO: checking for IPv6 sockets" >&5 $as_echo_n "checking for IPv6 sockets... " >&6; } if test "${gl_cv_socket_ipv6+set}" = set; then $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #ifdef HAVE_SYS_SOCKET_H #include #endif #ifdef HAVE_NETINET_IN_H #include #endif #ifdef HAVE_WINSOCK2_H #include #endif int main () { int x = AF_INET6; struct in6_addr y; struct sockaddr_in6 z; if (&x && &y && &z) return 0; ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then gl_cv_socket_ipv6=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 gl_cv_socket_ipv6=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:$LINENO: result: $gl_cv_socket_ipv6" >&5 $as_echo "$gl_cv_socket_ipv6" >&6; } if test $gl_cv_socket_ipv6 = yes; then cat >>confdefs.h <<\_ACEOF #define HAVE_IPV6 1 _ACEOF fi { $as_echo "$as_me:$LINENO: checking for C/C++ restrict keyword" >&5 $as_echo_n "checking for C/C++ restrict keyword... " >&6; } if test "${ac_cv_c_restrict+set}" = set; then $as_echo_n "(cached) " >&6 else ac_cv_c_restrict=no # The order here caters to the fact that C++ does not require restrict. for ac_kw in __restrict __restrict__ _Restrict restrict; do cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ typedef int * int_ptr; int foo (int_ptr $ac_kw ip) { return ip[0]; } int main () { int s[1]; int * $ac_kw t = s; t[0] = 0; return foo(t) ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_cv_c_restrict=$ac_kw else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext test "$ac_cv_c_restrict" != no && break done fi { $as_echo "$as_me:$LINENO: result: $ac_cv_c_restrict" >&5 $as_echo "$ac_cv_c_restrict" >&6; } case $ac_cv_c_restrict in restrict) ;; no) cat >>confdefs.h <<\_ACEOF #define restrict /**/ _ACEOF ;; *) cat >>confdefs.h <<_ACEOF #define restrict $ac_cv_c_restrict _ACEOF ;; esac : gl_save_LIBS=$LIBS { $as_echo "$as_me:$LINENO: checking for library containing inet_ntop" >&5 $as_echo_n "checking for library containing inet_ntop... " >&6; } if test "${ac_cv_search_inet_ntop+set}" = set; then $as_echo_n "(cached) " >&6 else ac_func_search_save_LIBS=$LIBS cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char inet_ntop (); int main () { return inet_ntop (); ; return 0; } _ACEOF for ac_lib in '' nsl; do if test -z "$ac_lib"; then ac_res="none required" else ac_res=-l$ac_lib LIBS="-l$ac_lib $ac_func_search_save_LIBS" fi rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || $as_test_x conftest$ac_exeext }; then ac_cv_search_inet_ntop=$ac_res else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext if test "${ac_cv_search_inet_ntop+set}" = set; then break fi done if test "${ac_cv_search_inet_ntop+set}" = set; then : else ac_cv_search_inet_ntop=no fi rm conftest.$ac_ext LIBS=$ac_func_search_save_LIBS fi { $as_echo "$as_me:$LINENO: result: $ac_cv_search_inet_ntop" >&5 $as_echo "$ac_cv_search_inet_ntop" >&6; } ac_res=$ac_cv_search_inet_ntop if test "$ac_res" != no; then test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" else for ac_func in inet_ntop do as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` { $as_echo "$as_me:$LINENO: checking for $ac_func" >&5 $as_echo_n "checking for $ac_func... " >&6; } if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Define $ac_func to an innocuous variant, in case declares $ac_func. For example, HP-UX 11i declares gettimeofday. */ #define $ac_func innocuous_$ac_func /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $ac_func (); below. Prefer to if __STDC__ is defined, since exists even on freestanding compilers. */ #ifdef __STDC__ # include #else # include #endif #undef $ac_func /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char $ac_func (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined __stub_$ac_func || defined __stub___$ac_func choke me #endif int main () { return $ac_func (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || $as_test_x conftest$ac_exeext }; then eval "$as_ac_var=yes" else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 eval "$as_ac_var=no" fi rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi ac_res=`eval 'as_val=${'$as_ac_var'} $as_echo "$as_val"'` { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } as_val=`eval 'as_val=${'$as_ac_var'} $as_echo "$as_val"'` if test "x$as_val" = x""yes; then cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF else gl_LIBOBJS="$gl_LIBOBJS $ac_func.$ac_objext" fi done fi LIBS=$gl_save_LIBS INET_NTOP_LIB= if test "$ac_cv_search_inet_ntop" != "no" && test "$ac_cv_search_inet_ntop" != "none required"; then INET_NTOP_LIB="$ac_cv_search_inet_ntop" fi { $as_echo "$as_me:$LINENO: checking whether inet_ntop is declared" >&5 $as_echo_n "checking whether inet_ntop is declared... " >&6; } if test "${ac_cv_have_decl_inet_ntop+set}" = set; then $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include int main () { #ifndef inet_ntop (void) inet_ntop; #endif ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_cv_have_decl_inet_ntop=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_have_decl_inet_ntop=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:$LINENO: result: $ac_cv_have_decl_inet_ntop" >&5 $as_echo "$ac_cv_have_decl_inet_ntop" >&6; } if test "x$ac_cv_have_decl_inet_ntop" = x""yes; then cat >>confdefs.h <<_ACEOF #define HAVE_DECL_INET_NTOP 1 _ACEOF else cat >>confdefs.h <<_ACEOF #define HAVE_DECL_INET_NTOP 0 _ACEOF fi if test $ac_cv_have_decl_inet_ntop = no; then HAVE_DECL_INET_NTOP=0 fi { $as_echo "$as_me:$LINENO: checking whether getdelim is declared" >&5 $as_echo_n "checking whether getdelim is declared... " >&6; } if test "${ac_cv_have_decl_getdelim+set}" = set; then $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default int main () { #ifndef getdelim (void) getdelim; #endif ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_cv_have_decl_getdelim=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_have_decl_getdelim=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:$LINENO: result: $ac_cv_have_decl_getdelim" >&5 $as_echo "$ac_cv_have_decl_getdelim" >&6; } if test "x$ac_cv_have_decl_getdelim" = x""yes; then cat >>confdefs.h <<_ACEOF #define HAVE_DECL_GETDELIM 1 _ACEOF else cat >>confdefs.h <<_ACEOF #define HAVE_DECL_GETDELIM 0 _ACEOF fi { $as_echo "$as_me:$LINENO: checking whether getline is declared" >&5 $as_echo_n "checking whether getline is declared... " >&6; } if test "${ac_cv_have_decl_getline+set}" = set; then $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default int main () { #ifndef getline (void) getline; #endif ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_cv_have_decl_getline=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_have_decl_getline=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:$LINENO: result: $ac_cv_have_decl_getline" >&5 $as_echo "$ac_cv_have_decl_getline" >&6; } if test "x$ac_cv_have_decl_getline" = x""yes; then cat >>confdefs.h <<_ACEOF #define HAVE_DECL_GETLINE 1 _ACEOF else cat >>confdefs.h <<_ACEOF #define HAVE_DECL_GETLINE 0 _ACEOF fi { $as_echo "$as_me:$LINENO: checking whether getpass is declared" >&5 $as_echo_n "checking whether getpass is declared... " >&6; } if test "${ac_cv_have_decl_getpass+set}" = set; then $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default int main () { #ifndef getpass (void) getpass; #endif ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_cv_have_decl_getpass=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_have_decl_getpass=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:$LINENO: result: $ac_cv_have_decl_getpass" >&5 $as_echo "$ac_cv_have_decl_getpass" >&6; } if test "x$ac_cv_have_decl_getpass" = x""yes; then cat >>confdefs.h <<_ACEOF #define HAVE_DECL_GETPASS 1 _ACEOF else cat >>confdefs.h <<_ACEOF #define HAVE_DECL_GETPASS 0 _ACEOF fi { $as_echo "$as_me:$LINENO: checking whether fflush_unlocked is declared" >&5 $as_echo_n "checking whether fflush_unlocked is declared... " >&6; } if test "${ac_cv_have_decl_fflush_unlocked+set}" = set; then $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default int main () { #ifndef fflush_unlocked (void) fflush_unlocked; #endif ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_cv_have_decl_fflush_unlocked=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_have_decl_fflush_unlocked=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:$LINENO: result: $ac_cv_have_decl_fflush_unlocked" >&5 $as_echo "$ac_cv_have_decl_fflush_unlocked" >&6; } if test "x$ac_cv_have_decl_fflush_unlocked" = x""yes; then cat >>confdefs.h <<_ACEOF #define HAVE_DECL_FFLUSH_UNLOCKED 1 _ACEOF else cat >>confdefs.h <<_ACEOF #define HAVE_DECL_FFLUSH_UNLOCKED 0 _ACEOF fi { $as_echo "$as_me:$LINENO: checking whether flockfile is declared" >&5 $as_echo_n "checking whether flockfile is declared... " >&6; } if test "${ac_cv_have_decl_flockfile+set}" = set; then $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default int main () { #ifndef flockfile (void) flockfile; #endif ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_cv_have_decl_flockfile=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_have_decl_flockfile=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:$LINENO: result: $ac_cv_have_decl_flockfile" >&5 $as_echo "$ac_cv_have_decl_flockfile" >&6; } if test "x$ac_cv_have_decl_flockfile" = x""yes; then cat >>confdefs.h <<_ACEOF #define HAVE_DECL_FLOCKFILE 1 _ACEOF else cat >>confdefs.h <<_ACEOF #define HAVE_DECL_FLOCKFILE 0 _ACEOF fi { $as_echo "$as_me:$LINENO: checking whether fputs_unlocked is declared" >&5 $as_echo_n "checking whether fputs_unlocked is declared... " >&6; } if test "${ac_cv_have_decl_fputs_unlocked+set}" = set; then $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default int main () { #ifndef fputs_unlocked (void) fputs_unlocked; #endif ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_cv_have_decl_fputs_unlocked=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_have_decl_fputs_unlocked=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:$LINENO: result: $ac_cv_have_decl_fputs_unlocked" >&5 $as_echo "$ac_cv_have_decl_fputs_unlocked" >&6; } if test "x$ac_cv_have_decl_fputs_unlocked" = x""yes; then cat >>confdefs.h <<_ACEOF #define HAVE_DECL_FPUTS_UNLOCKED 1 _ACEOF else cat >>confdefs.h <<_ACEOF #define HAVE_DECL_FPUTS_UNLOCKED 0 _ACEOF fi { $as_echo "$as_me:$LINENO: checking whether funlockfile is declared" >&5 $as_echo_n "checking whether funlockfile is declared... " >&6; } if test "${ac_cv_have_decl_funlockfile+set}" = set; then $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default int main () { #ifndef funlockfile (void) funlockfile; #endif ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_cv_have_decl_funlockfile=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_have_decl_funlockfile=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:$LINENO: result: $ac_cv_have_decl_funlockfile" >&5 $as_echo "$ac_cv_have_decl_funlockfile" >&6; } if test "x$ac_cv_have_decl_funlockfile" = x""yes; then cat >>confdefs.h <<_ACEOF #define HAVE_DECL_FUNLOCKFILE 1 _ACEOF else cat >>confdefs.h <<_ACEOF #define HAVE_DECL_FUNLOCKFILE 0 _ACEOF fi { $as_echo "$as_me:$LINENO: checking whether putc_unlocked is declared" >&5 $as_echo_n "checking whether putc_unlocked is declared... " >&6; } if test "${ac_cv_have_decl_putc_unlocked+set}" = set; then $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default int main () { #ifndef putc_unlocked (void) putc_unlocked; #endif ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_cv_have_decl_putc_unlocked=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_have_decl_putc_unlocked=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:$LINENO: result: $ac_cv_have_decl_putc_unlocked" >&5 $as_echo "$ac_cv_have_decl_putc_unlocked" >&6; } if test "x$ac_cv_have_decl_putc_unlocked" = x""yes; then cat >>confdefs.h <<_ACEOF #define HAVE_DECL_PUTC_UNLOCKED 1 _ACEOF else cat >>confdefs.h <<_ACEOF #define HAVE_DECL_PUTC_UNLOCKED 0 _ACEOF fi GNULIB_GETTIMEOFDAY=0; HAVE_STRUCT_TIMEVAL=1; HAVE_SYS_TIME_H=1; REPLACE_GETTIMEOFDAY=0; : : if test $gl_cv_have_include_next = yes; then gl_cv_next_sys_time_h='<'sys/time.h'>' else { $as_echo "$as_me:$LINENO: checking absolute name of " >&5 $as_echo_n "checking absolute name of ... " >&6; } if test "${gl_cv_next_sys_time_h+set}" = set; then $as_echo_n "(cached) " >&6 else if test $ac_cv_header_sys_time_h = yes; then cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF case "$host_os" in aix*) gl_absname_cpp="$ac_cpp -C" ;; *) gl_absname_cpp="$ac_cpp" ;; esac gl_cv_next_sys_time_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 | sed -n '\#/sys/time.h#{ s#.*"\(.*/sys/time.h\)".*#\1# s#^/[^/]#//&# p q }'`'"' else gl_cv_next_sys_time_h='<'sys/time.h'>' fi fi { $as_echo "$as_me:$LINENO: result: $gl_cv_next_sys_time_h" >&5 $as_echo "$gl_cv_next_sys_time_h" >&6; } fi NEXT_SYS_TIME_H=$gl_cv_next_sys_time_h if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next' gl_next_as_first_directive='<'sys/time.h'>' else # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include' gl_next_as_first_directive=$gl_cv_next_sys_time_h fi NEXT_AS_FIRST_DIRECTIVE_SYS_TIME_H=$gl_next_as_first_directive if test $ac_cv_header_sys_time_h != yes; then HAVE_SYS_TIME_H=0 fi { $as_echo "$as_me:$LINENO: checking for struct timeval" >&5 $as_echo_n "checking for struct timeval... " >&6; } if test "${gl_cv_sys_struct_timeval+set}" = set; then $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #if HAVE_SYS_TIME_H #include #endif #include int main () { static struct timeval x; x.tv_sec = x.tv_usec; ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then gl_cv_sys_struct_timeval=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 gl_cv_sys_struct_timeval=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:$LINENO: result: $gl_cv_sys_struct_timeval" >&5 $as_echo "$gl_cv_sys_struct_timeval" >&6; } if test $gl_cv_sys_struct_timeval != yes; then HAVE_STRUCT_TIMEVAL=0 fi for gl_func in gettimeofday; do as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh` { $as_echo "$as_me:$LINENO: checking whether $gl_func is declared without a macro" >&5 $as_echo_n "checking whether $gl_func is declared without a macro... " >&6; } if { as_var=$as_gl_Symbol; eval "test \"\${$as_var+set}\" = set"; }; then $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #if HAVE_SYS_TIME_H # include #endif #include int main () { #undef $gl_func (void) $gl_func; ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then eval "$as_gl_Symbol=yes" else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 eval "$as_gl_Symbol=no" fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi ac_res=`eval 'as_val=${'$as_gl_Symbol'} $as_echo "$as_val"'` { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } as_val=`eval 'as_val=${'$as_gl_Symbol'} $as_echo "$as_val"'` if test "x$as_val" = x""yes; then cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1 _ACEOF eval ac_cv_have_decl_$gl_func=yes fi done { $as_echo "$as_me:$LINENO: checking where to find the exponent in a 'float'" >&5 $as_echo_n "checking where to find the exponent in a 'float'... " >&6; } if test "${gl_cv_cc_float_expbit0+set}" = set; then $as_echo_n "(cached) " >&6 else if test "$cross_compiling" = yes; then gl_cv_cc_float_expbit0="word 0 bit 23" else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #include #include #include #define NWORDS \ ((sizeof (float) + sizeof (unsigned int) - 1) / sizeof (unsigned int)) typedef union { float value; unsigned int word[NWORDS]; } memory_float; static unsigned int ored_words[NWORDS]; static unsigned int anded_words[NWORDS]; static void add_to_ored_words (float x) { memory_float m; size_t i; /* Clear it first, in case sizeof (float) < sizeof (memory_float). */ memset (&m, 0, sizeof (memory_float)); m.value = x; for (i = 0; i < NWORDS; i++) { ored_words[i] |= m.word[i]; anded_words[i] &= m.word[i]; } } int main () { size_t j; FILE *fp = fopen ("conftest.out", "w"); if (fp == NULL) return 1; for (j = 0; j < NWORDS; j++) anded_words[j] = ~ (unsigned int) 0; add_to_ored_words (0.25f); add_to_ored_words (0.5f); add_to_ored_words (1.0f); add_to_ored_words (2.0f); add_to_ored_words (4.0f); /* Remove bits that are common (e.g. if representation of the first mantissa bit is explicit). */ for (j = 0; j < NWORDS; j++) ored_words[j] &= ~anded_words[j]; /* Now find the nonzero word. */ for (j = 0; j < NWORDS; j++) if (ored_words[j] != 0) break; if (j < NWORDS) { size_t i; for (i = j + 1; i < NWORDS; i++) if (ored_words[i] != 0) { fprintf (fp, "unknown"); return (fclose (fp) != 0); } for (i = 0; ; i++) if ((ored_words[j] >> i) & 1) { fprintf (fp, "word %d bit %d", (int) j, (int) i); return (fclose (fp) != 0); } } fprintf (fp, "unknown"); return (fclose (fp) != 0); } _ACEOF rm -f conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' { (case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_try") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then gl_cv_cc_float_expbit0=`cat conftest.out` else $as_echo "$as_me: program exited with status $ac_status" >&5 $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) gl_cv_cc_float_expbit0="unknown" fi rm -rf conftest.dSYM rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi rm -f conftest.out fi { $as_echo "$as_me:$LINENO: result: $gl_cv_cc_float_expbit0" >&5 $as_echo "$gl_cv_cc_float_expbit0" >&6; } case "$gl_cv_cc_float_expbit0" in word*bit*) word=`echo "$gl_cv_cc_float_expbit0" | sed -e 's/word //' -e 's/ bit.*//'` bit=`echo "$gl_cv_cc_float_expbit0" | sed -e 's/word.*bit //'` cat >>confdefs.h <<_ACEOF #define FLT_EXPBIT0_WORD $word _ACEOF cat >>confdefs.h <<_ACEOF #define FLT_EXPBIT0_BIT $bit _ACEOF ;; esac { $as_echo "$as_me:$LINENO: checking whether byte ordering is bigendian" >&5 $as_echo_n "checking whether byte ordering is bigendian... " >&6; } if test "${ac_cv_c_bigendian+set}" = set; then $as_echo_n "(cached) " >&6 else ac_cv_c_bigendian=unknown # See if we're dealing with a universal compiler. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #ifndef __APPLE_CC__ not a universal capable compiler #endif typedef int dummy; _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then # Check for potential -arch flags. It is not universal unless # there are some -arch flags. Note that *ppc* also matches # ppc64. This check is also rather less than ideal. case "${CC} ${CFLAGS} ${CPPFLAGS} ${LDFLAGS}" in #( *-arch*ppc*|*-arch*i386*|*-arch*x86_64*) ac_cv_c_bigendian=universal;; esac else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext if test $ac_cv_c_bigendian = unknown; then # See if sys/param.h defines the BYTE_ORDER macro. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #include int main () { #if ! (defined BYTE_ORDER && defined BIG_ENDIAN \ && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \ && LITTLE_ENDIAN) bogus endian macros #endif ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then # It does; now see whether it defined to BIG_ENDIAN or not. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #include int main () { #if BYTE_ORDER != BIG_ENDIAN not big endian #endif ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_cv_c_bigendian=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_c_bigendian=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi if test $ac_cv_c_bigendian = unknown; then # See if defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris). cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include int main () { #if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN) bogus endian macros #endif ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then # It does; now see whether it defined to _BIG_ENDIAN or not. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include int main () { #ifndef _BIG_ENDIAN not big endian #endif ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_cv_c_bigendian=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_c_bigendian=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi if test $ac_cv_c_bigendian = unknown; then # Compile a test program. if test "$cross_compiling" = yes; then # Try to guess by grepping values from an object file. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ short int ascii_mm[] = { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 }; short int ascii_ii[] = { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 }; int use_ascii (int i) { return ascii_mm[i] + ascii_ii[i]; } short int ebcdic_ii[] = { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 }; short int ebcdic_mm[] = { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 }; int use_ebcdic (int i) { return ebcdic_mm[i] + ebcdic_ii[i]; } extern int foo; int main () { return use_ascii (foo) == use_ebcdic (foo); ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then ac_cv_c_bigendian=yes fi if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then if test "$ac_cv_c_bigendian" = unknown; then ac_cv_c_bigendian=no else # finding both strings is unlikely to happen, but who knows? ac_cv_c_bigendian=unknown fi fi else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default int main () { /* Are we little or big endian? From Harbison&Steele. */ union { long int l; char c[sizeof (long int)]; } u; u.l = 1; return u.c[sizeof (long int) - 1] == 1; ; return 0; } _ACEOF rm -f conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' { (case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_try") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_c_bigendian=no else $as_echo "$as_me: program exited with status $ac_status" >&5 $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) ac_cv_c_bigendian=yes fi rm -rf conftest.dSYM rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi fi fi { $as_echo "$as_me:$LINENO: result: $ac_cv_c_bigendian" >&5 $as_echo "$ac_cv_c_bigendian" >&6; } case $ac_cv_c_bigendian in #( yes) cat >>confdefs.h <<\_ACEOF #define WORDS_BIGENDIAN 1 _ACEOF ;; #( no) ;; #( universal) cat >>confdefs.h <<\_ACEOF #define AC_APPLE_UNIVERSAL_BUILD 1 _ACEOF ;; #( *) { { $as_echo "$as_me:$LINENO: error: unknown endianness presetting ac_cv_c_bigendian=no (or yes) will help" >&5 $as_echo "$as_me: error: unknown endianness presetting ac_cv_c_bigendian=no (or yes) will help" >&2;} { (exit 1); exit 1; }; } ;; esac GNULIB_NL_LANGINFO=0; HAVE_NL_LANGINFO=1; REPLACE_NL_LANGINFO=0; { $as_echo "$as_me:$LINENO: checking for working fcntl.h" >&5 $as_echo_n "checking for working fcntl.h... " >&6; } if test "${gl_cv_header_working_fcntl_h+set}" = set; then $as_echo_n "(cached) " >&6 else if test "$cross_compiling" = yes; then gl_cv_header_working_fcntl_h=cross-compiling else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #include #include #include #ifndef O_NOATIME #define O_NOATIME 0 #endif #ifndef O_NOFOLLOW #define O_NOFOLLOW 0 #endif static int const constants[] = { O_CREAT, O_EXCL, O_NOCTTY, O_TRUNC, O_APPEND, O_NONBLOCK, O_SYNC, O_ACCMODE, O_RDONLY, O_RDWR, O_WRONLY }; int main () { int status = !constants; { static char const sym[] = "conftest.sym"; if (symlink (".", sym) != 0 || close (open (sym, O_RDONLY | O_NOFOLLOW)) == 0) status |= 32; unlink (sym); } { static char const file[] = "confdefs.h"; int fd = open (file, O_RDONLY | O_NOATIME); char c; struct stat st0, st1; if (fd < 0 || fstat (fd, &st0) != 0 || sleep (1) != 0 || read (fd, &c, 1) != 1 || close (fd) != 0 || stat (file, &st1) != 0 || st0.st_atime != st1.st_atime) status |= 64; } return status; ; return 0; } _ACEOF rm -f conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' { (case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_try") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then gl_cv_header_working_fcntl_h=yes else $as_echo "$as_me: program exited with status $ac_status" >&5 $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) case $? in #( 32) gl_cv_header_working_fcntl_h='no (bad O_NOFOLLOW)';; #( 64) gl_cv_header_working_fcntl_h='no (bad O_NOATIME)';; #( 96) gl_cv_header_working_fcntl_h='no (bad O_NOATIME, O_NOFOLLOW)';; #( *) gl_cv_header_working_fcntl_h='no';; esac fi rm -rf conftest.dSYM rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi fi { $as_echo "$as_me:$LINENO: result: $gl_cv_header_working_fcntl_h" >&5 $as_echo "$gl_cv_header_working_fcntl_h" >&6; } case $gl_cv_header_working_fcntl_h in #( *O_NOATIME* | no | cross-compiling) ac_val=0;; #( *) ac_val=1;; esac cat >>confdefs.h <<_ACEOF #define HAVE_WORKING_O_NOATIME $ac_val _ACEOF case $gl_cv_header_working_fcntl_h in #( *O_NOFOLLOW* | no | cross-compiling) ac_val=0;; #( *) ac_val=1;; esac cat >>confdefs.h <<_ACEOF #define HAVE_WORKING_O_NOFOLLOW $ac_val _ACEOF { $as_echo "$as_me:$LINENO: checking whether getc_unlocked is declared" >&5 $as_echo_n "checking whether getc_unlocked is declared... " >&6; } if test "${ac_cv_have_decl_getc_unlocked+set}" = set; then $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default int main () { #ifndef getc_unlocked (void) getc_unlocked; #endif ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_cv_have_decl_getc_unlocked=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_have_decl_getc_unlocked=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:$LINENO: result: $ac_cv_have_decl_getc_unlocked" >&5 $as_echo "$ac_cv_have_decl_getc_unlocked" >&6; } if test "x$ac_cv_have_decl_getc_unlocked" = x""yes; then cat >>confdefs.h <<_ACEOF #define HAVE_DECL_GETC_UNLOCKED 1 _ACEOF else cat >>confdefs.h <<_ACEOF #define HAVE_DECL_GETC_UNLOCKED 0 _ACEOF fi { $as_echo "$as_me:$LINENO: checking whether we are using the GNU C Library 2.1 or newer" >&5 $as_echo_n "checking whether we are using the GNU C Library 2.1 or newer... " >&6; } if test "${ac_cv_gnu_library_2_1+set}" = set; then $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #ifdef __GNU_LIBRARY__ #if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2) Lucky GNU user #endif #endif _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "Lucky GNU user" >/dev/null 2>&1; then ac_cv_gnu_library_2_1=yes else ac_cv_gnu_library_2_1=no fi rm -f conftest* fi { $as_echo "$as_me:$LINENO: result: $ac_cv_gnu_library_2_1" >&5 $as_echo "$ac_cv_gnu_library_2_1" >&6; } GLIBC21="$ac_cv_gnu_library_2_1" { $as_echo "$as_me:$LINENO: checking whether malloc, realloc, calloc are POSIX compliant" >&5 $as_echo_n "checking whether malloc, realloc, calloc are POSIX compliant... " >&6; } if test "${gl_cv_func_malloc_posix+set}" = set; then $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { #if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ choke me #endif ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then gl_cv_func_malloc_posix=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 gl_cv_func_malloc_posix=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:$LINENO: result: $gl_cv_func_malloc_posix" >&5 $as_echo "$gl_cv_func_malloc_posix" >&6; } GNULIB_ATOLL=0; GNULIB_CALLOC_POSIX=0; GNULIB_CANONICALIZE_FILE_NAME=0; GNULIB_GETLOADAVG=0; GNULIB_GETSUBOPT=0; GNULIB_MALLOC_POSIX=0; GNULIB_MKDTEMP=0; GNULIB_MKOSTEMP=0; GNULIB_MKOSTEMPS=0; GNULIB_MKSTEMP=0; GNULIB_MKSTEMPS=0; GNULIB_PUTENV=0; GNULIB_RANDOM_R=0; GNULIB_REALLOC_POSIX=0; GNULIB_REALPATH=0; GNULIB_RPMATCH=0; GNULIB_SETENV=0; GNULIB_STRTOD=0; GNULIB_STRTOLL=0; GNULIB_STRTOULL=0; GNULIB_UNSETENV=0; HAVE_ATOLL=1; HAVE_CALLOC_POSIX=1; HAVE_CANONICALIZE_FILE_NAME=1; HAVE_DECL_GETLOADAVG=1; HAVE_GETSUBOPT=1; HAVE_MALLOC_POSIX=1; HAVE_MKDTEMP=1; HAVE_MKOSTEMP=1; HAVE_MKOSTEMPS=1; HAVE_MKSTEMPS=1; HAVE_RANDOM_R=1; HAVE_REALLOC_POSIX=1; HAVE_REALPATH=1; HAVE_RPMATCH=1; HAVE_SETENV=1; HAVE_STRTOD=1; HAVE_STRTOLL=1; HAVE_STRTOULL=1; HAVE_STRUCT_RANDOM_DATA=1; HAVE_SYS_LOADAVG_H=0; HAVE_UNSETENV=1; REPLACE_CANONICALIZE_FILE_NAME=0; REPLACE_MKSTEMP=0; REPLACE_PUTENV=0; REPLACE_REALPATH=0; REPLACE_SETENV=0; REPLACE_STRTOD=0; REPLACE_UNSETENV=0; { $as_echo "$as_me:$LINENO: checking for mbstate_t" >&5 $as_echo_n "checking for mbstate_t... " >&6; } if test "${ac_cv_type_mbstate_t+set}" = set; then $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default # include int main () { mbstate_t x; return sizeof x; ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_cv_type_mbstate_t=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_type_mbstate_t=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:$LINENO: result: $ac_cv_type_mbstate_t" >&5 $as_echo "$ac_cv_type_mbstate_t" >&6; } if test $ac_cv_type_mbstate_t = yes; then cat >>confdefs.h <<\_ACEOF #define HAVE_MBSTATE_T 1 _ACEOF else cat >>confdefs.h <<\_ACEOF #define mbstate_t int _ACEOF fi { $as_echo "$as_me:$LINENO: checking for a traditional japanese locale" >&5 $as_echo_n "checking for a traditional japanese locale... " >&6; } if test "${gt_cv_locale_ja+set}" = set; then $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #include #if HAVE_LANGINFO_CODESET # include #endif #include #include struct tm t; char buf[16]; int main () { const char *p; /* Check whether the given locale name is recognized by the system. */ if (setlocale (LC_ALL, "") == NULL) return 1; /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646". On MacOS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET) is empty, and the behaviour of Tcl 8.4 in this locale is not useful. On OpenBSD 4.0, when an unsupported locale is specified, setlocale() succeeds but then nl_langinfo(CODESET) is "646". In this situation, some unit tests fail. */ #if HAVE_LANGINFO_CODESET { const char *cs = nl_langinfo (CODESET); if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0) return 1; } #endif #ifdef __CYGWIN__ /* On Cygwin, avoid locale names without encoding suffix, because the locale_charset() function relies on the encoding suffix. Note that LC_ALL is set on the command line. */ if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1; #endif /* Check whether MB_CUR_MAX is > 1. This excludes the dysfunctional locales on Cygwin 1.5.x. */ if (MB_CUR_MAX == 1) return 1; /* Check whether in a month name, no byte in the range 0x80..0x9F occurs. This excludes the UTF-8 encoding. */ t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4; if (strftime (buf, sizeof (buf), "%B", &t) < 2) return 1; for (p = buf; *p != '\0'; p++) if ((unsigned char) *p >= 0x80 && (unsigned char) *p < 0xa0) return 1; return 0; } _ACEOF if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && test -s conftest$ac_exeext; then # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because # otherwise on MacOS X 10.3.5 the LC_TIME=C from the beginning of the # configure script would override the LC_ALL setting. Likewise for # LC_CTYPE, which is also set at the beginning of the configure script. # Test for the AIX locale name. if (LC_ALL=ja_JP LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then gt_cv_locale_ja=ja_JP else # Test for the locale name with explicit encoding suffix. if (LC_ALL=ja_JP.EUC-JP LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then gt_cv_locale_ja=ja_JP.EUC-JP else # Test for the HP-UX, OSF/1, NetBSD locale name. if (LC_ALL=ja_JP.eucJP LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then gt_cv_locale_ja=ja_JP.eucJP else # Test for the IRIX, FreeBSD locale name. if (LC_ALL=ja_JP.EUC LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then gt_cv_locale_ja=ja_JP.EUC else # Test for the Solaris 7 locale name. if (LC_ALL=ja LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then gt_cv_locale_ja=ja else # Special test for NetBSD 1.6. if test -f /usr/share/locale/ja_JP.eucJP/LC_CTYPE; then gt_cv_locale_ja=ja_JP.eucJP else # None found. gt_cv_locale_ja=none fi fi fi fi fi fi fi rm -fr conftest* fi { $as_echo "$as_me:$LINENO: result: $gt_cv_locale_ja" >&5 $as_echo "$gt_cv_locale_ja" >&6; } LOCALE_JA=$gt_cv_locale_ja { $as_echo "$as_me:$LINENO: checking for a transitional chinese locale" >&5 $as_echo_n "checking for a transitional chinese locale... " >&6; } if test "${gt_cv_locale_zh_CN+set}" = set; then $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #include #include #if HAVE_LANGINFO_CODESET # include #endif #include #include struct tm t; char buf[16]; int main () { const char *p; /* Check whether the given locale name is recognized by the system. */ if (setlocale (LC_ALL, "") == NULL) return 1; /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646". On MacOS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET) is empty, and the behaviour of Tcl 8.4 in this locale is not useful. On OpenBSD 4.0, when an unsupported locale is specified, setlocale() succeeds but then nl_langinfo(CODESET) is "646". In this situation, some unit tests fail. */ #if HAVE_LANGINFO_CODESET { const char *cs = nl_langinfo (CODESET); if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0) return 1; } #endif #ifdef __CYGWIN__ /* On Cygwin, avoid locale names without encoding suffix, because the locale_charset() function relies on the encoding suffix. Note that LC_ALL is set on the command line. */ if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1; #endif /* Check whether in a month name, no byte in the range 0x80..0x9F occurs. This excludes the UTF-8 encoding. */ t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4; if (strftime (buf, sizeof (buf), "%B", &t) < 2) return 1; for (p = buf; *p != '\0'; p++) if ((unsigned char) *p >= 0x80 && (unsigned char) *p < 0xa0) return 1; /* Check whether a typical GB18030 multibyte sequence is recognized as a single wide character. This excludes the GB2312 and GBK encodings. */ if (mblen ("\203\062\332\066", 5) != 4) return 1; return 0; } _ACEOF if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && test -s conftest$ac_exeext; then # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because # otherwise on MacOS X 10.3.5 the LC_TIME=C from the beginning of the # configure script would override the LC_ALL setting. Likewise for # LC_CTYPE, which is also set at the beginning of the configure script. # Test for the locale name without encoding suffix. if (LC_ALL=zh_CN LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then gt_cv_locale_zh_CN=zh_CN else # Test for the locale name with explicit encoding suffix. if (LC_ALL=zh_CN.GB18030 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then gt_cv_locale_zh_CN=zh_CN.GB18030 else # None found. gt_cv_locale_zh_CN=none fi fi else # If there was a link error, due to mblen(), the system is so old that # it certainly doesn't have a chinese locale. gt_cv_locale_zh_CN=none fi rm -fr conftest* fi { $as_echo "$as_me:$LINENO: result: $gt_cv_locale_zh_CN" >&5 $as_echo "$gt_cv_locale_zh_CN" >&6; } LOCALE_ZH_CN=$gt_cv_locale_zh_CN { $as_echo "$as_me:$LINENO: checking for a french Unicode locale" >&5 $as_echo_n "checking for a french Unicode locale... " >&6; } if test "${gt_cv_locale_fr_utf8+set}" = set; then $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #include #if HAVE_LANGINFO_CODESET # include #endif #include #include struct tm t; char buf[16]; int main () { /* On BeOS and Haiku, locales are not implemented in libc. Rather, libintl imitates locale dependent behaviour by looking at the environment variables, and all locales use the UTF-8 encoding. */ #if !(defined __BEOS__ || defined __HAIKU__) /* Check whether the given locale name is recognized by the system. */ if (setlocale (LC_ALL, "") == NULL) return 1; /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646". On MacOS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET) is empty, and the behaviour of Tcl 8.4 in this locale is not useful. On OpenBSD 4.0, when an unsupported locale is specified, setlocale() succeeds but then nl_langinfo(CODESET) is "646". In this situation, some unit tests fail. */ # if HAVE_LANGINFO_CODESET { const char *cs = nl_langinfo (CODESET); if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0) return 1; } # endif # ifdef __CYGWIN__ /* On Cygwin, avoid locale names without encoding suffix, because the locale_charset() function relies on the encoding suffix. Note that LC_ALL is set on the command line. */ if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1; # endif /* Check whether in the abbreviation of the second month, the second character (should be U+00E9: LATIN SMALL LETTER E WITH ACUTE) is two bytes long, with UTF-8 encoding. */ t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4; if (strftime (buf, sizeof (buf), "%b", &t) < 4 || buf[1] != (char) 0xc3 || buf[2] != (char) 0xa9 || buf[3] != 'v') return 1; #endif /* Check whether the decimal separator is a comma. On NetBSD 3.0 in the fr_FR.ISO8859-1 locale, localeconv()->decimal_point are nl_langinfo(RADIXCHAR) are both ".". */ if (localeconv () ->decimal_point[0] != ',') return 1; return 0; } _ACEOF if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && test -s conftest$ac_exeext; then # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because # otherwise on MacOS X 10.3.5 the LC_TIME=C from the beginning of the # configure script would override the LC_ALL setting. Likewise for # LC_CTYPE, which is also set at the beginning of the configure script. # Test for the usual locale name. if (LC_ALL=fr_FR LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then gt_cv_locale_fr_utf8=fr_FR else # Test for the locale name with explicit encoding suffix. if (LC_ALL=fr_FR.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then gt_cv_locale_fr_utf8=fr_FR.UTF-8 else # Test for the Solaris 7 locale name. if (LC_ALL=fr.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then gt_cv_locale_fr_utf8=fr.UTF-8 else # None found. gt_cv_locale_fr_utf8=none fi fi fi fi rm -fr conftest* fi { $as_echo "$as_me:$LINENO: result: $gt_cv_locale_fr_utf8" >&5 $as_echo "$gt_cv_locale_fr_utf8" >&6; } LOCALE_FR_UTF8=$gt_cv_locale_fr_utf8 GNULIB_MEMCHR=0; GNULIB_MEMMEM=0; GNULIB_MEMPCPY=0; GNULIB_MEMRCHR=0; GNULIB_RAWMEMCHR=0; GNULIB_STPCPY=0; GNULIB_STPNCPY=0; GNULIB_STRCHRNUL=0; GNULIB_STRDUP=0; GNULIB_STRNDUP=0; GNULIB_STRNLEN=0; GNULIB_STRPBRK=0; GNULIB_STRSEP=0; GNULIB_STRSTR=0; GNULIB_STRCASESTR=0; GNULIB_STRTOK_R=0; GNULIB_MBSLEN=0; GNULIB_MBSNLEN=0; GNULIB_MBSCHR=0; GNULIB_MBSRCHR=0; GNULIB_MBSSTR=0; GNULIB_MBSCASECMP=0; GNULIB_MBSNCASECMP=0; GNULIB_MBSPCASECMP=0; GNULIB_MBSCASESTR=0; GNULIB_MBSCSPN=0; GNULIB_MBSPBRK=0; GNULIB_MBSSPN=0; GNULIB_MBSSEP=0; GNULIB_MBSTOK_R=0; GNULIB_STRERROR=0; GNULIB_STRSIGNAL=0; GNULIB_STRVERSCMP=0; HAVE_MBSLEN=0; HAVE_DECL_MEMMEM=1; HAVE_MEMPCPY=1; HAVE_DECL_MEMRCHR=1; HAVE_RAWMEMCHR=1; HAVE_STPCPY=1; HAVE_STPNCPY=1; HAVE_STRCHRNUL=1; HAVE_DECL_STRDUP=1; HAVE_DECL_STRNDUP=1; HAVE_DECL_STRNLEN=1; HAVE_STRPBRK=1; HAVE_STRSEP=1; HAVE_STRCASESTR=1; HAVE_DECL_STRTOK_R=1; HAVE_DECL_STRERROR=1; HAVE_DECL_STRSIGNAL=1; HAVE_STRVERSCMP=1; REPLACE_MEMCHR=0; REPLACE_MEMMEM=0; REPLACE_STRDUP=0; REPLACE_STRSTR=0; REPLACE_STRCASESTR=0; REPLACE_STRERROR=0; REPLACE_STRNDUP=0; REPLACE_STRSIGNAL=0; REPLACE_STRTOK_R=0; UNDEFINE_STRTOK_R=0; # Check for mmap(). Don't use AC_FUNC_MMAP, because it checks too much: it # fails on HP-UX 11, because MAP_FIXED mappings do not work. But this is # irrelevant for anonymous mappings. { $as_echo "$as_me:$LINENO: checking for mmap" >&5 $as_echo_n "checking for mmap... " >&6; } if test "${ac_cv_func_mmap+set}" = set; then $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Define mmap to an innocuous variant, in case declares mmap. For example, HP-UX 11i declares gettimeofday. */ #define mmap innocuous_mmap /* System header to define __stub macros and hopefully few prototypes, which can conflict with char mmap (); below. Prefer to if __STDC__ is defined, since exists even on freestanding compilers. */ #ifdef __STDC__ # include #else # include #endif #undef mmap /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char mmap (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined __stub_mmap || defined __stub___mmap choke me #endif int main () { return mmap (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || $as_test_x conftest$ac_exeext }; then ac_cv_func_mmap=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_func_mmap=no fi rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi { $as_echo "$as_me:$LINENO: result: $ac_cv_func_mmap" >&5 $as_echo "$ac_cv_func_mmap" >&6; } if test "x$ac_cv_func_mmap" = x""yes; then gl_have_mmap=yes else gl_have_mmap=no fi # Try to allow MAP_ANONYMOUS. gl_have_mmap_anonymous=no if test $gl_have_mmap = yes; then { $as_echo "$as_me:$LINENO: checking for MAP_ANONYMOUS" >&5 $as_echo_n "checking for MAP_ANONYMOUS... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #ifdef MAP_ANONYMOUS I cant identify this map. #endif _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "I cant identify this map." >/dev/null 2>&1; then gl_have_mmap_anonymous=yes fi rm -f conftest* if test $gl_have_mmap_anonymous != yes; then cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #ifdef MAP_ANON I cant identify this map. #endif _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "I cant identify this map." >/dev/null 2>&1; then cat >>confdefs.h <<\_ACEOF #define MAP_ANONYMOUS MAP_ANON _ACEOF gl_have_mmap_anonymous=yes fi rm -f conftest* fi { $as_echo "$as_me:$LINENO: result: $gl_have_mmap_anonymous" >&5 $as_echo "$gl_have_mmap_anonymous" >&6; } if test $gl_have_mmap_anonymous = yes; then cat >>confdefs.h <<\_ACEOF #define HAVE_MAP_ANONYMOUS 1 _ACEOF fi fi : : for ac_func in memchr do as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` { $as_echo "$as_me:$LINENO: checking for $ac_func" >&5 $as_echo_n "checking for $ac_func... " >&6; } if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Define $ac_func to an innocuous variant, in case declares $ac_func. For example, HP-UX 11i declares gettimeofday. */ #define $ac_func innocuous_$ac_func /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $ac_func (); below. Prefer to if __STDC__ is defined, since exists even on freestanding compilers. */ #ifdef __STDC__ # include #else # include #endif #undef $ac_func /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char $ac_func (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined __stub_$ac_func || defined __stub___$ac_func choke me #endif int main () { return $ac_func (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || $as_test_x conftest$ac_exeext }; then eval "$as_ac_var=yes" else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 eval "$as_ac_var=no" fi rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi ac_res=`eval 'as_val=${'$as_ac_var'} $as_echo "$as_val"'` { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } as_val=`eval 'as_val=${'$as_ac_var'} $as_echo "$as_val"'` if test "x$as_val" = x""yes; then cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF else gl_LIBOBJS="$gl_LIBOBJS $ac_func.$ac_objext" fi done if test $ac_cv_func_memchr = no; then for ac_header in bp-sym.h do as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 $as_echo_n "checking for $ac_header... " >&6; } if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then $as_echo_n "(cached) " >&6 fi ac_res=`eval 'as_val=${'$as_ac_Header'} $as_echo "$as_val"'` { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } else # Is the header compilable? { $as_echo "$as_me:$LINENO: checking $ac_header usability" >&5 $as_echo_n "checking $ac_header usability... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default #include <$ac_header> _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_header_compiler=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_compiler=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext { $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 $as_echo "$ac_header_compiler" >&6; } # Is the header present? { $as_echo "$as_me:$LINENO: checking $ac_header presence" >&5 $as_echo_n "checking $ac_header presence... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include <$ac_header> _ACEOF if { (ac_try="$ac_cpp conftest.$ac_ext" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null && { test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || test ! -s conftest.err }; then ac_header_preproc=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi rm -f conftest.err conftest.$ac_ext { $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 $as_echo "$ac_header_preproc" >&6; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in yes:no: ) { $as_echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 $as_echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 $as_echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} ac_header_preproc=yes ;; no:yes:* ) { $as_echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 $as_echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} { $as_echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 $as_echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} { $as_echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 $as_echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} { $as_echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 $as_echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 $as_echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} { $as_echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 $as_echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} ;; esac { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 $as_echo_n "checking for $ac_header... " >&6; } if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then $as_echo_n "(cached) " >&6 else eval "$as_ac_Header=\$ac_header_preproc" fi ac_res=`eval 'as_val=${'$as_ac_Header'} $as_echo "$as_val"'` { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } fi as_val=`eval 'as_val=${'$as_ac_Header'} $as_echo "$as_val"'` if test "x$as_val" = x""yes; then cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi done REPLACE_MEMCHR=1 fi if test $ac_cv_func_memchr = yes; then # Detect platform-specific bugs in some versions of glibc: # memchr should not dereference anything with length 0 # http://bugzilla.redhat.com/499689 # memchr should not dereference overestimated length after a match # http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=521737 # http://sourceware.org/bugzilla/show_bug.cgi?id=10162 # Assume that memchr works on platforms that lack mprotect. { $as_echo "$as_me:$LINENO: checking whether memchr works" >&5 $as_echo_n "checking whether memchr works... " >&6; } if test "${gl_cv_func_memchr_works+set}" = set; then $as_echo_n "(cached) " >&6 else if test "$cross_compiling" = yes; then gl_cv_func_memchr_works="guessing no" else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #if HAVE_SYS_MMAN_H # include # include # include # include # ifndef MAP_FILE # define MAP_FILE 0 # endif #endif int main () { char *fence = NULL; #if HAVE_SYS_MMAN_H && HAVE_MPROTECT # if HAVE_MAP_ANONYMOUS const int flags = MAP_ANONYMOUS | MAP_PRIVATE; const int fd = -1; # else /* !HAVE_MAP_ANONYMOUS */ const int flags = MAP_FILE | MAP_PRIVATE; int fd = open ("/dev/zero", O_RDONLY, 0666); if (fd >= 0) # endif { int pagesize = getpagesize (); char *two_pages = (char *) mmap (NULL, 2 * pagesize, PROT_READ | PROT_WRITE, flags, fd, 0); if (two_pages != (char *)(-1) && mprotect (two_pages + pagesize, pagesize, PROT_NONE) == 0) fence = two_pages + pagesize; } #endif if (fence) { if (memchr (fence, 0, 0)) return 1; strcpy (fence - 9, "12345678"); if (memchr (fence - 9, 0, 79) != fence - 1) return 2; } return 0; ; return 0; } _ACEOF rm -f conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' { (case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_try") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then gl_cv_func_memchr_works=yes else $as_echo "$as_me: program exited with status $ac_status" >&5 $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) gl_cv_func_memchr_works=no fi rm -rf conftest.dSYM rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi fi { $as_echo "$as_me:$LINENO: result: $gl_cv_func_memchr_works" >&5 $as_echo "$gl_cv_func_memchr_works" >&6; } if test "$gl_cv_func_memchr_works" != yes; then for ac_header in bp-sym.h do as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 $as_echo_n "checking for $ac_header... " >&6; } if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then $as_echo_n "(cached) " >&6 fi ac_res=`eval 'as_val=${'$as_ac_Header'} $as_echo "$as_val"'` { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } else # Is the header compilable? { $as_echo "$as_me:$LINENO: checking $ac_header usability" >&5 $as_echo_n "checking $ac_header usability... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default #include <$ac_header> _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_header_compiler=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_compiler=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext { $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 $as_echo "$ac_header_compiler" >&6; } # Is the header present? { $as_echo "$as_me:$LINENO: checking $ac_header presence" >&5 $as_echo_n "checking $ac_header presence... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include <$ac_header> _ACEOF if { (ac_try="$ac_cpp conftest.$ac_ext" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null && { test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || test ! -s conftest.err }; then ac_header_preproc=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi rm -f conftest.err conftest.$ac_ext { $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 $as_echo "$ac_header_preproc" >&6; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in yes:no: ) { $as_echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 $as_echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 $as_echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} ac_header_preproc=yes ;; no:yes:* ) { $as_echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 $as_echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} { $as_echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 $as_echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} { $as_echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 $as_echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} { $as_echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 $as_echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 $as_echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} { $as_echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 $as_echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} ;; esac { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 $as_echo_n "checking for $ac_header... " >&6; } if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then $as_echo_n "(cached) " >&6 else eval "$as_ac_Header=\$ac_header_preproc" fi ac_res=`eval 'as_val=${'$as_ac_Header'} $as_echo "$as_val"'` { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } fi as_val=`eval 'as_val=${'$as_ac_Header'} $as_echo "$as_val"'` if test "x$as_val" = x""yes; then cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi done REPLACE_MEMCHR=1 gl_LIBOBJS="$gl_LIBOBJS memchr.$ac_objext" fi fi { $as_echo "$as_me:$LINENO: checking whether memmem is declared" >&5 $as_echo_n "checking whether memmem is declared... " >&6; } if test "${ac_cv_have_decl_memmem+set}" = set; then $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default int main () { #ifndef memmem (void) memmem; #endif ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_cv_have_decl_memmem=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_have_decl_memmem=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:$LINENO: result: $ac_cv_have_decl_memmem" >&5 $as_echo "$ac_cv_have_decl_memmem" >&6; } if test "x$ac_cv_have_decl_memmem" = x""yes; then cat >>confdefs.h <<_ACEOF #define HAVE_DECL_MEMMEM 1 _ACEOF else cat >>confdefs.h <<_ACEOF #define HAVE_DECL_MEMMEM 0 _ACEOF fi for ac_func in memmem do as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` { $as_echo "$as_me:$LINENO: checking for $ac_func" >&5 $as_echo_n "checking for $ac_func... " >&6; } if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Define $ac_func to an innocuous variant, in case declares $ac_func. For example, HP-UX 11i declares gettimeofday. */ #define $ac_func innocuous_$ac_func /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $ac_func (); below. Prefer to if __STDC__ is defined, since exists even on freestanding compilers. */ #ifdef __STDC__ # include #else # include #endif #undef $ac_func /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char $ac_func (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined __stub_$ac_func || defined __stub___$ac_func choke me #endif int main () { return $ac_func (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || $as_test_x conftest$ac_exeext }; then eval "$as_ac_var=yes" else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 eval "$as_ac_var=no" fi rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi ac_res=`eval 'as_val=${'$as_ac_var'} $as_echo "$as_val"'` { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } as_val=`eval 'as_val=${'$as_ac_var'} $as_echo "$as_val"'` if test "x$as_val" = x""yes; then cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF else gl_LIBOBJS="$gl_LIBOBJS $ac_func.$ac_objext" fi done : if test $ac_cv_have_decl_memmem = no; then HAVE_DECL_MEMMEM=0 fi : { $as_echo "$as_me:$LINENO: checking whether defines MIN and MAX" >&5 $as_echo_n "checking whether defines MIN and MAX... " >&6; } if test "${gl_cv_minmax_in_limits_h+set}" = set; then $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include int x = MIN (42, 17); int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then gl_cv_minmax_in_limits_h=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 gl_cv_minmax_in_limits_h=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:$LINENO: result: $gl_cv_minmax_in_limits_h" >&5 $as_echo "$gl_cv_minmax_in_limits_h" >&6; } if test $gl_cv_minmax_in_limits_h = yes; then cat >>confdefs.h <<\_ACEOF #define HAVE_MINMAX_IN_LIMITS_H 1 _ACEOF fi { $as_echo "$as_me:$LINENO: checking whether defines MIN and MAX" >&5 $as_echo_n "checking whether defines MIN and MAX... " >&6; } if test "${gl_cv_minmax_in_sys_param_h+set}" = set; then $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include int x = MIN (42, 17); int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then gl_cv_minmax_in_sys_param_h=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 gl_cv_minmax_in_sys_param_h=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:$LINENO: result: $gl_cv_minmax_in_sys_param_h" >&5 $as_echo "$gl_cv_minmax_in_sys_param_h" >&6; } if test $gl_cv_minmax_in_sys_param_h = yes; then cat >>confdefs.h <<\_ACEOF #define HAVE_MINMAX_IN_SYS_PARAM_H 1 _ACEOF fi REPLACE_LOCALTIME_R=GNULIB_PORTCHECK; REPLACE_MKTIME=GNULIB_PORTCHECK; REPLACE_NANOSLEEP=GNULIB_PORTCHECK; REPLACE_STRPTIME=GNULIB_PORTCHECK; REPLACE_TIMEGM=GNULIB_PORTCHECK; gl_cv_c_multiarch=no cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #ifndef __APPLE_CC__ not a universal capable compiler #endif typedef int dummy; _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then arch= prev= for word in ${CC} ${CFLAGS} ${CPPFLAGS} ${LDFLAGS}; do if test -n "$prev"; then case $word in i?86 | x86_64 | ppc | ppc64) if test -z "$arch" || test "$arch" = "$word"; then arch="$word" else gl_cv_c_multiarch=yes fi ;; esac prev= else if test "x$word" = "x-arch"; then prev=arch fi fi done else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext if test $gl_cv_c_multiarch = yes; then cat >>confdefs.h <<\_ACEOF #define AA_APPLE_UNIVERSAL_BUILD 1 _ACEOF APPLE_UNIVERSAL_BUILD=1 else APPLE_UNIVERSAL_BUILD=0 fi { $as_echo "$as_me:$LINENO: checking whether to activate relocatable installation" >&5 $as_echo_n "checking whether to activate relocatable installation... " >&6; } # Check whether --enable-relocatable was given. if test "${enable_relocatable+set}" = set; then enableval=$enable_relocatable; if test "$enableval" != no; then RELOCATABLE=yes else RELOCATABLE=no fi else RELOCATABLE=no fi { $as_echo "$as_me:$LINENO: result: $RELOCATABLE" >&5 $as_echo "$RELOCATABLE" >&6; } if test "X$prefix" = "XNONE"; then reloc_final_prefix="$ac_default_prefix" else reloc_final_prefix="$prefix" fi cat >>confdefs.h <<_ACEOF #define INSTALLPREFIX "${reloc_final_prefix}" _ACEOF if test $RELOCATABLE = yes; then cat >>confdefs.h <<\_ACEOF #define ENABLE_RELOCATABLE 1 _ACEOF fi GNULIB_SELECT=0; REPLACE_SELECT=0; { $as_echo "$as_me:$LINENO: checking whether is self-contained" >&5 $as_echo_n "checking whether is self-contained... " >&6; } if test "${gl_cv_header_sys_select_h_selfcontained+set}" = set; then $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include int main () { struct timeval b; ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then gl_cv_header_sys_select_h_selfcontained=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 gl_cv_header_sys_select_h_selfcontained=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext if test $gl_cv_header_sys_select_h_selfcontained = yes; then cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include int main () { int memset; int bzero; ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include int main () { #undef memset #define memset nonexistent_memset extern void *memset (void *, int, unsigned long); #undef bzero #define bzero nonexistent_bzero extern void bzero (void *, unsigned long); fd_set fds; FD_ZERO (&fds); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || $as_test_x conftest$ac_exeext }; then : else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 gl_cv_header_sys_select_h_selfcontained=no fi rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi fi { $as_echo "$as_me:$LINENO: result: $gl_cv_header_sys_select_h_selfcontained" >&5 $as_echo "$gl_cv_header_sys_select_h_selfcontained" >&6; } : : if test $gl_cv_have_include_next = yes; then gl_cv_next_sys_select_h='<'sys/select.h'>' else { $as_echo "$as_me:$LINENO: checking absolute name of " >&5 $as_echo_n "checking absolute name of ... " >&6; } if test "${gl_cv_next_sys_select_h+set}" = set; then $as_echo_n "(cached) " >&6 else if test $ac_cv_header_sys_select_h = yes; then cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF case "$host_os" in aix*) gl_absname_cpp="$ac_cpp -C" ;; *) gl_absname_cpp="$ac_cpp" ;; esac gl_cv_next_sys_select_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 | sed -n '\#/sys/select.h#{ s#.*"\(.*/sys/select.h\)".*#\1# s#^/[^/]#//&# p q }'`'"' else gl_cv_next_sys_select_h='<'sys/select.h'>' fi fi { $as_echo "$as_me:$LINENO: result: $gl_cv_next_sys_select_h" >&5 $as_echo "$gl_cv_next_sys_select_h" >&6; } fi NEXT_SYS_SELECT_H=$gl_cv_next_sys_select_h if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next' gl_next_as_first_directive='<'sys/select.h'>' else # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include' gl_next_as_first_directive=$gl_cv_next_sys_select_h fi NEXT_AS_FIRST_DIRECTIVE_SYS_SELECT_H=$gl_next_as_first_directive if test $ac_cv_header_sys_select_h = yes; then HAVE_SYS_SELECT_H=1 else HAVE_SYS_SELECT_H=0 fi if test $gl_cv_header_sys_select_h_selfcontained != yes; then : if test $ac_cv_header_sys_socket_h != yes; then for ac_header in winsock2.h do as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 $as_echo_n "checking for $ac_header... " >&6; } if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then $as_echo_n "(cached) " >&6 fi ac_res=`eval 'as_val=${'$as_ac_Header'} $as_echo "$as_val"'` { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } else # Is the header compilable? { $as_echo "$as_me:$LINENO: checking $ac_header usability" >&5 $as_echo_n "checking $ac_header usability... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default #include <$ac_header> _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_header_compiler=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_compiler=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext { $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 $as_echo "$ac_header_compiler" >&6; } # Is the header present? { $as_echo "$as_me:$LINENO: checking $ac_header presence" >&5 $as_echo_n "checking $ac_header presence... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include <$ac_header> _ACEOF if { (ac_try="$ac_cpp conftest.$ac_ext" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null && { test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || test ! -s conftest.err }; then ac_header_preproc=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi rm -f conftest.err conftest.$ac_ext { $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 $as_echo "$ac_header_preproc" >&6; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in yes:no: ) { $as_echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 $as_echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 $as_echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} ac_header_preproc=yes ;; no:yes:* ) { $as_echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 $as_echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} { $as_echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 $as_echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} { $as_echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 $as_echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} { $as_echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 $as_echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 $as_echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} { $as_echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 $as_echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} ;; esac { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 $as_echo_n "checking for $ac_header... " >&6; } if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then $as_echo_n "(cached) " >&6 else eval "$as_ac_Header=\$ac_header_preproc" fi ac_res=`eval 'as_val=${'$as_ac_Header'} $as_echo "$as_val"'` { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } fi as_val=`eval 'as_val=${'$as_ac_Header'} $as_echo "$as_val"'` if test "x$as_val" = x""yes; then cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi done fi if test "$ac_cv_header_winsock2_h" = yes; then HAVE_WINSOCK2_H=1 UNISTD_H_HAVE_WINSOCK2_H=1 SYS_IOCTL_H_HAVE_WINSOCK2_H=1 else HAVE_WINSOCK2_H=0 fi fi for gl_func in select; do as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh` { $as_echo "$as_me:$LINENO: checking whether $gl_func is declared without a macro" >&5 $as_echo_n "checking whether $gl_func is declared without a macro... " >&6; } if { as_var=$as_gl_Symbol; eval "test \"\${$as_var+set}\" = set"; }; then $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Some systems require prerequisite headers. */ #include #if !defined __GLIBC__ && HAVE_SYS_TIME_H # include #endif #include int main () { #undef $gl_func (void) $gl_func; ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then eval "$as_gl_Symbol=yes" else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 eval "$as_gl_Symbol=no" fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi ac_res=`eval 'as_val=${'$as_gl_Symbol'} $as_echo "$as_val"'` { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } as_val=`eval 'as_val=${'$as_gl_Symbol'} $as_echo "$as_val"'` if test "x$as_val" = x""yes; then cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1 _ACEOF eval ac_cv_have_decl_$gl_func=yes fi done : if test $ac_cv_header_sys_socket_h != yes; then for ac_header in winsock2.h do as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 $as_echo_n "checking for $ac_header... " >&6; } if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then $as_echo_n "(cached) " >&6 fi ac_res=`eval 'as_val=${'$as_ac_Header'} $as_echo "$as_val"'` { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } else # Is the header compilable? { $as_echo "$as_me:$LINENO: checking $ac_header usability" >&5 $as_echo_n "checking $ac_header usability... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default #include <$ac_header> _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_header_compiler=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_compiler=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext { $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 $as_echo "$ac_header_compiler" >&6; } # Is the header present? { $as_echo "$as_me:$LINENO: checking $ac_header presence" >&5 $as_echo_n "checking $ac_header presence... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include <$ac_header> _ACEOF if { (ac_try="$ac_cpp conftest.$ac_ext" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null && { test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || test ! -s conftest.err }; then ac_header_preproc=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi rm -f conftest.err conftest.$ac_ext { $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 $as_echo "$ac_header_preproc" >&6; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in yes:no: ) { $as_echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 $as_echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 $as_echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} ac_header_preproc=yes ;; no:yes:* ) { $as_echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 $as_echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} { $as_echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 $as_echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} { $as_echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 $as_echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} { $as_echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 $as_echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 $as_echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} { $as_echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 $as_echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} ;; esac { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 $as_echo_n "checking for $ac_header... " >&6; } if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then $as_echo_n "(cached) " >&6 else eval "$as_ac_Header=\$ac_header_preproc" fi ac_res=`eval 'as_val=${'$as_ac_Header'} $as_echo "$as_val"'` { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } fi as_val=`eval 'as_val=${'$as_ac_Header'} $as_echo "$as_val"'` if test "x$as_val" = x""yes; then cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi done fi if test "$ac_cv_header_winsock2_h" = yes; then HAVE_WINSOCK2_H=1 UNISTD_H_HAVE_WINSOCK2_H=1 SYS_IOCTL_H_HAVE_WINSOCK2_H=1 else HAVE_WINSOCK2_H=0 fi LIBSOCKET= if test $HAVE_WINSOCK2_H = 1; then { $as_echo "$as_me:$LINENO: checking if we need to call WSAStartup in winsock2.h and -lws2_32" >&5 $as_echo_n "checking if we need to call WSAStartup in winsock2.h and -lws2_32... " >&6; } if test "${gl_cv_func_wsastartup+set}" = set; then $as_echo_n "(cached) " >&6 else gl_save_LIBS="$LIBS" LIBS="$LIBS -lws2_32" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #ifdef HAVE_WINSOCK2_H # include #endif int main () { WORD wVersionRequested = MAKEWORD(1, 1); WSADATA wsaData; int err = WSAStartup(wVersionRequested, &wsaData); WSACleanup (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || $as_test_x conftest$ac_exeext }; then gl_cv_func_wsastartup=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 gl_cv_func_wsastartup=no fi rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS="$gl_save_LIBS" fi { $as_echo "$as_me:$LINENO: result: $gl_cv_func_wsastartup" >&5 $as_echo "$gl_cv_func_wsastartup" >&6; } if test "$gl_cv_func_wsastartup" = "yes"; then cat >>confdefs.h <<\_ACEOF #define WINDOWS_SOCKETS 1 _ACEOF LIBSOCKET='-lws2_32' fi else { $as_echo "$as_me:$LINENO: checking for library containing setsockopt" >&5 $as_echo_n "checking for library containing setsockopt... " >&6; } if test "${gl_cv_lib_socket+set}" = set; then $as_echo_n "(cached) " >&6 else gl_cv_lib_socket= cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ extern #ifdef __cplusplus "C" #endif char setsockopt(); int main () { setsockopt(); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || $as_test_x conftest$ac_exeext }; then : else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 gl_save_LIBS="$LIBS" LIBS="$gl_save_LIBS -lsocket" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ extern #ifdef __cplusplus "C" #endif char setsockopt(); int main () { setsockopt(); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || $as_test_x conftest$ac_exeext }; then gl_cv_lib_socket="-lsocket" else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext if test -z "$gl_cv_lib_socket"; then LIBS="$gl_save_LIBS -lnetwork" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ extern #ifdef __cplusplus "C" #endif char setsockopt(); int main () { setsockopt(); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || $as_test_x conftest$ac_exeext }; then gl_cv_lib_socket="-lnetwork" else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext if test -z "$gl_cv_lib_socket"; then LIBS="$gl_save_LIBS -lnet" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ extern #ifdef __cplusplus "C" #endif char setsockopt(); int main () { setsockopt(); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || $as_test_x conftest$ac_exeext }; then gl_cv_lib_socket="-lnet" else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi fi LIBS="$gl_save_LIBS" fi rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext if test -z "$gl_cv_lib_socket"; then gl_cv_lib_socket="none needed" fi fi { $as_echo "$as_me:$LINENO: result: $gl_cv_lib_socket" >&5 $as_echo "$gl_cv_lib_socket" >&6; } if test "$gl_cv_lib_socket" != "none needed"; then LIBSOCKET="$gl_cv_lib_socket" fi fi : GNULIB_SIGNAL_H_SIGPIPE=0; GNULIB_SIGPROCMASK=0; GNULIB_SIGACTION=0; HAVE_POSIX_SIGNALBLOCKING=1; HAVE_SIGSET_T=1; HAVE_SIGINFO_T=1; HAVE_SIGACTION=1; HAVE_STRUCT_SIGACTION_SA_SIGACTION=1; HAVE_TYPE_VOLATILE_SIG_ATOMIC_T=1; { $as_echo "$as_me:$LINENO: checking for uid_t in sys/types.h" >&5 $as_echo_n "checking for uid_t in sys/types.h... " >&6; } if test "${ac_cv_type_uid_t+set}" = set; then $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "uid_t" >/dev/null 2>&1; then ac_cv_type_uid_t=yes else ac_cv_type_uid_t=no fi rm -f conftest* fi { $as_echo "$as_me:$LINENO: result: $ac_cv_type_uid_t" >&5 $as_echo "$ac_cv_type_uid_t" >&6; } if test $ac_cv_type_uid_t = no; then cat >>confdefs.h <<\_ACEOF #define uid_t int _ACEOF cat >>confdefs.h <<\_ACEOF #define gid_t int _ACEOF fi { $as_echo "$as_me:$LINENO: checking whether snprintf is declared" >&5 $as_echo_n "checking whether snprintf is declared... " >&6; } if test "${ac_cv_have_decl_snprintf+set}" = set; then $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default int main () { #ifndef snprintf (void) snprintf; #endif ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_cv_have_decl_snprintf=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_have_decl_snprintf=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:$LINENO: result: $ac_cv_have_decl_snprintf" >&5 $as_echo "$ac_cv_have_decl_snprintf" >&6; } if test "x$ac_cv_have_decl_snprintf" = x""yes; then cat >>confdefs.h <<_ACEOF #define HAVE_DECL_SNPRINTF 1 _ACEOF else cat >>confdefs.h <<_ACEOF #define HAVE_DECL_SNPRINTF 0 _ACEOF fi { $as_echo "$as_me:$LINENO: checking for stdint.h" >&5 $as_echo_n "checking for stdint.h... " >&6; } if test "${gl_cv_header_stdint_h+set}" = set; then $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #include int main () { uintmax_t i = (uintmax_t) -1; return !i; ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then gl_cv_header_stdint_h=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 gl_cv_header_stdint_h=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:$LINENO: result: $gl_cv_header_stdint_h" >&5 $as_echo "$gl_cv_header_stdint_h" >&6; } if test $gl_cv_header_stdint_h = yes; then cat >>confdefs.h <<_ACEOF #define HAVE_STDINT_H_WITH_UINTMAX 1 _ACEOF fi { $as_echo "$as_me:$LINENO: checking for inttypes.h" >&5 $as_echo_n "checking for inttypes.h... " >&6; } if test "${gl_cv_header_inttypes_h+set}" = set; then $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #include int main () { uintmax_t i = (uintmax_t) -1; return !i; ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then gl_cv_header_inttypes_h=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 gl_cv_header_inttypes_h=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:$LINENO: result: $gl_cv_header_inttypes_h" >&5 $as_echo "$gl_cv_header_inttypes_h" >&6; } if test $gl_cv_header_inttypes_h = yes; then cat >>confdefs.h <<_ACEOF #define HAVE_INTTYPES_H_WITH_UINTMAX 1 _ACEOF fi { $as_echo "$as_me:$LINENO: checking whether printf supports size specifiers as in C99" >&5 $as_echo_n "checking whether printf supports size specifiers as in C99... " >&6; } if test "${gl_cv_func_printf_sizes_c99+set}" = set; then $as_echo_n "(cached) " >&6 else if test "$cross_compiling" = yes; then case "$host_os" in # Guess yes on glibc systems. *-gnu*) gl_cv_func_printf_sizes_c99="guessing yes";; # Guess yes on FreeBSD >= 5. freebsd[1-4]*) gl_cv_func_printf_sizes_c99="guessing no";; freebsd* | kfreebsd*) gl_cv_func_printf_sizes_c99="guessing yes";; # Guess yes on MacOS X >= 10.3. darwin[1-6].*) gl_cv_func_printf_sizes_c99="guessing no";; darwin*) gl_cv_func_printf_sizes_c99="guessing yes";; # Guess yes on OpenBSD >= 3.9. openbsd[1-2].* | openbsd3.[0-8] | openbsd3.[0-8].*) gl_cv_func_printf_sizes_c99="guessing no";; openbsd*) gl_cv_func_printf_sizes_c99="guessing yes";; # Guess yes on Solaris >= 2.10. solaris2.[0-9]*) gl_cv_func_printf_sizes_c99="guessing no";; solaris*) gl_cv_func_printf_sizes_c99="guessing yes";; # Guess yes on NetBSD >= 3. netbsd[1-2]* | netbsdelf[1-2]* | netbsdaout[1-2]* | netbsdcoff[1-2]*) gl_cv_func_printf_sizes_c99="guessing no";; netbsd*) gl_cv_func_printf_sizes_c99="guessing yes";; # If we don't know, assume the worst. *) gl_cv_func_printf_sizes_c99="guessing no";; esac else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #include #include #include #if HAVE_STDINT_H_WITH_UINTMAX # include #endif #if HAVE_INTTYPES_H_WITH_UINTMAX # include #endif static char buf[100]; int main () { #if HAVE_STDINT_H_WITH_UINTMAX || HAVE_INTTYPES_H_WITH_UINTMAX buf[0] = '\0'; if (sprintf (buf, "%ju %d", (uintmax_t) 12345671, 33, 44, 55) < 0 || strcmp (buf, "12345671 33") != 0) return 1; #endif buf[0] = '\0'; if (sprintf (buf, "%zu %d", (size_t) 12345672, 33, 44, 55) < 0 || strcmp (buf, "12345672 33") != 0) return 1; buf[0] = '\0'; if (sprintf (buf, "%tu %d", (ptrdiff_t) 12345673, 33, 44, 55) < 0 || strcmp (buf, "12345673 33") != 0) return 1; buf[0] = '\0'; if (sprintf (buf, "%Lg %d", (long double) 1.5, 33, 44, 55) < 0 || strcmp (buf, "1.5 33") != 0) return 1; return 0; } _ACEOF rm -f conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' { (case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_try") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then gl_cv_func_printf_sizes_c99=yes else $as_echo "$as_me: program exited with status $ac_status" >&5 $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) gl_cv_func_printf_sizes_c99=no fi rm -rf conftest.dSYM rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi fi { $as_echo "$as_me:$LINENO: result: $gl_cv_func_printf_sizes_c99" >&5 $as_echo "$gl_cv_func_printf_sizes_c99" >&6; } { $as_echo "$as_me:$LINENO: checking whether printf supports 'long double' arguments" >&5 $as_echo_n "checking whether printf supports 'long double' arguments... " >&6; } if test "${gl_cv_func_printf_long_double+set}" = set; then $as_echo_n "(cached) " >&6 else if test "$cross_compiling" = yes; then case "$host_os" in beos*) gl_cv_func_printf_long_double="guessing no";; mingw* | pw*) gl_cv_func_printf_long_double="guessing no";; *) gl_cv_func_printf_long_double="guessing yes";; esac else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #include static char buf[10000]; int main () { buf[0] = '\0'; if (sprintf (buf, "%Lf %d", 1.75L, 33, 44, 55) < 0 || strcmp (buf, "1.750000 33") != 0) return 1; buf[0] = '\0'; if (sprintf (buf, "%Le %d", 1.75L, 33, 44, 55) < 0 || strcmp (buf, "1.750000e+00 33") != 0) return 1; buf[0] = '\0'; if (sprintf (buf, "%Lg %d", 1.75L, 33, 44, 55) < 0 || strcmp (buf, "1.75 33") != 0) return 1; return 0; } _ACEOF rm -f conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' { (case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_try") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then gl_cv_func_printf_long_double=yes else $as_echo "$as_me: program exited with status $ac_status" >&5 $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) gl_cv_func_printf_long_double=no fi rm -rf conftest.dSYM rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi fi { $as_echo "$as_me:$LINENO: result: $gl_cv_func_printf_long_double" >&5 $as_echo "$gl_cv_func_printf_long_double" >&6; } { $as_echo "$as_me:$LINENO: checking whether printf supports infinite 'double' arguments" >&5 $as_echo_n "checking whether printf supports infinite 'double' arguments... " >&6; } if test "${gl_cv_func_printf_infinite+set}" = set; then $as_echo_n "(cached) " >&6 else if test "$cross_compiling" = yes; then case "$host_os" in # Guess yes on glibc systems. *-gnu*) gl_cv_func_printf_infinite="guessing yes";; # Guess yes on FreeBSD >= 6. freebsd[1-5]*) gl_cv_func_printf_infinite="guessing no";; freebsd* | kfreebsd*) gl_cv_func_printf_infinite="guessing yes";; # Guess yes on MacOS X >= 10.3. darwin[1-6].*) gl_cv_func_printf_infinite="guessing no";; darwin*) gl_cv_func_printf_infinite="guessing yes";; # Guess yes on HP-UX >= 11. hpux[7-9]* | hpux10*) gl_cv_func_printf_infinite="guessing no";; hpux*) gl_cv_func_printf_infinite="guessing yes";; # Guess yes on NetBSD >= 3. netbsd[1-2]* | netbsdelf[1-2]* | netbsdaout[1-2]* | netbsdcoff[1-2]*) gl_cv_func_printf_infinite="guessing no";; netbsd*) gl_cv_func_printf_infinite="guessing yes";; # Guess yes on BeOS. beos*) gl_cv_func_printf_infinite="guessing yes";; # If we don't know, assume the worst. *) gl_cv_func_printf_infinite="guessing no";; esac else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #include static int strisnan (const char *string, size_t start_index, size_t end_index) { if (start_index < end_index) { if (string[start_index] == '-') start_index++; if (start_index + 3 <= end_index && memcmp (string + start_index, "nan", 3) == 0) { start_index += 3; if (start_index == end_index || (string[start_index] == '(' && string[end_index - 1] == ')')) return 1; } } return 0; } static int have_minus_zero () { static double plus_zero = 0.0; double minus_zero = - plus_zero; return memcmp (&plus_zero, &minus_zero, sizeof (double)) != 0; } static char buf[10000]; static double zero = 0.0; int main () { if (sprintf (buf, "%f", 1.0 / 0.0) < 0 || (strcmp (buf, "inf") != 0 && strcmp (buf, "infinity") != 0)) return 1; if (sprintf (buf, "%f", -1.0 / 0.0) < 0 || (strcmp (buf, "-inf") != 0 && strcmp (buf, "-infinity") != 0)) return 1; if (sprintf (buf, "%f", zero / zero) < 0 || !strisnan (buf, 0, strlen (buf))) return 1; if (sprintf (buf, "%e", 1.0 / 0.0) < 0 || (strcmp (buf, "inf") != 0 && strcmp (buf, "infinity") != 0)) return 1; if (sprintf (buf, "%e", -1.0 / 0.0) < 0 || (strcmp (buf, "-inf") != 0 && strcmp (buf, "-infinity") != 0)) return 1; if (sprintf (buf, "%e", zero / zero) < 0 || !strisnan (buf, 0, strlen (buf))) return 1; if (sprintf (buf, "%g", 1.0 / 0.0) < 0 || (strcmp (buf, "inf") != 0 && strcmp (buf, "infinity") != 0)) return 1; if (sprintf (buf, "%g", -1.0 / 0.0) < 0 || (strcmp (buf, "-inf") != 0 && strcmp (buf, "-infinity") != 0)) return 1; if (sprintf (buf, "%g", zero / zero) < 0 || !strisnan (buf, 0, strlen (buf))) return 1; /* This test fails on HP-UX 10.20. */ if (have_minus_zero ()) if (sprintf (buf, "%g", - zero) < 0 || strcmp (buf, "-0") != 0) return 1; return 0; } _ACEOF rm -f conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' { (case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_try") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then gl_cv_func_printf_infinite=yes else $as_echo "$as_me: program exited with status $ac_status" >&5 $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) gl_cv_func_printf_infinite=no fi rm -rf conftest.dSYM rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi fi { $as_echo "$as_me:$LINENO: result: $gl_cv_func_printf_infinite" >&5 $as_echo "$gl_cv_func_printf_infinite" >&6; } if test -n "$gl_printf_safe"; then cat >>confdefs.h <<\_ACEOF #define CHECK_PRINTF_SAFE 1 _ACEOF fi case "$gl_cv_func_printf_long_double" in *yes) { $as_echo "$as_me:$LINENO: checking whether printf supports infinite 'long double' arguments" >&5 $as_echo_n "checking whether printf supports infinite 'long double' arguments... " >&6; } if test "${gl_cv_func_printf_infinite_long_double+set}" = set; then $as_echo_n "(cached) " >&6 else if test "$cross_compiling" = yes; then case "$host_cpu" in # Guess no on ia64, x86_64, i386. ia64 | x86_64 | i*86) gl_cv_func_printf_infinite_long_double="guessing no";; *) case "$host_os" in # Guess yes on glibc systems. *-gnu*) gl_cv_func_printf_infinite_long_double="guessing yes";; # Guess yes on FreeBSD >= 6. freebsd[1-5]*) gl_cv_func_printf_infinite_long_double="guessing no";; freebsd* | kfreebsd*) gl_cv_func_printf_infinite_long_double="guessing yes";; # Guess yes on MacOS X >= 10.3. darwin[1-6].*) gl_cv_func_printf_infinite_long_double="guessing no";; darwin*) gl_cv_func_printf_infinite_long_double="guessing yes";; # Guess yes on HP-UX >= 11. hpux[7-9]* | hpux10*) gl_cv_func_printf_infinite_long_double="guessing no";; hpux*) gl_cv_func_printf_infinite_long_double="guessing yes";; # Guess yes on NetBSD >= 3. netbsd[1-2]* | netbsdelf[1-2]* | netbsdaout[1-2]* | netbsdcoff[1-2]*) gl_cv_func_printf_infinite_long_double="guessing no";; netbsd*) gl_cv_func_printf_infinite_long_double="guessing yes";; # If we don't know, assume the worst. *) gl_cv_func_printf_infinite_long_double="guessing no";; esac ;; esac else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #if defined __MACH__ && defined __APPLE__ /* Avoid a crash on MacOS X. */ #include #include #include #include #include #include /* The exception port on which our thread listens. */ static mach_port_t our_exception_port; /* The main function of the thread listening for exceptions of type EXC_BAD_ACCESS. */ static void * mach_exception_thread (void *arg) { /* Buffer for a message to be received. */ struct { mach_msg_header_t head; mach_msg_body_t msgh_body; char data[1024]; } msg; mach_msg_return_t retval; /* Wait for a message on the exception port. */ retval = mach_msg (&msg.head, MACH_RCV_MSG | MACH_RCV_LARGE, 0, sizeof (msg), our_exception_port, MACH_MSG_TIMEOUT_NONE, MACH_PORT_NULL); if (retval != MACH_MSG_SUCCESS) abort (); exit (1); } static void nocrash_init (void) { mach_port_t self = mach_task_self (); /* Allocate a port on which the thread shall listen for exceptions. */ if (mach_port_allocate (self, MACH_PORT_RIGHT_RECEIVE, &our_exception_port) == KERN_SUCCESS) { /* See http://web.mit.edu/darwin/src/modules/xnu/osfmk/man/mach_port_insert_right.html. */ if (mach_port_insert_right (self, our_exception_port, our_exception_port, MACH_MSG_TYPE_MAKE_SEND) == KERN_SUCCESS) { /* The exceptions we want to catch. Only EXC_BAD_ACCESS is interesting for us. */ exception_mask_t mask = EXC_MASK_BAD_ACCESS; /* Create the thread listening on the exception port. */ pthread_attr_t attr; pthread_t thread; if (pthread_attr_init (&attr) == 0 && pthread_attr_setdetachstate (&attr, PTHREAD_CREATE_DETACHED) == 0 && pthread_create (&thread, &attr, mach_exception_thread, NULL) == 0) { pthread_attr_destroy (&attr); /* Replace the exception port info for these exceptions with our own. Note that we replace the exception port for the entire task, not only for a particular thread. This has the effect that when our exception port gets the message, the thread specific exception port has already been asked, and we don't need to bother about it. See http://web.mit.edu/darwin/src/modules/xnu/osfmk/man/task_set_exception_ports.html. */ task_set_exception_ports (self, mask, our_exception_port, EXCEPTION_DEFAULT, MACHINE_THREAD_STATE); } } } } #else /* Avoid a crash on POSIX systems. */ #include /* A POSIX signal handler. */ static void exception_handler (int sig) { exit (1); } static void nocrash_init (void) { #ifdef SIGSEGV signal (SIGSEGV, exception_handler); #endif #ifdef SIGBUS signal (SIGBUS, exception_handler); #endif } #endif #include #include #include static int strisnan (const char *string, size_t start_index, size_t end_index) { if (start_index < end_index) { if (string[start_index] == '-') start_index++; if (start_index + 3 <= end_index && memcmp (string + start_index, "nan", 3) == 0) { start_index += 3; if (start_index == end_index || (string[start_index] == '(' && string[end_index - 1] == ')')) return 1; } } return 0; } static char buf[10000]; static long double zeroL = 0.0L; int main () { nocrash_init(); if (sprintf (buf, "%Lf", 1.0L / 0.0L) < 0 || (strcmp (buf, "inf") != 0 && strcmp (buf, "infinity") != 0)) return 1; if (sprintf (buf, "%Lf", -1.0L / 0.0L) < 0 || (strcmp (buf, "-inf") != 0 && strcmp (buf, "-infinity") != 0)) return 1; if (sprintf (buf, "%Lf", zeroL / zeroL) < 0 || !strisnan (buf, 0, strlen (buf))) return 1; if (sprintf (buf, "%Le", 1.0L / 0.0L) < 0 || (strcmp (buf, "inf") != 0 && strcmp (buf, "infinity") != 0)) return 1; if (sprintf (buf, "%Le", -1.0L / 0.0L) < 0 || (strcmp (buf, "-inf") != 0 && strcmp (buf, "-infinity") != 0)) return 1; if (sprintf (buf, "%Le", zeroL / zeroL) < 0 || !strisnan (buf, 0, strlen (buf))) return 1; if (sprintf (buf, "%Lg", 1.0L / 0.0L) < 0 || (strcmp (buf, "inf") != 0 && strcmp (buf, "infinity") != 0)) return 1; if (sprintf (buf, "%Lg", -1.0L / 0.0L) < 0 || (strcmp (buf, "-inf") != 0 && strcmp (buf, "-infinity") != 0)) return 1; if (sprintf (buf, "%Lg", zeroL / zeroL) < 0 || !strisnan (buf, 0, strlen (buf))) return 1; #if CHECK_PRINTF_SAFE && ((defined __ia64 && LDBL_MANT_DIG == 64) || (defined __x86_64__ || defined __amd64__) || (defined __i386 || defined __i386__ || defined _I386 || defined _M_IX86 || defined _X86_)) /* Representation of an 80-bit 'long double' as an initializer for a sequence of 'unsigned int' words. */ # ifdef WORDS_BIGENDIAN # define LDBL80_WORDS(exponent,manthi,mantlo) \ { ((unsigned int) (exponent) << 16) | ((unsigned int) (manthi) >> 16), \ ((unsigned int) (manthi) << 16) | (unsigned int) (mantlo) >> 16), \ (unsigned int) (mantlo) << 16 \ } # else # define LDBL80_WORDS(exponent,manthi,mantlo) \ { mantlo, manthi, exponent } # endif { /* Quiet NaN. */ static union { unsigned int word[4]; long double value; } x = { LDBL80_WORDS (0xFFFF, 0xC3333333, 0x00000000) }; if (sprintf (buf, "%Lf", x.value) < 0 || !strisnan (buf, 0, strlen (buf))) return 1; if (sprintf (buf, "%Le", x.value) < 0 || !strisnan (buf, 0, strlen (buf))) return 1; if (sprintf (buf, "%Lg", x.value) < 0 || !strisnan (buf, 0, strlen (buf))) return 1; } { /* Signalling NaN. */ static union { unsigned int word[4]; long double value; } x = { LDBL80_WORDS (0xFFFF, 0x83333333, 0x00000000) }; if (sprintf (buf, "%Lf", x.value) < 0 || !strisnan (buf, 0, strlen (buf))) return 1; if (sprintf (buf, "%Le", x.value) < 0 || !strisnan (buf, 0, strlen (buf))) return 1; if (sprintf (buf, "%Lg", x.value) < 0 || !strisnan (buf, 0, strlen (buf))) return 1; } { /* Pseudo-NaN. */ static union { unsigned int word[4]; long double value; } x = { LDBL80_WORDS (0xFFFF, 0x40000001, 0x00000000) }; if (sprintf (buf, "%Lf", x.value) < 0 || !strisnan (buf, 0, strlen (buf))) return 1; if (sprintf (buf, "%Le", x.value) < 0 || !strisnan (buf, 0, strlen (buf))) return 1; if (sprintf (buf, "%Lg", x.value) < 0 || !strisnan (buf, 0, strlen (buf))) return 1; } { /* Pseudo-Infinity. */ static union { unsigned int word[4]; long double value; } x = { LDBL80_WORDS (0xFFFF, 0x00000000, 0x00000000) }; if (sprintf (buf, "%Lf", x.value) < 0 || !strisnan (buf, 0, strlen (buf))) return 1; if (sprintf (buf, "%Le", x.value) < 0 || !strisnan (buf, 0, strlen (buf))) return 1; if (sprintf (buf, "%Lg", x.value) < 0 || !strisnan (buf, 0, strlen (buf))) return 1; } { /* Pseudo-Zero. */ static union { unsigned int word[4]; long double value; } x = { LDBL80_WORDS (0x4004, 0x00000000, 0x00000000) }; if (sprintf (buf, "%Lf", x.value) < 0 || !strisnan (buf, 0, strlen (buf))) return 1; if (sprintf (buf, "%Le", x.value) < 0 || !strisnan (buf, 0, strlen (buf))) return 1; if (sprintf (buf, "%Lg", x.value) < 0 || !strisnan (buf, 0, strlen (buf))) return 1; } { /* Unnormalized number. */ static union { unsigned int word[4]; long double value; } x = { LDBL80_WORDS (0x4000, 0x63333333, 0x00000000) }; if (sprintf (buf, "%Lf", x.value) < 0 || !strisnan (buf, 0, strlen (buf))) return 1; if (sprintf (buf, "%Le", x.value) < 0 || !strisnan (buf, 0, strlen (buf))) return 1; if (sprintf (buf, "%Lg", x.value) < 0 || !strisnan (buf, 0, strlen (buf))) return 1; } { /* Pseudo-Denormal. */ static union { unsigned int word[4]; long double value; } x = { LDBL80_WORDS (0x0000, 0x83333333, 0x00000000) }; if (sprintf (buf, "%Lf", x.value) < 0 || !strisnan (buf, 0, strlen (buf))) return 1; if (sprintf (buf, "%Le", x.value) < 0 || !strisnan (buf, 0, strlen (buf))) return 1; if (sprintf (buf, "%Lg", x.value) < 0 || !strisnan (buf, 0, strlen (buf))) return 1; } #endif return 0; } _ACEOF rm -f conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' { (case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_try") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then gl_cv_func_printf_infinite_long_double=yes else $as_echo "$as_me: program exited with status $ac_status" >&5 $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) gl_cv_func_printf_infinite_long_double=no fi rm -rf conftest.dSYM rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi fi { $as_echo "$as_me:$LINENO: result: $gl_cv_func_printf_infinite_long_double" >&5 $as_echo "$gl_cv_func_printf_infinite_long_double" >&6; } ;; *) gl_cv_func_printf_infinite_long_double="irrelevant" ;; esac { $as_echo "$as_me:$LINENO: checking whether printf supports the 'a' and 'A' directives" >&5 $as_echo_n "checking whether printf supports the 'a' and 'A' directives... " >&6; } if test "${gl_cv_func_printf_directive_a+set}" = set; then $as_echo_n "(cached) " >&6 else if test "$cross_compiling" = yes; then case "$host_os" in # Guess yes on glibc >= 2.5 systems. *-gnu*) cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #ifdef __GNU_LIBRARY__ #if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 5) || (__GLIBC__ > 2) BZ2908 #endif #endif _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "BZ2908" >/dev/null 2>&1; then gl_cv_func_printf_directive_a="guessing yes" else gl_cv_func_printf_directive_a="guessing no" fi rm -f conftest* ;; # If we don't know, assume the worst. *) gl_cv_func_printf_directive_a="guessing no";; esac else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #include static char buf[100]; int main () { if (sprintf (buf, "%a %d", 3.1416015625, 33, 44, 55) < 0 || (strcmp (buf, "0x1.922p+1 33") != 0 && strcmp (buf, "0x3.244p+0 33") != 0 && strcmp (buf, "0x6.488p-1 33") != 0 && strcmp (buf, "0xc.91p-2 33") != 0)) return 1; if (sprintf (buf, "%A %d", -3.1416015625, 33, 44, 55) < 0 || (strcmp (buf, "-0X1.922P+1 33") != 0 && strcmp (buf, "-0X3.244P+0 33") != 0 && strcmp (buf, "-0X6.488P-1 33") != 0 && strcmp (buf, "-0XC.91P-2 33") != 0)) return 1; /* This catches a FreeBSD 6.1 bug: it doesn't round. */ if (sprintf (buf, "%.2a %d", 1.51, 33, 44, 55) < 0 || (strcmp (buf, "0x1.83p+0 33") != 0 && strcmp (buf, "0x3.05p-1 33") != 0 && strcmp (buf, "0x6.0ap-2 33") != 0 && strcmp (buf, "0xc.14p-3 33") != 0)) return 1; /* This catches a FreeBSD 6.1 bug. See */ if (sprintf (buf, "%010a %d", 1.0 / 0.0, 33, 44, 55) < 0 || buf[0] == '0') return 1; /* This catches a MacOS X 10.3.9 (Darwin 7.9) bug. */ if (sprintf (buf, "%.1a", 1.999) < 0 || (strcmp (buf, "0x1.0p+1") != 0 && strcmp (buf, "0x2.0p+0") != 0 && strcmp (buf, "0x4.0p-1") != 0 && strcmp (buf, "0x8.0p-2") != 0)) return 1; /* This catches the same MacOS X 10.3.9 (Darwin 7.9) bug and also a glibc 2.4 bug . */ if (sprintf (buf, "%.1La", 1.999L) < 0 || (strcmp (buf, "0x1.0p+1") != 0 && strcmp (buf, "0x2.0p+0") != 0 && strcmp (buf, "0x4.0p-1") != 0 && strcmp (buf, "0x8.0p-2") != 0)) return 1; return 0; } _ACEOF rm -f conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' { (case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_try") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then gl_cv_func_printf_directive_a=yes else $as_echo "$as_me: program exited with status $ac_status" >&5 $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) gl_cv_func_printf_directive_a=no fi rm -rf conftest.dSYM rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi fi { $as_echo "$as_me:$LINENO: result: $gl_cv_func_printf_directive_a" >&5 $as_echo "$gl_cv_func_printf_directive_a" >&6; } { $as_echo "$as_me:$LINENO: checking whether printf supports the 'F' directive" >&5 $as_echo_n "checking whether printf supports the 'F' directive... " >&6; } if test "${gl_cv_func_printf_directive_f+set}" = set; then $as_echo_n "(cached) " >&6 else if test "$cross_compiling" = yes; then case "$host_os" in # Guess yes on glibc systems. *-gnu*) gl_cv_func_printf_directive_f="guessing yes";; # Guess yes on FreeBSD >= 6. freebsd[1-5]*) gl_cv_func_printf_directive_f="guessing no";; freebsd* | kfreebsd*) gl_cv_func_printf_directive_f="guessing yes";; # Guess yes on MacOS X >= 10.3. darwin[1-6].*) gl_cv_func_printf_directive_f="guessing no";; darwin*) gl_cv_func_printf_directive_f="guessing yes";; # Guess yes on Solaris >= 2.10. solaris2.[0-9]*) gl_cv_func_printf_directive_f="guessing no";; solaris*) gl_cv_func_printf_directive_f="guessing yes";; # If we don't know, assume the worst. *) gl_cv_func_printf_directive_f="guessing no";; esac else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #include static char buf[100]; int main () { if (sprintf (buf, "%F %d", 1234567.0, 33, 44, 55) < 0 || strcmp (buf, "1234567.000000 33") != 0) return 1; if (sprintf (buf, "%F", 1.0 / 0.0) < 0 || (strcmp (buf, "INF") != 0 && strcmp (buf, "INFINITY") != 0)) return 1; /* This catches a Cygwin 1.5.x bug. */ if (sprintf (buf, "%.F", 1234.0) < 0 || strcmp (buf, "1234") != 0) return 1; return 0; } _ACEOF rm -f conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' { (case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_try") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then gl_cv_func_printf_directive_f=yes else $as_echo "$as_me: program exited with status $ac_status" >&5 $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) gl_cv_func_printf_directive_f=no fi rm -rf conftest.dSYM rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi fi { $as_echo "$as_me:$LINENO: result: $gl_cv_func_printf_directive_f" >&5 $as_echo "$gl_cv_func_printf_directive_f" >&6; } { $as_echo "$as_me:$LINENO: checking whether printf supports the 'n' directive" >&5 $as_echo_n "checking whether printf supports the 'n' directive... " >&6; } if test "${gl_cv_func_printf_directive_n+set}" = set; then $as_echo_n "(cached) " >&6 else if test "$cross_compiling" = yes; then case "$host_os" in *) gl_cv_func_printf_directive_n="guessing yes";; esac else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #include static char fmtstring[10]; static char buf[100]; int main () { int count = -1; /* Copy the format string. Some systems (glibc with _FORTIFY_SOURCE=2) support %n in format strings in read-only memory but not in writable memory. */ strcpy (fmtstring, "%d %n"); if (sprintf (buf, fmtstring, 123, &count, 33, 44, 55) < 0 || strcmp (buf, "123 ") != 0 || count != 4) return 1; return 0; } _ACEOF rm -f conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' { (case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_try") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then gl_cv_func_printf_directive_n=yes else $as_echo "$as_me: program exited with status $ac_status" >&5 $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) gl_cv_func_printf_directive_n=no fi rm -rf conftest.dSYM rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi fi { $as_echo "$as_me:$LINENO: result: $gl_cv_func_printf_directive_n" >&5 $as_echo "$gl_cv_func_printf_directive_n" >&6; } { $as_echo "$as_me:$LINENO: checking whether printf supports the 'ls' directive" >&5 $as_echo_n "checking whether printf supports the 'ls' directive... " >&6; } if test "${gl_cv_func_printf_directive_ls+set}" = set; then $as_echo_n "(cached) " >&6 else if test "$cross_compiling" = yes; then case "$host_os" in openbsd*) gl_cv_func_printf_directive_ls="guessing no";; irix*) gl_cv_func_printf_directive_ls="guessing no";; solaris*) gl_cv_func_printf_directive_ls="guessing no";; cygwin*) gl_cv_func_printf_directive_ls="guessing no";; beos* | haiku*) gl_cv_func_printf_directive_ls="guessing no";; *) gl_cv_func_printf_directive_ls="guessing yes";; esac else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Tru64 with Desktop Toolkit C has a bug: must be included before . BSD/OS 4.0.1 has a bug: , and must be included before . */ #include #include #include #include #include int main () { char buf[100]; /* Test whether %ls works at all. This test fails on OpenBSD 4.0, IRIX 6.5, Solaris 2.6, Haiku, but not on Cygwin 1.5. */ { static const wchar_t wstring[] = { 'a', 'b', 'c', 0 }; buf[0] = '\0'; if (sprintf (buf, "%ls", wstring) < 0 || strcmp (buf, "abc") != 0) return 1; } /* This test fails on IRIX 6.5, Solaris 2.6, Cygwin 1.5, Haiku (with an assertion failure inside libc), but not on OpenBSD 4.0. */ { static const wchar_t wstring[] = { 'a', 0 }; buf[0] = '\0'; if (sprintf (buf, "%ls", wstring) < 0 || strcmp (buf, "a") != 0) return 1; } /* Test whether precisions in %ls are supported as specified in ISO C 99 section 7.19.6.1: "If a precision is specified, no more than that many bytes are written (including shift sequences, if any), and the array shall contain a null wide character if, to equal the multibyte character sequence length given by the precision, the function would need to access a wide character one past the end of the array." This test fails on Solaris 10. */ { static const wchar_t wstring[] = { 'a', 'b', (wchar_t) 0xfdfdfdfd, 0 }; buf[0] = '\0'; if (sprintf (buf, "%.2ls", wstring) < 0 || strcmp (buf, "ab") != 0) return 1; } return 0; } _ACEOF rm -f conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' { (case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_try") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then gl_cv_func_printf_directive_ls=yes else $as_echo "$as_me: program exited with status $ac_status" >&5 $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) gl_cv_func_printf_directive_ls=no fi rm -rf conftest.dSYM rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi fi { $as_echo "$as_me:$LINENO: result: $gl_cv_func_printf_directive_ls" >&5 $as_echo "$gl_cv_func_printf_directive_ls" >&6; } { $as_echo "$as_me:$LINENO: checking whether printf supports POSIX/XSI format strings with positions" >&5 $as_echo_n "checking whether printf supports POSIX/XSI format strings with positions... " >&6; } if test "${gl_cv_func_printf_positions+set}" = set; then $as_echo_n "(cached) " >&6 else if test "$cross_compiling" = yes; then case "$host_os" in netbsd[1-3]* | netbsdelf[1-3]* | netbsdaout[1-3]* | netbsdcoff[1-3]*) gl_cv_func_printf_positions="guessing no";; beos*) gl_cv_func_printf_positions="guessing no";; mingw* | pw*) gl_cv_func_printf_positions="guessing no";; *) gl_cv_func_printf_positions="guessing yes";; esac else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #include /* The string "%2$d %1$d", with dollar characters protected from the shell's dollar expansion (possibly an autoconf bug). */ static char format[] = { '%', '2', '$', 'd', ' ', '%', '1', '$', 'd', '\0' }; static char buf[100]; int main () { sprintf (buf, format, 33, 55); return (strcmp (buf, "55 33") != 0); } _ACEOF rm -f conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' { (case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_try") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then gl_cv_func_printf_positions=yes else $as_echo "$as_me: program exited with status $ac_status" >&5 $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) gl_cv_func_printf_positions=no fi rm -rf conftest.dSYM rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi fi { $as_echo "$as_me:$LINENO: result: $gl_cv_func_printf_positions" >&5 $as_echo "$gl_cv_func_printf_positions" >&6; } { $as_echo "$as_me:$LINENO: checking whether printf supports the grouping flag" >&5 $as_echo_n "checking whether printf supports the grouping flag... " >&6; } if test "${gl_cv_func_printf_flag_grouping+set}" = set; then $as_echo_n "(cached) " >&6 else if test "$cross_compiling" = yes; then case "$host_os" in cygwin*) gl_cv_func_printf_flag_grouping="guessing no";; netbsd*) gl_cv_func_printf_flag_grouping="guessing no";; mingw* | pw*) gl_cv_func_printf_flag_grouping="guessing no";; *) gl_cv_func_printf_flag_grouping="guessing yes";; esac else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #include static char buf[100]; int main () { if (sprintf (buf, "%'d %d", 1234567, 99) < 0 || buf[strlen (buf) - 1] != '9') return 1; return 0; } _ACEOF rm -f conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' { (case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_try") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then gl_cv_func_printf_flag_grouping=yes else $as_echo "$as_me: program exited with status $ac_status" >&5 $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) gl_cv_func_printf_flag_grouping=no fi rm -rf conftest.dSYM rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi fi { $as_echo "$as_me:$LINENO: result: $gl_cv_func_printf_flag_grouping" >&5 $as_echo "$gl_cv_func_printf_flag_grouping" >&6; } { $as_echo "$as_me:$LINENO: checking whether printf supports the left-adjust flag correctly" >&5 $as_echo_n "checking whether printf supports the left-adjust flag correctly... " >&6; } if test "${gl_cv_func_printf_flag_leftadjust+set}" = set; then $as_echo_n "(cached) " >&6 else if test "$cross_compiling" = yes; then case "$host_os" in # Guess yes on HP-UX 11. hpux11*) gl_cv_func_printf_flag_leftadjust="guessing yes";; # Guess no on HP-UX 10 and older. hpux*) gl_cv_func_printf_flag_leftadjust="guessing no";; # Guess yes otherwise. *) gl_cv_func_printf_flag_leftadjust="guessing yes";; esac else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #include static char buf[100]; int main () { /* Check that a '-' flag is not annihilated by a negative width. */ if (sprintf (buf, "a%-*sc", -3, "b") < 0 || strcmp (buf, "ab c") != 0) return 1; return 0; } _ACEOF rm -f conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' { (case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_try") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then gl_cv_func_printf_flag_leftadjust=yes else $as_echo "$as_me: program exited with status $ac_status" >&5 $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) gl_cv_func_printf_flag_leftadjust=no fi rm -rf conftest.dSYM rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi fi { $as_echo "$as_me:$LINENO: result: $gl_cv_func_printf_flag_leftadjust" >&5 $as_echo "$gl_cv_func_printf_flag_leftadjust" >&6; } { $as_echo "$as_me:$LINENO: checking whether printf supports the zero flag correctly" >&5 $as_echo_n "checking whether printf supports the zero flag correctly... " >&6; } if test "${gl_cv_func_printf_flag_zero+set}" = set; then $as_echo_n "(cached) " >&6 else if test "$cross_compiling" = yes; then case "$host_os" in # Guess yes on glibc systems. *-gnu*) gl_cv_func_printf_flag_zero="guessing yes";; # Guess yes on BeOS. beos*) gl_cv_func_printf_flag_zero="guessing yes";; # If we don't know, assume the worst. *) gl_cv_func_printf_flag_zero="guessing no";; esac else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #include static char buf[100]; int main () { if (sprintf (buf, "%010f", 1.0 / 0.0, 33, 44, 55) < 0 || (strcmp (buf, " inf") != 0 && strcmp (buf, " infinity") != 0)) return 1; return 0; } _ACEOF rm -f conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' { (case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_try") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then gl_cv_func_printf_flag_zero=yes else $as_echo "$as_me: program exited with status $ac_status" >&5 $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) gl_cv_func_printf_flag_zero=no fi rm -rf conftest.dSYM rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi fi { $as_echo "$as_me:$LINENO: result: $gl_cv_func_printf_flag_zero" >&5 $as_echo "$gl_cv_func_printf_flag_zero" >&6; } { $as_echo "$as_me:$LINENO: checking whether printf supports large precisions" >&5 $as_echo_n "checking whether printf supports large precisions... " >&6; } if test "${gl_cv_func_printf_precision+set}" = set; then $as_echo_n "(cached) " >&6 else if test "$cross_compiling" = yes; then case "$host_os" in # Guess no only on native Win32 and BeOS systems. mingw* | pw*) gl_cv_func_printf_precision="guessing no" ;; beos*) gl_cv_func_printf_precision="guessing no" ;; *) gl_cv_func_printf_precision="guessing yes" ;; esac else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #include static char buf[5000]; int main () { #ifdef __BEOS__ /* On BeOS, this would crash and show a dialog box. Avoid the crash. */ return 1; #endif if (sprintf (buf, "%.4000d %d", 1, 33, 44) < 4000 + 3) return 1; return 0; } _ACEOF rm -f conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' { (case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_try") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then gl_cv_func_printf_precision=yes else $as_echo "$as_me: program exited with status $ac_status" >&5 $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) gl_cv_func_printf_precision=no fi rm -rf conftest.dSYM rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi fi { $as_echo "$as_me:$LINENO: result: $gl_cv_func_printf_precision" >&5 $as_echo "$gl_cv_func_printf_precision" >&6; } { $as_echo "$as_me:$LINENO: checking whether printf survives out-of-memory conditions" >&5 $as_echo_n "checking whether printf survives out-of-memory conditions... " >&6; } if test "${gl_cv_func_printf_enomem+set}" = set; then $as_echo_n "(cached) " >&6 else gl_cv_func_printf_enomem="guessing no" if test "$cross_compiling" = no; then if test $APPLE_UNIVERSAL_BUILD = 0; then cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #if defined __MACH__ && defined __APPLE__ /* Avoid a crash on MacOS X. */ #include #include #include #include #include #include /* The exception port on which our thread listens. */ static mach_port_t our_exception_port; /* The main function of the thread listening for exceptions of type EXC_BAD_ACCESS. */ static void * mach_exception_thread (void *arg) { /* Buffer for a message to be received. */ struct { mach_msg_header_t head; mach_msg_body_t msgh_body; char data1024; } msg; mach_msg_return_t retval; /* Wait for a message on the exception port. */ retval = mach_msg (&msg.head, MACH_RCV_MSG | MACH_RCV_LARGE, 0, sizeof (msg), our_exception_port, MACH_MSG_TIMEOUT_NONE, MACH_PORT_NULL); if (retval != MACH_MSG_SUCCESS) abort (); exit (1); } static void nocrash_init (void) { mach_port_t self = mach_task_self (); /* Allocate a port on which the thread shall listen for exceptions. */ if (mach_port_allocate (self, MACH_PORT_RIGHT_RECEIVE, &our_exception_port) == KERN_SUCCESS) { /* See http://web.mit.edu/darwin/src/modules/xnu/osfmk/man/mach_port_insert_right.html. */ if (mach_port_insert_right (self, our_exception_port, our_exception_port, MACH_MSG_TYPE_MAKE_SEND) == KERN_SUCCESS) { /* The exceptions we want to catch. Only EXC_BAD_ACCESS is interesting for us. */ exception_mask_t mask = EXC_MASK_BAD_ACCESS; /* Create the thread listening on the exception port. */ pthread_attr_t attr; pthread_t thread; if (pthread_attr_init (&attr) == 0 && pthread_attr_setdetachstate (&attr, PTHREAD_CREATE_DETACHED) == 0 && pthread_create (&thread, &attr, mach_exception_thread, NULL) == 0) { pthread_attr_destroy (&attr); /* Replace the exception port info for these exceptions with our own. Note that we replace the exception port for the entire task, not only for a particular thread. This has the effect that when our exception port gets the message, the thread specific exception port has already been asked, and we don't need to bother about it. See http://web.mit.edu/darwin/src/modules/xnu/osfmk/man/task_set_exception_ports.html. */ task_set_exception_ports (self, mask, our_exception_port, EXCEPTION_DEFAULT, MACHINE_THREAD_STATE); } } } } #else /* Avoid a crash on POSIX systems. */ #include /* A POSIX signal handler. */ static void exception_handler (int sig) { exit (1); } static void nocrash_init (void) { #ifdef SIGSEGV signal (SIGSEGV, exception_handler); #endif #ifdef SIGBUS signal (SIGBUS, exception_handler); #endif } #endif #include #include #include #include #include int main() { struct rlimit limit; int ret; nocrash_init (); /* Some printf implementations allocate temporary space with malloc. */ /* On BSD systems, malloc() is limited by RLIMIT_DATA. */ #ifdef RLIMIT_DATA if (getrlimit (RLIMIT_DATA, &limit) < 0) return 77; if (limit.rlim_max == RLIM_INFINITY || limit.rlim_max > 5000000) limit.rlim_max = 5000000; limit.rlim_cur = limit.rlim_max; if (setrlimit (RLIMIT_DATA, &limit) < 0) return 77; #endif /* On Linux systems, malloc() is limited by RLIMIT_AS. */ #ifdef RLIMIT_AS if (getrlimit (RLIMIT_AS, &limit) < 0) return 77; if (limit.rlim_max == RLIM_INFINITY || limit.rlim_max > 5000000) limit.rlim_max = 5000000; limit.rlim_cur = limit.rlim_max; if (setrlimit (RLIMIT_AS, &limit) < 0) return 77; #endif /* Some printf implementations allocate temporary space on the stack. */ #ifdef RLIMIT_STACK if (getrlimit (RLIMIT_STACK, &limit) < 0) return 77; if (limit.rlim_max == RLIM_INFINITY || limit.rlim_max > 5000000) limit.rlim_max = 5000000; limit.rlim_cur = limit.rlim_max; if (setrlimit (RLIMIT_STACK, &limit) < 0) return 77; #endif ret = printf ("%.5000000f", 1.0); return !(ret == 5000002 || (ret < 0 && errno == ENOMEM)); } _ACEOF if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && test -s conftest$ac_exeext; then (./conftest result=$? if test $result != 0 && test $result != 77; then result=1; fi exit $result ) >/dev/null 2>/dev/null case $? in 0) gl_cv_func_printf_enomem="yes" ;; 77) gl_cv_func_printf_enomem="guessing no" ;; *) gl_cv_func_printf_enomem="no" ;; esac else gl_cv_func_printf_enomem="guessing no" fi rm -fr conftest* else gl_cv_func_printf_enomem="guessing no" fi fi if test "$gl_cv_func_printf_enomem" = "guessing no"; then case "$host_os" in # Guess yes on glibc systems. *-gnu*) gl_cv_func_printf_enomem="guessing yes";; # Guess yes on Solaris. solaris*) gl_cv_func_printf_enomem="guessing yes";; # Guess yes on AIX. aix*) gl_cv_func_printf_enomem="guessing yes";; # Guess yes on HP-UX/hppa. hpux*) case "$host_cpu" in hppa*) gl_cv_func_printf_enomem="guessing yes";; *) gl_cv_func_printf_enomem="guessing no";; esac ;; # Guess yes on IRIX. irix*) gl_cv_func_printf_enomem="guessing yes";; # Guess yes on OSF/1. osf*) gl_cv_func_printf_enomem="guessing yes";; # Guess yes on BeOS. beos*) gl_cv_func_printf_enomem="guessing yes";; # Guess yes on Haiku. haiku*) gl_cv_func_printf_enomem="guessing yes";; # If we don't know, assume the worst. *) gl_cv_func_printf_enomem="guessing no";; esac fi fi { $as_echo "$as_me:$LINENO: result: $gl_cv_func_printf_enomem" >&5 $as_echo "$gl_cv_func_printf_enomem" >&6; } case "$gl_cv_func_printf_long_double" in *yes) ;; *) cat >>confdefs.h <<\_ACEOF #define NEED_PRINTF_LONG_DOUBLE 1 _ACEOF ;; esac { $as_echo "$as_me:$LINENO: checking for wchar_t" >&5 $as_echo_n "checking for wchar_t... " >&6; } if test "${gt_cv_c_wchar_t+set}" = set; then $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include wchar_t foo = (wchar_t)'\0'; int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then gt_cv_c_wchar_t=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 gt_cv_c_wchar_t=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:$LINENO: result: $gt_cv_c_wchar_t" >&5 $as_echo "$gt_cv_c_wchar_t" >&6; } if test $gt_cv_c_wchar_t = yes; then cat >>confdefs.h <<\_ACEOF #define HAVE_WCHAR_T 1 _ACEOF fi { $as_echo "$as_me:$LINENO: checking for wint_t" >&5 $as_echo_n "checking for wint_t... " >&6; } if test "${gt_cv_c_wint_t+set}" = set; then $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Tru64 with Desktop Toolkit C has a bug: must be included before . BSD/OS 4.0.1 has a bug: , and must be included before . */ #include #include #include #include wint_t foo = (wchar_t)'\0'; int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then gt_cv_c_wint_t=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 gt_cv_c_wint_t=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:$LINENO: result: $gt_cv_c_wint_t" >&5 $as_echo "$gt_cv_c_wint_t" >&6; } if test $gt_cv_c_wint_t = yes; then cat >>confdefs.h <<\_ACEOF #define HAVE_WINT_T 1 _ACEOF fi { $as_echo "$as_me:$LINENO: checking for intmax_t" >&5 $as_echo_n "checking for intmax_t... " >&6; } if test "${gt_cv_c_intmax_t+set}" = set; then $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #include #if HAVE_STDINT_H_WITH_UINTMAX #include #endif #if HAVE_INTTYPES_H_WITH_UINTMAX #include #endif int main () { intmax_t x = -1; return !x; ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then gt_cv_c_intmax_t=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 gt_cv_c_intmax_t=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:$LINENO: result: $gt_cv_c_intmax_t" >&5 $as_echo "$gt_cv_c_intmax_t" >&6; } if test $gt_cv_c_intmax_t = yes; then cat >>confdefs.h <<\_ACEOF #define HAVE_INTMAX_T 1 _ACEOF else test $ac_cv_type_long_long_int = yes \ && ac_type='long long' \ || ac_type='long' cat >>confdefs.h <<_ACEOF #define intmax_t $ac_type _ACEOF fi for ac_func in snprintf strnlen wcslen wcsnlen mbrtowc wcrtomb do as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` { $as_echo "$as_me:$LINENO: checking for $ac_func" >&5 $as_echo_n "checking for $ac_func... " >&6; } if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Define $ac_func to an innocuous variant, in case declares $ac_func. For example, HP-UX 11i declares gettimeofday. */ #define $ac_func innocuous_$ac_func /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $ac_func (); below. Prefer to if __STDC__ is defined, since exists even on freestanding compilers. */ #ifdef __STDC__ # include #else # include #endif #undef $ac_func /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char $ac_func (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined __stub_$ac_func || defined __stub___$ac_func choke me #endif int main () { return $ac_func (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || $as_test_x conftest$ac_exeext }; then eval "$as_ac_var=yes" else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 eval "$as_ac_var=no" fi rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi ac_res=`eval 'as_val=${'$as_ac_var'} $as_echo "$as_val"'` { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } as_val=`eval 'as_val=${'$as_ac_var'} $as_echo "$as_val"'` if test "x$as_val" = x""yes; then cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF fi done { $as_echo "$as_me:$LINENO: checking whether _snprintf is declared" >&5 $as_echo_n "checking whether _snprintf is declared... " >&6; } if test "${ac_cv_have_decl__snprintf+set}" = set; then $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include int main () { #ifndef _snprintf (void) _snprintf; #endif ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_cv_have_decl__snprintf=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_have_decl__snprintf=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:$LINENO: result: $ac_cv_have_decl__snprintf" >&5 $as_echo "$ac_cv_have_decl__snprintf" >&6; } if test "x$ac_cv_have_decl__snprintf" = x""yes; then cat >>confdefs.h <<_ACEOF #define HAVE_DECL__SNPRINTF 1 _ACEOF else cat >>confdefs.h <<_ACEOF #define HAVE_DECL__SNPRINTF 0 _ACEOF fi { $as_echo "$as_me:$LINENO: checking whether system is Windows or MSDOS" >&5 $as_echo_n "checking whether system is Windows or MSDOS... " >&6; } if test "${ac_cv_win_or_dos+set}" = set; then $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { #if !defined _WIN32 && !defined __WIN32__ && !defined __MSDOS__ && !defined __CYGWIN__ neither MSDOS nor Windows #endif ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_cv_win_or_dos=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_win_or_dos=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:$LINENO: result: $ac_cv_win_or_dos" >&5 $as_echo "$ac_cv_win_or_dos" >&6; } if test x"$ac_cv_win_or_dos" = xyes; then ac_fs_accepts_drive_letter_prefix=1 ac_fs_backslash_is_file_name_separator=1 { $as_echo "$as_me:$LINENO: checking whether drive letter can start relative path" >&5 $as_echo_n "checking whether drive letter can start relative path... " >&6; } if test "${ac_cv_drive_letter_can_be_relative+set}" = set; then $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { #if defined __CYGWIN__ drive letters are always absolute #endif ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_cv_drive_letter_can_be_relative=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_drive_letter_can_be_relative=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:$LINENO: result: $ac_cv_drive_letter_can_be_relative" >&5 $as_echo "$ac_cv_drive_letter_can_be_relative" >&6; } if test x"$ac_cv_drive_letter_can_be_relative" = xyes; then ac_fs_drive_letter_can_be_relative=1 else ac_fs_drive_letter_can_be_relative=0 fi else ac_fs_accepts_drive_letter_prefix=0 ac_fs_backslash_is_file_name_separator=0 ac_fs_drive_letter_can_be_relative=0 fi cat >>confdefs.h <<_ACEOF #define FILE_SYSTEM_ACCEPTS_DRIVE_LETTER_PREFIX $ac_fs_accepts_drive_letter_prefix _ACEOF cat >>confdefs.h <<_ACEOF #define FILE_SYSTEM_BACKSLASH_IS_FILE_NAME_SEPARATOR $ac_fs_backslash_is_file_name_separator _ACEOF cat >>confdefs.h <<_ACEOF #define FILE_SYSTEM_DRIVE_PREFIX_CAN_BE_RELATIVE $ac_fs_drive_letter_can_be_relative _ACEOF GNULIB_FCHMODAT=0; GNULIB_FSTATAT=0; GNULIB_FUTIMENS=0; GNULIB_LCHMOD=0; GNULIB_LSTAT=0; GNULIB_MKDIRAT=0; GNULIB_MKFIFO=0; GNULIB_MKFIFOAT=0; GNULIB_MKNOD=0; GNULIB_MKNODAT=0; GNULIB_STAT=0; GNULIB_UTIMENSAT=0; HAVE_FCHMODAT=1; HAVE_FSTATAT=1; HAVE_FUTIMENS=1; HAVE_LCHMOD=1; HAVE_LSTAT=1; HAVE_MKDIRAT=1; HAVE_MKFIFO=1; HAVE_MKFIFOAT=1; HAVE_MKNOD=1; HAVE_MKNODAT=1; HAVE_UTIMENSAT=1; REPLACE_FSTAT=0; REPLACE_FSTATAT=0; REPLACE_FUTIMENS=0; REPLACE_LSTAT=0; REPLACE_MKDIR=0; REPLACE_MKFIFO=0; REPLACE_MKNOD=0; REPLACE_STAT=0; REPLACE_UTIMENSAT=0; { $as_echo "$as_me:$LINENO: checking for stdbool.h that conforms to C99" >&5 $as_echo_n "checking for stdbool.h that conforms to C99... " >&6; } if test "${ac_cv_header_stdbool_h+set}" = set; then $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #ifndef bool "error: bool is not defined" #endif #ifndef false "error: false is not defined" #endif #if false "error: false is not 0" #endif #ifndef true "error: true is not defined" #endif #if true != 1 "error: true is not 1" #endif #ifndef __bool_true_false_are_defined "error: __bool_true_false_are_defined is not defined" #endif struct s { _Bool s: 1; _Bool t; } s; char a[true == 1 ? 1 : -1]; char b[false == 0 ? 1 : -1]; char c[__bool_true_false_are_defined == 1 ? 1 : -1]; char d[(bool) 0.5 == true ? 1 : -1]; bool e = &s; char f[(_Bool) 0.0 == false ? 1 : -1]; char g[true]; char h[sizeof (_Bool)]; char i[sizeof s.t]; enum { j = false, k = true, l = false * true, m = true * 256 }; _Bool n[m]; char o[sizeof n == m * sizeof n[0] ? 1 : -1]; char p[-1 - (_Bool) 0 < 0 && -1 - (bool) 0 < 0 ? 1 : -1]; #if defined __xlc__ || defined __GNUC__ /* Catch a bug in IBM AIX xlc compiler version 6.0.0.0 reported by James Lemley on 2005-10-05; see http://lists.gnu.org/archive/html/bug-coreutils/2005-10/msg00086.html This test is not quite right, since xlc is allowed to reject this program, as the initializer for xlcbug is not one of the forms that C requires support for. However, doing the test right would require a run-time test, and that would make cross-compilation harder. Let us hope that IBM fixes the xlc bug, and also adds support for this kind of constant expression. In the meantime, this test will reject xlc, which is OK, since our stdbool.h substitute should suffice. We also test this with GCC, where it should work, to detect more quickly whether someone messes up the test in the future. */ char digs[] = "0123456789"; int xlcbug = 1 / (&(digs + 5)[-2 + (bool) 1] == &digs[4] ? 1 : -1); #endif /* Catch a bug in an HP-UX C compiler. See http://gcc.gnu.org/ml/gcc-patches/2003-12/msg02303.html http://lists.gnu.org/archive/html/bug-coreutils/2005-11/msg00161.html */ _Bool q = true; _Bool *pq = &q; int main () { *pq |= q; *pq |= ! q; /* Refer to every declared value, to avoid compiler optimizations. */ return (!a + !b + !c + !d + !e + !f + !g + !h + !i + !!j + !k + !!l + !m + !n + !o + !p + !q + !pq); ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_cv_header_stdbool_h=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_header_stdbool_h=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:$LINENO: result: $ac_cv_header_stdbool_h" >&5 $as_echo "$ac_cv_header_stdbool_h" >&6; } { $as_echo "$as_me:$LINENO: checking for _Bool" >&5 $as_echo_n "checking for _Bool... " >&6; } if test "${ac_cv_type__Bool+set}" = set; then $as_echo_n "(cached) " >&6 else ac_cv_type__Bool=no cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default int main () { if (sizeof (_Bool)) return 0; ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default int main () { if (sizeof ((_Bool))) return 0; ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then : else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_type__Bool=yes fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:$LINENO: result: $ac_cv_type__Bool" >&5 $as_echo "$ac_cv_type__Bool" >&6; } if test "x$ac_cv_type__Bool" = x""yes; then cat >>confdefs.h <<_ACEOF #define HAVE__BOOL 1 _ACEOF fi if test $ac_cv_header_stdbool_h = yes; then cat >>confdefs.h <<\_ACEOF #define HAVE_STDBOOL_H 1 _ACEOF fi REPLACE_NULL=0; HAVE_WCHAR_T=1; STDDEF_H=''; { $as_echo "$as_me:$LINENO: checking for unsigned long long int" >&5 $as_echo_n "checking for unsigned long long int... " >&6; } if test "${ac_cv_type_unsigned_long_long_int+set}" = set; then $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* For now, do not test the preprocessor; as of 2007 there are too many implementations with broken preprocessors. Perhaps this can be revisited in 2012. In the meantime, code should not expect #if to work with literals wider than 32 bits. */ /* Test literals. */ long long int ll = 9223372036854775807ll; long long int nll = -9223372036854775807LL; unsigned long long int ull = 18446744073709551615ULL; /* Test constant expressions. */ typedef int a[((-9223372036854775807LL < 0 && 0 < 9223372036854775807ll) ? 1 : -1)]; typedef int b[(18446744073709551615ULL <= (unsigned long long int) -1 ? 1 : -1)]; int i = 63; int main () { /* Test availability of runtime routines for shift and division. */ long long int llmax = 9223372036854775807ll; unsigned long long int ullmax = 18446744073709551615ull; return ((ll << 63) | (ll >> 63) | (ll < i) | (ll > i) | (llmax / ll) | (llmax % ll) | (ull << 63) | (ull >> 63) | (ull << i) | (ull >> i) | (ullmax / ull) | (ullmax % ull)); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || $as_test_x conftest$ac_exeext }; then ac_cv_type_unsigned_long_long_int=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_type_unsigned_long_long_int=no fi rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi { $as_echo "$as_me:$LINENO: result: $ac_cv_type_unsigned_long_long_int" >&5 $as_echo "$ac_cv_type_unsigned_long_long_int" >&6; } if test $ac_cv_type_unsigned_long_long_int = yes; then cat >>confdefs.h <<\_ACEOF #define HAVE_UNSIGNED_LONG_LONG_INT 1 _ACEOF fi HAVE_STRCASECMP=1; HAVE_DECL_STRNCASECMP=1; for ac_func in strcasestr do as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` { $as_echo "$as_me:$LINENO: checking for $ac_func" >&5 $as_echo_n "checking for $ac_func... " >&6; } if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Define $ac_func to an innocuous variant, in case declares $ac_func. For example, HP-UX 11i declares gettimeofday. */ #define $ac_func innocuous_$ac_func /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $ac_func (); below. Prefer to if __STDC__ is defined, since exists even on freestanding compilers. */ #ifdef __STDC__ # include #else # include #endif #undef $ac_func /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char $ac_func (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined __stub_$ac_func || defined __stub___$ac_func choke me #endif int main () { return $ac_func (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || $as_test_x conftest$ac_exeext }; then eval "$as_ac_var=yes" else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 eval "$as_ac_var=no" fi rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi ac_res=`eval 'as_val=${'$as_ac_var'} $as_echo "$as_val"'` { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } as_val=`eval 'as_val=${'$as_ac_var'} $as_echo "$as_val"'` if test "x$as_val" = x""yes; then cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF fi done if test $ac_cv_func_strcasestr = no; then HAVE_STRCASESTR=0 else if test "$gl_cv_func_memchr_works" != yes; then REPLACE_STRCASESTR=1 fi fi if test $HAVE_STRCASESTR = 0 || test $REPLACE_STRCASESTR = 1; then gl_LIBOBJS="$gl_LIBOBJS strcasestr.$ac_objext" : fi { $as_echo "$as_me:$LINENO: checking whether strdup is declared" >&5 $as_echo_n "checking whether strdup is declared... " >&6; } if test "${ac_cv_have_decl_strdup+set}" = set; then $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default int main () { #ifndef strdup (void) strdup; #endif ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_cv_have_decl_strdup=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_have_decl_strdup=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:$LINENO: result: $ac_cv_have_decl_strdup" >&5 $as_echo "$ac_cv_have_decl_strdup" >&6; } if test "x$ac_cv_have_decl_strdup" = x""yes; then cat >>confdefs.h <<_ACEOF #define HAVE_DECL_STRDUP 1 _ACEOF else cat >>confdefs.h <<_ACEOF #define HAVE_DECL_STRDUP 0 _ACEOF fi if test -z "$ERRNO_H"; then { $as_echo "$as_me:$LINENO: checking for working strerror function" >&5 $as_echo_n "checking for working strerror function... " >&6; } if test "${gl_cv_func_working_strerror+set}" = set; then $as_echo_n "(cached) " >&6 else if test "$cross_compiling" = yes; then cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include int main () { return !*strerror (-2); ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then gl_cv_func_working_strerror=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 gl_cv_func_working_strerror=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include int main () { return !*strerror (-2); ; return 0; } _ACEOF rm -f conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' { (case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_try") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then gl_cv_func_working_strerror=yes else $as_echo "$as_me: program exited with status $ac_status" >&5 $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) gl_cv_func_working_strerror=no fi rm -rf conftest.dSYM rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi fi { $as_echo "$as_me:$LINENO: result: $gl_cv_func_working_strerror" >&5 $as_echo "$gl_cv_func_working_strerror" >&6; } if test $gl_cv_func_working_strerror = no; then REPLACE_STRERROR=1 fi else REPLACE_STRERROR=1 fi if test $REPLACE_STRERROR = 1; then { $as_echo "$as_me:$LINENO: checking whether strerror is declared" >&5 $as_echo_n "checking whether strerror is declared... " >&6; } if test "${ac_cv_have_decl_strerror+set}" = set; then $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default int main () { #ifndef strerror (void) strerror; #endif ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_cv_have_decl_strerror=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_have_decl_strerror=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:$LINENO: result: $ac_cv_have_decl_strerror" >&5 $as_echo "$ac_cv_have_decl_strerror" >&6; } if test "x$ac_cv_have_decl_strerror" = x""yes; then cat >>confdefs.h <<_ACEOF #define HAVE_DECL_STRERROR 1 _ACEOF else cat >>confdefs.h <<_ACEOF #define HAVE_DECL_STRERROR 0 _ACEOF fi : if test $ac_cv_header_sys_socket_h != yes; then for ac_header in winsock2.h do as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 $as_echo_n "checking for $ac_header... " >&6; } if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then $as_echo_n "(cached) " >&6 fi ac_res=`eval 'as_val=${'$as_ac_Header'} $as_echo "$as_val"'` { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } else # Is the header compilable? { $as_echo "$as_me:$LINENO: checking $ac_header usability" >&5 $as_echo_n "checking $ac_header usability... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default #include <$ac_header> _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_header_compiler=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_compiler=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext { $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 $as_echo "$ac_header_compiler" >&6; } # Is the header present? { $as_echo "$as_me:$LINENO: checking $ac_header presence" >&5 $as_echo_n "checking $ac_header presence... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include <$ac_header> _ACEOF if { (ac_try="$ac_cpp conftest.$ac_ext" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null && { test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || test ! -s conftest.err }; then ac_header_preproc=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi rm -f conftest.err conftest.$ac_ext { $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 $as_echo "$ac_header_preproc" >&6; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in yes:no: ) { $as_echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 $as_echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 $as_echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} ac_header_preproc=yes ;; no:yes:* ) { $as_echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 $as_echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} { $as_echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 $as_echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} { $as_echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 $as_echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} { $as_echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 $as_echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 $as_echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} { $as_echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 $as_echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} ;; esac { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 $as_echo_n "checking for $ac_header... " >&6; } if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then $as_echo_n "(cached) " >&6 else eval "$as_ac_Header=\$ac_header_preproc" fi ac_res=`eval 'as_val=${'$as_ac_Header'} $as_echo "$as_val"'` { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } fi as_val=`eval 'as_val=${'$as_ac_Header'} $as_echo "$as_val"'` if test "x$as_val" = x""yes; then cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi done fi fi : if test $gl_cv_have_include_next = yes; then gl_cv_next_string_h='<'string.h'>' else { $as_echo "$as_me:$LINENO: checking absolute name of " >&5 $as_echo_n "checking absolute name of ... " >&6; } if test "${gl_cv_next_string_h+set}" = set; then $as_echo_n "(cached) " >&6 else if test $ac_cv_header_string_h = yes; then cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF case "$host_os" in aix*) gl_absname_cpp="$ac_cpp -C" ;; *) gl_absname_cpp="$ac_cpp" ;; esac gl_cv_next_string_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 | sed -n '\#/string.h#{ s#.*"\(.*/string.h\)".*#\1# s#^/[^/]#//&# p q }'`'"' else gl_cv_next_string_h='<'string.h'>' fi fi { $as_echo "$as_me:$LINENO: result: $gl_cv_next_string_h" >&5 $as_echo "$gl_cv_next_string_h" >&6; } fi NEXT_STRING_H=$gl_cv_next_string_h if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next' gl_next_as_first_directive='<'string.h'>' else # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include' gl_next_as_first_directive=$gl_cv_next_string_h fi NEXT_AS_FIRST_DIRECTIVE_STRING_H=$gl_next_as_first_directive for gl_func in memmem mempcpy memrchr rawmemchr stpcpy stpncpy strchrnul strdup strndup strnlen strpbrk strsep strcasestr strtok_r strsignal strverscmp; do as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh` { $as_echo "$as_me:$LINENO: checking whether $gl_func is declared without a macro" >&5 $as_echo_n "checking whether $gl_func is declared without a macro... " >&6; } if { as_var=$as_gl_Symbol; eval "test \"\${$as_var+set}\" = set"; }; then $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include int main () { #undef $gl_func (void) $gl_func; ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then eval "$as_gl_Symbol=yes" else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 eval "$as_gl_Symbol=no" fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi ac_res=`eval 'as_val=${'$as_gl_Symbol'} $as_echo "$as_val"'` { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } as_val=`eval 'as_val=${'$as_gl_Symbol'} $as_echo "$as_val"'` if test "x$as_val" = x""yes; then cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1 _ACEOF eval ac_cv_have_decl_$gl_func=yes fi done : if test $gl_cv_have_include_next = yes; then gl_cv_next_strings_h='<'strings.h'>' else { $as_echo "$as_me:$LINENO: checking absolute name of " >&5 $as_echo_n "checking absolute name of ... " >&6; } if test "${gl_cv_next_strings_h+set}" = set; then $as_echo_n "(cached) " >&6 else if test $ac_cv_header_strings_h = yes; then cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF case "$host_os" in aix*) gl_absname_cpp="$ac_cpp -C" ;; *) gl_absname_cpp="$ac_cpp" ;; esac gl_cv_next_strings_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 | sed -n '\#/strings.h#{ s#.*"\(.*/strings.h\)".*#\1# s#^/[^/]#//&# p q }'`'"' else gl_cv_next_strings_h='<'strings.h'>' fi fi { $as_echo "$as_me:$LINENO: result: $gl_cv_next_strings_h" >&5 $as_echo "$gl_cv_next_strings_h" >&6; } fi NEXT_STRINGS_H=$gl_cv_next_strings_h if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next' gl_next_as_first_directive='<'strings.h'>' else # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include' gl_next_as_first_directive=$gl_cv_next_strings_h fi NEXT_AS_FIRST_DIRECTIVE_STRINGS_H=$gl_next_as_first_directive for gl_func in strcasecmp strncasecmp; do as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh` { $as_echo "$as_me:$LINENO: checking whether $gl_func is declared without a macro" >&5 $as_echo_n "checking whether $gl_func is declared without a macro... " >&6; } if { as_var=$as_gl_Symbol; eval "test \"\${$as_var+set}\" = set"; }; then $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include int main () { #undef $gl_func (void) $gl_func; ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then eval "$as_gl_Symbol=yes" else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 eval "$as_gl_Symbol=no" fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi ac_res=`eval 'as_val=${'$as_gl_Symbol'} $as_echo "$as_val"'` { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } as_val=`eval 'as_val=${'$as_gl_Symbol'} $as_echo "$as_val"'` if test "x$as_val" = x""yes; then cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1 _ACEOF eval ac_cv_have_decl_$gl_func=yes fi done { $as_echo "$as_me:$LINENO: checking whether strndup is declared" >&5 $as_echo_n "checking whether strndup is declared... " >&6; } if test "${ac_cv_have_decl_strndup+set}" = set; then $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default int main () { #ifndef strndup (void) strndup; #endif ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_cv_have_decl_strndup=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_have_decl_strndup=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:$LINENO: result: $ac_cv_have_decl_strndup" >&5 $as_echo "$ac_cv_have_decl_strndup" >&6; } if test "x$ac_cv_have_decl_strndup" = x""yes; then cat >>confdefs.h <<_ACEOF #define HAVE_DECL_STRNDUP 1 _ACEOF else cat >>confdefs.h <<_ACEOF #define HAVE_DECL_STRNDUP 0 _ACEOF fi { $as_echo "$as_me:$LINENO: checking whether strnlen is declared" >&5 $as_echo_n "checking whether strnlen is declared... " >&6; } if test "${ac_cv_have_decl_strnlen+set}" = set; then $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default int main () { #ifndef strnlen (void) strnlen; #endif ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_cv_have_decl_strnlen=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_have_decl_strnlen=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:$LINENO: result: $ac_cv_have_decl_strnlen" >&5 $as_echo "$ac_cv_have_decl_strnlen" >&6; } if test "x$ac_cv_have_decl_strnlen" = x""yes; then cat >>confdefs.h <<_ACEOF #define HAVE_DECL_STRNLEN 1 _ACEOF else cat >>confdefs.h <<_ACEOF #define HAVE_DECL_STRNLEN 0 _ACEOF fi { $as_echo "$as_me:$LINENO: checking for struct tm.tm_gmtoff" >&5 $as_echo_n "checking for struct tm.tm_gmtoff... " >&6; } if test "${ac_cv_member_struct_tm_tm_gmtoff+set}" = set; then $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include int main () { static struct tm ac_aggr; if (ac_aggr.tm_gmtoff) return 0; ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_cv_member_struct_tm_tm_gmtoff=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include int main () { static struct tm ac_aggr; if (sizeof ac_aggr.tm_gmtoff) return 0; ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_cv_member_struct_tm_tm_gmtoff=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_member_struct_tm_tm_gmtoff=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:$LINENO: result: $ac_cv_member_struct_tm_tm_gmtoff" >&5 $as_echo "$ac_cv_member_struct_tm_tm_gmtoff" >&6; } if test "x$ac_cv_member_struct_tm_tm_gmtoff" = x""yes; then cat >>confdefs.h <<\_ACEOF #define HAVE_TM_GMTOFF 1 _ACEOF fi { $as_echo "$as_me:$LINENO: checking whether stat file-mode macros are broken" >&5 $as_echo_n "checking whether stat file-mode macros are broken... " >&6; } if test "${ac_cv_header_stat_broken+set}" = set; then $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #include #if defined S_ISBLK && defined S_IFDIR extern char c1[S_ISBLK (S_IFDIR) ? -1 : 1]; #endif #if defined S_ISBLK && defined S_IFCHR extern char c2[S_ISBLK (S_IFCHR) ? -1 : 1]; #endif #if defined S_ISLNK && defined S_IFREG extern char c3[S_ISLNK (S_IFREG) ? -1 : 1]; #endif #if defined S_ISSOCK && defined S_IFREG extern char c4[S_ISSOCK (S_IFREG) ? -1 : 1]; #endif _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_cv_header_stat_broken=no else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_header_stat_broken=yes fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:$LINENO: result: $ac_cv_header_stat_broken" >&5 $as_echo "$ac_cv_header_stat_broken" >&6; } if test $ac_cv_header_stat_broken = yes; then cat >>confdefs.h <<\_ACEOF #define STAT_MACROS_BROKEN 1 _ACEOF fi GNULIB_UNAME=0; HAVE_UNAME=1; HAVE_STRUCT_UTSNAME=1; : { $as_echo "$as_me:$LINENO: checking for struct timespec in " >&5 $as_echo_n "checking for struct timespec in ... " >&6; } if test "${gl_cv_sys_struct_timespec_in_time_h+set}" = set; then $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include int main () { static struct timespec x; x.tv_sec = x.tv_nsec; ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then gl_cv_sys_struct_timespec_in_time_h=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 gl_cv_sys_struct_timespec_in_time_h=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:$LINENO: result: $gl_cv_sys_struct_timespec_in_time_h" >&5 $as_echo "$gl_cv_sys_struct_timespec_in_time_h" >&6; } TIME_H_DEFINES_STRUCT_TIMESPEC=0 SYS_TIME_H_DEFINES_STRUCT_TIMESPEC=0 if test $gl_cv_sys_struct_timespec_in_time_h = yes; then TIME_H_DEFINES_STRUCT_TIMESPEC=1 else { $as_echo "$as_me:$LINENO: checking for struct timespec in " >&5 $as_echo_n "checking for struct timespec in ... " >&6; } if test "${gl_cv_sys_struct_timespec_in_sys_time_h+set}" = set; then $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include int main () { static struct timespec x; x.tv_sec = x.tv_nsec; ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then gl_cv_sys_struct_timespec_in_sys_time_h=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 gl_cv_sys_struct_timespec_in_sys_time_h=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:$LINENO: result: $gl_cv_sys_struct_timespec_in_sys_time_h" >&5 $as_echo "$gl_cv_sys_struct_timespec_in_sys_time_h" >&6; } if test $gl_cv_sys_struct_timespec_in_sys_time_h = yes; then SYS_TIME_H_DEFINES_STRUCT_TIMESPEC=1 fi fi : if test $gl_cv_have_include_next = yes; then gl_cv_next_time_h='<'time.h'>' else { $as_echo "$as_me:$LINENO: checking absolute name of " >&5 $as_echo_n "checking absolute name of ... " >&6; } if test "${gl_cv_next_time_h+set}" = set; then $as_echo_n "(cached) " >&6 else if test $ac_cv_header_time_h = yes; then cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF case "$host_os" in aix*) gl_absname_cpp="$ac_cpp -C" ;; *) gl_absname_cpp="$ac_cpp" ;; esac gl_cv_next_time_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 | sed -n '\#/time.h#{ s#.*"\(.*/time.h\)".*#\1# s#^/[^/]#//&# p q }'`'"' else gl_cv_next_time_h='<'time.h'>' fi fi { $as_echo "$as_me:$LINENO: result: $gl_cv_next_time_h" >&5 $as_echo "$gl_cv_next_time_h" >&6; } fi NEXT_TIME_H=$gl_cv_next_time_h if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next' gl_next_as_first_directive='<'time.h'>' else # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include' gl_next_as_first_directive=$gl_cv_next_time_h fi NEXT_AS_FIRST_DIRECTIVE_TIME_H=$gl_next_as_first_directive { $as_echo "$as_me:$LINENO: checking whether vsnprintf is declared" >&5 $as_echo_n "checking whether vsnprintf is declared... " >&6; } if test "${ac_cv_have_decl_vsnprintf+set}" = set; then $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default int main () { #ifndef vsnprintf (void) vsnprintf; #endif ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_cv_have_decl_vsnprintf=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_have_decl_vsnprintf=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:$LINENO: result: $ac_cv_have_decl_vsnprintf" >&5 $as_echo "$ac_cv_have_decl_vsnprintf" >&6; } if test "x$ac_cv_have_decl_vsnprintf" = x""yes; then cat >>confdefs.h <<_ACEOF #define HAVE_DECL_VSNPRINTF 1 _ACEOF else cat >>confdefs.h <<_ACEOF #define HAVE_DECL_VSNPRINTF 0 _ACEOF fi GNULIB_FCNTL=0; GNULIB_OPEN=0; GNULIB_OPENAT=0; HAVE_FCNTL=1; HAVE_OPENAT=1; REPLACE_FCNTL=0; REPLACE_OPEN=0; REPLACE_OPENAT=0; { $as_echo "$as_me:$LINENO: checking whether ungetc works on arbitrary bytes" >&5 $as_echo_n "checking whether ungetc works on arbitrary bytes... " >&6; } if test "${gl_cv_func_ungetc_works+set}" = set; then $as_echo_n "(cached) " >&6 else if test "$cross_compiling" = yes; then gl_cv_func_ungetc_works='guessing no' else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include int main () { FILE *f; if (!(f = fopen ("conftest.tmp", "w+"))) return 1; if (fputs ("abc", f) < 0) return 2; rewind (f); if (fgetc (f) != 'a') return 3; if (fgetc (f) != 'b') return 4; if (ungetc ('d', f) != 'd') return 5; if (ftell (f) != 1) return 6; if (fgetc (f) != 'd') return 7; if (ftell (f) != 2) return 8; if (fseek (f, 0, SEEK_CUR) != 0) return 9; if (ftell (f) != 2) return 10; if (fgetc (f) != 'c') return 11; fclose (f); remove ("conftest.tmp"); ; return 0; } _ACEOF rm -f conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' { (case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_try") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then gl_cv_func_ungetc_works=yes else $as_echo "$as_me: program exited with status $ac_status" >&5 $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) gl_cv_func_ungetc_works=no fi rm -rf conftest.dSYM rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi fi { $as_echo "$as_me:$LINENO: result: $gl_cv_func_ungetc_works" >&5 $as_echo "$gl_cv_func_ungetc_works" >&6; } if test "$gl_cv_func_ungetc_works" != yes; then cat >>confdefs.h <<\_ACEOF #define FUNC_UNGETC_BROKEN 1 _ACEOF fi { $as_echo "$as_me:$LINENO: checking whether lstat dereferences a symlink specified with a trailing slash" >&5 $as_echo_n "checking whether lstat dereferences a symlink specified with a trailing slash... " >&6; } if test "${ac_cv_func_lstat_dereferences_slashed_symlink+set}" = set; then $as_echo_n "(cached) " >&6 else rm -f conftest.sym conftest.file echo >conftest.file if test "$as_ln_s" = "ln -s" && ln -s conftest.file conftest.sym; then if test "$cross_compiling" = yes; then ac_cv_func_lstat_dereferences_slashed_symlink=no else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default int main () { struct stat sbuf; /* Linux will dereference the symlink and fail. That is better in the sense that it means we will not have to compile and use the lstat wrapper. */ return lstat ("conftest.sym/", &sbuf) == 0; ; return 0; } _ACEOF rm -f conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' { (case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_try") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_func_lstat_dereferences_slashed_symlink=yes else $as_echo "$as_me: program exited with status $ac_status" >&5 $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) ac_cv_func_lstat_dereferences_slashed_symlink=no fi rm -rf conftest.dSYM rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi else # If the `ln -s' command failed, then we probably don't even # have an lstat function. ac_cv_func_lstat_dereferences_slashed_symlink=no fi rm -f conftest.sym conftest.file fi { $as_echo "$as_me:$LINENO: result: $ac_cv_func_lstat_dereferences_slashed_symlink" >&5 $as_echo "$ac_cv_func_lstat_dereferences_slashed_symlink" >&6; } test $ac_cv_func_lstat_dereferences_slashed_symlink = yes && cat >>confdefs.h <<_ACEOF #define LSTAT_FOLLOWS_SLASHED_SYMLINK 1 _ACEOF if test $ac_cv_func_lstat_dereferences_slashed_symlink = no; then gltests_LIBOBJS="$gltests_LIBOBJS lstat.$ac_objext" fi { $as_echo "$as_me:$LINENO: checking whether alarm is declared" >&5 $as_echo_n "checking whether alarm is declared... " >&6; } if test "${ac_cv_have_decl_alarm+set}" = set; then $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default int main () { #ifndef alarm (void) alarm; #endif ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_cv_have_decl_alarm=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_have_decl_alarm=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:$LINENO: result: $ac_cv_have_decl_alarm" >&5 $as_echo "$ac_cv_have_decl_alarm" >&6; } if test "x$ac_cv_have_decl_alarm" = x""yes; then cat >>confdefs.h <<_ACEOF #define HAVE_DECL_ALARM 1 _ACEOF else cat >>confdefs.h <<_ACEOF #define HAVE_DECL_ALARM 0 _ACEOF fi { $as_echo "$as_me:$LINENO: checking for mode_t" >&5 $as_echo_n "checking for mode_t... " >&6; } if test "${ac_cv_type_mode_t+set}" = set; then $as_echo_n "(cached) " >&6 else ac_cv_type_mode_t=no cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default int main () { if (sizeof (mode_t)) return 0; ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default int main () { if (sizeof ((mode_t))) return 0; ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then : else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_type_mode_t=yes fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:$LINENO: result: $ac_cv_type_mode_t" >&5 $as_echo "$ac_cv_type_mode_t" >&6; } if test "x$ac_cv_type_mode_t" = x""yes; then : else cat >>confdefs.h <<_ACEOF #define mode_t int _ACEOF fi { $as_echo "$as_me:$LINENO: checking for promoted mode_t type" >&5 $as_echo_n "checking for promoted mode_t type... " >&6; } if test "${gl_cv_promoted_mode_t+set}" = set; then $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include int main () { typedef int array[2 * (sizeof (mode_t) < sizeof (int)) - 1]; ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then gl_cv_promoted_mode_t='int' else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 gl_cv_promoted_mode_t='mode_t' fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:$LINENO: result: $gl_cv_promoted_mode_t" >&5 $as_echo "$gl_cv_promoted_mode_t" >&6; } cat >>confdefs.h <<_ACEOF #define PROMOTED_MODE_T $gl_cv_promoted_mode_t _ACEOF if true; then GL_COND_LIBTOOL_TRUE= GL_COND_LIBTOOL_FALSE='#' else GL_COND_LIBTOOL_TRUE='#' GL_COND_LIBTOOL_FALSE= fi gl_cond_libtool=true gl_source_base='libmissing' if test "$ac_cv_header_winsock2_h" = yes; then gl_LIBOBJS="$gl_LIBOBJS accept.$ac_objext" fi GNULIB_ACCEPT=1 LTALLOCA=`echo "$ALLOCA" | sed -e 's/\.[^.]* /.lo /g;s/\.[^.]*$/.lo/'` if test $ac_cv_func_alloca_works = no; then : fi # Define an additional variable used in the Makefile substitution. if test $ac_cv_working_alloca_h = yes; then { $as_echo "$as_me:$LINENO: checking for alloca as a compiler built-in" >&5 $as_echo_n "checking for alloca as a compiler built-in... " >&6; } if test "${gl_cv_rpl_alloca+set}" = set; then $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #if defined __GNUC__ || defined _AIX || defined _MSC_VER Need own alloca #endif _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "Need own alloca" >/dev/null 2>&1; then gl_cv_rpl_alloca=yes else gl_cv_rpl_alloca=no fi rm -f conftest* fi { $as_echo "$as_me:$LINENO: result: $gl_cv_rpl_alloca" >&5 $as_echo "$gl_cv_rpl_alloca" >&6; } if test $gl_cv_rpl_alloca = yes; then cat >>confdefs.h <<\_ACEOF #define HAVE_ALLOCA 1 _ACEOF ALLOCA_H=alloca.h else ALLOCA_H= fi else ALLOCA_H=alloca.h fi : if test $ac_cv_header_arpa_inet_h = yes; then HAVE_ARPA_INET_H=1 else HAVE_ARPA_INET_H=0 fi : if test $gl_cv_have_include_next = yes; then gl_cv_next_arpa_inet_h='<'arpa/inet.h'>' else { $as_echo "$as_me:$LINENO: checking absolute name of " >&5 $as_echo_n "checking absolute name of ... " >&6; } if test "${gl_cv_next_arpa_inet_h+set}" = set; then $as_echo_n "(cached) " >&6 else if test $ac_cv_header_arpa_inet_h = yes; then cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF case "$host_os" in aix*) gl_absname_cpp="$ac_cpp -C" ;; *) gl_absname_cpp="$ac_cpp" ;; esac gl_cv_next_arpa_inet_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 | sed -n '\#/arpa/inet.h#{ s#.*"\(.*/arpa/inet.h\)".*#\1# s#^/[^/]#//&# p q }'`'"' else gl_cv_next_arpa_inet_h='<'arpa/inet.h'>' fi fi { $as_echo "$as_me:$LINENO: result: $gl_cv_next_arpa_inet_h" >&5 $as_echo "$gl_cv_next_arpa_inet_h" >&6; } fi NEXT_ARPA_INET_H=$gl_cv_next_arpa_inet_h if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next' gl_next_as_first_directive='<'arpa/inet.h'>' else # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include' gl_next_as_first_directive=$gl_cv_next_arpa_inet_h fi NEXT_AS_FIRST_DIRECTIVE_ARPA_INET_H=$gl_next_as_first_directive for gl_func in inet_ntop inet_pton; do as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh` { $as_echo "$as_me:$LINENO: checking whether $gl_func is declared without a macro" >&5 $as_echo_n "checking whether $gl_func is declared without a macro... " >&6; } if { as_var=$as_gl_Symbol; eval "test \"\${$as_var+set}\" = set"; }; then $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* On some systems, this header is not self-consistent. */ #ifndef __GLIBC__ # include #endif #include int main () { #undef $gl_func (void) $gl_func; ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then eval "$as_gl_Symbol=yes" else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 eval "$as_gl_Symbol=no" fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi ac_res=`eval 'as_val=${'$as_gl_Symbol'} $as_echo "$as_val"'` { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } as_val=`eval 'as_val=${'$as_gl_Symbol'} $as_echo "$as_val"'` if test "x$as_val" = x""yes; then cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1 _ACEOF eval ac_cv_have_decl_$gl_func=yes fi done { $as_echo "$as_me:$LINENO: checking for a thread-safe mkdir -p" >&5 $as_echo_n "checking for a thread-safe mkdir -p... " >&6; } if test -z "$MKDIR_P"; then if test "${ac_cv_path_mkdir+set}" = set; then $as_echo_n "(cached) " >&6 else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_prog in mkdir gmkdir; do for ac_exec_ext in '' $ac_executable_extensions; do { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; } || continue case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #( 'mkdir (GNU coreutils) '* | \ 'mkdir (coreutils) '* | \ 'mkdir (fileutils) '4.1*) ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext break 3;; esac done done done IFS=$as_save_IFS fi if test "${ac_cv_path_mkdir+set}" = set; then MKDIR_P="$ac_cv_path_mkdir -p" else # As a last resort, use the slow shell script. Don't cache a # value for MKDIR_P within a source directory, because that will # break other packages using the cache if that directory is # removed, or if the value is a relative name. test -d ./--version && rmdir ./--version MKDIR_P="$ac_install_sh -d" fi fi { $as_echo "$as_me:$LINENO: result: $MKDIR_P" >&5 $as_echo "$MKDIR_P" >&6; } if test "$ac_cv_header_winsock2_h" = yes; then gl_LIBOBJS="$gl_LIBOBJS bind.$ac_objext" fi GNULIB_BIND=1 : if test $ac_cv_func_btowc = no; then HAVE_BTOWC=0 else { $as_echo "$as_me:$LINENO: checking whether btowc(EOF) is correct" >&5 $as_echo_n "checking whether btowc(EOF) is correct... " >&6; } if test "${gl_cv_func_btowc_eof+set}" = set; then $as_echo_n "(cached) " >&6 else case "$host_os" in # Guess no on IRIX. irix*) gl_cv_func_btowc_eof="guessing no" ;; # Guess yes otherwise. *) gl_cv_func_btowc_eof="guessing yes" ;; esac if test $LOCALE_FR != none; then if test "$cross_compiling" = yes; then : else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #include #include #include int main () { if (setlocale (LC_ALL, "$LOCALE_FR") != NULL) { if (btowc (EOF) != WEOF) return 1; } return 0; } _ACEOF rm -f conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' { (case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_try") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then gl_cv_func_btowc_eof=yes else $as_echo "$as_me: program exited with status $ac_status" >&5 $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) gl_cv_func_btowc_eof=no fi rm -rf conftest.dSYM rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi fi fi { $as_echo "$as_me:$LINENO: result: $gl_cv_func_btowc_eof" >&5 $as_echo "$gl_cv_func_btowc_eof" >&6; } case "$gl_cv_func_btowc_eof" in *yes) ;; *) REPLACE_BTOWC=1 ;; esac fi if test $HAVE_BTOWC = 0 || test $REPLACE_BTOWC = 1; then : gl_LIBOBJS="$gl_LIBOBJS btowc.$ac_objext" : fi GNULIB_BTOWC=1 : if test $ac_cv_header_sys_socket_h != yes; then for ac_header in winsock2.h do as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 $as_echo_n "checking for $ac_header... " >&6; } if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then $as_echo_n "(cached) " >&6 fi ac_res=`eval 'as_val=${'$as_ac_Header'} $as_echo "$as_val"'` { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } else # Is the header compilable? { $as_echo "$as_me:$LINENO: checking $ac_header usability" >&5 $as_echo_n "checking $ac_header usability... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default #include <$ac_header> _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_header_compiler=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_compiler=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext { $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 $as_echo "$ac_header_compiler" >&6; } # Is the header present? { $as_echo "$as_me:$LINENO: checking $ac_header presence" >&5 $as_echo_n "checking $ac_header presence... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include <$ac_header> _ACEOF if { (ac_try="$ac_cpp conftest.$ac_ext" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null && { test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || test ! -s conftest.err }; then ac_header_preproc=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi rm -f conftest.err conftest.$ac_ext { $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 $as_echo "$ac_header_preproc" >&6; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in yes:no: ) { $as_echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 $as_echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 $as_echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} ac_header_preproc=yes ;; no:yes:* ) { $as_echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 $as_echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} { $as_echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 $as_echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} { $as_echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 $as_echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} { $as_echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 $as_echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 $as_echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} { $as_echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 $as_echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} ;; esac { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 $as_echo_n "checking for $ac_header... " >&6; } if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then $as_echo_n "(cached) " >&6 else eval "$as_ac_Header=\$ac_header_preproc" fi ac_res=`eval 'as_val=${'$as_ac_Header'} $as_echo "$as_val"'` { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } fi as_val=`eval 'as_val=${'$as_ac_Header'} $as_echo "$as_val"'` if test "x$as_val" = x""yes; then cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi done fi if test "$ac_cv_header_winsock2_h" = yes; then HAVE_WINSOCK2_H=1 UNISTD_H_HAVE_WINSOCK2_H=1 SYS_IOCTL_H_HAVE_WINSOCK2_H=1 else HAVE_WINSOCK2_H=0 fi if test $UNISTD_H_HAVE_WINSOCK2_H = 1; then REPLACE_CLOSE=1 gl_LIBOBJS="$gl_LIBOBJS close.$ac_objext" REPLACE_FCLOSE=1 gl_LIBOBJS="$gl_LIBOBJS fclose.$ac_objext" fi GNULIB_CLOSE=1 if test "$ac_cv_header_winsock2_h" = yes; then gl_LIBOBJS="$gl_LIBOBJS connect.$ac_objext" fi GNULIB_CONNECT=1 : if test $ac_cv_func_dup2 = no; then HAVE_DUP2=0 gl_LIBOBJS="$gl_LIBOBJS dup2.$ac_objext" else { $as_echo "$as_me:$LINENO: checking whether dup2 works" >&5 $as_echo_n "checking whether dup2 works... " >&6; } if test "${gl_cv_func_dup2_works+set}" = set; then $as_echo_n "(cached) " >&6 else if test "$cross_compiling" = yes; then case "$host_os" in mingw*) # on this platform, dup2 always returns 0 for success gl_cv_func_dup2_works=no;; cygwin*) # on cygwin 1.5.x, dup2(1,1) returns 0 gl_cv_func_dup2_works=no;; linux*) # On linux between 2008-07-27 and 2009-05-11, dup2 of a # closed fd may yield -EBADF instead of -1 / errno=EBADF. gl_cv_func_dup2_works=no;; freebsd*) # on FreeBSD 6.1, dup2(1,1000000) gives EMFILE, not EBADF. gl_cv_func_dup2_works=no;; *) gl_cv_func_dup2_works=yes;; esac else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #include int main () { if (dup2 (1, 1) == 0) return 1; close (0); if (dup2 (0, 0) != -1) return 2; /* Many gnulib modules require POSIX conformance of EBADF. */ if (dup2 (1, 1000000) == -1 && errno != EBADF) return 3; return 0; ; return 0; } _ACEOF rm -f conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' { (case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_try") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then gl_cv_func_dup2_works=yes else $as_echo "$as_me: program exited with status $ac_status" >&5 $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) gl_cv_func_dup2_works=no fi rm -rf conftest.dSYM rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi fi { $as_echo "$as_me:$LINENO: result: $gl_cv_func_dup2_works" >&5 $as_echo "$gl_cv_func_dup2_works" >&6; } if test "$gl_cv_func_dup2_works" = no; then if test $ac_cv_func_dup2 = yes; then REPLACE_DUP2=1 fi gl_LIBOBJS="$gl_LIBOBJS dup2.$ac_objext" fi fi GNULIB_DUP2=1 GNULIB_FCLOSE=1 FLOAT_H= case "$host_os" in beos* | openbsd*) FLOAT_H=float.h : if test $gl_cv_have_include_next = yes; then gl_cv_next_float_h='<'float.h'>' else { $as_echo "$as_me:$LINENO: checking absolute name of " >&5 $as_echo_n "checking absolute name of ... " >&6; } if test "${gl_cv_next_float_h+set}" = set; then $as_echo_n "(cached) " >&6 else if test $ac_cv_header_float_h = yes; then cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF case "$host_os" in aix*) gl_absname_cpp="$ac_cpp -C" ;; *) gl_absname_cpp="$ac_cpp" ;; esac gl_cv_next_float_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 | sed -n '\#/float.h#{ s#.*"\(.*/float.h\)".*#\1# s#^/[^/]#//&# p q }'`'"' else gl_cv_next_float_h='<'float.h'>' fi fi { $as_echo "$as_me:$LINENO: result: $gl_cv_next_float_h" >&5 $as_echo "$gl_cv_next_float_h" >&6; } fi NEXT_FLOAT_H=$gl_cv_next_float_h if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next' gl_next_as_first_directive='<'float.h'>' else # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include' gl_next_as_first_directive=$gl_cv_next_float_h fi NEXT_AS_FIRST_DIRECTIVE_FLOAT_H=$gl_next_as_first_directive ;; esac case "$host_os" in mingw* | pw*) REPLACE_FOPEN=1 gl_cv_func_fopen_slash="guessing no" ;; *) { $as_echo "$as_me:$LINENO: checking whether fopen recognizes a trailing slash" >&5 $as_echo_n "checking whether fopen recognizes a trailing slash... " >&6; } if test "${gl_cv_func_fopen_slash+set}" = set; then $as_echo_n "(cached) " >&6 else if test "$cross_compiling" = yes; then case "$host_os" in solaris2.[0-9]*) gl_cv_func_fopen_slash="guessing no" ;; hpux*) gl_cv_func_fopen_slash="guessing no" ;; *) gl_cv_func_fopen_slash="guessing yes" ;; esac else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #include int main () { return fopen ("conftest.sl/", "w") != NULL; } _ACEOF rm -f conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' { (case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_try") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then gl_cv_func_fopen_slash=yes else $as_echo "$as_me: program exited with status $ac_status" >&5 $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) gl_cv_func_fopen_slash=no fi rm -rf conftest.dSYM rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi rm -f conftest.sl fi { $as_echo "$as_me:$LINENO: result: $gl_cv_func_fopen_slash" >&5 $as_echo "$gl_cv_func_fopen_slash" >&6; } ;; esac case "$gl_cv_func_fopen_slash" in *no) cat >>confdefs.h <<\_ACEOF #define FOPEN_TRAILING_SLASH_BUG 1 _ACEOF REPLACE_FOPEN=1 ;; esac if test $REPLACE_FOPEN = 1; then gl_LIBOBJS="$gl_LIBOBJS fopen.$ac_objext" fi GNULIB_FOPEN=1 { $as_echo "$as_me:$LINENO: checking whether frexp() can be used without linking with libm" >&5 $as_echo_n "checking whether frexp() can be used without linking with libm... " >&6; } if test "${gl_cv_func_frexp_no_libm+set}" = set; then $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include double x; int main () { int e; return frexp (x, &e) > 0; ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || $as_test_x conftest$ac_exeext }; then gl_cv_func_frexp_no_libm=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 gl_cv_func_frexp_no_libm=no fi rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi { $as_echo "$as_me:$LINENO: result: $gl_cv_func_frexp_no_libm" >&5 $as_echo "$gl_cv_func_frexp_no_libm" >&6; } if test $gl_cv_func_frexp_no_libm = yes; then { $as_echo "$as_me:$LINENO: checking whether frexp works" >&5 $as_echo_n "checking whether frexp works... " >&6; } if test "${gl_cv_func_frexp_works+set}" = set; then $as_echo_n "(cached) " >&6 else if test "$cross_compiling" = yes; then case "$host_os" in netbsd* | irix* | mingw*) gl_cv_func_frexp_works="guessing no";; *) gl_cv_func_frexp_works="guessing yes";; esac else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #include #include int main() { int i; volatile double x; /* HP cc on HP-UX 10.20 has a bug with the constant expression -0.0. So we use -zero instead. */ double zero = 0.0; /* Test on denormalized numbers. */ for (i = 1, x = 1.0; i >= DBL_MIN_EXP; i--, x *= 0.5) ; if (x > 0.0) { int exp; double y = frexp (x, &exp); /* On machines with IEEE754 arithmetic: x = 1.11254e-308, exp = -1022. On NetBSD: y = 0.75. Correct: y = 0.5. */ if (y != 0.5) return 1; } /* Test on infinite numbers. */ x = 1.0 / 0.0; { int exp; double y = frexp (x, &exp); if (y != x) return 1; } /* Test on negative zero. */ x = -zero; { int exp; double y = frexp (x, &exp); if (memcmp (&y, &x, sizeof x)) return 1; } return 0; } _ACEOF rm -f conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' { (case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_try") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then gl_cv_func_frexp_works=yes else $as_echo "$as_me: program exited with status $ac_status" >&5 $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) gl_cv_func_frexp_works=no fi rm -rf conftest.dSYM rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi fi { $as_echo "$as_me:$LINENO: result: $gl_cv_func_frexp_works" >&5 $as_echo "$gl_cv_func_frexp_works" >&6; } case "$gl_cv_func_frexp_works" in *yes) gl_func_frexp_no_libm=yes ;; *) gl_func_frexp_no_libm=no; REPLACE_FREXP=1 ;; esac else gl_func_frexp_no_libm=no REPLACE_FREXP=1 fi if test $gl_func_frexp_no_libm = yes; then cat >>confdefs.h <<\_ACEOF #define HAVE_FREXP_IN_LIBC 1 _ACEOF else gl_LIBOBJS="$gl_LIBOBJS frexp.$ac_objext" fi GNULIB_FREXP=1 { $as_echo "$as_me:$LINENO: checking whether frexpl() can be used without linking with libm" >&5 $as_echo_n "checking whether frexpl() can be used without linking with libm... " >&6; } if test "${gl_cv_func_frexpl_no_libm+set}" = set; then $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include long double x; int main () { int e; return frexpl (x, &e) > 0; ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || $as_test_x conftest$ac_exeext }; then gl_cv_func_frexpl_no_libm=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 gl_cv_func_frexpl_no_libm=no fi rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi { $as_echo "$as_me:$LINENO: result: $gl_cv_func_frexpl_no_libm" >&5 $as_echo "$gl_cv_func_frexpl_no_libm" >&6; } if test $gl_cv_func_frexpl_no_libm = yes; then { $as_echo "$as_me:$LINENO: checking whether frexpl works" >&5 $as_echo_n "checking whether frexpl works... " >&6; } if test "${gl_cv_func_frexpl_works+set}" = set; then $as_echo_n "(cached) " >&6 else if test "$cross_compiling" = yes; then case "$host_os" in aix* | beos* | darwin* | irix* | mingw* | pw*) gl_cv_func_frexpl_works="guessing no";; *) gl_cv_func_frexpl_works="guessing yes";; esac else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #include /* Override the values of , like done in float.in.h. */ #if defined __i386__ && (defined __BEOS__ || defined __OpenBSD__) # undef LDBL_MIN_EXP # define LDBL_MIN_EXP (-16381) #endif extern long double frexpl (long double, int *); int main() { volatile long double x; /* Test on finite numbers that fails on AIX 5.1. */ x = 16.0L; { int exp = -9999; frexpl (x, &exp); if (exp != 5) return 1; } /* Test on finite numbers that fails on MacOS X 10.4, because its frexpl function returns an invalid (incorrectly normalized) value: it returns y = { 0x3fe028f5, 0xc28f5c28, 0x3c9eb851, 0xeb851eb8 } but the correct result is 0.505L = { 0x3fe028f5, 0xc28f5c29, 0xbc547ae1, 0x47ae1480 } */ x = 1.01L; { int exp = -9999; long double y = frexpl (x, &exp); if (!(exp == 1 && y == 0.505L)) return 1; } /* Test on large finite numbers. This fails on BeOS at i = 16322, while LDBL_MAX_EXP = 16384. In the loop end test, we test x against Infinity, rather than comparing i with LDBL_MAX_EXP, because BeOS has a wrong LDBL_MAX_EXP. */ { int i; for (i = 1, x = 1.0L; x != x + x; i++, x *= 2.0L) { int exp = -9999; frexpl (x, &exp); if (exp != i) return 1; } } /* Test on denormalized numbers. */ { int i; for (i = 1, x = 1.0L; i >= LDBL_MIN_EXP; i--, x *= 0.5L) ; if (x > 0.0L) { int exp; long double y = frexpl (x, &exp); /* On machines with IEEE854 arithmetic: x = 1.68105e-4932, exp = -16382, y = 0.5. On MacOS X 10.5: exp = -16384, y = 0.5. */ if (exp != LDBL_MIN_EXP - 1) return 1; } } /* Test on infinite numbers. */ x = 1.0L / 0.0L; { int exp; long double y = frexpl (x, &exp); if (y != x) return 1; } return 0; } _ACEOF rm -f conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' { (case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_try") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then gl_cv_func_frexpl_works=yes else $as_echo "$as_me: program exited with status $ac_status" >&5 $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) gl_cv_func_frexpl_works=no fi rm -rf conftest.dSYM rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi fi { $as_echo "$as_me:$LINENO: result: $gl_cv_func_frexpl_works" >&5 $as_echo "$gl_cv_func_frexpl_works" >&6; } case "$gl_cv_func_frexpl_works" in *yes) gl_func_frexpl_no_libm=yes ;; *) gl_func_frexpl_no_libm=no; REPLACE_FREXPL=1 ;; esac else gl_func_frexpl_no_libm=no REPLACE_FREXPL=1 fi if test $gl_func_frexpl_no_libm = yes; then cat >>confdefs.h <<\_ACEOF #define HAVE_FREXPL_IN_LIBC 1 _ACEOF { $as_echo "$as_me:$LINENO: checking whether frexpl is declared" >&5 $as_echo_n "checking whether frexpl is declared... " >&6; } if test "${ac_cv_have_decl_frexpl+set}" = set; then $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include int main () { #ifndef frexpl (void) frexpl; #endif ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_cv_have_decl_frexpl=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_have_decl_frexpl=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:$LINENO: result: $ac_cv_have_decl_frexpl" >&5 $as_echo "$ac_cv_have_decl_frexpl" >&6; } if test "x$ac_cv_have_decl_frexpl" = x""yes; then : else HAVE_DECL_FREXPL=0 fi else HAVE_DECL_FREXPL=0 gl_LIBOBJS="$gl_LIBOBJS frexpl.$ac_objext" fi GNULIB_FREXPL=1 { $as_echo "$as_me:$LINENO: checking for fseeko" >&5 $as_echo_n "checking for fseeko... " >&6; } if test "${gl_cv_func_fseeko+set}" = set; then $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include int main () { fseeko (stdin, 0, 0); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || $as_test_x conftest$ac_exeext }; then gl_cv_func_fseeko=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 gl_cv_func_fseeko=no fi rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi { $as_echo "$as_me:$LINENO: result: $gl_cv_func_fseeko" >&5 $as_echo "$gl_cv_func_fseeko" >&6; } if test $gl_cv_func_fseeko = no \ || test $gl_cv_var_stdin_large_offset = no; then gl_LIBOBJS="$gl_LIBOBJS fseeko.$ac_objext" REPLACE_FSEEKO=1 fi GNULIB_FSEEKO=1 for ac_func in ftw do as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` { $as_echo "$as_me:$LINENO: checking for $ac_func" >&5 $as_echo_n "checking for $ac_func... " >&6; } if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Define $ac_func to an innocuous variant, in case declares $ac_func. For example, HP-UX 11i declares gettimeofday. */ #define $ac_func innocuous_$ac_func /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $ac_func (); below. Prefer to if __STDC__ is defined, since exists even on freestanding compilers. */ #ifdef __STDC__ # include #else # include #endif #undef $ac_func /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char $ac_func (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined __stub_$ac_func || defined __stub___$ac_func choke me #endif int main () { return $ac_func (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || $as_test_x conftest$ac_exeext }; then eval "$as_ac_var=yes" else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 eval "$as_ac_var=no" fi rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi ac_res=`eval 'as_val=${'$as_ac_var'} $as_echo "$as_val"'` { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } as_val=`eval 'as_val=${'$as_ac_var'} $as_echo "$as_val"'` if test "x$as_val" = x""yes; then cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF else gl_LIBOBJS="$gl_LIBOBJS $ac_func.$ac_objext" fi done : { $as_echo "$as_me:$LINENO: checking how to do getaddrinfo, freeaddrinfo and getnameinfo" >&5 $as_echo "$as_me: checking how to do getaddrinfo, freeaddrinfo and getnameinfo" >&6;} GETADDRINFO_LIB= gai_saved_LIBS="$LIBS" { $as_echo "$as_me:$LINENO: checking for library containing getaddrinfo" >&5 $as_echo_n "checking for library containing getaddrinfo... " >&6; } if test "${ac_cv_search_getaddrinfo+set}" = set; then $as_echo_n "(cached) " >&6 else ac_func_search_save_LIBS=$LIBS cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char getaddrinfo (); int main () { return getaddrinfo (); ; return 0; } _ACEOF for ac_lib in '' socket network net; do if test -z "$ac_lib"; then ac_res="none required" else ac_res=-l$ac_lib LIBS="-l$ac_lib $ac_func_search_save_LIBS" fi rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || $as_test_x conftest$ac_exeext }; then ac_cv_search_getaddrinfo=$ac_res else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext if test "${ac_cv_search_getaddrinfo+set}" = set; then break fi done if test "${ac_cv_search_getaddrinfo+set}" = set; then : else ac_cv_search_getaddrinfo=no fi rm conftest.$ac_ext LIBS=$ac_func_search_save_LIBS fi { $as_echo "$as_me:$LINENO: result: $ac_cv_search_getaddrinfo" >&5 $as_echo "$ac_cv_search_getaddrinfo" >&6; } ac_res=$ac_cv_search_getaddrinfo if test "$ac_res" != no; then test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" if test "$ac_cv_search_getaddrinfo" != "none required"; then GETADDRINFO_LIB="$ac_cv_search_getaddrinfo" fi fi LIBS="$gai_saved_LIBS $GETADDRINFO_LIB" { $as_echo "$as_me:$LINENO: checking for getaddrinfo" >&5 $as_echo_n "checking for getaddrinfo... " >&6; } if test "${gl_cv_func_getaddrinfo+set}" = set; then $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #ifdef HAVE_SYS_SOCKET_H #include #endif #ifdef HAVE_NETDB_H #include #endif #include int main () { getaddrinfo("", "", NULL, NULL); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || $as_test_x conftest$ac_exeext }; then gl_cv_func_getaddrinfo=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 gl_cv_func_getaddrinfo=no fi rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi { $as_echo "$as_me:$LINENO: result: $gl_cv_func_getaddrinfo" >&5 $as_echo "$gl_cv_func_getaddrinfo" >&6; } if test $gl_cv_func_getaddrinfo = no; then { $as_echo "$as_me:$LINENO: checking for getaddrinfo in ws2tcpip.h and -lws2_32" >&5 $as_echo_n "checking for getaddrinfo in ws2tcpip.h and -lws2_32... " >&6; } if test "${gl_cv_w32_getaddrinfo+set}" = set; then $as_echo_n "(cached) " >&6 else gl_cv_w32_getaddrinfo=no am_save_LIBS="$LIBS" LIBS="$LIBS -lws2_32" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #ifdef HAVE_WS2TCPIP_H #include #endif #include int main () { getaddrinfo(NULL, NULL, NULL, NULL); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || $as_test_x conftest$ac_exeext }; then gl_cv_w32_getaddrinfo=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS="$am_save_LIBS" fi { $as_echo "$as_me:$LINENO: result: $gl_cv_w32_getaddrinfo" >&5 $as_echo "$gl_cv_w32_getaddrinfo" >&6; } if test "$gl_cv_w32_getaddrinfo" = "yes"; then GETADDRINFO_LIB="-lws2_32" LIBS="$gai_saved_LIBS $GETADDRINFO_LIB" else gl_LIBOBJS="$gl_LIBOBJS getaddrinfo.$ac_objext" fi fi # We can't use AC_REPLACE_FUNCS here because gai_strerror may be an # inline function declared in ws2tcpip.h, so we need to get that # header included somehow. { $as_echo "$as_me:$LINENO: checking for gai_strerror (possibly via ws2tcpip.h)" >&5 $as_echo_n "checking for gai_strerror (possibly via ws2tcpip.h)... " >&6; } if test "${gl_cv_func_gai_strerror+set}" = set; then $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #ifdef HAVE_SYS_SOCKET_H #include #endif #ifdef HAVE_NETDB_H #include #endif #ifdef HAVE_WS2TCPIP_H #include #endif #include int main () { gai_strerror (NULL); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || $as_test_x conftest$ac_exeext }; then gl_cv_func_gai_strerror=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 gl_cv_func_gai_strerror=no fi rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi { $as_echo "$as_me:$LINENO: result: $gl_cv_func_gai_strerror" >&5 $as_echo "$gl_cv_func_gai_strerror" >&6; } if test $gl_cv_func_gai_strerror = no; then gl_LIBOBJS="$gl_LIBOBJS gai_strerror.$ac_objext" fi LIBS="$gai_saved_LIBS" { $as_echo "$as_me:$LINENO: checking for struct sockaddr.sa_len" >&5 $as_echo_n "checking for struct sockaddr.sa_len... " >&6; } if test "${ac_cv_member_struct_sockaddr_sa_len+set}" = set; then $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include int main () { static struct sockaddr ac_aggr; if (ac_aggr.sa_len) return 0; ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_cv_member_struct_sockaddr_sa_len=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include int main () { static struct sockaddr ac_aggr; if (sizeof ac_aggr.sa_len) return 0; ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_cv_member_struct_sockaddr_sa_len=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_member_struct_sockaddr_sa_len=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:$LINENO: result: $ac_cv_member_struct_sockaddr_sa_len" >&5 $as_echo "$ac_cv_member_struct_sockaddr_sa_len" >&6; } if test "x$ac_cv_member_struct_sockaddr_sa_len" = x""yes; then cat >>confdefs.h <<_ACEOF #define HAVE_STRUCT_SOCKADDR_SA_LEN 1 _ACEOF fi : { $as_echo "$as_me:$LINENO: checking whether getaddrinfo is declared" >&5 $as_echo_n "checking whether getaddrinfo is declared... " >&6; } if test "${ac_cv_have_decl_getaddrinfo+set}" = set; then $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* sys/types.h is not needed according to POSIX, but the sys/socket.h in i386-unknown-freebsd4.10 and powerpc-apple-darwin5.5 required it. */ #include #ifdef HAVE_SYS_SOCKET_H #include #endif #ifdef HAVE_NETDB_H #include #endif #ifdef HAVE_WS2TCPIP_H #include #endif int main () { #ifndef getaddrinfo (void) getaddrinfo; #endif ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_cv_have_decl_getaddrinfo=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_have_decl_getaddrinfo=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:$LINENO: result: $ac_cv_have_decl_getaddrinfo" >&5 $as_echo "$ac_cv_have_decl_getaddrinfo" >&6; } if test "x$ac_cv_have_decl_getaddrinfo" = x""yes; then cat >>confdefs.h <<_ACEOF #define HAVE_DECL_GETADDRINFO 1 _ACEOF else cat >>confdefs.h <<_ACEOF #define HAVE_DECL_GETADDRINFO 0 _ACEOF fi { $as_echo "$as_me:$LINENO: checking whether freeaddrinfo is declared" >&5 $as_echo_n "checking whether freeaddrinfo is declared... " >&6; } if test "${ac_cv_have_decl_freeaddrinfo+set}" = set; then $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* sys/types.h is not needed according to POSIX, but the sys/socket.h in i386-unknown-freebsd4.10 and powerpc-apple-darwin5.5 required it. */ #include #ifdef HAVE_SYS_SOCKET_H #include #endif #ifdef HAVE_NETDB_H #include #endif #ifdef HAVE_WS2TCPIP_H #include #endif int main () { #ifndef freeaddrinfo (void) freeaddrinfo; #endif ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_cv_have_decl_freeaddrinfo=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_have_decl_freeaddrinfo=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:$LINENO: result: $ac_cv_have_decl_freeaddrinfo" >&5 $as_echo "$ac_cv_have_decl_freeaddrinfo" >&6; } if test "x$ac_cv_have_decl_freeaddrinfo" = x""yes; then cat >>confdefs.h <<_ACEOF #define HAVE_DECL_FREEADDRINFO 1 _ACEOF else cat >>confdefs.h <<_ACEOF #define HAVE_DECL_FREEADDRINFO 0 _ACEOF fi { $as_echo "$as_me:$LINENO: checking whether gai_strerror is declared" >&5 $as_echo_n "checking whether gai_strerror is declared... " >&6; } if test "${ac_cv_have_decl_gai_strerror+set}" = set; then $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* sys/types.h is not needed according to POSIX, but the sys/socket.h in i386-unknown-freebsd4.10 and powerpc-apple-darwin5.5 required it. */ #include #ifdef HAVE_SYS_SOCKET_H #include #endif #ifdef HAVE_NETDB_H #include #endif #ifdef HAVE_WS2TCPIP_H #include #endif int main () { #ifndef gai_strerror (void) gai_strerror; #endif ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_cv_have_decl_gai_strerror=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_have_decl_gai_strerror=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:$LINENO: result: $ac_cv_have_decl_gai_strerror" >&5 $as_echo "$ac_cv_have_decl_gai_strerror" >&6; } if test "x$ac_cv_have_decl_gai_strerror" = x""yes; then cat >>confdefs.h <<_ACEOF #define HAVE_DECL_GAI_STRERROR 1 _ACEOF else cat >>confdefs.h <<_ACEOF #define HAVE_DECL_GAI_STRERROR 0 _ACEOF fi { $as_echo "$as_me:$LINENO: checking whether getnameinfo is declared" >&5 $as_echo_n "checking whether getnameinfo is declared... " >&6; } if test "${ac_cv_have_decl_getnameinfo+set}" = set; then $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* sys/types.h is not needed according to POSIX, but the sys/socket.h in i386-unknown-freebsd4.10 and powerpc-apple-darwin5.5 required it. */ #include #ifdef HAVE_SYS_SOCKET_H #include #endif #ifdef HAVE_NETDB_H #include #endif #ifdef HAVE_WS2TCPIP_H #include #endif int main () { #ifndef getnameinfo (void) getnameinfo; #endif ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_cv_have_decl_getnameinfo=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_have_decl_getnameinfo=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:$LINENO: result: $ac_cv_have_decl_getnameinfo" >&5 $as_echo "$ac_cv_have_decl_getnameinfo" >&6; } if test "x$ac_cv_have_decl_getnameinfo" = x""yes; then cat >>confdefs.h <<_ACEOF #define HAVE_DECL_GETNAMEINFO 1 _ACEOF else cat >>confdefs.h <<_ACEOF #define HAVE_DECL_GETNAMEINFO 0 _ACEOF fi if test $ac_cv_have_decl_getaddrinfo = no; then HAVE_DECL_GETADDRINFO=0 fi if test $ac_cv_have_decl_freeaddrinfo = no; then HAVE_DECL_FREEADDRINFO=0 fi if test $ac_cv_have_decl_gai_strerror = no; then HAVE_DECL_GAI_STRERROR=0 fi if test $ac_cv_have_decl_getnameinfo = no; then HAVE_DECL_GETNAMEINFO=0 fi { $as_echo "$as_me:$LINENO: checking for struct addrinfo" >&5 $as_echo_n "checking for struct addrinfo... " >&6; } if test "${ac_cv_type_struct_addrinfo+set}" = set; then $as_echo_n "(cached) " >&6 else ac_cv_type_struct_addrinfo=no cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #ifdef HAVE_SYS_SOCKET_H #include #endif #ifdef HAVE_NETDB_H #include #endif #ifdef HAVE_WS2TCPIP_H #include #endif int main () { if (sizeof (struct addrinfo)) return 0; ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #ifdef HAVE_SYS_SOCKET_H #include #endif #ifdef HAVE_NETDB_H #include #endif #ifdef HAVE_WS2TCPIP_H #include #endif int main () { if (sizeof ((struct addrinfo))) return 0; ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then : else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_type_struct_addrinfo=yes fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:$LINENO: result: $ac_cv_type_struct_addrinfo" >&5 $as_echo "$ac_cv_type_struct_addrinfo" >&6; } if test "x$ac_cv_type_struct_addrinfo" = x""yes; then cat >>confdefs.h <<_ACEOF #define HAVE_STRUCT_ADDRINFO 1 _ACEOF fi if test $ac_cv_type_struct_addrinfo = no; then HAVE_STRUCT_ADDRINFO=0 fi case " $GETADDRINFO_LIB " in *" $HOSTENT_LIB "*) ;; *) GETADDRINFO_LIB="$GETADDRINFO_LIB $HOSTENT_LIB" ;; esac case " $GETADDRINFO_LIB " in *" $SERVENT_LIB "*) ;; *) GETADDRINFO_LIB="$GETADDRINFO_LIB $SERVENT_LIB" ;; esac case " $GETADDRINFO_LIB " in *" $INET_NTOP_LIB "*) ;; *) GETADDRINFO_LIB="$GETADDRINFO_LIB $INET_NTOP_LIB" ;; esac GNULIB_GETADDRINFO=1 : : if test $ac_cv_func_getdelim = yes; then { $as_echo "$as_me:$LINENO: checking for working getdelim function" >&5 $as_echo_n "checking for working getdelim function... " >&6; } if test "${gl_cv_func_working_getdelim+set}" = set; then $as_echo_n "(cached) " >&6 else echo fooNbarN | tr -d '\012' | tr N '\012' > conftest.data if test "$cross_compiling" = yes; then cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #ifdef __GNU_LIBRARY__ #if (__GLIBC__ >= 2) Lucky GNU user #endif #endif _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "Lucky GNU user" >/dev/null 2>&1; then gl_cv_func_working_getdelim=yes else gl_cv_func_working_getdelim=no fi rm -f conftest* else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ # include # include # include int main () { FILE *in = fopen ("./conftest.data", "r"); if (!in) return 1; { /* Test result for a NULL buffer and a zero size. Based on a test program from Karl Heuer. */ char *line = NULL; size_t siz = 0; int len = getdelim (&line, &siz, '\n', in); if (!(len == 4 && line && strcmp (line, "foo\n") == 0)) return 1; } { /* Test result for a NULL buffer and a non-zero size. This crashes on FreeBSD 8.0. */ char *line = NULL; size_t siz = (size_t)(~0) / 4; if (getdelim (&line, &siz, '\n', in) == -1) return 1; } return 0; } _ACEOF rm -f conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' { (case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_try") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then gl_cv_func_working_getdelim=yes else $as_echo "$as_me: program exited with status $ac_status" >&5 $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) gl_cv_func_working_getdelim=no fi rm -rf conftest.dSYM rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi fi { $as_echo "$as_me:$LINENO: result: $gl_cv_func_working_getdelim" >&5 $as_echo "$gl_cv_func_working_getdelim" >&6; } else gl_cv_func_working_getdelim=no fi if test $ac_cv_have_decl_getdelim = no; then HAVE_DECL_GETDELIM=0 fi if test $gl_cv_func_working_getdelim = no; then if test $ac_cv_func_getdelim = yes; then REPLACE_GETDELIM=1 fi gl_LIBOBJS="$gl_LIBOBJS getdelim.$ac_objext" for ac_func in flockfile funlockfile do as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` { $as_echo "$as_me:$LINENO: checking for $ac_func" >&5 $as_echo_n "checking for $ac_func... " >&6; } if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Define $ac_func to an innocuous variant, in case declares $ac_func. For example, HP-UX 11i declares gettimeofday. */ #define $ac_func innocuous_$ac_func /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $ac_func (); below. Prefer to if __STDC__ is defined, since exists even on freestanding compilers. */ #ifdef __STDC__ # include #else # include #endif #undef $ac_func /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char $ac_func (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined __stub_$ac_func || defined __stub___$ac_func choke me #endif int main () { return $ac_func (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || $as_test_x conftest$ac_exeext }; then eval "$as_ac_var=yes" else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 eval "$as_ac_var=no" fi rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi ac_res=`eval 'as_val=${'$as_ac_var'} $as_echo "$as_val"'` { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } as_val=`eval 'as_val=${'$as_ac_var'} $as_echo "$as_val"'` if test "x$as_val" = x""yes; then cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF fi done { $as_echo "$as_me:$LINENO: checking whether getc_unlocked is declared" >&5 $as_echo_n "checking whether getc_unlocked is declared... " >&6; } if test "${ac_cv_have_decl_getc_unlocked+set}" = set; then $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default int main () { #ifndef getc_unlocked (void) getc_unlocked; #endif ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_cv_have_decl_getc_unlocked=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_have_decl_getc_unlocked=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:$LINENO: result: $ac_cv_have_decl_getc_unlocked" >&5 $as_echo "$ac_cv_have_decl_getc_unlocked" >&6; } if test "x$ac_cv_have_decl_getc_unlocked" = x""yes; then cat >>confdefs.h <<_ACEOF #define HAVE_DECL_GETC_UNLOCKED 1 _ACEOF else cat >>confdefs.h <<_ACEOF #define HAVE_DECL_GETC_UNLOCKED 0 _ACEOF fi fi GNULIB_GETDELIM=1 : if test $ac_cv_header_sys_socket_h != yes; then for ac_header in winsock2.h do as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 $as_echo_n "checking for $ac_header... " >&6; } if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then $as_echo_n "(cached) " >&6 fi ac_res=`eval 'as_val=${'$as_ac_Header'} $as_echo "$as_val"'` { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } else # Is the header compilable? { $as_echo "$as_me:$LINENO: checking $ac_header usability" >&5 $as_echo_n "checking $ac_header usability... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default #include <$ac_header> _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_header_compiler=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_compiler=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext { $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 $as_echo "$ac_header_compiler" >&6; } # Is the header present? { $as_echo "$as_me:$LINENO: checking $ac_header presence" >&5 $as_echo_n "checking $ac_header presence... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include <$ac_header> _ACEOF if { (ac_try="$ac_cpp conftest.$ac_ext" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null && { test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || test ! -s conftest.err }; then ac_header_preproc=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi rm -f conftest.err conftest.$ac_ext { $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 $as_echo "$ac_header_preproc" >&6; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in yes:no: ) { $as_echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 $as_echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 $as_echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} ac_header_preproc=yes ;; no:yes:* ) { $as_echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 $as_echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} { $as_echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 $as_echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} { $as_echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 $as_echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} { $as_echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 $as_echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 $as_echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} { $as_echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 $as_echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} ;; esac { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 $as_echo_n "checking for $ac_header... " >&6; } if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then $as_echo_n "(cached) " >&6 else eval "$as_ac_Header=\$ac_header_preproc" fi ac_res=`eval 'as_val=${'$as_ac_Header'} $as_echo "$as_val"'` { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } fi as_val=`eval 'as_val=${'$as_ac_Header'} $as_echo "$as_val"'` if test "x$as_val" = x""yes; then cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi done fi if test "$ac_cv_header_winsock2_h" = yes; then HAVE_WINSOCK2_H=1 UNISTD_H_HAVE_WINSOCK2_H=1 SYS_IOCTL_H_HAVE_WINSOCK2_H=1 else HAVE_WINSOCK2_H=0 fi GETHOSTNAME_LIB= for ac_func in gethostname do as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` { $as_echo "$as_me:$LINENO: checking for $ac_func" >&5 $as_echo_n "checking for $ac_func... " >&6; } if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Define $ac_func to an innocuous variant, in case declares $ac_func. For example, HP-UX 11i declares gettimeofday. */ #define $ac_func innocuous_$ac_func /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $ac_func (); below. Prefer to if __STDC__ is defined, since exists even on freestanding compilers. */ #ifdef __STDC__ # include #else # include #endif #undef $ac_func /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char $ac_func (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined __stub_$ac_func || defined __stub___$ac_func choke me #endif int main () { return $ac_func (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || $as_test_x conftest$ac_exeext }; then eval "$as_ac_var=yes" else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 eval "$as_ac_var=no" fi rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi ac_res=`eval 'as_val=${'$as_ac_var'} $as_echo "$as_val"'` { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } as_val=`eval 'as_val=${'$as_ac_var'} $as_echo "$as_val"'` if test "x$as_val" = x""yes; then cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF else { $as_echo "$as_me:$LINENO: checking for gethostname in winsock2.h and -lws2_32" >&5 $as_echo_n "checking for gethostname in winsock2.h and -lws2_32... " >&6; } if test "${gl_cv_w32_gethostname+set}" = set; then $as_echo_n "(cached) " >&6 else gl_cv_w32_gethostname=no gl_save_LIBS="$LIBS" LIBS="$LIBS -lws2_32" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #ifdef HAVE_WINSOCK2_H #include #endif #include int main () { gethostname(NULL, 0); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || $as_test_x conftest$ac_exeext }; then gl_cv_w32_gethostname=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS="$gl_save_LIBS" fi { $as_echo "$as_me:$LINENO: result: $gl_cv_w32_gethostname" >&5 $as_echo "$gl_cv_w32_gethostname" >&6; } if test "$gl_cv_w32_gethostname" = "yes"; then GETHOSTNAME_LIB="-lws2_32" fi fi done if test "$ac_cv_func_gethostname" = no; then gl_LIBOBJS="$gl_LIBOBJS gethostname.$ac_objext" HAVE_GETHOSTNAME=0 if test "$gl_cv_w32_gethostname" != "yes"; then for ac_func in uname do as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` { $as_echo "$as_me:$LINENO: checking for $ac_func" >&5 $as_echo_n "checking for $ac_func... " >&6; } if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Define $ac_func to an innocuous variant, in case declares $ac_func. For example, HP-UX 11i declares gettimeofday. */ #define $ac_func innocuous_$ac_func /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $ac_func (); below. Prefer to if __STDC__ is defined, since exists even on freestanding compilers. */ #ifdef __STDC__ # include #else # include #endif #undef $ac_func /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char $ac_func (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined __stub_$ac_func || defined __stub___$ac_func choke me #endif int main () { return $ac_func (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || $as_test_x conftest$ac_exeext }; then eval "$as_ac_var=yes" else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 eval "$as_ac_var=no" fi rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi ac_res=`eval 'as_val=${'$as_ac_var'} $as_echo "$as_val"'` { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } as_val=`eval 'as_val=${'$as_ac_var'} $as_echo "$as_val"'` if test "x$as_val" = x""yes; then cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF fi done fi fi : : : { $as_echo "$as_me:$LINENO: checking for HOST_NAME_MAX" >&5 $as_echo_n "checking for HOST_NAME_MAX... " >&6; } if test "${gl_cv_decl_HOST_NAME_MAX+set}" = set; then $as_echo_n "(cached) " >&6 else gl_cv_decl_HOST_NAME_MAX= cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #ifdef HOST_NAME_MAX lucky #endif _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "lucky" >/dev/null 2>&1; then gl_cv_decl_HOST_NAME_MAX=yes fi rm -f conftest* if test -z "$gl_cv_decl_HOST_NAME_MAX"; then if test "$gl_cv_w32_gethostname" = yes; then gl_cv_decl_HOST_NAME_MAX=256 else if test "$cross_compiling" = yes; then # Depending upon the size, compute the lo and hi bounds. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #if HAVE_SYS_PARAM_H # include #endif #if HAVE_SYS_SOCKET_H # include #endif #if HAVE_NETDB_H # include #endif int main () { static int test_array [1 - 2 * !((MAXHOSTNAMELEN) >= 0)]; test_array [0] = 0 ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_lo=0 ac_mid=0 while :; do cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #if HAVE_SYS_PARAM_H # include #endif #if HAVE_SYS_SOCKET_H # include #endif #if HAVE_NETDB_H # include #endif int main () { static int test_array [1 - 2 * !((MAXHOSTNAMELEN) <= $ac_mid)]; test_array [0] = 0 ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_hi=$ac_mid; break else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_lo=`expr $ac_mid + 1` if test $ac_lo -le $ac_mid; then ac_lo= ac_hi= break fi ac_mid=`expr 2 '*' $ac_mid + 1` fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext done else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #if HAVE_SYS_PARAM_H # include #endif #if HAVE_SYS_SOCKET_H # include #endif #if HAVE_NETDB_H # include #endif int main () { static int test_array [1 - 2 * !((MAXHOSTNAMELEN) < 0)]; test_array [0] = 0 ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_hi=-1 ac_mid=-1 while :; do cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #if HAVE_SYS_PARAM_H # include #endif #if HAVE_SYS_SOCKET_H # include #endif #if HAVE_NETDB_H # include #endif int main () { static int test_array [1 - 2 * !((MAXHOSTNAMELEN) >= $ac_mid)]; test_array [0] = 0 ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_lo=$ac_mid; break else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_hi=`expr '(' $ac_mid ')' - 1` if test $ac_mid -le $ac_hi; then ac_lo= ac_hi= break fi ac_mid=`expr 2 '*' $ac_mid` fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext done else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_lo= ac_hi= fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext # Binary search between lo and hi bounds. while test "x$ac_lo" != "x$ac_hi"; do ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo` cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #if HAVE_SYS_PARAM_H # include #endif #if HAVE_SYS_SOCKET_H # include #endif #if HAVE_NETDB_H # include #endif int main () { static int test_array [1 - 2 * !((MAXHOSTNAMELEN) <= $ac_mid)]; test_array [0] = 0 ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_hi=$ac_mid else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_lo=`expr '(' $ac_mid ')' + 1` fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext done case $ac_lo in ?*) gl_cv_decl_HOST_NAME_MAX=$ac_lo;; '') ;; esac else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #if HAVE_SYS_PARAM_H # include #endif #if HAVE_SYS_SOCKET_H # include #endif #if HAVE_NETDB_H # include #endif static long int longval () { return MAXHOSTNAMELEN; } static unsigned long int ulongval () { return MAXHOSTNAMELEN; } #include #include int main () { FILE *f = fopen ("conftest.val", "w"); if (! f) return 1; if ((MAXHOSTNAMELEN) < 0) { long int i = longval (); if (i != (MAXHOSTNAMELEN)) return 1; fprintf (f, "%ld", i); } else { unsigned long int i = ulongval (); if (i != (MAXHOSTNAMELEN)) return 1; fprintf (f, "%lu", i); } /* Do not output a trailing newline, as this causes \r\n confusion on some platforms. */ return ferror (f) || fclose (f) != 0; ; return 0; } _ACEOF rm -f conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' { (case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_try") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then gl_cv_decl_HOST_NAME_MAX=`cat conftest.val` else $as_echo "$as_me: program exited with status $ac_status" >&5 $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -rf conftest.dSYM rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi rm -f conftest.val fi fi fi { $as_echo "$as_me:$LINENO: result: $gl_cv_decl_HOST_NAME_MAX" >&5 $as_echo "$gl_cv_decl_HOST_NAME_MAX" >&6; } if test "$gl_cv_decl_HOST_NAME_MAX" != yes; then cat >>confdefs.h <<_ACEOF #define HOST_NAME_MAX $gl_cv_decl_HOST_NAME_MAX _ACEOF fi GNULIB_GETHOSTNAME=1 : gl_getline_needs_run_time_check=no { $as_echo "$as_me:$LINENO: checking for getline" >&5 $as_echo_n "checking for getline... " >&6; } if test "${ac_cv_func_getline+set}" = set; then $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Define getline to an innocuous variant, in case declares getline. For example, HP-UX 11i declares gettimeofday. */ #define getline innocuous_getline /* System header to define __stub macros and hopefully few prototypes, which can conflict with char getline (); below. Prefer to if __STDC__ is defined, since exists even on freestanding compilers. */ #ifdef __STDC__ # include #else # include #endif #undef getline /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char getline (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined __stub_getline || defined __stub___getline choke me #endif int main () { return getline (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || $as_test_x conftest$ac_exeext }; then ac_cv_func_getline=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_func_getline=no fi rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi { $as_echo "$as_me:$LINENO: result: $ac_cv_func_getline" >&5 $as_echo "$ac_cv_func_getline" >&6; } if test "x$ac_cv_func_getline" = x""yes; then gl_getline_needs_run_time_check=yes else am_cv_func_working_getline=no fi if test $gl_getline_needs_run_time_check = yes; then { $as_echo "$as_me:$LINENO: checking for working getline function" >&5 $as_echo_n "checking for working getline function... " >&6; } if test "${am_cv_func_working_getline+set}" = set; then $as_echo_n "(cached) " >&6 else echo fooNbarN | tr -d '\012' | tr N '\012' > conftest.data if test "$cross_compiling" = yes; then cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #ifdef __GNU_LIBRARY__ #if (__GLIBC__ >= 2) Lucky GNU user #endif #endif _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "Lucky GNU user" >/dev/null 2>&1; then am_cv_func_working_getline=yes else am_cv_func_working_getline=no fi rm -f conftest* else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ # include # include # include int main () { FILE *in = fopen ("./conftest.data", "r"); if (!in) return 1; { /* Test result for a NULL buffer and a zero size. Based on a test program from Karl Heuer. */ char *line = NULL; size_t siz = 0; int len = getline (&line, &siz, in); if (!(len == 4 && line && strcmp (line, "foo\n") == 0)) return 1; } { /* Test result for a NULL buffer and a non-zero size. This crashes on FreeBSD 8.0. */ char *line = NULL; size_t siz = (size_t)(~0) / 4; if (getline (&line, &siz, in) == -1) return 1; } return 0; } _ACEOF rm -f conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' { (case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_try") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then am_cv_func_working_getline=yes else $as_echo "$as_me: program exited with status $ac_status" >&5 $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) am_cv_func_working_getline=no fi rm -rf conftest.dSYM rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi fi { $as_echo "$as_me:$LINENO: result: $am_cv_func_working_getline" >&5 $as_echo "$am_cv_func_working_getline" >&6; } fi if test $ac_cv_have_decl_getline = no; then HAVE_DECL_GETLINE=0 fi if test $am_cv_func_working_getline = no; then REPLACE_GETLINE=1 gl_LIBOBJS="$gl_LIBOBJS getline.$ac_objext" : : if test $ac_cv_func_getdelim = yes; then { $as_echo "$as_me:$LINENO: checking for working getdelim function" >&5 $as_echo_n "checking for working getdelim function... " >&6; } if test "${gl_cv_func_working_getdelim+set}" = set; then $as_echo_n "(cached) " >&6 else echo fooNbarN | tr -d '\012' | tr N '\012' > conftest.data if test "$cross_compiling" = yes; then cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #ifdef __GNU_LIBRARY__ #if (__GLIBC__ >= 2) Lucky GNU user #endif #endif _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "Lucky GNU user" >/dev/null 2>&1; then gl_cv_func_working_getdelim=yes else gl_cv_func_working_getdelim=no fi rm -f conftest* else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ # include # include # include int main () { FILE *in = fopen ("./conftest.data", "r"); if (!in) return 1; { /* Test result for a NULL buffer and a zero size. Based on a test program from Karl Heuer. */ char *line = NULL; size_t siz = 0; int len = getdelim (&line, &siz, '\n', in); if (!(len == 4 && line && strcmp (line, "foo\n") == 0)) return 1; } { /* Test result for a NULL buffer and a non-zero size. This crashes on FreeBSD 8.0. */ char *line = NULL; size_t siz = (size_t)(~0) / 4; if (getdelim (&line, &siz, '\n', in) == -1) return 1; } return 0; } _ACEOF rm -f conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' { (case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_try") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then gl_cv_func_working_getdelim=yes else $as_echo "$as_me: program exited with status $ac_status" >&5 $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) gl_cv_func_working_getdelim=no fi rm -rf conftest.dSYM rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi fi { $as_echo "$as_me:$LINENO: result: $gl_cv_func_working_getdelim" >&5 $as_echo "$gl_cv_func_working_getdelim" >&6; } else gl_cv_func_working_getdelim=no fi if test $ac_cv_have_decl_getdelim = no; then HAVE_DECL_GETDELIM=0 fi if test $gl_cv_func_working_getdelim = no; then if test $ac_cv_func_getdelim = yes; then REPLACE_GETDELIM=1 fi gl_LIBOBJS="$gl_LIBOBJS getdelim.$ac_objext" for ac_func in flockfile funlockfile do as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` { $as_echo "$as_me:$LINENO: checking for $ac_func" >&5 $as_echo_n "checking for $ac_func... " >&6; } if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Define $ac_func to an innocuous variant, in case declares $ac_func. For example, HP-UX 11i declares gettimeofday. */ #define $ac_func innocuous_$ac_func /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $ac_func (); below. Prefer to if __STDC__ is defined, since exists even on freestanding compilers. */ #ifdef __STDC__ # include #else # include #endif #undef $ac_func /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char $ac_func (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined __stub_$ac_func || defined __stub___$ac_func choke me #endif int main () { return $ac_func (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || $as_test_x conftest$ac_exeext }; then eval "$as_ac_var=yes" else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 eval "$as_ac_var=no" fi rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi ac_res=`eval 'as_val=${'$as_ac_var'} $as_echo "$as_val"'` { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } as_val=`eval 'as_val=${'$as_ac_var'} $as_echo "$as_val"'` if test "x$as_val" = x""yes; then cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF fi done { $as_echo "$as_me:$LINENO: checking whether getc_unlocked is declared" >&5 $as_echo_n "checking whether getc_unlocked is declared... " >&6; } if test "${ac_cv_have_decl_getc_unlocked+set}" = set; then $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default int main () { #ifndef getc_unlocked (void) getc_unlocked; #endif ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_cv_have_decl_getc_unlocked=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_have_decl_getc_unlocked=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:$LINENO: result: $ac_cv_have_decl_getc_unlocked" >&5 $as_echo "$ac_cv_have_decl_getc_unlocked" >&6; } if test "x$ac_cv_have_decl_getc_unlocked" = x""yes; then cat >>confdefs.h <<_ACEOF #define HAVE_DECL_GETC_UNLOCKED 1 _ACEOF else cat >>confdefs.h <<_ACEOF #define HAVE_DECL_GETC_UNLOCKED 0 _ACEOF fi fi fi GNULIB_GETLINE=1 for ac_func in getpass do as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` { $as_echo "$as_me:$LINENO: checking for $ac_func" >&5 $as_echo_n "checking for $ac_func... " >&6; } if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Define $ac_func to an innocuous variant, in case declares $ac_func. For example, HP-UX 11i declares gettimeofday. */ #define $ac_func innocuous_$ac_func /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $ac_func (); below. Prefer to if __STDC__ is defined, since exists even on freestanding compilers. */ #ifdef __STDC__ # include #else # include #endif #undef $ac_func /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char $ac_func (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined __stub_$ac_func || defined __stub___$ac_func choke me #endif int main () { return $ac_func (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || $as_test_x conftest$ac_exeext }; then eval "$as_ac_var=yes" else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 eval "$as_ac_var=no" fi rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi ac_res=`eval 'as_val=${'$as_ac_var'} $as_echo "$as_val"'` { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } as_val=`eval 'as_val=${'$as_ac_var'} $as_echo "$as_val"'` if test "x$as_val" = x""yes; then cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF else gl_LIBOBJS="$gl_LIBOBJS $ac_func.$ac_objext" fi done : if test $ac_cv_func_getpass = no; then : : { $as_echo "$as_me:$LINENO: checking whether __fsetlocking is declared" >&5 $as_echo_n "checking whether __fsetlocking is declared... " >&6; } if test "${ac_cv_have_decl___fsetlocking+set}" = set; then $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #if HAVE_STDIO_EXT_H #include #endif int main () { #ifndef __fsetlocking (void) __fsetlocking; #endif ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_cv_have_decl___fsetlocking=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_have_decl___fsetlocking=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:$LINENO: result: $ac_cv_have_decl___fsetlocking" >&5 $as_echo "$ac_cv_have_decl___fsetlocking" >&6; } if test "x$ac_cv_have_decl___fsetlocking" = x""yes; then cat >>confdefs.h <<_ACEOF #define HAVE_DECL___FSETLOCKING 1 _ACEOF else cat >>confdefs.h <<_ACEOF #define HAVE_DECL___FSETLOCKING 0 _ACEOF fi : : : : : : fi if test "$ac_cv_header_winsock2_h" = yes; then gl_LIBOBJS="$gl_LIBOBJS getsockname.$ac_objext" fi GNULIB_GETSOCKNAME=1 : gl_gettimeofday_timezone=void if test $ac_cv_func_gettimeofday = yes; then { $as_echo "$as_me:$LINENO: checking whether gettimeofday clobbers localtime buffer" >&5 $as_echo_n "checking whether gettimeofday clobbers localtime buffer... " >&6; } if test "${gl_cv_func_gettimeofday_clobber+set}" = set; then $as_echo_n "(cached) " >&6 else if test "$cross_compiling" = yes; then gl_cv_func_gettimeofday_clobber=yes else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #include #include #include int main () { time_t t = 0; struct tm *lt; struct tm saved_lt; struct timeval tv; lt = localtime (&t); saved_lt = *lt; gettimeofday (&tv, NULL); return memcmp (lt, &saved_lt, sizeof (struct tm)) != 0; ; return 0; } _ACEOF rm -f conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' { (case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_try") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then gl_cv_func_gettimeofday_clobber=no else $as_echo "$as_me: program exited with status $ac_status" >&5 $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) gl_cv_func_gettimeofday_clobber=yes fi rm -rf conftest.dSYM rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi fi { $as_echo "$as_me:$LINENO: result: $gl_cv_func_gettimeofday_clobber" >&5 $as_echo "$gl_cv_func_gettimeofday_clobber" >&6; } if test $gl_cv_func_gettimeofday_clobber = yes; then REPLACE_GETTIMEOFDAY=1 gl_LIBOBJS="$gl_LIBOBJS gettimeofday.$ac_objext" for ac_header in sys/timeb.h do as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 $as_echo_n "checking for $ac_header... " >&6; } if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then $as_echo_n "(cached) " >&6 fi ac_res=`eval 'as_val=${'$as_ac_Header'} $as_echo "$as_val"'` { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } else # Is the header compilable? { $as_echo "$as_me:$LINENO: checking $ac_header usability" >&5 $as_echo_n "checking $ac_header usability... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default #include <$ac_header> _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_header_compiler=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_compiler=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext { $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 $as_echo "$ac_header_compiler" >&6; } # Is the header present? { $as_echo "$as_me:$LINENO: checking $ac_header presence" >&5 $as_echo_n "checking $ac_header presence... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include <$ac_header> _ACEOF if { (ac_try="$ac_cpp conftest.$ac_ext" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null && { test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || test ! -s conftest.err }; then ac_header_preproc=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi rm -f conftest.err conftest.$ac_ext { $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 $as_echo "$ac_header_preproc" >&6; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in yes:no: ) { $as_echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 $as_echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 $as_echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} ac_header_preproc=yes ;; no:yes:* ) { $as_echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 $as_echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} { $as_echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 $as_echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} { $as_echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 $as_echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} { $as_echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 $as_echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 $as_echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} { $as_echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 $as_echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} ;; esac { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 $as_echo_n "checking for $ac_header... " >&6; } if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then $as_echo_n "(cached) " >&6 else eval "$as_ac_Header=\$ac_header_preproc" fi ac_res=`eval 'as_val=${'$as_ac_Header'} $as_echo "$as_val"'` { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } fi as_val=`eval 'as_val=${'$as_ac_Header'} $as_echo "$as_val"'` if test "x$as_val" = x""yes; then cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi done for ac_func in _ftime do as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` { $as_echo "$as_me:$LINENO: checking for $ac_func" >&5 $as_echo_n "checking for $ac_func... " >&6; } if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Define $ac_func to an innocuous variant, in case declares $ac_func. For example, HP-UX 11i declares gettimeofday. */ #define $ac_func innocuous_$ac_func /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $ac_func (); below. Prefer to if __STDC__ is defined, since exists even on freestanding compilers. */ #ifdef __STDC__ # include #else # include #endif #undef $ac_func /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char $ac_func (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined __stub_$ac_func || defined __stub___$ac_func choke me #endif int main () { return $ac_func (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || $as_test_x conftest$ac_exeext }; then eval "$as_ac_var=yes" else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 eval "$as_ac_var=no" fi rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi ac_res=`eval 'as_val=${'$as_ac_var'} $as_echo "$as_val"'` { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } as_val=`eval 'as_val=${'$as_ac_var'} $as_echo "$as_val"'` if test "x$as_val" = x""yes; then cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF fi done cat >>confdefs.h <<\_ACEOF #define gmtime rpl_gmtime _ACEOF cat >>confdefs.h <<\_ACEOF #define localtime rpl_localtime _ACEOF cat >>confdefs.h <<\_ACEOF #define GETTIMEOFDAY_CLOBBERS_LOCALTIME 1 _ACEOF fi { $as_echo "$as_me:$LINENO: checking for gettimeofday with POSIX signature" >&5 $as_echo_n "checking for gettimeofday with POSIX signature... " >&6; } if test "${gl_cv_func_gettimeofday_posix_signature+set}" = set; then $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include struct timeval c; int gettimeofday (struct timeval *restrict, void *restrict); int main () { /* glibc uses struct timezone * rather than the POSIX void * if _GNU_SOURCE is defined. However, since the only portable use of gettimeofday uses NULL as the second parameter, and since the glibc definition is actually more typesafe, it is not worth wrapping this to get a compliant signature. */ int (*f) (struct timeval *restrict, void *restrict) = gettimeofday; int x = f (&c, 0); return !(x | c.tv_sec | c.tv_usec); ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then gl_cv_func_gettimeofday_posix_signature=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include int gettimeofday (struct timeval *restrict, struct timezone *restrict); int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then gl_cv_func_gettimeofday_posix_signature=almost else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 gl_cv_func_gettimeofday_posix_signature=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:$LINENO: result: $gl_cv_func_gettimeofday_posix_signature" >&5 $as_echo "$gl_cv_func_gettimeofday_posix_signature" >&6; } if test $gl_cv_func_gettimeofday_posix_signature = almost; then gl_gettimeofday_timezone='struct timezone' elif test $gl_cv_func_gettimeofday_posix_signature != yes; then REPLACE_GETTIMEOFDAY=1 gl_LIBOBJS="$gl_LIBOBJS gettimeofday.$ac_objext" for ac_header in sys/timeb.h do as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 $as_echo_n "checking for $ac_header... " >&6; } if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then $as_echo_n "(cached) " >&6 fi ac_res=`eval 'as_val=${'$as_ac_Header'} $as_echo "$as_val"'` { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } else # Is the header compilable? { $as_echo "$as_me:$LINENO: checking $ac_header usability" >&5 $as_echo_n "checking $ac_header usability... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default #include <$ac_header> _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_header_compiler=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_compiler=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext { $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 $as_echo "$ac_header_compiler" >&6; } # Is the header present? { $as_echo "$as_me:$LINENO: checking $ac_header presence" >&5 $as_echo_n "checking $ac_header presence... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include <$ac_header> _ACEOF if { (ac_try="$ac_cpp conftest.$ac_ext" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null && { test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || test ! -s conftest.err }; then ac_header_preproc=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi rm -f conftest.err conftest.$ac_ext { $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 $as_echo "$ac_header_preproc" >&6; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in yes:no: ) { $as_echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 $as_echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 $as_echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} ac_header_preproc=yes ;; no:yes:* ) { $as_echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 $as_echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} { $as_echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 $as_echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} { $as_echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 $as_echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} { $as_echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 $as_echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 $as_echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} { $as_echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 $as_echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} ;; esac { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 $as_echo_n "checking for $ac_header... " >&6; } if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then $as_echo_n "(cached) " >&6 else eval "$as_ac_Header=\$ac_header_preproc" fi ac_res=`eval 'as_val=${'$as_ac_Header'} $as_echo "$as_val"'` { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } fi as_val=`eval 'as_val=${'$as_ac_Header'} $as_echo "$as_val"'` if test "x$as_val" = x""yes; then cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi done for ac_func in _ftime do as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` { $as_echo "$as_me:$LINENO: checking for $ac_func" >&5 $as_echo_n "checking for $ac_func... " >&6; } if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Define $ac_func to an innocuous variant, in case declares $ac_func. For example, HP-UX 11i declares gettimeofday. */ #define $ac_func innocuous_$ac_func /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $ac_func (); below. Prefer to if __STDC__ is defined, since exists even on freestanding compilers. */ #ifdef __STDC__ # include #else # include #endif #undef $ac_func /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char $ac_func (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined __stub_$ac_func || defined __stub___$ac_func choke me #endif int main () { return $ac_func (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || $as_test_x conftest$ac_exeext }; then eval "$as_ac_var=yes" else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 eval "$as_ac_var=no" fi rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi ac_res=`eval 'as_val=${'$as_ac_var'} $as_echo "$as_val"'` { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } as_val=`eval 'as_val=${'$as_ac_var'} $as_echo "$as_val"'` if test "x$as_val" = x""yes; then cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF fi done fi fi cat >>confdefs.h <<_ACEOF #define GETTIMEOFDAY_TIMEZONE $gl_gettimeofday_timezone _ACEOF GNULIB_GETTIMEOFDAY=1 HOSTENT_LIB= gl_saved_libs="$LIBS" { $as_echo "$as_me:$LINENO: checking for library containing gethostbyname" >&5 $as_echo_n "checking for library containing gethostbyname... " >&6; } if test "${ac_cv_search_gethostbyname+set}" = set; then $as_echo_n "(cached) " >&6 else ac_func_search_save_LIBS=$LIBS cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char gethostbyname (); int main () { return gethostbyname (); ; return 0; } _ACEOF for ac_lib in '' nsl network net; do if test -z "$ac_lib"; then ac_res="none required" else ac_res=-l$ac_lib LIBS="-l$ac_lib $ac_func_search_save_LIBS" fi rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || $as_test_x conftest$ac_exeext }; then ac_cv_search_gethostbyname=$ac_res else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext if test "${ac_cv_search_gethostbyname+set}" = set; then break fi done if test "${ac_cv_search_gethostbyname+set}" = set; then : else ac_cv_search_gethostbyname=no fi rm conftest.$ac_ext LIBS=$ac_func_search_save_LIBS fi { $as_echo "$as_me:$LINENO: result: $ac_cv_search_gethostbyname" >&5 $as_echo "$ac_cv_search_gethostbyname" >&6; } ac_res=$ac_cv_search_gethostbyname if test "$ac_res" != no; then test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" if test "$ac_cv_search_gethostbyname" != "none required"; then HOSTENT_LIB="$ac_cv_search_gethostbyname" fi fi LIBS="$gl_saved_libs" if test -z "$HOSTENT_LIB"; then for ac_func in gethostbyname do as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` { $as_echo "$as_me:$LINENO: checking for $ac_func" >&5 $as_echo_n "checking for $ac_func... " >&6; } if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Define $ac_func to an innocuous variant, in case declares $ac_func. For example, HP-UX 11i declares gettimeofday. */ #define $ac_func innocuous_$ac_func /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $ac_func (); below. Prefer to if __STDC__ is defined, since exists even on freestanding compilers. */ #ifdef __STDC__ # include #else # include #endif #undef $ac_func /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char $ac_func (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined __stub_$ac_func || defined __stub___$ac_func choke me #endif int main () { return $ac_func (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || $as_test_x conftest$ac_exeext }; then eval "$as_ac_var=yes" else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 eval "$as_ac_var=no" fi rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi ac_res=`eval 'as_val=${'$as_ac_var'} $as_echo "$as_val"'` { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } as_val=`eval 'as_val=${'$as_ac_var'} $as_echo "$as_val"'` if test "x$as_val" = x""yes; then cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF else { $as_echo "$as_me:$LINENO: checking for gethostbyname in winsock2.h and -lws2_32" >&5 $as_echo_n "checking for gethostbyname in winsock2.h and -lws2_32... " >&6; } if test "${gl_cv_w32_gethostbyname+set}" = set; then $as_echo_n "(cached) " >&6 else gl_cv_w32_gethostbyname=no gl_save_LIBS="$LIBS" LIBS="$LIBS -lws2_32" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #ifdef HAVE_WINSOCK2_H #include #endif #include int main () { gethostbyname(NULL); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || $as_test_x conftest$ac_exeext }; then gl_cv_w32_gethostbyname=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS="$gl_save_LIBS" fi { $as_echo "$as_me:$LINENO: result: $gl_cv_w32_gethostbyname" >&5 $as_echo "$gl_cv_w32_gethostbyname" >&6; } if test "$gl_cv_w32_gethostbyname" = "yes"; then HOSTENT_LIB="-lws2_32" fi fi done fi : gl_save_LIBS=$LIBS { $as_echo "$as_me:$LINENO: checking for library containing inet_ntop" >&5 $as_echo_n "checking for library containing inet_ntop... " >&6; } if test "${ac_cv_search_inet_ntop+set}" = set; then $as_echo_n "(cached) " >&6 else ac_func_search_save_LIBS=$LIBS cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char inet_ntop (); int main () { return inet_ntop (); ; return 0; } _ACEOF for ac_lib in '' nsl; do if test -z "$ac_lib"; then ac_res="none required" else ac_res=-l$ac_lib LIBS="-l$ac_lib $ac_func_search_save_LIBS" fi rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || $as_test_x conftest$ac_exeext }; then ac_cv_search_inet_ntop=$ac_res else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext if test "${ac_cv_search_inet_ntop+set}" = set; then break fi done if test "${ac_cv_search_inet_ntop+set}" = set; then : else ac_cv_search_inet_ntop=no fi rm conftest.$ac_ext LIBS=$ac_func_search_save_LIBS fi { $as_echo "$as_me:$LINENO: result: $ac_cv_search_inet_ntop" >&5 $as_echo "$ac_cv_search_inet_ntop" >&6; } ac_res=$ac_cv_search_inet_ntop if test "$ac_res" != no; then test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" else for ac_func in inet_ntop do as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` { $as_echo "$as_me:$LINENO: checking for $ac_func" >&5 $as_echo_n "checking for $ac_func... " >&6; } if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Define $ac_func to an innocuous variant, in case declares $ac_func. For example, HP-UX 11i declares gettimeofday. */ #define $ac_func innocuous_$ac_func /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $ac_func (); below. Prefer to if __STDC__ is defined, since exists even on freestanding compilers. */ #ifdef __STDC__ # include #else # include #endif #undef $ac_func /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char $ac_func (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined __stub_$ac_func || defined __stub___$ac_func choke me #endif int main () { return $ac_func (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || $as_test_x conftest$ac_exeext }; then eval "$as_ac_var=yes" else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 eval "$as_ac_var=no" fi rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi ac_res=`eval 'as_val=${'$as_ac_var'} $as_echo "$as_val"'` { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } as_val=`eval 'as_val=${'$as_ac_var'} $as_echo "$as_val"'` if test "x$as_val" = x""yes; then cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF else gl_LIBOBJS="$gl_LIBOBJS $ac_func.$ac_objext" fi done fi LIBS=$gl_save_LIBS INET_NTOP_LIB= if test "$ac_cv_search_inet_ntop" != "no" && test "$ac_cv_search_inet_ntop" != "none required"; then INET_NTOP_LIB="$ac_cv_search_inet_ntop" fi { $as_echo "$as_me:$LINENO: checking whether inet_ntop is declared" >&5 $as_echo_n "checking whether inet_ntop is declared... " >&6; } if test "${ac_cv_have_decl_inet_ntop+set}" = set; then $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include int main () { #ifndef inet_ntop (void) inet_ntop; #endif ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_cv_have_decl_inet_ntop=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_have_decl_inet_ntop=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:$LINENO: result: $ac_cv_have_decl_inet_ntop" >&5 $as_echo "$ac_cv_have_decl_inet_ntop" >&6; } if test "x$ac_cv_have_decl_inet_ntop" = x""yes; then cat >>confdefs.h <<_ACEOF #define HAVE_DECL_INET_NTOP 1 _ACEOF else cat >>confdefs.h <<_ACEOF #define HAVE_DECL_INET_NTOP 0 _ACEOF fi if test $ac_cv_have_decl_inet_ntop = no; then HAVE_DECL_INET_NTOP=0 fi GNULIB_INET_NTOP=1 : gl_save_LIBS=$LIBS { $as_echo "$as_me:$LINENO: checking for library containing inet_pton" >&5 $as_echo_n "checking for library containing inet_pton... " >&6; } if test "${ac_cv_search_inet_pton+set}" = set; then $as_echo_n "(cached) " >&6 else ac_func_search_save_LIBS=$LIBS cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char inet_pton (); int main () { return inet_pton (); ; return 0; } _ACEOF for ac_lib in '' nsl; do if test -z "$ac_lib"; then ac_res="none required" else ac_res=-l$ac_lib LIBS="-l$ac_lib $ac_func_search_save_LIBS" fi rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || $as_test_x conftest$ac_exeext }; then ac_cv_search_inet_pton=$ac_res else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext if test "${ac_cv_search_inet_pton+set}" = set; then break fi done if test "${ac_cv_search_inet_pton+set}" = set; then : else ac_cv_search_inet_pton=no fi rm conftest.$ac_ext LIBS=$ac_func_search_save_LIBS fi { $as_echo "$as_me:$LINENO: result: $ac_cv_search_inet_pton" >&5 $as_echo "$ac_cv_search_inet_pton" >&6; } ac_res=$ac_cv_search_inet_pton if test "$ac_res" != no; then test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" else for ac_func in inet_pton do as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` { $as_echo "$as_me:$LINENO: checking for $ac_func" >&5 $as_echo_n "checking for $ac_func... " >&6; } if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Define $ac_func to an innocuous variant, in case declares $ac_func. For example, HP-UX 11i declares gettimeofday. */ #define $ac_func innocuous_$ac_func /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $ac_func (); below. Prefer to if __STDC__ is defined, since exists even on freestanding compilers. */ #ifdef __STDC__ # include #else # include #endif #undef $ac_func /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char $ac_func (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined __stub_$ac_func || defined __stub___$ac_func choke me #endif int main () { return $ac_func (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || $as_test_x conftest$ac_exeext }; then eval "$as_ac_var=yes" else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 eval "$as_ac_var=no" fi rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi ac_res=`eval 'as_val=${'$as_ac_var'} $as_echo "$as_val"'` { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } as_val=`eval 'as_val=${'$as_ac_var'} $as_echo "$as_val"'` if test "x$as_val" = x""yes; then cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF else gl_LIBOBJS="$gl_LIBOBJS $ac_func.$ac_objext" fi done fi LIBS=$gl_save_LIBS INET_PTON_LIB= if test "$ac_cv_search_inet_pton" != "no" && test "$ac_cv_search_inet_pton" != "none required"; then INET_PTON_LIB="$ac_cv_search_inet_pton" fi { $as_echo "$as_me:$LINENO: checking whether inet_pton is declared" >&5 $as_echo_n "checking whether inet_pton is declared... " >&6; } if test "${ac_cv_have_decl_inet_pton+set}" = set; then $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include int main () { #ifndef inet_pton (void) inet_pton; #endif ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_cv_have_decl_inet_pton=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_have_decl_inet_pton=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:$LINENO: result: $ac_cv_have_decl_inet_pton" >&5 $as_echo "$ac_cv_have_decl_inet_pton" >&6; } if test "x$ac_cv_have_decl_inet_pton" = x""yes; then cat >>confdefs.h <<_ACEOF #define HAVE_DECL_INET_PTON 1 _ACEOF else cat >>confdefs.h <<_ACEOF #define HAVE_DECL_INET_PTON 0 _ACEOF fi if test $ac_cv_have_decl_inet_pton = no; then HAVE_DECL_INET_PTON=0 fi GNULIB_INET_PTON=1 if test "$ac_cv_header_winsock2_h" = yes; then gl_LIBOBJS="$gl_LIBOBJS ioctl.$ac_objext" : fi GNULIB_IOCTL=1 cat >>confdefs.h <<\_ACEOF #define GNULIB_IOCTL 1 _ACEOF { $as_echo "$as_me:$LINENO: checking whether isnan(double) can be used without linking with libm" >&5 $as_echo_n "checking whether isnan(double) can be used without linking with libm... " >&6; } if test "${gl_cv_func_isnand_no_libm+set}" = set; then $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #if __GNUC__ >= 4 # undef isnand # define isnand(x) __builtin_isnan ((double)(x)) #else # undef isnand # define isnand(x) isnan ((double)(x)) #endif double x; int main () { return isnand (x); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || $as_test_x conftest$ac_exeext }; then gl_cv_func_isnand_no_libm=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 gl_cv_func_isnand_no_libm=no fi rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi { $as_echo "$as_me:$LINENO: result: $gl_cv_func_isnand_no_libm" >&5 $as_echo "$gl_cv_func_isnand_no_libm" >&6; } if test $gl_cv_func_isnand_no_libm = yes; then cat >>confdefs.h <<\_ACEOF #define HAVE_ISNAND_IN_LIBC 1 _ACEOF else gl_LIBOBJS="$gl_LIBOBJS isnand.$ac_objext" { $as_echo "$as_me:$LINENO: checking where to find the exponent in a 'double'" >&5 $as_echo_n "checking where to find the exponent in a 'double'... " >&6; } if test "${gl_cv_cc_double_expbit0+set}" = set; then $as_echo_n "(cached) " >&6 else if test "$cross_compiling" = yes; then cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #if defined arm || defined __arm || defined __arm__ mixed_endianness #endif _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "mixed_endianness" >/dev/null 2>&1; then gl_cv_cc_double_expbit0="unknown" else : if test "${ac_cv_c_bigendian+set}" = set; then $as_echo_n "(cached) " >&6 else ac_cv_c_bigendian=unknown # See if we're dealing with a universal compiler. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #ifndef __APPLE_CC__ not a universal capable compiler #endif typedef int dummy; _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then # Check for potential -arch flags. It is not universal unless # there are some -arch flags. Note that *ppc* also matches # ppc64. This check is also rather less than ideal. case "${CC} ${CFLAGS} ${CPPFLAGS} ${LDFLAGS}" in #( *-arch*ppc*|*-arch*i386*|*-arch*x86_64*) ac_cv_c_bigendian=universal;; esac else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext if test $ac_cv_c_bigendian = unknown; then # See if sys/param.h defines the BYTE_ORDER macro. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #include int main () { #if ! (defined BYTE_ORDER && defined BIG_ENDIAN \ && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \ && LITTLE_ENDIAN) bogus endian macros #endif ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then # It does; now see whether it defined to BIG_ENDIAN or not. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #include int main () { #if BYTE_ORDER != BIG_ENDIAN not big endian #endif ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_cv_c_bigendian=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_c_bigendian=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi if test $ac_cv_c_bigendian = unknown; then # See if defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris). cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include int main () { #if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN) bogus endian macros #endif ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then # It does; now see whether it defined to _BIG_ENDIAN or not. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include int main () { #ifndef _BIG_ENDIAN not big endian #endif ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_cv_c_bigendian=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_c_bigendian=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi if test $ac_cv_c_bigendian = unknown; then # Compile a test program. if test "$cross_compiling" = yes; then # Try to guess by grepping values from an object file. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ short int ascii_mm[] = { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 }; short int ascii_ii[] = { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 }; int use_ascii (int i) { return ascii_mm[i] + ascii_ii[i]; } short int ebcdic_ii[] = { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 }; short int ebcdic_mm[] = { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 }; int use_ebcdic (int i) { return ebcdic_mm[i] + ebcdic_ii[i]; } extern int foo; int main () { return use_ascii (foo) == use_ebcdic (foo); ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then ac_cv_c_bigendian=yes fi if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then if test "$ac_cv_c_bigendian" = unknown; then ac_cv_c_bigendian=no else # finding both strings is unlikely to happen, but who knows? ac_cv_c_bigendian=unknown fi fi else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default int main () { /* Are we little or big endian? From Harbison&Steele. */ union { long int l; char c[sizeof (long int)]; } u; u.l = 1; return u.c[sizeof (long int) - 1] == 1; ; return 0; } _ACEOF rm -f conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' { (case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_try") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_c_bigendian=no else $as_echo "$as_me: program exited with status $ac_status" >&5 $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) ac_cv_c_bigendian=yes fi rm -rf conftest.dSYM rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi fi fi : case $ac_cv_c_bigendian in #( yes) gl_cv_cc_double_expbit0="word 0 bit 20";; #( no) gl_cv_cc_double_expbit0="word 1 bit 20" ;; #( universal) cat >>confdefs.h <<\_ACEOF #define AC_APPLE_UNIVERSAL_BUILD 1 _ACEOF ;; #( *) gl_cv_cc_double_expbit0="unknown" ;; esac fi rm -f conftest* else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #include #include #include #define NWORDS \ ((sizeof (double) + sizeof (unsigned int) - 1) / sizeof (unsigned int)) typedef union { double value; unsigned int word[NWORDS]; } memory_double; static unsigned int ored_words[NWORDS]; static unsigned int anded_words[NWORDS]; static void add_to_ored_words (double x) { memory_double m; size_t i; /* Clear it first, in case sizeof (double) < sizeof (memory_double). */ memset (&m, 0, sizeof (memory_double)); m.value = x; for (i = 0; i < NWORDS; i++) { ored_words[i] |= m.word[i]; anded_words[i] &= m.word[i]; } } int main () { size_t j; FILE *fp = fopen ("conftest.out", "w"); if (fp == NULL) return 1; for (j = 0; j < NWORDS; j++) anded_words[j] = ~ (unsigned int) 0; add_to_ored_words (0.25); add_to_ored_words (0.5); add_to_ored_words (1.0); add_to_ored_words (2.0); add_to_ored_words (4.0); /* Remove bits that are common (e.g. if representation of the first mantissa bit is explicit). */ for (j = 0; j < NWORDS; j++) ored_words[j] &= ~anded_words[j]; /* Now find the nonzero word. */ for (j = 0; j < NWORDS; j++) if (ored_words[j] != 0) break; if (j < NWORDS) { size_t i; for (i = j + 1; i < NWORDS; i++) if (ored_words[i] != 0) { fprintf (fp, "unknown"); return (fclose (fp) != 0); } for (i = 0; ; i++) if ((ored_words[j] >> i) & 1) { fprintf (fp, "word %d bit %d", (int) j, (int) i); return (fclose (fp) != 0); } } fprintf (fp, "unknown"); return (fclose (fp) != 0); } _ACEOF rm -f conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' { (case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_try") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then gl_cv_cc_double_expbit0=`cat conftest.out` else $as_echo "$as_me: program exited with status $ac_status" >&5 $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) gl_cv_cc_double_expbit0="unknown" fi rm -rf conftest.dSYM rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi rm -f conftest.out fi { $as_echo "$as_me:$LINENO: result: $gl_cv_cc_double_expbit0" >&5 $as_echo "$gl_cv_cc_double_expbit0" >&6; } case "$gl_cv_cc_double_expbit0" in word*bit*) word=`echo "$gl_cv_cc_double_expbit0" | sed -e 's/word //' -e 's/ bit.*//'` bit=`echo "$gl_cv_cc_double_expbit0" | sed -e 's/word.*bit //'` cat >>confdefs.h <<_ACEOF #define DBL_EXPBIT0_WORD $word _ACEOF cat >>confdefs.h <<_ACEOF #define DBL_EXPBIT0_BIT $bit _ACEOF ;; esac fi { $as_echo "$as_me:$LINENO: checking whether isnan(float) can be used without linking with libm" >&5 $as_echo_n "checking whether isnan(float) can be used without linking with libm... " >&6; } if test "${gl_cv_func_isnanf_no_libm+set}" = set; then $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #if __GNUC__ >= 4 # undef isnanf # define isnanf(x) __builtin_isnanf ((float)(x)) #elif defined isnan # undef isnanf # define isnanf(x) isnan ((float)(x)) #endif float x; int main () { return isnanf (x); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || $as_test_x conftest$ac_exeext }; then gl_cv_func_isnanf_no_libm=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 gl_cv_func_isnanf_no_libm=no fi rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi { $as_echo "$as_me:$LINENO: result: $gl_cv_func_isnanf_no_libm" >&5 $as_echo "$gl_cv_func_isnanf_no_libm" >&6; } if test $gl_cv_func_isnanf_no_libm = yes; then { $as_echo "$as_me:$LINENO: checking whether isnan(float) works" >&5 $as_echo_n "checking whether isnan(float) works... " >&6; } if test "${gl_cv_func_isnanf_works+set}" = set; then $as_echo_n "(cached) " >&6 else if test "$cross_compiling" = yes; then case "$host_os" in irix* | solaris*) gl_cv_func_isnanf_works="guessing no";; *) gl_cv_func_isnanf_works="guessing yes";; esac else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #if __GNUC__ >= 4 # undef isnanf # define isnanf(x) __builtin_isnanf ((float)(x)) #elif defined isnan # undef isnanf # define isnanf(x) isnan ((float)(x)) #endif /* The Compaq (ex-DEC) C 6.4 compiler chokes on the expression 0.0 / 0.0. */ #ifdef __DECC static float NaN () { static float zero = 0.0f; return zero / zero; } #else # define NaN() (0.0f / 0.0f) #endif #define NWORDS \ ((sizeof (float) + sizeof (unsigned int) - 1) / sizeof (unsigned int)) typedef union { unsigned int word[NWORDS]; float value; } memory_float; int main() { memory_float m; if (isnanf (1.0f / 0.0f)) return 1; if (!isnanf (NaN ())) return 1; #if defined FLT_EXPBIT0_WORD && defined FLT_EXPBIT0_BIT /* The isnanf function should be immune against changes in the sign bit and in the mantissa bits. The xor operation twiddles a bit that can only be a sign bit or a mantissa bit. */ if (FLT_EXPBIT0_WORD == 0 && FLT_EXPBIT0_BIT > 0) { m.value = NaN (); /* Set the bits below the exponent to 01111...111. */ m.word[0] &= -1U << FLT_EXPBIT0_BIT; m.word[0] |= 1U << (FLT_EXPBIT0_BIT - 1) - 1; if (!isnanf (m.value)) return 1; } #endif return 0; } _ACEOF rm -f conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' { (case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_try") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then gl_cv_func_isnanf_works=yes else $as_echo "$as_me: program exited with status $ac_status" >&5 $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) gl_cv_func_isnanf_works=no fi rm -rf conftest.dSYM rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi fi { $as_echo "$as_me:$LINENO: result: $gl_cv_func_isnanf_works" >&5 $as_echo "$gl_cv_func_isnanf_works" >&6; } fi if test $gl_cv_func_isnanf_no_libm = yes \ && { case "$gl_cv_func_isnanf_works" in *yes) true;; *) false;; esac }; then cat >>confdefs.h <<\_ACEOF #define HAVE_ISNANF_IN_LIBC 1 _ACEOF else gl_LIBOBJS="$gl_LIBOBJS isnanf.$ac_objext" { $as_echo "$as_me:$LINENO: checking where to find the exponent in a 'float'" >&5 $as_echo_n "checking where to find the exponent in a 'float'... " >&6; } if test "${gl_cv_cc_float_expbit0+set}" = set; then $as_echo_n "(cached) " >&6 else if test "$cross_compiling" = yes; then gl_cv_cc_float_expbit0="word 0 bit 23" else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #include #include #include #define NWORDS \ ((sizeof (float) + sizeof (unsigned int) - 1) / sizeof (unsigned int)) typedef union { float value; unsigned int word[NWORDS]; } memory_float; static unsigned int ored_words[NWORDS]; static unsigned int anded_words[NWORDS]; static void add_to_ored_words (float x) { memory_float m; size_t i; /* Clear it first, in case sizeof (float) < sizeof (memory_float). */ memset (&m, 0, sizeof (memory_float)); m.value = x; for (i = 0; i < NWORDS; i++) { ored_words[i] |= m.word[i]; anded_words[i] &= m.word[i]; } } int main () { size_t j; FILE *fp = fopen ("conftest.out", "w"); if (fp == NULL) return 1; for (j = 0; j < NWORDS; j++) anded_words[j] = ~ (unsigned int) 0; add_to_ored_words (0.25f); add_to_ored_words (0.5f); add_to_ored_words (1.0f); add_to_ored_words (2.0f); add_to_ored_words (4.0f); /* Remove bits that are common (e.g. if representation of the first mantissa bit is explicit). */ for (j = 0; j < NWORDS; j++) ored_words[j] &= ~anded_words[j]; /* Now find the nonzero word. */ for (j = 0; j < NWORDS; j++) if (ored_words[j] != 0) break; if (j < NWORDS) { size_t i; for (i = j + 1; i < NWORDS; i++) if (ored_words[i] != 0) { fprintf (fp, "unknown"); return (fclose (fp) != 0); } for (i = 0; ; i++) if ((ored_words[j] >> i) & 1) { fprintf (fp, "word %d bit %d", (int) j, (int) i); return (fclose (fp) != 0); } } fprintf (fp, "unknown"); return (fclose (fp) != 0); } _ACEOF rm -f conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' { (case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_try") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then gl_cv_cc_float_expbit0=`cat conftest.out` else $as_echo "$as_me: program exited with status $ac_status" >&5 $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) gl_cv_cc_float_expbit0="unknown" fi rm -rf conftest.dSYM rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi rm -f conftest.out fi { $as_echo "$as_me:$LINENO: result: $gl_cv_cc_float_expbit0" >&5 $as_echo "$gl_cv_cc_float_expbit0" >&6; } case "$gl_cv_cc_float_expbit0" in word*bit*) word=`echo "$gl_cv_cc_float_expbit0" | sed -e 's/word //' -e 's/ bit.*//'` bit=`echo "$gl_cv_cc_float_expbit0" | sed -e 's/word.*bit //'` cat >>confdefs.h <<_ACEOF #define FLT_EXPBIT0_WORD $word _ACEOF cat >>confdefs.h <<_ACEOF #define FLT_EXPBIT0_BIT $bit _ACEOF ;; esac fi { $as_echo "$as_me:$LINENO: checking whether isnan(long double) can be used without linking with libm" >&5 $as_echo_n "checking whether isnan(long double) can be used without linking with libm... " >&6; } if test "${gl_cv_func_isnanl_no_libm+set}" = set; then $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #if __GNUC__ >= 4 # undef isnanl # define isnanl(x) __builtin_isnanl ((long double)(x)) #elif defined isnan # undef isnanl # define isnanl(x) isnan ((long double)(x)) #endif long double x; int main () { return isnanl (x); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || $as_test_x conftest$ac_exeext }; then gl_cv_func_isnanl_no_libm=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 gl_cv_func_isnanl_no_libm=no fi rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi { $as_echo "$as_me:$LINENO: result: $gl_cv_func_isnanl_no_libm" >&5 $as_echo "$gl_cv_func_isnanl_no_libm" >&6; } gl_func_isnanl_no_libm=$gl_cv_func_isnanl_no_libm if test $gl_func_isnanl_no_libm = yes; then { $as_echo "$as_me:$LINENO: checking whether isnanl works" >&5 $as_echo_n "checking whether isnanl works... " >&6; } if test "${gl_cv_func_isnanl_works+set}" = set; then $as_echo_n "(cached) " >&6 else if test "$cross_compiling" = yes; then case "$host_cpu" in # Guess no on ia64, x86_64, i386. ia64 | x86_64 | i*86) gl_cv_func_isnanl_works="guessing no";; *) case "$host_os" in netbsd*) gl_cv_func_isnanl_works="guessing no";; *) gl_cv_func_isnanl_works="guessing yes";; esac ;; esac else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #include #include #if __GNUC__ >= 4 # undef isnanl # define isnanl(x) __builtin_isnanl ((long double)(x)) #elif defined isnan # undef isnanl # define isnanl(x) isnan ((long double)(x)) #endif #define NWORDS \ ((sizeof (long double) + sizeof (unsigned int) - 1) / sizeof (unsigned int)) typedef union { unsigned int word[NWORDS]; long double value; } memory_long_double; /* On Irix 6.5, gcc 3.4.3 can't compute compile-time NaN, and needs the runtime type conversion. */ #ifdef __sgi static long double NaNl () { double zero = 0.0; return zero / zero; } #else # define NaNl() (0.0L / 0.0L) #endif int main () { memory_long_double m; unsigned int i; if (!isnanl (NaNl ())) return 1; /* The isnanl function should be immune against changes in the sign bit and in the mantissa bits. The xor operation twiddles a bit that can only be a sign bit or a mantissa bit (since the exponent never extends to bit 31). */ m.value = NaNl (); m.word[NWORDS / 2] ^= (unsigned int) 1 << (sizeof (unsigned int) * CHAR_BIT - 1); for (i = 0; i < NWORDS; i++) m.word[i] |= 1; if (!isnanl (m.value)) return 1; #if ((defined __ia64 && LDBL_MANT_DIG == 64) || (defined __x86_64__ || defined __amd64__) || (defined __i386 || defined __i386__ || defined _I386 || defined _M_IX86 || defined _X86_)) /* Representation of an 80-bit 'long double' as an initializer for a sequence of 'unsigned int' words. */ # ifdef WORDS_BIGENDIAN # define LDBL80_WORDS(exponent,manthi,mantlo) \ { ((unsigned int) (exponent) << 16) | ((unsigned int) (manthi) >> 16), \ ((unsigned int) (manthi) << 16) | (unsigned int) (mantlo) >> 16), \ (unsigned int) (mantlo) << 16 \ } # else # define LDBL80_WORDS(exponent,manthi,mantlo) \ { mantlo, manthi, exponent } # endif { /* Quiet NaN. */ static memory_long_double x = { LDBL80_WORDS (0xFFFF, 0xC3333333, 0x00000000) }; if (!isnanl (x.value)) return 1; } { /* Signalling NaN. */ static memory_long_double x = { LDBL80_WORDS (0xFFFF, 0x83333333, 0x00000000) }; if (!isnanl (x.value)) return 1; } /* The isnanl function should recognize Pseudo-NaNs, Pseudo-Infinities, Pseudo-Zeroes, Unnormalized Numbers, and Pseudo-Denormals, as defined in Intel IA-64 Architecture Software Developer's Manual, Volume 1: Application Architecture. Table 5-2 "Floating-Point Register Encodings" Figure 5-6 "Memory to Floating-Point Register Data Translation" */ { /* Pseudo-NaN. */ static memory_long_double x = { LDBL80_WORDS (0xFFFF, 0x40000001, 0x00000000) }; if (!isnanl (x.value)) return 1; } { /* Pseudo-Infinity. */ static memory_long_double x = { LDBL80_WORDS (0xFFFF, 0x00000000, 0x00000000) }; if (!isnanl (x.value)) return 1; } { /* Pseudo-Zero. */ static memory_long_double x = { LDBL80_WORDS (0x4004, 0x00000000, 0x00000000) }; if (!isnanl (x.value)) return 1; } { /* Unnormalized number. */ static memory_long_double x = { LDBL80_WORDS (0x4000, 0x63333333, 0x00000000) }; if (!isnanl (x.value)) return 1; } { /* Pseudo-Denormal. */ static memory_long_double x = { LDBL80_WORDS (0x0000, 0x83333333, 0x00000000) }; if (!isnanl (x.value)) return 1; } #endif return 0; } _ACEOF rm -f conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' { (case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_try") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then gl_cv_func_isnanl_works=yes else $as_echo "$as_me: program exited with status $ac_status" >&5 $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) gl_cv_func_isnanl_works=no fi rm -rf conftest.dSYM rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi fi { $as_echo "$as_me:$LINENO: result: $gl_cv_func_isnanl_works" >&5 $as_echo "$gl_cv_func_isnanl_works" >&6; } case "$gl_cv_func_isnanl_works" in *yes) ;; *) gl_func_isnanl_no_libm=no ;; esac fi if test $gl_func_isnanl_no_libm = yes; then cat >>confdefs.h <<\_ACEOF #define HAVE_ISNANL_IN_LIBC 1 _ACEOF else gl_LIBOBJS="$gl_LIBOBJS isnanl.$ac_objext" { $as_echo "$as_me:$LINENO: checking where to find the exponent in a 'long double'" >&5 $as_echo_n "checking where to find the exponent in a 'long double'... " >&6; } if test "${gl_cv_cc_long_double_expbit0+set}" = set; then $as_echo_n "(cached) " >&6 else if test "$cross_compiling" = yes; then gl_cv_cc_long_double_expbit0="unknown" else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #include #include #include #define NWORDS \ ((sizeof (long double) + sizeof (unsigned int) - 1) / sizeof (unsigned int)) typedef union { long double value; unsigned int word[NWORDS]; } memory_long_double; static unsigned int ored_words[NWORDS]; static unsigned int anded_words[NWORDS]; static void add_to_ored_words (long double x) { memory_long_double m; size_t i; /* Clear it first, in case sizeof (long double) < sizeof (memory_long_double). */ memset (&m, 0, sizeof (memory_long_double)); m.value = x; for (i = 0; i < NWORDS; i++) { ored_words[i] |= m.word[i]; anded_words[i] &= m.word[i]; } } int main () { size_t j; FILE *fp = fopen ("conftest.out", "w"); if (fp == NULL) return 1; for (j = 0; j < NWORDS; j++) anded_words[j] = ~ (unsigned int) 0; add_to_ored_words (0.25L); add_to_ored_words (0.5L); add_to_ored_words (1.0L); add_to_ored_words (2.0L); add_to_ored_words (4.0L); /* Remove bits that are common (e.g. if representation of the first mantissa bit is explicit). */ for (j = 0; j < NWORDS; j++) ored_words[j] &= ~anded_words[j]; /* Now find the nonzero word. */ for (j = 0; j < NWORDS; j++) if (ored_words[j] != 0) break; if (j < NWORDS) { size_t i; for (i = j + 1; i < NWORDS; i++) if (ored_words[i] != 0) { fprintf (fp, "unknown"); return (fclose (fp) != 0); } for (i = 0; ; i++) if ((ored_words[j] >> i) & 1) { fprintf (fp, "word %d bit %d", (int) j, (int) i); return (fclose (fp) != 0); } } fprintf (fp, "unknown"); return (fclose (fp) != 0); } _ACEOF rm -f conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' { (case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_try") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then gl_cv_cc_long_double_expbit0=`cat conftest.out` else $as_echo "$as_me: program exited with status $ac_status" >&5 $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) gl_cv_cc_long_double_expbit0="unknown" fi rm -rf conftest.dSYM rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi rm -f conftest.out fi { $as_echo "$as_me:$LINENO: result: $gl_cv_cc_long_double_expbit0" >&5 $as_echo "$gl_cv_cc_long_double_expbit0" >&6; } case "$gl_cv_cc_long_double_expbit0" in word*bit*) word=`echo "$gl_cv_cc_long_double_expbit0" | sed -e 's/word //' -e 's/ bit.*//'` bit=`echo "$gl_cv_cc_long_double_expbit0" | sed -e 's/word.*bit //'` cat >>confdefs.h <<_ACEOF #define LDBL_EXPBIT0_WORD $word _ACEOF cat >>confdefs.h <<_ACEOF #define LDBL_EXPBIT0_BIT $bit _ACEOF ;; esac fi : if test $gl_cv_have_include_next = yes; then gl_cv_next_langinfo_h='<'langinfo.h'>' else { $as_echo "$as_me:$LINENO: checking absolute name of " >&5 $as_echo_n "checking absolute name of ... " >&6; } if test "${gl_cv_next_langinfo_h+set}" = set; then $as_echo_n "(cached) " >&6 else if test $ac_cv_header_langinfo_h = yes; then cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF case "$host_os" in aix*) gl_absname_cpp="$ac_cpp -C" ;; *) gl_absname_cpp="$ac_cpp" ;; esac gl_cv_next_langinfo_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 | sed -n '\#/langinfo.h#{ s#.*"\(.*/langinfo.h\)".*#\1# s#^/[^/]#//&# p q }'`'"' else gl_cv_next_langinfo_h='<'langinfo.h'>' fi fi { $as_echo "$as_me:$LINENO: result: $gl_cv_next_langinfo_h" >&5 $as_echo "$gl_cv_next_langinfo_h" >&6; } fi NEXT_LANGINFO_H=$gl_cv_next_langinfo_h if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next' gl_next_as_first_directive='<'langinfo.h'>' else # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include' gl_next_as_first_directive=$gl_cv_next_langinfo_h fi NEXT_AS_FIRST_DIRECTIVE_LANGINFO_H=$gl_next_as_first_directive HAVE_LANGINFO_CODESET=0 HAVE_LANGINFO_ERA=0 : if test $ac_cv_header_langinfo_h = yes; then HAVE_LANGINFO_H=1 { $as_echo "$as_me:$LINENO: checking whether langinfo.h defines CODESET" >&5 $as_echo_n "checking whether langinfo.h defines CODESET... " >&6; } if test "${gl_cv_header_langinfo_codeset+set}" = set; then $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include int a = CODESET; int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then gl_cv_header_langinfo_codeset=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 gl_cv_header_langinfo_codeset=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:$LINENO: result: $gl_cv_header_langinfo_codeset" >&5 $as_echo "$gl_cv_header_langinfo_codeset" >&6; } if test $gl_cv_header_langinfo_codeset = yes; then HAVE_LANGINFO_CODESET=1 fi { $as_echo "$as_me:$LINENO: checking whether langinfo.h defines ERA" >&5 $as_echo_n "checking whether langinfo.h defines ERA... " >&6; } if test "${gl_cv_header_langinfo_era+set}" = set; then $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include int a = ERA; int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then gl_cv_header_langinfo_era=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 gl_cv_header_langinfo_era=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:$LINENO: result: $gl_cv_header_langinfo_era" >&5 $as_echo "$gl_cv_header_langinfo_era" >&6; } if test $gl_cv_header_langinfo_era = yes; then HAVE_LANGINFO_ERA=1 fi else HAVE_LANGINFO_H=0 fi for gl_func in nl_langinfo; do as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh` { $as_echo "$as_me:$LINENO: checking whether $gl_func is declared without a macro" >&5 $as_echo_n "checking whether $gl_func is declared without a macro... " >&6; } if { as_var=$as_gl_Symbol; eval "test \"\${$as_var+set}\" = set"; }; then $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include int main () { #undef $gl_func (void) $gl_func; ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then eval "$as_gl_Symbol=yes" else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 eval "$as_gl_Symbol=no" fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi ac_res=`eval 'as_val=${'$as_gl_Symbol'} $as_echo "$as_val"'` { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } as_val=`eval 'as_val=${'$as_gl_Symbol'} $as_echo "$as_val"'` if test "x$as_val" = x""yes; then cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1 _ACEOF eval ac_cv_have_decl_$gl_func=yes fi done if test "$ac_cv_header_winsock2_h" = yes; then gl_LIBOBJS="$gl_LIBOBJS listen.$ac_objext" fi GNULIB_LISTEN=1 : LOCALCHARSET_TESTS_ENVIRONMENT="CHARSETALIASDIR=\"\$(top_builddir)/$gl_source_base\"" if test "$gl_threads_api" = posix; then # OSF/1 4.0 and MacOS X 10.1 lack the pthread_rwlock_t type and the # pthread_rwlock_* functions. { $as_echo "$as_me:$LINENO: checking for pthread_rwlock_t" >&5 $as_echo_n "checking for pthread_rwlock_t... " >&6; } if test "${ac_cv_type_pthread_rwlock_t+set}" = set; then $as_echo_n "(cached) " >&6 else ac_cv_type_pthread_rwlock_t=no cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include int main () { if (sizeof (pthread_rwlock_t)) return 0; ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include int main () { if (sizeof ((pthread_rwlock_t))) return 0; ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then : else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_type_pthread_rwlock_t=yes fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:$LINENO: result: $ac_cv_type_pthread_rwlock_t" >&5 $as_echo "$ac_cv_type_pthread_rwlock_t" >&6; } if test "x$ac_cv_type_pthread_rwlock_t" = x""yes; then cat >>confdefs.h <<\_ACEOF #define HAVE_PTHREAD_RWLOCK 1 _ACEOF fi # glibc defines PTHREAD_MUTEX_RECURSIVE as enum, not as a macro. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include int main () { #if __FreeBSD__ == 4 error "No, in FreeBSD 4.0 recursive mutexes actually don't work." #else int x = (int)PTHREAD_MUTEX_RECURSIVE; return !x; #endif ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then cat >>confdefs.h <<\_ACEOF #define HAVE_PTHREAD_MUTEX_RECURSIVE 1 _ACEOF else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:$LINENO: checking whether lseek detects pipes" >&5 $as_echo_n "checking whether lseek detects pipes... " >&6; } if test "${gl_cv_func_lseek_pipe+set}" = set; then $as_echo_n "(cached) " >&6 else if test $cross_compiling = no; then cat >conftest.$ac_ext <<_ACEOF #include /* for off_t */ #include /* for SEEK_CUR */ #include int main () { /* Exit with success only if stdin is seekable. */ return lseek (0, (off_t)0, SEEK_CUR) < 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || $as_test_x conftest$ac_exeext }; then if test -s conftest$ac_exeext \ && ./conftest$ac_exeext < conftest.$ac_ext \ && { echo hi | ./conftest$ac_exeext; test $? = 1; }; then gl_cv_func_lseek_pipe=yes else gl_cv_func_lseek_pipe=no fi else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 gl_cv_func_lseek_pipe=no fi rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext else cat >conftest.$ac_ext <<_ACEOF #if ((defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__) || defined __BEOS__ /* mingw and BeOS mistakenly return 0 when trying to seek on pipes. */ Choke me. #endif _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then gl_cv_func_lseek_pipe=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 gl_cv_func_lseek_pipe=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi fi { $as_echo "$as_me:$LINENO: result: $gl_cv_func_lseek_pipe" >&5 $as_echo "$gl_cv_func_lseek_pipe" >&6; } if test $gl_cv_func_lseek_pipe = no; then gl_LIBOBJS="$gl_LIBOBJS lseek.$ac_objext" REPLACE_LSEEK=1 cat >>confdefs.h <<\_ACEOF #define LSEEK_PIPE_BROKEN 1 _ACEOF fi GNULIB_LSEEK=1 for ac_header in stdlib.h do as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 $as_echo_n "checking for $ac_header... " >&6; } if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then $as_echo_n "(cached) " >&6 fi ac_res=`eval 'as_val=${'$as_ac_Header'} $as_echo "$as_val"'` { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } else # Is the header compilable? { $as_echo "$as_me:$LINENO: checking $ac_header usability" >&5 $as_echo_n "checking $ac_header usability... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default #include <$ac_header> _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_header_compiler=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_compiler=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext { $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 $as_echo "$ac_header_compiler" >&6; } # Is the header present? { $as_echo "$as_me:$LINENO: checking $ac_header presence" >&5 $as_echo_n "checking $ac_header presence... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include <$ac_header> _ACEOF if { (ac_try="$ac_cpp conftest.$ac_ext" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null && { test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || test ! -s conftest.err }; then ac_header_preproc=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi rm -f conftest.err conftest.$ac_ext { $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 $as_echo "$ac_header_preproc" >&6; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in yes:no: ) { $as_echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 $as_echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 $as_echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} ac_header_preproc=yes ;; no:yes:* ) { $as_echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 $as_echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} { $as_echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 $as_echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} { $as_echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 $as_echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} { $as_echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 $as_echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 $as_echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} { $as_echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 $as_echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} ;; esac { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 $as_echo_n "checking for $ac_header... " >&6; } if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then $as_echo_n "(cached) " >&6 else eval "$as_ac_Header=\$ac_header_preproc" fi ac_res=`eval 'as_val=${'$as_ac_Header'} $as_echo "$as_val"'` { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } fi as_val=`eval 'as_val=${'$as_ac_Header'} $as_echo "$as_val"'` if test "x$as_val" = x""yes; then cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi done { $as_echo "$as_me:$LINENO: checking for GNU libc compatible malloc" >&5 $as_echo_n "checking for GNU libc compatible malloc... " >&6; } if test "${ac_cv_func_malloc_0_nonnull+set}" = set; then $as_echo_n "(cached) " >&6 else if test "$cross_compiling" = yes; then ac_cv_func_malloc_0_nonnull=no else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #if defined STDC_HEADERS || defined HAVE_STDLIB_H # include #else char *malloc (); #endif int main () { return ! malloc (0); ; return 0; } _ACEOF rm -f conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' { (case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_try") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_func_malloc_0_nonnull=yes else $as_echo "$as_me: program exited with status $ac_status" >&5 $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) ac_cv_func_malloc_0_nonnull=no fi rm -rf conftest.dSYM rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi fi { $as_echo "$as_me:$LINENO: result: $ac_cv_func_malloc_0_nonnull" >&5 $as_echo "$ac_cv_func_malloc_0_nonnull" >&6; } if test $ac_cv_func_malloc_0_nonnull = yes; then cat >>confdefs.h <<\_ACEOF #define HAVE_MALLOC 1 _ACEOF else cat >>confdefs.h <<\_ACEOF #define HAVE_MALLOC 0 _ACEOF gl_LIBOBJS="$gl_LIBOBJS malloc.$ac_objext" cat >>confdefs.h <<\_ACEOF #define malloc rpl_malloc _ACEOF fi cat >>confdefs.h <<\_ACEOF #define GNULIB_MALLOC_GNU 1 _ACEOF if test $gl_cv_func_malloc_posix = yes; then HAVE_MALLOC_POSIX=1 cat >>confdefs.h <<\_ACEOF #define HAVE_MALLOC_POSIX 1 _ACEOF else gl_LIBOBJS="$gl_LIBOBJS malloc.$ac_objext" HAVE_MALLOC_POSIX=0 fi GNULIB_MALLOC_POSIX=1 : if test $gl_cv_have_include_next = yes; then gl_cv_next_math_h='<'math.h'>' else { $as_echo "$as_me:$LINENO: checking absolute name of " >&5 $as_echo_n "checking absolute name of ... " >&6; } if test "${gl_cv_next_math_h+set}" = set; then $as_echo_n "(cached) " >&6 else if test $ac_cv_header_math_h = yes; then cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF case "$host_os" in aix*) gl_absname_cpp="$ac_cpp -C" ;; *) gl_absname_cpp="$ac_cpp" ;; esac gl_cv_next_math_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 | sed -n '\#/math.h#{ s#.*"\(.*/math.h\)".*#\1# s#^/[^/]#//&# p q }'`'"' else gl_cv_next_math_h='<'math.h'>' fi fi { $as_echo "$as_me:$LINENO: result: $gl_cv_next_math_h" >&5 $as_echo "$gl_cv_next_math_h" >&6; } fi NEXT_MATH_H=$gl_cv_next_math_h if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next' gl_next_as_first_directive='<'math.h'>' else # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include' gl_next_as_first_directive=$gl_cv_next_math_h fi NEXT_AS_FIRST_DIRECTIVE_MATH_H=$gl_next_as_first_directive { $as_echo "$as_me:$LINENO: checking whether NAN macro works" >&5 $as_echo_n "checking whether NAN macro works... " >&6; } if test "${gl_cv_header_math_nan_works+set}" = set; then $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include int main () { /* Solaris 10 has a broken definition of NAN. Other platforms fail to provide NAN, or provide it only in C99 mode; this test only needs to fail when NAN is provided but wrong. */ float f = 1.0f; #ifdef NAN f = NAN; #endif return f == 0; ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then gl_cv_header_math_nan_works=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 gl_cv_header_math_nan_works=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:$LINENO: result: $gl_cv_header_math_nan_works" >&5 $as_echo "$gl_cv_header_math_nan_works" >&6; } if test $gl_cv_header_math_nan_works = no; then REPLACE_NAN=1 fi { $as_echo "$as_me:$LINENO: checking whether HUGE_VAL works" >&5 $as_echo_n "checking whether HUGE_VAL works... " >&6; } if test "${gl_cv_header_math_huge_val_works+set}" = set; then $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include int main () { /* Solaris 10 has a broken definition of HUGE_VAL. */ double d = HUGE_VAL; return d == 0; ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then gl_cv_header_math_huge_val_works=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 gl_cv_header_math_huge_val_works=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:$LINENO: result: $gl_cv_header_math_huge_val_works" >&5 $as_echo "$gl_cv_header_math_huge_val_works" >&6; } if test $gl_cv_header_math_huge_val_works = no; then REPLACE_HUGE_VAL=1 fi for gl_func in acosl asinl atanl ceilf ceill cosl expl floorf floorl frexpl ldexpl logl round roundf roundl sinl sqrtl tanl trunc truncf truncl; do as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh` { $as_echo "$as_me:$LINENO: checking whether $gl_func is declared without a macro" >&5 $as_echo_n "checking whether $gl_func is declared without a macro... " >&6; } if { as_var=$as_gl_Symbol; eval "test \"\${$as_var+set}\" = set"; }; then $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include int main () { #undef $gl_func (void) $gl_func; ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then eval "$as_gl_Symbol=yes" else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 eval "$as_gl_Symbol=no" fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi ac_res=`eval 'as_val=${'$as_gl_Symbol'} $as_echo "$as_val"'` { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } as_val=`eval 'as_val=${'$as_gl_Symbol'} $as_echo "$as_val"'` if test "x$as_val" = x""yes; then cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1 _ACEOF eval ac_cv_have_decl_$gl_func=yes fi done : : if test $ac_cv_func_mbsinit = yes && test $ac_cv_func_mbrtowc = yes; then { $as_echo "$as_me:$LINENO: checking whether mbrtowc handles incomplete characters" >&5 $as_echo_n "checking whether mbrtowc handles incomplete characters... " >&6; } if test "${gl_cv_func_mbrtowc_incomplete_state+set}" = set; then $as_echo_n "(cached) " >&6 else case "$host_os" in # Guess no on AIX and OSF/1. osf*) gl_cv_func_mbrtowc_incomplete_state="guessing no" ;; # Guess yes otherwise. *) gl_cv_func_mbrtowc_incomplete_state="guessing yes" ;; esac if test $LOCALE_JA != none; then if test "$cross_compiling" = yes; then : else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #include #include int main () { if (setlocale (LC_ALL, "$LOCALE_JA") != NULL) { const char input[] = "B\217\253\344\217\251\316er"; /* "Büßer" */ mbstate_t state; wchar_t wc; memset (&state, '\0', sizeof (mbstate_t)); if (mbrtowc (&wc, input + 1, 1, &state) == (size_t)(-2)) if (mbsinit (&state)) return 1; } return 0; } _ACEOF rm -f conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' { (case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_try") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then gl_cv_func_mbrtowc_incomplete_state=yes else $as_echo "$as_me: program exited with status $ac_status" >&5 $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) gl_cv_func_mbrtowc_incomplete_state=no fi rm -rf conftest.dSYM rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi fi fi { $as_echo "$as_me:$LINENO: result: $gl_cv_func_mbrtowc_incomplete_state" >&5 $as_echo "$gl_cv_func_mbrtowc_incomplete_state" >&6; } { $as_echo "$as_me:$LINENO: checking whether mbrtowc works as well as mbtowc" >&5 $as_echo_n "checking whether mbrtowc works as well as mbtowc... " >&6; } if test "${gl_cv_func_mbrtowc_sanitycheck+set}" = set; then $as_echo_n "(cached) " >&6 else case "$host_os" in # Guess no on Solaris 8. solaris2.8) gl_cv_func_mbrtowc_sanitycheck="guessing no" ;; # Guess yes otherwise. *) gl_cv_func_mbrtowc_sanitycheck="guessing yes" ;; esac if test $LOCALE_ZH_CN != none; then if test "$cross_compiling" = yes; then : else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #include #include #include int main () { /* This fails on Solaris 8: mbrtowc returns 2, and sets wc to 0x00F0. mbtowc returns 4 (correct) and sets wc to 0x5EDC. */ if (setlocale (LC_ALL, "$LOCALE_ZH_CN") != NULL) { char input[] = "B\250\271\201\060\211\070er"; /* "Büßer" */ mbstate_t state; wchar_t wc; memset (&state, '\0', sizeof (mbstate_t)); if (mbrtowc (&wc, input + 3, 6, &state) != 4 && mbtowc (&wc, input + 3, 6) == 4) return 1; } return 0; } _ACEOF rm -f conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' { (case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_try") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then gl_cv_func_mbrtowc_sanitycheck=yes else $as_echo "$as_me: program exited with status $ac_status" >&5 $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) gl_cv_func_mbrtowc_sanitycheck=no fi rm -rf conftest.dSYM rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi fi fi { $as_echo "$as_me:$LINENO: result: $gl_cv_func_mbrtowc_sanitycheck" >&5 $as_echo "$gl_cv_func_mbrtowc_sanitycheck" >&6; } REPLACE_MBSTATE_T=0 case "$gl_cv_func_mbrtowc_incomplete_state" in *yes) ;; *) REPLACE_MBSTATE_T=1 ;; esac case "$gl_cv_func_mbrtowc_sanitycheck" in *yes) ;; *) REPLACE_MBSTATE_T=1 ;; esac else REPLACE_MBSTATE_T=1 fi if test $REPLACE_MBSTATE_T = 1; then : fi if test $REPLACE_MBSTATE_T = 1; then REPLACE_MBRTOWC=1 fi : if test $ac_cv_func_mbrtowc = no; then HAVE_MBRTOWC=0 fi if test $HAVE_MBRTOWC != 0 && test $REPLACE_MBRTOWC != 1; then { $as_echo "$as_me:$LINENO: checking whether mbrtowc handles a NULL string argument" >&5 $as_echo_n "checking whether mbrtowc handles a NULL string argument... " >&6; } if test "${gl_cv_func_mbrtowc_null_arg+set}" = set; then $as_echo_n "(cached) " >&6 else case "$host_os" in # Guess no on OSF/1. osf*) gl_cv_func_mbrtowc_null_arg="guessing no" ;; # Guess yes otherwise. *) gl_cv_func_mbrtowc_null_arg="guessing yes" ;; esac if test $LOCALE_FR_UTF8 != none; then if test "$cross_compiling" = yes; then : else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #include #include int main () { if (setlocale (LC_ALL, "$LOCALE_FR_UTF8") != NULL) { mbstate_t state; wchar_t wc; int ret; memset (&state, '\0', sizeof (mbstate_t)); wc = (wchar_t) 0xBADFACE; mbrtowc (&wc, NULL, 5, &state); /* Check that wc was not modified. */ if (wc != (wchar_t) 0xBADFACE) return 1; } return 0; } _ACEOF rm -f conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' { (case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_try") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then gl_cv_func_mbrtowc_null_arg=yes else $as_echo "$as_me: program exited with status $ac_status" >&5 $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) gl_cv_func_mbrtowc_null_arg=no fi rm -rf conftest.dSYM rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi fi fi { $as_echo "$as_me:$LINENO: result: $gl_cv_func_mbrtowc_null_arg" >&5 $as_echo "$gl_cv_func_mbrtowc_null_arg" >&6; } { $as_echo "$as_me:$LINENO: checking whether mbrtowc has a correct return value" >&5 $as_echo_n "checking whether mbrtowc has a correct return value... " >&6; } if test "${gl_cv_func_mbrtowc_retval+set}" = set; then $as_echo_n "(cached) " >&6 else case "$host_os" in # Guess no on HP-UX and Solaris. hpux* | solaris*) gl_cv_func_mbrtowc_retval="guessing no" ;; # Guess yes otherwise. *) gl_cv_func_mbrtowc_retval="guessing yes" ;; esac if test $LOCALE_FR_UTF8 != none || test $LOCALE_JA != none; then if test "$cross_compiling" = yes; then : else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #include #include int main () { /* This fails on Solaris. */ if (setlocale (LC_ALL, "$LOCALE_FR_UTF8") != NULL) { char input[] = "B\303\274\303\237er"; /* "Büßer" */ mbstate_t state; wchar_t wc; memset (&state, '\0', sizeof (mbstate_t)); if (mbrtowc (&wc, input + 1, 1, &state) == (size_t)(-2)) { input[1] = '\0'; if (mbrtowc (&wc, input + 2, 5, &state) != 1) return 1; } } /* This fails on HP-UX 11.11. */ if (setlocale (LC_ALL, "$LOCALE_JA") != NULL) { char input[] = "B\217\253\344\217\251\316er"; /* "Büßer" */ mbstate_t state; wchar_t wc; memset (&state, '\0', sizeof (mbstate_t)); if (mbrtowc (&wc, input + 1, 1, &state) == (size_t)(-2)) { input[1] = '\0'; if (mbrtowc (&wc, input + 2, 5, &state) != 2) return 1; } } return 0; } _ACEOF rm -f conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' { (case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_try") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then gl_cv_func_mbrtowc_retval=yes else $as_echo "$as_me: program exited with status $ac_status" >&5 $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) gl_cv_func_mbrtowc_retval=no fi rm -rf conftest.dSYM rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi fi fi { $as_echo "$as_me:$LINENO: result: $gl_cv_func_mbrtowc_retval" >&5 $as_echo "$gl_cv_func_mbrtowc_retval" >&6; } { $as_echo "$as_me:$LINENO: checking whether mbrtowc returns 0 when parsing a NUL character" >&5 $as_echo_n "checking whether mbrtowc returns 0 when parsing a NUL character... " >&6; } if test "${gl_cv_func_mbrtowc_nul_retval+set}" = set; then $as_echo_n "(cached) " >&6 else case "$host_os" in # Guess no on Solaris 8 and 9. solaris2.[89]) gl_cv_func_mbrtowc_nul_retval="guessing no" ;; # Guess yes otherwise. *) gl_cv_func_mbrtowc_nul_retval="guessing yes" ;; esac if test $LOCALE_ZH_CN != none; then if test "$cross_compiling" = yes; then : else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #include #include int main () { /* This fails on Solaris 8 and 9. */ if (setlocale (LC_ALL, "$LOCALE_ZH_CN") != NULL) { mbstate_t state; wchar_t wc; memset (&state, '\0', sizeof (mbstate_t)); if (mbrtowc (&wc, "", 1, &state) != 0) return 1; } return 0; } _ACEOF rm -f conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' { (case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_try") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then gl_cv_func_mbrtowc_nul_retval=yes else $as_echo "$as_me: program exited with status $ac_status" >&5 $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) gl_cv_func_mbrtowc_nul_retval=no fi rm -rf conftest.dSYM rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi fi fi { $as_echo "$as_me:$LINENO: result: $gl_cv_func_mbrtowc_nul_retval" >&5 $as_echo "$gl_cv_func_mbrtowc_nul_retval" >&6; } case "$gl_cv_func_mbrtowc_null_arg" in *yes) ;; *) cat >>confdefs.h <<\_ACEOF #define MBRTOWC_NULL_ARG_BUG 1 _ACEOF REPLACE_MBRTOWC=1 ;; esac case "$gl_cv_func_mbrtowc_retval" in *yes) ;; *) cat >>confdefs.h <<\_ACEOF #define MBRTOWC_RETVAL_BUG 1 _ACEOF REPLACE_MBRTOWC=1 ;; esac case "$gl_cv_func_mbrtowc_nul_retval" in *yes) ;; *) cat >>confdefs.h <<\_ACEOF #define MBRTOWC_NUL_RETVAL_BUG 1 _ACEOF REPLACE_MBRTOWC=1 ;; esac fi if test $HAVE_MBRTOWC = 0 || test $REPLACE_MBRTOWC = 1; then : gl_LIBOBJS="$gl_LIBOBJS mbrtowc.$ac_objext" : fi GNULIB_MBRTOWC=1 : : if test $ac_cv_func_mbsinit = yes && test $ac_cv_func_mbrtowc = yes; then { $as_echo "$as_me:$LINENO: checking whether mbrtowc handles incomplete characters" >&5 $as_echo_n "checking whether mbrtowc handles incomplete characters... " >&6; } if test "${gl_cv_func_mbrtowc_incomplete_state+set}" = set; then $as_echo_n "(cached) " >&6 else case "$host_os" in # Guess no on AIX and OSF/1. osf*) gl_cv_func_mbrtowc_incomplete_state="guessing no" ;; # Guess yes otherwise. *) gl_cv_func_mbrtowc_incomplete_state="guessing yes" ;; esac if test $LOCALE_JA != none; then if test "$cross_compiling" = yes; then : else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #include #include int main () { if (setlocale (LC_ALL, "$LOCALE_JA") != NULL) { const char input[] = "B\217\253\344\217\251\316er"; /* "Büßer" */ mbstate_t state; wchar_t wc; memset (&state, '\0', sizeof (mbstate_t)); if (mbrtowc (&wc, input + 1, 1, &state) == (size_t)(-2)) if (mbsinit (&state)) return 1; } return 0; } _ACEOF rm -f conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' { (case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_try") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then gl_cv_func_mbrtowc_incomplete_state=yes else $as_echo "$as_me: program exited with status $ac_status" >&5 $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) gl_cv_func_mbrtowc_incomplete_state=no fi rm -rf conftest.dSYM rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi fi fi { $as_echo "$as_me:$LINENO: result: $gl_cv_func_mbrtowc_incomplete_state" >&5 $as_echo "$gl_cv_func_mbrtowc_incomplete_state" >&6; } { $as_echo "$as_me:$LINENO: checking whether mbrtowc works as well as mbtowc" >&5 $as_echo_n "checking whether mbrtowc works as well as mbtowc... " >&6; } if test "${gl_cv_func_mbrtowc_sanitycheck+set}" = set; then $as_echo_n "(cached) " >&6 else case "$host_os" in # Guess no on Solaris 8. solaris2.8) gl_cv_func_mbrtowc_sanitycheck="guessing no" ;; # Guess yes otherwise. *) gl_cv_func_mbrtowc_sanitycheck="guessing yes" ;; esac if test $LOCALE_ZH_CN != none; then if test "$cross_compiling" = yes; then : else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #include #include #include int main () { /* This fails on Solaris 8: mbrtowc returns 2, and sets wc to 0x00F0. mbtowc returns 4 (correct) and sets wc to 0x5EDC. */ if (setlocale (LC_ALL, "$LOCALE_ZH_CN") != NULL) { char input[] = "B\250\271\201\060\211\070er"; /* "Büßer" */ mbstate_t state; wchar_t wc; memset (&state, '\0', sizeof (mbstate_t)); if (mbrtowc (&wc, input + 3, 6, &state) != 4 && mbtowc (&wc, input + 3, 6) == 4) return 1; } return 0; } _ACEOF rm -f conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' { (case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_try") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then gl_cv_func_mbrtowc_sanitycheck=yes else $as_echo "$as_me: program exited with status $ac_status" >&5 $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) gl_cv_func_mbrtowc_sanitycheck=no fi rm -rf conftest.dSYM rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi fi fi { $as_echo "$as_me:$LINENO: result: $gl_cv_func_mbrtowc_sanitycheck" >&5 $as_echo "$gl_cv_func_mbrtowc_sanitycheck" >&6; } REPLACE_MBSTATE_T=0 case "$gl_cv_func_mbrtowc_incomplete_state" in *yes) ;; *) REPLACE_MBSTATE_T=1 ;; esac case "$gl_cv_func_mbrtowc_sanitycheck" in *yes) ;; *) REPLACE_MBSTATE_T=1 ;; esac else REPLACE_MBSTATE_T=1 fi if test $REPLACE_MBSTATE_T = 1; then : fi if test $REPLACE_MBSTATE_T = 1; then REPLACE_MBSINIT=1 fi : if test $ac_cv_func_mbsinit = no; then HAVE_MBSINIT=0 fi if test $HAVE_MBSINIT = 0 || test $REPLACE_MBSINIT = 1; then : gl_LIBOBJS="$gl_LIBOBJS mbsinit.$ac_objext" : fi GNULIB_MBSINIT=1 GNULIB_MEMCHR=1 if test $ac_cv_have_decl_memmem = yes; then { $as_echo "$as_me:$LINENO: checking whether memmem works in linear time" >&5 $as_echo_n "checking whether memmem works in linear time... " >&6; } if test "${gl_cv_func_memmem_works+set}" = set; then $as_echo_n "(cached) " >&6 else if test "$cross_compiling" = yes; then cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #ifdef __GNU_LIBRARY__ #if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 9) || (__GLIBC__ > 2) Lucky user #endif #endif #ifdef __CYGWIN__ #include #if CYGWIN_VERSION_DLL_MAJOR >= 1007 Lucky user #endif #endif _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "Lucky user" >/dev/null 2>&1; then gl_cv_func_memmem_works=yes else gl_cv_func_memmem_works="guessing no" fi rm -f conftest* else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include /* for signal */ #include /* for memmem */ #include /* for malloc */ #include /* for alarm */ int main () { size_t m = 1000000; char *haystack = (char *) malloc (2 * m + 1); char *needle = (char *) malloc (m + 1); void *result = 0; /* Failure to compile this test due to missing alarm is okay, since all such platforms (mingw) also lack memmem. */ signal (SIGALRM, SIG_DFL); alarm (5); /* Check for quadratic performance. */ if (haystack && needle) { memset (haystack, 'A', 2 * m); haystack[2 * m] = 'B'; memset (needle, 'A', m); needle[m] = 'B'; result = memmem (haystack, 2 * m + 1, needle, m + 1); } /* Check for empty needle behavior. */ return !result || !memmem ("a", 1, 0, 0); ; return 0; } _ACEOF rm -f conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' { (case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_try") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then gl_cv_func_memmem_works=yes else $as_echo "$as_me: program exited with status $ac_status" >&5 $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) gl_cv_func_memmem_works=no fi rm -rf conftest.dSYM rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi fi { $as_echo "$as_me:$LINENO: result: $gl_cv_func_memmem_works" >&5 $as_echo "$gl_cv_func_memmem_works" >&6; } if test "$gl_cv_func_memmem_works" != yes; then REPLACE_MEMMEM=1 gl_LIBOBJS="$gl_LIBOBJS memmem.$ac_objext" fi fi for ac_func in memmem do as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` { $as_echo "$as_me:$LINENO: checking for $ac_func" >&5 $as_echo_n "checking for $ac_func... " >&6; } if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Define $ac_func to an innocuous variant, in case declares $ac_func. For example, HP-UX 11i declares gettimeofday. */ #define $ac_func innocuous_$ac_func /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $ac_func (); below. Prefer to if __STDC__ is defined, since exists even on freestanding compilers. */ #ifdef __STDC__ # include #else # include #endif #undef $ac_func /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char $ac_func (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined __stub_$ac_func || defined __stub___$ac_func choke me #endif int main () { return $ac_func (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || $as_test_x conftest$ac_exeext }; then eval "$as_ac_var=yes" else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 eval "$as_ac_var=no" fi rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi ac_res=`eval 'as_val=${'$as_ac_var'} $as_echo "$as_val"'` { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } as_val=`eval 'as_val=${'$as_ac_var'} $as_echo "$as_val"'` if test "x$as_val" = x""yes; then cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF else gl_LIBOBJS="$gl_LIBOBJS $ac_func.$ac_objext" fi done : if test $ac_cv_have_decl_memmem = no; then HAVE_DECL_MEMMEM=0 fi : GNULIB_MEMMEM=1 : : if test $APPLE_UNIVERSAL_BUILD = 1; then # A universal build on Apple MacOS X platforms. # The test result would be 'yes' in 32-bit mode and 'no' in 64-bit mode. # But we need a configuration result that is valid in both modes. ac_cv_func_working_mktime=no fi { $as_echo "$as_me:$LINENO: checking for working mktime" >&5 $as_echo_n "checking for working mktime... " >&6; } if test "${ac_cv_func_working_mktime+set}" = set; then $as_echo_n "(cached) " >&6 else if test "$cross_compiling" = yes; then ac_cv_func_working_mktime=no else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Test program from Paul Eggert and Tony Leneis. */ #include #include #include #ifdef HAVE_UNISTD_H # include #endif #ifndef HAVE_ALARM # define alarm(X) /* empty */ #endif /* Work around redefinition to rpl_putenv by other config tests. */ #undef putenv static time_t time_t_max; static time_t time_t_min; /* Values we'll use to set the TZ environment variable. */ static char *tz_strings[] = { (char *) 0, "TZ=GMT0", "TZ=JST-9", "TZ=EST+3EDT+2,M10.1.0/00:00:00,M2.3.0/00:00:00" }; #define N_STRINGS (sizeof (tz_strings) / sizeof (tz_strings[0])) /* Return 0 if mktime fails to convert a date in the spring-forward gap. Based on a problem report from Andreas Jaeger. */ static int spring_forward_gap () { /* glibc (up to about 1998-10-07) failed this test. */ struct tm tm; /* Use the portable POSIX.1 specification "TZ=PST8PDT,M4.1.0,M10.5.0" instead of "TZ=America/Vancouver" in order to detect the bug even on systems that don't support the Olson extension, or don't have the full zoneinfo tables installed. */ putenv ("TZ=PST8PDT,M4.1.0,M10.5.0"); tm.tm_year = 98; tm.tm_mon = 3; tm.tm_mday = 5; tm.tm_hour = 2; tm.tm_min = 0; tm.tm_sec = 0; tm.tm_isdst = -1; return mktime (&tm) != (time_t) -1; } static int mktime_test1 (time_t now) { struct tm *lt; return ! (lt = localtime (&now)) || mktime (lt) == now; } static int mktime_test (time_t now) { return (mktime_test1 (now) && mktime_test1 ((time_t) (time_t_max - now)) && mktime_test1 ((time_t) (time_t_min + now))); } static int irix_6_4_bug () { /* Based on code from Ariel Faigon. */ struct tm tm; tm.tm_year = 96; tm.tm_mon = 3; tm.tm_mday = 0; tm.tm_hour = 0; tm.tm_min = 0; tm.tm_sec = 0; tm.tm_isdst = -1; mktime (&tm); return tm.tm_mon == 2 && tm.tm_mday == 31; } static int bigtime_test (int j) { struct tm tm; time_t now; tm.tm_year = tm.tm_mon = tm.tm_mday = tm.tm_hour = tm.tm_min = tm.tm_sec = j; now = mktime (&tm); if (now != (time_t) -1) { struct tm *lt = localtime (&now); if (! (lt && lt->tm_year == tm.tm_year && lt->tm_mon == tm.tm_mon && lt->tm_mday == tm.tm_mday && lt->tm_hour == tm.tm_hour && lt->tm_min == tm.tm_min && lt->tm_sec == tm.tm_sec && lt->tm_yday == tm.tm_yday && lt->tm_wday == tm.tm_wday && ((lt->tm_isdst < 0 ? -1 : 0 < lt->tm_isdst) == (tm.tm_isdst < 0 ? -1 : 0 < tm.tm_isdst)))) return 0; } return 1; } static int year_2050_test () { /* The correct answer for 2050-02-01 00:00:00 in Pacific time, ignoring leap seconds. */ unsigned long int answer = 2527315200UL; struct tm tm; time_t t; tm.tm_year = 2050 - 1900; tm.tm_mon = 2 - 1; tm.tm_mday = 1; tm.tm_hour = tm.tm_min = tm.tm_sec = 0; tm.tm_isdst = -1; /* Use the portable POSIX.1 specification "TZ=PST8PDT,M4.1.0,M10.5.0" instead of "TZ=America/Vancouver" in order to detect the bug even on systems that don't support the Olson extension, or don't have the full zoneinfo tables installed. */ putenv ("TZ=PST8PDT,M4.1.0,M10.5.0"); t = mktime (&tm); /* Check that the result is either a failure, or close enough to the correct answer that we can assume the discrepancy is due to leap seconds. */ return (t == (time_t) -1 || (0 < t && answer - 120 <= t && t <= answer + 120)); } int main () { time_t t, delta; int i, j; /* This test makes some buggy mktime implementations loop. Give up after 60 seconds; a mktime slower than that isn't worth using anyway. */ alarm (60); for (;;) { t = (time_t_max << 1) + 1; if (t <= time_t_max) break; time_t_max = t; } time_t_min = - ((time_t) ~ (time_t) 0 == (time_t) -1) - time_t_max; delta = time_t_max / 997; /* a suitable prime number */ for (i = 0; i < N_STRINGS; i++) { if (tz_strings[i]) putenv (tz_strings[i]); for (t = 0; t <= time_t_max - delta; t += delta) if (! mktime_test (t)) return 1; if (! (mktime_test ((time_t) 1) && mktime_test ((time_t) (60 * 60)) && mktime_test ((time_t) (60 * 60 * 24)))) return 1; for (j = 1; ; j <<= 1) if (! bigtime_test (j)) return 1; else if (INT_MAX / 2 < j) break; if (! bigtime_test (INT_MAX)) return 1; } return ! (irix_6_4_bug () && spring_forward_gap () && year_2050_test ()); } _ACEOF rm -f conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' { (case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_try") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_func_working_mktime=yes else $as_echo "$as_me: program exited with status $ac_status" >&5 $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) ac_cv_func_working_mktime=no fi rm -rf conftest.dSYM rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi fi { $as_echo "$as_me:$LINENO: result: $ac_cv_func_working_mktime" >&5 $as_echo "$ac_cv_func_working_mktime" >&6; } if test $ac_cv_func_working_mktime = no; then gl_LIBOBJS="$gl_LIBOBJS mktime.$ac_objext" fi if test $ac_cv_func_working_mktime = no; then REPLACE_MKTIME=1 else REPLACE_MKTIME=0 fi : : if test $gl_cv_have_include_next = yes; then gl_cv_next_netdb_h='<'netdb.h'>' else { $as_echo "$as_me:$LINENO: checking absolute name of " >&5 $as_echo_n "checking absolute name of ... " >&6; } if test "${gl_cv_next_netdb_h+set}" = set; then $as_echo_n "(cached) " >&6 else if test $ac_cv_header_netdb_h = yes; then cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF case "$host_os" in aix*) gl_absname_cpp="$ac_cpp -C" ;; *) gl_absname_cpp="$ac_cpp" ;; esac gl_cv_next_netdb_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 | sed -n '\#/netdb.h#{ s#.*"\(.*/netdb.h\)".*#\1# s#^/[^/]#//&# p q }'`'"' else gl_cv_next_netdb_h='<'netdb.h'>' fi fi { $as_echo "$as_me:$LINENO: result: $gl_cv_next_netdb_h" >&5 $as_echo "$gl_cv_next_netdb_h" >&6; } fi NEXT_NETDB_H=$gl_cv_next_netdb_h if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next' gl_next_as_first_directive='<'netdb.h'>' else # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include' gl_next_as_first_directive=$gl_cv_next_netdb_h fi NEXT_AS_FIRST_DIRECTIVE_NETDB_H=$gl_next_as_first_directive if test $ac_cv_header_netdb_h = yes; then cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include struct addrinfo a; int b = EAI_OVERFLOW; int c = AI_NUMERICSERV; int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then NETDB_H='' else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 NETDB_H='netdb.h' fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext HAVE_NETDB_H=1 else NETDB_H='netdb.h' HAVE_NETDB_H=0 fi { $as_echo "$as_me:$LINENO: checking whether is self-contained" >&5 $as_echo_n "checking whether is self-contained... " >&6; } if test "${gl_cv_header_netinet_in_h_selfcontained+set}" = set; then $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then gl_cv_header_netinet_in_h_selfcontained=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 gl_cv_header_netinet_in_h_selfcontained=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:$LINENO: result: $gl_cv_header_netinet_in_h_selfcontained" >&5 $as_echo "$gl_cv_header_netinet_in_h_selfcontained" >&6; } if test $gl_cv_header_netinet_in_h_selfcontained = yes; then NETINET_IN_H='' else NETINET_IN_H='netinet/in.h' for ac_header in netinet/in.h do as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 $as_echo_n "checking for $ac_header... " >&6; } if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then $as_echo_n "(cached) " >&6 fi ac_res=`eval 'as_val=${'$as_ac_Header'} $as_echo "$as_val"'` { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } else # Is the header compilable? { $as_echo "$as_me:$LINENO: checking $ac_header usability" >&5 $as_echo_n "checking $ac_header usability... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default #include <$ac_header> _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_header_compiler=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_compiler=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext { $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 $as_echo "$ac_header_compiler" >&6; } # Is the header present? { $as_echo "$as_me:$LINENO: checking $ac_header presence" >&5 $as_echo_n "checking $ac_header presence... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include <$ac_header> _ACEOF if { (ac_try="$ac_cpp conftest.$ac_ext" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null && { test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || test ! -s conftest.err }; then ac_header_preproc=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi rm -f conftest.err conftest.$ac_ext { $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 $as_echo "$ac_header_preproc" >&6; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in yes:no: ) { $as_echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 $as_echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 $as_echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} ac_header_preproc=yes ;; no:yes:* ) { $as_echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 $as_echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} { $as_echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 $as_echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} { $as_echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 $as_echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} { $as_echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 $as_echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 $as_echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} { $as_echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 $as_echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} ;; esac { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 $as_echo_n "checking for $ac_header... " >&6; } if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then $as_echo_n "(cached) " >&6 else eval "$as_ac_Header=\$ac_header_preproc" fi ac_res=`eval 'as_val=${'$as_ac_Header'} $as_echo "$as_val"'` { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } fi as_val=`eval 'as_val=${'$as_ac_Header'} $as_echo "$as_val"'` if test "x$as_val" = x""yes; then cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi done : if test $gl_cv_have_include_next = yes; then gl_cv_next_netinet_in_h='<'netinet/in.h'>' else { $as_echo "$as_me:$LINENO: checking absolute name of " >&5 $as_echo_n "checking absolute name of ... " >&6; } if test "${gl_cv_next_netinet_in_h+set}" = set; then $as_echo_n "(cached) " >&6 else if test $ac_cv_header_netinet_in_h = yes; then cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF case "$host_os" in aix*) gl_absname_cpp="$ac_cpp -C" ;; *) gl_absname_cpp="$ac_cpp" ;; esac gl_cv_next_netinet_in_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 | sed -n '\#/netinet/in.h#{ s#.*"\(.*/netinet/in.h\)".*#\1# s#^/[^/]#//&# p q }'`'"' else gl_cv_next_netinet_in_h='<'netinet/in.h'>' fi fi { $as_echo "$as_me:$LINENO: result: $gl_cv_next_netinet_in_h" >&5 $as_echo "$gl_cv_next_netinet_in_h" >&6; } fi NEXT_NETINET_IN_H=$gl_cv_next_netinet_in_h if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next' gl_next_as_first_directive='<'netinet/in.h'>' else # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include' gl_next_as_first_directive=$gl_cv_next_netinet_in_h fi NEXT_AS_FIRST_DIRECTIVE_NETINET_IN_H=$gl_next_as_first_directive if test $ac_cv_header_netinet_in_h = yes; then HAVE_NETINET_IN_H=1 else HAVE_NETINET_IN_H=0 fi fi { $as_echo "$as_me:$LINENO: checking for a thread-safe mkdir -p" >&5 $as_echo_n "checking for a thread-safe mkdir -p... " >&6; } if test -z "$MKDIR_P"; then if test "${ac_cv_path_mkdir+set}" = set; then $as_echo_n "(cached) " >&6 else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_prog in mkdir gmkdir; do for ac_exec_ext in '' $ac_executable_extensions; do { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; } || continue case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #( 'mkdir (GNU coreutils) '* | \ 'mkdir (coreutils) '* | \ 'mkdir (fileutils) '4.1*) ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext break 3;; esac done done done IFS=$as_save_IFS fi if test "${ac_cv_path_mkdir+set}" = set; then MKDIR_P="$ac_cv_path_mkdir -p" else # As a last resort, use the slow shell script. Don't cache a # value for MKDIR_P within a source directory, because that will # break other packages using the cache if that directory is # removed, or if the value is a relative name. test -d ./--version && rmdir ./--version MKDIR_P="$ac_install_sh -d" fi fi { $as_echo "$as_me:$LINENO: result: $MKDIR_P" >&5 $as_echo "$MKDIR_P" >&6; } : if test $ac_cv_func_nl_langinfo = yes; then if test $HAVE_LANGINFO_CODESET = 1 && test $HAVE_LANGINFO_ERA = 1; then : else REPLACE_NL_LANGINFO=1 cat >>confdefs.h <<\_ACEOF #define REPLACE_NL_LANGINFO 1 _ACEOF gl_LIBOBJS="$gl_LIBOBJS nl_langinfo.$ac_objext" fi else HAVE_NL_LANGINFO=0 gl_LIBOBJS="$gl_LIBOBJS nl_langinfo.$ac_objext" fi GNULIB_NL_LANGINFO=1 : : if test -n "$ERRNO_H"; then REPLACE_PERROR=1 gl_LIBOBJS="$gl_LIBOBJS perror.$ac_objext" fi GNULIB_PERROR=1 for ac_header in poll.h do as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 $as_echo_n "checking for $ac_header... " >&6; } if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then $as_echo_n "(cached) " >&6 fi ac_res=`eval 'as_val=${'$as_ac_Header'} $as_echo "$as_val"'` { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } else # Is the header compilable? { $as_echo "$as_me:$LINENO: checking $ac_header usability" >&5 $as_echo_n "checking $ac_header usability... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default #include <$ac_header> _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_header_compiler=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_compiler=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext { $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 $as_echo "$ac_header_compiler" >&6; } # Is the header present? { $as_echo "$as_me:$LINENO: checking $ac_header presence" >&5 $as_echo_n "checking $ac_header presence... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include <$ac_header> _ACEOF if { (ac_try="$ac_cpp conftest.$ac_ext" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null && { test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || test ! -s conftest.err }; then ac_header_preproc=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi rm -f conftest.err conftest.$ac_ext { $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 $as_echo "$ac_header_preproc" >&6; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in yes:no: ) { $as_echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 $as_echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 $as_echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} ac_header_preproc=yes ;; no:yes:* ) { $as_echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 $as_echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} { $as_echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 $as_echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} { $as_echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 $as_echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} { $as_echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 $as_echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 $as_echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} { $as_echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 $as_echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} ;; esac { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 $as_echo_n "checking for $ac_header... " >&6; } if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then $as_echo_n "(cached) " >&6 else eval "$as_ac_Header=\$ac_header_preproc" fi ac_res=`eval 'as_val=${'$as_ac_Header'} $as_echo "$as_val"'` { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } fi as_val=`eval 'as_val=${'$as_ac_Header'} $as_echo "$as_val"'` if test "x$as_val" = x""yes; then cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi done if test "$ac_cv_header_poll_h" = no; then gl_cv_func_poll=no else { $as_echo "$as_me:$LINENO: checking for poll" >&5 $as_echo_n "checking for poll... " >&6; } if test "${ac_cv_func_poll+set}" = set; then $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Define poll to an innocuous variant, in case declares poll. For example, HP-UX 11i declares gettimeofday. */ #define poll innocuous_poll /* System header to define __stub macros and hopefully few prototypes, which can conflict with char poll (); below. Prefer to if __STDC__ is defined, since exists even on freestanding compilers. */ #ifdef __STDC__ # include #else # include #endif #undef poll /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char poll (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined __stub_poll || defined __stub___poll choke me #endif int main () { return poll (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || $as_test_x conftest$ac_exeext }; then ac_cv_func_poll=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_func_poll=no fi rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi { $as_echo "$as_me:$LINENO: result: $ac_cv_func_poll" >&5 $as_echo "$ac_cv_func_poll" >&6; } if test "x$ac_cv_func_poll" = x""yes; then # Check whether poll() works on special files (like /dev/null) and # and ttys (like /dev/tty). On MacOS X 10.4.0 and AIX 5.3, it doesn't. if test "$cross_compiling" = yes; then # When cross-compiling, assume that poll() works everywhere except on # MacOS X or AIX, regardless of its version. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #if (defined(__APPLE__) && defined(__MACH__)) || defined(_AIX) This is MacOSX or AIX #endif _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "MacOSX" >/dev/null 2>&1; then gl_cv_func_poll=no else gl_cv_func_poll=yes fi rm -f conftest* else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #include int main() { struct pollfd ufd; /* Try /dev/null for reading. */ ufd.fd = open ("/dev/null", O_RDONLY); if (ufd.fd < 0) /* If /dev/null does not exist, it's not MacOS X nor AIX. */ return 0; ufd.events = POLLIN; ufd.revents = 0; if (!(poll (&ufd, 1, 0) == 1 && ufd.revents == POLLIN)) return 1; /* Try /dev/null for writing. */ ufd.fd = open ("/dev/null", O_WRONLY); if (ufd.fd < 0) /* If /dev/null does not exist, it's not MacOS X nor AIX. */ return 0; ufd.events = POLLOUT; ufd.revents = 0; if (!(poll (&ufd, 1, 0) == 1 && ufd.revents == POLLOUT)) return 1; /* Trying /dev/tty may be too environment dependent. */ return 0; } _ACEOF rm -f conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' { (case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_try") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then gl_cv_func_poll=yes else $as_echo "$as_me: program exited with status $ac_status" >&5 $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) gl_cv_func_poll=no fi rm -rf conftest.dSYM rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi fi fi if test $gl_cv_func_poll = yes; then cat >>confdefs.h <<\_ACEOF #define HAVE_POLL 1 _ACEOF POLL_H= else gl_LIBOBJS="$gl_LIBOBJS poll.$ac_objext" cat >>confdefs.h <<\_ACEOF #define poll rpl_poll _ACEOF : POLL_H=poll.h fi { $as_echo "$as_me:$LINENO: checking whether frexp can be used without linking with libm" >&5 $as_echo_n "checking whether frexp can be used without linking with libm... " >&6; } if test "${gl_cv_func_frexp_no_libm+set}" = set; then $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include double x; int y; int main () { return frexp (x, &y) < 1; ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || $as_test_x conftest$ac_exeext }; then gl_cv_func_frexp_no_libm=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 gl_cv_func_frexp_no_libm=no fi rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi { $as_echo "$as_me:$LINENO: result: $gl_cv_func_frexp_no_libm" >&5 $as_echo "$gl_cv_func_frexp_no_libm" >&6; } if test $gl_cv_func_frexp_no_libm = yes; then { $as_echo "$as_me:$LINENO: checking whether frexp works" >&5 $as_echo_n "checking whether frexp works... " >&6; } if test "${gl_cv_func_frexp_works+set}" = set; then $as_echo_n "(cached) " >&6 else if test "$cross_compiling" = yes; then case "$host_os" in netbsd* | irix* | mingw*) gl_cv_func_frexp_works="guessing no";; *) gl_cv_func_frexp_works="guessing yes";; esac else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #include #include int main() { int i; volatile double x; /* HP cc on HP-UX 10.20 has a bug with the constant expression -0.0. So we use -zero instead. */ double zero = 0.0; /* Test on denormalized numbers. */ for (i = 1, x = 1.0; i >= DBL_MIN_EXP; i--, x *= 0.5) ; if (x > 0.0) { int exp; double y = frexp (x, &exp); /* On machines with IEEE754 arithmetic: x = 1.11254e-308, exp = -1022. On NetBSD: y = 0.75. Correct: y = 0.5. */ if (y != 0.5) return 1; } /* Test on infinite numbers. */ x = 1.0 / 0.0; { int exp; double y = frexp (x, &exp); if (y != x) return 1; } /* Test on negative zero. */ x = -zero; { int exp; double y = frexp (x, &exp); if (memcmp (&y, &x, sizeof x)) return 1; } return 0; } _ACEOF rm -f conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' { (case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_try") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then gl_cv_func_frexp_works=yes else $as_echo "$as_me: program exited with status $ac_status" >&5 $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) gl_cv_func_frexp_works=no fi rm -rf conftest.dSYM rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi fi { $as_echo "$as_me:$LINENO: result: $gl_cv_func_frexp_works" >&5 $as_echo "$gl_cv_func_frexp_works" >&6; } case "$gl_cv_func_frexp_works" in *yes) cat >>confdefs.h <<\_ACEOF #define HAVE_FREXP_IN_LIBC 1 _ACEOF ;; esac fi { $as_echo "$as_me:$LINENO: checking whether ldexp can be used without linking with libm" >&5 $as_echo_n "checking whether ldexp can be used without linking with libm... " >&6; } if test "${gl_cv_func_ldexp_no_libm+set}" = set; then $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include double x; int y; int main () { return ldexp (x, y) < 1; ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || $as_test_x conftest$ac_exeext }; then gl_cv_func_ldexp_no_libm=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 gl_cv_func_ldexp_no_libm=no fi rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi { $as_echo "$as_me:$LINENO: result: $gl_cv_func_ldexp_no_libm" >&5 $as_echo "$gl_cv_func_ldexp_no_libm" >&6; } if test $gl_cv_func_ldexp_no_libm = yes; then cat >>confdefs.h <<\_ACEOF #define HAVE_LDEXP_IN_LIBC 1 _ACEOF fi { $as_echo "$as_me:$LINENO: checking whether frexpl can be used without linking with libm" >&5 $as_echo_n "checking whether frexpl can be used without linking with libm... " >&6; } if test "${gl_cv_func_frexpl_no_libm+set}" = set; then $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include long double x; int y; int main () { return frexpl (x, &y) < 1; ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || $as_test_x conftest$ac_exeext }; then gl_cv_func_frexpl_no_libm=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 gl_cv_func_frexpl_no_libm=no fi rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi { $as_echo "$as_me:$LINENO: result: $gl_cv_func_frexpl_no_libm" >&5 $as_echo "$gl_cv_func_frexpl_no_libm" >&6; } if test $gl_cv_func_frexpl_no_libm = yes; then { $as_echo "$as_me:$LINENO: checking whether frexpl works" >&5 $as_echo_n "checking whether frexpl works... " >&6; } if test "${gl_cv_func_frexpl_works+set}" = set; then $as_echo_n "(cached) " >&6 else if test "$cross_compiling" = yes; then case "$host_os" in aix* | beos* | darwin* | irix* | mingw* | pw*) gl_cv_func_frexpl_works="guessing no";; *) gl_cv_func_frexpl_works="guessing yes";; esac else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #include /* Override the values of , like done in float.in.h. */ #if defined __i386__ && (defined __BEOS__ || defined __OpenBSD__) # undef LDBL_MIN_EXP # define LDBL_MIN_EXP (-16381) #endif extern long double frexpl (long double, int *); int main() { volatile long double x; /* Test on finite numbers that fails on AIX 5.1. */ x = 16.0L; { int exp = -9999; frexpl (x, &exp); if (exp != 5) return 1; } /* Test on finite numbers that fails on MacOS X 10.4, because its frexpl function returns an invalid (incorrectly normalized) value: it returns y = { 0x3fe028f5, 0xc28f5c28, 0x3c9eb851, 0xeb851eb8 } but the correct result is 0.505L = { 0x3fe028f5, 0xc28f5c29, 0xbc547ae1, 0x47ae1480 } */ x = 1.01L; { int exp = -9999; long double y = frexpl (x, &exp); if (!(exp == 1 && y == 0.505L)) return 1; } /* Test on large finite numbers. This fails on BeOS at i = 16322, while LDBL_MAX_EXP = 16384. In the loop end test, we test x against Infinity, rather than comparing i with LDBL_MAX_EXP, because BeOS has a wrong LDBL_MAX_EXP. */ { int i; for (i = 1, x = 1.0L; x != x + x; i++, x *= 2.0L) { int exp = -9999; frexpl (x, &exp); if (exp != i) return 1; } } /* Test on denormalized numbers. */ { int i; for (i = 1, x = 1.0L; i >= LDBL_MIN_EXP; i--, x *= 0.5L) ; if (x > 0.0L) { int exp; long double y = frexpl (x, &exp); /* On machines with IEEE854 arithmetic: x = 1.68105e-4932, exp = -16382, y = 0.5. On MacOS X 10.5: exp = -16384, y = 0.5. */ if (exp != LDBL_MIN_EXP - 1) return 1; } } /* Test on infinite numbers. */ x = 1.0L / 0.0L; { int exp; long double y = frexpl (x, &exp); if (y != x) return 1; } return 0; } _ACEOF rm -f conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' { (case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_try") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then gl_cv_func_frexpl_works=yes else $as_echo "$as_me: program exited with status $ac_status" >&5 $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) gl_cv_func_frexpl_works=no fi rm -rf conftest.dSYM rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi fi { $as_echo "$as_me:$LINENO: result: $gl_cv_func_frexpl_works" >&5 $as_echo "$gl_cv_func_frexpl_works" >&6; } case "$gl_cv_func_frexpl_works" in *yes) gl_func_frexpl_no_libm=yes ;; *) gl_func_frexpl_no_libm=no; REPLACE_FREXPL=1 ;; esac else gl_func_frexpl_no_libm=no REPLACE_FREXPL=1 fi if test $gl_func_frexpl_no_libm = yes; then cat >>confdefs.h <<\_ACEOF #define HAVE_FREXPL_IN_LIBC 1 _ACEOF { $as_echo "$as_me:$LINENO: checking whether frexpl is declared" >&5 $as_echo_n "checking whether frexpl is declared... " >&6; } if test "${ac_cv_have_decl_frexpl+set}" = set; then $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include int main () { #ifndef frexpl (void) frexpl; #endif ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_cv_have_decl_frexpl=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_have_decl_frexpl=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:$LINENO: result: $ac_cv_have_decl_frexpl" >&5 $as_echo "$ac_cv_have_decl_frexpl" >&6; } if test "x$ac_cv_have_decl_frexpl" = x""yes; then : else HAVE_DECL_FREXPL=0 fi fi { $as_echo "$as_me:$LINENO: checking whether ldexpl can be used without linking with libm" >&5 $as_echo_n "checking whether ldexpl can be used without linking with libm... " >&6; } if test "${gl_cv_func_ldexpl_no_libm+set}" = set; then $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include long double x; int y; int main () { return ldexpl (x, y) < 1; ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || $as_test_x conftest$ac_exeext }; then gl_cv_func_ldexpl_no_libm=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 gl_cv_func_ldexpl_no_libm=no fi rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi { $as_echo "$as_me:$LINENO: result: $gl_cv_func_ldexpl_no_libm" >&5 $as_echo "$gl_cv_func_ldexpl_no_libm" >&6; } if test $gl_cv_func_ldexpl_no_libm = yes; then { $as_echo "$as_me:$LINENO: checking whether ldexpl works" >&5 $as_echo_n "checking whether ldexpl works... " >&6; } if test "${gl_cv_func_ldexpl_works+set}" = set; then $as_echo_n "(cached) " >&6 else if test "$cross_compiling" = yes; then case "$host_os" in aix*) gl_cv_func_ldexpl_works="guessing no";; *) gl_cv_func_ldexpl_works="guessing yes";; esac else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include extern long double ldexpl (long double, int); int main() { volatile long double x1 = 1.0; volatile long double y1 = ldexpl (x1, -1); volatile long double x2 = 1.73205L; volatile long double y2 = ldexpl (x2, 0); return (y1 != 0.5L) || (y2 != x2); } _ACEOF rm -f conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' { (case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_try") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then gl_cv_func_ldexpl_works=yes else $as_echo "$as_me: program exited with status $ac_status" >&5 $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) gl_cv_func_ldexpl_works=no fi rm -rf conftest.dSYM rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi fi { $as_echo "$as_me:$LINENO: result: $gl_cv_func_ldexpl_works" >&5 $as_echo "$gl_cv_func_ldexpl_works" >&6; } case "$gl_cv_func_ldexpl_works" in *yes) cat >>confdefs.h <<\_ACEOF #define HAVE_LDEXPL_IN_LIBC 1 _ACEOF { $as_echo "$as_me:$LINENO: checking whether ldexpl is declared" >&5 $as_echo_n "checking whether ldexpl is declared... " >&6; } if test "${ac_cv_have_decl_ldexpl+set}" = set; then $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include int main () { #ifndef ldexpl (void) ldexpl; #endif ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_cv_have_decl_ldexpl=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_have_decl_ldexpl=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:$LINENO: result: $ac_cv_have_decl_ldexpl" >&5 $as_echo "$ac_cv_have_decl_ldexpl" >&6; } if test "x$ac_cv_have_decl_ldexpl" = x""yes; then : else HAVE_DECL_LDEXPL=0 fi ;; esac fi if test $gl_cv_func_malloc_posix = yes; then HAVE_REALLOC_POSIX=1 cat >>confdefs.h <<\_ACEOF #define HAVE_REALLOC_POSIX 1 _ACEOF else gl_LIBOBJS="$gl_LIBOBJS realloc.$ac_objext" HAVE_REALLOC_POSIX=0 fi GNULIB_REALLOC_POSIX=1 : # Check whether --with-included-regex was given. if test "${with_included_regex+set}" = set; then withval=$with_included_regex; fi case $with_included_regex in #( yes|no) ac_use_included_regex=$with_included_regex ;; '') # If the system regex support is good enough that it passes the # following run test, then default to *not* using the included regex.c. # If cross compiling, assume the test would fail and use the included # regex.c. { $as_echo "$as_me:$LINENO: checking for working re_compile_pattern" >&5 $as_echo_n "checking for working re_compile_pattern... " >&6; } if test "${gl_cv_func_re_compile_pattern_working+set}" = set; then $as_echo_n "(cached) " >&6 else if test "$cross_compiling" = yes; then gl_cv_func_re_compile_pattern_working=no else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default #if HAVE_LOCALE_H #include #endif #include #include int main () { static struct re_pattern_buffer regex; unsigned char folded_chars[UCHAR_MAX + 1]; int i; const char *s; struct re_registers regs; #if HAVE_LOCALE_H /* http://sourceware.org/ml/libc-hacker/2006-09/msg00008.html This test needs valgrind to catch the bug on Debian GNU/Linux 3.1 x86, but it might catch the bug better on other platforms and it shouldn't hurt to try the test here. */ if (setlocale (LC_ALL, "en_US.UTF-8")) { static char const pat[] = "insert into"; static char const data[] = "\xFF\0\x12\xA2\xAA\xC4\xB1,K\x12\xC4\xB1*\xACK"; re_set_syntax (RE_SYNTAX_GREP | RE_HAT_LISTS_NOT_NEWLINE | RE_ICASE); memset (®ex, 0, sizeof regex); s = re_compile_pattern (pat, sizeof pat - 1, ®ex); if (s) return 1; if (re_search (®ex, data, sizeof data - 1, 0, sizeof data - 1, ®s) != -1) return 1; if (! setlocale (LC_ALL, "C")) return 1; } #endif /* This test is from glibc bug 3957, reported by Andrew Mackey. */ re_set_syntax (RE_SYNTAX_EGREP | RE_HAT_LISTS_NOT_NEWLINE); memset (®ex, 0, sizeof regex); s = re_compile_pattern ("a[^x]b", 6, ®ex); if (s) return 1; /* This should fail, but succeeds for glibc-2.5. */ if (re_search (®ex, "a\nb", 3, 0, 3, ®s) != -1) return 1; /* This regular expression is from Spencer ere test number 75 in grep-2.3. */ re_set_syntax (RE_SYNTAX_POSIX_EGREP); memset (®ex, 0, sizeof regex); for (i = 0; i <= UCHAR_MAX; i++) folded_chars[i] = i; regex.translate = folded_chars; s = re_compile_pattern ("a[[:]:]]b\n", 11, ®ex); /* This should fail with _Invalid character class name_ error. */ if (!s) return 1; /* Ensure that [b-a] is diagnosed as invalid. */ re_set_syntax (RE_SYNTAX_POSIX_EGREP); memset (®ex, 0, sizeof regex); s = re_compile_pattern ("a[b-a]", 6, ®ex); if (s == 0) return 1; /* This should succeed, but does not for glibc-2.1.3. */ memset (®ex, 0, sizeof regex); s = re_compile_pattern ("{1", 2, ®ex); if (s) return 1; /* The following example is derived from a problem report against gawk from Jorge Stolfi . */ memset (®ex, 0, sizeof regex); s = re_compile_pattern ("[an\371]*n", 7, ®ex); if (s) return 1; /* This should match, but does not for glibc-2.2.1. */ if (re_match (®ex, "an", 2, 0, ®s) != 2) return 1; memset (®ex, 0, sizeof regex); s = re_compile_pattern ("x", 1, ®ex); if (s) return 1; /* glibc-2.2.93 does not work with a negative RANGE argument. */ if (re_search (®ex, "wxy", 3, 2, -2, ®s) != 1) return 1; /* The version of regex.c in older versions of gnulib ignored RE_ICASE. Detect that problem too. */ re_set_syntax (RE_SYNTAX_EMACS | RE_ICASE); memset (®ex, 0, sizeof regex); s = re_compile_pattern ("x", 1, ®ex); if (s) return 1; if (re_search (®ex, "WXY", 3, 0, 3, ®s) < 0) return 1; /* Catch a bug reported by Vin Shelton in http://lists.gnu.org/archive/html/bug-coreutils/2007-06/msg00089.html */ re_set_syntax (RE_SYNTAX_POSIX_BASIC & ~RE_CONTEXT_INVALID_DUP & ~RE_NO_EMPTY_RANGES); memset (®ex, 0, sizeof regex); s = re_compile_pattern ("[[:alnum:]_-]\\\\+$", 16, ®ex); if (s) return 1; /* REG_STARTEND was added to glibc on 2004-01-15. Reject older versions. */ if (! REG_STARTEND) return 1; /* Reject hosts whose regoff_t values are too narrow. These include glibc 2.3.5 on hosts with 64-bit ptrdiff_t and 32-bit int. */ if (sizeof (regoff_t) < sizeof (ptrdiff_t) || sizeof (regoff_t) < sizeof (ssize_t)) return 1; return 0; ; return 0; } _ACEOF rm -f conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' { (case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_try") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then gl_cv_func_re_compile_pattern_working=yes else $as_echo "$as_me: program exited with status $ac_status" >&5 $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) gl_cv_func_re_compile_pattern_working=no fi rm -rf conftest.dSYM rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi fi { $as_echo "$as_me:$LINENO: result: $gl_cv_func_re_compile_pattern_working" >&5 $as_echo "$gl_cv_func_re_compile_pattern_working" >&6; } case $gl_cv_func_re_compile_pattern_working in #( yes) ac_use_included_regex=no;; #( no) ac_use_included_regex=yes;; esac ;; *) { { $as_echo "$as_me:$LINENO: error: Invalid value for --with-included-regex: $with_included_regex" >&5 $as_echo "$as_me: error: Invalid value for --with-included-regex: $with_included_regex" >&2;} { (exit 1); exit 1; }; } ;; esac if test $ac_use_included_regex = yes; then cat >>confdefs.h <<\_ACEOF #define _REGEX_LARGE_OFFSETS 1 _ACEOF cat >>confdefs.h <<\_ACEOF #define re_syntax_options rpl_re_syntax_options _ACEOF cat >>confdefs.h <<\_ACEOF #define re_set_syntax rpl_re_set_syntax _ACEOF cat >>confdefs.h <<\_ACEOF #define re_compile_pattern rpl_re_compile_pattern _ACEOF cat >>confdefs.h <<\_ACEOF #define re_compile_fastmap rpl_re_compile_fastmap _ACEOF cat >>confdefs.h <<\_ACEOF #define re_search rpl_re_search _ACEOF cat >>confdefs.h <<\_ACEOF #define re_search_2 rpl_re_search_2 _ACEOF cat >>confdefs.h <<\_ACEOF #define re_match rpl_re_match _ACEOF cat >>confdefs.h <<\_ACEOF #define re_match_2 rpl_re_match_2 _ACEOF cat >>confdefs.h <<\_ACEOF #define re_set_registers rpl_re_set_registers _ACEOF cat >>confdefs.h <<\_ACEOF #define re_comp rpl_re_comp _ACEOF cat >>confdefs.h <<\_ACEOF #define re_exec rpl_re_exec _ACEOF cat >>confdefs.h <<\_ACEOF #define regcomp rpl_regcomp _ACEOF cat >>confdefs.h <<\_ACEOF #define regexec rpl_regexec _ACEOF cat >>confdefs.h <<\_ACEOF #define regerror rpl_regerror _ACEOF cat >>confdefs.h <<\_ACEOF #define regfree rpl_regfree _ACEOF gl_LIBOBJS="$gl_LIBOBJS regex.$ac_objext" for ac_header in libintl.h do as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 $as_echo_n "checking for $ac_header... " >&6; } if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then $as_echo_n "(cached) " >&6 fi ac_res=`eval 'as_val=${'$as_ac_Header'} $as_echo "$as_val"'` { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } else # Is the header compilable? { $as_echo "$as_me:$LINENO: checking $ac_header usability" >&5 $as_echo_n "checking $ac_header usability... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default #include <$ac_header> _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_header_compiler=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_compiler=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext { $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 $as_echo "$ac_header_compiler" >&6; } # Is the header present? { $as_echo "$as_me:$LINENO: checking $ac_header presence" >&5 $as_echo_n "checking $ac_header presence... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include <$ac_header> _ACEOF if { (ac_try="$ac_cpp conftest.$ac_ext" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null && { test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || test ! -s conftest.err }; then ac_header_preproc=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi rm -f conftest.err conftest.$ac_ext { $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 $as_echo "$ac_header_preproc" >&6; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in yes:no: ) { $as_echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 $as_echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 $as_echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} ac_header_preproc=yes ;; no:yes:* ) { $as_echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 $as_echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} { $as_echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 $as_echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} { $as_echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 $as_echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} { $as_echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 $as_echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 $as_echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} { $as_echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 $as_echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} ;; esac { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 $as_echo_n "checking for $ac_header... " >&6; } if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then $as_echo_n "(cached) " >&6 else eval "$as_ac_Header=\$ac_header_preproc" fi ac_res=`eval 'as_val=${'$as_ac_Header'} $as_echo "$as_val"'` { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } fi as_val=`eval 'as_val=${'$as_ac_Header'} $as_echo "$as_val"'` if test "x$as_val" = x""yes; then cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi done : { $as_echo "$as_me:$LINENO: checking whether isblank is declared" >&5 $as_echo_n "checking whether isblank is declared... " >&6; } if test "${ac_cv_have_decl_isblank+set}" = set; then $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include int main () { #ifndef isblank (void) isblank; #endif ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_cv_have_decl_isblank=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_have_decl_isblank=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:$LINENO: result: $ac_cv_have_decl_isblank" >&5 $as_echo "$ac_cv_have_decl_isblank" >&6; } if test "x$ac_cv_have_decl_isblank" = x""yes; then cat >>confdefs.h <<_ACEOF #define HAVE_DECL_ISBLANK 1 _ACEOF else cat >>confdefs.h <<_ACEOF #define HAVE_DECL_ISBLANK 0 _ACEOF fi fi if test $RELOCATABLE = yes; then gl_LIBOBJS="$gl_LIBOBJS relocatable.$ac_objext" fi if test "$ac_cv_header_winsock2_h" = yes; then gl_LIBOBJS="$gl_LIBOBJS select.$ac_objext" else : { $as_echo "$as_me:$LINENO: checking whether select supports a 0 argument" >&5 $as_echo_n "checking whether select supports a 0 argument... " >&6; } if test "${gl_cv_func_select_supports0+set}" = set; then $as_echo_n "(cached) " >&6 else if test "$cross_compiling" = yes; then case "$host_os" in # Guess no on Interix. interix*) gl_cv_func_select_supports0="guessing no";; # Guess yes otherwise. *) gl_cv_func_select_supports0="guessing yes";; esac else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #include #if HAVE_SYS_SELECT_H #include #endif int main () { struct timeval timeout; timeout.tv_sec = 0; timeout.tv_usec = 5; return select (0, (fd_set *)0, (fd_set *)0, (fd_set *)0, &timeout) < 0; } _ACEOF rm -f conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' { (case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_try") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then gl_cv_func_select_supports0=yes else $as_echo "$as_me: program exited with status $ac_status" >&5 $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) gl_cv_func_select_supports0=no fi rm -rf conftest.dSYM rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi fi { $as_echo "$as_me:$LINENO: result: $gl_cv_func_select_supports0" >&5 $as_echo "$gl_cv_func_select_supports0" >&6; } case "$gl_cv_func_select_supports0" in *yes) ;; *) REPLACE_SELECT=1 gl_LIBOBJS="$gl_LIBOBJS select.$ac_objext" ;; esac fi GNULIB_SELECT=1 SERVENT_LIB= gl_saved_libs="$LIBS" { $as_echo "$as_me:$LINENO: checking for library containing getservbyname" >&5 $as_echo_n "checking for library containing getservbyname... " >&6; } if test "${ac_cv_search_getservbyname+set}" = set; then $as_echo_n "(cached) " >&6 else ac_func_search_save_LIBS=$LIBS cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char getservbyname (); int main () { return getservbyname (); ; return 0; } _ACEOF for ac_lib in '' socket network net; do if test -z "$ac_lib"; then ac_res="none required" else ac_res=-l$ac_lib LIBS="-l$ac_lib $ac_func_search_save_LIBS" fi rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || $as_test_x conftest$ac_exeext }; then ac_cv_search_getservbyname=$ac_res else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext if test "${ac_cv_search_getservbyname+set}" = set; then break fi done if test "${ac_cv_search_getservbyname+set}" = set; then : else ac_cv_search_getservbyname=no fi rm conftest.$ac_ext LIBS=$ac_func_search_save_LIBS fi { $as_echo "$as_me:$LINENO: result: $ac_cv_search_getservbyname" >&5 $as_echo "$ac_cv_search_getservbyname" >&6; } ac_res=$ac_cv_search_getservbyname if test "$ac_res" != no; then test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" if test "$ac_cv_search_getservbyname" != "none required"; then SERVENT_LIB="$ac_cv_search_getservbyname" fi fi LIBS="$gl_saved_libs" if test -z "$SERVENT_LIB"; then for ac_func in getservbyname do as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` { $as_echo "$as_me:$LINENO: checking for $ac_func" >&5 $as_echo_n "checking for $ac_func... " >&6; } if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Define $ac_func to an innocuous variant, in case declares $ac_func. For example, HP-UX 11i declares gettimeofday. */ #define $ac_func innocuous_$ac_func /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $ac_func (); below. Prefer to if __STDC__ is defined, since exists even on freestanding compilers. */ #ifdef __STDC__ # include #else # include #endif #undef $ac_func /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char $ac_func (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined __stub_$ac_func || defined __stub___$ac_func choke me #endif int main () { return $ac_func (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || $as_test_x conftest$ac_exeext }; then eval "$as_ac_var=yes" else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 eval "$as_ac_var=no" fi rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi ac_res=`eval 'as_val=${'$as_ac_var'} $as_echo "$as_val"'` { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } as_val=`eval 'as_val=${'$as_ac_var'} $as_echo "$as_val"'` if test "x$as_val" = x""yes; then cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF else { $as_echo "$as_me:$LINENO: checking for getservbyname in winsock2.h and -lws2_32" >&5 $as_echo_n "checking for getservbyname in winsock2.h and -lws2_32... " >&6; } if test "${gl_cv_w32_getservbyname+set}" = set; then $as_echo_n "(cached) " >&6 else gl_cv_w32_getservbyname=no gl_save_LIBS="$LIBS" LIBS="$LIBS -lws2_32" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #ifdef HAVE_WINSOCK2_H #include #endif #include int main () { getservbyname(NULL,NULL); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || $as_test_x conftest$ac_exeext }; then gl_cv_w32_getservbyname=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS="$gl_save_LIBS" fi { $as_echo "$as_me:$LINENO: result: $gl_cv_w32_getservbyname" >&5 $as_echo "$gl_cv_w32_getservbyname" >&6; } if test "$gl_cv_w32_getservbyname" = "yes"; then SERVENT_LIB="-lws2_32" fi fi done fi if test "$ac_cv_header_winsock2_h" = yes; then gl_LIBOBJS="$gl_LIBOBJS setsockopt.$ac_objext" fi GNULIB_SETSOCKOPT=1 : if test $gl_cv_have_include_next = yes; then gl_cv_next_signal_h='<'signal.h'>' else { $as_echo "$as_me:$LINENO: checking absolute name of " >&5 $as_echo_n "checking absolute name of ... " >&6; } if test "${gl_cv_next_signal_h+set}" = set; then $as_echo_n "(cached) " >&6 else if test $ac_cv_header_signal_h = yes; then cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF case "$host_os" in aix*) gl_absname_cpp="$ac_cpp -C" ;; *) gl_absname_cpp="$ac_cpp" ;; esac gl_cv_next_signal_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 | sed -n '\#/signal.h#{ s#.*"\(.*/signal.h\)".*#\1# s#^/[^/]#//&# p q }'`'"' else gl_cv_next_signal_h='<'signal.h'>' fi fi { $as_echo "$as_me:$LINENO: result: $gl_cv_next_signal_h" >&5 $as_echo "$gl_cv_next_signal_h" >&6; } fi NEXT_SIGNAL_H=$gl_cv_next_signal_h if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next' gl_next_as_first_directive='<'signal.h'>' else # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include' gl_next_as_first_directive=$gl_cv_next_signal_h fi NEXT_AS_FIRST_DIRECTIVE_SIGNAL_H=$gl_next_as_first_directive # AIX declares sig_atomic_t to already include volatile, and C89 compilers # then choke on 'volatile sig_atomic_t'. C99 requires that it compile. { $as_echo "$as_me:$LINENO: checking for volatile sig_atomic_t" >&5 $as_echo_n "checking for volatile sig_atomic_t... " >&6; } if test "${ac_cv_type_volatile_sig_atomic_t+set}" = set; then $as_echo_n "(cached) " >&6 else ac_cv_type_volatile_sig_atomic_t=no cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include int main () { if (sizeof (volatile sig_atomic_t)) return 0; ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include int main () { if (sizeof ((volatile sig_atomic_t))) return 0; ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then : else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_type_volatile_sig_atomic_t=yes fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:$LINENO: result: $ac_cv_type_volatile_sig_atomic_t" >&5 $as_echo "$ac_cv_type_volatile_sig_atomic_t" >&6; } if test "x$ac_cv_type_volatile_sig_atomic_t" = x""yes; then : else HAVE_TYPE_VOLATILE_SIG_ATOMIC_T=0 fi for gl_func in sigaction sigaddset sigdelset sigemptyset sigfillset sigismember sigpending sigprocmask; do as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh` { $as_echo "$as_me:$LINENO: checking whether $gl_func is declared without a macro" >&5 $as_echo_n "checking whether $gl_func is declared without a macro... " >&6; } if { as_var=$as_gl_Symbol; eval "test \"\${$as_var+set}\" = set"; }; then $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include int main () { #undef $gl_func (void) $gl_func; ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then eval "$as_gl_Symbol=yes" else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 eval "$as_gl_Symbol=no" fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi ac_res=`eval 'as_val=${'$as_gl_Symbol'} $as_echo "$as_val"'` { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } as_val=`eval 'as_val=${'$as_gl_Symbol'} $as_echo "$as_val"'` if test "x$as_val" = x""yes; then cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1 _ACEOF eval ac_cv_have_decl_$gl_func=yes fi done { $as_echo "$as_me:$LINENO: checking for signbit macro" >&5 $as_echo_n "checking for signbit macro... " >&6; } if test "${gl_cv_func_signbit+set}" = set; then $as_echo_n "(cached) " >&6 else if test "$cross_compiling" = yes; then gl_cv_func_signbit="guessing no" else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include /* If signbit is defined as a function, don't use it, since calling it for 'float' or 'long double' arguments would involve conversions. If signbit is not declared at all but exists as a library function, don't use it, since the prototype may not match. If signbit is not declared at all but exists as a compiler built-in, don't use it, since it's preferable to use __builtin_signbit* (no warnings, no conversions). */ #ifndef signbit # error "signbit should be a macro" #endif #include /* Global variables. Needed because GCC 4 constant-folds __builtin_signbitl (literal) but cannot constant-fold __builtin_signbitl (variable). */ float vf; double vd; long double vl; int main () { /* HP cc on HP-UX 10.20 has a bug with the constant expression -0.0. So we use -p0f and -p0d instead. */ float p0f = 0.0f; float m0f = -p0f; double p0d = 0.0; double m0d = -p0d; /* On HP-UX 10.20, negating 0.0L does not yield -0.0L. So we use another constant expression instead. But that expression does not work on other platforms, such as when cross-compiling to PowerPC on MacOS X 10.5. */ long double p0l = 0.0L; #if defined __hpux || defined __sgi long double m0l = -LDBL_MIN * LDBL_MIN; #else long double m0l = -p0l; #endif if (signbit (vf)) vf++; { float plus_inf = 1.0f / p0f; float minus_inf = -1.0f / p0f; if (!(!signbit (255.0f) && signbit (-255.0f) && !signbit (p0f) && (memcmp (&m0f, &p0f, sizeof (float)) == 0 || signbit (m0f)) && !signbit (plus_inf) && signbit (minus_inf))) return 1; } if (signbit (vd)) vd++; { double plus_inf = 1.0 / p0d; double minus_inf = -1.0 / p0d; if (!(!signbit (255.0) && signbit (-255.0) && !signbit (p0d) && (memcmp (&m0d, &p0d, sizeof (double)) == 0 || signbit (m0d)) && !signbit (plus_inf) && signbit (minus_inf))) return 1; } if (signbit (vl)) vl++; { long double plus_inf = 1.0L / p0l; long double minus_inf = -1.0L / p0l; if (!(!signbit (255.0L) && signbit (-255.0L) && !signbit (p0l) && (memcmp (&m0l, &p0l, sizeof (long double)) == 0 || signbit (m0l)) && !signbit (plus_inf) && signbit (minus_inf))) return 1; } return 0; } _ACEOF rm -f conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' { (case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_try") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then gl_cv_func_signbit=yes else $as_echo "$as_me: program exited with status $ac_status" >&5 $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) gl_cv_func_signbit=no fi rm -rf conftest.dSYM rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi fi { $as_echo "$as_me:$LINENO: result: $gl_cv_func_signbit" >&5 $as_echo "$gl_cv_func_signbit" >&6; } { $as_echo "$as_me:$LINENO: checking for signbit compiler built-ins" >&5 $as_echo_n "checking for signbit compiler built-ins... " >&6; } if test "${gl_cv_func_signbit_gcc+set}" = set; then $as_echo_n "(cached) " >&6 else if test "$cross_compiling" = yes; then gl_cv_func_signbit_gcc="guessing no" else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #if __GNUC__ >= 4 # define signbit(x) \ (sizeof (x) == sizeof (long double) ? __builtin_signbitl (x) : \ sizeof (x) == sizeof (double) ? __builtin_signbit (x) : \ __builtin_signbitf (x)) #else # error "signbit should be three compiler built-ins" #endif #include /* Global variables. Needed because GCC 4 constant-folds __builtin_signbitl (literal) but cannot constant-fold __builtin_signbitl (variable). */ float vf; double vd; long double vl; int main () { /* HP cc on HP-UX 10.20 has a bug with the constant expression -0.0. So we use -p0f and -p0d instead. */ float p0f = 0.0f; float m0f = -p0f; double p0d = 0.0; double m0d = -p0d; /* On HP-UX 10.20, negating 0.0L does not yield -0.0L. So we use another constant expression instead. But that expression does not work on other platforms, such as when cross-compiling to PowerPC on MacOS X 10.5. */ long double p0l = 0.0L; #if defined __hpux || defined __sgi long double m0l = -LDBL_MIN * LDBL_MIN; #else long double m0l = -p0l; #endif if (signbit (vf)) vf++; { float plus_inf = 1.0f / p0f; float minus_inf = -1.0f / p0f; if (!(!signbit (255.0f) && signbit (-255.0f) && !signbit (p0f) && (memcmp (&m0f, &p0f, sizeof (float)) == 0 || signbit (m0f)) && !signbit (plus_inf) && signbit (minus_inf))) return 1; } if (signbit (vd)) vd++; { double plus_inf = 1.0 / p0d; double minus_inf = -1.0 / p0d; if (!(!signbit (255.0) && signbit (-255.0) && !signbit (p0d) && (memcmp (&m0d, &p0d, sizeof (double)) == 0 || signbit (m0d)) && !signbit (plus_inf) && signbit (minus_inf))) return 1; } if (signbit (vl)) vl++; { long double plus_inf = 1.0L / p0l; long double minus_inf = -1.0L / p0l; if (!(!signbit (255.0L) && signbit (-255.0L) && !signbit (p0l) && (memcmp (&m0l, &p0l, sizeof (long double)) == 0 || signbit (m0l)) && !signbit (plus_inf) && signbit (minus_inf))) return 1; } return 0; } _ACEOF rm -f conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' { (case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_try") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then gl_cv_func_signbit_gcc=yes else $as_echo "$as_me: program exited with status $ac_status" >&5 $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) gl_cv_func_signbit_gcc=no fi rm -rf conftest.dSYM rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi fi { $as_echo "$as_me:$LINENO: result: $gl_cv_func_signbit_gcc" >&5 $as_echo "$gl_cv_func_signbit_gcc" >&6; } if test "$gl_cv_func_signbit_gcc" = yes; then REPLACE_SIGNBIT_USING_GCC=1 else if test "$gl_cv_func_signbit" != yes; then REPLACE_SIGNBIT=1 gl_LIBOBJS="$gl_LIBOBJS signbitf.$ac_objext" gl_LIBOBJS="$gl_LIBOBJS signbitd.$ac_objext" gl_LIBOBJS="$gl_LIBOBJS signbitl.$ac_objext" { $as_echo "$as_me:$LINENO: checking where to find the sign bit in a 'float'" >&5 $as_echo_n "checking where to find the sign bit in a 'float'... " >&6; } if test "${gl_cv_cc_float_signbit+set}" = set; then $as_echo_n "(cached) " >&6 else if test "$cross_compiling" = yes; then gl_cv_cc_float_signbit="unknown" else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #include #define NWORDS \ ((sizeof (float) + sizeof (unsigned int) - 1) / sizeof (unsigned int)) typedef union { float value; unsigned int word[NWORDS]; } memory_float; static memory_float plus = { 1.0f }; static memory_float minus = { -1.0f }; int main () { size_t j, k, i; unsigned int m; FILE *fp = fopen ("conftest.out", "w"); if (fp == NULL) return 1; /* Find the different bit. */ k = 0; m = 0; for (j = 0; j < NWORDS; j++) { unsigned int x = plus.word[j] ^ minus.word[j]; if ((x & (x - 1)) || (x && m)) { /* More than one bit difference. */ fprintf (fp, "unknown"); return 1; } if (x) { k = j; m = x; } } if (m == 0) { /* No difference. */ fprintf (fp, "unknown"); return 1; } /* Now m = plus.word[k] ^ ~minus.word[k]. */ if (plus.word[k] & ~minus.word[k]) { /* Oh? The sign bit is set in the positive and cleared in the negative numbers? */ fprintf (fp, "unknown"); return 1; } for (i = 0; ; i++) if ((m >> i) & 1) break; fprintf (fp, "word %d bit %d", (int) k, (int) i); return (fclose (fp) != 0); } _ACEOF rm -f conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' { (case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_try") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then gl_cv_cc_float_signbit=`cat conftest.out` else $as_echo "$as_me: program exited with status $ac_status" >&5 $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) gl_cv_cc_float_signbit="unknown" fi rm -rf conftest.dSYM rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi rm -f conftest.out fi { $as_echo "$as_me:$LINENO: result: $gl_cv_cc_float_signbit" >&5 $as_echo "$gl_cv_cc_float_signbit" >&6; } case "$gl_cv_cc_float_signbit" in word*bit*) word=`echo "$gl_cv_cc_float_signbit" | sed -e 's/word //' -e 's/ bit.*//'` bit=`echo "$gl_cv_cc_float_signbit" | sed -e 's/word.*bit //'` cat >>confdefs.h <<_ACEOF #define FLT_SIGNBIT_WORD $word _ACEOF cat >>confdefs.h <<_ACEOF #define FLT_SIGNBIT_BIT $bit _ACEOF ;; esac { $as_echo "$as_me:$LINENO: checking where to find the sign bit in a 'double'" >&5 $as_echo_n "checking where to find the sign bit in a 'double'... " >&6; } if test "${gl_cv_cc_double_signbit+set}" = set; then $as_echo_n "(cached) " >&6 else if test "$cross_compiling" = yes; then gl_cv_cc_double_signbit="unknown" else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #include #define NWORDS \ ((sizeof (double) + sizeof (unsigned int) - 1) / sizeof (unsigned int)) typedef union { double value; unsigned int word[NWORDS]; } memory_float; static memory_float plus = { 1.0 }; static memory_float minus = { -1.0 }; int main () { size_t j, k, i; unsigned int m; FILE *fp = fopen ("conftest.out", "w"); if (fp == NULL) return 1; /* Find the different bit. */ k = 0; m = 0; for (j = 0; j < NWORDS; j++) { unsigned int x = plus.word[j] ^ minus.word[j]; if ((x & (x - 1)) || (x && m)) { /* More than one bit difference. */ fprintf (fp, "unknown"); return 1; } if (x) { k = j; m = x; } } if (m == 0) { /* No difference. */ fprintf (fp, "unknown"); return 1; } /* Now m = plus.word[k] ^ ~minus.word[k]. */ if (plus.word[k] & ~minus.word[k]) { /* Oh? The sign bit is set in the positive and cleared in the negative numbers? */ fprintf (fp, "unknown"); return 1; } for (i = 0; ; i++) if ((m >> i) & 1) break; fprintf (fp, "word %d bit %d", (int) k, (int) i); return (fclose (fp) != 0); } _ACEOF rm -f conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' { (case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_try") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then gl_cv_cc_double_signbit=`cat conftest.out` else $as_echo "$as_me: program exited with status $ac_status" >&5 $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) gl_cv_cc_double_signbit="unknown" fi rm -rf conftest.dSYM rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi rm -f conftest.out fi { $as_echo "$as_me:$LINENO: result: $gl_cv_cc_double_signbit" >&5 $as_echo "$gl_cv_cc_double_signbit" >&6; } case "$gl_cv_cc_double_signbit" in word*bit*) word=`echo "$gl_cv_cc_double_signbit" | sed -e 's/word //' -e 's/ bit.*//'` bit=`echo "$gl_cv_cc_double_signbit" | sed -e 's/word.*bit //'` cat >>confdefs.h <<_ACEOF #define DBL_SIGNBIT_WORD $word _ACEOF cat >>confdefs.h <<_ACEOF #define DBL_SIGNBIT_BIT $bit _ACEOF ;; esac { $as_echo "$as_me:$LINENO: checking where to find the sign bit in a 'long double'" >&5 $as_echo_n "checking where to find the sign bit in a 'long double'... " >&6; } if test "${gl_cv_cc_long_double_signbit+set}" = set; then $as_echo_n "(cached) " >&6 else if test "$cross_compiling" = yes; then gl_cv_cc_long_double_signbit="unknown" else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #include #define NWORDS \ ((sizeof (long double) + sizeof (unsigned int) - 1) / sizeof (unsigned int)) typedef union { long double value; unsigned int word[NWORDS]; } memory_float; static memory_float plus = { 1.0L }; static memory_float minus = { -1.0L }; int main () { size_t j, k, i; unsigned int m; FILE *fp = fopen ("conftest.out", "w"); if (fp == NULL) return 1; /* Find the different bit. */ k = 0; m = 0; for (j = 0; j < NWORDS; j++) { unsigned int x = plus.word[j] ^ minus.word[j]; if ((x & (x - 1)) || (x && m)) { /* More than one bit difference. */ fprintf (fp, "unknown"); return 1; } if (x) { k = j; m = x; } } if (m == 0) { /* No difference. */ fprintf (fp, "unknown"); return 1; } /* Now m = plus.word[k] ^ ~minus.word[k]. */ if (plus.word[k] & ~minus.word[k]) { /* Oh? The sign bit is set in the positive and cleared in the negative numbers? */ fprintf (fp, "unknown"); return 1; } for (i = 0; ; i++) if ((m >> i) & 1) break; fprintf (fp, "word %d bit %d", (int) k, (int) i); return (fclose (fp) != 0); } _ACEOF rm -f conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' { (case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_try") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then gl_cv_cc_long_double_signbit=`cat conftest.out` else $as_echo "$as_me: program exited with status $ac_status" >&5 $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) gl_cv_cc_long_double_signbit="unknown" fi rm -rf conftest.dSYM rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi rm -f conftest.out fi { $as_echo "$as_me:$LINENO: result: $gl_cv_cc_long_double_signbit" >&5 $as_echo "$gl_cv_cc_long_double_signbit" >&6; } case "$gl_cv_cc_long_double_signbit" in word*bit*) word=`echo "$gl_cv_cc_long_double_signbit" | sed -e 's/word //' -e 's/ bit.*//'` bit=`echo "$gl_cv_cc_long_double_signbit" | sed -e 's/word.*bit //'` cat >>confdefs.h <<_ACEOF #define LDBL_SIGNBIT_WORD $word _ACEOF cat >>confdefs.h <<_ACEOF #define LDBL_SIGNBIT_BIT $bit _ACEOF ;; esac if test "$gl_cv_cc_float_signbit" = unknown; then { $as_echo "$as_me:$LINENO: checking whether copysignf is declared" >&5 $as_echo_n "checking whether copysignf is declared... " >&6; } if test "${ac_cv_have_decl_copysignf+set}" = set; then $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include int main () { #ifndef copysignf (void) copysignf; #endif ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_cv_have_decl_copysignf=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_have_decl_copysignf=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:$LINENO: result: $ac_cv_have_decl_copysignf" >&5 $as_echo "$ac_cv_have_decl_copysignf" >&6; } if test "x$ac_cv_have_decl_copysignf" = x""yes; then cat >>confdefs.h <<_ACEOF #define HAVE_DECL_COPYSIGNF 1 _ACEOF else cat >>confdefs.h <<_ACEOF #define HAVE_DECL_COPYSIGNF 0 _ACEOF fi if test "$ac_cv_have_decl_copysignf" = yes; then { $as_echo "$as_me:$LINENO: checking whether copysignf can be used without linking with libm" >&5 $as_echo_n "checking whether copysignf can be used without linking with libm... " >&6; } if test "${gl_cv_func_copysignf_no_libm+set}" = set; then $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include float x, y; int main () { return copysignf (x, y) < 0; ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || $as_test_x conftest$ac_exeext }; then gl_cv_func_copysignf_no_libm=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 gl_cv_func_copysignf_no_libm=no fi rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi { $as_echo "$as_me:$LINENO: result: $gl_cv_func_copysignf_no_libm" >&5 $as_echo "$gl_cv_func_copysignf_no_libm" >&6; } if test $gl_cv_func_copysignf_no_libm = yes; then cat >>confdefs.h <<\_ACEOF #define HAVE_COPYSIGNF_IN_LIBC 1 _ACEOF fi fi fi if test "$gl_cv_cc_double_signbit" = unknown; then { $as_echo "$as_me:$LINENO: checking whether copysign is declared" >&5 $as_echo_n "checking whether copysign is declared... " >&6; } if test "${ac_cv_have_decl_copysign+set}" = set; then $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include int main () { #ifndef copysign (void) copysign; #endif ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_cv_have_decl_copysign=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_have_decl_copysign=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:$LINENO: result: $ac_cv_have_decl_copysign" >&5 $as_echo "$ac_cv_have_decl_copysign" >&6; } if test "x$ac_cv_have_decl_copysign" = x""yes; then cat >>confdefs.h <<_ACEOF #define HAVE_DECL_COPYSIGN 1 _ACEOF else cat >>confdefs.h <<_ACEOF #define HAVE_DECL_COPYSIGN 0 _ACEOF fi if test "$ac_cv_have_decl_copysign" = yes; then { $as_echo "$as_me:$LINENO: checking whether copysign can be used without linking with libm" >&5 $as_echo_n "checking whether copysign can be used without linking with libm... " >&6; } if test "${gl_cv_func_copysign_no_libm+set}" = set; then $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include double x, y; int main () { return copysign (x, y) < 0; ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || $as_test_x conftest$ac_exeext }; then gl_cv_func_copysign_no_libm=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 gl_cv_func_copysign_no_libm=no fi rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi { $as_echo "$as_me:$LINENO: result: $gl_cv_func_copysign_no_libm" >&5 $as_echo "$gl_cv_func_copysign_no_libm" >&6; } if test $gl_cv_func_copysign_no_libm = yes; then cat >>confdefs.h <<\_ACEOF #define HAVE_COPYSIGN_IN_LIBC 1 _ACEOF fi fi fi if test "$gl_cv_cc_long_double_signbit" = unknown; then { $as_echo "$as_me:$LINENO: checking whether copysignl is declared" >&5 $as_echo_n "checking whether copysignl is declared... " >&6; } if test "${ac_cv_have_decl_copysignl+set}" = set; then $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include int main () { #ifndef copysignl (void) copysignl; #endif ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_cv_have_decl_copysignl=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_have_decl_copysignl=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:$LINENO: result: $ac_cv_have_decl_copysignl" >&5 $as_echo "$ac_cv_have_decl_copysignl" >&6; } if test "x$ac_cv_have_decl_copysignl" = x""yes; then cat >>confdefs.h <<_ACEOF #define HAVE_DECL_COPYSIGNL 1 _ACEOF else cat >>confdefs.h <<_ACEOF #define HAVE_DECL_COPYSIGNL 0 _ACEOF fi if test "$ac_cv_have_decl_copysignl" = yes; then { $as_echo "$as_me:$LINENO: checking whether copysignl can be used without linking with libm" >&5 $as_echo_n "checking whether copysignl can be used without linking with libm... " >&6; } if test "${gl_cv_func_copysignl_no_libm+set}" = set; then $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include long double x, y; int main () { return copysignl (x, y) < 0; ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || $as_test_x conftest$ac_exeext }; then gl_cv_func_copysignl_no_libm=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 gl_cv_func_copysignl_no_libm=no fi rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi { $as_echo "$as_me:$LINENO: result: $gl_cv_func_copysignl_no_libm" >&5 $as_echo "$gl_cv_func_copysignl_no_libm" >&6; } if test $gl_cv_func_copysignl_no_libm = yes; then cat >>confdefs.h <<\_ACEOF #define HAVE_COPYSIGNL_IN_LIBC 1 _ACEOF fi fi fi fi fi GNULIB_SIGNBIT=1 signals_not_posix= cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "sigset_t" >/dev/null 2>&1; then : else signals_not_posix=1 fi rm -f conftest* if test -z "$signals_not_posix"; then { $as_echo "$as_me:$LINENO: checking for sigprocmask" >&5 $as_echo_n "checking for sigprocmask... " >&6; } if test "${ac_cv_func_sigprocmask+set}" = set; then $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Define sigprocmask to an innocuous variant, in case declares sigprocmask. For example, HP-UX 11i declares gettimeofday. */ #define sigprocmask innocuous_sigprocmask /* System header to define __stub macros and hopefully few prototypes, which can conflict with char sigprocmask (); below. Prefer to if __STDC__ is defined, since exists even on freestanding compilers. */ #ifdef __STDC__ # include #else # include #endif #undef sigprocmask /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char sigprocmask (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined __stub_sigprocmask || defined __stub___sigprocmask choke me #endif int main () { return sigprocmask (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || $as_test_x conftest$ac_exeext }; then ac_cv_func_sigprocmask=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_func_sigprocmask=no fi rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi { $as_echo "$as_me:$LINENO: result: $ac_cv_func_sigprocmask" >&5 $as_echo "$ac_cv_func_sigprocmask" >&6; } if test "x$ac_cv_func_sigprocmask" = x""yes; then gl_cv_func_sigprocmask=1 fi fi if test -z "$gl_cv_func_sigprocmask"; then HAVE_POSIX_SIGNALBLOCKING=0 gl_LIBOBJS="$gl_LIBOBJS sigprocmask.$ac_objext" { $as_echo "$as_me:$LINENO: checking for sigset_t" >&5 $as_echo_n "checking for sigset_t... " >&6; } if test "${ac_cv_type_sigset_t+set}" = set; then $as_echo_n "(cached) " >&6 else ac_cv_type_sigset_t=no cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include /* Mingw defines sigset_t not in , but in . */ #include int main () { if (sizeof (sigset_t)) return 0; ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include /* Mingw defines sigset_t not in , but in . */ #include int main () { if (sizeof ((sigset_t))) return 0; ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then : else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_type_sigset_t=yes fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:$LINENO: result: $ac_cv_type_sigset_t" >&5 $as_echo "$ac_cv_type_sigset_t" >&6; } if test "x$ac_cv_type_sigset_t" = x""yes; then cat >>confdefs.h <<_ACEOF #define HAVE_SIGSET_T 1 _ACEOF gl_cv_type_sigset_t=yes else gl_cv_type_sigset_t=no fi if test $gl_cv_type_sigset_t != yes; then HAVE_SIGSET_T=0 fi fi GNULIB_SIGPROCMASK=1 for ac_header in stdint.h do as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 $as_echo_n "checking for $ac_header... " >&6; } if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then $as_echo_n "(cached) " >&6 fi ac_res=`eval 'as_val=${'$as_ac_Header'} $as_echo "$as_val"'` { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } else # Is the header compilable? { $as_echo "$as_me:$LINENO: checking $ac_header usability" >&5 $as_echo_n "checking $ac_header usability... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default #include <$ac_header> _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_header_compiler=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_compiler=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext { $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 $as_echo "$ac_header_compiler" >&6; } # Is the header present? { $as_echo "$as_me:$LINENO: checking $ac_header presence" >&5 $as_echo_n "checking $ac_header presence... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include <$ac_header> _ACEOF if { (ac_try="$ac_cpp conftest.$ac_ext" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null && { test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || test ! -s conftest.err }; then ac_header_preproc=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi rm -f conftest.err conftest.$ac_ext { $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 $as_echo "$ac_header_preproc" >&6; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in yes:no: ) { $as_echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 $as_echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 $as_echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} ac_header_preproc=yes ;; no:yes:* ) { $as_echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 $as_echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} { $as_echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 $as_echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} { $as_echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 $as_echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} { $as_echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 $as_echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 $as_echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} { $as_echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 $as_echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} ;; esac { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 $as_echo_n "checking for $ac_header... " >&6; } if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then $as_echo_n "(cached) " >&6 else eval "$as_ac_Header=\$ac_header_preproc" fi ac_res=`eval 'as_val=${'$as_ac_Header'} $as_echo "$as_val"'` { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } fi as_val=`eval 'as_val=${'$as_ac_Header'} $as_echo "$as_val"'` if test "x$as_val" = x""yes; then cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi done { $as_echo "$as_me:$LINENO: checking for SIZE_MAX" >&5 $as_echo_n "checking for SIZE_MAX... " >&6; } if test "${gl_cv_size_max+set}" = set; then $as_echo_n "(cached) " >&6 else gl_cv_size_max= cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #if HAVE_STDINT_H #include #endif #ifdef SIZE_MAX Found it #endif _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "Found it" >/dev/null 2>&1; then gl_cv_size_max=yes fi rm -f conftest* if test -z "$gl_cv_size_max"; then if test "$cross_compiling" = yes; then # Depending upon the size, compute the lo and hi bounds. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #include int main () { static int test_array [1 - 2 * !((sizeof (size_t) * CHAR_BIT - 1) >= 0)]; test_array [0] = 0 ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_lo=0 ac_mid=0 while :; do cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #include int main () { static int test_array [1 - 2 * !((sizeof (size_t) * CHAR_BIT - 1) <= $ac_mid)]; test_array [0] = 0 ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_hi=$ac_mid; break else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_lo=`expr $ac_mid + 1` if test $ac_lo -le $ac_mid; then ac_lo= ac_hi= break fi ac_mid=`expr 2 '*' $ac_mid + 1` fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext done else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #include int main () { static int test_array [1 - 2 * !((sizeof (size_t) * CHAR_BIT - 1) < 0)]; test_array [0] = 0 ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_hi=-1 ac_mid=-1 while :; do cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #include int main () { static int test_array [1 - 2 * !((sizeof (size_t) * CHAR_BIT - 1) >= $ac_mid)]; test_array [0] = 0 ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_lo=$ac_mid; break else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_hi=`expr '(' $ac_mid ')' - 1` if test $ac_mid -le $ac_hi; then ac_lo= ac_hi= break fi ac_mid=`expr 2 '*' $ac_mid` fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext done else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_lo= ac_hi= fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext # Binary search between lo and hi bounds. while test "x$ac_lo" != "x$ac_hi"; do ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo` cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #include int main () { static int test_array [1 - 2 * !((sizeof (size_t) * CHAR_BIT - 1) <= $ac_mid)]; test_array [0] = 0 ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_hi=$ac_mid else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_lo=`expr '(' $ac_mid ')' + 1` fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext done case $ac_lo in ?*) size_t_bits_minus_1=$ac_lo;; '') size_t_bits_minus_1= ;; esac else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #include static long int longval () { return sizeof (size_t) * CHAR_BIT - 1; } static unsigned long int ulongval () { return sizeof (size_t) * CHAR_BIT - 1; } #include #include int main () { FILE *f = fopen ("conftest.val", "w"); if (! f) return 1; if ((sizeof (size_t) * CHAR_BIT - 1) < 0) { long int i = longval (); if (i != (sizeof (size_t) * CHAR_BIT - 1)) return 1; fprintf (f, "%ld", i); } else { unsigned long int i = ulongval (); if (i != (sizeof (size_t) * CHAR_BIT - 1)) return 1; fprintf (f, "%lu", i); } /* Do not output a trailing newline, as this causes \r\n confusion on some platforms. */ return ferror (f) || fclose (f) != 0; ; return 0; } _ACEOF rm -f conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' { (case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_try") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then size_t_bits_minus_1=`cat conftest.val` else $as_echo "$as_me: program exited with status $ac_status" >&5 $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) size_t_bits_minus_1= fi rm -rf conftest.dSYM rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi rm -f conftest.val if test "$cross_compiling" = yes; then # Depending upon the size, compute the lo and hi bounds. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include int main () { static int test_array [1 - 2 * !((sizeof (size_t) <= sizeof (unsigned int)) >= 0)]; test_array [0] = 0 ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_lo=0 ac_mid=0 while :; do cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include int main () { static int test_array [1 - 2 * !((sizeof (size_t) <= sizeof (unsigned int)) <= $ac_mid)]; test_array [0] = 0 ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_hi=$ac_mid; break else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_lo=`expr $ac_mid + 1` if test $ac_lo -le $ac_mid; then ac_lo= ac_hi= break fi ac_mid=`expr 2 '*' $ac_mid + 1` fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext done else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include int main () { static int test_array [1 - 2 * !((sizeof (size_t) <= sizeof (unsigned int)) < 0)]; test_array [0] = 0 ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_hi=-1 ac_mid=-1 while :; do cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include int main () { static int test_array [1 - 2 * !((sizeof (size_t) <= sizeof (unsigned int)) >= $ac_mid)]; test_array [0] = 0 ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_lo=$ac_mid; break else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_hi=`expr '(' $ac_mid ')' - 1` if test $ac_mid -le $ac_hi; then ac_lo= ac_hi= break fi ac_mid=`expr 2 '*' $ac_mid` fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext done else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_lo= ac_hi= fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext # Binary search between lo and hi bounds. while test "x$ac_lo" != "x$ac_hi"; do ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo` cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include int main () { static int test_array [1 - 2 * !((sizeof (size_t) <= sizeof (unsigned int)) <= $ac_mid)]; test_array [0] = 0 ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_hi=$ac_mid else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_lo=`expr '(' $ac_mid ')' + 1` fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext done case $ac_lo in ?*) fits_in_uint=$ac_lo;; '') fits_in_uint= ;; esac else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include static long int longval () { return sizeof (size_t) <= sizeof (unsigned int); } static unsigned long int ulongval () { return sizeof (size_t) <= sizeof (unsigned int); } #include #include int main () { FILE *f = fopen ("conftest.val", "w"); if (! f) return 1; if ((sizeof (size_t) <= sizeof (unsigned int)) < 0) { long int i = longval (); if (i != (sizeof (size_t) <= sizeof (unsigned int))) return 1; fprintf (f, "%ld", i); } else { unsigned long int i = ulongval (); if (i != (sizeof (size_t) <= sizeof (unsigned int))) return 1; fprintf (f, "%lu", i); } /* Do not output a trailing newline, as this causes \r\n confusion on some platforms. */ return ferror (f) || fclose (f) != 0; ; return 0; } _ACEOF rm -f conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' { (case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_try") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then fits_in_uint=`cat conftest.val` else $as_echo "$as_me: program exited with status $ac_status" >&5 $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) fits_in_uint= fi rm -rf conftest.dSYM rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi rm -f conftest.val if test -n "$size_t_bits_minus_1" && test -n "$fits_in_uint"; then if test $fits_in_uint = 1; then cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include extern size_t foo; extern unsigned long foo; int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then fits_in_uint=0 else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi if test $fits_in_uint = 1; then gl_cv_size_max="(((1U << $size_t_bits_minus_1) - 1) * 2 + 1)" else gl_cv_size_max="(((1UL << $size_t_bits_minus_1) - 1) * 2 + 1)" fi else gl_cv_size_max='((size_t)~(size_t)0)' fi fi fi { $as_echo "$as_me:$LINENO: result: $gl_cv_size_max" >&5 $as_echo "$gl_cv_size_max" >&6; } if test "$gl_cv_size_max" != yes; then cat >>confdefs.h <<_ACEOF #define SIZE_MAX $gl_cv_size_max _ACEOF fi { $as_echo "$as_me:$LINENO: checking whether sleep is declared" >&5 $as_echo_n "checking whether sleep is declared... " >&6; } if test "${ac_cv_have_decl_sleep+set}" = set; then $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include int main () { #ifndef sleep (void) sleep; #endif ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_cv_have_decl_sleep=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_have_decl_sleep=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:$LINENO: result: $ac_cv_have_decl_sleep" >&5 $as_echo "$ac_cv_have_decl_sleep" >&6; } if test "x$ac_cv_have_decl_sleep" = x""yes; then cat >>confdefs.h <<_ACEOF #define HAVE_DECL_SLEEP 1 _ACEOF else cat >>confdefs.h <<_ACEOF #define HAVE_DECL_SLEEP 0 _ACEOF fi : if test $ac_cv_have_decl_sleep != yes; then HAVE_SLEEP=0 gl_LIBOBJS="$gl_LIBOBJS sleep.$ac_objext" else { $as_echo "$as_me:$LINENO: checking for working sleep" >&5 $as_echo_n "checking for working sleep... " >&6; } if test "${gl_cv_func_sleep_works+set}" = set; then $as_echo_n "(cached) " >&6 else if test "$cross_compiling" = yes; then gl_cv_func_sleep_works="guessing no" else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #include #include static void handle_alarm (int sig) { if (sig != SIGALRM) _exit (2); } int main () { /* Failure to compile this test due to missing alarm is okay, since all such platforms (mingw) also lack sleep. */ unsigned int pentecost = 50 * 24 * 60 * 60; /* 50 days. */ unsigned int remaining; signal (SIGALRM, handle_alarm); alarm (1); remaining = sleep (pentecost); return !(pentecost - 10 < remaining && remaining <= pentecost); ; return 0; } _ACEOF rm -f conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' { (case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_try") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then gl_cv_func_sleep_works=yes else $as_echo "$as_me: program exited with status $ac_status" >&5 $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) gl_cv_func_sleep_works=no fi rm -rf conftest.dSYM rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi fi { $as_echo "$as_me:$LINENO: result: $gl_cv_func_sleep_works" >&5 $as_echo "$gl_cv_func_sleep_works" >&6; } if test "$gl_cv_func_sleep_works" != yes; then REPLACE_SLEEP=1 gl_LIBOBJS="$gl_LIBOBJS sleep.$ac_objext" fi fi GNULIB_SLEEP=1 gl_cv_func_snprintf_usable=no for ac_func in snprintf do as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` { $as_echo "$as_me:$LINENO: checking for $ac_func" >&5 $as_echo_n "checking for $ac_func... " >&6; } if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Define $ac_func to an innocuous variant, in case declares $ac_func. For example, HP-UX 11i declares gettimeofday. */ #define $ac_func innocuous_$ac_func /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $ac_func (); below. Prefer to if __STDC__ is defined, since exists even on freestanding compilers. */ #ifdef __STDC__ # include #else # include #endif #undef $ac_func /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char $ac_func (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined __stub_$ac_func || defined __stub___$ac_func choke me #endif int main () { return $ac_func (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || $as_test_x conftest$ac_exeext }; then eval "$as_ac_var=yes" else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 eval "$as_ac_var=no" fi rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi ac_res=`eval 'as_val=${'$as_ac_var'} $as_echo "$as_val"'` { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } as_val=`eval 'as_val=${'$as_ac_var'} $as_echo "$as_val"'` if test "x$as_val" = x""yes; then cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF fi done if test $ac_cv_func_snprintf = yes; then { $as_echo "$as_me:$LINENO: checking whether snprintf respects a size of 1" >&5 $as_echo_n "checking whether snprintf respects a size of 1... " >&6; } if test "${gl_cv_func_snprintf_size1+set}" = set; then $as_echo_n "(cached) " >&6 else if test "$cross_compiling" = yes; then gl_cv_func_snprintf_size1="guessing yes" else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include int main() { static char buf[8] = { 'D', 'E', 'A', 'D', 'B', 'E', 'E', 'F' }; snprintf (buf, 1, "%d", 12345); return buf[1] != 'E'; } _ACEOF rm -f conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' { (case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_try") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then gl_cv_func_snprintf_size1=yes else $as_echo "$as_me: program exited with status $ac_status" >&5 $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) gl_cv_func_snprintf_size1=no fi rm -rf conftest.dSYM rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi fi { $as_echo "$as_me:$LINENO: result: $gl_cv_func_snprintf_size1" >&5 $as_echo "$gl_cv_func_snprintf_size1" >&6; } case "$gl_cv_func_snprintf_size1" in *yes) gl_cv_func_snprintf_usable=yes ;; esac fi if test $gl_cv_func_snprintf_usable = no; then gl_LIBOBJS="$gl_LIBOBJS snprintf.$ac_objext" if test $ac_cv_func_snprintf = yes; then REPLACE_SNPRINTF=1 fi : fi : if test $ac_cv_have_decl_snprintf = no; then HAVE_DECL_SNPRINTF=0 fi GNULIB_SNPRINTF=1 gl_cv_func_snprintf_posix=no for ac_func in snprintf do as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` { $as_echo "$as_me:$LINENO: checking for $ac_func" >&5 $as_echo_n "checking for $ac_func... " >&6; } if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Define $ac_func to an innocuous variant, in case declares $ac_func. For example, HP-UX 11i declares gettimeofday. */ #define $ac_func innocuous_$ac_func /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $ac_func (); below. Prefer to if __STDC__ is defined, since exists even on freestanding compilers. */ #ifdef __STDC__ # include #else # include #endif #undef $ac_func /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char $ac_func (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined __stub_$ac_func || defined __stub___$ac_func choke me #endif int main () { return $ac_func (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || $as_test_x conftest$ac_exeext }; then eval "$as_ac_var=yes" else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 eval "$as_ac_var=no" fi rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi ac_res=`eval 'as_val=${'$as_ac_var'} $as_echo "$as_val"'` { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } as_val=`eval 'as_val=${'$as_ac_var'} $as_echo "$as_val"'` if test "x$as_val" = x""yes; then cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF fi done if test $ac_cv_func_snprintf = yes; then { $as_echo "$as_me:$LINENO: checking whether snprintf truncates the result as in C99" >&5 $as_echo_n "checking whether snprintf truncates the result as in C99... " >&6; } if test "${gl_cv_func_snprintf_truncation_c99+set}" = set; then $as_echo_n "(cached) " >&6 else if test "$cross_compiling" = yes; then case "$host_os" in # Guess yes on glibc systems. *-gnu*) gl_cv_func_snprintf_truncation_c99="guessing yes";; # Guess yes on FreeBSD >= 5. freebsd[1-4]*) gl_cv_func_snprintf_truncation_c99="guessing no";; freebsd* | kfreebsd*) gl_cv_func_snprintf_truncation_c99="guessing yes";; # Guess yes on MacOS X >= 10.3. darwin[1-6].*) gl_cv_func_snprintf_truncation_c99="guessing no";; darwin*) gl_cv_func_snprintf_truncation_c99="guessing yes";; # Guess yes on OpenBSD >= 3.9. openbsd[1-2].* | openbsd3.[0-8] | openbsd3.[0-8].*) gl_cv_func_snprintf_truncation_c99="guessing no";; openbsd*) gl_cv_func_snprintf_truncation_c99="guessing yes";; # Guess yes on Solaris >= 2.6. solaris2.[0-5]*) gl_cv_func_snprintf_truncation_c99="guessing no";; solaris*) gl_cv_func_snprintf_truncation_c99="guessing yes";; # Guess yes on AIX >= 4. aix[1-3]*) gl_cv_func_snprintf_truncation_c99="guessing no";; aix*) gl_cv_func_snprintf_truncation_c99="guessing yes";; # Guess yes on HP-UX >= 11. hpux[7-9]* | hpux10*) gl_cv_func_snprintf_truncation_c99="guessing no";; hpux*) gl_cv_func_snprintf_truncation_c99="guessing yes";; # Guess yes on IRIX >= 6.5. irix6.5) gl_cv_func_snprintf_truncation_c99="guessing yes";; # Guess yes on OSF/1 >= 5. osf[3-4]*) gl_cv_func_snprintf_truncation_c99="guessing no";; osf*) gl_cv_func_snprintf_truncation_c99="guessing yes";; # Guess yes on NetBSD >= 3. netbsd[1-2]* | netbsdelf[1-2]* | netbsdaout[1-2]* | netbsdcoff[1-2]*) gl_cv_func_snprintf_truncation_c99="guessing no";; netbsd*) gl_cv_func_snprintf_truncation_c99="guessing yes";; # Guess yes on BeOS. beos*) gl_cv_func_snprintf_truncation_c99="guessing yes";; # If we don't know, assume the worst. *) gl_cv_func_snprintf_truncation_c99="guessing no";; esac else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #include static char buf[100]; int main () { strcpy (buf, "ABCDEF"); snprintf (buf, 3, "%d %d", 4567, 89); if (memcmp (buf, "45\0DEF", 6) != 0) return 1; return 0; } _ACEOF rm -f conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' { (case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_try") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then gl_cv_func_snprintf_truncation_c99=yes else $as_echo "$as_me: program exited with status $ac_status" >&5 $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) gl_cv_func_snprintf_truncation_c99=no fi rm -rf conftest.dSYM rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi fi { $as_echo "$as_me:$LINENO: result: $gl_cv_func_snprintf_truncation_c99" >&5 $as_echo "$gl_cv_func_snprintf_truncation_c99" >&6; } { $as_echo "$as_me:$LINENO: checking whether snprintf returns a byte count as in C99" >&5 $as_echo_n "checking whether snprintf returns a byte count as in C99... " >&6; } if test "${gl_cv_func_snprintf_retval_c99+set}" = set; then $as_echo_n "(cached) " >&6 else if test "$cross_compiling" = yes; then case "$host_os" in # Guess yes on glibc systems. *-gnu*) gl_cv_func_snprintf_retval_c99="guessing yes";; # Guess yes on FreeBSD >= 5. freebsd[1-4]*) gl_cv_func_snprintf_retval_c99="guessing no";; freebsd* | kfreebsd*) gl_cv_func_snprintf_retval_c99="guessing yes";; # Guess yes on MacOS X >= 10.3. darwin[1-6].*) gl_cv_func_snprintf_retval_c99="guessing no";; darwin*) gl_cv_func_snprintf_retval_c99="guessing yes";; # Guess yes on OpenBSD >= 3.9. openbsd[1-2].* | openbsd3.[0-8] | openbsd3.[0-8].*) gl_cv_func_snprintf_retval_c99="guessing no";; openbsd*) gl_cv_func_snprintf_retval_c99="guessing yes";; # Guess yes on Solaris >= 2.6. solaris2.[0-5]*) gl_cv_func_snprintf_retval_c99="guessing no";; solaris*) gl_cv_func_snprintf_retval_c99="guessing yes";; # Guess yes on AIX >= 4. aix[1-3]*) gl_cv_func_snprintf_retval_c99="guessing no";; aix*) gl_cv_func_snprintf_retval_c99="guessing yes";; # Guess yes on NetBSD >= 3. netbsd[1-2]* | netbsdelf[1-2]* | netbsdaout[1-2]* | netbsdcoff[1-2]*) gl_cv_func_snprintf_retval_c99="guessing no";; netbsd*) gl_cv_func_snprintf_retval_c99="guessing yes";; # Guess yes on BeOS. beos*) gl_cv_func_snprintf_retval_c99="guessing yes";; # If we don't know, assume the worst. *) gl_cv_func_snprintf_retval_c99="guessing no";; esac else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #include static char buf[100]; int main () { strcpy (buf, "ABCDEF"); if (snprintf (buf, 3, "%d %d", 4567, 89) != 7) return 1; return 0; } _ACEOF rm -f conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' { (case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_try") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then gl_cv_func_snprintf_retval_c99=yes else $as_echo "$as_me: program exited with status $ac_status" >&5 $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) gl_cv_func_snprintf_retval_c99=no fi rm -rf conftest.dSYM rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi fi { $as_echo "$as_me:$LINENO: result: $gl_cv_func_snprintf_retval_c99" >&5 $as_echo "$gl_cv_func_snprintf_retval_c99" >&6; } { $as_echo "$as_me:$LINENO: checking whether snprintf fully supports the 'n' directive" >&5 $as_echo_n "checking whether snprintf fully supports the 'n' directive... " >&6; } if test "${gl_cv_func_snprintf_directive_n+set}" = set; then $as_echo_n "(cached) " >&6 else if test "$cross_compiling" = yes; then case "$host_os" in # Guess yes on glibc systems. *-gnu*) gl_cv_func_snprintf_directive_n="guessing yes";; # Guess yes on FreeBSD >= 5. freebsd[1-4]*) gl_cv_func_snprintf_directive_n="guessing no";; freebsd* | kfreebsd*) gl_cv_func_snprintf_directive_n="guessing yes";; # Guess yes on MacOS X >= 10.3. darwin[1-6].*) gl_cv_func_snprintf_directive_n="guessing no";; darwin*) gl_cv_func_snprintf_directive_n="guessing yes";; # Guess yes on Solaris >= 2.6. solaris2.[0-5]*) gl_cv_func_snprintf_directive_n="guessing no";; solaris*) gl_cv_func_snprintf_directive_n="guessing yes";; # Guess yes on AIX >= 4. aix[1-3]*) gl_cv_func_snprintf_directive_n="guessing no";; aix*) gl_cv_func_snprintf_directive_n="guessing yes";; # Guess yes on IRIX >= 6.5. irix6.5) gl_cv_func_snprintf_directive_n="guessing yes";; # Guess yes on OSF/1 >= 5. osf[3-4]*) gl_cv_func_snprintf_directive_n="guessing no";; osf*) gl_cv_func_snprintf_directive_n="guessing yes";; # Guess yes on NetBSD >= 3. netbsd[1-2]* | netbsdelf[1-2]* | netbsdaout[1-2]* | netbsdcoff[1-2]*) gl_cv_func_snprintf_directive_n="guessing no";; netbsd*) gl_cv_func_snprintf_directive_n="guessing yes";; # Guess yes on BeOS. beos*) gl_cv_func_snprintf_directive_n="guessing yes";; # If we don't know, assume the worst. *) gl_cv_func_snprintf_directive_n="guessing no";; esac else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #include static char fmtstring[10]; static char buf[100]; int main () { int count = -1; /* Copy the format string. Some systems (glibc with _FORTIFY_SOURCE=2) support %n in format strings in read-only memory but not in writable memory. */ strcpy (fmtstring, "%d %n"); snprintf (buf, 4, fmtstring, 12345, &count, 33, 44, 55); if (count != 6) return 1; return 0; } _ACEOF rm -f conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' { (case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_try") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then gl_cv_func_snprintf_directive_n=yes else $as_echo "$as_me: program exited with status $ac_status" >&5 $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) gl_cv_func_snprintf_directive_n=no fi rm -rf conftest.dSYM rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi fi { $as_echo "$as_me:$LINENO: result: $gl_cv_func_snprintf_directive_n" >&5 $as_echo "$gl_cv_func_snprintf_directive_n" >&6; } { $as_echo "$as_me:$LINENO: checking whether snprintf respects a size of 1" >&5 $as_echo_n "checking whether snprintf respects a size of 1... " >&6; } if test "${gl_cv_func_snprintf_size1+set}" = set; then $as_echo_n "(cached) " >&6 else if test "$cross_compiling" = yes; then gl_cv_func_snprintf_size1="guessing yes" else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include int main() { static char buf[8] = { 'D', 'E', 'A', 'D', 'B', 'E', 'E', 'F' }; snprintf (buf, 1, "%d", 12345); return buf[1] != 'E'; } _ACEOF rm -f conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' { (case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_try") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then gl_cv_func_snprintf_size1=yes else $as_echo "$as_me: program exited with status $ac_status" >&5 $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) gl_cv_func_snprintf_size1=no fi rm -rf conftest.dSYM rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi fi { $as_echo "$as_me:$LINENO: result: $gl_cv_func_snprintf_size1" >&5 $as_echo "$gl_cv_func_snprintf_size1" >&6; } { $as_echo "$as_me:$LINENO: checking whether vsnprintf respects a zero size as in C99" >&5 $as_echo_n "checking whether vsnprintf respects a zero size as in C99... " >&6; } if test "${gl_cv_func_vsnprintf_zerosize_c99+set}" = set; then $as_echo_n "(cached) " >&6 else if test "$cross_compiling" = yes; then case "$host_os" in # Guess yes on glibc systems. *-gnu*) gl_cv_func_vsnprintf_zerosize_c99="guessing yes";; # Guess yes on FreeBSD >= 5. freebsd[1-4]*) gl_cv_func_vsnprintf_zerosize_c99="guessing no";; freebsd* | kfreebsd*) gl_cv_func_vsnprintf_zerosize_c99="guessing yes";; # Guess yes on MacOS X >= 10.3. darwin[1-6].*) gl_cv_func_vsnprintf_zerosize_c99="guessing no";; darwin*) gl_cv_func_vsnprintf_zerosize_c99="guessing yes";; # Guess yes on Cygwin. cygwin*) gl_cv_func_vsnprintf_zerosize_c99="guessing yes";; # Guess yes on Solaris >= 2.6. solaris2.[0-5]*) gl_cv_func_vsnprintf_zerosize_c99="guessing no";; solaris*) gl_cv_func_vsnprintf_zerosize_c99="guessing yes";; # Guess yes on AIX >= 4. aix[1-3]*) gl_cv_func_vsnprintf_zerosize_c99="guessing no";; aix*) gl_cv_func_vsnprintf_zerosize_c99="guessing yes";; # Guess yes on IRIX >= 6.5. irix6.5) gl_cv_func_vsnprintf_zerosize_c99="guessing yes";; # Guess yes on NetBSD >= 3. netbsd[1-2]* | netbsdelf[1-2]* | netbsdaout[1-2]* | netbsdcoff[1-2]*) gl_cv_func_vsnprintf_zerosize_c99="guessing no";; netbsd*) gl_cv_func_vsnprintf_zerosize_c99="guessing yes";; # Guess yes on BeOS. beos*) gl_cv_func_vsnprintf_zerosize_c99="guessing yes";; # Guess yes on mingw. mingw* | pw*) gl_cv_func_vsnprintf_zerosize_c99="guessing yes";; # If we don't know, assume the worst. *) gl_cv_func_vsnprintf_zerosize_c99="guessing no";; esac else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #include static int my_snprintf (char *buf, int size, const char *format, ...) { va_list args; int ret; va_start (args, format); ret = vsnprintf (buf, size, format, args); va_end (args); return ret; } int main() { static char buf[8] = { 'D', 'E', 'A', 'D', 'B', 'E', 'E', 'F' }; my_snprintf (buf, 0, "%d", 12345); return buf[0] != 'D'; } _ACEOF rm -f conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' { (case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_try") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then gl_cv_func_vsnprintf_zerosize_c99=yes else $as_echo "$as_me: program exited with status $ac_status" >&5 $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) gl_cv_func_vsnprintf_zerosize_c99=no fi rm -rf conftest.dSYM rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi fi { $as_echo "$as_me:$LINENO: result: $gl_cv_func_vsnprintf_zerosize_c99" >&5 $as_echo "$gl_cv_func_vsnprintf_zerosize_c99" >&6; } case "$gl_cv_func_printf_sizes_c99" in *yes) case "$gl_cv_func_printf_long_double" in *yes) case "$gl_cv_func_printf_infinite" in *yes) case "$gl_cv_func_printf_infinite_long_double" in *yes) case "$gl_cv_func_printf_directive_a" in *yes) case "$gl_cv_func_printf_directive_f" in *yes) case "$gl_cv_func_printf_directive_n" in *yes) case "$gl_cv_func_printf_directive_ls" in *yes) case "$gl_cv_func_printf_positions" in *yes) case "$gl_cv_func_printf_flag_grouping" in *yes) case "$gl_cv_func_printf_flag_leftadjust" in *yes) case "$gl_cv_func_printf_flag_zero" in *yes) case "$gl_cv_func_printf_precision" in *yes) case "$gl_cv_func_printf_enomem" in *yes) case "$gl_cv_func_snprintf_truncation_c99" in *yes) case "$gl_cv_func_snprintf_retval_c99" in *yes) case "$gl_cv_func_snprintf_directive_n" in *yes) case "$gl_cv_func_snprintf_size1" in *yes) case "$gl_cv_func_vsnprintf_zerosize_c99" in *yes) # snprintf exists and is # already POSIX compliant. gl_cv_func_snprintf_posix=yes ;; esac ;; esac ;; esac ;; esac ;; esac ;; esac ;; esac ;; esac ;; esac ;; esac ;; esac ;; esac ;; esac ;; esac ;; esac ;; esac ;; esac ;; esac ;; esac fi if test $gl_cv_func_snprintf_posix = no; then case "$gl_cv_func_printf_infinite" in *yes) ;; *) cat >>confdefs.h <<\_ACEOF #define NEED_PRINTF_INFINITE_DOUBLE 1 _ACEOF ;; esac case "$gl_cv_func_printf_long_double" in *yes) case "$gl_cv_func_printf_infinite_long_double" in *yes) ;; *) cat >>confdefs.h <<\_ACEOF #define NEED_PRINTF_INFINITE_LONG_DOUBLE 1 _ACEOF ;; esac ;; esac case "$gl_cv_func_printf_directive_a" in *yes) ;; *) cat >>confdefs.h <<\_ACEOF #define NEED_PRINTF_DIRECTIVE_A 1 _ACEOF for ac_func in nl_langinfo do as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` { $as_echo "$as_me:$LINENO: checking for $ac_func" >&5 $as_echo_n "checking for $ac_func... " >&6; } if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Define $ac_func to an innocuous variant, in case declares $ac_func. For example, HP-UX 11i declares gettimeofday. */ #define $ac_func innocuous_$ac_func /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $ac_func (); below. Prefer to if __STDC__ is defined, since exists even on freestanding compilers. */ #ifdef __STDC__ # include #else # include #endif #undef $ac_func /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char $ac_func (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined __stub_$ac_func || defined __stub___$ac_func choke me #endif int main () { return $ac_func (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || $as_test_x conftest$ac_exeext }; then eval "$as_ac_var=yes" else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 eval "$as_ac_var=no" fi rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi ac_res=`eval 'as_val=${'$as_ac_var'} $as_echo "$as_val"'` { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } as_val=`eval 'as_val=${'$as_ac_var'} $as_echo "$as_val"'` if test "x$as_val" = x""yes; then cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF fi done ;; esac case "$gl_cv_func_printf_directive_f" in *yes) ;; *) cat >>confdefs.h <<\_ACEOF #define NEED_PRINTF_DIRECTIVE_F 1 _ACEOF ;; esac case "$gl_cv_func_printf_directive_ls" in *yes) ;; *) cat >>confdefs.h <<\_ACEOF #define NEED_PRINTF_DIRECTIVE_LS 1 _ACEOF ;; esac case "$gl_cv_func_printf_flag_grouping" in *yes) ;; *) cat >>confdefs.h <<\_ACEOF #define NEED_PRINTF_FLAG_GROUPING 1 _ACEOF ;; esac case "$gl_cv_func_printf_flag_leftadjust" in *yes) ;; *) cat >>confdefs.h <<\_ACEOF #define NEED_PRINTF_FLAG_LEFTADJUST 1 _ACEOF ;; esac case "$gl_cv_func_printf_flag_zero" in *yes) ;; *) cat >>confdefs.h <<\_ACEOF #define NEED_PRINTF_FLAG_ZERO 1 _ACEOF ;; esac case "$gl_cv_func_printf_precision" in *yes) ;; *) cat >>confdefs.h <<\_ACEOF #define NEED_PRINTF_UNBOUNDED_PRECISION 1 _ACEOF cat >>confdefs.h <<\_ACEOF #define NEED_PRINTF_DOUBLE 1 _ACEOF cat >>confdefs.h <<\_ACEOF #define NEED_PRINTF_LONG_DOUBLE 1 _ACEOF ;; esac case "$gl_cv_func_printf_enomem" in *yes) ;; *) cat >>confdefs.h <<\_ACEOF #define NEED_PRINTF_ENOMEM 1 _ACEOF cat >>confdefs.h <<\_ACEOF #define NEED_PRINTF_DOUBLE 1 _ACEOF cat >>confdefs.h <<\_ACEOF #define NEED_PRINTF_LONG_DOUBLE 1 _ACEOF ;; esac : gl_LIBOBJS="$gl_LIBOBJS vasnprintf.$ac_objext" gl_LIBOBJS="$gl_LIBOBJS printf-args.$ac_objext" gl_LIBOBJS="$gl_LIBOBJS printf-parse.$ac_objext" gl_LIBOBJS="$gl_LIBOBJS asnprintf.$ac_objext" if test $ac_cv_func_vasnprintf = yes; then cat >>confdefs.h <<\_ACEOF #define REPLACE_VASNPRINTF 1 _ACEOF fi { $as_echo "$as_me:$LINENO: checking for ptrdiff_t" >&5 $as_echo_n "checking for ptrdiff_t... " >&6; } if test "${ac_cv_type_ptrdiff_t+set}" = set; then $as_echo_n "(cached) " >&6 else ac_cv_type_ptrdiff_t=no cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default int main () { if (sizeof (ptrdiff_t)) return 0; ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default int main () { if (sizeof ((ptrdiff_t))) return 0; ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then : else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_type_ptrdiff_t=yes fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:$LINENO: result: $ac_cv_type_ptrdiff_t" >&5 $as_echo "$ac_cv_type_ptrdiff_t" >&6; } if test "x$ac_cv_type_ptrdiff_t" = x""yes; then : else cat >>confdefs.h <<\_ACEOF #define ptrdiff_t long _ACEOF fi gl_LIBOBJS="$gl_LIBOBJS snprintf.$ac_objext" if test $ac_cv_func_snprintf = yes; then REPLACE_SNPRINTF=1 fi : fi if test "$ac_cv_header_winsock2_h" = yes; then gl_LIBOBJS="$gl_LIBOBJS socket.$ac_objext" fi # When this module is used, sockets may actually occur as file descriptors, # hence it is worth warning if the modules 'close' and 'ioctl' are not used. if test "$ac_cv_header_winsock2_h" = yes; then UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS=1 SYS_IOCTL_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS=1 fi GNULIB_SOCKET=1 : if test $ac_cv_header_sys_socket_h != yes; then for ac_header in winsock2.h do as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 $as_echo_n "checking for $ac_header... " >&6; } if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then $as_echo_n "(cached) " >&6 fi ac_res=`eval 'as_val=${'$as_ac_Header'} $as_echo "$as_val"'` { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } else # Is the header compilable? { $as_echo "$as_me:$LINENO: checking $ac_header usability" >&5 $as_echo_n "checking $ac_header usability... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default #include <$ac_header> _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_header_compiler=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_compiler=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext { $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 $as_echo "$ac_header_compiler" >&6; } # Is the header present? { $as_echo "$as_me:$LINENO: checking $ac_header presence" >&5 $as_echo_n "checking $ac_header presence... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include <$ac_header> _ACEOF if { (ac_try="$ac_cpp conftest.$ac_ext" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null && { test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || test ! -s conftest.err }; then ac_header_preproc=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi rm -f conftest.err conftest.$ac_ext { $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 $as_echo "$ac_header_preproc" >&6; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in yes:no: ) { $as_echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 $as_echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 $as_echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} ac_header_preproc=yes ;; no:yes:* ) { $as_echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 $as_echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} { $as_echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 $as_echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} { $as_echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 $as_echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} { $as_echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 $as_echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 $as_echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} { $as_echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 $as_echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} ;; esac { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 $as_echo_n "checking for $ac_header... " >&6; } if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then $as_echo_n "(cached) " >&6 else eval "$as_ac_Header=\$ac_header_preproc" fi ac_res=`eval 'as_val=${'$as_ac_Header'} $as_echo "$as_val"'` { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } fi as_val=`eval 'as_val=${'$as_ac_Header'} $as_echo "$as_val"'` if test "x$as_val" = x""yes; then cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi done fi if test "$ac_cv_header_winsock2_h" = yes; then HAVE_WINSOCK2_H=1 UNISTD_H_HAVE_WINSOCK2_H=1 SYS_IOCTL_H_HAVE_WINSOCK2_H=1 else HAVE_WINSOCK2_H=0 fi LIBSOCKET= if test $HAVE_WINSOCK2_H = 1; then { $as_echo "$as_me:$LINENO: checking if we need to call WSAStartup in winsock2.h and -lws2_32" >&5 $as_echo_n "checking if we need to call WSAStartup in winsock2.h and -lws2_32... " >&6; } if test "${gl_cv_func_wsastartup+set}" = set; then $as_echo_n "(cached) " >&6 else gl_save_LIBS="$LIBS" LIBS="$LIBS -lws2_32" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #ifdef HAVE_WINSOCK2_H # include #endif int main () { WORD wVersionRequested = MAKEWORD(1, 1); WSADATA wsaData; int err = WSAStartup(wVersionRequested, &wsaData); WSACleanup (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || $as_test_x conftest$ac_exeext }; then gl_cv_func_wsastartup=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 gl_cv_func_wsastartup=no fi rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS="$gl_save_LIBS" fi { $as_echo "$as_me:$LINENO: result: $gl_cv_func_wsastartup" >&5 $as_echo "$gl_cv_func_wsastartup" >&6; } if test "$gl_cv_func_wsastartup" = "yes"; then cat >>confdefs.h <<\_ACEOF #define WINDOWS_SOCKETS 1 _ACEOF LIBSOCKET='-lws2_32' fi else { $as_echo "$as_me:$LINENO: checking for library containing setsockopt" >&5 $as_echo_n "checking for library containing setsockopt... " >&6; } if test "${gl_cv_lib_socket+set}" = set; then $as_echo_n "(cached) " >&6 else gl_cv_lib_socket= cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ extern #ifdef __cplusplus "C" #endif char setsockopt(); int main () { setsockopt(); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || $as_test_x conftest$ac_exeext }; then : else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 gl_save_LIBS="$LIBS" LIBS="$gl_save_LIBS -lsocket" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ extern #ifdef __cplusplus "C" #endif char setsockopt(); int main () { setsockopt(); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || $as_test_x conftest$ac_exeext }; then gl_cv_lib_socket="-lsocket" else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext if test -z "$gl_cv_lib_socket"; then LIBS="$gl_save_LIBS -lnetwork" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ extern #ifdef __cplusplus "C" #endif char setsockopt(); int main () { setsockopt(); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || $as_test_x conftest$ac_exeext }; then gl_cv_lib_socket="-lnetwork" else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext if test -z "$gl_cv_lib_socket"; then LIBS="$gl_save_LIBS -lnet" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ extern #ifdef __cplusplus "C" #endif char setsockopt(); int main () { setsockopt(); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || $as_test_x conftest$ac_exeext }; then gl_cv_lib_socket="-lnet" else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi fi LIBS="$gl_save_LIBS" fi rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext if test -z "$gl_cv_lib_socket"; then gl_cv_lib_socket="none needed" fi fi { $as_echo "$as_me:$LINENO: result: $gl_cv_lib_socket" >&5 $as_echo "$gl_cv_lib_socket" >&6; } if test "$gl_cv_lib_socket" != "none needed"; then LIBSOCKET="$gl_cv_lib_socket" fi fi : { $as_echo "$as_me:$LINENO: checking for socklen_t" >&5 $as_echo_n "checking for socklen_t... " >&6; } if test "${ac_cv_type_socklen_t+set}" = set; then $as_echo_n "(cached) " >&6 else ac_cv_type_socklen_t=no cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #if HAVE_SYS_SOCKET_H # include #elif HAVE_WS2TCPIP_H # include #endif int main () { if (sizeof (socklen_t)) return 0; ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #if HAVE_SYS_SOCKET_H # include #elif HAVE_WS2TCPIP_H # include #endif int main () { if (sizeof ((socklen_t))) return 0; ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then : else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_type_socklen_t=yes fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:$LINENO: result: $ac_cv_type_socklen_t" >&5 $as_echo "$ac_cv_type_socklen_t" >&6; } if test "x$ac_cv_type_socklen_t" = x""yes; then : else { $as_echo "$as_me:$LINENO: checking for socklen_t equivalent" >&5 $as_echo_n "checking for socklen_t equivalent... " >&6; } if test "${gl_cv_socklen_t_equiv+set}" = set; then $as_echo_n "(cached) " >&6 else # Systems have either "struct sockaddr *" or # "void *" as the second argument to getpeername gl_cv_socklen_t_equiv= for arg2 in "struct sockaddr" void; do for t in int size_t "unsigned int" "long int" "unsigned long int"; do cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #include int getpeername (int, $arg2 *, $t *); int main () { $t len; getpeername (0, 0, &len); ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then gl_cv_socklen_t_equiv="$t" else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext test "$gl_cv_socklen_t_equiv" != "" && break done test "$gl_cv_socklen_t_equiv" != "" && break done fi if test "$gl_cv_socklen_t_equiv" = ""; then { { $as_echo "$as_me:$LINENO: error: Cannot find a type to use in place of socklen_t" >&5 $as_echo "$as_me: error: Cannot find a type to use in place of socklen_t" >&2;} { (exit 1); exit 1; }; } fi { $as_echo "$as_me:$LINENO: result: $gl_cv_socklen_t_equiv" >&5 $as_echo "$gl_cv_socklen_t_equiv" >&6; } cat >>confdefs.h <<_ACEOF #define socklen_t $gl_cv_socklen_t_equiv _ACEOF fi { $as_echo "$as_me:$LINENO: checking for ssize_t" >&5 $as_echo_n "checking for ssize_t... " >&6; } if test "${gt_cv_ssize_t+set}" = set; then $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include int main () { int x = sizeof (ssize_t *) + sizeof (ssize_t); return !x; ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then gt_cv_ssize_t=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 gt_cv_ssize_t=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:$LINENO: result: $gt_cv_ssize_t" >&5 $as_echo "$gt_cv_ssize_t" >&6; } if test $gt_cv_ssize_t = no; then cat >>confdefs.h <<\_ACEOF #define ssize_t int _ACEOF fi : { $as_echo "$as_me:$LINENO: checking whether stat handles trailing slashes on directories" >&5 $as_echo_n "checking whether stat handles trailing slashes on directories... " >&6; } if test "${gl_cv_func_stat_dir_slash+set}" = set; then $as_echo_n "(cached) " >&6 else if test "$cross_compiling" = yes; then case $host_os in mingw*) gl_cv_func_stat_dir_slash="guessing no";; *) gl_cv_func_stat_dir_slash="guessing yes";; esac else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include int main () { struct stat st; return stat (".", &st) != stat ("./", &st); ; return 0; } _ACEOF rm -f conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' { (case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_try") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then gl_cv_func_stat_dir_slash=yes else $as_echo "$as_me: program exited with status $ac_status" >&5 $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) gl_cv_func_stat_dir_slash=no fi rm -rf conftest.dSYM rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi fi { $as_echo "$as_me:$LINENO: result: $gl_cv_func_stat_dir_slash" >&5 $as_echo "$gl_cv_func_stat_dir_slash" >&6; } { $as_echo "$as_me:$LINENO: checking whether stat handles trailing slashes on files" >&5 $as_echo_n "checking whether stat handles trailing slashes on files... " >&6; } if test "${gl_cv_func_stat_file_slash+set}" = set; then $as_echo_n "(cached) " >&6 else touch conftest.tmp # Assume that if we have lstat, we can also check symlinks. if test $ac_cv_func_lstat = yes; then ln -s conftest.tmp conftest.lnk fi if test "$cross_compiling" = yes; then gl_cv_func_stat_file_slash="guessing no" else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include int main () { struct stat st; if (!stat ("conftest.tmp/", &st)) return 1; #if HAVE_LSTAT if (!stat ("conftest.lnk/", &st)) return 2; #endif ; return 0; } _ACEOF rm -f conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' { (case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_try") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then gl_cv_func_stat_file_slash=yes else $as_echo "$as_me: program exited with status $ac_status" >&5 $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) gl_cv_func_stat_file_slash=no fi rm -rf conftest.dSYM rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi rm -f conftest.tmp conftest.lnk fi { $as_echo "$as_me:$LINENO: result: $gl_cv_func_stat_file_slash" >&5 $as_echo "$gl_cv_func_stat_file_slash" >&6; } case $gl_cv_func_stat_dir_slash in *no) REPLACE_STAT=1 cat >>confdefs.h <<\_ACEOF #define REPLACE_FUNC_STAT_DIR 1 _ACEOF ;; esac case $gl_cv_func_stat_file_slash in *no) REPLACE_STAT=1 cat >>confdefs.h <<\_ACEOF #define REPLACE_FUNC_STAT_FILE 1 _ACEOF ;; esac if test $REPLACE_STAT = 1; then gl_LIBOBJS="$gl_LIBOBJS stat.$ac_objext" fi GNULIB_STAT=1 # Define two additional variables used in the Makefile substitution. if test "$ac_cv_header_stdbool_h" = yes; then STDBOOL_H='' else STDBOOL_H='stdbool.h' fi if test "$ac_cv_type__Bool" = yes; then HAVE__BOOL=1 else HAVE__BOOL=0 fi if test $gt_cv_c_wchar_t = no; then HAVE_WCHAR_T=0 STDDEF_H=stddef.h fi { $as_echo "$as_me:$LINENO: checking whether NULL can be used in arbitrary expressions" >&5 $as_echo_n "checking whether NULL can be used in arbitrary expressions... " >&6; } if test "${gl_cv_decl_null_works+set}" = set; then $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include int test[2 * (sizeof NULL == sizeof (void *)) -1]; int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then gl_cv_decl_null_works=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 gl_cv_decl_null_works=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:$LINENO: result: $gl_cv_decl_null_works" >&5 $as_echo "$gl_cv_decl_null_works" >&6; } if test $gl_cv_decl_null_works = no; then REPLACE_NULL=1 STDDEF_H=stddef.h fi if test -n "$STDDEF_H"; then : if test $gl_cv_have_include_next = yes; then gl_cv_next_stddef_h='<'stddef.h'>' else { $as_echo "$as_me:$LINENO: checking absolute name of " >&5 $as_echo_n "checking absolute name of ... " >&6; } if test "${gl_cv_next_stddef_h+set}" = set; then $as_echo_n "(cached) " >&6 else if test $ac_cv_header_stddef_h = yes; then cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF case "$host_os" in aix*) gl_absname_cpp="$ac_cpp -C" ;; *) gl_absname_cpp="$ac_cpp" ;; esac gl_cv_next_stddef_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 | sed -n '\#/stddef.h#{ s#.*"\(.*/stddef.h\)".*#\1# s#^/[^/]#//&# p q }'`'"' else gl_cv_next_stddef_h='<'stddef.h'>' fi fi { $as_echo "$as_me:$LINENO: result: $gl_cv_next_stddef_h" >&5 $as_echo "$gl_cv_next_stddef_h" >&6; } fi NEXT_STDDEF_H=$gl_cv_next_stddef_h if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next' gl_next_as_first_directive='<'stddef.h'>' else # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include' gl_next_as_first_directive=$gl_cv_next_stddef_h fi NEXT_AS_FIRST_DIRECTIVE_STDDEF_H=$gl_next_as_first_directive fi if test $ac_cv_type_long_long_int = yes; then HAVE_LONG_LONG_INT=1 else HAVE_LONG_LONG_INT=0 fi if test $ac_cv_type_unsigned_long_long_int = yes; then HAVE_UNSIGNED_LONG_LONG_INT=1 else HAVE_UNSIGNED_LONG_LONG_INT=0 fi if test $ac_cv_header_inttypes_h = yes; then HAVE_INTTYPES_H=1 else HAVE_INTTYPES_H=0 fi if test $ac_cv_header_sys_types_h = yes; then HAVE_SYS_TYPES_H=1 else HAVE_SYS_TYPES_H=0 fi : if test $gl_cv_have_include_next = yes; then gl_cv_next_stdint_h='<'stdint.h'>' else { $as_echo "$as_me:$LINENO: checking absolute name of " >&5 $as_echo_n "checking absolute name of ... " >&6; } if test "${gl_cv_next_stdint_h+set}" = set; then $as_echo_n "(cached) " >&6 else if test $ac_cv_header_stdint_h = yes; then cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF case "$host_os" in aix*) gl_absname_cpp="$ac_cpp -C" ;; *) gl_absname_cpp="$ac_cpp" ;; esac gl_cv_next_stdint_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 | sed -n '\#/stdint.h#{ s#.*"\(.*/stdint.h\)".*#\1# s#^/[^/]#//&# p q }'`'"' else gl_cv_next_stdint_h='<'stdint.h'>' fi fi { $as_echo "$as_me:$LINENO: result: $gl_cv_next_stdint_h" >&5 $as_echo "$gl_cv_next_stdint_h" >&6; } fi NEXT_STDINT_H=$gl_cv_next_stdint_h if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next' gl_next_as_first_directive='<'stdint.h'>' else # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include' gl_next_as_first_directive=$gl_cv_next_stdint_h fi NEXT_AS_FIRST_DIRECTIVE_STDINT_H=$gl_next_as_first_directive if test $ac_cv_header_stdint_h = yes; then HAVE_STDINT_H=1 else HAVE_STDINT_H=0 fi if test $ac_cv_header_stdint_h = yes; then { $as_echo "$as_me:$LINENO: checking whether stdint.h conforms to C99" >&5 $as_echo_n "checking whether stdint.h conforms to C99... " >&6; } if test "${gl_cv_header_working_stdint_h+set}" = set; then $as_echo_n "(cached) " >&6 else gl_cv_header_working_stdint_h=no cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #define __STDC_LIMIT_MACROS 1 /* to make it work also in C++ mode */ #define __STDC_CONSTANT_MACROS 1 /* to make it work also in C++ mode */ #define _GL_JUST_INCLUDE_SYSTEM_STDINT_H 1 /* work if build isn't clean */ #include /* Dragonfly defines WCHAR_MIN, WCHAR_MAX only in . */ #if !(defined WCHAR_MIN && defined WCHAR_MAX) #error "WCHAR_MIN, WCHAR_MAX not defined in " #endif /* BSD/OS 4.0.1 has a bug: , and must be included before . */ #include #include #if HAVE_WCHAR_H # include # include # include #endif #ifdef INT8_MAX int8_t a1 = INT8_MAX; int8_t a1min = INT8_MIN; #endif #ifdef INT16_MAX int16_t a2 = INT16_MAX; int16_t a2min = INT16_MIN; #endif #ifdef INT32_MAX int32_t a3 = INT32_MAX; int32_t a3min = INT32_MIN; #endif #ifdef INT64_MAX int64_t a4 = INT64_MAX; int64_t a4min = INT64_MIN; #endif #ifdef UINT8_MAX uint8_t b1 = UINT8_MAX; #else typedef int b1[(unsigned char) -1 != 255 ? 1 : -1]; #endif #ifdef UINT16_MAX uint16_t b2 = UINT16_MAX; #endif #ifdef UINT32_MAX uint32_t b3 = UINT32_MAX; #endif #ifdef UINT64_MAX uint64_t b4 = UINT64_MAX; #endif int_least8_t c1 = INT8_C (0x7f); int_least8_t c1max = INT_LEAST8_MAX; int_least8_t c1min = INT_LEAST8_MIN; int_least16_t c2 = INT16_C (0x7fff); int_least16_t c2max = INT_LEAST16_MAX; int_least16_t c2min = INT_LEAST16_MIN; int_least32_t c3 = INT32_C (0x7fffffff); int_least32_t c3max = INT_LEAST32_MAX; int_least32_t c3min = INT_LEAST32_MIN; int_least64_t c4 = INT64_C (0x7fffffffffffffff); int_least64_t c4max = INT_LEAST64_MAX; int_least64_t c4min = INT_LEAST64_MIN; uint_least8_t d1 = UINT8_C (0xff); uint_least8_t d1max = UINT_LEAST8_MAX; uint_least16_t d2 = UINT16_C (0xffff); uint_least16_t d2max = UINT_LEAST16_MAX; uint_least32_t d3 = UINT32_C (0xffffffff); uint_least32_t d3max = UINT_LEAST32_MAX; uint_least64_t d4 = UINT64_C (0xffffffffffffffff); uint_least64_t d4max = UINT_LEAST64_MAX; int_fast8_t e1 = INT_FAST8_MAX; int_fast8_t e1min = INT_FAST8_MIN; int_fast16_t e2 = INT_FAST16_MAX; int_fast16_t e2min = INT_FAST16_MIN; int_fast32_t e3 = INT_FAST32_MAX; int_fast32_t e3min = INT_FAST32_MIN; int_fast64_t e4 = INT_FAST64_MAX; int_fast64_t e4min = INT_FAST64_MIN; uint_fast8_t f1 = UINT_FAST8_MAX; uint_fast16_t f2 = UINT_FAST16_MAX; uint_fast32_t f3 = UINT_FAST32_MAX; uint_fast64_t f4 = UINT_FAST64_MAX; #ifdef INTPTR_MAX intptr_t g = INTPTR_MAX; intptr_t gmin = INTPTR_MIN; #endif #ifdef UINTPTR_MAX uintptr_t h = UINTPTR_MAX; #endif intmax_t i = INTMAX_MAX; uintmax_t j = UINTMAX_MAX; #include /* for CHAR_BIT */ #define TYPE_MINIMUM(t) \ ((t) ((t) 0 < (t) -1 ? (t) 0 : ~ (t) 0 << (sizeof (t) * CHAR_BIT - 1))) #define TYPE_MAXIMUM(t) \ ((t) ((t) 0 < (t) -1 ? (t) -1 : ~ (~ (t) 0 << (sizeof (t) * CHAR_BIT - 1)))) struct s { int check_PTRDIFF: PTRDIFF_MIN == TYPE_MINIMUM (ptrdiff_t) && PTRDIFF_MAX == TYPE_MAXIMUM (ptrdiff_t) ? 1 : -1; /* Detect bug in FreeBSD 6.0 / ia64. */ int check_SIG_ATOMIC: SIG_ATOMIC_MIN == TYPE_MINIMUM (sig_atomic_t) && SIG_ATOMIC_MAX == TYPE_MAXIMUM (sig_atomic_t) ? 1 : -1; int check_SIZE: SIZE_MAX == TYPE_MAXIMUM (size_t) ? 1 : -1; int check_WCHAR: WCHAR_MIN == TYPE_MINIMUM (wchar_t) && WCHAR_MAX == TYPE_MAXIMUM (wchar_t) ? 1 : -1; /* Detect bug in mingw. */ int check_WINT: WINT_MIN == TYPE_MINIMUM (wint_t) && WINT_MAX == TYPE_MAXIMUM (wint_t) ? 1 : -1; /* Detect bugs in glibc 2.4 and Solaris 10 stdint.h, among others. */ int check_UINT8_C: (-1 < UINT8_C (0)) == (-1 < (uint_least8_t) 0) ? 1 : -1; int check_UINT16_C: (-1 < UINT16_C (0)) == (-1 < (uint_least16_t) 0) ? 1 : -1; /* Detect bugs in OpenBSD 3.9 stdint.h. */ #ifdef UINT8_MAX int check_uint8: (uint8_t) -1 == UINT8_MAX ? 1 : -1; #endif #ifdef UINT16_MAX int check_uint16: (uint16_t) -1 == UINT16_MAX ? 1 : -1; #endif #ifdef UINT32_MAX int check_uint32: (uint32_t) -1 == UINT32_MAX ? 1 : -1; #endif #ifdef UINT64_MAX int check_uint64: (uint64_t) -1 == UINT64_MAX ? 1 : -1; #endif int check_uint_least8: (uint_least8_t) -1 == UINT_LEAST8_MAX ? 1 : -1; int check_uint_least16: (uint_least16_t) -1 == UINT_LEAST16_MAX ? 1 : -1; int check_uint_least32: (uint_least32_t) -1 == UINT_LEAST32_MAX ? 1 : -1; int check_uint_least64: (uint_least64_t) -1 == UINT_LEAST64_MAX ? 1 : -1; int check_uint_fast8: (uint_fast8_t) -1 == UINT_FAST8_MAX ? 1 : -1; int check_uint_fast16: (uint_fast16_t) -1 == UINT_FAST16_MAX ? 1 : -1; int check_uint_fast32: (uint_fast32_t) -1 == UINT_FAST32_MAX ? 1 : -1; int check_uint_fast64: (uint_fast64_t) -1 == UINT_FAST64_MAX ? 1 : -1; int check_uintptr: (uintptr_t) -1 == UINTPTR_MAX ? 1 : -1; int check_uintmax: (uintmax_t) -1 == UINTMAX_MAX ? 1 : -1; int check_size: (size_t) -1 == SIZE_MAX ? 1 : -1; }; int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then if test "$cross_compiling" = yes; then gl_cv_header_working_stdint_h=yes else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #define __STDC_LIMIT_MACROS 1 /* to make it work also in C++ mode */ #define __STDC_CONSTANT_MACROS 1 /* to make it work also in C++ mode */ #define _GL_JUST_INCLUDE_SYSTEM_STDINT_H 1 /* work if build isn't clean */ #include /* BSD/OS 4.0.1 has a bug: , and must be included before . */ #include #include #if HAVE_WCHAR_H # include # include # include #endif #include #include #define MVAL(macro) MVAL1(macro) #define MVAL1(expression) #expression static const char *macro_values[] = { #ifdef INT8_MAX MVAL (INT8_MAX), #endif #ifdef INT16_MAX MVAL (INT16_MAX), #endif #ifdef INT32_MAX MVAL (INT32_MAX), #endif #ifdef INT64_MAX MVAL (INT64_MAX), #endif #ifdef UINT8_MAX MVAL (UINT8_MAX), #endif #ifdef UINT16_MAX MVAL (UINT16_MAX), #endif #ifdef UINT32_MAX MVAL (UINT32_MAX), #endif #ifdef UINT64_MAX MVAL (UINT64_MAX), #endif NULL }; int main () { const char **mv; for (mv = macro_values; *mv != NULL; mv++) { const char *value = *mv; /* Test whether it looks like a cast expression. */ if (strncmp (value, "((unsigned int)"/*)*/, 15) == 0 || strncmp (value, "((unsigned short)"/*)*/, 17) == 0 || strncmp (value, "((unsigned char)"/*)*/, 16) == 0 || strncmp (value, "((int)"/*)*/, 6) == 0 || strncmp (value, "((signed short)"/*)*/, 15) == 0 || strncmp (value, "((signed char)"/*)*/, 14) == 0) return 1; } return 0; ; return 0; } _ACEOF rm -f conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' { (case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_try") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then gl_cv_header_working_stdint_h=yes else $as_echo "$as_me: program exited with status $ac_status" >&5 $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -rf conftest.dSYM rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:$LINENO: result: $gl_cv_header_working_stdint_h" >&5 $as_echo "$gl_cv_header_working_stdint_h" >&6; } fi if test "$gl_cv_header_working_stdint_h" = yes; then STDINT_H= else for ac_header in sys/inttypes.h sys/bitypes.h do as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 $as_echo_n "checking for $ac_header... " >&6; } if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then $as_echo_n "(cached) " >&6 fi ac_res=`eval 'as_val=${'$as_ac_Header'} $as_echo "$as_val"'` { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } else # Is the header compilable? { $as_echo "$as_me:$LINENO: checking $ac_header usability" >&5 $as_echo_n "checking $ac_header usability... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default #include <$ac_header> _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_header_compiler=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_compiler=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext { $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 $as_echo "$ac_header_compiler" >&6; } # Is the header present? { $as_echo "$as_me:$LINENO: checking $ac_header presence" >&5 $as_echo_n "checking $ac_header presence... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include <$ac_header> _ACEOF if { (ac_try="$ac_cpp conftest.$ac_ext" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null && { test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || test ! -s conftest.err }; then ac_header_preproc=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi rm -f conftest.err conftest.$ac_ext { $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 $as_echo "$ac_header_preproc" >&6; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in yes:no: ) { $as_echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 $as_echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 $as_echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} ac_header_preproc=yes ;; no:yes:* ) { $as_echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 $as_echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} { $as_echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 $as_echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} { $as_echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 $as_echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} { $as_echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 $as_echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 $as_echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} { $as_echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 $as_echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} ;; esac { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 $as_echo_n "checking for $ac_header... " >&6; } if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then $as_echo_n "(cached) " >&6 else eval "$as_ac_Header=\$ac_header_preproc" fi ac_res=`eval 'as_val=${'$as_ac_Header'} $as_echo "$as_val"'` { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } fi as_val=`eval 'as_val=${'$as_ac_Header'} $as_echo "$as_val"'` if test "x$as_val" = x""yes; then cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi done if test $ac_cv_header_sys_inttypes_h = yes; then HAVE_SYS_INTTYPES_H=1 else HAVE_SYS_INTTYPES_H=0 fi if test $ac_cv_header_sys_bitypes_h = yes; then HAVE_SYS_BITYPES_H=1 else HAVE_SYS_BITYPES_H=0 fi : if test $APPLE_UNIVERSAL_BUILD = 0; then for gltype in ptrdiff_t size_t ; do { $as_echo "$as_me:$LINENO: checking for bit size of $gltype" >&5 $as_echo_n "checking for bit size of $gltype... " >&6; } if { as_var=gl_cv_bitsizeof_${gltype}; eval "test \"\${$as_var+set}\" = set"; }; then $as_echo_n "(cached) " >&6 else if test "$cross_compiling" = yes; then # Depending upon the size, compute the lo and hi bounds. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* BSD/OS 4.0.1 has a bug: , and must be included before . */ #include #include #if HAVE_WCHAR_H # include # include # include #endif #include int main () { static int test_array [1 - 2 * !((sizeof ($gltype) * CHAR_BIT) >= 0)]; test_array [0] = 0 ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_lo=0 ac_mid=0 while :; do cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* BSD/OS 4.0.1 has a bug: , and must be included before . */ #include #include #if HAVE_WCHAR_H # include # include # include #endif #include int main () { static int test_array [1 - 2 * !((sizeof ($gltype) * CHAR_BIT) <= $ac_mid)]; test_array [0] = 0 ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_hi=$ac_mid; break else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_lo=`expr $ac_mid + 1` if test $ac_lo -le $ac_mid; then ac_lo= ac_hi= break fi ac_mid=`expr 2 '*' $ac_mid + 1` fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext done else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* BSD/OS 4.0.1 has a bug: , and must be included before . */ #include #include #if HAVE_WCHAR_H # include # include # include #endif #include int main () { static int test_array [1 - 2 * !((sizeof ($gltype) * CHAR_BIT) < 0)]; test_array [0] = 0 ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_hi=-1 ac_mid=-1 while :; do cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* BSD/OS 4.0.1 has a bug: , and must be included before . */ #include #include #if HAVE_WCHAR_H # include # include # include #endif #include int main () { static int test_array [1 - 2 * !((sizeof ($gltype) * CHAR_BIT) >= $ac_mid)]; test_array [0] = 0 ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_lo=$ac_mid; break else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_hi=`expr '(' $ac_mid ')' - 1` if test $ac_mid -le $ac_hi; then ac_lo= ac_hi= break fi ac_mid=`expr 2 '*' $ac_mid` fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext done else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_lo= ac_hi= fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext # Binary search between lo and hi bounds. while test "x$ac_lo" != "x$ac_hi"; do ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo` cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* BSD/OS 4.0.1 has a bug: , and must be included before . */ #include #include #if HAVE_WCHAR_H # include # include # include #endif #include int main () { static int test_array [1 - 2 * !((sizeof ($gltype) * CHAR_BIT) <= $ac_mid)]; test_array [0] = 0 ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_hi=$ac_mid else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_lo=`expr '(' $ac_mid ')' + 1` fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext done case $ac_lo in ?*) result=$ac_lo;; '') result=unknown ;; esac else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* BSD/OS 4.0.1 has a bug: , and must be included before . */ #include #include #if HAVE_WCHAR_H # include # include # include #endif #include static long int longval () { return sizeof ($gltype) * CHAR_BIT; } static unsigned long int ulongval () { return sizeof ($gltype) * CHAR_BIT; } #include #include int main () { FILE *f = fopen ("conftest.val", "w"); if (! f) return 1; if ((sizeof ($gltype) * CHAR_BIT) < 0) { long int i = longval (); if (i != (sizeof ($gltype) * CHAR_BIT)) return 1; fprintf (f, "%ld", i); } else { unsigned long int i = ulongval (); if (i != (sizeof ($gltype) * CHAR_BIT)) return 1; fprintf (f, "%lu", i); } /* Do not output a trailing newline, as this causes \r\n confusion on some platforms. */ return ferror (f) || fclose (f) != 0; ; return 0; } _ACEOF rm -f conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' { (case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_try") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then result=`cat conftest.val` else $as_echo "$as_me: program exited with status $ac_status" >&5 $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) result=unknown fi rm -rf conftest.dSYM rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi rm -f conftest.val eval gl_cv_bitsizeof_${gltype}=\$result fi ac_res=`eval 'as_val=${'gl_cv_bitsizeof_${gltype}'} $as_echo "$as_val"'` { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } eval result=\$gl_cv_bitsizeof_${gltype} if test $result = unknown; then result=0 fi GLTYPE=`echo "$gltype" | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'` cat >>confdefs.h <<_ACEOF #define BITSIZEOF_${GLTYPE} $result _ACEOF eval BITSIZEOF_${GLTYPE}=\$result done fi for gltype in sig_atomic_t wchar_t wint_t ; do { $as_echo "$as_me:$LINENO: checking for bit size of $gltype" >&5 $as_echo_n "checking for bit size of $gltype... " >&6; } if { as_var=gl_cv_bitsizeof_${gltype}; eval "test \"\${$as_var+set}\" = set"; }; then $as_echo_n "(cached) " >&6 else if test "$cross_compiling" = yes; then # Depending upon the size, compute the lo and hi bounds. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* BSD/OS 4.0.1 has a bug: , and must be included before . */ #include #include #if HAVE_WCHAR_H # include # include # include #endif #include int main () { static int test_array [1 - 2 * !((sizeof ($gltype) * CHAR_BIT) >= 0)]; test_array [0] = 0 ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_lo=0 ac_mid=0 while :; do cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* BSD/OS 4.0.1 has a bug: , and must be included before . */ #include #include #if HAVE_WCHAR_H # include # include # include #endif #include int main () { static int test_array [1 - 2 * !((sizeof ($gltype) * CHAR_BIT) <= $ac_mid)]; test_array [0] = 0 ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_hi=$ac_mid; break else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_lo=`expr $ac_mid + 1` if test $ac_lo -le $ac_mid; then ac_lo= ac_hi= break fi ac_mid=`expr 2 '*' $ac_mid + 1` fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext done else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* BSD/OS 4.0.1 has a bug: , and must be included before . */ #include #include #if HAVE_WCHAR_H # include # include # include #endif #include int main () { static int test_array [1 - 2 * !((sizeof ($gltype) * CHAR_BIT) < 0)]; test_array [0] = 0 ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_hi=-1 ac_mid=-1 while :; do cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* BSD/OS 4.0.1 has a bug: , and must be included before . */ #include #include #if HAVE_WCHAR_H # include # include # include #endif #include int main () { static int test_array [1 - 2 * !((sizeof ($gltype) * CHAR_BIT) >= $ac_mid)]; test_array [0] = 0 ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_lo=$ac_mid; break else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_hi=`expr '(' $ac_mid ')' - 1` if test $ac_mid -le $ac_hi; then ac_lo= ac_hi= break fi ac_mid=`expr 2 '*' $ac_mid` fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext done else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_lo= ac_hi= fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext # Binary search between lo and hi bounds. while test "x$ac_lo" != "x$ac_hi"; do ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo` cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* BSD/OS 4.0.1 has a bug: , and must be included before . */ #include #include #if HAVE_WCHAR_H # include # include # include #endif #include int main () { static int test_array [1 - 2 * !((sizeof ($gltype) * CHAR_BIT) <= $ac_mid)]; test_array [0] = 0 ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_hi=$ac_mid else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_lo=`expr '(' $ac_mid ')' + 1` fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext done case $ac_lo in ?*) result=$ac_lo;; '') result=unknown ;; esac else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* BSD/OS 4.0.1 has a bug: , and must be included before . */ #include #include #if HAVE_WCHAR_H # include # include # include #endif #include static long int longval () { return sizeof ($gltype) * CHAR_BIT; } static unsigned long int ulongval () { return sizeof ($gltype) * CHAR_BIT; } #include #include int main () { FILE *f = fopen ("conftest.val", "w"); if (! f) return 1; if ((sizeof ($gltype) * CHAR_BIT) < 0) { long int i = longval (); if (i != (sizeof ($gltype) * CHAR_BIT)) return 1; fprintf (f, "%ld", i); } else { unsigned long int i = ulongval (); if (i != (sizeof ($gltype) * CHAR_BIT)) return 1; fprintf (f, "%lu", i); } /* Do not output a trailing newline, as this causes \r\n confusion on some platforms. */ return ferror (f) || fclose (f) != 0; ; return 0; } _ACEOF rm -f conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' { (case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_try") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then result=`cat conftest.val` else $as_echo "$as_me: program exited with status $ac_status" >&5 $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) result=unknown fi rm -rf conftest.dSYM rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi rm -f conftest.val eval gl_cv_bitsizeof_${gltype}=\$result fi ac_res=`eval 'as_val=${'gl_cv_bitsizeof_${gltype}'} $as_echo "$as_val"'` { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } eval result=\$gl_cv_bitsizeof_${gltype} if test $result = unknown; then result=0 fi GLTYPE=`echo "$gltype" | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'` cat >>confdefs.h <<_ACEOF #define BITSIZEOF_${GLTYPE} $result _ACEOF eval BITSIZEOF_${GLTYPE}=\$result done for gltype in sig_atomic_t wchar_t wint_t ; do { $as_echo "$as_me:$LINENO: checking whether $gltype is signed" >&5 $as_echo_n "checking whether $gltype is signed... " >&6; } if { as_var=gl_cv_type_${gltype}_signed; eval "test \"\${$as_var+set}\" = set"; }; then $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* BSD/OS 4.0.1 has a bug: , and must be included before . */ #include #include #if HAVE_WCHAR_H # include # include # include #endif int verify[2 * (($gltype) -1 < ($gltype) 0) - 1]; int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then result=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 result=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext eval gl_cv_type_${gltype}_signed=\$result fi ac_res=`eval 'as_val=${'gl_cv_type_${gltype}_signed'} $as_echo "$as_val"'` { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } eval result=\$gl_cv_type_${gltype}_signed GLTYPE=`echo $gltype | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'` if test "$result" = yes; then cat >>confdefs.h <<_ACEOF #define HAVE_SIGNED_${GLTYPE} 1 _ACEOF eval HAVE_SIGNED_${GLTYPE}=1 else eval HAVE_SIGNED_${GLTYPE}=0 fi done gl_cv_type_ptrdiff_t_signed=yes gl_cv_type_size_t_signed=no if test $APPLE_UNIVERSAL_BUILD = 0; then for gltype in ptrdiff_t size_t ; do { $as_echo "$as_me:$LINENO: checking for $gltype integer literal suffix" >&5 $as_echo_n "checking for $gltype integer literal suffix... " >&6; } if { as_var=gl_cv_type_${gltype}_suffix; eval "test \"\${$as_var+set}\" = set"; }; then $as_echo_n "(cached) " >&6 else eval gl_cv_type_${gltype}_suffix=no eval result=\$gl_cv_type_${gltype}_signed if test "$result" = yes; then glsufu= else glsufu=u fi for glsuf in "$glsufu" ${glsufu}l ${glsufu}ll ${glsufu}i64; do case $glsuf in '') gltype1='int';; l) gltype1='long int';; ll) gltype1='long long int';; i64) gltype1='__int64';; u) gltype1='unsigned int';; ul) gltype1='unsigned long int';; ull) gltype1='unsigned long long int';; ui64)gltype1='unsigned __int64';; esac cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* BSD/OS 4.0.1 has a bug: , and must be included before . */ #include #include #if HAVE_WCHAR_H # include # include # include #endif extern $gltype foo; extern $gltype1 foo; int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then eval gl_cv_type_${gltype}_suffix=\$glsuf else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext eval result=\$gl_cv_type_${gltype}_suffix test "$result" != no && break done fi ac_res=`eval 'as_val=${'gl_cv_type_${gltype}_suffix'} $as_echo "$as_val"'` { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } GLTYPE=`echo $gltype | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'` eval result=\$gl_cv_type_${gltype}_suffix test "$result" = no && result= eval ${GLTYPE}_SUFFIX=\$result cat >>confdefs.h <<_ACEOF #define ${GLTYPE}_SUFFIX $result _ACEOF done fi for gltype in sig_atomic_t wchar_t wint_t ; do { $as_echo "$as_me:$LINENO: checking for $gltype integer literal suffix" >&5 $as_echo_n "checking for $gltype integer literal suffix... " >&6; } if { as_var=gl_cv_type_${gltype}_suffix; eval "test \"\${$as_var+set}\" = set"; }; then $as_echo_n "(cached) " >&6 else eval gl_cv_type_${gltype}_suffix=no eval result=\$gl_cv_type_${gltype}_signed if test "$result" = yes; then glsufu= else glsufu=u fi for glsuf in "$glsufu" ${glsufu}l ${glsufu}ll ${glsufu}i64; do case $glsuf in '') gltype1='int';; l) gltype1='long int';; ll) gltype1='long long int';; i64) gltype1='__int64';; u) gltype1='unsigned int';; ul) gltype1='unsigned long int';; ull) gltype1='unsigned long long int';; ui64)gltype1='unsigned __int64';; esac cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* BSD/OS 4.0.1 has a bug: , and must be included before . */ #include #include #if HAVE_WCHAR_H # include # include # include #endif extern $gltype foo; extern $gltype1 foo; int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then eval gl_cv_type_${gltype}_suffix=\$glsuf else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext eval result=\$gl_cv_type_${gltype}_suffix test "$result" != no && break done fi ac_res=`eval 'as_val=${'gl_cv_type_${gltype}_suffix'} $as_echo "$as_val"'` { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } GLTYPE=`echo $gltype | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'` eval result=\$gl_cv_type_${gltype}_suffix test "$result" = no && result= eval ${GLTYPE}_SUFFIX=\$result cat >>confdefs.h <<_ACEOF #define ${GLTYPE}_SUFFIX $result _ACEOF done STDINT_H=stdint.h fi : if test $gl_cv_have_include_next = yes; then gl_cv_next_stdio_h='<'stdio.h'>' else { $as_echo "$as_me:$LINENO: checking absolute name of " >&5 $as_echo_n "checking absolute name of ... " >&6; } if test "${gl_cv_next_stdio_h+set}" = set; then $as_echo_n "(cached) " >&6 else if test $ac_cv_header_stdio_h = yes; then cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF case "$host_os" in aix*) gl_absname_cpp="$ac_cpp -C" ;; *) gl_absname_cpp="$ac_cpp" ;; esac gl_cv_next_stdio_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 | sed -n '\#/stdio.h#{ s#.*"\(.*/stdio.h\)".*#\1# s#^/[^/]#//&# p q }'`'"' else gl_cv_next_stdio_h='<'stdio.h'>' fi fi { $as_echo "$as_me:$LINENO: result: $gl_cv_next_stdio_h" >&5 $as_echo "$gl_cv_next_stdio_h" >&6; } fi NEXT_STDIO_H=$gl_cv_next_stdio_h if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next' gl_next_as_first_directive='<'stdio.h'>' else # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include' gl_next_as_first_directive=$gl_cv_next_stdio_h fi NEXT_AS_FIRST_DIRECTIVE_STDIO_H=$gl_next_as_first_directive GNULIB_FPRINTF=1 GNULIB_PRINTF=1 GNULIB_VFPRINTF=1 GNULIB_VPRINTF=1 GNULIB_FPUTC=1 GNULIB_PUTC=1 GNULIB_PUTCHAR=1 GNULIB_FPUTS=1 GNULIB_PUTS=1 GNULIB_FWRITE=1 for gl_func in dprintf fpurge fseeko ftello getdelim getline popen renameat snprintf vdprintf vsnprintf; do as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh` { $as_echo "$as_me:$LINENO: checking whether $gl_func is declared without a macro" >&5 $as_echo_n "checking whether $gl_func is declared without a macro... " >&6; } if { as_var=$as_gl_Symbol; eval "test \"\${$as_var+set}\" = set"; }; then $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include int main () { #undef $gl_func (void) $gl_func; ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then eval "$as_gl_Symbol=yes" else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 eval "$as_gl_Symbol=no" fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi ac_res=`eval 'as_val=${'$as_gl_Symbol'} $as_echo "$as_val"'` { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } as_val=`eval 'as_val=${'$as_gl_Symbol'} $as_echo "$as_val"'` if test "x$as_val" = x""yes; then cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1 _ACEOF eval ac_cv_have_decl_$gl_func=yes fi done : if test $gl_cv_have_include_next = yes; then gl_cv_next_stdlib_h='<'stdlib.h'>' else { $as_echo "$as_me:$LINENO: checking absolute name of " >&5 $as_echo_n "checking absolute name of ... " >&6; } if test "${gl_cv_next_stdlib_h+set}" = set; then $as_echo_n "(cached) " >&6 else if test $ac_cv_header_stdlib_h = yes; then cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF case "$host_os" in aix*) gl_absname_cpp="$ac_cpp -C" ;; *) gl_absname_cpp="$ac_cpp" ;; esac gl_cv_next_stdlib_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 | sed -n '\#/stdlib.h#{ s#.*"\(.*/stdlib.h\)".*#\1# s#^/[^/]#//&# p q }'`'"' else gl_cv_next_stdlib_h='<'stdlib.h'>' fi fi { $as_echo "$as_me:$LINENO: result: $gl_cv_next_stdlib_h" >&5 $as_echo "$gl_cv_next_stdlib_h" >&6; } fi NEXT_STDLIB_H=$gl_cv_next_stdlib_h if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next' gl_next_as_first_directive='<'stdlib.h'>' else # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include' gl_next_as_first_directive=$gl_cv_next_stdlib_h fi NEXT_AS_FIRST_DIRECTIVE_STDLIB_H=$gl_next_as_first_directive for ac_header in random.h do as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 $as_echo_n "checking for $ac_header... " >&6; } if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default #include <$ac_header> _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then eval "$as_ac_Header=yes" else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 eval "$as_ac_Header=no" fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi ac_res=`eval 'as_val=${'$as_ac_Header'} $as_echo "$as_val"'` { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } as_val=`eval 'as_val=${'$as_ac_Header'} $as_echo "$as_val"'` if test "x$as_val" = x""yes; then cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi done if test $ac_cv_header_random_h = yes; then HAVE_RANDOM_H=1 else HAVE_RANDOM_H=0 fi { $as_echo "$as_me:$LINENO: checking for struct random_data" >&5 $as_echo_n "checking for struct random_data... " >&6; } if test "${ac_cv_type_struct_random_data+set}" = set; then $as_echo_n "(cached) " >&6 else ac_cv_type_struct_random_data=no cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #if HAVE_RANDOM_H # include #endif int main () { if (sizeof (struct random_data)) return 0; ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #if HAVE_RANDOM_H # include #endif int main () { if (sizeof ((struct random_data))) return 0; ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then : else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_type_struct_random_data=yes fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:$LINENO: result: $ac_cv_type_struct_random_data" >&5 $as_echo "$ac_cv_type_struct_random_data" >&6; } if test "x$ac_cv_type_struct_random_data" = x""yes; then cat >>confdefs.h <<_ACEOF #define HAVE_STRUCT_RANDOM_DATA 1 _ACEOF else HAVE_STRUCT_RANDOM_DATA=0 fi for gl_func in atoll canonicalize_file_name getloadavg getsubopt mkdtemp mkostemp mkostemps mkstemp mkstemps random_r initstat_r srandom_r setstate_r realpath rpmatch setenv strtod strtoll strtoull unsetenv; do as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh` { $as_echo "$as_me:$LINENO: checking whether $gl_func is declared without a macro" >&5 $as_echo_n "checking whether $gl_func is declared without a macro... " >&6; } if { as_var=$as_gl_Symbol; eval "test \"\${$as_var+set}\" = set"; }; then $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #if HAVE_SYS_LOADAVG_H # include #endif #if HAVE_RANDOM_H # include #endif int main () { #undef $gl_func (void) $gl_func; ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then eval "$as_gl_Symbol=yes" else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 eval "$as_gl_Symbol=no" fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi ac_res=`eval 'as_val=${'$as_gl_Symbol'} $as_echo "$as_val"'` { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } as_val=`eval 'as_val=${'$as_gl_Symbol'} $as_echo "$as_val"'` if test "x$as_val" = x""yes; then cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1 _ACEOF eval ac_cv_have_decl_$gl_func=yes fi done for ac_func in strcasecmp do as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` { $as_echo "$as_me:$LINENO: checking for $ac_func" >&5 $as_echo_n "checking for $ac_func... " >&6; } if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Define $ac_func to an innocuous variant, in case declares $ac_func. For example, HP-UX 11i declares gettimeofday. */ #define $ac_func innocuous_$ac_func /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $ac_func (); below. Prefer to if __STDC__ is defined, since exists even on freestanding compilers. */ #ifdef __STDC__ # include #else # include #endif #undef $ac_func /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char $ac_func (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined __stub_$ac_func || defined __stub___$ac_func choke me #endif int main () { return $ac_func (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || $as_test_x conftest$ac_exeext }; then eval "$as_ac_var=yes" else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 eval "$as_ac_var=no" fi rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi ac_res=`eval 'as_val=${'$as_ac_var'} $as_echo "$as_val"'` { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } as_val=`eval 'as_val=${'$as_ac_var'} $as_echo "$as_val"'` if test "x$as_val" = x""yes; then cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF else gl_LIBOBJS="$gl_LIBOBJS $ac_func.$ac_objext" fi done if test $ac_cv_func_strcasecmp = no; then HAVE_STRCASECMP=0 : fi for ac_func in strncasecmp do as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` { $as_echo "$as_me:$LINENO: checking for $ac_func" >&5 $as_echo_n "checking for $ac_func... " >&6; } if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Define $ac_func to an innocuous variant, in case declares $ac_func. For example, HP-UX 11i declares gettimeofday. */ #define $ac_func innocuous_$ac_func /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $ac_func (); below. Prefer to if __STDC__ is defined, since exists even on freestanding compilers. */ #ifdef __STDC__ # include #else # include #endif #undef $ac_func /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char $ac_func (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined __stub_$ac_func || defined __stub___$ac_func choke me #endif int main () { return $ac_func (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || $as_test_x conftest$ac_exeext }; then eval "$as_ac_var=yes" else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 eval "$as_ac_var=no" fi rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi ac_res=`eval 'as_val=${'$as_ac_var'} $as_echo "$as_val"'` { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } as_val=`eval 'as_val=${'$as_ac_var'} $as_echo "$as_val"'` if test "x$as_val" = x""yes; then cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF else gl_LIBOBJS="$gl_LIBOBJS $ac_func.$ac_objext" fi done if test $ac_cv_func_strncasecmp = no; then : fi { $as_echo "$as_me:$LINENO: checking whether strncasecmp is declared" >&5 $as_echo_n "checking whether strncasecmp is declared... " >&6; } if test "${ac_cv_have_decl_strncasecmp+set}" = set; then $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default int main () { #ifndef strncasecmp (void) strncasecmp; #endif ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_cv_have_decl_strncasecmp=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_have_decl_strncasecmp=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:$LINENO: result: $ac_cv_have_decl_strncasecmp" >&5 $as_echo "$ac_cv_have_decl_strncasecmp" >&6; } if test "x$ac_cv_have_decl_strncasecmp" = x""yes; then cat >>confdefs.h <<_ACEOF #define HAVE_DECL_STRNCASECMP 1 _ACEOF else cat >>confdefs.h <<_ACEOF #define HAVE_DECL_STRNCASECMP 0 _ACEOF fi if test $ac_cv_have_decl_strncasecmp = no; then HAVE_DECL_STRNCASECMP=0 fi if test $HAVE_STRCASESTR = 1 && test $REPLACE_STRCASESTR = 0; then { $as_echo "$as_me:$LINENO: checking whether strcasestr works in linear time" >&5 $as_echo_n "checking whether strcasestr works in linear time... " >&6; } if test "${gl_cv_func_strcasestr_linear+set}" = set; then $as_echo_n "(cached) " >&6 else if test "$cross_compiling" = yes; then cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #ifdef __GNU_LIBRARY__ #if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 9) || (__GLIBC__ > 2) Lucky user #endif #endif #ifdef __CYGWIN__ #include #if CYGWIN_VERSION_DLL_MAJOR >= 1007 Lucky user #endif #endif _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "Lucky user" >/dev/null 2>&1; then gl_cv_func_strcasestr_linear=yes else gl_cv_func_strcasestr_linear="guessing no" fi rm -f conftest* else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include /* for signal */ #include /* for memmem */ #include /* for malloc */ #include /* for alarm */ int main () { size_t m = 1000000; char *haystack = (char *) malloc (2 * m + 2); char *needle = (char *) malloc (m + 2); void *result = 0; /* Failure to compile this test due to missing alarm is okay, since all such platforms (mingw) also lack strcasestr. */ signal (SIGALRM, SIG_DFL); alarm (5); /* Check for quadratic performance. */ if (haystack && needle) { memset (haystack, 'A', 2 * m); haystack[2 * m] = 'B'; haystack[2 * m + 1] = 0; memset (needle, 'A', m); needle[m] = 'B'; needle[m + 1] = 0; result = strcasestr (haystack, needle); } return !result; ; return 0; } _ACEOF rm -f conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' { (case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_try") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then gl_cv_func_strcasestr_linear=yes else $as_echo "$as_me: program exited with status $ac_status" >&5 $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) gl_cv_func_strcasestr_linear=no fi rm -rf conftest.dSYM rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi fi { $as_echo "$as_me:$LINENO: result: $gl_cv_func_strcasestr_linear" >&5 $as_echo "$gl_cv_func_strcasestr_linear" >&6; } if test "$gl_cv_func_strcasestr_linear" != yes; then REPLACE_STRCASESTR=1 gl_LIBOBJS="$gl_LIBOBJS strcasestr.$ac_objext" : fi fi for ac_func in strcasestr do as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` { $as_echo "$as_me:$LINENO: checking for $ac_func" >&5 $as_echo_n "checking for $ac_func... " >&6; } if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Define $ac_func to an innocuous variant, in case declares $ac_func. For example, HP-UX 11i declares gettimeofday. */ #define $ac_func innocuous_$ac_func /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $ac_func (); below. Prefer to if __STDC__ is defined, since exists even on freestanding compilers. */ #ifdef __STDC__ # include #else # include #endif #undef $ac_func /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char $ac_func (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined __stub_$ac_func || defined __stub___$ac_func choke me #endif int main () { return $ac_func (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || $as_test_x conftest$ac_exeext }; then eval "$as_ac_var=yes" else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 eval "$as_ac_var=no" fi rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi ac_res=`eval 'as_val=${'$as_ac_var'} $as_echo "$as_val"'` { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } as_val=`eval 'as_val=${'$as_ac_var'} $as_echo "$as_val"'` if test "x$as_val" = x""yes; then cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF fi done if test $ac_cv_func_strcasestr = no; then HAVE_STRCASESTR=0 else if test "$gl_cv_func_memchr_works" != yes; then REPLACE_STRCASESTR=1 fi fi if test $HAVE_STRCASESTR = 0 || test $REPLACE_STRCASESTR = 1; then gl_LIBOBJS="$gl_LIBOBJS strcasestr.$ac_objext" : fi GNULIB_STRCASESTR=1 for ac_func in strdup do as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` { $as_echo "$as_me:$LINENO: checking for $ac_func" >&5 $as_echo_n "checking for $ac_func... " >&6; } if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Define $ac_func to an innocuous variant, in case declares $ac_func. For example, HP-UX 11i declares gettimeofday. */ #define $ac_func innocuous_$ac_func /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $ac_func (); below. Prefer to if __STDC__ is defined, since exists even on freestanding compilers. */ #ifdef __STDC__ # include #else # include #endif #undef $ac_func /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char $ac_func (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined __stub_$ac_func || defined __stub___$ac_func choke me #endif int main () { return $ac_func (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || $as_test_x conftest$ac_exeext }; then eval "$as_ac_var=yes" else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 eval "$as_ac_var=no" fi rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi ac_res=`eval 'as_val=${'$as_ac_var'} $as_echo "$as_val"'` { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } as_val=`eval 'as_val=${'$as_ac_var'} $as_echo "$as_val"'` if test "x$as_val" = x""yes; then cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF else gl_LIBOBJS="$gl_LIBOBJS $ac_func.$ac_objext" fi done : if test $ac_cv_have_decl_strdup = no; then HAVE_DECL_STRDUP=0 fi : GNULIB_STRDUP=1 if test $gl_cv_func_malloc_posix != yes; then REPLACE_STRDUP=1 gl_LIBOBJS="$gl_LIBOBJS strdup.$ac_objext" else for ac_func in strdup do as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` { $as_echo "$as_me:$LINENO: checking for $ac_func" >&5 $as_echo_n "checking for $ac_func... " >&6; } if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Define $ac_func to an innocuous variant, in case declares $ac_func. For example, HP-UX 11i declares gettimeofday. */ #define $ac_func innocuous_$ac_func /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $ac_func (); below. Prefer to if __STDC__ is defined, since exists even on freestanding compilers. */ #ifdef __STDC__ # include #else # include #endif #undef $ac_func /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char $ac_func (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined __stub_$ac_func || defined __stub___$ac_func choke me #endif int main () { return $ac_func (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || $as_test_x conftest$ac_exeext }; then eval "$as_ac_var=yes" else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 eval "$as_ac_var=no" fi rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi ac_res=`eval 'as_val=${'$as_ac_var'} $as_echo "$as_val"'` { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } as_val=`eval 'as_val=${'$as_ac_var'} $as_echo "$as_val"'` if test "x$as_val" = x""yes; then cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF else gl_LIBOBJS="$gl_LIBOBJS $ac_func.$ac_objext" fi done fi : if test $ac_cv_have_decl_strdup = no; then HAVE_DECL_STRDUP=0 fi : GNULIB_STRDUP=1 if test $REPLACE_STRERROR = 1; then gl_LIBOBJS="$gl_LIBOBJS strerror.$ac_objext" cat >>confdefs.h <<_ACEOF #define REPLACE_STRERROR $REPLACE_STRERROR _ACEOF fi GNULIB_STRERROR=1 : : if test $ac_cv_have_decl_strndup = no; then HAVE_DECL_STRNDUP=0 fi if test $ac_cv_func_strndup = yes; then # AIX 4.3.3, AIX 5.1 have a function that fails to add the terminating '\0'. { $as_echo "$as_me:$LINENO: checking for working strndup" >&5 $as_echo_n "checking for working strndup... " >&6; } if test "${gl_cv_func_strndup_works+set}" = set; then $as_echo_n "(cached) " >&6 else if test "$cross_compiling" = yes; then case $host_os in aix*) gl_cv_func_strndup_works="guessing no";; *) gl_cv_func_strndup_works="guessing yes";; esac else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #include int main () { #ifndef HAVE_DECL_STRNDUP extern char *strndup (const char *, size_t); #endif char *s; s = strndup ("some longer string", 15); free (s); s = strndup ("shorter string", 13); return s[13] != '\0'; ; return 0; } _ACEOF rm -f conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' { (case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_try") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then gl_cv_func_strndup_works=yes else $as_echo "$as_me: program exited with status $ac_status" >&5 $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) gl_cv_func_strndup_works=no fi rm -rf conftest.dSYM rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi fi { $as_echo "$as_me:$LINENO: result: $gl_cv_func_strndup_works" >&5 $as_echo "$gl_cv_func_strndup_works" >&6; } case $gl_cv_func_strndup_works in *no) REPLACE_STRNDUP=1 gl_LIBOBJS="$gl_LIBOBJS strndup.$ac_objext" ;; esac else gl_LIBOBJS="$gl_LIBOBJS strndup.$ac_objext" fi GNULIB_STRNDUP=1 : if test $ac_cv_have_decl_strnlen = no; then HAVE_DECL_STRNLEN=0 fi { $as_echo "$as_me:$LINENO: checking for working strnlen" >&5 $as_echo_n "checking for working strnlen... " >&6; } if test "${ac_cv_func_strnlen_working+set}" = set; then $as_echo_n "(cached) " >&6 else if test "$cross_compiling" = yes; then ac_cv_func_strnlen_working=no else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default int main () { #define S "foobar" #define S_LEN (sizeof S - 1) /* At least one implementation is buggy: that of AIX 4.3 would give strnlen (S, 1) == 3. */ int i; for (i = 0; i < S_LEN + 1; ++i) { int expected = i <= S_LEN ? i : S_LEN; if (strnlen (S, i) != expected) return 1; } return 0; ; return 0; } _ACEOF rm -f conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' { (case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_try") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_func_strnlen_working=yes else $as_echo "$as_me: program exited with status $ac_status" >&5 $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) ac_cv_func_strnlen_working=no fi rm -rf conftest.dSYM rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi fi { $as_echo "$as_me:$LINENO: result: $ac_cv_func_strnlen_working" >&5 $as_echo "$ac_cv_func_strnlen_working" >&6; } test $ac_cv_func_strnlen_working = no && gl_LIBOBJS="$gl_LIBOBJS strnlen.$ac_objext" if test $ac_cv_func_strnlen_working = no; then # This is necessary because automake-1.6.1 doesn't understand # that the above use of AC_FUNC_STRNLEN means we may have to use # lib/strnlen.c. #AC_LIBOBJ([strnlen]) cat >>confdefs.h <<\_ACEOF #define strnlen rpl_strnlen _ACEOF : fi GNULIB_STRNLEN=1 for ac_func in strptime do as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` { $as_echo "$as_me:$LINENO: checking for $ac_func" >&5 $as_echo_n "checking for $ac_func... " >&6; } if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Define $ac_func to an innocuous variant, in case declares $ac_func. For example, HP-UX 11i declares gettimeofday. */ #define $ac_func innocuous_$ac_func /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $ac_func (); below. Prefer to if __STDC__ is defined, since exists even on freestanding compilers. */ #ifdef __STDC__ # include #else # include #endif #undef $ac_func /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char $ac_func (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined __stub_$ac_func || defined __stub___$ac_func choke me #endif int main () { return $ac_func (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || $as_test_x conftest$ac_exeext }; then eval "$as_ac_var=yes" else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 eval "$as_ac_var=no" fi rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi ac_res=`eval 'as_val=${'$as_ac_var'} $as_echo "$as_val"'` { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } as_val=`eval 'as_val=${'$as_ac_var'} $as_echo "$as_val"'` if test "x$as_val" = x""yes; then cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF else gl_LIBOBJS="$gl_LIBOBJS $ac_func.$ac_objext" fi done if test $ac_cv_func_strptime = yes; then REPLACE_STRPTIME=0 else REPLACE_STRPTIME=1 fi for ac_func in strsep do as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` { $as_echo "$as_me:$LINENO: checking for $ac_func" >&5 $as_echo_n "checking for $ac_func... " >&6; } if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Define $ac_func to an innocuous variant, in case declares $ac_func. For example, HP-UX 11i declares gettimeofday. */ #define $ac_func innocuous_$ac_func /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $ac_func (); below. Prefer to if __STDC__ is defined, since exists even on freestanding compilers. */ #ifdef __STDC__ # include #else # include #endif #undef $ac_func /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char $ac_func (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined __stub_$ac_func || defined __stub___$ac_func choke me #endif int main () { return $ac_func (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || $as_test_x conftest$ac_exeext }; then eval "$as_ac_var=yes" else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 eval "$as_ac_var=no" fi rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi ac_res=`eval 'as_val=${'$as_ac_var'} $as_echo "$as_val"'` { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } as_val=`eval 'as_val=${'$as_ac_var'} $as_echo "$as_val"'` if test "x$as_val" = x""yes; then cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF else gl_LIBOBJS="$gl_LIBOBJS $ac_func.$ac_objext" fi done if test $ac_cv_func_strsep = no; then HAVE_STRSEP=0 : fi GNULIB_STRSEP=1 : if test $ac_cv_header_sys_ioctl_h = yes; then HAVE_SYS_IOCTL_H=1 { $as_echo "$as_me:$LINENO: checking whether declares ioctl" >&5 $as_echo_n "checking whether declares ioctl... " >&6; } if test "${gl_cv_decl_ioctl_in_sys_ioctl_h+set}" = set; then $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include int main () { (void) ioctl; ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then gl_cv_decl_ioctl_in_sys_ioctl_h=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 gl_cv_decl_ioctl_in_sys_ioctl_h=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:$LINENO: result: $gl_cv_decl_ioctl_in_sys_ioctl_h" >&5 $as_echo "$gl_cv_decl_ioctl_in_sys_ioctl_h" >&6; } else HAVE_SYS_IOCTL_H=0 fi : if test $gl_cv_have_include_next = yes; then gl_cv_next_sys_ioctl_h='<'sys/ioctl.h'>' else { $as_echo "$as_me:$LINENO: checking absolute name of " >&5 $as_echo_n "checking absolute name of ... " >&6; } if test "${gl_cv_next_sys_ioctl_h+set}" = set; then $as_echo_n "(cached) " >&6 else if test $ac_cv_header_sys_ioctl_h = yes; then cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF case "$host_os" in aix*) gl_absname_cpp="$ac_cpp -C" ;; *) gl_absname_cpp="$ac_cpp" ;; esac gl_cv_next_sys_ioctl_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 | sed -n '\#/sys/ioctl.h#{ s#.*"\(.*/sys/ioctl.h\)".*#\1# s#^/[^/]#//&# p q }'`'"' else gl_cv_next_sys_ioctl_h='<'sys/ioctl.h'>' fi fi { $as_echo "$as_me:$LINENO: result: $gl_cv_next_sys_ioctl_h" >&5 $as_echo "$gl_cv_next_sys_ioctl_h" >&6; } fi NEXT_SYS_IOCTL_H=$gl_cv_next_sys_ioctl_h if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next' gl_next_as_first_directive='<'sys/ioctl.h'>' else # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include' gl_next_as_first_directive=$gl_cv_next_sys_ioctl_h fi NEXT_AS_FIRST_DIRECTIVE_SYS_IOCTL_H=$gl_next_as_first_directive for gl_func in ioctl; do as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh` { $as_echo "$as_me:$LINENO: checking whether $gl_func is declared without a macro" >&5 $as_echo_n "checking whether $gl_func is declared without a macro... " >&6; } if { as_var=$as_gl_Symbol; eval "test \"\${$as_var+set}\" = set"; }; then $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include /* Some platforms declare ioctl in the wrong header. */ #ifndef __GLIBC__ # include #endif int main () { #undef $gl_func (void) $gl_func; ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then eval "$as_gl_Symbol=yes" else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 eval "$as_gl_Symbol=no" fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi ac_res=`eval 'as_val=${'$as_gl_Symbol'} $as_echo "$as_val"'` { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } as_val=`eval 'as_val=${'$as_gl_Symbol'} $as_echo "$as_val"'` if test "x$as_val" = x""yes; then cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1 _ACEOF eval ac_cv_have_decl_$gl_func=yes fi done { $as_echo "$as_me:$LINENO: checking for a thread-safe mkdir -p" >&5 $as_echo_n "checking for a thread-safe mkdir -p... " >&6; } if test -z "$MKDIR_P"; then if test "${ac_cv_path_mkdir+set}" = set; then $as_echo_n "(cached) " >&6 else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_prog in mkdir gmkdir; do for ac_exec_ext in '' $ac_executable_extensions; do { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; } || continue case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #( 'mkdir (GNU coreutils) '* | \ 'mkdir (coreutils) '* | \ 'mkdir (fileutils) '4.1*) ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext break 3;; esac done done done IFS=$as_save_IFS fi if test "${ac_cv_path_mkdir+set}" = set; then MKDIR_P="$ac_cv_path_mkdir -p" else # As a last resort, use the slow shell script. Don't cache a # value for MKDIR_P within a source directory, because that will # break other packages using the cache if that directory is # removed, or if the value is a relative name. test -d ./--version && rmdir ./--version MKDIR_P="$ac_install_sh -d" fi fi { $as_echo "$as_me:$LINENO: result: $MKDIR_P" >&5 $as_echo "$MKDIR_P" >&6; } { $as_echo "$as_me:$LINENO: checking whether is self-contained" >&5 $as_echo_n "checking whether is self-contained... " >&6; } if test "${gl_cv_header_sys_select_h_selfcontained+set}" = set; then $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include int main () { struct timeval b; ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then gl_cv_header_sys_select_h_selfcontained=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 gl_cv_header_sys_select_h_selfcontained=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext if test $gl_cv_header_sys_select_h_selfcontained = yes; then cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include int main () { int memset; int bzero; ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include int main () { #undef memset #define memset nonexistent_memset extern void *memset (void *, int, unsigned long); #undef bzero #define bzero nonexistent_bzero extern void bzero (void *, unsigned long); fd_set fds; FD_ZERO (&fds); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || $as_test_x conftest$ac_exeext }; then : else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 gl_cv_header_sys_select_h_selfcontained=no fi rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi fi { $as_echo "$as_me:$LINENO: result: $gl_cv_header_sys_select_h_selfcontained" >&5 $as_echo "$gl_cv_header_sys_select_h_selfcontained" >&6; } : : if test $gl_cv_have_include_next = yes; then gl_cv_next_sys_select_h='<'sys/select.h'>' else { $as_echo "$as_me:$LINENO: checking absolute name of " >&5 $as_echo_n "checking absolute name of ... " >&6; } if test "${gl_cv_next_sys_select_h+set}" = set; then $as_echo_n "(cached) " >&6 else if test $ac_cv_header_sys_select_h = yes; then cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF case "$host_os" in aix*) gl_absname_cpp="$ac_cpp -C" ;; *) gl_absname_cpp="$ac_cpp" ;; esac gl_cv_next_sys_select_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 | sed -n '\#/sys/select.h#{ s#.*"\(.*/sys/select.h\)".*#\1# s#^/[^/]#//&# p q }'`'"' else gl_cv_next_sys_select_h='<'sys/select.h'>' fi fi { $as_echo "$as_me:$LINENO: result: $gl_cv_next_sys_select_h" >&5 $as_echo "$gl_cv_next_sys_select_h" >&6; } fi NEXT_SYS_SELECT_H=$gl_cv_next_sys_select_h if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next' gl_next_as_first_directive='<'sys/select.h'>' else # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include' gl_next_as_first_directive=$gl_cv_next_sys_select_h fi NEXT_AS_FIRST_DIRECTIVE_SYS_SELECT_H=$gl_next_as_first_directive if test $ac_cv_header_sys_select_h = yes; then HAVE_SYS_SELECT_H=1 else HAVE_SYS_SELECT_H=0 fi if test $gl_cv_header_sys_select_h_selfcontained != yes; then : if test $ac_cv_header_sys_socket_h != yes; then for ac_header in winsock2.h do as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 $as_echo_n "checking for $ac_header... " >&6; } if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then $as_echo_n "(cached) " >&6 fi ac_res=`eval 'as_val=${'$as_ac_Header'} $as_echo "$as_val"'` { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } else # Is the header compilable? { $as_echo "$as_me:$LINENO: checking $ac_header usability" >&5 $as_echo_n "checking $ac_header usability... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default #include <$ac_header> _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_header_compiler=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_compiler=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext { $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 $as_echo "$ac_header_compiler" >&6; } # Is the header present? { $as_echo "$as_me:$LINENO: checking $ac_header presence" >&5 $as_echo_n "checking $ac_header presence... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include <$ac_header> _ACEOF if { (ac_try="$ac_cpp conftest.$ac_ext" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null && { test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || test ! -s conftest.err }; then ac_header_preproc=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi rm -f conftest.err conftest.$ac_ext { $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 $as_echo "$ac_header_preproc" >&6; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in yes:no: ) { $as_echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 $as_echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 $as_echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} ac_header_preproc=yes ;; no:yes:* ) { $as_echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 $as_echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} { $as_echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 $as_echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} { $as_echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 $as_echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} { $as_echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 $as_echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 $as_echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} { $as_echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 $as_echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} ;; esac { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 $as_echo_n "checking for $ac_header... " >&6; } if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then $as_echo_n "(cached) " >&6 else eval "$as_ac_Header=\$ac_header_preproc" fi ac_res=`eval 'as_val=${'$as_ac_Header'} $as_echo "$as_val"'` { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } fi as_val=`eval 'as_val=${'$as_ac_Header'} $as_echo "$as_val"'` if test "x$as_val" = x""yes; then cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi done fi if test "$ac_cv_header_winsock2_h" = yes; then HAVE_WINSOCK2_H=1 UNISTD_H_HAVE_WINSOCK2_H=1 SYS_IOCTL_H_HAVE_WINSOCK2_H=1 else HAVE_WINSOCK2_H=0 fi fi for gl_func in select; do as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh` { $as_echo "$as_me:$LINENO: checking whether $gl_func is declared without a macro" >&5 $as_echo_n "checking whether $gl_func is declared without a macro... " >&6; } if { as_var=$as_gl_Symbol; eval "test \"\${$as_var+set}\" = set"; }; then $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Some systems require prerequisite headers. */ #include #if !defined __GLIBC__ && HAVE_SYS_TIME_H # include #endif #include int main () { #undef $gl_func (void) $gl_func; ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then eval "$as_gl_Symbol=yes" else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 eval "$as_gl_Symbol=no" fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi ac_res=`eval 'as_val=${'$as_gl_Symbol'} $as_echo "$as_val"'` { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } as_val=`eval 'as_val=${'$as_gl_Symbol'} $as_echo "$as_val"'` if test "x$as_val" = x""yes; then cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1 _ACEOF eval ac_cv_have_decl_$gl_func=yes fi done { $as_echo "$as_me:$LINENO: checking for a thread-safe mkdir -p" >&5 $as_echo_n "checking for a thread-safe mkdir -p... " >&6; } if test -z "$MKDIR_P"; then if test "${ac_cv_path_mkdir+set}" = set; then $as_echo_n "(cached) " >&6 else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_prog in mkdir gmkdir; do for ac_exec_ext in '' $ac_executable_extensions; do { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; } || continue case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #( 'mkdir (GNU coreutils) '* | \ 'mkdir (coreutils) '* | \ 'mkdir (fileutils) '4.1*) ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext break 3;; esac done done done IFS=$as_save_IFS fi if test "${ac_cv_path_mkdir+set}" = set; then MKDIR_P="$ac_cv_path_mkdir -p" else # As a last resort, use the slow shell script. Don't cache a # value for MKDIR_P within a source directory, because that will # break other packages using the cache if that directory is # removed, or if the value is a relative name. test -d ./--version && rmdir ./--version MKDIR_P="$ac_install_sh -d" fi fi { $as_echo "$as_me:$LINENO: result: $MKDIR_P" >&5 $as_echo "$MKDIR_P" >&6; } { $as_echo "$as_me:$LINENO: checking whether is self-contained" >&5 $as_echo_n "checking whether is self-contained... " >&6; } if test "${gl_cv_header_sys_socket_h_selfcontained+set}" = set; then $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then gl_cv_header_sys_socket_h_selfcontained=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 gl_cv_header_sys_socket_h_selfcontained=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:$LINENO: result: $gl_cv_header_sys_socket_h_selfcontained" >&5 $as_echo "$gl_cv_header_sys_socket_h_selfcontained" >&6; } if test $gl_cv_header_sys_socket_h_selfcontained = yes; then SYS_SOCKET_H='' for ac_func in shutdown do as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` { $as_echo "$as_me:$LINENO: checking for $ac_func" >&5 $as_echo_n "checking for $ac_func... " >&6; } if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Define $ac_func to an innocuous variant, in case declares $ac_func. For example, HP-UX 11i declares gettimeofday. */ #define $ac_func innocuous_$ac_func /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $ac_func (); below. Prefer to if __STDC__ is defined, since exists even on freestanding compilers. */ #ifdef __STDC__ # include #else # include #endif #undef $ac_func /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char $ac_func (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined __stub_$ac_func || defined __stub___$ac_func choke me #endif int main () { return $ac_func (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || $as_test_x conftest$ac_exeext }; then eval "$as_ac_var=yes" else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 eval "$as_ac_var=no" fi rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi ac_res=`eval 'as_val=${'$as_ac_var'} $as_echo "$as_val"'` { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } as_val=`eval 'as_val=${'$as_ac_var'} $as_echo "$as_val"'` if test "x$as_val" = x""yes; then cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF fi done if test $ac_cv_func_shutdown = yes; then { $as_echo "$as_me:$LINENO: checking whether defines the SHUT_* macros" >&5 $as_echo_n "checking whether defines the SHUT_* macros... " >&6; } if test "${gl_cv_header_sys_socket_h_shut+set}" = set; then $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include int main () { int a[] = { SHUT_RD, SHUT_WR, SHUT_RDWR }; ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then gl_cv_header_sys_socket_h_shut=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 gl_cv_header_sys_socket_h_shut=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:$LINENO: result: $gl_cv_header_sys_socket_h_shut" >&5 $as_echo "$gl_cv_header_sys_socket_h_shut" >&6; } if test $gl_cv_header_sys_socket_h_shut = no; then SYS_SOCKET_H='sys/socket.h' fi fi else SYS_SOCKET_H='sys/socket.h' fi # We need to check for ws2tcpip.h now. : if test $gl_cv_have_include_next = yes; then gl_cv_next_sys_socket_h='<'sys/socket.h'>' else { $as_echo "$as_me:$LINENO: checking absolute name of " >&5 $as_echo_n "checking absolute name of ... " >&6; } if test "${gl_cv_next_sys_socket_h+set}" = set; then $as_echo_n "(cached) " >&6 else if test $ac_cv_header_sys_socket_h = yes; then cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF case "$host_os" in aix*) gl_absname_cpp="$ac_cpp -C" ;; *) gl_absname_cpp="$ac_cpp" ;; esac gl_cv_next_sys_socket_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 | sed -n '\#/sys/socket.h#{ s#.*"\(.*/sys/socket.h\)".*#\1# s#^/[^/]#//&# p q }'`'"' else gl_cv_next_sys_socket_h='<'sys/socket.h'>' fi fi { $as_echo "$as_me:$LINENO: result: $gl_cv_next_sys_socket_h" >&5 $as_echo "$gl_cv_next_sys_socket_h" >&6; } fi NEXT_SYS_SOCKET_H=$gl_cv_next_sys_socket_h if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next' gl_next_as_first_directive='<'sys/socket.h'>' else # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include' gl_next_as_first_directive=$gl_cv_next_sys_socket_h fi NEXT_AS_FIRST_DIRECTIVE_SYS_SOCKET_H=$gl_next_as_first_directive if test $ac_cv_header_sys_socket_h = yes; then HAVE_SYS_SOCKET_H=1 HAVE_WS2TCPIP_H=0 else HAVE_SYS_SOCKET_H=0 for ac_header in ws2tcpip.h do as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 $as_echo_n "checking for $ac_header... " >&6; } if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then $as_echo_n "(cached) " >&6 fi ac_res=`eval 'as_val=${'$as_ac_Header'} $as_echo "$as_val"'` { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } else # Is the header compilable? { $as_echo "$as_me:$LINENO: checking $ac_header usability" >&5 $as_echo_n "checking $ac_header usability... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default #include <$ac_header> _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_header_compiler=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_compiler=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext { $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 $as_echo "$ac_header_compiler" >&6; } # Is the header present? { $as_echo "$as_me:$LINENO: checking $ac_header presence" >&5 $as_echo_n "checking $ac_header presence... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include <$ac_header> _ACEOF if { (ac_try="$ac_cpp conftest.$ac_ext" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null && { test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || test ! -s conftest.err }; then ac_header_preproc=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi rm -f conftest.err conftest.$ac_ext { $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 $as_echo "$ac_header_preproc" >&6; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in yes:no: ) { $as_echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 $as_echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 $as_echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} ac_header_preproc=yes ;; no:yes:* ) { $as_echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 $as_echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} { $as_echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 $as_echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} { $as_echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 $as_echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} { $as_echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 $as_echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 $as_echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} { $as_echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 $as_echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} ;; esac { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 $as_echo_n "checking for $ac_header... " >&6; } if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then $as_echo_n "(cached) " >&6 else eval "$as_ac_Header=\$ac_header_preproc" fi ac_res=`eval 'as_val=${'$as_ac_Header'} $as_echo "$as_val"'` { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } fi as_val=`eval 'as_val=${'$as_ac_Header'} $as_echo "$as_val"'` if test "x$as_val" = x""yes; then cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi done if test $ac_cv_header_ws2tcpip_h = yes; then HAVE_WS2TCPIP_H=1 else HAVE_WS2TCPIP_H=0 fi fi { $as_echo "$as_me:$LINENO: checking for struct sockaddr_storage" >&5 $as_echo_n "checking for struct sockaddr_storage... " >&6; } if test "${ac_cv_type_struct_sockaddr_storage+set}" = set; then $as_echo_n "(cached) " >&6 else ac_cv_type_struct_sockaddr_storage=no cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* sys/types.h is not needed according to POSIX, but the sys/socket.h in i386-unknown-freebsd4.10 and powerpc-apple-darwin5.5 required it. */ #include #ifdef HAVE_SYS_SOCKET_H #include #endif #ifdef HAVE_WS2TCPIP_H #include #endif int main () { if (sizeof (struct sockaddr_storage)) return 0; ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* sys/types.h is not needed according to POSIX, but the sys/socket.h in i386-unknown-freebsd4.10 and powerpc-apple-darwin5.5 required it. */ #include #ifdef HAVE_SYS_SOCKET_H #include #endif #ifdef HAVE_WS2TCPIP_H #include #endif int main () { if (sizeof ((struct sockaddr_storage))) return 0; ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then : else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_type_struct_sockaddr_storage=yes fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:$LINENO: result: $ac_cv_type_struct_sockaddr_storage" >&5 $as_echo "$ac_cv_type_struct_sockaddr_storage" >&6; } if test "x$ac_cv_type_struct_sockaddr_storage" = x""yes; then cat >>confdefs.h <<_ACEOF #define HAVE_STRUCT_SOCKADDR_STORAGE 1 _ACEOF fi { $as_echo "$as_me:$LINENO: checking for sa_family_t" >&5 $as_echo_n "checking for sa_family_t... " >&6; } if test "${ac_cv_type_sa_family_t+set}" = set; then $as_echo_n "(cached) " >&6 else ac_cv_type_sa_family_t=no cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* sys/types.h is not needed according to POSIX, but the sys/socket.h in i386-unknown-freebsd4.10 and powerpc-apple-darwin5.5 required it. */ #include #ifdef HAVE_SYS_SOCKET_H #include #endif #ifdef HAVE_WS2TCPIP_H #include #endif int main () { if (sizeof (sa_family_t)) return 0; ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* sys/types.h is not needed according to POSIX, but the sys/socket.h in i386-unknown-freebsd4.10 and powerpc-apple-darwin5.5 required it. */ #include #ifdef HAVE_SYS_SOCKET_H #include #endif #ifdef HAVE_WS2TCPIP_H #include #endif int main () { if (sizeof ((sa_family_t))) return 0; ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then : else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_type_sa_family_t=yes fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:$LINENO: result: $ac_cv_type_sa_family_t" >&5 $as_echo "$ac_cv_type_sa_family_t" >&6; } if test "x$ac_cv_type_sa_family_t" = x""yes; then cat >>confdefs.h <<_ACEOF #define HAVE_SA_FAMILY_T 1 _ACEOF fi if test $ac_cv_type_struct_sockaddr_storage = no; then HAVE_STRUCT_SOCKADDR_STORAGE=0 SYS_SOCKET_H='sys/socket.h' fi if test $ac_cv_type_sa_family_t = no; then HAVE_SA_FAMILY_T=0 SYS_SOCKET_H='sys/socket.h' fi if test -n "$SYS_SOCKET_H"; then : if test $ac_cv_header_sys_socket_h != yes; then for ac_header in winsock2.h do as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 $as_echo_n "checking for $ac_header... " >&6; } if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then $as_echo_n "(cached) " >&6 fi ac_res=`eval 'as_val=${'$as_ac_Header'} $as_echo "$as_val"'` { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } else # Is the header compilable? { $as_echo "$as_me:$LINENO: checking $ac_header usability" >&5 $as_echo_n "checking $ac_header usability... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default #include <$ac_header> _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_header_compiler=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_compiler=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext { $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 $as_echo "$ac_header_compiler" >&6; } # Is the header present? { $as_echo "$as_me:$LINENO: checking $ac_header presence" >&5 $as_echo_n "checking $ac_header presence... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include <$ac_header> _ACEOF if { (ac_try="$ac_cpp conftest.$ac_ext" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null && { test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || test ! -s conftest.err }; then ac_header_preproc=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi rm -f conftest.err conftest.$ac_ext { $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 $as_echo "$ac_header_preproc" >&6; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in yes:no: ) { $as_echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 $as_echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 $as_echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} ac_header_preproc=yes ;; no:yes:* ) { $as_echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 $as_echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} { $as_echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 $as_echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} { $as_echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 $as_echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} { $as_echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 $as_echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 $as_echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} { $as_echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 $as_echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} ;; esac { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 $as_echo_n "checking for $ac_header... " >&6; } if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then $as_echo_n "(cached) " >&6 else eval "$as_ac_Header=\$ac_header_preproc" fi ac_res=`eval 'as_val=${'$as_ac_Header'} $as_echo "$as_val"'` { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } fi as_val=`eval 'as_val=${'$as_ac_Header'} $as_echo "$as_val"'` if test "x$as_val" = x""yes; then cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi done fi if test "$ac_cv_header_winsock2_h" = yes; then HAVE_WINSOCK2_H=1 UNISTD_H_HAVE_WINSOCK2_H=1 SYS_IOCTL_H_HAVE_WINSOCK2_H=1 else HAVE_WINSOCK2_H=0 fi fi for gl_func in socket connect accept bind getpeername getsockname getsockopt listen recv send recvfrom sendto setsockopt shutdown accept4; do as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh` { $as_echo "$as_me:$LINENO: checking whether $gl_func is declared without a macro" >&5 $as_echo_n "checking whether $gl_func is declared without a macro... " >&6; } if { as_var=$as_gl_Symbol; eval "test \"\${$as_var+set}\" = set"; }; then $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Some systems require prerequisite headers. */ #include #if !defined __GLIBC__ && HAVE_SYS_TIME_H # include #endif #include int main () { #undef $gl_func (void) $gl_func; ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then eval "$as_gl_Symbol=yes" else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 eval "$as_gl_Symbol=no" fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi ac_res=`eval 'as_val=${'$as_gl_Symbol'} $as_echo "$as_val"'` { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } as_val=`eval 'as_val=${'$as_gl_Symbol'} $as_echo "$as_val"'` if test "x$as_val" = x""yes; then cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1 _ACEOF eval ac_cv_have_decl_$gl_func=yes fi done { $as_echo "$as_me:$LINENO: checking for a thread-safe mkdir -p" >&5 $as_echo_n "checking for a thread-safe mkdir -p... " >&6; } if test -z "$MKDIR_P"; then if test "${ac_cv_path_mkdir+set}" = set; then $as_echo_n "(cached) " >&6 else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_prog in mkdir gmkdir; do for ac_exec_ext in '' $ac_executable_extensions; do { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; } || continue case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #( 'mkdir (GNU coreutils) '* | \ 'mkdir (coreutils) '* | \ 'mkdir (fileutils) '4.1*) ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext break 3;; esac done done done IFS=$as_save_IFS fi if test "${ac_cv_path_mkdir+set}" = set; then MKDIR_P="$ac_cv_path_mkdir -p" else # As a last resort, use the slow shell script. Don't cache a # value for MKDIR_P within a source directory, because that will # break other packages using the cache if that directory is # removed, or if the value is a relative name. test -d ./--version && rmdir ./--version MKDIR_P="$ac_install_sh -d" fi fi { $as_echo "$as_me:$LINENO: result: $MKDIR_P" >&5 $as_echo "$MKDIR_P" >&6; } : if test $gl_cv_have_include_next = yes; then gl_cv_next_sys_stat_h='<'sys/stat.h'>' else { $as_echo "$as_me:$LINENO: checking absolute name of " >&5 $as_echo_n "checking absolute name of ... " >&6; } if test "${gl_cv_next_sys_stat_h+set}" = set; then $as_echo_n "(cached) " >&6 else if test $ac_cv_header_sys_stat_h = yes; then cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF case "$host_os" in aix*) gl_absname_cpp="$ac_cpp -C" ;; *) gl_absname_cpp="$ac_cpp" ;; esac gl_cv_next_sys_stat_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 | sed -n '\#/sys/stat.h#{ s#.*"\(.*/sys/stat.h\)".*#\1# s#^/[^/]#//&# p q }'`'"' else gl_cv_next_sys_stat_h='<'sys/stat.h'>' fi fi { $as_echo "$as_me:$LINENO: result: $gl_cv_next_sys_stat_h" >&5 $as_echo "$gl_cv_next_sys_stat_h" >&6; } fi NEXT_SYS_STAT_H=$gl_cv_next_sys_stat_h if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next' gl_next_as_first_directive='<'sys/stat.h'>' else # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include' gl_next_as_first_directive=$gl_cv_next_sys_stat_h fi NEXT_AS_FIRST_DIRECTIVE_SYS_STAT_H=$gl_next_as_first_directive { $as_echo "$as_me:$LINENO: checking for nlink_t" >&5 $as_echo_n "checking for nlink_t... " >&6; } if test "${ac_cv_type_nlink_t+set}" = set; then $as_echo_n "(cached) " >&6 else ac_cv_type_nlink_t=no cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #include int main () { if (sizeof (nlink_t)) return 0; ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #include int main () { if (sizeof ((nlink_t))) return 0; ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then : else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_type_nlink_t=yes fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:$LINENO: result: $ac_cv_type_nlink_t" >&5 $as_echo "$ac_cv_type_nlink_t" >&6; } if test "x$ac_cv_type_nlink_t" = x""yes; then : else cat >>confdefs.h <<\_ACEOF #define nlink_t int _ACEOF fi for gl_func in fchmodat fstatat futimens lchmod lstat mkdirat mkfifo mkfifoat mknod mknodat stat utimensat; do as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh` { $as_echo "$as_me:$LINENO: checking whether $gl_func is declared without a macro" >&5 $as_echo_n "checking whether $gl_func is declared without a macro... " >&6; } if { as_var=$as_gl_Symbol; eval "test \"\${$as_var+set}\" = set"; }; then $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include int main () { #undef $gl_func (void) $gl_func; ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then eval "$as_gl_Symbol=yes" else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 eval "$as_gl_Symbol=no" fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi ac_res=`eval 'as_val=${'$as_gl_Symbol'} $as_echo "$as_val"'` { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } as_val=`eval 'as_val=${'$as_gl_Symbol'} $as_echo "$as_val"'` if test "x$as_val" = x""yes; then cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1 _ACEOF eval ac_cv_have_decl_$gl_func=yes fi done { $as_echo "$as_me:$LINENO: checking for a thread-safe mkdir -p" >&5 $as_echo_n "checking for a thread-safe mkdir -p... " >&6; } if test -z "$MKDIR_P"; then if test "${ac_cv_path_mkdir+set}" = set; then $as_echo_n "(cached) " >&6 else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_prog in mkdir gmkdir; do for ac_exec_ext in '' $ac_executable_extensions; do { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; } || continue case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #( 'mkdir (GNU coreutils) '* | \ 'mkdir (coreutils) '* | \ 'mkdir (fileutils) '4.1*) ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext break 3;; esac done done done IFS=$as_save_IFS fi if test "${ac_cv_path_mkdir+set}" = set; then MKDIR_P="$ac_cv_path_mkdir -p" else # As a last resort, use the slow shell script. Don't cache a # value for MKDIR_P within a source directory, because that will # break other packages using the cache if that directory is # removed, or if the value is a relative name. test -d ./--version && rmdir ./--version MKDIR_P="$ac_install_sh -d" fi fi { $as_echo "$as_me:$LINENO: result: $MKDIR_P" >&5 $as_echo "$MKDIR_P" >&6; } { $as_echo "$as_me:$LINENO: checking for a thread-safe mkdir -p" >&5 $as_echo_n "checking for a thread-safe mkdir -p... " >&6; } if test -z "$MKDIR_P"; then if test "${ac_cv_path_mkdir+set}" = set; then $as_echo_n "(cached) " >&6 else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_prog in mkdir gmkdir; do for ac_exec_ext in '' $ac_executable_extensions; do { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; } || continue case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #( 'mkdir (GNU coreutils) '* | \ 'mkdir (coreutils) '* | \ 'mkdir (fileutils) '4.1*) ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext break 3;; esac done done done IFS=$as_save_IFS fi if test "${ac_cv_path_mkdir+set}" = set; then MKDIR_P="$ac_cv_path_mkdir -p" else # As a last resort, use the slow shell script. Don't cache a # value for MKDIR_P within a source directory, because that will # break other packages using the cache if that directory is # removed, or if the value is a relative name. test -d ./--version && rmdir ./--version MKDIR_P="$ac_install_sh -d" fi fi { $as_echo "$as_me:$LINENO: result: $MKDIR_P" >&5 $as_echo "$MKDIR_P" >&6; } : if test $gl_cv_have_include_next = yes; then gl_cv_next_sys_utsname_h='<'sys/utsname.h'>' else { $as_echo "$as_me:$LINENO: checking absolute name of " >&5 $as_echo_n "checking absolute name of ... " >&6; } if test "${gl_cv_next_sys_utsname_h+set}" = set; then $as_echo_n "(cached) " >&6 else if test $ac_cv_header_sys_utsname_h = yes; then cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF case "$host_os" in aix*) gl_absname_cpp="$ac_cpp -C" ;; *) gl_absname_cpp="$ac_cpp" ;; esac gl_cv_next_sys_utsname_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 | sed -n '\#/sys/utsname.h#{ s#.*"\(.*/sys/utsname.h\)".*#\1# s#^/[^/]#//&# p q }'`'"' else gl_cv_next_sys_utsname_h='<'sys/utsname.h'>' fi fi { $as_echo "$as_me:$LINENO: result: $gl_cv_next_sys_utsname_h" >&5 $as_echo "$gl_cv_next_sys_utsname_h" >&6; } fi NEXT_SYS_UTSNAME_H=$gl_cv_next_sys_utsname_h if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next' gl_next_as_first_directive='<'sys/utsname.h'>' else # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include' gl_next_as_first_directive=$gl_cv_next_sys_utsname_h fi NEXT_AS_FIRST_DIRECTIVE_SYS_UTSNAME_H=$gl_next_as_first_directive : if test $ac_cv_header_sys_utsname_h != yes; then HAVE_SYS_UTSNAME_H=0 HAVE_STRUCT_UTSNAME=0 else HAVE_SYS_UTSNAME_H=1 { $as_echo "$as_me:$LINENO: checking for struct utsname" >&5 $as_echo_n "checking for struct utsname... " >&6; } if test "${ac_cv_type_struct_utsname+set}" = set; then $as_echo_n "(cached) " >&6 else ac_cv_type_struct_utsname=no cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include int main () { if (sizeof (struct utsname)) return 0; ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include int main () { if (sizeof ((struct utsname))) return 0; ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then : else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_type_struct_utsname=yes fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:$LINENO: result: $ac_cv_type_struct_utsname" >&5 $as_echo "$ac_cv_type_struct_utsname" >&6; } if test "x$ac_cv_type_struct_utsname" = x""yes; then cat >>confdefs.h <<_ACEOF #define HAVE_STRUCT_UTSNAME 1 _ACEOF else HAVE_STRUCT_UTSNAME=0 fi fi for gl_func in uname; do as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh` { $as_echo "$as_me:$LINENO: checking whether $gl_func is declared without a macro" >&5 $as_echo_n "checking whether $gl_func is declared without a macro... " >&6; } if { as_var=$as_gl_Symbol; eval "test \"\${$as_var+set}\" = set"; }; then $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include int main () { #undef $gl_func (void) $gl_func; ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then eval "$as_gl_Symbol=yes" else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 eval "$as_gl_Symbol=no" fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi ac_res=`eval 'as_val=${'$as_gl_Symbol'} $as_echo "$as_val"'` { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } as_val=`eval 'as_val=${'$as_gl_Symbol'} $as_echo "$as_val"'` if test "x$as_val" = x""yes; then cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1 _ACEOF eval ac_cv_have_decl_$gl_func=yes fi done { $as_echo "$as_me:$LINENO: checking for a thread-safe mkdir -p" >&5 $as_echo_n "checking for a thread-safe mkdir -p... " >&6; } if test -z "$MKDIR_P"; then if test "${ac_cv_path_mkdir+set}" = set; then $as_echo_n "(cached) " >&6 else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_prog in mkdir gmkdir; do for ac_exec_ext in '' $ac_executable_extensions; do { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; } || continue case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #( 'mkdir (GNU coreutils) '* | \ 'mkdir (coreutils) '* | \ 'mkdir (fileutils) '4.1*) ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext break 3;; esac done done done IFS=$as_save_IFS fi if test "${ac_cv_path_mkdir+set}" = set; then MKDIR_P="$ac_cv_path_mkdir -p" else # As a last resort, use the slow shell script. Don't cache a # value for MKDIR_P within a source directory, because that will # break other packages using the cache if that directory is # removed, or if the value is a relative name. test -d ./--version && rmdir ./--version MKDIR_P="$ac_install_sh -d" fi fi { $as_echo "$as_me:$LINENO: result: $MKDIR_P" >&5 $as_echo "$MKDIR_P" >&6; } if test $gl_threads_api = posix; then gl_save_LIBS="$LIBS" LIBS="$LIBS $LIBMULTITHREAD" for ac_func in pthread_atfork do as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` { $as_echo "$as_me:$LINENO: checking for $ac_func" >&5 $as_echo_n "checking for $ac_func... " >&6; } if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Define $ac_func to an innocuous variant, in case declares $ac_func. For example, HP-UX 11i declares gettimeofday. */ #define $ac_func innocuous_$ac_func /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $ac_func (); below. Prefer to if __STDC__ is defined, since exists even on freestanding compilers. */ #ifdef __STDC__ # include #else # include #endif #undef $ac_func /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char $ac_func (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined __stub_$ac_func || defined __stub___$ac_func choke me #endif int main () { return $ac_func (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || $as_test_x conftest$ac_exeext }; then eval "$as_ac_var=yes" else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 eval "$as_ac_var=no" fi rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi ac_res=`eval 'as_val=${'$as_ac_var'} $as_echo "$as_val"'` { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } as_val=`eval 'as_val=${'$as_ac_var'} $as_echo "$as_val"'` if test "x$as_val" = x""yes; then cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF fi done LIBS="$gl_save_LIBS" fi { $as_echo "$as_me:$LINENO: checking whether localtime_r is compatible with its POSIX signature" >&5 $as_echo_n "checking whether localtime_r is compatible with its POSIX signature... " >&6; } if test "${gl_cv_time_r_posix+set}" = set; then $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include int main () { /* We don't need to append 'restrict's to the argument types, even though the POSIX signature has the 'restrict's, since C99 says they can't affect type compatibility. */ struct tm * (*ptr) (time_t const *, struct tm *) = localtime_r; if (ptr) return 0; /* Check the return type is a pointer. On HP-UX 10 it is 'int'. */ *localtime_r (0, 0); ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then gl_cv_time_r_posix=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 gl_cv_time_r_posix=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:$LINENO: result: $gl_cv_time_r_posix" >&5 $as_echo "$gl_cv_time_r_posix" >&6; } if test $gl_cv_time_r_posix = yes; then REPLACE_LOCALTIME_R=0 else REPLACE_LOCALTIME_R=1 gl_LIBOBJS="$gl_LIBOBJS time_r.$ac_objext" : fi if test $ac_cv_func_working_mktime = no; then # Assume that timegm is buggy if mktime is. gl_LIBOBJS="$gl_LIBOBJS timegm.$ac_objext" ac_cv_func_timegm=no else for ac_func in timegm do as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` { $as_echo "$as_me:$LINENO: checking for $ac_func" >&5 $as_echo_n "checking for $ac_func... " >&6; } if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Define $ac_func to an innocuous variant, in case declares $ac_func. For example, HP-UX 11i declares gettimeofday. */ #define $ac_func innocuous_$ac_func /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $ac_func (); below. Prefer to if __STDC__ is defined, since exists even on freestanding compilers. */ #ifdef __STDC__ # include #else # include #endif #undef $ac_func /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char $ac_func (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined __stub_$ac_func || defined __stub___$ac_func choke me #endif int main () { return $ac_func (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || $as_test_x conftest$ac_exeext }; then eval "$as_ac_var=yes" else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 eval "$as_ac_var=no" fi rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi ac_res=`eval 'as_val=${'$as_ac_var'} $as_echo "$as_val"'` { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } as_val=`eval 'as_val=${'$as_ac_var'} $as_echo "$as_val"'` if test "x$as_val" = x""yes; then cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF else gl_LIBOBJS="$gl_LIBOBJS $ac_func.$ac_objext" fi done fi REPLACE_TIMEGM=1 if test $ac_cv_func_timegm = yes; then { $as_echo "$as_me:$LINENO: checking whether timegm is declared" >&5 $as_echo_n "checking whether timegm is declared... " >&6; } if test "${ac_cv_have_decl_timegm+set}" = set; then $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include int main () { #ifndef timegm (void) timegm; #endif ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_cv_have_decl_timegm=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_have_decl_timegm=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:$LINENO: result: $ac_cv_have_decl_timegm" >&5 $as_echo "$ac_cv_have_decl_timegm" >&6; } if test "x$ac_cv_have_decl_timegm" = x""yes; then cat >>confdefs.h <<_ACEOF #define HAVE_DECL_TIMEGM 1 _ACEOF REPLACE_TIMEGM=0 else cat >>confdefs.h <<_ACEOF #define HAVE_DECL_TIMEGM 0 _ACEOF fi fi if test $REPLACE_TIMEGM = 1; then if test $ac_cv_func_working_mktime = yes; then { $as_echo "$as_me:$LINENO: checking for __mktime_internal" >&5 $as_echo_n "checking for __mktime_internal... " >&6; } if test "${ac_cv_func___mktime_internal+set}" = set; then $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Define __mktime_internal to an innocuous variant, in case declares __mktime_internal. For example, HP-UX 11i declares gettimeofday. */ #define __mktime_internal innocuous___mktime_internal /* System header to define __stub macros and hopefully few prototypes, which can conflict with char __mktime_internal (); below. Prefer to if __STDC__ is defined, since exists even on freestanding compilers. */ #ifdef __STDC__ # include #else # include #endif #undef __mktime_internal /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char __mktime_internal (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined __stub___mktime_internal || defined __stub_____mktime_internal choke me #endif int main () { return __mktime_internal (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || $as_test_x conftest$ac_exeext }; then ac_cv_func___mktime_internal=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_func___mktime_internal=no fi rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi { $as_echo "$as_me:$LINENO: result: $ac_cv_func___mktime_internal" >&5 $as_echo "$ac_cv_func___mktime_internal" >&6; } if test "x$ac_cv_func___mktime_internal" = x""yes; then : else # mktime works but it doesn't export __mktime_internal, # so we need to substitute our own mktime implementation. gl_LIBOBJS="$gl_LIBOBJS mktime.$ac_objext" cat >>confdefs.h <<\_ACEOF #define mktime rpl_mktime _ACEOF fi fi fi for ac_func in uname do as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` { $as_echo "$as_me:$LINENO: checking for $ac_func" >&5 $as_echo_n "checking for $ac_func... " >&6; } if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Define $ac_func to an innocuous variant, in case declares $ac_func. For example, HP-UX 11i declares gettimeofday. */ #define $ac_func innocuous_$ac_func /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $ac_func (); below. Prefer to if __STDC__ is defined, since exists even on freestanding compilers. */ #ifdef __STDC__ # include #else # include #endif #undef $ac_func /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char $ac_func (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined __stub_$ac_func || defined __stub___$ac_func choke me #endif int main () { return $ac_func (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || $as_test_x conftest$ac_exeext }; then eval "$as_ac_var=yes" else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 eval "$as_ac_var=no" fi rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi ac_res=`eval 'as_val=${'$as_ac_var'} $as_echo "$as_val"'` { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } as_val=`eval 'as_val=${'$as_ac_var'} $as_echo "$as_val"'` if test "x$as_val" = x""yes; then cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF else gl_LIBOBJS="$gl_LIBOBJS $ac_func.$ac_objext" fi done if test $ac_cv_func_uname = no; then HAVE_UNAME=0 : fi GNULIB_UNAME=1 : if test $gl_cv_have_include_next = yes; then gl_cv_next_unistd_h='<'unistd.h'>' else { $as_echo "$as_me:$LINENO: checking absolute name of " >&5 $as_echo_n "checking absolute name of ... " >&6; } if test "${gl_cv_next_unistd_h+set}" = set; then $as_echo_n "(cached) " >&6 else if test $ac_cv_header_unistd_h = yes; then cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF case "$host_os" in aix*) gl_absname_cpp="$ac_cpp -C" ;; *) gl_absname_cpp="$ac_cpp" ;; esac gl_cv_next_unistd_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 | sed -n '\#/unistd.h#{ s#.*"\(.*/unistd.h\)".*#\1# s#^/[^/]#//&# p q }'`'"' else gl_cv_next_unistd_h='<'unistd.h'>' fi fi { $as_echo "$as_me:$LINENO: result: $gl_cv_next_unistd_h" >&5 $as_echo "$gl_cv_next_unistd_h" >&6; } fi NEXT_UNISTD_H=$gl_cv_next_unistd_h if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next' gl_next_as_first_directive='<'unistd.h'>' else # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include' gl_next_as_first_directive=$gl_cv_next_unistd_h fi NEXT_AS_FIRST_DIRECTIVE_UNISTD_H=$gl_next_as_first_directive : if test $ac_cv_header_unistd_h = yes; then HAVE_UNISTD_H=1 else HAVE_UNISTD_H=0 fi for gl_func in chown dup2 dup3 environ euidaccess faccessat fchdir fchownat fsync ftruncate getcwd getdomainname getdtablesize getgroups gethostname getlogin getlogin_r getpagesize getusershell setusershell endusershell lchown link linkat lseek pipe2 pread readlink readlinkat rmdir sleep symlink symlinkat unlink unlinkat usleep; do as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh` { $as_echo "$as_me:$LINENO: checking whether $gl_func is declared without a macro" >&5 $as_echo_n "checking whether $gl_func is declared without a macro... " >&6; } if { as_var=$as_gl_Symbol; eval "test \"\${$as_var+set}\" = set"; }; then $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include /* Some systems declare various items in the wrong headers. */ #ifndef __GLIBC__ # include # include # include # if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ # include # endif #endif int main () { #undef $gl_func (void) $gl_func; ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then eval "$as_gl_Symbol=yes" else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 eval "$as_gl_Symbol=no" fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi ac_res=`eval 'as_val=${'$as_gl_Symbol'} $as_echo "$as_val"'` { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } as_val=`eval 'as_val=${'$as_gl_Symbol'} $as_echo "$as_val"'` if test "x$as_val" = x""yes; then cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1 _ACEOF eval ac_cv_have_decl_$gl_func=yes fi done : if test $ac_cv_func_vasnprintf = no; then : gl_LIBOBJS="$gl_LIBOBJS vasnprintf.$ac_objext" gl_LIBOBJS="$gl_LIBOBJS printf-args.$ac_objext" gl_LIBOBJS="$gl_LIBOBJS printf-parse.$ac_objext" gl_LIBOBJS="$gl_LIBOBJS asnprintf.$ac_objext" if test $ac_cv_func_vasnprintf = yes; then cat >>confdefs.h <<\_ACEOF #define REPLACE_VASNPRINTF 1 _ACEOF fi { $as_echo "$as_me:$LINENO: checking for ptrdiff_t" >&5 $as_echo_n "checking for ptrdiff_t... " >&6; } if test "${ac_cv_type_ptrdiff_t+set}" = set; then $as_echo_n "(cached) " >&6 else ac_cv_type_ptrdiff_t=no cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default int main () { if (sizeof (ptrdiff_t)) return 0; ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default int main () { if (sizeof ((ptrdiff_t))) return 0; ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then : else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_type_ptrdiff_t=yes fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:$LINENO: result: $ac_cv_type_ptrdiff_t" >&5 $as_echo "$ac_cv_type_ptrdiff_t" >&6; } if test "x$ac_cv_type_ptrdiff_t" = x""yes; then : else cat >>confdefs.h <<\_ACEOF #define ptrdiff_t long _ACEOF fi fi gl_cv_func_vsnprintf_usable=no for ac_func in vsnprintf do as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` { $as_echo "$as_me:$LINENO: checking for $ac_func" >&5 $as_echo_n "checking for $ac_func... " >&6; } if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Define $ac_func to an innocuous variant, in case declares $ac_func. For example, HP-UX 11i declares gettimeofday. */ #define $ac_func innocuous_$ac_func /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $ac_func (); below. Prefer to if __STDC__ is defined, since exists even on freestanding compilers. */ #ifdef __STDC__ # include #else # include #endif #undef $ac_func /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char $ac_func (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined __stub_$ac_func || defined __stub___$ac_func choke me #endif int main () { return $ac_func (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || $as_test_x conftest$ac_exeext }; then eval "$as_ac_var=yes" else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 eval "$as_ac_var=no" fi rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi ac_res=`eval 'as_val=${'$as_ac_var'} $as_echo "$as_val"'` { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } as_val=`eval 'as_val=${'$as_ac_var'} $as_echo "$as_val"'` if test "x$as_val" = x""yes; then cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF fi done if test $ac_cv_func_vsnprintf = yes; then { $as_echo "$as_me:$LINENO: checking whether snprintf respects a size of 1" >&5 $as_echo_n "checking whether snprintf respects a size of 1... " >&6; } if test "${gl_cv_func_snprintf_size1+set}" = set; then $as_echo_n "(cached) " >&6 else if test "$cross_compiling" = yes; then gl_cv_func_snprintf_size1="guessing yes" else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include int main() { static char buf[8] = { 'D', 'E', 'A', 'D', 'B', 'E', 'E', 'F' }; snprintf (buf, 1, "%d", 12345); return buf[1] != 'E'; } _ACEOF rm -f conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' { (case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_try") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then gl_cv_func_snprintf_size1=yes else $as_echo "$as_me: program exited with status $ac_status" >&5 $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) gl_cv_func_snprintf_size1=no fi rm -rf conftest.dSYM rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi fi { $as_echo "$as_me:$LINENO: result: $gl_cv_func_snprintf_size1" >&5 $as_echo "$gl_cv_func_snprintf_size1" >&6; } case "$gl_cv_func_snprintf_size1" in *yes) gl_cv_func_vsnprintf_usable=yes ;; esac fi if test $gl_cv_func_vsnprintf_usable = no; then gl_LIBOBJS="$gl_LIBOBJS vsnprintf.$ac_objext" if test $ac_cv_func_vsnprintf = yes; then REPLACE_VSNPRINTF=1 fi : fi : if test $ac_cv_have_decl_vsnprintf = no; then HAVE_DECL_VSNPRINTF=0 fi GNULIB_VSNPRINTF=1 gl_cv_func_vsnprintf_posix=no for ac_func in vsnprintf do as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` { $as_echo "$as_me:$LINENO: checking for $ac_func" >&5 $as_echo_n "checking for $ac_func... " >&6; } if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Define $ac_func to an innocuous variant, in case declares $ac_func. For example, HP-UX 11i declares gettimeofday. */ #define $ac_func innocuous_$ac_func /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $ac_func (); below. Prefer to if __STDC__ is defined, since exists even on freestanding compilers. */ #ifdef __STDC__ # include #else # include #endif #undef $ac_func /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char $ac_func (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined __stub_$ac_func || defined __stub___$ac_func choke me #endif int main () { return $ac_func (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || $as_test_x conftest$ac_exeext }; then eval "$as_ac_var=yes" else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 eval "$as_ac_var=no" fi rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi ac_res=`eval 'as_val=${'$as_ac_var'} $as_echo "$as_val"'` { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } as_val=`eval 'as_val=${'$as_ac_var'} $as_echo "$as_val"'` if test "x$as_val" = x""yes; then cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF fi done if test $ac_cv_func_vsnprintf = yes; then { $as_echo "$as_me:$LINENO: checking whether snprintf truncates the result as in C99" >&5 $as_echo_n "checking whether snprintf truncates the result as in C99... " >&6; } if test "${gl_cv_func_snprintf_truncation_c99+set}" = set; then $as_echo_n "(cached) " >&6 else if test "$cross_compiling" = yes; then case "$host_os" in # Guess yes on glibc systems. *-gnu*) gl_cv_func_snprintf_truncation_c99="guessing yes";; # Guess yes on FreeBSD >= 5. freebsd[1-4]*) gl_cv_func_snprintf_truncation_c99="guessing no";; freebsd* | kfreebsd*) gl_cv_func_snprintf_truncation_c99="guessing yes";; # Guess yes on MacOS X >= 10.3. darwin[1-6].*) gl_cv_func_snprintf_truncation_c99="guessing no";; darwin*) gl_cv_func_snprintf_truncation_c99="guessing yes";; # Guess yes on OpenBSD >= 3.9. openbsd[1-2].* | openbsd3.[0-8] | openbsd3.[0-8].*) gl_cv_func_snprintf_truncation_c99="guessing no";; openbsd*) gl_cv_func_snprintf_truncation_c99="guessing yes";; # Guess yes on Solaris >= 2.6. solaris2.[0-5]*) gl_cv_func_snprintf_truncation_c99="guessing no";; solaris*) gl_cv_func_snprintf_truncation_c99="guessing yes";; # Guess yes on AIX >= 4. aix[1-3]*) gl_cv_func_snprintf_truncation_c99="guessing no";; aix*) gl_cv_func_snprintf_truncation_c99="guessing yes";; # Guess yes on HP-UX >= 11. hpux[7-9]* | hpux10*) gl_cv_func_snprintf_truncation_c99="guessing no";; hpux*) gl_cv_func_snprintf_truncation_c99="guessing yes";; # Guess yes on IRIX >= 6.5. irix6.5) gl_cv_func_snprintf_truncation_c99="guessing yes";; # Guess yes on OSF/1 >= 5. osf[3-4]*) gl_cv_func_snprintf_truncation_c99="guessing no";; osf*) gl_cv_func_snprintf_truncation_c99="guessing yes";; # Guess yes on NetBSD >= 3. netbsd[1-2]* | netbsdelf[1-2]* | netbsdaout[1-2]* | netbsdcoff[1-2]*) gl_cv_func_snprintf_truncation_c99="guessing no";; netbsd*) gl_cv_func_snprintf_truncation_c99="guessing yes";; # Guess yes on BeOS. beos*) gl_cv_func_snprintf_truncation_c99="guessing yes";; # If we don't know, assume the worst. *) gl_cv_func_snprintf_truncation_c99="guessing no";; esac else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #include static char buf[100]; int main () { strcpy (buf, "ABCDEF"); snprintf (buf, 3, "%d %d", 4567, 89); if (memcmp (buf, "45\0DEF", 6) != 0) return 1; return 0; } _ACEOF rm -f conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' { (case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_try") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then gl_cv_func_snprintf_truncation_c99=yes else $as_echo "$as_me: program exited with status $ac_status" >&5 $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) gl_cv_func_snprintf_truncation_c99=no fi rm -rf conftest.dSYM rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi fi { $as_echo "$as_me:$LINENO: result: $gl_cv_func_snprintf_truncation_c99" >&5 $as_echo "$gl_cv_func_snprintf_truncation_c99" >&6; } { $as_echo "$as_me:$LINENO: checking whether snprintf returns a byte count as in C99" >&5 $as_echo_n "checking whether snprintf returns a byte count as in C99... " >&6; } if test "${gl_cv_func_snprintf_retval_c99+set}" = set; then $as_echo_n "(cached) " >&6 else if test "$cross_compiling" = yes; then case "$host_os" in # Guess yes on glibc systems. *-gnu*) gl_cv_func_snprintf_retval_c99="guessing yes";; # Guess yes on FreeBSD >= 5. freebsd[1-4]*) gl_cv_func_snprintf_retval_c99="guessing no";; freebsd* | kfreebsd*) gl_cv_func_snprintf_retval_c99="guessing yes";; # Guess yes on MacOS X >= 10.3. darwin[1-6].*) gl_cv_func_snprintf_retval_c99="guessing no";; darwin*) gl_cv_func_snprintf_retval_c99="guessing yes";; # Guess yes on OpenBSD >= 3.9. openbsd[1-2].* | openbsd3.[0-8] | openbsd3.[0-8].*) gl_cv_func_snprintf_retval_c99="guessing no";; openbsd*) gl_cv_func_snprintf_retval_c99="guessing yes";; # Guess yes on Solaris >= 2.6. solaris2.[0-5]*) gl_cv_func_snprintf_retval_c99="guessing no";; solaris*) gl_cv_func_snprintf_retval_c99="guessing yes";; # Guess yes on AIX >= 4. aix[1-3]*) gl_cv_func_snprintf_retval_c99="guessing no";; aix*) gl_cv_func_snprintf_retval_c99="guessing yes";; # Guess yes on NetBSD >= 3. netbsd[1-2]* | netbsdelf[1-2]* | netbsdaout[1-2]* | netbsdcoff[1-2]*) gl_cv_func_snprintf_retval_c99="guessing no";; netbsd*) gl_cv_func_snprintf_retval_c99="guessing yes";; # Guess yes on BeOS. beos*) gl_cv_func_snprintf_retval_c99="guessing yes";; # If we don't know, assume the worst. *) gl_cv_func_snprintf_retval_c99="guessing no";; esac else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #include static char buf[100]; int main () { strcpy (buf, "ABCDEF"); if (snprintf (buf, 3, "%d %d", 4567, 89) != 7) return 1; return 0; } _ACEOF rm -f conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' { (case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_try") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then gl_cv_func_snprintf_retval_c99=yes else $as_echo "$as_me: program exited with status $ac_status" >&5 $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) gl_cv_func_snprintf_retval_c99=no fi rm -rf conftest.dSYM rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi fi { $as_echo "$as_me:$LINENO: result: $gl_cv_func_snprintf_retval_c99" >&5 $as_echo "$gl_cv_func_snprintf_retval_c99" >&6; } { $as_echo "$as_me:$LINENO: checking whether snprintf fully supports the 'n' directive" >&5 $as_echo_n "checking whether snprintf fully supports the 'n' directive... " >&6; } if test "${gl_cv_func_snprintf_directive_n+set}" = set; then $as_echo_n "(cached) " >&6 else if test "$cross_compiling" = yes; then case "$host_os" in # Guess yes on glibc systems. *-gnu*) gl_cv_func_snprintf_directive_n="guessing yes";; # Guess yes on FreeBSD >= 5. freebsd[1-4]*) gl_cv_func_snprintf_directive_n="guessing no";; freebsd* | kfreebsd*) gl_cv_func_snprintf_directive_n="guessing yes";; # Guess yes on MacOS X >= 10.3. darwin[1-6].*) gl_cv_func_snprintf_directive_n="guessing no";; darwin*) gl_cv_func_snprintf_directive_n="guessing yes";; # Guess yes on Solaris >= 2.6. solaris2.[0-5]*) gl_cv_func_snprintf_directive_n="guessing no";; solaris*) gl_cv_func_snprintf_directive_n="guessing yes";; # Guess yes on AIX >= 4. aix[1-3]*) gl_cv_func_snprintf_directive_n="guessing no";; aix*) gl_cv_func_snprintf_directive_n="guessing yes";; # Guess yes on IRIX >= 6.5. irix6.5) gl_cv_func_snprintf_directive_n="guessing yes";; # Guess yes on OSF/1 >= 5. osf[3-4]*) gl_cv_func_snprintf_directive_n="guessing no";; osf*) gl_cv_func_snprintf_directive_n="guessing yes";; # Guess yes on NetBSD >= 3. netbsd[1-2]* | netbsdelf[1-2]* | netbsdaout[1-2]* | netbsdcoff[1-2]*) gl_cv_func_snprintf_directive_n="guessing no";; netbsd*) gl_cv_func_snprintf_directive_n="guessing yes";; # Guess yes on BeOS. beos*) gl_cv_func_snprintf_directive_n="guessing yes";; # If we don't know, assume the worst. *) gl_cv_func_snprintf_directive_n="guessing no";; esac else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #include static char fmtstring[10]; static char buf[100]; int main () { int count = -1; /* Copy the format string. Some systems (glibc with _FORTIFY_SOURCE=2) support %n in format strings in read-only memory but not in writable memory. */ strcpy (fmtstring, "%d %n"); snprintf (buf, 4, fmtstring, 12345, &count, 33, 44, 55); if (count != 6) return 1; return 0; } _ACEOF rm -f conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' { (case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_try") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then gl_cv_func_snprintf_directive_n=yes else $as_echo "$as_me: program exited with status $ac_status" >&5 $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) gl_cv_func_snprintf_directive_n=no fi rm -rf conftest.dSYM rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi fi { $as_echo "$as_me:$LINENO: result: $gl_cv_func_snprintf_directive_n" >&5 $as_echo "$gl_cv_func_snprintf_directive_n" >&6; } { $as_echo "$as_me:$LINENO: checking whether snprintf respects a size of 1" >&5 $as_echo_n "checking whether snprintf respects a size of 1... " >&6; } if test "${gl_cv_func_snprintf_size1+set}" = set; then $as_echo_n "(cached) " >&6 else if test "$cross_compiling" = yes; then gl_cv_func_snprintf_size1="guessing yes" else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include int main() { static char buf[8] = { 'D', 'E', 'A', 'D', 'B', 'E', 'E', 'F' }; snprintf (buf, 1, "%d", 12345); return buf[1] != 'E'; } _ACEOF rm -f conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' { (case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_try") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then gl_cv_func_snprintf_size1=yes else $as_echo "$as_me: program exited with status $ac_status" >&5 $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) gl_cv_func_snprintf_size1=no fi rm -rf conftest.dSYM rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi fi { $as_echo "$as_me:$LINENO: result: $gl_cv_func_snprintf_size1" >&5 $as_echo "$gl_cv_func_snprintf_size1" >&6; } { $as_echo "$as_me:$LINENO: checking whether vsnprintf respects a zero size as in C99" >&5 $as_echo_n "checking whether vsnprintf respects a zero size as in C99... " >&6; } if test "${gl_cv_func_vsnprintf_zerosize_c99+set}" = set; then $as_echo_n "(cached) " >&6 else if test "$cross_compiling" = yes; then case "$host_os" in # Guess yes on glibc systems. *-gnu*) gl_cv_func_vsnprintf_zerosize_c99="guessing yes";; # Guess yes on FreeBSD >= 5. freebsd[1-4]*) gl_cv_func_vsnprintf_zerosize_c99="guessing no";; freebsd* | kfreebsd*) gl_cv_func_vsnprintf_zerosize_c99="guessing yes";; # Guess yes on MacOS X >= 10.3. darwin[1-6].*) gl_cv_func_vsnprintf_zerosize_c99="guessing no";; darwin*) gl_cv_func_vsnprintf_zerosize_c99="guessing yes";; # Guess yes on Cygwin. cygwin*) gl_cv_func_vsnprintf_zerosize_c99="guessing yes";; # Guess yes on Solaris >= 2.6. solaris2.[0-5]*) gl_cv_func_vsnprintf_zerosize_c99="guessing no";; solaris*) gl_cv_func_vsnprintf_zerosize_c99="guessing yes";; # Guess yes on AIX >= 4. aix[1-3]*) gl_cv_func_vsnprintf_zerosize_c99="guessing no";; aix*) gl_cv_func_vsnprintf_zerosize_c99="guessing yes";; # Guess yes on IRIX >= 6.5. irix6.5) gl_cv_func_vsnprintf_zerosize_c99="guessing yes";; # Guess yes on NetBSD >= 3. netbsd[1-2]* | netbsdelf[1-2]* | netbsdaout[1-2]* | netbsdcoff[1-2]*) gl_cv_func_vsnprintf_zerosize_c99="guessing no";; netbsd*) gl_cv_func_vsnprintf_zerosize_c99="guessing yes";; # Guess yes on BeOS. beos*) gl_cv_func_vsnprintf_zerosize_c99="guessing yes";; # Guess yes on mingw. mingw* | pw*) gl_cv_func_vsnprintf_zerosize_c99="guessing yes";; # If we don't know, assume the worst. *) gl_cv_func_vsnprintf_zerosize_c99="guessing no";; esac else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #include static int my_snprintf (char *buf, int size, const char *format, ...) { va_list args; int ret; va_start (args, format); ret = vsnprintf (buf, size, format, args); va_end (args); return ret; } int main() { static char buf[8] = { 'D', 'E', 'A', 'D', 'B', 'E', 'E', 'F' }; my_snprintf (buf, 0, "%d", 12345); return buf[0] != 'D'; } _ACEOF rm -f conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' { (case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_try") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then gl_cv_func_vsnprintf_zerosize_c99=yes else $as_echo "$as_me: program exited with status $ac_status" >&5 $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) gl_cv_func_vsnprintf_zerosize_c99=no fi rm -rf conftest.dSYM rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi fi { $as_echo "$as_me:$LINENO: result: $gl_cv_func_vsnprintf_zerosize_c99" >&5 $as_echo "$gl_cv_func_vsnprintf_zerosize_c99" >&6; } case "$gl_cv_func_printf_sizes_c99" in *yes) case "$gl_cv_func_printf_long_double" in *yes) case "$gl_cv_func_printf_infinite" in *yes) case "$gl_cv_func_printf_infinite_long_double" in *yes) case "$gl_cv_func_printf_directive_a" in *yes) case "$gl_cv_func_printf_directive_f" in *yes) case "$gl_cv_func_printf_directive_n" in *yes) case "$gl_cv_func_printf_directive_ls" in *yes) case "$gl_cv_func_printf_positions" in *yes) case "$gl_cv_func_printf_flag_grouping" in *yes) case "$gl_cv_func_printf_flag_leftadjust" in *yes) case "$gl_cv_func_printf_flag_zero" in *yes) case "$gl_cv_func_printf_precision" in *yes) case "$gl_cv_func_printf_enomem" in *yes) case "$gl_cv_func_snprintf_truncation_c99" in *yes) case "$gl_cv_func_snprintf_retval_c99" in *yes) case "$gl_cv_func_snprintf_directive_n" in *yes) case "$gl_cv_func_snprintf_size1" in *yes) case "$gl_cv_func_vsnprintf_zerosize_c99" in *yes) # vsnprintf exists and is # already POSIX compliant. gl_cv_func_vsnprintf_posix=yes ;; esac ;; esac ;; esac ;; esac ;; esac ;; esac ;; esac ;; esac ;; esac ;; esac ;; esac ;; esac ;; esac ;; esac ;; esac ;; esac ;; esac ;; esac ;; esac fi if test $gl_cv_func_vsnprintf_posix = no; then case "$gl_cv_func_printf_infinite" in *yes) ;; *) cat >>confdefs.h <<\_ACEOF #define NEED_PRINTF_INFINITE_DOUBLE 1 _ACEOF ;; esac case "$gl_cv_func_printf_long_double" in *yes) case "$gl_cv_func_printf_infinite_long_double" in *yes) ;; *) cat >>confdefs.h <<\_ACEOF #define NEED_PRINTF_INFINITE_LONG_DOUBLE 1 _ACEOF ;; esac ;; esac case "$gl_cv_func_printf_directive_a" in *yes) ;; *) cat >>confdefs.h <<\_ACEOF #define NEED_PRINTF_DIRECTIVE_A 1 _ACEOF for ac_func in nl_langinfo do as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` { $as_echo "$as_me:$LINENO: checking for $ac_func" >&5 $as_echo_n "checking for $ac_func... " >&6; } if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Define $ac_func to an innocuous variant, in case declares $ac_func. For example, HP-UX 11i declares gettimeofday. */ #define $ac_func innocuous_$ac_func /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $ac_func (); below. Prefer to if __STDC__ is defined, since exists even on freestanding compilers. */ #ifdef __STDC__ # include #else # include #endif #undef $ac_func /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char $ac_func (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined __stub_$ac_func || defined __stub___$ac_func choke me #endif int main () { return $ac_func (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || $as_test_x conftest$ac_exeext }; then eval "$as_ac_var=yes" else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 eval "$as_ac_var=no" fi rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi ac_res=`eval 'as_val=${'$as_ac_var'} $as_echo "$as_val"'` { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } as_val=`eval 'as_val=${'$as_ac_var'} $as_echo "$as_val"'` if test "x$as_val" = x""yes; then cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF fi done ;; esac case "$gl_cv_func_printf_directive_f" in *yes) ;; *) cat >>confdefs.h <<\_ACEOF #define NEED_PRINTF_DIRECTIVE_F 1 _ACEOF ;; esac case "$gl_cv_func_printf_directive_ls" in *yes) ;; *) cat >>confdefs.h <<\_ACEOF #define NEED_PRINTF_DIRECTIVE_LS 1 _ACEOF ;; esac case "$gl_cv_func_printf_flag_grouping" in *yes) ;; *) cat >>confdefs.h <<\_ACEOF #define NEED_PRINTF_FLAG_GROUPING 1 _ACEOF ;; esac case "$gl_cv_func_printf_flag_leftadjust" in *yes) ;; *) cat >>confdefs.h <<\_ACEOF #define NEED_PRINTF_FLAG_LEFTADJUST 1 _ACEOF ;; esac case "$gl_cv_func_printf_flag_zero" in *yes) ;; *) cat >>confdefs.h <<\_ACEOF #define NEED_PRINTF_FLAG_ZERO 1 _ACEOF ;; esac case "$gl_cv_func_printf_precision" in *yes) ;; *) cat >>confdefs.h <<\_ACEOF #define NEED_PRINTF_UNBOUNDED_PRECISION 1 _ACEOF cat >>confdefs.h <<\_ACEOF #define NEED_PRINTF_DOUBLE 1 _ACEOF cat >>confdefs.h <<\_ACEOF #define NEED_PRINTF_LONG_DOUBLE 1 _ACEOF ;; esac case "$gl_cv_func_printf_enomem" in *yes) ;; *) cat >>confdefs.h <<\_ACEOF #define NEED_PRINTF_ENOMEM 1 _ACEOF cat >>confdefs.h <<\_ACEOF #define NEED_PRINTF_DOUBLE 1 _ACEOF cat >>confdefs.h <<\_ACEOF #define NEED_PRINTF_LONG_DOUBLE 1 _ACEOF ;; esac : gl_LIBOBJS="$gl_LIBOBJS vasnprintf.$ac_objext" gl_LIBOBJS="$gl_LIBOBJS printf-args.$ac_objext" gl_LIBOBJS="$gl_LIBOBJS printf-parse.$ac_objext" gl_LIBOBJS="$gl_LIBOBJS asnprintf.$ac_objext" if test $ac_cv_func_vasnprintf = yes; then cat >>confdefs.h <<\_ACEOF #define REPLACE_VASNPRINTF 1 _ACEOF fi { $as_echo "$as_me:$LINENO: checking for ptrdiff_t" >&5 $as_echo_n "checking for ptrdiff_t... " >&6; } if test "${ac_cv_type_ptrdiff_t+set}" = set; then $as_echo_n "(cached) " >&6 else ac_cv_type_ptrdiff_t=no cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default int main () { if (sizeof (ptrdiff_t)) return 0; ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default int main () { if (sizeof ((ptrdiff_t))) return 0; ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then : else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_type_ptrdiff_t=yes fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:$LINENO: result: $ac_cv_type_ptrdiff_t" >&5 $as_echo "$ac_cv_type_ptrdiff_t" >&6; } if test "x$ac_cv_type_ptrdiff_t" = x""yes; then : else cat >>confdefs.h <<\_ACEOF #define ptrdiff_t long _ACEOF fi gl_LIBOBJS="$gl_LIBOBJS vsnprintf.$ac_objext" if test $ac_cv_func_vsnprintf = yes; then REPLACE_VSNPRINTF=1 fi : fi : : if test $gl_cv_have_include_next = yes; then gl_cv_next_wchar_h='<'wchar.h'>' else { $as_echo "$as_me:$LINENO: checking absolute name of " >&5 $as_echo_n "checking absolute name of ... " >&6; } if test "${gl_cv_next_wchar_h+set}" = set; then $as_echo_n "(cached) " >&6 else if test $ac_cv_header_wchar_h = yes; then cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF case "$host_os" in aix*) gl_absname_cpp="$ac_cpp -C" ;; *) gl_absname_cpp="$ac_cpp" ;; esac gl_cv_next_wchar_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 | sed -n '\#/wchar.h#{ s#.*"\(.*/wchar.h\)".*#\1# s#^/[^/]#//&# p q }'`'"' else gl_cv_next_wchar_h='<'wchar.h'>' fi fi { $as_echo "$as_me:$LINENO: result: $gl_cv_next_wchar_h" >&5 $as_echo "$gl_cv_next_wchar_h" >&6; } fi NEXT_WCHAR_H=$gl_cv_next_wchar_h if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next' gl_next_as_first_directive='<'wchar.h'>' else # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include' gl_next_as_first_directive=$gl_cv_next_wchar_h fi NEXT_AS_FIRST_DIRECTIVE_WCHAR_H=$gl_next_as_first_directive if test $ac_cv_header_wchar_h = yes; then HAVE_WCHAR_H=1 else HAVE_WCHAR_H=0 fi if test $gt_cv_c_wint_t = yes; then HAVE_WINT_T=1 else HAVE_WINT_T=0 fi for gl_func in btowc wctob mbsinit mbrtowc mbrlen mbsrtowcs mbsnrtowcs wcrtomb wcsrtombs wcsnrtombs wcwidth; do as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh` { $as_echo "$as_me:$LINENO: checking whether $gl_func is declared without a macro" >&5 $as_echo_n "checking whether $gl_func is declared without a macro... " >&6; } if { as_var=$as_gl_Symbol; eval "test \"\${$as_var+set}\" = set"; }; then $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Some systems require additional headers. */ #ifndef __GLIBC__ # include # include # include #endif #include int main () { #undef $gl_func (void) $gl_func; ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then eval "$as_gl_Symbol=yes" else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 eval "$as_gl_Symbol=no" fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi ac_res=`eval 'as_val=${'$as_gl_Symbol'} $as_echo "$as_val"'` { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } as_val=`eval 'as_val=${'$as_gl_Symbol'} $as_echo "$as_val"'` if test "x$as_val" = x""yes; then cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1 _ACEOF eval ac_cv_have_decl_$gl_func=yes fi done : : if test $ac_cv_func_mbsinit = yes && test $ac_cv_func_mbrtowc = yes; then { $as_echo "$as_me:$LINENO: checking whether mbrtowc handles incomplete characters" >&5 $as_echo_n "checking whether mbrtowc handles incomplete characters... " >&6; } if test "${gl_cv_func_mbrtowc_incomplete_state+set}" = set; then $as_echo_n "(cached) " >&6 else case "$host_os" in # Guess no on AIX and OSF/1. osf*) gl_cv_func_mbrtowc_incomplete_state="guessing no" ;; # Guess yes otherwise. *) gl_cv_func_mbrtowc_incomplete_state="guessing yes" ;; esac if test $LOCALE_JA != none; then if test "$cross_compiling" = yes; then : else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #include #include int main () { if (setlocale (LC_ALL, "$LOCALE_JA") != NULL) { const char input[] = "B\217\253\344\217\251\316er"; /* "Büßer" */ mbstate_t state; wchar_t wc; memset (&state, '\0', sizeof (mbstate_t)); if (mbrtowc (&wc, input + 1, 1, &state) == (size_t)(-2)) if (mbsinit (&state)) return 1; } return 0; } _ACEOF rm -f conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' { (case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_try") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then gl_cv_func_mbrtowc_incomplete_state=yes else $as_echo "$as_me: program exited with status $ac_status" >&5 $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) gl_cv_func_mbrtowc_incomplete_state=no fi rm -rf conftest.dSYM rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi fi fi { $as_echo "$as_me:$LINENO: result: $gl_cv_func_mbrtowc_incomplete_state" >&5 $as_echo "$gl_cv_func_mbrtowc_incomplete_state" >&6; } { $as_echo "$as_me:$LINENO: checking whether mbrtowc works as well as mbtowc" >&5 $as_echo_n "checking whether mbrtowc works as well as mbtowc... " >&6; } if test "${gl_cv_func_mbrtowc_sanitycheck+set}" = set; then $as_echo_n "(cached) " >&6 else case "$host_os" in # Guess no on Solaris 8. solaris2.8) gl_cv_func_mbrtowc_sanitycheck="guessing no" ;; # Guess yes otherwise. *) gl_cv_func_mbrtowc_sanitycheck="guessing yes" ;; esac if test $LOCALE_ZH_CN != none; then if test "$cross_compiling" = yes; then : else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #include #include #include int main () { /* This fails on Solaris 8: mbrtowc returns 2, and sets wc to 0x00F0. mbtowc returns 4 (correct) and sets wc to 0x5EDC. */ if (setlocale (LC_ALL, "$LOCALE_ZH_CN") != NULL) { char input[] = "B\250\271\201\060\211\070er"; /* "Büßer" */ mbstate_t state; wchar_t wc; memset (&state, '\0', sizeof (mbstate_t)); if (mbrtowc (&wc, input + 3, 6, &state) != 4 && mbtowc (&wc, input + 3, 6) == 4) return 1; } return 0; } _ACEOF rm -f conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' { (case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_try") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then gl_cv_func_mbrtowc_sanitycheck=yes else $as_echo "$as_me: program exited with status $ac_status" >&5 $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) gl_cv_func_mbrtowc_sanitycheck=no fi rm -rf conftest.dSYM rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi fi fi { $as_echo "$as_me:$LINENO: result: $gl_cv_func_mbrtowc_sanitycheck" >&5 $as_echo "$gl_cv_func_mbrtowc_sanitycheck" >&6; } REPLACE_MBSTATE_T=0 case "$gl_cv_func_mbrtowc_incomplete_state" in *yes) ;; *) REPLACE_MBSTATE_T=1 ;; esac case "$gl_cv_func_mbrtowc_sanitycheck" in *yes) ;; *) REPLACE_MBSTATE_T=1 ;; esac else REPLACE_MBSTATE_T=1 fi if test $REPLACE_MBSTATE_T = 1; then : fi if test $REPLACE_MBSTATE_T = 1; then REPLACE_WCRTOMB=1 fi : if test $ac_cv_func_wcrtomb = no; then HAVE_WCRTOMB=0 fi if test $HAVE_WCRTOMB != 0 && test $REPLACE_WCRTOMB != 1; then { $as_echo "$as_me:$LINENO: checking whether wcrtomb return value is correct" >&5 $as_echo_n "checking whether wcrtomb return value is correct... " >&6; } if test "${gl_cv_func_wcrtomb_retval+set}" = set; then $as_echo_n "(cached) " >&6 else case "$host_os" in # Guess no on AIX 4, OSF/1 and Solaris. aix4* | osf* | solaris*) gl_cv_func_wcrtomb_retval="guessing no" ;; # Guess yes otherwise. *) gl_cv_func_wcrtomb_retval="guessing yes" ;; esac if test $LOCALE_FR != none || test $LOCALE_FR_UTF8 != none || test $LOCALE_JA != none || test $LOCALE_ZH_CN != none; then if test "$cross_compiling" = yes; then : else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #include #include #include int main () { if (setlocale (LC_ALL, "$LOCALE_FR") != NULL) { if (wcrtomb (NULL, 0, NULL) != 1) return 1; } if (setlocale (LC_ALL, "$LOCALE_FR_UTF8") != NULL) { if (wcrtomb (NULL, 0, NULL) != 1) return 1; } if (setlocale (LC_ALL, "$LOCALE_JA") != NULL) { if (wcrtomb (NULL, 0, NULL) != 1) return 1; } if (setlocale (LC_ALL, "$LOCALE_ZH_CN") != NULL) { if (wcrtomb (NULL, 0, NULL) != 1) return 1; } return 0; } _ACEOF rm -f conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' { (case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_try") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then gl_cv_func_wcrtomb_retval=yes else $as_echo "$as_me: program exited with status $ac_status" >&5 $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) gl_cv_func_wcrtomb_retval=no fi rm -rf conftest.dSYM rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi fi fi { $as_echo "$as_me:$LINENO: result: $gl_cv_func_wcrtomb_retval" >&5 $as_echo "$gl_cv_func_wcrtomb_retval" >&6; } case "$gl_cv_func_wcrtomb_retval" in *yes) ;; *) REPLACE_WCRTOMB=1 ;; esac fi if test $HAVE_WCRTOMB = 0 || test $REPLACE_WCRTOMB = 1; then : gl_LIBOBJS="$gl_LIBOBJS wcrtomb.$ac_objext" : fi GNULIB_WCRTOMB=1 : if test $ac_cv_func_iswcntrl = yes; then HAVE_ISWCNTRL=1 else HAVE_ISWCNTRL=0 fi : if test $gt_cv_c_wint_t = yes; then HAVE_WINT_T=1 else HAVE_WINT_T=0 fi WCTYPE_H=wctype.h if test $ac_cv_header_wctype_h = yes; then if test $ac_cv_func_iswcntrl = yes; then { $as_echo "$as_me:$LINENO: checking whether iswcntrl works" >&5 $as_echo_n "checking whether iswcntrl works... " >&6; } if test "${gl_cv_func_iswcntrl_works+set}" = set; then $as_echo_n "(cached) " >&6 else if test "$cross_compiling" = yes; then cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #if __GNU_LIBRARY__ == 1 Linux libc5 i18n is broken. #endif int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then gl_cv_func_iswcntrl_works=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 gl_cv_func_iswcntrl_works=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #include #include #include #include int main () { return iswprint ('x') == 0; } _ACEOF rm -f conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' { (case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_try") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then gl_cv_func_iswcntrl_works=yes else $as_echo "$as_me: program exited with status $ac_status" >&5 $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) gl_cv_func_iswcntrl_works=no fi rm -rf conftest.dSYM rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi fi { $as_echo "$as_me:$LINENO: result: $gl_cv_func_iswcntrl_works" >&5 $as_echo "$gl_cv_func_iswcntrl_works" >&6; } if test $gl_cv_func_iswcntrl_works = yes; then case "$host_os" in mingw*) ;; *) WCTYPE_H= ;; esac fi fi : if test $gl_cv_have_include_next = yes; then gl_cv_next_wctype_h='<'wctype.h'>' else { $as_echo "$as_me:$LINENO: checking absolute name of " >&5 $as_echo_n "checking absolute name of ... " >&6; } if test "${gl_cv_next_wctype_h+set}" = set; then $as_echo_n "(cached) " >&6 else if test $ac_cv_header_wctype_h = yes; then cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF case "$host_os" in aix*) gl_absname_cpp="$ac_cpp -C" ;; *) gl_absname_cpp="$ac_cpp" ;; esac gl_cv_next_wctype_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 | sed -n '\#/wctype.h#{ s#.*"\(.*/wctype.h\)".*#\1# s#^/[^/]#//&# p q }'`'"' else gl_cv_next_wctype_h='<'wctype.h'>' fi fi { $as_echo "$as_me:$LINENO: result: $gl_cv_next_wctype_h" >&5 $as_echo "$gl_cv_next_wctype_h" >&6; } fi NEXT_WCTYPE_H=$gl_cv_next_wctype_h if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next' gl_next_as_first_directive='<'wctype.h'>' else # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include' gl_next_as_first_directive=$gl_cv_next_wctype_h fi NEXT_AS_FIRST_DIRECTIVE_WCTYPE_H=$gl_next_as_first_directive HAVE_WCTYPE_H=1 else HAVE_WCTYPE_H=0 fi if test "$gl_cv_func_iswcntrl_works" = no; then REPLACE_ISWCNTRL=1 else REPLACE_ISWCNTRL=0 fi GNULIB_WRITE=1 for ac_header in stdint.h do as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 $as_echo_n "checking for $ac_header... " >&6; } if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then $as_echo_n "(cached) " >&6 fi ac_res=`eval 'as_val=${'$as_ac_Header'} $as_echo "$as_val"'` { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } else # Is the header compilable? { $as_echo "$as_me:$LINENO: checking $ac_header usability" >&5 $as_echo_n "checking $ac_header usability... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default #include <$ac_header> _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_header_compiler=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_compiler=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext { $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 $as_echo "$ac_header_compiler" >&6; } # Is the header present? { $as_echo "$as_me:$LINENO: checking $ac_header presence" >&5 $as_echo_n "checking $ac_header presence... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include <$ac_header> _ACEOF if { (ac_try="$ac_cpp conftest.$ac_ext" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null && { test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || test ! -s conftest.err }; then ac_header_preproc=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi rm -f conftest.err conftest.$ac_ext { $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 $as_echo "$ac_header_preproc" >&6; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in yes:no: ) { $as_echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 $as_echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 $as_echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} ac_header_preproc=yes ;; no:yes:* ) { $as_echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 $as_echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} { $as_echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 $as_echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} { $as_echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 $as_echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} { $as_echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 $as_echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 $as_echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} { $as_echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 $as_echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} ;; esac { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 $as_echo_n "checking for $ac_header... " >&6; } if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then $as_echo_n "(cached) " >&6 else eval "$as_ac_Header=\$ac_header_preproc" fi ac_res=`eval 'as_val=${'$as_ac_Header'} $as_echo "$as_val"'` { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } fi as_val=`eval 'as_val=${'$as_ac_Header'} $as_echo "$as_val"'` if test "x$as_val" = x""yes; then cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi done gltests_libdeps= gltests_ltlibdeps= gl_source_base='libmissing/tests' { $as_echo "$as_me:$LINENO: checking for a traditional french locale" >&5 $as_echo_n "checking for a traditional french locale... " >&6; } if test "${gt_cv_locale_fr+set}" = set; then $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #include #if HAVE_LANGINFO_CODESET # include #endif #include #include struct tm t; char buf[16]; int main () { /* Check whether the given locale name is recognized by the system. */ if (setlocale (LC_ALL, "") == NULL) return 1; /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646". On MacOS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET) is empty, and the behaviour of Tcl 8.4 in this locale is not useful. On OpenBSD 4.0, when an unsupported locale is specified, setlocale() succeeds but then nl_langinfo(CODESET) is "646". In this situation, some unit tests fail. */ #if HAVE_LANGINFO_CODESET { const char *cs = nl_langinfo (CODESET); if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0) return 1; } #endif #ifdef __CYGWIN__ /* On Cygwin, avoid locale names without encoding suffix, because the locale_charset() function relies on the encoding suffix. Note that LC_ALL is set on the command line. */ if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1; #endif /* Check whether in the abbreviation of the second month, the second character (should be U+00E9: LATIN SMALL LETTER E WITH ACUTE) is only one byte long. This excludes the UTF-8 encoding. */ t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4; if (strftime (buf, sizeof (buf), "%b", &t) < 3 || buf[2] != 'v') return 1; /* Check whether the decimal separator is a comma. On NetBSD 3.0 in the fr_FR.ISO8859-1 locale, localeconv()->decimal_point are nl_langinfo(RADIXCHAR) are both ".". */ if (localeconv () ->decimal_point[0] != ',') return 1; return 0; } _ACEOF if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && test -s conftest$ac_exeext; then # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because # otherwise on MacOS X 10.3.5 the LC_TIME=C from the beginning of the # configure script would override the LC_ALL setting. Likewise for # LC_CTYPE, which is also set at the beginning of the configure script. # Test for the usual locale name. if (LC_ALL=fr_FR LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then gt_cv_locale_fr=fr_FR else # Test for the locale name with explicit encoding suffix. if (LC_ALL=fr_FR.ISO-8859-1 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then gt_cv_locale_fr=fr_FR.ISO-8859-1 else # Test for the AIX, OSF/1, FreeBSD, NetBSD, OpenBSD locale name. if (LC_ALL=fr_FR.ISO8859-1 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then gt_cv_locale_fr=fr_FR.ISO8859-1 else # Test for the HP-UX locale name. if (LC_ALL=fr_FR.iso88591 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then gt_cv_locale_fr=fr_FR.iso88591 else # Test for the Solaris 7 locale name. if (LC_ALL=fr LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then gt_cv_locale_fr=fr else # None found. gt_cv_locale_fr=none fi fi fi fi fi fi rm -fr conftest* fi { $as_echo "$as_me:$LINENO: result: $gt_cv_locale_fr" >&5 $as_echo "$gt_cv_locale_fr" >&6; } LOCALE_FR=$gt_cv_locale_fr { $as_echo "$as_me:$LINENO: checking for a french Unicode locale" >&5 $as_echo_n "checking for a french Unicode locale... " >&6; } if test "${gt_cv_locale_fr_utf8+set}" = set; then $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #include #if HAVE_LANGINFO_CODESET # include #endif #include #include struct tm t; char buf[16]; int main () { /* On BeOS and Haiku, locales are not implemented in libc. Rather, libintl imitates locale dependent behaviour by looking at the environment variables, and all locales use the UTF-8 encoding. */ #if !(defined __BEOS__ || defined __HAIKU__) /* Check whether the given locale name is recognized by the system. */ if (setlocale (LC_ALL, "") == NULL) return 1; /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646". On MacOS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET) is empty, and the behaviour of Tcl 8.4 in this locale is not useful. On OpenBSD 4.0, when an unsupported locale is specified, setlocale() succeeds but then nl_langinfo(CODESET) is "646". In this situation, some unit tests fail. */ # if HAVE_LANGINFO_CODESET { const char *cs = nl_langinfo (CODESET); if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0) return 1; } # endif # ifdef __CYGWIN__ /* On Cygwin, avoid locale names without encoding suffix, because the locale_charset() function relies on the encoding suffix. Note that LC_ALL is set on the command line. */ if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1; # endif /* Check whether in the abbreviation of the second month, the second character (should be U+00E9: LATIN SMALL LETTER E WITH ACUTE) is two bytes long, with UTF-8 encoding. */ t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4; if (strftime (buf, sizeof (buf), "%b", &t) < 4 || buf[1] != (char) 0xc3 || buf[2] != (char) 0xa9 || buf[3] != 'v') return 1; #endif /* Check whether the decimal separator is a comma. On NetBSD 3.0 in the fr_FR.ISO8859-1 locale, localeconv()->decimal_point are nl_langinfo(RADIXCHAR) are both ".". */ if (localeconv () ->decimal_point[0] != ',') return 1; return 0; } _ACEOF if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && test -s conftest$ac_exeext; then # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because # otherwise on MacOS X 10.3.5 the LC_TIME=C from the beginning of the # configure script would override the LC_ALL setting. Likewise for # LC_CTYPE, which is also set at the beginning of the configure script. # Test for the usual locale name. if (LC_ALL=fr_FR LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then gt_cv_locale_fr_utf8=fr_FR else # Test for the locale name with explicit encoding suffix. if (LC_ALL=fr_FR.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then gt_cv_locale_fr_utf8=fr_FR.UTF-8 else # Test for the Solaris 7 locale name. if (LC_ALL=fr.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then gt_cv_locale_fr_utf8=fr.UTF-8 else # None found. gt_cv_locale_fr_utf8=none fi fi fi fi rm -fr conftest* fi { $as_echo "$as_me:$LINENO: result: $gt_cv_locale_fr_utf8" >&5 $as_echo "$gt_cv_locale_fr_utf8" >&6; } LOCALE_FR_UTF8=$gt_cv_locale_fr_utf8 { $as_echo "$as_me:$LINENO: checking for a traditional french locale" >&5 $as_echo_n "checking for a traditional french locale... " >&6; } if test "${gt_cv_locale_fr+set}" = set; then $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #include #if HAVE_LANGINFO_CODESET # include #endif #include #include struct tm t; char buf[16]; int main () { /* Check whether the given locale name is recognized by the system. */ if (setlocale (LC_ALL, "") == NULL) return 1; /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646". On MacOS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET) is empty, and the behaviour of Tcl 8.4 in this locale is not useful. On OpenBSD 4.0, when an unsupported locale is specified, setlocale() succeeds but then nl_langinfo(CODESET) is "646". In this situation, some unit tests fail. */ #if HAVE_LANGINFO_CODESET { const char *cs = nl_langinfo (CODESET); if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0) return 1; } #endif #ifdef __CYGWIN__ /* On Cygwin, avoid locale names without encoding suffix, because the locale_charset() function relies on the encoding suffix. Note that LC_ALL is set on the command line. */ if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1; #endif /* Check whether in the abbreviation of the second month, the second character (should be U+00E9: LATIN SMALL LETTER E WITH ACUTE) is only one byte long. This excludes the UTF-8 encoding. */ t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4; if (strftime (buf, sizeof (buf), "%b", &t) < 3 || buf[2] != 'v') return 1; /* Check whether the decimal separator is a comma. On NetBSD 3.0 in the fr_FR.ISO8859-1 locale, localeconv()->decimal_point are nl_langinfo(RADIXCHAR) are both ".". */ if (localeconv () ->decimal_point[0] != ',') return 1; return 0; } _ACEOF if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && test -s conftest$ac_exeext; then # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because # otherwise on MacOS X 10.3.5 the LC_TIME=C from the beginning of the # configure script would override the LC_ALL setting. Likewise for # LC_CTYPE, which is also set at the beginning of the configure script. # Test for the usual locale name. if (LC_ALL=fr_FR LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then gt_cv_locale_fr=fr_FR else # Test for the locale name with explicit encoding suffix. if (LC_ALL=fr_FR.ISO-8859-1 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then gt_cv_locale_fr=fr_FR.ISO-8859-1 else # Test for the AIX, OSF/1, FreeBSD, NetBSD, OpenBSD locale name. if (LC_ALL=fr_FR.ISO8859-1 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then gt_cv_locale_fr=fr_FR.ISO8859-1 else # Test for the HP-UX locale name. if (LC_ALL=fr_FR.iso88591 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then gt_cv_locale_fr=fr_FR.iso88591 else # Test for the Solaris 7 locale name. if (LC_ALL=fr LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then gt_cv_locale_fr=fr else # None found. gt_cv_locale_fr=none fi fi fi fi fi fi rm -fr conftest* fi { $as_echo "$as_me:$LINENO: result: $gt_cv_locale_fr" >&5 $as_echo "$gt_cv_locale_fr" >&6; } LOCALE_FR=$gt_cv_locale_fr { $as_echo "$as_me:$LINENO: checking for a turkish Unicode locale" >&5 $as_echo_n "checking for a turkish Unicode locale... " >&6; } if test "${gt_cv_locale_tr_utf8+set}" = set; then $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #include #if HAVE_LANGINFO_CODESET # include #endif #include #include struct tm t; char buf[16]; int main () { /* On BeOS, locales are not implemented in libc. Rather, libintl imitates locale dependent behaviour by looking at the environment variables, and all locales use the UTF-8 encoding. But BeOS does not implement the Turkish upper-/lowercase mappings. Therefore, let this program return 1 on BeOS. */ /* Check whether the given locale name is recognized by the system. */ if (setlocale (LC_ALL, "") == NULL) return 1; /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646". On MacOS X 10.3.5 (Darwin 7.5) in the tr_TR locale, nl_langinfo(CODESET) is empty, and the behaviour of Tcl 8.4 in this locale is not useful. On OpenBSD 4.0, when an unsupported locale is specified, setlocale() succeeds but then nl_langinfo(CODESET) is "646". In this situation, some unit tests fail. */ #if HAVE_LANGINFO_CODESET { const char *cs = nl_langinfo (CODESET); if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0) return 1; } #endif #ifdef __CYGWIN__ /* On Cygwin, avoid locale names without encoding suffix, because the locale_charset() function relies on the encoding suffix. Note that LC_ALL is set on the command line. */ if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1; #endif /* Check whether in the abbreviation of the eighth month, the second character (should be U+011F: LATIN SMALL LETTER G WITH BREVE) is two bytes long, with UTF-8 encoding. */ t.tm_year = 1992 - 1900; t.tm_mon = 8 - 1; t.tm_mday = 19; if (strftime (buf, sizeof (buf), "%b", &t) < 4 || buf[1] != (char) 0xc4 || buf[2] != (char) 0x9f) return 1; /* Check whether the upper-/lowercase mappings are as expected for Turkish. */ if (towupper ('i') != 0x0130 || towlower (0x0130) != 'i' || towupper(0x0131) != 'I' || towlower ('I') != 0x0131) return 1; return 0; } _ACEOF if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && test -s conftest$ac_exeext; then # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because # otherwise on MacOS X 10.3.5 the LC_TIME=C from the beginning of the # configure script would override the LC_ALL setting. Likewise for # LC_CTYPE, which is also set at the beginning of the configure script. # Test for the usual locale name. if (LC_ALL=tr_TR LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then gt_cv_locale_tr_utf8=tr_TR else # Test for the locale name with explicit encoding suffix. if (LC_ALL=tr_TR.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then gt_cv_locale_tr_utf8=tr_TR.UTF-8 else # Test for the Solaris 7 locale name. if (LC_ALL=tr.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then gt_cv_locale_tr_utf8=tr.UTF-8 else # None found. gt_cv_locale_tr_utf8=none fi fi fi else gt_cv_locale_tr_utf8=none fi rm -fr conftest* fi { $as_echo "$as_me:$LINENO: result: $gt_cv_locale_tr_utf8" >&5 $as_echo "$gt_cv_locale_tr_utf8" >&6; } LOCALE_TR_UTF8=$gt_cv_locale_tr_utf8 : if test $gl_cv_have_include_next = yes; then gl_cv_next_fcntl_h='<'fcntl.h'>' else { $as_echo "$as_me:$LINENO: checking absolute name of " >&5 $as_echo_n "checking absolute name of ... " >&6; } if test "${gl_cv_next_fcntl_h+set}" = set; then $as_echo_n "(cached) " >&6 else if test $ac_cv_header_fcntl_h = yes; then cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF case "$host_os" in aix*) gl_absname_cpp="$ac_cpp -C" ;; *) gl_absname_cpp="$ac_cpp" ;; esac gl_cv_next_fcntl_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 | sed -n '\#/fcntl.h#{ s#.*"\(.*/fcntl.h\)".*#\1# s#^/[^/]#//&# p q }'`'"' else gl_cv_next_fcntl_h='<'fcntl.h'>' fi fi { $as_echo "$as_me:$LINENO: result: $gl_cv_next_fcntl_h" >&5 $as_echo "$gl_cv_next_fcntl_h" >&6; } fi NEXT_FCNTL_H=$gl_cv_next_fcntl_h if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next' gl_next_as_first_directive='<'fcntl.h'>' else # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include' gl_next_as_first_directive=$gl_cv_next_fcntl_h fi NEXT_AS_FIRST_DIRECTIVE_FCNTL_H=$gl_next_as_first_directive for gl_func in fcntl openat; do as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh` { $as_echo "$as_me:$LINENO: checking whether $gl_func is declared without a macro" >&5 $as_echo_n "checking whether $gl_func is declared without a macro... " >&6; } if { as_var=$as_gl_Symbol; eval "test \"\${$as_var+set}\" = set"; }; then $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include int main () { #undef $gl_func (void) $gl_func; ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then eval "$as_gl_Symbol=yes" else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 eval "$as_gl_Symbol=no" fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi ac_res=`eval 'as_val=${'$as_gl_Symbol'} $as_echo "$as_val"'` { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } as_val=`eval 'as_val=${'$as_gl_Symbol'} $as_echo "$as_val"'` if test "x$as_val" = x""yes; then cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1 _ACEOF eval ac_cv_have_decl_$gl_func=yes fi done for ac_func in getpagesize do as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` { $as_echo "$as_me:$LINENO: checking for $ac_func" >&5 $as_echo_n "checking for $ac_func... " >&6; } if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Define $ac_func to an innocuous variant, in case declares $ac_func. For example, HP-UX 11i declares gettimeofday. */ #define $ac_func innocuous_$ac_func /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $ac_func (); below. Prefer to if __STDC__ is defined, since exists even on freestanding compilers. */ #ifdef __STDC__ # include #else # include #endif #undef $ac_func /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char $ac_func (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined __stub_$ac_func || defined __stub___$ac_func choke me #endif int main () { return $ac_func (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || $as_test_x conftest$ac_exeext }; then eval "$as_ac_var=yes" else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 eval "$as_ac_var=no" fi rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi ac_res=`eval 'as_val=${'$as_ac_var'} $as_echo "$as_val"'` { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } as_val=`eval 'as_val=${'$as_ac_var'} $as_echo "$as_val"'` if test "x$as_val" = x""yes; then cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF fi done if test $ac_cv_func_getpagesize = no; then HAVE_GETPAGESIZE=0 for ac_header in OS.h do as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 $as_echo_n "checking for $ac_header... " >&6; } if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then $as_echo_n "(cached) " >&6 fi ac_res=`eval 'as_val=${'$as_ac_Header'} $as_echo "$as_val"'` { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } else # Is the header compilable? { $as_echo "$as_me:$LINENO: checking $ac_header usability" >&5 $as_echo_n "checking $ac_header usability... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default #include <$ac_header> _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_header_compiler=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_compiler=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext { $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 $as_echo "$ac_header_compiler" >&6; } # Is the header present? { $as_echo "$as_me:$LINENO: checking $ac_header presence" >&5 $as_echo_n "checking $ac_header presence... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include <$ac_header> _ACEOF if { (ac_try="$ac_cpp conftest.$ac_ext" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null && { test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || test ! -s conftest.err }; then ac_header_preproc=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi rm -f conftest.err conftest.$ac_ext { $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 $as_echo "$ac_header_preproc" >&6; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in yes:no: ) { $as_echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 $as_echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 $as_echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} ac_header_preproc=yes ;; no:yes:* ) { $as_echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 $as_echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} { $as_echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 $as_echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} { $as_echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 $as_echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} { $as_echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 $as_echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 $as_echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} { $as_echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 $as_echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} ;; esac { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 $as_echo_n "checking for $ac_header... " >&6; } if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then $as_echo_n "(cached) " >&6 else eval "$as_ac_Header=\$ac_header_preproc" fi ac_res=`eval 'as_val=${'$as_ac_Header'} $as_echo "$as_val"'` { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } fi as_val=`eval 'as_val=${'$as_ac_Header'} $as_echo "$as_val"'` if test "x$as_val" = x""yes; then cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi done if test $ac_cv_header_OS_h = yes; then HAVE_OS_H=1 fi for ac_header in sys/param.h do as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 $as_echo_n "checking for $ac_header... " >&6; } if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then $as_echo_n "(cached) " >&6 fi ac_res=`eval 'as_val=${'$as_ac_Header'} $as_echo "$as_val"'` { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } else # Is the header compilable? { $as_echo "$as_me:$LINENO: checking $ac_header usability" >&5 $as_echo_n "checking $ac_header usability... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default #include <$ac_header> _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_header_compiler=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_compiler=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext { $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 $as_echo "$ac_header_compiler" >&6; } # Is the header present? { $as_echo "$as_me:$LINENO: checking $ac_header presence" >&5 $as_echo_n "checking $ac_header presence... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include <$ac_header> _ACEOF if { (ac_try="$ac_cpp conftest.$ac_ext" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null && { test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || test ! -s conftest.err }; then ac_header_preproc=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi rm -f conftest.err conftest.$ac_ext { $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 $as_echo "$ac_header_preproc" >&6; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in yes:no: ) { $as_echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 $as_echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 $as_echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} ac_header_preproc=yes ;; no:yes:* ) { $as_echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 $as_echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} { $as_echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 $as_echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} { $as_echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 $as_echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} { $as_echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 $as_echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 $as_echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} { $as_echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 $as_echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} ;; esac { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 $as_echo_n "checking for $ac_header... " >&6; } if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then $as_echo_n "(cached) " >&6 else eval "$as_ac_Header=\$ac_header_preproc" fi ac_res=`eval 'as_val=${'$as_ac_Header'} $as_echo "$as_val"'` { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } fi as_val=`eval 'as_val=${'$as_ac_Header'} $as_echo "$as_val"'` if test "x$as_val" = x""yes; then cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi done if test $ac_cv_header_sys_param_h = yes; then HAVE_SYS_PARAM_H=1 fi fi case "$host_os" in mingw*) REPLACE_GETPAGESIZE=1 gltests_LIBOBJS="$gltests_LIBOBJS getpagesize.$ac_objext" ;; esac GNULIB_GETPAGESIZE=1 { $as_echo "$as_me:$LINENO: checking whether byte ordering is bigendian" >&5 $as_echo_n "checking whether byte ordering is bigendian... " >&6; } if test "${ac_cv_c_bigendian+set}" = set; then $as_echo_n "(cached) " >&6 else ac_cv_c_bigendian=unknown # See if we're dealing with a universal compiler. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #ifndef __APPLE_CC__ not a universal capable compiler #endif typedef int dummy; _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then # Check for potential -arch flags. It is not universal unless # there are some -arch flags. Note that *ppc* also matches # ppc64. This check is also rather less than ideal. case "${CC} ${CFLAGS} ${CPPFLAGS} ${LDFLAGS}" in #( *-arch*ppc*|*-arch*i386*|*-arch*x86_64*) ac_cv_c_bigendian=universal;; esac else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext if test $ac_cv_c_bigendian = unknown; then # See if sys/param.h defines the BYTE_ORDER macro. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #include int main () { #if ! (defined BYTE_ORDER && defined BIG_ENDIAN \ && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \ && LITTLE_ENDIAN) bogus endian macros #endif ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then # It does; now see whether it defined to BIG_ENDIAN or not. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #include int main () { #if BYTE_ORDER != BIG_ENDIAN not big endian #endif ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_cv_c_bigendian=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_c_bigendian=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi if test $ac_cv_c_bigendian = unknown; then # See if defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris). cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include int main () { #if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN) bogus endian macros #endif ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then # It does; now see whether it defined to _BIG_ENDIAN or not. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include int main () { #ifndef _BIG_ENDIAN not big endian #endif ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_cv_c_bigendian=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_c_bigendian=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi if test $ac_cv_c_bigendian = unknown; then # Compile a test program. if test "$cross_compiling" = yes; then # Try to guess by grepping values from an object file. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ short int ascii_mm[] = { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 }; short int ascii_ii[] = { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 }; int use_ascii (int i) { return ascii_mm[i] + ascii_ii[i]; } short int ebcdic_ii[] = { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 }; short int ebcdic_mm[] = { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 }; int use_ebcdic (int i) { return ebcdic_mm[i] + ebcdic_ii[i]; } extern int foo; int main () { return use_ascii (foo) == use_ebcdic (foo); ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then ac_cv_c_bigendian=yes fi if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then if test "$ac_cv_c_bigendian" = unknown; then ac_cv_c_bigendian=no else # finding both strings is unlikely to happen, but who knows? ac_cv_c_bigendian=unknown fi fi else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default int main () { /* Are we little or big endian? From Harbison&Steele. */ union { long int l; char c[sizeof (long int)]; } u; u.l = 1; return u.c[sizeof (long int) - 1] == 1; ; return 0; } _ACEOF rm -f conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' { (case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_try") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_c_bigendian=no else $as_echo "$as_me: program exited with status $ac_status" >&5 $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) ac_cv_c_bigendian=yes fi rm -rf conftest.dSYM rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi fi fi { $as_echo "$as_me:$LINENO: result: $ac_cv_c_bigendian" >&5 $as_echo "$ac_cv_c_bigendian" >&6; } case $ac_cv_c_bigendian in #( yes) cat >>confdefs.h <<\_ACEOF #define WORDS_BIGENDIAN 1 _ACEOF ;; #( no) ;; #( universal) cat >>confdefs.h <<\_ACEOF #define AC_APPLE_UNIVERSAL_BUILD 1 _ACEOF ;; #( *) { { $as_echo "$as_me:$LINENO: error: unknown endianness presetting ac_cv_c_bigendian=no (or yes) will help" >&5 $as_echo "$as_me: error: unknown endianness presetting ac_cv_c_bigendian=no (or yes) will help" >&2;} { (exit 1); exit 1; }; } ;; esac { $as_echo "$as_me:$LINENO: checking whether byte ordering is bigendian" >&5 $as_echo_n "checking whether byte ordering is bigendian... " >&6; } if test "${ac_cv_c_bigendian+set}" = set; then $as_echo_n "(cached) " >&6 else ac_cv_c_bigendian=unknown # See if we're dealing with a universal compiler. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #ifndef __APPLE_CC__ not a universal capable compiler #endif typedef int dummy; _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then # Check for potential -arch flags. It is not universal unless # there are some -arch flags. Note that *ppc* also matches # ppc64. This check is also rather less than ideal. case "${CC} ${CFLAGS} ${CPPFLAGS} ${LDFLAGS}" in #( *-arch*ppc*|*-arch*i386*|*-arch*x86_64*) ac_cv_c_bigendian=universal;; esac else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext if test $ac_cv_c_bigendian = unknown; then # See if sys/param.h defines the BYTE_ORDER macro. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #include int main () { #if ! (defined BYTE_ORDER && defined BIG_ENDIAN \ && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \ && LITTLE_ENDIAN) bogus endian macros #endif ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then # It does; now see whether it defined to BIG_ENDIAN or not. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #include int main () { #if BYTE_ORDER != BIG_ENDIAN not big endian #endif ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_cv_c_bigendian=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_c_bigendian=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi if test $ac_cv_c_bigendian = unknown; then # See if defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris). cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include int main () { #if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN) bogus endian macros #endif ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then # It does; now see whether it defined to _BIG_ENDIAN or not. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include int main () { #ifndef _BIG_ENDIAN not big endian #endif ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_cv_c_bigendian=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_c_bigendian=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi if test $ac_cv_c_bigendian = unknown; then # Compile a test program. if test "$cross_compiling" = yes; then # Try to guess by grepping values from an object file. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ short int ascii_mm[] = { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 }; short int ascii_ii[] = { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 }; int use_ascii (int i) { return ascii_mm[i] + ascii_ii[i]; } short int ebcdic_ii[] = { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 }; short int ebcdic_mm[] = { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 }; int use_ebcdic (int i) { return ebcdic_mm[i] + ebcdic_ii[i]; } extern int foo; int main () { return use_ascii (foo) == use_ebcdic (foo); ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then ac_cv_c_bigendian=yes fi if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then if test "$ac_cv_c_bigendian" = unknown; then ac_cv_c_bigendian=no else # finding both strings is unlikely to happen, but who knows? ac_cv_c_bigendian=unknown fi fi else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default int main () { /* Are we little or big endian? From Harbison&Steele. */ union { long int l; char c[sizeof (long int)]; } u; u.l = 1; return u.c[sizeof (long int) - 1] == 1; ; return 0; } _ACEOF rm -f conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' { (case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_try") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_c_bigendian=no else $as_echo "$as_me: program exited with status $ac_status" >&5 $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) ac_cv_c_bigendian=yes fi rm -rf conftest.dSYM rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi fi fi { $as_echo "$as_me:$LINENO: result: $ac_cv_c_bigendian" >&5 $as_echo "$ac_cv_c_bigendian" >&6; } case $ac_cv_c_bigendian in #( yes) cat >>confdefs.h <<\_ACEOF #define WORDS_BIGENDIAN 1 _ACEOF ;; #( no) ;; #( universal) cat >>confdefs.h <<\_ACEOF #define AC_APPLE_UNIVERSAL_BUILD 1 _ACEOF ;; #( *) { { $as_echo "$as_me:$LINENO: error: unknown endianness presetting ac_cv_c_bigendian=no (or yes) will help" >&5 $as_echo "$as_me: error: unknown endianness presetting ac_cv_c_bigendian=no (or yes) will help" >&2;} { (exit 1); exit 1; }; } ;; esac { $as_echo "$as_me:$LINENO: checking where to find the exponent in a 'double'" >&5 $as_echo_n "checking where to find the exponent in a 'double'... " >&6; } if test "${gl_cv_cc_double_expbit0+set}" = set; then $as_echo_n "(cached) " >&6 else if test "$cross_compiling" = yes; then cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #if defined arm || defined __arm || defined __arm__ mixed_endianness #endif _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "mixed_endianness" >/dev/null 2>&1; then gl_cv_cc_double_expbit0="unknown" else : if test "${ac_cv_c_bigendian+set}" = set; then $as_echo_n "(cached) " >&6 else ac_cv_c_bigendian=unknown # See if we're dealing with a universal compiler. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #ifndef __APPLE_CC__ not a universal capable compiler #endif typedef int dummy; _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then # Check for potential -arch flags. It is not universal unless # there are some -arch flags. Note that *ppc* also matches # ppc64. This check is also rather less than ideal. case "${CC} ${CFLAGS} ${CPPFLAGS} ${LDFLAGS}" in #( *-arch*ppc*|*-arch*i386*|*-arch*x86_64*) ac_cv_c_bigendian=universal;; esac else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext if test $ac_cv_c_bigendian = unknown; then # See if sys/param.h defines the BYTE_ORDER macro. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #include int main () { #if ! (defined BYTE_ORDER && defined BIG_ENDIAN \ && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \ && LITTLE_ENDIAN) bogus endian macros #endif ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then # It does; now see whether it defined to BIG_ENDIAN or not. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #include int main () { #if BYTE_ORDER != BIG_ENDIAN not big endian #endif ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_cv_c_bigendian=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_c_bigendian=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi if test $ac_cv_c_bigendian = unknown; then # See if defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris). cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include int main () { #if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN) bogus endian macros #endif ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then # It does; now see whether it defined to _BIG_ENDIAN or not. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include int main () { #ifndef _BIG_ENDIAN not big endian #endif ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_cv_c_bigendian=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_c_bigendian=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi if test $ac_cv_c_bigendian = unknown; then # Compile a test program. if test "$cross_compiling" = yes; then # Try to guess by grepping values from an object file. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ short int ascii_mm[] = { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 }; short int ascii_ii[] = { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 }; int use_ascii (int i) { return ascii_mm[i] + ascii_ii[i]; } short int ebcdic_ii[] = { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 }; short int ebcdic_mm[] = { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 }; int use_ebcdic (int i) { return ebcdic_mm[i] + ebcdic_ii[i]; } extern int foo; int main () { return use_ascii (foo) == use_ebcdic (foo); ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then ac_cv_c_bigendian=yes fi if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then if test "$ac_cv_c_bigendian" = unknown; then ac_cv_c_bigendian=no else # finding both strings is unlikely to happen, but who knows? ac_cv_c_bigendian=unknown fi fi else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default int main () { /* Are we little or big endian? From Harbison&Steele. */ union { long int l; char c[sizeof (long int)]; } u; u.l = 1; return u.c[sizeof (long int) - 1] == 1; ; return 0; } _ACEOF rm -f conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' { (case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_try") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_c_bigendian=no else $as_echo "$as_me: program exited with status $ac_status" >&5 $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) ac_cv_c_bigendian=yes fi rm -rf conftest.dSYM rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi fi fi : case $ac_cv_c_bigendian in #( yes) gl_cv_cc_double_expbit0="word 0 bit 20";; #( no) gl_cv_cc_double_expbit0="word 1 bit 20" ;; #( universal) cat >>confdefs.h <<\_ACEOF #define AC_APPLE_UNIVERSAL_BUILD 1 _ACEOF ;; #( *) gl_cv_cc_double_expbit0="unknown" ;; esac fi rm -f conftest* else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #include #include #include #define NWORDS \ ((sizeof (double) + sizeof (unsigned int) - 1) / sizeof (unsigned int)) typedef union { double value; unsigned int word[NWORDS]; } memory_double; static unsigned int ored_words[NWORDS]; static unsigned int anded_words[NWORDS]; static void add_to_ored_words (double x) { memory_double m; size_t i; /* Clear it first, in case sizeof (double) < sizeof (memory_double). */ memset (&m, 0, sizeof (memory_double)); m.value = x; for (i = 0; i < NWORDS; i++) { ored_words[i] |= m.word[i]; anded_words[i] &= m.word[i]; } } int main () { size_t j; FILE *fp = fopen ("conftest.out", "w"); if (fp == NULL) return 1; for (j = 0; j < NWORDS; j++) anded_words[j] = ~ (unsigned int) 0; add_to_ored_words (0.25); add_to_ored_words (0.5); add_to_ored_words (1.0); add_to_ored_words (2.0); add_to_ored_words (4.0); /* Remove bits that are common (e.g. if representation of the first mantissa bit is explicit). */ for (j = 0; j < NWORDS; j++) ored_words[j] &= ~anded_words[j]; /* Now find the nonzero word. */ for (j = 0; j < NWORDS; j++) if (ored_words[j] != 0) break; if (j < NWORDS) { size_t i; for (i = j + 1; i < NWORDS; i++) if (ored_words[i] != 0) { fprintf (fp, "unknown"); return (fclose (fp) != 0); } for (i = 0; ; i++) if ((ored_words[j] >> i) & 1) { fprintf (fp, "word %d bit %d", (int) j, (int) i); return (fclose (fp) != 0); } } fprintf (fp, "unknown"); return (fclose (fp) != 0); } _ACEOF rm -f conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' { (case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_try") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then gl_cv_cc_double_expbit0=`cat conftest.out` else $as_echo "$as_me: program exited with status $ac_status" >&5 $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) gl_cv_cc_double_expbit0="unknown" fi rm -rf conftest.dSYM rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi rm -f conftest.out fi { $as_echo "$as_me:$LINENO: result: $gl_cv_cc_double_expbit0" >&5 $as_echo "$gl_cv_cc_double_expbit0" >&6; } case "$gl_cv_cc_double_expbit0" in word*bit*) word=`echo "$gl_cv_cc_double_expbit0" | sed -e 's/word //' -e 's/ bit.*//'` bit=`echo "$gl_cv_cc_double_expbit0" | sed -e 's/word.*bit //'` cat >>confdefs.h <<_ACEOF #define DBL_EXPBIT0_WORD $word _ACEOF cat >>confdefs.h <<_ACEOF #define DBL_EXPBIT0_BIT $bit _ACEOF ;; esac { $as_echo "$as_me:$LINENO: checking where to find the exponent in a 'float'" >&5 $as_echo_n "checking where to find the exponent in a 'float'... " >&6; } if test "${gl_cv_cc_float_expbit0+set}" = set; then $as_echo_n "(cached) " >&6 else if test "$cross_compiling" = yes; then gl_cv_cc_float_expbit0="word 0 bit 23" else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #include #include #include #define NWORDS \ ((sizeof (float) + sizeof (unsigned int) - 1) / sizeof (unsigned int)) typedef union { float value; unsigned int word[NWORDS]; } memory_float; static unsigned int ored_words[NWORDS]; static unsigned int anded_words[NWORDS]; static void add_to_ored_words (float x) { memory_float m; size_t i; /* Clear it first, in case sizeof (float) < sizeof (memory_float). */ memset (&m, 0, sizeof (memory_float)); m.value = x; for (i = 0; i < NWORDS; i++) { ored_words[i] |= m.word[i]; anded_words[i] &= m.word[i]; } } int main () { size_t j; FILE *fp = fopen ("conftest.out", "w"); if (fp == NULL) return 1; for (j = 0; j < NWORDS; j++) anded_words[j] = ~ (unsigned int) 0; add_to_ored_words (0.25f); add_to_ored_words (0.5f); add_to_ored_words (1.0f); add_to_ored_words (2.0f); add_to_ored_words (4.0f); /* Remove bits that are common (e.g. if representation of the first mantissa bit is explicit). */ for (j = 0; j < NWORDS; j++) ored_words[j] &= ~anded_words[j]; /* Now find the nonzero word. */ for (j = 0; j < NWORDS; j++) if (ored_words[j] != 0) break; if (j < NWORDS) { size_t i; for (i = j + 1; i < NWORDS; i++) if (ored_words[i] != 0) { fprintf (fp, "unknown"); return (fclose (fp) != 0); } for (i = 0; ; i++) if ((ored_words[j] >> i) & 1) { fprintf (fp, "word %d bit %d", (int) j, (int) i); return (fclose (fp) != 0); } } fprintf (fp, "unknown"); return (fclose (fp) != 0); } _ACEOF rm -f conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' { (case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_try") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then gl_cv_cc_float_expbit0=`cat conftest.out` else $as_echo "$as_me: program exited with status $ac_status" >&5 $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) gl_cv_cc_float_expbit0="unknown" fi rm -rf conftest.dSYM rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi rm -f conftest.out fi { $as_echo "$as_me:$LINENO: result: $gl_cv_cc_float_expbit0" >&5 $as_echo "$gl_cv_cc_float_expbit0" >&6; } case "$gl_cv_cc_float_expbit0" in word*bit*) word=`echo "$gl_cv_cc_float_expbit0" | sed -e 's/word //' -e 's/ bit.*//'` bit=`echo "$gl_cv_cc_float_expbit0" | sed -e 's/word.*bit //'` cat >>confdefs.h <<_ACEOF #define FLT_EXPBIT0_WORD $word _ACEOF cat >>confdefs.h <<_ACEOF #define FLT_EXPBIT0_BIT $bit _ACEOF ;; esac { $as_echo "$as_me:$LINENO: checking where to find the exponent in a 'long double'" >&5 $as_echo_n "checking where to find the exponent in a 'long double'... " >&6; } if test "${gl_cv_cc_long_double_expbit0+set}" = set; then $as_echo_n "(cached) " >&6 else if test "$cross_compiling" = yes; then gl_cv_cc_long_double_expbit0="unknown" else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #include #include #include #define NWORDS \ ((sizeof (long double) + sizeof (unsigned int) - 1) / sizeof (unsigned int)) typedef union { long double value; unsigned int word[NWORDS]; } memory_long_double; static unsigned int ored_words[NWORDS]; static unsigned int anded_words[NWORDS]; static void add_to_ored_words (long double x) { memory_long_double m; size_t i; /* Clear it first, in case sizeof (long double) < sizeof (memory_long_double). */ memset (&m, 0, sizeof (memory_long_double)); m.value = x; for (i = 0; i < NWORDS; i++) { ored_words[i] |= m.word[i]; anded_words[i] &= m.word[i]; } } int main () { size_t j; FILE *fp = fopen ("conftest.out", "w"); if (fp == NULL) return 1; for (j = 0; j < NWORDS; j++) anded_words[j] = ~ (unsigned int) 0; add_to_ored_words (0.25L); add_to_ored_words (0.5L); add_to_ored_words (1.0L); add_to_ored_words (2.0L); add_to_ored_words (4.0L); /* Remove bits that are common (e.g. if representation of the first mantissa bit is explicit). */ for (j = 0; j < NWORDS; j++) ored_words[j] &= ~anded_words[j]; /* Now find the nonzero word. */ for (j = 0; j < NWORDS; j++) if (ored_words[j] != 0) break; if (j < NWORDS) { size_t i; for (i = j + 1; i < NWORDS; i++) if (ored_words[i] != 0) { fprintf (fp, "unknown"); return (fclose (fp) != 0); } for (i = 0; ; i++) if ((ored_words[j] >> i) & 1) { fprintf (fp, "word %d bit %d", (int) j, (int) i); return (fclose (fp) != 0); } } fprintf (fp, "unknown"); return (fclose (fp) != 0); } _ACEOF rm -f conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' { (case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_try") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then gl_cv_cc_long_double_expbit0=`cat conftest.out` else $as_echo "$as_me: program exited with status $ac_status" >&5 $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) gl_cv_cc_long_double_expbit0="unknown" fi rm -rf conftest.dSYM rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi rm -f conftest.out fi { $as_echo "$as_me:$LINENO: result: $gl_cv_cc_long_double_expbit0" >&5 $as_echo "$gl_cv_cc_long_double_expbit0" >&6; } case "$gl_cv_cc_long_double_expbit0" in word*bit*) word=`echo "$gl_cv_cc_long_double_expbit0" | sed -e 's/word //' -e 's/ bit.*//'` bit=`echo "$gl_cv_cc_long_double_expbit0" | sed -e 's/word.*bit //'` cat >>confdefs.h <<_ACEOF #define LDBL_EXPBIT0_WORD $word _ACEOF cat >>confdefs.h <<_ACEOF #define LDBL_EXPBIT0_BIT $bit _ACEOF ;; esac : if test $ac_cv_func_lstat = yes; then if test $ac_cv_func_lstat_dereferences_slashed_symlink = no; then REPLACE_LSTAT=1 fi # Prerequisites of lib/lstat.c. else HAVE_LSTAT=0 fi GNULIB_LSTAT=1 { $as_echo "$as_me:$LINENO: checking for a traditional french locale" >&5 $as_echo_n "checking for a traditional french locale... " >&6; } if test "${gt_cv_locale_fr+set}" = set; then $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #include #if HAVE_LANGINFO_CODESET # include #endif #include #include struct tm t; char buf[16]; int main () { /* Check whether the given locale name is recognized by the system. */ if (setlocale (LC_ALL, "") == NULL) return 1; /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646". On MacOS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET) is empty, and the behaviour of Tcl 8.4 in this locale is not useful. On OpenBSD 4.0, when an unsupported locale is specified, setlocale() succeeds but then nl_langinfo(CODESET) is "646". In this situation, some unit tests fail. */ #if HAVE_LANGINFO_CODESET { const char *cs = nl_langinfo (CODESET); if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0) return 1; } #endif #ifdef __CYGWIN__ /* On Cygwin, avoid locale names without encoding suffix, because the locale_charset() function relies on the encoding suffix. Note that LC_ALL is set on the command line. */ if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1; #endif /* Check whether in the abbreviation of the second month, the second character (should be U+00E9: LATIN SMALL LETTER E WITH ACUTE) is only one byte long. This excludes the UTF-8 encoding. */ t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4; if (strftime (buf, sizeof (buf), "%b", &t) < 3 || buf[2] != 'v') return 1; /* Check whether the decimal separator is a comma. On NetBSD 3.0 in the fr_FR.ISO8859-1 locale, localeconv()->decimal_point are nl_langinfo(RADIXCHAR) are both ".". */ if (localeconv () ->decimal_point[0] != ',') return 1; return 0; } _ACEOF if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && test -s conftest$ac_exeext; then # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because # otherwise on MacOS X 10.3.5 the LC_TIME=C from the beginning of the # configure script would override the LC_ALL setting. Likewise for # LC_CTYPE, which is also set at the beginning of the configure script. # Test for the usual locale name. if (LC_ALL=fr_FR LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then gt_cv_locale_fr=fr_FR else # Test for the locale name with explicit encoding suffix. if (LC_ALL=fr_FR.ISO-8859-1 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then gt_cv_locale_fr=fr_FR.ISO-8859-1 else # Test for the AIX, OSF/1, FreeBSD, NetBSD, OpenBSD locale name. if (LC_ALL=fr_FR.ISO8859-1 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then gt_cv_locale_fr=fr_FR.ISO8859-1 else # Test for the HP-UX locale name. if (LC_ALL=fr_FR.iso88591 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then gt_cv_locale_fr=fr_FR.iso88591 else # Test for the Solaris 7 locale name. if (LC_ALL=fr LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then gt_cv_locale_fr=fr else # None found. gt_cv_locale_fr=none fi fi fi fi fi fi rm -fr conftest* fi { $as_echo "$as_me:$LINENO: result: $gt_cv_locale_fr" >&5 $as_echo "$gt_cv_locale_fr" >&6; } LOCALE_FR=$gt_cv_locale_fr { $as_echo "$as_me:$LINENO: checking for a french Unicode locale" >&5 $as_echo_n "checking for a french Unicode locale... " >&6; } if test "${gt_cv_locale_fr_utf8+set}" = set; then $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #include #if HAVE_LANGINFO_CODESET # include #endif #include #include struct tm t; char buf[16]; int main () { /* On BeOS and Haiku, locales are not implemented in libc. Rather, libintl imitates locale dependent behaviour by looking at the environment variables, and all locales use the UTF-8 encoding. */ #if !(defined __BEOS__ || defined __HAIKU__) /* Check whether the given locale name is recognized by the system. */ if (setlocale (LC_ALL, "") == NULL) return 1; /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646". On MacOS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET) is empty, and the behaviour of Tcl 8.4 in this locale is not useful. On OpenBSD 4.0, when an unsupported locale is specified, setlocale() succeeds but then nl_langinfo(CODESET) is "646". In this situation, some unit tests fail. */ # if HAVE_LANGINFO_CODESET { const char *cs = nl_langinfo (CODESET); if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0) return 1; } # endif # ifdef __CYGWIN__ /* On Cygwin, avoid locale names without encoding suffix, because the locale_charset() function relies on the encoding suffix. Note that LC_ALL is set on the command line. */ if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1; # endif /* Check whether in the abbreviation of the second month, the second character (should be U+00E9: LATIN SMALL LETTER E WITH ACUTE) is two bytes long, with UTF-8 encoding. */ t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4; if (strftime (buf, sizeof (buf), "%b", &t) < 4 || buf[1] != (char) 0xc3 || buf[2] != (char) 0xa9 || buf[3] != 'v') return 1; #endif /* Check whether the decimal separator is a comma. On NetBSD 3.0 in the fr_FR.ISO8859-1 locale, localeconv()->decimal_point are nl_langinfo(RADIXCHAR) are both ".". */ if (localeconv () ->decimal_point[0] != ',') return 1; return 0; } _ACEOF if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && test -s conftest$ac_exeext; then # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because # otherwise on MacOS X 10.3.5 the LC_TIME=C from the beginning of the # configure script would override the LC_ALL setting. Likewise for # LC_CTYPE, which is also set at the beginning of the configure script. # Test for the usual locale name. if (LC_ALL=fr_FR LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then gt_cv_locale_fr_utf8=fr_FR else # Test for the locale name with explicit encoding suffix. if (LC_ALL=fr_FR.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then gt_cv_locale_fr_utf8=fr_FR.UTF-8 else # Test for the Solaris 7 locale name. if (LC_ALL=fr.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then gt_cv_locale_fr_utf8=fr.UTF-8 else # None found. gt_cv_locale_fr_utf8=none fi fi fi fi rm -fr conftest* fi { $as_echo "$as_me:$LINENO: result: $gt_cv_locale_fr_utf8" >&5 $as_echo "$gt_cv_locale_fr_utf8" >&6; } LOCALE_FR_UTF8=$gt_cv_locale_fr_utf8 { $as_echo "$as_me:$LINENO: checking for a traditional japanese locale" >&5 $as_echo_n "checking for a traditional japanese locale... " >&6; } if test "${gt_cv_locale_ja+set}" = set; then $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #include #if HAVE_LANGINFO_CODESET # include #endif #include #include struct tm t; char buf[16]; int main () { const char *p; /* Check whether the given locale name is recognized by the system. */ if (setlocale (LC_ALL, "") == NULL) return 1; /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646". On MacOS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET) is empty, and the behaviour of Tcl 8.4 in this locale is not useful. On OpenBSD 4.0, when an unsupported locale is specified, setlocale() succeeds but then nl_langinfo(CODESET) is "646". In this situation, some unit tests fail. */ #if HAVE_LANGINFO_CODESET { const char *cs = nl_langinfo (CODESET); if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0) return 1; } #endif #ifdef __CYGWIN__ /* On Cygwin, avoid locale names without encoding suffix, because the locale_charset() function relies on the encoding suffix. Note that LC_ALL is set on the command line. */ if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1; #endif /* Check whether MB_CUR_MAX is > 1. This excludes the dysfunctional locales on Cygwin 1.5.x. */ if (MB_CUR_MAX == 1) return 1; /* Check whether in a month name, no byte in the range 0x80..0x9F occurs. This excludes the UTF-8 encoding. */ t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4; if (strftime (buf, sizeof (buf), "%B", &t) < 2) return 1; for (p = buf; *p != '\0'; p++) if ((unsigned char) *p >= 0x80 && (unsigned char) *p < 0xa0) return 1; return 0; } _ACEOF if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && test -s conftest$ac_exeext; then # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because # otherwise on MacOS X 10.3.5 the LC_TIME=C from the beginning of the # configure script would override the LC_ALL setting. Likewise for # LC_CTYPE, which is also set at the beginning of the configure script. # Test for the AIX locale name. if (LC_ALL=ja_JP LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then gt_cv_locale_ja=ja_JP else # Test for the locale name with explicit encoding suffix. if (LC_ALL=ja_JP.EUC-JP LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then gt_cv_locale_ja=ja_JP.EUC-JP else # Test for the HP-UX, OSF/1, NetBSD locale name. if (LC_ALL=ja_JP.eucJP LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then gt_cv_locale_ja=ja_JP.eucJP else # Test for the IRIX, FreeBSD locale name. if (LC_ALL=ja_JP.EUC LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then gt_cv_locale_ja=ja_JP.EUC else # Test for the Solaris 7 locale name. if (LC_ALL=ja LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then gt_cv_locale_ja=ja else # Special test for NetBSD 1.6. if test -f /usr/share/locale/ja_JP.eucJP/LC_CTYPE; then gt_cv_locale_ja=ja_JP.eucJP else # None found. gt_cv_locale_ja=none fi fi fi fi fi fi fi rm -fr conftest* fi { $as_echo "$as_me:$LINENO: result: $gt_cv_locale_ja" >&5 $as_echo "$gt_cv_locale_ja" >&6; } LOCALE_JA=$gt_cv_locale_ja { $as_echo "$as_me:$LINENO: checking for a transitional chinese locale" >&5 $as_echo_n "checking for a transitional chinese locale... " >&6; } if test "${gt_cv_locale_zh_CN+set}" = set; then $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #include #include #if HAVE_LANGINFO_CODESET # include #endif #include #include struct tm t; char buf[16]; int main () { const char *p; /* Check whether the given locale name is recognized by the system. */ if (setlocale (LC_ALL, "") == NULL) return 1; /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646". On MacOS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET) is empty, and the behaviour of Tcl 8.4 in this locale is not useful. On OpenBSD 4.0, when an unsupported locale is specified, setlocale() succeeds but then nl_langinfo(CODESET) is "646". In this situation, some unit tests fail. */ #if HAVE_LANGINFO_CODESET { const char *cs = nl_langinfo (CODESET); if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0) return 1; } #endif #ifdef __CYGWIN__ /* On Cygwin, avoid locale names without encoding suffix, because the locale_charset() function relies on the encoding suffix. Note that LC_ALL is set on the command line. */ if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1; #endif /* Check whether in a month name, no byte in the range 0x80..0x9F occurs. This excludes the UTF-8 encoding. */ t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4; if (strftime (buf, sizeof (buf), "%B", &t) < 2) return 1; for (p = buf; *p != '\0'; p++) if ((unsigned char) *p >= 0x80 && (unsigned char) *p < 0xa0) return 1; /* Check whether a typical GB18030 multibyte sequence is recognized as a single wide character. This excludes the GB2312 and GBK encodings. */ if (mblen ("\203\062\332\066", 5) != 4) return 1; return 0; } _ACEOF if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && test -s conftest$ac_exeext; then # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because # otherwise on MacOS X 10.3.5 the LC_TIME=C from the beginning of the # configure script would override the LC_ALL setting. Likewise for # LC_CTYPE, which is also set at the beginning of the configure script. # Test for the locale name without encoding suffix. if (LC_ALL=zh_CN LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then gt_cv_locale_zh_CN=zh_CN else # Test for the locale name with explicit encoding suffix. if (LC_ALL=zh_CN.GB18030 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then gt_cv_locale_zh_CN=zh_CN.GB18030 else # None found. gt_cv_locale_zh_CN=none fi fi else # If there was a link error, due to mblen(), the system is so old that # it certainly doesn't have a chinese locale. gt_cv_locale_zh_CN=none fi rm -fr conftest* fi { $as_echo "$as_me:$LINENO: result: $gt_cv_locale_zh_CN" >&5 $as_echo "$gt_cv_locale_zh_CN" >&6; } LOCALE_ZH_CN=$gt_cv_locale_zh_CN { $as_echo "$as_me:$LINENO: checking for a french Unicode locale" >&5 $as_echo_n "checking for a french Unicode locale... " >&6; } if test "${gt_cv_locale_fr_utf8+set}" = set; then $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #include #if HAVE_LANGINFO_CODESET # include #endif #include #include struct tm t; char buf[16]; int main () { /* On BeOS and Haiku, locales are not implemented in libc. Rather, libintl imitates locale dependent behaviour by looking at the environment variables, and all locales use the UTF-8 encoding. */ #if !(defined __BEOS__ || defined __HAIKU__) /* Check whether the given locale name is recognized by the system. */ if (setlocale (LC_ALL, "") == NULL) return 1; /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646". On MacOS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET) is empty, and the behaviour of Tcl 8.4 in this locale is not useful. On OpenBSD 4.0, when an unsupported locale is specified, setlocale() succeeds but then nl_langinfo(CODESET) is "646". In this situation, some unit tests fail. */ # if HAVE_LANGINFO_CODESET { const char *cs = nl_langinfo (CODESET); if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0) return 1; } # endif # ifdef __CYGWIN__ /* On Cygwin, avoid locale names without encoding suffix, because the locale_charset() function relies on the encoding suffix. Note that LC_ALL is set on the command line. */ if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1; # endif /* Check whether in the abbreviation of the second month, the second character (should be U+00E9: LATIN SMALL LETTER E WITH ACUTE) is two bytes long, with UTF-8 encoding. */ t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4; if (strftime (buf, sizeof (buf), "%b", &t) < 4 || buf[1] != (char) 0xc3 || buf[2] != (char) 0xa9 || buf[3] != 'v') return 1; #endif /* Check whether the decimal separator is a comma. On NetBSD 3.0 in the fr_FR.ISO8859-1 locale, localeconv()->decimal_point are nl_langinfo(RADIXCHAR) are both ".". */ if (localeconv () ->decimal_point[0] != ',') return 1; return 0; } _ACEOF if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && test -s conftest$ac_exeext; then # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because # otherwise on MacOS X 10.3.5 the LC_TIME=C from the beginning of the # configure script would override the LC_ALL setting. Likewise for # LC_CTYPE, which is also set at the beginning of the configure script. # Test for the usual locale name. if (LC_ALL=fr_FR LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then gt_cv_locale_fr_utf8=fr_FR else # Test for the locale name with explicit encoding suffix. if (LC_ALL=fr_FR.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then gt_cv_locale_fr_utf8=fr_FR.UTF-8 else # Test for the Solaris 7 locale name. if (LC_ALL=fr.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then gt_cv_locale_fr_utf8=fr.UTF-8 else # None found. gt_cv_locale_fr_utf8=none fi fi fi fi rm -fr conftest* fi { $as_echo "$as_me:$LINENO: result: $gt_cv_locale_fr_utf8" >&5 $as_echo "$gt_cv_locale_fr_utf8" >&6; } LOCALE_FR_UTF8=$gt_cv_locale_fr_utf8 # Check for mmap(). Don't use AC_FUNC_MMAP, because it checks too much: it # fails on HP-UX 11, because MAP_FIXED mappings do not work. But this is # irrelevant for anonymous mappings. { $as_echo "$as_me:$LINENO: checking for mmap" >&5 $as_echo_n "checking for mmap... " >&6; } if test "${ac_cv_func_mmap+set}" = set; then $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Define mmap to an innocuous variant, in case declares mmap. For example, HP-UX 11i declares gettimeofday. */ #define mmap innocuous_mmap /* System header to define __stub macros and hopefully few prototypes, which can conflict with char mmap (); below. Prefer to if __STDC__ is defined, since exists even on freestanding compilers. */ #ifdef __STDC__ # include #else # include #endif #undef mmap /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char mmap (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined __stub_mmap || defined __stub___mmap choke me #endif int main () { return mmap (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || $as_test_x conftest$ac_exeext }; then ac_cv_func_mmap=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_func_mmap=no fi rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi { $as_echo "$as_me:$LINENO: result: $ac_cv_func_mmap" >&5 $as_echo "$ac_cv_func_mmap" >&6; } if test "x$ac_cv_func_mmap" = x""yes; then gl_have_mmap=yes else gl_have_mmap=no fi # Try to allow MAP_ANONYMOUS. gl_have_mmap_anonymous=no if test $gl_have_mmap = yes; then { $as_echo "$as_me:$LINENO: checking for MAP_ANONYMOUS" >&5 $as_echo_n "checking for MAP_ANONYMOUS... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #ifdef MAP_ANONYMOUS I cant identify this map. #endif _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "I cant identify this map." >/dev/null 2>&1; then gl_have_mmap_anonymous=yes fi rm -f conftest* if test $gl_have_mmap_anonymous != yes; then cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #ifdef MAP_ANON I cant identify this map. #endif _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "I cant identify this map." >/dev/null 2>&1; then cat >>confdefs.h <<\_ACEOF #define MAP_ANONYMOUS MAP_ANON _ACEOF gl_have_mmap_anonymous=yes fi rm -f conftest* fi { $as_echo "$as_me:$LINENO: result: $gl_have_mmap_anonymous" >&5 $as_echo "$gl_have_mmap_anonymous" >&6; } if test $gl_have_mmap_anonymous = yes; then cat >>confdefs.h <<\_ACEOF #define HAVE_MAP_ANONYMOUS 1 _ACEOF fi fi : : : { $as_echo "$as_me:$LINENO: checking for a traditional french locale" >&5 $as_echo_n "checking for a traditional french locale... " >&6; } if test "${gt_cv_locale_fr+set}" = set; then $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #include #if HAVE_LANGINFO_CODESET # include #endif #include #include struct tm t; char buf[16]; int main () { /* Check whether the given locale name is recognized by the system. */ if (setlocale (LC_ALL, "") == NULL) return 1; /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646". On MacOS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET) is empty, and the behaviour of Tcl 8.4 in this locale is not useful. On OpenBSD 4.0, when an unsupported locale is specified, setlocale() succeeds but then nl_langinfo(CODESET) is "646". In this situation, some unit tests fail. */ #if HAVE_LANGINFO_CODESET { const char *cs = nl_langinfo (CODESET); if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0) return 1; } #endif #ifdef __CYGWIN__ /* On Cygwin, avoid locale names without encoding suffix, because the locale_charset() function relies on the encoding suffix. Note that LC_ALL is set on the command line. */ if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1; #endif /* Check whether in the abbreviation of the second month, the second character (should be U+00E9: LATIN SMALL LETTER E WITH ACUTE) is only one byte long. This excludes the UTF-8 encoding. */ t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4; if (strftime (buf, sizeof (buf), "%b", &t) < 3 || buf[2] != 'v') return 1; /* Check whether the decimal separator is a comma. On NetBSD 3.0 in the fr_FR.ISO8859-1 locale, localeconv()->decimal_point are nl_langinfo(RADIXCHAR) are both ".". */ if (localeconv () ->decimal_point[0] != ',') return 1; return 0; } _ACEOF if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && test -s conftest$ac_exeext; then # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because # otherwise on MacOS X 10.3.5 the LC_TIME=C from the beginning of the # configure script would override the LC_ALL setting. Likewise for # LC_CTYPE, which is also set at the beginning of the configure script. # Test for the usual locale name. if (LC_ALL=fr_FR LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then gt_cv_locale_fr=fr_FR else # Test for the locale name with explicit encoding suffix. if (LC_ALL=fr_FR.ISO-8859-1 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then gt_cv_locale_fr=fr_FR.ISO-8859-1 else # Test for the AIX, OSF/1, FreeBSD, NetBSD, OpenBSD locale name. if (LC_ALL=fr_FR.ISO8859-1 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then gt_cv_locale_fr=fr_FR.ISO8859-1 else # Test for the HP-UX locale name. if (LC_ALL=fr_FR.iso88591 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then gt_cv_locale_fr=fr_FR.iso88591 else # Test for the Solaris 7 locale name. if (LC_ALL=fr LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then gt_cv_locale_fr=fr else # None found. gt_cv_locale_fr=none fi fi fi fi fi fi rm -fr conftest* fi { $as_echo "$as_me:$LINENO: result: $gt_cv_locale_fr" >&5 $as_echo "$gt_cv_locale_fr" >&6; } LOCALE_FR=$gt_cv_locale_fr { $as_echo "$as_me:$LINENO: checking for a french Unicode locale" >&5 $as_echo_n "checking for a french Unicode locale... " >&6; } if test "${gt_cv_locale_fr_utf8+set}" = set; then $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #include #if HAVE_LANGINFO_CODESET # include #endif #include #include struct tm t; char buf[16]; int main () { /* On BeOS and Haiku, locales are not implemented in libc. Rather, libintl imitates locale dependent behaviour by looking at the environment variables, and all locales use the UTF-8 encoding. */ #if !(defined __BEOS__ || defined __HAIKU__) /* Check whether the given locale name is recognized by the system. */ if (setlocale (LC_ALL, "") == NULL) return 1; /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646". On MacOS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET) is empty, and the behaviour of Tcl 8.4 in this locale is not useful. On OpenBSD 4.0, when an unsupported locale is specified, setlocale() succeeds but then nl_langinfo(CODESET) is "646". In this situation, some unit tests fail. */ # if HAVE_LANGINFO_CODESET { const char *cs = nl_langinfo (CODESET); if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0) return 1; } # endif # ifdef __CYGWIN__ /* On Cygwin, avoid locale names without encoding suffix, because the locale_charset() function relies on the encoding suffix. Note that LC_ALL is set on the command line. */ if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1; # endif /* Check whether in the abbreviation of the second month, the second character (should be U+00E9: LATIN SMALL LETTER E WITH ACUTE) is two bytes long, with UTF-8 encoding. */ t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4; if (strftime (buf, sizeof (buf), "%b", &t) < 4 || buf[1] != (char) 0xc3 || buf[2] != (char) 0xa9 || buf[3] != 'v') return 1; #endif /* Check whether the decimal separator is a comma. On NetBSD 3.0 in the fr_FR.ISO8859-1 locale, localeconv()->decimal_point are nl_langinfo(RADIXCHAR) are both ".". */ if (localeconv () ->decimal_point[0] != ',') return 1; return 0; } _ACEOF if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && test -s conftest$ac_exeext; then # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because # otherwise on MacOS X 10.3.5 the LC_TIME=C from the beginning of the # configure script would override the LC_ALL setting. Likewise for # LC_CTYPE, which is also set at the beginning of the configure script. # Test for the usual locale name. if (LC_ALL=fr_FR LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then gt_cv_locale_fr_utf8=fr_FR else # Test for the locale name with explicit encoding suffix. if (LC_ALL=fr_FR.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then gt_cv_locale_fr_utf8=fr_FR.UTF-8 else # Test for the Solaris 7 locale name. if (LC_ALL=fr.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then gt_cv_locale_fr_utf8=fr.UTF-8 else # None found. gt_cv_locale_fr_utf8=none fi fi fi fi rm -fr conftest* fi { $as_echo "$as_me:$LINENO: result: $gt_cv_locale_fr_utf8" >&5 $as_echo "$gt_cv_locale_fr_utf8" >&6; } LOCALE_FR_UTF8=$gt_cv_locale_fr_utf8 case "$host_os" in mingw* | pw*) REPLACE_OPEN=1 gltests_LIBOBJS="$gltests_LIBOBJS open.$ac_objext" : ;; *) : { $as_echo "$as_me:$LINENO: checking whether open recognizes a trailing slash" >&5 $as_echo_n "checking whether open recognizes a trailing slash... " >&6; } if test "${gl_cv_func_open_slash+set}" = set; then $as_echo_n "(cached) " >&6 else # Assume that if we have lstat, we can also check symlinks. if test $ac_cv_func_lstat = yes; then touch conftest.tmp ln -s conftest.tmp conftest.lnk fi if test "$cross_compiling" = yes; then case "$host_os" in freebsd*) gl_cv_func_open_slash="guessing no" ;; solaris2.[0-9]*) gl_cv_func_open_slash="guessing no" ;; hpux*) gl_cv_func_open_slash="guessing no" ;; *) gl_cv_func_open_slash="guessing yes" ;; esac else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #if HAVE_UNISTD_H # include #endif int main () { #if HAVE_LSTAT if (open ("conftest.lnk/", O_RDONLY) != -1) return 2; #endif return open ("conftest.sl/", O_CREAT, 0600) >= 0; } _ACEOF rm -f conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' { (case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_try") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then gl_cv_func_open_slash=yes else $as_echo "$as_me: program exited with status $ac_status" >&5 $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) gl_cv_func_open_slash=no fi rm -rf conftest.dSYM rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi rm -f conftest.sl conftest.tmp conftest.lnk fi { $as_echo "$as_me:$LINENO: result: $gl_cv_func_open_slash" >&5 $as_echo "$gl_cv_func_open_slash" >&6; } case "$gl_cv_func_open_slash" in *no) cat >>confdefs.h <<\_ACEOF #define OPEN_TRAILING_SLASH_BUG 1 _ACEOF REPLACE_OPEN=1 gltests_LIBOBJS="$gltests_LIBOBJS open.$ac_objext" : ;; esac ;; esac cat >>confdefs.h <<\_ACEOF #define GNULIB_OPEN 1 _ACEOF GNULIB_OPEN=1 : : : cat >>confdefs.h <<\_ACEOF #define CHECK_SNPRINTF_POSIX 1 _ACEOF { $as_echo "$as_me:$LINENO: checking for wchar_t" >&5 $as_echo_n "checking for wchar_t... " >&6; } if test "${gt_cv_c_wchar_t+set}" = set; then $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include wchar_t foo = (wchar_t)'\0'; int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then gt_cv_c_wchar_t=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 gt_cv_c_wchar_t=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:$LINENO: result: $gt_cv_c_wchar_t" >&5 $as_echo "$gt_cv_c_wchar_t" >&6; } if test $gt_cv_c_wchar_t = yes; then cat >>confdefs.h <<\_ACEOF #define HAVE_WCHAR_T 1 _ACEOF fi { $as_echo "$as_me:$LINENO: checking for wint_t" >&5 $as_echo_n "checking for wint_t... " >&6; } if test "${gt_cv_c_wint_t+set}" = set; then $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Tru64 with Desktop Toolkit C has a bug: must be included before . BSD/OS 4.0.1 has a bug: , and must be included before . */ #include #include #include #include wint_t foo = (wchar_t)'\0'; int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then gt_cv_c_wint_t=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 gt_cv_c_wint_t=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:$LINENO: result: $gt_cv_c_wint_t" >&5 $as_echo "$gt_cv_c_wint_t" >&6; } if test $gt_cv_c_wint_t = yes; then cat >>confdefs.h <<\_ACEOF #define HAVE_WINT_T 1 _ACEOF fi : : if test $ac_cv_func_symlink = no; then HAVE_SYMLINK=0 gltests_LIBOBJS="$gltests_LIBOBJS symlink.$ac_objext" else { $as_echo "$as_me:$LINENO: checking whether symlink handles trailing slash correctly" >&5 $as_echo_n "checking whether symlink handles trailing slash correctly... " >&6; } if test "${gl_cv_func_symlink_works+set}" = set; then $as_echo_n "(cached) " >&6 else if test "$cross_compiling" = yes; then gl_cv_func_symlink_works="guessing no" else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include int main () { if (!symlink ("a", "conftest.link/")) return 1; if (symlink ("conftest.f", "conftest.lnk2")) return 2; if (!symlink ("a", "conftest.lnk2/")) return 3; ; return 0; } _ACEOF rm -f conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' { (case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_try") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then gl_cv_func_symlink_works=yes else $as_echo "$as_me: program exited with status $ac_status" >&5 $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) gl_cv_func_symlink_works=no fi rm -rf conftest.dSYM rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi rm -f conftest.f conftest.link conftest.lnk2 fi { $as_echo "$as_me:$LINENO: result: $gl_cv_func_symlink_works" >&5 $as_echo "$gl_cv_func_symlink_works" >&6; } if test "$gl_cv_func_symlink_works" != yes; then REPLACE_SYMLINK=1 gltests_LIBOBJS="$gltests_LIBOBJS symlink.$ac_objext" fi fi GNULIB_SYMLINK=1 : cat >>confdefs.h <<\_ACEOF #define CHECK_VSNPRINTF_POSIX 1 _ACEOF { $as_echo "$as_me:$LINENO: checking for a traditional french locale" >&5 $as_echo_n "checking for a traditional french locale... " >&6; } if test "${gt_cv_locale_fr+set}" = set; then $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #include #if HAVE_LANGINFO_CODESET # include #endif #include #include struct tm t; char buf[16]; int main () { /* Check whether the given locale name is recognized by the system. */ if (setlocale (LC_ALL, "") == NULL) return 1; /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646". On MacOS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET) is empty, and the behaviour of Tcl 8.4 in this locale is not useful. On OpenBSD 4.0, when an unsupported locale is specified, setlocale() succeeds but then nl_langinfo(CODESET) is "646". In this situation, some unit tests fail. */ #if HAVE_LANGINFO_CODESET { const char *cs = nl_langinfo (CODESET); if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0) return 1; } #endif #ifdef __CYGWIN__ /* On Cygwin, avoid locale names without encoding suffix, because the locale_charset() function relies on the encoding suffix. Note that LC_ALL is set on the command line. */ if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1; #endif /* Check whether in the abbreviation of the second month, the second character (should be U+00E9: LATIN SMALL LETTER E WITH ACUTE) is only one byte long. This excludes the UTF-8 encoding. */ t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4; if (strftime (buf, sizeof (buf), "%b", &t) < 3 || buf[2] != 'v') return 1; /* Check whether the decimal separator is a comma. On NetBSD 3.0 in the fr_FR.ISO8859-1 locale, localeconv()->decimal_point are nl_langinfo(RADIXCHAR) are both ".". */ if (localeconv () ->decimal_point[0] != ',') return 1; return 0; } _ACEOF if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && test -s conftest$ac_exeext; then # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because # otherwise on MacOS X 10.3.5 the LC_TIME=C from the beginning of the # configure script would override the LC_ALL setting. Likewise for # LC_CTYPE, which is also set at the beginning of the configure script. # Test for the usual locale name. if (LC_ALL=fr_FR LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then gt_cv_locale_fr=fr_FR else # Test for the locale name with explicit encoding suffix. if (LC_ALL=fr_FR.ISO-8859-1 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then gt_cv_locale_fr=fr_FR.ISO-8859-1 else # Test for the AIX, OSF/1, FreeBSD, NetBSD, OpenBSD locale name. if (LC_ALL=fr_FR.ISO8859-1 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then gt_cv_locale_fr=fr_FR.ISO8859-1 else # Test for the HP-UX locale name. if (LC_ALL=fr_FR.iso88591 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then gt_cv_locale_fr=fr_FR.iso88591 else # Test for the Solaris 7 locale name. if (LC_ALL=fr LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then gt_cv_locale_fr=fr else # None found. gt_cv_locale_fr=none fi fi fi fi fi fi rm -fr conftest* fi { $as_echo "$as_me:$LINENO: result: $gt_cv_locale_fr" >&5 $as_echo "$gt_cv_locale_fr" >&6; } LOCALE_FR=$gt_cv_locale_fr { $as_echo "$as_me:$LINENO: checking for a french Unicode locale" >&5 $as_echo_n "checking for a french Unicode locale... " >&6; } if test "${gt_cv_locale_fr_utf8+set}" = set; then $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #include #if HAVE_LANGINFO_CODESET # include #endif #include #include struct tm t; char buf[16]; int main () { /* On BeOS and Haiku, locales are not implemented in libc. Rather, libintl imitates locale dependent behaviour by looking at the environment variables, and all locales use the UTF-8 encoding. */ #if !(defined __BEOS__ || defined __HAIKU__) /* Check whether the given locale name is recognized by the system. */ if (setlocale (LC_ALL, "") == NULL) return 1; /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646". On MacOS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET) is empty, and the behaviour of Tcl 8.4 in this locale is not useful. On OpenBSD 4.0, when an unsupported locale is specified, setlocale() succeeds but then nl_langinfo(CODESET) is "646". In this situation, some unit tests fail. */ # if HAVE_LANGINFO_CODESET { const char *cs = nl_langinfo (CODESET); if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0) return 1; } # endif # ifdef __CYGWIN__ /* On Cygwin, avoid locale names without encoding suffix, because the locale_charset() function relies on the encoding suffix. Note that LC_ALL is set on the command line. */ if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1; # endif /* Check whether in the abbreviation of the second month, the second character (should be U+00E9: LATIN SMALL LETTER E WITH ACUTE) is two bytes long, with UTF-8 encoding. */ t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4; if (strftime (buf, sizeof (buf), "%b", &t) < 4 || buf[1] != (char) 0xc3 || buf[2] != (char) 0xa9 || buf[3] != 'v') return 1; #endif /* Check whether the decimal separator is a comma. On NetBSD 3.0 in the fr_FR.ISO8859-1 locale, localeconv()->decimal_point are nl_langinfo(RADIXCHAR) are both ".". */ if (localeconv () ->decimal_point[0] != ',') return 1; return 0; } _ACEOF if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && test -s conftest$ac_exeext; then # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because # otherwise on MacOS X 10.3.5 the LC_TIME=C from the beginning of the # configure script would override the LC_ALL setting. Likewise for # LC_CTYPE, which is also set at the beginning of the configure script. # Test for the usual locale name. if (LC_ALL=fr_FR LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then gt_cv_locale_fr_utf8=fr_FR else # Test for the locale name with explicit encoding suffix. if (LC_ALL=fr_FR.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then gt_cv_locale_fr_utf8=fr_FR.UTF-8 else # Test for the Solaris 7 locale name. if (LC_ALL=fr.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then gt_cv_locale_fr_utf8=fr.UTF-8 else # None found. gt_cv_locale_fr_utf8=none fi fi fi fi rm -fr conftest* fi { $as_echo "$as_me:$LINENO: result: $gt_cv_locale_fr_utf8" >&5 $as_echo "$gt_cv_locale_fr_utf8" >&6; } LOCALE_FR_UTF8=$gt_cv_locale_fr_utf8 { $as_echo "$as_me:$LINENO: checking for a traditional japanese locale" >&5 $as_echo_n "checking for a traditional japanese locale... " >&6; } if test "${gt_cv_locale_ja+set}" = set; then $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #include #if HAVE_LANGINFO_CODESET # include #endif #include #include struct tm t; char buf[16]; int main () { const char *p; /* Check whether the given locale name is recognized by the system. */ if (setlocale (LC_ALL, "") == NULL) return 1; /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646". On MacOS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET) is empty, and the behaviour of Tcl 8.4 in this locale is not useful. On OpenBSD 4.0, when an unsupported locale is specified, setlocale() succeeds but then nl_langinfo(CODESET) is "646". In this situation, some unit tests fail. */ #if HAVE_LANGINFO_CODESET { const char *cs = nl_langinfo (CODESET); if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0) return 1; } #endif #ifdef __CYGWIN__ /* On Cygwin, avoid locale names without encoding suffix, because the locale_charset() function relies on the encoding suffix. Note that LC_ALL is set on the command line. */ if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1; #endif /* Check whether MB_CUR_MAX is > 1. This excludes the dysfunctional locales on Cygwin 1.5.x. */ if (MB_CUR_MAX == 1) return 1; /* Check whether in a month name, no byte in the range 0x80..0x9F occurs. This excludes the UTF-8 encoding. */ t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4; if (strftime (buf, sizeof (buf), "%B", &t) < 2) return 1; for (p = buf; *p != '\0'; p++) if ((unsigned char) *p >= 0x80 && (unsigned char) *p < 0xa0) return 1; return 0; } _ACEOF if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && test -s conftest$ac_exeext; then # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because # otherwise on MacOS X 10.3.5 the LC_TIME=C from the beginning of the # configure script would override the LC_ALL setting. Likewise for # LC_CTYPE, which is also set at the beginning of the configure script. # Test for the AIX locale name. if (LC_ALL=ja_JP LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then gt_cv_locale_ja=ja_JP else # Test for the locale name with explicit encoding suffix. if (LC_ALL=ja_JP.EUC-JP LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then gt_cv_locale_ja=ja_JP.EUC-JP else # Test for the HP-UX, OSF/1, NetBSD locale name. if (LC_ALL=ja_JP.eucJP LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then gt_cv_locale_ja=ja_JP.eucJP else # Test for the IRIX, FreeBSD locale name. if (LC_ALL=ja_JP.EUC LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then gt_cv_locale_ja=ja_JP.EUC else # Test for the Solaris 7 locale name. if (LC_ALL=ja LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then gt_cv_locale_ja=ja else # Special test for NetBSD 1.6. if test -f /usr/share/locale/ja_JP.eucJP/LC_CTYPE; then gt_cv_locale_ja=ja_JP.eucJP else # None found. gt_cv_locale_ja=none fi fi fi fi fi fi fi rm -fr conftest* fi { $as_echo "$as_me:$LINENO: result: $gt_cv_locale_ja" >&5 $as_echo "$gt_cv_locale_ja" >&6; } LOCALE_JA=$gt_cv_locale_ja { $as_echo "$as_me:$LINENO: checking for a transitional chinese locale" >&5 $as_echo_n "checking for a transitional chinese locale... " >&6; } if test "${gt_cv_locale_zh_CN+set}" = set; then $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #include #include #if HAVE_LANGINFO_CODESET # include #endif #include #include struct tm t; char buf[16]; int main () { const char *p; /* Check whether the given locale name is recognized by the system. */ if (setlocale (LC_ALL, "") == NULL) return 1; /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646". On MacOS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET) is empty, and the behaviour of Tcl 8.4 in this locale is not useful. On OpenBSD 4.0, when an unsupported locale is specified, setlocale() succeeds but then nl_langinfo(CODESET) is "646". In this situation, some unit tests fail. */ #if HAVE_LANGINFO_CODESET { const char *cs = nl_langinfo (CODESET); if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0) return 1; } #endif #ifdef __CYGWIN__ /* On Cygwin, avoid locale names without encoding suffix, because the locale_charset() function relies on the encoding suffix. Note that LC_ALL is set on the command line. */ if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1; #endif /* Check whether in a month name, no byte in the range 0x80..0x9F occurs. This excludes the UTF-8 encoding. */ t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4; if (strftime (buf, sizeof (buf), "%B", &t) < 2) return 1; for (p = buf; *p != '\0'; p++) if ((unsigned char) *p >= 0x80 && (unsigned char) *p < 0xa0) return 1; /* Check whether a typical GB18030 multibyte sequence is recognized as a single wide character. This excludes the GB2312 and GBK encodings. */ if (mblen ("\203\062\332\066", 5) != 4) return 1; return 0; } _ACEOF if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && test -s conftest$ac_exeext; then # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because # otherwise on MacOS X 10.3.5 the LC_TIME=C from the beginning of the # configure script would override the LC_ALL setting. Likewise for # LC_CTYPE, which is also set at the beginning of the configure script. # Test for the locale name without encoding suffix. if (LC_ALL=zh_CN LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then gt_cv_locale_zh_CN=zh_CN else # Test for the locale name with explicit encoding suffix. if (LC_ALL=zh_CN.GB18030 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then gt_cv_locale_zh_CN=zh_CN.GB18030 else # None found. gt_cv_locale_zh_CN=none fi fi else # If there was a link error, due to mblen(), the system is so old that # it certainly doesn't have a chinese locale. gt_cv_locale_zh_CN=none fi rm -fr conftest* fi { $as_echo "$as_me:$LINENO: result: $gt_cv_locale_zh_CN" >&5 $as_echo "$gt_cv_locale_zh_CN" >&6; } LOCALE_ZH_CN=$gt_cv_locale_zh_CN : if test $ac_cv_func_wctob = no; then HAVE_DECL_WCTOB=0 : gltests_LIBOBJS="$gltests_LIBOBJS wctob.$ac_objext" : else { $as_echo "$as_me:$LINENO: checking whether wctob works" >&5 $as_echo_n "checking whether wctob works... " >&6; } if test "${gl_cv_func_wctob_works+set}" = set; then $as_echo_n "(cached) " >&6 else case "$host_os" in # Guess no on Solaris <= 9. solaris2.[1-9] | solaris2.[1-9].*) gl_cv_func_wctob_works="guessing no" ;; # Guess yes otherwise. *) gl_cv_func_wctob_works="guessing yes" ;; esac if test $LOCALE_FR != none; then if test "$cross_compiling" = yes; then : else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #include #include int main () { if (setlocale (LC_ALL, "$LOCALE_FR") != NULL) { wchar_t wc; if (mbtowc (&wc, "\374", 1) == 1) if (wctob (wc) != (unsigned char) '\374') return 1; } return 0; } _ACEOF rm -f conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' { (case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_try") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then gl_cv_func_wctob_works=yes else $as_echo "$as_me: program exited with status $ac_status" >&5 $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) gl_cv_func_wctob_works=no fi rm -rf conftest.dSYM rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi fi fi { $as_echo "$as_me:$LINENO: result: $gl_cv_func_wctob_works" >&5 $as_echo "$gl_cv_func_wctob_works" >&6; } case "$gl_cv_func_wctob_works" in *yes) ;; *) REPLACE_WCTOB=1 ;; esac if test $REPLACE_WCTOB = 1; then : gltests_LIBOBJS="$gltests_LIBOBJS wctob.$ac_objext" : else { $as_echo "$as_me:$LINENO: checking whether wctob is declared" >&5 $as_echo_n "checking whether wctob is declared... " >&6; } if test "${ac_cv_have_decl_wctob+set}" = set; then $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Tru64 with Desktop Toolkit C has a bug: must be included before . BSD/OS 4.0.1 has a bug: , and must be included before . */ #include #include #include #include int main () { #ifndef wctob (void) wctob; #endif ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_cv_have_decl_wctob=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_have_decl_wctob=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:$LINENO: result: $ac_cv_have_decl_wctob" >&5 $as_echo "$ac_cv_have_decl_wctob" >&6; } if test "x$ac_cv_have_decl_wctob" = x""yes; then cat >>confdefs.h <<_ACEOF #define HAVE_DECL_WCTOB 1 _ACEOF else cat >>confdefs.h <<_ACEOF #define HAVE_DECL_WCTOB 0 _ACEOF fi if test $ac_cv_have_decl_wctob != yes; then HAVE_DECL_WCTOB=0 : fi fi fi GNULIB_WCTOB=1 YIELD_LIB= if test $gl_threads_api = posix; then { $as_echo "$as_me:$LINENO: checking for sched_yield in -lrt" >&5 $as_echo_n "checking for sched_yield in -lrt... " >&6; } if test "${ac_cv_lib_rt_sched_yield+set}" = set; then $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lrt $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char sched_yield (); int main () { return sched_yield (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || $as_test_x conftest$ac_exeext }; then ac_cv_lib_rt_sched_yield=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_rt_sched_yield=no fi rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:$LINENO: result: $ac_cv_lib_rt_sched_yield" >&5 $as_echo "$ac_cv_lib_rt_sched_yield" >&6; } if test "x$ac_cv_lib_rt_sched_yield" = x""yes; then YIELD_LIB=-lrt else { $as_echo "$as_me:$LINENO: checking for sched_yield in -lposix4" >&5 $as_echo_n "checking for sched_yield in -lposix4... " >&6; } if test "${ac_cv_lib_posix4_sched_yield+set}" = set; then $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lposix4 $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char sched_yield (); int main () { return sched_yield (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || $as_test_x conftest$ac_exeext }; then ac_cv_lib_posix4_sched_yield=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_posix4_sched_yield=no fi rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:$LINENO: result: $ac_cv_lib_posix4_sched_yield" >&5 $as_echo "$ac_cv_lib_posix4_sched_yield" >&6; } if test "x$ac_cv_lib_posix4_sched_yield" = x""yes; then YIELD_LIB=-lposix4 fi fi fi LIBTESTS_LIBDEPS="$gltests_libdeps" # Check whether --with-html-dir was given. if test "${with_html_dir+set}" = set; then withval=$with_html_dir; else with_html_dir='${datadir}/gtk-doc/html' fi HTML_DIR="$with_html_dir" # Check whether --enable-gtk-doc was given. if test "${enable_gtk_doc+set}" = set; then enableval=$enable_gtk_doc; else enable_gtk_doc=no fi if test x$enable_gtk_doc = xyes; then if test -n "$PKG_CONFIG" && \ { ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"gtk-doc >= 1.0\"") >&5 ($PKG_CONFIG --exists --print-errors "gtk-doc >= 1.0") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then : else { { $as_echo "$as_me:$LINENO: error: You need to have gtk-doc >= 1.0 installed to build gtk-doc" >&5 $as_echo "$as_me: error: You need to have gtk-doc >= 1.0 installed to build gtk-doc" >&2;} { (exit 1); exit 1; }; } fi fi { $as_echo "$as_me:$LINENO: checking whether to build gtk-doc documentation" >&5 $as_echo_n "checking whether to build gtk-doc documentation... " >&6; } { $as_echo "$as_me:$LINENO: result: $enable_gtk_doc" >&5 $as_echo "$enable_gtk_doc" >&6; } for ac_prog in gtkdoc-check do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_path_GTKDOC_CHECK+set}" = set; then $as_echo_n "(cached) " >&6 else case $GTKDOC_CHECK in [\\/]* | ?:[\\/]*) ac_cv_path_GTKDOC_CHECK="$GTKDOC_CHECK" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_path_GTKDOC_CHECK="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS ;; esac fi GTKDOC_CHECK=$ac_cv_path_GTKDOC_CHECK if test -n "$GTKDOC_CHECK"; then { $as_echo "$as_me:$LINENO: result: $GTKDOC_CHECK" >&5 $as_echo "$GTKDOC_CHECK" >&6; } else { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } fi test -n "$GTKDOC_CHECK" && break done if test x$enable_gtk_doc = xyes; then ENABLE_GTK_DOC_TRUE= ENABLE_GTK_DOC_FALSE='#' else ENABLE_GTK_DOC_TRUE='#' ENABLE_GTK_DOC_FALSE= fi if test -n "$LIBTOOL"; then GTK_DOC_USE_LIBTOOL_TRUE= GTK_DOC_USE_LIBTOOL_FALSE='#' else GTK_DOC_USE_LIBTOOL_TRUE='#' GTK_DOC_USE_LIBTOOL_FALSE= fi : for ac_func in ftruncate chsize do as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` { $as_echo "$as_me:$LINENO: checking for $ac_func" >&5 $as_echo_n "checking for $ac_func... " >&6; } if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Define $ac_func to an innocuous variant, in case declares $ac_func. For example, HP-UX 11i declares gettimeofday. */ #define $ac_func innocuous_$ac_func /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $ac_func (); below. Prefer to if __STDC__ is defined, since exists even on freestanding compilers. */ #ifdef __STDC__ # include #else # include #endif #undef $ac_func /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char $ac_func (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined __stub_$ac_func || defined __stub___$ac_func choke me #endif int main () { return $ac_func (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || $as_test_x conftest$ac_exeext }; then eval "$as_ac_var=yes" else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 eval "$as_ac_var=no" fi rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi ac_res=`eval 'as_val=${'$as_ac_var'} $as_echo "$as_val"'` { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } as_val=`eval 'as_val=${'$as_ac_var'} $as_echo "$as_val"'` if test "x$as_val" = x""yes; then cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF fi done ac_prelude_inttypes_h="src/include/prelude-inttypes.h" ac_prelude_inttypes_h_temp="src/include/prelude-inttypes.h_" ac_cv_have_stdint_h= if test "${ac_cv_header_stdint_h+set}" = set; then { $as_echo "$as_me:$LINENO: checking for stdint.h" >&5 $as_echo_n "checking for stdint.h... " >&6; } if test "${ac_cv_header_stdint_h+set}" = set; then $as_echo_n "(cached) " >&6 fi { $as_echo "$as_me:$LINENO: result: $ac_cv_header_stdint_h" >&5 $as_echo "$ac_cv_header_stdint_h" >&6; } else # Is the header compilable? { $as_echo "$as_me:$LINENO: checking stdint.h usability" >&5 $as_echo_n "checking stdint.h usability... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default #include _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_header_compiler=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_compiler=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext { $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 $as_echo "$ac_header_compiler" >&6; } # Is the header present? { $as_echo "$as_me:$LINENO: checking stdint.h presence" >&5 $as_echo_n "checking stdint.h presence... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF if { (ac_try="$ac_cpp conftest.$ac_ext" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null && { test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || test ! -s conftest.err }; then ac_header_preproc=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi rm -f conftest.err conftest.$ac_ext { $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 $as_echo "$ac_header_preproc" >&6; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in yes:no: ) { $as_echo "$as_me:$LINENO: WARNING: stdint.h: accepted by the compiler, rejected by the preprocessor!" >&5 $as_echo "$as_me: WARNING: stdint.h: accepted by the compiler, rejected by the preprocessor!" >&2;} { $as_echo "$as_me:$LINENO: WARNING: stdint.h: proceeding with the compiler's result" >&5 $as_echo "$as_me: WARNING: stdint.h: proceeding with the compiler's result" >&2;} ac_header_preproc=yes ;; no:yes:* ) { $as_echo "$as_me:$LINENO: WARNING: stdint.h: present but cannot be compiled" >&5 $as_echo "$as_me: WARNING: stdint.h: present but cannot be compiled" >&2;} { $as_echo "$as_me:$LINENO: WARNING: stdint.h: check for missing prerequisite headers?" >&5 $as_echo "$as_me: WARNING: stdint.h: check for missing prerequisite headers?" >&2;} { $as_echo "$as_me:$LINENO: WARNING: stdint.h: see the Autoconf documentation" >&5 $as_echo "$as_me: WARNING: stdint.h: see the Autoconf documentation" >&2;} { $as_echo "$as_me:$LINENO: WARNING: stdint.h: section \"Present But Cannot Be Compiled\"" >&5 $as_echo "$as_me: WARNING: stdint.h: section \"Present But Cannot Be Compiled\"" >&2;} { $as_echo "$as_me:$LINENO: WARNING: stdint.h: proceeding with the preprocessor's result" >&5 $as_echo "$as_me: WARNING: stdint.h: proceeding with the preprocessor's result" >&2;} { $as_echo "$as_me:$LINENO: WARNING: stdint.h: in the future, the compiler will take precedence" >&5 $as_echo "$as_me: WARNING: stdint.h: in the future, the compiler will take precedence" >&2;} ;; esac { $as_echo "$as_me:$LINENO: checking for stdint.h" >&5 $as_echo_n "checking for stdint.h... " >&6; } if test "${ac_cv_header_stdint_h+set}" = set; then $as_echo_n "(cached) " >&6 else ac_cv_header_stdint_h=$ac_header_preproc fi { $as_echo "$as_me:$LINENO: result: $ac_cv_header_stdint_h" >&5 $as_echo "$ac_cv_header_stdint_h" >&6; } fi if test "x$ac_cv_header_stdint_h" = x""yes; then ac_cv_have_stdint_h=yes else ac_cv_have_stdint_h=no fi if test "$ac_cv_have_stdint_h" = "yes" ; then __PRELUDE_HAVE_STDINT_H="#define __PRELUDE_HAVE_STDINT_H" else __PRELUDE_HAVE_STDINT_H="/* #define __PRELUDE_HAVE_STDINT_H */" fi ac_cv_have_inttypes_h= if test "${ac_cv_header_inttypes_h+set}" = set; then { $as_echo "$as_me:$LINENO: checking for inttypes.h" >&5 $as_echo_n "checking for inttypes.h... " >&6; } if test "${ac_cv_header_inttypes_h+set}" = set; then $as_echo_n "(cached) " >&6 fi { $as_echo "$as_me:$LINENO: result: $ac_cv_header_inttypes_h" >&5 $as_echo "$ac_cv_header_inttypes_h" >&6; } else # Is the header compilable? { $as_echo "$as_me:$LINENO: checking inttypes.h usability" >&5 $as_echo_n "checking inttypes.h usability... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default #include _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_header_compiler=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_compiler=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext { $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 $as_echo "$ac_header_compiler" >&6; } # Is the header present? { $as_echo "$as_me:$LINENO: checking inttypes.h presence" >&5 $as_echo_n "checking inttypes.h presence... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF if { (ac_try="$ac_cpp conftest.$ac_ext" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null && { test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || test ! -s conftest.err }; then ac_header_preproc=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi rm -f conftest.err conftest.$ac_ext { $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 $as_echo "$ac_header_preproc" >&6; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in yes:no: ) { $as_echo "$as_me:$LINENO: WARNING: inttypes.h: accepted by the compiler, rejected by the preprocessor!" >&5 $as_echo "$as_me: WARNING: inttypes.h: accepted by the compiler, rejected by the preprocessor!" >&2;} { $as_echo "$as_me:$LINENO: WARNING: inttypes.h: proceeding with the compiler's result" >&5 $as_echo "$as_me: WARNING: inttypes.h: proceeding with the compiler's result" >&2;} ac_header_preproc=yes ;; no:yes:* ) { $as_echo "$as_me:$LINENO: WARNING: inttypes.h: present but cannot be compiled" >&5 $as_echo "$as_me: WARNING: inttypes.h: present but cannot be compiled" >&2;} { $as_echo "$as_me:$LINENO: WARNING: inttypes.h: check for missing prerequisite headers?" >&5 $as_echo "$as_me: WARNING: inttypes.h: check for missing prerequisite headers?" >&2;} { $as_echo "$as_me:$LINENO: WARNING: inttypes.h: see the Autoconf documentation" >&5 $as_echo "$as_me: WARNING: inttypes.h: see the Autoconf documentation" >&2;} { $as_echo "$as_me:$LINENO: WARNING: inttypes.h: section \"Present But Cannot Be Compiled\"" >&5 $as_echo "$as_me: WARNING: inttypes.h: section \"Present But Cannot Be Compiled\"" >&2;} { $as_echo "$as_me:$LINENO: WARNING: inttypes.h: proceeding with the preprocessor's result" >&5 $as_echo "$as_me: WARNING: inttypes.h: proceeding with the preprocessor's result" >&2;} { $as_echo "$as_me:$LINENO: WARNING: inttypes.h: in the future, the compiler will take precedence" >&5 $as_echo "$as_me: WARNING: inttypes.h: in the future, the compiler will take precedence" >&2;} ;; esac { $as_echo "$as_me:$LINENO: checking for inttypes.h" >&5 $as_echo_n "checking for inttypes.h... " >&6; } if test "${ac_cv_header_inttypes_h+set}" = set; then $as_echo_n "(cached) " >&6 else ac_cv_header_inttypes_h=$ac_header_preproc fi { $as_echo "$as_me:$LINENO: result: $ac_cv_header_inttypes_h" >&5 $as_echo "$ac_cv_header_inttypes_h" >&6; } fi if test "x$ac_cv_header_inttypes_h" = x""yes; then ac_cv_have_inttypes_h=yes else ac_cv_have_inttypes_h=no fi if test "$ac_cv_have_inttypes_h" = "yes" ; then __PRELUDE_HAVE_INTTYPES_H="#define __PRELUDE_HAVE_INTTYPES_H" else __PRELUDE_HAVE_INTTYPES_H="/* #define __PRELUDE_HAVE_INTTYPES_H */" fi { $as_echo "$as_me:$LINENO: checking size of long" >&5 $as_echo_n "checking size of long... " >&6; } if test "${ac_cv_sizeof_long+set}" = set; then $as_echo_n "(cached) " >&6 else for ac_size in 4 8 1 2 16 ; do # List sizes in rough order of prevalence. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include "confdefs.h" #include int main () { switch (0) case 0: case (sizeof (long) == $ac_size):; ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_cv_sizeof_long=$ac_size else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext if test x$ac_cv_sizeof_long != x ; then break; fi done fi if test x$ac_cv_sizeof_long = x ; then { { $as_echo "$as_me:$LINENO: error: cannot determine a size for long" >&5 $as_echo "$as_me: error: cannot determine a size for long" >&2;} { (exit 1); exit 1; }; } fi { $as_echo "$as_me:$LINENO: result: $ac_cv_sizeof_long" >&5 $as_echo "$ac_cv_sizeof_long" >&6; } cat >>confdefs.h <<_ACEOF #define SIZEOF_LONG $ac_cv_sizeof_long _ACEOF if test "$ac_cv_sizeof_long" = "8" ; then __PRELUDE_HAVE_64BIT_LONG="#define __PRELUDE_HAVE_64BIT_LONG" else __PRELUDE_HAVE_64BIT_LONG="/* #define __PRELUDE_HAVE_64BIT_LONG */" fi ac_cv_have_uint8_t= { $as_echo "$as_me:$LINENO: checking for uint8_t" >&5 $as_echo_n "checking for uint8_t... " >&6; } if test "${ac_cv_type_uint8_t+set}" = set; then $as_echo_n "(cached) " >&6 else ac_cv_type_uint8_t=no cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default int main () { if (sizeof (uint8_t)) return 0; ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default int main () { if (sizeof ((uint8_t))) return 0; ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then : else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_type_uint8_t=yes fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:$LINENO: result: $ac_cv_type_uint8_t" >&5 $as_echo "$ac_cv_type_uint8_t" >&6; } if test "x$ac_cv_type_uint8_t" = x""yes; then ac_cv_have_uint8_t=yes else ac_cv_have_uint8_t=no fi if test "$ac_cv_have_uint8_t" = "yes" ; then __PRELUDE_STDINT_HAVE_UINT8="#define __PRELUDE_STDINT_HAVE_UINT8" else __PRELUDE_STDINT_HAVE_UINT8="/* #define __PRELUDE_STDINT_HAVE_UINT8 */" fi ac_cv_have_uint16_t= { $as_echo "$as_me:$LINENO: checking for uint16_t" >&5 $as_echo_n "checking for uint16_t... " >&6; } if test "${ac_cv_type_uint16_t+set}" = set; then $as_echo_n "(cached) " >&6 else ac_cv_type_uint16_t=no cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default int main () { if (sizeof (uint16_t)) return 0; ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default int main () { if (sizeof ((uint16_t))) return 0; ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then : else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_type_uint16_t=yes fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:$LINENO: result: $ac_cv_type_uint16_t" >&5 $as_echo "$ac_cv_type_uint16_t" >&6; } if test "x$ac_cv_type_uint16_t" = x""yes; then ac_cv_have_uint16_t=yes else ac_cv_have_uint16_t=no fi if test "$ac_cv_have_uint16_t" = "yes" ; then __PRELUDE_STDINT_HAVE_UINT16="#define __PRELUDE_STDINT_HAVE_UINT16" else __PRELUDE_STDINT_HAVE_UINT16="/* #define __PRELUDE_STDINT_HAVE_UINT16 */" fi ac_cv_have_uint32_t= { $as_echo "$as_me:$LINENO: checking for uint32_t" >&5 $as_echo_n "checking for uint32_t... " >&6; } if test "${ac_cv_type_uint32_t+set}" = set; then $as_echo_n "(cached) " >&6 else ac_cv_type_uint32_t=no cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default int main () { if (sizeof (uint32_t)) return 0; ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default int main () { if (sizeof ((uint32_t))) return 0; ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then : else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_type_uint32_t=yes fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:$LINENO: result: $ac_cv_type_uint32_t" >&5 $as_echo "$ac_cv_type_uint32_t" >&6; } if test "x$ac_cv_type_uint32_t" = x""yes; then ac_cv_have_uint32_t=yes else ac_cv_have_uint32_t=no fi if test "$ac_cv_have_uint32_t" = "yes" ; then __PRELUDE_STDINT_HAVE_UINT32="#define __PRELUDE_STDINT_HAVE_UINT32" else __PRELUDE_STDINT_HAVE_UINT32="/* #define __PRELUDE_STDINT_HAVE_UINT32 */" fi ac_cv_have_uint64_t= { $as_echo "$as_me:$LINENO: checking for uint64_t" >&5 $as_echo_n "checking for uint64_t... " >&6; } if test "${ac_cv_type_uint64_t+set}" = set; then $as_echo_n "(cached) " >&6 else ac_cv_type_uint64_t=no cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default int main () { if (sizeof (uint64_t)) return 0; ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default int main () { if (sizeof ((uint64_t))) return 0; ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then : else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_type_uint64_t=yes fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:$LINENO: result: $ac_cv_type_uint64_t" >&5 $as_echo "$ac_cv_type_uint64_t" >&6; } if test "x$ac_cv_type_uint64_t" = x""yes; then ac_cv_have_uint64_t=yes else ac_cv_have_uint64_t=no fi if test "$ac_cv_have_uint64_t" = "yes" ; then __PRELUDE_STDINT_HAVE_UINT64="#define __PRELUDE_STDINT_HAVE_UINT64" else __PRELUDE_STDINT_HAVE_UINT64="/* #define __PRELUDE_STDINT_HAVE_UINT64 */" fi { $as_echo "$as_me:$LINENO: checking for cpu-specific compiler flags" >&5 $as_echo_n "checking for cpu-specific compiler flags... " >&6; } if test "$host_cpu" == "x86_64" && test $enable_static = "yes"; then { $as_echo "$as_me:$LINENO: result: x86_64/static: adding -fPIC" >&5 $as_echo "x86_64/static: adding -fPIC" >&6; } flag=`echo "-fPIC" | $SED 'y% .=/+-(){}<>:*,%_______________%'` { $as_echo "$as_me:$LINENO: checking whether the C compiler accepts the -fPIC flag" >&5 $as_echo_n "checking whether the C compiler accepts the -fPIC flag... " >&6; } if { as_var=ax_cv_c_check_flag_$flag; eval "test \"\${$as_var+set}\" = set"; }; then $as_echo_n "(cached) " >&6 else ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu save_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS -fPIC" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then eval "ax_cv_c_check_flag_$flag=yes" else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 eval "ax_cv_c_check_flag_$flag=no" fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext CFLAGS="$save_CFLAGS" ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu fi ac_res=`eval 'as_val=${'ax_cv_c_check_flag_$flag'} $as_echo "$as_val"'` { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } if eval "test \"`echo '$ax_cv_c_check_flag_'$flag`\" = yes"; then : CPPFLAGS="$CPPFLAGS -fPIC" else : fi else { $as_echo "$as_me:$LINENO: result: none needed" >&5 $as_echo "none needed" >&6; } fi { $as_echo "$as_me:$LINENO: checking for platform-specific compiler flags" >&5 $as_echo_n "checking for platform-specific compiler flags... " >&6; } case "$host_os" in darwin*) # It may be called "cc", but it's really a GCC derivative # with a problematic special precompiler and precompiled # headers; turn off the special precompiler, as some # apparently-legal code won't compile with its precompiled # headers. { $as_echo "$as_me:$LINENO: result: Darwin: adding -no-cpp-precomp" >&5 $as_echo "Darwin: adding -no-cpp-precomp" >&6; } flag=`echo "-no-cpp-precomp" | $SED 'y% .=/+-(){}<>:*,%_______________%'` { $as_echo "$as_me:$LINENO: checking whether the C compiler accepts the -no-cpp-precomp flag" >&5 $as_echo_n "checking whether the C compiler accepts the -no-cpp-precomp flag... " >&6; } if { as_var=ax_cv_c_check_flag_$flag; eval "test \"\${$as_var+set}\" = set"; }; then $as_echo_n "(cached) " >&6 else ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu save_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS -no-cpp-precomp" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then eval "ax_cv_c_check_flag_$flag=yes" else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 eval "ax_cv_c_check_flag_$flag=no" fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext CFLAGS="$save_CFLAGS" ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu fi ac_res=`eval 'as_val=${'ax_cv_c_check_flag_$flag'} $as_echo "$as_val"'` { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } if eval "test \"`echo '$ax_cv_c_check_flag_'$flag`\" = yes"; then : PCFLAGS="$PCFLAGS -no-cpp-precomp" else : fi ;; *) { $as_echo "$as_me:$LINENO: result: none needed" >&5 $as_echo "none needed" >&6; } ;; esac flag=`echo "-z relro" | $SED 'y% .=/+-(){}<>:*,%_______________%'` { $as_echo "$as_me:$LINENO: checking whether the linker accepts the -z relro flag" >&5 $as_echo_n "checking whether the linker accepts the -z relro flag... " >&6; } if { as_var=ax_cv_ld_check_flag_$flag; eval "test \"\${$as_var+set}\" = set"; }; then $as_echo_n "(cached) " >&6 else #AC_LANG_PUSH([C]) save_LDFLAGS="$LDFLAGS" LDFLAGS="$LDFLAGS -z relro" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || $as_test_x conftest$ac_exeext }; then eval "ax_cv_ld_check_flag_$flag=yes" else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 eval "ax_cv_ld_check_flag_$flag=no" fi rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LDFLAGS="$save_LDFLAGS" #AC_LANG_POP fi ac_res=`eval 'as_val=${'ax_cv_ld_check_flag_$flag'} $as_echo "$as_val"'` { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } if eval "test \"`echo '$ax_cv_ld_check_flag_'$flag`\" = yes"; then : LDFLAGS="$LDFLAGS -z relro" else : fi flag=`echo "-z now" | $SED 'y% .=/+-(){}<>:*,%_______________%'` { $as_echo "$as_me:$LINENO: checking whether the linker accepts the -z now flag" >&5 $as_echo_n "checking whether the linker accepts the -z now flag... " >&6; } if { as_var=ax_cv_ld_check_flag_$flag; eval "test \"\${$as_var+set}\" = set"; }; then $as_echo_n "(cached) " >&6 else #AC_LANG_PUSH([C]) save_LDFLAGS="$LDFLAGS" LDFLAGS="$LDFLAGS -z now" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || $as_test_x conftest$ac_exeext }; then eval "ax_cv_ld_check_flag_$flag=yes" else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 eval "ax_cv_ld_check_flag_$flag=no" fi rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LDFLAGS="$save_LDFLAGS" #AC_LANG_POP fi ac_res=`eval 'as_val=${'ax_cv_ld_check_flag_$flag'} $as_echo "$as_val"'` { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } if eval "test \"`echo '$ax_cv_ld_check_flag_'$flag`\" = yes"; then : LDFLAGS="$LDFLAGS -z now" else : fi for i in -Wall -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations \ -Wbad-function-cast -Wcast-qual -Wcast-align -Wnested-externs -Wunused \ -Wformat -Wformat-security; do flag=`echo "$i" | $SED 'y% .=/+-(){}<>:*,%_______________%'` { $as_echo "$as_me:$LINENO: checking whether the C compiler accepts the $i flag" >&5 $as_echo_n "checking whether the C compiler accepts the $i flag... " >&6; } if { as_var=ax_cv_c_check_flag_$flag; eval "test \"\${$as_var+set}\" = set"; }; then $as_echo_n "(cached) " >&6 else ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu save_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS $i" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then eval "ax_cv_c_check_flag_$flag=yes" else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 eval "ax_cv_c_check_flag_$flag=no" fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext CFLAGS="$save_CFLAGS" ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu fi ac_res=`eval 'as_val=${'ax_cv_c_check_flag_$flag'} $as_echo "$as_val"'` { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } if eval "test \"`echo '$ax_cv_c_check_flag_'$flag`\" = yes"; then : PCFLAGS="$PCFLAGS $i" else : fi done if test x$buggy_pthread_initializers = xyes; then flag=`echo "-Wno-missing-braces" | $SED 'y% .=/+-(){}<>:*,%_______________%'` { $as_echo "$as_me:$LINENO: checking whether the C compiler accepts the -Wno-missing-braces flag" >&5 $as_echo_n "checking whether the C compiler accepts the -Wno-missing-braces flag... " >&6; } if { as_var=ax_cv_c_check_flag_$flag; eval "test \"\${$as_var+set}\" = set"; }; then $as_echo_n "(cached) " >&6 else ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu save_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS -Wno-missing-braces" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then eval "ax_cv_c_check_flag_$flag=yes" else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 eval "ax_cv_c_check_flag_$flag=no" fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext CFLAGS="$save_CFLAGS" ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu fi ac_res=`eval 'as_val=${'ax_cv_c_check_flag_$flag'} $as_echo "$as_val"'` { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } if eval "test \"`echo '$ax_cv_c_check_flag_'$flag`\" = yes"; then : PCFLAGS="$PCFLAGS -Wno-missing-braces" else : fi fi EXP_VAR=SYSCONFDIR FROM_VAR=$sysconfdir prefix_save=$prefix exec_prefix_save=$exec_prefix if test "x$prefix" = "xNONE"; then prefix="$ac_default_prefix" fi if test "x$exec_prefix" = "xNONE"; then exec_prefix=$prefix fi full_var="$FROM_VAR" while true; do new_full_var="`eval echo $full_var`" if test "x$new_full_var" = "x$full_var"; then break; fi full_var=$new_full_var done full_var=$new_full_var SYSCONFDIR="$full_var" prefix=$prefix_save exec_prefix=$exec_prefix_save EXP_VAR=LOCALSTATEDIR FROM_VAR=$localstatedir prefix_save=$prefix exec_prefix_save=$exec_prefix if test "x$prefix" = "xNONE"; then prefix="$ac_default_prefix" fi if test "x$exec_prefix" = "xNONE"; then exec_prefix=$prefix fi full_var="$FROM_VAR" while true; do new_full_var="`eval echo $full_var`" if test "x$new_full_var" = "x$full_var"; then break; fi full_var=$new_full_var done full_var=$new_full_var LOCALSTATEDIR="$full_var" prefix=$prefix_save exec_prefix=$exec_prefix_save EXP_VAR=LIBDIR FROM_VAR=$libdir prefix_save=$prefix exec_prefix_save=$exec_prefix if test "x$prefix" = "xNONE"; then prefix="$ac_default_prefix" fi if test "x$exec_prefix" = "xNONE"; then exec_prefix=$prefix fi full_var="$FROM_VAR" while true; do new_full_var="`eval echo $full_var`" if test "x$new_full_var" = "x$full_var"; then break; fi full_var=$new_full_var done full_var=$new_full_var LIBDIR="$full_var" prefix=$prefix_save exec_prefix=$exec_prefix_save EXP_VAR=BINDIR FROM_VAR=$bindir prefix_save=$prefix exec_prefix_save=$exec_prefix if test "x$prefix" = "xNONE"; then prefix="$ac_default_prefix" fi if test "x$exec_prefix" = "xNONE"; then exec_prefix=$prefix fi full_var="$FROM_VAR" while true; do new_full_var="`eval echo $full_var`" if test "x$new_full_var" = "x$full_var"; then break; fi full_var=$new_full_var done full_var=$new_full_var BINDIR="$full_var" prefix=$prefix_save exec_prefix=$exec_prefix_save PRELUDE_SPOOL_DIR=$LOCALSTATEDIR/spool/prelude PRELUDE_CONFIG_DIR=$SYSCONFDIR/prelude cat >>confdefs.h <<_ACEOF #define PRELUDE_SPOOL_DIR "$PRELUDE_SPOOL_DIR" _ACEOF cat >>confdefs.h <<_ACEOF #define PRELUDE_CONFIG_DIR "$PRELUDE_CONFIG_DIR" _ACEOF case "${host}" in i[3456789]86-*-mingw32*) WIN32="yes" ;; *cygwin*) WIN32="yes" ;; *) WIN32="no" ;; esac if test x$WIN32 = xyes; then cat >>confdefs.h <<_ACEOF #define INSTALLDIR "$BINDIR" _ACEOF else cat >>confdefs.h <<_ACEOF #define INSTALLDIR "$LIBDIR" _ACEOF fi ac_config_files="$ac_config_files Makefile client.conf global.conf idmef-client.conf libprelude-config libltdl/Makefile libmissing/Makefile libmissing/tests/Makefile m4/Makefile src/Makefile src/libprelude.pc src/libprelude-error/Makefile src/include/Makefile src/include/prelude.h src/include/prelude-inttypes.h prelude-admin/prelude-adduser prelude-admin/Makefile docs/Makefile docs/api/Makefile docs/manpages/Makefile bindings/Makefile bindings/low-level/Makefile bindings/low-level/perl/Makefile.PL bindings/low-level/python/Makefile bindings/low-level/python/setup.py bindings/c++/Makefile bindings/c++/include/Makefile bindings/lua/Makefile bindings/perl/Makefile.PL bindings/python/Makefile bindings/python/setup.py bindings/ruby/Makefile tests/Makefile" ac_config_commands="$ac_config_commands default" cat >confcache <<\_ACEOF # This file is a shell script that caches the results of configure # tests run on this system so they can be shared between configure # scripts and configure runs, see configure's option --config-cache. # It is not useful on other systems. If it contains results you don't # want to keep, you may remove or edit it. # # config.status only pays attention to the cache file if you give it # the --recheck option to rerun configure. # # `ac_cv_env_foo' variables (set or unset) will be overridden when # loading this file, other *unset* `ac_cv_foo' will be assigned the # following values. _ACEOF # The following way of writing the cache mishandles newlines in values, # but we know of no workaround that is simple, portable, and efficient. # So, we kill variables containing newlines. # Ultrix sh set writes to stderr and can't be redirected directly, # and sets the high bit in the cache file unless we assign to the vars. ( for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do eval ac_val=\$$ac_var case $ac_val in #( *${as_nl}*) case $ac_var in #( *_cv_*) { $as_echo "$as_me:$LINENO: WARNING: cache variable $ac_var contains a newline" >&5 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; esac case $ac_var in #( _ | IFS | as_nl) ;; #( BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( *) $as_unset $ac_var ;; esac ;; esac done (set) 2>&1 | case $as_nl`(ac_space=' '; set) 2>&1` in #( *${as_nl}ac_space=\ *) # `set' does not quote correctly, so add quotes (double-quote # substitution turns \\\\ into \\, and sed turns \\ into \). sed -n \ "s/'/'\\\\''/g; s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p" ;; #( *) # `set' quotes correctly as required by POSIX, so do not add quotes. sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" ;; esac | sort ) | sed ' /^ac_cv_env_/b end t clear :clear s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/ t end s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/ :end' >>confcache if diff "$cache_file" confcache >/dev/null 2>&1; then :; else if test -w "$cache_file"; then test "x$cache_file" != "x/dev/null" && { $as_echo "$as_me:$LINENO: updating cache $cache_file" >&5 $as_echo "$as_me: updating cache $cache_file" >&6;} cat confcache >$cache_file else { $as_echo "$as_me:$LINENO: not updating unwritable cache $cache_file" >&5 $as_echo "$as_me: not updating unwritable cache $cache_file" >&6;} fi fi rm -f confcache test "x$prefix" = xNONE && prefix=$ac_default_prefix # Let make expand exec_prefix. test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' DEFS=-DHAVE_CONFIG_H ac_libobjs= ac_ltlibobjs= for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue # 1. Remove the extension, and $U if already installed. ac_script='s/\$U\././;s/\.o$//;s/\.obj$//' ac_i=`$as_echo "$ac_i" | sed "$ac_script"` # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR # will be set to the directory where LIBOBJS objects are built. ac_libobjs="$ac_libobjs \${LIBOBJDIR}$ac_i\$U.$ac_objext" ac_ltlibobjs="$ac_ltlibobjs \${LIBOBJDIR}$ac_i"'$U.lo' done LIBOBJS=$ac_libobjs LTLIBOBJS=$ac_ltlibobjs if test -n "$EXEEXT"; then am__EXEEXT_TRUE= am__EXEEXT_FALSE='#' else am__EXEEXT_TRUE='#' am__EXEEXT_FALSE= fi if test -z "${MAINTAINER_MODE_TRUE}" && test -z "${MAINTAINER_MODE_FALSE}"; then { { $as_echo "$as_me:$LINENO: error: conditional \"MAINTAINER_MODE\" was never defined. Usually this means the macro was only invoked conditionally." >&5 $as_echo "$as_me: error: conditional \"MAINTAINER_MODE\" was never defined. Usually this means the macro was only invoked conditionally." >&2;} { (exit 1); exit 1; }; } fi if test -z "${AMDEP_TRUE}" && test -z "${AMDEP_FALSE}"; then { { $as_echo "$as_me:$LINENO: error: conditional \"AMDEP\" was never defined. Usually this means the macro was only invoked conditionally." >&5 $as_echo "$as_me: error: conditional \"AMDEP\" was never defined. Usually this means the macro was only invoked conditionally." >&2;} { (exit 1); exit 1; }; } fi if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then { { $as_echo "$as_me:$LINENO: error: conditional \"am__fastdepCC\" was never defined. Usually this means the macro was only invoked conditionally." >&5 $as_echo "$as_me: error: conditional \"am__fastdepCC\" was never defined. Usually this means the macro was only invoked conditionally." >&2;} { (exit 1); exit 1; }; } fi if test -z "${am__fastdepCXX_TRUE}" && test -z "${am__fastdepCXX_FALSE}"; then { { $as_echo "$as_me:$LINENO: error: conditional \"am__fastdepCXX\" was never defined. Usually this means the macro was only invoked conditionally." >&5 $as_echo "$as_me: error: conditional \"am__fastdepCXX\" was never defined. Usually this means the macro was only invoked conditionally." >&2;} { (exit 1); exit 1; }; } fi if test -z "${am__fastdepCXX_TRUE}" && test -z "${am__fastdepCXX_FALSE}"; then { { $as_echo "$as_me:$LINENO: error: conditional \"am__fastdepCXX\" was never defined. Usually this means the macro was only invoked conditionally." >&5 $as_echo "$as_me: error: conditional \"am__fastdepCXX\" was never defined. Usually this means the macro was only invoked conditionally." >&2;} { (exit 1); exit 1; }; } fi if test -z "${INSTALL_LTDL_TRUE}" && test -z "${INSTALL_LTDL_FALSE}"; then { { $as_echo "$as_me:$LINENO: error: conditional \"INSTALL_LTDL\" was never defined. Usually this means the macro was only invoked conditionally." >&5 $as_echo "$as_me: error: conditional \"INSTALL_LTDL\" was never defined. Usually this means the macro was only invoked conditionally." >&2;} { (exit 1); exit 1; }; } fi if test -z "${CONVENIENCE_LTDL_TRUE}" && test -z "${CONVENIENCE_LTDL_FALSE}"; then { { $as_echo "$as_me:$LINENO: error: conditional \"CONVENIENCE_LTDL\" was never defined. Usually this means the macro was only invoked conditionally." >&5 $as_echo "$as_me: error: conditional \"CONVENIENCE_LTDL\" was never defined. Usually this means the macro was only invoked conditionally." >&2;} { (exit 1); exit 1; }; } fi LT_CONFIG_H=config.h _ltdl_libobjs= _ltdl_ltlibobjs= if test -n "$_LT_LIBOBJS"; then # Remove the extension. _lt_sed_drop_objext='s/\.o$//;s/\.obj$//' for i in `for i in $_LT_LIBOBJS; do echo "$i"; done | sed "$_lt_sed_drop_objext" | sort -u`; do _ltdl_libobjs="$_ltdl_libobjs $lt_libobj_prefix$i.$ac_objext" _ltdl_ltlibobjs="$_ltdl_ltlibobjs $lt_libobj_prefix$i.lo" done fi ltdl_LIBOBJS=$_ltdl_libobjs ltdl_LTLIBOBJS=$_ltdl_ltlibobjs if test -z "${HAVE_SWIG_TRUE}" && test -z "${HAVE_SWIG_FALSE}"; then { { $as_echo "$as_me:$LINENO: error: conditional \"HAVE_SWIG\" was never defined. Usually this means the macro was only invoked conditionally." >&5 $as_echo "$as_me: error: conditional \"HAVE_SWIG\" was never defined. Usually this means the macro was only invoked conditionally." >&2;} { (exit 1); exit 1; }; } fi if test -z "${HAVE_PERL_TRUE}" && test -z "${HAVE_PERL_FALSE}"; then { { $as_echo "$as_me:$LINENO: error: conditional \"HAVE_PERL\" was never defined. Usually this means the macro was only invoked conditionally." >&5 $as_echo "$as_me: error: conditional \"HAVE_PERL\" was never defined. Usually this means the macro was only invoked conditionally." >&2;} { (exit 1); exit 1; }; } fi if test -z "${HAVE_PYTHON_TRUE}" && test -z "${HAVE_PYTHON_FALSE}"; then { { $as_echo "$as_me:$LINENO: error: conditional \"HAVE_PYTHON\" was never defined. Usually this means the macro was only invoked conditionally." >&5 $as_echo "$as_me: error: conditional \"HAVE_PYTHON\" was never defined. Usually this means the macro was only invoked conditionally." >&2;} { (exit 1); exit 1; }; } fi if test -z "${HAVE_RUBY_TRUE}" && test -z "${HAVE_RUBY_FALSE}"; then { { $as_echo "$as_me:$LINENO: error: conditional \"HAVE_RUBY\" was never defined. Usually this means the macro was only invoked conditionally." >&5 $as_echo "$as_me: error: conditional \"HAVE_RUBY\" was never defined. Usually this means the macro was only invoked conditionally." >&2;} { (exit 1); exit 1; }; } fi if test -z "${HAVE_LUA_TRUE}" && test -z "${HAVE_LUA_FALSE}"; then { { $as_echo "$as_me:$LINENO: error: conditional \"HAVE_LUA\" was never defined. Usually this means the macro was only invoked conditionally." >&5 $as_echo "$as_me: error: conditional \"HAVE_LUA\" was never defined. Usually this means the macro was only invoked conditionally." >&2;} { (exit 1); exit 1; }; } fi if test -z "${HAVE_EASY_BINDINGS_TRUE}" && test -z "${HAVE_EASY_BINDINGS_FALSE}"; then { { $as_echo "$as_me:$LINENO: error: conditional \"HAVE_EASY_BINDINGS\" was never defined. Usually this means the macro was only invoked conditionally." >&5 $as_echo "$as_me: error: conditional \"HAVE_EASY_BINDINGS\" was never defined. Usually this means the macro was only invoked conditionally." >&2;} { (exit 1); exit 1; }; } fi if test -z "${HAVE_VALGRIND_TRUE}" && test -z "${HAVE_VALGRIND_FALSE}"; then { { $as_echo "$as_me:$LINENO: error: conditional \"HAVE_VALGRIND\" was never defined. Usually this means the macro was only invoked conditionally." >&5 $as_echo "$as_me: error: conditional \"HAVE_VALGRIND\" was never defined. Usually this means the macro was only invoked conditionally." >&2;} { (exit 1); exit 1; }; } fi if test -z "${GL_COND_LIBTOOL_TRUE}" && test -z "${GL_COND_LIBTOOL_FALSE}"; then { { $as_echo "$as_me:$LINENO: error: conditional \"GL_COND_LIBTOOL\" was never defined. Usually this means the macro was only invoked conditionally." >&5 $as_echo "$as_me: error: conditional \"GL_COND_LIBTOOL\" was never defined. Usually this means the macro was only invoked conditionally." >&2;} { (exit 1); exit 1; }; } fi gl_libobjs= gl_ltlibobjs= if test -n "$gl_LIBOBJS"; then # Remove the extension. sed_drop_objext='s/\.o$//;s/\.obj$//' for i in `for i in $gl_LIBOBJS; do echo "$i"; done | sed -e "$sed_drop_objext" | sort | uniq`; do gl_libobjs="$gl_libobjs $i.$ac_objext" gl_ltlibobjs="$gl_ltlibobjs $i.lo" done fi gl_LIBOBJS=$gl_libobjs gl_LTLIBOBJS=$gl_ltlibobjs gltests_libobjs= gltests_ltlibobjs= if test -n "$gltests_LIBOBJS"; then # Remove the extension. sed_drop_objext='s/\.o$//;s/\.obj$//' for i in `for i in $gltests_LIBOBJS; do echo "$i"; done | sed -e "$sed_drop_objext" | sort | uniq`; do gltests_libobjs="$gltests_libobjs $i.$ac_objext" gltests_ltlibobjs="$gltests_ltlibobjs $i.lo" done fi gltests_LIBOBJS=$gltests_libobjs gltests_LTLIBOBJS=$gltests_ltlibobjs if test -z "${ENABLE_GTK_DOC_TRUE}" && test -z "${ENABLE_GTK_DOC_FALSE}"; then { { $as_echo "$as_me:$LINENO: error: conditional \"ENABLE_GTK_DOC\" was never defined. Usually this means the macro was only invoked conditionally." >&5 $as_echo "$as_me: error: conditional \"ENABLE_GTK_DOC\" was never defined. Usually this means the macro was only invoked conditionally." >&2;} { (exit 1); exit 1; }; } fi if test -z "${GTK_DOC_USE_LIBTOOL_TRUE}" && test -z "${GTK_DOC_USE_LIBTOOL_FALSE}"; then { { $as_echo "$as_me:$LINENO: error: conditional \"GTK_DOC_USE_LIBTOOL\" was never defined. Usually this means the macro was only invoked conditionally." >&5 $as_echo "$as_me: error: conditional \"GTK_DOC_USE_LIBTOOL\" was never defined. Usually this means the macro was only invoked conditionally." >&2;} { (exit 1); exit 1; }; } fi : ${CONFIG_STATUS=./config.status} ac_write_fail=0 ac_clean_files_save=$ac_clean_files ac_clean_files="$ac_clean_files $CONFIG_STATUS" { $as_echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5 $as_echo "$as_me: creating $CONFIG_STATUS" >&6;} cat >$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 #! $SHELL # Generated by $as_me. # Run this file to recreate the current configuration. # Compiler output produced by configure, useful for debugging # configure, is in config.log if it exists. debug=false ac_cs_recheck=false ac_cs_silent=false SHELL=\${CONFIG_SHELL-$SHELL} _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 ## --------------------- ## ## M4sh Initialization. ## ## --------------------- ## # Be more Bourne compatible DUALCASE=1; export DUALCASE # for MKS sh if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then emulate sh NULLCMD=: # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' setopt NO_GLOB_SUBST else case `(set -o) 2>/dev/null` in *posix*) set -o posix ;; esac fi # PATH needs CR # Avoid depending upon Character Ranges. as_cr_letters='abcdefghijklmnopqrstuvwxyz' as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' as_cr_Letters=$as_cr_letters$as_cr_LETTERS as_cr_digits='0123456789' as_cr_alnum=$as_cr_Letters$as_cr_digits as_nl=' ' export as_nl # Printing a long string crashes Solaris 7 /usr/bin/printf. as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo if (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then as_echo='printf %s\n' as_echo_n='printf %s' else if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' as_echo_n='/usr/ucb/echo -n' else as_echo_body='eval expr "X$1" : "X\\(.*\\)"' as_echo_n_body='eval arg=$1; case $arg in *"$as_nl"*) expr "X$arg" : "X\\(.*\\)$as_nl"; arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; esac; expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" ' export as_echo_n_body as_echo_n='sh -c $as_echo_n_body as_echo' fi export as_echo_body as_echo='sh -c $as_echo_body as_echo' fi # The user is always right. if test "${PATH_SEPARATOR+set}" != set; then PATH_SEPARATOR=: (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || PATH_SEPARATOR=';' } fi # Support unset when possible. if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then as_unset=unset else as_unset=false fi # IFS # We need space, tab and new line, in precisely that order. Quoting is # there to prevent editors from complaining about space-tab. # (If _AS_PATH_WALK were called with IFS unset, it would disable word # splitting by setting IFS to empty value.) IFS=" "" $as_nl" # Find who we are. Look in the path if we contain no directory separator. case $0 in *[\\/]* ) as_myself=$0 ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break done IFS=$as_save_IFS ;; esac # We did not find ourselves, most probably we were run as `sh COMMAND' # in which case we are not to be found in the path. if test "x$as_myself" = x; then as_myself=$0 fi if test ! -f "$as_myself"; then $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 { (exit 1); exit 1; } fi # Work around bugs in pre-3.0 UWIN ksh. for as_var in ENV MAIL MAILPATH do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var done PS1='$ ' PS2='> ' PS4='+ ' # NLS nuisances. LC_ALL=C export LC_ALL LANGUAGE=C export LANGUAGE # Required to use basename. if expr a : '\(a\)' >/dev/null 2>&1 && test "X`expr 00001 : '.*\(...\)'`" = X001; then as_expr=expr else as_expr=false fi if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then as_basename=basename else as_basename=false fi # Name of the executable. as_me=`$as_basename -- "$0" || $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ X"$0" : 'X\(//\)$' \| \ X"$0" : 'X\(/\)' \| . 2>/dev/null || $as_echo X/"$0" | sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/ q } /^X\/\(\/\/\)$/{ s//\1/ q } /^X\/\(\/\).*/{ s//\1/ q } s/.*/./; q'` # CDPATH. $as_unset CDPATH as_lineno_1=$LINENO as_lineno_2=$LINENO test "x$as_lineno_1" != "x$as_lineno_2" && test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || { # Create $as_me.lineno as a copy of $as_myself, but with $LINENO # uniformly replaced by the line number. The first 'sed' inserts a # line-number line after each line using $LINENO; the second 'sed' # does the real work. The second script uses 'N' to pair each # line-number line with the line containing $LINENO, and appends # trailing '-' during substitution so that $LINENO is not a special # case at line end. # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the # scripts with optimization help from Paolo Bonzini. Blame Lee # E. McMahon (1931-1989) for sed's syntax. :-) sed -n ' p /[$]LINENO/= ' <$as_myself | sed ' s/[$]LINENO.*/&-/ t lineno b :lineno N :loop s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/ t loop s/-\n.*// ' >$as_me.lineno && chmod +x "$as_me.lineno" || { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2 { (exit 1); exit 1; }; } # Don't try to exec as it changes $[0], causing all sort of problems # (the dirname of $[0] is not the place where we might find the # original and so on. Autoconf is especially sensitive to this). . "./$as_me.lineno" # Exit status is that of the last command. exit } if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then as_dirname=dirname else as_dirname=false fi ECHO_C= ECHO_N= ECHO_T= case `echo -n x` in -n*) case `echo 'x\c'` in *c*) ECHO_T=' ';; # ECHO_T is single tab character. *) ECHO_C='\c';; esac;; *) ECHO_N='-n';; esac if expr a : '\(a\)' >/dev/null 2>&1 && test "X`expr 00001 : '.*\(...\)'`" = X001; then as_expr=expr else as_expr=false fi rm -f conf$$ conf$$.exe conf$$.file if test -d conf$$.dir; then rm -f conf$$.dir/conf$$.file else rm -f conf$$.dir mkdir conf$$.dir 2>/dev/null fi if (echo >conf$$.file) 2>/dev/null; then if ln -s conf$$.file conf$$ 2>/dev/null; then as_ln_s='ln -s' # ... but there are two gotchas: # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. # In both cases, we have to default to `cp -p'. ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || as_ln_s='cp -p' elif ln conf$$.file conf$$ 2>/dev/null; then as_ln_s=ln else as_ln_s='cp -p' fi else as_ln_s='cp -p' fi rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file rmdir conf$$.dir 2>/dev/null if mkdir -p . 2>/dev/null; then as_mkdir_p=: else test -d ./-p && rmdir ./-p as_mkdir_p=false fi if test -x / >/dev/null 2>&1; then as_test_x='test -x' else if ls -dL / >/dev/null 2>&1; then as_ls_L_option=L else as_ls_L_option= fi as_test_x=' eval sh -c '\'' if test -d "$1"; then test -d "$1/."; else case $1 in -*)set "./$1";; esac; case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in ???[sx]*):;;*)false;;esac;fi '\'' sh ' fi as_executable_p=$as_test_x # Sed expression to map a string onto a valid CPP name. as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" # Sed expression to map a string onto a valid variable name. as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" exec 6>&1 # Save the log message, to keep $[0] and so on meaningful, and to # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" This file was extended by $as_me, which was generated by GNU Autoconf 2.63. Invocation command line was CONFIG_FILES = $CONFIG_FILES CONFIG_HEADERS = $CONFIG_HEADERS CONFIG_LINKS = $CONFIG_LINKS CONFIG_COMMANDS = $CONFIG_COMMANDS $ $0 $@ on `(hostname || uname -n) 2>/dev/null | sed 1q` " _ACEOF case $ac_config_files in *" "*) set x $ac_config_files; shift; ac_config_files=$*;; esac case $ac_config_headers in *" "*) set x $ac_config_headers; shift; ac_config_headers=$*;; esac cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 # Files that config.status was made for. config_files="$ac_config_files" config_headers="$ac_config_headers" config_commands="$ac_config_commands" _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 ac_cs_usage="\ \`$as_me' instantiates files from templates according to the current configuration. Usage: $0 [OPTION]... [FILE]... -h, --help print this help, then exit -V, --version print version number and configuration settings, then exit -q, --quiet, --silent do not print progress messages -d, --debug don't remove temporary files --recheck update $as_me by reconfiguring in the same conditions --file=FILE[:TEMPLATE] instantiate the configuration file FILE --header=FILE[:TEMPLATE] instantiate the configuration header FILE Configuration files: $config_files Configuration headers: $config_headers Configuration commands: $config_commands Report bugs to ." _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_version="\\ config.status configured by $0, generated by GNU Autoconf 2.63, with options \\"`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\" Copyright (C) 2008 Free Software Foundation, Inc. This config.status script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it." ac_pwd='$ac_pwd' srcdir='$srcdir' INSTALL='$INSTALL' MKDIR_P='$MKDIR_P' AWK='$AWK' test -n "\$AWK" || AWK=awk _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # The default lists apply if the user does not specify any file. ac_need_defaults=: while test $# != 0 do case $1 in --*=*) ac_option=`expr "X$1" : 'X\([^=]*\)='` ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'` ac_shift=: ;; *) ac_option=$1 ac_optarg=$2 ac_shift=shift ;; esac case $ac_option in # Handling of the options. -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) ac_cs_recheck=: ;; --version | --versio | --versi | --vers | --ver | --ve | --v | -V ) $as_echo "$ac_cs_version"; exit ;; --debug | --debu | --deb | --de | --d | -d ) debug=: ;; --file | --fil | --fi | --f ) $ac_shift case $ac_optarg in *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; esac CONFIG_FILES="$CONFIG_FILES '$ac_optarg'" ac_need_defaults=false;; --header | --heade | --head | --hea ) $ac_shift case $ac_optarg in *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; esac CONFIG_HEADERS="$CONFIG_HEADERS '$ac_optarg'" ac_need_defaults=false;; --he | --h) # Conflict between --help and --header { $as_echo "$as_me: error: ambiguous option: $1 Try \`$0 --help' for more information." >&2 { (exit 1); exit 1; }; };; --help | --hel | -h ) $as_echo "$ac_cs_usage"; exit ;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil | --si | --s) ac_cs_silent=: ;; # This is an error. -*) { $as_echo "$as_me: error: unrecognized option: $1 Try \`$0 --help' for more information." >&2 { (exit 1); exit 1; }; } ;; *) ac_config_targets="$ac_config_targets $1" ac_need_defaults=false ;; esac shift done ac_configure_extra_args= if $ac_cs_silent; then exec 6>/dev/null ac_configure_extra_args="$ac_configure_extra_args --silent" fi _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 if \$ac_cs_recheck; then set X '$SHELL' '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion shift \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6 CONFIG_SHELL='$SHELL' export CONFIG_SHELL exec "\$@" fi _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 exec 5>>config.log { echo sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX ## Running $as_me. ## _ASBOX $as_echo "$ac_log" } >&5 _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 # # INIT-COMMANDS # AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir" # The HP-UX ksh and POSIX shell print the target directory to stdout # if CDPATH is set. (unset CDPATH) >/dev/null 2>&1 && unset CDPATH sed_quote_subst='$sed_quote_subst' double_quote_subst='$double_quote_subst' delay_variable_subst='$delay_variable_subst' macro_version='`$ECHO "X$macro_version" | $Xsed -e "$delay_single_quote_subst"`' macro_revision='`$ECHO "X$macro_revision" | $Xsed -e "$delay_single_quote_subst"`' AS='`$ECHO "X$AS" | $Xsed -e "$delay_single_quote_subst"`' DLLTOOL='`$ECHO "X$DLLTOOL" | $Xsed -e "$delay_single_quote_subst"`' OBJDUMP='`$ECHO "X$OBJDUMP" | $Xsed -e "$delay_single_quote_subst"`' enable_static='`$ECHO "X$enable_static" | $Xsed -e "$delay_single_quote_subst"`' enable_shared='`$ECHO "X$enable_shared" | $Xsed -e "$delay_single_quote_subst"`' pic_mode='`$ECHO "X$pic_mode" | $Xsed -e "$delay_single_quote_subst"`' enable_fast_install='`$ECHO "X$enable_fast_install" | $Xsed -e "$delay_single_quote_subst"`' host_alias='`$ECHO "X$host_alias" | $Xsed -e "$delay_single_quote_subst"`' host='`$ECHO "X$host" | $Xsed -e "$delay_single_quote_subst"`' host_os='`$ECHO "X$host_os" | $Xsed -e "$delay_single_quote_subst"`' build_alias='`$ECHO "X$build_alias" | $Xsed -e "$delay_single_quote_subst"`' build='`$ECHO "X$build" | $Xsed -e "$delay_single_quote_subst"`' build_os='`$ECHO "X$build_os" | $Xsed -e "$delay_single_quote_subst"`' SED='`$ECHO "X$SED" | $Xsed -e "$delay_single_quote_subst"`' Xsed='`$ECHO "X$Xsed" | $Xsed -e "$delay_single_quote_subst"`' GREP='`$ECHO "X$GREP" | $Xsed -e "$delay_single_quote_subst"`' EGREP='`$ECHO "X$EGREP" | $Xsed -e "$delay_single_quote_subst"`' FGREP='`$ECHO "X$FGREP" | $Xsed -e "$delay_single_quote_subst"`' LD='`$ECHO "X$LD" | $Xsed -e "$delay_single_quote_subst"`' NM='`$ECHO "X$NM" | $Xsed -e "$delay_single_quote_subst"`' LN_S='`$ECHO "X$LN_S" | $Xsed -e "$delay_single_quote_subst"`' max_cmd_len='`$ECHO "X$max_cmd_len" | $Xsed -e "$delay_single_quote_subst"`' ac_objext='`$ECHO "X$ac_objext" | $Xsed -e "$delay_single_quote_subst"`' exeext='`$ECHO "X$exeext" | $Xsed -e "$delay_single_quote_subst"`' lt_unset='`$ECHO "X$lt_unset" | $Xsed -e "$delay_single_quote_subst"`' lt_SP2NL='`$ECHO "X$lt_SP2NL" | $Xsed -e "$delay_single_quote_subst"`' lt_NL2SP='`$ECHO "X$lt_NL2SP" | $Xsed -e "$delay_single_quote_subst"`' reload_flag='`$ECHO "X$reload_flag" | $Xsed -e "$delay_single_quote_subst"`' reload_cmds='`$ECHO "X$reload_cmds" | $Xsed -e "$delay_single_quote_subst"`' deplibs_check_method='`$ECHO "X$deplibs_check_method" | $Xsed -e "$delay_single_quote_subst"`' file_magic_cmd='`$ECHO "X$file_magic_cmd" | $Xsed -e "$delay_single_quote_subst"`' AR='`$ECHO "X$AR" | $Xsed -e "$delay_single_quote_subst"`' AR_FLAGS='`$ECHO "X$AR_FLAGS" | $Xsed -e "$delay_single_quote_subst"`' STRIP='`$ECHO "X$STRIP" | $Xsed -e "$delay_single_quote_subst"`' RANLIB='`$ECHO "X$RANLIB" | $Xsed -e "$delay_single_quote_subst"`' old_postinstall_cmds='`$ECHO "X$old_postinstall_cmds" | $Xsed -e "$delay_single_quote_subst"`' old_postuninstall_cmds='`$ECHO "X$old_postuninstall_cmds" | $Xsed -e "$delay_single_quote_subst"`' old_archive_cmds='`$ECHO "X$old_archive_cmds" | $Xsed -e "$delay_single_quote_subst"`' CC='`$ECHO "X$CC" | $Xsed -e "$delay_single_quote_subst"`' CFLAGS='`$ECHO "X$CFLAGS" | $Xsed -e "$delay_single_quote_subst"`' compiler='`$ECHO "X$compiler" | $Xsed -e "$delay_single_quote_subst"`' GCC='`$ECHO "X$GCC" | $Xsed -e "$delay_single_quote_subst"`' lt_cv_sys_global_symbol_pipe='`$ECHO "X$lt_cv_sys_global_symbol_pipe" | $Xsed -e "$delay_single_quote_subst"`' lt_cv_sys_global_symbol_to_cdecl='`$ECHO "X$lt_cv_sys_global_symbol_to_cdecl" | $Xsed -e "$delay_single_quote_subst"`' lt_cv_sys_global_symbol_to_c_name_address='`$ECHO "X$lt_cv_sys_global_symbol_to_c_name_address" | $Xsed -e "$delay_single_quote_subst"`' lt_cv_sys_global_symbol_to_c_name_address_lib_prefix='`$ECHO "X$lt_cv_sys_global_symbol_to_c_name_address_lib_prefix" | $Xsed -e "$delay_single_quote_subst"`' objdir='`$ECHO "X$objdir" | $Xsed -e "$delay_single_quote_subst"`' SHELL='`$ECHO "X$SHELL" | $Xsed -e "$delay_single_quote_subst"`' ECHO='`$ECHO "X$ECHO" | $Xsed -e "$delay_single_quote_subst"`' MAGIC_CMD='`$ECHO "X$MAGIC_CMD" | $Xsed -e "$delay_single_quote_subst"`' lt_prog_compiler_no_builtin_flag='`$ECHO "X$lt_prog_compiler_no_builtin_flag" | $Xsed -e "$delay_single_quote_subst"`' lt_prog_compiler_wl='`$ECHO "X$lt_prog_compiler_wl" | $Xsed -e "$delay_single_quote_subst"`' lt_prog_compiler_pic='`$ECHO "X$lt_prog_compiler_pic" | $Xsed -e "$delay_single_quote_subst"`' lt_prog_compiler_static='`$ECHO "X$lt_prog_compiler_static" | $Xsed -e "$delay_single_quote_subst"`' lt_cv_prog_compiler_c_o='`$ECHO "X$lt_cv_prog_compiler_c_o" | $Xsed -e "$delay_single_quote_subst"`' need_locks='`$ECHO "X$need_locks" | $Xsed -e "$delay_single_quote_subst"`' DSYMUTIL='`$ECHO "X$DSYMUTIL" | $Xsed -e "$delay_single_quote_subst"`' NMEDIT='`$ECHO "X$NMEDIT" | $Xsed -e "$delay_single_quote_subst"`' LIPO='`$ECHO "X$LIPO" | $Xsed -e "$delay_single_quote_subst"`' OTOOL='`$ECHO "X$OTOOL" | $Xsed -e "$delay_single_quote_subst"`' OTOOL64='`$ECHO "X$OTOOL64" | $Xsed -e "$delay_single_quote_subst"`' libext='`$ECHO "X$libext" | $Xsed -e "$delay_single_quote_subst"`' shrext_cmds='`$ECHO "X$shrext_cmds" | $Xsed -e "$delay_single_quote_subst"`' extract_expsyms_cmds='`$ECHO "X$extract_expsyms_cmds" | $Xsed -e "$delay_single_quote_subst"`' archive_cmds_need_lc='`$ECHO "X$archive_cmds_need_lc" | $Xsed -e "$delay_single_quote_subst"`' enable_shared_with_static_runtimes='`$ECHO "X$enable_shared_with_static_runtimes" | $Xsed -e "$delay_single_quote_subst"`' export_dynamic_flag_spec='`$ECHO "X$export_dynamic_flag_spec" | $Xsed -e "$delay_single_quote_subst"`' whole_archive_flag_spec='`$ECHO "X$whole_archive_flag_spec" | $Xsed -e "$delay_single_quote_subst"`' compiler_needs_object='`$ECHO "X$compiler_needs_object" | $Xsed -e "$delay_single_quote_subst"`' old_archive_from_new_cmds='`$ECHO "X$old_archive_from_new_cmds" | $Xsed -e "$delay_single_quote_subst"`' old_archive_from_expsyms_cmds='`$ECHO "X$old_archive_from_expsyms_cmds" | $Xsed -e "$delay_single_quote_subst"`' archive_cmds='`$ECHO "X$archive_cmds" | $Xsed -e "$delay_single_quote_subst"`' archive_expsym_cmds='`$ECHO "X$archive_expsym_cmds" | $Xsed -e "$delay_single_quote_subst"`' module_cmds='`$ECHO "X$module_cmds" | $Xsed -e "$delay_single_quote_subst"`' module_expsym_cmds='`$ECHO "X$module_expsym_cmds" | $Xsed -e "$delay_single_quote_subst"`' with_gnu_ld='`$ECHO "X$with_gnu_ld" | $Xsed -e "$delay_single_quote_subst"`' allow_undefined_flag='`$ECHO "X$allow_undefined_flag" | $Xsed -e "$delay_single_quote_subst"`' no_undefined_flag='`$ECHO "X$no_undefined_flag" | $Xsed -e "$delay_single_quote_subst"`' hardcode_libdir_flag_spec='`$ECHO "X$hardcode_libdir_flag_spec" | $Xsed -e "$delay_single_quote_subst"`' hardcode_libdir_flag_spec_ld='`$ECHO "X$hardcode_libdir_flag_spec_ld" | $Xsed -e "$delay_single_quote_subst"`' hardcode_libdir_separator='`$ECHO "X$hardcode_libdir_separator" | $Xsed -e "$delay_single_quote_subst"`' hardcode_direct='`$ECHO "X$hardcode_direct" | $Xsed -e "$delay_single_quote_subst"`' hardcode_direct_absolute='`$ECHO "X$hardcode_direct_absolute" | $Xsed -e "$delay_single_quote_subst"`' hardcode_minus_L='`$ECHO "X$hardcode_minus_L" | $Xsed -e "$delay_single_quote_subst"`' hardcode_shlibpath_var='`$ECHO "X$hardcode_shlibpath_var" | $Xsed -e "$delay_single_quote_subst"`' hardcode_automatic='`$ECHO "X$hardcode_automatic" | $Xsed -e "$delay_single_quote_subst"`' inherit_rpath='`$ECHO "X$inherit_rpath" | $Xsed -e "$delay_single_quote_subst"`' link_all_deplibs='`$ECHO "X$link_all_deplibs" | $Xsed -e "$delay_single_quote_subst"`' fix_srcfile_path='`$ECHO "X$fix_srcfile_path" | $Xsed -e "$delay_single_quote_subst"`' always_export_symbols='`$ECHO "X$always_export_symbols" | $Xsed -e "$delay_single_quote_subst"`' export_symbols_cmds='`$ECHO "X$export_symbols_cmds" | $Xsed -e "$delay_single_quote_subst"`' exclude_expsyms='`$ECHO "X$exclude_expsyms" | $Xsed -e "$delay_single_quote_subst"`' include_expsyms='`$ECHO "X$include_expsyms" | $Xsed -e "$delay_single_quote_subst"`' prelink_cmds='`$ECHO "X$prelink_cmds" | $Xsed -e "$delay_single_quote_subst"`' file_list_spec='`$ECHO "X$file_list_spec" | $Xsed -e "$delay_single_quote_subst"`' variables_saved_for_relink='`$ECHO "X$variables_saved_for_relink" | $Xsed -e "$delay_single_quote_subst"`' need_lib_prefix='`$ECHO "X$need_lib_prefix" | $Xsed -e "$delay_single_quote_subst"`' need_version='`$ECHO "X$need_version" | $Xsed -e "$delay_single_quote_subst"`' version_type='`$ECHO "X$version_type" | $Xsed -e "$delay_single_quote_subst"`' runpath_var='`$ECHO "X$runpath_var" | $Xsed -e "$delay_single_quote_subst"`' shlibpath_var='`$ECHO "X$shlibpath_var" | $Xsed -e "$delay_single_quote_subst"`' shlibpath_overrides_runpath='`$ECHO "X$shlibpath_overrides_runpath" | $Xsed -e "$delay_single_quote_subst"`' libname_spec='`$ECHO "X$libname_spec" | $Xsed -e "$delay_single_quote_subst"`' library_names_spec='`$ECHO "X$library_names_spec" | $Xsed -e "$delay_single_quote_subst"`' soname_spec='`$ECHO "X$soname_spec" | $Xsed -e "$delay_single_quote_subst"`' postinstall_cmds='`$ECHO "X$postinstall_cmds" | $Xsed -e "$delay_single_quote_subst"`' postuninstall_cmds='`$ECHO "X$postuninstall_cmds" | $Xsed -e "$delay_single_quote_subst"`' finish_cmds='`$ECHO "X$finish_cmds" | $Xsed -e "$delay_single_quote_subst"`' finish_eval='`$ECHO "X$finish_eval" | $Xsed -e "$delay_single_quote_subst"`' hardcode_into_libs='`$ECHO "X$hardcode_into_libs" | $Xsed -e "$delay_single_quote_subst"`' sys_lib_search_path_spec='`$ECHO "X$sys_lib_search_path_spec" | $Xsed -e "$delay_single_quote_subst"`' sys_lib_dlsearch_path_spec='`$ECHO "X$sys_lib_dlsearch_path_spec" | $Xsed -e "$delay_single_quote_subst"`' hardcode_action='`$ECHO "X$hardcode_action" | $Xsed -e "$delay_single_quote_subst"`' enable_dlopen='`$ECHO "X$enable_dlopen" | $Xsed -e "$delay_single_quote_subst"`' enable_dlopen_self='`$ECHO "X$enable_dlopen_self" | $Xsed -e "$delay_single_quote_subst"`' enable_dlopen_self_static='`$ECHO "X$enable_dlopen_self_static" | $Xsed -e "$delay_single_quote_subst"`' old_striplib='`$ECHO "X$old_striplib" | $Xsed -e "$delay_single_quote_subst"`' striplib='`$ECHO "X$striplib" | $Xsed -e "$delay_single_quote_subst"`' compiler_lib_search_dirs='`$ECHO "X$compiler_lib_search_dirs" | $Xsed -e "$delay_single_quote_subst"`' predep_objects='`$ECHO "X$predep_objects" | $Xsed -e "$delay_single_quote_subst"`' postdep_objects='`$ECHO "X$postdep_objects" | $Xsed -e "$delay_single_quote_subst"`' predeps='`$ECHO "X$predeps" | $Xsed -e "$delay_single_quote_subst"`' postdeps='`$ECHO "X$postdeps" | $Xsed -e "$delay_single_quote_subst"`' compiler_lib_search_path='`$ECHO "X$compiler_lib_search_path" | $Xsed -e "$delay_single_quote_subst"`' LD_CXX='`$ECHO "X$LD_CXX" | $Xsed -e "$delay_single_quote_subst"`' old_archive_cmds_CXX='`$ECHO "X$old_archive_cmds_CXX" | $Xsed -e "$delay_single_quote_subst"`' compiler_CXX='`$ECHO "X$compiler_CXX" | $Xsed -e "$delay_single_quote_subst"`' GCC_CXX='`$ECHO "X$GCC_CXX" | $Xsed -e "$delay_single_quote_subst"`' lt_prog_compiler_no_builtin_flag_CXX='`$ECHO "X$lt_prog_compiler_no_builtin_flag_CXX" | $Xsed -e "$delay_single_quote_subst"`' lt_prog_compiler_wl_CXX='`$ECHO "X$lt_prog_compiler_wl_CXX" | $Xsed -e "$delay_single_quote_subst"`' lt_prog_compiler_pic_CXX='`$ECHO "X$lt_prog_compiler_pic_CXX" | $Xsed -e "$delay_single_quote_subst"`' lt_prog_compiler_static_CXX='`$ECHO "X$lt_prog_compiler_static_CXX" | $Xsed -e "$delay_single_quote_subst"`' lt_cv_prog_compiler_c_o_CXX='`$ECHO "X$lt_cv_prog_compiler_c_o_CXX" | $Xsed -e "$delay_single_quote_subst"`' archive_cmds_need_lc_CXX='`$ECHO "X$archive_cmds_need_lc_CXX" | $Xsed -e "$delay_single_quote_subst"`' enable_shared_with_static_runtimes_CXX='`$ECHO "X$enable_shared_with_static_runtimes_CXX" | $Xsed -e "$delay_single_quote_subst"`' export_dynamic_flag_spec_CXX='`$ECHO "X$export_dynamic_flag_spec_CXX" | $Xsed -e "$delay_single_quote_subst"`' whole_archive_flag_spec_CXX='`$ECHO "X$whole_archive_flag_spec_CXX" | $Xsed -e "$delay_single_quote_subst"`' compiler_needs_object_CXX='`$ECHO "X$compiler_needs_object_CXX" | $Xsed -e "$delay_single_quote_subst"`' old_archive_from_new_cmds_CXX='`$ECHO "X$old_archive_from_new_cmds_CXX" | $Xsed -e "$delay_single_quote_subst"`' old_archive_from_expsyms_cmds_CXX='`$ECHO "X$old_archive_from_expsyms_cmds_CXX" | $Xsed -e "$delay_single_quote_subst"`' archive_cmds_CXX='`$ECHO "X$archive_cmds_CXX" | $Xsed -e "$delay_single_quote_subst"`' archive_expsym_cmds_CXX='`$ECHO "X$archive_expsym_cmds_CXX" | $Xsed -e "$delay_single_quote_subst"`' module_cmds_CXX='`$ECHO "X$module_cmds_CXX" | $Xsed -e "$delay_single_quote_subst"`' module_expsym_cmds_CXX='`$ECHO "X$module_expsym_cmds_CXX" | $Xsed -e "$delay_single_quote_subst"`' with_gnu_ld_CXX='`$ECHO "X$with_gnu_ld_CXX" | $Xsed -e "$delay_single_quote_subst"`' allow_undefined_flag_CXX='`$ECHO "X$allow_undefined_flag_CXX" | $Xsed -e "$delay_single_quote_subst"`' no_undefined_flag_CXX='`$ECHO "X$no_undefined_flag_CXX" | $Xsed -e "$delay_single_quote_subst"`' hardcode_libdir_flag_spec_CXX='`$ECHO "X$hardcode_libdir_flag_spec_CXX" | $Xsed -e "$delay_single_quote_subst"`' hardcode_libdir_flag_spec_ld_CXX='`$ECHO "X$hardcode_libdir_flag_spec_ld_CXX" | $Xsed -e "$delay_single_quote_subst"`' hardcode_libdir_separator_CXX='`$ECHO "X$hardcode_libdir_separator_CXX" | $Xsed -e "$delay_single_quote_subst"`' hardcode_direct_CXX='`$ECHO "X$hardcode_direct_CXX" | $Xsed -e "$delay_single_quote_subst"`' hardcode_direct_absolute_CXX='`$ECHO "X$hardcode_direct_absolute_CXX" | $Xsed -e "$delay_single_quote_subst"`' hardcode_minus_L_CXX='`$ECHO "X$hardcode_minus_L_CXX" | $Xsed -e "$delay_single_quote_subst"`' hardcode_shlibpath_var_CXX='`$ECHO "X$hardcode_shlibpath_var_CXX" | $Xsed -e "$delay_single_quote_subst"`' hardcode_automatic_CXX='`$ECHO "X$hardcode_automatic_CXX" | $Xsed -e "$delay_single_quote_subst"`' inherit_rpath_CXX='`$ECHO "X$inherit_rpath_CXX" | $Xsed -e "$delay_single_quote_subst"`' link_all_deplibs_CXX='`$ECHO "X$link_all_deplibs_CXX" | $Xsed -e "$delay_single_quote_subst"`' fix_srcfile_path_CXX='`$ECHO "X$fix_srcfile_path_CXX" | $Xsed -e "$delay_single_quote_subst"`' always_export_symbols_CXX='`$ECHO "X$always_export_symbols_CXX" | $Xsed -e "$delay_single_quote_subst"`' export_symbols_cmds_CXX='`$ECHO "X$export_symbols_cmds_CXX" | $Xsed -e "$delay_single_quote_subst"`' exclude_expsyms_CXX='`$ECHO "X$exclude_expsyms_CXX" | $Xsed -e "$delay_single_quote_subst"`' include_expsyms_CXX='`$ECHO "X$include_expsyms_CXX" | $Xsed -e "$delay_single_quote_subst"`' prelink_cmds_CXX='`$ECHO "X$prelink_cmds_CXX" | $Xsed -e "$delay_single_quote_subst"`' file_list_spec_CXX='`$ECHO "X$file_list_spec_CXX" | $Xsed -e "$delay_single_quote_subst"`' hardcode_action_CXX='`$ECHO "X$hardcode_action_CXX" | $Xsed -e "$delay_single_quote_subst"`' compiler_lib_search_dirs_CXX='`$ECHO "X$compiler_lib_search_dirs_CXX" | $Xsed -e "$delay_single_quote_subst"`' predep_objects_CXX='`$ECHO "X$predep_objects_CXX" | $Xsed -e "$delay_single_quote_subst"`' postdep_objects_CXX='`$ECHO "X$postdep_objects_CXX" | $Xsed -e "$delay_single_quote_subst"`' predeps_CXX='`$ECHO "X$predeps_CXX" | $Xsed -e "$delay_single_quote_subst"`' postdeps_CXX='`$ECHO "X$postdeps_CXX" | $Xsed -e "$delay_single_quote_subst"`' compiler_lib_search_path_CXX='`$ECHO "X$compiler_lib_search_path_CXX" | $Xsed -e "$delay_single_quote_subst"`' LTCC='$LTCC' LTCFLAGS='$LTCFLAGS' compiler='$compiler_DEFAULT' # Quote evaled strings. for var in SED \ GREP \ EGREP \ FGREP \ LD \ NM \ LN_S \ lt_SP2NL \ lt_NL2SP \ reload_flag \ deplibs_check_method \ file_magic_cmd \ AR \ AR_FLAGS \ STRIP \ RANLIB \ CC \ CFLAGS \ compiler \ lt_cv_sys_global_symbol_pipe \ lt_cv_sys_global_symbol_to_cdecl \ lt_cv_sys_global_symbol_to_c_name_address \ lt_cv_sys_global_symbol_to_c_name_address_lib_prefix \ SHELL \ ECHO \ lt_prog_compiler_no_builtin_flag \ lt_prog_compiler_wl \ lt_prog_compiler_pic \ lt_prog_compiler_static \ lt_cv_prog_compiler_c_o \ need_locks \ DSYMUTIL \ NMEDIT \ LIPO \ OTOOL \ OTOOL64 \ shrext_cmds \ export_dynamic_flag_spec \ whole_archive_flag_spec \ compiler_needs_object \ with_gnu_ld \ allow_undefined_flag \ no_undefined_flag \ hardcode_libdir_flag_spec \ hardcode_libdir_flag_spec_ld \ hardcode_libdir_separator \ fix_srcfile_path \ exclude_expsyms \ include_expsyms \ file_list_spec \ variables_saved_for_relink \ libname_spec \ library_names_spec \ soname_spec \ finish_eval \ old_striplib \ striplib \ compiler_lib_search_dirs \ predep_objects \ postdep_objects \ predeps \ postdeps \ compiler_lib_search_path \ LD_CXX \ compiler_CXX \ lt_prog_compiler_no_builtin_flag_CXX \ lt_prog_compiler_wl_CXX \ lt_prog_compiler_pic_CXX \ lt_prog_compiler_static_CXX \ lt_cv_prog_compiler_c_o_CXX \ export_dynamic_flag_spec_CXX \ whole_archive_flag_spec_CXX \ compiler_needs_object_CXX \ with_gnu_ld_CXX \ allow_undefined_flag_CXX \ no_undefined_flag_CXX \ hardcode_libdir_flag_spec_CXX \ hardcode_libdir_flag_spec_ld_CXX \ hardcode_libdir_separator_CXX \ fix_srcfile_path_CXX \ exclude_expsyms_CXX \ include_expsyms_CXX \ file_list_spec_CXX \ compiler_lib_search_dirs_CXX \ predep_objects_CXX \ postdep_objects_CXX \ predeps_CXX \ postdeps_CXX \ compiler_lib_search_path_CXX; do case \`eval \\\\\$ECHO "X\\\\\$\$var"\` in *[\\\\\\\`\\"\\\$]*) eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"X\\\$\$var\\" | \\\$Xsed -e \\"\\\$sed_quote_subst\\"\\\`\\\\\\"" ;; *) eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" ;; esac done # Double-quote double-evaled strings. for var in reload_cmds \ old_postinstall_cmds \ old_postuninstall_cmds \ old_archive_cmds \ extract_expsyms_cmds \ old_archive_from_new_cmds \ old_archive_from_expsyms_cmds \ archive_cmds \ archive_expsym_cmds \ module_cmds \ module_expsym_cmds \ export_symbols_cmds \ prelink_cmds \ postinstall_cmds \ postuninstall_cmds \ finish_cmds \ sys_lib_search_path_spec \ sys_lib_dlsearch_path_spec \ old_archive_cmds_CXX \ old_archive_from_new_cmds_CXX \ old_archive_from_expsyms_cmds_CXX \ archive_cmds_CXX \ archive_expsym_cmds_CXX \ module_cmds_CXX \ module_expsym_cmds_CXX \ export_symbols_cmds_CXX \ prelink_cmds_CXX; do case \`eval \\\\\$ECHO "X\\\\\$\$var"\` in *[\\\\\\\`\\"\\\$]*) eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"X\\\$\$var\\" | \\\$Xsed -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\"" ;; *) eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" ;; esac done # Fix-up fallback echo if it was mangled by the above quoting rules. case \$lt_ECHO in *'\\\$0 --fallback-echo"') lt_ECHO=\`\$ECHO "X\$lt_ECHO" | \$Xsed -e 's/\\\\\\\\\\\\\\\$0 --fallback-echo"\$/\$0 --fallback-echo"/'\` ;; esac ac_aux_dir='$ac_aux_dir' xsi_shell='$xsi_shell' lt_shell_append='$lt_shell_append' # See if we are running on zsh, and set the options which allow our # commands through without removal of \ escapes INIT. if test -n "\${ZSH_VERSION+set}" ; then setopt NO_GLOB_SUBST fi PACKAGE='$PACKAGE' VERSION='$VERSION' TIMESTAMP='$TIMESTAMP' RM='$RM' ofile='$ofile' _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # Handling of arguments. for ac_config_target in $ac_config_targets do case $ac_config_target in "config.h") CONFIG_HEADERS="$CONFIG_HEADERS config.h" ;; "depfiles") CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;; "libtool") CONFIG_COMMANDS="$CONFIG_COMMANDS libtool" ;; "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;; "client.conf") CONFIG_FILES="$CONFIG_FILES client.conf" ;; "global.conf") CONFIG_FILES="$CONFIG_FILES global.conf" ;; "idmef-client.conf") CONFIG_FILES="$CONFIG_FILES idmef-client.conf" ;; "libprelude-config") CONFIG_FILES="$CONFIG_FILES libprelude-config" ;; "libltdl/Makefile") CONFIG_FILES="$CONFIG_FILES libltdl/Makefile" ;; "libmissing/Makefile") CONFIG_FILES="$CONFIG_FILES libmissing/Makefile" ;; "libmissing/tests/Makefile") CONFIG_FILES="$CONFIG_FILES libmissing/tests/Makefile" ;; "m4/Makefile") CONFIG_FILES="$CONFIG_FILES m4/Makefile" ;; "src/Makefile") CONFIG_FILES="$CONFIG_FILES src/Makefile" ;; "src/libprelude.pc") CONFIG_FILES="$CONFIG_FILES src/libprelude.pc" ;; "src/libprelude-error/Makefile") CONFIG_FILES="$CONFIG_FILES src/libprelude-error/Makefile" ;; "src/include/Makefile") CONFIG_FILES="$CONFIG_FILES src/include/Makefile" ;; "src/include/prelude.h") CONFIG_FILES="$CONFIG_FILES src/include/prelude.h" ;; "src/include/prelude-inttypes.h") CONFIG_FILES="$CONFIG_FILES src/include/prelude-inttypes.h" ;; "prelude-admin/prelude-adduser") CONFIG_FILES="$CONFIG_FILES prelude-admin/prelude-adduser" ;; "prelude-admin/Makefile") CONFIG_FILES="$CONFIG_FILES prelude-admin/Makefile" ;; "docs/Makefile") CONFIG_FILES="$CONFIG_FILES docs/Makefile" ;; "docs/api/Makefile") CONFIG_FILES="$CONFIG_FILES docs/api/Makefile" ;; "docs/manpages/Makefile") CONFIG_FILES="$CONFIG_FILES docs/manpages/Makefile" ;; "bindings/Makefile") CONFIG_FILES="$CONFIG_FILES bindings/Makefile" ;; "bindings/low-level/Makefile") CONFIG_FILES="$CONFIG_FILES bindings/low-level/Makefile" ;; "bindings/low-level/perl/Makefile.PL") CONFIG_FILES="$CONFIG_FILES bindings/low-level/perl/Makefile.PL" ;; "bindings/low-level/python/Makefile") CONFIG_FILES="$CONFIG_FILES bindings/low-level/python/Makefile" ;; "bindings/low-level/python/setup.py") CONFIG_FILES="$CONFIG_FILES bindings/low-level/python/setup.py" ;; "bindings/c++/Makefile") CONFIG_FILES="$CONFIG_FILES bindings/c++/Makefile" ;; "bindings/c++/include/Makefile") CONFIG_FILES="$CONFIG_FILES bindings/c++/include/Makefile" ;; "bindings/lua/Makefile") CONFIG_FILES="$CONFIG_FILES bindings/lua/Makefile" ;; "bindings/perl/Makefile.PL") CONFIG_FILES="$CONFIG_FILES bindings/perl/Makefile.PL" ;; "bindings/python/Makefile") CONFIG_FILES="$CONFIG_FILES bindings/python/Makefile" ;; "bindings/python/setup.py") CONFIG_FILES="$CONFIG_FILES bindings/python/setup.py" ;; "bindings/ruby/Makefile") CONFIG_FILES="$CONFIG_FILES bindings/ruby/Makefile" ;; "tests/Makefile") CONFIG_FILES="$CONFIG_FILES tests/Makefile" ;; "default") CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;; *) { { $as_echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5 $as_echo "$as_me: error: invalid argument: $ac_config_target" >&2;} { (exit 1); exit 1; }; };; esac done # If the user did not use the arguments to specify the items to instantiate, # then the envvar interface is used. Set only those that are not. # We use the long form for the default assignment because of an extremely # bizarre bug on SunOS 4.1.3. if $ac_need_defaults; then test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands fi # Have a temporary directory for convenience. Make it in the build tree # simply because there is no reason against having it here, and in addition, # creating and moving files from /tmp can sometimes cause problems. # Hook for its removal unless debugging. # Note that there is a small window in which the directory will not be cleaned: # after its creation but before its name has been assigned to `$tmp'. $debug || { tmp= trap 'exit_status=$? { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status ' 0 trap '{ (exit 1); exit 1; }' 1 2 13 15 } # Create a (secure) tmp directory for tmp files. { tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" } || { tmp=./conf$$-$RANDOM (umask 077 && mkdir "$tmp") } || { $as_echo "$as_me: cannot create a temporary directory in ." >&2 { (exit 1); exit 1; } } # Set up the scripts for CONFIG_FILES section. # No need to generate them if there are no CONFIG_FILES. # This happens for instance with `./config.status config.h'. if test -n "$CONFIG_FILES"; then ac_cr=' ' ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' /dev/null` if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then ac_cs_awk_cr='\\r' else ac_cs_awk_cr=$ac_cr fi echo 'BEGIN {' >"$tmp/subs1.awk" && _ACEOF { echo "cat >conf$$subs.awk <<_ACEOF" && echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' && echo "_ACEOF" } >conf$$subs.sh || { { $as_echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5 $as_echo "$as_me: error: could not make $CONFIG_STATUS" >&2;} { (exit 1); exit 1; }; } ac_delim_num=`echo "$ac_subst_vars" | grep -c '$'` ac_delim='%!_!# ' for ac_last_try in false false false false false :; do . ./conf$$subs.sh || { { $as_echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5 $as_echo "$as_me: error: could not make $CONFIG_STATUS" >&2;} { (exit 1); exit 1; }; } ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X` if test $ac_delim_n = $ac_delim_num; then break elif $ac_last_try; then { { $as_echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5 $as_echo "$as_me: error: could not make $CONFIG_STATUS" >&2;} { (exit 1); exit 1; }; } else ac_delim="$ac_delim!$ac_delim _$ac_delim!! " fi done rm -f conf$$subs.sh cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 cat >>"\$tmp/subs1.awk" <<\\_ACAWK && _ACEOF sed -n ' h s/^/S["/; s/!.*/"]=/ p g s/^[^!]*!// :repl t repl s/'"$ac_delim"'$// t delim :nl h s/\(.\{148\}\).*/\1/ t more1 s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/ p n b repl :more1 s/["\\]/\\&/g; s/^/"/; s/$/"\\/ p g s/.\{148\}// t nl :delim h s/\(.\{148\}\).*/\1/ t more2 s/["\\]/\\&/g; s/^/"/; s/$/"/ p b :more2 s/["\\]/\\&/g; s/^/"/; s/$/"\\/ p g s/.\{148\}// t delim ' >$CONFIG_STATUS || ac_write_fail=1 rm -f conf$$subs.awk cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 _ACAWK cat >>"\$tmp/subs1.awk" <<_ACAWK && for (key in S) S_is_set[key] = 1 FS = "" } { line = $ 0 nfields = split(line, field, "@") substed = 0 len = length(field[1]) for (i = 2; i < nfields; i++) { key = field[i] keylen = length(key) if (S_is_set[key]) { value = S[key] line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3) len += length(value) + length(field[++i]) substed = 1 } else len += 1 + keylen } print line } _ACAWK _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g" else cat fi < "$tmp/subs1.awk" > "$tmp/subs.awk" \ || { { $as_echo "$as_me:$LINENO: error: could not setup config files machinery" >&5 $as_echo "$as_me: error: could not setup config files machinery" >&2;} { (exit 1); exit 1; }; } _ACEOF # VPATH may cause trouble with some makes, so we remove $(srcdir), # ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and # trailing colons and then remove the whole line if VPATH becomes empty # (actually we leave an empty line to preserve line numbers). if test "x$srcdir" = x.; then ac_vpsub='/^[ ]*VPATH[ ]*=/{ s/:*\$(srcdir):*/:/ s/:*\${srcdir}:*/:/ s/:*@srcdir@:*/:/ s/^\([^=]*=[ ]*\):*/\1/ s/:*$// s/^[^=]*=[ ]*$// }' fi cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 fi # test -n "$CONFIG_FILES" # Set up the scripts for CONFIG_HEADERS section. # No need to generate them if there are no CONFIG_HEADERS. # This happens for instance with `./config.status Makefile'. if test -n "$CONFIG_HEADERS"; then cat >"$tmp/defines.awk" <<\_ACAWK || BEGIN { _ACEOF # Transform confdefs.h into an awk script `defines.awk', embedded as # here-document in config.status, that substitutes the proper values into # config.h.in to produce config.h. # Create a delimiter string that does not exist in confdefs.h, to ease # handling of long lines. ac_delim='%!_!# ' for ac_last_try in false false :; do ac_t=`sed -n "/$ac_delim/p" confdefs.h` if test -z "$ac_t"; then break elif $ac_last_try; then { { $as_echo "$as_me:$LINENO: error: could not make $CONFIG_HEADERS" >&5 $as_echo "$as_me: error: could not make $CONFIG_HEADERS" >&2;} { (exit 1); exit 1; }; } else ac_delim="$ac_delim!$ac_delim _$ac_delim!! " fi done # For the awk script, D is an array of macro values keyed by name, # likewise P contains macro parameters if any. Preserve backslash # newline sequences. ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]* sed -n ' s/.\{148\}/&'"$ac_delim"'/g t rset :rset s/^[ ]*#[ ]*define[ ][ ]*/ / t def d :def s/\\$// t bsnl s/["\\]/\\&/g s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\ D["\1"]=" \3"/p s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p d :bsnl s/["\\]/\\&/g s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\ D["\1"]=" \3\\\\\\n"\\/p t cont s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p t cont d :cont n s/.\{148\}/&'"$ac_delim"'/g t clear :clear s/\\$// t bsnlc s/["\\]/\\&/g; s/^/"/; s/$/"/p d :bsnlc s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p b cont ' >$CONFIG_STATUS || ac_write_fail=1 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 for (key in D) D_is_set[key] = 1 FS = "" } /^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ { line = \$ 0 split(line, arg, " ") if (arg[1] == "#") { defundef = arg[2] mac1 = arg[3] } else { defundef = substr(arg[1], 2) mac1 = arg[2] } split(mac1, mac2, "(") #) macro = mac2[1] prefix = substr(line, 1, index(line, defundef) - 1) if (D_is_set[macro]) { # Preserve the white space surrounding the "#". print prefix "define", macro P[macro] D[macro] next } else { # Replace #undef with comments. This is necessary, for example, # in the case of _POSIX_SOURCE, which is predefined and required # on some systems where configure will not decide to define it. if (defundef == "undef") { print "/*", prefix defundef, macro, "*/" next } } } { print } _ACAWK _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 { { $as_echo "$as_me:$LINENO: error: could not setup config headers machinery" >&5 $as_echo "$as_me: error: could not setup config headers machinery" >&2;} { (exit 1); exit 1; }; } fi # test -n "$CONFIG_HEADERS" eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS :C $CONFIG_COMMANDS" shift for ac_tag do case $ac_tag in :[FHLC]) ac_mode=$ac_tag; continue;; esac case $ac_mode$ac_tag in :[FHL]*:*);; :L* | :C*:*) { { $as_echo "$as_me:$LINENO: error: invalid tag $ac_tag" >&5 $as_echo "$as_me: error: invalid tag $ac_tag" >&2;} { (exit 1); exit 1; }; };; :[FH]-) ac_tag=-:-;; :[FH]*) ac_tag=$ac_tag:$ac_tag.in;; esac ac_save_IFS=$IFS IFS=: set x $ac_tag IFS=$ac_save_IFS shift ac_file=$1 shift case $ac_mode in :L) ac_source=$1;; :[FH]) ac_file_inputs= for ac_f do case $ac_f in -) ac_f="$tmp/stdin";; *) # Look for the file first in the build tree, then in the source tree # (if the path is not absolute). The absolute path cannot be DOS-style, # because $ac_f cannot contain `:'. test -f "$ac_f" || case $ac_f in [\\/$]*) false;; *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";; esac || { { $as_echo "$as_me:$LINENO: error: cannot find input file: $ac_f" >&5 $as_echo "$as_me: error: cannot find input file: $ac_f" >&2;} { (exit 1); exit 1; }; };; esac case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac ac_file_inputs="$ac_file_inputs '$ac_f'" done # Let's still pretend it is `configure' which instantiates (i.e., don't # use $as_me), people would be surprised to read: # /* config.h. Generated by config.status. */ configure_input='Generated from '` $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g' `' by configure.' if test x"$ac_file" != x-; then configure_input="$ac_file. $configure_input" { $as_echo "$as_me:$LINENO: creating $ac_file" >&5 $as_echo "$as_me: creating $ac_file" >&6;} fi # Neutralize special characters interpreted by sed in replacement strings. case $configure_input in #( *\&* | *\|* | *\\* ) ac_sed_conf_input=`$as_echo "$configure_input" | sed 's/[\\\\&|]/\\\\&/g'`;; #( *) ac_sed_conf_input=$configure_input;; esac case $ac_tag in *:-:* | *:-) cat >"$tmp/stdin" \ || { { $as_echo "$as_me:$LINENO: error: could not create $ac_file" >&5 $as_echo "$as_me: error: could not create $ac_file" >&2;} { (exit 1); exit 1; }; } ;; esac ;; esac ac_dir=`$as_dirname -- "$ac_file" || $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$ac_file" : 'X\(//\)[^/]' \| \ X"$ac_file" : 'X\(//\)$' \| \ X"$ac_file" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$ac_file" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` { as_dir="$ac_dir" case $as_dir in #( -*) as_dir=./$as_dir;; esac test -d "$as_dir" || { $as_mkdir_p && mkdir -p "$as_dir"; } || { as_dirs= while :; do case $as_dir in #( *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( *) as_qdir=$as_dir;; esac as_dirs="'$as_qdir' $as_dirs" as_dir=`$as_dirname -- "$as_dir" || $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_dir" : 'X\(//\)[^/]' \| \ X"$as_dir" : 'X\(//\)$' \| \ X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$as_dir" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` test -d "$as_dir" && break done test -z "$as_dirs" || eval "mkdir $as_dirs" } || test -d "$as_dir" || { { $as_echo "$as_me:$LINENO: error: cannot create directory $as_dir" >&5 $as_echo "$as_me: error: cannot create directory $as_dir" >&2;} { (exit 1); exit 1; }; }; } ac_builddir=. case "$ac_dir" in .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` # A ".." for each directory in $ac_dir_suffix. ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` case $ac_top_builddir_sub in "") ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; esac ;; esac ac_abs_top_builddir=$ac_pwd ac_abs_builddir=$ac_pwd$ac_dir_suffix # for backward compatibility: ac_top_builddir=$ac_top_build_prefix case $srcdir in .) # We are building in place. ac_srcdir=. ac_top_srcdir=$ac_top_builddir_sub ac_abs_top_srcdir=$ac_pwd ;; [\\/]* | ?:[\\/]* ) # Absolute name. ac_srcdir=$srcdir$ac_dir_suffix; ac_top_srcdir=$srcdir ac_abs_top_srcdir=$srcdir ;; *) # Relative name. ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix ac_top_srcdir=$ac_top_build_prefix$srcdir ac_abs_top_srcdir=$ac_pwd/$srcdir ;; esac ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix case $ac_mode in :F) # # CONFIG_FILE # case $INSTALL in [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;; *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;; esac ac_MKDIR_P=$MKDIR_P case $MKDIR_P in [\\/$]* | ?:[\\/]* ) ;; */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;; esac _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # If the template does not know about datarootdir, expand it. # FIXME: This hack should be removed a few years after 2.60. ac_datarootdir_hack=; ac_datarootdir_seen= ac_sed_dataroot=' /datarootdir/ { p q } /@datadir@/p /@docdir@/p /@infodir@/p /@localedir@/p /@mandir@/p ' case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in *datarootdir*) ac_datarootdir_seen=yes;; *@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*) { $as_echo "$as_me:$LINENO: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5 $as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;} _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_datarootdir_hack=' s&@datadir@&$datadir&g s&@docdir@&$docdir&g s&@infodir@&$infodir&g s&@localedir@&$localedir&g s&@mandir@&$mandir&g s&\\\${datarootdir}&$datarootdir&g' ;; esac _ACEOF # Neutralize VPATH when `$srcdir' = `.'. # Shell code in configure.ac might set extrasub. # FIXME: do we really want to maintain this feature? cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_sed_extra="$ac_vpsub $extrasub _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 :t /@[a-zA-Z_][a-zA-Z_0-9]*@/!b s|@configure_input@|$ac_sed_conf_input|;t t s&@top_builddir@&$ac_top_builddir_sub&;t t s&@top_build_prefix@&$ac_top_build_prefix&;t t s&@srcdir@&$ac_srcdir&;t t s&@abs_srcdir@&$ac_abs_srcdir&;t t s&@top_srcdir@&$ac_top_srcdir&;t t s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t s&@builddir@&$ac_builddir&;t t s&@abs_builddir@&$ac_abs_builddir&;t t s&@abs_top_builddir@&$ac_abs_top_builddir&;t t s&@INSTALL@&$ac_INSTALL&;t t s&@MKDIR_P@&$ac_MKDIR_P&;t t $ac_datarootdir_hack " eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$tmp/subs.awk" >$tmp/out \ || { { $as_echo "$as_me:$LINENO: error: could not create $ac_file" >&5 $as_echo "$as_me: error: could not create $ac_file" >&2;} { (exit 1); exit 1; }; } test -z "$ac_datarootdir_hack$ac_datarootdir_seen" && { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } && { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } && { $as_echo "$as_me:$LINENO: WARNING: $ac_file contains a reference to the variable \`datarootdir' which seems to be undefined. Please make sure it is defined." >&5 $as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir' which seems to be undefined. Please make sure it is defined." >&2;} rm -f "$tmp/stdin" case $ac_file in -) cat "$tmp/out" && rm -f "$tmp/out";; *) rm -f "$ac_file" && mv "$tmp/out" "$ac_file";; esac \ || { { $as_echo "$as_me:$LINENO: error: could not create $ac_file" >&5 $as_echo "$as_me: error: could not create $ac_file" >&2;} { (exit 1); exit 1; }; } ;; :H) # # CONFIG_HEADER # if test x"$ac_file" != x-; then { $as_echo "/* $configure_input */" \ && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs" } >"$tmp/config.h" \ || { { $as_echo "$as_me:$LINENO: error: could not create $ac_file" >&5 $as_echo "$as_me: error: could not create $ac_file" >&2;} { (exit 1); exit 1; }; } if diff "$ac_file" "$tmp/config.h" >/dev/null 2>&1; then { $as_echo "$as_me:$LINENO: $ac_file is unchanged" >&5 $as_echo "$as_me: $ac_file is unchanged" >&6;} else rm -f "$ac_file" mv "$tmp/config.h" "$ac_file" \ || { { $as_echo "$as_me:$LINENO: error: could not create $ac_file" >&5 $as_echo "$as_me: error: could not create $ac_file" >&2;} { (exit 1); exit 1; }; } fi else $as_echo "/* $configure_input */" \ && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs" \ || { { $as_echo "$as_me:$LINENO: error: could not create -" >&5 $as_echo "$as_me: error: could not create -" >&2;} { (exit 1); exit 1; }; } fi # Compute "$ac_file"'s index in $config_headers. _am_arg="$ac_file" _am_stamp_count=1 for _am_header in $config_headers :; do case $_am_header in $_am_arg | $_am_arg:* ) break ;; * ) _am_stamp_count=`expr $_am_stamp_count + 1` ;; esac done echo "timestamp for $_am_arg" >`$as_dirname -- "$_am_arg" || $as_expr X"$_am_arg" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$_am_arg" : 'X\(//\)[^/]' \| \ X"$_am_arg" : 'X\(//\)$' \| \ X"$_am_arg" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$_am_arg" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'`/stamp-h$_am_stamp_count ;; :C) { $as_echo "$as_me:$LINENO: executing $ac_file commands" >&5 $as_echo "$as_me: executing $ac_file commands" >&6;} ;; esac case $ac_file$ac_mode in "depfiles":C) test x"$AMDEP_TRUE" != x"" || { # Autoconf 2.62 quotes --file arguments for eval, but not when files # are listed without --file. Let's play safe and only enable the eval # if we detect the quoting. case $CONFIG_FILES in *\'*) eval set x "$CONFIG_FILES" ;; *) set x $CONFIG_FILES ;; esac shift for mf 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. # Grep'ing the whole file is not good either: AIX grep has a line # limit of 2048, but all sed's we know have understand at least 4000. if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then dirpart=`$as_dirname -- "$mf" || $as_expr X"$mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$mf" : 'X\(//\)[^/]' \| \ X"$mf" : 'X\(//\)$' \| \ X"$mf" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$mf" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` else continue fi # Extract the definition of DEPDIR, am__include, and am__quote # from the Makefile without running `make'. DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` test -z "$DEPDIR" && continue am__include=`sed -n 's/^am__include = //p' < "$mf"` test -z "am__include" && continue am__quote=`sed -n 's/^am__quote = //p' < "$mf"` # When using ansi2knr, U may be empty or an underscore; expand it U=`sed -n 's/^U = //p' < "$mf"` # Find all dependency output files, they are included files with # $(DEPDIR) in their names. 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 " s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/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_expr X"$file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$file" : 'X\(//\)[^/]' \| \ X"$file" : 'X\(//\)$' \| \ X"$file" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$file" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` { as_dir=$dirpart/$fdir case $as_dir in #( -*) as_dir=./$as_dir;; esac test -d "$as_dir" || { $as_mkdir_p && mkdir -p "$as_dir"; } || { as_dirs= while :; do case $as_dir in #( *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( *) as_qdir=$as_dir;; esac as_dirs="'$as_qdir' $as_dirs" as_dir=`$as_dirname -- "$as_dir" || $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_dir" : 'X\(//\)[^/]' \| \ X"$as_dir" : 'X\(//\)$' \| \ X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$as_dir" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` test -d "$as_dir" && break done test -z "$as_dirs" || eval "mkdir $as_dirs" } || test -d "$as_dir" || { { $as_echo "$as_me:$LINENO: error: cannot create directory $as_dir" >&5 $as_echo "$as_me: error: cannot create directory $as_dir" >&2;} { (exit 1); exit 1; }; }; } # echo "creating $dirpart/$file" echo '# dummy' > "$dirpart/$file" done done } ;; "libtool":C) # See if we are running on zsh, and set the options which allow our # commands through without removal of \ escapes. if test -n "${ZSH_VERSION+set}" ; then setopt NO_GLOB_SUBST fi cfgfile="${ofile}T" trap "$RM \"$cfgfile\"; exit 1" 1 2 15 $RM "$cfgfile" cat <<_LT_EOF >> "$cfgfile" #! $SHELL # `$ECHO "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services. # Generated automatically by $as_me ($PACKAGE$TIMESTAMP) $VERSION # Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: # NOTE: Changes made to this file will be lost: look at ltmain.sh. # # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, # 2006, 2007, 2008 Free Software Foundation, Inc. # Written by Gordon Matzigkeit, 1996 # # This file is part of GNU Libtool. # # GNU Libtool 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. # # As a special exception to the GNU General Public License, # if you distribute this file as part of a program or library that # is built using GNU Libtool, you may include this file under the # same distribution terms that you use for the rest of that program. # # GNU Libtool 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 GNU Libtool; see the file COPYING. If not, a copy # can be downloaded from http://www.gnu.org/licenses/gpl.html, or # obtained by writing to the Free Software Foundation, Inc., # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. # The names of the tagged configurations supported by this script. available_tags="CXX " # ### BEGIN LIBTOOL CONFIG # Which release of libtool.m4 was used? macro_version=$macro_version macro_revision=$macro_revision # Assembler program. AS=$AS # DLL creation program. DLLTOOL=$DLLTOOL # Object dumper program. OBJDUMP=$OBJDUMP # Whether or not to build static libraries. build_old_libs=$enable_static # Whether or not to build shared libraries. build_libtool_libs=$enable_shared # What type of objects to build. pic_mode=$pic_mode # Whether or not to optimize for fast installation. fast_install=$enable_fast_install # The host system. host_alias=$host_alias host=$host host_os=$host_os # The build system. build_alias=$build_alias build=$build build_os=$build_os # 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 1s/^X//" # A grep program that handles long lines. GREP=$lt_GREP # An ERE matcher. EGREP=$lt_EGREP # A literal string matcher. FGREP=$lt_FGREP # A BSD- or MS-compatible name lister. NM=$lt_NM # Whether we need soft or hard links. LN_S=$lt_LN_S # What is the maximum length of a command? max_cmd_len=$max_cmd_len # Object file suffix (normally "o"). objext=$ac_objext # Executable file suffix (normally ""). exeext=$exeext # whether the shell understands "unset". lt_unset=$lt_unset # turn spaces into newlines. SP2NL=$lt_lt_SP2NL # turn newlines into spaces. NL2SP=$lt_lt_NL2SP # How to create reloadable object files. reload_flag=$lt_reload_flag reload_cmds=$lt_reload_cmds # 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 # The archiver. AR=$lt_AR AR_FLAGS=$lt_AR_FLAGS # A symbol stripping program. STRIP=$lt_STRIP # Commands used to install an old-style archive. RANLIB=$lt_RANLIB old_postinstall_cmds=$lt_old_postinstall_cmds old_postuninstall_cmds=$lt_old_postuninstall_cmds # A C compiler. LTCC=$lt_CC # LTCC compiler flags. LTCFLAGS=$lt_CFLAGS # 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 # Transform the output of nm in a C name address pair when lib prefix is needed. global_symbol_to_c_name_address_lib_prefix=$lt_lt_cv_sys_global_symbol_to_c_name_address_lib_prefix # The name of the directory that contains temporary libtool files. objdir=$objdir # Shell to use when invoking shell scripts. SHELL=$lt_SHELL # An echo program that does not interpret backslashes. ECHO=$lt_ECHO # Used to examine libraries when file_magic_cmd begins with "file". MAGIC_CMD=$MAGIC_CMD # Must we lock files when doing compilation? need_locks=$lt_need_locks # Tool to manipulate archived DWARF debug symbol files on Mac OS X. DSYMUTIL=$lt_DSYMUTIL # Tool to change global to local symbols on Mac OS X. NMEDIT=$lt_NMEDIT # Tool to manipulate fat objects and archives on Mac OS X. LIPO=$lt_LIPO # ldd/readelf like tool for Mach-O binaries on Mac OS X. OTOOL=$lt_OTOOL # ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4. OTOOL64=$lt_OTOOL64 # Old archive suffix (normally "a"). libext=$libext # Shared library suffix (normally ".so"). shrext_cmds=$lt_shrext_cmds # The commands to extract the exported symbol list from a shared archive. extract_expsyms_cmds=$lt_extract_expsyms_cmds # Variables whose values should be saved in libtool wrapper scripts and # restored at link time. variables_saved_for_relink=$lt_variables_saved_for_relink # 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 # Library versioning type. version_type=$version_type # Shared library runtime path variable. runpath_var=$runpath_var # Shared library path variable. shlibpath_var=$shlibpath_var # Is shlibpath searched before the hard-coded library search path? shlibpath_overrides_runpath=$shlibpath_overrides_runpath # 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 # Command to use after installation of a shared archive. postinstall_cmds=$lt_postinstall_cmds # Command to use after uninstallation of a shared archive. postuninstall_cmds=$lt_postuninstall_cmds # Commands used to finish a libtool library installation in a directory. finish_cmds=$lt_finish_cmds # As "finish_cmds", except a single script fragment to be evaled but # not shown. finish_eval=$lt_finish_eval # Whether we should hardcode library paths into libraries. hardcode_into_libs=$hardcode_into_libs # 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 # 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 # Commands to strip libraries. old_striplib=$lt_old_striplib striplib=$lt_striplib # The linker used to build libraries. LD=$lt_LD # Commands used to build an old-style archive. old_archive_cmds=$lt_old_archive_cmds # A language specific compiler. CC=$lt_compiler # Is the compiler the GNU compiler? with_gcc=$GCC # Compiler flag to turn off builtin functions. no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag # How to pass a linker flag through the compiler. wl=$lt_lt_prog_compiler_wl # Additional compiler flags for building library objects. pic_flag=$lt_lt_prog_compiler_pic # Compiler flag to prevent dynamic linking. link_static_flag=$lt_lt_prog_compiler_static # Does compiler simultaneously support -c and -o options? compiler_c_o=$lt_lt_cv_prog_compiler_c_o # Whether or not to add -lc for building shared libraries. build_libtool_need_lc=$archive_cmds_need_lc # Whether or not to disallow shared libs when runtime libs are static. allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes # Compiler flag to allow reflexive dlopens. export_dynamic_flag_spec=$lt_export_dynamic_flag_spec # Compiler flag to generate shared objects directly from archives. whole_archive_flag_spec=$lt_whole_archive_flag_spec # Whether the compiler copes with passing no objects directly. compiler_needs_object=$lt_compiler_needs_object # Create an old-style archive from a shared archive. old_archive_from_new_cmds=$lt_old_archive_from_new_cmds # Create a temporary old-style archive to link instead of a shared archive. old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds # Commands used to build a shared archive. archive_cmds=$lt_archive_cmds archive_expsym_cmds=$lt_archive_expsym_cmds # Commands used to build a loadable module if different from building # a shared archive. module_cmds=$lt_module_cmds module_expsym_cmds=$lt_module_expsym_cmds # Whether we are building with GNU ld or not. with_gnu_ld=$lt_with_gnu_ld # Flag that allows shared libraries with undefined symbols to be built. allow_undefined_flag=$lt_allow_undefined_flag # Flag that enforces no undefined symbols. no_undefined_flag=$lt_no_undefined_flag # Flag to hardcode \$libdir into a binary during linking. # This must work even if \$libdir does not exist hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec # 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_hardcode_libdir_flag_spec_ld # Whether we need a single "-rpath" flag with a separated argument. hardcode_libdir_separator=$lt_hardcode_libdir_separator # Set to "yes" if using DIR/libNAME\${shared_ext} during linking hardcodes # DIR into the resulting binary. hardcode_direct=$hardcode_direct # Set to "yes" if using DIR/libNAME\${shared_ext} during linking hardcodes # DIR into the resulting binary and the resulting library dependency is # "absolute",i.e impossible to change by setting \${shlibpath_var} if the # library is relocated. hardcode_direct_absolute=$hardcode_direct_absolute # Set to "yes" if using the -LDIR flag during linking hardcodes DIR # into the resulting binary. hardcode_minus_L=$hardcode_minus_L # Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR # into the resulting binary. hardcode_shlibpath_var=$hardcode_shlibpath_var # 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=$hardcode_automatic # Set to yes if linker adds runtime paths of dependent libraries # to runtime path list. inherit_rpath=$inherit_rpath # Whether libtool must link a program against all its dependency libraries. link_all_deplibs=$link_all_deplibs # Fix the shell variable \$srcfile for the compiler. fix_srcfile_path=$lt_fix_srcfile_path # Set to "yes" if exported symbols are required. always_export_symbols=$always_export_symbols # The commands to list exported symbols. export_symbols_cmds=$lt_export_symbols_cmds # Symbols that should not be listed in the preloaded symbols. exclude_expsyms=$lt_exclude_expsyms # Symbols that must always be exported. include_expsyms=$lt_include_expsyms # Commands necessary for linking programs (against libraries) with templates. prelink_cmds=$lt_prelink_cmds # Specify filename containing input files. file_list_spec=$lt_file_list_spec # How to hardcode a shared library path into an executable. hardcode_action=$hardcode_action # The directories searched by this compiler when creating a shared library. compiler_lib_search_dirs=$lt_compiler_lib_search_dirs # Dependencies to place before and after the objects being linked to # create a shared library. predep_objects=$lt_predep_objects postdep_objects=$lt_postdep_objects predeps=$lt_predeps postdeps=$lt_postdeps # The library search path used internally by the compiler when linking # a shared library. compiler_lib_search_path=$lt_compiler_lib_search_path # ### END LIBTOOL CONFIG _LT_EOF case $host_os in aix3*) cat <<\_LT_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 _LT_EOF ;; esac ltmain="$ac_aux_dir/ltmain.sh" # 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 '/^# Generated shell functions inserted here/q' "$ltmain" >> "$cfgfile" \ || (rm -f "$cfgfile"; exit 1) case $xsi_shell in yes) cat << \_LT_EOF >> "$cfgfile" # func_dirname file append nondir_replacement # Compute the dirname of FILE. If nonempty, add APPEND to the result, # otherwise set result to NONDIR_REPLACEMENT. func_dirname () { case ${1} in */*) func_dirname_result="${1%/*}${2}" ;; * ) func_dirname_result="${3}" ;; esac } # func_basename file func_basename () { func_basename_result="${1##*/}" } # func_dirname_and_basename file append nondir_replacement # perform func_basename and func_dirname in a single function # call: # dirname: Compute the dirname of FILE. If nonempty, # add APPEND to the result, otherwise set result # to NONDIR_REPLACEMENT. # value returned in "$func_dirname_result" # basename: Compute filename of FILE. # value retuned in "$func_basename_result" # Implementation must be kept synchronized with func_dirname # and func_basename. For efficiency, we do not delegate to # those functions but instead duplicate the functionality here. func_dirname_and_basename () { case ${1} in */*) func_dirname_result="${1%/*}${2}" ;; * ) func_dirname_result="${3}" ;; esac func_basename_result="${1##*/}" } # func_stripname prefix suffix name # strip PREFIX and SUFFIX off of NAME. # PREFIX and SUFFIX must not contain globbing or regex special # characters, hashes, percent signs, but SUFFIX may contain a leading # dot (in which case that matches only a dot). func_stripname () { # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are # positional parameters, so assign one to ordinary parameter first. func_stripname_result=${3} func_stripname_result=${func_stripname_result#"${1}"} func_stripname_result=${func_stripname_result%"${2}"} } # func_opt_split func_opt_split () { func_opt_split_opt=${1%%=*} func_opt_split_arg=${1#*=} } # func_lo2o object func_lo2o () { case ${1} in *.lo) func_lo2o_result=${1%.lo}.${objext} ;; *) func_lo2o_result=${1} ;; esac } # func_xform libobj-or-source func_xform () { func_xform_result=${1%.*}.lo } # func_arith arithmetic-term... func_arith () { func_arith_result=$(( $* )) } # func_len string # STRING may not start with a hyphen. func_len () { func_len_result=${#1} } _LT_EOF ;; *) # Bourne compatible functions. cat << \_LT_EOF >> "$cfgfile" # func_dirname file append nondir_replacement # Compute the dirname of FILE. If nonempty, add APPEND to the result, # otherwise set result to NONDIR_REPLACEMENT. func_dirname () { # Extract subdirectory from the argument. func_dirname_result=`$ECHO "X${1}" | $Xsed -e "$dirname"` if test "X$func_dirname_result" = "X${1}"; then func_dirname_result="${3}" else func_dirname_result="$func_dirname_result${2}" fi } # func_basename file func_basename () { func_basename_result=`$ECHO "X${1}" | $Xsed -e "$basename"` } # func_stripname prefix suffix name # strip PREFIX and SUFFIX off of NAME. # PREFIX and SUFFIX must not contain globbing or regex special # characters, hashes, percent signs, but SUFFIX may contain a leading # dot (in which case that matches only a dot). # func_strip_suffix prefix name func_stripname () { case ${2} in .*) func_stripname_result=`$ECHO "X${3}" \ | $Xsed -e "s%^${1}%%" -e "s%\\\\${2}\$%%"`;; *) func_stripname_result=`$ECHO "X${3}" \ | $Xsed -e "s%^${1}%%" -e "s%${2}\$%%"`;; esac } # sed scripts: my_sed_long_opt='1s/^\(-[^=]*\)=.*/\1/;q' my_sed_long_arg='1s/^-[^=]*=//' # func_opt_split func_opt_split () { func_opt_split_opt=`$ECHO "X${1}" | $Xsed -e "$my_sed_long_opt"` func_opt_split_arg=`$ECHO "X${1}" | $Xsed -e "$my_sed_long_arg"` } # func_lo2o object func_lo2o () { func_lo2o_result=`$ECHO "X${1}" | $Xsed -e "$lo2o"` } # func_xform libobj-or-source func_xform () { func_xform_result=`$ECHO "X${1}" | $Xsed -e 's/\.[^.]*$/.lo/'` } # func_arith arithmetic-term... func_arith () { func_arith_result=`expr "$@"` } # func_len string # STRING may not start with a hyphen. func_len () { func_len_result=`expr "$1" : ".*" 2>/dev/null || echo $max_cmd_len` } _LT_EOF esac case $lt_shell_append in yes) cat << \_LT_EOF >> "$cfgfile" # func_append var value # Append VALUE to the end of shell variable VAR. func_append () { eval "$1+=\$2" } _LT_EOF ;; *) cat << \_LT_EOF >> "$cfgfile" # func_append var value # Append VALUE to the end of shell variable VAR. func_append () { eval "$1=\$$1\$2" } _LT_EOF ;; esac sed -n '/^# Generated shell functions inserted here/,$p' "$ltmain" >> "$cfgfile" \ || (rm -f "$cfgfile"; exit 1) mv -f "$cfgfile" "$ofile" || (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile") chmod +x "$ofile" cat <<_LT_EOF >> "$ofile" # ### BEGIN LIBTOOL TAG CONFIG: CXX # The linker used to build libraries. LD=$lt_LD_CXX # Commands used to build an old-style archive. old_archive_cmds=$lt_old_archive_cmds_CXX # A language specific compiler. CC=$lt_compiler_CXX # Is the compiler the GNU compiler? with_gcc=$GCC_CXX # Compiler flag to turn off builtin functions. no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag_CXX # How to pass a linker flag through the compiler. wl=$lt_lt_prog_compiler_wl_CXX # Additional compiler flags for building library objects. pic_flag=$lt_lt_prog_compiler_pic_CXX # Compiler flag to prevent dynamic linking. link_static_flag=$lt_lt_prog_compiler_static_CXX # Does compiler simultaneously support -c and -o options? compiler_c_o=$lt_lt_cv_prog_compiler_c_o_CXX # Whether or not to add -lc for building shared libraries. build_libtool_need_lc=$archive_cmds_need_lc_CXX # Whether or not to disallow shared libs when runtime libs are static. allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes_CXX # Compiler flag to allow reflexive dlopens. export_dynamic_flag_spec=$lt_export_dynamic_flag_spec_CXX # Compiler flag to generate shared objects directly from archives. whole_archive_flag_spec=$lt_whole_archive_flag_spec_CXX # Whether the compiler copes with passing no objects directly. compiler_needs_object=$lt_compiler_needs_object_CXX # Create an old-style archive from a shared archive. old_archive_from_new_cmds=$lt_old_archive_from_new_cmds_CXX # Create a temporary old-style archive to link instead of a shared archive. old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds_CXX # Commands used to build a shared archive. archive_cmds=$lt_archive_cmds_CXX archive_expsym_cmds=$lt_archive_expsym_cmds_CXX # Commands used to build a loadable module if different from building # a shared archive. module_cmds=$lt_module_cmds_CXX module_expsym_cmds=$lt_module_expsym_cmds_CXX # Whether we are building with GNU ld or not. with_gnu_ld=$lt_with_gnu_ld_CXX # Flag that allows shared libraries with undefined symbols to be built. allow_undefined_flag=$lt_allow_undefined_flag_CXX # Flag that enforces no undefined symbols. no_undefined_flag=$lt_no_undefined_flag_CXX # Flag to hardcode \$libdir into a binary during linking. # This must work even if \$libdir does not exist hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec_CXX # 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_hardcode_libdir_flag_spec_ld_CXX # Whether we need a single "-rpath" flag with a separated argument. hardcode_libdir_separator=$lt_hardcode_libdir_separator_CXX # Set to "yes" if using DIR/libNAME\${shared_ext} during linking hardcodes # DIR into the resulting binary. hardcode_direct=$hardcode_direct_CXX # Set to "yes" if using DIR/libNAME\${shared_ext} during linking hardcodes # DIR into the resulting binary and the resulting library dependency is # "absolute",i.e impossible to change by setting \${shlibpath_var} if the # library is relocated. hardcode_direct_absolute=$hardcode_direct_absolute_CXX # Set to "yes" if using the -LDIR flag during linking hardcodes DIR # into the resulting binary. hardcode_minus_L=$hardcode_minus_L_CXX # Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR # into the resulting binary. hardcode_shlibpath_var=$hardcode_shlibpath_var_CXX # 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=$hardcode_automatic_CXX # Set to yes if linker adds runtime paths of dependent libraries # to runtime path list. inherit_rpath=$inherit_rpath_CXX # Whether libtool must link a program against all its dependency libraries. link_all_deplibs=$link_all_deplibs_CXX # Fix the shell variable \$srcfile for the compiler. fix_srcfile_path=$lt_fix_srcfile_path_CXX # Set to "yes" if exported symbols are required. always_export_symbols=$always_export_symbols_CXX # The commands to list exported symbols. export_symbols_cmds=$lt_export_symbols_cmds_CXX # Symbols that should not be listed in the preloaded symbols. exclude_expsyms=$lt_exclude_expsyms_CXX # Symbols that must always be exported. include_expsyms=$lt_include_expsyms_CXX # Commands necessary for linking programs (against libraries) with templates. prelink_cmds=$lt_prelink_cmds_CXX # Specify filename containing input files. file_list_spec=$lt_file_list_spec_CXX # How to hardcode a shared library path into an executable. hardcode_action=$hardcode_action_CXX # The directories searched by this compiler when creating a shared library. compiler_lib_search_dirs=$lt_compiler_lib_search_dirs_CXX # Dependencies to place before and after the objects being linked to # create a shared library. predep_objects=$lt_predep_objects_CXX postdep_objects=$lt_postdep_objects_CXX predeps=$lt_predeps_CXX postdeps=$lt_postdeps_CXX # The library search path used internally by the compiler when linking # a shared library. compiler_lib_search_path=$lt_compiler_lib_search_path_CXX # ### END LIBTOOL TAG CONFIG: CXX _LT_EOF ;; "default":C) chmod +x libprelude-config ;; esac done # for ac_tag { (exit 0); exit 0; } _ACEOF chmod +x $CONFIG_STATUS ac_clean_files=$ac_clean_files_save test $ac_write_fail = 0 || { { $as_echo "$as_me:$LINENO: error: write failure creating $CONFIG_STATUS" >&5 $as_echo "$as_me: error: write failure creating $CONFIG_STATUS" >&2;} { (exit 1); exit 1; }; } # configure is writing to config.log, and then calls config.status. # config.status does its own redirection, appending to config.log. # Unfortunately, on DOS this fails, as config.log is still kept open # by configure, so config.status won't be able to write to it; its # output is simply discarded. So we exec the FD to /dev/null, # effectively closing config.log, so it can be properly (re)opened and # appended to by config.status. When coming back to configure, we # need to make the FD available again. if test "$no_create" != yes; then ac_cs_success=: ac_config_status_args= test "$silent" = yes && ac_config_status_args="$ac_config_status_args --quiet" exec 5>/dev/null $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false exec 5>>config.log # Use ||, not &&, to avoid exiting from the if with $? = 1, which # would make configure fail if this is the last instruction. $ac_cs_success || { (exit 1); exit 1; } fi if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then { $as_echo "$as_me:$LINENO: WARNING: unrecognized options: $ac_unrecognized_opts" >&5 $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;} fi echo echo "*** Dumping configuration ***" echo " - Generate documentation : $enable_gtk_doc" echo " - LUA binding : $with_lua" echo " - Perl binding : $with_perl" echo " - Python binding : $with_python" echo " - Ruby binding : $with_ruby" echo " - Easy bindings : $enable_easy_bindings" libprelude-1.0.0/config.sub0000755000076400007640000010316711347714452012573 00000000000000#! /bin/sh # Configuration validation subroutine script. # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, # 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 # Free Software Foundation, Inc. timestamp='2009-11-20' # This file is (in principle) common to ALL GNU software. # The presence of a machine in this file suggests that SOME GNU software # can handle that machine. It does not imply ALL GNU software can. # # This file 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., 51 Franklin Street - Fifth Floor, Boston, MA # 02110-1301, 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. # Please send patches to . Submit a context # diff and a properly formatted GNU ChangeLog entry. # # Configuration subroutine to validate and canonicalize a configuration type. # Supply the specified configuration type as an argument. # If it is invalid, we print an error message on stderr and exit with code 1. # Otherwise, we print the canonical config type on stdout and succeed. # You can get the latest version of this script from: # http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD # This file is supposed to be the same for all GNU packages # and recognize all the CPU types, system types and aliases # that are meaningful with *any* GNU software. # Each package is responsible for reporting which valid configurations # it does not support. The user should be able to distinguish # a failure to support a valid configuration from a meaningless # configuration. # The goal of this file is to map all the various variations of a given # machine specification into a single specification in the form: # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM # or in some cases, the newer four-part form: # CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM # It is wrong to echo any other type of specification. me=`echo "$0" | sed -e 's,.*/,,'` usage="\ Usage: $0 [OPTION] CPU-MFR-OPSYS $0 [OPTION] ALIAS Canonicalize a configuration name. Operation modes: -h, --help print this help, then exit -t, --time-stamp print date of last modification, then exit -v, --version print version number, then exit Report bugs and patches to ." version="\ GNU config.sub ($timestamp) Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." help=" Try \`$me --help' for more information." # Parse command line while test $# -gt 0 ; do case $1 in --time-stamp | --time* | -t ) echo "$timestamp" ; exit ;; --version | -v ) echo "$version" ; exit ;; --help | --h* | -h ) echo "$usage"; exit ;; -- ) # Stop option processing shift; break ;; - ) # Use stdin as input. break ;; -* ) echo "$me: invalid option $1$help" exit 1 ;; *local*) # First pass through any local machine types. echo $1 exit ;; * ) break ;; esac done case $# in 0) echo "$me: missing argument$help" >&2 exit 1;; 1) ;; *) echo "$me: too many arguments$help" >&2 exit 1;; esac # Separate what the user gave into CPU-COMPANY and OS or KERNEL-OS (if any). # Here we must recognize all the valid KERNEL-OS combinations. maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'` case $maybe_os in nto-qnx* | linux-gnu* | linux-dietlibc | linux-newlib* | linux-uclibc* | \ uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | knetbsd*-gnu* | netbsd*-gnu* | \ kopensolaris*-gnu* | \ storm-chaos* | os2-emx* | rtmk-nova*) os=-$maybe_os basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'` ;; *) basic_machine=`echo $1 | sed 's/-[^-]*$//'` if [ $basic_machine != $1 ] then os=`echo $1 | sed 's/.*-/-/'` else os=; fi ;; esac ### Let's recognize common machines as not being operating systems so ### that things like config.sub decstation-3100 work. We also ### recognize some manufacturers as not being operating systems, so we ### can provide default operating systems below. case $os in -sun*os*) # Prevent following clause from handling this invalid input. ;; -dec* | -mips* | -sequent* | -encore* | -pc532* | -sgi* | -sony* | \ -att* | -7300* | -3300* | -delta* | -motorola* | -sun[234]* | \ -unicom* | -ibm* | -next | -hp | -isi* | -apollo | -altos* | \ -convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\ -c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \ -harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \ -apple | -axis | -knuth | -cray | -microblaze) os= basic_machine=$1 ;; -bluegene*) os=-cnk ;; -sim | -cisco | -oki | -wec | -winbond) os= basic_machine=$1 ;; -scout) ;; -wrs) os=-vxworks basic_machine=$1 ;; -chorusos*) os=-chorusos basic_machine=$1 ;; -chorusrdb) os=-chorusrdb basic_machine=$1 ;; -hiux*) os=-hiuxwe2 ;; -sco6) os=-sco5v6 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -sco5) os=-sco3.2v5 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -sco4) os=-sco3.2v4 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -sco3.2.[4-9]*) os=`echo $os | sed -e 's/sco3.2./sco3.2v/'` basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -sco3.2v[4-9]*) # Don't forget version if it is 3.2v4 or newer. basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -sco5v6*) # Don't forget version if it is 3.2v4 or newer. basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -sco*) os=-sco3.2v2 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -udk*) basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -isc) os=-isc2.2 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -clix*) basic_machine=clipper-intergraph ;; -isc*) basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -lynx*) os=-lynxos ;; -ptx*) basic_machine=`echo $1 | sed -e 's/86-.*/86-sequent/'` ;; -windowsnt*) os=`echo $os | sed -e 's/windowsnt/winnt/'` ;; -psos*) os=-psos ;; -mint | -mint[0-9]*) basic_machine=m68k-atari os=-mint ;; esac # Decode aliases for certain CPU-COMPANY combinations. case $basic_machine in # Recognize the basic CPU types without company name. # Some are omitted here because they have special meanings below. 1750a | 580 \ | a29k \ | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \ | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \ | am33_2.0 \ | arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr | avr32 \ | bfin \ | c4x | clipper \ | d10v | d30v | dlx | dsp16xx \ | fido | fr30 | frv \ | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \ | i370 | i860 | i960 | ia64 \ | ip2k | iq2000 \ | lm32 \ | m32c | m32r | m32rle | m68000 | m68k | m88k \ | maxq | mb | microblaze | mcore | mep | metag \ | mips | mipsbe | mipseb | mipsel | mipsle \ | mips16 \ | mips64 | mips64el \ | mips64octeon | mips64octeonel \ | mips64orion | mips64orionel \ | mips64r5900 | mips64r5900el \ | mips64vr | mips64vrel \ | mips64vr4100 | mips64vr4100el \ | mips64vr4300 | mips64vr4300el \ | mips64vr5000 | mips64vr5000el \ | mips64vr5900 | mips64vr5900el \ | mipsisa32 | mipsisa32el \ | mipsisa32r2 | mipsisa32r2el \ | mipsisa64 | mipsisa64el \ | mipsisa64r2 | mipsisa64r2el \ | mipsisa64sb1 | mipsisa64sb1el \ | mipsisa64sr71k | mipsisa64sr71kel \ | mipstx39 | mipstx39el \ | mn10200 | mn10300 \ | moxie \ | mt \ | msp430 \ | nios | nios2 \ | ns16k | ns32k \ | or32 \ | pdp10 | pdp11 | pj | pjl \ | powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \ | pyramid \ | rx \ | score \ | sh | sh[1234] | sh[24]a | sh[24]aeb | sh[23]e | sh[34]eb | sheb | shbe | shle | sh[1234]le | sh3ele \ | sh64 | sh64le \ | sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \ | sparcv8 | sparcv9 | sparcv9b | sparcv9v \ | spu | strongarm \ | tahoe | thumb | tic4x | tic80 | tron \ | ubicom32 \ | v850 | v850e \ | we32k \ | x86 | xc16x | xscale | xscalee[bl] | xstormy16 | xtensa \ | z8k | z80) basic_machine=$basic_machine-unknown ;; m6811 | m68hc11 | m6812 | m68hc12 | picochip) # Motorola 68HC11/12. basic_machine=$basic_machine-unknown os=-none ;; m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65 | z8k) ;; ms1) basic_machine=mt-unknown ;; # We use `pc' rather than `unknown' # because (1) that's what they normally are, and # (2) the word "unknown" tends to confuse beginning users. i*86 | x86_64) basic_machine=$basic_machine-pc ;; # Object if more than one company name word. *-*-*) echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2 exit 1 ;; # Recognize the basic CPU types with company name. 580-* \ | a29k-* \ | alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \ | alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \ | alphapca5[67]-* | alpha64pca5[67]-* | arc-* \ | arm-* | armbe-* | armle-* | armeb-* | armv*-* \ | avr-* | avr32-* \ | bfin-* | bs2000-* \ | c[123]* | c30-* | [cjt]90-* | c4x-* | c54x-* | c55x-* | c6x-* \ | clipper-* | craynv-* | cydra-* \ | d10v-* | d30v-* | dlx-* \ | elxsi-* \ | f30[01]-* | f700-* | fido-* | fr30-* | frv-* | fx80-* \ | h8300-* | h8500-* \ | hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \ | i*86-* | i860-* | i960-* | ia64-* \ | ip2k-* | iq2000-* \ | lm32-* \ | m32c-* | m32r-* | m32rle-* \ | m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \ | m88110-* | m88k-* | maxq-* | mcore-* | metag-* | microblaze-* \ | mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \ | mips16-* \ | mips64-* | mips64el-* \ | mips64octeon-* | mips64octeonel-* \ | mips64orion-* | mips64orionel-* \ | mips64r5900-* | mips64r5900el-* \ | mips64vr-* | mips64vrel-* \ | mips64vr4100-* | mips64vr4100el-* \ | mips64vr4300-* | mips64vr4300el-* \ | mips64vr5000-* | mips64vr5000el-* \ | mips64vr5900-* | mips64vr5900el-* \ | mipsisa32-* | mipsisa32el-* \ | mipsisa32r2-* | mipsisa32r2el-* \ | mipsisa64-* | mipsisa64el-* \ | mipsisa64r2-* | mipsisa64r2el-* \ | mipsisa64sb1-* | mipsisa64sb1el-* \ | mipsisa64sr71k-* | mipsisa64sr71kel-* \ | mipstx39-* | mipstx39el-* \ | mmix-* \ | mt-* \ | msp430-* \ | nios-* | nios2-* \ | none-* | np1-* | ns16k-* | ns32k-* \ | orion-* \ | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \ | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \ | pyramid-* \ | romp-* | rs6000-* | rx-* \ | sh-* | sh[1234]-* | sh[24]a-* | sh[24]aeb-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \ | shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \ | sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \ | sparclite-* \ | sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | strongarm-* | sv1-* | sx?-* \ | tahoe-* | thumb-* \ | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* | tile-* \ | tron-* \ | ubicom32-* \ | v850-* | v850e-* | vax-* \ | we32k-* \ | x86-* | x86_64-* | xc16x-* | xps100-* | xscale-* | xscalee[bl]-* \ | xstormy16-* | xtensa*-* \ | ymp-* \ | z8k-* | z80-*) ;; # Recognize the basic CPU types without company name, with glob match. xtensa*) basic_machine=$basic_machine-unknown ;; # Recognize the various machine names and aliases which stand # for a CPU type and a company and sometimes even an OS. 386bsd) basic_machine=i386-unknown os=-bsd ;; 3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc) basic_machine=m68000-att ;; 3b*) basic_machine=we32k-att ;; a29khif) basic_machine=a29k-amd os=-udi ;; abacus) basic_machine=abacus-unknown ;; adobe68k) basic_machine=m68010-adobe os=-scout ;; alliant | fx80) basic_machine=fx80-alliant ;; altos | altos3068) basic_machine=m68k-altos ;; am29k) basic_machine=a29k-none os=-bsd ;; amd64) basic_machine=x86_64-pc ;; amd64-*) basic_machine=x86_64-`echo $basic_machine | sed 's/^[^-]*-//'` ;; amdahl) basic_machine=580-amdahl os=-sysv ;; amiga | amiga-*) basic_machine=m68k-unknown ;; amigaos | amigados) basic_machine=m68k-unknown os=-amigaos ;; amigaunix | amix) basic_machine=m68k-unknown os=-sysv4 ;; apollo68) basic_machine=m68k-apollo os=-sysv ;; apollo68bsd) basic_machine=m68k-apollo os=-bsd ;; aros) basic_machine=i386-pc os=-aros ;; aux) basic_machine=m68k-apple os=-aux ;; balance) basic_machine=ns32k-sequent os=-dynix ;; blackfin) basic_machine=bfin-unknown os=-linux ;; blackfin-*) basic_machine=bfin-`echo $basic_machine | sed 's/^[^-]*-//'` os=-linux ;; bluegene*) basic_machine=powerpc-ibm os=-cnk ;; c90) basic_machine=c90-cray os=-unicos ;; cegcc) basic_machine=arm-unknown os=-cegcc ;; convex-c1) basic_machine=c1-convex os=-bsd ;; convex-c2) basic_machine=c2-convex os=-bsd ;; convex-c32) basic_machine=c32-convex os=-bsd ;; convex-c34) basic_machine=c34-convex os=-bsd ;; convex-c38) basic_machine=c38-convex os=-bsd ;; cray | j90) basic_machine=j90-cray os=-unicos ;; craynv) basic_machine=craynv-cray os=-unicosmp ;; cr16) basic_machine=cr16-unknown os=-elf ;; crds | unos) basic_machine=m68k-crds ;; crisv32 | crisv32-* | etraxfs*) basic_machine=crisv32-axis ;; cris | cris-* | etrax*) basic_machine=cris-axis ;; crx) basic_machine=crx-unknown os=-elf ;; da30 | da30-*) basic_machine=m68k-da30 ;; decstation | decstation-3100 | pmax | pmax-* | pmin | dec3100 | decstatn) basic_machine=mips-dec ;; decsystem10* | dec10*) basic_machine=pdp10-dec os=-tops10 ;; decsystem20* | dec20*) basic_machine=pdp10-dec os=-tops20 ;; delta | 3300 | motorola-3300 | motorola-delta \ | 3300-motorola | delta-motorola) basic_machine=m68k-motorola ;; delta88) basic_machine=m88k-motorola os=-sysv3 ;; dicos) basic_machine=i686-pc os=-dicos ;; djgpp) basic_machine=i586-pc os=-msdosdjgpp ;; dpx20 | dpx20-*) basic_machine=rs6000-bull os=-bosx ;; dpx2* | dpx2*-bull) basic_machine=m68k-bull os=-sysv3 ;; ebmon29k) basic_machine=a29k-amd os=-ebmon ;; elxsi) basic_machine=elxsi-elxsi os=-bsd ;; encore | umax | mmax) basic_machine=ns32k-encore ;; es1800 | OSE68k | ose68k | ose | OSE) basic_machine=m68k-ericsson os=-ose ;; fx2800) basic_machine=i860-alliant ;; genix) basic_machine=ns32k-ns ;; gmicro) basic_machine=tron-gmicro os=-sysv ;; go32) basic_machine=i386-pc os=-go32 ;; h3050r* | hiux*) basic_machine=hppa1.1-hitachi os=-hiuxwe2 ;; h8300hms) basic_machine=h8300-hitachi os=-hms ;; h8300xray) basic_machine=h8300-hitachi os=-xray ;; h8500hms) basic_machine=h8500-hitachi os=-hms ;; harris) basic_machine=m88k-harris os=-sysv3 ;; hp300-*) basic_machine=m68k-hp ;; hp300bsd) basic_machine=m68k-hp os=-bsd ;; hp300hpux) basic_machine=m68k-hp os=-hpux ;; hp3k9[0-9][0-9] | hp9[0-9][0-9]) basic_machine=hppa1.0-hp ;; hp9k2[0-9][0-9] | hp9k31[0-9]) basic_machine=m68000-hp ;; hp9k3[2-9][0-9]) basic_machine=m68k-hp ;; hp9k6[0-9][0-9] | hp6[0-9][0-9]) basic_machine=hppa1.0-hp ;; hp9k7[0-79][0-9] | hp7[0-79][0-9]) basic_machine=hppa1.1-hp ;; hp9k78[0-9] | hp78[0-9]) # FIXME: really hppa2.0-hp basic_machine=hppa1.1-hp ;; hp9k8[67]1 | hp8[67]1 | hp9k80[24] | hp80[24] | hp9k8[78]9 | hp8[78]9 | hp9k893 | hp893) # FIXME: really hppa2.0-hp basic_machine=hppa1.1-hp ;; hp9k8[0-9][13679] | hp8[0-9][13679]) basic_machine=hppa1.1-hp ;; hp9k8[0-9][0-9] | hp8[0-9][0-9]) basic_machine=hppa1.0-hp ;; hppa-next) os=-nextstep3 ;; hppaosf) basic_machine=hppa1.1-hp os=-osf ;; hppro) basic_machine=hppa1.1-hp os=-proelf ;; i370-ibm* | ibm*) basic_machine=i370-ibm ;; # I'm not sure what "Sysv32" means. Should this be sysv3.2? i*86v32) basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` os=-sysv32 ;; i*86v4*) basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` os=-sysv4 ;; i*86v) basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` os=-sysv ;; i*86sol2) basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` os=-solaris2 ;; i386mach) basic_machine=i386-mach os=-mach ;; i386-vsta | vsta) basic_machine=i386-unknown os=-vsta ;; iris | iris4d) basic_machine=mips-sgi case $os in -irix*) ;; *) os=-irix4 ;; esac ;; isi68 | isi) basic_machine=m68k-isi os=-sysv ;; m68knommu) basic_machine=m68k-unknown os=-linux ;; m68knommu-*) basic_machine=m68k-`echo $basic_machine | sed 's/^[^-]*-//'` os=-linux ;; m88k-omron*) basic_machine=m88k-omron ;; magnum | m3230) basic_machine=mips-mips os=-sysv ;; merlin) basic_machine=ns32k-utek os=-sysv ;; microblaze) basic_machine=microblaze-xilinx ;; mingw32) basic_machine=i386-pc os=-mingw32 ;; mingw32ce) basic_machine=arm-unknown os=-mingw32ce ;; miniframe) basic_machine=m68000-convergent ;; *mint | -mint[0-9]* | *MiNT | *MiNT[0-9]*) basic_machine=m68k-atari os=-mint ;; mips3*-*) basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'` ;; mips3*) basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown ;; monitor) basic_machine=m68k-rom68k os=-coff ;; morphos) basic_machine=powerpc-unknown os=-morphos ;; msdos) basic_machine=i386-pc os=-msdos ;; ms1-*) basic_machine=`echo $basic_machine | sed -e 's/ms1-/mt-/'` ;; mvs) basic_machine=i370-ibm os=-mvs ;; ncr3000) basic_machine=i486-ncr os=-sysv4 ;; netbsd386) basic_machine=i386-unknown os=-netbsd ;; netwinder) basic_machine=armv4l-rebel os=-linux ;; news | news700 | news800 | news900) basic_machine=m68k-sony os=-newsos ;; news1000) basic_machine=m68030-sony os=-newsos ;; news-3600 | risc-news) basic_machine=mips-sony os=-newsos ;; necv70) basic_machine=v70-nec os=-sysv ;; next | m*-next ) basic_machine=m68k-next case $os in -nextstep* ) ;; -ns2*) os=-nextstep2 ;; *) os=-nextstep3 ;; esac ;; nh3000) basic_machine=m68k-harris os=-cxux ;; nh[45]000) basic_machine=m88k-harris os=-cxux ;; nindy960) basic_machine=i960-intel os=-nindy ;; mon960) basic_machine=i960-intel os=-mon960 ;; nonstopux) basic_machine=mips-compaq os=-nonstopux ;; np1) basic_machine=np1-gould ;; nsr-tandem) basic_machine=nsr-tandem ;; op50n-* | op60c-*) basic_machine=hppa1.1-oki os=-proelf ;; openrisc | openrisc-*) basic_machine=or32-unknown ;; os400) basic_machine=powerpc-ibm os=-os400 ;; OSE68000 | ose68000) basic_machine=m68000-ericsson os=-ose ;; os68k) basic_machine=m68k-none os=-os68k ;; pa-hitachi) basic_machine=hppa1.1-hitachi os=-hiuxwe2 ;; paragon) basic_machine=i860-intel os=-osf ;; parisc) basic_machine=hppa-unknown os=-linux ;; parisc-*) basic_machine=hppa-`echo $basic_machine | sed 's/^[^-]*-//'` os=-linux ;; pbd) basic_machine=sparc-tti ;; pbb) basic_machine=m68k-tti ;; pc532 | pc532-*) basic_machine=ns32k-pc532 ;; pc98) basic_machine=i386-pc ;; pc98-*) basic_machine=i386-`echo $basic_machine | sed 's/^[^-]*-//'` ;; pentium | p5 | k5 | k6 | nexgen | viac3) basic_machine=i586-pc ;; pentiumpro | p6 | 6x86 | athlon | athlon_*) basic_machine=i686-pc ;; pentiumii | pentium2 | pentiumiii | pentium3) basic_machine=i686-pc ;; pentium4) basic_machine=i786-pc ;; pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*) basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'` ;; pentiumpro-* | p6-* | 6x86-* | athlon-*) basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'` ;; pentiumii-* | pentium2-* | pentiumiii-* | pentium3-*) basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'` ;; pentium4-*) basic_machine=i786-`echo $basic_machine | sed 's/^[^-]*-//'` ;; pn) basic_machine=pn-gould ;; power) basic_machine=power-ibm ;; ppc) basic_machine=powerpc-unknown ;; ppc-*) basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'` ;; ppcle | powerpclittle | ppc-le | powerpc-little) basic_machine=powerpcle-unknown ;; ppcle-* | powerpclittle-*) basic_machine=powerpcle-`echo $basic_machine | sed 's/^[^-]*-//'` ;; ppc64) basic_machine=powerpc64-unknown ;; ppc64-*) basic_machine=powerpc64-`echo $basic_machine | sed 's/^[^-]*-//'` ;; ppc64le | powerpc64little | ppc64-le | powerpc64-little) basic_machine=powerpc64le-unknown ;; ppc64le-* | powerpc64little-*) basic_machine=powerpc64le-`echo $basic_machine | sed 's/^[^-]*-//'` ;; ps2) basic_machine=i386-ibm ;; pw32) basic_machine=i586-unknown os=-pw32 ;; rdos) basic_machine=i386-pc os=-rdos ;; rom68k) basic_machine=m68k-rom68k os=-coff ;; rm[46]00) basic_machine=mips-siemens ;; rtpc | rtpc-*) basic_machine=romp-ibm ;; s390 | s390-*) basic_machine=s390-ibm ;; s390x | s390x-*) basic_machine=s390x-ibm ;; sa29200) basic_machine=a29k-amd os=-udi ;; sb1) basic_machine=mipsisa64sb1-unknown ;; sb1el) basic_machine=mipsisa64sb1el-unknown ;; sde) basic_machine=mipsisa32-sde os=-elf ;; sei) basic_machine=mips-sei os=-seiux ;; sequent) basic_machine=i386-sequent ;; sh) basic_machine=sh-hitachi os=-hms ;; sh5el) basic_machine=sh5le-unknown ;; sh64) basic_machine=sh64-unknown ;; sparclite-wrs | simso-wrs) basic_machine=sparclite-wrs os=-vxworks ;; sps7) basic_machine=m68k-bull os=-sysv2 ;; spur) basic_machine=spur-unknown ;; st2000) basic_machine=m68k-tandem ;; stratus) basic_machine=i860-stratus os=-sysv4 ;; sun2) basic_machine=m68000-sun ;; sun2os3) basic_machine=m68000-sun os=-sunos3 ;; sun2os4) basic_machine=m68000-sun os=-sunos4 ;; sun3os3) basic_machine=m68k-sun os=-sunos3 ;; sun3os4) basic_machine=m68k-sun os=-sunos4 ;; sun4os3) basic_machine=sparc-sun os=-sunos3 ;; sun4os4) basic_machine=sparc-sun os=-sunos4 ;; sun4sol2) basic_machine=sparc-sun os=-solaris2 ;; sun3 | sun3-*) basic_machine=m68k-sun ;; sun4) basic_machine=sparc-sun ;; sun386 | sun386i | roadrunner) basic_machine=i386-sun ;; sv1) basic_machine=sv1-cray os=-unicos ;; symmetry) basic_machine=i386-sequent os=-dynix ;; t3e) basic_machine=alphaev5-cray os=-unicos ;; t90) basic_machine=t90-cray os=-unicos ;; tic54x | c54x*) basic_machine=tic54x-unknown os=-coff ;; tic55x | c55x*) basic_machine=tic55x-unknown os=-coff ;; tic6x | c6x*) basic_machine=tic6x-unknown os=-coff ;; tile*) basic_machine=tile-unknown os=-linux-gnu ;; tx39) basic_machine=mipstx39-unknown ;; tx39el) basic_machine=mipstx39el-unknown ;; toad1) basic_machine=pdp10-xkl os=-tops20 ;; tower | tower-32) basic_machine=m68k-ncr ;; tpf) basic_machine=s390x-ibm os=-tpf ;; udi29k) basic_machine=a29k-amd os=-udi ;; ultra3) basic_machine=a29k-nyu os=-sym1 ;; v810 | necv810) basic_machine=v810-nec os=-none ;; vaxv) basic_machine=vax-dec os=-sysv ;; vms) basic_machine=vax-dec os=-vms ;; vpp*|vx|vx-*) basic_machine=f301-fujitsu ;; vxworks960) basic_machine=i960-wrs os=-vxworks ;; vxworks68) basic_machine=m68k-wrs os=-vxworks ;; vxworks29k) basic_machine=a29k-wrs os=-vxworks ;; w65*) basic_machine=w65-wdc os=-none ;; w89k-*) basic_machine=hppa1.1-winbond os=-proelf ;; xbox) basic_machine=i686-pc os=-mingw32 ;; xps | xps100) basic_machine=xps100-honeywell ;; ymp) basic_machine=ymp-cray os=-unicos ;; z8k-*-coff) basic_machine=z8k-unknown os=-sim ;; z80-*-coff) basic_machine=z80-unknown os=-sim ;; none) basic_machine=none-none os=-none ;; # Here we handle the default manufacturer of certain CPU types. It is in # some cases the only manufacturer, in others, it is the most popular. w89k) basic_machine=hppa1.1-winbond ;; op50n) basic_machine=hppa1.1-oki ;; op60c) basic_machine=hppa1.1-oki ;; romp) basic_machine=romp-ibm ;; mmix) basic_machine=mmix-knuth ;; rs6000) basic_machine=rs6000-ibm ;; vax) basic_machine=vax-dec ;; pdp10) # there are many clones, so DEC is not a safe bet basic_machine=pdp10-unknown ;; pdp11) basic_machine=pdp11-dec ;; we32k) basic_machine=we32k-att ;; sh[1234] | sh[24]a | sh[24]aeb | sh[34]eb | sh[1234]le | sh[23]ele) basic_machine=sh-unknown ;; sparc | sparcv8 | sparcv9 | sparcv9b | sparcv9v) basic_machine=sparc-sun ;; cydra) basic_machine=cydra-cydrome ;; orion) basic_machine=orion-highlevel ;; orion105) basic_machine=clipper-highlevel ;; mac | mpw | mac-mpw) basic_machine=m68k-apple ;; pmac | pmac-mpw) basic_machine=powerpc-apple ;; *-unknown) # Make sure to match an already-canonicalized machine name. ;; *) echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2 exit 1 ;; esac # Here we canonicalize certain aliases for manufacturers. case $basic_machine in *-digital*) basic_machine=`echo $basic_machine | sed 's/digital.*/dec/'` ;; *-commodore*) basic_machine=`echo $basic_machine | sed 's/commodore.*/cbm/'` ;; *) ;; esac # Decode manufacturer-specific aliases for certain operating systems. if [ x"$os" != x"" ] then case $os in # First match some system type aliases # that might get confused with valid system types. # -solaris* is a basic system type, with this one exception. -auroraux) os=-auroraux ;; -solaris1 | -solaris1.*) os=`echo $os | sed -e 's|solaris1|sunos4|'` ;; -solaris) os=-solaris2 ;; -svr4*) os=-sysv4 ;; -unixware*) os=-sysv4.2uw ;; -gnu/linux*) os=`echo $os | sed -e 's|gnu/linux|linux-gnu|'` ;; # First accept the basic system types. # The portable systems comes first. # Each alternative MUST END IN A *, to match a version number. # -sysv* is not here because it comes later, after sysvr4. -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \ | -*vms* | -sco* | -esix* | -isc* | -aix* | -cnk* | -sunos | -sunos[34]*\ | -hpux* | -unos* | -osf* | -luna* | -dgux* | -auroraux* | -solaris* \ | -sym* | -kopensolaris* \ | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \ | -aos* | -aros* \ | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \ | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \ | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* \ | -openbsd* | -solidbsd* \ | -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \ | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \ | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \ | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \ | -chorusos* | -chorusrdb* | -cegcc* \ | -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \ | -mingw32* | -linux-gnu* | -linux-newlib* | -linux-uclibc* \ | -uxpv* | -beos* | -mpeix* | -udk* \ | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \ | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \ | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \ | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \ | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \ | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \ | -skyos* | -haiku* | -rdos* | -toppers* | -drops* | -es*) # Remember, each alternative MUST END IN *, to match a version number. ;; -qnx*) case $basic_machine in x86-* | i*86-*) ;; *) os=-nto$os ;; esac ;; -nto-qnx*) ;; -nto*) os=`echo $os | sed -e 's|nto|nto-qnx|'` ;; -sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \ | -windows* | -osx | -abug | -netware* | -os9* | -beos* | -haiku* \ | -macos* | -mpw* | -magic* | -mmixware* | -mon960* | -lnews*) ;; -mac*) os=`echo $os | sed -e 's|mac|macos|'` ;; -linux-dietlibc) os=-linux-dietlibc ;; -linux*) os=`echo $os | sed -e 's|linux|linux-gnu|'` ;; -sunos5*) os=`echo $os | sed -e 's|sunos5|solaris2|'` ;; -sunos6*) os=`echo $os | sed -e 's|sunos6|solaris3|'` ;; -opened*) os=-openedition ;; -os400*) os=-os400 ;; -wince*) os=-wince ;; -osfrose*) os=-osfrose ;; -osf*) os=-osf ;; -utek*) os=-bsd ;; -dynix*) os=-bsd ;; -acis*) os=-aos ;; -atheos*) os=-atheos ;; -syllable*) os=-syllable ;; -386bsd) os=-bsd ;; -ctix* | -uts*) os=-sysv ;; -nova*) os=-rtmk-nova ;; -ns2 ) os=-nextstep2 ;; -nsk*) os=-nsk ;; # Preserve the version number of sinix5. -sinix5.*) os=`echo $os | sed -e 's|sinix|sysv|'` ;; -sinix*) os=-sysv4 ;; -tpf*) os=-tpf ;; -triton*) os=-sysv3 ;; -oss*) os=-sysv3 ;; -svr4) os=-sysv4 ;; -svr3) os=-sysv3 ;; -sysvr4) os=-sysv4 ;; # This must come after -sysvr4. -sysv*) ;; -ose*) os=-ose ;; -es1800*) os=-ose ;; -xenix) os=-xenix ;; -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*) os=-mint ;; -aros*) os=-aros ;; -kaos*) os=-kaos ;; -zvmoe) os=-zvmoe ;; -dicos*) os=-dicos ;; -none) ;; *) # Get rid of the `-' at the beginning of $os. os=`echo $os | sed 's/[^-]*-//'` echo Invalid configuration \`$1\': system \`$os\' not recognized 1>&2 exit 1 ;; esac else # Here we handle the default operating systems that come with various machines. # The value should be what the vendor currently ships out the door with their # machine or put another way, the most popular os provided with the machine. # Note that if you're going to try to match "-MANUFACTURER" here (say, # "-sun"), then you have to tell the case statement up towards the top # that MANUFACTURER isn't an operating system. Otherwise, code above # will signal an error saying that MANUFACTURER isn't an operating # system, and we'll never get to this point. case $basic_machine in score-*) os=-elf ;; spu-*) os=-elf ;; *-acorn) os=-riscix1.2 ;; arm*-rebel) os=-linux ;; arm*-semi) os=-aout ;; c4x-* | tic4x-*) os=-coff ;; # This must come before the *-dec entry. pdp10-*) os=-tops20 ;; pdp11-*) os=-none ;; *-dec | vax-*) os=-ultrix4.2 ;; m68*-apollo) os=-domain ;; i386-sun) os=-sunos4.0.2 ;; m68000-sun) os=-sunos3 # This also exists in the configure program, but was not the # default. # os=-sunos4 ;; m68*-cisco) os=-aout ;; mep-*) os=-elf ;; mips*-cisco) os=-elf ;; mips*-*) os=-elf ;; or32-*) os=-coff ;; *-tti) # must be before sparc entry or we get the wrong os. os=-sysv3 ;; sparc-* | *-sun) os=-sunos4.1.1 ;; *-be) os=-beos ;; *-haiku) os=-haiku ;; *-ibm) os=-aix ;; *-knuth) os=-mmixware ;; *-wec) os=-proelf ;; *-winbond) os=-proelf ;; *-oki) os=-proelf ;; *-hp) os=-hpux ;; *-hitachi) os=-hiux ;; i860-* | *-att | *-ncr | *-altos | *-motorola | *-convergent) os=-sysv ;; *-cbm) os=-amigaos ;; *-dg) os=-dgux ;; *-dolphin) os=-sysv3 ;; m68k-ccur) os=-rtu ;; m88k-omron*) os=-luna ;; *-next ) os=-nextstep ;; *-sequent) os=-ptx ;; *-crds) os=-unos ;; *-ns) os=-genix ;; i370-*) os=-mvs ;; *-next) os=-nextstep3 ;; *-gould) os=-sysv ;; *-highlevel) os=-bsd ;; *-encore) os=-bsd ;; *-sgi) os=-irix ;; *-siemens) os=-sysv4 ;; *-masscomp) os=-rtu ;; f30[01]-fujitsu | f700-fujitsu) os=-uxpv ;; *-rom68k) os=-coff ;; *-*bug) os=-coff ;; *-apple) os=-macos ;; *-atari*) os=-mint ;; *) os=-none ;; esac fi # Here we handle the case where we know the os, and the CPU type, but not the # manufacturer. We pick the logical manufacturer. vendor=unknown case $basic_machine in *-unknown) case $os in -riscix*) vendor=acorn ;; -sunos*) vendor=sun ;; -cnk*|-aix*) vendor=ibm ;; -beos*) vendor=be ;; -hpux*) vendor=hp ;; -mpeix*) vendor=hp ;; -hiux*) vendor=hitachi ;; -unos*) vendor=crds ;; -dgux*) vendor=dg ;; -luna*) vendor=omron ;; -genix*) vendor=ns ;; -mvs* | -opened*) vendor=ibm ;; -os400*) vendor=ibm ;; -ptx*) vendor=sequent ;; -tpf*) vendor=ibm ;; -vxsim* | -vxworks* | -windiss*) vendor=wrs ;; -aux*) vendor=apple ;; -hms*) vendor=hitachi ;; -mpw* | -macos*) vendor=apple ;; -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*) vendor=atari ;; -vos*) vendor=stratus ;; esac basic_machine=`echo $basic_machine | sed "s/unknown/$vendor/"` ;; esac echo $basic_machine$os exit # Local variables: # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "timestamp='" # time-stamp-format: "%:y-%02m-%02d" # time-stamp-end: "'" # End: libprelude-1.0.0/arg-nonnull.h0000664000076400007640000000231011322603367013176 00000000000000/* A C macro for declaring that specific arguments must not be NULL. Copyright (C) 2009, 2010 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 3 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 Lesser General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see . */ /* _GL_ARG_NONNULL((n,...,m)) tells the compiler and static analyzer tools that the values passed as arguments n, ..., m must be non-NULL pointers. n = 1 stands for the first argument, n = 2 for the second argument etc. */ #ifndef _GL_ARG_NONNULL # if (__GNUC__ == 3 && __GNUC_MINOR__ >= 3) || __GNUC__ > 3 # define _GL_ARG_NONNULL(params) __attribute__ ((__nonnull__ params)) # else # define _GL_ARG_NONNULL(params) # endif #endif libprelude-1.0.0/Makefile.am0000664000076400007640000001553311345707014012637 00000000000000DISTCHECK_CONFIGURE_FLAGS = --enable-gtk-doc ACLOCAL_AMFLAGS = -I m4 -I libmissing/m4 SUBDIRS = libltdl libmissing m4 src prelude-admin bindings docs tests DIST_SUBDIRS=$(SUBDIRS) EXTRA_DIST = HACKING.README LICENSE.README tls.conf bin_SCRIPTS = $(top_builddir)/libprelude-config distuninstallcheck_listfiles = find . -type f -print | $(GREP) -v 'perl' | $(GREP) -v '3pm' | $(GREP) -v 'egg-info' includedir = $(prefix)/include/libprelude include_HEADERS = prelude-config.h MOSTLYCLEANFILES = prelude-config.h BUILT_SOURCES = prelude-config.h MAINTAINERCLEANFILES = \ $(srcdir)/INSTALL \ $(srcdir)/aclocal.m4 \ $(srcdir)/autoscan.log \ $(srcdir)/compile \ $(srcdir)/config.guess \ $(srcdir)/config.h.in \ $(srcdir)/config.sub \ $(srcdir)/configure.scan \ $(srcdir)/depcomp \ $(srcdir)/install-sh \ $(srcdir)/ltmain.sh \ $(srcdir)/missing \ $(srcdir)/mkinstalldirs \ $(srcdir)/omf.make \ $(srcdir)/xmldocs.make \ $(srcdir)/ylwrap \ $(srcdir)/gtk-doc.make \ $(srcdir)/ChangeLog \ `find "$(srcdir)" -type f -name Makefile.in -print` prelude-config.h: $(top_builddir)/config.h rm -f prelude-config.h echo "/* Used from libprelude headers */" >> prelude-config.h $(GREP) "HAVE_VARIADIC_MACROS" < $(top_builddir)/config.h >> prelude-config.h $(GREP) "PRELUDE_ALIGNED_ACCESS" < $(top_builddir)/config.h >> prelude-config.h $(GREP) "PRELUDE_WORDS_BIGENDIAN" < $(top_builddir)/config.h >> prelude-config.h $(GREP) "__PRELUDE_FUNC__" < $(top_builddir)/config.h >> prelude-config.h @echo "#ifndef TIME_WITH_SYS_TIME" >> prelude-config.h $(GREP) "TIME_WITH_SYS_TIME" < $(top_builddir)/config.h >> prelude-config.h @echo "#endif" >> prelude-config.h @echo "#ifndef HAVE_UID_T" >> prelude-config.h $(GREP) "HAVE_UID_T" < $(top_builddir)/config.h >> prelude-config.h @echo "#endif" >> prelude-config.h @echo "#ifndef HAVE_GID_T" >> prelude-config.h $(GREP) "HAVE_GID_T" < $(top_builddir)/config.h >> prelude-config.h @echo "#endif" >> prelude-config.h # # Install default sensors configuration with mode 644 # every sensors should be able to read it. # # Spool directory for report saving is mode install-data-local: $(INSTALL) -d -m 711 $(DESTDIR)$(PRELUDE_SPOOL_DIR); $(INSTALL) -d -m 755 $(DESTDIR)$(PRELUDE_CONFIG_DIR); $(INSTALL) -d -m 755 $(DESTDIR)$(PRELUDE_CONFIG_DIR)/default; $(INSTALL) -d -m 711 $(DESTDIR)$(PRELUDE_CONFIG_DIR)/profile; @if test -f $(DESTDIR)$(PRELUDE_CONFIG_DIR)/default/client.conf; then \ echo; \ echo "********************************************************************************"; \ echo; \ echo "$(DESTDIR)$(PRELUDE_CONFIG_DIR)/default/client.conf already exist..."; \ echo "Installing default configuration in $(DESTDIR)$(PRELUDE_CONFIG_DIR)/default/client.conf-dist"; \ echo; \ echo "********************************************************************************"; \ echo; \ $(INSTALL) -m 644 $(top_builddir)/client.conf $(DESTDIR)$(PRELUDE_CONFIG_DIR)/default/client.conf-dist; \ else \ $(INSTALL) -m 644 $(top_builddir)/client.conf $(DESTDIR)$(PRELUDE_CONFIG_DIR)/default; \ fi @if test -f $(DESTDIR)$(PRELUDE_CONFIG_DIR)/default/global.conf; then \ echo; \ echo "********************************************************************************"; \ echo; \ echo "$(DESTDIR)$(PRELUDE_CONFIG_DIR)/default/global.conf already exist..."; \ echo "Installing default configuration in $(DESTDIR)$(PRELUDE_CONFIG_DIR)/default/global.conf-dist"; \ echo; \ echo "********************************************************************************"; \ echo; \ $(INSTALL) -m 644 $(top_builddir)/global.conf $(DESTDIR)$(PRELUDE_CONFIG_DIR)/default/global.conf-dist; \ else \ $(INSTALL) -m 644 $(top_builddir)/global.conf $(DESTDIR)$(PRELUDE_CONFIG_DIR)/default; \ fi @if test -f $(DESTDIR)$(PRELUDE_CONFIG_DIR)/default/idmef-client.conf; then \ echo; \ echo "********************************************************************************"; \ echo; \ echo "$(DESTDIR)$(PRELUDE_CONFIG_DIR)/default/idmef-client.conf already exist..."; \ echo "Installing default configuration in $(DESTDIR)$(PRELUDE_CONFIG_DIR)/default/idmef-client.conf-dist"; \ echo; \ echo "********************************************************************************"; \ echo; \ $(INSTALL) -m 644 $(top_builddir)/idmef-client.conf $(DESTDIR)$(PRELUDE_CONFIG_DIR)/default/idmef-client.conf-dist;\ else \ $(INSTALL) -m 644 $(top_builddir)/idmef-client.conf $(DESTDIR)$(PRELUDE_CONFIG_DIR)/default; \ fi @if test -f $(DESTDIR)$(PRELUDE_CONFIG_DIR)/default/tls.conf; then \ echo; \ echo "********************************************************************************"; \ echo; \ echo "$(DESTDIR)$(PRELUDE_CONFIG_DIR)/default/tls.conf already exist..."; \ echo "Installing default configuration in $(DESTDIR)$(PRELUDE_CONFIG_DIR)/default/tls.conf-dist"; \ echo; \ echo "********************************************************************************"; \ echo; \ $(INSTALL) -m 644 $(top_srcdir)/tls.conf $(DESTDIR)$(PRELUDE_CONFIG_DIR)/default/tls.conf-dist; \ else \ $(INSTALL) -m 644 $(top_srcdir)/tls.conf $(DESTDIR)$(PRELUDE_CONFIG_DIR)/default; \ fi uninstall-local: rm -f $(DESTDIR)$(PRELUDE_CONFIG_DIR)/default/client.conf rm -f $(DESTDIR)$(PRELUDE_CONFIG_DIR)/default/global.conf rm -f $(DESTDIR)$(PRELUDE_CONFIG_DIR)/default/idmef-client.conf rm -f $(DESTDIR)$(PRELUDE_CONFIG_DIR)/default/tls.conf dist-hook: @if test -d "$(srcdir)/.git"; then \ echo Creating ChangeLog && \ ( cd "$(top_srcdir)" && \ echo '# Generated by Makefile. Do not edit.'; echo; \ $(top_srcdir)/missing --run git log --stat ) > ChangeLog.tmp \ && mv -f ChangeLog.tmp $(top_distdir)/ChangeLog \ || ( rm -f ChangeLog.tmp ; \ echo Failed to generate ChangeLog >&2 ); \ else \ echo A git clone is required to generate a ChangeLog >&2; \ fi -include $(top_srcdir)/git.mk libprelude-1.0.0/README0000664000076400007640000001205611202225026011446 00000000000000Prelude Library (http://www.prelude-ids.com) The Prelude Library is brought to you by PreludeIDS Technologies (http://www.prelude-ids.com). Prelude Library Overview ======================== The Prelude Library is used to make sensor developers' life better by providing features used by every sensor: - Manager(s) Connection management (with fallback in case all configured Managers are down, and automatic reconnection). - Interface to communicate with the Prelude Manager. - Asynchronous Message interface (allowing sensor to emmit message without blocking, even if there is latency on the wire). - Asynchronous timer interface. - Generic configuration API, providing a generic abstraction for command-line, configuration file option, and wide option support. - Wide option managment allowing sensor-exported options to be directly accessible from the Manager administrative console. - Generic plugin API. Prelude Communication ===================== Prelude IDS uses unique optimized implementation of the XML based IDMEF message format to transmit alerts between the sensors and the manager and between managers. Using IDMEF, Prelude provides a generic method for virtually any type of sensors to describe precisely the content of an alert. IRC === If there's something you just can't find out elsewhere, you want to give feedback directly to the authors or you're just bored, visit #prelude on irc.freenode.net Get Support =========== Prelude-user mailing list archives can be accessed at: http://lists.prelude-ids.org Commercial Support is available through the PreludeIDS Technologies company: http://www.prelude-ids.com, info@prelude-ids.com Help development ================ 1. SUBMITTING PATCHES The Prelude source is constantly changing. If you want to submit a patch, please do so from the most recent CVS source tree, subscribe to the prelude-devel mailing list by sending a mail to: prelude-devel-subscribe@prelude-ids.org and post your patch with a description of functionality. You can also attach patches to bugs on http://trac.prelude-ids.org 2. BUGS If you find any bugs, please report them to: http://trac.prelude-ids.org Please make sure that what you're reporting is actually a BUG and not a problem on your side. 3. SUGGESTIONS Subscribe to prelude-devel and give us your suggestions. How to install the Prelude Library ================================== 1. Prelude Library installation If you don't want to build the Prelude Library yourself, you can get prebuild rpm and debian packages at http://www.prelude-ids.org. If you want to build Prelude, unpack the tarball and cd into the newly created directory. Then type : ./configure make If everything works, su to root and type: make install 2. Generic sensor installation First, all sensors get some generic configuration files, installed in: - $prefix/etc/prelude/default/idmef-client.conf [specific to sensor] - $prefix/etc/prelude/default/global.conf [used by sensor and manager] Theses file contains entry that *may* be shared between several sensor. If a sensor provides the same entry in it's own configuration file, then the sensor will by default use it's own entry. Example of a shared entry (in the default provided generic sensor configuration file) is : server-addr = 127.0.0.1:4690 || x.x.x.x; Which tells the sensor to try to connect to both 127.0.0.1:4690 and x.x.x.x:4690. If both connections work, only the first will be used, but the contrary would happen if you were to use : server-addr = 127.0.0.1:4690 && x.x.x.x; Which mean that both connections should be okay for a sensor message to be considered to be successfully sent. When linked against the Prelude Library, the sensors should be registered in order to setup the sensor for the first time. If you start a sensor without registering it, it'll print out a message like : " Basic file configuration does not exist. Please run : prelude-adduser register prelude-lml "idmef:w admin:r" program on the analyzer host to setup this analyzer. " Starting this program with the sensor provided arguments will start the registration procedure for this sensor. The prelude-adduser program will ask you to start the prelude-adduser program on the Manager host: " You now need to start "prelude-adduser" on the server host where you need to register to: use: "prelude-admin registration-server " " "analyzer-name" should be substituted by the name of your Manager (prelude-manager is the default, unless you provided a customized analyzer-name option on the prelude-manager command line, or in it's configuration file). The manager host prelude-adduser program will provide you a randomly generated password to be used when sensor side prelude-adduser request it. The prelude-adduser program will then ask you several question, and it will connect to the manager-adduser program. If authentication is okay, the sensors and the Manager will be able to exchange their certificates. libprelude-1.0.0/ltmain.sh0000755000076400007640000073306011347714375012440 00000000000000# Generated from ltmain.m4sh. # ltmain.sh (GNU libtool) 2.2.6b # Written by Gordon Matzigkeit , 1996 # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, 2006, 2007 2008 Free Software Foundation, Inc. # This is free software; see the source for copying conditions. There is NO # warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. # GNU Libtool 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. # # As a special exception to the GNU General Public License, # if you distribute this file as part of a program or library that # is built using GNU Libtool, you may include this file under the # same distribution terms that you use for the rest of that program. # # GNU Libtool 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 GNU Libtool; see the file COPYING. If not, a copy # can be downloaded from http://www.gnu.org/licenses/gpl.html, # or obtained by writing to the Free Software Foundation, Inc., # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. # Usage: $progname [OPTION]... [MODE-ARG]... # # Provide generalized library-building support services. # # --config show all configuration variables # --debug enable verbose shell tracing # -n, --dry-run display commands without modifying any files # --features display basic configuration information and exit # --mode=MODE use operation mode MODE # --preserve-dup-deps don't remove duplicate dependency libraries # --quiet, --silent don't print informational messages # --tag=TAG use configuration variables from tag TAG # -v, --verbose print informational messages (default) # --version print version information # -h, --help print short or long help message # # MODE must be one of the following: # # clean remove files from the build directory # compile compile a source file into a libtool object # execute automatically set library path, then run a program # finish complete the installation of libtool libraries # install install libraries or executables # link create a library or an executable # uninstall remove libraries from an installed directory # # MODE-ARGS vary depending on the MODE. # Try `$progname --help --mode=MODE' for a more detailed description of MODE. # # When reporting a bug, please describe a test case to reproduce it and # include the following information: # # host-triplet: $host # shell: $SHELL # compiler: $LTCC # compiler flags: $LTCFLAGS # linker: $LD (gnu? $with_gnu_ld) # $progname: (GNU libtool) 2.2.6b # automake: $automake_version # autoconf: $autoconf_version # # Report bugs to . PROGRAM=ltmain.sh PACKAGE=libtool VERSION=2.2.6b TIMESTAMP="" package_revision=1.3017 # Be Bourne compatible if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then emulate sh NULLCMD=: # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' setopt NO_GLOB_SUBST else case `(set -o) 2>/dev/null` in *posix*) set -o posix;; esac fi BIN_SH=xpg4; export BIN_SH # for Tru64 DUALCASE=1; export DUALCASE # for MKS sh # NLS nuisances: We save the old values to restore during execute mode. # Only set LANG and LC_ALL to C if already set. # These must not be set unconditionally because not all systems understand # e.g. LANG=C (notably SCO). lt_user_locale= lt_safe_locale= for lt_var in LANG LANGUAGE LC_ALL LC_CTYPE LC_COLLATE LC_MESSAGES do eval "if test \"\${$lt_var+set}\" = set; then save_$lt_var=\$$lt_var $lt_var=C export $lt_var lt_user_locale=\"$lt_var=\\\$save_\$lt_var; \$lt_user_locale\" lt_safe_locale=\"$lt_var=C; \$lt_safe_locale\" fi" done $lt_unset CDPATH : ${CP="cp -f"} : ${ECHO="echo"} : ${EGREP="/bin/grep -E"} : ${FGREP="/bin/grep -F"} : ${GREP="/bin/grep"} : ${LN_S="ln -s"} : ${MAKE="make"} : ${MKDIR="mkdir"} : ${MV="mv -f"} : ${RM="rm -f"} : ${SED="/bin/sed"} : ${SHELL="${CONFIG_SHELL-/bin/sh}"} : ${Xsed="$SED -e 1s/^X//"} # Global variables: EXIT_SUCCESS=0 EXIT_FAILURE=1 EXIT_MISMATCH=63 # $? = 63 is used to indicate version mismatch to missing. EXIT_SKIP=77 # $? = 77 is used to indicate a skipped test to automake. exit_status=$EXIT_SUCCESS # Make sure IFS has a sensible default lt_nl=' ' IFS=" $lt_nl" dirname="s,/[^/]*$,," basename="s,^.*/,," # func_dirname_and_basename file append nondir_replacement # perform func_basename and func_dirname in a single function # call: # dirname: Compute the dirname of FILE. If nonempty, # add APPEND to the result, otherwise set result # to NONDIR_REPLACEMENT. # value returned in "$func_dirname_result" # basename: Compute filename of FILE. # value retuned in "$func_basename_result" # Implementation must be kept synchronized with func_dirname # and func_basename. For efficiency, we do not delegate to # those functions but instead duplicate the functionality here. func_dirname_and_basename () { # Extract subdirectory from the argument. func_dirname_result=`$ECHO "X${1}" | $Xsed -e "$dirname"` if test "X$func_dirname_result" = "X${1}"; then func_dirname_result="${3}" else func_dirname_result="$func_dirname_result${2}" fi func_basename_result=`$ECHO "X${1}" | $Xsed -e "$basename"` } # Generated shell functions inserted here. # Work around backward compatibility issue on IRIX 6.5. On IRIX 6.4+, sh # is ksh but when the shell is invoked as "sh" and the current value of # the _XPG environment variable is not equal to 1 (one), the special # positional parameter $0, within a function call, is the name of the # function. progpath="$0" # The name of this program: # In the unlikely event $progname began with a '-', it would play havoc with # func_echo (imagine progname=-n), so we prepend ./ in that case: func_dirname_and_basename "$progpath" progname=$func_basename_result case $progname in -*) progname=./$progname ;; esac # Make sure we have an absolute path for reexecution: case $progpath in [\\/]*|[A-Za-z]:\\*) ;; *[\\/]*) progdir=$func_dirname_result progdir=`cd "$progdir" && pwd` progpath="$progdir/$progname" ;; *) save_IFS="$IFS" IFS=: for progdir in $PATH; do IFS="$save_IFS" test -x "$progdir/$progname" && break done IFS="$save_IFS" test -n "$progdir" || progdir=`pwd` progpath="$progdir/$progname" ;; esac # Sed substitution that helps us do robust quoting. It backslashifies # metacharacters that are still active within double-quoted strings. Xsed="${SED}"' -e 1s/^X//' sed_quote_subst='s/\([`"$\\]\)/\\\1/g' # Same as above, but do not quote variable references. double_quote_subst='s/\(["`\\]\)/\\\1/g' # Re-`\' parameter expansions in output of double_quote_subst that were # `\'-ed in input to the same. If an odd number of `\' preceded a '$' # in input to double_quote_subst, that '$' was protected from expansion. # Since each input `\' is now two `\'s, look for any number of runs of # four `\'s followed by two `\'s and then a '$'. `\' that '$'. bs='\\' bs2='\\\\' bs4='\\\\\\\\' dollar='\$' sed_double_backslash="\ s/$bs4/&\\ /g s/^$bs2$dollar/$bs&/ s/\\([^$bs]\\)$bs2$dollar/\\1$bs2$bs$dollar/g s/\n//g" # Standard options: opt_dry_run=false opt_help=false opt_quiet=false opt_verbose=false opt_warning=: # func_echo arg... # Echo program name prefixed message, along with the current mode # name if it has been set yet. func_echo () { $ECHO "$progname${mode+: }$mode: $*" } # func_verbose arg... # Echo program name prefixed message in verbose mode only. func_verbose () { $opt_verbose && func_echo ${1+"$@"} # A bug in bash halts the script if the last line of a function # fails when set -e is in force, so we need another command to # work around that: : } # func_error arg... # Echo program name prefixed message to standard error. func_error () { $ECHO "$progname${mode+: }$mode: "${1+"$@"} 1>&2 } # func_warning arg... # Echo program name prefixed warning message to standard error. func_warning () { $opt_warning && $ECHO "$progname${mode+: }$mode: warning: "${1+"$@"} 1>&2 # bash bug again: : } # func_fatal_error arg... # Echo program name prefixed message to standard error, and exit. func_fatal_error () { func_error ${1+"$@"} exit $EXIT_FAILURE } # func_fatal_help arg... # Echo program name prefixed message to standard error, followed by # a help hint, and exit. func_fatal_help () { func_error ${1+"$@"} func_fatal_error "$help" } help="Try \`$progname --help' for more information." ## default # func_grep expression filename # Check whether EXPRESSION matches any line of FILENAME, without output. func_grep () { $GREP "$1" "$2" >/dev/null 2>&1 } # func_mkdir_p directory-path # Make sure the entire path to DIRECTORY-PATH is available. func_mkdir_p () { my_directory_path="$1" my_dir_list= if test -n "$my_directory_path" && test "$opt_dry_run" != ":"; then # Protect directory names starting with `-' case $my_directory_path in -*) my_directory_path="./$my_directory_path" ;; esac # While some portion of DIR does not yet exist... while test ! -d "$my_directory_path"; do # ...make a list in topmost first order. Use a colon delimited # list incase some portion of path contains whitespace. my_dir_list="$my_directory_path:$my_dir_list" # If the last portion added has no slash in it, the list is done case $my_directory_path in */*) ;; *) break ;; esac # ...otherwise throw away the child directory and loop my_directory_path=`$ECHO "X$my_directory_path" | $Xsed -e "$dirname"` done my_dir_list=`$ECHO "X$my_dir_list" | $Xsed -e 's,:*$,,'` save_mkdir_p_IFS="$IFS"; IFS=':' for my_dir in $my_dir_list; do IFS="$save_mkdir_p_IFS" # mkdir can fail with a `File exist' error if two processes # try to create one of the directories concurrently. Don't # stop in that case! $MKDIR "$my_dir" 2>/dev/null || : done IFS="$save_mkdir_p_IFS" # Bail out if we (or some other process) failed to create a directory. test -d "$my_directory_path" || \ func_fatal_error "Failed to create \`$1'" fi } # func_mktempdir [string] # Make a temporary directory that won't clash with other running # libtool processes, and avoids race conditions if possible. If # given, STRING is the basename for that directory. func_mktempdir () { my_template="${TMPDIR-/tmp}/${1-$progname}" if test "$opt_dry_run" = ":"; then # Return a directory name, but don't create it in dry-run mode my_tmpdir="${my_template}-$$" else # If mktemp works, use that first and foremost my_tmpdir=`mktemp -d "${my_template}-XXXXXXXX" 2>/dev/null` if test ! -d "$my_tmpdir"; then # Failing that, at least try and use $RANDOM to avoid a race my_tmpdir="${my_template}-${RANDOM-0}$$" save_mktempdir_umask=`umask` umask 0077 $MKDIR "$my_tmpdir" umask $save_mktempdir_umask fi # If we're not in dry-run mode, bomb out on failure test -d "$my_tmpdir" || \ func_fatal_error "cannot create temporary directory \`$my_tmpdir'" fi $ECHO "X$my_tmpdir" | $Xsed } # func_quote_for_eval arg # Aesthetically quote ARG to be evaled later. # This function returns two values: FUNC_QUOTE_FOR_EVAL_RESULT # is double-quoted, suitable for a subsequent eval, whereas # FUNC_QUOTE_FOR_EVAL_UNQUOTED_RESULT has merely all characters # which are still active within double quotes backslashified. func_quote_for_eval () { case $1 in *[\\\`\"\$]*) func_quote_for_eval_unquoted_result=`$ECHO "X$1" | $Xsed -e "$sed_quote_subst"` ;; *) func_quote_for_eval_unquoted_result="$1" ;; esac case $func_quote_for_eval_unquoted_result in # Double-quote args containing shell metacharacters to delay # word splitting, command substitution and and variable # expansion for a subsequent eval. # Many Bourne shells cannot handle close brackets correctly # in scan sets, so we specify it separately. *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") func_quote_for_eval_result="\"$func_quote_for_eval_unquoted_result\"" ;; *) func_quote_for_eval_result="$func_quote_for_eval_unquoted_result" esac } # func_quote_for_expand arg # Aesthetically quote ARG to be evaled later; same as above, # but do not quote variable references. func_quote_for_expand () { case $1 in *[\\\`\"]*) my_arg=`$ECHO "X$1" | $Xsed \ -e "$double_quote_subst" -e "$sed_double_backslash"` ;; *) my_arg="$1" ;; esac case $my_arg in # Double-quote args containing shell metacharacters to delay # word splitting and command substitution for a subsequent eval. # Many Bourne shells cannot handle close brackets correctly # in scan sets, so we specify it separately. *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") my_arg="\"$my_arg\"" ;; esac func_quote_for_expand_result="$my_arg" } # func_show_eval cmd [fail_exp] # Unless opt_silent is true, then output CMD. Then, if opt_dryrun is # not true, evaluate CMD. If the evaluation of CMD fails, and FAIL_EXP # is given, then evaluate it. func_show_eval () { my_cmd="$1" my_fail_exp="${2-:}" ${opt_silent-false} || { func_quote_for_expand "$my_cmd" eval "func_echo $func_quote_for_expand_result" } if ${opt_dry_run-false}; then :; else eval "$my_cmd" my_status=$? if test "$my_status" -eq 0; then :; else eval "(exit $my_status); $my_fail_exp" fi fi } # func_show_eval_locale cmd [fail_exp] # Unless opt_silent is true, then output CMD. Then, if opt_dryrun is # not true, evaluate CMD. If the evaluation of CMD fails, and FAIL_EXP # is given, then evaluate it. Use the saved locale for evaluation. func_show_eval_locale () { my_cmd="$1" my_fail_exp="${2-:}" ${opt_silent-false} || { func_quote_for_expand "$my_cmd" eval "func_echo $func_quote_for_expand_result" } if ${opt_dry_run-false}; then :; else eval "$lt_user_locale $my_cmd" my_status=$? eval "$lt_safe_locale" if test "$my_status" -eq 0; then :; else eval "(exit $my_status); $my_fail_exp" fi fi } # func_version # Echo version message to standard output and exit. func_version () { $SED -n '/^# '$PROGRAM' (GNU /,/# warranty; / { s/^# // s/^# *$// s/\((C)\)[ 0-9,-]*\( [1-9][0-9]*\)/\1\2/ p }' < "$progpath" exit $? } # func_usage # Echo short help message to standard output and exit. func_usage () { $SED -n '/^# Usage:/,/# -h/ { s/^# // s/^# *$// s/\$progname/'$progname'/ p }' < "$progpath" $ECHO $ECHO "run \`$progname --help | more' for full usage" exit $? } # func_help # Echo long help message to standard output and exit. func_help () { $SED -n '/^# Usage:/,/# Report bugs to/ { s/^# // s/^# *$// s*\$progname*'$progname'* s*\$host*'"$host"'* s*\$SHELL*'"$SHELL"'* s*\$LTCC*'"$LTCC"'* s*\$LTCFLAGS*'"$LTCFLAGS"'* s*\$LD*'"$LD"'* s/\$with_gnu_ld/'"$with_gnu_ld"'/ s/\$automake_version/'"`(automake --version) 2>/dev/null |$SED 1q`"'/ s/\$autoconf_version/'"`(autoconf --version) 2>/dev/null |$SED 1q`"'/ p }' < "$progpath" exit $? } # func_missing_arg argname # Echo program name prefixed message to standard error and set global # exit_cmd. func_missing_arg () { func_error "missing argument for $1" exit_cmd=exit } exit_cmd=: # Check that we have a working $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, and then maybe $ECHO will work. exec $SHELL "$progpath" --no-reexec ${1+"$@"} fi if test "X$1" = X--fallback-echo; then # used as fallback echo shift cat </dev/null 2>&1; then taglist="$taglist $tagname" # Evaluate the configuration. Be careful to quote the path # and the sed script, to avoid splitting on whitespace, but # also don't use non-portable quotes within backquotes within # quotes we have to do it in 2 steps: extractedcf=`$SED -n -e "$sed_extractcf" < "$progpath"` eval "$extractedcf" else func_error "ignoring unknown tag $tagname" fi ;; esac } # Parse options once, thoroughly. This comes as soon as possible in # the script to make things like `libtool --version' happen quickly. { # Shorthand for --mode=foo, only valid as the first argument case $1 in clean|clea|cle|cl) shift; set dummy --mode clean ${1+"$@"}; shift ;; compile|compil|compi|comp|com|co|c) shift; set dummy --mode compile ${1+"$@"}; shift ;; execute|execut|execu|exec|exe|ex|e) shift; set dummy --mode execute ${1+"$@"}; shift ;; finish|finis|fini|fin|fi|f) shift; set dummy --mode finish ${1+"$@"}; shift ;; install|instal|insta|inst|ins|in|i) shift; set dummy --mode install ${1+"$@"}; shift ;; link|lin|li|l) shift; set dummy --mode link ${1+"$@"}; shift ;; uninstall|uninstal|uninsta|uninst|unins|unin|uni|un|u) shift; set dummy --mode uninstall ${1+"$@"}; shift ;; esac # Parse non-mode specific arguments: while test "$#" -gt 0; do opt="$1" shift case $opt in --config) func_config ;; --debug) preserve_args="$preserve_args $opt" func_echo "enabling shell trace mode" opt_debug='set -x' $opt_debug ;; -dlopen) test "$#" -eq 0 && func_missing_arg "$opt" && break execute_dlfiles="$execute_dlfiles $1" shift ;; --dry-run | -n) opt_dry_run=: ;; --features) func_features ;; --finish) mode="finish" ;; --mode) test "$#" -eq 0 && func_missing_arg "$opt" && break case $1 in # Valid mode arguments: clean) ;; compile) ;; execute) ;; finish) ;; install) ;; link) ;; relink) ;; uninstall) ;; # Catch anything else as an error *) func_error "invalid argument for $opt" exit_cmd=exit break ;; esac mode="$1" shift ;; --preserve-dup-deps) opt_duplicate_deps=: ;; --quiet|--silent) preserve_args="$preserve_args $opt" opt_silent=: ;; --verbose| -v) preserve_args="$preserve_args $opt" opt_silent=false ;; --tag) test "$#" -eq 0 && func_missing_arg "$opt" && break preserve_args="$preserve_args $opt $1" func_enable_tag "$1" # tagname is set here shift ;; # Separate optargs to long options: -dlopen=*|--mode=*|--tag=*) func_opt_split "$opt" set dummy "$func_opt_split_opt" "$func_opt_split_arg" ${1+"$@"} shift ;; -\?|-h) func_usage ;; --help) opt_help=: ;; --version) func_version ;; -*) func_fatal_help "unrecognized option \`$opt'" ;; *) nonopt="$opt" break ;; esac done case $host in *cygwin* | *mingw* | *pw32* | *cegcc*) # don't eliminate duplications in $postdeps and $predeps opt_duplicate_compiler_generated_deps=: ;; *) opt_duplicate_compiler_generated_deps=$opt_duplicate_deps ;; esac # Having warned about all mis-specified options, bail out if # anything was wrong. $exit_cmd $EXIT_FAILURE } # func_check_version_match # Ensure that we are using m4 macros, and libtool script from the same # release of libtool. func_check_version_match () { if test "$package_revision" != "$macro_revision"; then if test "$VERSION" != "$macro_version"; then if test -z "$macro_version"; then cat >&2 <<_LT_EOF $progname: Version mismatch error. This is $PACKAGE $VERSION, but the $progname: definition of this LT_INIT comes from an older release. $progname: You should recreate aclocal.m4 with macros from $PACKAGE $VERSION $progname: and run autoconf again. _LT_EOF else cat >&2 <<_LT_EOF $progname: Version mismatch error. This is $PACKAGE $VERSION, but the $progname: definition of this LT_INIT comes from $PACKAGE $macro_version. $progname: You should recreate aclocal.m4 with macros from $PACKAGE $VERSION $progname: and run autoconf again. _LT_EOF fi else cat >&2 <<_LT_EOF $progname: Version mismatch error. This is $PACKAGE $VERSION, revision $package_revision, $progname: but the definition of this LT_INIT comes from revision $macro_revision. $progname: You should recreate aclocal.m4 with macros from revision $package_revision $progname: of $PACKAGE $VERSION and run autoconf again. _LT_EOF fi exit $EXIT_MISMATCH fi } ## ----------- ## ## Main. ## ## ----------- ## $opt_help || { # Sanity checks first: func_check_version_match if test "$build_libtool_libs" != yes && test "$build_old_libs" != yes; then func_fatal_configuration "not configured to build any kind of library" fi test -z "$mode" && func_fatal_error "error: you must specify a MODE." # Darwin sucks eval std_shrext=\"$shrext_cmds\" # Only execute mode is allowed to have -dlopen flags. if test -n "$execute_dlfiles" && test "$mode" != execute; then func_error "unrecognized option \`-dlopen'" $ECHO "$help" 1>&2 exit $EXIT_FAILURE fi # Change the help message to a mode-specific one. generic_help="$help" help="Try \`$progname --help --mode=$mode' for more information." } # func_lalib_p file # True iff FILE is a libtool `.la' library or `.lo' object file. # This function is only a basic sanity check; it will hardly flush out # determined imposters. func_lalib_p () { test -f "$1" && $SED -e 4q "$1" 2>/dev/null \ | $GREP "^# Generated by .*$PACKAGE" > /dev/null 2>&1 } # func_lalib_unsafe_p file # True iff FILE is a libtool `.la' library or `.lo' object file. # This function implements the same check as func_lalib_p without # resorting to external programs. To this end, it redirects stdin and # closes it afterwards, without saving the original file descriptor. # As a safety measure, use it only where a negative result would be # fatal anyway. Works if `file' does not exist. func_lalib_unsafe_p () { lalib_p=no if test -f "$1" && test -r "$1" && exec 5<&0 <"$1"; then for lalib_p_l in 1 2 3 4 do read lalib_p_line case "$lalib_p_line" in \#\ Generated\ by\ *$PACKAGE* ) lalib_p=yes; break;; esac done exec 0<&5 5<&- fi test "$lalib_p" = yes } # func_ltwrapper_script_p file # True iff FILE is a libtool wrapper script # This function is only a basic sanity check; it will hardly flush out # determined imposters. func_ltwrapper_script_p () { func_lalib_p "$1" } # func_ltwrapper_executable_p file # True iff FILE is a libtool wrapper executable # This function is only a basic sanity check; it will hardly flush out # determined imposters. func_ltwrapper_executable_p () { func_ltwrapper_exec_suffix= case $1 in *.exe) ;; *) func_ltwrapper_exec_suffix=.exe ;; esac $GREP "$magic_exe" "$1$func_ltwrapper_exec_suffix" >/dev/null 2>&1 } # func_ltwrapper_scriptname file # Assumes file is an ltwrapper_executable # uses $file to determine the appropriate filename for a # temporary ltwrapper_script. func_ltwrapper_scriptname () { func_ltwrapper_scriptname_result="" if func_ltwrapper_executable_p "$1"; then func_dirname_and_basename "$1" "" "." func_stripname '' '.exe' "$func_basename_result" func_ltwrapper_scriptname_result="$func_dirname_result/$objdir/${func_stripname_result}_ltshwrapper" fi } # func_ltwrapper_p file # True iff FILE is a libtool wrapper script or wrapper executable # This function is only a basic sanity check; it will hardly flush out # determined imposters. func_ltwrapper_p () { func_ltwrapper_script_p "$1" || func_ltwrapper_executable_p "$1" } # func_execute_cmds commands fail_cmd # Execute tilde-delimited COMMANDS. # If FAIL_CMD is given, eval that upon failure. # FAIL_CMD may read-access the current command in variable CMD! func_execute_cmds () { $opt_debug save_ifs=$IFS; IFS='~' for cmd in $1; do IFS=$save_ifs eval cmd=\"$cmd\" func_show_eval "$cmd" "${2-:}" done IFS=$save_ifs } # func_source file # Source FILE, adding directory component if necessary. # Note that it is not necessary on cygwin/mingw to append a dot to # FILE even if both FILE and FILE.exe exist: automatic-append-.exe # behavior happens only for exec(3), not for open(2)! Also, sourcing # `FILE.' does not work on cygwin managed mounts. func_source () { $opt_debug case $1 in */* | *\\*) . "$1" ;; *) . "./$1" ;; esac } # func_infer_tag arg # Infer tagged configuration to use if any are available and # if one wasn't chosen via the "--tag" command line option. # Only attempt this if the compiler in the base compile # command doesn't match the default compiler. # arg is usually of the form 'gcc ...' func_infer_tag () { $opt_debug if test -n "$available_tags" && test -z "$tagname"; then CC_quoted= for arg in $CC; do func_quote_for_eval "$arg" CC_quoted="$CC_quoted $func_quote_for_eval_result" done case $@ in # Blanks in the command may have been stripped by the calling shell, # but not from the CC environment variable when configure was run. " $CC "* | "$CC "* | " `$ECHO $CC` "* | "`$ECHO $CC` "* | " $CC_quoted"* | "$CC_quoted "* | " `$ECHO $CC_quoted` "* | "`$ECHO $CC_quoted` "*) ;; # Blanks at the start of $base_compile will cause this to fail # if we don't check for them as well. *) for z in $available_tags; do if $GREP "^# ### BEGIN LIBTOOL TAG CONFIG: $z$" < "$progpath" > /dev/null; then # Evaluate the configuration. eval "`${SED} -n -e '/^# ### BEGIN LIBTOOL TAG CONFIG: '$z'$/,/^# ### END LIBTOOL TAG CONFIG: '$z'$/p' < $progpath`" CC_quoted= for arg in $CC; do # Double-quote args containing other shell metacharacters. func_quote_for_eval "$arg" CC_quoted="$CC_quoted $func_quote_for_eval_result" done case "$@ " in " $CC "* | "$CC "* | " `$ECHO $CC` "* | "`$ECHO $CC` "* | " $CC_quoted"* | "$CC_quoted "* | " `$ECHO $CC_quoted` "* | "`$ECHO $CC_quoted` "*) # The compiler in the base compile command matches # the one in the tagged configuration. # Assume this is the tagged configuration we want. tagname=$z break ;; esac fi done # If $tagname still isn't set, then no tagged configuration # was found and let the user know that the "--tag" command # line option must be used. if test -z "$tagname"; then func_echo "unable to infer tagged configuration" func_fatal_error "specify a tag with \`--tag'" # else # func_verbose "using $tagname tagged configuration" fi ;; esac fi } # func_write_libtool_object output_name pic_name nonpic_name # Create a libtool object file (analogous to a ".la" file), # but don't create it if we're doing a dry run. func_write_libtool_object () { write_libobj=${1} if test "$build_libtool_libs" = yes; then write_lobj=\'${2}\' else write_lobj=none fi if test "$build_old_libs" = yes; then write_oldobj=\'${3}\' else write_oldobj=none fi $opt_dry_run || { cat >${write_libobj}T <?"'"'"' &()|`$[]' \ && func_warning "libobj name \`$libobj' may not contain shell special characters." func_dirname_and_basename "$obj" "/" "" objname="$func_basename_result" xdir="$func_dirname_result" lobj=${xdir}$objdir/$objname test -z "$base_compile" && \ func_fatal_help "you must specify a compilation command" # Delete any leftover library objects. if test "$build_old_libs" = yes; then removelist="$obj $lobj $libobj ${libobj}T" else removelist="$lobj $libobj ${libobj}T" fi # On Cygwin there's no "real" PIC flag so we must build both object types case $host_os in cygwin* | mingw* | pw32* | os2* | cegcc*) pic_mode=default ;; esac if test "$pic_mode" = no && test "$deplibs_check_method" != pass_all; then # non-PIC code in shared libraries is not supported pic_mode=default fi # Calculate the filename of the output object if compiler does # not support -o with -c if test "$compiler_c_o" = no; then output_obj=`$ECHO "X$srcfile" | $Xsed -e 's%^.*/%%' -e 's%\.[^.]*$%%'`.${objext} lockfile="$output_obj.lock" else output_obj= need_locks=no lockfile= fi # Lock this critical section if it is needed # We use this script file to make the link, it avoids creating a new file if test "$need_locks" = yes; then until $opt_dry_run || ln "$progpath" "$lockfile" 2>/dev/null; do func_echo "Waiting for $lockfile to be removed" sleep 2 done elif test "$need_locks" = warn; then if test -f "$lockfile"; then $ECHO "\ *** ERROR, $lockfile exists and contains: `cat $lockfile 2>/dev/null` This indicates that another process is trying to use the same temporary object file, and libtool could not work around it because your compiler does not support \`-c' and \`-o' together. If you repeat this compilation, it may succeed, by chance, but you had better avoid parallel builds (make -j) in this platform, or get a better compiler." $opt_dry_run || $RM $removelist exit $EXIT_FAILURE fi removelist="$removelist $output_obj" $ECHO "$srcfile" > "$lockfile" fi $opt_dry_run || $RM $removelist removelist="$removelist $lockfile" trap '$opt_dry_run || $RM $removelist; exit $EXIT_FAILURE' 1 2 15 if test -n "$fix_srcfile_path"; then eval srcfile=\"$fix_srcfile_path\" fi func_quote_for_eval "$srcfile" qsrcfile=$func_quote_for_eval_result # Only build a PIC object if we are building libtool libraries. if test "$build_libtool_libs" = yes; then # Without this assignment, base_compile gets emptied. fbsd_hideous_sh_bug=$base_compile if test "$pic_mode" != no; then command="$base_compile $qsrcfile $pic_flag" else # Don't build PIC code command="$base_compile $qsrcfile" fi func_mkdir_p "$xdir$objdir" if test -z "$output_obj"; then # Place PIC objects in $objdir command="$command -o $lobj" fi func_show_eval_locale "$command" \ 'test -n "$output_obj" && $RM $removelist; exit $EXIT_FAILURE' if test "$need_locks" = warn && test "X`cat $lockfile 2>/dev/null`" != "X$srcfile"; then $ECHO "\ *** ERROR, $lockfile contains: `cat $lockfile 2>/dev/null` but it should contain: $srcfile This indicates that another process is trying to use the same temporary object file, and libtool could not work around it because your compiler does not support \`-c' and \`-o' together. If you repeat this compilation, it may succeed, by chance, but you had better avoid parallel builds (make -j) in this platform, or get a better compiler." $opt_dry_run || $RM $removelist exit $EXIT_FAILURE fi # Just move the object if needed, then go on to compile the next one if test -n "$output_obj" && test "X$output_obj" != "X$lobj"; then func_show_eval '$MV "$output_obj" "$lobj"' \ 'error=$?; $opt_dry_run || $RM $removelist; exit $error' fi # Allow error messages only from the first compilation. if test "$suppress_opt" = yes; then suppress_output=' >/dev/null 2>&1' fi fi # Only build a position-dependent object if we build old libraries. if test "$build_old_libs" = yes; then if test "$pic_mode" != yes; then # Don't build PIC code command="$base_compile $qsrcfile$pie_flag" else command="$base_compile $qsrcfile $pic_flag" fi if test "$compiler_c_o" = yes; then command="$command -o $obj" fi # Suppress compiler output if we already did a PIC compilation. command="$command$suppress_output" func_show_eval_locale "$command" \ '$opt_dry_run || $RM $removelist; exit $EXIT_FAILURE' if test "$need_locks" = warn && test "X`cat $lockfile 2>/dev/null`" != "X$srcfile"; then $ECHO "\ *** ERROR, $lockfile contains: `cat $lockfile 2>/dev/null` but it should contain: $srcfile This indicates that another process is trying to use the same temporary object file, and libtool could not work around it because your compiler does not support \`-c' and \`-o' together. If you repeat this compilation, it may succeed, by chance, but you had better avoid parallel builds (make -j) in this platform, or get a better compiler." $opt_dry_run || $RM $removelist exit $EXIT_FAILURE fi # Just move the object if needed if test -n "$output_obj" && test "X$output_obj" != "X$obj"; then func_show_eval '$MV "$output_obj" "$obj"' \ 'error=$?; $opt_dry_run || $RM $removelist; exit $error' fi fi $opt_dry_run || { func_write_libtool_object "$libobj" "$objdir/$objname" "$objname" # Unlock the critical section if it was locked if test "$need_locks" != no; then removelist=$lockfile $RM "$lockfile" fi } exit $EXIT_SUCCESS } $opt_help || { test "$mode" = compile && func_mode_compile ${1+"$@"} } func_mode_help () { # We need to display help for each of the modes. case $mode in "") # Generic help is extracted from the usage comments # at the start of this file. func_help ;; clean) $ECHO \ "Usage: $progname [OPTION]... --mode=clean RM [RM-OPTION]... FILE... Remove files from the build directory. RM is the name of the program to use to delete files associated with each FILE (typically \`/bin/rm'). RM-OPTIONS are options (such as \`-f') to be passed to RM. If FILE is a libtool library, object or program, all the files associated with it are deleted. Otherwise, only FILE itself is deleted using RM." ;; compile) $ECHO \ "Usage: $progname [OPTION]... --mode=compile COMPILE-COMMAND... SOURCEFILE Compile a source file into a libtool library object. This mode accepts the following additional options: -o OUTPUT-FILE set the output file name to OUTPUT-FILE -no-suppress do not suppress compiler output for multiple passes -prefer-pic try to building PIC objects only -prefer-non-pic try to building non-PIC objects only -shared do not build a \`.o' file suitable for static linking -static only build a \`.o' file suitable for static linking COMPILE-COMMAND is a command to be used in creating a \`standard' object file from the given SOURCEFILE. The output file name is determined by removing the directory component from SOURCEFILE, then substituting the C source code suffix \`.c' with the library object suffix, \`.lo'." ;; execute) $ECHO \ "Usage: $progname [OPTION]... --mode=execute COMMAND [ARGS]... Automatically set library path, then run a program. This mode accepts the following additional options: -dlopen FILE add the directory containing FILE to the library path This mode sets the library path environment variable according to \`-dlopen' flags. If any of the ARGS are libtool executable wrappers, then they are translated into their corresponding uninstalled binary, and any of their required library directories are added to the library path. Then, COMMAND is executed, with ARGS as arguments." ;; finish) $ECHO \ "Usage: $progname [OPTION]... --mode=finish [LIBDIR]... Complete the installation of libtool libraries. Each LIBDIR is a directory that contains libtool libraries. The commands that this mode executes may require superuser privileges. Use the \`--dry-run' option if you just want to see what would be executed." ;; install) $ECHO \ "Usage: $progname [OPTION]... --mode=install INSTALL-COMMAND... Install executables or libraries. INSTALL-COMMAND is the installation command. The first component should be either the \`install' or \`cp' program. The following components of INSTALL-COMMAND are treated specially: -inst-prefix PREFIX-DIR Use PREFIX-DIR as a staging area for installation The rest of the components are interpreted as arguments to that command (only BSD-compatible install options are recognized)." ;; link) $ECHO \ "Usage: $progname [OPTION]... --mode=link LINK-COMMAND... Link object files or libraries together to form another library, or to create an executable program. LINK-COMMAND is a command using the C compiler that you would use to create a program from several object files. The following components of LINK-COMMAND are treated specially: -all-static do not do any dynamic linking at all -avoid-version do not add a version suffix if possible -dlopen FILE \`-dlpreopen' FILE if it cannot be dlopened at runtime -dlpreopen FILE link in FILE and add its symbols to lt_preloaded_symbols -export-dynamic allow symbols from OUTPUT-FILE to be resolved with dlsym(3) -export-symbols SYMFILE try to export only the symbols listed in SYMFILE -export-symbols-regex REGEX try to export only the symbols matching REGEX -LLIBDIR search LIBDIR for required installed libraries -lNAME OUTPUT-FILE requires the installed library libNAME -module build a library that can dlopened -no-fast-install disable the fast-install mode -no-install link a not-installable executable -no-undefined declare that a library does not refer to external symbols -o OUTPUT-FILE create OUTPUT-FILE from the specified objects -objectlist FILE Use a list of object files found in FILE to specify objects -precious-files-regex REGEX don't remove output files matching REGEX -release RELEASE specify package release information -rpath LIBDIR the created library will eventually be installed in LIBDIR -R[ ]LIBDIR add LIBDIR to the runtime path of programs and libraries -shared only do dynamic linking of libtool libraries -shrext SUFFIX override the standard shared library file extension -static do not do any dynamic linking of uninstalled libtool libraries -static-libtool-libs do not do any dynamic linking of libtool libraries -version-info CURRENT[:REVISION[:AGE]] specify library version info [each variable defaults to 0] -weak LIBNAME declare that the target provides the LIBNAME interface All other options (arguments beginning with \`-') are ignored. Every other argument is treated as a filename. Files ending in \`.la' are treated as uninstalled libtool libraries, other files are standard or library object files. If the OUTPUT-FILE ends in \`.la', then a libtool library is created, only library objects (\`.lo' files) may be specified, and \`-rpath' is required, except when creating a convenience library. If OUTPUT-FILE ends in \`.a' or \`.lib', then a standard library is created using \`ar' and \`ranlib', or on Windows using \`lib'. If OUTPUT-FILE ends in \`.lo' or \`.${objext}', then a reloadable object file is created, otherwise an executable program is created." ;; uninstall) $ECHO \ "Usage: $progname [OPTION]... --mode=uninstall RM [RM-OPTION]... FILE... Remove libraries from an installation directory. RM is the name of the program to use to delete files associated with each FILE (typically \`/bin/rm'). RM-OPTIONS are options (such as \`-f') to be passed to RM. If FILE is a libtool library, all the files associated with it are deleted. Otherwise, only FILE itself is deleted using RM." ;; *) func_fatal_help "invalid operation mode \`$mode'" ;; esac $ECHO $ECHO "Try \`$progname --help' for more information about other modes." exit $? } # Now that we've collected a possible --mode arg, show help if necessary $opt_help && func_mode_help # func_mode_execute arg... func_mode_execute () { $opt_debug # The first argument is the command name. cmd="$nonopt" test -z "$cmd" && \ func_fatal_help "you must specify a COMMAND" # Handle -dlopen flags immediately. for file in $execute_dlfiles; do test -f "$file" \ || func_fatal_help "\`$file' is not a file" dir= case $file in *.la) # Check to see that this really is a libtool archive. func_lalib_unsafe_p "$file" \ || func_fatal_help "\`$lib' is not a valid libtool archive" # Read the libtool library. dlname= library_names= func_source "$file" # Skip this library if it cannot be dlopened. if test -z "$dlname"; then # Warn if it was a shared library. test -n "$library_names" && \ func_warning "\`$file' was not linked with \`-export-dynamic'" continue fi func_dirname "$file" "" "." dir="$func_dirname_result" if test -f "$dir/$objdir/$dlname"; then dir="$dir/$objdir" else if test ! -f "$dir/$dlname"; then func_fatal_error "cannot find \`$dlname' in \`$dir' or \`$dir/$objdir'" fi fi ;; *.lo) # Just add the directory containing the .lo file. func_dirname "$file" "" "." dir="$func_dirname_result" ;; *) func_warning "\`-dlopen' is ignored for non-libtool libraries and objects" continue ;; esac # Get the absolute pathname. absdir=`cd "$dir" && pwd` test -n "$absdir" && dir="$absdir" # Now add the directory to shlibpath_var. if eval "test -z \"\$$shlibpath_var\""; then eval "$shlibpath_var=\"\$dir\"" else eval "$shlibpath_var=\"\$dir:\$$shlibpath_var\"" fi done # This variable tells wrapper scripts just to set shlibpath_var # rather than running their programs. libtool_execute_magic="$magic" # Check if any of the arguments is a wrapper script. args= for file do case $file in -*) ;; *) # Do a test to see if this is really a libtool program. if func_ltwrapper_script_p "$file"; then func_source "$file" # Transform arg to wrapped name. file="$progdir/$program" elif func_ltwrapper_executable_p "$file"; then func_ltwrapper_scriptname "$file" func_source "$func_ltwrapper_scriptname_result" # Transform arg to wrapped name. file="$progdir/$program" fi ;; esac # Quote arguments (to preserve shell metacharacters). func_quote_for_eval "$file" args="$args $func_quote_for_eval_result" done if test "X$opt_dry_run" = Xfalse; then if test -n "$shlibpath_var"; then # Export the shlibpath_var. eval "export $shlibpath_var" fi # Restore saved environment variables for lt_var in LANG LANGUAGE LC_ALL LC_CTYPE LC_COLLATE LC_MESSAGES do eval "if test \"\${save_$lt_var+set}\" = set; then $lt_var=\$save_$lt_var; export $lt_var else $lt_unset $lt_var fi" done # Now prepare to actually exec the command. exec_cmd="\$cmd$args" else # Display what would be done. if test -n "$shlibpath_var"; then eval "\$ECHO \"\$shlibpath_var=\$$shlibpath_var\"" $ECHO "export $shlibpath_var" fi $ECHO "$cmd$args" exit $EXIT_SUCCESS fi } test "$mode" = execute && func_mode_execute ${1+"$@"} # func_mode_finish arg... func_mode_finish () { $opt_debug libdirs="$nonopt" admincmds= if test -n "$finish_cmds$finish_eval" && test -n "$libdirs"; then for dir do libdirs="$libdirs $dir" done for libdir in $libdirs; do if test -n "$finish_cmds"; then # Do each command in the finish commands. func_execute_cmds "$finish_cmds" 'admincmds="$admincmds '"$cmd"'"' fi if test -n "$finish_eval"; then # Do the single finish_eval. eval cmds=\"$finish_eval\" $opt_dry_run || eval "$cmds" || admincmds="$admincmds $cmds" fi done fi # Exit here if they wanted silent mode. $opt_silent && exit $EXIT_SUCCESS $ECHO "X----------------------------------------------------------------------" | $Xsed $ECHO "Libraries have been installed in:" for libdir in $libdirs; do $ECHO " $libdir" done $ECHO $ECHO "If you ever happen to want to link against installed libraries" $ECHO "in a given directory, LIBDIR, you must either use libtool, and" $ECHO "specify the full pathname of the library, or use the \`-LLIBDIR'" $ECHO "flag during linking and do at least one of the following:" if test -n "$shlibpath_var"; then $ECHO " - add LIBDIR to the \`$shlibpath_var' environment variable" $ECHO " during execution" fi if test -n "$runpath_var"; then $ECHO " - add LIBDIR to the \`$runpath_var' environment variable" $ECHO " during linking" fi if test -n "$hardcode_libdir_flag_spec"; then libdir=LIBDIR eval flag=\"$hardcode_libdir_flag_spec\" $ECHO " - use the \`$flag' linker flag" fi if test -n "$admincmds"; then $ECHO " - have your system administrator run these commands:$admincmds" fi if test -f /etc/ld.so.conf; then $ECHO " - have your system administrator add LIBDIR to \`/etc/ld.so.conf'" fi $ECHO $ECHO "See any operating system documentation about shared libraries for" case $host in solaris2.[6789]|solaris2.1[0-9]) $ECHO "more information, such as the ld(1), crle(1) and ld.so(8) manual" $ECHO "pages." ;; *) $ECHO "more information, such as the ld(1) and ld.so(8) manual pages." ;; esac $ECHO "X----------------------------------------------------------------------" | $Xsed exit $EXIT_SUCCESS } test "$mode" = finish && func_mode_finish ${1+"$@"} # func_mode_install arg... func_mode_install () { $opt_debug # There may be an optional sh(1) argument at the beginning of # install_prog (especially on Windows NT). if test "$nonopt" = "$SHELL" || test "$nonopt" = /bin/sh || # Allow the use of GNU shtool's install command. $ECHO "X$nonopt" | $GREP shtool >/dev/null; then # Aesthetically quote it. func_quote_for_eval "$nonopt" install_prog="$func_quote_for_eval_result " arg=$1 shift else install_prog= arg=$nonopt fi # The real first argument should be the name of the installation program. # Aesthetically quote it. func_quote_for_eval "$arg" install_prog="$install_prog$func_quote_for_eval_result" # We need to accept at least all the BSD install flags. dest= files= opts= prev= install_type= isdir=no stripme= for arg do if test -n "$dest"; then files="$files $dest" dest=$arg continue fi case $arg in -d) isdir=yes ;; -f) case " $install_prog " in *[\\\ /]cp\ *) ;; *) prev=$arg ;; esac ;; -g | -m | -o) prev=$arg ;; -s) stripme=" -s" continue ;; -*) ;; *) # If the previous option needed an argument, then skip it. if test -n "$prev"; then prev= else dest=$arg continue fi ;; esac # Aesthetically quote the argument. func_quote_for_eval "$arg" install_prog="$install_prog $func_quote_for_eval_result" done test -z "$install_prog" && \ func_fatal_help "you must specify an install program" test -n "$prev" && \ func_fatal_help "the \`$prev' option requires an argument" if test -z "$files"; then if test -z "$dest"; then func_fatal_help "no file or destination specified" else func_fatal_help "you must specify a destination" fi fi # Strip any trailing slash from the destination. func_stripname '' '/' "$dest" dest=$func_stripname_result # Check to see that the destination is a directory. test -d "$dest" && isdir=yes if test "$isdir" = yes; then destdir="$dest" destname= else func_dirname_and_basename "$dest" "" "." destdir="$func_dirname_result" destname="$func_basename_result" # Not a directory, so check to see that there is only one file specified. set dummy $files; shift test "$#" -gt 1 && \ func_fatal_help "\`$dest' is not a directory" fi case $destdir in [\\/]* | [A-Za-z]:[\\/]*) ;; *) for file in $files; do case $file in *.lo) ;; *) func_fatal_help "\`$destdir' must be an absolute directory name" ;; esac done ;; esac # This variable tells wrapper scripts just to set variables rather # than running their programs. libtool_install_magic="$magic" staticlibs= future_libdirs= current_libdirs= for file in $files; do # Do each installation. case $file in *.$libext) # Do the static libraries later. staticlibs="$staticlibs $file" ;; *.la) # Check to see that this really is a libtool archive. func_lalib_unsafe_p "$file" \ || func_fatal_help "\`$file' is not a valid libtool archive" library_names= old_library= relink_command= func_source "$file" # Add the libdir to current_libdirs if it is the destination. if test "X$destdir" = "X$libdir"; then case "$current_libdirs " in *" $libdir "*) ;; *) current_libdirs="$current_libdirs $libdir" ;; esac else # Note the libdir as a future libdir. case "$future_libdirs " in *" $libdir "*) ;; *) future_libdirs="$future_libdirs $libdir" ;; esac fi func_dirname "$file" "/" "" dir="$func_dirname_result" dir="$dir$objdir" if test -n "$relink_command"; then # Determine the prefix the user has applied to our future dir. inst_prefix_dir=`$ECHO "X$destdir" | $Xsed -e "s%$libdir\$%%"` # Don't allow the user to place us outside of our expected # location b/c this prevents finding dependent libraries that # are installed to the same prefix. # At present, this check doesn't affect windows .dll's that # are installed into $libdir/../bin (currently, that works fine) # but it's something to keep an eye on. test "$inst_prefix_dir" = "$destdir" && \ func_fatal_error "error: cannot install \`$file' to a directory not ending in $libdir" if test -n "$inst_prefix_dir"; then # Stick the inst_prefix_dir data into the link command. relink_command=`$ECHO "X$relink_command" | $Xsed -e "s%@inst_prefix_dir@%-inst-prefix-dir $inst_prefix_dir%"` else relink_command=`$ECHO "X$relink_command" | $Xsed -e "s%@inst_prefix_dir@%%"` fi func_warning "relinking \`$file'" func_show_eval "$relink_command" \ 'func_fatal_error "error: relink \`$file'\'' with the above command before installing it"' fi # See the names of the shared library. set dummy $library_names; shift if test -n "$1"; then realname="$1" shift srcname="$realname" test -n "$relink_command" && srcname="$realname"T # Install the shared library and build the symlinks. func_show_eval "$install_prog $dir/$srcname $destdir/$realname" \ 'exit $?' tstripme="$stripme" case $host_os in cygwin* | mingw* | pw32* | cegcc*) case $realname in *.dll.a) tstripme="" ;; esac ;; esac if test -n "$tstripme" && test -n "$striplib"; then func_show_eval "$striplib $destdir/$realname" 'exit $?' fi if test "$#" -gt 0; then # Delete the old symlinks, and create new ones. # Try `ln -sf' first, because the `ln' binary might depend on # the symlink we replace! Solaris /bin/ln does not understand -f, # so we also need to try rm && ln -s. for linkname do test "$linkname" != "$realname" \ && func_show_eval "(cd $destdir && { $LN_S -f $realname $linkname || { $RM $linkname && $LN_S $realname $linkname; }; })" done fi # Do each command in the postinstall commands. lib="$destdir/$realname" func_execute_cmds "$postinstall_cmds" 'exit $?' fi # Install the pseudo-library for information purposes. func_basename "$file" name="$func_basename_result" instname="$dir/$name"i func_show_eval "$install_prog $instname $destdir/$name" 'exit $?' # Maybe install the static library, too. test -n "$old_library" && staticlibs="$staticlibs $dir/$old_library" ;; *.lo) # Install (i.e. copy) a libtool object. # Figure out destination file name, if it wasn't already specified. if test -n "$destname"; then destfile="$destdir/$destname" else func_basename "$file" destfile="$func_basename_result" destfile="$destdir/$destfile" fi # Deduce the name of the destination old-style object file. case $destfile in *.lo) func_lo2o "$destfile" staticdest=$func_lo2o_result ;; *.$objext) staticdest="$destfile" destfile= ;; *) func_fatal_help "cannot copy a libtool object to \`$destfile'" ;; esac # Install the libtool object if requested. test -n "$destfile" && \ func_show_eval "$install_prog $file $destfile" 'exit $?' # Install the old object if enabled. if test "$build_old_libs" = yes; then # Deduce the name of the old-style object file. func_lo2o "$file" staticobj=$func_lo2o_result func_show_eval "$install_prog \$staticobj \$staticdest" 'exit $?' fi exit $EXIT_SUCCESS ;; *) # Figure out destination file name, if it wasn't already specified. if test -n "$destname"; then destfile="$destdir/$destname" else func_basename "$file" destfile="$func_basename_result" destfile="$destdir/$destfile" fi # If the file is missing, and there is a .exe on the end, strip it # because it is most likely a libtool script we actually want to # install stripped_ext="" case $file in *.exe) if test ! -f "$file"; then func_stripname '' '.exe' "$file" file=$func_stripname_result stripped_ext=".exe" fi ;; esac # Do a test to see if this is really a libtool program. case $host in *cygwin* | *mingw*) if func_ltwrapper_executable_p "$file"; then func_ltwrapper_scriptname "$file" wrapper=$func_ltwrapper_scriptname_result else func_stripname '' '.exe' "$file" wrapper=$func_stripname_result fi ;; *) wrapper=$file ;; esac if func_ltwrapper_script_p "$wrapper"; then notinst_deplibs= relink_command= func_source "$wrapper" # Check the variables that should have been set. test -z "$generated_by_libtool_version" && \ func_fatal_error "invalid libtool wrapper script \`$wrapper'" finalize=yes for lib in $notinst_deplibs; do # Check to see that each library is installed. libdir= if test -f "$lib"; then func_source "$lib" fi libfile="$libdir/"`$ECHO "X$lib" | $Xsed -e 's%^.*/%%g'` ### testsuite: skip nested quoting test if test -n "$libdir" && test ! -f "$libfile"; then func_warning "\`$lib' has not been installed in \`$libdir'" finalize=no fi done relink_command= func_source "$wrapper" outputname= if test "$fast_install" = no && test -n "$relink_command"; then $opt_dry_run || { if test "$finalize" = yes; then tmpdir=`func_mktempdir` func_basename "$file$stripped_ext" file="$func_basename_result" outputname="$tmpdir/$file" # Replace the output file specification. relink_command=`$ECHO "X$relink_command" | $Xsed -e 's%@OUTPUT@%'"$outputname"'%g'` $opt_silent || { func_quote_for_expand "$relink_command" eval "func_echo $func_quote_for_expand_result" } if eval "$relink_command"; then : else func_error "error: relink \`$file' with the above command before installing it" $opt_dry_run || ${RM}r "$tmpdir" continue fi file="$outputname" else func_warning "cannot relink \`$file'" fi } else # Install the binary that we compiled earlier. file=`$ECHO "X$file$stripped_ext" | $Xsed -e "s%\([^/]*\)$%$objdir/\1%"` fi fi # remove .exe since cygwin /usr/bin/install will append another # one anyway case $install_prog,$host in */usr/bin/install*,*cygwin*) case $file:$destfile in *.exe:*.exe) # this is ok ;; *.exe:*) destfile=$destfile.exe ;; *:*.exe) func_stripname '' '.exe' "$destfile" destfile=$func_stripname_result ;; esac ;; esac func_show_eval "$install_prog\$stripme \$file \$destfile" 'exit $?' $opt_dry_run || if test -n "$outputname"; then ${RM}r "$tmpdir" fi ;; esac done for file in $staticlibs; do func_basename "$file" name="$func_basename_result" # Set up the ranlib parameters. oldlib="$destdir/$name" func_show_eval "$install_prog \$file \$oldlib" 'exit $?' if test -n "$stripme" && test -n "$old_striplib"; then func_show_eval "$old_striplib $oldlib" 'exit $?' fi # Do each command in the postinstall commands. func_execute_cmds "$old_postinstall_cmds" 'exit $?' done test -n "$future_libdirs" && \ func_warning "remember to run \`$progname --finish$future_libdirs'" if test -n "$current_libdirs"; then # Maybe just do a dry run. $opt_dry_run && current_libdirs=" -n$current_libdirs" exec_cmd='$SHELL $progpath $preserve_args --finish$current_libdirs' else exit $EXIT_SUCCESS fi } test "$mode" = install && func_mode_install ${1+"$@"} # func_generate_dlsyms outputname originator pic_p # Extract symbols from dlprefiles and create ${outputname}S.o with # a dlpreopen symbol table. func_generate_dlsyms () { $opt_debug my_outputname="$1" my_originator="$2" my_pic_p="${3-no}" my_prefix=`$ECHO "$my_originator" | sed 's%[^a-zA-Z0-9]%_%g'` my_dlsyms= if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then if test -n "$NM" && test -n "$global_symbol_pipe"; then my_dlsyms="${my_outputname}S.c" else func_error "not configured to extract global symbols from dlpreopened files" fi fi if test -n "$my_dlsyms"; then case $my_dlsyms in "") ;; *.c) # Discover the nlist of each of the dlfiles. nlist="$output_objdir/${my_outputname}.nm" func_show_eval "$RM $nlist ${nlist}S ${nlist}T" # Parse the name list into a source file. func_verbose "creating $output_objdir/$my_dlsyms" $opt_dry_run || $ECHO > "$output_objdir/$my_dlsyms" "\ /* $my_dlsyms - symbol resolution table for \`$my_outputname' dlsym emulation. */ /* Generated by $PROGRAM (GNU $PACKAGE$TIMESTAMP) $VERSION */ #ifdef __cplusplus extern \"C\" { #endif /* External symbol declarations for the compiler. */\ " if test "$dlself" = yes; then func_verbose "generating symbol list for \`$output'" $opt_dry_run || echo ': @PROGRAM@ ' > "$nlist" # Add our own program objects to the symbol list. progfiles=`$ECHO "X$objs$old_deplibs" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP` for progfile in $progfiles; do func_verbose "extracting global C symbols from \`$progfile'" $opt_dry_run || eval "$NM $progfile | $global_symbol_pipe >> '$nlist'" done if test -n "$exclude_expsyms"; then $opt_dry_run || { eval '$EGREP -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T' eval '$MV "$nlist"T "$nlist"' } fi if test -n "$export_symbols_regex"; then $opt_dry_run || { eval '$EGREP -e "$export_symbols_regex" "$nlist" > "$nlist"T' eval '$MV "$nlist"T "$nlist"' } fi # Prepare the list of exported symbols if test -z "$export_symbols"; then export_symbols="$output_objdir/$outputname.exp" $opt_dry_run || { $RM $export_symbols eval "${SED} -n -e '/^: @PROGRAM@ $/d' -e 's/^.* \(.*\)$/\1/p' "'< "$nlist" > "$export_symbols"' case $host in *cygwin* | *mingw* | *cegcc* ) eval "echo EXPORTS "'> "$output_objdir/$outputname.def"' eval 'cat "$export_symbols" >> "$output_objdir/$outputname.def"' ;; esac } else $opt_dry_run || { eval "${SED} -e 's/\([].[*^$]\)/\\\\\1/g' -e 's/^/ /' -e 's/$/$/'"' < "$export_symbols" > "$output_objdir/$outputname.exp"' eval '$GREP -f "$output_objdir/$outputname.exp" < "$nlist" > "$nlist"T' eval '$MV "$nlist"T "$nlist"' case $host in *cygwin | *mingw* | *cegcc* ) eval "echo EXPORTS "'> "$output_objdir/$outputname.def"' eval 'cat "$nlist" >> "$output_objdir/$outputname.def"' ;; esac } fi fi for dlprefile in $dlprefiles; do func_verbose "extracting global C symbols from \`$dlprefile'" func_basename "$dlprefile" name="$func_basename_result" $opt_dry_run || { eval '$ECHO ": $name " >> "$nlist"' eval "$NM $dlprefile 2>/dev/null | $global_symbol_pipe >> '$nlist'" } done $opt_dry_run || { # Make sure we have at least an empty file. test -f "$nlist" || : > "$nlist" if test -n "$exclude_expsyms"; then $EGREP -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T $MV "$nlist"T "$nlist" fi # Try sorting and uniquifying the output. if $GREP -v "^: " < "$nlist" | if sort -k 3 /dev/null 2>&1; then sort -k 3 else sort +2 fi | uniq > "$nlist"S; then : else $GREP -v "^: " < "$nlist" > "$nlist"S fi if test -f "$nlist"S; then eval "$global_symbol_to_cdecl"' < "$nlist"S >> "$output_objdir/$my_dlsyms"' else $ECHO '/* NONE */' >> "$output_objdir/$my_dlsyms" fi $ECHO >> "$output_objdir/$my_dlsyms" "\ /* The mapping between symbol names and symbols. */ typedef struct { const char *name; void *address; } lt_dlsymlist; " case $host in *cygwin* | *mingw* | *cegcc* ) $ECHO >> "$output_objdir/$my_dlsyms" "\ /* DATA imports from DLLs on WIN32 con't be const, because runtime relocations are performed -- see ld's documentation on pseudo-relocs. */" lt_dlsym_const= ;; *osf5*) echo >> "$output_objdir/$my_dlsyms" "\ /* This system does not cope well with relocations in const data */" lt_dlsym_const= ;; *) lt_dlsym_const=const ;; esac $ECHO >> "$output_objdir/$my_dlsyms" "\ extern $lt_dlsym_const lt_dlsymlist lt_${my_prefix}_LTX_preloaded_symbols[]; $lt_dlsym_const lt_dlsymlist lt_${my_prefix}_LTX_preloaded_symbols[] = {\ { \"$my_originator\", (void *) 0 }," case $need_lib_prefix in no) eval "$global_symbol_to_c_name_address" < "$nlist" >> "$output_objdir/$my_dlsyms" ;; *) eval "$global_symbol_to_c_name_address_lib_prefix" < "$nlist" >> "$output_objdir/$my_dlsyms" ;; esac $ECHO >> "$output_objdir/$my_dlsyms" "\ {0, (void *) 0} }; /* This works around a problem in FreeBSD linker */ #ifdef FREEBSD_WORKAROUND static const void *lt_preloaded_setup() { return lt_${my_prefix}_LTX_preloaded_symbols; } #endif #ifdef __cplusplus } #endif\ " } # !$opt_dry_run pic_flag_for_symtable= case "$compile_command " in *" -static "*) ;; *) case $host in # compiling the symbol table file with pic_flag works around # a FreeBSD bug that causes programs to crash when -lm is # linked before any other PIC object. But we must not use # pic_flag when linking with -static. The problem exists in # FreeBSD 2.2.6 and is fixed in FreeBSD 3.1. *-*-freebsd2*|*-*-freebsd3.0*|*-*-freebsdelf3.0*) pic_flag_for_symtable=" $pic_flag -DFREEBSD_WORKAROUND" ;; *-*-hpux*) pic_flag_for_symtable=" $pic_flag" ;; *) if test "X$my_pic_p" != Xno; then pic_flag_for_symtable=" $pic_flag" fi ;; esac ;; esac symtab_cflags= for arg in $LTCFLAGS; do case $arg in -pie | -fpie | -fPIE) ;; *) symtab_cflags="$symtab_cflags $arg" ;; esac done # Now compile the dynamic symbol file. func_show_eval '(cd $output_objdir && $LTCC$symtab_cflags -c$no_builtin_flag$pic_flag_for_symtable "$my_dlsyms")' 'exit $?' # Clean up the generated files. func_show_eval '$RM "$output_objdir/$my_dlsyms" "$nlist" "${nlist}S" "${nlist}T"' # Transform the symbol file into the correct name. symfileobj="$output_objdir/${my_outputname}S.$objext" case $host in *cygwin* | *mingw* | *cegcc* ) if test -f "$output_objdir/$my_outputname.def"; then compile_command=`$ECHO "X$compile_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/$my_outputname.def $symfileobj%"` finalize_command=`$ECHO "X$finalize_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/$my_outputname.def $symfileobj%"` else compile_command=`$ECHO "X$compile_command" | $Xsed -e "s%@SYMFILE@%$symfileobj%"` finalize_command=`$ECHO "X$finalize_command" | $Xsed -e "s%@SYMFILE@%$symfileobj%"` fi ;; *) compile_command=`$ECHO "X$compile_command" | $Xsed -e "s%@SYMFILE@%$symfileobj%"` finalize_command=`$ECHO "X$finalize_command" | $Xsed -e "s%@SYMFILE@%$symfileobj%"` ;; esac ;; *) func_fatal_error "unknown suffix for \`$my_dlsyms'" ;; esac else # We keep going just in case the user didn't refer to # lt_preloaded_symbols. The linker will fail if global_symbol_pipe # really was required. # Nullify the symbol file. compile_command=`$ECHO "X$compile_command" | $Xsed -e "s% @SYMFILE@%%"` finalize_command=`$ECHO "X$finalize_command" | $Xsed -e "s% @SYMFILE@%%"` fi } # func_win32_libid arg # return the library type of file 'arg' # # Need a lot of goo to handle *both* DLLs and import libs # Has to be a shell function in order to 'eat' the argument # that is supplied when $file_magic_command is called. func_win32_libid () { $opt_debug win32_libid_type="unknown" win32_fileres=`file -L $1 2>/dev/null` case $win32_fileres in *ar\ archive\ import\ library*) # definitely import win32_libid_type="x86 archive import" ;; *ar\ archive*) # could be an import, or static if eval $OBJDUMP -f $1 | $SED -e '10q' 2>/dev/null | $EGREP 'file format pe-i386(.*architecture: i386)?' >/dev/null ; then win32_nmres=`eval $NM -f posix -A $1 | $SED -n -e ' 1,100{ / I /{ s,.*,import, p q } }'` case $win32_nmres in import*) win32_libid_type="x86 archive import";; *) win32_libid_type="x86 archive static";; esac fi ;; *DLL*) win32_libid_type="x86 DLL" ;; *executable*) # but shell scripts are "executable" too... case $win32_fileres in *MS\ Windows\ PE\ Intel*) win32_libid_type="x86 DLL" ;; esac ;; esac $ECHO "$win32_libid_type" } # func_extract_an_archive dir oldlib func_extract_an_archive () { $opt_debug f_ex_an_ar_dir="$1"; shift f_ex_an_ar_oldlib="$1" func_show_eval "(cd \$f_ex_an_ar_dir && $AR x \"\$f_ex_an_ar_oldlib\")" 'exit $?' if ($AR t "$f_ex_an_ar_oldlib" | sort | sort -uc >/dev/null 2>&1); then : else func_fatal_error "object name conflicts in archive: $f_ex_an_ar_dir/$f_ex_an_ar_oldlib" fi } # func_extract_archives gentop oldlib ... func_extract_archives () { $opt_debug my_gentop="$1"; shift my_oldlibs=${1+"$@"} my_oldobjs="" my_xlib="" my_xabs="" my_xdir="" for my_xlib in $my_oldlibs; do # Extract the objects. case $my_xlib in [\\/]* | [A-Za-z]:[\\/]*) my_xabs="$my_xlib" ;; *) my_xabs=`pwd`"/$my_xlib" ;; esac func_basename "$my_xlib" my_xlib="$func_basename_result" my_xlib_u=$my_xlib while :; do case " $extracted_archives " in *" $my_xlib_u "*) func_arith $extracted_serial + 1 extracted_serial=$func_arith_result my_xlib_u=lt$extracted_serial-$my_xlib ;; *) break ;; esac done extracted_archives="$extracted_archives $my_xlib_u" my_xdir="$my_gentop/$my_xlib_u" func_mkdir_p "$my_xdir" case $host in *-darwin*) func_verbose "Extracting $my_xabs" # Do not bother doing anything if just a dry run $opt_dry_run || { darwin_orig_dir=`pwd` cd $my_xdir || exit $? darwin_archive=$my_xabs darwin_curdir=`pwd` darwin_base_archive=`basename "$darwin_archive"` darwin_arches=`$LIPO -info "$darwin_archive" 2>/dev/null | $GREP Architectures 2>/dev/null || true` if test -n "$darwin_arches"; then darwin_arches=`$ECHO "$darwin_arches" | $SED -e 's/.*are://'` darwin_arch= func_verbose "$darwin_base_archive has multiple architectures $darwin_arches" for darwin_arch in $darwin_arches ; do func_mkdir_p "unfat-$$/${darwin_base_archive}-${darwin_arch}" $LIPO -thin $darwin_arch -output "unfat-$$/${darwin_base_archive}-${darwin_arch}/${darwin_base_archive}" "${darwin_archive}" cd "unfat-$$/${darwin_base_archive}-${darwin_arch}" func_extract_an_archive "`pwd`" "${darwin_base_archive}" cd "$darwin_curdir" $RM "unfat-$$/${darwin_base_archive}-${darwin_arch}/${darwin_base_archive}" done # $darwin_arches ## Okay now we've a bunch of thin objects, gotta fatten them up :) darwin_filelist=`find unfat-$$ -type f -name \*.o -print -o -name \*.lo -print | $SED -e "$basename" | sort -u` darwin_file= darwin_files= for darwin_file in $darwin_filelist; do darwin_files=`find unfat-$$ -name $darwin_file -print | $NL2SP` $LIPO -create -output "$darwin_file" $darwin_files done # $darwin_filelist $RM -rf unfat-$$ cd "$darwin_orig_dir" else cd $darwin_orig_dir func_extract_an_archive "$my_xdir" "$my_xabs" fi # $darwin_arches } # !$opt_dry_run ;; *) func_extract_an_archive "$my_xdir" "$my_xabs" ;; esac my_oldobjs="$my_oldobjs "`find $my_xdir -name \*.$objext -print -o -name \*.lo -print | $NL2SP` done func_extract_archives_result="$my_oldobjs" } # func_emit_wrapper_part1 [arg=no] # # Emit the first part of a libtool wrapper script on stdout. # For more information, see the description associated with # func_emit_wrapper(), below. func_emit_wrapper_part1 () { func_emit_wrapper_part1_arg1=no if test -n "$1" ; then func_emit_wrapper_part1_arg1=$1 fi $ECHO "\ #! $SHELL # $output - temporary wrapper script for $objdir/$outputname # Generated by $PROGRAM (GNU $PACKAGE$TIMESTAMP) $VERSION # # The $output program cannot be directly executed until all the libtool # libraries that it depends on are installed. # # This wrapper script should never be moved out of the build directory. # If it is, it will not operate correctly. # Sed substitution that helps us do robust quoting. It backslashifies # metacharacters that are still active within double-quoted strings. Xsed='${SED} -e 1s/^X//' sed_quote_subst='$sed_quote_subst' # Be Bourne compatible if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then emulate sh NULLCMD=: # Zsh 3.x and 4.x performs word splitting on \${1+\"\$@\"}, which # is contrary to our usage. Disable this feature. alias -g '\${1+\"\$@\"}'='\"\$@\"' setopt NO_GLOB_SUBST else case \`(set -o) 2>/dev/null\` in *posix*) set -o posix;; esac fi BIN_SH=xpg4; export BIN_SH # for Tru64 DUALCASE=1; export DUALCASE # for MKS sh # The HP-UX ksh and POSIX shell print the target directory to stdout # if CDPATH is set. (unset CDPATH) >/dev/null 2>&1 && unset CDPATH relink_command=\"$relink_command\" # This environment variable determines our operation mode. if test \"\$libtool_install_magic\" = \"$magic\"; then # install mode needs the following variables: generated_by_libtool_version='$macro_version' notinst_deplibs='$notinst_deplibs' else # When we are sourced in execute mode, \$file and \$ECHO are already set. if test \"\$libtool_execute_magic\" != \"$magic\"; then ECHO=\"$qecho\" file=\"\$0\" # Make sure echo works. if test \"X\$1\" = X--no-reexec; then # Discard the --no-reexec flag, and continue. shift elif test \"X\`{ \$ECHO '\t'; } 2>/dev/null\`\" = 'X\t'; then # Yippee, \$ECHO works! : else # Restart under the correct shell, and then maybe \$ECHO will work. exec $SHELL \"\$0\" --no-reexec \${1+\"\$@\"} fi fi\ " $ECHO "\ # Find the directory that this script lives in. thisdir=\`\$ECHO \"X\$file\" | \$Xsed -e 's%/[^/]*$%%'\` test \"x\$thisdir\" = \"x\$file\" && thisdir=. # Follow symbolic links until we get to the real thisdir. file=\`ls -ld \"\$file\" | ${SED} -n 's/.*-> //p'\` while test -n \"\$file\"; do destdir=\`\$ECHO \"X\$file\" | \$Xsed -e 's%/[^/]*\$%%'\` # If there was a directory component, then change thisdir. if test \"x\$destdir\" != \"x\$file\"; then case \"\$destdir\" in [\\\\/]* | [A-Za-z]:[\\\\/]*) thisdir=\"\$destdir\" ;; *) thisdir=\"\$thisdir/\$destdir\" ;; esac fi file=\`\$ECHO \"X\$file\" | \$Xsed -e 's%^.*/%%'\` file=\`ls -ld \"\$thisdir/\$file\" | ${SED} -n 's/.*-> //p'\` done " } # end: func_emit_wrapper_part1 # func_emit_wrapper_part2 [arg=no] # # Emit the second part of a libtool wrapper script on stdout. # For more information, see the description associated with # func_emit_wrapper(), below. func_emit_wrapper_part2 () { func_emit_wrapper_part2_arg1=no if test -n "$1" ; then func_emit_wrapper_part2_arg1=$1 fi $ECHO "\ # Usually 'no', except on cygwin/mingw when embedded into # the cwrapper. WRAPPER_SCRIPT_BELONGS_IN_OBJDIR=$func_emit_wrapper_part2_arg1 if test \"\$WRAPPER_SCRIPT_BELONGS_IN_OBJDIR\" = \"yes\"; then # special case for '.' if test \"\$thisdir\" = \".\"; then thisdir=\`pwd\` fi # remove .libs from thisdir case \"\$thisdir\" in *[\\\\/]$objdir ) thisdir=\`\$ECHO \"X\$thisdir\" | \$Xsed -e 's%[\\\\/][^\\\\/]*$%%'\` ;; $objdir ) thisdir=. ;; esac fi # Try to get the absolute directory name. absdir=\`cd \"\$thisdir\" && pwd\` test -n \"\$absdir\" && thisdir=\"\$absdir\" " if test "$fast_install" = yes; then $ECHO "\ program=lt-'$outputname'$exeext progdir=\"\$thisdir/$objdir\" if test ! -f \"\$progdir/\$program\" || { file=\`ls -1dt \"\$progdir/\$program\" \"\$progdir/../\$program\" 2>/dev/null | ${SED} 1q\`; \\ test \"X\$file\" != \"X\$progdir/\$program\"; }; then file=\"\$\$-\$program\" if test ! -d \"\$progdir\"; then $MKDIR \"\$progdir\" else $RM \"\$progdir/\$file\" fi" $ECHO "\ # relink executable if necessary if test -n \"\$relink_command\"; then if relink_command_output=\`eval \$relink_command 2>&1\`; then : else $ECHO \"\$relink_command_output\" >&2 $RM \"\$progdir/\$file\" exit 1 fi fi $MV \"\$progdir/\$file\" \"\$progdir/\$program\" 2>/dev/null || { $RM \"\$progdir/\$program\"; $MV \"\$progdir/\$file\" \"\$progdir/\$program\"; } $RM \"\$progdir/\$file\" fi" else $ECHO "\ program='$outputname' progdir=\"\$thisdir/$objdir\" " fi $ECHO "\ if test -f \"\$progdir/\$program\"; then" # Export our shlibpath_var if we have one. if test "$shlibpath_overrides_runpath" = yes && test -n "$shlibpath_var" && test -n "$temp_rpath"; then $ECHO "\ # Add our own library path to $shlibpath_var $shlibpath_var=\"$temp_rpath\$$shlibpath_var\" # Some systems cannot cope with colon-terminated $shlibpath_var # The second colon is a workaround for a bug in BeOS R4 sed $shlibpath_var=\`\$ECHO \"X\$$shlibpath_var\" | \$Xsed -e 's/::*\$//'\` export $shlibpath_var " fi # fixup the dll searchpath if we need to. if test -n "$dllsearchpath"; then $ECHO "\ # Add the dll search path components to the executable PATH PATH=$dllsearchpath:\$PATH " fi $ECHO "\ if test \"\$libtool_execute_magic\" != \"$magic\"; then # Run the actual program with our arguments. " case $host in # Backslashes separate directories on plain windows *-*-mingw | *-*-os2* | *-cegcc*) $ECHO "\ exec \"\$progdir\\\\\$program\" \${1+\"\$@\"} " ;; *) $ECHO "\ exec \"\$progdir/\$program\" \${1+\"\$@\"} " ;; esac $ECHO "\ \$ECHO \"\$0: cannot exec \$program \$*\" 1>&2 exit 1 fi else # The program doesn't exist. \$ECHO \"\$0: error: \\\`\$progdir/\$program' does not exist\" 1>&2 \$ECHO \"This script is just a wrapper for \$program.\" 1>&2 $ECHO \"See the $PACKAGE documentation for more information.\" 1>&2 exit 1 fi fi\ " } # end: func_emit_wrapper_part2 # func_emit_wrapper [arg=no] # # Emit a libtool wrapper script on stdout. # Don't directly open a file because we may want to # incorporate the script contents within a cygwin/mingw # wrapper executable. Must ONLY be called from within # func_mode_link because it depends on a number of variables # set therein. # # ARG is the value that the WRAPPER_SCRIPT_BELONGS_IN_OBJDIR # variable will take. If 'yes', then the emitted script # will assume that the directory in which it is stored is # the $objdir directory. This is a cygwin/mingw-specific # behavior. func_emit_wrapper () { func_emit_wrapper_arg1=no if test -n "$1" ; then func_emit_wrapper_arg1=$1 fi # split this up so that func_emit_cwrapperexe_src # can call each part independently. func_emit_wrapper_part1 "${func_emit_wrapper_arg1}" func_emit_wrapper_part2 "${func_emit_wrapper_arg1}" } # func_to_host_path arg # # Convert paths to host format when used with build tools. # Intended for use with "native" mingw (where libtool itself # is running under the msys shell), or in the following cross- # build environments: # $build $host # mingw (msys) mingw [e.g. native] # cygwin mingw # *nix + wine mingw # where wine is equipped with the `winepath' executable. # In the native mingw case, the (msys) shell automatically # converts paths for any non-msys applications it launches, # but that facility isn't available from inside the cwrapper. # Similar accommodations are necessary for $host mingw and # $build cygwin. Calling this function does no harm for other # $host/$build combinations not listed above. # # ARG is the path (on $build) that should be converted to # the proper representation for $host. The result is stored # in $func_to_host_path_result. func_to_host_path () { func_to_host_path_result="$1" if test -n "$1" ; then case $host in *mingw* ) lt_sed_naive_backslashify='s|\\\\*|\\|g;s|/|\\|g;s|\\|\\\\|g' case $build in *mingw* ) # actually, msys # awkward: cmd appends spaces to result lt_sed_strip_trailing_spaces="s/[ ]*\$//" func_to_host_path_tmp1=`( cmd //c echo "$1" |\ $SED -e "$lt_sed_strip_trailing_spaces" ) 2>/dev/null || echo ""` func_to_host_path_result=`echo "$func_to_host_path_tmp1" |\ $SED -e "$lt_sed_naive_backslashify"` ;; *cygwin* ) func_to_host_path_tmp1=`cygpath -w "$1"` func_to_host_path_result=`echo "$func_to_host_path_tmp1" |\ $SED -e "$lt_sed_naive_backslashify"` ;; * ) # Unfortunately, winepath does not exit with a non-zero # error code, so we are forced to check the contents of # stdout. On the other hand, if the command is not # found, the shell will set an exit code of 127 and print # *an error message* to stdout. So we must check for both # error code of zero AND non-empty stdout, which explains # the odd construction: func_to_host_path_tmp1=`winepath -w "$1" 2>/dev/null` if test "$?" -eq 0 && test -n "${func_to_host_path_tmp1}"; then func_to_host_path_result=`echo "$func_to_host_path_tmp1" |\ $SED -e "$lt_sed_naive_backslashify"` else # Allow warning below. func_to_host_path_result="" fi ;; esac if test -z "$func_to_host_path_result" ; then func_error "Could not determine host path corresponding to" func_error " '$1'" func_error "Continuing, but uninstalled executables may not work." # Fallback: func_to_host_path_result="$1" fi ;; esac fi } # end: func_to_host_path # func_to_host_pathlist arg # # Convert pathlists to host format when used with build tools. # See func_to_host_path(), above. This function supports the # following $build/$host combinations (but does no harm for # combinations not listed here): # $build $host # mingw (msys) mingw [e.g. native] # cygwin mingw # *nix + wine mingw # # Path separators are also converted from $build format to # $host format. If ARG begins or ends with a path separator # character, it is preserved (but converted to $host format) # on output. # # ARG is a pathlist (on $build) that should be converted to # the proper representation on $host. The result is stored # in $func_to_host_pathlist_result. func_to_host_pathlist () { func_to_host_pathlist_result="$1" if test -n "$1" ; then case $host in *mingw* ) lt_sed_naive_backslashify='s|\\\\*|\\|g;s|/|\\|g;s|\\|\\\\|g' # Remove leading and trailing path separator characters from # ARG. msys behavior is inconsistent here, cygpath turns them # into '.;' and ';.', and winepath ignores them completely. func_to_host_pathlist_tmp2="$1" # Once set for this call, this variable should not be # reassigned. It is used in tha fallback case. func_to_host_pathlist_tmp1=`echo "$func_to_host_pathlist_tmp2" |\ $SED -e 's|^:*||' -e 's|:*$||'` case $build in *mingw* ) # Actually, msys. # Awkward: cmd appends spaces to result. lt_sed_strip_trailing_spaces="s/[ ]*\$//" func_to_host_pathlist_tmp2=`( cmd //c echo "$func_to_host_pathlist_tmp1" |\ $SED -e "$lt_sed_strip_trailing_spaces" ) 2>/dev/null || echo ""` func_to_host_pathlist_result=`echo "$func_to_host_pathlist_tmp2" |\ $SED -e "$lt_sed_naive_backslashify"` ;; *cygwin* ) func_to_host_pathlist_tmp2=`cygpath -w -p "$func_to_host_pathlist_tmp1"` func_to_host_pathlist_result=`echo "$func_to_host_pathlist_tmp2" |\ $SED -e "$lt_sed_naive_backslashify"` ;; * ) # unfortunately, winepath doesn't convert pathlists func_to_host_pathlist_result="" func_to_host_pathlist_oldIFS=$IFS IFS=: for func_to_host_pathlist_f in $func_to_host_pathlist_tmp1 ; do IFS=$func_to_host_pathlist_oldIFS if test -n "$func_to_host_pathlist_f" ; then func_to_host_path "$func_to_host_pathlist_f" if test -n "$func_to_host_path_result" ; then if test -z "$func_to_host_pathlist_result" ; then func_to_host_pathlist_result="$func_to_host_path_result" else func_to_host_pathlist_result="$func_to_host_pathlist_result;$func_to_host_path_result" fi fi fi IFS=: done IFS=$func_to_host_pathlist_oldIFS ;; esac if test -z "$func_to_host_pathlist_result" ; then func_error "Could not determine the host path(s) corresponding to" func_error " '$1'" func_error "Continuing, but uninstalled executables may not work." # Fallback. This may break if $1 contains DOS-style drive # specifications. The fix is not to complicate the expression # below, but for the user to provide a working wine installation # with winepath so that path translation in the cross-to-mingw # case works properly. lt_replace_pathsep_nix_to_dos="s|:|;|g" func_to_host_pathlist_result=`echo "$func_to_host_pathlist_tmp1" |\ $SED -e "$lt_replace_pathsep_nix_to_dos"` fi # Now, add the leading and trailing path separators back case "$1" in :* ) func_to_host_pathlist_result=";$func_to_host_pathlist_result" ;; esac case "$1" in *: ) func_to_host_pathlist_result="$func_to_host_pathlist_result;" ;; esac ;; esac fi } # end: func_to_host_pathlist # func_emit_cwrapperexe_src # emit the source code for a wrapper executable on stdout # Must ONLY be called from within func_mode_link because # it depends on a number of variable set therein. func_emit_cwrapperexe_src () { cat < #include #ifdef _MSC_VER # include # include # include # define setmode _setmode #else # include # include # ifdef __CYGWIN__ # include # define HAVE_SETENV # ifdef __STRICT_ANSI__ char *realpath (const char *, char *); int putenv (char *); int setenv (const char *, const char *, int); # endif # endif #endif #include #include #include #include #include #include #include #include #if defined(PATH_MAX) # define LT_PATHMAX PATH_MAX #elif defined(MAXPATHLEN) # define LT_PATHMAX MAXPATHLEN #else # define LT_PATHMAX 1024 #endif #ifndef S_IXOTH # define S_IXOTH 0 #endif #ifndef S_IXGRP # define S_IXGRP 0 #endif #ifdef _MSC_VER # define S_IXUSR _S_IEXEC # define stat _stat # ifndef _INTPTR_T_DEFINED # define intptr_t int # endif #endif #ifndef DIR_SEPARATOR # define DIR_SEPARATOR '/' # define PATH_SEPARATOR ':' #endif #if defined (_WIN32) || defined (__MSDOS__) || defined (__DJGPP__) || \ defined (__OS2__) # define HAVE_DOS_BASED_FILE_SYSTEM # define FOPEN_WB "wb" # ifndef DIR_SEPARATOR_2 # define DIR_SEPARATOR_2 '\\' # endif # ifndef PATH_SEPARATOR_2 # define PATH_SEPARATOR_2 ';' # endif #endif #ifndef DIR_SEPARATOR_2 # define IS_DIR_SEPARATOR(ch) ((ch) == DIR_SEPARATOR) #else /* DIR_SEPARATOR_2 */ # define IS_DIR_SEPARATOR(ch) \ (((ch) == DIR_SEPARATOR) || ((ch) == DIR_SEPARATOR_2)) #endif /* DIR_SEPARATOR_2 */ #ifndef PATH_SEPARATOR_2 # define IS_PATH_SEPARATOR(ch) ((ch) == PATH_SEPARATOR) #else /* PATH_SEPARATOR_2 */ # define IS_PATH_SEPARATOR(ch) ((ch) == PATH_SEPARATOR_2) #endif /* PATH_SEPARATOR_2 */ #ifdef __CYGWIN__ # define FOPEN_WB "wb" #endif #ifndef FOPEN_WB # define FOPEN_WB "w" #endif #ifndef _O_BINARY # define _O_BINARY 0 #endif #define XMALLOC(type, num) ((type *) xmalloc ((num) * sizeof(type))) #define XFREE(stale) do { \ if (stale) { free ((void *) stale); stale = 0; } \ } while (0) #undef LTWRAPPER_DEBUGPRINTF #if defined DEBUGWRAPPER # define LTWRAPPER_DEBUGPRINTF(args) ltwrapper_debugprintf args static void ltwrapper_debugprintf (const char *fmt, ...) { va_list args; va_start (args, fmt); (void) vfprintf (stderr, fmt, args); va_end (args); } #else # define LTWRAPPER_DEBUGPRINTF(args) #endif const char *program_name = NULL; void *xmalloc (size_t num); char *xstrdup (const char *string); const char *base_name (const char *name); char *find_executable (const char *wrapper); char *chase_symlinks (const char *pathspec); int make_executable (const char *path); int check_executable (const char *path); char *strendzap (char *str, const char *pat); void lt_fatal (const char *message, ...); void lt_setenv (const char *name, const char *value); char *lt_extend_str (const char *orig_value, const char *add, int to_end); void lt_opt_process_env_set (const char *arg); void lt_opt_process_env_prepend (const char *arg); void lt_opt_process_env_append (const char *arg); int lt_split_name_value (const char *arg, char** name, char** value); void lt_update_exe_path (const char *name, const char *value); void lt_update_lib_path (const char *name, const char *value); static const char *script_text_part1 = EOF func_emit_wrapper_part1 yes | $SED -e 's/\([\\"]\)/\\\1/g' \ -e 's/^/ "/' -e 's/$/\\n"/' echo ";" cat <"))); for (i = 0; i < newargc; i++) { LTWRAPPER_DEBUGPRINTF (("(main) newargz[%d] : %s\n", i, (newargz[i] ? newargz[i] : ""))); } EOF case $host_os in mingw*) cat <<"EOF" /* execv doesn't actually work on mingw as expected on unix */ rval = _spawnv (_P_WAIT, lt_argv_zero, (const char * const *) newargz); if (rval == -1) { /* failed to start process */ LTWRAPPER_DEBUGPRINTF (("(main) failed to launch target \"%s\": errno = %d\n", lt_argv_zero, errno)); return 127; } return rval; EOF ;; *) cat <<"EOF" execv (lt_argv_zero, newargz); return rval; /* =127, but avoids unused variable warning */ EOF ;; esac cat <<"EOF" } void * xmalloc (size_t num) { void *p = (void *) malloc (num); if (!p) lt_fatal ("Memory exhausted"); return p; } char * xstrdup (const char *string) { return string ? strcpy ((char *) xmalloc (strlen (string) + 1), string) : NULL; } const char * base_name (const char *name) { const char *base; #if defined (HAVE_DOS_BASED_FILE_SYSTEM) /* Skip over the disk name in MSDOS pathnames. */ if (isalpha ((unsigned char) name[0]) && name[1] == ':') name += 2; #endif for (base = name; *name; name++) if (IS_DIR_SEPARATOR (*name)) base = name + 1; return base; } int check_executable (const char *path) { struct stat st; LTWRAPPER_DEBUGPRINTF (("(check_executable) : %s\n", path ? (*path ? path : "EMPTY!") : "NULL!")); if ((!path) || (!*path)) return 0; if ((stat (path, &st) >= 0) && (st.st_mode & (S_IXUSR | S_IXGRP | S_IXOTH))) return 1; else return 0; } int make_executable (const char *path) { int rval = 0; struct stat st; LTWRAPPER_DEBUGPRINTF (("(make_executable) : %s\n", path ? (*path ? path : "EMPTY!") : "NULL!")); if ((!path) || (!*path)) return 0; if (stat (path, &st) >= 0) { rval = chmod (path, st.st_mode | S_IXOTH | S_IXGRP | S_IXUSR); } return rval; } /* Searches for the full path of the wrapper. Returns newly allocated full path name if found, NULL otherwise Does not chase symlinks, even on platforms that support them. */ char * find_executable (const char *wrapper) { int has_slash = 0; const char *p; const char *p_next; /* static buffer for getcwd */ char tmp[LT_PATHMAX + 1]; int tmp_len; char *concat_name; LTWRAPPER_DEBUGPRINTF (("(find_executable) : %s\n", wrapper ? (*wrapper ? wrapper : "EMPTY!") : "NULL!")); if ((wrapper == NULL) || (*wrapper == '\0')) return NULL; /* Absolute path? */ #if defined (HAVE_DOS_BASED_FILE_SYSTEM) if (isalpha ((unsigned char) wrapper[0]) && wrapper[1] == ':') { concat_name = xstrdup (wrapper); if (check_executable (concat_name)) return concat_name; XFREE (concat_name); } else { #endif if (IS_DIR_SEPARATOR (wrapper[0])) { concat_name = xstrdup (wrapper); if (check_executable (concat_name)) return concat_name; XFREE (concat_name); } #if defined (HAVE_DOS_BASED_FILE_SYSTEM) } #endif for (p = wrapper; *p; p++) if (*p == '/') { has_slash = 1; break; } if (!has_slash) { /* no slashes; search PATH */ const char *path = getenv ("PATH"); if (path != NULL) { for (p = path; *p; p = p_next) { const char *q; size_t p_len; for (q = p; *q; q++) if (IS_PATH_SEPARATOR (*q)) break; p_len = q - p; p_next = (*q == '\0' ? q : q + 1); if (p_len == 0) { /* empty path: current directory */ if (getcwd (tmp, LT_PATHMAX) == NULL) lt_fatal ("getcwd failed"); tmp_len = strlen (tmp); concat_name = XMALLOC (char, tmp_len + 1 + strlen (wrapper) + 1); memcpy (concat_name, tmp, tmp_len); concat_name[tmp_len] = '/'; strcpy (concat_name + tmp_len + 1, wrapper); } else { concat_name = XMALLOC (char, p_len + 1 + strlen (wrapper) + 1); memcpy (concat_name, p, p_len); concat_name[p_len] = '/'; strcpy (concat_name + p_len + 1, wrapper); } if (check_executable (concat_name)) return concat_name; XFREE (concat_name); } } /* not found in PATH; assume curdir */ } /* Relative path | not found in path: prepend cwd */ if (getcwd (tmp, LT_PATHMAX) == NULL) lt_fatal ("getcwd failed"); tmp_len = strlen (tmp); concat_name = XMALLOC (char, tmp_len + 1 + strlen (wrapper) + 1); memcpy (concat_name, tmp, tmp_len); concat_name[tmp_len] = '/'; strcpy (concat_name + tmp_len + 1, wrapper); if (check_executable (concat_name)) return concat_name; XFREE (concat_name); return NULL; } char * chase_symlinks (const char *pathspec) { #ifndef S_ISLNK return xstrdup (pathspec); #else char buf[LT_PATHMAX]; struct stat s; char *tmp_pathspec = xstrdup (pathspec); char *p; int has_symlinks = 0; while (strlen (tmp_pathspec) && !has_symlinks) { LTWRAPPER_DEBUGPRINTF (("checking path component for symlinks: %s\n", tmp_pathspec)); if (lstat (tmp_pathspec, &s) == 0) { if (S_ISLNK (s.st_mode) != 0) { has_symlinks = 1; break; } /* search backwards for last DIR_SEPARATOR */ p = tmp_pathspec + strlen (tmp_pathspec) - 1; while ((p > tmp_pathspec) && (!IS_DIR_SEPARATOR (*p))) p--; if ((p == tmp_pathspec) && (!IS_DIR_SEPARATOR (*p))) { /* no more DIR_SEPARATORS left */ break; } *p = '\0'; } else { char *errstr = strerror (errno); lt_fatal ("Error accessing file %s (%s)", tmp_pathspec, errstr); } } XFREE (tmp_pathspec); if (!has_symlinks) { return xstrdup (pathspec); } tmp_pathspec = realpath (pathspec, buf); if (tmp_pathspec == 0) { lt_fatal ("Could not follow symlinks for %s", pathspec); } return xstrdup (tmp_pathspec); #endif } char * strendzap (char *str, const char *pat) { size_t len, patlen; assert (str != NULL); assert (pat != NULL); len = strlen (str); patlen = strlen (pat); if (patlen <= len) { str += len - patlen; if (strcmp (str, pat) == 0) *str = '\0'; } return str; } static void lt_error_core (int exit_status, const char *mode, const char *message, va_list ap) { fprintf (stderr, "%s: %s: ", program_name, mode); vfprintf (stderr, message, ap); fprintf (stderr, ".\n"); if (exit_status >= 0) exit (exit_status); } void lt_fatal (const char *message, ...) { va_list ap; va_start (ap, message); lt_error_core (EXIT_FAILURE, "FATAL", message, ap); va_end (ap); } void lt_setenv (const char *name, const char *value) { LTWRAPPER_DEBUGPRINTF (("(lt_setenv) setting '%s' to '%s'\n", (name ? name : ""), (value ? value : ""))); { #ifdef HAVE_SETENV /* always make a copy, for consistency with !HAVE_SETENV */ char *str = xstrdup (value); setenv (name, str, 1); #else int len = strlen (name) + 1 + strlen (value) + 1; char *str = XMALLOC (char, len); sprintf (str, "%s=%s", name, value); if (putenv (str) != EXIT_SUCCESS) { XFREE (str); } #endif } } char * lt_extend_str (const char *orig_value, const char *add, int to_end) { char *new_value; if (orig_value && *orig_value) { int orig_value_len = strlen (orig_value); int add_len = strlen (add); new_value = XMALLOC (char, add_len + orig_value_len + 1); if (to_end) { strcpy (new_value, orig_value); strcpy (new_value + orig_value_len, add); } else { strcpy (new_value, add); strcpy (new_value + add_len, orig_value); } } else { new_value = xstrdup (add); } return new_value; } int lt_split_name_value (const char *arg, char** name, char** value) { const char *p; int len; if (!arg || !*arg) return 1; p = strchr (arg, (int)'='); if (!p) return 1; *value = xstrdup (++p); len = strlen (arg) - strlen (*value); *name = XMALLOC (char, len); strncpy (*name, arg, len-1); (*name)[len - 1] = '\0'; return 0; } void lt_opt_process_env_set (const char *arg) { char *name = NULL; char *value = NULL; if (lt_split_name_value (arg, &name, &value) != 0) { XFREE (name); XFREE (value); lt_fatal ("bad argument for %s: '%s'", env_set_opt, arg); } lt_setenv (name, value); XFREE (name); XFREE (value); } void lt_opt_process_env_prepend (const char *arg) { char *name = NULL; char *value = NULL; char *new_value = NULL; if (lt_split_name_value (arg, &name, &value) != 0) { XFREE (name); XFREE (value); lt_fatal ("bad argument for %s: '%s'", env_prepend_opt, arg); } new_value = lt_extend_str (getenv (name), value, 0); lt_setenv (name, new_value); XFREE (new_value); XFREE (name); XFREE (value); } void lt_opt_process_env_append (const char *arg) { char *name = NULL; char *value = NULL; char *new_value = NULL; if (lt_split_name_value (arg, &name, &value) != 0) { XFREE (name); XFREE (value); lt_fatal ("bad argument for %s: '%s'", env_append_opt, arg); } new_value = lt_extend_str (getenv (name), value, 1); lt_setenv (name, new_value); XFREE (new_value); XFREE (name); XFREE (value); } void lt_update_exe_path (const char *name, const char *value) { LTWRAPPER_DEBUGPRINTF (("(lt_update_exe_path) modifying '%s' by prepending '%s'\n", (name ? name : ""), (value ? value : ""))); if (name && *name && value && *value) { char *new_value = lt_extend_str (getenv (name), value, 0); /* some systems can't cope with a ':'-terminated path #' */ int len = strlen (new_value); while (((len = strlen (new_value)) > 0) && IS_PATH_SEPARATOR (new_value[len-1])) { new_value[len-1] = '\0'; } lt_setenv (name, new_value); XFREE (new_value); } } void lt_update_lib_path (const char *name, const char *value) { LTWRAPPER_DEBUGPRINTF (("(lt_update_lib_path) modifying '%s' by prepending '%s'\n", (name ? name : ""), (value ? value : ""))); if (name && *name && value && *value) { char *new_value = lt_extend_str (getenv (name), value, 0); lt_setenv (name, new_value); XFREE (new_value); } } EOF } # end: func_emit_cwrapperexe_src # func_mode_link arg... func_mode_link () { $opt_debug case $host in *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-cegcc*) # It is impossible to link a dll without this setting, and # we shouldn't force the makefile maintainer to figure out # which system we are compiling for in order to pass an extra # flag for every libtool invocation. # allow_undefined=no # FIXME: Unfortunately, there are problems with the above when trying # to make a dll which has undefined symbols, in which case not # even a static library is built. For now, we need to specify # -no-undefined on the libtool link line when we can be certain # that all symbols are satisfied, otherwise we get a static library. allow_undefined=yes ;; *) allow_undefined=yes ;; esac libtool_args=$nonopt base_compile="$nonopt $@" compile_command=$nonopt finalize_command=$nonopt compile_rpath= finalize_rpath= compile_shlibpath= finalize_shlibpath= convenience= old_convenience= deplibs= old_deplibs= compiler_flags= linker_flags= dllsearchpath= lib_search_path=`pwd` inst_prefix_dir= new_inherited_linker_flags= avoid_version=no dlfiles= dlprefiles= dlself=no export_dynamic=no export_symbols= export_symbols_regex= generated= libobjs= ltlibs= module=no no_install=no objs= non_pic_objects= precious_files_regex= prefer_static_libs=no preload=no prev= prevarg= release= rpath= xrpath= perm_rpath= temp_rpath= thread_safe=no vinfo= vinfo_number=no weak_libs= single_module="${wl}-single_module" func_infer_tag $base_compile # We need to know -static, to get the right output filenames. for arg do case $arg in -shared) test "$build_libtool_libs" != yes && \ func_fatal_configuration "can not build a shared library" build_old_libs=no break ;; -all-static | -static | -static-libtool-libs) case $arg in -all-static) if test "$build_libtool_libs" = yes && test -z "$link_static_flag"; then func_warning "complete static linking is impossible in this configuration" fi if test -n "$link_static_flag"; then dlopen_self=$dlopen_self_static fi prefer_static_libs=yes ;; -static) if test -z "$pic_flag" && test -n "$link_static_flag"; then dlopen_self=$dlopen_self_static fi prefer_static_libs=built ;; -static-libtool-libs) if test -z "$pic_flag" && test -n "$link_static_flag"; then dlopen_self=$dlopen_self_static fi prefer_static_libs=yes ;; esac build_libtool_libs=no build_old_libs=yes break ;; esac done # See if our shared archives depend on static archives. test -n "$old_archive_from_new_cmds" && build_old_libs=yes # Go through the arguments, transforming them on the way. while test "$#" -gt 0; do arg="$1" shift func_quote_for_eval "$arg" qarg=$func_quote_for_eval_unquoted_result func_append libtool_args " $func_quote_for_eval_result" # If the previous option needs an argument, assign it. if test -n "$prev"; then case $prev in output) func_append compile_command " @OUTPUT@" func_append finalize_command " @OUTPUT@" ;; esac case $prev in dlfiles|dlprefiles) if test "$preload" = no; then # Add the symbol object into the linking commands. func_append compile_command " @SYMFILE@" func_append finalize_command " @SYMFILE@" preload=yes fi case $arg in *.la | *.lo) ;; # We handle these cases below. force) if test "$dlself" = no; then dlself=needless export_dynamic=yes fi prev= continue ;; self) if test "$prev" = dlprefiles; then dlself=yes elif test "$prev" = dlfiles && test "$dlopen_self" != yes; then dlself=yes else dlself=needless export_dynamic=yes fi prev= continue ;; *) if test "$prev" = dlfiles; then dlfiles="$dlfiles $arg" else dlprefiles="$dlprefiles $arg" fi prev= continue ;; esac ;; expsyms) export_symbols="$arg" test -f "$arg" \ || func_fatal_error "symbol file \`$arg' does not exist" prev= continue ;; expsyms_regex) export_symbols_regex="$arg" prev= continue ;; framework) case $host in *-*-darwin*) case "$deplibs " in *" $qarg.ltframework "*) ;; *) deplibs="$deplibs $qarg.ltframework" # this is fixed later ;; esac ;; esac prev= continue ;; inst_prefix) inst_prefix_dir="$arg" prev= continue ;; objectlist) if test -f "$arg"; then save_arg=$arg moreargs= for fil in `cat "$save_arg"` do # moreargs="$moreargs $fil" arg=$fil # A libtool-controlled object. # Check to see that this really is a libtool object. if func_lalib_unsafe_p "$arg"; then pic_object= non_pic_object= # Read the .lo file func_source "$arg" if test -z "$pic_object" || test -z "$non_pic_object" || test "$pic_object" = none && test "$non_pic_object" = none; then func_fatal_error "cannot find name of object for \`$arg'" fi # Extract subdirectory from the argument. func_dirname "$arg" "/" "" xdir="$func_dirname_result" if test "$pic_object" != none; then # Prepend the subdirectory the object is found in. pic_object="$xdir$pic_object" if test "$prev" = dlfiles; then if test "$build_libtool_libs" = yes && test "$dlopen_support" = yes; then dlfiles="$dlfiles $pic_object" prev= continue else # If libtool objects are unsupported, then we need to preload. prev=dlprefiles fi fi # CHECK ME: I think I busted this. -Ossama if test "$prev" = dlprefiles; then # Preload the old-style object. dlprefiles="$dlprefiles $pic_object" prev= fi # A PIC object. func_append libobjs " $pic_object" arg="$pic_object" fi # Non-PIC object. if test "$non_pic_object" != none; then # Prepend the subdirectory the object is found in. non_pic_object="$xdir$non_pic_object" # A standard non-PIC object func_append non_pic_objects " $non_pic_object" if test -z "$pic_object" || test "$pic_object" = none ; then arg="$non_pic_object" fi else # If the PIC object exists, use it instead. # $xdir was prepended to $pic_object above. non_pic_object="$pic_object" func_append non_pic_objects " $non_pic_object" fi else # Only an error if not doing a dry-run. if $opt_dry_run; then # Extract subdirectory from the argument. func_dirname "$arg" "/" "" xdir="$func_dirname_result" func_lo2o "$arg" pic_object=$xdir$objdir/$func_lo2o_result non_pic_object=$xdir$func_lo2o_result func_append libobjs " $pic_object" func_append non_pic_objects " $non_pic_object" else func_fatal_error "\`$arg' is not a valid libtool object" fi fi done else func_fatal_error "link input file \`$arg' does not exist" fi arg=$save_arg prev= continue ;; precious_regex) precious_files_regex="$arg" prev= continue ;; release) release="-$arg" prev= continue ;; rpath | xrpath) # We need an absolute path. case $arg in [\\/]* | [A-Za-z]:[\\/]*) ;; *) func_fatal_error "only absolute run-paths are allowed" ;; esac if test "$prev" = rpath; then case "$rpath " in *" $arg "*) ;; *) rpath="$rpath $arg" ;; esac else case "$xrpath " in *" $arg "*) ;; *) xrpath="$xrpath $arg" ;; esac fi prev= continue ;; shrext) shrext_cmds="$arg" prev= continue ;; weak) weak_libs="$weak_libs $arg" prev= continue ;; xcclinker) linker_flags="$linker_flags $qarg" compiler_flags="$compiler_flags $qarg" prev= func_append compile_command " $qarg" func_append finalize_command " $qarg" continue ;; xcompiler) compiler_flags="$compiler_flags $qarg" prev= func_append compile_command " $qarg" func_append finalize_command " $qarg" continue ;; xlinker) linker_flags="$linker_flags $qarg" compiler_flags="$compiler_flags $wl$qarg" prev= func_append compile_command " $wl$qarg" func_append finalize_command " $wl$qarg" continue ;; *) eval "$prev=\"\$arg\"" prev= continue ;; esac fi # test -n "$prev" prevarg="$arg" case $arg in -all-static) if test -n "$link_static_flag"; then # See comment for -static flag below, for more details. func_append compile_command " $link_static_flag" func_append finalize_command " $link_static_flag" fi continue ;; -allow-undefined) # FIXME: remove this flag sometime in the future. func_fatal_error "\`-allow-undefined' must not be used because it is the default" ;; -avoid-version) avoid_version=yes continue ;; -dlopen) prev=dlfiles continue ;; -dlpreopen) prev=dlprefiles continue ;; -export-dynamic) export_dynamic=yes continue ;; -export-symbols | -export-symbols-regex) if test -n "$export_symbols" || test -n "$export_symbols_regex"; then func_fatal_error "more than one -exported-symbols argument is not allowed" fi if test "X$arg" = "X-export-symbols"; then prev=expsyms else prev=expsyms_regex fi continue ;; -framework) prev=framework continue ;; -inst-prefix-dir) prev=inst_prefix continue ;; # The native IRIX linker understands -LANG:*, -LIST:* and -LNO:* # so, if we see these flags be careful not to treat them like -L -L[A-Z][A-Z]*:*) case $with_gcc/$host in no/*-*-irix* | /*-*-irix*) func_append compile_command " $arg" func_append finalize_command " $arg" ;; esac continue ;; -L*) func_stripname '-L' '' "$arg" dir=$func_stripname_result if test -z "$dir"; then if test "$#" -gt 0; then func_fatal_error "require no space between \`-L' and \`$1'" else func_fatal_error "need path for \`-L' option" fi fi # We need an absolute path. case $dir in [\\/]* | [A-Za-z]:[\\/]*) ;; *) absdir=`cd "$dir" && pwd` test -z "$absdir" && \ func_fatal_error "cannot determine absolute directory name of \`$dir'" dir="$absdir" ;; esac case "$deplibs " in *" -L$dir "*) ;; *) deplibs="$deplibs -L$dir" lib_search_path="$lib_search_path $dir" ;; esac case $host in *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-cegcc*) testbindir=`$ECHO "X$dir" | $Xsed -e 's*/lib$*/bin*'` case :$dllsearchpath: in *":$dir:"*) ;; ::) dllsearchpath=$dir;; *) dllsearchpath="$dllsearchpath:$dir";; esac case :$dllsearchpath: in *":$testbindir:"*) ;; ::) dllsearchpath=$testbindir;; *) dllsearchpath="$dllsearchpath:$testbindir";; esac ;; esac continue ;; -l*) if test "X$arg" = "X-lc" || test "X$arg" = "X-lm"; then case $host in *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-beos* | *-cegcc*) # These systems don't actually have a C or math library (as such) continue ;; *-*-os2*) # These systems don't actually have a C library (as such) test "X$arg" = "X-lc" && continue ;; *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*) # Do not include libc due to us having libc/libc_r. test "X$arg" = "X-lc" && continue ;; *-*-rhapsody* | *-*-darwin1.[012]) # Rhapsody C and math libraries are in the System framework deplibs="$deplibs System.ltframework" continue ;; *-*-sco3.2v5* | *-*-sco5v6*) # Causes problems with __ctype test "X$arg" = "X-lc" && continue ;; *-*-sysv4.2uw2* | *-*-sysv5* | *-*-unixware* | *-*-OpenUNIX*) # Compiler inserts libc in the correct place for threads to work test "X$arg" = "X-lc" && continue ;; esac elif test "X$arg" = "X-lc_r"; then case $host in *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*) # Do not include libc_r directly, use -pthread flag. continue ;; esac fi deplibs="$deplibs $arg" continue ;; -module) module=yes continue ;; # Tru64 UNIX uses -model [arg] to determine the layout of C++ # classes, name mangling, and exception handling. # Darwin uses the -arch flag to determine output architecture. -model|-arch|-isysroot) compiler_flags="$compiler_flags $arg" func_append compile_command " $arg" func_append finalize_command " $arg" prev=xcompiler continue ;; -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe|-threads) compiler_flags="$compiler_flags $arg" func_append compile_command " $arg" func_append finalize_command " $arg" case "$new_inherited_linker_flags " in *" $arg "*) ;; * ) new_inherited_linker_flags="$new_inherited_linker_flags $arg" ;; esac continue ;; -multi_module) single_module="${wl}-multi_module" continue ;; -no-fast-install) fast_install=no continue ;; -no-install) case $host in *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-*-darwin* | *-cegcc*) # The PATH hackery in wrapper scripts is required on Windows # and Darwin in order for the loader to find any dlls it needs. func_warning "\`-no-install' is ignored for $host" func_warning "assuming \`-no-fast-install' instead" fast_install=no ;; *) no_install=yes ;; esac continue ;; -no-undefined) allow_undefined=no continue ;; -objectlist) prev=objectlist continue ;; -o) prev=output ;; -precious-files-regex) prev=precious_regex continue ;; -release) prev=release continue ;; -rpath) prev=rpath continue ;; -R) prev=xrpath continue ;; -R*) func_stripname '-R' '' "$arg" dir=$func_stripname_result # We need an absolute path. case $dir in [\\/]* | [A-Za-z]:[\\/]*) ;; *) func_fatal_error "only absolute run-paths are allowed" ;; esac case "$xrpath " in *" $dir "*) ;; *) xrpath="$xrpath $dir" ;; esac continue ;; -shared) # The effects of -shared are defined in a previous loop. continue ;; -shrext) prev=shrext continue ;; -static | -static-libtool-libs) # The effects of -static are defined in a previous loop. # We used to do the same as -all-static on platforms that # didn't have a PIC flag, but the assumption that the effects # would be equivalent was wrong. It would break on at least # Digital Unix and AIX. continue ;; -thread-safe) thread_safe=yes continue ;; -version-info) prev=vinfo continue ;; -version-number) prev=vinfo vinfo_number=yes continue ;; -weak) prev=weak continue ;; -Wc,*) func_stripname '-Wc,' '' "$arg" args=$func_stripname_result arg= save_ifs="$IFS"; IFS=',' for flag in $args; do IFS="$save_ifs" func_quote_for_eval "$flag" arg="$arg $wl$func_quote_for_eval_result" compiler_flags="$compiler_flags $func_quote_for_eval_result" done IFS="$save_ifs" func_stripname ' ' '' "$arg" arg=$func_stripname_result ;; -Wl,*) func_stripname '-Wl,' '' "$arg" args=$func_stripname_result arg= save_ifs="$IFS"; IFS=',' for flag in $args; do IFS="$save_ifs" func_quote_for_eval "$flag" arg="$arg $wl$func_quote_for_eval_result" compiler_flags="$compiler_flags $wl$func_quote_for_eval_result" linker_flags="$linker_flags $func_quote_for_eval_result" done IFS="$save_ifs" func_stripname ' ' '' "$arg" arg=$func_stripname_result ;; -Xcompiler) prev=xcompiler continue ;; -Xlinker) prev=xlinker continue ;; -XCClinker) prev=xcclinker continue ;; # -msg_* for osf cc -msg_*) func_quote_for_eval "$arg" arg="$func_quote_for_eval_result" ;; # -64, -mips[0-9] enable 64-bit mode on the SGI compiler # -r[0-9][0-9]* specifies the processor on the SGI compiler # -xarch=*, -xtarget=* enable 64-bit mode on the Sun compiler # +DA*, +DD* enable 64-bit mode on the HP compiler # -q* pass through compiler args for the IBM compiler # -m*, -t[45]*, -txscale* pass through architecture-specific # compiler args for GCC # -F/path gives path to uninstalled frameworks, gcc on darwin # -p, -pg, --coverage, -fprofile-* pass through profiling flag for GCC # @file GCC response files -64|-mips[0-9]|-r[0-9][0-9]*|-xarch=*|-xtarget=*|+DA*|+DD*|-q*|-m*| \ -t[45]*|-txscale*|-p|-pg|--coverage|-fprofile-*|-F*|@*) func_quote_for_eval "$arg" arg="$func_quote_for_eval_result" func_append compile_command " $arg" func_append finalize_command " $arg" compiler_flags="$compiler_flags $arg" continue ;; # Some other compiler flag. -* | +*) func_quote_for_eval "$arg" arg="$func_quote_for_eval_result" ;; *.$objext) # A standard object. objs="$objs $arg" ;; *.lo) # A libtool-controlled object. # Check to see that this really is a libtool object. if func_lalib_unsafe_p "$arg"; then pic_object= non_pic_object= # Read the .lo file func_source "$arg" if test -z "$pic_object" || test -z "$non_pic_object" || test "$pic_object" = none && test "$non_pic_object" = none; then func_fatal_error "cannot find name of object for \`$arg'" fi # Extract subdirectory from the argument. func_dirname "$arg" "/" "" xdir="$func_dirname_result" if test "$pic_object" != none; then # Prepend the subdirectory the object is found in. pic_object="$xdir$pic_object" if test "$prev" = dlfiles; then if test "$build_libtool_libs" = yes && test "$dlopen_support" = yes; then dlfiles="$dlfiles $pic_object" prev= continue else # If libtool objects are unsupported, then we need to preload. prev=dlprefiles fi fi # CHECK ME: I think I busted this. -Ossama if test "$prev" = dlprefiles; then # Preload the old-style object. dlprefiles="$dlprefiles $pic_object" prev= fi # A PIC object. func_append libobjs " $pic_object" arg="$pic_object" fi # Non-PIC object. if test "$non_pic_object" != none; then # Prepend the subdirectory the object is found in. non_pic_object="$xdir$non_pic_object" # A standard non-PIC object func_append non_pic_objects " $non_pic_object" if test -z "$pic_object" || test "$pic_object" = none ; then arg="$non_pic_object" fi else # If the PIC object exists, use it instead. # $xdir was prepended to $pic_object above. non_pic_object="$pic_object" func_append non_pic_objects " $non_pic_object" fi else # Only an error if not doing a dry-run. if $opt_dry_run; then # Extract subdirectory from the argument. func_dirname "$arg" "/" "" xdir="$func_dirname_result" func_lo2o "$arg" pic_object=$xdir$objdir/$func_lo2o_result non_pic_object=$xdir$func_lo2o_result func_append libobjs " $pic_object" func_append non_pic_objects " $non_pic_object" else func_fatal_error "\`$arg' is not a valid libtool object" fi fi ;; *.$libext) # An archive. deplibs="$deplibs $arg" old_deplibs="$old_deplibs $arg" continue ;; *.la) # A libtool-controlled library. if test "$prev" = dlfiles; then # This library was specified with -dlopen. dlfiles="$dlfiles $arg" prev= elif test "$prev" = dlprefiles; then # The library was specified with -dlpreopen. dlprefiles="$dlprefiles $arg" prev= else deplibs="$deplibs $arg" fi continue ;; # Some other compiler argument. *) # Unknown arguments in both finalize_command and compile_command need # to be aesthetically quoted because they are evaled later. func_quote_for_eval "$arg" arg="$func_quote_for_eval_result" ;; esac # arg # Now actually substitute the argument into the commands. if test -n "$arg"; then func_append compile_command " $arg" func_append finalize_command " $arg" fi done # argument parsing loop test -n "$prev" && \ func_fatal_help "the \`$prevarg' option requires an argument" if test "$export_dynamic" = yes && test -n "$export_dynamic_flag_spec"; then eval arg=\"$export_dynamic_flag_spec\" func_append compile_command " $arg" func_append finalize_command " $arg" fi oldlibs= # calculate the name of the file, without its directory func_basename "$output" outputname="$func_basename_result" libobjs_save="$libobjs" if test -n "$shlibpath_var"; then # get the directories listed in $shlibpath_var eval shlib_search_path=\`\$ECHO \"X\${$shlibpath_var}\" \| \$Xsed -e \'s/:/ /g\'\` else shlib_search_path= fi eval sys_lib_search_path=\"$sys_lib_search_path_spec\" eval sys_lib_dlsearch_path=\"$sys_lib_dlsearch_path_spec\" func_dirname "$output" "/" "" output_objdir="$func_dirname_result$objdir" # Create the object directory. func_mkdir_p "$output_objdir" # Determine the type of output case $output in "") func_fatal_help "you must specify an output file" ;; *.$libext) linkmode=oldlib ;; *.lo | *.$objext) linkmode=obj ;; *.la) linkmode=lib ;; *) linkmode=prog ;; # Anything else should be a program. esac specialdeplibs= libs= # Find all interdependent deplibs by searching for libraries # that are linked more than once (e.g. -la -lb -la) for deplib in $deplibs; do if $opt_duplicate_deps ; then case "$libs " in *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;; esac fi libs="$libs $deplib" done if test "$linkmode" = lib; then libs="$predeps $libs $compiler_lib_search_path $postdeps" # Compute libraries that are listed more than once in $predeps # $postdeps and mark them as special (i.e., whose duplicates are # not to be eliminated). pre_post_deps= if $opt_duplicate_compiler_generated_deps; then for pre_post_dep in $predeps $postdeps; do case "$pre_post_deps " in *" $pre_post_dep "*) specialdeplibs="$specialdeplibs $pre_post_deps" ;; esac pre_post_deps="$pre_post_deps $pre_post_dep" done fi pre_post_deps= fi deplibs= newdependency_libs= newlib_search_path= need_relink=no # whether we're linking any uninstalled libtool libraries notinst_deplibs= # not-installed libtool libraries notinst_path= # paths that contain not-installed libtool libraries case $linkmode in lib) passes="conv dlpreopen link" for file in $dlfiles $dlprefiles; do case $file in *.la) ;; *) func_fatal_help "libraries can \`-dlopen' only libtool libraries: $file" ;; esac done ;; prog) compile_deplibs= finalize_deplibs= alldeplibs=no newdlfiles= newdlprefiles= passes="conv scan dlopen dlpreopen link" ;; *) passes="conv" ;; esac for pass in $passes; do # The preopen pass in lib mode reverses $deplibs; put it back here # so that -L comes before libs that need it for instance... if test "$linkmode,$pass" = "lib,link"; then ## FIXME: Find the place where the list is rebuilt in the wrong ## order, and fix it there properly tmp_deplibs= for deplib in $deplibs; do tmp_deplibs="$deplib $tmp_deplibs" done deplibs="$tmp_deplibs" fi if test "$linkmode,$pass" = "lib,link" || test "$linkmode,$pass" = "prog,scan"; then libs="$deplibs" deplibs= fi if test "$linkmode" = prog; then case $pass in dlopen) libs="$dlfiles" ;; dlpreopen) libs="$dlprefiles" ;; link) libs="$deplibs %DEPLIBS% $dependency_libs" ;; esac fi if test "$linkmode,$pass" = "lib,dlpreopen"; then # Collect and forward deplibs of preopened libtool libs for lib in $dlprefiles; do # Ignore non-libtool-libs dependency_libs= case $lib in *.la) func_source "$lib" ;; esac # Collect preopened libtool deplibs, except any this library # has declared as weak libs for deplib in $dependency_libs; do deplib_base=`$ECHO "X$deplib" | $Xsed -e "$basename"` case " $weak_libs " in *" $deplib_base "*) ;; *) deplibs="$deplibs $deplib" ;; esac done done libs="$dlprefiles" fi if test "$pass" = dlopen; then # Collect dlpreopened libraries save_deplibs="$deplibs" deplibs= fi for deplib in $libs; do lib= found=no case $deplib in -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe|-threads) if test "$linkmode,$pass" = "prog,link"; then compile_deplibs="$deplib $compile_deplibs" finalize_deplibs="$deplib $finalize_deplibs" else compiler_flags="$compiler_flags $deplib" if test "$linkmode" = lib ; then case "$new_inherited_linker_flags " in *" $deplib "*) ;; * ) new_inherited_linker_flags="$new_inherited_linker_flags $deplib" ;; esac fi fi continue ;; -l*) if test "$linkmode" != lib && test "$linkmode" != prog; then func_warning "\`-l' is ignored for archives/objects" continue fi func_stripname '-l' '' "$deplib" name=$func_stripname_result if test "$linkmode" = lib; then searchdirs="$newlib_search_path $lib_search_path $compiler_lib_search_dirs $sys_lib_search_path $shlib_search_path" else searchdirs="$newlib_search_path $lib_search_path $sys_lib_search_path $shlib_search_path" fi for searchdir in $searchdirs; do for search_ext in .la $std_shrext .so .a; do # Search the libtool library lib="$searchdir/lib${name}${search_ext}" if test -f "$lib"; then if test "$search_ext" = ".la"; then found=yes else found=no fi break 2 fi done done if test "$found" != yes; then # deplib doesn't seem to be a libtool library if test "$linkmode,$pass" = "prog,link"; then compile_deplibs="$deplib $compile_deplibs" finalize_deplibs="$deplib $finalize_deplibs" else deplibs="$deplib $deplibs" test "$linkmode" = lib && newdependency_libs="$deplib $newdependency_libs" fi continue else # deplib is a libtool library # If $allow_libtool_libs_with_static_runtimes && $deplib is a stdlib, # We need to do some special things here, and not later. if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then case " $predeps $postdeps " in *" $deplib "*) if func_lalib_p "$lib"; then library_names= old_library= func_source "$lib" for l in $old_library $library_names; do ll="$l" done if test "X$ll" = "X$old_library" ; then # only static version available found=no func_dirname "$lib" "" "." ladir="$func_dirname_result" lib=$ladir/$old_library if test "$linkmode,$pass" = "prog,link"; then compile_deplibs="$deplib $compile_deplibs" finalize_deplibs="$deplib $finalize_deplibs" else deplibs="$deplib $deplibs" test "$linkmode" = lib && newdependency_libs="$deplib $newdependency_libs" fi continue fi fi ;; *) ;; esac fi fi ;; # -l *.ltframework) if test "$linkmode,$pass" = "prog,link"; then compile_deplibs="$deplib $compile_deplibs" finalize_deplibs="$deplib $finalize_deplibs" else deplibs="$deplib $deplibs" if test "$linkmode" = lib ; then case "$new_inherited_linker_flags " in *" $deplib "*) ;; * ) new_inherited_linker_flags="$new_inherited_linker_flags $deplib" ;; esac fi fi continue ;; -L*) case $linkmode in lib) deplibs="$deplib $deplibs" test "$pass" = conv && continue newdependency_libs="$deplib $newdependency_libs" func_stripname '-L' '' "$deplib" newlib_search_path="$newlib_search_path $func_stripname_result" ;; prog) if test "$pass" = conv; then deplibs="$deplib $deplibs" continue fi if test "$pass" = scan; then deplibs="$deplib $deplibs" else compile_deplibs="$deplib $compile_deplibs" finalize_deplibs="$deplib $finalize_deplibs" fi func_stripname '-L' '' "$deplib" newlib_search_path="$newlib_search_path $func_stripname_result" ;; *) func_warning "\`-L' is ignored for archives/objects" ;; esac # linkmode continue ;; # -L -R*) if test "$pass" = link; then func_stripname '-R' '' "$deplib" dir=$func_stripname_result # Make sure the xrpath contains only unique directories. case "$xrpath " in *" $dir "*) ;; *) xrpath="$xrpath $dir" ;; esac fi deplibs="$deplib $deplibs" continue ;; *.la) lib="$deplib" ;; *.$libext) if test "$pass" = conv; then deplibs="$deplib $deplibs" continue fi case $linkmode in lib) # Linking convenience modules into shared libraries is allowed, # but linking other static libraries is non-portable. case " $dlpreconveniencelibs " in *" $deplib "*) ;; *) valid_a_lib=no case $deplibs_check_method in match_pattern*) set dummy $deplibs_check_method; shift match_pattern_regex=`expr "$deplibs_check_method" : "$1 \(.*\)"` if eval "\$ECHO \"X$deplib\"" 2>/dev/null | $Xsed -e 10q \ | $EGREP "$match_pattern_regex" > /dev/null; then valid_a_lib=yes fi ;; pass_all) valid_a_lib=yes ;; esac if test "$valid_a_lib" != yes; then $ECHO $ECHO "*** Warning: Trying to link with static lib archive $deplib." $ECHO "*** I have the capability to make that library automatically link in when" $ECHO "*** you link to this library. But I can only do this if you have a" $ECHO "*** shared version of the library, which you do not appear to have" $ECHO "*** because the file extensions .$libext of this argument makes me believe" $ECHO "*** that it is just a static archive that I should not use here." else $ECHO $ECHO "*** Warning: Linking the shared library $output against the" $ECHO "*** static library $deplib is not portable!" deplibs="$deplib $deplibs" fi ;; esac continue ;; prog) if test "$pass" != link; then deplibs="$deplib $deplibs" else compile_deplibs="$deplib $compile_deplibs" finalize_deplibs="$deplib $finalize_deplibs" fi continue ;; esac # linkmode ;; # *.$libext *.lo | *.$objext) if test "$pass" = conv; then deplibs="$deplib $deplibs" elif test "$linkmode" = prog; then if test "$pass" = dlpreopen || test "$dlopen_support" != yes || test "$build_libtool_libs" = no; then # If there is no dlopen support or we're linking statically, # we need to preload. newdlprefiles="$newdlprefiles $deplib" compile_deplibs="$deplib $compile_deplibs" finalize_deplibs="$deplib $finalize_deplibs" else newdlfiles="$newdlfiles $deplib" fi fi continue ;; %DEPLIBS%) alldeplibs=yes continue ;; esac # case $deplib if test "$found" = yes || test -f "$lib"; then : else func_fatal_error "cannot find the library \`$lib' or unhandled argument \`$deplib'" fi # Check to see that this really is a libtool archive. func_lalib_unsafe_p "$lib" \ || func_fatal_error "\`$lib' is not a valid libtool archive" func_dirname "$lib" "" "." ladir="$func_dirname_result" dlname= dlopen= dlpreopen= libdir= library_names= old_library= inherited_linker_flags= # If the library was installed with an old release of libtool, # it will not redefine variables installed, or shouldnotlink installed=yes shouldnotlink=no avoidtemprpath= # Read the .la file func_source "$lib" # Convert "-framework foo" to "foo.ltframework" if test -n "$inherited_linker_flags"; then tmp_inherited_linker_flags=`$ECHO "X$inherited_linker_flags" | $Xsed -e 's/-framework \([^ $]*\)/\1.ltframework/g'` for tmp_inherited_linker_flag in $tmp_inherited_linker_flags; do case " $new_inherited_linker_flags " in *" $tmp_inherited_linker_flag "*) ;; *) new_inherited_linker_flags="$new_inherited_linker_flags $tmp_inherited_linker_flag";; esac done fi dependency_libs=`$ECHO "X $dependency_libs" | $Xsed -e 's% \([^ $]*\).ltframework% -framework \1%g'` if test "$linkmode,$pass" = "lib,link" || test "$linkmode,$pass" = "prog,scan" || { test "$linkmode" != prog && test "$linkmode" != lib; }; then test -n "$dlopen" && dlfiles="$dlfiles $dlopen" test -n "$dlpreopen" && dlprefiles="$dlprefiles $dlpreopen" fi if test "$pass" = conv; then # Only check for convenience libraries deplibs="$lib $deplibs" if test -z "$libdir"; then if test -z "$old_library"; then func_fatal_error "cannot find name of link library for \`$lib'" fi # It is a libtool convenience library, so add in its objects. convenience="$convenience $ladir/$objdir/$old_library" old_convenience="$old_convenience $ladir/$objdir/$old_library" elif test "$linkmode" != prog && test "$linkmode" != lib; then func_fatal_error "\`$lib' is not a convenience library" fi tmp_libs= for deplib in $dependency_libs; do deplibs="$deplib $deplibs" if $opt_duplicate_deps ; then case "$tmp_libs " in *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;; esac fi tmp_libs="$tmp_libs $deplib" done continue fi # $pass = conv # Get the name of the library we link against. linklib= for l in $old_library $library_names; do linklib="$l" done if test -z "$linklib"; then func_fatal_error "cannot find name of link library for \`$lib'" fi # This library was specified with -dlopen. if test "$pass" = dlopen; then if test -z "$libdir"; then func_fatal_error "cannot -dlopen a convenience library: \`$lib'" fi if test -z "$dlname" || test "$dlopen_support" != yes || test "$build_libtool_libs" = no; then # If there is no dlname, no dlopen support or we're linking # statically, we need to preload. We also need to preload any # dependent libraries so libltdl's deplib preloader doesn't # bomb out in the load deplibs phase. dlprefiles="$dlprefiles $lib $dependency_libs" else newdlfiles="$newdlfiles $lib" fi continue fi # $pass = dlopen # We need an absolute path. case $ladir in [\\/]* | [A-Za-z]:[\\/]*) abs_ladir="$ladir" ;; *) abs_ladir=`cd "$ladir" && pwd` if test -z "$abs_ladir"; then func_warning "cannot determine absolute directory name of \`$ladir'" func_warning "passing it literally to the linker, although it might fail" abs_ladir="$ladir" fi ;; esac func_basename "$lib" laname="$func_basename_result" # Find the relevant object directory and library name. if test "X$installed" = Xyes; then if test ! -f "$libdir/$linklib" && test -f "$abs_ladir/$linklib"; then func_warning "library \`$lib' was moved." dir="$ladir" absdir="$abs_ladir" libdir="$abs_ladir" else dir="$libdir" absdir="$libdir" fi test "X$hardcode_automatic" = Xyes && avoidtemprpath=yes else if test ! -f "$ladir/$objdir/$linklib" && test -f "$abs_ladir/$linklib"; then dir="$ladir" absdir="$abs_ladir" # Remove this search path later notinst_path="$notinst_path $abs_ladir" else dir="$ladir/$objdir" absdir="$abs_ladir/$objdir" # Remove this search path later notinst_path="$notinst_path $abs_ladir" fi fi # $installed = yes func_stripname 'lib' '.la' "$laname" name=$func_stripname_result # This library was specified with -dlpreopen. if test "$pass" = dlpreopen; then if test -z "$libdir" && test "$linkmode" = prog; then func_fatal_error "only libraries may -dlpreopen a convenience library: \`$lib'" fi # Prefer using a static library (so that no silly _DYNAMIC symbols # are required to link). if test -n "$old_library"; then newdlprefiles="$newdlprefiles $dir/$old_library" # Keep a list of preopened convenience libraries to check # that they are being used correctly in the link pass. test -z "$libdir" && \ dlpreconveniencelibs="$dlpreconveniencelibs $dir/$old_library" # Otherwise, use the dlname, so that lt_dlopen finds it. elif test -n "$dlname"; then newdlprefiles="$newdlprefiles $dir/$dlname" else newdlprefiles="$newdlprefiles $dir/$linklib" fi fi # $pass = dlpreopen if test -z "$libdir"; then # Link the convenience library if test "$linkmode" = lib; then deplibs="$dir/$old_library $deplibs" elif test "$linkmode,$pass" = "prog,link"; then compile_deplibs="$dir/$old_library $compile_deplibs" finalize_deplibs="$dir/$old_library $finalize_deplibs" else deplibs="$lib $deplibs" # used for prog,scan pass fi continue fi if test "$linkmode" = prog && test "$pass" != link; then newlib_search_path="$newlib_search_path $ladir" deplibs="$lib $deplibs" linkalldeplibs=no if test "$link_all_deplibs" != no || test -z "$library_names" || test "$build_libtool_libs" = no; then linkalldeplibs=yes fi tmp_libs= for deplib in $dependency_libs; do case $deplib in -L*) func_stripname '-L' '' "$deplib" newlib_search_path="$newlib_search_path $func_stripname_result" ;; esac # Need to link against all dependency_libs? if test "$linkalldeplibs" = yes; then deplibs="$deplib $deplibs" else # Need to hardcode shared library paths # or/and link against static libraries newdependency_libs="$deplib $newdependency_libs" fi if $opt_duplicate_deps ; then case "$tmp_libs " in *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;; esac fi tmp_libs="$tmp_libs $deplib" done # for deplib continue fi # $linkmode = prog... if test "$linkmode,$pass" = "prog,link"; then if test -n "$library_names" && { { test "$prefer_static_libs" = no || test "$prefer_static_libs,$installed" = "built,yes"; } || test -z "$old_library"; }; then # We need to hardcode the library path if test -n "$shlibpath_var" && test -z "$avoidtemprpath" ; then # Make sure the rpath contains only unique directories. case "$temp_rpath:" in *"$absdir:"*) ;; *) temp_rpath="$temp_rpath$absdir:" ;; esac fi # Hardcode the library path. # Skip directories that are in the system default run-time # search path. case " $sys_lib_dlsearch_path " in *" $absdir "*) ;; *) case "$compile_rpath " in *" $absdir "*) ;; *) compile_rpath="$compile_rpath $absdir" esac ;; esac case " $sys_lib_dlsearch_path " in *" $libdir "*) ;; *) case "$finalize_rpath " in *" $libdir "*) ;; *) finalize_rpath="$finalize_rpath $libdir" esac ;; esac fi # $linkmode,$pass = prog,link... if test "$alldeplibs" = yes && { test "$deplibs_check_method" = pass_all || { test "$build_libtool_libs" = yes && test -n "$library_names"; }; }; then # We only need to search for static libraries continue fi fi link_static=no # Whether the deplib will be linked statically use_static_libs=$prefer_static_libs if test "$use_static_libs" = built && test "$installed" = yes; then use_static_libs=no fi if test -n "$library_names" && { test "$use_static_libs" = no || test -z "$old_library"; }; then case $host in *cygwin* | *mingw* | *cegcc*) # No point in relinking DLLs because paths are not encoded notinst_deplibs="$notinst_deplibs $lib" need_relink=no ;; *) if test "$installed" = no; then notinst_deplibs="$notinst_deplibs $lib" need_relink=yes fi ;; esac # This is a shared library # Warn about portability, can't link against -module's on some # systems (darwin). Don't bleat about dlopened modules though! dlopenmodule="" for dlpremoduletest in $dlprefiles; do if test "X$dlpremoduletest" = "X$lib"; then dlopenmodule="$dlpremoduletest" break fi done if test -z "$dlopenmodule" && test "$shouldnotlink" = yes && test "$pass" = link; then $ECHO if test "$linkmode" = prog; then $ECHO "*** Warning: Linking the executable $output against the loadable module" else $ECHO "*** Warning: Linking the shared library $output against the loadable module" fi $ECHO "*** $linklib is not portable!" fi if test "$linkmode" = lib && test "$hardcode_into_libs" = yes; then # Hardcode the library path. # Skip directories that are in the system default run-time # search path. case " $sys_lib_dlsearch_path " in *" $absdir "*) ;; *) case "$compile_rpath " in *" $absdir "*) ;; *) compile_rpath="$compile_rpath $absdir" esac ;; esac case " $sys_lib_dlsearch_path " in *" $libdir "*) ;; *) case "$finalize_rpath " in *" $libdir "*) ;; *) finalize_rpath="$finalize_rpath $libdir" esac ;; esac fi if test -n "$old_archive_from_expsyms_cmds"; then # figure out the soname set dummy $library_names shift realname="$1" shift libname=`eval "\\$ECHO \"$libname_spec\""` # use dlname if we got it. it's perfectly good, no? if test -n "$dlname"; then soname="$dlname" elif test -n "$soname_spec"; then # bleh windows case $host in *cygwin* | mingw* | *cegcc*) func_arith $current - $age major=$func_arith_result versuffix="-$major" ;; esac eval soname=\"$soname_spec\" else soname="$realname" fi # Make a new name for the extract_expsyms_cmds to use soroot="$soname" func_basename "$soroot" soname="$func_basename_result" func_stripname 'lib' '.dll' "$soname" newlib=libimp-$func_stripname_result.a # If the library has no export list, then create one now if test -f "$output_objdir/$soname-def"; then : else func_verbose "extracting exported symbol list from \`$soname'" func_execute_cmds "$extract_expsyms_cmds" 'exit $?' fi # Create $newlib if test -f "$output_objdir/$newlib"; then :; else func_verbose "generating import library for \`$soname'" func_execute_cmds "$old_archive_from_expsyms_cmds" 'exit $?' fi # make sure the library variables are pointing to the new library dir=$output_objdir linklib=$newlib fi # test -n "$old_archive_from_expsyms_cmds" if test "$linkmode" = prog || test "$mode" != relink; then add_shlibpath= add_dir= add= lib_linked=yes case $hardcode_action in immediate | unsupported) if test "$hardcode_direct" = no; then add="$dir/$linklib" case $host in *-*-sco3.2v5.0.[024]*) add_dir="-L$dir" ;; *-*-sysv4*uw2*) add_dir="-L$dir" ;; *-*-sysv5OpenUNIX* | *-*-sysv5UnixWare7.[01].[10]* | \ *-*-unixware7*) add_dir="-L$dir" ;; *-*-darwin* ) # if the lib is a (non-dlopened) module then we can not # link against it, someone is ignoring the earlier warnings if /usr/bin/file -L $add 2> /dev/null | $GREP ": [^:]* bundle" >/dev/null ; then if test "X$dlopenmodule" != "X$lib"; then $ECHO "*** Warning: lib $linklib is a module, not a shared library" if test -z "$old_library" ; then $ECHO $ECHO "*** And there doesn't seem to be a static archive available" $ECHO "*** The link will probably fail, sorry" else add="$dir/$old_library" fi elif test -n "$old_library"; then add="$dir/$old_library" fi fi esac elif test "$hardcode_minus_L" = no; then case $host in *-*-sunos*) add_shlibpath="$dir" ;; esac add_dir="-L$dir" add="-l$name" elif test "$hardcode_shlibpath_var" = no; then add_shlibpath="$dir" add="-l$name" else lib_linked=no fi ;; relink) if test "$hardcode_direct" = yes && test "$hardcode_direct_absolute" = no; then add="$dir/$linklib" elif test "$hardcode_minus_L" = yes; then add_dir="-L$dir" # Try looking first in the location we're being installed to. if test -n "$inst_prefix_dir"; then case $libdir in [\\/]*) add_dir="$add_dir -L$inst_prefix_dir$libdir" ;; esac fi add="-l$name" elif test "$hardcode_shlibpath_var" = yes; then add_shlibpath="$dir" add="-l$name" else lib_linked=no fi ;; *) lib_linked=no ;; esac if test "$lib_linked" != yes; then func_fatal_configuration "unsupported hardcode properties" fi if test -n "$add_shlibpath"; then case :$compile_shlibpath: in *":$add_shlibpath:"*) ;; *) compile_shlibpath="$compile_shlibpath$add_shlibpath:" ;; esac fi if test "$linkmode" = prog; then test -n "$add_dir" && compile_deplibs="$add_dir $compile_deplibs" test -n "$add" && compile_deplibs="$add $compile_deplibs" else test -n "$add_dir" && deplibs="$add_dir $deplibs" test -n "$add" && deplibs="$add $deplibs" if test "$hardcode_direct" != yes && test "$hardcode_minus_L" != yes && test "$hardcode_shlibpath_var" = yes; then case :$finalize_shlibpath: in *":$libdir:"*) ;; *) finalize_shlibpath="$finalize_shlibpath$libdir:" ;; esac fi fi fi if test "$linkmode" = prog || test "$mode" = relink; then add_shlibpath= add_dir= add= # Finalize command for both is simple: just hardcode it. if test "$hardcode_direct" = yes && test "$hardcode_direct_absolute" = no; then add="$libdir/$linklib" elif test "$hardcode_minus_L" = yes; then add_dir="-L$libdir" add="-l$name" elif test "$hardcode_shlibpath_var" = yes; then case :$finalize_shlibpath: in *":$libdir:"*) ;; *) finalize_shlibpath="$finalize_shlibpath$libdir:" ;; esac add="-l$name" elif test "$hardcode_automatic" = yes; then if test -n "$inst_prefix_dir" && test -f "$inst_prefix_dir$libdir/$linklib" ; then add="$inst_prefix_dir$libdir/$linklib" else add="$libdir/$linklib" fi else # We cannot seem to hardcode it, guess we'll fake it. add_dir="-L$libdir" # Try looking first in the location we're being installed to. if test -n "$inst_prefix_dir"; then case $libdir in [\\/]*) add_dir="$add_dir -L$inst_prefix_dir$libdir" ;; esac fi add="-l$name" fi if test "$linkmode" = prog; then test -n "$add_dir" && finalize_deplibs="$add_dir $finalize_deplibs" test -n "$add" && finalize_deplibs="$add $finalize_deplibs" else test -n "$add_dir" && deplibs="$add_dir $deplibs" test -n "$add" && deplibs="$add $deplibs" fi fi elif test "$linkmode" = prog; then # Here we assume that one of hardcode_direct or hardcode_minus_L # is not unsupported. This is valid on all known static and # shared platforms. if test "$hardcode_direct" != unsupported; then test -n "$old_library" && linklib="$old_library" compile_deplibs="$dir/$linklib $compile_deplibs" finalize_deplibs="$dir/$linklib $finalize_deplibs" else compile_deplibs="-l$name -L$dir $compile_deplibs" finalize_deplibs="-l$name -L$dir $finalize_deplibs" fi elif test "$build_libtool_libs" = yes; then # Not a shared library if test "$deplibs_check_method" != pass_all; then # We're trying link a shared library against a static one # but the system doesn't support it. # Just print a warning and add the library to dependency_libs so # that the program can be linked against the static library. $ECHO $ECHO "*** Warning: This system can not link to static lib archive $lib." $ECHO "*** I have the capability to make that library automatically link in when" $ECHO "*** you link to this library. But I can only do this if you have a" $ECHO "*** shared version of the library, which you do not appear to have." if test "$module" = yes; then $ECHO "*** But as you try to build a module library, libtool will still create " $ECHO "*** a static module, that should work as long as the dlopening application" $ECHO "*** is linked with the -dlopen flag to resolve symbols at runtime." if test -z "$global_symbol_pipe"; then $ECHO $ECHO "*** However, this would only work if libtool was able to extract symbol" $ECHO "*** lists from a program, using \`nm' or equivalent, but libtool could" $ECHO "*** not find such a program. So, this module is probably useless." $ECHO "*** \`nm' from GNU binutils and a full rebuild may help." fi if test "$build_old_libs" = no; then build_libtool_libs=module build_old_libs=yes else build_libtool_libs=no fi fi else deplibs="$dir/$old_library $deplibs" link_static=yes fi fi # link shared/static library? if test "$linkmode" = lib; then if test -n "$dependency_libs" && { test "$hardcode_into_libs" != yes || test "$build_old_libs" = yes || test "$link_static" = yes; }; then # Extract -R from dependency_libs temp_deplibs= for libdir in $dependency_libs; do case $libdir in -R*) func_stripname '-R' '' "$libdir" temp_xrpath=$func_stripname_result case " $xrpath " in *" $temp_xrpath "*) ;; *) xrpath="$xrpath $temp_xrpath";; esac;; *) temp_deplibs="$temp_deplibs $libdir";; esac done dependency_libs="$temp_deplibs" fi newlib_search_path="$newlib_search_path $absdir" # Link against this library test "$link_static" = no && newdependency_libs="$abs_ladir/$laname $newdependency_libs" # ... and its dependency_libs tmp_libs= for deplib in $dependency_libs; do newdependency_libs="$deplib $newdependency_libs" if $opt_duplicate_deps ; then case "$tmp_libs " in *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;; esac fi tmp_libs="$tmp_libs $deplib" done if test "$link_all_deplibs" != no; then # Add the search paths of all dependency libraries for deplib in $dependency_libs; do case $deplib in -L*) path="$deplib" ;; *.la) func_dirname "$deplib" "" "." dir="$func_dirname_result" # We need an absolute path. case $dir in [\\/]* | [A-Za-z]:[\\/]*) absdir="$dir" ;; *) absdir=`cd "$dir" && pwd` if test -z "$absdir"; then func_warning "cannot determine absolute directory name of \`$dir'" absdir="$dir" fi ;; esac if $GREP "^installed=no" $deplib > /dev/null; then case $host in *-*-darwin*) depdepl= eval deplibrary_names=`${SED} -n -e 's/^library_names=\(.*\)$/\1/p' $deplib` if test -n "$deplibrary_names" ; then for tmp in $deplibrary_names ; do depdepl=$tmp done if test -f "$absdir/$objdir/$depdepl" ; then depdepl="$absdir/$objdir/$depdepl" darwin_install_name=`${OTOOL} -L $depdepl | awk '{if (NR == 2) {print $1;exit}}'` if test -z "$darwin_install_name"; then darwin_install_name=`${OTOOL64} -L $depdepl | awk '{if (NR == 2) {print $1;exit}}'` fi compiler_flags="$compiler_flags ${wl}-dylib_file ${wl}${darwin_install_name}:${depdepl}" linker_flags="$linker_flags -dylib_file ${darwin_install_name}:${depdepl}" path= fi fi ;; *) path="-L$absdir/$objdir" ;; esac else eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $deplib` test -z "$libdir" && \ func_fatal_error "\`$deplib' is not a valid libtool archive" test "$absdir" != "$libdir" && \ func_warning "\`$deplib' seems to be moved" path="-L$absdir" fi ;; esac case " $deplibs " in *" $path "*) ;; *) deplibs="$path $deplibs" ;; esac done fi # link_all_deplibs != no fi # linkmode = lib done # for deplib in $libs if test "$pass" = link; then if test "$linkmode" = "prog"; then compile_deplibs="$new_inherited_linker_flags $compile_deplibs" finalize_deplibs="$new_inherited_linker_flags $finalize_deplibs" else compiler_flags="$compiler_flags "`$ECHO "X $new_inherited_linker_flags" | $Xsed -e 's% \([^ $]*\).ltframework% -framework \1%g'` fi fi dependency_libs="$newdependency_libs" if test "$pass" = dlpreopen; then # Link the dlpreopened libraries before other libraries for deplib in $save_deplibs; do deplibs="$deplib $deplibs" done fi if test "$pass" != dlopen; then if test "$pass" != conv; then # Make sure lib_search_path contains only unique directories. lib_search_path= for dir in $newlib_search_path; do case "$lib_search_path " in *" $dir "*) ;; *) lib_search_path="$lib_search_path $dir" ;; esac done newlib_search_path= fi if test "$linkmode,$pass" != "prog,link"; then vars="deplibs" else vars="compile_deplibs finalize_deplibs" fi for var in $vars dependency_libs; do # Add libraries to $var in reverse order eval tmp_libs=\"\$$var\" new_libs= for deplib in $tmp_libs; do # FIXME: Pedantically, this is the right thing to do, so # that some nasty dependency loop isn't accidentally # broken: #new_libs="$deplib $new_libs" # Pragmatically, this seems to cause very few problems in # practice: case $deplib in -L*) new_libs="$deplib $new_libs" ;; -R*) ;; *) # And here is the reason: when a library appears more # than once as an explicit dependence of a library, or # is implicitly linked in more than once by the # compiler, it is considered special, and multiple # occurrences thereof are not removed. Compare this # with having the same library being listed as a # dependency of multiple other libraries: in this case, # we know (pedantically, we assume) the library does not # need to be listed more than once, so we keep only the # last copy. This is not always right, but it is rare # enough that we require users that really mean to play # such unportable linking tricks to link the library # using -Wl,-lname, so that libtool does not consider it # for duplicate removal. case " $specialdeplibs " in *" $deplib "*) new_libs="$deplib $new_libs" ;; *) case " $new_libs " in *" $deplib "*) ;; *) new_libs="$deplib $new_libs" ;; esac ;; esac ;; esac done tmp_libs= for deplib in $new_libs; do case $deplib in -L*) case " $tmp_libs " in *" $deplib "*) ;; *) tmp_libs="$tmp_libs $deplib" ;; esac ;; *) tmp_libs="$tmp_libs $deplib" ;; esac done eval $var=\"$tmp_libs\" done # for var fi # Last step: remove runtime libs from dependency_libs # (they stay in deplibs) tmp_libs= for i in $dependency_libs ; do case " $predeps $postdeps $compiler_lib_search_path " in *" $i "*) i="" ;; esac if test -n "$i" ; then tmp_libs="$tmp_libs $i" fi done dependency_libs=$tmp_libs done # for pass if test "$linkmode" = prog; then dlfiles="$newdlfiles" fi if test "$linkmode" = prog || test "$linkmode" = lib; then dlprefiles="$newdlprefiles" fi case $linkmode in oldlib) if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then func_warning "\`-dlopen' is ignored for archives" fi case " $deplibs" in *\ -l* | *\ -L*) func_warning "\`-l' and \`-L' are ignored for archives" ;; esac test -n "$rpath" && \ func_warning "\`-rpath' is ignored for archives" test -n "$xrpath" && \ func_warning "\`-R' is ignored for archives" test -n "$vinfo" && \ func_warning "\`-version-info/-version-number' is ignored for archives" test -n "$release" && \ func_warning "\`-release' is ignored for archives" test -n "$export_symbols$export_symbols_regex" && \ func_warning "\`-export-symbols' is ignored for archives" # Now set the variables for building old libraries. build_libtool_libs=no oldlibs="$output" objs="$objs$old_deplibs" ;; lib) # Make sure we only generate libraries of the form `libNAME.la'. case $outputname in lib*) func_stripname 'lib' '.la' "$outputname" name=$func_stripname_result eval shared_ext=\"$shrext_cmds\" eval libname=\"$libname_spec\" ;; *) test "$module" = no && \ func_fatal_help "libtool library \`$output' must begin with \`lib'" if test "$need_lib_prefix" != no; then # Add the "lib" prefix for modules if required func_stripname '' '.la' "$outputname" name=$func_stripname_result eval shared_ext=\"$shrext_cmds\" eval libname=\"$libname_spec\" else func_stripname '' '.la' "$outputname" libname=$func_stripname_result fi ;; esac if test -n "$objs"; then if test "$deplibs_check_method" != pass_all; then func_fatal_error "cannot build libtool library \`$output' from non-libtool objects on this host:$objs" else $ECHO $ECHO "*** Warning: Linking the shared library $output against the non-libtool" $ECHO "*** objects $objs is not portable!" libobjs="$libobjs $objs" fi fi test "$dlself" != no && \ func_warning "\`-dlopen self' is ignored for libtool libraries" set dummy $rpath shift test "$#" -gt 1 && \ func_warning "ignoring multiple \`-rpath's for a libtool library" install_libdir="$1" oldlibs= if test -z "$rpath"; then if test "$build_libtool_libs" = yes; then # Building a libtool convenience library. # Some compilers have problems with a `.al' extension so # convenience libraries should have the same extension an # archive normally would. oldlibs="$output_objdir/$libname.$libext $oldlibs" build_libtool_libs=convenience build_old_libs=yes fi test -n "$vinfo" && \ func_warning "\`-version-info/-version-number' is ignored for convenience libraries" test -n "$release" && \ func_warning "\`-release' is ignored for convenience libraries" else # Parse the version information argument. save_ifs="$IFS"; IFS=':' set dummy $vinfo 0 0 0 shift IFS="$save_ifs" test -n "$7" && \ func_fatal_help "too many parameters to \`-version-info'" # convert absolute version numbers to libtool ages # this retains compatibility with .la files and attempts # to make the code below a bit more comprehensible case $vinfo_number in yes) number_major="$1" number_minor="$2" number_revision="$3" # # There are really only two kinds -- those that # use the current revision as the major version # and those that subtract age and use age as # a minor version. But, then there is irix # which has an extra 1 added just for fun # case $version_type in darwin|linux|osf|windows|none) func_arith $number_major + $number_minor current=$func_arith_result age="$number_minor" revision="$number_revision" ;; freebsd-aout|freebsd-elf|sunos) current="$number_major" revision="$number_minor" age="0" ;; irix|nonstopux) func_arith $number_major + $number_minor current=$func_arith_result age="$number_minor" revision="$number_minor" lt_irix_increment=no ;; esac ;; no) current="$1" revision="$2" age="$3" ;; esac # Check that each of the things are valid numbers. case $current in 0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;; *) func_error "CURRENT \`$current' must be a nonnegative integer" func_fatal_error "\`$vinfo' is not valid version information" ;; esac case $revision in 0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;; *) func_error "REVISION \`$revision' must be a nonnegative integer" func_fatal_error "\`$vinfo' is not valid version information" ;; esac case $age in 0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;; *) func_error "AGE \`$age' must be a nonnegative integer" func_fatal_error "\`$vinfo' is not valid version information" ;; esac if test "$age" -gt "$current"; then func_error "AGE \`$age' is greater than the current interface number \`$current'" func_fatal_error "\`$vinfo' is not valid version information" fi # Calculate the version variables. major= versuffix= verstring= case $version_type in none) ;; darwin) # Like Linux, but with the current version available in # verstring for coding it into the library header func_arith $current - $age major=.$func_arith_result versuffix="$major.$age.$revision" # Darwin ld doesn't like 0 for these options... func_arith $current + 1 minor_current=$func_arith_result xlcverstring="${wl}-compatibility_version ${wl}$minor_current ${wl}-current_version ${wl}$minor_current.$revision" verstring="-compatibility_version $minor_current -current_version $minor_current.$revision" ;; freebsd-aout) major=".$current" versuffix=".$current.$revision"; ;; freebsd-elf) major=".$current" versuffix=".$current" ;; irix | nonstopux) if test "X$lt_irix_increment" = "Xno"; then func_arith $current - $age else func_arith $current - $age + 1 fi major=$func_arith_result case $version_type in nonstopux) verstring_prefix=nonstopux ;; *) verstring_prefix=sgi ;; esac verstring="$verstring_prefix$major.$revision" # Add in all the interfaces that we are compatible with. loop=$revision while test "$loop" -ne 0; do func_arith $revision - $loop iface=$func_arith_result func_arith $loop - 1 loop=$func_arith_result verstring="$verstring_prefix$major.$iface:$verstring" done # Before this point, $major must not contain `.'. major=.$major versuffix="$major.$revision" ;; linux) func_arith $current - $age major=.$func_arith_result versuffix="$major.$age.$revision" ;; osf) func_arith $current - $age major=.$func_arith_result versuffix=".$current.$age.$revision" verstring="$current.$age.$revision" # Add in all the interfaces that we are compatible with. loop=$age while test "$loop" -ne 0; do func_arith $current - $loop iface=$func_arith_result func_arith $loop - 1 loop=$func_arith_result verstring="$verstring:${iface}.0" done # Make executables depend on our current version. verstring="$verstring:${current}.0" ;; qnx) major=".$current" versuffix=".$current" ;; sunos) major=".$current" versuffix=".$current.$revision" ;; windows) # Use '-' rather than '.', since we only want one # extension on DOS 8.3 filesystems. func_arith $current - $age major=$func_arith_result versuffix="-$major" ;; *) func_fatal_configuration "unknown library version type \`$version_type'" ;; esac # Clear the version info if we defaulted, and they specified a release. if test -z "$vinfo" && test -n "$release"; then major= case $version_type in darwin) # we can't check for "0.0" in archive_cmds due to quoting # problems, so we reset it completely verstring= ;; *) verstring="0.0" ;; esac if test "$need_version" = no; then versuffix= else versuffix=".0.0" fi fi # Remove version info from name if versioning should be avoided if test "$avoid_version" = yes && test "$need_version" = no; then major= versuffix= verstring="" fi # Check to see if the archive will have undefined symbols. if test "$allow_undefined" = yes; then if test "$allow_undefined_flag" = unsupported; then func_warning "undefined symbols not allowed in $host shared libraries" build_libtool_libs=no build_old_libs=yes fi else # Don't allow undefined symbols. allow_undefined_flag="$no_undefined_flag" fi fi func_generate_dlsyms "$libname" "$libname" "yes" libobjs="$libobjs $symfileobj" test "X$libobjs" = "X " && libobjs= if test "$mode" != relink; then # Remove our outputs, but don't remove object files since they # may have been created when compiling PIC objects. removelist= tempremovelist=`$ECHO "$output_objdir/*"` for p in $tempremovelist; do case $p in *.$objext | *.gcno) ;; $output_objdir/$outputname | $output_objdir/$libname.* | $output_objdir/${libname}${release}.*) if test "X$precious_files_regex" != "X"; then if $ECHO "$p" | $EGREP -e "$precious_files_regex" >/dev/null 2>&1 then continue fi fi removelist="$removelist $p" ;; *) ;; esac done test -n "$removelist" && \ func_show_eval "${RM}r \$removelist" fi # Now set the variables for building old libraries. if test "$build_old_libs" = yes && test "$build_libtool_libs" != convenience ; then oldlibs="$oldlibs $output_objdir/$libname.$libext" # Transform .lo files to .o files. oldobjs="$objs "`$ECHO "X$libobjs" | $SP2NL | $Xsed -e '/\.'${libext}'$/d' -e "$lo2o" | $NL2SP` fi # Eliminate all temporary directories. #for path in $notinst_path; do # lib_search_path=`$ECHO "X$lib_search_path " | $Xsed -e "s% $path % %g"` # deplibs=`$ECHO "X$deplibs " | $Xsed -e "s% -L$path % %g"` # dependency_libs=`$ECHO "X$dependency_libs " | $Xsed -e "s% -L$path % %g"` #done if test -n "$xrpath"; then # If the user specified any rpath flags, then add them. temp_xrpath= for libdir in $xrpath; do temp_xrpath="$temp_xrpath -R$libdir" case "$finalize_rpath " in *" $libdir "*) ;; *) finalize_rpath="$finalize_rpath $libdir" ;; esac done if test "$hardcode_into_libs" != yes || test "$build_old_libs" = yes; then dependency_libs="$temp_xrpath $dependency_libs" fi fi # Make sure dlfiles contains only unique files that won't be dlpreopened old_dlfiles="$dlfiles" dlfiles= for lib in $old_dlfiles; do case " $dlprefiles $dlfiles " in *" $lib "*) ;; *) dlfiles="$dlfiles $lib" ;; esac done # Make sure dlprefiles contains only unique files old_dlprefiles="$dlprefiles" dlprefiles= for lib in $old_dlprefiles; do case "$dlprefiles " in *" $lib "*) ;; *) dlprefiles="$dlprefiles $lib" ;; esac done if test "$build_libtool_libs" = yes; then if test -n "$rpath"; then case $host in *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-*-beos* | *-cegcc*) # these systems don't actually have a c library (as such)! ;; *-*-rhapsody* | *-*-darwin1.[012]) # Rhapsody C library is in the System framework deplibs="$deplibs System.ltframework" ;; *-*-netbsd*) # Don't link with libc until the a.out ld.so is fixed. ;; *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*) # Do not include libc due to us having libc/libc_r. ;; *-*-sco3.2v5* | *-*-sco5v6*) # Causes problems with __ctype ;; *-*-sysv4.2uw2* | *-*-sysv5* | *-*-unixware* | *-*-OpenUNIX*) # Compiler inserts libc in the correct place for threads to work ;; *) # Add libc to deplibs on all other systems if necessary. if test "$build_libtool_need_lc" = "yes"; then deplibs="$deplibs -lc" fi ;; esac fi # Transform deplibs into only deplibs that can be linked in shared. name_save=$name libname_save=$libname release_save=$release versuffix_save=$versuffix major_save=$major # I'm not sure if I'm treating the release correctly. I think # release should show up in the -l (ie -lgmp5) so we don't want to # add it in twice. Is that correct? release="" versuffix="" major="" newdeplibs= droppeddeps=no case $deplibs_check_method in pass_all) # Don't check for shared/static. Everything works. # This might be a little naive. We might want to check # whether the library exists or not. But this is on # osf3 & osf4 and I'm not really sure... Just # implementing what was already the behavior. newdeplibs=$deplibs ;; test_compile) # This code stresses the "libraries are programs" paradigm to its # limits. Maybe even breaks it. We compile a program, linking it # against the deplibs as a proxy for the library. Then we can check # whether they linked in statically or dynamically with ldd. $opt_dry_run || $RM conftest.c cat > conftest.c </dev/null` for potent_lib in $potential_libs; do # Follow soft links. if ls -lLd "$potent_lib" 2>/dev/null | $GREP " -> " >/dev/null; then continue fi # The statement above tries to avoid entering an # endless loop below, in case of cyclic links. # We might still enter an endless loop, since a link # loop can be closed while we follow links, # but so what? potlib="$potent_lib" while test -h "$potlib" 2>/dev/null; do potliblink=`ls -ld $potlib | ${SED} 's/.* -> //'` case $potliblink in [\\/]* | [A-Za-z]:[\\/]*) potlib="$potliblink";; *) potlib=`$ECHO "X$potlib" | $Xsed -e 's,[^/]*$,,'`"$potliblink";; esac done if eval $file_magic_cmd \"\$potlib\" 2>/dev/null | $SED -e 10q | $EGREP "$file_magic_regex" > /dev/null; then newdeplibs="$newdeplibs $a_deplib" a_deplib="" break 2 fi done done fi if test -n "$a_deplib" ; then droppeddeps=yes $ECHO $ECHO "*** Warning: linker path does not have real file for library $a_deplib." $ECHO "*** I have the capability to make that library automatically link in when" $ECHO "*** you link to this library. But I can only do this if you have a" $ECHO "*** shared version of the library, which you do not appear to have" $ECHO "*** because I did check the linker path looking for a file starting" if test -z "$potlib" ; then $ECHO "*** with $libname but no candidates were found. (...for file magic test)" else $ECHO "*** with $libname and none of the candidates passed a file format test" $ECHO "*** using a file magic. Last file checked: $potlib" fi fi ;; *) # Add a -L argument. newdeplibs="$newdeplibs $a_deplib" ;; esac done # Gone through all deplibs. ;; match_pattern*) set dummy $deplibs_check_method; shift match_pattern_regex=`expr "$deplibs_check_method" : "$1 \(.*\)"` for a_deplib in $deplibs; do case $a_deplib in -l*) func_stripname -l '' "$a_deplib" name=$func_stripname_result if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then case " $predeps $postdeps " in *" $a_deplib "*) newdeplibs="$newdeplibs $a_deplib" a_deplib="" ;; esac fi if test -n "$a_deplib" ; then libname=`eval "\\$ECHO \"$libname_spec\""` for i in $lib_search_path $sys_lib_search_path $shlib_search_path; do potential_libs=`ls $i/$libname[.-]* 2>/dev/null` for potent_lib in $potential_libs; do potlib="$potent_lib" # see symlink-check above in file_magic test if eval "\$ECHO \"X$potent_lib\"" 2>/dev/null | $Xsed -e 10q | \ $EGREP "$match_pattern_regex" > /dev/null; then newdeplibs="$newdeplibs $a_deplib" a_deplib="" break 2 fi done done fi if test -n "$a_deplib" ; then droppeddeps=yes $ECHO $ECHO "*** Warning: linker path does not have real file for library $a_deplib." $ECHO "*** I have the capability to make that library automatically link in when" $ECHO "*** you link to this library. But I can only do this if you have a" $ECHO "*** shared version of the library, which you do not appear to have" $ECHO "*** because I did check the linker path looking for a file starting" if test -z "$potlib" ; then $ECHO "*** with $libname but no candidates were found. (...for regex pattern test)" else $ECHO "*** with $libname and none of the candidates passed a file format test" $ECHO "*** using a regex pattern. Last file checked: $potlib" fi fi ;; *) # Add a -L argument. newdeplibs="$newdeplibs $a_deplib" ;; esac done # Gone through all deplibs. ;; none | unknown | *) newdeplibs="" tmp_deplibs=`$ECHO "X $deplibs" | $Xsed \ -e 's/ -lc$//' -e 's/ -[LR][^ ]*//g'` if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then for i in $predeps $postdeps ; do # can't use Xsed below, because $i might contain '/' tmp_deplibs=`$ECHO "X $tmp_deplibs" | $Xsed -e "s,$i,,"` done fi if $ECHO "X $tmp_deplibs" | $Xsed -e 's/[ ]//g' | $GREP . >/dev/null; then $ECHO if test "X$deplibs_check_method" = "Xnone"; then $ECHO "*** Warning: inter-library dependencies are not supported in this platform." else $ECHO "*** Warning: inter-library dependencies are not known to be supported." fi $ECHO "*** All declared inter-library dependencies are being dropped." droppeddeps=yes fi ;; esac versuffix=$versuffix_save major=$major_save release=$release_save libname=$libname_save name=$name_save case $host in *-*-rhapsody* | *-*-darwin1.[012]) # On Rhapsody replace the C library with the System framework newdeplibs=`$ECHO "X $newdeplibs" | $Xsed -e 's/ -lc / System.ltframework /'` ;; esac if test "$droppeddeps" = yes; then if test "$module" = yes; then $ECHO $ECHO "*** Warning: libtool could not satisfy all declared inter-library" $ECHO "*** dependencies of module $libname. Therefore, libtool will create" $ECHO "*** a static module, that should work as long as the dlopening" $ECHO "*** application is linked with the -dlopen flag." if test -z "$global_symbol_pipe"; then $ECHO $ECHO "*** However, this would only work if libtool was able to extract symbol" $ECHO "*** lists from a program, using \`nm' or equivalent, but libtool could" $ECHO "*** not find such a program. So, this module is probably useless." $ECHO "*** \`nm' from GNU binutils and a full rebuild may help." fi if test "$build_old_libs" = no; then oldlibs="$output_objdir/$libname.$libext" build_libtool_libs=module build_old_libs=yes else build_libtool_libs=no fi else $ECHO "*** The inter-library dependencies that have been dropped here will be" $ECHO "*** automatically added whenever a program is linked with this library" $ECHO "*** or is declared to -dlopen it." if test "$allow_undefined" = no; then $ECHO $ECHO "*** Since this library must not contain undefined symbols," $ECHO "*** because either the platform does not support them or" $ECHO "*** it was explicitly requested with -no-undefined," $ECHO "*** libtool will only create a static version of it." if test "$build_old_libs" = no; then oldlibs="$output_objdir/$libname.$libext" build_libtool_libs=module build_old_libs=yes else build_libtool_libs=no fi fi fi fi # Done checking deplibs! deplibs=$newdeplibs fi # Time to change all our "foo.ltframework" stuff back to "-framework foo" case $host in *-*-darwin*) newdeplibs=`$ECHO "X $newdeplibs" | $Xsed -e 's% \([^ $]*\).ltframework% -framework \1%g'` new_inherited_linker_flags=`$ECHO "X $new_inherited_linker_flags" | $Xsed -e 's% \([^ $]*\).ltframework% -framework \1%g'` deplibs=`$ECHO "X $deplibs" | $Xsed -e 's% \([^ $]*\).ltframework% -framework \1%g'` ;; esac # move library search paths that coincide with paths to not yet # installed libraries to the beginning of the library search list new_libs= for path in $notinst_path; do case " $new_libs " in *" -L$path/$objdir "*) ;; *) case " $deplibs " in *" -L$path/$objdir "*) new_libs="$new_libs -L$path/$objdir" ;; esac ;; esac done for deplib in $deplibs; do case $deplib in -L*) case " $new_libs " in *" $deplib "*) ;; *) new_libs="$new_libs $deplib" ;; esac ;; *) new_libs="$new_libs $deplib" ;; esac done deplibs="$new_libs" # All the library-specific variables (install_libdir is set above). library_names= old_library= dlname= # Test again, we may have decided not to build it any more if test "$build_libtool_libs" = yes; then if test "$hardcode_into_libs" = yes; then # Hardcode the library paths hardcode_libdirs= dep_rpath= rpath="$finalize_rpath" test "$mode" != relink && rpath="$compile_rpath$rpath" for libdir in $rpath; do if test -n "$hardcode_libdir_flag_spec"; then if test -n "$hardcode_libdir_separator"; then if test -z "$hardcode_libdirs"; then hardcode_libdirs="$libdir" else # Just accumulate the unique libdirs. case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*) ;; *) hardcode_libdirs="$hardcode_libdirs$hardcode_libdir_separator$libdir" ;; esac fi else eval flag=\"$hardcode_libdir_flag_spec\" dep_rpath="$dep_rpath $flag" fi elif test -n "$runpath_var"; then case "$perm_rpath " in *" $libdir "*) ;; *) perm_rpath="$perm_rpath $libdir" ;; esac fi done # Substitute the hardcoded libdirs into the rpath. if test -n "$hardcode_libdir_separator" && test -n "$hardcode_libdirs"; then libdir="$hardcode_libdirs" if test -n "$hardcode_libdir_flag_spec_ld"; then eval dep_rpath=\"$hardcode_libdir_flag_spec_ld\" else eval dep_rpath=\"$hardcode_libdir_flag_spec\" fi fi if test -n "$runpath_var" && test -n "$perm_rpath"; then # We should set the runpath_var. rpath= for dir in $perm_rpath; do rpath="$rpath$dir:" done eval "$runpath_var='$rpath\$$runpath_var'; export $runpath_var" fi test -n "$dep_rpath" && deplibs="$dep_rpath $deplibs" fi shlibpath="$finalize_shlibpath" test "$mode" != relink && shlibpath="$compile_shlibpath$shlibpath" if test -n "$shlibpath"; then eval "$shlibpath_var='$shlibpath\$$shlibpath_var'; export $shlibpath_var" fi # Get the real and link names of the library. eval shared_ext=\"$shrext_cmds\" eval library_names=\"$library_names_spec\" set dummy $library_names shift realname="$1" shift if test -n "$soname_spec"; then eval soname=\"$soname_spec\" else soname="$realname" fi if test -z "$dlname"; then dlname=$soname fi lib="$output_objdir/$realname" linknames= for link do linknames="$linknames $link" done # Use standard objects if they are pic test -z "$pic_flag" && libobjs=`$ECHO "X$libobjs" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP` test "X$libobjs" = "X " && libobjs= delfiles= if test -n "$export_symbols" && test -n "$include_expsyms"; then $opt_dry_run || cp "$export_symbols" "$output_objdir/$libname.uexp" export_symbols="$output_objdir/$libname.uexp" delfiles="$delfiles $export_symbols" fi orig_export_symbols= case $host_os in cygwin* | mingw* | cegcc*) if test -n "$export_symbols" && test -z "$export_symbols_regex"; then # exporting using user supplied symfile if test "x`$SED 1q $export_symbols`" != xEXPORTS; then # and it's NOT already a .def file. Must figure out # which of the given symbols are data symbols and tag # them as such. So, trigger use of export_symbols_cmds. # export_symbols gets reassigned inside the "prepare # the list of exported symbols" if statement, so the # include_expsyms logic still works. orig_export_symbols="$export_symbols" export_symbols= always_export_symbols=yes fi fi ;; esac # Prepare the list of exported symbols if test -z "$export_symbols"; then if test "$always_export_symbols" = yes || test -n "$export_symbols_regex"; then func_verbose "generating symbol list for \`$libname.la'" export_symbols="$output_objdir/$libname.exp" $opt_dry_run || $RM $export_symbols cmds=$export_symbols_cmds save_ifs="$IFS"; IFS='~' for cmd in $cmds; do IFS="$save_ifs" eval cmd=\"$cmd\" func_len " $cmd" len=$func_len_result if test "$len" -lt "$max_cmd_len" || test "$max_cmd_len" -le -1; then func_show_eval "$cmd" 'exit $?' skipped_export=false else # The command line is too long to execute in one step. func_verbose "using reloadable object file for export list..." skipped_export=: # Break out early, otherwise skipped_export may be # set to false by a later but shorter cmd. break fi done IFS="$save_ifs" if test -n "$export_symbols_regex" && test "X$skipped_export" != "X:"; then func_show_eval '$EGREP -e "$export_symbols_regex" "$export_symbols" > "${export_symbols}T"' func_show_eval '$MV "${export_symbols}T" "$export_symbols"' fi fi fi if test -n "$export_symbols" && test -n "$include_expsyms"; then tmp_export_symbols="$export_symbols" test -n "$orig_export_symbols" && tmp_export_symbols="$orig_export_symbols" $opt_dry_run || eval '$ECHO "X$include_expsyms" | $Xsed | $SP2NL >> "$tmp_export_symbols"' fi if test "X$skipped_export" != "X:" && test -n "$orig_export_symbols"; then # The given exports_symbols file has to be filtered, so filter it. func_verbose "filter symbol list for \`$libname.la' to tag DATA exports" # FIXME: $output_objdir/$libname.filter potentially contains lots of # 's' commands which not all seds can handle. GNU sed should be fine # though. Also, the filter scales superlinearly with the number of # global variables. join(1) would be nice here, but unfortunately # isn't a blessed tool. $opt_dry_run || $SED -e '/[ ,]DATA/!d;s,\(.*\)\([ \,].*\),s|^\1$|\1\2|,' < $export_symbols > $output_objdir/$libname.filter delfiles="$delfiles $export_symbols $output_objdir/$libname.filter" export_symbols=$output_objdir/$libname.def $opt_dry_run || $SED -f $output_objdir/$libname.filter < $orig_export_symbols > $export_symbols fi tmp_deplibs= for test_deplib in $deplibs; do case " $convenience " in *" $test_deplib "*) ;; *) tmp_deplibs="$tmp_deplibs $test_deplib" ;; esac done deplibs="$tmp_deplibs" if test -n "$convenience"; then if test -n "$whole_archive_flag_spec" && test "$compiler_needs_object" = yes && test -z "$libobjs"; then # extract the archives, so we have objects to list. # TODO: could optimize this to just extract one archive. whole_archive_flag_spec= fi if test -n "$whole_archive_flag_spec"; then save_libobjs=$libobjs eval libobjs=\"\$libobjs $whole_archive_flag_spec\" test "X$libobjs" = "X " && libobjs= else gentop="$output_objdir/${outputname}x" generated="$generated $gentop" func_extract_archives $gentop $convenience libobjs="$libobjs $func_extract_archives_result" test "X$libobjs" = "X " && libobjs= fi fi if test "$thread_safe" = yes && test -n "$thread_safe_flag_spec"; then eval flag=\"$thread_safe_flag_spec\" linker_flags="$linker_flags $flag" fi # Make a backup of the uninstalled library when relinking if test "$mode" = relink; then $opt_dry_run || eval '(cd $output_objdir && $RM ${realname}U && $MV $realname ${realname}U)' || exit $? fi # Do each of the archive commands. if test "$module" = yes && test -n "$module_cmds" ; then if test -n "$export_symbols" && test -n "$module_expsym_cmds"; then eval test_cmds=\"$module_expsym_cmds\" cmds=$module_expsym_cmds else eval test_cmds=\"$module_cmds\" cmds=$module_cmds fi else if test -n "$export_symbols" && test -n "$archive_expsym_cmds"; then eval test_cmds=\"$archive_expsym_cmds\" cmds=$archive_expsym_cmds else eval test_cmds=\"$archive_cmds\" cmds=$archive_cmds fi fi if test "X$skipped_export" != "X:" && func_len " $test_cmds" && len=$func_len_result && test "$len" -lt "$max_cmd_len" || test "$max_cmd_len" -le -1; then : else # The command line is too long to link in one step, link piecewise # or, if using GNU ld and skipped_export is not :, use a linker # script. # Save the value of $output and $libobjs because we want to # use them later. If we have whole_archive_flag_spec, we # want to use save_libobjs as it was before # whole_archive_flag_spec was expanded, because we can't # assume the linker understands whole_archive_flag_spec. # This may have to be revisited, in case too many # convenience libraries get linked in and end up exceeding # the spec. if test -z "$convenience" || test -z "$whole_archive_flag_spec"; then save_libobjs=$libobjs fi save_output=$output output_la=`$ECHO "X$output" | $Xsed -e "$basename"` # Clear the reloadable object creation command queue and # initialize k to one. test_cmds= concat_cmds= objlist= last_robj= k=1 if test -n "$save_libobjs" && test "X$skipped_export" != "X:" && test "$with_gnu_ld" = yes; then output=${output_objdir}/${output_la}.lnkscript func_verbose "creating GNU ld script: $output" $ECHO 'INPUT (' > $output for obj in $save_libobjs do $ECHO "$obj" >> $output done $ECHO ')' >> $output delfiles="$delfiles $output" elif test -n "$save_libobjs" && test "X$skipped_export" != "X:" && test "X$file_list_spec" != X; then output=${output_objdir}/${output_la}.lnk func_verbose "creating linker input file list: $output" : > $output set x $save_libobjs shift firstobj= if test "$compiler_needs_object" = yes; then firstobj="$1 " shift fi for obj do $ECHO "$obj" >> $output done delfiles="$delfiles $output" output=$firstobj\"$file_list_spec$output\" else if test -n "$save_libobjs"; then func_verbose "creating reloadable object files..." output=$output_objdir/$output_la-${k}.$objext eval test_cmds=\"$reload_cmds\" func_len " $test_cmds" len0=$func_len_result len=$len0 # Loop over the list of objects to be linked. for obj in $save_libobjs do func_len " $obj" func_arith $len + $func_len_result len=$func_arith_result if test "X$objlist" = X || test "$len" -lt "$max_cmd_len"; then func_append objlist " $obj" else # The command $test_cmds is almost too long, add a # command to the queue. if test "$k" -eq 1 ; then # The first file doesn't have a previous command to add. eval concat_cmds=\"$reload_cmds $objlist $last_robj\" else # All subsequent reloadable object files will link in # the last one created. eval concat_cmds=\"\$concat_cmds~$reload_cmds $objlist $last_robj~\$RM $last_robj\" fi last_robj=$output_objdir/$output_la-${k}.$objext func_arith $k + 1 k=$func_arith_result output=$output_objdir/$output_la-${k}.$objext objlist=$obj func_len " $last_robj" func_arith $len0 + $func_len_result len=$func_arith_result fi done # Handle the remaining objects by creating one last # reloadable object file. All subsequent reloadable object # files will link in the last one created. test -z "$concat_cmds" || concat_cmds=$concat_cmds~ eval concat_cmds=\"\${concat_cmds}$reload_cmds $objlist $last_robj\" if test -n "$last_robj"; then eval concat_cmds=\"\${concat_cmds}~\$RM $last_robj\" fi delfiles="$delfiles $output" else output= fi if ${skipped_export-false}; then func_verbose "generating symbol list for \`$libname.la'" export_symbols="$output_objdir/$libname.exp" $opt_dry_run || $RM $export_symbols libobjs=$output # Append the command to create the export file. test -z "$concat_cmds" || concat_cmds=$concat_cmds~ eval concat_cmds=\"\$concat_cmds$export_symbols_cmds\" if test -n "$last_robj"; then eval concat_cmds=\"\$concat_cmds~\$RM $last_robj\" fi fi test -n "$save_libobjs" && func_verbose "creating a temporary reloadable object file: $output" # Loop through the commands generated above and execute them. save_ifs="$IFS"; IFS='~' for cmd in $concat_cmds; do IFS="$save_ifs" $opt_silent || { func_quote_for_expand "$cmd" eval "func_echo $func_quote_for_expand_result" } $opt_dry_run || eval "$cmd" || { lt_exit=$? # Restore the uninstalled library and exit if test "$mode" = relink; then ( cd "$output_objdir" && \ $RM "${realname}T" && \ $MV "${realname}U" "$realname" ) fi exit $lt_exit } done IFS="$save_ifs" if test -n "$export_symbols_regex" && ${skipped_export-false}; then func_show_eval '$EGREP -e "$export_symbols_regex" "$export_symbols" > "${export_symbols}T"' func_show_eval '$MV "${export_symbols}T" "$export_symbols"' fi fi if ${skipped_export-false}; then if test -n "$export_symbols" && test -n "$include_expsyms"; then tmp_export_symbols="$export_symbols" test -n "$orig_export_symbols" && tmp_export_symbols="$orig_export_symbols" $opt_dry_run || eval '$ECHO "X$include_expsyms" | $Xsed | $SP2NL >> "$tmp_export_symbols"' fi if test -n "$orig_export_symbols"; then # The given exports_symbols file has to be filtered, so filter it. func_verbose "filter symbol list for \`$libname.la' to tag DATA exports" # FIXME: $output_objdir/$libname.filter potentially contains lots of # 's' commands which not all seds can handle. GNU sed should be fine # though. Also, the filter scales superlinearly with the number of # global variables. join(1) would be nice here, but unfortunately # isn't a blessed tool. $opt_dry_run || $SED -e '/[ ,]DATA/!d;s,\(.*\)\([ \,].*\),s|^\1$|\1\2|,' < $export_symbols > $output_objdir/$libname.filter delfiles="$delfiles $export_symbols $output_objdir/$libname.filter" export_symbols=$output_objdir/$libname.def $opt_dry_run || $SED -f $output_objdir/$libname.filter < $orig_export_symbols > $export_symbols fi fi libobjs=$output # Restore the value of output. output=$save_output if test -n "$convenience" && test -n "$whole_archive_flag_spec"; then eval libobjs=\"\$libobjs $whole_archive_flag_spec\" test "X$libobjs" = "X " && libobjs= fi # Expand the library linking commands again to reset the # value of $libobjs for piecewise linking. # Do each of the archive commands. if test "$module" = yes && test -n "$module_cmds" ; then if test -n "$export_symbols" && test -n "$module_expsym_cmds"; then cmds=$module_expsym_cmds else cmds=$module_cmds fi else if test -n "$export_symbols" && test -n "$archive_expsym_cmds"; then cmds=$archive_expsym_cmds else cmds=$archive_cmds fi fi fi if test -n "$delfiles"; then # Append the command to remove temporary files to $cmds. eval cmds=\"\$cmds~\$RM $delfiles\" fi # Add any objects from preloaded convenience libraries if test -n "$dlprefiles"; then gentop="$output_objdir/${outputname}x" generated="$generated $gentop" func_extract_archives $gentop $dlprefiles libobjs="$libobjs $func_extract_archives_result" test "X$libobjs" = "X " && libobjs= fi save_ifs="$IFS"; IFS='~' for cmd in $cmds; do IFS="$save_ifs" eval cmd=\"$cmd\" $opt_silent || { func_quote_for_expand "$cmd" eval "func_echo $func_quote_for_expand_result" } $opt_dry_run || eval "$cmd" || { lt_exit=$? # Restore the uninstalled library and exit if test "$mode" = relink; then ( cd "$output_objdir" && \ $RM "${realname}T" && \ $MV "${realname}U" "$realname" ) fi exit $lt_exit } done IFS="$save_ifs" # Restore the uninstalled library and exit if test "$mode" = relink; then $opt_dry_run || eval '(cd $output_objdir && $RM ${realname}T && $MV $realname ${realname}T && $MV ${realname}U $realname)' || exit $? if test -n "$convenience"; then if test -z "$whole_archive_flag_spec"; then func_show_eval '${RM}r "$gentop"' fi fi exit $EXIT_SUCCESS fi # Create links to the real library. for linkname in $linknames; do if test "$realname" != "$linkname"; then func_show_eval '(cd "$output_objdir" && $RM "$linkname" && $LN_S "$realname" "$linkname")' 'exit $?' fi done # If -module or -export-dynamic was specified, set the dlname. if test "$module" = yes || test "$export_dynamic" = yes; then # On all known operating systems, these are identical. dlname="$soname" fi fi ;; obj) if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then func_warning "\`-dlopen' is ignored for objects" fi case " $deplibs" in *\ -l* | *\ -L*) func_warning "\`-l' and \`-L' are ignored for objects" ;; esac test -n "$rpath" && \ func_warning "\`-rpath' is ignored for objects" test -n "$xrpath" && \ func_warning "\`-R' is ignored for objects" test -n "$vinfo" && \ func_warning "\`-version-info' is ignored for objects" test -n "$release" && \ func_warning "\`-release' is ignored for objects" case $output in *.lo) test -n "$objs$old_deplibs" && \ func_fatal_error "cannot build library object \`$output' from non-libtool objects" libobj=$output func_lo2o "$libobj" obj=$func_lo2o_result ;; *) libobj= obj="$output" ;; esac # Delete the old objects. $opt_dry_run || $RM $obj $libobj # Objects from convenience libraries. This assumes # single-version convenience libraries. Whenever we create # different ones for PIC/non-PIC, this we'll have to duplicate # the extraction. reload_conv_objs= gentop= # reload_cmds runs $LD directly, so let us get rid of # -Wl from whole_archive_flag_spec and hope we can get by with # turning comma into space.. wl= if test -n "$convenience"; then if test -n "$whole_archive_flag_spec"; then eval tmp_whole_archive_flags=\"$whole_archive_flag_spec\" reload_conv_objs=$reload_objs\ `$ECHO "X$tmp_whole_archive_flags" | $Xsed -e 's|,| |g'` else gentop="$output_objdir/${obj}x" generated="$generated $gentop" func_extract_archives $gentop $convenience reload_conv_objs="$reload_objs $func_extract_archives_result" fi fi # Create the old-style object. reload_objs="$objs$old_deplibs "`$ECHO "X$libobjs" | $SP2NL | $Xsed -e '/\.'${libext}$'/d' -e '/\.lib$/d' -e "$lo2o" | $NL2SP`" $reload_conv_objs" ### testsuite: skip nested quoting test output="$obj" func_execute_cmds "$reload_cmds" 'exit $?' # Exit if we aren't doing a library object file. if test -z "$libobj"; then if test -n "$gentop"; then func_show_eval '${RM}r "$gentop"' fi exit $EXIT_SUCCESS fi if test "$build_libtool_libs" != yes; then if test -n "$gentop"; then func_show_eval '${RM}r "$gentop"' fi # Create an invalid libtool object if no PIC, so that we don't # accidentally link it into a program. # $show "echo timestamp > $libobj" # $opt_dry_run || eval "echo timestamp > $libobj" || exit $? exit $EXIT_SUCCESS fi if test -n "$pic_flag" || test "$pic_mode" != default; then # Only do commands if we really have different PIC objects. reload_objs="$libobjs $reload_conv_objs" output="$libobj" func_execute_cmds "$reload_cmds" 'exit $?' fi if test -n "$gentop"; then func_show_eval '${RM}r "$gentop"' fi exit $EXIT_SUCCESS ;; prog) case $host in *cygwin*) func_stripname '' '.exe' "$output" output=$func_stripname_result.exe;; esac test -n "$vinfo" && \ func_warning "\`-version-info' is ignored for programs" test -n "$release" && \ func_warning "\`-release' is ignored for programs" test "$preload" = yes \ && test "$dlopen_support" = unknown \ && test "$dlopen_self" = unknown \ && test "$dlopen_self_static" = unknown && \ func_warning "\`LT_INIT([dlopen])' not used. Assuming no dlopen support." case $host in *-*-rhapsody* | *-*-darwin1.[012]) # On Rhapsody replace the C library is the System framework compile_deplibs=`$ECHO "X $compile_deplibs" | $Xsed -e 's/ -lc / System.ltframework /'` finalize_deplibs=`$ECHO "X $finalize_deplibs" | $Xsed -e 's/ -lc / System.ltframework /'` ;; esac case $host in *-*-darwin*) # Don't allow lazy linking, it breaks C++ global constructors # But is supposedly fixed on 10.4 or later (yay!). if test "$tagname" = CXX ; then case ${MACOSX_DEPLOYMENT_TARGET-10.0} in 10.[0123]) compile_command="$compile_command ${wl}-bind_at_load" finalize_command="$finalize_command ${wl}-bind_at_load" ;; esac fi # Time to change all our "foo.ltframework" stuff back to "-framework foo" compile_deplibs=`$ECHO "X $compile_deplibs" | $Xsed -e 's% \([^ $]*\).ltframework% -framework \1%g'` finalize_deplibs=`$ECHO "X $finalize_deplibs" | $Xsed -e 's% \([^ $]*\).ltframework% -framework \1%g'` ;; esac # move library search paths that coincide with paths to not yet # installed libraries to the beginning of the library search list new_libs= for path in $notinst_path; do case " $new_libs " in *" -L$path/$objdir "*) ;; *) case " $compile_deplibs " in *" -L$path/$objdir "*) new_libs="$new_libs -L$path/$objdir" ;; esac ;; esac done for deplib in $compile_deplibs; do case $deplib in -L*) case " $new_libs " in *" $deplib "*) ;; *) new_libs="$new_libs $deplib" ;; esac ;; *) new_libs="$new_libs $deplib" ;; esac done compile_deplibs="$new_libs" compile_command="$compile_command $compile_deplibs" finalize_command="$finalize_command $finalize_deplibs" if test -n "$rpath$xrpath"; then # If the user specified any rpath flags, then add them. for libdir in $rpath $xrpath; do # This is the magic to use -rpath. case "$finalize_rpath " in *" $libdir "*) ;; *) finalize_rpath="$finalize_rpath $libdir" ;; esac done fi # Now hardcode the library paths rpath= hardcode_libdirs= for libdir in $compile_rpath $finalize_rpath; do if test -n "$hardcode_libdir_flag_spec"; then if test -n "$hardcode_libdir_separator"; then if test -z "$hardcode_libdirs"; then hardcode_libdirs="$libdir" else # Just accumulate the unique libdirs. case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*) ;; *) hardcode_libdirs="$hardcode_libdirs$hardcode_libdir_separator$libdir" ;; esac fi else eval flag=\"$hardcode_libdir_flag_spec\" rpath="$rpath $flag" fi elif test -n "$runpath_var"; then case "$perm_rpath " in *" $libdir "*) ;; *) perm_rpath="$perm_rpath $libdir" ;; esac fi case $host in *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-cegcc*) testbindir=`${ECHO} "$libdir" | ${SED} -e 's*/lib$*/bin*'` case :$dllsearchpath: in *":$libdir:"*) ;; ::) dllsearchpath=$libdir;; *) dllsearchpath="$dllsearchpath:$libdir";; esac case :$dllsearchpath: in *":$testbindir:"*) ;; ::) dllsearchpath=$testbindir;; *) dllsearchpath="$dllsearchpath:$testbindir";; esac ;; esac done # Substitute the hardcoded libdirs into the rpath. if test -n "$hardcode_libdir_separator" && test -n "$hardcode_libdirs"; then libdir="$hardcode_libdirs" eval rpath=\" $hardcode_libdir_flag_spec\" fi compile_rpath="$rpath" rpath= hardcode_libdirs= for libdir in $finalize_rpath; do if test -n "$hardcode_libdir_flag_spec"; then if test -n "$hardcode_libdir_separator"; then if test -z "$hardcode_libdirs"; then hardcode_libdirs="$libdir" else # Just accumulate the unique libdirs. case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*) ;; *) hardcode_libdirs="$hardcode_libdirs$hardcode_libdir_separator$libdir" ;; esac fi else eval flag=\"$hardcode_libdir_flag_spec\" rpath="$rpath $flag" fi elif test -n "$runpath_var"; then case "$finalize_perm_rpath " in *" $libdir "*) ;; *) finalize_perm_rpath="$finalize_perm_rpath $libdir" ;; esac fi done # Substitute the hardcoded libdirs into the rpath. if test -n "$hardcode_libdir_separator" && test -n "$hardcode_libdirs"; then libdir="$hardcode_libdirs" eval rpath=\" $hardcode_libdir_flag_spec\" fi finalize_rpath="$rpath" if test -n "$libobjs" && test "$build_old_libs" = yes; then # Transform all the library objects into standard objects. compile_command=`$ECHO "X$compile_command" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP` finalize_command=`$ECHO "X$finalize_command" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP` fi func_generate_dlsyms "$outputname" "@PROGRAM@" "no" # template prelinking step if test -n "$prelink_cmds"; then func_execute_cmds "$prelink_cmds" 'exit $?' fi wrappers_required=yes case $host in *cygwin* | *mingw* ) if test "$build_libtool_libs" != yes; then wrappers_required=no fi ;; *cegcc) # Disable wrappers for cegcc, we are cross compiling anyway. wrappers_required=no ;; *) if test "$need_relink" = no || test "$build_libtool_libs" != yes; then wrappers_required=no fi ;; esac if test "$wrappers_required" = no; then # Replace the output file specification. compile_command=`$ECHO "X$compile_command" | $Xsed -e 's%@OUTPUT@%'"$output"'%g'` link_command="$compile_command$compile_rpath" # We have no uninstalled library dependencies, so finalize right now. exit_status=0 func_show_eval "$link_command" 'exit_status=$?' # Delete the generated files. if test -f "$output_objdir/${outputname}S.${objext}"; then func_show_eval '$RM "$output_objdir/${outputname}S.${objext}"' fi exit $exit_status fi if test -n "$compile_shlibpath$finalize_shlibpath"; then compile_command="$shlibpath_var=\"$compile_shlibpath$finalize_shlibpath\$$shlibpath_var\" $compile_command" fi if test -n "$finalize_shlibpath"; then finalize_command="$shlibpath_var=\"$finalize_shlibpath\$$shlibpath_var\" $finalize_command" fi compile_var= finalize_var= if test -n "$runpath_var"; then if test -n "$perm_rpath"; then # We should set the runpath_var. rpath= for dir in $perm_rpath; do rpath="$rpath$dir:" done compile_var="$runpath_var=\"$rpath\$$runpath_var\" " fi if test -n "$finalize_perm_rpath"; then # We should set the runpath_var. rpath= for dir in $finalize_perm_rpath; do rpath="$rpath$dir:" done finalize_var="$runpath_var=\"$rpath\$$runpath_var\" " fi fi if test "$no_install" = yes; then # We don't need to create a wrapper script. link_command="$compile_var$compile_command$compile_rpath" # Replace the output file specification. link_command=`$ECHO "X$link_command" | $Xsed -e 's%@OUTPUT@%'"$output"'%g'` # Delete the old output file. $opt_dry_run || $RM $output # Link the executable and exit func_show_eval "$link_command" 'exit $?' exit $EXIT_SUCCESS fi if test "$hardcode_action" = relink; then # Fast installation is not supported link_command="$compile_var$compile_command$compile_rpath" relink_command="$finalize_var$finalize_command$finalize_rpath" func_warning "this platform does not like uninstalled shared libraries" func_warning "\`$output' will be relinked during installation" else if test "$fast_install" != no; then link_command="$finalize_var$compile_command$finalize_rpath" if test "$fast_install" = yes; then relink_command=`$ECHO "X$compile_var$compile_command$compile_rpath" | $Xsed -e 's%@OUTPUT@%\$progdir/\$file%g'` else # fast_install is set to needless relink_command= fi else link_command="$compile_var$compile_command$compile_rpath" relink_command="$finalize_var$finalize_command$finalize_rpath" fi fi # Replace the output file specification. link_command=`$ECHO "X$link_command" | $Xsed -e 's%@OUTPUT@%'"$output_objdir/$outputname"'%g'` # Delete the old output files. $opt_dry_run || $RM $output $output_objdir/$outputname $output_objdir/lt-$outputname func_show_eval "$link_command" 'exit $?' # Now create the wrapper script. func_verbose "creating $output" # Quote the relink command for shipping. if test -n "$relink_command"; then # Preserve any variables that may affect compiler behavior for var in $variables_saved_for_relink; do if eval test -z \"\${$var+set}\"; then relink_command="{ test -z \"\${$var+set}\" || $lt_unset $var || { $var=; export $var; }; }; $relink_command" elif eval var_value=\$$var; test -z "$var_value"; then relink_command="$var=; export $var; $relink_command" else func_quote_for_eval "$var_value" relink_command="$var=$func_quote_for_eval_result; export $var; $relink_command" fi done relink_command="(cd `pwd`; $relink_command)" relink_command=`$ECHO "X$relink_command" | $Xsed -e "$sed_quote_subst"` fi # Quote $ECHO for shipping. if test "X$ECHO" = "X$SHELL $progpath --fallback-echo"; then case $progpath in [\\/]* | [A-Za-z]:[\\/]*) qecho="$SHELL $progpath --fallback-echo";; *) qecho="$SHELL `pwd`/$progpath --fallback-echo";; esac qecho=`$ECHO "X$qecho" | $Xsed -e "$sed_quote_subst"` else qecho=`$ECHO "X$ECHO" | $Xsed -e "$sed_quote_subst"` fi # Only actually do things if not in dry run mode. $opt_dry_run || { # win32 will think the script is a binary if it has # a .exe suffix, so we strip it off here. case $output in *.exe) func_stripname '' '.exe' "$output" output=$func_stripname_result ;; esac # test for cygwin because mv fails w/o .exe extensions case $host in *cygwin*) exeext=.exe func_stripname '' '.exe' "$outputname" outputname=$func_stripname_result ;; *) exeext= ;; esac case $host in *cygwin* | *mingw* ) func_dirname_and_basename "$output" "" "." output_name=$func_basename_result output_path=$func_dirname_result cwrappersource="$output_path/$objdir/lt-$output_name.c" cwrapper="$output_path/$output_name.exe" $RM $cwrappersource $cwrapper trap "$RM $cwrappersource $cwrapper; exit $EXIT_FAILURE" 1 2 15 func_emit_cwrapperexe_src > $cwrappersource # The wrapper executable is built using the $host compiler, # because it contains $host paths and files. If cross- # compiling, it, like the target executable, must be # executed on the $host or under an emulation environment. $opt_dry_run || { $LTCC $LTCFLAGS -o $cwrapper $cwrappersource $STRIP $cwrapper } # Now, create the wrapper script for func_source use: func_ltwrapper_scriptname $cwrapper $RM $func_ltwrapper_scriptname_result trap "$RM $func_ltwrapper_scriptname_result; exit $EXIT_FAILURE" 1 2 15 $opt_dry_run || { # note: this script will not be executed, so do not chmod. if test "x$build" = "x$host" ; then $cwrapper --lt-dump-script > $func_ltwrapper_scriptname_result else func_emit_wrapper no > $func_ltwrapper_scriptname_result fi } ;; * ) $RM $output trap "$RM $output; exit $EXIT_FAILURE" 1 2 15 func_emit_wrapper no > $output chmod +x $output ;; esac } exit $EXIT_SUCCESS ;; esac # See if we need to build an old-fashioned archive. for oldlib in $oldlibs; do if test "$build_libtool_libs" = convenience; then oldobjs="$libobjs_save $symfileobj" addlibs="$convenience" build_libtool_libs=no else if test "$build_libtool_libs" = module; then oldobjs="$libobjs_save" build_libtool_libs=no else oldobjs="$old_deplibs $non_pic_objects" if test "$preload" = yes && test -f "$symfileobj"; then oldobjs="$oldobjs $symfileobj" fi fi addlibs="$old_convenience" fi if test -n "$addlibs"; then gentop="$output_objdir/${outputname}x" generated="$generated $gentop" func_extract_archives $gentop $addlibs oldobjs="$oldobjs $func_extract_archives_result" fi # Do each command in the archive commands. if test -n "$old_archive_from_new_cmds" && test "$build_libtool_libs" = yes; then cmds=$old_archive_from_new_cmds else # Add any objects from preloaded convenience libraries if test -n "$dlprefiles"; then gentop="$output_objdir/${outputname}x" generated="$generated $gentop" func_extract_archives $gentop $dlprefiles oldobjs="$oldobjs $func_extract_archives_result" fi # POSIX demands no paths to be encoded in archives. We have # to avoid creating archives with duplicate basenames if we # might have to extract them afterwards, e.g., when creating a # static archive out of a convenience library, or when linking # the entirety of a libtool archive into another (currently # not supported by libtool). if (for obj in $oldobjs do func_basename "$obj" $ECHO "$func_basename_result" done | sort | sort -uc >/dev/null 2>&1); then : else $ECHO "copying selected object files to avoid basename conflicts..." gentop="$output_objdir/${outputname}x" generated="$generated $gentop" func_mkdir_p "$gentop" save_oldobjs=$oldobjs oldobjs= counter=1 for obj in $save_oldobjs do func_basename "$obj" objbase="$func_basename_result" case " $oldobjs " in " ") oldobjs=$obj ;; *[\ /]"$objbase "*) while :; do # Make sure we don't pick an alternate name that also # overlaps. newobj=lt$counter-$objbase func_arith $counter + 1 counter=$func_arith_result case " $oldobjs " in *[\ /]"$newobj "*) ;; *) if test ! -f "$gentop/$newobj"; then break; fi ;; esac done func_show_eval "ln $obj $gentop/$newobj || cp $obj $gentop/$newobj" oldobjs="$oldobjs $gentop/$newobj" ;; *) oldobjs="$oldobjs $obj" ;; esac done fi eval cmds=\"$old_archive_cmds\" func_len " $cmds" len=$func_len_result if test "$len" -lt "$max_cmd_len" || test "$max_cmd_len" -le -1; then cmds=$old_archive_cmds else # the command line is too long to link in one step, link in parts func_verbose "using piecewise archive linking..." save_RANLIB=$RANLIB RANLIB=: objlist= concat_cmds= save_oldobjs=$oldobjs oldobjs= # Is there a better way of finding the last object in the list? for obj in $save_oldobjs do last_oldobj=$obj done eval test_cmds=\"$old_archive_cmds\" func_len " $test_cmds" len0=$func_len_result len=$len0 for obj in $save_oldobjs do func_len " $obj" func_arith $len + $func_len_result len=$func_arith_result func_append objlist " $obj" if test "$len" -lt "$max_cmd_len"; then : else # the above command should be used before it gets too long oldobjs=$objlist if test "$obj" = "$last_oldobj" ; then RANLIB=$save_RANLIB fi test -z "$concat_cmds" || concat_cmds=$concat_cmds~ eval concat_cmds=\"\${concat_cmds}$old_archive_cmds\" objlist= len=$len0 fi done RANLIB=$save_RANLIB oldobjs=$objlist if test "X$oldobjs" = "X" ; then eval cmds=\"\$concat_cmds\" else eval cmds=\"\$concat_cmds~\$old_archive_cmds\" fi fi fi func_execute_cmds "$cmds" 'exit $?' done test -n "$generated" && \ func_show_eval "${RM}r$generated" # Now create the libtool archive. case $output in *.la) old_library= test "$build_old_libs" = yes && old_library="$libname.$libext" func_verbose "creating $output" # Preserve any variables that may affect compiler behavior for var in $variables_saved_for_relink; do if eval test -z \"\${$var+set}\"; then relink_command="{ test -z \"\${$var+set}\" || $lt_unset $var || { $var=; export $var; }; }; $relink_command" elif eval var_value=\$$var; test -z "$var_value"; then relink_command="$var=; export $var; $relink_command" else func_quote_for_eval "$var_value" relink_command="$var=$func_quote_for_eval_result; export $var; $relink_command" fi done # Quote the link command for shipping. relink_command="(cd `pwd`; $SHELL $progpath $preserve_args --mode=relink $libtool_args @inst_prefix_dir@)" relink_command=`$ECHO "X$relink_command" | $Xsed -e "$sed_quote_subst"` if test "$hardcode_automatic" = yes ; then relink_command= fi # Only create the output if not a dry run. $opt_dry_run || { for installed in no yes; do if test "$installed" = yes; then if test -z "$install_libdir"; then break fi output="$output_objdir/$outputname"i # Replace all uninstalled libtool libraries with the installed ones newdependency_libs= for deplib in $dependency_libs; do case $deplib in *.la) func_basename "$deplib" name="$func_basename_result" eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $deplib` test -z "$libdir" && \ func_fatal_error "\`$deplib' is not a valid libtool archive" newdependency_libs="$newdependency_libs $libdir/$name" ;; *) newdependency_libs="$newdependency_libs $deplib" ;; esac done dependency_libs="$newdependency_libs" newdlfiles= for lib in $dlfiles; do case $lib in *.la) func_basename "$lib" name="$func_basename_result" eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $lib` test -z "$libdir" && \ func_fatal_error "\`$lib' is not a valid libtool archive" newdlfiles="$newdlfiles $libdir/$name" ;; *) newdlfiles="$newdlfiles $lib" ;; esac done dlfiles="$newdlfiles" newdlprefiles= for lib in $dlprefiles; do case $lib in *.la) # Only pass preopened files to the pseudo-archive (for # eventual linking with the app. that links it) if we # didn't already link the preopened objects directly into # the library: func_basename "$lib" name="$func_basename_result" eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $lib` test -z "$libdir" && \ func_fatal_error "\`$lib' is not a valid libtool archive" newdlprefiles="$newdlprefiles $libdir/$name" ;; esac done dlprefiles="$newdlprefiles" else newdlfiles= for lib in $dlfiles; do case $lib in [\\/]* | [A-Za-z]:[\\/]*) abs="$lib" ;; *) abs=`pwd`"/$lib" ;; esac newdlfiles="$newdlfiles $abs" done dlfiles="$newdlfiles" newdlprefiles= for lib in $dlprefiles; do case $lib in [\\/]* | [A-Za-z]:[\\/]*) abs="$lib" ;; *) abs=`pwd`"/$lib" ;; esac newdlprefiles="$newdlprefiles $abs" done dlprefiles="$newdlprefiles" fi $RM $output # place dlname in correct position for cygwin tdlname=$dlname case $host,$output,$installed,$module,$dlname in *cygwin*,*lai,yes,no,*.dll | *mingw*,*lai,yes,no,*.dll | *cegcc*,*lai,yes,no,*.dll) tdlname=../bin/$dlname ;; esac $ECHO > $output "\ # $outputname - a libtool library file # Generated by $PROGRAM (GNU $PACKAGE$TIMESTAMP) $VERSION # # Please DO NOT delete this file! # It is necessary for linking the library. # The name that we can dlopen(3). dlname='$tdlname' # Names of this library. library_names='$library_names' # The name of the static archive. old_library='$old_library' # Linker flags that can not go in dependency_libs. inherited_linker_flags='$new_inherited_linker_flags' # Libraries that this one depends upon. dependency_libs='$dependency_libs' # Names of additional weak libraries provided by this library weak_library_names='$weak_libs' # Version information for $libname. current=$current age=$age revision=$revision # Is this an already installed library? installed=$installed # Should we warn about portability when linking against -modules? shouldnotlink=$module # Files to dlopen/dlpreopen dlopen='$dlfiles' dlpreopen='$dlprefiles' # Directory that this library needs to be installed in: libdir='$install_libdir'" if test "$installed" = no && test "$need_relink" = yes; then $ECHO >> $output "\ relink_command=\"$relink_command\"" fi done } # Do a symbolic link so that the libtool archive can be found in # LD_LIBRARY_PATH before the program is installed. func_show_eval '( cd "$output_objdir" && $RM "$outputname" && $LN_S "../$outputname" "$outputname" )' 'exit $?' ;; esac exit $EXIT_SUCCESS } { test "$mode" = link || test "$mode" = relink; } && func_mode_link ${1+"$@"} # func_mode_uninstall arg... func_mode_uninstall () { $opt_debug RM="$nonopt" files= rmforce= exit_status=0 # This variable tells wrapper scripts just to set variables rather # than running their programs. libtool_install_magic="$magic" for arg do case $arg in -f) RM="$RM $arg"; rmforce=yes ;; -*) RM="$RM $arg" ;; *) files="$files $arg" ;; esac done test -z "$RM" && \ func_fatal_help "you must specify an RM program" rmdirs= origobjdir="$objdir" for file in $files; do func_dirname "$file" "" "." dir="$func_dirname_result" if test "X$dir" = X.; then objdir="$origobjdir" else objdir="$dir/$origobjdir" fi func_basename "$file" name="$func_basename_result" test "$mode" = uninstall && objdir="$dir" # Remember objdir for removal later, being careful to avoid duplicates if test "$mode" = clean; then case " $rmdirs " in *" $objdir "*) ;; *) rmdirs="$rmdirs $objdir" ;; esac fi # Don't error if the file doesn't exist and rm -f was used. if { test -L "$file"; } >/dev/null 2>&1 || { test -h "$file"; } >/dev/null 2>&1 || test -f "$file"; then : elif test -d "$file"; then exit_status=1 continue elif test "$rmforce" = yes; then continue fi rmfiles="$file" case $name in *.la) # Possibly a libtool archive, so verify it. if func_lalib_p "$file"; then func_source $dir/$name # Delete the libtool libraries and symlinks. for n in $library_names; do rmfiles="$rmfiles $objdir/$n" done test -n "$old_library" && rmfiles="$rmfiles $objdir/$old_library" case "$mode" in clean) case " $library_names " in # " " in the beginning catches empty $dlname *" $dlname "*) ;; *) rmfiles="$rmfiles $objdir/$dlname" ;; esac test -n "$libdir" && rmfiles="$rmfiles $objdir/$name $objdir/${name}i" ;; uninstall) if test -n "$library_names"; then # Do each command in the postuninstall commands. func_execute_cmds "$postuninstall_cmds" 'test "$rmforce" = yes || exit_status=1' fi if test -n "$old_library"; then # Do each command in the old_postuninstall commands. func_execute_cmds "$old_postuninstall_cmds" 'test "$rmforce" = yes || exit_status=1' fi # FIXME: should reinstall the best remaining shared library. ;; esac fi ;; *.lo) # Possibly a libtool object, so verify it. if func_lalib_p "$file"; then # Read the .lo file func_source $dir/$name # Add PIC object to the list of files to remove. if test -n "$pic_object" && test "$pic_object" != none; then rmfiles="$rmfiles $dir/$pic_object" fi # Add non-PIC object to the list of files to remove. if test -n "$non_pic_object" && test "$non_pic_object" != none; then rmfiles="$rmfiles $dir/$non_pic_object" fi fi ;; *) if test "$mode" = clean ; then noexename=$name case $file in *.exe) func_stripname '' '.exe' "$file" file=$func_stripname_result func_stripname '' '.exe' "$name" noexename=$func_stripname_result # $file with .exe has already been added to rmfiles, # add $file without .exe rmfiles="$rmfiles $file" ;; esac # Do a test to see if this is a libtool program. if func_ltwrapper_p "$file"; then if func_ltwrapper_executable_p "$file"; then func_ltwrapper_scriptname "$file" relink_command= func_source $func_ltwrapper_scriptname_result rmfiles="$rmfiles $func_ltwrapper_scriptname_result" else relink_command= func_source $dir/$noexename fi # note $name still contains .exe if it was in $file originally # as does the version of $file that was added into $rmfiles rmfiles="$rmfiles $objdir/$name $objdir/${name}S.${objext}" if test "$fast_install" = yes && test -n "$relink_command"; then rmfiles="$rmfiles $objdir/lt-$name" fi if test "X$noexename" != "X$name" ; then rmfiles="$rmfiles $objdir/lt-${noexename}.c" fi fi fi ;; esac func_show_eval "$RM $rmfiles" 'exit_status=1' done objdir="$origobjdir" # Try to remove the ${objdir}s in the directories where we deleted files for dir in $rmdirs; do if test -d "$dir"; then func_show_eval "rmdir $dir >/dev/null 2>&1" fi done exit $exit_status } { test "$mode" = uninstall || test "$mode" = clean; } && func_mode_uninstall ${1+"$@"} test -z "$mode" && { help="$generic_help" func_fatal_help "you must specify a MODE" } test -z "$exec_cmd" && \ func_fatal_help "invalid operation mode \`$mode'" if test -n "$exec_cmd"; then eval exec "$exec_cmd" exit $EXIT_FAILURE fi exit $exit_status # The TAGs below are defined such that we never get into a situation # in which we disable both kinds of libraries. Given conflicting # choices, we go for a static library, that is the most portable, # since we can't tell whether shared libraries were disabled because # the user asked for that or because the platform doesn't support # them. This is particularly important on AIX, because we don't # support having both static and shared libraries enabled at the same # time on that platform, so we default to a shared-only configuration. # If a disable-shared tag is given, we'll fallback to a static-only # configuration. But we'll never go from static-only to shared-only. # ### BEGIN LIBTOOL TAG CONFIG: disable-shared build_libtool_libs=no build_old_libs=yes # ### END LIBTOOL TAG CONFIG: disable-shared # ### BEGIN LIBTOOL TAG CONFIG: disable-static build_old_libs=`case $build_libtool_libs in yes) echo no;; *) echo yes;; esac` # ### END LIBTOOL TAG CONFIG: disable-static # Local Variables: # mode:shell-script # sh-indentation:2 # End: # vi:sw=2 libprelude-1.0.0/Makefile.in0000664000076400007640000020371611347714460012657 00000000000000# Makefile.in generated by automake 1.11.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, # Inc. # This Makefile.in 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. @SET_MAKE@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ target_triplet = @target@ subdir = . DIST_COMMON = README $(am__configure_deps) $(include_HEADERS) \ $(srcdir)/Makefile.am $(srcdir)/Makefile.in \ $(srcdir)/client.conf.in $(srcdir)/config.h.in \ $(srcdir)/global.conf.in $(srcdir)/idmef-client.conf.in \ $(srcdir)/libprelude-config.in \ $(top_srcdir)/bindings/low-level/perl/Makefile.PL.in \ $(top_srcdir)/bindings/perl/Makefile.PL.in \ $(top_srcdir)/configure AUTHORS COPYING ChangeLog INSTALL NEWS \ compile config.guess config.rpath config.sub depcomp \ install-sh ltmain.sh missing ylwrap ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/libmissing/m4/00gnulib.m4 \ $(top_srcdir)/libmissing/m4/alloca.m4 \ $(top_srcdir)/libmissing/m4/arpa_inet_h.m4 \ $(top_srcdir)/libmissing/m4/btowc.m4 \ $(top_srcdir)/libmissing/m4/close.m4 \ $(top_srcdir)/libmissing/m4/codeset.m4 \ $(top_srcdir)/libmissing/m4/cond.m4 \ $(top_srcdir)/libmissing/m4/dos.m4 \ $(top_srcdir)/libmissing/m4/dup2.m4 \ $(top_srcdir)/libmissing/m4/errno_h.m4 \ $(top_srcdir)/libmissing/m4/exponentd.m4 \ $(top_srcdir)/libmissing/m4/exponentf.m4 \ $(top_srcdir)/libmissing/m4/exponentl.m4 \ $(top_srcdir)/libmissing/m4/extensions.m4 \ $(top_srcdir)/libmissing/m4/fclose.m4 \ $(top_srcdir)/libmissing/m4/fcntl-o.m4 \ $(top_srcdir)/libmissing/m4/fcntl_h.m4 \ $(top_srcdir)/libmissing/m4/float_h.m4 \ $(top_srcdir)/libmissing/m4/fopen.m4 \ $(top_srcdir)/libmissing/m4/fpieee.m4 \ $(top_srcdir)/libmissing/m4/frexp.m4 \ $(top_srcdir)/libmissing/m4/frexpl.m4 \ $(top_srcdir)/libmissing/m4/fseeko.m4 \ $(top_srcdir)/libmissing/m4/ftw.m4 \ $(top_srcdir)/libmissing/m4/getaddrinfo.m4 \ $(top_srcdir)/libmissing/m4/getdelim.m4 \ $(top_srcdir)/libmissing/m4/gethostname.m4 \ $(top_srcdir)/libmissing/m4/getline.m4 \ $(top_srcdir)/libmissing/m4/getpagesize.m4 \ $(top_srcdir)/libmissing/m4/getpass.m4 \ $(top_srcdir)/libmissing/m4/gettimeofday.m4 \ $(top_srcdir)/libmissing/m4/glibc21.m4 \ $(top_srcdir)/libmissing/m4/gnulib-common.m4 \ $(top_srcdir)/libmissing/m4/gnulib-comp.m4 \ $(top_srcdir)/libmissing/m4/gnulib-tool.m4 \ $(top_srcdir)/libmissing/m4/hostent.m4 \ $(top_srcdir)/libmissing/m4/include_next.m4 \ $(top_srcdir)/libmissing/m4/inet_ntop.m4 \ $(top_srcdir)/libmissing/m4/inet_pton.m4 \ $(top_srcdir)/libmissing/m4/intmax_t.m4 \ $(top_srcdir)/libmissing/m4/inttypes_h.m4 \ $(top_srcdir)/libmissing/m4/isnand.m4 \ $(top_srcdir)/libmissing/m4/isnanf.m4 \ $(top_srcdir)/libmissing/m4/isnanl.m4 \ $(top_srcdir)/libmissing/m4/langinfo_h.m4 \ $(top_srcdir)/libmissing/m4/ldexpl.m4 \ $(top_srcdir)/libmissing/m4/lib-ld.m4 \ $(top_srcdir)/libmissing/m4/lib-link.m4 \ $(top_srcdir)/libmissing/m4/lib-prefix.m4 \ $(top_srcdir)/libmissing/m4/localcharset.m4 \ $(top_srcdir)/libmissing/m4/locale-fr.m4 \ $(top_srcdir)/libmissing/m4/locale-ja.m4 \ $(top_srcdir)/libmissing/m4/locale-tr.m4 \ $(top_srcdir)/libmissing/m4/locale-zh.m4 \ $(top_srcdir)/libmissing/m4/lock.m4 \ $(top_srcdir)/libmissing/m4/longlong.m4 \ $(top_srcdir)/libmissing/m4/lseek.m4 \ $(top_srcdir)/libmissing/m4/lstat.m4 \ $(top_srcdir)/libmissing/m4/malloc.m4 \ $(top_srcdir)/libmissing/m4/math_h.m4 \ $(top_srcdir)/libmissing/m4/mbrtowc.m4 \ $(top_srcdir)/libmissing/m4/mbsinit.m4 \ $(top_srcdir)/libmissing/m4/mbstate_t.m4 \ $(top_srcdir)/libmissing/m4/memchr.m4 \ $(top_srcdir)/libmissing/m4/memmem.m4 \ $(top_srcdir)/libmissing/m4/minmax.m4 \ $(top_srcdir)/libmissing/m4/mktime.m4 \ $(top_srcdir)/libmissing/m4/mmap-anon.m4 \ $(top_srcdir)/libmissing/m4/mode_t.m4 \ $(top_srcdir)/libmissing/m4/multiarch.m4 \ $(top_srcdir)/libmissing/m4/netdb_h.m4 \ $(top_srcdir)/libmissing/m4/netinet_in_h.m4 \ $(top_srcdir)/libmissing/m4/nl_langinfo.m4 \ $(top_srcdir)/libmissing/m4/nocrash.m4 \ $(top_srcdir)/libmissing/m4/onceonly.m4 \ $(top_srcdir)/libmissing/m4/open.m4 \ $(top_srcdir)/libmissing/m4/pathmax.m4 \ $(top_srcdir)/libmissing/m4/perror.m4 \ $(top_srcdir)/libmissing/m4/poll.m4 \ $(top_srcdir)/libmissing/m4/printf-frexp.m4 \ $(top_srcdir)/libmissing/m4/printf-frexpl.m4 \ $(top_srcdir)/libmissing/m4/printf.m4 \ $(top_srcdir)/libmissing/m4/realloc.m4 \ $(top_srcdir)/libmissing/m4/regex.m4 \ $(top_srcdir)/libmissing/m4/relocatable-lib.m4 \ $(top_srcdir)/libmissing/m4/select.m4 \ $(top_srcdir)/libmissing/m4/servent.m4 \ $(top_srcdir)/libmissing/m4/signal_h.m4 \ $(top_srcdir)/libmissing/m4/signalblocking.m4 \ $(top_srcdir)/libmissing/m4/signbit.m4 \ $(top_srcdir)/libmissing/m4/size_max.m4 \ $(top_srcdir)/libmissing/m4/sleep.m4 \ $(top_srcdir)/libmissing/m4/snprintf-posix.m4 \ $(top_srcdir)/libmissing/m4/snprintf.m4 \ $(top_srcdir)/libmissing/m4/sockets.m4 \ $(top_srcdir)/libmissing/m4/socklen.m4 \ $(top_srcdir)/libmissing/m4/sockpfaf.m4 \ $(top_srcdir)/libmissing/m4/ssize_t.m4 \ $(top_srcdir)/libmissing/m4/stat.m4 \ $(top_srcdir)/libmissing/m4/stdbool.m4 \ $(top_srcdir)/libmissing/m4/stddef_h.m4 \ $(top_srcdir)/libmissing/m4/stdint.m4 \ $(top_srcdir)/libmissing/m4/stdint_h.m4 \ $(top_srcdir)/libmissing/m4/stdio_h.m4 \ $(top_srcdir)/libmissing/m4/stdlib_h.m4 \ $(top_srcdir)/libmissing/m4/strcase.m4 \ $(top_srcdir)/libmissing/m4/strcasestr.m4 \ $(top_srcdir)/libmissing/m4/strdup.m4 \ $(top_srcdir)/libmissing/m4/strerror.m4 \ $(top_srcdir)/libmissing/m4/string_h.m4 \ $(top_srcdir)/libmissing/m4/strings_h.m4 \ $(top_srcdir)/libmissing/m4/strndup.m4 \ $(top_srcdir)/libmissing/m4/strnlen.m4 \ $(top_srcdir)/libmissing/m4/strptime.m4 \ $(top_srcdir)/libmissing/m4/strsep.m4 \ $(top_srcdir)/libmissing/m4/symlink.m4 \ $(top_srcdir)/libmissing/m4/sys_ioctl_h.m4 \ $(top_srcdir)/libmissing/m4/sys_select_h.m4 \ $(top_srcdir)/libmissing/m4/sys_socket_h.m4 \ $(top_srcdir)/libmissing/m4/sys_stat_h.m4 \ $(top_srcdir)/libmissing/m4/sys_time_h.m4 \ $(top_srcdir)/libmissing/m4/sys_utsname_h.m4 \ $(top_srcdir)/libmissing/m4/thread.m4 \ $(top_srcdir)/libmissing/m4/threadlib.m4 \ $(top_srcdir)/libmissing/m4/time_h.m4 \ $(top_srcdir)/libmissing/m4/time_r.m4 \ $(top_srcdir)/libmissing/m4/timegm.m4 \ $(top_srcdir)/libmissing/m4/tls.m4 \ $(top_srcdir)/libmissing/m4/tm_gmtoff.m4 \ $(top_srcdir)/libmissing/m4/uname.m4 \ $(top_srcdir)/libmissing/m4/ungetc.m4 \ $(top_srcdir)/libmissing/m4/unistd_h.m4 \ $(top_srcdir)/libmissing/m4/vasnprintf.m4 \ $(top_srcdir)/libmissing/m4/vsnprintf-posix.m4 \ $(top_srcdir)/libmissing/m4/vsnprintf.m4 \ $(top_srcdir)/libmissing/m4/warn-on-use.m4 \ $(top_srcdir)/libmissing/m4/wchar.m4 \ $(top_srcdir)/libmissing/m4/wchar_t.m4 \ $(top_srcdir)/libmissing/m4/wcrtomb.m4 \ $(top_srcdir)/libmissing/m4/wctob.m4 \ $(top_srcdir)/libmissing/m4/wctype.m4 \ $(top_srcdir)/libmissing/m4/wint_t.m4 \ $(top_srcdir)/libmissing/m4/write.m4 \ $(top_srcdir)/libmissing/m4/xsize.m4 \ $(top_srcdir)/libmissing/m4/yield.m4 \ $(top_srcdir)/m4/ac_compile_check_sizeof.m4 \ $(top_srcdir)/m4/am_path_ruby.m4 $(top_srcdir)/m4/argz.m4 \ $(top_srcdir)/m4/as-ac-expand.m4 \ $(top_srcdir)/m4/ax_c_check_flag.m4 \ $(top_srcdir)/m4/ax_check_aligned_access_required.m4 \ $(top_srcdir)/m4/ax_create_prelude_inttypes_h.m4 \ $(top_srcdir)/m4/ax_ld_check_flag.m4 \ $(top_srcdir)/m4/gtk-doc.m4 $(top_srcdir)/m4/libgcrypt.m4 \ $(top_srcdir)/m4/libgnutls-extra.m4 \ $(top_srcdir)/m4/libgnutls.m4 $(top_srcdir)/m4/libtool.m4 \ $(top_srcdir)/m4/ltdl.m4 $(top_srcdir)/m4/ltoptions.m4 \ $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/m4/pkg.m4 \ $(top_srcdir)/configure.in am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \ configure.lineno config.status.lineno mkinstalldirs = $(install_sh) -d CONFIG_HEADER = config.h CONFIG_CLEAN_FILES = client.conf global.conf idmef-client.conf \ libprelude-config bindings/low-level/perl/Makefile.PL \ bindings/perl/Makefile.PL CONFIG_CLEAN_VPATH_FILES = am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; am__install_max = 40 am__nobase_strip_setup = \ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` am__nobase_strip = \ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" am__nobase_list = $(am__nobase_strip_setup); \ for p in $$list; do echo "$$p $$p"; done | \ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ if (++n[$$2] == $(am__install_max)) \ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ END { for (dir in files) print dir, files[dir] }' am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' am__installdirs = "$(DESTDIR)$(bindir)" "$(DESTDIR)$(includedir)" SCRIPTS = $(bin_SCRIPTS) SOURCES = DIST_SOURCES = RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \ html-recursive info-recursive install-data-recursive \ install-dvi-recursive install-exec-recursive \ install-html-recursive install-info-recursive \ install-pdf-recursive install-ps-recursive install-recursive \ installcheck-recursive installdirs-recursive pdf-recursive \ ps-recursive uninstall-recursive HEADERS = $(include_HEADERS) RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ distclean-recursive maintainer-clean-recursive AM_RECURSIVE_TARGETS = $(RECURSIVE_TARGETS:-recursive=) \ $(RECURSIVE_CLEAN_TARGETS:-recursive=) tags TAGS ctags CTAGS \ distdir dist dist-all distcheck ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) distdir = $(PACKAGE)-$(VERSION) top_distdir = $(distdir) am__remove_distdir = \ { test ! -d "$(distdir)" \ || { find "$(distdir)" -type d ! -perm -200 -exec chmod u+w {} ';' \ && rm -fr "$(distdir)"; }; } am__relativize = \ dir0=`pwd`; \ sed_first='s,^\([^/]*\)/.*$$,\1,'; \ sed_rest='s,^[^/]*/*,,'; \ sed_last='s,^.*/\([^/]*\)$$,\1,'; \ sed_butlast='s,/*[^/]*$$,,'; \ while test -n "$$dir1"; do \ first=`echo "$$dir1" | sed -e "$$sed_first"`; \ if test "$$first" != "."; then \ if test "$$first" = ".."; then \ dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \ dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \ else \ first2=`echo "$$dir2" | sed -e "$$sed_first"`; \ if test "$$first2" = "$$first"; then \ dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \ else \ dir2="../$$dir2"; \ fi; \ dir0="$$dir0"/"$$first"; \ fi; \ fi; \ dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \ done; \ reldir="$$dir2" DIST_ARCHIVES = $(distdir).tar.gz GZIP_ENV = --best distcleancheck_listfiles = find . -type f -print ACLOCAL = @ACLOCAL@ ALLOCA = @ALLOCA@ ALLOCA_H = @ALLOCA_H@ AMTAR = @AMTAR@ APPLE_UNIVERSAL_BUILD = @APPLE_UNIVERSAL_BUILD@ AR = @AR@ ARGZ_H = @ARGZ_H@ AS = @AS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ BINDINGS_CC = @BINDINGS_CC@ BINDIR = @BINDIR@ BITSIZEOF_PTRDIFF_T = @BITSIZEOF_PTRDIFF_T@ BITSIZEOF_SIG_ATOMIC_T = @BITSIZEOF_SIG_ATOMIC_T@ BITSIZEOF_SIZE_T = @BITSIZEOF_SIZE_T@ BITSIZEOF_WCHAR_T = @BITSIZEOF_WCHAR_T@ BITSIZEOF_WINT_T = @BITSIZEOF_WINT_T@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CC_FOR_BUILD = @CC_FOR_BUILD@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EMULTIHOP_HIDDEN = @EMULTIHOP_HIDDEN@ EMULTIHOP_VALUE = @EMULTIHOP_VALUE@ ENOLINK_HIDDEN = @ENOLINK_HIDDEN@ ENOLINK_VALUE = @ENOLINK_VALUE@ EOVERFLOW_HIDDEN = @EOVERFLOW_HIDDEN@ EOVERFLOW_VALUE = @EOVERFLOW_VALUE@ ERRNO_H = @ERRNO_H@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ FLOAT_H = @FLOAT_H@ GETADDRINFO_LIB = @GETADDRINFO_LIB@ GETHOSTNAME_LIB = @GETHOSTNAME_LIB@ GLIBC21 = @GLIBC21@ GNULIB_ACCEPT = @GNULIB_ACCEPT@ GNULIB_ACCEPT4 = @GNULIB_ACCEPT4@ GNULIB_ACOSL = @GNULIB_ACOSL@ GNULIB_ASINL = @GNULIB_ASINL@ GNULIB_ATANL = @GNULIB_ATANL@ GNULIB_ATOLL = @GNULIB_ATOLL@ GNULIB_BIND = @GNULIB_BIND@ GNULIB_BTOWC = @GNULIB_BTOWC@ GNULIB_CALLOC_POSIX = @GNULIB_CALLOC_POSIX@ GNULIB_CANONICALIZE_FILE_NAME = @GNULIB_CANONICALIZE_FILE_NAME@ GNULIB_CEILF = @GNULIB_CEILF@ GNULIB_CEILL = @GNULIB_CEILL@ GNULIB_CHOWN = @GNULIB_CHOWN@ GNULIB_CLOSE = @GNULIB_CLOSE@ GNULIB_CONNECT = @GNULIB_CONNECT@ GNULIB_COSL = @GNULIB_COSL@ GNULIB_DPRINTF = @GNULIB_DPRINTF@ GNULIB_DUP2 = @GNULIB_DUP2@ GNULIB_DUP3 = @GNULIB_DUP3@ GNULIB_ENVIRON = @GNULIB_ENVIRON@ GNULIB_EUIDACCESS = @GNULIB_EUIDACCESS@ GNULIB_EXPL = @GNULIB_EXPL@ GNULIB_FACCESSAT = @GNULIB_FACCESSAT@ GNULIB_FCHDIR = @GNULIB_FCHDIR@ GNULIB_FCHMODAT = @GNULIB_FCHMODAT@ GNULIB_FCHOWNAT = @GNULIB_FCHOWNAT@ GNULIB_FCLOSE = @GNULIB_FCLOSE@ GNULIB_FCNTL = @GNULIB_FCNTL@ GNULIB_FFLUSH = @GNULIB_FFLUSH@ GNULIB_FLOORF = @GNULIB_FLOORF@ GNULIB_FLOORL = @GNULIB_FLOORL@ GNULIB_FOPEN = @GNULIB_FOPEN@ GNULIB_FPRINTF = @GNULIB_FPRINTF@ GNULIB_FPRINTF_POSIX = @GNULIB_FPRINTF_POSIX@ GNULIB_FPURGE = @GNULIB_FPURGE@ GNULIB_FPUTC = @GNULIB_FPUTC@ GNULIB_FPUTS = @GNULIB_FPUTS@ GNULIB_FREOPEN = @GNULIB_FREOPEN@ GNULIB_FREXP = @GNULIB_FREXP@ GNULIB_FREXPL = @GNULIB_FREXPL@ GNULIB_FSEEK = @GNULIB_FSEEK@ GNULIB_FSEEKO = @GNULIB_FSEEKO@ GNULIB_FSTATAT = @GNULIB_FSTATAT@ GNULIB_FSYNC = @GNULIB_FSYNC@ GNULIB_FTELL = @GNULIB_FTELL@ GNULIB_FTELLO = @GNULIB_FTELLO@ GNULIB_FTRUNCATE = @GNULIB_FTRUNCATE@ GNULIB_FUTIMENS = @GNULIB_FUTIMENS@ GNULIB_FWRITE = @GNULIB_FWRITE@ GNULIB_GETADDRINFO = @GNULIB_GETADDRINFO@ GNULIB_GETCWD = @GNULIB_GETCWD@ GNULIB_GETDELIM = @GNULIB_GETDELIM@ GNULIB_GETDOMAINNAME = @GNULIB_GETDOMAINNAME@ GNULIB_GETDTABLESIZE = @GNULIB_GETDTABLESIZE@ GNULIB_GETGROUPS = @GNULIB_GETGROUPS@ GNULIB_GETHOSTNAME = @GNULIB_GETHOSTNAME@ GNULIB_GETLINE = @GNULIB_GETLINE@ GNULIB_GETLOADAVG = @GNULIB_GETLOADAVG@ GNULIB_GETLOGIN = @GNULIB_GETLOGIN@ GNULIB_GETLOGIN_R = @GNULIB_GETLOGIN_R@ GNULIB_GETPAGESIZE = @GNULIB_GETPAGESIZE@ GNULIB_GETPEERNAME = @GNULIB_GETPEERNAME@ GNULIB_GETSOCKNAME = @GNULIB_GETSOCKNAME@ GNULIB_GETSOCKOPT = @GNULIB_GETSOCKOPT@ GNULIB_GETSUBOPT = @GNULIB_GETSUBOPT@ GNULIB_GETTIMEOFDAY = @GNULIB_GETTIMEOFDAY@ GNULIB_GETUSERSHELL = @GNULIB_GETUSERSHELL@ GNULIB_INET_NTOP = @GNULIB_INET_NTOP@ GNULIB_INET_PTON = @GNULIB_INET_PTON@ GNULIB_IOCTL = @GNULIB_IOCTL@ GNULIB_ISFINITE = @GNULIB_ISFINITE@ GNULIB_ISINF = @GNULIB_ISINF@ GNULIB_ISNAN = @GNULIB_ISNAN@ GNULIB_ISNAND = @GNULIB_ISNAND@ GNULIB_ISNANF = @GNULIB_ISNANF@ GNULIB_ISNANL = @GNULIB_ISNANL@ GNULIB_LCHMOD = @GNULIB_LCHMOD@ GNULIB_LCHOWN = @GNULIB_LCHOWN@ GNULIB_LDEXPL = @GNULIB_LDEXPL@ GNULIB_LINK = @GNULIB_LINK@ GNULIB_LINKAT = @GNULIB_LINKAT@ GNULIB_LISTEN = @GNULIB_LISTEN@ GNULIB_LOGL = @GNULIB_LOGL@ GNULIB_LSEEK = @GNULIB_LSEEK@ GNULIB_LSTAT = @GNULIB_LSTAT@ GNULIB_MALLOC_POSIX = @GNULIB_MALLOC_POSIX@ GNULIB_MBRLEN = @GNULIB_MBRLEN@ GNULIB_MBRTOWC = @GNULIB_MBRTOWC@ GNULIB_MBSCASECMP = @GNULIB_MBSCASECMP@ GNULIB_MBSCASESTR = @GNULIB_MBSCASESTR@ GNULIB_MBSCHR = @GNULIB_MBSCHR@ GNULIB_MBSCSPN = @GNULIB_MBSCSPN@ GNULIB_MBSINIT = @GNULIB_MBSINIT@ GNULIB_MBSLEN = @GNULIB_MBSLEN@ GNULIB_MBSNCASECMP = @GNULIB_MBSNCASECMP@ GNULIB_MBSNLEN = @GNULIB_MBSNLEN@ GNULIB_MBSNRTOWCS = @GNULIB_MBSNRTOWCS@ GNULIB_MBSPBRK = @GNULIB_MBSPBRK@ GNULIB_MBSPCASECMP = @GNULIB_MBSPCASECMP@ GNULIB_MBSRCHR = @GNULIB_MBSRCHR@ GNULIB_MBSRTOWCS = @GNULIB_MBSRTOWCS@ GNULIB_MBSSEP = @GNULIB_MBSSEP@ GNULIB_MBSSPN = @GNULIB_MBSSPN@ GNULIB_MBSSTR = @GNULIB_MBSSTR@ GNULIB_MBSTOK_R = @GNULIB_MBSTOK_R@ GNULIB_MEMCHR = @GNULIB_MEMCHR@ GNULIB_MEMMEM = @GNULIB_MEMMEM@ GNULIB_MEMPCPY = @GNULIB_MEMPCPY@ GNULIB_MEMRCHR = @GNULIB_MEMRCHR@ GNULIB_MKDIRAT = @GNULIB_MKDIRAT@ GNULIB_MKDTEMP = @GNULIB_MKDTEMP@ GNULIB_MKFIFO = @GNULIB_MKFIFO@ GNULIB_MKFIFOAT = @GNULIB_MKFIFOAT@ GNULIB_MKNOD = @GNULIB_MKNOD@ GNULIB_MKNODAT = @GNULIB_MKNODAT@ GNULIB_MKOSTEMP = @GNULIB_MKOSTEMP@ GNULIB_MKOSTEMPS = @GNULIB_MKOSTEMPS@ GNULIB_MKSTEMP = @GNULIB_MKSTEMP@ GNULIB_MKSTEMPS = @GNULIB_MKSTEMPS@ GNULIB_NL_LANGINFO = @GNULIB_NL_LANGINFO@ GNULIB_OBSTACK_PRINTF = @GNULIB_OBSTACK_PRINTF@ GNULIB_OBSTACK_PRINTF_POSIX = @GNULIB_OBSTACK_PRINTF_POSIX@ GNULIB_OPEN = @GNULIB_OPEN@ GNULIB_OPENAT = @GNULIB_OPENAT@ GNULIB_PERROR = @GNULIB_PERROR@ GNULIB_PIPE2 = @GNULIB_PIPE2@ GNULIB_POPEN = @GNULIB_POPEN@ GNULIB_PREAD = @GNULIB_PREAD@ GNULIB_PRINTF = @GNULIB_PRINTF@ GNULIB_PRINTF_POSIX = @GNULIB_PRINTF_POSIX@ GNULIB_PUTC = @GNULIB_PUTC@ GNULIB_PUTCHAR = @GNULIB_PUTCHAR@ GNULIB_PUTENV = @GNULIB_PUTENV@ GNULIB_PUTS = @GNULIB_PUTS@ GNULIB_RANDOM_R = @GNULIB_RANDOM_R@ GNULIB_RAWMEMCHR = @GNULIB_RAWMEMCHR@ GNULIB_READLINK = @GNULIB_READLINK@ GNULIB_READLINKAT = @GNULIB_READLINKAT@ GNULIB_REALLOC_POSIX = @GNULIB_REALLOC_POSIX@ GNULIB_REALPATH = @GNULIB_REALPATH@ GNULIB_RECV = @GNULIB_RECV@ GNULIB_RECVFROM = @GNULIB_RECVFROM@ GNULIB_REMOVE = @GNULIB_REMOVE@ GNULIB_RENAME = @GNULIB_RENAME@ GNULIB_RENAMEAT = @GNULIB_RENAMEAT@ GNULIB_RMDIR = @GNULIB_RMDIR@ GNULIB_ROUND = @GNULIB_ROUND@ GNULIB_ROUNDF = @GNULIB_ROUNDF@ GNULIB_ROUNDL = @GNULIB_ROUNDL@ GNULIB_RPMATCH = @GNULIB_RPMATCH@ GNULIB_SELECT = @GNULIB_SELECT@ GNULIB_SEND = @GNULIB_SEND@ GNULIB_SENDTO = @GNULIB_SENDTO@ GNULIB_SETENV = @GNULIB_SETENV@ GNULIB_SETSOCKOPT = @GNULIB_SETSOCKOPT@ GNULIB_SHUTDOWN = @GNULIB_SHUTDOWN@ GNULIB_SIGACTION = @GNULIB_SIGACTION@ GNULIB_SIGNAL_H_SIGPIPE = @GNULIB_SIGNAL_H_SIGPIPE@ GNULIB_SIGNBIT = @GNULIB_SIGNBIT@ GNULIB_SIGPROCMASK = @GNULIB_SIGPROCMASK@ GNULIB_SINL = @GNULIB_SINL@ GNULIB_SLEEP = @GNULIB_SLEEP@ GNULIB_SNPRINTF = @GNULIB_SNPRINTF@ GNULIB_SOCKET = @GNULIB_SOCKET@ GNULIB_SPRINTF_POSIX = @GNULIB_SPRINTF_POSIX@ GNULIB_SQRTL = @GNULIB_SQRTL@ GNULIB_STAT = @GNULIB_STAT@ GNULIB_STDIO_H_SIGPIPE = @GNULIB_STDIO_H_SIGPIPE@ GNULIB_STPCPY = @GNULIB_STPCPY@ GNULIB_STPNCPY = @GNULIB_STPNCPY@ GNULIB_STRCASESTR = @GNULIB_STRCASESTR@ GNULIB_STRCHRNUL = @GNULIB_STRCHRNUL@ GNULIB_STRDUP = @GNULIB_STRDUP@ GNULIB_STRERROR = @GNULIB_STRERROR@ GNULIB_STRNDUP = @GNULIB_STRNDUP@ GNULIB_STRNLEN = @GNULIB_STRNLEN@ GNULIB_STRPBRK = @GNULIB_STRPBRK@ GNULIB_STRSEP = @GNULIB_STRSEP@ GNULIB_STRSIGNAL = @GNULIB_STRSIGNAL@ GNULIB_STRSTR = @GNULIB_STRSTR@ GNULIB_STRTOD = @GNULIB_STRTOD@ GNULIB_STRTOK_R = @GNULIB_STRTOK_R@ GNULIB_STRTOLL = @GNULIB_STRTOLL@ GNULIB_STRTOULL = @GNULIB_STRTOULL@ GNULIB_STRVERSCMP = @GNULIB_STRVERSCMP@ GNULIB_SYMLINK = @GNULIB_SYMLINK@ GNULIB_SYMLINKAT = @GNULIB_SYMLINKAT@ GNULIB_TANL = @GNULIB_TANL@ GNULIB_TRUNC = @GNULIB_TRUNC@ GNULIB_TRUNCF = @GNULIB_TRUNCF@ GNULIB_TRUNCL = @GNULIB_TRUNCL@ GNULIB_UNAME = @GNULIB_UNAME@ GNULIB_UNISTD_H_GETOPT = @GNULIB_UNISTD_H_GETOPT@ GNULIB_UNISTD_H_SIGPIPE = @GNULIB_UNISTD_H_SIGPIPE@ GNULIB_UNLINK = @GNULIB_UNLINK@ GNULIB_UNLINKAT = @GNULIB_UNLINKAT@ GNULIB_UNSETENV = @GNULIB_UNSETENV@ GNULIB_USLEEP = @GNULIB_USLEEP@ GNULIB_UTIMENSAT = @GNULIB_UTIMENSAT@ GNULIB_VASPRINTF = @GNULIB_VASPRINTF@ GNULIB_VDPRINTF = @GNULIB_VDPRINTF@ GNULIB_VFPRINTF = @GNULIB_VFPRINTF@ GNULIB_VFPRINTF_POSIX = @GNULIB_VFPRINTF_POSIX@ GNULIB_VPRINTF = @GNULIB_VPRINTF@ GNULIB_VPRINTF_POSIX = @GNULIB_VPRINTF_POSIX@ GNULIB_VSNPRINTF = @GNULIB_VSNPRINTF@ GNULIB_VSPRINTF_POSIX = @GNULIB_VSPRINTF_POSIX@ GNULIB_WCRTOMB = @GNULIB_WCRTOMB@ GNULIB_WCSNRTOMBS = @GNULIB_WCSNRTOMBS@ GNULIB_WCSRTOMBS = @GNULIB_WCSRTOMBS@ GNULIB_WCTOB = @GNULIB_WCTOB@ GNULIB_WCWIDTH = @GNULIB_WCWIDTH@ GNULIB_WRITE = @GNULIB_WRITE@ GREP = @GREP@ GTKDOC_CHECK = @GTKDOC_CHECK@ HAVE_ACCEPT4 = @HAVE_ACCEPT4@ HAVE_ACOSL = @HAVE_ACOSL@ HAVE_ARPA_INET_H = @HAVE_ARPA_INET_H@ HAVE_ASINL = @HAVE_ASINL@ HAVE_ATANL = @HAVE_ATANL@ HAVE_ATOLL = @HAVE_ATOLL@ HAVE_BTOWC = @HAVE_BTOWC@ HAVE_CALLOC_POSIX = @HAVE_CALLOC_POSIX@ HAVE_CANONICALIZE_FILE_NAME = @HAVE_CANONICALIZE_FILE_NAME@ HAVE_CHOWN = @HAVE_CHOWN@ HAVE_COSL = @HAVE_COSL@ HAVE_CXX = @HAVE_CXX@ HAVE_DECL_ACOSL = @HAVE_DECL_ACOSL@ HAVE_DECL_ASINL = @HAVE_DECL_ASINL@ HAVE_DECL_ATANL = @HAVE_DECL_ATANL@ HAVE_DECL_COSL = @HAVE_DECL_COSL@ HAVE_DECL_ENVIRON = @HAVE_DECL_ENVIRON@ HAVE_DECL_EXPL = @HAVE_DECL_EXPL@ HAVE_DECL_FPURGE = @HAVE_DECL_FPURGE@ HAVE_DECL_FREEADDRINFO = @HAVE_DECL_FREEADDRINFO@ HAVE_DECL_FREXPL = @HAVE_DECL_FREXPL@ HAVE_DECL_GAI_STRERROR = @HAVE_DECL_GAI_STRERROR@ HAVE_DECL_GETADDRINFO = @HAVE_DECL_GETADDRINFO@ HAVE_DECL_GETDELIM = @HAVE_DECL_GETDELIM@ HAVE_DECL_GETLINE = @HAVE_DECL_GETLINE@ HAVE_DECL_GETLOADAVG = @HAVE_DECL_GETLOADAVG@ HAVE_DECL_GETLOGIN_R = @HAVE_DECL_GETLOGIN_R@ HAVE_DECL_GETNAMEINFO = @HAVE_DECL_GETNAMEINFO@ HAVE_DECL_INET_NTOP = @HAVE_DECL_INET_NTOP@ HAVE_DECL_INET_PTON = @HAVE_DECL_INET_PTON@ HAVE_DECL_LDEXPL = @HAVE_DECL_LDEXPL@ HAVE_DECL_LOGL = @HAVE_DECL_LOGL@ HAVE_DECL_MEMMEM = @HAVE_DECL_MEMMEM@ HAVE_DECL_MEMRCHR = @HAVE_DECL_MEMRCHR@ HAVE_DECL_OBSTACK_PRINTF = @HAVE_DECL_OBSTACK_PRINTF@ HAVE_DECL_SINL = @HAVE_DECL_SINL@ HAVE_DECL_SNPRINTF = @HAVE_DECL_SNPRINTF@ HAVE_DECL_SQRTL = @HAVE_DECL_SQRTL@ HAVE_DECL_STRDUP = @HAVE_DECL_STRDUP@ HAVE_DECL_STRERROR = @HAVE_DECL_STRERROR@ HAVE_DECL_STRNCASECMP = @HAVE_DECL_STRNCASECMP@ HAVE_DECL_STRNDUP = @HAVE_DECL_STRNDUP@ HAVE_DECL_STRNLEN = @HAVE_DECL_STRNLEN@ HAVE_DECL_STRSIGNAL = @HAVE_DECL_STRSIGNAL@ HAVE_DECL_STRTOK_R = @HAVE_DECL_STRTOK_R@ HAVE_DECL_TANL = @HAVE_DECL_TANL@ HAVE_DECL_TRUNC = @HAVE_DECL_TRUNC@ HAVE_DECL_TRUNCF = @HAVE_DECL_TRUNCF@ HAVE_DECL_VSNPRINTF = @HAVE_DECL_VSNPRINTF@ HAVE_DECL_WCTOB = @HAVE_DECL_WCTOB@ HAVE_DECL_WCWIDTH = @HAVE_DECL_WCWIDTH@ HAVE_DPRINTF = @HAVE_DPRINTF@ HAVE_DUP2 = @HAVE_DUP2@ HAVE_DUP3 = @HAVE_DUP3@ HAVE_EUIDACCESS = @HAVE_EUIDACCESS@ HAVE_EXPL = @HAVE_EXPL@ HAVE_FACCESSAT = @HAVE_FACCESSAT@ HAVE_FCHMODAT = @HAVE_FCHMODAT@ HAVE_FCHOWNAT = @HAVE_FCHOWNAT@ HAVE_FCNTL = @HAVE_FCNTL@ HAVE_FSTATAT = @HAVE_FSTATAT@ HAVE_FSYNC = @HAVE_FSYNC@ HAVE_FTRUNCATE = @HAVE_FTRUNCATE@ HAVE_FUTIMENS = @HAVE_FUTIMENS@ HAVE_GETDOMAINNAME = @HAVE_GETDOMAINNAME@ HAVE_GETDTABLESIZE = @HAVE_GETDTABLESIZE@ HAVE_GETGROUPS = @HAVE_GETGROUPS@ HAVE_GETHOSTNAME = @HAVE_GETHOSTNAME@ HAVE_GETLOGIN = @HAVE_GETLOGIN@ HAVE_GETPAGESIZE = @HAVE_GETPAGESIZE@ HAVE_GETSUBOPT = @HAVE_GETSUBOPT@ HAVE_GETUSERSHELL = @HAVE_GETUSERSHELL@ HAVE_INTTYPES_H = @HAVE_INTTYPES_H@ HAVE_ISNAND = @HAVE_ISNAND@ HAVE_ISNANF = @HAVE_ISNANF@ HAVE_ISNANL = @HAVE_ISNANL@ HAVE_ISWCNTRL = @HAVE_ISWCNTRL@ HAVE_LANGINFO_CODESET = @HAVE_LANGINFO_CODESET@ HAVE_LANGINFO_ERA = @HAVE_LANGINFO_ERA@ HAVE_LANGINFO_H = @HAVE_LANGINFO_H@ HAVE_LCHMOD = @HAVE_LCHMOD@ HAVE_LCHOWN = @HAVE_LCHOWN@ HAVE_LINK = @HAVE_LINK@ HAVE_LINKAT = @HAVE_LINKAT@ HAVE_LOGL = @HAVE_LOGL@ HAVE_LONG_LONG_INT = @HAVE_LONG_LONG_INT@ HAVE_LSTAT = @HAVE_LSTAT@ HAVE_MALLOC_POSIX = @HAVE_MALLOC_POSIX@ HAVE_MBRLEN = @HAVE_MBRLEN@ HAVE_MBRTOWC = @HAVE_MBRTOWC@ HAVE_MBSINIT = @HAVE_MBSINIT@ HAVE_MBSLEN = @HAVE_MBSLEN@ HAVE_MBSNRTOWCS = @HAVE_MBSNRTOWCS@ HAVE_MBSRTOWCS = @HAVE_MBSRTOWCS@ HAVE_MEMPCPY = @HAVE_MEMPCPY@ HAVE_MKDIRAT = @HAVE_MKDIRAT@ HAVE_MKDTEMP = @HAVE_MKDTEMP@ HAVE_MKFIFO = @HAVE_MKFIFO@ HAVE_MKFIFOAT = @HAVE_MKFIFOAT@ HAVE_MKNOD = @HAVE_MKNOD@ HAVE_MKNODAT = @HAVE_MKNODAT@ HAVE_MKOSTEMP = @HAVE_MKOSTEMP@ HAVE_MKOSTEMPS = @HAVE_MKOSTEMPS@ HAVE_MKSTEMPS = @HAVE_MKSTEMPS@ HAVE_NETDB_H = @HAVE_NETDB_H@ HAVE_NETINET_IN_H = @HAVE_NETINET_IN_H@ HAVE_NL_LANGINFO = @HAVE_NL_LANGINFO@ HAVE_OPENAT = @HAVE_OPENAT@ HAVE_OS_H = @HAVE_OS_H@ HAVE_PIPE2 = @HAVE_PIPE2@ HAVE_POSIX_SIGNALBLOCKING = @HAVE_POSIX_SIGNALBLOCKING@ HAVE_PREAD = @HAVE_PREAD@ HAVE_RANDOM_H = @HAVE_RANDOM_H@ HAVE_RANDOM_R = @HAVE_RANDOM_R@ HAVE_RAWMEMCHR = @HAVE_RAWMEMCHR@ HAVE_READLINK = @HAVE_READLINK@ HAVE_READLINKAT = @HAVE_READLINKAT@ HAVE_REALLOC_POSIX = @HAVE_REALLOC_POSIX@ HAVE_REALPATH = @HAVE_REALPATH@ HAVE_RENAMEAT = @HAVE_RENAMEAT@ HAVE_RPMATCH = @HAVE_RPMATCH@ HAVE_SA_FAMILY_T = @HAVE_SA_FAMILY_T@ HAVE_SETENV = @HAVE_SETENV@ HAVE_SIGACTION = @HAVE_SIGACTION@ HAVE_SIGINFO_T = @HAVE_SIGINFO_T@ HAVE_SIGNED_SIG_ATOMIC_T = @HAVE_SIGNED_SIG_ATOMIC_T@ HAVE_SIGNED_WCHAR_T = @HAVE_SIGNED_WCHAR_T@ HAVE_SIGNED_WINT_T = @HAVE_SIGNED_WINT_T@ HAVE_SIGSET_T = @HAVE_SIGSET_T@ HAVE_SINL = @HAVE_SINL@ HAVE_SLEEP = @HAVE_SLEEP@ HAVE_SQRTL = @HAVE_SQRTL@ HAVE_STDINT_H = @HAVE_STDINT_H@ HAVE_STPCPY = @HAVE_STPCPY@ HAVE_STPNCPY = @HAVE_STPNCPY@ HAVE_STRCASECMP = @HAVE_STRCASECMP@ HAVE_STRCASESTR = @HAVE_STRCASESTR@ HAVE_STRCHRNUL = @HAVE_STRCHRNUL@ HAVE_STRPBRK = @HAVE_STRPBRK@ HAVE_STRSEP = @HAVE_STRSEP@ HAVE_STRTOD = @HAVE_STRTOD@ HAVE_STRTOLL = @HAVE_STRTOLL@ HAVE_STRTOULL = @HAVE_STRTOULL@ HAVE_STRUCT_ADDRINFO = @HAVE_STRUCT_ADDRINFO@ HAVE_STRUCT_RANDOM_DATA = @HAVE_STRUCT_RANDOM_DATA@ HAVE_STRUCT_SIGACTION_SA_SIGACTION = @HAVE_STRUCT_SIGACTION_SA_SIGACTION@ HAVE_STRUCT_SOCKADDR_STORAGE = @HAVE_STRUCT_SOCKADDR_STORAGE@ HAVE_STRUCT_TIMEVAL = @HAVE_STRUCT_TIMEVAL@ HAVE_STRUCT_UTSNAME = @HAVE_STRUCT_UTSNAME@ HAVE_STRVERSCMP = @HAVE_STRVERSCMP@ HAVE_SYMLINK = @HAVE_SYMLINK@ HAVE_SYMLINKAT = @HAVE_SYMLINKAT@ HAVE_SYS_BITYPES_H = @HAVE_SYS_BITYPES_H@ HAVE_SYS_INTTYPES_H = @HAVE_SYS_INTTYPES_H@ HAVE_SYS_IOCTL_H = @HAVE_SYS_IOCTL_H@ HAVE_SYS_LOADAVG_H = @HAVE_SYS_LOADAVG_H@ HAVE_SYS_PARAM_H = @HAVE_SYS_PARAM_H@ HAVE_SYS_SELECT_H = @HAVE_SYS_SELECT_H@ HAVE_SYS_SOCKET_H = @HAVE_SYS_SOCKET_H@ HAVE_SYS_TIME_H = @HAVE_SYS_TIME_H@ HAVE_SYS_TYPES_H = @HAVE_SYS_TYPES_H@ HAVE_SYS_UTSNAME_H = @HAVE_SYS_UTSNAME_H@ HAVE_TANL = @HAVE_TANL@ HAVE_TYPE_VOLATILE_SIG_ATOMIC_T = @HAVE_TYPE_VOLATILE_SIG_ATOMIC_T@ HAVE_UNAME = @HAVE_UNAME@ HAVE_UNISTD_H = @HAVE_UNISTD_H@ HAVE_UNLINKAT = @HAVE_UNLINKAT@ HAVE_UNSETENV = @HAVE_UNSETENV@ HAVE_UNSIGNED_LONG_LONG_INT = @HAVE_UNSIGNED_LONG_LONG_INT@ HAVE_USLEEP = @HAVE_USLEEP@ HAVE_UTIMENSAT = @HAVE_UTIMENSAT@ HAVE_VASPRINTF = @HAVE_VASPRINTF@ HAVE_VDPRINTF = @HAVE_VDPRINTF@ HAVE_WCHAR_H = @HAVE_WCHAR_H@ HAVE_WCHAR_T = @HAVE_WCHAR_T@ HAVE_WCRTOMB = @HAVE_WCRTOMB@ HAVE_WCSNRTOMBS = @HAVE_WCSNRTOMBS@ HAVE_WCSRTOMBS = @HAVE_WCSRTOMBS@ HAVE_WCTYPE_H = @HAVE_WCTYPE_H@ HAVE_WINSOCK2_H = @HAVE_WINSOCK2_H@ HAVE_WINT_T = @HAVE_WINT_T@ HAVE_WS2TCPIP_H = @HAVE_WS2TCPIP_H@ HAVE__BOOL = @HAVE__BOOL@ HOSTENT_LIB = @HOSTENT_LIB@ HTML_DIR = @HTML_DIR@ INCLTDL = @INCLTDL@ INCLUDE_NEXT = @INCLUDE_NEXT@ INCLUDE_NEXT_AS_FIRST_DIRECTIVE = @INCLUDE_NEXT_AS_FIRST_DIRECTIVE@ INET_NTOP_LIB = @INET_NTOP_LIB@ INET_PTON_LIB = @INET_PTON_LIB@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LD = @LD@ LDFLAGS = @LDFLAGS@ LEX = @LEX@ LEXLIB = @LEXLIB@ LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@ LIBADD_DL = @LIBADD_DL@ LIBADD_DLD_LINK = @LIBADD_DLD_LINK@ LIBADD_DLOPEN = @LIBADD_DLOPEN@ LIBADD_SHL_LOAD = @LIBADD_SHL_LOAD@ LIBDIR = @LIBDIR@ LIBGCRYPT_CFLAGS = @LIBGCRYPT_CFLAGS@ LIBGCRYPT_CONFIG = @LIBGCRYPT_CONFIG@ LIBGCRYPT_LIBS = @LIBGCRYPT_LIBS@ LIBGNUTLS_CFLAGS = @LIBGNUTLS_CFLAGS@ LIBGNUTLS_CONFIG = @LIBGNUTLS_CONFIG@ LIBGNUTLS_EXTRA_CFLAGS = @LIBGNUTLS_EXTRA_CFLAGS@ LIBGNUTLS_EXTRA_CONFIG = @LIBGNUTLS_EXTRA_CONFIG@ LIBGNUTLS_EXTRA_LIBS = @LIBGNUTLS_EXTRA_LIBS@ LIBGNUTLS_LIBS = @LIBGNUTLS_LIBS@ LIBINTL = @LIBINTL@ LIBLTDL = @LIBLTDL@ LIBMULTITHREAD = @LIBMULTITHREAD@ LIBOBJS = @LIBOBJS@ LIBPRELUDECPP_SONAME = @LIBPRELUDECPP_SONAME@ LIBPRELUDE_CFLAGS = @LIBPRELUDE_CFLAGS@ LIBPRELUDE_LIBS = @LIBPRELUDE_LIBS@ LIBPRELUDE_SONAME = @LIBPRELUDE_SONAME@ LIBPTH = @LIBPTH@ LIBPTH_PREFIX = @LIBPTH_PREFIX@ LIBS = @LIBS@ LIBSOCKET = @LIBSOCKET@ LIBTESTS_LIBDEPS = @LIBTESTS_LIBDEPS@ LIBTHREAD = @LIBTHREAD@ LIBTOOL = @LIBTOOL@ LIPO = @LIPO@ LN_S = @LN_S@ LOCALCHARSET_TESTS_ENVIRONMENT = @LOCALCHARSET_TESTS_ENVIRONMENT@ LOCALE_FR = @LOCALE_FR@ LOCALE_FR_UTF8 = @LOCALE_FR_UTF8@ LOCALE_JA = @LOCALE_JA@ LOCALE_TR_UTF8 = @LOCALE_TR_UTF8@ LOCALE_ZH_CN = @LOCALE_ZH_CN@ LOCALSTATEDIR = @LOCALSTATEDIR@ LTALLOCA = @LTALLOCA@ LTDLDEPS = @LTDLDEPS@ LTDLINCL = @LTDLINCL@ LTDLOPEN = @LTDLOPEN@ LTLIBINTL = @LTLIBINTL@ LTLIBMULTITHREAD = @LTLIBMULTITHREAD@ LTLIBOBJS = @LTLIBOBJS@ LTLIBPTH = @LTLIBPTH@ LTLIBTHREAD = @LTLIBTHREAD@ LT_CONFIG_H = @LT_CONFIG_H@ LT_DLLOADERS = @LT_DLLOADERS@ LT_DLPREOPEN = @LT_DLPREOPEN@ LUA_CFLAGS = @LUA_CFLAGS@ LUA_CONFIG = @LUA_CONFIG@ LUA_LIBS = @LUA_LIBS@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MKDIR_P = @MKDIR_P@ NETDB_H = @NETDB_H@ NETINET_IN_H = @NETINET_IN_H@ NEXT_ARPA_INET_H = @NEXT_ARPA_INET_H@ NEXT_AS_FIRST_DIRECTIVE_ARPA_INET_H = @NEXT_AS_FIRST_DIRECTIVE_ARPA_INET_H@ NEXT_AS_FIRST_DIRECTIVE_ERRNO_H = @NEXT_AS_FIRST_DIRECTIVE_ERRNO_H@ NEXT_AS_FIRST_DIRECTIVE_FCNTL_H = @NEXT_AS_FIRST_DIRECTIVE_FCNTL_H@ NEXT_AS_FIRST_DIRECTIVE_FLOAT_H = @NEXT_AS_FIRST_DIRECTIVE_FLOAT_H@ NEXT_AS_FIRST_DIRECTIVE_LANGINFO_H = @NEXT_AS_FIRST_DIRECTIVE_LANGINFO_H@ NEXT_AS_FIRST_DIRECTIVE_MATH_H = @NEXT_AS_FIRST_DIRECTIVE_MATH_H@ NEXT_AS_FIRST_DIRECTIVE_NETDB_H = @NEXT_AS_FIRST_DIRECTIVE_NETDB_H@ NEXT_AS_FIRST_DIRECTIVE_NETINET_IN_H = @NEXT_AS_FIRST_DIRECTIVE_NETINET_IN_H@ NEXT_AS_FIRST_DIRECTIVE_SIGNAL_H = @NEXT_AS_FIRST_DIRECTIVE_SIGNAL_H@ NEXT_AS_FIRST_DIRECTIVE_STDDEF_H = @NEXT_AS_FIRST_DIRECTIVE_STDDEF_H@ NEXT_AS_FIRST_DIRECTIVE_STDINT_H = @NEXT_AS_FIRST_DIRECTIVE_STDINT_H@ NEXT_AS_FIRST_DIRECTIVE_STDIO_H = @NEXT_AS_FIRST_DIRECTIVE_STDIO_H@ NEXT_AS_FIRST_DIRECTIVE_STDLIB_H = @NEXT_AS_FIRST_DIRECTIVE_STDLIB_H@ NEXT_AS_FIRST_DIRECTIVE_STRINGS_H = @NEXT_AS_FIRST_DIRECTIVE_STRINGS_H@ NEXT_AS_FIRST_DIRECTIVE_STRING_H = @NEXT_AS_FIRST_DIRECTIVE_STRING_H@ NEXT_AS_FIRST_DIRECTIVE_SYS_IOCTL_H = @NEXT_AS_FIRST_DIRECTIVE_SYS_IOCTL_H@ NEXT_AS_FIRST_DIRECTIVE_SYS_SELECT_H = @NEXT_AS_FIRST_DIRECTIVE_SYS_SELECT_H@ NEXT_AS_FIRST_DIRECTIVE_SYS_SOCKET_H = @NEXT_AS_FIRST_DIRECTIVE_SYS_SOCKET_H@ NEXT_AS_FIRST_DIRECTIVE_SYS_STAT_H = @NEXT_AS_FIRST_DIRECTIVE_SYS_STAT_H@ NEXT_AS_FIRST_DIRECTIVE_SYS_TIME_H = @NEXT_AS_FIRST_DIRECTIVE_SYS_TIME_H@ NEXT_AS_FIRST_DIRECTIVE_SYS_UTSNAME_H = @NEXT_AS_FIRST_DIRECTIVE_SYS_UTSNAME_H@ NEXT_AS_FIRST_DIRECTIVE_TIME_H = @NEXT_AS_FIRST_DIRECTIVE_TIME_H@ NEXT_AS_FIRST_DIRECTIVE_UNISTD_H = @NEXT_AS_FIRST_DIRECTIVE_UNISTD_H@ NEXT_AS_FIRST_DIRECTIVE_WCHAR_H = @NEXT_AS_FIRST_DIRECTIVE_WCHAR_H@ NEXT_AS_FIRST_DIRECTIVE_WCTYPE_H = @NEXT_AS_FIRST_DIRECTIVE_WCTYPE_H@ NEXT_ERRNO_H = @NEXT_ERRNO_H@ NEXT_FCNTL_H = @NEXT_FCNTL_H@ NEXT_FLOAT_H = @NEXT_FLOAT_H@ NEXT_LANGINFO_H = @NEXT_LANGINFO_H@ NEXT_MATH_H = @NEXT_MATH_H@ NEXT_NETDB_H = @NEXT_NETDB_H@ NEXT_NETINET_IN_H = @NEXT_NETINET_IN_H@ NEXT_SIGNAL_H = @NEXT_SIGNAL_H@ NEXT_STDDEF_H = @NEXT_STDDEF_H@ NEXT_STDINT_H = @NEXT_STDINT_H@ NEXT_STDIO_H = @NEXT_STDIO_H@ NEXT_STDLIB_H = @NEXT_STDLIB_H@ NEXT_STRINGS_H = @NEXT_STRINGS_H@ NEXT_STRING_H = @NEXT_STRING_H@ NEXT_SYS_IOCTL_H = @NEXT_SYS_IOCTL_H@ NEXT_SYS_SELECT_H = @NEXT_SYS_SELECT_H@ NEXT_SYS_SOCKET_H = @NEXT_SYS_SOCKET_H@ NEXT_SYS_STAT_H = @NEXT_SYS_STAT_H@ NEXT_SYS_TIME_H = @NEXT_SYS_TIME_H@ NEXT_SYS_UTSNAME_H = @NEXT_SYS_UTSNAME_H@ NEXT_TIME_H = @NEXT_TIME_H@ NEXT_UNISTD_H = @NEXT_UNISTD_H@ NEXT_WCHAR_H = @NEXT_WCHAR_H@ NEXT_WCTYPE_H = @NEXT_WCTYPE_H@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PCFLAGS = @PCFLAGS@ PERL = @PERL@ PERL_EXTRA_PARAMS = @PERL_EXTRA_PARAMS@ PKG_CONFIG = @PKG_CONFIG@ POLL_H = @POLL_H@ PRAGMA_SYSTEM_HEADER = @PRAGMA_SYSTEM_HEADER@ PRELUDE_ADMIN_CFLAGS = @PRELUDE_ADMIN_CFLAGS@ PRELUDE_ADMIN_LIBS = @PRELUDE_ADMIN_LIBS@ PRELUDE_CONFIG_DIR = @PRELUDE_CONFIG_DIR@ PRELUDE_SPOOL_DIR = @PRELUDE_SPOOL_DIR@ PTHREAD_CFLAGS = @PTHREAD_CFLAGS@ PTHREAD_LDFLAGS = @PTHREAD_LDFLAGS@ PTHREAD_LIBS = @PTHREAD_LIBS@ PTRDIFF_T_SUFFIX = @PTRDIFF_T_SUFFIX@ PYTHON = @PYTHON@ RANLIB = @RANLIB@ RELOCATABLE = @RELOCATABLE@ REPLACE_BTOWC = @REPLACE_BTOWC@ REPLACE_CANONICALIZE_FILE_NAME = @REPLACE_CANONICALIZE_FILE_NAME@ REPLACE_CEILF = @REPLACE_CEILF@ REPLACE_CEILL = @REPLACE_CEILL@ REPLACE_CHOWN = @REPLACE_CHOWN@ REPLACE_CLOSE = @REPLACE_CLOSE@ REPLACE_DPRINTF = @REPLACE_DPRINTF@ REPLACE_DUP = @REPLACE_DUP@ REPLACE_DUP2 = @REPLACE_DUP2@ REPLACE_FCHDIR = @REPLACE_FCHDIR@ REPLACE_FCHOWNAT = @REPLACE_FCHOWNAT@ REPLACE_FCLOSE = @REPLACE_FCLOSE@ REPLACE_FCNTL = @REPLACE_FCNTL@ REPLACE_FFLUSH = @REPLACE_FFLUSH@ REPLACE_FLOORF = @REPLACE_FLOORF@ REPLACE_FLOORL = @REPLACE_FLOORL@ REPLACE_FOPEN = @REPLACE_FOPEN@ REPLACE_FPRINTF = @REPLACE_FPRINTF@ REPLACE_FPURGE = @REPLACE_FPURGE@ REPLACE_FREOPEN = @REPLACE_FREOPEN@ REPLACE_FREXP = @REPLACE_FREXP@ REPLACE_FREXPL = @REPLACE_FREXPL@ REPLACE_FSEEK = @REPLACE_FSEEK@ REPLACE_FSEEKO = @REPLACE_FSEEKO@ REPLACE_FSTAT = @REPLACE_FSTAT@ REPLACE_FSTATAT = @REPLACE_FSTATAT@ REPLACE_FTELL = @REPLACE_FTELL@ REPLACE_FTELLO = @REPLACE_FTELLO@ REPLACE_FUTIMENS = @REPLACE_FUTIMENS@ REPLACE_GETCWD = @REPLACE_GETCWD@ REPLACE_GETDELIM = @REPLACE_GETDELIM@ REPLACE_GETGROUPS = @REPLACE_GETGROUPS@ REPLACE_GETLINE = @REPLACE_GETLINE@ REPLACE_GETPAGESIZE = @REPLACE_GETPAGESIZE@ REPLACE_GETTIMEOFDAY = @REPLACE_GETTIMEOFDAY@ REPLACE_HUGE_VAL = @REPLACE_HUGE_VAL@ REPLACE_ISFINITE = @REPLACE_ISFINITE@ REPLACE_ISINF = @REPLACE_ISINF@ REPLACE_ISNAN = @REPLACE_ISNAN@ REPLACE_ISWCNTRL = @REPLACE_ISWCNTRL@ REPLACE_LCHOWN = @REPLACE_LCHOWN@ REPLACE_LDEXPL = @REPLACE_LDEXPL@ REPLACE_LINK = @REPLACE_LINK@ REPLACE_LINKAT = @REPLACE_LINKAT@ REPLACE_LOCALTIME_R = @REPLACE_LOCALTIME_R@ REPLACE_LSEEK = @REPLACE_LSEEK@ REPLACE_LSTAT = @REPLACE_LSTAT@ REPLACE_MBRLEN = @REPLACE_MBRLEN@ REPLACE_MBRTOWC = @REPLACE_MBRTOWC@ REPLACE_MBSINIT = @REPLACE_MBSINIT@ REPLACE_MBSNRTOWCS = @REPLACE_MBSNRTOWCS@ REPLACE_MBSRTOWCS = @REPLACE_MBSRTOWCS@ REPLACE_MBSTATE_T = @REPLACE_MBSTATE_T@ REPLACE_MEMCHR = @REPLACE_MEMCHR@ REPLACE_MEMMEM = @REPLACE_MEMMEM@ REPLACE_MKDIR = @REPLACE_MKDIR@ REPLACE_MKFIFO = @REPLACE_MKFIFO@ REPLACE_MKNOD = @REPLACE_MKNOD@ REPLACE_MKSTEMP = @REPLACE_MKSTEMP@ REPLACE_MKTIME = @REPLACE_MKTIME@ REPLACE_NAN = @REPLACE_NAN@ REPLACE_NANOSLEEP = @REPLACE_NANOSLEEP@ REPLACE_NL_LANGINFO = @REPLACE_NL_LANGINFO@ REPLACE_NULL = @REPLACE_NULL@ REPLACE_OBSTACK_PRINTF = @REPLACE_OBSTACK_PRINTF@ REPLACE_OPEN = @REPLACE_OPEN@ REPLACE_OPENAT = @REPLACE_OPENAT@ REPLACE_PERROR = @REPLACE_PERROR@ REPLACE_POPEN = @REPLACE_POPEN@ REPLACE_PREAD = @REPLACE_PREAD@ REPLACE_PRINTF = @REPLACE_PRINTF@ REPLACE_PUTENV = @REPLACE_PUTENV@ REPLACE_READLINK = @REPLACE_READLINK@ REPLACE_REALPATH = @REPLACE_REALPATH@ REPLACE_REMOVE = @REPLACE_REMOVE@ REPLACE_RENAME = @REPLACE_RENAME@ REPLACE_RENAMEAT = @REPLACE_RENAMEAT@ REPLACE_RMDIR = @REPLACE_RMDIR@ REPLACE_ROUND = @REPLACE_ROUND@ REPLACE_ROUNDF = @REPLACE_ROUNDF@ REPLACE_ROUNDL = @REPLACE_ROUNDL@ REPLACE_SELECT = @REPLACE_SELECT@ REPLACE_SETENV = @REPLACE_SETENV@ REPLACE_SIGNBIT = @REPLACE_SIGNBIT@ REPLACE_SIGNBIT_USING_GCC = @REPLACE_SIGNBIT_USING_GCC@ REPLACE_SLEEP = @REPLACE_SLEEP@ REPLACE_SNPRINTF = @REPLACE_SNPRINTF@ REPLACE_SPRINTF = @REPLACE_SPRINTF@ REPLACE_STAT = @REPLACE_STAT@ REPLACE_STDIO_WRITE_FUNCS = @REPLACE_STDIO_WRITE_FUNCS@ REPLACE_STRCASESTR = @REPLACE_STRCASESTR@ REPLACE_STRDUP = @REPLACE_STRDUP@ REPLACE_STRERROR = @REPLACE_STRERROR@ REPLACE_STRNDUP = @REPLACE_STRNDUP@ REPLACE_STRPTIME = @REPLACE_STRPTIME@ REPLACE_STRSIGNAL = @REPLACE_STRSIGNAL@ REPLACE_STRSTR = @REPLACE_STRSTR@ REPLACE_STRTOD = @REPLACE_STRTOD@ REPLACE_STRTOK_R = @REPLACE_STRTOK_R@ REPLACE_SYMLINK = @REPLACE_SYMLINK@ REPLACE_TIMEGM = @REPLACE_TIMEGM@ REPLACE_TRUNCL = @REPLACE_TRUNCL@ REPLACE_UNLINK = @REPLACE_UNLINK@ REPLACE_UNLINKAT = @REPLACE_UNLINKAT@ REPLACE_UNSETENV = @REPLACE_UNSETENV@ REPLACE_USLEEP = @REPLACE_USLEEP@ REPLACE_UTIMENSAT = @REPLACE_UTIMENSAT@ REPLACE_VASPRINTF = @REPLACE_VASPRINTF@ REPLACE_VDPRINTF = @REPLACE_VDPRINTF@ REPLACE_VFPRINTF = @REPLACE_VFPRINTF@ REPLACE_VPRINTF = @REPLACE_VPRINTF@ REPLACE_VSNPRINTF = @REPLACE_VSNPRINTF@ REPLACE_VSPRINTF = @REPLACE_VSPRINTF@ REPLACE_WCRTOMB = @REPLACE_WCRTOMB@ REPLACE_WCSNRTOMBS = @REPLACE_WCSNRTOMBS@ REPLACE_WCSRTOMBS = @REPLACE_WCSRTOMBS@ REPLACE_WCTOB = @REPLACE_WCTOB@ REPLACE_WCWIDTH = @REPLACE_WCWIDTH@ REPLACE_WRITE = @REPLACE_WRITE@ RUBY = @RUBY@ RUBY_CCFLAGS = @RUBY_CCFLAGS@ RUBY_EXEC_PREFIX = @RUBY_EXEC_PREFIX@ RUBY_INCLUDES = @RUBY_INCLUDES@ RUBY_LIBS = @RUBY_LIBS@ RUBY_PLATFORM = @RUBY_PLATFORM@ RUBY_PREFIX = @RUBY_PREFIX@ RUBY_VERSION = @RUBY_VERSION@ SED = @SED@ SERVENT_LIB = @SERVENT_LIB@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ SIG_ATOMIC_T_SUFFIX = @SIG_ATOMIC_T_SUFFIX@ SIZE_T_SUFFIX = @SIZE_T_SUFFIX@ STDBOOL_H = @STDBOOL_H@ STDDEF_H = @STDDEF_H@ STDINT_H = @STDINT_H@ STRIP = @STRIP@ SWIG = @SWIG@ SYSCONFDIR = @SYSCONFDIR@ SYS_IOCTL_H_HAVE_WINSOCK2_H = @SYS_IOCTL_H_HAVE_WINSOCK2_H@ SYS_IOCTL_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS = @SYS_IOCTL_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS@ SYS_SOCKET_H = @SYS_SOCKET_H@ SYS_TIME_H_DEFINES_STRUCT_TIMESPEC = @SYS_TIME_H_DEFINES_STRUCT_TIMESPEC@ TIME_H_DEFINES_STRUCT_TIMESPEC = @TIME_H_DEFINES_STRUCT_TIMESPEC@ UNDEFINE_STRTOK_R = @UNDEFINE_STRTOK_R@ UNISTD_H_HAVE_WINSOCK2_H = @UNISTD_H_HAVE_WINSOCK2_H@ UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS = @UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS@ VALGRIND = @VALGRIND@ VERSION = @VERSION@ WCHAR_T_SUFFIX = @WCHAR_T_SUFFIX@ WCTYPE_H = @WCTYPE_H@ WINT_T_SUFFIX = @WINT_T_SUFFIX@ YACC = @YACC@ YFLAGS = @YFLAGS@ YIELD_LIB = @YIELD_LIB@ __PRELUDE_64BIT_FORMAT_PREFIX = @__PRELUDE_64BIT_FORMAT_PREFIX@ __PRELUDE_HAVE_64BIT_LONG = @__PRELUDE_HAVE_64BIT_LONG@ __PRELUDE_HAVE_INTTYPES_H = @__PRELUDE_HAVE_INTTYPES_H@ __PRELUDE_HAVE_STDINT_H = @__PRELUDE_HAVE_STDINT_H@ __PRELUDE_STDINT_HAVE_UINT16 = @__PRELUDE_STDINT_HAVE_UINT16@ __PRELUDE_STDINT_HAVE_UINT32 = @__PRELUDE_STDINT_HAVE_UINT32@ __PRELUDE_STDINT_HAVE_UINT64 = @__PRELUDE_STDINT_HAVE_UINT64@ __PRELUDE_STDINT_HAVE_UINT8 = @__PRELUDE_STDINT_HAVE_UINT8@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ gl_LIBOBJS = @gl_LIBOBJS@ gl_LTLIBOBJS = @gl_LTLIBOBJS@ gltests_LIBOBJS = @gltests_LIBOBJS@ gltests_LTLIBOBJS = @gltests_LTLIBOBJS@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = $(prefix)/include/libprelude infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ lt_ECHO = @lt_ECHO@ ltdl_LIBOBJS = @ltdl_LIBOBJS@ ltdl_LTLIBOBJS = @ltdl_LTLIBOBJS@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ pkgrbexecdir = @pkgrbexecdir@ pkgrubydir = @pkgrubydir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ rbexecdir = @rbexecdir@ rubydir = @rubydir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sys_symbol_underscore = @sys_symbol_underscore@ sysconfdir = @sysconfdir@ target = @target@ target_alias = @target_alias@ target_cpu = @target_cpu@ target_os = @target_os@ target_vendor = @target_vendor@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ DISTCHECK_CONFIGURE_FLAGS = --enable-gtk-doc ACLOCAL_AMFLAGS = -I m4 -I libmissing/m4 SUBDIRS = libltdl libmissing m4 src prelude-admin bindings docs tests DIST_SUBDIRS = $(SUBDIRS) EXTRA_DIST = HACKING.README LICENSE.README tls.conf bin_SCRIPTS = $(top_builddir)/libprelude-config distuninstallcheck_listfiles = find . -type f -print | $(GREP) -v 'perl' | $(GREP) -v '3pm' | $(GREP) -v 'egg-info' include_HEADERS = prelude-config.h MOSTLYCLEANFILES = prelude-config.h BUILT_SOURCES = prelude-config.h MAINTAINERCLEANFILES = \ $(srcdir)/INSTALL \ $(srcdir)/aclocal.m4 \ $(srcdir)/autoscan.log \ $(srcdir)/compile \ $(srcdir)/config.guess \ $(srcdir)/config.h.in \ $(srcdir)/config.sub \ $(srcdir)/configure.scan \ $(srcdir)/depcomp \ $(srcdir)/install-sh \ $(srcdir)/ltmain.sh \ $(srcdir)/missing \ $(srcdir)/mkinstalldirs \ $(srcdir)/omf.make \ $(srcdir)/xmldocs.make \ $(srcdir)/ylwrap \ $(srcdir)/gtk-doc.make \ $(srcdir)/ChangeLog \ `find "$(srcdir)" -type f -name Makefile.in -print` all: $(BUILT_SOURCES) config.h $(MAKE) $(AM_MAKEFLAGS) all-recursive .SUFFIXES: am--refresh: @: $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ echo ' cd $(srcdir) && $(AUTOMAKE) --gnu'; \ $(am__cd) $(srcdir) && $(AUTOMAKE) --gnu \ && exit 0; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ echo ' $(SHELL) ./config.status'; \ $(SHELL) ./config.status;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) $(SHELL) ./config.status --recheck $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) $(am__cd) $(srcdir) && $(AUTOCONF) $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) $(am__cd) $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS) $(am__aclocal_m4_deps): config.h: stamp-h1 @if test ! -f $@; then \ rm -f stamp-h1; \ $(MAKE) $(AM_MAKEFLAGS) stamp-h1; \ else :; fi stamp-h1: $(srcdir)/config.h.in $(top_builddir)/config.status @rm -f stamp-h1 cd $(top_builddir) && $(SHELL) ./config.status config.h $(srcdir)/config.h.in: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) ($(am__cd) $(top_srcdir) && $(AUTOHEADER)) rm -f stamp-h1 touch $@ distclean-hdr: -rm -f config.h stamp-h1 client.conf: $(top_builddir)/config.status $(srcdir)/client.conf.in cd $(top_builddir) && $(SHELL) ./config.status $@ global.conf: $(top_builddir)/config.status $(srcdir)/global.conf.in cd $(top_builddir) && $(SHELL) ./config.status $@ idmef-client.conf: $(top_builddir)/config.status $(srcdir)/idmef-client.conf.in cd $(top_builddir) && $(SHELL) ./config.status $@ libprelude-config: $(top_builddir)/config.status $(srcdir)/libprelude-config.in cd $(top_builddir) && $(SHELL) ./config.status $@ bindings/low-level/perl/Makefile.PL: $(top_builddir)/config.status $(top_srcdir)/bindings/low-level/perl/Makefile.PL.in cd $(top_builddir) && $(SHELL) ./config.status $@ bindings/perl/Makefile.PL: $(top_builddir)/config.status $(top_srcdir)/bindings/perl/Makefile.PL.in cd $(top_builddir) && $(SHELL) ./config.status $@ install-binSCRIPTS: $(bin_SCRIPTS) @$(NORMAL_INSTALL) test -z "$(bindir)" || $(MKDIR_P) "$(DESTDIR)$(bindir)" @list='$(bin_SCRIPTS)'; test -n "$(bindir)" || list=; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ if test -f "$$d$$p"; then echo "$$d$$p"; echo "$$p"; else :; fi; \ done | \ sed -e 'p;s,.*/,,;n' \ -e 'h;s|.*|.|' \ -e 'p;x;s,.*/,,;$(transform)' | sed 'N;N;N;s,\n, ,g' | \ $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1; } \ { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \ if ($$2 == $$4) { files[d] = files[d] " " $$1; \ if (++n[d] == $(am__install_max)) { \ print "f", d, files[d]; n[d] = 0; files[d] = "" } } \ else { print "f", d "/" $$4, $$1 } } \ END { for (d in files) print "f", d, files[d] }' | \ while read type dir files; do \ if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \ test -z "$$files" || { \ echo " $(INSTALL_SCRIPT) $$files '$(DESTDIR)$(bindir)$$dir'"; \ $(INSTALL_SCRIPT) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \ } \ ; done uninstall-binSCRIPTS: @$(NORMAL_UNINSTALL) @list='$(bin_SCRIPTS)'; test -n "$(bindir)" || exit 0; \ files=`for p in $$list; do echo "$$p"; done | \ sed -e 's,.*/,,;$(transform)'`; \ test -n "$$list" || exit 0; \ echo " ( cd '$(DESTDIR)$(bindir)' && rm -f" $$files ")"; \ cd "$(DESTDIR)$(bindir)" && rm -f $$files mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs distclean-libtool: -rm -f libtool config.lt install-includeHEADERS: $(include_HEADERS) @$(NORMAL_INSTALL) test -z "$(includedir)" || $(MKDIR_P) "$(DESTDIR)$(includedir)" @list='$(include_HEADERS)'; test -n "$(includedir)" || list=; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ done | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_HEADER) $$files '$(DESTDIR)$(includedir)'"; \ $(INSTALL_HEADER) $$files "$(DESTDIR)$(includedir)" || exit $$?; \ done uninstall-includeHEADERS: @$(NORMAL_UNINSTALL) @list='$(include_HEADERS)'; test -n "$(includedir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ test -n "$$files" || exit 0; \ echo " ( cd '$(DESTDIR)$(includedir)' && rm -f" $$files ")"; \ cd "$(DESTDIR)$(includedir)" && rm -f $$files # This directory's subdirectories are mostly independent; you can cd # into them and run `make' without going through this Makefile. # To change the values of `make' variables: instead of editing Makefiles, # (1) if the variable is set in `config.status', edit `config.status' # (which will cause the Makefiles to be regenerated when you run `make'); # (2) otherwise, pass the desired values on the `make' command line. $(RECURSIVE_TARGETS): @fail= failcom='exit 1'; \ for f in x $$MAKEFLAGS; do \ case $$f in \ *=* | --[!k]*);; \ *k*) failcom='fail=yes';; \ esac; \ done; \ dot_seen=no; \ target=`echo $@ | sed s/-recursive//`; \ list='$(SUBDIRS)'; for subdir in $$list; do \ echo "Making $$target in $$subdir"; \ if test "$$subdir" = "."; then \ dot_seen=yes; \ local_target="$$target-am"; \ else \ local_target="$$target"; \ fi; \ ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ || eval $$failcom; \ done; \ if test "$$dot_seen" = "no"; then \ $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ fi; test -z "$$fail" $(RECURSIVE_CLEAN_TARGETS): @fail= failcom='exit 1'; \ for f in x $$MAKEFLAGS; do \ case $$f in \ *=* | --[!k]*);; \ *k*) failcom='fail=yes';; \ esac; \ done; \ dot_seen=no; \ case "$@" in \ distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ *) list='$(SUBDIRS)' ;; \ esac; \ rev=''; for subdir in $$list; do \ if test "$$subdir" = "."; then :; else \ rev="$$subdir $$rev"; \ fi; \ done; \ rev="$$rev ."; \ target=`echo $@ | sed s/-recursive//`; \ for subdir in $$rev; do \ echo "Making $$target in $$subdir"; \ if test "$$subdir" = "."; then \ local_target="$$target-am"; \ else \ local_target="$$target"; \ fi; \ ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ || eval $$failcom; \ done && test -z "$$fail" tags-recursive: list='$(SUBDIRS)'; for subdir in $$list; do \ test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \ done ctags-recursive: list='$(SUBDIRS)'; for subdir in $$list; do \ test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \ done ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ mkid -fID $$unique tags: TAGS TAGS: tags-recursive $(HEADERS) $(SOURCES) config.h.in $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) set x; \ here=`pwd`; \ if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ include_option=--etags-include; \ empty_fix=.; \ else \ include_option=--include; \ empty_fix=; \ fi; \ list='$(SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ test ! -f $$subdir/TAGS || \ set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \ fi; \ done; \ list='$(SOURCES) $(HEADERS) config.h.in $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: CTAGS CTAGS: ctags-recursive $(HEADERS) $(SOURCES) config.h.in $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) list='$(SOURCES) $(HEADERS) config.h.in $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) $(am__remove_distdir) test -d "$(distdir)" || mkdir "$(distdir)" @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ test -d "$(distdir)/$$subdir" \ || $(MKDIR_P) "$(distdir)/$$subdir" \ || exit 1; \ fi; \ done @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ dir1=$$subdir; dir2="$(distdir)/$$subdir"; \ $(am__relativize); \ new_distdir=$$reldir; \ dir1=$$subdir; dir2="$(top_distdir)"; \ $(am__relativize); \ new_top_distdir=$$reldir; \ echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \ echo " am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \ ($(am__cd) $$subdir && \ $(MAKE) $(AM_MAKEFLAGS) \ top_distdir="$$new_top_distdir" \ distdir="$$new_distdir" \ am__remove_distdir=: \ am__skip_length_check=: \ am__skip_mode_fix=: \ distdir) \ || exit 1; \ fi; \ done $(MAKE) $(AM_MAKEFLAGS) \ top_distdir="$(top_distdir)" distdir="$(distdir)" \ dist-hook -test -n "$(am__skip_mode_fix)" \ || find "$(distdir)" -type d ! -perm -755 \ -exec chmod u+rwx,go+rx {} \; -o \ ! -type d ! -perm -444 -links 1 -exec chmod a+r {} \; -o \ ! -type d ! -perm -400 -exec chmod a+r {} \; -o \ ! -type d ! -perm -444 -exec $(install_sh) -c -m a+r {} {} \; \ || chmod -R a+r "$(distdir)" dist-gzip: distdir tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz $(am__remove_distdir) dist-bzip2: distdir tardir=$(distdir) && $(am__tar) | bzip2 -9 -c >$(distdir).tar.bz2 $(am__remove_distdir) dist-lzma: distdir tardir=$(distdir) && $(am__tar) | lzma -9 -c >$(distdir).tar.lzma $(am__remove_distdir) dist-xz: distdir tardir=$(distdir) && $(am__tar) | xz -c >$(distdir).tar.xz $(am__remove_distdir) dist-tarZ: distdir tardir=$(distdir) && $(am__tar) | compress -c >$(distdir).tar.Z $(am__remove_distdir) dist-shar: distdir shar $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).shar.gz $(am__remove_distdir) dist-zip: distdir -rm -f $(distdir).zip zip -rq $(distdir).zip $(distdir) $(am__remove_distdir) dist dist-all: distdir tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz $(am__remove_distdir) # This target untars the dist file and tries a VPATH configuration. Then # it guarantees that the distribution is self-contained by making another # tarfile. distcheck: dist case '$(DIST_ARCHIVES)' in \ *.tar.gz*) \ GZIP=$(GZIP_ENV) gzip -dc $(distdir).tar.gz | $(am__untar) ;;\ *.tar.bz2*) \ bzip2 -dc $(distdir).tar.bz2 | $(am__untar) ;;\ *.tar.lzma*) \ lzma -dc $(distdir).tar.lzma | $(am__untar) ;;\ *.tar.xz*) \ xz -dc $(distdir).tar.xz | $(am__untar) ;;\ *.tar.Z*) \ uncompress -c $(distdir).tar.Z | $(am__untar) ;;\ *.shar.gz*) \ GZIP=$(GZIP_ENV) gzip -dc $(distdir).shar.gz | unshar ;;\ *.zip*) \ unzip $(distdir).zip ;;\ esac chmod -R a-w $(distdir); chmod a+w $(distdir) mkdir $(distdir)/_build mkdir $(distdir)/_inst chmod a-w $(distdir) test -d $(distdir)/_build || exit 0; \ dc_install_base=`$(am__cd) $(distdir)/_inst && pwd | sed -e 's,^[^:\\/]:[\\/],/,'` \ && dc_destdir="$${TMPDIR-/tmp}/am-dc-$$$$/" \ && am__cwd=`pwd` \ && $(am__cd) $(distdir)/_build \ && ../configure --srcdir=.. --prefix="$$dc_install_base" \ $(DISTCHECK_CONFIGURE_FLAGS) \ && $(MAKE) $(AM_MAKEFLAGS) \ && $(MAKE) $(AM_MAKEFLAGS) dvi \ && $(MAKE) $(AM_MAKEFLAGS) check \ && $(MAKE) $(AM_MAKEFLAGS) install \ && $(MAKE) $(AM_MAKEFLAGS) installcheck \ && $(MAKE) $(AM_MAKEFLAGS) uninstall \ && $(MAKE) $(AM_MAKEFLAGS) distuninstallcheck_dir="$$dc_install_base" \ distuninstallcheck \ && chmod -R a-w "$$dc_install_base" \ && ({ \ (cd ../.. && umask 077 && mkdir "$$dc_destdir") \ && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" install \ && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" uninstall \ && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" \ distuninstallcheck_dir="$$dc_destdir" distuninstallcheck; \ } || { rm -rf "$$dc_destdir"; exit 1; }) \ && rm -rf "$$dc_destdir" \ && $(MAKE) $(AM_MAKEFLAGS) dist \ && rm -rf $(DIST_ARCHIVES) \ && $(MAKE) $(AM_MAKEFLAGS) distcleancheck \ && cd "$$am__cwd" \ || exit 1 $(am__remove_distdir) @(echo "$(distdir) archives ready for distribution: "; \ list='$(DIST_ARCHIVES)'; for i in $$list; do echo $$i; done) | \ sed -e 1h -e 1s/./=/g -e 1p -e 1x -e '$$p' -e '$$x' distuninstallcheck: @$(am__cd) '$(distuninstallcheck_dir)' \ && test `$(distuninstallcheck_listfiles) | wc -l` -le 1 \ || { echo "ERROR: files left after uninstall:" ; \ if test -n "$(DESTDIR)"; then \ echo " (check DESTDIR support)"; \ fi ; \ $(distuninstallcheck_listfiles) ; \ exit 1; } >&2 distcleancheck: distclean @if test '$(srcdir)' = . ; then \ echo "ERROR: distcleancheck can only run from a VPATH build" ; \ exit 1 ; \ fi @test `$(distcleancheck_listfiles) | wc -l` -eq 0 \ || { echo "ERROR: files left in build directory after distclean:" ; \ $(distcleancheck_listfiles) ; \ exit 1; } >&2 check-am: all-am check: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) check-recursive all-am: Makefile $(SCRIPTS) $(HEADERS) config.h installdirs: installdirs-recursive installdirs-am: for dir in "$(DESTDIR)$(bindir)" "$(DESTDIR)$(includedir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) install-recursive install-exec: install-exec-recursive install-data: install-data-recursive uninstall: uninstall-recursive install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-recursive install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: -test -z "$(MOSTLYCLEANFILES)" || rm -f $(MOSTLYCLEANFILES) clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." -test -z "$(BUILT_SOURCES)" || rm -f $(BUILT_SOURCES) -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES) clean: clean-recursive clean-am: clean-generic clean-libtool mostlyclean-am distclean: distclean-recursive -rm -f $(am__CONFIG_DISTCLEAN_FILES) -rm -f Makefile distclean-am: clean-am distclean-generic distclean-hdr \ distclean-libtool distclean-tags dvi: dvi-recursive dvi-am: html: html-recursive html-am: info: info-recursive info-am: install-data-am: install-data-local install-includeHEADERS install-dvi: install-dvi-recursive install-dvi-am: install-exec-am: install-binSCRIPTS install-html: install-html-recursive install-html-am: install-info: install-info-recursive install-info-am: install-man: install-pdf: install-pdf-recursive install-pdf-am: install-ps: install-ps-recursive install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-recursive -rm -f $(am__CONFIG_DISTCLEAN_FILES) -rm -rf $(top_srcdir)/autom4te.cache -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-recursive mostlyclean-am: mostlyclean-generic mostlyclean-libtool pdf: pdf-recursive pdf-am: ps: ps-recursive ps-am: uninstall-am: uninstall-binSCRIPTS uninstall-includeHEADERS \ uninstall-local .MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) all check \ ctags-recursive install install-am install-strip \ tags-recursive .PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \ all all-am am--refresh check check-am clean clean-generic \ clean-libtool ctags ctags-recursive dist dist-all dist-bzip2 \ dist-gzip dist-hook dist-lzma dist-shar dist-tarZ dist-xz \ dist-zip distcheck distclean distclean-generic distclean-hdr \ distclean-libtool distclean-tags distcleancheck distdir \ distuninstallcheck dvi dvi-am html html-am info info-am \ install install-am install-binSCRIPTS install-data \ install-data-am install-data-local install-dvi install-dvi-am \ install-exec install-exec-am install-html install-html-am \ install-includeHEADERS install-info install-info-am \ install-man install-pdf install-pdf-am install-ps \ install-ps-am install-strip installcheck installcheck-am \ installdirs installdirs-am maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-generic \ mostlyclean-libtool pdf pdf-am ps ps-am tags tags-recursive \ uninstall uninstall-am uninstall-binSCRIPTS \ uninstall-includeHEADERS uninstall-local prelude-config.h: $(top_builddir)/config.h rm -f prelude-config.h echo "/* Used from libprelude headers */" >> prelude-config.h $(GREP) "HAVE_VARIADIC_MACROS" < $(top_builddir)/config.h >> prelude-config.h $(GREP) "PRELUDE_ALIGNED_ACCESS" < $(top_builddir)/config.h >> prelude-config.h $(GREP) "PRELUDE_WORDS_BIGENDIAN" < $(top_builddir)/config.h >> prelude-config.h $(GREP) "__PRELUDE_FUNC__" < $(top_builddir)/config.h >> prelude-config.h @echo "#ifndef TIME_WITH_SYS_TIME" >> prelude-config.h $(GREP) "TIME_WITH_SYS_TIME" < $(top_builddir)/config.h >> prelude-config.h @echo "#endif" >> prelude-config.h @echo "#ifndef HAVE_UID_T" >> prelude-config.h $(GREP) "HAVE_UID_T" < $(top_builddir)/config.h >> prelude-config.h @echo "#endif" >> prelude-config.h @echo "#ifndef HAVE_GID_T" >> prelude-config.h $(GREP) "HAVE_GID_T" < $(top_builddir)/config.h >> prelude-config.h @echo "#endif" >> prelude-config.h # # Install default sensors configuration with mode 644 # every sensors should be able to read it. # # Spool directory for report saving is mode install-data-local: $(INSTALL) -d -m 711 $(DESTDIR)$(PRELUDE_SPOOL_DIR); $(INSTALL) -d -m 755 $(DESTDIR)$(PRELUDE_CONFIG_DIR); $(INSTALL) -d -m 755 $(DESTDIR)$(PRELUDE_CONFIG_DIR)/default; $(INSTALL) -d -m 711 $(DESTDIR)$(PRELUDE_CONFIG_DIR)/profile; @if test -f $(DESTDIR)$(PRELUDE_CONFIG_DIR)/default/client.conf; then \ echo; \ echo "********************************************************************************"; \ echo; \ echo "$(DESTDIR)$(PRELUDE_CONFIG_DIR)/default/client.conf already exist..."; \ echo "Installing default configuration in $(DESTDIR)$(PRELUDE_CONFIG_DIR)/default/client.conf-dist"; \ echo; \ echo "********************************************************************************"; \ echo; \ $(INSTALL) -m 644 $(top_builddir)/client.conf $(DESTDIR)$(PRELUDE_CONFIG_DIR)/default/client.conf-dist; \ else \ $(INSTALL) -m 644 $(top_builddir)/client.conf $(DESTDIR)$(PRELUDE_CONFIG_DIR)/default; \ fi @if test -f $(DESTDIR)$(PRELUDE_CONFIG_DIR)/default/global.conf; then \ echo; \ echo "********************************************************************************"; \ echo; \ echo "$(DESTDIR)$(PRELUDE_CONFIG_DIR)/default/global.conf already exist..."; \ echo "Installing default configuration in $(DESTDIR)$(PRELUDE_CONFIG_DIR)/default/global.conf-dist"; \ echo; \ echo "********************************************************************************"; \ echo; \ $(INSTALL) -m 644 $(top_builddir)/global.conf $(DESTDIR)$(PRELUDE_CONFIG_DIR)/default/global.conf-dist; \ else \ $(INSTALL) -m 644 $(top_builddir)/global.conf $(DESTDIR)$(PRELUDE_CONFIG_DIR)/default; \ fi @if test -f $(DESTDIR)$(PRELUDE_CONFIG_DIR)/default/idmef-client.conf; then \ echo; \ echo "********************************************************************************"; \ echo; \ echo "$(DESTDIR)$(PRELUDE_CONFIG_DIR)/default/idmef-client.conf already exist..."; \ echo "Installing default configuration in $(DESTDIR)$(PRELUDE_CONFIG_DIR)/default/idmef-client.conf-dist"; \ echo; \ echo "********************************************************************************"; \ echo; \ $(INSTALL) -m 644 $(top_builddir)/idmef-client.conf $(DESTDIR)$(PRELUDE_CONFIG_DIR)/default/idmef-client.conf-dist;\ else \ $(INSTALL) -m 644 $(top_builddir)/idmef-client.conf $(DESTDIR)$(PRELUDE_CONFIG_DIR)/default; \ fi @if test -f $(DESTDIR)$(PRELUDE_CONFIG_DIR)/default/tls.conf; then \ echo; \ echo "********************************************************************************"; \ echo; \ echo "$(DESTDIR)$(PRELUDE_CONFIG_DIR)/default/tls.conf already exist..."; \ echo "Installing default configuration in $(DESTDIR)$(PRELUDE_CONFIG_DIR)/default/tls.conf-dist"; \ echo; \ echo "********************************************************************************"; \ echo; \ $(INSTALL) -m 644 $(top_srcdir)/tls.conf $(DESTDIR)$(PRELUDE_CONFIG_DIR)/default/tls.conf-dist; \ else \ $(INSTALL) -m 644 $(top_srcdir)/tls.conf $(DESTDIR)$(PRELUDE_CONFIG_DIR)/default; \ fi uninstall-local: rm -f $(DESTDIR)$(PRELUDE_CONFIG_DIR)/default/client.conf rm -f $(DESTDIR)$(PRELUDE_CONFIG_DIR)/default/global.conf rm -f $(DESTDIR)$(PRELUDE_CONFIG_DIR)/default/idmef-client.conf rm -f $(DESTDIR)$(PRELUDE_CONFIG_DIR)/default/tls.conf dist-hook: @if test -d "$(srcdir)/.git"; then \ echo Creating ChangeLog && \ ( cd "$(top_srcdir)" && \ echo '# Generated by Makefile. Do not edit.'; echo; \ $(top_srcdir)/missing --run git log --stat ) > ChangeLog.tmp \ && mv -f ChangeLog.tmp $(top_distdir)/ChangeLog \ || ( rm -f ChangeLog.tmp ; \ echo Failed to generate ChangeLog >&2 ); \ else \ echo A git clone is required to generate a ChangeLog >&2; \ fi -include $(top_srcdir)/git.mk # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: libprelude-1.0.0/COPYING0000664000076400007640000004311011202225026011614 00000000000000 GNU GENERAL PUBLIC LICENSE Version 2, June 1991 Copyright (C) 1989, 1991 Free Software Foundation, Inc. 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. Preamble The licenses for most software are designed to take away your freedom to share and change it. By contrast, the GNU General Public License is intended to guarantee your freedom to share and change free software--to make sure the software is free for all its users. This General Public License applies to most of the Free Software Foundation's software and to any other program whose authors commit to using it. (Some other Free Software Foundation software is covered by the GNU Library General Public License instead.) You can apply it to your programs, too. When we speak of free software, we are referring to freedom, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for this service if you wish), that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new free programs; and that you know you can do these things. To protect your rights, we need to make restrictions that forbid anyone to deny you these rights or to ask you to surrender the rights. These restrictions translate to certain responsibilities for you if you distribute copies of the software, or if you modify it. For example, if you distribute copies of such a program, whether gratis or for a fee, you must give the recipients all the rights that you have. You must make sure that they, too, receive or can get the source code. And you must show them these terms so they know their rights. We protect your rights with two steps: (1) copyright the software, and (2) offer you this license which gives you legal permission to copy, distribute and/or modify the software. Also, for each author's protection and ours, we want to make certain that everyone understands that there is no warranty for this free software. If the software is modified by someone else and passed on, we want its recipients to know that what they have is not the original, so that any problems introduced by others will not reflect on the original authors' reputations. Finally, any free program is threatened constantly by software patents. We wish to avoid the danger that redistributors of a free program will individually obtain patent licenses, in effect making the program proprietary. To prevent this, we have made it clear that any patent must be licensed for everyone's free use or not licensed at all. The precise terms and conditions for copying, distribution and modification follow. GNU GENERAL PUBLIC LICENSE TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION 0. This License applies to any program or other work which contains a notice placed by the copyright holder saying it may be distributed under the terms of this General Public License. The "Program", below, refers to any such program or work, and a "work based on the Program" means either the Program or any derivative work under copyright law: that is to say, a work containing the Program or a portion of it, either verbatim or with modifications and/or translated into another language. (Hereinafter, translation is included without limitation in the term "modification".) Each licensee is addressed as "you". Activities other than copying, distribution and modification are not covered by this License; they are outside its scope. The act of running the Program is not restricted, and the output from the Program is covered only if its contents constitute a work based on the Program (independent of having been made by running the Program). Whether that is true depends on what the Program does. 1. You may copy and distribute verbatim copies of the Program's source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice and disclaimer of warranty; keep intact all the notices that refer to this License and to the absence of any warranty; and give any other recipients of the Program a copy of this License along with the Program. You may charge a fee for the physical act of transferring a copy, and you may at your option offer warranty protection in exchange for a fee. 2. You may modify your copy or copies of the Program or any portion of it, thus forming a work based on the Program, and copy and distribute such modifications or work under the terms of Section 1 above, provided that you also meet all of these conditions: a) You must cause the modified files to carry prominent notices stating that you changed the files and the date of any change. b) You must cause any work that you distribute or publish, that in whole or in part contains or is derived from the Program or any part thereof, to be licensed as a whole at no charge to all third parties under the terms of this License. c) If the modified program normally reads commands interactively when run, you must cause it, when started running for such interactive use in the most ordinary way, to print or display an announcement including an appropriate copyright notice and a notice that there is no warranty (or else, saying that you provide a warranty) and that users may redistribute the program under these conditions, and telling the user how to view a copy of this License. (Exception: if the Program itself is interactive but does not normally print such an announcement, your work based on the Program is not required to print an announcement.) These requirements apply to the modified work as a whole. If identifiable sections of that work are not derived from the Program, and can be reasonably considered independent and separate works in themselves, then this License, and its terms, do not apply to those sections when you distribute them as separate works. But when you distribute the same sections as part of a whole which is a work based on the Program, the distribution of the whole must be on the terms of this License, whose permissions for other licensees extend to the entire whole, and thus to each and every part regardless of who wrote it. Thus, it is not the intent of this section to claim rights or contest your rights to work written entirely by you; rather, the intent is to exercise the right to control the distribution of derivative or collective works based on the Program. In addition, mere aggregation of another work not based on the Program with the Program (or with a work based on the Program) on a volume of a storage or distribution medium does not bring the other work under the scope of this License. 3. You may copy and distribute the Program (or a work based on it, under Section 2) in object code or executable form under the terms of Sections 1 and 2 above provided that you also do one of the following: a) Accompany it with the complete corresponding machine-readable source code, which must be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or, b) Accompany it with a written offer, valid for at least three years, to give any third party, for a charge no more than your cost of physically performing source distribution, a complete machine-readable copy of the corresponding source code, to be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or, c) Accompany it with the information you received as to the offer to distribute corresponding source code. (This alternative is allowed only for noncommercial distribution and only if you received the program in object code or executable form with such an offer, in accord with Subsection b above.) The source code for a work means the preferred form of the work for making modifications to it. For an executable work, complete source code means all the source code for all modules it contains, plus any associated interface definition files, plus the scripts used to control compilation and installation of the executable. However, as a special exception, the source code distributed need not include anything that is normally distributed (in either source or binary form) with the major components (compiler, kernel, and so on) of the operating system on which the executable runs, unless that component itself accompanies the executable. If distribution of executable or object code is made by offering access to copy from a designated place, then offering equivalent access to copy the source code from the same place counts as distribution of the source code, even though third parties are not compelled to copy the source along with the object code. 4. You may not copy, modify, sublicense, or distribute the Program except as expressly provided under this License. Any attempt otherwise to copy, modify, sublicense or distribute the Program is void, and will automatically terminate your rights under this License. However, parties who have received copies, or rights, from you under this License will not have their licenses terminated so long as such parties remain in full compliance. 5. You are not required to accept this License, since you have not signed it. However, nothing else grants you permission to modify or distribute the Program or its derivative works. These actions are prohibited by law if you do not accept this License. Therefore, by modifying or distributing the Program (or any work based on the Program), you indicate your acceptance of this License to do so, and all its terms and conditions for copying, distributing or modifying the Program or works based on it. 6. Each time you redistribute the Program (or any work based on the Program), the recipient automatically receives a license from the original licensor to copy, distribute or modify the Program subject to these terms and conditions. You may not impose any further restrictions on the recipients' exercise of the rights granted herein. You are not responsible for enforcing compliance by third parties to this License. 7. If, as a consequence of a court judgment or allegation of patent infringement or for any other reason (not limited to patent issues), conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot distribute so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not distribute the Program at all. For example, if a patent license would not permit royalty-free redistribution of the Program by all those who receive copies directly or indirectly through you, then the only way you could satisfy both it and this License would be to refrain entirely from distribution of the Program. If any portion of this section is held invalid or unenforceable under any particular circumstance, the balance of the section is intended to apply and the section as a whole is intended to apply in other circumstances. It is not the purpose of this section to induce you to infringe any patents or other property right claims or to contest validity of any such claims; this section has the sole purpose of protecting the integrity of the free software distribution system, which is implemented by public license practices. Many people have made generous contributions to the wide range of software distributed through that system in reliance on consistent application of that system; it is up to the author/donor to decide if he or she is willing to distribute software through any other system and a licensee cannot impose that choice. This section is intended to make thoroughly clear what is believed to be a consequence of the rest of this License. 8. If the distribution and/or use of the Program is restricted in certain countries either by patents or by copyrighted interfaces, the original copyright holder who places the Program under this License may add an explicit geographical distribution limitation excluding those countries, so that distribution is permitted only in or among countries not thus excluded. In such case, this License incorporates the limitation as if written in the body of this License. 9. The Free Software Foundation may publish revised and/or new versions of the General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. Each version is given a distinguishing version number. If the Program specifies a version number of this License which applies to it and "any later version", you have the option of following the terms and conditions either of that version or of any later version published by the Free Software Foundation. If the Program does not specify a version number of this License, you may choose any version ever published by the Free Software Foundation. 10. If you wish to incorporate parts of the Program into other free programs whose distribution conditions are different, write to the author to ask for permission. For software which is copyrighted by the Free Software Foundation, write to the Free Software Foundation; we sometimes make exceptions for this. Our decision will be guided by the two goals of preserving the free status of all derivatives of our free software and of promoting the sharing and reuse of software generally. NO WARRANTY 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. END OF TERMS AND CONDITIONS How to Apply These Terms to Your New Programs If you develop a new program, and you want it to be of the greatest possible use to the public, the best way to achieve this is to make it free software which everyone can redistribute and change under these terms. To do so, attach the following notices to the program. It is safest to attach them to the start of each source file to most effectively convey the exclusion of warranty; and each file should have at least the "copyright" line and a pointer to where the full notice is found. Copyright (C) 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 Also add information on how to contact you by electronic and paper mail. If the program is interactive, make it output a short notice like this when it starts in an interactive mode: Gnomovision version 69, Copyright (C) year name of author Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. This is free software, and you are welcome to redistribute it under certain conditions; type `show c' for details. The hypothetical commands `show w' and `show c' should show the appropriate parts of the General Public License. Of course, the commands you use may be called something other than `show w' and `show c'; they could even be mouse-clicks or menu items--whatever suits your program. You should also get your employer (if you work as a programmer) or your school, if any, to sign a "copyright disclaimer" for the program, if necessary. Here is a sample; alter the names: Yoyodyne, Inc., hereby disclaims all copyright interest in the program `Gnomovision' (which makes passes at compilers) written by James Hacker. , 1 April 1989 Ty Coon, President of Vice This General Public License does not permit incorporating your program into proprietary programs. If your program is a subroutine library, you may consider it more useful to permit linking proprietary applications with the library. If this is what you want to do, use the GNU Library General Public License instead of this License. libprelude-1.0.0/config.h.in0000664000076400007640000015044111347714451012631 00000000000000/* config.h.in. Generated from configure.in by autoheader. */ /* Define if the compiler is building for multiple architectures of Apple platforms at once. */ #undef AA_APPLE_UNIVERSAL_BUILD /* Define if building universal (internal helper macro) */ #undef AC_APPLE_UNIVERSAL_BUILD /* Define to the number of bits in type 'ptrdiff_t'. */ #undef BITSIZEOF_PTRDIFF_T /* Define to the number of bits in type 'sig_atomic_t'. */ #undef BITSIZEOF_SIG_ATOMIC_T /* Define to the number of bits in type 'size_t'. */ #undef BITSIZEOF_SIZE_T /* Define to the number of bits in type 'wchar_t'. */ #undef BITSIZEOF_WCHAR_T /* Define to the number of bits in type 'wint_t'. */ #undef BITSIZEOF_WINT_T /* Define if you wish *printf() functions that have a safe handling of non-IEEE-754 'long double' values. */ #undef CHECK_PRINTF_SAFE /* Define to 1 for strict checking in test-snprintf.c. */ #undef CHECK_SNPRINTF_POSIX /* Define to 1 for strict checking in test-vsnprintf.c. */ #undef CHECK_VSNPRINTF_POSIX /* Define to one of `_getb67', `GETB67', `getb67' for Cray-2 and Cray-YMP systems. This function is required for `alloca.c' support on those systems. */ #undef CRAY_STACKSEG_END /* Define to 1 if using `alloca.c'. */ #undef C_ALLOCA /* Define as the bit index in the word where to find bit 0 of the exponent of 'double'. */ #undef DBL_EXPBIT0_BIT /* Define as the word index where to find the exponent of 'double'. */ #undef DBL_EXPBIT0_WORD /* Define as the bit index in the word where to find the sign of 'double'. */ #undef DBL_SIGNBIT_BIT /* Define as the word index where to find the sign of 'double'. */ #undef DBL_SIGNBIT_WORD /* Define to 1 if the package shall run at any location in the file system. */ #undef ENABLE_RELOCATABLE /* Define on systems for which file names may have a so-called `drive letter' prefix, define this to compute the length of that prefix, including the colon. */ #undef FILE_SYSTEM_ACCEPTS_DRIVE_LETTER_PREFIX /* Define if the backslash character may also serve as a file name component separator. */ #undef FILE_SYSTEM_BACKSLASH_IS_FILE_NAME_SEPARATOR /* Define if a drive letter prefix denotes a relative path if it is not followed by a file name component separator. */ #undef FILE_SYSTEM_DRIVE_PREFIX_CAN_BE_RELATIVE /* Define as the bit index in the word where to find bit 0 of the exponent of 'float'. */ #undef FLT_EXPBIT0_BIT /* Define as the word index where to find the exponent of 'float'. */ #undef FLT_EXPBIT0_WORD /* Define as the bit index in the word where to find the sign of 'float'. */ #undef FLT_SIGNBIT_BIT /* Define as the word index where to find the sign of 'float'. */ #undef FLT_SIGNBIT_WORD /* Define to 1 if fopen() fails to recognize a trailing slash. */ #undef FOPEN_TRAILING_SLASH_BUG /* Define to 1 if ungetc is broken when used on arbitrary bytes. */ #undef FUNC_UNGETC_BROKEN /* Define if gettimeofday clobbers the localtime buffer. */ #undef GETTIMEOFDAY_CLOBBERS_LOCALTIME /* Define this to 'void' or 'struct timezone' to match the system's declaration of the second argument to gettimeofday. */ #undef GETTIMEOFDAY_TIMEZONE /* Define to 1 when using the gnulib module ioctl. */ #undef GNULIB_IOCTL /* Define to indicate the 'malloc' module. */ #undef GNULIB_MALLOC_GNU /* Define to 1 when using the gnulib module open. */ #undef GNULIB_OPEN /* Define whether SRP support is enabled */ #undef GNUTLS_SRP_ENABLED /* Define to 1 if you have the `alarm' function. */ #undef HAVE_ALARM /* Define if pointers to integers require aligned access */ #undef HAVE_ALIGNED_ACCESS_REQUIRED /* Define to 1 if you have 'alloca' after including , a header that may be supplied by this distribution. */ #undef HAVE_ALLOCA /* Define to 1 if you have and it should be used (not on Ultrix). */ #undef HAVE_ALLOCA_H /* Define to 1 if you have the `argz_add' function. */ #undef HAVE_ARGZ_ADD /* Define to 1 if you have the `argz_append' function. */ #undef HAVE_ARGZ_APPEND /* Define to 1 if you have the `argz_count' function. */ #undef HAVE_ARGZ_COUNT /* Define to 1 if you have the `argz_create_sep' function. */ #undef HAVE_ARGZ_CREATE_SEP /* Define to 1 if you have the header file. */ #undef HAVE_ARGZ_H /* Define to 1 if you have the `argz_insert' function. */ #undef HAVE_ARGZ_INSERT /* Define to 1 if you have the `argz_next' function. */ #undef HAVE_ARGZ_NEXT /* Define to 1 if you have the `argz_stringify' function. */ #undef HAVE_ARGZ_STRINGIFY /* Define to 1 if you have the header file. */ #undef HAVE_ARPA_INET_H /* Define to 1 if you have the header file. */ #undef HAVE_BP_SYM_H /* Define to 1 if you have the `btowc' function. */ #undef HAVE_BTOWC /* Define to 1 if you have the `chsize' function. */ #undef HAVE_CHSIZE /* Define to 1 if you have the `closedir' function. */ #undef HAVE_CLOSEDIR /* Define if the copysignf function is declared in and available in libc. */ #undef HAVE_COPYSIGNF_IN_LIBC /* Define if the copysignl function is declared in and available in libc. */ #undef HAVE_COPYSIGNL_IN_LIBC /* Define if the copysign function is declared in and available in libc. */ #undef HAVE_COPYSIGN_IN_LIBC /* Define to 1 if you have the declaration of `alarm', and to 0 if you don't. */ #undef HAVE_DECL_ALARM /* Define to 1 if you have the declaration of `copysign', and to 0 if you don't. */ #undef HAVE_DECL_COPYSIGN /* Define to 1 if you have the declaration of `copysignf', and to 0 if you don't. */ #undef HAVE_DECL_COPYSIGNF /* Define to 1 if you have the declaration of `copysignl', and to 0 if you don't. */ #undef HAVE_DECL_COPYSIGNL /* Define to 1 if you have the declaration of `cygwin_conv_path', and to 0 if you don't. */ #undef HAVE_DECL_CYGWIN_CONV_PATH /* Define to 1 if you have the declaration of `fflush_unlocked', and to 0 if you don't. */ #undef HAVE_DECL_FFLUSH_UNLOCKED /* Define to 1 if you have the declaration of `flockfile', and to 0 if you don't. */ #undef HAVE_DECL_FLOCKFILE /* Define to 1 if you have the declaration of `fputs_unlocked', and to 0 if you don't. */ #undef HAVE_DECL_FPUTS_UNLOCKED /* Define to 1 if you have the declaration of `freeaddrinfo', and to 0 if you don't. */ #undef HAVE_DECL_FREEADDRINFO /* Define to 1 if you have the declaration of `funlockfile', and to 0 if you don't. */ #undef HAVE_DECL_FUNLOCKFILE /* Define to 1 if you have the declaration of `gai_strerror', and to 0 if you don't. */ #undef HAVE_DECL_GAI_STRERROR /* Define to 1 if you have the declaration of `getaddrinfo', and to 0 if you don't. */ #undef HAVE_DECL_GETADDRINFO /* Define to 1 if you have the declaration of `getc_unlocked', and to 0 if you don't. */ #undef HAVE_DECL_GETC_UNLOCKED /* Define to 1 if you have the declaration of `getdelim', and to 0 if you don't. */ #undef HAVE_DECL_GETDELIM /* Define to 1 if you have the declaration of `getline', and to 0 if you don't. */ #undef HAVE_DECL_GETLINE /* Define to 1 if you have the declaration of `getnameinfo', and to 0 if you don't. */ #undef HAVE_DECL_GETNAMEINFO /* Define to 1 if you have the declaration of `getpass', and to 0 if you don't. */ #undef HAVE_DECL_GETPASS /* Define to 1 if you have the declaration of `inet_ntop', and to 0 if you don't. */ #undef HAVE_DECL_INET_NTOP /* Define to 1 if you have the declaration of `inet_pton', and to 0 if you don't. */ #undef HAVE_DECL_INET_PTON /* Define to 1 if you have the declaration of `isblank', and to 0 if you don't. */ #undef HAVE_DECL_ISBLANK /* Define to 1 if you have the declaration of `memmem', and to 0 if you don't. */ #undef HAVE_DECL_MEMMEM /* Define to 1 if you have the declaration of `putc_unlocked', and to 0 if you don't. */ #undef HAVE_DECL_PUTC_UNLOCKED /* Define to 1 if you have the declaration of `sleep', and to 0 if you don't. */ #undef HAVE_DECL_SLEEP /* Define to 1 if you have the declaration of `snprintf', and to 0 if you don't. */ #undef HAVE_DECL_SNPRINTF /* Define to 1 if you have the declaration of `strdup', and to 0 if you don't. */ #undef HAVE_DECL_STRDUP /* Define to 1 if you have the declaration of `strerror', and to 0 if you don't. */ #undef HAVE_DECL_STRERROR /* Define to 1 if you have the declaration of `strncasecmp', and to 0 if you don't. */ #undef HAVE_DECL_STRNCASECMP /* Define to 1 if you have the declaration of `strndup', and to 0 if you don't. */ #undef HAVE_DECL_STRNDUP /* Define to 1 if you have the declaration of `strnlen', and to 0 if you don't. */ #undef HAVE_DECL_STRNLEN /* Define to 1 if you have the declaration of `timegm', and to 0 if you don't. */ #undef HAVE_DECL_TIMEGM /* Define to 1 if you have the declaration of `vsnprintf', and to 0 if you don't. */ #undef HAVE_DECL_VSNPRINTF /* Define to 1 if you have the declaration of `wctob', and to 0 if you don't. */ #undef HAVE_DECL_WCTOB /* Define to 1 if you have the declaration of `_snprintf', and to 0 if you don't. */ #undef HAVE_DECL__SNPRINTF /* Define to 1 if you have the declaration of `__fsetlocking', and to 0 if you don't. */ #undef HAVE_DECL___FSETLOCKING /* Define to 1 if you have the header file. */ #undef HAVE_DIRENT_H /* Define if you have the GNU dld library. */ #undef HAVE_DLD /* Define to 1 if you have the header file. */ #undef HAVE_DLD_H /* Define to 1 if you have the `dlerror' function. */ #undef HAVE_DLERROR /* Define to 1 if you have the header file. */ #undef HAVE_DLFCN_H /* Define to 1 if you have the header file. */ #undef HAVE_DL_H /* Define to 1 if you have the `dup2' function. */ #undef HAVE_DUP2 /* Define if you have the _dyld_func_lookup function. */ #undef HAVE_DYLD /* Define to 1 if you have the header file. */ #undef HAVE_ERRNO_H /* Define to 1 if the system has the type `error_t'. */ #undef HAVE_ERROR_T /* Define to 1 if you have the header file. */ #undef HAVE_FCNTL_H /* Define to 1 if you have the header file. */ #undef HAVE_FLOAT_H /* Define to 1 if you have the `flockfile' function. */ #undef HAVE_FLOCKFILE /* Define if the frexpl function is available in libc. */ #undef HAVE_FREXPL_IN_LIBC /* Define if the frexp function is available in libc. */ #undef HAVE_FREXP_IN_LIBC /* Define to 1 if fseeko (and presumably ftello) exists and is declared. */ #undef HAVE_FSEEKO /* Define to 1 if you have the `ftruncate' function. */ #undef HAVE_FTRUNCATE /* Define to 1 if you have the `ftw' function. */ #undef HAVE_FTW /* Define to 1 if you have the `funlockfile' function. */ #undef HAVE_FUNLOCKFILE /* Define to 1 if you have the `getdelim' function. */ #undef HAVE_GETDELIM /* Define to 1 if you have the `gethostbyname' function. */ #undef HAVE_GETHOSTBYNAME /* Define to 1 if you have the `gethostname' function. */ #undef HAVE_GETHOSTNAME /* Define to 1 if you have the `getpagesize' function. */ #undef HAVE_GETPAGESIZE /* Define to 1 if you have the `getpass' function. */ #undef HAVE_GETPASS /* Define to 1 if you have the `getservbyname' function. */ #undef HAVE_GETSERVBYNAME /* Define to 1 if you have the `gettimeofday' function. */ #undef HAVE_GETTIMEOFDAY /* Define to 1 if the system has the type `gid_t'. */ #undef HAVE_GID_T /* Define whether GnuTLS provide priority parsing */ #undef HAVE_GNUTLS_STRING_PRIORITY /* Define whether GnuTLS provides gnutls_x509_crt_list_import */ #undef HAVE_GNUTLS_X509_CRT_LIST_IMPORT /* Define to 1 if you have the `inet_ntop' function. */ #undef HAVE_INET_NTOP /* Define to 1 if you have the `inet_pton' function. */ #undef HAVE_INET_PTON /* Define if you have the 'intmax_t' type in or . */ #undef HAVE_INTMAX_T /* Define to 1 if you have the header file. */ #undef HAVE_INTTYPES_H /* Define if exists, doesn't clash with , and declares uintmax_t. */ #undef HAVE_INTTYPES_H_WITH_UINTMAX /* Define to 1 if defines AF_INET. */ #undef HAVE_IPV4 /* Define to 1 if defines AF_INET6. */ #undef HAVE_IPV6 /* Define to 1 if you have the `isblank' function. */ #undef HAVE_ISBLANK /* Define if the isnan(double) function is available in libc. */ #undef HAVE_ISNAND_IN_LIBC /* Define if the isnan(float) function is available in libc. */ #undef HAVE_ISNANF_IN_LIBC /* Define if the isnan(long double) function is available in libc. */ #undef HAVE_ISNANL_IN_LIBC /* Define to 1 if you have the `iswcntrl' function. */ #undef HAVE_ISWCNTRL /* Define to 1 if you have the `iswctype' function. */ #undef HAVE_ISWCTYPE /* Define if you have and nl_langinfo(CODESET). */ #undef HAVE_LANGINFO_CODESET /* Define to 1 if you have the header file. */ #undef HAVE_LANGINFO_H /* Define to 1 if you have the header file. */ #undef HAVE_LAUXLIB_H /* Define if the ldexpl function is available in libc. */ #undef HAVE_LDEXPL_IN_LIBC /* Define if the ldexp function is available in libc. */ #undef HAVE_LDEXP_IN_LIBC /* Define if you have the libdl library or equivalent. */ #undef HAVE_LIBDL /* Define if libdlloader will be built on this platform */ #undef HAVE_LIBDLLOADER /* Define to 1 if you have the header file. */ #undef HAVE_LIBINTL_H /* Define to 1 if you have the header file. */ #undef HAVE_LOCALE_H /* Define to 1 if the system has the type `long long int'. */ #undef HAVE_LONG_LONG_INT /* Define to 1 if you have the `lstat' function. */ #undef HAVE_LSTAT /* Define this if a modern libltdl is already installed */ #undef HAVE_LTDL /* liblua */ #undef HAVE_LUA /* Define to 1 if you have the header file. */ #undef HAVE_LUA_H /* Define to 1 if you have the header file. */ #undef HAVE_MACH_O_DYLD_H /* Define to 1 if your system has a GNU libc compatible `malloc' function, and to 0 otherwise. */ #undef HAVE_MALLOC /* Define if the 'malloc' function is POSIX compliant. */ #undef HAVE_MALLOC_POSIX /* Define to 1 if mmap()'s MAP_ANONYMOUS flag is available after including config.h and . */ #undef HAVE_MAP_ANONYMOUS /* Define to 1 if you have the header file. */ #undef HAVE_MATH_H /* Define to 1 if you have the `mbrtowc' function. */ #undef HAVE_MBRTOWC /* Define to 1 if you have the `mbsinit' function. */ #undef HAVE_MBSINIT /* Define to 1 if declares mbstate_t. */ #undef HAVE_MBSTATE_T /* Define to 1 if you have the `memchr' function. */ #undef HAVE_MEMCHR /* Define to 1 if you have the `memmem' function. */ #undef HAVE_MEMMEM /* Define to 1 if you have the header file. */ #undef HAVE_MEMORY_H /* Define to 1 if defines the MIN and MAX macros. */ #undef HAVE_MINMAX_IN_LIMITS_H /* Define to 1 if defines the MIN and MAX macros. */ #undef HAVE_MINMAX_IN_SYS_PARAM_H /* Define to 1 if you have the `mprotect' function. */ #undef HAVE_MPROTECT /* Define to 1 if you have the header file. */ #undef HAVE_NETDB_H /* Define to 1 if you have the header file. */ #undef HAVE_NETINET_IN_H /* Define to 1 if you have the header file. */ #undef HAVE_NETINET_TCP_H /* Define to 1 if you have the `nl_langinfo' function. */ #undef HAVE_NL_LANGINFO /* Define to 1 if you have the `opendir' function. */ #undef HAVE_OPENDIR /* Define to 1 if you have the header file. */ #undef HAVE_OS_H /* Define to 1 if you have the `pathconf' function. */ #undef HAVE_PATHCONF /* Define to 1 if you have the 'poll' function and it works. */ #undef HAVE_POLL /* Define to 1 if you have the header file. */ #undef HAVE_POLL_H /* Define if libtool can extract symbol lists from object files. */ #undef HAVE_PRELOADED_SYMBOLS /* Define to 1 if you have the `pthread_atfork' function. */ #undef HAVE_PTHREAD_ATFORK /* Define if the defines PTHREAD_MUTEX_RECURSIVE. */ #undef HAVE_PTHREAD_MUTEX_RECURSIVE /* Define if the POSIX multithreading library has read/write locks. */ #undef HAVE_PTHREAD_RWLOCK /* Define to 1 if you have the header file. */ #undef HAVE_RANDOM_H /* Define to 1 if accept is declared even after undefining macros. */ #undef HAVE_RAW_DECL_ACCEPT /* Define to 1 if accept4 is declared even after undefining macros. */ #undef HAVE_RAW_DECL_ACCEPT4 /* Define to 1 if acosl is declared even after undefining macros. */ #undef HAVE_RAW_DECL_ACOSL /* Define to 1 if asinl is declared even after undefining macros. */ #undef HAVE_RAW_DECL_ASINL /* Define to 1 if atanl is declared even after undefining macros. */ #undef HAVE_RAW_DECL_ATANL /* Define to 1 if atoll is declared even after undefining macros. */ #undef HAVE_RAW_DECL_ATOLL /* Define to 1 if bind is declared even after undefining macros. */ #undef HAVE_RAW_DECL_BIND /* Define to 1 if btowc is declared even after undefining macros. */ #undef HAVE_RAW_DECL_BTOWC /* Define to 1 if canonicalize_file_name is declared even after undefining macros. */ #undef HAVE_RAW_DECL_CANONICALIZE_FILE_NAME /* Define to 1 if ceilf is declared even after undefining macros. */ #undef HAVE_RAW_DECL_CEILF /* Define to 1 if ceill is declared even after undefining macros. */ #undef HAVE_RAW_DECL_CEILL /* Define to 1 if chown is declared even after undefining macros. */ #undef HAVE_RAW_DECL_CHOWN /* Define to 1 if connect is declared even after undefining macros. */ #undef HAVE_RAW_DECL_CONNECT /* Define to 1 if cosl is declared even after undefining macros. */ #undef HAVE_RAW_DECL_COSL /* Define to 1 if dprintf is declared even after undefining macros. */ #undef HAVE_RAW_DECL_DPRINTF /* Define to 1 if dup2 is declared even after undefining macros. */ #undef HAVE_RAW_DECL_DUP2 /* Define to 1 if dup3 is declared even after undefining macros. */ #undef HAVE_RAW_DECL_DUP3 /* Define to 1 if endusershell is declared even after undefining macros. */ #undef HAVE_RAW_DECL_ENDUSERSHELL /* Define to 1 if environ is declared even after undefining macros. */ #undef HAVE_RAW_DECL_ENVIRON /* Define to 1 if euidaccess is declared even after undefining macros. */ #undef HAVE_RAW_DECL_EUIDACCESS /* Define to 1 if expl is declared even after undefining macros. */ #undef HAVE_RAW_DECL_EXPL /* Define to 1 if faccessat is declared even after undefining macros. */ #undef HAVE_RAW_DECL_FACCESSAT /* Define to 1 if fchdir is declared even after undefining macros. */ #undef HAVE_RAW_DECL_FCHDIR /* Define to 1 if fchmodat is declared even after undefining macros. */ #undef HAVE_RAW_DECL_FCHMODAT /* Define to 1 if fchownat is declared even after undefining macros. */ #undef HAVE_RAW_DECL_FCHOWNAT /* Define to 1 if fcntl is declared even after undefining macros. */ #undef HAVE_RAW_DECL_FCNTL /* Define to 1 if floorf is declared even after undefining macros. */ #undef HAVE_RAW_DECL_FLOORF /* Define to 1 if floorl is declared even after undefining macros. */ #undef HAVE_RAW_DECL_FLOORL /* Define to 1 if fpurge is declared even after undefining macros. */ #undef HAVE_RAW_DECL_FPURGE /* Define to 1 if frexpl is declared even after undefining macros. */ #undef HAVE_RAW_DECL_FREXPL /* Define to 1 if fseeko is declared even after undefining macros. */ #undef HAVE_RAW_DECL_FSEEKO /* Define to 1 if fstatat is declared even after undefining macros. */ #undef HAVE_RAW_DECL_FSTATAT /* Define to 1 if fsync is declared even after undefining macros. */ #undef HAVE_RAW_DECL_FSYNC /* Define to 1 if ftello is declared even after undefining macros. */ #undef HAVE_RAW_DECL_FTELLO /* Define to 1 if ftruncate is declared even after undefining macros. */ #undef HAVE_RAW_DECL_FTRUNCATE /* Define to 1 if futimens is declared even after undefining macros. */ #undef HAVE_RAW_DECL_FUTIMENS /* Define to 1 if getcwd is declared even after undefining macros. */ #undef HAVE_RAW_DECL_GETCWD /* Define to 1 if getdelim is declared even after undefining macros. */ #undef HAVE_RAW_DECL_GETDELIM /* Define to 1 if getdomainname is declared even after undefining macros. */ #undef HAVE_RAW_DECL_GETDOMAINNAME /* Define to 1 if getdtablesize is declared even after undefining macros. */ #undef HAVE_RAW_DECL_GETDTABLESIZE /* Define to 1 if getgroups is declared even after undefining macros. */ #undef HAVE_RAW_DECL_GETGROUPS /* Define to 1 if gethostname is declared even after undefining macros. */ #undef HAVE_RAW_DECL_GETHOSTNAME /* Define to 1 if getline is declared even after undefining macros. */ #undef HAVE_RAW_DECL_GETLINE /* Define to 1 if getloadavg is declared even after undefining macros. */ #undef HAVE_RAW_DECL_GETLOADAVG /* Define to 1 if getlogin is declared even after undefining macros. */ #undef HAVE_RAW_DECL_GETLOGIN /* Define to 1 if getlogin_r is declared even after undefining macros. */ #undef HAVE_RAW_DECL_GETLOGIN_R /* Define to 1 if getpagesize is declared even after undefining macros. */ #undef HAVE_RAW_DECL_GETPAGESIZE /* Define to 1 if getpeername is declared even after undefining macros. */ #undef HAVE_RAW_DECL_GETPEERNAME /* Define to 1 if getsockname is declared even after undefining macros. */ #undef HAVE_RAW_DECL_GETSOCKNAME /* Define to 1 if getsockopt is declared even after undefining macros. */ #undef HAVE_RAW_DECL_GETSOCKOPT /* Define to 1 if getsubopt is declared even after undefining macros. */ #undef HAVE_RAW_DECL_GETSUBOPT /* Define to 1 if gettimeofday is declared even after undefining macros. */ #undef HAVE_RAW_DECL_GETTIMEOFDAY /* Define to 1 if getusershell is declared even after undefining macros. */ #undef HAVE_RAW_DECL_GETUSERSHELL /* Define to 1 if inet_ntop is declared even after undefining macros. */ #undef HAVE_RAW_DECL_INET_NTOP /* Define to 1 if inet_pton is declared even after undefining macros. */ #undef HAVE_RAW_DECL_INET_PTON /* Define to 1 if initstat_r is declared even after undefining macros. */ #undef HAVE_RAW_DECL_INITSTAT_R /* Define to 1 if ioctl is declared even after undefining macros. */ #undef HAVE_RAW_DECL_IOCTL /* Define to 1 if lchmod is declared even after undefining macros. */ #undef HAVE_RAW_DECL_LCHMOD /* Define to 1 if lchown is declared even after undefining macros. */ #undef HAVE_RAW_DECL_LCHOWN /* Define to 1 if ldexpl is declared even after undefining macros. */ #undef HAVE_RAW_DECL_LDEXPL /* Define to 1 if link is declared even after undefining macros. */ #undef HAVE_RAW_DECL_LINK /* Define to 1 if linkat is declared even after undefining macros. */ #undef HAVE_RAW_DECL_LINKAT /* Define to 1 if listen is declared even after undefining macros. */ #undef HAVE_RAW_DECL_LISTEN /* Define to 1 if logl is declared even after undefining macros. */ #undef HAVE_RAW_DECL_LOGL /* Define to 1 if lseek is declared even after undefining macros. */ #undef HAVE_RAW_DECL_LSEEK /* Define to 1 if lstat is declared even after undefining macros. */ #undef HAVE_RAW_DECL_LSTAT /* Define to 1 if mbrlen is declared even after undefining macros. */ #undef HAVE_RAW_DECL_MBRLEN /* Define to 1 if mbrtowc is declared even after undefining macros. */ #undef HAVE_RAW_DECL_MBRTOWC /* Define to 1 if mbsinit is declared even after undefining macros. */ #undef HAVE_RAW_DECL_MBSINIT /* Define to 1 if mbsnrtowcs is declared even after undefining macros. */ #undef HAVE_RAW_DECL_MBSNRTOWCS /* Define to 1 if mbsrtowcs is declared even after undefining macros. */ #undef HAVE_RAW_DECL_MBSRTOWCS /* Define to 1 if memmem is declared even after undefining macros. */ #undef HAVE_RAW_DECL_MEMMEM /* Define to 1 if mempcpy is declared even after undefining macros. */ #undef HAVE_RAW_DECL_MEMPCPY /* Define to 1 if memrchr is declared even after undefining macros. */ #undef HAVE_RAW_DECL_MEMRCHR /* Define to 1 if mkdirat is declared even after undefining macros. */ #undef HAVE_RAW_DECL_MKDIRAT /* Define to 1 if mkdtemp is declared even after undefining macros. */ #undef HAVE_RAW_DECL_MKDTEMP /* Define to 1 if mkfifo is declared even after undefining macros. */ #undef HAVE_RAW_DECL_MKFIFO /* Define to 1 if mkfifoat is declared even after undefining macros. */ #undef HAVE_RAW_DECL_MKFIFOAT /* Define to 1 if mknod is declared even after undefining macros. */ #undef HAVE_RAW_DECL_MKNOD /* Define to 1 if mknodat is declared even after undefining macros. */ #undef HAVE_RAW_DECL_MKNODAT /* Define to 1 if mkostemp is declared even after undefining macros. */ #undef HAVE_RAW_DECL_MKOSTEMP /* Define to 1 if mkostemps is declared even after undefining macros. */ #undef HAVE_RAW_DECL_MKOSTEMPS /* Define to 1 if mkstemp is declared even after undefining macros. */ #undef HAVE_RAW_DECL_MKSTEMP /* Define to 1 if mkstemps is declared even after undefining macros. */ #undef HAVE_RAW_DECL_MKSTEMPS /* Define to 1 if nl_langinfo is declared even after undefining macros. */ #undef HAVE_RAW_DECL_NL_LANGINFO /* Define to 1 if openat is declared even after undefining macros. */ #undef HAVE_RAW_DECL_OPENAT /* Define to 1 if pipe2 is declared even after undefining macros. */ #undef HAVE_RAW_DECL_PIPE2 /* Define to 1 if popen is declared even after undefining macros. */ #undef HAVE_RAW_DECL_POPEN /* Define to 1 if pread is declared even after undefining macros. */ #undef HAVE_RAW_DECL_PREAD /* Define to 1 if random_r is declared even after undefining macros. */ #undef HAVE_RAW_DECL_RANDOM_R /* Define to 1 if rawmemchr is declared even after undefining macros. */ #undef HAVE_RAW_DECL_RAWMEMCHR /* Define to 1 if readlink is declared even after undefining macros. */ #undef HAVE_RAW_DECL_READLINK /* Define to 1 if readlinkat is declared even after undefining macros. */ #undef HAVE_RAW_DECL_READLINKAT /* Define to 1 if realpath is declared even after undefining macros. */ #undef HAVE_RAW_DECL_REALPATH /* Define to 1 if recv is declared even after undefining macros. */ #undef HAVE_RAW_DECL_RECV /* Define to 1 if recvfrom is declared even after undefining macros. */ #undef HAVE_RAW_DECL_RECVFROM /* Define to 1 if renameat is declared even after undefining macros. */ #undef HAVE_RAW_DECL_RENAMEAT /* Define to 1 if rmdir is declared even after undefining macros. */ #undef HAVE_RAW_DECL_RMDIR /* Define to 1 if round is declared even after undefining macros. */ #undef HAVE_RAW_DECL_ROUND /* Define to 1 if roundf is declared even after undefining macros. */ #undef HAVE_RAW_DECL_ROUNDF /* Define to 1 if roundl is declared even after undefining macros. */ #undef HAVE_RAW_DECL_ROUNDL /* Define to 1 if rpmatch is declared even after undefining macros. */ #undef HAVE_RAW_DECL_RPMATCH /* Define to 1 if select is declared even after undefining macros. */ #undef HAVE_RAW_DECL_SELECT /* Define to 1 if send is declared even after undefining macros. */ #undef HAVE_RAW_DECL_SEND /* Define to 1 if sendto is declared even after undefining macros. */ #undef HAVE_RAW_DECL_SENDTO /* Define to 1 if setenv is declared even after undefining macros. */ #undef HAVE_RAW_DECL_SETENV /* Define to 1 if setsockopt is declared even after undefining macros. */ #undef HAVE_RAW_DECL_SETSOCKOPT /* Define to 1 if setstate_r is declared even after undefining macros. */ #undef HAVE_RAW_DECL_SETSTATE_R /* Define to 1 if setusershell is declared even after undefining macros. */ #undef HAVE_RAW_DECL_SETUSERSHELL /* Define to 1 if shutdown is declared even after undefining macros. */ #undef HAVE_RAW_DECL_SHUTDOWN /* Define to 1 if sigaction is declared even after undefining macros. */ #undef HAVE_RAW_DECL_SIGACTION /* Define to 1 if sigaddset is declared even after undefining macros. */ #undef HAVE_RAW_DECL_SIGADDSET /* Define to 1 if sigdelset is declared even after undefining macros. */ #undef HAVE_RAW_DECL_SIGDELSET /* Define to 1 if sigemptyset is declared even after undefining macros. */ #undef HAVE_RAW_DECL_SIGEMPTYSET /* Define to 1 if sigfillset is declared even after undefining macros. */ #undef HAVE_RAW_DECL_SIGFILLSET /* Define to 1 if sigismember is declared even after undefining macros. */ #undef HAVE_RAW_DECL_SIGISMEMBER /* Define to 1 if sigpending is declared even after undefining macros. */ #undef HAVE_RAW_DECL_SIGPENDING /* Define to 1 if sigprocmask is declared even after undefining macros. */ #undef HAVE_RAW_DECL_SIGPROCMASK /* Define to 1 if sinl is declared even after undefining macros. */ #undef HAVE_RAW_DECL_SINL /* Define to 1 if sleep is declared even after undefining macros. */ #undef HAVE_RAW_DECL_SLEEP /* Define to 1 if snprintf is declared even after undefining macros. */ #undef HAVE_RAW_DECL_SNPRINTF /* Define to 1 if socket is declared even after undefining macros. */ #undef HAVE_RAW_DECL_SOCKET /* Define to 1 if sqrtl is declared even after undefining macros. */ #undef HAVE_RAW_DECL_SQRTL /* Define to 1 if srandom_r is declared even after undefining macros. */ #undef HAVE_RAW_DECL_SRANDOM_R /* Define to 1 if stat is declared even after undefining macros. */ #undef HAVE_RAW_DECL_STAT /* Define to 1 if stpcpy is declared even after undefining macros. */ #undef HAVE_RAW_DECL_STPCPY /* Define to 1 if stpncpy is declared even after undefining macros. */ #undef HAVE_RAW_DECL_STPNCPY /* Define to 1 if strcasecmp is declared even after undefining macros. */ #undef HAVE_RAW_DECL_STRCASECMP /* Define to 1 if strcasestr is declared even after undefining macros. */ #undef HAVE_RAW_DECL_STRCASESTR /* Define to 1 if strchrnul is declared even after undefining macros. */ #undef HAVE_RAW_DECL_STRCHRNUL /* Define to 1 if strdup is declared even after undefining macros. */ #undef HAVE_RAW_DECL_STRDUP /* Define to 1 if strncasecmp is declared even after undefining macros. */ #undef HAVE_RAW_DECL_STRNCASECMP /* Define to 1 if strndup is declared even after undefining macros. */ #undef HAVE_RAW_DECL_STRNDUP /* Define to 1 if strnlen is declared even after undefining macros. */ #undef HAVE_RAW_DECL_STRNLEN /* Define to 1 if strpbrk is declared even after undefining macros. */ #undef HAVE_RAW_DECL_STRPBRK /* Define to 1 if strsep is declared even after undefining macros. */ #undef HAVE_RAW_DECL_STRSEP /* Define to 1 if strsignal is declared even after undefining macros. */ #undef HAVE_RAW_DECL_STRSIGNAL /* Define to 1 if strtod is declared even after undefining macros. */ #undef HAVE_RAW_DECL_STRTOD /* Define to 1 if strtok_r is declared even after undefining macros. */ #undef HAVE_RAW_DECL_STRTOK_R /* Define to 1 if strtoll is declared even after undefining macros. */ #undef HAVE_RAW_DECL_STRTOLL /* Define to 1 if strtoull is declared even after undefining macros. */ #undef HAVE_RAW_DECL_STRTOULL /* Define to 1 if strverscmp is declared even after undefining macros. */ #undef HAVE_RAW_DECL_STRVERSCMP /* Define to 1 if symlink is declared even after undefining macros. */ #undef HAVE_RAW_DECL_SYMLINK /* Define to 1 if symlinkat is declared even after undefining macros. */ #undef HAVE_RAW_DECL_SYMLINKAT /* Define to 1 if tanl is declared even after undefining macros. */ #undef HAVE_RAW_DECL_TANL /* Define to 1 if trunc is declared even after undefining macros. */ #undef HAVE_RAW_DECL_TRUNC /* Define to 1 if truncf is declared even after undefining macros. */ #undef HAVE_RAW_DECL_TRUNCF /* Define to 1 if truncl is declared even after undefining macros. */ #undef HAVE_RAW_DECL_TRUNCL /* Define to 1 if uname is declared even after undefining macros. */ #undef HAVE_RAW_DECL_UNAME /* Define to 1 if unlink is declared even after undefining macros. */ #undef HAVE_RAW_DECL_UNLINK /* Define to 1 if unlinkat is declared even after undefining macros. */ #undef HAVE_RAW_DECL_UNLINKAT /* Define to 1 if unsetenv is declared even after undefining macros. */ #undef HAVE_RAW_DECL_UNSETENV /* Define to 1 if usleep is declared even after undefining macros. */ #undef HAVE_RAW_DECL_USLEEP /* Define to 1 if utimensat is declared even after undefining macros. */ #undef HAVE_RAW_DECL_UTIMENSAT /* Define to 1 if vdprintf is declared even after undefining macros. */ #undef HAVE_RAW_DECL_VDPRINTF /* Define to 1 if vsnprintf is declared even after undefining macros. */ #undef HAVE_RAW_DECL_VSNPRINTF /* Define to 1 if wcrtomb is declared even after undefining macros. */ #undef HAVE_RAW_DECL_WCRTOMB /* Define to 1 if wcsnrtombs is declared even after undefining macros. */ #undef HAVE_RAW_DECL_WCSNRTOMBS /* Define to 1 if wcsrtombs is declared even after undefining macros. */ #undef HAVE_RAW_DECL_WCSRTOMBS /* Define to 1 if wctob is declared even after undefining macros. */ #undef HAVE_RAW_DECL_WCTOB /* Define to 1 if wcwidth is declared even after undefining macros. */ #undef HAVE_RAW_DECL_WCWIDTH /* Define to 1 if you have the `readdir' function. */ #undef HAVE_READDIR /* Define if the 'realloc' function is POSIX compliant. */ #undef HAVE_REALLOC_POSIX /* Define to 1 if the system has the type `sa_family_t'. */ #undef HAVE_SA_FAMILY_T /* Define if you have the shl_load function. */ #undef HAVE_SHL_LOAD /* Define to 1 if you have the `shutdown' function. */ #undef HAVE_SHUTDOWN /* Define to 1 if you have the header file. */ #undef HAVE_SIGNAL_H /* Define to 1 if 'sig_atomic_t' is a signed integer type. */ #undef HAVE_SIGNED_SIG_ATOMIC_T /* Define to 1 if 'wchar_t' is a signed integer type. */ #undef HAVE_SIGNED_WCHAR_T /* Define to 1 if 'wint_t' is a signed integer type. */ #undef HAVE_SIGNED_WINT_T /* Define to 1 if the system has the type `sigset_t'. */ #undef HAVE_SIGSET_T /* Define to 1 if you have the `sleep' function. */ #undef HAVE_SLEEP /* Define to 1 if you have the `snprintf' function. */ #undef HAVE_SNPRINTF /* Define to 1 if stdbool.h conforms to C99. */ #undef HAVE_STDBOOL_H /* Define to 1 if you have the header file. */ #undef HAVE_STDDEF_H /* Define to 1 if you have the header file. */ #undef HAVE_STDINT_H /* Define if exists, doesn't clash with , and declares uintmax_t. */ #undef HAVE_STDINT_H_WITH_UINTMAX /* Define to 1 if you have the header file. */ #undef HAVE_STDIO_EXT_H /* Define to 1 if you have the header file. */ #undef HAVE_STDIO_H /* Define to 1 if you have the header file. */ #undef HAVE_STDLIB_H /* Define to 1 if you have the `strcasecmp' function. */ #undef HAVE_STRCASECMP /* Define to 1 if you have the `strcasestr' function. */ #undef HAVE_STRCASESTR /* Define to 1 if you have the `strdup' function. */ #undef HAVE_STRDUP /* Define to 1 if you have the header file. */ #undef HAVE_STRINGS_H /* Define to 1 if you have the header file. */ #undef HAVE_STRING_H /* Define to 1 if you have the `strlcat' function. */ #undef HAVE_STRLCAT /* Define to 1 if you have the `strlcpy' function. */ #undef HAVE_STRLCPY /* Define to 1 if you have the `strncasecmp' function. */ #undef HAVE_STRNCASECMP /* Define to 1 if you have the `strndup' function. */ #undef HAVE_STRNDUP /* Define to 1 if you have the `strnlen' function. */ #undef HAVE_STRNLEN /* Define to 1 if you have the `strptime' function. */ #undef HAVE_STRPTIME /* Define to 1 if you have the `strsep' function. */ #undef HAVE_STRSEP /* Define to 1 if the system has the type `struct addrinfo'. */ #undef HAVE_STRUCT_ADDRINFO /* Define to 1 if the system has the type `struct random_data'. */ #undef HAVE_STRUCT_RANDOM_DATA /* Define to 1 if the system has the type `struct sockaddr_in6'. */ #undef HAVE_STRUCT_SOCKADDR_IN6 /* Define to 1 if `sa_len' is member of `struct sockaddr'. */ #undef HAVE_STRUCT_SOCKADDR_SA_LEN /* Define to 1 if the system has the type `struct sockaddr_storage'. */ #undef HAVE_STRUCT_SOCKADDR_STORAGE /* Define to 1 if the system has the type `struct utsname'. */ #undef HAVE_STRUCT_UTSNAME /* Define to 1 if you have the `symlink' function. */ #undef HAVE_SYMLINK /* Define to 1 if you have the header file. */ #undef HAVE_SYS_BITYPES_H /* Define to 1 if you have the header file. */ #undef HAVE_SYS_DL_H /* Define to 1 if you have the header file. */ #undef HAVE_SYS_FILIO_H /* Define to 1 if you have the header file. */ #undef HAVE_SYS_INTTYPES_H /* Define to 1 if you have the header file. */ #undef HAVE_SYS_IOCTL_H /* Define to 1 if you have the header file. */ #undef HAVE_SYS_MMAN_H /* Define to 1 if you have the header file. */ #undef HAVE_SYS_PARAM_H /* Define to 1 if you have the header file. */ #undef HAVE_SYS_SELECT_H /* Define to 1 if you have the header file. */ #undef HAVE_SYS_SOCKET_H /* Define to 1 if you have the header file. */ #undef HAVE_SYS_STAT_H /* Define to 1 if you have the header file. */ #undef HAVE_SYS_TIMEB_H /* Define to 1 if you have the header file. */ #undef HAVE_SYS_TIME_H /* Define to 1 if you have the header file. */ #undef HAVE_SYS_TYPES_H /* Define to 1 if you have the header file. */ #undef HAVE_SYS_UN_H /* Define to 1 if you have the header file. */ #undef HAVE_SYS_UTSNAME_H /* Define to 1 if you have the header file. */ #undef HAVE_SYS_WAIT_H /* Define to 1 if you have the `tcgetattr' function. */ #undef HAVE_TCGETATTR /* Define to 1 if you have the `tcsetattr' function. */ #undef HAVE_TCSETATTR /* Define to 1 if you have the header file. */ #undef HAVE_TERMIOS_H /* Define to 1 if you have the `timegm' function. */ #undef HAVE_TIMEGM /* Define to 1 if you have the header file. */ #undef HAVE_TIME_H /* Define if struct tm has the tm_gmtoff member. */ #undef HAVE_TM_GMTOFF /* Define to 1 if the system has the type `uid_t'. */ #undef HAVE_UID_T /* Define to 1 if you have the `uname' function. */ #undef HAVE_UNAME /* Define to 1 if you have the header file. */ #undef HAVE_UNISTD_H /* Define to 1 if the system has the type `unsigned long long int'. */ #undef HAVE_UNSIGNED_LONG_LONG_INT /* Define whether variadic macros are supported */ #undef HAVE_VARIADIC_MACROS /* Define to 1 if you have the `vasnprintf' function. */ #undef HAVE_VASNPRINTF /* Define to 1 if you have the `vsnprintf' function. */ #undef HAVE_VSNPRINTF /* Define to 1 if you have the header file. */ #undef HAVE_WCHAR_H /* Define if you have the 'wchar_t' type. */ #undef HAVE_WCHAR_T /* Define to 1 if you have the `wcrtomb' function. */ #undef HAVE_WCRTOMB /* Define to 1 if you have the `wcscoll' function. */ #undef HAVE_WCSCOLL /* Define to 1 if you have the `wcslen' function. */ #undef HAVE_WCSLEN /* Define to 1 if you have the `wcsnlen' function. */ #undef HAVE_WCSNLEN /* Define to 1 if you have the `wctob' function. */ #undef HAVE_WCTOB /* Define to 1 if you have the header file. */ #undef HAVE_WCTYPE_H /* Define to 1 if you have the header file. */ #undef HAVE_WINSOCK2_H /* Define if you have the 'wint_t' type. */ #undef HAVE_WINT_T /* This value is set to 1 to indicate that the system argz facility works */ #undef HAVE_WORKING_ARGZ /* Define to 1 if O_NOATIME works. */ #undef HAVE_WORKING_O_NOATIME /* Define to 1 if O_NOFOLLOW works. */ #undef HAVE_WORKING_O_NOFOLLOW /* Define to 1 if you have the header file. */ #undef HAVE_WS2TCPIP_H /* Define to 1 if the system has the type `_Bool'. */ #undef HAVE__BOOL /* Define to 1 if you have the `_ftime' function. */ #undef HAVE__FTIME /* Define to 1 if you have the `__fsetlocking' function. */ #undef HAVE___FSETLOCKING /* Define HOST_NAME_MAX when does not define it. */ #undef HOST_NAME_MAX /* Prelude library install directory */ #undef INSTALLDIR /* Define to the value of ${prefix}, as a string. */ #undef INSTALLPREFIX #if FILE_SYSTEM_BACKSLASH_IS_FILE_NAME_SEPARATOR # define ISSLASH(C) ((C) == '/' || (C) == '\\') #else # define ISSLASH(C) ((C) == '/') #endif /* Define as the bit index in the word where to find bit 0 of the exponent of 'long double'. */ #undef LDBL_EXPBIT0_BIT /* Define as the word index where to find the exponent of 'long double'. */ #undef LDBL_EXPBIT0_WORD /* Define as the bit index in the word where to find the sign of 'long double'. */ #undef LDBL_SIGNBIT_BIT /* Define as the word index where to find the sign of 'long double'. */ #undef LDBL_SIGNBIT_WORD /* Define to 1 if lseek does not detect pipes. */ #undef LSEEK_PIPE_BROKEN /* Define to 1 if `lstat' dereferences a symlink specified with a trailing slash. */ #undef LSTAT_FOLLOWS_SLASHED_SYMLINK /* Define if the OS needs help to load dependent libraries for dlopen(). */ #undef LTDL_DLOPEN_DEPLIBS /* Define to the system default library search path. */ #undef LT_DLSEARCH_PATH /* The archive extension */ #undef LT_LIBEXT /* Define to the extension used for runtime loadable modules, say, ".so". */ #undef LT_MODULE_EXT /* Define to the name of the environment variable that determines the run-time module search path. */ #undef LT_MODULE_PATH_VAR /* Define to the sub-directory in which libtool stores uninstalled libraries. */ #undef LT_OBJDIR /* Define to a substitute value for mmap()'s MAP_ANONYMOUS flag. */ #undef MAP_ANONYMOUS /* Define if the mbrtowc function has the NULL string argument bug. */ #undef MBRTOWC_NULL_ARG_BUG /* Define if the mbrtowc function does not return 0 for a NUL character. */ #undef MBRTOWC_NUL_RETVAL_BUG /* Define if the mbrtowc function returns a wrong return value. */ #undef MBRTOWC_RETVAL_BUG /* Define if the vasnprintf implementation needs special code for the 'a' and 'A' directives. */ #undef NEED_PRINTF_DIRECTIVE_A /* Define if the vasnprintf implementation needs special code for the 'F' directive. */ #undef NEED_PRINTF_DIRECTIVE_F /* Define if the vasnprintf implementation needs special code for the 'ls' directive. */ #undef NEED_PRINTF_DIRECTIVE_LS /* Define if the vasnprintf implementation needs special code for 'double' arguments. */ #undef NEED_PRINTF_DOUBLE /* Define if the vasnprintf implementation needs special code for surviving out-of-memory conditions. */ #undef NEED_PRINTF_ENOMEM /* Define if the vasnprintf implementation needs special code for the ' flag. */ #undef NEED_PRINTF_FLAG_GROUPING /* Define if the vasnprintf implementation needs special code for the '-' flag. */ #undef NEED_PRINTF_FLAG_LEFTADJUST /* Define if the vasnprintf implementation needs special code for the 0 flag. */ #undef NEED_PRINTF_FLAG_ZERO /* Define if the vasnprintf implementation needs special code for infinite 'double' arguments. */ #undef NEED_PRINTF_INFINITE_DOUBLE /* Define if the vasnprintf implementation needs special code for infinite 'long double' arguments. */ #undef NEED_PRINTF_INFINITE_LONG_DOUBLE /* Define if the vasnprintf implementation needs special code for 'long double' arguments. */ #undef NEED_PRINTF_LONG_DOUBLE /* Define if the vasnprintf implementation needs special code for supporting large precisions without arbitrary bounds. */ #undef NEED_PRINTF_UNBOUNDED_PRECISION /* Define if dlsym() requires a leading underscore in symbol names. */ #undef NEED_USCORE /* Define to 1 if your C compiler doesn't accept -c and -o together. */ #undef NO_MINUS_C_MINUS_O /* Define to 1 if open() fails to recognize a trailing slash. */ #undef OPEN_TRAILING_SLASH_BUG /* Name of package */ #undef PACKAGE /* Define to the address where bug reports for this package should be sent. */ #undef PACKAGE_BUGREPORT /* Define to the full name of this package. */ #undef PACKAGE_NAME /* Define to the full name and version of this package. */ #undef PACKAGE_STRING /* Define to the one symbol short name of this package. */ #undef PACKAGE_TARNAME /* Define to the version of this package. */ #undef PACKAGE_VERSION /* Define wether we need to take care with alignment */ #undef PRELUDE_ALIGNED_ACCESS /* Prelude config directory */ #undef PRELUDE_CONFIG_DIR /* Prelude spool directory */ #undef PRELUDE_SPOOL_DIR /* A 'va_copy' style function */ #undef PRELUDE_VA_COPY /* 'va_lists' cannot be copies as values */ #undef PRELUDE_VA_COPY_AS_ARRAY /* Byte ordering */ #undef PRELUDE_WORDS_BIGENDIAN /* Define to the type that is the result of default argument promotions of type mode_t. */ #undef PROMOTED_MODE_T /* Define if the pthread_in_use() detection is hard. */ #undef PTHREAD_IN_USE_DETECTION_HARD /* Define to l, ll, u, ul, ull, etc., as suitable for constants of type 'ptrdiff_t'. */ #undef PTRDIFF_T_SUFFIX /* Define to 1 if stat needs help when passed a directory name with a trailing slash */ #undef REPLACE_FUNC_STAT_DIR /* Define to 1 if stat needs help when passed a file name with a trailing slash */ #undef REPLACE_FUNC_STAT_FILE /* Define if nl_langinfo exists but is overridden by gnulib. */ #undef REPLACE_NL_LANGINFO /* Define this to 1 if strerror is broken. */ #undef REPLACE_STRERROR /* Define if vasnprintf exists but is overridden by gnulib. */ #undef REPLACE_VASNPRINTF /* Define to l, ll, u, ul, ull, etc., as suitable for constants of type 'sig_atomic_t'. */ #undef SIG_ATOMIC_T_SUFFIX /* The number of bytes in type long */ #undef SIZEOF_LONG /* Define as the maximum value of type 'size_t', if the system doesn't define it. */ #ifndef SIZE_MAX # undef SIZE_MAX #endif /* Define to l, ll, u, ul, ull, etc., as suitable for constants of type 'size_t'. */ #undef SIZE_T_SUFFIX /* If using the C implementation of alloca, define if you know the direction of stack growth for your system; otherwise it will be automatically deduced at runtime. STACK_DIRECTION > 0 => grows toward higher addresses STACK_DIRECTION < 0 => grows toward lower addresses STACK_DIRECTION = 0 => direction of growth unknown */ #undef STACK_DIRECTION /* Define to 1 if the `S_IS*' macros in do not work properly. */ #undef STAT_MACROS_BROKEN /* Define to 1 if you have the ANSI C header files. */ #undef STDC_HEADERS /* Define to 1 if you can safely include both and . */ #undef TIME_WITH_SYS_TIME /* Define if the POSIX multithreading library can be used. */ #undef USE_POSIX_THREADS /* Define if references to the POSIX multithreading library should be made weak. */ #undef USE_POSIX_THREADS_WEAK /* Define if the GNU Pth multithreading library can be used. */ #undef USE_PTH_THREADS /* Define if references to the GNU Pth multithreading library should be made weak. */ #undef USE_PTH_THREADS_WEAK /* Define if the old Solaris multithreading library can be used. */ #undef USE_SOLARIS_THREADS /* Define if references to the old Solaris multithreading library should be made weak. */ #undef USE_SOLARIS_THREADS_WEAK /* Define if the Win32 multithreading API can be used. */ #undef USE_WIN32_THREADS /* Version number of package */ #undef VERSION /* Define to l, ll, u, ul, ull, etc., as suitable for constants of type 'wchar_t'. */ #undef WCHAR_T_SUFFIX /* Define if WSAStartup is needed. */ #undef WINDOWS_SOCKETS /* Define to l, ll, u, ul, ull, etc., as suitable for constants of type 'wint_t'. */ #undef WINT_T_SUFFIX /* Define WORDS_BIGENDIAN to 1 if your processor stores words with the most significant byte first (like Motorola and SPARC, unlike Intel). */ #if defined AC_APPLE_UNIVERSAL_BUILD # if defined __BIG_ENDIAN__ # define WORDS_BIGENDIAN 1 # endif #else # ifndef WORDS_BIGENDIAN # undef WORDS_BIGENDIAN # endif #endif /* Define to 1 if `lex' declares `yytext' as a `char *' by default, not a `char[]'. */ #undef YYTEXT_POINTER /* Number of bits in a file offset, on hosts where this is settable. */ #undef _FILE_OFFSET_BITS /* Define to 1 to make fseeko visible on some hosts (e.g. glibc 2.2). */ #undef _LARGEFILE_SOURCE /* Define for large files, on AIX-style hosts. */ #undef _LARGE_FILES /* Define to 1 if on MINIX. */ #undef _MINIX /* Define to 2 if the system does not provide POSIX.1 features except with this defined. */ #undef _POSIX_1_SOURCE /* Define to 1 if you need to in order for `stat' and other things to work. */ #undef _POSIX_SOURCE /* Define if you want regoff_t to be at least as wide POSIX requires. */ #undef _REGEX_LARGE_OFFSETS /* Define to 500 only on HP-UX. */ #undef _XOPEN_SOURCE /* Enable extensions on AIX 3, Interix. */ #ifndef _ALL_SOURCE # undef _ALL_SOURCE #endif /* Enable GNU extensions on systems that have them. */ #ifndef _GNU_SOURCE # undef _GNU_SOURCE #endif /* Enable threading extensions on Solaris. */ #ifndef _POSIX_PTHREAD_SEMANTICS # undef _POSIX_PTHREAD_SEMANTICS #endif /* Enable extensions on HP NonStop. */ #ifndef _TANDEM_SOURCE # undef _TANDEM_SOURCE #endif /* Enable general extensions on Solaris. */ #ifndef __EXTENSIONS__ # undef __EXTENSIONS__ #endif /* Define to __FUNCTION__ or "" if `__func__' does not conform to ANSI C. */ #undef __PRELUDE_FUNC__ /* Define so that glibc/gnulib argp.h does not typedef error_t. */ #undef __error_t_defined /* Define to empty if `const' does not conform to ANSI C. */ #undef const /* Define to a type to use for `error_t' if it is not otherwise available. */ #undef error_t /* Define to `int' if doesn't define. */ #undef gid_t /* Define to rpl_gmtime if the replacement function should be used. */ #undef gmtime /* Define to `__inline__' or `__inline' if that's what the C compiler calls it, or to nothing if 'inline' is not supported under any name. */ #ifndef __cplusplus #undef inline #endif /* Define to long or long long if and don't define. */ #undef intmax_t /* Work around a bug in Apple GCC 4.0.1 build 5465: In C99 mode, it supports the ISO C 99 semantics of 'extern inline' (unlike the GNU C semantics of earlier versions), but does not display it by setting __GNUC_STDC_INLINE__. __APPLE__ && __MACH__ test for MacOS X. __APPLE_CC__ tests for the Apple compiler and its version. __STDC_VERSION__ tests for the C99 mode. */ #if defined __APPLE__ && defined __MACH__ && __APPLE_CC__ >= 5465 && !defined __cplusplus && __STDC_VERSION__ >= 199901L && !defined __GNUC_STDC_INLINE__ # define __GNUC_STDC_INLINE__ 1 #endif /* Define to rpl_localtime if the replacement function should be used. */ #undef localtime /* Define to rpl_malloc if the replacement function should be used. */ #undef malloc /* Define to a type if does not define. */ #undef mbstate_t /* Define to rpl_mktime if the replacement function should be used. */ #undef mktime /* Define to `int' if does not define. */ #undef mode_t /* Define to the type of st_nlink in struct stat, or a supertype. */ #undef nlink_t /* Define to `int' if does not define. */ #undef pid_t /* Define to poll if the replacement function should be used. */ #undef poll /* Define as the type of the result of subtracting two pointers, if the system doesn't define it. */ #undef ptrdiff_t /* Define to rpl_re_comp if the replacement should be used. */ #undef re_comp /* Define to rpl_re_compile_fastmap if the replacement should be used. */ #undef re_compile_fastmap /* Define to rpl_re_compile_pattern if the replacement should be used. */ #undef re_compile_pattern /* Define to rpl_re_exec if the replacement should be used. */ #undef re_exec /* Define to rpl_re_match if the replacement should be used. */ #undef re_match /* Define to rpl_re_match_2 if the replacement should be used. */ #undef re_match_2 /* Define to rpl_re_search if the replacement should be used. */ #undef re_search /* Define to rpl_re_search_2 if the replacement should be used. */ #undef re_search_2 /* Define to rpl_re_set_registers if the replacement should be used. */ #undef re_set_registers /* Define to rpl_re_set_syntax if the replacement should be used. */ #undef re_set_syntax /* Define to rpl_re_syntax_options if the replacement should be used. */ #undef re_syntax_options /* Define to rpl_regcomp if the replacement should be used. */ #undef regcomp /* Define to rpl_regerror if the replacement should be used. */ #undef regerror /* Define to rpl_regexec if the replacement should be used. */ #undef regexec /* Define to rpl_regfree if the replacement should be used. */ #undef regfree /* Define to the equivalent of the C99 'restrict' keyword, or to nothing if this is not supported. Do not define if restrict is supported directly. */ #undef restrict /* Work around a bug in Sun C++: it does not support _Restrict, even though the corresponding Sun C compiler does, which causes "#define restrict _Restrict" in the previous line. Perhaps some future version of Sun C++ will work with _Restrict; if so, it'll probably define __RESTRICT, just as Sun C does. */ #if defined __SUNPRO_CC && !defined __RESTRICT # define _Restrict #endif /* Define to `unsigned int' if does not define. */ #undef size_t /* type to use in place of socklen_t if not defined */ #undef socklen_t /* Define as a signed type of the same size as size_t. */ #undef ssize_t /* Define to rpl_strnlen if the replacement function should be used. */ #undef strnlen /* Define to `int' if doesn't define. */ #undef uid_t /* Define as a marker that can be attached to declarations that might not be used. This helps to reduce warnings, such as from GCC -Wunused-parameter. */ #if __GNUC__ >= 3 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 7) # define _GL_UNUSED __attribute__ ((__unused__)) #else # define _GL_UNUSED #endif /* The name _UNUSED_PARAMETER_ is an earlier spelling, although the name is a misnomer outside of parameter lists. */ #define _UNUSED_PARAMETER_ _GL_UNUSED libprelude-1.0.0/prelude-config.h0000664000076400007640000000051211345707626013657 00000000000000/* Used from libprelude headers */ #define HAVE_VARIADIC_MACROS 1 /* #undef PRELUDE_ALIGNED_ACCESS */ /* #undef PRELUDE_WORDS_BIGENDIAN */ #define __PRELUDE_FUNC__ __func__ #ifndef TIME_WITH_SYS_TIME #define TIME_WITH_SYS_TIME 1 #endif #ifndef HAVE_UID_T #define HAVE_UID_T 1 #endif #ifndef HAVE_GID_T #define HAVE_GID_T 1 #endif libprelude-1.0.0/HACKING.README0000664000076400007640000000154511202225026012512 00000000000000This directory and its children contain LibPrelude, a library for using the Prelude framework. Changes: if you wish to contribute a change which is a significant one in terms of the amount of code changes, please be aware that PreludeIDS Technologies SARL wishes to retain copyright of the Prelude library. Therefore you will have to sign over copyright ownership of your code to PreludeIDS Technologies SARL before we can include your changes in the main source tree. Before you start modifying anything for real, you should probably join the prelude-devel mailing list and send a mail describing what you want to do and how you want to do it so you don't waste time working on something we can't integrate. This also allows us to keep track of what's being worked on so efforts aren't duplicated. Please also read the information in the file LICENSE.README. libprelude-1.0.0/ylwrap0000755000076400007640000001404311347714457012053 00000000000000#! /bin/sh # ylwrap - wrapper for lex/yacc invocations. scriptversion=2009-04-28.21; # UTC # Copyright (C) 1996, 1997, 1998, 1999, 2001, 2002, 2003, 2004, 2005, # 2007, 2009 Free Software Foundation, Inc. # # Written by Tom Tromey . # # 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, see . # 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. # This file is maintained in Automake, please report # bugs to or send patches to # . case "$1" in '') echo "$0: No files given. Try \`$0 --help' for more information." 1>&2 exit 1 ;; --basedir) basedir=$2 shift 2 ;; -h|--h*) cat <<\EOF Usage: ylwrap [--help|--version] INPUT [OUTPUT DESIRED]... -- PROGRAM [ARGS]... Wrapper for lex/yacc invocations, renaming files as desired. INPUT is the input file OUTPUT is one file PROG generates DESIRED is the file we actually want instead of OUTPUT PROGRAM is program to run ARGS are passed to PROG Any number of OUTPUT,DESIRED pairs may be used. Report bugs to . EOF exit $? ;; -v|--v*) echo "ylwrap $scriptversion" exit $? ;; esac # The input. input="$1" shift case "$input" in [\\/]* | ?:[\\/]*) # Absolute path; do nothing. ;; *) # Relative path. Make it absolute. input="`pwd`/$input" ;; esac pairlist= while test "$#" -ne 0; do if test "$1" = "--"; then shift break fi pairlist="$pairlist $1" shift done # The program to run. prog="$1" shift # Make any relative path in $prog absolute. case "$prog" in [\\/]* | ?:[\\/]*) ;; *[\\/]*) prog="`pwd`/$prog" ;; esac # FIXME: add hostname here for parallel makes that run commands on # other machines. But that might take us over the 14-char limit. dirname=ylwrap$$ trap "cd '`pwd`'; rm -rf $dirname > /dev/null 2>&1" 1 2 3 15 mkdir $dirname || exit 1 cd $dirname case $# in 0) "$prog" "$input" ;; *) "$prog" "$@" "$input" ;; esac ret=$? if test $ret -eq 0; then set X $pairlist shift first=yes # Since DOS filename conventions don't allow two dots, # the DOS version of Bison writes out y_tab.c instead of y.tab.c # and y_tab.h instead of y.tab.h. Test to see if this is the case. y_tab_nodot="no" if test -f y_tab.c || test -f y_tab.h; then y_tab_nodot="yes" fi # The directory holding the input. input_dir=`echo "$input" | sed -e 's,\([\\/]\)[^\\/]*$,\1,'` # Quote $INPUT_DIR so we can use it in a regexp. # FIXME: really we should care about more than `.' and `\'. input_rx=`echo "$input_dir" | sed 's,\\\\,\\\\\\\\,g;s,\\.,\\\\.,g'` while test "$#" -ne 0; do from="$1" # Handle y_tab.c and y_tab.h output by DOS if test $y_tab_nodot = "yes"; then if test $from = "y.tab.c"; then from="y_tab.c" else if test $from = "y.tab.h"; then from="y_tab.h" fi fi fi if test -f "$from"; then # If $2 is an absolute path name, then just use that, # otherwise prepend `../'. case "$2" in [\\/]* | ?:[\\/]*) target="$2";; *) target="../$2";; esac # We do not want to overwrite a header file if it hasn't # changed. This avoid useless recompilations. However the # parser itself (the first file) should always be updated, # because it is the destination of the .y.c rule in the # Makefile. Divert the output of all other files to a temporary # file so we can compare them to existing versions. if test $first = no; then realtarget="$target" target="tmp-`echo $target | sed s/.*[\\/]//g`" fi # Edit out `#line' or `#' directives. # # We don't want the resulting debug information to point at # an absolute srcdir; it is better for it to just mention the # .y file with no path. # # We want to use the real output file name, not yy.lex.c for # instance. # # We want the include guards to be adjusted too. FROM=`echo "$from" | sed \ -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'\ -e 's/[^ABCDEFGHIJKLMNOPQRSTUVWXYZ]/_/g'` TARGET=`echo "$2" | sed \ -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'\ -e 's/[^ABCDEFGHIJKLMNOPQRSTUVWXYZ]/_/g'` sed -e "/^#/!b" -e "s,$input_rx,," -e "s,$from,$2," \ -e "s,$FROM,$TARGET," "$from" >"$target" || ret=$? # Check whether header files must be updated. if test $first = no; then if test -f "$realtarget" && cmp -s "$realtarget" "$target"; then echo "$2" is unchanged rm -f "$target" else echo updating "$2" mv -f "$target" "$realtarget" fi fi else # A missing file is only an error for the first file. This # is a blatant hack to let us support using "yacc -d". If -d # is not specified, we don't want an error when the header # file is "missing". if test $first = yes; then ret=1 fi fi shift shift first=no done else ret=$? fi # Remove the directory. cd .. rm -rf $dirname exit $ret # Local Variables: # mode: shell-script # sh-indentation: 2 # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "scriptversion=" # time-stamp-format: "%:y-%02m-%02d.%02H" # time-stamp-time-zone: "UTC" # time-stamp-end: "; # UTC" # End: libprelude-1.0.0/libprelude-config.in0000664000076400007640000000407511322603367014525 00000000000000#!/bin/sh prefix=@prefix@ prelude_conf_prefix=@PRELUDE_CONFIG_DIR@ exec_prefix=@exec_prefix@ exec_prefix_set=no cpp_set=no thread_set=yes want_libs=no want_cflags=no usage="\ Usage: libprelude-config [--prefix[=DIR]] [--exec-prefix[=DIR]] [--config-prefix] [--version] [--c++] [--libs] [--ldflags] [--cflags] [--pthread-cflags]" if test $# -eq 0; then echo "${usage}" 1>&2 exit 1 fi while test $# -gt 0; do case "$1" in -*=*) optarg=`echo "$1" | sed 's/[-_a-zA-Z0-9]*=//'` ;; *) optarg= ;; esac case $1 in --prefix=*) prefix=$optarg if test $exec_prefix_set = no ; then exec_prefix=$optarg fi ;; --prefix) echo $prefix ;; --exec-prefix=*) exec_prefix=$optarg exec_prefix_set=yes ;; --exec-prefix) echo $exec_prefix ;; --config-prefix) echo $prelude_conf_prefix ;; --version) echo @VERSION@ ;; --no-thread) thread_set=no ;; --thread) thread_set=yes ;; --cflags) want_cflags=yes ;; --pthread-cflags) thread_set=yes want_cflags=yes ;; --ldflags) ;; --c++) cpp_set=yes ;; --libs) want_libs=yes ;; *) echo "${usage}" 1>&2 exit 1 ;; esac shift done if test $want_cflags = yes; then flags="" if test @includedir@ != /usr/include ; then flags=-I@includedir@ fi if test $thread_set = yes; then flags=$flags fi echo @LIBPRELUDE_CFLAGS@ $flags fi if test $want_libs = yes; then libdirs=-L@libdir@ cpplibs="" if test $cpp_set = yes; then cpplibs="$libdirs -lpreludecpp" fi if test $thread_set = yes; then thrlibs=@LTLIBMULTITHREAD@ else thrlibs=@LTLIBTHREAD@ fi echo $cpplibs $libdirs -lprelude @LIBPRELUDE_LIBS@ @LIBADD_DL@ $thrlibs @GETADDRINFO_LIB@ @GETHOSTNAME_LIB@ @HOSTENT_LIB@ @INET_NTOP_LIB@ @INET_PTON_LIB@ @LIBSOCKET@ @LTLIBINTL@ @SERVENT_LIB@ fi exit 0 libprelude-1.0.0/INSTALL0000644000076400007640000003633211347714460011637 00000000000000Installation Instructions ************************* Copyright (C) 1994, 1995, 1996, 1999, 2000, 2001, 2002, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc. Copying and distribution of this file, with or without modification, are permitted in any medium without royalty provided the copyright notice and this notice are preserved. This file is offered as-is, without warranty of any kind. Basic Installation ================== Briefly, the shell commands `./configure; make; make install' should configure, build, and install this package. The following more-detailed instructions are generic; see the `README' file for instructions specific to this package. Some packages provide this `INSTALL' file but do not implement all of the features documented below. The lack of an optional feature in a given package is not necessarily a bug. More recommendations for GNU packages can be found in *note Makefile Conventions: (standards)Makefile Conventions. The `configure' shell script attempts to guess correct values for various system-dependent variables used during compilation. It uses those values to create a `Makefile' in each directory of the package. It may also create one or more `.h' files containing system-dependent definitions. Finally, it creates a shell script `config.status' that you can run in the future to recreate the current configuration, and a file `config.log' containing compiler output (useful mainly for debugging `configure'). It can also use an optional file (typically called `config.cache' and enabled with `--cache-file=config.cache' or simply `-C') that saves the results of its tests to speed up reconfiguring. Caching is disabled by default to prevent problems with accidental use of stale cache files. If you need to do unusual things to compile the package, please try to figure out how `configure' could check whether to do them, and mail diffs or instructions to the address given in the `README' so they can be considered for the next release. If you are using the cache, and at some point `config.cache' contains results you don't want to keep, you may remove or edit it. The file `configure.ac' (or `configure.in') is used to create `configure' by a program called `autoconf'. You need `configure.ac' if you want to change it or regenerate `configure' using a newer version of `autoconf'. The simplest way to compile this package is: 1. `cd' to the directory containing the package's source code and type `./configure' to configure the package for your system. Running `configure' might take a while. While running, it prints some messages telling which features it is checking for. 2. Type `make' to compile the package. 3. Optionally, type `make check' to run any self-tests that come with the package, generally using the just-built uninstalled binaries. 4. Type `make install' to install the programs and any data files and documentation. When installing into a prefix owned by root, it is recommended that the package be configured and built as a regular user, and only the `make install' phase executed with root privileges. 5. Optionally, type `make installcheck' to repeat any self-tests, but this time using the binaries in their final installed location. This target does not install anything. Running this target as a regular user, particularly if the prior `make install' required root privileges, verifies that the installation completed correctly. 6. You can remove the program binaries and object files from the source code directory by typing `make clean'. To also remove the files that `configure' created (so you can compile the package for a different kind of computer), type `make distclean'. There is also a `make maintainer-clean' target, but that is intended mainly for the package's developers. If you use it, you may have to get all sorts of other programs in order to regenerate files that came with the distribution. 7. Often, you can also type `make uninstall' to remove the installed files again. In practice, not all packages have tested that uninstallation works correctly, even though it is required by the GNU Coding Standards. 8. Some packages, particularly those that use Automake, provide `make distcheck', which can by used by developers to test that all other targets like `make install' and `make uninstall' work correctly. This target is generally not run by end users. Compilers and Options ===================== Some systems require unusual options for compilation or linking that the `configure' script does not know about. Run `./configure --help' for details on some of the pertinent environment variables. You can give `configure' initial values for configuration parameters by setting variables in the command line or in the environment. Here is an example: ./configure CC=c99 CFLAGS=-g LIBS=-lposix *Note Defining Variables::, for more details. Compiling For Multiple Architectures ==================================== You can compile the package for more than one kind of computer at the same time, by placing the object files for each architecture in their own directory. To do this, you can use GNU `make'. `cd' to the directory where you want the object files and executables to go and run the `configure' script. `configure' automatically checks for the source code in the directory that `configure' is in and in `..'. This is known as a "VPATH" build. With a non-GNU `make', it is safer to compile the package for one architecture at a time in the source code directory. After you have installed the package for one architecture, use `make distclean' before reconfiguring for another architecture. On MacOS X 10.5 and later systems, you can create libraries and executables that work on multiple system types--known as "fat" or "universal" binaries--by specifying multiple `-arch' options to the compiler but only a single `-arch' option to the preprocessor. Like this: ./configure CC="gcc -arch i386 -arch x86_64 -arch ppc -arch ppc64" \ CXX="g++ -arch i386 -arch x86_64 -arch ppc -arch ppc64" \ CPP="gcc -E" CXXCPP="g++ -E" This is not guaranteed to produce working output in all cases, you may have to build one architecture at a time and combine the results using the `lipo' tool if you have problems. Installation Names ================== By default, `make install' installs the package's commands under `/usr/local/bin', include files under `/usr/local/include', etc. You can specify an installation prefix other than `/usr/local' by giving `configure' the option `--prefix=PREFIX', where PREFIX must be an absolute file name. You can specify separate installation prefixes for architecture-specific files and architecture-independent files. If you pass the option `--exec-prefix=PREFIX' to `configure', the package uses PREFIX as the prefix for installing programs and libraries. Documentation and other data files still use the regular prefix. In addition, if you use an unusual directory layout you can give options like `--bindir=DIR' to specify different values for particular kinds of files. Run `configure --help' for a list of the directories you can set and what kinds of files go in them. In general, the default for these options is expressed in terms of `${prefix}', so that specifying just `--prefix' will affect all of the other directory specifications that were not explicitly provided. The most portable way to affect installation locations is to pass the correct locations to `configure'; however, many packages provide one or both of the following shortcuts of passing variable assignments to the `make install' command line to change installation locations without having to reconfigure or recompile. The first method involves providing an override variable for each affected directory. For example, `make install prefix=/alternate/directory' will choose an alternate location for all directory configuration variables that were expressed in terms of `${prefix}'. Any directories that were specified during `configure', but not in terms of `${prefix}', must each be overridden at install time for the entire installation to be relocated. The approach of makefile variable overrides for each directory variable is required by the GNU Coding Standards, and ideally causes no recompilation. However, some platforms have known limitations with the semantics of shared libraries that end up requiring recompilation when using this method, particularly noticeable in packages that use GNU Libtool. The second method involves providing the `DESTDIR' variable. For example, `make install DESTDIR=/alternate/directory' will prepend `/alternate/directory' before all installation names. The approach of `DESTDIR' overrides is not required by the GNU Coding Standards, and does not work on platforms that have drive letters. On the other hand, it does better at avoiding recompilation issues, and works well even when some directory options were not specified in terms of `${prefix}' at `configure' time. Optional Features ================= If the package supports it, you can cause programs to be installed with an extra prefix or suffix on their names by giving `configure' the option `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'. Some packages pay attention to `--enable-FEATURE' options to `configure', where FEATURE indicates an optional part of the package. They may also pay attention to `--with-PACKAGE' options, where PACKAGE is something like `gnu-as' or `x' (for the X Window System). The `README' should mention any `--enable-' and `--with-' options that the package recognizes. For packages that use the X Window System, `configure' can usually find the X include and library files automatically, but if it doesn't, you can use the `configure' options `--x-includes=DIR' and `--x-libraries=DIR' to specify their locations. Some packages offer the ability to configure how verbose the execution of `make' will be. For these packages, running `./configure --enable-silent-rules' sets the default to minimal output, which can be overridden with `make V=1'; while running `./configure --disable-silent-rules' sets the default to verbose, which can be overridden with `make V=0'. Particular systems ================== On HP-UX, the default C compiler is not ANSI C compatible. If GNU CC is not installed, it is recommended to use the following options in order to use an ANSI C compiler: ./configure CC="cc -Ae -D_XOPEN_SOURCE=500" and if that doesn't work, install pre-built binaries of GCC for HP-UX. On OSF/1 a.k.a. Tru64, some versions of the default C compiler cannot parse its `' header file. The option `-nodtk' can be used as a workaround. If GNU CC is not installed, it is therefore recommended to try ./configure CC="cc" and if that doesn't work, try ./configure CC="cc -nodtk" On Solaris, don't put `/usr/ucb' early in your `PATH'. This directory contains several dysfunctional programs; working variants of these programs are available in `/usr/bin'. So, if you need `/usr/ucb' in your `PATH', put it _after_ `/usr/bin'. On Haiku, software installed for all users goes in `/boot/common', not `/usr/local'. It is recommended to use the following options: ./configure --prefix=/boot/common Specifying the System Type ========================== There may be some features `configure' cannot figure out automatically, but needs to determine by the type of machine the package will run on. Usually, assuming the package is built to be run on the _same_ architectures, `configure' can figure that out, but if it prints a message saying it cannot guess the machine type, give it the `--build=TYPE' option. TYPE can either be a short name for the system type, such as `sun4', or a canonical name which has the form: CPU-COMPANY-SYSTEM where SYSTEM can have one of these forms: OS KERNEL-OS See the file `config.sub' for the possible values of each field. If `config.sub' isn't included in this package, then this package doesn't need to know the machine type. If you are _building_ compiler tools for cross-compiling, you should use the option `--target=TYPE' to select the type of system they will produce code for. If you want to _use_ a cross compiler, that generates code for a platform different from the build platform, you should specify the "host" platform (i.e., that on which the generated programs will eventually be run) with `--host=TYPE'. Sharing Defaults ================ If you want to set default values for `configure' scripts to share, you can create a site shell script called `config.site' that gives default values for variables like `CC', `cache_file', and `prefix'. `configure' looks for `PREFIX/share/config.site' if it exists, then `PREFIX/etc/config.site' if it exists. Or, you can set the `CONFIG_SITE' environment variable to the location of the site script. A warning: not all `configure' scripts look for a site script. Defining Variables ================== Variables not defined in a site shell script can be set in the environment passed to `configure'. However, some packages may run configure again during the build, and the customized values of these variables may be lost. In order to avoid this problem, you should set them in the `configure' command line, using `VAR=value'. For example: ./configure CC=/usr/local2/bin/gcc causes the specified `gcc' to be used as the C compiler (unless it is overridden in the site shell script). Unfortunately, this technique does not work for `CONFIG_SHELL' due to an Autoconf bug. Until the bug is fixed you can use this workaround: CONFIG_SHELL=/bin/bash /bin/bash ./configure CONFIG_SHELL=/bin/bash `configure' Invocation ====================== `configure' recognizes the following options to control how it operates. `--help' `-h' Print a summary of all of the options to `configure', and exit. `--help=short' `--help=recursive' Print a summary of the options unique to this package's `configure', and exit. The `short' variant lists options used only in the top level, while the `recursive' variant lists options also present in any nested packages. `--version' `-V' Print the version of Autoconf used to generate the `configure' script, and exit. `--cache-file=FILE' Enable the cache: use and save the results of the tests in FILE, traditionally `config.cache'. FILE defaults to `/dev/null' to disable caching. `--config-cache' `-C' Alias for `--cache-file=config.cache'. `--quiet' `--silent' `-q' Do not print messages saying which checks are being made. To suppress all normal output, redirect it to `/dev/null' (any error messages will still be shown). `--srcdir=DIR' Look for the package's source code in directory DIR. Usually `configure' can determine that directory automatically. `--prefix=DIR' Use DIR as the installation prefix. *note Installation Names:: for more details, including other options available for fine-tuning the installation locations. `--no-create' `-n' Run the configure checks, but stop before creating any output files. `configure' also accepts some other, not widely useful, options. Run `configure --help' for more details. libprelude-1.0.0/src/0000775000076400007640000000000011347714753011455 500000000000000libprelude-1.0.0/src/common.c0000664000076400007640000004152011325615276013027 00000000000000/***** * * Copyright (C) 2002-2005,2006,2007 PreludeIDS Technologies. All Rights Reserved. * Author: Yoann Vandoorselaere * * This file is part of the Prelude library. * * 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; see the file COPYING. If not, write to * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. * *****/ #include "config.h" #include "libmissing.h" #include #include #include #include #include #include #include #include #include #if !((defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__) # include #endif #include "prelude-error.h" #include "idmef.h" #include "prelude-log.h" #include "common.h" extern char _prelude_init_cwd[PATH_MAX]; static prelude_string_t *get_message_ident(prelude_ident_t *ident) { int ret; prelude_string_t *str; ret = prelude_string_new(&str); if ( ret < 0 ) return NULL; ret = prelude_ident_generate(ident, str); if ( ret < 0 ) { prelude_string_destroy(str); return NULL; } return str; } static int find_absolute_path(const char *cwd, const char *file, char **path) { int ret; char buf[PATH_MAX]; const char *ptr; char *pathenv = strdup(getenv("PATH")), *old = pathenv; while ( (ptr = strsep(&pathenv, ":")) ) { ret = strcmp(ptr, "."); if ( ret == 0 ) { if ( *cwd == 0 ) continue; ptr = cwd; } snprintf(buf, sizeof(buf), "%s/%s", ptr, file); ret = access(buf, F_OK); if ( ret < 0 ) continue; *path = strdup(ptr); free(old); return 0; } free(old); return -1; } /** * _prelude_realloc: * @ptr: Pointer on a memory block. * @size: New size. * * prelude_realloc() changes the size of the memory block pointed by @ptr * to @size bytes. The contents will be unchanged to the minimum of the old * and new sizes; newly allocated memory will be uninitialized. If ptr is NULL, * the call is equivalent to malloc(@size); if @size is equal to zero, the call * is equivalent to free(ptr). Unless ptr is NULL, it must have been returned by * an earlier call to malloc(), calloc() or realloc(). * * This function exists because some versions of realloc() don't handle the * case where @ptr is NULL. Even though ANSI requires it. * * Returns: a pointer to the newly allocated memory, which is suitably * aligned for any kind of variable and may be different from ptr, or NULL if the * request fails. If size was equal to 0, either NULL or a pointer suitable to be * passed to free() is returned. If realloc() fails, the original block is left * untouched - it is not freed nor moved. */ void *_prelude_realloc(void *ptr, size_t size) { if ( ptr == NULL ) return malloc(size); else return realloc(ptr, size); } /** * prelude_read_multiline: * @fd: File descriptor to read input from. * @line: Pointer to a line counter. * @buf: Pointer to a buffer where the line should be stored. * @size: Size of the @buf buffer. * * This function handles line reading separated by the '\' character. * * Returns: 0 on success, -1 if an error occured. */ int prelude_read_multiline(FILE *fd, unsigned int *line, char *buf, size_t size) { size_t i, j, len; prelude_bool_t eol, has_data = FALSE, miss_eol=FALSE; while ( size > 1 ) { if ( ! fgets(buf, size, fd) ) return (has_data) ? 0 : prelude_error(PRELUDE_ERROR_EOF); len = strlen(buf); if ( ! len ) continue; eol = FALSE; for ( i = len - 1; isspace((int) buf[i]); i-- ) { if ( buf[i] == '\n' || buf[i] == '\r' ) { buf[i] = 0; if ( ! eol ) { eol = TRUE; (*line)++; } } if ( i == 0 ) break; } if ( miss_eol && eol && i == 0 ) continue; /* * We don't want to handle multilines in case this is a comment. */ for ( j = 0; buf[j] != '\0' && isspace((int) buf[j]); j++ ); if ( buf[j] == '#' ) continue; /* * Multiline found, continue reading. */ if ( buf[i] != '\\' ) { if ( eol ) return 0; if ( len == size - 1 ) break; has_data = TRUE; } if ( ! eol ) miss_eol = TRUE; buf += i; size -= i; } return prelude_error_verbose(PRELUDE_ERROR_EINVAL, "buffer is too small to store input line"); } /** * prelude_read_multiline2: * @fd: File descriptor to read input from. * @line: Pointer to a line counter. * @out: Pointer to a #prelude_string_t object where the line should be stored. * * This function handles line reading separated by the '\' character. * * Returns: 0 on success, a negative value if an error occured. */ int prelude_read_multiline2(FILE *fd, unsigned int *line, prelude_string_t *out) { int ret, r; char buf[8192]; prelude_string_clear(out); do { ret = prelude_read_multiline(fd, line, buf, sizeof(buf)); if ( ret < 0 && (r = prelude_error_get_code(ret)) != PRELUDE_ERROR_EINVAL ) { if ( r == PRELUDE_ERROR_EOF && ! prelude_string_is_empty(out) ) ret = 0; break; } r = prelude_string_cat(out, buf); if ( r < 0 ) return r; } while ( ret < 0 ); return ret; } /** * prelude_hton64: * @val: Value to convert to network byte order. * * The prelude_hton64() function converts the 64 bits unsigned integer @val * from host byte order to network byte order. * * Returns: @val in the network bytes order. */ uint64_t prelude_hton64(uint64_t val) { uint64_t tmp; #ifdef PRELUDE_WORDS_BIGENDIAN tmp = val; #else union { uint64_t val64; uint32_t val32[2]; } combo_r, combo_w; combo_r.val64 = val; /* * Puts in network byte order */ combo_w.val32[0] = htonl(combo_r.val32[1]); combo_w.val32[1] = htonl(combo_r.val32[0]); tmp = combo_w.val64; #endif return tmp; } uint32_t prelude_htonf(float fval) { union { float fval; uint32_t ival; } val; val.fval = fval; return htonl(val.ival); } static void normalize_path(char *path) { int cnt; char *ptr, *end; while ( (ptr = strstr(path, "./")) ) { end = ptr + 2; if ( ptr == path || *(ptr - 1) != '.' ) { memmove(ptr, end, strlen(end) + 1); continue; } cnt = 0; while ( ptr != path ) { if ( *(ptr - 1) == '/' && ++cnt == 2 ) break; ptr--; } memmove(ptr == path ? ptr + 1 : ptr, end, strlen(end) + 1); } } int _prelude_get_file_name_and_path(const char *str, char **name, char **path) { int ret = 0; char *ptr, pathname[PATH_MAX] = { 0 }; ptr = strrchr(str, '/'); if ( ! ptr ) { ret = find_absolute_path(_prelude_init_cwd, str, path); if ( ret < 0 ) return ret; *name = strdup(str); return (*name) ? 0 : prelude_error_from_errno(errno); } if ( *str != '/' ) { char needsep = 0; size_t cwdlen = strlen(_prelude_init_cwd); if ( cwdlen ) needsep = (_prelude_init_cwd[cwdlen - 1] != '/' ) ? '/' : '\0'; ret = snprintf(pathname, sizeof(pathname), "%s%c", _prelude_init_cwd, needsep); if ( ret < 0 || (size_t) ret >= sizeof(pathname) ) return prelude_error_from_errno(errno); } strncat(pathname, str, sizeof(pathname) - strlen(pathname)); normalize_path(pathname); ret = access(pathname, F_OK); if ( ret < 0 ) return prelude_error_from_errno(errno); ptr = strrchr(pathname, '/'); *path = strndup(pathname, ptr - pathname); if ( ! *path ) return prelude_error_from_errno(errno); *name = strdup(ptr + 1); if ( ! *name ) { free(*path); return prelude_error_from_errno(errno); } return 0; } int prelude_get_gmt_offset_from_time(const time_t *utc, long *gmtoff) { time_t local; struct tm lt; if ( ! localtime_r(utc, <) ) return prelude_error_from_errno(errno); local = timegm(<); *gmtoff = local - *utc; return 0; } int prelude_get_gmt_offset_from_tm(struct tm *tm, long *gmtoff) { int tmp; time_t local, utc; /* * timegm will reset tm_isdst to 0 */ tmp = tm->tm_isdst; utc = timegm(tm); tm->tm_isdst = tmp; local = mktime(tm); if ( local == (time_t) -1 ) return prelude_error_from_errno(errno); *gmtoff = utc - mktime(tm); return 0; } int prelude_get_gmt_offset(long *gmtoff) { time_t t = time(NULL); return prelude_get_gmt_offset_from_time(&t, gmtoff); } time_t prelude_timegm(struct tm *tm) { return timegm(tm); } void *prelude_sockaddr_get_inaddr(struct sockaddr *sa) { void *ret = NULL; union { struct sockaddr *sa; struct sockaddr_in *sa4; #ifdef HAVE_IPV6 struct sockaddr_in6 *sa6; #endif } val; val.sa = sa; if ( sa->sa_family == AF_INET ) ret = &val.sa4->sin_addr; #ifdef HAVE_IPV6 else if ( sa->sa_family == AF_INET6 ) ret = &val.sa6->sin6_addr; #endif return ret; } int prelude_parse_address(const char *str, char **addr, unsigned int *port) { char *input, *endptr = NULL; char *ptr, *port_ptr; ptr = strchr(str, '['); if ( ! ptr ) { input = strdup(str); port_ptr = input; } else { input = strdup(ptr + 1); ptr = strchr(input, ']'); if ( ! ptr ) { free(input); return -1; } *ptr = 0; port_ptr = ptr + 1; } *addr = input; ptr = strrchr(port_ptr, ':'); if ( ptr ) { *port = strtoul(ptr + 1, &endptr, 10); if ( endptr && *endptr != 0 ) { free(input); return -1; } *ptr = 0; } return 0; } /* * keep this function consistant with idmef_impact_severity_t value. */ prelude_msg_priority_t _idmef_impact_severity_to_msg_priority(idmef_impact_severity_t severity) { static const prelude_msg_priority_t priority[] = { PRELUDE_MSG_PRIORITY_NONE, /* not bound */ PRELUDE_MSG_PRIORITY_LOW, /* IDMEF_IMPACT_SEVERITY_INFO -> 1 */ PRELUDE_MSG_PRIORITY_LOW, /* IDMEF_IMPACT_SEVERITY_LOW -> 2 */ PRELUDE_MSG_PRIORITY_MID, /* IDMEF_IMPACT_SEVERITY_MEDIUM -> 3 */ PRELUDE_MSG_PRIORITY_HIGH, /* IDMEF_IMPACT_SEVERITY_HIGH -> 4 */ }; if ( severity < 0 || (size_t) severity >= (sizeof(priority) / sizeof(*priority)) ) return PRELUDE_MSG_PRIORITY_NONE; return priority[severity]; } static int add_analyzer(prelude_client_t *client, void *top, void *(*geta)(void *top, idmef_analyzer_t *analyzer), int (*insa)(void *top, idmef_analyzer_t *analyzer, int pos)) { prelude_string_t *str; uint64_t wanted_analyzerid, analyzerid; idmef_analyzer_t *analyzer = NULL, *canalyzer; canalyzer = prelude_client_get_analyzer(client); wanted_analyzerid = prelude_client_profile_get_analyzerid(prelude_client_get_profile(client)); while ( (analyzer = geta(top, analyzer)) && analyzer != canalyzer ) { str = idmef_analyzer_get_analyzerid(analyzer); if ( ! str ) continue; analyzerid = strtoull(prelude_string_get_string(str), NULL, 10); if ( analyzerid == wanted_analyzerid ) return 0; } return insa(top, idmef_analyzer_ref(prelude_client_get_analyzer(client)), IDMEF_LIST_PREPEND); } int _idmef_message_assign_missing(prelude_client_t *client, idmef_message_t *msg) { idmef_alert_t *alert; idmef_heartbeat_t *heartbeat; prelude_ident_t *ident = prelude_client_get_unique_ident(client); if ( idmef_message_get_type(msg) == IDMEF_MESSAGE_TYPE_ALERT ) { alert = idmef_message_get_alert(msg); if ( ! idmef_alert_get_messageid(alert) ) idmef_alert_set_messageid(alert, get_message_ident(ident)); add_analyzer(client, alert, (void *) idmef_alert_get_next_analyzer, (void *) idmef_alert_set_analyzer); } else { heartbeat = idmef_message_get_heartbeat(msg); if ( ! idmef_heartbeat_get_messageid(heartbeat) ) idmef_heartbeat_set_messageid(heartbeat, get_message_ident(ident)); add_analyzer(client, heartbeat, (void *) idmef_heartbeat_get_next_analyzer, (void *)idmef_heartbeat_set_analyzer); } return 0; } int _prelude_load_file(const char *filename, unsigned char **fdata, size_t *outsize) { int ret, fd; struct stat st; unsigned char *dataptr; fd = open(filename, O_RDONLY); if ( fd < 0 ) return prelude_error_from_errno(errno); ret = fstat(fd, &st); if ( ret < 0 ) { close(fd); return prelude_error_from_errno(errno); } if ( st.st_size == 0 ) { close(fd); return prelude_error_verbose(prelude_error_code_from_errno(EINVAL), "could not load '%s': empty file", filename); } *outsize = st.st_size; #if !((defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__) dataptr = *fdata = mmap(NULL, st.st_size, PROT_READ, MAP_SHARED, fd, 0); if ( dataptr == MAP_FAILED ) { close(fd); return prelude_error_from_errno(errno); } #else dataptr = *fdata = malloc(st.st_size); if ( ! dataptr ) { close(fd); return prelude_error_from_errno(errno); } _setmode(fd, O_BINARY); do { ssize_t len; len = read(fd, dataptr, st.st_size); if ( len < 0 ) { if ( errno == EINTR ) continue; close(fd); free(*fdata); return prelude_error_from_errno(errno); } dataptr += len; st.st_size -= len; } while ( st.st_size > 0 ); #endif close(fd); return 0; } void _prelude_unload_file(unsigned char *fdata, size_t size) { #if !((defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__) munmap(fdata, size); #else free(fdata); #endif } libprelude-1.0.0/src/libprelude.pc.in0000664000076400007640000000062411202225026014433 00000000000000prefix=@prefix@ exec_prefix=@exec_prefix@ libdir=@libdir@ includedir=@includedir@ threadlib=@LIBMULTITHREAD@ Name: LibPrelude Description: The Prelude Library provide API for communicating with PreludeIDS SIM components. Version: @VERSION@ Libs: -L${libdir} -lprelude Libs.private: @LIBPRELUDE_LIBS@ @GETADDRINFO_LIB@ @HOSTENT_LIB@ @LIBINTL@ @LIBMULTITHREAD@ @SERVENT_LIB@ Cflags: @LIBPRELUDE_CFLAGS@ libprelude-1.0.0/src/prelude-ident.c0000664000076400007640000001410211202225027014255 00000000000000/***** * * Copyright (C) 2001,2002,2003,2004,2005 PreludeIDS Technologies. All Rights Reserved. * Author: Yoann Vandoorselaere * * This file is part of the Prelude library. * * 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; see the file COPYING. If not, write to * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. * *****/ #include "config.h" #include "libmissing.h" #include #include #include #include #if TIME_WITH_SYS_TIME # include # include #else # if HAVE_SYS_TIME_H # include # else # include # endif #endif #include #include "prelude-log.h" #include "prelude-error.h" #include "prelude-inttypes.h" #include "prelude-ident.h" /* * Partial (no state, no node since the messageid is local to an * analyzer) UUIDv1 implementation. * * Based on RFC4122 reference implementation. */ /* * This is the number of UUID the system is capable of generating * within one resolution of our system clock (the lower the better). * * - UUID has 100ns resolution, so one UUID every 100ns max (RFC 4122). * - gettimeofday() has microsecond resolution (1000ns). * - We can generate 1000 / 100 = 10 UUID per tick. */ #define UUIDS_PER_TICK 10 /* * Time offset between UUID and Unix Epoch time according to standards. * UUID UTC base time is October 15, 1582 - Unix UTC base time is * January 1, 1970) */ #define UUID_TIMEOFFSET 0x01b21dd213814000 struct prelude_ident { uint16_t tick; uint64_t last; uint16_t clockseq; struct { uint32_t time_low; /* bits 0-31 of time field */ uint16_t time_mid; /* bits 32-47 of time field */ uint16_t time_hi_and_version; /* bits 48-59 of time field plus 4 bit version */ uint8_t clock_seq_hi_and_reserved; /* bits 8-13 of clock sequence field plus 2 bit variant */ uint8_t clock_seq_low; /* bits 0-7 of clock sequence field */ } uuid; }; /* * Return the system time as 100ns ticks since UUID epoch. */ static uint64_t get_system_time(void) { struct timeval tv; gettimeofday(&tv, NULL); return ((uint64_t) tv.tv_sec * 10000000) + ((uint64_t) tv.tv_usec * 10) + UUID_TIMEOFFSET; } static uint64_t get_current_time(prelude_ident_t *ident) { uint64_t now; do { now = get_system_time(); /* * if clock value changed since the last UUID generated */ if ( ident->last != now ) { ident->last = now; ident->tick = 0; break; } if ( ident->tick < UUIDS_PER_TICK ) { ident->tick++; break; } /* * We're generating ident faster than our clock resolution * can afford: spin. */ } while ( 1 ); /* * add the count of uuids to low order bits of the clock reading */ return now + ident->tick; } static void uuidgen(prelude_ident_t *ident) { uint64_t timestamp; timestamp = get_current_time(ident); if ( timestamp < ident->last ) ident->clockseq++; ident->uuid.time_low = (uint32_t) (timestamp & 0xffffffff); ident->uuid.time_mid = (uint16_t) ((timestamp >> 32) & 0xffff); ident->uuid.time_hi_and_version = (uint16_t) ((timestamp >> 48) & 0x0fff); ident->uuid.time_hi_and_version |= (1 << 12); ident->uuid.clock_seq_low = ident->clockseq & 0xff; ident->uuid.clock_seq_hi_and_reserved = (ident->clockseq & 0x3f00) >> 8; ident->uuid.clock_seq_hi_and_reserved |= 0x80; } /** * prelude_ident_new: * @ret: Pointer where to store the created object. * * Create a new #prelude_ident_t object with an unique value. * * Returns: 0 on success, or a negative value if an error occured. */ int prelude_ident_new(prelude_ident_t **ret) { prelude_ident_t *new; *ret = new = malloc(sizeof(*new)); if ( ! new ) return prelude_error_from_errno(errno); new->last = 0; new->tick = 0; gcry_randomize(&new->clockseq, sizeof(new->clockseq), GCRY_STRONG_RANDOM); return 0; } /** * prelude_ident_generate: * @ident: Pointer to a #prelude_ident_t object. * @out: #prelude_string_t where the ident will be generated. * * Generate an UUID and store it in @out. * * Returns: A negative value if an error occur. */ int prelude_ident_generate(prelude_ident_t *ident, prelude_string_t *out) { uuidgen(ident); return prelude_string_sprintf(out, "%8.8x-%4.4x-%4.4x-%2.2x%2.2x", ident->uuid.time_low, ident->uuid.time_mid, ident->uuid.time_hi_and_version, ident->uuid.clock_seq_hi_and_reserved, ident->uuid.clock_seq_low); } /** * prelude_ident_inc: * @ident: Pointer to a #prelude_ident_t object. * * Deprecated. * * Returns: A new ident. */ uint64_t prelude_ident_inc(prelude_ident_t *ident) { return get_system_time(); } /** * prelude_ident_destroy: * @ident: Pointer to a #prelude_ident_t object. * * Destroy a #prelude_ident_t object. */ void prelude_ident_destroy(prelude_ident_t *ident) { free(ident); } libprelude-1.0.0/src/tls-util.c0000664000076400007640000001705511202225027013303 00000000000000/***** * * Copyright (C) 2004, 2005 PreludeIDS Technologies. All Rights Reserved. * Author: Yoann Vandoorselaere * * This file is part of the Prelude library. * * 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; see the file COPYING. If not, write to * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. * *****/ #include "config.h" #include #include #include #include #include #include #include #include #include #define PRELUDE_ERROR_SOURCE_DEFAULT PRELUDE_ERROR_SOURCE_CLIENT #include "prelude-error.h" #include "common.h" #include "prelude-log.h" #include "prelude-client.h" #include "tls-util.h" #ifndef HAVE_GNUTLS_X509_CRT_LIST_IMPORT #define X509_BEGIN_STR1 "-----BEGIN X509 CERTIFICATE" #define X509_BEGIN_STR2 "-----BEGIN CERTIFICATE" int _prelude_tls_crt_list_import(gnutls_x509_crt *certs, unsigned int *cmax, const gnutls_datum *indata, gnutls_x509_crt_fmt format) { int ret; size_t skiplen; gnutls_datum data; unsigned int i = 0; unsigned char *ptr; data.size = indata->size; data.data = indata->data; while ( i < *cmax || ! certs ) { skiplen = sizeof(X509_BEGIN_STR1) - 1; ptr = memmem(data.data, data.size, X509_BEGIN_STR1, skiplen); if ( ! ptr ) { skiplen = sizeof(X509_BEGIN_STR2) - 1; ptr = memmem(data.data, data.size, X509_BEGIN_STR2, skiplen); } if ( ! ptr ) break; data.data = ptr; data.size = data.size - (ptr - data.data); if ( ! certs ) i++; else { ret = gnutls_x509_crt_init(&certs[i]); if ( ret < 0 ) goto err; ret = gnutls_x509_crt_import(certs[i++], &data, format); if ( ret < 0 ) goto err; } data.data += skiplen; data.size -= skiplen; } *cmax = i; return i; err: *cmax = 0; while ( i-- >= 0 ) gnutls_x509_crt_deinit(certs[i]); return ret; } #else int _prelude_tls_crt_list_import(gnutls_x509_crt *certs, unsigned int *cmax, const gnutls_datum *indata, gnutls_x509_crt_fmt format) { return gnutls_x509_crt_list_import(certs, cmax, indata, format, GNUTLS_X509_CRT_LIST_IMPORT_FAIL_IF_EXCEED); } #endif int tls_certificates_load(gnutls_x509_privkey key, const char *certfname, gnutls_certificate_credentials cred) { int ret; size_t size; gnutls_datum certfile; unsigned int cert_max, i; gnutls_x509_crt certs[1024]; ret = _prelude_load_file(certfname, &certfile.data, &size); if ( ret < 0 ) return ret; certfile.size = (unsigned int) size; cert_max = sizeof(certs) / sizeof(*certs); ret = _prelude_tls_crt_list_import(certs, &cert_max, &certfile, GNUTLS_X509_FMT_PEM); if ( ret < 0 ) { ret = prelude_error_verbose(PRELUDE_ERROR_PROFILE, "error importing certificate listing: %s", gnutls_strerror(ret)); goto err; } for ( i = 0; i < cert_max; i++) { ret = gnutls_certificate_set_x509_key(cred, &certs[i], 1, key); gnutls_x509_crt_deinit(certs[i]); if ( ret < 0 ) { ret = prelude_error_verbose(PRELUDE_ERROR_PROFILE, "error importing certificate: %s", gnutls_strerror(ret)); break; } } err: _prelude_unload_file(certfile.data, certfile.size); return ret; } int tls_certificate_get_peer_analyzerid(gnutls_session session, uint64_t *analyzerid) { int ret; char buf[1024]; gnutls_x509_crt cert; size_t size = sizeof(buf); unsigned int cert_list_size; const gnutls_datum *cert_list; cert_list = gnutls_certificate_get_peers(session, &cert_list_size); if ( ! cert_list || cert_list_size != 1 ) return prelude_error_verbose(PRELUDE_ERROR_TLS, "invalid number of peer certificate: %d", cert_list_size); ret = gnutls_x509_crt_init(&cert); if ( ret < 0 ) return prelude_error_verbose(PRELUDE_ERROR_TLS, "%s", gnutls_strerror(ret)); ret = gnutls_x509_crt_import(cert, &cert_list[0], GNUTLS_X509_FMT_DER); if ( ret < 0) { gnutls_x509_crt_deinit(cert); return prelude_error_verbose(PRELUDE_ERROR_TLS, "error importing certificate: %s", gnutls_strerror(ret)); } size = sizeof(buf); ret = gnutls_x509_crt_get_dn_by_oid(cert, GNUTLS_OID_X520_DN_QUALIFIER, 0, 0, buf, &size); if ( ret < 0 ) { gnutls_x509_crt_deinit(cert); return prelude_error_verbose(PRELUDE_ERROR_TLS, "certificate miss DN qualifier"); } ret = sscanf(buf, "%" PRELUDE_PRIu64, analyzerid); if ( ret != 1 ) { gnutls_x509_crt_deinit(cert); return prelude_error_verbose(PRELUDE_ERROR_TLS, "certificate analyzerid '%s' is invalid", buf); } gnutls_x509_crt_deinit(cert); return 0; } int tls_certificate_get_permission(gnutls_session session, prelude_connection_permission_t *permission) { int ret, tmp; char buf[1024]; gnutls_x509_crt cert; size_t size = sizeof(buf); const gnutls_datum *data; data = gnutls_certificate_get_ours(session); if ( ! data ) return prelude_error_verbose(PRELUDE_ERROR_TLS, "could not get own certificate"); ret = gnutls_x509_crt_init(&cert); if ( ret < 0 ) return prelude_error_verbose(PRELUDE_ERROR_TLS, "error initializing certificate: %s", gnutls_strerror(ret)); ret = gnutls_x509_crt_import(cert, data, GNUTLS_X509_FMT_DER); if ( ret < 0 ) { gnutls_x509_crt_deinit(cert); return prelude_error_verbose(PRELUDE_ERROR_TLS, "error importing certificate: %s", gnutls_strerror(ret)); } ret = gnutls_x509_crt_get_dn_by_oid(cert, GNUTLS_OID_X520_COMMON_NAME, 0, 0, buf, &size); if ( ret < 0 ) { gnutls_x509_crt_deinit(cert); return prelude_error_verbose(PRELUDE_ERROR_TLS, "could not get certificate CN field: %s", gnutls_strerror(ret)); } ret = sscanf(buf, "%d", &tmp); if ( ret != 1 ) { gnutls_x509_crt_deinit(cert); return prelude_error_verbose(PRELUDE_ERROR_TLS, "certificate analyzerid value '%s' is invalid", buf); } *permission = (prelude_connection_permission_t) tmp; gnutls_x509_crt_deinit(cert); return 0; } libprelude-1.0.0/src/ntp.c0000664000076400007640000003431611202225026012325 00000000000000/* * Contents of this file are taken from NTP v 4 distribution, * files tvtots.c and tstotv.c, covered by the license below, * and slightly modified where necessary. */ /********************************************************************** * Copyright (c) David L. Mills 1992-2001 * * * * Permission to use, copy, modify, and distribute this software and * * its documentation for any purpose and without fee is hereby * * granted, provided that the above copyright notice appears in all * * copies and that both the copyright notice and this permission * * notice appear in supporting documentation, and that the name * * University of Delaware not be used in advertising or publicity * * pertaining to distribution of the software without specific, * * written prior permission. The University of Delaware makes no * * representations about the suitability this software for any * * purpose. It is provided "as is" without express or implied * * warranty. * * * ***********************************************************************/ #include "config.h" #include #include #include "prelude-inttypes.h" #include "ntp.h" /* * tvtots - tables for converting from Unix struct timeval's to * NTP time stamp format. */ /* * Tables to calculate time stamp fractions from usecs. The entries * in these tables are offset into using each of the two low order * bytes plus the next 4 bits in a usec value (from a struct timeval). * These are summed to produce the time stamp fraction. * * Note that these tables are rounded (not truncated) to the nearest * low order bit in the fraction. The timestamp computed should be * +- 1.5 low order bits. */ const unsigned long ustotslo[256] = { 0x00000000, 0x000010c7, 0x0000218e, 0x00003255, 0x0000431c, 0x000053e3, 0x000064aa, 0x00007571, 0x00008638, 0x000096ff, 0x0000a7c6, 0x0000b88d, 0x0000c954, 0x0000da1b, 0x0000eae2, 0x0000fba9, 0x00010c6f, 0x00011d36, 0x00012dfd, 0x00013ec4, 0x00014f8b, 0x00016052, 0x00017119, 0x000181e0, 0x000192a7, 0x0001a36e, 0x0001b435, 0x0001c4fc, 0x0001d5c3, 0x0001e68a, 0x0001f751, 0x00020818, 0x000218df, 0x000229a6, 0x00023a6d, 0x00024b34, 0x00025bfb, 0x00026cc2, 0x00027d89, 0x00028e50, 0x00029f17, 0x0002afde, 0x0002c0a5, 0x0002d16c, 0x0002e233, 0x0002f2fa, 0x000303c0, 0x00031487, 0x0003254e, 0x00033615, 0x000346dc, 0x000357a3, 0x0003686a, 0x00037931, 0x000389f8, 0x00039abf, 0x0003ab86, 0x0003bc4d, 0x0003cd14, 0x0003dddb, 0x0003eea2, 0x0003ff69, 0x00041030, 0x000420f7, 0x000431be, 0x00044285, 0x0004534c, 0x00046413, 0x000474da, 0x000485a1, 0x00049668, 0x0004a72f, 0x0004b7f6, 0x0004c8bd, 0x0004d984, 0x0004ea4b, 0x0004fb12, 0x00050bd8, 0x00051c9f, 0x00052d66, 0x00053e2d, 0x00054ef4, 0x00055fbb, 0x00057082, 0x00058149, 0x00059210, 0x0005a2d7, 0x0005b39e, 0x0005c465, 0x0005d52c, 0x0005e5f3, 0x0005f6ba, 0x00060781, 0x00061848, 0x0006290f, 0x000639d6, 0x00064a9d, 0x00065b64, 0x00066c2b, 0x00067cf2, 0x00068db9, 0x00069e80, 0x0006af47, 0x0006c00e, 0x0006d0d5, 0x0006e19c, 0x0006f263, 0x00070329, 0x000713f0, 0x000724b7, 0x0007357e, 0x00074645, 0x0007570c, 0x000767d3, 0x0007789a, 0x00078961, 0x00079a28, 0x0007aaef, 0x0007bbb6, 0x0007cc7d, 0x0007dd44, 0x0007ee0b, 0x0007fed2, 0x00080f99, 0x00082060, 0x00083127, 0x000841ee, 0x000852b5, 0x0008637c, 0x00087443, 0x0008850a, 0x000895d1, 0x0008a698, 0x0008b75f, 0x0008c826, 0x0008d8ed, 0x0008e9b4, 0x0008fa7b, 0x00090b41, 0x00091c08, 0x00092ccf, 0x00093d96, 0x00094e5d, 0x00095f24, 0x00096feb, 0x000980b2, 0x00099179, 0x0009a240, 0x0009b307, 0x0009c3ce, 0x0009d495, 0x0009e55c, 0x0009f623, 0x000a06ea, 0x000a17b1, 0x000a2878, 0x000a393f, 0x000a4a06, 0x000a5acd, 0x000a6b94, 0x000a7c5b, 0x000a8d22, 0x000a9de9, 0x000aaeb0, 0x000abf77, 0x000ad03e, 0x000ae105, 0x000af1cc, 0x000b0292, 0x000b1359, 0x000b2420, 0x000b34e7, 0x000b45ae, 0x000b5675, 0x000b673c, 0x000b7803, 0x000b88ca, 0x000b9991, 0x000baa58, 0x000bbb1f, 0x000bcbe6, 0x000bdcad, 0x000bed74, 0x000bfe3b, 0x000c0f02, 0x000c1fc9, 0x000c3090, 0x000c4157, 0x000c521e, 0x000c62e5, 0x000c73ac, 0x000c8473, 0x000c953a, 0x000ca601, 0x000cb6c8, 0x000cc78f, 0x000cd856, 0x000ce91d, 0x000cf9e4, 0x000d0aaa, 0x000d1b71, 0x000d2c38, 0x000d3cff, 0x000d4dc6, 0x000d5e8d, 0x000d6f54, 0x000d801b, 0x000d90e2, 0x000da1a9, 0x000db270, 0x000dc337, 0x000dd3fe, 0x000de4c5, 0x000df58c, 0x000e0653, 0x000e171a, 0x000e27e1, 0x000e38a8, 0x000e496f, 0x000e5a36, 0x000e6afd, 0x000e7bc4, 0x000e8c8b, 0x000e9d52, 0x000eae19, 0x000ebee0, 0x000ecfa7, 0x000ee06e, 0x000ef135, 0x000f01fb, 0x000f12c2, 0x000f2389, 0x000f3450, 0x000f4517, 0x000f55de, 0x000f66a5, 0x000f776c, 0x000f8833, 0x000f98fa, 0x000fa9c1, 0x000fba88, 0x000fcb4f, 0x000fdc16, 0x000fecdd, 0x000ffda4, 0x00100e6b, 0x00101f32, 0x00102ff9, 0x001040c0, 0x00105187, 0x0010624e, 0x00107315, 0x001083dc, 0x001094a3, 0x0010a56a, 0x0010b631, }; const unsigned long ustotsmid[256] = { 0x00000000, 0x0010c6f8, 0x00218def, 0x003254e7, 0x00431bde, 0x0053e2d6, 0x0064a9ce, 0x007570c5, 0x008637bd, 0x0096feb4, 0x00a7c5ac, 0x00b88ca4, 0x00c9539b, 0x00da1a93, 0x00eae18a, 0x00fba882, 0x010c6f7a, 0x011d3671, 0x012dfd69, 0x013ec460, 0x014f8b58, 0x01605250, 0x01711947, 0x0181e03f, 0x0192a736, 0x01a36e2e, 0x01b43526, 0x01c4fc1d, 0x01d5c315, 0x01e68a0c, 0x01f75104, 0x020817fc, 0x0218def3, 0x0229a5eb, 0x023a6ce3, 0x024b33da, 0x025bfad2, 0x026cc1c9, 0x027d88c1, 0x028e4fb9, 0x029f16b0, 0x02afdda8, 0x02c0a49f, 0x02d16b97, 0x02e2328f, 0x02f2f986, 0x0303c07e, 0x03148775, 0x03254e6d, 0x03361565, 0x0346dc5c, 0x0357a354, 0x03686a4b, 0x03793143, 0x0389f83b, 0x039abf32, 0x03ab862a, 0x03bc4d21, 0x03cd1419, 0x03dddb11, 0x03eea208, 0x03ff6900, 0x04102ff7, 0x0420f6ef, 0x0431bde7, 0x044284de, 0x04534bd6, 0x046412cd, 0x0474d9c5, 0x0485a0bd, 0x049667b4, 0x04a72eac, 0x04b7f5a3, 0x04c8bc9b, 0x04d98393, 0x04ea4a8a, 0x04fb1182, 0x050bd879, 0x051c9f71, 0x052d6669, 0x053e2d60, 0x054ef458, 0x055fbb4f, 0x05708247, 0x0581493f, 0x05921036, 0x05a2d72e, 0x05b39e25, 0x05c4651d, 0x05d52c15, 0x05e5f30c, 0x05f6ba04, 0x060780fb, 0x061847f3, 0x06290eeb, 0x0639d5e2, 0x064a9cda, 0x065b63d2, 0x066c2ac9, 0x067cf1c1, 0x068db8b8, 0x069e7fb0, 0x06af46a8, 0x06c00d9f, 0x06d0d497, 0x06e19b8e, 0x06f26286, 0x0703297e, 0x0713f075, 0x0724b76d, 0x07357e64, 0x0746455c, 0x07570c54, 0x0767d34b, 0x07789a43, 0x0789613a, 0x079a2832, 0x07aaef2a, 0x07bbb621, 0x07cc7d19, 0x07dd4410, 0x07ee0b08, 0x07fed200, 0x080f98f7, 0x08205fef, 0x083126e6, 0x0841edde, 0x0852b4d6, 0x08637bcd, 0x087442c5, 0x088509bc, 0x0895d0b4, 0x08a697ac, 0x08b75ea3, 0x08c8259b, 0x08d8ec92, 0x08e9b38a, 0x08fa7a82, 0x090b4179, 0x091c0871, 0x092ccf68, 0x093d9660, 0x094e5d58, 0x095f244f, 0x096feb47, 0x0980b23e, 0x09917936, 0x09a2402e, 0x09b30725, 0x09c3ce1d, 0x09d49514, 0x09e55c0c, 0x09f62304, 0x0a06e9fb, 0x0a17b0f3, 0x0a2877ea, 0x0a393ee2, 0x0a4a05da, 0x0a5accd1, 0x0a6b93c9, 0x0a7c5ac1, 0x0a8d21b8, 0x0a9de8b0, 0x0aaeafa7, 0x0abf769f, 0x0ad03d97, 0x0ae1048e, 0x0af1cb86, 0x0b02927d, 0x0b135975, 0x0b24206d, 0x0b34e764, 0x0b45ae5c, 0x0b567553, 0x0b673c4b, 0x0b780343, 0x0b88ca3a, 0x0b999132, 0x0baa5829, 0x0bbb1f21, 0x0bcbe619, 0x0bdcad10, 0x0bed7408, 0x0bfe3aff, 0x0c0f01f7, 0x0c1fc8ef, 0x0c308fe6, 0x0c4156de, 0x0c521dd5, 0x0c62e4cd, 0x0c73abc5, 0x0c8472bc, 0x0c9539b4, 0x0ca600ab, 0x0cb6c7a3, 0x0cc78e9b, 0x0cd85592, 0x0ce91c8a, 0x0cf9e381, 0x0d0aaa79, 0x0d1b7171, 0x0d2c3868, 0x0d3cff60, 0x0d4dc657, 0x0d5e8d4f, 0x0d6f5447, 0x0d801b3e, 0x0d90e236, 0x0da1a92d, 0x0db27025, 0x0dc3371d, 0x0dd3fe14, 0x0de4c50c, 0x0df58c03, 0x0e0652fb, 0x0e1719f3, 0x0e27e0ea, 0x0e38a7e2, 0x0e496ed9, 0x0e5a35d1, 0x0e6afcc9, 0x0e7bc3c0, 0x0e8c8ab8, 0x0e9d51b0, 0x0eae18a7, 0x0ebedf9f, 0x0ecfa696, 0x0ee06d8e, 0x0ef13486, 0x0f01fb7d, 0x0f12c275, 0x0f23896c, 0x0f345064, 0x0f45175c, 0x0f55de53, 0x0f66a54b, 0x0f776c42, 0x0f88333a, 0x0f98fa32, 0x0fa9c129, 0x0fba8821, 0x0fcb4f18, 0x0fdc1610, 0x0fecdd08, 0x0ffda3ff, 0x100e6af7, 0x101f31ee, 0x102ff8e6, 0x1040bfde, 0x105186d5, 0x10624dcd, 0x107314c4, 0x1083dbbc, 0x1094a2b4, 0x10a569ab, 0x10b630a3, }; const unsigned long ustotshi[16] = { 0x00000000, 0x10c6f79a, 0x218def35, 0x3254e6cf, 0x431bde6a, 0x53e2d604, 0x64a9cd9f, 0x7570c539, 0x8637bcd3, 0x96feb46e, 0xa7c5ac08, 0xb88ca3a3, 0xc9539b3d, 0xda1a92d7, 0xeae18a72, 0xfba8820c, }; /* * tstotv - tables for converting from NTP time stamps to struct timeval */ /* * Tables to convert from a time stamp fraction to usecs. Note that * the units of these tables are actually (usec<<3). We carry three * guard bits so that the result can be properly truncated (or rounded) * to be correct to the least significant bit. * * These tables are rounded. */ const long tstoushi[256] = { 0x000000, 0x007a12, 0x00f424, 0x016e36, 0x01e848, 0x02625a, 0x02dc6c, 0x03567e, 0x03d090, 0x044aa2, 0x04c4b4, 0x053ec6, 0x05b8d8, 0x0632ea, 0x06acfc, 0x07270e, 0x07a120, 0x081b32, 0x089544, 0x090f56, 0x098968, 0x0a037a, 0x0a7d8c, 0x0af79e, 0x0b71b0, 0x0bebc2, 0x0c65d4, 0x0cdfe6, 0x0d59f8, 0x0dd40a, 0x0e4e1c, 0x0ec82e, 0x0f4240, 0x0fbc52, 0x103664, 0x10b076, 0x112a88, 0x11a49a, 0x121eac, 0x1298be, 0x1312d0, 0x138ce2, 0x1406f4, 0x148106, 0x14fb18, 0x15752a, 0x15ef3c, 0x16694e, 0x16e360, 0x175d72, 0x17d784, 0x185196, 0x18cba8, 0x1945ba, 0x19bfcc, 0x1a39de, 0x1ab3f0, 0x1b2e02, 0x1ba814, 0x1c2226, 0x1c9c38, 0x1d164a, 0x1d905c, 0x1e0a6e, 0x1e8480, 0x1efe92, 0x1f78a4, 0x1ff2b6, 0x206cc8, 0x20e6da, 0x2160ec, 0x21dafe, 0x225510, 0x22cf22, 0x234934, 0x23c346, 0x243d58, 0x24b76a, 0x25317c, 0x25ab8e, 0x2625a0, 0x269fb2, 0x2719c4, 0x2793d6, 0x280de8, 0x2887fa, 0x29020c, 0x297c1e, 0x29f630, 0x2a7042, 0x2aea54, 0x2b6466, 0x2bde78, 0x2c588a, 0x2cd29c, 0x2d4cae, 0x2dc6c0, 0x2e40d2, 0x2ebae4, 0x2f34f6, 0x2faf08, 0x30291a, 0x30a32c, 0x311d3e, 0x319750, 0x321162, 0x328b74, 0x330586, 0x337f98, 0x33f9aa, 0x3473bc, 0x34edce, 0x3567e0, 0x35e1f2, 0x365c04, 0x36d616, 0x375028, 0x37ca3a, 0x38444c, 0x38be5e, 0x393870, 0x39b282, 0x3a2c94, 0x3aa6a6, 0x3b20b8, 0x3b9aca, 0x3c14dc, 0x3c8eee, 0x3d0900, 0x3d8312, 0x3dfd24, 0x3e7736, 0x3ef148, 0x3f6b5a, 0x3fe56c, 0x405f7e, 0x40d990, 0x4153a2, 0x41cdb4, 0x4247c6, 0x42c1d8, 0x433bea, 0x43b5fc, 0x44300e, 0x44aa20, 0x452432, 0x459e44, 0x461856, 0x469268, 0x470c7a, 0x47868c, 0x48009e, 0x487ab0, 0x48f4c2, 0x496ed4, 0x49e8e6, 0x4a62f8, 0x4add0a, 0x4b571c, 0x4bd12e, 0x4c4b40, 0x4cc552, 0x4d3f64, 0x4db976, 0x4e3388, 0x4ead9a, 0x4f27ac, 0x4fa1be, 0x501bd0, 0x5095e2, 0x510ff4, 0x518a06, 0x520418, 0x527e2a, 0x52f83c, 0x53724e, 0x53ec60, 0x546672, 0x54e084, 0x555a96, 0x55d4a8, 0x564eba, 0x56c8cc, 0x5742de, 0x57bcf0, 0x583702, 0x58b114, 0x592b26, 0x59a538, 0x5a1f4a, 0x5a995c, 0x5b136e, 0x5b8d80, 0x5c0792, 0x5c81a4, 0x5cfbb6, 0x5d75c8, 0x5defda, 0x5e69ec, 0x5ee3fe, 0x5f5e10, 0x5fd822, 0x605234, 0x60cc46, 0x614658, 0x61c06a, 0x623a7c, 0x62b48e, 0x632ea0, 0x63a8b2, 0x6422c4, 0x649cd6, 0x6516e8, 0x6590fa, 0x660b0c, 0x66851e, 0x66ff30, 0x677942, 0x67f354, 0x686d66, 0x68e778, 0x69618a, 0x69db9c, 0x6a55ae, 0x6acfc0, 0x6b49d2, 0x6bc3e4, 0x6c3df6, 0x6cb808, 0x6d321a, 0x6dac2c, 0x6e263e, 0x6ea050, 0x6f1a62, 0x6f9474, 0x700e86, 0x708898, 0x7102aa, 0x717cbc, 0x71f6ce, 0x7270e0, 0x72eaf2, 0x736504, 0x73df16, 0x745928, 0x74d33a, 0x754d4c, 0x75c75e, 0x764170, 0x76bb82, 0x773594, 0x77afa6, 0x7829b8, 0x78a3ca, 0x791ddc, 0x7997ee }; const long tstousmid[256] = { 0x0000, 0x007a, 0x00f4, 0x016e, 0x01e8, 0x0262, 0x02dc, 0x0356, 0x03d1, 0x044b, 0x04c5, 0x053f, 0x05b9, 0x0633, 0x06ad, 0x0727, 0x07a1, 0x081b, 0x0895, 0x090f, 0x0989, 0x0a03, 0x0a7e, 0x0af8, 0x0b72, 0x0bec, 0x0c66, 0x0ce0, 0x0d5a, 0x0dd4, 0x0e4e, 0x0ec8, 0x0f42, 0x0fbc, 0x1036, 0x10b0, 0x112b, 0x11a5, 0x121f, 0x1299, 0x1313, 0x138d, 0x1407, 0x1481, 0x14fb, 0x1575, 0x15ef, 0x1669, 0x16e3, 0x175d, 0x17d8, 0x1852, 0x18cc, 0x1946, 0x19c0, 0x1a3a, 0x1ab4, 0x1b2e, 0x1ba8, 0x1c22, 0x1c9c, 0x1d16, 0x1d90, 0x1e0a, 0x1e84, 0x1eff, 0x1f79, 0x1ff3, 0x206d, 0x20e7, 0x2161, 0x21db, 0x2255, 0x22cf, 0x2349, 0x23c3, 0x243d, 0x24b7, 0x2531, 0x25ac, 0x2626, 0x26a0, 0x271a, 0x2794, 0x280e, 0x2888, 0x2902, 0x297c, 0x29f6, 0x2a70, 0x2aea, 0x2b64, 0x2bde, 0x2c59, 0x2cd3, 0x2d4d, 0x2dc7, 0x2e41, 0x2ebb, 0x2f35, 0x2faf, 0x3029, 0x30a3, 0x311d, 0x3197, 0x3211, 0x328b, 0x3306, 0x3380, 0x33fa, 0x3474, 0x34ee, 0x3568, 0x35e2, 0x365c, 0x36d6, 0x3750, 0x37ca, 0x3844, 0x38be, 0x3938, 0x39b3, 0x3a2d, 0x3aa7, 0x3b21, 0x3b9b, 0x3c15, 0x3c8f, 0x3d09, 0x3d83, 0x3dfd, 0x3e77, 0x3ef1, 0x3f6b, 0x3fe5, 0x405f, 0x40da, 0x4154, 0x41ce, 0x4248, 0x42c2, 0x433c, 0x43b6, 0x4430, 0x44aa, 0x4524, 0x459e, 0x4618, 0x4692, 0x470c, 0x4787, 0x4801, 0x487b, 0x48f5, 0x496f, 0x49e9, 0x4a63, 0x4add, 0x4b57, 0x4bd1, 0x4c4b, 0x4cc5, 0x4d3f, 0x4db9, 0x4e34, 0x4eae, 0x4f28, 0x4fa2, 0x501c, 0x5096, 0x5110, 0x518a, 0x5204, 0x527e, 0x52f8, 0x5372, 0x53ec, 0x5466, 0x54e1, 0x555b, 0x55d5, 0x564f, 0x56c9, 0x5743, 0x57bd, 0x5837, 0x58b1, 0x592b, 0x59a5, 0x5a1f, 0x5a99, 0x5b13, 0x5b8d, 0x5c08, 0x5c82, 0x5cfc, 0x5d76, 0x5df0, 0x5e6a, 0x5ee4, 0x5f5e, 0x5fd8, 0x6052, 0x60cc, 0x6146, 0x61c0, 0x623a, 0x62b5, 0x632f, 0x63a9, 0x6423, 0x649d, 0x6517, 0x6591, 0x660b, 0x6685, 0x66ff, 0x6779, 0x67f3, 0x686d, 0x68e7, 0x6962, 0x69dc, 0x6a56, 0x6ad0, 0x6b4a, 0x6bc4, 0x6c3e, 0x6cb8, 0x6d32, 0x6dac, 0x6e26, 0x6ea0, 0x6f1a, 0x6f94, 0x700f, 0x7089, 0x7103, 0x717d, 0x71f7, 0x7271, 0x72eb, 0x7365, 0x73df, 0x7459, 0x74d3, 0x754d, 0x75c7, 0x7641, 0x76bc, 0x7736, 0x77b0, 0x782a, 0x78a4, 0x791e, 0x7998 }; const long tstouslo[128] = { 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0a, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, 0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, 0x18, 0x19, 0x1a, 0x1b, 0x1c, 0x1d, 0x1e, 0x1f, 0x1f, 0x20, 0x21, 0x22, 0x23, 0x24, 0x25, 0x26, 0x27, 0x28, 0x29, 0x2a, 0x2b, 0x2c, 0x2d, 0x2e, 0x2f, 0x30, 0x31, 0x32, 0x33, 0x33, 0x34, 0x35, 0x36, 0x37, 0x38, 0x39, 0x3a, 0x3b, 0x3c, 0x3d, 0x3e, 0x3f, 0x40, 0x41, 0x42, 0x43, 0x44, 0x45, 0x46, 0x47, 0x48, 0x48, 0x49, 0x4a, 0x4b, 0x4c, 0x4d, 0x4e, 0x4f, 0x50, 0x51, 0x52, 0x53, 0x54, 0x55, 0x56, 0x57, 0x58, 0x59, 0x5a, 0x5b, 0x5c, 0x5c, 0x5d, 0x5e, 0x5f, 0x60, 0x61, 0x62, 0x63, 0x64, 0x65, 0x66, 0x67, 0x68, 0x69, 0x6a, 0x6b, 0x6c, 0x6d, 0x6e, 0x6f, 0x70, 0x71, 0x71, 0x72, 0x73, 0x74, 0x75, 0x76, 0x77, 0x78, 0x79 }; libprelude-1.0.0/src/idmef-criteria-string.lex.l0000664000076400007640000001502511202225026016510 00000000000000/***** * * Copyright (C) 2003, 2004, 2005 PreludeIDS Technologies. All Rights Reserved. * Author: Krzysztof Zaraska * Author: Nicolas Delon * * This file is part of the Prelude library. * * 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; see the file COPYING. If not, write to * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. * *****/ %{ #include #include #include "idmef.h" #include "common.h" #include "idmef-criteria-string.yac.h" #define YY_NO_UNPUT #define YY_NO_TOP_STATE #ifndef MIN # define MIN(x, y) ((x) < (y) ? (x) : (y)) #endif int yylex(void); int yyget_lineno(void); FILE *yyget_in(void); FILE *yyget_out(void); int yyget_leng(void); char *yyget_text(void); void yyset_lineno(int line_number); void yyset_in(FILE *in_str); void yyset_out(FILE *out_str); int yyget_debug(void); void yyset_debug(int bdebug); int yylex_destroy(void); static void do_pop(void); static unsigned int inp = 0; static char *escape_str(char *str) { size_t w = 0, i = 0; int escape_next = FALSE; for ( i = 0; str[i]; i++ ) { if ( ! escape_next && str[i] == '\\' ) { escape_next = TRUE; continue; } str[w++] = str[i]; escape_next = FALSE; } str[w] = 0; return str; } %} IDMEF_PATH ([a-zA-Z0-9_\-]+(\(\-?[0-9\*]+\))?\.?)+ SQSTRING \'([^\\\']|\\.)*\' DQSTRING \"([^\\\"]|\\.)*\" BLANK [ \t\n]+ %option noyywrap %option stack %x IDMEF_VALUE %% substr { yy_push_state(IDMEF_VALUE); return TOK_RELATION_SUBSTRING; } \!substr { yy_push_state(IDMEF_VALUE); return TOK_RELATION_NOT_SUBSTRING; } substr\* { yy_push_state(IDMEF_VALUE); return TOK_RELATION_SUBSTRING_NOCASE; } \!substr\* { yy_push_state(IDMEF_VALUE); return TOK_RELATION_NOT_SUBSTRING_NOCASE; } {IDMEF_PATH} { yylval.str = strdup(yytext); return TOK_IDMEF_PATH; } \<\> { yy_push_state(IDMEF_VALUE); return TOK_RELATION_SUBSTRING; } \<\>\* { yy_push_state(IDMEF_VALUE); return TOK_RELATION_SUBSTRING_NOCASE; } \!\<\> { yy_push_state(IDMEF_VALUE); return TOK_RELATION_NOT_SUBSTRING; } \!\<\>\* { yy_push_state(IDMEF_VALUE); return TOK_RELATION_NOT_SUBSTRING_NOCASE; } \> { yy_push_state(IDMEF_VALUE); return TOK_RELATION_GREATER; } \>\= { yy_push_state(IDMEF_VALUE); return TOK_RELATION_GREATER_OR_EQUAL; } \< { yy_push_state(IDMEF_VALUE); return TOK_RELATION_LESS; } \<\= { yy_push_state(IDMEF_VALUE); return TOK_RELATION_LESS_OR_EQUAL; } \~ { yy_push_state(IDMEF_VALUE); return TOK_RELATION_REGEXP; } \~\* { yy_push_state(IDMEF_VALUE); return TOK_RELATION_REGEXP_NOCASE; } \!\~ { yy_push_state(IDMEF_VALUE); return TOK_RELATION_NOT_REGEXP; } \!\~\* { yy_push_state(IDMEF_VALUE); return TOK_RELATION_NOT_REGEXP_NOCASE; } \=\= { yy_push_state(IDMEF_VALUE); return TOK_RELATION_EQUAL; } \= { yy_push_state(IDMEF_VALUE); return TOK_RELATION_EQUAL; } \=\* { yy_push_state(IDMEF_VALUE); return TOK_RELATION_EQUAL_NOCASE; } \!\= { yy_push_state(IDMEF_VALUE); return TOK_RELATION_NOT_EQUAL; } \!\=\* { yy_push_state(IDMEF_VALUE); return TOK_RELATION_NOT_EQUAL_NOCASE; } \! { return TOK_NOT; } \&\& { return TOK_OPERATOR_AND; } \& { return TOK_OPERATOR_AND; } \|\| { return TOK_OPERATOR_OR; } \| { return TOK_OPERATOR_OR; } \( { return '('; } \) { return ')'; } {SQSTRING} { yylval.str = escape_str(strndup(yytext + 1, yyleng - 2)); if ( ! inp ) yy_pop_state(); return TOK_IDMEF_VALUE; } {DQSTRING} { yylval.str = escape_str(strndup(yytext + 1, yyleng - 2)); if ( ! inp ) yy_pop_state(); return TOK_IDMEF_VALUE; } [^ \t\(\)\&\|]+ { yylval.str = escape_str(strdup(yytext)); if ( ! inp ) yy_pop_state(); return TOK_IDMEF_VALUE; } {BLANK} { /* nop */; } \( { inp++; return '('; } \) { do_pop(); return ')'; } \&\& { return TOK_OPERATOR_AND; } \& { return TOK_OPERATOR_AND; } \|\| { return TOK_OPERATOR_OR; } \| { return TOK_OPERATOR_OR; } . { /* invalid token */ return TOK_ERROR; } {BLANK} { /* nop */; } . { /* invalid token */ yylval.str = strdup(yytext); return TOK_ERROR; } %% static void do_pop(void) { if ( --inp == 0 ) yy_pop_state(); } void _idmef_criteria_string_init_lexer(void); void _idmef_criteria_string_init_lexer(void) { inp = 0; BEGIN INITIAL; } libprelude-1.0.0/src/prelude-string.c0000664000076400007640000006574011333015725014505 00000000000000/***** * * Copyright (C) 2004-2005,2006,2007 PreludeIDS Technologies. All Rights Reserved. * Author: Yoann Vandoorselaere * * This file is part of the Prelude library. * * 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; see the file COPYING. If not, write to * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. * *****/ /* * This code include an heavily modified version of the prelude-strbuf * API made by Krzysztof Zaraska, that is now part of prelude-string. */ #include "config.h" #include "libmissing.h" #include #include #include #include #include #include "common.h" #include "prelude-log.h" #include "prelude-inttypes.h" #include "prelude-string.h" #define PRELUDE_ERROR_SOURCE_DEFAULT PRELUDE_ERROR_SOURCE_STRING #include "prelude-error.h" #define CHUNK_SIZE 1024 /* * String structure may be free'd */ #define PRELUDE_STRING_OWN_STRUCTURE 0x1 /* * String data may be free'd */ #define PRELUDE_STRING_OWN_DATA 0x2 /* * Whether we can reallocate this string */ #define PRELUDE_STRING_CAN_REALLOC 0x4 #if ! defined (PRELUDE_VA_COPY) # if defined (__GNUC__) && defined (__PPC__) && (defined (_CALL_SYSV) || defined (_WIN32)) # define PRELUDE_VA_COPY(ap1, ap2) (*(ap1) = *(ap2)) # elif defined (PRELUDE_VA_COPY_AS_ARRAY) # define PRELUDE_VA_COPY(ap1, ap2) memmove ((ap1), (ap2), sizeof(va_list)) # else /* va_list is a pointer */ # define PRELUDE_VA_COPY(ap1, ap2) ((ap1) = (ap2)) # endif #endif #define STRING_RETURN_IF_INVALID(str, len) do { \ prelude_return_val_if_fail((len + 1) > len, \ prelude_error_verbose(PRELUDE_ERROR_INVAL_LENGTH, \ "string length warning: wrap around would occur")); \ \ prelude_return_val_if_fail(str[len] == 0, \ prelude_error_verbose(PRELUDE_ERROR_STRING_NOT_NULL_TERMINATED, \ "string warning: not nul terminated")); \ } while(0) static int string_buf_alloc(prelude_string_t *string, size_t len) { /* * include room for terminating \0. */ string->data.rwbuf = malloc(len + 1); if ( ! string->data.rwbuf ) return prelude_error_from_errno(errno); string->index = len; string->size = len + 1; return 0; } static void string_buf_copy(prelude_string_t *string, const char *buf, size_t len) { assert(len < string->size); memcpy(string->data.rwbuf, buf, len); string->data.rwbuf[len] = '\0'; } static int allocate_more_chunk_if_needed(prelude_string_t *s, size_t needed_len) { char *ptr; size_t len; if ( needed_len ) len = MAX(needed_len - (s->size - s->index), CHUNK_SIZE); else len = CHUNK_SIZE; if ( s->size + len < s->size ) return prelude_error(PRELUDE_ERROR_INVAL_LENGTH); if ( s->flags & PRELUDE_STRING_CAN_REALLOC ) { ptr = _prelude_realloc(s->data.rwbuf, s->size + len); if ( ! ptr ) return prelude_error_from_errno(errno); } else { ptr = malloc(s->size + len); if ( ! ptr ) return prelude_error_from_errno(errno); if ( s->data.robuf ) memcpy(ptr, s->data.robuf, s->index + 1); s->flags |= PRELUDE_STRING_CAN_REALLOC|PRELUDE_STRING_OWN_DATA; } s->size += len; s->data.rwbuf = ptr; return 0; } /** * prelude_string_new: * @string: Pointer where to store the created #prelude_string_t. * * Create a new #prelude_string_t object, and store in in @string. * * Returns: 0 on success, or a negative value if an error occured. */ int prelude_string_new(prelude_string_t **string) { *string = calloc(1, sizeof(**string)); if ( ! *string ) return prelude_error_from_errno(errno); (*string)->refcount = 1; prelude_list_init(&(*string)->list); (*string)->flags = PRELUDE_STRING_OWN_STRUCTURE; return 0; } /** * prelude_string_ref: * @string: Pointer to a #prelude_string_t object to reference. * * Increase @string reference count. * * Returns: @string. */ prelude_string_t *prelude_string_ref(prelude_string_t *string) { prelude_return_val_if_fail(string, NULL); string->refcount++; return string; } /** * prelude_string_new_dup_fast: * @string: Pointer where to store the created #prelude_string_t object. * @str: Initial string value. * @len: Lenght of @str. * * Create a new #prelude_string_t object with a copy of @str as it's * initial value. The copy is owned by the @string and will be freed * upon prelude_string_destroy(). * * Returns: 0 on success, a negative value if an error occured. */ int prelude_string_new_dup_fast(prelude_string_t **string, const char *str, size_t len) { int ret; prelude_return_val_if_fail(str, prelude_error(PRELUDE_ERROR_ASSERTION)); STRING_RETURN_IF_INVALID(str, len); ret = prelude_string_new(string); if ( ret < 0 ) return ret; ret = string_buf_alloc(*string, len); if ( ret < 0 ) return ret; string_buf_copy(*string, str, len); (*string)->flags |= PRELUDE_STRING_OWN_DATA|PRELUDE_STRING_CAN_REALLOC; return 0; } /** * prelude_string_new_dup: * @string: Pointer where to store the created #prelude_string_t object. * @str: Initial string value. * * Create a new #prelude_string_t object with a copy of @str as it's * initial value. The copy is owned by the @string and will be freed * upon prelude_string_destroy(). * * Returns: 0 on success, a negative value if an error occured. */ int prelude_string_new_dup(prelude_string_t **string, const char *str) { prelude_return_val_if_fail(str, prelude_error(PRELUDE_ERROR_ASSERTION)); return prelude_string_new_dup_fast(string, str, strlen(str)); } /** * prelude_string_new_nodup_fast: * @string: Pointer where to store the created #prelude_string_t object. * @str: Initial string value. * @len: Lenght of @str. * * Create a new #prelude_string_t object with a reference to @str as * initial value. @str is owned by @string and will be freed upon * prelude_string_destroy(). * * Returns: 0 on success, a negative value if an error occured. */ int prelude_string_new_nodup_fast(prelude_string_t **string, char *str, size_t len) { int ret; prelude_return_val_if_fail(str, prelude_error(PRELUDE_ERROR_ASSERTION)); STRING_RETURN_IF_INVALID(str, len); ret = prelude_string_new(string); if ( ret < 0 ) return ret; (*string)->index = len; (*string)->size = len + 1; (*string)->data.rwbuf = str; (*string)->flags |= PRELUDE_STRING_OWN_DATA|PRELUDE_STRING_CAN_REALLOC; return 0; } /** * prelude_string_new_nodup: * @string: Pointer where to store the created #prelude_string_t object. * @str: Initial string value. * * Create a new #prelude_string_t object with a reference to @str as * initial value. @str is owned by @string and will be freed upon * prelude_string_destroy(). * * Returns: 0 on success, a negative value if an error occured. */ int prelude_string_new_nodup(prelude_string_t **string, char *str) { prelude_return_val_if_fail(str, prelude_error(PRELUDE_ERROR_ASSERTION)); return prelude_string_new_nodup_fast(string, str, strlen(str)); } /** * prelude_string_new_ref_fast: * @string: Pointer where to store the created #prelude_string_t object. * @str: Initial string value. * @len: Length of @str. * * Create a new #prelude_string_t object with a reference to @str as * initial value. @str won't be freed upon prelude_string_destroy(). * * Returns: 0 on success, a negative value if an error occured. */ int prelude_string_new_ref_fast(prelude_string_t **string, const char *buf, size_t len) { int ret; prelude_return_val_if_fail(buf, prelude_error(PRELUDE_ERROR_ASSERTION)); STRING_RETURN_IF_INVALID(buf, len); ret = prelude_string_new(string); if ( ret < 0 ) return ret; (*string)->index = len; (*string)->size = len + 1; (*string)->data.robuf = buf; return 0; } /** * prelude_string_new_ref: * @string: Pointer where to store the created #prelude_string_t object. * @str: Initial string value. * * Create a new #prelude_string_t object with a reference to @str as * initial value. @str won't be freed upon prelude_string_destroy(). * * Returns: 0 on success, a negative value if an error occured. */ int prelude_string_new_ref(prelude_string_t **string, const char *str) { prelude_return_val_if_fail(str, prelude_error(PRELUDE_ERROR_ASSERTION)); return prelude_string_new_ref_fast(string, str, strlen(str)); } /** * prelude_string_set_dup_fast: * @string: Pointer to a #prelude_string_t object. * @buf: String to store in @string. * @len: Lenght of @buf. * * Store a copy of the string pointed by @buf in @string. * The @buf copy will be freed upon prelude_string_destroy(). * * Returns: 0 on success, or a negative value if an error occured. */ int prelude_string_set_dup_fast(prelude_string_t *string, const char *buf, size_t len) { int ret; prelude_return_val_if_fail(string, prelude_error(PRELUDE_ERROR_ASSERTION)); prelude_return_val_if_fail(buf, prelude_error(PRELUDE_ERROR_ASSERTION)); STRING_RETURN_IF_INVALID(buf, len); prelude_string_destroy_internal(string); ret = string_buf_alloc(string, len); if ( ret < 0 ) return ret; string_buf_copy(string, buf, len); string->flags |= PRELUDE_STRING_OWN_DATA|PRELUDE_STRING_CAN_REALLOC; return 0; } /** * prelude_string_set_dup: * @string: Pointer to a #prelude_string_t object. * @buf: String to store in @string. * * Store a copy of the string pointed by @buf in @string. * The @buf copy will be freed upon prelude_string_destroy(). * * Returns: 0 on success, or a negative value if an error occured. */ int prelude_string_set_dup(prelude_string_t *string, const char *buf) { prelude_return_val_if_fail(string, prelude_error(PRELUDE_ERROR_ASSERTION)); prelude_return_val_if_fail(buf, prelude_error(PRELUDE_ERROR_ASSERTION)); return prelude_string_set_dup_fast(string, buf, strlen(buf)); } /** * prelude_string_set_nodup_fast: * @string: Pointer to a #prelude_string_t object. * @buf: String to store in @string. * @len: Lenght of @buf. * * Store a reference to the string pointed by @buf in @string. * The referenced @buf will be freed upon prelude_string_destroy(). * * Returns: 0 on success, or a negative value if an error occured. */ int prelude_string_set_nodup_fast(prelude_string_t *string, char *buf, size_t len) { prelude_return_val_if_fail(string, prelude_error(PRELUDE_ERROR_ASSERTION)); prelude_return_val_if_fail(buf, prelude_error(PRELUDE_ERROR_ASSERTION)); STRING_RETURN_IF_INVALID(buf, len); prelude_string_destroy_internal(string); string->index = len; string->size = len + 1; string->data.rwbuf = buf; string->flags |= PRELUDE_STRING_OWN_DATA|PRELUDE_STRING_CAN_REALLOC; return 0; } /** * prelude_string_set_nodup: * @string: Pointer to a #prelude_string_t object. * @buf: String to store in @string. * * Store a reference to the string pointed by @buf in @string. * The referenced @buf will be freed upon prelude_string_destroy(). * * Returns: 0 on success, or a negative value if an error occured. */ int prelude_string_set_nodup(prelude_string_t *string, char *buf) { prelude_return_val_if_fail(string, prelude_error(PRELUDE_ERROR_ASSERTION)); prelude_return_val_if_fail(buf, prelude_error(PRELUDE_ERROR_ASSERTION)); return prelude_string_set_nodup_fast(string, buf, strlen(buf)); } /** * prelude_string_set_ref_fast: * @string: Pointer to a #prelude_string_t object. * @buf: String to store in @string. * @len: Lenght of @buf. * * Store a reference to the string pointed by @buf in @string. * The referenced @buf value won't be modified or freed. * * Returns: 0 on success, or a negative value if an error occured. */ int prelude_string_set_ref_fast(prelude_string_t *string, const char *buf, size_t len) { prelude_return_val_if_fail(string, prelude_error(PRELUDE_ERROR_ASSERTION)); prelude_return_val_if_fail(buf, prelude_error(PRELUDE_ERROR_ASSERTION)); STRING_RETURN_IF_INVALID(buf, len); prelude_string_destroy_internal(string); string->index = len; string->size = len + 1; string->data.robuf = buf; string->flags &= ~(PRELUDE_STRING_OWN_DATA|PRELUDE_STRING_CAN_REALLOC); return 0; } /** * prelude_string_set_ref: * @string: Pointer to a #prelude_string_t object. * @buf: String to store in @string. * * Store a reference to the string pointed by @buf in @string. * The referenced @buf value won't be modified or freed. * * Returns: 0 on success, or a negative value if an error occured. */ int prelude_string_set_ref(prelude_string_t *string, const char *buf) { prelude_return_val_if_fail(string, prelude_error(PRELUDE_ERROR_ASSERTION)); prelude_return_val_if_fail(buf, prelude_error(PRELUDE_ERROR_ASSERTION)); return prelude_string_set_ref_fast(string, buf, strlen(buf)); } /** * prelude_string_copy_ref: * @src: Pointer to a #prelude_string_t object to copy data from. * @dst: Pointer to a #prelude_string_t object to copy data to. * * Reference @src content within @dst. * The referenced content won't be modified or freed. * * Returns: 0 on success, or a negative value if an error occured. */ int prelude_string_copy_ref(const prelude_string_t *src, prelude_string_t *dst) { prelude_return_val_if_fail(src, prelude_error(PRELUDE_ERROR_ASSERTION)); prelude_return_val_if_fail(dst, prelude_error(PRELUDE_ERROR_ASSERTION)); prelude_string_destroy_internal(dst); dst->size = src->size; dst->index = src->index; dst->data.robuf = src->data.robuf; dst->flags &= ~(PRELUDE_STRING_OWN_DATA|PRELUDE_STRING_CAN_REALLOC); return 0; } /** * prelude_string_copy_dup: * @src: Pointer to a #prelude_string_t object to copy data from. * @dst: Pointer to a #prelude_string_t object to copy data to. * * Copy @src content within @dst. * The content is owned by @src and independent of @dst. * * Returns: 0 on success, or a negative value if an error occured. */ int prelude_string_copy_dup(const prelude_string_t *src, prelude_string_t *dst) { prelude_return_val_if_fail(src, prelude_error(PRELUDE_ERROR_ASSERTION)); prelude_return_val_if_fail(dst, prelude_error(PRELUDE_ERROR_ASSERTION)); prelude_string_destroy_internal(dst); dst->size = src->size; dst->index = src->index; dst->flags |= PRELUDE_STRING_OWN_DATA|PRELUDE_STRING_CAN_REALLOC; if ( src->size ) { dst->data.rwbuf = malloc(src->size); if ( ! dst->data.rwbuf ) return prelude_error_from_errno(errno); string_buf_copy(dst, src->data.robuf, src->index); } return 0; } /** * prelude_string_clone: * @src: Pointer to an existing #prelude_string_t object. * @dst: Pointer to an address where to store the created #prelude_string_t object. * * Clone @src within a new #prelude_string_t object stored into @dst. * Data carried by @dst and @src are independant. * * Returns: 0 on success, or a negative value if an error occured. */ int prelude_string_clone(const prelude_string_t *src, prelude_string_t **dst) { int ret; prelude_return_val_if_fail(src, prelude_error(PRELUDE_ERROR_ASSERTION)); ret = prelude_string_new(dst); if ( ret < 0 ) return ret; (*dst)->size = src->size; (*dst)->index = src->index; (*dst)->flags |= PRELUDE_STRING_OWN_DATA|PRELUDE_STRING_CAN_REALLOC; if ( src->size ) { (*dst)->data.rwbuf = malloc(src->size); if ( ! (*dst)->data.rwbuf ) { prelude_string_destroy(*dst); return prelude_error_from_errno(errno); } string_buf_copy(*dst, src->data.robuf, src->index); } return 0; } /** * prelude_string_get_len: * @string: Pointer to a #prelude_string_t object. * * Return the length of the string carried by @string object. * * Returns: The length of the string owned by @string. */ size_t prelude_string_get_len(const prelude_string_t *string) { prelude_return_val_if_fail(string, 0); return string->index; } /** * prelude_string_get_string_or_default: * @string: Pointer to a #prelude_string_t object. * @def: Default value to a return in case @string is empty. * * Return the string carried on by @string object, or @def if it is empty. * There should be no operation done on the returned string since it is still * owned by @string. * * Returns: The string owned by @string or @def. */ const char *prelude_string_get_string_or_default(const prelude_string_t *string, const char *def) { prelude_return_val_if_fail(string, NULL); return string->data.robuf ? string->data.robuf : def; } /** * prelude_string_get_string: * @string: Pointer to a #prelude_string_t object. * * Return the string carried on by @string object. * There should be no operation done on the returned string since * it is still owned by @string. * * Returns: The string owned by @string if any. */ const char *prelude_string_get_string(const prelude_string_t *string) { prelude_return_val_if_fail(string, NULL); return string->data.robuf; } /** * prelude_string_get_string_released: * @string: Pointer to a #prelude_string_t object. * @outptr: Pointer to an address where to store the released string. * * Get @string content, and release it so that further operation on * @string won't modify the returned content. * * Returns: 0 on success, or a negative value if an error occured. */ int prelude_string_get_string_released(prelude_string_t *string, char **outptr) { prelude_return_val_if_fail(string, prelude_error(PRELUDE_ERROR_ASSERTION)); *outptr = NULL; if ( ! string->index ) return 0; if ( ! (string->flags & PRELUDE_STRING_CAN_REALLOC) ) { *outptr = strdup(string->data.robuf); return (*outptr) ? 0 : prelude_error_from_errno(errno); } if ( string->index + 1 <= string->index ) return prelude_error(PRELUDE_ERROR_INVAL_LENGTH); *outptr = _prelude_realloc(string->data.rwbuf, string->index + 1); if ( ! *outptr ) return prelude_error_from_errno(errno); string->size = 0; string->index = 0; string->data.rwbuf = NULL; return 0; } /** * prelude_string_is_empty: * @string: Pointer to a #prelude_string_t object. * * Check whether @string is empty. * * Returns: TRUE if @string is empty, FALSE otherwise. */ prelude_bool_t prelude_string_is_empty(const prelude_string_t *string) { prelude_return_val_if_fail(string, TRUE); return (string->index == 0) ? TRUE : FALSE; } /* * This function cannot be declared static because its invoked * from idmef-tree-wrap.c */ void prelude_string_destroy_internal(prelude_string_t *string) { prelude_return_if_fail(string); if ( (string->flags & PRELUDE_STRING_OWN_DATA) && string->data.rwbuf ) free(string->data.rwbuf); string->data.rwbuf = NULL; string->index = string->size = 0; /* * free() should be done by the caller */ } /** * prelude_string_destroy: * @string: Pointer to a #prelude_string_t object. * * Decrease refcount and destroy @string. * @string content content is destroyed if applicable (dup and nodup, * or a referenced string that have been modified. */ void prelude_string_destroy(prelude_string_t *string) { prelude_return_if_fail(string); if ( --string->refcount ) return; if ( ! prelude_list_is_empty(&string->list) ) prelude_list_del_init(&string->list); prelude_string_destroy_internal(string); if ( string->flags & PRELUDE_STRING_OWN_STRUCTURE ) free(string); } /** * prelude_string_vprintf: * @string: Pointer to a #prelude_string_t object. * @fmt: Format string to use. * @ap: Variable argument list. * * Produce output according to @fmt, storing argument provided in @ap * variable argument list, and write the output to the given @string. * See sprintf(3) for more information on @fmt format. * * Returns: The number of characters written, or a negative value if an error occured. */ int prelude_string_vprintf(prelude_string_t *string, const char *fmt, va_list ap) { int ret; va_list bkp; prelude_return_val_if_fail(string, prelude_error(PRELUDE_ERROR_ASSERTION)); prelude_return_val_if_fail(fmt, prelude_error(PRELUDE_ERROR_ASSERTION)); if ( ! (string->flags & PRELUDE_STRING_CAN_REALLOC) ) { ret = allocate_more_chunk_if_needed(string, 0); if ( ret < 0 ) return ret; } PRELUDE_VA_COPY(bkp, ap); ret = vsnprintf(string->data.rwbuf + string->index, string->size - string->index, fmt, ap); /* * From sprintf(3) on GNU/Linux: * * snprintf and vsnprintf do not write more than * size bytes (including the trailing '\0'), and return -1 if * the output was truncated due to this limit. (Thus until * glibc 2.0.6. Since glibc 2.1 these functions follow the * C99 standard and return the number of characters (exclud- * ing the trailing '\0') which would have been written to * the final string if enough space had been available.) */ if ( ret >= 0 && (size_t) ret < string->size - string->index ) { string->index += ret; goto end; } ret = allocate_more_chunk_if_needed(string, (ret < 0) ? 0 : ret + 1); if ( ret < 0 ) goto end; ret = prelude_string_vprintf(string, fmt, bkp); end: va_end(bkp); return ret; } /** * prelude_string_sprintf: * @string: Pointer to a #prelude_string_t object. * @fmt: Format string to use. * @...: Variable argument list. * * Produce output according to @fmt, and write output to the given * @string. See snprintf(3) to learn more about @fmt format. * * Returns: The number of characters written, or a negative value if an error occured. */ int prelude_string_sprintf(prelude_string_t *string, const char *fmt, ...) { int ret; va_list ap; prelude_return_val_if_fail(string, prelude_error(PRELUDE_ERROR_ASSERTION)); prelude_return_val_if_fail(fmt, prelude_error(PRELUDE_ERROR_ASSERTION)); va_start(ap, fmt); ret = prelude_string_vprintf(string, fmt, ap); va_end(ap); return ret; } /** * prelude_string_cat: * @dst: Pointer to a #prelude_string_t object. * @str: Pointer to a string. * @len: Length of @str to copy. * * The prelude_string_ncat() function appends @len characters from @str to * the @dst #prelude_string_t object over-writing the `\0' character at the * end of @dst, and then adds a termi-nating `\0' character. * * Returns: @len, or a negative value if an error occured. */ int prelude_string_ncat(prelude_string_t *dst, const char *str, size_t len) { int ret; prelude_return_val_if_fail(dst, prelude_error(PRELUDE_ERROR_ASSERTION)); prelude_return_val_if_fail(str, prelude_error(PRELUDE_ERROR_ASSERTION)); if ( dst->flags & PRELUDE_STRING_CAN_REALLOC && len < (dst->size - dst->index) ) { memcpy(dst->data.rwbuf + dst->index, str, len); dst->index += len; dst->data.rwbuf[dst->index] = '\0'; return len; } if ( len + 1 < len ) return prelude_error(PRELUDE_ERROR_INVAL_LENGTH); ret = allocate_more_chunk_if_needed(dst, len + 1); if ( ret < 0 ) return ret; return prelude_string_ncat(dst, str, len); } /** * prelude_string_cat: * @dst: Pointer to a #prelude_string_t object. * @str: Pointer to a string. * * The prelude_string_cat() function appends the @str string to the @dst * prelude_string_t object over-writing the `\0' character at the end of * @dst, and then adds a termi-nating `\0' character. * * Returns: @len, or a negative value if an error occured. */ int prelude_string_cat(prelude_string_t *dst, const char *str) { prelude_return_val_if_fail(dst, prelude_error(PRELUDE_ERROR_ASSERTION)); prelude_return_val_if_fail(str, prelude_error(PRELUDE_ERROR_ASSERTION)); return prelude_string_ncat(dst, str, strlen(str)); } /** * prelude_string_clear: * @string: Pointer to a #prelude_string_t object. * * Reset @string content to zero. */ void prelude_string_clear(prelude_string_t *string) { prelude_return_if_fail(string); string->index = 0; if ( string->data.rwbuf && string->flags & PRELUDE_STRING_OWN_DATA ) *(string->data.rwbuf) = '\0'; else string->data.rwbuf = NULL; } /** * prelude_string_compare: * @str1: Pointer to a #prelude_string_t object to compare with @str2. * @str2: Pointer to a #prelude_string_t object to compare with @str1. * * Returns: 0 if @str1 and @str2 value are equal, a negative value otherwise. */ int prelude_string_compare(const prelude_string_t *str1, const prelude_string_t *str2) { if ( ! str1 && ! str2 ) return 0; else if ( ! str1 || ! str2 ) return -1; else if ( str1->index != str2->index ) return -1; if ( str1->index == 0 ) return 0; return strcmp(str1->data.robuf, str2->data.robuf); } libprelude-1.0.0/src/prelude-io.c0000664000076400007640000006034711325615276013614 00000000000000/***** * * Copyright (C) 2001-2005,2006,2007 PreludeIDS Technologies. All Rights Reserved. * Author: Yoann Vandoorselaere * * This file is part of the Prelude library. * * 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; see the file COPYING. If not, write to * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. * *****/ #include "config.h" #include "libmissing.h" #include #include #include #include #include #include #include #include #include #include "prelude-inttypes.h" #ifdef HAVE_SYS_FILIO_H # include #endif #include "prelude-log.h" #include "prelude-io.h" #include "common.h" #define PRELUDE_ERROR_SOURCE_DEFAULT PRELUDE_ERROR_SOURCE_IO #include "prelude-error.h" #define CHUNK_SIZE 1024 #ifndef MIN # define MIN(x, y) ((x) < (y) ? (x) : (y)) #endif struct prelude_io { int fd; void *fd_ptr; size_t size; size_t rindex; int (*close)(prelude_io_t *pio); ssize_t (*read)(prelude_io_t *pio, void *buf, size_t count); ssize_t (*write)(prelude_io_t *pio, const void *buf, size_t count); ssize_t (*pending)(prelude_io_t *pio); }; /* * Buffer IO functions. */ static ssize_t buffer_read(prelude_io_t *pio, void *buf, size_t count) { if ( pio->size - pio->rindex == 0 ) return 0; count = MIN(count, pio->size - pio->rindex); memcpy(buf, (unsigned char *) pio->fd_ptr + pio->rindex, count); pio->rindex += count; return count; } static ssize_t buffer_write(prelude_io_t *pio, const void *buf, size_t count) { unsigned char *new; if ( pio->size + count <= pio->size ) return -1; new = _prelude_realloc(pio->fd_ptr, pio->size + count); if ( ! new ) return prelude_error_from_errno(errno); memcpy(new + pio->size, buf, count); pio->fd_ptr = new; pio->size += count; return count; } static int buffer_close(prelude_io_t *pio) { if ( pio->fd_ptr ) { free(pio->fd_ptr); pio->fd_ptr = NULL; pio->size = pio->rindex = 0; } return 0; } static ssize_t buffer_pending(prelude_io_t *pio) { return pio->size - pio->rindex; } /* * System IO functions. */ static ssize_t sys_read(prelude_io_t *pio, void *buf, size_t count) { ssize_t ret; do { ret = read(pio->fd, buf, count); } while ( ret < 0 && errno == EINTR ); if ( ret == 0 ) return prelude_error(PRELUDE_ERROR_EOF); if ( ret < 0 ) { #ifdef ECONNRESET if ( errno == ECONNRESET ) return prelude_error(PRELUDE_ERROR_EOF); #endif return prelude_error_from_errno(errno); } return ret; } static ssize_t sys_write(prelude_io_t *pio, const void *buf, size_t count) { ssize_t ret; do { ret = write(pio->fd, buf, count); } while ( ret < 0 && errno == EINTR ); if ( ret < 0 ) return prelude_error_from_errno(errno); return ret; } static int sys_close(prelude_io_t *pio) { int ret; do { ret = close(pio->fd); } while ( ret < 0 && errno == EINTR ); return (ret >= 0) ? ret : prelude_error_from_errno(errno); } static ssize_t sys_pending(prelude_io_t *pio) { long ret = 0; if ( ioctl(pio->fd, FIONREAD, &ret) < 0 ) return prelude_error_from_errno(errno); return ret; } /* * Buffered IO functions. */ static ssize_t file_read(prelude_io_t *pio, void *buf, size_t count) { FILE *fd; size_t ret; /* * ferror / clearerror can be macro that might dereference fd_ptr. */ fd = pio->fd_ptr; prelude_return_val_if_fail(fd, prelude_error(PRELUDE_ERROR_ASSERTION)); ret = fread(buf, count, 1, fd); if ( ret <= 0 ) { ret = ferror(fd) ? prelude_error_from_errno(errno) : prelude_error(PRELUDE_ERROR_EOF); clearerr(fd); return ret; } /* * fread return the number of *item* read. */ return count; } static ssize_t file_write(prelude_io_t *pio, const void *buf, size_t count) { size_t ret; prelude_return_val_if_fail(pio->fd_ptr, prelude_error(PRELUDE_ERROR_ASSERTION)); ret = fwrite(buf, count, 1, pio->fd_ptr); if ( ret <= 0 ) return ret; /* * fwrite return the number of *item* written. */ return count; } static int file_close(prelude_io_t *pio) { prelude_return_val_if_fail(pio->fd_ptr, prelude_error(PRELUDE_ERROR_ASSERTION)); return fclose(pio->fd_ptr); } static ssize_t file_pending(prelude_io_t *pio) { #ifdef ENOTSUP return prelude_error_from_errno(ENOTSUP); #else return prelude_error(PRELUDE_ERROR_GENERIC); #endif } /* * TLS IO functions */ static int tls_check_error(prelude_io_t *pio, int error) { int ret = 0; const char *alert; switch(error) { case GNUTLS_E_AGAIN: ret = prelude_error(PRELUDE_ERROR_EAGAIN); break; case GNUTLS_E_WARNING_ALERT_RECEIVED: alert = gnutls_alert_get_name(gnutls_alert_get(pio->fd_ptr)); ret = prelude_error_verbose(PRELUDE_ERROR_TLS_WARNING_ALERT, "TLS warning alert from peer: %s", alert); break; case GNUTLS_E_FATAL_ALERT_RECEIVED: alert = gnutls_alert_get_name(gnutls_alert_get(pio->fd_ptr)); ret = prelude_error_verbose(PRELUDE_ERROR_TLS_FATAL_ALERT, "TLS fatal alert from peer: %s", alert); break; case GNUTLS_E_PUSH_ERROR: case GNUTLS_E_PULL_ERROR: case GNUTLS_E_UNEXPECTED_PACKET_LENGTH: ret = prelude_error(PRELUDE_ERROR_EOF); break; default: ret = prelude_error_verbose(PRELUDE_ERROR_TLS, "TLS: %s", gnutls_strerror(error)); } /* * If the error is fatal, deinitialize the session and revert * to system IO. The caller is then expected to call prelude_io_close() * again until it return 0. * * If it's non fatal, simply return the error. The caller is supposed * to resume the prelude_io_close() call still. */ if ( gnutls_error_is_fatal(error) ) { gnutls_deinit(pio->fd_ptr); prelude_io_set_sys_io(pio, pio->fd); } return ret; } static ssize_t tls_read(prelude_io_t *pio, void *buf, size_t count) { ssize_t ret; do { ret = gnutls_record_recv(pio->fd_ptr, buf, count); } while ( ret < 0 && ret == GNUTLS_E_INTERRUPTED ); if ( ret < 0 ) return tls_check_error(pio, ret); if ( ret == 0 ) return prelude_error(PRELUDE_ERROR_EOF); return ret; } static ssize_t tls_write(prelude_io_t *pio, const void *buf, size_t count) { ssize_t ret; do { ret = gnutls_record_send(pio->fd_ptr, buf, count); } while ( ret < 0 && ret == GNUTLS_E_INTERRUPTED ); if ( ret < 0 ) return tls_check_error(pio, ret); return ret; } static int tls_close(prelude_io_t *pio) { int ret; do { ret = gnutls_bye(pio->fd_ptr, GNUTLS_SHUT_RDWR); } while ( ret < 0 && ret == GNUTLS_E_INTERRUPTED ); if ( ret < 0 ) { ret = tls_check_error(pio, ret); if ( prelude_io_is_error_fatal(pio, ret) ) sys_close(pio); return ret; } gnutls_deinit(pio->fd_ptr); /* * this is not expected to fail */ prelude_io_set_sys_io(pio, pio->fd); return sys_close(pio); } static ssize_t tls_pending(prelude_io_t *pio) { ssize_t ret; ret = gnutls_record_check_pending(pio->fd_ptr); if ( ret > 0 ) return ret; ret = sys_pending(pio); if ( ret > 0 ) return ret; return 0; } /* * Forward data from one fd to another using copy. */ static ssize_t copy_forward(prelude_io_t *dst, prelude_io_t *src, size_t count) { int ret; size_t scount; unsigned char buf[8192]; scount = count; while ( count ) { ret = (count < sizeof(buf)) ? count : sizeof(buf); ret = prelude_io_read(src, buf, ret); if ( ret <= 0 ) return ret; count -= ret; ret = prelude_io_write(dst, buf, ret); if ( ret < 0 ) return ret; } return scount; } /** * prelude_io_forward: * @src: Pointer to a #prelude_io_t object. * @dst: Pointer to a #prelude_io_t object. * @count: Number of byte to forward from @src to @dst. * * prelude_io_forward() attempts to transfer up to @count bytes from * the file descriptor identified by @src into the file descriptor * identified by @dst. * * Returns: If the transfer was successful, the number of bytes written * to @dst is returned. On error, -1 is returned, and errno is set appropriately. */ ssize_t prelude_io_forward(prelude_io_t *dst, prelude_io_t *src, size_t count) { prelude_return_val_if_fail(dst, prelude_error(PRELUDE_ERROR_ASSERTION)); prelude_return_val_if_fail(src, prelude_error(PRELUDE_ERROR_ASSERTION)); return copy_forward(dst, src, count); } /** * prelude_io_read: * @pio: Pointer to a #prelude_io_t object. * @buf: Pointer to the buffer to store data into. * @count: Number of bytes to read. * * prelude_io_read() attempts to read up to @count bytes from the * file descriptor identified by @pio into the buffer starting at @buf. * * If @count is zero, prelude_io_read() returns zero and has no other * results. If @count is greater than SSIZE_MAX, the result is unspecified. * * The case where the read function would be interrupted by a signal is * handled internally. So you don't have to check for EINTR. * * Returns: On success, the number of bytes read is returned (zero * indicates end of file). It is not an error if this number is smaller * than the number of bytes requested; this may happen for example because * fewer bytes are actually available right now or because read() was * interrupted by a signal. * * On error, a negative value is returned. In this case it is left unspecified * whether the file position (if any) changes. */ ssize_t prelude_io_read(prelude_io_t *pio, void *buf, size_t count) { prelude_return_val_if_fail(pio, prelude_error(PRELUDE_ERROR_ASSERTION)); prelude_return_val_if_fail(pio->read, prelude_error(PRELUDE_ERROR_ASSERTION)); prelude_return_val_if_fail(buf, prelude_error(PRELUDE_ERROR_ASSERTION)); return pio->read(pio, buf, count); } /** * prelude_io_read_wait: * @pio: Pointer to a #prelude_io_t object. * @buf: Pointer to the buffer to store data into. * @count: Number of bytes to read. * * prelude_io_read_wait() attempts to read up to @count bytes from the * file descriptor identified by @pio into the buffer starting at @buf. * * If @count is zero, prelude_io_read() returns zero and has no other * results. If @count is greater than SSIZE_MAX, the result is unspecified. * * The case where the read function would be interrupted by a signal is * handled internally. So you don't have to check for EINTR. * * prelude_io_read_wait() always return the number of bytes requested. * Be carefull that this function is blocking. * * Returns: On success, the number of bytes read is returned (zero * indicates end of file). * * On error, -1 is returned, and errno is set appropriately. In this * case it is left unspecified whether the file position (if any) changes. */ ssize_t prelude_io_read_wait(prelude_io_t *pio, void *buf, size_t count) { ssize_t ret; size_t n = 0; struct pollfd pfd; unsigned char *in = buf; prelude_return_val_if_fail(pio, prelude_error(PRELUDE_ERROR_ASSERTION)); prelude_return_val_if_fail(buf, prelude_error(PRELUDE_ERROR_ASSERTION)); pfd.fd = prelude_io_get_fd(pio); pfd.events = POLLIN; do { ret = poll(&pfd, 1, -1); if ( ret < 0 ) return prelude_error_from_errno(errno); if ( ! (pfd.revents & POLLIN) ) return prelude_error_verbose(PRELUDE_ERROR_GENERIC, "expected POLLIN event"); ret = prelude_io_read(pio, &in[n], count - n); if ( ret < 0 ) return ret; n += (size_t) ret; } while ( n != count ); return (ssize_t) n; } /** * prelude_io_read_delimited: * @pio: Pointer to a #prelude_io_t object. * @buf: Pointer to the address of a buffer to store address of data into. * * prelude_io_read_delimited() read message written by prelude_write_delimited(). * Theses messages are sents along with the len of the message. * * Uppon return the @buf argument is updated to point on a newly allocated * buffer containing the data read. The @count argument is set to the number of * bytes the message was containing. * * The case where the read function would be interrupted by a signal is * handled internally. So you don't have to check for EINTR. * * Returns: On success, the number of bytes read is returned (zero * indicates end of file). * * On error, -1 is returned, and errno is set appropriately. In this * case it is left unspecified whether the file position (if any) changes. */ ssize_t prelude_io_read_delimited(prelude_io_t *pio, unsigned char **buf) { ssize_t ret; size_t count; uint16_t msglen; prelude_return_val_if_fail(pio, prelude_error(PRELUDE_ERROR_ASSERTION)); ret = prelude_io_read_wait(pio, &msglen, sizeof(msglen)); if ( ret <= 0 ) return ret; count = ntohs(msglen); *buf = malloc(count); if ( ! *buf ) return prelude_error_from_errno(errno); ret = prelude_io_read_wait(pio, *buf, count); if ( ret < 0 ) return ret; return count; } /** * prelude_io_write: * @pio: Pointer to a #prelude_io_t object. * @buf: Pointer to the buffer to write data from. * @count: Number of bytes to write. * * prelude_io_write() writes up to @count bytes to the file descriptor * identified by @pio from the buffer starting at @buf. POSIX requires * that a read() which can be proved to occur after a write() has returned * returns the new data. Note that not all file systems are POSIX conforming. * * The case where the write() function would be interrupted by a signal is * handled internally. So you don't have to check for EINTR. * * Returns: On success, the number of bytes written are returned (zero * indicates nothing was written). On error, -1 is returned, and errno * is set appropriately. If @count is zero and the file descriptor refers * to a regular file, 0 will be returned without causing any other effect. * For a special file, the results are not portable. */ ssize_t prelude_io_write(prelude_io_t *pio, const void *buf, size_t count) { prelude_return_val_if_fail(pio, prelude_error(PRELUDE_ERROR_ASSERTION)); prelude_return_val_if_fail(pio->write, prelude_error(PRELUDE_ERROR_ASSERTION)); prelude_return_val_if_fail(buf, prelude_error(PRELUDE_ERROR_ASSERTION)); return pio->write(pio, buf, count); } /** * prelude_io_write_delimited: * @pio: Pointer to a #prelude_io_t object. * @buf: Pointer to the buffer to write data from. * @count: Number of bytes to write. * * prelude_io_write_delimited() writes up to @count bytes to the file descriptor * identified by @pio from the buffer starting at @buf. POSIX requires * that a read() which can be proved to occur after a write() has returned * returns the new data. Note that not all file systems are POSIX conforming. * * prelude_io_write_delimited() also write the len of the data to be sent. * which allow prelude_io_read_delimited() to safely know if it got all the * data a given write contain. * * The case where the write() function would be interrupted by a signal is * handled internally. So you don't have to check for EINTR. * * Returns: On success, the number of bytes written are returned (zero * indicates nothing was written). On error, -1 is returned, and errno * is set appropriately. */ ssize_t prelude_io_write_delimited(prelude_io_t *pio, const void *buf, uint16_t count) { int ret; uint16_t nlen; prelude_return_val_if_fail(pio, prelude_error(PRELUDE_ERROR_ASSERTION)); prelude_return_val_if_fail(buf, prelude_error(PRELUDE_ERROR_ASSERTION)); nlen = htons(count); ret = prelude_io_write(pio, &nlen, sizeof(nlen)); if ( ret <= 0 ) return ret; ret = prelude_io_write(pio, buf, count); if ( ret <= 0 ) return ret; return count; } /** * prelude_io_close: * @pio: Pointer to a #prelude_io_t object. * * prelude_io_close() closes the file descriptor indentified by @pio, * * The case where the close() function would be interrupted by a signal is * handled internally. So you don't have to check for EINTR. * * However, and especially when the underlaying layer is TLS, prelude_io_close() * might return error. If this happen, you should continue calling the function * until it return zero. * * Returns: zero on success, or -1 if an error occurred. */ int prelude_io_close(prelude_io_t *pio) { prelude_return_val_if_fail(pio, prelude_error(PRELUDE_ERROR_ASSERTION)); prelude_return_val_if_fail(pio->close, prelude_error(PRELUDE_ERROR_ASSERTION)); return pio->close(pio); } /** * prelude_io_new: * @ret: Pointer where to store the created #prelude_io_t object. * * Create a new prelude IO object. * * Returns: 0 on success, or a negative value if an error occur. */ int prelude_io_new(prelude_io_t **ret) { *ret = calloc(1, sizeof(**ret)); if ( ! *ret ) return prelude_error_from_errno(errno); return 0; } /** * prelude_io_set_file_io: * @pio: A pointer on the #prelude_io_t object. * @fd: File descriptor identifying a file. * * Setup the @pio object to work with file I/O function. * The @pio object is then associated with @fd. */ void prelude_io_set_file_io(prelude_io_t *pio, FILE *fdptr) { prelude_return_if_fail(pio); prelude_return_if_fail(fdptr); pio->fd = fileno(fdptr); pio->fd_ptr = fdptr; pio->read = file_read; pio->write = file_write; pio->close = file_close; pio->pending = file_pending; } /** * prelude_io_set_tls_io: * @pio: A pointer on the #prelude_io_t object. * @tls: Pointer on the TLS structure holding the TLS connection data. * * Setup the @pio object to work with TLS based I/O function. * The @pio object is then associated with @tls. */ void prelude_io_set_tls_io(prelude_io_t *pio, void *tls) { union { void *ptr; int fd; } data; prelude_return_if_fail(pio); prelude_return_if_fail(tls); data.ptr = gnutls_transport_get_ptr(tls); pio->fd = data.fd; pio->fd_ptr = tls; pio->read = tls_read; pio->write = tls_write; pio->close = tls_close; pio->pending = tls_pending; } /** * prelude_io_set_sys_io: * @pio: A pointer on the #prelude_io_t object. * @fd: A file descriptor. * * Setup the @pio object to work with system based I/O function. * The @pio object is then associated with @fd. */ void prelude_io_set_sys_io(prelude_io_t *pio, int fd) { prelude_return_if_fail(pio); pio->fd = fd; pio->fd_ptr = NULL; pio->read = sys_read; pio->write = sys_write; pio->close = sys_close; pio->pending = sys_pending; } int prelude_io_set_buffer_io(prelude_io_t *pio) { prelude_return_val_if_fail(pio, prelude_error(PRELUDE_ERROR_ASSERTION)); pio->fd_ptr = NULL; pio->size = pio->rindex = 0; pio->read = buffer_read; pio->write = buffer_write; pio->close = buffer_close; pio->pending = buffer_pending; return 0; } /** * prelude_io_get_fd: * @pio: A pointer on a #prelude_io_t object. * * Returns: The FD associated with this object. */ int prelude_io_get_fd(prelude_io_t *pio) { prelude_return_val_if_fail(pio, prelude_error(PRELUDE_ERROR_ASSERTION)); return pio->fd; } /** * prelude_io_get_fdptr: * @pio: A pointer on a #prelude_io_t object. * * Returns: Pointer associated with this object (file, tls, buffer, or NULL). */ void *prelude_io_get_fdptr(prelude_io_t *pio) { prelude_return_val_if_fail(pio, NULL); return pio->fd_ptr; } /** * prelude_io_destroy: * @pio: Pointer to a #prelude_io_t object. * * Destroy the @pio object. */ void prelude_io_destroy(prelude_io_t *pio) { prelude_return_if_fail(pio); free(pio); } /** * prelude_io_pending: * @pio: Pointer to a #prelude_io_t object. * * prelude_io_pending return the number of bytes waiting to * be read on an TLS or socket fd. * * Returns: Number of byte waiting to be read on @pio, or -1 * if @pio is not of type TLS or socket. */ ssize_t prelude_io_pending(prelude_io_t *pio) { prelude_return_val_if_fail(pio, prelude_error(PRELUDE_ERROR_ASSERTION)); return pio->pending(pio); } /** * prelude_io_is_error_fatal: * @pio: Pointer to a #prelude_io_t object. * @error: Error returned by one of the #prelude_io_t function. * * Check whether the returned error is fatal, or not. * * Returns: TRUE if error is fatal, FALSE if it is not. */ prelude_bool_t prelude_io_is_error_fatal(prelude_io_t *pio, int error) { prelude_error_code_t code; prelude_return_val_if_fail(pio, FALSE); if ( ! error ) return FALSE; code = prelude_error_get_code(error); if ( code == PRELUDE_ERROR_EAGAIN || code == PRELUDE_ERROR_EINTR || code == PRELUDE_ERROR_TLS_WARNING_ALERT ) return FALSE; return TRUE; } /** * prelude_io_set_write_callback: * @pio: Pointer to a #prelude_io_t object. * @write: Callback function to be called on prelude_io_write(). * * Set an user defined write callback function to be called on * prelude_io_write(). */ void prelude_io_set_write_callback(prelude_io_t *pio, ssize_t (*write)(prelude_io_t *io, const void *buf, size_t count)) { pio->write = write; } /** * prelude_io_set_read_callback: * @pio: Pointer to a #prelude_io_t object. * @read: Callback function to be called on prelude_io_read(). * * Set an user defined read callback function to be called on * prelude_io_read(). */ void prelude_io_set_read_callback(prelude_io_t *pio, ssize_t (*read)(prelude_io_t *io, void *buf, size_t count)) { pio->read = read; } /** * prelude_io_set_pending_callback: * @pio: Pointer to a #prelude_io_t object. * @pending: Callback function to be called on prelude_io_pending(). * * Set an user defined read callback function to be called on * prelude_io_pending(). */ void prelude_io_set_pending_callback(prelude_io_t *pio, ssize_t (*pending)(prelude_io_t *io)) { pio->pending = pending; } /** * prelude_io_set_fdptr: * @pio: Pointer to a #prelude_io_t object. * @ptr: Pointer to user defined data. * * Set an user defined pointer that might be retrieved using * prelude_io_get_fdptr(). */ void prelude_io_set_fdptr(prelude_io_t *pio, void *ptr) { pio->fd_ptr = ptr; } libprelude-1.0.0/src/prelude-client-profile.c0000664000076400007640000005271011202225026016074 00000000000000/***** * * Copyright (C) 2004-2005,2006,2007 PreludeIDS Technologies. All Rights Reserved. * Author: Yoann Vandoorselaere * * This file is part of the Prelude library. * * 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; see the file COPYING. If not, write to * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. * *****/ #include "config.h" #include "libmissing.h" #include #include #include #include #include #include "relocatable.h" #include "glthread/lock.h" #define PRELUDE_ERROR_SOURCE_DEFAULT PRELUDE_ERROR_SOURCE_CLIENT_PROFILE #include "prelude-error.h" #include "prelude-client-profile.h" #include "tls-auth.h" #include "common.h" #if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__ # define geteuid(x) (0) # define getegid(x) (0) #endif #define PRELUDE_PROFILE_DIR PRELUDE_CONFIG_DIR "/profile" #define PRELUDE_CONFIG_DEFAULT_DIR PRELUDE_CONFIG_DIR "/default" #define TLS_CONFIG PRELUDE_CONFIG_DEFAULT_DIR "/tls.conf" /* * directory where TLS private keys file are stored. */ #define TLS_KEY_DIR PRELUDE_CONFIG_DIR "/keys" /* * directory where TLS client certificate file are stored. */ #define TLS_CLIENT_CERT_DIR PRELUDE_CONFIG_DIR "/tls/client" /* * directory where TLS server certificate file are stored. */ #define TLS_SERVER_CERT_DIR PRELUDE_CONFIG_DIR "/tls/server" struct prelude_client_profile { int refcount; prelude_uid_t uid; prelude_gid_t gid; char *name; uint64_t analyzerid; gnutls_certificate_credentials credentials; }; extern char *_prelude_prefix; static char *user_prefix = NULL; static const char *relocated_prefix; static const char *relative_spool_dir = NULL; static const char *relative_config_default_dir = NULL; static const char *relative_profile_dir = NULL; static gl_lock_t lock = gl_lock_initializer; gl_once_define(static, relocate_once); static const char *get_relpath(const char *path) { return ( strstr(path, INSTALLPREFIX) ) ? path + sizeof(INSTALLPREFIX) : NULL; } static void _get_dir_once(void) { relocated_prefix = (_prelude_prefix) ? _prelude_prefix : relocate(INSTALLPREFIX); relative_spool_dir = get_relpath(PRELUDE_SPOOL_DIR); relative_profile_dir = get_relpath(PRELUDE_PROFILE_DIR); relative_config_default_dir = get_relpath(PRELUDE_CONFIG_DEFAULT_DIR); prelude_log_debug(2, "install prefix=%s", INSTALLPREFIX); prelude_log_debug(2, "relocated prefix=%s\n", relocated_prefix); prelude_log_debug(2, "relative spool=%s\n", relative_spool_dir ? relative_spool_dir : PRELUDE_SPOOL_DIR); prelude_log_debug(2, "relative config=%s\n", relative_config_default_dir ? relative_config_default_dir : PRELUDE_CONFIG_DEFAULT_DIR); prelude_log_debug(2, "relative profile=%s\n", relative_profile_dir ? relative_profile_dir : PRELUDE_PROFILE_DIR); } static const char *init_once_and_get_prefix(void) { gl_once(relocate_once, _get_dir_once); return (user_prefix) ? user_prefix : relocated_prefix; } static int get_profile_analyzerid(prelude_client_profile_t *cp) { int ret; FILE *fd; char *ptr, filename[256], buf[256]; prelude_client_profile_get_profile_dirname(cp, filename, sizeof(filename)); if ( access(filename, R_OK|X_OK) < 0 ) { if ( errno == ENOENT ) return prelude_error_verbose(PRELUDE_ERROR_PROFILE, "profile '%s' does not exist", cp->name); else if ( errno == EACCES ) return prelude_error_verbose(PRELUDE_ERROR_PROFILE, "could not open profile '%s': insufficient permission", cp->name); } prelude_client_profile_get_analyzerid_filename(cp, filename, sizeof(filename)); fd = fopen(filename, "r"); if ( ! fd ) return prelude_error_verbose(PRELUDE_ERROR_PROFILE, "could not open '%s' for reading", filename); ptr = fgets(buf, sizeof(buf), fd); fclose(fd); if ( ! ptr ) return prelude_error_verbose(PRELUDE_ERROR_PROFILE, "could not read analyzerID from '%s'", filename); ret = sscanf(buf, "%" PRELUDE_PRIu64, &cp->analyzerid); if ( ret != 1 ) return prelude_error_verbose(PRELUDE_ERROR_PROFILE, "'%s' is not a valid analyzerID", buf); return 0; } /** * prelude_client_profile_set_prefix: * @cp: pointer on a #prelude_client_profile_t object. * @prefix: Prefix to use for various libprelude files. * * This function allow to dynamically change the prefix used to acess * libprelude related file. This is particularly usefull in case of * application running under certain condition (chroot). * * Returns: 0 on success, a negative value if an error occured. */ int prelude_client_profile_set_prefix(prelude_client_profile_t *cp, const char *prefix) { char *n; n = strdup(prefix); gl_lock_lock(lock); if ( user_prefix ) free(user_prefix); user_prefix = n; gl_lock_unlock(lock); return (n) ? 0 : prelude_error_from_errno(errno); } /** * prelude_client_profile_get_prefix: * @cp: pointer on a #prelude_client_profile_t object. * @buf: buffer to write the returned filename to. * @size: size of @buf. * * Retrieve current prefix used with this profile. */ void prelude_client_profile_get_prefix(const prelude_client_profile_t *cp, char *buf, size_t size) { const char *prefix; prelude_return_if_fail(buf); gl_lock_lock(lock); prefix = init_once_and_get_prefix(); snprintf(buf, size, "%s", prefix); gl_lock_unlock(lock); } /** * prelude_client_profile_get_analyzerid_filename: * @cp: pointer on a #prelude_client_profile_t object. * @buf: buffer to write the returned filename to. * @size: size of @buf. * * Writes the filename used to store @cp unique and permanent analyzer ident. */ void prelude_client_profile_get_default_config_dirname(const prelude_client_profile_t *cp, char *buf, size_t size) { const char *prefix; prelude_return_if_fail(buf); gl_lock_lock(lock); prefix = init_once_and_get_prefix(); if ( ! relative_config_default_dir ) snprintf(buf, size, "%s", PRELUDE_CONFIG_DEFAULT_DIR); else snprintf(buf, size, "%s/%s", prefix, relative_config_default_dir); gl_lock_unlock(lock); } /** * prelude_client_profile_get_analyzerid_filename: * @cp: pointer on a #prelude_client_profile_t object. * @buf: buffer to write the returned filename to. * @size: size of @buf. * * Writes the filename used to store @cp unique and permanent analyzer ident. */ void prelude_client_profile_get_analyzerid_filename(const prelude_client_profile_t *cp, char *buf, size_t size) { const char *prefix; prelude_return_if_fail(cp); prelude_return_if_fail(buf); gl_lock_lock(lock); prefix = init_once_and_get_prefix(); if ( ! relative_profile_dir ) snprintf(buf, size, "%s/%s/analyzerid", PRELUDE_PROFILE_DIR, cp->name); else snprintf(buf, size, "%s/%s/%s/analyzerid", prefix, relative_profile_dir, cp->name); gl_lock_unlock(lock); } /** * prelude_client_profile_get_config_filename: * @cp: pointer on a #prelude_client_profile_t object. * @buf: buffer to write the returned filename to. * @size: size of @buf. * * Writes the filename used to store @cp configuration template. */ void prelude_client_profile_get_config_filename(const prelude_client_profile_t *cp, char *buf, size_t size) { const char *prefix; prelude_return_if_fail(cp); prelude_return_if_fail(buf); gl_lock_lock(lock); prefix = init_once_and_get_prefix(); if ( ! relative_profile_dir ) snprintf(buf, size, "%s/%s/config", PRELUDE_PROFILE_DIR, cp->name); else snprintf(buf, size, "%s/%s/%s/config", prefix, relative_profile_dir, cp->name); gl_lock_unlock(lock); } /** * prelude_client_profile_get_tls_key_filename: * @cp: pointer on a #prelude_client_profile_t object. * @buf: buffer to write the returned filename to. * @size: size of @buf. * * Writes the filename used to store @cp private key. */ void prelude_client_profile_get_tls_key_filename(const prelude_client_profile_t *cp, char *buf, size_t size) { const char *prefix; prelude_return_if_fail(cp); prelude_return_if_fail(buf); gl_lock_lock(lock); prefix = init_once_and_get_prefix(); if ( ! relative_profile_dir ) snprintf(buf, size, "%s/%s/key", PRELUDE_PROFILE_DIR, cp->name); else snprintf(buf, size, "%s/%s/%s/key", prefix, relative_profile_dir, cp->name); gl_lock_unlock(lock); } /** * prelude_client_profile_get_tls_server_ca_cert_filename: * @cp: pointer on a #prelude_client_profile_t object. * @buf: buffer to write the returned filename to. * @size: size of @buf. * * Writes the filename used to store @cp related CA certificate. * This only apply to @cp receiving connection from analyzer (server). */ void prelude_client_profile_get_tls_server_ca_cert_filename(const prelude_client_profile_t *cp, char *buf, size_t size) { const char *prefix; prelude_return_if_fail(cp); prelude_return_if_fail(buf); gl_lock_lock(lock); prefix = init_once_and_get_prefix(); if ( ! relative_profile_dir ) snprintf(buf, size, "%s/%s/server.ca", PRELUDE_PROFILE_DIR, cp->name); else snprintf(buf, size, "%s/%s/%s/server.ca", prefix, relative_profile_dir, cp->name); gl_lock_unlock(lock); } /** * prelude_client_profile_get_tls_server_keycert_filename: * @cp: pointer on a #prelude_client_profile_t object. * @buf: buffer to write the returned filename to. * @size: size of @buf. * * Writes the filename used to store certificate for @cp server. * This only apply to @cp receiving connection from analyzer (server). */ void prelude_client_profile_get_tls_server_keycert_filename(const prelude_client_profile_t *cp, char *buf, size_t size) { const char *prefix; prelude_return_if_fail(cp); prelude_return_if_fail(buf); gl_lock_lock(lock); prefix = init_once_and_get_prefix(); if ( ! relative_profile_dir ) snprintf(buf, size, "%s/%s/server.keycrt", PRELUDE_PROFILE_DIR, cp->name); else snprintf(buf, size, "%s/%s/%s/server.keycrt", prefix, relative_profile_dir, cp->name); gl_lock_unlock(lock); } /** * prelude_client_profile_get_tls_server_crl_filename: * @cp: pointer on a #prelude_client_profile_t object. * @buf: buffer to write the returned filename to. * @size: size of @buf. * * Writes the filename used to store CRL for @cp server. * This only apply to @cp receiving connection from analyzer (server). */ void prelude_client_profile_get_tls_server_crl_filename(const prelude_client_profile_t *cp, char *buf, size_t size) { const char *prefix; prelude_return_if_fail(cp); prelude_return_if_fail(buf); gl_lock_lock(lock); prefix = init_once_and_get_prefix(); if ( ! relative_profile_dir ) snprintf(buf, size, "%s/%s/server.crl", PRELUDE_PROFILE_DIR, cp->name); else snprintf(buf, size, "%s/%s/%s/server.crl", prefix, relative_profile_dir, cp->name); gl_lock_unlock(lock); } /** * prelude_client_profile_get_tls_client_trusted_cert_filename: * @cp: pointer on a #prelude_client_profile_t object. * @buf: buffer to write the returned filename to. * @size: size of @buf. * * Writes the filename used to store peers public certificates that @cp trust. * This only apply to client connecting to a peer. */ void prelude_client_profile_get_tls_client_trusted_cert_filename(const prelude_client_profile_t *cp, char *buf, size_t size) { const char *prefix; prelude_return_if_fail(cp); prelude_return_if_fail(buf); gl_lock_lock(lock); prefix = init_once_and_get_prefix(); if ( ! relative_profile_dir ) snprintf(buf, size, "%s/%s/client.trusted", PRELUDE_PROFILE_DIR, cp->name); else snprintf(buf, size, "%s/%s/%s/client.trusted", prefix, relative_profile_dir, cp->name); gl_lock_unlock(lock); } /** * prelude_client_profile_get_tls_client_keycert_filename: * @cp: pointer on a #prelude_client_profile_t object. * @buf: buffer to write the returned filename to. * @size: size of @buf. * * Writes the filename used to store public certificate for @cp private key. * This only apply to client connecting to a peer. */ void prelude_client_profile_get_tls_client_keycert_filename(const prelude_client_profile_t *cp, char *buf, size_t size) { const char *prefix; prelude_return_if_fail(cp); prelude_return_if_fail(buf); gl_lock_lock(lock); prefix = init_once_and_get_prefix(); if ( ! relative_profile_dir ) snprintf(buf, size, "%s/%s/client.keycrt", PRELUDE_PROFILE_DIR, cp->name); else snprintf(buf, size, "%s/%s/%s/client.keycrt", prefix, relative_profile_dir, cp->name); gl_lock_unlock(lock); } /** * prelude_client_profile_get_backup_dirname: * @cp: pointer on a #prelude_client_profile_t object. * @buf: buffer to write the returned filename to. * @size: size of @buf. * * Writes the directory name where message sent by @cp will be stored, * in case writing the message to the peer fail. */ void prelude_client_profile_get_backup_dirname(const prelude_client_profile_t *cp, char *buf, size_t size) { const char *prefix; prelude_return_if_fail(cp); prelude_return_if_fail(buf); gl_lock_lock(lock); prefix = init_once_and_get_prefix(); if ( ! relative_spool_dir ) snprintf(buf, size, "%s/%s", PRELUDE_SPOOL_DIR, cp->name); else snprintf(buf, size, "%s/%s/%s", prefix, relative_spool_dir, cp->name); gl_lock_unlock(lock); } /** * prelude_client_profile_get_backup_dirname: * @cp: pointer on a #prelude_client_profile_t object. * @buf: buffer to write the returned filename to. * @size: size of @buf. * * Writes the directory name where the profile for @cp is stored. If * @cp is NULL or has no name, then this function will provide the main * profile directory. */ void prelude_client_profile_get_profile_dirname(const prelude_client_profile_t *cp, char *buf, size_t size) { const char *prefix, *name_sep = "", *name = ""; prelude_return_if_fail(buf); if ( cp && cp->name ) { name_sep = "/"; name = cp->name; } gl_lock_lock(lock); prefix = init_once_and_get_prefix(); if ( ! relative_profile_dir ) snprintf(buf, size, "%s/%s%s", PRELUDE_PROFILE_DIR, name_sep, name); else snprintf(buf, size, "%s/%s%s%s", prefix, relative_profile_dir, name_sep, name); gl_lock_unlock(lock); } int _prelude_client_profile_new(prelude_client_profile_t **ret) { *ret = calloc(1, sizeof(**ret)); if ( ! *ret ) return prelude_error_from_errno(errno); (*ret)->refcount = 1; (*ret)->uid = geteuid(); (*ret)->gid = getegid(); return 0; } int _prelude_client_profile_init(prelude_client_profile_t *cp) { int ret; prelude_return_val_if_fail(cp, prelude_error(PRELUDE_ERROR_ASSERTION)); ret = get_profile_analyzerid(cp); if ( ret < 0 ) return ret; return 0; } /** * prelude_client_profile_new: * @ret: Pointer where to store the address of the created object. * @name: Name for this profile. * * Creates a new #prelude_client_profile_t object and store its * address into @ret. * * Returns: 0 on success or a negative value if an error occured. */ int prelude_client_profile_new(prelude_client_profile_t **ret, const char *name) { int retval; prelude_client_profile_t *cp; prelude_return_val_if_fail(name, prelude_error(PRELUDE_ERROR_ASSERTION)); retval = _prelude_client_profile_new(&cp); if ( retval < 0 ) return retval; cp->name = strdup(name); if ( ! cp->name ) { free(cp); return prelude_error_from_errno(errno); } retval = _prelude_client_profile_init(cp); if ( retval < 0 ) return retval; *ret = cp; return 0; } /** * prelude_client_profile_destroy: * @cp: Pointer to a #prelude_client_profile_t. * * Destroys @cp. */ void prelude_client_profile_destroy(prelude_client_profile_t *cp) { prelude_return_if_fail(cp); if ( --cp->refcount ) return; if ( cp->credentials ) gnutls_certificate_free_credentials(cp->credentials); if ( cp->name ) free(cp->name); free(cp); } /** * prelude_client_profile_get_uid: * @cp: Pointer to a #prelude_client_profile_t object. * * Gets the UID associated with @cp. * * Returns: the UID associated used by @cp. */ prelude_uid_t prelude_client_profile_get_uid(const prelude_client_profile_t *cp) { prelude_return_val_if_fail(cp, 0); return cp->uid; } /** * prelude_client_profile_set_uid: * @cp: Pointer to a #prelude_client_profile_t object. * @uid: UID to be used by @cp. * * Sets the UID used by @cp to @uid. */ void prelude_client_profile_set_uid(prelude_client_profile_t *cp, prelude_uid_t uid) { prelude_return_if_fail(cp); cp->uid = uid; } /** * prelude_client_profile_get_gid: * @cp: Pointer to a #prelude_client_profile_t object. * * Gets the GID associated with @cp. * * Returns: the GID associated used by @cp. */ prelude_gid_t prelude_client_profile_get_gid(const prelude_client_profile_t *cp) { prelude_return_val_if_fail(cp, 0); return cp->gid; } /** * prelude_client_profile_set_gid: * @cp: Pointer to a #prelude_client_profile_t object. * @gid: GID to be used by @cp. * * Sets the GID used by @cp to @gid. */ void prelude_client_profile_set_gid(prelude_client_profile_t *cp, prelude_gid_t gid) { prelude_return_if_fail(cp); cp->gid = gid; } /** * prelude_client_profile_set_analyzerid: * @cp: Pointer to a #prelude_client_profile_t object. * @analyzerid: Analyzer ID to be used by @cp. * * Sets the Analyzer ID used by @cp to @analyzerid. */ void prelude_client_profile_set_analyzerid(prelude_client_profile_t *cp, uint64_t analyzerid) { prelude_return_if_fail(cp); cp->analyzerid = analyzerid; } /** * prelude_client_profile_get_analyzerid: * @cp: Pointer to a #prelude_client_profile_t object. * * Gets the unique and permanent analyzer ident associated with @cp. * * Returns: the analyzer ident used by @cp. */ uint64_t prelude_client_profile_get_analyzerid(const prelude_client_profile_t *cp) { prelude_return_val_if_fail(cp, 0); return cp->analyzerid; } /** * prelude_client_profile_get_name: * @cp: Pointer to a #prelude_client_profile_t object. * * Gets the name of @cp client profile. * * Returns: the name used by @cp. */ const char *prelude_client_profile_get_name(const prelude_client_profile_t *cp) { prelude_return_val_if_fail(cp, NULL); return cp->name; } /** * prelude_client_profile_set_name: * @cp: Pointer to a #prelude_client_profile_t object. * @name: Name to associate the profile with. * * Sets the prelude client profile name. * * Returns: 0 on success or a negative value if an error occured. */ int prelude_client_profile_set_name(prelude_client_profile_t *cp, const char *name) { prelude_return_val_if_fail(cp, prelude_error(PRELUDE_ERROR_ASSERTION)); prelude_return_val_if_fail(name, prelude_error(PRELUDE_ERROR_ASSERTION)); if ( cp->name ) free(cp->name); cp->name = strdup(name); if ( ! cp->name ) return prelude_error_from_errno(errno); return 0; } /** * prelude_client_profile_get_crendentials: * @cp: Pointer to a #prelude_client_profile_t object. * @credentials: The GNU TLS certificate credentials retrieved. * * Gets the prelude client profile credentials * * Returns: 0 on success or a negative value if an error occured. */ int prelude_client_profile_get_credentials(prelude_client_profile_t *cp, void **credentials) { int ret; prelude_return_val_if_fail(cp, prelude_error(PRELUDE_ERROR_ASSERTION)); if ( cp->credentials ) { *credentials = cp->credentials; return 0; } ret = tls_auth_init(cp, &cp->credentials); if ( ret < 0 ) return ret; *credentials = cp->credentials; return 0; } prelude_client_profile_t *prelude_client_profile_ref(prelude_client_profile_t *cp) { prelude_return_val_if_fail(cp, NULL); cp->refcount++; return cp; } libprelude-1.0.0/src/prelude-hash.c0000664000076400007640000001552611325615275014126 00000000000000/***** * * Copyright (C) 2003,2004,2005 PreludeIDS Technologies. All Rights Reserved. * Author: Nicolas Delon * * This file is part of the Prelude library. * * 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; see the file COPYING. If not, write to * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. * *****/ #include "config.h" #include #include #include "prelude-log.h" #include "prelude-list.h" #include "prelude-error.h" #include "prelude-hash.h" #define HASH_DEFAULT_SIZE 128 typedef struct hash_elem { prelude_list_t list; void *key; void *value; } hash_elem_t; struct prelude_hash { size_t lists_size; prelude_list_t *lists; unsigned int (*hash_func)(const void *key); int (*key_cmp_func)(const void *key1, const void *key2); void (*key_destroy_func)(void *key); void (*value_destroy_func)(void *value); }; /* * This function's code was taken from glib */ static unsigned int default_hash_func(const void *key) { const char *ptr = key; unsigned int hv = *ptr; if ( hv ) for ( ptr += 1; *ptr; ptr++ ) hv = (hv << 5) - hv + *ptr; return hv; } static int default_key_cmp_func(const void *key1, const void *key2) { return strcmp((const char *) key1, (const char *) key2); } static unsigned int hash_value_calc(prelude_hash_t *hash, const void *key) { return (hash->hash_func(key) % hash->lists_size); } static hash_elem_t *hash_elem_get(prelude_hash_t *hash, const void *key) { prelude_list_t *list; prelude_list_t *ptr; hash_elem_t *hash_elem; list = hash->lists + hash_value_calc(hash, key); prelude_list_for_each(list, ptr) { hash_elem = prelude_list_entry(ptr, hash_elem_t, list); if ( hash->key_cmp_func(key, hash_elem->key) == 0 ) return hash_elem; } return NULL; } static void hash_elem_key_destroy(prelude_hash_t *hash, hash_elem_t *hash_elem) { if ( hash->key_destroy_func ) hash->key_destroy_func(hash_elem->key); } static void hash_elem_value_destroy(prelude_hash_t *hash, hash_elem_t *hash_elem) { if ( hash->value_destroy_func ) hash->value_destroy_func(hash_elem->value); } int prelude_hash_new(prelude_hash_t **nhash, unsigned int (*hash_func)(const void *), int (*key_cmp_func)(const void *, const void *), void (*key_destroy_func)(void *), void (*value_destroy_func)(void *)) { return prelude_hash_new2(nhash, HASH_DEFAULT_SIZE, hash_func, key_cmp_func, key_destroy_func, value_destroy_func); } int prelude_hash_new2(prelude_hash_t **nhash, size_t size, unsigned int (*hash_func)(const void *), int (*key_cmp_func)(const void *, const void *), void (*key_destroy_func)(void *), void (*value_destroy_func)(void *)) { size_t i; prelude_hash_t *hash; *nhash = hash = calloc(1, sizeof (*hash)); if ( ! hash ) return prelude_error_from_errno(errno); hash->lists_size = size; hash->lists = malloc(hash->lists_size * sizeof(*hash->lists)); if ( ! hash->lists ) { free(hash); return prelude_error_from_errno(errno); } hash->hash_func = hash_func ? hash_func : default_hash_func; hash->key_cmp_func = key_cmp_func ? key_cmp_func : default_key_cmp_func; hash->key_destroy_func = key_destroy_func; hash->value_destroy_func = value_destroy_func; for ( i = 0; i < hash->lists_size; i++ ) prelude_list_init(hash->lists + i); return 0; } void prelude_hash_destroy(prelude_hash_t *hash) { size_t cnt; prelude_list_t *list; prelude_list_t *ptr; prelude_list_t *tmp; hash_elem_t *hash_elem; for ( cnt = 0; cnt < hash->lists_size; cnt++ ) { list = hash->lists + cnt; prelude_list_for_each_safe(list, ptr, tmp) { hash_elem = prelude_list_entry(ptr, hash_elem_t, list); hash_elem_key_destroy(hash, hash_elem); hash_elem_value_destroy(hash, hash_elem); prelude_list_del(&hash_elem->list); free(hash_elem); } } free(hash->lists); free(hash); } int prelude_hash_set(prelude_hash_t *hash, void *key, void *value) { hash_elem_t *hash_elem; prelude_list_t *list; hash_elem = hash_elem_get(hash, key); if ( hash_elem ) { hash_elem_key_destroy(hash, hash_elem); hash_elem_value_destroy(hash, hash_elem); hash_elem->key = key; hash_elem->value = value; return 0; } hash_elem = calloc(1, sizeof(*hash_elem)); if ( ! hash_elem ) return prelude_error_from_errno(errno); hash_elem->key = key; hash_elem->value = value; list = hash->lists + hash_value_calc(hash, key); prelude_list_add(list, &hash_elem->list); return 1; } void *prelude_hash_get(prelude_hash_t *hash, const void *key) { hash_elem_t *hash_elem; return (hash_elem = hash_elem_get(hash, key)) ? hash_elem->value : NULL; } int prelude_hash_elem_destroy(prelude_hash_t *hash, const void *key) { hash_elem_t *hash_elem; hash_elem = hash_elem_get(hash, key); if ( ! hash_elem ) return -1; hash_elem_key_destroy(hash, hash_elem); hash_elem_value_destroy(hash, hash_elem); prelude_list_del(&hash_elem->list); free(hash_elem); return 0; } void prelude_hash_iterate(prelude_hash_t *hash, void (*cb)(void *data)) { unsigned int i; prelude_list_t *tmp; hash_elem_t *hash_elem; for ( i = 0; i < hash->lists_size; i++ ) { prelude_list_for_each(&hash->lists[i], tmp) { hash_elem = prelude_list_entry(tmp, hash_elem_t, list); cb(hash_elem->value); } } } libprelude-1.0.0/src/variable.c0000664000076400007640000001043611211746732013322 00000000000000/***** * * Copyright (C) 2001,2002,2003,2004,2005 PreludeIDS Technologies. All Rights Reserved. * Author: Yoann Vandoorselaere * * This file is part of the Prelude library. * * 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; see the file COPYING. If not, write to * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. * *****/ #include "config.h" #include #include #include #include "libmissing.h" #include "prelude-list.h" #include "prelude-error.h" #include "variable.h" typedef struct { prelude_list_t list; char *variable; char *value; } variable_t; static PRELUDE_LIST(variable_list); static variable_t *search_entry(const char *variable) { int ret; prelude_list_t *tmp; variable_t *item = NULL; prelude_list_for_each(&variable_list, tmp) { item = prelude_list_entry(tmp, variable_t, list); ret = strcasecmp(item->variable, variable); if ( ret == 0 ) return item; } return NULL; } static int create_entry(const char *variable, const char *value) { variable_t *item; item = malloc(sizeof(*item)); if ( ! item ) return prelude_error_from_errno(errno); item->variable = strdup(variable); if ( ! item->variable ) { free(item); return prelude_error_from_errno(errno); } if ( ! value ) item->value = NULL; else { item->value = strdup(value); if ( ! item->value ) { free(item->variable); free(item); return prelude_error_from_errno(errno); } } prelude_list_add_tail(&variable_list, &item->list); return 0; } static void destroy_variable(variable_t *item) { prelude_list_del(&item->list); free(item->variable); if ( item->value ) free(item->value); free(item); } /** * variable_get: * @variable: Variable to get the value from. * * Get value for the specified variable. * * Returns: Value of the variable, or NULL if the variable is not set. */ char *variable_get(const char *variable) { variable_t *item; item = search_entry(variable); return ( item ) ? item->value : NULL; } /** * variable_set: * @variable: The variable in question. * @value: Value to assign to the variable. * * Set the specified variable to the given value. * The variable is created if it doesn't exit. * * Returns: 0 on success, -1 on error. */ int variable_set(const char *variable, const char *value) { int ret = -1; variable_t *item; item = search_entry(variable); if ( ! item ) ret = create_entry(variable, value); else { if ( item->value ) free(item->value); item->value = (value) ? strdup(value) : NULL; } return ( ret == 0 || item ) ? 0 : -1; } /** * variable_unset: * @variable: The variable in question. * * Delete the specified variable from the variable lists. * * Returns: 0 on success, -1 if variable could not be found. */ int variable_unset(const char *variable) { variable_t *item; item = search_entry(variable); if ( ! item ) return -1; destroy_variable(item); return 0; } void variable_unset_all(void) { variable_t *item; prelude_list_t *tmp, *bkp; prelude_list_for_each_safe(&variable_list, tmp, bkp) { item = prelude_list_entry(tmp, variable_t, list); destroy_variable(item); } } libprelude-1.0.0/src/daemonize.c0000664000076400007640000001260711303712755013512 00000000000000/***** * * Copyright (C) 1999-2005,2006,2007 PreludeIDS Technologies. All Rights Reserved. * Author: Yoann Vandoorselaere * * This file is part of the Prelude library. * * 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; see the file COPYING. If not, write to * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. * *****/ #include "libmissing.h" #include #include #include #include #include #include #include #include #include #include "daemonize.h" #include "prelude-log.h" #include "prelude-error.h" static char slockfile[PATH_MAX]; static int get_absolute_filename(const char *lockfile) { if ( *lockfile == '/' ) snprintf(slockfile, sizeof(slockfile), "%s", lockfile); else { char dir[PATH_MAX]; /* * if lockfile is a relative path, * deletion on exit() will not work because of the chdir("/") call. * That's why we want to convert it to an absolute path. */ if ( ! getcwd(dir, sizeof(dir)) ) return prelude_error_from_errno(errno); snprintf(slockfile, sizeof(slockfile), "%s/%s", dir, lockfile); } return 0; } static int lockfile_get_exclusive(const char *lockfile) { int fd; #if !((defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__) int ret; struct flock lock; #endif fd = open(lockfile, O_WRONLY|O_CREAT, S_IRUSR|S_IWUSR); if ( fd < 0 ) return prelude_error_from_errno(errno); #if !((defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__) fcntl(fd, F_SETFD, fcntl(fd, F_GETFD) | FD_CLOEXEC); lock.l_type = F_WRLCK; /* write lock */ lock.l_start = 0; /* from offset 0 */ lock.l_whence = SEEK_SET; /* at the beginning of the file */ lock.l_len = 0; /* until EOF */ ret = fcntl(fd, F_SETLK, &lock); if ( ret < 0 ) { if ( errno == EACCES || errno == EAGAIN ) return prelude_error_verbose(PRELUDE_ERROR_DAEMONIZE_LOCK_HELD, "'%s' lock is held by another process", slockfile); close(fd); return prelude_error_from_errno(errno); } #endif /* * lock is now held until program exits. */ return fd; } static int lockfile_write_pid(int fd, pid_t pid) { int ret = -1; char buf[50]; /* * Resets file size to 0. */ #ifdef HAVE_FTRUNCATE ret = ftruncate(fd, 0); #elif HAVE_CHSIZE ret = chsize(fd, 0); #endif if ( ret < 0 ) return prelude_error_from_errno(errno); snprintf(buf, sizeof(buf), "%d\n", (int) pid); ret = write(fd, buf, strlen(buf)); if ( ret < 0 ) return prelude_error_from_errno(errno); return 0; } /** * prelude_daemonize: * @lockfile: Filename to a lockfile. * * Puts caller in background. * If @lockfile is not NULL, a lock for this program is created. * * The lockfile is automatically unlinked on exit. * * Returns: 0 on success, -1 if an error occured. */ int prelude_daemonize(const char *lockfile) { pid_t pid; int fd = 0, ret, i; if ( lockfile ) { ret = get_absolute_filename(lockfile); if ( ret < 0 ) return ret; } #if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__ prelude_log(PRELUDE_LOG_ERR, "Daemonize call unsupported in this environment.\n"); pid = getpid(); #else pid = fork(); if ( pid < 0 ) return prelude_error_from_errno(errno); else if ( pid ) _exit(0); #endif if ( lockfile ) { fd = lockfile_get_exclusive(slockfile); if ( fd < 0 ) return fd; ret = lockfile_write_pid(fd, getpid()); if ( ret < 0 ) return ret; } #if !((defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__) setsid(); ret = chdir("/"); if ( ret < 0 ) prelude_log(PRELUDE_LOG_ERR, "could not change working directory to '/': %s.\n", strerror(errno)); umask(0); fd = open("/dev/null", O_RDWR); if ( fd < 0 ) return prelude_error_from_errno(errno); for ( i = 0; i <= 2; i++ ) { do { ret = dup2(fd, i); } while ( ret < 0 && errno == EINTR ); if ( ret < 0 ) return prelude_error_from_errno(errno); } close(fd); #endif return 0; } libprelude-1.0.0/src/idmef-message-write.c0000664000076400007640000016345311202225026015367 00000000000000 /***** * * Copyright (C) 2001,2002,2003,2004,2005 PreludeIDS Technologies. All Rights Reserved. * Author: Yoann Vandoorselaere * Author: Nicolas Delon * * This file is part of the Prelude library. * * 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; see the file COPYING. If not, write to * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. * *****/ /* Auto-generated by the GenerateIDMEFMessageWriteC package */ #include "config.h" #include #include #include #include "prelude-inttypes.h" #include "prelude-list.h" #include "prelude-log.h" #include "prelude-io.h" #include "prelude-ident.h" #include "prelude-message-id.h" #include "idmef-message-id.h" #include "idmef.h" #include "idmef-tree-wrap.h" #include "idmef-message-write.h" #include "prelude-client.h" #include "common.h" /* * If you wonder why we do this, and why life is complicated, * then wonder why the hell the guys that wrote IDMEF choose to use XML. * XML is dog slow. And XML'll never achieve performance needed for real time IDS. * * Here we are trying to communicate using a home made, binary version of IDMEF. */ static inline int prelude_string_write(prelude_string_t *string, prelude_msgbuf_t *msg, uint8_t tag) { if ( ! string || prelude_string_is_empty(string) ) return 0; return prelude_msgbuf_set(msg, tag, prelude_string_get_len(string) + 1, prelude_string_get_string(string)); } static inline int uint64_write(uint64_t data, prelude_msgbuf_t *msg, uint8_t tag) { uint64_t dst; dst = prelude_hton64(data); return prelude_msgbuf_set(msg, tag, sizeof(dst), &dst); } static inline int uint32_write(uint32_t data, prelude_msgbuf_t *msg, uint8_t tag) { data = htonl(data); return prelude_msgbuf_set(msg, tag, sizeof(data), &data); } static inline int int32_write(uint32_t data, prelude_msgbuf_t *msg, uint8_t tag) { return uint32_write(data, msg, tag); } static inline int uint8_write(uint8_t data, prelude_msgbuf_t *msg, uint8_t tag) { return prelude_msgbuf_set(msg, tag, sizeof (data), &data); } static inline int uint16_write(uint16_t data, prelude_msgbuf_t *msg, uint8_t tag) { data = htons(data); return prelude_msgbuf_set(msg, tag, sizeof(data), &data); } static inline int float_write(float data, prelude_msgbuf_t *msg, uint8_t tag) { uint32_t tmp = prelude_htonf(data); return prelude_msgbuf_set(msg, tag, sizeof(tmp), &tmp); } static inline int idmef_time_write(idmef_time_t *data, prelude_msgbuf_t *msg, uint8_t tag) { uint32_t tmp; unsigned char buf[12]; if ( ! data ) return 0; tmp = htonl(idmef_time_get_sec(data)); memcpy(buf, &tmp, sizeof(tmp)); tmp = htonl(idmef_time_get_usec(data)); memcpy(buf + 4, &tmp, sizeof(tmp)); tmp = htonl(idmef_time_get_gmt_offset(data)); memcpy(buf + 8, &tmp, sizeof(tmp)); return prelude_msgbuf_set(msg, tag, sizeof (buf), buf); } static inline int idmef_data_write(idmef_data_t *data, prelude_msgbuf_t *msg, uint8_t tag) { int ret; idmef_data_type_t type; if ( ! data ) return 0; type = idmef_data_get_type(data); if ( type == IDMEF_DATA_TYPE_UNKNOWN ) return 0; ret = uint32_write(idmef_data_get_type(data), msg, tag); if ( ret < 0 ) return ret; switch ( type ) { case IDMEF_DATA_TYPE_CHAR: case IDMEF_DATA_TYPE_BYTE: ret = uint8_write(* (const uint8_t *) idmef_data_get_data(data), msg, tag); break; case IDMEF_DATA_TYPE_UINT32: ret = uint32_write(idmef_data_get_uint32(data), msg, tag); break; case IDMEF_DATA_TYPE_UINT64: ret = uint64_write(idmef_data_get_uint64(data), msg, tag); break; case IDMEF_DATA_TYPE_FLOAT: ret = float_write(idmef_data_get_uint64(data), msg, tag); break; case IDMEF_DATA_TYPE_CHAR_STRING: case IDMEF_DATA_TYPE_BYTE_STRING: ret = prelude_msgbuf_set(msg, tag, idmef_data_get_len(data), idmef_data_get_data(data)); break; case IDMEF_DATA_TYPE_UNKNOWN: /* nop */; } return ret; } /** * idmef_additional_data_write: * @additional_data: Pointer to a #idmef_additional_data_t object. * @msg: Pointer to a #prelude_msgbuf_t object, where the message should be written. * * Write @additional_data within @msg message buffer. The buffer is * associated with a #prelude_io_t file descriptor where the data will be written. * * Returns: 0 on success, a negative value if an error occured. */ int idmef_additional_data_write(idmef_additional_data_t *additional_data, prelude_msgbuf_t *msg) { int ret; if ( ! additional_data ) return 0; ret = prelude_msgbuf_set(msg, IDMEF_MSG_ADDITIONAL_DATA_TAG, 0, NULL); if ( ret < 0 ) return ret; ret = uint32_write(idmef_additional_data_get_type(additional_data), msg, IDMEF_MSG_ADDITIONAL_DATA_TYPE); if ( ret < 0 ) return ret; ret = prelude_string_write(idmef_additional_data_get_meaning(additional_data), msg, IDMEF_MSG_ADDITIONAL_DATA_MEANING); if ( ret < 0 ) return ret; ret = idmef_data_write(idmef_additional_data_get_data(additional_data), msg, IDMEF_MSG_ADDITIONAL_DATA_DATA); if ( ret < 0 ) return ret; return prelude_msgbuf_set(msg, IDMEF_MSG_END_OF_TAG, 0, NULL); } /** * idmef_reference_write: * @reference: Pointer to a #idmef_reference_t object. * @msg: Pointer to a #prelude_msgbuf_t object, where the message should be written. * * Write @reference within @msg message buffer. The buffer is * associated with a #prelude_io_t file descriptor where the data will be written. * * Returns: 0 on success, a negative value if an error occured. */ int idmef_reference_write(idmef_reference_t *reference, prelude_msgbuf_t *msg) { int ret; if ( ! reference ) return 0; ret = prelude_msgbuf_set(msg, IDMEF_MSG_REFERENCE_TAG, 0, NULL); if ( ret < 0 ) return ret; ret = uint32_write(idmef_reference_get_origin(reference), msg, IDMEF_MSG_REFERENCE_ORIGIN); if ( ret < 0 ) return ret; ret = prelude_string_write(idmef_reference_get_name(reference), msg, IDMEF_MSG_REFERENCE_NAME); if ( ret < 0 ) return ret; ret = prelude_string_write(idmef_reference_get_url(reference), msg, IDMEF_MSG_REFERENCE_URL); if ( ret < 0 ) return ret; ret = prelude_string_write(idmef_reference_get_meaning(reference), msg, IDMEF_MSG_REFERENCE_MEANING); if ( ret < 0 ) return ret; return prelude_msgbuf_set(msg, IDMEF_MSG_END_OF_TAG, 0, NULL); } /** * idmef_classification_write: * @classification: Pointer to a #idmef_classification_t object. * @msg: Pointer to a #prelude_msgbuf_t object, where the message should be written. * * Write @classification within @msg message buffer. The buffer is * associated with a #prelude_io_t file descriptor where the data will be written. * * Returns: 0 on success, a negative value if an error occured. */ int idmef_classification_write(idmef_classification_t *classification, prelude_msgbuf_t *msg) { int ret; if ( ! classification ) return 0; ret = prelude_msgbuf_set(msg, IDMEF_MSG_CLASSIFICATION_TAG, 0, NULL); if ( ret < 0 ) return ret; ret = prelude_string_write(idmef_classification_get_ident(classification), msg, IDMEF_MSG_CLASSIFICATION_IDENT); if ( ret < 0 ) return ret; ret = prelude_string_write(idmef_classification_get_text(classification), msg, IDMEF_MSG_CLASSIFICATION_TEXT); if ( ret < 0 ) return ret; { idmef_reference_t *reference = NULL; while ( (reference = idmef_classification_get_next_reference(classification, reference)) ) { ret = idmef_reference_write(reference, msg); if ( ret < 0 ) return ret; } } return prelude_msgbuf_set(msg, IDMEF_MSG_END_OF_TAG, 0, NULL); } /** * idmef_user_id_write: * @user_id: Pointer to a #idmef_user_id_t object. * @msg: Pointer to a #prelude_msgbuf_t object, where the message should be written. * * Write @user_id within @msg message buffer. The buffer is * associated with a #prelude_io_t file descriptor where the data will be written. * * Returns: 0 on success, a negative value if an error occured. */ int idmef_user_id_write(idmef_user_id_t *user_id, prelude_msgbuf_t *msg) { int ret; if ( ! user_id ) return 0; ret = prelude_msgbuf_set(msg, IDMEF_MSG_USER_ID_TAG, 0, NULL); if ( ret < 0 ) return ret; ret = prelude_string_write(idmef_user_id_get_ident(user_id), msg, IDMEF_MSG_USER_ID_IDENT); if ( ret < 0 ) return ret; ret = uint32_write(idmef_user_id_get_type(user_id), msg, IDMEF_MSG_USER_ID_TYPE); if ( ret < 0 ) return ret; ret = prelude_string_write(idmef_user_id_get_tty(user_id), msg, IDMEF_MSG_USER_ID_TTY); if ( ret < 0 ) return ret; ret = prelude_string_write(idmef_user_id_get_name(user_id), msg, IDMEF_MSG_USER_ID_NAME); if ( ret < 0 ) return ret; { uint32_t *tmp; tmp = idmef_user_id_get_number(user_id); if ( tmp ) { ret = uint32_write(*tmp, msg, IDMEF_MSG_USER_ID_NUMBER); if ( ret < 0 ) return ret; } } return prelude_msgbuf_set(msg, IDMEF_MSG_END_OF_TAG, 0, NULL); } /** * idmef_user_write: * @user: Pointer to a #idmef_user_t object. * @msg: Pointer to a #prelude_msgbuf_t object, where the message should be written. * * Write @user within @msg message buffer. The buffer is * associated with a #prelude_io_t file descriptor where the data will be written. * * Returns: 0 on success, a negative value if an error occured. */ int idmef_user_write(idmef_user_t *user, prelude_msgbuf_t *msg) { int ret; if ( ! user ) return 0; ret = prelude_msgbuf_set(msg, IDMEF_MSG_USER_TAG, 0, NULL); if ( ret < 0 ) return ret; ret = prelude_string_write(idmef_user_get_ident(user), msg, IDMEF_MSG_USER_IDENT); if ( ret < 0 ) return ret; ret = uint32_write(idmef_user_get_category(user), msg, IDMEF_MSG_USER_CATEGORY); if ( ret < 0 ) return ret; { idmef_user_id_t *user_id = NULL; while ( (user_id = idmef_user_get_next_user_id(user, user_id)) ) { ret = idmef_user_id_write(user_id, msg); if ( ret < 0 ) return ret; } } return prelude_msgbuf_set(msg, IDMEF_MSG_END_OF_TAG, 0, NULL); } /** * idmef_address_write: * @address: Pointer to a #idmef_address_t object. * @msg: Pointer to a #prelude_msgbuf_t object, where the message should be written. * * Write @address within @msg message buffer. The buffer is * associated with a #prelude_io_t file descriptor where the data will be written. * * Returns: 0 on success, a negative value if an error occured. */ int idmef_address_write(idmef_address_t *address, prelude_msgbuf_t *msg) { int ret; if ( ! address ) return 0; ret = prelude_msgbuf_set(msg, IDMEF_MSG_ADDRESS_TAG, 0, NULL); if ( ret < 0 ) return ret; ret = prelude_string_write(idmef_address_get_ident(address), msg, IDMEF_MSG_ADDRESS_IDENT); if ( ret < 0 ) return ret; ret = uint32_write(idmef_address_get_category(address), msg, IDMEF_MSG_ADDRESS_CATEGORY); if ( ret < 0 ) return ret; ret = prelude_string_write(idmef_address_get_vlan_name(address), msg, IDMEF_MSG_ADDRESS_VLAN_NAME); if ( ret < 0 ) return ret; { int32_t *tmp; tmp = idmef_address_get_vlan_num(address); if ( tmp ) { ret = int32_write(*tmp, msg, IDMEF_MSG_ADDRESS_VLAN_NUM); if ( ret < 0 ) return ret; } } ret = prelude_string_write(idmef_address_get_address(address), msg, IDMEF_MSG_ADDRESS_ADDRESS); if ( ret < 0 ) return ret; ret = prelude_string_write(idmef_address_get_netmask(address), msg, IDMEF_MSG_ADDRESS_NETMASK); if ( ret < 0 ) return ret; return prelude_msgbuf_set(msg, IDMEF_MSG_END_OF_TAG, 0, NULL); } /** * idmef_process_write: * @process: Pointer to a #idmef_process_t object. * @msg: Pointer to a #prelude_msgbuf_t object, where the message should be written. * * Write @process within @msg message buffer. The buffer is * associated with a #prelude_io_t file descriptor where the data will be written. * * Returns: 0 on success, a negative value if an error occured. */ int idmef_process_write(idmef_process_t *process, prelude_msgbuf_t *msg) { int ret; if ( ! process ) return 0; ret = prelude_msgbuf_set(msg, IDMEF_MSG_PROCESS_TAG, 0, NULL); if ( ret < 0 ) return ret; ret = prelude_string_write(idmef_process_get_ident(process), msg, IDMEF_MSG_PROCESS_IDENT); if ( ret < 0 ) return ret; ret = prelude_string_write(idmef_process_get_name(process), msg, IDMEF_MSG_PROCESS_NAME); if ( ret < 0 ) return ret; { uint32_t *tmp; tmp = idmef_process_get_pid(process); if ( tmp ) { ret = uint32_write(*tmp, msg, IDMEF_MSG_PROCESS_PID); if ( ret < 0 ) return ret; } } ret = prelude_string_write(idmef_process_get_path(process), msg, IDMEF_MSG_PROCESS_PATH); if ( ret < 0 ) return ret; { prelude_string_t *arg = NULL; while ( (arg = idmef_process_get_next_arg(process, arg)) ) { ret = prelude_string_write(arg, msg, IDMEF_MSG_PROCESS_ARG); if ( ret < 0 ) return ret; } } { prelude_string_t *env = NULL; while ( (env = idmef_process_get_next_env(process, env)) ) { ret = prelude_string_write(env, msg, IDMEF_MSG_PROCESS_ENV); if ( ret < 0 ) return ret; } } return prelude_msgbuf_set(msg, IDMEF_MSG_END_OF_TAG, 0, NULL); } /** * idmef_web_service_write: * @web_service: Pointer to a #idmef_web_service_t object. * @msg: Pointer to a #prelude_msgbuf_t object, where the message should be written. * * Write @web_service within @msg message buffer. The buffer is * associated with a #prelude_io_t file descriptor where the data will be written. * * Returns: 0 on success, a negative value if an error occured. */ int idmef_web_service_write(idmef_web_service_t *web_service, prelude_msgbuf_t *msg) { int ret; if ( ! web_service ) return 0; ret = prelude_msgbuf_set(msg, IDMEF_MSG_WEB_SERVICE_TAG, 0, NULL); if ( ret < 0 ) return ret; ret = prelude_string_write(idmef_web_service_get_url(web_service), msg, IDMEF_MSG_WEB_SERVICE_URL); if ( ret < 0 ) return ret; ret = prelude_string_write(idmef_web_service_get_cgi(web_service), msg, IDMEF_MSG_WEB_SERVICE_CGI); if ( ret < 0 ) return ret; ret = prelude_string_write(idmef_web_service_get_http_method(web_service), msg, IDMEF_MSG_WEB_SERVICE_HTTP_METHOD); if ( ret < 0 ) return ret; { prelude_string_t *arg = NULL; while ( (arg = idmef_web_service_get_next_arg(web_service, arg)) ) { ret = prelude_string_write(arg, msg, IDMEF_MSG_WEB_SERVICE_ARG); if ( ret < 0 ) return ret; } } return prelude_msgbuf_set(msg, IDMEF_MSG_END_OF_TAG, 0, NULL); } /** * idmef_snmp_service_write: * @snmp_service: Pointer to a #idmef_snmp_service_t object. * @msg: Pointer to a #prelude_msgbuf_t object, where the message should be written. * * Write @snmp_service within @msg message buffer. The buffer is * associated with a #prelude_io_t file descriptor where the data will be written. * * Returns: 0 on success, a negative value if an error occured. */ int idmef_snmp_service_write(idmef_snmp_service_t *snmp_service, prelude_msgbuf_t *msg) { int ret; if ( ! snmp_service ) return 0; ret = prelude_msgbuf_set(msg, IDMEF_MSG_SNMP_SERVICE_TAG, 0, NULL); if ( ret < 0 ) return ret; ret = prelude_string_write(idmef_snmp_service_get_oid(snmp_service), msg, IDMEF_MSG_SNMP_SERVICE_OID); if ( ret < 0 ) return ret; { uint32_t *tmp; tmp = idmef_snmp_service_get_message_processing_model(snmp_service); if ( tmp ) { ret = uint32_write(*tmp, msg, IDMEF_MSG_SNMP_SERVICE_MESSAGE_PROCESSING_MODEL); if ( ret < 0 ) return ret; } } { uint32_t *tmp; tmp = idmef_snmp_service_get_security_model(snmp_service); if ( tmp ) { ret = uint32_write(*tmp, msg, IDMEF_MSG_SNMP_SERVICE_SECURITY_MODEL); if ( ret < 0 ) return ret; } } ret = prelude_string_write(idmef_snmp_service_get_security_name(snmp_service), msg, IDMEF_MSG_SNMP_SERVICE_SECURITY_NAME); if ( ret < 0 ) return ret; { uint32_t *tmp; tmp = idmef_snmp_service_get_security_level(snmp_service); if ( tmp ) { ret = uint32_write(*tmp, msg, IDMEF_MSG_SNMP_SERVICE_SECURITY_LEVEL); if ( ret < 0 ) return ret; } } ret = prelude_string_write(idmef_snmp_service_get_context_name(snmp_service), msg, IDMEF_MSG_SNMP_SERVICE_CONTEXT_NAME); if ( ret < 0 ) return ret; ret = prelude_string_write(idmef_snmp_service_get_context_engine_id(snmp_service), msg, IDMEF_MSG_SNMP_SERVICE_CONTEXT_ENGINE_ID); if ( ret < 0 ) return ret; ret = prelude_string_write(idmef_snmp_service_get_command(snmp_service), msg, IDMEF_MSG_SNMP_SERVICE_COMMAND); if ( ret < 0 ) return ret; ret = prelude_string_write(idmef_snmp_service_get_community(snmp_service), msg, IDMEF_MSG_SNMP_SERVICE_COMMUNITY); if ( ret < 0 ) return ret; return prelude_msgbuf_set(msg, IDMEF_MSG_END_OF_TAG, 0, NULL); } /** * idmef_service_write: * @service: Pointer to a #idmef_service_t object. * @msg: Pointer to a #prelude_msgbuf_t object, where the message should be written. * * Write @service within @msg message buffer. The buffer is * associated with a #prelude_io_t file descriptor where the data will be written. * * Returns: 0 on success, a negative value if an error occured. */ int idmef_service_write(idmef_service_t *service, prelude_msgbuf_t *msg) { int ret; if ( ! service ) return 0; ret = prelude_msgbuf_set(msg, IDMEF_MSG_SERVICE_TAG, 0, NULL); if ( ret < 0 ) return ret; ret = prelude_string_write(idmef_service_get_ident(service), msg, IDMEF_MSG_SERVICE_IDENT); if ( ret < 0 ) return ret; { uint8_t *tmp; tmp = idmef_service_get_ip_version(service); if ( tmp ) { ret = uint8_write(*tmp, msg, IDMEF_MSG_SERVICE_IP_VERSION); if ( ret < 0 ) return ret; } } { uint8_t *tmp; tmp = idmef_service_get_iana_protocol_number(service); if ( tmp ) { ret = uint8_write(*tmp, msg, IDMEF_MSG_SERVICE_IANA_PROTOCOL_NUMBER); if ( ret < 0 ) return ret; } } ret = prelude_string_write(idmef_service_get_iana_protocol_name(service), msg, IDMEF_MSG_SERVICE_IANA_PROTOCOL_NAME); if ( ret < 0 ) return ret; ret = prelude_string_write(idmef_service_get_name(service), msg, IDMEF_MSG_SERVICE_NAME); if ( ret < 0 ) return ret; { uint16_t *tmp; tmp = idmef_service_get_port(service); if ( tmp ) { ret = uint16_write(*tmp, msg, IDMEF_MSG_SERVICE_PORT); if ( ret < 0 ) return ret; } } ret = prelude_string_write(idmef_service_get_portlist(service), msg, IDMEF_MSG_SERVICE_PORTLIST); if ( ret < 0 ) return ret; ret = prelude_string_write(idmef_service_get_protocol(service), msg, IDMEF_MSG_SERVICE_PROTOCOL); if ( ret < 0 ) return ret; switch ( idmef_service_get_type(service) ) { case IDMEF_SERVICE_TYPE_WEB: ret = idmef_web_service_write(idmef_service_get_web_service(service), msg); break; case IDMEF_SERVICE_TYPE_SNMP: ret = idmef_snmp_service_write(idmef_service_get_snmp_service(service), msg); break; default: /* nop */; } return prelude_msgbuf_set(msg, IDMEF_MSG_END_OF_TAG, 0, NULL); } /** * idmef_node_write: * @node: Pointer to a #idmef_node_t object. * @msg: Pointer to a #prelude_msgbuf_t object, where the message should be written. * * Write @node within @msg message buffer. The buffer is * associated with a #prelude_io_t file descriptor where the data will be written. * * Returns: 0 on success, a negative value if an error occured. */ int idmef_node_write(idmef_node_t *node, prelude_msgbuf_t *msg) { int ret; if ( ! node ) return 0; ret = prelude_msgbuf_set(msg, IDMEF_MSG_NODE_TAG, 0, NULL); if ( ret < 0 ) return ret; ret = prelude_string_write(idmef_node_get_ident(node), msg, IDMEF_MSG_NODE_IDENT); if ( ret < 0 ) return ret; ret = uint32_write(idmef_node_get_category(node), msg, IDMEF_MSG_NODE_CATEGORY); if ( ret < 0 ) return ret; ret = prelude_string_write(idmef_node_get_location(node), msg, IDMEF_MSG_NODE_LOCATION); if ( ret < 0 ) return ret; ret = prelude_string_write(idmef_node_get_name(node), msg, IDMEF_MSG_NODE_NAME); if ( ret < 0 ) return ret; { idmef_address_t *address = NULL; while ( (address = idmef_node_get_next_address(node, address)) ) { ret = idmef_address_write(address, msg); if ( ret < 0 ) return ret; } } return prelude_msgbuf_set(msg, IDMEF_MSG_END_OF_TAG, 0, NULL); } /** * idmef_source_write: * @source: Pointer to a #idmef_source_t object. * @msg: Pointer to a #prelude_msgbuf_t object, where the message should be written. * * Write @source within @msg message buffer. The buffer is * associated with a #prelude_io_t file descriptor where the data will be written. * * Returns: 0 on success, a negative value if an error occured. */ int idmef_source_write(idmef_source_t *source, prelude_msgbuf_t *msg) { int ret; if ( ! source ) return 0; ret = prelude_msgbuf_set(msg, IDMEF_MSG_SOURCE_TAG, 0, NULL); if ( ret < 0 ) return ret; ret = prelude_string_write(idmef_source_get_ident(source), msg, IDMEF_MSG_SOURCE_IDENT); if ( ret < 0 ) return ret; ret = uint32_write(idmef_source_get_spoofed(source), msg, IDMEF_MSG_SOURCE_SPOOFED); if ( ret < 0 ) return ret; ret = prelude_string_write(idmef_source_get_interface(source), msg, IDMEF_MSG_SOURCE_INTERFACE); if ( ret < 0 ) return ret; ret = idmef_node_write(idmef_source_get_node(source), msg); if ( ret < 0 ) return ret; ret = idmef_user_write(idmef_source_get_user(source), msg); if ( ret < 0 ) return ret; ret = idmef_process_write(idmef_source_get_process(source), msg); if ( ret < 0 ) return ret; ret = idmef_service_write(idmef_source_get_service(source), msg); if ( ret < 0 ) return ret; return prelude_msgbuf_set(msg, IDMEF_MSG_END_OF_TAG, 0, NULL); } /** * idmef_file_access_write: * @file_access: Pointer to a #idmef_file_access_t object. * @msg: Pointer to a #prelude_msgbuf_t object, where the message should be written. * * Write @file_access within @msg message buffer. The buffer is * associated with a #prelude_io_t file descriptor where the data will be written. * * Returns: 0 on success, a negative value if an error occured. */ int idmef_file_access_write(idmef_file_access_t *file_access, prelude_msgbuf_t *msg) { int ret; if ( ! file_access ) return 0; ret = prelude_msgbuf_set(msg, IDMEF_MSG_FILE_ACCESS_TAG, 0, NULL); if ( ret < 0 ) return ret; ret = idmef_user_id_write(idmef_file_access_get_user_id(file_access), msg); if ( ret < 0 ) return ret; { prelude_string_t *permission = NULL; while ( (permission = idmef_file_access_get_next_permission(file_access, permission)) ) { ret = prelude_string_write(permission, msg, IDMEF_MSG_FILE_ACCESS_PERMISSION); if ( ret < 0 ) return ret; } } return prelude_msgbuf_set(msg, IDMEF_MSG_END_OF_TAG, 0, NULL); } /** * idmef_inode_write: * @inode: Pointer to a #idmef_inode_t object. * @msg: Pointer to a #prelude_msgbuf_t object, where the message should be written. * * Write @inode within @msg message buffer. The buffer is * associated with a #prelude_io_t file descriptor where the data will be written. * * Returns: 0 on success, a negative value if an error occured. */ int idmef_inode_write(idmef_inode_t *inode, prelude_msgbuf_t *msg) { int ret; if ( ! inode ) return 0; ret = prelude_msgbuf_set(msg, IDMEF_MSG_INODE_TAG, 0, NULL); if ( ret < 0 ) return ret; ret = idmef_time_write(idmef_inode_get_change_time(inode), msg, IDMEF_MSG_INODE_CHANGE_TIME); if ( ret < 0 ) return ret; { uint32_t *tmp; tmp = idmef_inode_get_number(inode); if ( tmp ) { ret = uint32_write(*tmp, msg, IDMEF_MSG_INODE_NUMBER); if ( ret < 0 ) return ret; } } { uint32_t *tmp; tmp = idmef_inode_get_major_device(inode); if ( tmp ) { ret = uint32_write(*tmp, msg, IDMEF_MSG_INODE_MAJOR_DEVICE); if ( ret < 0 ) return ret; } } { uint32_t *tmp; tmp = idmef_inode_get_minor_device(inode); if ( tmp ) { ret = uint32_write(*tmp, msg, IDMEF_MSG_INODE_MINOR_DEVICE); if ( ret < 0 ) return ret; } } { uint32_t *tmp; tmp = idmef_inode_get_c_major_device(inode); if ( tmp ) { ret = uint32_write(*tmp, msg, IDMEF_MSG_INODE_C_MAJOR_DEVICE); if ( ret < 0 ) return ret; } } { uint32_t *tmp; tmp = idmef_inode_get_c_minor_device(inode); if ( tmp ) { ret = uint32_write(*tmp, msg, IDMEF_MSG_INODE_C_MINOR_DEVICE); if ( ret < 0 ) return ret; } } return prelude_msgbuf_set(msg, IDMEF_MSG_END_OF_TAG, 0, NULL); } int idmef_linkage_write(idmef_linkage_t *, prelude_msgbuf_t *); /** * idmef_checksum_write: * @checksum: Pointer to a #idmef_checksum_t object. * @msg: Pointer to a #prelude_msgbuf_t object, where the message should be written. * * Write @checksum within @msg message buffer. The buffer is * associated with a #prelude_io_t file descriptor where the data will be written. * * Returns: 0 on success, a negative value if an error occured. */ int idmef_checksum_write(idmef_checksum_t *checksum, prelude_msgbuf_t *msg) { int ret; if ( ! checksum ) return 0; ret = prelude_msgbuf_set(msg, IDMEF_MSG_CHECKSUM_TAG, 0, NULL); if ( ret < 0 ) return ret; ret = prelude_string_write(idmef_checksum_get_value(checksum), msg, IDMEF_MSG_CHECKSUM_VALUE); if ( ret < 0 ) return ret; ret = prelude_string_write(idmef_checksum_get_key(checksum), msg, IDMEF_MSG_CHECKSUM_KEY); if ( ret < 0 ) return ret; ret = uint32_write(idmef_checksum_get_algorithm(checksum), msg, IDMEF_MSG_CHECKSUM_ALGORITHM); if ( ret < 0 ) return ret; return prelude_msgbuf_set(msg, IDMEF_MSG_END_OF_TAG, 0, NULL); } /** * idmef_file_write: * @file: Pointer to a #idmef_file_t object. * @msg: Pointer to a #prelude_msgbuf_t object, where the message should be written. * * Write @file within @msg message buffer. The buffer is * associated with a #prelude_io_t file descriptor where the data will be written. * * Returns: 0 on success, a negative value if an error occured. */ int idmef_file_write(idmef_file_t *file, prelude_msgbuf_t *msg) { int ret; if ( ! file ) return 0; ret = prelude_msgbuf_set(msg, IDMEF_MSG_FILE_TAG, 0, NULL); if ( ret < 0 ) return ret; ret = prelude_string_write(idmef_file_get_ident(file), msg, IDMEF_MSG_FILE_IDENT); if ( ret < 0 ) return ret; ret = prelude_string_write(idmef_file_get_name(file), msg, IDMEF_MSG_FILE_NAME); if ( ret < 0 ) return ret; ret = prelude_string_write(idmef_file_get_path(file), msg, IDMEF_MSG_FILE_PATH); if ( ret < 0 ) return ret; ret = idmef_time_write(idmef_file_get_create_time(file), msg, IDMEF_MSG_FILE_CREATE_TIME); if ( ret < 0 ) return ret; ret = idmef_time_write(idmef_file_get_modify_time(file), msg, IDMEF_MSG_FILE_MODIFY_TIME); if ( ret < 0 ) return ret; ret = idmef_time_write(idmef_file_get_access_time(file), msg, IDMEF_MSG_FILE_ACCESS_TIME); if ( ret < 0 ) return ret; { uint64_t *tmp; tmp = idmef_file_get_data_size(file); if ( tmp ) { ret = uint64_write(*tmp, msg, IDMEF_MSG_FILE_DATA_SIZE); if ( ret < 0 ) return ret; } } { uint64_t *tmp; tmp = idmef_file_get_disk_size(file); if ( tmp ) { ret = uint64_write(*tmp, msg, IDMEF_MSG_FILE_DISK_SIZE); if ( ret < 0 ) return ret; } } { idmef_file_access_t *file_access = NULL; while ( (file_access = idmef_file_get_next_file_access(file, file_access)) ) { ret = idmef_file_access_write(file_access, msg); if ( ret < 0 ) return ret; } } { idmef_linkage_t *linkage = NULL; while ( (linkage = idmef_file_get_next_linkage(file, linkage)) ) { ret = idmef_linkage_write(linkage, msg); if ( ret < 0 ) return ret; } } ret = idmef_inode_write(idmef_file_get_inode(file), msg); if ( ret < 0 ) return ret; { idmef_checksum_t *checksum = NULL; while ( (checksum = idmef_file_get_next_checksum(file, checksum)) ) { ret = idmef_checksum_write(checksum, msg); if ( ret < 0 ) return ret; } } ret = uint32_write(idmef_file_get_category(file), msg, IDMEF_MSG_FILE_CATEGORY); if ( ret < 0 ) return ret; { idmef_file_fstype_t *tmp; tmp = idmef_file_get_fstype(file); if ( tmp ) { ret = uint32_write(*tmp, msg, IDMEF_MSG_FILE_FSTYPE); if ( ret < 0 ) return ret; } } ret = prelude_string_write(idmef_file_get_file_type(file), msg, IDMEF_MSG_FILE_FILE_TYPE); if ( ret < 0 ) return ret; return prelude_msgbuf_set(msg, IDMEF_MSG_END_OF_TAG, 0, NULL); } /** * idmef_linkage_write: * @linkage: Pointer to a #idmef_linkage_t object. * @msg: Pointer to a #prelude_msgbuf_t object, where the message should be written. * * Write @linkage within @msg message buffer. The buffer is * associated with a #prelude_io_t file descriptor where the data will be written. * * Returns: 0 on success, a negative value if an error occured. */ int idmef_linkage_write(idmef_linkage_t *linkage, prelude_msgbuf_t *msg) { int ret; if ( ! linkage ) return 0; ret = prelude_msgbuf_set(msg, IDMEF_MSG_LINKAGE_TAG, 0, NULL); if ( ret < 0 ) return ret; ret = uint32_write(idmef_linkage_get_category(linkage), msg, IDMEF_MSG_LINKAGE_CATEGORY); if ( ret < 0 ) return ret; ret = prelude_string_write(idmef_linkage_get_name(linkage), msg, IDMEF_MSG_LINKAGE_NAME); if ( ret < 0 ) return ret; ret = prelude_string_write(idmef_linkage_get_path(linkage), msg, IDMEF_MSG_LINKAGE_PATH); if ( ret < 0 ) return ret; ret = idmef_file_write(idmef_linkage_get_file(linkage), msg); if ( ret < 0 ) return ret; return prelude_msgbuf_set(msg, IDMEF_MSG_END_OF_TAG, 0, NULL); } /** * idmef_target_write: * @target: Pointer to a #idmef_target_t object. * @msg: Pointer to a #prelude_msgbuf_t object, where the message should be written. * * Write @target within @msg message buffer. The buffer is * associated with a #prelude_io_t file descriptor where the data will be written. * * Returns: 0 on success, a negative value if an error occured. */ int idmef_target_write(idmef_target_t *target, prelude_msgbuf_t *msg) { int ret; if ( ! target ) return 0; ret = prelude_msgbuf_set(msg, IDMEF_MSG_TARGET_TAG, 0, NULL); if ( ret < 0 ) return ret; ret = prelude_string_write(idmef_target_get_ident(target), msg, IDMEF_MSG_TARGET_IDENT); if ( ret < 0 ) return ret; ret = uint32_write(idmef_target_get_decoy(target), msg, IDMEF_MSG_TARGET_DECOY); if ( ret < 0 ) return ret; ret = prelude_string_write(idmef_target_get_interface(target), msg, IDMEF_MSG_TARGET_INTERFACE); if ( ret < 0 ) return ret; ret = idmef_node_write(idmef_target_get_node(target), msg); if ( ret < 0 ) return ret; ret = idmef_user_write(idmef_target_get_user(target), msg); if ( ret < 0 ) return ret; ret = idmef_process_write(idmef_target_get_process(target), msg); if ( ret < 0 ) return ret; ret = idmef_service_write(idmef_target_get_service(target), msg); if ( ret < 0 ) return ret; { idmef_file_t *file = NULL; while ( (file = idmef_target_get_next_file(target, file)) ) { ret = idmef_file_write(file, msg); if ( ret < 0 ) return ret; } } return prelude_msgbuf_set(msg, IDMEF_MSG_END_OF_TAG, 0, NULL); } /** * idmef_analyzer_write: * @analyzer: Pointer to a #idmef_analyzer_t object. * @msg: Pointer to a #prelude_msgbuf_t object, where the message should be written. * * Write @analyzer within @msg message buffer. The buffer is * associated with a #prelude_io_t file descriptor where the data will be written. * * Returns: 0 on success, a negative value if an error occured. */ int idmef_analyzer_write(idmef_analyzer_t *analyzer, prelude_msgbuf_t *msg) { int ret; if ( ! analyzer ) return 0; ret = prelude_msgbuf_set(msg, IDMEF_MSG_ANALYZER_TAG, 0, NULL); if ( ret < 0 ) return ret; ret = prelude_string_write(idmef_analyzer_get_analyzerid(analyzer), msg, IDMEF_MSG_ANALYZER_ANALYZERID); if ( ret < 0 ) return ret; ret = prelude_string_write(idmef_analyzer_get_name(analyzer), msg, IDMEF_MSG_ANALYZER_NAME); if ( ret < 0 ) return ret; ret = prelude_string_write(idmef_analyzer_get_manufacturer(analyzer), msg, IDMEF_MSG_ANALYZER_MANUFACTURER); if ( ret < 0 ) return ret; ret = prelude_string_write(idmef_analyzer_get_model(analyzer), msg, IDMEF_MSG_ANALYZER_MODEL); if ( ret < 0 ) return ret; ret = prelude_string_write(idmef_analyzer_get_version(analyzer), msg, IDMEF_MSG_ANALYZER_VERSION); if ( ret < 0 ) return ret; ret = prelude_string_write(idmef_analyzer_get_class(analyzer), msg, IDMEF_MSG_ANALYZER_CLASS); if ( ret < 0 ) return ret; ret = prelude_string_write(idmef_analyzer_get_ostype(analyzer), msg, IDMEF_MSG_ANALYZER_OSTYPE); if ( ret < 0 ) return ret; ret = prelude_string_write(idmef_analyzer_get_osversion(analyzer), msg, IDMEF_MSG_ANALYZER_OSVERSION); if ( ret < 0 ) return ret; ret = idmef_node_write(idmef_analyzer_get_node(analyzer), msg); if ( ret < 0 ) return ret; ret = idmef_process_write(idmef_analyzer_get_process(analyzer), msg); if ( ret < 0 ) return ret; return prelude_msgbuf_set(msg, IDMEF_MSG_END_OF_TAG, 0, NULL); } /** * idmef_alertident_write: * @alertident: Pointer to a #idmef_alertident_t object. * @msg: Pointer to a #prelude_msgbuf_t object, where the message should be written. * * Write @alertident within @msg message buffer. The buffer is * associated with a #prelude_io_t file descriptor where the data will be written. * * Returns: 0 on success, a negative value if an error occured. */ int idmef_alertident_write(idmef_alertident_t *alertident, prelude_msgbuf_t *msg) { int ret; if ( ! alertident ) return 0; ret = prelude_msgbuf_set(msg, IDMEF_MSG_ALERTIDENT_TAG, 0, NULL); if ( ret < 0 ) return ret; ret = prelude_string_write(idmef_alertident_get_alertident(alertident), msg, IDMEF_MSG_ALERTIDENT_ALERTIDENT); if ( ret < 0 ) return ret; ret = prelude_string_write(idmef_alertident_get_analyzerid(alertident), msg, IDMEF_MSG_ALERTIDENT_ANALYZERID); if ( ret < 0 ) return ret; return prelude_msgbuf_set(msg, IDMEF_MSG_END_OF_TAG, 0, NULL); } /** * idmef_impact_write: * @impact: Pointer to a #idmef_impact_t object. * @msg: Pointer to a #prelude_msgbuf_t object, where the message should be written. * * Write @impact within @msg message buffer. The buffer is * associated with a #prelude_io_t file descriptor where the data will be written. * * Returns: 0 on success, a negative value if an error occured. */ int idmef_impact_write(idmef_impact_t *impact, prelude_msgbuf_t *msg) { int ret; if ( ! impact ) return 0; ret = prelude_msgbuf_set(msg, IDMEF_MSG_IMPACT_TAG, 0, NULL); if ( ret < 0 ) return ret; { idmef_impact_severity_t *tmp; tmp = idmef_impact_get_severity(impact); if ( tmp ) { ret = uint32_write(*tmp, msg, IDMEF_MSG_IMPACT_SEVERITY); if ( ret < 0 ) return ret; prelude_msg_set_priority(prelude_msgbuf_get_msg(msg), _idmef_impact_severity_to_msg_priority(*tmp)); } } { idmef_impact_completion_t *tmp; tmp = idmef_impact_get_completion(impact); if ( tmp ) { ret = uint32_write(*tmp, msg, IDMEF_MSG_IMPACT_COMPLETION); if ( ret < 0 ) return ret; } } ret = uint32_write(idmef_impact_get_type(impact), msg, IDMEF_MSG_IMPACT_TYPE); if ( ret < 0 ) return ret; ret = prelude_string_write(idmef_impact_get_description(impact), msg, IDMEF_MSG_IMPACT_DESCRIPTION); if ( ret < 0 ) return ret; return prelude_msgbuf_set(msg, IDMEF_MSG_END_OF_TAG, 0, NULL); } /** * idmef_action_write: * @action: Pointer to a #idmef_action_t object. * @msg: Pointer to a #prelude_msgbuf_t object, where the message should be written. * * Write @action within @msg message buffer. The buffer is * associated with a #prelude_io_t file descriptor where the data will be written. * * Returns: 0 on success, a negative value if an error occured. */ int idmef_action_write(idmef_action_t *action, prelude_msgbuf_t *msg) { int ret; if ( ! action ) return 0; ret = prelude_msgbuf_set(msg, IDMEF_MSG_ACTION_TAG, 0, NULL); if ( ret < 0 ) return ret; ret = uint32_write(idmef_action_get_category(action), msg, IDMEF_MSG_ACTION_CATEGORY); if ( ret < 0 ) return ret; ret = prelude_string_write(idmef_action_get_description(action), msg, IDMEF_MSG_ACTION_DESCRIPTION); if ( ret < 0 ) return ret; return prelude_msgbuf_set(msg, IDMEF_MSG_END_OF_TAG, 0, NULL); } /** * idmef_confidence_write: * @confidence: Pointer to a #idmef_confidence_t object. * @msg: Pointer to a #prelude_msgbuf_t object, where the message should be written. * * Write @confidence within @msg message buffer. The buffer is * associated with a #prelude_io_t file descriptor where the data will be written. * * Returns: 0 on success, a negative value if an error occured. */ int idmef_confidence_write(idmef_confidence_t *confidence, prelude_msgbuf_t *msg) { int ret; if ( ! confidence ) return 0; ret = prelude_msgbuf_set(msg, IDMEF_MSG_CONFIDENCE_TAG, 0, NULL); if ( ret < 0 ) return ret; ret = uint32_write(idmef_confidence_get_rating(confidence), msg, IDMEF_MSG_CONFIDENCE_RATING); if ( ret < 0 ) return ret; ret = float_write(idmef_confidence_get_confidence(confidence), msg, IDMEF_MSG_CONFIDENCE_CONFIDENCE); if ( ret < 0 ) return ret; return prelude_msgbuf_set(msg, IDMEF_MSG_END_OF_TAG, 0, NULL); } /** * idmef_assessment_write: * @assessment: Pointer to a #idmef_assessment_t object. * @msg: Pointer to a #prelude_msgbuf_t object, where the message should be written. * * Write @assessment within @msg message buffer. The buffer is * associated with a #prelude_io_t file descriptor where the data will be written. * * Returns: 0 on success, a negative value if an error occured. */ int idmef_assessment_write(idmef_assessment_t *assessment, prelude_msgbuf_t *msg) { int ret; if ( ! assessment ) return 0; ret = prelude_msgbuf_set(msg, IDMEF_MSG_ASSESSMENT_TAG, 0, NULL); if ( ret < 0 ) return ret; ret = idmef_impact_write(idmef_assessment_get_impact(assessment), msg); if ( ret < 0 ) return ret; { idmef_action_t *action = NULL; while ( (action = idmef_assessment_get_next_action(assessment, action)) ) { ret = idmef_action_write(action, msg); if ( ret < 0 ) return ret; } } ret = idmef_confidence_write(idmef_assessment_get_confidence(assessment), msg); if ( ret < 0 ) return ret; return prelude_msgbuf_set(msg, IDMEF_MSG_END_OF_TAG, 0, NULL); } /** * idmef_tool_alert_write: * @tool_alert: Pointer to a #idmef_tool_alert_t object. * @msg: Pointer to a #prelude_msgbuf_t object, where the message should be written. * * Write @tool_alert within @msg message buffer. The buffer is * associated with a #prelude_io_t file descriptor where the data will be written. * * Returns: 0 on success, a negative value if an error occured. */ int idmef_tool_alert_write(idmef_tool_alert_t *tool_alert, prelude_msgbuf_t *msg) { int ret; if ( ! tool_alert ) return 0; ret = prelude_msgbuf_set(msg, IDMEF_MSG_TOOL_ALERT_TAG, 0, NULL); if ( ret < 0 ) return ret; ret = prelude_string_write(idmef_tool_alert_get_name(tool_alert), msg, IDMEF_MSG_TOOL_ALERT_NAME); if ( ret < 0 ) return ret; ret = prelude_string_write(idmef_tool_alert_get_command(tool_alert), msg, IDMEF_MSG_TOOL_ALERT_COMMAND); if ( ret < 0 ) return ret; { idmef_alertident_t *alertident = NULL; while ( (alertident = idmef_tool_alert_get_next_alertident(tool_alert, alertident)) ) { ret = idmef_alertident_write(alertident, msg); if ( ret < 0 ) return ret; } } return prelude_msgbuf_set(msg, IDMEF_MSG_END_OF_TAG, 0, NULL); } /** * idmef_correlation_alert_write: * @correlation_alert: Pointer to a #idmef_correlation_alert_t object. * @msg: Pointer to a #prelude_msgbuf_t object, where the message should be written. * * Write @correlation_alert within @msg message buffer. The buffer is * associated with a #prelude_io_t file descriptor where the data will be written. * * Returns: 0 on success, a negative value if an error occured. */ int idmef_correlation_alert_write(idmef_correlation_alert_t *correlation_alert, prelude_msgbuf_t *msg) { int ret; if ( ! correlation_alert ) return 0; ret = prelude_msgbuf_set(msg, IDMEF_MSG_CORRELATION_ALERT_TAG, 0, NULL); if ( ret < 0 ) return ret; ret = prelude_string_write(idmef_correlation_alert_get_name(correlation_alert), msg, IDMEF_MSG_CORRELATION_ALERT_NAME); if ( ret < 0 ) return ret; { idmef_alertident_t *alertident = NULL; while ( (alertident = idmef_correlation_alert_get_next_alertident(correlation_alert, alertident)) ) { ret = idmef_alertident_write(alertident, msg); if ( ret < 0 ) return ret; } } return prelude_msgbuf_set(msg, IDMEF_MSG_END_OF_TAG, 0, NULL); } /** * idmef_overflow_alert_write: * @overflow_alert: Pointer to a #idmef_overflow_alert_t object. * @msg: Pointer to a #prelude_msgbuf_t object, where the message should be written. * * Write @overflow_alert within @msg message buffer. The buffer is * associated with a #prelude_io_t file descriptor where the data will be written. * * Returns: 0 on success, a negative value if an error occured. */ int idmef_overflow_alert_write(idmef_overflow_alert_t *overflow_alert, prelude_msgbuf_t *msg) { int ret; if ( ! overflow_alert ) return 0; ret = prelude_msgbuf_set(msg, IDMEF_MSG_OVERFLOW_ALERT_TAG, 0, NULL); if ( ret < 0 ) return ret; ret = prelude_string_write(idmef_overflow_alert_get_program(overflow_alert), msg, IDMEF_MSG_OVERFLOW_ALERT_PROGRAM); if ( ret < 0 ) return ret; { uint32_t *tmp; tmp = idmef_overflow_alert_get_size(overflow_alert); if ( tmp ) { ret = uint32_write(*tmp, msg, IDMEF_MSG_OVERFLOW_ALERT_SIZE); if ( ret < 0 ) return ret; } } ret = idmef_data_write(idmef_overflow_alert_get_buffer(overflow_alert), msg, IDMEF_MSG_OVERFLOW_ALERT_BUFFER); if ( ret < 0 ) return ret; return prelude_msgbuf_set(msg, IDMEF_MSG_END_OF_TAG, 0, NULL); } /** * idmef_alert_write: * @alert: Pointer to a #idmef_alert_t object. * @msg: Pointer to a #prelude_msgbuf_t object, where the message should be written. * * Write @alert within @msg message buffer. The buffer is * associated with a #prelude_io_t file descriptor where the data will be written. * * Returns: 0 on success, a negative value if an error occured. */ int idmef_alert_write(idmef_alert_t *alert, prelude_msgbuf_t *msg) { int ret; if ( ! alert ) return 0; ret = prelude_msgbuf_set(msg, IDMEF_MSG_ALERT_TAG, 0, NULL); if ( ret < 0 ) return ret; ret = prelude_string_write(idmef_alert_get_messageid(alert), msg, IDMEF_MSG_ALERT_MESSAGEID); if ( ret < 0 ) return ret; { idmef_analyzer_t *analyzer = NULL; while ( (analyzer = idmef_alert_get_next_analyzer(alert, analyzer)) ) { ret = idmef_analyzer_write(analyzer, msg); if ( ret < 0 ) return ret; } } ret = idmef_time_write(idmef_alert_get_create_time(alert), msg, IDMEF_MSG_ALERT_CREATE_TIME); if ( ret < 0 ) return ret; ret = idmef_classification_write(idmef_alert_get_classification(alert), msg); if ( ret < 0 ) return ret; ret = idmef_time_write(idmef_alert_get_detect_time(alert), msg, IDMEF_MSG_ALERT_DETECT_TIME); if ( ret < 0 ) return ret; ret = idmef_time_write(idmef_alert_get_analyzer_time(alert), msg, IDMEF_MSG_ALERT_ANALYZER_TIME); if ( ret < 0 ) return ret; { idmef_source_t *source = NULL; while ( (source = idmef_alert_get_next_source(alert, source)) ) { ret = idmef_source_write(source, msg); if ( ret < 0 ) return ret; } } { idmef_target_t *target = NULL; while ( (target = idmef_alert_get_next_target(alert, target)) ) { ret = idmef_target_write(target, msg); if ( ret < 0 ) return ret; } } ret = idmef_assessment_write(idmef_alert_get_assessment(alert), msg); if ( ret < 0 ) return ret; { idmef_additional_data_t *additional_data = NULL; while ( (additional_data = idmef_alert_get_next_additional_data(alert, additional_data)) ) { ret = idmef_additional_data_write(additional_data, msg); if ( ret < 0 ) return ret; } } switch ( idmef_alert_get_type(alert) ) { case IDMEF_ALERT_TYPE_TOOL: ret = idmef_tool_alert_write(idmef_alert_get_tool_alert(alert), msg); break; case IDMEF_ALERT_TYPE_CORRELATION: ret = idmef_correlation_alert_write(idmef_alert_get_correlation_alert(alert), msg); break; case IDMEF_ALERT_TYPE_OVERFLOW: ret = idmef_overflow_alert_write(idmef_alert_get_overflow_alert(alert), msg); break; default: /* nop */; } return prelude_msgbuf_set(msg, IDMEF_MSG_END_OF_TAG, 0, NULL); } /** * idmef_heartbeat_write: * @heartbeat: Pointer to a #idmef_heartbeat_t object. * @msg: Pointer to a #prelude_msgbuf_t object, where the message should be written. * * Write @heartbeat within @msg message buffer. The buffer is * associated with a #prelude_io_t file descriptor where the data will be written. * * Returns: 0 on success, a negative value if an error occured. */ int idmef_heartbeat_write(idmef_heartbeat_t *heartbeat, prelude_msgbuf_t *msg) { int ret; if ( ! heartbeat ) return 0; prelude_msg_set_priority(prelude_msgbuf_get_msg(msg), PRELUDE_MSG_PRIORITY_HIGH); ret = prelude_msgbuf_set(msg, IDMEF_MSG_HEARTBEAT_TAG, 0, NULL); if ( ret < 0 ) return ret; ret = prelude_string_write(idmef_heartbeat_get_messageid(heartbeat), msg, IDMEF_MSG_HEARTBEAT_MESSAGEID); if ( ret < 0 ) return ret; { idmef_analyzer_t *analyzer = NULL; while ( (analyzer = idmef_heartbeat_get_next_analyzer(heartbeat, analyzer)) ) { ret = idmef_analyzer_write(analyzer, msg); if ( ret < 0 ) return ret; } } ret = idmef_time_write(idmef_heartbeat_get_create_time(heartbeat), msg, IDMEF_MSG_HEARTBEAT_CREATE_TIME); if ( ret < 0 ) return ret; ret = idmef_time_write(idmef_heartbeat_get_analyzer_time(heartbeat), msg, IDMEF_MSG_HEARTBEAT_ANALYZER_TIME); if ( ret < 0 ) return ret; { uint32_t *tmp; tmp = idmef_heartbeat_get_heartbeat_interval(heartbeat); if ( tmp ) { ret = uint32_write(*tmp, msg, IDMEF_MSG_HEARTBEAT_HEARTBEAT_INTERVAL); if ( ret < 0 ) return ret; } } { idmef_additional_data_t *additional_data = NULL; while ( (additional_data = idmef_heartbeat_get_next_additional_data(heartbeat, additional_data)) ) { ret = idmef_additional_data_write(additional_data, msg); if ( ret < 0 ) return ret; } } return prelude_msgbuf_set(msg, IDMEF_MSG_END_OF_TAG, 0, NULL); } /** * idmef_message_write: * @message: Pointer to a #idmef_message_t object. * @msg: Pointer to a #prelude_msgbuf_t object, where the message should be written. * * Write @message within @msg message buffer. The buffer is * associated with a #prelude_io_t file descriptor where the data will be written. * * Returns: 0 on success, a negative value if an error occured. */ int idmef_message_write(idmef_message_t *message, prelude_msgbuf_t *msg) { int ret; if ( ! message ) return 0; ret = prelude_string_write(idmef_message_get_version(message), msg, IDMEF_MSG_MESSAGE_VERSION); if ( ret < 0 ) return ret; switch ( idmef_message_get_type(message) ) { case IDMEF_MESSAGE_TYPE_ALERT: ret = idmef_alert_write(idmef_message_get_alert(message), msg); break; case IDMEF_MESSAGE_TYPE_HEARTBEAT: ret = idmef_heartbeat_write(idmef_message_get_heartbeat(message), msg); break; default: /* nop */; } return prelude_msgbuf_set(msg, IDMEF_MSG_END_OF_TAG, 0, NULL); } libprelude-1.0.0/src/prelude-msgbuf.c0000664000076400007640000001370511202225027014445 00000000000000/***** * * Copyright (C) 2002,2003,2004,2005 PreludeIDS Technologies. All Rights Reserved. * Author: Yoann Vandoorselaere * * This file is part of the Prelude library. * * 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; see the file COPYING. If not, write to * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. * *****/ #include "config.h" #include #include #include #include "prelude-log.h" #include "prelude-list.h" #include "prelude-inttypes.h" #include "prelude-linked-object.h" #include "prelude-async.h" #include "prelude-io.h" #include "prelude-msg.h" #include "prelude-msgbuf.h" #include "prelude-error.h" struct prelude_msgbuf { int flags; void *data; prelude_msg_t *msg; int (*send_msg)(prelude_msgbuf_t *msgbuf, prelude_msg_t *msg); }; static int default_send_msg_cb(prelude_msg_t **msg, void *data); static int do_send_msg(prelude_msgbuf_t *msgbuf, prelude_msg_t *msg) { int ret; ret = msgbuf->send_msg(msgbuf, msg); if ( ret < 0 && prelude_error_get_code(ret) == PRELUDE_ERROR_EAGAIN ) return ret; prelude_msg_recycle(msg); prelude_msg_set_priority(msg, PRELUDE_MSG_PRIORITY_NONE); return ret; } static int do_send_msg_async(prelude_msgbuf_t *msgbuf, prelude_msg_t *msg) { int ret; ret = msgbuf->send_msg(msgbuf, msg); if ( ret < 0 && prelude_error_get_code(ret) == PRELUDE_ERROR_EAGAIN ) return ret; ret = prelude_msg_dynamic_new(&msgbuf->msg, default_send_msg_cb, msgbuf); if ( ret < 0 ) return ret; return 0; } static int default_send_msg_cb(prelude_msg_t **msg, void *data) { int ret; prelude_msgbuf_t *msgbuf = data; if ( msgbuf->flags & PRELUDE_MSGBUF_FLAGS_ASYNC ) ret = do_send_msg_async(msgbuf, *msg); else ret = do_send_msg(msgbuf, *msg); *msg = msgbuf->msg; return ret; } /** * prelude_msgbuf_set: * @msgbuf: Pointer on a #prelude_msgbuf_t object to store the data to. * @tag: 8 bits unsigned integer describing the kind of data. * @len: len of the data chunk. * @data: Pointer to the data. * * prelude_msgbuf_set() append @len bytes of data from the @data buffer * to the @msgbuf object representing a message. The data is tagged with @tag. * * Returns: 0 on success, a negative value if an error occured. */ int prelude_msgbuf_set(prelude_msgbuf_t *msgbuf, uint8_t tag, uint32_t len, const void *data) { return prelude_msg_set(msgbuf->msg, tag, len, data); } /** * prelude_msgbuf_new: * @msgbuf: Pointer where to store the created #prelude_msgbuf_t object. * * Create a new #prelude_msgbuf_t object and store it into @msgbuf. * You can then write data to @msgbuf using the prelude_msgbuf_set() function. * * When the message buffer is full, the message will be flushed using the * user provided callback. * * Returns: 0 on success, or a negative value if an error occured. */ int prelude_msgbuf_new(prelude_msgbuf_t **msgbuf) { int ret; *msgbuf = calloc(1, sizeof(**msgbuf)); if ( ! *msgbuf ) return prelude_error_from_errno(errno); ret = prelude_msg_dynamic_new(&(*msgbuf)->msg, default_send_msg_cb, *msgbuf); if ( ret < 0 ) return ret; return 0; } /** * prelude_msgbuf_get_msg: * @msgbuf: Pointer on a #prelude_msgbuf_t object. * * Returns: This function return the current message associated with * the message buffer. */ prelude_msg_t *prelude_msgbuf_get_msg(prelude_msgbuf_t *msgbuf) { return msgbuf->msg; } /** * prelude_msgbuf_mark_end: * @msgbuf: Pointer on #prelude_msgbuf_t object. * * This function should be called to tell the msgbuf subsystem * that you finished writing your message. */ void prelude_msgbuf_mark_end(prelude_msgbuf_t *msgbuf) { prelude_msg_mark_end(msgbuf->msg); /* * FIXME: * only flush the message if we're not under an alert burst. */ default_send_msg_cb(&msgbuf->msg, msgbuf); } /** * prelude_msgbuf_destroy: * @msgbuf: Pointer on a #prelude_msgbuf_t object. * * Destroy @msgbuf, all data remaining will be flushed. */ void prelude_msgbuf_destroy(prelude_msgbuf_t *msgbuf) { if ( msgbuf->msg && ! prelude_msg_is_empty(msgbuf->msg) ) default_send_msg_cb(&msgbuf->msg, msgbuf); if ( msgbuf->msg ) prelude_msg_destroy(msgbuf->msg); free(msgbuf); } /** * prelude_msgbuf_set_callback: * @msgbuf: Pointer on a #prelude_msgbuf_t object. * @send_msg: Pointer to a function for sending a message. * * Associate an application specific callback to this @msgbuf. */ void prelude_msgbuf_set_callback(prelude_msgbuf_t *msgbuf, int (*send_msg)(prelude_msgbuf_t *msgbuf, prelude_msg_t *msg)) { msgbuf->send_msg = send_msg; } void prelude_msgbuf_set_data(prelude_msgbuf_t *msgbuf, void *data) { msgbuf->data = data; } void *prelude_msgbuf_get_data(prelude_msgbuf_t *msgbuf) { return msgbuf->data; } void prelude_msgbuf_set_flags(prelude_msgbuf_t *msgbuf, prelude_msgbuf_flags_t flags) { msgbuf->flags = flags; } prelude_msgbuf_flags_t prelude_msgbuf_get_flags(prelude_msgbuf_t *msgbuf) { return msgbuf->flags; } libprelude-1.0.0/src/idmef-value.c0000664000076400007640000010716111204543421013725 00000000000000/***** * * Copyright (C) 2003-2006,2007,2008 PreludeIDS Technologies. All Rights Reserved. * Author: Nicolas Delon * Author: Yoann Vandoorselaere * * This file is part of the Prelude library. * * 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; see the file COPYING. If not, write to * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. * *****/ #include "config.h" #include #include #include #include #include #include #include "prelude-list.h" #include "prelude-log.h" #include "prelude-inttypes.h" #include "prelude-string.h" #include "prelude-error.h" #include "common.h" #include "idmef.h" #include "idmef-value-type.h" #define CHUNK_SIZE 16 #define FLOAT_TOLERANCE 0.0001 #ifndef MAX # define MAX(x, y) ((x) > (y) ? (x) : (y)) #endif #ifndef ABS # define ABS(x) (((x) < 0) ? -(x) : (x)) #endif #define idmef_value_new_decl(mtype, vname, vtype) \ int idmef_value_new_ ## vname (idmef_value_t **value, vtype val) { \ int ret; \ \ ret = idmef_value_create(value, IDMEF_VALUE_TYPE_ ## mtype); \ if ( ret < 0 ) \ return ret; \ \ (*value)->type.data. vname ## _val = val; \ \ return 0; \ } #define idmef_value_set_decl(mtype, vname, vtype) \ int idmef_value_set_ ## vname (idmef_value_t *value, vtype val) \ { \ prelude_return_val_if_fail(value, prelude_error(PRELUDE_ERROR_ASSERTION)); \ \ if ( value->own_data ) \ idmef_value_type_destroy(&value->type); \ \ value->type.id = IDMEF_VALUE_TYPE_ ## mtype; \ value->type.data. vname ## _val = val; \ value->own_data = TRUE; \ \ return 0; \ } #define idmef_value_get_decl(mtype, vname, vtype) \ vtype idmef_value_get_ ## vname (const idmef_value_t *val) \ { \ prelude_return_val_if_fail(val, (vtype) 0); \ \ if ( val->type.id != IDMEF_VALUE_TYPE_ ## mtype ) \ return (vtype) 0; \ \ return val->type.data. vname ## _val; \ } #define idmef_value_decl(mtype, vname, vtype) \ idmef_value_new_decl(mtype, vname, vtype) \ idmef_value_get_decl(mtype, vname, vtype) \ idmef_value_set_decl(mtype, vname, vtype) #define CASTCHK(ntype, fval, src, dst) \ if ( ! (src == dst && (src < 1) == (dst < 1)) ) \ return prelude_error_verbose(PRELUDE_ERROR_GENERIC, \ "Value '%" fval "' is incompatible with output type '%s'", \ src, idmef_value_type_to_string(ntype)) #define FLOATCHK(ntype, fval, src, dst) \ if ( reldif(src, dst) > FLOAT_TOLERANCE ) \ return prelude_error_verbose(PRELUDE_ERROR_GENERIC, \ "Value '%" fval "' is incompatible with output type '%s'", \ src, idmef_value_type_to_string(ntype)) #define VALUE_CAST_CHECK(v, itype_t, itype, iformat, ntype) do { \ itype_t src = idmef_value_get_ ##itype(value); \ \ if ( ntype == IDMEF_VALUE_TYPE_INT8 ) { \ CASTCHK(ntype, iformat, src, (int8_t) src); \ idmef_value_set_int8(value, src); \ \ } else if ( ntype == IDMEF_VALUE_TYPE_UINT8 ) { \ CASTCHK(ntype, iformat, src, (uint8_t) src); \ idmef_value_set_uint8(value, src); \ \ } else if ( ntype == IDMEF_VALUE_TYPE_INT16 ) { \ CASTCHK(ntype, iformat, src, (int16_t) src); \ idmef_value_set_int16(value, src); \ \ } else if ( ntype == IDMEF_VALUE_TYPE_UINT16 ) { \ CASTCHK(ntype, iformat, src, (uint16_t) src); \ idmef_value_set_uint16(value, src); \ \ } else if ( ntype == IDMEF_VALUE_TYPE_INT32 ) { \ CASTCHK(ntype, iformat, src, (int32_t) src); \ idmef_value_set_int32(value, src); \ \ } else if ( ntype == IDMEF_VALUE_TYPE_UINT32 ) { \ CASTCHK(ntype, iformat, src, (uint32_t) src); \ idmef_value_set_uint32(value, src); \ \ } else if ( ntype == IDMEF_VALUE_TYPE_INT64 ) { \ CASTCHK(ntype, iformat, src, (int64_t) src); \ idmef_value_set_int64(value, src); \ \ } else if ( ntype == IDMEF_VALUE_TYPE_UINT64 ) { \ CASTCHK(ntype, iformat, src, (uint64_t) src); \ idmef_value_set_uint64(value, src); \ \ } else if ( ntype == IDMEF_VALUE_TYPE_FLOAT ) { \ FLOATCHK(ntype, iformat, src, (float) src); \ idmef_value_set_float(value, src); \ \ } else if ( ntype == IDMEF_VALUE_TYPE_DOUBLE ) { \ FLOATCHK(ntype, iformat, src, (double) src); \ idmef_value_set_double(value, src); \ \ } else return prelude_error_verbose(PRELUDE_ERROR_GENERIC, \ "Unable to handle output type '%s' for integer cast", \ idmef_value_type_to_string(ntype)); \ } while(0) typedef struct compare { unsigned int match; idmef_value_t *val2; idmef_criterion_operator_t operator; } compare_t; struct idmef_value { int list_elems; int list_max; int refcount; prelude_bool_t own_data; idmef_value_t **list; idmef_value_type_t type; }; /* * Returns the relative difference of two real numbers: 0.0 if they are * exactly the same, otherwise, the ratio of the difference to the * larger of the two. */ static double reldif(double a, double b) { double c = ABS(a); double d = ABS(b); d = MAX(c, d); return d == 0.0 ? 0.0 : ABS(a - b) / d; } static int string_isdigit(const char *s) { while ( *s ) { if ( ! isdigit((int) *s) ) return -1; s++; } return 0; } static int idmef_value_create(idmef_value_t **ret, idmef_value_type_id_t type_id) { *ret = calloc(1, sizeof(**ret)); if ( ! *ret ) return prelude_error_from_errno(errno); (*ret)->refcount = 1; (*ret)->own_data = TRUE; (*ret)->type.id = type_id; return 0; } idmef_value_decl(INT8, int8, int8_t) idmef_value_decl(UINT8, uint8, uint8_t) idmef_value_decl(INT16, int16, int16_t) idmef_value_decl(UINT16, uint16, uint16_t) idmef_value_decl(INT32, int32, int32_t) idmef_value_decl(UINT32, uint32, uint32_t) idmef_value_decl(INT64, int64, int64_t) idmef_value_decl(UINT64, uint64, uint64_t) idmef_value_decl(FLOAT, float, float) idmef_value_decl(DOUBLE, double, double) idmef_value_decl(STRING, string, prelude_string_t *) idmef_value_decl(DATA, data, idmef_data_t *) idmef_value_decl(TIME, time, idmef_time_t *) int idmef_value_get_enum(const idmef_value_t *value) { prelude_return_val_if_fail(value, prelude_error(PRELUDE_ERROR_ASSERTION)); if ( value->type.id != IDMEF_VALUE_TYPE_ENUM ) return 0; return value->type.data.enum_val.value; } int idmef_value_set_class(idmef_value_t *value, idmef_class_id_t class, void *object) { prelude_return_val_if_fail(value, prelude_error(PRELUDE_ERROR_ASSERTION)); prelude_return_val_if_fail(object, prelude_error(PRELUDE_ERROR_ASSERTION)); if ( value->own_data ) idmef_value_type_destroy(&value->type); value->own_data = TRUE; value->type.data.class_val.object = object; value->type.data.class_val.class_id = class; return 0; } int idmef_value_new_class(idmef_value_t **value, idmef_class_id_t class, void *object) { int ret; prelude_return_val_if_fail(object, prelude_error(PRELUDE_ERROR_ASSERTION)); ret = idmef_value_create(value, IDMEF_VALUE_TYPE_CLASS); if ( ret < 0 ) return ret; (*value)->type.data.class_val.object = object; (*value)->type.data.class_val.class_id = class; return ret; } int idmef_value_set_enum_from_numeric(idmef_value_t *value, idmef_class_id_t class, int val) { prelude_return_val_if_fail(value, prelude_error(PRELUDE_ERROR_ASSERTION)); if ( value->own_data ) idmef_value_type_destroy(&value->type); value->own_data = TRUE; value->type.id = IDMEF_VALUE_TYPE_ENUM; value->type.data.enum_val.value = val; value->type.data.enum_val.class_id = class; return 0; } int idmef_value_set_enum_from_string(idmef_value_t *value, idmef_class_id_t class, const char *buf) { int ret; prelude_return_val_if_fail(value, prelude_error(PRELUDE_ERROR_ASSERTION)); prelude_return_val_if_fail(buf, prelude_error(PRELUDE_ERROR_ASSERTION)); ret = idmef_class_enum_to_numeric(class, buf); if ( ret < 0 ) return ret; return idmef_value_set_enum_from_numeric(value, class, ret); } int idmef_value_set_enum(idmef_value_t *value, idmef_class_id_t class, const char *buf) { int ret; prelude_return_val_if_fail(value, prelude_error(PRELUDE_ERROR_ASSERTION)); prelude_return_val_if_fail(buf, prelude_error(PRELUDE_ERROR_ASSERTION)); if ( string_isdigit(buf) == 0 ) ret = idmef_value_set_enum_from_numeric(value, class, atoi(buf)); else ret = idmef_value_set_enum_from_string(value, class, buf); return ret; } int idmef_value_new_enum_from_numeric(idmef_value_t **value, idmef_class_id_t class, int val) { int ret; ret = idmef_value_create(value, IDMEF_VALUE_TYPE_ENUM); if ( ret < 0 ) return ret; (*value)->type.data.enum_val.value = val; (*value)->type.data.enum_val.class_id = class; return ret; } int idmef_value_new_enum_from_string(idmef_value_t **value, idmef_class_id_t class, const char *buf) { int ret; prelude_return_val_if_fail(buf, prelude_error(PRELUDE_ERROR_ASSERTION)); ret = idmef_class_enum_to_numeric(class, buf); if ( ret < 0 ) return ret; return idmef_value_new_enum_from_numeric(value, class, ret); } int idmef_value_new_enum(idmef_value_t **value, idmef_class_id_t class, const char *buf) { int ret; prelude_return_val_if_fail(buf, prelude_error(PRELUDE_ERROR_ASSERTION)); if ( string_isdigit(buf) == 0 ) ret = idmef_value_new_enum_from_numeric(value, class, atoi(buf)); else ret = idmef_value_new_enum_from_string(value, class, buf); return ret; } int idmef_value_new_list(idmef_value_t **value) { int ret; ret = idmef_value_create(value, IDMEF_VALUE_TYPE_LIST); if ( ret < 0 ) return ret; (*value)->list = malloc(CHUNK_SIZE * sizeof(idmef_value_t *)); if ( ! (*value)->list ) { free(*value); return prelude_error_from_errno(errno); } (*value)->list_elems = 0; (*value)->list_max = CHUNK_SIZE - 1; return 0; } int idmef_value_list_add(idmef_value_t *list, idmef_value_t *item) { prelude_return_val_if_fail(list, prelude_error(PRELUDE_ERROR_ASSERTION)); prelude_return_val_if_fail(item, prelude_error(PRELUDE_ERROR_ASSERTION)); if ( list->list_elems == list->list_max ) { list->list = realloc(list->list, (list->list_max + 1 + CHUNK_SIZE) * sizeof(idmef_value_t *)); if ( ! list->list ) return prelude_error_from_errno(errno); list->list_max += CHUNK_SIZE; } list->list[list->list_elems++] = item; return 0; } prelude_bool_t idmef_value_is_list(const idmef_value_t *list) { prelude_return_val_if_fail(list, FALSE); return (list->list) ? TRUE : FALSE; } prelude_bool_t idmef_value_list_is_empty(const idmef_value_t *list) { prelude_return_val_if_fail(list, TRUE); return (list->list_elems) ? FALSE : TRUE; } int idmef_value_new(idmef_value_t **value, idmef_value_type_id_t type, void *ptr) { int ret; prelude_return_val_if_fail(ptr, prelude_error(PRELUDE_ERROR_ASSERTION)); ret = idmef_value_create(value, type); if ( ret < 0 ) return ret; (*value)->type.data.data_val = ptr; return 0; } int idmef_value_new_from_string(idmef_value_t **value, idmef_value_type_id_t type, const char *buf) { int ret; prelude_return_val_if_fail(buf, prelude_error(PRELUDE_ERROR_ASSERTION)); ret = idmef_value_create(value, type); if ( ret < 0 ) return ret; ret = idmef_value_type_read(&(*value)->type, buf); if ( ret < 0 ) { free(*value); return ret; } return 0; } int idmef_value_new_from_path(idmef_value_t **value, idmef_path_t *path, const char *buf) { int ret; idmef_class_id_t class; idmef_value_type_id_t value_type; prelude_return_val_if_fail(path, prelude_error(PRELUDE_ERROR_ASSERTION)); prelude_return_val_if_fail(buf, prelude_error(PRELUDE_ERROR_ASSERTION)); value_type = idmef_path_get_value_type(path, -1); if ( value_type < 0 ) return value_type; if ( value_type != IDMEF_VALUE_TYPE_ENUM ) ret = idmef_value_new_from_string(value, value_type, buf); else { class = idmef_path_get_class(path, -1); if ( class < 0 ) return class; ret = idmef_value_new_enum(value, class, buf); } return ret; } static int idmef_value_set_own_data(idmef_value_t *value, prelude_bool_t own_data) { int cnt; if ( ! value->list ) value->own_data = own_data; else for ( cnt = 0 ; cnt < value->list_elems; cnt++ ) idmef_value_set_own_data(value->list[cnt], own_data); return 0; } int idmef_value_have_own_data(idmef_value_t *value) { prelude_return_val_if_fail(value, prelude_error(PRELUDE_ERROR_ASSERTION)); return idmef_value_set_own_data(value, TRUE); } int idmef_value_dont_have_own_data(idmef_value_t *value) { prelude_return_val_if_fail(value, prelude_error(PRELUDE_ERROR_ASSERTION)); return idmef_value_set_own_data(value, FALSE); } idmef_value_type_id_t idmef_value_get_type(const idmef_value_t *value) { prelude_return_val_if_fail(value, prelude_error(PRELUDE_ERROR_ASSERTION)); return value->type.id; } idmef_class_id_t idmef_value_get_class(const idmef_value_t *value) { prelude_return_val_if_fail(value, prelude_error(PRELUDE_ERROR_ASSERTION)); if ( value->type.id == IDMEF_VALUE_TYPE_CLASS ) return value->type.data.class_val.class_id; else if ( value->type.id == IDMEF_VALUE_TYPE_ENUM ) return value->type.data.enum_val.class_id; return -1; } void *idmef_value_get_object(const idmef_value_t *value) { prelude_return_val_if_fail(value, NULL); return (value->type.id == IDMEF_VALUE_TYPE_CLASS) ? value->type.data.class_val.object : NULL; } inline static idmef_value_t *value_ro2rw(const idmef_value_t *value) { union { idmef_value_t *rw; const idmef_value_t *ro; } val; val.ro = value; return val.rw; } int idmef_value_iterate(const idmef_value_t *value, int (*callback)(idmef_value_t *ptr, void *extra), void *extra) { int i, ret; prelude_return_val_if_fail(value, prelude_error(PRELUDE_ERROR_ASSERTION)); prelude_return_val_if_fail(callback, prelude_error(PRELUDE_ERROR_ASSERTION)); if ( ! value->list ) return callback(value_ro2rw(value), extra); for ( i = 0; i < value->list_elems; i++ ) { ret = callback(value->list[i], extra); if ( ret < 0 ) return ret; } return 0; } int idmef_value_iterate_reversed(const idmef_value_t *value, int (*callback)(idmef_value_t *ptr, void *extra), void *extra) { int i, ret; prelude_return_val_if_fail(value, prelude_error(PRELUDE_ERROR_ASSERTION)); prelude_return_val_if_fail(callback, prelude_error(PRELUDE_ERROR_ASSERTION)); if ( ! value->list ) return callback(value_ro2rw(value), extra); for ( i = value->list_elems - 1; i >= 0; i-- ) { ret = callback(value->list[i], extra); if ( ret < 0 ) return ret; } return 0; } idmef_value_t *idmef_value_get_nth(const idmef_value_t *val, int n) { prelude_return_val_if_fail(val, NULL); if ( ! val->list ) return (n == 0) ? value_ro2rw(val) : NULL; return (n >= 0 && n < val->list_elems) ? val->list[n] : NULL; } int idmef_value_get_count(const idmef_value_t *val) { prelude_return_val_if_fail(val, prelude_error(PRELUDE_ERROR_ASSERTION)); return val->list ? val->list_elems : 1; } static int idmef_value_list_clone(const idmef_value_t *val, idmef_value_t **dst) { int cnt, ret; ret = idmef_value_create(dst, val->type.id); if ( ret < 0 ) return ret; (*dst)->list_elems = val->list_elems; (*dst)->list_max = val->list_max; (*dst)->list = malloc(((*dst)->list_elems + 1) * sizeof((*dst)->list)); for ( cnt = 0; cnt < (*dst)->list_elems; cnt++ ) { ret = idmef_value_clone(val->list[cnt], &((*dst)->list[cnt])); if ( ret < 0 ) { while ( --cnt >= 0 ) idmef_value_destroy((*dst)->list[cnt]); } free((*dst)->list); free(*dst); return -1; } return 0; } int idmef_value_clone(const idmef_value_t *val, idmef_value_t **dst) { int ret; prelude_return_val_if_fail(val, prelude_error(PRELUDE_ERROR_ASSERTION)); if ( val->list ) return idmef_value_list_clone(val, dst); ret = idmef_value_create(dst, val->type.id); if ( ret < 0 ) return ret; ret = idmef_value_type_clone(&val->type, &(*dst)->type); if ( ret < 0 ) free(*dst); return ret; } idmef_value_t *idmef_value_ref(idmef_value_t *val) { prelude_return_val_if_fail(val, NULL); val->refcount++; return val; } int idmef_value_to_string(const idmef_value_t *val, prelude_string_t *out) { prelude_return_val_if_fail(val, prelude_error(PRELUDE_ERROR_ASSERTION)); prelude_return_val_if_fail(out, prelude_error(PRELUDE_ERROR_ASSERTION)); return idmef_value_type_write(&val->type, out); } int idmef_value_print(const idmef_value_t *val, prelude_io_t *fd) { int ret; prelude_string_t *out; prelude_return_val_if_fail(val, prelude_error(PRELUDE_ERROR_ASSERTION)); prelude_return_val_if_fail(fd, prelude_error(PRELUDE_ERROR_ASSERTION)); ret = prelude_string_new(&out); if ( ret < 0 ) return ret; ret = idmef_value_type_write(&val->type, out); if ( ret < 0 ) { prelude_string_destroy(out); return ret; } return prelude_io_write(fd, prelude_string_get_string(out), prelude_string_get_len(out)); } int idmef_value_get(const idmef_value_t *val, void *res) { prelude_return_val_if_fail(val, prelude_error(PRELUDE_ERROR_ASSERTION)); prelude_return_val_if_fail(res, prelude_error(PRELUDE_ERROR_ASSERTION)); return idmef_value_type_copy(&val->type, res); } static int idmef_value_match_internal(idmef_value_t *val1, void *extra) { int ret; compare_t *compare = extra; if ( idmef_value_is_list(val1) ) ret = idmef_value_iterate(val1, idmef_value_match_internal, extra); else if ( compare->val2 && idmef_value_is_list(compare->val2) ) { ret = idmef_value_match(compare->val2, val1, compare->operator); if ( ret < 0 ) return ret; compare->match += ret; } else { ret = idmef_value_type_compare(&val1->type, &compare->val2->type, compare->operator); if ( ret == 0 ) compare->match++; } return ret; } /** * idmef_value_match: * @val1: Pointer to a #idmef_value_t object. * @val2: Pointer to a #idmef_value_t object. * @op: operator to use for matching. * * Match @val1 and @val2 using @op. * * Returns: the number of match, 0 for none, a negative value if an error occured. */ int idmef_value_match(idmef_value_t *val1, idmef_value_t *val2, idmef_criterion_operator_t op) { int ret; compare_t compare; prelude_return_val_if_fail(val1, prelude_error(PRELUDE_ERROR_ASSERTION)); prelude_return_val_if_fail(val2, prelude_error(PRELUDE_ERROR_ASSERTION)); compare.match = 0; compare.val2 = val2; compare.operator = op; ret = idmef_value_iterate(val1, idmef_value_match_internal, &compare); if ( ret < 0 ) return ret; return compare.match; } /** * idmef_value_check_operator: * @value: Pointer to a #idmef_value_t object. * @op: Type of operator to check @value for. * * Check whether @op can apply to @value. * * Returns: 0 on success, a negative value if an error occured. */ int idmef_value_check_operator(const idmef_value_t *value, idmef_criterion_operator_t op) { prelude_return_val_if_fail(value, prelude_error(PRELUDE_ERROR_ASSERTION)); return idmef_value_type_check_operator(value->type.id, op); } /** * idmef_value_get_applicable_operators: * @value: Pointer to a #idmef_value_t object. * @result: Pointer where the result will be stored. * * Store all operator supported by @value in @result. * * Returns: 0 on success, a negative value if an error occured. */ int idmef_value_get_applicable_operators(const idmef_value_t *value, idmef_criterion_operator_t *result) { prelude_return_val_if_fail(value, prelude_error(PRELUDE_ERROR_ASSERTION)); return idmef_value_type_get_applicable_operators(value->type.id, result); } /** * idmef_value_destroy: * @val: Pointer to a #idmef_value_t object. * * Decrement refcount and destroy @value if it reach 0. */ void idmef_value_destroy(idmef_value_t *val) { int i; prelude_return_if_fail(val); if ( --val->refcount ) return; if ( val->list ) { for ( i = 0; i < val->list_elems; i++ ) idmef_value_destroy(val->list[i]); free(val->list); } /* * Actual destructor starts here */ if ( val->own_data ) idmef_value_type_destroy(&val->type); free(val); } static int cast_to_data(idmef_value_t *input) { int ret; idmef_data_t *data; idmef_value_type_id_t vtype = idmef_value_get_type(input); if ( vtype == IDMEF_VALUE_TYPE_STRING ) { prelude_string_t *str = idmef_value_get_string(input); ret = idmef_data_new_char_string_dup_fast(&data, prelude_string_get_string(str), prelude_string_get_len(str)); if ( ret < 0 ) return ret; return idmef_value_set_data(input, data); } else if ( vtype == IDMEF_VALUE_TYPE_INT8 ) { ret = idmef_data_new_uint32(&data, idmef_value_get_int8(input)); if ( ret < 0 ) return ret; return idmef_value_set_data(input, data); } else if ( vtype == IDMEF_VALUE_TYPE_UINT8 ) { ret = idmef_data_new_uint32(&data, idmef_value_get_uint8(input)); if ( ret < 0 ) return ret; return idmef_value_set_data(input, data); } else if ( vtype == IDMEF_VALUE_TYPE_INT16 ) { ret = idmef_data_new_uint32(&data, idmef_value_get_int16(input)); if ( ret < 0 ) return ret; return idmef_value_set_data(input, data); } else if ( vtype == IDMEF_VALUE_TYPE_UINT16 ) { ret = idmef_data_new_uint32(&data, idmef_value_get_uint16(input)); if ( ret < 0 ) return ret; return idmef_value_set_data(input, data); } else if ( vtype == IDMEF_VALUE_TYPE_INT32 ) { ret = idmef_data_new_uint32(&data, idmef_value_get_int32(input)); if ( ret < 0 ) return ret; return idmef_value_set_data(input, data); } else if ( vtype == IDMEF_VALUE_TYPE_UINT32 ) { ret = idmef_data_new_uint32(&data, idmef_value_get_uint32(input)); if ( ret < 0 ) return ret; return idmef_value_set_data(input, data); } else if ( vtype == IDMEF_VALUE_TYPE_INT64 ) { ret = idmef_data_new_uint64(&data, idmef_value_get_int64(input)); if ( ret < 0 ) return ret; return idmef_value_set_data(input, data); } else if ( vtype == IDMEF_VALUE_TYPE_UINT64 ) { ret = idmef_data_new_uint64(&data, idmef_value_get_uint64(input)); if ( ret < 0 ) return ret; return idmef_value_set_data(input, data); } else if ( vtype == IDMEF_VALUE_TYPE_FLOAT ) { int64_t v = idmef_value_get_float(input); if ( v == idmef_value_get_float(input) ) ret = idmef_data_new_uint64(&data, v); else ret = idmef_data_new_float(&data, idmef_value_get_float(input)); if ( ret < 0 ) return ret; return idmef_value_set_data(input, data); } else if ( vtype == IDMEF_VALUE_TYPE_DOUBLE ) { int64_t v = idmef_value_get_double(input); if ( v == idmef_value_get_double(input) ) ret = idmef_data_new_uint64(&data, v); else ret = idmef_data_new_float(&data, idmef_value_get_double(input)); if ( ret < 0 ) return ret; return idmef_value_set_data(input, data); } return -1; } static int cast_to_time(idmef_value_t *value) { int ret = -1; idmef_time_t *time; if ( idmef_value_get_type(value) == IDMEF_VALUE_TYPE_STRING ) { ret = idmef_time_new_from_string(&time, prelude_string_get_string(idmef_value_get_string(value))); if ( ret < 0 ) return ret; idmef_value_set_time(value, time); } else if ( idmef_value_get_type(value) == IDMEF_VALUE_TYPE_INT32 ) { time_t val = idmef_value_get_int32(value); ret = idmef_time_new_from_time(&time, &val); if ( ret < 0 ) return ret; idmef_value_set_time(value, time); } else if ( idmef_value_get_type(value) == IDMEF_VALUE_TYPE_UINT32 ) { time_t val = idmef_value_get_uint32(value); ret = idmef_time_new_from_time(&time, &val); if ( ret < 0 ) return ret; idmef_value_set_time(value, time); } else if ( idmef_value_get_type(value) == IDMEF_VALUE_TYPE_INT64 ) { time_t val = idmef_value_get_int64(value); ret = idmef_time_new_from_time(&time, &val); if ( ret < 0 ) return ret; idmef_value_set_time(value, time); } else if ( idmef_value_get_type(value) == IDMEF_VALUE_TYPE_UINT64 ) { time_t val = idmef_value_get_uint64(value); ret = idmef_time_new_from_time(&time, &val); if ( ret < 0 ) return ret; idmef_value_set_time(value, time); } return ret; } static int cast_to_string(idmef_value_t *value) { int ret; prelude_string_t *out; ret = prelude_string_new(&out); if ( ret < 0 ) return ret; ret = idmef_value_type_write(&value->type, out); if ( ret < 0 ) { prelude_string_destroy(out); return ret; } idmef_value_set_string(value, out); return 0; } static int cast_from_string(idmef_value_t *value, idmef_value_type_id_t ntype) { int ret; idmef_value_type_t vt; prelude_string_t *str = idmef_value_get_string(value); vt.id = ntype; ret = idmef_value_type_read(&vt, prelude_string_get_string(str)); if ( ret < 0 ) return ret; if ( value->own_data ) idmef_value_type_destroy(&value->type); memcpy(&value->type, &vt, sizeof(value->type)); return 0; } int _idmef_value_cast(idmef_value_t *value, idmef_value_type_id_t ntype, idmef_class_id_t id) { idmef_value_type_id_t otype; prelude_return_val_if_fail(value, prelude_error(PRELUDE_ERROR_ASSERTION)); otype = idmef_value_get_type(value); prelude_log_debug(3, "converting '%s' to '%s'.\n", idmef_value_type_to_string(otype), idmef_value_type_to_string(ntype)); if ( ntype == IDMEF_VALUE_TYPE_DATA ) return cast_to_data(value); else if ( ntype == IDMEF_VALUE_TYPE_TIME ) return cast_to_time(value); else if ( ntype == IDMEF_VALUE_TYPE_STRING ) return cast_to_string(value); else if ( ntype == IDMEF_VALUE_TYPE_ENUM && idmef_value_get_type(value) == IDMEF_VALUE_TYPE_STRING ) { prelude_string_t *str = idmef_value_get_string(value); return idmef_value_set_enum_from_string(value, id, prelude_string_get_string(str)); } else if ( otype == IDMEF_VALUE_TYPE_INT8 ) VALUE_CAST_CHECK(value, int8_t, int8, PRELUDE_PRId8, ntype); else if ( otype == IDMEF_VALUE_TYPE_UINT8 ) VALUE_CAST_CHECK(value, uint8_t, uint8, PRELUDE_PRIu8, ntype); else if ( otype == IDMEF_VALUE_TYPE_INT16 ) VALUE_CAST_CHECK(value, int16_t, int16, PRELUDE_PRId16, ntype); else if ( otype == IDMEF_VALUE_TYPE_UINT16 ) VALUE_CAST_CHECK(value, uint16_t, uint16, PRELUDE_PRIu16, ntype); else if ( otype == IDMEF_VALUE_TYPE_INT32 ) VALUE_CAST_CHECK(value, int32_t, int32, PRELUDE_PRId32, ntype); else if ( otype == IDMEF_VALUE_TYPE_UINT32 ) VALUE_CAST_CHECK(value, uint32_t, uint32, PRELUDE_PRIu32, ntype); else if ( otype == IDMEF_VALUE_TYPE_INT64 ) VALUE_CAST_CHECK(value, int64_t, int64, PRELUDE_PRId64, ntype); else if ( otype == IDMEF_VALUE_TYPE_UINT64 ) VALUE_CAST_CHECK(value, uint64_t, uint64, PRELUDE_PRIu64, ntype); else if ( otype == IDMEF_VALUE_TYPE_FLOAT ) VALUE_CAST_CHECK(value, float, float, "f", ntype); else if ( otype == IDMEF_VALUE_TYPE_DOUBLE ) VALUE_CAST_CHECK(value, double, double, "f", ntype); else if ( otype == IDMEF_VALUE_TYPE_STRING ) return cast_from_string(value, ntype); else return prelude_error_verbose(PRELUDE_ERROR_GENERIC, "Unable to cast input type '%s' to '%s'", idmef_value_type_to_string(value->type.id), idmef_value_type_to_string(ntype)); return 0; } int _idmef_value_copy_internal(const idmef_value_t *val, idmef_value_type_id_t res_type, idmef_class_id_t res_id, void *res) { int ret; prelude_return_val_if_fail(val, prelude_error(PRELUDE_ERROR_ASSERTION)); prelude_return_val_if_fail(res, prelude_error(PRELUDE_ERROR_ASSERTION)); if ( res_type == val->type.id ) ret = idmef_value_type_copy(&val->type, res); else { idmef_value_t copy; memcpy(©, val, sizeof(copy)); idmef_value_dont_have_own_data(©); ret = _idmef_value_cast(©, res_type, res_id); if ( ret < 0 ) return ret; ret = idmef_value_type_copy(©.type, res); } return ret; } libprelude-1.0.0/src/idmef-class.c0000664000076400007640000001647111325615276013735 00000000000000/***** * * Copyright (C) 2002-2005,2006,2007 PreludeIDS Technologies. All Rights Reserved. * Author: Yoann Vandoorselaere * Author: Krzysztof Zaraska * * This file is part of the Prelude library. * * 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; see the file COPYING. If not, write to * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. * *****/ #include "config.h" #include #include #include #include #include #include "libmissing.h" #include "prelude-list.h" #include "prelude-log.h" #include "prelude-inttypes.h" #include "prelude-string.h" #define PRELUDE_ERROR_SOURCE_DEFAULT PRELUDE_ERROR_SOURCE_IDMEF_TYPE #include "prelude-error.h" #include "idmef-time.h" #include "idmef-data.h" #include "idmef-value.h" #include "idmef-class.h" #include "idmef-tree-wrap.h" #include "idmef-tree-data.h" #include "idmef-path.h" static inline int is_class_valid(idmef_class_id_t class) { if ( class < 0 || (size_t) class >= sizeof(object_data) / sizeof(*object_data) ) return prelude_error_verbose(PRELUDE_ERROR_IDMEF_CLASS_UNKNOWN, "Unknown IDMEF class '%d'", (int) class); return 0; } static inline int is_child_valid(idmef_class_id_t class, idmef_class_child_id_t child) { int ret; ret = is_class_valid(class); if ( ret < 0 ) return ret; if ( child < 0 || (size_t) child >= object_data[class].children_list_elem ) return prelude_error_verbose(PRELUDE_ERROR_IDMEF_CLASS_UNKNOWN_CHILD, "Unknown IDMEF child '%d' for class '%s'", (int) child, object_data[class].name); return 0; } idmef_class_child_id_t idmef_class_find_child(idmef_class_id_t class, const char *name) { int ret; size_t i; const children_list_t *list; ret = is_class_valid(class); if ( ret < 0 ) return ret; list = object_data[class].children_list; if ( list ) { for ( i = 0; i < object_data[class].children_list_elem; i++ ) if ( strcasecmp(list[i].name, name) == 0) return i; } return prelude_error_verbose(PRELUDE_ERROR_IDMEF_CLASS_UNKNOWN_CHILD, "Unknown IDMEF child '%s'", name); } prelude_bool_t idmef_class_is_child_list(idmef_class_id_t class, idmef_class_child_id_t child) { int ret; ret = is_child_valid(class, child); if ( ret < 0 ) return ret; return object_data[class].children_list[child].list; } idmef_value_type_id_t idmef_class_get_child_value_type(idmef_class_id_t class, idmef_class_child_id_t child) { int ret; ret = is_child_valid(class, child); if ( ret < 0 ) return ret; return object_data[class].children_list[child].type; } idmef_class_id_t idmef_class_get_child_class(idmef_class_id_t class, idmef_class_child_id_t child) { int ret; const children_list_t *c; ret = is_child_valid(class, child); if ( ret < 0 ) return ret; c = &object_data[class].children_list[child]; if ( c->type != IDMEF_VALUE_TYPE_CLASS && c->type != IDMEF_VALUE_TYPE_ENUM ) return prelude_error(PRELUDE_ERROR_IDMEF_CLASS_CHILD_NOT_CLASS); return c->class; } const char *idmef_class_get_child_name(idmef_class_id_t class, idmef_class_child_id_t child) { int ret; ret = is_child_valid(class, child); if ( ret < 0 ) return NULL; return object_data[class].children_list[child].name; } idmef_class_id_t idmef_class_find(const char *name) { idmef_class_id_t i; for ( i = 0; object_data[i].name != NULL; i++ ) if ( strcasecmp(object_data[i].name, name) == 0 ) return i; return prelude_error_verbose(PRELUDE_ERROR_IDMEF_CLASS_UNKNOWN_NAME, "Unknown IDMEF class '%s'", name); } int idmef_class_enum_to_numeric(idmef_class_id_t class, const char *val) { int ret; ret = is_class_valid(class); if ( ret < 0 ) return ret; if ( ! object_data[class].to_numeric ) return -1; return object_data[class].to_numeric(val); } const char *idmef_class_enum_to_string(idmef_class_id_t class, int val) { int ret; ret = is_class_valid(class); if ( ret < 0 ) return NULL; if ( ! object_data[class].to_string ) return NULL; return object_data[class].to_string(val); } int idmef_class_get_child(void *ptr, idmef_class_id_t class, idmef_class_child_id_t child, void **childptr) { int ret; ret = is_child_valid(class, child); if ( ret < 0 ) return ret; return object_data[class].get_child(ptr, child, childptr); } int idmef_class_new_child(void *ptr, idmef_class_id_t class, idmef_class_child_id_t child, int n, void **childptr) { int ret; ret = is_child_valid(class, child); if ( ret < 0 ) return ret; return object_data[class].new_child(ptr, child, n, childptr); } int idmef_class_destroy_child(void *ptr, idmef_class_id_t class, idmef_class_child_id_t child, int n) { int ret; ret = is_child_valid(class, child); if ( ret < 0 ) return ret; return object_data[class].destroy_child(ptr, child, n); } int idmef_class_copy(idmef_class_id_t class, const void *src, void *dst) { int ret; ret = is_class_valid(class); if ( ret < 0 ) return ret; return object_data[class].copy(src, dst); } int idmef_class_clone(idmef_class_id_t class, const void *src, void **dst) { int ret; ret = is_class_valid(class); if ( ret < 0 ) return ret; return object_data[class].clone(src, dst); } int idmef_class_compare(idmef_class_id_t class, const void *c1, const void *c2) { int ret; ret = is_class_valid(class); if ( ret < 0 ) return ret; return object_data[class].compare(c1, c2); } int idmef_class_destroy(idmef_class_id_t class, void *obj) { int ret; ret = is_class_valid(class); if ( ret < 0 ) return ret; object_data[class].destroy(obj); return 0; } int idmef_class_ref(idmef_class_id_t class, void *obj) { int ret; ret = is_class_valid(class); if ( ret < 0 ) return ret; object_data[class].ref(obj); return 0; } const char *idmef_class_get_name(idmef_class_id_t class) { if ( is_class_valid(class) < 0 ) return NULL; return object_data[class].name; } libprelude-1.0.0/src/idmef-time.c0000664000076400007640000005030511320773236013554 00000000000000/***** * * Copyright (C) 2003-2005,2006,2007 PreludeIDS Technologies. All Rights Reserved. * Author: Nicolas Delon * * This file is part of the Prelude library. * * 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; see the file COPYING. If not, write to * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. * *****/ /* * This is required on Solaris so that multiple call to * strptime() won't reset the tm structure. */ #define _STRPTIME_DONTZERO #include "config.h" #include "libmissing.h" #include #include #include #include #include #if defined(__linux__) && ! defined(__USE_XOPEN) # define __USE_XOPEN #endif #if TIME_WITH_SYS_TIME # include # include #else # if HAVE_SYS_TIME_H # include # else # include # endif #endif #include "prelude-inttypes.h" #include "prelude-string.h" #include "prelude-error.h" #include "ntp.h" #include "prelude-log.h" #include "common.h" #include "idmef-time.h" static char *parse_time_ymd(struct tm *tm, const char *buf) { char *ptr; ptr = strptime(buf, "%Y-%m-%d", tm); if ( ! ptr ) return NULL; /* * The IDMEF draft only permits the 'T' variant here */ while ( isspace((int) *ptr) ) ptr++; if ( *ptr == 'T' ) ptr++; return ptr; } static char *parse_time_hmsu(struct tm *tm, uint32_t *usec, const char *buf) { char *ptr; unsigned int fraction; ptr = strptime(buf, "%H:%M:%S", tm); if ( ! ptr ) return NULL; if ( *ptr == '.' || *ptr == ',' ) { ptr++; if ( sscanf(ptr, "%u", &fraction) < 1 ) return NULL; *usec = fraction * 10000; while ( isdigit((int) *ptr) ) ptr++; } return ptr; } static int parse_time_gmt(struct tm *tm, int32_t *gmtoff, const char *buf) { int ret; unsigned int offset_hour, offset_min; /* * if UTC, do nothing. */ if ( *buf == 'Z' ) return 0; ret = sscanf(buf + 1, "%2u:%2u", &offset_hour, &offset_min); if ( ret != 2 ) return -1; if ( *buf == '+' ) { tm->tm_min -= offset_min; tm->tm_hour -= offset_hour; *gmtoff = offset_hour * 3600 + offset_min * 60; } else if ( *buf == '-' ) { tm->tm_min += offset_min; tm->tm_hour += offset_hour; *gmtoff = - (offset_hour * 3600 + offset_min * 60); } else return -1; return 0; } /** * idmef_time_set_from_string: * @time: Pointer to an #idmef_time_t object. * @buf: Pointer to a string describing a time in an IDMEF conforming format. * * Fills @time object with information retrieved from the user provided * @buf, containing a string describing a time in a format conforming * to the IDMEF definition (v. 0.10, section 3.2.6). * * Additionally, the provided time might be separated with white spaces, * instead of the IDMEF defined 'T' character. * * If there is no UTC offset specified, we assume that the provided * time is local, and compute the GMT offset by ourselve. * * Returns: 0 on success, a negative value if an error occured. */ int idmef_time_set_from_string(idmef_time_t *time, const char *buf) { int ret; char *ptr; struct tm tm; prelude_bool_t miss_gmt = TRUE; prelude_return_val_if_fail(time, prelude_error(PRELUDE_ERROR_ASSERTION)); prelude_return_val_if_fail(buf, prelude_error(PRELUDE_ERROR_ASSERTION)); memset(&tm, 0, sizeof(tm)); tm.tm_isdst = -1; ptr = parse_time_ymd(&tm, buf); if ( ! ptr ) return prelude_error_verbose(PRELUDE_ERROR_GENERIC, "error parsing date field, format should be: YY-MM-DD"); if ( *ptr ) { ptr = parse_time_hmsu(&tm, &time->usec, ptr); if ( ! ptr ) return prelude_error_verbose(PRELUDE_ERROR_GENERIC, "error parsing time field, format should be: HH:MM:SS"); if ( *ptr ) { ret = parse_time_gmt(&tm, &time->gmt_offset, ptr); if ( ret < 0 ) return prelude_error_verbose(PRELUDE_ERROR_GENERIC, "error parsing GMT offset field (Z)?(+|-)?HH:MM"); miss_gmt = FALSE; } } if ( miss_gmt ) { long gmtoff; prelude_get_gmt_offset_from_tm(&tm, &gmtoff); time->gmt_offset = (int32_t) gmtoff; } time->sec = miss_gmt ? mktime(&tm) : prelude_timegm(&tm); return 0; } /** * idmef_time_new_from_string: * @time: Address where to store the created #idmef_time_t object. * @buf: Pointer to a string describing a time in an IDMEF conforming format. * * Creates an #idmef_time_t object filled with information retrieved * from the user provided @buf, containing a string describing a time in a format * conforming to the IDMEF definition (v. 0.10, section 3.2.6). * * Additionally, the provided time might be separated with white spaces, instead * of the IDMEF define 'T' character. The format might not specify a timezone * (will assume UTC in this case). * * The resulting #idmef_time_t object is stored in @time. * * Returns: 0 on success, a negative value if an error occured. */ int idmef_time_new_from_string(idmef_time_t **time, const char *buf) { int ret; prelude_return_val_if_fail(buf, prelude_error(PRELUDE_ERROR_ASSERTION)); ret = idmef_time_new(time); if ( ret < 0 ) return ret; ret = idmef_time_set_from_string(*time, buf); if ( ret < 0 ) { free(*time); return ret; } return 0; } /** * idmef_time_set_from_ntpstamp: * @time: Pointer to a #idmef_time_t object. * @buf: Pointer to a string containing an NTP timestamp. * * Fills the @time object with information provided within the @buf NTP timestamp. * * Returns: 0 on success, a negative value if an error occured. */ int idmef_time_set_from_ntpstamp(idmef_time_t *time, const char *buf) { l_fp ts; struct timeval tv; unsigned ts_mask = TS_MASK; unsigned ts_roundbit = TS_ROUNDBIT; prelude_return_val_if_fail(time, prelude_error(PRELUDE_ERROR_ASSERTION)); prelude_return_val_if_fail(buf, prelude_error(PRELUDE_ERROR_ASSERTION)); if ( sscanf(buf, "%x.%x", &ts.l_ui, &ts.l_uf) < 2 ) return -1; /* * This transformation is a reverse form of the one found in * idmef_get_ntp_timestamp() */ ts.l_ui -= JAN_1970; ts.l_uf -= ts_roundbit; ts.l_uf &= ts_mask; TSTOTV(&ts, &tv); time->sec = tv.tv_sec; time->usec = tv.tv_usec; time->gmt_offset = 0; return 0; } /** * idmef_time_to_ntpstamp: * @time: Pointer to an IDMEF time structure. * @out: Pointer to a #prelude_string_t output buffer. * * Translates @time to an user readable NTP timestamp string, * conforming to the IDMEF defined time format. * * Returns: number of bytes written on success, a negative value if an error occured. */ int idmef_time_to_ntpstamp(const idmef_time_t *time, prelude_string_t *out) { l_fp ts; struct timeval tv; unsigned ts_mask = TS_MASK; /* defaults to 20 bits (us) */ unsigned ts_roundbit = TS_ROUNDBIT; /* defaults to 20 bits (us) */ int ret; prelude_return_val_if_fail(time, prelude_error(PRELUDE_ERROR_ASSERTION)); prelude_return_val_if_fail(out, prelude_error(PRELUDE_ERROR_ASSERTION)); tv.tv_sec = idmef_time_get_sec(time); tv.tv_usec = idmef_time_get_usec(time); sTVTOTS(&tv, &ts); ts.l_ui += JAN_1970; /* make it time since 1900 */ ts.l_uf += ts_roundbit; ts.l_uf &= ts_mask; ret = prelude_string_sprintf(out, "0x%08lx.0x%08lx", (unsigned long) ts.l_ui, (unsigned long) ts.l_uf); return ret; } /** * idmef_time_to_string: * @time: Pointer to an IDMEF time structure. * @out: Pointer to a #prelude_string_t output buffer. * * Translates @time to an user readable string conforming to the IDMEF * defined time format. * * Returns: number of bytes written on success, a negative value if an error occured. */ int idmef_time_to_string(const idmef_time_t *time, prelude_string_t *out) { time_t t; struct tm utc; uint32_t hour_off, min_off, sec_off; prelude_return_val_if_fail(time, prelude_error(PRELUDE_ERROR_ASSERTION)); prelude_return_val_if_fail(out, prelude_error(PRELUDE_ERROR_ASSERTION)); t = time->sec + time->gmt_offset; if ( ! gmtime_r((const time_t *) &t, &utc) ) return prelude_error_from_errno(errno); hour_off = time->gmt_offset / 3600; min_off = time->gmt_offset % 3600 / 60; sec_off = time->gmt_offset % 60; return prelude_string_sprintf(out, "%d-%.2d-%.2dT%.2d:%.2d:%.2d.%02u%+.2d:%.2d", utc.tm_year + 1900, utc.tm_mon + 1, utc.tm_mday, utc.tm_hour, utc.tm_min, utc.tm_sec, idmef_time_get_usec(time), hour_off, min_off); } /** * idmef_time_new_from_ntpstamp: * @time: Address where to store the created #idmef_time_t object. * @buf: Pointer to a string containing an NTP timestamp. * * Creates an #idmef_time_t object filled with information provided * from the @buf NTP timestamp, and stores it in @time. * * Returns: 0 on success, a negative value if an error occured. */ int idmef_time_new_from_ntpstamp(idmef_time_t **time, const char *buf) { int ret; prelude_return_val_if_fail(buf, prelude_error(PRELUDE_ERROR_ASSERTION)); ret = idmef_time_new(time); if ( ret < 0 ) return ret; ret = idmef_time_set_from_ntpstamp(*time, buf); if ( ret < 0 ) { free(*time); return ret; } return 0; } /** * idmef_time_set_from_timeval: * @time: Pointer to an #idmef_time_t object. * @tv: Pointer to a struct timeval (see gettimeofday()). * * Fills @time object filled with information provided within the @tv structure. * * Returns: 0 on success, a negative value if an error occured. */ int idmef_time_set_from_timeval(idmef_time_t *time, const struct timeval *tv) { int ret; long gmtoff; prelude_return_val_if_fail(time, prelude_error(PRELUDE_ERROR_ASSERTION)); prelude_return_val_if_fail(tv, prelude_error(PRELUDE_ERROR_ASSERTION)); ret = prelude_get_gmt_offset_from_time((const time_t *) &tv->tv_sec, &gmtoff); if ( ret < 0 ) return ret; time->sec = tv->tv_sec; time->usec = tv->tv_usec; time->gmt_offset = (int32_t) gmtoff; return 0; } /** * idmef_time_new_from_timeval: * @time: Address where to store the created #idmef_time_t object. * @tv: Pointer to a struct timeval (see gettimeofday()). * * Creates an #idmef_time_t object filled with information provided * within the @tv structure. * * Returns: 0 on success, a negative value if an error occured. */ int idmef_time_new_from_timeval(idmef_time_t **time, const struct timeval *tv) { int ret; prelude_return_val_if_fail(tv, prelude_error(PRELUDE_ERROR_ASSERTION)); ret = idmef_time_new(time); if ( ret < 0 ) return ret; return idmef_time_set_from_timeval(*time, tv); } /** * idmef_time_set_from_gettimeofday: * @time: Pointer to an #idmef_time_t object. * * Fills @time with information retrieved using gettimeofday(). * * Returns: 0 on success, a negative value if an error occured. */ int idmef_time_set_from_gettimeofday(idmef_time_t *time) { int ret; struct timeval tv; prelude_return_val_if_fail(time, prelude_error(PRELUDE_ERROR_ASSERTION)); ret = gettimeofday(&tv, NULL); if ( ret < 0 ) return prelude_error_from_errno(errno); return idmef_time_set_from_timeval(time, &tv); } /** * idmef_time_new_from_gettimeofday: * @time: Address where to store the created #idmef_time_t object. * * Creates an #idmef_time_t object filled with information retrieved * using gettimeofday(), and stores it in @time. * * Returns: 0 on success, a negative value if an error occured. */ int idmef_time_new_from_gettimeofday(idmef_time_t **time) { int ret; struct timeval tv; ret = gettimeofday(&tv, NULL); if ( ret < 0 ) return prelude_error_from_errno(errno); return idmef_time_new_from_timeval(time, &tv); } /** * idmef_time_ref: * @time: Pointer to an #idmef_time_t object. * * Increases @time reference count. * idmef_time_destroy() won't destroy @time until the refcount * reach 0. * * Returns: The @time provided argument. */ idmef_time_t *idmef_time_ref(idmef_time_t *time) { prelude_return_val_if_fail(time, NULL); time->refcount++; return time; } /** * idmef_time_new: * @time: Address where to store the created #idmef_time_t object. * * Creates an empty #idmef_time_t object and store it in @time. * * Returns: 0 on success, a negative value if an error occured. */ int idmef_time_new(idmef_time_t **time) { *time = calloc(1, sizeof(**time)); if ( ! *time ) return prelude_error_from_errno(errno); (*time)->refcount = 1; return 0; } /** * idmef_time_clone: * @src: Pointer to a #idmef_time_t to clone. * @dst: Address where to store the cloned @src object. * * Clones @src and stores the result in the @dst address. * * Returns: 0 on success, a negative value if an error occured. */ int idmef_time_clone(const idmef_time_t *src, idmef_time_t **dst) { int ret; prelude_return_val_if_fail(src, prelude_error(PRELUDE_ERROR_ASSERTION)); ret = idmef_time_new(dst); if ( ret < 0 ) return ret; return idmef_time_copy(src, *dst); } /** * idmef_time_set_from_time: * @time: Pointer to an #idmef_time_t object. * @t: Pointer to a time_t. * * Fills @time from the information described by @t. * @time won't contain micro seconds information, since theses are not * available within @t. */ void idmef_time_set_from_time(idmef_time_t *time, const time_t *t) { long gmtoff; prelude_return_if_fail(time); prelude_return_if_fail(t); prelude_get_gmt_offset_from_time(t, &gmtoff); time->gmt_offset = (int32_t) gmtoff; time->sec = *t; } /** * idmef_time_new_from_time: * @time: Address where to store the created #idmef_time_t object. * @t: Pointer to a time_t. * * Creates a new #idmef_time_t object and store it in @time. * This object will be filled with information available in @t. The created * @time won't contain micro seconds information, since theses are not * available within @t. * * Returns: 0 on success, a negative value if an error occured. */ int idmef_time_new_from_time(idmef_time_t **time, const time_t *t) { int ret; prelude_return_val_if_fail(t, prelude_error(PRELUDE_ERROR_ASSERTION)); ret = idmef_time_new(time); if ( ret < 0 ) return ret; idmef_time_set_from_time(*time, t); return 0; } /** * idmef_time_set_gmt_offset: * @time: Pointer to a #idmef_time_t. * @gmtoff: GMT offset for @time, in seconds. * * Sets the GMT offset @gmtoff, in seconds, within @time. * * WARNING: this is just an accessor function, and using it to * set @time current time also requires the use of idmef_time_set_sec() * and idmef_time_set_usec(). */ void idmef_time_set_gmt_offset(idmef_time_t *time, int32_t gmtoff) { prelude_return_if_fail(time); time->gmt_offset = gmtoff; } /** * idmef_time_set_sec: * @time: Pointer to a #idmef_time_t. * @sec: Number of seconds since the Epoch. * * Sets the number of second from the Epoch to @sec within @time. * * WARNING: this is just an accessor function, and using it to * set @time current time also requires the use of idmef_time_set_usec() * and idmef_time_set_gmt_offset(). */ void idmef_time_set_sec(idmef_time_t *time, uint32_t sec) { prelude_return_if_fail(time); time->sec = sec; } /** * idmef_time_set_usec: * @time: Pointer to a #idmef_time_t. * @usec: Number of micro seconds to set within @time. * * Sets the number of micro second to @usec within @time. * * WARNING: this is just an accessor function, and using it to * set @time current time also requires the use of idmef_time_set_sec() * and idmef_time_set_gmt_offset(). */ void idmef_time_set_usec(idmef_time_t *time, uint32_t usec) { prelude_return_if_fail(time); time->usec = usec; } /** * idmef_time_get_gmt_offset: * @time: Pointer to a #idmef_time_t. * * Returns the GMT offset that applies to @time. * * Returns: The GMT offset, in seconds. */ int32_t idmef_time_get_gmt_offset(const idmef_time_t *time) { prelude_return_val_if_fail(time, 0); return time->gmt_offset; } /** * idmef_time_get_sec: * @time: Pointer to a #idmef_time_t. * * Returns the number of second since the Epoch (00:00:00 UTC, January 1, 1970), * previously set within @time. * * Returns: The number of seconds. */ uint32_t idmef_time_get_sec(const idmef_time_t *time) { prelude_return_val_if_fail(time, 0); return time->sec; } /** * idmef_time_get_usec: * @time: Pointer to a #idmef_time_t. * * Returns the u-second member of @time. * * Returns: The number of u-seconds. */ uint32_t idmef_time_get_usec(const idmef_time_t *time) { prelude_return_val_if_fail(time, 0); return time->usec; } /** * idmef_time_copy: * @src: Pointer to a #idmef_time_t to copy data from. * @dst: Pointer to a #idmef_time_t to copy data to. * * Copies @src internal to @dst. * * Returns: 0 on success, a negative value if an error occured. */ int idmef_time_copy(const idmef_time_t *src, idmef_time_t *dst) { prelude_return_val_if_fail(src, prelude_error(PRELUDE_ERROR_ASSERTION)); prelude_return_val_if_fail(dst, prelude_error(PRELUDE_ERROR_ASSERTION)); dst->sec = src->sec; dst->usec = src->usec; dst->gmt_offset = src->gmt_offset; return 0; } void idmef_time_destroy_internal(idmef_time_t *time) { /* nop */ } /** * idmef_time_destroy: * @time: Pointer to an #idmef_time_t object. * * Destroys @time if refcount reach 0. */ void idmef_time_destroy(idmef_time_t *time) { prelude_return_if_fail(time); if ( --time->refcount ) return; free(time); } /** * idmef_time_compare: * @time1: Pointer to an #idmef_time_t object to compare with @time2. * @time2: Pointer to an #idmef_time_t object to compare with @time1. * * Returns: 0 if @time1 and @time2 match, 1 if @time1 is greater than * @time2, -1 if @time1 is lesser than @time2. */ int idmef_time_compare(const idmef_time_t *time1, const idmef_time_t *time2) { unsigned long t1, t2; if ( ! time1 && ! time2 ) return 0; else if ( ! time1 || ! time2 ) return -1; t1 = time1->sec + time1->gmt_offset; t2 = time2->sec + time2->gmt_offset; if ( t1 == t2 ) { if ( time1->usec == time2->usec ) return 0; else return (time1->usec < time2->usec) ? -1 : 1; } else return (t1 < t2) ? -1 : 1; } libprelude-1.0.0/src/idmef-criterion-value.c0000664000076400007640000005064611325615276015742 00000000000000/***** * * Copyright (C) 2004,2005,2006,2007 PreludeIDS Technologies. All Rights Reserved. * Author: Nicolas Delon * Author: Yoann Vandoorselaere * * This file is part of the Prelude library. * * 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; see the file COPYING. If not, write to * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. * *****/ #include "config.h" #include "libmissing.h" #include #include #include #include #include #include #include #include #include "common.h" #include "prelude-log.h" #include "prelude-error.h" #include "prelude-inttypes.h" #include "idmef.h" #include "idmef-criterion-value.h" struct match_cb { unsigned int nmatch; unsigned int match; idmef_criterion_value_t *cv; idmef_criterion_operator_t operator; }; struct regex_value { regex_t regex; char *regex_string; }; struct idmef_criterion_value { void *value; prelude_bool_t value_need_free; idmef_criterion_value_type_t type; int (*clone)(const idmef_criterion_value_t *cv, idmef_criterion_value_t *dst); int (*print)(const idmef_criterion_value_t *cv, prelude_io_t *fd); int (*to_string)(const idmef_criterion_value_t *cv, prelude_string_t *out); int (*match)(const idmef_criterion_value_t *cv, idmef_criterion_operator_t operator, idmef_value_t *value); void (*destroy)(idmef_criterion_value_t *cv); }; /* * time stuff */ static int btime_parse_simple(const char *integer, int *out) { *out = atoi(integer); return 0; } static int btime_parse_year(const char *integer, int *out) { *out = atoi(integer) - 1900; return 0; } static int btime_parse_month(const char *value, int *out) { int i; const char *months[] = { "january", "february", "march", "april", "may", "june", "july", "august", "september", "october", "november", "december" }; if ( isdigit((int) *value) ) { *out = atoi(value) - 1; return 0; } for ( i = 0; i < (int) (sizeof(months) / sizeof(*months)); i++ ) { if ( strcasecmp(value, months[i]) == 0 ) { *out = i; /* Numbered 0 to 11 */ return 0; } } return -1; } static int btime_parse_wday(const char *value, int *out) { int i; const char *days[] = { "sunday", "monday", "tuesday", /* happy days ! ;) */ "wednesday", "thursday", "friday", "saturday", }; if ( isdigit((int) *value) ) { *out = atoi(value) - 1; return 0; } for ( i = 0; i < (int) (sizeof(days) / sizeof(*days)); i++ ) { if ( strcasecmp(value, days[i]) == 0 ) { *out = i; /* Numbered 0 (sunday) to 6 */ return 0; } } return -1; } static int do_btime_match(const idmef_criterion_value_t *cv, idmef_criterion_operator_t op, idmef_value_t *value) { time_t sec, wanted, matched; struct tm lt, *comp = cv->value; if ( idmef_value_get_type(value) != IDMEF_VALUE_TYPE_TIME ) return -1; sec = idmef_time_get_sec(idmef_value_get_time(value)); if ( ! gmtime_r(&sec, <) ) return prelude_error_from_errno(errno); /* * Apply mask */ if ( comp->tm_sec < 0 ) lt.tm_sec = -1; if ( comp->tm_min < 0 ) lt.tm_min = -1; if ( comp->tm_mon < 0 ) lt.tm_mon = -1; if ( comp->tm_hour < 0 ) lt.tm_hour = -1; if ( comp->tm_mday < 0 ) lt.tm_mday = -1; if ( comp->tm_year < 0 ) lt.tm_year = -1; if ( comp->tm_wday < 0 ) lt.tm_wday = -1; if ( comp->tm_yday < 0 ) lt.tm_yday = -1; wanted = timegm(comp); matched = timegm(<); if ( op & IDMEF_CRITERION_OPERATOR_EQUAL && matched == wanted ) return 1; if ( op & IDMEF_CRITERION_OPERATOR_LESSER && matched < wanted) return 1; if ( op & IDMEF_CRITERION_OPERATOR_GREATER && matched > wanted ) return 1; return 0; } static int btime_match(const idmef_criterion_value_t *cv, idmef_criterion_operator_t operator, idmef_value_t *value) { int ret; ret = do_btime_match(cv, operator, value); if ( ret < 0 ) return ret; if ( operator & IDMEF_CRITERION_OPERATOR_NOT ) return (ret == 1) ? 0 : 1; else return (ret == 1) ? 1 : 0; } static int btime_to_string(const idmef_criterion_value_t *cv, prelude_string_t *out) { struct tm *lt = cv->value; if ( lt->tm_year != -1 ) prelude_string_sprintf(out, "year:%d ", lt->tm_year + 1900); if ( lt->tm_yday != -1 ) prelude_string_sprintf(out, "yday:%d ", lt->tm_yday); if ( lt->tm_mon != -1 ) prelude_string_sprintf(out, "month:%d ", lt->tm_mon); if ( lt->tm_mday != -1 ) prelude_string_sprintf(out, "mday:%d ", lt->tm_mday); if ( lt->tm_wday != -1 ) prelude_string_sprintf(out, "wday:%d ", lt->tm_wday); if ( lt->tm_hour != -1 ) prelude_string_sprintf(out, "hour:%d ", lt->tm_hour); if ( lt->tm_min != -1 ) prelude_string_sprintf(out, "min:%d ", lt->tm_min); if ( lt->tm_sec != -1 ) prelude_string_sprintf(out, "sec:%d ", lt->tm_sec); return 0; } static int btime_print(const idmef_criterion_value_t *cv, prelude_io_t *fd) { int ret; prelude_string_t *out; ret = prelude_string_new(&out); if ( ret < 0 ) return ret; ret = btime_to_string(cv, out); if ( ret < 0 ) { prelude_string_destroy(out); return ret; } ret = prelude_io_write(fd, prelude_string_get_string(out), prelude_string_get_len(out)); prelude_string_destroy(out); return ret; } static int btime_clone(const idmef_criterion_value_t *src, idmef_criterion_value_t *dst) { /* * The API does not allow to change the value of an existing * idmef_criterion_value_t object, so we can simply regerence the source. */ dst->value_need_free = FALSE; dst->value = src->value; return 0; } static void btime_destroy(idmef_criterion_value_t *cv) { if ( cv->value_need_free ) free(cv->value); } /* * regex stuff */ static int regex_match(const idmef_criterion_value_t *cv, idmef_criterion_operator_t operator, idmef_value_t *value) { int ret; const char *str = NULL; idmef_class_id_t class; struct regex_value *rv = cv->value; if ( idmef_value_get_type(value) == IDMEF_VALUE_TYPE_STRING ) str = prelude_string_get_string(idmef_value_get_string(value)); else if ( idmef_value_get_type(value) == IDMEF_VALUE_TYPE_ENUM ) { class = idmef_value_get_class(value); str = idmef_class_enum_to_string(class, idmef_value_get_enum(value)); } else if ( idmef_value_get_type(value) == IDMEF_VALUE_TYPE_DATA ) { idmef_data_t *data; data = idmef_value_get_data(value); if ( idmef_data_get_type(data) == IDMEF_DATA_TYPE_CHAR_STRING ) str = idmef_data_get_data(data); } if ( ! str ) return 0; ret = regexec(&rv->regex, str, 0, NULL, 0); if ( operator & IDMEF_CRITERION_OPERATOR_NOT ) return (ret == REG_NOMATCH) ? 1 : 0; else return (ret != REG_NOMATCH) ? 1 : 0; } static int regex_print(const idmef_criterion_value_t *cv, prelude_io_t *fd) { struct regex_value *rv = cv->value; prelude_io_write(fd, rv->regex_string, strlen(rv->regex_string)); return 0; } static int regex_to_string(const idmef_criterion_value_t *cv, prelude_string_t *out) { struct regex_value *rv = cv->value; return prelude_string_cat(out, rv->regex_string); } static int regex_clone(const idmef_criterion_value_t *src, idmef_criterion_value_t *dst) { /* * The API does not allow to change the value of an existing * idmef_criterion_value_t object, so we can simply regerence the source. */ dst->value_need_free = FALSE; dst->value = src->value; return 0; } static void regex_destroy(idmef_criterion_value_t *cv) { struct regex_value *rv; if ( ! cv->value_need_free ) return; rv = cv->value; free(rv->regex_string); regfree(&rv->regex); free(rv); } /* * value stuff */ static int value_match(const idmef_criterion_value_t *cv, idmef_criterion_operator_t operator, idmef_value_t *value) { return idmef_value_match(value, cv->value, operator); } static int value_print(const idmef_criterion_value_t *cv, prelude_io_t *fd) { return idmef_value_print(cv->value, fd); } static int value_to_string(const idmef_criterion_value_t *cv, prelude_string_t *out) { return idmef_value_to_string(cv->value, out); } static int value_clone(const idmef_criterion_value_t *cv, idmef_criterion_value_t *dst) { int ret; idmef_value_t *res; ret = idmef_value_clone(cv->value, &res); dst->value = res; return ret; } static void value_destroy(idmef_criterion_value_t *cv) { idmef_value_destroy(cv->value); } /* * */ static int do_match_cb(idmef_value_t *value, void *extra) { int ret; struct match_cb *mcb = extra; idmef_criterion_value_t *cv = mcb->cv; idmef_criterion_operator_t operator = mcb->operator; if ( idmef_value_is_list(value) ) return idmef_value_iterate(value, do_match_cb, mcb); ret = cv->match(cv, operator, value); if ( ret < 0 ) return ret; if ( ret > 0 ) mcb->match++; else mcb->nmatch++; return 0; } void idmef_criterion_value_destroy(idmef_criterion_value_t *value) { value->destroy(value); free(value); } int idmef_criterion_value_clone(const idmef_criterion_value_t *src, idmef_criterion_value_t **dst) { int ret; ret = idmef_criterion_value_new(dst); if ( ret < 0 ) return ret; (*dst)->type = src->type; (*dst)->clone = src->clone; (*dst)->print = src->print; (*dst)->to_string = src->to_string; (*dst)->match = src->match; (*dst)->destroy = src->destroy; ret = src->clone(src, *dst); if ( ret < 0 ) { free(*dst); return ret; } return 0; } int idmef_criterion_value_print(idmef_criterion_value_t *cv, prelude_io_t *fd) { return cv->print(cv, fd); } int idmef_criterion_value_to_string(idmef_criterion_value_t *cv, prelude_string_t *out) { return cv->to_string(cv, out); } int idmef_criterion_value_match(idmef_criterion_value_t *cv, idmef_value_t *value, idmef_criterion_operator_t op) { int ret; struct match_cb mcb; mcb.cv = cv; mcb.operator = op; mcb.match = mcb.nmatch = 0; ret = idmef_value_iterate(value, do_match_cb, &mcb); if ( ret < 0 ) return ret; /* * When comparing a path to a value using a negative operator, if the * excluded value was found at least once, return a negative match. * * This is required since the 'match' value might also be positive * in case the path contain a list of value. */ if ( op & IDMEF_CRITERION_OPERATOR_NOT && mcb.nmatch > 0 ) return 0; return mcb.match; } int idmef_criterion_value_new(idmef_criterion_value_t **cv) { *cv = calloc(1, sizeof(**cv)); if ( ! *cv ) return prelude_error_from_errno(errno); (*cv)->value_need_free = TRUE; return 0; } static int btime_parse_gmtoff(const char *param, int *out) { *out = atoi(param) * 60 * 60; return 0; } static int btime_parse(struct tm *lt, const char *time) { int ret; size_t i; long gmt_offset; char *end = NULL; struct { const char *field; size_t len; void *ptr; int (*func)(const char *param, int *output); } tbl[] = { { "month", 5, <->tm_mon, btime_parse_month }, { "wday", 4, <->tm_wday, btime_parse_wday }, { "year", 4, <->tm_year, btime_parse_year }, { "mday", 4, <->tm_mday, btime_parse_simple }, { "yday", 4, <->tm_yday, btime_parse_simple }, { "hour", 4, <->tm_hour, btime_parse_simple }, { "min", 3, <->tm_min, btime_parse_simple }, { "sec", 3, <->tm_sec, btime_parse_simple }, { "gmtoff", 6, &gmt_offset, btime_parse_gmtoff } }; ret = prelude_get_gmt_offset(&gmt_offset); if ( ret < 0 ) return ret; do { for ( i = 0; i < sizeof(tbl) / sizeof(*tbl); i++ ) { if ( strncmp(time, tbl[i].field, tbl[i].len) != 0 ) continue; if ( time[tbl[i].len] != ':' ) continue; time += tbl[i].len + 1; end = strchr(time, ' '); if ( end ) { *end++ = 0; while ( *end == ' ' ) end++; } ret = tbl[i].func(time, tbl[i].ptr); if ( ret < 0 ) return -1; time = end + 1; break; } if ( i == sizeof(tbl) / sizeof(*tbl) ) return -1; time = end; } while ( time ); if ( lt->tm_hour != -1 ) lt->tm_hour -= (gmt_offset / (60 * 60)); return 0; } int idmef_criterion_value_new_broken_down_time(idmef_criterion_value_t **cv, const char *time, idmef_criterion_operator_t op) { int ret; struct tm *lt; ret = idmef_criterion_value_new(cv); if ( ret < 0 ) return ret; lt = malloc(sizeof(struct tm)); if ( ! lt ) { free(*cv); return prelude_error_from_errno(errno); } memset(lt, -1, sizeof(*lt)); ret = btime_parse(lt, time); if ( ret < 0 ) { free(lt); free(*cv); return ret; } (*cv)->value = lt; (*cv)->match = btime_match; (*cv)->clone = btime_clone; (*cv)->print = btime_print; (*cv)->destroy = btime_destroy; (*cv)->to_string = btime_to_string; (*cv)->type = IDMEF_CRITERION_VALUE_TYPE_BROKEN_DOWN_TIME; return 0; } int idmef_criterion_value_new_regex(idmef_criterion_value_t **cv, const char *regex, idmef_criterion_operator_t op) { int ret; struct regex_value *rv; int flags = REG_EXTENDED|REG_NOSUB; ret = idmef_criterion_value_new(cv); if ( ret < 0 ) return ret; rv = (*cv)->value = malloc(sizeof(*rv)); if ( ! rv ) { free(*cv); return prelude_error_from_errno(errno); } rv->regex_string = strdup(regex); if ( ! rv->regex_string ) { free(rv); free(*cv); return prelude_error_from_errno(errno); } if ( op & IDMEF_CRITERION_OPERATOR_NOCASE ) flags |= REG_ICASE; ret = regcomp(&rv->regex, rv->regex_string, flags); if ( ret != 0 ) { char errbuf[1024]; regerror(ret, &rv->regex, errbuf, sizeof(errbuf)); free(rv->regex_string); free(rv); free(*cv); return prelude_error_verbose(PRELUDE_ERROR_IDMEF_CRITERION_INVALID_REGEX, "error compiling regex: %s", errbuf); } (*cv)->match = regex_match; (*cv)->clone = regex_clone; (*cv)->print = regex_print; (*cv)->destroy = regex_destroy; (*cv)->to_string = regex_to_string; (*cv)->type = IDMEF_CRITERION_VALUE_TYPE_REGEX; return 0; } int idmef_criterion_value_new_value(idmef_criterion_value_t **cv, idmef_value_t *value, idmef_criterion_operator_t op) { int ret; ret = idmef_value_check_operator(value, op); if ( ret < 0 ) return ret; ret = idmef_criterion_value_new(cv); if ( ret < 0 ) return ret; (*cv)->value = value; (*cv)->match = value_match; (*cv)->clone = value_clone; (*cv)->print = value_print; (*cv)->destroy = value_destroy; (*cv)->to_string = value_to_string; (*cv)->type = IDMEF_CRITERION_VALUE_TYPE_VALUE; return 0; } int idmef_criterion_value_new_from_string(idmef_criterion_value_t **cv, idmef_path_t *path, const char *value, idmef_criterion_operator_t operator) { int ret; idmef_value_t *val; idmef_value_type_id_t tid; tid = idmef_path_get_value_type(path, -1); if ( tid == IDMEF_VALUE_TYPE_TIME ) { ret = idmef_criterion_value_new_broken_down_time(cv, value, operator); if ( ret == 0 ) return ret; } else if ( operator & IDMEF_CRITERION_OPERATOR_REGEX && (tid == IDMEF_VALUE_TYPE_STRING || tid == IDMEF_VALUE_TYPE_ENUM || tid == IDMEF_VALUE_TYPE_DATA) ) return idmef_criterion_value_new_regex(cv, value, operator); /* * It's more understandable for the user if we check the operator * prior to checking the value. */ ret = idmef_value_type_check_operator(tid, operator); if ( ret < 0 ) return ret; if ( tid == IDMEF_VALUE_TYPE_ENUM && operator & IDMEF_CRITERION_OPERATOR_SUBSTR ) ret = idmef_value_new_from_string(&val, IDMEF_VALUE_TYPE_STRING, value); else ret = idmef_value_new_from_path(&val, path, value); if ( ret < 0 ) return ret; ret = idmef_criterion_value_new_value(cv, val, operator); if ( ret < 0 ) { idmef_value_destroy(val); return ret; } return 0; } const idmef_value_t *idmef_criterion_value_get_value(idmef_criterion_value_t *cv) { return cv->type == IDMEF_CRITERION_VALUE_TYPE_VALUE ? cv->value : NULL; } const struct tm *idmef_criterion_value_get_broken_down_time(idmef_criterion_value_t *cv) { return cv->type == IDMEF_CRITERION_VALUE_TYPE_BROKEN_DOWN_TIME ? cv->value : NULL; } const char *idmef_criterion_value_get_regex(idmef_criterion_value_t *cv) { return cv->type == IDMEF_CRITERION_VALUE_TYPE_REGEX ? ((struct regex_value *)cv->value)->regex_string : NULL; } idmef_criterion_value_type_t idmef_criterion_value_get_type(idmef_criterion_value_t *cv) { return cv->type; } libprelude-1.0.0/src/idmef-criteria.c0000664000076400007640000004561211202225026014411 00000000000000/***** * * Copyright (C) 2004-2006,2007,2008 PreludeIDS Technologies. All Rights Reserved. * Author: Yoann Vandoorselaere * * This file is part of the Prelude library. * * 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; see the file COPYING. If not, write to * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. * *****/ #include "config.h" #include "libmissing.h" #include #include #include #include #include #define PRELUDE_ERROR_SOURCE_DEFAULT PRELUDE_ERROR_SOURCE_IDMEF_CRITERIA #include "prelude.h" #include "idmef-criteria.h" struct idmef_criterion { idmef_path_t *path; idmef_criterion_value_t *value; idmef_criterion_operator_t operator; }; struct idmef_criteria { int refcount; prelude_bool_t negated; idmef_criterion_t *criterion; struct idmef_criteria *or; struct idmef_criteria *and; }; /** * idmef_criterion_operator_to_string: * @op: #idmef_criterion_operator_t type. * * Transforms @op to string. * * Returns: A pointer to an operator string or NULL. */ const char *idmef_criterion_operator_to_string(idmef_criterion_operator_t op) { int i; const struct { idmef_criterion_operator_t operator; const char *name; } tbl[] = { { IDMEF_CRITERION_OPERATOR_EQUAL, "=" }, { IDMEF_CRITERION_OPERATOR_EQUAL_NOCASE, "=*" }, { IDMEF_CRITERION_OPERATOR_NOT_EQUAL, "!=" }, { IDMEF_CRITERION_OPERATOR_NOT_EQUAL_NOCASE, "!=*" }, { IDMEF_CRITERION_OPERATOR_LESSER, "<" }, { IDMEF_CRITERION_OPERATOR_GREATER, ">" }, { IDMEF_CRITERION_OPERATOR_LESSER_OR_EQUAL, "<=" }, { IDMEF_CRITERION_OPERATOR_GREATER_OR_EQUAL, ">=" }, { IDMEF_CRITERION_OPERATOR_REGEX, "~" }, { IDMEF_CRITERION_OPERATOR_REGEX_NOCASE, "~*" }, { IDMEF_CRITERION_OPERATOR_NOT_REGEX, "!~" }, { IDMEF_CRITERION_OPERATOR_NOT_REGEX_NOCASE, "!~*" }, { IDMEF_CRITERION_OPERATOR_SUBSTR, "<>" }, { IDMEF_CRITERION_OPERATOR_SUBSTR_NOCASE, "<>*" }, { IDMEF_CRITERION_OPERATOR_NOT_SUBSTR, "!<>" }, { IDMEF_CRITERION_OPERATOR_NOT_SUBSTR_NOCASE, "!<>*" }, { IDMEF_CRITERION_OPERATOR_NOT_NULL, "" }, { IDMEF_CRITERION_OPERATOR_NULL, "!" }, }; for ( i = 0; tbl[i].operator != 0; i++ ) if ( op == tbl[i].operator ) return tbl[i].name; return NULL; } /** * idmef_criterion_new: * @criterion: Address where to store the created #idmef_criterion_t object. * @path: Pointer to an #idmef_path_t object. * @value: Pointer to an #idmef_criterion_value_t object. * @op: #idmef_criterion_operator_t to use for matching this criterion. * * Creates a new #idmef_criterion_t object and store it in @criterion. * Matching this criterion will result in comparing the object value * pointed by @path against the provided @value, using @op. * * Returns: 0 on success, a negative value if an error occured. */ int idmef_criterion_new(idmef_criterion_t **criterion, idmef_path_t *path, idmef_criterion_value_t *value, idmef_criterion_operator_t op) { prelude_return_val_if_fail(path != NULL, prelude_error(PRELUDE_ERROR_ASSERTION)); prelude_return_val_if_fail(! (value == NULL && ! (op & IDMEF_CRITERION_OPERATOR_NULL)), prelude_error(PRELUDE_ERROR_ASSERTION)); *criterion = calloc(1, sizeof(**criterion)); if ( ! *criterion ) return prelude_error_from_errno(errno); (*criterion)->path = path; (*criterion)->value = value; (*criterion)->operator = op; return 0; } /** * idmef_criterion_destroy: * @criterion: Pointer to a #idmef_criterion_t object. * * Destroys @criterion and its content. */ void idmef_criterion_destroy(idmef_criterion_t *criterion) { prelude_return_if_fail(criterion); idmef_path_destroy(criterion->path); if ( criterion->value ) /* can be NULL if operator is is_null or is_not_null */ idmef_criterion_value_destroy(criterion->value); free(criterion); } /** * idmef_criterion_clone: * @criterion: Pointer to a #idmef_criterion_t object to clone. * @dst: Address where to store the cloned #idmef_criterion_t object. * * Clones @criterion and stores the cloned criterion within @dst. * * Returns: 0 on success, a negative value if an error occured. */ int idmef_criterion_clone(const idmef_criterion_t *criterion, idmef_criterion_t **dst) { int ret; idmef_path_t *path; idmef_criterion_value_t *value = NULL; prelude_return_val_if_fail(criterion, prelude_error(PRELUDE_ERROR_ASSERTION)); ret = idmef_path_clone(criterion->path, &path); if ( ret < 0 ) return ret; if ( criterion->value ) { ret = idmef_criterion_value_clone(criterion->value, &value); if ( ret < 0 ) { idmef_path_destroy(path); return ret; } } ret = idmef_criterion_new(dst, path, value, criterion->operator); if ( ret < 0 ) { idmef_path_destroy(path); idmef_criterion_value_destroy(value); return ret; } return 0; } /** * idmef_criterion_print: * @criterion: Pointer to a #idmef_criterion_t object. * @fd: Pointer to a #prelude_io_t object. * * Dump @criterion to @fd in the form of: * [path] [operator] [value] * * Or if there is no value associated with the criterion: * [operator] [path] * * Returns: 0 on success, a negative value if an error occured. */ int idmef_criterion_print(const idmef_criterion_t *criterion, prelude_io_t *fd) { int ret; prelude_string_t *out; prelude_return_val_if_fail(criterion, prelude_error(PRELUDE_ERROR_ASSERTION)); prelude_return_val_if_fail(fd, prelude_error(PRELUDE_ERROR_ASSERTION)); ret = prelude_string_new(&out); if ( ret < 0 ) return ret; ret = idmef_criterion_to_string(criterion, out); if ( ret < 0 ) { prelude_string_destroy(out); return ret; } ret = prelude_io_write(fd, prelude_string_get_string(out), prelude_string_get_len(out)); prelude_string_destroy(out); return ret; } /** * idmef_criterion_to_string: * @criterion: Pointer to a #idmef_criterion_t object. * @out: Pointer to a #prelude_string_t object. * * Dump @criterion as a string to the @out buffer in the form of: * [path] [operator] [value] * * Or if there is no value associated with the criterion: * [operator] [path] * * Returns: 0 on success, a negative value if an error occured. */ int idmef_criterion_to_string(const idmef_criterion_t *criterion, prelude_string_t *out) { const char *name, *operator; prelude_return_val_if_fail(criterion, prelude_error(PRELUDE_ERROR_ASSERTION)); prelude_return_val_if_fail(out, prelude_error(PRELUDE_ERROR_ASSERTION)); operator = idmef_criterion_operator_to_string(criterion->operator); if ( ! operator ) return -1; name = idmef_path_get_name(criterion->path, -1); if ( ! criterion->value ) return prelude_string_sprintf(out, "%s%s%s", operator, (*operator) ? " " : "", name); prelude_string_sprintf(out, "%s %s ", name, operator); return idmef_criterion_value_to_string(criterion->value, out); } /** * idmef_criterion_get_path: * @criterion: Pointer to a #idmef_criterion_t object. * * Used to access the #idmef_path_t object associated with @criterion. * * Returns: the #idmef_path_t object associated with @criterion. */ idmef_path_t *idmef_criterion_get_path(const idmef_criterion_t *criterion) { prelude_return_val_if_fail(criterion, NULL); return criterion->path; } /** * idmef_criterion_get_value: * @criterion: Pointer to a #idmef_criterion_t object. * * Used to access the #idmef_criterion_value_t associated with @criterion. * There might be no value specifically if the provided #idmef_criterion_operator_t * was IDMEF_CRITERION_OPERATOR_NULL or IDMEF_CRITERION_OPERATOR_NOT_NULL. * * Returns: the #idmef_criterion_value_t object associated with @criterion. */ idmef_criterion_value_t *idmef_criterion_get_value(const idmef_criterion_t *criterion) { prelude_return_val_if_fail(criterion, NULL); return criterion->value; } /** * idmef_criterion_get_operator: * @criterion: Pointer to a #idmef_criterion_t object. * * Used to access the #idmef_criterion_operator_t enumeration associated with @criterion. * * Returns: the #idmef_criterion_operator_t associated with @criterion. */ idmef_criterion_operator_t idmef_criterion_get_operator(const idmef_criterion_t *criterion) { prelude_return_val_if_fail(criterion, prelude_error(PRELUDE_ERROR_ASSERTION)); return criterion->operator; } /** * idmef_criterion_match: * @criterion: Pointer to a #idmef_criterion_t object. * @message: Pointer to a #idmef_message_t object to match against @criterion. * * Matches @message against the provided @criterion. This implies retrieving the * value associated with @criterion path, and matching it with the @idmef_criterion_value_t * object within @criterion. * * Returns: 1 for a match, 0 for no match, or a negative value if an error occured. */ int idmef_criterion_match(const idmef_criterion_t *criterion, idmef_message_t *message) { int ret; idmef_value_t *value; prelude_return_val_if_fail(criterion, prelude_error(PRELUDE_ERROR_ASSERTION)); prelude_return_val_if_fail(message, prelude_error(PRELUDE_ERROR_ASSERTION)); ret = idmef_path_get(criterion->path, message, &value); if ( ret < 0 ) return ret; if ( ret == 0 ) { if ( criterion->value && criterion->operator & IDMEF_CRITERION_OPERATOR_NOT ) return 1; return (criterion->operator == IDMEF_CRITERION_OPERATOR_NULL) ? 1 : 0; } if ( ! criterion->value ) { idmef_value_destroy(value); return (criterion->operator == (IDMEF_CRITERION_OPERATOR_NULL|IDMEF_CRITERION_OPERATOR_NOT)) ? 1 : 0; } ret = idmef_criterion_value_match(criterion->value, value, criterion->operator); idmef_value_destroy(value); if ( ret < 0 ) return ret; return (ret > 0) ? 1 : 0; } /** * idmef_criteria_new: * @criteria: Address where to store the created #idmef_criteria_t object. * * Creates a new #idmef_criteria_t object and store it into @criteria. * * Returns: 0 on success, a negative value if an error occured. */ int idmef_criteria_new(idmef_criteria_t **criteria) { *criteria = calloc(1, sizeof(**criteria)); if ( ! *criteria ) return prelude_error_from_errno(errno); (*criteria)->or = NULL; (*criteria)->and = NULL; (*criteria)->refcount = 1; return 0; } /** * idmef_criteria_destroy: * @criteria: Pointer to a #idmef_criteria_t object. * * Destroys @criteria and its content. */ void idmef_criteria_destroy(idmef_criteria_t *criteria) { prelude_return_if_fail(criteria); if ( --criteria->refcount ) return; if ( criteria->criterion ) idmef_criterion_destroy(criteria->criterion); if ( criteria->or ) idmef_criteria_destroy(criteria->or); if ( criteria->and ) idmef_criteria_destroy(criteria->and); free(criteria); } /** * idmef_criteria_ref: * @criteria: Pointer to a #idmef_criteria_t object to reference. * * Increases @criteria reference count. * * idmef_criteria_destroy() will decrease the refcount until it reaches * 0, at which point @criteria will be destroyed. * * Returns: @criteria. */ idmef_criteria_t *idmef_criteria_ref(idmef_criteria_t *criteria) { prelude_return_val_if_fail(criteria, NULL); criteria->refcount++; return criteria; } /** * idmef_criteria_clone: * @src: Pointer to a #idmef_criteria_t object to clone. * @dst: Address where to store the cloned #idmef_criteria_t object. * * Clones @src and stores the cloned criteria within @dst. * * Returns: 0 on success, a negative value if an error occured. */ int idmef_criteria_clone(idmef_criteria_t *src, idmef_criteria_t **dst) { int ret; idmef_criteria_t *new; prelude_return_val_if_fail(src, prelude_error(PRELUDE_ERROR_ASSERTION)); ret = idmef_criteria_new(dst); if ( ret < 0 ) return ret; new = *dst; new->negated = src->negated; if ( src->or ) { ret = idmef_criteria_clone(src->or, &new->or); if ( ret < 0 ) { idmef_criteria_destroy(new); return ret; } } if ( src->and ) { ret = idmef_criteria_clone(src->and, &new->and); if ( ret < 0 ) { idmef_criteria_destroy(new); return ret; } } ret = idmef_criterion_clone(src->criterion, &new->criterion); if ( ret < 0 ) { idmef_criteria_destroy(new); return ret; } return 0; } idmef_criteria_t *idmef_criteria_get_or(const idmef_criteria_t *criteria) { prelude_return_val_if_fail(criteria, NULL); return criteria->or; } idmef_criteria_t *idmef_criteria_get_and(const idmef_criteria_t *criteria) { prelude_return_val_if_fail(criteria, NULL); return criteria->and; } int idmef_criteria_print(const idmef_criteria_t *criteria, prelude_io_t *fd) { int ret; prelude_string_t *out; prelude_return_val_if_fail(criteria, prelude_error(PRELUDE_ERROR_ASSERTION)); prelude_return_val_if_fail(fd, prelude_error(PRELUDE_ERROR_ASSERTION)); ret = prelude_string_new(&out); if ( ret < 0 ) return ret; ret = idmef_criteria_to_string(criteria, out); if ( ret < 0 ) return ret; ret = prelude_io_write(fd, prelude_string_get_string(out), prelude_string_get_len(out)); prelude_string_destroy(out); return ret; } int idmef_criteria_to_string(const idmef_criteria_t *criteria, prelude_string_t *out) { prelude_return_val_if_fail(criteria, prelude_error(PRELUDE_ERROR_ASSERTION)); prelude_return_val_if_fail(out, prelude_error(PRELUDE_ERROR_ASSERTION)); if ( criteria->or ) prelude_string_sprintf(out, "(("); idmef_criterion_to_string(criteria->criterion, out); if ( criteria->and ) { prelude_string_sprintf(out, " && "); idmef_criteria_to_string(criteria->and, out); } if ( criteria->or ) { prelude_string_sprintf(out, ") || ("); idmef_criteria_to_string(criteria->or, out); prelude_string_sprintf(out, "))"); } return 0; } prelude_bool_t idmef_criteria_is_criterion(const idmef_criteria_t *criteria) { prelude_return_val_if_fail(criteria, FALSE); return (criteria->criterion != NULL) ? TRUE : FALSE; } idmef_criterion_t *idmef_criteria_get_criterion(const idmef_criteria_t *criteria) { prelude_return_val_if_fail(criteria, NULL); return criteria->criterion; } void idmef_criteria_or_criteria(idmef_criteria_t *criteria, idmef_criteria_t *criteria2) { prelude_return_if_fail(criteria); prelude_return_if_fail(criteria2); while ( criteria->or ) criteria = criteria->or; criteria->or = criteria2; } int idmef_criteria_and_criteria(idmef_criteria_t *criteria, idmef_criteria_t *criteria2) { int ret; idmef_criteria_t *new, *last = NULL; prelude_return_val_if_fail(criteria, prelude_error(PRELUDE_ERROR_ASSERTION)); prelude_return_val_if_fail(criteria2, prelude_error(PRELUDE_ERROR_ASSERTION)); while ( criteria ) { last = criteria; if ( criteria->or ) { ret = idmef_criteria_clone(criteria2, &new); if ( ret < 0 ) return ret; ret = idmef_criteria_and_criteria(criteria->or, new); if ( ret < 0 ) return ret; } criteria = criteria->and; } last->and = criteria2; return 0; } void idmef_criteria_set_negation(idmef_criteria_t *criteria, prelude_bool_t negate) { prelude_return_if_fail(criteria); criteria->negated = negate; } prelude_bool_t idmef_criteria_get_negation(const idmef_criteria_t *criteria) { prelude_return_val_if_fail(criteria, FALSE); return criteria->negated; } void idmef_criteria_set_criterion(idmef_criteria_t *criteria, idmef_criterion_t *criterion) { prelude_return_if_fail(criteria); prelude_return_if_fail(criterion); criteria->criterion = criterion; } /** * idmef_criteria_match: * @criteria: Pointer to a #idmef_criteria_t object. * @message: Pointer to a #idmef_message_t message. * * Matches @message against the provided criteria. * * Returns: 1 if criteria match, 0 if it did not, a negative value if an error occured. */ int idmef_criteria_match(const idmef_criteria_t *criteria, idmef_message_t *message) { int ret; prelude_return_val_if_fail(criteria, prelude_error(PRELUDE_ERROR_ASSERTION)); prelude_return_val_if_fail(message, prelude_error(PRELUDE_ERROR_ASSERTION)); ret = idmef_criterion_match(criteria->criterion, message); if ( ret < 0 ) return ret; if ( ret == 1 && criteria->and ) ret = idmef_criteria_match(criteria->and, message); if ( ret == 0 && criteria->or ) ret = idmef_criteria_match(criteria->or, message); if ( ret < 0 ) return ret; return (criteria->negated) ? !ret : ret; } libprelude-1.0.0/src/idmef-criteria-string.lex.c0000664000076400007640000016145111202225026016504 00000000000000 #line 3 "idmef-criteria-string.lex.c" #define YY_INT_ALIGNED short int /* A lexical scanner generated by flex */ #define FLEX_SCANNER #define YY_FLEX_MAJOR_VERSION 2 #define YY_FLEX_MINOR_VERSION 5 #define YY_FLEX_SUBMINOR_VERSION 34 #if YY_FLEX_SUBMINOR_VERSION > 0 #define FLEX_BETA #endif /* First, we deal with platform-specific or compiler-specific issues. */ /* begin standard C headers. */ #include #include #include #include /* end standard C headers. */ /* flex integer type definitions */ #ifndef FLEXINT_H #define FLEXINT_H /* C99 systems have . Non-C99 systems may or may not. */ #if defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L /* C99 says to define __STDC_LIMIT_MACROS before including stdint.h, * if you want the limit (max/min) macros for int types. */ #ifndef __STDC_LIMIT_MACROS #define __STDC_LIMIT_MACROS 1 #endif #include typedef int8_t flex_int8_t; typedef uint8_t flex_uint8_t; typedef int16_t flex_int16_t; typedef uint16_t flex_uint16_t; typedef int32_t flex_int32_t; typedef uint32_t flex_uint32_t; #else typedef signed char flex_int8_t; typedef short int flex_int16_t; typedef int flex_int32_t; typedef unsigned char flex_uint8_t; typedef unsigned short int flex_uint16_t; typedef unsigned int flex_uint32_t; #endif /* ! C99 */ /* Limits of integral types. */ #ifndef INT8_MIN #define INT8_MIN (-128) #endif #ifndef INT16_MIN #define INT16_MIN (-32767-1) #endif #ifndef INT32_MIN #define INT32_MIN (-2147483647-1) #endif #ifndef INT8_MAX #define INT8_MAX (127) #endif #ifndef INT16_MAX #define INT16_MAX (32767) #endif #ifndef INT32_MAX #define INT32_MAX (2147483647) #endif #ifndef UINT8_MAX #define UINT8_MAX (255U) #endif #ifndef UINT16_MAX #define UINT16_MAX (65535U) #endif #ifndef UINT32_MAX #define UINT32_MAX (4294967295U) #endif #endif /* ! FLEXINT_H */ #ifdef __cplusplus /* The "const" storage-class-modifier is valid. */ #define YY_USE_CONST #else /* ! __cplusplus */ /* C99 requires __STDC__ to be defined as 1. */ #if defined (__STDC__) #define YY_USE_CONST #endif /* defined (__STDC__) */ #endif /* ! __cplusplus */ #ifdef YY_USE_CONST #define yyconst const #else #define yyconst #endif /* Returned upon end-of-file. */ #define YY_NULL 0 /* Promotes a possibly negative, possibly signed char to an unsigned * integer for use as an array index. If the signed char is negative, * we want to instead treat it as an 8-bit unsigned char, hence the * double cast. */ #define YY_SC_TO_UI(c) ((unsigned int) (unsigned char) c) /* Enter a start condition. This macro really ought to take a parameter, * but we do it the disgusting crufty way forced on us by the ()-less * definition of BEGIN. */ #define BEGIN (yy_start) = 1 + 2 * /* Translate the current start state into a value that can be later handed * to BEGIN to return to the state. The YYSTATE alias is for lex * compatibility. */ #define YY_START (((yy_start) - 1) / 2) #define YYSTATE YY_START /* Action number for EOF rule of a given start state. */ #define YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1) /* Special action meaning "start processing a new file". */ #define YY_NEW_FILE yyrestart(yyin ) #define YY_END_OF_BUFFER_CHAR 0 /* Size of default input buffer. */ #ifndef YY_BUF_SIZE #define YY_BUF_SIZE 16384 #endif /* The state buf must be large enough to hold one state per character in the main buffer. */ #define YY_STATE_BUF_SIZE ((YY_BUF_SIZE + 2) * sizeof(yy_state_type)) #ifndef YY_TYPEDEF_YY_BUFFER_STATE #define YY_TYPEDEF_YY_BUFFER_STATE typedef struct yy_buffer_state *YY_BUFFER_STATE; #endif extern int yyleng; extern FILE *yyin, *yyout; #define EOB_ACT_CONTINUE_SCAN 0 #define EOB_ACT_END_OF_FILE 1 #define EOB_ACT_LAST_MATCH 2 #define YY_LESS_LINENO(n) /* Return all but the first "n" matched characters back to the input stream. */ #define yyless(n) \ do \ { \ /* Undo effects of setting up yytext. */ \ int yyless_macro_arg = (n); \ YY_LESS_LINENO(yyless_macro_arg);\ *yy_cp = (yy_hold_char); \ YY_RESTORE_YY_MORE_OFFSET \ (yy_c_buf_p) = yy_cp = yy_bp + yyless_macro_arg - YY_MORE_ADJ; \ YY_DO_BEFORE_ACTION; /* set up yytext again */ \ } \ while ( 0 ) #define unput(c) yyunput( c, (yytext_ptr) ) /* The following is because we cannot portably get our hands on size_t * (without autoconf's help, which isn't available because we want * flex-generated scanners to compile on their own). * Given that the standard has decreed that size_t exists since 1989, * I guess we can afford to depend on it. Manoj. */ #ifndef YY_TYPEDEF_YY_SIZE_T #define YY_TYPEDEF_YY_SIZE_T typedef size_t yy_size_t; #endif #ifndef YY_STRUCT_YY_BUFFER_STATE #define YY_STRUCT_YY_BUFFER_STATE struct yy_buffer_state { FILE *yy_input_file; char *yy_ch_buf; /* input buffer */ char *yy_buf_pos; /* current position in input buffer */ /* Size of input buffer in bytes, not including room for EOB * characters. */ yy_size_t yy_buf_size; /* Number of characters read into yy_ch_buf, not including EOB * characters. */ int yy_n_chars; /* Whether we "own" the buffer - i.e., we know we created it, * and can realloc() it to grow it, and should free() it to * delete it. */ int yy_is_our_buffer; /* Whether this is an "interactive" input source; if so, and * if we're using stdio for input, then we want to use getc() * instead of fread(), to make sure we stop fetching input after * each newline. */ int yy_is_interactive; /* Whether we're considered to be at the beginning of a line. * If so, '^' rules will be active on the next match, otherwise * not. */ int yy_at_bol; int yy_bs_lineno; /**< The line count. */ int yy_bs_column; /**< The column count. */ /* Whether to try to fill the input buffer when we reach the * end of it. */ int yy_fill_buffer; int yy_buffer_status; #define YY_BUFFER_NEW 0 #define YY_BUFFER_NORMAL 1 /* When an EOF's been seen but there's still some text to process * then we mark the buffer as YY_EOF_PENDING, to indicate that we * shouldn't try reading from the input source any more. We might * still have a bunch of tokens to match, though, because of * possible backing-up. * * When we actually see the EOF, we change the status to "new" * (via yyrestart()), so that the user can continue scanning by * just pointing yyin at a new input file. */ #define YY_BUFFER_EOF_PENDING 2 }; #endif /* !YY_STRUCT_YY_BUFFER_STATE */ /* Stack of input buffers. */ static size_t yy_buffer_stack_top = 0; /**< index of top of stack. */ static size_t yy_buffer_stack_max = 0; /**< capacity of stack. */ static YY_BUFFER_STATE * yy_buffer_stack = 0; /**< Stack as an array. */ /* We provide macros for accessing buffer states in case in the * future we want to put the buffer states in a more general * "scanner state". * * Returns the top of the stack, or NULL. */ #define YY_CURRENT_BUFFER ( (yy_buffer_stack) \ ? (yy_buffer_stack)[(yy_buffer_stack_top)] \ : NULL) /* Same as previous macro, but useful when we know that the buffer stack is not * NULL or when we need an lvalue. For internal use only. */ #define YY_CURRENT_BUFFER_LVALUE (yy_buffer_stack)[(yy_buffer_stack_top)] /* yy_hold_char holds the character lost when yytext is formed. */ static char yy_hold_char; static int yy_n_chars; /* number of characters read into yy_ch_buf */ int yyleng; /* Points to current character in buffer. */ static char *yy_c_buf_p = (char *) 0; static int yy_init = 0; /* whether we need to initialize */ static int yy_start = 0; /* start state number */ /* Flag which is used to allow yywrap()'s to do buffer switches * instead of setting up a fresh yyin. A bit of a hack ... */ static int yy_did_buffer_switch_on_eof; void yyrestart (FILE *input_file ); void yy_switch_to_buffer (YY_BUFFER_STATE new_buffer ); YY_BUFFER_STATE yy_create_buffer (FILE *file,int size ); void yy_delete_buffer (YY_BUFFER_STATE b ); void yy_flush_buffer (YY_BUFFER_STATE b ); void yypush_buffer_state (YY_BUFFER_STATE new_buffer ); void yypop_buffer_state (void ); static void yyensure_buffer_stack (void ); static void yy_load_buffer_state (void ); static void yy_init_buffer (YY_BUFFER_STATE b,FILE *file ); #define YY_FLUSH_BUFFER yy_flush_buffer(YY_CURRENT_BUFFER ) YY_BUFFER_STATE yy_scan_buffer (char *base,yy_size_t size ); YY_BUFFER_STATE yy_scan_string (yyconst char *yy_str ); YY_BUFFER_STATE yy_scan_bytes (yyconst char *bytes,int len ); void *yyalloc (yy_size_t ); void *yyrealloc (void *,yy_size_t ); void yyfree (void * ); #define yy_new_buffer yy_create_buffer #define yy_set_interactive(is_interactive) \ { \ if ( ! YY_CURRENT_BUFFER ){ \ yyensure_buffer_stack (); \ YY_CURRENT_BUFFER_LVALUE = \ yy_create_buffer(yyin,YY_BUF_SIZE ); \ } \ YY_CURRENT_BUFFER_LVALUE->yy_is_interactive = is_interactive; \ } #define yy_set_bol(at_bol) \ { \ if ( ! YY_CURRENT_BUFFER ){\ yyensure_buffer_stack (); \ YY_CURRENT_BUFFER_LVALUE = \ yy_create_buffer(yyin,YY_BUF_SIZE ); \ } \ YY_CURRENT_BUFFER_LVALUE->yy_at_bol = at_bol; \ } #define YY_AT_BOL() (YY_CURRENT_BUFFER_LVALUE->yy_at_bol) /* Begin user sect3 */ #define yywrap(n) 1 #define YY_SKIP_YYWRAP typedef unsigned char YY_CHAR; FILE *yyin = (FILE *) 0, *yyout = (FILE *) 0; typedef int yy_state_type; extern int yylineno; int yylineno = 1; extern char *yytext; #define yytext_ptr yytext static yy_state_type yy_get_previous_state (void ); static yy_state_type yy_try_NUL_trans (yy_state_type current_state ); static int yy_get_next_buffer (void ); static void yy_fatal_error (yyconst char msg[] ); /* Done after the current pattern has been matched and before the * corresponding action - sets up yytext. */ #define YY_DO_BEFORE_ACTION \ (yytext_ptr) = yy_bp; \ yyleng = (size_t) (yy_cp - yy_bp); \ (yy_hold_char) = *yy_cp; \ *yy_cp = '\0'; \ (yy_c_buf_p) = yy_cp; #define YY_NUM_RULES 43 #define YY_END_OF_BUFFER 44 /* This struct is not used in this scanner, but its presence is necessary. */ struct yy_trans_info { flex_int32_t yy_verify; flex_int32_t yy_nxt; }; static yyconst flex_int16_t yy_accept[83] = { 0, 0, 0, 0, 0, 44, 42, 41, 41, 23, 25, 28, 29, 5, 12, 19, 10, 5, 27, 14, 32, 33, 32, 32, 37, 32, 34, 35, 39, 41, 0, 21, 0, 16, 24, 0, 5, 5, 13, 6, 20, 18, 11, 5, 26, 15, 32, 33, 32, 32, 0, 31, 32, 36, 32, 0, 30, 32, 38, 8, 22, 0, 17, 0, 0, 7, 5, 31, 0, 30, 0, 9, 0, 5, 5, 0, 5, 0, 1, 2, 3, 4, 0 } ; static yyconst flex_int32_t yy_ec[256] = { 0, 1, 1, 1, 1, 1, 1, 1, 1, 2, 3, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 4, 5, 1, 1, 1, 6, 7, 8, 9, 10, 1, 1, 11, 12, 1, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 1, 1, 14, 15, 16, 1, 1, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 1, 18, 1, 1, 17, 1, 17, 19, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 20, 21, 22, 23, 17, 17, 17, 17, 17, 1, 24, 1, 25, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 } ; static yyconst flex_int32_t yy_meta[26] = { 0, 1, 2, 1, 1, 1, 2, 1, 3, 2, 1, 4, 4, 4, 1, 1, 1, 4, 1, 4, 4, 4, 4, 4, 2, 1 } ; static yyconst flex_int16_t yy_base[90] = { 0, 0, 0, 24, 47, 139, 202, 32, 34, 58, 132, 202, 202, 30, 24, 31, 120, 35, 108, 121, 0, 42, 57, 82, 122, 105, 202, 202, 103, 59, 110, 115, 101, 112, 202, 53, 98, 57, 202, 110, 202, 202, 202, 51, 202, 202, 0, 65, 73, 128, 75, 0, 91, 202, 151, 71, 0, 74, 202, 109, 202, 99, 202, 88, 72, 202, 81, 202, 114, 202, 107, 202, 82, 83, 93, 35, 85, 31, 76, 18, 202, 202, 202, 175, 177, 181, 185, 189, 193, 197 } ; static yyconst flex_int16_t yy_def[90] = { 0, 82, 1, 83, 83, 82, 82, 82, 82, 82, 82, 82, 82, 84, 82, 82, 82, 84, 82, 82, 85, 82, 85, 86, 82, 87, 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, 17, 84, 82, 82, 82, 82, 82, 17, 82, 82, 85, 82, 85, 86, 88, 85, 49, 82, 87, 89, 85, 54, 82, 82, 82, 82, 82, 82, 82, 82, 17, 82, 88, 82, 89, 82, 82, 37, 17, 82, 17, 82, 17, 82, 82, 82, 0, 82, 82, 82, 82, 82, 82, 82 } ; static yyconst flex_int16_t yy_nxt[228] = { 0, 6, 7, 8, 9, 6, 10, 6, 11, 12, 6, 13, 6, 13, 14, 15, 16, 13, 6, 13, 13, 17, 13, 13, 18, 19, 21, 22, 81, 23, 24, 25, 26, 27, 29, 29, 29, 29, 35, 38, 39, 40, 37, 35, 47, 47, 41, 37, 28, 21, 22, 79, 23, 24, 25, 26, 27, 77, 43, 47, 48, 29, 29, 63, 64, 82, 63, 47, 47, 82, 66, 28, 30, 31, 36, 47, 48, 46, 69, 32, 67, 54, 63, 33, 50, 63, 80, 51, 50, 70, 50, 50, 54, 68, 46, 37, 49, 73, 63, 36, 52, 63, 74, 75, 36, 78, 50, 55, 36, 49, 82, 55, 56, 55, 55, 76, 36, 82, 72, 71, 65, 36, 62, 57, 61, 60, 59, 58, 53, 55, 50, 45, 44, 51, 50, 42, 50, 50, 34, 82, 82, 82, 82, 82, 82, 82, 52, 82, 82, 82, 82, 82, 50, 55, 82, 82, 82, 55, 56, 55, 55, 82, 82, 82, 82, 82, 82, 82, 82, 57, 82, 82, 82, 82, 82, 55, 20, 20, 20, 20, 36, 36, 46, 82, 82, 46, 49, 49, 49, 49, 54, 54, 54, 54, 50, 50, 50, 50, 55, 55, 55, 55, 5, 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, 82 } ; static yyconst flex_int16_t yy_chk[228] = { 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 3, 3, 79, 3, 3, 3, 3, 3, 7, 7, 8, 8, 13, 14, 14, 15, 13, 17, 21, 21, 15, 17, 3, 4, 4, 77, 4, 4, 4, 4, 4, 75, 17, 22, 22, 29, 29, 35, 35, 37, 35, 47, 47, 37, 43, 4, 9, 9, 43, 48, 48, 57, 55, 9, 50, 57, 64, 9, 23, 64, 78, 23, 23, 55, 23, 23, 57, 50, 52, 73, 52, 63, 63, 78, 23, 63, 66, 72, 66, 76, 23, 25, 76, 52, 70, 25, 25, 25, 25, 74, 74, 68, 61, 59, 39, 36, 33, 25, 32, 31, 30, 28, 24, 25, 49, 19, 18, 49, 49, 16, 49, 49, 10, 5, 0, 0, 0, 0, 0, 0, 49, 0, 0, 0, 0, 0, 49, 54, 0, 0, 0, 54, 54, 54, 54, 0, 0, 0, 0, 0, 0, 0, 0, 54, 0, 0, 0, 0, 0, 54, 83, 83, 83, 83, 84, 84, 85, 0, 0, 85, 86, 86, 86, 86, 87, 87, 87, 87, 88, 88, 88, 88, 89, 89, 89, 89, 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, 82 } ; static yy_state_type yy_last_accepting_state; static char *yy_last_accepting_cpos; extern int yy_flex_debug; int yy_flex_debug = 0; /* The intent behind this definition is that it'll catch * any uses of REJECT which flex missed. */ #define REJECT reject_used_but_not_detected #define yymore() yymore_used_but_not_detected #define YY_MORE_ADJ 0 #define YY_RESTORE_YY_MORE_OFFSET char *yytext; #line 1 "idmef-criteria-string.lex.l" /***** * * Copyright (C) 2003, 2004, 2005 PreludeIDS Technologies. All Rights Reserved. * Author: Krzysztof Zaraska * Author: Nicolas Delon * * This file is part of the Prelude library. * * 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; see the file COPYING. If not, write to * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. * *****/ #line 26 "idmef-criteria-string.lex.l" #include #include #include "idmef.h" #include "common.h" #include "idmef-criteria-string.yac.h" #define YY_NO_UNPUT #define YY_NO_TOP_STATE #ifndef MIN # define MIN(x, y) ((x) < (y) ? (x) : (y)) #endif int yylex(void); int yyget_lineno(void); FILE *yyget_in(void); FILE *yyget_out(void); int yyget_leng(void); char *yyget_text(void); void yyset_lineno(int line_number); void yyset_in(FILE *in_str); void yyset_out(FILE *out_str); int yyget_debug(void); void yyset_debug(int bdebug); int yylex_destroy(void); static void do_pop(void); static unsigned int inp = 0; static char *escape_str(char *str) { size_t w = 0, i = 0; int escape_next = FALSE; for ( i = 0; str[i]; i++ ) { if ( ! escape_next && str[i] == '\\' ) { escape_next = TRUE; continue; } str[w++] = str[i]; escape_next = FALSE; } str[w] = 0; return str; } #line 611 "idmef-criteria-string.lex.c" #define INITIAL 0 #define IDMEF_VALUE 1 #ifndef YY_NO_UNISTD_H /* Special case for "unistd.h", since it is non-ANSI. We include it way * down here because we want the user's section 1 to have been scanned first. * The user has a chance to override it with an option. */ #include #endif #ifndef YY_EXTRA_TYPE #define YY_EXTRA_TYPE void * #endif static int yy_init_globals (void ); /* Macros after this point can all be overridden by user definitions in * section 1. */ #ifndef YY_SKIP_YYWRAP #ifdef __cplusplus extern "C" int yywrap (void ); #else extern int yywrap (void ); #endif #endif static void yyunput (int c,char *buf_ptr ); #ifndef yytext_ptr static void yy_flex_strncpy (char *,yyconst char *,int ); #endif #ifdef YY_NEED_STRLEN static int yy_flex_strlen (yyconst char * ); #endif #ifndef YY_NO_INPUT #ifdef __cplusplus static int yyinput (void ); #else static int input (void ); #endif #endif static int yy_start_stack_ptr = 0; static int yy_start_stack_depth = 0; static int *yy_start_stack = NULL; static void yy_push_state (int new_state ); static void yy_pop_state (void ); static int yy_top_state (void ); /* Amount of stuff to slurp up with each read. */ #ifndef YY_READ_BUF_SIZE #define YY_READ_BUF_SIZE 8192 #endif /* Copy whatever the last rule matched to the standard output. */ #ifndef ECHO /* This used to be an fputs(), but since the string might contain NUL's, * we now use fwrite(). */ #define ECHO fwrite( yytext, yyleng, 1, yyout ) #endif /* Gets input and stuffs it into "buf". number of characters read, or YY_NULL, * is returned in "result". */ #ifndef YY_INPUT #define YY_INPUT(buf,result,max_size) \ if ( YY_CURRENT_BUFFER_LVALUE->yy_is_interactive ) \ { \ int c = '*'; \ int n; \ for ( n = 0; n < max_size && \ (c = getc( yyin )) != EOF && c != '\n'; ++n ) \ buf[n] = (char) c; \ if ( c == '\n' ) \ buf[n++] = (char) c; \ if ( c == EOF && ferror( yyin ) ) \ YY_FATAL_ERROR( "input in flex scanner failed" ); \ result = n; \ } \ else \ { \ errno=0; \ while ( (result = fread(buf, 1, max_size, yyin))==0 && ferror(yyin)) \ { \ if( errno != EINTR) \ { \ YY_FATAL_ERROR( "input in flex scanner failed" ); \ break; \ } \ errno=0; \ clearerr(yyin); \ } \ }\ \ #endif /* No semi-colon after return; correct usage is to write "yyterminate();" - * we don't want an extra ';' after the "return" because that will cause * some compilers to complain about unreachable statements. */ #ifndef yyterminate #define yyterminate() return YY_NULL #endif /* Number of entries by which start-condition stack grows. */ #ifndef YY_START_STACK_INCR #define YY_START_STACK_INCR 25 #endif /* Report a fatal error. */ #ifndef YY_FATAL_ERROR #define YY_FATAL_ERROR(msg) yy_fatal_error( msg ) #endif /* end tables serialization structures and prototypes */ /* Default declaration of generated scanner - a define so the user can * easily add parameters. */ #ifndef YY_DECL #define YY_DECL_IS_OURS 1 extern int yylex (void); #define YY_DECL int yylex (void) #endif /* !YY_DECL */ /* Code executed at the beginning of each rule, after yytext and yyleng * have been set up. */ #ifndef YY_USER_ACTION #define YY_USER_ACTION #endif /* Code executed at the end of each rule. */ #ifndef YY_BREAK #define YY_BREAK break; #endif #define YY_RULE_SETUP \ YY_USER_ACTION /** The main scanner function which does all the work. */ YY_DECL { register yy_state_type yy_current_state; register char *yy_cp, *yy_bp; register int yy_act; #line 91 "idmef-criteria-string.lex.l" #line 778 "idmef-criteria-string.lex.c" if ( !(yy_init) ) { (yy_init) = 1; #ifdef YY_USER_INIT YY_USER_INIT; #endif if ( ! (yy_start) ) (yy_start) = 1; /* first start state */ if ( ! yyin ) yyin = stdin; if ( ! yyout ) yyout = stdout; if ( ! YY_CURRENT_BUFFER ) { yyensure_buffer_stack (); YY_CURRENT_BUFFER_LVALUE = yy_create_buffer(yyin,YY_BUF_SIZE ); } yy_load_buffer_state( ); } while ( 1 ) /* loops until end-of-file is reached */ { yy_cp = (yy_c_buf_p); /* Support of yytext. */ *yy_cp = (yy_hold_char); /* yy_bp points to the position in yy_ch_buf of the start of * the current run. */ yy_bp = yy_cp; yy_current_state = (yy_start); yy_match: do { register YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)]; if ( yy_accept[yy_current_state] ) { (yy_last_accepting_state) = yy_current_state; (yy_last_accepting_cpos) = yy_cp; } while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) { yy_current_state = (int) yy_def[yy_current_state]; if ( yy_current_state >= 83 ) yy_c = yy_meta[(unsigned int) yy_c]; } yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c]; ++yy_cp; } while ( yy_base[yy_current_state] != 202 ); yy_find_action: yy_act = yy_accept[yy_current_state]; if ( yy_act == 0 ) { /* have to back up */ yy_cp = (yy_last_accepting_cpos); yy_current_state = (yy_last_accepting_state); yy_act = yy_accept[yy_current_state]; } YY_DO_BEFORE_ACTION; do_action: /* This label is used only to access EOF actions. */ switch ( yy_act ) { /* beginning of action switch */ case 0: /* must back up */ /* undo the effects of YY_DO_BEFORE_ACTION */ *yy_cp = (yy_hold_char); yy_cp = (yy_last_accepting_cpos); yy_current_state = (yy_last_accepting_state); goto yy_find_action; case 1: YY_RULE_SETUP #line 93 "idmef-criteria-string.lex.l" { yy_push_state(IDMEF_VALUE); return TOK_RELATION_SUBSTRING; } YY_BREAK case 2: YY_RULE_SETUP #line 94 "idmef-criteria-string.lex.l" { yy_push_state(IDMEF_VALUE); return TOK_RELATION_NOT_SUBSTRING; } YY_BREAK case 3: YY_RULE_SETUP #line 95 "idmef-criteria-string.lex.l" { yy_push_state(IDMEF_VALUE); return TOK_RELATION_SUBSTRING_NOCASE; } YY_BREAK case 4: YY_RULE_SETUP #line 96 "idmef-criteria-string.lex.l" { yy_push_state(IDMEF_VALUE); return TOK_RELATION_NOT_SUBSTRING_NOCASE; } YY_BREAK case 5: YY_RULE_SETUP #line 98 "idmef-criteria-string.lex.l" { yylval.str = strdup(yytext); return TOK_IDMEF_PATH; } YY_BREAK case 6: YY_RULE_SETUP #line 103 "idmef-criteria-string.lex.l" { yy_push_state(IDMEF_VALUE); return TOK_RELATION_SUBSTRING; } YY_BREAK case 7: YY_RULE_SETUP #line 104 "idmef-criteria-string.lex.l" { yy_push_state(IDMEF_VALUE); return TOK_RELATION_SUBSTRING_NOCASE; } YY_BREAK case 8: YY_RULE_SETUP #line 105 "idmef-criteria-string.lex.l" { yy_push_state(IDMEF_VALUE); return TOK_RELATION_NOT_SUBSTRING; } YY_BREAK case 9: YY_RULE_SETUP #line 106 "idmef-criteria-string.lex.l" { yy_push_state(IDMEF_VALUE); return TOK_RELATION_NOT_SUBSTRING_NOCASE; } YY_BREAK case 10: YY_RULE_SETUP #line 108 "idmef-criteria-string.lex.l" { yy_push_state(IDMEF_VALUE); return TOK_RELATION_GREATER; } YY_BREAK case 11: YY_RULE_SETUP #line 109 "idmef-criteria-string.lex.l" { yy_push_state(IDMEF_VALUE); return TOK_RELATION_GREATER_OR_EQUAL; } YY_BREAK case 12: YY_RULE_SETUP #line 110 "idmef-criteria-string.lex.l" { yy_push_state(IDMEF_VALUE); return TOK_RELATION_LESS; } YY_BREAK case 13: YY_RULE_SETUP #line 111 "idmef-criteria-string.lex.l" { yy_push_state(IDMEF_VALUE); return TOK_RELATION_LESS_OR_EQUAL; } YY_BREAK case 14: YY_RULE_SETUP #line 113 "idmef-criteria-string.lex.l" { yy_push_state(IDMEF_VALUE); return TOK_RELATION_REGEXP; } YY_BREAK case 15: YY_RULE_SETUP #line 114 "idmef-criteria-string.lex.l" { yy_push_state(IDMEF_VALUE); return TOK_RELATION_REGEXP_NOCASE; } YY_BREAK case 16: YY_RULE_SETUP #line 115 "idmef-criteria-string.lex.l" { yy_push_state(IDMEF_VALUE); return TOK_RELATION_NOT_REGEXP; } YY_BREAK case 17: YY_RULE_SETUP #line 116 "idmef-criteria-string.lex.l" { yy_push_state(IDMEF_VALUE); return TOK_RELATION_NOT_REGEXP_NOCASE; } YY_BREAK case 18: YY_RULE_SETUP #line 118 "idmef-criteria-string.lex.l" { yy_push_state(IDMEF_VALUE); return TOK_RELATION_EQUAL; } YY_BREAK case 19: YY_RULE_SETUP #line 119 "idmef-criteria-string.lex.l" { yy_push_state(IDMEF_VALUE); return TOK_RELATION_EQUAL; } YY_BREAK case 20: YY_RULE_SETUP #line 120 "idmef-criteria-string.lex.l" { yy_push_state(IDMEF_VALUE); return TOK_RELATION_EQUAL_NOCASE; } YY_BREAK case 21: YY_RULE_SETUP #line 121 "idmef-criteria-string.lex.l" { yy_push_state(IDMEF_VALUE); return TOK_RELATION_NOT_EQUAL; } YY_BREAK case 22: YY_RULE_SETUP #line 122 "idmef-criteria-string.lex.l" { yy_push_state(IDMEF_VALUE); return TOK_RELATION_NOT_EQUAL_NOCASE; } YY_BREAK case 23: YY_RULE_SETUP #line 123 "idmef-criteria-string.lex.l" { return TOK_NOT; } YY_BREAK case 24: YY_RULE_SETUP #line 125 "idmef-criteria-string.lex.l" { return TOK_OPERATOR_AND; } YY_BREAK case 25: YY_RULE_SETUP #line 126 "idmef-criteria-string.lex.l" { return TOK_OPERATOR_AND; } YY_BREAK case 26: YY_RULE_SETUP #line 127 "idmef-criteria-string.lex.l" { return TOK_OPERATOR_OR; } YY_BREAK case 27: YY_RULE_SETUP #line 128 "idmef-criteria-string.lex.l" { return TOK_OPERATOR_OR; } YY_BREAK case 28: YY_RULE_SETUP #line 130 "idmef-criteria-string.lex.l" { return '('; } YY_BREAK case 29: YY_RULE_SETUP #line 131 "idmef-criteria-string.lex.l" { return ')'; } YY_BREAK case 30: /* rule 30 can match eol */ YY_RULE_SETUP #line 133 "idmef-criteria-string.lex.l" { yylval.str = escape_str(strndup(yytext + 1, yyleng - 2)); if ( ! inp ) yy_pop_state(); return TOK_IDMEF_VALUE; } YY_BREAK case 31: /* rule 31 can match eol */ YY_RULE_SETUP #line 142 "idmef-criteria-string.lex.l" { yylval.str = escape_str(strndup(yytext + 1, yyleng - 2)); if ( ! inp ) yy_pop_state(); return TOK_IDMEF_VALUE; } YY_BREAK case 32: /* rule 32 can match eol */ YY_RULE_SETUP #line 151 "idmef-criteria-string.lex.l" { yylval.str = escape_str(strdup(yytext)); if ( ! inp ) yy_pop_state(); return TOK_IDMEF_VALUE; } YY_BREAK case 33: /* rule 33 can match eol */ YY_RULE_SETUP #line 160 "idmef-criteria-string.lex.l" { /* nop */; } YY_BREAK case 34: YY_RULE_SETUP #line 164 "idmef-criteria-string.lex.l" { inp++; return '('; } YY_BREAK case 35: YY_RULE_SETUP #line 169 "idmef-criteria-string.lex.l" { do_pop(); return ')'; } YY_BREAK case 36: YY_RULE_SETUP #line 174 "idmef-criteria-string.lex.l" { return TOK_OPERATOR_AND; } YY_BREAK case 37: YY_RULE_SETUP #line 175 "idmef-criteria-string.lex.l" { return TOK_OPERATOR_AND; } YY_BREAK case 38: YY_RULE_SETUP #line 176 "idmef-criteria-string.lex.l" { return TOK_OPERATOR_OR; } YY_BREAK case 39: YY_RULE_SETUP #line 177 "idmef-criteria-string.lex.l" { return TOK_OPERATOR_OR; } YY_BREAK case 40: YY_RULE_SETUP #line 179 "idmef-criteria-string.lex.l" { /* invalid token */ return TOK_ERROR; } YY_BREAK case 41: /* rule 41 can match eol */ YY_RULE_SETUP #line 184 "idmef-criteria-string.lex.l" { /* nop */; } YY_BREAK case 42: YY_RULE_SETUP #line 188 "idmef-criteria-string.lex.l" { /* invalid token */ yylval.str = strdup(yytext); return TOK_ERROR; } YY_BREAK case 43: YY_RULE_SETUP #line 196 "idmef-criteria-string.lex.l" ECHO; YY_BREAK #line 1122 "idmef-criteria-string.lex.c" case YY_STATE_EOF(INITIAL): case YY_STATE_EOF(IDMEF_VALUE): yyterminate(); case YY_END_OF_BUFFER: { /* Amount of text matched not including the EOB char. */ int yy_amount_of_matched_text = (int) (yy_cp - (yytext_ptr)) - 1; /* Undo the effects of YY_DO_BEFORE_ACTION. */ *yy_cp = (yy_hold_char); YY_RESTORE_YY_MORE_OFFSET if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_NEW ) { /* We're scanning a new file or input source. It's * possible that this happened because the user * just pointed yyin at a new source and called * yylex(). If so, then we have to assure * consistency between YY_CURRENT_BUFFER and our * globals. Here is the right place to do so, because * this is the first action (other than possibly a * back-up) that will match for the new input source. */ (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars; YY_CURRENT_BUFFER_LVALUE->yy_input_file = yyin; YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = YY_BUFFER_NORMAL; } /* Note that here we test for yy_c_buf_p "<=" to the position * of the first EOB in the buffer, since yy_c_buf_p will * already have been incremented past the NUL character * (since all states make transitions on EOB to the * end-of-buffer state). Contrast this with the test * in input(). */ if ( (yy_c_buf_p) <= &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] ) { /* This was really a NUL. */ yy_state_type yy_next_state; (yy_c_buf_p) = (yytext_ptr) + yy_amount_of_matched_text; yy_current_state = yy_get_previous_state( ); /* Okay, we're now positioned to make the NUL * transition. We couldn't have * yy_get_previous_state() go ahead and do it * for us because it doesn't know how to deal * with the possibility of jamming (and we don't * want to build jamming into it because then it * will run more slowly). */ yy_next_state = yy_try_NUL_trans( yy_current_state ); yy_bp = (yytext_ptr) + YY_MORE_ADJ; if ( yy_next_state ) { /* Consume the NUL. */ yy_cp = ++(yy_c_buf_p); yy_current_state = yy_next_state; goto yy_match; } else { yy_cp = (yy_c_buf_p); goto yy_find_action; } } else switch ( yy_get_next_buffer( ) ) { case EOB_ACT_END_OF_FILE: { (yy_did_buffer_switch_on_eof) = 0; if ( yywrap( ) ) { /* Note: because we've taken care in * yy_get_next_buffer() to have set up * yytext, we can now set up * yy_c_buf_p so that if some total * hoser (like flex itself) wants to * call the scanner after we return the * YY_NULL, it'll still work - another * YY_NULL will get returned. */ (yy_c_buf_p) = (yytext_ptr) + YY_MORE_ADJ; yy_act = YY_STATE_EOF(YY_START); goto do_action; } else { if ( ! (yy_did_buffer_switch_on_eof) ) YY_NEW_FILE; } break; } case EOB_ACT_CONTINUE_SCAN: (yy_c_buf_p) = (yytext_ptr) + yy_amount_of_matched_text; yy_current_state = yy_get_previous_state( ); yy_cp = (yy_c_buf_p); yy_bp = (yytext_ptr) + YY_MORE_ADJ; goto yy_match; case EOB_ACT_LAST_MATCH: (yy_c_buf_p) = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)]; yy_current_state = yy_get_previous_state( ); yy_cp = (yy_c_buf_p); yy_bp = (yytext_ptr) + YY_MORE_ADJ; goto yy_find_action; } break; } default: YY_FATAL_ERROR( "fatal flex scanner internal error--no action found" ); } /* end of action switch */ } /* end of scanning one token */ } /* end of yylex */ /* yy_get_next_buffer - try to read in a new buffer * * Returns a code representing an action: * EOB_ACT_LAST_MATCH - * EOB_ACT_CONTINUE_SCAN - continue scanning from current position * EOB_ACT_END_OF_FILE - end of file */ static int yy_get_next_buffer (void) { register char *dest = YY_CURRENT_BUFFER_LVALUE->yy_ch_buf; register char *source = (yytext_ptr); register int number_to_move, i; int ret_val; if ( (yy_c_buf_p) > &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1] ) YY_FATAL_ERROR( "fatal flex scanner internal error--end of buffer missed" ); if ( YY_CURRENT_BUFFER_LVALUE->yy_fill_buffer == 0 ) { /* Don't try to fill the buffer, so this is an EOF. */ if ( (yy_c_buf_p) - (yytext_ptr) - YY_MORE_ADJ == 1 ) { /* We matched a single character, the EOB, so * treat this as a final EOF. */ return EOB_ACT_END_OF_FILE; } else { /* We matched some text prior to the EOB, first * process it. */ return EOB_ACT_LAST_MATCH; } } /* Try to read more data. */ /* First move last chars to start of buffer. */ number_to_move = (int) ((yy_c_buf_p) - (yytext_ptr)) - 1; for ( i = 0; i < number_to_move; ++i ) *(dest++) = *(source++); if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_EOF_PENDING ) /* don't do the read, it's not guaranteed to return an EOF, * just force an EOF */ YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars) = 0; else { int num_to_read = YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1; while ( num_to_read <= 0 ) { /* Not enough room in the buffer - grow it. */ /* just a shorter name for the current buffer */ YY_BUFFER_STATE b = YY_CURRENT_BUFFER; int yy_c_buf_p_offset = (int) ((yy_c_buf_p) - b->yy_ch_buf); if ( b->yy_is_our_buffer ) { int new_size = b->yy_buf_size * 2; if ( new_size <= 0 ) b->yy_buf_size += b->yy_buf_size / 8; else b->yy_buf_size *= 2; b->yy_ch_buf = (char *) /* Include room in for 2 EOB chars. */ yyrealloc((void *) b->yy_ch_buf,b->yy_buf_size + 2 ); } else /* Can't grow it, we don't own it. */ b->yy_ch_buf = 0; if ( ! b->yy_ch_buf ) YY_FATAL_ERROR( "fatal error - scanner input buffer overflow" ); (yy_c_buf_p) = &b->yy_ch_buf[yy_c_buf_p_offset]; num_to_read = YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1; } if ( num_to_read > YY_READ_BUF_SIZE ) num_to_read = YY_READ_BUF_SIZE; /* Read in more data. */ YY_INPUT( (&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]), (yy_n_chars), (size_t) num_to_read ); YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars); } if ( (yy_n_chars) == 0 ) { if ( number_to_move == YY_MORE_ADJ ) { ret_val = EOB_ACT_END_OF_FILE; yyrestart(yyin ); } else { ret_val = EOB_ACT_LAST_MATCH; YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = YY_BUFFER_EOF_PENDING; } } else ret_val = EOB_ACT_CONTINUE_SCAN; if ((yy_size_t) ((yy_n_chars) + number_to_move) > YY_CURRENT_BUFFER_LVALUE->yy_buf_size) { /* Extend the array by 50%, plus the number we really need. */ yy_size_t new_size = (yy_n_chars) + number_to_move + ((yy_n_chars) >> 1); YY_CURRENT_BUFFER_LVALUE->yy_ch_buf = (char *) yyrealloc((void *) YY_CURRENT_BUFFER_LVALUE->yy_ch_buf,new_size ); if ( ! YY_CURRENT_BUFFER_LVALUE->yy_ch_buf ) YY_FATAL_ERROR( "out of dynamic memory in yy_get_next_buffer()" ); } (yy_n_chars) += number_to_move; YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] = YY_END_OF_BUFFER_CHAR; YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1] = YY_END_OF_BUFFER_CHAR; (yytext_ptr) = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[0]; return ret_val; } /* yy_get_previous_state - get the state just before the EOB char was reached */ static yy_state_type yy_get_previous_state (void) { register yy_state_type yy_current_state; register char *yy_cp; yy_current_state = (yy_start); for ( yy_cp = (yytext_ptr) + YY_MORE_ADJ; yy_cp < (yy_c_buf_p); ++yy_cp ) { register YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1); if ( yy_accept[yy_current_state] ) { (yy_last_accepting_state) = yy_current_state; (yy_last_accepting_cpos) = yy_cp; } while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) { yy_current_state = (int) yy_def[yy_current_state]; if ( yy_current_state >= 83 ) yy_c = yy_meta[(unsigned int) yy_c]; } yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c]; } return yy_current_state; } /* yy_try_NUL_trans - try to make a transition on the NUL character * * synopsis * next_state = yy_try_NUL_trans( current_state ); */ static yy_state_type yy_try_NUL_trans (yy_state_type yy_current_state ) { register int yy_is_jam; register char *yy_cp = (yy_c_buf_p); register YY_CHAR yy_c = 1; if ( yy_accept[yy_current_state] ) { (yy_last_accepting_state) = yy_current_state; (yy_last_accepting_cpos) = yy_cp; } while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) { yy_current_state = (int) yy_def[yy_current_state]; if ( yy_current_state >= 83 ) yy_c = yy_meta[(unsigned int) yy_c]; } yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c]; yy_is_jam = (yy_current_state == 82); return yy_is_jam ? 0 : yy_current_state; } static void yyunput (int c, register char * yy_bp ) { register char *yy_cp; yy_cp = (yy_c_buf_p); /* undo effects of setting up yytext */ *yy_cp = (yy_hold_char); if ( yy_cp < YY_CURRENT_BUFFER_LVALUE->yy_ch_buf + 2 ) { /* need to shift things up to make room */ /* +2 for EOB chars. */ register int number_to_move = (yy_n_chars) + 2; register char *dest = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[ YY_CURRENT_BUFFER_LVALUE->yy_buf_size + 2]; register char *source = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]; while ( source > YY_CURRENT_BUFFER_LVALUE->yy_ch_buf ) *--dest = *--source; yy_cp += (int) (dest - source); yy_bp += (int) (dest - source); YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_buf_size; if ( yy_cp < YY_CURRENT_BUFFER_LVALUE->yy_ch_buf + 2 ) YY_FATAL_ERROR( "flex scanner push-back overflow" ); } *--yy_cp = (char) c; (yytext_ptr) = yy_bp; (yy_hold_char) = *yy_cp; (yy_c_buf_p) = yy_cp; } #ifndef YY_NO_INPUT #ifdef __cplusplus static int yyinput (void) #else static int input (void) #endif { int c; *(yy_c_buf_p) = (yy_hold_char); if ( *(yy_c_buf_p) == YY_END_OF_BUFFER_CHAR ) { /* yy_c_buf_p now points to the character we want to return. * If this occurs *before* the EOB characters, then it's a * valid NUL; if not, then we've hit the end of the buffer. */ if ( (yy_c_buf_p) < &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] ) /* This was really a NUL. */ *(yy_c_buf_p) = '\0'; else { /* need more input */ int offset = (yy_c_buf_p) - (yytext_ptr); ++(yy_c_buf_p); switch ( yy_get_next_buffer( ) ) { case EOB_ACT_LAST_MATCH: /* This happens because yy_g_n_b() * sees that we've accumulated a * token and flags that we need to * try matching the token before * proceeding. But for input(), * there's no matching to consider. * So convert the EOB_ACT_LAST_MATCH * to EOB_ACT_END_OF_FILE. */ /* Reset buffer status. */ yyrestart(yyin ); /*FALLTHROUGH*/ case EOB_ACT_END_OF_FILE: { if ( yywrap( ) ) return EOF; if ( ! (yy_did_buffer_switch_on_eof) ) YY_NEW_FILE; #ifdef __cplusplus return yyinput(); #else return input(); #endif } case EOB_ACT_CONTINUE_SCAN: (yy_c_buf_p) = (yytext_ptr) + offset; break; } } } c = *(unsigned char *) (yy_c_buf_p); /* cast for 8-bit char's */ *(yy_c_buf_p) = '\0'; /* preserve yytext */ (yy_hold_char) = *++(yy_c_buf_p); return c; } #endif /* ifndef YY_NO_INPUT */ /** Immediately switch to a different input stream. * @param input_file A readable stream. * * @note This function does not reset the start condition to @c INITIAL . */ void yyrestart (FILE * input_file ) { if ( ! YY_CURRENT_BUFFER ){ yyensure_buffer_stack (); YY_CURRENT_BUFFER_LVALUE = yy_create_buffer(yyin,YY_BUF_SIZE ); } yy_init_buffer(YY_CURRENT_BUFFER,input_file ); yy_load_buffer_state( ); } /** Switch to a different input buffer. * @param new_buffer The new input buffer. * */ void yy_switch_to_buffer (YY_BUFFER_STATE new_buffer ) { /* TODO. We should be able to replace this entire function body * with * yypop_buffer_state(); * yypush_buffer_state(new_buffer); */ yyensure_buffer_stack (); if ( YY_CURRENT_BUFFER == new_buffer ) return; if ( YY_CURRENT_BUFFER ) { /* Flush out information for old buffer. */ *(yy_c_buf_p) = (yy_hold_char); YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = (yy_c_buf_p); YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars); } YY_CURRENT_BUFFER_LVALUE = new_buffer; yy_load_buffer_state( ); /* We don't actually know whether we did this switch during * EOF (yywrap()) processing, but the only time this flag * is looked at is after yywrap() is called, so it's safe * to go ahead and always set it. */ (yy_did_buffer_switch_on_eof) = 1; } static void yy_load_buffer_state (void) { (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars; (yytext_ptr) = (yy_c_buf_p) = YY_CURRENT_BUFFER_LVALUE->yy_buf_pos; yyin = YY_CURRENT_BUFFER_LVALUE->yy_input_file; (yy_hold_char) = *(yy_c_buf_p); } /** Allocate and initialize an input buffer state. * @param file A readable stream. * @param size The character buffer size in bytes. When in doubt, use @c YY_BUF_SIZE. * * @return the allocated buffer state. */ YY_BUFFER_STATE yy_create_buffer (FILE * file, int size ) { YY_BUFFER_STATE b; b = (YY_BUFFER_STATE) yyalloc(sizeof( struct yy_buffer_state ) ); if ( ! b ) YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" ); b->yy_buf_size = size; /* yy_ch_buf has to be 2 characters longer than the size given because * we need to put in 2 end-of-buffer characters. */ b->yy_ch_buf = (char *) yyalloc(b->yy_buf_size + 2 ); if ( ! b->yy_ch_buf ) YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" ); b->yy_is_our_buffer = 1; yy_init_buffer(b,file ); return b; } /** Destroy the buffer. * @param b a buffer created with yy_create_buffer() * */ void yy_delete_buffer (YY_BUFFER_STATE b ) { if ( ! b ) return; if ( b == YY_CURRENT_BUFFER ) /* Not sure if we should pop here. */ YY_CURRENT_BUFFER_LVALUE = (YY_BUFFER_STATE) 0; if ( b->yy_is_our_buffer ) yyfree((void *) b->yy_ch_buf ); yyfree((void *) b ); } #ifndef __cplusplus extern int isatty (int ); #endif /* __cplusplus */ /* Initializes or reinitializes a buffer. * This function is sometimes called more than once on the same buffer, * such as during a yyrestart() or at EOF. */ static void yy_init_buffer (YY_BUFFER_STATE b, FILE * file ) { int oerrno = errno; yy_flush_buffer(b ); b->yy_input_file = file; b->yy_fill_buffer = 1; /* If b is the current buffer, then yy_init_buffer was _probably_ * called from yyrestart() or through yy_get_next_buffer. * In that case, we don't want to reset the lineno or column. */ if (b != YY_CURRENT_BUFFER){ b->yy_bs_lineno = 1; b->yy_bs_column = 0; } b->yy_is_interactive = file ? (isatty( fileno(file) ) > 0) : 0; errno = oerrno; } /** Discard all buffered characters. On the next scan, YY_INPUT will be called. * @param b the buffer state to be flushed, usually @c YY_CURRENT_BUFFER. * */ void yy_flush_buffer (YY_BUFFER_STATE b ) { if ( ! b ) return; b->yy_n_chars = 0; /* We always need two end-of-buffer characters. The first causes * a transition to the end-of-buffer state. The second causes * a jam in that state. */ b->yy_ch_buf[0] = YY_END_OF_BUFFER_CHAR; b->yy_ch_buf[1] = YY_END_OF_BUFFER_CHAR; b->yy_buf_pos = &b->yy_ch_buf[0]; b->yy_at_bol = 1; b->yy_buffer_status = YY_BUFFER_NEW; if ( b == YY_CURRENT_BUFFER ) yy_load_buffer_state( ); } /** Pushes the new state onto the stack. The new state becomes * the current state. This function will allocate the stack * if necessary. * @param new_buffer The new state. * */ void yypush_buffer_state (YY_BUFFER_STATE new_buffer ) { if (new_buffer == NULL) return; yyensure_buffer_stack(); /* This block is copied from yy_switch_to_buffer. */ if ( YY_CURRENT_BUFFER ) { /* Flush out information for old buffer. */ *(yy_c_buf_p) = (yy_hold_char); YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = (yy_c_buf_p); YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars); } /* Only push if top exists. Otherwise, replace top. */ if (YY_CURRENT_BUFFER) (yy_buffer_stack_top)++; YY_CURRENT_BUFFER_LVALUE = new_buffer; /* copied from yy_switch_to_buffer. */ yy_load_buffer_state( ); (yy_did_buffer_switch_on_eof) = 1; } /** Removes and deletes the top of the stack, if present. * The next element becomes the new top. * */ void yypop_buffer_state (void) { if (!YY_CURRENT_BUFFER) return; yy_delete_buffer(YY_CURRENT_BUFFER ); YY_CURRENT_BUFFER_LVALUE = NULL; if ((yy_buffer_stack_top) > 0) --(yy_buffer_stack_top); if (YY_CURRENT_BUFFER) { yy_load_buffer_state( ); (yy_did_buffer_switch_on_eof) = 1; } } /* Allocates the stack if it does not exist. * Guarantees space for at least one push. */ static void yyensure_buffer_stack (void) { int num_to_alloc; if (!(yy_buffer_stack)) { /* First allocation is just for 2 elements, since we don't know if this * scanner will even need a stack. We use 2 instead of 1 to avoid an * immediate realloc on the next call. */ num_to_alloc = 1; (yy_buffer_stack) = (struct yy_buffer_state**)yyalloc (num_to_alloc * sizeof(struct yy_buffer_state*) ); if ( ! (yy_buffer_stack) ) YY_FATAL_ERROR( "out of dynamic memory in yyensure_buffer_stack()" ); memset((yy_buffer_stack), 0, num_to_alloc * sizeof(struct yy_buffer_state*)); (yy_buffer_stack_max) = num_to_alloc; (yy_buffer_stack_top) = 0; return; } if ((yy_buffer_stack_top) >= ((yy_buffer_stack_max)) - 1){ /* Increase the buffer to prepare for a possible push. */ int grow_size = 8 /* arbitrary grow size */; num_to_alloc = (yy_buffer_stack_max) + grow_size; (yy_buffer_stack) = (struct yy_buffer_state**)yyrealloc ((yy_buffer_stack), num_to_alloc * sizeof(struct yy_buffer_state*) ); if ( ! (yy_buffer_stack) ) YY_FATAL_ERROR( "out of dynamic memory in yyensure_buffer_stack()" ); /* zero only the new slots.*/ memset((yy_buffer_stack) + (yy_buffer_stack_max), 0, grow_size * sizeof(struct yy_buffer_state*)); (yy_buffer_stack_max) = num_to_alloc; } } /** Setup the input buffer state to scan directly from a user-specified character buffer. * @param base the character buffer * @param size the size in bytes of the character buffer * * @return the newly allocated buffer state object. */ YY_BUFFER_STATE yy_scan_buffer (char * base, yy_size_t size ) { YY_BUFFER_STATE b; if ( size < 2 || base[size-2] != YY_END_OF_BUFFER_CHAR || base[size-1] != YY_END_OF_BUFFER_CHAR ) /* They forgot to leave room for the EOB's. */ return 0; b = (YY_BUFFER_STATE) yyalloc(sizeof( struct yy_buffer_state ) ); if ( ! b ) YY_FATAL_ERROR( "out of dynamic memory in yy_scan_buffer()" ); b->yy_buf_size = size - 2; /* "- 2" to take care of EOB's */ b->yy_buf_pos = b->yy_ch_buf = base; b->yy_is_our_buffer = 0; b->yy_input_file = 0; b->yy_n_chars = b->yy_buf_size; b->yy_is_interactive = 0; b->yy_at_bol = 1; b->yy_fill_buffer = 0; b->yy_buffer_status = YY_BUFFER_NEW; yy_switch_to_buffer(b ); return b; } /** Setup the input buffer state to scan a string. The next call to yylex() will * scan from a @e copy of @a str. * @param yystr a NUL-terminated string to scan * * @return the newly allocated buffer state object. * @note If you want to scan bytes that may contain NUL values, then use * yy_scan_bytes() instead. */ YY_BUFFER_STATE yy_scan_string (yyconst char * yystr ) { return yy_scan_bytes(yystr,strlen(yystr) ); } /** Setup the input buffer state to scan the given bytes. The next call to yylex() will * scan from a @e copy of @a bytes. * @param bytes the byte buffer to scan * @param len the number of bytes in the buffer pointed to by @a bytes. * * @return the newly allocated buffer state object. */ YY_BUFFER_STATE yy_scan_bytes (yyconst char * yybytes, int _yybytes_len ) { YY_BUFFER_STATE b; char *buf; yy_size_t n; int i; /* Get memory for full buffer, including space for trailing EOB's. */ n = _yybytes_len + 2; buf = (char *) yyalloc(n ); if ( ! buf ) YY_FATAL_ERROR( "out of dynamic memory in yy_scan_bytes()" ); for ( i = 0; i < _yybytes_len; ++i ) buf[i] = yybytes[i]; buf[_yybytes_len] = buf[_yybytes_len+1] = YY_END_OF_BUFFER_CHAR; b = yy_scan_buffer(buf,n ); if ( ! b ) YY_FATAL_ERROR( "bad buffer in yy_scan_bytes()" ); /* It's okay to grow etc. this buffer, and we should throw it * away when we're done. */ b->yy_is_our_buffer = 1; return b; } static void yy_push_state (int new_state ) { if ( (yy_start_stack_ptr) >= (yy_start_stack_depth) ) { yy_size_t new_size; (yy_start_stack_depth) += YY_START_STACK_INCR; new_size = (yy_start_stack_depth) * sizeof( int ); if ( ! (yy_start_stack) ) (yy_start_stack) = (int *) yyalloc(new_size ); else (yy_start_stack) = (int *) yyrealloc((void *) (yy_start_stack),new_size ); if ( ! (yy_start_stack) ) YY_FATAL_ERROR( "out of memory expanding start-condition stack" ); } (yy_start_stack)[(yy_start_stack_ptr)++] = YY_START; BEGIN(new_state); } static void yy_pop_state (void) { if ( --(yy_start_stack_ptr) < 0 ) YY_FATAL_ERROR( "start-condition stack underflow" ); BEGIN((yy_start_stack)[(yy_start_stack_ptr)]); } static int yy_top_state (void) { return (yy_start_stack)[(yy_start_stack_ptr) - 1]; } #ifndef YY_EXIT_FAILURE #define YY_EXIT_FAILURE 2 #endif static void yy_fatal_error (yyconst char* msg ) { (void) fprintf( stderr, "%s\n", msg ); exit( YY_EXIT_FAILURE ); } /* Redefine yyless() so it works in section 3 code. */ #undef yyless #define yyless(n) \ do \ { \ /* Undo effects of setting up yytext. */ \ int yyless_macro_arg = (n); \ YY_LESS_LINENO(yyless_macro_arg);\ yytext[yyleng] = (yy_hold_char); \ (yy_c_buf_p) = yytext + yyless_macro_arg; \ (yy_hold_char) = *(yy_c_buf_p); \ *(yy_c_buf_p) = '\0'; \ yyleng = yyless_macro_arg; \ } \ while ( 0 ) /* Accessor methods (get/set functions) to struct members. */ /** Get the current line number. * */ int yyget_lineno (void) { return yylineno; } /** Get the input stream. * */ FILE *yyget_in (void) { return yyin; } /** Get the output stream. * */ FILE *yyget_out (void) { return yyout; } /** Get the length of the current token. * */ int yyget_leng (void) { return yyleng; } /** Get the current token. * */ char *yyget_text (void) { return yytext; } /** Set the current line number. * @param line_number * */ void yyset_lineno (int line_number ) { yylineno = line_number; } /** Set the input stream. This does not discard the current * input buffer. * @param in_str A readable stream. * * @see yy_switch_to_buffer */ void yyset_in (FILE * in_str ) { yyin = in_str ; } void yyset_out (FILE * out_str ) { yyout = out_str ; } int yyget_debug (void) { return yy_flex_debug; } void yyset_debug (int bdebug ) { yy_flex_debug = bdebug ; } static int yy_init_globals (void) { /* Initialization is the same as for the non-reentrant scanner. * This function is called from yylex_destroy(), so don't allocate here. */ (yy_buffer_stack) = 0; (yy_buffer_stack_top) = 0; (yy_buffer_stack_max) = 0; (yy_c_buf_p) = (char *) 0; (yy_init) = 0; (yy_start) = 0; (yy_start_stack_ptr) = 0; (yy_start_stack_depth) = 0; (yy_start_stack) = NULL; /* Defined in main.c */ #ifdef YY_STDINIT yyin = stdin; yyout = stdout; #else yyin = (FILE *) 0; yyout = (FILE *) 0; #endif /* For future reference: Set errno on error, since we are called by * yylex_init() */ return 0; } /* yylex_destroy is for both reentrant and non-reentrant scanners. */ int yylex_destroy (void) { /* Pop the buffer stack, destroying each element. */ while(YY_CURRENT_BUFFER){ yy_delete_buffer(YY_CURRENT_BUFFER ); YY_CURRENT_BUFFER_LVALUE = NULL; yypop_buffer_state(); } /* Destroy the stack itself. */ yyfree((yy_buffer_stack) ); (yy_buffer_stack) = NULL; /* Destroy the start condition stack. */ yyfree((yy_start_stack) ); (yy_start_stack) = NULL; /* Reset the globals. This is important in a non-reentrant scanner so the next time * yylex() is called, initialization will occur. */ yy_init_globals( ); return 0; } /* * Internal utility routines. */ #ifndef yytext_ptr static void yy_flex_strncpy (char* s1, yyconst char * s2, int n ) { register int i; for ( i = 0; i < n; ++i ) s1[i] = s2[i]; } #endif #ifdef YY_NEED_STRLEN static int yy_flex_strlen (yyconst char * s ) { register int n; for ( n = 0; s[n]; ++n ) ; return n; } #endif void *yyalloc (yy_size_t size ) { return (void *) malloc( size ); } void *yyrealloc (void * ptr, yy_size_t size ) { /* The cast to (char *) in the following accommodates both * implementations that use char* generic pointers, and those * that use void* generic pointers. It works with the latter * because both ANSI C and C++ allow castless assignment from * any pointer type to void*, and deal with argument conversions * as though doing an assignment. */ return (void *) realloc( (char *) ptr, size ); } void yyfree (void * ptr ) { free( (char *) ptr ); /* see yyrealloc() for (char *) cast */ } #define YYTABLES_NAME "yytables" #line 196 "idmef-criteria-string.lex.l" static void do_pop(void) { if ( --inp == 0 ) yy_pop_state(); } void _idmef_criteria_string_init_lexer(void); void _idmef_criteria_string_init_lexer(void) { inp = 0; BEGIN INITIAL; } libprelude-1.0.0/src/prelude-connection-pool.c0000664000076400007640000013347311202225026016274 00000000000000/***** * * Copyright (C) 2001-2005,2006,2007 PreludeIDS Technologies. All Rights Reserved. * Author: Yoann Vandoorselaere * * This file is part of the Prelude library. * * 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; see the file COPYING. If not, write to * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. * *****/ #include "config.h" #include "libmissing.h" #include #include #include #include #include #include #include #include #include #include #include "glthread/lock.h" #include "common.h" #include "prelude-timer.h" #include "prelude-log.h" #include "prelude-message-id.h" #include "prelude-async.h" #include "prelude-client.h" #include "prelude-option.h" #include "prelude-option-wide.h" #include "prelude-failover.h" #if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__ # undef FD_SETSIZE # define FD_SETSIZE 1024 #endif #define PRELUDE_ERROR_SOURCE_DEFAULT PRELUDE_ERROR_SOURCE_CONNECTION_POOL #include "prelude-error.h" #define INITIAL_EXPIRATION_TIME 10 #define MAXIMUM_EXPIRATION_TIME 3600 /* * This list is in fact a boolean AND of client. * When emitting a message, if one of the connection in this * list fail, we'll have to consider a OR (if available), or backup * our message for later emission. */ typedef struct cnx_list { struct cnx *and; struct cnx_list *or; /* * If dead is non zero, * it means one of the client in the list is down. */ unsigned int dead; unsigned int total; prelude_connection_pool_t *parent; } cnx_list_t; typedef struct cnx { struct cnx *and; /* * Timer for client reconnection. */ prelude_timer_t timer; prelude_failover_t *failover; /* * Pointer on a client object. */ prelude_connection_t *cnx; /* * Pointer to the message being read. */ prelude_msg_t *msg; /* * Pointer to the parent of this client. */ cnx_list_t *parent; } cnx_t; struct prelude_connection_pool { gl_recursive_lock_t mutex; cnx_list_t *or_list; prelude_bool_t initialized; prelude_failover_t *failover; int nfd; fd_set fds; int refcount; char *connection_string; prelude_connection_permission_t permission; prelude_client_profile_t *client_profile; prelude_connection_pool_flags_t flags; prelude_bool_t connection_string_changed; prelude_timer_t timer; prelude_list_t all_cnx; void *data; prelude_connection_pool_event_t global_wanted_event; int (*global_event_handler)(prelude_connection_pool_t *pool, prelude_connection_pool_event_t event); prelude_connection_pool_event_t wanted_event; int (*event_handler)(prelude_connection_pool_t *pool, prelude_connection_pool_event_t event, prelude_connection_t *connection); }; static void set_state_dead(cnx_t *cnx, prelude_error_t error, prelude_bool_t init_time, prelude_bool_t global_notice); static int do_send(prelude_connection_t *conn, prelude_msg_t *msg) { int ret; /* * handle EAGAIN in case the caller use non blocking IO. */ do { ret = prelude_connection_send(conn, msg); } while ( ret < 0 && prelude_error_get_code(ret) == PRELUDE_ERROR_EAGAIN ); return ret; } static int global_event_handler(prelude_connection_pool_t *pool, int event) { int ret = 0; if ( event & pool->global_wanted_event && pool->global_event_handler ) ret = pool->global_event_handler(pool, event); return ret; } static int event_handler(prelude_connection_pool_t *pool, int event, prelude_connection_t *con) { int ret = 0; if ( event & pool->wanted_event && pool->event_handler ) ret = pool->event_handler(pool, event, con); return ret; } static int check_connection_event(prelude_connection_pool_t *pool, cnx_t *cnx, prelude_connection_pool_event_t *global_event, int (*event_cb)(prelude_connection_pool_t *pool, prelude_connection_pool_event_t event, prelude_connection_t *cnx, void *extra), void *extra, prelude_connection_t **conn, prelude_msg_t **outmsg) { int ret = 0; if ( conn ) { *conn = cnx->cnx; if ( ! outmsg ) return 1; ret = prelude_connection_recv(cnx->cnx, &cnx->msg); if ( ret < 0 ) { if ( prelude_error_get_code(ret) != PRELUDE_ERROR_EAGAIN ) { if ( cnx->msg ) { prelude_msg_destroy(cnx->msg); cnx->msg = NULL; } goto error; } return 0; } *outmsg = cnx->msg; cnx->msg = NULL; return 1; } else if ( event_cb ) ret = event_cb(pool, PRELUDE_CONNECTION_POOL_EVENT_INPUT, cnx->cnx, extra); else ret = event_handler(pool, PRELUDE_CONNECTION_POOL_EVENT_INPUT, cnx->cnx); if ( ret < 0 || ! prelude_connection_is_alive(cnx->cnx) ) goto error; return 0; error: *global_event |= PRELUDE_CONNECTION_POOL_EVENT_DEAD; set_state_dead(cnx, ret, FALSE, FALSE); return ret; } static int timeval_subtract(struct timeval *x, struct timeval *y) { int nsec; /* Perform the carry for the later subtraction by updating y. */ if ( x->tv_usec < y->tv_usec ) { nsec = (y->tv_usec - x->tv_usec) / 1000000 + 1; y->tv_usec -= 1000000 * nsec; y->tv_sec += nsec; } if ( x->tv_usec - y->tv_usec > 1000000 ) { nsec = (x->tv_usec - y->tv_usec) / 1000000; y->tv_usec += 1000000 * nsec; y->tv_sec -= nsec; } return ((x->tv_sec - y->tv_sec) * 1000) + ((x->tv_usec - y->tv_usec) / 1000); } static int connection_pool_check_event(prelude_connection_pool_t *pool, int timeout, int (*event_cb)(prelude_connection_pool_t *pool, prelude_connection_pool_event_t event, prelude_connection_t *cnx, void *extra), void *extra, prelude_connection_t **outcon, prelude_msg_t **outmsg) { cnx_t *cnx; fd_set rfds; cnx_list_t *or; int ret, i = 0, nfd, fd; struct timeval ts, to, te; prelude_connection_pool_event_t global_event = 0; again: gettimeofday(&ts, NULL); do { if ( timeout > 0 ) { to.tv_sec = timeout / 1000; to.tv_usec = timeout % 1000; } else { to.tv_usec = 0; to.tv_sec = (timeout < 0) ? 1 : 0; } gl_recursive_lock_lock(pool->mutex); rfds = pool->fds; nfd = pool->nfd; gl_recursive_lock_unlock(pool->mutex); ret = select(nfd, &rfds, NULL, NULL, &to); if ( ret < 0 ) return prelude_error_from_errno(errno); } while ( ret == 0 && timeout == -1 ); if ( ret == 0 ) return 0; gl_recursive_lock_lock(pool->mutex); for ( or = pool->or_list; or != NULL; or = or->or ) { for ( cnx = or->and; cnx != NULL; cnx = cnx->and ) { if ( ! prelude_connection_is_alive(cnx->cnx) ) continue; fd = prelude_io_get_fd(prelude_connection_get_fd(cnx->cnx)); if ( ! FD_ISSET(fd, &rfds) ) continue; i++; global_event |= PRELUDE_CONNECTION_POOL_EVENT_INPUT; ret = check_connection_event(pool, cnx, &global_event, event_cb, extra, outcon, outmsg); if ( ret == 1 ) break; else if ( ret < 0 ) i--; }} gl_recursive_lock_unlock(pool->mutex); global_event_handler(pool, global_event); if ( pool->connection_string_changed ) prelude_connection_pool_init(pool); if ( timeout == -1 && i == 0 ) goto again; gettimeofday(&te, NULL); ret = timeval_subtract(&te, &ts); if ( i == 0 && ret < timeout ) { timeout -= ret; goto again; } return i; } static int get_connection_backup_path(prelude_connection_t *cn, const char *path, char **out) { int ret; char c, buf[512]; const char *addr; prelude_string_t *str; ret = prelude_string_new_dup(&str, path); if ( ret < 0 ) return ret; prelude_string_cat(str, "/"); /* * FIXME: ideally we should only use peer analyzerid. This would * imply creating the failover after the first connection. */ addr = prelude_connection_get_peer_addr(cn); if ( ! addr ) prelude_string_sprintf(str, "%" PRELUDE_PRIu64, prelude_connection_get_peer_analyzerid(cn)); else { snprintf(buf, sizeof(buf), "%s:%u", prelude_connection_get_peer_addr(cn), prelude_connection_get_peer_port(cn)); while ( (c = *addr++) ) { if ( c == '/' ) c = '_'; prelude_string_ncat(str, &c, 1); } } ret = prelude_string_get_string_released(str, out); prelude_string_destroy(str); return ret; } static void notify_event(prelude_connection_pool_t *pool, prelude_connection_pool_event_t event, prelude_connection_t *connection, prelude_bool_t global_notice) { event_handler(pool, event, connection); if ( global_notice ) global_event_handler(pool, event); } static void init_cnx_timer(cnx_t *cnx) { if ( cnx->parent->parent->flags & PRELUDE_CONNECTION_POOL_FLAGS_RECONNECT ) prelude_timer_init(&cnx->timer); } static void destroy_connection_single(cnx_t *cnx) { prelude_timer_destroy(&cnx->timer); prelude_connection_destroy(cnx->cnx); if ( cnx->failover ) prelude_failover_destroy(cnx->failover); free(cnx); } static void connection_list_destroy(cnx_list_t *clist) { void *bkp; cnx_t *cnx; for ( ; clist != NULL; clist = bkp ) { for ( cnx = clist->and; cnx != NULL; cnx = bkp ) { bkp = cnx->and; destroy_connection_single(cnx); } bkp = clist->or; free(clist); } } static int failover_save_msg(prelude_failover_t *failover, prelude_msg_t *msg) { int ret; ret = prelude_failover_save_msg(failover, msg); if ( ret < 0 ) prelude_log(PRELUDE_LOG_WARN, "failover error: %s.\n", prelude_strerror(ret)); return ret; } static void broadcast_message(prelude_msg_t *msg, cnx_t *cnx) { int ret = -1; if ( ! cnx ) return; if ( prelude_connection_is_alive(cnx->cnx) ) { ret = do_send(cnx->cnx, msg); if ( ret < 0 ) set_state_dead(cnx, ret, FALSE, TRUE); } if ( ret < 0 && cnx->failover ) failover_save_msg(cnx->failover, msg); broadcast_message(msg, cnx->and); } static int failover_flush(prelude_failover_t *failover, cnx_list_t *clist, cnx_t *cnx) { char name[128]; prelude_msg_t *msg; size_t totsize = 0; ssize_t size, ret = 0; unsigned int available, count = 0; if ( ! failover ) return 0; available = prelude_failover_get_available_msg_count(failover); if ( ! available ) return 0; if ( clist ) snprintf(name, sizeof(name), "any"); else snprintf(name, sizeof(name), "0x%" PRELUDE_PRIx64, prelude_connection_get_peer_analyzerid(cnx->cnx)); prelude_log(PRELUDE_LOG_INFO, "Flushing %u message to %s (%lu erased due to quota)...\n", available, name, prelude_failover_get_deleted_msg_count(failover)); do { size = prelude_failover_get_saved_msg(failover, &msg); if ( size == 0 ) break; if ( size < 0 ) { prelude_log(PRELUDE_LOG_ERR, "error reading message from failover: %s", prelude_strerror(size)); break; } if ( clist ) { broadcast_message(msg, clist->and); if ( clist->dead ) ret = -1; } else { ret = do_send(cnx->cnx, msg); if ( ret < 0 ) { set_state_dead(cnx, ret, FALSE, TRUE); if ( cnx->failover ) failover_save_msg(cnx->failover, msg); } } prelude_msg_destroy(msg); if ( ret < 0 ) break; count++; totsize += size; } while ( 1 ); prelude_log(PRELUDE_LOG_WARN, "Failover recovery: %u/%u messages flushed (%" PRELUDE_PRIu64 " bytes).\n", count, available, (uint64_t) totsize); return ret; } static int set_state_alive(cnx_t *cnx, prelude_bool_t global_notice) { int ret, fd; cnx_list_t *clist = cnx->parent; prelude_connection_pool_t *pool = clist->parent; prelude_timer_destroy(&cnx->timer); prelude_timer_set_expire(&cnx->timer, INITIAL_EXPIRATION_TIME); if ( clist->dead ) clist->dead--; prelude_log_debug(3, "notify alive: total=%d dead=%d\n", clist->total, clist->dead); notify_event(pool, PRELUDE_CONNECTION_POOL_EVENT_ALIVE, cnx->cnx, global_notice); ret = failover_flush(cnx->failover, NULL, cnx); if ( ret < 0 ) return ret; if ( pool->failover && clist->dead == 0 ) { ret = failover_flush(pool->failover, clist, NULL); if ( ret < 0 ) return ret; } fd = prelude_io_get_fd(prelude_connection_get_fd(cnx->cnx)); assert(fd < FD_SETSIZE); FD_SET(fd, &pool->fds); pool->nfd = MAX(fd + 1, pool->nfd); return 0; } static void set_state_dead(cnx_t *cnx, prelude_error_t error, prelude_bool_t init_time, prelude_bool_t global_notice) { int fd; cnx_list_t *clist = cnx->parent; prelude_connection_pool_t *pool = clist->parent; prelude_connection_close(cnx->cnx); if ( ! init_time || prelude_error_get_code(error) != PRELUDE_ERROR_PROFILE ) prelude_log(PRELUDE_LOG_WARN, "%sconnection error with %s: %s\n", (pool->flags & PRELUDE_CONNECTION_POOL_FLAGS_FAILOVER) ? "Failover enabled: " : "", prelude_connection_get_peer_addr(cnx->cnx), prelude_strerror(error)); clist->dead++; prelude_log_debug(3, "notify dead: total=%d dead=%d\n", clist->total, clist->dead); init_cnx_timer(cnx); notify_event(pool, PRELUDE_CONNECTION_POOL_EVENT_DEAD, cnx->cnx, global_notice); fd = prelude_io_get_fd(prelude_connection_get_fd(cnx->cnx)); assert(fd < FD_SETSIZE); FD_CLR(fd, &pool->fds); } static void check_for_data_cb(void *arg) { prelude_connection_pool_t *pool = arg; prelude_connection_pool_check_event(pool, 0, NULL, NULL); prelude_timer_reset(&pool->timer); } /* * Returns 0 on sucess, -1 on a new failure, * -2 on an already signaled failure. */ static int walk_manager_lists(prelude_connection_pool_t *pool, prelude_msg_t *msg) { int ret = 0; cnx_list_t *or; for ( or = pool->or_list; or != NULL; or = or->or ) { /* * if all connections are dead and we have a or, go to next. */ if ( or->dead == or->total && (pool->flags & PRELUDE_CONNECTION_POOL_FLAGS_FAILOVER) ) { ret = -2; continue; } broadcast_message(msg, or->and); return 0; } if ( pool->failover ) failover_save_msg(pool->failover, msg); return ret; } /* * Function called back when one of the client reconnection timer expires. */ static void connection_timer_expire(void *data) { int ret; cnx_t *cnx = data; prelude_connection_pool_t *pool = cnx->parent->parent; gl_recursive_lock_lock(pool->mutex); ret = prelude_connection_connect(cnx->cnx, pool->client_profile, pool->permission); if ( ret >= 0 ) { set_state_alive(cnx, TRUE); goto out; } prelude_log(PRELUDE_LOG_WARN, "%sconnection error with %s: %s\n", (pool->flags & PRELUDE_CONNECTION_POOL_FLAGS_FAILOVER) ? "Failover enabled: " : "", prelude_connection_get_peer_addr(cnx->cnx), prelude_strerror(ret)); /* * Connection failed, expand timeout and reset the timer. */ if ( prelude_timer_get_expire(&cnx->timer) < MAXIMUM_EXPIRATION_TIME ) prelude_timer_set_expire(&cnx->timer, prelude_timer_get_expire(&cnx->timer) * 2); prelude_timer_reset(&cnx->timer); out: gl_recursive_lock_unlock(pool->mutex); } static int new_connection(cnx_t **ncnx, prelude_client_profile_t *cp, cnx_list_t *clist, prelude_connection_t *cnx, prelude_connection_pool_flags_t flags) { int ret; cnx_t *nc; char *dirname, buf[PATH_MAX]; nc = malloc(sizeof(*nc)); if ( ! nc ) return prelude_error_from_errno(errno); nc->msg = NULL; nc->failover = NULL; nc->parent = clist; prelude_timer_init_list(&nc->timer); if ( flags & PRELUDE_CONNECTION_POOL_FLAGS_RECONNECT ) { prelude_timer_set_data(&nc->timer, nc); prelude_timer_set_expire(&nc->timer, INITIAL_EXPIRATION_TIME); prelude_timer_set_callback(&nc->timer, connection_timer_expire); } if ( flags & PRELUDE_CONNECTION_POOL_FLAGS_FAILOVER ) { prelude_client_profile_get_backup_dirname(cp, buf, sizeof(buf)); ret = get_connection_backup_path(cnx, buf, &dirname); if ( ret < 0 ) goto err; ret = prelude_failover_new(&nc->failover, dirname); free(dirname); if ( ret < 0 ) goto err; } nc->cnx = cnx; nc->and = NULL; clist->total++; prelude_linked_object_add(&clist->parent->all_cnx, (prelude_linked_object_t *) cnx); *ncnx = nc; return 0; err: free(nc); return ret; } static int new_connection_from_connection(cnx_t **new, prelude_client_profile_t *cp, cnx_list_t *clist, prelude_connection_t *cnx, prelude_connection_pool_flags_t flags) { return new_connection(new, cp, clist, cnx, flags); } static int new_connection_from_address(cnx_t **new, prelude_client_profile_t *cp, cnx_list_t *clist, char *addr, prelude_connection_pool_flags_t flags) { int ret; prelude_connection_t *cnx; ret = prelude_connection_new(&cnx, addr); if ( ret < 0 ) return ret; ret = new_connection_from_connection(new, cp, clist, cnx, flags); if ( ret < 0 ) prelude_connection_destroy(cnx); return ret; } /* * Creates a list (boolean AND) of connections. */ static int create_connection_list(cnx_list_t **new, prelude_connection_pool_t *pool) { *new = calloc(1, sizeof(**new)); if ( ! *new ) return prelude_error_from_errno(errno); (*new)->parent = pool; return 0; } static char *parse_config_string(char **line) { char *out, *str = *line; if ( ! *line ) return NULL; /* * Walk until next word. */ while ( *str != '\0' && *str == ' ' ) str++; /* * save it */ out = str; /* * walk until end of word. */ while ( *str != '\0' && *str != ' ' ) str++; if ( *str == ' ' ) { *str = '\0'; *line = str + 1; } else if ( *str == '\0' ) *line = NULL; return out; } /* * Parse Manager configuration line: x.x.x.x && y.y.y.y || z.z.z.z */ static int parse_config_line(prelude_connection_pool_t *pool) { int ret; cnx_t **cnx; cnx_list_t *clist = NULL; char *ptr, *cfgline = pool->connection_string; ret = create_connection_list(&pool->or_list, pool); if ( ret < 0 ) return ret; clist = pool->or_list; cnx = &clist->and; while ( 1 ) { ptr = parse_config_string(&cfgline); /* * If we meet end of line or "||", * it means we just finished adding a AND list. */ if ( ! ptr || (ret = strcmp(ptr, "||") == 0) ) { /* * end of line ? */ if ( ! ptr ) break; /* * we met the || operator, prepare a new list. */ ret = create_connection_list(&clist->or, pool); if ( ret < 0 ) return ret; clist = clist->or; cnx = &clist->and; continue; } ret = strcmp(ptr, "&&"); if ( ret == 0 ) continue; ret = new_connection_from_address(cnx, pool->client_profile, clist, ptr, pool->flags); if ( ret < 0 ) return ret; cnx = &(*cnx)->and; } return 0; } static cnx_t *search_cnx(prelude_connection_pool_t *pool, prelude_connection_t *cnx) { cnx_t *c; cnx_list_t *clist; for ( clist = pool->or_list; clist != NULL; clist = clist->or ) { for ( c = clist->and; c != NULL; c = c->and ) { if ( c->cnx == cnx ) return c; } } return NULL; } static void broadcast_async_cb(void *obj, void *data) { prelude_msg_t *msg = obj; prelude_connection_pool_t *pool = data; prelude_connection_pool_broadcast(pool, msg); prelude_msg_destroy(msg); prelude_connection_pool_destroy(pool); } /** * prelude_connection_pool_broadcast: * @pool: Pointer to a #prelude_connection_pool_t object. * @msg: Pointer on a #prelude_msg_t object. * * Sends the message contained in @msg to all the connection in @pool. */ void prelude_connection_pool_broadcast(prelude_connection_pool_t *pool, prelude_msg_t *msg) { prelude_return_if_fail(pool); prelude_return_if_fail(msg); gl_recursive_lock_lock(pool->mutex); walk_manager_lists(pool, msg); gl_recursive_lock_unlock(pool->mutex); } /** * prelude_connection_pool_broadcast_async: * @pool: Pointer to a #prelude_connection_pool_t object * @msg: Pointer on a #prelude_msg_t object. * * Sends the message contained in @msg to all connections * in @pool asynchronously. After the request is processed, * the @msg message will be freed. */ void prelude_connection_pool_broadcast_async(prelude_connection_pool_t *pool, prelude_msg_t *msg) { prelude_return_if_fail(pool); prelude_return_if_fail(msg); gl_recursive_lock_lock(pool->mutex); pool->refcount++; gl_recursive_lock_unlock(pool->mutex); prelude_async_set_callback((prelude_async_object_t *) msg, &broadcast_async_cb); prelude_async_set_data((prelude_async_object_t *) msg, pool); prelude_async_add((prelude_async_object_t *) msg); } /** * prelude_connection_pool_init: * @pool: Pointer to a #prelude_connection_pool_t object. * * Initializes @pool. This means that connection associated with @pool * using prelude_connection_pool_set_connection_string() will be * established. * * Returns: 0 on success, a negative value on error. */ int prelude_connection_pool_init(prelude_connection_pool_t *pool) { cnx_t *cnx; cnx_list_t *clist; int ret = 0, event = 0; char dirname[PATH_MAX], buf[PATH_MAX]; gl_recursive_lock_lock(pool->mutex); prelude_return_val_if_fail(pool, prelude_error(PRELUDE_ERROR_ASSERTION)); if ( ! pool->failover && (pool->flags & PRELUDE_CONNECTION_POOL_FLAGS_FAILOVER) ) { prelude_client_profile_get_backup_dirname(pool->client_profile, buf, sizeof(buf)); snprintf(dirname, sizeof(dirname), "%s/global", buf); ret = prelude_failover_new(&pool->failover, dirname); if ( ret < 0 ) goto err; } if ( (! pool->connection_string_changed || ! pool->connection_string) && ! pool->or_list ) { ret = prelude_error(PRELUDE_ERROR_CONNECTION_STRING); goto err; } if ( pool->connection_string_changed ) { pool->connection_string_changed = FALSE; connection_list_destroy(pool->or_list); pool->nfd = 0; pool->or_list = NULL; prelude_list_init(&pool->all_cnx); ret = parse_config_line(pool); if ( ret < 0 || ! pool->or_list ) goto err; } for ( clist = pool->or_list; clist != NULL; clist = clist->or ) { for ( cnx = clist->and; cnx != NULL; cnx = cnx->and ) { if ( prelude_connection_is_alive(cnx->cnx) ) continue; ret = prelude_connection_connect(cnx->cnx, clist->parent->client_profile, clist->parent->permission); if ( ret < 0 ) { if ( prelude_error_get_code(ret) == PRELUDE_ERROR_PROFILE ) goto err; event |= PRELUDE_CONNECTION_POOL_EVENT_DEAD; set_state_dead(cnx, ret, TRUE, FALSE); ret = 0; } else if ( prelude_connection_is_alive(cnx->cnx) ) { event |= PRELUDE_CONNECTION_POOL_EVENT_DEAD; set_state_alive(cnx, FALSE); } } if ( clist->dead ) continue; } global_event_handler(pool, event); if ( ret < 0 ) prelude_log(PRELUDE_LOG_WARN, "Can't contact configured Manager - Enabling failsafe mode.\n"); if ( pool->wanted_event & PRELUDE_CONNECTION_POOL_EVENT_INPUT ) { prelude_timer_set_data(&pool->timer, pool); prelude_timer_set_expire(&pool->timer, 1); prelude_timer_set_callback(&pool->timer, check_for_data_cb); prelude_timer_init(&pool->timer); } pool->initialized = TRUE; err: gl_recursive_lock_unlock(pool->mutex); return ret; } /** * prelude_connection_pool_new: * @ret: Pointer to an address where to store the created #prelude_connection_pool_t object. * @cp: The #prelude_client_profile_t to use for connection. * @permission: Permission the connection in this connection-pool will require. * * prelude_connection_pool_new() initializes a new Connection Manager object. * * Returns: 0 on success or a negative value if an error occured. */ int prelude_connection_pool_new(prelude_connection_pool_t **ret, prelude_client_profile_t *cp, prelude_connection_permission_t permission) { prelude_connection_pool_t *new; prelude_return_val_if_fail(cp, prelude_error(PRELUDE_ERROR_ASSERTION)); *ret = new = calloc(1, sizeof(*new)); if ( ! new ) return prelude_error_from_errno(errno); FD_ZERO(&new->fds); new->refcount = 1; new->client_profile = cp; new->permission = permission; new->connection_string_changed = FALSE; new->flags = PRELUDE_CONNECTION_POOL_FLAGS_FAILOVER; prelude_list_init(&new->all_cnx); prelude_timer_init_list(&new->timer); gl_recursive_lock_init(new->mutex); return 0; } /** * prelude_connection_pool_destroy: * @pool: Pointer to a #prelude_connection_pool_t object. * * Destroys @pool and all connections handled. */ void prelude_connection_pool_destroy(prelude_connection_pool_t *pool) { prelude_return_if_fail(pool); gl_recursive_lock_lock(pool->mutex); if ( --pool->refcount != 0 ) { gl_recursive_lock_unlock(pool->mutex); return; } prelude_timer_destroy(&pool->timer); if ( pool->connection_string ) free(pool->connection_string); connection_list_destroy(pool->or_list); if ( pool->failover ) prelude_failover_destroy(pool->failover); gl_recursive_lock_unlock(pool->mutex); gl_recursive_lock_destroy(pool->mutex); free(pool); } /** * prelude_connection_pool_ref: * @pool: Pointer to a #prelude_connection_pool_t object. * * Increases @pool reference count. * * prelude_connection_pool_destroy() will decrease the refcount until * it reaches 0, at which point the @pool will be destroyed. * * Returns: The provided @pool is returned. */ prelude_connection_pool_t *prelude_connection_pool_ref(prelude_connection_pool_t *pool) { prelude_return_val_if_fail(pool, NULL); pool->refcount++; return pool; } /** * prelude_connection_pool_add_connection: * @pool: Pointer to a #prelude_connection_pool_t object. * @cnx: Pointer to a #prelude_connection_t object to add to @pool. * * Adds @cnx to @pool set of connections. * * If @pool is already initialized (prelude_connection_pool_init() called) * and @cnx is not alive, it will attempt a reconnection. * * Returns: 0 on success, a negative value if an error occured. */ int prelude_connection_pool_add_connection(prelude_connection_pool_t *pool, prelude_connection_t *cnx) { int ret; cnx_t **c; prelude_return_val_if_fail(pool, prelude_error(PRELUDE_ERROR_ASSERTION)); prelude_return_val_if_fail(cnx, prelude_error(PRELUDE_ERROR_ASSERTION)); gl_recursive_lock_lock(pool->mutex); if ( ! pool->or_list ) { ret = create_connection_list(&pool->or_list, pool); if ( ret < 0 ) goto out; } for ( c = &pool->or_list->and; (*c); c = &(*c)->and ); ret = new_connection_from_connection(c, pool->client_profile, pool->or_list, cnx, pool->flags); if ( ret < 0 ) goto out; if ( pool->initialized && ! prelude_connection_is_alive(cnx) ) { ret = prelude_connection_connect(cnx, pool->client_profile, pool->permission); if ( ret < 0 ) set_state_dead(*c, ret, FALSE, TRUE); else if ( prelude_connection_is_alive(cnx) ) set_state_alive(*c, TRUE); } if ( (*c)->parent->dead == 0 && pool->failover ) { ret = failover_flush(pool->failover, (*c)->parent, NULL); if ( ret < 0 ) goto out; } out: gl_recursive_lock_unlock(pool->mutex); return ret; } /** * prelude_connection_pool_del_connection: * @pool: Pointer to a #prelude_connection_pool_t object. * @cnx: Pointer to a #prelude_connection_t object to remove from @pool. * * Remove @cnx from @pool of connections. * * Returns: 0 on success, a negative value if an error occured. */ int prelude_connection_pool_del_connection(prelude_connection_pool_t *pool, prelude_connection_t *cnx) { cnx_t *c; int ret = 0; prelude_return_val_if_fail(pool, prelude_error(PRELUDE_ERROR_ASSERTION)); prelude_return_val_if_fail(cnx, prelude_error(PRELUDE_ERROR_ASSERTION)); gl_recursive_lock_lock(pool->mutex); c = search_cnx(pool, cnx); if ( ! c ) { ret = prelude_error_verbose(PRELUDE_ERROR_GENERIC, "Connection is not within pool"); goto out; } destroy_connection_single(c); out: gl_recursive_lock_unlock(pool->mutex); return ret; } /** * prelude_connection_pool_set_global_event_handler: * @pool: Pointer to a #prelude_connection_pool_t object. * @wanted_events: Event the user want to be notified about. * @callback: User specific callback to call when an event is available. * * @callback will be called each time one of the event specified in * @wanted_events happen to @pool. However, contrary to * prelude_connection_pool_set_event_handler(), the callback will be called * only once per set of event. */ void prelude_connection_pool_set_global_event_handler(prelude_connection_pool_t *pool, prelude_connection_pool_event_t wanted_events, int (*callback)(prelude_connection_pool_t *pool, prelude_connection_pool_event_t events)) { prelude_return_if_fail(pool); pool->global_wanted_event = wanted_events; pool->global_event_handler = callback; } /** * prelude_connection_pool_set_event_handler: * @pool: Pointer to a #prelude_connection_pool_t object. * @wanted_events: Event the user want to be notified about. * @callback: User specific callback to call when an event is available. * * @callback will be called each time one of the event specified in * @wanted_events happens to @pool. */ void prelude_connection_pool_set_event_handler(prelude_connection_pool_t *pool, prelude_connection_pool_event_t wanted_events, int (*callback)(prelude_connection_pool_t *pool, prelude_connection_pool_event_t events, prelude_connection_t *cnx)) { prelude_return_if_fail(pool); pool->wanted_event = wanted_events; pool->event_handler = callback; } /** * prelude_connection_pool_get_connection_list: * @pool: Pointer to a #prelude_connection_pool_t object. * * Returns: The list of connections handled by @pool. */ prelude_list_t *prelude_connection_pool_get_connection_list(prelude_connection_pool_t *pool) { prelude_return_val_if_fail(pool, NULL); return &pool->all_cnx; } /** * prelude_connection_pool_set_connection_dead: * @pool: Pointer to a #prelude_connection_pool_t object. * @cnx: Pointer to a #prelude_connection_t object used within @pool. * * Notifies @pool that the connection identified by @cnx is dead. * * Usually, this function should not be used since @pool is * self sufficient, and handles connections issues internally. However, * it is sometime useful when the user has several mechanisms using the * connection, and that its own mechanism detects a connection problem * before @pool notice. * * Returns: 0 on success, a negative value if an error occured. */ int prelude_connection_pool_set_connection_dead(prelude_connection_pool_t *pool, prelude_connection_t *cnx) { cnx_t *c; int ret = 0; prelude_return_val_if_fail(pool, prelude_error(PRELUDE_ERROR_ASSERTION)); prelude_return_val_if_fail(cnx, prelude_error(PRELUDE_ERROR_ASSERTION)); gl_recursive_lock_lock(pool->mutex); c = search_cnx(pool, cnx); if ( ! c ) { ret = prelude_error_verbose(PRELUDE_ERROR_GENERIC, "Connection is not within pool"); goto out; } if ( ! prelude_connection_is_alive(cnx) ) goto out; prelude_connection_set_state(cnx, 0); set_state_dead(c, 0, FALSE, FALSE); out: gl_recursive_lock_unlock(pool->mutex); return ret; } /** * prelude_connection_pool_set_connection_alive: * @pool: Pointer to a #prelude_connection_pool_t object. * @cnx: Pointer to a #prelude_connection_t object used within @pool. * * Notifies @pool that the connection identified by @cnx went back alive. * * Usually, this function should not be used since @pool is * self sufficient, and handles connection issues internally. However, * it is sometime useful when the user has several mechanisms using the * connection, and that its own mechanism detects a connection problem * before @pool notice. * * Returns: 0 on success, a negative value if an error occured. */ int prelude_connection_pool_set_connection_alive(prelude_connection_pool_t *pool, prelude_connection_t *cnx) { cnx_t *c; int ret = 0; prelude_return_val_if_fail(pool, prelude_error(PRELUDE_ERROR_ASSERTION)); prelude_return_val_if_fail(cnx, prelude_error(PRELUDE_ERROR_ASSERTION)); gl_recursive_lock_lock(pool->mutex); c = search_cnx(pool, cnx); if ( ! c ) { ret = prelude_error_verbose(PRELUDE_ERROR_GENERIC, "Connection is not within pool"); goto out; } if ( c->parent->dead == 0 ) goto out; ret = set_state_alive(c, FALSE); out: gl_recursive_lock_unlock(pool->mutex); return ret; } /** * prelude_connection_pool_set_connection_string: * @pool: Pointer to a #prelude_connection_pool_t object. * @cfgstr: Connection string. * * Sets the connection string for @pool. The connection string should be * in the form of : "address". Special operand like || (OR) and && (AND), * are also accepted: "address && address". * * Where && means that alert sent using @pool will go to both configured * addresses, and || means that if the left address fails, the right address * will be used. * * prelude_connection_pool_init() should be used to initiates the connection. * * Returns: 0 on success, a negative value if an error occured. */ int prelude_connection_pool_set_connection_string(prelude_connection_pool_t *pool, const char *cfgstr) { char *new; prelude_return_val_if_fail(pool, prelude_error(PRELUDE_ERROR_ASSERTION)); prelude_return_val_if_fail(cfgstr, prelude_error(PRELUDE_ERROR_ASSERTION)); new = strdup(cfgstr); if ( ! new ) return prelude_error_from_errno(errno); gl_recursive_lock_lock(pool->mutex); if ( pool->connection_string ) free(pool->connection_string); pool->connection_string = new; pool->connection_string_changed = TRUE; gl_recursive_lock_unlock(pool->mutex); return 0; } /** * prelude_connection_pool_get_connection_string: * @pool: Pointer to a #prelude_connection_pool_t object. * * Used to query the connection string used by @pool. * * Returns: The connection string. */ const char *prelude_connection_pool_get_connection_string(prelude_connection_pool_t *pool) { prelude_return_val_if_fail(pool, NULL); return pool->connection_string; } /** * prelude_connection_pool_set_flags: * @pool: Pointer to a #prelude_connection_pool_t object. * @flags: Flags to use for @pool. * * Sets @flags within @pools. */ void prelude_connection_pool_set_flags(prelude_connection_pool_t *pool, prelude_connection_pool_flags_t flags) { prelude_return_if_fail(pool); pool->flags = flags; } void prelude_connection_pool_set_required_permission(prelude_connection_pool_t *pool, prelude_connection_permission_t req_perm) { prelude_return_if_fail(pool); pool->permission = req_perm; } /** * prelude_connection_pool_get_flags: * @pool: Pointer to a #prelude_connection_pool_t object. * * Returns: the #prelude_connection_pool_flags_t used in @pool. */ prelude_connection_pool_flags_t prelude_connection_pool_get_flags(prelude_connection_pool_t *pool) { prelude_return_val_if_fail(pool, prelude_error(PRELUDE_ERROR_ASSERTION)); return pool->flags; } /** * prelude_connection_pool_check_event: * @pool: Pointer to a #prelude_connection_pool_t object. * @timeout: Time to wait for an event. * @event_cb: User provided callback function to call on received events. * @extra: Pointer to user specific data provided to @event_cb. * * This function queries the set of connections available in @pool to see if * events are waiting to be handled. If timeout is zero, then this function * will return immediatly in case there is no event to be handled. * * If timeout is -1, this function won't return until an event is available. * Otherwise this function will return if there is no event after the specified * number of second. * * For each event, @event_cb is called with the concerned @pool, the provided * @extra data, and the @cnx where an event has occured. * * Returns: The number of handled events, or a negative value if an error occured. */ int prelude_connection_pool_check_event(prelude_connection_pool_t *pool, int timeout, int (*event_cb)(prelude_connection_pool_t *pool, prelude_connection_pool_event_t event, prelude_connection_t *cnx, void *extra), void *extra) { prelude_return_val_if_fail(pool, prelude_error(PRELUDE_ERROR_ASSERTION)); /* * We don't assert on NULL event_cb since there might be a global * event handler. */ return connection_pool_check_event(pool, timeout, event_cb, extra, NULL, NULL); } /** * prelude_connection_pool_recv: * @pool: Pointer to a #prelude_connection_pool_t object. * @timeout: Time to wait for an event. * @outcon: Pointer where the connection where an event happened should be stored. * @outmsg: Pointer where the next message that will be read should be stored. * * This function queries the set of connections available in @pool to see if * events are waiting to be handled. If timeout is zero, then this function * will return immediatly in case there is no event to be handled. * * If timeout is -1, this function won't return until an event is available. * Otherwise this function will return if there is no event after the specified * number of second. * * If an event is available, it will be read and store the #prelude_connection_t * object in the @outcon pointer. If @outmsg was specified, the message will be * read and stored in there. * * Returns: The number of handled events (0 or 1) or a negative value if an error occured. */ int prelude_connection_pool_recv(prelude_connection_pool_t *pool, int timeout, prelude_connection_t **outcon, prelude_msg_t **outmsg) { prelude_return_val_if_fail(pool, prelude_error(PRELUDE_ERROR_ASSERTION)); prelude_return_val_if_fail(outcon, prelude_error(PRELUDE_ERROR_ASSERTION)); return connection_pool_check_event(pool, timeout, NULL, NULL, outcon, outmsg); } /** * prelude_connection_pool_set_data: * @pool: Pointer to a #prelude_connection_pool_t object. * @data: Pointer to user specific data. * * The user might use this function to associate data with @pool. * The data associated might be retrieved using prelude_connection_pool_get_data(). */ void prelude_connection_pool_set_data(prelude_connection_pool_t *pool, void *data) { prelude_return_if_fail(pool); pool->data = data; } /** * prelude_connection_pool_get_data: * @pool: Pointer to a #prelude_connection_pool_t object. * * The user might use this function to query data associated with * @pool using prelude_connection_pool_set_data(). * * Returns: the user data associated to @pool. */ void *prelude_connection_pool_get_data(prelude_connection_pool_t *pool) { prelude_return_val_if_fail(pool, NULL); return pool->data; } libprelude-1.0.0/src/prelude-failover.c0000664000076400007640000004520411325615276015007 00000000000000/***** * * Copyright (C) 2007 PreludeIDS Technologies. All Rights Reserved. * Author: Yoann Vandoorselaere * * This file is part of the Prelude library. * * 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; see the file COPYING. If not, write to * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. * *****/ #include "config.h" #include "libmissing.h" #include #include #include #include #include #include #include #include #include #include #include #include #include #include "glthread/thread.h" #include "common.h" #include "prelude-log.h" #include "prelude-io.h" #include "prelude-msg.h" #include "prelude-failover.h" #define PRELUDE_ERROR_SOURCE_DEFAULT PRELUDE_ERROR_SOURCE_FAILOVER #include "prelude-error.h" #define FAILOVER_CHECKSUM_SIZE 4 #define FAILOVER_JOURNAL_ENTRY_SIZE 20 struct prelude_failover { int jfd; prelude_io_t *wfd; prelude_io_t *rfd; uint64_t count; uint64_t rindex; prelude_bool_t transaction_enabled; }; typedef union { struct { uint64_t count; uint64_t rindex; unsigned char checksum[FAILOVER_CHECKSUM_SIZE]; } value; unsigned char data[FAILOVER_JOURNAL_ENTRY_SIZE]; } failover_journal_entry_t; static void mask_signal(sigset_t *oldmask) { sigset_t newmask; prelude_return_if_fail( sigfillset(&newmask) == 0 ); prelude_return_if_fail( glthread_sigmask(SIG_BLOCK, &newmask, oldmask) == 0 ); } static void unmask_signal(sigset_t *oldmask) { prelude_return_if_fail( glthread_sigmask(SIG_SETMASK, oldmask, NULL) == 0 ); } static void journal_checksum(failover_journal_entry_t *fj, unsigned char *digest, size_t digest_size) { size_t len; len = gcry_md_get_algo_dlen(GCRY_MD_CRC32); assert(len == digest_size); gcry_md_hash_buffer(GCRY_MD_CRC32, digest, fj->data, sizeof(fj->data) - FAILOVER_CHECKSUM_SIZE); } static int journal_write(prelude_failover_t *failover) { ssize_t ret; size_t rcount = 0; failover_journal_entry_t fj; fj.value.count = failover->count; fj.value.rindex = failover->rindex; journal_checksum(&fj, fj.value.checksum, sizeof(fj.value.checksum)); do { ret = write(failover->jfd, fj.data + rcount, sizeof(fj.data) - rcount); if ( ret < 0 ) { ret = prelude_error_verbose(PRELUDE_ERROR_GENERIC, "error writing failover journal: %s", strerror(errno)); break; } rcount += ret; } while ( ret >= 0 && rcount != sizeof(fj.data) ); return ret; } static int truncate_failover(prelude_failover_t *failover) { off_t off; sigset_t oldmask; int ret = 0, wfd, rfd; wfd = prelude_io_get_fd(failover->wfd); rfd = prelude_io_get_fd(failover->rfd); mask_signal(&oldmask); /* * Crash before messages truncate: journal is not updated but on restart * rindex equal the size of the file (previous journal update) -> truncate message. */ ret = ftruncate(wfd, 0); if ( ret != 0 ) { ret = prelude_error_verbose(PRELUDE_ERROR_GENERIC, "error truncating failover: %s", strerror(errno)); goto error; } /* * Crash after messages truncate, but before journal update: on restart * wfd is zero: journal is truncated. */ ret = ftruncate(failover->jfd, 0); if ( ret != 0 ) { ret = prelude_error_verbose(PRELUDE_ERROR_GENERIC, "error truncating failover journal: %s", strerror(errno)); goto error; } off = lseek(rfd, 0, SEEK_SET); if ( off == (off_t) -1 ) { ret = prelude_error_verbose(PRELUDE_ERROR_GENERIC, "error setting failover read position: %s", strerror(errno)); goto error; } off = lseek(failover->jfd, 0, SEEK_SET); if ( off == (off_t) -1 ) { ret = prelude_error_verbose(PRELUDE_ERROR_GENERIC, "error setting failover journal position: %s", strerror(errno)); goto error; } failover->count = failover->rindex = 0; journal_write(failover); error: unmask_signal(&oldmask); return ret; } static int journal_read(prelude_failover_t *failover, failover_journal_entry_t *ent) { ssize_t ret; size_t count = 0; do { ret = read(failover->jfd, ent->data + count, sizeof(ent->data) - count); if ( ret < 0 ) { ret = prelude_error_verbose(PRELUDE_ERROR_GENERIC, "error reading failover journal: %s", strerror(errno)); break; } count += ret; } while ( count != sizeof(ent->data) ); return ret; } static int journal_check(prelude_failover_t *failover, failover_journal_entry_t *jentry, struct stat *wst) { int ret; unsigned char digest[FAILOVER_CHECKSUM_SIZE]; journal_checksum(jentry, digest, sizeof(digest)); ret = memcmp(digest, jentry->value.checksum, sizeof(digest)); if ( ret != 0 ) { prelude_log(PRELUDE_LOG_WARN, "Failover: incorrect CRC in journal entry, skipping.\n"); return -1; } prelude_log_debug(7, "rindex=%" PRELUDE_PRIu64 " size=%" PRELUDE_PRId64 "\n", jentry->value.rindex, (int64_t) wst->st_size); if ( jentry->value.rindex > (uint64_t) wst->st_size ) { /* * Latest journal entry has a read index that is higher than the size * of our data file. This mean that the data file is corrupted, and we * cannot recover message after the rindex value. We start over. */ prelude_log(PRELUDE_LOG_WARN, "Failover: data file corrupted, %" PRELUDE_PRIu64 " messages truncated.\n", jentry->value.count); jentry->value.rindex = jentry->value.count = 0; truncate_failover(failover); return 0; } else if ( jentry->value.rindex == (uint64_t) wst->st_size ) { /* * Read-Index and size are the same, but file was not truncated. */ jentry->value.rindex = jentry->value.count = 0; truncate_failover(failover); } return 0; } static int journal_read_last_entry(prelude_failover_t *failover, failover_journal_entry_t *jentry, struct stat *jst, struct stat *wst) { int ret, garbage; off_t lret, offset = jst->st_size; garbage = offset % FAILOVER_JOURNAL_ENTRY_SIZE; if ( garbage != 0 ) { /* * The journal is corrupted, not on the correct boundary. */ prelude_log(PRELUDE_LOG_WARN, "Failover: journal corrupted, recovering from invalid boundary.\n"); offset -= garbage; } do { offset -= FAILOVER_JOURNAL_ENTRY_SIZE; lret = lseek(failover->jfd, offset, SEEK_SET); if ( lret == (off_t) -1 ) return prelude_error_verbose(PRELUDE_ERROR_GENERIC, "error seeking to end of journal: %s", strerror(errno)); ret = journal_read(failover, jentry); if ( ret < 0 ) return ret; prelude_log_debug(7, "[%" PRELUDE_PRId64 "] found jentry with count=%" PRELUDE_PRIu64 " rindex=%" PRELUDE_PRIu64 "\n", (int64_t) offset, jentry->value.count, jentry->value.rindex); ret = journal_check(failover, jentry, wst); } while ( offset > 0 && ret != 0 ); if ( ret != 0 ) { truncate_failover(failover); return 0; } return ret; } static int journal_initialize(prelude_failover_t *failover, const char *filename) { int ret; off_t off; struct stat jst, wst; failover_journal_entry_t jentry; failover->jfd = open(filename, O_CREAT|O_RDWR, S_IRUSR|S_IWUSR|S_IRGRP|S_IWGRP); if ( failover->jfd < 0 ) return prelude_error_verbose(PRELUDE_ERROR_GENERIC, "could not open '%s': %s", filename, strerror(errno)); #if !((defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__) fcntl(failover->jfd, F_SETFD, fcntl(failover->jfd, F_GETFD) | FD_CLOEXEC); #endif ret = fstat(failover->jfd, &jst); if ( ret < 0 ) return prelude_error_verbose(PRELUDE_ERROR_GENERIC, "could not stat failover journal: %s", strerror(errno)); ret = fstat(prelude_io_get_fd(failover->wfd), &wst); if ( ret < 0 ) return prelude_error_verbose(PRELUDE_ERROR_GENERIC, "could not stat failover journal: %s", strerror(errno)); if ( jst.st_size == 0 && wst.st_size > 0 ) { truncate_failover(failover); prelude_log(PRELUDE_LOG_WARN, "Failover inconsistency: message data with no journal.\n"); return 0; } else if ( jst.st_size == 0 && wst.st_size == 0 ) return 0; memset(&jentry.value, 0, sizeof(jentry.value)); ret = journal_read_last_entry(failover, &jentry, &jst, &wst); if ( ret < 0 ) return ret; failover->count = jentry.value.count; failover->rindex = jentry.value.rindex; off = lseek(prelude_io_get_fd(failover->rfd), failover->rindex, SEEK_SET); if ( off == (off_t) -1 ) return prelude_error_verbose(PRELUDE_ERROR_GENERIC, "error setting failover read offset: %s", strerror(errno)); return 0; } #if !((defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__) static int lock_cmd(const char *filename, int fd, int cmd, int type) { int ret; struct flock lock; lock.l_type = type; /* write lock */ lock.l_start = 0; /* from offset 0 */ lock.l_whence = SEEK_SET; /* at the beginning of the file */ lock.l_len = 0; /* until EOF */ ret = fcntl(fd, cmd, &lock); if ( ret < 0 ) { if ( errno == EAGAIN || errno == EACCES ) return 0; return prelude_error_verbose(prelude_error_code_from_errno(errno), "error locking '%s': %s", filename, strerror(errno)); } return 1; } #endif static int open_exclusive(const char *filename, int flags, int *fd) { int ret = 1; *fd = open(filename, flags, S_IRUSR|S_IWUSR|S_IRGRP|S_IWGRP); if ( *fd < 0 ) return prelude_error_verbose(PRELUDE_ERROR_GENERIC, "error opening '%s': %s", filename, strerror(errno)); #if !((defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__) ret = lock_cmd(filename, *fd, F_SETLK, F_RDLCK|F_WRLCK); if ( ret <= 0 ) close(*fd); #endif return ret; } static int get_failover_data_filename_and_fd(const char *dirname, char *filename, size_t size) { DIR *dir; int i = 0, fd, ret = 0; struct dirent *de; dir = opendir(dirname); if ( ! dir ) return prelude_error_verbose(PRELUDE_ERROR_GENERIC, "error opening '%s': %s", dirname, strerror(errno)); while ( (de = readdir(dir)) && ret != 1 ) { if ( strlen(de->d_name) <= 4 || ! isdigit(de->d_name[4]) ) continue; if ( strncmp(de->d_name, "data", 4) != 0 || strchr(de->d_name, '.') ) continue; ret = snprintf(filename, size, "%s/%s", dirname, de->d_name); if ( ret < 0 || (size_t) ret >= size ) continue; ret = open_exclusive(filename, O_CREAT|O_WRONLY|O_APPEND, &fd); if ( ret < 0 ) return ret; } while ( ret != 1 ) { ret = snprintf(filename, size, "%s/data%d", dirname, i++); if ( ret < 0 || (size_t) ret >= size ) continue; ret = open_exclusive(filename, O_CREAT|O_WRONLY|O_APPEND, &fd); if ( ret < 0 ) return ret; } closedir(dir); return fd; } int prelude_failover_commit(prelude_failover_t *failover, prelude_msg_t *msg) { /* * Make sure that we don't go down zero. This might happen with a message * data file with more message than what the journal specified. */ if ( failover->count > 0 ) failover->count--; failover->rindex += prelude_msg_get_len(msg); journal_write(failover); return 0; } int prelude_failover_rollback(prelude_failover_t *failover, prelude_msg_t *msg) { off_t off; off = lseek(prelude_io_get_fd(failover->rfd), - prelude_msg_get_len(msg), SEEK_CUR); if ( off == (off_t) -1 ) return prelude_error_verbose(PRELUDE_ERROR_GENERIC, "error setting failover read position: %s", strerror(errno)); return 0; } ssize_t prelude_failover_get_saved_msg(prelude_failover_t *failover, prelude_msg_t **msg) { int ret; *msg = NULL; ret = prelude_msg_read(msg, failover->rfd); if ( ret < 0 ) { uint64_t bkp = failover->count; truncate_failover(failover); if ( prelude_error_get_code(ret) == PRELUDE_ERROR_EOF ) return 0; else return prelude_error_verbose(PRELUDE_ERROR_GENERIC, "%" PRELUDE_PRIu64 " messages failed to recover: %s", bkp, prelude_strerror(ret)); } if ( ! failover->transaction_enabled ) prelude_failover_commit(failover, *msg); return prelude_msg_get_len(*msg); } int prelude_failover_save_msg(prelude_failover_t *failover, prelude_msg_t *msg) { int ret; sigset_t oldset; mask_signal(&oldset); do { ret = prelude_msg_write(msg, failover->wfd); } while ( ret < 0 && errno == EINTR ); if ( ret < 0 ) goto error; if ( ! prelude_msg_is_fragment(msg) ) { failover->count++; journal_write(failover); } error: unmask_signal(&oldset); return ret; } int prelude_failover_new(prelude_failover_t **out, const char *dirname) { mode_t mode; size_t flen; int ret, wfd, rfd; char filename[PATH_MAX]; prelude_failover_t *new; mode = umask(S_IRWXO); ret = mkdir(dirname, S_IRWXU|S_IRWXG); if ( ret < 0 && errno != EEXIST ) { umask(mode); return prelude_error_verbose(PRELUDE_ERROR_GENERIC, "could not create directory '%s': %s", dirname, strerror(errno)); } wfd = get_failover_data_filename_and_fd(dirname, filename, sizeof(filename)); if ( wfd < 0 ) { umask(mode); return wfd; } #if !((defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__) fcntl(wfd, F_SETFD, fcntl(wfd, F_GETFD) | FD_CLOEXEC); #endif rfd = open(filename, O_RDONLY); if ( rfd < 0 ) { umask(mode); close(wfd); return prelude_error_verbose(PRELUDE_ERROR_GENERIC, "could not open '%s' for reading: %s", filename, strerror(errno)); } #if !((defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__) fcntl(rfd, F_SETFD, fcntl(rfd, F_GETFD) | FD_CLOEXEC); #endif new = calloc(1, sizeof(*new)); if ( ! new ) { umask(mode); close(rfd); close(wfd); return prelude_error_from_errno(errno); } new->jfd = -1; ret = prelude_io_new(&new->wfd); if ( ret < 0 ) { umask(mode); close(rfd); close(wfd); free(new); return ret; } ret = prelude_io_new(&new->rfd); if ( ret < 0 ) { umask(mode); close(rfd); close(wfd); free(new); return ret; } prelude_io_set_sys_io(new->wfd, wfd); prelude_io_set_sys_io(new->rfd, rfd); flen = strlen(filename); ret = snprintf(filename + flen, sizeof(filename) - flen, ".journal"); if ( ret < 0 || (size_t) ret >= (sizeof(filename) - flen) ) { umask(mode); prelude_failover_destroy(new); return -1; } ret = journal_initialize(new, filename); if ( ret < 0 ) { umask(mode); prelude_failover_destroy(new); return ret; } umask(mode); *out = new; return 0; } void prelude_failover_destroy(prelude_failover_t *failover) { close(failover->jfd); if ( failover->wfd ) { prelude_io_close(failover->wfd); prelude_io_destroy(failover->wfd); } if ( failover->rfd ) { prelude_io_close(failover->rfd); prelude_io_destroy(failover->rfd); } free(failover); } void prelude_failover_set_quota(prelude_failover_t *failover, size_t limit) { /* FIXME: quota */ } unsigned long prelude_failover_get_deleted_msg_count(prelude_failover_t *failover) { /* FIXME: quota */ return 0; } unsigned long prelude_failover_get_available_msg_count(prelude_failover_t *failover) { return (unsigned long) failover->count; } void prelude_failover_enable_transaction(prelude_failover_t *failover) { failover->transaction_enabled = TRUE; } void prelude_failover_disable_transaction(prelude_failover_t *failover) { failover->transaction_enabled = FALSE; } libprelude-1.0.0/src/Makefile.am0000664000076400007640000000563311322603367013427 00000000000000SUBDIRS = libprelude-error include AM_CPPFLAGS = @PCFLAGS@ -I$(srcdir)/include -I$(top_builddir) -I$(top_builddir)/src/include -I$(srcdir)/libprelude-error \ -I$(top_builddir)/libmissing -I$(top_srcdir)/libmissing $(LTDLINCL) @LIBPRELUDE_CFLAGS@ @LIBGNUTLS_CFLAGS@ @LIBGCRYPT_CFLAGS@ pkgconfigdir = $(libdir)/pkgconfig pkgconfig_DATA = libprelude.pc DISTCLEANFILES = $(pkgconfig_DATA) libpreludeincludedir = $(includedir)/ libprelude_la_LIBADD = @LIBPRELUDE_LIBS@ $(LIBLTDL) $(top_builddir)/libmissing/libmissing.la libprelude-error/libprelude-error.la libprelude_la_LDFLAGS = $(GETADDRINFO_LIB) $(GETHOSTNAME_LIB) $(HOSTENT_LIB) $(INET_NTOP_LIB) $(INET_PTON_LIB) $(LIBSOCKET) $(LTLIBINTL) $(LTLIBTHREAD) $(SERVENT_LIB) -no-undefined -version-info @LIBPRELUDE_SONAME@ -export-symbols-regex "^(idmef|_?prelude)_" lib_LTLIBRARIES = libprelude.la BUILT_SOURCES = $(LTDLDEPS) AM_YFLAGS = -d LEX_OUTPUT_ROOT = lex.yy libprelude_la_SOURCES = \ common.c \ config-engine.c \ daemonize.c \ ntp.c \ tls-auth.c \ tls-util.c \ variable.c \ prelude.c \ prelude-async.c \ prelude-client.c \ prelude-client-profile.c \ prelude-connection.c \ prelude-connection-pool.c \ prelude-failover.c \ prelude-hash.c \ prelude-ident.c \ prelude-io.c \ prelude-log.c \ prelude-msg.c \ prelude-msgbuf.c \ prelude-option.c \ prelude-option-wide.c \ prelude-plugin.c \ prelude-string.c \ prelude-timer.c \ prelude-thread.c \ idmef-additional-data.c \ idmef-class.c \ idmef-criteria.c \ idmef-criteria-string.yac.y \ idmef-criteria-string.lex.l \ idmef-criterion-value.c \ idmef-data.c \ idmef-message-helpers.c \ idmef-message-print.c \ idmef-message-read.c \ idmef-message-write.c \ idmef-path.c \ idmef-time.c \ idmef-tree-wrap.c \ idmef-value.c \ idmef-value-type.c IDMEF_CRITERIA_STRING_LEX_O=idmef-criteria-string.lex.o $(IDMEF_CRITERIA_STRING_LEX_O): idmef-criteria-string.lex.c $(MAKE) idmef-criteria-string.lex.o CFLAGS="$(CFLAGS) -include $(top_builddir)/config.h" IDMEF_CRITERIA_STRING_LEX_O=dummy-idmef-criteria-string.lex.o IDMEF_CRITERIA_STRING_LEX_LO=idmef-criteria-string.lex.lo $(IDMEF_CRITERIA_STRING_LEX_LO): idmef-criteria-string.lex.c $(MAKE) idmef-criteria-string.lex.lo CFLAGS="$(CFLAGS) -include $(top_builddir)/config.h" IDMEF_CRITERIA_STRING_LEX_LO=dummy-idmef-criteria-string.lex.lo IDMEF_CRITERIA_STRING_YAC_O=idmef-criteria-string.yac.o $(IDMEF_CRITERIA_STRING_YAC_O): idmef-criteria-string.yac.c $(MAKE) idmef-criteria-string.yac.o CFLAGS="$(CFLAGS) -include $(top_builddir)/config.h" IDMEF_CRITERIA_STRING_YAC_O=dummy-idmef-criteria-string.yac.o IDMEF_CRITERIA_STRING_YAC_LO=idmef-criteria-string.yac.lo $(IDMEF_CRITERIA_STRING_YAC_LO): idmef-criteria-string.yac.c $(MAKE) idmef-criteria-string.yac.lo CFLAGS="$(CFLAGS) -include $(top_builddir)/config.h" IDMEF_CRITERIA_STRING_YAC_LO=dummy-idmef-criteria-string.yac.lo -include $(top_srcdir)/git.mk libprelude-1.0.0/src/idmef-additional-data.c0000664000076400007640000005273011325615276015645 00000000000000/***** * * Copyright (C) 2004-2005,2006,2007 PreludeIDS Technologies. All Rights Reserved. * Author: Yoann Vandoorselaere * * This file is part of the Prelude library. * * 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; see the file COPYING. If not, write to * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. * *****/ #include "libmissing.h" #include #include #include #include #include #include "prelude-log.h" #include "prelude-string.h" #include "prelude-inttypes.h" #include "idmef.h" #include "idmef-tree-wrap.h" #include "idmef-additional-data.h" #include "idmef-message-id.h" #define IDMEF_ADDITIONAL_DATA_ACCESSOR(name, type) \ int idmef_additional_data_new_ ## name ## _ref_fast(idmef_additional_data_t **ad, const char *data, size_t len) \ { \ return idmef_additional_data_new_ptr_ref_fast(ad, IDMEF_ADDITIONAL_DATA_TYPE_ ## type, data, len + 1); \ } \ \ int idmef_additional_data_new_ ## name ## _ref(idmef_additional_data_t **ad, const char *data) \ { \ return idmef_additional_data_new_ ## name ## _ref_fast(ad, data, strlen(data)); \ } \ \ int idmef_additional_data_set_ ## name ## _ref_fast(idmef_additional_data_t *ad, const char *data, size_t len) \ { \ return idmef_additional_data_set_ptr_ref_fast(ad, IDMEF_ADDITIONAL_DATA_TYPE_ ## type, data, len + 1); \ } \ \ int idmef_additional_data_set_ ## name ## _ref(idmef_additional_data_t *ad, const char *data) \ { \ return idmef_additional_data_set_ ## name ## _ref_fast(ad, data, strlen(data)); \ } \ \ int idmef_additional_data_new_ ## name ## _dup_fast(idmef_additional_data_t **ad, const char *data, size_t len) \ { \ return idmef_additional_data_new_ptr_dup_fast(ad, IDMEF_ADDITIONAL_DATA_TYPE_ ## type, data, len + 1); \ } \ \ int idmef_additional_data_new_ ## name ## _dup(idmef_additional_data_t **ad, const char *data) \ { \ return idmef_additional_data_new_ ## name ## _dup_fast(ad, data, strlen(data)); \ } \ \ int idmef_additional_data_set_ ## name ## _dup_fast(idmef_additional_data_t *ad, const char *data, size_t len) \ { \ return idmef_additional_data_set_ptr_dup_fast(ad, IDMEF_ADDITIONAL_DATA_TYPE_ ## type, data, len + 1); \ } \ \ int idmef_additional_data_set_ ## name ## _dup(idmef_additional_data_t *ad, const char *data) \ { \ return idmef_additional_data_set_ ## name ## _dup_fast(ad, data, strlen(data)); \ } \ \ int idmef_additional_data_new_ ## name ## _nodup_fast(idmef_additional_data_t **ad, char *data, size_t len) \ { \ return idmef_additional_data_new_ptr_nodup_fast(ad, IDMEF_ADDITIONAL_DATA_TYPE_ ## type, data, len + 1);\ } \ \ int idmef_additional_data_new_ ## name ## _nodup(idmef_additional_data_t **ad, char *data) \ { \ return idmef_additional_data_new_ ## name ## _nodup_fast(ad, data, strlen(data)); \ } \ \ int idmef_additional_data_set_ ## name ## _nodup_fast(idmef_additional_data_t *ad, char *data, size_t len) \ { \ return idmef_additional_data_set_ptr_nodup_fast(ad, IDMEF_ADDITIONAL_DATA_TYPE_ ## type, data, len + 1);\ } \ \ int idmef_additional_data_set_ ## name ## _nodup(idmef_additional_data_t *ad, char *data) \ { \ return idmef_additional_data_set_ ## name ## _nodup_fast(ad, data, strlen(data)); \ } #define IDMEF_ADDITIONAL_DATA_SIMPLE(d_type, d_name, ad_type, c_type, name) \ int idmef_additional_data_new_ ## name(idmef_additional_data_t **ret, c_type val) \ { \ int retval; \ \ retval = idmef_additional_data_new(ret); \ if ( retval < 0 ) \ return retval; \ \ idmef_additional_data_set_type(*ret, ad_type); \ idmef_data_set_ ## d_name(idmef_additional_data_get_data(*ret), val); \ \ return retval; \ } \ \ void idmef_additional_data_set_ ## name(idmef_additional_data_t *ptr, c_type val) \ { \ idmef_additional_data_set_type(ptr, ad_type); \ idmef_data_set_ ## d_name(idmef_additional_data_get_data(ptr), val); \ } \ \ c_type idmef_additional_data_get_ ## name(idmef_additional_data_t *ptr) \ { \ return idmef_data_get_ ## d_name(idmef_additional_data_get_data(ptr)); \ } /* * Backward compatibility stuff, remove once 0.9.0 is released. */ int idmef_additional_data_new_ptr_ref_fast(idmef_additional_data_t **nd, idmef_additional_data_type_t type, const void *ptr, size_t len); int idmef_additional_data_new_ptr_dup_fast(idmef_additional_data_t **nd, idmef_additional_data_type_t type, const void *ptr, size_t len); int idmef_additional_data_new_ptr_nodup_fast(idmef_additional_data_t **nd, idmef_additional_data_type_t type, void *ptr, size_t len); int idmef_additional_data_set_ptr_ref_fast(idmef_additional_data_t *data, idmef_additional_data_type_t type, const void *ptr, size_t len); int idmef_additional_data_set_ptr_dup_fast(idmef_additional_data_t *data, idmef_additional_data_type_t type, const void *ptr, size_t len); int idmef_additional_data_set_ptr_nodup_fast(idmef_additional_data_t *data, idmef_additional_data_type_t type, void *ptr, size_t len); static const struct { idmef_additional_data_type_t ad_type; idmef_data_type_t d_type; size_t len; } idmef_additional_data_type_table[] = { { IDMEF_ADDITIONAL_DATA_TYPE_STRING, IDMEF_DATA_TYPE_CHAR_STRING, 0 }, { IDMEF_ADDITIONAL_DATA_TYPE_BYTE, IDMEF_DATA_TYPE_BYTE, sizeof(uint8_t) }, { IDMEF_ADDITIONAL_DATA_TYPE_CHARACTER, IDMEF_DATA_TYPE_CHAR, sizeof(char) }, { IDMEF_ADDITIONAL_DATA_TYPE_DATE_TIME, IDMEF_DATA_TYPE_CHAR_STRING, 0 }, { IDMEF_ADDITIONAL_DATA_TYPE_INTEGER, IDMEF_DATA_TYPE_UINT32, sizeof(uint32_t) }, { IDMEF_ADDITIONAL_DATA_TYPE_NTPSTAMP, IDMEF_DATA_TYPE_UINT64, sizeof(uint64_t) }, { IDMEF_ADDITIONAL_DATA_TYPE_PORTLIST, IDMEF_DATA_TYPE_CHAR_STRING, 0 }, { IDMEF_ADDITIONAL_DATA_TYPE_REAL, IDMEF_DATA_TYPE_FLOAT, sizeof(float) }, { IDMEF_ADDITIONAL_DATA_TYPE_BOOLEAN, IDMEF_DATA_TYPE_BYTE, sizeof(prelude_bool_t) }, { IDMEF_ADDITIONAL_DATA_TYPE_BYTE_STRING, IDMEF_DATA_TYPE_BYTE_STRING, 0 }, { IDMEF_ADDITIONAL_DATA_TYPE_XML, IDMEF_DATA_TYPE_CHAR_STRING, 0 } }; static int check_type(idmef_additional_data_type_t type, const unsigned char *buf, size_t len) { if ( type < 0 || (size_t) type >= sizeof(idmef_additional_data_type_table) / sizeof(*idmef_additional_data_type_table) ) return -1; if ( idmef_additional_data_type_table[type].len != 0 && len != idmef_additional_data_type_table[type].len ) return -1; if ( idmef_additional_data_type_table[type].len == 0 && len < 1 ) return -1; if ( type == IDMEF_ADDITIONAL_DATA_TYPE_BYTE_STRING ) return 0; return buf[len - 1] == '\0' ? 0 : -1; } static idmef_data_type_t idmef_additional_data_type_to_data_type(idmef_additional_data_type_t type) { if ( type < 0 || (size_t) type >= sizeof(idmef_additional_data_type_table) / sizeof(*idmef_additional_data_type_table) ) return IDMEF_DATA_TYPE_UNKNOWN; return idmef_additional_data_type_table[type].d_type; } int idmef_additional_data_new_ptr_ref_fast(idmef_additional_data_t **nd, idmef_additional_data_type_t type, const void *ptr, size_t len) { int ret; idmef_data_type_t dtype; ret = check_type(type, ptr, len); if ( ret < 0 ) return ret; ret = idmef_additional_data_new(nd); if ( ret < 0 ) return ret; idmef_additional_data_set_type(*nd, type); dtype = idmef_additional_data_type_to_data_type(type); ret = idmef_data_set_ptr_ref_fast(idmef_additional_data_get_data(*nd), dtype, ptr, len); if ( ret < 0 ) { idmef_additional_data_destroy(*nd); return ret; } return 0; } int idmef_additional_data_new_ptr_dup_fast(idmef_additional_data_t **nd, idmef_additional_data_type_t type, const void *ptr, size_t len) { int ret; idmef_data_type_t dtype; ret = check_type(type, ptr, len); if ( ret < 0 ) return ret; ret = idmef_additional_data_new(nd); if ( ret < 0 ) return ret; idmef_additional_data_set_type(*nd, type); dtype = idmef_additional_data_type_to_data_type(type); ret = idmef_data_set_ptr_dup_fast(idmef_additional_data_get_data(*nd), dtype, ptr, len); if ( ret < 0 ) { idmef_additional_data_destroy(*nd); return ret; } return 0; } int idmef_additional_data_new_ptr_nodup_fast(idmef_additional_data_t **nd, idmef_additional_data_type_t type, void *ptr, size_t len) { int ret; idmef_data_type_t dtype; ret = check_type(type, ptr, len); if ( ret < 0 ) return ret; ret = idmef_additional_data_new(nd); if ( ret < 0 ) return ret; idmef_additional_data_set_type(*nd, type); dtype = idmef_additional_data_type_to_data_type(type); ret = idmef_data_set_ptr_nodup_fast(idmef_additional_data_get_data(*nd), dtype, ptr, len); if ( ret < 0 ) { idmef_additional_data_destroy(*nd); return ret; } return ret; } int idmef_additional_data_set_ptr_ref_fast(idmef_additional_data_t *data, idmef_additional_data_type_t type, const void *ptr, size_t len) { int ret; ret = check_type(type, ptr, len); if ( ret < 0 ) return ret; idmef_additional_data_set_type(data, type); return idmef_data_set_ptr_ref_fast(idmef_additional_data_get_data(data), idmef_additional_data_type_to_data_type(type), ptr, len); } int idmef_additional_data_set_ptr_dup_fast(idmef_additional_data_t *data, idmef_additional_data_type_t type, const void *ptr, size_t len) { int ret; ret = check_type(type, ptr, len); if ( ret < 0 ) return ret; idmef_additional_data_set_type(data, type); return idmef_data_set_ptr_dup_fast(idmef_additional_data_get_data(data), idmef_additional_data_type_to_data_type(type), ptr, len); } int idmef_additional_data_set_ptr_nodup_fast(idmef_additional_data_t *data, idmef_additional_data_type_t type, void *ptr, size_t len) { int ret; ret = check_type(type, ptr, len); if ( ret < 0 ) return ret; idmef_additional_data_set_type(data, type); return idmef_data_set_ptr_nodup_fast(idmef_additional_data_get_data(data), idmef_additional_data_type_to_data_type(type), ptr, len); } /* * Declare stuff */ IDMEF_ADDITIONAL_DATA_SIMPLE(IDMEF_DATA_TYPE_FLOAT, float, IDMEF_ADDITIONAL_DATA_TYPE_REAL, float, real) IDMEF_ADDITIONAL_DATA_SIMPLE(IDMEF_DATA_TYPE_UINT32, uint32, IDMEF_ADDITIONAL_DATA_TYPE_INTEGER, uint32_t, integer) IDMEF_ADDITIONAL_DATA_SIMPLE(IDMEF_DATA_TYPE_BYTE, byte, IDMEF_ADDITIONAL_DATA_TYPE_BOOLEAN, prelude_bool_t, boolean) IDMEF_ADDITIONAL_DATA_SIMPLE(IDMEF_DATA_TYPE_BYTE, byte, IDMEF_ADDITIONAL_DATA_TYPE_BYTE, uint8_t, byte) IDMEF_ADDITIONAL_DATA_SIMPLE(IDMEF_DATA_TYPE_CHAR, char, IDMEF_ADDITIONAL_DATA_TYPE_CHARACTER, char, character) IDMEF_ADDITIONAL_DATA_ACCESSOR(xml, XML) IDMEF_ADDITIONAL_DATA_ACCESSOR(string, STRING) IDMEF_ADDITIONAL_DATA_ACCESSOR(ntpstamp, NTPSTAMP) IDMEF_ADDITIONAL_DATA_ACCESSOR(portlist, PORTLIST) IDMEF_ADDITIONAL_DATA_ACCESSOR(date_time, DATE_TIME) /* * just make a pointer copy of the embedded data */ int idmef_additional_data_copy_ref(idmef_additional_data_t *src, idmef_additional_data_t *dst) { int ret; ret = prelude_string_copy_ref(idmef_additional_data_get_meaning(src), idmef_additional_data_get_meaning(dst)); if ( ret < 0 ) return ret; idmef_additional_data_set_type(dst, idmef_additional_data_get_type(src)); return idmef_data_copy_ref(idmef_additional_data_get_data(src), idmef_additional_data_get_data(dst)); } /* * also copy the content of the embedded data */ int idmef_additional_data_copy_dup(idmef_additional_data_t *src, idmef_additional_data_t *dst) { int ret; ret = prelude_string_copy_dup(idmef_additional_data_get_meaning(src), idmef_additional_data_get_meaning(dst)); if ( ret < 0 ) return ret; idmef_additional_data_set_type(dst, idmef_additional_data_get_type(src)); return idmef_data_copy_dup(idmef_additional_data_get_data(src), idmef_additional_data_get_data(dst)); } size_t idmef_additional_data_get_len(idmef_additional_data_t *data) { return idmef_data_get_len(idmef_additional_data_get_data(data)); } prelude_bool_t idmef_additional_data_is_empty(idmef_additional_data_t *data) { return idmef_data_is_empty(idmef_additional_data_get_data(data)); } int idmef_additional_data_data_to_string(idmef_additional_data_t *ad, prelude_string_t *out) { int ret; uint64_t i; idmef_data_t *data; data = idmef_additional_data_get_data(ad); if ( idmef_data_is_empty(data) ) return 0; switch ( idmef_additional_data_get_type(ad) ) { case IDMEF_ADDITIONAL_DATA_TYPE_NTPSTAMP: i = idmef_data_get_uint64(data); ret = prelude_string_sprintf(out, "0x%08lux.0x%08lux", (unsigned long) (i >> 32), (unsigned long) i); break; default: ret = idmef_data_to_string(data, out); break; } return ret; } /* * byte-string specific stuff */ int idmef_additional_data_new_byte_string_ref(idmef_additional_data_t **ad, const unsigned char *data, size_t len) { return idmef_additional_data_new_ptr_ref_fast(ad, IDMEF_ADDITIONAL_DATA_TYPE_BYTE_STRING, data, len); } int idmef_additional_data_set_byte_string_ref(idmef_additional_data_t *ad, const unsigned char *data, size_t len) { return idmef_additional_data_set_ptr_ref_fast(ad, IDMEF_ADDITIONAL_DATA_TYPE_BYTE_STRING, data, len); } int idmef_additional_data_new_byte_string_dup(idmef_additional_data_t **ad, const unsigned char *data, size_t len) { return idmef_additional_data_new_ptr_dup_fast(ad, IDMEF_ADDITIONAL_DATA_TYPE_BYTE_STRING, data, len); } int idmef_additional_data_set_byte_string_dup(idmef_additional_data_t *ad, const unsigned char *data, size_t len) { return idmef_additional_data_set_ptr_dup_fast(ad, IDMEF_ADDITIONAL_DATA_TYPE_BYTE_STRING, data, len); } int idmef_additional_data_new_byte_string_nodup(idmef_additional_data_t **ad, unsigned char *data, size_t len) { return idmef_additional_data_new_ptr_nodup_fast(ad, IDMEF_ADDITIONAL_DATA_TYPE_BYTE_STRING, data, len); } int idmef_additional_data_set_byte_string_nodup(idmef_additional_data_t *ad, unsigned char *data, size_t len) { return idmef_additional_data_set_ptr_nodup_fast(ad, IDMEF_ADDITIONAL_DATA_TYPE_BYTE_STRING, data, len); } libprelude-1.0.0/src/prelude-plugin.c0000664000076400007640000005751611202225027014470 00000000000000/***** * * Copyright (C) 1998-2005,2006,2007 PreludeIDS Technologies. All Rights Reserved. * Author: Yoann Vandoorselaere * * This file is part of the Prelude library. * * 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; see the file COPYING. If not, write to * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. * *****/ #include "config.h" #include "libmissing.h" #include #include #include #include #include #include #include #include #include #if TIME_WITH_SYS_TIME # include # include #else # if HAVE_SYS_TIME_H # include # else # include # endif #endif #include #include "prelude-log.h" #include "variable.h" #include "prelude-inttypes.h" #include "prelude-io.h" #include "prelude-option.h" #include "prelude-linked-object.h" #include "prelude-plugin.h" #include "prelude-error.h" #include "config-engine.h" #define DEFAULT_INSTANCE_NAME "default" typedef struct { int count; void *data; const char *symbol; prelude_list_t *head; int (*subscribe)(prelude_plugin_instance_t *pc); void (*unsubscribe)(prelude_plugin_instance_t *pc); } libltdl_data_t; struct prelude_plugin_entry { prelude_list_t list; void *handle; prelude_list_t instance_list; prelude_option_t *root_opt; prelude_plugin_generic_t *plugin; int (*subscribe)(prelude_plugin_instance_t *pc); void (*unsubscribe)(prelude_plugin_instance_t *pc); int (*commit_instance)(prelude_plugin_instance_t *pi, prelude_string_t *out); int (*create_instance)(prelude_option_t *opt, const char *optarg, prelude_string_t *err, void *context); }; struct prelude_plugin_instance { /* * List members for external list (outside library). */ PRELUDE_LINKED_OBJECT; /* * List members for internal list (inside plugin_entry). */ prelude_list_t int_list; /* * pointer to the plugin */ prelude_plugin_entry_t *entry; /* * information about this instance. */ void *data; void *plugin_data; char *name; /* * Instance running time and count. */ double time; unsigned count; unsigned int already_used; prelude_bool_t already_subscribed; }; /* * Some definition : * - Plugin Entry (plugin_entry_t) : * only used here, keep track of all plugin and their container. * * - Plugin Instance (plugin_instance_t) : * Contain a pointer on the plugin, and informations about the * plugin that can't be shared. The instances are what the * structure that external application should use to access the * plugin. * * - The Plugin (plugin_generic_t) : * Contain shared plugin data. */ static PRELUDE_LIST(all_plugins); static unsigned int plugin_count = 0; static prelude_bool_t ltdl_need_init = TRUE; static prelude_plugin_entry_t *search_plugin_entry_by_name(prelude_list_t *head, const char *name) { prelude_list_t *tmp; prelude_plugin_entry_t *pe; if ( ! head ) head = &all_plugins; prelude_list_for_each(head, tmp) { pe = prelude_list_entry(tmp, prelude_plugin_entry_t, list); if ( pe->plugin && strcasecmp(pe->plugin->name, name) == 0 ) return pe; } return NULL; } static prelude_plugin_instance_t *search_instance_from_entry(prelude_plugin_entry_t *pe, const char *name) { prelude_list_t *tmp; prelude_plugin_instance_t *pi; prelude_list_for_each(&pe->instance_list, tmp) { pi = prelude_list_entry(tmp, prelude_plugin_instance_t, int_list); if ( strcasecmp(pi->name, name) == 0 ) return pi; } return NULL; } static int create_instance(prelude_plugin_instance_t **npi, prelude_plugin_entry_t *pe, const char *name, void *data) { prelude_plugin_instance_t *pi; *npi = pi = calloc(1, sizeof(*pi)); if ( ! pi ) return prelude_error_from_errno(errno); if ( ! name || *name == 0 ) name = DEFAULT_INSTANCE_NAME; pi->name = strdup(name); if ( ! pi->name ) { free(pi); return prelude_error_from_errno(errno); } pi->entry = pe; pi->data = data; prelude_list_add_tail(&pe->instance_list, &pi->int_list); return 0; } static void destroy_instance(prelude_plugin_instance_t *instance) { free(instance->name); prelude_list_del(&instance->int_list); free(instance); } static int plugin_desactivate(prelude_option_t *opt, prelude_string_t *out, void *context) { prelude_plugin_instance_t *pi = context; if ( ! pi ) { prelude_string_sprintf(out, "referenced instance not available"); return -1; } if ( pi->entry->plugin->destroy ) { int ret; prelude_bool_t need_free = FALSE; if ( ! out ) { ret = prelude_string_new(&out); if ( ret < 0 ) return ret; need_free = TRUE; } pi->entry->plugin->destroy(pi, out); if ( need_free ) prelude_string_destroy(out); /* * prevent unsubscribe from destroying it again */ pi->entry->plugin->destroy = NULL; } return prelude_plugin_instance_unsubscribe(pi); } static int intercept_plugin_activation_option(prelude_option_t *opt, const char *optarg, prelude_string_t *err, void *context) { int ret = 0; prelude_plugin_entry_t *pe; prelude_plugin_instance_t *pi; prelude_option_context_t *octx; pe = _prelude_option_get_private_data(opt); assert(pe); if ( ! optarg || ! *optarg ) optarg = DEFAULT_INSTANCE_NAME; pi = search_instance_from_entry(pe, optarg); if ( ! pi ) { ret = create_instance(&pi, pe, optarg, NULL); if ( ret < 0 ) return ret; ret = pi->entry->create_instance(opt, optarg, err, pi); if ( ret < 0 ) return ret; ret = prelude_option_new_context(opt, &octx, optarg, pi); if ( ret < 0 ) { destroy_instance(pi); return ret; } if ( ! pe->commit_instance ) ret = prelude_plugin_instance_subscribe(pi); } return ret; } static int intercept_plugin_commit_option(prelude_option_t *opt, prelude_string_t *out, void *context) { int ret; prelude_plugin_entry_t *pe; prelude_plugin_instance_t *pi = context; if ( ! pi ) { prelude_string_sprintf(out, "referenced instance not available"); return -1; } pe = pi->entry; ret = pe->commit_instance(pi, out); if ( pi->already_subscribed ) return ret; if ( ret == 0 ) prelude_plugin_instance_subscribe(pi); return ret; } /* * Initialize a new plugin entry, and add it to * the entry list. */ static int add_plugin_entry(prelude_list_t *head, prelude_plugin_entry_t **pe) { *pe = calloc(1, sizeof(**pe)); if ( ! *pe ) return prelude_error_from_errno(errno); (*pe)->plugin = NULL; prelude_list_init(&(*pe)->instance_list); prelude_list_add_tail(head, &(*pe)->list); return 0; } /* * Copy an existing container (because the plugin will probably * linked in several part of the program, and that the container * contain not shared information). */ static int copy_instance(prelude_plugin_instance_t **dst, prelude_plugin_instance_t *src) { *dst = malloc(sizeof(**dst)); if ( ! *dst ) return prelude_error_from_errno(errno); memcpy(*dst, src, sizeof(**dst)); (*dst)->name = strdup(src->name); if ( ! (*dst)->name ) { free(*dst); return prelude_error_from_errno(errno); } prelude_list_add_tail(&src->entry->instance_list, &(*dst)->int_list); return 0; } /* * lt_dlopenext will fail looking up the symbol in case the libtool * archive is missing. */ static const char *libtool_is_buggy(const char *pname, const char *sym, char *out, size_t size) { size_t i; for ( i = 0; i < size && pname[i]; i++ ) { if ( isalnum((int) pname[i]) ) out[i] = pname[i]; else out[i] = '_'; } snprintf(out + i, size - i, "_LTX_%s", sym); return out; } /* * Load a single plugin pointed to by 'filename'. */ static int plugin_load_single(prelude_list_t *head, const char *filename, const char *symbol, void *data, int (*subscribe)(prelude_plugin_instance_t *pc), void (*unsubscribe)(prelude_plugin_instance_t *pc)) { int ret; void *handle; const char *pname; prelude_plugin_entry_t *pe; char buf[1024]; prelude_bool_t buggy_libtool = FALSE; int (*plugin_version)(void); int (*plugin_init)(prelude_plugin_entry_t *pe, void *data); handle = lt_dlopenext(filename); if ( ! handle ) { prelude_log(PRELUDE_LOG_WARN, "%s: %s.\n", filename, lt_dlerror()); return -1; } pname = strrchr(filename, '/'); pname = (pname) ? pname + 1 : filename; plugin_version = lt_dlsym(handle, "prelude_plugin_version"); if ( ! plugin_version ) { buggy_libtool = TRUE; plugin_version = lt_dlsym(handle, libtool_is_buggy(pname, "prelude_plugin_version", buf, sizeof(buf))); } if ( ! plugin_version ) { prelude_log(PRELUDE_LOG_WARN, "%s: %s.\n", pname, lt_dlerror()); lt_dlclose(handle); return -1; } ret = plugin_version(); if ( ret != PRELUDE_PLUGIN_API_VERSION ) { prelude_log(PRELUDE_LOG_WARN, "%s: API version %d does not match plugin API version %d.\n", pname, ret, PRELUDE_PLUGIN_API_VERSION); lt_dlclose(handle); return -1; } plugin_init = lt_dlsym(handle, buggy_libtool ? libtool_is_buggy(pname, symbol, buf, sizeof(buf)) : symbol); if ( ! plugin_init ) { prelude_log(PRELUDE_LOG_WARN, "%s: plugin initialization failed: '%s'.\n", pname, lt_dlerror()); lt_dlclose(handle); return -1; } ret = add_plugin_entry(head, &pe); if ( ret < 0 ) { lt_dlclose(handle); return ret; } pe->handle = handle; pe->subscribe = subscribe; pe->unsubscribe = unsubscribe; ret = plugin_init(pe, data); if ( ret < 0 || ! pe->plugin ) { prelude_log(PRELUDE_LOG_WARN, "%s initialization failure.\n", filename); prelude_list_del(&pe->list); lt_dlclose(handle); free(pe); return -1; } return 0; } static int libltdl_load_cb(const char *filename, lt_ptr ptr) { int ret; libltdl_data_t *data = ptr; ret = plugin_load_single(data->head, filename, data->symbol, data->data, data->subscribe, data->unsubscribe); if ( ret == 0 ) data->count++; return 0; } /** * prelude_plugin_load_from_dir: * @head: List where the loaded plugin should be added. * @dirname: The directory to load the plugin from. * @symbol: Symbol to lookup within loaded plugin. * @ptr: Extra pointer to provide to the plugin initialization function. * @subscribe: Pointer to a callback function for plugin subscribtion. * @unsubscribe: Pointer to a callback function for plugin un-subscribtion. * * Load all plugins in directory 'dirname', using @symbol entry point. * Each plugin have a @subscribe and @unsubscribe callback associated with it. * * The plugins are loaded, but not active, until someone call prelude_plugin_subscribe() * on one of the plugin. Which'll call @subscribe in order to register it. * * @ptr is an extra argument provided to the plugin at initialization time. * * Returns: The number of loaded plugins on success, -1 on error. */ int prelude_plugin_load_from_dir(prelude_list_t *head, const char *dirname, const char *symbol, void *ptr, int (*subscribe)(prelude_plugin_instance_t *p), void (*unsubscribe)(prelude_plugin_instance_t *pc)) { int ret; libltdl_data_t data; if ( plugin_count == 0 && ltdl_need_init ) { ret = lt_dlinit(); if ( ret < 0 ) return prelude_error(PRELUDE_ERROR_PLUGIN_LTDL_INIT); ltdl_need_init = FALSE; } data.count = 0; data.data = ptr; data.symbol = symbol; data.subscribe = subscribe; data.unsubscribe = unsubscribe; data.head = head ? head : &all_plugins; lt_dlforeachfile(dirname, libltdl_load_cb, &data); plugin_count += data.count; return data.count; } int prelude_plugin_new_instance(prelude_plugin_instance_t **pi, prelude_plugin_generic_t *plugin, const char *name, void *data) { int ret = 0; prelude_plugin_entry_t *pe; prelude_option_context_t *octx; if ( ! name || ! *name ) name = DEFAULT_INSTANCE_NAME; pe = plugin->_pe; /* * might be NULL in case the plugin subscribe from the commit function. */ pe->plugin = plugin; *pi = search_instance_from_entry(pe, name); if ( ! *pi ) { ret = create_instance(pi, pe, name, data); if ( ret < 0 ) return ret; if ( pe->create_instance ) { ret = pe->create_instance(pe->root_opt, name, NULL, *pi); if ( ret < 0 ) return ret; } if ( pe->root_opt ) { ret = prelude_option_new_context(pe->root_opt, &octx, name, *pi); if ( ret < 0 ) { destroy_instance(*pi); return ret; } } if ( ! pe->commit_instance ) ret = prelude_plugin_instance_subscribe(*pi); } return ret; } int prelude_plugin_instance_subscribe(prelude_plugin_instance_t *pi) { int ret = 0; if ( pi->entry->subscribe ) ret = pi->entry->subscribe(pi); pi->already_subscribed = TRUE; return ret; } /** * prelude_plugin_instance_unsubscribe: * @pi: Pointer to a plugin instance. * * Set @pi to be inactive. * * The unsubscribe function specified in plugin_load_from_dir() * is called for plugin un-registration and the instance for this * plugin is freed. * * Returns: 0 on success, -1 if an error occured. */ int prelude_plugin_instance_unsubscribe(prelude_plugin_instance_t *pi) { int ret; if ( pi->entry->plugin->destroy ) { prelude_string_t *tmp; ret = prelude_string_new(&tmp); if ( ret < 0 ) return ret; pi->entry->plugin->destroy(pi, tmp); prelude_string_destroy(tmp); } if ( pi->already_subscribed && pi->entry->unsubscribe ) pi->entry->unsubscribe(pi); destroy_instance(pi); return 0; } int prelude_plugin_set_activation_option(prelude_plugin_entry_t *pe, prelude_option_t *opt, int (*commit)(prelude_plugin_instance_t *pi, prelude_string_t *out)) { pe->root_opt = opt; prelude_option_set_destroy_callback(opt, plugin_desactivate); prelude_option_set_type(opt, prelude_option_get_type(opt) | PRELUDE_OPTION_TYPE_CONTEXT); pe->create_instance = prelude_option_get_set_callback(opt); prelude_option_set_get_callback(opt, NULL); prelude_option_set_set_callback(opt, intercept_plugin_activation_option); _prelude_option_set_private_data(opt, pe); /* * if a commit function is provided, set it up. */ if ( commit ) { prelude_option_set_commit_callback(opt, intercept_plugin_commit_option); pe->commit_instance = commit; } return 0; } /** * prelude_plugin_instance_add: * @pi: Pointer to a plugin instance * @h: Pointer to a linked list * * This function add the plugin instance associated with @pi to the linked list * specified by @h. If this instance is already used somewhere else, a copy is * made, since instance does not share information). * * Returns: 0 on success or -1 if an error occured. */ int prelude_plugin_instance_add(prelude_plugin_instance_t *pi, prelude_list_t *h) { int ret; if ( pi->already_used++ ) { ret = copy_instance(&pi, pi); if ( ret < 0 ) return ret; } prelude_linked_object_add_tail(h, (prelude_linked_object_t *) pi); return 0; } /** * prelude_plugin_instance_del: * @pi: Pointer to a plugin instance. * * Delete @pi from the list specified at prelude_plugin_instance_add() time. */ void prelude_plugin_instance_del(prelude_plugin_instance_t *pi) { assert(pi->already_used); pi->already_used--; prelude_linked_object_del((prelude_linked_object_t *) pi); } /** * prelude_plugin_search_by_name: * @head: List where to search the plugin from. * @name: Name of the plugin to search. * * Search @head list of plugin for a plugin with name @name. * * Returns: the a #prelude_plugin_t on success, or NULL if the plugin does not exist. */ prelude_plugin_generic_t *prelude_plugin_search_by_name(prelude_list_t *head, const char *name) { prelude_plugin_entry_t *pe; pe = search_plugin_entry_by_name(head, name); if ( ! pe ) return NULL; return pe->plugin; } /** * prelude_plugin_instance_search_by_name: * @head: List where to search the plugin from. * @pname: Name of the plugin to search. * @iname: Name of the instance for this plugin. * * Search @head list of plugin for a plugin @pname with instance @iname. * * Returns: A #prelude_plugin_instance_t on success, or NULL if the instance does not exit. */ prelude_plugin_instance_t *prelude_plugin_search_instance_by_name(prelude_list_t *head, const char *pname, const char *iname) { prelude_plugin_entry_t *pe; if ( ! iname ) iname = DEFAULT_INSTANCE_NAME; pe = search_plugin_entry_by_name(head, pname); if ( ! pe ) return NULL; return search_instance_from_entry(pe, iname); } void prelude_plugin_instance_set_plugin_data(prelude_plugin_instance_t *pi, void *data) { pi->plugin_data = data; } void prelude_plugin_instance_set_data(prelude_plugin_instance_t *pi, void *data) { pi->data = data; } void *prelude_plugin_instance_get_data(prelude_plugin_instance_t *pi) { return pi->data; } void *prelude_plugin_instance_get_plugin_data(prelude_plugin_instance_t *pi) { return pi->plugin_data; } const char *prelude_plugin_instance_get_name(prelude_plugin_instance_t *pi) { return pi->name; } prelude_plugin_generic_t *prelude_plugin_instance_get_plugin(prelude_plugin_instance_t *pi) { return pi->entry->plugin; } void prelude_plugin_instance_compute_time(prelude_plugin_instance_t *pi, struct timeval *start, struct timeval *end) { pi->time += (double) end->tv_sec + (double) (end->tv_usec * 1e-6); pi->time -= (double) start->tv_sec + (double) (start->tv_usec * 1e-6); pi->count++; } int prelude_plugin_instance_call_commit_func(prelude_plugin_instance_t *pi, prelude_string_t *err) { return pi->entry->commit_instance(pi, err); } prelude_bool_t prelude_plugin_instance_has_commit_func(prelude_plugin_instance_t *pi) { return (pi->entry->commit_instance) ? TRUE : FALSE; } void prelude_plugin_entry_set_plugin(prelude_plugin_entry_t *pe, prelude_plugin_generic_t *pl) { pl->_pe = pe; pe->plugin = pl; } void prelude_plugin_set_preloaded_symbols(void *symlist) { unsigned long len; lt_dlsymlist *s = symlist; static lt_dlsymlist rpl_sym[65535] = { { "@PROGNAME@", NULL }, { NULL, NULL } }; if ( s[0].name == NULL || strcmp(s[0].name, "@PROGNAME@") != 0 ) { /* * Check size of the input symlist. */ for ( len = 0; s[len].name != NULL; len++ ); if ( len + 1 >= sizeof(rpl_sym) / sizeof(*rpl_sym) ) { prelude_log(PRELUDE_LOG_CRIT, "replacement symlist is not large enough (%lu entry).\n", len); len = (sizeof(rpl_sym) / sizeof(*rpl_sym)) - 2; } /* * Copy as many symbols as possible, and set the last entry to NULL. */ memcpy(&rpl_sym[1], s, len * sizeof(*rpl_sym)); rpl_sym[len + 1].name = NULL; s = rpl_sym; } lt_dlpreload_default(s); } prelude_plugin_generic_t *prelude_plugin_get_next(prelude_list_t *head, prelude_list_t **iter) { prelude_list_t *tmp; prelude_plugin_entry_t *pe; if ( ! head ) head = &all_plugins; prelude_list_for_each_continue_safe(head, tmp, *iter) { pe = prelude_list_entry(tmp, prelude_plugin_entry_t, list); return pe->plugin; } return NULL; } void prelude_plugin_unload(prelude_plugin_generic_t *plugin) { prelude_list_t *tmp, *bkp; prelude_plugin_entry_t *pe; prelude_plugin_instance_t *pi; prelude_list_for_each_safe(&plugin->_pe->instance_list, tmp, bkp) { pi = prelude_list_entry(tmp, prelude_plugin_instance_t, int_list); plugin_desactivate(NULL, NULL, pi); } pe = plugin->_pe; prelude_list_del(&pe->list); lt_dlclose(pe->handle); free(pe); if ( --plugin_count == 0 && ! ltdl_need_init ) { lt_dlexit(); ltdl_need_init = TRUE; } } libprelude-1.0.0/src/prelude.c0000664000076400007640000002224711325615276013204 00000000000000/***** * * Copyright (C) 2004,2005,2006,2007 PreludeIDS Technologies. All Rights Reserved. * Author: Yoann Vandoorselaere * * This file is part of the Prelude library. * * 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; see the file COPYING. If not, write to * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. * *****/ #include "config.h" #include "libmissing.h" #include #include #include #include #include #include "glthread/thread.h" #include "glthread/lock.h" #include "prelude.h" #include "idmef-path.h" #include "prelude-option.h" #include "prelude-log.h" #include "prelude-timer.h" #include "variable.h" #include "tls-auth.h" int _prelude_internal_argc = 0; char *_prelude_prefix = NULL; char *_prelude_internal_argv[1024]; char _prelude_init_cwd[PATH_MAX]; static int libprelude_refcount = 0; extern prelude_option_t *_prelude_generic_optlist; extern gl_lock_t _criteria_parse_mutex; static void tls_log_func(int level, const char *data) { prelude_log(PRELUDE_LOG_INFO, "%s", data); } static int gcry_prelude_mutex_init(void **retval) { int ret; gl_lock_t *lock; *retval = lock = malloc(sizeof(*lock)); if ( ! lock ) return ENOMEM; ret = glthread_lock_init(lock); if ( ret < 0 ) free(lock); return ret; } static int gcry_prelude_mutex_destroy(void **lock) { return glthread_lock_destroy(*lock); } static int gcry_prelude_mutex_lock(void **lock) { return glthread_lock_lock((gl_lock_t *) *lock); } static int gcry_prelude_mutex_unlock(void **lock) { return glthread_lock_unlock((gl_lock_t *) *lock); } static struct gcry_thread_cbs gcry_threads_prelude = { GCRY_THREAD_OPTION_USER, NULL, gcry_prelude_mutex_init, gcry_prelude_mutex_destroy, gcry_prelude_mutex_lock, gcry_prelude_mutex_unlock, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL }; static void slice_arguments(int *argc, char **argv) { int i; char *ptr; prelude_option_t *rootopt, *opt, *bkp = NULL; _prelude_client_register_options(); _prelude_internal_argc = 0; _prelude_internal_argv[0] = NULL; if ( ! argc || ! argv || *argc < 1 ) return; rootopt = _prelude_generic_optlist; _prelude_internal_argv[_prelude_internal_argc++] = argv[0]; for ( i = 0; i < *argc && (size_t) _prelude_internal_argc + 1 < sizeof(_prelude_internal_argv) / sizeof(char *); i++ ) { ptr = argv[i]; if ( *ptr != '-' ) continue; while ( *ptr == '-' ) ptr++; opt = prelude_option_search(rootopt, ptr, PRELUDE_OPTION_TYPE_CLI, FALSE); if ( ! opt ) { if ( bkp ) rootopt = bkp; continue; } if ( prelude_option_has_optlist(opt) ) { rootopt = opt; bkp = _prelude_generic_optlist; } _prelude_internal_argv[_prelude_internal_argc++] = argv[i]; if ( (i + 1) == *argc ) break; if ( prelude_option_get_has_arg(opt) == PRELUDE_OPTION_ARGUMENT_NONE ) continue; if ( *argv[i + 1] == '-' ) continue; _prelude_internal_argv[_prelude_internal_argc++] = argv[i + 1]; } } /** * prelude_init: * @argc: Address of the argc parameter of your main() function. * @argv: Address of the argv parameter of your main() function. * * Call this function before using any other Prelude functions in your applications. * It will initialize everything needed to operate the library and parses some standard * command line options. @argc and @argv are adjusted accordingly so your own code will * never see those standard arguments. * * Returns: 0 on success, a negative value if an error occured. */ int prelude_init(int *argc, char **argv) { int ret; const char *env; if ( libprelude_refcount++ > 0 ) return 0; env = getenv("LIBPRELUDE_DEBUG"); if ( env ) prelude_log_set_debug_level(atoi(env)); env = getenv("LIBPRELUDE_TLS_DEBUG"); if ( env ) { gnutls_global_set_log_level(atoi(env)); gnutls_global_set_log_function(tls_log_func); } env = getenv("LIBPRELUDE_LOGFILE"); if ( env ) prelude_log_set_logfile(env); env = getenv("LIBPRELUDE_PREFIX"); if ( env ) _prelude_prefix = strdup(env); env = getenv("LIBPRELUDE_ABORT"); if ( env ) { if ( *env ) _prelude_log_set_abort_level_from_string(env); else _prelude_log_set_abort_level(PRELUDE_LOG_CRIT); } prelude_thread_init(NULL); if ( ! getcwd(_prelude_init_cwd, sizeof(_prelude_init_cwd)) ) _prelude_init_cwd[0] = 0; ret = _prelude_timer_init(); if ( ret < 0 ) return ret; ret = glthread_atfork(prelude_fork_prepare, prelude_fork_parent, prelude_fork_child); if ( ret != 0 ) return prelude_error_from_errno(ret); slice_arguments(argc, argv); ret = gcry_control(GCRYCTL_SET_THREAD_CBS, &gcry_threads_prelude); if ( ret < 0 ) return prelude_error_verbose(PRELUDE_ERROR_TLS, "gcrypt initialization failed: %s", gcry_strerror(ret)); ret = gnutls_global_init(); if ( ret < 0 ) return prelude_error_verbose(PRELUDE_ERROR_TLS, "TLS initialization failed: %s", gnutls_strerror(ret)); return 0; } /** * prelude_deinit: * * Call this function if you're done using the library and want to free global * shared ressource allocated by libprelude. */ void prelude_deinit(void) { prelude_list_t *iter = NULL; prelude_plugin_generic_t *plugin; if ( --libprelude_refcount != 0 ) return; while ( (plugin = prelude_plugin_get_next(NULL, &iter)) ) prelude_plugin_unload(plugin); _idmef_path_cache_destroy(); prelude_option_destroy(NULL); variable_unset_all(); tls_auth_deinit(); gnutls_global_deinit(); _prelude_thread_deinit(); } /** * prelude_check_version: * @req_version: The minimum acceptable version number. * * If @req_version is NULL this function will return the version of the library. * Otherwise, @req_version will be compared to the current library version. If * the library version is higher or equal, this function will return the current * library version. Otherwise, NULL is returned. * * Returns: The current library version, or NULL if @req_version doesn't match. */ const char *prelude_check_version(const char *req_version) { int ret; int major, minor, micro, patch = 0; int rq_major, rq_minor, rq_micro, rq_patch = 0; if ( ! req_version ) return VERSION; ret = sscanf(VERSION, "%d.%d.%d.%d", &major, &minor, µ, &patch); if ( ret < 3 ) return NULL; ret = sscanf(req_version, "%d.%d.%d.%d", &rq_major, &rq_minor, &rq_micro, &rq_patch); if ( ret < 3 ) return NULL; if ( major > rq_major || (major == rq_major && minor > rq_minor) || (major == rq_major && minor == rq_minor && micro > rq_micro) || (major == rq_major && minor == rq_minor && micro == rq_micro && patch >= rq_patch) ) { return VERSION; } return NULL; } void prelude_fork_prepare(void) { #ifdef HAVE_PTHREAD_ATFORK return; #endif _prelude_async_fork_prepare(); _prelude_timer_fork_prepare(); _idmef_path_cache_lock(); gl_lock_lock(_criteria_parse_mutex); } void prelude_fork_parent(void) { #ifdef HAVE_PTHREAD_ATFORK return; #endif _prelude_async_fork_parent(); _prelude_timer_fork_parent(); _idmef_path_cache_unlock(); gl_lock_unlock(_criteria_parse_mutex); } void prelude_fork_child(void) { #ifdef HAVE_PTHREAD_ATFORK return; #endif _prelude_async_fork_child(); _prelude_timer_fork_child(); _idmef_path_cache_reinit(); gl_lock_init(_criteria_parse_mutex); } libprelude-1.0.0/src/prelude-client.c0000664000076400007640000016500511345707014014452 00000000000000/***** * * Copyright (C) 2004-2005,2006,2007 PreludeIDS Technologies. All Rights Reserved. * Author: Yoann Vandoorselaere * * This file is part of the Prelude library. * * 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; see the file COPYING. If not, write to * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. * *****/ #include "config.h" #include "libmissing.h" #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include "glthread/lock.h" #define PRELUDE_ERROR_SOURCE_DEFAULT PRELUDE_ERROR_SOURCE_CLIENT #include "prelude-error.h" #include "idmef.h" #include "common.h" #include "prelude-log.h" #include "prelude-ident.h" #include "prelude-async.h" #include "prelude-option.h" #include "prelude-connection-pool.h" #include "prelude-client.h" #include "prelude-timer.h" #include "prelude-message-id.h" #include "prelude-option-wide.h" #include "idmef-message-write.h" #include "idmef-additional-data.h" #include "config-engine.h" #include "tls-auth.h" #define CLIENT_STATUS_NEED_INIT 0 #define CLIENT_STATUS_INIT_DONE 1 #define CLIENT_STATUS_STARTING 2 #define CLIENT_STATUS_STARTING_STR "starting" #define CLIENT_STATUS_RUNNING 3 #define CLIENT_STATUS_RUNNING_STR "running" #define CLIENT_STATUS_EXITING 4 #define CLIENT_STATUS_EXITING_STR "exiting" /* * directory where analyzerID file are stored. */ #define IDENT_DIR PRELUDE_CONFIG_DIR "/analyzerid" /* * send an heartbeat every 600 seconds by default. */ #define DEFAULT_HEARTBEAT_INTERVAL 600 typedef struct { prelude_client_t *client; idmef_address_t *addr; idmef_address_t *idmef_addr; } node_address_data_t; struct prelude_client { int refcount; int flags; int status; prelude_connection_permission_t permission; /* * information about the user/group this analyzer is running as */ prelude_client_profile_t *profile; /* * name, analyzerid, and config file for this analyzer. */ char *sha1sum; char *config_filename; prelude_bool_t config_external; idmef_analyzer_t *analyzer; idmef_analyzer_t *_analyzer_copy; prelude_connection_pool_t *cpool; prelude_timer_t heartbeat_timer; prelude_msgbuf_t *msgbuf; gl_lock_t msgbuf_lock; prelude_ident_t *unique_ident; prelude_option_t *config_file_opt; void (*heartbeat_cb)(prelude_client_t *client, idmef_message_t *heartbeat); }; extern int _prelude_internal_argc; extern char *_prelude_internal_argv[1024]; extern int _prelude_connection_keepalive_time; extern int _prelude_connection_keepalive_probes; extern int _prelude_connection_keepalive_intvl; prelude_option_t *_prelude_generic_optlist = NULL; static int client_write_cb(prelude_msgbuf_t *msgbuf, prelude_msg_t *msg) { prelude_client_send_msg(prelude_msgbuf_get_data(msgbuf), msg); return 0; } static int generate_sha1sum(const char *filename, prelude_string_t *out) { int ret; size_t len, i; unsigned char digest[20], *data; ret = _prelude_load_file(filename, &data, &len); if ( ret < 0 ) return ret; gcry_md_hash_buffer(GCRY_MD_SHA1, digest, data, len); _prelude_unload_file(data, len); len = gcry_md_get_algo_dlen(GCRY_MD_SHA1); assert(len == sizeof(digest)); for ( i = 0; i < len; i++ ) { ret = prelude_string_sprintf(out, "%.2x", digest[i]); if ( ret < 0 ) return ret; } return 0; } static int add_hb_data(idmef_heartbeat_t *hb, prelude_string_t *meaning, const char *data) { int ret; idmef_additional_data_t *ad; ret = idmef_heartbeat_new_additional_data(hb, &ad, -1); if ( ret < 0 ) return ret; idmef_additional_data_set_meaning(ad, meaning); idmef_additional_data_set_string_ref(ad, data); return 0; } static const char *client_get_status(prelude_client_t *client) { if ( client->status == CLIENT_STATUS_RUNNING ) return CLIENT_STATUS_RUNNING_STR; else if ( client->status == CLIENT_STATUS_STARTING ) return CLIENT_STATUS_STARTING_STR; else if ( client->status == CLIENT_STATUS_EXITING ) return CLIENT_STATUS_EXITING_STR; abort(); } static void gen_heartbeat(prelude_client_t *client) { int ret; idmef_time_t *time; prelude_string_t *str; idmef_message_t *message; idmef_heartbeat_t *heartbeat; prelude_log_debug(2, "running heartbeat callback.\n"); ret = idmef_message_new(&message); if ( ret < 0 ) { prelude_perror(ret, "error creating new IDMEF message"); goto out; } ret = idmef_message_new_heartbeat(message, &heartbeat); if ( ret < 0 ) { prelude_perror(ret, "error creating new IDMEF heartbeat.\n"); goto out; } idmef_heartbeat_set_heartbeat_interval(heartbeat, prelude_timer_get_expire(&client->heartbeat_timer)); ret = prelude_string_new_constant(&str, "Analyzer status"); if ( ret < 0 ) goto out; add_hb_data(heartbeat, str, client_get_status(client)); if ( client->sha1sum ) { ret = prelude_string_new_constant(&str, "Analyzer SHA1"); if ( ret < 0 ) goto out; add_hb_data(heartbeat, str, client->sha1sum); } ret = idmef_time_new_from_gettimeofday(&time); if ( ret < 0 ) goto out; idmef_heartbeat_set_create_time(heartbeat, time); idmef_heartbeat_set_analyzer(heartbeat, idmef_analyzer_ref(client->_analyzer_copy), IDMEF_LIST_PREPEND); if ( client->heartbeat_cb ) { client->heartbeat_cb(client, message); goto out; } prelude_client_send_idmef(client, message); out: idmef_message_destroy(message); } static void heartbeat_expire_cb(void *data) { prelude_client_t *client = data; gen_heartbeat(client); if ( client->status != CLIENT_STATUS_EXITING ) prelude_timer_reset(&client->heartbeat_timer); } static void setup_heartbeat_timer(prelude_client_t *client, int expire) { prelude_timer_set_data(&client->heartbeat_timer, client); prelude_timer_set_expire(&client->heartbeat_timer, expire); prelude_timer_set_callback(&client->heartbeat_timer, heartbeat_expire_cb); } #ifdef HAVE_IPV6 static prelude_bool_t is_loopback_ipv6(struct in6_addr *addr) { struct in6_addr lo; inet_pton(AF_INET6, "::1", &lo); return (memcmp(addr, &lo, sizeof(lo)) == 0) ? TRUE : FALSE; } #endif static prelude_bool_t is_loopback_ipv4(struct in_addr *addr) { return (ntohl(addr->s_addr) >> 24) == 127 ? TRUE : FALSE; } static prelude_bool_t is_loopback(int family, void *addr) { if ( family == AF_INET ) return is_loopback_ipv4(addr); #ifdef HAVE_IPV6 else if ( family == AF_INET6 ) return is_loopback_ipv6(addr); #endif else return FALSE; } static int set_analyzer_host_info(idmef_analyzer_t *analyzer, const char *node_str, const char *addr_str) { int ret; idmef_node_t *node; idmef_address_t *addr; prelude_string_t *str; if ( ! node_str && ! addr_str ) return 0; ret = idmef_analyzer_new_node(analyzer, &node); if ( ret < 0 ) return ret; ret = idmef_node_new_name(node, &str); if ( ret < 0 ) return ret; if ( node_str && prelude_string_is_empty(str) ) prelude_string_set_dup(str, node_str); if ( addr_str ) { if ( ! (addr = idmef_node_get_next_address(node, NULL)) ) { ret = idmef_node_new_address(node, &addr, 0); if ( ret < 0 ) return ret; } ret = idmef_address_new_address(addr, &str); if ( ret < 0 ) return ret; if ( prelude_string_is_empty(str) ) prelude_string_set_dup(str, addr_str); } return 0; } static int get_fqdn(idmef_analyzer_t *analyzer, const char *nodename) { int ret; void *in_addr; char addr[256], *addrp = NULL; struct addrinfo hints, *ai, *ais; prelude_log_debug(1, "Detected nodename: '%s'.\n", nodename); memset(&hints, 0, sizeof(hints)); hints.ai_flags = AI_CANONNAME; ret = getaddrinfo(nodename, NULL, &hints, &ai); if ( ret < 0 ) return ret; if ( ai->ai_canonname ) { nodename = ai->ai_canonname; prelude_log_debug(1, "Found canonical name: '%s'.\n", nodename); } for ( ais = ai; ai != NULL; ai = ai->ai_next ) { in_addr = prelude_sockaddr_get_inaddr(ai->ai_addr); if ( ! in_addr ) continue; if ( ! inet_ntop(ai->ai_family, in_addr, addr, sizeof(addr)) ) continue; if ( is_loopback(ai->ai_family, in_addr) ) prelude_log_debug(1, "Ignoring loopback address: '%s'.\n", addr); else { prelude_log_debug(1, "Found address: '%s'.\n", addr); addrp = addr; break; } } ret = set_analyzer_host_info(analyzer, nodename, addrp); freeaddrinfo(ais); return ret; } static int get_sys_info(idmef_analyzer_t *analyzer) { int ret; struct utsname uts; prelude_string_t *str; if ( uname(&uts) < 0 ) return prelude_error_from_errno(errno); get_fqdn(analyzer, uts.nodename); ret = prelude_string_new_dup(&str, uts.sysname); if ( ret < 0 ) return ret; idmef_analyzer_set_ostype(analyzer, str); ret = prelude_string_new_dup(&str, uts.release); if ( ret < 0 ) return ret; idmef_analyzer_set_osversion(analyzer, str); return 0; } static int fill_client_infos(prelude_client_t *client, const char *program) { int ret; prelude_string_t *str, *sha1; idmef_process_t *process; char buf[PATH_MAX], *name, *path; snprintf(buf, sizeof(buf), "%" PRELUDE_PRIu64, prelude_client_profile_get_analyzerid(client->profile)); ret = prelude_string_new_dup(&str, buf); if ( ret < 0 ) return ret; idmef_analyzer_set_analyzerid(client->analyzer, str); ret = get_sys_info(client->analyzer); if ( ret < 0 ) return ret; ret = idmef_analyzer_new_process(client->analyzer, &process); if ( ret < 0 ) return ret; idmef_process_set_pid(process, getpid()); if ( ! program || ! *program ) return 0; name = path = NULL; _prelude_get_file_name_and_path(program, &name, &path); if ( name ) { ret = prelude_string_new_nodup(&str, name); if ( ret < 0 ) return ret; idmef_process_set_name(process, str); } if ( path && name ) { ret = idmef_process_new_path(process, &str); if ( ret < 0 ) return ret; ret = prelude_string_sprintf(str, "%s/%s", path, name); if ( ret < 0 ) return ret; ret = prelude_string_new(&sha1); if ( ret < 0 ) return ret; ret = generate_sha1sum(prelude_string_get_string(str), sha1); if ( ret < 0 ) return ret; ret = prelude_string_get_string_released(sha1, &client->sha1sum); prelude_string_destroy(sha1); } if ( path ) free(path); /* copied above */ return ret; } static int set_node_address_category(prelude_option_t *opt, const char *optarg, prelude_string_t *err, void *context) { idmef_address_category_t category; node_address_data_t *data = context; category = idmef_address_category_to_numeric(optarg); if ( category < 0 ) return category; idmef_address_set_category(data->addr, category); return 0; } static int get_node_address_category(prelude_option_t *opt, prelude_string_t *out, void *context) { node_address_data_t *data = context; idmef_address_category_t category = idmef_address_get_category(data->addr); return prelude_string_cat(out, idmef_address_category_to_string(category)); } static int set_node_address_vlan_num(prelude_option_t *opt, const char *optarg, prelude_string_t *err, void *context) { node_address_data_t *data = context; if ( ! optarg ) idmef_address_unset_vlan_num(data->addr); else idmef_address_set_vlan_num(data->addr, atoi(optarg)); return 0; } static int get_node_address_vlan_num(prelude_option_t *opt, prelude_string_t *out, void *context) { int32_t *num; node_address_data_t *data = context; num = idmef_address_get_vlan_num(data->addr); if ( num ) return prelude_string_sprintf(out, "%" PRELUDE_PRId32, *num); return 0; } static int set_node_address_vlan_name(prelude_option_t *opt, const char *optarg, prelude_string_t *err, void *context) { int ret; prelude_string_t *str = NULL; node_address_data_t *data = context; if ( optarg ) { ret = prelude_string_new_dup(&str, optarg); if ( ret < 0 ) return ret; } idmef_address_set_vlan_name(data->addr, str); return 0; } static int get_node_address_vlan_name(prelude_option_t *opt, prelude_string_t *out, void *context) { prelude_string_t *str; node_address_data_t *data = context; str = idmef_address_get_vlan_name(data->addr); if ( ! str ) return 0; return prelude_string_copy_ref(str, out); } static int set_node_address_address(prelude_option_t *opt, const char *optarg, prelude_string_t *err, void *context) { int ret; prelude_string_t *str = NULL; node_address_data_t *data = context; if ( optarg ) { ret = prelude_string_new_dup(&str, optarg); if ( ret < 0 ) return ret; } idmef_address_set_address(data->addr, str); return 0; } static int get_node_address_address(prelude_option_t *opt, prelude_string_t *out, void *context) { prelude_string_t *str; node_address_data_t *data = context; str = idmef_address_get_address(data->addr); if ( ! str ) return 0; return prelude_string_copy_ref(str, out); } static int set_node_address_netmask(prelude_option_t *opt, const char *optarg, prelude_string_t *err, void *context) { int ret; prelude_string_t *str = NULL; node_address_data_t *data = context; if ( optarg ) { ret = prelude_string_new_dup(&str, optarg); if ( ret < 0 ) return ret; } idmef_address_set_netmask(data->addr, str); return 0; } static int get_node_address_netmask(prelude_option_t *opt, prelude_string_t *out, void *context) { prelude_string_t *str; node_address_data_t *data = context; str = idmef_address_get_netmask(data->addr); if ( ! str ) return 0; return prelude_string_copy_ref(str, out); } static int set_node_address(prelude_option_t *opt, const char *optarg, prelude_string_t *err, void *context) { int ret; node_address_data_t *data; prelude_option_context_t *octx; prelude_client_t *ptr = context; octx = prelude_option_search_context(opt, optarg); if ( octx ) return 0; data = malloc(sizeof(*data)); if ( ! data ) return prelude_error_from_errno(errno); data->client = ptr; data->idmef_addr = NULL; ret = idmef_address_new(&data->addr); if ( ret < 0 ) { free(data); return ret; } ret = prelude_option_new_context(opt, &octx, optarg, data); if ( ret < 0 ) { idmef_address_destroy(data->addr); free(data); } return ret; } static int commit_node_address(prelude_option_t *opt, prelude_string_t *out, void *context) { int ret; idmef_node_t *node; idmef_analyzer_t *analyzer; idmef_address_t *addr = NULL, *naddr; node_address_data_t *data = context; ret = idmef_analyzer_new_node(data->client->analyzer, &node); if ( ret < 0 ) return ret; if ( node && data->idmef_addr ) { while ( (addr = idmef_node_get_next_address(node, addr)) ) { if ( addr == data->idmef_addr ) { idmef_address_destroy(addr); break; } } } ret = idmef_address_clone(data->addr, &naddr); if ( ret < 0 ) return ret; data->idmef_addr = naddr; idmef_node_set_address(node, naddr, -1); if ( data->client->_analyzer_copy ) { ret = idmef_analyzer_clone(data->client->analyzer, &analyzer); if ( ret < 0 ) return ret; idmef_analyzer_destroy(data->client->_analyzer_copy); data->client->_analyzer_copy = analyzer; } return 0; } static int destroy_node_address(prelude_option_t *opt, prelude_string_t *out, void *context) { int ret; idmef_node_t *node; idmef_analyzer_t *analyzer; idmef_address_t *addr = NULL; node_address_data_t *data = context; node = idmef_analyzer_get_node(data->client->analyzer); if ( node ) { while ( (addr = idmef_node_get_next_address(node, addr)) ) { if ( addr == data->idmef_addr ) { idmef_address_destroy(addr); break; } } } if ( data->client->_analyzer_copy ) { ret = idmef_analyzer_clone(data->client->analyzer, &analyzer); if ( ret == 0 ) { idmef_analyzer_destroy(data->client->_analyzer_copy); data->client->_analyzer_copy = analyzer; } } idmef_address_destroy(data->addr); free(data); return 0; } static int set_node_category(prelude_option_t *opt, const char *optarg, prelude_string_t *err, void *context) { int ret; idmef_node_t *node; idmef_node_category_t category; prelude_client_t *ptr = context; category = idmef_node_category_to_numeric(optarg); if ( category < 0 ) return category; ret = idmef_analyzer_new_node(ptr->analyzer, &node); if ( ret < 0 ) return -1; idmef_node_set_category(node, category); return 0; } static int get_node_category(prelude_option_t *opt, prelude_string_t *out, void *context) { const char *category; prelude_client_t *client = context; idmef_node_t *node = idmef_analyzer_get_node(client->analyzer); if ( ! node ) return 0; category = idmef_node_category_to_string(idmef_node_get_category(node)); if ( ! category ) return -1; return prelude_string_cat(out, category); } static int set_node_location(prelude_option_t *opt, const char *optarg, prelude_string_t *err, void *context) { int ret; idmef_node_t *node; prelude_string_t *str = NULL; prelude_client_t *ptr = context; ret = idmef_analyzer_new_node(ptr->analyzer, &node); if ( ret < 0 ) return ret; if ( optarg ) { ret = prelude_string_new_dup(&str, optarg); if ( ret < 0 ) return ret; } idmef_node_set_location(node, str); return 0; } static int get_node_location(prelude_option_t *opt, prelude_string_t *out, void *context) { prelude_string_t *str; prelude_client_t *client = context; idmef_node_t *node = idmef_analyzer_get_node(client->analyzer); if ( ! node ) return 0; str = idmef_node_get_location(node); if ( ! str ) return 0; return prelude_string_copy_ref(str, out); } static int set_node_name(prelude_option_t *opt, const char *optarg, prelude_string_t *err, void *context) { int ret; idmef_node_t *node; prelude_string_t *str = NULL; prelude_client_t *ptr = context; ret = idmef_analyzer_new_node(ptr->analyzer, &node); if ( ret < 0 ) return ret; if ( optarg ) { ret = prelude_string_new_dup(&str, optarg); if ( ret < 0 ) return ret; } idmef_node_set_name(node, str); return 0; } static int get_node_name(prelude_option_t *opt, prelude_string_t *out, void *context) { prelude_string_t *str; prelude_client_t *client = context; idmef_node_t *node = idmef_analyzer_get_node(client->analyzer); if ( ! node ) return 0; str = idmef_node_get_name(node); if ( ! str ) return 0; return prelude_string_copy_ref(str, out); } static int get_analyzer_name(prelude_option_t *opt, prelude_string_t *out, void *context) { prelude_string_t *str; prelude_client_t *client = context; str = idmef_analyzer_get_name(client->analyzer); if ( ! str ) return 0; return prelude_string_copy_ref(str, out); } static int set_analyzer_name(prelude_option_t *opt, const char *optarg, prelude_string_t *err, void *context) { int ret; prelude_string_t *str = NULL; prelude_client_t *ptr = context; if ( optarg ) { ret = prelude_string_new_dup(&str, optarg); if ( ret < 0 ) return ret; } idmef_analyzer_set_name(ptr->analyzer, str); return 0; } static int get_manager_addr(prelude_option_t *opt, prelude_string_t *out, void *context) { prelude_client_t *ptr = context; if ( ! ptr->cpool || ! prelude_connection_pool_get_connection_string(ptr->cpool) ) return 0; return prelude_string_cat(out, prelude_connection_pool_get_connection_string(ptr->cpool)); } static int connection_pool_event_cb(prelude_connection_pool_t *pool, prelude_connection_pool_event_t event, prelude_connection_t *conn) { int ret; prelude_client_t *client; prelude_msgbuf_t *msgbuf; prelude_msg_t *msg = NULL; if ( event != PRELUDE_CONNECTION_POOL_EVENT_INPUT ) return 0; do { ret = prelude_connection_recv(conn, &msg); } while ( ret < 0 && prelude_error_get_code(ret) == PRELUDE_ERROR_EAGAIN ); if ( ret < 0 ) return ret; client = prelude_connection_pool_get_data(pool); ret = prelude_connection_new_msgbuf(conn, &msgbuf); if ( ret < 0 ) return ret; ret = prelude_client_handle_msg_default(client, msg, msgbuf); prelude_msg_destroy(msg); prelude_msgbuf_destroy(msgbuf); return ret; } static int set_manager_addr(prelude_option_t *opt, const char *optarg, prelude_string_t *err, void *context) { prelude_client_t *client = context; return prelude_connection_pool_set_connection_string(client->cpool, optarg); } static int set_tcp_keepalive_time(prelude_option_t *opt, const char *optarg, prelude_string_t *err, void *context) { _prelude_connection_keepalive_time = atoi(optarg); return 0; } static int set_tcp_keepalive_probes(prelude_option_t *opt, const char *optarg, prelude_string_t *err, void *context) { _prelude_connection_keepalive_probes = atoi(optarg); return 0; } static int set_tcp_keepalive_intvl(prelude_option_t *opt, const char *optarg, prelude_string_t *err, void *context) { _prelude_connection_keepalive_intvl = atoi(optarg); return 0; } static int set_tls_options(prelude_option_t *opt, const char *optarg, prelude_string_t *err, void *context) { return tls_auth_init_priority(optarg); } static int set_heartbeat_interval(prelude_option_t *opt, const char *optarg, prelude_string_t *err, void *context) { prelude_client_t *ptr = context; setup_heartbeat_timer(ptr, atoi(optarg)); if ( ptr->status == CLIENT_STATUS_RUNNING ) prelude_timer_reset(&ptr->heartbeat_timer); return 0; } static int get_heartbeat_interval(prelude_option_t *opt, prelude_string_t *out, void *context) { prelude_client_t *ptr = context; return prelude_string_sprintf(out, "%u", ptr->heartbeat_timer.expire); } static int set_profile(prelude_option_t *opt, const char *optarg, prelude_string_t *err, void *context) { int ret; char buf[PATH_MAX]; prelude_client_t *client = context; ret = prelude_client_profile_set_name(client->profile, optarg); if ( ret < 0 ) return ret; if ( client->config_external == TRUE ) return 0; prelude_client_profile_get_config_filename(client->profile, buf, sizeof(buf)); prelude_client_set_config_filename(client, buf); client->config_external = FALSE; return 0; } static void _prelude_client_destroy(prelude_client_t *client) { if ( client->profile ) prelude_client_profile_destroy(client->profile); if ( client->sha1sum ) free(client->sha1sum); if ( client->msgbuf ) prelude_msgbuf_destroy(client->msgbuf); if ( client->analyzer ) idmef_analyzer_destroy(client->analyzer); if ( client->_analyzer_copy ) idmef_analyzer_destroy(client->_analyzer_copy); if ( client->config_filename ) free(client->config_filename); if ( client->cpool ) prelude_connection_pool_destroy(client->cpool); if ( client->unique_ident ) prelude_ident_destroy(client->unique_ident); free(client); } static int handle_client_error(prelude_client_t *client, int error) { char *tmp = NULL; prelude_error_code_t code; prelude_error_source_t source; code = prelude_error_get_code(error); source = prelude_error_get_source(error); if ( error < 0 && (code == PRELUDE_ERROR_PROFILE || source == PRELUDE_ERROR_SOURCE_CONFIG_ENGINE) ) { if ( _prelude_thread_get_error() ) tmp = strdup(_prelude_thread_get_error()); error = prelude_error_verbose(PRELUDE_ERROR_PROFILE, "%s%s%s", tmp ? tmp : "", tmp ? "\n" : "", prelude_client_get_setup_error(client)); free(tmp); } return error; } int _prelude_client_register_options(void) { int ret; prelude_option_t *opt; prelude_option_t *root_list; prelude_option_new_root(&_prelude_generic_optlist); ret = prelude_option_add(_prelude_generic_optlist, &root_list, PRELUDE_OPTION_TYPE_CLI|PRELUDE_OPTION_TYPE_CFG|PRELUDE_OPTION_TYPE_WIDE, 0, "prelude", "Prelude generic options", PRELUDE_OPTION_ARGUMENT_NONE, NULL, NULL); if ( ret < 0 ) return ret; ret = prelude_option_add(root_list, &opt, PRELUDE_OPTION_TYPE_CLI, 0, "profile", "Profile to use for this analyzer", PRELUDE_OPTION_ARGUMENT_REQUIRED, set_profile, NULL); if ( ret < 0 ) return ret; prelude_option_set_priority(opt, PRELUDE_OPTION_PRIORITY_IMMEDIATE); ret = prelude_option_add(root_list, NULL, PRELUDE_OPTION_TYPE_CLI|PRELUDE_OPTION_TYPE_CFG |PRELUDE_OPTION_TYPE_WIDE, 0, "heartbeat-interval", "Number of seconds between two heartbeat", PRELUDE_OPTION_ARGUMENT_REQUIRED, set_heartbeat_interval, get_heartbeat_interval); if ( ret < 0 ) return ret; ret = prelude_option_add(root_list, &opt, PRELUDE_OPTION_TYPE_CLI|PRELUDE_OPTION_TYPE_CFG |PRELUDE_OPTION_TYPE_WIDE, 0, "server-addr", "Address where this agent should report events to (addr:port)", PRELUDE_OPTION_ARGUMENT_REQUIRED, set_manager_addr, get_manager_addr); if ( ret < 0 ) return ret; prelude_option_set_priority(opt, PRELUDE_OPTION_PRIORITY_LAST); ret = prelude_option_add(root_list, &opt, PRELUDE_OPTION_TYPE_CFG|PRELUDE_OPTION_TYPE_CLI, 0, "tls-options", "TLS ciphers, key exchange methods, protocols, macs, and compression options", PRELUDE_OPTION_ARGUMENT_REQUIRED, set_tls_options, NULL); if ( ret < 0 ) return ret; ret = prelude_option_add(root_list, NULL, PRELUDE_OPTION_TYPE_CFG, 0, "tcp-keepalive-time", "Interval between the last data packet sent and the first keepalive probe", PRELUDE_OPTION_ARGUMENT_REQUIRED, set_tcp_keepalive_time, NULL); if ( ret < 0 ) return ret; ret = prelude_option_add(root_list, NULL, PRELUDE_OPTION_TYPE_CFG, 0, "tcp-keepalive-probes", "Number of not acknowledged probes to send before considering the connection dead", PRELUDE_OPTION_ARGUMENT_REQUIRED, set_tcp_keepalive_probes, NULL); if ( ret < 0 ) return ret; ret = prelude_option_add(root_list, NULL, PRELUDE_OPTION_TYPE_CFG, 0, "tcp-keepalive-intvl", "Interval between subsequential keepalive probes", PRELUDE_OPTION_ARGUMENT_REQUIRED, set_tcp_keepalive_intvl, NULL); if ( ret < 0 ) return ret; ret = prelude_option_add(root_list, NULL, PRELUDE_OPTION_TYPE_CLI|PRELUDE_OPTION_TYPE_CFG| PRELUDE_OPTION_TYPE_WIDE, 0, "analyzer-name", "Name for this analyzer", PRELUDE_OPTION_ARGUMENT_OPTIONAL, set_analyzer_name, get_analyzer_name); if ( ret < 0 ) return ret; ret = prelude_option_add(root_list, NULL, PRELUDE_OPTION_TYPE_CFG|PRELUDE_OPTION_TYPE_WIDE, 0, "node-name", "Name of the equipment", PRELUDE_OPTION_ARGUMENT_OPTIONAL, set_node_name, get_node_name); if ( ret < 0 ) return ret; ret = prelude_option_add(root_list, NULL, PRELUDE_OPTION_TYPE_CFG|PRELUDE_OPTION_TYPE_WIDE, 0, "node-location", "Location of the equipment", PRELUDE_OPTION_ARGUMENT_OPTIONAL, set_node_location, get_node_location); if ( ret < 0 ) return ret; ret = prelude_option_add(root_list, NULL, PRELUDE_OPTION_TYPE_CFG|PRELUDE_OPTION_TYPE_WIDE, 0, "node-category", NULL, PRELUDE_OPTION_ARGUMENT_REQUIRED, set_node_category, get_node_category); if ( ret < 0 ) return ret; ret = prelude_option_add(root_list, &opt, PRELUDE_OPTION_TYPE_CFG|PRELUDE_OPTION_TYPE_WIDE |PRELUDE_OPTION_TYPE_CONTEXT, 0, "node-address", "Network or hardware address of the equipment", PRELUDE_OPTION_ARGUMENT_OPTIONAL, set_node_address, NULL); if ( ret < 0 ) return ret; prelude_option_set_commit_callback(opt, commit_node_address); prelude_option_set_destroy_callback(opt, destroy_node_address); ret = prelude_option_add(opt, NULL, PRELUDE_OPTION_TYPE_CFG|PRELUDE_OPTION_TYPE_WIDE, 0, "address", "Address information", PRELUDE_OPTION_ARGUMENT_OPTIONAL, set_node_address_address, get_node_address_address); if ( ret < 0 ) return ret; ret = prelude_option_add(opt, NULL, PRELUDE_OPTION_TYPE_CFG|PRELUDE_OPTION_TYPE_WIDE, 0, "netmask", "Network mask for the address, if appropriate", PRELUDE_OPTION_ARGUMENT_OPTIONAL, set_node_address_netmask, get_node_address_netmask); if ( ret < 0 ) return ret; ret = prelude_option_add(opt, NULL, PRELUDE_OPTION_TYPE_CFG|PRELUDE_OPTION_TYPE_WIDE, 0, "category", "Type of address represented", PRELUDE_OPTION_ARGUMENT_REQUIRED, set_node_address_category, get_node_address_category); if ( ret < 0 ) return ret; ret = prelude_option_add(opt, NULL, PRELUDE_OPTION_TYPE_CFG|PRELUDE_OPTION_TYPE_WIDE, 0, "vlan-name", "Name of the Virtual LAN to which the address belongs", PRELUDE_OPTION_ARGUMENT_OPTIONAL, set_node_address_vlan_name, get_node_address_vlan_name); if ( ret < 0 ) return ret; ret = prelude_option_add(opt, NULL, PRELUDE_OPTION_TYPE_CFG|PRELUDE_OPTION_TYPE_WIDE, 0, "vlan-num", "Number of the Virtual LAN to which the address belongs", PRELUDE_OPTION_ARGUMENT_OPTIONAL, set_node_address_vlan_num, get_node_address_vlan_num); if ( ret < 0 ) return ret; return 0; } /** * prelude_client_new: * @client: Pointer to a client object to initialize. * @profile: Default profile name for this analyzer. * * This function initialize the @client object. * * Returns: 0 on success or a negative value if an error occur. */ int prelude_client_new(prelude_client_t **client, const char *profile) { int ret; prelude_client_t *new; prelude_return_val_if_fail(profile, prelude_error(PRELUDE_ERROR_ASSERTION)); new = calloc(1, sizeof(*new)); if ( ! new ) return prelude_error_from_errno(errno); gl_lock_init(new->msgbuf_lock); prelude_timer_init_list(&new->heartbeat_timer); new->refcount = 1; new->flags = PRELUDE_CLIENT_FLAGS_HEARTBEAT|PRELUDE_CLIENT_FLAGS_CONNECT|PRELUDE_CLIENT_FLAGS_AUTOCONFIG; new->permission = PRELUDE_CONNECTION_PERMISSION_IDMEF_WRITE; ret = idmef_analyzer_new(&new->analyzer); if ( ret < 0 ) { _prelude_client_destroy(new); return ret; } set_analyzer_name(NULL, profile, NULL, new); ret = _prelude_client_profile_new(&new->profile); if ( ret < 0 ) { _prelude_client_destroy(new); return ret; } set_profile(NULL, profile, NULL, new); ret = prelude_ident_new(&new->unique_ident); if ( ret < 0 ) { _prelude_client_destroy(new); return ret; } ret = prelude_connection_pool_new(&new->cpool, new->profile, new->permission); if ( ret < 0 ) return ret; prelude_connection_pool_set_data(new->cpool, new); prelude_connection_pool_set_flags(new->cpool, prelude_connection_pool_get_flags(new->cpool) | PRELUDE_CONNECTION_POOL_FLAGS_RECONNECT | PRELUDE_CONNECTION_POOL_FLAGS_FAILOVER); prelude_connection_pool_set_event_handler(new->cpool, PRELUDE_CONNECTION_POOL_EVENT_INPUT, connection_pool_event_cb); setup_heartbeat_timer(new, DEFAULT_HEARTBEAT_INTERVAL); ret = prelude_client_new_msgbuf(new, &new->msgbuf); if ( ret < 0 ) { _prelude_client_destroy(new); return ret; } *client = new; return 0; } prelude_client_t *prelude_client_ref(prelude_client_t *client) { prelude_return_val_if_fail(client, NULL); client->refcount++; return client; } /** * prelude_client_init: * @client: Pointer to a #prelude_client_t object to initialize. * * This function initialize the @client object, meaning reading generic * options from the prelude_client_new() provided configuration file * and the array of arguments specified through prelude_init(). * * Calling this function is optional and should be done only if you need more * granularity between prelude_client_new() and prelude_client_start(): * * prelude_client_start() will call prelude_client_init() for you if needed. * * Returns: 0 on success, -1 if an error occured. */ int prelude_client_init(prelude_client_t *client) { int ret; prelude_string_t *err; prelude_option_warning_t old_warnings; /* * Calling two time init() would result in error in * fill_client_infos(), due to idmef_analyzer_t object reuse. */ if ( client->status != CLIENT_STATUS_NEED_INIT ) return 0; prelude_return_val_if_fail(client, prelude_error(PRELUDE_ERROR_ASSERTION)); prelude_option_set_warnings(0, &old_warnings); ret = prelude_option_read(_prelude_generic_optlist, (const char **)&client->config_filename, &_prelude_internal_argc, _prelude_internal_argv, &err, client); prelude_option_set_warnings(old_warnings, NULL); if ( ret < 0 ) return handle_client_error(client, ret); ret = _prelude_client_profile_init(client->profile); if ( ret < 0 ) return handle_client_error(client, ret); ret = fill_client_infos(client, _prelude_internal_argv[0]); if ( ret < 0 ) return handle_client_error(client, ret); client->status = CLIENT_STATUS_INIT_DONE; return 0; } /** * prelude_client_start: * @client: Pointer to a client object to initialize. * * This function start the @client object, triggering * a connection from the client to it's server if any were * specified, and sending the initial @client heartbeat. * * If @client was not initialized, then prelude_client_init() * will be called and thus this function might fail if the * client was not registered. * * Returns: 0 on success, -1 if an error occured. */ int prelude_client_start(prelude_client_t *client) { int ret; void *credentials; prelude_return_val_if_fail(client, prelude_error(PRELUDE_ERROR_ASSERTION)); if ( client->status == CLIENT_STATUS_NEED_INIT ) { /* * if prelude_client_init() was not called */ ret = prelude_client_init(client); if ( ret < 0 ) return ret; } if ( client->flags & PRELUDE_CLIENT_FLAGS_CONNECT ) { if ( ! client->cpool ) return prelude_error(PRELUDE_ERROR_CONNECTION_STRING); ret = prelude_client_profile_get_credentials(client->profile, &credentials); if ( ret < 0 ) return handle_client_error(client, ret); ret = prelude_connection_pool_init(client->cpool); if ( ret < 0 ) return handle_client_error(client, ret); } if ( (client->cpool || client->heartbeat_cb) && client->flags & PRELUDE_CLIENT_FLAGS_HEARTBEAT ) { client->status = CLIENT_STATUS_STARTING; client->_analyzer_copy = client->analyzer; gen_heartbeat(client); /* * We use a copy of the analyzer object from the timer, * since it might be run asynchronously. */ ret = idmef_analyzer_clone(client->analyzer, &client->_analyzer_copy); if ( ret < 0 ) return ret; client->status = CLIENT_STATUS_RUNNING; prelude_timer_init(&client->heartbeat_timer); } return 0; } /** * prelude_client_get_analyzer: * @client: Pointer to a #prelude_client_t object. * * Provide access to the #idmef_analyzer_t object associated to @client. * This analyzer object is sent along with every alerts and heartbeats emited * by this client. The analyzer object is created by prelude_client_init(). * * Returns: the #idmef_analyzer_t object associated with @client. */ idmef_analyzer_t *prelude_client_get_analyzer(prelude_client_t *client) { prelude_return_val_if_fail(client, NULL); return client->analyzer; } /** * prelude_client_send_msg: * @client: Pointer to a #prelude_client_t object. * @msg: pointer to a message that @client should send. * * Send @msg to the peers @client is communicating with. * * The message will be sent asynchronously if @PRELUDE_CLIENT_FLAGS_ASYNC_SEND * was set using prelude_client_set_flags() in which case the caller should * not call prelude_msg_destroy() on @msg. */ void prelude_client_send_msg(prelude_client_t *client, prelude_msg_t *msg) { prelude_return_if_fail(client); prelude_return_if_fail(msg); if ( client->flags & PRELUDE_CLIENT_FLAGS_ASYNC_SEND ) prelude_connection_pool_broadcast_async(client->cpool, msg); else prelude_connection_pool_broadcast(client->cpool, msg); } /** * prelude_client_send_idmef: * @client: Pointer to a #prelude_client_t object. * @msg: pointer to an IDMEF message to be sent to @client peers. * * Send @msg to the peers @client is communicating with. * * The message will be sent asynchronously if @PRELUDE_CLIENT_FLAGS_ASYNC_SEND * was set using prelude_client_set_flags(). */ void prelude_client_send_idmef(prelude_client_t *client, idmef_message_t *msg) { prelude_return_if_fail(client); prelude_return_if_fail(msg); /* * we need to hold a lock since asynchronous heartbeat * could write the message buffer at the same time we do. */ gl_lock_lock(client->msgbuf_lock); _idmef_message_assign_missing(client, msg); idmef_message_write(msg, client->msgbuf); prelude_msgbuf_mark_end(client->msgbuf); gl_lock_unlock(client->msgbuf_lock); } /** * prelude_client_recv_msg: * @client: Pointer to a #prelude_client_t object. * @timeout: Number of millisecond to wait for a message. * @msg: Pointer where the received #prelude_msg_t should be stored. * * Wait @timeout second for a message on @client connection pool. * * A @timeout of -1, mean prelude_client_recv_msg() will block until * a message is received. A @timeout of 0 mean that it will return * immediatly. * * Returns: 0 on timeout, a negative value on error, 1 on success. */ int prelude_client_recv_msg(prelude_client_t *client, int timeout, prelude_msg_t **msg) { int ret; prelude_msg_t *m = NULL; prelude_connection_t *con; prelude_return_val_if_fail(client, prelude_error(PRELUDE_ERROR_ASSERTION)); prelude_return_val_if_fail(msg, prelude_error(PRELUDE_ERROR_ASSERTION)); ret = prelude_connection_pool_recv(client->cpool, timeout, &con, &m); if ( ret <= 0 ) return ret; ret = prelude_client_handle_msg_default(client, m, client->msgbuf); if ( ret == 0 ) { prelude_msg_destroy(m); return 0; } *msg = m; return 1; } /** * prelude_client_recv_idmef: * @client: Pointer to a #prelude_client_t object. * @timeout: Number of second to wait for a message. * @idmef: Pointer where the received #idmef_message_t should be stored. * * Wait @timeout second for a message on @client connection pool. * * A @timeout of -1, mean prelude_client_recv_idmef() will block until * a message is received. A @timeout of 0 mean that it will return * immediatly. * * Returns: 0 on timeout, a negative value on error, 1 on success. */ int prelude_client_recv_idmef(prelude_client_t *client, int timeout, idmef_message_t **idmef) { int ret; prelude_msg_t *msg = NULL; prelude_return_val_if_fail(client, prelude_error(PRELUDE_ERROR_ASSERTION)); prelude_return_val_if_fail(idmef, prelude_error(PRELUDE_ERROR_ASSERTION)); if ( ! (client->permission & PRELUDE_CONNECTION_PERMISSION_IDMEF_READ) ) return prelude_error_verbose(PRELUDE_ERROR_GENERIC, "Client should use 'idmef:r' permission to read IDMEF message"); ret = prelude_client_recv_msg(client, timeout, &msg); if ( ret <= 0 ) return ret; ret = idmef_message_new(idmef); if ( ret < 0 ) { prelude_msg_destroy(msg); return ret; } ret = idmef_message_read(*idmef, msg); if ( ret < 0 ) { prelude_msg_destroy(msg); idmef_message_destroy(*idmef); return ret; } idmef_message_set_pmsg(*idmef, msg); return 1; } /** * prelude_client_get_connection_pool: * @client: pointer to a #prelude_client_t object. * * Return a pointer to the #prelude_connection_pool_t object used by @client * to send messages. * * Returns: a pointer to a #prelude_connection_pool_t object. */ prelude_connection_pool_t *prelude_client_get_connection_pool(prelude_client_t *client) { prelude_return_val_if_fail(client, NULL); return client->cpool; } /** * prelude_client_set_connection_pool: * @client: pointer to a #prelude_client_t object. * @pool: pointer to a #prelude_client_pool_t object. * * Use this function in order to set your own list of peer that @client * should send message too. This might be usefull in case you don't want * this to be automated by prelude_client_init(). */ void prelude_client_set_connection_pool(prelude_client_t *client, prelude_connection_pool_t *pool) { prelude_return_if_fail(client); prelude_return_if_fail(pool); if ( client->cpool ) prelude_connection_pool_destroy(client->cpool); client->cpool = pool; } /** * prelude_client_set_heartbeat_cb: * @client: pointer to a #prelude_client_t object. * @cb: pointer to a function handling heartbeat sending. * * Use if you want to override the default function used to * automatically send heartbeat to @client peers. */ void prelude_client_set_heartbeat_cb(prelude_client_t *client, void (*cb)(prelude_client_t *client, idmef_message_t *hb)) { prelude_return_if_fail(client); prelude_return_if_fail(cb); client->heartbeat_cb = cb; } /** * prelude_client_destroy: * @client: Pointer on a client object. * @status: Exit status for the client. * * Destroy @client, and send an heartbeat containing the 'exiting' * status in case @status is PRELUDE_CLIENT_EXIT_STATUS_SUCCESS. * * This is useful for analyzer expected to be running periodically, * and that shouldn't be treated as behaving anormaly in case no * heartbeat is sent. * * Please note that your are not supposed to run this function * from a signal handler. */ void prelude_client_destroy(prelude_client_t *client, prelude_client_exit_status_t status) { prelude_return_if_fail(client); if ( --client->refcount ) return; prelude_timer_destroy(&client->heartbeat_timer); if ( client->status >= CLIENT_STATUS_STARTING && status == PRELUDE_CLIENT_EXIT_STATUS_SUCCESS && client->flags & PRELUDE_CLIENT_FLAGS_HEARTBEAT ) { client->status = CLIENT_STATUS_EXITING; heartbeat_expire_cb(client); } _prelude_client_destroy(client); } /** * prelude_client_set_flags: * @client: Pointer on a #prelude_client_t object. * @flags: Or'd list of flags used by @client. * * Set specific flags in the @client structure. * This function can be called anytime after the creation of the * @client object. * * When settings asynchronous flags such as #PRELUDE_CLIENT_FLAGS_ASYNC_SEND * or #PRELUDE_CLIENT_FLAGS_ASYNC_TIMER, be carefull to call * prelude_client_set_flags() in the same process you want to use the * asynchronous API from. Threads aren't copied accross fork(). * * Returns: 0 if setting @flags succeed, -1 otherwise. */ int prelude_client_set_flags(prelude_client_t *client, prelude_client_flags_t flags) { int ret = 0; prelude_return_val_if_fail(client, prelude_error(PRELUDE_ERROR_ASSERTION)); client->flags = flags; if ( flags & PRELUDE_CLIENT_FLAGS_ASYNC_TIMER ) { prelude_async_set_flags(PRELUDE_ASYNC_FLAGS_TIMER); ret = prelude_async_init(); } if ( flags & PRELUDE_CLIENT_FLAGS_ASYNC_SEND ) { prelude_msgbuf_set_flags(client->msgbuf, PRELUDE_MSGBUF_FLAGS_ASYNC); ret = prelude_async_init(); } if ( ! (flags & PRELUDE_CLIENT_FLAGS_AUTOCONFIG) ) prelude_client_set_config_filename(client, NULL); return ret; } /** * prelude_client_get_flags: * @client: Pointer on a #prelude_client_t object. * * Get flags set through prelude_client_set_flags(). * * Returns: an or'ed list of #prelude_client_flags_t. */ prelude_client_flags_t prelude_client_get_flags(prelude_client_t *client) { prelude_return_val_if_fail(client, prelude_error(PRELUDE_ERROR_ASSERTION)); return client->flags; } /** * prelude_client_get_required_permission: * @client: Pointer on a #prelude_client_t object. * * Returns: @client permission as set with prelude_client_set_required_permission() */ prelude_connection_permission_t prelude_client_get_required_permission(prelude_client_t *client) { prelude_return_val_if_fail(client, prelude_error(PRELUDE_ERROR_ASSERTION)); return client->permission; } /** * prelude_client_set_required_permission: * @client: Pointer on a #prelude_client_t object. * @permission: Required permission for @client. * * Set the required @permission for @client. * The default is #PRELUDE_CONNECTION_PERMISSION_IDMEF_WRITE | #PRELUDE_CONNECTION_PERMISSION_ADMIN_READ. * Value set through this function should be set before prelude_client_start(). * * If the client certificate for connecting to one of the specified manager doesn't have theses permission * the client will reject the certificate and ask for registration. */ void prelude_client_set_required_permission(prelude_client_t *client, prelude_connection_permission_t permission) { prelude_return_if_fail(client); if ( permission & PRELUDE_CONNECTION_PERMISSION_IDMEF_READ ) prelude_connection_pool_set_event_handler(client->cpool, 0, NULL); client->permission = permission; prelude_connection_pool_set_required_permission(client->cpool, permission); } /** * prelude_client_get_config_filename: * @client: pointer on a #prelude_client_t object. * * Return the filename where @client configuration is stored. * This filename is originally set by the prelude_client_new() function. * * Returns: a pointer to @client configuration filename. */ const char *prelude_client_get_config_filename(prelude_client_t *client) { prelude_return_val_if_fail(client, NULL); return client->config_filename; } /** * prelude_client_set_config_filename: * @client: pointer on a #prelude_client_t object. * @filename: Configuration file to use for this client. * * The default for a client is to use a template configuration file (idmef-client.conf). * By using this function you might override the default and provide your own * configuration file to use for @client. The format of the configuration file need * to be compatible with the Prelude format. * * Returns: 0 on success, -1 if an error occured. */ int prelude_client_set_config_filename(prelude_client_t *client, const char *filename) { prelude_return_val_if_fail(client, prelude_error(PRELUDE_ERROR_ASSERTION)); if ( client->config_filename ) { free(client->config_filename); client->config_filename = NULL; } if ( ! filename ) client->flags &= ~PRELUDE_CLIENT_FLAGS_AUTOCONFIG; else { client->config_filename = strdup(filename); if ( ! client->config_filename ) return prelude_error_from_errno(errno); } client->config_external = TRUE; return 0; } prelude_ident_t *prelude_client_get_unique_ident(prelude_client_t *client) { prelude_return_val_if_fail(client, NULL); return client->unique_ident; } prelude_client_profile_t *prelude_client_get_profile(prelude_client_t *client) { prelude_return_val_if_fail(client, NULL); return client->profile; } #ifndef PRELUDE_DISABLE_DEPRECATED /** * prelude_client_is_setup_needed: * @error: Error returned by prelude_client_start(). * * This function should be called as a result of an error by * the prelude_client_start() function, to know if the analyzer * need to be registered. * * DEPRECATED: use standard error API. * * Returns: TRUE if setup is needed, FALSE otherwise. */ prelude_bool_t prelude_client_is_setup_needed(int error) { /* * Deprecated. */ return FALSE; } const char *prelude_client_get_setup_error(prelude_client_t *client) { int ret; prelude_string_t *out, *perm; prelude_return_val_if_fail(client, NULL); ret = prelude_string_new(&out); if ( ret < 0 ) return NULL; if ( client->flags & PRELUDE_CLIENT_FLAGS_CONNECT ) { ret = prelude_string_new(&perm); if ( ret < 0 ) { prelude_string_destroy(out); return NULL; } prelude_connection_permission_to_string(client->permission, perm); ret = prelude_string_sprintf(out, "\nProfile '%s' does not exist. In order to create it, please run:\n" "prelude-admin register \"%s\" \"%s\" --uid %d --gid %d", prelude_client_profile_get_name(client->profile), prelude_client_profile_get_name(client->profile), prelude_string_get_string(perm), (int) prelude_client_profile_get_uid(client->profile), (int) prelude_client_profile_get_gid(client->profile)); prelude_string_destroy(perm); } else { ret = prelude_string_sprintf(out, "\nProfile '%s' does not exist. In order to create it, please run:\n" "prelude-admin add \"%s\" --uid %d --gid %d", prelude_client_profile_get_name(client->profile), prelude_client_profile_get_name(client->profile), (int) prelude_client_profile_get_uid(client->profile), (int) prelude_client_profile_get_gid(client->profile)); } if ( ret < 0 ) return NULL; _prelude_thread_set_error(prelude_string_get_string(out)); prelude_string_destroy(out); return _prelude_thread_get_error(); } #endif void prelude_client_print_setup_error(prelude_client_t *client) { prelude_return_if_fail(client); prelude_log(PRELUDE_LOG_WARN, "%s\n\n", prelude_client_get_setup_error(client)); } int prelude_client_handle_msg_default(prelude_client_t *client, prelude_msg_t *msg, prelude_msgbuf_t *msgbuf) { int ret; uint8_t tag; prelude_return_val_if_fail(client, prelude_error(PRELUDE_ERROR_ASSERTION)); prelude_return_val_if_fail(msg, prelude_error(PRELUDE_ERROR_ASSERTION)); prelude_return_val_if_fail(msgbuf, prelude_error(PRELUDE_ERROR_ASSERTION)); tag = prelude_msg_get_tag(msg); if ( tag != PRELUDE_MSG_OPTION_REQUEST ) return prelude_error_verbose(PRELUDE_ERROR_GENERIC, "Unexpected message type '%d' received", tag); /* * lock, handle the request, send reply. */ gl_lock_lock(client->msgbuf_lock); ret = prelude_option_process_request(client, msg, msgbuf); prelude_msgbuf_mark_end(client->msgbuf); gl_lock_unlock(client->msgbuf_lock); return ret; } int prelude_client_new_msgbuf(prelude_client_t *client, prelude_msgbuf_t **msgbuf) { int ret; prelude_return_val_if_fail(client, prelude_error(PRELUDE_ERROR_ASSERTION)); ret = prelude_msgbuf_new(msgbuf); if ( ret < 0 ) return ret; prelude_msgbuf_set_data(*msgbuf, client); prelude_msgbuf_set_callback(*msgbuf, client_write_cb); return 0; } libprelude-1.0.0/src/idmef-message-helpers.c0000664000076400007640000002044211325615275015704 00000000000000/***** * * Copyright (C) 2008 PreludeIDS Technologies. All Rights Reserved. * Author: Yoann Vandoorselaere * * This file is part of the Prelude library. * * 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; see the file COPYING. If not, write to * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. * *****/ #include #include #include "prelude.h" #include "idmef-message-helpers.h" /** * idmef_message_set_value: * @message: Pointer to an #idmef_message_t object. * @path: Path to be set within @message. * @value: Value to associate @message[@path] with. * * This function will set the @path member within @message to the * provided @value. * * Returns: 0 on success, or a negative value if an error occured. */ int idmef_message_set_value(idmef_message_t *message, const char *path, idmef_value_t *value) { int ret; idmef_path_t *ip; ret = idmef_path_new_fast(&ip, path); if ( ret < 0 ) return ret; ret = idmef_path_set(ip, message, value); idmef_path_destroy(ip); return ret; } /** * idmef_message_get_value: * @message: Pointer to an #idmef_message_t object. * @path: Path to retrieve the value from within @message. * @value: Pointer where the result should be stored. * * Retrieve the value stored within @path of @message and store it * in the user provided @value. * * Returns: A positive value in case @path was successfully retrieved * 0 if the path is empty, or a negative value if an error occured. */ int idmef_message_get_value(idmef_message_t *message, const char *path, idmef_value_t **value) { int ret; idmef_path_t *ip; ret = idmef_path_new_fast(&ip, path); if ( ret < 0 ) return ret; ret = idmef_path_get(ip, message, value); idmef_path_destroy(ip); return ret; } /** * idmef_message_set_string: * @message: Pointer to an #idmef_message_t object. * @path: Path to be set within @message. * @value: Value to associate @message[@path] with. * * This function will set the @path member within @message to the * provided @value, which will be converted to the corresponding * @path value type. * * Example: * idmef_message_set_string(message, "alert.classification.text", "MyText"); * idmef_message_set_string(message, "alert.source(0).service.port", "1024"); * * Returns: 0 on success, or a negative value if an error occured. */ int idmef_message_set_string(idmef_message_t *message, const char *path, const char *value) { int ret; idmef_value_t *iv; prelude_string_t *str; ret = prelude_string_new_dup(&str, value); if ( ret < 0 ) return ret; ret = idmef_value_new_string(&iv, str); if ( ret < 0 ) { prelude_string_destroy(str); return ret; } ret = idmef_message_set_value(message, path, iv); idmef_value_destroy(iv); return ret; } /** * idmef_message_get_string: * @message: Pointer to an #idmef_message_t object. * @path: Path to retrieve the string from within @message. * @result: Pointer where the result should be stored. * * Retrieve the string stored within @path of @message and store it * in the user provided @result. * * The caller is responssible for freeing @result. * * Returns: A positive value in case @path was successfully retrieved * 0 if the path is empty, or a negative value if an error occured. */ int idmef_message_get_string(idmef_message_t *message, const char *path, char **result) { int ret; idmef_value_t *iv; prelude_string_t *str; ret = idmef_message_get_value(message, path, &iv); if ( ret <= 0 ) return ret; if ( idmef_value_get_type(iv) != IDMEF_VALUE_TYPE_STRING ) { ret = _idmef_value_cast(iv, IDMEF_VALUE_TYPE_STRING, 0); if ( ret < 0 ) goto err; } if ( ! (str = idmef_value_get_string(iv)) ) { ret = -1; goto err; } ret = prelude_string_get_string_released(str, result); err: idmef_value_destroy(iv); return ret; } /** * idmef_message_set_number: * @message: Pointer to an #idmef_message_t object. * @path: Path to be set within @message. * @number: Value to associate @message[@path] with. * * This function will set the @path member within @message to the * provided @value, which will be converted to the @path value type. * * Example: * idmef_message_set_number(message, "alert.assessment.confidence.confidence", 0.123456); * idmef_message_set_number(message, "alert.source(0).service.port", 1024); * * Returns: 0 on success, or a negative value if an error occured. */ int idmef_message_set_number(idmef_message_t *message, const char *path, double number) { int ret; idmef_value_t *iv; ret = idmef_value_new_double(&iv, number); if ( ret < 0 ) return ret; ret = idmef_message_set_value(message, path, iv); idmef_value_destroy(iv); return ret; } /** * idmef_message_get_number: * @message: Pointer to an #idmef_message_t object. * @path: Path to retrieve the number from within @message. * @result: Pointer where the result should be stored. * * Retrieve the number stored within @path of @message and store it * in the user provided @result. * * Returns: A positive value in case @path was successfully retrieved * 0 if the path is empty, or a negative value if an error occured. */ int idmef_message_get_number(idmef_message_t *message, const char *path, double *result) { int ret; idmef_value_t *iv; ret = idmef_message_get_value(message, path, &iv); if ( ret <= 0 ) return ret; if ( idmef_value_get_type(iv) != IDMEF_VALUE_TYPE_DOUBLE ) { ret = _idmef_value_cast(iv, IDMEF_VALUE_TYPE_DOUBLE, 0); if ( ret < 0 ) goto err; } *result = idmef_value_get_double(iv); err: idmef_value_destroy(iv); return ret; } /** * idmef_message_set_data: * @message: Pointer to an #idmef_message_t object. * @path: Path to be set within @message. * @data: Pointer to data to associate @message[@path] with. * @size: Size of the data pointed to by @data. * * This function will set the @path member within @message to the * provided @data of size @size. * * Returns: 0 on success, or a negative value if an error occured. */ int idmef_message_set_data(idmef_message_t *message, const char *path, const unsigned char *data, size_t size) { int ret; idmef_data_t *id; idmef_value_t *iv; ret = idmef_data_new_byte_string_dup(&id, data, size); if ( ret < 0 ) return ret; ret = idmef_value_new_data(&iv, id); if ( ret < 0 ) { idmef_data_destroy(id); return ret; } ret = idmef_message_set_value(message, path, iv); idmef_value_destroy(iv); return ret; } int idmef_message_get_data(idmef_message_t *message, const char *path, unsigned char **data, size_t *size) { int ret; idmef_data_t *dp; idmef_value_t *iv; ret = idmef_message_get_value(message, path, &iv); if ( ret <= 0 ) return ret; if ( idmef_value_get_type(iv) != IDMEF_VALUE_TYPE_DATA || ! (dp = idmef_value_get_data(iv)) ) { ret = -1; goto err; } *size = idmef_data_get_len(dp); *data = malloc(*size); if ( ! *data ) { ret = -1; goto err; } memcpy(*data, idmef_data_get_data(dp), *size); err: idmef_value_destroy(iv); return ret; } libprelude-1.0.0/src/idmef-data.c0000664000076400007640000004464411322640703013532 00000000000000/***** * * Copyright (C) 2003-2005,2006,2007 PreludeIDS Technologies. All Rights Reserved. * Author: Nicolas Delon * * This file is part of the Prelude library. * * 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; see the file COPYING. If not, write to * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. * *****/ #include "libmissing.h" #include #include #include #include #include "prelude-error.h" #include "prelude-inttypes.h" #include "prelude-string.h" #include "common.h" #include "idmef-data.h" /* * Data structure may be free'd */ #define IDMEF_DATA_OWN_STRUCTURE 0x1 /* * Data content may be free'd */ #define IDMEF_DATA_OWN_DATA 0x2 #define IDMEF_DATA_DECL(idmef_data_type, c_type, name) \ int idmef_data_new_ ## name(idmef_data_t **nd, c_type val) \ { \ int ret; \ \ ret = idmef_data_new(nd); \ if ( ret < 0 ) \ return ret; \ \ idmef_data_set_ ## name(*nd, val); \ \ return ret; \ } \ \ void idmef_data_set_ ## name(idmef_data_t *ptr, c_type val) \ { \ prelude_return_if_fail(ptr); \ idmef_data_destroy_internal(ptr); \ ptr->type = idmef_data_type; \ ptr->len = sizeof(val); \ ptr->data.name ## _data = val; \ } \ \ c_type idmef_data_get_ ## name(const idmef_data_t *ptr) \ { \ return ptr->data.name ## _data; \ } IDMEF_DATA_DECL(IDMEF_DATA_TYPE_CHAR, char, char) IDMEF_DATA_DECL(IDMEF_DATA_TYPE_BYTE, uint8_t, byte) IDMEF_DATA_DECL(IDMEF_DATA_TYPE_UINT32, uint32_t, uint32) IDMEF_DATA_DECL(IDMEF_DATA_TYPE_UINT64, uint64_t, uint64) IDMEF_DATA_DECL(IDMEF_DATA_TYPE_FLOAT, float, float) int idmef_data_new(idmef_data_t **data) { *data = calloc(1, sizeof(**data)); if ( ! *data ) return prelude_error_from_errno(errno); (*data)->refcount = 1; (*data)->flags |= IDMEF_DATA_OWN_STRUCTURE; return 0; } idmef_data_t *idmef_data_ref(idmef_data_t *data) { prelude_return_val_if_fail(data, NULL); data->refcount++; return data; } int idmef_data_set_ptr_ref_fast(idmef_data_t *data, idmef_data_type_t type, const void *ptr, size_t len) { prelude_return_val_if_fail(data, prelude_error(PRELUDE_ERROR_ASSERTION)); prelude_return_val_if_fail(ptr, prelude_error(PRELUDE_ERROR_ASSERTION)); idmef_data_destroy_internal(data); data->type = type; data->data.ro_data = ptr; data->len = len; return 0; } int idmef_data_set_ptr_dup_fast(idmef_data_t *data, idmef_data_type_t type, const void *ptr, size_t len) { void *new; prelude_return_val_if_fail(data, prelude_error(PRELUDE_ERROR_ASSERTION)); prelude_return_val_if_fail(ptr, prelude_error(PRELUDE_ERROR_ASSERTION)); idmef_data_destroy_internal(data); new = malloc(len); if ( ! new ) return -1; memcpy(new, ptr, len); data->type = type; data->data.rw_data = new; data->len = len; data->flags |= IDMEF_DATA_OWN_DATA; return 0; } int idmef_data_set_ptr_nodup_fast(idmef_data_t *data, idmef_data_type_t type, void *ptr, size_t len) { prelude_return_val_if_fail(data, prelude_error(PRELUDE_ERROR_ASSERTION)); prelude_return_val_if_fail(ptr, prelude_error(PRELUDE_ERROR_ASSERTION)); idmef_data_destroy_internal(data); data->type = type; data->data.rw_data= ptr; data->len = len; data->flags |= IDMEF_DATA_OWN_DATA; return 0; } int idmef_data_new_ptr_ref_fast(idmef_data_t **data, idmef_data_type_t type, const void *ptr, size_t len) { int ret; ret = idmef_data_new(data); if ( ret < 0 ) return ret; ret = idmef_data_set_ptr_ref_fast(*data, type, ptr, len); if ( ret < 0 ) idmef_data_destroy(*data); return ret; } int idmef_data_new_ptr_dup_fast(idmef_data_t **data, idmef_data_type_t type, const void *ptr, size_t len) { int ret; ret = idmef_data_new(data); if ( ret < 0 ) return ret; ret = idmef_data_set_ptr_dup_fast(*data, type, ptr, len); if ( ret < 0 ) idmef_data_destroy(*data); return ret; } int idmef_data_new_ptr_nodup_fast(idmef_data_t **data, idmef_data_type_t type, void *ptr, size_t len) { int ret; ret = idmef_data_new(data); if ( ret < 0 ) return ret; ret = idmef_data_set_ptr_nodup_fast(*data, type, ptr, len); if ( ret < 0 ) idmef_data_destroy(*data); return ret; } /** * idmef_data_copy_ref: * @src: Source #idmef_data_t object. * @dst: Destination #idmef_data_t object. * * Makes @dst reference the same buffer as @src. * * Returns: 0 on success, a negative value if an error occured. */ int idmef_data_copy_ref(const idmef_data_t *src, idmef_data_t *dst) { prelude_return_val_if_fail(src, prelude_error(PRELUDE_ERROR_ASSERTION)); prelude_return_val_if_fail(dst, prelude_error(PRELUDE_ERROR_ASSERTION)); idmef_data_destroy_internal(dst); dst->type = src->type; dst->len = src->len; dst->data = src->data; dst->flags &= ~IDMEF_DATA_OWN_DATA; return 0; } /** * idmef_data_copy_dup: * @src: Source #idmef_data_t object. * @dst: Destination #idmef_data_t object. * * Copies @src to @dst, including the associated buffer. * This is an alternative to idmef_data_clone(). * * Returns: 0 on success, a negative value if an error occured. */ int idmef_data_copy_dup(const idmef_data_t *src, idmef_data_t *dst) { prelude_return_val_if_fail(src, prelude_error(PRELUDE_ERROR_ASSERTION)); prelude_return_val_if_fail(dst, prelude_error(PRELUDE_ERROR_ASSERTION)); idmef_data_destroy_internal(dst); dst->type = src->type; dst->flags |= IDMEF_DATA_OWN_DATA; dst->len = src->len; if ( src->type == IDMEF_DATA_TYPE_CHAR_STRING || src->type == IDMEF_DATA_TYPE_BYTE_STRING ) { dst->data.rw_data = malloc(src->len); if ( ! dst->data.rw_data ) return -1; memcpy(dst->data.rw_data, src->data.ro_data, src->len); } else { dst->data = src->data; } return 0; } int idmef_data_clone(const idmef_data_t *src, idmef_data_t **dst) { int ret; prelude_return_val_if_fail(src, prelude_error(PRELUDE_ERROR_ASSERTION)); ret = idmef_data_new(dst); if ( ret < 0 ) return ret; ret = idmef_data_copy_dup(src, *dst); if ( ret < 0 ) idmef_data_destroy(*dst); return ret; } const char *idmef_data_get_char_string(const idmef_data_t *data) { prelude_return_val_if_fail(data, NULL); return data->data.ro_data; } const unsigned char *idmef_data_get_byte_string(const idmef_data_t *data) { prelude_return_val_if_fail(data, NULL); return data->data.ro_data; } /** * idmef_data_get_type * @data: Pointer to an #idmef_data_t object. * * Returns: the type of the embedded data. */ idmef_data_type_t idmef_data_get_type(const idmef_data_t *data) { prelude_return_val_if_fail(data, prelude_error(PRELUDE_ERROR_ASSERTION)); return data->type; } /** * idmef_data_get_len: * @data: Pointer to an #idmef_data_t object. * * Returns: the length of data contained within @data object. */ size_t idmef_data_get_len(const idmef_data_t *data) { prelude_return_val_if_fail(data, 0); return data->len; } /** * idmef_data_get_data: * @data: Pointer to an #idmef_data_t object. * * Returns: the data contained within @data object. */ const void *idmef_data_get_data(const idmef_data_t *data) { prelude_return_val_if_fail(data, NULL); switch ( data->type ) { case IDMEF_DATA_TYPE_UNKNOWN: return NULL; case IDMEF_DATA_TYPE_CHAR_STRING: case IDMEF_DATA_TYPE_BYTE_STRING: return data->data.ro_data; default: return &data->data; } return NULL; } /** * idmef_data_is_empty: * @data: Pointer to an #idmef_data_t object. * * Returns: TRUE if empty, FALSE otherwise. */ prelude_bool_t idmef_data_is_empty(const idmef_data_t *data) { prelude_return_val_if_fail(data, TRUE); return (data->len == 0) ? TRUE : FALSE; } static int bytes_to_string(prelude_string_t *out, const unsigned char *src, size_t size) { char c; int ret; static const char b64tbl[64] = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"; while ( size ) { ret = prelude_string_ncat(out, &b64tbl[(src[0] >> 2) & 0x3f], 1); if ( ret < 0 ) return ret; c = b64tbl[((src[0] << 4) + ((--size) ? src[1] >> 4 : 0)) & 0x3f]; ret = prelude_string_ncat(out, &c, 1); if ( ret < 0 ) return ret; c = (size) ? b64tbl[((src[1] << 2) + ((--size) ? src[2] >> 6 : 0)) & 0x3f] : '='; ret = prelude_string_ncat(out, &c, 1); if ( ret < 0 ) return ret; c = (size && size--) ? b64tbl[src[2] & 0x3f] : '='; ret = prelude_string_ncat(out, &c, 1); if ( ret < 0 ) return ret; src += 3; } return 0; } /** * idmef_data_to_string: * @data: Pointer to an #idmef_data_t object. * @out: Pointer to a #prelude_string_t to store the formated data into. * * Formats data contained within @data to be printable, * and stores the result in the provided @out buffer. * * Returns: 0 on success, a negative value if an error occured. */ int idmef_data_to_string(const idmef_data_t *data, prelude_string_t *out) { int ret = 0; prelude_return_val_if_fail(data, prelude_error(PRELUDE_ERROR_ASSERTION)); prelude_return_val_if_fail(out, prelude_error(PRELUDE_ERROR_ASSERTION)); switch ( data->type ) { case IDMEF_DATA_TYPE_UNKNOWN: return 0; case IDMEF_DATA_TYPE_CHAR: ret = prelude_string_sprintf(out, "%c", data->data.char_data); break; case IDMEF_DATA_TYPE_BYTE: /* * %hh convertion specifier is not portable. */ ret = prelude_string_sprintf(out, "%u", (unsigned int) data->data.byte_data); break; case IDMEF_DATA_TYPE_UINT32: ret = prelude_string_sprintf(out, "%u", data->data.uint32_data); break; case IDMEF_DATA_TYPE_UINT64: ret = prelude_string_sprintf(out, "%" PRELUDE_PRIu64, data->data.uint64_data); break; case IDMEF_DATA_TYPE_FLOAT: ret = prelude_string_sprintf(out, "%f", data->data.float_data); break; case IDMEF_DATA_TYPE_CHAR_STRING: ret = prelude_string_sprintf(out, "%s", (const char *) data->data.ro_data); break; case IDMEF_DATA_TYPE_BYTE_STRING: ret = bytes_to_string(out, data->data.ro_data, data->len); break; } return ret; } /* * This function cannot be declared static because it is invoked * from idmef-tree-wrap.c */ void idmef_data_destroy_internal(idmef_data_t *ptr) { prelude_return_if_fail(ptr); if ( (ptr->type == IDMEF_DATA_TYPE_CHAR_STRING || ptr->type == IDMEF_DATA_TYPE_BYTE_STRING) && ptr->flags & IDMEF_DATA_OWN_DATA ) { free(ptr->data.rw_data); ptr->data.rw_data = NULL; } /* * free() should be done by the caller */ } /** * idmef_data_destroy: * @data: Pointer to an #idmef_data_t object. * * Frees @data. The buffer pointed by @data will be freed if * the @data object is marked as _dup or _nodup. */ void idmef_data_destroy(idmef_data_t *data) { prelude_return_if_fail(data); if ( --data->refcount ) return; idmef_data_destroy_internal(data); if ( data->flags & IDMEF_DATA_OWN_STRUCTURE ) free(data); } int idmef_data_new_char_string_ref_fast(idmef_data_t **data, const char *ptr, size_t len) { return idmef_data_new_ptr_ref_fast(data, IDMEF_DATA_TYPE_CHAR_STRING, ptr, len + 1); } int idmef_data_new_char_string_dup_fast(idmef_data_t **data, const char *ptr, size_t len) { return idmef_data_new_ptr_dup_fast(data, IDMEF_DATA_TYPE_CHAR_STRING, ptr, len + 1); } int idmef_data_new_char_string_nodup_fast(idmef_data_t **data, char *ptr, size_t len) { return idmef_data_new_ptr_nodup_fast(data, IDMEF_DATA_TYPE_CHAR_STRING, ptr, len + 1); } int idmef_data_set_char_string_ref_fast(idmef_data_t *data, const char *ptr, size_t len) { return idmef_data_set_ptr_ref_fast(data, IDMEF_DATA_TYPE_CHAR_STRING, ptr, len + 1); } int idmef_data_set_char_string_dup_fast(idmef_data_t *data, const char *ptr, size_t len) { return idmef_data_set_ptr_dup_fast(data, IDMEF_DATA_TYPE_CHAR_STRING, ptr, len + 1); } int idmef_data_set_char_string_nodup_fast(idmef_data_t *data, char *ptr, size_t len) { return idmef_data_set_ptr_nodup_fast(data, IDMEF_DATA_TYPE_CHAR_STRING, ptr, len + 1); } int idmef_data_new_char_string_ref(idmef_data_t **data, const char *ptr) { prelude_return_val_if_fail(ptr, prelude_error(PRELUDE_ERROR_ASSERTION)); return idmef_data_new_char_string_ref_fast(data, ptr, strlen(ptr)); } int idmef_data_new_char_string_dup(idmef_data_t **data, const char *ptr) { prelude_return_val_if_fail(ptr, prelude_error(PRELUDE_ERROR_ASSERTION)); return idmef_data_new_char_string_dup_fast(data, ptr, strlen(ptr)); } int idmef_data_new_char_string_nodup(idmef_data_t **data, char *ptr) { prelude_return_val_if_fail(ptr, prelude_error(PRELUDE_ERROR_ASSERTION)); return idmef_data_new_char_string_nodup_fast(data, ptr, strlen(ptr)); } int idmef_data_set_char_string_ref(idmef_data_t *data, const char *ptr) { prelude_return_val_if_fail(data, prelude_error(PRELUDE_ERROR_ASSERTION)); prelude_return_val_if_fail(ptr, prelude_error(PRELUDE_ERROR_ASSERTION)); return idmef_data_set_char_string_ref_fast(data, ptr, strlen(ptr)); } int idmef_data_set_char_string_dup(idmef_data_t *data, const char *ptr) { prelude_return_val_if_fail(data, prelude_error(PRELUDE_ERROR_ASSERTION)); prelude_return_val_if_fail(ptr, prelude_error(PRELUDE_ERROR_ASSERTION)); return idmef_data_set_char_string_dup_fast(data, ptr, strlen(ptr)); } int idmef_data_set_char_string_nodup(idmef_data_t *data, char *ptr) { prelude_return_val_if_fail(data, prelude_error(PRELUDE_ERROR_ASSERTION)); prelude_return_val_if_fail(ptr, prelude_error(PRELUDE_ERROR_ASSERTION)); return idmef_data_set_char_string_nodup_fast(data, ptr, strlen(ptr)); } /* * */ int idmef_data_new_byte_string_ref(idmef_data_t **data, const unsigned char *ptr, size_t len) { return idmef_data_new_ptr_ref_fast(data, IDMEF_DATA_TYPE_BYTE_STRING, ptr, len); } int idmef_data_new_byte_string_dup(idmef_data_t **data, const unsigned char *ptr, size_t len) { return idmef_data_new_ptr_dup_fast(data, IDMEF_DATA_TYPE_BYTE_STRING, ptr, len); } int idmef_data_new_byte_string_nodup(idmef_data_t **data, unsigned char *ptr, size_t len) { return idmef_data_new_ptr_nodup_fast(data, IDMEF_DATA_TYPE_BYTE_STRING, ptr, len); } int idmef_data_set_byte_string_ref(idmef_data_t *data, const unsigned char *ptr, size_t len) { return idmef_data_set_ptr_ref_fast(data, IDMEF_DATA_TYPE_BYTE_STRING, ptr, len); } int idmef_data_set_byte_string_dup(idmef_data_t *data, const unsigned char *ptr, size_t len) { return idmef_data_set_ptr_dup_fast(data, IDMEF_DATA_TYPE_BYTE_STRING, ptr, len); } int idmef_data_set_byte_string_nodup(idmef_data_t *data, unsigned char *ptr, size_t len) { return idmef_data_set_ptr_nodup_fast(data, IDMEF_DATA_TYPE_BYTE_STRING, ptr, len); } int idmef_data_compare(const idmef_data_t *data1, const idmef_data_t *data2) { if ( ! data1 && ! data2 ) return 0; else if ( ! data1 || ! data2 ) return (data1) ? 1 : -1; else if ( data1->len != data2->len ) return (data1->len > data2->len) ? 1 : -1; else if ( data1->type != data2->type ) return -1; if ( data1->type == IDMEF_DATA_TYPE_CHAR_STRING || data1->type == IDMEF_DATA_TYPE_BYTE_STRING ) return memcmp(data1->data.ro_data, data2->data.ro_data, data1->len); else return memcmp(&data1->data.char_data, &data2->data.char_data, data1->len); } libprelude-1.0.0/src/Makefile.in0000664000076400007640000017536311347714457013462 00000000000000# Makefile.in generated by automake 1.11.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, # Inc. # This Makefile.in 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. @SET_MAKE@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ target_triplet = @target@ subdir = src DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in \ $(srcdir)/libprelude.pc.in idmef-criteria-string.lex.c \ idmef-criteria-string.yac.c idmef-criteria-string.yac.h ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/libmissing/m4/00gnulib.m4 \ $(top_srcdir)/libmissing/m4/alloca.m4 \ $(top_srcdir)/libmissing/m4/arpa_inet_h.m4 \ $(top_srcdir)/libmissing/m4/btowc.m4 \ $(top_srcdir)/libmissing/m4/close.m4 \ $(top_srcdir)/libmissing/m4/codeset.m4 \ $(top_srcdir)/libmissing/m4/cond.m4 \ $(top_srcdir)/libmissing/m4/dos.m4 \ $(top_srcdir)/libmissing/m4/dup2.m4 \ $(top_srcdir)/libmissing/m4/errno_h.m4 \ $(top_srcdir)/libmissing/m4/exponentd.m4 \ $(top_srcdir)/libmissing/m4/exponentf.m4 \ $(top_srcdir)/libmissing/m4/exponentl.m4 \ $(top_srcdir)/libmissing/m4/extensions.m4 \ $(top_srcdir)/libmissing/m4/fclose.m4 \ $(top_srcdir)/libmissing/m4/fcntl-o.m4 \ $(top_srcdir)/libmissing/m4/fcntl_h.m4 \ $(top_srcdir)/libmissing/m4/float_h.m4 \ $(top_srcdir)/libmissing/m4/fopen.m4 \ $(top_srcdir)/libmissing/m4/fpieee.m4 \ $(top_srcdir)/libmissing/m4/frexp.m4 \ $(top_srcdir)/libmissing/m4/frexpl.m4 \ $(top_srcdir)/libmissing/m4/fseeko.m4 \ $(top_srcdir)/libmissing/m4/ftw.m4 \ $(top_srcdir)/libmissing/m4/getaddrinfo.m4 \ $(top_srcdir)/libmissing/m4/getdelim.m4 \ $(top_srcdir)/libmissing/m4/gethostname.m4 \ $(top_srcdir)/libmissing/m4/getline.m4 \ $(top_srcdir)/libmissing/m4/getpagesize.m4 \ $(top_srcdir)/libmissing/m4/getpass.m4 \ $(top_srcdir)/libmissing/m4/gettimeofday.m4 \ $(top_srcdir)/libmissing/m4/glibc21.m4 \ $(top_srcdir)/libmissing/m4/gnulib-common.m4 \ $(top_srcdir)/libmissing/m4/gnulib-comp.m4 \ $(top_srcdir)/libmissing/m4/gnulib-tool.m4 \ $(top_srcdir)/libmissing/m4/hostent.m4 \ $(top_srcdir)/libmissing/m4/include_next.m4 \ $(top_srcdir)/libmissing/m4/inet_ntop.m4 \ $(top_srcdir)/libmissing/m4/inet_pton.m4 \ $(top_srcdir)/libmissing/m4/intmax_t.m4 \ $(top_srcdir)/libmissing/m4/inttypes_h.m4 \ $(top_srcdir)/libmissing/m4/isnand.m4 \ $(top_srcdir)/libmissing/m4/isnanf.m4 \ $(top_srcdir)/libmissing/m4/isnanl.m4 \ $(top_srcdir)/libmissing/m4/langinfo_h.m4 \ $(top_srcdir)/libmissing/m4/ldexpl.m4 \ $(top_srcdir)/libmissing/m4/lib-ld.m4 \ $(top_srcdir)/libmissing/m4/lib-link.m4 \ $(top_srcdir)/libmissing/m4/lib-prefix.m4 \ $(top_srcdir)/libmissing/m4/localcharset.m4 \ $(top_srcdir)/libmissing/m4/locale-fr.m4 \ $(top_srcdir)/libmissing/m4/locale-ja.m4 \ $(top_srcdir)/libmissing/m4/locale-tr.m4 \ $(top_srcdir)/libmissing/m4/locale-zh.m4 \ $(top_srcdir)/libmissing/m4/lock.m4 \ $(top_srcdir)/libmissing/m4/longlong.m4 \ $(top_srcdir)/libmissing/m4/lseek.m4 \ $(top_srcdir)/libmissing/m4/lstat.m4 \ $(top_srcdir)/libmissing/m4/malloc.m4 \ $(top_srcdir)/libmissing/m4/math_h.m4 \ $(top_srcdir)/libmissing/m4/mbrtowc.m4 \ $(top_srcdir)/libmissing/m4/mbsinit.m4 \ $(top_srcdir)/libmissing/m4/mbstate_t.m4 \ $(top_srcdir)/libmissing/m4/memchr.m4 \ $(top_srcdir)/libmissing/m4/memmem.m4 \ $(top_srcdir)/libmissing/m4/minmax.m4 \ $(top_srcdir)/libmissing/m4/mktime.m4 \ $(top_srcdir)/libmissing/m4/mmap-anon.m4 \ $(top_srcdir)/libmissing/m4/mode_t.m4 \ $(top_srcdir)/libmissing/m4/multiarch.m4 \ $(top_srcdir)/libmissing/m4/netdb_h.m4 \ $(top_srcdir)/libmissing/m4/netinet_in_h.m4 \ $(top_srcdir)/libmissing/m4/nl_langinfo.m4 \ $(top_srcdir)/libmissing/m4/nocrash.m4 \ $(top_srcdir)/libmissing/m4/onceonly.m4 \ $(top_srcdir)/libmissing/m4/open.m4 \ $(top_srcdir)/libmissing/m4/pathmax.m4 \ $(top_srcdir)/libmissing/m4/perror.m4 \ $(top_srcdir)/libmissing/m4/poll.m4 \ $(top_srcdir)/libmissing/m4/printf-frexp.m4 \ $(top_srcdir)/libmissing/m4/printf-frexpl.m4 \ $(top_srcdir)/libmissing/m4/printf.m4 \ $(top_srcdir)/libmissing/m4/realloc.m4 \ $(top_srcdir)/libmissing/m4/regex.m4 \ $(top_srcdir)/libmissing/m4/relocatable-lib.m4 \ $(top_srcdir)/libmissing/m4/select.m4 \ $(top_srcdir)/libmissing/m4/servent.m4 \ $(top_srcdir)/libmissing/m4/signal_h.m4 \ $(top_srcdir)/libmissing/m4/signalblocking.m4 \ $(top_srcdir)/libmissing/m4/signbit.m4 \ $(top_srcdir)/libmissing/m4/size_max.m4 \ $(top_srcdir)/libmissing/m4/sleep.m4 \ $(top_srcdir)/libmissing/m4/snprintf-posix.m4 \ $(top_srcdir)/libmissing/m4/snprintf.m4 \ $(top_srcdir)/libmissing/m4/sockets.m4 \ $(top_srcdir)/libmissing/m4/socklen.m4 \ $(top_srcdir)/libmissing/m4/sockpfaf.m4 \ $(top_srcdir)/libmissing/m4/ssize_t.m4 \ $(top_srcdir)/libmissing/m4/stat.m4 \ $(top_srcdir)/libmissing/m4/stdbool.m4 \ $(top_srcdir)/libmissing/m4/stddef_h.m4 \ $(top_srcdir)/libmissing/m4/stdint.m4 \ $(top_srcdir)/libmissing/m4/stdint_h.m4 \ $(top_srcdir)/libmissing/m4/stdio_h.m4 \ $(top_srcdir)/libmissing/m4/stdlib_h.m4 \ $(top_srcdir)/libmissing/m4/strcase.m4 \ $(top_srcdir)/libmissing/m4/strcasestr.m4 \ $(top_srcdir)/libmissing/m4/strdup.m4 \ $(top_srcdir)/libmissing/m4/strerror.m4 \ $(top_srcdir)/libmissing/m4/string_h.m4 \ $(top_srcdir)/libmissing/m4/strings_h.m4 \ $(top_srcdir)/libmissing/m4/strndup.m4 \ $(top_srcdir)/libmissing/m4/strnlen.m4 \ $(top_srcdir)/libmissing/m4/strptime.m4 \ $(top_srcdir)/libmissing/m4/strsep.m4 \ $(top_srcdir)/libmissing/m4/symlink.m4 \ $(top_srcdir)/libmissing/m4/sys_ioctl_h.m4 \ $(top_srcdir)/libmissing/m4/sys_select_h.m4 \ $(top_srcdir)/libmissing/m4/sys_socket_h.m4 \ $(top_srcdir)/libmissing/m4/sys_stat_h.m4 \ $(top_srcdir)/libmissing/m4/sys_time_h.m4 \ $(top_srcdir)/libmissing/m4/sys_utsname_h.m4 \ $(top_srcdir)/libmissing/m4/thread.m4 \ $(top_srcdir)/libmissing/m4/threadlib.m4 \ $(top_srcdir)/libmissing/m4/time_h.m4 \ $(top_srcdir)/libmissing/m4/time_r.m4 \ $(top_srcdir)/libmissing/m4/timegm.m4 \ $(top_srcdir)/libmissing/m4/tls.m4 \ $(top_srcdir)/libmissing/m4/tm_gmtoff.m4 \ $(top_srcdir)/libmissing/m4/uname.m4 \ $(top_srcdir)/libmissing/m4/ungetc.m4 \ $(top_srcdir)/libmissing/m4/unistd_h.m4 \ $(top_srcdir)/libmissing/m4/vasnprintf.m4 \ $(top_srcdir)/libmissing/m4/vsnprintf-posix.m4 \ $(top_srcdir)/libmissing/m4/vsnprintf.m4 \ $(top_srcdir)/libmissing/m4/warn-on-use.m4 \ $(top_srcdir)/libmissing/m4/wchar.m4 \ $(top_srcdir)/libmissing/m4/wchar_t.m4 \ $(top_srcdir)/libmissing/m4/wcrtomb.m4 \ $(top_srcdir)/libmissing/m4/wctob.m4 \ $(top_srcdir)/libmissing/m4/wctype.m4 \ $(top_srcdir)/libmissing/m4/wint_t.m4 \ $(top_srcdir)/libmissing/m4/write.m4 \ $(top_srcdir)/libmissing/m4/xsize.m4 \ $(top_srcdir)/libmissing/m4/yield.m4 \ $(top_srcdir)/m4/ac_compile_check_sizeof.m4 \ $(top_srcdir)/m4/am_path_ruby.m4 $(top_srcdir)/m4/argz.m4 \ $(top_srcdir)/m4/as-ac-expand.m4 \ $(top_srcdir)/m4/ax_c_check_flag.m4 \ $(top_srcdir)/m4/ax_check_aligned_access_required.m4 \ $(top_srcdir)/m4/ax_create_prelude_inttypes_h.m4 \ $(top_srcdir)/m4/ax_ld_check_flag.m4 \ $(top_srcdir)/m4/gtk-doc.m4 $(top_srcdir)/m4/libgcrypt.m4 \ $(top_srcdir)/m4/libgnutls-extra.m4 \ $(top_srcdir)/m4/libgnutls.m4 $(top_srcdir)/m4/libtool.m4 \ $(top_srcdir)/m4/ltdl.m4 $(top_srcdir)/m4/ltoptions.m4 \ $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/m4/pkg.m4 \ $(top_srcdir)/configure.in am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = libprelude.pc CONFIG_CLEAN_VPATH_FILES = am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; am__install_max = 40 am__nobase_strip_setup = \ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` am__nobase_strip = \ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" am__nobase_list = $(am__nobase_strip_setup); \ for p in $$list; do echo "$$p $$p"; done | \ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ if (++n[$$2] == $(am__install_max)) \ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ END { for (dir in files) print dir, files[dir] }' am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' am__installdirs = "$(DESTDIR)$(libdir)" "$(DESTDIR)$(pkgconfigdir)" LTLIBRARIES = $(lib_LTLIBRARIES) am__DEPENDENCIES_1 = libprelude_la_DEPENDENCIES = $(am__DEPENDENCIES_1) \ $(top_builddir)/libmissing/libmissing.la \ libprelude-error/libprelude-error.la am_libprelude_la_OBJECTS = common.lo config-engine.lo daemonize.lo \ ntp.lo tls-auth.lo tls-util.lo variable.lo prelude.lo \ prelude-async.lo prelude-client.lo prelude-client-profile.lo \ prelude-connection.lo prelude-connection-pool.lo \ prelude-failover.lo prelude-hash.lo prelude-ident.lo \ prelude-io.lo prelude-log.lo prelude-msg.lo prelude-msgbuf.lo \ prelude-option.lo prelude-option-wide.lo prelude-plugin.lo \ prelude-string.lo prelude-timer.lo prelude-thread.lo \ idmef-additional-data.lo idmef-class.lo idmef-criteria.lo \ idmef-criteria-string.yac.lo idmef-criteria-string.lex.lo \ idmef-criterion-value.lo idmef-data.lo \ idmef-message-helpers.lo idmef-message-print.lo \ idmef-message-read.lo idmef-message-write.lo idmef-path.lo \ idmef-time.lo idmef-tree-wrap.lo idmef-value.lo \ idmef-value-type.lo libprelude_la_OBJECTS = $(am_libprelude_la_OBJECTS) libprelude_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(libprelude_la_LDFLAGS) $(LDFLAGS) -o $@ DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) CCLD = $(CC) LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ $(LDFLAGS) -o $@ @MAINTAINER_MODE_FALSE@am__skiplex = test -f $@ || LEXCOMPILE = $(LEX) $(LFLAGS) $(AM_LFLAGS) LTLEXCOMPILE = $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=compile $(LEX) $(LFLAGS) $(AM_LFLAGS) YLWRAP = $(top_srcdir)/ylwrap @MAINTAINER_MODE_FALSE@am__skipyacc = test -f $@ || YACCCOMPILE = $(YACC) $(YFLAGS) $(AM_YFLAGS) LTYACCCOMPILE = $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=compile $(YACC) $(YFLAGS) $(AM_YFLAGS) SOURCES = $(libprelude_la_SOURCES) DIST_SOURCES = $(libprelude_la_SOURCES) RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \ html-recursive info-recursive install-data-recursive \ install-dvi-recursive install-exec-recursive \ install-html-recursive install-info-recursive \ install-pdf-recursive install-ps-recursive install-recursive \ installcheck-recursive installdirs-recursive pdf-recursive \ ps-recursive uninstall-recursive DATA = $(pkgconfig_DATA) RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ distclean-recursive maintainer-clean-recursive AM_RECURSIVE_TARGETS = $(RECURSIVE_TARGETS:-recursive=) \ $(RECURSIVE_CLEAN_TARGETS:-recursive=) tags TAGS ctags CTAGS \ distdir ETAGS = etags CTAGS = ctags DIST_SUBDIRS = $(SUBDIRS) DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) am__relativize = \ dir0=`pwd`; \ sed_first='s,^\([^/]*\)/.*$$,\1,'; \ sed_rest='s,^[^/]*/*,,'; \ sed_last='s,^.*/\([^/]*\)$$,\1,'; \ sed_butlast='s,/*[^/]*$$,,'; \ while test -n "$$dir1"; do \ first=`echo "$$dir1" | sed -e "$$sed_first"`; \ if test "$$first" != "."; then \ if test "$$first" = ".."; then \ dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \ dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \ else \ first2=`echo "$$dir2" | sed -e "$$sed_first"`; \ if test "$$first2" = "$$first"; then \ dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \ else \ dir2="../$$dir2"; \ fi; \ dir0="$$dir0"/"$$first"; \ fi; \ fi; \ dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \ done; \ reldir="$$dir2" ACLOCAL = @ACLOCAL@ ALLOCA = @ALLOCA@ ALLOCA_H = @ALLOCA_H@ AMTAR = @AMTAR@ APPLE_UNIVERSAL_BUILD = @APPLE_UNIVERSAL_BUILD@ AR = @AR@ ARGZ_H = @ARGZ_H@ AS = @AS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ BINDINGS_CC = @BINDINGS_CC@ BINDIR = @BINDIR@ BITSIZEOF_PTRDIFF_T = @BITSIZEOF_PTRDIFF_T@ BITSIZEOF_SIG_ATOMIC_T = @BITSIZEOF_SIG_ATOMIC_T@ BITSIZEOF_SIZE_T = @BITSIZEOF_SIZE_T@ BITSIZEOF_WCHAR_T = @BITSIZEOF_WCHAR_T@ BITSIZEOF_WINT_T = @BITSIZEOF_WINT_T@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CC_FOR_BUILD = @CC_FOR_BUILD@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EMULTIHOP_HIDDEN = @EMULTIHOP_HIDDEN@ EMULTIHOP_VALUE = @EMULTIHOP_VALUE@ ENOLINK_HIDDEN = @ENOLINK_HIDDEN@ ENOLINK_VALUE = @ENOLINK_VALUE@ EOVERFLOW_HIDDEN = @EOVERFLOW_HIDDEN@ EOVERFLOW_VALUE = @EOVERFLOW_VALUE@ ERRNO_H = @ERRNO_H@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ FLOAT_H = @FLOAT_H@ GETADDRINFO_LIB = @GETADDRINFO_LIB@ GETHOSTNAME_LIB = @GETHOSTNAME_LIB@ GLIBC21 = @GLIBC21@ GNULIB_ACCEPT = @GNULIB_ACCEPT@ GNULIB_ACCEPT4 = @GNULIB_ACCEPT4@ GNULIB_ACOSL = @GNULIB_ACOSL@ GNULIB_ASINL = @GNULIB_ASINL@ GNULIB_ATANL = @GNULIB_ATANL@ GNULIB_ATOLL = @GNULIB_ATOLL@ GNULIB_BIND = @GNULIB_BIND@ GNULIB_BTOWC = @GNULIB_BTOWC@ GNULIB_CALLOC_POSIX = @GNULIB_CALLOC_POSIX@ GNULIB_CANONICALIZE_FILE_NAME = @GNULIB_CANONICALIZE_FILE_NAME@ GNULIB_CEILF = @GNULIB_CEILF@ GNULIB_CEILL = @GNULIB_CEILL@ GNULIB_CHOWN = @GNULIB_CHOWN@ GNULIB_CLOSE = @GNULIB_CLOSE@ GNULIB_CONNECT = @GNULIB_CONNECT@ GNULIB_COSL = @GNULIB_COSL@ GNULIB_DPRINTF = @GNULIB_DPRINTF@ GNULIB_DUP2 = @GNULIB_DUP2@ GNULIB_DUP3 = @GNULIB_DUP3@ GNULIB_ENVIRON = @GNULIB_ENVIRON@ GNULIB_EUIDACCESS = @GNULIB_EUIDACCESS@ GNULIB_EXPL = @GNULIB_EXPL@ GNULIB_FACCESSAT = @GNULIB_FACCESSAT@ GNULIB_FCHDIR = @GNULIB_FCHDIR@ GNULIB_FCHMODAT = @GNULIB_FCHMODAT@ GNULIB_FCHOWNAT = @GNULIB_FCHOWNAT@ GNULIB_FCLOSE = @GNULIB_FCLOSE@ GNULIB_FCNTL = @GNULIB_FCNTL@ GNULIB_FFLUSH = @GNULIB_FFLUSH@ GNULIB_FLOORF = @GNULIB_FLOORF@ GNULIB_FLOORL = @GNULIB_FLOORL@ GNULIB_FOPEN = @GNULIB_FOPEN@ GNULIB_FPRINTF = @GNULIB_FPRINTF@ GNULIB_FPRINTF_POSIX = @GNULIB_FPRINTF_POSIX@ GNULIB_FPURGE = @GNULIB_FPURGE@ GNULIB_FPUTC = @GNULIB_FPUTC@ GNULIB_FPUTS = @GNULIB_FPUTS@ GNULIB_FREOPEN = @GNULIB_FREOPEN@ GNULIB_FREXP = @GNULIB_FREXP@ GNULIB_FREXPL = @GNULIB_FREXPL@ GNULIB_FSEEK = @GNULIB_FSEEK@ GNULIB_FSEEKO = @GNULIB_FSEEKO@ GNULIB_FSTATAT = @GNULIB_FSTATAT@ GNULIB_FSYNC = @GNULIB_FSYNC@ GNULIB_FTELL = @GNULIB_FTELL@ GNULIB_FTELLO = @GNULIB_FTELLO@ GNULIB_FTRUNCATE = @GNULIB_FTRUNCATE@ GNULIB_FUTIMENS = @GNULIB_FUTIMENS@ GNULIB_FWRITE = @GNULIB_FWRITE@ GNULIB_GETADDRINFO = @GNULIB_GETADDRINFO@ GNULIB_GETCWD = @GNULIB_GETCWD@ GNULIB_GETDELIM = @GNULIB_GETDELIM@ GNULIB_GETDOMAINNAME = @GNULIB_GETDOMAINNAME@ GNULIB_GETDTABLESIZE = @GNULIB_GETDTABLESIZE@ GNULIB_GETGROUPS = @GNULIB_GETGROUPS@ GNULIB_GETHOSTNAME = @GNULIB_GETHOSTNAME@ GNULIB_GETLINE = @GNULIB_GETLINE@ GNULIB_GETLOADAVG = @GNULIB_GETLOADAVG@ GNULIB_GETLOGIN = @GNULIB_GETLOGIN@ GNULIB_GETLOGIN_R = @GNULIB_GETLOGIN_R@ GNULIB_GETPAGESIZE = @GNULIB_GETPAGESIZE@ GNULIB_GETPEERNAME = @GNULIB_GETPEERNAME@ GNULIB_GETSOCKNAME = @GNULIB_GETSOCKNAME@ GNULIB_GETSOCKOPT = @GNULIB_GETSOCKOPT@ GNULIB_GETSUBOPT = @GNULIB_GETSUBOPT@ GNULIB_GETTIMEOFDAY = @GNULIB_GETTIMEOFDAY@ GNULIB_GETUSERSHELL = @GNULIB_GETUSERSHELL@ GNULIB_INET_NTOP = @GNULIB_INET_NTOP@ GNULIB_INET_PTON = @GNULIB_INET_PTON@ GNULIB_IOCTL = @GNULIB_IOCTL@ GNULIB_ISFINITE = @GNULIB_ISFINITE@ GNULIB_ISINF = @GNULIB_ISINF@ GNULIB_ISNAN = @GNULIB_ISNAN@ GNULIB_ISNAND = @GNULIB_ISNAND@ GNULIB_ISNANF = @GNULIB_ISNANF@ GNULIB_ISNANL = @GNULIB_ISNANL@ GNULIB_LCHMOD = @GNULIB_LCHMOD@ GNULIB_LCHOWN = @GNULIB_LCHOWN@ GNULIB_LDEXPL = @GNULIB_LDEXPL@ GNULIB_LINK = @GNULIB_LINK@ GNULIB_LINKAT = @GNULIB_LINKAT@ GNULIB_LISTEN = @GNULIB_LISTEN@ GNULIB_LOGL = @GNULIB_LOGL@ GNULIB_LSEEK = @GNULIB_LSEEK@ GNULIB_LSTAT = @GNULIB_LSTAT@ GNULIB_MALLOC_POSIX = @GNULIB_MALLOC_POSIX@ GNULIB_MBRLEN = @GNULIB_MBRLEN@ GNULIB_MBRTOWC = @GNULIB_MBRTOWC@ GNULIB_MBSCASECMP = @GNULIB_MBSCASECMP@ GNULIB_MBSCASESTR = @GNULIB_MBSCASESTR@ GNULIB_MBSCHR = @GNULIB_MBSCHR@ GNULIB_MBSCSPN = @GNULIB_MBSCSPN@ GNULIB_MBSINIT = @GNULIB_MBSINIT@ GNULIB_MBSLEN = @GNULIB_MBSLEN@ GNULIB_MBSNCASECMP = @GNULIB_MBSNCASECMP@ GNULIB_MBSNLEN = @GNULIB_MBSNLEN@ GNULIB_MBSNRTOWCS = @GNULIB_MBSNRTOWCS@ GNULIB_MBSPBRK = @GNULIB_MBSPBRK@ GNULIB_MBSPCASECMP = @GNULIB_MBSPCASECMP@ GNULIB_MBSRCHR = @GNULIB_MBSRCHR@ GNULIB_MBSRTOWCS = @GNULIB_MBSRTOWCS@ GNULIB_MBSSEP = @GNULIB_MBSSEP@ GNULIB_MBSSPN = @GNULIB_MBSSPN@ GNULIB_MBSSTR = @GNULIB_MBSSTR@ GNULIB_MBSTOK_R = @GNULIB_MBSTOK_R@ GNULIB_MEMCHR = @GNULIB_MEMCHR@ GNULIB_MEMMEM = @GNULIB_MEMMEM@ GNULIB_MEMPCPY = @GNULIB_MEMPCPY@ GNULIB_MEMRCHR = @GNULIB_MEMRCHR@ GNULIB_MKDIRAT = @GNULIB_MKDIRAT@ GNULIB_MKDTEMP = @GNULIB_MKDTEMP@ GNULIB_MKFIFO = @GNULIB_MKFIFO@ GNULIB_MKFIFOAT = @GNULIB_MKFIFOAT@ GNULIB_MKNOD = @GNULIB_MKNOD@ GNULIB_MKNODAT = @GNULIB_MKNODAT@ GNULIB_MKOSTEMP = @GNULIB_MKOSTEMP@ GNULIB_MKOSTEMPS = @GNULIB_MKOSTEMPS@ GNULIB_MKSTEMP = @GNULIB_MKSTEMP@ GNULIB_MKSTEMPS = @GNULIB_MKSTEMPS@ GNULIB_NL_LANGINFO = @GNULIB_NL_LANGINFO@ GNULIB_OBSTACK_PRINTF = @GNULIB_OBSTACK_PRINTF@ GNULIB_OBSTACK_PRINTF_POSIX = @GNULIB_OBSTACK_PRINTF_POSIX@ GNULIB_OPEN = @GNULIB_OPEN@ GNULIB_OPENAT = @GNULIB_OPENAT@ GNULIB_PERROR = @GNULIB_PERROR@ GNULIB_PIPE2 = @GNULIB_PIPE2@ GNULIB_POPEN = @GNULIB_POPEN@ GNULIB_PREAD = @GNULIB_PREAD@ GNULIB_PRINTF = @GNULIB_PRINTF@ GNULIB_PRINTF_POSIX = @GNULIB_PRINTF_POSIX@ GNULIB_PUTC = @GNULIB_PUTC@ GNULIB_PUTCHAR = @GNULIB_PUTCHAR@ GNULIB_PUTENV = @GNULIB_PUTENV@ GNULIB_PUTS = @GNULIB_PUTS@ GNULIB_RANDOM_R = @GNULIB_RANDOM_R@ GNULIB_RAWMEMCHR = @GNULIB_RAWMEMCHR@ GNULIB_READLINK = @GNULIB_READLINK@ GNULIB_READLINKAT = @GNULIB_READLINKAT@ GNULIB_REALLOC_POSIX = @GNULIB_REALLOC_POSIX@ GNULIB_REALPATH = @GNULIB_REALPATH@ GNULIB_RECV = @GNULIB_RECV@ GNULIB_RECVFROM = @GNULIB_RECVFROM@ GNULIB_REMOVE = @GNULIB_REMOVE@ GNULIB_RENAME = @GNULIB_RENAME@ GNULIB_RENAMEAT = @GNULIB_RENAMEAT@ GNULIB_RMDIR = @GNULIB_RMDIR@ GNULIB_ROUND = @GNULIB_ROUND@ GNULIB_ROUNDF = @GNULIB_ROUNDF@ GNULIB_ROUNDL = @GNULIB_ROUNDL@ GNULIB_RPMATCH = @GNULIB_RPMATCH@ GNULIB_SELECT = @GNULIB_SELECT@ GNULIB_SEND = @GNULIB_SEND@ GNULIB_SENDTO = @GNULIB_SENDTO@ GNULIB_SETENV = @GNULIB_SETENV@ GNULIB_SETSOCKOPT = @GNULIB_SETSOCKOPT@ GNULIB_SHUTDOWN = @GNULIB_SHUTDOWN@ GNULIB_SIGACTION = @GNULIB_SIGACTION@ GNULIB_SIGNAL_H_SIGPIPE = @GNULIB_SIGNAL_H_SIGPIPE@ GNULIB_SIGNBIT = @GNULIB_SIGNBIT@ GNULIB_SIGPROCMASK = @GNULIB_SIGPROCMASK@ GNULIB_SINL = @GNULIB_SINL@ GNULIB_SLEEP = @GNULIB_SLEEP@ GNULIB_SNPRINTF = @GNULIB_SNPRINTF@ GNULIB_SOCKET = @GNULIB_SOCKET@ GNULIB_SPRINTF_POSIX = @GNULIB_SPRINTF_POSIX@ GNULIB_SQRTL = @GNULIB_SQRTL@ GNULIB_STAT = @GNULIB_STAT@ GNULIB_STDIO_H_SIGPIPE = @GNULIB_STDIO_H_SIGPIPE@ GNULIB_STPCPY = @GNULIB_STPCPY@ GNULIB_STPNCPY = @GNULIB_STPNCPY@ GNULIB_STRCASESTR = @GNULIB_STRCASESTR@ GNULIB_STRCHRNUL = @GNULIB_STRCHRNUL@ GNULIB_STRDUP = @GNULIB_STRDUP@ GNULIB_STRERROR = @GNULIB_STRERROR@ GNULIB_STRNDUP = @GNULIB_STRNDUP@ GNULIB_STRNLEN = @GNULIB_STRNLEN@ GNULIB_STRPBRK = @GNULIB_STRPBRK@ GNULIB_STRSEP = @GNULIB_STRSEP@ GNULIB_STRSIGNAL = @GNULIB_STRSIGNAL@ GNULIB_STRSTR = @GNULIB_STRSTR@ GNULIB_STRTOD = @GNULIB_STRTOD@ GNULIB_STRTOK_R = @GNULIB_STRTOK_R@ GNULIB_STRTOLL = @GNULIB_STRTOLL@ GNULIB_STRTOULL = @GNULIB_STRTOULL@ GNULIB_STRVERSCMP = @GNULIB_STRVERSCMP@ GNULIB_SYMLINK = @GNULIB_SYMLINK@ GNULIB_SYMLINKAT = @GNULIB_SYMLINKAT@ GNULIB_TANL = @GNULIB_TANL@ GNULIB_TRUNC = @GNULIB_TRUNC@ GNULIB_TRUNCF = @GNULIB_TRUNCF@ GNULIB_TRUNCL = @GNULIB_TRUNCL@ GNULIB_UNAME = @GNULIB_UNAME@ GNULIB_UNISTD_H_GETOPT = @GNULIB_UNISTD_H_GETOPT@ GNULIB_UNISTD_H_SIGPIPE = @GNULIB_UNISTD_H_SIGPIPE@ GNULIB_UNLINK = @GNULIB_UNLINK@ GNULIB_UNLINKAT = @GNULIB_UNLINKAT@ GNULIB_UNSETENV = @GNULIB_UNSETENV@ GNULIB_USLEEP = @GNULIB_USLEEP@ GNULIB_UTIMENSAT = @GNULIB_UTIMENSAT@ GNULIB_VASPRINTF = @GNULIB_VASPRINTF@ GNULIB_VDPRINTF = @GNULIB_VDPRINTF@ GNULIB_VFPRINTF = @GNULIB_VFPRINTF@ GNULIB_VFPRINTF_POSIX = @GNULIB_VFPRINTF_POSIX@ GNULIB_VPRINTF = @GNULIB_VPRINTF@ GNULIB_VPRINTF_POSIX = @GNULIB_VPRINTF_POSIX@ GNULIB_VSNPRINTF = @GNULIB_VSNPRINTF@ GNULIB_VSPRINTF_POSIX = @GNULIB_VSPRINTF_POSIX@ GNULIB_WCRTOMB = @GNULIB_WCRTOMB@ GNULIB_WCSNRTOMBS = @GNULIB_WCSNRTOMBS@ GNULIB_WCSRTOMBS = @GNULIB_WCSRTOMBS@ GNULIB_WCTOB = @GNULIB_WCTOB@ GNULIB_WCWIDTH = @GNULIB_WCWIDTH@ GNULIB_WRITE = @GNULIB_WRITE@ GREP = @GREP@ GTKDOC_CHECK = @GTKDOC_CHECK@ HAVE_ACCEPT4 = @HAVE_ACCEPT4@ HAVE_ACOSL = @HAVE_ACOSL@ HAVE_ARPA_INET_H = @HAVE_ARPA_INET_H@ HAVE_ASINL = @HAVE_ASINL@ HAVE_ATANL = @HAVE_ATANL@ HAVE_ATOLL = @HAVE_ATOLL@ HAVE_BTOWC = @HAVE_BTOWC@ HAVE_CALLOC_POSIX = @HAVE_CALLOC_POSIX@ HAVE_CANONICALIZE_FILE_NAME = @HAVE_CANONICALIZE_FILE_NAME@ HAVE_CHOWN = @HAVE_CHOWN@ HAVE_COSL = @HAVE_COSL@ HAVE_CXX = @HAVE_CXX@ HAVE_DECL_ACOSL = @HAVE_DECL_ACOSL@ HAVE_DECL_ASINL = @HAVE_DECL_ASINL@ HAVE_DECL_ATANL = @HAVE_DECL_ATANL@ HAVE_DECL_COSL = @HAVE_DECL_COSL@ HAVE_DECL_ENVIRON = @HAVE_DECL_ENVIRON@ HAVE_DECL_EXPL = @HAVE_DECL_EXPL@ HAVE_DECL_FPURGE = @HAVE_DECL_FPURGE@ HAVE_DECL_FREEADDRINFO = @HAVE_DECL_FREEADDRINFO@ HAVE_DECL_FREXPL = @HAVE_DECL_FREXPL@ HAVE_DECL_GAI_STRERROR = @HAVE_DECL_GAI_STRERROR@ HAVE_DECL_GETADDRINFO = @HAVE_DECL_GETADDRINFO@ HAVE_DECL_GETDELIM = @HAVE_DECL_GETDELIM@ HAVE_DECL_GETLINE = @HAVE_DECL_GETLINE@ HAVE_DECL_GETLOADAVG = @HAVE_DECL_GETLOADAVG@ HAVE_DECL_GETLOGIN_R = @HAVE_DECL_GETLOGIN_R@ HAVE_DECL_GETNAMEINFO = @HAVE_DECL_GETNAMEINFO@ HAVE_DECL_INET_NTOP = @HAVE_DECL_INET_NTOP@ HAVE_DECL_INET_PTON = @HAVE_DECL_INET_PTON@ HAVE_DECL_LDEXPL = @HAVE_DECL_LDEXPL@ HAVE_DECL_LOGL = @HAVE_DECL_LOGL@ HAVE_DECL_MEMMEM = @HAVE_DECL_MEMMEM@ HAVE_DECL_MEMRCHR = @HAVE_DECL_MEMRCHR@ HAVE_DECL_OBSTACK_PRINTF = @HAVE_DECL_OBSTACK_PRINTF@ HAVE_DECL_SINL = @HAVE_DECL_SINL@ HAVE_DECL_SNPRINTF = @HAVE_DECL_SNPRINTF@ HAVE_DECL_SQRTL = @HAVE_DECL_SQRTL@ HAVE_DECL_STRDUP = @HAVE_DECL_STRDUP@ HAVE_DECL_STRERROR = @HAVE_DECL_STRERROR@ HAVE_DECL_STRNCASECMP = @HAVE_DECL_STRNCASECMP@ HAVE_DECL_STRNDUP = @HAVE_DECL_STRNDUP@ HAVE_DECL_STRNLEN = @HAVE_DECL_STRNLEN@ HAVE_DECL_STRSIGNAL = @HAVE_DECL_STRSIGNAL@ HAVE_DECL_STRTOK_R = @HAVE_DECL_STRTOK_R@ HAVE_DECL_TANL = @HAVE_DECL_TANL@ HAVE_DECL_TRUNC = @HAVE_DECL_TRUNC@ HAVE_DECL_TRUNCF = @HAVE_DECL_TRUNCF@ HAVE_DECL_VSNPRINTF = @HAVE_DECL_VSNPRINTF@ HAVE_DECL_WCTOB = @HAVE_DECL_WCTOB@ HAVE_DECL_WCWIDTH = @HAVE_DECL_WCWIDTH@ HAVE_DPRINTF = @HAVE_DPRINTF@ HAVE_DUP2 = @HAVE_DUP2@ HAVE_DUP3 = @HAVE_DUP3@ HAVE_EUIDACCESS = @HAVE_EUIDACCESS@ HAVE_EXPL = @HAVE_EXPL@ HAVE_FACCESSAT = @HAVE_FACCESSAT@ HAVE_FCHMODAT = @HAVE_FCHMODAT@ HAVE_FCHOWNAT = @HAVE_FCHOWNAT@ HAVE_FCNTL = @HAVE_FCNTL@ HAVE_FSTATAT = @HAVE_FSTATAT@ HAVE_FSYNC = @HAVE_FSYNC@ HAVE_FTRUNCATE = @HAVE_FTRUNCATE@ HAVE_FUTIMENS = @HAVE_FUTIMENS@ HAVE_GETDOMAINNAME = @HAVE_GETDOMAINNAME@ HAVE_GETDTABLESIZE = @HAVE_GETDTABLESIZE@ HAVE_GETGROUPS = @HAVE_GETGROUPS@ HAVE_GETHOSTNAME = @HAVE_GETHOSTNAME@ HAVE_GETLOGIN = @HAVE_GETLOGIN@ HAVE_GETPAGESIZE = @HAVE_GETPAGESIZE@ HAVE_GETSUBOPT = @HAVE_GETSUBOPT@ HAVE_GETUSERSHELL = @HAVE_GETUSERSHELL@ HAVE_INTTYPES_H = @HAVE_INTTYPES_H@ HAVE_ISNAND = @HAVE_ISNAND@ HAVE_ISNANF = @HAVE_ISNANF@ HAVE_ISNANL = @HAVE_ISNANL@ HAVE_ISWCNTRL = @HAVE_ISWCNTRL@ HAVE_LANGINFO_CODESET = @HAVE_LANGINFO_CODESET@ HAVE_LANGINFO_ERA = @HAVE_LANGINFO_ERA@ HAVE_LANGINFO_H = @HAVE_LANGINFO_H@ HAVE_LCHMOD = @HAVE_LCHMOD@ HAVE_LCHOWN = @HAVE_LCHOWN@ HAVE_LINK = @HAVE_LINK@ HAVE_LINKAT = @HAVE_LINKAT@ HAVE_LOGL = @HAVE_LOGL@ HAVE_LONG_LONG_INT = @HAVE_LONG_LONG_INT@ HAVE_LSTAT = @HAVE_LSTAT@ HAVE_MALLOC_POSIX = @HAVE_MALLOC_POSIX@ HAVE_MBRLEN = @HAVE_MBRLEN@ HAVE_MBRTOWC = @HAVE_MBRTOWC@ HAVE_MBSINIT = @HAVE_MBSINIT@ HAVE_MBSLEN = @HAVE_MBSLEN@ HAVE_MBSNRTOWCS = @HAVE_MBSNRTOWCS@ HAVE_MBSRTOWCS = @HAVE_MBSRTOWCS@ HAVE_MEMPCPY = @HAVE_MEMPCPY@ HAVE_MKDIRAT = @HAVE_MKDIRAT@ HAVE_MKDTEMP = @HAVE_MKDTEMP@ HAVE_MKFIFO = @HAVE_MKFIFO@ HAVE_MKFIFOAT = @HAVE_MKFIFOAT@ HAVE_MKNOD = @HAVE_MKNOD@ HAVE_MKNODAT = @HAVE_MKNODAT@ HAVE_MKOSTEMP = @HAVE_MKOSTEMP@ HAVE_MKOSTEMPS = @HAVE_MKOSTEMPS@ HAVE_MKSTEMPS = @HAVE_MKSTEMPS@ HAVE_NETDB_H = @HAVE_NETDB_H@ HAVE_NETINET_IN_H = @HAVE_NETINET_IN_H@ HAVE_NL_LANGINFO = @HAVE_NL_LANGINFO@ HAVE_OPENAT = @HAVE_OPENAT@ HAVE_OS_H = @HAVE_OS_H@ HAVE_PIPE2 = @HAVE_PIPE2@ HAVE_POSIX_SIGNALBLOCKING = @HAVE_POSIX_SIGNALBLOCKING@ HAVE_PREAD = @HAVE_PREAD@ HAVE_RANDOM_H = @HAVE_RANDOM_H@ HAVE_RANDOM_R = @HAVE_RANDOM_R@ HAVE_RAWMEMCHR = @HAVE_RAWMEMCHR@ HAVE_READLINK = @HAVE_READLINK@ HAVE_READLINKAT = @HAVE_READLINKAT@ HAVE_REALLOC_POSIX = @HAVE_REALLOC_POSIX@ HAVE_REALPATH = @HAVE_REALPATH@ HAVE_RENAMEAT = @HAVE_RENAMEAT@ HAVE_RPMATCH = @HAVE_RPMATCH@ HAVE_SA_FAMILY_T = @HAVE_SA_FAMILY_T@ HAVE_SETENV = @HAVE_SETENV@ HAVE_SIGACTION = @HAVE_SIGACTION@ HAVE_SIGINFO_T = @HAVE_SIGINFO_T@ HAVE_SIGNED_SIG_ATOMIC_T = @HAVE_SIGNED_SIG_ATOMIC_T@ HAVE_SIGNED_WCHAR_T = @HAVE_SIGNED_WCHAR_T@ HAVE_SIGNED_WINT_T = @HAVE_SIGNED_WINT_T@ HAVE_SIGSET_T = @HAVE_SIGSET_T@ HAVE_SINL = @HAVE_SINL@ HAVE_SLEEP = @HAVE_SLEEP@ HAVE_SQRTL = @HAVE_SQRTL@ HAVE_STDINT_H = @HAVE_STDINT_H@ HAVE_STPCPY = @HAVE_STPCPY@ HAVE_STPNCPY = @HAVE_STPNCPY@ HAVE_STRCASECMP = @HAVE_STRCASECMP@ HAVE_STRCASESTR = @HAVE_STRCASESTR@ HAVE_STRCHRNUL = @HAVE_STRCHRNUL@ HAVE_STRPBRK = @HAVE_STRPBRK@ HAVE_STRSEP = @HAVE_STRSEP@ HAVE_STRTOD = @HAVE_STRTOD@ HAVE_STRTOLL = @HAVE_STRTOLL@ HAVE_STRTOULL = @HAVE_STRTOULL@ HAVE_STRUCT_ADDRINFO = @HAVE_STRUCT_ADDRINFO@ HAVE_STRUCT_RANDOM_DATA = @HAVE_STRUCT_RANDOM_DATA@ HAVE_STRUCT_SIGACTION_SA_SIGACTION = @HAVE_STRUCT_SIGACTION_SA_SIGACTION@ HAVE_STRUCT_SOCKADDR_STORAGE = @HAVE_STRUCT_SOCKADDR_STORAGE@ HAVE_STRUCT_TIMEVAL = @HAVE_STRUCT_TIMEVAL@ HAVE_STRUCT_UTSNAME = @HAVE_STRUCT_UTSNAME@ HAVE_STRVERSCMP = @HAVE_STRVERSCMP@ HAVE_SYMLINK = @HAVE_SYMLINK@ HAVE_SYMLINKAT = @HAVE_SYMLINKAT@ HAVE_SYS_BITYPES_H = @HAVE_SYS_BITYPES_H@ HAVE_SYS_INTTYPES_H = @HAVE_SYS_INTTYPES_H@ HAVE_SYS_IOCTL_H = @HAVE_SYS_IOCTL_H@ HAVE_SYS_LOADAVG_H = @HAVE_SYS_LOADAVG_H@ HAVE_SYS_PARAM_H = @HAVE_SYS_PARAM_H@ HAVE_SYS_SELECT_H = @HAVE_SYS_SELECT_H@ HAVE_SYS_SOCKET_H = @HAVE_SYS_SOCKET_H@ HAVE_SYS_TIME_H = @HAVE_SYS_TIME_H@ HAVE_SYS_TYPES_H = @HAVE_SYS_TYPES_H@ HAVE_SYS_UTSNAME_H = @HAVE_SYS_UTSNAME_H@ HAVE_TANL = @HAVE_TANL@ HAVE_TYPE_VOLATILE_SIG_ATOMIC_T = @HAVE_TYPE_VOLATILE_SIG_ATOMIC_T@ HAVE_UNAME = @HAVE_UNAME@ HAVE_UNISTD_H = @HAVE_UNISTD_H@ HAVE_UNLINKAT = @HAVE_UNLINKAT@ HAVE_UNSETENV = @HAVE_UNSETENV@ HAVE_UNSIGNED_LONG_LONG_INT = @HAVE_UNSIGNED_LONG_LONG_INT@ HAVE_USLEEP = @HAVE_USLEEP@ HAVE_UTIMENSAT = @HAVE_UTIMENSAT@ HAVE_VASPRINTF = @HAVE_VASPRINTF@ HAVE_VDPRINTF = @HAVE_VDPRINTF@ HAVE_WCHAR_H = @HAVE_WCHAR_H@ HAVE_WCHAR_T = @HAVE_WCHAR_T@ HAVE_WCRTOMB = @HAVE_WCRTOMB@ HAVE_WCSNRTOMBS = @HAVE_WCSNRTOMBS@ HAVE_WCSRTOMBS = @HAVE_WCSRTOMBS@ HAVE_WCTYPE_H = @HAVE_WCTYPE_H@ HAVE_WINSOCK2_H = @HAVE_WINSOCK2_H@ HAVE_WINT_T = @HAVE_WINT_T@ HAVE_WS2TCPIP_H = @HAVE_WS2TCPIP_H@ HAVE__BOOL = @HAVE__BOOL@ HOSTENT_LIB = @HOSTENT_LIB@ HTML_DIR = @HTML_DIR@ INCLTDL = @INCLTDL@ INCLUDE_NEXT = @INCLUDE_NEXT@ INCLUDE_NEXT_AS_FIRST_DIRECTIVE = @INCLUDE_NEXT_AS_FIRST_DIRECTIVE@ INET_NTOP_LIB = @INET_NTOP_LIB@ INET_PTON_LIB = @INET_PTON_LIB@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LD = @LD@ LDFLAGS = @LDFLAGS@ LEX = @LEX@ LEXLIB = @LEXLIB@ LEX_OUTPUT_ROOT = lex.yy LIBADD_DL = @LIBADD_DL@ LIBADD_DLD_LINK = @LIBADD_DLD_LINK@ LIBADD_DLOPEN = @LIBADD_DLOPEN@ LIBADD_SHL_LOAD = @LIBADD_SHL_LOAD@ LIBDIR = @LIBDIR@ LIBGCRYPT_CFLAGS = @LIBGCRYPT_CFLAGS@ LIBGCRYPT_CONFIG = @LIBGCRYPT_CONFIG@ LIBGCRYPT_LIBS = @LIBGCRYPT_LIBS@ LIBGNUTLS_CFLAGS = @LIBGNUTLS_CFLAGS@ LIBGNUTLS_CONFIG = @LIBGNUTLS_CONFIG@ LIBGNUTLS_EXTRA_CFLAGS = @LIBGNUTLS_EXTRA_CFLAGS@ LIBGNUTLS_EXTRA_CONFIG = @LIBGNUTLS_EXTRA_CONFIG@ LIBGNUTLS_EXTRA_LIBS = @LIBGNUTLS_EXTRA_LIBS@ LIBGNUTLS_LIBS = @LIBGNUTLS_LIBS@ LIBINTL = @LIBINTL@ LIBLTDL = @LIBLTDL@ LIBMULTITHREAD = @LIBMULTITHREAD@ LIBOBJS = @LIBOBJS@ LIBPRELUDECPP_SONAME = @LIBPRELUDECPP_SONAME@ LIBPRELUDE_CFLAGS = @LIBPRELUDE_CFLAGS@ LIBPRELUDE_LIBS = @LIBPRELUDE_LIBS@ LIBPRELUDE_SONAME = @LIBPRELUDE_SONAME@ LIBPTH = @LIBPTH@ LIBPTH_PREFIX = @LIBPTH_PREFIX@ LIBS = @LIBS@ LIBSOCKET = @LIBSOCKET@ LIBTESTS_LIBDEPS = @LIBTESTS_LIBDEPS@ LIBTHREAD = @LIBTHREAD@ LIBTOOL = @LIBTOOL@ LIPO = @LIPO@ LN_S = @LN_S@ LOCALCHARSET_TESTS_ENVIRONMENT = @LOCALCHARSET_TESTS_ENVIRONMENT@ LOCALE_FR = @LOCALE_FR@ LOCALE_FR_UTF8 = @LOCALE_FR_UTF8@ LOCALE_JA = @LOCALE_JA@ LOCALE_TR_UTF8 = @LOCALE_TR_UTF8@ LOCALE_ZH_CN = @LOCALE_ZH_CN@ LOCALSTATEDIR = @LOCALSTATEDIR@ LTALLOCA = @LTALLOCA@ LTDLDEPS = @LTDLDEPS@ LTDLINCL = @LTDLINCL@ LTDLOPEN = @LTDLOPEN@ LTLIBINTL = @LTLIBINTL@ LTLIBMULTITHREAD = @LTLIBMULTITHREAD@ LTLIBOBJS = @LTLIBOBJS@ LTLIBPTH = @LTLIBPTH@ LTLIBTHREAD = @LTLIBTHREAD@ LT_CONFIG_H = @LT_CONFIG_H@ LT_DLLOADERS = @LT_DLLOADERS@ LT_DLPREOPEN = @LT_DLPREOPEN@ LUA_CFLAGS = @LUA_CFLAGS@ LUA_CONFIG = @LUA_CONFIG@ LUA_LIBS = @LUA_LIBS@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MKDIR_P = @MKDIR_P@ NETDB_H = @NETDB_H@ NETINET_IN_H = @NETINET_IN_H@ NEXT_ARPA_INET_H = @NEXT_ARPA_INET_H@ NEXT_AS_FIRST_DIRECTIVE_ARPA_INET_H = @NEXT_AS_FIRST_DIRECTIVE_ARPA_INET_H@ NEXT_AS_FIRST_DIRECTIVE_ERRNO_H = @NEXT_AS_FIRST_DIRECTIVE_ERRNO_H@ NEXT_AS_FIRST_DIRECTIVE_FCNTL_H = @NEXT_AS_FIRST_DIRECTIVE_FCNTL_H@ NEXT_AS_FIRST_DIRECTIVE_FLOAT_H = @NEXT_AS_FIRST_DIRECTIVE_FLOAT_H@ NEXT_AS_FIRST_DIRECTIVE_LANGINFO_H = @NEXT_AS_FIRST_DIRECTIVE_LANGINFO_H@ NEXT_AS_FIRST_DIRECTIVE_MATH_H = @NEXT_AS_FIRST_DIRECTIVE_MATH_H@ NEXT_AS_FIRST_DIRECTIVE_NETDB_H = @NEXT_AS_FIRST_DIRECTIVE_NETDB_H@ NEXT_AS_FIRST_DIRECTIVE_NETINET_IN_H = @NEXT_AS_FIRST_DIRECTIVE_NETINET_IN_H@ NEXT_AS_FIRST_DIRECTIVE_SIGNAL_H = @NEXT_AS_FIRST_DIRECTIVE_SIGNAL_H@ NEXT_AS_FIRST_DIRECTIVE_STDDEF_H = @NEXT_AS_FIRST_DIRECTIVE_STDDEF_H@ NEXT_AS_FIRST_DIRECTIVE_STDINT_H = @NEXT_AS_FIRST_DIRECTIVE_STDINT_H@ NEXT_AS_FIRST_DIRECTIVE_STDIO_H = @NEXT_AS_FIRST_DIRECTIVE_STDIO_H@ NEXT_AS_FIRST_DIRECTIVE_STDLIB_H = @NEXT_AS_FIRST_DIRECTIVE_STDLIB_H@ NEXT_AS_FIRST_DIRECTIVE_STRINGS_H = @NEXT_AS_FIRST_DIRECTIVE_STRINGS_H@ NEXT_AS_FIRST_DIRECTIVE_STRING_H = @NEXT_AS_FIRST_DIRECTIVE_STRING_H@ NEXT_AS_FIRST_DIRECTIVE_SYS_IOCTL_H = @NEXT_AS_FIRST_DIRECTIVE_SYS_IOCTL_H@ NEXT_AS_FIRST_DIRECTIVE_SYS_SELECT_H = @NEXT_AS_FIRST_DIRECTIVE_SYS_SELECT_H@ NEXT_AS_FIRST_DIRECTIVE_SYS_SOCKET_H = @NEXT_AS_FIRST_DIRECTIVE_SYS_SOCKET_H@ NEXT_AS_FIRST_DIRECTIVE_SYS_STAT_H = @NEXT_AS_FIRST_DIRECTIVE_SYS_STAT_H@ NEXT_AS_FIRST_DIRECTIVE_SYS_TIME_H = @NEXT_AS_FIRST_DIRECTIVE_SYS_TIME_H@ NEXT_AS_FIRST_DIRECTIVE_SYS_UTSNAME_H = @NEXT_AS_FIRST_DIRECTIVE_SYS_UTSNAME_H@ NEXT_AS_FIRST_DIRECTIVE_TIME_H = @NEXT_AS_FIRST_DIRECTIVE_TIME_H@ NEXT_AS_FIRST_DIRECTIVE_UNISTD_H = @NEXT_AS_FIRST_DIRECTIVE_UNISTD_H@ NEXT_AS_FIRST_DIRECTIVE_WCHAR_H = @NEXT_AS_FIRST_DIRECTIVE_WCHAR_H@ NEXT_AS_FIRST_DIRECTIVE_WCTYPE_H = @NEXT_AS_FIRST_DIRECTIVE_WCTYPE_H@ NEXT_ERRNO_H = @NEXT_ERRNO_H@ NEXT_FCNTL_H = @NEXT_FCNTL_H@ NEXT_FLOAT_H = @NEXT_FLOAT_H@ NEXT_LANGINFO_H = @NEXT_LANGINFO_H@ NEXT_MATH_H = @NEXT_MATH_H@ NEXT_NETDB_H = @NEXT_NETDB_H@ NEXT_NETINET_IN_H = @NEXT_NETINET_IN_H@ NEXT_SIGNAL_H = @NEXT_SIGNAL_H@ NEXT_STDDEF_H = @NEXT_STDDEF_H@ NEXT_STDINT_H = @NEXT_STDINT_H@ NEXT_STDIO_H = @NEXT_STDIO_H@ NEXT_STDLIB_H = @NEXT_STDLIB_H@ NEXT_STRINGS_H = @NEXT_STRINGS_H@ NEXT_STRING_H = @NEXT_STRING_H@ NEXT_SYS_IOCTL_H = @NEXT_SYS_IOCTL_H@ NEXT_SYS_SELECT_H = @NEXT_SYS_SELECT_H@ NEXT_SYS_SOCKET_H = @NEXT_SYS_SOCKET_H@ NEXT_SYS_STAT_H = @NEXT_SYS_STAT_H@ NEXT_SYS_TIME_H = @NEXT_SYS_TIME_H@ NEXT_SYS_UTSNAME_H = @NEXT_SYS_UTSNAME_H@ NEXT_TIME_H = @NEXT_TIME_H@ NEXT_UNISTD_H = @NEXT_UNISTD_H@ NEXT_WCHAR_H = @NEXT_WCHAR_H@ NEXT_WCTYPE_H = @NEXT_WCTYPE_H@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PCFLAGS = @PCFLAGS@ PERL = @PERL@ PERL_EXTRA_PARAMS = @PERL_EXTRA_PARAMS@ PKG_CONFIG = @PKG_CONFIG@ POLL_H = @POLL_H@ PRAGMA_SYSTEM_HEADER = @PRAGMA_SYSTEM_HEADER@ PRELUDE_ADMIN_CFLAGS = @PRELUDE_ADMIN_CFLAGS@ PRELUDE_ADMIN_LIBS = @PRELUDE_ADMIN_LIBS@ PRELUDE_CONFIG_DIR = @PRELUDE_CONFIG_DIR@ PRELUDE_SPOOL_DIR = @PRELUDE_SPOOL_DIR@ PTHREAD_CFLAGS = @PTHREAD_CFLAGS@ PTHREAD_LDFLAGS = @PTHREAD_LDFLAGS@ PTHREAD_LIBS = @PTHREAD_LIBS@ PTRDIFF_T_SUFFIX = @PTRDIFF_T_SUFFIX@ PYTHON = @PYTHON@ RANLIB = @RANLIB@ RELOCATABLE = @RELOCATABLE@ REPLACE_BTOWC = @REPLACE_BTOWC@ REPLACE_CANONICALIZE_FILE_NAME = @REPLACE_CANONICALIZE_FILE_NAME@ REPLACE_CEILF = @REPLACE_CEILF@ REPLACE_CEILL = @REPLACE_CEILL@ REPLACE_CHOWN = @REPLACE_CHOWN@ REPLACE_CLOSE = @REPLACE_CLOSE@ REPLACE_DPRINTF = @REPLACE_DPRINTF@ REPLACE_DUP = @REPLACE_DUP@ REPLACE_DUP2 = @REPLACE_DUP2@ REPLACE_FCHDIR = @REPLACE_FCHDIR@ REPLACE_FCHOWNAT = @REPLACE_FCHOWNAT@ REPLACE_FCLOSE = @REPLACE_FCLOSE@ REPLACE_FCNTL = @REPLACE_FCNTL@ REPLACE_FFLUSH = @REPLACE_FFLUSH@ REPLACE_FLOORF = @REPLACE_FLOORF@ REPLACE_FLOORL = @REPLACE_FLOORL@ REPLACE_FOPEN = @REPLACE_FOPEN@ REPLACE_FPRINTF = @REPLACE_FPRINTF@ REPLACE_FPURGE = @REPLACE_FPURGE@ REPLACE_FREOPEN = @REPLACE_FREOPEN@ REPLACE_FREXP = @REPLACE_FREXP@ REPLACE_FREXPL = @REPLACE_FREXPL@ REPLACE_FSEEK = @REPLACE_FSEEK@ REPLACE_FSEEKO = @REPLACE_FSEEKO@ REPLACE_FSTAT = @REPLACE_FSTAT@ REPLACE_FSTATAT = @REPLACE_FSTATAT@ REPLACE_FTELL = @REPLACE_FTELL@ REPLACE_FTELLO = @REPLACE_FTELLO@ REPLACE_FUTIMENS = @REPLACE_FUTIMENS@ REPLACE_GETCWD = @REPLACE_GETCWD@ REPLACE_GETDELIM = @REPLACE_GETDELIM@ REPLACE_GETGROUPS = @REPLACE_GETGROUPS@ REPLACE_GETLINE = @REPLACE_GETLINE@ REPLACE_GETPAGESIZE = @REPLACE_GETPAGESIZE@ REPLACE_GETTIMEOFDAY = @REPLACE_GETTIMEOFDAY@ REPLACE_HUGE_VAL = @REPLACE_HUGE_VAL@ REPLACE_ISFINITE = @REPLACE_ISFINITE@ REPLACE_ISINF = @REPLACE_ISINF@ REPLACE_ISNAN = @REPLACE_ISNAN@ REPLACE_ISWCNTRL = @REPLACE_ISWCNTRL@ REPLACE_LCHOWN = @REPLACE_LCHOWN@ REPLACE_LDEXPL = @REPLACE_LDEXPL@ REPLACE_LINK = @REPLACE_LINK@ REPLACE_LINKAT = @REPLACE_LINKAT@ REPLACE_LOCALTIME_R = @REPLACE_LOCALTIME_R@ REPLACE_LSEEK = @REPLACE_LSEEK@ REPLACE_LSTAT = @REPLACE_LSTAT@ REPLACE_MBRLEN = @REPLACE_MBRLEN@ REPLACE_MBRTOWC = @REPLACE_MBRTOWC@ REPLACE_MBSINIT = @REPLACE_MBSINIT@ REPLACE_MBSNRTOWCS = @REPLACE_MBSNRTOWCS@ REPLACE_MBSRTOWCS = @REPLACE_MBSRTOWCS@ REPLACE_MBSTATE_T = @REPLACE_MBSTATE_T@ REPLACE_MEMCHR = @REPLACE_MEMCHR@ REPLACE_MEMMEM = @REPLACE_MEMMEM@ REPLACE_MKDIR = @REPLACE_MKDIR@ REPLACE_MKFIFO = @REPLACE_MKFIFO@ REPLACE_MKNOD = @REPLACE_MKNOD@ REPLACE_MKSTEMP = @REPLACE_MKSTEMP@ REPLACE_MKTIME = @REPLACE_MKTIME@ REPLACE_NAN = @REPLACE_NAN@ REPLACE_NANOSLEEP = @REPLACE_NANOSLEEP@ REPLACE_NL_LANGINFO = @REPLACE_NL_LANGINFO@ REPLACE_NULL = @REPLACE_NULL@ REPLACE_OBSTACK_PRINTF = @REPLACE_OBSTACK_PRINTF@ REPLACE_OPEN = @REPLACE_OPEN@ REPLACE_OPENAT = @REPLACE_OPENAT@ REPLACE_PERROR = @REPLACE_PERROR@ REPLACE_POPEN = @REPLACE_POPEN@ REPLACE_PREAD = @REPLACE_PREAD@ REPLACE_PRINTF = @REPLACE_PRINTF@ REPLACE_PUTENV = @REPLACE_PUTENV@ REPLACE_READLINK = @REPLACE_READLINK@ REPLACE_REALPATH = @REPLACE_REALPATH@ REPLACE_REMOVE = @REPLACE_REMOVE@ REPLACE_RENAME = @REPLACE_RENAME@ REPLACE_RENAMEAT = @REPLACE_RENAMEAT@ REPLACE_RMDIR = @REPLACE_RMDIR@ REPLACE_ROUND = @REPLACE_ROUND@ REPLACE_ROUNDF = @REPLACE_ROUNDF@ REPLACE_ROUNDL = @REPLACE_ROUNDL@ REPLACE_SELECT = @REPLACE_SELECT@ REPLACE_SETENV = @REPLACE_SETENV@ REPLACE_SIGNBIT = @REPLACE_SIGNBIT@ REPLACE_SIGNBIT_USING_GCC = @REPLACE_SIGNBIT_USING_GCC@ REPLACE_SLEEP = @REPLACE_SLEEP@ REPLACE_SNPRINTF = @REPLACE_SNPRINTF@ REPLACE_SPRINTF = @REPLACE_SPRINTF@ REPLACE_STAT = @REPLACE_STAT@ REPLACE_STDIO_WRITE_FUNCS = @REPLACE_STDIO_WRITE_FUNCS@ REPLACE_STRCASESTR = @REPLACE_STRCASESTR@ REPLACE_STRDUP = @REPLACE_STRDUP@ REPLACE_STRERROR = @REPLACE_STRERROR@ REPLACE_STRNDUP = @REPLACE_STRNDUP@ REPLACE_STRPTIME = @REPLACE_STRPTIME@ REPLACE_STRSIGNAL = @REPLACE_STRSIGNAL@ REPLACE_STRSTR = @REPLACE_STRSTR@ REPLACE_STRTOD = @REPLACE_STRTOD@ REPLACE_STRTOK_R = @REPLACE_STRTOK_R@ REPLACE_SYMLINK = @REPLACE_SYMLINK@ REPLACE_TIMEGM = @REPLACE_TIMEGM@ REPLACE_TRUNCL = @REPLACE_TRUNCL@ REPLACE_UNLINK = @REPLACE_UNLINK@ REPLACE_UNLINKAT = @REPLACE_UNLINKAT@ REPLACE_UNSETENV = @REPLACE_UNSETENV@ REPLACE_USLEEP = @REPLACE_USLEEP@ REPLACE_UTIMENSAT = @REPLACE_UTIMENSAT@ REPLACE_VASPRINTF = @REPLACE_VASPRINTF@ REPLACE_VDPRINTF = @REPLACE_VDPRINTF@ REPLACE_VFPRINTF = @REPLACE_VFPRINTF@ REPLACE_VPRINTF = @REPLACE_VPRINTF@ REPLACE_VSNPRINTF = @REPLACE_VSNPRINTF@ REPLACE_VSPRINTF = @REPLACE_VSPRINTF@ REPLACE_WCRTOMB = @REPLACE_WCRTOMB@ REPLACE_WCSNRTOMBS = @REPLACE_WCSNRTOMBS@ REPLACE_WCSRTOMBS = @REPLACE_WCSRTOMBS@ REPLACE_WCTOB = @REPLACE_WCTOB@ REPLACE_WCWIDTH = @REPLACE_WCWIDTH@ REPLACE_WRITE = @REPLACE_WRITE@ RUBY = @RUBY@ RUBY_CCFLAGS = @RUBY_CCFLAGS@ RUBY_EXEC_PREFIX = @RUBY_EXEC_PREFIX@ RUBY_INCLUDES = @RUBY_INCLUDES@ RUBY_LIBS = @RUBY_LIBS@ RUBY_PLATFORM = @RUBY_PLATFORM@ RUBY_PREFIX = @RUBY_PREFIX@ RUBY_VERSION = @RUBY_VERSION@ SED = @SED@ SERVENT_LIB = @SERVENT_LIB@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ SIG_ATOMIC_T_SUFFIX = @SIG_ATOMIC_T_SUFFIX@ SIZE_T_SUFFIX = @SIZE_T_SUFFIX@ STDBOOL_H = @STDBOOL_H@ STDDEF_H = @STDDEF_H@ STDINT_H = @STDINT_H@ STRIP = @STRIP@ SWIG = @SWIG@ SYSCONFDIR = @SYSCONFDIR@ SYS_IOCTL_H_HAVE_WINSOCK2_H = @SYS_IOCTL_H_HAVE_WINSOCK2_H@ SYS_IOCTL_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS = @SYS_IOCTL_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS@ SYS_SOCKET_H = @SYS_SOCKET_H@ SYS_TIME_H_DEFINES_STRUCT_TIMESPEC = @SYS_TIME_H_DEFINES_STRUCT_TIMESPEC@ TIME_H_DEFINES_STRUCT_TIMESPEC = @TIME_H_DEFINES_STRUCT_TIMESPEC@ UNDEFINE_STRTOK_R = @UNDEFINE_STRTOK_R@ UNISTD_H_HAVE_WINSOCK2_H = @UNISTD_H_HAVE_WINSOCK2_H@ UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS = @UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS@ VALGRIND = @VALGRIND@ VERSION = @VERSION@ WCHAR_T_SUFFIX = @WCHAR_T_SUFFIX@ WCTYPE_H = @WCTYPE_H@ WINT_T_SUFFIX = @WINT_T_SUFFIX@ YACC = @YACC@ YFLAGS = @YFLAGS@ YIELD_LIB = @YIELD_LIB@ __PRELUDE_64BIT_FORMAT_PREFIX = @__PRELUDE_64BIT_FORMAT_PREFIX@ __PRELUDE_HAVE_64BIT_LONG = @__PRELUDE_HAVE_64BIT_LONG@ __PRELUDE_HAVE_INTTYPES_H = @__PRELUDE_HAVE_INTTYPES_H@ __PRELUDE_HAVE_STDINT_H = @__PRELUDE_HAVE_STDINT_H@ __PRELUDE_STDINT_HAVE_UINT16 = @__PRELUDE_STDINT_HAVE_UINT16@ __PRELUDE_STDINT_HAVE_UINT32 = @__PRELUDE_STDINT_HAVE_UINT32@ __PRELUDE_STDINT_HAVE_UINT64 = @__PRELUDE_STDINT_HAVE_UINT64@ __PRELUDE_STDINT_HAVE_UINT8 = @__PRELUDE_STDINT_HAVE_UINT8@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ gl_LIBOBJS = @gl_LIBOBJS@ gl_LTLIBOBJS = @gl_LTLIBOBJS@ gltests_LIBOBJS = @gltests_LIBOBJS@ gltests_LTLIBOBJS = @gltests_LTLIBOBJS@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ lt_ECHO = @lt_ECHO@ ltdl_LIBOBJS = @ltdl_LIBOBJS@ ltdl_LTLIBOBJS = @ltdl_LTLIBOBJS@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ pkgrbexecdir = @pkgrbexecdir@ pkgrubydir = @pkgrubydir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ rbexecdir = @rbexecdir@ rubydir = @rubydir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sys_symbol_underscore = @sys_symbol_underscore@ sysconfdir = @sysconfdir@ target = @target@ target_alias = @target_alias@ target_cpu = @target_cpu@ target_os = @target_os@ target_vendor = @target_vendor@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ SUBDIRS = libprelude-error include AM_CPPFLAGS = @PCFLAGS@ -I$(srcdir)/include -I$(top_builddir) -I$(top_builddir)/src/include -I$(srcdir)/libprelude-error \ -I$(top_builddir)/libmissing -I$(top_srcdir)/libmissing $(LTDLINCL) @LIBPRELUDE_CFLAGS@ @LIBGNUTLS_CFLAGS@ @LIBGCRYPT_CFLAGS@ pkgconfigdir = $(libdir)/pkgconfig pkgconfig_DATA = libprelude.pc DISTCLEANFILES = $(pkgconfig_DATA) libpreludeincludedir = $(includedir)/ libprelude_la_LIBADD = @LIBPRELUDE_LIBS@ $(LIBLTDL) $(top_builddir)/libmissing/libmissing.la libprelude-error/libprelude-error.la libprelude_la_LDFLAGS = $(GETADDRINFO_LIB) $(GETHOSTNAME_LIB) $(HOSTENT_LIB) $(INET_NTOP_LIB) $(INET_PTON_LIB) $(LIBSOCKET) $(LTLIBINTL) $(LTLIBTHREAD) $(SERVENT_LIB) -no-undefined -version-info @LIBPRELUDE_SONAME@ -export-symbols-regex "^(idmef|_?prelude)_" lib_LTLIBRARIES = libprelude.la BUILT_SOURCES = $(LTDLDEPS) AM_YFLAGS = -d libprelude_la_SOURCES = \ common.c \ config-engine.c \ daemonize.c \ ntp.c \ tls-auth.c \ tls-util.c \ variable.c \ prelude.c \ prelude-async.c \ prelude-client.c \ prelude-client-profile.c \ prelude-connection.c \ prelude-connection-pool.c \ prelude-failover.c \ prelude-hash.c \ prelude-ident.c \ prelude-io.c \ prelude-log.c \ prelude-msg.c \ prelude-msgbuf.c \ prelude-option.c \ prelude-option-wide.c \ prelude-plugin.c \ prelude-string.c \ prelude-timer.c \ prelude-thread.c \ idmef-additional-data.c \ idmef-class.c \ idmef-criteria.c \ idmef-criteria-string.yac.y \ idmef-criteria-string.lex.l \ idmef-criterion-value.c \ idmef-data.c \ idmef-message-helpers.c \ idmef-message-print.c \ idmef-message-read.c \ idmef-message-write.c \ idmef-path.c \ idmef-time.c \ idmef-tree-wrap.c \ idmef-value.c \ idmef-value-type.c IDMEF_CRITERIA_STRING_LEX_O = idmef-criteria-string.lex.o IDMEF_CRITERIA_STRING_LEX_LO = idmef-criteria-string.lex.lo IDMEF_CRITERIA_STRING_YAC_O = idmef-criteria-string.yac.o IDMEF_CRITERIA_STRING_YAC_LO = idmef-criteria-string.yac.lo all: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) all-recursive .SUFFIXES: .SUFFIXES: .c .l .lo .o .obj .y $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu src/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): libprelude.pc: $(top_builddir)/config.status $(srcdir)/libprelude.pc.in cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ install-libLTLIBRARIES: $(lib_LTLIBRARIES) @$(NORMAL_INSTALL) test -z "$(libdir)" || $(MKDIR_P) "$(DESTDIR)$(libdir)" @list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \ list2=; for p in $$list; do \ if test -f $$p; then \ list2="$$list2 $$p"; \ else :; fi; \ done; \ test -z "$$list2" || { \ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(libdir)'"; \ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(libdir)"; \ } uninstall-libLTLIBRARIES: @$(NORMAL_UNINSTALL) @list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \ for p in $$list; do \ $(am__strip_dir) \ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(libdir)/$$f'"; \ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(libdir)/$$f"; \ done clean-libLTLIBRARIES: -test -z "$(lib_LTLIBRARIES)" || rm -f $(lib_LTLIBRARIES) @list='$(lib_LTLIBRARIES)'; for p in $$list; do \ dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ test "$$dir" != "$$p" || dir=.; \ echo "rm -f \"$${dir}/so_locations\""; \ rm -f "$${dir}/so_locations"; \ done idmef-criteria-string.yac.h: idmef-criteria-string.yac.c @if test ! -f $@; then \ rm -f idmef-criteria-string.yac.c; \ $(MAKE) $(AM_MAKEFLAGS) idmef-criteria-string.yac.c; \ else :; fi libprelude.la: $(libprelude_la_OBJECTS) $(libprelude_la_DEPENDENCIES) $(libprelude_la_LINK) -rpath $(libdir) $(libprelude_la_OBJECTS) $(libprelude_la_LIBADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/common.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/config-engine.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/daemonize.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/idmef-additional-data.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/idmef-class.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/idmef-criteria-string.lex.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/idmef-criteria-string.yac.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/idmef-criteria.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/idmef-criterion-value.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/idmef-data.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/idmef-message-helpers.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/idmef-message-print.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/idmef-message-read.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/idmef-message-write.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/idmef-path.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/idmef-time.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/idmef-tree-wrap.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/idmef-value-type.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/idmef-value.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ntp.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/prelude-async.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/prelude-client-profile.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/prelude-client.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/prelude-connection-pool.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/prelude-connection.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/prelude-failover.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/prelude-hash.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/prelude-ident.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/prelude-io.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/prelude-log.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/prelude-msg.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/prelude-msgbuf.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/prelude-option-wide.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/prelude-option.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/prelude-plugin.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/prelude-string.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/prelude-thread.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/prelude-timer.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/prelude.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tls-auth.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tls-util.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/variable.Plo@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(COMPILE) -c $< .c.obj: @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` .c.lo: @am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< .l.c: $(am__skiplex) $(SHELL) $(YLWRAP) $< $(LEX_OUTPUT_ROOT).c $@ -- $(LEXCOMPILE) .y.c: $(am__skipyacc) $(SHELL) $(YLWRAP) $< y.tab.c $@ y.tab.h $*.h y.output $*.output -- $(YACCCOMPILE) mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs install-pkgconfigDATA: $(pkgconfig_DATA) @$(NORMAL_INSTALL) test -z "$(pkgconfigdir)" || $(MKDIR_P) "$(DESTDIR)$(pkgconfigdir)" @list='$(pkgconfig_DATA)'; test -n "$(pkgconfigdir)" || list=; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ done | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(pkgconfigdir)'"; \ $(INSTALL_DATA) $$files "$(DESTDIR)$(pkgconfigdir)" || exit $$?; \ done uninstall-pkgconfigDATA: @$(NORMAL_UNINSTALL) @list='$(pkgconfig_DATA)'; test -n "$(pkgconfigdir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ test -n "$$files" || exit 0; \ echo " ( cd '$(DESTDIR)$(pkgconfigdir)' && rm -f" $$files ")"; \ cd "$(DESTDIR)$(pkgconfigdir)" && rm -f $$files # This directory's subdirectories are mostly independent; you can cd # into them and run `make' without going through this Makefile. # To change the values of `make' variables: instead of editing Makefiles, # (1) if the variable is set in `config.status', edit `config.status' # (which will cause the Makefiles to be regenerated when you run `make'); # (2) otherwise, pass the desired values on the `make' command line. $(RECURSIVE_TARGETS): @fail= failcom='exit 1'; \ for f in x $$MAKEFLAGS; do \ case $$f in \ *=* | --[!k]*);; \ *k*) failcom='fail=yes';; \ esac; \ done; \ dot_seen=no; \ target=`echo $@ | sed s/-recursive//`; \ list='$(SUBDIRS)'; for subdir in $$list; do \ echo "Making $$target in $$subdir"; \ if test "$$subdir" = "."; then \ dot_seen=yes; \ local_target="$$target-am"; \ else \ local_target="$$target"; \ fi; \ ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ || eval $$failcom; \ done; \ if test "$$dot_seen" = "no"; then \ $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ fi; test -z "$$fail" $(RECURSIVE_CLEAN_TARGETS): @fail= failcom='exit 1'; \ for f in x $$MAKEFLAGS; do \ case $$f in \ *=* | --[!k]*);; \ *k*) failcom='fail=yes';; \ esac; \ done; \ dot_seen=no; \ case "$@" in \ distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ *) list='$(SUBDIRS)' ;; \ esac; \ rev=''; for subdir in $$list; do \ if test "$$subdir" = "."; then :; else \ rev="$$subdir $$rev"; \ fi; \ done; \ rev="$$rev ."; \ target=`echo $@ | sed s/-recursive//`; \ for subdir in $$rev; do \ echo "Making $$target in $$subdir"; \ if test "$$subdir" = "."; then \ local_target="$$target-am"; \ else \ local_target="$$target"; \ fi; \ ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ || eval $$failcom; \ done && test -z "$$fail" tags-recursive: list='$(SUBDIRS)'; for subdir in $$list; do \ test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \ done ctags-recursive: list='$(SUBDIRS)'; for subdir in $$list; do \ test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \ done ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ mkid -fID $$unique tags: TAGS TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) set x; \ here=`pwd`; \ if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ include_option=--etags-include; \ empty_fix=.; \ else \ include_option=--include; \ empty_fix=; \ fi; \ list='$(SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ test ! -f $$subdir/TAGS || \ set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \ fi; \ done; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: CTAGS CTAGS: ctags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ test -d "$(distdir)/$$subdir" \ || $(MKDIR_P) "$(distdir)/$$subdir" \ || exit 1; \ fi; \ done @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ dir1=$$subdir; dir2="$(distdir)/$$subdir"; \ $(am__relativize); \ new_distdir=$$reldir; \ dir1=$$subdir; dir2="$(top_distdir)"; \ $(am__relativize); \ new_top_distdir=$$reldir; \ echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \ echo " am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \ ($(am__cd) $$subdir && \ $(MAKE) $(AM_MAKEFLAGS) \ top_distdir="$$new_top_distdir" \ distdir="$$new_distdir" \ am__remove_distdir=: \ am__skip_length_check=: \ am__skip_mode_fix=: \ distdir) \ || exit 1; \ fi; \ done check-am: all-am check: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) check-recursive all-am: Makefile $(LTLIBRARIES) $(DATA) installdirs: installdirs-recursive installdirs-am: for dir in "$(DESTDIR)$(libdir)" "$(DESTDIR)$(pkgconfigdir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) install-recursive install-exec: install-exec-recursive install-data: install-data-recursive uninstall: uninstall-recursive install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-recursive install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) -test -z "$(DISTCLEANFILES)" || rm -f $(DISTCLEANFILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." -rm -f idmef-criteria-string.lex.c -rm -f idmef-criteria-string.yac.c -rm -f idmef-criteria-string.yac.h -test -z "$(BUILT_SOURCES)" || rm -f $(BUILT_SOURCES) clean: clean-recursive clean-am: clean-generic clean-libLTLIBRARIES clean-libtool \ mostlyclean-am distclean: distclean-recursive -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-recursive dvi-am: html: html-recursive html-am: info: info-recursive info-am: install-data-am: install-pkgconfigDATA install-dvi: install-dvi-recursive install-dvi-am: install-exec-am: install-libLTLIBRARIES install-html: install-html-recursive install-html-am: install-info: install-info-recursive install-info-am: install-man: install-pdf: install-pdf-recursive install-pdf-am: install-ps: install-ps-recursive install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-recursive -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-recursive mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-recursive pdf-am: ps: ps-recursive ps-am: uninstall-am: uninstall-libLTLIBRARIES uninstall-pkgconfigDATA .MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) all check \ ctags-recursive install install-am install-strip \ tags-recursive .PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \ all all-am check check-am clean clean-generic \ clean-libLTLIBRARIES clean-libtool ctags ctags-recursive \ distclean distclean-compile distclean-generic \ distclean-libtool distclean-tags distdir dvi dvi-am html \ html-am info info-am install install-am install-data \ install-data-am install-dvi install-dvi-am install-exec \ install-exec-am install-html install-html-am install-info \ install-info-am install-libLTLIBRARIES install-man install-pdf \ install-pdf-am install-pkgconfigDATA install-ps install-ps-am \ install-strip installcheck installcheck-am installdirs \ installdirs-am maintainer-clean maintainer-clean-generic \ mostlyclean mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf pdf-am ps ps-am tags tags-recursive \ uninstall uninstall-am uninstall-libLTLIBRARIES \ uninstall-pkgconfigDATA $(IDMEF_CRITERIA_STRING_LEX_O): idmef-criteria-string.lex.c $(MAKE) idmef-criteria-string.lex.o CFLAGS="$(CFLAGS) -include $(top_builddir)/config.h" IDMEF_CRITERIA_STRING_LEX_O=dummy-idmef-criteria-string.lex.o $(IDMEF_CRITERIA_STRING_LEX_LO): idmef-criteria-string.lex.c $(MAKE) idmef-criteria-string.lex.lo CFLAGS="$(CFLAGS) -include $(top_builddir)/config.h" IDMEF_CRITERIA_STRING_LEX_LO=dummy-idmef-criteria-string.lex.lo $(IDMEF_CRITERIA_STRING_YAC_O): idmef-criteria-string.yac.c $(MAKE) idmef-criteria-string.yac.o CFLAGS="$(CFLAGS) -include $(top_builddir)/config.h" IDMEF_CRITERIA_STRING_YAC_O=dummy-idmef-criteria-string.yac.o $(IDMEF_CRITERIA_STRING_YAC_LO): idmef-criteria-string.yac.c $(MAKE) idmef-criteria-string.yac.lo CFLAGS="$(CFLAGS) -include $(top_builddir)/config.h" IDMEF_CRITERIA_STRING_YAC_LO=dummy-idmef-criteria-string.yac.lo -include $(top_srcdir)/git.mk # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: libprelude-1.0.0/src/include/0000775000076400007640000000000011347714754013101 500000000000000libprelude-1.0.0/src/include/prelude-ident.h0000664000076400007640000000261511202225026015712 00000000000000/***** * * Copyright (C) 2001, 2002, 2003, 2004, 2005 PreludeIDS Technologies. All Rights Reserved. * Author: Yoann Vandoorselaere * * This file is part of the Prelude library. * * 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; see the file COPYING. If not, write to * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. * *****/ #ifndef _LIBPRELUDE_PRELUDE_IDENT_H #define _LIBPRELUDE_PRELUDE_IDENT_H #include "prelude-inttypes.h" #include "prelude-string.h" #ifdef __cplusplus extern "C" { #endif typedef struct prelude_ident prelude_ident_t; int prelude_ident_generate(prelude_ident_t *ident, prelude_string_t *out); uint64_t prelude_ident_inc(prelude_ident_t *ident); void prelude_ident_destroy(prelude_ident_t *ident); int prelude_ident_new(prelude_ident_t **ret); #ifdef __cplusplus } #endif #endif /* _LIBPRELUDE_PRELUDE_IDENT_H */ libprelude-1.0.0/src/include/idmef-message-read.h0000664000076400007640000000673611202225026016600 00000000000000 /***** * * Copyright (C) 2001, 2002, 2003, 2004, 2005 PreludeIDS Technologies. All Rights Reserved. * Author: Yoann Vandoorselaere * Author: Nicolas Delon * * This file is part of the Prelude library. * * 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; see the file COPYING. If not, write to * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. * *****/ /* Auto-generated by the GenerateIDMEFMessageReadH package */ #ifndef _LIBPRELUDE_IDMEF_MESSAGE_READ_H #define _LIBPRELUDE_IDMEF_MESSAGE_READ_H #include "prelude-inttypes.h" #include "prelude-msgbuf.h" #ifdef __cplusplus extern "C" { #endif int idmef_additional_data_read(idmef_additional_data_t *additional_data, prelude_msg_t *msg); int idmef_reference_read(idmef_reference_t *reference, prelude_msg_t *msg); int idmef_classification_read(idmef_classification_t *classification, prelude_msg_t *msg); int idmef_user_id_read(idmef_user_id_t *user_id, prelude_msg_t *msg); int idmef_user_read(idmef_user_t *user, prelude_msg_t *msg); int idmef_address_read(idmef_address_t *address, prelude_msg_t *msg); int idmef_process_read(idmef_process_t *process, prelude_msg_t *msg); int idmef_web_service_read(idmef_web_service_t *web_service, prelude_msg_t *msg); int idmef_snmp_service_read(idmef_snmp_service_t *snmp_service, prelude_msg_t *msg); int idmef_service_read(idmef_service_t *service, prelude_msg_t *msg); int idmef_node_read(idmef_node_t *node, prelude_msg_t *msg); int idmef_source_read(idmef_source_t *source, prelude_msg_t *msg); int idmef_file_access_read(idmef_file_access_t *file_access, prelude_msg_t *msg); int idmef_inode_read(idmef_inode_t *inode, prelude_msg_t *msg); int idmef_checksum_read(idmef_checksum_t *checksum, prelude_msg_t *msg); int idmef_file_read(idmef_file_t *file, prelude_msg_t *msg); int idmef_linkage_read(idmef_linkage_t *linkage, prelude_msg_t *msg); int idmef_target_read(idmef_target_t *target, prelude_msg_t *msg); int idmef_analyzer_read(idmef_analyzer_t *analyzer, prelude_msg_t *msg); int idmef_alertident_read(idmef_alertident_t *alertident, prelude_msg_t *msg); int idmef_impact_read(idmef_impact_t *impact, prelude_msg_t *msg); int idmef_action_read(idmef_action_t *action, prelude_msg_t *msg); int idmef_confidence_read(idmef_confidence_t *confidence, prelude_msg_t *msg); int idmef_assessment_read(idmef_assessment_t *assessment, prelude_msg_t *msg); int idmef_tool_alert_read(idmef_tool_alert_t *tool_alert, prelude_msg_t *msg); int idmef_correlation_alert_read(idmef_correlation_alert_t *correlation_alert, prelude_msg_t *msg); int idmef_overflow_alert_read(idmef_overflow_alert_t *overflow_alert, prelude_msg_t *msg); int idmef_alert_read(idmef_alert_t *alert, prelude_msg_t *msg); int idmef_heartbeat_read(idmef_heartbeat_t *heartbeat, prelude_msg_t *msg); int idmef_message_read(idmef_message_t *message, prelude_msg_t *msg); #ifdef __cplusplus } #endif #endif /* _LIBPRELUDE_IDMEF_MESSAGE_READ_H */ libprelude-1.0.0/src/include/prelude-msgbuf.h0000664000076400007640000000376611202225026016102 00000000000000/***** * * Copyright (C) 2001, 2002, 2003, 2004, 2005 PreludeIDS Technologies. All Rights Reserved. * Author: Yoann Vandoorselaere * * This file is part of the Prelude library. * * 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; see the file COPYING. If not, write to * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. * *****/ #ifndef _LIBPRELUDE_PRELUDE_MSGBUF_H #define _LIBPRELUDE_PRELUDE_MSGBUF_H #ifdef __cplusplus extern "C" { #endif typedef struct prelude_msgbuf prelude_msgbuf_t; typedef enum { PRELUDE_MSGBUF_FLAGS_ASYNC = 0x01 } prelude_msgbuf_flags_t; #include "prelude-client.h" #include "prelude-msg.h" int prelude_msgbuf_new(prelude_msgbuf_t **msgbuf); void prelude_msgbuf_destroy(prelude_msgbuf_t *msgbuf); void prelude_msgbuf_mark_end(prelude_msgbuf_t *msgbuf); int prelude_msgbuf_set(prelude_msgbuf_t *msgbuf, uint8_t tag, uint32_t len, const void *data); prelude_msg_t *prelude_msgbuf_get_msg(prelude_msgbuf_t *msgbuf); void prelude_msgbuf_set_callback(prelude_msgbuf_t *msgbuf, int (*send_msg)(prelude_msgbuf_t *msgbuf, prelude_msg_t *msg)); void prelude_msgbuf_set_data(prelude_msgbuf_t *msgbuf, void *data); void *prelude_msgbuf_get_data(prelude_msgbuf_t *msgbuf); void prelude_msgbuf_set_flags(prelude_msgbuf_t *msgbuf, prelude_msgbuf_flags_t flags); prelude_msgbuf_flags_t prelude_msgbuf_get_flags(prelude_msgbuf_t *msgbuf); #ifdef __cplusplus } #endif #endif /* _LIBPRELUDE_PRELUDE_MSGBUF_H */ libprelude-1.0.0/src/include/prelude-inttypes.h.in0000664000076400007640000001231511345707014017103 00000000000000/***** * * Copyright (C) 2004, 2005 PreludeIDS Technologies. All Rights Reserved. * Author: Yoann Vandoorselaere * * This file is part of the Prelude library. * * 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; see the file COPYING. If not, write to * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. * *****/ #ifndef _LIBPRELUDE_INTTYPES_H #define _LIBPRELUDE_INTTYPES_H #ifdef __cplusplus extern "C" { #endif /* * Defined by ax_create_prelude_inttypes_h.m4 */ @__PRELUDE_HAVE_STDINT_H@ @__PRELUDE_HAVE_INTTYPES_H@ @__PRELUDE_HAVE_64BIT_LONG@ @__PRELUDE_STDINT_HAVE_UINT8@ @__PRELUDE_STDINT_HAVE_UINT16@ @__PRELUDE_STDINT_HAVE_UINT32@ @__PRELUDE_STDINT_HAVE_UINT64@ @__PRELUDE_64BIT_FORMAT_PREFIX@ #ifdef __PRELUDE_HAVE_64BIT_LONG #define __PRELUDE_INT64_SUFFIX(x) x ## L #define __PRELUDE_UINT64_SUFFIX(x) x ## UL #else #define __PRELUDE_INT64_SUFFIX(x) x ## LL #define __PRELUDE_UINT64_SUFFIX(x) x ##ULL #endif #ifdef HAVE_CONFIG_H # include "config.h" #endif #ifdef __PRELUDE_HAVE_STDINT_H # include #endif #ifdef __PRELUDE_HAVE_INTTYPES_H # include #endif #include #ifndef TRUE # define TRUE 1 #endif #ifndef FALSE # define FALSE 0 #endif /* * Minimum of signed integral types. */ #define PRELUDE_INT8_MIN (-128) #define PRELUDE_INT16_MIN (-32767 - 1) #define PRELUDE_INT32_MIN (-2147483647 - 1) #define PRELUDE_INT64_MIN (-__PRELUDE_INT64_SUFFIX(9223372036854775807) - 1) /* * Maximum of signed integral types. */ #define PRELUDE_INT8_MAX (127) #define PRELUDE_INT16_MAX (32767) #define PRELUDE_INT32_MAX (2147483647) #define PRELUDE_INT64_MAX (__PRELUDE_INT64_SUFFIX(9223372036854775807)) /* * Maximum of unsigned integral types. */ #define PRELUDE_UINT8_MAX (255) #define PRELUDE_UINT16_MAX (65535) #define PRELUDE_UINT32_MAX (4294967295U) #define PRELUDE_UINT64_MAX (__PRELUDE_UINT64_SUFFIX(18446744073709551615)) /* * Other */ #define PRELUDE_INTMAX_MIN INT64_MIN #define PRELUDE_INTMAX_MAX INT64_MAX #define PRELUDE_UINTMAX_MAX UINT64_MAX /* * Tandem NonStop R series and compatible platforms released before * July 2005 support %Ld but not %lld. */ # if defined _TNS_R_TARGET # define _LONG_LONG_FORMAT_PREFIX "L" # else # define _LONG_LONG_FORMAT_PREFIX "ll" # endif #if PRELUDE_INT64_MAX == LONG_MAX # define __PRELUDE_64BIT_FORMAT_PREFIX "l" #elif defined _MSC_VER || defined __MINGW32__ # define __PRELUDE_64BIT_FORMAT_PREFIX "I64" #elif @HAVE_LONG_LONG_INT@ && LONG_MAX >> 30 == 1 # define __PRELUDE_64BIT_FORMAT_PREFIX _LONG_LONG_FORMAT_PREFIX #endif /* * format specifier */ #define PRELUDE_PRId64 __PRELUDE_64BIT_FORMAT_PREFIX "d" #define PRELUDE_PRIi64 __PRELUDE_64BIT_FORMAT_PREFIX "i" #define PRELUDE_PRIo64 __PRELUDE_64BIT_FORMAT_PREFIX "o" #define PRELUDE_PRIx64 __PRELUDE_64BIT_FORMAT_PREFIX "x" #define PRELUDE_PRIX64 __PRELUDE_64BIT_FORMAT_PREFIX "X" #define PRELUDE_PRIu64 __PRELUDE_64BIT_FORMAT_PREFIX "u" #define PRELUDE_PRId32 "d" #define PRELUDE_PRIi32 "i" #define PRELUDE_PRIo32 "o" #define PRELUDE_PRIx32 "x" #define PRELUDE_PRIX32 "X" #define PRELUDE_PRIu32 "u" #define PRELUDE_PRId16 "d" #define PRELUDE_PRIi16 "i" #define PRELUDE_PRIo16 "o" #define PRELUDE_PRIx16 "x" #define PRELUDE_PRIX16 "X" #define PRELUDE_PRIu16 "u" #define PRELUDE_PRId8 "d" #define PRELUDE_PRIi8 "i" #define PRELUDE_PRIo8 "o" #define PRELUDE_PRIx8 "x" #define PRELUDE_PRIX8 "X" #define PRELUDE_PRIu8 "u" #define PRELUDE_SCNd64 __PRELUDE_64BIT_FORMAT_PREFIX "d" #define PRELUDE_SCNi64 __PRELUDE_64BIT_FORMAT_PREFIX "i" #define PRELUDE_SCNo64 __PRELUDE_64BIT_FORMAT_PREFIX "o" #define PRELUDE_SCNx64 __PRELUDE_64BIT_FORMAT_PREFIX "x" #define PRELUDE_SCNu64 __PRELUDE_64BIT_FORMAT_PREFIX "u" /* * Type definition */ typedef enum { PRELUDE_BOOL_TRUE = TRUE, PRELUDE_BOOL_FALSE = FALSE } prelude_bool_t; #ifndef __PRELUDE_STDINT_HAVE_UINT8 typedef signed char int8_t; typedef unsigned char uint8_t; #endif #ifndef __PRELUDE_STDINT_HAVE_UINT16 typedef short int16_t; typedef unsigned short uint16_t; #endif #ifndef __PRELUDE_STDINT_HAVE_UINT32 typedef int int32_t; typedef unsigned int uint32_t; #endif #ifndef __PRELUDE_STDINT_HAVE_UINT64 # ifdef __PRELUDE_HAVE_64BIT_LONG typedef long int64_t; typedef unsigned long uint64_t; # else typedef long long int64_t; typedef unsigned long long uint64_t; # endif #endif #ifdef __cplusplus } #endif #endif /* _LIBPRELUDE_INTTYPES_H */ libprelude-1.0.0/src/include/prelude-message-id.h0000664000076400007640000000526211202225026016626 00000000000000/***** * * Copyright (C) 2001, 2002, 2003, 2004, 2005 PreludeIDS Technologies. All Rights Reserved. * Author: Yoann Vandoorselaere * * This file is part of the Prelude library. * * 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; see the file COPYING. If not, write to * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. * *****/ #ifndef _LIBPRELUDE_PRELUDE_MESSAGE_ID_H #define _LIBPRELUDE_PRELUDE_MESSAGE_ID_H /* * Top level message tag (to be used with prelude_msg_new()). */ #define PRELUDE_MSG_IDMEF 0 #define PRELUDE_MSG_ID 3 #define PRELUDE_MSG_AUTH 4 #define PRELUDE_MSG_CM 5 #define PRELUDE_MSG_CONNECTION_CAPABILITY 6 #define PRELUDE_MSG_OPTION_REQUEST 7 #define PRELUDE_MSG_OPTION_REPLY 8 /* * PRELUDE_MSG_ID submessage */ #define PRELUDE_MSG_ID_DECLARE 0 /* * authentication msg */ #define PRELUDE_MSG_AUTH_SUCCEED 6 #define PRELUDE_MSG_AUTH_FAILED 7 /* * PRELUDE_MSG_CM submessages */ #define PRELUDE_MSG_CM_FIREWALL 0 #define PRELUDE_MSG_CM_THROTTLE 1 #define PRELUDE_MSG_CM_ISLAND 2 #define PRELUDE_MSG_CM_FEATURE 3 /* * PRELUDE_MSG_OPTION submessages */ #define PRELUDE_MSG_OPTION_TARGET_ID 0 #define PRELUDE_MSG_OPTION_LIST 2 #define PRELUDE_MSG_OPTION_VALUE 3 #define PRELUDE_MSG_OPTION_SET 4 #define PRELUDE_MSG_OPTION_GET 5 #define PRELUDE_MSG_OPTION_REQUEST_ID 6 #define PRELUDE_MSG_OPTION_ERROR 7 #define PRELUDE_MSG_OPTION_START 8 #define PRELUDE_MSG_OPTION_END 9 #define PRELUDE_MSG_OPTION_NAME 10 #define PRELUDE_MSG_OPTION_DESC 11 #define PRELUDE_MSG_OPTION_HAS_ARG 12 #define PRELUDE_MSG_OPTION_HELP 13 #define PRELUDE_MSG_OPTION_INPUT_VALIDATION 14 #define PRELUDE_MSG_OPTION_INPUT_TYPE 15 #define PRELUDE_MSG_OPTION_ARG 16 #define PRELUDE_MSG_OPTION_TYPE 17 #define PRELUDE_MSG_OPTION_DESTROY 18 #define PRELUDE_MSG_OPTION_COMMIT 19 #define PRELUDE_MSG_OPTION_HOP 20 #define PRELUDE_MSG_OPTION_TARGET_INSTANCE_ID 21 #endif /* _LIBPRELUDE_PRELUDE_MESSAGE_ID_H */ libprelude-1.0.0/src/include/idmef-data.h0000664000076400007640000001354111202225026015144 00000000000000/***** * * Copyright (C) 2003, 2004, 2005 PreludeIDS Technologies. All Rights Reserved. * Author: Nicolas Delon * * This file is part of the Prelude library. * * 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; see the file COPYING. If not, write to * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. * *****/ #ifndef _LIBPRELUDE_IDMEF_DATA_H #define _LIBPRELUDE_IDMEF_DATA_H #include "prelude-list.h" #ifdef __cplusplus extern "C" { #endif typedef enum { IDMEF_DATA_TYPE_UNKNOWN = 0, IDMEF_DATA_TYPE_CHAR = 1, IDMEF_DATA_TYPE_BYTE = 2, IDMEF_DATA_TYPE_UINT32 = 3, IDMEF_DATA_TYPE_UINT64 = 4, IDMEF_DATA_TYPE_FLOAT = 5, IDMEF_DATA_TYPE_CHAR_STRING = 6, IDMEF_DATA_TYPE_BYTE_STRING = 7 } idmef_data_type_t; typedef struct { int refcount; int flags; idmef_data_type_t type; size_t len; union { char char_data; uint8_t byte_data; uint32_t uint32_data; uint64_t uint64_data; float float_data; void *rw_data; const void *ro_data; } data; prelude_list_t list; } idmef_data_t; int idmef_data_new(idmef_data_t **data); idmef_data_t *idmef_data_ref(idmef_data_t *data); int idmef_data_new_char(idmef_data_t **data, char c); int idmef_data_new_byte(idmef_data_t **data, uint8_t i); int idmef_data_new_uint32(idmef_data_t **data, uint32_t i); int idmef_data_new_uint64(idmef_data_t **data, uint64_t i); int idmef_data_new_float(idmef_data_t **data, float f); void idmef_data_set_char(idmef_data_t *data, char c); void idmef_data_set_byte(idmef_data_t *data, uint8_t i); void idmef_data_set_uint32(idmef_data_t *data, uint32_t i); void idmef_data_set_uint64(idmef_data_t *data, uint64_t i); void idmef_data_set_float(idmef_data_t *data, float f); int idmef_data_set_ptr_dup_fast(idmef_data_t *data, idmef_data_type_t type, const void *ptr, size_t len); int idmef_data_set_ptr_ref_fast(idmef_data_t *data, idmef_data_type_t type, const void *ptr, size_t len); int idmef_data_set_ptr_nodup_fast(idmef_data_t *data, idmef_data_type_t type, void *ptr, size_t len); int idmef_data_new_ptr_dup_fast(idmef_data_t **data, idmef_data_type_t type, const void *ptr, size_t len); int idmef_data_new_ptr_ref_fast(idmef_data_t **data, idmef_data_type_t type, const void *ptr, size_t len); int idmef_data_new_ptr_nodup_fast(idmef_data_t **data, idmef_data_type_t type, void *ptr, size_t len); /* * String functions */ int idmef_data_set_char_string_dup_fast(idmef_data_t *data, const char *str, size_t len); int idmef_data_new_char_string_dup_fast(idmef_data_t **data, const char *str, size_t len); int idmef_data_new_char_string_ref_fast(idmef_data_t **data, const char *ptr, size_t len); int idmef_data_new_char_string_nodup_fast(idmef_data_t **data, char *ptr, size_t len); int idmef_data_set_char_string_ref_fast(idmef_data_t *data, const char *ptr, size_t len); int idmef_data_set_char_string_nodup_fast(idmef_data_t *data, char *ptr, size_t len); int idmef_data_new_char_string_ref(idmef_data_t **data, const char *ptr); int idmef_data_new_char_string_dup(idmef_data_t **data, const char *ptr); int idmef_data_new_char_string_nodup(idmef_data_t **data, char *ptr); int idmef_data_set_char_string_ref(idmef_data_t *data, const char *ptr); int idmef_data_set_char_string_dup(idmef_data_t *data, const char *ptr); int idmef_data_set_char_string_nodup(idmef_data_t *data, char *ptr); #define idmef_data_set_char_string_constant(string, str) \ idmef_data_set_char_string_ref_fast((string), (str), sizeof((str)) - 1) /* * Byte functions */ int idmef_data_new_byte_string_ref(idmef_data_t **data, const unsigned char *ptr, size_t len); int idmef_data_new_byte_string_dup(idmef_data_t **data, const unsigned char *ptr, size_t len); int idmef_data_new_byte_string_nodup(idmef_data_t **data, unsigned char *ptr, size_t len); int idmef_data_set_byte_string_ref(idmef_data_t *data, const unsigned char *ptr, size_t len); int idmef_data_set_byte_string_dup(idmef_data_t *data, const unsigned char *ptr, size_t len); int idmef_data_set_byte_string_nodup(idmef_data_t *data, unsigned char *ptr, size_t len); /* * */ void idmef_data_destroy(idmef_data_t *data); int idmef_data_copy_ref(const idmef_data_t *src, idmef_data_t *dst); int idmef_data_copy_dup(const idmef_data_t *src, idmef_data_t *dst); int idmef_data_clone(const idmef_data_t *src, idmef_data_t **dst); idmef_data_type_t idmef_data_get_type(const idmef_data_t *data); size_t idmef_data_get_len(const idmef_data_t *data); const void *idmef_data_get_data(const idmef_data_t *data); char idmef_data_get_char(const idmef_data_t *data); uint8_t idmef_data_get_byte(const idmef_data_t *data); uint32_t idmef_data_get_uint32(const idmef_data_t *data); uint64_t idmef_data_get_uint64(const idmef_data_t *data); float idmef_data_get_float(const idmef_data_t *data); const char *idmef_data_get_char_string(const idmef_data_t *data); const unsigned char *idmef_data_get_byte_string(const idmef_data_t *data); prelude_bool_t idmef_data_is_empty(const idmef_data_t *data); int idmef_data_to_string(const idmef_data_t *data, prelude_string_t *out); void idmef_data_destroy_internal(idmef_data_t *data); int idmef_data_compare(const idmef_data_t *data1, const idmef_data_t *data2); #ifdef __cplusplus } #endif #endif /* _LIBPRELUDE_IDMEF_DATA_H */ libprelude-1.0.0/src/include/prelude-extract.h0000664000076400007640000001425611345707014016277 00000000000000/***** * * Copyright (C) 2002, 2003, 2004, 2005 PreludeIDS Technologies. All Rights Reserved. * Author: Yoann Vandoorselaere * * This file is part of the Prelude library. * * 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; see the file COPYING. If not, write to * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. * *****/ #ifndef _LIBPRELUDE_EXTRACT_H #define _LIBPRELUDE_EXTRACT_H #include "prelude-config.h" #ifdef HAVE_CONFIG_H # include "config.h" #endif #ifndef WIN32 # include #else # include #endif #include "prelude-inttypes.h" #ifdef PRELUDE_ALIGNED_ACCESS #include /* for memmove */ #ifdef __cplusplus extern "C" { #endif /* * Using memmove make the generated code substencially slower, * we seen difference from 20MB/s to 200MB/s from the memmove version * to this version in doing checksum test. */ #ifdef PRELUDE_WORDS_BIGENDIAN # define byte(type, buf, pos) (type) ((const uint8_t *) (buf))[(pos)] #else # define byte(type, buf, pos) (type) ((const uint8_t *) (buf))[sizeof(type) - 1 - (pos)] #endif static inline uint16_t prelude_align_uint16(const void *buf) { return byte(uint16_t, buf, 0) << 8 | byte(uint16_t, buf, 1); } static inline int32_t prelude_align_int32(const void *buf) { return byte(int32_t, buf, 0) << 24 | byte(int32_t, buf, 1) << 16 | byte(int32_t, buf, 2) << 8 | byte(int32_t, buf, 3); } static inline uint32_t prelude_align_uint32(const void *buf) { return byte(uint32_t, buf, 0) << 24 | byte(uint32_t, buf, 1) << 16 | byte(uint32_t, buf, 2) << 8 | byte(uint32_t, buf, 3); } static inline uint64_t prelude_align_uint64(const void *buf) { return byte(uint64_t, buf, 0) << 56 | byte(uint64_t, buf, 1) << 48 | byte(uint64_t, buf, 2) << 40 | byte(uint64_t, buf, 3) << 32 | byte(uint64_t, buf, 4) << 24 | byte(uint64_t, buf, 5) << 16 | byte(uint64_t, buf, 6) << 8 | byte(uint64_t, buf, 7); } static inline float prelude_align_float(const void *buf) { return prelude_align_uint32(buf); } #else #define prelude_align_uint16(x) (*(const uint16_t *) (x)) #define prelude_align_int32(x) (*(const int32_t *) (x)) #define prelude_align_uint32(x) (*(const uint32_t *) (x)) #define prelude_align_uint64(x) (*(const uint64_t *) (x)) #define prelude_align_float(x) (*(const float *) (x)) #endif #include "prelude-string.h" #include "idmef-time.h" #include "idmef-data.h" static inline uint16_t prelude_extract_uint16(const void *buf) { return ntohs(prelude_align_uint16(buf)); } static inline int32_t prelude_extract_int32(const void *buf) { return ntohl(prelude_align_int32(buf)); } static inline uint32_t prelude_extract_uint32(const void *buf) { return ntohl(prelude_align_uint32(buf)); } static inline float prelude_extract_float(const void *buf) { union { float fval; uint32_t ival; } val; val.ival = ntohl(prelude_align_uint32(buf)); return val.fval; } static inline uint64_t prelude_extract_uint64(const void *buf) { #ifdef PRELUDE_WORDS_BIGENDIAN return prelude_align_uint64(buf); #else union { uint64_t val64; uint32_t val32[2]; } combo_r, combo_w; combo_r.val64 = prelude_align_uint64(buf); combo_w.val32[0] = ntohl(combo_r.val32[1]); combo_w.val32[1] = ntohl(combo_r.val32[0]); return combo_w.val64; #endif } /* * Theses function check the buffer size for safety. */ static inline int prelude_extract_uint8_safe(uint8_t *out, const void *buf, size_t len) { if ( len != sizeof(uint8_t) ) return prelude_error_make(PRELUDE_ERROR_SOURCE_EXTRACT, PRELUDE_ERROR_INVAL_INT8); *out = *(const uint8_t *) buf; return 0; } static inline int prelude_extract_uint16_safe(uint16_t *out, const void *buf, size_t len) { if ( len != sizeof(uint16_t) ) return prelude_error_make(PRELUDE_ERROR_SOURCE_EXTRACT, PRELUDE_ERROR_INVAL_INT16); *out = prelude_extract_uint16(buf); return 0; } static inline int prelude_extract_uint32_safe(uint32_t *out, const void *buf, size_t len) { if ( len != sizeof(uint32_t) ) return prelude_error_make(PRELUDE_ERROR_SOURCE_EXTRACT, PRELUDE_ERROR_INVAL_INT32); *out = prelude_extract_uint32(buf); return 0; } static inline int prelude_extract_int32_safe(int32_t *out, const void *buf, size_t len) { if ( len != sizeof(int32_t) ) return prelude_error_make(PRELUDE_ERROR_SOURCE_EXTRACT, PRELUDE_ERROR_INVAL_INT32); *out = prelude_extract_int32(buf); return 0; } static inline int prelude_extract_uint64_safe(uint64_t *out, const void *buf, size_t len) { if ( len != sizeof(uint64_t) ) return prelude_error_make(PRELUDE_ERROR_SOURCE_EXTRACT, PRELUDE_ERROR_INVAL_INT64); *out = prelude_extract_uint64(buf); return 0; } static inline int prelude_extract_float_safe(float *out, const void *buf, size_t len) { if ( len != sizeof(uint32_t) ) /* We pack float as an uint32_t */ return prelude_error_make(PRELUDE_ERROR_SOURCE_EXTRACT, PRELUDE_ERROR_INVAL_FLOAT); *out = prelude_extract_float(buf); return 0; } static inline int prelude_extract_characters_safe(const char **out, char *buf, size_t len) { if ( len < 2 || buf[len - 1] != '\0' ) return prelude_error_make(PRELUDE_ERROR_SOURCE_EXTRACT, PRELUDE_ERROR_INVAL_CHAR); *out = buf; return 0; } #ifdef __cplusplus } #endif #endif /* _LIBPRELUDE_EXTRACT_H */ libprelude-1.0.0/src/include/prelude-client.h0000664000076400007640000000752111225122036016070 00000000000000/***** * * Copyright (C) 2004, 2005 PreludeIDS Technologies. All Rights Reserved. * Author: Yoann Vandoorselaere * * This file is part of the Prelude library. * * 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; see the file COPYING. If not, write to * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. * *****/ #ifndef _LIBPRELUDE_PRELUDE_CLIENT_H #define _LIBPRELUDE_PRELUDE_CLIENT_H #ifdef __cplusplus extern "C" { #endif typedef enum { PRELUDE_CLIENT_EXIT_STATUS_SUCCESS = 0, PRELUDE_CLIENT_EXIT_STATUS_FAILURE = -1 } prelude_client_exit_status_t; typedef enum { PRELUDE_CLIENT_FLAGS_ASYNC_SEND = 0x01, PRELUDE_CLIENT_FLAGS_ASYNC_TIMER = 0x02, PRELUDE_CLIENT_FLAGS_HEARTBEAT = 0x04, PRELUDE_CLIENT_FLAGS_CONNECT = 0x08, PRELUDE_CLIENT_FLAGS_AUTOCONFIG = 0x10 } prelude_client_flags_t; typedef struct prelude_client prelude_client_t; #include "prelude-client-profile.h" #include "prelude-ident.h" #include "prelude-connection.h" #include "prelude-connection-pool.h" #include "idmef.h" prelude_ident_t *prelude_client_get_unique_ident(prelude_client_t *client); void prelude_client_set_connection_pool(prelude_client_t *client, prelude_connection_pool_t *pool); prelude_connection_pool_t *prelude_client_get_connection_pool(prelude_client_t *client); int prelude_client_start(prelude_client_t *client); int prelude_client_init(prelude_client_t *client); int prelude_client_new(prelude_client_t **client, const char *profile); prelude_client_t *prelude_client_ref(prelude_client_t *client); idmef_analyzer_t *prelude_client_get_analyzer(prelude_client_t *client); prelude_client_flags_t prelude_client_get_flags(prelude_client_t *client); void prelude_client_set_required_permission(prelude_client_t *client, prelude_connection_permission_t permission); prelude_connection_permission_t prelude_client_get_required_permission(prelude_client_t *client); void prelude_client_send_msg(prelude_client_t *client, prelude_msg_t *msg); int prelude_client_recv_msg(prelude_client_t *client, int timeout, prelude_msg_t **msg); void prelude_client_set_heartbeat_cb(prelude_client_t *client, void (*cb)(prelude_client_t *client, idmef_message_t *hb)); void prelude_client_send_idmef(prelude_client_t *client, idmef_message_t *msg); int prelude_client_recv_idmef(prelude_client_t *client, int timeout, idmef_message_t **idmef); void prelude_client_destroy(prelude_client_t *client, prelude_client_exit_status_t status); int prelude_client_set_flags(prelude_client_t *client, prelude_client_flags_t flags); int prelude_client_set_config_filename(prelude_client_t *client, const char *filename); const char *prelude_client_get_config_filename(prelude_client_t *client); prelude_client_profile_t *prelude_client_get_profile(prelude_client_t *client); int prelude_client_new_msgbuf(prelude_client_t *client, prelude_msgbuf_t **msgbuf); int prelude_client_handle_msg_default(prelude_client_t *client, prelude_msg_t *msg, prelude_msgbuf_t *msgbuf); int _prelude_client_register_options(void); #ifndef PRELUDE_DISABLE_DEPRECATED const char *prelude_client_get_setup_error(prelude_client_t *client); prelude_bool_t prelude_client_is_setup_needed(int error); #endif void prelude_client_print_setup_error(prelude_client_t *client); #ifdef __cplusplus } #endif #endif libprelude-1.0.0/src/include/idmef-message-print.h0000664000076400007640000000623411202225026017012 00000000000000 /***** * * Copyright (C) 2003, 2004, 2005 PreludeIDS Technologies. All Rights Reserved. * Author: Yoann Vandoorselaere * * This file is part of the Prelude library. * * 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; see the file COPYING. If not, write to * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. * *****/ /* Auto-generated by the GenerateIDMEFTreePrintH package */ #ifndef _LIBPRELUDE_IDMEF_MESSAGE_PRINT_H #define _LIBPRELUDE_IDMEF_MESSAGE_PRINT_H #ifdef __cplusplus extern "C" { #endif void idmef_additional_data_print(idmef_additional_data_t *ptr, prelude_io_t *fd); void idmef_reference_print(idmef_reference_t *ptr, prelude_io_t *fd); void idmef_classification_print(idmef_classification_t *ptr, prelude_io_t *fd); void idmef_user_id_print(idmef_user_id_t *ptr, prelude_io_t *fd); void idmef_user_print(idmef_user_t *ptr, prelude_io_t *fd); void idmef_address_print(idmef_address_t *ptr, prelude_io_t *fd); void idmef_process_print(idmef_process_t *ptr, prelude_io_t *fd); void idmef_web_service_print(idmef_web_service_t *ptr, prelude_io_t *fd); void idmef_snmp_service_print(idmef_snmp_service_t *ptr, prelude_io_t *fd); void idmef_service_print(idmef_service_t *ptr, prelude_io_t *fd); void idmef_node_print(idmef_node_t *ptr, prelude_io_t *fd); void idmef_source_print(idmef_source_t *ptr, prelude_io_t *fd); void idmef_file_access_print(idmef_file_access_t *ptr, prelude_io_t *fd); void idmef_inode_print(idmef_inode_t *ptr, prelude_io_t *fd); void idmef_checksum_print(idmef_checksum_t *ptr, prelude_io_t *fd); void idmef_file_print(idmef_file_t *ptr, prelude_io_t *fd); void idmef_linkage_print(idmef_linkage_t *ptr, prelude_io_t *fd); void idmef_target_print(idmef_target_t *ptr, prelude_io_t *fd); void idmef_analyzer_print(idmef_analyzer_t *ptr, prelude_io_t *fd); void idmef_alertident_print(idmef_alertident_t *ptr, prelude_io_t *fd); void idmef_impact_print(idmef_impact_t *ptr, prelude_io_t *fd); void idmef_action_print(idmef_action_t *ptr, prelude_io_t *fd); void idmef_confidence_print(idmef_confidence_t *ptr, prelude_io_t *fd); void idmef_assessment_print(idmef_assessment_t *ptr, prelude_io_t *fd); void idmef_tool_alert_print(idmef_tool_alert_t *ptr, prelude_io_t *fd); void idmef_correlation_alert_print(idmef_correlation_alert_t *ptr, prelude_io_t *fd); void idmef_overflow_alert_print(idmef_overflow_alert_t *ptr, prelude_io_t *fd); void idmef_alert_print(idmef_alert_t *ptr, prelude_io_t *fd); void idmef_heartbeat_print(idmef_heartbeat_t *ptr, prelude_io_t *fd); void idmef_message_print(idmef_message_t *ptr, prelude_io_t *fd); #ifdef __cplusplus } #endif #endif /* _LIBPRELUDE_IDMEF_MESSAGE_PRINT_H */ libprelude-1.0.0/src/include/prelude-connection.h0000664000076400007640000001043011202225026016740 00000000000000/***** * * Copyright (C) 2001, 2002, 2003, 2004, 2005 PreludeIDS Technologies. All Rights Reserved. * Author: Yoann Vandoorselaere * * This file is part of the Prelude library. * * 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; see the file COPYING. If not, write to * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. * *****/ #ifndef _LIBPRELUDE_PRELUDE_CONNECTION_H #define _LIBPRELUDE_PRELUDE_CONNECTION_H #ifdef __cplusplus extern "C" { #endif typedef enum { PRELUDE_CONNECTION_PERMISSION_IDMEF_READ = 0x01, /* client might read received IDMEF message */ PRELUDE_CONNECTION_PERMISSION_ADMIN_READ = 0x02, /* client might read received ADMIN message */ PRELUDE_CONNECTION_PERMISSION_IDMEF_WRITE = 0x04, /* client might send IDMEF message */ PRELUDE_CONNECTION_PERMISSION_ADMIN_WRITE = 0x08 /* client might issue OPTION request */ } prelude_connection_permission_t; typedef enum { PRELUDE_CONNECTION_STATE_ESTABLISHED = 0x01 } prelude_connection_state_t; typedef struct prelude_connection prelude_connection_t; #include "prelude-msg.h" #include "prelude-msgbuf.h" #include "prelude-string.h" #include "prelude-client-profile.h" #include "idmef.h" void prelude_connection_destroy(prelude_connection_t *conn); prelude_connection_t *prelude_connection_ref(prelude_connection_t *conn); int prelude_connection_send(prelude_connection_t *cnx, prelude_msg_t *msg); int prelude_connection_recv(prelude_connection_t *cnx, prelude_msg_t **outmsg); int prelude_connection_recv_idmef(prelude_connection_t *con, idmef_message_t **idmef); int prelude_connection_connect(prelude_connection_t *cnx, prelude_client_profile_t *profile, prelude_connection_permission_t permission); ssize_t prelude_connection_forward(prelude_connection_t *cnx, prelude_io_t *src, size_t count); const char *prelude_connection_get_local_addr(prelude_connection_t *cnx); unsigned int prelude_connection_get_local_port(prelude_connection_t *cnx); const char *prelude_connection_get_peer_addr(prelude_connection_t *cnx); unsigned int prelude_connection_get_peer_port(prelude_connection_t *cnx); prelude_bool_t prelude_connection_is_alive(prelude_connection_t *cnx); prelude_io_t *prelude_connection_get_fd(prelude_connection_t *cnx); int prelude_connection_close(prelude_connection_t *cnx); void prelude_connection_set_fd_ref(prelude_connection_t *cnx, prelude_io_t *fd); void prelude_connection_set_fd_nodup(prelude_connection_t *cnx, prelude_io_t *fd); void prelude_connection_set_state(prelude_connection_t *cnx, prelude_connection_state_t state); prelude_connection_state_t prelude_connection_get_state(prelude_connection_t *cnx); void prelude_connection_set_data(prelude_connection_t *cnx, void *data); void *prelude_connection_get_data(prelude_connection_t *cnx); const char *prelude_connection_get_default_socket_filename(void); prelude_connection_permission_t prelude_connection_get_permission(prelude_connection_t *conn); uint64_t prelude_connection_get_peer_analyzerid(prelude_connection_t *cnx); void prelude_connection_set_peer_analyzerid(prelude_connection_t *cnx, uint64_t analyzerid); #include "prelude-client.h" int prelude_connection_new(prelude_connection_t **ret, const char *addr); int prelude_connection_new_msgbuf(prelude_connection_t *connection, prelude_msgbuf_t **msgbuf); int prelude_connection_permission_to_string(prelude_connection_permission_t perm, prelude_string_t *out); int prelude_connection_permission_new_from_string(prelude_connection_permission_t *out, const char *buf); prelude_connection_t *prelude_connection_ref(prelude_connection_t *conn); #ifdef __cplusplus } #endif #endif /* _LIBPRELUDE_PRELUDE_CONNECTION_H */ libprelude-1.0.0/src/include/daemonize.h0000664000076400007640000000200711202225026015117 00000000000000/***** * * Copyright (C) 2000-2005 PreludeIDS Technologies. All Rights Reserved. * Author: Yoann Vandoorselaere * * This file is part of the Prelude library. * * 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; see the file COPYING. If not, write to * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. * *****/ #ifndef _LIBPRELUDE_DAEMONIZE_H #define _LIBPRELUDE_DAEMONIZE_H int prelude_daemonize(const char *lockfile); #endif /* _LIBPRELUDE_DAEMONIZE_H */ libprelude-1.0.0/src/include/idmef-criterion-value.h0000664000076400007640000000564611202225026017352 00000000000000/***** * * Copyright (C) 2004, 2005 PreludeIDS Technologies. All Rights Reserved. * Author: Nicolas Delon * * This file is part of the Prelude library. * * 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; see the file COPYING. If not, write to * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. * *****/ #ifndef _LIBPRELUDE_IDMEF_CRITERION_VALUE_H #define _LIBPRELUDE_IDMEF_CRITERION_VALUE_H #ifdef __cplusplus extern "C" { #endif typedef struct idmef_criterion_value idmef_criterion_value_t; typedef enum { IDMEF_CRITERION_VALUE_TYPE_ERROR = -1, IDMEF_CRITERION_VALUE_TYPE_VALUE = 0, IDMEF_CRITERION_VALUE_TYPE_REGEX = 1, IDMEF_CRITERION_VALUE_TYPE_BROKEN_DOWN_TIME = 2 } idmef_criterion_value_type_t; #include "idmef-criteria.h" #include "idmef-value.h" int idmef_criterion_value_new(idmef_criterion_value_t **cv); int idmef_criterion_value_new_regex(idmef_criterion_value_t **cv, const char *regex, idmef_criterion_operator_t op); int idmef_criterion_value_new_value(idmef_criterion_value_t **cv, idmef_value_t *value, idmef_criterion_operator_t op); int idmef_criterion_value_new_from_string(idmef_criterion_value_t **cv, idmef_path_t *path, const char *value, idmef_criterion_operator_t op); int idmef_criterion_value_new_broken_down_time(idmef_criterion_value_t **cv, const char *time, idmef_criterion_operator_t op); int idmef_criterion_value_clone(const idmef_criterion_value_t *src, idmef_criterion_value_t **dst); void idmef_criterion_value_destroy(idmef_criterion_value_t *value); int idmef_criterion_value_print(idmef_criterion_value_t *value, prelude_io_t *fd); int idmef_criterion_value_to_string(idmef_criterion_value_t *value, prelude_string_t *out); int idmef_criterion_value_match(idmef_criterion_value_t *cv, idmef_value_t *value, idmef_criterion_operator_t op); const idmef_value_t *idmef_criterion_value_get_value(idmef_criterion_value_t *cv); const char *idmef_criterion_value_get_regex(idmef_criterion_value_t *cv); const struct tm *idmef_criterion_value_get_broken_down_time(idmef_criterion_value_t *cv); idmef_criterion_value_type_t idmef_criterion_value_get_type(idmef_criterion_value_t *cv); #ifdef __cplusplus } #endif #endif /* _LIBPRELUDE_IDMEF_CRITERION_VALUE_H */ libprelude-1.0.0/src/include/prelude-io.h0000664000076400007640000000530011345707014015222 00000000000000/***** * * Copyright (C) 2001, 2002, 2003, 2004, 2005 PreludeIDS Technologies. All Rights Reserved. * Author: Yoann Vandoorselaere * * This file is part of the Prelude library. * * 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; see the file COPYING. If not, write to * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. * *****/ #ifndef _LIBPRELUDE_PRELUDE_IO_H #define _LIBPRELUDE_PRELUDE_IO_H #ifdef __cplusplus extern "C" { #endif #ifdef HAVE_CONFIG_H # include "config.h" #endif #include #include #include "prelude-inttypes.h" typedef struct prelude_io prelude_io_t; /* * Object creation / destruction functions. */ int prelude_io_new(prelude_io_t **ret); void prelude_io_destroy(prelude_io_t *pio); void prelude_io_set_file_io(prelude_io_t *pio, FILE *fd); void prelude_io_set_tls_io(prelude_io_t *pio, void *tls); void prelude_io_set_sys_io(prelude_io_t *pio, int fd); int prelude_io_set_buffer_io(prelude_io_t *pio); /* * */ void prelude_io_set_fdptr(prelude_io_t *pio, void *ptr); void prelude_io_set_write_callback(prelude_io_t *pio, ssize_t (*write)(prelude_io_t *io, const void *buf, size_t count)); void prelude_io_set_read_callback(prelude_io_t *pio, ssize_t (*read)(prelude_io_t *io, void *buf, size_t count)); void prelude_io_set_pending_callback(prelude_io_t *pio, ssize_t (*pending)(prelude_io_t *io)); /* * IO operations. */ int prelude_io_close(prelude_io_t *pio); ssize_t prelude_io_read(prelude_io_t *pio, void *buf, size_t count); ssize_t prelude_io_read_wait(prelude_io_t *pio, void *buf, size_t count); ssize_t prelude_io_read_delimited(prelude_io_t *pio, unsigned char **buf); ssize_t prelude_io_write(prelude_io_t *pio, const void *buf, size_t count); ssize_t prelude_io_write_delimited(prelude_io_t *pio, const void *buf, uint16_t count); ssize_t prelude_io_forward(prelude_io_t *dst, prelude_io_t *src, size_t count); int prelude_io_get_fd(prelude_io_t *pio); void *prelude_io_get_fdptr(prelude_io_t *pio); ssize_t prelude_io_pending(prelude_io_t *pio); prelude_bool_t prelude_io_is_error_fatal(prelude_io_t *pio, int error); #ifdef __cplusplus } #endif #endif /* _LIBPRELUDE_PRELUDE_IO_H */ libprelude-1.0.0/src/include/idmef-message-id.h0000664000076400007640000001477711202225026016265 00000000000000 /* Auto-generated by the GenerateIDMEFMessageIdH package */ #ifndef _LIBPRELUDE_IDMEF_MESSAGE_ID_H #define _LIBPRELUDE_IDMEF_MESSAGE_ID_H /* * Misc value */ #define IDMEF_MSG_OWN_FORMAT 253 #define IDMEF_MSG_END_OF_TAG 254 /* * Tag value */ #define IDMEF_MSG_ADDITIONAL_DATA_TAG 0 #define IDMEF_MSG_REFERENCE_TAG 1 #define IDMEF_MSG_CLASSIFICATION_TAG 2 #define IDMEF_MSG_USER_ID_TAG 3 #define IDMEF_MSG_USER_TAG 4 #define IDMEF_MSG_ADDRESS_TAG 5 #define IDMEF_MSG_PROCESS_TAG 6 #define IDMEF_MSG_WEB_SERVICE_TAG 7 #define IDMEF_MSG_SNMP_SERVICE_TAG 8 #define IDMEF_MSG_SERVICE_TAG 9 #define IDMEF_MSG_NODE_TAG 10 #define IDMEF_MSG_SOURCE_TAG 11 #define IDMEF_MSG_FILE_ACCESS_TAG 12 #define IDMEF_MSG_INODE_TAG 13 #define IDMEF_MSG_CHECKSUM_TAG 14 #define IDMEF_MSG_FILE_TAG 15 #define IDMEF_MSG_LINKAGE_TAG 16 #define IDMEF_MSG_TARGET_TAG 17 #define IDMEF_MSG_ANALYZER_TAG 18 #define IDMEF_MSG_ALERTIDENT_TAG 19 #define IDMEF_MSG_IMPACT_TAG 20 #define IDMEF_MSG_ACTION_TAG 21 #define IDMEF_MSG_CONFIDENCE_TAG 22 #define IDMEF_MSG_ASSESSMENT_TAG 23 #define IDMEF_MSG_TOOL_ALERT_TAG 24 #define IDMEF_MSG_CORRELATION_ALERT_TAG 25 #define IDMEF_MSG_OVERFLOW_ALERT_TAG 26 #define IDMEF_MSG_ALERT_TAG 27 #define IDMEF_MSG_HEARTBEAT_TAG 28 /* * IDMEF Additional_data */ #define IDMEF_MSG_ADDITIONAL_DATA_TYPE 29 #define IDMEF_MSG_ADDITIONAL_DATA_MEANING 30 #define IDMEF_MSG_ADDITIONAL_DATA_DATA 31 /* * IDMEF Reference */ #define IDMEF_MSG_REFERENCE_ORIGIN 29 #define IDMEF_MSG_REFERENCE_NAME 30 #define IDMEF_MSG_REFERENCE_URL 31 #define IDMEF_MSG_REFERENCE_MEANING 32 /* * IDMEF Classification */ #define IDMEF_MSG_CLASSIFICATION_IDENT 29 #define IDMEF_MSG_CLASSIFICATION_TEXT 30 /* * IDMEF User_id */ #define IDMEF_MSG_USER_ID_IDENT 29 #define IDMEF_MSG_USER_ID_TYPE 30 #define IDMEF_MSG_USER_ID_TTY 31 #define IDMEF_MSG_USER_ID_NAME 32 #define IDMEF_MSG_USER_ID_NUMBER 33 /* * IDMEF User */ #define IDMEF_MSG_USER_IDENT 29 #define IDMEF_MSG_USER_CATEGORY 30 /* * IDMEF Address */ #define IDMEF_MSG_ADDRESS_IDENT 29 #define IDMEF_MSG_ADDRESS_CATEGORY 30 #define IDMEF_MSG_ADDRESS_VLAN_NAME 31 #define IDMEF_MSG_ADDRESS_VLAN_NUM 32 #define IDMEF_MSG_ADDRESS_ADDRESS 33 #define IDMEF_MSG_ADDRESS_NETMASK 34 /* * IDMEF Process */ #define IDMEF_MSG_PROCESS_IDENT 29 #define IDMEF_MSG_PROCESS_NAME 30 #define IDMEF_MSG_PROCESS_PID 31 #define IDMEF_MSG_PROCESS_PATH 32 #define IDMEF_MSG_PROCESS_ARG 33 #define IDMEF_MSG_PROCESS_ENV 34 /* * IDMEF Web_service */ #define IDMEF_MSG_WEB_SERVICE_URL 29 #define IDMEF_MSG_WEB_SERVICE_CGI 30 #define IDMEF_MSG_WEB_SERVICE_HTTP_METHOD 31 #define IDMEF_MSG_WEB_SERVICE_ARG 32 /* * IDMEF Snmp_service */ #define IDMEF_MSG_SNMP_SERVICE_OID 29 #define IDMEF_MSG_SNMP_SERVICE_MESSAGE_PROCESSING_MODEL 30 #define IDMEF_MSG_SNMP_SERVICE_SECURITY_MODEL 31 #define IDMEF_MSG_SNMP_SERVICE_SECURITY_NAME 32 #define IDMEF_MSG_SNMP_SERVICE_SECURITY_LEVEL 33 #define IDMEF_MSG_SNMP_SERVICE_CONTEXT_NAME 34 #define IDMEF_MSG_SNMP_SERVICE_CONTEXT_ENGINE_ID 35 #define IDMEF_MSG_SNMP_SERVICE_COMMAND 36 #define IDMEF_MSG_SNMP_SERVICE_COMMUNITY 37 /* * IDMEF Service */ #define IDMEF_MSG_SERVICE_IDENT 29 #define IDMEF_MSG_SERVICE_IP_VERSION 30 #define IDMEF_MSG_SERVICE_IANA_PROTOCOL_NUMBER 31 #define IDMEF_MSG_SERVICE_IANA_PROTOCOL_NAME 32 #define IDMEF_MSG_SERVICE_NAME 33 #define IDMEF_MSG_SERVICE_PORT 34 #define IDMEF_MSG_SERVICE_PORTLIST 35 #define IDMEF_MSG_SERVICE_PROTOCOL 36 /* * IDMEF Node */ #define IDMEF_MSG_NODE_IDENT 29 #define IDMEF_MSG_NODE_CATEGORY 30 #define IDMEF_MSG_NODE_LOCATION 31 #define IDMEF_MSG_NODE_NAME 32 /* * IDMEF Source */ #define IDMEF_MSG_SOURCE_IDENT 29 #define IDMEF_MSG_SOURCE_SPOOFED 30 #define IDMEF_MSG_SOURCE_INTERFACE 31 /* * IDMEF File_access */ #define IDMEF_MSG_FILE_ACCESS_PERMISSION 29 /* * IDMEF Inode */ #define IDMEF_MSG_INODE_CHANGE_TIME 29 #define IDMEF_MSG_INODE_NUMBER 30 #define IDMEF_MSG_INODE_MAJOR_DEVICE 31 #define IDMEF_MSG_INODE_MINOR_DEVICE 32 #define IDMEF_MSG_INODE_C_MAJOR_DEVICE 33 #define IDMEF_MSG_INODE_C_MINOR_DEVICE 34 /* * IDMEF Checksum */ #define IDMEF_MSG_CHECKSUM_VALUE 29 #define IDMEF_MSG_CHECKSUM_KEY 30 #define IDMEF_MSG_CHECKSUM_ALGORITHM 31 /* * IDMEF File */ #define IDMEF_MSG_FILE_IDENT 29 #define IDMEF_MSG_FILE_NAME 30 #define IDMEF_MSG_FILE_PATH 31 #define IDMEF_MSG_FILE_CREATE_TIME 32 #define IDMEF_MSG_FILE_MODIFY_TIME 33 #define IDMEF_MSG_FILE_ACCESS_TIME 34 #define IDMEF_MSG_FILE_DATA_SIZE 35 #define IDMEF_MSG_FILE_DISK_SIZE 36 #define IDMEF_MSG_FILE_CATEGORY 37 #define IDMEF_MSG_FILE_FSTYPE 38 #define IDMEF_MSG_FILE_FILE_TYPE 39 /* * IDMEF Linkage */ #define IDMEF_MSG_LINKAGE_CATEGORY 29 #define IDMEF_MSG_LINKAGE_NAME 30 #define IDMEF_MSG_LINKAGE_PATH 31 /* * IDMEF Target */ #define IDMEF_MSG_TARGET_IDENT 29 #define IDMEF_MSG_TARGET_DECOY 30 #define IDMEF_MSG_TARGET_INTERFACE 31 /* * IDMEF Analyzer */ #define IDMEF_MSG_ANALYZER_ANALYZERID 29 #define IDMEF_MSG_ANALYZER_NAME 30 #define IDMEF_MSG_ANALYZER_MANUFACTURER 31 #define IDMEF_MSG_ANALYZER_MODEL 32 #define IDMEF_MSG_ANALYZER_VERSION 33 #define IDMEF_MSG_ANALYZER_CLASS 34 #define IDMEF_MSG_ANALYZER_OSTYPE 35 #define IDMEF_MSG_ANALYZER_OSVERSION 36 /* * IDMEF Alertident */ #define IDMEF_MSG_ALERTIDENT_ALERTIDENT 29 #define IDMEF_MSG_ALERTIDENT_ANALYZERID 30 /* * IDMEF Impact */ #define IDMEF_MSG_IMPACT_SEVERITY 29 #define IDMEF_MSG_IMPACT_COMPLETION 30 #define IDMEF_MSG_IMPACT_TYPE 31 #define IDMEF_MSG_IMPACT_DESCRIPTION 32 /* * IDMEF Action */ #define IDMEF_MSG_ACTION_CATEGORY 29 #define IDMEF_MSG_ACTION_DESCRIPTION 30 /* * IDMEF Confidence */ #define IDMEF_MSG_CONFIDENCE_RATING 29 #define IDMEF_MSG_CONFIDENCE_CONFIDENCE 30 /* * IDMEF Assessment */ /* * IDMEF Tool_alert */ #define IDMEF_MSG_TOOL_ALERT_NAME 29 #define IDMEF_MSG_TOOL_ALERT_COMMAND 30 /* * IDMEF Correlation_alert */ #define IDMEF_MSG_CORRELATION_ALERT_NAME 29 /* * IDMEF Overflow_alert */ #define IDMEF_MSG_OVERFLOW_ALERT_PROGRAM 29 #define IDMEF_MSG_OVERFLOW_ALERT_SIZE 30 #define IDMEF_MSG_OVERFLOW_ALERT_BUFFER 31 /* * IDMEF Alert */ #define IDMEF_MSG_ALERT_MESSAGEID 29 #define IDMEF_MSG_ALERT_CREATE_TIME 30 #define IDMEF_MSG_ALERT_DETECT_TIME 31 #define IDMEF_MSG_ALERT_ANALYZER_TIME 32 /* * IDMEF Heartbeat */ #define IDMEF_MSG_HEARTBEAT_MESSAGEID 29 #define IDMEF_MSG_HEARTBEAT_CREATE_TIME 30 #define IDMEF_MSG_HEARTBEAT_ANALYZER_TIME 31 #define IDMEF_MSG_HEARTBEAT_HEARTBEAT_INTERVAL 32 /* * IDMEF Message */ #define IDMEF_MSG_MESSAGE_VERSION 29 #endif /* _LIBPRELUDE_IDMEF_MESSAGE_ID_H */ libprelude-1.0.0/src/include/prelude-thread.h0000664000076400007640000000234511345707014016070 00000000000000/***** * * Copyright (C) 2005 PreludeIDS Technologies. All Rights Reserved. * Author: Yoann Vandoorselaere * * This file is part of the Prelude library. * * 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; see the file COPYING. If not, write to * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. * *****/ #ifndef _LIBPRELUDE_THREAD_H #define _LIBPRELUDE_THREAD_H #ifdef HAVE_CONFIG_H # include "config.h" #endif #ifdef __cplusplus extern "C" { #endif /* * */ int prelude_thread_init(void *nil); int _prelude_thread_set_error(const char *error); const char *_prelude_thread_get_error(void); void _prelude_thread_deinit(void); #ifdef __cplusplus } #endif #endif libprelude-1.0.0/src/include/idmef-message-helpers.h0000664000076400007640000000317111202225026017315 00000000000000/***** * * Copyright (C) 2008 PreludeIDS Technologies. All Rights Reserved. * Author: Yoann Vandoorselaere * * This file is part of the Prelude library. * * 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; see the file COPYING. If not, write to * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. * *****/ int idmef_message_set_value(idmef_message_t *message, const char *path, idmef_value_t *value); int idmef_message_get_value(idmef_message_t *message, const char *path, idmef_value_t **value); int idmef_message_set_string(idmef_message_t *message, const char *path, const char *value); int idmef_message_get_string(idmef_message_t *message, const char *path, char **result); int idmef_message_set_number(idmef_message_t *message, const char *path, double number); int idmef_message_get_number(idmef_message_t *message, const char *path, double *result); int idmef_message_set_data(idmef_message_t *message, const char *path, const unsigned char *data, size_t size); int idmef_message_get_data(idmef_message_t *message, const char *path, unsigned char **data, size_t *size); libprelude-1.0.0/src/include/prelude-string.h0000664000076400007640000001116211345707014016124 00000000000000/***** * * Copyright (C) 2004-2005,2006,2007 PreludeIDS Technologies. All Rights Reserved. * Author: Yoann Vandoorselaere * * This file is part of the Prelude library. * * 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; see the file COPYING. If not, write to * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. * *****/ #ifndef _LIBPRELUDE_PRELUDE_STRING_H #define _LIBPRELUDE_PRELUDE_STRING_H #ifdef HAVE_CONFIG_H # include "config.h" #endif #include #include "prelude-list.h" #include "prelude-inttypes.h" #ifdef __cplusplus extern "C" { #endif #ifndef __attribute__ /* This feature is available in gcc versions 2.5 and later. */ # if __GNUC__ < 2 || (__GNUC__ == 2 && __GNUC_MINOR__ < 5) || __STRICT_ANSI__ # define __attribute__(Spec) /* empty */ # endif /* The __-protected variants of `format' and `printf' attributes are accepted by gcc versions 2.6.4 (effectively 2.7) and later. */ # if __GNUC__ < 2 || (__GNUC__ == 2 && __GNUC_MINOR__ < 7) # define __format__ format # define __printf__ printf # endif #endif struct prelude_string { prelude_list_t list; int flags; int refcount; union { char *rwbuf; const char *robuf; } data; size_t size; size_t index; }; typedef struct prelude_string prelude_string_t; int prelude_string_new(prelude_string_t **string); int prelude_string_new_nodup(prelude_string_t **string, char *str); int prelude_string_new_ref(prelude_string_t **string, const char *str); int prelude_string_new_dup(prelude_string_t **string, const char *str); int prelude_string_new_dup_fast(prelude_string_t **string, const char *str, size_t len); void prelude_string_destroy(prelude_string_t *string); void prelude_string_destroy_internal(prelude_string_t *string); int prelude_string_new_nodup_fast(prelude_string_t **string, char *str, size_t len); int prelude_string_new_ref_fast(prelude_string_t **string, const char *str, size_t len); int prelude_string_set_dup_fast(prelude_string_t *string, const char *buf, size_t len); int prelude_string_set_dup(prelude_string_t *string, const char *buf); int prelude_string_set_nodup_fast(prelude_string_t *string, char *buf, size_t len); int prelude_string_set_nodup(prelude_string_t *string, char *buf); int prelude_string_set_ref_fast(prelude_string_t *string, const char *buf, size_t len); int prelude_string_set_ref(prelude_string_t *string, const char *buf); int prelude_string_copy_ref(const prelude_string_t *src, prelude_string_t *dst); int prelude_string_copy_dup(const prelude_string_t *src, prelude_string_t *dst); prelude_string_t *prelude_string_ref(prelude_string_t *string); int prelude_string_clone(const prelude_string_t *src, prelude_string_t **dst); size_t prelude_string_get_len(const prelude_string_t *string); const char *prelude_string_get_string_or_default(const prelude_string_t *string, const char *def); const char *prelude_string_get_string(const prelude_string_t *string); int prelude_string_get_string_released(prelude_string_t *string, char **outptr); prelude_bool_t prelude_string_is_empty(const prelude_string_t *string); void prelude_string_clear(prelude_string_t *string); /* * string operation */ int prelude_string_cat(prelude_string_t *dst, const char *str); int prelude_string_ncat(prelude_string_t *dst, const char *str, size_t len); int prelude_string_sprintf(prelude_string_t *string, const char *fmt, ...) __attribute__ ((__format__ (__printf__, 2, 3))); int prelude_string_vprintf(prelude_string_t *string, const char *fmt, va_list ap) __attribute__ ((__format__ (__printf__, 2, 0))); int prelude_string_compare(const prelude_string_t *str1, const prelude_string_t *str2); #define prelude_string_set_constant(string, str) \ prelude_string_set_ref_fast((string), (str), strlen((str))) #define prelude_string_new_constant(string, str) \ prelude_string_new_ref_fast((string), (str), strlen((str))) #ifdef __cplusplus } #endif #endif /* _LIBPRELUDE_PRELUDE_STRING_H */ libprelude-1.0.0/src/include/libmissing.h0000664000076400007640000000231511202225026015306 00000000000000/***** * * Copyright (C) 2004, 2005 PreludeIDS Technologies. All Rights Reserved. * Author: Yoann Vandoorselaere * * This file is part of the Prelude library. * * 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; see the file COPYING. If not, write to * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. * *****/ /* * should be in $(top_srcdir)/libmissing, but since the Makefile.am * is generated dynamically by gnulib-tool, it can't go there. */ #ifndef _LIBPRELUDE_LIBMISSING_H #define _LIBPRELUDE_LIBMISSING_H #include "config.h" #include "ftw_.h" #include "getpass.h" #include "minmax.h" #include "pathmax.h" #endif /* _LIBPRELUDE_LIBMISSING_H */ libprelude-1.0.0/src/include/variable.h0000664000076400007640000000233711202225026014737 00000000000000/***** * * Copyright (C) 2001, 2002, 2003, 2004 PreludeIDS Technologies. All Rights Reserved. * Author: Yoann Vandoorselaere * * This file is part of the Prelude library. * * 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; see the file COPYING. If not, write to * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. * * Written by Yoann Vandoorselaere * *****/ #ifndef _LIBPRELUDE_RULES_VARIABLE_H #define _LIBPRELUDE_RULES_VARIABLE_H int variable_set(const char *variable, const char *value); int variable_unset(const char *variable); char *variable_get(const char *variable); void variable_unset_all(void); #endif /* _LIBPRELUDE_RULES_VARIABLE_H */ libprelude-1.0.0/src/include/common.h0000664000076400007640000000630711345707014014455 00000000000000/***** * * Copyright (C) 2002, 2003, 2004, 2005 PreludeIDS Technologies. All Rights Reserved. * Author: Yoann Vandoorselaere * * This file is part of the Prelude library. * * 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; see the file COPYING. If not, write to * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. * *****/ #ifndef _LIBPRELUDE_COMMON_H #define _LIBPRELUDE_COMMON_H #ifdef HAVE_CONFIG_H # include "config.h" #endif #include "idmef.h" #include "prelude-msg.h" #include "prelude-inttypes.h" #include "prelude-log.h" #include #ifdef WIN32 # include #else # include # include #endif #include #ifdef __cplusplus extern "C" { #endif #define prelude_return_val_if_fail(cond, val) do { \ if ( ! (cond) ) { \ prelude_log(PRELUDE_LOG_CRIT, "assertion '%s' failed\n", #cond); \ return val; \ } \ } while(0) #define prelude_return_if_fail(cond) do { \ if ( ! (cond) ) { \ prelude_log(PRELUDE_LOG_CRIT, "assertion '%s' failed\n", #cond); \ return; \ } \ } while(0) int prelude_parse_address(const char *str, char **addr, unsigned int *port); uint64_t prelude_hton64(uint64_t val); uint32_t prelude_htonf(float fval); time_t prelude_timegm(struct tm *tm); int prelude_get_gmt_offset(long *gmt_offset); int prelude_get_gmt_offset_from_tm(struct tm *tm, long *gmtoff); int prelude_get_gmt_offset_from_time(const time_t *utc, long *gmtoff); int prelude_read_multiline(FILE *fd, unsigned int *line, char *buf, size_t size); int prelude_read_multiline2(FILE *fd, unsigned int *line, prelude_string_t *out); void *prelude_sockaddr_get_inaddr(struct sockaddr *sa); void *_prelude_realloc(void *ptr, size_t size); int _prelude_get_file_name_and_path(const char *str, char **name, char **path); prelude_msg_priority_t _idmef_impact_severity_to_msg_priority(idmef_impact_severity_t severity); int _idmef_message_assign_missing(prelude_client_t *client, idmef_message_t *msg); int _prelude_load_file(const char *filename, unsigned char **fdata, size_t *outsize); void _prelude_unload_file(unsigned char *fdata, size_t size); #ifdef __cplusplus } #endif #endif /* _LIBPRELUDE_COMMON_H */ libprelude-1.0.0/src/include/Makefile.am0000664000076400007640000000237311202312110015024 00000000000000includedir = $(prefix)/include/libprelude include_HEADERS = common.h \ daemonize.h \ idmef.h \ idmef-additional-data.h \ idmef-class.h \ idmef-criteria.h \ idmef-criterion-value.h \ idmef-data.h \ idmef-message-helpers.h \ idmef-message-id.h \ idmef-message-read.h \ idmef-message-print.h \ idmef-message-write.h \ idmef-path.h \ idmef-time.h \ idmef-tree-data.h \ idmef-tree-wrap.h \ idmef-value.h \ idmef-value-type.h \ prelude.h \ prelude-async.h \ prelude-extract.h \ prelude-hash.h \ prelude-linked-object.h \ prelude-list.h \ prelude-log.h \ prelude-client.h \ prelude-client-profile.h \ prelude-connection.h \ prelude-connection-pool.h \ prelude-failover.h \ prelude-ident.h \ prelude-io.h \ prelude-msg.h \ prelude-msgbuf.h \ prelude-message-id.h \ prelude-option.h \ prelude-option-wide.h \ prelude-plugin.h \ prelude-string.h \ prelude-timer.h \ prelude-thread.h nodist_include_HEADERS = prelude.h prelude-inttypes.h noinst_HEADERS = config-engine.h libmissing.h idmef-tree-data.h ntp.h tls-auth.h tls-util.h variable.h -include $(top_srcdir)/git.mk libprelude-1.0.0/src/include/prelude-client-profile.h0000664000076400007640000000773211345707014017542 00000000000000/***** * * Copyright (C) 2004, 2005 PreludeIDS Technologies. All Rights Reserved. * Author: Yoann Vandoorselaere * * * This file is part of the Prelude library. * * 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; see the file COPYING. If not, write to * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. * *****/ #ifndef _LIBPRELUDE_CLIENT_PROFILE_H #define _LIBPRELUDE_CLIENT_PROFILE_H #ifdef HAVE_CONFIG_H # include "config.h" #endif #include #include #include "prelude-config.h" #include "prelude-inttypes.h" #ifdef __cplusplus extern "C" { #endif #ifdef HAVE_UID_T typedef uid_t prelude_uid_t; #else typedef int prelude_uid_t; #endif #ifdef HAVE_GID_T typedef gid_t prelude_gid_t; #else typedef int prelude_gid_t; #endif typedef struct prelude_client_profile prelude_client_profile_t; int _prelude_client_profile_init(prelude_client_profile_t *cp); int _prelude_client_profile_new(prelude_client_profile_t **ret); int prelude_client_profile_new(prelude_client_profile_t **ret, const char *name); prelude_client_profile_t *prelude_client_profile_ref(prelude_client_profile_t *cp); void prelude_client_profile_destroy(prelude_client_profile_t *cp); void prelude_client_profile_get_config_filename(const prelude_client_profile_t *cp, char *buf, size_t size); void prelude_client_profile_get_default_config_dirname(const prelude_client_profile_t *cp, char *buf, size_t size); void prelude_client_profile_get_analyzerid_filename(const prelude_client_profile_t *cp, char *buf, size_t size); void prelude_client_profile_get_tls_key_filename(const prelude_client_profile_t *cp, char *buf, size_t size); void prelude_client_profile_get_tls_server_ca_cert_filename(const prelude_client_profile_t *cp, char *buf, size_t size); void prelude_client_profile_get_tls_server_keycert_filename(const prelude_client_profile_t *cp, char *buf, size_t size); void prelude_client_profile_get_tls_server_crl_filename(const prelude_client_profile_t *cp, char *buf, size_t size); void prelude_client_profile_get_tls_client_keycert_filename(const prelude_client_profile_t *cp, char *buf, size_t size); void prelude_client_profile_get_tls_client_trusted_cert_filename(const prelude_client_profile_t *cp, char *buf, size_t size); void prelude_client_profile_get_backup_dirname(const prelude_client_profile_t *cp, char *buf, size_t size); void prelude_client_profile_get_profile_dirname(const prelude_client_profile_t *cp, char *buf, size_t size); void prelude_client_profile_set_uid(prelude_client_profile_t *cp, prelude_uid_t uid); prelude_uid_t prelude_client_profile_get_uid(const prelude_client_profile_t *cp); void prelude_client_profile_set_gid(prelude_client_profile_t *cp, prelude_uid_t gid); prelude_gid_t prelude_client_profile_get_gid(const prelude_client_profile_t *cp); int prelude_client_profile_set_name(prelude_client_profile_t *cp, const char *name); const char *prelude_client_profile_get_name(const prelude_client_profile_t *cp); uint64_t prelude_client_profile_get_analyzerid(const prelude_client_profile_t *cp); void prelude_client_profile_set_analyzerid(prelude_client_profile_t *cp, uint64_t analyzerid); int prelude_client_profile_get_credentials(prelude_client_profile_t *cp, void **credentials); int prelude_client_profile_set_prefix(prelude_client_profile_t *cp, const char *prefix); void prelude_client_profile_get_prefix(const prelude_client_profile_t *cp, char *buf, size_t size); #ifdef __cplusplus } #endif #endif libprelude-1.0.0/src/include/prelude-option.h0000664000076400007640000001740211325615317016133 00000000000000/***** * * Copyright (C) 2001, 2002, 2003, 2004, 2005 PreludeIDS Technologies. All Rights Reserved. * Author: Yoann Vandoorselaere * * This file is part of the Prelude library. * * 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; see the file COPYING. If not, write to * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. * *****/ #ifndef _LIBPRELUDE_PRELUDE_GETOPT_H #define _LIBPRELUDE_PRELUDE_GETOPT_H #include "prelude-msgbuf.h" #ifdef __cplusplus extern "C" { #endif typedef enum { PRELUDE_OPTION_TYPE_CLI = 0x01, PRELUDE_OPTION_TYPE_CFG = 0x02, PRELUDE_OPTION_TYPE_WIDE = 0x04, PRELUDE_OPTION_TYPE_CONTEXT = 0x08, PRELUDE_OPTION_TYPE_ROOT = 0x10, PRELUDE_OPTION_TYPE_DESTROY = 0x20 } prelude_option_type_t; typedef enum { PRELUDE_OPTION_INPUT_TYPE_STRING = 1, PRELUDE_OPTION_INPUT_TYPE_INTEGER = 2, PRELUDE_OPTION_INPUT_TYPE_BOOLEAN = 3 } prelude_option_input_type_t; typedef struct prelude_option prelude_option_t; typedef struct prelude_option_context prelude_option_context_t; typedef int (*prelude_option_destroy_callback_t)(prelude_option_t *opt, prelude_string_t *out, void *context); typedef int (*prelude_option_commit_callback_t)(prelude_option_t *opt, prelude_string_t *out, void *context); typedef int (*prelude_option_get_callback_t)(prelude_option_t *opt, prelude_string_t *out, void *context); typedef int (*prelude_option_set_callback_t)(prelude_option_t *opt, const char *optarg, prelude_string_t *err, void *context); typedef enum { PRELUDE_OPTION_ARGUMENT_REQUIRED = 1, PRELUDE_OPTION_ARGUMENT_OPTIONAL = 2, PRELUDE_OPTION_ARGUMENT_NONE = 3 } prelude_option_argument_t; typedef enum { PRELUDE_OPTION_PRIORITY_IMMEDIATE = -2, PRELUDE_OPTION_PRIORITY_FIRST = -1, PRELUDE_OPTION_PRIORITY_NONE = 0, PRELUDE_OPTION_PRIORITY_LAST = 2 } prelude_option_priority_t; typedef enum { PRELUDE_OPTION_WARNING_OPTION = 0x1, PRELUDE_OPTION_WARNING_ARG = 0x2 } prelude_option_warning_t; void prelude_option_set_priority(prelude_option_t *option, prelude_option_priority_t priority); void prelude_option_print(prelude_option_t *opt, prelude_option_type_t type, int descoff, FILE *fd); int prelude_option_wide_send_msg(prelude_msgbuf_t *msgbuf, void *context); void prelude_option_destroy(prelude_option_t *option); int prelude_option_read(prelude_option_t *option, const char **filename, int *argc, char **argv, prelude_string_t **err, void *context); int prelude_option_add(prelude_option_t *parent, prelude_option_t **retopt, prelude_option_type_t type, char shortopt, const char *longopt, const char *desc, prelude_option_argument_t has_arg, int (*set)(prelude_option_t *opt, const char *optarg, prelude_string_t *err, void *context), int (*get)(prelude_option_t *opt, prelude_string_t *out, void *context)); void prelude_option_set_type(prelude_option_t *opt, prelude_option_type_t type); prelude_option_type_t prelude_option_get_type(prelude_option_t *opt); void prelude_option_set_warnings(prelude_option_warning_t new_warnings, prelude_option_warning_t *old_warnings); char prelude_option_get_shortname(prelude_option_t *opt); const char *prelude_option_get_longname(prelude_option_t *opt); void _prelude_option_set_private_data(prelude_option_t *opt, void *data); void *_prelude_option_get_private_data(prelude_option_t *opt); void prelude_option_set_data(prelude_option_t *opt, void *data); void *prelude_option_get_data(prelude_option_t *opt); int prelude_option_invoke_commit(prelude_option_t *opt, const char *ctname, prelude_string_t *value, void *context); int prelude_option_invoke_set(prelude_option_t *opt, const char *ctname, prelude_string_t *value, void **context); int prelude_option_invoke_get(prelude_option_t *opt, const char *ctname, prelude_string_t *value, void *context); int prelude_option_invoke_destroy(prelude_option_t *opt, const char *ctname, prelude_string_t *value, void *context); /* * */ int prelude_option_new_root(prelude_option_t **retopt); int prelude_option_new(prelude_option_t *parent, prelude_option_t **retopt); void prelude_option_set_longopt(prelude_option_t *opt, const char *longopt); const char *prelude_option_get_longopt(prelude_option_t *opt); void prelude_option_set_description(prelude_option_t *opt, const char *description); const char *prelude_option_get_description(prelude_option_t *opt); void prelude_option_set_has_arg(prelude_option_t *opt, prelude_option_argument_t has_arg); prelude_option_argument_t prelude_option_get_has_arg(prelude_option_t *opt); void prelude_option_set_value(prelude_option_t *opt, const char *value); const char *prelude_option_get_value(prelude_option_t *opt); void prelude_option_set_help(prelude_option_t *opt, const char *help); const char *prelude_option_get_help(prelude_option_t *opt); void prelude_option_set_input_validation_regex(prelude_option_t *opt, const char *regex); const char *prelude_option_get_input_validation_regex(prelude_option_t *opt); void prelude_option_set_input_type(prelude_option_t *opt, prelude_option_input_type_t input_type); prelude_option_input_type_t prelude_option_get_input_type(prelude_option_t *opt); prelude_list_t *prelude_option_get_optlist(prelude_option_t *opt); prelude_option_t *prelude_option_get_next(prelude_option_t *start, prelude_option_t *cur); prelude_bool_t prelude_option_has_optlist(prelude_option_t *opt); prelude_option_t *prelude_option_get_parent(prelude_option_t *opt); void prelude_option_set_destroy_callback(prelude_option_t *opt, prelude_option_destroy_callback_t destroy); prelude_option_destroy_callback_t prelude_option_get_destroy_callback(prelude_option_t *opt); void prelude_option_set_set_callback(prelude_option_t *opt, prelude_option_set_callback_t set); prelude_option_set_callback_t prelude_option_get_set_callback(prelude_option_t *opt); void prelude_option_set_get_callback(prelude_option_t *opt, int (*get)(prelude_option_t *opt, prelude_string_t *out, void *context)); prelude_option_get_callback_t prelude_option_get_get_callback(prelude_option_t *opt); void prelude_option_set_commit_callback(prelude_option_t *opt, prelude_option_commit_callback_t commit); prelude_option_commit_callback_t prelude_option_get_commit_callback(prelude_option_t *opt); void prelude_option_set_default_context(prelude_option_t *opt, void *context); int prelude_option_new_context(prelude_option_t *opt, prelude_option_context_t **ctx, const char *name, void *data); void prelude_option_context_destroy(prelude_option_context_t *oc); void *prelude_option_context_get_data(prelude_option_context_t *oc); void prelude_option_context_set_data(prelude_option_context_t *oc, void *data); prelude_option_t *prelude_option_search(prelude_option_t *parent, const char *name, prelude_option_type_t type, prelude_bool_t walk_children); prelude_option_context_t *prelude_option_search_context(prelude_option_t *opt, const char *name); #ifdef __cplusplus } #endif #endif /* _LIBPRELUDE_PRELUDE_GETOPT_H */ libprelude-1.0.0/src/include/idmef-message-write.h0000664000076400007640000000707011202225026017007 00000000000000 /***** * * Copyright (C) 2001, 2002, 2003, 2004, 2005 PreludeIDS Technologies. All Rights Reserved. * Author: Yoann Vandoorselaere * * This file is part of the Prelude library. * * 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; see the file COPYING. If not, write to * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. * *****/ /* Auto-generated by the GenerateIDMEFMessageWriteH package */ #ifndef _LIBPRELUDE_IDMEF_MESSAGE_WRITE_H #define _LIBPRELUDE_IDMEF_MESSAGE_WRITE_H #include "prelude-inttypes.h" #include "idmef-time.h" #include "prelude-string.h" #include "prelude-msgbuf.h" #ifdef __cplusplus extern "C" { #endif int idmef_additional_data_write(idmef_additional_data_t *additional_data, prelude_msgbuf_t *msg); int idmef_reference_write(idmef_reference_t *reference, prelude_msgbuf_t *msg); int idmef_classification_write(idmef_classification_t *classification, prelude_msgbuf_t *msg); int idmef_user_id_write(idmef_user_id_t *user_id, prelude_msgbuf_t *msg); int idmef_user_write(idmef_user_t *user, prelude_msgbuf_t *msg); int idmef_address_write(idmef_address_t *address, prelude_msgbuf_t *msg); int idmef_process_write(idmef_process_t *process, prelude_msgbuf_t *msg); int idmef_web_service_write(idmef_web_service_t *web_service, prelude_msgbuf_t *msg); int idmef_snmp_service_write(idmef_snmp_service_t *snmp_service, prelude_msgbuf_t *msg); int idmef_service_write(idmef_service_t *service, prelude_msgbuf_t *msg); int idmef_node_write(idmef_node_t *node, prelude_msgbuf_t *msg); int idmef_source_write(idmef_source_t *source, prelude_msgbuf_t *msg); int idmef_file_access_write(idmef_file_access_t *file_access, prelude_msgbuf_t *msg); int idmef_inode_write(idmef_inode_t *inode, prelude_msgbuf_t *msg); int idmef_checksum_write(idmef_checksum_t *checksum, prelude_msgbuf_t *msg); int idmef_file_write(idmef_file_t *file, prelude_msgbuf_t *msg); int idmef_linkage_write(idmef_linkage_t *linkage, prelude_msgbuf_t *msg); int idmef_target_write(idmef_target_t *target, prelude_msgbuf_t *msg); int idmef_analyzer_write(idmef_analyzer_t *analyzer, prelude_msgbuf_t *msg); int idmef_alertident_write(idmef_alertident_t *alertident, prelude_msgbuf_t *msg); int idmef_impact_write(idmef_impact_t *impact, prelude_msgbuf_t *msg); int idmef_action_write(idmef_action_t *action, prelude_msgbuf_t *msg); int idmef_confidence_write(idmef_confidence_t *confidence, prelude_msgbuf_t *msg); int idmef_assessment_write(idmef_assessment_t *assessment, prelude_msgbuf_t *msg); int idmef_tool_alert_write(idmef_tool_alert_t *tool_alert, prelude_msgbuf_t *msg); int idmef_correlation_alert_write(idmef_correlation_alert_t *correlation_alert, prelude_msgbuf_t *msg); int idmef_overflow_alert_write(idmef_overflow_alert_t *overflow_alert, prelude_msgbuf_t *msg); int idmef_alert_write(idmef_alert_t *alert, prelude_msgbuf_t *msg); int idmef_heartbeat_write(idmef_heartbeat_t *heartbeat, prelude_msgbuf_t *msg); int idmef_message_write(idmef_message_t *message, prelude_msgbuf_t *msg); #ifdef __cplusplus } #endif #endif /* _LIBPRELUDE_IDMEF_MESSAGE_WRITE_H */ libprelude-1.0.0/src/include/prelude-log.h0000664000076400007640000000730111345707014015377 00000000000000/***** * * Copyright (C) 2005,2006,2007 PreludeIDS Technologies. All Rights Reserved. * Author: Yoann Vandoorselaere * * This file is part of the Prelude library. * * 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; see the file COPYING. If not, write to * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. * *****/ #ifndef _LIBPRELUDE_PRELUDE_LOG_H #define _LIBPRELUDE_PRELUDE_LOG_H #include "prelude-config.h" #ifdef HAVE_CONFIG_H # include "config.h" #endif #include #ifdef __cplusplus extern "C" { #endif #ifndef __attribute__ /* This feature is available in gcc versions 2.5 and later. */ # if __GNUC__ < 2 || (__GNUC__ == 2 && __GNUC_MINOR__ < 5) || __STRICT_ANSI__ # define __attribute__(Spec) /* empty */ # endif /* The __-protected variants of `format' and `printf' attributes are accepted by gcc versions 2.6.4 (effectively 2.7) and later. */ # if __GNUC__ < 2 || (__GNUC__ == 2 && __GNUC_MINOR__ < 7) # define __format__ format # define __printf__ printf # endif #endif typedef enum { PRELUDE_LOG_CRIT = -1, PRELUDE_LOG_ERR = 0, PRELUDE_LOG_WARN = 1, PRELUDE_LOG_INFO = 2, PRELUDE_LOG_DEBUG = 3 } prelude_log_t; typedef enum { PRELUDE_LOG_FLAGS_QUIET = 0x01, /* Drop PRELUDE_LOG_PRIORITY_INFO */ PRELUDE_LOG_FLAGS_SYSLOG = 0x02 } prelude_log_flags_t; void _prelude_log_v(prelude_log_t level, const char *file, const char *function, int line, const char *fmt, va_list ap) __attribute__ ((__format__ (__printf__, 5, 0))); void _prelude_log(prelude_log_t level, const char *file, const char *function, int line, const char *fmt, ...) __attribute__ ((__format__ (__printf__, 5, 6))); #ifdef HAVE_VARIADIC_MACROS #define prelude_log(level, ...) \ _prelude_log(level, __FILE__, __PRELUDE_FUNC__, __LINE__, __VA_ARGS__) #define prelude_log_debug(level, ...) \ _prelude_log(PRELUDE_LOG_DEBUG + level, __FILE__, __PRELUDE_FUNC__, __LINE__, __VA_ARGS__) #else void prelude_log(prelude_log_t level, const char *fmt, ...) __attribute__ ((__format__ (__printf__, 2, 3))); void prelude_log_debug(prelude_log_t level, const char *fmt, ...) __attribute__ ((__format__ (__printf__, 2, 3))); #endif #define prelude_log_v(level, fmt, ap) \ _prelude_log_v(level, __FILE__, __PRELUDE_FUNC__, __LINE__, fmt, ap) #define prelude_log_debug_v(level, fmt, ap) \ _prelude_log_v(PRELUDE_LOG_DEBUG + level, __FILE__, __PRELUDE_FUNC__, __LINE__, fmt, ap) void prelude_log_set_level(prelude_log_t level); void prelude_log_set_debug_level(int level); prelude_log_flags_t prelude_log_get_flags(void); void prelude_log_set_flags(prelude_log_flags_t flags); char *prelude_log_get_prefix(void); void prelude_log_set_prefix(char *prefix); void prelude_log_set_callback(void log_cb(prelude_log_t level, const char *str)); int prelude_log_set_logfile(const char *filename); void _prelude_log_set_abort_level(prelude_log_t level); int _prelude_log_set_abort_level_from_string(const char *level); #ifdef __cplusplus } #endif #endif /* _LIBPRELUDE_PRELUDE_LOG_H */ libprelude-1.0.0/src/include/Makefile.in0000664000076400007640000013742011347714457015075 00000000000000# Makefile.in generated by automake 1.11.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, # Inc. # This Makefile.in 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. @SET_MAKE@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ target_triplet = @target@ subdir = src/include DIST_COMMON = $(include_HEADERS) $(noinst_HEADERS) \ $(srcdir)/Makefile.am $(srcdir)/Makefile.in \ $(srcdir)/prelude-inttypes.h.in $(srcdir)/prelude.h.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/libmissing/m4/00gnulib.m4 \ $(top_srcdir)/libmissing/m4/alloca.m4 \ $(top_srcdir)/libmissing/m4/arpa_inet_h.m4 \ $(top_srcdir)/libmissing/m4/btowc.m4 \ $(top_srcdir)/libmissing/m4/close.m4 \ $(top_srcdir)/libmissing/m4/codeset.m4 \ $(top_srcdir)/libmissing/m4/cond.m4 \ $(top_srcdir)/libmissing/m4/dos.m4 \ $(top_srcdir)/libmissing/m4/dup2.m4 \ $(top_srcdir)/libmissing/m4/errno_h.m4 \ $(top_srcdir)/libmissing/m4/exponentd.m4 \ $(top_srcdir)/libmissing/m4/exponentf.m4 \ $(top_srcdir)/libmissing/m4/exponentl.m4 \ $(top_srcdir)/libmissing/m4/extensions.m4 \ $(top_srcdir)/libmissing/m4/fclose.m4 \ $(top_srcdir)/libmissing/m4/fcntl-o.m4 \ $(top_srcdir)/libmissing/m4/fcntl_h.m4 \ $(top_srcdir)/libmissing/m4/float_h.m4 \ $(top_srcdir)/libmissing/m4/fopen.m4 \ $(top_srcdir)/libmissing/m4/fpieee.m4 \ $(top_srcdir)/libmissing/m4/frexp.m4 \ $(top_srcdir)/libmissing/m4/frexpl.m4 \ $(top_srcdir)/libmissing/m4/fseeko.m4 \ $(top_srcdir)/libmissing/m4/ftw.m4 \ $(top_srcdir)/libmissing/m4/getaddrinfo.m4 \ $(top_srcdir)/libmissing/m4/getdelim.m4 \ $(top_srcdir)/libmissing/m4/gethostname.m4 \ $(top_srcdir)/libmissing/m4/getline.m4 \ $(top_srcdir)/libmissing/m4/getpagesize.m4 \ $(top_srcdir)/libmissing/m4/getpass.m4 \ $(top_srcdir)/libmissing/m4/gettimeofday.m4 \ $(top_srcdir)/libmissing/m4/glibc21.m4 \ $(top_srcdir)/libmissing/m4/gnulib-common.m4 \ $(top_srcdir)/libmissing/m4/gnulib-comp.m4 \ $(top_srcdir)/libmissing/m4/gnulib-tool.m4 \ $(top_srcdir)/libmissing/m4/hostent.m4 \ $(top_srcdir)/libmissing/m4/include_next.m4 \ $(top_srcdir)/libmissing/m4/inet_ntop.m4 \ $(top_srcdir)/libmissing/m4/inet_pton.m4 \ $(top_srcdir)/libmissing/m4/intmax_t.m4 \ $(top_srcdir)/libmissing/m4/inttypes_h.m4 \ $(top_srcdir)/libmissing/m4/isnand.m4 \ $(top_srcdir)/libmissing/m4/isnanf.m4 \ $(top_srcdir)/libmissing/m4/isnanl.m4 \ $(top_srcdir)/libmissing/m4/langinfo_h.m4 \ $(top_srcdir)/libmissing/m4/ldexpl.m4 \ $(top_srcdir)/libmissing/m4/lib-ld.m4 \ $(top_srcdir)/libmissing/m4/lib-link.m4 \ $(top_srcdir)/libmissing/m4/lib-prefix.m4 \ $(top_srcdir)/libmissing/m4/localcharset.m4 \ $(top_srcdir)/libmissing/m4/locale-fr.m4 \ $(top_srcdir)/libmissing/m4/locale-ja.m4 \ $(top_srcdir)/libmissing/m4/locale-tr.m4 \ $(top_srcdir)/libmissing/m4/locale-zh.m4 \ $(top_srcdir)/libmissing/m4/lock.m4 \ $(top_srcdir)/libmissing/m4/longlong.m4 \ $(top_srcdir)/libmissing/m4/lseek.m4 \ $(top_srcdir)/libmissing/m4/lstat.m4 \ $(top_srcdir)/libmissing/m4/malloc.m4 \ $(top_srcdir)/libmissing/m4/math_h.m4 \ $(top_srcdir)/libmissing/m4/mbrtowc.m4 \ $(top_srcdir)/libmissing/m4/mbsinit.m4 \ $(top_srcdir)/libmissing/m4/mbstate_t.m4 \ $(top_srcdir)/libmissing/m4/memchr.m4 \ $(top_srcdir)/libmissing/m4/memmem.m4 \ $(top_srcdir)/libmissing/m4/minmax.m4 \ $(top_srcdir)/libmissing/m4/mktime.m4 \ $(top_srcdir)/libmissing/m4/mmap-anon.m4 \ $(top_srcdir)/libmissing/m4/mode_t.m4 \ $(top_srcdir)/libmissing/m4/multiarch.m4 \ $(top_srcdir)/libmissing/m4/netdb_h.m4 \ $(top_srcdir)/libmissing/m4/netinet_in_h.m4 \ $(top_srcdir)/libmissing/m4/nl_langinfo.m4 \ $(top_srcdir)/libmissing/m4/nocrash.m4 \ $(top_srcdir)/libmissing/m4/onceonly.m4 \ $(top_srcdir)/libmissing/m4/open.m4 \ $(top_srcdir)/libmissing/m4/pathmax.m4 \ $(top_srcdir)/libmissing/m4/perror.m4 \ $(top_srcdir)/libmissing/m4/poll.m4 \ $(top_srcdir)/libmissing/m4/printf-frexp.m4 \ $(top_srcdir)/libmissing/m4/printf-frexpl.m4 \ $(top_srcdir)/libmissing/m4/printf.m4 \ $(top_srcdir)/libmissing/m4/realloc.m4 \ $(top_srcdir)/libmissing/m4/regex.m4 \ $(top_srcdir)/libmissing/m4/relocatable-lib.m4 \ $(top_srcdir)/libmissing/m4/select.m4 \ $(top_srcdir)/libmissing/m4/servent.m4 \ $(top_srcdir)/libmissing/m4/signal_h.m4 \ $(top_srcdir)/libmissing/m4/signalblocking.m4 \ $(top_srcdir)/libmissing/m4/signbit.m4 \ $(top_srcdir)/libmissing/m4/size_max.m4 \ $(top_srcdir)/libmissing/m4/sleep.m4 \ $(top_srcdir)/libmissing/m4/snprintf-posix.m4 \ $(top_srcdir)/libmissing/m4/snprintf.m4 \ $(top_srcdir)/libmissing/m4/sockets.m4 \ $(top_srcdir)/libmissing/m4/socklen.m4 \ $(top_srcdir)/libmissing/m4/sockpfaf.m4 \ $(top_srcdir)/libmissing/m4/ssize_t.m4 \ $(top_srcdir)/libmissing/m4/stat.m4 \ $(top_srcdir)/libmissing/m4/stdbool.m4 \ $(top_srcdir)/libmissing/m4/stddef_h.m4 \ $(top_srcdir)/libmissing/m4/stdint.m4 \ $(top_srcdir)/libmissing/m4/stdint_h.m4 \ $(top_srcdir)/libmissing/m4/stdio_h.m4 \ $(top_srcdir)/libmissing/m4/stdlib_h.m4 \ $(top_srcdir)/libmissing/m4/strcase.m4 \ $(top_srcdir)/libmissing/m4/strcasestr.m4 \ $(top_srcdir)/libmissing/m4/strdup.m4 \ $(top_srcdir)/libmissing/m4/strerror.m4 \ $(top_srcdir)/libmissing/m4/string_h.m4 \ $(top_srcdir)/libmissing/m4/strings_h.m4 \ $(top_srcdir)/libmissing/m4/strndup.m4 \ $(top_srcdir)/libmissing/m4/strnlen.m4 \ $(top_srcdir)/libmissing/m4/strptime.m4 \ $(top_srcdir)/libmissing/m4/strsep.m4 \ $(top_srcdir)/libmissing/m4/symlink.m4 \ $(top_srcdir)/libmissing/m4/sys_ioctl_h.m4 \ $(top_srcdir)/libmissing/m4/sys_select_h.m4 \ $(top_srcdir)/libmissing/m4/sys_socket_h.m4 \ $(top_srcdir)/libmissing/m4/sys_stat_h.m4 \ $(top_srcdir)/libmissing/m4/sys_time_h.m4 \ $(top_srcdir)/libmissing/m4/sys_utsname_h.m4 \ $(top_srcdir)/libmissing/m4/thread.m4 \ $(top_srcdir)/libmissing/m4/threadlib.m4 \ $(top_srcdir)/libmissing/m4/time_h.m4 \ $(top_srcdir)/libmissing/m4/time_r.m4 \ $(top_srcdir)/libmissing/m4/timegm.m4 \ $(top_srcdir)/libmissing/m4/tls.m4 \ $(top_srcdir)/libmissing/m4/tm_gmtoff.m4 \ $(top_srcdir)/libmissing/m4/uname.m4 \ $(top_srcdir)/libmissing/m4/ungetc.m4 \ $(top_srcdir)/libmissing/m4/unistd_h.m4 \ $(top_srcdir)/libmissing/m4/vasnprintf.m4 \ $(top_srcdir)/libmissing/m4/vsnprintf-posix.m4 \ $(top_srcdir)/libmissing/m4/vsnprintf.m4 \ $(top_srcdir)/libmissing/m4/warn-on-use.m4 \ $(top_srcdir)/libmissing/m4/wchar.m4 \ $(top_srcdir)/libmissing/m4/wchar_t.m4 \ $(top_srcdir)/libmissing/m4/wcrtomb.m4 \ $(top_srcdir)/libmissing/m4/wctob.m4 \ $(top_srcdir)/libmissing/m4/wctype.m4 \ $(top_srcdir)/libmissing/m4/wint_t.m4 \ $(top_srcdir)/libmissing/m4/write.m4 \ $(top_srcdir)/libmissing/m4/xsize.m4 \ $(top_srcdir)/libmissing/m4/yield.m4 \ $(top_srcdir)/m4/ac_compile_check_sizeof.m4 \ $(top_srcdir)/m4/am_path_ruby.m4 $(top_srcdir)/m4/argz.m4 \ $(top_srcdir)/m4/as-ac-expand.m4 \ $(top_srcdir)/m4/ax_c_check_flag.m4 \ $(top_srcdir)/m4/ax_check_aligned_access_required.m4 \ $(top_srcdir)/m4/ax_create_prelude_inttypes_h.m4 \ $(top_srcdir)/m4/ax_ld_check_flag.m4 \ $(top_srcdir)/m4/gtk-doc.m4 $(top_srcdir)/m4/libgcrypt.m4 \ $(top_srcdir)/m4/libgnutls-extra.m4 \ $(top_srcdir)/m4/libgnutls.m4 $(top_srcdir)/m4/libtool.m4 \ $(top_srcdir)/m4/ltdl.m4 $(top_srcdir)/m4/ltoptions.m4 \ $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/m4/pkg.m4 \ $(top_srcdir)/configure.in am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = prelude.h prelude-inttypes.h CONFIG_CLEAN_VPATH_FILES = SOURCES = DIST_SOURCES = am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; am__install_max = 40 am__nobase_strip_setup = \ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` am__nobase_strip = \ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" am__nobase_list = $(am__nobase_strip_setup); \ for p in $$list; do echo "$$p $$p"; done | \ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ if (++n[$$2] == $(am__install_max)) \ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ END { for (dir in files) print dir, files[dir] }' am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' am__installdirs = "$(DESTDIR)$(includedir)" "$(DESTDIR)$(includedir)" HEADERS = $(include_HEADERS) $(nodist_include_HEADERS) \ $(noinst_HEADERS) ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ ALLOCA = @ALLOCA@ ALLOCA_H = @ALLOCA_H@ AMTAR = @AMTAR@ APPLE_UNIVERSAL_BUILD = @APPLE_UNIVERSAL_BUILD@ AR = @AR@ ARGZ_H = @ARGZ_H@ AS = @AS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ BINDINGS_CC = @BINDINGS_CC@ BINDIR = @BINDIR@ BITSIZEOF_PTRDIFF_T = @BITSIZEOF_PTRDIFF_T@ BITSIZEOF_SIG_ATOMIC_T = @BITSIZEOF_SIG_ATOMIC_T@ BITSIZEOF_SIZE_T = @BITSIZEOF_SIZE_T@ BITSIZEOF_WCHAR_T = @BITSIZEOF_WCHAR_T@ BITSIZEOF_WINT_T = @BITSIZEOF_WINT_T@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CC_FOR_BUILD = @CC_FOR_BUILD@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EMULTIHOP_HIDDEN = @EMULTIHOP_HIDDEN@ EMULTIHOP_VALUE = @EMULTIHOP_VALUE@ ENOLINK_HIDDEN = @ENOLINK_HIDDEN@ ENOLINK_VALUE = @ENOLINK_VALUE@ EOVERFLOW_HIDDEN = @EOVERFLOW_HIDDEN@ EOVERFLOW_VALUE = @EOVERFLOW_VALUE@ ERRNO_H = @ERRNO_H@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ FLOAT_H = @FLOAT_H@ GETADDRINFO_LIB = @GETADDRINFO_LIB@ GETHOSTNAME_LIB = @GETHOSTNAME_LIB@ GLIBC21 = @GLIBC21@ GNULIB_ACCEPT = @GNULIB_ACCEPT@ GNULIB_ACCEPT4 = @GNULIB_ACCEPT4@ GNULIB_ACOSL = @GNULIB_ACOSL@ GNULIB_ASINL = @GNULIB_ASINL@ GNULIB_ATANL = @GNULIB_ATANL@ GNULIB_ATOLL = @GNULIB_ATOLL@ GNULIB_BIND = @GNULIB_BIND@ GNULIB_BTOWC = @GNULIB_BTOWC@ GNULIB_CALLOC_POSIX = @GNULIB_CALLOC_POSIX@ GNULIB_CANONICALIZE_FILE_NAME = @GNULIB_CANONICALIZE_FILE_NAME@ GNULIB_CEILF = @GNULIB_CEILF@ GNULIB_CEILL = @GNULIB_CEILL@ GNULIB_CHOWN = @GNULIB_CHOWN@ GNULIB_CLOSE = @GNULIB_CLOSE@ GNULIB_CONNECT = @GNULIB_CONNECT@ GNULIB_COSL = @GNULIB_COSL@ GNULIB_DPRINTF = @GNULIB_DPRINTF@ GNULIB_DUP2 = @GNULIB_DUP2@ GNULIB_DUP3 = @GNULIB_DUP3@ GNULIB_ENVIRON = @GNULIB_ENVIRON@ GNULIB_EUIDACCESS = @GNULIB_EUIDACCESS@ GNULIB_EXPL = @GNULIB_EXPL@ GNULIB_FACCESSAT = @GNULIB_FACCESSAT@ GNULIB_FCHDIR = @GNULIB_FCHDIR@ GNULIB_FCHMODAT = @GNULIB_FCHMODAT@ GNULIB_FCHOWNAT = @GNULIB_FCHOWNAT@ GNULIB_FCLOSE = @GNULIB_FCLOSE@ GNULIB_FCNTL = @GNULIB_FCNTL@ GNULIB_FFLUSH = @GNULIB_FFLUSH@ GNULIB_FLOORF = @GNULIB_FLOORF@ GNULIB_FLOORL = @GNULIB_FLOORL@ GNULIB_FOPEN = @GNULIB_FOPEN@ GNULIB_FPRINTF = @GNULIB_FPRINTF@ GNULIB_FPRINTF_POSIX = @GNULIB_FPRINTF_POSIX@ GNULIB_FPURGE = @GNULIB_FPURGE@ GNULIB_FPUTC = @GNULIB_FPUTC@ GNULIB_FPUTS = @GNULIB_FPUTS@ GNULIB_FREOPEN = @GNULIB_FREOPEN@ GNULIB_FREXP = @GNULIB_FREXP@ GNULIB_FREXPL = @GNULIB_FREXPL@ GNULIB_FSEEK = @GNULIB_FSEEK@ GNULIB_FSEEKO = @GNULIB_FSEEKO@ GNULIB_FSTATAT = @GNULIB_FSTATAT@ GNULIB_FSYNC = @GNULIB_FSYNC@ GNULIB_FTELL = @GNULIB_FTELL@ GNULIB_FTELLO = @GNULIB_FTELLO@ GNULIB_FTRUNCATE = @GNULIB_FTRUNCATE@ GNULIB_FUTIMENS = @GNULIB_FUTIMENS@ GNULIB_FWRITE = @GNULIB_FWRITE@ GNULIB_GETADDRINFO = @GNULIB_GETADDRINFO@ GNULIB_GETCWD = @GNULIB_GETCWD@ GNULIB_GETDELIM = @GNULIB_GETDELIM@ GNULIB_GETDOMAINNAME = @GNULIB_GETDOMAINNAME@ GNULIB_GETDTABLESIZE = @GNULIB_GETDTABLESIZE@ GNULIB_GETGROUPS = @GNULIB_GETGROUPS@ GNULIB_GETHOSTNAME = @GNULIB_GETHOSTNAME@ GNULIB_GETLINE = @GNULIB_GETLINE@ GNULIB_GETLOADAVG = @GNULIB_GETLOADAVG@ GNULIB_GETLOGIN = @GNULIB_GETLOGIN@ GNULIB_GETLOGIN_R = @GNULIB_GETLOGIN_R@ GNULIB_GETPAGESIZE = @GNULIB_GETPAGESIZE@ GNULIB_GETPEERNAME = @GNULIB_GETPEERNAME@ GNULIB_GETSOCKNAME = @GNULIB_GETSOCKNAME@ GNULIB_GETSOCKOPT = @GNULIB_GETSOCKOPT@ GNULIB_GETSUBOPT = @GNULIB_GETSUBOPT@ GNULIB_GETTIMEOFDAY = @GNULIB_GETTIMEOFDAY@ GNULIB_GETUSERSHELL = @GNULIB_GETUSERSHELL@ GNULIB_INET_NTOP = @GNULIB_INET_NTOP@ GNULIB_INET_PTON = @GNULIB_INET_PTON@ GNULIB_IOCTL = @GNULIB_IOCTL@ GNULIB_ISFINITE = @GNULIB_ISFINITE@ GNULIB_ISINF = @GNULIB_ISINF@ GNULIB_ISNAN = @GNULIB_ISNAN@ GNULIB_ISNAND = @GNULIB_ISNAND@ GNULIB_ISNANF = @GNULIB_ISNANF@ GNULIB_ISNANL = @GNULIB_ISNANL@ GNULIB_LCHMOD = @GNULIB_LCHMOD@ GNULIB_LCHOWN = @GNULIB_LCHOWN@ GNULIB_LDEXPL = @GNULIB_LDEXPL@ GNULIB_LINK = @GNULIB_LINK@ GNULIB_LINKAT = @GNULIB_LINKAT@ GNULIB_LISTEN = @GNULIB_LISTEN@ GNULIB_LOGL = @GNULIB_LOGL@ GNULIB_LSEEK = @GNULIB_LSEEK@ GNULIB_LSTAT = @GNULIB_LSTAT@ GNULIB_MALLOC_POSIX = @GNULIB_MALLOC_POSIX@ GNULIB_MBRLEN = @GNULIB_MBRLEN@ GNULIB_MBRTOWC = @GNULIB_MBRTOWC@ GNULIB_MBSCASECMP = @GNULIB_MBSCASECMP@ GNULIB_MBSCASESTR = @GNULIB_MBSCASESTR@ GNULIB_MBSCHR = @GNULIB_MBSCHR@ GNULIB_MBSCSPN = @GNULIB_MBSCSPN@ GNULIB_MBSINIT = @GNULIB_MBSINIT@ GNULIB_MBSLEN = @GNULIB_MBSLEN@ GNULIB_MBSNCASECMP = @GNULIB_MBSNCASECMP@ GNULIB_MBSNLEN = @GNULIB_MBSNLEN@ GNULIB_MBSNRTOWCS = @GNULIB_MBSNRTOWCS@ GNULIB_MBSPBRK = @GNULIB_MBSPBRK@ GNULIB_MBSPCASECMP = @GNULIB_MBSPCASECMP@ GNULIB_MBSRCHR = @GNULIB_MBSRCHR@ GNULIB_MBSRTOWCS = @GNULIB_MBSRTOWCS@ GNULIB_MBSSEP = @GNULIB_MBSSEP@ GNULIB_MBSSPN = @GNULIB_MBSSPN@ GNULIB_MBSSTR = @GNULIB_MBSSTR@ GNULIB_MBSTOK_R = @GNULIB_MBSTOK_R@ GNULIB_MEMCHR = @GNULIB_MEMCHR@ GNULIB_MEMMEM = @GNULIB_MEMMEM@ GNULIB_MEMPCPY = @GNULIB_MEMPCPY@ GNULIB_MEMRCHR = @GNULIB_MEMRCHR@ GNULIB_MKDIRAT = @GNULIB_MKDIRAT@ GNULIB_MKDTEMP = @GNULIB_MKDTEMP@ GNULIB_MKFIFO = @GNULIB_MKFIFO@ GNULIB_MKFIFOAT = @GNULIB_MKFIFOAT@ GNULIB_MKNOD = @GNULIB_MKNOD@ GNULIB_MKNODAT = @GNULIB_MKNODAT@ GNULIB_MKOSTEMP = @GNULIB_MKOSTEMP@ GNULIB_MKOSTEMPS = @GNULIB_MKOSTEMPS@ GNULIB_MKSTEMP = @GNULIB_MKSTEMP@ GNULIB_MKSTEMPS = @GNULIB_MKSTEMPS@ GNULIB_NL_LANGINFO = @GNULIB_NL_LANGINFO@ GNULIB_OBSTACK_PRINTF = @GNULIB_OBSTACK_PRINTF@ GNULIB_OBSTACK_PRINTF_POSIX = @GNULIB_OBSTACK_PRINTF_POSIX@ GNULIB_OPEN = @GNULIB_OPEN@ GNULIB_OPENAT = @GNULIB_OPENAT@ GNULIB_PERROR = @GNULIB_PERROR@ GNULIB_PIPE2 = @GNULIB_PIPE2@ GNULIB_POPEN = @GNULIB_POPEN@ GNULIB_PREAD = @GNULIB_PREAD@ GNULIB_PRINTF = @GNULIB_PRINTF@ GNULIB_PRINTF_POSIX = @GNULIB_PRINTF_POSIX@ GNULIB_PUTC = @GNULIB_PUTC@ GNULIB_PUTCHAR = @GNULIB_PUTCHAR@ GNULIB_PUTENV = @GNULIB_PUTENV@ GNULIB_PUTS = @GNULIB_PUTS@ GNULIB_RANDOM_R = @GNULIB_RANDOM_R@ GNULIB_RAWMEMCHR = @GNULIB_RAWMEMCHR@ GNULIB_READLINK = @GNULIB_READLINK@ GNULIB_READLINKAT = @GNULIB_READLINKAT@ GNULIB_REALLOC_POSIX = @GNULIB_REALLOC_POSIX@ GNULIB_REALPATH = @GNULIB_REALPATH@ GNULIB_RECV = @GNULIB_RECV@ GNULIB_RECVFROM = @GNULIB_RECVFROM@ GNULIB_REMOVE = @GNULIB_REMOVE@ GNULIB_RENAME = @GNULIB_RENAME@ GNULIB_RENAMEAT = @GNULIB_RENAMEAT@ GNULIB_RMDIR = @GNULIB_RMDIR@ GNULIB_ROUND = @GNULIB_ROUND@ GNULIB_ROUNDF = @GNULIB_ROUNDF@ GNULIB_ROUNDL = @GNULIB_ROUNDL@ GNULIB_RPMATCH = @GNULIB_RPMATCH@ GNULIB_SELECT = @GNULIB_SELECT@ GNULIB_SEND = @GNULIB_SEND@ GNULIB_SENDTO = @GNULIB_SENDTO@ GNULIB_SETENV = @GNULIB_SETENV@ GNULIB_SETSOCKOPT = @GNULIB_SETSOCKOPT@ GNULIB_SHUTDOWN = @GNULIB_SHUTDOWN@ GNULIB_SIGACTION = @GNULIB_SIGACTION@ GNULIB_SIGNAL_H_SIGPIPE = @GNULIB_SIGNAL_H_SIGPIPE@ GNULIB_SIGNBIT = @GNULIB_SIGNBIT@ GNULIB_SIGPROCMASK = @GNULIB_SIGPROCMASK@ GNULIB_SINL = @GNULIB_SINL@ GNULIB_SLEEP = @GNULIB_SLEEP@ GNULIB_SNPRINTF = @GNULIB_SNPRINTF@ GNULIB_SOCKET = @GNULIB_SOCKET@ GNULIB_SPRINTF_POSIX = @GNULIB_SPRINTF_POSIX@ GNULIB_SQRTL = @GNULIB_SQRTL@ GNULIB_STAT = @GNULIB_STAT@ GNULIB_STDIO_H_SIGPIPE = @GNULIB_STDIO_H_SIGPIPE@ GNULIB_STPCPY = @GNULIB_STPCPY@ GNULIB_STPNCPY = @GNULIB_STPNCPY@ GNULIB_STRCASESTR = @GNULIB_STRCASESTR@ GNULIB_STRCHRNUL = @GNULIB_STRCHRNUL@ GNULIB_STRDUP = @GNULIB_STRDUP@ GNULIB_STRERROR = @GNULIB_STRERROR@ GNULIB_STRNDUP = @GNULIB_STRNDUP@ GNULIB_STRNLEN = @GNULIB_STRNLEN@ GNULIB_STRPBRK = @GNULIB_STRPBRK@ GNULIB_STRSEP = @GNULIB_STRSEP@ GNULIB_STRSIGNAL = @GNULIB_STRSIGNAL@ GNULIB_STRSTR = @GNULIB_STRSTR@ GNULIB_STRTOD = @GNULIB_STRTOD@ GNULIB_STRTOK_R = @GNULIB_STRTOK_R@ GNULIB_STRTOLL = @GNULIB_STRTOLL@ GNULIB_STRTOULL = @GNULIB_STRTOULL@ GNULIB_STRVERSCMP = @GNULIB_STRVERSCMP@ GNULIB_SYMLINK = @GNULIB_SYMLINK@ GNULIB_SYMLINKAT = @GNULIB_SYMLINKAT@ GNULIB_TANL = @GNULIB_TANL@ GNULIB_TRUNC = @GNULIB_TRUNC@ GNULIB_TRUNCF = @GNULIB_TRUNCF@ GNULIB_TRUNCL = @GNULIB_TRUNCL@ GNULIB_UNAME = @GNULIB_UNAME@ GNULIB_UNISTD_H_GETOPT = @GNULIB_UNISTD_H_GETOPT@ GNULIB_UNISTD_H_SIGPIPE = @GNULIB_UNISTD_H_SIGPIPE@ GNULIB_UNLINK = @GNULIB_UNLINK@ GNULIB_UNLINKAT = @GNULIB_UNLINKAT@ GNULIB_UNSETENV = @GNULIB_UNSETENV@ GNULIB_USLEEP = @GNULIB_USLEEP@ GNULIB_UTIMENSAT = @GNULIB_UTIMENSAT@ GNULIB_VASPRINTF = @GNULIB_VASPRINTF@ GNULIB_VDPRINTF = @GNULIB_VDPRINTF@ GNULIB_VFPRINTF = @GNULIB_VFPRINTF@ GNULIB_VFPRINTF_POSIX = @GNULIB_VFPRINTF_POSIX@ GNULIB_VPRINTF = @GNULIB_VPRINTF@ GNULIB_VPRINTF_POSIX = @GNULIB_VPRINTF_POSIX@ GNULIB_VSNPRINTF = @GNULIB_VSNPRINTF@ GNULIB_VSPRINTF_POSIX = @GNULIB_VSPRINTF_POSIX@ GNULIB_WCRTOMB = @GNULIB_WCRTOMB@ GNULIB_WCSNRTOMBS = @GNULIB_WCSNRTOMBS@ GNULIB_WCSRTOMBS = @GNULIB_WCSRTOMBS@ GNULIB_WCTOB = @GNULIB_WCTOB@ GNULIB_WCWIDTH = @GNULIB_WCWIDTH@ GNULIB_WRITE = @GNULIB_WRITE@ GREP = @GREP@ GTKDOC_CHECK = @GTKDOC_CHECK@ HAVE_ACCEPT4 = @HAVE_ACCEPT4@ HAVE_ACOSL = @HAVE_ACOSL@ HAVE_ARPA_INET_H = @HAVE_ARPA_INET_H@ HAVE_ASINL = @HAVE_ASINL@ HAVE_ATANL = @HAVE_ATANL@ HAVE_ATOLL = @HAVE_ATOLL@ HAVE_BTOWC = @HAVE_BTOWC@ HAVE_CALLOC_POSIX = @HAVE_CALLOC_POSIX@ HAVE_CANONICALIZE_FILE_NAME = @HAVE_CANONICALIZE_FILE_NAME@ HAVE_CHOWN = @HAVE_CHOWN@ HAVE_COSL = @HAVE_COSL@ HAVE_CXX = @HAVE_CXX@ HAVE_DECL_ACOSL = @HAVE_DECL_ACOSL@ HAVE_DECL_ASINL = @HAVE_DECL_ASINL@ HAVE_DECL_ATANL = @HAVE_DECL_ATANL@ HAVE_DECL_COSL = @HAVE_DECL_COSL@ HAVE_DECL_ENVIRON = @HAVE_DECL_ENVIRON@ HAVE_DECL_EXPL = @HAVE_DECL_EXPL@ HAVE_DECL_FPURGE = @HAVE_DECL_FPURGE@ HAVE_DECL_FREEADDRINFO = @HAVE_DECL_FREEADDRINFO@ HAVE_DECL_FREXPL = @HAVE_DECL_FREXPL@ HAVE_DECL_GAI_STRERROR = @HAVE_DECL_GAI_STRERROR@ HAVE_DECL_GETADDRINFO = @HAVE_DECL_GETADDRINFO@ HAVE_DECL_GETDELIM = @HAVE_DECL_GETDELIM@ HAVE_DECL_GETLINE = @HAVE_DECL_GETLINE@ HAVE_DECL_GETLOADAVG = @HAVE_DECL_GETLOADAVG@ HAVE_DECL_GETLOGIN_R = @HAVE_DECL_GETLOGIN_R@ HAVE_DECL_GETNAMEINFO = @HAVE_DECL_GETNAMEINFO@ HAVE_DECL_INET_NTOP = @HAVE_DECL_INET_NTOP@ HAVE_DECL_INET_PTON = @HAVE_DECL_INET_PTON@ HAVE_DECL_LDEXPL = @HAVE_DECL_LDEXPL@ HAVE_DECL_LOGL = @HAVE_DECL_LOGL@ HAVE_DECL_MEMMEM = @HAVE_DECL_MEMMEM@ HAVE_DECL_MEMRCHR = @HAVE_DECL_MEMRCHR@ HAVE_DECL_OBSTACK_PRINTF = @HAVE_DECL_OBSTACK_PRINTF@ HAVE_DECL_SINL = @HAVE_DECL_SINL@ HAVE_DECL_SNPRINTF = @HAVE_DECL_SNPRINTF@ HAVE_DECL_SQRTL = @HAVE_DECL_SQRTL@ HAVE_DECL_STRDUP = @HAVE_DECL_STRDUP@ HAVE_DECL_STRERROR = @HAVE_DECL_STRERROR@ HAVE_DECL_STRNCASECMP = @HAVE_DECL_STRNCASECMP@ HAVE_DECL_STRNDUP = @HAVE_DECL_STRNDUP@ HAVE_DECL_STRNLEN = @HAVE_DECL_STRNLEN@ HAVE_DECL_STRSIGNAL = @HAVE_DECL_STRSIGNAL@ HAVE_DECL_STRTOK_R = @HAVE_DECL_STRTOK_R@ HAVE_DECL_TANL = @HAVE_DECL_TANL@ HAVE_DECL_TRUNC = @HAVE_DECL_TRUNC@ HAVE_DECL_TRUNCF = @HAVE_DECL_TRUNCF@ HAVE_DECL_VSNPRINTF = @HAVE_DECL_VSNPRINTF@ HAVE_DECL_WCTOB = @HAVE_DECL_WCTOB@ HAVE_DECL_WCWIDTH = @HAVE_DECL_WCWIDTH@ HAVE_DPRINTF = @HAVE_DPRINTF@ HAVE_DUP2 = @HAVE_DUP2@ HAVE_DUP3 = @HAVE_DUP3@ HAVE_EUIDACCESS = @HAVE_EUIDACCESS@ HAVE_EXPL = @HAVE_EXPL@ HAVE_FACCESSAT = @HAVE_FACCESSAT@ HAVE_FCHMODAT = @HAVE_FCHMODAT@ HAVE_FCHOWNAT = @HAVE_FCHOWNAT@ HAVE_FCNTL = @HAVE_FCNTL@ HAVE_FSTATAT = @HAVE_FSTATAT@ HAVE_FSYNC = @HAVE_FSYNC@ HAVE_FTRUNCATE = @HAVE_FTRUNCATE@ HAVE_FUTIMENS = @HAVE_FUTIMENS@ HAVE_GETDOMAINNAME = @HAVE_GETDOMAINNAME@ HAVE_GETDTABLESIZE = @HAVE_GETDTABLESIZE@ HAVE_GETGROUPS = @HAVE_GETGROUPS@ HAVE_GETHOSTNAME = @HAVE_GETHOSTNAME@ HAVE_GETLOGIN = @HAVE_GETLOGIN@ HAVE_GETPAGESIZE = @HAVE_GETPAGESIZE@ HAVE_GETSUBOPT = @HAVE_GETSUBOPT@ HAVE_GETUSERSHELL = @HAVE_GETUSERSHELL@ HAVE_INTTYPES_H = @HAVE_INTTYPES_H@ HAVE_ISNAND = @HAVE_ISNAND@ HAVE_ISNANF = @HAVE_ISNANF@ HAVE_ISNANL = @HAVE_ISNANL@ HAVE_ISWCNTRL = @HAVE_ISWCNTRL@ HAVE_LANGINFO_CODESET = @HAVE_LANGINFO_CODESET@ HAVE_LANGINFO_ERA = @HAVE_LANGINFO_ERA@ HAVE_LANGINFO_H = @HAVE_LANGINFO_H@ HAVE_LCHMOD = @HAVE_LCHMOD@ HAVE_LCHOWN = @HAVE_LCHOWN@ HAVE_LINK = @HAVE_LINK@ HAVE_LINKAT = @HAVE_LINKAT@ HAVE_LOGL = @HAVE_LOGL@ HAVE_LONG_LONG_INT = @HAVE_LONG_LONG_INT@ HAVE_LSTAT = @HAVE_LSTAT@ HAVE_MALLOC_POSIX = @HAVE_MALLOC_POSIX@ HAVE_MBRLEN = @HAVE_MBRLEN@ HAVE_MBRTOWC = @HAVE_MBRTOWC@ HAVE_MBSINIT = @HAVE_MBSINIT@ HAVE_MBSLEN = @HAVE_MBSLEN@ HAVE_MBSNRTOWCS = @HAVE_MBSNRTOWCS@ HAVE_MBSRTOWCS = @HAVE_MBSRTOWCS@ HAVE_MEMPCPY = @HAVE_MEMPCPY@ HAVE_MKDIRAT = @HAVE_MKDIRAT@ HAVE_MKDTEMP = @HAVE_MKDTEMP@ HAVE_MKFIFO = @HAVE_MKFIFO@ HAVE_MKFIFOAT = @HAVE_MKFIFOAT@ HAVE_MKNOD = @HAVE_MKNOD@ HAVE_MKNODAT = @HAVE_MKNODAT@ HAVE_MKOSTEMP = @HAVE_MKOSTEMP@ HAVE_MKOSTEMPS = @HAVE_MKOSTEMPS@ HAVE_MKSTEMPS = @HAVE_MKSTEMPS@ HAVE_NETDB_H = @HAVE_NETDB_H@ HAVE_NETINET_IN_H = @HAVE_NETINET_IN_H@ HAVE_NL_LANGINFO = @HAVE_NL_LANGINFO@ HAVE_OPENAT = @HAVE_OPENAT@ HAVE_OS_H = @HAVE_OS_H@ HAVE_PIPE2 = @HAVE_PIPE2@ HAVE_POSIX_SIGNALBLOCKING = @HAVE_POSIX_SIGNALBLOCKING@ HAVE_PREAD = @HAVE_PREAD@ HAVE_RANDOM_H = @HAVE_RANDOM_H@ HAVE_RANDOM_R = @HAVE_RANDOM_R@ HAVE_RAWMEMCHR = @HAVE_RAWMEMCHR@ HAVE_READLINK = @HAVE_READLINK@ HAVE_READLINKAT = @HAVE_READLINKAT@ HAVE_REALLOC_POSIX = @HAVE_REALLOC_POSIX@ HAVE_REALPATH = @HAVE_REALPATH@ HAVE_RENAMEAT = @HAVE_RENAMEAT@ HAVE_RPMATCH = @HAVE_RPMATCH@ HAVE_SA_FAMILY_T = @HAVE_SA_FAMILY_T@ HAVE_SETENV = @HAVE_SETENV@ HAVE_SIGACTION = @HAVE_SIGACTION@ HAVE_SIGINFO_T = @HAVE_SIGINFO_T@ HAVE_SIGNED_SIG_ATOMIC_T = @HAVE_SIGNED_SIG_ATOMIC_T@ HAVE_SIGNED_WCHAR_T = @HAVE_SIGNED_WCHAR_T@ HAVE_SIGNED_WINT_T = @HAVE_SIGNED_WINT_T@ HAVE_SIGSET_T = @HAVE_SIGSET_T@ HAVE_SINL = @HAVE_SINL@ HAVE_SLEEP = @HAVE_SLEEP@ HAVE_SQRTL = @HAVE_SQRTL@ HAVE_STDINT_H = @HAVE_STDINT_H@ HAVE_STPCPY = @HAVE_STPCPY@ HAVE_STPNCPY = @HAVE_STPNCPY@ HAVE_STRCASECMP = @HAVE_STRCASECMP@ HAVE_STRCASESTR = @HAVE_STRCASESTR@ HAVE_STRCHRNUL = @HAVE_STRCHRNUL@ HAVE_STRPBRK = @HAVE_STRPBRK@ HAVE_STRSEP = @HAVE_STRSEP@ HAVE_STRTOD = @HAVE_STRTOD@ HAVE_STRTOLL = @HAVE_STRTOLL@ HAVE_STRTOULL = @HAVE_STRTOULL@ HAVE_STRUCT_ADDRINFO = @HAVE_STRUCT_ADDRINFO@ HAVE_STRUCT_RANDOM_DATA = @HAVE_STRUCT_RANDOM_DATA@ HAVE_STRUCT_SIGACTION_SA_SIGACTION = @HAVE_STRUCT_SIGACTION_SA_SIGACTION@ HAVE_STRUCT_SOCKADDR_STORAGE = @HAVE_STRUCT_SOCKADDR_STORAGE@ HAVE_STRUCT_TIMEVAL = @HAVE_STRUCT_TIMEVAL@ HAVE_STRUCT_UTSNAME = @HAVE_STRUCT_UTSNAME@ HAVE_STRVERSCMP = @HAVE_STRVERSCMP@ HAVE_SYMLINK = @HAVE_SYMLINK@ HAVE_SYMLINKAT = @HAVE_SYMLINKAT@ HAVE_SYS_BITYPES_H = @HAVE_SYS_BITYPES_H@ HAVE_SYS_INTTYPES_H = @HAVE_SYS_INTTYPES_H@ HAVE_SYS_IOCTL_H = @HAVE_SYS_IOCTL_H@ HAVE_SYS_LOADAVG_H = @HAVE_SYS_LOADAVG_H@ HAVE_SYS_PARAM_H = @HAVE_SYS_PARAM_H@ HAVE_SYS_SELECT_H = @HAVE_SYS_SELECT_H@ HAVE_SYS_SOCKET_H = @HAVE_SYS_SOCKET_H@ HAVE_SYS_TIME_H = @HAVE_SYS_TIME_H@ HAVE_SYS_TYPES_H = @HAVE_SYS_TYPES_H@ HAVE_SYS_UTSNAME_H = @HAVE_SYS_UTSNAME_H@ HAVE_TANL = @HAVE_TANL@ HAVE_TYPE_VOLATILE_SIG_ATOMIC_T = @HAVE_TYPE_VOLATILE_SIG_ATOMIC_T@ HAVE_UNAME = @HAVE_UNAME@ HAVE_UNISTD_H = @HAVE_UNISTD_H@ HAVE_UNLINKAT = @HAVE_UNLINKAT@ HAVE_UNSETENV = @HAVE_UNSETENV@ HAVE_UNSIGNED_LONG_LONG_INT = @HAVE_UNSIGNED_LONG_LONG_INT@ HAVE_USLEEP = @HAVE_USLEEP@ HAVE_UTIMENSAT = @HAVE_UTIMENSAT@ HAVE_VASPRINTF = @HAVE_VASPRINTF@ HAVE_VDPRINTF = @HAVE_VDPRINTF@ HAVE_WCHAR_H = @HAVE_WCHAR_H@ HAVE_WCHAR_T = @HAVE_WCHAR_T@ HAVE_WCRTOMB = @HAVE_WCRTOMB@ HAVE_WCSNRTOMBS = @HAVE_WCSNRTOMBS@ HAVE_WCSRTOMBS = @HAVE_WCSRTOMBS@ HAVE_WCTYPE_H = @HAVE_WCTYPE_H@ HAVE_WINSOCK2_H = @HAVE_WINSOCK2_H@ HAVE_WINT_T = @HAVE_WINT_T@ HAVE_WS2TCPIP_H = @HAVE_WS2TCPIP_H@ HAVE__BOOL = @HAVE__BOOL@ HOSTENT_LIB = @HOSTENT_LIB@ HTML_DIR = @HTML_DIR@ INCLTDL = @INCLTDL@ INCLUDE_NEXT = @INCLUDE_NEXT@ INCLUDE_NEXT_AS_FIRST_DIRECTIVE = @INCLUDE_NEXT_AS_FIRST_DIRECTIVE@ INET_NTOP_LIB = @INET_NTOP_LIB@ INET_PTON_LIB = @INET_PTON_LIB@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LD = @LD@ LDFLAGS = @LDFLAGS@ LEX = @LEX@ LEXLIB = @LEXLIB@ LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@ LIBADD_DL = @LIBADD_DL@ LIBADD_DLD_LINK = @LIBADD_DLD_LINK@ LIBADD_DLOPEN = @LIBADD_DLOPEN@ LIBADD_SHL_LOAD = @LIBADD_SHL_LOAD@ LIBDIR = @LIBDIR@ LIBGCRYPT_CFLAGS = @LIBGCRYPT_CFLAGS@ LIBGCRYPT_CONFIG = @LIBGCRYPT_CONFIG@ LIBGCRYPT_LIBS = @LIBGCRYPT_LIBS@ LIBGNUTLS_CFLAGS = @LIBGNUTLS_CFLAGS@ LIBGNUTLS_CONFIG = @LIBGNUTLS_CONFIG@ LIBGNUTLS_EXTRA_CFLAGS = @LIBGNUTLS_EXTRA_CFLAGS@ LIBGNUTLS_EXTRA_CONFIG = @LIBGNUTLS_EXTRA_CONFIG@ LIBGNUTLS_EXTRA_LIBS = @LIBGNUTLS_EXTRA_LIBS@ LIBGNUTLS_LIBS = @LIBGNUTLS_LIBS@ LIBINTL = @LIBINTL@ LIBLTDL = @LIBLTDL@ LIBMULTITHREAD = @LIBMULTITHREAD@ LIBOBJS = @LIBOBJS@ LIBPRELUDECPP_SONAME = @LIBPRELUDECPP_SONAME@ LIBPRELUDE_CFLAGS = @LIBPRELUDE_CFLAGS@ LIBPRELUDE_LIBS = @LIBPRELUDE_LIBS@ LIBPRELUDE_SONAME = @LIBPRELUDE_SONAME@ LIBPTH = @LIBPTH@ LIBPTH_PREFIX = @LIBPTH_PREFIX@ LIBS = @LIBS@ LIBSOCKET = @LIBSOCKET@ LIBTESTS_LIBDEPS = @LIBTESTS_LIBDEPS@ LIBTHREAD = @LIBTHREAD@ LIBTOOL = @LIBTOOL@ LIPO = @LIPO@ LN_S = @LN_S@ LOCALCHARSET_TESTS_ENVIRONMENT = @LOCALCHARSET_TESTS_ENVIRONMENT@ LOCALE_FR = @LOCALE_FR@ LOCALE_FR_UTF8 = @LOCALE_FR_UTF8@ LOCALE_JA = @LOCALE_JA@ LOCALE_TR_UTF8 = @LOCALE_TR_UTF8@ LOCALE_ZH_CN = @LOCALE_ZH_CN@ LOCALSTATEDIR = @LOCALSTATEDIR@ LTALLOCA = @LTALLOCA@ LTDLDEPS = @LTDLDEPS@ LTDLINCL = @LTDLINCL@ LTDLOPEN = @LTDLOPEN@ LTLIBINTL = @LTLIBINTL@ LTLIBMULTITHREAD = @LTLIBMULTITHREAD@ LTLIBOBJS = @LTLIBOBJS@ LTLIBPTH = @LTLIBPTH@ LTLIBTHREAD = @LTLIBTHREAD@ LT_CONFIG_H = @LT_CONFIG_H@ LT_DLLOADERS = @LT_DLLOADERS@ LT_DLPREOPEN = @LT_DLPREOPEN@ LUA_CFLAGS = @LUA_CFLAGS@ LUA_CONFIG = @LUA_CONFIG@ LUA_LIBS = @LUA_LIBS@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MKDIR_P = @MKDIR_P@ NETDB_H = @NETDB_H@ NETINET_IN_H = @NETINET_IN_H@ NEXT_ARPA_INET_H = @NEXT_ARPA_INET_H@ NEXT_AS_FIRST_DIRECTIVE_ARPA_INET_H = @NEXT_AS_FIRST_DIRECTIVE_ARPA_INET_H@ NEXT_AS_FIRST_DIRECTIVE_ERRNO_H = @NEXT_AS_FIRST_DIRECTIVE_ERRNO_H@ NEXT_AS_FIRST_DIRECTIVE_FCNTL_H = @NEXT_AS_FIRST_DIRECTIVE_FCNTL_H@ NEXT_AS_FIRST_DIRECTIVE_FLOAT_H = @NEXT_AS_FIRST_DIRECTIVE_FLOAT_H@ NEXT_AS_FIRST_DIRECTIVE_LANGINFO_H = @NEXT_AS_FIRST_DIRECTIVE_LANGINFO_H@ NEXT_AS_FIRST_DIRECTIVE_MATH_H = @NEXT_AS_FIRST_DIRECTIVE_MATH_H@ NEXT_AS_FIRST_DIRECTIVE_NETDB_H = @NEXT_AS_FIRST_DIRECTIVE_NETDB_H@ NEXT_AS_FIRST_DIRECTIVE_NETINET_IN_H = @NEXT_AS_FIRST_DIRECTIVE_NETINET_IN_H@ NEXT_AS_FIRST_DIRECTIVE_SIGNAL_H = @NEXT_AS_FIRST_DIRECTIVE_SIGNAL_H@ NEXT_AS_FIRST_DIRECTIVE_STDDEF_H = @NEXT_AS_FIRST_DIRECTIVE_STDDEF_H@ NEXT_AS_FIRST_DIRECTIVE_STDINT_H = @NEXT_AS_FIRST_DIRECTIVE_STDINT_H@ NEXT_AS_FIRST_DIRECTIVE_STDIO_H = @NEXT_AS_FIRST_DIRECTIVE_STDIO_H@ NEXT_AS_FIRST_DIRECTIVE_STDLIB_H = @NEXT_AS_FIRST_DIRECTIVE_STDLIB_H@ NEXT_AS_FIRST_DIRECTIVE_STRINGS_H = @NEXT_AS_FIRST_DIRECTIVE_STRINGS_H@ NEXT_AS_FIRST_DIRECTIVE_STRING_H = @NEXT_AS_FIRST_DIRECTIVE_STRING_H@ NEXT_AS_FIRST_DIRECTIVE_SYS_IOCTL_H = @NEXT_AS_FIRST_DIRECTIVE_SYS_IOCTL_H@ NEXT_AS_FIRST_DIRECTIVE_SYS_SELECT_H = @NEXT_AS_FIRST_DIRECTIVE_SYS_SELECT_H@ NEXT_AS_FIRST_DIRECTIVE_SYS_SOCKET_H = @NEXT_AS_FIRST_DIRECTIVE_SYS_SOCKET_H@ NEXT_AS_FIRST_DIRECTIVE_SYS_STAT_H = @NEXT_AS_FIRST_DIRECTIVE_SYS_STAT_H@ NEXT_AS_FIRST_DIRECTIVE_SYS_TIME_H = @NEXT_AS_FIRST_DIRECTIVE_SYS_TIME_H@ NEXT_AS_FIRST_DIRECTIVE_SYS_UTSNAME_H = @NEXT_AS_FIRST_DIRECTIVE_SYS_UTSNAME_H@ NEXT_AS_FIRST_DIRECTIVE_TIME_H = @NEXT_AS_FIRST_DIRECTIVE_TIME_H@ NEXT_AS_FIRST_DIRECTIVE_UNISTD_H = @NEXT_AS_FIRST_DIRECTIVE_UNISTD_H@ NEXT_AS_FIRST_DIRECTIVE_WCHAR_H = @NEXT_AS_FIRST_DIRECTIVE_WCHAR_H@ NEXT_AS_FIRST_DIRECTIVE_WCTYPE_H = @NEXT_AS_FIRST_DIRECTIVE_WCTYPE_H@ NEXT_ERRNO_H = @NEXT_ERRNO_H@ NEXT_FCNTL_H = @NEXT_FCNTL_H@ NEXT_FLOAT_H = @NEXT_FLOAT_H@ NEXT_LANGINFO_H = @NEXT_LANGINFO_H@ NEXT_MATH_H = @NEXT_MATH_H@ NEXT_NETDB_H = @NEXT_NETDB_H@ NEXT_NETINET_IN_H = @NEXT_NETINET_IN_H@ NEXT_SIGNAL_H = @NEXT_SIGNAL_H@ NEXT_STDDEF_H = @NEXT_STDDEF_H@ NEXT_STDINT_H = @NEXT_STDINT_H@ NEXT_STDIO_H = @NEXT_STDIO_H@ NEXT_STDLIB_H = @NEXT_STDLIB_H@ NEXT_STRINGS_H = @NEXT_STRINGS_H@ NEXT_STRING_H = @NEXT_STRING_H@ NEXT_SYS_IOCTL_H = @NEXT_SYS_IOCTL_H@ NEXT_SYS_SELECT_H = @NEXT_SYS_SELECT_H@ NEXT_SYS_SOCKET_H = @NEXT_SYS_SOCKET_H@ NEXT_SYS_STAT_H = @NEXT_SYS_STAT_H@ NEXT_SYS_TIME_H = @NEXT_SYS_TIME_H@ NEXT_SYS_UTSNAME_H = @NEXT_SYS_UTSNAME_H@ NEXT_TIME_H = @NEXT_TIME_H@ NEXT_UNISTD_H = @NEXT_UNISTD_H@ NEXT_WCHAR_H = @NEXT_WCHAR_H@ NEXT_WCTYPE_H = @NEXT_WCTYPE_H@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PCFLAGS = @PCFLAGS@ PERL = @PERL@ PERL_EXTRA_PARAMS = @PERL_EXTRA_PARAMS@ PKG_CONFIG = @PKG_CONFIG@ POLL_H = @POLL_H@ PRAGMA_SYSTEM_HEADER = @PRAGMA_SYSTEM_HEADER@ PRELUDE_ADMIN_CFLAGS = @PRELUDE_ADMIN_CFLAGS@ PRELUDE_ADMIN_LIBS = @PRELUDE_ADMIN_LIBS@ PRELUDE_CONFIG_DIR = @PRELUDE_CONFIG_DIR@ PRELUDE_SPOOL_DIR = @PRELUDE_SPOOL_DIR@ PTHREAD_CFLAGS = @PTHREAD_CFLAGS@ PTHREAD_LDFLAGS = @PTHREAD_LDFLAGS@ PTHREAD_LIBS = @PTHREAD_LIBS@ PTRDIFF_T_SUFFIX = @PTRDIFF_T_SUFFIX@ PYTHON = @PYTHON@ RANLIB = @RANLIB@ RELOCATABLE = @RELOCATABLE@ REPLACE_BTOWC = @REPLACE_BTOWC@ REPLACE_CANONICALIZE_FILE_NAME = @REPLACE_CANONICALIZE_FILE_NAME@ REPLACE_CEILF = @REPLACE_CEILF@ REPLACE_CEILL = @REPLACE_CEILL@ REPLACE_CHOWN = @REPLACE_CHOWN@ REPLACE_CLOSE = @REPLACE_CLOSE@ REPLACE_DPRINTF = @REPLACE_DPRINTF@ REPLACE_DUP = @REPLACE_DUP@ REPLACE_DUP2 = @REPLACE_DUP2@ REPLACE_FCHDIR = @REPLACE_FCHDIR@ REPLACE_FCHOWNAT = @REPLACE_FCHOWNAT@ REPLACE_FCLOSE = @REPLACE_FCLOSE@ REPLACE_FCNTL = @REPLACE_FCNTL@ REPLACE_FFLUSH = @REPLACE_FFLUSH@ REPLACE_FLOORF = @REPLACE_FLOORF@ REPLACE_FLOORL = @REPLACE_FLOORL@ REPLACE_FOPEN = @REPLACE_FOPEN@ REPLACE_FPRINTF = @REPLACE_FPRINTF@ REPLACE_FPURGE = @REPLACE_FPURGE@ REPLACE_FREOPEN = @REPLACE_FREOPEN@ REPLACE_FREXP = @REPLACE_FREXP@ REPLACE_FREXPL = @REPLACE_FREXPL@ REPLACE_FSEEK = @REPLACE_FSEEK@ REPLACE_FSEEKO = @REPLACE_FSEEKO@ REPLACE_FSTAT = @REPLACE_FSTAT@ REPLACE_FSTATAT = @REPLACE_FSTATAT@ REPLACE_FTELL = @REPLACE_FTELL@ REPLACE_FTELLO = @REPLACE_FTELLO@ REPLACE_FUTIMENS = @REPLACE_FUTIMENS@ REPLACE_GETCWD = @REPLACE_GETCWD@ REPLACE_GETDELIM = @REPLACE_GETDELIM@ REPLACE_GETGROUPS = @REPLACE_GETGROUPS@ REPLACE_GETLINE = @REPLACE_GETLINE@ REPLACE_GETPAGESIZE = @REPLACE_GETPAGESIZE@ REPLACE_GETTIMEOFDAY = @REPLACE_GETTIMEOFDAY@ REPLACE_HUGE_VAL = @REPLACE_HUGE_VAL@ REPLACE_ISFINITE = @REPLACE_ISFINITE@ REPLACE_ISINF = @REPLACE_ISINF@ REPLACE_ISNAN = @REPLACE_ISNAN@ REPLACE_ISWCNTRL = @REPLACE_ISWCNTRL@ REPLACE_LCHOWN = @REPLACE_LCHOWN@ REPLACE_LDEXPL = @REPLACE_LDEXPL@ REPLACE_LINK = @REPLACE_LINK@ REPLACE_LINKAT = @REPLACE_LINKAT@ REPLACE_LOCALTIME_R = @REPLACE_LOCALTIME_R@ REPLACE_LSEEK = @REPLACE_LSEEK@ REPLACE_LSTAT = @REPLACE_LSTAT@ REPLACE_MBRLEN = @REPLACE_MBRLEN@ REPLACE_MBRTOWC = @REPLACE_MBRTOWC@ REPLACE_MBSINIT = @REPLACE_MBSINIT@ REPLACE_MBSNRTOWCS = @REPLACE_MBSNRTOWCS@ REPLACE_MBSRTOWCS = @REPLACE_MBSRTOWCS@ REPLACE_MBSTATE_T = @REPLACE_MBSTATE_T@ REPLACE_MEMCHR = @REPLACE_MEMCHR@ REPLACE_MEMMEM = @REPLACE_MEMMEM@ REPLACE_MKDIR = @REPLACE_MKDIR@ REPLACE_MKFIFO = @REPLACE_MKFIFO@ REPLACE_MKNOD = @REPLACE_MKNOD@ REPLACE_MKSTEMP = @REPLACE_MKSTEMP@ REPLACE_MKTIME = @REPLACE_MKTIME@ REPLACE_NAN = @REPLACE_NAN@ REPLACE_NANOSLEEP = @REPLACE_NANOSLEEP@ REPLACE_NL_LANGINFO = @REPLACE_NL_LANGINFO@ REPLACE_NULL = @REPLACE_NULL@ REPLACE_OBSTACK_PRINTF = @REPLACE_OBSTACK_PRINTF@ REPLACE_OPEN = @REPLACE_OPEN@ REPLACE_OPENAT = @REPLACE_OPENAT@ REPLACE_PERROR = @REPLACE_PERROR@ REPLACE_POPEN = @REPLACE_POPEN@ REPLACE_PREAD = @REPLACE_PREAD@ REPLACE_PRINTF = @REPLACE_PRINTF@ REPLACE_PUTENV = @REPLACE_PUTENV@ REPLACE_READLINK = @REPLACE_READLINK@ REPLACE_REALPATH = @REPLACE_REALPATH@ REPLACE_REMOVE = @REPLACE_REMOVE@ REPLACE_RENAME = @REPLACE_RENAME@ REPLACE_RENAMEAT = @REPLACE_RENAMEAT@ REPLACE_RMDIR = @REPLACE_RMDIR@ REPLACE_ROUND = @REPLACE_ROUND@ REPLACE_ROUNDF = @REPLACE_ROUNDF@ REPLACE_ROUNDL = @REPLACE_ROUNDL@ REPLACE_SELECT = @REPLACE_SELECT@ REPLACE_SETENV = @REPLACE_SETENV@ REPLACE_SIGNBIT = @REPLACE_SIGNBIT@ REPLACE_SIGNBIT_USING_GCC = @REPLACE_SIGNBIT_USING_GCC@ REPLACE_SLEEP = @REPLACE_SLEEP@ REPLACE_SNPRINTF = @REPLACE_SNPRINTF@ REPLACE_SPRINTF = @REPLACE_SPRINTF@ REPLACE_STAT = @REPLACE_STAT@ REPLACE_STDIO_WRITE_FUNCS = @REPLACE_STDIO_WRITE_FUNCS@ REPLACE_STRCASESTR = @REPLACE_STRCASESTR@ REPLACE_STRDUP = @REPLACE_STRDUP@ REPLACE_STRERROR = @REPLACE_STRERROR@ REPLACE_STRNDUP = @REPLACE_STRNDUP@ REPLACE_STRPTIME = @REPLACE_STRPTIME@ REPLACE_STRSIGNAL = @REPLACE_STRSIGNAL@ REPLACE_STRSTR = @REPLACE_STRSTR@ REPLACE_STRTOD = @REPLACE_STRTOD@ REPLACE_STRTOK_R = @REPLACE_STRTOK_R@ REPLACE_SYMLINK = @REPLACE_SYMLINK@ REPLACE_TIMEGM = @REPLACE_TIMEGM@ REPLACE_TRUNCL = @REPLACE_TRUNCL@ REPLACE_UNLINK = @REPLACE_UNLINK@ REPLACE_UNLINKAT = @REPLACE_UNLINKAT@ REPLACE_UNSETENV = @REPLACE_UNSETENV@ REPLACE_USLEEP = @REPLACE_USLEEP@ REPLACE_UTIMENSAT = @REPLACE_UTIMENSAT@ REPLACE_VASPRINTF = @REPLACE_VASPRINTF@ REPLACE_VDPRINTF = @REPLACE_VDPRINTF@ REPLACE_VFPRINTF = @REPLACE_VFPRINTF@ REPLACE_VPRINTF = @REPLACE_VPRINTF@ REPLACE_VSNPRINTF = @REPLACE_VSNPRINTF@ REPLACE_VSPRINTF = @REPLACE_VSPRINTF@ REPLACE_WCRTOMB = @REPLACE_WCRTOMB@ REPLACE_WCSNRTOMBS = @REPLACE_WCSNRTOMBS@ REPLACE_WCSRTOMBS = @REPLACE_WCSRTOMBS@ REPLACE_WCTOB = @REPLACE_WCTOB@ REPLACE_WCWIDTH = @REPLACE_WCWIDTH@ REPLACE_WRITE = @REPLACE_WRITE@ RUBY = @RUBY@ RUBY_CCFLAGS = @RUBY_CCFLAGS@ RUBY_EXEC_PREFIX = @RUBY_EXEC_PREFIX@ RUBY_INCLUDES = @RUBY_INCLUDES@ RUBY_LIBS = @RUBY_LIBS@ RUBY_PLATFORM = @RUBY_PLATFORM@ RUBY_PREFIX = @RUBY_PREFIX@ RUBY_VERSION = @RUBY_VERSION@ SED = @SED@ SERVENT_LIB = @SERVENT_LIB@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ SIG_ATOMIC_T_SUFFIX = @SIG_ATOMIC_T_SUFFIX@ SIZE_T_SUFFIX = @SIZE_T_SUFFIX@ STDBOOL_H = @STDBOOL_H@ STDDEF_H = @STDDEF_H@ STDINT_H = @STDINT_H@ STRIP = @STRIP@ SWIG = @SWIG@ SYSCONFDIR = @SYSCONFDIR@ SYS_IOCTL_H_HAVE_WINSOCK2_H = @SYS_IOCTL_H_HAVE_WINSOCK2_H@ SYS_IOCTL_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS = @SYS_IOCTL_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS@ SYS_SOCKET_H = @SYS_SOCKET_H@ SYS_TIME_H_DEFINES_STRUCT_TIMESPEC = @SYS_TIME_H_DEFINES_STRUCT_TIMESPEC@ TIME_H_DEFINES_STRUCT_TIMESPEC = @TIME_H_DEFINES_STRUCT_TIMESPEC@ UNDEFINE_STRTOK_R = @UNDEFINE_STRTOK_R@ UNISTD_H_HAVE_WINSOCK2_H = @UNISTD_H_HAVE_WINSOCK2_H@ UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS = @UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS@ VALGRIND = @VALGRIND@ VERSION = @VERSION@ WCHAR_T_SUFFIX = @WCHAR_T_SUFFIX@ WCTYPE_H = @WCTYPE_H@ WINT_T_SUFFIX = @WINT_T_SUFFIX@ YACC = @YACC@ YFLAGS = @YFLAGS@ YIELD_LIB = @YIELD_LIB@ __PRELUDE_64BIT_FORMAT_PREFIX = @__PRELUDE_64BIT_FORMAT_PREFIX@ __PRELUDE_HAVE_64BIT_LONG = @__PRELUDE_HAVE_64BIT_LONG@ __PRELUDE_HAVE_INTTYPES_H = @__PRELUDE_HAVE_INTTYPES_H@ __PRELUDE_HAVE_STDINT_H = @__PRELUDE_HAVE_STDINT_H@ __PRELUDE_STDINT_HAVE_UINT16 = @__PRELUDE_STDINT_HAVE_UINT16@ __PRELUDE_STDINT_HAVE_UINT32 = @__PRELUDE_STDINT_HAVE_UINT32@ __PRELUDE_STDINT_HAVE_UINT64 = @__PRELUDE_STDINT_HAVE_UINT64@ __PRELUDE_STDINT_HAVE_UINT8 = @__PRELUDE_STDINT_HAVE_UINT8@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ gl_LIBOBJS = @gl_LIBOBJS@ gl_LTLIBOBJS = @gl_LTLIBOBJS@ gltests_LIBOBJS = @gltests_LIBOBJS@ gltests_LTLIBOBJS = @gltests_LTLIBOBJS@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = $(prefix)/include/libprelude infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ lt_ECHO = @lt_ECHO@ ltdl_LIBOBJS = @ltdl_LIBOBJS@ ltdl_LTLIBOBJS = @ltdl_LTLIBOBJS@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ pkgrbexecdir = @pkgrbexecdir@ pkgrubydir = @pkgrubydir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ rbexecdir = @rbexecdir@ rubydir = @rubydir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sys_symbol_underscore = @sys_symbol_underscore@ sysconfdir = @sysconfdir@ target = @target@ target_alias = @target_alias@ target_cpu = @target_cpu@ target_os = @target_os@ target_vendor = @target_vendor@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ include_HEADERS = common.h \ daemonize.h \ idmef.h \ idmef-additional-data.h \ idmef-class.h \ idmef-criteria.h \ idmef-criterion-value.h \ idmef-data.h \ idmef-message-helpers.h \ idmef-message-id.h \ idmef-message-read.h \ idmef-message-print.h \ idmef-message-write.h \ idmef-path.h \ idmef-time.h \ idmef-tree-data.h \ idmef-tree-wrap.h \ idmef-value.h \ idmef-value-type.h \ prelude.h \ prelude-async.h \ prelude-extract.h \ prelude-hash.h \ prelude-linked-object.h \ prelude-list.h \ prelude-log.h \ prelude-client.h \ prelude-client-profile.h \ prelude-connection.h \ prelude-connection-pool.h \ prelude-failover.h \ prelude-ident.h \ prelude-io.h \ prelude-msg.h \ prelude-msgbuf.h \ prelude-message-id.h \ prelude-option.h \ prelude-option-wide.h \ prelude-plugin.h \ prelude-string.h \ prelude-timer.h \ prelude-thread.h nodist_include_HEADERS = prelude.h prelude-inttypes.h noinst_HEADERS = config-engine.h libmissing.h idmef-tree-data.h ntp.h tls-auth.h tls-util.h variable.h all: all-am .SUFFIXES: $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/include/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu src/include/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): prelude.h: $(top_builddir)/config.status $(srcdir)/prelude.h.in cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ prelude-inttypes.h: $(top_builddir)/config.status $(srcdir)/prelude-inttypes.h.in cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs install-includeHEADERS: $(include_HEADERS) @$(NORMAL_INSTALL) test -z "$(includedir)" || $(MKDIR_P) "$(DESTDIR)$(includedir)" @list='$(include_HEADERS)'; test -n "$(includedir)" || list=; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ done | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_HEADER) $$files '$(DESTDIR)$(includedir)'"; \ $(INSTALL_HEADER) $$files "$(DESTDIR)$(includedir)" || exit $$?; \ done uninstall-includeHEADERS: @$(NORMAL_UNINSTALL) @list='$(include_HEADERS)'; test -n "$(includedir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ test -n "$$files" || exit 0; \ echo " ( cd '$(DESTDIR)$(includedir)' && rm -f" $$files ")"; \ cd "$(DESTDIR)$(includedir)" && rm -f $$files install-nodist_includeHEADERS: $(nodist_include_HEADERS) @$(NORMAL_INSTALL) test -z "$(includedir)" || $(MKDIR_P) "$(DESTDIR)$(includedir)" @list='$(nodist_include_HEADERS)'; test -n "$(includedir)" || list=; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ done | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_HEADER) $$files '$(DESTDIR)$(includedir)'"; \ $(INSTALL_HEADER) $$files "$(DESTDIR)$(includedir)" || exit $$?; \ done uninstall-nodist_includeHEADERS: @$(NORMAL_UNINSTALL) @list='$(nodist_include_HEADERS)'; test -n "$(includedir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ test -n "$$files" || exit 0; \ echo " ( cd '$(DESTDIR)$(includedir)' && rm -f" $$files ")"; \ cd "$(DESTDIR)$(includedir)" && rm -f $$files ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ mkid -fID $$unique tags: TAGS TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) set x; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: CTAGS CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(HEADERS) installdirs: for dir in "$(DESTDIR)$(includedir)" "$(DESTDIR)$(includedir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic clean-libtool mostlyclean-am distclean: distclean-am -rm -f Makefile distclean-am: clean-am distclean-generic distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-includeHEADERS install-nodist_includeHEADERS install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-generic mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-includeHEADERS uninstall-nodist_includeHEADERS .MAKE: install-am install-strip .PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ clean-libtool ctags distclean distclean-generic \ distclean-libtool distclean-tags distdir dvi dvi-am html \ html-am info info-am install install-am install-data \ install-data-am install-dvi install-dvi-am install-exec \ install-exec-am install-html install-html-am \ install-includeHEADERS install-info install-info-am \ install-man install-nodist_includeHEADERS install-pdf \ install-pdf-am install-ps install-ps-am install-strip \ installcheck installcheck-am installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-generic \ mostlyclean-libtool pdf pdf-am ps ps-am tags uninstall \ uninstall-am uninstall-includeHEADERS \ uninstall-nodist_includeHEADERS -include $(top_srcdir)/git.mk # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: libprelude-1.0.0/src/include/prelude-failover.h0000664000076400007640000000365611202225026016424 00000000000000/***** * * Copyright (C) 2004-2006,2007 PreludeIDS Technologies. All Rights Reserved. * Author: Yoann Vandoorselaere * * This file is part of the Prelude library. * * 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; see the file COPYING. If not, write to * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. * *****/ #ifndef _LIBPRELUDE_PRELUDE_FAILOVER_H #define _LIBPRELUDE_PRELUDE_FAILOVER_H #ifdef __cplusplus extern "C" { #endif typedef struct prelude_failover prelude_failover_t; void prelude_failover_destroy(prelude_failover_t *failover); int prelude_failover_new(prelude_failover_t **ret, const char *dirname); void prelude_failover_set_quota(prelude_failover_t *failover, size_t limit); int prelude_failover_save_msg(prelude_failover_t *failover, prelude_msg_t *msg); ssize_t prelude_failover_get_saved_msg(prelude_failover_t *failover, prelude_msg_t **out); unsigned long prelude_failover_get_deleted_msg_count(prelude_failover_t *failover); unsigned long prelude_failover_get_available_msg_count(prelude_failover_t *failover); void prelude_failover_enable_transaction(prelude_failover_t *failover); void prelude_failover_disable_transaction(prelude_failover_t *failover); int prelude_failover_commit(prelude_failover_t *failover, prelude_msg_t *msg); int prelude_failover_rollback(prelude_failover_t *failover, prelude_msg_t *msg); #ifdef __cplusplus } #endif #endif libprelude-1.0.0/src/include/idmef-additional-data.h0000664000076400007640000001162411202225026017252 00000000000000/***** * * Copyright (C) 2004, 2005 PreludeIDS Technologies. All Rights Reserved. * Author: Yoann Vandoorselaere * * This file is part of the Prelude library. * * 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; see the file COPYING. If not, write to * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. * *****/ #ifndef _LIBPRELUDE_IDMEF_ADDITIONAL_DATA_H #define _LIBPRELUDE_IDMEF_ADDITIONAL_DATA_H #ifdef __cplusplus extern "C" { #endif /* * basic type */ int idmef_additional_data_new_real(idmef_additional_data_t **ret, float data); int idmef_additional_data_new_byte(idmef_additional_data_t **ret, uint8_t byte); int idmef_additional_data_new_integer(idmef_additional_data_t **ret, uint32_t data); int idmef_additional_data_new_boolean(idmef_additional_data_t **ret, prelude_bool_t data); int idmef_additional_data_new_character(idmef_additional_data_t **ret, char data); void idmef_additional_data_set_real(idmef_additional_data_t *ptr, float data); void idmef_additional_data_set_byte(idmef_additional_data_t *ptr, uint8_t byte); void idmef_additional_data_set_integer(idmef_additional_data_t *ptr, uint32_t data); void idmef_additional_data_set_boolean(idmef_additional_data_t *ptr, prelude_bool_t data); void idmef_additional_data_set_character(idmef_additional_data_t *ptr, char data); #define _IDMEF_ADDITIONAL_DATA_DECL(name) \ int idmef_additional_data_new_ ## name ## _ref_fast(idmef_additional_data_t **ad, const char *data, size_t len); \ int idmef_additional_data_new_ ## name ## _ref(idmef_additional_data_t **ad, const char *data); \ int idmef_additional_data_set_ ## name ## _ref_fast(idmef_additional_data_t *ad, const char *data, size_t len); \ int idmef_additional_data_set_ ## name ## _ref(idmef_additional_data_t *ad, const char *data); \ int idmef_additional_data_new_ ## name ## _dup_fast(idmef_additional_data_t **ad, const char *data, size_t len); \ int idmef_additional_data_new_ ## name ## _dup(idmef_additional_data_t **ad, const char *data); \ int idmef_additional_data_set_ ## name ## _dup_fast(idmef_additional_data_t *ad, const char *data, size_t len); \ int idmef_additional_data_set_ ## name ## _dup(idmef_additional_data_t *ad, const char *data); \ int idmef_additional_data_new_ ## name ## _nodup_fast(idmef_additional_data_t **ad, char *data, size_t len); \ int idmef_additional_data_new_ ## name ## _nodup(idmef_additional_data_t **ad, char *data); \ int idmef_additional_data_set_ ## name ## _nodup_fast(idmef_additional_data_t *ad, char *data, size_t len); \ int idmef_additional_data_set_ ## name ## _nodup(idmef_additional_data_t *ad, char *data); _IDMEF_ADDITIONAL_DATA_DECL(string) _IDMEF_ADDITIONAL_DATA_DECL(ntpstamp) _IDMEF_ADDITIONAL_DATA_DECL(date_time) _IDMEF_ADDITIONAL_DATA_DECL(portlist) _IDMEF_ADDITIONAL_DATA_DECL(xml) int idmef_additional_data_new_byte_string_ref(idmef_additional_data_t **ad, const unsigned char *data, size_t len); int idmef_additional_data_set_byte_string_ref(idmef_additional_data_t *ad, const unsigned char *data, size_t len); int idmef_additional_data_new_byte_string_dup(idmef_additional_data_t **ad, const unsigned char *data, size_t len); int idmef_additional_data_set_byte_string_dup(idmef_additional_data_t *ad, const unsigned char *data, size_t len); int idmef_additional_data_new_byte_string_nodup(idmef_additional_data_t **ad, unsigned char *data, size_t len); int idmef_additional_data_set_byte_string_nodup(idmef_additional_data_t *ad, unsigned char *data, size_t len); /* * copy / clone / destroy */ int idmef_additional_data_copy_ref(idmef_additional_data_t *src, idmef_additional_data_t *dst); int idmef_additional_data_copy_dup(idmef_additional_data_t *src, idmef_additional_data_t *dst); /* * Accessors */ float idmef_additional_data_get_real(idmef_additional_data_t *data); uint32_t idmef_additional_data_get_integer(idmef_additional_data_t *data); prelude_bool_t idmef_additional_data_get_boolean(idmef_additional_data_t *data); char idmef_additional_data_get_character(idmef_additional_data_t *data); uint8_t idmef_additional_data_get_byte(idmef_additional_data_t *data); size_t idmef_additional_data_get_len(idmef_additional_data_t *data); prelude_bool_t idmef_additional_data_is_empty(idmef_additional_data_t *data); int idmef_additional_data_data_to_string(idmef_additional_data_t *ad, prelude_string_t *out); #ifdef __cplusplus } #endif #endif /* _LIBPRELUDE_IDMEF_DATA_H */ libprelude-1.0.0/src/include/prelude.h.in0000664000076400007640000000373211202225026015217 00000000000000/***** * * Copyright (C) 2004, 2005 PreludeIDS Technologies. All Rights Reserved. * Author: Yoann Vandoorselaere * * This file is part of the Prelude library. * * 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; see the file COPYING. If not, write to * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. * *****/ #ifndef _LIBPRELUDE_PRELUDE_H #define _LIBPRELUDE_PRELUDE_H /* * LIBPRELUDE_VERSION: * Version of libprelude this header come from. * * This is mostly used by the libprelude detection routine in libprelude.m4 * to make sure that the header version is consistant with the linked library. */ #define LIBPRELUDE_VERSION "@VERSION@" #include "prelude-inttypes.h" #include "common.h" #include "prelude-client.h" #include "prelude-connection.h" #include "prelude-connection-pool.h" #include "prelude-error.h" #include "prelude-io.h" #include "prelude-option.h" #include "prelude-async.h" #include "prelude-error.h" #include "prelude-plugin.h" #include "prelude-msg.h" #include "prelude-msgbuf.h" #include "prelude-timer.h" #include "idmef.h" #ifdef __cplusplus extern "C" { #endif int prelude_init(int *argc, char **argv); void prelude_deinit(void); const char *prelude_check_version(const char *req_version); int prelude_thread_init(void *future_use); void prelude_fork_prepare(void); void prelude_fork_parent(void); void prelude_fork_child(void); #ifdef __cplusplus } #endif #endif /* _LIBPRELUDE_PRELUDE_H */ libprelude-1.0.0/src/include/config-engine.h0000664000076400007640000000310611202225026015655 00000000000000/***** * * Copyright (C) 2000-2005 PreludeIDS Technologies. All Rights Reserved. * Author: Yoann Vandoorselaere * * This file is part of the Prelude library. * * 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; see the file COPYING. If not, write to * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. * *****/ #ifndef _LIBPRELUDE_CONFIG_ENGINE_H #define _LIBPRELUDE_CONFIG_ENGINE_H typedef struct config config_t; int _config_get_next(config_t *cfg, char **section, char **entry, char **value, unsigned int *line); int _config_get_section(config_t *cfg, const char *section, unsigned int *line); char *_config_get(config_t *cfg, const char *section, const char *entry, unsigned int *line); int _config_set(config_t *cfg, const char *section, const char *entry, const char *val, unsigned int *line); int _config_open(config_t **ret, const char *filename); int _config_close(config_t *cfg); int _config_del(config_t *cfg, const char *section, const char *entry); #endif /* _LIBPRELUDE_CONFIG_ENGINE_H */ libprelude-1.0.0/src/include/idmef-criteria.h0000664000076400007640000001250111202225026016030 00000000000000/***** * * Copyright (C) 2004-2005,2006,2007 PreludeIDS Technologies. All Rights Reserved. * Author: Yoann Vandoorselaere * * This file is part of the Prelude library. * * 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; see the file COPYING. If not, write to * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. * *****/ #ifndef _LIBPRELUDE_IDMEF_CRITERIA_H #define _LIBPRELUDE_IDMEF_CRITERIA_H #ifdef __cplusplus extern "C" { #endif typedef enum { IDMEF_CRITERION_OPERATOR_NOT = 0x8000, IDMEF_CRITERION_OPERATOR_NOCASE = 0x4000, IDMEF_CRITERION_OPERATOR_EQUAL = 0x0001, IDMEF_CRITERION_OPERATOR_EQUAL_NOCASE = IDMEF_CRITERION_OPERATOR_EQUAL|IDMEF_CRITERION_OPERATOR_NOCASE, IDMEF_CRITERION_OPERATOR_NOT_EQUAL = IDMEF_CRITERION_OPERATOR_NOT|IDMEF_CRITERION_OPERATOR_EQUAL, IDMEF_CRITERION_OPERATOR_NOT_EQUAL_NOCASE = IDMEF_CRITERION_OPERATOR_NOT_EQUAL|IDMEF_CRITERION_OPERATOR_EQUAL_NOCASE, IDMEF_CRITERION_OPERATOR_LESSER = 0x0002, IDMEF_CRITERION_OPERATOR_LESSER_OR_EQUAL = IDMEF_CRITERION_OPERATOR_LESSER|IDMEF_CRITERION_OPERATOR_EQUAL, IDMEF_CRITERION_OPERATOR_GREATER = 0x0004, IDMEF_CRITERION_OPERATOR_GREATER_OR_EQUAL = IDMEF_CRITERION_OPERATOR_GREATER|IDMEF_CRITERION_OPERATOR_EQUAL, IDMEF_CRITERION_OPERATOR_SUBSTR = 0x0008, IDMEF_CRITERION_OPERATOR_SUBSTR_NOCASE = IDMEF_CRITERION_OPERATOR_SUBSTR|IDMEF_CRITERION_OPERATOR_NOCASE, IDMEF_CRITERION_OPERATOR_NOT_SUBSTR = IDMEF_CRITERION_OPERATOR_NOT|IDMEF_CRITERION_OPERATOR_SUBSTR, IDMEF_CRITERION_OPERATOR_NOT_SUBSTR_NOCASE = IDMEF_CRITERION_OPERATOR_NOT|IDMEF_CRITERION_OPERATOR_SUBSTR_NOCASE, IDMEF_CRITERION_OPERATOR_REGEX = 0x0010, IDMEF_CRITERION_OPERATOR_REGEX_NOCASE = IDMEF_CRITERION_OPERATOR_REGEX|IDMEF_CRITERION_OPERATOR_NOCASE, IDMEF_CRITERION_OPERATOR_NOT_REGEX = IDMEF_CRITERION_OPERATOR_NOT|IDMEF_CRITERION_OPERATOR_REGEX, IDMEF_CRITERION_OPERATOR_NOT_REGEX_NOCASE = IDMEF_CRITERION_OPERATOR_NOT|IDMEF_CRITERION_OPERATOR_REGEX_NOCASE, IDMEF_CRITERION_OPERATOR_NULL = 0x0020, IDMEF_CRITERION_OPERATOR_NOT_NULL = IDMEF_CRITERION_OPERATOR_NULL|IDMEF_CRITERION_OPERATOR_NOT } idmef_criterion_operator_t; typedef struct idmef_criteria idmef_criteria_t; typedef struct idmef_criterion idmef_criterion_t; #include "idmef-path.h" #include "idmef-criterion-value.h" const char *idmef_criterion_operator_to_string(idmef_criterion_operator_t op); int idmef_criterion_new(idmef_criterion_t **criterion, idmef_path_t *path, idmef_criterion_value_t *value, idmef_criterion_operator_t op); void idmef_criterion_destroy(idmef_criterion_t *criterion); idmef_criteria_t *idmef_criteria_ref(idmef_criteria_t *criteria); int idmef_criterion_clone(const idmef_criterion_t *criterion, idmef_criterion_t **dst); int idmef_criterion_print(const idmef_criterion_t *criterion, prelude_io_t *fd); int idmef_criterion_to_string(const idmef_criterion_t *criterion, prelude_string_t *out); idmef_path_t *idmef_criterion_get_path(const idmef_criterion_t *criterion); idmef_criterion_value_t *idmef_criterion_get_value(const idmef_criterion_t *criterion); idmef_criterion_operator_t idmef_criterion_get_operator(const idmef_criterion_t *criterion); int idmef_criterion_match(const idmef_criterion_t *criterion, idmef_message_t *message); int idmef_criteria_new(idmef_criteria_t **criteria); void idmef_criteria_destroy(idmef_criteria_t *criteria); int idmef_criteria_clone(idmef_criteria_t *src, idmef_criteria_t **dst); int idmef_criteria_print(const idmef_criteria_t *criteria, prelude_io_t *fd); int idmef_criteria_to_string(const idmef_criteria_t *criteria, prelude_string_t *out); prelude_bool_t idmef_criteria_is_criterion(const idmef_criteria_t *criteria); idmef_criterion_t *idmef_criteria_get_criterion(const idmef_criteria_t *criteria); void idmef_criteria_set_criterion(idmef_criteria_t *criteria, idmef_criterion_t *criterion); void idmef_criteria_or_criteria(idmef_criteria_t *criteria, idmef_criteria_t *criteria2); int idmef_criteria_and_criteria(idmef_criteria_t *criteria, idmef_criteria_t *criteria2); int idmef_criteria_match(const idmef_criteria_t *criteria, idmef_message_t *message); idmef_criteria_t *idmef_criteria_get_or(const idmef_criteria_t *criteria); idmef_criteria_t *idmef_criteria_get_and(const idmef_criteria_t *criteria); int idmef_criteria_new_from_string(idmef_criteria_t **criteria, const char *str); void idmef_criteria_set_negation(idmef_criteria_t *criteria, prelude_bool_t negate); prelude_bool_t idmef_criteria_get_negation(const idmef_criteria_t *criteria); #ifdef __cplusplus } #endif #endif /* _LIBPRELUDE_IDMEF_CRITERIA_H */ libprelude-1.0.0/src/include/prelude-async.h0000664000076400007640000000502411225122036015723 00000000000000/***** * * Copyright (C) 2001, 2002, 2003, 2004, 2005 PreludeIDS Technologies. All Rights Reserved. * Author: Yoann Vandoorselaere * * This file is part of the Prelude library. * * 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; see the file COPYING. If not, write to * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. * *****/ #ifndef _LIBPRELUDE_PRELUDE_ASYNC_H #define _LIBPRELUDE_PRELUDE_ASYNC_H #include "prelude-linked-object.h" #ifdef __cplusplus extern "C" { #endif /** * prelude_async_flags_t * @PRELUDE_ASYNC_FLAGS_TIMER: Enable asynchronous timer. * * This provides asynchronous timer. When enabled, the heartbeat * function (and user specified callback, if any) will be called * automatically, from an asynchronous thread. * * If you use this flags, you won't need to call prelude_wake_up_timer() * anymore. */ typedef enum { PRELUDE_ASYNC_FLAGS_TIMER = 0x01 } prelude_async_flags_t; typedef void (*prelude_async_callback_t)(void *object, void *data); #define PRELUDE_ASYNC_OBJECT \ PRELUDE_LINKED_OBJECT; \ void *_async_data; \ prelude_async_callback_t _async_func typedef struct { PRELUDE_ASYNC_OBJECT; } prelude_async_object_t; static inline void prelude_async_set_data(prelude_async_object_t *obj, void *data) { obj->_async_data = data; } static inline void prelude_async_set_callback(prelude_async_object_t *obj, prelude_async_callback_t func) { obj->_async_func = func; } int prelude_async_init(void); prelude_async_flags_t prelude_async_get_flags(void); void prelude_async_set_flags(prelude_async_flags_t flags); void prelude_async_add(prelude_async_object_t *obj); void prelude_async_del(prelude_async_object_t *obj); void prelude_async_exit(void); void _prelude_async_fork_prepare(void); void _prelude_async_fork_parent(void); void _prelude_async_fork_child(void); #ifdef __cplusplus } #endif #endif /* _LIBPRELUDE_PRELUDE_ASYNC_H */ libprelude-1.0.0/src/include/tls-auth.h0000664000076400007640000000251611202225026014712 00000000000000/***** * * Copyright (C) 2004,2005 PreludeIDS Technologies. All Rights Reserved. * Author: Yoann Vandoorselaere * * This file is part of the Prelude library. * * 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; see the file COPYING. If not, write to * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. * *****/ #ifndef _LIBPRELUDE_TLS_AUTH_H #define _LIBPRELUDE_TLS_AUTH_H #include "prelude-io.h" #include "prelude-connection.h" int tls_auth_connection(prelude_client_profile_t *cp, prelude_io_t *io, int crypt, uint64_t *peer_analyzerid, prelude_connection_permission_t *permission); int tls_auth_init(prelude_client_profile_t *cp, gnutls_certificate_credentials *cred); int tls_auth_init_priority(const char *tlsopts); void tls_auth_deinit(void); #endif libprelude-1.0.0/src/include/idmef-value-type.h0000664000076400007640000000674211204542224016337 00000000000000/***** * * Copyright (C) 2003, 2004, 2005 PreludeIDS Technologies. All Rights Reserved. * Author: Yoann Vandoorselaere * * This file is part of the Prelude library. * * 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; see the file COPYING. If not, write to * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. * *****/ #ifndef _IDMEF_VALUE_TYPE_H #define _IDMEF_VALUE_TYPE_H #include "idmef-time.h" #include "prelude-string.h" #ifdef __cplusplus extern "C" { #endif typedef enum { IDMEF_VALUE_TYPE_ERROR = -1, IDMEF_VALUE_TYPE_UNKNOWN = 0, IDMEF_VALUE_TYPE_INT8 = 1, IDMEF_VALUE_TYPE_UINT8 = 2, IDMEF_VALUE_TYPE_INT16 = 3, IDMEF_VALUE_TYPE_UINT16 = 4, IDMEF_VALUE_TYPE_INT32 = 5, IDMEF_VALUE_TYPE_UINT32 = 6, IDMEF_VALUE_TYPE_INT64 = 7, IDMEF_VALUE_TYPE_UINT64 = 8, IDMEF_VALUE_TYPE_FLOAT = 9, IDMEF_VALUE_TYPE_DOUBLE = 10, IDMEF_VALUE_TYPE_STRING = 11, IDMEF_VALUE_TYPE_TIME = 12, IDMEF_VALUE_TYPE_DATA = 13, IDMEF_VALUE_TYPE_ENUM = 14, IDMEF_VALUE_TYPE_LIST = 15, IDMEF_VALUE_TYPE_CLASS = 16 } idmef_value_type_id_t; typedef struct { void *object; int class_id; } idmef_value_type_class_t; typedef struct { int value; int class_id; } idmef_value_type_enum_t; typedef union { int8_t int8_val; uint8_t uint8_val; int16_t int16_val; uint16_t uint16_val; int32_t int32_val; uint32_t uint32_val; int64_t int64_val; uint64_t uint64_val; float float_val; double double_val; prelude_string_t *string_val; idmef_time_t *time_val; idmef_data_t *data_val; prelude_list_t list_val; idmef_value_type_enum_t enum_val; idmef_value_type_class_t class_val; } idmef_value_type_data_t; typedef struct { idmef_value_type_id_t id; idmef_value_type_data_t data; } idmef_value_type_t; #include "idmef-criteria.h" int idmef_value_type_ref(const idmef_value_type_t *src); int idmef_value_type_copy(const idmef_value_type_t *src, void *dst); int idmef_value_type_read(idmef_value_type_t *dst, const char *buf); int idmef_value_type_write(const idmef_value_type_t *src, prelude_string_t *out); void idmef_value_type_destroy(idmef_value_type_t *type); int idmef_value_type_clone(const idmef_value_type_t *src, idmef_value_type_t *dst); int idmef_value_type_compare(const idmef_value_type_t *type1, const idmef_value_type_t *type2, idmef_criterion_operator_t op); int idmef_value_type_check_operator(idmef_value_type_id_t type, idmef_criterion_operator_t op); int idmef_value_type_get_applicable_operators(idmef_value_type_id_t type, idmef_criterion_operator_t *result); const char *idmef_value_type_to_string(idmef_value_type_id_t type); #ifdef __cplusplus } #endif #endif libprelude-1.0.0/src/include/idmef-tree-wrap.h0000664000076400007640000024511011202225026016140 00000000000000 /***** * * Copyright (C) 2001, 2002, 2003, 2004, 2005 PreludeIDS Technologies. All Rights Reserved. * Author: Yoann Vandoorselaere * Author: Nicolas Delon * * This file is part of the Prelude library. * * 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; see the file COPYING. If not, write to * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. * *****/ /* Auto-generated by the GenerateIDMEFTreeWrapH package */ #ifndef _LIBPRELUDE_IDMEF_TREE_WRAP_H #define _LIBPRELUDE_IDMEF_TREE_WRAP_H #include #include "idmef-class.h" #include "idmef-value.h" #include "prelude-inttypes.h" #include "prelude-string.h" #include "prelude-msg.h" #ifdef __cplusplus extern "C" { #endif #ifdef WIN32 # undef interface #endif #define IDMEF_LIST_APPEND INT_MAX #define IDMEF_LIST_PREPEND (INT_MAX - 1) typedef enum { IDMEF_ADDITIONAL_DATA_TYPE_ERROR = -1, IDMEF_ADDITIONAL_DATA_TYPE_STRING = 0, IDMEF_ADDITIONAL_DATA_TYPE_BYTE = 1, IDMEF_ADDITIONAL_DATA_TYPE_CHARACTER = 2, IDMEF_ADDITIONAL_DATA_TYPE_DATE_TIME = 3, IDMEF_ADDITIONAL_DATA_TYPE_INTEGER = 4, IDMEF_ADDITIONAL_DATA_TYPE_NTPSTAMP = 5, IDMEF_ADDITIONAL_DATA_TYPE_PORTLIST = 6, IDMEF_ADDITIONAL_DATA_TYPE_REAL = 7, IDMEF_ADDITIONAL_DATA_TYPE_BOOLEAN = 8, IDMEF_ADDITIONAL_DATA_TYPE_BYTE_STRING = 9, IDMEF_ADDITIONAL_DATA_TYPE_XML = 10 } idmef_additional_data_type_t; idmef_additional_data_type_t idmef_additional_data_type_to_numeric(const char *name); const char *idmef_additional_data_type_to_string(idmef_additional_data_type_t val); /* * struct { * IS_LISTED; * REFCOUNT; * idmef_additional_data_type_t type; * prelude_string_t *meaning; * REQUIRED(idmef_data_t, *data); * } TYPE_ID(idmef_additional_data_t, 4); */ typedef struct idmef_additional_data idmef_additional_data_t; int idmef_additional_data_new(idmef_additional_data_t **ret); int idmef_additional_data_copy(const idmef_additional_data_t *src, idmef_additional_data_t *dst); int idmef_additional_data_clone(idmef_additional_data_t *src, idmef_additional_data_t **dst); int idmef_additional_data_compare(const idmef_additional_data_t *obj1, const idmef_additional_data_t *obj2); idmef_additional_data_t *idmef_additional_data_ref(idmef_additional_data_t *additional_data); #ifndef SWIG int _idmef_additional_data_get_child(void *p, idmef_class_child_id_t child, void **childptr); int _idmef_additional_data_new_child(void *p, idmef_class_child_id_t child, int n, void **ret); int _idmef_additional_data_destroy_child(void *p, idmef_class_child_id_t child, int n); #endif void idmef_additional_data_destroy(idmef_additional_data_t *ptr); idmef_additional_data_type_t idmef_additional_data_get_type(idmef_additional_data_t *ptr); void idmef_additional_data_set_type(idmef_additional_data_t *ptr, idmef_additional_data_type_t type); int idmef_additional_data_new_type(idmef_additional_data_t *ptr, idmef_additional_data_type_t **ret); prelude_string_t *idmef_additional_data_get_meaning(idmef_additional_data_t *ptr); void idmef_additional_data_set_meaning(idmef_additional_data_t *ptr, prelude_string_t *meaning); int idmef_additional_data_new_meaning(idmef_additional_data_t *ptr, prelude_string_t **ret); idmef_data_t *idmef_additional_data_get_data(idmef_additional_data_t *ptr); void idmef_additional_data_set_data(idmef_additional_data_t *ptr, idmef_data_t *data); int idmef_additional_data_new_data(idmef_additional_data_t *ptr, idmef_data_t **ret); typedef enum { IDMEF_REFERENCE_ORIGIN_ERROR = -1, IDMEF_REFERENCE_ORIGIN_UNKNOWN = 0, IDMEF_REFERENCE_ORIGIN_VENDOR_SPECIFIC = 1, IDMEF_REFERENCE_ORIGIN_USER_SPECIFIC = 2, IDMEF_REFERENCE_ORIGIN_BUGTRAQID = 3, IDMEF_REFERENCE_ORIGIN_CVE = 4, IDMEF_REFERENCE_ORIGIN_OSVDB = 5 } idmef_reference_origin_t; idmef_reference_origin_t idmef_reference_origin_to_numeric(const char *name); const char *idmef_reference_origin_to_string(idmef_reference_origin_t val); /* * struct { * IS_LISTED; * REFCOUNT; * idmef_reference_origin_t origin; * * REQUIRED(prelude_string_t, *name); * REQUIRED(prelude_string_t, *url); * prelude_string_t *meaning; * } TYPE_ID(idmef_reference_t, 50); */ typedef struct idmef_reference idmef_reference_t; int idmef_reference_new(idmef_reference_t **ret); int idmef_reference_copy(const idmef_reference_t *src, idmef_reference_t *dst); int idmef_reference_clone(idmef_reference_t *src, idmef_reference_t **dst); int idmef_reference_compare(const idmef_reference_t *obj1, const idmef_reference_t *obj2); idmef_reference_t *idmef_reference_ref(idmef_reference_t *reference); #ifndef SWIG int _idmef_reference_get_child(void *p, idmef_class_child_id_t child, void **childptr); int _idmef_reference_new_child(void *p, idmef_class_child_id_t child, int n, void **ret); int _idmef_reference_destroy_child(void *p, idmef_class_child_id_t child, int n); #endif void idmef_reference_destroy(idmef_reference_t *ptr); idmef_reference_origin_t idmef_reference_get_origin(idmef_reference_t *ptr); void idmef_reference_set_origin(idmef_reference_t *ptr, idmef_reference_origin_t origin); int idmef_reference_new_origin(idmef_reference_t *ptr, idmef_reference_origin_t **ret); prelude_string_t *idmef_reference_get_name(idmef_reference_t *ptr); void idmef_reference_set_name(idmef_reference_t *ptr, prelude_string_t *name); int idmef_reference_new_name(idmef_reference_t *ptr, prelude_string_t **ret); prelude_string_t *idmef_reference_get_url(idmef_reference_t *ptr); void idmef_reference_set_url(idmef_reference_t *ptr, prelude_string_t *url); int idmef_reference_new_url(idmef_reference_t *ptr, prelude_string_t **ret); prelude_string_t *idmef_reference_get_meaning(idmef_reference_t *ptr); void idmef_reference_set_meaning(idmef_reference_t *ptr, prelude_string_t *meaning); int idmef_reference_new_meaning(idmef_reference_t *ptr, prelude_string_t **ret); /* * struct { * REFCOUNT; * prelude_string_t *ident; * REQUIRED(prelude_string_t, *text); * LISTED_OBJECT(reference_list, idmef_reference_t); * * } TYPE_ID(idmef_classification_t, 6); */ typedef struct idmef_classification idmef_classification_t; int idmef_classification_new(idmef_classification_t **ret); int idmef_classification_copy(const idmef_classification_t *src, idmef_classification_t *dst); int idmef_classification_clone(idmef_classification_t *src, idmef_classification_t **dst); int idmef_classification_compare(const idmef_classification_t *obj1, const idmef_classification_t *obj2); idmef_classification_t *idmef_classification_ref(idmef_classification_t *classification); #ifndef SWIG int _idmef_classification_get_child(void *p, idmef_class_child_id_t child, void **childptr); int _idmef_classification_new_child(void *p, idmef_class_child_id_t child, int n, void **ret); int _idmef_classification_destroy_child(void *p, idmef_class_child_id_t child, int n); #endif void idmef_classification_destroy(idmef_classification_t *ptr); prelude_string_t *idmef_classification_get_ident(idmef_classification_t *ptr); void idmef_classification_set_ident(idmef_classification_t *ptr, prelude_string_t *ident); int idmef_classification_new_ident(idmef_classification_t *ptr, prelude_string_t **ret); prelude_string_t *idmef_classification_get_text(idmef_classification_t *ptr); void idmef_classification_set_text(idmef_classification_t *ptr, prelude_string_t *text); int idmef_classification_new_text(idmef_classification_t *ptr, prelude_string_t **ret); idmef_reference_t *idmef_classification_get_next_reference(idmef_classification_t *classification, idmef_reference_t *reference_cur); void idmef_classification_set_reference(idmef_classification_t *ptr, idmef_reference_t *object, int pos); int idmef_classification_new_reference(idmef_classification_t *ptr, idmef_reference_t **ret, int pos); typedef enum { IDMEF_USER_ID_TYPE_ORIGINAL_ERROR = -1, IDMEF_USER_ID_TYPE_ORIGINAL_USER = 0, IDMEF_USER_ID_TYPE_CURRENT_USER = 1, IDMEF_USER_ID_TYPE_TARGET_USER = 2, IDMEF_USER_ID_TYPE_USER_PRIVS = 3, IDMEF_USER_ID_TYPE_CURRENT_GROUP = 4, IDMEF_USER_ID_TYPE_GROUP_PRIVS = 5, IDMEF_USER_ID_TYPE_OTHER_PRIVS = 6 } idmef_user_id_type_t; idmef_user_id_type_t idmef_user_id_type_to_numeric(const char *name); const char *idmef_user_id_type_to_string(idmef_user_id_type_t val); /* * struct { * IS_LISTED; * REFCOUNT; * prelude_string_t *ident; * idmef_user_id_type_t type; * prelude_string_t *tty; * prelude_string_t *name; * OPTIONAL_INT(uint32_t, number); * } TYPE_ID(idmef_user_id_t, 8); */ typedef struct idmef_user_id idmef_user_id_t; int idmef_user_id_new(idmef_user_id_t **ret); int idmef_user_id_copy(const idmef_user_id_t *src, idmef_user_id_t *dst); int idmef_user_id_clone(idmef_user_id_t *src, idmef_user_id_t **dst); int idmef_user_id_compare(const idmef_user_id_t *obj1, const idmef_user_id_t *obj2); idmef_user_id_t *idmef_user_id_ref(idmef_user_id_t *user_id); #ifndef SWIG int _idmef_user_id_get_child(void *p, idmef_class_child_id_t child, void **childptr); int _idmef_user_id_new_child(void *p, idmef_class_child_id_t child, int n, void **ret); int _idmef_user_id_destroy_child(void *p, idmef_class_child_id_t child, int n); #endif void idmef_user_id_destroy(idmef_user_id_t *ptr); prelude_string_t *idmef_user_id_get_ident(idmef_user_id_t *ptr); void idmef_user_id_set_ident(idmef_user_id_t *ptr, prelude_string_t *ident); int idmef_user_id_new_ident(idmef_user_id_t *ptr, prelude_string_t **ret); idmef_user_id_type_t idmef_user_id_get_type(idmef_user_id_t *ptr); void idmef_user_id_set_type(idmef_user_id_t *ptr, idmef_user_id_type_t type); int idmef_user_id_new_type(idmef_user_id_t *ptr, idmef_user_id_type_t **ret); prelude_string_t *idmef_user_id_get_tty(idmef_user_id_t *ptr); void idmef_user_id_set_tty(idmef_user_id_t *ptr, prelude_string_t *tty); int idmef_user_id_new_tty(idmef_user_id_t *ptr, prelude_string_t **ret); prelude_string_t *idmef_user_id_get_name(idmef_user_id_t *ptr); void idmef_user_id_set_name(idmef_user_id_t *ptr, prelude_string_t *name); int idmef_user_id_new_name(idmef_user_id_t *ptr, prelude_string_t **ret); void idmef_user_id_unset_number(idmef_user_id_t *ptr); uint32_t *idmef_user_id_get_number(idmef_user_id_t *ptr); void idmef_user_id_set_number(idmef_user_id_t *ptr, uint32_t number); int idmef_user_id_new_number(idmef_user_id_t *ptr, uint32_t **ret); typedef enum { IDMEF_USER_CATEGORY_ERROR = -1, IDMEF_USER_CATEGORY_UNKNOWN = 0, IDMEF_USER_CATEGORY_APPLICATION = 1, IDMEF_USER_CATEGORY_OS_DEVICE = 2 } idmef_user_category_t; idmef_user_category_t idmef_user_category_to_numeric(const char *name); const char *idmef_user_category_to_string(idmef_user_category_t val); /* * struct { * REFCOUNT; * prelude_string_t *ident; * idmef_user_category_t category; * LISTED_OBJECT(user_id_list, idmef_user_id_t); * } TYPE_ID(idmef_user_t, 10); */ typedef struct idmef_user idmef_user_t; int idmef_user_new(idmef_user_t **ret); int idmef_user_copy(const idmef_user_t *src, idmef_user_t *dst); int idmef_user_clone(idmef_user_t *src, idmef_user_t **dst); int idmef_user_compare(const idmef_user_t *obj1, const idmef_user_t *obj2); idmef_user_t *idmef_user_ref(idmef_user_t *user); #ifndef SWIG int _idmef_user_get_child(void *p, idmef_class_child_id_t child, void **childptr); int _idmef_user_new_child(void *p, idmef_class_child_id_t child, int n, void **ret); int _idmef_user_destroy_child(void *p, idmef_class_child_id_t child, int n); #endif void idmef_user_destroy(idmef_user_t *ptr); prelude_string_t *idmef_user_get_ident(idmef_user_t *ptr); void idmef_user_set_ident(idmef_user_t *ptr, prelude_string_t *ident); int idmef_user_new_ident(idmef_user_t *ptr, prelude_string_t **ret); idmef_user_category_t idmef_user_get_category(idmef_user_t *ptr); void idmef_user_set_category(idmef_user_t *ptr, idmef_user_category_t category); int idmef_user_new_category(idmef_user_t *ptr, idmef_user_category_t **ret); idmef_user_id_t *idmef_user_get_next_user_id(idmef_user_t *user, idmef_user_id_t *user_id_cur); void idmef_user_set_user_id(idmef_user_t *ptr, idmef_user_id_t *object, int pos); int idmef_user_new_user_id(idmef_user_t *ptr, idmef_user_id_t **ret, int pos); typedef enum { IDMEF_ADDRESS_CATEGORY_ERROR = -1, IDMEF_ADDRESS_CATEGORY_UNKNOWN = 0, IDMEF_ADDRESS_CATEGORY_ATM = 1, IDMEF_ADDRESS_CATEGORY_E_MAIL = 2, IDMEF_ADDRESS_CATEGORY_LOTUS_NOTES = 3, IDMEF_ADDRESS_CATEGORY_MAC = 4, IDMEF_ADDRESS_CATEGORY_SNA = 5, IDMEF_ADDRESS_CATEGORY_VM = 6, IDMEF_ADDRESS_CATEGORY_IPV4_ADDR = 7, IDMEF_ADDRESS_CATEGORY_IPV4_ADDR_HEX = 8, IDMEF_ADDRESS_CATEGORY_IPV4_NET = 9, IDMEF_ADDRESS_CATEGORY_IPV4_NET_MASK = 10, IDMEF_ADDRESS_CATEGORY_IPV6_ADDR = 11, IDMEF_ADDRESS_CATEGORY_IPV6_ADDR_HEX = 12, IDMEF_ADDRESS_CATEGORY_IPV6_NET = 13, IDMEF_ADDRESS_CATEGORY_IPV6_NET_MASK = 14 } idmef_address_category_t; idmef_address_category_t idmef_address_category_to_numeric(const char *name); const char *idmef_address_category_to_string(idmef_address_category_t val); /* * struct { * IS_LISTED; * REFCOUNT; * prelude_string_t *ident; * idmef_address_category_t category; * prelude_string_t *vlan_name; * OPTIONAL_INT(int32_t, vlan_num); * REQUIRED(prelude_string_t, *address); * prelude_string_t *netmask; * } TYPE_ID(idmef_address_t, 12); */ typedef struct idmef_address idmef_address_t; int idmef_address_new(idmef_address_t **ret); int idmef_address_copy(const idmef_address_t *src, idmef_address_t *dst); int idmef_address_clone(idmef_address_t *src, idmef_address_t **dst); int idmef_address_compare(const idmef_address_t *obj1, const idmef_address_t *obj2); idmef_address_t *idmef_address_ref(idmef_address_t *address); #ifndef SWIG int _idmef_address_get_child(void *p, idmef_class_child_id_t child, void **childptr); int _idmef_address_new_child(void *p, idmef_class_child_id_t child, int n, void **ret); int _idmef_address_destroy_child(void *p, idmef_class_child_id_t child, int n); #endif void idmef_address_destroy(idmef_address_t *ptr); prelude_string_t *idmef_address_get_ident(idmef_address_t *ptr); void idmef_address_set_ident(idmef_address_t *ptr, prelude_string_t *ident); int idmef_address_new_ident(idmef_address_t *ptr, prelude_string_t **ret); idmef_address_category_t idmef_address_get_category(idmef_address_t *ptr); void idmef_address_set_category(idmef_address_t *ptr, idmef_address_category_t category); int idmef_address_new_category(idmef_address_t *ptr, idmef_address_category_t **ret); prelude_string_t *idmef_address_get_vlan_name(idmef_address_t *ptr); void idmef_address_set_vlan_name(idmef_address_t *ptr, prelude_string_t *vlan_name); int idmef_address_new_vlan_name(idmef_address_t *ptr, prelude_string_t **ret); void idmef_address_unset_vlan_num(idmef_address_t *ptr); int32_t *idmef_address_get_vlan_num(idmef_address_t *ptr); void idmef_address_set_vlan_num(idmef_address_t *ptr, int32_t vlan_num); int idmef_address_new_vlan_num(idmef_address_t *ptr, int32_t **ret); prelude_string_t *idmef_address_get_address(idmef_address_t *ptr); void idmef_address_set_address(idmef_address_t *ptr, prelude_string_t *address); int idmef_address_new_address(idmef_address_t *ptr, prelude_string_t **ret); prelude_string_t *idmef_address_get_netmask(idmef_address_t *ptr); void idmef_address_set_netmask(idmef_address_t *ptr, prelude_string_t *netmask); int idmef_address_new_netmask(idmef_address_t *ptr, prelude_string_t **ret); /* * struct { * REFCOUNT; * prelude_string_t *ident; * REQUIRED(prelude_string_t, *name); * OPTIONAL_INT(uint32_t, pid); * prelude_string_t *path; * * LISTED_OBJECT(arg_list, prelude_string_t); * LISTED_OBJECT(env_list, prelude_string_t); * } TYPE_ID(idmef_process_t, 13); */ typedef struct idmef_process idmef_process_t; int idmef_process_new(idmef_process_t **ret); int idmef_process_copy(const idmef_process_t *src, idmef_process_t *dst); int idmef_process_clone(idmef_process_t *src, idmef_process_t **dst); int idmef_process_compare(const idmef_process_t *obj1, const idmef_process_t *obj2); idmef_process_t *idmef_process_ref(idmef_process_t *process); #ifndef SWIG int _idmef_process_get_child(void *p, idmef_class_child_id_t child, void **childptr); int _idmef_process_new_child(void *p, idmef_class_child_id_t child, int n, void **ret); int _idmef_process_destroy_child(void *p, idmef_class_child_id_t child, int n); #endif void idmef_process_destroy(idmef_process_t *ptr); prelude_string_t *idmef_process_get_ident(idmef_process_t *ptr); void idmef_process_set_ident(idmef_process_t *ptr, prelude_string_t *ident); int idmef_process_new_ident(idmef_process_t *ptr, prelude_string_t **ret); prelude_string_t *idmef_process_get_name(idmef_process_t *ptr); void idmef_process_set_name(idmef_process_t *ptr, prelude_string_t *name); int idmef_process_new_name(idmef_process_t *ptr, prelude_string_t **ret); void idmef_process_unset_pid(idmef_process_t *ptr); uint32_t *idmef_process_get_pid(idmef_process_t *ptr); void idmef_process_set_pid(idmef_process_t *ptr, uint32_t pid); int idmef_process_new_pid(idmef_process_t *ptr, uint32_t **ret); prelude_string_t *idmef_process_get_path(idmef_process_t *ptr); void idmef_process_set_path(idmef_process_t *ptr, prelude_string_t *path); int idmef_process_new_path(idmef_process_t *ptr, prelude_string_t **ret); prelude_string_t *idmef_process_get_next_arg(idmef_process_t *process, prelude_string_t *prelude_string_cur); void idmef_process_set_arg(idmef_process_t *ptr, prelude_string_t *object, int pos); int idmef_process_new_arg(idmef_process_t *ptr, prelude_string_t **ret, int pos); prelude_string_t *idmef_process_get_next_env(idmef_process_t *process, prelude_string_t *prelude_string_cur); void idmef_process_set_env(idmef_process_t *ptr, prelude_string_t *object, int pos); int idmef_process_new_env(idmef_process_t *ptr, prelude_string_t **ret, int pos); /* * struct { * REFCOUNT; * REQUIRED(prelude_string_t, *url); * prelude_string_t *cgi; * prelude_string_t *http_method; * LISTED_OBJECT(arg_list, prelude_string_t); * } TYPE_ID(idmef_web_service_t, 14); */ typedef struct idmef_web_service idmef_web_service_t; int idmef_web_service_new(idmef_web_service_t **ret); int idmef_web_service_copy(const idmef_web_service_t *src, idmef_web_service_t *dst); int idmef_web_service_clone(idmef_web_service_t *src, idmef_web_service_t **dst); int idmef_web_service_compare(const idmef_web_service_t *obj1, const idmef_web_service_t *obj2); idmef_web_service_t *idmef_web_service_ref(idmef_web_service_t *web_service); #ifndef SWIG int _idmef_web_service_get_child(void *p, idmef_class_child_id_t child, void **childptr); int _idmef_web_service_new_child(void *p, idmef_class_child_id_t child, int n, void **ret); int _idmef_web_service_destroy_child(void *p, idmef_class_child_id_t child, int n); #endif void idmef_web_service_destroy(idmef_web_service_t *ptr); prelude_string_t *idmef_web_service_get_url(idmef_web_service_t *ptr); void idmef_web_service_set_url(idmef_web_service_t *ptr, prelude_string_t *url); int idmef_web_service_new_url(idmef_web_service_t *ptr, prelude_string_t **ret); prelude_string_t *idmef_web_service_get_cgi(idmef_web_service_t *ptr); void idmef_web_service_set_cgi(idmef_web_service_t *ptr, prelude_string_t *cgi); int idmef_web_service_new_cgi(idmef_web_service_t *ptr, prelude_string_t **ret); prelude_string_t *idmef_web_service_get_http_method(idmef_web_service_t *ptr); void idmef_web_service_set_http_method(idmef_web_service_t *ptr, prelude_string_t *http_method); int idmef_web_service_new_http_method(idmef_web_service_t *ptr, prelude_string_t **ret); prelude_string_t *idmef_web_service_get_next_arg(idmef_web_service_t *web_service, prelude_string_t *prelude_string_cur); void idmef_web_service_set_arg(idmef_web_service_t *ptr, prelude_string_t *object, int pos); int idmef_web_service_new_arg(idmef_web_service_t *ptr, prelude_string_t **ret, int pos); /* * struct { * REFCOUNT; * prelude_string_t *oid; * OPTIONAL_INT(uint32_t, message_processing_model); * OPTIONAL_INT(uint32_t, security_model); * prelude_string_t *security_name; * OPTIONAL_INT(uint32_t, security_level); * prelude_string_t *context_name; * prelude_string_t *context_engine_id; * prelude_string_t *command; * * * * * prelude_string_t *community; * } TYPE_ID(idmef_snmp_service_t, 15); */ typedef struct idmef_snmp_service idmef_snmp_service_t; int idmef_snmp_service_new(idmef_snmp_service_t **ret); int idmef_snmp_service_copy(const idmef_snmp_service_t *src, idmef_snmp_service_t *dst); int idmef_snmp_service_clone(idmef_snmp_service_t *src, idmef_snmp_service_t **dst); int idmef_snmp_service_compare(const idmef_snmp_service_t *obj1, const idmef_snmp_service_t *obj2); idmef_snmp_service_t *idmef_snmp_service_ref(idmef_snmp_service_t *snmp_service); #ifndef SWIG int _idmef_snmp_service_get_child(void *p, idmef_class_child_id_t child, void **childptr); int _idmef_snmp_service_new_child(void *p, idmef_class_child_id_t child, int n, void **ret); int _idmef_snmp_service_destroy_child(void *p, idmef_class_child_id_t child, int n); #endif void idmef_snmp_service_destroy(idmef_snmp_service_t *ptr); prelude_string_t *idmef_snmp_service_get_oid(idmef_snmp_service_t *ptr); void idmef_snmp_service_set_oid(idmef_snmp_service_t *ptr, prelude_string_t *oid); int idmef_snmp_service_new_oid(idmef_snmp_service_t *ptr, prelude_string_t **ret); void idmef_snmp_service_unset_message_processing_model(idmef_snmp_service_t *ptr); uint32_t *idmef_snmp_service_get_message_processing_model(idmef_snmp_service_t *ptr); void idmef_snmp_service_set_message_processing_model(idmef_snmp_service_t *ptr, uint32_t message_processing_model); int idmef_snmp_service_new_message_processing_model(idmef_snmp_service_t *ptr, uint32_t **ret); void idmef_snmp_service_unset_security_model(idmef_snmp_service_t *ptr); uint32_t *idmef_snmp_service_get_security_model(idmef_snmp_service_t *ptr); void idmef_snmp_service_set_security_model(idmef_snmp_service_t *ptr, uint32_t security_model); int idmef_snmp_service_new_security_model(idmef_snmp_service_t *ptr, uint32_t **ret); prelude_string_t *idmef_snmp_service_get_security_name(idmef_snmp_service_t *ptr); void idmef_snmp_service_set_security_name(idmef_snmp_service_t *ptr, prelude_string_t *security_name); int idmef_snmp_service_new_security_name(idmef_snmp_service_t *ptr, prelude_string_t **ret); void idmef_snmp_service_unset_security_level(idmef_snmp_service_t *ptr); uint32_t *idmef_snmp_service_get_security_level(idmef_snmp_service_t *ptr); void idmef_snmp_service_set_security_level(idmef_snmp_service_t *ptr, uint32_t security_level); int idmef_snmp_service_new_security_level(idmef_snmp_service_t *ptr, uint32_t **ret); prelude_string_t *idmef_snmp_service_get_context_name(idmef_snmp_service_t *ptr); void idmef_snmp_service_set_context_name(idmef_snmp_service_t *ptr, prelude_string_t *context_name); int idmef_snmp_service_new_context_name(idmef_snmp_service_t *ptr, prelude_string_t **ret); prelude_string_t *idmef_snmp_service_get_context_engine_id(idmef_snmp_service_t *ptr); void idmef_snmp_service_set_context_engine_id(idmef_snmp_service_t *ptr, prelude_string_t *context_engine_id); int idmef_snmp_service_new_context_engine_id(idmef_snmp_service_t *ptr, prelude_string_t **ret); prelude_string_t *idmef_snmp_service_get_command(idmef_snmp_service_t *ptr); void idmef_snmp_service_set_command(idmef_snmp_service_t *ptr, prelude_string_t *command); int idmef_snmp_service_new_command(idmef_snmp_service_t *ptr, prelude_string_t **ret); prelude_string_t *idmef_snmp_service_get_community(idmef_snmp_service_t *ptr); void idmef_snmp_service_set_community(idmef_snmp_service_t *ptr, prelude_string_t *community); int idmef_snmp_service_new_community(idmef_snmp_service_t *ptr, prelude_string_t **ret); typedef enum { IDMEF_SERVICE_TYPE_ERROR = -1, IDMEF_SERVICE_TYPE_DEFAULT = 0, IDMEF_SERVICE_TYPE_WEB = 1, IDMEF_SERVICE_TYPE_SNMP = 2 } idmef_service_type_t; idmef_service_type_t idmef_service_type_to_numeric(const char *name); const char *idmef_service_type_to_string(idmef_service_type_t val); /* * struct { * REFCOUNT; * prelude_string_t *ident; * * OPTIONAL_INT(uint8_t, ip_version); * OPTIONAL_INT(uint8_t, iana_protocol_number); * prelude_string_t *iana_protocol_name; * * prelude_string_t *name; * OPTIONAL_INT(uint16_t, port); * prelude_string_t *portlist; * prelude_string_t *protocol; * * UNION(idmef_service_type_t, type) { * UNION_MEMBER(IDMEF_SERVICE_TYPE_WEB, idmef_web_service_t, *web_service); * UNION_MEMBER(IDMEF_SERVICE_TYPE_SNMP, idmef_snmp_service_t, *snmp_service); * } specific; * * } TYPE_ID(idmef_service_t, 17); */ typedef struct idmef_service idmef_service_t; int idmef_service_new(idmef_service_t **ret); int idmef_service_copy(const idmef_service_t *src, idmef_service_t *dst); int idmef_service_clone(idmef_service_t *src, idmef_service_t **dst); int idmef_service_compare(const idmef_service_t *obj1, const idmef_service_t *obj2); idmef_service_t *idmef_service_ref(idmef_service_t *service); #ifndef SWIG int _idmef_service_get_child(void *p, idmef_class_child_id_t child, void **childptr); int _idmef_service_new_child(void *p, idmef_class_child_id_t child, int n, void **ret); int _idmef_service_destroy_child(void *p, idmef_class_child_id_t child, int n); #endif void idmef_service_destroy(idmef_service_t *ptr); prelude_string_t *idmef_service_get_ident(idmef_service_t *ptr); void idmef_service_set_ident(idmef_service_t *ptr, prelude_string_t *ident); int idmef_service_new_ident(idmef_service_t *ptr, prelude_string_t **ret); void idmef_service_unset_ip_version(idmef_service_t *ptr); uint8_t *idmef_service_get_ip_version(idmef_service_t *ptr); void idmef_service_set_ip_version(idmef_service_t *ptr, uint8_t ip_version); int idmef_service_new_ip_version(idmef_service_t *ptr, uint8_t **ret); void idmef_service_unset_iana_protocol_number(idmef_service_t *ptr); uint8_t *idmef_service_get_iana_protocol_number(idmef_service_t *ptr); void idmef_service_set_iana_protocol_number(idmef_service_t *ptr, uint8_t iana_protocol_number); int idmef_service_new_iana_protocol_number(idmef_service_t *ptr, uint8_t **ret); prelude_string_t *idmef_service_get_iana_protocol_name(idmef_service_t *ptr); void idmef_service_set_iana_protocol_name(idmef_service_t *ptr, prelude_string_t *iana_protocol_name); int idmef_service_new_iana_protocol_name(idmef_service_t *ptr, prelude_string_t **ret); prelude_string_t *idmef_service_get_name(idmef_service_t *ptr); void idmef_service_set_name(idmef_service_t *ptr, prelude_string_t *name); int idmef_service_new_name(idmef_service_t *ptr, prelude_string_t **ret); void idmef_service_unset_port(idmef_service_t *ptr); uint16_t *idmef_service_get_port(idmef_service_t *ptr); void idmef_service_set_port(idmef_service_t *ptr, uint16_t port); int idmef_service_new_port(idmef_service_t *ptr, uint16_t **ret); prelude_string_t *idmef_service_get_portlist(idmef_service_t *ptr); void idmef_service_set_portlist(idmef_service_t *ptr, prelude_string_t *portlist); int idmef_service_new_portlist(idmef_service_t *ptr, prelude_string_t **ret); prelude_string_t *idmef_service_get_protocol(idmef_service_t *ptr); void idmef_service_set_protocol(idmef_service_t *ptr, prelude_string_t *protocol); int idmef_service_new_protocol(idmef_service_t *ptr, prelude_string_t **ret); idmef_service_type_t idmef_service_get_type(idmef_service_t *ptr); idmef_web_service_t *idmef_service_get_web_service(idmef_service_t *ptr); void idmef_service_set_web_service(idmef_service_t *ptr, idmef_web_service_t *web_service); int idmef_service_new_web_service(idmef_service_t *ptr, idmef_web_service_t **ret); idmef_snmp_service_t *idmef_service_get_snmp_service(idmef_service_t *ptr); void idmef_service_set_snmp_service(idmef_service_t *ptr, idmef_snmp_service_t *snmp_service); int idmef_service_new_snmp_service(idmef_service_t *ptr, idmef_snmp_service_t **ret); typedef enum { IDMEF_NODE_CATEGORY_ERROR = -1, IDMEF_NODE_CATEGORY_UNKNOWN = 0, IDMEF_NODE_CATEGORY_ADS = 1, IDMEF_NODE_CATEGORY_AFS = 2, IDMEF_NODE_CATEGORY_CODA = 3, IDMEF_NODE_CATEGORY_DFS = 4, IDMEF_NODE_CATEGORY_DNS = 5, IDMEF_NODE_CATEGORY_HOSTS = 6, IDMEF_NODE_CATEGORY_KERBEROS = 7, IDMEF_NODE_CATEGORY_NDS = 8, IDMEF_NODE_CATEGORY_NIS = 9, IDMEF_NODE_CATEGORY_NISPLUS = 10, IDMEF_NODE_CATEGORY_NT = 11, IDMEF_NODE_CATEGORY_WFW = 12 } idmef_node_category_t; idmef_node_category_t idmef_node_category_to_numeric(const char *name); const char *idmef_node_category_to_string(idmef_node_category_t val); /* * struct { * REFCOUNT; * prelude_string_t *ident; * idmef_node_category_t category; * prelude_string_t *location; * prelude_string_t *name; * LISTED_OBJECT(address_list, idmef_address_t); * } TYPE_ID(idmef_node_t, 19); */ typedef struct idmef_node idmef_node_t; int idmef_node_new(idmef_node_t **ret); int idmef_node_copy(const idmef_node_t *src, idmef_node_t *dst); int idmef_node_clone(idmef_node_t *src, idmef_node_t **dst); int idmef_node_compare(const idmef_node_t *obj1, const idmef_node_t *obj2); idmef_node_t *idmef_node_ref(idmef_node_t *node); #ifndef SWIG int _idmef_node_get_child(void *p, idmef_class_child_id_t child, void **childptr); int _idmef_node_new_child(void *p, idmef_class_child_id_t child, int n, void **ret); int _idmef_node_destroy_child(void *p, idmef_class_child_id_t child, int n); #endif void idmef_node_destroy(idmef_node_t *ptr); prelude_string_t *idmef_node_get_ident(idmef_node_t *ptr); void idmef_node_set_ident(idmef_node_t *ptr, prelude_string_t *ident); int idmef_node_new_ident(idmef_node_t *ptr, prelude_string_t **ret); idmef_node_category_t idmef_node_get_category(idmef_node_t *ptr); void idmef_node_set_category(idmef_node_t *ptr, idmef_node_category_t category); int idmef_node_new_category(idmef_node_t *ptr, idmef_node_category_t **ret); prelude_string_t *idmef_node_get_location(idmef_node_t *ptr); void idmef_node_set_location(idmef_node_t *ptr, prelude_string_t *location); int idmef_node_new_location(idmef_node_t *ptr, prelude_string_t **ret); prelude_string_t *idmef_node_get_name(idmef_node_t *ptr); void idmef_node_set_name(idmef_node_t *ptr, prelude_string_t *name); int idmef_node_new_name(idmef_node_t *ptr, prelude_string_t **ret); idmef_address_t *idmef_node_get_next_address(idmef_node_t *node, idmef_address_t *address_cur); void idmef_node_set_address(idmef_node_t *ptr, idmef_address_t *object, int pos); int idmef_node_new_address(idmef_node_t *ptr, idmef_address_t **ret, int pos); typedef enum { IDMEF_SOURCE_SPOOFED_ERROR = -1, IDMEF_SOURCE_SPOOFED_UNKNOWN = 0, IDMEF_SOURCE_SPOOFED_YES = 1, IDMEF_SOURCE_SPOOFED_NO = 2 } idmef_source_spoofed_t; idmef_source_spoofed_t idmef_source_spoofed_to_numeric(const char *name); const char *idmef_source_spoofed_to_string(idmef_source_spoofed_t val); /* * struct { * IS_LISTED; * REFCOUNT; * prelude_string_t *ident; * * idmef_source_spoofed_t spoofed; * prelude_string_t *interface; * * idmef_node_t *node; * idmef_user_t *user; * idmef_process_t *process; * idmef_service_t *service; * * } TYPE_ID(idmef_source_t, 21); */ typedef struct idmef_source idmef_source_t; int idmef_source_new(idmef_source_t **ret); int idmef_source_copy(const idmef_source_t *src, idmef_source_t *dst); int idmef_source_clone(idmef_source_t *src, idmef_source_t **dst); int idmef_source_compare(const idmef_source_t *obj1, const idmef_source_t *obj2); idmef_source_t *idmef_source_ref(idmef_source_t *source); #ifndef SWIG int _idmef_source_get_child(void *p, idmef_class_child_id_t child, void **childptr); int _idmef_source_new_child(void *p, idmef_class_child_id_t child, int n, void **ret); int _idmef_source_destroy_child(void *p, idmef_class_child_id_t child, int n); #endif void idmef_source_destroy(idmef_source_t *ptr); prelude_string_t *idmef_source_get_ident(idmef_source_t *ptr); void idmef_source_set_ident(idmef_source_t *ptr, prelude_string_t *ident); int idmef_source_new_ident(idmef_source_t *ptr, prelude_string_t **ret); idmef_source_spoofed_t idmef_source_get_spoofed(idmef_source_t *ptr); void idmef_source_set_spoofed(idmef_source_t *ptr, idmef_source_spoofed_t spoofed); int idmef_source_new_spoofed(idmef_source_t *ptr, idmef_source_spoofed_t **ret); prelude_string_t *idmef_source_get_interface(idmef_source_t *ptr); void idmef_source_set_interface(idmef_source_t *ptr, prelude_string_t *interface); int idmef_source_new_interface(idmef_source_t *ptr, prelude_string_t **ret); idmef_node_t *idmef_source_get_node(idmef_source_t *ptr); void idmef_source_set_node(idmef_source_t *ptr, idmef_node_t *node); int idmef_source_new_node(idmef_source_t *ptr, idmef_node_t **ret); idmef_user_t *idmef_source_get_user(idmef_source_t *ptr); void idmef_source_set_user(idmef_source_t *ptr, idmef_user_t *user); int idmef_source_new_user(idmef_source_t *ptr, idmef_user_t **ret); idmef_process_t *idmef_source_get_process(idmef_source_t *ptr); void idmef_source_set_process(idmef_source_t *ptr, idmef_process_t *process); int idmef_source_new_process(idmef_source_t *ptr, idmef_process_t **ret); idmef_service_t *idmef_source_get_service(idmef_source_t *ptr); void idmef_source_set_service(idmef_source_t *ptr, idmef_service_t *service); int idmef_source_new_service(idmef_source_t *ptr, idmef_service_t **ret); /* * struct { * IS_LISTED; * REFCOUNT; * * REQUIRED(idmef_user_id_t, *user_id); * LISTED_OBJECT(permission_list, prelude_string_t); * } TYPE_ID(idmef_file_access_t, 22); */ typedef struct idmef_file_access idmef_file_access_t; int idmef_file_access_new(idmef_file_access_t **ret); int idmef_file_access_copy(const idmef_file_access_t *src, idmef_file_access_t *dst); int idmef_file_access_clone(idmef_file_access_t *src, idmef_file_access_t **dst); int idmef_file_access_compare(const idmef_file_access_t *obj1, const idmef_file_access_t *obj2); idmef_file_access_t *idmef_file_access_ref(idmef_file_access_t *file_access); #ifndef SWIG int _idmef_file_access_get_child(void *p, idmef_class_child_id_t child, void **childptr); int _idmef_file_access_new_child(void *p, idmef_class_child_id_t child, int n, void **ret); int _idmef_file_access_destroy_child(void *p, idmef_class_child_id_t child, int n); #endif void idmef_file_access_destroy(idmef_file_access_t *ptr); idmef_user_id_t *idmef_file_access_get_user_id(idmef_file_access_t *ptr); void idmef_file_access_set_user_id(idmef_file_access_t *ptr, idmef_user_id_t *user_id); int idmef_file_access_new_user_id(idmef_file_access_t *ptr, idmef_user_id_t **ret); prelude_string_t *idmef_file_access_get_next_permission(idmef_file_access_t *file_access, prelude_string_t *prelude_string_cur); void idmef_file_access_set_permission(idmef_file_access_t *ptr, prelude_string_t *object, int pos); int idmef_file_access_new_permission(idmef_file_access_t *ptr, prelude_string_t **ret, int pos); /* * struct { * REFCOUNT; * idmef_time_t *change_time; * OPTIONAL_INT(uint32_t, number); * OPTIONAL_INT(uint32_t, major_device); * OPTIONAL_INT(uint32_t, minor_device); * OPTIONAL_INT(uint32_t, c_major_device); * OPTIONAL_INT(uint32_t, c_minor_device); * } TYPE_ID(idmef_inode_t, 23); */ typedef struct idmef_inode idmef_inode_t; int idmef_inode_new(idmef_inode_t **ret); int idmef_inode_copy(const idmef_inode_t *src, idmef_inode_t *dst); int idmef_inode_clone(idmef_inode_t *src, idmef_inode_t **dst); int idmef_inode_compare(const idmef_inode_t *obj1, const idmef_inode_t *obj2); idmef_inode_t *idmef_inode_ref(idmef_inode_t *inode); #ifndef SWIG int _idmef_inode_get_child(void *p, idmef_class_child_id_t child, void **childptr); int _idmef_inode_new_child(void *p, idmef_class_child_id_t child, int n, void **ret); int _idmef_inode_destroy_child(void *p, idmef_class_child_id_t child, int n); #endif void idmef_inode_destroy(idmef_inode_t *ptr); idmef_time_t *idmef_inode_get_change_time(idmef_inode_t *ptr); void idmef_inode_set_change_time(idmef_inode_t *ptr, idmef_time_t *change_time); int idmef_inode_new_change_time(idmef_inode_t *ptr, idmef_time_t **ret); void idmef_inode_unset_number(idmef_inode_t *ptr); uint32_t *idmef_inode_get_number(idmef_inode_t *ptr); void idmef_inode_set_number(idmef_inode_t *ptr, uint32_t number); int idmef_inode_new_number(idmef_inode_t *ptr, uint32_t **ret); void idmef_inode_unset_major_device(idmef_inode_t *ptr); uint32_t *idmef_inode_get_major_device(idmef_inode_t *ptr); void idmef_inode_set_major_device(idmef_inode_t *ptr, uint32_t major_device); int idmef_inode_new_major_device(idmef_inode_t *ptr, uint32_t **ret); void idmef_inode_unset_minor_device(idmef_inode_t *ptr); uint32_t *idmef_inode_get_minor_device(idmef_inode_t *ptr); void idmef_inode_set_minor_device(idmef_inode_t *ptr, uint32_t minor_device); int idmef_inode_new_minor_device(idmef_inode_t *ptr, uint32_t **ret); void idmef_inode_unset_c_major_device(idmef_inode_t *ptr); uint32_t *idmef_inode_get_c_major_device(idmef_inode_t *ptr); void idmef_inode_set_c_major_device(idmef_inode_t *ptr, uint32_t c_major_device); int idmef_inode_new_c_major_device(idmef_inode_t *ptr, uint32_t **ret); void idmef_inode_unset_c_minor_device(idmef_inode_t *ptr); uint32_t *idmef_inode_get_c_minor_device(idmef_inode_t *ptr); void idmef_inode_set_c_minor_device(idmef_inode_t *ptr, uint32_t c_minor_device); int idmef_inode_new_c_minor_device(idmef_inode_t *ptr, uint32_t **ret); typedef struct idmef_linkage idmef_linkage_t; typedef enum { IDMEF_CHECKSUM_ALGORITHM_ERROR = -1, IDMEF_CHECKSUM_ALGORITHM_MD4 = 1, IDMEF_CHECKSUM_ALGORITHM_MD5 = 2, IDMEF_CHECKSUM_ALGORITHM_SHA1 = 3, IDMEF_CHECKSUM_ALGORITHM_SHA2_256 = 4, IDMEF_CHECKSUM_ALGORITHM_SHA2_384 = 5, IDMEF_CHECKSUM_ALGORITHM_SHA2_512 = 6, IDMEF_CHECKSUM_ALGORITHM_CRC_32 = 7, IDMEF_CHECKSUM_ALGORITHM_HAVAL = 8, IDMEF_CHECKSUM_ALGORITHM_TIGER = 9, IDMEF_CHECKSUM_ALGORITHM_GOST = 11 } idmef_checksum_algorithm_t; idmef_checksum_algorithm_t idmef_checksum_algorithm_to_numeric(const char *name); const char *idmef_checksum_algorithm_to_string(idmef_checksum_algorithm_t val); /* * struct { * IS_LISTED; * REFCOUNT; * REQUIRED(prelude_string_t, *value); * prelude_string_t *key; * idmef_checksum_algorithm_t algorithm; * } TYPE_ID(idmef_checksum_t, 52); */ typedef struct idmef_checksum idmef_checksum_t; int idmef_checksum_new(idmef_checksum_t **ret); int idmef_checksum_copy(const idmef_checksum_t *src, idmef_checksum_t *dst); int idmef_checksum_clone(idmef_checksum_t *src, idmef_checksum_t **dst); int idmef_checksum_compare(const idmef_checksum_t *obj1, const idmef_checksum_t *obj2); idmef_checksum_t *idmef_checksum_ref(idmef_checksum_t *checksum); #ifndef SWIG int _idmef_checksum_get_child(void *p, idmef_class_child_id_t child, void **childptr); int _idmef_checksum_new_child(void *p, idmef_class_child_id_t child, int n, void **ret); int _idmef_checksum_destroy_child(void *p, idmef_class_child_id_t child, int n); #endif void idmef_checksum_destroy(idmef_checksum_t *ptr); prelude_string_t *idmef_checksum_get_value(idmef_checksum_t *ptr); void idmef_checksum_set_value(idmef_checksum_t *ptr, prelude_string_t *value); int idmef_checksum_new_value(idmef_checksum_t *ptr, prelude_string_t **ret); prelude_string_t *idmef_checksum_get_key(idmef_checksum_t *ptr); void idmef_checksum_set_key(idmef_checksum_t *ptr, prelude_string_t *key); int idmef_checksum_new_key(idmef_checksum_t *ptr, prelude_string_t **ret); idmef_checksum_algorithm_t idmef_checksum_get_algorithm(idmef_checksum_t *ptr); void idmef_checksum_set_algorithm(idmef_checksum_t *ptr, idmef_checksum_algorithm_t algorithm); int idmef_checksum_new_algorithm(idmef_checksum_t *ptr, idmef_checksum_algorithm_t **ret); typedef enum { IDMEF_FILE_CATEGORY_ERROR = -1, IDMEF_FILE_CATEGORY_CURRENT = 1, IDMEF_FILE_CATEGORY_ORIGINAL = 2 } idmef_file_category_t; idmef_file_category_t idmef_file_category_to_numeric(const char *name); const char *idmef_file_category_to_string(idmef_file_category_t val); typedef enum { IDMEF_FILE_FSTYPE_ERROR = -1, IDMEF_FILE_FSTYPE_UFS = 1, IDMEF_FILE_FSTYPE_EFS = 2, IDMEF_FILE_FSTYPE_NFS = 3, IDMEF_FILE_FSTYPE_AFS = 4, IDMEF_FILE_FSTYPE_NTFS = 5, IDMEF_FILE_FSTYPE_FAT16 = 6, IDMEF_FILE_FSTYPE_FAT32 = 7, IDMEF_FILE_FSTYPE_PCFS = 8, IDMEF_FILE_FSTYPE_JOLIET = 9, IDMEF_FILE_FSTYPE_ISO9660 = 10 } idmef_file_fstype_t; idmef_file_fstype_t idmef_file_fstype_to_numeric(const char *name); const char *idmef_file_fstype_to_string(idmef_file_fstype_t val); /* * struct { * IS_LISTED; * REFCOUNT; * prelude_string_t *ident; * * REQUIRED(prelude_string_t, *name); * REQUIRED(prelude_string_t, *path); * * idmef_time_t *create_time; * idmef_time_t *modify_time; * idmef_time_t *access_time; * * * OPTIONAL_INT(uint64_t, data_size); * OPTIONAL_INT(uint64_t, disk_size); * * LISTED_OBJECT(file_access_list, idmef_file_access_t); * LISTED_OBJECT(linkage_list, idmef_linkage_t); * * idmef_inode_t *inode; * LISTED_OBJECT(checksum_list, idmef_checksum_t); * * idmef_file_category_t category; * OPTIONAL_INT(idmef_file_fstype_t, fstype); * prelude_string_t *file_type; * * } TYPE_ID(idmef_file_t, 26); */ typedef struct idmef_file idmef_file_t; int idmef_file_new(idmef_file_t **ret); int idmef_file_copy(const idmef_file_t *src, idmef_file_t *dst); int idmef_file_clone(idmef_file_t *src, idmef_file_t **dst); int idmef_file_compare(const idmef_file_t *obj1, const idmef_file_t *obj2); idmef_file_t *idmef_file_ref(idmef_file_t *file); #ifndef SWIG int _idmef_file_get_child(void *p, idmef_class_child_id_t child, void **childptr); int _idmef_file_new_child(void *p, idmef_class_child_id_t child, int n, void **ret); int _idmef_file_destroy_child(void *p, idmef_class_child_id_t child, int n); #endif void idmef_file_destroy(idmef_file_t *ptr); prelude_string_t *idmef_file_get_ident(idmef_file_t *ptr); void idmef_file_set_ident(idmef_file_t *ptr, prelude_string_t *ident); int idmef_file_new_ident(idmef_file_t *ptr, prelude_string_t **ret); prelude_string_t *idmef_file_get_name(idmef_file_t *ptr); void idmef_file_set_name(idmef_file_t *ptr, prelude_string_t *name); int idmef_file_new_name(idmef_file_t *ptr, prelude_string_t **ret); prelude_string_t *idmef_file_get_path(idmef_file_t *ptr); void idmef_file_set_path(idmef_file_t *ptr, prelude_string_t *path); int idmef_file_new_path(idmef_file_t *ptr, prelude_string_t **ret); idmef_time_t *idmef_file_get_create_time(idmef_file_t *ptr); void idmef_file_set_create_time(idmef_file_t *ptr, idmef_time_t *create_time); int idmef_file_new_create_time(idmef_file_t *ptr, idmef_time_t **ret); idmef_time_t *idmef_file_get_modify_time(idmef_file_t *ptr); void idmef_file_set_modify_time(idmef_file_t *ptr, idmef_time_t *modify_time); int idmef_file_new_modify_time(idmef_file_t *ptr, idmef_time_t **ret); idmef_time_t *idmef_file_get_access_time(idmef_file_t *ptr); void idmef_file_set_access_time(idmef_file_t *ptr, idmef_time_t *access_time); int idmef_file_new_access_time(idmef_file_t *ptr, idmef_time_t **ret); void idmef_file_unset_data_size(idmef_file_t *ptr); uint64_t *idmef_file_get_data_size(idmef_file_t *ptr); void idmef_file_set_data_size(idmef_file_t *ptr, uint64_t data_size); int idmef_file_new_data_size(idmef_file_t *ptr, uint64_t **ret); void idmef_file_unset_disk_size(idmef_file_t *ptr); uint64_t *idmef_file_get_disk_size(idmef_file_t *ptr); void idmef_file_set_disk_size(idmef_file_t *ptr, uint64_t disk_size); int idmef_file_new_disk_size(idmef_file_t *ptr, uint64_t **ret); idmef_file_access_t *idmef_file_get_next_file_access(idmef_file_t *file, idmef_file_access_t *file_access_cur); void idmef_file_set_file_access(idmef_file_t *ptr, idmef_file_access_t *object, int pos); int idmef_file_new_file_access(idmef_file_t *ptr, idmef_file_access_t **ret, int pos); idmef_linkage_t *idmef_file_get_next_linkage(idmef_file_t *file, idmef_linkage_t *linkage_cur); void idmef_file_set_linkage(idmef_file_t *ptr, idmef_linkage_t *object, int pos); int idmef_file_new_linkage(idmef_file_t *ptr, idmef_linkage_t **ret, int pos); idmef_inode_t *idmef_file_get_inode(idmef_file_t *ptr); void idmef_file_set_inode(idmef_file_t *ptr, idmef_inode_t *inode); int idmef_file_new_inode(idmef_file_t *ptr, idmef_inode_t **ret); idmef_checksum_t *idmef_file_get_next_checksum(idmef_file_t *file, idmef_checksum_t *checksum_cur); void idmef_file_set_checksum(idmef_file_t *ptr, idmef_checksum_t *object, int pos); int idmef_file_new_checksum(idmef_file_t *ptr, idmef_checksum_t **ret, int pos); idmef_file_category_t idmef_file_get_category(idmef_file_t *ptr); void idmef_file_set_category(idmef_file_t *ptr, idmef_file_category_t category); int idmef_file_new_category(idmef_file_t *ptr, idmef_file_category_t **ret); void idmef_file_unset_fstype(idmef_file_t *ptr); idmef_file_fstype_t *idmef_file_get_fstype(idmef_file_t *ptr); void idmef_file_set_fstype(idmef_file_t *ptr, idmef_file_fstype_t fstype); int idmef_file_new_fstype(idmef_file_t *ptr, idmef_file_fstype_t **ret); prelude_string_t *idmef_file_get_file_type(idmef_file_t *ptr); void idmef_file_set_file_type(idmef_file_t *ptr, prelude_string_t *file_type); int idmef_file_new_file_type(idmef_file_t *ptr, prelude_string_t **ret); typedef enum { IDMEF_LINKAGE_CATEGORY_ERROR = -1, IDMEF_LINKAGE_CATEGORY_HARD_LINK = 1, IDMEF_LINKAGE_CATEGORY_MOUNT_POINT = 2, IDMEF_LINKAGE_CATEGORY_REPARSE_POINT = 3, IDMEF_LINKAGE_CATEGORY_SHORTCUT = 4, IDMEF_LINKAGE_CATEGORY_STREAM = 5, IDMEF_LINKAGE_CATEGORY_SYMBOLIC_LINK = 6 } idmef_linkage_category_t; idmef_linkage_category_t idmef_linkage_category_to_numeric(const char *name); const char *idmef_linkage_category_to_string(idmef_linkage_category_t val); /* * struct { * IS_LISTED; * REFCOUNT; * * idmef_linkage_category_t category; * REQUIRED(prelude_string_t, *name); * REQUIRED(prelude_string_t, *path); * REQUIRED(idmef_file_t, *file); * } TYPE_ID(idmef_linkage_t, 28); */ int idmef_linkage_new(idmef_linkage_t **ret); int idmef_linkage_copy(const idmef_linkage_t *src, idmef_linkage_t *dst); int idmef_linkage_clone(idmef_linkage_t *src, idmef_linkage_t **dst); int idmef_linkage_compare(const idmef_linkage_t *obj1, const idmef_linkage_t *obj2); idmef_linkage_t *idmef_linkage_ref(idmef_linkage_t *linkage); #ifndef SWIG int _idmef_linkage_get_child(void *p, idmef_class_child_id_t child, void **childptr); int _idmef_linkage_new_child(void *p, idmef_class_child_id_t child, int n, void **ret); int _idmef_linkage_destroy_child(void *p, idmef_class_child_id_t child, int n); #endif void idmef_linkage_destroy(idmef_linkage_t *ptr); idmef_linkage_category_t idmef_linkage_get_category(idmef_linkage_t *ptr); void idmef_linkage_set_category(idmef_linkage_t *ptr, idmef_linkage_category_t category); int idmef_linkage_new_category(idmef_linkage_t *ptr, idmef_linkage_category_t **ret); prelude_string_t *idmef_linkage_get_name(idmef_linkage_t *ptr); void idmef_linkage_set_name(idmef_linkage_t *ptr, prelude_string_t *name); int idmef_linkage_new_name(idmef_linkage_t *ptr, prelude_string_t **ret); prelude_string_t *idmef_linkage_get_path(idmef_linkage_t *ptr); void idmef_linkage_set_path(idmef_linkage_t *ptr, prelude_string_t *path); int idmef_linkage_new_path(idmef_linkage_t *ptr, prelude_string_t **ret); idmef_file_t *idmef_linkage_get_file(idmef_linkage_t *ptr); void idmef_linkage_set_file(idmef_linkage_t *ptr, idmef_file_t *file); int idmef_linkage_new_file(idmef_linkage_t *ptr, idmef_file_t **ret); typedef enum { IDMEF_TARGET_DECOY_ERROR = -1, IDMEF_TARGET_DECOY_UNKNOWN = 0, IDMEF_TARGET_DECOY_YES = 1, IDMEF_TARGET_DECOY_NO = 2 } idmef_target_decoy_t; idmef_target_decoy_t idmef_target_decoy_to_numeric(const char *name); const char *idmef_target_decoy_to_string(idmef_target_decoy_t val); /* * struct { * IS_LISTED; * REFCOUNT; * prelude_string_t *ident; * * idmef_target_decoy_t decoy; * prelude_string_t *interface; * * idmef_node_t *node; * idmef_user_t *user; * idmef_process_t *process; * idmef_service_t *service; * LISTED_OBJECT(file_list, idmef_file_t); * } TYPE_ID(idmef_target_t, 30); */ typedef struct idmef_target idmef_target_t; int idmef_target_new(idmef_target_t **ret); int idmef_target_copy(const idmef_target_t *src, idmef_target_t *dst); int idmef_target_clone(idmef_target_t *src, idmef_target_t **dst); int idmef_target_compare(const idmef_target_t *obj1, const idmef_target_t *obj2); idmef_target_t *idmef_target_ref(idmef_target_t *target); #ifndef SWIG int _idmef_target_get_child(void *p, idmef_class_child_id_t child, void **childptr); int _idmef_target_new_child(void *p, idmef_class_child_id_t child, int n, void **ret); int _idmef_target_destroy_child(void *p, idmef_class_child_id_t child, int n); #endif void idmef_target_destroy(idmef_target_t *ptr); prelude_string_t *idmef_target_get_ident(idmef_target_t *ptr); void idmef_target_set_ident(idmef_target_t *ptr, prelude_string_t *ident); int idmef_target_new_ident(idmef_target_t *ptr, prelude_string_t **ret); idmef_target_decoy_t idmef_target_get_decoy(idmef_target_t *ptr); void idmef_target_set_decoy(idmef_target_t *ptr, idmef_target_decoy_t decoy); int idmef_target_new_decoy(idmef_target_t *ptr, idmef_target_decoy_t **ret); prelude_string_t *idmef_target_get_interface(idmef_target_t *ptr); void idmef_target_set_interface(idmef_target_t *ptr, prelude_string_t *interface); int idmef_target_new_interface(idmef_target_t *ptr, prelude_string_t **ret); idmef_node_t *idmef_target_get_node(idmef_target_t *ptr); void idmef_target_set_node(idmef_target_t *ptr, idmef_node_t *node); int idmef_target_new_node(idmef_target_t *ptr, idmef_node_t **ret); idmef_user_t *idmef_target_get_user(idmef_target_t *ptr); void idmef_target_set_user(idmef_target_t *ptr, idmef_user_t *user); int idmef_target_new_user(idmef_target_t *ptr, idmef_user_t **ret); idmef_process_t *idmef_target_get_process(idmef_target_t *ptr); void idmef_target_set_process(idmef_target_t *ptr, idmef_process_t *process); int idmef_target_new_process(idmef_target_t *ptr, idmef_process_t **ret); idmef_service_t *idmef_target_get_service(idmef_target_t *ptr); void idmef_target_set_service(idmef_target_t *ptr, idmef_service_t *service); int idmef_target_new_service(idmef_target_t *ptr, idmef_service_t **ret); idmef_file_t *idmef_target_get_next_file(idmef_target_t *target, idmef_file_t *file_cur); void idmef_target_set_file(idmef_target_t *ptr, idmef_file_t *object, int pos); int idmef_target_new_file(idmef_target_t *ptr, idmef_file_t **ret, int pos); /* * struct { * IS_LISTED; * REFCOUNT; * prelude_string_t *analyzerid; * * prelude_string_t *name; * prelude_string_t *manufacturer; * prelude_string_t *model; * prelude_string_t *version; * prelude_string_t *class; * prelude_string_t *ostype; * prelude_string_t *osversion; * * idmef_node_t *node; * idmef_process_t *process; * * } TYPE_ID(idmef_analyzer_t, 31); */ typedef struct idmef_analyzer idmef_analyzer_t; int idmef_analyzer_new(idmef_analyzer_t **ret); int idmef_analyzer_copy(const idmef_analyzer_t *src, idmef_analyzer_t *dst); int idmef_analyzer_clone(idmef_analyzer_t *src, idmef_analyzer_t **dst); int idmef_analyzer_compare(const idmef_analyzer_t *obj1, const idmef_analyzer_t *obj2); idmef_analyzer_t *idmef_analyzer_ref(idmef_analyzer_t *analyzer); #ifndef SWIG int _idmef_analyzer_get_child(void *p, idmef_class_child_id_t child, void **childptr); int _idmef_analyzer_new_child(void *p, idmef_class_child_id_t child, int n, void **ret); int _idmef_analyzer_destroy_child(void *p, idmef_class_child_id_t child, int n); #endif void idmef_analyzer_destroy(idmef_analyzer_t *ptr); prelude_string_t *idmef_analyzer_get_analyzerid(idmef_analyzer_t *ptr); void idmef_analyzer_set_analyzerid(idmef_analyzer_t *ptr, prelude_string_t *analyzerid); int idmef_analyzer_new_analyzerid(idmef_analyzer_t *ptr, prelude_string_t **ret); prelude_string_t *idmef_analyzer_get_name(idmef_analyzer_t *ptr); void idmef_analyzer_set_name(idmef_analyzer_t *ptr, prelude_string_t *name); int idmef_analyzer_new_name(idmef_analyzer_t *ptr, prelude_string_t **ret); prelude_string_t *idmef_analyzer_get_manufacturer(idmef_analyzer_t *ptr); void idmef_analyzer_set_manufacturer(idmef_analyzer_t *ptr, prelude_string_t *manufacturer); int idmef_analyzer_new_manufacturer(idmef_analyzer_t *ptr, prelude_string_t **ret); prelude_string_t *idmef_analyzer_get_model(idmef_analyzer_t *ptr); void idmef_analyzer_set_model(idmef_analyzer_t *ptr, prelude_string_t *model); int idmef_analyzer_new_model(idmef_analyzer_t *ptr, prelude_string_t **ret); prelude_string_t *idmef_analyzer_get_version(idmef_analyzer_t *ptr); void idmef_analyzer_set_version(idmef_analyzer_t *ptr, prelude_string_t *version); int idmef_analyzer_new_version(idmef_analyzer_t *ptr, prelude_string_t **ret); prelude_string_t *idmef_analyzer_get_class(idmef_analyzer_t *ptr); void idmef_analyzer_set_class(idmef_analyzer_t *ptr, prelude_string_t *class_str); int idmef_analyzer_new_class(idmef_analyzer_t *ptr, prelude_string_t **ret); prelude_string_t *idmef_analyzer_get_ostype(idmef_analyzer_t *ptr); void idmef_analyzer_set_ostype(idmef_analyzer_t *ptr, prelude_string_t *ostype); int idmef_analyzer_new_ostype(idmef_analyzer_t *ptr, prelude_string_t **ret); prelude_string_t *idmef_analyzer_get_osversion(idmef_analyzer_t *ptr); void idmef_analyzer_set_osversion(idmef_analyzer_t *ptr, prelude_string_t *osversion); int idmef_analyzer_new_osversion(idmef_analyzer_t *ptr, prelude_string_t **ret); idmef_node_t *idmef_analyzer_get_node(idmef_analyzer_t *ptr); void idmef_analyzer_set_node(idmef_analyzer_t *ptr, idmef_node_t *node); int idmef_analyzer_new_node(idmef_analyzer_t *ptr, idmef_node_t **ret); idmef_process_t *idmef_analyzer_get_process(idmef_analyzer_t *ptr); void idmef_analyzer_set_process(idmef_analyzer_t *ptr, idmef_process_t *process); int idmef_analyzer_new_process(idmef_analyzer_t *ptr, idmef_process_t **ret); /* * struct { * IS_LISTED; * REFCOUNT; * * REQUIRED(prelude_string_t, *alertident); * prelude_string_t *analyzerid; * * } TYPE_ID(idmef_alertident_t, 32); */ typedef struct idmef_alertident idmef_alertident_t; int idmef_alertident_new(idmef_alertident_t **ret); int idmef_alertident_copy(const idmef_alertident_t *src, idmef_alertident_t *dst); int idmef_alertident_clone(idmef_alertident_t *src, idmef_alertident_t **dst); int idmef_alertident_compare(const idmef_alertident_t *obj1, const idmef_alertident_t *obj2); idmef_alertident_t *idmef_alertident_ref(idmef_alertident_t *alertident); #ifndef SWIG int _idmef_alertident_get_child(void *p, idmef_class_child_id_t child, void **childptr); int _idmef_alertident_new_child(void *p, idmef_class_child_id_t child, int n, void **ret); int _idmef_alertident_destroy_child(void *p, idmef_class_child_id_t child, int n); #endif void idmef_alertident_destroy(idmef_alertident_t *ptr); prelude_string_t *idmef_alertident_get_alertident(idmef_alertident_t *ptr); void idmef_alertident_set_alertident(idmef_alertident_t *ptr, prelude_string_t *alertident); int idmef_alertident_new_alertident(idmef_alertident_t *ptr, prelude_string_t **ret); prelude_string_t *idmef_alertident_get_analyzerid(idmef_alertident_t *ptr); void idmef_alertident_set_analyzerid(idmef_alertident_t *ptr, prelude_string_t *analyzerid); int idmef_alertident_new_analyzerid(idmef_alertident_t *ptr, prelude_string_t **ret); typedef enum { IDMEF_IMPACT_SEVERITY_ERROR = -1, IDMEF_IMPACT_SEVERITY_INFO = 1, IDMEF_IMPACT_SEVERITY_LOW = 2, IDMEF_IMPACT_SEVERITY_MEDIUM = 3, IDMEF_IMPACT_SEVERITY_HIGH = 4 } idmef_impact_severity_t; idmef_impact_severity_t idmef_impact_severity_to_numeric(const char *name); const char *idmef_impact_severity_to_string(idmef_impact_severity_t val); typedef enum { IDMEF_IMPACT_COMPLETION_ERROR = -1, IDMEF_IMPACT_COMPLETION_FAILED = 1, IDMEF_IMPACT_COMPLETION_SUCCEEDED = 2 } idmef_impact_completion_t; idmef_impact_completion_t idmef_impact_completion_to_numeric(const char *name); const char *idmef_impact_completion_to_string(idmef_impact_completion_t val); typedef enum { IDMEF_IMPACT_TYPE_ERROR = -1, IDMEF_IMPACT_TYPE_OTHER = 0, IDMEF_IMPACT_TYPE_ADMIN = 1, IDMEF_IMPACT_TYPE_DOS = 2, IDMEF_IMPACT_TYPE_FILE = 3, IDMEF_IMPACT_TYPE_RECON = 4, IDMEF_IMPACT_TYPE_USER = 5 } idmef_impact_type_t; idmef_impact_type_t idmef_impact_type_to_numeric(const char *name); const char *idmef_impact_type_to_string(idmef_impact_type_t val); /* * struct { * REFCOUNT; * * OPTIONAL_INT(idmef_impact_severity_t, severity); * OPTIONAL_INT(idmef_impact_completion_t, completion); * idmef_impact_type_t type; * prelude_string_t *description; * } TYPE_ID(idmef_impact_t, 36); */ typedef struct idmef_impact idmef_impact_t; int idmef_impact_new(idmef_impact_t **ret); int idmef_impact_copy(const idmef_impact_t *src, idmef_impact_t *dst); int idmef_impact_clone(idmef_impact_t *src, idmef_impact_t **dst); int idmef_impact_compare(const idmef_impact_t *obj1, const idmef_impact_t *obj2); idmef_impact_t *idmef_impact_ref(idmef_impact_t *impact); #ifndef SWIG int _idmef_impact_get_child(void *p, idmef_class_child_id_t child, void **childptr); int _idmef_impact_new_child(void *p, idmef_class_child_id_t child, int n, void **ret); int _idmef_impact_destroy_child(void *p, idmef_class_child_id_t child, int n); #endif void idmef_impact_destroy(idmef_impact_t *ptr); void idmef_impact_unset_severity(idmef_impact_t *ptr); idmef_impact_severity_t *idmef_impact_get_severity(idmef_impact_t *ptr); void idmef_impact_set_severity(idmef_impact_t *ptr, idmef_impact_severity_t severity); int idmef_impact_new_severity(idmef_impact_t *ptr, idmef_impact_severity_t **ret); void idmef_impact_unset_completion(idmef_impact_t *ptr); idmef_impact_completion_t *idmef_impact_get_completion(idmef_impact_t *ptr); void idmef_impact_set_completion(idmef_impact_t *ptr, idmef_impact_completion_t completion); int idmef_impact_new_completion(idmef_impact_t *ptr, idmef_impact_completion_t **ret); idmef_impact_type_t idmef_impact_get_type(idmef_impact_t *ptr); void idmef_impact_set_type(idmef_impact_t *ptr, idmef_impact_type_t type); int idmef_impact_new_type(idmef_impact_t *ptr, idmef_impact_type_t **ret); prelude_string_t *idmef_impact_get_description(idmef_impact_t *ptr); void idmef_impact_set_description(idmef_impact_t *ptr, prelude_string_t *description); int idmef_impact_new_description(idmef_impact_t *ptr, prelude_string_t **ret); typedef enum { IDMEF_ACTION_CATEGORY_ERROR = -1, IDMEF_ACTION_CATEGORY_OTHER = 0, IDMEF_ACTION_CATEGORY_BLOCK_INSTALLED = 1, IDMEF_ACTION_CATEGORY_NOTIFICATION_SENT = 2, IDMEF_ACTION_CATEGORY_TAKEN_OFFLINE = 3 } idmef_action_category_t; idmef_action_category_t idmef_action_category_to_numeric(const char *name); const char *idmef_action_category_to_string(idmef_action_category_t val); /* * struct { * IS_LISTED; * REFCOUNT; * * idmef_action_category_t category; * prelude_string_t *description; * } TYPE_ID(idmef_action_t, 38); */ typedef struct idmef_action idmef_action_t; int idmef_action_new(idmef_action_t **ret); int idmef_action_copy(const idmef_action_t *src, idmef_action_t *dst); int idmef_action_clone(idmef_action_t *src, idmef_action_t **dst); int idmef_action_compare(const idmef_action_t *obj1, const idmef_action_t *obj2); idmef_action_t *idmef_action_ref(idmef_action_t *action); #ifndef SWIG int _idmef_action_get_child(void *p, idmef_class_child_id_t child, void **childptr); int _idmef_action_new_child(void *p, idmef_class_child_id_t child, int n, void **ret); int _idmef_action_destroy_child(void *p, idmef_class_child_id_t child, int n); #endif void idmef_action_destroy(idmef_action_t *ptr); idmef_action_category_t idmef_action_get_category(idmef_action_t *ptr); void idmef_action_set_category(idmef_action_t *ptr, idmef_action_category_t category); int idmef_action_new_category(idmef_action_t *ptr, idmef_action_category_t **ret); prelude_string_t *idmef_action_get_description(idmef_action_t *ptr); void idmef_action_set_description(idmef_action_t *ptr, prelude_string_t *description); int idmef_action_new_description(idmef_action_t *ptr, prelude_string_t **ret); typedef enum { IDMEF_CONFIDENCE_RATING_ERROR = -1, IDMEF_CONFIDENCE_RATING_NUMERIC = 0, IDMEF_CONFIDENCE_RATING_LOW = 1, IDMEF_CONFIDENCE_RATING_MEDIUM = 2, IDMEF_CONFIDENCE_RATING_HIGH = 3 } idmef_confidence_rating_t; idmef_confidence_rating_t idmef_confidence_rating_to_numeric(const char *name); const char *idmef_confidence_rating_to_string(idmef_confidence_rating_t val); /* * struct { * REFCOUNT; * * idmef_confidence_rating_t rating; * float confidence; * } TYPE_ID(idmef_confidence_t, 40); */ typedef struct idmef_confidence idmef_confidence_t; int idmef_confidence_new(idmef_confidence_t **ret); int idmef_confidence_copy(const idmef_confidence_t *src, idmef_confidence_t *dst); int idmef_confidence_clone(idmef_confidence_t *src, idmef_confidence_t **dst); int idmef_confidence_compare(const idmef_confidence_t *obj1, const idmef_confidence_t *obj2); idmef_confidence_t *idmef_confidence_ref(idmef_confidence_t *confidence); #ifndef SWIG int _idmef_confidence_get_child(void *p, idmef_class_child_id_t child, void **childptr); int _idmef_confidence_new_child(void *p, idmef_class_child_id_t child, int n, void **ret); int _idmef_confidence_destroy_child(void *p, idmef_class_child_id_t child, int n); #endif void idmef_confidence_destroy(idmef_confidence_t *ptr); idmef_confidence_rating_t idmef_confidence_get_rating(idmef_confidence_t *ptr); void idmef_confidence_set_rating(idmef_confidence_t *ptr, idmef_confidence_rating_t rating); int idmef_confidence_new_rating(idmef_confidence_t *ptr, idmef_confidence_rating_t **ret); float idmef_confidence_get_confidence(idmef_confidence_t *ptr); void idmef_confidence_set_confidence(idmef_confidence_t *ptr, float confidence); int idmef_confidence_new_confidence(idmef_confidence_t *ptr, float **ret); /* * struct { * REFCOUNT; * * idmef_impact_t *impact; * LISTED_OBJECT(action_list, idmef_action_t); * idmef_confidence_t *confidence; * } TYPE_ID(idmef_assessment_t, 41); */ typedef struct idmef_assessment idmef_assessment_t; int idmef_assessment_new(idmef_assessment_t **ret); int idmef_assessment_copy(const idmef_assessment_t *src, idmef_assessment_t *dst); int idmef_assessment_clone(idmef_assessment_t *src, idmef_assessment_t **dst); int idmef_assessment_compare(const idmef_assessment_t *obj1, const idmef_assessment_t *obj2); idmef_assessment_t *idmef_assessment_ref(idmef_assessment_t *assessment); #ifndef SWIG int _idmef_assessment_get_child(void *p, idmef_class_child_id_t child, void **childptr); int _idmef_assessment_new_child(void *p, idmef_class_child_id_t child, int n, void **ret); int _idmef_assessment_destroy_child(void *p, idmef_class_child_id_t child, int n); #endif void idmef_assessment_destroy(idmef_assessment_t *ptr); idmef_impact_t *idmef_assessment_get_impact(idmef_assessment_t *ptr); void idmef_assessment_set_impact(idmef_assessment_t *ptr, idmef_impact_t *impact); int idmef_assessment_new_impact(idmef_assessment_t *ptr, idmef_impact_t **ret); idmef_action_t *idmef_assessment_get_next_action(idmef_assessment_t *assessment, idmef_action_t *action_cur); void idmef_assessment_set_action(idmef_assessment_t *ptr, idmef_action_t *object, int pos); int idmef_assessment_new_action(idmef_assessment_t *ptr, idmef_action_t **ret, int pos); idmef_confidence_t *idmef_assessment_get_confidence(idmef_assessment_t *ptr); void idmef_assessment_set_confidence(idmef_assessment_t *ptr, idmef_confidence_t *confidence); int idmef_assessment_new_confidence(idmef_assessment_t *ptr, idmef_confidence_t **ret); /* * struct { * REFCOUNT; * * REQUIRED(prelude_string_t, *name); * prelude_string_t *command; * LISTED_OBJECT(alertident_list, idmef_alertident_t); * } TYPE_ID(idmef_tool_alert_t, 42); */ typedef struct idmef_tool_alert idmef_tool_alert_t; int idmef_tool_alert_new(idmef_tool_alert_t **ret); int idmef_tool_alert_copy(const idmef_tool_alert_t *src, idmef_tool_alert_t *dst); int idmef_tool_alert_clone(idmef_tool_alert_t *src, idmef_tool_alert_t **dst); int idmef_tool_alert_compare(const idmef_tool_alert_t *obj1, const idmef_tool_alert_t *obj2); idmef_tool_alert_t *idmef_tool_alert_ref(idmef_tool_alert_t *tool_alert); #ifndef SWIG int _idmef_tool_alert_get_child(void *p, idmef_class_child_id_t child, void **childptr); int _idmef_tool_alert_new_child(void *p, idmef_class_child_id_t child, int n, void **ret); int _idmef_tool_alert_destroy_child(void *p, idmef_class_child_id_t child, int n); #endif void idmef_tool_alert_destroy(idmef_tool_alert_t *ptr); prelude_string_t *idmef_tool_alert_get_name(idmef_tool_alert_t *ptr); void idmef_tool_alert_set_name(idmef_tool_alert_t *ptr, prelude_string_t *name); int idmef_tool_alert_new_name(idmef_tool_alert_t *ptr, prelude_string_t **ret); prelude_string_t *idmef_tool_alert_get_command(idmef_tool_alert_t *ptr); void idmef_tool_alert_set_command(idmef_tool_alert_t *ptr, prelude_string_t *command); int idmef_tool_alert_new_command(idmef_tool_alert_t *ptr, prelude_string_t **ret); idmef_alertident_t *idmef_tool_alert_get_next_alertident(idmef_tool_alert_t *tool_alert, idmef_alertident_t *alertident_cur); void idmef_tool_alert_set_alertident(idmef_tool_alert_t *ptr, idmef_alertident_t *object, int pos); int idmef_tool_alert_new_alertident(idmef_tool_alert_t *ptr, idmef_alertident_t **ret, int pos); /* * struct { * REFCOUNT; * * REQUIRED(prelude_string_t, *name); * LISTED_OBJECT(alertident_list, idmef_alertident_t); * } TYPE_ID(idmef_correlation_alert_t, 43); */ typedef struct idmef_correlation_alert idmef_correlation_alert_t; int idmef_correlation_alert_new(idmef_correlation_alert_t **ret); int idmef_correlation_alert_copy(const idmef_correlation_alert_t *src, idmef_correlation_alert_t *dst); int idmef_correlation_alert_clone(idmef_correlation_alert_t *src, idmef_correlation_alert_t **dst); int idmef_correlation_alert_compare(const idmef_correlation_alert_t *obj1, const idmef_correlation_alert_t *obj2); idmef_correlation_alert_t *idmef_correlation_alert_ref(idmef_correlation_alert_t *correlation_alert); #ifndef SWIG int _idmef_correlation_alert_get_child(void *p, idmef_class_child_id_t child, void **childptr); int _idmef_correlation_alert_new_child(void *p, idmef_class_child_id_t child, int n, void **ret); int _idmef_correlation_alert_destroy_child(void *p, idmef_class_child_id_t child, int n); #endif void idmef_correlation_alert_destroy(idmef_correlation_alert_t *ptr); prelude_string_t *idmef_correlation_alert_get_name(idmef_correlation_alert_t *ptr); void idmef_correlation_alert_set_name(idmef_correlation_alert_t *ptr, prelude_string_t *name); int idmef_correlation_alert_new_name(idmef_correlation_alert_t *ptr, prelude_string_t **ret); idmef_alertident_t *idmef_correlation_alert_get_next_alertident(idmef_correlation_alert_t *correlation_alert, idmef_alertident_t *alertident_cur); void idmef_correlation_alert_set_alertident(idmef_correlation_alert_t *ptr, idmef_alertident_t *object, int pos); int idmef_correlation_alert_new_alertident(idmef_correlation_alert_t *ptr, idmef_alertident_t **ret, int pos); /* * struct { * REFCOUNT; * * REQUIRED(prelude_string_t, *program); * OPTIONAL_INT(uint32_t, size); * idmef_data_t *buffer; * } TYPE_ID(idmef_overflow_alert_t, 44); */ typedef struct idmef_overflow_alert idmef_overflow_alert_t; int idmef_overflow_alert_new(idmef_overflow_alert_t **ret); int idmef_overflow_alert_copy(const idmef_overflow_alert_t *src, idmef_overflow_alert_t *dst); int idmef_overflow_alert_clone(idmef_overflow_alert_t *src, idmef_overflow_alert_t **dst); int idmef_overflow_alert_compare(const idmef_overflow_alert_t *obj1, const idmef_overflow_alert_t *obj2); idmef_overflow_alert_t *idmef_overflow_alert_ref(idmef_overflow_alert_t *overflow_alert); #ifndef SWIG int _idmef_overflow_alert_get_child(void *p, idmef_class_child_id_t child, void **childptr); int _idmef_overflow_alert_new_child(void *p, idmef_class_child_id_t child, int n, void **ret); int _idmef_overflow_alert_destroy_child(void *p, idmef_class_child_id_t child, int n); #endif void idmef_overflow_alert_destroy(idmef_overflow_alert_t *ptr); prelude_string_t *idmef_overflow_alert_get_program(idmef_overflow_alert_t *ptr); void idmef_overflow_alert_set_program(idmef_overflow_alert_t *ptr, prelude_string_t *program); int idmef_overflow_alert_new_program(idmef_overflow_alert_t *ptr, prelude_string_t **ret); void idmef_overflow_alert_unset_size(idmef_overflow_alert_t *ptr); uint32_t *idmef_overflow_alert_get_size(idmef_overflow_alert_t *ptr); void idmef_overflow_alert_set_size(idmef_overflow_alert_t *ptr, uint32_t size); int idmef_overflow_alert_new_size(idmef_overflow_alert_t *ptr, uint32_t **ret); idmef_data_t *idmef_overflow_alert_get_buffer(idmef_overflow_alert_t *ptr); void idmef_overflow_alert_set_buffer(idmef_overflow_alert_t *ptr, idmef_data_t *buffer); int idmef_overflow_alert_new_buffer(idmef_overflow_alert_t *ptr, idmef_data_t **ret); typedef enum { IDMEF_ALERT_TYPE_ERROR = -1, IDMEF_ALERT_TYPE_DEFAULT = 0, IDMEF_ALERT_TYPE_TOOL = 1, IDMEF_ALERT_TYPE_CORRELATION = 2, IDMEF_ALERT_TYPE_OVERFLOW = 3 } idmef_alert_type_t; idmef_alert_type_t idmef_alert_type_to_numeric(const char *name); const char *idmef_alert_type_to_string(idmef_alert_type_t val); /* * struct { * REFCOUNT; * prelude_string_t *messageid; * * LISTED_OBJECT(analyzer_list, idmef_analyzer_t); * * REQUIRED(idmef_time_t, *create_time); * REQUIRED(idmef_classification_t, *classification); * idmef_time_t *detect_time; * idmef_time_t *analyzer_time; * * LISTED_OBJECT(source_list, idmef_source_t); * LISTED_OBJECT(target_list, idmef_target_t); * * idmef_assessment_t *assessment; * * LISTED_OBJECT(additional_data_list, idmef_additional_data_t); * * UNION(idmef_alert_type_t, type) { * UNION_MEMBER(IDMEF_ALERT_TYPE_TOOL, idmef_tool_alert_t, *tool_alert); * UNION_MEMBER(IDMEF_ALERT_TYPE_CORRELATION, idmef_correlation_alert_t, *correlation_alert); * UNION_MEMBER(IDMEF_ALERT_TYPE_OVERFLOW, idmef_overflow_alert_t, *overflow_alert); * } detail; * * } TYPE_ID(idmef_alert_t, 46); */ typedef struct idmef_alert idmef_alert_t; int idmef_alert_new(idmef_alert_t **ret); int idmef_alert_copy(const idmef_alert_t *src, idmef_alert_t *dst); int idmef_alert_clone(idmef_alert_t *src, idmef_alert_t **dst); int idmef_alert_compare(const idmef_alert_t *obj1, const idmef_alert_t *obj2); idmef_alert_t *idmef_alert_ref(idmef_alert_t *alert); #ifndef SWIG int _idmef_alert_get_child(void *p, idmef_class_child_id_t child, void **childptr); int _idmef_alert_new_child(void *p, idmef_class_child_id_t child, int n, void **ret); int _idmef_alert_destroy_child(void *p, idmef_class_child_id_t child, int n); #endif void idmef_alert_destroy(idmef_alert_t *ptr); prelude_string_t *idmef_alert_get_messageid(idmef_alert_t *ptr); void idmef_alert_set_messageid(idmef_alert_t *ptr, prelude_string_t *messageid); int idmef_alert_new_messageid(idmef_alert_t *ptr, prelude_string_t **ret); idmef_analyzer_t *idmef_alert_get_next_analyzer(idmef_alert_t *alert, idmef_analyzer_t *analyzer_cur); void idmef_alert_set_analyzer(idmef_alert_t *ptr, idmef_analyzer_t *object, int pos); int idmef_alert_new_analyzer(idmef_alert_t *ptr, idmef_analyzer_t **ret, int pos); idmef_time_t *idmef_alert_get_create_time(idmef_alert_t *ptr); void idmef_alert_set_create_time(idmef_alert_t *ptr, idmef_time_t *create_time); int idmef_alert_new_create_time(idmef_alert_t *ptr, idmef_time_t **ret); idmef_classification_t *idmef_alert_get_classification(idmef_alert_t *ptr); void idmef_alert_set_classification(idmef_alert_t *ptr, idmef_classification_t *classification); int idmef_alert_new_classification(idmef_alert_t *ptr, idmef_classification_t **ret); idmef_time_t *idmef_alert_get_detect_time(idmef_alert_t *ptr); void idmef_alert_set_detect_time(idmef_alert_t *ptr, idmef_time_t *detect_time); int idmef_alert_new_detect_time(idmef_alert_t *ptr, idmef_time_t **ret); idmef_time_t *idmef_alert_get_analyzer_time(idmef_alert_t *ptr); void idmef_alert_set_analyzer_time(idmef_alert_t *ptr, idmef_time_t *analyzer_time); int idmef_alert_new_analyzer_time(idmef_alert_t *ptr, idmef_time_t **ret); idmef_source_t *idmef_alert_get_next_source(idmef_alert_t *alert, idmef_source_t *source_cur); void idmef_alert_set_source(idmef_alert_t *ptr, idmef_source_t *object, int pos); int idmef_alert_new_source(idmef_alert_t *ptr, idmef_source_t **ret, int pos); idmef_target_t *idmef_alert_get_next_target(idmef_alert_t *alert, idmef_target_t *target_cur); void idmef_alert_set_target(idmef_alert_t *ptr, idmef_target_t *object, int pos); int idmef_alert_new_target(idmef_alert_t *ptr, idmef_target_t **ret, int pos); idmef_assessment_t *idmef_alert_get_assessment(idmef_alert_t *ptr); void idmef_alert_set_assessment(idmef_alert_t *ptr, idmef_assessment_t *assessment); int idmef_alert_new_assessment(idmef_alert_t *ptr, idmef_assessment_t **ret); idmef_additional_data_t *idmef_alert_get_next_additional_data(idmef_alert_t *alert, idmef_additional_data_t *additional_data_cur); void idmef_alert_set_additional_data(idmef_alert_t *ptr, idmef_additional_data_t *object, int pos); int idmef_alert_new_additional_data(idmef_alert_t *ptr, idmef_additional_data_t **ret, int pos); idmef_alert_type_t idmef_alert_get_type(idmef_alert_t *ptr); idmef_tool_alert_t *idmef_alert_get_tool_alert(idmef_alert_t *ptr); void idmef_alert_set_tool_alert(idmef_alert_t *ptr, idmef_tool_alert_t *tool_alert); int idmef_alert_new_tool_alert(idmef_alert_t *ptr, idmef_tool_alert_t **ret); idmef_correlation_alert_t *idmef_alert_get_correlation_alert(idmef_alert_t *ptr); void idmef_alert_set_correlation_alert(idmef_alert_t *ptr, idmef_correlation_alert_t *correlation_alert); int idmef_alert_new_correlation_alert(idmef_alert_t *ptr, idmef_correlation_alert_t **ret); idmef_overflow_alert_t *idmef_alert_get_overflow_alert(idmef_alert_t *ptr); void idmef_alert_set_overflow_alert(idmef_alert_t *ptr, idmef_overflow_alert_t *overflow_alert); int idmef_alert_new_overflow_alert(idmef_alert_t *ptr, idmef_overflow_alert_t **ret); /* * struct { * REFCOUNT; * * prelude_string_t *messageid; * LISTED_OBJECT(analyzer_list, idmef_analyzer_t); * * REQUIRED(idmef_time_t, *create_time); * idmef_time_t *analyzer_time; * * OPTIONAL_INT(uint32_t, heartbeat_interval); * LISTED_OBJECT(additional_data_list, idmef_additional_data_t); * } TYPE_ID(idmef_heartbeat_t, 47); */ typedef struct idmef_heartbeat idmef_heartbeat_t; int idmef_heartbeat_new(idmef_heartbeat_t **ret); int idmef_heartbeat_copy(const idmef_heartbeat_t *src, idmef_heartbeat_t *dst); int idmef_heartbeat_clone(idmef_heartbeat_t *src, idmef_heartbeat_t **dst); int idmef_heartbeat_compare(const idmef_heartbeat_t *obj1, const idmef_heartbeat_t *obj2); idmef_heartbeat_t *idmef_heartbeat_ref(idmef_heartbeat_t *heartbeat); #ifndef SWIG int _idmef_heartbeat_get_child(void *p, idmef_class_child_id_t child, void **childptr); int _idmef_heartbeat_new_child(void *p, idmef_class_child_id_t child, int n, void **ret); int _idmef_heartbeat_destroy_child(void *p, idmef_class_child_id_t child, int n); #endif void idmef_heartbeat_destroy(idmef_heartbeat_t *ptr); prelude_string_t *idmef_heartbeat_get_messageid(idmef_heartbeat_t *ptr); void idmef_heartbeat_set_messageid(idmef_heartbeat_t *ptr, prelude_string_t *messageid); int idmef_heartbeat_new_messageid(idmef_heartbeat_t *ptr, prelude_string_t **ret); idmef_analyzer_t *idmef_heartbeat_get_next_analyzer(idmef_heartbeat_t *heartbeat, idmef_analyzer_t *analyzer_cur); void idmef_heartbeat_set_analyzer(idmef_heartbeat_t *ptr, idmef_analyzer_t *object, int pos); int idmef_heartbeat_new_analyzer(idmef_heartbeat_t *ptr, idmef_analyzer_t **ret, int pos); idmef_time_t *idmef_heartbeat_get_create_time(idmef_heartbeat_t *ptr); void idmef_heartbeat_set_create_time(idmef_heartbeat_t *ptr, idmef_time_t *create_time); int idmef_heartbeat_new_create_time(idmef_heartbeat_t *ptr, idmef_time_t **ret); idmef_time_t *idmef_heartbeat_get_analyzer_time(idmef_heartbeat_t *ptr); void idmef_heartbeat_set_analyzer_time(idmef_heartbeat_t *ptr, idmef_time_t *analyzer_time); int idmef_heartbeat_new_analyzer_time(idmef_heartbeat_t *ptr, idmef_time_t **ret); void idmef_heartbeat_unset_heartbeat_interval(idmef_heartbeat_t *ptr); uint32_t *idmef_heartbeat_get_heartbeat_interval(idmef_heartbeat_t *ptr); void idmef_heartbeat_set_heartbeat_interval(idmef_heartbeat_t *ptr, uint32_t heartbeat_interval); int idmef_heartbeat_new_heartbeat_interval(idmef_heartbeat_t *ptr, uint32_t **ret); idmef_additional_data_t *idmef_heartbeat_get_next_additional_data(idmef_heartbeat_t *heartbeat, idmef_additional_data_t *additional_data_cur); void idmef_heartbeat_set_additional_data(idmef_heartbeat_t *ptr, idmef_additional_data_t *object, int pos); int idmef_heartbeat_new_additional_data(idmef_heartbeat_t *ptr, idmef_additional_data_t **ret, int pos); typedef enum { IDMEF_MESSAGE_TYPE_ERROR = -1, IDMEF_MESSAGE_TYPE_ALERT = 1, IDMEF_MESSAGE_TYPE_HEARTBEAT = 2 } idmef_message_type_t; idmef_message_type_t idmef_message_type_to_numeric(const char *name); const char *idmef_message_type_to_string(idmef_message_type_t val); /* * struct { * REFCOUNT; * * REQUIRED(prelude_string_t, *version); * * UNION(idmef_message_type_t, type) { * UNION_MEMBER(IDMEF_MESSAGE_TYPE_ALERT, idmef_alert_t, *alert); * UNION_MEMBER(IDMEF_MESSAGE_TYPE_HEARTBEAT, idmef_heartbeat_t, *heartbeat); * } message; * * HIDE(prelude_msg_t *, pmsg); * * } TYPE_ID(idmef_message_t, 49); */ typedef struct idmef_message idmef_message_t; int idmef_message_new(idmef_message_t **ret); int idmef_message_copy(const idmef_message_t *src, idmef_message_t *dst); int idmef_message_clone(idmef_message_t *src, idmef_message_t **dst); int idmef_message_compare(const idmef_message_t *obj1, const idmef_message_t *obj2); idmef_message_t *idmef_message_ref(idmef_message_t *message); #ifndef SWIG int _idmef_message_get_child(void *p, idmef_class_child_id_t child, void **childptr); int _idmef_message_new_child(void *p, idmef_class_child_id_t child, int n, void **ret); int _idmef_message_destroy_child(void *p, idmef_class_child_id_t child, int n); #endif void idmef_message_destroy(idmef_message_t *ptr); prelude_string_t *idmef_message_get_version(idmef_message_t *ptr); void idmef_message_set_version(idmef_message_t *ptr, prelude_string_t *version); int idmef_message_new_version(idmef_message_t *ptr, prelude_string_t **ret); idmef_message_type_t idmef_message_get_type(idmef_message_t *ptr); idmef_alert_t *idmef_message_get_alert(idmef_message_t *ptr); void idmef_message_set_alert(idmef_message_t *ptr, idmef_alert_t *alert); int idmef_message_new_alert(idmef_message_t *ptr, idmef_alert_t **ret); idmef_heartbeat_t *idmef_message_get_heartbeat(idmef_message_t *ptr); void idmef_message_set_heartbeat(idmef_message_t *ptr, idmef_heartbeat_t *heartbeat); int idmef_message_new_heartbeat(idmef_message_t *ptr, idmef_heartbeat_t **ret); void idmef_message_set_pmsg(idmef_message_t *message, prelude_msg_t *msg); prelude_msg_t *idmef_message_get_pmsg(idmef_message_t *message); #ifdef __cplusplus } #endif #define IDMEF_CLASS_ID_ADDITIONAL_DATA_TYPE 3 #define IDMEF_CLASS_ID_ADDITIONAL_DATA 4 #define IDMEF_CLASS_ID_REFERENCE_ORIGIN 5 #define IDMEF_CLASS_ID_REFERENCE 50 #define IDMEF_CLASS_ID_CLASSIFICATION 6 #define IDMEF_CLASS_ID_USER_ID_TYPE 7 #define IDMEF_CLASS_ID_USER_ID 8 #define IDMEF_CLASS_ID_USER_CATEGORY 9 #define IDMEF_CLASS_ID_USER 10 #define IDMEF_CLASS_ID_ADDRESS_CATEGORY 11 #define IDMEF_CLASS_ID_ADDRESS 12 #define IDMEF_CLASS_ID_PROCESS 13 #define IDMEF_CLASS_ID_WEB_SERVICE 14 #define IDMEF_CLASS_ID_SNMP_SERVICE 15 #define IDMEF_CLASS_ID_SERVICE_TYPE 16 #define IDMEF_CLASS_ID_SERVICE 17 #define IDMEF_CLASS_ID_NODE_CATEGORY 18 #define IDMEF_CLASS_ID_NODE 19 #define IDMEF_CLASS_ID_SOURCE_SPOOFED 20 #define IDMEF_CLASS_ID_SOURCE 21 #define IDMEF_CLASS_ID_FILE_ACCESS 22 #define IDMEF_CLASS_ID_INODE 23 #define IDMEF_CLASS_ID_CHECKSUM_ALGORITHM 53 #define IDMEF_CLASS_ID_CHECKSUM 52 #define IDMEF_CLASS_ID_FILE_CATEGORY 24 #define IDMEF_CLASS_ID_FILE_FSTYPE 25 #define IDMEF_CLASS_ID_FILE 26 #define IDMEF_CLASS_ID_LINKAGE_CATEGORY 27 #define IDMEF_CLASS_ID_LINKAGE 28 #define IDMEF_CLASS_ID_TARGET_DECOY 29 #define IDMEF_CLASS_ID_TARGET 30 #define IDMEF_CLASS_ID_ANALYZER 31 #define IDMEF_CLASS_ID_ALERTIDENT 32 #define IDMEF_CLASS_ID_IMPACT_SEVERITY 33 #define IDMEF_CLASS_ID_IMPACT_COMPLETION 34 #define IDMEF_CLASS_ID_IMPACT_TYPE 35 #define IDMEF_CLASS_ID_IMPACT 36 #define IDMEF_CLASS_ID_ACTION_CATEGORY 37 #define IDMEF_CLASS_ID_ACTION 38 #define IDMEF_CLASS_ID_CONFIDENCE_RATING 39 #define IDMEF_CLASS_ID_CONFIDENCE 40 #define IDMEF_CLASS_ID_ASSESSMENT 41 #define IDMEF_CLASS_ID_TOOL_ALERT 42 #define IDMEF_CLASS_ID_CORRELATION_ALERT 43 #define IDMEF_CLASS_ID_OVERFLOW_ALERT 44 #define IDMEF_CLASS_ID_ALERT_TYPE 45 #define IDMEF_CLASS_ID_ALERT 46 #define IDMEF_CLASS_ID_HEARTBEAT 47 #define IDMEF_CLASS_ID_MESSAGE_TYPE 48 #define IDMEF_CLASS_ID_MESSAGE 49 #endif /* _LIBPRELUDE_IDMEF_TREE_WRAP */ libprelude-1.0.0/src/include/prelude.h0000664000076400007640000000372611347714623014635 00000000000000/***** * * Copyright (C) 2004, 2005 PreludeIDS Technologies. All Rights Reserved. * Author: Yoann Vandoorselaere * * This file is part of the Prelude library. * * 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; see the file COPYING. If not, write to * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. * *****/ #ifndef _LIBPRELUDE_PRELUDE_H #define _LIBPRELUDE_PRELUDE_H /* * LIBPRELUDE_VERSION: * Version of libprelude this header come from. * * This is mostly used by the libprelude detection routine in libprelude.m4 * to make sure that the header version is consistant with the linked library. */ #define LIBPRELUDE_VERSION "1.0.0" #include "prelude-inttypes.h" #include "common.h" #include "prelude-client.h" #include "prelude-connection.h" #include "prelude-connection-pool.h" #include "prelude-error.h" #include "prelude-io.h" #include "prelude-option.h" #include "prelude-async.h" #include "prelude-error.h" #include "prelude-plugin.h" #include "prelude-msg.h" #include "prelude-msgbuf.h" #include "prelude-timer.h" #include "idmef.h" #ifdef __cplusplus extern "C" { #endif int prelude_init(int *argc, char **argv); void prelude_deinit(void); const char *prelude_check_version(const char *req_version); int prelude_thread_init(void *future_use); void prelude_fork_prepare(void); void prelude_fork_parent(void); void prelude_fork_child(void); #ifdef __cplusplus } #endif #endif /* _LIBPRELUDE_PRELUDE_H */ libprelude-1.0.0/src/include/idmef-path.h0000664000076400007640000000742411345707014015204 00000000000000/***** * * * Copyright (C) 2002, 2003, 2004, 2005 PreludeIDS Technologies. All Rights Reserved. * Author: Yoann Vandoorselaere * Author: Krzysztof Zaraska * * This file is part of the Prelude library. * * 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; see the file COPYING. If not, write to * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. * *****/ #ifndef _LIBPRELUDE_IDMEF_PATH_H #define _LIBPRELUDE_IDMEF_PATH_H #ifdef __cplusplus extern "C" { #endif #ifndef __attribute__ /* This feature is available in gcc versions 2.5 and later. */ # if __GNUC__ < 2 || (__GNUC__ == 2 && __GNUC_MINOR__ < 5) || __STRICT_ANSI__ # define __attribute__(Spec) /* empty */ # endif /* The __-protected variants of `format' and `printf' attributes are accepted by gcc versions 2.6.4 (effectively 2.7) and later. */ # if __GNUC__ < 2 || (__GNUC__ == 2 && __GNUC_MINOR__ < 7) # define __format__ format # define __printf__ printf # endif #endif #ifdef HAVE_CONFIG_H # include "config.h" #endif typedef struct idmef_path idmef_path_t; #include #include "idmef-value.h" #include "idmef-tree-wrap.h" int idmef_path_get(const idmef_path_t *path, idmef_message_t *message, idmef_value_t **ret); int idmef_path_set(const idmef_path_t *path, idmef_message_t *message, idmef_value_t *value); int idmef_path_new(idmef_path_t **path, const char *format, ...) __attribute__ ((__format__ (__printf__, 2, 3))); int idmef_path_new_v(idmef_path_t **path, const char *format, va_list args) __attribute__ ((__format__ (__printf__, 2, 0))); int idmef_path_new_fast(idmef_path_t **path, const char *buffer); idmef_class_id_t idmef_path_get_class(const idmef_path_t *path, int depth); idmef_value_type_id_t idmef_path_get_value_type(const idmef_path_t *path, int depth); int idmef_path_set_index(idmef_path_t *path, unsigned int depth, int index); int idmef_path_undefine_index(idmef_path_t *path, unsigned int depth); int idmef_path_get_index(const idmef_path_t *path, unsigned int depth); int idmef_path_make_child(idmef_path_t *path, const char *child_name, int index); int idmef_path_make_parent(idmef_path_t *path); void idmef_path_destroy(idmef_path_t *path); int idmef_path_ncompare(const idmef_path_t *p1, const idmef_path_t *p2, unsigned int depth); int idmef_path_compare(const idmef_path_t *p1, const idmef_path_t *p2); int idmef_path_clone(const idmef_path_t *src, idmef_path_t **dst); idmef_path_t *idmef_path_ref(idmef_path_t *path); const char *idmef_path_get_name(const idmef_path_t *path, int depth); prelude_bool_t idmef_path_is_ambiguous(const idmef_path_t *path); int idmef_path_has_lists(const idmef_path_t *path); prelude_bool_t idmef_path_is_list(const idmef_path_t *path, int depth); unsigned int idmef_path_get_depth(const idmef_path_t *path); int idmef_path_check_operator(const idmef_path_t *path, idmef_criterion_operator_t op); int idmef_path_get_applicable_operators(const idmef_path_t *path, idmef_criterion_operator_t *result); #ifndef SWIG void _idmef_path_cache_lock(void); void _idmef_path_cache_reinit(void); void _idmef_path_cache_unlock(void); void _idmef_path_cache_destroy(void); #endif #ifdef __cplusplus } #endif #endif /* _LIBPRELUDE_IDMEF_PATH_H */ libprelude-1.0.0/src/include/idmef-value.h0000664000076400007640000001520011204543304015345 00000000000000/***** * * Copyright (C) 2002-2006,2007,2008 PreludeIDS Technologies. All Rights Reserved. * Author: Nicolas Delon * Author: Krzysztof Zaraska * Author: Yoann Vandoorselaere * * This file is part of the Prelude library. * * 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; see the file COPYING. If not, write to * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. * *****/ #ifndef _LIBPRELUDE_IDMEF_VALUE_H #define _LIBPRELUDE_IDMEF_VALUE_H typedef struct idmef_value idmef_value_t; #include "prelude-io.h" #include "idmef-value-type.h" #include "prelude-string.h" #include "idmef-class.h" #include "idmef-path.h" #ifdef __cplusplus extern "C" { #endif int idmef_value_new_int8(idmef_value_t **value, int8_t val); int idmef_value_new_uint8(idmef_value_t **value, uint8_t val); int idmef_value_new_int16(idmef_value_t **value, int16_t val); int idmef_value_new_uint16(idmef_value_t **value, uint16_t val); int idmef_value_new_int32(idmef_value_t **value, int32_t val); int idmef_value_new_uint32(idmef_value_t **value, uint32_t val); int idmef_value_new_int64(idmef_value_t **value, int64_t val); int idmef_value_new_uint64(idmef_value_t **value, uint64_t val); int idmef_value_new_float(idmef_value_t **value, float val); int idmef_value_new_double(idmef_value_t **value, double val); int idmef_value_new_string(idmef_value_t **value, prelude_string_t *string); int idmef_value_new_time(idmef_value_t **value, idmef_time_t *time); int idmef_value_new_data(idmef_value_t **value, idmef_data_t *data); int idmef_value_new_class(idmef_value_t **value, idmef_class_id_t classid, void *ptr); int idmef_value_new_list(idmef_value_t **value); int idmef_value_new_enum(idmef_value_t **value, idmef_class_id_t classid, const char *buf); int idmef_value_new_enum_from_string(idmef_value_t **value, idmef_class_id_t classid, const char *buf); int idmef_value_new_enum_from_numeric(idmef_value_t **value, idmef_class_id_t classid, int val); int idmef_value_set_int8(idmef_value_t *value, int8_t val); int idmef_value_set_uint8(idmef_value_t *value, uint8_t val); int idmef_value_set_int16(idmef_value_t *value, int16_t val); int idmef_value_set_uint16(idmef_value_t *value, uint16_t val); int idmef_value_set_int32(idmef_value_t *value, int32_t val); int idmef_value_set_uint32(idmef_value_t *value, uint32_t val); int idmef_value_set_int64(idmef_value_t *value, int64_t val); int idmef_value_set_uint64(idmef_value_t *value, uint64_t val); int idmef_value_set_float(idmef_value_t *value, float val); int idmef_value_set_double(idmef_value_t *value, double val); int idmef_value_set_string(idmef_value_t *value, prelude_string_t *string); int idmef_value_set_time(idmef_value_t *value, idmef_time_t *time); int idmef_value_set_data(idmef_value_t *value, idmef_data_t *data); int idmef_value_set_enum(idmef_value_t *value, idmef_class_id_t classid, const char *buf); int idmef_value_set_enum_from_string(idmef_value_t *value, idmef_class_id_t classid, const char *buf); int idmef_value_set_enum_from_numeric(idmef_value_t *value, idmef_class_id_t classid, int no); int idmef_value_set_class(idmef_value_t *value, idmef_class_id_t classid, void *ptr); int idmef_value_new(idmef_value_t **value, idmef_value_type_id_t type, void *ptr); int idmef_value_new_from_path(idmef_value_t **value, idmef_path_t *path, const char *buf); int idmef_value_new_from_string(idmef_value_t **value, idmef_value_type_id_t type, const char *buf); int8_t idmef_value_get_int8(const idmef_value_t *val); uint8_t idmef_value_get_uint8(const idmef_value_t *val); int16_t idmef_value_get_int16(const idmef_value_t *val); uint16_t idmef_value_get_uint16(const idmef_value_t *val); int32_t idmef_value_get_int32(const idmef_value_t *val); uint32_t idmef_value_get_uint32(const idmef_value_t *val); int64_t idmef_value_get_int64(const idmef_value_t *val); uint64_t idmef_value_get_uint64(const idmef_value_t *val); int idmef_value_get_enum(const idmef_value_t *val); float idmef_value_get_float(const idmef_value_t *val); double idmef_value_get_double(const idmef_value_t *val); idmef_time_t *idmef_value_get_time(const idmef_value_t *val); idmef_data_t *idmef_value_get_data(const idmef_value_t *val); prelude_string_t *idmef_value_get_string(const idmef_value_t *val); int idmef_value_list_add(idmef_value_t *list, idmef_value_t *item); prelude_bool_t idmef_value_is_list(const idmef_value_t *list); prelude_bool_t idmef_value_list_is_empty(const idmef_value_t *list); int idmef_value_have_own_data(idmef_value_t *value); int idmef_value_dont_have_own_data(idmef_value_t *value); idmef_value_type_id_t idmef_value_get_type(const idmef_value_t *value); idmef_class_id_t idmef_value_get_class(const idmef_value_t *value); void *idmef_value_get_object(const idmef_value_t *value); int idmef_value_iterate(const idmef_value_t *value, int (*callback)(idmef_value_t *ptr, void *extra), void *extra); int idmef_value_iterate_reversed(const idmef_value_t *value, int (*callback)(idmef_value_t *ptr, void *extra), void *extra); idmef_value_t *idmef_value_get_nth(const idmef_value_t *val, int n); int idmef_value_get_count(const idmef_value_t *val); int idmef_value_clone(const idmef_value_t *val, idmef_value_t **dst); idmef_value_t *idmef_value_ref(idmef_value_t *val); int idmef_value_print(const idmef_value_t *val, prelude_io_t *fd); int idmef_value_to_string(const idmef_value_t *val, prelude_string_t *out); int idmef_value_get(const idmef_value_t *val, void *res); int idmef_value_match(idmef_value_t *val1, idmef_value_t *val2, idmef_criterion_operator_t op); int idmef_value_check_operator(const idmef_value_t *value, idmef_criterion_operator_t op); int idmef_value_get_applicable_operators(const idmef_value_t *value, idmef_criterion_operator_t *result); void idmef_value_destroy(idmef_value_t *val); #ifndef SWIG int _idmef_value_copy_internal(const idmef_value_t *val, idmef_value_type_id_t res_type, idmef_class_id_t res_id, void *res); int _idmef_value_cast(idmef_value_t *val, idmef_value_type_id_t target_type, idmef_class_id_t enum_class); #endif #ifdef __cplusplus } #endif #endif /* _LIBPRELUDE_IDMEF_VALUE_H */ libprelude-1.0.0/src/include/ntp.h0000664000076400007640000001030511202225026013745 00000000000000/********************************************************************** * Copyright (c) David L. Mills 1992-2001 * * * * Permission to use, copy, modify, and distribute this software and * * its documentation for any purpose and without fee is hereby * * granted, provided that the above copyright notice appears in all * * copies and that both the copyright notice and this permission * * notice appear in supporting documentation, and that the name * * University of Delaware not be used in advertising or publicity * * pertaining to distribution of the software without specific, * * written prior permission. The University of Delaware makes no * * representations about the suitability this software for any * * purpose. It is provided "as is" without express or implied * * warranty. * * * ***********************************************************************/ #ifndef _LIBPRELUDE_NTP_H #define _LIBPRELUDE_NTP_H #define TS_MASK 0xfffff000 /* mask to usec, for time stamps */ #define TS_ROUNDBIT 0x00000800 /* round at this bit */ #define JAN_1970 0x83aa7e80 /* 2208988800 1970 - 1900 in seconds */ typedef int32_t s_fp; typedef struct { union { uint32_t Xl_ui; int32_t Xl_i; } Ul_i; union { uint32_t Xl_uf; int32_t Xl_f; } Ul_f; } l_fp; #define l_ui Ul_i.Xl_ui /* unsigned integral part */ #define l_i Ul_i.Xl_i /* signed integral part */ #define l_uf Ul_f.Xl_uf /* unsigned fractional part */ #define l_f Ul_f.Xl_f /* signed fractional part */ extern const unsigned long ustotslo[]; extern const unsigned long ustotsmid[]; extern const unsigned long ustotshi[]; #define M_NEG(v_i, v_f) /* v = -v */ \ do { \ if ((v_f) == 0) \ (v_i) = -((s_fp)(v_i)); \ else { \ (v_f) = -((s_fp)(v_f)); \ (v_i) = ~(v_i); \ } \ } while(0) #define L_NEG(v) M_NEG((v)->l_ui, (v)->l_uf) #define TVUTOTSF(tvu, tsf) \ (tsf) = ustotslo[(tvu) & 0xff] \ + ustotsmid[((tvu) >> 8) & 0xff] \ + ustotshi[((tvu) >> 16) & 0xf] #define sTVTOTS(tv, ts) \ do { \ int isneg = 0; \ long usec; \ (ts)->l_ui = (tv)->tv_sec; \ usec = (tv)->tv_usec; \ if (((tv)->tv_sec < 0) || ((tv)->tv_usec < 0)) { \ usec = -usec; \ (ts)->l_ui = -(ts)->l_ui; \ isneg = 1; \ } \ TVUTOTSF(usec, (ts)->l_uf); \ if (isneg) { \ L_NEG((ts)); \ } \ } while(0) /* Taken from /usr/src/contrib/ntp/include/ntp_unixtime.h, FreeBSD 5.1-RELEASE */ /* * TV_SHIFT is used to turn the table result into a usec value. To round, * add in TV_ROUNDBIT before shifting */ #define TV_SHIFT 3 #define TV_ROUNDBIT 0x4 /* * Convert a time stamp fraction to microseconds. The time stamp * fraction is assumed to be unsigned. To use this in a program, declare: */ extern const long tstouslo[]; extern const long tstousmid[]; extern const long tstoushi[]; #define TSFTOTVU(tsf, tvu) \ (tvu) = (tstoushi[((tsf) >> 24) & 0xff] \ + tstousmid[((tsf) >> 16) & 0xff] \ + tstouslo[((tsf) >> 9) & 0x7f] \ + TV_ROUNDBIT) >> TV_SHIFT /* * Convert a time stamp to a struct timeval. The time stamp * has to be positive. */ #define TSTOTV(ts, tv) \ do { \ (tv)->tv_sec = (ts)->l_ui; \ TSFTOTVU((ts)->l_uf, (tv)->tv_usec); \ if ((tv)->tv_usec == 1000000) { \ (tv)->tv_sec++; \ (tv)->tv_usec = 0; \ } \ } while (0) #endif /* _LIBPRELUDE_NTP_H */ libprelude-1.0.0/src/include/prelude-msg.h0000664000076400007640000000566611202225026015406 00000000000000/***** * * Copyright (C) 2001, 2002, 2003, 2004, 2005 PreludeIDS Technologies. All Rights Reserved. * Author: Yoann Vandoorselaere * * This file is part of the Prelude library. * * 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; see the file COPYING. If not, write to * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. * *****/ #ifndef _LIBPRELUDE_PRELUDE_MESSAGE_H #define _LIBPRELUDE_PRELUDE_MESSAGE_H #include "prelude-io.h" #ifdef __cplusplus extern "C" { #endif typedef struct prelude_msg prelude_msg_t; typedef enum { PRELUDE_MSG_PRIORITY_NONE = 0, PRELUDE_MSG_PRIORITY_LOW = 1, PRELUDE_MSG_PRIORITY_MID = 2, PRELUDE_MSG_PRIORITY_HIGH = 3 } prelude_msg_priority_t; int prelude_msg_read(prelude_msg_t **msg, prelude_io_t *pio); int prelude_msg_forward(prelude_msg_t *msg, prelude_io_t *dst, prelude_io_t *src); int prelude_msg_get(prelude_msg_t *msg, uint8_t *tag, uint32_t *len, void **buf); /* * Write function. */ void prelude_msg_recycle(prelude_msg_t *msg); void prelude_msg_mark_end(prelude_msg_t *msg); int prelude_msg_dynamic_new(prelude_msg_t **ret, int (*flush_msg_cb)(prelude_msg_t **msg, void *data), void *data); int prelude_msg_new(prelude_msg_t **ret, size_t msgcount, size_t msglen, uint8_t tag, prelude_msg_priority_t priority); int prelude_msg_set(prelude_msg_t *msg, uint8_t tag, uint32_t len, const void *data); int prelude_msg_write(prelude_msg_t *msg, prelude_io_t *dst); /* * */ void prelude_msg_set_tag(prelude_msg_t *msg, uint8_t tag); void prelude_msg_set_priority(prelude_msg_t *msg, prelude_msg_priority_t priority); uint8_t prelude_msg_get_tag(prelude_msg_t *msg); prelude_msg_priority_t prelude_msg_get_priority(prelude_msg_t *msg); uint32_t prelude_msg_get_len(prelude_msg_t *msg); uint32_t prelude_msg_get_datalen(prelude_msg_t *msg); const unsigned char *prelude_msg_get_message_data(prelude_msg_t *msg); struct timeval *prelude_msg_get_time(prelude_msg_t *msg, struct timeval *tv); int prelude_msg_is_empty(prelude_msg_t *msg); int prelude_msg_is_fragment(prelude_msg_t *msg); void prelude_msg_destroy(prelude_msg_t *msg); void prelude_msg_set_callback(prelude_msg_t *msg, int (*flush_msg_cb)(prelude_msg_t **msg, void *data)); void prelude_msg_set_data(prelude_msg_t *msg, void *data); prelude_msg_t *prelude_msg_ref(prelude_msg_t *msg); #ifdef __cplusplus } #endif #endif /* _LIBPRELUDE_PRELUDE_MESSAGE_H */ libprelude-1.0.0/src/include/idmef.h0000664000076400007640000000301511345707014014242 00000000000000/***** * * Copyright (C) 2003, 2004, 2005 PreludeIDS Technologies. All Rights Reserved. * Author: Yoann Vandoorselaere * Author: Krzysztof Zaraska * * This file is part of the Prelude library. * * 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; see the file COPYING. If not, write to * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. * *****/ #ifndef _LIBPRELUDE_IDMEF_H #define _LIBPRELUDE_IDMEF_H #ifdef HAVE_CONFIG_H # include "config.h" #endif #include #include "prelude-inttypes.h" #include "prelude-list.h" #include "prelude-string.h" #include "idmef-time.h" #include "idmef-data.h" #include "idmef-class.h" #include "idmef-value.h" #include "idmef-tree-wrap.h" #include "idmef-path.h" #include "idmef-criterion-value.h" #include "idmef-criteria.h" #include "idmef-message-helpers.h" #include "idmef-message-read.h" #include "idmef-message-write.h" #include "idmef-additional-data.h" #endif /* _LIBPRELUDE_IDMEF_H */ libprelude-1.0.0/src/include/prelude-list.h0000664000076400007640000002234511345707014015576 00000000000000/***** * * Copyright (C) 2005 PreludeIDS Technologies. All Rights Reserved. * Author: Yoann Vandoorselaere * * This file is part of the Prelude library. * * 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; see the file COPYING. If not, write to * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. * *****/ /* * This is a blind rewrite of the kernel linked list handling code, * done so that we can dual-license libprelude. The code still look * pretty similar, but there is no way to write such list implementation * in many different manner. */ #ifndef HAVE_LIBPRELUDE_PRELUDE_LIST_H #define HAVE_LIBPRELUDE_PRELUDE_LIST_H #ifdef HAVE_CONFIG_H # include "config.h" #endif #include "prelude-inttypes.h" #ifdef __cplusplus extern "C" { #endif #define PRELUDE_LIST(item) prelude_list_t (item) = { &(item), &(item) } typedef struct prelude_list { struct prelude_list *next; struct prelude_list *prev; } prelude_list_t; static inline void __prelude_list_add(prelude_list_t *item, prelude_list_t *prev, prelude_list_t *next) { prev->next = item; item->prev = prev; item->next = next; next->prev = item; } /** * prelude_list_init: * @item: Pointer to a #prelude_list_t object. * * Initialize @item. Note that this is only required if @item * is the head of a list, but might also be useful in case you * want to use prelude_list_del_init(). */ static inline void prelude_list_init(prelude_list_t *item) { item->next = item->prev = item; } /** * prelude_list_is_empty: * @item: Pointer to a #prelude_list_t object. * * Check whether @item is empty or not. * * Returns: TRUE if @item is empty, FALSE otherwise. */ static inline prelude_bool_t prelude_list_is_empty(prelude_list_t *item) { return (item->next == item) ? PRELUDE_BOOL_TRUE : PRELUDE_BOOL_FALSE; } /** * prelude_list_add: * @head: Pointer to a #prelude_list_t list. * @item: Pointer to a #prelude_list_t object to add to @head. * * Add @item at the beginning of @head list. */ static inline void prelude_list_add(prelude_list_t *head, prelude_list_t *item) { __prelude_list_add(item, head, head->next); } /** * prelude_list_add_tail: * @head: Pointer to a #prelude_list_t list. * @item: Pointer to a #prelude_list_t object to add to @head. * * Add @item at the tail of @head list. */ static inline void prelude_list_add_tail(prelude_list_t *head, prelude_list_t *item) { __prelude_list_add(item, head->prev, head); } /** * prelude_list_del: * @item: Pointer to a #prelude_list_t object. * * Delete @item from the list it is linked in. */ static inline void prelude_list_del(prelude_list_t *item) { item->prev->next = item->next; item->next->prev = item->prev; } /** * prelude_list_del_init: * @item: Pointer to a #prelude_list_t object. * * Delete @item from the list it is linked in, and reinitialize * @item member so that the list can be considered as empty. */ static inline void prelude_list_del_init(prelude_list_t *item) { item->prev->next = item->next; item->next->prev = item->prev; prelude_list_init(item); } /** * prelude_list_entry: * @item: Pointer to a #prelude_list_t object to retrieve the entry from. * @type: Type of the entry to retrieve. * @member: List member in @type used to link it to a list. * * Retrieve the entry of type @type from the #prelude_list_t object @tmp, * using the item list member @member. Returns the entry associated with @item. */ #define prelude_list_entry(item, type, member) \ (type *) ((unsigned long) item - (unsigned long) &((type *) 0)->member) /** * prelude_list_for_each: * @list: Pointer to a #prelude_list_t list. * @pos: Pointer to a #prelude_list_t object pointing to the current list member. * * Iterate through all @list entry. prelude_list_entry() can be used to retrieve * and entry from the @pos pointer. It is not safe to call prelude_list_del() while * iterating using this function, see prelude_list_for_each_safe(). */ #define prelude_list_for_each(list, pos) \ for ( (pos) = (list)->next; (pos) != (list); (pos) = (pos)->next ) /** * prelude_list_for_each_safe: * @list: Pointer to a #prelude_list_t list. * @pos: Pointer to a #prelude_list_t object pointing to the current list member. * @bkp: Pointer to a #prelude_list_t object pointing to the next list member. * * Iterate through all @list entry. prelude_list_entry() can be used to retrieve * and entry from the @pos pointer. Calling prelude_list_del() while iterating the * list is safe. */ #define prelude_list_for_each_safe(list, pos, bkp) \ for ( (pos) = (list)->next, (bkp) = (pos)->next; (pos) != (list); (pos) = (bkp), (bkp) = (pos)->next ) /** * prelude_list_for_each_reversed: * @list: Pointer to a #prelude_list_t list. * @pos: Pointer to a #prelude_list_t object pointing to the current list member. * * Iterate through all @list entry in reverse order. prelude_list_entry() can be * used to retrieve and entry from the @pos pointer. It is not safe to call * prelude_list_del() while iterating using this function, see * prelude_list_for_each_reversed_safe(). */ #define prelude_list_for_each_reversed(list, pos) \ for ( (pos) = (list)->prev; (pos) != (list); (pos) = (pos)->prev ) /** * prelude_list_for_each_reversed_safe: * @list: Pointer to a #prelude_list_t list. * @pos: Pointer to a #prelude_list_t object pointing to the current list member. * @bkp: Pointer to a #prelude_list_t object pointing to the next list member. * * Iterate through all @list entry in reverse order. prelude_list_entry() can be used to retrieve * and entry from the @pos pointer. Calling prelude_list_del() while iterating the * list is safe. */ #define prelude_list_for_each_reversed_safe(list, pos, bkp) \ for ( (pos) = (list)->prev, (bkp) = (pos)->prev; (pos) != (list); (pos) = (bkp), (bkp) = (pos)->prev ) /** * prelude_list_for_each_continue: * @list: Pointer to a #prelude_list_t list. * @pos: Pointer to a #prelude_list_t object pointing to the current list member. * * Iterate through all @list entry starting from @pos if it is not NULL, or from * the start of @list if it is. prelude_list_entry() can be used to retrieve * and entry from the @pos pointer. Calling prelude_list_del() while iterating the * list is not safe. */ #define prelude_list_for_each_continue(list, pos) \ for ( (pos) = ((pos) == NULL) ? (list)->next : (pos)->next; (pos) != (list); (pos) = (pos)->next ) /** * prelude_list_for_each_continue_safe: * @list: Pointer to a #prelude_list_t list. * @pos: Pointer to a #prelude_list_t object pointing to the current list member. * @bkp: Pointer to a #prelude_list_t object pointing to the next list member. * * Iterate through all @list entry starting from @pos if it is not NULL, or from * the start of @list if it is. prelude_list_entry() can be used to retrieve * and entry from the @pos pointer. Calling prelude_list_del() while iterating the * list is safe. */ #define prelude_list_for_each_continue_safe(list, pos, bkp) \ for ( (pos) = ((bkp) == NULL) ? (list)->next : (bkp); (bkp) = (pos)->next, (pos) != (list); (pos) = (bkp) ) #define prelude_list_get_next(list, pos, class, member) \ pos ? \ ((pos)->member.next == (list)) ? NULL : \ prelude_list_entry((pos)->member.next, class, member) \ : \ ((list)->next == (list)) ? NULL : \ prelude_list_entry((list)->next, class, member) #define prelude_list_get_next_safe(list, pos, bkp, class, member) \ pos ? \ (((pos) = bkp), \ ((bkp) = (! (bkp) || (bkp)->member.next == list) ? NULL : prelude_list_entry((pos)->member.next, class, member)), \ (pos)) \ : \ (((pos) = ((list)->next == list) ? NULL : prelude_list_entry((list)->next, class, member)), \ ((bkp) = (! (pos) ||(pos)->member.next == list ) ? NULL : prelude_list_entry((pos)->member.next, class, member)), \ (pos)) #ifdef __cplusplus } #endif #endif libprelude-1.0.0/src/include/idmef-class.h0000664000076400007640000000515411202225026015341 00000000000000/***** * * Copyright (C) 2002, 2003, 2004 Krzysztof Zaraska * All Rights Reserved * * This file is part of the Prelude library. * * 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; see the file COPYING. If not, write to * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. * *****/ #ifndef _LIBPRELUDE_IDMEF_CLASS_H #define _LIBPRELUDE_IDMEF_CLASS_H #ifdef __cplusplus extern "C" { #endif typedef int idmef_class_id_t; typedef int idmef_class_child_id_t; #include "idmef-value.h" /* * */ prelude_bool_t idmef_class_is_child_list(idmef_class_id_t classid, idmef_class_child_id_t child); idmef_class_id_t idmef_class_get_child_class(idmef_class_id_t classid, idmef_class_child_id_t child); idmef_value_type_id_t idmef_class_get_child_value_type(idmef_class_id_t classid, idmef_class_child_id_t child); /* * */ int idmef_class_enum_to_numeric(idmef_class_id_t classid, const char *val); const char *idmef_class_enum_to_string(idmef_class_id_t classid, int val); /* * */ int idmef_class_get_child(void *ptr, idmef_class_id_t classid, idmef_class_child_id_t child, void **childptr); int idmef_class_new_child(void *ptr, idmef_class_id_t classid, idmef_class_child_id_t child, int n, void **childptr); int idmef_class_destroy_child(void *ptr, idmef_class_id_t classid, idmef_class_child_id_t child, int n); /* * */ idmef_class_id_t idmef_class_find(const char *name); idmef_class_child_id_t idmef_class_find_child(idmef_class_id_t classid, const char *name); /* * */ const char *idmef_class_get_name(idmef_class_id_t classid); const char *idmef_class_get_child_name(idmef_class_id_t classid, idmef_class_child_id_t child); /* * */ int idmef_class_copy(idmef_class_id_t classid, const void *src, void *dst); int idmef_class_clone(idmef_class_id_t classid, const void *src, void **dst); int idmef_class_compare(idmef_class_id_t classid, const void *c1, const void *c2); int idmef_class_ref(idmef_class_id_t classid, void *obj); int idmef_class_destroy(idmef_class_id_t classid, void *obj); #ifdef __cplusplus } #endif #endif /* _LIBPRELUDE_IDMEF_CLASS_H */ libprelude-1.0.0/src/include/prelude-plugin.h0000664000076400007640000002047711345707014016125 00000000000000/***** * * Copyright (C) 2001, 2002, 2003, 2004, 2005 PreludeIDS Technologies. All Rights Reserved. * Author: Yoann Vandoorselaere * * This file is part of the Prelude library. * * 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; see the file COPYING. If not, write to * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. * *****/ #ifndef _LIBPRELUDE_PLUGIN_H #define _LIBPRELUDE_PLUGIN_H #ifdef HAVE_CONFIG_H # include "config.h" #endif #include "prelude-list.h" #include "prelude-option.h" #ifdef __cplusplus extern "C" { #endif #define PRELUDE_PLUGIN_API_VERSION 1 typedef struct prelude_plugin_entry prelude_plugin_entry_t; typedef struct prelude_plugin_instance prelude_plugin_instance_t; #define PRELUDE_PLUGIN_GENERIC \ prelude_plugin_entry_t *_pe; \ char *name; \ void (*destroy)(prelude_plugin_instance_t *pi, prelude_string_t *err) typedef struct { PRELUDE_PLUGIN_GENERIC; } prelude_plugin_generic_t; /* * Hack for plugin preloading, * without having the end program depend on ltdl. */ #ifdef PRELUDE_APPLICATION_USE_LIBTOOL2 # define lt_preloaded_symbols lt__PROGRAM__LTX_preloaded_symbols #endif extern const void *lt_preloaded_symbols[]; #define PRELUDE_PLUGIN_SET_PRELOADED_SYMBOLS() \ prelude_plugin_set_preloaded_symbols(lt_preloaded_symbols) #define PRELUDE_PLUGIN_OPTION_DECLARE_STRING_CB(prefix, type, name) \ static int prefix ## _set_ ## name(prelude_option_t *opt, const char *optarg, prelude_string_t *err, void *context) \ { \ char *dup = NULL; \ type *ptr = prelude_plugin_instance_get_plugin_data(context); \ \ if ( optarg ) { \ dup = strdup(optarg); \ if ( ! dup ) \ return prelude_error_from_errno(errno); \ } \ \ if ( ptr->name ) \ free(ptr->name); \ \ ptr->name = dup; \ \ return 0; \ } \ \ \ static int prefix ## _get_ ## name(prelude_option_t *opt, prelude_string_t *out, void *context) \ { \ type *ptr = prelude_plugin_instance_get_plugin_data(context); \ if ( ptr->name ) \ prelude_string_cat(out, ptr->name); \ \ return 0; \ } /* * */ #define prelude_plugin_get_name(p) (p)->name #define prelude_plugin_set_name(p, str) (p)->name = (str) #define prelude_plugin_set_destroy_func(p, func) (p)->destroy = func /* * Plugin need to call this function in order to get registered. */ void prelude_plugin_entry_set_plugin(prelude_plugin_entry_t *pe, prelude_plugin_generic_t *pl); int prelude_plugin_set_activation_option(prelude_plugin_entry_t *pe, prelude_option_t *opt, int (*commit)(prelude_plugin_instance_t *pi, prelude_string_t *err)); int prelude_plugin_instance_subscribe(prelude_plugin_instance_t *pi); int prelude_plugin_instance_unsubscribe(prelude_plugin_instance_t *pi); int prelude_plugin_new_instance(prelude_plugin_instance_t **pi, prelude_plugin_generic_t *plugin, const char *name, void *data); /* * */ prelude_plugin_generic_t *prelude_plugin_search_by_name(prelude_list_t *head, const char *name); prelude_plugin_instance_t *prelude_plugin_search_instance_by_name(prelude_list_t *head, const char *pname, const char *iname); void prelude_plugin_instance_set_data(prelude_plugin_instance_t *pi, void *data); void *prelude_plugin_instance_get_data(prelude_plugin_instance_t *pi); void prelude_plugin_instance_set_plugin_data(prelude_plugin_instance_t *pi, void *data); void *prelude_plugin_instance_get_plugin_data(prelude_plugin_instance_t *pi); const char *prelude_plugin_instance_get_name(prelude_plugin_instance_t *pi); prelude_plugin_generic_t *prelude_plugin_instance_get_plugin(prelude_plugin_instance_t *pi); /* * Load all plugins in directory 'dirname'. * The CB arguments will be called for each plugin that register * (using the plugin_register function), then the application will * have the ability to use plugin_register_for_use to tell it want * to use this plugin. */ int prelude_plugin_load_from_dir(prelude_list_t *head, const char *dirname, const char *symbol, void *ptr, int (*subscribe)(prelude_plugin_instance_t *p), void (*unsubscribe)(prelude_plugin_instance_t *pi)); /* * Call this if you want to use this plugin. */ int prelude_plugin_instance_add(prelude_plugin_instance_t *pi, prelude_list_t *h); void prelude_plugin_instance_del(prelude_plugin_instance_t *pi); void prelude_plugin_instance_compute_time(prelude_plugin_instance_t *pi, struct timeval *start, struct timeval *end); int prelude_plugin_instance_call_commit_func(prelude_plugin_instance_t *pi, prelude_string_t *err); prelude_bool_t prelude_plugin_instance_has_commit_func(prelude_plugin_instance_t *pi); void prelude_plugin_set_preloaded_symbols(void *symlist); prelude_plugin_generic_t *prelude_plugin_get_next(prelude_list_t *head, prelude_list_t **iter); void prelude_plugin_unload(prelude_plugin_generic_t *plugin); /* * */ #define prelude_plugin_compute_stats(pi, func) do { \ struct timeval start, end; \ gettimeofday(&start, NULL); \ (func); \ gettimeofday(&end, NULL); \ prelude_plugin_instance_compute_time(&start, &end); \ } while(0) /* * Macro used to start a plugin. */ #define prelude_plugin_run(pi, type, member, ...) \ (((type *)prelude_plugin_instance_get_plugin(pi))->member(__VA_ARGS__)) #ifdef __cplusplus } #endif #endif /* _LIBPRELUDE_PLUGIN_H */ libprelude-1.0.0/src/include/prelude-option-wide.h0000664000076400007640000000316011202225026017041 00000000000000/***** * * Copyright (C) 2004, 2005 PreludeIDS Technologies. All Rights Reserved. * Author: Yoann Vandoorselaere * * This file is part of the Prelude library. * * 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; see the file COPYING. If not, write to * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. * *****/ #ifndef _LIBPRELUDE_PRELUDE_GETOPT_WIDE_H #define _LIBPRELUDE_PRELUDE_GETOPT_WIDE_H #define PRELUDE_OPTION_REPLY_TYPE_SET 0x01 #define PRELUDE_OPTION_REPLY_TYPE_GET 0x02 #define PRELUDE_OPTION_REPLY_TYPE_LIST 0x04 #define PRELUDE_OPTION_REPLY_TYPE_ERROR 0x08 int prelude_option_push_request(prelude_msgbuf_t *msg, int type, const char *request); int prelude_option_new_request(prelude_msgbuf_t *msgbuf, uint32_t request_id, uint64_t *target_id, size_t size); int prelude_option_process_request(prelude_client_t *client, prelude_msg_t *msg, prelude_msgbuf_t *reply); int prelude_option_recv_reply(prelude_msg_t *msg, uint64_t *source_id, uint32_t *request_id, void **value); #endif /* _LIBPRELUDE_PRELUDE_GETOPT_WIDE_H */ libprelude-1.0.0/src/include/prelude-linked-object.h0000664000076400007640000000427011202225026017320 00000000000000/***** * * Copyright (C) 2001, 2002, 2003, 2004, 2005 PreludeIDS Technologies. All Rights Reserved. * Author: Yoann Vandoorselaere * * This file is part of the Prelude library. * * 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; see the file COPYING. If not, write to * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. * *****/ #ifndef _LIBPRELUDE_PRELUDE_LINKED_OBJECT_H #define _LIBPRELUDE_PRELUDE_LINKED_OBJECT_H #include "prelude-list.h" #define PRELUDE_LINKED_OBJECT \ prelude_list_t _list; \ unsigned int _object_id typedef struct { PRELUDE_LINKED_OBJECT; } prelude_linked_object_t; static inline void prelude_linked_object_del(prelude_linked_object_t *obj) { prelude_list_del(&obj->_list); } static inline void prelude_linked_object_del_init(prelude_linked_object_t *obj) { prelude_list_del(&obj->_list); prelude_list_init(&obj->_list); } static inline void prelude_linked_object_add(prelude_list_t *head, prelude_linked_object_t *obj) { prelude_list_add(head, &obj->_list); } static inline void prelude_linked_object_add_tail(prelude_list_t *head, prelude_linked_object_t *obj) { prelude_list_add_tail(head, &obj->_list); } static inline void prelude_linked_object_set_id(prelude_linked_object_t *obj, unsigned int id) { obj->_object_id = id; } static inline unsigned int prelude_linked_object_get_id(prelude_linked_object_t *obj) { return obj->_object_id; } #define prelude_linked_object_get_object(object) \ (void *) prelude_list_entry(object, prelude_linked_object_t, _list) #endif /* _LIBPRELUDE_PRELUDE_LINKED_OBJECT_H */ libprelude-1.0.0/src/include/prelude-connection-pool.h0000664000076400007640000001144611202225026017717 00000000000000/***** * * Copyright (C) 2001, 2002, 2003, 2004, 2005 PreludeIDS Technologies. All Rights Reserved. * Author: Yoann Vandoorselaere * * This file is part of the Prelude library. * * 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; see the file COPYING. If not, write to * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. * *****/ #ifndef _LIBPRELUDE_PRELUDE_CONNECTION_POOL_H #define _LIBPRELUDE_PRELUDE_CONNECTION_POOL_H #include "prelude-list.h" #include "prelude-connection.h" #ifdef __cplusplus extern "C" { #endif typedef enum { PRELUDE_CONNECTION_POOL_FLAGS_RECONNECT = 0x01, PRELUDE_CONNECTION_POOL_FLAGS_FAILOVER = 0x02 } prelude_connection_pool_flags_t; typedef enum { PRELUDE_CONNECTION_POOL_EVENT_INPUT = 0x01, PRELUDE_CONNECTION_POOL_EVENT_DEAD = 0x02, PRELUDE_CONNECTION_POOL_EVENT_ALIVE = 0x04 } prelude_connection_pool_event_t; typedef struct prelude_connection_pool prelude_connection_pool_t; void prelude_connection_pool_broadcast(prelude_connection_pool_t *pool, prelude_msg_t *msg); void prelude_connection_pool_broadcast_async(prelude_connection_pool_t *pool, prelude_msg_t *msg); int prelude_connection_pool_init(prelude_connection_pool_t *pool); int prelude_connection_pool_new(prelude_connection_pool_t **ret, prelude_client_profile_t *cp, prelude_connection_permission_t permission); prelude_list_t *prelude_connection_pool_get_connection_list(prelude_connection_pool_t *pool); int prelude_connection_pool_add_connection(prelude_connection_pool_t *pool, prelude_connection_t *cnx); int prelude_connection_pool_del_connection(prelude_connection_pool_t *pool, prelude_connection_t *cnx); int prelude_connection_pool_set_connection_dead(prelude_connection_pool_t *pool, prelude_connection_t *cnx); int prelude_connection_pool_set_connection_alive(prelude_connection_pool_t *pool, prelude_connection_t *cnx); int prelude_connection_pool_set_connection_string(prelude_connection_pool_t *pool, const char *cfgstr); const char *prelude_connection_pool_get_connection_string(prelude_connection_pool_t *pool); void prelude_connection_pool_destroy(prelude_connection_pool_t *pool); prelude_connection_pool_t *prelude_connection_pool_ref(prelude_connection_pool_t *pool); prelude_connection_pool_flags_t prelude_connection_pool_get_flags(prelude_connection_pool_t *pool); void prelude_connection_pool_set_flags(prelude_connection_pool_t *pool, prelude_connection_pool_flags_t flags); void prelude_connection_pool_set_required_permission(prelude_connection_pool_t *pool, prelude_connection_permission_t req_perm); void prelude_connection_pool_set_data(prelude_connection_pool_t *pool, void *data); void *prelude_connection_pool_get_data(prelude_connection_pool_t *pool); int prelude_connection_pool_recv(prelude_connection_pool_t *pool, int timeout, prelude_connection_t **outcon, prelude_msg_t **outmsg); int prelude_connection_pool_check_event(prelude_connection_pool_t *pool, int timeout, int (*event_cb)(prelude_connection_pool_t *pool, prelude_connection_pool_event_t event, prelude_connection_t *cnx, void *extra), void *extra); void prelude_connection_pool_set_global_event_handler(prelude_connection_pool_t *pool, prelude_connection_pool_event_t wanted_events, int (*callback)(prelude_connection_pool_t *pool, prelude_connection_pool_event_t events)); void prelude_connection_pool_set_event_handler(prelude_connection_pool_t *pool, prelude_connection_pool_event_t wanted_events, int (*callback)(prelude_connection_pool_t *pool, prelude_connection_pool_event_t events, prelude_connection_t *cnx)); #ifdef __cplusplus } #endif #endif /* _LIBPRELUDE_PRELUDE_CONNECTION_POOL_H */ libprelude-1.0.0/src/include/tls-util.h0000664000076400007640000000277211202225026014732 00000000000000/***** * * Copyright (C) 2004,2005 PreludeIDS Technologies. All Rights Reserved. * Author: Yoann Vandoorselaere * * This file is part of the Prelude library. * * 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; see the file COPYING. If not, write to * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. * *****/ #ifndef _LIBPRELUDE_TLS_UTIL_H #define _LIBPRELUDE_TLS_UTIL_H void tls_unload_file(gnutls_datum *data); int tls_load_file(const char *filename, gnutls_datum *data); int tls_certificates_load(gnutls_x509_privkey key, const char *certfile, gnutls_certificate_credentials cred); int tls_certificate_get_peer_analyzerid(gnutls_session session, uint64_t *analyzerid); int tls_certificate_get_permission(gnutls_session session, prelude_connection_permission_t *permission); int _prelude_tls_crt_list_import(gnutls_x509_crt *certs, unsigned int *cmax, const gnutls_datum *data, gnutls_x509_crt_fmt format); #endif libprelude-1.0.0/src/include/prelude-timer.h0000664000076400007640000000531111202225026015723 00000000000000/***** * * Copyright (C) 1998-2005 PreludeIDS Technologies. All Rights Reserved. * Author: Yoann Vandoorselaere * * This file is part of the Prelude library. * * 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; see the file COPYING. If not, write to * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. * *****/ #ifndef _LIBPRELUDE_PRELUDE_TIMER_H #define _LIBPRELUDE_PRELUDE_TIMER_H #include "prelude-config.h" #if TIME_WITH_SYS_TIME # include # include #else # if HAVE_SYS_TIME_H # include # else # include # endif #endif #include "prelude-list.h" #ifdef __cplusplus extern "C" { #endif typedef struct { prelude_list_t list; int expire; time_t start_time; void *data; void (*function)(void *data); } prelude_timer_t; /* * Use theses macros for compatibility purpose * if the internal timer structure change. */ #define prelude_timer_get_expire(timer) (timer)->expire #define prelude_timer_get_data(timer) (timer)->data #define prelude_timer_get_callback(timer) (timer)->function #define prelude_timer_set_expire(timer, x) prelude_timer_get_expire((timer)) = (x) #define prelude_timer_set_data(timer, x) prelude_timer_get_data((timer)) = (x) #define prelude_timer_set_callback(timer, x) prelude_timer_get_callback((timer)) = (x) /* * Init a timer (add it to the timer list). */ void prelude_timer_init(prelude_timer_t *timer); void prelude_timer_init_list(prelude_timer_t *timer); /* * Reset timer 'timer'. */ void prelude_timer_reset(prelude_timer_t *timer); /* * Destroy timer 'timer'. */ void prelude_timer_destroy(prelude_timer_t *timer); /* * Wake up time that need it. * This function should be called every second to work properly. */ void prelude_timer_wake_up(void); /* * */ void prelude_timer_flush(void); /* * */ void prelude_timer_lock_critical_region(void); /* * */ void prelude_timer_unlock_critical_region(void); /* * */ int _prelude_timer_init(void); void _prelude_timer_fork_prepare(void); void _prelude_timer_fork_parent(void); void _prelude_timer_fork_child(void); #ifdef __cplusplus } #endif #endif /* _LIBPRELUDE_PRELUDE_TIMER_H */ libprelude-1.0.0/src/include/prelude-hash.h0000664000076400007640000000401011202225026015521 00000000000000/***** * * Copyright (C) 2003, 2004, 2005 PreludeIDS Technologies. All Rights Reserved. * Author: Nicolas Delon * * This file is part of the Prelude library. * * 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; see the file COPYING. If not, write to * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. * *****/ #ifndef _LIBPRELUDE_HASH_H #define _LIBPRELUDE_HASH_H #ifdef __cplusplus extern "C" { #endif typedef struct prelude_hash prelude_hash_t; int prelude_hash_new(prelude_hash_t **hash, unsigned int (*hash_func)(const void *), int (*key_cmp_func)(const void *, const void *), void (*key_destroy_func)(void *), void (*value_destroy_func)(void *)); int prelude_hash_new2(prelude_hash_t **hash, size_t size, unsigned int (*hash_func)(const void *), int (*key_cmp_func)(const void *, const void *), void (*key_destroy_func)(void *), void (*value_destroy_func)(void *)); void prelude_hash_destroy(prelude_hash_t *hash); int prelude_hash_set(prelude_hash_t *hash, void *key, void *value); void *prelude_hash_get(prelude_hash_t *hash, const void *key); int prelude_hash_elem_destroy(prelude_hash_t *hash, const void *key); void prelude_hash_iterate(prelude_hash_t *hash, void (*cb)(void *data)); #ifdef __cplusplus } #endif #endif /* _LIBPRELUDE_HASH_H */ libprelude-1.0.0/src/include/idmef-time.h0000664000076400007640000000605711345707014015207 00000000000000/***** * * Copyright (C) 2003, 2004, 2005 PreludeIDS Technologies. All Rights Reserved. * Author: Nicolas Delon * * This file is part of the Prelude library. * * 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; see the file COPYING. If not, write to * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. * *****/ #ifndef _LIBPRELUDE_IDMEF_TIME_H #define _LIBPRELUDE_IDMEF_TIME_H #include "prelude-config.h" #ifdef HAVE_CONFIG_H # include "config.h" #endif #if TIME_WITH_SYS_TIME # include # include #else # if HAVE_SYS_TIME_H # include # else # include # endif #endif #ifdef __cplusplus extern "C" { #endif struct idmef_time { /* */ int refcount; uint32_t sec; uint32_t usec; int32_t gmt_offset; }; typedef struct idmef_time idmef_time_t; idmef_time_t *idmef_time_ref(idmef_time_t *time); int idmef_time_new(idmef_time_t **time); int idmef_time_new_from_time(idmef_time_t **time, const time_t *t); int idmef_time_new_from_gettimeofday(idmef_time_t **time); int idmef_time_new_from_string(idmef_time_t **time, const char *buf); int idmef_time_new_from_ntpstamp(idmef_time_t **time, const char *buf); int idmef_time_new_from_timeval(idmef_time_t **time, const struct timeval *tv); void idmef_time_set_from_time(idmef_time_t *time, const time_t *t); int idmef_time_set_from_gettimeofday(idmef_time_t *time); int idmef_time_set_from_string(idmef_time_t *time, const char *buf); int idmef_time_set_from_ntpstamp(idmef_time_t *time, const char *buf); int idmef_time_set_from_timeval(idmef_time_t *time, const struct timeval *tv); void idmef_time_destroy_internal(idmef_time_t *time); void idmef_time_destroy(idmef_time_t *time); int idmef_time_clone(const idmef_time_t *src, idmef_time_t **dst); int idmef_time_copy(const idmef_time_t *src, idmef_time_t *dst); void idmef_time_set_sec(idmef_time_t *time, uint32_t sec); void idmef_time_set_usec(idmef_time_t *time, uint32_t usec); void idmef_time_set_gmt_offset(idmef_time_t *time, int32_t gmtoff); uint32_t idmef_time_get_sec(const idmef_time_t *time); uint32_t idmef_time_get_usec(const idmef_time_t *time); int32_t idmef_time_get_gmt_offset(const idmef_time_t *time); int idmef_time_to_string(const idmef_time_t *time, prelude_string_t *out); int idmef_time_to_ntpstamp(const idmef_time_t *time, prelude_string_t *out); int idmef_time_compare(const idmef_time_t *time1, const idmef_time_t *time2); #ifdef __cplusplus } #endif #endif /* _LIBPRELUDE_IDMEF_TIME_H */ libprelude-1.0.0/src/include/idmef-tree-data.h0000664000076400007640000007043611325615275016126 00000000000000 /* Auto-generated by the GenerateIDMEFTreeData package */ typedef struct { const char *name; prelude_bool_t list; idmef_value_type_id_t type; idmef_class_id_t class; } children_list_t; const children_list_t idmef_additional_data_children_list[] = { { "type", 0, IDMEF_VALUE_TYPE_ENUM, IDMEF_CLASS_ID_ADDITIONAL_DATA_TYPE }, { "meaning", 0, IDMEF_VALUE_TYPE_STRING, 0 }, { "data", 0, IDMEF_VALUE_TYPE_DATA, 0 }, }; const children_list_t idmef_reference_children_list[] = { { "origin", 0, IDMEF_VALUE_TYPE_ENUM, IDMEF_CLASS_ID_REFERENCE_ORIGIN }, { "name", 0, IDMEF_VALUE_TYPE_STRING, 0 }, { "url", 0, IDMEF_VALUE_TYPE_STRING, 0 }, { "meaning", 0, IDMEF_VALUE_TYPE_STRING, 0 }, }; const children_list_t idmef_classification_children_list[] = { { "ident", 0, IDMEF_VALUE_TYPE_STRING, 0 }, { "text", 0, IDMEF_VALUE_TYPE_STRING, 0 }, { "reference", 1, IDMEF_VALUE_TYPE_CLASS, IDMEF_CLASS_ID_REFERENCE }, }; const children_list_t idmef_user_id_children_list[] = { { "ident", 0, IDMEF_VALUE_TYPE_STRING, 0 }, { "type", 0, IDMEF_VALUE_TYPE_ENUM, IDMEF_CLASS_ID_USER_ID_TYPE }, { "tty", 0, IDMEF_VALUE_TYPE_STRING, 0 }, { "name", 0, IDMEF_VALUE_TYPE_STRING, 0 }, { "number", 0, IDMEF_VALUE_TYPE_UINT32, 0 }, }; const children_list_t idmef_user_children_list[] = { { "ident", 0, IDMEF_VALUE_TYPE_STRING, 0 }, { "category", 0, IDMEF_VALUE_TYPE_ENUM, IDMEF_CLASS_ID_USER_CATEGORY }, { "user_id", 1, IDMEF_VALUE_TYPE_CLASS, IDMEF_CLASS_ID_USER_ID }, }; const children_list_t idmef_address_children_list[] = { { "ident", 0, IDMEF_VALUE_TYPE_STRING, 0 }, { "category", 0, IDMEF_VALUE_TYPE_ENUM, IDMEF_CLASS_ID_ADDRESS_CATEGORY }, { "vlan_name", 0, IDMEF_VALUE_TYPE_STRING, 0 }, { "vlan_num", 0, IDMEF_VALUE_TYPE_INT32, 0 }, { "address", 0, IDMEF_VALUE_TYPE_STRING, 0 }, { "netmask", 0, IDMEF_VALUE_TYPE_STRING, 0 }, }; const children_list_t idmef_process_children_list[] = { { "ident", 0, IDMEF_VALUE_TYPE_STRING, 0 }, { "name", 0, IDMEF_VALUE_TYPE_STRING, 0 }, { "pid", 0, IDMEF_VALUE_TYPE_UINT32, 0 }, { "path", 0, IDMEF_VALUE_TYPE_STRING, 0 }, { "arg", 1, IDMEF_VALUE_TYPE_STRING, 0 }, { "env", 1, IDMEF_VALUE_TYPE_STRING, 0 }, }; const children_list_t idmef_web_service_children_list[] = { { "url", 0, IDMEF_VALUE_TYPE_STRING, 0 }, { "cgi", 0, IDMEF_VALUE_TYPE_STRING, 0 }, { "http_method", 0, IDMEF_VALUE_TYPE_STRING, 0 }, { "arg", 1, IDMEF_VALUE_TYPE_STRING, 0 }, }; const children_list_t idmef_snmp_service_children_list[] = { { "oid", 0, IDMEF_VALUE_TYPE_STRING, 0 }, { "message_processing_model", 0, IDMEF_VALUE_TYPE_UINT32, 0 }, { "security_model", 0, IDMEF_VALUE_TYPE_UINT32, 0 }, { "security_name", 0, IDMEF_VALUE_TYPE_STRING, 0 }, { "security_level", 0, IDMEF_VALUE_TYPE_UINT32, 0 }, { "context_name", 0, IDMEF_VALUE_TYPE_STRING, 0 }, { "context_engine_id", 0, IDMEF_VALUE_TYPE_STRING, 0 }, { "command", 0, IDMEF_VALUE_TYPE_STRING, 0 }, { "community", 0, IDMEF_VALUE_TYPE_STRING, 0 }, }; const children_list_t idmef_service_children_list[] = { { "ident", 0, IDMEF_VALUE_TYPE_STRING, 0 }, { "ip_version", 0, IDMEF_VALUE_TYPE_UINT8, 0 }, { "iana_protocol_number", 0, IDMEF_VALUE_TYPE_UINT8, 0 }, { "iana_protocol_name", 0, IDMEF_VALUE_TYPE_STRING, 0 }, { "name", 0, IDMEF_VALUE_TYPE_STRING, 0 }, { "port", 0, IDMEF_VALUE_TYPE_UINT16, 0 }, { "portlist", 0, IDMEF_VALUE_TYPE_STRING, 0 }, { "protocol", 0, IDMEF_VALUE_TYPE_STRING, 0 }, { "web_service", 0, IDMEF_VALUE_TYPE_CLASS, IDMEF_CLASS_ID_WEB_SERVICE }, { "snmp_service", 0, IDMEF_VALUE_TYPE_CLASS, IDMEF_CLASS_ID_SNMP_SERVICE }, }; const children_list_t idmef_node_children_list[] = { { "ident", 0, IDMEF_VALUE_TYPE_STRING, 0 }, { "category", 0, IDMEF_VALUE_TYPE_ENUM, IDMEF_CLASS_ID_NODE_CATEGORY }, { "location", 0, IDMEF_VALUE_TYPE_STRING, 0 }, { "name", 0, IDMEF_VALUE_TYPE_STRING, 0 }, { "address", 1, IDMEF_VALUE_TYPE_CLASS, IDMEF_CLASS_ID_ADDRESS }, }; const children_list_t idmef_source_children_list[] = { { "ident", 0, IDMEF_VALUE_TYPE_STRING, 0 }, { "spoofed", 0, IDMEF_VALUE_TYPE_ENUM, IDMEF_CLASS_ID_SOURCE_SPOOFED }, { "interface", 0, IDMEF_VALUE_TYPE_STRING, 0 }, { "node", 0, IDMEF_VALUE_TYPE_CLASS, IDMEF_CLASS_ID_NODE }, { "user", 0, IDMEF_VALUE_TYPE_CLASS, IDMEF_CLASS_ID_USER }, { "process", 0, IDMEF_VALUE_TYPE_CLASS, IDMEF_CLASS_ID_PROCESS }, { "service", 0, IDMEF_VALUE_TYPE_CLASS, IDMEF_CLASS_ID_SERVICE }, }; const children_list_t idmef_file_access_children_list[] = { { "user_id", 0, IDMEF_VALUE_TYPE_CLASS, IDMEF_CLASS_ID_USER_ID }, { "permission", 1, IDMEF_VALUE_TYPE_STRING, 0 }, }; const children_list_t idmef_inode_children_list[] = { { "change_time", 0, IDMEF_VALUE_TYPE_TIME, 0 }, { "number", 0, IDMEF_VALUE_TYPE_UINT32, 0 }, { "major_device", 0, IDMEF_VALUE_TYPE_UINT32, 0 }, { "minor_device", 0, IDMEF_VALUE_TYPE_UINT32, 0 }, { "c_major_device", 0, IDMEF_VALUE_TYPE_UINT32, 0 }, { "c_minor_device", 0, IDMEF_VALUE_TYPE_UINT32, 0 }, }; const children_list_t idmef_checksum_children_list[] = { { "value", 0, IDMEF_VALUE_TYPE_STRING, 0 }, { "key", 0, IDMEF_VALUE_TYPE_STRING, 0 }, { "algorithm", 0, IDMEF_VALUE_TYPE_ENUM, IDMEF_CLASS_ID_CHECKSUM_ALGORITHM }, }; const children_list_t idmef_file_children_list[] = { { "ident", 0, IDMEF_VALUE_TYPE_STRING, 0 }, { "name", 0, IDMEF_VALUE_TYPE_STRING, 0 }, { "path", 0, IDMEF_VALUE_TYPE_STRING, 0 }, { "create_time", 0, IDMEF_VALUE_TYPE_TIME, 0 }, { "modify_time", 0, IDMEF_VALUE_TYPE_TIME, 0 }, { "access_time", 0, IDMEF_VALUE_TYPE_TIME, 0 }, { "data_size", 0, IDMEF_VALUE_TYPE_UINT64, 0 }, { "disk_size", 0, IDMEF_VALUE_TYPE_UINT64, 0 }, { "file_access", 1, IDMEF_VALUE_TYPE_CLASS, IDMEF_CLASS_ID_FILE_ACCESS }, { "linkage", 1, IDMEF_VALUE_TYPE_CLASS, IDMEF_CLASS_ID_LINKAGE }, { "inode", 0, IDMEF_VALUE_TYPE_CLASS, IDMEF_CLASS_ID_INODE }, { "checksum", 1, IDMEF_VALUE_TYPE_CLASS, IDMEF_CLASS_ID_CHECKSUM }, { "category", 0, IDMEF_VALUE_TYPE_ENUM, IDMEF_CLASS_ID_FILE_CATEGORY }, { "fstype", 0, IDMEF_VALUE_TYPE_ENUM, IDMEF_CLASS_ID_FILE_FSTYPE }, { "file_type", 0, IDMEF_VALUE_TYPE_STRING, 0 }, }; const children_list_t idmef_linkage_children_list[] = { { "category", 0, IDMEF_VALUE_TYPE_ENUM, IDMEF_CLASS_ID_LINKAGE_CATEGORY }, { "name", 0, IDMEF_VALUE_TYPE_STRING, 0 }, { "path", 0, IDMEF_VALUE_TYPE_STRING, 0 }, { "file", 0, IDMEF_VALUE_TYPE_CLASS, IDMEF_CLASS_ID_FILE }, }; const children_list_t idmef_target_children_list[] = { { "ident", 0, IDMEF_VALUE_TYPE_STRING, 0 }, { "decoy", 0, IDMEF_VALUE_TYPE_ENUM, IDMEF_CLASS_ID_TARGET_DECOY }, { "interface", 0, IDMEF_VALUE_TYPE_STRING, 0 }, { "node", 0, IDMEF_VALUE_TYPE_CLASS, IDMEF_CLASS_ID_NODE }, { "user", 0, IDMEF_VALUE_TYPE_CLASS, IDMEF_CLASS_ID_USER }, { "process", 0, IDMEF_VALUE_TYPE_CLASS, IDMEF_CLASS_ID_PROCESS }, { "service", 0, IDMEF_VALUE_TYPE_CLASS, IDMEF_CLASS_ID_SERVICE }, { "file", 1, IDMEF_VALUE_TYPE_CLASS, IDMEF_CLASS_ID_FILE }, }; const children_list_t idmef_analyzer_children_list[] = { { "analyzerid", 0, IDMEF_VALUE_TYPE_STRING, 0 }, { "name", 0, IDMEF_VALUE_TYPE_STRING, 0 }, { "manufacturer", 0, IDMEF_VALUE_TYPE_STRING, 0 }, { "model", 0, IDMEF_VALUE_TYPE_STRING, 0 }, { "version", 0, IDMEF_VALUE_TYPE_STRING, 0 }, { "class", 0, IDMEF_VALUE_TYPE_STRING, 0 }, { "ostype", 0, IDMEF_VALUE_TYPE_STRING, 0 }, { "osversion", 0, IDMEF_VALUE_TYPE_STRING, 0 }, { "node", 0, IDMEF_VALUE_TYPE_CLASS, IDMEF_CLASS_ID_NODE }, { "process", 0, IDMEF_VALUE_TYPE_CLASS, IDMEF_CLASS_ID_PROCESS }, }; const children_list_t idmef_alertident_children_list[] = { { "alertident", 0, IDMEF_VALUE_TYPE_STRING, 0 }, { "analyzerid", 0, IDMEF_VALUE_TYPE_STRING, 0 }, }; const children_list_t idmef_impact_children_list[] = { { "severity", 0, IDMEF_VALUE_TYPE_ENUM, IDMEF_CLASS_ID_IMPACT_SEVERITY }, { "completion", 0, IDMEF_VALUE_TYPE_ENUM, IDMEF_CLASS_ID_IMPACT_COMPLETION }, { "type", 0, IDMEF_VALUE_TYPE_ENUM, IDMEF_CLASS_ID_IMPACT_TYPE }, { "description", 0, IDMEF_VALUE_TYPE_STRING, 0 }, }; const children_list_t idmef_action_children_list[] = { { "category", 0, IDMEF_VALUE_TYPE_ENUM, IDMEF_CLASS_ID_ACTION_CATEGORY }, { "description", 0, IDMEF_VALUE_TYPE_STRING, 0 }, }; const children_list_t idmef_confidence_children_list[] = { { "rating", 0, IDMEF_VALUE_TYPE_ENUM, IDMEF_CLASS_ID_CONFIDENCE_RATING }, { "confidence", 0, IDMEF_VALUE_TYPE_FLOAT, 0 }, }; const children_list_t idmef_assessment_children_list[] = { { "impact", 0, IDMEF_VALUE_TYPE_CLASS, IDMEF_CLASS_ID_IMPACT }, { "action", 1, IDMEF_VALUE_TYPE_CLASS, IDMEF_CLASS_ID_ACTION }, { "confidence", 0, IDMEF_VALUE_TYPE_CLASS, IDMEF_CLASS_ID_CONFIDENCE }, }; const children_list_t idmef_tool_alert_children_list[] = { { "name", 0, IDMEF_VALUE_TYPE_STRING, 0 }, { "command", 0, IDMEF_VALUE_TYPE_STRING, 0 }, { "alertident", 1, IDMEF_VALUE_TYPE_CLASS, IDMEF_CLASS_ID_ALERTIDENT }, }; const children_list_t idmef_correlation_alert_children_list[] = { { "name", 0, IDMEF_VALUE_TYPE_STRING, 0 }, { "alertident", 1, IDMEF_VALUE_TYPE_CLASS, IDMEF_CLASS_ID_ALERTIDENT }, }; const children_list_t idmef_overflow_alert_children_list[] = { { "program", 0, IDMEF_VALUE_TYPE_STRING, 0 }, { "size", 0, IDMEF_VALUE_TYPE_UINT32, 0 }, { "buffer", 0, IDMEF_VALUE_TYPE_DATA, 0 }, }; const children_list_t idmef_alert_children_list[] = { { "messageid", 0, IDMEF_VALUE_TYPE_STRING, 0 }, { "analyzer", 1, IDMEF_VALUE_TYPE_CLASS, IDMEF_CLASS_ID_ANALYZER }, { "create_time", 0, IDMEF_VALUE_TYPE_TIME, 0 }, { "classification", 0, IDMEF_VALUE_TYPE_CLASS, IDMEF_CLASS_ID_CLASSIFICATION }, { "detect_time", 0, IDMEF_VALUE_TYPE_TIME, 0 }, { "analyzer_time", 0, IDMEF_VALUE_TYPE_TIME, 0 }, { "source", 1, IDMEF_VALUE_TYPE_CLASS, IDMEF_CLASS_ID_SOURCE }, { "target", 1, IDMEF_VALUE_TYPE_CLASS, IDMEF_CLASS_ID_TARGET }, { "assessment", 0, IDMEF_VALUE_TYPE_CLASS, IDMEF_CLASS_ID_ASSESSMENT }, { "additional_data", 1, IDMEF_VALUE_TYPE_CLASS, IDMEF_CLASS_ID_ADDITIONAL_DATA }, { "tool_alert", 0, IDMEF_VALUE_TYPE_CLASS, IDMEF_CLASS_ID_TOOL_ALERT }, { "correlation_alert", 0, IDMEF_VALUE_TYPE_CLASS, IDMEF_CLASS_ID_CORRELATION_ALERT }, { "overflow_alert", 0, IDMEF_VALUE_TYPE_CLASS, IDMEF_CLASS_ID_OVERFLOW_ALERT }, }; const children_list_t idmef_heartbeat_children_list[] = { { "messageid", 0, IDMEF_VALUE_TYPE_STRING, 0 }, { "analyzer", 1, IDMEF_VALUE_TYPE_CLASS, IDMEF_CLASS_ID_ANALYZER }, { "create_time", 0, IDMEF_VALUE_TYPE_TIME, 0 }, { "analyzer_time", 0, IDMEF_VALUE_TYPE_TIME, 0 }, { "heartbeat_interval", 0, IDMEF_VALUE_TYPE_UINT32, 0 }, { "additional_data", 1, IDMEF_VALUE_TYPE_CLASS, IDMEF_CLASS_ID_ADDITIONAL_DATA }, }; const children_list_t idmef_message_children_list[] = { { "version", 0, IDMEF_VALUE_TYPE_STRING, 0 }, { "alert", 0, IDMEF_VALUE_TYPE_CLASS, IDMEF_CLASS_ID_ALERT }, { "heartbeat", 0, IDMEF_VALUE_TYPE_CLASS, IDMEF_CLASS_ID_HEARTBEAT }, }; typedef struct { const char *name; size_t children_list_elem; const children_list_t *children_list; int (*get_child)(void *ptr, idmef_class_child_id_t child, void **ret); int (*new_child)(void *ptr, idmef_class_child_id_t child, int n, void **ret); int (*destroy_child)(void *ptr, idmef_class_child_id_t child, int n); int (*to_numeric)(const char *name); const char *(*to_string)(int val); int (*copy)(const void *src, void *dst); int (*clone)(const void *src, void **dst); int (*compare)(const void *obj1, const void *obj2); void *(*ref)(void *src); void (*destroy)(void *obj); } object_data_t; const object_data_t object_data[] = { { "(unassigned)", 0, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL }, /* ID: 0 */ { "(unassigned)", 0, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL }, /* ID: 1 */ { "(unassigned)", 0, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL }, /* ID: 2 */ { "additional_data_type", 0, NULL, NULL, NULL, NULL, (void *) idmef_additional_data_type_to_numeric, (void *) idmef_additional_data_type_to_string, NULL, NULL, NULL, NULL, NULL }, /* ID: 3 */ { "additional_data", sizeof(idmef_additional_data_children_list) / sizeof(*idmef_additional_data_children_list), idmef_additional_data_children_list, _idmef_additional_data_get_child, _idmef_additional_data_new_child, _idmef_additional_data_destroy_child, NULL, NULL, (void *) idmef_additional_data_copy, (void *) idmef_additional_data_clone, (void *) idmef_additional_data_compare, (void *) idmef_additional_data_ref, (void *) idmef_additional_data_destroy }, /* ID: 4 */ { "reference_origin", 0, NULL, NULL, NULL, NULL, (void *) idmef_reference_origin_to_numeric, (void *) idmef_reference_origin_to_string, NULL, NULL, NULL, NULL, NULL }, /* ID: 5 */ { "classification", sizeof(idmef_classification_children_list) / sizeof(*idmef_classification_children_list), idmef_classification_children_list, _idmef_classification_get_child, _idmef_classification_new_child, _idmef_classification_destroy_child, NULL, NULL, (void *) idmef_classification_copy, (void *) idmef_classification_clone, (void *) idmef_classification_compare, (void *) idmef_classification_ref, (void *) idmef_classification_destroy }, /* ID: 6 */ { "user_id_type", 0, NULL, NULL, NULL, NULL, (void *) idmef_user_id_type_to_numeric, (void *) idmef_user_id_type_to_string, NULL, NULL, NULL, NULL, NULL }, /* ID: 7 */ { "user_id", sizeof(idmef_user_id_children_list) / sizeof(*idmef_user_id_children_list), idmef_user_id_children_list, _idmef_user_id_get_child, _idmef_user_id_new_child, _idmef_user_id_destroy_child, NULL, NULL, (void *) idmef_user_id_copy, (void *) idmef_user_id_clone, (void *) idmef_user_id_compare, (void *) idmef_user_id_ref, (void *) idmef_user_id_destroy }, /* ID: 8 */ { "user_category", 0, NULL, NULL, NULL, NULL, (void *) idmef_user_category_to_numeric, (void *) idmef_user_category_to_string, NULL, NULL, NULL, NULL, NULL }, /* ID: 9 */ { "user", sizeof(idmef_user_children_list) / sizeof(*idmef_user_children_list), idmef_user_children_list, _idmef_user_get_child, _idmef_user_new_child, _idmef_user_destroy_child, NULL, NULL, (void *) idmef_user_copy, (void *) idmef_user_clone, (void *) idmef_user_compare, (void *) idmef_user_ref, (void *) idmef_user_destroy }, /* ID: 10 */ { "address_category", 0, NULL, NULL, NULL, NULL, (void *) idmef_address_category_to_numeric, (void *) idmef_address_category_to_string, NULL, NULL, NULL, NULL, NULL }, /* ID: 11 */ { "address", sizeof(idmef_address_children_list) / sizeof(*idmef_address_children_list), idmef_address_children_list, _idmef_address_get_child, _idmef_address_new_child, _idmef_address_destroy_child, NULL, NULL, (void *) idmef_address_copy, (void *) idmef_address_clone, (void *) idmef_address_compare, (void *) idmef_address_ref, (void *) idmef_address_destroy }, /* ID: 12 */ { "process", sizeof(idmef_process_children_list) / sizeof(*idmef_process_children_list), idmef_process_children_list, _idmef_process_get_child, _idmef_process_new_child, _idmef_process_destroy_child, NULL, NULL, (void *) idmef_process_copy, (void *) idmef_process_clone, (void *) idmef_process_compare, (void *) idmef_process_ref, (void *) idmef_process_destroy }, /* ID: 13 */ { "web_service", sizeof(idmef_web_service_children_list) / sizeof(*idmef_web_service_children_list), idmef_web_service_children_list, _idmef_web_service_get_child, _idmef_web_service_new_child, _idmef_web_service_destroy_child, NULL, NULL, (void *) idmef_web_service_copy, (void *) idmef_web_service_clone, (void *) idmef_web_service_compare, (void *) idmef_web_service_ref, (void *) idmef_web_service_destroy }, /* ID: 14 */ { "snmp_service", sizeof(idmef_snmp_service_children_list) / sizeof(*idmef_snmp_service_children_list), idmef_snmp_service_children_list, _idmef_snmp_service_get_child, _idmef_snmp_service_new_child, _idmef_snmp_service_destroy_child, NULL, NULL, (void *) idmef_snmp_service_copy, (void *) idmef_snmp_service_clone, (void *) idmef_snmp_service_compare, (void *) idmef_snmp_service_ref, (void *) idmef_snmp_service_destroy }, /* ID: 15 */ { "service_type", 0, NULL, NULL, NULL, NULL, (void *) idmef_service_type_to_numeric, (void *) idmef_service_type_to_string, NULL, NULL, NULL, NULL, NULL }, /* ID: 16 */ { "service", sizeof(idmef_service_children_list) / sizeof(*idmef_service_children_list), idmef_service_children_list, _idmef_service_get_child, _idmef_service_new_child, _idmef_service_destroy_child, NULL, NULL, (void *) idmef_service_copy, (void *) idmef_service_clone, (void *) idmef_service_compare, (void *) idmef_service_ref, (void *) idmef_service_destroy }, /* ID: 17 */ { "node_category", 0, NULL, NULL, NULL, NULL, (void *) idmef_node_category_to_numeric, (void *) idmef_node_category_to_string, NULL, NULL, NULL, NULL, NULL }, /* ID: 18 */ { "node", sizeof(idmef_node_children_list) / sizeof(*idmef_node_children_list), idmef_node_children_list, _idmef_node_get_child, _idmef_node_new_child, _idmef_node_destroy_child, NULL, NULL, (void *) idmef_node_copy, (void *) idmef_node_clone, (void *) idmef_node_compare, (void *) idmef_node_ref, (void *) idmef_node_destroy }, /* ID: 19 */ { "source_spoofed", 0, NULL, NULL, NULL, NULL, (void *) idmef_source_spoofed_to_numeric, (void *) idmef_source_spoofed_to_string, NULL, NULL, NULL, NULL, NULL }, /* ID: 20 */ { "source", sizeof(idmef_source_children_list) / sizeof(*idmef_source_children_list), idmef_source_children_list, _idmef_source_get_child, _idmef_source_new_child, _idmef_source_destroy_child, NULL, NULL, (void *) idmef_source_copy, (void *) idmef_source_clone, (void *) idmef_source_compare, (void *) idmef_source_ref, (void *) idmef_source_destroy }, /* ID: 21 */ { "file_access", sizeof(idmef_file_access_children_list) / sizeof(*idmef_file_access_children_list), idmef_file_access_children_list, _idmef_file_access_get_child, _idmef_file_access_new_child, _idmef_file_access_destroy_child, NULL, NULL, (void *) idmef_file_access_copy, (void *) idmef_file_access_clone, (void *) idmef_file_access_compare, (void *) idmef_file_access_ref, (void *) idmef_file_access_destroy }, /* ID: 22 */ { "inode", sizeof(idmef_inode_children_list) / sizeof(*idmef_inode_children_list), idmef_inode_children_list, _idmef_inode_get_child, _idmef_inode_new_child, _idmef_inode_destroy_child, NULL, NULL, (void *) idmef_inode_copy, (void *) idmef_inode_clone, (void *) idmef_inode_compare, (void *) idmef_inode_ref, (void *) idmef_inode_destroy }, /* ID: 23 */ { "file_category", 0, NULL, NULL, NULL, NULL, (void *) idmef_file_category_to_numeric, (void *) idmef_file_category_to_string, NULL, NULL, NULL, NULL, NULL }, /* ID: 24 */ { "file_fstype", 0, NULL, NULL, NULL, NULL, (void *) idmef_file_fstype_to_numeric, (void *) idmef_file_fstype_to_string, NULL, NULL, NULL, NULL, NULL }, /* ID: 25 */ { "file", sizeof(idmef_file_children_list) / sizeof(*idmef_file_children_list), idmef_file_children_list, _idmef_file_get_child, _idmef_file_new_child, _idmef_file_destroy_child, NULL, NULL, (void *) idmef_file_copy, (void *) idmef_file_clone, (void *) idmef_file_compare, (void *) idmef_file_ref, (void *) idmef_file_destroy }, /* ID: 26 */ { "linkage_category", 0, NULL, NULL, NULL, NULL, (void *) idmef_linkage_category_to_numeric, (void *) idmef_linkage_category_to_string, NULL, NULL, NULL, NULL, NULL }, /* ID: 27 */ { "linkage", sizeof(idmef_linkage_children_list) / sizeof(*idmef_linkage_children_list), idmef_linkage_children_list, _idmef_linkage_get_child, _idmef_linkage_new_child, _idmef_linkage_destroy_child, NULL, NULL, (void *) idmef_linkage_copy, (void *) idmef_linkage_clone, (void *) idmef_linkage_compare, (void *) idmef_linkage_ref, (void *) idmef_linkage_destroy }, /* ID: 28 */ { "target_decoy", 0, NULL, NULL, NULL, NULL, (void *) idmef_target_decoy_to_numeric, (void *) idmef_target_decoy_to_string, NULL, NULL, NULL, NULL, NULL }, /* ID: 29 */ { "target", sizeof(idmef_target_children_list) / sizeof(*idmef_target_children_list), idmef_target_children_list, _idmef_target_get_child, _idmef_target_new_child, _idmef_target_destroy_child, NULL, NULL, (void *) idmef_target_copy, (void *) idmef_target_clone, (void *) idmef_target_compare, (void *) idmef_target_ref, (void *) idmef_target_destroy }, /* ID: 30 */ { "analyzer", sizeof(idmef_analyzer_children_list) / sizeof(*idmef_analyzer_children_list), idmef_analyzer_children_list, _idmef_analyzer_get_child, _idmef_analyzer_new_child, _idmef_analyzer_destroy_child, NULL, NULL, (void *) idmef_analyzer_copy, (void *) idmef_analyzer_clone, (void *) idmef_analyzer_compare, (void *) idmef_analyzer_ref, (void *) idmef_analyzer_destroy }, /* ID: 31 */ { "alertident", sizeof(idmef_alertident_children_list) / sizeof(*idmef_alertident_children_list), idmef_alertident_children_list, _idmef_alertident_get_child, _idmef_alertident_new_child, _idmef_alertident_destroy_child, NULL, NULL, (void *) idmef_alertident_copy, (void *) idmef_alertident_clone, (void *) idmef_alertident_compare, (void *) idmef_alertident_ref, (void *) idmef_alertident_destroy }, /* ID: 32 */ { "impact_severity", 0, NULL, NULL, NULL, NULL, (void *) idmef_impact_severity_to_numeric, (void *) idmef_impact_severity_to_string, NULL, NULL, NULL, NULL, NULL }, /* ID: 33 */ { "impact_completion", 0, NULL, NULL, NULL, NULL, (void *) idmef_impact_completion_to_numeric, (void *) idmef_impact_completion_to_string, NULL, NULL, NULL, NULL, NULL }, /* ID: 34 */ { "impact_type", 0, NULL, NULL, NULL, NULL, (void *) idmef_impact_type_to_numeric, (void *) idmef_impact_type_to_string, NULL, NULL, NULL, NULL, NULL }, /* ID: 35 */ { "impact", sizeof(idmef_impact_children_list) / sizeof(*idmef_impact_children_list), idmef_impact_children_list, _idmef_impact_get_child, _idmef_impact_new_child, _idmef_impact_destroy_child, NULL, NULL, (void *) idmef_impact_copy, (void *) idmef_impact_clone, (void *) idmef_impact_compare, (void *) idmef_impact_ref, (void *) idmef_impact_destroy }, /* ID: 36 */ { "action_category", 0, NULL, NULL, NULL, NULL, (void *) idmef_action_category_to_numeric, (void *) idmef_action_category_to_string, NULL, NULL, NULL, NULL, NULL }, /* ID: 37 */ { "action", sizeof(idmef_action_children_list) / sizeof(*idmef_action_children_list), idmef_action_children_list, _idmef_action_get_child, _idmef_action_new_child, _idmef_action_destroy_child, NULL, NULL, (void *) idmef_action_copy, (void *) idmef_action_clone, (void *) idmef_action_compare, (void *) idmef_action_ref, (void *) idmef_action_destroy }, /* ID: 38 */ { "confidence_rating", 0, NULL, NULL, NULL, NULL, (void *) idmef_confidence_rating_to_numeric, (void *) idmef_confidence_rating_to_string, NULL, NULL, NULL, NULL, NULL }, /* ID: 39 */ { "confidence", sizeof(idmef_confidence_children_list) / sizeof(*idmef_confidence_children_list), idmef_confidence_children_list, _idmef_confidence_get_child, _idmef_confidence_new_child, _idmef_confidence_destroy_child, NULL, NULL, (void *) idmef_confidence_copy, (void *) idmef_confidence_clone, (void *) idmef_confidence_compare, (void *) idmef_confidence_ref, (void *) idmef_confidence_destroy }, /* ID: 40 */ { "assessment", sizeof(idmef_assessment_children_list) / sizeof(*idmef_assessment_children_list), idmef_assessment_children_list, _idmef_assessment_get_child, _idmef_assessment_new_child, _idmef_assessment_destroy_child, NULL, NULL, (void *) idmef_assessment_copy, (void *) idmef_assessment_clone, (void *) idmef_assessment_compare, (void *) idmef_assessment_ref, (void *) idmef_assessment_destroy }, /* ID: 41 */ { "tool_alert", sizeof(idmef_tool_alert_children_list) / sizeof(*idmef_tool_alert_children_list), idmef_tool_alert_children_list, _idmef_tool_alert_get_child, _idmef_tool_alert_new_child, _idmef_tool_alert_destroy_child, NULL, NULL, (void *) idmef_tool_alert_copy, (void *) idmef_tool_alert_clone, (void *) idmef_tool_alert_compare, (void *) idmef_tool_alert_ref, (void *) idmef_tool_alert_destroy }, /* ID: 42 */ { "correlation_alert", sizeof(idmef_correlation_alert_children_list) / sizeof(*idmef_correlation_alert_children_list), idmef_correlation_alert_children_list, _idmef_correlation_alert_get_child, _idmef_correlation_alert_new_child, _idmef_correlation_alert_destroy_child, NULL, NULL, (void *) idmef_correlation_alert_copy, (void *) idmef_correlation_alert_clone, (void *) idmef_correlation_alert_compare, (void *) idmef_correlation_alert_ref, (void *) idmef_correlation_alert_destroy }, /* ID: 43 */ { "overflow_alert", sizeof(idmef_overflow_alert_children_list) / sizeof(*idmef_overflow_alert_children_list), idmef_overflow_alert_children_list, _idmef_overflow_alert_get_child, _idmef_overflow_alert_new_child, _idmef_overflow_alert_destroy_child, NULL, NULL, (void *) idmef_overflow_alert_copy, (void *) idmef_overflow_alert_clone, (void *) idmef_overflow_alert_compare, (void *) idmef_overflow_alert_ref, (void *) idmef_overflow_alert_destroy }, /* ID: 44 */ { "alert_type", 0, NULL, NULL, NULL, NULL, (void *) idmef_alert_type_to_numeric, (void *) idmef_alert_type_to_string, NULL, NULL, NULL, NULL, NULL }, /* ID: 45 */ { "alert", sizeof(idmef_alert_children_list) / sizeof(*idmef_alert_children_list), idmef_alert_children_list, _idmef_alert_get_child, _idmef_alert_new_child, _idmef_alert_destroy_child, NULL, NULL, (void *) idmef_alert_copy, (void *) idmef_alert_clone, (void *) idmef_alert_compare, (void *) idmef_alert_ref, (void *) idmef_alert_destroy }, /* ID: 46 */ { "heartbeat", sizeof(idmef_heartbeat_children_list) / sizeof(*idmef_heartbeat_children_list), idmef_heartbeat_children_list, _idmef_heartbeat_get_child, _idmef_heartbeat_new_child, _idmef_heartbeat_destroy_child, NULL, NULL, (void *) idmef_heartbeat_copy, (void *) idmef_heartbeat_clone, (void *) idmef_heartbeat_compare, (void *) idmef_heartbeat_ref, (void *) idmef_heartbeat_destroy }, /* ID: 47 */ { "message_type", 0, NULL, NULL, NULL, NULL, (void *) idmef_message_type_to_numeric, (void *) idmef_message_type_to_string, NULL, NULL, NULL, NULL, NULL }, /* ID: 48 */ { "message", sizeof(idmef_message_children_list) / sizeof(*idmef_message_children_list), idmef_message_children_list, _idmef_message_get_child, _idmef_message_new_child, _idmef_message_destroy_child, NULL, NULL, (void *) idmef_message_copy, (void *) idmef_message_clone, (void *) idmef_message_compare, (void *) idmef_message_ref, (void *) idmef_message_destroy }, /* ID: 49 */ { "reference", sizeof(idmef_reference_children_list) / sizeof(*idmef_reference_children_list), idmef_reference_children_list, _idmef_reference_get_child, _idmef_reference_new_child, _idmef_reference_destroy_child, NULL, NULL, (void *) idmef_reference_copy, (void *) idmef_reference_clone, (void *) idmef_reference_compare, (void *) idmef_reference_ref, (void *) idmef_reference_destroy }, /* ID: 50 */ { "(unassigned)", 0, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL }, /* ID: 51 */ { "checksum", sizeof(idmef_checksum_children_list) / sizeof(*idmef_checksum_children_list), idmef_checksum_children_list, _idmef_checksum_get_child, _idmef_checksum_new_child, _idmef_checksum_destroy_child, NULL, NULL, (void *) idmef_checksum_copy, (void *) idmef_checksum_clone, (void *) idmef_checksum_compare, (void *) idmef_checksum_ref, (void *) idmef_checksum_destroy }, /* ID: 52 */ { "checksum_algorithm", 0, NULL, NULL, NULL, NULL, (void *) idmef_checksum_algorithm_to_numeric, (void *) idmef_checksum_algorithm_to_string, NULL, NULL, NULL, NULL, NULL }, /* ID: 53 */ { NULL, 0, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL } }; libprelude-1.0.0/src/tls-auth.c0000664000076400007640000003110711330537773013301 00000000000000/***** * * Copyright (C) 2004,2005,2006,2007 PreludeIDS Technologies. All Rights Reserved. * Author: Yoann Vandoorselaere * * This file is part of the Prelude library. * * 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; see the file COPYING. If not, write to * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. * *****/ #include "config.h" #include #include #include #include #include #include #include #include #include #include "glthread/lock.h" #define PRELUDE_ERROR_SOURCE_DEFAULT PRELUDE_ERROR_SOURCE_CONNECTION #include "prelude-error.h" #include "common.h" #include "prelude-log.h" #include "prelude-client.h" #include "prelude-message-id.h" #include "prelude-extract.h" #include "tls-util.h" #include "tls-auth.h" #ifdef HAVE_GNUTLS_STRING_PRIORITY static gnutls_priority_t tls_priority; #endif static prelude_bool_t priority_set = FALSE; static int read_auth_result(prelude_io_t *fd) { int ret; void *buf; uint8_t tag; uint32_t len; prelude_msg_t *msg = NULL; do { ret = prelude_msg_read(&msg, fd); } while ( ret < 0 && prelude_error_get_code(ret) == PRELUDE_ERROR_EAGAIN ); if ( ret < 0 ) return ret; if ( prelude_msg_get_tag(msg) != PRELUDE_MSG_AUTH ) { prelude_msg_destroy(msg); return prelude_error(PRELUDE_ERROR_INVAL_MESSAGE); } ret = prelude_msg_get(msg, &tag, &len, &buf); if ( ret < 0 ) { prelude_msg_destroy(msg); return ret; } if ( tag != PRELUDE_MSG_AUTH_SUCCEED ) { prelude_msg_destroy(msg); return prelude_error(PRELUDE_ERROR_TLS_AUTH_REJECTED); } prelude_msg_destroy(msg); return 0; } static int verify_certificate(gnutls_session session) { time_t now; int ret, alert = 0; unsigned int status; const prelude_error_code_t code = PRELUDE_ERROR_PROFILE; ret = gnutls_certificate_verify_peers2(session, &status); if ( ret < 0 ) { gnutls_alert_send_appropriate(session, ret); return prelude_error_verbose(code, "TLS certificate verification failed: %s", gnutls_strerror(ret)); } if ( status & GNUTLS_CERT_INVALID ) { alert = GNUTLS_A_BAD_CERTIFICATE; ret = prelude_error_verbose(code, "TLS server certificate is NOT trusted"); } else if ( status & GNUTLS_CERT_REVOKED ) { alert = GNUTLS_A_CERTIFICATE_REVOKED; ret = prelude_error_verbose(code, "TLS server certificate was revoked"); } else if ( status & GNUTLS_CERT_SIGNER_NOT_FOUND) { alert = GNUTLS_A_UNKNOWN_CA; ret = prelude_error_verbose(code, "TLS server certificate issuer is unknown"); } else if ( status & GNUTLS_CERT_SIGNER_NOT_CA ) { alert = GNUTLS_A_CERTIFICATE_UNKNOWN; ret = prelude_error_verbose(code, "TLS server certificate issuer is not a CA"); } #ifdef GNUTLS_CERT_INSECURE_ALGORITHM else if ( status & GNUTLS_CERT_INSECURE_ALGORITHM ) { alert = GNUTLS_A_INSUFFICIENT_SECURITY; ret = prelude_error_verbose(code, "TLS server certificate use insecure algorithm"); } #endif now = time(NULL); if ( gnutls_certificate_activation_time_peers(session) > now ) ret = prelude_error_verbose(code, "TLS server certificate not yet activated"); if ( gnutls_certificate_expiration_time_peers(session) < now ) ret = prelude_error_verbose(code, "TLS server certificate expired"); if ( ret < 0 ) gnutls_alert_send(session, GNUTLS_AL_FATAL, alert); return ret; } static int handle_gnutls_error(gnutls_session session, int ret) { int last_alert; if ( ret == GNUTLS_E_WARNING_ALERT_RECEIVED ) { last_alert = gnutls_alert_get(session); prelude_log(PRELUDE_LOG_WARN, "TLS: received warning alert: %s.\n", gnutls_alert_get_name(last_alert)); return 0; } else if ( ret == GNUTLS_E_FATAL_ALERT_RECEIVED ) { last_alert = gnutls_alert_get(session); prelude_log(PRELUDE_LOG_WARN, "TLS: received fatal alert: %s.\n", gnutls_alert_get_name(last_alert)); return -1; } if ( ret == GNUTLS_E_AGAIN || ret == GNUTLS_E_INTERRUPTED ) return 0; gnutls_alert_send_appropriate(session, ret); return ret; } static inline gnutls_transport_ptr fd_to_ptr(int fd) { union { gnutls_transport_ptr ptr; int fd; } data; data.fd = fd; return data.ptr; } static inline int ptr_to_fd(gnutls_transport_ptr ptr) { union { gnutls_transport_ptr ptr; int fd; } data; data.ptr = ptr; return data.fd; } static void set_default_priority(gnutls_session session) { #ifdef HAVE_GNUTLS_STRING_PRIORITY gnutls_priority_set(session, tls_priority); #else const int c_prio[] = { GNUTLS_COMP_NULL, 0 }; gnutls_set_default_priority(session); /* * We override the default compression method since in early GnuTLS * version, DEFLATE would be the default, and NULL would not be * available. */ gnutls_compression_set_priority(session, c_prio); #endif } int tls_auth_init_priority(const char *tlsopts) { #ifdef HAVE_GNUTLS_STRING_PRIORITY { int ret; const char *errptr; ret = gnutls_priority_init(&tls_priority, (tlsopts) ? tlsopts : "NORMAL", &errptr); if ( ret < 0 ) return prelude_error_verbose_make(PRELUDE_ERROR_SOURCE_CLIENT, PRELUDE_ERROR_TLS, "TLS options '%s': %s", errptr, gnutls_strerror(ret)); } #else if ( tlsopts ) return prelude_error_verbose_make(PRELUDE_ERROR_SOURCE_CLIENT, PRELUDE_ERROR_TLS, "settings TLS options require GnuTLS 2.2.0 or above.\n"); #endif priority_set = TRUE; return 0; } static ssize_t tls_pull(gnutls_transport_ptr fd, void *buf, size_t count) { return read(ptr_to_fd(fd), buf, count); } static ssize_t tls_push(gnutls_transport_ptr fd, const void *buf, size_t count) { return write(ptr_to_fd(fd), buf, count); } int tls_auth_connection(prelude_client_profile_t *cp, prelude_io_t *io, int crypt, uint64_t *analyzerid, prelude_connection_permission_t *permission) { void *cred; int ret, fd; gnutls_session session; if ( ! priority_set ) { ret = tls_auth_init_priority(NULL); if ( ret < 0 ) return ret; } ret = prelude_client_profile_get_credentials(cp, &cred); if ( ret < 0 ) return ret; ret = gnutls_init(&session, GNUTLS_CLIENT); if ( ret < 0 ) return prelude_error_verbose(PRELUDE_ERROR_PROFILE, "TLS initialization error: %s", gnutls_strerror(ret)); set_default_priority(session); gnutls_credentials_set(session, GNUTLS_CRD_CERTIFICATE, cred); fd = prelude_io_get_fd(io); gnutls_transport_set_ptr(session, fd_to_ptr(fd)); gnutls_transport_set_pull_function(session, tls_pull); gnutls_transport_set_push_function(session, tls_push); do { ret = gnutls_handshake(session); } while ( ret < 0 && handle_gnutls_error(session, ret) == 0 ); if ( ret < 0 ) { gnutls_deinit(session); return prelude_error_verbose(PRELUDE_ERROR_PROFILE, "TLS handshake failed: %s", gnutls_strerror(ret)); } ret = verify_certificate(session); if ( ret < 0 ) { gnutls_deinit(session); return ret; } prelude_io_set_tls_io(io, session); ret = read_auth_result(io); if ( ret < 0 ) return ret; ret = tls_certificate_get_peer_analyzerid(session, analyzerid); if ( ret < 0 ) return ret; ret = tls_certificate_get_permission(session, permission); if ( ret < 0 ) return ret; if ( ! crypt ) { do { ret = gnutls_bye(session, GNUTLS_SHUT_RDWR); } while ( ret < 0 && handle_gnutls_error(session, ret) == 0 ); if ( ret < 0 ) ret = prelude_error_verbose(PRELUDE_ERROR_TLS, "TLS bye failed: %s", gnutls_strerror(ret)); gnutls_deinit(session); prelude_io_set_sys_io(io, fd); } return ret; } int tls_auth_init(prelude_client_profile_t *cp, gnutls_certificate_credentials *cred) { int ret; size_t size; gnutls_datum data; gnutls_x509_privkey key; char keyfile[PATH_MAX], certfile[PATH_MAX]; *cred = NULL; prelude_client_profile_get_tls_key_filename(cp, keyfile, sizeof(keyfile)); ret = access(keyfile, F_OK); if ( ret < 0 ) return prelude_error_verbose_make(PRELUDE_ERROR_SOURCE_CLIENT, PRELUDE_ERROR_PROFILE, "access to %s failed: %s", keyfile, strerror(errno)); prelude_client_profile_get_tls_client_keycert_filename(cp, certfile, sizeof(certfile)); ret = access(certfile, F_OK); if ( ret < 0 ) return prelude_error_verbose_make(PRELUDE_ERROR_SOURCE_CLIENT, PRELUDE_ERROR_PROFILE, "access to %s failed: %s", certfile, strerror(errno)); ret = _prelude_load_file(keyfile, &data.data, &size); if ( ret < 0 ) return ret; data.size = (unsigned int) size; ret = gnutls_x509_privkey_init(&key); if ( ret < 0 ) { _prelude_unload_file(data.data, data.size); return prelude_error_verbose_make(PRELUDE_ERROR_SOURCE_CLIENT, PRELUDE_ERROR_TLS, "Error initializing X509 private key: %s", gnutls_strerror(ret)); } ret = gnutls_x509_privkey_import(key, &data, GNUTLS_X509_FMT_PEM); if ( ret < 0 ) { ret = prelude_error_verbose_make(PRELUDE_ERROR_SOURCE_CLIENT, PRELUDE_ERROR_TLS, "Error importing X509 private key: %s", gnutls_strerror(ret)); goto err; } ret = gnutls_certificate_allocate_credentials(cred); if ( ret < 0 ) { ret = prelude_error_verbose_make(PRELUDE_ERROR_SOURCE_CLIENT, PRELUDE_ERROR_TLS, "Error initializing TLS credentials: %s", gnutls_strerror(ret)); goto err; } ret = tls_certificates_load(key, certfile, *cred); if ( ret < 0 ) goto err; prelude_client_profile_get_tls_client_trusted_cert_filename(cp, certfile, sizeof(certfile)); ret = gnutls_certificate_set_x509_trust_file(*cred, certfile, GNUTLS_X509_FMT_PEM); if ( ret < 0 ) ret = prelude_error_verbose_make(PRELUDE_ERROR_SOURCE_CLIENT, PRELUDE_ERROR_PROFILE, "could not set x509 trust file '%s': %s", certfile, gnutls_strerror(ret)); err: if ( ret < 0 && *cred ) gnutls_certificate_free_credentials(*cred); gnutls_x509_privkey_deinit(key); _prelude_unload_file(data.data, data.size); return ret; } void tls_auth_deinit(void) { #ifdef HAVE_GNUTLS_STRING_PRIORITY if ( priority_set ) { gnutls_priority_deinit(tls_priority); priority_set = FALSE; } #endif } libprelude-1.0.0/src/prelude-option.c0000664000076400007640000013605611325615317014512 00000000000000/***** * * Copyright (C) 2001, 2002, 2003, 2004, 2005 PreludeIDS Technologies. All Rights Reserved. * Author: Yoann Vandoorselaere * * This file is part of the Prelude library. * * 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; see the file COPYING. If not, write to * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. * *****/ #include "config.h" #include "libmissing.h" #include #include #include #include #include #include #include #include "prelude-inttypes.h" #include "prelude-message-id.h" #include "prelude-msgbuf.h" #include "prelude-linked-object.h" #include "prelude-list.h" #include "prelude-log.h" #include "variable.h" #include "config-engine.h" #include "prelude-option.h" #include "prelude-client.h" #include "prelude-error.h" #include "common.h" #define SET_FROM_CLI 1 #define SET_FROM_CFG 2 #define DEFAULT_INSTANCE_NAME "default" struct prelude_option_context { prelude_list_t list; void *data; char *name; }; struct prelude_option { PRELUDE_LINKED_OBJECT; prelude_list_t optlist; prelude_option_t *parent; prelude_option_type_t type; prelude_option_priority_t priority; char shortopt; char *value; const char *longopt; const char *description; prelude_option_argument_t has_arg; int (*commit)(prelude_option_t *opt, prelude_string_t *out, void *context); int (*set)(prelude_option_t *opt, const char *optarg, prelude_string_t *out, void *context); int (*get)(prelude_option_t *opt, prelude_string_t *out, void *context); int (*destroy)(prelude_option_t *opt, prelude_string_t *out, void *context); const char *help; const char *input_validation_regex; prelude_option_input_type_t input_type; void *data; void *private_data; prelude_list_t value_list; void *default_context; prelude_list_t context_list; }; struct cb_list { prelude_list_t list; char *arg; int set_from; prelude_list_t children; prelude_option_t *option; }; static int get_missing_options(void *context, config_t *cfg, const char *filename, prelude_list_t *cblist, prelude_option_t *rootlist, unsigned int *line, int depth, prelude_string_t *err); /* * contain all option */ static prelude_option_t *root_optlist = NULL; extern prelude_option_t *_prelude_generic_optlist; /* * Warning are turned on by default. */ static int warnings_flags = PRELUDE_OPTION_WARNING_OPTION|PRELUDE_OPTION_WARNING_ARG; static void option_err(int flag, const char *fmt, ...) { if ( warnings_flags & flag ) { va_list ap; va_start(ap, fmt); vfprintf(stderr, fmt, ap); va_end(ap); } } static int option_ret_error(prelude_error_code_t code, prelude_string_t *err, const char *fmt, ...) { int ret; va_list ap; va_start(ap, fmt); prelude_string_vprintf(err, fmt, ap); ret = prelude_error_verbose(code, "%s", prelude_string_get_string(err)); va_end(ap); return ret; } static int cmp_option(prelude_option_t *opt, const char *optname, size_t optnamelen, prelude_option_type_t type) { if ( ! (opt->type & type) ) return -1; if ( opt->longopt && strncasecmp(optname, opt->longopt, optnamelen) == 0 && strlen(opt->longopt) == optnamelen ) return 0; if ( optnamelen == 1 && opt->shortopt == *optname ) return 0; return -1; } /* * Search an option of a given name in the given option list. */ static prelude_option_t *search_option_fast(prelude_option_t *root, const char *optname, size_t optnamelen, prelude_option_type_t type, prelude_bool_t walk_children) { int cmp; prelude_list_t *tmp; prelude_option_t *item, *ret; if ( ! root ) return NULL; #if 0 cmp = cmp_option(root, optname, type); if ( cmp == 0 ) return root; #endif prelude_list_for_each(&root->optlist, tmp) { item = prelude_linked_object_get_object(tmp); if ( walk_children || (! item->longopt && ! item->shortopt) ) { ret = search_option_fast(item, optname, optnamelen, type, walk_children); if ( ret ) return ret; } cmp = cmp_option(item, optname, optnamelen, type); if ( cmp == 0 ) return item; } return NULL; } static prelude_option_t *search_option(prelude_option_t *root, const char *optname, prelude_option_type_t type, prelude_bool_t walk_children) { return search_option_fast(root, optname, strcspn(optname, "="), type, walk_children); } static prelude_bool_t is_an_argument(const char *stuff) { prelude_option_t *opt; size_t len = strlen(stuff); if ( stuff[0] == '-' && (len == 2 || (len > 2 && stuff[1] == '-')) ) { opt = prelude_option_search(NULL, stuff + strspn(stuff, "-"), ~0, TRUE); return opt ? FALSE : TRUE; } return TRUE; } static int check_option(prelude_option_t *option, const char *arg, prelude_string_t *err) { int ret = 0; switch (option->has_arg) { case PRELUDE_OPTION_ARGUMENT_NONE: if ( arg ) ret = option_ret_error(PRELUDE_ERROR_GENERIC, err, "option '%s' does not take an argument", option->longopt); case PRELUDE_OPTION_ARGUMENT_OPTIONAL: break; case PRELUDE_OPTION_ARGUMENT_REQUIRED: if ( ! arg || ! is_an_argument(arg) ) ret = option_ret_error(PRELUDE_ERROR_GENERIC, err, "option '%s' require an argument", option->longopt); break; } return ret; } static int process_cfg_file(void *context, prelude_list_t *cblist, prelude_option_t *optlist, const char *filename, prelude_string_t *err) { int ret; config_t *cfg; unsigned int line = 0; prelude_log_debug(3, "Using configuration file: %s.\n", filename); ret = _config_open(&cfg, filename); if ( ret < 0 ) return ret; ret = get_missing_options(context, cfg, filename, cblist, optlist, &line, 0, err); _config_close(cfg); return ret; } static int do_set(prelude_option_t *opt, const char *value, prelude_string_t *out, void **context) { int ret; prelude_option_context_t *oc; if ( opt->default_context ) *context = opt->default_context; if ( ! opt->set ) return 0; if ( opt->has_arg == PRELUDE_OPTION_ARGUMENT_OPTIONAL && value && ! *value ) value = NULL; ret = opt->set(opt, value, out, *context); if ( ret < 0 ) { if ( prelude_string_is_empty(out) ) { prelude_string_sprintf(out, "error while setting option '%s'", opt->longopt); if ( prelude_error_is_verbose(ret) || prelude_error_get_code(ret) != PRELUDE_ERROR_GENERIC ) prelude_string_sprintf(out, ": %s", prelude_strerror(ret)); } return ret; } if ( opt->type & PRELUDE_OPTION_TYPE_CONTEXT ) { oc = prelude_option_search_context(opt, value); if ( ! oc ) return -1; *context = oc->data; } return ret; } static int call_option_cb(void *context, struct cb_list **cbl, prelude_list_t *cblist, prelude_option_t *option, const char *arg, prelude_string_t *err, int set_from) { struct cb_list *new, *cb; prelude_option_priority_t pri; prelude_list_t *tmp, *prev = NULL; if ( option->priority == PRELUDE_OPTION_PRIORITY_IMMEDIATE ) { prelude_log_debug(3, "[immediate] %s(%s)\n", option->longopt, arg ? arg : ""); return do_set(option, arg, err, &context); } prelude_log_debug(3, "[queue=%p] %s(%s)\n", cblist, option->longopt, arg ? arg : ""); prelude_list_for_each(cblist, tmp) { cb = prelude_list_entry(tmp, struct cb_list, list); pri = option->priority; if ( set_from == SET_FROM_CFG && option->priority == cb->option->priority && cb->set_from == SET_FROM_CLI ) { prev = tmp; break; } else if ( pri < cb->option->priority ) { prev = tmp; break; } } *cbl = new = malloc(sizeof(*new)); if ( ! new ) return prelude_error_from_errno(errno); prelude_list_init(&new->children); new->option = option; new->set_from = set_from; new->arg = (arg) ? strdup(arg) : NULL; if ( option->priority == PRELUDE_OPTION_PRIORITY_LAST ) { prelude_list_add_tail(cblist, &new->list); return 0; } if ( ! prev ) prev = cblist; prelude_list_add_tail(prev, &new->list); *cbl = new; return 0; } static int call_option_from_cb_list(prelude_list_t *cblist, prelude_string_t *err, void *default_context, int depth) { int ret = 0; struct cb_list *cb; prelude_list_t *tmp, *bkp; void *context = default_context; prelude_list_for_each_safe(cblist, tmp, bkp) { cb = prelude_list_entry(tmp, struct cb_list, list); prelude_log_debug(2, "%s(%s) context=%p default=%p\n", cb->option->longopt, cb->arg ? cb->arg : "", context, default_context); ret = do_set(cb->option, cb->arg, err, &context); if ( ret < 0 ) return ret; if ( ! prelude_list_is_empty(&cb->children) ) { ret = call_option_from_cb_list(&cb->children, err, context, depth + 1); if ( ret < 0 ) return ret; } if ( cb->option->commit ) { prelude_log_debug(2, "commit %s\n", cb->option->longopt); ret = cb->option->commit(cb->option, err, context); if ( ret < 0 ) { return ret; } } context = default_context; if ( cb->arg ) free(cb->arg); prelude_list_del(&cb->list); free(cb); } return 0; } /* * Try to get all option that were not set from the command line in the config file. */ static int get_missing_options(void *context, config_t *cfg, const char *filename, prelude_list_t *cblist, prelude_option_t *rootlist, unsigned int *line, int depth, prelude_string_t *err) { int ret; prelude_option_t *opt; struct cb_list *cbitem; char *section = NULL, *entry = NULL, *value = NULL; while ( (_config_get_next(cfg, §ion, &entry, &value, line)) == 0 ) { opt = search_option(rootlist, (section && ! entry) ? section : entry, PRELUDE_OPTION_TYPE_CFG, FALSE); if ( ! opt && entry && value && strcmp(entry, "include") == 0 ) { ret = process_cfg_file(context, cblist, rootlist, value, err); if ( ret < 0 ) return ret; continue; } if ( ! opt ) { if ( (opt = search_option(_prelude_generic_optlist, (section && ! entry) ? section : entry, ~0, FALSE)) ) { get_missing_options(context, cfg, filename, NULL, opt, line, depth + 1, err); continue; } if ( depth != 0 ) { (*line)--; if ( entry ) free(entry); if ( value ) free(value); if ( section ) free(section); return 0; } if ( section && ! entry ) option_err(PRELUDE_OPTION_WARNING_OPTION, "%s:%d: invalid section : \"%s\".\n", filename, *line, section); else option_err(PRELUDE_OPTION_WARNING_ARG, "%s:%d: invalid option \"%s\" in \"%s\" section.\n", filename, *line, entry, (section) ? section : "global"); continue; } if ( section && ! entry ) { if ( cblist ) { ret = check_option(opt, value, err); if ( ret < 0 ) { const char *tmp = _prelude_thread_get_error(); return prelude_error_verbose(prelude_error_get_code(ret), "%s:%d: %s", filename, *line, tmp); } ret = call_option_cb(context, &cbitem, cblist, opt, value, err, SET_FROM_CFG); if ( ret < 0 ) return ret; } ret = get_missing_options(context, cfg, filename, (cblist) ? &cbitem->children : NULL, opt, line, depth + 1, err); if ( ret < 0 ) return ret; } else if ( cblist ) { ret = check_option(opt, value, err); if ( ret < 0 ) { const char *tmp = _prelude_thread_get_error(); return prelude_error_verbose(prelude_error_get_code(ret), "%s:%d: %s", filename, *line, tmp); } ret = call_option_cb(context, &cbitem, cblist, opt, value, err, SET_FROM_CFG); if ( ret < 0 ) return ret; } } return 0; } static void remove_argv(int argc, char **argv, char **unhandled, int *unhandled_index, int removed) { int i; unhandled[(*unhandled_index)++] = argv[removed]; for ( i = removed; (i + 1) < argc; i++ ) argv[i] = argv[i + 1]; } static int parse_option(prelude_option_t *root_optlist, prelude_option_t *optlist, int *argc, char **argv, int *argv_index, char **unhandled, int *unhandled_index, char **option, const char **value, prelude_option_t **opt, prelude_bool_t *ignore) { size_t len; int ret, optch = 0; prelude_option_t *tmp; *value = NULL; *option = argv[(*argv_index)++]; len = strlen(*option); if ( **option != '-' || len == 1 ) { remove_argv(*argc, argv, unhandled, unhandled_index, --(*argv_index)); return 0; } if ( strcmp(*option, "--") == 0 ) { for ( ret = *argv_index; ret < *argc; ret++ ) remove_argv(*argc, argv, unhandled, unhandled_index, ret); return -1; /* break */ } while ( **option == '-' ) { (*option)++; optch++; } if ( ! isalnum((int) **option) ) return 0; /* * FIXME: handle consecutive shortopt */ *value = strchr(*option, '='); if ( ! *value ) *option = strdup(*option); else { *option = strndup(*option, strcspn(*option, "=")); (*value)++; } *opt = search_option(optlist, *option, PRELUDE_OPTION_TYPE_CLI, FALSE); if ( root_optlist != _prelude_generic_optlist && (tmp = search_option(_prelude_generic_optlist, *option, ~0, FALSE)) ) { *opt = tmp; *ignore = TRUE; } if ( ! *opt ) return 1; if ( (*opt)->has_arg == PRELUDE_OPTION_ARGUMENT_REQUIRED && ! *value && (*argv_index < *argc) ) *value = argv[(*argv_index)++]; return 1; } static int parse_argument(void *context, prelude_list_t *cb_list, prelude_option_t *root_optlist, prelude_option_t *optlist, int *argc, char **argv, int *argv_index, char **unhandled, int *unhandled_index, int depth, prelude_string_t *err, prelude_bool_t ignore) { int ret; char *option; const char *arg; prelude_option_t *opt; struct cb_list *cbitem; while ( *argv_index < (*argc - *unhandled_index) ) { ret = parse_option(root_optlist, optlist, argc, argv, argv_index, unhandled, unhandled_index, &option, &arg, &opt, &ignore); if ( ret < 0 ) break; else if ( ret == 0 ) continue; if ( ! opt ) { if ( depth ) { free(option); (*argv_index)--; return 0; } remove_argv(*argc, argv, unhandled, unhandled_index, --(*argv_index)); option_err(PRELUDE_OPTION_WARNING_OPTION, "Invalid option -- \"%s\" (%d).\n", option, depth); free(option); continue; } free(option); ret = check_option(opt, arg, err); if ( ret < 0 ) return ret; if ( ! ignore ) { ret = call_option_cb(context, &cbitem, cb_list, opt, arg, err, SET_FROM_CLI); if ( ret < 0 ) return ret; } /* * If the option we just found have sub-option. * Try to match the rest of our argument against them. */ if ( ! prelude_list_is_empty(&opt->optlist) ) { ret = parse_argument(context, &cbitem->children, root_optlist, opt, argc, argv, argv_index, unhandled, unhandled_index, depth + 1, err, ignore); if ( ret < 0 ) return ret; ignore = FALSE; } } return 0; } static int get_option_from_optlist(void *context, prelude_option_t *optlist, const char **filename, int *argc, char **argv, prelude_string_t **err) { char **unhandled; prelude_list_t cblist; int i, unhandled_index = 0, argv_index = 1, ret = 0; prelude_list_init(&cblist); if ( argc ) { unhandled = malloc(*argc * sizeof(*unhandled)); if ( ! unhandled ) return prelude_error_from_errno(errno); ret = parse_argument(context, &cblist, optlist, optlist, argc, argv, &argv_index, unhandled, &unhandled_index, 0, *err, FALSE); for ( i = 0; i < unhandled_index; i++) argv[*argc - unhandled_index + i] = unhandled[i]; free(unhandled); if ( ret < 0 ) return ret; unhandled_index += ret; } if ( filename && *filename ) { ret = process_cfg_file(context, &cblist, optlist, *filename, *err); if ( ret < 0 ) return ret; } ret = call_option_from_cb_list(&cblist, *err, context, 0); if ( ret < 0 ) return ret; return *argc - unhandled_index; } /** * prelude_option_read: * @option: A pointer on an option (list). * @filename: Pointer to the config filename. * @argc: Number of argument. * @argv: Argument list. * @err: Pointer to a #prelude_string_t object where to store an error string. * @context: Pointer to an optional option context. * * prelude_option_read(), parse the given argument and try to * match them against option in @option. If an option match, it's associated * callback function is called with the eventual option argument if any. * * Option not matched on the command line are searched in the configuration file * specified by @filename. * * if @option is NULL, all system option will be matched against argc, and argv. * * Returns: The index of the first unhandled parameter if option parsing succeeded, * or a negative value if an error occured. */ int prelude_option_read(prelude_option_t *option, const char **filename, int *argc, char **argv, prelude_string_t **err, void *context) { int ret; PRELUDE_LIST(optlist); ret = prelude_string_new(err); if ( ret < 0 ) return ret; if ( option ) ret = get_option_from_optlist(context, option, filename, argc, argv, err); else ret = get_option_from_optlist(context, root_optlist, filename, argc, argv, err); if ( ret < 0 ) goto err; err: if ( prelude_string_is_empty(*err) ) { prelude_string_destroy(*err); *err = NULL; } return ret; } /** * prelude_option_add: * @parent: Pointer on a parent option. * @retopt: Pointer where to store the created option. * @type: bitfields. * @shortopt: Short option name. * @longopt: Long option name. * @desc: Description of the option. * @has_arg: Define if the option has argument. * @set: Callback to be called when the value for this option change. * @get: Callback to be called to get the value for this option. * * prelude_option_add() create a new option. The option is set to be the child * of @parent, unless it is NULL. In this case the option is a root option. * * The @type parameters can be set to PRELUDE_OPTION_TYPE_CLI (telling the * option may be searched on the command line), PRELUDE_OPTION_TYPE_CFG (telling * the option may be searched in the configuration file) or both. * * Returns: Pointer on the option object, or NULL if an error occured. */ int prelude_option_add(prelude_option_t *parent, prelude_option_t **retopt, prelude_option_type_t type, char shortopt, const char *longopt, const char *desc, prelude_option_argument_t has_arg, int (*set)(prelude_option_t *opt, const char *optarg, prelude_string_t *err, void *context), int (*get)(prelude_option_t *opt, prelude_string_t *out, void *context)) { int ret; prelude_option_t *new; if ( parent ) { prelude_option_t *dup; char tmp[2] = { shortopt, 0 }; if ( longopt && (dup = prelude_option_search(parent, longopt, ~0, FALSE)) ) { prelude_log(PRELUDE_LOG_WARN, "New option '%s' ('%c') conflict with '%s' ('%c').\n", longopt, shortopt, dup->longopt, dup->shortopt); return -1; } if ( shortopt && (dup = prelude_option_search(parent, tmp, ~0, FALSE)) ) { prelude_log(PRELUDE_LOG_WARN, "New option '%s' ('%c') conflict with '%s' ('%c').\n", longopt, shortopt, dup->longopt, dup->shortopt); return -1; } } if ( type & PRELUDE_OPTION_TYPE_WIDE && ! longopt ) return -1; ret = prelude_option_new(parent, &new); if ( ret < 0 ) return ret; prelude_list_init(&new->optlist); prelude_list_init(&new->context_list); new->priority = PRELUDE_OPTION_PRIORITY_NONE; new->input_type = PRELUDE_OPTION_INPUT_TYPE_STRING; new->type = type; new->has_arg = has_arg; new->longopt = longopt; new->shortopt = shortopt; new->description = desc; new->set = set; new->get = get; if ( retopt ) *retopt = new; return 0; } static int uint32_write(uint32_t data, prelude_msgbuf_t *msg, uint8_t tag) { data = htonl(data); return prelude_msgbuf_set(msg, tag, sizeof(data), &data); } static void send_option_msg(prelude_bool_t parent_need_context, void *context, prelude_option_t *opt, const char *iname, prelude_msgbuf_t *msg) { int ret; prelude_string_t *value; const char *name = (iname) ? iname : opt->longopt; prelude_msgbuf_set(msg, PRELUDE_MSG_OPTION_START, 0, NULL); prelude_msgbuf_set(msg, PRELUDE_MSG_OPTION_NAME, strlen(name) + 1, name); uint32_write(opt->type, msg, PRELUDE_MSG_OPTION_TYPE); uint32_write(opt->has_arg, msg, PRELUDE_MSG_OPTION_HAS_ARG); uint32_write(opt->input_type, msg, PRELUDE_MSG_OPTION_INPUT_TYPE); if ( opt->description ) prelude_msgbuf_set(msg, PRELUDE_MSG_OPTION_DESC, strlen(opt->description) + 1, opt->description); if ( opt->type & PRELUDE_OPTION_TYPE_CONTEXT && ! context ) return; if ( parent_need_context && ! context ) return; if ( ! opt->get ) return; ret = prelude_string_new(&value); if ( ret < 0 ) return; ret = opt->get(opt, value, context); if ( ret < 0 ) { prelude_string_destroy(value); return; } if ( ! prelude_string_is_empty(value) ) prelude_msgbuf_set(msg, PRELUDE_MSG_OPTION_VALUE, prelude_string_get_len(value) + 1, prelude_string_get_string(value)); prelude_string_destroy(value); } static void construct_option_msg(prelude_bool_t parent_need_context, void *default_context, prelude_msgbuf_t *msg, prelude_option_t *root) { char value[1024]; prelude_option_t *opt; prelude_list_t *tmp, *tmp2; prelude_option_context_t *oc; prelude_list_for_each(&root->optlist, tmp) { opt = prelude_linked_object_get_object(tmp); prelude_list_for_each(&opt->context_list, tmp2) { oc = prelude_list_entry(tmp2, prelude_option_context_t, list); snprintf(value, sizeof(value), "%s[%s]", opt->longopt, oc->name); if ( opt->type & PRELUDE_OPTION_TYPE_WIDE ) send_option_msg(TRUE, oc->data, opt, value, msg); construct_option_msg(TRUE, oc->data, msg, opt); if ( opt->type & PRELUDE_OPTION_TYPE_WIDE ) prelude_msgbuf_set(msg, PRELUDE_MSG_OPTION_END, 0, NULL); } if ( prelude_list_is_empty(&opt->context_list) ) { void *ctx = NULL; prelude_bool_t need_ctx = opt->type & PRELUDE_OPTION_TYPE_CONTEXT ? TRUE : parent_need_context; if ( ! (opt->type & PRELUDE_OPTION_TYPE_CONTEXT) ) ctx = opt->default_context ? opt->default_context : default_context; if ( opt->type & PRELUDE_OPTION_TYPE_WIDE ) send_option_msg(need_ctx, ctx, opt, NULL, msg); construct_option_msg(need_ctx, ctx, msg, opt); if ( opt->type & PRELUDE_OPTION_TYPE_WIDE ) prelude_msgbuf_set(msg, PRELUDE_MSG_OPTION_END, 0, NULL); } } } int prelude_option_wide_send_msg(prelude_msgbuf_t *msgbuf, void *context) { prelude_msgbuf_set(msgbuf, PRELUDE_MSG_OPTION_LIST, 0, NULL); prelude_msgbuf_set(msgbuf, PRELUDE_MSG_OPTION_START, 0, NULL); construct_option_msg(FALSE, context, msgbuf, root_optlist); return 0; } static int get_max_char(const char *line, int descoff) { int desclen; int max = 0 , i; desclen = 80 - descoff; for ( i = 0; i < desclen; i++ ) { if ( line[i] == '\0' ) return i; if ( line[i] == ' ' ) max = i; } return max; } static int print_space(FILE *fd, size_t num) { char buf[3]; size_t len, totlen = 0; do { len = MIN(sizeof(buf), num - totlen); memset(buf, ' ', len); fwrite(buf, 1, len, fd); totlen += len; } while ( totlen < num ); return num; } static void print_wrapped(FILE *fd, const char *line, int descoff) { int max; size_t size = 0, i; while ( 1 ) { max = get_max_char(line + size, descoff); size += i= fwrite(line + size, 1, max, fd); if ( line[size] == '\0' ) { fputc('\n', fd); return; } fputc('\n', fd); print_space(fd, descoff - 1); } } static void print_options(FILE *fd, prelude_option_t *root, prelude_option_type_t type, int descoff, int depth) { int i; prelude_option_t *opt; prelude_list_t *tmp; prelude_list_for_each(&root->optlist, tmp) { opt = prelude_linked_object_get_object(tmp); /* * If type is not there, continue. */ if ( opt->type == PRELUDE_OPTION_TYPE_ROOT ) print_options(fd, opt, type, descoff, depth); else { i = 0; if ( type && ! (opt->type & type) ) continue; if ( depth ) { i += depth; print_space(fd, depth * 2); } if ( ! prelude_list_is_empty(&opt->optlist) ) fputc('\n', fd); if ( opt->shortopt != 0 ) i += fprintf(fd, "-%c%s", opt->shortopt, opt->longopt ? ", " : " "); if ( opt->longopt ) { if ( ! opt->shortopt && prelude_list_is_empty(&opt->optlist) ) i += fprintf(fd, " "); i += fprintf(fd, "--%s", opt->longopt); if ( (opt->has_arg == PRELUDE_OPTION_ARGUMENT_OPTIONAL || opt->has_arg == PRELUDE_OPTION_ARGUMENT_REQUIRED) && ! prelude_list_is_empty(&opt->optlist) ) i += fprintf(fd, "=[INAME] "); else if ( opt->has_arg == PRELUDE_OPTION_ARGUMENT_REQUIRED ) i += fprintf(fd, "=ARG "); else if ( opt->has_arg == PRELUDE_OPTION_ARGUMENT_OPTIONAL ) i += fprintf(fd, "=[ARG] "); else i+= fprintf(fd, " "); } if ( i < descoff ) i += print_space(fd, descoff - i); if ( opt->description ) print_wrapped(fd, opt->description, depth + descoff); else fputc('\n', fd); if ( ! prelude_list_is_empty(&opt->optlist) ) print_options(fd, opt, type, descoff, depth + 1); } } fputc('\n', fd); } /** * prelude_option_print: * @opt: Option(s) to print out. * @type: Only option with specified types will be printed. * @descoff: offset from the begining of the line where the description should start. * @fd: File descriptor where the option should be dumped. * * Dump option available in @opt and hooked to the given types. * If @opt is NULL, then the root of the option list is used. */ void prelude_option_print(prelude_option_t *opt, prelude_option_type_t type, int descoff, FILE *fd) { descoff += 9; print_options(fd, opt ? opt : root_optlist, type, descoff, 0); } /** * prelude_option_set_priority: * @option: Pointer on an option object. * @priority: Priority of the option object. * * prelude_option_set_priority() can be used to associate a priority * with an option. This can be used to solve dependancies problem within * differents options. * * A priority of -1 mean an option will always be executed last (with * all other option with a -1 priority). * * The default priority for an option is 0, the caller is responssible * for the way it assign priority (knowing that highest priority are always * executed first). */ void prelude_option_set_priority(prelude_option_t *option, prelude_option_priority_t priority) { assert(prelude_list_is_empty(&option->optlist)); option->priority = priority; } /** * prelude_option_destroy: * @option: Pointer on an option object. * * Destroy a #prelude_option_t object and all data associated * with it (including all suboption). */ void prelude_option_destroy(prelude_option_t *option) { prelude_list_t *tmp, *bkp; prelude_option_t *opt; if ( ! option ) { option = root_optlist; root_optlist = NULL; } prelude_list_for_each_safe(&option->optlist, tmp, bkp) { opt = prelude_linked_object_get_object(tmp); prelude_option_destroy(opt); } if ( option->value ) free(option->value); prelude_list_for_each_safe(&option->context_list, tmp, bkp) prelude_option_context_destroy(prelude_list_entry(tmp, prelude_option_context_t, list)); if ( ! prelude_list_is_empty(&option->_list) ) prelude_linked_object_del((prelude_linked_object_t *) option); free(option); } /** * prelude_option_set_warnings; * @new_warnings: bitwise OR of #prelude_option_warning_t. * @old_warnings: Pointer where to store the old #prelude_option_warning_t to. * * Set current warnings flags to @new_warnings. * * Uppon return, if not NULL, the pointer to @old_warnings is updated * to contain the old warnings. */ void prelude_option_set_warnings(prelude_option_warning_t new_warnings, prelude_option_warning_t *old_warnings) { if ( old_warnings ) *old_warnings = warnings_flags; warnings_flags = new_warnings; } void prelude_option_set_commit_callback(prelude_option_t *opt, prelude_option_commit_callback_t commit) { opt->commit = commit; } prelude_option_commit_callback_t prelude_option_get_commit_callback(prelude_option_t *opt) { return opt->commit; } void prelude_option_set_get_callback(prelude_option_t *opt, prelude_option_get_callback_t get) { opt->get = get; } prelude_option_get_callback_t prelude_option_get_get_callback(prelude_option_t *opt) { return opt->get; } void prelude_option_set_set_callback(prelude_option_t *opt, int (*set)(prelude_option_t *opt, const char *optarg, prelude_string_t *out, void *context)) { opt->set = set; } prelude_option_set_callback_t prelude_option_get_set_callback(prelude_option_t *opt) { return opt->set; } void prelude_option_set_destroy_callback(prelude_option_t *opt, prelude_option_destroy_callback_t destroy) { opt->destroy = destroy; opt->type |= PRELUDE_OPTION_TYPE_DESTROY; } prelude_option_destroy_callback_t prelude_option_get_destroy_callback(prelude_option_t *opt) { return opt->destroy; } char prelude_option_get_shortname(prelude_option_t *opt) { return opt->shortopt; } const char *prelude_option_get_longname(prelude_option_t *opt) { return opt->longopt; } void prelude_option_set_value(prelude_option_t *opt, const char *value) { if ( opt->value ) free(opt->value); opt->value = strdup(value); } prelude_list_t *prelude_option_get_optlist(prelude_option_t *opt) { return &opt->optlist; } prelude_option_t *prelude_option_get_next(prelude_option_t *start, prelude_option_t *cur) { prelude_list_t *tmp = (cur) ? &cur->_list : NULL; prelude_list_for_each_continue(&start->optlist, tmp) return prelude_linked_object_get_object(tmp); return NULL; } prelude_bool_t prelude_option_has_optlist(prelude_option_t *opt) { return ! prelude_list_is_empty(&opt->optlist); } const char *prelude_option_get_value(prelude_option_t *opt) { return opt->value; } void _prelude_option_set_private_data(prelude_option_t *opt, void *data) { opt->private_data = data; } void *_prelude_option_get_private_data(prelude_option_t *opt) { return opt->private_data; } void prelude_option_set_data(prelude_option_t *opt, void *data) { opt->data = data; } void *prelude_option_get_data(prelude_option_t *opt) { return opt->data; } int prelude_option_invoke_set(prelude_option_t *opt, const char *value, prelude_string_t *err, void **context) { int ret; ret = check_option(opt, value, err); if ( ret < 0 ) return ret; prelude_log_debug(3, "opt=%s value=%s\n", opt->longopt, value ? value : ""); return do_set(opt, value, err, context); } int prelude_option_invoke_commit(prelude_option_t *opt, const char *ctname, prelude_string_t *value, void *context) { int ret; prelude_option_context_t *oc = NULL; if ( ! opt->commit ) return 0; if ( opt->default_context ) context = opt->default_context; if ( opt->type & PRELUDE_OPTION_TYPE_CONTEXT ) { oc = prelude_option_search_context(opt, ctname); if ( ! oc ) return option_ret_error(PRELUDE_ERROR_GENERIC, value, "could not find option with context %s[%s]", opt->longopt, ctname); context = oc->data; } ret = opt->commit(opt, value, context); if ( ret < 0 && prelude_string_is_empty(value) ) ret = option_ret_error(prelude_error_get_code(ret), value, "could not find option with context %s[%s]", opt->longopt, ctname); return ret; } int prelude_option_invoke_destroy(prelude_option_t *opt, const char *ctname, prelude_string_t *value, void *context) { int ret; prelude_option_context_t *oc = NULL; if ( ! opt->destroy ) return option_ret_error(PRELUDE_ERROR_GENERIC, value, "%s does not support destruction", opt->longopt); if ( opt->default_context ) context = opt->default_context; if ( opt->type & PRELUDE_OPTION_TYPE_CONTEXT ) { oc = prelude_option_search_context(opt, ctname); if ( ! oc ) return option_ret_error(PRELUDE_ERROR_GENERIC, value, "could not find option with context %s[%s]", opt->longopt, ctname); context = oc->data; } ret = opt->destroy(opt, value, context); if ( ret < 0 && prelude_string_is_empty(value) ) return option_ret_error(PRELUDE_ERROR_GENERIC, value, "destruction for %s[%s] failed", opt->longopt, ctname); if ( oc ) prelude_option_context_destroy(oc); return 0; } int prelude_option_invoke_get(prelude_option_t *opt, const char *ctname, prelude_string_t *value, void *context) { prelude_option_context_t *oc; if ( ! opt->get ) { prelude_string_sprintf(value, "%s doesn't support value retrieval", opt->longopt); return -1; } if ( opt->default_context ) context = opt->default_context; if ( opt->type & PRELUDE_OPTION_TYPE_CONTEXT ) { oc = prelude_option_search_context(opt, ctname); if ( ! oc ) { prelude_string_sprintf(value, "could not find option with context %s[%s]", opt->longopt, ctname); return -1; } context = oc->data; } return opt->get(opt, value, context); } int prelude_option_new(prelude_option_t *parent, prelude_option_t **retopt) { prelude_option_t *new; if ( ! parent ) { if ( ! root_optlist ) { root_optlist = calloc(1, sizeof(*root_optlist)); if ( ! root_optlist ) return prelude_error_from_errno(errno); root_optlist->parent = parent; prelude_list_init(&root_optlist->optlist); prelude_list_init(&root_optlist->context_list); prelude_list_init(&root_optlist->_list); } parent = root_optlist; } new = *retopt = calloc(1, sizeof(**retopt)); if ( ! new ) return prelude_error_from_errno(errno); new->parent = parent; prelude_list_init(&new->optlist); prelude_list_init(&new->context_list); prelude_linked_object_add_tail(&parent->optlist, (prelude_linked_object_t *) new); return 0; } int prelude_option_new_root(prelude_option_t **retopt) { int ret; prelude_option_t *new; ret = prelude_option_new(NULL, &new); if ( ret < 0 ) return ret; new->longopt = NULL; new->type = PRELUDE_OPTION_TYPE_ROOT; if ( retopt ) *retopt = new; return 0; } void prelude_option_set_longopt(prelude_option_t *opt, const char *longopt) { opt->longopt = longopt; } const char *prelude_option_get_longopt(prelude_option_t *opt) { return opt->longopt; } void prelude_option_set_description(prelude_option_t *opt, const char *description) { opt->description = description; } const char *prelude_option_get_description(prelude_option_t *opt) { return opt->description; } void prelude_option_set_type(prelude_option_t *opt, prelude_option_type_t type) { opt->type = type; } prelude_option_type_t prelude_option_get_type(prelude_option_t *opt) { return opt->type; } void prelude_option_set_has_arg(prelude_option_t *opt, prelude_option_argument_t has_arg) { opt->has_arg = has_arg; } prelude_option_argument_t prelude_option_get_has_arg(prelude_option_t *opt) { return opt->has_arg; } void prelude_option_set_help(prelude_option_t *opt, const char *help) { opt->help = help; } const char *prelude_option_get_help(prelude_option_t *opt) { return opt->help; } void prelude_option_set_input_validation_regex(prelude_option_t *opt, const char *regex) { opt->input_validation_regex = regex; } const char *prelude_option_get_input_validation_regex(prelude_option_t *opt) { return opt->input_validation_regex; } void prelude_option_set_input_type(prelude_option_t *opt, prelude_option_input_type_t input_type) { opt->input_type = input_type; } prelude_option_input_type_t prelude_option_get_input_type(prelude_option_t *opt) { return opt->input_type; } prelude_option_t *prelude_option_get_parent(prelude_option_t *opt) { return opt->parent; } void prelude_option_set_default_context(prelude_option_t *opt, void *data) { opt->default_context = data; } int prelude_option_new_context(prelude_option_t *opt, prelude_option_context_t **ctx, const char *name, void *data) { prelude_option_context_t *new; new = malloc(sizeof(*new)); if ( ! new ) return prelude_error_from_errno(errno); if ( ! name || ! *name ) name = DEFAULT_INSTANCE_NAME; new->data = data; new->name = strdup(name); if ( ! new->name ) { free(new); return prelude_error_from_errno(errno); } if ( ! opt ) prelude_list_init(&new->list); else { opt->type |= PRELUDE_OPTION_TYPE_CONTEXT; prelude_list_add_tail(&opt->context_list, &new->list); } *ctx = new; return 0; } void prelude_option_context_set_data(prelude_option_context_t *oc, void *data) { oc->data = data; } void *prelude_option_context_get_data(prelude_option_context_t *oc) { return oc->data; } void prelude_option_context_destroy(prelude_option_context_t *oc) { if ( ! prelude_list_is_empty(&oc->list) ) prelude_list_del(&oc->list); if ( oc->name ) free(oc->name); free(oc); } prelude_option_t *prelude_option_search(prelude_option_t *parent, const char *name, prelude_option_type_t type, prelude_bool_t walk_children) { return search_option(parent ? parent : root_optlist, name, type, walk_children); } prelude_option_context_t *prelude_option_search_context(prelude_option_t *opt, const char *name) { int ret; prelude_list_t *tmp; prelude_option_context_t *ptr; if ( ! name || ! *name ) name = DEFAULT_INSTANCE_NAME; prelude_list_for_each(&opt->context_list, tmp) { ptr = prelude_list_entry(tmp, prelude_option_context_t, list); ret = strcasecmp(ptr->name, name); if ( ret == 0 ) return ptr; } return NULL; } libprelude-1.0.0/src/prelude-msg.c0000664000076400007640000006516711322603366013772 00000000000000/***** * * Copyright (C) 2001-2006,2007,2008 PreludeIDS Technologies. All Rights Reserved. * Author: Yoann Vandoorselaere * * This file is part of the Prelude library. * * 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; see the file COPYING. If not, write to * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. * *****/ #include "config.h" #include "libmissing.h" #include #include #include #include #include #include #include #if TIME_WITH_SYS_TIME # include # include #else # if HAVE_SYS_TIME_H # include # else # include # endif #endif #define PRELUDE_ERROR_SOURCE_DEFAULT PRELUDE_ERROR_SOURCE_MESSAGE #include "prelude-error.h" #include "common.h" #include "prelude-log.h" #include "prelude-inttypes.h" #include "prelude-extract.h" #include "prelude-io.h" #include "prelude-linked-object.h" #include "prelude-async.h" #include "prelude-msg.h" #define MSGBUF_SIZE 8192 #define PRELUDE_MSG_VERSION 1 #define PRELUDE_MSG_HDR_SIZE 16 #define MINIMUM_FRAGMENT_DATA_SIZE 1 typedef struct { uint8_t version; uint8_t tag; uint8_t priority; uint8_t is_fragment; uint32_t datalen; uint32_t tv_sec; uint32_t tv_usec; } prelude_msg_hdr_t; struct prelude_msg { PRELUDE_ASYNC_OBJECT; int refcount; uint32_t read_index; uint32_t header_index; uint32_t write_index; uint32_t fd_write_index; prelude_msg_hdr_t hdr; unsigned char hdrbuf[PRELUDE_MSG_HDR_SIZE]; unsigned char *payload; void *send_msg_data; int (*flush_msg_cb)(prelude_msg_t **msg, void *data); }; /* * Anything bigger than this will be discarded. */ static const size_t max_message_size = 100 * 1024 * 1024; static int call_alloc_cb(prelude_msg_t **msg) { int ret; ret = (*msg)->flush_msg_cb(msg, (*msg)->send_msg_data); if ( ret < 0 ) return ret; /* * Within the callback, the caller have the choise to use * a newly allocated message or to flush the current message and * reuse it. * * We have to reset write_index and is_fragment header member * in order to properly address the message buffer. And in order * for not all message to not look like fragment. */ (*msg)->header_index = 0; (*msg)->write_index = PRELUDE_MSG_HDR_SIZE; (*msg)->hdr.is_fragment = 0; return 0; } static void write_message_header(prelude_msg_t *msg) { uint32_t dlen; struct timeval tv; uint32_t hdr_offset = msg->header_index; dlen = htonl(msg->write_index - msg->header_index - PRELUDE_MSG_HDR_SIZE); msg->payload[hdr_offset++] = PRELUDE_MSG_VERSION; msg->payload[hdr_offset++] = msg->hdr.tag; msg->payload[hdr_offset++] = msg->hdr.priority; msg->payload[hdr_offset++] = msg->hdr.is_fragment; gettimeofday(&tv, NULL); msg->hdr.tv_sec = htonl(tv.tv_sec); msg->hdr.tv_usec = htonl(tv.tv_usec); memcpy(&msg->payload[hdr_offset], &dlen, sizeof(dlen)); memcpy(&msg->payload[hdr_offset + 4], &msg->hdr.tv_sec, sizeof(msg->hdr.tv_sec)); memcpy(&msg->payload[hdr_offset + 8], &msg->hdr.tv_usec, sizeof(msg->hdr.tv_usec)); } static int set_data(prelude_msg_t **m, const void *buf, size_t size) { int ret; size_t remaining; prelude_msg_t *msg = *m; remaining = (msg->hdr.datalen - msg->write_index); assert(msg->flush_msg_cb != NULL || remaining >= size); if ( size > remaining ) { /* * there is not enough free buffer space to store the whole * data in the message. Store what we can, and call the message * flushing function, which'll emit the current buffer * and allocate a new one. */ memcpy(msg->payload + msg->write_index, buf, remaining); size -= remaining; msg->write_index += remaining; buf = (const uint8_t *) buf + remaining; /* * this is a fragment of message. */ msg->hdr.is_fragment = 1; /* * the caller might destroy the message after this and re-allocate * one... or use synchronous send and reuse the same message. */ ret = call_alloc_cb(m); if ( ret < 0 ) return ret; return set_data(m, buf, size); } memcpy(msg->payload + msg->write_index, buf, size); msg->write_index += size; return 0; } inline static int read_message_data(unsigned char *dst, size_t *size, prelude_io_t *fd) { ssize_t ret; size_t count = *size; *size = 0; /* * Read the whole header. */ do { ret = prelude_io_read(fd, dst + *size, count - *size); if ( ret < 0 ) return ret; *size += ret; } while ( *size != count ); return 0; } inline static int slice_message_header(prelude_msg_t *msg, unsigned char *hdrbuf) { uint32_t tmp; if ( ! msg->hdr.datalen ) { /* * tag and priority are set on first fragment only. */ msg->hdr.version = hdrbuf[0]; msg->hdr.tag = hdrbuf[1]; msg->hdr.tv_sec = prelude_extract_uint32(hdrbuf + 8); msg->hdr.tv_usec = prelude_extract_uint32(hdrbuf + 12); } /* * message priority might be set in any fragment. */ if ( msg->hdr.priority == PRELUDE_MSG_PRIORITY_NONE ) msg->hdr.priority = hdrbuf[2]; msg->hdr.is_fragment = hdrbuf[3]; tmp = prelude_extract_uint32(hdrbuf + 4); if ( (msg->hdr.datalen + tmp) <= msg->hdr.datalen ) return prelude_error(PRELUDE_ERROR_INVAL_LENGTH); if ( (msg->hdr.datalen + tmp) >= max_message_size ) return prelude_error_verbose(PRELUDE_ERROR_INVAL_LENGTH, "maximum message size exceeded: %" PRELUDE_PRIu64 " > %" PRELUDE_PRIu64, (uint64_t) (msg->hdr.datalen + tmp), (uint64_t) max_message_size); msg->hdr.datalen += tmp; return 0; } static int read_message_header(prelude_msg_t **msgptr, prelude_io_t *fd) { int ret; size_t count; uint32_t old_dlen; prelude_msg_t *msg = *msgptr; unsigned char *hdrptr = &msg->hdrbuf[msg->header_index]; count = PRELUDE_MSG_HDR_SIZE - msg->header_index; ret = read_message_data(hdrptr, &count, fd); msg->header_index += count; if ( ret < 0 ) return ret; /* * we have a full header. Move it from our buffer * into a real header structure. */ old_dlen = msg->hdr.datalen; ret = slice_message_header(msg, msg->hdrbuf); if ( ret < 0 ) return ret; /* * sanity check. An attacker could arrange to make datalen * wrap arround by specifying an odd dlen in a fragment header. */ if ( (msg->hdr.datalen + PRELUDE_MSG_HDR_SIZE) <= old_dlen ) return prelude_error(PRELUDE_ERROR_INVAL_LENGTH); /* * Check protocol version. */ if ( msg->hdr.version != PRELUDE_MSG_VERSION ) return prelude_error_verbose(PRELUDE_ERROR_PROTOCOL_VERSION, "invalid protocol version '%d' (expected %d)", msg->hdr.version, PRELUDE_MSG_VERSION); msg->write_index = msg->hdr.datalen + PRELUDE_MSG_HDR_SIZE; /* * allocate our data buffer. We also want our buffer to be able to contain an * header so that it can be eventually sent... */ msg = _prelude_realloc(msg, sizeof(*msg) + PRELUDE_MSG_HDR_SIZE + msg->hdr.datalen); if ( ! msg ) return prelude_error_from_errno(errno); *msgptr = msg; msg->payload = ((unsigned char *) msg) + sizeof(*msg); return 0; } static int read_message_content(prelude_msg_t **m, prelude_io_t *fd) { int ret; size_t count; prelude_msg_t *msg = *m; count = (msg->hdr.datalen + PRELUDE_MSG_HDR_SIZE) - msg->read_index; ret = read_message_data(&msg->payload[msg->read_index], &count, fd); msg->read_index += count; if ( ret != 0 ) /* * there is still data to be read. */ return ret; if ( msg->hdr.is_fragment ) { /* * We just finished reading one fragment (not the last one). * Next bytes will be another message header. So reset header_index * to trigger header read on next prelude_msg_read() call. */ msg->header_index = 0; return prelude_msg_read(m, fd); } /* * we now have a full message. * * reset is_fragment to 0, so that if the message is written in the future, * it won't be marked as fragmented (we already defragmented it). * * Reset header_index to 0 because we would compute an invalid datalen * if this message is to be written in the future. * * Set read index to the point where data start, so that our buffer is correctly * addressed. */ msg->hdr.is_fragment = 0; msg->header_index = 0; msg->read_index = PRELUDE_MSG_HDR_SIZE; return ret; } /** * prelude_msg_read: * @msg: Pointer on a #prelude_msg_t object address. * @pio: Pointer on a #prelude_io_t object. * * Read a message on @pio into @msg. If @msg is NULL, it is * allocated. This function will never block. * * Returns: 0 if reading the message is complete, or a #prelude_error_t * error if an error occured. Take particular attention to #PRELUDE_ERROR_EAGAIN * and PRELUDE_ERROR_EOF. */ int prelude_msg_read(prelude_msg_t **msg, prelude_io_t *pio) { int ret = 0; /* * *msg is NULL, * this mean the caller want to work on a new message. */ if ( ! *msg ) { *msg = malloc(sizeof(prelude_msg_t)); if ( ! *msg ) return prelude_error_from_errno(errno); (*msg)->refcount = 1; (*msg)->hdr.datalen = 0; (*msg)->hdr.priority = PRELUDE_MSG_PRIORITY_NONE; (*msg)->payload = NULL; (*msg)->write_index = 0; (*msg)->header_index = 0; (*msg)->fd_write_index = 0; (*msg)->read_index = PRELUDE_MSG_HDR_SIZE; } /* * We didn't finished reading the message header yet. */ if ( (*msg)->header_index != PRELUDE_MSG_HDR_SIZE ) ret = read_message_header(msg, pio); /* * Notice that ret is initialized to 0 so that we will read * the message if this function is called and we already have * the header. * * In case read_message_header return PRELUDE_ERROR_EAGAIN, * we don't want to try to read the rest of the message right now, * as it is unlikely we can read something. * * In case it return 0, there is some chance there are other data * waiting to be read. */ if ( (*msg)->payload && ret == 0 ) ret = read_message_content(msg, pio); /* * check for msg as well since this function can be called recursively. */ if ( *msg && ret < 0 && prelude_error_get_code(ret) != PRELUDE_ERROR_EAGAIN ) { prelude_msg_destroy(*msg); /* * reset message to NULL, because the caller might not take * care of the return value enough (and may call us again with an * undefined *msg address. */ *msg = NULL; } return ret; } /** * prelude_msg_get: * @msg: Pointer on a #prelude_msg_t object representing the message to get data from. * @tag: Pointer on a 8 bits unsigned integer to store the message tag. * @len: Pointer on a 32 bits unsigned integer to store the message len to. * @buf: Address of a pointer to store the buffer starting address. * * prelude_msg_get() read the next data chunk contained in the message. * @tag is updated to contain the kind of data the chunk contain. * @len is updated to contain the len of the data chunk. * @buf is updated to point on the data chunk. * * Returns: 0 on success, or a #prelude_error_t value on error. */ int prelude_msg_get(prelude_msg_t *msg, uint8_t *tag, uint32_t *len, void **buf) { if ( msg->read_index == (msg->hdr.datalen + PRELUDE_MSG_HDR_SIZE) ) { /* * no more sub - messages in the buffer. */ return prelude_error(PRELUDE_ERROR_EOF); } /* * bound check our buffer, * so that we won't overflow if it doesn't contain tag and len. */ if ( msg->read_index > (msg->hdr.datalen + PRELUDE_MSG_HDR_SIZE - 5) ) return prelude_error(PRELUDE_ERROR_INVAL_LENGTH); /* * slice wanted data. */ *tag = msg->payload[msg->read_index++]; *len = prelude_extract_uint32(&msg->payload[msg->read_index]); msg->read_index += sizeof(uint32_t); if ( ! *len ) return 0; /* * bound check again, against specified len. */ if ( (msg->read_index + *len) <= msg->read_index ) return prelude_error(PRELUDE_ERROR_INVAL_LENGTH); if ( (msg->read_index + *len) > (msg->hdr.datalen + PRELUDE_MSG_HDR_SIZE) ) return prelude_error(PRELUDE_ERROR_INVAL_LENGTH); *buf = &msg->payload[msg->read_index]; msg->read_index += *len; return 0; } /** * prelude_msg_forward: * @msg: Pointer on a #prelude_msg_t object containing a message header. * @dst: Pointer on a #prelude_io_t object to send message to. * @src: Pointer on a #prelude_io_t object to read message from. * * prelude_msg_forward() read the message corresponding to the @msg object * containing the message header previously gathered using prelude_msg_read_header() * from the @src object, and transfer it to @dst. The header is also transfered. * * Returns: 0 on success, or a negative value if an error occured. */ int prelude_msg_forward(prelude_msg_t *msg, prelude_io_t *dst, prelude_io_t *src) { ssize_t ret; uint32_t dlen = htonl(msg->hdr.datalen); unsigned char buf[PRELUDE_MSG_HDR_SIZE]; buf[0] = msg->hdr.version; buf[1] = msg->hdr.tag; buf[2] = msg->hdr.priority; buf[3] = msg->hdr.is_fragment; memcpy(&buf[4], &dlen, sizeof(dlen)); ret = prelude_io_write(dst, buf, sizeof(buf)); if ( ret < 0 ) return ret; ret = prelude_io_forward(dst, src, msg->hdr.datalen); if ( ret < 0 ) return ret; return 0; } /** * prelude_msg_write: * @msg: Pointer on a #prelude_msg_t object containing the message. * @dst: Pointer on a #prelude_io_t object to send the message to. * * prelude_msg_write() write the message corresponding to the @msg * object to @dst. The message should have been created using the * prelude_msg_new() and prelude_msg_set() functions. * * Returns: 0 on success, or a negative value if an error occured. */ int prelude_msg_write(prelude_msg_t *msg, prelude_io_t *dst) { ssize_t ret; uint32_t dlen = msg->write_index; /* * no need to send... There's no data in this message. */ if ( msg->write_index - PRELUDE_MSG_HDR_SIZE <= 0 ) return 0; /* * if the message header index is 0 (write called, without * prelude_msg_mark_end() first), mark end of the message * cause the caller didn't do it in this case. */ if ( msg->header_index == 0 ) write_message_header(msg); /* * in this case, prelude_msg_mark_end() was called. */ else if ( ! msg->hdr.is_fragment ) dlen -= PRELUDE_MSG_HDR_SIZE; ret = prelude_io_write(dst, msg->payload + msg->fd_write_index, dlen - msg->fd_write_index); if ( ret < 0 ) return ret; msg->fd_write_index += ret; if ( msg->fd_write_index == dlen ) { msg->fd_write_index = 0; return 0; } return prelude_error(PRELUDE_ERROR_EAGAIN); } /** * prelude_msg_recycle: * @msg: Pointer on #prelude_msg_t object. * * Recycle @msg so you can write at it again, even * thought it was written. */ void prelude_msg_recycle(prelude_msg_t *msg) { msg->header_index = 0; msg->write_index = PRELUDE_MSG_HDR_SIZE; msg->payload = (unsigned char *) msg + sizeof(*msg); if ( msg->read_index ) msg->read_index = PRELUDE_MSG_HDR_SIZE; } /** * prelude_msg_mark_end: * @msg: Pointer on #prelude_msg_t object. * * Mark end of message in the @msg buffer, so you can continue * adding different message in the same buffer. */ void prelude_msg_mark_end(prelude_msg_t *msg) { int ret; if ( msg->write_index - msg->header_index - PRELUDE_MSG_HDR_SIZE <= 0 ) return; write_message_header(msg); if ( msg->write_index + PRELUDE_MSG_HDR_SIZE + MINIMUM_FRAGMENT_DATA_SIZE > msg->hdr.datalen ) { ret = call_alloc_cb(&msg); if ( ret < 0 ) return; } else { msg->header_index = msg->write_index; msg->write_index += PRELUDE_MSG_HDR_SIZE; } } /** * prelude_msg_set: * @msg: Pointer on a #prelude_msg_t object to store the data to. * @tag: 8 bits unsigned integer describing the kind of data. * @len: len of the data chunk. * @data: Pointer to the starting address of the data. * * prelude_msg_set() append @len bytes of data from the @data buffer * to the @msg object representing a message. The data is tagged with @tag. * * Returns: 0 on success, or a negative value if the remaining space is not * available. You might check the return value mostly if using a dynamic message * through prelude_msg_dynamic_new() */ int prelude_msg_set(prelude_msg_t *msg, uint8_t tag, uint32_t len, const void *data) { int ret; uint32_t l; l = htonl(len); ret = set_data(&msg, &tag, sizeof(tag)); if ( ret < 0 ) return ret; ret = set_data(&msg, &l, sizeof(l)); if ( ret < 0 ) return ret; return set_data(&msg, data, len); } /** * prelude_msg_new: * @ret: Pointer where to store the created #prelude_msg_t. * @msgcount: Number of chunk of data the created object can accept. * @msglen: Maximum number of bytes the object should handle for all the chunks. * @tag: A tag identifying the kind of message. * @priority: The priority of this message. * * Allocate a new #prelude_msg_t object and store it into @ret. prelude_msg_set() * can then be used to add chunk of data to the message, and prelude_msg_write() * to send it. * * Returns: 0 on success, a negative value if an error occured. */ int prelude_msg_new(prelude_msg_t **ret, size_t msgcount, size_t msglen, uint8_t tag, prelude_msg_priority_t priority) { size_t len; prelude_msg_t *msg; len = msglen; /* * 5 bytes of header by chunks : * - 1 byte: tag * - 4 bytes: len */ len += msgcount * 5; /* * For alert header. */ len += PRELUDE_MSG_HDR_SIZE; msg = malloc(sizeof(prelude_msg_t) + len); if ( ! msg ) return prelude_error_from_errno(errno); msg->payload = (unsigned char *) msg + sizeof(prelude_msg_t); msg->refcount = 1; msg->header_index = 0; msg->hdr.version = PRELUDE_MSG_VERSION; msg->hdr.tag = tag; msg->hdr.priority = priority; msg->hdr.is_fragment = 0; msg->hdr.datalen = len; msg->read_index = 0; msg->write_index = PRELUDE_MSG_HDR_SIZE; msg->fd_write_index = 0; msg->flush_msg_cb = NULL; *ret = msg; return 0; } /** * prelude_msg_dynamic_new: * @ret: Pointer where to store the create #prelude_msg_t. * @flush_msg_cb: Callback function to call when the buffer need to be flushed. * @data: Data to pass to the @flush_msg_cb callback function. * * Allocate a new #prelude_msg_t object. prelude_msg_set() can then be used to * add chunk of data to the message, and prelude_msg_mark_start() to separate * different message in the same buffer. * * This function use memory chunk of static size to store the message in. If * the size of the data you want to store is bigger than the actual chunk size, * @flush_msg_cb callback will be called for the current message to be flushed, * and the returned message will be used in order to store remaining data. * * Returns: 0 on success, a negative value if an error occured. */ int prelude_msg_dynamic_new(prelude_msg_t **ret, int (*flush_msg_cb)(prelude_msg_t **msg, void *data), void *data) { prelude_msg_t *msg; msg = malloc(sizeof(prelude_msg_t) + MSGBUF_SIZE); if ( ! msg ) return prelude_error_from_errno(errno); msg->refcount = 1; msg->hdr.tag = 0; msg->hdr.priority = 0; msg->hdr.is_fragment = 0; msg->hdr.version = PRELUDE_MSG_VERSION; msg->hdr.datalen = MSGBUF_SIZE; msg->payload = (unsigned char *) msg + sizeof(prelude_msg_t); msg->header_index = 0; msg->send_msg_data = data; msg->read_index = 0; msg->flush_msg_cb = flush_msg_cb; msg->write_index = PRELUDE_MSG_HDR_SIZE; msg->fd_write_index = 0; *ret = msg; return 0; } /** * prelude_msg_set_tag: * @msg: Pointer on a #prelude_msg_t object. * @tag: Tag to associate with @msg. * * Tag @msg. */ void prelude_msg_set_tag(prelude_msg_t *msg, uint8_t tag) { msg->hdr.tag = tag; } /** * prelude_msg_set_priority: * @msg: Pointer on a #prelude_msg_t object. * @priority: Priority to associate with @msg. * * Associate @priority with @msg. */ void prelude_msg_set_priority(prelude_msg_t *msg, prelude_msg_priority_t priority) { msg->hdr.priority = priority; } /** * prelude_msg_get_tag: * @msg: Pointer on a #prelude_msg_t object. * * prelude_msg_get_tag() return the tag contained in the @msg header. * * Returns: A tag. */ uint8_t prelude_msg_get_tag(prelude_msg_t *msg) { return msg->hdr.tag; } /** * prelude_msg_get_priority: * @msg: Pointer on a #prelude_msg_t object. * * prelude_msg_get_priority() return the priority contained in the @msg header. * * Returns: A priority. */ prelude_msg_priority_t prelude_msg_get_priority(prelude_msg_t *msg) { return msg->hdr.priority; } /** * prelude_msg_get_datalen: * @msg: Pointer on a #prelude_msg_t object. * * prelude_msg_get_datalen() return the len of the whole message * contained in the @msg header. * * Returns: Len of the message. */ uint32_t prelude_msg_get_datalen(prelude_msg_t *msg) { return msg->hdr.datalen; } /** * prelude_msg_get_len: * @msg: Pointer on a #prelude_msg_t object. * * prelude_msg_get_len() return the currently used * len for the @msg message. * * Returns: Len of the message. */ uint32_t prelude_msg_get_len(prelude_msg_t *msg) { return msg->write_index; } /** * prelude_msg_destroy: * @msg: Pointer on a #prelude_msg_t object. * * prelude_msg_destroy() destroy the #prelude_msg_t object pointed * to by @msg. All the ressources for this message are freed. */ void prelude_msg_destroy(prelude_msg_t *msg) { if ( --msg->refcount == 0 ) free(msg); } /** * prelude_msg_set_callback: * @msg: Pointer on a #prelude_msg_t object. * @flush_msg_cb: Pointer on a function responssible of sending the message. * * prelude_msg_set_callback() allow to change the callback used * to flush a message created with prelude_msg_dynamic_new(). */ void prelude_msg_set_callback(prelude_msg_t *msg, int (*flush_msg_cb)(prelude_msg_t **msg, void *data)) { msg->flush_msg_cb = flush_msg_cb; } /** * prelude_msg_set_data: * @msg: Pointer on a #prelude_msg_t object. * @data: Pointer on the data to associate to this message. * * prelude_msg_set_data() allow to change the data passed * to the message sending callback. */ void prelude_msg_set_data(prelude_msg_t *msg, void *data) { msg->send_msg_data = data; } /** * prelude_msg_is_fragment: * @msg: Pointer on a #prelude_msg_t object. * * Returns: true if @msg only contain a fragment of message. */ int prelude_msg_is_fragment(prelude_msg_t *msg) { return msg->hdr.is_fragment ? 1 : 0; } /** * prelude_msg_is_empty: * @msg: Pointer on a #prelude_msg_t object. * * Returns: true if @msg doesn't contain any data to send. */ int prelude_msg_is_empty(prelude_msg_t *msg) { return (msg->write_index - msg->header_index - PRELUDE_MSG_HDR_SIZE <= 0) ? 1 : 0; } struct timeval *prelude_msg_get_time(prelude_msg_t *msg, struct timeval *tv) { tv->tv_sec = msg->hdr.tv_sec; tv->tv_usec = msg->hdr.tv_usec; return tv; } prelude_msg_t *prelude_msg_ref(prelude_msg_t *msg) { msg->refcount++; return msg; } const unsigned char *prelude_msg_get_message_data(prelude_msg_t *msg) { /* * if the message header index is 0 (write called, without * prelude_msg_mark_end() first), mark end of the message * cause the caller didn't do it in this case. */ if ( msg->header_index == 0 ) write_message_header(msg); return msg->payload + msg->fd_write_index; } libprelude-1.0.0/src/config-engine.c0000664000076400007640000005726411325615276014263 00000000000000/***** * * Copyright (C) 2000, 2002, 2003, 2004 PreludeIDS Technologies. All Rights Reserved. * Author: Yoann Vandoorselaere * * This file is part of the Prelude library. * * 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; see the file COPYING. If not, write to * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. * *****/ #include "config.h" #include "libmissing.h" #include #include #include #include #include #include #include "prelude-inttypes.h" #include "common.h" #include "config-engine.h" #include "variable.h" #include "prelude-log.h" #define PRELUDE_ERROR_SOURCE_DEFAULT PRELUDE_ERROR_SOURCE_CONFIG_ENGINE #include "prelude-error.h" struct config { char *filename; /* filename for this session */ char **content; /* content of the file */ prelude_bool_t need_sync; /* does the file need to be synced on disk ? */ unsigned int elements; /* array number of elements */ }; static void free_val(char **val) { if ( ! *val ) return; free(*val); *val = NULL; } static prelude_bool_t is_line_commented(const char *line) { line += strspn(line, " \t\r"); return ( *line == '#' ) ? TRUE : FALSE; } /* * If line contains a section, returns a pointer to * the beginning of the section name. */ static prelude_bool_t is_section(const char *line) { line += strspn(line, " \t\r\n"); if ( *line == '[' && strchr(line, ']') ) return TRUE; return FALSE; } /* * Frees old line pointed by line, * and sets to the new one. */ static void op_modify_line(char **line, char *nline) { if ( ! nline ) return; free(*line); *line = nline; } static int op_delete_line(config_t *cfg, unsigned int start, unsigned int end) { unsigned int i, j; if ( ! cfg->elements ) return 0; if ( start >= end || end > cfg->elements ) return -1; for ( i = start; i < end; i++ ) { free(cfg->content[i]); cfg->content[i] = NULL; } for ( i = end, j = start; i < cfg->elements; i++ ) cfg->content[j++] = cfg->content[i]; cfg->elements -= end - start; cfg->content = _prelude_realloc(cfg->content, cfg->elements * sizeof(char **)); if ( ! cfg->content ) return prelude_error_from_errno(errno); return 0; } /* * Appends a line to an array of line. * Takes the address of the array and the line to append as arguments. * * list must be NULL the first time this function is called, * in order to initialize indexing variable. */ static int op_append_line(config_t *cfg, char *line) { if ( ! line ) return 0; if ( cfg->elements + 1 < cfg->elements ) return -1; cfg->elements++; cfg->content = _prelude_realloc(cfg->content, cfg->elements * sizeof(char **)); if ( ! cfg->content ) return prelude_error_from_errno(errno); cfg->content[cfg->elements - 1] = line; return 0; } static unsigned int adjust_insertion_point(config_t *cfg, unsigned int l) { /* * We want to insert this entry at the end of the current section. */ while ( l < cfg->elements ) { l++; if ( l == cfg->elements ) break; if ( is_section(cfg->content[l]) ) break; } return l; } /* * */ static int op_insert_line(config_t *cfg, char *line, unsigned int lins) { unsigned int i; if ( lins > cfg->elements || ! line ) return -1; if ( cfg->elements + 1 < cfg->elements ) return -1; cfg->content = _prelude_realloc(cfg->content, ++cfg->elements * sizeof(char **)); if ( ! cfg->content ) return prelude_error_from_errno(errno); for ( i = cfg->elements - 2; i >= lins; i-- ) { cfg->content[i + 1] = cfg->content[i]; if ( i == 0 ) break; } cfg->content[lins] = line; return 0; } /* * Loads filename into memory, we use append_line() for that. */ static int load_file_in_memory(config_t *cfg) { int ret; FILE *fd; size_t len; prelude_string_t *out; char line[1024], *ptr, *tmp; ret = prelude_string_new(&out); if ( ret < 0 ) return ret; fd = fopen(cfg->filename, "r"); if ( ! fd ) { prelude_string_destroy(out); return prelude_error_verbose(prelude_error_code_from_errno(errno), "could not open '%s' for reading: %s", cfg->filename, strerror(errno)); } do { len = 0; ptr = fgets(line, sizeof(line), fd); if ( ptr ) { len = strlen(line); if ( line[len - 1] == '\n' ) line[len - 1] = 0; ret = prelude_string_cat(out, line); if ( ret < 0 ) goto err; if ( line[len - 1] != 0 ) continue; } ret = prelude_string_get_string_released(out, &tmp); if ( ret < 0 ) goto err; if ( ! tmp ) tmp = strdup(""); ret = op_append_line(cfg, tmp); if ( ret < 0 ) { free(tmp); goto err; } prelude_string_clear(out); } while ( ptr ); err: prelude_string_destroy(out); fclose(fd); return 0; } static int strip_value(char **out, const char *in, size_t tlen) { size_t slen, elen; prelude_bool_t have_start_quote = FALSE; *out = NULL; in += slen = strspn(in, " \t\r"); if ( *in == '"' ) { in++; slen++; have_start_quote = TRUE; } elen = tlen - slen; if ( ! elen ) return 0; while ( in[elen - 1] == ' ' || in[elen - 1] == '\t' || in[elen - 1] == '\r' ) elen--; if ( have_start_quote && elen ) { if ( in[elen - 1] == '"' ) elen--; else { in--; elen++; } } if ( ! elen ) return 0; *out = strndup(in, elen); return (*out) ? 0 : prelude_error_from_errno(errno); } static int value_resolve_variable(const char *ptr, char **out_p) { int ret; size_t i; char buf[512]; const char *tmp; prelude_string_t *out; ret = prelude_string_new(&out); if ( ret < 0 ) return ret; while ( *ptr ) { if ( *ptr == '$' ) { tmp = ptr; i = 0; do { buf[i++] = *ptr++; } while ( *ptr && *ptr != ' ' && *ptr != '$' && i < sizeof(buf) - 1); buf[i] = 0; if ( ! variable_get(buf + 1) ) ptr = tmp; else { prelude_string_cat(out, variable_get(buf + 1)); continue; } } prelude_string_ncat(out, ptr, 1); ptr++; } ret = prelude_string_get_string_released(out, out_p); prelude_string_destroy(out); return ret; } static int parse_buffer(const char *str, char **entry, char **value) { int ret; size_t len; char *val; const char *ptr; *value = *entry = NULL; if ( ! *str ) return -1; ptr = strchr(str, '='); len = (ptr) ? (size_t) (ptr - str) : strlen(str); ret = strip_value(entry, str, len); if ( ret < 0 ) return ret; if ( ! ptr ) return 0; ret = strip_value(&val, ptr + 1, strlen(ptr + 1)); if ( ret < 0 ) return ret; if ( val ) ret = value_resolve_variable(val, value); free_val(&val); if ( ret < 0 ) return ret; if ( **entry == '$' ) ret = variable_set((*entry) + 1, *value); return ret; } static int parse_section_buffer(const char *buf, char **entry, char **value, prelude_bool_t default_value) { int ret; char *ptr; buf += strspn(buf, "\n ["); ptr = strchr(buf, ']'); if ( ptr ) *ptr = 0; ret = parse_buffer(buf, entry, value); if ( ptr ) *ptr = ']'; if ( ! *value && default_value ) *value = strdup("default"); return ret; } static int search_section(config_t *cfg, const char *section, unsigned int i) { int ret; char *entry, *value, *wentry, *wvalue; if ( ! cfg->content ) return -1; ret = parse_section_buffer(section, &wentry, &wvalue, TRUE); if ( ret < 0 ) return ret; for ( ; i < cfg->elements; i++ ) { if ( is_line_commented(cfg->content[i]) ) continue; if ( ! is_section(cfg->content[i]) ) continue; ret = parse_section_buffer(cfg->content[i], &entry, &value, TRUE); if ( ret < 0 ) continue; ret = strcasecmp(entry, wentry); free(entry); if ( ret != 0 ) { free(value); continue; } ret = strcasecmp(value, wvalue); free(value); if ( ret == 0 ) { free(wentry); free(wvalue); return i; } } free(wentry); free(wvalue); return -1; } /* * Search an entry (delimited by '=' character) in content. * returns the line number matching 'entry' or -1. */ static int search_entry(config_t *cfg, const char *section, const char *entry, unsigned int *index, char **eout, char **vout) { int ret; unsigned int i = *index; if ( ! cfg->content || i >= cfg->elements ) return -1; if ( section && ! index ) { ret = search_section(cfg, section, 0); if ( ret < 0 ) return ret; i = (unsigned int) ret + 1; } for ( ; i < cfg->elements; i++ ) { if ( section && is_section(cfg->content[i]) ) return -1; ret = parse_buffer(cfg->content[i], eout, vout); if ( ret < 0 || ! *eout ) continue; ret = strcmp(entry, *eout); if ( ret == 0 ) { *index = i; return 0; } free_val(eout); free_val(vout); } return -1; } /* * Creates a new line using entry 'entry' & value 'val'. */ static char *create_new_line(const char *entry, const char *val) { int ret; char *line; size_t len = 0; if ( ! entry ) return NULL; if ( val ) len = strlen(entry) + strlen(val) + 2; else len = strlen(entry) + 1; line = malloc(len); if (! line ) return NULL; if ( val ) ret = snprintf(line, len, "%s=%s", entry, val); else ret = snprintf(line, len, "%s", entry); if ( ret < 0 || (size_t) ret >= len ) { free(line); return NULL; } return line; } /* * Only called if the memory dump of the file was modified, * will write the new content to filename 'filename'. */ static int sync_and_free_file_content(config_t *cfg) { FILE *fd; unsigned int i; size_t ret, len; fd = fopen(cfg->filename, "w"); if ( ! fd ) return prelude_error_verbose(prelude_error_code_from_errno(errno), "could not open '%s' for writing: %s", cfg->filename, strerror(errno)); for ( i = 0; i < cfg->elements; i++ ) { len = strlen(cfg->content[i]); ret = fwrite(cfg->content[i], 1, len, fd); if ( ret != len && ferror(fd) ) prelude_log(PRELUDE_LOG_ERR, "error writing content to '%s': %s", cfg->filename, strerror(errno)); if ( i + 1 != cfg->elements ) { ret = fwrite("\n", 1, 1, fd); if ( ret != 1 && ferror(fd) ) prelude_log(PRELUDE_LOG_ERR, "error writing content to '%s': %s", cfg->filename, strerror(errno)); } free(cfg->content[i]); } fclose(fd); free(cfg->content); return 0; } /* * frees the 'content' array, and its pointer. * 'content' is the content of the file loaded into memory. */ static void free_file_content(config_t *cfg) { unsigned int i; for ( i = 0; i < cfg->elements; i++ ) free(cfg->content[i]); free(cfg->content); } /* * */ static int new_entry_line(config_t *cfg, const char *entry, const char *val, unsigned int *index) { int ret; char *eout, *vout; ret = search_entry(cfg, NULL, entry, index, &eout, &vout); if ( ret < 0 ) return op_insert_line(cfg, create_new_line(entry, val), *index); free_val(&eout); free_val(&vout); op_modify_line(&cfg->content[*index], create_new_line(entry, val)); return 0; } /* * */ static int new_section_line(config_t *cfg, const char *section, const char *entry, const char *val, unsigned int *index) { int ret; char *eout, *vout; unsigned int eindex; ret = search_section(cfg, section, *index); if ( ret < 0 ) { char buf[1024]; snprintf(buf, sizeof(buf), "[%s]", section); if ( *index ) *index = adjust_insertion_point(cfg, *index); else *index = cfg->elements; ret = op_insert_line(cfg, strdup(buf), *index); if ( ret < 0 ) return ret; return (! entry) ? 0 : op_insert_line(cfg, create_new_line(entry, val), *index + 1); } *index = ret; if ( ! entry ) return 0; eindex = *index + 1; ret = search_entry(cfg, section, entry, &eindex, &eout, &vout); if ( ret < 0 ) return op_insert_line(cfg, create_new_line(entry, val), eindex); free_val(&eout); free_val(&vout); op_modify_line(&cfg->content[eindex], create_new_line(entry, val)); return 0; } /** * _config_set: * @cfg: Configuration file identifier. * @section: Section where the entry should be set. * @entry: Entry to set. * @val: Value for the entry. * @index: Optional position where the entry will be written. * * Sets an entry 'entry' to the specified value, and, in case * it is not NULL, in the specified section in the configuration file * identified by 'cfg'. * * Returns: 0 on success, -1 otherwise. */ int _config_set(config_t *cfg, const char *section, const char *entry, const char *val, unsigned int *index) { int ret; if ( section ) ret = new_section_line(cfg, section, entry, val, index); else ret = new_entry_line(cfg, entry, val, index); if ( ret == 0 ) cfg->need_sync = TRUE; return ret; } int _config_del(config_t *cfg, const char *section, const char *entry) { int start; char *tmp, *value; unsigned int line = 0, end; if ( ! entry ) { start = search_section(cfg, section, 0); if ( start < 0 ) return start; for ( end = (unsigned int) start + 1; end < cfg->elements && ! is_section(cfg->content[end]); end++ ); while ( start >= 2 && ! *cfg->content[start - 1] && ! *cfg->content[start - 2] ) start--; } else { start = search_entry(cfg, section, entry, &line, &tmp, &value); if ( start < 0 ) return start; free_val(&tmp); free_val(&value); end = (unsigned int) start + 1; } cfg->need_sync = TRUE; return op_delete_line(cfg, start, end); } static const char *get_variable_content(config_t *cfg, const char *variable) { const char *ptr; unsigned int line = 0; /* * Variable sets at runtime. */ ptr = variable_get(variable); if ( ! ptr ) /* * Other variable (declared in the configuration file). */ ptr = _config_get(cfg, NULL, variable, &line); return ptr; } /* * _config_get_next: * @cfg: Configuration file identifier. * @section: Pointer address where the current section should be stored. * @entry: Pointer address where the current entry should be stored. * @value: Pointer address where the current value should be stored. * @line: Pointer to a line number we should start the search at. * * Parses the whole configuration file starting at @line, * and stores the current section, entry and value within the * provided argument. * * The caller has to call config_get_next() until it returns -1 * or memory will be leaked. * * If the value gathered starts with a '$', which means it is * a variable, the variable is automatically looked up. * * Returns: 0 on success, -1 if there is nothing more to read. */ int _config_get_next(config_t *cfg, char **section, char **entry, char **value, unsigned int *line) { int ret; char *ptr; free_val(entry); free_val(value); free_val(section); if ( ! cfg->content || *line >= cfg->elements ) return -1; while ( *line < cfg->elements ) { ptr = cfg->content[*line]; ptr += strspn(ptr, " \t\r"); (*line)++; if ( ! *ptr || is_line_commented(ptr) ) continue; if ( is_section(ptr) ) return parse_section_buffer(ptr, section, value, FALSE); ret = parse_buffer(ptr, entry, value); if ( ret >= 0 && **entry == '$' ) { free_val(entry); free_val(value); continue; } return ret; } (*line)--; return -1; } /** * _config_get_section: * @cfg: Configuration file identifier. * @section: Section we are searching. * @line: Pointer to a line number we should start the search at. * * If @section is found, @line is updated to reflect * the line where the section was found. * * Returns: 0 if the section was found, -1 otherwise. */ int _config_get_section(config_t *cfg, const char *section, unsigned int *line) { int ret; if ( ! cfg->content ) return -1; ret = search_section(cfg, section, *line); if ( ret < 0 ) return -1; *line = ret; return 0; } /* * _config_get: * @cfg: Configuration file identifier. * @section: Section to gather the entry from. * @entry: Entry to gather the value from. * @line: Pointer to a line number we should start the search at. * * Gets value associated with @entry, in the optionaly specified * @section, in the configuration file represented by the @cfg * abstracted data type. If @entry is found, update @line to reflect * the line it was found at. * * If the value gathered starts with a '$', which means it is * a variable, the variable is automatically looked up. * * If both @entry and @section are NULL, config_get() will try to * look up another entry of the same name (and in the same section if * section was previously set) as the one previously searched. * * Returns: The entry value on success, an empty string if the entry * exists but has no value, NULL on error. */ char *_config_get(config_t *cfg, const char *section, const char *entry, unsigned int *line) { int ret; const char *var; char *tmp, *value; unsigned int index; if ( ! cfg->content ) return NULL; index = (*line) ? *line - 1 : 0; ret = search_entry(cfg, section, entry, &index, &tmp, &value); if ( ret < 0 ) return NULL; *line = index + 1; free(tmp); /* * The requested value point to a variable. */ if ( value[0] == '$' ) { var = get_variable_content(cfg, value + 1); if ( var ) { free(value); value = strdup(var); } } return value; } /** * _config_close: * @cfg: Configuration file identifier. * * Close the 'cfg' object, used to access the configuration file. * Any change made with the config_set() function call will be written. * * Returns: 0 on success, -1 otherwise. */ int _config_close(config_t *cfg) { int ret = 0; if ( cfg->content ) { if ( cfg->need_sync ) ret = sync_and_free_file_content(cfg); if ( ret < 0 || ! cfg->need_sync ) free_file_content(cfg); } free(cfg->filename); free(cfg); return ret; } /** * _config_open: * @new: Pointer address where to store the new #config_t object. * @filename: The configuration file. * * Opens the configuration file pointed to by 'filename' and loads it into memory, * the returned #config_t object will have to be used for any operation on this * configuration file. * * Returns: 0 on success, negative value otherwise. */ int _config_open(config_t **new, const char *filename) { int ret; config_t *cfg; cfg = calloc(1, sizeof(*cfg)); if ( ! cfg ) return prelude_error_from_errno(errno); cfg->filename = strdup(filename); if ( ! cfg->filename ) { free(cfg); return prelude_error_from_errno(errno); } ret = load_file_in_memory(cfg); if ( ret < 0 ) { free(cfg->filename); free(cfg); return ret; } *new = cfg; return ret; } libprelude-1.0.0/src/libprelude-error/0000775000076400007640000000000011347714753014733 500000000000000libprelude-1.0.0/src/libprelude-error/strerror.c0000664000076400007640000000321311325615276016674 00000000000000/* strerror.c - Describing an error code. Copyright (C) 2003 g10 Code GmbH This file is part of libgpg-error. libgpg-error is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. libgpg-error 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 Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with libgpg-error; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #include "config.h" #include #include #include #include #include "prelude-error.h" #include "gettext.h" #include "err-codes.h" /* Return a pointer to a string containing a description of the error code in the error value ERR. This function is not thread-safe. */ const char *prelude_strerror(prelude_error_t err) { int no; prelude_error_code_t code = prelude_error_get_code(err); if ( prelude_error_is_verbose(err) ) return _prelude_thread_get_error(); if ( code & PRELUDE_ERROR_SYSTEM_ERROR ) { no = prelude_error_code_to_errno(code); if ( no ) return strerror(no); else code = PRELUDE_ERROR_UNKNOWN_ERRNO; } return dgettext(PACKAGE, msgstr + msgidx[msgidxof((int)code)]); } libprelude-1.0.0/src/libprelude-error/prelude-error.h.in0000664000076400007640000001054711202225026020203 00000000000000/***** * * Copyright (C) 2004, 2005 PreludeIDS Technologies. All Rights Reserved. * Author: Yoann Vandoorselaere * * This file is part of the Prelude library. * * 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; see the file COPYING. If not, write to * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. * *****/ #ifndef _LIBPRELUDE_PRELUDE_ERROR_H #define _LIBPRELUDE_PRELUDE_ERROR_H #ifdef HAVE_CONFIG_H # include "config.h" #endif #include #include #include #include #include "prelude-thread.h" #include "prelude-string.h" #ifdef __cplusplus extern "C" { #endif #ifndef __attribute__ /* This feature is available in gcc versions 2.5 and later. */ # if __GNUC__ < 2 || (__GNUC__ == 2 && __GNUC_MINOR__ < 5) || __STRICT_ANSI__ # define __attribute__(Spec) /* empty */ # endif /* The __-protected variants of `format' and `printf' attributes are accepted by gcc versions 2.6.4 (effectively 2.7) and later. */ # if __GNUC__ < 2 || (__GNUC__ == 2 && __GNUC_MINOR__ < 7) # define __format__ format # define __printf__ printf # endif #endif /* * This is inspired from the GPG error interface. * * Bit 1 of prelude_error_t remain set (negative value). * Bit 2 to 9 are set to the source of the error. * Bit 10 specify whether there is a verbose error available. * Bit 11 to 15 are unspecified. * Bit 16 to 32 are set to the code of the error. */ #define PRELUDE_ERROR_SYSTEM_ERROR (1 << 15) typedef enum { @include err-sources.in } prelude_error_source_t; typedef enum { @include err-codes.in @include errnos.in } prelude_error_code_t; #ifndef PRELUDE_ERROR_SOURCE_DEFAULT #define PRELUDE_ERROR_SOURCE_DEFAULT PRELUDE_ERROR_SOURCE_UNKNOWN #endif typedef signed int prelude_error_t; prelude_bool_t prelude_error_is_verbose(prelude_error_t error); prelude_error_code_t prelude_error_get_code(prelude_error_t error); prelude_error_source_t prelude_error_get_source(prelude_error_t error); prelude_error_code_t prelude_error_code_from_errno(int err); prelude_error_t prelude_error_make(prelude_error_source_t source, prelude_error_code_t code); prelude_error_t prelude_error_make_from_errno(prelude_error_source_t source, int err); void prelude_perror(prelude_error_t error, const char *fmt, ...) __attribute__ ((__format__ (__printf__, 2, 3))); const char *prelude_strerror(prelude_error_t err); const char *prelude_strsource(prelude_error_t err); int prelude_error_code_to_errno(prelude_error_code_t code); prelude_error_t prelude_error_verbose_make_v(prelude_error_source_t source, prelude_error_code_t code, const char *fmt, va_list ap) __attribute__ ((__format__ (__printf__, 3, 0))); prelude_error_t prelude_error_verbose_make(prelude_error_source_t source, prelude_error_code_t code, const char *fmt, ...) __attribute__ ((__format__ (__printf__, 3, 4))); static inline prelude_error_t prelude_error(prelude_error_code_t code) { return prelude_error_make(PRELUDE_ERROR_SOURCE_DEFAULT, code); } static inline prelude_error_t prelude_error_verbose(prelude_error_code_t code, const char *fmt, ...) __attribute__ ((__format__ (__printf__, 2, 3))); static inline prelude_error_t prelude_error_verbose(prelude_error_code_t code, const char *fmt, ...) { int ret; va_list ap; va_start(ap, fmt); ret = prelude_error_verbose_make_v(PRELUDE_ERROR_SOURCE_DEFAULT, code, fmt, ap); va_end(ap); return ret; } static inline prelude_error_t prelude_error_from_errno(int err) { return prelude_error_make(PRELUDE_ERROR_SOURCE_DEFAULT, prelude_error_code_from_errno(err)); } #ifdef __cplusplus } #endif #endif libprelude-1.0.0/src/libprelude-error/mkerrcodes2.awk0000664000076400007640000001120411202225026017551 00000000000000# mkstrtable.awk # Copyright (C) 2003 g10 Code GmbH # # 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, g10 Code GmbH gives unlimited permission to # copy, distribute and modify the C source files that are the output # of mkerrcodes2.awk. You need not follow the terms of the GNU General # Public License when using or distributing such scripts, even though # portions of the text of mkerrcodes2.awk appear in them. The GNU # General Public License (GPL) does govern all other use of the material # that constitutes the mkerrcodes2.awk program. # # Certain portions of the mkerrcodes2.awk source text are designed to be # copied (in certain cases, depending on the input) into the output of # mkerrcodes2.awk. We call these the "data" portions. The rest of the # mkerrcodes2.awk source text consists of comments plus executable code # that decides which of the data portions to output in any given case. # We call these comments and executable code the "non-data" portions. # mkstrtable.h never copies any of the non-data portions into its output. # # This special exception to the GPL applies to versions of mkerrcodes2.awk # released by g10 Code GmbH. When you make and distribute a modified version # of mkerrcodes2.awk, you may extend this special exception to the GPL to # apply to your modified version as well, *unless* your modified version # has the potential to copy into its output some of the text that was the # non-data portion of the version that you started with. (In other words, # unless your change moves or copies text from the non-data portions to the # data portions.) If your modification has such potential, you must delete # any notice of this special exception to the GPL from your modified version. # This script outputs a source file that does define the following # symbols: # # static const char msgstr[]; # A string containing all messages in the list. # # static const int msgidx[]; # A list of index numbers, one for each message, that points to the # beginning of the string in msgstr. # # msgidxof (code); # A macro that maps code numbers to idx numbers. If a DEFAULT MESSAGE # is provided (see below), its index will be returned for unknown codes. # Otherwise -1 is returned for codes that do not appear in the list. # You can lookup the message with code CODE with: # msgstr + msgidx[msgidxof (code)]. # # The input file has the following format: # CODE1 MESSAGE1 (Code number, , message string) # CODE2 MESSAGE2 (Code number, , message string) # ... # CODEn MESSAGEn (Code number, , message string) # DEFAULT MESSAGE (, fall-back message string) # # Comments (starting with # and ending at the end of the line) are removed, # as is trailing whitespace. The last line is optional; if no DEFAULT # MESSAGE is given, msgidxof will return the number -1 for unknown # index numbers. BEGIN { # msg holds the number of messages. msg = 0; print "/* Output of mkerrcodes2.awk. DO NOT EDIT. */"; print ""; header = 1; } /^#/ { next; } header { if ($1 ~ /^[0123456789]+$/) { print "static const int err_code_from_index[] = {"; header = 0; } else print; } !header { sub (/\#.+/, ""); sub (/[ ]+$/, ""); # Strip trailing space and tab characters. if (/^$/) next; # Print the string msgstr line by line. We delay output by one line to be able # to treat the last line differently (see END). print " " $2 ","; # Remember the error value and index of each error code. code[msg] = $1; pos[msg] = $2; msg++; } END { print "};"; print ""; print "#define errno_to_idx(code) (0 ? -1 \\"; # Gather the ranges. skip = code[0]; start = code[0]; stop = code[0]; for (i = 1; i < msg; i++) { if (code[i] == stop + 1) stop++; else { print " : ((code >= " start ") && (code <= " stop ")) ? (code - " \ skip ") \\"; skip += code[i] - stop - 1; start = code[i]; stop = code[i]; } } print " : ((code >= " start ") && (code <= " stop ")) ? (code - " \ skip ") \\"; print " : -1)"; } libprelude-1.0.0/src/libprelude-error/strsource.c0000664000076400007640000000236611325615276017053 00000000000000/* strsource.c - Describing an error source. Copyright (C) 2003 g10 Code GmbH This file is part of libgpg-error. libgpg-error is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. libgpg-error 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 Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with libgpg-error; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #include "config.h" #include "prelude-error.h" #include "gettext.h" #include "err-sources.h" /* Return a pointer to a string containing a description of the error source in the error value ERR. */ const char *prelude_strsource(prelude_error_t err) { prelude_error_source_t source = prelude_error_get_source(err); return dgettext(PACKAGE, msgstr + msgidx[msgidxof((int) source)]); } libprelude-1.0.0/src/libprelude-error/err-codes.h.in0000664000076400007640000001314511202225026017274 00000000000000# err-codes.h.in - List of error codes and their description input file. /* err-codes.h - List of error codes and their description. Copyright (C) 2003, 2004 g10 Code GmbH This file is part of libgpg-error. libgpg-error is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. libgpg-error 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 Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with libgpg-error; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ # Everything up to the first line that starts with a number in the # first column is copied into the output verbatim. Then, empty lines # are ignored. Other lines must have an error code number, followed # by one or more characters, followed by the error code symbol, # followed by one or more characters, followed by the error # message. Trailing whitespace is removed. The error codes should be # sorted. The last line should not have a number, but only a , # followed by a dummy field, followed by a , followed by a # description for error codes that are not in the list. 0 PRELUDE_ERROR_NO_ERROR Success 1 PRELUDE_ERROR_GENERIC Unknown generic error 2 PRELUDE_ERROR_TLS Unknown TLS error 3 PRELUDE_ERROR_INVAL_LENGTH Invalid length specified 4 PRELUDE_ERROR_INVAL_MESSAGE Invalid message 5 PRELUDE_ERROR_PROTOCOL_VERSION Invalid protocol version 6 PRELUDE_ERROR_EOF End of file 8 PRELUDE_ERROR_PROFILE Client profile does not exist or have wrong permissions 16 PRELUDE_ERROR_TLS_AUTH_REJECTED Peer rejected authentication 17 PRELUDE_ERROR_INVAL_INT8 Buffer does not contain a 8 bits integer 18 PRELUDE_ERROR_INVAL_INT16 Buffer does not contain a 16 bits integer 19 PRELUDE_ERROR_INVAL_INT32 Buffer does not contain a 32 bits integer 20 PRELUDE_ERROR_INVAL_INT64 Buffer does not contain a 64 bits integer 21 PRELUDE_ERROR_INVAL_FLOAT Buffer does not contain a 32 bits float 22 PRELUDE_ERROR_INVAL_CHAR Buffer is not zero terminated 23 PRELUDE_ERROR_INVAL_IDMEF_TIME Buffer does not contain an IDMEF time type 24 PRELUDE_ERROR_CONNECTION_STRING No connection information provided 25 PRELUDE_ERROR_IDMEF_VALUE_TYPE_UNKNOWN Unknown IDMEF value type 26 PRELUDE_ERROR_IDMEF_VALUE_TYPE_COPY_UNAVAILABLE Copy operation unavailable for specified IDMEF type 27 PRELUDE_ERROR_IDMEF_VALUE_TYPE_CLONE_UNAVAILABLE Clone operation unavailable for specified IDMEF type 28 PRELUDE_ERROR_IDMEF_VALUE_TYPE_COMPARE_UNAVAILABLE Compare operation unavailable for specified IDMEF type 29 PRELUDE_ERROR_IDMEF_VALUE_TYPE_READ_UNAVAILABLE Read operation unavailable for specified IDMEF type 30 PRELUDE_ERROR_IDMEF_VALUE_TYPE_WRITE_UNAVAILABLE Write operation unavailable for specified IDMEF type 31 PRELUDE_ERROR_IDMEF_VALUE_TYPE_COMPARE_MISMATCH Can not compare data of different type 32 PRELUDE_ERROR_IDMEF_VALUE_TYPE_PARSE Could not parse IDMEF value 33 PRELUDE_ERROR_IDMEF_CLASS_UNKNOWN Unknown IDMEF class specified 34 PRELUDE_ERROR_IDMEF_CLASS_UNKNOWN_CHILD Unknown IDMEF child specified 35 PRELUDE_ERROR_IDMEF_CLASS_UNKNOWN_NAME Unknown IDMEF element name 36 PRELUDE_ERROR_IDMEF_PATH_LENGTH IDMEF path name too long 37 PRELUDE_ERROR_IDMEF_PATH_DEPTH IDMEF path maximum depth exceeded 38 PRELUDE_ERROR_IDMEF_PATH_PARENT_ROOT Can not make parent from IDMEF root path 39 PRELUDE_ERROR_IDMEF_PATH_NTH Specified object index does not exist 40 PRELUDE_ERROR_IDMEF_PATH_MISS_INDEX Listed element require an index to be specified 41 PRELUDE_ERROR_IDMEF_PATH_INTEGRITY Element integrity failed 42 PRELUDE_ERROR_IDMEF_PATH_INDEX_RESERVED Provided index value is reserved 43 PRELUDE_ERROR_IDMEF_PATH_INDEX_FORBIDDEN Element forbid indexing 44 PRELUDE_ERROR_IDMEF_PATH_INDEX_UNDEFINED Element index is undefined 45 PRELUDE_ERROR_IDMEF_TREE_INDEX_UNDEFINED An index below the one specified is undefined 46 PRELUDE_ERROR_IDMEF_UNKNOWN_ENUM_STRING Unknown enumeration string 47 PRELUDE_ERROR_IDMEF_UNKNOWN_TAG IDMEF message tag is unknown 48 PRELUDE_ERROR_DAEMONIZE_LOCK_HELD File lock is held by another process 49 PRELUDE_ERROR_PLUGIN_LTDL_INIT Unable to initialize LTDL 50 PRELUDE_ERROR_STRING_NOT_NULL_TERMINATED String is not 'nul' terminated 51 PRELUDE_ERROR_CANT_RESOLVE Could not resolve address 52 PRELUDE_ERROR_UNKNOWN_PERMISSION_TYPE Specified permission type is unknown 53 PRELUDE_ERROR_UNKNOWN_PERMISSION_BIT Specified permission bit is not known 55 PRELUDE_ERROR_IDMEF_CRITERIA_PARSE Could not parse IDMEF criteria 56 PRELUDE_ERROR_IDMEF_CRITERION_UNSUPPORTED_OPERATOR Unsupported criterion operator 57 PRELUDE_ERROR_IDMEF_CRITERION_INVALID_REGEX Criterion regular expression is not valid 58 PRELUDE_ERROR_TLS_WARNING_ALERT TLS layer returned a warning alert 59 PRELUDE_ERROR_TLS_FATAL_ALERT TLS layer returned a fatal alert 60 PRELUDE_ERROR_IDMEF_CLASS_CHILD_NOT_CLASS IDMEF child is not a class 61 PRELUDE_ERROR_ASSERTION Critical assertion occurred 62 PRELUDE_ERROR_IDMEF_VALUE_TYPE_REF_UNAVAILABLE Reference operation unavailable for specified IDMEF type #62 to 16381 are free to be used. 16382 PRELUDE_ERROR_UNKNOWN_ERRNO Unknown system error # 16384 - 32767 are reserved for future extensions. # PRELUDE_ERROR_SYSTEM_ERROR | (141 to 32767) are to be used for system errors. PRELUDE_ERROR_CODE_DIM Unknown error code libprelude-1.0.0/src/libprelude-error/mkheader.awk0000664000076400007640000001272511202225026017122 00000000000000# mkheader.awk # Copyright (C) 2003, 2004 g10 Code GmbH # # 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, g10 Code GmbH gives unlimited permission to # copy, distribute and modify the C source files that are the output # of mkheader.awk. You need not follow the terms of the GNU General # Public License when using or distributing such scripts, even though # portions of the text of mkheader.awk appear in them. The GNU # General Public License (GPL) does govern all other use of the material # that constitutes the mkheader.awk program. # # Certain portions of the mkheader.awk source text are designed to be # copied (in certain cases, depending on the input) into the output of # mkheader.awk. We call these the "data" portions. The rest of the # mkheader.awk source text consists of comments plus executable code # that decides which of the data portions to output in any given case. # We call these comments and executable code the "non-data" portions. # mkheader.h never copies any of the non-data portions into its output. # # This special exception to the GPL applies to versions of mkheader.awk # released by g10 Code GmbH. When you make and distribute a modified version # of mkheader.awk, you may extend this special exception to the GPL to # apply to your modified version as well, *unless* your modified version # has the potential to copy into its output some of the text that was the # non-data portion of the version that you started with. (In other words, # unless your change moves or copies text from the non-data portions to the # data portions.) If your modification has such potential, you must delete # any notice of this special exception to the GPL from your modified version. # This script processes gpg-error.h.in in an awful way. # Its input is, one after another, the content of the err-sources.h.in file, # the err-codes.h.in file, the errnos.in file, and then gpg-error.h.in. # There is nothing fancy about this. # # An alternative would be to use getline to get the content of the first three files, # but then we need to pre-process gpg-error.h.in with configure to get # at the full path of the files in @srcdir@. BEGIN { FS = "[\t]+"; # sources_nr holds the number of error sources. sources_nr = 0; # codes_nr holds the number of error codes. codes_nr = 0; # errnos_nr holds the number of system errors. errnos_nr = 0; # These variables walk us through our input. sources_header = 1; sources_body = 0; between_sources_and_codes = 0; codes_body = 0; between_codes_and_errnos = 0; errnos_body = 0; prelude_error_h = 0; print "/* Output of mkheader.awk. DO NOT EDIT. */"; print ""; } sources_header { if ($1 ~ /^[0123456789]+$/) { sources_header = 0; sources_body = 1; } } sources_body { sub (/\#.+/, ""); sub (/[ ]+$/, ""); # Strip trailing space and tab characters. if (/^$/) next; if ($1 == "") { sources_body = 0; between_sources_and_codes = 1; } else { # Remember the error source number and symbol of each error source. sources_idx[sources_nr] = $1; sources_sym[sources_nr] = $2; sources_nr++; } } between_sources_and_codes { if ($1 ~ /^[0123456789]+$/) { between_sources_and_codes = 0; codes_body = 1; } } codes_body { sub (/\#.+/, ""); sub (/[ ]+$/, ""); # Strip trailing space and tab characters. if (/^$/) next; if ($1 == "") { codes_body = 0; between_codes_and_errnos = 1; } else { # Remember the error code number and symbol of each error source. codes_idx[codes_nr] = $1; codes_sym[codes_nr] = $2; codes_nr++; } } between_codes_and_errnos { if ($1 ~ /^[0-9]/) { between_codes_and_errnos = 0; errnos_body = 1; } } errnos_body { sub (/\#.+/, ""); sub (/[ ]+$/, ""); # Strip trailing space and tab characters. if (/^$/) next; if ($1 !~ /^[0-9]/) { # Note that this assumes that prelude-error.h.in doesn't start with a digit. errnos_body = 0; prelude_error_h = 1; } else { errnos_idx[errnos_nr] = "PRELUDE_ERROR_SYSTEM_ERROR | " $1; errnos_sym[errnos_nr] = "PRELUDE_ERROR_" $2; errnos_nr++; } } prelude_error_h { if ($0 ~ /^@include err-sources/) { for (i = 0; i < sources_nr; i++) { print " " sources_sym[i] " = " sources_idx[i] ","; # print "#define " sources_sym[i] " (" sources_idx[i] ")"; } } else if ($0 ~ /^@include err-codes/) { for (i = 0; i < codes_nr; i++) { print " " codes_sym[i] " = " codes_idx[i] ","; # print "#define " codes_sym[i] " (" codes_idx[i] ")"; } } else if ($0 ~ /^@include errnos/) { for (i = 0; i < errnos_nr; i++) { print " " errnos_sym[i] " = " errnos_idx[i] ","; # print "#define " errnos_sym[i] " (" errnos_idx[i] ")"; } } else print; } libprelude-1.0.0/src/libprelude-error/Makefile.am0000664000076400007640000000516211202312110016656 00000000000000includedir = $(prefix)/include/libprelude AM_CPPFLAGS = @PCFLAGS@ -I$(top_srcdir)/libmissing -I$(top_srcdir)/src/include -I$(top_builddir)/src/include EXTRA_DIST = mkstrtable.awk err-sources.h.in err-codes.h.in \ mkerrnos.awk errnos.in mkerrcodes.awk mkerrcodes1.awk mkerrcodes2.awk mkerrcodes.c \ mkheader.awk prelude-error.h.in err-sources.h err-codes.h BUILT_SOURCES = err-sources.h err-codes.h code-from-errno.h code-to-errno.h err-sources-sym.h err-codes-sym.h errnos-sym.h prelude-error.h CLEANFILES = err-sources.h err-codes.h code-to-errno.h code-from-errno.h \ prelude-error.h mkerrcodes mkerrcodes.h \ err-sources-sym.h err-codes-sym.h errnos-sym.h nodist_include_HEADERS = prelude-error.h noinst_LTLIBRARIES = libprelude-error.la libprelude_error_la_LIBADD = @LTLIBTHREAD@ libprelude_error_la_LDFLAGS = -no-undefined libprelude_error_la_SOURCES = prelude-error.h prelude-error.c strsource.c strerror.c err-sources.h: Makefile mkstrtable.awk err-sources.h.in LANG="" $(AWK) -f $(srcdir)/mkstrtable.awk -v textidx=3 \ $(srcdir)/err-sources.h.in >$@ err-sources-sym.h: Makefile mkstrtable.awk err-sources.h.in LANG="" $(AWK) -f $(srcdir)/mkstrtable.awk -v textidx=2 -v nogettext=1 \ $(srcdir)/err-sources.h.in >$@ err-codes.h: Makefile mkstrtable.awk err-codes.h.in LANG="" $(AWK) -f $(srcdir)/mkstrtable.awk -v textidx=3 \ $(srcdir)/err-codes.h.in >$@ err-codes-sym.h: Makefile mkstrtable.awk err-codes.h.in LANG="" $(AWK) -f $(srcdir)/mkstrtable.awk -v textidx=2 -v nogettext=1 \ $(srcdir)/err-codes.h.in >$@ code-to-errno.h: Makefile mkerrnos.awk errnos.in LANG="" $(AWK) -f $(srcdir)/mkerrnos.awk $(srcdir)/errnos.in >$@ mkerrcodes.h: Makefile mkerrcodes.awk LANG="" $(AWK) -f $(srcdir)/mkerrcodes1.awk $(srcdir)/errnos.in >_$@ $(CPP) _$@ | grep PRELUDE_ERROR_ | LANG="" $(AWK) -f $(srcdir)/mkerrcodes.awk >$@ -rm _$@ # It is correct to use $(CC_FOR_BUILD) here. We want to run the # program at build time. mkerrcodes: mkerrcodes.c mkerrcodes.h Makefile $(CC_FOR_BUILD) -I. -I$(srcdir) -o $@ $(srcdir)/mkerrcodes.c code-from-errno.h: mkerrcodes Makefile ./mkerrcodes | LANG="" $(AWK) -f $(srcdir)/mkerrcodes2.awk >$@ errnos-sym.h: Makefile mkstrtable.awk errnos.in LANG="" $(AWK) -f $(srcdir)/mkstrtable.awk -v textidx=2 -v nogettext=1 \ -v prefix=PRELUDE_ERROR_ -v namespace=errnos_ \ $(srcdir)/errnos.in >$@ prelude-error.h: Makefile mkheader.awk err-sources.h.in err-codes.h.in errnos.in prelude-error.h.in LANG="" $(AWK) -f $(srcdir)/mkheader.awk \ $(srcdir)/err-sources.h.in \ $(srcdir)/err-codes.h.in \ $(srcdir)/errnos.in \ $(srcdir)/prelude-error.h.in > $@ -include $(top_srcdir)/git.mk libprelude-1.0.0/src/libprelude-error/README0000664000076400007640000000012011202225026015500 00000000000000Most of this code is adaptated from libgpg-error error handling implementation. libprelude-1.0.0/src/libprelude-error/prelude-error.c0000664000076400007640000001342311202225026017565 00000000000000#include "config.h" #include #include #include #include #include #include "prelude.h" #include "prelude-log.h" #include "prelude-error.h" #include "code-to-errno.h" #include "code-from-errno.h" #define PRELUDE_ERROR_CODE_DIM 65536 #define PRELUDE_ERROR_SOURCE_DIM 256 #define PRELUDE_ERROR_SOURCE_SHIFT 23 #define PRELUDE_ERROR_VERBOSE_SHIFT 22 #define PRELUDE_ERROR_CODE_MASK (PRELUDE_ERROR_CODE_DIM - 1) #define PRELUDE_ERROR_SOURCE_MASK (PRELUDE_ERROR_SOURCE_DIM - 1) #define PRELUDE_ERROR_VERBOSE_MASK (1) /** * prelude_error_make: * @source: Error source. * @code: Error code. * * Create a new #prelude_error_t error using @source and @code. * * Returns: The created #prelude_error_t integer. */ prelude_error_t prelude_error_make(prelude_error_source_t source, prelude_error_code_t code) { return (code == PRELUDE_ERROR_NO_ERROR) ? code : -((source << PRELUDE_ERROR_SOURCE_SHIFT) | code); } /** * prelude_error_make_from_errno: * @source: Error source. * @err: errno value. * * Create a new #prelude_error_t error using @source and @errno. * * Returns: The created #prelude_error_t integer. */ prelude_error_t prelude_error_make_from_errno(prelude_error_source_t source, int err) { prelude_error_code_t code = prelude_error_code_from_errno(err); return prelude_error_make(source, code); } /** * prelude_error_verbose_make_v: * @source: Error source. * @code: Error code. * @fmt: Format string. * @ap: Argument list. * * Create a new error using @source and @code, using the detailed error message * specified within @fmt. * * Returns: The created #prelude_error_t integer. */ prelude_error_t prelude_error_verbose_make_v(prelude_error_source_t source, prelude_error_code_t code, const char *fmt, va_list ap) { int ret; prelude_string_t *str; ret = prelude_string_new(&str); if ( ret < 0 ) return ret; ret = prelude_string_vprintf(str, fmt, ap); if ( ret < 0 ) { prelude_string_destroy(str); return ret; } ret = _prelude_thread_set_error(prelude_string_get_string(str)); prelude_string_destroy(str); if ( ret < 0 ) return ret; ret = prelude_error_make(source, code); ret = -ret; ret |= (1 << PRELUDE_ERROR_VERBOSE_SHIFT); return -ret; } /** * prelude_error_verbose_make: * @source: Error source. * @code: Error code. * @fmt: Format string. * @...: Argument list. * * Create a new error using @source and @code, using the detailed error message * specified within @fmt. * * Returns: The created #prelude_error_t integer. */ prelude_error_t prelude_error_verbose_make(prelude_error_source_t source, prelude_error_code_t code, const char *fmt, ...) { int ret; va_list ap; va_start(ap, fmt); ret = prelude_error_verbose_make_v(source, code, fmt, ap); va_end(ap); return ret; } /** * prelude_error_get_code: * @error: A #prelude_error_t return value. * * Returns: the #prelude_code_t code contained within the @prelude_error_t integer. */ prelude_error_code_t prelude_error_get_code(prelude_error_t error) { error = -error; return (prelude_error_code_t) (error & PRELUDE_ERROR_CODE_MASK); } /** * prelude_error_get_source: * @error: A #prelude_error_t return value. * * Returns: the #prelude_source_t source contained within the @prelude_error_t integer. */ prelude_error_source_t prelude_error_get_source(prelude_error_t error) { error = -error; return (prelude_error_source_t) ((error >> PRELUDE_ERROR_SOURCE_SHIFT) & PRELUDE_ERROR_SOURCE_MASK); } /** * prelude_error_is_verbose: * @error: A #prelude_error_t return value. * * Returns: #PRELUDE_BOOL_TRUE if there is a detailed message for this error, #PRELUDE_BOOL_FALSE otherwise. */ prelude_bool_t prelude_error_is_verbose(prelude_error_t error) { error = -error; return ((error >> PRELUDE_ERROR_VERBOSE_SHIFT) & PRELUDE_ERROR_VERBOSE_MASK) ? PRELUDE_BOOL_TRUE : PRELUDE_BOOL_FALSE; } /** * prelude_error_code_from_errno: * @err: errno value. * * Returns: the #prelude_error_code_t value corresponding to @err. */ prelude_error_code_t prelude_error_code_from_errno(int err) { int idx; if ( ! err ) return PRELUDE_ERROR_NO_ERROR; idx = errno_to_idx(err); if ( idx < 0 ) return PRELUDE_ERROR_UNKNOWN_ERRNO; return PRELUDE_ERROR_SYSTEM_ERROR | err_code_from_index[idx]; } /** * prelude_error_code_to_errno: * @code: Error code. * * Returns: the errno value corresponding to @code. */ int prelude_error_code_to_errno(prelude_error_code_t code) { if ( ! (code & PRELUDE_ERROR_SYSTEM_ERROR) ) return 0; code &= ~PRELUDE_ERROR_SYSTEM_ERROR; if ( code < sizeof(err_code_to_errno) / sizeof(err_code_to_errno[0]) ) return err_code_to_errno[code]; else return 0; } /** * prelude_perror: * @error: A #prelude_error_t return value. * @fmt: Format string. * @...: Argument list. * * Print the error to stderr, or to syslog() in case stderr is unavailable. */ void prelude_perror(prelude_error_t error, const char *fmt, ...) { va_list ap; char buf[1024]; va_start(ap, fmt); vsnprintf(buf, sizeof(buf), fmt, ap); va_end(ap); if ( prelude_error_get_source(error) ) prelude_log(PRELUDE_LOG_WARN, "%s: %s: %s.\n", prelude_strsource(error), buf, prelude_strerror(error)); else prelude_log(PRELUDE_LOG_WARN, "%s: %s.\n", buf, prelude_strerror(error)); } libprelude-1.0.0/src/libprelude-error/mkerrcodes.c0000664000076400007640000000523011202225026017131 00000000000000/* mkerrcodes.c - Generate list of system error values. Copyright (C) 2004 g10 Code GmbH This file is part of libgpg-error. libgpg-error is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. libgpg-error 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 Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with libgpg-error; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ /* This file must not include config.h, as that is for the host system, while this file will be run on the build system. */ #include #include "mkerrcodes.h" static const char header[] = "/* errnos.h - List of system error values.\n" " Copyright (C) 2004 g10 Code GmbH\n" " This file is part of libgpg-error.\n" "\n" " libgpg-error is free software; you can redistribute it and/or\n" " modify it under the terms of the GNU Lesser General Public License\n" " as published by the Free Software Foundation; either version 2.1 of\n" " the License, or (at your option) any later version.\n" "\n" " libgpg-error is distributed in the hope that it will be useful, but\n" " WITHOUT ANY WARRANTY; without even the implied warranty of\n" " MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU\n" " Lesser General Public License for more details.\n" "\n" " You should have received a copy of the GNU Lesser General Public\n" " License along with libgpg-error; if not, write to the Free\n" " Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA\n" " 02111-1307, USA. */\n" "\n"; int main (int argc, char **argv) { int sorted; int i; printf ("%s", header); do { sorted = 1; for (i = 0; i < sizeof (err_table) / sizeof (err_table[0]) - 1; i++) if (err_table[i].err > err_table[i + 1].err) { int err = err_table[i].err; const char *err_sym = err_table[i].err_sym; err_table[i].err = err_table[i + 1].err; err_table[i].err_sym = err_table[i + 1].err_sym; err_table[i + 1].err = err; err_table[i + 1].err_sym = err_sym; sorted = 0; } } while (!sorted); for (i = 0; i < sizeof (err_table) / sizeof (err_table[0]); i++) printf ("%i\t%s\n", err_table[i].err, err_table[i].err_sym); return 0; } libprelude-1.0.0/src/libprelude-error/Makefile.in0000664000076400007640000014626611347714457016740 00000000000000# Makefile.in generated by automake 1.11.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, # Inc. # This Makefile.in 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. @SET_MAKE@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ target_triplet = @target@ subdir = src/libprelude-error DIST_COMMON = README $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/libmissing/m4/00gnulib.m4 \ $(top_srcdir)/libmissing/m4/alloca.m4 \ $(top_srcdir)/libmissing/m4/arpa_inet_h.m4 \ $(top_srcdir)/libmissing/m4/btowc.m4 \ $(top_srcdir)/libmissing/m4/close.m4 \ $(top_srcdir)/libmissing/m4/codeset.m4 \ $(top_srcdir)/libmissing/m4/cond.m4 \ $(top_srcdir)/libmissing/m4/dos.m4 \ $(top_srcdir)/libmissing/m4/dup2.m4 \ $(top_srcdir)/libmissing/m4/errno_h.m4 \ $(top_srcdir)/libmissing/m4/exponentd.m4 \ $(top_srcdir)/libmissing/m4/exponentf.m4 \ $(top_srcdir)/libmissing/m4/exponentl.m4 \ $(top_srcdir)/libmissing/m4/extensions.m4 \ $(top_srcdir)/libmissing/m4/fclose.m4 \ $(top_srcdir)/libmissing/m4/fcntl-o.m4 \ $(top_srcdir)/libmissing/m4/fcntl_h.m4 \ $(top_srcdir)/libmissing/m4/float_h.m4 \ $(top_srcdir)/libmissing/m4/fopen.m4 \ $(top_srcdir)/libmissing/m4/fpieee.m4 \ $(top_srcdir)/libmissing/m4/frexp.m4 \ $(top_srcdir)/libmissing/m4/frexpl.m4 \ $(top_srcdir)/libmissing/m4/fseeko.m4 \ $(top_srcdir)/libmissing/m4/ftw.m4 \ $(top_srcdir)/libmissing/m4/getaddrinfo.m4 \ $(top_srcdir)/libmissing/m4/getdelim.m4 \ $(top_srcdir)/libmissing/m4/gethostname.m4 \ $(top_srcdir)/libmissing/m4/getline.m4 \ $(top_srcdir)/libmissing/m4/getpagesize.m4 \ $(top_srcdir)/libmissing/m4/getpass.m4 \ $(top_srcdir)/libmissing/m4/gettimeofday.m4 \ $(top_srcdir)/libmissing/m4/glibc21.m4 \ $(top_srcdir)/libmissing/m4/gnulib-common.m4 \ $(top_srcdir)/libmissing/m4/gnulib-comp.m4 \ $(top_srcdir)/libmissing/m4/gnulib-tool.m4 \ $(top_srcdir)/libmissing/m4/hostent.m4 \ $(top_srcdir)/libmissing/m4/include_next.m4 \ $(top_srcdir)/libmissing/m4/inet_ntop.m4 \ $(top_srcdir)/libmissing/m4/inet_pton.m4 \ $(top_srcdir)/libmissing/m4/intmax_t.m4 \ $(top_srcdir)/libmissing/m4/inttypes_h.m4 \ $(top_srcdir)/libmissing/m4/isnand.m4 \ $(top_srcdir)/libmissing/m4/isnanf.m4 \ $(top_srcdir)/libmissing/m4/isnanl.m4 \ $(top_srcdir)/libmissing/m4/langinfo_h.m4 \ $(top_srcdir)/libmissing/m4/ldexpl.m4 \ $(top_srcdir)/libmissing/m4/lib-ld.m4 \ $(top_srcdir)/libmissing/m4/lib-link.m4 \ $(top_srcdir)/libmissing/m4/lib-prefix.m4 \ $(top_srcdir)/libmissing/m4/localcharset.m4 \ $(top_srcdir)/libmissing/m4/locale-fr.m4 \ $(top_srcdir)/libmissing/m4/locale-ja.m4 \ $(top_srcdir)/libmissing/m4/locale-tr.m4 \ $(top_srcdir)/libmissing/m4/locale-zh.m4 \ $(top_srcdir)/libmissing/m4/lock.m4 \ $(top_srcdir)/libmissing/m4/longlong.m4 \ $(top_srcdir)/libmissing/m4/lseek.m4 \ $(top_srcdir)/libmissing/m4/lstat.m4 \ $(top_srcdir)/libmissing/m4/malloc.m4 \ $(top_srcdir)/libmissing/m4/math_h.m4 \ $(top_srcdir)/libmissing/m4/mbrtowc.m4 \ $(top_srcdir)/libmissing/m4/mbsinit.m4 \ $(top_srcdir)/libmissing/m4/mbstate_t.m4 \ $(top_srcdir)/libmissing/m4/memchr.m4 \ $(top_srcdir)/libmissing/m4/memmem.m4 \ $(top_srcdir)/libmissing/m4/minmax.m4 \ $(top_srcdir)/libmissing/m4/mktime.m4 \ $(top_srcdir)/libmissing/m4/mmap-anon.m4 \ $(top_srcdir)/libmissing/m4/mode_t.m4 \ $(top_srcdir)/libmissing/m4/multiarch.m4 \ $(top_srcdir)/libmissing/m4/netdb_h.m4 \ $(top_srcdir)/libmissing/m4/netinet_in_h.m4 \ $(top_srcdir)/libmissing/m4/nl_langinfo.m4 \ $(top_srcdir)/libmissing/m4/nocrash.m4 \ $(top_srcdir)/libmissing/m4/onceonly.m4 \ $(top_srcdir)/libmissing/m4/open.m4 \ $(top_srcdir)/libmissing/m4/pathmax.m4 \ $(top_srcdir)/libmissing/m4/perror.m4 \ $(top_srcdir)/libmissing/m4/poll.m4 \ $(top_srcdir)/libmissing/m4/printf-frexp.m4 \ $(top_srcdir)/libmissing/m4/printf-frexpl.m4 \ $(top_srcdir)/libmissing/m4/printf.m4 \ $(top_srcdir)/libmissing/m4/realloc.m4 \ $(top_srcdir)/libmissing/m4/regex.m4 \ $(top_srcdir)/libmissing/m4/relocatable-lib.m4 \ $(top_srcdir)/libmissing/m4/select.m4 \ $(top_srcdir)/libmissing/m4/servent.m4 \ $(top_srcdir)/libmissing/m4/signal_h.m4 \ $(top_srcdir)/libmissing/m4/signalblocking.m4 \ $(top_srcdir)/libmissing/m4/signbit.m4 \ $(top_srcdir)/libmissing/m4/size_max.m4 \ $(top_srcdir)/libmissing/m4/sleep.m4 \ $(top_srcdir)/libmissing/m4/snprintf-posix.m4 \ $(top_srcdir)/libmissing/m4/snprintf.m4 \ $(top_srcdir)/libmissing/m4/sockets.m4 \ $(top_srcdir)/libmissing/m4/socklen.m4 \ $(top_srcdir)/libmissing/m4/sockpfaf.m4 \ $(top_srcdir)/libmissing/m4/ssize_t.m4 \ $(top_srcdir)/libmissing/m4/stat.m4 \ $(top_srcdir)/libmissing/m4/stdbool.m4 \ $(top_srcdir)/libmissing/m4/stddef_h.m4 \ $(top_srcdir)/libmissing/m4/stdint.m4 \ $(top_srcdir)/libmissing/m4/stdint_h.m4 \ $(top_srcdir)/libmissing/m4/stdio_h.m4 \ $(top_srcdir)/libmissing/m4/stdlib_h.m4 \ $(top_srcdir)/libmissing/m4/strcase.m4 \ $(top_srcdir)/libmissing/m4/strcasestr.m4 \ $(top_srcdir)/libmissing/m4/strdup.m4 \ $(top_srcdir)/libmissing/m4/strerror.m4 \ $(top_srcdir)/libmissing/m4/string_h.m4 \ $(top_srcdir)/libmissing/m4/strings_h.m4 \ $(top_srcdir)/libmissing/m4/strndup.m4 \ $(top_srcdir)/libmissing/m4/strnlen.m4 \ $(top_srcdir)/libmissing/m4/strptime.m4 \ $(top_srcdir)/libmissing/m4/strsep.m4 \ $(top_srcdir)/libmissing/m4/symlink.m4 \ $(top_srcdir)/libmissing/m4/sys_ioctl_h.m4 \ $(top_srcdir)/libmissing/m4/sys_select_h.m4 \ $(top_srcdir)/libmissing/m4/sys_socket_h.m4 \ $(top_srcdir)/libmissing/m4/sys_stat_h.m4 \ $(top_srcdir)/libmissing/m4/sys_time_h.m4 \ $(top_srcdir)/libmissing/m4/sys_utsname_h.m4 \ $(top_srcdir)/libmissing/m4/thread.m4 \ $(top_srcdir)/libmissing/m4/threadlib.m4 \ $(top_srcdir)/libmissing/m4/time_h.m4 \ $(top_srcdir)/libmissing/m4/time_r.m4 \ $(top_srcdir)/libmissing/m4/timegm.m4 \ $(top_srcdir)/libmissing/m4/tls.m4 \ $(top_srcdir)/libmissing/m4/tm_gmtoff.m4 \ $(top_srcdir)/libmissing/m4/uname.m4 \ $(top_srcdir)/libmissing/m4/ungetc.m4 \ $(top_srcdir)/libmissing/m4/unistd_h.m4 \ $(top_srcdir)/libmissing/m4/vasnprintf.m4 \ $(top_srcdir)/libmissing/m4/vsnprintf-posix.m4 \ $(top_srcdir)/libmissing/m4/vsnprintf.m4 \ $(top_srcdir)/libmissing/m4/warn-on-use.m4 \ $(top_srcdir)/libmissing/m4/wchar.m4 \ $(top_srcdir)/libmissing/m4/wchar_t.m4 \ $(top_srcdir)/libmissing/m4/wcrtomb.m4 \ $(top_srcdir)/libmissing/m4/wctob.m4 \ $(top_srcdir)/libmissing/m4/wctype.m4 \ $(top_srcdir)/libmissing/m4/wint_t.m4 \ $(top_srcdir)/libmissing/m4/write.m4 \ $(top_srcdir)/libmissing/m4/xsize.m4 \ $(top_srcdir)/libmissing/m4/yield.m4 \ $(top_srcdir)/m4/ac_compile_check_sizeof.m4 \ $(top_srcdir)/m4/am_path_ruby.m4 $(top_srcdir)/m4/argz.m4 \ $(top_srcdir)/m4/as-ac-expand.m4 \ $(top_srcdir)/m4/ax_c_check_flag.m4 \ $(top_srcdir)/m4/ax_check_aligned_access_required.m4 \ $(top_srcdir)/m4/ax_create_prelude_inttypes_h.m4 \ $(top_srcdir)/m4/ax_ld_check_flag.m4 \ $(top_srcdir)/m4/gtk-doc.m4 $(top_srcdir)/m4/libgcrypt.m4 \ $(top_srcdir)/m4/libgnutls-extra.m4 \ $(top_srcdir)/m4/libgnutls.m4 $(top_srcdir)/m4/libtool.m4 \ $(top_srcdir)/m4/ltdl.m4 $(top_srcdir)/m4/ltoptions.m4 \ $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/m4/pkg.m4 \ $(top_srcdir)/configure.in am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = LTLIBRARIES = $(noinst_LTLIBRARIES) libprelude_error_la_DEPENDENCIES = am_libprelude_error_la_OBJECTS = prelude-error.lo strsource.lo \ strerror.lo libprelude_error_la_OBJECTS = $(am_libprelude_error_la_OBJECTS) libprelude_error_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(libprelude_error_la_LDFLAGS) $(LDFLAGS) -o $@ DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) CCLD = $(CC) LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ $(LDFLAGS) -o $@ SOURCES = $(libprelude_error_la_SOURCES) DIST_SOURCES = $(libprelude_error_la_SOURCES) am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; am__install_max = 40 am__nobase_strip_setup = \ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` am__nobase_strip = \ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" am__nobase_list = $(am__nobase_strip_setup); \ for p in $$list; do echo "$$p $$p"; done | \ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ if (++n[$$2] == $(am__install_max)) \ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ END { for (dir in files) print dir, files[dir] }' am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' am__installdirs = "$(DESTDIR)$(includedir)" HEADERS = $(nodist_include_HEADERS) ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ ALLOCA = @ALLOCA@ ALLOCA_H = @ALLOCA_H@ AMTAR = @AMTAR@ APPLE_UNIVERSAL_BUILD = @APPLE_UNIVERSAL_BUILD@ AR = @AR@ ARGZ_H = @ARGZ_H@ AS = @AS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ BINDINGS_CC = @BINDINGS_CC@ BINDIR = @BINDIR@ BITSIZEOF_PTRDIFF_T = @BITSIZEOF_PTRDIFF_T@ BITSIZEOF_SIG_ATOMIC_T = @BITSIZEOF_SIG_ATOMIC_T@ BITSIZEOF_SIZE_T = @BITSIZEOF_SIZE_T@ BITSIZEOF_WCHAR_T = @BITSIZEOF_WCHAR_T@ BITSIZEOF_WINT_T = @BITSIZEOF_WINT_T@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CC_FOR_BUILD = @CC_FOR_BUILD@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EMULTIHOP_HIDDEN = @EMULTIHOP_HIDDEN@ EMULTIHOP_VALUE = @EMULTIHOP_VALUE@ ENOLINK_HIDDEN = @ENOLINK_HIDDEN@ ENOLINK_VALUE = @ENOLINK_VALUE@ EOVERFLOW_HIDDEN = @EOVERFLOW_HIDDEN@ EOVERFLOW_VALUE = @EOVERFLOW_VALUE@ ERRNO_H = @ERRNO_H@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ FLOAT_H = @FLOAT_H@ GETADDRINFO_LIB = @GETADDRINFO_LIB@ GETHOSTNAME_LIB = @GETHOSTNAME_LIB@ GLIBC21 = @GLIBC21@ GNULIB_ACCEPT = @GNULIB_ACCEPT@ GNULIB_ACCEPT4 = @GNULIB_ACCEPT4@ GNULIB_ACOSL = @GNULIB_ACOSL@ GNULIB_ASINL = @GNULIB_ASINL@ GNULIB_ATANL = @GNULIB_ATANL@ GNULIB_ATOLL = @GNULIB_ATOLL@ GNULIB_BIND = @GNULIB_BIND@ GNULIB_BTOWC = @GNULIB_BTOWC@ GNULIB_CALLOC_POSIX = @GNULIB_CALLOC_POSIX@ GNULIB_CANONICALIZE_FILE_NAME = @GNULIB_CANONICALIZE_FILE_NAME@ GNULIB_CEILF = @GNULIB_CEILF@ GNULIB_CEILL = @GNULIB_CEILL@ GNULIB_CHOWN = @GNULIB_CHOWN@ GNULIB_CLOSE = @GNULIB_CLOSE@ GNULIB_CONNECT = @GNULIB_CONNECT@ GNULIB_COSL = @GNULIB_COSL@ GNULIB_DPRINTF = @GNULIB_DPRINTF@ GNULIB_DUP2 = @GNULIB_DUP2@ GNULIB_DUP3 = @GNULIB_DUP3@ GNULIB_ENVIRON = @GNULIB_ENVIRON@ GNULIB_EUIDACCESS = @GNULIB_EUIDACCESS@ GNULIB_EXPL = @GNULIB_EXPL@ GNULIB_FACCESSAT = @GNULIB_FACCESSAT@ GNULIB_FCHDIR = @GNULIB_FCHDIR@ GNULIB_FCHMODAT = @GNULIB_FCHMODAT@ GNULIB_FCHOWNAT = @GNULIB_FCHOWNAT@ GNULIB_FCLOSE = @GNULIB_FCLOSE@ GNULIB_FCNTL = @GNULIB_FCNTL@ GNULIB_FFLUSH = @GNULIB_FFLUSH@ GNULIB_FLOORF = @GNULIB_FLOORF@ GNULIB_FLOORL = @GNULIB_FLOORL@ GNULIB_FOPEN = @GNULIB_FOPEN@ GNULIB_FPRINTF = @GNULIB_FPRINTF@ GNULIB_FPRINTF_POSIX = @GNULIB_FPRINTF_POSIX@ GNULIB_FPURGE = @GNULIB_FPURGE@ GNULIB_FPUTC = @GNULIB_FPUTC@ GNULIB_FPUTS = @GNULIB_FPUTS@ GNULIB_FREOPEN = @GNULIB_FREOPEN@ GNULIB_FREXP = @GNULIB_FREXP@ GNULIB_FREXPL = @GNULIB_FREXPL@ GNULIB_FSEEK = @GNULIB_FSEEK@ GNULIB_FSEEKO = @GNULIB_FSEEKO@ GNULIB_FSTATAT = @GNULIB_FSTATAT@ GNULIB_FSYNC = @GNULIB_FSYNC@ GNULIB_FTELL = @GNULIB_FTELL@ GNULIB_FTELLO = @GNULIB_FTELLO@ GNULIB_FTRUNCATE = @GNULIB_FTRUNCATE@ GNULIB_FUTIMENS = @GNULIB_FUTIMENS@ GNULIB_FWRITE = @GNULIB_FWRITE@ GNULIB_GETADDRINFO = @GNULIB_GETADDRINFO@ GNULIB_GETCWD = @GNULIB_GETCWD@ GNULIB_GETDELIM = @GNULIB_GETDELIM@ GNULIB_GETDOMAINNAME = @GNULIB_GETDOMAINNAME@ GNULIB_GETDTABLESIZE = @GNULIB_GETDTABLESIZE@ GNULIB_GETGROUPS = @GNULIB_GETGROUPS@ GNULIB_GETHOSTNAME = @GNULIB_GETHOSTNAME@ GNULIB_GETLINE = @GNULIB_GETLINE@ GNULIB_GETLOADAVG = @GNULIB_GETLOADAVG@ GNULIB_GETLOGIN = @GNULIB_GETLOGIN@ GNULIB_GETLOGIN_R = @GNULIB_GETLOGIN_R@ GNULIB_GETPAGESIZE = @GNULIB_GETPAGESIZE@ GNULIB_GETPEERNAME = @GNULIB_GETPEERNAME@ GNULIB_GETSOCKNAME = @GNULIB_GETSOCKNAME@ GNULIB_GETSOCKOPT = @GNULIB_GETSOCKOPT@ GNULIB_GETSUBOPT = @GNULIB_GETSUBOPT@ GNULIB_GETTIMEOFDAY = @GNULIB_GETTIMEOFDAY@ GNULIB_GETUSERSHELL = @GNULIB_GETUSERSHELL@ GNULIB_INET_NTOP = @GNULIB_INET_NTOP@ GNULIB_INET_PTON = @GNULIB_INET_PTON@ GNULIB_IOCTL = @GNULIB_IOCTL@ GNULIB_ISFINITE = @GNULIB_ISFINITE@ GNULIB_ISINF = @GNULIB_ISINF@ GNULIB_ISNAN = @GNULIB_ISNAN@ GNULIB_ISNAND = @GNULIB_ISNAND@ GNULIB_ISNANF = @GNULIB_ISNANF@ GNULIB_ISNANL = @GNULIB_ISNANL@ GNULIB_LCHMOD = @GNULIB_LCHMOD@ GNULIB_LCHOWN = @GNULIB_LCHOWN@ GNULIB_LDEXPL = @GNULIB_LDEXPL@ GNULIB_LINK = @GNULIB_LINK@ GNULIB_LINKAT = @GNULIB_LINKAT@ GNULIB_LISTEN = @GNULIB_LISTEN@ GNULIB_LOGL = @GNULIB_LOGL@ GNULIB_LSEEK = @GNULIB_LSEEK@ GNULIB_LSTAT = @GNULIB_LSTAT@ GNULIB_MALLOC_POSIX = @GNULIB_MALLOC_POSIX@ GNULIB_MBRLEN = @GNULIB_MBRLEN@ GNULIB_MBRTOWC = @GNULIB_MBRTOWC@ GNULIB_MBSCASECMP = @GNULIB_MBSCASECMP@ GNULIB_MBSCASESTR = @GNULIB_MBSCASESTR@ GNULIB_MBSCHR = @GNULIB_MBSCHR@ GNULIB_MBSCSPN = @GNULIB_MBSCSPN@ GNULIB_MBSINIT = @GNULIB_MBSINIT@ GNULIB_MBSLEN = @GNULIB_MBSLEN@ GNULIB_MBSNCASECMP = @GNULIB_MBSNCASECMP@ GNULIB_MBSNLEN = @GNULIB_MBSNLEN@ GNULIB_MBSNRTOWCS = @GNULIB_MBSNRTOWCS@ GNULIB_MBSPBRK = @GNULIB_MBSPBRK@ GNULIB_MBSPCASECMP = @GNULIB_MBSPCASECMP@ GNULIB_MBSRCHR = @GNULIB_MBSRCHR@ GNULIB_MBSRTOWCS = @GNULIB_MBSRTOWCS@ GNULIB_MBSSEP = @GNULIB_MBSSEP@ GNULIB_MBSSPN = @GNULIB_MBSSPN@ GNULIB_MBSSTR = @GNULIB_MBSSTR@ GNULIB_MBSTOK_R = @GNULIB_MBSTOK_R@ GNULIB_MEMCHR = @GNULIB_MEMCHR@ GNULIB_MEMMEM = @GNULIB_MEMMEM@ GNULIB_MEMPCPY = @GNULIB_MEMPCPY@ GNULIB_MEMRCHR = @GNULIB_MEMRCHR@ GNULIB_MKDIRAT = @GNULIB_MKDIRAT@ GNULIB_MKDTEMP = @GNULIB_MKDTEMP@ GNULIB_MKFIFO = @GNULIB_MKFIFO@ GNULIB_MKFIFOAT = @GNULIB_MKFIFOAT@ GNULIB_MKNOD = @GNULIB_MKNOD@ GNULIB_MKNODAT = @GNULIB_MKNODAT@ GNULIB_MKOSTEMP = @GNULIB_MKOSTEMP@ GNULIB_MKOSTEMPS = @GNULIB_MKOSTEMPS@ GNULIB_MKSTEMP = @GNULIB_MKSTEMP@ GNULIB_MKSTEMPS = @GNULIB_MKSTEMPS@ GNULIB_NL_LANGINFO = @GNULIB_NL_LANGINFO@ GNULIB_OBSTACK_PRINTF = @GNULIB_OBSTACK_PRINTF@ GNULIB_OBSTACK_PRINTF_POSIX = @GNULIB_OBSTACK_PRINTF_POSIX@ GNULIB_OPEN = @GNULIB_OPEN@ GNULIB_OPENAT = @GNULIB_OPENAT@ GNULIB_PERROR = @GNULIB_PERROR@ GNULIB_PIPE2 = @GNULIB_PIPE2@ GNULIB_POPEN = @GNULIB_POPEN@ GNULIB_PREAD = @GNULIB_PREAD@ GNULIB_PRINTF = @GNULIB_PRINTF@ GNULIB_PRINTF_POSIX = @GNULIB_PRINTF_POSIX@ GNULIB_PUTC = @GNULIB_PUTC@ GNULIB_PUTCHAR = @GNULIB_PUTCHAR@ GNULIB_PUTENV = @GNULIB_PUTENV@ GNULIB_PUTS = @GNULIB_PUTS@ GNULIB_RANDOM_R = @GNULIB_RANDOM_R@ GNULIB_RAWMEMCHR = @GNULIB_RAWMEMCHR@ GNULIB_READLINK = @GNULIB_READLINK@ GNULIB_READLINKAT = @GNULIB_READLINKAT@ GNULIB_REALLOC_POSIX = @GNULIB_REALLOC_POSIX@ GNULIB_REALPATH = @GNULIB_REALPATH@ GNULIB_RECV = @GNULIB_RECV@ GNULIB_RECVFROM = @GNULIB_RECVFROM@ GNULIB_REMOVE = @GNULIB_REMOVE@ GNULIB_RENAME = @GNULIB_RENAME@ GNULIB_RENAMEAT = @GNULIB_RENAMEAT@ GNULIB_RMDIR = @GNULIB_RMDIR@ GNULIB_ROUND = @GNULIB_ROUND@ GNULIB_ROUNDF = @GNULIB_ROUNDF@ GNULIB_ROUNDL = @GNULIB_ROUNDL@ GNULIB_RPMATCH = @GNULIB_RPMATCH@ GNULIB_SELECT = @GNULIB_SELECT@ GNULIB_SEND = @GNULIB_SEND@ GNULIB_SENDTO = @GNULIB_SENDTO@ GNULIB_SETENV = @GNULIB_SETENV@ GNULIB_SETSOCKOPT = @GNULIB_SETSOCKOPT@ GNULIB_SHUTDOWN = @GNULIB_SHUTDOWN@ GNULIB_SIGACTION = @GNULIB_SIGACTION@ GNULIB_SIGNAL_H_SIGPIPE = @GNULIB_SIGNAL_H_SIGPIPE@ GNULIB_SIGNBIT = @GNULIB_SIGNBIT@ GNULIB_SIGPROCMASK = @GNULIB_SIGPROCMASK@ GNULIB_SINL = @GNULIB_SINL@ GNULIB_SLEEP = @GNULIB_SLEEP@ GNULIB_SNPRINTF = @GNULIB_SNPRINTF@ GNULIB_SOCKET = @GNULIB_SOCKET@ GNULIB_SPRINTF_POSIX = @GNULIB_SPRINTF_POSIX@ GNULIB_SQRTL = @GNULIB_SQRTL@ GNULIB_STAT = @GNULIB_STAT@ GNULIB_STDIO_H_SIGPIPE = @GNULIB_STDIO_H_SIGPIPE@ GNULIB_STPCPY = @GNULIB_STPCPY@ GNULIB_STPNCPY = @GNULIB_STPNCPY@ GNULIB_STRCASESTR = @GNULIB_STRCASESTR@ GNULIB_STRCHRNUL = @GNULIB_STRCHRNUL@ GNULIB_STRDUP = @GNULIB_STRDUP@ GNULIB_STRERROR = @GNULIB_STRERROR@ GNULIB_STRNDUP = @GNULIB_STRNDUP@ GNULIB_STRNLEN = @GNULIB_STRNLEN@ GNULIB_STRPBRK = @GNULIB_STRPBRK@ GNULIB_STRSEP = @GNULIB_STRSEP@ GNULIB_STRSIGNAL = @GNULIB_STRSIGNAL@ GNULIB_STRSTR = @GNULIB_STRSTR@ GNULIB_STRTOD = @GNULIB_STRTOD@ GNULIB_STRTOK_R = @GNULIB_STRTOK_R@ GNULIB_STRTOLL = @GNULIB_STRTOLL@ GNULIB_STRTOULL = @GNULIB_STRTOULL@ GNULIB_STRVERSCMP = @GNULIB_STRVERSCMP@ GNULIB_SYMLINK = @GNULIB_SYMLINK@ GNULIB_SYMLINKAT = @GNULIB_SYMLINKAT@ GNULIB_TANL = @GNULIB_TANL@ GNULIB_TRUNC = @GNULIB_TRUNC@ GNULIB_TRUNCF = @GNULIB_TRUNCF@ GNULIB_TRUNCL = @GNULIB_TRUNCL@ GNULIB_UNAME = @GNULIB_UNAME@ GNULIB_UNISTD_H_GETOPT = @GNULIB_UNISTD_H_GETOPT@ GNULIB_UNISTD_H_SIGPIPE = @GNULIB_UNISTD_H_SIGPIPE@ GNULIB_UNLINK = @GNULIB_UNLINK@ GNULIB_UNLINKAT = @GNULIB_UNLINKAT@ GNULIB_UNSETENV = @GNULIB_UNSETENV@ GNULIB_USLEEP = @GNULIB_USLEEP@ GNULIB_UTIMENSAT = @GNULIB_UTIMENSAT@ GNULIB_VASPRINTF = @GNULIB_VASPRINTF@ GNULIB_VDPRINTF = @GNULIB_VDPRINTF@ GNULIB_VFPRINTF = @GNULIB_VFPRINTF@ GNULIB_VFPRINTF_POSIX = @GNULIB_VFPRINTF_POSIX@ GNULIB_VPRINTF = @GNULIB_VPRINTF@ GNULIB_VPRINTF_POSIX = @GNULIB_VPRINTF_POSIX@ GNULIB_VSNPRINTF = @GNULIB_VSNPRINTF@ GNULIB_VSPRINTF_POSIX = @GNULIB_VSPRINTF_POSIX@ GNULIB_WCRTOMB = @GNULIB_WCRTOMB@ GNULIB_WCSNRTOMBS = @GNULIB_WCSNRTOMBS@ GNULIB_WCSRTOMBS = @GNULIB_WCSRTOMBS@ GNULIB_WCTOB = @GNULIB_WCTOB@ GNULIB_WCWIDTH = @GNULIB_WCWIDTH@ GNULIB_WRITE = @GNULIB_WRITE@ GREP = @GREP@ GTKDOC_CHECK = @GTKDOC_CHECK@ HAVE_ACCEPT4 = @HAVE_ACCEPT4@ HAVE_ACOSL = @HAVE_ACOSL@ HAVE_ARPA_INET_H = @HAVE_ARPA_INET_H@ HAVE_ASINL = @HAVE_ASINL@ HAVE_ATANL = @HAVE_ATANL@ HAVE_ATOLL = @HAVE_ATOLL@ HAVE_BTOWC = @HAVE_BTOWC@ HAVE_CALLOC_POSIX = @HAVE_CALLOC_POSIX@ HAVE_CANONICALIZE_FILE_NAME = @HAVE_CANONICALIZE_FILE_NAME@ HAVE_CHOWN = @HAVE_CHOWN@ HAVE_COSL = @HAVE_COSL@ HAVE_CXX = @HAVE_CXX@ HAVE_DECL_ACOSL = @HAVE_DECL_ACOSL@ HAVE_DECL_ASINL = @HAVE_DECL_ASINL@ HAVE_DECL_ATANL = @HAVE_DECL_ATANL@ HAVE_DECL_COSL = @HAVE_DECL_COSL@ HAVE_DECL_ENVIRON = @HAVE_DECL_ENVIRON@ HAVE_DECL_EXPL = @HAVE_DECL_EXPL@ HAVE_DECL_FPURGE = @HAVE_DECL_FPURGE@ HAVE_DECL_FREEADDRINFO = @HAVE_DECL_FREEADDRINFO@ HAVE_DECL_FREXPL = @HAVE_DECL_FREXPL@ HAVE_DECL_GAI_STRERROR = @HAVE_DECL_GAI_STRERROR@ HAVE_DECL_GETADDRINFO = @HAVE_DECL_GETADDRINFO@ HAVE_DECL_GETDELIM = @HAVE_DECL_GETDELIM@ HAVE_DECL_GETLINE = @HAVE_DECL_GETLINE@ HAVE_DECL_GETLOADAVG = @HAVE_DECL_GETLOADAVG@ HAVE_DECL_GETLOGIN_R = @HAVE_DECL_GETLOGIN_R@ HAVE_DECL_GETNAMEINFO = @HAVE_DECL_GETNAMEINFO@ HAVE_DECL_INET_NTOP = @HAVE_DECL_INET_NTOP@ HAVE_DECL_INET_PTON = @HAVE_DECL_INET_PTON@ HAVE_DECL_LDEXPL = @HAVE_DECL_LDEXPL@ HAVE_DECL_LOGL = @HAVE_DECL_LOGL@ HAVE_DECL_MEMMEM = @HAVE_DECL_MEMMEM@ HAVE_DECL_MEMRCHR = @HAVE_DECL_MEMRCHR@ HAVE_DECL_OBSTACK_PRINTF = @HAVE_DECL_OBSTACK_PRINTF@ HAVE_DECL_SINL = @HAVE_DECL_SINL@ HAVE_DECL_SNPRINTF = @HAVE_DECL_SNPRINTF@ HAVE_DECL_SQRTL = @HAVE_DECL_SQRTL@ HAVE_DECL_STRDUP = @HAVE_DECL_STRDUP@ HAVE_DECL_STRERROR = @HAVE_DECL_STRERROR@ HAVE_DECL_STRNCASECMP = @HAVE_DECL_STRNCASECMP@ HAVE_DECL_STRNDUP = @HAVE_DECL_STRNDUP@ HAVE_DECL_STRNLEN = @HAVE_DECL_STRNLEN@ HAVE_DECL_STRSIGNAL = @HAVE_DECL_STRSIGNAL@ HAVE_DECL_STRTOK_R = @HAVE_DECL_STRTOK_R@ HAVE_DECL_TANL = @HAVE_DECL_TANL@ HAVE_DECL_TRUNC = @HAVE_DECL_TRUNC@ HAVE_DECL_TRUNCF = @HAVE_DECL_TRUNCF@ HAVE_DECL_VSNPRINTF = @HAVE_DECL_VSNPRINTF@ HAVE_DECL_WCTOB = @HAVE_DECL_WCTOB@ HAVE_DECL_WCWIDTH = @HAVE_DECL_WCWIDTH@ HAVE_DPRINTF = @HAVE_DPRINTF@ HAVE_DUP2 = @HAVE_DUP2@ HAVE_DUP3 = @HAVE_DUP3@ HAVE_EUIDACCESS = @HAVE_EUIDACCESS@ HAVE_EXPL = @HAVE_EXPL@ HAVE_FACCESSAT = @HAVE_FACCESSAT@ HAVE_FCHMODAT = @HAVE_FCHMODAT@ HAVE_FCHOWNAT = @HAVE_FCHOWNAT@ HAVE_FCNTL = @HAVE_FCNTL@ HAVE_FSTATAT = @HAVE_FSTATAT@ HAVE_FSYNC = @HAVE_FSYNC@ HAVE_FTRUNCATE = @HAVE_FTRUNCATE@ HAVE_FUTIMENS = @HAVE_FUTIMENS@ HAVE_GETDOMAINNAME = @HAVE_GETDOMAINNAME@ HAVE_GETDTABLESIZE = @HAVE_GETDTABLESIZE@ HAVE_GETGROUPS = @HAVE_GETGROUPS@ HAVE_GETHOSTNAME = @HAVE_GETHOSTNAME@ HAVE_GETLOGIN = @HAVE_GETLOGIN@ HAVE_GETPAGESIZE = @HAVE_GETPAGESIZE@ HAVE_GETSUBOPT = @HAVE_GETSUBOPT@ HAVE_GETUSERSHELL = @HAVE_GETUSERSHELL@ HAVE_INTTYPES_H = @HAVE_INTTYPES_H@ HAVE_ISNAND = @HAVE_ISNAND@ HAVE_ISNANF = @HAVE_ISNANF@ HAVE_ISNANL = @HAVE_ISNANL@ HAVE_ISWCNTRL = @HAVE_ISWCNTRL@ HAVE_LANGINFO_CODESET = @HAVE_LANGINFO_CODESET@ HAVE_LANGINFO_ERA = @HAVE_LANGINFO_ERA@ HAVE_LANGINFO_H = @HAVE_LANGINFO_H@ HAVE_LCHMOD = @HAVE_LCHMOD@ HAVE_LCHOWN = @HAVE_LCHOWN@ HAVE_LINK = @HAVE_LINK@ HAVE_LINKAT = @HAVE_LINKAT@ HAVE_LOGL = @HAVE_LOGL@ HAVE_LONG_LONG_INT = @HAVE_LONG_LONG_INT@ HAVE_LSTAT = @HAVE_LSTAT@ HAVE_MALLOC_POSIX = @HAVE_MALLOC_POSIX@ HAVE_MBRLEN = @HAVE_MBRLEN@ HAVE_MBRTOWC = @HAVE_MBRTOWC@ HAVE_MBSINIT = @HAVE_MBSINIT@ HAVE_MBSLEN = @HAVE_MBSLEN@ HAVE_MBSNRTOWCS = @HAVE_MBSNRTOWCS@ HAVE_MBSRTOWCS = @HAVE_MBSRTOWCS@ HAVE_MEMPCPY = @HAVE_MEMPCPY@ HAVE_MKDIRAT = @HAVE_MKDIRAT@ HAVE_MKDTEMP = @HAVE_MKDTEMP@ HAVE_MKFIFO = @HAVE_MKFIFO@ HAVE_MKFIFOAT = @HAVE_MKFIFOAT@ HAVE_MKNOD = @HAVE_MKNOD@ HAVE_MKNODAT = @HAVE_MKNODAT@ HAVE_MKOSTEMP = @HAVE_MKOSTEMP@ HAVE_MKOSTEMPS = @HAVE_MKOSTEMPS@ HAVE_MKSTEMPS = @HAVE_MKSTEMPS@ HAVE_NETDB_H = @HAVE_NETDB_H@ HAVE_NETINET_IN_H = @HAVE_NETINET_IN_H@ HAVE_NL_LANGINFO = @HAVE_NL_LANGINFO@ HAVE_OPENAT = @HAVE_OPENAT@ HAVE_OS_H = @HAVE_OS_H@ HAVE_PIPE2 = @HAVE_PIPE2@ HAVE_POSIX_SIGNALBLOCKING = @HAVE_POSIX_SIGNALBLOCKING@ HAVE_PREAD = @HAVE_PREAD@ HAVE_RANDOM_H = @HAVE_RANDOM_H@ HAVE_RANDOM_R = @HAVE_RANDOM_R@ HAVE_RAWMEMCHR = @HAVE_RAWMEMCHR@ HAVE_READLINK = @HAVE_READLINK@ HAVE_READLINKAT = @HAVE_READLINKAT@ HAVE_REALLOC_POSIX = @HAVE_REALLOC_POSIX@ HAVE_REALPATH = @HAVE_REALPATH@ HAVE_RENAMEAT = @HAVE_RENAMEAT@ HAVE_RPMATCH = @HAVE_RPMATCH@ HAVE_SA_FAMILY_T = @HAVE_SA_FAMILY_T@ HAVE_SETENV = @HAVE_SETENV@ HAVE_SIGACTION = @HAVE_SIGACTION@ HAVE_SIGINFO_T = @HAVE_SIGINFO_T@ HAVE_SIGNED_SIG_ATOMIC_T = @HAVE_SIGNED_SIG_ATOMIC_T@ HAVE_SIGNED_WCHAR_T = @HAVE_SIGNED_WCHAR_T@ HAVE_SIGNED_WINT_T = @HAVE_SIGNED_WINT_T@ HAVE_SIGSET_T = @HAVE_SIGSET_T@ HAVE_SINL = @HAVE_SINL@ HAVE_SLEEP = @HAVE_SLEEP@ HAVE_SQRTL = @HAVE_SQRTL@ HAVE_STDINT_H = @HAVE_STDINT_H@ HAVE_STPCPY = @HAVE_STPCPY@ HAVE_STPNCPY = @HAVE_STPNCPY@ HAVE_STRCASECMP = @HAVE_STRCASECMP@ HAVE_STRCASESTR = @HAVE_STRCASESTR@ HAVE_STRCHRNUL = @HAVE_STRCHRNUL@ HAVE_STRPBRK = @HAVE_STRPBRK@ HAVE_STRSEP = @HAVE_STRSEP@ HAVE_STRTOD = @HAVE_STRTOD@ HAVE_STRTOLL = @HAVE_STRTOLL@ HAVE_STRTOULL = @HAVE_STRTOULL@ HAVE_STRUCT_ADDRINFO = @HAVE_STRUCT_ADDRINFO@ HAVE_STRUCT_RANDOM_DATA = @HAVE_STRUCT_RANDOM_DATA@ HAVE_STRUCT_SIGACTION_SA_SIGACTION = @HAVE_STRUCT_SIGACTION_SA_SIGACTION@ HAVE_STRUCT_SOCKADDR_STORAGE = @HAVE_STRUCT_SOCKADDR_STORAGE@ HAVE_STRUCT_TIMEVAL = @HAVE_STRUCT_TIMEVAL@ HAVE_STRUCT_UTSNAME = @HAVE_STRUCT_UTSNAME@ HAVE_STRVERSCMP = @HAVE_STRVERSCMP@ HAVE_SYMLINK = @HAVE_SYMLINK@ HAVE_SYMLINKAT = @HAVE_SYMLINKAT@ HAVE_SYS_BITYPES_H = @HAVE_SYS_BITYPES_H@ HAVE_SYS_INTTYPES_H = @HAVE_SYS_INTTYPES_H@ HAVE_SYS_IOCTL_H = @HAVE_SYS_IOCTL_H@ HAVE_SYS_LOADAVG_H = @HAVE_SYS_LOADAVG_H@ HAVE_SYS_PARAM_H = @HAVE_SYS_PARAM_H@ HAVE_SYS_SELECT_H = @HAVE_SYS_SELECT_H@ HAVE_SYS_SOCKET_H = @HAVE_SYS_SOCKET_H@ HAVE_SYS_TIME_H = @HAVE_SYS_TIME_H@ HAVE_SYS_TYPES_H = @HAVE_SYS_TYPES_H@ HAVE_SYS_UTSNAME_H = @HAVE_SYS_UTSNAME_H@ HAVE_TANL = @HAVE_TANL@ HAVE_TYPE_VOLATILE_SIG_ATOMIC_T = @HAVE_TYPE_VOLATILE_SIG_ATOMIC_T@ HAVE_UNAME = @HAVE_UNAME@ HAVE_UNISTD_H = @HAVE_UNISTD_H@ HAVE_UNLINKAT = @HAVE_UNLINKAT@ HAVE_UNSETENV = @HAVE_UNSETENV@ HAVE_UNSIGNED_LONG_LONG_INT = @HAVE_UNSIGNED_LONG_LONG_INT@ HAVE_USLEEP = @HAVE_USLEEP@ HAVE_UTIMENSAT = @HAVE_UTIMENSAT@ HAVE_VASPRINTF = @HAVE_VASPRINTF@ HAVE_VDPRINTF = @HAVE_VDPRINTF@ HAVE_WCHAR_H = @HAVE_WCHAR_H@ HAVE_WCHAR_T = @HAVE_WCHAR_T@ HAVE_WCRTOMB = @HAVE_WCRTOMB@ HAVE_WCSNRTOMBS = @HAVE_WCSNRTOMBS@ HAVE_WCSRTOMBS = @HAVE_WCSRTOMBS@ HAVE_WCTYPE_H = @HAVE_WCTYPE_H@ HAVE_WINSOCK2_H = @HAVE_WINSOCK2_H@ HAVE_WINT_T = @HAVE_WINT_T@ HAVE_WS2TCPIP_H = @HAVE_WS2TCPIP_H@ HAVE__BOOL = @HAVE__BOOL@ HOSTENT_LIB = @HOSTENT_LIB@ HTML_DIR = @HTML_DIR@ INCLTDL = @INCLTDL@ INCLUDE_NEXT = @INCLUDE_NEXT@ INCLUDE_NEXT_AS_FIRST_DIRECTIVE = @INCLUDE_NEXT_AS_FIRST_DIRECTIVE@ INET_NTOP_LIB = @INET_NTOP_LIB@ INET_PTON_LIB = @INET_PTON_LIB@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LD = @LD@ LDFLAGS = @LDFLAGS@ LEX = @LEX@ LEXLIB = @LEXLIB@ LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@ LIBADD_DL = @LIBADD_DL@ LIBADD_DLD_LINK = @LIBADD_DLD_LINK@ LIBADD_DLOPEN = @LIBADD_DLOPEN@ LIBADD_SHL_LOAD = @LIBADD_SHL_LOAD@ LIBDIR = @LIBDIR@ LIBGCRYPT_CFLAGS = @LIBGCRYPT_CFLAGS@ LIBGCRYPT_CONFIG = @LIBGCRYPT_CONFIG@ LIBGCRYPT_LIBS = @LIBGCRYPT_LIBS@ LIBGNUTLS_CFLAGS = @LIBGNUTLS_CFLAGS@ LIBGNUTLS_CONFIG = @LIBGNUTLS_CONFIG@ LIBGNUTLS_EXTRA_CFLAGS = @LIBGNUTLS_EXTRA_CFLAGS@ LIBGNUTLS_EXTRA_CONFIG = @LIBGNUTLS_EXTRA_CONFIG@ LIBGNUTLS_EXTRA_LIBS = @LIBGNUTLS_EXTRA_LIBS@ LIBGNUTLS_LIBS = @LIBGNUTLS_LIBS@ LIBINTL = @LIBINTL@ LIBLTDL = @LIBLTDL@ LIBMULTITHREAD = @LIBMULTITHREAD@ LIBOBJS = @LIBOBJS@ LIBPRELUDECPP_SONAME = @LIBPRELUDECPP_SONAME@ LIBPRELUDE_CFLAGS = @LIBPRELUDE_CFLAGS@ LIBPRELUDE_LIBS = @LIBPRELUDE_LIBS@ LIBPRELUDE_SONAME = @LIBPRELUDE_SONAME@ LIBPTH = @LIBPTH@ LIBPTH_PREFIX = @LIBPTH_PREFIX@ LIBS = @LIBS@ LIBSOCKET = @LIBSOCKET@ LIBTESTS_LIBDEPS = @LIBTESTS_LIBDEPS@ LIBTHREAD = @LIBTHREAD@ LIBTOOL = @LIBTOOL@ LIPO = @LIPO@ LN_S = @LN_S@ LOCALCHARSET_TESTS_ENVIRONMENT = @LOCALCHARSET_TESTS_ENVIRONMENT@ LOCALE_FR = @LOCALE_FR@ LOCALE_FR_UTF8 = @LOCALE_FR_UTF8@ LOCALE_JA = @LOCALE_JA@ LOCALE_TR_UTF8 = @LOCALE_TR_UTF8@ LOCALE_ZH_CN = @LOCALE_ZH_CN@ LOCALSTATEDIR = @LOCALSTATEDIR@ LTALLOCA = @LTALLOCA@ LTDLDEPS = @LTDLDEPS@ LTDLINCL = @LTDLINCL@ LTDLOPEN = @LTDLOPEN@ LTLIBINTL = @LTLIBINTL@ LTLIBMULTITHREAD = @LTLIBMULTITHREAD@ LTLIBOBJS = @LTLIBOBJS@ LTLIBPTH = @LTLIBPTH@ LTLIBTHREAD = @LTLIBTHREAD@ LT_CONFIG_H = @LT_CONFIG_H@ LT_DLLOADERS = @LT_DLLOADERS@ LT_DLPREOPEN = @LT_DLPREOPEN@ LUA_CFLAGS = @LUA_CFLAGS@ LUA_CONFIG = @LUA_CONFIG@ LUA_LIBS = @LUA_LIBS@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MKDIR_P = @MKDIR_P@ NETDB_H = @NETDB_H@ NETINET_IN_H = @NETINET_IN_H@ NEXT_ARPA_INET_H = @NEXT_ARPA_INET_H@ NEXT_AS_FIRST_DIRECTIVE_ARPA_INET_H = @NEXT_AS_FIRST_DIRECTIVE_ARPA_INET_H@ NEXT_AS_FIRST_DIRECTIVE_ERRNO_H = @NEXT_AS_FIRST_DIRECTIVE_ERRNO_H@ NEXT_AS_FIRST_DIRECTIVE_FCNTL_H = @NEXT_AS_FIRST_DIRECTIVE_FCNTL_H@ NEXT_AS_FIRST_DIRECTIVE_FLOAT_H = @NEXT_AS_FIRST_DIRECTIVE_FLOAT_H@ NEXT_AS_FIRST_DIRECTIVE_LANGINFO_H = @NEXT_AS_FIRST_DIRECTIVE_LANGINFO_H@ NEXT_AS_FIRST_DIRECTIVE_MATH_H = @NEXT_AS_FIRST_DIRECTIVE_MATH_H@ NEXT_AS_FIRST_DIRECTIVE_NETDB_H = @NEXT_AS_FIRST_DIRECTIVE_NETDB_H@ NEXT_AS_FIRST_DIRECTIVE_NETINET_IN_H = @NEXT_AS_FIRST_DIRECTIVE_NETINET_IN_H@ NEXT_AS_FIRST_DIRECTIVE_SIGNAL_H = @NEXT_AS_FIRST_DIRECTIVE_SIGNAL_H@ NEXT_AS_FIRST_DIRECTIVE_STDDEF_H = @NEXT_AS_FIRST_DIRECTIVE_STDDEF_H@ NEXT_AS_FIRST_DIRECTIVE_STDINT_H = @NEXT_AS_FIRST_DIRECTIVE_STDINT_H@ NEXT_AS_FIRST_DIRECTIVE_STDIO_H = @NEXT_AS_FIRST_DIRECTIVE_STDIO_H@ NEXT_AS_FIRST_DIRECTIVE_STDLIB_H = @NEXT_AS_FIRST_DIRECTIVE_STDLIB_H@ NEXT_AS_FIRST_DIRECTIVE_STRINGS_H = @NEXT_AS_FIRST_DIRECTIVE_STRINGS_H@ NEXT_AS_FIRST_DIRECTIVE_STRING_H = @NEXT_AS_FIRST_DIRECTIVE_STRING_H@ NEXT_AS_FIRST_DIRECTIVE_SYS_IOCTL_H = @NEXT_AS_FIRST_DIRECTIVE_SYS_IOCTL_H@ NEXT_AS_FIRST_DIRECTIVE_SYS_SELECT_H = @NEXT_AS_FIRST_DIRECTIVE_SYS_SELECT_H@ NEXT_AS_FIRST_DIRECTIVE_SYS_SOCKET_H = @NEXT_AS_FIRST_DIRECTIVE_SYS_SOCKET_H@ NEXT_AS_FIRST_DIRECTIVE_SYS_STAT_H = @NEXT_AS_FIRST_DIRECTIVE_SYS_STAT_H@ NEXT_AS_FIRST_DIRECTIVE_SYS_TIME_H = @NEXT_AS_FIRST_DIRECTIVE_SYS_TIME_H@ NEXT_AS_FIRST_DIRECTIVE_SYS_UTSNAME_H = @NEXT_AS_FIRST_DIRECTIVE_SYS_UTSNAME_H@ NEXT_AS_FIRST_DIRECTIVE_TIME_H = @NEXT_AS_FIRST_DIRECTIVE_TIME_H@ NEXT_AS_FIRST_DIRECTIVE_UNISTD_H = @NEXT_AS_FIRST_DIRECTIVE_UNISTD_H@ NEXT_AS_FIRST_DIRECTIVE_WCHAR_H = @NEXT_AS_FIRST_DIRECTIVE_WCHAR_H@ NEXT_AS_FIRST_DIRECTIVE_WCTYPE_H = @NEXT_AS_FIRST_DIRECTIVE_WCTYPE_H@ NEXT_ERRNO_H = @NEXT_ERRNO_H@ NEXT_FCNTL_H = @NEXT_FCNTL_H@ NEXT_FLOAT_H = @NEXT_FLOAT_H@ NEXT_LANGINFO_H = @NEXT_LANGINFO_H@ NEXT_MATH_H = @NEXT_MATH_H@ NEXT_NETDB_H = @NEXT_NETDB_H@ NEXT_NETINET_IN_H = @NEXT_NETINET_IN_H@ NEXT_SIGNAL_H = @NEXT_SIGNAL_H@ NEXT_STDDEF_H = @NEXT_STDDEF_H@ NEXT_STDINT_H = @NEXT_STDINT_H@ NEXT_STDIO_H = @NEXT_STDIO_H@ NEXT_STDLIB_H = @NEXT_STDLIB_H@ NEXT_STRINGS_H = @NEXT_STRINGS_H@ NEXT_STRING_H = @NEXT_STRING_H@ NEXT_SYS_IOCTL_H = @NEXT_SYS_IOCTL_H@ NEXT_SYS_SELECT_H = @NEXT_SYS_SELECT_H@ NEXT_SYS_SOCKET_H = @NEXT_SYS_SOCKET_H@ NEXT_SYS_STAT_H = @NEXT_SYS_STAT_H@ NEXT_SYS_TIME_H = @NEXT_SYS_TIME_H@ NEXT_SYS_UTSNAME_H = @NEXT_SYS_UTSNAME_H@ NEXT_TIME_H = @NEXT_TIME_H@ NEXT_UNISTD_H = @NEXT_UNISTD_H@ NEXT_WCHAR_H = @NEXT_WCHAR_H@ NEXT_WCTYPE_H = @NEXT_WCTYPE_H@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PCFLAGS = @PCFLAGS@ PERL = @PERL@ PERL_EXTRA_PARAMS = @PERL_EXTRA_PARAMS@ PKG_CONFIG = @PKG_CONFIG@ POLL_H = @POLL_H@ PRAGMA_SYSTEM_HEADER = @PRAGMA_SYSTEM_HEADER@ PRELUDE_ADMIN_CFLAGS = @PRELUDE_ADMIN_CFLAGS@ PRELUDE_ADMIN_LIBS = @PRELUDE_ADMIN_LIBS@ PRELUDE_CONFIG_DIR = @PRELUDE_CONFIG_DIR@ PRELUDE_SPOOL_DIR = @PRELUDE_SPOOL_DIR@ PTHREAD_CFLAGS = @PTHREAD_CFLAGS@ PTHREAD_LDFLAGS = @PTHREAD_LDFLAGS@ PTHREAD_LIBS = @PTHREAD_LIBS@ PTRDIFF_T_SUFFIX = @PTRDIFF_T_SUFFIX@ PYTHON = @PYTHON@ RANLIB = @RANLIB@ RELOCATABLE = @RELOCATABLE@ REPLACE_BTOWC = @REPLACE_BTOWC@ REPLACE_CANONICALIZE_FILE_NAME = @REPLACE_CANONICALIZE_FILE_NAME@ REPLACE_CEILF = @REPLACE_CEILF@ REPLACE_CEILL = @REPLACE_CEILL@ REPLACE_CHOWN = @REPLACE_CHOWN@ REPLACE_CLOSE = @REPLACE_CLOSE@ REPLACE_DPRINTF = @REPLACE_DPRINTF@ REPLACE_DUP = @REPLACE_DUP@ REPLACE_DUP2 = @REPLACE_DUP2@ REPLACE_FCHDIR = @REPLACE_FCHDIR@ REPLACE_FCHOWNAT = @REPLACE_FCHOWNAT@ REPLACE_FCLOSE = @REPLACE_FCLOSE@ REPLACE_FCNTL = @REPLACE_FCNTL@ REPLACE_FFLUSH = @REPLACE_FFLUSH@ REPLACE_FLOORF = @REPLACE_FLOORF@ REPLACE_FLOORL = @REPLACE_FLOORL@ REPLACE_FOPEN = @REPLACE_FOPEN@ REPLACE_FPRINTF = @REPLACE_FPRINTF@ REPLACE_FPURGE = @REPLACE_FPURGE@ REPLACE_FREOPEN = @REPLACE_FREOPEN@ REPLACE_FREXP = @REPLACE_FREXP@ REPLACE_FREXPL = @REPLACE_FREXPL@ REPLACE_FSEEK = @REPLACE_FSEEK@ REPLACE_FSEEKO = @REPLACE_FSEEKO@ REPLACE_FSTAT = @REPLACE_FSTAT@ REPLACE_FSTATAT = @REPLACE_FSTATAT@ REPLACE_FTELL = @REPLACE_FTELL@ REPLACE_FTELLO = @REPLACE_FTELLO@ REPLACE_FUTIMENS = @REPLACE_FUTIMENS@ REPLACE_GETCWD = @REPLACE_GETCWD@ REPLACE_GETDELIM = @REPLACE_GETDELIM@ REPLACE_GETGROUPS = @REPLACE_GETGROUPS@ REPLACE_GETLINE = @REPLACE_GETLINE@ REPLACE_GETPAGESIZE = @REPLACE_GETPAGESIZE@ REPLACE_GETTIMEOFDAY = @REPLACE_GETTIMEOFDAY@ REPLACE_HUGE_VAL = @REPLACE_HUGE_VAL@ REPLACE_ISFINITE = @REPLACE_ISFINITE@ REPLACE_ISINF = @REPLACE_ISINF@ REPLACE_ISNAN = @REPLACE_ISNAN@ REPLACE_ISWCNTRL = @REPLACE_ISWCNTRL@ REPLACE_LCHOWN = @REPLACE_LCHOWN@ REPLACE_LDEXPL = @REPLACE_LDEXPL@ REPLACE_LINK = @REPLACE_LINK@ REPLACE_LINKAT = @REPLACE_LINKAT@ REPLACE_LOCALTIME_R = @REPLACE_LOCALTIME_R@ REPLACE_LSEEK = @REPLACE_LSEEK@ REPLACE_LSTAT = @REPLACE_LSTAT@ REPLACE_MBRLEN = @REPLACE_MBRLEN@ REPLACE_MBRTOWC = @REPLACE_MBRTOWC@ REPLACE_MBSINIT = @REPLACE_MBSINIT@ REPLACE_MBSNRTOWCS = @REPLACE_MBSNRTOWCS@ REPLACE_MBSRTOWCS = @REPLACE_MBSRTOWCS@ REPLACE_MBSTATE_T = @REPLACE_MBSTATE_T@ REPLACE_MEMCHR = @REPLACE_MEMCHR@ REPLACE_MEMMEM = @REPLACE_MEMMEM@ REPLACE_MKDIR = @REPLACE_MKDIR@ REPLACE_MKFIFO = @REPLACE_MKFIFO@ REPLACE_MKNOD = @REPLACE_MKNOD@ REPLACE_MKSTEMP = @REPLACE_MKSTEMP@ REPLACE_MKTIME = @REPLACE_MKTIME@ REPLACE_NAN = @REPLACE_NAN@ REPLACE_NANOSLEEP = @REPLACE_NANOSLEEP@ REPLACE_NL_LANGINFO = @REPLACE_NL_LANGINFO@ REPLACE_NULL = @REPLACE_NULL@ REPLACE_OBSTACK_PRINTF = @REPLACE_OBSTACK_PRINTF@ REPLACE_OPEN = @REPLACE_OPEN@ REPLACE_OPENAT = @REPLACE_OPENAT@ REPLACE_PERROR = @REPLACE_PERROR@ REPLACE_POPEN = @REPLACE_POPEN@ REPLACE_PREAD = @REPLACE_PREAD@ REPLACE_PRINTF = @REPLACE_PRINTF@ REPLACE_PUTENV = @REPLACE_PUTENV@ REPLACE_READLINK = @REPLACE_READLINK@ REPLACE_REALPATH = @REPLACE_REALPATH@ REPLACE_REMOVE = @REPLACE_REMOVE@ REPLACE_RENAME = @REPLACE_RENAME@ REPLACE_RENAMEAT = @REPLACE_RENAMEAT@ REPLACE_RMDIR = @REPLACE_RMDIR@ REPLACE_ROUND = @REPLACE_ROUND@ REPLACE_ROUNDF = @REPLACE_ROUNDF@ REPLACE_ROUNDL = @REPLACE_ROUNDL@ REPLACE_SELECT = @REPLACE_SELECT@ REPLACE_SETENV = @REPLACE_SETENV@ REPLACE_SIGNBIT = @REPLACE_SIGNBIT@ REPLACE_SIGNBIT_USING_GCC = @REPLACE_SIGNBIT_USING_GCC@ REPLACE_SLEEP = @REPLACE_SLEEP@ REPLACE_SNPRINTF = @REPLACE_SNPRINTF@ REPLACE_SPRINTF = @REPLACE_SPRINTF@ REPLACE_STAT = @REPLACE_STAT@ REPLACE_STDIO_WRITE_FUNCS = @REPLACE_STDIO_WRITE_FUNCS@ REPLACE_STRCASESTR = @REPLACE_STRCASESTR@ REPLACE_STRDUP = @REPLACE_STRDUP@ REPLACE_STRERROR = @REPLACE_STRERROR@ REPLACE_STRNDUP = @REPLACE_STRNDUP@ REPLACE_STRPTIME = @REPLACE_STRPTIME@ REPLACE_STRSIGNAL = @REPLACE_STRSIGNAL@ REPLACE_STRSTR = @REPLACE_STRSTR@ REPLACE_STRTOD = @REPLACE_STRTOD@ REPLACE_STRTOK_R = @REPLACE_STRTOK_R@ REPLACE_SYMLINK = @REPLACE_SYMLINK@ REPLACE_TIMEGM = @REPLACE_TIMEGM@ REPLACE_TRUNCL = @REPLACE_TRUNCL@ REPLACE_UNLINK = @REPLACE_UNLINK@ REPLACE_UNLINKAT = @REPLACE_UNLINKAT@ REPLACE_UNSETENV = @REPLACE_UNSETENV@ REPLACE_USLEEP = @REPLACE_USLEEP@ REPLACE_UTIMENSAT = @REPLACE_UTIMENSAT@ REPLACE_VASPRINTF = @REPLACE_VASPRINTF@ REPLACE_VDPRINTF = @REPLACE_VDPRINTF@ REPLACE_VFPRINTF = @REPLACE_VFPRINTF@ REPLACE_VPRINTF = @REPLACE_VPRINTF@ REPLACE_VSNPRINTF = @REPLACE_VSNPRINTF@ REPLACE_VSPRINTF = @REPLACE_VSPRINTF@ REPLACE_WCRTOMB = @REPLACE_WCRTOMB@ REPLACE_WCSNRTOMBS = @REPLACE_WCSNRTOMBS@ REPLACE_WCSRTOMBS = @REPLACE_WCSRTOMBS@ REPLACE_WCTOB = @REPLACE_WCTOB@ REPLACE_WCWIDTH = @REPLACE_WCWIDTH@ REPLACE_WRITE = @REPLACE_WRITE@ RUBY = @RUBY@ RUBY_CCFLAGS = @RUBY_CCFLAGS@ RUBY_EXEC_PREFIX = @RUBY_EXEC_PREFIX@ RUBY_INCLUDES = @RUBY_INCLUDES@ RUBY_LIBS = @RUBY_LIBS@ RUBY_PLATFORM = @RUBY_PLATFORM@ RUBY_PREFIX = @RUBY_PREFIX@ RUBY_VERSION = @RUBY_VERSION@ SED = @SED@ SERVENT_LIB = @SERVENT_LIB@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ SIG_ATOMIC_T_SUFFIX = @SIG_ATOMIC_T_SUFFIX@ SIZE_T_SUFFIX = @SIZE_T_SUFFIX@ STDBOOL_H = @STDBOOL_H@ STDDEF_H = @STDDEF_H@ STDINT_H = @STDINT_H@ STRIP = @STRIP@ SWIG = @SWIG@ SYSCONFDIR = @SYSCONFDIR@ SYS_IOCTL_H_HAVE_WINSOCK2_H = @SYS_IOCTL_H_HAVE_WINSOCK2_H@ SYS_IOCTL_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS = @SYS_IOCTL_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS@ SYS_SOCKET_H = @SYS_SOCKET_H@ SYS_TIME_H_DEFINES_STRUCT_TIMESPEC = @SYS_TIME_H_DEFINES_STRUCT_TIMESPEC@ TIME_H_DEFINES_STRUCT_TIMESPEC = @TIME_H_DEFINES_STRUCT_TIMESPEC@ UNDEFINE_STRTOK_R = @UNDEFINE_STRTOK_R@ UNISTD_H_HAVE_WINSOCK2_H = @UNISTD_H_HAVE_WINSOCK2_H@ UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS = @UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS@ VALGRIND = @VALGRIND@ VERSION = @VERSION@ WCHAR_T_SUFFIX = @WCHAR_T_SUFFIX@ WCTYPE_H = @WCTYPE_H@ WINT_T_SUFFIX = @WINT_T_SUFFIX@ YACC = @YACC@ YFLAGS = @YFLAGS@ YIELD_LIB = @YIELD_LIB@ __PRELUDE_64BIT_FORMAT_PREFIX = @__PRELUDE_64BIT_FORMAT_PREFIX@ __PRELUDE_HAVE_64BIT_LONG = @__PRELUDE_HAVE_64BIT_LONG@ __PRELUDE_HAVE_INTTYPES_H = @__PRELUDE_HAVE_INTTYPES_H@ __PRELUDE_HAVE_STDINT_H = @__PRELUDE_HAVE_STDINT_H@ __PRELUDE_STDINT_HAVE_UINT16 = @__PRELUDE_STDINT_HAVE_UINT16@ __PRELUDE_STDINT_HAVE_UINT32 = @__PRELUDE_STDINT_HAVE_UINT32@ __PRELUDE_STDINT_HAVE_UINT64 = @__PRELUDE_STDINT_HAVE_UINT64@ __PRELUDE_STDINT_HAVE_UINT8 = @__PRELUDE_STDINT_HAVE_UINT8@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ gl_LIBOBJS = @gl_LIBOBJS@ gl_LTLIBOBJS = @gl_LTLIBOBJS@ gltests_LIBOBJS = @gltests_LIBOBJS@ gltests_LTLIBOBJS = @gltests_LTLIBOBJS@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = $(prefix)/include/libprelude infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ lt_ECHO = @lt_ECHO@ ltdl_LIBOBJS = @ltdl_LIBOBJS@ ltdl_LTLIBOBJS = @ltdl_LTLIBOBJS@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ pkgrbexecdir = @pkgrbexecdir@ pkgrubydir = @pkgrubydir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ rbexecdir = @rbexecdir@ rubydir = @rubydir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sys_symbol_underscore = @sys_symbol_underscore@ sysconfdir = @sysconfdir@ target = @target@ target_alias = @target_alias@ target_cpu = @target_cpu@ target_os = @target_os@ target_vendor = @target_vendor@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ AM_CPPFLAGS = @PCFLAGS@ -I$(top_srcdir)/libmissing -I$(top_srcdir)/src/include -I$(top_builddir)/src/include EXTRA_DIST = mkstrtable.awk err-sources.h.in err-codes.h.in \ mkerrnos.awk errnos.in mkerrcodes.awk mkerrcodes1.awk mkerrcodes2.awk mkerrcodes.c \ mkheader.awk prelude-error.h.in err-sources.h err-codes.h BUILT_SOURCES = err-sources.h err-codes.h code-from-errno.h code-to-errno.h err-sources-sym.h err-codes-sym.h errnos-sym.h prelude-error.h CLEANFILES = err-sources.h err-codes.h code-to-errno.h code-from-errno.h \ prelude-error.h mkerrcodes mkerrcodes.h \ err-sources-sym.h err-codes-sym.h errnos-sym.h nodist_include_HEADERS = prelude-error.h noinst_LTLIBRARIES = libprelude-error.la libprelude_error_la_LIBADD = @LTLIBTHREAD@ libprelude_error_la_LDFLAGS = -no-undefined libprelude_error_la_SOURCES = prelude-error.h prelude-error.c strsource.c strerror.c all: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) all-am .SUFFIXES: .SUFFIXES: .c .lo .o .obj $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/libprelude-error/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu src/libprelude-error/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): clean-noinstLTLIBRARIES: -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) @list='$(noinst_LTLIBRARIES)'; for p in $$list; do \ dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ test "$$dir" != "$$p" || dir=.; \ echo "rm -f \"$${dir}/so_locations\""; \ rm -f "$${dir}/so_locations"; \ done libprelude-error.la: $(libprelude_error_la_OBJECTS) $(libprelude_error_la_DEPENDENCIES) $(libprelude_error_la_LINK) $(libprelude_error_la_OBJECTS) $(libprelude_error_la_LIBADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/prelude-error.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/strerror.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/strsource.Plo@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(COMPILE) -c $< .c.obj: @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` .c.lo: @am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs install-nodist_includeHEADERS: $(nodist_include_HEADERS) @$(NORMAL_INSTALL) test -z "$(includedir)" || $(MKDIR_P) "$(DESTDIR)$(includedir)" @list='$(nodist_include_HEADERS)'; test -n "$(includedir)" || list=; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ done | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_HEADER) $$files '$(DESTDIR)$(includedir)'"; \ $(INSTALL_HEADER) $$files "$(DESTDIR)$(includedir)" || exit $$?; \ done uninstall-nodist_includeHEADERS: @$(NORMAL_UNINSTALL) @list='$(nodist_include_HEADERS)'; test -n "$(includedir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ test -n "$$files" || exit 0; \ echo " ( cd '$(DESTDIR)$(includedir)' && rm -f" $$files ")"; \ cd "$(DESTDIR)$(includedir)" && rm -f $$files ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ mkid -fID $$unique tags: TAGS TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) set x; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: CTAGS CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) check-am all-am: Makefile $(LTLIBRARIES) $(HEADERS) installdirs: for dir in "$(DESTDIR)$(includedir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES) distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." -test -z "$(BUILT_SOURCES)" || rm -f $(BUILT_SOURCES) clean: clean-am clean-am: clean-generic clean-libtool clean-noinstLTLIBRARIES \ mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-nodist_includeHEADERS install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-nodist_includeHEADERS .MAKE: all check install install-am install-strip .PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ clean-libtool clean-noinstLTLIBRARIES ctags distclean \ distclean-compile distclean-generic distclean-libtool \ distclean-tags distdir dvi dvi-am html html-am info info-am \ install install-am install-data install-data-am install-dvi \ install-dvi-am install-exec install-exec-am install-html \ install-html-am install-info install-info-am install-man \ install-nodist_includeHEADERS install-pdf install-pdf-am \ install-ps install-ps-am install-strip installcheck \ installcheck-am installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-compile \ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ tags uninstall uninstall-am uninstall-nodist_includeHEADERS err-sources.h: Makefile mkstrtable.awk err-sources.h.in LANG="" $(AWK) -f $(srcdir)/mkstrtable.awk -v textidx=3 \ $(srcdir)/err-sources.h.in >$@ err-sources-sym.h: Makefile mkstrtable.awk err-sources.h.in LANG="" $(AWK) -f $(srcdir)/mkstrtable.awk -v textidx=2 -v nogettext=1 \ $(srcdir)/err-sources.h.in >$@ err-codes.h: Makefile mkstrtable.awk err-codes.h.in LANG="" $(AWK) -f $(srcdir)/mkstrtable.awk -v textidx=3 \ $(srcdir)/err-codes.h.in >$@ err-codes-sym.h: Makefile mkstrtable.awk err-codes.h.in LANG="" $(AWK) -f $(srcdir)/mkstrtable.awk -v textidx=2 -v nogettext=1 \ $(srcdir)/err-codes.h.in >$@ code-to-errno.h: Makefile mkerrnos.awk errnos.in LANG="" $(AWK) -f $(srcdir)/mkerrnos.awk $(srcdir)/errnos.in >$@ mkerrcodes.h: Makefile mkerrcodes.awk LANG="" $(AWK) -f $(srcdir)/mkerrcodes1.awk $(srcdir)/errnos.in >_$@ $(CPP) _$@ | grep PRELUDE_ERROR_ | LANG="" $(AWK) -f $(srcdir)/mkerrcodes.awk >$@ -rm _$@ # It is correct to use $(CC_FOR_BUILD) here. We want to run the # program at build time. mkerrcodes: mkerrcodes.c mkerrcodes.h Makefile $(CC_FOR_BUILD) -I. -I$(srcdir) -o $@ $(srcdir)/mkerrcodes.c code-from-errno.h: mkerrcodes Makefile ./mkerrcodes | LANG="" $(AWK) -f $(srcdir)/mkerrcodes2.awk >$@ errnos-sym.h: Makefile mkstrtable.awk errnos.in LANG="" $(AWK) -f $(srcdir)/mkstrtable.awk -v textidx=2 -v nogettext=1 \ -v prefix=PRELUDE_ERROR_ -v namespace=errnos_ \ $(srcdir)/errnos.in >$@ prelude-error.h: Makefile mkheader.awk err-sources.h.in err-codes.h.in errnos.in prelude-error.h.in LANG="" $(AWK) -f $(srcdir)/mkheader.awk \ $(srcdir)/err-sources.h.in \ $(srcdir)/err-codes.h.in \ $(srcdir)/errnos.in \ $(srcdir)/prelude-error.h.in > $@ -include $(top_srcdir)/git.mk # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: libprelude-1.0.0/src/libprelude-error/mkerrnos.awk0000664000076400007640000000665011202225026017202 00000000000000# mkerrnos.awk # Copyright (C) 2003, 2004 g10 Code GmbH # # 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, g10 Code GmbH gives unlimited permission to # copy, distribute and modify the C source files that are the output # of mkerrnos.awk. You need not follow the terms of the GNU General # Public License when using or distributing such scripts, even though # portions of the text of mkerrnos.awk appear in them. The GNU # General Public License (GPL) does govern all other use of the material # that constitutes the mkerrnos.awk program. # # Certain portions of the mkerrnos.awk source text are designed to be # copied (in certain cases, depending on the input) into the output of # mkerrnos.awk. We call these the "data" portions. The rest of the # mkerrnos.awk source text consists of comments plus executable code # that decides which of the data portions to output in any given case. # We call these comments and executable code the "non-data" portions. # mkerrnos.h never copies any of the non-data portions into its output. # # This special exception to the GPL applies to versions of mkerrnos.awk # released by g10 Code GmbH. When you make and distribute a modified version # of mkerrnos.awk, you may extend this special exception to the GPL to # apply to your modified version as well, *unless* your modified version # has the potential to copy into its output some of the text that was the # non-data portion of the version that you started with. (In other words, # unless your change moves or copies text from the non-data portions to the # data portions.) If your modification has such potential, you must delete # any notice of this special exception to the GPL from your modified version. # This script outputs a source file that does define the following # symbols: # # static const int err_code_to_errno[]; # A mapping of gpg_err_code_t numbers to system errno. The index of an # error code in the table can be obtained after removing the system error # code indication bit. # # The input file is a list of possible system errors in the column errnoidx # (defaults to 2). # # Comments (starting with # and ending at the end of the line) are removed, # as is trailing whitespace. BEGIN { FS="[\t]+"; header = 1; if (errnoidx == 0) errnoidx = 2; print "/* Output of mkerrnos.awk. DO NOT EDIT. */"; print ""; } /^#/ { next; } header { if ($1 ~ /^[0-9]/) { print "#include "; print ""; print "static const int err_code_to_errno [] = {"; header = 0; } else print; } !header { sub (/\#.+/, ""); sub (/[ ]+$/, ""); # Strip trailing space and tab characters. if (/^$/) next; print "#ifdef " $errnoidx; print " " $errnoidx ","; print "#else"; print " 0,"; print "#endif"; } END { print "};"; } libprelude-1.0.0/src/libprelude-error/mkerrcodes.awk0000664000076400007640000000636211202225026017500 00000000000000# mkerrcodes.awk # Copyright (C) 2004 g10 Code GmbH # # 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, g10 Code GmbH gives unlimited permission to # copy, distribute and modify the C source files that are the output # of mkerrcodes.awk. You need not follow the terms of the GNU General # Public License when using or distributing such scripts, even though # portions of the text of mkerrcodes.awk appear in them. The GNU # General Public License (GPL) does govern all other use of the material # that constitutes the mkerrcodes.awk program. # # Certain portions of the mkerrcodes.awk source text are designed to be # copied (in certain cases, depending on the input) into the output of # mkerrcodes.awk. We call these the "data" portions. The rest of the # mkerrcodes.awk source text consists of comments plus executable code # that decides which of the data portions to output in any given case. # We call these comments and executable code the "non-data" portions. # mkerrcodes.h never copies any of the non-data portions into its output. # # This special exception to the GPL applies to versions of mkerrcodes.awk # released by g10 Code GmbH. When you make and distribute a modified version # of mkerrcodes.awk, you may extend this special exception to the GPL to # apply to your modified version as well, *unless* your modified version # has the potential to copy into its output some of the text that was the # non-data portion of the version that you started with. (In other words, # unless your change moves or copies text from the non-data portions to the # data portions.) If your modification has such potential, you must delete # any notice of this special exception to the GPL from your modified version. # This script outputs an intermediate file that contains the following block # for each error value symbol in the input file (example for EINVAL): # # #ifdef EINVAL # EINVAL GPG_ERR_EINVAL # #endif # # The input file is a list of possible system errors. # # Comments (starting with # and ending at the end of the line) are removed, # as is trailing whitespace. BEGIN { print "/* Output of mkerrcodes.awk. DO NOT EDIT. */"; print ""; header = 1; } /^#/ { next; } header { if ($0 ~ /^[ \t]*[0-9]+/) { header = 0; print "static struct"; print " {"; print " int err;"; print " const char *err_sym;"; print " } err_table[] = "; print "{"; } else print; } !header { sub (/\#.+/, ""); sub (/[ ]+$/, ""); # Strip trailing space and tab characters. if (/^$/) next; print " { " $1 ", \"" $2 "\" },"; } END { print "};"; } libprelude-1.0.0/src/libprelude-error/err-sources.h0000664000076400007640000000421311347714630017267 00000000000000/* Output of mkstrtable.awk. DO NOT EDIT. */ /* err-sources.h - List of error sources and their description. Copyright (C) 2003, 2004 g10 Code GmbH This file is part of libgpg-error. libgpg-error is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. libgpg-error 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 Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with libgpg-error; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ /* The purpose of this complex string table is to produce optimal code with a minimum of relocations. */ static const char msgstr[] = gettext_noop ("Unspecified source") "\0" gettext_noop ("prelude-io") "\0" gettext_noop ("prelude-message") "\0" gettext_noop ("prelude-failover") "\0" gettext_noop ("prelude-client") "\0" gettext_noop ("prelude-client-profile") "\0" gettext_noop ("prelude-extract") "\0" gettext_noop ("prelude-connection") "\0" gettext_noop ("prelude-connection-pool") "\0" gettext_noop ("config-file") "\0" gettext_noop ("prelude-string") "\0" gettext_noop ("idmef-tree-wrap") "\0" gettext_noop ("idmef-path") "\0" gettext_noop ("idmef-type") "\0" gettext_noop ("idmef-message-read") "\0" gettext_noop ("idmef-criteria") "\0" gettext_noop ("idmef-value-type") "\0" gettext_noop ("libpreludedb") "\0" gettext_noop ("Unknown source"); static const int msgidx[] = { 0, 19, 30, 46, 63, 78, 101, 117, 136, 160, 172, 187, 203, 214, 225, 244, 259, 276, 289 }; #define msgidxof(code) (0 ? -1 \ : ((code >= 0) && (code <= 16)) ? (code - 0) \ : ((code >= 255) && (code <= 255)) ? (code - 238) \ : 256 - 238) libprelude-1.0.0/src/libprelude-error/prelude-error.h0000664000076400007640000003770511347714631017622 00000000000000/* Output of mkheader.awk. DO NOT EDIT. */ /***** * * Copyright (C) 2004, 2005 PreludeIDS Technologies. All Rights Reserved. * Author: Yoann Vandoorselaere * * This file is part of the Prelude library. * * 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; see the file COPYING. If not, write to * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. * *****/ #ifndef _LIBPRELUDE_PRELUDE_ERROR_H #define _LIBPRELUDE_PRELUDE_ERROR_H #ifdef HAVE_CONFIG_H # include "config.h" #endif #include #include #include #include #include "prelude-thread.h" #include "prelude-string.h" #ifdef __cplusplus extern "C" { #endif #ifndef __attribute__ /* This feature is available in gcc versions 2.5 and later. */ # if __GNUC__ < 2 || (__GNUC__ == 2 && __GNUC_MINOR__ < 5) || __STRICT_ANSI__ # define __attribute__(Spec) /* empty */ # endif /* The __-protected variants of `format' and `printf' attributes are accepted by gcc versions 2.6.4 (effectively 2.7) and later. */ # if __GNUC__ < 2 || (__GNUC__ == 2 && __GNUC_MINOR__ < 7) # define __format__ format # define __printf__ printf # endif #endif /* * This is inspired from the GPG error interface. * * Bit 1 of prelude_error_t remain set (negative value). * Bit 2 to 9 are set to the source of the error. * Bit 10 specify whether there is a verbose error available. * Bit 11 to 15 are unspecified. * Bit 16 to 32 are set to the code of the error. */ #define PRELUDE_ERROR_SYSTEM_ERROR (1 << 15) typedef enum { PRELUDE_ERROR_SOURCE_UNKNOWN = 0, PRELUDE_ERROR_SOURCE_IO = 1, PRELUDE_ERROR_SOURCE_MESSAGE = 2, PRELUDE_ERROR_SOURCE_FAILOVER = 3, PRELUDE_ERROR_SOURCE_CLIENT = 4, PRELUDE_ERROR_SOURCE_CLIENT_PROFILE = 5, PRELUDE_ERROR_SOURCE_EXTRACT = 6, PRELUDE_ERROR_SOURCE_CONNECTION = 7, PRELUDE_ERROR_SOURCE_CONNECTION_POOL = 8, PRELUDE_ERROR_SOURCE_CONFIG_ENGINE = 9, PRELUDE_ERROR_SOURCE_STRING = 10, PRELUDE_ERROR_SOURCE_IDMEF_TREE_WRAP = 11, PRELUDE_ERROR_SOURCE_IDMEF_PATH = 12, PRELUDE_ERROR_SOURCE_IDMEF_TYPE = 13, PRELUDE_ERROR_SOURCE_IDMEF_MESSAGE_READ = 14, PRELUDE_ERROR_SOURCE_IDMEF_CRITERIA = 15, PRELUDE_ERROR_SOURCE_IDMEF_VALUE_TYPE = 16, PRELUDE_ERROR_SOURCE_PRELUDEDB = 255, } prelude_error_source_t; typedef enum { PRELUDE_ERROR_NO_ERROR = 0, PRELUDE_ERROR_GENERIC = 1, PRELUDE_ERROR_TLS = 2, PRELUDE_ERROR_INVAL_LENGTH = 3, PRELUDE_ERROR_INVAL_MESSAGE = 4, PRELUDE_ERROR_PROTOCOL_VERSION = 5, PRELUDE_ERROR_EOF = 6, PRELUDE_ERROR_PROFILE = 8, PRELUDE_ERROR_TLS_AUTH_REJECTED = 16, PRELUDE_ERROR_INVAL_INT8 = 17, PRELUDE_ERROR_INVAL_INT16 = 18, PRELUDE_ERROR_INVAL_INT32 = 19, PRELUDE_ERROR_INVAL_INT64 = 20, PRELUDE_ERROR_INVAL_FLOAT = 21, PRELUDE_ERROR_INVAL_CHAR = 22, PRELUDE_ERROR_INVAL_IDMEF_TIME = 23, PRELUDE_ERROR_CONNECTION_STRING = 24, PRELUDE_ERROR_IDMEF_VALUE_TYPE_UNKNOWN = 25, PRELUDE_ERROR_IDMEF_VALUE_TYPE_COPY_UNAVAILABLE = 26, PRELUDE_ERROR_IDMEF_VALUE_TYPE_CLONE_UNAVAILABLE = 27, PRELUDE_ERROR_IDMEF_VALUE_TYPE_COMPARE_UNAVAILABLE = 28, PRELUDE_ERROR_IDMEF_VALUE_TYPE_READ_UNAVAILABLE = 29, PRELUDE_ERROR_IDMEF_VALUE_TYPE_WRITE_UNAVAILABLE = 30, PRELUDE_ERROR_IDMEF_VALUE_TYPE_COMPARE_MISMATCH = 31, PRELUDE_ERROR_IDMEF_VALUE_TYPE_PARSE = 32, PRELUDE_ERROR_IDMEF_CLASS_UNKNOWN = 33, PRELUDE_ERROR_IDMEF_CLASS_UNKNOWN_CHILD = 34, PRELUDE_ERROR_IDMEF_CLASS_UNKNOWN_NAME = 35, PRELUDE_ERROR_IDMEF_PATH_LENGTH = 36, PRELUDE_ERROR_IDMEF_PATH_DEPTH = 37, PRELUDE_ERROR_IDMEF_PATH_PARENT_ROOT = 38, PRELUDE_ERROR_IDMEF_PATH_NTH = 39, PRELUDE_ERROR_IDMEF_PATH_MISS_INDEX = 40, PRELUDE_ERROR_IDMEF_PATH_INTEGRITY = 41, PRELUDE_ERROR_IDMEF_PATH_INDEX_RESERVED = 42, PRELUDE_ERROR_IDMEF_PATH_INDEX_FORBIDDEN = 43, PRELUDE_ERROR_IDMEF_PATH_INDEX_UNDEFINED = 44, PRELUDE_ERROR_IDMEF_TREE_INDEX_UNDEFINED = 45, PRELUDE_ERROR_IDMEF_UNKNOWN_ENUM_STRING = 46, PRELUDE_ERROR_IDMEF_UNKNOWN_TAG = 47, PRELUDE_ERROR_DAEMONIZE_LOCK_HELD = 48, PRELUDE_ERROR_PLUGIN_LTDL_INIT = 49, PRELUDE_ERROR_STRING_NOT_NULL_TERMINATED = 50, PRELUDE_ERROR_CANT_RESOLVE = 51, PRELUDE_ERROR_UNKNOWN_PERMISSION_TYPE = 52, PRELUDE_ERROR_UNKNOWN_PERMISSION_BIT = 53, PRELUDE_ERROR_IDMEF_CRITERIA_PARSE = 55, PRELUDE_ERROR_IDMEF_CRITERION_UNSUPPORTED_OPERATOR = 56, PRELUDE_ERROR_IDMEF_CRITERION_INVALID_REGEX = 57, PRELUDE_ERROR_TLS_WARNING_ALERT = 58, PRELUDE_ERROR_TLS_FATAL_ALERT = 59, PRELUDE_ERROR_IDMEF_CLASS_CHILD_NOT_CLASS = 60, PRELUDE_ERROR_ASSERTION = 61, PRELUDE_ERROR_IDMEF_VALUE_TYPE_REF_UNAVAILABLE = 62, PRELUDE_ERROR_UNKNOWN_ERRNO = 16382, PRELUDE_ERROR_E2BIG = PRELUDE_ERROR_SYSTEM_ERROR | 0, PRELUDE_ERROR_EACCES = PRELUDE_ERROR_SYSTEM_ERROR | 1, PRELUDE_ERROR_EADDRINUSE = PRELUDE_ERROR_SYSTEM_ERROR | 2, PRELUDE_ERROR_EADDRNOTAVAIL = PRELUDE_ERROR_SYSTEM_ERROR | 3, PRELUDE_ERROR_EADV = PRELUDE_ERROR_SYSTEM_ERROR | 4, PRELUDE_ERROR_EAFNOSUPPORT = PRELUDE_ERROR_SYSTEM_ERROR | 5, PRELUDE_ERROR_EAGAIN = PRELUDE_ERROR_SYSTEM_ERROR | 6, PRELUDE_ERROR_EALREADY = PRELUDE_ERROR_SYSTEM_ERROR | 7, PRELUDE_ERROR_EAUTH = PRELUDE_ERROR_SYSTEM_ERROR | 8, PRELUDE_ERROR_EBACKGROUND = PRELUDE_ERROR_SYSTEM_ERROR | 9, PRELUDE_ERROR_EBADE = PRELUDE_ERROR_SYSTEM_ERROR | 10, PRELUDE_ERROR_EBADF = PRELUDE_ERROR_SYSTEM_ERROR | 11, PRELUDE_ERROR_EBADFD = PRELUDE_ERROR_SYSTEM_ERROR | 12, PRELUDE_ERROR_EBADMSG = PRELUDE_ERROR_SYSTEM_ERROR | 13, PRELUDE_ERROR_EBADR = PRELUDE_ERROR_SYSTEM_ERROR | 14, PRELUDE_ERROR_EBADRPC = PRELUDE_ERROR_SYSTEM_ERROR | 15, PRELUDE_ERROR_EBADRQC = PRELUDE_ERROR_SYSTEM_ERROR | 16, PRELUDE_ERROR_EBADSLT = PRELUDE_ERROR_SYSTEM_ERROR | 17, PRELUDE_ERROR_EBFONT = PRELUDE_ERROR_SYSTEM_ERROR | 18, PRELUDE_ERROR_EBUSY = PRELUDE_ERROR_SYSTEM_ERROR | 19, PRELUDE_ERROR_ECANCELED = PRELUDE_ERROR_SYSTEM_ERROR | 20, PRELUDE_ERROR_ECHILD = PRELUDE_ERROR_SYSTEM_ERROR | 21, PRELUDE_ERROR_ECHRNG = PRELUDE_ERROR_SYSTEM_ERROR | 22, PRELUDE_ERROR_ECOMM = PRELUDE_ERROR_SYSTEM_ERROR | 23, PRELUDE_ERROR_ECONNABORTED = PRELUDE_ERROR_SYSTEM_ERROR | 24, PRELUDE_ERROR_ECONNREFUSED = PRELUDE_ERROR_SYSTEM_ERROR | 25, PRELUDE_ERROR_ECONNRESET = PRELUDE_ERROR_SYSTEM_ERROR | 26, PRELUDE_ERROR_ED = PRELUDE_ERROR_SYSTEM_ERROR | 27, PRELUDE_ERROR_EDEADLK = PRELUDE_ERROR_SYSTEM_ERROR | 28, PRELUDE_ERROR_EDEADLOCK = PRELUDE_ERROR_SYSTEM_ERROR | 29, PRELUDE_ERROR_EDESTADDRREQ = PRELUDE_ERROR_SYSTEM_ERROR | 30, PRELUDE_ERROR_EDIED = PRELUDE_ERROR_SYSTEM_ERROR | 31, PRELUDE_ERROR_EDOM = PRELUDE_ERROR_SYSTEM_ERROR | 32, PRELUDE_ERROR_EDOTDOT = PRELUDE_ERROR_SYSTEM_ERROR | 33, PRELUDE_ERROR_EDQUOT = PRELUDE_ERROR_SYSTEM_ERROR | 34, PRELUDE_ERROR_EEXIST = PRELUDE_ERROR_SYSTEM_ERROR | 35, PRELUDE_ERROR_EFAULT = PRELUDE_ERROR_SYSTEM_ERROR | 36, PRELUDE_ERROR_EFBIG = PRELUDE_ERROR_SYSTEM_ERROR | 37, PRELUDE_ERROR_EFTYPE = PRELUDE_ERROR_SYSTEM_ERROR | 38, PRELUDE_ERROR_EGRATUITOUS = PRELUDE_ERROR_SYSTEM_ERROR | 39, PRELUDE_ERROR_EGREGIOUS = PRELUDE_ERROR_SYSTEM_ERROR | 40, PRELUDE_ERROR_EHOSTDOWN = PRELUDE_ERROR_SYSTEM_ERROR | 41, PRELUDE_ERROR_EHOSTUNREACH = PRELUDE_ERROR_SYSTEM_ERROR | 42, PRELUDE_ERROR_EIDRM = PRELUDE_ERROR_SYSTEM_ERROR | 43, PRELUDE_ERROR_EIEIO = PRELUDE_ERROR_SYSTEM_ERROR | 44, PRELUDE_ERROR_EILSEQ = PRELUDE_ERROR_SYSTEM_ERROR | 45, PRELUDE_ERROR_EINPROGRESS = PRELUDE_ERROR_SYSTEM_ERROR | 46, PRELUDE_ERROR_EINTR = PRELUDE_ERROR_SYSTEM_ERROR | 47, PRELUDE_ERROR_EINVAL = PRELUDE_ERROR_SYSTEM_ERROR | 48, PRELUDE_ERROR_EIO = PRELUDE_ERROR_SYSTEM_ERROR | 49, PRELUDE_ERROR_EISCONN = PRELUDE_ERROR_SYSTEM_ERROR | 50, PRELUDE_ERROR_EISDIR = PRELUDE_ERROR_SYSTEM_ERROR | 51, PRELUDE_ERROR_EISNAM = PRELUDE_ERROR_SYSTEM_ERROR | 52, PRELUDE_ERROR_EL2HLT = PRELUDE_ERROR_SYSTEM_ERROR | 53, PRELUDE_ERROR_EL2NSYNC = PRELUDE_ERROR_SYSTEM_ERROR | 54, PRELUDE_ERROR_EL3HLT = PRELUDE_ERROR_SYSTEM_ERROR | 55, PRELUDE_ERROR_EL3RST = PRELUDE_ERROR_SYSTEM_ERROR | 56, PRELUDE_ERROR_ELIBACC = PRELUDE_ERROR_SYSTEM_ERROR | 57, PRELUDE_ERROR_ELIBBAD = PRELUDE_ERROR_SYSTEM_ERROR | 58, PRELUDE_ERROR_ELIBEXEC = PRELUDE_ERROR_SYSTEM_ERROR | 59, PRELUDE_ERROR_ELIBMAX = PRELUDE_ERROR_SYSTEM_ERROR | 60, PRELUDE_ERROR_ELIBSCN = PRELUDE_ERROR_SYSTEM_ERROR | 61, PRELUDE_ERROR_ELNRNG = PRELUDE_ERROR_SYSTEM_ERROR | 62, PRELUDE_ERROR_ELOOP = PRELUDE_ERROR_SYSTEM_ERROR | 63, PRELUDE_ERROR_EMEDIUMTYPE = PRELUDE_ERROR_SYSTEM_ERROR | 64, PRELUDE_ERROR_EMFILE = PRELUDE_ERROR_SYSTEM_ERROR | 65, PRELUDE_ERROR_EMLINK = PRELUDE_ERROR_SYSTEM_ERROR | 66, PRELUDE_ERROR_EMSGSIZE = PRELUDE_ERROR_SYSTEM_ERROR | 67, PRELUDE_ERROR_EMULTIHOP = PRELUDE_ERROR_SYSTEM_ERROR | 68, PRELUDE_ERROR_ENAMETOOLONG = PRELUDE_ERROR_SYSTEM_ERROR | 69, PRELUDE_ERROR_ENAVAIL = PRELUDE_ERROR_SYSTEM_ERROR | 70, PRELUDE_ERROR_ENEEDAUTH = PRELUDE_ERROR_SYSTEM_ERROR | 71, PRELUDE_ERROR_ENETDOWN = PRELUDE_ERROR_SYSTEM_ERROR | 72, PRELUDE_ERROR_ENETRESET = PRELUDE_ERROR_SYSTEM_ERROR | 73, PRELUDE_ERROR_ENETUNREACH = PRELUDE_ERROR_SYSTEM_ERROR | 74, PRELUDE_ERROR_ENFILE = PRELUDE_ERROR_SYSTEM_ERROR | 75, PRELUDE_ERROR_ENOANO = PRELUDE_ERROR_SYSTEM_ERROR | 76, PRELUDE_ERROR_ENOBUFS = PRELUDE_ERROR_SYSTEM_ERROR | 77, PRELUDE_ERROR_ENOCSI = PRELUDE_ERROR_SYSTEM_ERROR | 78, PRELUDE_ERROR_ENODATA = PRELUDE_ERROR_SYSTEM_ERROR | 79, PRELUDE_ERROR_ENODEV = PRELUDE_ERROR_SYSTEM_ERROR | 80, PRELUDE_ERROR_ENOENT = PRELUDE_ERROR_SYSTEM_ERROR | 81, PRELUDE_ERROR_ENOEXEC = PRELUDE_ERROR_SYSTEM_ERROR | 82, PRELUDE_ERROR_ENOLCK = PRELUDE_ERROR_SYSTEM_ERROR | 83, PRELUDE_ERROR_ENOLINK = PRELUDE_ERROR_SYSTEM_ERROR | 84, PRELUDE_ERROR_ENOMEDIUM = PRELUDE_ERROR_SYSTEM_ERROR | 85, PRELUDE_ERROR_ENOMEM = PRELUDE_ERROR_SYSTEM_ERROR | 86, PRELUDE_ERROR_ENOMSG = PRELUDE_ERROR_SYSTEM_ERROR | 87, PRELUDE_ERROR_ENONET = PRELUDE_ERROR_SYSTEM_ERROR | 88, PRELUDE_ERROR_ENOPKG = PRELUDE_ERROR_SYSTEM_ERROR | 89, PRELUDE_ERROR_ENOPROTOOPT = PRELUDE_ERROR_SYSTEM_ERROR | 90, PRELUDE_ERROR_ENOSPC = PRELUDE_ERROR_SYSTEM_ERROR | 91, PRELUDE_ERROR_ENOSR = PRELUDE_ERROR_SYSTEM_ERROR | 92, PRELUDE_ERROR_ENOSTR = PRELUDE_ERROR_SYSTEM_ERROR | 93, PRELUDE_ERROR_ENOSYS = PRELUDE_ERROR_SYSTEM_ERROR | 94, PRELUDE_ERROR_ENOTBLK = PRELUDE_ERROR_SYSTEM_ERROR | 95, PRELUDE_ERROR_ENOTCONN = PRELUDE_ERROR_SYSTEM_ERROR | 96, PRELUDE_ERROR_ENOTDIR = PRELUDE_ERROR_SYSTEM_ERROR | 97, PRELUDE_ERROR_ENOTEMPTY = PRELUDE_ERROR_SYSTEM_ERROR | 98, PRELUDE_ERROR_ENOTNAM = PRELUDE_ERROR_SYSTEM_ERROR | 99, PRELUDE_ERROR_ENOTSOCK = PRELUDE_ERROR_SYSTEM_ERROR | 100, PRELUDE_ERROR_ENOTSUP = PRELUDE_ERROR_SYSTEM_ERROR | 101, PRELUDE_ERROR_ENOTTY = PRELUDE_ERROR_SYSTEM_ERROR | 102, PRELUDE_ERROR_ENOTUNIQ = PRELUDE_ERROR_SYSTEM_ERROR | 103, PRELUDE_ERROR_ENXIO = PRELUDE_ERROR_SYSTEM_ERROR | 104, PRELUDE_ERROR_EOPNOTSUPP = PRELUDE_ERROR_SYSTEM_ERROR | 105, PRELUDE_ERROR_EOVERFLOW = PRELUDE_ERROR_SYSTEM_ERROR | 106, PRELUDE_ERROR_EPERM = PRELUDE_ERROR_SYSTEM_ERROR | 107, PRELUDE_ERROR_EPFNOSUPPORT = PRELUDE_ERROR_SYSTEM_ERROR | 108, PRELUDE_ERROR_EPIPE = PRELUDE_ERROR_SYSTEM_ERROR | 109, PRELUDE_ERROR_EPROCLIM = PRELUDE_ERROR_SYSTEM_ERROR | 110, PRELUDE_ERROR_EPROCUNAVAIL = PRELUDE_ERROR_SYSTEM_ERROR | 111, PRELUDE_ERROR_EPROGMISMATCH = PRELUDE_ERROR_SYSTEM_ERROR | 112, PRELUDE_ERROR_EPROGUNAVAIL = PRELUDE_ERROR_SYSTEM_ERROR | 113, PRELUDE_ERROR_EPROTO = PRELUDE_ERROR_SYSTEM_ERROR | 114, PRELUDE_ERROR_EPROTONOSUPPORT = PRELUDE_ERROR_SYSTEM_ERROR | 115, PRELUDE_ERROR_EPROTOTYPE = PRELUDE_ERROR_SYSTEM_ERROR | 116, PRELUDE_ERROR_ERANGE = PRELUDE_ERROR_SYSTEM_ERROR | 117, PRELUDE_ERROR_EREMCHG = PRELUDE_ERROR_SYSTEM_ERROR | 118, PRELUDE_ERROR_EREMOTE = PRELUDE_ERROR_SYSTEM_ERROR | 119, PRELUDE_ERROR_EREMOTEIO = PRELUDE_ERROR_SYSTEM_ERROR | 120, PRELUDE_ERROR_ERESTART = PRELUDE_ERROR_SYSTEM_ERROR | 121, PRELUDE_ERROR_EROFS = PRELUDE_ERROR_SYSTEM_ERROR | 122, PRELUDE_ERROR_ERPCMISMATCH = PRELUDE_ERROR_SYSTEM_ERROR | 123, PRELUDE_ERROR_ESHUTDOWN = PRELUDE_ERROR_SYSTEM_ERROR | 124, PRELUDE_ERROR_ESOCKTNOSUPPORT = PRELUDE_ERROR_SYSTEM_ERROR | 125, PRELUDE_ERROR_ESPIPE = PRELUDE_ERROR_SYSTEM_ERROR | 126, PRELUDE_ERROR_ESRCH = PRELUDE_ERROR_SYSTEM_ERROR | 127, PRELUDE_ERROR_ESRMNT = PRELUDE_ERROR_SYSTEM_ERROR | 128, PRELUDE_ERROR_ESTALE = PRELUDE_ERROR_SYSTEM_ERROR | 129, PRELUDE_ERROR_ESTRPIPE = PRELUDE_ERROR_SYSTEM_ERROR | 130, PRELUDE_ERROR_ETIME = PRELUDE_ERROR_SYSTEM_ERROR | 131, PRELUDE_ERROR_ETIMEDOUT = PRELUDE_ERROR_SYSTEM_ERROR | 132, PRELUDE_ERROR_ETOOMANYREFS = PRELUDE_ERROR_SYSTEM_ERROR | 133, PRELUDE_ERROR_ETXTBSY = PRELUDE_ERROR_SYSTEM_ERROR | 134, PRELUDE_ERROR_EUCLEAN = PRELUDE_ERROR_SYSTEM_ERROR | 135, PRELUDE_ERROR_EUNATCH = PRELUDE_ERROR_SYSTEM_ERROR | 136, PRELUDE_ERROR_EUSERS = PRELUDE_ERROR_SYSTEM_ERROR | 137, PRELUDE_ERROR_EWOULDBLOCK = PRELUDE_ERROR_SYSTEM_ERROR | 138, PRELUDE_ERROR_EXDEV = PRELUDE_ERROR_SYSTEM_ERROR | 139, PRELUDE_ERROR_EXFULL = PRELUDE_ERROR_SYSTEM_ERROR | 140, } prelude_error_code_t; #ifndef PRELUDE_ERROR_SOURCE_DEFAULT #define PRELUDE_ERROR_SOURCE_DEFAULT PRELUDE_ERROR_SOURCE_UNKNOWN #endif typedef signed int prelude_error_t; prelude_bool_t prelude_error_is_verbose(prelude_error_t error); prelude_error_code_t prelude_error_get_code(prelude_error_t error); prelude_error_source_t prelude_error_get_source(prelude_error_t error); prelude_error_code_t prelude_error_code_from_errno(int err); prelude_error_t prelude_error_make(prelude_error_source_t source, prelude_error_code_t code); prelude_error_t prelude_error_make_from_errno(prelude_error_source_t source, int err); void prelude_perror(prelude_error_t error, const char *fmt, ...) __attribute__ ((__format__ (__printf__, 2, 3))); const char *prelude_strerror(prelude_error_t err); const char *prelude_strsource(prelude_error_t err); int prelude_error_code_to_errno(prelude_error_code_t code); prelude_error_t prelude_error_verbose_make_v(prelude_error_source_t source, prelude_error_code_t code, const char *fmt, va_list ap) __attribute__ ((__format__ (__printf__, 3, 0))); prelude_error_t prelude_error_verbose_make(prelude_error_source_t source, prelude_error_code_t code, const char *fmt, ...) __attribute__ ((__format__ (__printf__, 3, 4))); static inline prelude_error_t prelude_error(prelude_error_code_t code) { return prelude_error_make(PRELUDE_ERROR_SOURCE_DEFAULT, code); } static inline prelude_error_t prelude_error_verbose(prelude_error_code_t code, const char *fmt, ...) __attribute__ ((__format__ (__printf__, 2, 3))); static inline prelude_error_t prelude_error_verbose(prelude_error_code_t code, const char *fmt, ...) { int ret; va_list ap; va_start(ap, fmt); ret = prelude_error_verbose_make_v(PRELUDE_ERROR_SOURCE_DEFAULT, code, fmt, ap); va_end(ap); return ret; } static inline prelude_error_t prelude_error_from_errno(int err) { return prelude_error_make(PRELUDE_ERROR_SOURCE_DEFAULT, prelude_error_code_from_errno(err)); } #ifdef __cplusplus } #endif #endif libprelude-1.0.0/src/libprelude-error/err-codes.h0000664000076400007640000001206011347714630016700 00000000000000/* Output of mkstrtable.awk. DO NOT EDIT. */ /* err-codes.h - List of error codes and their description. Copyright (C) 2003, 2004 g10 Code GmbH This file is part of libgpg-error. libgpg-error is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. libgpg-error 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 Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with libgpg-error; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ /* The purpose of this complex string table is to produce optimal code with a minimum of relocations. */ static const char msgstr[] = gettext_noop ("Success") "\0" gettext_noop ("Unknown generic error") "\0" gettext_noop ("Unknown TLS error") "\0" gettext_noop ("Invalid length specified") "\0" gettext_noop ("Invalid message") "\0" gettext_noop ("Invalid protocol version") "\0" gettext_noop ("End of file") "\0" gettext_noop ("Client profile does not exist or have wrong permissions") "\0" gettext_noop ("Peer rejected authentication") "\0" gettext_noop ("Buffer does not contain a 8 bits integer") "\0" gettext_noop ("Buffer does not contain a 16 bits integer") "\0" gettext_noop ("Buffer does not contain a 32 bits integer") "\0" gettext_noop ("Buffer does not contain a 64 bits integer") "\0" gettext_noop ("Buffer does not contain a 32 bits float") "\0" gettext_noop ("Buffer is not zero terminated") "\0" gettext_noop ("Buffer does not contain an IDMEF time type") "\0" gettext_noop ("No connection information provided") "\0" gettext_noop ("Unknown IDMEF value type") "\0" gettext_noop ("Copy operation unavailable for specified IDMEF type") "\0" gettext_noop ("Clone operation unavailable for specified IDMEF type") "\0" gettext_noop ("Compare operation unavailable for specified IDMEF type") "\0" gettext_noop ("Read operation unavailable for specified IDMEF type") "\0" gettext_noop ("Write operation unavailable for specified IDMEF type") "\0" gettext_noop ("Can not compare data of different type") "\0" gettext_noop ("Could not parse IDMEF value") "\0" gettext_noop ("Unknown IDMEF class specified") "\0" gettext_noop ("Unknown IDMEF child specified") "\0" gettext_noop ("Unknown IDMEF element name") "\0" gettext_noop ("IDMEF path name too long") "\0" gettext_noop ("IDMEF path maximum depth exceeded") "\0" gettext_noop ("Can not make parent from IDMEF root path") "\0" gettext_noop ("Specified object index does not exist") "\0" gettext_noop ("Listed element require an index to be specified") "\0" gettext_noop ("Element integrity failed") "\0" gettext_noop ("Provided index value is reserved") "\0" gettext_noop ("Element forbid indexing") "\0" gettext_noop ("Element index is undefined") "\0" gettext_noop ("An index below the one specified is undefined") "\0" gettext_noop ("Unknown enumeration string") "\0" gettext_noop ("IDMEF message tag is unknown") "\0" gettext_noop ("File lock is held by another process") "\0" gettext_noop ("Unable to initialize LTDL") "\0" gettext_noop ("String is not 'nul' terminated") "\0" gettext_noop ("Could not resolve address") "\0" gettext_noop ("Specified permission type is unknown") "\0" gettext_noop ("Specified permission bit is not known") "\0" gettext_noop ("Could not parse IDMEF criteria") "\0" gettext_noop ("Unsupported criterion operator") "\0" gettext_noop ("Criterion regular expression is not valid") "\0" gettext_noop ("TLS layer returned a warning alert") "\0" gettext_noop ("TLS layer returned a fatal alert") "\0" gettext_noop ("IDMEF child is not a class") "\0" gettext_noop ("Critical assertion occurred") "\0" gettext_noop ("Reference operation unavailable for specified IDMEF type") "\0" gettext_noop ("Unknown system error") "\0" gettext_noop ("Unknown error code"); static const int msgidx[] = { 0, 8, 30, 48, 73, 89, 114, 126, 182, 211, 252, 294, 336, 378, 418, 448, 491, 526, 551, 603, 656, 711, 763, 816, 855, 883, 913, 943, 970, 995, 1029, 1070, 1108, 1156, 1181, 1214, 1238, 1265, 1311, 1338, 1367, 1404, 1430, 1461, 1487, 1524, 1562, 1593, 1624, 1666, 1701, 1734, 1761, 1789, 1846, 1867 }; #define msgidxof(code) (0 ? -1 \ : ((code >= 0) && (code <= 6)) ? (code - 0) \ : ((code >= 8) && (code <= 8)) ? (code - 1) \ : ((code >= 16) && (code <= 53)) ? (code - 8) \ : ((code >= 55) && (code <= 62)) ? (code - 9) \ : ((code >= 16382) && (code <= 16382)) ? (code - 16328) \ : 16383 - 16328) libprelude-1.0.0/src/libprelude-error/mkerrcodes1.awk0000664000076400007640000000641111202225026017554 00000000000000# mkerrcodes.awk # Copyright (C) 2003, 2004 g10 Code GmbH # # 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, g10 Code GmbH gives unlimited permission to # copy, distribute and modify the C source files that are the output # of mkerrcodes.awk. You need not follow the terms of the GNU General # Public License when using or distributing such scripts, even though # portions of the text of mkerrcodes.awk appear in them. The GNU # General Public License (GPL) does govern all other use of the material # that constitutes the mkerrcodes.awk program. # # Certain portions of the mkerrcodes.awk source text are designed to be # copied (in certain cases, depending on the input) into the output of # mkerrcodes.awk. We call these the "data" portions. The rest of the # mkerrcodes.awk source text consists of comments plus executable code # that decides which of the data portions to output in any given case. # We call these comments and executable code the "non-data" portions. # mkerrcodes.h never copies any of the non-data portions into its output. # # This special exception to the GPL applies to versions of mkerrcodes.awk # released by g10 Code GmbH. When you make and distribute a modified version # of mkerrcodes.awk, you may extend this special exception to the GPL to # apply to your modified version as well, *unless* your modified version # has the potential to copy into its output some of the text that was the # non-data portion of the version that you started with. (In other words, # unless your change moves or copies text from the non-data portions to the # data portions.) If your modification has such potential, you must delete # any notice of this special exception to the GPL from your modified version. # This script outputs an intermediate file that contains the following block # for each error value symbol in the input file (example for EINVAL): # # #ifdef EINVAL # EINVAL PRELUDE_ERROR_EINVAL # #endif # # The input file is a list of possible system errors in the column errnoidx # (defaults to 2). # # Comments (starting with # and ending at the end of the line) are removed, # as is trailing whitespace. BEGIN { FS="[\t]+"; header = 1; if (errnoidx == 0) errnoidx = 2; print "/* Output of mkerrcodes.awk. DO NOT EDIT. */"; print ""; } /^#/ { next; } header { if ($1 ~ /^[0-9]/) { print "#include "; print ""; header = 0; } else print; } !header { sub (/\#.+/, ""); sub (/[ ]+$/, ""); # Strip trailing space and tab characters. if (/^$/) next; print "#ifdef " $errnoidx; print $errnoidx "\tPRELUDE_ERROR_" $errnoidx; print "#endif"; } libprelude-1.0.0/src/libprelude-error/errnos.in0000664000076400007640000000571111202225026016473 00000000000000# errnos.h.in - List of system error values input file. /* errnos.h - List of system error values. Copyright (C) 2003, 2004 g10 Code GmbH This file is part of libgpg-error. libgpg-error is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. libgpg-error 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 Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with libgpg-error; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ # Everything up to the first line that starts with a number in the # first column is copied into the output verbatim. Then, empty lines # are ignored. Other lines must have an error code number, followed # by one or more characters, followed by the error name. # # IMPORTANT: For now, the numbering must be consecutive. Some of the # scripts (notably mkerrnos.h) do not deal correctly with a numbering # that is out of order or has gaps. 0 E2BIG 1 EACCES 2 EADDRINUSE 3 EADDRNOTAVAIL 4 EADV 5 EAFNOSUPPORT 6 EAGAIN 7 EALREADY 8 EAUTH 9 EBACKGROUND 10 EBADE 11 EBADF 12 EBADFD 13 EBADMSG 14 EBADR 15 EBADRPC 16 EBADRQC 17 EBADSLT 18 EBFONT 19 EBUSY 20 ECANCELED 21 ECHILD 22 ECHRNG 23 ECOMM 24 ECONNABORTED 25 ECONNREFUSED 26 ECONNRESET 27 ED 28 EDEADLK 29 EDEADLOCK 30 EDESTADDRREQ 31 EDIED 32 EDOM 33 EDOTDOT 34 EDQUOT 35 EEXIST 36 EFAULT 37 EFBIG 38 EFTYPE 39 EGRATUITOUS 40 EGREGIOUS 41 EHOSTDOWN 42 EHOSTUNREACH 43 EIDRM 44 EIEIO 45 EILSEQ 46 EINPROGRESS 47 EINTR 48 EINVAL 49 EIO 50 EISCONN 51 EISDIR 52 EISNAM 53 EL2HLT 54 EL2NSYNC 55 EL3HLT 56 EL3RST 57 ELIBACC 58 ELIBBAD 59 ELIBEXEC 60 ELIBMAX 61 ELIBSCN 62 ELNRNG 63 ELOOP 64 EMEDIUMTYPE 65 EMFILE 66 EMLINK 67 EMSGSIZE 68 EMULTIHOP 69 ENAMETOOLONG 70 ENAVAIL 71 ENEEDAUTH 72 ENETDOWN 73 ENETRESET 74 ENETUNREACH 75 ENFILE 76 ENOANO 77 ENOBUFS 78 ENOCSI 79 ENODATA 80 ENODEV 81 ENOENT 82 ENOEXEC 83 ENOLCK 84 ENOLINK 85 ENOMEDIUM 86 ENOMEM 87 ENOMSG 88 ENONET 89 ENOPKG 90 ENOPROTOOPT 91 ENOSPC 92 ENOSR 93 ENOSTR 94 ENOSYS 95 ENOTBLK 96 ENOTCONN 97 ENOTDIR 98 ENOTEMPTY 99 ENOTNAM 100 ENOTSOCK 101 ENOTSUP 102 ENOTTY 103 ENOTUNIQ 104 ENXIO 105 EOPNOTSUPP 106 EOVERFLOW 107 EPERM 108 EPFNOSUPPORT 109 EPIPE 110 EPROCLIM 111 EPROCUNAVAIL 112 EPROGMISMATCH 113 EPROGUNAVAIL 114 EPROTO 115 EPROTONOSUPPORT 116 EPROTOTYPE 117 ERANGE 118 EREMCHG 119 EREMOTE 120 EREMOTEIO 121 ERESTART 122 EROFS 123 ERPCMISMATCH 124 ESHUTDOWN 125 ESOCKTNOSUPPORT 126 ESPIPE 127 ESRCH 128 ESRMNT 129 ESTALE 130 ESTRPIPE 131 ETIME 132 ETIMEDOUT 133 ETOOMANYREFS 134 ETXTBSY 135 EUCLEAN 136 EUNATCH 137 EUSERS 138 EWOULDBLOCK 139 EXDEV 140 EXFULL libprelude-1.0.0/src/libprelude-error/mkstrtable.awk0000664000076400007640000001406311325301044017510 00000000000000# mkstrtable.awk # Copyright (C) 2003, 2004 g10 Code GmbH # # 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, g10 Code GmbH gives unlimited permission to # copy, distribute and modify the C source files that are the output # of mkstrtable.awk. You need not follow the terms of the GNU General # Public License when using or distributing such scripts, even though # portions of the text of mkstrtable.awk appear in them. The GNU # General Public License (GPL) does govern all other use of the material # that constitutes the mkstrtable.awk program. # # Certain portions of the mkstrtable.awk source text are designed to be # copied (in certain cases, depending on the input) into the output of # mkstrtable.awk. We call these the "data" portions. The rest of the # mkstrtable.awk source text consists of comments plus executable code # that decides which of the data portions to output in any given case. # We call these comments and executable code the "non-data" portions. # mkstrtable.h never copies any of the non-data portions into its output. # # This special exception to the GPL applies to versions of mkstrtable.awk # released by g10 Code GmbH. When you make and distribute a modified version # of mkstrtable.awk, you may extend this special exception to the GPL to # apply to your modified version as well, *unless* your modified version # has the potential to copy into its output some of the text that was the # non-data portion of the version that you started with. (In other words, # unless your change moves or copies text from the non-data portions to the # data portions.) If your modification has such potential, you must delete # any notice of this special exception to the GPL from your modified version. # This script outputs a source file that does define the following # symbols: # # static const char msgstr[]; # A string containing all messages in the list. # # static const int msgidx[]; # A list of index numbers, one for each message, that points to the # beginning of the string in msgstr. # # msgidxof (code); # A macro that maps code numbers to idx numbers. If a DEFAULT MESSAGE # is provided (see below), its index will be returned for unknown codes. # Otherwise -1 is returned for codes that do not appear in the list. # You can lookup the message with code CODE with: # msgstr + msgidx[msgidxof (code)]. # # The input file has the following format: # CODE1 ... MESSAGE1 (code nr, , something, , msg) # CODE2 ... MESSAGE2 (code nr, , something, , msg) # ... # CODEn ... MESSAGEn (code nr, , something, , msg) # ... DEFAULT-MESSAGE (, something, , fall-back msg) # # Comments (starting with # and ending at the end of the line) are removed, # as is trailing whitespace. The last line is optional; if no DEFAULT # MESSAGE is given, msgidxof will return the number -1 for unknown # index numbers. # # The field to be used is specified with the variable "textidx" on # the command line. It defaults to 2. # # The variable nogettext can be set to 1 to suppress gettext markers. # # The variable prefix can be used to prepend a string to each message. # # The variable namespace can be used to prepend a string to each # variable and macro name. BEGIN { FS = "[\t]+"; # cpos holds the current position in the message string. cpos = 0; # msg holds the number of messages. msg = 0; print "/* Output of mkstrtable.awk. DO NOT EDIT. */"; print ""; header = 1; if (textidx == 0) textidx = 2; # nogettext can be set to 1 to suppress gettext noop markers. } /^#/ { next; } header { if ($1 ~ /^[0123456789]+$/) { print "/* The purpose of this complex string table is to produce"; print " optimal code with a minimum of relocations. */"; print ""; print "static const char " namespace "msgstr[] = "; header = 0; } else print; } !header { sub (/\#.+/, ""); sub (/[ ]+$/, ""); # Strip trailing space and tab characters. if (/^$/) next; # Print the string msgstr line by line. We delay output by one line to be able # to treat the last line differently (see END). if (last_msgstr) { if (nogettext) print " \"" last_msgstr "\" \"\\0\""; else print " gettext_noop (\"" last_msgstr "\") \"\\0\""; } last_msgstr = prefix $textidx; # Remember the error code and msgidx of each error message. code[msg] = $1; pos[msg] = cpos; cpos += length (last_msgstr) + 1; msg++; if ($1 == "") { has_default = 1; exit; } } END { if (has_default) coded_msgs = msg - 1; else coded_msgs = msg; if (nogettext) print " \"" prefix last_msgstr "\";"; else print " gettext_noop (\"" prefix last_msgstr "\");"; print ""; print "static const int " namespace "msgidx[] ="; print " {"; for (i = 0; i < coded_msgs; i++) print " " pos[i] ","; print " " pos[coded_msgs]; print " };"; print ""; print "#define " namespace "msgidxof(code) (0 ? -1 \\"; # Gather the ranges. skip = code[0]; start = code[0]; stop = code[0]; for (i = 1; i < coded_msgs; i++) { if (code[i] == stop + 1) stop++; else { print " : ((code >= " start ") && (code <= " stop ")) ? (code - " \ skip ") \\"; skip += code[i] - stop - 1; start = code[i]; stop = code[i]; } } print " : ((code >= " start ") && (code <= " stop ")) ? (code - " \ skip ") \\"; if (has_default) print " : " stop + 1 " - " skip ")"; else print " : -1)"; } libprelude-1.0.0/src/libprelude-error/err-sources.h.in0000664000076400007640000000475211202225026017666 00000000000000# err-sources.h.in - List of error sources and their description input file. /* err-sources.h - List of error sources and their description. Copyright (C) 2003, 2004 g10 Code GmbH This file is part of libgpg-error. libgpg-error is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. libgpg-error 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 Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with libgpg-error; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ # Everything up to the first line that starts with a number in the # first column is copied into the output verbatim. Then, empty lines # are ignored. Other lines must have an error source number, followed # by one or more characters, followed by the error source # symbol, followed by one or more characters, followed by the # error source name. Trailing whitespace is removed. The error # sources should be sorted. The last line should not have a number, # but only a , followed by a description for error sources that # are not in the list. 0 PRELUDE_ERROR_SOURCE_UNKNOWN Unspecified source 1 PRELUDE_ERROR_SOURCE_IO prelude-io 2 PRELUDE_ERROR_SOURCE_MESSAGE prelude-message 3 PRELUDE_ERROR_SOURCE_FAILOVER prelude-failover 4 PRELUDE_ERROR_SOURCE_CLIENT prelude-client 5 PRELUDE_ERROR_SOURCE_CLIENT_PROFILE prelude-client-profile 6 PRELUDE_ERROR_SOURCE_EXTRACT prelude-extract 7 PRELUDE_ERROR_SOURCE_CONNECTION prelude-connection 8 PRELUDE_ERROR_SOURCE_CONNECTION_POOL prelude-connection-pool 9 PRELUDE_ERROR_SOURCE_CONFIG_ENGINE config-file 10 PRELUDE_ERROR_SOURCE_STRING prelude-string 11 PRELUDE_ERROR_SOURCE_IDMEF_TREE_WRAP idmef-tree-wrap 12 PRELUDE_ERROR_SOURCE_IDMEF_PATH idmef-path 13 PRELUDE_ERROR_SOURCE_IDMEF_TYPE idmef-type 14 PRELUDE_ERROR_SOURCE_IDMEF_MESSAGE_READ idmef-message-read 15 PRELUDE_ERROR_SOURCE_IDMEF_CRITERIA idmef-criteria 16 PRELUDE_ERROR_SOURCE_IDMEF_VALUE_TYPE idmef-value-type 255 PRELUDE_ERROR_SOURCE_PRELUDEDB libpreludedb # 15 to 254 are free to be used. PRELUDE_ERROR_SOURCE_DIM Unknown source libprelude-1.0.0/src/prelude-log.c0000664000076400007640000002706511325615276013766 00000000000000/***** * * Copyright (C) 2001-2005,2006,2007 PreludeIDS Technologies. All Rights Reserved. * Author: Yoann Vandoorselaere * * This file is part of the Prelude library. * * 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; see the file COPYING. If not, write to * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. * *****/ #include "libmissing.h" #include #include #include #include #include #include #if !((defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__) # include #else # include #endif #include "common.h" #include "prelude-log.h" #include "prelude-error.h" #include "prelude-inttypes.h" #if ! defined (PRELUDE_VA_COPY) # if defined (__GNUC__) && defined (__PPC__) && (defined (_CALL_SYSV) || defined (_WIN32)) # define PRELUDE_VA_COPY(ap1, ap2) (*(ap1) = *(ap2)) # elif defined (PRELUDE_VA_COPY_AS_ARRAY) # define PRELUDE_VA_COPY(ap1, ap2) memmove ((ap1), (ap2), sizeof(va_list)) # else /* va_list is a pointer */ # define PRELUDE_VA_COPY(ap1, ap2) ((ap1) = (ap2)) # endif #endif static int do_log_print(prelude_log_t level, const char *str); static int debug_level = 0; static int raise_abort_level = 0; prelude_bool_t raise_abort_set = FALSE; static int log_level = PRELUDE_LOG_INFO; static char *global_prefix = NULL; static FILE *debug_logfile = NULL; static prelude_log_flags_t log_flags = 0; static int (*global_log_cb)(prelude_log_t level, const char *str) = do_log_print; static void (*external_log_cb)(prelude_log_t level, const char *str) = NULL; #if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__ #define LOG_CRIT EVENTLOG_WARNING_TYPE #define LOG_ERR EVENTLOG_ERROR_TYPE #define LOG_WARNING EVENTLOG_WARNING_TYPE #define LOG_INFO EVENTLOG_INFORMATION_TYPE #define LOG_DEBUG EVENTLOG_INFORMATION_TYPE static void syslog_win32(int priority, const char *log) { static HANDLE event_source = NULL; if ( ! event_source ) event_source = RegisterEventSource(NULL, TEXT("Prelude")); ReportEvent(event_source, /* handle of event source */ (WORD)priority, /* event type */ 0, /* event category */ 0, /* event ID */ NULL, /* current user's SID */ 1, /* strings in szMsg */ 0, /* no bytes of raw data */ &log, /* array of error strings */ NULL); /* no raw data */ } #endif static int do_log_syslog(prelude_log_t level, const char *str) { int slevel = LOG_INFO; if ( level == PRELUDE_LOG_CRIT ) slevel = LOG_CRIT; else if ( level == PRELUDE_LOG_ERR ) slevel = LOG_ERR; else if ( level == PRELUDE_LOG_WARN ) slevel = LOG_WARNING; else if ( level == PRELUDE_LOG_INFO ) slevel = LOG_INFO; else if ( level >= PRELUDE_LOG_DEBUG ) slevel = LOG_DEBUG; while (*str == '\n' ) str++; #if !((defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__) syslog(slevel, "%s", str); #else syslog_win32(slevel, str); #endif return 0; } static inline FILE *get_out_fd(prelude_log_t level) { return (level < PRELUDE_LOG_INFO) ? stderr : stdout; } static int do_log_print(prelude_log_t level, const char *str) { int ret; FILE *out = get_out_fd(level); ret = fprintf(out, "%s", str); if ( ret < 0 && errno == EBADF ) return -1; return 0; } static int do_log_external(prelude_log_t level, const char *str) { external_log_cb(level, str); return 0; } static inline prelude_bool_t need_to_log(prelude_log_t level, prelude_log_t cur) { return (level > cur) ? FALSE : TRUE; } static const char *level_to_string(prelude_log_t level) { if ( level >= PRELUDE_LOG_DEBUG ) return "DEBUG"; else if ( level == PRELUDE_LOG_ERR ) return "ERROR"; else if ( level == PRELUDE_LOG_INFO ) return "INFO"; else if ( level == PRELUDE_LOG_WARN ) return "WARNING"; else if ( level == PRELUDE_LOG_CRIT ) return "CRITICAL"; return ""; } static ssize_t get_header(prelude_log_t level, char *buf, size_t size) { int ret; struct tm *t; size_t len = 0; time_t now = time(NULL); buf[0] = 0; if ( ! (log_flags & PRELUDE_LOG_FLAGS_SYSLOG) ) { t = localtime(&now); if ( t ) len = strftime(buf, size, "%d %b %H:%M:%S ", t); ret = snprintf(buf + len, size - len, "(process:%d) %s: ", (int) getpid(), level_to_string(level)); if ( ret < 0 || (size_t) ret >= (size - len) ) return -1; } else { ret = snprintf(buf + len, size - len, "%s: ", level_to_string(level)); if ( ret < 0 || (size_t) ret >= (size - len) ) return -1; } return (size_t) len + ret; } static void do_log_v(prelude_log_t level, const char *file, const char *function, int line, const char *fmt, va_list ap) { int ret; va_list bkp; char buf[1024]; ssize_t len = 0; if ( global_log_cb == do_log_print || global_log_cb == do_log_syslog ) { len = get_header(level, buf, sizeof(buf)); if ( len < 0 ) return; } PRELUDE_VA_COPY(bkp, ap); ret = vsnprintf(buf + len, sizeof(buf) - len, fmt, ap); if ( ret < 0 || (size_t) ret >= (sizeof(buf) - len) ) goto out; if ( level <= PRELUDE_LOG_ERR || level >= PRELUDE_LOG_DEBUG ) { for ( len += ret; buf[len - 1] == '\n' ; len-- ); snprintf(buf + len, sizeof(buf) - len, " (%s:%d %s)\n", file, line, function); } if ( need_to_log(level, log_level) || need_to_log(level, debug_level) ) { ret = global_log_cb(level, buf); if ( ret < 0 && global_log_cb == do_log_print ) { prelude_log_set_flags(PRELUDE_LOG_FLAGS_SYSLOG); do_log_v(level, file, function, line, fmt, bkp); goto out; } if ( debug_logfile ) fprintf(debug_logfile, "%s", buf); } out: va_end(bkp); } void _prelude_log_v(prelude_log_t level, const char *file, const char *function, int line, const char *fmt, va_list ap) { if ( ! need_to_log(level, log_level) && ! need_to_log(level, debug_level) ) return; do_log_v(level, file, function, line, fmt, ap); } /** * _prelude_log: * @level: PRELUDE_LOG_PRIORITY_INFO or PRELUDE_LOG_PRIORITY_ERROR. * @file: The caller filename. * @function: The caller function name. * @line: The caller line number. * @fmt: Format string. * @...: Variable argument list. * * This function should not be called directly. * Use the #log macro defined in prelude-log.h */ void _prelude_log(prelude_log_t level, const char *file, const char *function, int line, const char *fmt, ...) { va_list ap; if ( ! need_to_log(level, log_level) && ! need_to_log(level, debug_level) ) return; va_start(ap, fmt); do_log_v(level, file, function, line, fmt, ap); va_end(ap); if ( raise_abort_set && level == raise_abort_level ) abort(); } /** * prelude_log_set_flags: * @flags: */ void prelude_log_set_flags(prelude_log_flags_t flags) { if ( flags & PRELUDE_LOG_FLAGS_QUIET ) log_level = PRELUDE_LOG_WARN; if ( flags & PRELUDE_LOG_FLAGS_SYSLOG ) global_log_cb = do_log_syslog; else global_log_cb = do_log_print; log_flags = flags; } prelude_log_flags_t prelude_log_get_flags(void) { return log_flags; } void prelude_log_set_level(prelude_log_t level) { log_level = level; } void prelude_log_set_debug_level(int level) { debug_level = PRELUDE_LOG_DEBUG + level; } /** * prelude_log_set_prefix: * @prefix: Pointer to the prefix to use. * * Tell the Prelude standard logger to add @prefix before logging * a line. */ void prelude_log_set_prefix(char *prefix) { global_prefix = prefix; } char *prelude_log_get_prefix(void) { return global_prefix; } /** * prelude_log_set_callback: * @log_cb: Callback function. * * @log_cb() will be called in place of the prelude function usally * used for loging. */ void prelude_log_set_callback(void log_cb(prelude_log_t level, const char *str)) { external_log_cb = log_cb; global_log_cb = do_log_external; } int prelude_log_set_logfile(const char *filename) { if ( ! filename && debug_logfile ) { fclose(debug_logfile); debug_logfile = NULL; } else { debug_logfile = fopen(filename, "a"); if ( ! debug_logfile ) return prelude_error_from_errno(errno); } return 0; } void _prelude_log_set_abort_level(prelude_log_t level) { raise_abort_set = TRUE; raise_abort_level = level; } int _prelude_log_set_abort_level_from_string(const char *level) { size_t i; char *eptr; long lvalue; struct { const char *prefix; prelude_log_t level; } tbl[] = { { "CRIT", PRELUDE_LOG_CRIT }, { "ERR", PRELUDE_LOG_ERR }, { "WARN", PRELUDE_LOG_WARN }, { "INFO", PRELUDE_LOG_INFO }, { "DEBUG", PRELUDE_LOG_DEBUG } }; prelude_return_val_if_fail(level != NULL, prelude_error(PRELUDE_ERROR_ASSERTION)); for ( i = 0; i < sizeof(tbl) / sizeof(*tbl); i++ ) { if ( strncasecmp(tbl[i].prefix, level, strlen(tbl[i].prefix)) == 0 ) { _prelude_log_set_abort_level(tbl[i].level); return 0; } } lvalue = strtol(level, &eptr, 10); if ( eptr != (level + strlen(level)) || lvalue == LONG_MIN || lvalue == LONG_MAX ) { prelude_log(PRELUDE_LOG_WARN, "Invalid abort level specified: '%s'.\n", level); return -1; } _prelude_log_set_abort_level(lvalue); return 0; } #ifndef HAVE_VARIADIC_MACROS void prelude_log(prelude_log_t level, const char *fmt, ...) { va_list ap; va_start(ap, fmt); _prelude_log_v(level, "", "", 0, fmt, ap); va_end(ap); } void prelude_log_debug(prelude_log_t level, const char *fmt, ...) { va_list ap; va_start(ap, fmt); _prelude_log_v(PRELUDE_LOG_DEBUG + level, "", "", 0, fmt, ap); va_end(ap); } #endif libprelude-1.0.0/src/idmef-tree-wrap.c0000664000076400007640000254042111325615317014531 00000000000000 /***** * * Copyright (C) 2001,2002,2003,2004,2005 PreludeIDS Technologies. All Rights Reserved. * Author: Yoann Vandoorselaere * Author: Nicolas Delon * * This file is part of the Prelude library. * * 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; see the file COPYING. If not, write to * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. * *****/ /* Auto-generated by the GenerateIDMEFTreeWrapC package */ #include "config.h" #include #include #include #include #include #include "prelude-inttypes.h" #include "prelude-list.h" #include "prelude-msg.h" #include "prelude-string.h" #define PRELUDE_ERROR_SOURCE_DEFAULT PRELUDE_ERROR_SOURCE_IDMEF_TREE_WRAP #include "prelude-error.h" #include "idmef-time.h" #include "idmef-data.h" #include "idmef-class.h" #include "idmef-value.h" #include "idmef-tree-wrap.h" #include "libmissing.h" #include "common.h" #ifdef WIN32 # undef interface #endif #define LISTED_OBJECT(name, type) prelude_list_t name #define IS_LISTED prelude_list_t list #define UNION(type, var) type var; union #define UNION_MEMBER(value, type, name) type name #define ENUM(...) typedef enum #define PRE_DECLARE(type, class) #define TYPE_ID(type, id) type #define PRIMITIVE_TYPE(type) #define PRIMITIVE_TYPE_STRUCT(type) #define HIDE(type, name) type name #define REFCOUNT int refcount #define REQUIRED(type, name) type name #define DYNAMIC_IDENT(x) uint64_t x #define OPTIONAL_INT(type, name) type name; unsigned int name ## _is_set:1 #define IDENT(name) uint64_t name #define idmef_data_copy idmef_data_copy_dup #ifndef ABS # define ABS(x) (((x) < 0) ? -(x) : (x)) #endif /* * If we subtract the integer representations of two floats then that * will tell us how close they are. If the difference is zero, they are * identical. If the difference is one, they are adjacent floats. * In general, if the difference is n then there are n-1 floats between * them. * * http://www.cygnus-software.com/papers/comparingfloats/comparingfloats.htm */ static int float_compare(float a, float b) { union { float fval; int32_t ival; } au, bu; au.fval = a; bu.fval = b; /* Make aInt lexicographically ordered as a twos-complement int */ if ( au.ival < 0 ) au.ival = 0x80000000 - au.ival; /* Make bInt lexicographically ordered as a twos-complement int */ if ( bu.ival < 0 ) bu.ival = 0x80000000 - bu.ival; return (ABS(au.ival - bu.ival) <= 0) ? 0 : -1; } static int prelude_string_copy(const prelude_string_t *src, prelude_string_t *dst) { prelude_return_val_if_fail(src, prelude_error(PRELUDE_ERROR_ASSERTION)); prelude_return_val_if_fail(dst, prelude_error(PRELUDE_ERROR_ASSERTION)); if ( ! prelude_string_is_empty(src) ) return prelude_string_copy_dup(src, dst); return 0; } static int get_value_from_string(idmef_value_t **value, prelude_string_t *str, prelude_bool_t is_ptr) { int ret; if ( ! str ) { *value = NULL; return 0; } if ( ! is_ptr ) { ret = prelude_string_clone(str, &str); if ( ret < 0 ) return ret; } ret = idmef_value_new_string(value, str); if ( ret < 0 ) { prelude_string_destroy(str); return ret; } if ( is_ptr ) prelude_string_ref(str); return 0; } static int get_value_from_data(idmef_value_t **value, idmef_data_t *data, prelude_bool_t is_ptr) { int ret; if ( ! data ) { *value = NULL; return 0; } if ( ! is_ptr ) { ret = idmef_data_clone(data, &data); if ( ret < 0 ) return ret; } ret = idmef_value_new_data(value, data); if ( ret < 0 ) { idmef_data_destroy(data); return ret; } if ( is_ptr ) idmef_data_ref(data); return 0; } static int get_value_from_time(idmef_value_t **value, idmef_time_t *time, prelude_bool_t is_ptr) { int ret; if ( ! time ) { *value = NULL; return 0; } if ( ! is_ptr ) { ret = idmef_time_clone(time, &time); if ( ret < 0 ) return ret; } ret = idmef_value_new_time(value, time); if ( ret < 0 ) { idmef_time_destroy(time); return ret; } if ( is_ptr ) idmef_time_ref(time); return 0; } static void list_insert(prelude_list_t *head, prelude_list_t *item, int pos) { int i = 0; prelude_list_t *tmp; if ( pos == IDMEF_LIST_APPEND ) prelude_list_add_tail(head, item); else if ( pos == IDMEF_LIST_PREPEND ) prelude_list_add(head, item); else if ( pos >= 0 ) { prelude_list_for_each(head, tmp) { if ( i == pos ) break; i++; } prelude_list_add_tail(tmp, item); } else if ( pos < 0 ) { pos = -pos; pos--; prelude_list_for_each_reversed(head, tmp) { if ( i == pos ) break; i++; } prelude_list_add(tmp, item); } } /** * idmef_additional_data_type_to_numeric: * @name: pointer to an IDMEF string representation of a #idmef_additional_data_type_t value. * * Returns: the numeric equivalent of @name, or -1 if @name is not valid. */ idmef_additional_data_type_t idmef_additional_data_type_to_numeric(const char *name) { size_t i; const struct { idmef_additional_data_type_t val; const char *name; } tbl[] = { { IDMEF_ADDITIONAL_DATA_TYPE_STRING, "string" }, { IDMEF_ADDITIONAL_DATA_TYPE_BYTE, "byte" }, { IDMEF_ADDITIONAL_DATA_TYPE_CHARACTER, "character" }, { IDMEF_ADDITIONAL_DATA_TYPE_DATE_TIME, "date-time" }, { IDMEF_ADDITIONAL_DATA_TYPE_INTEGER, "integer" }, { IDMEF_ADDITIONAL_DATA_TYPE_NTPSTAMP, "ntpstamp" }, { IDMEF_ADDITIONAL_DATA_TYPE_PORTLIST, "portlist" }, { IDMEF_ADDITIONAL_DATA_TYPE_REAL, "real" }, { IDMEF_ADDITIONAL_DATA_TYPE_BOOLEAN, "boolean" }, { IDMEF_ADDITIONAL_DATA_TYPE_BYTE_STRING, "byte-string" }, { IDMEF_ADDITIONAL_DATA_TYPE_XML, "xml" }, }; prelude_return_val_if_fail(name, prelude_error(PRELUDE_ERROR_ASSERTION)); for ( i = 0; i < sizeof(tbl) / sizeof(*tbl); i++ ) { if ( strcasecmp(name, tbl[i].name) == 0 ) return tbl[i].val; } return prelude_error_verbose(PRELUDE_ERROR_IDMEF_UNKNOWN_ENUM_STRING, "Unknown enumeration value '%s' for additional_data_type", name); } /** * idmef_additional_data_type_to_string: * @val: an enumeration value for #idmef_additional_data_type_t. * * Return the IDMEF string equivalent of @val provided #idmef_additional_data_type_t value. * * Returns: a pointer to the string describing @val, or NULL if @val is invalid. */ const char *idmef_additional_data_type_to_string(idmef_additional_data_type_t val) { const struct { idmef_additional_data_type_t val; const char *name; } tbl[] = { { IDMEF_ADDITIONAL_DATA_TYPE_STRING, "string" }, { IDMEF_ADDITIONAL_DATA_TYPE_BYTE, "byte" }, { IDMEF_ADDITIONAL_DATA_TYPE_CHARACTER, "character" }, { IDMEF_ADDITIONAL_DATA_TYPE_DATE_TIME, "date-time" }, { IDMEF_ADDITIONAL_DATA_TYPE_INTEGER, "integer" }, { IDMEF_ADDITIONAL_DATA_TYPE_NTPSTAMP, "ntpstamp" }, { IDMEF_ADDITIONAL_DATA_TYPE_PORTLIST, "portlist" }, { IDMEF_ADDITIONAL_DATA_TYPE_REAL, "real" }, { IDMEF_ADDITIONAL_DATA_TYPE_BOOLEAN, "boolean" }, { IDMEF_ADDITIONAL_DATA_TYPE_BYTE_STRING, "byte-string" }, { IDMEF_ADDITIONAL_DATA_TYPE_XML, "xml" }, }; if ( val < 0 || (size_t) val >= (sizeof(tbl) / sizeof(*tbl)) ) return NULL; return tbl[val].name; } struct idmef_additional_data { IS_LISTED; REFCOUNT; idmef_additional_data_type_t type; prelude_string_t *meaning; REQUIRED(idmef_data_t, *data); }; /** * idmef_reference_origin_to_numeric: * @name: pointer to an IDMEF string representation of a #idmef_reference_origin_t value. * * Returns: the numeric equivalent of @name, or -1 if @name is not valid. */ idmef_reference_origin_t idmef_reference_origin_to_numeric(const char *name) { size_t i; const struct { idmef_reference_origin_t val; const char *name; } tbl[] = { { IDMEF_REFERENCE_ORIGIN_UNKNOWN, "unknown" }, { IDMEF_REFERENCE_ORIGIN_VENDOR_SPECIFIC, "vendor-specific" }, { IDMEF_REFERENCE_ORIGIN_USER_SPECIFIC, "user-specific" }, { IDMEF_REFERENCE_ORIGIN_BUGTRAQID, "bugtraqid" }, { IDMEF_REFERENCE_ORIGIN_CVE, "cve" }, { IDMEF_REFERENCE_ORIGIN_OSVDB, "osvdb" }, }; prelude_return_val_if_fail(name, prelude_error(PRELUDE_ERROR_ASSERTION)); for ( i = 0; i < sizeof(tbl) / sizeof(*tbl); i++ ) { if ( strcasecmp(name, tbl[i].name) == 0 ) return tbl[i].val; } return prelude_error_verbose(PRELUDE_ERROR_IDMEF_UNKNOWN_ENUM_STRING, "Unknown enumeration value '%s' for reference_origin", name); } /** * idmef_reference_origin_to_string: * @val: an enumeration value for #idmef_reference_origin_t. * * Return the IDMEF string equivalent of @val provided #idmef_reference_origin_t value. * * Returns: a pointer to the string describing @val, or NULL if @val is invalid. */ const char *idmef_reference_origin_to_string(idmef_reference_origin_t val) { const struct { idmef_reference_origin_t val; const char *name; } tbl[] = { { IDMEF_REFERENCE_ORIGIN_UNKNOWN, "unknown" }, { IDMEF_REFERENCE_ORIGIN_VENDOR_SPECIFIC, "vendor-specific" }, { IDMEF_REFERENCE_ORIGIN_USER_SPECIFIC, "user-specific" }, { IDMEF_REFERENCE_ORIGIN_BUGTRAQID, "bugtraqid" }, { IDMEF_REFERENCE_ORIGIN_CVE, "cve" }, { IDMEF_REFERENCE_ORIGIN_OSVDB, "osvdb" }, }; if ( val < 0 || (size_t) val >= (sizeof(tbl) / sizeof(*tbl)) ) return NULL; return tbl[val].name; } struct idmef_reference { IS_LISTED; REFCOUNT; idmef_reference_origin_t origin; REQUIRED(prelude_string_t, *name); REQUIRED(prelude_string_t, *url); prelude_string_t *meaning; }; struct idmef_classification { REFCOUNT; prelude_string_t *ident; REQUIRED(prelude_string_t, *text); LISTED_OBJECT(reference_list, idmef_reference_t); }; /** * idmef_user_id_type_to_numeric: * @name: pointer to an IDMEF string representation of a #idmef_user_id_type_t value. * * Returns: the numeric equivalent of @name, or -1 if @name is not valid. */ idmef_user_id_type_t idmef_user_id_type_to_numeric(const char *name) { size_t i; const struct { idmef_user_id_type_t val; const char *name; } tbl[] = { { IDMEF_USER_ID_TYPE_ORIGINAL_USER, "original-user" }, { IDMEF_USER_ID_TYPE_CURRENT_USER, "current-user" }, { IDMEF_USER_ID_TYPE_TARGET_USER, "target-user" }, { IDMEF_USER_ID_TYPE_USER_PRIVS, "user-privs" }, { IDMEF_USER_ID_TYPE_CURRENT_GROUP, "current-group" }, { IDMEF_USER_ID_TYPE_GROUP_PRIVS, "group-privs" }, { IDMEF_USER_ID_TYPE_OTHER_PRIVS, "other-privs" }, }; prelude_return_val_if_fail(name, prelude_error(PRELUDE_ERROR_ASSERTION)); for ( i = 0; i < sizeof(tbl) / sizeof(*tbl); i++ ) { if ( strcasecmp(name, tbl[i].name) == 0 ) return tbl[i].val; } return prelude_error_verbose(PRELUDE_ERROR_IDMEF_UNKNOWN_ENUM_STRING, "Unknown enumeration value '%s' for user_id_type", name); } /** * idmef_user_id_type_to_string: * @val: an enumeration value for #idmef_user_id_type_t. * * Return the IDMEF string equivalent of @val provided #idmef_user_id_type_t value. * * Returns: a pointer to the string describing @val, or NULL if @val is invalid. */ const char *idmef_user_id_type_to_string(idmef_user_id_type_t val) { const struct { idmef_user_id_type_t val; const char *name; } tbl[] = { { IDMEF_USER_ID_TYPE_ORIGINAL_USER, "original-user" }, { IDMEF_USER_ID_TYPE_CURRENT_USER, "current-user" }, { IDMEF_USER_ID_TYPE_TARGET_USER, "target-user" }, { IDMEF_USER_ID_TYPE_USER_PRIVS, "user-privs" }, { IDMEF_USER_ID_TYPE_CURRENT_GROUP, "current-group" }, { IDMEF_USER_ID_TYPE_GROUP_PRIVS, "group-privs" }, { IDMEF_USER_ID_TYPE_OTHER_PRIVS, "other-privs" }, }; if ( val < 0 || (size_t) val >= (sizeof(tbl) / sizeof(*tbl)) ) return NULL; return tbl[val].name; } struct idmef_user_id { IS_LISTED; REFCOUNT; prelude_string_t *ident; idmef_user_id_type_t type; prelude_string_t *tty; prelude_string_t *name; OPTIONAL_INT(uint32_t, number); }; /** * idmef_user_category_to_numeric: * @name: pointer to an IDMEF string representation of a #idmef_user_category_t value. * * Returns: the numeric equivalent of @name, or -1 if @name is not valid. */ idmef_user_category_t idmef_user_category_to_numeric(const char *name) { size_t i; const struct { idmef_user_category_t val; const char *name; } tbl[] = { { IDMEF_USER_CATEGORY_UNKNOWN, "unknown" }, { IDMEF_USER_CATEGORY_APPLICATION, "application" }, { IDMEF_USER_CATEGORY_OS_DEVICE, "os-device" }, }; prelude_return_val_if_fail(name, prelude_error(PRELUDE_ERROR_ASSERTION)); for ( i = 0; i < sizeof(tbl) / sizeof(*tbl); i++ ) { if ( strcasecmp(name, tbl[i].name) == 0 ) return tbl[i].val; } return prelude_error_verbose(PRELUDE_ERROR_IDMEF_UNKNOWN_ENUM_STRING, "Unknown enumeration value '%s' for user_category", name); } /** * idmef_user_category_to_string: * @val: an enumeration value for #idmef_user_category_t. * * Return the IDMEF string equivalent of @val provided #idmef_user_category_t value. * * Returns: a pointer to the string describing @val, or NULL if @val is invalid. */ const char *idmef_user_category_to_string(idmef_user_category_t val) { const struct { idmef_user_category_t val; const char *name; } tbl[] = { { IDMEF_USER_CATEGORY_UNKNOWN, "unknown" }, { IDMEF_USER_CATEGORY_APPLICATION, "application" }, { IDMEF_USER_CATEGORY_OS_DEVICE, "os-device" }, }; if ( val < 0 || (size_t) val >= (sizeof(tbl) / sizeof(*tbl)) ) return NULL; return tbl[val].name; } struct idmef_user { REFCOUNT; prelude_string_t *ident; idmef_user_category_t category; LISTED_OBJECT(user_id_list, idmef_user_id_t); }; /** * idmef_address_category_to_numeric: * @name: pointer to an IDMEF string representation of a #idmef_address_category_t value. * * Returns: the numeric equivalent of @name, or -1 if @name is not valid. */ idmef_address_category_t idmef_address_category_to_numeric(const char *name) { size_t i; const struct { idmef_address_category_t val; const char *name; } tbl[] = { { IDMEF_ADDRESS_CATEGORY_UNKNOWN, "unknown" }, { IDMEF_ADDRESS_CATEGORY_ATM, "atm" }, { IDMEF_ADDRESS_CATEGORY_E_MAIL, "e-mail" }, { IDMEF_ADDRESS_CATEGORY_LOTUS_NOTES, "lotus-notes" }, { IDMEF_ADDRESS_CATEGORY_MAC, "mac" }, { IDMEF_ADDRESS_CATEGORY_SNA, "sna" }, { IDMEF_ADDRESS_CATEGORY_VM, "vm" }, { IDMEF_ADDRESS_CATEGORY_IPV4_ADDR, "ipv4-addr" }, { IDMEF_ADDRESS_CATEGORY_IPV4_ADDR_HEX, "ipv4-addr-hex" }, { IDMEF_ADDRESS_CATEGORY_IPV4_NET, "ipv4-net" }, { IDMEF_ADDRESS_CATEGORY_IPV4_NET_MASK, "ipv4-net-mask" }, { IDMEF_ADDRESS_CATEGORY_IPV6_ADDR, "ipv6-addr" }, { IDMEF_ADDRESS_CATEGORY_IPV6_ADDR_HEX, "ipv6-addr-hex" }, { IDMEF_ADDRESS_CATEGORY_IPV6_NET, "ipv6-net" }, { IDMEF_ADDRESS_CATEGORY_IPV6_NET_MASK, "ipv6-net-mask" }, }; prelude_return_val_if_fail(name, prelude_error(PRELUDE_ERROR_ASSERTION)); for ( i = 0; i < sizeof(tbl) / sizeof(*tbl); i++ ) { if ( strcasecmp(name, tbl[i].name) == 0 ) return tbl[i].val; } return prelude_error_verbose(PRELUDE_ERROR_IDMEF_UNKNOWN_ENUM_STRING, "Unknown enumeration value '%s' for address_category", name); } /** * idmef_address_category_to_string: * @val: an enumeration value for #idmef_address_category_t. * * Return the IDMEF string equivalent of @val provided #idmef_address_category_t value. * * Returns: a pointer to the string describing @val, or NULL if @val is invalid. */ const char *idmef_address_category_to_string(idmef_address_category_t val) { const struct { idmef_address_category_t val; const char *name; } tbl[] = { { IDMEF_ADDRESS_CATEGORY_UNKNOWN, "unknown" }, { IDMEF_ADDRESS_CATEGORY_ATM, "atm" }, { IDMEF_ADDRESS_CATEGORY_E_MAIL, "e-mail" }, { IDMEF_ADDRESS_CATEGORY_LOTUS_NOTES, "lotus-notes" }, { IDMEF_ADDRESS_CATEGORY_MAC, "mac" }, { IDMEF_ADDRESS_CATEGORY_SNA, "sna" }, { IDMEF_ADDRESS_CATEGORY_VM, "vm" }, { IDMEF_ADDRESS_CATEGORY_IPV4_ADDR, "ipv4-addr" }, { IDMEF_ADDRESS_CATEGORY_IPV4_ADDR_HEX, "ipv4-addr-hex" }, { IDMEF_ADDRESS_CATEGORY_IPV4_NET, "ipv4-net" }, { IDMEF_ADDRESS_CATEGORY_IPV4_NET_MASK, "ipv4-net-mask" }, { IDMEF_ADDRESS_CATEGORY_IPV6_ADDR, "ipv6-addr" }, { IDMEF_ADDRESS_CATEGORY_IPV6_ADDR_HEX, "ipv6-addr-hex" }, { IDMEF_ADDRESS_CATEGORY_IPV6_NET, "ipv6-net" }, { IDMEF_ADDRESS_CATEGORY_IPV6_NET_MASK, "ipv6-net-mask" }, }; if ( val < 0 || (size_t) val >= (sizeof(tbl) / sizeof(*tbl)) ) return NULL; return tbl[val].name; } struct idmef_address { IS_LISTED; REFCOUNT; prelude_string_t *ident; idmef_address_category_t category; prelude_string_t *vlan_name; OPTIONAL_INT(int32_t, vlan_num); REQUIRED(prelude_string_t, *address); prelude_string_t *netmask; }; struct idmef_process { REFCOUNT; prelude_string_t *ident; REQUIRED(prelude_string_t, *name); OPTIONAL_INT(uint32_t, pid); prelude_string_t *path; LISTED_OBJECT(arg_list, prelude_string_t); LISTED_OBJECT(env_list, prelude_string_t); }; struct idmef_web_service { REFCOUNT; REQUIRED(prelude_string_t, *url); prelude_string_t *cgi; prelude_string_t *http_method; LISTED_OBJECT(arg_list, prelude_string_t); }; struct idmef_snmp_service { REFCOUNT; prelude_string_t *oid; OPTIONAL_INT(uint32_t, message_processing_model); OPTIONAL_INT(uint32_t, security_model); prelude_string_t *security_name; OPTIONAL_INT(uint32_t, security_level); prelude_string_t *context_name; prelude_string_t *context_engine_id; prelude_string_t *command; prelude_string_t *community; }; /** * idmef_service_type_to_numeric: * @name: pointer to an IDMEF string representation of a #idmef_service_type_t value. * * Returns: the numeric equivalent of @name, or -1 if @name is not valid. */ idmef_service_type_t idmef_service_type_to_numeric(const char *name) { size_t i; const struct { idmef_service_type_t val; const char *name; } tbl[] = { { IDMEF_SERVICE_TYPE_DEFAULT, "default" }, { IDMEF_SERVICE_TYPE_WEB, "web" }, { IDMEF_SERVICE_TYPE_SNMP, "snmp" }, }; prelude_return_val_if_fail(name, prelude_error(PRELUDE_ERROR_ASSERTION)); for ( i = 0; i < sizeof(tbl) / sizeof(*tbl); i++ ) { if ( strcasecmp(name, tbl[i].name) == 0 ) return tbl[i].val; } return prelude_error_verbose(PRELUDE_ERROR_IDMEF_UNKNOWN_ENUM_STRING, "Unknown enumeration value '%s' for service_type", name); } /** * idmef_service_type_to_string: * @val: an enumeration value for #idmef_service_type_t. * * Return the IDMEF string equivalent of @val provided #idmef_service_type_t value. * * Returns: a pointer to the string describing @val, or NULL if @val is invalid. */ const char *idmef_service_type_to_string(idmef_service_type_t val) { const struct { idmef_service_type_t val; const char *name; } tbl[] = { { IDMEF_SERVICE_TYPE_DEFAULT, "default" }, { IDMEF_SERVICE_TYPE_WEB, "web" }, { IDMEF_SERVICE_TYPE_SNMP, "snmp" }, }; if ( val < 0 || (size_t) val >= (sizeof(tbl) / sizeof(*tbl)) ) return NULL; return tbl[val].name; } struct idmef_service { REFCOUNT; prelude_string_t *ident; OPTIONAL_INT(uint8_t, ip_version); OPTIONAL_INT(uint8_t, iana_protocol_number); prelude_string_t *iana_protocol_name; prelude_string_t *name; OPTIONAL_INT(uint16_t, port); prelude_string_t *portlist; prelude_string_t *protocol; UNION(idmef_service_type_t, type) { UNION_MEMBER(IDMEF_SERVICE_TYPE_WEB, idmef_web_service_t, *web_service); UNION_MEMBER(IDMEF_SERVICE_TYPE_SNMP, idmef_snmp_service_t, *snmp_service); } specific; }; /** * idmef_node_category_to_numeric: * @name: pointer to an IDMEF string representation of a #idmef_node_category_t value. * * Returns: the numeric equivalent of @name, or -1 if @name is not valid. */ idmef_node_category_t idmef_node_category_to_numeric(const char *name) { size_t i; const struct { idmef_node_category_t val; const char *name; } tbl[] = { { IDMEF_NODE_CATEGORY_UNKNOWN, "unknown" }, { IDMEF_NODE_CATEGORY_ADS, "ads" }, { IDMEF_NODE_CATEGORY_AFS, "afs" }, { IDMEF_NODE_CATEGORY_CODA, "coda" }, { IDMEF_NODE_CATEGORY_DFS, "dfs" }, { IDMEF_NODE_CATEGORY_DNS, "dns" }, { IDMEF_NODE_CATEGORY_HOSTS, "hosts" }, { IDMEF_NODE_CATEGORY_KERBEROS, "kerberos" }, { IDMEF_NODE_CATEGORY_NDS, "nds" }, { IDMEF_NODE_CATEGORY_NIS, "nis" }, { IDMEF_NODE_CATEGORY_NISPLUS, "nisplus" }, { IDMEF_NODE_CATEGORY_NT, "nt" }, { IDMEF_NODE_CATEGORY_WFW, "wfw" }, }; prelude_return_val_if_fail(name, prelude_error(PRELUDE_ERROR_ASSERTION)); for ( i = 0; i < sizeof(tbl) / sizeof(*tbl); i++ ) { if ( strcasecmp(name, tbl[i].name) == 0 ) return tbl[i].val; } return prelude_error_verbose(PRELUDE_ERROR_IDMEF_UNKNOWN_ENUM_STRING, "Unknown enumeration value '%s' for node_category", name); } /** * idmef_node_category_to_string: * @val: an enumeration value for #idmef_node_category_t. * * Return the IDMEF string equivalent of @val provided #idmef_node_category_t value. * * Returns: a pointer to the string describing @val, or NULL if @val is invalid. */ const char *idmef_node_category_to_string(idmef_node_category_t val) { const struct { idmef_node_category_t val; const char *name; } tbl[] = { { IDMEF_NODE_CATEGORY_UNKNOWN, "unknown" }, { IDMEF_NODE_CATEGORY_ADS, "ads" }, { IDMEF_NODE_CATEGORY_AFS, "afs" }, { IDMEF_NODE_CATEGORY_CODA, "coda" }, { IDMEF_NODE_CATEGORY_DFS, "dfs" }, { IDMEF_NODE_CATEGORY_DNS, "dns" }, { IDMEF_NODE_CATEGORY_HOSTS, "hosts" }, { IDMEF_NODE_CATEGORY_KERBEROS, "kerberos" }, { IDMEF_NODE_CATEGORY_NDS, "nds" }, { IDMEF_NODE_CATEGORY_NIS, "nis" }, { IDMEF_NODE_CATEGORY_NISPLUS, "nisplus" }, { IDMEF_NODE_CATEGORY_NT, "nt" }, { IDMEF_NODE_CATEGORY_WFW, "wfw" }, }; if ( val < 0 || (size_t) val >= (sizeof(tbl) / sizeof(*tbl)) ) return NULL; return tbl[val].name; } struct idmef_node { REFCOUNT; prelude_string_t *ident; idmef_node_category_t category; prelude_string_t *location; prelude_string_t *name; LISTED_OBJECT(address_list, idmef_address_t); }; /** * idmef_source_spoofed_to_numeric: * @name: pointer to an IDMEF string representation of a #idmef_source_spoofed_t value. * * Returns: the numeric equivalent of @name, or -1 if @name is not valid. */ idmef_source_spoofed_t idmef_source_spoofed_to_numeric(const char *name) { size_t i; const struct { idmef_source_spoofed_t val; const char *name; } tbl[] = { { IDMEF_SOURCE_SPOOFED_UNKNOWN, "unknown" }, { IDMEF_SOURCE_SPOOFED_YES, "yes" }, { IDMEF_SOURCE_SPOOFED_NO, "no" }, }; prelude_return_val_if_fail(name, prelude_error(PRELUDE_ERROR_ASSERTION)); for ( i = 0; i < sizeof(tbl) / sizeof(*tbl); i++ ) { if ( strcasecmp(name, tbl[i].name) == 0 ) return tbl[i].val; } return prelude_error_verbose(PRELUDE_ERROR_IDMEF_UNKNOWN_ENUM_STRING, "Unknown enumeration value '%s' for source_spoofed", name); } /** * idmef_source_spoofed_to_string: * @val: an enumeration value for #idmef_source_spoofed_t. * * Return the IDMEF string equivalent of @val provided #idmef_source_spoofed_t value. * * Returns: a pointer to the string describing @val, or NULL if @val is invalid. */ const char *idmef_source_spoofed_to_string(idmef_source_spoofed_t val) { const struct { idmef_source_spoofed_t val; const char *name; } tbl[] = { { IDMEF_SOURCE_SPOOFED_UNKNOWN, "unknown" }, { IDMEF_SOURCE_SPOOFED_YES, "yes" }, { IDMEF_SOURCE_SPOOFED_NO, "no" }, }; if ( val < 0 || (size_t) val >= (sizeof(tbl) / sizeof(*tbl)) ) return NULL; return tbl[val].name; } struct idmef_source { IS_LISTED; REFCOUNT; prelude_string_t *ident; idmef_source_spoofed_t spoofed; prelude_string_t *interface; idmef_node_t *node; idmef_user_t *user; idmef_process_t *process; idmef_service_t *service; }; struct idmef_file_access { IS_LISTED; REFCOUNT; REQUIRED(idmef_user_id_t, *user_id); LISTED_OBJECT(permission_list, prelude_string_t); }; struct idmef_inode { REFCOUNT; idmef_time_t *change_time; OPTIONAL_INT(uint32_t, number); OPTIONAL_INT(uint32_t, major_device); OPTIONAL_INT(uint32_t, minor_device); OPTIONAL_INT(uint32_t, c_major_device); OPTIONAL_INT(uint32_t, c_minor_device); }; /** * idmef_checksum_algorithm_to_numeric: * @name: pointer to an IDMEF string representation of a #idmef_checksum_algorithm_t value. * * Returns: the numeric equivalent of @name, or -1 if @name is not valid. */ idmef_checksum_algorithm_t idmef_checksum_algorithm_to_numeric(const char *name) { size_t i; const struct { idmef_checksum_algorithm_t val; const char *name; } tbl[] = { { IDMEF_CHECKSUM_ALGORITHM_MD4, "MD4" }, { IDMEF_CHECKSUM_ALGORITHM_MD5, "MD5" }, { IDMEF_CHECKSUM_ALGORITHM_SHA1, "SHA1" }, { IDMEF_CHECKSUM_ALGORITHM_SHA2_256, "SHA2-256" }, { IDMEF_CHECKSUM_ALGORITHM_SHA2_384, "SHA2-384" }, { IDMEF_CHECKSUM_ALGORITHM_SHA2_512, "SHA2-512" }, { IDMEF_CHECKSUM_ALGORITHM_CRC_32, "CRC-32" }, { IDMEF_CHECKSUM_ALGORITHM_HAVAL, "Haval" }, { IDMEF_CHECKSUM_ALGORITHM_TIGER, "Tiger" }, { IDMEF_CHECKSUM_ALGORITHM_GOST, "Gost" }, }; prelude_return_val_if_fail(name, prelude_error(PRELUDE_ERROR_ASSERTION)); for ( i = 0; i < sizeof(tbl) / sizeof(*tbl); i++ ) { if ( strcasecmp(name, tbl[i].name) == 0 ) return tbl[i].val; } return prelude_error_verbose(PRELUDE_ERROR_IDMEF_UNKNOWN_ENUM_STRING, "Unknown enumeration value '%s' for checksum_algorithm", name); } /** * idmef_checksum_algorithm_to_string: * @val: an enumeration value for #idmef_checksum_algorithm_t. * * Return the IDMEF string equivalent of @val provided #idmef_checksum_algorithm_t value. * * Returns: a pointer to the string describing @val, or NULL if @val is invalid. */ const char *idmef_checksum_algorithm_to_string(idmef_checksum_algorithm_t val) { const struct { idmef_checksum_algorithm_t val; const char *name; } tbl[] = {{ 0, NULL }, { IDMEF_CHECKSUM_ALGORITHM_MD4, "MD4" }, { IDMEF_CHECKSUM_ALGORITHM_MD5, "MD5" }, { IDMEF_CHECKSUM_ALGORITHM_SHA1, "SHA1" }, { IDMEF_CHECKSUM_ALGORITHM_SHA2_256, "SHA2-256" }, { IDMEF_CHECKSUM_ALGORITHM_SHA2_384, "SHA2-384" }, { IDMEF_CHECKSUM_ALGORITHM_SHA2_512, "SHA2-512" }, { IDMEF_CHECKSUM_ALGORITHM_CRC_32, "CRC-32" }, { IDMEF_CHECKSUM_ALGORITHM_HAVAL, "Haval" }, { IDMEF_CHECKSUM_ALGORITHM_TIGER, "Tiger" }, { IDMEF_CHECKSUM_ALGORITHM_GOST, "Gost" }, }; if ( val < 0 || (size_t) val >= (sizeof(tbl) / sizeof(*tbl)) ) return NULL; return tbl[val].name; } struct idmef_checksum { IS_LISTED; REFCOUNT; REQUIRED(prelude_string_t, *value); prelude_string_t *key; idmef_checksum_algorithm_t algorithm; }; /** * idmef_file_category_to_numeric: * @name: pointer to an IDMEF string representation of a #idmef_file_category_t value. * * Returns: the numeric equivalent of @name, or -1 if @name is not valid. */ idmef_file_category_t idmef_file_category_to_numeric(const char *name) { size_t i; const struct { idmef_file_category_t val; const char *name; } tbl[] = { { IDMEF_FILE_CATEGORY_CURRENT, "current" }, { IDMEF_FILE_CATEGORY_ORIGINAL, "original" }, }; prelude_return_val_if_fail(name, prelude_error(PRELUDE_ERROR_ASSERTION)); for ( i = 0; i < sizeof(tbl) / sizeof(*tbl); i++ ) { if ( strcasecmp(name, tbl[i].name) == 0 ) return tbl[i].val; } return prelude_error_verbose(PRELUDE_ERROR_IDMEF_UNKNOWN_ENUM_STRING, "Unknown enumeration value '%s' for file_category", name); } /** * idmef_file_category_to_string: * @val: an enumeration value for #idmef_file_category_t. * * Return the IDMEF string equivalent of @val provided #idmef_file_category_t value. * * Returns: a pointer to the string describing @val, or NULL if @val is invalid. */ const char *idmef_file_category_to_string(idmef_file_category_t val) { const struct { idmef_file_category_t val; const char *name; } tbl[] = {{ 0, NULL }, { IDMEF_FILE_CATEGORY_CURRENT, "current" }, { IDMEF_FILE_CATEGORY_ORIGINAL, "original" }, }; if ( val < 0 || (size_t) val >= (sizeof(tbl) / sizeof(*tbl)) ) return NULL; return tbl[val].name; } /** * idmef_file_fstype_to_numeric: * @name: pointer to an IDMEF string representation of a #idmef_file_fstype_t value. * * Returns: the numeric equivalent of @name, or -1 if @name is not valid. */ idmef_file_fstype_t idmef_file_fstype_to_numeric(const char *name) { size_t i; const struct { idmef_file_fstype_t val; const char *name; } tbl[] = { { IDMEF_FILE_FSTYPE_UFS, "ufs" }, { IDMEF_FILE_FSTYPE_EFS, "efs" }, { IDMEF_FILE_FSTYPE_NFS, "nfs" }, { IDMEF_FILE_FSTYPE_AFS, "afs" }, { IDMEF_FILE_FSTYPE_NTFS, "ntfs" }, { IDMEF_FILE_FSTYPE_FAT16, "fat16" }, { IDMEF_FILE_FSTYPE_FAT32, "fat32" }, { IDMEF_FILE_FSTYPE_PCFS, "pcfs" }, { IDMEF_FILE_FSTYPE_JOLIET, "joliet" }, { IDMEF_FILE_FSTYPE_ISO9660, "iso9660" }, }; prelude_return_val_if_fail(name, prelude_error(PRELUDE_ERROR_ASSERTION)); for ( i = 0; i < sizeof(tbl) / sizeof(*tbl); i++ ) { if ( strcasecmp(name, tbl[i].name) == 0 ) return tbl[i].val; } return prelude_error_verbose(PRELUDE_ERROR_IDMEF_UNKNOWN_ENUM_STRING, "Unknown enumeration value '%s' for file_fstype", name); } /** * idmef_file_fstype_to_string: * @val: an enumeration value for #idmef_file_fstype_t. * * Return the IDMEF string equivalent of @val provided #idmef_file_fstype_t value. * * Returns: a pointer to the string describing @val, or NULL if @val is invalid. */ const char *idmef_file_fstype_to_string(idmef_file_fstype_t val) { const struct { idmef_file_fstype_t val; const char *name; } tbl[] = {{ 0, NULL }, { IDMEF_FILE_FSTYPE_UFS, "ufs" }, { IDMEF_FILE_FSTYPE_EFS, "efs" }, { IDMEF_FILE_FSTYPE_NFS, "nfs" }, { IDMEF_FILE_FSTYPE_AFS, "afs" }, { IDMEF_FILE_FSTYPE_NTFS, "ntfs" }, { IDMEF_FILE_FSTYPE_FAT16, "fat16" }, { IDMEF_FILE_FSTYPE_FAT32, "fat32" }, { IDMEF_FILE_FSTYPE_PCFS, "pcfs" }, { IDMEF_FILE_FSTYPE_JOLIET, "joliet" }, { IDMEF_FILE_FSTYPE_ISO9660, "iso9660" }, }; if ( val < 0 || (size_t) val >= (sizeof(tbl) / sizeof(*tbl)) ) return NULL; return tbl[val].name; } struct idmef_file { IS_LISTED; REFCOUNT; prelude_string_t *ident; REQUIRED(prelude_string_t, *name); REQUIRED(prelude_string_t, *path); idmef_time_t *create_time; idmef_time_t *modify_time; idmef_time_t *access_time; OPTIONAL_INT(uint64_t, data_size); OPTIONAL_INT(uint64_t, disk_size); LISTED_OBJECT(file_access_list, idmef_file_access_t); LISTED_OBJECT(linkage_list, idmef_linkage_t); idmef_inode_t *inode; LISTED_OBJECT(checksum_list, idmef_checksum_t); idmef_file_category_t category; OPTIONAL_INT(idmef_file_fstype_t, fstype); prelude_string_t *file_type; }; /** * idmef_linkage_category_to_numeric: * @name: pointer to an IDMEF string representation of a #idmef_linkage_category_t value. * * Returns: the numeric equivalent of @name, or -1 if @name is not valid. */ idmef_linkage_category_t idmef_linkage_category_to_numeric(const char *name) { size_t i; const struct { idmef_linkage_category_t val; const char *name; } tbl[] = { { IDMEF_LINKAGE_CATEGORY_HARD_LINK, "hard-link" }, { IDMEF_LINKAGE_CATEGORY_MOUNT_POINT, "mount-point" }, { IDMEF_LINKAGE_CATEGORY_REPARSE_POINT, "reparse-point" }, { IDMEF_LINKAGE_CATEGORY_SHORTCUT, "shortcut" }, { IDMEF_LINKAGE_CATEGORY_STREAM, "stream" }, { IDMEF_LINKAGE_CATEGORY_SYMBOLIC_LINK, "symbolic-link" }, }; prelude_return_val_if_fail(name, prelude_error(PRELUDE_ERROR_ASSERTION)); for ( i = 0; i < sizeof(tbl) / sizeof(*tbl); i++ ) { if ( strcasecmp(name, tbl[i].name) == 0 ) return tbl[i].val; } return prelude_error_verbose(PRELUDE_ERROR_IDMEF_UNKNOWN_ENUM_STRING, "Unknown enumeration value '%s' for linkage_category", name); } /** * idmef_linkage_category_to_string: * @val: an enumeration value for #idmef_linkage_category_t. * * Return the IDMEF string equivalent of @val provided #idmef_linkage_category_t value. * * Returns: a pointer to the string describing @val, or NULL if @val is invalid. */ const char *idmef_linkage_category_to_string(idmef_linkage_category_t val) { const struct { idmef_linkage_category_t val; const char *name; } tbl[] = {{ 0, NULL }, { IDMEF_LINKAGE_CATEGORY_HARD_LINK, "hard-link" }, { IDMEF_LINKAGE_CATEGORY_MOUNT_POINT, "mount-point" }, { IDMEF_LINKAGE_CATEGORY_REPARSE_POINT, "reparse-point" }, { IDMEF_LINKAGE_CATEGORY_SHORTCUT, "shortcut" }, { IDMEF_LINKAGE_CATEGORY_STREAM, "stream" }, { IDMEF_LINKAGE_CATEGORY_SYMBOLIC_LINK, "symbolic-link" }, }; if ( val < 0 || (size_t) val >= (sizeof(tbl) / sizeof(*tbl)) ) return NULL; return tbl[val].name; } struct idmef_linkage { IS_LISTED; REFCOUNT; idmef_linkage_category_t category; REQUIRED(prelude_string_t, *name); REQUIRED(prelude_string_t, *path); REQUIRED(idmef_file_t, *file); }; /** * idmef_target_decoy_to_numeric: * @name: pointer to an IDMEF string representation of a #idmef_target_decoy_t value. * * Returns: the numeric equivalent of @name, or -1 if @name is not valid. */ idmef_target_decoy_t idmef_target_decoy_to_numeric(const char *name) { size_t i; const struct { idmef_target_decoy_t val; const char *name; } tbl[] = { { IDMEF_TARGET_DECOY_UNKNOWN, "unknown" }, { IDMEF_TARGET_DECOY_YES, "yes" }, { IDMEF_TARGET_DECOY_NO, "no" }, }; prelude_return_val_if_fail(name, prelude_error(PRELUDE_ERROR_ASSERTION)); for ( i = 0; i < sizeof(tbl) / sizeof(*tbl); i++ ) { if ( strcasecmp(name, tbl[i].name) == 0 ) return tbl[i].val; } return prelude_error_verbose(PRELUDE_ERROR_IDMEF_UNKNOWN_ENUM_STRING, "Unknown enumeration value '%s' for target_decoy", name); } /** * idmef_target_decoy_to_string: * @val: an enumeration value for #idmef_target_decoy_t. * * Return the IDMEF string equivalent of @val provided #idmef_target_decoy_t value. * * Returns: a pointer to the string describing @val, or NULL if @val is invalid. */ const char *idmef_target_decoy_to_string(idmef_target_decoy_t val) { const struct { idmef_target_decoy_t val; const char *name; } tbl[] = { { IDMEF_TARGET_DECOY_UNKNOWN, "unknown" }, { IDMEF_TARGET_DECOY_YES, "yes" }, { IDMEF_TARGET_DECOY_NO, "no" }, }; if ( val < 0 || (size_t) val >= (sizeof(tbl) / sizeof(*tbl)) ) return NULL; return tbl[val].name; } struct idmef_target { IS_LISTED; REFCOUNT; prelude_string_t *ident; idmef_target_decoy_t decoy; prelude_string_t *interface; idmef_node_t *node; idmef_user_t *user; idmef_process_t *process; idmef_service_t *service; LISTED_OBJECT(file_list, idmef_file_t); }; struct idmef_analyzer { IS_LISTED; REFCOUNT; prelude_string_t *analyzerid; prelude_string_t *name; prelude_string_t *manufacturer; prelude_string_t *model; prelude_string_t *version; prelude_string_t *class; prelude_string_t *ostype; prelude_string_t *osversion; idmef_node_t *node; idmef_process_t *process; }; struct idmef_alertident { IS_LISTED; REFCOUNT; REQUIRED(prelude_string_t, *alertident); prelude_string_t *analyzerid; }; /** * idmef_impact_severity_to_numeric: * @name: pointer to an IDMEF string representation of a #idmef_impact_severity_t value. * * Returns: the numeric equivalent of @name, or -1 if @name is not valid. */ idmef_impact_severity_t idmef_impact_severity_to_numeric(const char *name) { size_t i; const struct { idmef_impact_severity_t val; const char *name; } tbl[] = { { IDMEF_IMPACT_SEVERITY_INFO, "info" }, { IDMEF_IMPACT_SEVERITY_LOW, "low" }, { IDMEF_IMPACT_SEVERITY_MEDIUM, "medium" }, { IDMEF_IMPACT_SEVERITY_HIGH, "high" }, }; prelude_return_val_if_fail(name, prelude_error(PRELUDE_ERROR_ASSERTION)); for ( i = 0; i < sizeof(tbl) / sizeof(*tbl); i++ ) { if ( strcasecmp(name, tbl[i].name) == 0 ) return tbl[i].val; } return prelude_error_verbose(PRELUDE_ERROR_IDMEF_UNKNOWN_ENUM_STRING, "Unknown enumeration value '%s' for impact_severity", name); } /** * idmef_impact_severity_to_string: * @val: an enumeration value for #idmef_impact_severity_t. * * Return the IDMEF string equivalent of @val provided #idmef_impact_severity_t value. * * Returns: a pointer to the string describing @val, or NULL if @val is invalid. */ const char *idmef_impact_severity_to_string(idmef_impact_severity_t val) { const struct { idmef_impact_severity_t val; const char *name; } tbl[] = {{ 0, NULL }, { IDMEF_IMPACT_SEVERITY_INFO, "info" }, { IDMEF_IMPACT_SEVERITY_LOW, "low" }, { IDMEF_IMPACT_SEVERITY_MEDIUM, "medium" }, { IDMEF_IMPACT_SEVERITY_HIGH, "high" }, }; if ( val < 0 || (size_t) val >= (sizeof(tbl) / sizeof(*tbl)) ) return NULL; return tbl[val].name; } /** * idmef_impact_completion_to_numeric: * @name: pointer to an IDMEF string representation of a #idmef_impact_completion_t value. * * Returns: the numeric equivalent of @name, or -1 if @name is not valid. */ idmef_impact_completion_t idmef_impact_completion_to_numeric(const char *name) { size_t i; const struct { idmef_impact_completion_t val; const char *name; } tbl[] = { { IDMEF_IMPACT_COMPLETION_FAILED, "failed" }, { IDMEF_IMPACT_COMPLETION_SUCCEEDED, "succeeded" }, }; prelude_return_val_if_fail(name, prelude_error(PRELUDE_ERROR_ASSERTION)); for ( i = 0; i < sizeof(tbl) / sizeof(*tbl); i++ ) { if ( strcasecmp(name, tbl[i].name) == 0 ) return tbl[i].val; } return prelude_error_verbose(PRELUDE_ERROR_IDMEF_UNKNOWN_ENUM_STRING, "Unknown enumeration value '%s' for impact_completion", name); } /** * idmef_impact_completion_to_string: * @val: an enumeration value for #idmef_impact_completion_t. * * Return the IDMEF string equivalent of @val provided #idmef_impact_completion_t value. * * Returns: a pointer to the string describing @val, or NULL if @val is invalid. */ const char *idmef_impact_completion_to_string(idmef_impact_completion_t val) { const struct { idmef_impact_completion_t val; const char *name; } tbl[] = {{ 0, NULL }, { IDMEF_IMPACT_COMPLETION_FAILED, "failed" }, { IDMEF_IMPACT_COMPLETION_SUCCEEDED, "succeeded" }, }; if ( val < 0 || (size_t) val >= (sizeof(tbl) / sizeof(*tbl)) ) return NULL; return tbl[val].name; } /** * idmef_impact_type_to_numeric: * @name: pointer to an IDMEF string representation of a #idmef_impact_type_t value. * * Returns: the numeric equivalent of @name, or -1 if @name is not valid. */ idmef_impact_type_t idmef_impact_type_to_numeric(const char *name) { size_t i; const struct { idmef_impact_type_t val; const char *name; } tbl[] = { { IDMEF_IMPACT_TYPE_OTHER, "other" }, { IDMEF_IMPACT_TYPE_ADMIN, "admin" }, { IDMEF_IMPACT_TYPE_DOS, "dos" }, { IDMEF_IMPACT_TYPE_FILE, "file" }, { IDMEF_IMPACT_TYPE_RECON, "recon" }, { IDMEF_IMPACT_TYPE_USER, "user" }, }; prelude_return_val_if_fail(name, prelude_error(PRELUDE_ERROR_ASSERTION)); for ( i = 0; i < sizeof(tbl) / sizeof(*tbl); i++ ) { if ( strcasecmp(name, tbl[i].name) == 0 ) return tbl[i].val; } return prelude_error_verbose(PRELUDE_ERROR_IDMEF_UNKNOWN_ENUM_STRING, "Unknown enumeration value '%s' for impact_type", name); } /** * idmef_impact_type_to_string: * @val: an enumeration value for #idmef_impact_type_t. * * Return the IDMEF string equivalent of @val provided #idmef_impact_type_t value. * * Returns: a pointer to the string describing @val, or NULL if @val is invalid. */ const char *idmef_impact_type_to_string(idmef_impact_type_t val) { const struct { idmef_impact_type_t val; const char *name; } tbl[] = { { IDMEF_IMPACT_TYPE_OTHER, "other" }, { IDMEF_IMPACT_TYPE_ADMIN, "admin" }, { IDMEF_IMPACT_TYPE_DOS, "dos" }, { IDMEF_IMPACT_TYPE_FILE, "file" }, { IDMEF_IMPACT_TYPE_RECON, "recon" }, { IDMEF_IMPACT_TYPE_USER, "user" }, }; if ( val < 0 || (size_t) val >= (sizeof(tbl) / sizeof(*tbl)) ) return NULL; return tbl[val].name; } struct idmef_impact { REFCOUNT; OPTIONAL_INT(idmef_impact_severity_t, severity); OPTIONAL_INT(idmef_impact_completion_t, completion); idmef_impact_type_t type; prelude_string_t *description; }; /** * idmef_action_category_to_numeric: * @name: pointer to an IDMEF string representation of a #idmef_action_category_t value. * * Returns: the numeric equivalent of @name, or -1 if @name is not valid. */ idmef_action_category_t idmef_action_category_to_numeric(const char *name) { size_t i; const struct { idmef_action_category_t val; const char *name; } tbl[] = { { IDMEF_ACTION_CATEGORY_OTHER, "other" }, { IDMEF_ACTION_CATEGORY_BLOCK_INSTALLED, "block-installed" }, { IDMEF_ACTION_CATEGORY_NOTIFICATION_SENT, "notification-sent" }, { IDMEF_ACTION_CATEGORY_TAKEN_OFFLINE, "taken-offline" }, }; prelude_return_val_if_fail(name, prelude_error(PRELUDE_ERROR_ASSERTION)); for ( i = 0; i < sizeof(tbl) / sizeof(*tbl); i++ ) { if ( strcasecmp(name, tbl[i].name) == 0 ) return tbl[i].val; } return prelude_error_verbose(PRELUDE_ERROR_IDMEF_UNKNOWN_ENUM_STRING, "Unknown enumeration value '%s' for action_category", name); } /** * idmef_action_category_to_string: * @val: an enumeration value for #idmef_action_category_t. * * Return the IDMEF string equivalent of @val provided #idmef_action_category_t value. * * Returns: a pointer to the string describing @val, or NULL if @val is invalid. */ const char *idmef_action_category_to_string(idmef_action_category_t val) { const struct { idmef_action_category_t val; const char *name; } tbl[] = { { IDMEF_ACTION_CATEGORY_OTHER, "other" }, { IDMEF_ACTION_CATEGORY_BLOCK_INSTALLED, "block-installed" }, { IDMEF_ACTION_CATEGORY_NOTIFICATION_SENT, "notification-sent" }, { IDMEF_ACTION_CATEGORY_TAKEN_OFFLINE, "taken-offline" }, }; if ( val < 0 || (size_t) val >= (sizeof(tbl) / sizeof(*tbl)) ) return NULL; return tbl[val].name; } struct idmef_action { IS_LISTED; REFCOUNT; idmef_action_category_t category; prelude_string_t *description; }; /** * idmef_confidence_rating_to_numeric: * @name: pointer to an IDMEF string representation of a #idmef_confidence_rating_t value. * * Returns: the numeric equivalent of @name, or -1 if @name is not valid. */ idmef_confidence_rating_t idmef_confidence_rating_to_numeric(const char *name) { size_t i; const struct { idmef_confidence_rating_t val; const char *name; } tbl[] = { { IDMEF_CONFIDENCE_RATING_NUMERIC, "numeric" }, { IDMEF_CONFIDENCE_RATING_LOW, "low" }, { IDMEF_CONFIDENCE_RATING_MEDIUM, "medium" }, { IDMEF_CONFIDENCE_RATING_HIGH, "high" }, }; prelude_return_val_if_fail(name, prelude_error(PRELUDE_ERROR_ASSERTION)); for ( i = 0; i < sizeof(tbl) / sizeof(*tbl); i++ ) { if ( strcasecmp(name, tbl[i].name) == 0 ) return tbl[i].val; } return prelude_error_verbose(PRELUDE_ERROR_IDMEF_UNKNOWN_ENUM_STRING, "Unknown enumeration value '%s' for confidence_rating", name); } /** * idmef_confidence_rating_to_string: * @val: an enumeration value for #idmef_confidence_rating_t. * * Return the IDMEF string equivalent of @val provided #idmef_confidence_rating_t value. * * Returns: a pointer to the string describing @val, or NULL if @val is invalid. */ const char *idmef_confidence_rating_to_string(idmef_confidence_rating_t val) { const struct { idmef_confidence_rating_t val; const char *name; } tbl[] = { { IDMEF_CONFIDENCE_RATING_NUMERIC, "numeric" }, { IDMEF_CONFIDENCE_RATING_LOW, "low" }, { IDMEF_CONFIDENCE_RATING_MEDIUM, "medium" }, { IDMEF_CONFIDENCE_RATING_HIGH, "high" }, }; if ( val < 0 || (size_t) val >= (sizeof(tbl) / sizeof(*tbl)) ) return NULL; return tbl[val].name; } struct idmef_confidence { REFCOUNT; idmef_confidence_rating_t rating; float confidence; }; struct idmef_assessment { REFCOUNT; idmef_impact_t *impact; LISTED_OBJECT(action_list, idmef_action_t); idmef_confidence_t *confidence; }; struct idmef_tool_alert { REFCOUNT; REQUIRED(prelude_string_t, *name); prelude_string_t *command; LISTED_OBJECT(alertident_list, idmef_alertident_t); }; struct idmef_correlation_alert { REFCOUNT; REQUIRED(prelude_string_t, *name); LISTED_OBJECT(alertident_list, idmef_alertident_t); }; struct idmef_overflow_alert { REFCOUNT; REQUIRED(prelude_string_t, *program); OPTIONAL_INT(uint32_t, size); idmef_data_t *buffer; }; /** * idmef_alert_type_to_numeric: * @name: pointer to an IDMEF string representation of a #idmef_alert_type_t value. * * Returns: the numeric equivalent of @name, or -1 if @name is not valid. */ idmef_alert_type_t idmef_alert_type_to_numeric(const char *name) { size_t i; const struct { idmef_alert_type_t val; const char *name; } tbl[] = { { IDMEF_ALERT_TYPE_DEFAULT, "default" }, { IDMEF_ALERT_TYPE_TOOL, "tool" }, { IDMEF_ALERT_TYPE_CORRELATION, "correlation" }, { IDMEF_ALERT_TYPE_OVERFLOW, "overflow" }, }; prelude_return_val_if_fail(name, prelude_error(PRELUDE_ERROR_ASSERTION)); for ( i = 0; i < sizeof(tbl) / sizeof(*tbl); i++ ) { if ( strcasecmp(name, tbl[i].name) == 0 ) return tbl[i].val; } return prelude_error_verbose(PRELUDE_ERROR_IDMEF_UNKNOWN_ENUM_STRING, "Unknown enumeration value '%s' for alert_type", name); } /** * idmef_alert_type_to_string: * @val: an enumeration value for #idmef_alert_type_t. * * Return the IDMEF string equivalent of @val provided #idmef_alert_type_t value. * * Returns: a pointer to the string describing @val, or NULL if @val is invalid. */ const char *idmef_alert_type_to_string(idmef_alert_type_t val) { const struct { idmef_alert_type_t val; const char *name; } tbl[] = { { IDMEF_ALERT_TYPE_DEFAULT, "default" }, { IDMEF_ALERT_TYPE_TOOL, "tool" }, { IDMEF_ALERT_TYPE_CORRELATION, "correlation" }, { IDMEF_ALERT_TYPE_OVERFLOW, "overflow" }, }; if ( val < 0 || (size_t) val >= (sizeof(tbl) / sizeof(*tbl)) ) return NULL; return tbl[val].name; } struct idmef_alert { REFCOUNT; prelude_string_t *messageid; LISTED_OBJECT(analyzer_list, idmef_analyzer_t); REQUIRED(idmef_time_t, *create_time); REQUIRED(idmef_classification_t, *classification); idmef_time_t *detect_time; idmef_time_t *analyzer_time; LISTED_OBJECT(source_list, idmef_source_t); LISTED_OBJECT(target_list, idmef_target_t); idmef_assessment_t *assessment; LISTED_OBJECT(additional_data_list, idmef_additional_data_t); UNION(idmef_alert_type_t, type) { UNION_MEMBER(IDMEF_ALERT_TYPE_TOOL, idmef_tool_alert_t, *tool_alert); UNION_MEMBER(IDMEF_ALERT_TYPE_CORRELATION, idmef_correlation_alert_t, *correlation_alert); UNION_MEMBER(IDMEF_ALERT_TYPE_OVERFLOW, idmef_overflow_alert_t, *overflow_alert); } detail; }; struct idmef_heartbeat { REFCOUNT; prelude_string_t *messageid; LISTED_OBJECT(analyzer_list, idmef_analyzer_t); REQUIRED(idmef_time_t, *create_time); idmef_time_t *analyzer_time; OPTIONAL_INT(uint32_t, heartbeat_interval); LISTED_OBJECT(additional_data_list, idmef_additional_data_t); }; /** * idmef_message_type_to_numeric: * @name: pointer to an IDMEF string representation of a #idmef_message_type_t value. * * Returns: the numeric equivalent of @name, or -1 if @name is not valid. */ idmef_message_type_t idmef_message_type_to_numeric(const char *name) { size_t i; const struct { idmef_message_type_t val; const char *name; } tbl[] = { { IDMEF_MESSAGE_TYPE_ALERT, "alert" }, { IDMEF_MESSAGE_TYPE_HEARTBEAT, "heartbeat" }, }; prelude_return_val_if_fail(name, prelude_error(PRELUDE_ERROR_ASSERTION)); for ( i = 0; i < sizeof(tbl) / sizeof(*tbl); i++ ) { if ( strcasecmp(name, tbl[i].name) == 0 ) return tbl[i].val; } return prelude_error_verbose(PRELUDE_ERROR_IDMEF_UNKNOWN_ENUM_STRING, "Unknown enumeration value '%s' for message_type", name); } /** * idmef_message_type_to_string: * @val: an enumeration value for #idmef_message_type_t. * * Return the IDMEF string equivalent of @val provided #idmef_message_type_t value. * * Returns: a pointer to the string describing @val, or NULL if @val is invalid. */ const char *idmef_message_type_to_string(idmef_message_type_t val) { const struct { idmef_message_type_t val; const char *name; } tbl[] = {{ 0, NULL }, { IDMEF_MESSAGE_TYPE_ALERT, "alert" }, { IDMEF_MESSAGE_TYPE_HEARTBEAT, "heartbeat" }, }; if ( val < 0 || (size_t) val >= (sizeof(tbl) / sizeof(*tbl)) ) return NULL; return tbl[val].name; } struct idmef_message { REFCOUNT; REQUIRED(prelude_string_t, *version); UNION(idmef_message_type_t, type) { UNION_MEMBER(IDMEF_MESSAGE_TYPE_ALERT, idmef_alert_t, *alert); UNION_MEMBER(IDMEF_MESSAGE_TYPE_HEARTBEAT, idmef_heartbeat_t, *heartbeat); } message; HIDE(prelude_msg_t *, pmsg); }; /** * idmef_additional_data_new: * @ret: Pointer where to store the created #idmef_additional_data_t object. * * Create a new #idmef_additional_data_t object. * * Returns: 0 on success, a negative value if an error occured. */ int idmef_additional_data_new(idmef_additional_data_t **ret) { *ret = calloc(1, sizeof(**ret)); if ( ! *ret ) return prelude_error_from_errno(errno); prelude_list_init(&(*ret)->list); (*ret)->refcount = 1; { int retval = idmef_data_new(&(*ret)->data); if ( retval < 0 ) { idmef_additional_data_destroy(*ret); *ret = NULL; return retval; } } return 0; } /** * idmef_additional_data_ref: * @additional_data: pointer to a #idmef_additional_data_t object. * * Increase @additional_data reference count, so that it can be referenced * multiple time. * * Returns: a pointer to @additional_data. */ idmef_additional_data_t *idmef_additional_data_ref(idmef_additional_data_t *additional_data) { prelude_return_val_if_fail(additional_data, NULL); additional_data->refcount++; return additional_data; } int _idmef_additional_data_get_child(void *p, idmef_class_child_id_t child, void **childptr) { idmef_additional_data_t *ptr = p; prelude_return_val_if_fail(p, prelude_error(PRELUDE_ERROR_ASSERTION)); *childptr = NULL; switch ( child ) { case 0: return idmef_value_new_enum_from_numeric((idmef_value_t **) childptr, IDMEF_CLASS_ID_ADDITIONAL_DATA_TYPE, ptr->type); case 1: return get_value_from_string((idmef_value_t **) childptr, ptr->meaning, TRUE); case 2: return get_value_from_data((idmef_value_t **) childptr, ptr->data, TRUE); default: return prelude_error(PRELUDE_ERROR_IDMEF_CLASS_UNKNOWN_CHILD); } } int _idmef_additional_data_new_child(void *p, idmef_class_child_id_t child, int n, void **ret) { idmef_additional_data_t *ptr = p; prelude_return_val_if_fail(p, prelude_error(PRELUDE_ERROR_ASSERTION)); switch ( child ) { case 0: return idmef_additional_data_new_type(ptr, (idmef_additional_data_type_t **) ret); case 1: return idmef_additional_data_new_meaning(ptr, (prelude_string_t **) ret); case 2: return idmef_additional_data_new_data(ptr, (idmef_data_t **) ret); default: return prelude_error(PRELUDE_ERROR_IDMEF_CLASS_UNKNOWN_CHILD); } } int _idmef_additional_data_destroy_child(void *p, idmef_class_child_id_t child, int n) { idmef_additional_data_t *ptr = p; prelude_return_val_if_fail(p, prelude_error(PRELUDE_ERROR_ASSERTION)); switch ( child ) { case 0: ptr->type = 0; return 0; case 1: if ( ptr->meaning ) { prelude_string_destroy(ptr->meaning); ptr->meaning = NULL; } return 0; case 2: if ( ptr->data ) { idmef_data_destroy(ptr->data); ptr->data = NULL; } return 0; default: return prelude_error(PRELUDE_ERROR_IDMEF_CLASS_UNKNOWN_CHILD); } } static void idmef_additional_data_destroy_internal(idmef_additional_data_t *ptr) { prelude_return_if_fail(ptr); if ( ! prelude_list_is_empty(&ptr->list) ) prelude_list_del_init(&ptr->list); if ( ptr->meaning ) { prelude_string_destroy(ptr->meaning); ptr->meaning = NULL; } if ( ptr->data ) { idmef_data_destroy(ptr->data); ptr->data = NULL; } /* free() should be done by the caller */ } /** * idmef_additional_data_destroy: * @ptr: pointer to a #idmef_additional_data_t object. * * Destroy @ptr and all of it's children. * The objects are only destroyed if their reference count reach zero. */ void idmef_additional_data_destroy(idmef_additional_data_t *ptr) { prelude_return_if_fail(ptr); if ( --ptr->refcount ) return; idmef_additional_data_destroy_internal(ptr); free(ptr); } /** * idmef_additional_data_get_type: * @ptr: pointer to a #idmef_additional_data_t object. * * Get type children of the #idmef_additional_data_t object. * * Returns: a pointer to a idmef_additional_data_type_t object, or NULL if the children object is not set. */ idmef_additional_data_type_t idmef_additional_data_get_type(idmef_additional_data_t *ptr) { prelude_return_val_if_fail(ptr, 0); /* FIXME */ return ptr->type; } /** * idmef_additional_data_set_type: * @ptr: pointer to a #idmef_additional_data_t object. * @type: pointer to a #idmef_additional_data_type_t object. * * Set @type object as a children of @ptr. * if @ptr already contain an @type object, then it is destroyed, * and updated to point to the provided @type object. */ void idmef_additional_data_set_type(idmef_additional_data_t *ptr, idmef_additional_data_type_t type) { prelude_return_if_fail(ptr); ptr->type = type; } /** * idmef_additional_data_new_type: * @ptr: pointer to a #idmef_additional_data_t object. * @ret: pointer to an address where to store the created #idmef_additional_data_type_t object. * * Create a new type object, children of #idmef_additional_data_t. * If @ptr already contain a #idmef_additional_data_type_t object, then it is destroyed. * * Returns: 0 on success, or a negative value if an error occured. */ int idmef_additional_data_new_type(idmef_additional_data_t *ptr, idmef_additional_data_type_t **ret) { prelude_return_val_if_fail(ptr, prelude_error(PRELUDE_ERROR_ASSERTION)); *ret = &ptr->type; return 0; } /** * *idmef_additional_data_get_meaning: * @ptr: pointer to a #idmef_additional_data_t object. * * Get meaning children of the #idmef_additional_data_t object. * * Returns: a pointer to a prelude_string_t object, or NULL if the children object is not set. */ prelude_string_t *idmef_additional_data_get_meaning(idmef_additional_data_t *ptr) { prelude_return_val_if_fail(ptr, 0); /* FIXME */ return ptr->meaning; } /** * idmef_additional_data_set_meaning: * @ptr: pointer to a #idmef_additional_data_t object. * @meaning: pointer to a #prelude_string_t object. * * Set @meaning object as a children of @ptr. * if @ptr already contain an @meaning object, then it is destroyed, * and updated to point to the provided @meaning object. */ void idmef_additional_data_set_meaning(idmef_additional_data_t *ptr, prelude_string_t *meaning) { prelude_return_if_fail(ptr); if ( ptr->meaning ) prelude_string_destroy(ptr->meaning); ptr->meaning = meaning; } /** * idmef_additional_data_new_meaning: * @ptr: pointer to a #idmef_additional_data_t object. * @ret: pointer to an address where to store the created #prelude_string_t object. * * Create a new meaning object, children of #idmef_additional_data_t. * If @ptr already contain a #prelude_string_t object, then it is destroyed. * * Returns: 0 on success, or a negative value if an error occured. */ int idmef_additional_data_new_meaning(idmef_additional_data_t *ptr, prelude_string_t **ret) { int retval; prelude_return_val_if_fail(ptr, prelude_error(PRELUDE_ERROR_ASSERTION)); if ( ! ptr->meaning ) { retval = prelude_string_new(&ptr->meaning); if ( retval < 0 ) return retval; } *ret = ptr->meaning; return 0; } /** * *idmef_additional_data_get_data: * @ptr: pointer to a #idmef_additional_data_t object. * * Get data children of the #idmef_additional_data_t object. * * Returns: a pointer to a idmef_data_t object, or NULL if the children object is not set. */ idmef_data_t *idmef_additional_data_get_data(idmef_additional_data_t *ptr) { prelude_return_val_if_fail(ptr, 0); /* FIXME */ return ptr->data; } /** * idmef_additional_data_set_data: * @ptr: pointer to a #idmef_additional_data_t object. * @data: pointer to a #idmef_data_t object. * * Set @data object as a children of @ptr. * if @ptr already contain an @data object, then it is destroyed, * and updated to point to the provided @data object. */ void idmef_additional_data_set_data(idmef_additional_data_t *ptr, idmef_data_t *data) { prelude_return_if_fail(ptr); if ( ptr->data ) idmef_data_destroy(ptr->data); ptr->data = data; } /** * idmef_additional_data_new_data: * @ptr: pointer to a #idmef_additional_data_t object. * @ret: pointer to an address where to store the created #idmef_data_t object. * * Create a new data object, children of #idmef_additional_data_t. * If @ptr already contain a #idmef_data_t object, then it is destroyed. * * Returns: 0 on success, or a negative value if an error occured. */ int idmef_additional_data_new_data(idmef_additional_data_t *ptr, idmef_data_t **ret) { int retval; prelude_return_val_if_fail(ptr, prelude_error(PRELUDE_ERROR_ASSERTION)); if ( ! ptr->data ) { retval = idmef_data_new(&ptr->data); if ( retval < 0 ) return retval; } *ret = ptr->data; return 0; } /** * idmef_additional_data_copy: * @src: Source of the copy. * @dst: Where to copy the object. * * Copy a new #idmef_additional_data_t object from @src to @dst. * * Returns: 0 on success, a negative value if an error occured. */ int idmef_additional_data_copy(const idmef_additional_data_t *src, idmef_additional_data_t *dst) { int ret; prelude_return_val_if_fail(src, prelude_error(PRELUDE_ERROR_ASSERTION)); prelude_return_val_if_fail(dst, prelude_error(PRELUDE_ERROR_ASSERTION)); ret = 0; dst->type = src->type; if ( src->meaning ) { ret = prelude_string_clone(src->meaning, &dst->meaning); if ( ret < 0 ) return ret; } if ( src->data ) { ret = idmef_data_copy(src->data, dst->data); if ( ret < 0 ) return ret; } return 0; } /** * idmef_additional_data_clone: * @src: Object to be cloned. * @dst: Address where to store the pointer to the cloned object. * * Create a copy of @src, and store it in @dst. * * Returns: 0 on success, a negative value if an error occured. */ int idmef_additional_data_clone(idmef_additional_data_t *src, idmef_additional_data_t **dst) { int ret; prelude_return_val_if_fail(src, prelude_error(PRELUDE_ERROR_ASSERTION)); ret = idmef_additional_data_new(dst); if ( ret < 0 ) return ret; return idmef_additional_data_copy(src, *dst); } /** * idmef_additional_data_compare: * @obj1: Object to compare with @obj2. * @obj2: Object to compare with @obj1. * * Compare @obj1 with @obj2. * * Returns: 0 on match, a negative value on comparison failure. */ int idmef_additional_data_compare(const idmef_additional_data_t *obj1, const idmef_additional_data_t *obj2) { int ret = 0; if ( obj1 == NULL && obj2 == NULL ) return 0; else if ( obj1 == NULL || obj2 == NULL ) return -1; if ( obj1->type != obj2->type ) return -1; ret = prelude_string_compare(obj1->meaning, obj2->meaning); if ( ret != 0 ) return ret; ret = idmef_data_compare(obj1->data, obj2->data); if ( ret != 0 ) return ret; return ret; } /** * idmef_reference_new: * @ret: Pointer where to store the created #idmef_reference_t object. * * Create a new #idmef_reference_t object. * * Returns: 0 on success, a negative value if an error occured. */ int idmef_reference_new(idmef_reference_t **ret) { *ret = calloc(1, sizeof(**ret)); if ( ! *ret ) return prelude_error_from_errno(errno); prelude_list_init(&(*ret)->list); (*ret)->refcount = 1; { int retval = prelude_string_new(&(*ret)->name); if ( retval < 0 ) { idmef_reference_destroy(*ret); *ret = NULL; return retval; } } { int retval = prelude_string_new(&(*ret)->url); if ( retval < 0 ) { idmef_reference_destroy(*ret); *ret = NULL; return retval; } } return 0; } /** * idmef_reference_ref: * @reference: pointer to a #idmef_reference_t object. * * Increase @reference reference count, so that it can be referenced * multiple time. * * Returns: a pointer to @reference. */ idmef_reference_t *idmef_reference_ref(idmef_reference_t *reference) { prelude_return_val_if_fail(reference, NULL); reference->refcount++; return reference; } int _idmef_reference_get_child(void *p, idmef_class_child_id_t child, void **childptr) { idmef_reference_t *ptr = p; prelude_return_val_if_fail(p, prelude_error(PRELUDE_ERROR_ASSERTION)); *childptr = NULL; switch ( child ) { case 0: return idmef_value_new_enum_from_numeric((idmef_value_t **) childptr, IDMEF_CLASS_ID_REFERENCE_ORIGIN, ptr->origin); case 1: return get_value_from_string((idmef_value_t **) childptr, ptr->name, TRUE); case 2: return get_value_from_string((idmef_value_t **) childptr, ptr->url, TRUE); case 3: return get_value_from_string((idmef_value_t **) childptr, ptr->meaning, TRUE); default: return prelude_error(PRELUDE_ERROR_IDMEF_CLASS_UNKNOWN_CHILD); } } int _idmef_reference_new_child(void *p, idmef_class_child_id_t child, int n, void **ret) { idmef_reference_t *ptr = p; prelude_return_val_if_fail(p, prelude_error(PRELUDE_ERROR_ASSERTION)); switch ( child ) { case 0: return idmef_reference_new_origin(ptr, (idmef_reference_origin_t **) ret); case 1: return idmef_reference_new_name(ptr, (prelude_string_t **) ret); case 2: return idmef_reference_new_url(ptr, (prelude_string_t **) ret); case 3: return idmef_reference_new_meaning(ptr, (prelude_string_t **) ret); default: return prelude_error(PRELUDE_ERROR_IDMEF_CLASS_UNKNOWN_CHILD); } } int _idmef_reference_destroy_child(void *p, idmef_class_child_id_t child, int n) { idmef_reference_t *ptr = p; prelude_return_val_if_fail(p, prelude_error(PRELUDE_ERROR_ASSERTION)); switch ( child ) { case 0: ptr->origin = 0; return 0; case 1: if ( ptr->name ) { prelude_string_destroy(ptr->name); ptr->name = NULL; } return 0; case 2: if ( ptr->url ) { prelude_string_destroy(ptr->url); ptr->url = NULL; } return 0; case 3: if ( ptr->meaning ) { prelude_string_destroy(ptr->meaning); ptr->meaning = NULL; } return 0; default: return prelude_error(PRELUDE_ERROR_IDMEF_CLASS_UNKNOWN_CHILD); } } static void idmef_reference_destroy_internal(idmef_reference_t *ptr) { prelude_return_if_fail(ptr); if ( ! prelude_list_is_empty(&ptr->list) ) prelude_list_del_init(&ptr->list); if ( ptr->name ) { prelude_string_destroy(ptr->name); ptr->name = NULL; } if ( ptr->url ) { prelude_string_destroy(ptr->url); ptr->url = NULL; } if ( ptr->meaning ) { prelude_string_destroy(ptr->meaning); ptr->meaning = NULL; } /* free() should be done by the caller */ } /** * idmef_reference_destroy: * @ptr: pointer to a #idmef_reference_t object. * * Destroy @ptr and all of it's children. * The objects are only destroyed if their reference count reach zero. */ void idmef_reference_destroy(idmef_reference_t *ptr) { prelude_return_if_fail(ptr); if ( --ptr->refcount ) return; idmef_reference_destroy_internal(ptr); free(ptr); } /** * idmef_reference_get_origin: * @ptr: pointer to a #idmef_reference_t object. * * Get origin children of the #idmef_reference_t object. * * Returns: a pointer to a idmef_reference_origin_t object, or NULL if the children object is not set. */ idmef_reference_origin_t idmef_reference_get_origin(idmef_reference_t *ptr) { prelude_return_val_if_fail(ptr, 0); /* FIXME */ return ptr->origin; } /** * idmef_reference_set_origin: * @ptr: pointer to a #idmef_reference_t object. * @origin: pointer to a #idmef_reference_origin_t object. * * Set @origin object as a children of @ptr. * if @ptr already contain an @origin object, then it is destroyed, * and updated to point to the provided @origin object. */ void idmef_reference_set_origin(idmef_reference_t *ptr, idmef_reference_origin_t origin) { prelude_return_if_fail(ptr); ptr->origin = origin; } /** * idmef_reference_new_origin: * @ptr: pointer to a #idmef_reference_t object. * @ret: pointer to an address where to store the created #idmef_reference_origin_t object. * * Create a new origin object, children of #idmef_reference_t. * If @ptr already contain a #idmef_reference_origin_t object, then it is destroyed. * * Returns: 0 on success, or a negative value if an error occured. */ int idmef_reference_new_origin(idmef_reference_t *ptr, idmef_reference_origin_t **ret) { prelude_return_val_if_fail(ptr, prelude_error(PRELUDE_ERROR_ASSERTION)); *ret = &ptr->origin; return 0; } /** * *idmef_reference_get_name: * @ptr: pointer to a #idmef_reference_t object. * * Get name children of the #idmef_reference_t object. * * Returns: a pointer to a prelude_string_t object, or NULL if the children object is not set. */ prelude_string_t *idmef_reference_get_name(idmef_reference_t *ptr) { prelude_return_val_if_fail(ptr, 0); /* FIXME */ return ptr->name; } /** * idmef_reference_set_name: * @ptr: pointer to a #idmef_reference_t object. * @name: pointer to a #prelude_string_t object. * * Set @name object as a children of @ptr. * if @ptr already contain an @name object, then it is destroyed, * and updated to point to the provided @name object. */ void idmef_reference_set_name(idmef_reference_t *ptr, prelude_string_t *name) { prelude_return_if_fail(ptr); if ( ptr->name ) prelude_string_destroy(ptr->name); ptr->name = name; } /** * idmef_reference_new_name: * @ptr: pointer to a #idmef_reference_t object. * @ret: pointer to an address where to store the created #prelude_string_t object. * * Create a new name object, children of #idmef_reference_t. * If @ptr already contain a #prelude_string_t object, then it is destroyed. * * Returns: 0 on success, or a negative value if an error occured. */ int idmef_reference_new_name(idmef_reference_t *ptr, prelude_string_t **ret) { int retval; prelude_return_val_if_fail(ptr, prelude_error(PRELUDE_ERROR_ASSERTION)); if ( ! ptr->name ) { retval = prelude_string_new(&ptr->name); if ( retval < 0 ) return retval; } *ret = ptr->name; return 0; } /** * *idmef_reference_get_url: * @ptr: pointer to a #idmef_reference_t object. * * Get url children of the #idmef_reference_t object. * * Returns: a pointer to a prelude_string_t object, or NULL if the children object is not set. */ prelude_string_t *idmef_reference_get_url(idmef_reference_t *ptr) { prelude_return_val_if_fail(ptr, 0); /* FIXME */ return ptr->url; } /** * idmef_reference_set_url: * @ptr: pointer to a #idmef_reference_t object. * @url: pointer to a #prelude_string_t object. * * Set @url object as a children of @ptr. * if @ptr already contain an @url object, then it is destroyed, * and updated to point to the provided @url object. */ void idmef_reference_set_url(idmef_reference_t *ptr, prelude_string_t *url) { prelude_return_if_fail(ptr); if ( ptr->url ) prelude_string_destroy(ptr->url); ptr->url = url; } /** * idmef_reference_new_url: * @ptr: pointer to a #idmef_reference_t object. * @ret: pointer to an address where to store the created #prelude_string_t object. * * Create a new url object, children of #idmef_reference_t. * If @ptr already contain a #prelude_string_t object, then it is destroyed. * * Returns: 0 on success, or a negative value if an error occured. */ int idmef_reference_new_url(idmef_reference_t *ptr, prelude_string_t **ret) { int retval; prelude_return_val_if_fail(ptr, prelude_error(PRELUDE_ERROR_ASSERTION)); if ( ! ptr->url ) { retval = prelude_string_new(&ptr->url); if ( retval < 0 ) return retval; } *ret = ptr->url; return 0; } /** * *idmef_reference_get_meaning: * @ptr: pointer to a #idmef_reference_t object. * * Get meaning children of the #idmef_reference_t object. * * Returns: a pointer to a prelude_string_t object, or NULL if the children object is not set. */ prelude_string_t *idmef_reference_get_meaning(idmef_reference_t *ptr) { prelude_return_val_if_fail(ptr, 0); /* FIXME */ return ptr->meaning; } /** * idmef_reference_set_meaning: * @ptr: pointer to a #idmef_reference_t object. * @meaning: pointer to a #prelude_string_t object. * * Set @meaning object as a children of @ptr. * if @ptr already contain an @meaning object, then it is destroyed, * and updated to point to the provided @meaning object. */ void idmef_reference_set_meaning(idmef_reference_t *ptr, prelude_string_t *meaning) { prelude_return_if_fail(ptr); if ( ptr->meaning ) prelude_string_destroy(ptr->meaning); ptr->meaning = meaning; } /** * idmef_reference_new_meaning: * @ptr: pointer to a #idmef_reference_t object. * @ret: pointer to an address where to store the created #prelude_string_t object. * * Create a new meaning object, children of #idmef_reference_t. * If @ptr already contain a #prelude_string_t object, then it is destroyed. * * Returns: 0 on success, or a negative value if an error occured. */ int idmef_reference_new_meaning(idmef_reference_t *ptr, prelude_string_t **ret) { int retval; prelude_return_val_if_fail(ptr, prelude_error(PRELUDE_ERROR_ASSERTION)); if ( ! ptr->meaning ) { retval = prelude_string_new(&ptr->meaning); if ( retval < 0 ) return retval; } *ret = ptr->meaning; return 0; } /** * idmef_reference_copy: * @src: Source of the copy. * @dst: Where to copy the object. * * Copy a new #idmef_reference_t object from @src to @dst. * * Returns: 0 on success, a negative value if an error occured. */ int idmef_reference_copy(const idmef_reference_t *src, idmef_reference_t *dst) { int ret; prelude_return_val_if_fail(src, prelude_error(PRELUDE_ERROR_ASSERTION)); prelude_return_val_if_fail(dst, prelude_error(PRELUDE_ERROR_ASSERTION)); ret = 0; dst->origin = src->origin; if ( src->name ) { ret = prelude_string_copy(src->name, dst->name); if ( ret < 0 ) return ret; } if ( src->url ) { ret = prelude_string_copy(src->url, dst->url); if ( ret < 0 ) return ret; } if ( src->meaning ) { ret = prelude_string_clone(src->meaning, &dst->meaning); if ( ret < 0 ) return ret; } return 0; } /** * idmef_reference_clone: * @src: Object to be cloned. * @dst: Address where to store the pointer to the cloned object. * * Create a copy of @src, and store it in @dst. * * Returns: 0 on success, a negative value if an error occured. */ int idmef_reference_clone(idmef_reference_t *src, idmef_reference_t **dst) { int ret; prelude_return_val_if_fail(src, prelude_error(PRELUDE_ERROR_ASSERTION)); ret = idmef_reference_new(dst); if ( ret < 0 ) return ret; return idmef_reference_copy(src, *dst); } /** * idmef_reference_compare: * @obj1: Object to compare with @obj2. * @obj2: Object to compare with @obj1. * * Compare @obj1 with @obj2. * * Returns: 0 on match, a negative value on comparison failure. */ int idmef_reference_compare(const idmef_reference_t *obj1, const idmef_reference_t *obj2) { int ret = 0; if ( obj1 == NULL && obj2 == NULL ) return 0; else if ( obj1 == NULL || obj2 == NULL ) return -1; if ( obj1->origin != obj2->origin ) return -1; ret = prelude_string_compare(obj1->name, obj2->name); if ( ret != 0 ) return ret; ret = prelude_string_compare(obj1->url, obj2->url); if ( ret != 0 ) return ret; ret = prelude_string_compare(obj1->meaning, obj2->meaning); if ( ret != 0 ) return ret; return ret; } /** * idmef_classification_new: * @ret: Pointer where to store the created #idmef_classification_t object. * * Create a new #idmef_classification_t object. * * Returns: 0 on success, a negative value if an error occured. */ int idmef_classification_new(idmef_classification_t **ret) { *ret = calloc(1, sizeof(**ret)); if ( ! *ret ) return prelude_error_from_errno(errno); (*ret)->refcount = 1; prelude_list_init(&(*ret)->reference_list); { int retval = prelude_string_new(&(*ret)->text); if ( retval < 0 ) { idmef_classification_destroy(*ret); *ret = NULL; return retval; } } return 0; } /** * idmef_classification_ref: * @classification: pointer to a #idmef_classification_t object. * * Increase @classification reference count, so that it can be referenced * multiple time. * * Returns: a pointer to @classification. */ idmef_classification_t *idmef_classification_ref(idmef_classification_t *classification) { prelude_return_val_if_fail(classification, NULL); classification->refcount++; return classification; } int _idmef_classification_get_child(void *p, idmef_class_child_id_t child, void **childptr) { idmef_classification_t *ptr = p; prelude_return_val_if_fail(p, prelude_error(PRELUDE_ERROR_ASSERTION)); *childptr = NULL; switch ( child ) { case 0: return get_value_from_string((idmef_value_t **) childptr, ptr->ident, TRUE); case 1: return get_value_from_string((idmef_value_t **) childptr, ptr->text, TRUE); case 2: *childptr = &ptr->reference_list; return 0; default: return prelude_error(PRELUDE_ERROR_IDMEF_CLASS_UNKNOWN_CHILD); } } int _idmef_classification_new_child(void *p, idmef_class_child_id_t child, int n, void **ret) { idmef_classification_t *ptr = p; prelude_return_val_if_fail(p, prelude_error(PRELUDE_ERROR_ASSERTION)); switch ( child ) { case 0: return idmef_classification_new_ident(ptr, (prelude_string_t **) ret); case 1: return idmef_classification_new_text(ptr, (prelude_string_t **) ret); case 2: { int i = 0; prelude_list_t *tmp; if ( n == IDMEF_LIST_APPEND || n == IDMEF_LIST_PREPEND ) return idmef_classification_new_reference(ptr, (idmef_reference_t **) ret, n); if ( n >= 0 ) { prelude_list_for_each(&ptr->reference_list, tmp) { if ( i++ == n ) { *ret = prelude_list_entry(tmp, idmef_reference_t, list); return 0; } } if ( i != n ) return prelude_error(PRELUDE_ERROR_IDMEF_TREE_INDEX_UNDEFINED); } else { int pos = (-n) - 1; /* With negative value, -1 is the base, translate to 0 */ prelude_list_for_each_reversed(&ptr->reference_list, tmp) { if ( i++ == pos ) { *ret = prelude_list_entry(tmp, idmef_reference_t, list); return 0; } } if ( i != pos ) return prelude_error(PRELUDE_ERROR_IDMEF_TREE_INDEX_UNDEFINED); } return idmef_classification_new_reference(ptr, (idmef_reference_t **) ret, n); } default: return prelude_error(PRELUDE_ERROR_IDMEF_CLASS_UNKNOWN_CHILD); } } int _idmef_classification_destroy_child(void *p, idmef_class_child_id_t child, int n) { idmef_classification_t *ptr = p; prelude_return_val_if_fail(p, prelude_error(PRELUDE_ERROR_ASSERTION)); switch ( child ) { case 0: if ( ptr->ident ) { prelude_string_destroy(ptr->ident); ptr->ident = NULL; } return 0; case 1: if ( ptr->text ) { prelude_string_destroy(ptr->text); ptr->text = NULL; } return 0; case 2: { int i = 0; prelude_list_t *tmp; if ( n >= 0 ) { prelude_list_for_each(&ptr->reference_list, tmp) { if ( i++ == n ) { void *b = prelude_list_entry(tmp, idmef_reference_t, list); idmef_reference_destroy(b); return 0; } } if ( i != n ) return prelude_error(PRELUDE_ERROR_IDMEF_TREE_INDEX_UNDEFINED); } else { int pos = (-n) - 1; /* With negative value, -1 is the base, translate to 0 */ prelude_list_for_each_reversed(&ptr->reference_list, tmp) { if ( i++ == pos ) { void *b = prelude_list_entry(tmp, idmef_reference_t, list); idmef_reference_destroy(b); return 0; } } if ( i != pos ) return prelude_error(PRELUDE_ERROR_IDMEF_TREE_INDEX_UNDEFINED); } } default: return prelude_error(PRELUDE_ERROR_IDMEF_CLASS_UNKNOWN_CHILD); } } static void idmef_classification_destroy_internal(idmef_classification_t *ptr) { prelude_return_if_fail(ptr); if ( ptr->ident ) { prelude_string_destroy(ptr->ident); ptr->ident = NULL; } if ( ptr->text ) { prelude_string_destroy(ptr->text); ptr->text = NULL; } { prelude_list_t *n, *tmp; idmef_reference_t *entry; prelude_list_for_each_safe(&ptr->reference_list, tmp, n) { entry = prelude_list_entry(tmp, idmef_reference_t, list); prelude_list_del_init(&entry->list); idmef_reference_destroy(entry); } } /* free() should be done by the caller */ } /** * idmef_classification_destroy: * @ptr: pointer to a #idmef_classification_t object. * * Destroy @ptr and all of it's children. * The objects are only destroyed if their reference count reach zero. */ void idmef_classification_destroy(idmef_classification_t *ptr) { prelude_return_if_fail(ptr); if ( --ptr->refcount ) return; idmef_classification_destroy_internal(ptr); free(ptr); } /** * *idmef_classification_get_ident: * @ptr: pointer to a #idmef_classification_t object. * * Get ident children of the #idmef_classification_t object. * * Returns: a pointer to a prelude_string_t object, or NULL if the children object is not set. */ prelude_string_t *idmef_classification_get_ident(idmef_classification_t *ptr) { prelude_return_val_if_fail(ptr, 0); /* FIXME */ return ptr->ident; } /** * idmef_classification_set_ident: * @ptr: pointer to a #idmef_classification_t object. * @ident: pointer to a #prelude_string_t object. * * Set @ident object as a children of @ptr. * if @ptr already contain an @ident object, then it is destroyed, * and updated to point to the provided @ident object. */ void idmef_classification_set_ident(idmef_classification_t *ptr, prelude_string_t *ident) { prelude_return_if_fail(ptr); if ( ptr->ident ) prelude_string_destroy(ptr->ident); ptr->ident = ident; } /** * idmef_classification_new_ident: * @ptr: pointer to a #idmef_classification_t object. * @ret: pointer to an address where to store the created #prelude_string_t object. * * Create a new ident object, children of #idmef_classification_t. * If @ptr already contain a #prelude_string_t object, then it is destroyed. * * Returns: 0 on success, or a negative value if an error occured. */ int idmef_classification_new_ident(idmef_classification_t *ptr, prelude_string_t **ret) { int retval; prelude_return_val_if_fail(ptr, prelude_error(PRELUDE_ERROR_ASSERTION)); if ( ! ptr->ident ) { retval = prelude_string_new(&ptr->ident); if ( retval < 0 ) return retval; } *ret = ptr->ident; return 0; } /** * *idmef_classification_get_text: * @ptr: pointer to a #idmef_classification_t object. * * Get text children of the #idmef_classification_t object. * * Returns: a pointer to a prelude_string_t object, or NULL if the children object is not set. */ prelude_string_t *idmef_classification_get_text(idmef_classification_t *ptr) { prelude_return_val_if_fail(ptr, 0); /* FIXME */ return ptr->text; } /** * idmef_classification_set_text: * @ptr: pointer to a #idmef_classification_t object. * @text: pointer to a #prelude_string_t object. * * Set @text object as a children of @ptr. * if @ptr already contain an @text object, then it is destroyed, * and updated to point to the provided @text object. */ void idmef_classification_set_text(idmef_classification_t *ptr, prelude_string_t *text) { prelude_return_if_fail(ptr); if ( ptr->text ) prelude_string_destroy(ptr->text); ptr->text = text; } /** * idmef_classification_new_text: * @ptr: pointer to a #idmef_classification_t object. * @ret: pointer to an address where to store the created #prelude_string_t object. * * Create a new text object, children of #idmef_classification_t. * If @ptr already contain a #prelude_string_t object, then it is destroyed. * * Returns: 0 on success, or a negative value if an error occured. */ int idmef_classification_new_text(idmef_classification_t *ptr, prelude_string_t **ret) { int retval; prelude_return_val_if_fail(ptr, prelude_error(PRELUDE_ERROR_ASSERTION)); if ( ! ptr->text ) { retval = prelude_string_new(&ptr->text); if ( retval < 0 ) return retval; } *ret = ptr->text; return 0; } /** * idmef_classification_get_next_reference: * @classification: pointer to a #idmef_classification_t object. * @reference_cur: pointer to a #idmef_reference_t object. * * Get the next #idmef_reference_t object listed in @ptr. * When iterating over the idmef_reference_t object listed in @ptr, * @object should be set to the latest returned #idmef_reference_t object. * * Returns: the next #idmef_reference_t in the list. */ idmef_reference_t *idmef_classification_get_next_reference(idmef_classification_t *classification, idmef_reference_t *reference_cur) { prelude_list_t *tmp = (reference_cur) ? &reference_cur->list : NULL; prelude_return_val_if_fail(classification, NULL); prelude_list_for_each_continue(&classification->reference_list, tmp) return prelude_list_entry(tmp, idmef_reference_t, list); return NULL; } /** * idmef_classification_set_reference: * @ptr: pointer to a #idmef_classification_t object. * @object: pointer to a #idmef_reference_t object. * @pos: Position in the list. * * Add @object to position @pos of @ptr list of #idmef_reference_t object. * * If @pos is #IDMEF_LIST_APPEND, @object will be inserted at the tail of the list. * If @pos is #IDMEF_LIST_PREPEND, @object will be inserted at the head of the list. */ void idmef_classification_set_reference(idmef_classification_t *ptr, idmef_reference_t *object, int pos) { prelude_return_if_fail(ptr); prelude_return_if_fail(object); if ( ! prelude_list_is_empty(&object->list) ) prelude_list_del_init(&object->list); list_insert(&ptr->reference_list, &object->list, pos); } /** * idmef_classification_new_reference: * @ptr: pointer to a #idmef_classification_t object. * @ret: pointer to an address where to store the created #idmef_reference_t object. * @pos: position in the list. * * Create a new #idmef_reference_t children of @ptr, and add it to position @pos of * @ptr list of #idmef_reference_t object. The created #idmef_reference_t object is * stored in @ret. * * If @pos is #IDMEF_LIST_APPEND, @object will be inserted at the tail of the list. * If @pos is #IDMEF_LIST_PREPEND, @object will be inserted at the head of the list. * * Returns: 0 on success, or a negative value if an error occured. */ int idmef_classification_new_reference(idmef_classification_t *ptr, idmef_reference_t **ret, int pos) { int retval; prelude_return_val_if_fail(ptr, prelude_error(PRELUDE_ERROR_ASSERTION)); retval = idmef_reference_new(ret); if ( retval < 0 ) return retval; list_insert(&ptr->reference_list, &(*ret)->list, pos); return 0; } /** * idmef_classification_copy: * @src: Source of the copy. * @dst: Where to copy the object. * * Copy a new #idmef_classification_t object from @src to @dst. * * Returns: 0 on success, a negative value if an error occured. */ int idmef_classification_copy(const idmef_classification_t *src, idmef_classification_t *dst) { int ret; prelude_return_val_if_fail(src, prelude_error(PRELUDE_ERROR_ASSERTION)); prelude_return_val_if_fail(dst, prelude_error(PRELUDE_ERROR_ASSERTION)); ret = 0; if ( src->ident ) { ret = prelude_string_clone(src->ident, &dst->ident); if ( ret < 0 ) return ret; } if ( src->text ) { ret = prelude_string_copy(src->text, dst->text); if ( ret < 0 ) return ret; } { prelude_list_t *n, *tmp; idmef_reference_t *entry, *new; prelude_list_for_each_safe(&src->reference_list, tmp, n) { entry = prelude_list_entry(tmp, idmef_reference_t, list); idmef_reference_clone(entry, &new); prelude_list_add_tail(&dst->reference_list, &new->list); } } return 0; } /** * idmef_classification_clone: * @src: Object to be cloned. * @dst: Address where to store the pointer to the cloned object. * * Create a copy of @src, and store it in @dst. * * Returns: 0 on success, a negative value if an error occured. */ int idmef_classification_clone(idmef_classification_t *src, idmef_classification_t **dst) { int ret; prelude_return_val_if_fail(src, prelude_error(PRELUDE_ERROR_ASSERTION)); ret = idmef_classification_new(dst); if ( ret < 0 ) return ret; return idmef_classification_copy(src, *dst); } /** * idmef_classification_compare: * @obj1: Object to compare with @obj2. * @obj2: Object to compare with @obj1. * * Compare @obj1 with @obj2. * * Returns: 0 on match, a negative value on comparison failure. */ int idmef_classification_compare(const idmef_classification_t *obj1, const idmef_classification_t *obj2) { int ret = 0; if ( obj1 == NULL && obj2 == NULL ) return 0; else if ( obj1 == NULL || obj2 == NULL ) return -1; ret = prelude_string_compare(obj1->ident, obj2->ident); if ( ret != 0 ) return ret; ret = prelude_string_compare(obj1->text, obj2->text); if ( ret != 0 ) return ret; { prelude_list_t *tmp1, *tmp2; idmef_reference_t *entry1, *entry2; tmp1 = tmp2 = NULL; do { entry1 = entry2 = NULL; prelude_list_for_each_continue(&obj1->reference_list, tmp1) { entry1 = prelude_list_entry(tmp1, idmef_reference_t, list); break; } prelude_list_for_each_continue(&obj2->reference_list, tmp2) { entry2 = prelude_list_entry(tmp2, idmef_reference_t, list); break; } ret = idmef_reference_compare(entry1, entry2); if ( ret != 0 ) return ret; } while ( entry1 && entry2 ); } return ret; } /** * idmef_user_id_new: * @ret: Pointer where to store the created #idmef_user_id_t object. * * Create a new #idmef_user_id_t object. * * Returns: 0 on success, a negative value if an error occured. */ int idmef_user_id_new(idmef_user_id_t **ret) { *ret = calloc(1, sizeof(**ret)); if ( ! *ret ) return prelude_error_from_errno(errno); prelude_list_init(&(*ret)->list); (*ret)->refcount = 1; return 0; } /** * idmef_user_id_ref: * @user_id: pointer to a #idmef_user_id_t object. * * Increase @user_id reference count, so that it can be referenced * multiple time. * * Returns: a pointer to @user_id. */ idmef_user_id_t *idmef_user_id_ref(idmef_user_id_t *user_id) { prelude_return_val_if_fail(user_id, NULL); user_id->refcount++; return user_id; } int _idmef_user_id_get_child(void *p, idmef_class_child_id_t child, void **childptr) { idmef_user_id_t *ptr = p; prelude_return_val_if_fail(p, prelude_error(PRELUDE_ERROR_ASSERTION)); *childptr = NULL; switch ( child ) { case 0: return get_value_from_string((idmef_value_t **) childptr, ptr->ident, TRUE); case 1: return idmef_value_new_enum_from_numeric((idmef_value_t **) childptr, IDMEF_CLASS_ID_USER_ID_TYPE, ptr->type); case 2: return get_value_from_string((idmef_value_t **) childptr, ptr->tty, TRUE); case 3: return get_value_from_string((idmef_value_t **) childptr, ptr->name, TRUE); case 4: return (ptr->number_is_set) ? idmef_value_new_uint32((idmef_value_t **) childptr, ptr->number) : 0; default: return prelude_error(PRELUDE_ERROR_IDMEF_CLASS_UNKNOWN_CHILD); } } int _idmef_user_id_new_child(void *p, idmef_class_child_id_t child, int n, void **ret) { idmef_user_id_t *ptr = p; prelude_return_val_if_fail(p, prelude_error(PRELUDE_ERROR_ASSERTION)); switch ( child ) { case 0: return idmef_user_id_new_ident(ptr, (prelude_string_t **) ret); case 1: return idmef_user_id_new_type(ptr, (idmef_user_id_type_t **) ret); case 2: return idmef_user_id_new_tty(ptr, (prelude_string_t **) ret); case 3: return idmef_user_id_new_name(ptr, (prelude_string_t **) ret); case 4: return idmef_user_id_new_number(ptr, (uint32_t **) ret); default: return prelude_error(PRELUDE_ERROR_IDMEF_CLASS_UNKNOWN_CHILD); } } int _idmef_user_id_destroy_child(void *p, idmef_class_child_id_t child, int n) { idmef_user_id_t *ptr = p; prelude_return_val_if_fail(p, prelude_error(PRELUDE_ERROR_ASSERTION)); switch ( child ) { case 0: if ( ptr->ident ) { prelude_string_destroy(ptr->ident); ptr->ident = NULL; } return 0; case 1: ptr->type = 0; return 0; case 2: if ( ptr->tty ) { prelude_string_destroy(ptr->tty); ptr->tty = NULL; } return 0; case 3: if ( ptr->name ) { prelude_string_destroy(ptr->name); ptr->name = NULL; } return 0; case 4: ptr->number_is_set = 0; return 0; default: return prelude_error(PRELUDE_ERROR_IDMEF_CLASS_UNKNOWN_CHILD); } } static void idmef_user_id_destroy_internal(idmef_user_id_t *ptr) { prelude_return_if_fail(ptr); if ( ! prelude_list_is_empty(&ptr->list) ) prelude_list_del_init(&ptr->list); if ( ptr->ident ) { prelude_string_destroy(ptr->ident); ptr->ident = NULL; } if ( ptr->tty ) { prelude_string_destroy(ptr->tty); ptr->tty = NULL; } if ( ptr->name ) { prelude_string_destroy(ptr->name); ptr->name = NULL; } /* free() should be done by the caller */ } /** * idmef_user_id_destroy: * @ptr: pointer to a #idmef_user_id_t object. * * Destroy @ptr and all of it's children. * The objects are only destroyed if their reference count reach zero. */ void idmef_user_id_destroy(idmef_user_id_t *ptr) { prelude_return_if_fail(ptr); if ( --ptr->refcount ) return; idmef_user_id_destroy_internal(ptr); free(ptr); } /** * *idmef_user_id_get_ident: * @ptr: pointer to a #idmef_user_id_t object. * * Get ident children of the #idmef_user_id_t object. * * Returns: a pointer to a prelude_string_t object, or NULL if the children object is not set. */ prelude_string_t *idmef_user_id_get_ident(idmef_user_id_t *ptr) { prelude_return_val_if_fail(ptr, 0); /* FIXME */ return ptr->ident; } /** * idmef_user_id_set_ident: * @ptr: pointer to a #idmef_user_id_t object. * @ident: pointer to a #prelude_string_t object. * * Set @ident object as a children of @ptr. * if @ptr already contain an @ident object, then it is destroyed, * and updated to point to the provided @ident object. */ void idmef_user_id_set_ident(idmef_user_id_t *ptr, prelude_string_t *ident) { prelude_return_if_fail(ptr); if ( ptr->ident ) prelude_string_destroy(ptr->ident); ptr->ident = ident; } /** * idmef_user_id_new_ident: * @ptr: pointer to a #idmef_user_id_t object. * @ret: pointer to an address where to store the created #prelude_string_t object. * * Create a new ident object, children of #idmef_user_id_t. * If @ptr already contain a #prelude_string_t object, then it is destroyed. * * Returns: 0 on success, or a negative value if an error occured. */ int idmef_user_id_new_ident(idmef_user_id_t *ptr, prelude_string_t **ret) { int retval; prelude_return_val_if_fail(ptr, prelude_error(PRELUDE_ERROR_ASSERTION)); if ( ! ptr->ident ) { retval = prelude_string_new(&ptr->ident); if ( retval < 0 ) return retval; } *ret = ptr->ident; return 0; } /** * idmef_user_id_get_type: * @ptr: pointer to a #idmef_user_id_t object. * * Get type children of the #idmef_user_id_t object. * * Returns: a pointer to a idmef_user_id_type_t object, or NULL if the children object is not set. */ idmef_user_id_type_t idmef_user_id_get_type(idmef_user_id_t *ptr) { prelude_return_val_if_fail(ptr, 0); /* FIXME */ return ptr->type; } /** * idmef_user_id_set_type: * @ptr: pointer to a #idmef_user_id_t object. * @type: pointer to a #idmef_user_id_type_t object. * * Set @type object as a children of @ptr. * if @ptr already contain an @type object, then it is destroyed, * and updated to point to the provided @type object. */ void idmef_user_id_set_type(idmef_user_id_t *ptr, idmef_user_id_type_t type) { prelude_return_if_fail(ptr); ptr->type = type; } /** * idmef_user_id_new_type: * @ptr: pointer to a #idmef_user_id_t object. * @ret: pointer to an address where to store the created #idmef_user_id_type_t object. * * Create a new type object, children of #idmef_user_id_t. * If @ptr already contain a #idmef_user_id_type_t object, then it is destroyed. * * Returns: 0 on success, or a negative value if an error occured. */ int idmef_user_id_new_type(idmef_user_id_t *ptr, idmef_user_id_type_t **ret) { prelude_return_val_if_fail(ptr, prelude_error(PRELUDE_ERROR_ASSERTION)); *ret = &ptr->type; return 0; } /** * *idmef_user_id_get_tty: * @ptr: pointer to a #idmef_user_id_t object. * * Get tty children of the #idmef_user_id_t object. * * Returns: a pointer to a prelude_string_t object, or NULL if the children object is not set. */ prelude_string_t *idmef_user_id_get_tty(idmef_user_id_t *ptr) { prelude_return_val_if_fail(ptr, 0); /* FIXME */ return ptr->tty; } /** * idmef_user_id_set_tty: * @ptr: pointer to a #idmef_user_id_t object. * @tty: pointer to a #prelude_string_t object. * * Set @tty object as a children of @ptr. * if @ptr already contain an @tty object, then it is destroyed, * and updated to point to the provided @tty object. */ void idmef_user_id_set_tty(idmef_user_id_t *ptr, prelude_string_t *tty) { prelude_return_if_fail(ptr); if ( ptr->tty ) prelude_string_destroy(ptr->tty); ptr->tty = tty; } /** * idmef_user_id_new_tty: * @ptr: pointer to a #idmef_user_id_t object. * @ret: pointer to an address where to store the created #prelude_string_t object. * * Create a new tty object, children of #idmef_user_id_t. * If @ptr already contain a #prelude_string_t object, then it is destroyed. * * Returns: 0 on success, or a negative value if an error occured. */ int idmef_user_id_new_tty(idmef_user_id_t *ptr, prelude_string_t **ret) { int retval; prelude_return_val_if_fail(ptr, prelude_error(PRELUDE_ERROR_ASSERTION)); if ( ! ptr->tty ) { retval = prelude_string_new(&ptr->tty); if ( retval < 0 ) return retval; } *ret = ptr->tty; return 0; } /** * *idmef_user_id_get_name: * @ptr: pointer to a #idmef_user_id_t object. * * Get name children of the #idmef_user_id_t object. * * Returns: a pointer to a prelude_string_t object, or NULL if the children object is not set. */ prelude_string_t *idmef_user_id_get_name(idmef_user_id_t *ptr) { prelude_return_val_if_fail(ptr, 0); /* FIXME */ return ptr->name; } /** * idmef_user_id_set_name: * @ptr: pointer to a #idmef_user_id_t object. * @name: pointer to a #prelude_string_t object. * * Set @name object as a children of @ptr. * if @ptr already contain an @name object, then it is destroyed, * and updated to point to the provided @name object. */ void idmef_user_id_set_name(idmef_user_id_t *ptr, prelude_string_t *name) { prelude_return_if_fail(ptr); if ( ptr->name ) prelude_string_destroy(ptr->name); ptr->name = name; } /** * idmef_user_id_new_name: * @ptr: pointer to a #idmef_user_id_t object. * @ret: pointer to an address where to store the created #prelude_string_t object. * * Create a new name object, children of #idmef_user_id_t. * If @ptr already contain a #prelude_string_t object, then it is destroyed. * * Returns: 0 on success, or a negative value if an error occured. */ int idmef_user_id_new_name(idmef_user_id_t *ptr, prelude_string_t **ret) { int retval; prelude_return_val_if_fail(ptr, prelude_error(PRELUDE_ERROR_ASSERTION)); if ( ! ptr->name ) { retval = prelude_string_new(&ptr->name); if ( retval < 0 ) return retval; } *ret = ptr->name; return 0; } /** * *idmef_user_id_get_number: * @ptr: pointer to a #idmef_user_id_t object. * * Get number children of the #idmef_user_id_t object. * * Returns: a pointer to a uint32_t object, or NULL if the children object is not set. */ uint32_t *idmef_user_id_get_number(idmef_user_id_t *ptr) { prelude_return_val_if_fail(ptr, 0); /* FIXME */ return ptr->number_is_set ? &ptr->number : NULL; } /** * idmef_user_id_set_number: * @ptr: pointer to a #idmef_user_id_t object. * @number: pointer to a #uint32_t object. * * Set @number object as a children of @ptr. * if @ptr already contain an @number object, then it is destroyed, * and updated to point to the provided @number object. */ void idmef_user_id_set_number(idmef_user_id_t *ptr, uint32_t number) { prelude_return_if_fail(ptr); ptr->number = number; ptr->number_is_set = 1; } void idmef_user_id_unset_number(idmef_user_id_t *ptr) { prelude_return_if_fail(ptr); ptr->number_is_set = 0; } /** * idmef_user_id_new_number: * @ptr: pointer to a #idmef_user_id_t object. * @ret: pointer to an address where to store the created #uint32_t object. * * Create a new number object, children of #idmef_user_id_t. * If @ptr already contain a #uint32_t object, then it is destroyed. * * Returns: 0 on success, or a negative value if an error occured. */ int idmef_user_id_new_number(idmef_user_id_t *ptr, uint32_t **ret) { prelude_return_val_if_fail(ptr, prelude_error(PRELUDE_ERROR_ASSERTION)); ptr->number_is_set = 1; *ret = &ptr->number; return 0; } /** * idmef_user_id_copy: * @src: Source of the copy. * @dst: Where to copy the object. * * Copy a new #idmef_user_id_t object from @src to @dst. * * Returns: 0 on success, a negative value if an error occured. */ int idmef_user_id_copy(const idmef_user_id_t *src, idmef_user_id_t *dst) { int ret; prelude_return_val_if_fail(src, prelude_error(PRELUDE_ERROR_ASSERTION)); prelude_return_val_if_fail(dst, prelude_error(PRELUDE_ERROR_ASSERTION)); ret = 0; if ( src->ident ) { ret = prelude_string_clone(src->ident, &dst->ident); if ( ret < 0 ) return ret; } dst->type = src->type; if ( src->tty ) { ret = prelude_string_clone(src->tty, &dst->tty); if ( ret < 0 ) return ret; } if ( src->name ) { ret = prelude_string_clone(src->name, &dst->name); if ( ret < 0 ) return ret; } dst->number_is_set = src->number_is_set; dst->number = src->number; return 0; } /** * idmef_user_id_clone: * @src: Object to be cloned. * @dst: Address where to store the pointer to the cloned object. * * Create a copy of @src, and store it in @dst. * * Returns: 0 on success, a negative value if an error occured. */ int idmef_user_id_clone(idmef_user_id_t *src, idmef_user_id_t **dst) { int ret; prelude_return_val_if_fail(src, prelude_error(PRELUDE_ERROR_ASSERTION)); ret = idmef_user_id_new(dst); if ( ret < 0 ) return ret; return idmef_user_id_copy(src, *dst); } /** * idmef_user_id_compare: * @obj1: Object to compare with @obj2. * @obj2: Object to compare with @obj1. * * Compare @obj1 with @obj2. * * Returns: 0 on match, a negative value on comparison failure. */ int idmef_user_id_compare(const idmef_user_id_t *obj1, const idmef_user_id_t *obj2) { int ret = 0; if ( obj1 == NULL && obj2 == NULL ) return 0; else if ( obj1 == NULL || obj2 == NULL ) return -1; ret = prelude_string_compare(obj1->ident, obj2->ident); if ( ret != 0 ) return ret; if ( obj1->type != obj2->type ) return -1; ret = prelude_string_compare(obj1->tty, obj2->tty); if ( ret != 0 ) return ret; ret = prelude_string_compare(obj1->name, obj2->name); if ( ret != 0 ) return ret; if ( obj1->number_is_set != obj2->number_is_set ) return -1; if ( obj1->number_is_set && obj1->number != obj2->number ) return -1; return ret; } /** * idmef_user_new: * @ret: Pointer where to store the created #idmef_user_t object. * * Create a new #idmef_user_t object. * * Returns: 0 on success, a negative value if an error occured. */ int idmef_user_new(idmef_user_t **ret) { *ret = calloc(1, sizeof(**ret)); if ( ! *ret ) return prelude_error_from_errno(errno); (*ret)->refcount = 1; prelude_list_init(&(*ret)->user_id_list); return 0; } /** * idmef_user_ref: * @user: pointer to a #idmef_user_t object. * * Increase @user reference count, so that it can be referenced * multiple time. * * Returns: a pointer to @user. */ idmef_user_t *idmef_user_ref(idmef_user_t *user) { prelude_return_val_if_fail(user, NULL); user->refcount++; return user; } int _idmef_user_get_child(void *p, idmef_class_child_id_t child, void **childptr) { idmef_user_t *ptr = p; prelude_return_val_if_fail(p, prelude_error(PRELUDE_ERROR_ASSERTION)); *childptr = NULL; switch ( child ) { case 0: return get_value_from_string((idmef_value_t **) childptr, ptr->ident, TRUE); case 1: return idmef_value_new_enum_from_numeric((idmef_value_t **) childptr, IDMEF_CLASS_ID_USER_CATEGORY, ptr->category); case 2: *childptr = &ptr->user_id_list; return 0; default: return prelude_error(PRELUDE_ERROR_IDMEF_CLASS_UNKNOWN_CHILD); } } int _idmef_user_new_child(void *p, idmef_class_child_id_t child, int n, void **ret) { idmef_user_t *ptr = p; prelude_return_val_if_fail(p, prelude_error(PRELUDE_ERROR_ASSERTION)); switch ( child ) { case 0: return idmef_user_new_ident(ptr, (prelude_string_t **) ret); case 1: return idmef_user_new_category(ptr, (idmef_user_category_t **) ret); case 2: { int i = 0; prelude_list_t *tmp; if ( n == IDMEF_LIST_APPEND || n == IDMEF_LIST_PREPEND ) return idmef_user_new_user_id(ptr, (idmef_user_id_t **) ret, n); if ( n >= 0 ) { prelude_list_for_each(&ptr->user_id_list, tmp) { if ( i++ == n ) { *ret = prelude_list_entry(tmp, idmef_user_id_t, list); return 0; } } if ( i != n ) return prelude_error(PRELUDE_ERROR_IDMEF_TREE_INDEX_UNDEFINED); } else { int pos = (-n) - 1; /* With negative value, -1 is the base, translate to 0 */ prelude_list_for_each_reversed(&ptr->user_id_list, tmp) { if ( i++ == pos ) { *ret = prelude_list_entry(tmp, idmef_user_id_t, list); return 0; } } if ( i != pos ) return prelude_error(PRELUDE_ERROR_IDMEF_TREE_INDEX_UNDEFINED); } return idmef_user_new_user_id(ptr, (idmef_user_id_t **) ret, n); } default: return prelude_error(PRELUDE_ERROR_IDMEF_CLASS_UNKNOWN_CHILD); } } int _idmef_user_destroy_child(void *p, idmef_class_child_id_t child, int n) { idmef_user_t *ptr = p; prelude_return_val_if_fail(p, prelude_error(PRELUDE_ERROR_ASSERTION)); switch ( child ) { case 0: if ( ptr->ident ) { prelude_string_destroy(ptr->ident); ptr->ident = NULL; } return 0; case 1: ptr->category = 0; return 0; case 2: { int i = 0; prelude_list_t *tmp; if ( n >= 0 ) { prelude_list_for_each(&ptr->user_id_list, tmp) { if ( i++ == n ) { void *b = prelude_list_entry(tmp, idmef_user_id_t, list); idmef_user_id_destroy(b); return 0; } } if ( i != n ) return prelude_error(PRELUDE_ERROR_IDMEF_TREE_INDEX_UNDEFINED); } else { int pos = (-n) - 1; /* With negative value, -1 is the base, translate to 0 */ prelude_list_for_each_reversed(&ptr->user_id_list, tmp) { if ( i++ == pos ) { void *b = prelude_list_entry(tmp, idmef_user_id_t, list); idmef_user_id_destroy(b); return 0; } } if ( i != pos ) return prelude_error(PRELUDE_ERROR_IDMEF_TREE_INDEX_UNDEFINED); } } default: return prelude_error(PRELUDE_ERROR_IDMEF_CLASS_UNKNOWN_CHILD); } } static void idmef_user_destroy_internal(idmef_user_t *ptr) { prelude_return_if_fail(ptr); if ( ptr->ident ) { prelude_string_destroy(ptr->ident); ptr->ident = NULL; } { prelude_list_t *n, *tmp; idmef_user_id_t *entry; prelude_list_for_each_safe(&ptr->user_id_list, tmp, n) { entry = prelude_list_entry(tmp, idmef_user_id_t, list); prelude_list_del_init(&entry->list); idmef_user_id_destroy(entry); } } /* free() should be done by the caller */ } /** * idmef_user_destroy: * @ptr: pointer to a #idmef_user_t object. * * Destroy @ptr and all of it's children. * The objects are only destroyed if their reference count reach zero. */ void idmef_user_destroy(idmef_user_t *ptr) { prelude_return_if_fail(ptr); if ( --ptr->refcount ) return; idmef_user_destroy_internal(ptr); free(ptr); } /** * *idmef_user_get_ident: * @ptr: pointer to a #idmef_user_t object. * * Get ident children of the #idmef_user_t object. * * Returns: a pointer to a prelude_string_t object, or NULL if the children object is not set. */ prelude_string_t *idmef_user_get_ident(idmef_user_t *ptr) { prelude_return_val_if_fail(ptr, 0); /* FIXME */ return ptr->ident; } /** * idmef_user_set_ident: * @ptr: pointer to a #idmef_user_t object. * @ident: pointer to a #prelude_string_t object. * * Set @ident object as a children of @ptr. * if @ptr already contain an @ident object, then it is destroyed, * and updated to point to the provided @ident object. */ void idmef_user_set_ident(idmef_user_t *ptr, prelude_string_t *ident) { prelude_return_if_fail(ptr); if ( ptr->ident ) prelude_string_destroy(ptr->ident); ptr->ident = ident; } /** * idmef_user_new_ident: * @ptr: pointer to a #idmef_user_t object. * @ret: pointer to an address where to store the created #prelude_string_t object. * * Create a new ident object, children of #idmef_user_t. * If @ptr already contain a #prelude_string_t object, then it is destroyed. * * Returns: 0 on success, or a negative value if an error occured. */ int idmef_user_new_ident(idmef_user_t *ptr, prelude_string_t **ret) { int retval; prelude_return_val_if_fail(ptr, prelude_error(PRELUDE_ERROR_ASSERTION)); if ( ! ptr->ident ) { retval = prelude_string_new(&ptr->ident); if ( retval < 0 ) return retval; } *ret = ptr->ident; return 0; } /** * idmef_user_get_category: * @ptr: pointer to a #idmef_user_t object. * * Get category children of the #idmef_user_t object. * * Returns: a pointer to a idmef_user_category_t object, or NULL if the children object is not set. */ idmef_user_category_t idmef_user_get_category(idmef_user_t *ptr) { prelude_return_val_if_fail(ptr, 0); /* FIXME */ return ptr->category; } /** * idmef_user_set_category: * @ptr: pointer to a #idmef_user_t object. * @category: pointer to a #idmef_user_category_t object. * * Set @category object as a children of @ptr. * if @ptr already contain an @category object, then it is destroyed, * and updated to point to the provided @category object. */ void idmef_user_set_category(idmef_user_t *ptr, idmef_user_category_t category) { prelude_return_if_fail(ptr); ptr->category = category; } /** * idmef_user_new_category: * @ptr: pointer to a #idmef_user_t object. * @ret: pointer to an address where to store the created #idmef_user_category_t object. * * Create a new category object, children of #idmef_user_t. * If @ptr already contain a #idmef_user_category_t object, then it is destroyed. * * Returns: 0 on success, or a negative value if an error occured. */ int idmef_user_new_category(idmef_user_t *ptr, idmef_user_category_t **ret) { prelude_return_val_if_fail(ptr, prelude_error(PRELUDE_ERROR_ASSERTION)); *ret = &ptr->category; return 0; } /** * idmef_user_get_next_user_id: * @user: pointer to a #idmef_user_t object. * @user_id_cur: pointer to a #idmef_user_id_t object. * * Get the next #idmef_user_id_t object listed in @ptr. * When iterating over the idmef_user_id_t object listed in @ptr, * @object should be set to the latest returned #idmef_user_id_t object. * * Returns: the next #idmef_user_id_t in the list. */ idmef_user_id_t *idmef_user_get_next_user_id(idmef_user_t *user, idmef_user_id_t *user_id_cur) { prelude_list_t *tmp = (user_id_cur) ? &user_id_cur->list : NULL; prelude_return_val_if_fail(user, NULL); prelude_list_for_each_continue(&user->user_id_list, tmp) return prelude_list_entry(tmp, idmef_user_id_t, list); return NULL; } /** * idmef_user_set_user_id: * @ptr: pointer to a #idmef_user_t object. * @object: pointer to a #idmef_user_id_t object. * @pos: Position in the list. * * Add @object to position @pos of @ptr list of #idmef_user_id_t object. * * If @pos is #IDMEF_LIST_APPEND, @object will be inserted at the tail of the list. * If @pos is #IDMEF_LIST_PREPEND, @object will be inserted at the head of the list. */ void idmef_user_set_user_id(idmef_user_t *ptr, idmef_user_id_t *object, int pos) { prelude_return_if_fail(ptr); prelude_return_if_fail(object); if ( ! prelude_list_is_empty(&object->list) ) prelude_list_del_init(&object->list); list_insert(&ptr->user_id_list, &object->list, pos); } /** * idmef_user_new_user_id: * @ptr: pointer to a #idmef_user_t object. * @ret: pointer to an address where to store the created #idmef_user_id_t object. * @pos: position in the list. * * Create a new #idmef_user_id_t children of @ptr, and add it to position @pos of * @ptr list of #idmef_user_id_t object. The created #idmef_user_id_t object is * stored in @ret. * * If @pos is #IDMEF_LIST_APPEND, @object will be inserted at the tail of the list. * If @pos is #IDMEF_LIST_PREPEND, @object will be inserted at the head of the list. * * Returns: 0 on success, or a negative value if an error occured. */ int idmef_user_new_user_id(idmef_user_t *ptr, idmef_user_id_t **ret, int pos) { int retval; prelude_return_val_if_fail(ptr, prelude_error(PRELUDE_ERROR_ASSERTION)); retval = idmef_user_id_new(ret); if ( retval < 0 ) return retval; list_insert(&ptr->user_id_list, &(*ret)->list, pos); return 0; } /** * idmef_user_copy: * @src: Source of the copy. * @dst: Where to copy the object. * * Copy a new #idmef_user_t object from @src to @dst. * * Returns: 0 on success, a negative value if an error occured. */ int idmef_user_copy(const idmef_user_t *src, idmef_user_t *dst) { int ret; prelude_return_val_if_fail(src, prelude_error(PRELUDE_ERROR_ASSERTION)); prelude_return_val_if_fail(dst, prelude_error(PRELUDE_ERROR_ASSERTION)); ret = 0; if ( src->ident ) { ret = prelude_string_clone(src->ident, &dst->ident); if ( ret < 0 ) return ret; } dst->category = src->category; { prelude_list_t *n, *tmp; idmef_user_id_t *entry, *new; prelude_list_for_each_safe(&src->user_id_list, tmp, n) { entry = prelude_list_entry(tmp, idmef_user_id_t, list); idmef_user_id_clone(entry, &new); prelude_list_add_tail(&dst->user_id_list, &new->list); } } return 0; } /** * idmef_user_clone: * @src: Object to be cloned. * @dst: Address where to store the pointer to the cloned object. * * Create a copy of @src, and store it in @dst. * * Returns: 0 on success, a negative value if an error occured. */ int idmef_user_clone(idmef_user_t *src, idmef_user_t **dst) { int ret; prelude_return_val_if_fail(src, prelude_error(PRELUDE_ERROR_ASSERTION)); ret = idmef_user_new(dst); if ( ret < 0 ) return ret; return idmef_user_copy(src, *dst); } /** * idmef_user_compare: * @obj1: Object to compare with @obj2. * @obj2: Object to compare with @obj1. * * Compare @obj1 with @obj2. * * Returns: 0 on match, a negative value on comparison failure. */ int idmef_user_compare(const idmef_user_t *obj1, const idmef_user_t *obj2) { int ret = 0; if ( obj1 == NULL && obj2 == NULL ) return 0; else if ( obj1 == NULL || obj2 == NULL ) return -1; ret = prelude_string_compare(obj1->ident, obj2->ident); if ( ret != 0 ) return ret; if ( obj1->category != obj2->category ) return -1; { prelude_list_t *tmp1, *tmp2; idmef_user_id_t *entry1, *entry2; tmp1 = tmp2 = NULL; do { entry1 = entry2 = NULL; prelude_list_for_each_continue(&obj1->user_id_list, tmp1) { entry1 = prelude_list_entry(tmp1, idmef_user_id_t, list); break; } prelude_list_for_each_continue(&obj2->user_id_list, tmp2) { entry2 = prelude_list_entry(tmp2, idmef_user_id_t, list); break; } ret = idmef_user_id_compare(entry1, entry2); if ( ret != 0 ) return ret; } while ( entry1 && entry2 ); } return ret; } /** * idmef_address_new: * @ret: Pointer where to store the created #idmef_address_t object. * * Create a new #idmef_address_t object. * * Returns: 0 on success, a negative value if an error occured. */ int idmef_address_new(idmef_address_t **ret) { *ret = calloc(1, sizeof(**ret)); if ( ! *ret ) return prelude_error_from_errno(errno); prelude_list_init(&(*ret)->list); (*ret)->refcount = 1; { int retval = prelude_string_new(&(*ret)->address); if ( retval < 0 ) { idmef_address_destroy(*ret); *ret = NULL; return retval; } } return 0; } /** * idmef_address_ref: * @address: pointer to a #idmef_address_t object. * * Increase @address reference count, so that it can be referenced * multiple time. * * Returns: a pointer to @address. */ idmef_address_t *idmef_address_ref(idmef_address_t *address) { prelude_return_val_if_fail(address, NULL); address->refcount++; return address; } int _idmef_address_get_child(void *p, idmef_class_child_id_t child, void **childptr) { idmef_address_t *ptr = p; prelude_return_val_if_fail(p, prelude_error(PRELUDE_ERROR_ASSERTION)); *childptr = NULL; switch ( child ) { case 0: return get_value_from_string((idmef_value_t **) childptr, ptr->ident, TRUE); case 1: return idmef_value_new_enum_from_numeric((idmef_value_t **) childptr, IDMEF_CLASS_ID_ADDRESS_CATEGORY, ptr->category); case 2: return get_value_from_string((idmef_value_t **) childptr, ptr->vlan_name, TRUE); case 3: return (ptr->vlan_num_is_set) ? idmef_value_new_int32((idmef_value_t **) childptr, ptr->vlan_num) : 0; case 4: return get_value_from_string((idmef_value_t **) childptr, ptr->address, TRUE); case 5: return get_value_from_string((idmef_value_t **) childptr, ptr->netmask, TRUE); default: return prelude_error(PRELUDE_ERROR_IDMEF_CLASS_UNKNOWN_CHILD); } } int _idmef_address_new_child(void *p, idmef_class_child_id_t child, int n, void **ret) { idmef_address_t *ptr = p; prelude_return_val_if_fail(p, prelude_error(PRELUDE_ERROR_ASSERTION)); switch ( child ) { case 0: return idmef_address_new_ident(ptr, (prelude_string_t **) ret); case 1: return idmef_address_new_category(ptr, (idmef_address_category_t **) ret); case 2: return idmef_address_new_vlan_name(ptr, (prelude_string_t **) ret); case 3: return idmef_address_new_vlan_num(ptr, (int32_t **) ret); case 4: return idmef_address_new_address(ptr, (prelude_string_t **) ret); case 5: return idmef_address_new_netmask(ptr, (prelude_string_t **) ret); default: return prelude_error(PRELUDE_ERROR_IDMEF_CLASS_UNKNOWN_CHILD); } } int _idmef_address_destroy_child(void *p, idmef_class_child_id_t child, int n) { idmef_address_t *ptr = p; prelude_return_val_if_fail(p, prelude_error(PRELUDE_ERROR_ASSERTION)); switch ( child ) { case 0: if ( ptr->ident ) { prelude_string_destroy(ptr->ident); ptr->ident = NULL; } return 0; case 1: ptr->category = 0; return 0; case 2: if ( ptr->vlan_name ) { prelude_string_destroy(ptr->vlan_name); ptr->vlan_name = NULL; } return 0; case 3: ptr->vlan_num_is_set = 0; return 0; case 4: if ( ptr->address ) { prelude_string_destroy(ptr->address); ptr->address = NULL; } return 0; case 5: if ( ptr->netmask ) { prelude_string_destroy(ptr->netmask); ptr->netmask = NULL; } return 0; default: return prelude_error(PRELUDE_ERROR_IDMEF_CLASS_UNKNOWN_CHILD); } } static void idmef_address_destroy_internal(idmef_address_t *ptr) { prelude_return_if_fail(ptr); if ( ! prelude_list_is_empty(&ptr->list) ) prelude_list_del_init(&ptr->list); if ( ptr->ident ) { prelude_string_destroy(ptr->ident); ptr->ident = NULL; } if ( ptr->vlan_name ) { prelude_string_destroy(ptr->vlan_name); ptr->vlan_name = NULL; } if ( ptr->address ) { prelude_string_destroy(ptr->address); ptr->address = NULL; } if ( ptr->netmask ) { prelude_string_destroy(ptr->netmask); ptr->netmask = NULL; } /* free() should be done by the caller */ } /** * idmef_address_destroy: * @ptr: pointer to a #idmef_address_t object. * * Destroy @ptr and all of it's children. * The objects are only destroyed if their reference count reach zero. */ void idmef_address_destroy(idmef_address_t *ptr) { prelude_return_if_fail(ptr); if ( --ptr->refcount ) return; idmef_address_destroy_internal(ptr); free(ptr); } /** * *idmef_address_get_ident: * @ptr: pointer to a #idmef_address_t object. * * Get ident children of the #idmef_address_t object. * * Returns: a pointer to a prelude_string_t object, or NULL if the children object is not set. */ prelude_string_t *idmef_address_get_ident(idmef_address_t *ptr) { prelude_return_val_if_fail(ptr, 0); /* FIXME */ return ptr->ident; } /** * idmef_address_set_ident: * @ptr: pointer to a #idmef_address_t object. * @ident: pointer to a #prelude_string_t object. * * Set @ident object as a children of @ptr. * if @ptr already contain an @ident object, then it is destroyed, * and updated to point to the provided @ident object. */ void idmef_address_set_ident(idmef_address_t *ptr, prelude_string_t *ident) { prelude_return_if_fail(ptr); if ( ptr->ident ) prelude_string_destroy(ptr->ident); ptr->ident = ident; } /** * idmef_address_new_ident: * @ptr: pointer to a #idmef_address_t object. * @ret: pointer to an address where to store the created #prelude_string_t object. * * Create a new ident object, children of #idmef_address_t. * If @ptr already contain a #prelude_string_t object, then it is destroyed. * * Returns: 0 on success, or a negative value if an error occured. */ int idmef_address_new_ident(idmef_address_t *ptr, prelude_string_t **ret) { int retval; prelude_return_val_if_fail(ptr, prelude_error(PRELUDE_ERROR_ASSERTION)); if ( ! ptr->ident ) { retval = prelude_string_new(&ptr->ident); if ( retval < 0 ) return retval; } *ret = ptr->ident; return 0; } /** * idmef_address_get_category: * @ptr: pointer to a #idmef_address_t object. * * Get category children of the #idmef_address_t object. * * Returns: a pointer to a idmef_address_category_t object, or NULL if the children object is not set. */ idmef_address_category_t idmef_address_get_category(idmef_address_t *ptr) { prelude_return_val_if_fail(ptr, 0); /* FIXME */ return ptr->category; } /** * idmef_address_set_category: * @ptr: pointer to a #idmef_address_t object. * @category: pointer to a #idmef_address_category_t object. * * Set @category object as a children of @ptr. * if @ptr already contain an @category object, then it is destroyed, * and updated to point to the provided @category object. */ void idmef_address_set_category(idmef_address_t *ptr, idmef_address_category_t category) { prelude_return_if_fail(ptr); ptr->category = category; } /** * idmef_address_new_category: * @ptr: pointer to a #idmef_address_t object. * @ret: pointer to an address where to store the created #idmef_address_category_t object. * * Create a new category object, children of #idmef_address_t. * If @ptr already contain a #idmef_address_category_t object, then it is destroyed. * * Returns: 0 on success, or a negative value if an error occured. */ int idmef_address_new_category(idmef_address_t *ptr, idmef_address_category_t **ret) { prelude_return_val_if_fail(ptr, prelude_error(PRELUDE_ERROR_ASSERTION)); *ret = &ptr->category; return 0; } /** * *idmef_address_get_vlan_name: * @ptr: pointer to a #idmef_address_t object. * * Get vlan_name children of the #idmef_address_t object. * * Returns: a pointer to a prelude_string_t object, or NULL if the children object is not set. */ prelude_string_t *idmef_address_get_vlan_name(idmef_address_t *ptr) { prelude_return_val_if_fail(ptr, 0); /* FIXME */ return ptr->vlan_name; } /** * idmef_address_set_vlan_name: * @ptr: pointer to a #idmef_address_t object. * @vlan_name: pointer to a #prelude_string_t object. * * Set @vlan_name object as a children of @ptr. * if @ptr already contain an @vlan_name object, then it is destroyed, * and updated to point to the provided @vlan_name object. */ void idmef_address_set_vlan_name(idmef_address_t *ptr, prelude_string_t *vlan_name) { prelude_return_if_fail(ptr); if ( ptr->vlan_name ) prelude_string_destroy(ptr->vlan_name); ptr->vlan_name = vlan_name; } /** * idmef_address_new_vlan_name: * @ptr: pointer to a #idmef_address_t object. * @ret: pointer to an address where to store the created #prelude_string_t object. * * Create a new vlan_name object, children of #idmef_address_t. * If @ptr already contain a #prelude_string_t object, then it is destroyed. * * Returns: 0 on success, or a negative value if an error occured. */ int idmef_address_new_vlan_name(idmef_address_t *ptr, prelude_string_t **ret) { int retval; prelude_return_val_if_fail(ptr, prelude_error(PRELUDE_ERROR_ASSERTION)); if ( ! ptr->vlan_name ) { retval = prelude_string_new(&ptr->vlan_name); if ( retval < 0 ) return retval; } *ret = ptr->vlan_name; return 0; } /** * *idmef_address_get_vlan_num: * @ptr: pointer to a #idmef_address_t object. * * Get vlan_num children of the #idmef_address_t object. * * Returns: a pointer to a int32_t object, or NULL if the children object is not set. */ int32_t *idmef_address_get_vlan_num(idmef_address_t *ptr) { prelude_return_val_if_fail(ptr, 0); /* FIXME */ return ptr->vlan_num_is_set ? &ptr->vlan_num : NULL; } /** * idmef_address_set_vlan_num: * @ptr: pointer to a #idmef_address_t object. * @vlan_num: pointer to a #int32_t object. * * Set @vlan_num object as a children of @ptr. * if @ptr already contain an @vlan_num object, then it is destroyed, * and updated to point to the provided @vlan_num object. */ void idmef_address_set_vlan_num(idmef_address_t *ptr, int32_t vlan_num) { prelude_return_if_fail(ptr); ptr->vlan_num = vlan_num; ptr->vlan_num_is_set = 1; } void idmef_address_unset_vlan_num(idmef_address_t *ptr) { prelude_return_if_fail(ptr); ptr->vlan_num_is_set = 0; } /** * idmef_address_new_vlan_num: * @ptr: pointer to a #idmef_address_t object. * @ret: pointer to an address where to store the created #int32_t object. * * Create a new vlan_num object, children of #idmef_address_t. * If @ptr already contain a #int32_t object, then it is destroyed. * * Returns: 0 on success, or a negative value if an error occured. */ int idmef_address_new_vlan_num(idmef_address_t *ptr, int32_t **ret) { prelude_return_val_if_fail(ptr, prelude_error(PRELUDE_ERROR_ASSERTION)); ptr->vlan_num_is_set = 1; *ret = &ptr->vlan_num; return 0; } /** * *idmef_address_get_address: * @ptr: pointer to a #idmef_address_t object. * * Get address children of the #idmef_address_t object. * * Returns: a pointer to a prelude_string_t object, or NULL if the children object is not set. */ prelude_string_t *idmef_address_get_address(idmef_address_t *ptr) { prelude_return_val_if_fail(ptr, 0); /* FIXME */ return ptr->address; } /** * idmef_address_set_address: * @ptr: pointer to a #idmef_address_t object. * @address: pointer to a #prelude_string_t object. * * Set @address object as a children of @ptr. * if @ptr already contain an @address object, then it is destroyed, * and updated to point to the provided @address object. */ void idmef_address_set_address(idmef_address_t *ptr, prelude_string_t *address) { prelude_return_if_fail(ptr); if ( ptr->address ) prelude_string_destroy(ptr->address); ptr->address = address; } /** * idmef_address_new_address: * @ptr: pointer to a #idmef_address_t object. * @ret: pointer to an address where to store the created #prelude_string_t object. * * Create a new address object, children of #idmef_address_t. * If @ptr already contain a #prelude_string_t object, then it is destroyed. * * Returns: 0 on success, or a negative value if an error occured. */ int idmef_address_new_address(idmef_address_t *ptr, prelude_string_t **ret) { int retval; prelude_return_val_if_fail(ptr, prelude_error(PRELUDE_ERROR_ASSERTION)); if ( ! ptr->address ) { retval = prelude_string_new(&ptr->address); if ( retval < 0 ) return retval; } *ret = ptr->address; return 0; } /** * *idmef_address_get_netmask: * @ptr: pointer to a #idmef_address_t object. * * Get netmask children of the #idmef_address_t object. * * Returns: a pointer to a prelude_string_t object, or NULL if the children object is not set. */ prelude_string_t *idmef_address_get_netmask(idmef_address_t *ptr) { prelude_return_val_if_fail(ptr, 0); /* FIXME */ return ptr->netmask; } /** * idmef_address_set_netmask: * @ptr: pointer to a #idmef_address_t object. * @netmask: pointer to a #prelude_string_t object. * * Set @netmask object as a children of @ptr. * if @ptr already contain an @netmask object, then it is destroyed, * and updated to point to the provided @netmask object. */ void idmef_address_set_netmask(idmef_address_t *ptr, prelude_string_t *netmask) { prelude_return_if_fail(ptr); if ( ptr->netmask ) prelude_string_destroy(ptr->netmask); ptr->netmask = netmask; } /** * idmef_address_new_netmask: * @ptr: pointer to a #idmef_address_t object. * @ret: pointer to an address where to store the created #prelude_string_t object. * * Create a new netmask object, children of #idmef_address_t. * If @ptr already contain a #prelude_string_t object, then it is destroyed. * * Returns: 0 on success, or a negative value if an error occured. */ int idmef_address_new_netmask(idmef_address_t *ptr, prelude_string_t **ret) { int retval; prelude_return_val_if_fail(ptr, prelude_error(PRELUDE_ERROR_ASSERTION)); if ( ! ptr->netmask ) { retval = prelude_string_new(&ptr->netmask); if ( retval < 0 ) return retval; } *ret = ptr->netmask; return 0; } /** * idmef_address_copy: * @src: Source of the copy. * @dst: Where to copy the object. * * Copy a new #idmef_address_t object from @src to @dst. * * Returns: 0 on success, a negative value if an error occured. */ int idmef_address_copy(const idmef_address_t *src, idmef_address_t *dst) { int ret; prelude_return_val_if_fail(src, prelude_error(PRELUDE_ERROR_ASSERTION)); prelude_return_val_if_fail(dst, prelude_error(PRELUDE_ERROR_ASSERTION)); ret = 0; if ( src->ident ) { ret = prelude_string_clone(src->ident, &dst->ident); if ( ret < 0 ) return ret; } dst->category = src->category; if ( src->vlan_name ) { ret = prelude_string_clone(src->vlan_name, &dst->vlan_name); if ( ret < 0 ) return ret; } dst->vlan_num_is_set = src->vlan_num_is_set; dst->vlan_num = src->vlan_num; if ( src->address ) { ret = prelude_string_copy(src->address, dst->address); if ( ret < 0 ) return ret; } if ( src->netmask ) { ret = prelude_string_clone(src->netmask, &dst->netmask); if ( ret < 0 ) return ret; } return 0; } /** * idmef_address_clone: * @src: Object to be cloned. * @dst: Address where to store the pointer to the cloned object. * * Create a copy of @src, and store it in @dst. * * Returns: 0 on success, a negative value if an error occured. */ int idmef_address_clone(idmef_address_t *src, idmef_address_t **dst) { int ret; prelude_return_val_if_fail(src, prelude_error(PRELUDE_ERROR_ASSERTION)); ret = idmef_address_new(dst); if ( ret < 0 ) return ret; return idmef_address_copy(src, *dst); } /** * idmef_address_compare: * @obj1: Object to compare with @obj2. * @obj2: Object to compare with @obj1. * * Compare @obj1 with @obj2. * * Returns: 0 on match, a negative value on comparison failure. */ int idmef_address_compare(const idmef_address_t *obj1, const idmef_address_t *obj2) { int ret = 0; if ( obj1 == NULL && obj2 == NULL ) return 0; else if ( obj1 == NULL || obj2 == NULL ) return -1; ret = prelude_string_compare(obj1->ident, obj2->ident); if ( ret != 0 ) return ret; if ( obj1->category != obj2->category ) return -1; ret = prelude_string_compare(obj1->vlan_name, obj2->vlan_name); if ( ret != 0 ) return ret; if ( obj1->vlan_num_is_set != obj2->vlan_num_is_set ) return -1; if ( obj1->vlan_num_is_set && obj1->vlan_num != obj2->vlan_num ) return -1; ret = prelude_string_compare(obj1->address, obj2->address); if ( ret != 0 ) return ret; ret = prelude_string_compare(obj1->netmask, obj2->netmask); if ( ret != 0 ) return ret; return ret; } /** * idmef_process_new: * @ret: Pointer where to store the created #idmef_process_t object. * * Create a new #idmef_process_t object. * * Returns: 0 on success, a negative value if an error occured. */ int idmef_process_new(idmef_process_t **ret) { *ret = calloc(1, sizeof(**ret)); if ( ! *ret ) return prelude_error_from_errno(errno); (*ret)->refcount = 1; prelude_list_init(&(*ret)->arg_list); prelude_list_init(&(*ret)->env_list); { int retval = prelude_string_new(&(*ret)->name); if ( retval < 0 ) { idmef_process_destroy(*ret); *ret = NULL; return retval; } } return 0; } /** * idmef_process_ref: * @process: pointer to a #idmef_process_t object. * * Increase @process reference count, so that it can be referenced * multiple time. * * Returns: a pointer to @process. */ idmef_process_t *idmef_process_ref(idmef_process_t *process) { prelude_return_val_if_fail(process, NULL); process->refcount++; return process; } int _idmef_process_get_child(void *p, idmef_class_child_id_t child, void **childptr) { idmef_process_t *ptr = p; prelude_return_val_if_fail(p, prelude_error(PRELUDE_ERROR_ASSERTION)); *childptr = NULL; switch ( child ) { case 0: return get_value_from_string((idmef_value_t **) childptr, ptr->ident, TRUE); case 1: return get_value_from_string((idmef_value_t **) childptr, ptr->name, TRUE); case 2: return (ptr->pid_is_set) ? idmef_value_new_uint32((idmef_value_t **) childptr, ptr->pid) : 0; case 3: return get_value_from_string((idmef_value_t **) childptr, ptr->path, TRUE); case 4: *childptr = &ptr->arg_list; return 0; case 5: *childptr = &ptr->env_list; return 0; default: return prelude_error(PRELUDE_ERROR_IDMEF_CLASS_UNKNOWN_CHILD); } } int _idmef_process_new_child(void *p, idmef_class_child_id_t child, int n, void **ret) { idmef_process_t *ptr = p; prelude_return_val_if_fail(p, prelude_error(PRELUDE_ERROR_ASSERTION)); switch ( child ) { case 0: return idmef_process_new_ident(ptr, (prelude_string_t **) ret); case 1: return idmef_process_new_name(ptr, (prelude_string_t **) ret); case 2: return idmef_process_new_pid(ptr, (uint32_t **) ret); case 3: return idmef_process_new_path(ptr, (prelude_string_t **) ret); case 4: { int i = 0; prelude_list_t *tmp; if ( n == IDMEF_LIST_APPEND || n == IDMEF_LIST_PREPEND ) return idmef_process_new_arg(ptr, (prelude_string_t **) ret, n); if ( n >= 0 ) { prelude_list_for_each(&ptr->arg_list, tmp) { if ( i++ == n ) { *ret = prelude_list_entry(tmp, prelude_string_t, list); return 0; } } if ( i != n ) return prelude_error(PRELUDE_ERROR_IDMEF_TREE_INDEX_UNDEFINED); } else { int pos = (-n) - 1; /* With negative value, -1 is the base, translate to 0 */ prelude_list_for_each_reversed(&ptr->arg_list, tmp) { if ( i++ == pos ) { *ret = prelude_list_entry(tmp, prelude_string_t, list); return 0; } } if ( i != pos ) return prelude_error(PRELUDE_ERROR_IDMEF_TREE_INDEX_UNDEFINED); } return idmef_process_new_arg(ptr, (prelude_string_t **) ret, n); } case 5: { int i = 0; prelude_list_t *tmp; if ( n == IDMEF_LIST_APPEND || n == IDMEF_LIST_PREPEND ) return idmef_process_new_env(ptr, (prelude_string_t **) ret, n); if ( n >= 0 ) { prelude_list_for_each(&ptr->env_list, tmp) { if ( i++ == n ) { *ret = prelude_list_entry(tmp, prelude_string_t, list); return 0; } } if ( i != n ) return prelude_error(PRELUDE_ERROR_IDMEF_TREE_INDEX_UNDEFINED); } else { int pos = (-n) - 1; /* With negative value, -1 is the base, translate to 0 */ prelude_list_for_each_reversed(&ptr->env_list, tmp) { if ( i++ == pos ) { *ret = prelude_list_entry(tmp, prelude_string_t, list); return 0; } } if ( i != pos ) return prelude_error(PRELUDE_ERROR_IDMEF_TREE_INDEX_UNDEFINED); } return idmef_process_new_env(ptr, (prelude_string_t **) ret, n); } default: return prelude_error(PRELUDE_ERROR_IDMEF_CLASS_UNKNOWN_CHILD); } } int _idmef_process_destroy_child(void *p, idmef_class_child_id_t child, int n) { idmef_process_t *ptr = p; prelude_return_val_if_fail(p, prelude_error(PRELUDE_ERROR_ASSERTION)); switch ( child ) { case 0: if ( ptr->ident ) { prelude_string_destroy(ptr->ident); ptr->ident = NULL; } return 0; case 1: if ( ptr->name ) { prelude_string_destroy(ptr->name); ptr->name = NULL; } return 0; case 2: ptr->pid_is_set = 0; return 0; case 3: if ( ptr->path ) { prelude_string_destroy(ptr->path); ptr->path = NULL; } return 0; case 4: { int i = 0; prelude_list_t *tmp; if ( n >= 0 ) { prelude_list_for_each(&ptr->arg_list, tmp) { if ( i++ == n ) { void *b = prelude_list_entry(tmp, prelude_string_t, list); prelude_string_destroy(b); return 0; } } if ( i != n ) return prelude_error(PRELUDE_ERROR_IDMEF_TREE_INDEX_UNDEFINED); } else { int pos = (-n) - 1; /* With negative value, -1 is the base, translate to 0 */ prelude_list_for_each_reversed(&ptr->arg_list, tmp) { if ( i++ == pos ) { void *b = prelude_list_entry(tmp, prelude_string_t, list); prelude_string_destroy(b); return 0; } } if ( i != pos ) return prelude_error(PRELUDE_ERROR_IDMEF_TREE_INDEX_UNDEFINED); } } case 5: { int i = 0; prelude_list_t *tmp; if ( n >= 0 ) { prelude_list_for_each(&ptr->env_list, tmp) { if ( i++ == n ) { void *b = prelude_list_entry(tmp, prelude_string_t, list); prelude_string_destroy(b); return 0; } } if ( i != n ) return prelude_error(PRELUDE_ERROR_IDMEF_TREE_INDEX_UNDEFINED); } else { int pos = (-n) - 1; /* With negative value, -1 is the base, translate to 0 */ prelude_list_for_each_reversed(&ptr->env_list, tmp) { if ( i++ == pos ) { void *b = prelude_list_entry(tmp, prelude_string_t, list); prelude_string_destroy(b); return 0; } } if ( i != pos ) return prelude_error(PRELUDE_ERROR_IDMEF_TREE_INDEX_UNDEFINED); } } default: return prelude_error(PRELUDE_ERROR_IDMEF_CLASS_UNKNOWN_CHILD); } } static void idmef_process_destroy_internal(idmef_process_t *ptr) { prelude_return_if_fail(ptr); if ( ptr->ident ) { prelude_string_destroy(ptr->ident); ptr->ident = NULL; } if ( ptr->name ) { prelude_string_destroy(ptr->name); ptr->name = NULL; } if ( ptr->path ) { prelude_string_destroy(ptr->path); ptr->path = NULL; } { prelude_list_t *n, *tmp; prelude_string_t *entry; prelude_list_for_each_safe(&ptr->arg_list, tmp, n) { entry = prelude_list_entry(tmp, prelude_string_t, list); prelude_list_del_init(&entry->list); prelude_string_destroy(entry); } } { prelude_list_t *n, *tmp; prelude_string_t *entry; prelude_list_for_each_safe(&ptr->env_list, tmp, n) { entry = prelude_list_entry(tmp, prelude_string_t, list); prelude_list_del_init(&entry->list); prelude_string_destroy(entry); } } /* free() should be done by the caller */ } /** * idmef_process_destroy: * @ptr: pointer to a #idmef_process_t object. * * Destroy @ptr and all of it's children. * The objects are only destroyed if their reference count reach zero. */ void idmef_process_destroy(idmef_process_t *ptr) { prelude_return_if_fail(ptr); if ( --ptr->refcount ) return; idmef_process_destroy_internal(ptr); free(ptr); } /** * *idmef_process_get_ident: * @ptr: pointer to a #idmef_process_t object. * * Get ident children of the #idmef_process_t object. * * Returns: a pointer to a prelude_string_t object, or NULL if the children object is not set. */ prelude_string_t *idmef_process_get_ident(idmef_process_t *ptr) { prelude_return_val_if_fail(ptr, 0); /* FIXME */ return ptr->ident; } /** * idmef_process_set_ident: * @ptr: pointer to a #idmef_process_t object. * @ident: pointer to a #prelude_string_t object. * * Set @ident object as a children of @ptr. * if @ptr already contain an @ident object, then it is destroyed, * and updated to point to the provided @ident object. */ void idmef_process_set_ident(idmef_process_t *ptr, prelude_string_t *ident) { prelude_return_if_fail(ptr); if ( ptr->ident ) prelude_string_destroy(ptr->ident); ptr->ident = ident; } /** * idmef_process_new_ident: * @ptr: pointer to a #idmef_process_t object. * @ret: pointer to an address where to store the created #prelude_string_t object. * * Create a new ident object, children of #idmef_process_t. * If @ptr already contain a #prelude_string_t object, then it is destroyed. * * Returns: 0 on success, or a negative value if an error occured. */ int idmef_process_new_ident(idmef_process_t *ptr, prelude_string_t **ret) { int retval; prelude_return_val_if_fail(ptr, prelude_error(PRELUDE_ERROR_ASSERTION)); if ( ! ptr->ident ) { retval = prelude_string_new(&ptr->ident); if ( retval < 0 ) return retval; } *ret = ptr->ident; return 0; } /** * *idmef_process_get_name: * @ptr: pointer to a #idmef_process_t object. * * Get name children of the #idmef_process_t object. * * Returns: a pointer to a prelude_string_t object, or NULL if the children object is not set. */ prelude_string_t *idmef_process_get_name(idmef_process_t *ptr) { prelude_return_val_if_fail(ptr, 0); /* FIXME */ return ptr->name; } /** * idmef_process_set_name: * @ptr: pointer to a #idmef_process_t object. * @name: pointer to a #prelude_string_t object. * * Set @name object as a children of @ptr. * if @ptr already contain an @name object, then it is destroyed, * and updated to point to the provided @name object. */ void idmef_process_set_name(idmef_process_t *ptr, prelude_string_t *name) { prelude_return_if_fail(ptr); if ( ptr->name ) prelude_string_destroy(ptr->name); ptr->name = name; } /** * idmef_process_new_name: * @ptr: pointer to a #idmef_process_t object. * @ret: pointer to an address where to store the created #prelude_string_t object. * * Create a new name object, children of #idmef_process_t. * If @ptr already contain a #prelude_string_t object, then it is destroyed. * * Returns: 0 on success, or a negative value if an error occured. */ int idmef_process_new_name(idmef_process_t *ptr, prelude_string_t **ret) { int retval; prelude_return_val_if_fail(ptr, prelude_error(PRELUDE_ERROR_ASSERTION)); if ( ! ptr->name ) { retval = prelude_string_new(&ptr->name); if ( retval < 0 ) return retval; } *ret = ptr->name; return 0; } /** * *idmef_process_get_pid: * @ptr: pointer to a #idmef_process_t object. * * Get pid children of the #idmef_process_t object. * * Returns: a pointer to a uint32_t object, or NULL if the children object is not set. */ uint32_t *idmef_process_get_pid(idmef_process_t *ptr) { prelude_return_val_if_fail(ptr, 0); /* FIXME */ return ptr->pid_is_set ? &ptr->pid : NULL; } /** * idmef_process_set_pid: * @ptr: pointer to a #idmef_process_t object. * @pid: pointer to a #uint32_t object. * * Set @pid object as a children of @ptr. * if @ptr already contain an @pid object, then it is destroyed, * and updated to point to the provided @pid object. */ void idmef_process_set_pid(idmef_process_t *ptr, uint32_t pid) { prelude_return_if_fail(ptr); ptr->pid = pid; ptr->pid_is_set = 1; } void idmef_process_unset_pid(idmef_process_t *ptr) { prelude_return_if_fail(ptr); ptr->pid_is_set = 0; } /** * idmef_process_new_pid: * @ptr: pointer to a #idmef_process_t object. * @ret: pointer to an address where to store the created #uint32_t object. * * Create a new pid object, children of #idmef_process_t. * If @ptr already contain a #uint32_t object, then it is destroyed. * * Returns: 0 on success, or a negative value if an error occured. */ int idmef_process_new_pid(idmef_process_t *ptr, uint32_t **ret) { prelude_return_val_if_fail(ptr, prelude_error(PRELUDE_ERROR_ASSERTION)); ptr->pid_is_set = 1; *ret = &ptr->pid; return 0; } /** * *idmef_process_get_path: * @ptr: pointer to a #idmef_process_t object. * * Get path children of the #idmef_process_t object. * * Returns: a pointer to a prelude_string_t object, or NULL if the children object is not set. */ prelude_string_t *idmef_process_get_path(idmef_process_t *ptr) { prelude_return_val_if_fail(ptr, 0); /* FIXME */ return ptr->path; } /** * idmef_process_set_path: * @ptr: pointer to a #idmef_process_t object. * @path: pointer to a #prelude_string_t object. * * Set @path object as a children of @ptr. * if @ptr already contain an @path object, then it is destroyed, * and updated to point to the provided @path object. */ void idmef_process_set_path(idmef_process_t *ptr, prelude_string_t *path) { prelude_return_if_fail(ptr); if ( ptr->path ) prelude_string_destroy(ptr->path); ptr->path = path; } /** * idmef_process_new_path: * @ptr: pointer to a #idmef_process_t object. * @ret: pointer to an address where to store the created #prelude_string_t object. * * Create a new path object, children of #idmef_process_t. * If @ptr already contain a #prelude_string_t object, then it is destroyed. * * Returns: 0 on success, or a negative value if an error occured. */ int idmef_process_new_path(idmef_process_t *ptr, prelude_string_t **ret) { int retval; prelude_return_val_if_fail(ptr, prelude_error(PRELUDE_ERROR_ASSERTION)); if ( ! ptr->path ) { retval = prelude_string_new(&ptr->path); if ( retval < 0 ) return retval; } *ret = ptr->path; return 0; } /** * idmef_process_get_next_arg: * @process: pointer to a #idmef_process_t object. * @prelude_string_cur: pointer to a #prelude_string_t object. * * Get the next #prelude_string_t object listed in @ptr. * When iterating over the prelude_string_t object listed in @ptr, * @object should be set to the latest returned #prelude_string_t object. * * Returns: the next #prelude_string_t in the list. */ prelude_string_t *idmef_process_get_next_arg(idmef_process_t *process, prelude_string_t *prelude_string_cur) { prelude_list_t *tmp = (prelude_string_cur) ? &prelude_string_cur->list : NULL; prelude_return_val_if_fail(process, NULL); prelude_list_for_each_continue(&process->arg_list, tmp) return prelude_list_entry(tmp, prelude_string_t, list); return NULL; } /** * idmef_process_set_arg: * @ptr: pointer to a #idmef_process_t object. * @object: pointer to a #prelude_string_t object. * @pos: Position in the list. * * Add @object to position @pos of @ptr list of #prelude_string_t object. * * If @pos is #IDMEF_LIST_APPEND, @object will be inserted at the tail of the list. * If @pos is #IDMEF_LIST_PREPEND, @object will be inserted at the head of the list. */ void idmef_process_set_arg(idmef_process_t *ptr, prelude_string_t *object, int pos) { prelude_return_if_fail(ptr); prelude_return_if_fail(object); if ( ! prelude_list_is_empty(&object->list) ) prelude_list_del_init(&object->list); list_insert(&ptr->arg_list, &object->list, pos); } /** * idmef_process_new_arg: * @ptr: pointer to a #idmef_process_t object. * @ret: pointer to an address where to store the created #prelude_string_t object. * @pos: position in the list. * * Create a new #prelude_string_t children of @ptr, and add it to position @pos of * @ptr list of #prelude_string_t object. The created #prelude_string_t object is * stored in @ret. * * If @pos is #IDMEF_LIST_APPEND, @object will be inserted at the tail of the list. * If @pos is #IDMEF_LIST_PREPEND, @object will be inserted at the head of the list. * * Returns: 0 on success, or a negative value if an error occured. */ int idmef_process_new_arg(idmef_process_t *ptr, prelude_string_t **ret, int pos) { int retval; prelude_return_val_if_fail(ptr, prelude_error(PRELUDE_ERROR_ASSERTION)); retval = prelude_string_new(ret); if ( retval < 0 ) return retval; list_insert(&ptr->arg_list, &(*ret)->list, pos); return 0; } /** * idmef_process_get_next_env: * @process: pointer to a #idmef_process_t object. * @prelude_string_cur: pointer to a #prelude_string_t object. * * Get the next #prelude_string_t object listed in @ptr. * When iterating over the prelude_string_t object listed in @ptr, * @object should be set to the latest returned #prelude_string_t object. * * Returns: the next #prelude_string_t in the list. */ prelude_string_t *idmef_process_get_next_env(idmef_process_t *process, prelude_string_t *prelude_string_cur) { prelude_list_t *tmp = (prelude_string_cur) ? &prelude_string_cur->list : NULL; prelude_return_val_if_fail(process, NULL); prelude_list_for_each_continue(&process->env_list, tmp) return prelude_list_entry(tmp, prelude_string_t, list); return NULL; } /** * idmef_process_set_env: * @ptr: pointer to a #idmef_process_t object. * @object: pointer to a #prelude_string_t object. * @pos: Position in the list. * * Add @object to position @pos of @ptr list of #prelude_string_t object. * * If @pos is #IDMEF_LIST_APPEND, @object will be inserted at the tail of the list. * If @pos is #IDMEF_LIST_PREPEND, @object will be inserted at the head of the list. */ void idmef_process_set_env(idmef_process_t *ptr, prelude_string_t *object, int pos) { prelude_return_if_fail(ptr); prelude_return_if_fail(object); if ( ! prelude_list_is_empty(&object->list) ) prelude_list_del_init(&object->list); list_insert(&ptr->env_list, &object->list, pos); } /** * idmef_process_new_env: * @ptr: pointer to a #idmef_process_t object. * @ret: pointer to an address where to store the created #prelude_string_t object. * @pos: position in the list. * * Create a new #prelude_string_t children of @ptr, and add it to position @pos of * @ptr list of #prelude_string_t object. The created #prelude_string_t object is * stored in @ret. * * If @pos is #IDMEF_LIST_APPEND, @object will be inserted at the tail of the list. * If @pos is #IDMEF_LIST_PREPEND, @object will be inserted at the head of the list. * * Returns: 0 on success, or a negative value if an error occured. */ int idmef_process_new_env(idmef_process_t *ptr, prelude_string_t **ret, int pos) { int retval; prelude_return_val_if_fail(ptr, prelude_error(PRELUDE_ERROR_ASSERTION)); retval = prelude_string_new(ret); if ( retval < 0 ) return retval; list_insert(&ptr->env_list, &(*ret)->list, pos); return 0; } /** * idmef_process_copy: * @src: Source of the copy. * @dst: Where to copy the object. * * Copy a new #idmef_process_t object from @src to @dst. * * Returns: 0 on success, a negative value if an error occured. */ int idmef_process_copy(const idmef_process_t *src, idmef_process_t *dst) { int ret; prelude_return_val_if_fail(src, prelude_error(PRELUDE_ERROR_ASSERTION)); prelude_return_val_if_fail(dst, prelude_error(PRELUDE_ERROR_ASSERTION)); ret = 0; if ( src->ident ) { ret = prelude_string_clone(src->ident, &dst->ident); if ( ret < 0 ) return ret; } if ( src->name ) { ret = prelude_string_copy(src->name, dst->name); if ( ret < 0 ) return ret; } dst->pid_is_set = src->pid_is_set; dst->pid = src->pid; if ( src->path ) { ret = prelude_string_clone(src->path, &dst->path); if ( ret < 0 ) return ret; } { prelude_list_t *n, *tmp; prelude_string_t *entry, *new; prelude_list_for_each_safe(&src->arg_list, tmp, n) { entry = prelude_list_entry(tmp, prelude_string_t, list); prelude_string_clone(entry, &new); prelude_list_add_tail(&dst->arg_list, &new->list); } } { prelude_list_t *n, *tmp; prelude_string_t *entry, *new; prelude_list_for_each_safe(&src->env_list, tmp, n) { entry = prelude_list_entry(tmp, prelude_string_t, list); prelude_string_clone(entry, &new); prelude_list_add_tail(&dst->env_list, &new->list); } } return 0; } /** * idmef_process_clone: * @src: Object to be cloned. * @dst: Address where to store the pointer to the cloned object. * * Create a copy of @src, and store it in @dst. * * Returns: 0 on success, a negative value if an error occured. */ int idmef_process_clone(idmef_process_t *src, idmef_process_t **dst) { int ret; prelude_return_val_if_fail(src, prelude_error(PRELUDE_ERROR_ASSERTION)); ret = idmef_process_new(dst); if ( ret < 0 ) return ret; return idmef_process_copy(src, *dst); } /** * idmef_process_compare: * @obj1: Object to compare with @obj2. * @obj2: Object to compare with @obj1. * * Compare @obj1 with @obj2. * * Returns: 0 on match, a negative value on comparison failure. */ int idmef_process_compare(const idmef_process_t *obj1, const idmef_process_t *obj2) { int ret = 0; if ( obj1 == NULL && obj2 == NULL ) return 0; else if ( obj1 == NULL || obj2 == NULL ) return -1; ret = prelude_string_compare(obj1->ident, obj2->ident); if ( ret != 0 ) return ret; ret = prelude_string_compare(obj1->name, obj2->name); if ( ret != 0 ) return ret; if ( obj1->pid_is_set != obj2->pid_is_set ) return -1; if ( obj1->pid_is_set && obj1->pid != obj2->pid ) return -1; ret = prelude_string_compare(obj1->path, obj2->path); if ( ret != 0 ) return ret; { prelude_list_t *tmp1, *tmp2; prelude_string_t *entry1, *entry2; tmp1 = tmp2 = NULL; do { entry1 = entry2 = NULL; prelude_list_for_each_continue(&obj1->arg_list, tmp1) { entry1 = prelude_list_entry(tmp1, prelude_string_t, list); break; } prelude_list_for_each_continue(&obj2->arg_list, tmp2) { entry2 = prelude_list_entry(tmp2, prelude_string_t, list); break; } ret = prelude_string_compare(entry1, entry2); if ( ret != 0 ) return ret; } while ( entry1 && entry2 ); } { prelude_list_t *tmp1, *tmp2; prelude_string_t *entry1, *entry2; tmp1 = tmp2 = NULL; do { entry1 = entry2 = NULL; prelude_list_for_each_continue(&obj1->env_list, tmp1) { entry1 = prelude_list_entry(tmp1, prelude_string_t, list); break; } prelude_list_for_each_continue(&obj2->env_list, tmp2) { entry2 = prelude_list_entry(tmp2, prelude_string_t, list); break; } ret = prelude_string_compare(entry1, entry2); if ( ret != 0 ) return ret; } while ( entry1 && entry2 ); } return ret; } /** * idmef_web_service_new: * @ret: Pointer where to store the created #idmef_web_service_t object. * * Create a new #idmef_web_service_t object. * * Returns: 0 on success, a negative value if an error occured. */ int idmef_web_service_new(idmef_web_service_t **ret) { *ret = calloc(1, sizeof(**ret)); if ( ! *ret ) return prelude_error_from_errno(errno); (*ret)->refcount = 1; prelude_list_init(&(*ret)->arg_list); { int retval = prelude_string_new(&(*ret)->url); if ( retval < 0 ) { idmef_web_service_destroy(*ret); *ret = NULL; return retval; } } return 0; } /** * idmef_web_service_ref: * @web_service: pointer to a #idmef_web_service_t object. * * Increase @web_service reference count, so that it can be referenced * multiple time. * * Returns: a pointer to @web_service. */ idmef_web_service_t *idmef_web_service_ref(idmef_web_service_t *web_service) { prelude_return_val_if_fail(web_service, NULL); web_service->refcount++; return web_service; } int _idmef_web_service_get_child(void *p, idmef_class_child_id_t child, void **childptr) { idmef_web_service_t *ptr = p; prelude_return_val_if_fail(p, prelude_error(PRELUDE_ERROR_ASSERTION)); *childptr = NULL; switch ( child ) { case 0: return get_value_from_string((idmef_value_t **) childptr, ptr->url, TRUE); case 1: return get_value_from_string((idmef_value_t **) childptr, ptr->cgi, TRUE); case 2: return get_value_from_string((idmef_value_t **) childptr, ptr->http_method, TRUE); case 3: *childptr = &ptr->arg_list; return 0; default: return prelude_error(PRELUDE_ERROR_IDMEF_CLASS_UNKNOWN_CHILD); } } int _idmef_web_service_new_child(void *p, idmef_class_child_id_t child, int n, void **ret) { idmef_web_service_t *ptr = p; prelude_return_val_if_fail(p, prelude_error(PRELUDE_ERROR_ASSERTION)); switch ( child ) { case 0: return idmef_web_service_new_url(ptr, (prelude_string_t **) ret); case 1: return idmef_web_service_new_cgi(ptr, (prelude_string_t **) ret); case 2: return idmef_web_service_new_http_method(ptr, (prelude_string_t **) ret); case 3: { int i = 0; prelude_list_t *tmp; if ( n == IDMEF_LIST_APPEND || n == IDMEF_LIST_PREPEND ) return idmef_web_service_new_arg(ptr, (prelude_string_t **) ret, n); if ( n >= 0 ) { prelude_list_for_each(&ptr->arg_list, tmp) { if ( i++ == n ) { *ret = prelude_list_entry(tmp, prelude_string_t, list); return 0; } } if ( i != n ) return prelude_error(PRELUDE_ERROR_IDMEF_TREE_INDEX_UNDEFINED); } else { int pos = (-n) - 1; /* With negative value, -1 is the base, translate to 0 */ prelude_list_for_each_reversed(&ptr->arg_list, tmp) { if ( i++ == pos ) { *ret = prelude_list_entry(tmp, prelude_string_t, list); return 0; } } if ( i != pos ) return prelude_error(PRELUDE_ERROR_IDMEF_TREE_INDEX_UNDEFINED); } return idmef_web_service_new_arg(ptr, (prelude_string_t **) ret, n); } default: return prelude_error(PRELUDE_ERROR_IDMEF_CLASS_UNKNOWN_CHILD); } } int _idmef_web_service_destroy_child(void *p, idmef_class_child_id_t child, int n) { idmef_web_service_t *ptr = p; prelude_return_val_if_fail(p, prelude_error(PRELUDE_ERROR_ASSERTION)); switch ( child ) { case 0: if ( ptr->url ) { prelude_string_destroy(ptr->url); ptr->url = NULL; } return 0; case 1: if ( ptr->cgi ) { prelude_string_destroy(ptr->cgi); ptr->cgi = NULL; } return 0; case 2: if ( ptr->http_method ) { prelude_string_destroy(ptr->http_method); ptr->http_method = NULL; } return 0; case 3: { int i = 0; prelude_list_t *tmp; if ( n >= 0 ) { prelude_list_for_each(&ptr->arg_list, tmp) { if ( i++ == n ) { void *b = prelude_list_entry(tmp, prelude_string_t, list); prelude_string_destroy(b); return 0; } } if ( i != n ) return prelude_error(PRELUDE_ERROR_IDMEF_TREE_INDEX_UNDEFINED); } else { int pos = (-n) - 1; /* With negative value, -1 is the base, translate to 0 */ prelude_list_for_each_reversed(&ptr->arg_list, tmp) { if ( i++ == pos ) { void *b = prelude_list_entry(tmp, prelude_string_t, list); prelude_string_destroy(b); return 0; } } if ( i != pos ) return prelude_error(PRELUDE_ERROR_IDMEF_TREE_INDEX_UNDEFINED); } } default: return prelude_error(PRELUDE_ERROR_IDMEF_CLASS_UNKNOWN_CHILD); } } static void idmef_web_service_destroy_internal(idmef_web_service_t *ptr) { prelude_return_if_fail(ptr); if ( ptr->url ) { prelude_string_destroy(ptr->url); ptr->url = NULL; } if ( ptr->cgi ) { prelude_string_destroy(ptr->cgi); ptr->cgi = NULL; } if ( ptr->http_method ) { prelude_string_destroy(ptr->http_method); ptr->http_method = NULL; } { prelude_list_t *n, *tmp; prelude_string_t *entry; prelude_list_for_each_safe(&ptr->arg_list, tmp, n) { entry = prelude_list_entry(tmp, prelude_string_t, list); prelude_list_del_init(&entry->list); prelude_string_destroy(entry); } } /* free() should be done by the caller */ } /** * idmef_web_service_destroy: * @ptr: pointer to a #idmef_web_service_t object. * * Destroy @ptr and all of it's children. * The objects are only destroyed if their reference count reach zero. */ void idmef_web_service_destroy(idmef_web_service_t *ptr) { prelude_return_if_fail(ptr); if ( --ptr->refcount ) return; idmef_web_service_destroy_internal(ptr); free(ptr); } /** * *idmef_web_service_get_url: * @ptr: pointer to a #idmef_web_service_t object. * * Get url children of the #idmef_web_service_t object. * * Returns: a pointer to a prelude_string_t object, or NULL if the children object is not set. */ prelude_string_t *idmef_web_service_get_url(idmef_web_service_t *ptr) { prelude_return_val_if_fail(ptr, 0); /* FIXME */ return ptr->url; } /** * idmef_web_service_set_url: * @ptr: pointer to a #idmef_web_service_t object. * @url: pointer to a #prelude_string_t object. * * Set @url object as a children of @ptr. * if @ptr already contain an @url object, then it is destroyed, * and updated to point to the provided @url object. */ void idmef_web_service_set_url(idmef_web_service_t *ptr, prelude_string_t *url) { prelude_return_if_fail(ptr); if ( ptr->url ) prelude_string_destroy(ptr->url); ptr->url = url; } /** * idmef_web_service_new_url: * @ptr: pointer to a #idmef_web_service_t object. * @ret: pointer to an address where to store the created #prelude_string_t object. * * Create a new url object, children of #idmef_web_service_t. * If @ptr already contain a #prelude_string_t object, then it is destroyed. * * Returns: 0 on success, or a negative value if an error occured. */ int idmef_web_service_new_url(idmef_web_service_t *ptr, prelude_string_t **ret) { int retval; prelude_return_val_if_fail(ptr, prelude_error(PRELUDE_ERROR_ASSERTION)); if ( ! ptr->url ) { retval = prelude_string_new(&ptr->url); if ( retval < 0 ) return retval; } *ret = ptr->url; return 0; } /** * *idmef_web_service_get_cgi: * @ptr: pointer to a #idmef_web_service_t object. * * Get cgi children of the #idmef_web_service_t object. * * Returns: a pointer to a prelude_string_t object, or NULL if the children object is not set. */ prelude_string_t *idmef_web_service_get_cgi(idmef_web_service_t *ptr) { prelude_return_val_if_fail(ptr, 0); /* FIXME */ return ptr->cgi; } /** * idmef_web_service_set_cgi: * @ptr: pointer to a #idmef_web_service_t object. * @cgi: pointer to a #prelude_string_t object. * * Set @cgi object as a children of @ptr. * if @ptr already contain an @cgi object, then it is destroyed, * and updated to point to the provided @cgi object. */ void idmef_web_service_set_cgi(idmef_web_service_t *ptr, prelude_string_t *cgi) { prelude_return_if_fail(ptr); if ( ptr->cgi ) prelude_string_destroy(ptr->cgi); ptr->cgi = cgi; } /** * idmef_web_service_new_cgi: * @ptr: pointer to a #idmef_web_service_t object. * @ret: pointer to an address where to store the created #prelude_string_t object. * * Create a new cgi object, children of #idmef_web_service_t. * If @ptr already contain a #prelude_string_t object, then it is destroyed. * * Returns: 0 on success, or a negative value if an error occured. */ int idmef_web_service_new_cgi(idmef_web_service_t *ptr, prelude_string_t **ret) { int retval; prelude_return_val_if_fail(ptr, prelude_error(PRELUDE_ERROR_ASSERTION)); if ( ! ptr->cgi ) { retval = prelude_string_new(&ptr->cgi); if ( retval < 0 ) return retval; } *ret = ptr->cgi; return 0; } /** * *idmef_web_service_get_http_method: * @ptr: pointer to a #idmef_web_service_t object. * * Get http_method children of the #idmef_web_service_t object. * * Returns: a pointer to a prelude_string_t object, or NULL if the children object is not set. */ prelude_string_t *idmef_web_service_get_http_method(idmef_web_service_t *ptr) { prelude_return_val_if_fail(ptr, 0); /* FIXME */ return ptr->http_method; } /** * idmef_web_service_set_http_method: * @ptr: pointer to a #idmef_web_service_t object. * @http_method: pointer to a #prelude_string_t object. * * Set @http_method object as a children of @ptr. * if @ptr already contain an @http_method object, then it is destroyed, * and updated to point to the provided @http_method object. */ void idmef_web_service_set_http_method(idmef_web_service_t *ptr, prelude_string_t *http_method) { prelude_return_if_fail(ptr); if ( ptr->http_method ) prelude_string_destroy(ptr->http_method); ptr->http_method = http_method; } /** * idmef_web_service_new_http_method: * @ptr: pointer to a #idmef_web_service_t object. * @ret: pointer to an address where to store the created #prelude_string_t object. * * Create a new http_method object, children of #idmef_web_service_t. * If @ptr already contain a #prelude_string_t object, then it is destroyed. * * Returns: 0 on success, or a negative value if an error occured. */ int idmef_web_service_new_http_method(idmef_web_service_t *ptr, prelude_string_t **ret) { int retval; prelude_return_val_if_fail(ptr, prelude_error(PRELUDE_ERROR_ASSERTION)); if ( ! ptr->http_method ) { retval = prelude_string_new(&ptr->http_method); if ( retval < 0 ) return retval; } *ret = ptr->http_method; return 0; } /** * idmef_web_service_get_next_arg: * @web_service: pointer to a #idmef_web_service_t object. * @prelude_string_cur: pointer to a #prelude_string_t object. * * Get the next #prelude_string_t object listed in @ptr. * When iterating over the prelude_string_t object listed in @ptr, * @object should be set to the latest returned #prelude_string_t object. * * Returns: the next #prelude_string_t in the list. */ prelude_string_t *idmef_web_service_get_next_arg(idmef_web_service_t *web_service, prelude_string_t *prelude_string_cur) { prelude_list_t *tmp = (prelude_string_cur) ? &prelude_string_cur->list : NULL; prelude_return_val_if_fail(web_service, NULL); prelude_list_for_each_continue(&web_service->arg_list, tmp) return prelude_list_entry(tmp, prelude_string_t, list); return NULL; } /** * idmef_web_service_set_arg: * @ptr: pointer to a #idmef_web_service_t object. * @object: pointer to a #prelude_string_t object. * @pos: Position in the list. * * Add @object to position @pos of @ptr list of #prelude_string_t object. * * If @pos is #IDMEF_LIST_APPEND, @object will be inserted at the tail of the list. * If @pos is #IDMEF_LIST_PREPEND, @object will be inserted at the head of the list. */ void idmef_web_service_set_arg(idmef_web_service_t *ptr, prelude_string_t *object, int pos) { prelude_return_if_fail(ptr); prelude_return_if_fail(object); if ( ! prelude_list_is_empty(&object->list) ) prelude_list_del_init(&object->list); list_insert(&ptr->arg_list, &object->list, pos); } /** * idmef_web_service_new_arg: * @ptr: pointer to a #idmef_web_service_t object. * @ret: pointer to an address where to store the created #prelude_string_t object. * @pos: position in the list. * * Create a new #prelude_string_t children of @ptr, and add it to position @pos of * @ptr list of #prelude_string_t object. The created #prelude_string_t object is * stored in @ret. * * If @pos is #IDMEF_LIST_APPEND, @object will be inserted at the tail of the list. * If @pos is #IDMEF_LIST_PREPEND, @object will be inserted at the head of the list. * * Returns: 0 on success, or a negative value if an error occured. */ int idmef_web_service_new_arg(idmef_web_service_t *ptr, prelude_string_t **ret, int pos) { int retval; prelude_return_val_if_fail(ptr, prelude_error(PRELUDE_ERROR_ASSERTION)); retval = prelude_string_new(ret); if ( retval < 0 ) return retval; list_insert(&ptr->arg_list, &(*ret)->list, pos); return 0; } /** * idmef_web_service_copy: * @src: Source of the copy. * @dst: Where to copy the object. * * Copy a new #idmef_web_service_t object from @src to @dst. * * Returns: 0 on success, a negative value if an error occured. */ int idmef_web_service_copy(const idmef_web_service_t *src, idmef_web_service_t *dst) { int ret; prelude_return_val_if_fail(src, prelude_error(PRELUDE_ERROR_ASSERTION)); prelude_return_val_if_fail(dst, prelude_error(PRELUDE_ERROR_ASSERTION)); ret = 0; if ( src->url ) { ret = prelude_string_copy(src->url, dst->url); if ( ret < 0 ) return ret; } if ( src->cgi ) { ret = prelude_string_clone(src->cgi, &dst->cgi); if ( ret < 0 ) return ret; } if ( src->http_method ) { ret = prelude_string_clone(src->http_method, &dst->http_method); if ( ret < 0 ) return ret; } { prelude_list_t *n, *tmp; prelude_string_t *entry, *new; prelude_list_for_each_safe(&src->arg_list, tmp, n) { entry = prelude_list_entry(tmp, prelude_string_t, list); prelude_string_clone(entry, &new); prelude_list_add_tail(&dst->arg_list, &new->list); } } return 0; } /** * idmef_web_service_clone: * @src: Object to be cloned. * @dst: Address where to store the pointer to the cloned object. * * Create a copy of @src, and store it in @dst. * * Returns: 0 on success, a negative value if an error occured. */ int idmef_web_service_clone(idmef_web_service_t *src, idmef_web_service_t **dst) { int ret; prelude_return_val_if_fail(src, prelude_error(PRELUDE_ERROR_ASSERTION)); ret = idmef_web_service_new(dst); if ( ret < 0 ) return ret; return idmef_web_service_copy(src, *dst); } /** * idmef_web_service_compare: * @obj1: Object to compare with @obj2. * @obj2: Object to compare with @obj1. * * Compare @obj1 with @obj2. * * Returns: 0 on match, a negative value on comparison failure. */ int idmef_web_service_compare(const idmef_web_service_t *obj1, const idmef_web_service_t *obj2) { int ret = 0; if ( obj1 == NULL && obj2 == NULL ) return 0; else if ( obj1 == NULL || obj2 == NULL ) return -1; ret = prelude_string_compare(obj1->url, obj2->url); if ( ret != 0 ) return ret; ret = prelude_string_compare(obj1->cgi, obj2->cgi); if ( ret != 0 ) return ret; ret = prelude_string_compare(obj1->http_method, obj2->http_method); if ( ret != 0 ) return ret; { prelude_list_t *tmp1, *tmp2; prelude_string_t *entry1, *entry2; tmp1 = tmp2 = NULL; do { entry1 = entry2 = NULL; prelude_list_for_each_continue(&obj1->arg_list, tmp1) { entry1 = prelude_list_entry(tmp1, prelude_string_t, list); break; } prelude_list_for_each_continue(&obj2->arg_list, tmp2) { entry2 = prelude_list_entry(tmp2, prelude_string_t, list); break; } ret = prelude_string_compare(entry1, entry2); if ( ret != 0 ) return ret; } while ( entry1 && entry2 ); } return ret; } /** * idmef_snmp_service_new: * @ret: Pointer where to store the created #idmef_snmp_service_t object. * * Create a new #idmef_snmp_service_t object. * * Returns: 0 on success, a negative value if an error occured. */ int idmef_snmp_service_new(idmef_snmp_service_t **ret) { *ret = calloc(1, sizeof(**ret)); if ( ! *ret ) return prelude_error_from_errno(errno); (*ret)->refcount = 1; return 0; } /** * idmef_snmp_service_ref: * @snmp_service: pointer to a #idmef_snmp_service_t object. * * Increase @snmp_service reference count, so that it can be referenced * multiple time. * * Returns: a pointer to @snmp_service. */ idmef_snmp_service_t *idmef_snmp_service_ref(idmef_snmp_service_t *snmp_service) { prelude_return_val_if_fail(snmp_service, NULL); snmp_service->refcount++; return snmp_service; } int _idmef_snmp_service_get_child(void *p, idmef_class_child_id_t child, void **childptr) { idmef_snmp_service_t *ptr = p; prelude_return_val_if_fail(p, prelude_error(PRELUDE_ERROR_ASSERTION)); *childptr = NULL; switch ( child ) { case 0: return get_value_from_string((idmef_value_t **) childptr, ptr->oid, TRUE); case 1: return (ptr->message_processing_model_is_set) ? idmef_value_new_uint32((idmef_value_t **) childptr, ptr->message_processing_model) : 0; case 2: return (ptr->security_model_is_set) ? idmef_value_new_uint32((idmef_value_t **) childptr, ptr->security_model) : 0; case 3: return get_value_from_string((idmef_value_t **) childptr, ptr->security_name, TRUE); case 4: return (ptr->security_level_is_set) ? idmef_value_new_uint32((idmef_value_t **) childptr, ptr->security_level) : 0; case 5: return get_value_from_string((idmef_value_t **) childptr, ptr->context_name, TRUE); case 6: return get_value_from_string((idmef_value_t **) childptr, ptr->context_engine_id, TRUE); case 7: return get_value_from_string((idmef_value_t **) childptr, ptr->command, TRUE); case 8: return get_value_from_string((idmef_value_t **) childptr, ptr->community, TRUE); default: return prelude_error(PRELUDE_ERROR_IDMEF_CLASS_UNKNOWN_CHILD); } } int _idmef_snmp_service_new_child(void *p, idmef_class_child_id_t child, int n, void **ret) { idmef_snmp_service_t *ptr = p; prelude_return_val_if_fail(p, prelude_error(PRELUDE_ERROR_ASSERTION)); switch ( child ) { case 0: return idmef_snmp_service_new_oid(ptr, (prelude_string_t **) ret); case 1: return idmef_snmp_service_new_message_processing_model(ptr, (uint32_t **) ret); case 2: return idmef_snmp_service_new_security_model(ptr, (uint32_t **) ret); case 3: return idmef_snmp_service_new_security_name(ptr, (prelude_string_t **) ret); case 4: return idmef_snmp_service_new_security_level(ptr, (uint32_t **) ret); case 5: return idmef_snmp_service_new_context_name(ptr, (prelude_string_t **) ret); case 6: return idmef_snmp_service_new_context_engine_id(ptr, (prelude_string_t **) ret); case 7: return idmef_snmp_service_new_command(ptr, (prelude_string_t **) ret); case 8: return idmef_snmp_service_new_community(ptr, (prelude_string_t **) ret); default: return prelude_error(PRELUDE_ERROR_IDMEF_CLASS_UNKNOWN_CHILD); } } int _idmef_snmp_service_destroy_child(void *p, idmef_class_child_id_t child, int n) { idmef_snmp_service_t *ptr = p; prelude_return_val_if_fail(p, prelude_error(PRELUDE_ERROR_ASSERTION)); switch ( child ) { case 0: if ( ptr->oid ) { prelude_string_destroy(ptr->oid); ptr->oid = NULL; } return 0; case 1: ptr->message_processing_model_is_set = 0; return 0; case 2: ptr->security_model_is_set = 0; return 0; case 3: if ( ptr->security_name ) { prelude_string_destroy(ptr->security_name); ptr->security_name = NULL; } return 0; case 4: ptr->security_level_is_set = 0; return 0; case 5: if ( ptr->context_name ) { prelude_string_destroy(ptr->context_name); ptr->context_name = NULL; } return 0; case 6: if ( ptr->context_engine_id ) { prelude_string_destroy(ptr->context_engine_id); ptr->context_engine_id = NULL; } return 0; case 7: if ( ptr->command ) { prelude_string_destroy(ptr->command); ptr->command = NULL; } return 0; case 8: if ( ptr->community ) { prelude_string_destroy(ptr->community); ptr->community = NULL; } return 0; default: return prelude_error(PRELUDE_ERROR_IDMEF_CLASS_UNKNOWN_CHILD); } } static void idmef_snmp_service_destroy_internal(idmef_snmp_service_t *ptr) { prelude_return_if_fail(ptr); if ( ptr->oid ) { prelude_string_destroy(ptr->oid); ptr->oid = NULL; } if ( ptr->security_name ) { prelude_string_destroy(ptr->security_name); ptr->security_name = NULL; } if ( ptr->context_name ) { prelude_string_destroy(ptr->context_name); ptr->context_name = NULL; } if ( ptr->context_engine_id ) { prelude_string_destroy(ptr->context_engine_id); ptr->context_engine_id = NULL; } if ( ptr->command ) { prelude_string_destroy(ptr->command); ptr->command = NULL; } if ( ptr->community ) { prelude_string_destroy(ptr->community); ptr->community = NULL; } /* free() should be done by the caller */ } /** * idmef_snmp_service_destroy: * @ptr: pointer to a #idmef_snmp_service_t object. * * Destroy @ptr and all of it's children. * The objects are only destroyed if their reference count reach zero. */ void idmef_snmp_service_destroy(idmef_snmp_service_t *ptr) { prelude_return_if_fail(ptr); if ( --ptr->refcount ) return; idmef_snmp_service_destroy_internal(ptr); free(ptr); } /** * *idmef_snmp_service_get_oid: * @ptr: pointer to a #idmef_snmp_service_t object. * * Get oid children of the #idmef_snmp_service_t object. * * Returns: a pointer to a prelude_string_t object, or NULL if the children object is not set. */ prelude_string_t *idmef_snmp_service_get_oid(idmef_snmp_service_t *ptr) { prelude_return_val_if_fail(ptr, 0); /* FIXME */ return ptr->oid; } /** * idmef_snmp_service_set_oid: * @ptr: pointer to a #idmef_snmp_service_t object. * @oid: pointer to a #prelude_string_t object. * * Set @oid object as a children of @ptr. * if @ptr already contain an @oid object, then it is destroyed, * and updated to point to the provided @oid object. */ void idmef_snmp_service_set_oid(idmef_snmp_service_t *ptr, prelude_string_t *oid) { prelude_return_if_fail(ptr); if ( ptr->oid ) prelude_string_destroy(ptr->oid); ptr->oid = oid; } /** * idmef_snmp_service_new_oid: * @ptr: pointer to a #idmef_snmp_service_t object. * @ret: pointer to an address where to store the created #prelude_string_t object. * * Create a new oid object, children of #idmef_snmp_service_t. * If @ptr already contain a #prelude_string_t object, then it is destroyed. * * Returns: 0 on success, or a negative value if an error occured. */ int idmef_snmp_service_new_oid(idmef_snmp_service_t *ptr, prelude_string_t **ret) { int retval; prelude_return_val_if_fail(ptr, prelude_error(PRELUDE_ERROR_ASSERTION)); if ( ! ptr->oid ) { retval = prelude_string_new(&ptr->oid); if ( retval < 0 ) return retval; } *ret = ptr->oid; return 0; } /** * *idmef_snmp_service_get_message_processing_model: * @ptr: pointer to a #idmef_snmp_service_t object. * * Get message_processing_model children of the #idmef_snmp_service_t object. * * Returns: a pointer to a uint32_t object, or NULL if the children object is not set. */ uint32_t *idmef_snmp_service_get_message_processing_model(idmef_snmp_service_t *ptr) { prelude_return_val_if_fail(ptr, 0); /* FIXME */ return ptr->message_processing_model_is_set ? &ptr->message_processing_model : NULL; } /** * idmef_snmp_service_set_message_processing_model: * @ptr: pointer to a #idmef_snmp_service_t object. * @message_processing_model: pointer to a #uint32_t object. * * Set @message_processing_model object as a children of @ptr. * if @ptr already contain an @message_processing_model object, then it is destroyed, * and updated to point to the provided @message_processing_model object. */ void idmef_snmp_service_set_message_processing_model(idmef_snmp_service_t *ptr, uint32_t message_processing_model) { prelude_return_if_fail(ptr); ptr->message_processing_model = message_processing_model; ptr->message_processing_model_is_set = 1; } void idmef_snmp_service_unset_message_processing_model(idmef_snmp_service_t *ptr) { prelude_return_if_fail(ptr); ptr->message_processing_model_is_set = 0; } /** * idmef_snmp_service_new_message_processing_model: * @ptr: pointer to a #idmef_snmp_service_t object. * @ret: pointer to an address where to store the created #uint32_t object. * * Create a new message_processing_model object, children of #idmef_snmp_service_t. * If @ptr already contain a #uint32_t object, then it is destroyed. * * Returns: 0 on success, or a negative value if an error occured. */ int idmef_snmp_service_new_message_processing_model(idmef_snmp_service_t *ptr, uint32_t **ret) { prelude_return_val_if_fail(ptr, prelude_error(PRELUDE_ERROR_ASSERTION)); ptr->message_processing_model_is_set = 1; *ret = &ptr->message_processing_model; return 0; } /** * *idmef_snmp_service_get_security_model: * @ptr: pointer to a #idmef_snmp_service_t object. * * Get security_model children of the #idmef_snmp_service_t object. * * Returns: a pointer to a uint32_t object, or NULL if the children object is not set. */ uint32_t *idmef_snmp_service_get_security_model(idmef_snmp_service_t *ptr) { prelude_return_val_if_fail(ptr, 0); /* FIXME */ return ptr->security_model_is_set ? &ptr->security_model : NULL; } /** * idmef_snmp_service_set_security_model: * @ptr: pointer to a #idmef_snmp_service_t object. * @security_model: pointer to a #uint32_t object. * * Set @security_model object as a children of @ptr. * if @ptr already contain an @security_model object, then it is destroyed, * and updated to point to the provided @security_model object. */ void idmef_snmp_service_set_security_model(idmef_snmp_service_t *ptr, uint32_t security_model) { prelude_return_if_fail(ptr); ptr->security_model = security_model; ptr->security_model_is_set = 1; } void idmef_snmp_service_unset_security_model(idmef_snmp_service_t *ptr) { prelude_return_if_fail(ptr); ptr->security_model_is_set = 0; } /** * idmef_snmp_service_new_security_model: * @ptr: pointer to a #idmef_snmp_service_t object. * @ret: pointer to an address where to store the created #uint32_t object. * * Create a new security_model object, children of #idmef_snmp_service_t. * If @ptr already contain a #uint32_t object, then it is destroyed. * * Returns: 0 on success, or a negative value if an error occured. */ int idmef_snmp_service_new_security_model(idmef_snmp_service_t *ptr, uint32_t **ret) { prelude_return_val_if_fail(ptr, prelude_error(PRELUDE_ERROR_ASSERTION)); ptr->security_model_is_set = 1; *ret = &ptr->security_model; return 0; } /** * *idmef_snmp_service_get_security_name: * @ptr: pointer to a #idmef_snmp_service_t object. * * Get security_name children of the #idmef_snmp_service_t object. * * Returns: a pointer to a prelude_string_t object, or NULL if the children object is not set. */ prelude_string_t *idmef_snmp_service_get_security_name(idmef_snmp_service_t *ptr) { prelude_return_val_if_fail(ptr, 0); /* FIXME */ return ptr->security_name; } /** * idmef_snmp_service_set_security_name: * @ptr: pointer to a #idmef_snmp_service_t object. * @security_name: pointer to a #prelude_string_t object. * * Set @security_name object as a children of @ptr. * if @ptr already contain an @security_name object, then it is destroyed, * and updated to point to the provided @security_name object. */ void idmef_snmp_service_set_security_name(idmef_snmp_service_t *ptr, prelude_string_t *security_name) { prelude_return_if_fail(ptr); if ( ptr->security_name ) prelude_string_destroy(ptr->security_name); ptr->security_name = security_name; } /** * idmef_snmp_service_new_security_name: * @ptr: pointer to a #idmef_snmp_service_t object. * @ret: pointer to an address where to store the created #prelude_string_t object. * * Create a new security_name object, children of #idmef_snmp_service_t. * If @ptr already contain a #prelude_string_t object, then it is destroyed. * * Returns: 0 on success, or a negative value if an error occured. */ int idmef_snmp_service_new_security_name(idmef_snmp_service_t *ptr, prelude_string_t **ret) { int retval; prelude_return_val_if_fail(ptr, prelude_error(PRELUDE_ERROR_ASSERTION)); if ( ! ptr->security_name ) { retval = prelude_string_new(&ptr->security_name); if ( retval < 0 ) return retval; } *ret = ptr->security_name; return 0; } /** * *idmef_snmp_service_get_security_level: * @ptr: pointer to a #idmef_snmp_service_t object. * * Get security_level children of the #idmef_snmp_service_t object. * * Returns: a pointer to a uint32_t object, or NULL if the children object is not set. */ uint32_t *idmef_snmp_service_get_security_level(idmef_snmp_service_t *ptr) { prelude_return_val_if_fail(ptr, 0); /* FIXME */ return ptr->security_level_is_set ? &ptr->security_level : NULL; } /** * idmef_snmp_service_set_security_level: * @ptr: pointer to a #idmef_snmp_service_t object. * @security_level: pointer to a #uint32_t object. * * Set @security_level object as a children of @ptr. * if @ptr already contain an @security_level object, then it is destroyed, * and updated to point to the provided @security_level object. */ void idmef_snmp_service_set_security_level(idmef_snmp_service_t *ptr, uint32_t security_level) { prelude_return_if_fail(ptr); ptr->security_level = security_level; ptr->security_level_is_set = 1; } void idmef_snmp_service_unset_security_level(idmef_snmp_service_t *ptr) { prelude_return_if_fail(ptr); ptr->security_level_is_set = 0; } /** * idmef_snmp_service_new_security_level: * @ptr: pointer to a #idmef_snmp_service_t object. * @ret: pointer to an address where to store the created #uint32_t object. * * Create a new security_level object, children of #idmef_snmp_service_t. * If @ptr already contain a #uint32_t object, then it is destroyed. * * Returns: 0 on success, or a negative value if an error occured. */ int idmef_snmp_service_new_security_level(idmef_snmp_service_t *ptr, uint32_t **ret) { prelude_return_val_if_fail(ptr, prelude_error(PRELUDE_ERROR_ASSERTION)); ptr->security_level_is_set = 1; *ret = &ptr->security_level; return 0; } /** * *idmef_snmp_service_get_context_name: * @ptr: pointer to a #idmef_snmp_service_t object. * * Get context_name children of the #idmef_snmp_service_t object. * * Returns: a pointer to a prelude_string_t object, or NULL if the children object is not set. */ prelude_string_t *idmef_snmp_service_get_context_name(idmef_snmp_service_t *ptr) { prelude_return_val_if_fail(ptr, 0); /* FIXME */ return ptr->context_name; } /** * idmef_snmp_service_set_context_name: * @ptr: pointer to a #idmef_snmp_service_t object. * @context_name: pointer to a #prelude_string_t object. * * Set @context_name object as a children of @ptr. * if @ptr already contain an @context_name object, then it is destroyed, * and updated to point to the provided @context_name object. */ void idmef_snmp_service_set_context_name(idmef_snmp_service_t *ptr, prelude_string_t *context_name) { prelude_return_if_fail(ptr); if ( ptr->context_name ) prelude_string_destroy(ptr->context_name); ptr->context_name = context_name; } /** * idmef_snmp_service_new_context_name: * @ptr: pointer to a #idmef_snmp_service_t object. * @ret: pointer to an address where to store the created #prelude_string_t object. * * Create a new context_name object, children of #idmef_snmp_service_t. * If @ptr already contain a #prelude_string_t object, then it is destroyed. * * Returns: 0 on success, or a negative value if an error occured. */ int idmef_snmp_service_new_context_name(idmef_snmp_service_t *ptr, prelude_string_t **ret) { int retval; prelude_return_val_if_fail(ptr, prelude_error(PRELUDE_ERROR_ASSERTION)); if ( ! ptr->context_name ) { retval = prelude_string_new(&ptr->context_name); if ( retval < 0 ) return retval; } *ret = ptr->context_name; return 0; } /** * *idmef_snmp_service_get_context_engine_id: * @ptr: pointer to a #idmef_snmp_service_t object. * * Get context_engine_id children of the #idmef_snmp_service_t object. * * Returns: a pointer to a prelude_string_t object, or NULL if the children object is not set. */ prelude_string_t *idmef_snmp_service_get_context_engine_id(idmef_snmp_service_t *ptr) { prelude_return_val_if_fail(ptr, 0); /* FIXME */ return ptr->context_engine_id; } /** * idmef_snmp_service_set_context_engine_id: * @ptr: pointer to a #idmef_snmp_service_t object. * @context_engine_id: pointer to a #prelude_string_t object. * * Set @context_engine_id object as a children of @ptr. * if @ptr already contain an @context_engine_id object, then it is destroyed, * and updated to point to the provided @context_engine_id object. */ void idmef_snmp_service_set_context_engine_id(idmef_snmp_service_t *ptr, prelude_string_t *context_engine_id) { prelude_return_if_fail(ptr); if ( ptr->context_engine_id ) prelude_string_destroy(ptr->context_engine_id); ptr->context_engine_id = context_engine_id; } /** * idmef_snmp_service_new_context_engine_id: * @ptr: pointer to a #idmef_snmp_service_t object. * @ret: pointer to an address where to store the created #prelude_string_t object. * * Create a new context_engine_id object, children of #idmef_snmp_service_t. * If @ptr already contain a #prelude_string_t object, then it is destroyed. * * Returns: 0 on success, or a negative value if an error occured. */ int idmef_snmp_service_new_context_engine_id(idmef_snmp_service_t *ptr, prelude_string_t **ret) { int retval; prelude_return_val_if_fail(ptr, prelude_error(PRELUDE_ERROR_ASSERTION)); if ( ! ptr->context_engine_id ) { retval = prelude_string_new(&ptr->context_engine_id); if ( retval < 0 ) return retval; } *ret = ptr->context_engine_id; return 0; } /** * *idmef_snmp_service_get_command: * @ptr: pointer to a #idmef_snmp_service_t object. * * Get command children of the #idmef_snmp_service_t object. * * Returns: a pointer to a prelude_string_t object, or NULL if the children object is not set. */ prelude_string_t *idmef_snmp_service_get_command(idmef_snmp_service_t *ptr) { prelude_return_val_if_fail(ptr, 0); /* FIXME */ return ptr->command; } /** * idmef_snmp_service_set_command: * @ptr: pointer to a #idmef_snmp_service_t object. * @command: pointer to a #prelude_string_t object. * * Set @command object as a children of @ptr. * if @ptr already contain an @command object, then it is destroyed, * and updated to point to the provided @command object. */ void idmef_snmp_service_set_command(idmef_snmp_service_t *ptr, prelude_string_t *command) { prelude_return_if_fail(ptr); if ( ptr->command ) prelude_string_destroy(ptr->command); ptr->command = command; } /** * idmef_snmp_service_new_command: * @ptr: pointer to a #idmef_snmp_service_t object. * @ret: pointer to an address where to store the created #prelude_string_t object. * * Create a new command object, children of #idmef_snmp_service_t. * If @ptr already contain a #prelude_string_t object, then it is destroyed. * * Returns: 0 on success, or a negative value if an error occured. */ int idmef_snmp_service_new_command(idmef_snmp_service_t *ptr, prelude_string_t **ret) { int retval; prelude_return_val_if_fail(ptr, prelude_error(PRELUDE_ERROR_ASSERTION)); if ( ! ptr->command ) { retval = prelude_string_new(&ptr->command); if ( retval < 0 ) return retval; } *ret = ptr->command; return 0; } /** * *idmef_snmp_service_get_community: * @ptr: pointer to a #idmef_snmp_service_t object. * * Get community children of the #idmef_snmp_service_t object. * * Returns: a pointer to a prelude_string_t object, or NULL if the children object is not set. */ prelude_string_t *idmef_snmp_service_get_community(idmef_snmp_service_t *ptr) { prelude_return_val_if_fail(ptr, 0); /* FIXME */ return ptr->community; } /** * idmef_snmp_service_set_community: * @ptr: pointer to a #idmef_snmp_service_t object. * @community: pointer to a #prelude_string_t object. * * Set @community object as a children of @ptr. * if @ptr already contain an @community object, then it is destroyed, * and updated to point to the provided @community object. */ void idmef_snmp_service_set_community(idmef_snmp_service_t *ptr, prelude_string_t *community) { prelude_return_if_fail(ptr); if ( ptr->community ) prelude_string_destroy(ptr->community); ptr->community = community; } /** * idmef_snmp_service_new_community: * @ptr: pointer to a #idmef_snmp_service_t object. * @ret: pointer to an address where to store the created #prelude_string_t object. * * Create a new community object, children of #idmef_snmp_service_t. * If @ptr already contain a #prelude_string_t object, then it is destroyed. * * Returns: 0 on success, or a negative value if an error occured. */ int idmef_snmp_service_new_community(idmef_snmp_service_t *ptr, prelude_string_t **ret) { int retval; prelude_return_val_if_fail(ptr, prelude_error(PRELUDE_ERROR_ASSERTION)); if ( ! ptr->community ) { retval = prelude_string_new(&ptr->community); if ( retval < 0 ) return retval; } *ret = ptr->community; return 0; } /** * idmef_snmp_service_copy: * @src: Source of the copy. * @dst: Where to copy the object. * * Copy a new #idmef_snmp_service_t object from @src to @dst. * * Returns: 0 on success, a negative value if an error occured. */ int idmef_snmp_service_copy(const idmef_snmp_service_t *src, idmef_snmp_service_t *dst) { int ret; prelude_return_val_if_fail(src, prelude_error(PRELUDE_ERROR_ASSERTION)); prelude_return_val_if_fail(dst, prelude_error(PRELUDE_ERROR_ASSERTION)); ret = 0; if ( src->oid ) { ret = prelude_string_clone(src->oid, &dst->oid); if ( ret < 0 ) return ret; } dst->message_processing_model_is_set = src->message_processing_model_is_set; dst->message_processing_model = src->message_processing_model; dst->security_model_is_set = src->security_model_is_set; dst->security_model = src->security_model; if ( src->security_name ) { ret = prelude_string_clone(src->security_name, &dst->security_name); if ( ret < 0 ) return ret; } dst->security_level_is_set = src->security_level_is_set; dst->security_level = src->security_level; if ( src->context_name ) { ret = prelude_string_clone(src->context_name, &dst->context_name); if ( ret < 0 ) return ret; } if ( src->context_engine_id ) { ret = prelude_string_clone(src->context_engine_id, &dst->context_engine_id); if ( ret < 0 ) return ret; } if ( src->command ) { ret = prelude_string_clone(src->command, &dst->command); if ( ret < 0 ) return ret; } if ( src->community ) { ret = prelude_string_clone(src->community, &dst->community); if ( ret < 0 ) return ret; } return 0; } /** * idmef_snmp_service_clone: * @src: Object to be cloned. * @dst: Address where to store the pointer to the cloned object. * * Create a copy of @src, and store it in @dst. * * Returns: 0 on success, a negative value if an error occured. */ int idmef_snmp_service_clone(idmef_snmp_service_t *src, idmef_snmp_service_t **dst) { int ret; prelude_return_val_if_fail(src, prelude_error(PRELUDE_ERROR_ASSERTION)); ret = idmef_snmp_service_new(dst); if ( ret < 0 ) return ret; return idmef_snmp_service_copy(src, *dst); } /** * idmef_snmp_service_compare: * @obj1: Object to compare with @obj2. * @obj2: Object to compare with @obj1. * * Compare @obj1 with @obj2. * * Returns: 0 on match, a negative value on comparison failure. */ int idmef_snmp_service_compare(const idmef_snmp_service_t *obj1, const idmef_snmp_service_t *obj2) { int ret = 0; if ( obj1 == NULL && obj2 == NULL ) return 0; else if ( obj1 == NULL || obj2 == NULL ) return -1; ret = prelude_string_compare(obj1->oid, obj2->oid); if ( ret != 0 ) return ret; if ( obj1->message_processing_model_is_set != obj2->message_processing_model_is_set ) return -1; if ( obj1->message_processing_model_is_set && obj1->message_processing_model != obj2->message_processing_model ) return -1; if ( obj1->security_model_is_set != obj2->security_model_is_set ) return -1; if ( obj1->security_model_is_set && obj1->security_model != obj2->security_model ) return -1; ret = prelude_string_compare(obj1->security_name, obj2->security_name); if ( ret != 0 ) return ret; if ( obj1->security_level_is_set != obj2->security_level_is_set ) return -1; if ( obj1->security_level_is_set && obj1->security_level != obj2->security_level ) return -1; ret = prelude_string_compare(obj1->context_name, obj2->context_name); if ( ret != 0 ) return ret; ret = prelude_string_compare(obj1->context_engine_id, obj2->context_engine_id); if ( ret != 0 ) return ret; ret = prelude_string_compare(obj1->command, obj2->command); if ( ret != 0 ) return ret; ret = prelude_string_compare(obj1->community, obj2->community); if ( ret != 0 ) return ret; return ret; } /** * idmef_service_new: * @ret: Pointer where to store the created #idmef_service_t object. * * Create a new #idmef_service_t object. * * Returns: 0 on success, a negative value if an error occured. */ int idmef_service_new(idmef_service_t **ret) { *ret = calloc(1, sizeof(**ret)); if ( ! *ret ) return prelude_error_from_errno(errno); (*ret)->refcount = 1; return 0; } /** * idmef_service_ref: * @service: pointer to a #idmef_service_t object. * * Increase @service reference count, so that it can be referenced * multiple time. * * Returns: a pointer to @service. */ idmef_service_t *idmef_service_ref(idmef_service_t *service) { prelude_return_val_if_fail(service, NULL); service->refcount++; return service; } int _idmef_service_get_child(void *p, idmef_class_child_id_t child, void **childptr) { idmef_service_t *ptr = p; prelude_return_val_if_fail(p, prelude_error(PRELUDE_ERROR_ASSERTION)); *childptr = NULL; switch ( child ) { case 0: return get_value_from_string((idmef_value_t **) childptr, ptr->ident, TRUE); case 1: return (ptr->ip_version_is_set) ? idmef_value_new_uint8((idmef_value_t **) childptr, ptr->ip_version) : 0; case 2: return (ptr->iana_protocol_number_is_set) ? idmef_value_new_uint8((idmef_value_t **) childptr, ptr->iana_protocol_number) : 0; case 3: return get_value_from_string((idmef_value_t **) childptr, ptr->iana_protocol_name, TRUE); case 4: return get_value_from_string((idmef_value_t **) childptr, ptr->name, TRUE); case 5: return (ptr->port_is_set) ? idmef_value_new_uint16((idmef_value_t **) childptr, ptr->port) : 0; case 6: return get_value_from_string((idmef_value_t **) childptr, ptr->portlist, TRUE); case 7: return get_value_from_string((idmef_value_t **) childptr, ptr->protocol, TRUE); case 8: *childptr = ( ptr->type == IDMEF_SERVICE_TYPE_WEB ) ? ptr->specific.web_service : NULL; return 0; case 9: *childptr = ( ptr->type == IDMEF_SERVICE_TYPE_SNMP ) ? ptr->specific.snmp_service : NULL; return 0; default: return prelude_error(PRELUDE_ERROR_IDMEF_CLASS_UNKNOWN_CHILD); } } int _idmef_service_new_child(void *p, idmef_class_child_id_t child, int n, void **ret) { idmef_service_t *ptr = p; prelude_return_val_if_fail(p, prelude_error(PRELUDE_ERROR_ASSERTION)); switch ( child ) { case 0: return idmef_service_new_ident(ptr, (prelude_string_t **) ret); case 1: return idmef_service_new_ip_version(ptr, (uint8_t **) ret); case 2: return idmef_service_new_iana_protocol_number(ptr, (uint8_t **) ret); case 3: return idmef_service_new_iana_protocol_name(ptr, (prelude_string_t **) ret); case 4: return idmef_service_new_name(ptr, (prelude_string_t **) ret); case 5: return idmef_service_new_port(ptr, (uint16_t **) ret); case 6: return idmef_service_new_portlist(ptr, (prelude_string_t **) ret); case 7: return idmef_service_new_protocol(ptr, (prelude_string_t **) ret); case 8: return idmef_service_new_web_service(ptr, (idmef_web_service_t **) ret); case 9: return idmef_service_new_snmp_service(ptr, (idmef_snmp_service_t **) ret); default: return prelude_error(PRELUDE_ERROR_IDMEF_CLASS_UNKNOWN_CHILD); } } int _idmef_service_destroy_child(void *p, idmef_class_child_id_t child, int n) { idmef_service_t *ptr = p; prelude_return_val_if_fail(p, prelude_error(PRELUDE_ERROR_ASSERTION)); switch ( child ) { case 0: if ( ptr->ident ) { prelude_string_destroy(ptr->ident); ptr->ident = NULL; } return 0; case 1: ptr->ip_version_is_set = 0; return 0; case 2: ptr->iana_protocol_number_is_set = 0; return 0; case 3: if ( ptr->iana_protocol_name ) { prelude_string_destroy(ptr->iana_protocol_name); ptr->iana_protocol_name = NULL; } return 0; case 4: if ( ptr->name ) { prelude_string_destroy(ptr->name); ptr->name = NULL; } return 0; case 5: ptr->port_is_set = 0; return 0; case 6: if ( ptr->portlist ) { prelude_string_destroy(ptr->portlist); ptr->portlist = NULL; } return 0; case 7: if ( ptr->protocol ) { prelude_string_destroy(ptr->protocol); ptr->protocol = NULL; } return 0; case 8: if ( ptr->type != IDMEF_SERVICE_TYPE_WEB ) return 0; idmef_web_service_destroy(ptr->specific.web_service); ptr->specific.web_service = NULL; ptr->type = 0; return 0; case 9: if ( ptr->type != IDMEF_SERVICE_TYPE_SNMP ) return 0; idmef_snmp_service_destroy(ptr->specific.snmp_service); ptr->specific.snmp_service = NULL; ptr->type = 0; return 0; default: return prelude_error(PRELUDE_ERROR_IDMEF_CLASS_UNKNOWN_CHILD); } } static void idmef_service_destroy_internal(idmef_service_t *ptr) { prelude_return_if_fail(ptr); if ( ptr->ident ) { prelude_string_destroy(ptr->ident); ptr->ident = NULL; } if ( ptr->iana_protocol_name ) { prelude_string_destroy(ptr->iana_protocol_name); ptr->iana_protocol_name = NULL; } if ( ptr->name ) { prelude_string_destroy(ptr->name); ptr->name = NULL; } if ( ptr->portlist ) { prelude_string_destroy(ptr->portlist); ptr->portlist = NULL; } if ( ptr->protocol ) { prelude_string_destroy(ptr->protocol); ptr->protocol = NULL; } switch ( ptr->type ) { case IDMEF_SERVICE_TYPE_WEB: idmef_web_service_destroy(ptr->specific.web_service); ptr->specific.web_service = NULL; break; case IDMEF_SERVICE_TYPE_SNMP: idmef_snmp_service_destroy(ptr->specific.snmp_service); ptr->specific.snmp_service = NULL; break; default: break; } /* free() should be done by the caller */ } /** * idmef_service_destroy: * @ptr: pointer to a #idmef_service_t object. * * Destroy @ptr and all of it's children. * The objects are only destroyed if their reference count reach zero. */ void idmef_service_destroy(idmef_service_t *ptr) { prelude_return_if_fail(ptr); if ( --ptr->refcount ) return; idmef_service_destroy_internal(ptr); free(ptr); } /** * *idmef_service_get_ident: * @ptr: pointer to a #idmef_service_t object. * * Get ident children of the #idmef_service_t object. * * Returns: a pointer to a prelude_string_t object, or NULL if the children object is not set. */ prelude_string_t *idmef_service_get_ident(idmef_service_t *ptr) { prelude_return_val_if_fail(ptr, 0); /* FIXME */ return ptr->ident; } /** * idmef_service_set_ident: * @ptr: pointer to a #idmef_service_t object. * @ident: pointer to a #prelude_string_t object. * * Set @ident object as a children of @ptr. * if @ptr already contain an @ident object, then it is destroyed, * and updated to point to the provided @ident object. */ void idmef_service_set_ident(idmef_service_t *ptr, prelude_string_t *ident) { prelude_return_if_fail(ptr); if ( ptr->ident ) prelude_string_destroy(ptr->ident); ptr->ident = ident; } /** * idmef_service_new_ident: * @ptr: pointer to a #idmef_service_t object. * @ret: pointer to an address where to store the created #prelude_string_t object. * * Create a new ident object, children of #idmef_service_t. * If @ptr already contain a #prelude_string_t object, then it is destroyed. * * Returns: 0 on success, or a negative value if an error occured. */ int idmef_service_new_ident(idmef_service_t *ptr, prelude_string_t **ret) { int retval; prelude_return_val_if_fail(ptr, prelude_error(PRELUDE_ERROR_ASSERTION)); if ( ! ptr->ident ) { retval = prelude_string_new(&ptr->ident); if ( retval < 0 ) return retval; } *ret = ptr->ident; return 0; } /** * *idmef_service_get_ip_version: * @ptr: pointer to a #idmef_service_t object. * * Get ip_version children of the #idmef_service_t object. * * Returns: a pointer to a uint8_t object, or NULL if the children object is not set. */ uint8_t *idmef_service_get_ip_version(idmef_service_t *ptr) { prelude_return_val_if_fail(ptr, 0); /* FIXME */ return ptr->ip_version_is_set ? &ptr->ip_version : NULL; } /** * idmef_service_set_ip_version: * @ptr: pointer to a #idmef_service_t object. * @ip_version: pointer to a #uint8_t object. * * Set @ip_version object as a children of @ptr. * if @ptr already contain an @ip_version object, then it is destroyed, * and updated to point to the provided @ip_version object. */ void idmef_service_set_ip_version(idmef_service_t *ptr, uint8_t ip_version) { prelude_return_if_fail(ptr); ptr->ip_version = ip_version; ptr->ip_version_is_set = 1; } void idmef_service_unset_ip_version(idmef_service_t *ptr) { prelude_return_if_fail(ptr); ptr->ip_version_is_set = 0; } /** * idmef_service_new_ip_version: * @ptr: pointer to a #idmef_service_t object. * @ret: pointer to an address where to store the created #uint8_t object. * * Create a new ip_version object, children of #idmef_service_t. * If @ptr already contain a #uint8_t object, then it is destroyed. * * Returns: 0 on success, or a negative value if an error occured. */ int idmef_service_new_ip_version(idmef_service_t *ptr, uint8_t **ret) { prelude_return_val_if_fail(ptr, prelude_error(PRELUDE_ERROR_ASSERTION)); ptr->ip_version_is_set = 1; *ret = &ptr->ip_version; return 0; } /** * *idmef_service_get_iana_protocol_number: * @ptr: pointer to a #idmef_service_t object. * * Get iana_protocol_number children of the #idmef_service_t object. * * Returns: a pointer to a uint8_t object, or NULL if the children object is not set. */ uint8_t *idmef_service_get_iana_protocol_number(idmef_service_t *ptr) { prelude_return_val_if_fail(ptr, 0); /* FIXME */ return ptr->iana_protocol_number_is_set ? &ptr->iana_protocol_number : NULL; } /** * idmef_service_set_iana_protocol_number: * @ptr: pointer to a #idmef_service_t object. * @iana_protocol_number: pointer to a #uint8_t object. * * Set @iana_protocol_number object as a children of @ptr. * if @ptr already contain an @iana_protocol_number object, then it is destroyed, * and updated to point to the provided @iana_protocol_number object. */ void idmef_service_set_iana_protocol_number(idmef_service_t *ptr, uint8_t iana_protocol_number) { prelude_return_if_fail(ptr); ptr->iana_protocol_number = iana_protocol_number; ptr->iana_protocol_number_is_set = 1; } void idmef_service_unset_iana_protocol_number(idmef_service_t *ptr) { prelude_return_if_fail(ptr); ptr->iana_protocol_number_is_set = 0; } /** * idmef_service_new_iana_protocol_number: * @ptr: pointer to a #idmef_service_t object. * @ret: pointer to an address where to store the created #uint8_t object. * * Create a new iana_protocol_number object, children of #idmef_service_t. * If @ptr already contain a #uint8_t object, then it is destroyed. * * Returns: 0 on success, or a negative value if an error occured. */ int idmef_service_new_iana_protocol_number(idmef_service_t *ptr, uint8_t **ret) { prelude_return_val_if_fail(ptr, prelude_error(PRELUDE_ERROR_ASSERTION)); ptr->iana_protocol_number_is_set = 1; *ret = &ptr->iana_protocol_number; return 0; } /** * *idmef_service_get_iana_protocol_name: * @ptr: pointer to a #idmef_service_t object. * * Get iana_protocol_name children of the #idmef_service_t object. * * Returns: a pointer to a prelude_string_t object, or NULL if the children object is not set. */ prelude_string_t *idmef_service_get_iana_protocol_name(idmef_service_t *ptr) { prelude_return_val_if_fail(ptr, 0); /* FIXME */ return ptr->iana_protocol_name; } /** * idmef_service_set_iana_protocol_name: * @ptr: pointer to a #idmef_service_t object. * @iana_protocol_name: pointer to a #prelude_string_t object. * * Set @iana_protocol_name object as a children of @ptr. * if @ptr already contain an @iana_protocol_name object, then it is destroyed, * and updated to point to the provided @iana_protocol_name object. */ void idmef_service_set_iana_protocol_name(idmef_service_t *ptr, prelude_string_t *iana_protocol_name) { prelude_return_if_fail(ptr); if ( ptr->iana_protocol_name ) prelude_string_destroy(ptr->iana_protocol_name); ptr->iana_protocol_name = iana_protocol_name; } /** * idmef_service_new_iana_protocol_name: * @ptr: pointer to a #idmef_service_t object. * @ret: pointer to an address where to store the created #prelude_string_t object. * * Create a new iana_protocol_name object, children of #idmef_service_t. * If @ptr already contain a #prelude_string_t object, then it is destroyed. * * Returns: 0 on success, or a negative value if an error occured. */ int idmef_service_new_iana_protocol_name(idmef_service_t *ptr, prelude_string_t **ret) { int retval; prelude_return_val_if_fail(ptr, prelude_error(PRELUDE_ERROR_ASSERTION)); if ( ! ptr->iana_protocol_name ) { retval = prelude_string_new(&ptr->iana_protocol_name); if ( retval < 0 ) return retval; } *ret = ptr->iana_protocol_name; return 0; } /** * *idmef_service_get_name: * @ptr: pointer to a #idmef_service_t object. * * Get name children of the #idmef_service_t object. * * Returns: a pointer to a prelude_string_t object, or NULL if the children object is not set. */ prelude_string_t *idmef_service_get_name(idmef_service_t *ptr) { prelude_return_val_if_fail(ptr, 0); /* FIXME */ return ptr->name; } /** * idmef_service_set_name: * @ptr: pointer to a #idmef_service_t object. * @name: pointer to a #prelude_string_t object. * * Set @name object as a children of @ptr. * if @ptr already contain an @name object, then it is destroyed, * and updated to point to the provided @name object. */ void idmef_service_set_name(idmef_service_t *ptr, prelude_string_t *name) { prelude_return_if_fail(ptr); if ( ptr->name ) prelude_string_destroy(ptr->name); ptr->name = name; } /** * idmef_service_new_name: * @ptr: pointer to a #idmef_service_t object. * @ret: pointer to an address where to store the created #prelude_string_t object. * * Create a new name object, children of #idmef_service_t. * If @ptr already contain a #prelude_string_t object, then it is destroyed. * * Returns: 0 on success, or a negative value if an error occured. */ int idmef_service_new_name(idmef_service_t *ptr, prelude_string_t **ret) { int retval; prelude_return_val_if_fail(ptr, prelude_error(PRELUDE_ERROR_ASSERTION)); if ( ! ptr->name ) { retval = prelude_string_new(&ptr->name); if ( retval < 0 ) return retval; } *ret = ptr->name; return 0; } /** * *idmef_service_get_port: * @ptr: pointer to a #idmef_service_t object. * * Get port children of the #idmef_service_t object. * * Returns: a pointer to a uint16_t object, or NULL if the children object is not set. */ uint16_t *idmef_service_get_port(idmef_service_t *ptr) { prelude_return_val_if_fail(ptr, 0); /* FIXME */ return ptr->port_is_set ? &ptr->port : NULL; } /** * idmef_service_set_port: * @ptr: pointer to a #idmef_service_t object. * @port: pointer to a #uint16_t object. * * Set @port object as a children of @ptr. * if @ptr already contain an @port object, then it is destroyed, * and updated to point to the provided @port object. */ void idmef_service_set_port(idmef_service_t *ptr, uint16_t port) { prelude_return_if_fail(ptr); ptr->port = port; ptr->port_is_set = 1; } void idmef_service_unset_port(idmef_service_t *ptr) { prelude_return_if_fail(ptr); ptr->port_is_set = 0; } /** * idmef_service_new_port: * @ptr: pointer to a #idmef_service_t object. * @ret: pointer to an address where to store the created #uint16_t object. * * Create a new port object, children of #idmef_service_t. * If @ptr already contain a #uint16_t object, then it is destroyed. * * Returns: 0 on success, or a negative value if an error occured. */ int idmef_service_new_port(idmef_service_t *ptr, uint16_t **ret) { prelude_return_val_if_fail(ptr, prelude_error(PRELUDE_ERROR_ASSERTION)); ptr->port_is_set = 1; *ret = &ptr->port; return 0; } /** * *idmef_service_get_portlist: * @ptr: pointer to a #idmef_service_t object. * * Get portlist children of the #idmef_service_t object. * * Returns: a pointer to a prelude_string_t object, or NULL if the children object is not set. */ prelude_string_t *idmef_service_get_portlist(idmef_service_t *ptr) { prelude_return_val_if_fail(ptr, 0); /* FIXME */ return ptr->portlist; } /** * idmef_service_set_portlist: * @ptr: pointer to a #idmef_service_t object. * @portlist: pointer to a #prelude_string_t object. * * Set @portlist object as a children of @ptr. * if @ptr already contain an @portlist object, then it is destroyed, * and updated to point to the provided @portlist object. */ void idmef_service_set_portlist(idmef_service_t *ptr, prelude_string_t *portlist) { prelude_return_if_fail(ptr); if ( ptr->portlist ) prelude_string_destroy(ptr->portlist); ptr->portlist = portlist; } /** * idmef_service_new_portlist: * @ptr: pointer to a #idmef_service_t object. * @ret: pointer to an address where to store the created #prelude_string_t object. * * Create a new portlist object, children of #idmef_service_t. * If @ptr already contain a #prelude_string_t object, then it is destroyed. * * Returns: 0 on success, or a negative value if an error occured. */ int idmef_service_new_portlist(idmef_service_t *ptr, prelude_string_t **ret) { int retval; prelude_return_val_if_fail(ptr, prelude_error(PRELUDE_ERROR_ASSERTION)); if ( ! ptr->portlist ) { retval = prelude_string_new(&ptr->portlist); if ( retval < 0 ) return retval; } *ret = ptr->portlist; return 0; } /** * *idmef_service_get_protocol: * @ptr: pointer to a #idmef_service_t object. * * Get protocol children of the #idmef_service_t object. * * Returns: a pointer to a prelude_string_t object, or NULL if the children object is not set. */ prelude_string_t *idmef_service_get_protocol(idmef_service_t *ptr) { prelude_return_val_if_fail(ptr, 0); /* FIXME */ return ptr->protocol; } /** * idmef_service_set_protocol: * @ptr: pointer to a #idmef_service_t object. * @protocol: pointer to a #prelude_string_t object. * * Set @protocol object as a children of @ptr. * if @ptr already contain an @protocol object, then it is destroyed, * and updated to point to the provided @protocol object. */ void idmef_service_set_protocol(idmef_service_t *ptr, prelude_string_t *protocol) { prelude_return_if_fail(ptr); if ( ptr->protocol ) prelude_string_destroy(ptr->protocol); ptr->protocol = protocol; } /** * idmef_service_new_protocol: * @ptr: pointer to a #idmef_service_t object. * @ret: pointer to an address where to store the created #prelude_string_t object. * * Create a new protocol object, children of #idmef_service_t. * If @ptr already contain a #prelude_string_t object, then it is destroyed. * * Returns: 0 on success, or a negative value if an error occured. */ int idmef_service_new_protocol(idmef_service_t *ptr, prelude_string_t **ret) { int retval; prelude_return_val_if_fail(ptr, prelude_error(PRELUDE_ERROR_ASSERTION)); if ( ! ptr->protocol ) { retval = prelude_string_new(&ptr->protocol); if ( retval < 0 ) return retval; } *ret = ptr->protocol; return 0; } /** * idmef_service_get_type: * @ptr: pointer to a #idmef_service_t object. * * Access the type children of @ptr. * * Returns: a pointer to the #idmef_service_type_t children, or NULL if it is not set. */ idmef_service_type_t idmef_service_get_type(idmef_service_t *ptr) { prelude_return_val_if_fail(ptr, prelude_error(PRELUDE_ERROR_ASSERTION)); return ptr->type; } /** * idmef_service_get_web_service: * @ptr: pointer to a #idmef_service_t object. * * Access the web_service children of @ptr. * * Returns: a pointer to the #idmef_web_service_t children, or NULL if it is not set. */ idmef_web_service_t *idmef_service_get_web_service(idmef_service_t *ptr) { prelude_return_val_if_fail(ptr, NULL); return (ptr->type == IDMEF_SERVICE_TYPE_WEB) ? ptr->specific.web_service : NULL; } /** * idmef_service_set_web_service: * @ptr: pointer to a #idmef_service_t object. * @web_service: pointer to a #idmef_web_service_t object. * * Set @web_service object as a children of @ptr. * if @ptr already contain a @web_service object, then it is destroyed, * and updated to point to the provided @web_service object. */ void idmef_service_set_web_service(idmef_service_t *ptr, idmef_web_service_t *web_service) { prelude_return_if_fail(ptr); switch ( ptr->type ) { case IDMEF_SERVICE_TYPE_WEB: idmef_web_service_destroy(ptr->specific.web_service); break; case IDMEF_SERVICE_TYPE_SNMP: idmef_snmp_service_destroy(ptr->specific.snmp_service); break; default: break; } ptr->specific.web_service = web_service; ptr->type = (web_service) ? IDMEF_SERVICE_TYPE_WEB : 0; } /** * idmef_service_new_web_service: * @ptr: pointer to a #idmef_service_t object. * @ret: pointer where to store the created #idmef_web_service_t object. * * Create a new idmef_web_service_t object, children of #idmef_service_t. * If @ptr already contain a #idmef_web_service_t object, then it is destroyed. * * Returns: 0 on success, or a negative value if an error occured. */ int idmef_service_new_web_service(idmef_service_t *ptr, idmef_web_service_t **ret) { int retval; prelude_return_val_if_fail(ptr, prelude_error(PRELUDE_ERROR_ASSERTION)); switch ( ptr->type ) { case IDMEF_SERVICE_TYPE_WEB: *ret = ptr->specific.web_service; return 0; case IDMEF_SERVICE_TYPE_SNMP: idmef_snmp_service_destroy(ptr->specific.snmp_service); break; default: break; } retval = idmef_web_service_new(ret); if ( retval < 0 ) return retval; ptr->type = IDMEF_SERVICE_TYPE_WEB; ptr->specific.web_service = *ret; return 0; } /** * idmef_service_get_snmp_service: * @ptr: pointer to a #idmef_service_t object. * * Access the snmp_service children of @ptr. * * Returns: a pointer to the #idmef_snmp_service_t children, or NULL if it is not set. */ idmef_snmp_service_t *idmef_service_get_snmp_service(idmef_service_t *ptr) { prelude_return_val_if_fail(ptr, NULL); return (ptr->type == IDMEF_SERVICE_TYPE_SNMP) ? ptr->specific.snmp_service : NULL; } /** * idmef_service_set_snmp_service: * @ptr: pointer to a #idmef_service_t object. * @snmp_service: pointer to a #idmef_snmp_service_t object. * * Set @snmp_service object as a children of @ptr. * if @ptr already contain a @snmp_service object, then it is destroyed, * and updated to point to the provided @snmp_service object. */ void idmef_service_set_snmp_service(idmef_service_t *ptr, idmef_snmp_service_t *snmp_service) { prelude_return_if_fail(ptr); switch ( ptr->type ) { case IDMEF_SERVICE_TYPE_WEB: idmef_web_service_destroy(ptr->specific.web_service); break; case IDMEF_SERVICE_TYPE_SNMP: idmef_snmp_service_destroy(ptr->specific.snmp_service); break; default: break; } ptr->specific.snmp_service = snmp_service; ptr->type = (snmp_service) ? IDMEF_SERVICE_TYPE_SNMP : 0; } /** * idmef_service_new_snmp_service: * @ptr: pointer to a #idmef_service_t object. * @ret: pointer where to store the created #idmef_snmp_service_t object. * * Create a new idmef_snmp_service_t object, children of #idmef_service_t. * If @ptr already contain a #idmef_snmp_service_t object, then it is destroyed. * * Returns: 0 on success, or a negative value if an error occured. */ int idmef_service_new_snmp_service(idmef_service_t *ptr, idmef_snmp_service_t **ret) { int retval; prelude_return_val_if_fail(ptr, prelude_error(PRELUDE_ERROR_ASSERTION)); switch ( ptr->type ) { case IDMEF_SERVICE_TYPE_WEB: idmef_web_service_destroy(ptr->specific.web_service); break; case IDMEF_SERVICE_TYPE_SNMP: *ret = ptr->specific.snmp_service; return 0; default: break; } retval = idmef_snmp_service_new(ret); if ( retval < 0 ) return retval; ptr->type = IDMEF_SERVICE_TYPE_SNMP; ptr->specific.snmp_service = *ret; return 0; } /** * idmef_service_copy: * @src: Source of the copy. * @dst: Where to copy the object. * * Copy a new #idmef_service_t object from @src to @dst. * * Returns: 0 on success, a negative value if an error occured. */ int idmef_service_copy(const idmef_service_t *src, idmef_service_t *dst) { int ret; prelude_return_val_if_fail(src, prelude_error(PRELUDE_ERROR_ASSERTION)); prelude_return_val_if_fail(dst, prelude_error(PRELUDE_ERROR_ASSERTION)); ret = 0; if ( src->ident ) { ret = prelude_string_clone(src->ident, &dst->ident); if ( ret < 0 ) return ret; } dst->ip_version_is_set = src->ip_version_is_set; dst->ip_version = src->ip_version; dst->iana_protocol_number_is_set = src->iana_protocol_number_is_set; dst->iana_protocol_number = src->iana_protocol_number; if ( src->iana_protocol_name ) { ret = prelude_string_clone(src->iana_protocol_name, &dst->iana_protocol_name); if ( ret < 0 ) return ret; } if ( src->name ) { ret = prelude_string_clone(src->name, &dst->name); if ( ret < 0 ) return ret; } dst->port_is_set = src->port_is_set; dst->port = src->port; if ( src->portlist ) { ret = prelude_string_clone(src->portlist, &dst->portlist); if ( ret < 0 ) return ret; } if ( src->protocol ) { ret = prelude_string_clone(src->protocol, &dst->protocol); if ( ret < 0 ) return ret; } switch ( src->type ) { case IDMEF_SERVICE_TYPE_WEB: ret = idmef_web_service_clone(src->specific.web_service, &dst->specific.web_service); break; case IDMEF_SERVICE_TYPE_SNMP: ret = idmef_snmp_service_clone(src->specific.snmp_service, &dst->specific.snmp_service); break; default: break; } if ( ret < 0 ) return ret; dst->type = src->type; return 0; } /** * idmef_service_clone: * @src: Object to be cloned. * @dst: Address where to store the pointer to the cloned object. * * Create a copy of @src, and store it in @dst. * * Returns: 0 on success, a negative value if an error occured. */ int idmef_service_clone(idmef_service_t *src, idmef_service_t **dst) { int ret; prelude_return_val_if_fail(src, prelude_error(PRELUDE_ERROR_ASSERTION)); ret = idmef_service_new(dst); if ( ret < 0 ) return ret; return idmef_service_copy(src, *dst); } /** * idmef_service_compare: * @obj1: Object to compare with @obj2. * @obj2: Object to compare with @obj1. * * Compare @obj1 with @obj2. * * Returns: 0 on match, a negative value on comparison failure. */ int idmef_service_compare(const idmef_service_t *obj1, const idmef_service_t *obj2) { int ret = 0; if ( obj1 == NULL && obj2 == NULL ) return 0; else if ( obj1 == NULL || obj2 == NULL ) return -1; ret = prelude_string_compare(obj1->ident, obj2->ident); if ( ret != 0 ) return ret; if ( obj1->ip_version_is_set != obj2->ip_version_is_set ) return -1; if ( obj1->ip_version_is_set && obj1->ip_version != obj2->ip_version ) return -1; if ( obj1->iana_protocol_number_is_set != obj2->iana_protocol_number_is_set ) return -1; if ( obj1->iana_protocol_number_is_set && obj1->iana_protocol_number != obj2->iana_protocol_number ) return -1; ret = prelude_string_compare(obj1->iana_protocol_name, obj2->iana_protocol_name); if ( ret != 0 ) return ret; ret = prelude_string_compare(obj1->name, obj2->name); if ( ret != 0 ) return ret; if ( obj1->port_is_set != obj2->port_is_set ) return -1; if ( obj1->port_is_set && obj1->port != obj2->port ) return -1; ret = prelude_string_compare(obj1->portlist, obj2->portlist); if ( ret != 0 ) return ret; ret = prelude_string_compare(obj1->protocol, obj2->protocol); if ( ret != 0 ) return ret; if ( obj1->type != obj2->type ) return -1; switch ( obj1->type ) { case IDMEF_SERVICE_TYPE_WEB: ret = idmef_web_service_compare(obj1->specific.web_service, obj2->specific.web_service); break; case IDMEF_SERVICE_TYPE_SNMP: ret = idmef_snmp_service_compare(obj1->specific.snmp_service, obj2->specific.snmp_service); break; default: break; } return ret; } /** * idmef_node_new: * @ret: Pointer where to store the created #idmef_node_t object. * * Create a new #idmef_node_t object. * * Returns: 0 on success, a negative value if an error occured. */ int idmef_node_new(idmef_node_t **ret) { *ret = calloc(1, sizeof(**ret)); if ( ! *ret ) return prelude_error_from_errno(errno); (*ret)->refcount = 1; prelude_list_init(&(*ret)->address_list); return 0; } /** * idmef_node_ref: * @node: pointer to a #idmef_node_t object. * * Increase @node reference count, so that it can be referenced * multiple time. * * Returns: a pointer to @node. */ idmef_node_t *idmef_node_ref(idmef_node_t *node) { prelude_return_val_if_fail(node, NULL); node->refcount++; return node; } int _idmef_node_get_child(void *p, idmef_class_child_id_t child, void **childptr) { idmef_node_t *ptr = p; prelude_return_val_if_fail(p, prelude_error(PRELUDE_ERROR_ASSERTION)); *childptr = NULL; switch ( child ) { case 0: return get_value_from_string((idmef_value_t **) childptr, ptr->ident, TRUE); case 1: return idmef_value_new_enum_from_numeric((idmef_value_t **) childptr, IDMEF_CLASS_ID_NODE_CATEGORY, ptr->category); case 2: return get_value_from_string((idmef_value_t **) childptr, ptr->location, TRUE); case 3: return get_value_from_string((idmef_value_t **) childptr, ptr->name, TRUE); case 4: *childptr = &ptr->address_list; return 0; default: return prelude_error(PRELUDE_ERROR_IDMEF_CLASS_UNKNOWN_CHILD); } } int _idmef_node_new_child(void *p, idmef_class_child_id_t child, int n, void **ret) { idmef_node_t *ptr = p; prelude_return_val_if_fail(p, prelude_error(PRELUDE_ERROR_ASSERTION)); switch ( child ) { case 0: return idmef_node_new_ident(ptr, (prelude_string_t **) ret); case 1: return idmef_node_new_category(ptr, (idmef_node_category_t **) ret); case 2: return idmef_node_new_location(ptr, (prelude_string_t **) ret); case 3: return idmef_node_new_name(ptr, (prelude_string_t **) ret); case 4: { int i = 0; prelude_list_t *tmp; if ( n == IDMEF_LIST_APPEND || n == IDMEF_LIST_PREPEND ) return idmef_node_new_address(ptr, (idmef_address_t **) ret, n); if ( n >= 0 ) { prelude_list_for_each(&ptr->address_list, tmp) { if ( i++ == n ) { *ret = prelude_list_entry(tmp, idmef_address_t, list); return 0; } } if ( i != n ) return prelude_error(PRELUDE_ERROR_IDMEF_TREE_INDEX_UNDEFINED); } else { int pos = (-n) - 1; /* With negative value, -1 is the base, translate to 0 */ prelude_list_for_each_reversed(&ptr->address_list, tmp) { if ( i++ == pos ) { *ret = prelude_list_entry(tmp, idmef_address_t, list); return 0; } } if ( i != pos ) return prelude_error(PRELUDE_ERROR_IDMEF_TREE_INDEX_UNDEFINED); } return idmef_node_new_address(ptr, (idmef_address_t **) ret, n); } default: return prelude_error(PRELUDE_ERROR_IDMEF_CLASS_UNKNOWN_CHILD); } } int _idmef_node_destroy_child(void *p, idmef_class_child_id_t child, int n) { idmef_node_t *ptr = p; prelude_return_val_if_fail(p, prelude_error(PRELUDE_ERROR_ASSERTION)); switch ( child ) { case 0: if ( ptr->ident ) { prelude_string_destroy(ptr->ident); ptr->ident = NULL; } return 0; case 1: ptr->category = 0; return 0; case 2: if ( ptr->location ) { prelude_string_destroy(ptr->location); ptr->location = NULL; } return 0; case 3: if ( ptr->name ) { prelude_string_destroy(ptr->name); ptr->name = NULL; } return 0; case 4: { int i = 0; prelude_list_t *tmp; if ( n >= 0 ) { prelude_list_for_each(&ptr->address_list, tmp) { if ( i++ == n ) { void *b = prelude_list_entry(tmp, idmef_address_t, list); idmef_address_destroy(b); return 0; } } if ( i != n ) return prelude_error(PRELUDE_ERROR_IDMEF_TREE_INDEX_UNDEFINED); } else { int pos = (-n) - 1; /* With negative value, -1 is the base, translate to 0 */ prelude_list_for_each_reversed(&ptr->address_list, tmp) { if ( i++ == pos ) { void *b = prelude_list_entry(tmp, idmef_address_t, list); idmef_address_destroy(b); return 0; } } if ( i != pos ) return prelude_error(PRELUDE_ERROR_IDMEF_TREE_INDEX_UNDEFINED); } } default: return prelude_error(PRELUDE_ERROR_IDMEF_CLASS_UNKNOWN_CHILD); } } static void idmef_node_destroy_internal(idmef_node_t *ptr) { prelude_return_if_fail(ptr); if ( ptr->ident ) { prelude_string_destroy(ptr->ident); ptr->ident = NULL; } if ( ptr->location ) { prelude_string_destroy(ptr->location); ptr->location = NULL; } if ( ptr->name ) { prelude_string_destroy(ptr->name); ptr->name = NULL; } { prelude_list_t *n, *tmp; idmef_address_t *entry; prelude_list_for_each_safe(&ptr->address_list, tmp, n) { entry = prelude_list_entry(tmp, idmef_address_t, list); prelude_list_del_init(&entry->list); idmef_address_destroy(entry); } } /* free() should be done by the caller */ } /** * idmef_node_destroy: * @ptr: pointer to a #idmef_node_t object. * * Destroy @ptr and all of it's children. * The objects are only destroyed if their reference count reach zero. */ void idmef_node_destroy(idmef_node_t *ptr) { prelude_return_if_fail(ptr); if ( --ptr->refcount ) return; idmef_node_destroy_internal(ptr); free(ptr); } /** * *idmef_node_get_ident: * @ptr: pointer to a #idmef_node_t object. * * Get ident children of the #idmef_node_t object. * * Returns: a pointer to a prelude_string_t object, or NULL if the children object is not set. */ prelude_string_t *idmef_node_get_ident(idmef_node_t *ptr) { prelude_return_val_if_fail(ptr, 0); /* FIXME */ return ptr->ident; } /** * idmef_node_set_ident: * @ptr: pointer to a #idmef_node_t object. * @ident: pointer to a #prelude_string_t object. * * Set @ident object as a children of @ptr. * if @ptr already contain an @ident object, then it is destroyed, * and updated to point to the provided @ident object. */ void idmef_node_set_ident(idmef_node_t *ptr, prelude_string_t *ident) { prelude_return_if_fail(ptr); if ( ptr->ident ) prelude_string_destroy(ptr->ident); ptr->ident = ident; } /** * idmef_node_new_ident: * @ptr: pointer to a #idmef_node_t object. * @ret: pointer to an address where to store the created #prelude_string_t object. * * Create a new ident object, children of #idmef_node_t. * If @ptr already contain a #prelude_string_t object, then it is destroyed. * * Returns: 0 on success, or a negative value if an error occured. */ int idmef_node_new_ident(idmef_node_t *ptr, prelude_string_t **ret) { int retval; prelude_return_val_if_fail(ptr, prelude_error(PRELUDE_ERROR_ASSERTION)); if ( ! ptr->ident ) { retval = prelude_string_new(&ptr->ident); if ( retval < 0 ) return retval; } *ret = ptr->ident; return 0; } /** * idmef_node_get_category: * @ptr: pointer to a #idmef_node_t object. * * Get category children of the #idmef_node_t object. * * Returns: a pointer to a idmef_node_category_t object, or NULL if the children object is not set. */ idmef_node_category_t idmef_node_get_category(idmef_node_t *ptr) { prelude_return_val_if_fail(ptr, 0); /* FIXME */ return ptr->category; } /** * idmef_node_set_category: * @ptr: pointer to a #idmef_node_t object. * @category: pointer to a #idmef_node_category_t object. * * Set @category object as a children of @ptr. * if @ptr already contain an @category object, then it is destroyed, * and updated to point to the provided @category object. */ void idmef_node_set_category(idmef_node_t *ptr, idmef_node_category_t category) { prelude_return_if_fail(ptr); ptr->category = category; } /** * idmef_node_new_category: * @ptr: pointer to a #idmef_node_t object. * @ret: pointer to an address where to store the created #idmef_node_category_t object. * * Create a new category object, children of #idmef_node_t. * If @ptr already contain a #idmef_node_category_t object, then it is destroyed. * * Returns: 0 on success, or a negative value if an error occured. */ int idmef_node_new_category(idmef_node_t *ptr, idmef_node_category_t **ret) { prelude_return_val_if_fail(ptr, prelude_error(PRELUDE_ERROR_ASSERTION)); *ret = &ptr->category; return 0; } /** * *idmef_node_get_location: * @ptr: pointer to a #idmef_node_t object. * * Get location children of the #idmef_node_t object. * * Returns: a pointer to a prelude_string_t object, or NULL if the children object is not set. */ prelude_string_t *idmef_node_get_location(idmef_node_t *ptr) { prelude_return_val_if_fail(ptr, 0); /* FIXME */ return ptr->location; } /** * idmef_node_set_location: * @ptr: pointer to a #idmef_node_t object. * @location: pointer to a #prelude_string_t object. * * Set @location object as a children of @ptr. * if @ptr already contain an @location object, then it is destroyed, * and updated to point to the provided @location object. */ void idmef_node_set_location(idmef_node_t *ptr, prelude_string_t *location) { prelude_return_if_fail(ptr); if ( ptr->location ) prelude_string_destroy(ptr->location); ptr->location = location; } /** * idmef_node_new_location: * @ptr: pointer to a #idmef_node_t object. * @ret: pointer to an address where to store the created #prelude_string_t object. * * Create a new location object, children of #idmef_node_t. * If @ptr already contain a #prelude_string_t object, then it is destroyed. * * Returns: 0 on success, or a negative value if an error occured. */ int idmef_node_new_location(idmef_node_t *ptr, prelude_string_t **ret) { int retval; prelude_return_val_if_fail(ptr, prelude_error(PRELUDE_ERROR_ASSERTION)); if ( ! ptr->location ) { retval = prelude_string_new(&ptr->location); if ( retval < 0 ) return retval; } *ret = ptr->location; return 0; } /** * *idmef_node_get_name: * @ptr: pointer to a #idmef_node_t object. * * Get name children of the #idmef_node_t object. * * Returns: a pointer to a prelude_string_t object, or NULL if the children object is not set. */ prelude_string_t *idmef_node_get_name(idmef_node_t *ptr) { prelude_return_val_if_fail(ptr, 0); /* FIXME */ return ptr->name; } /** * idmef_node_set_name: * @ptr: pointer to a #idmef_node_t object. * @name: pointer to a #prelude_string_t object. * * Set @name object as a children of @ptr. * if @ptr already contain an @name object, then it is destroyed, * and updated to point to the provided @name object. */ void idmef_node_set_name(idmef_node_t *ptr, prelude_string_t *name) { prelude_return_if_fail(ptr); if ( ptr->name ) prelude_string_destroy(ptr->name); ptr->name = name; } /** * idmef_node_new_name: * @ptr: pointer to a #idmef_node_t object. * @ret: pointer to an address where to store the created #prelude_string_t object. * * Create a new name object, children of #idmef_node_t. * If @ptr already contain a #prelude_string_t object, then it is destroyed. * * Returns: 0 on success, or a negative value if an error occured. */ int idmef_node_new_name(idmef_node_t *ptr, prelude_string_t **ret) { int retval; prelude_return_val_if_fail(ptr, prelude_error(PRELUDE_ERROR_ASSERTION)); if ( ! ptr->name ) { retval = prelude_string_new(&ptr->name); if ( retval < 0 ) return retval; } *ret = ptr->name; return 0; } /** * idmef_node_get_next_address: * @node: pointer to a #idmef_node_t object. * @address_cur: pointer to a #idmef_address_t object. * * Get the next #idmef_address_t object listed in @ptr. * When iterating over the idmef_address_t object listed in @ptr, * @object should be set to the latest returned #idmef_address_t object. * * Returns: the next #idmef_address_t in the list. */ idmef_address_t *idmef_node_get_next_address(idmef_node_t *node, idmef_address_t *address_cur) { prelude_list_t *tmp = (address_cur) ? &address_cur->list : NULL; prelude_return_val_if_fail(node, NULL); prelude_list_for_each_continue(&node->address_list, tmp) return prelude_list_entry(tmp, idmef_address_t, list); return NULL; } /** * idmef_node_set_address: * @ptr: pointer to a #idmef_node_t object. * @object: pointer to a #idmef_address_t object. * @pos: Position in the list. * * Add @object to position @pos of @ptr list of #idmef_address_t object. * * If @pos is #IDMEF_LIST_APPEND, @object will be inserted at the tail of the list. * If @pos is #IDMEF_LIST_PREPEND, @object will be inserted at the head of the list. */ void idmef_node_set_address(idmef_node_t *ptr, idmef_address_t *object, int pos) { prelude_return_if_fail(ptr); prelude_return_if_fail(object); if ( ! prelude_list_is_empty(&object->list) ) prelude_list_del_init(&object->list); list_insert(&ptr->address_list, &object->list, pos); } /** * idmef_node_new_address: * @ptr: pointer to a #idmef_node_t object. * @ret: pointer to an address where to store the created #idmef_address_t object. * @pos: position in the list. * * Create a new #idmef_address_t children of @ptr, and add it to position @pos of * @ptr list of #idmef_address_t object. The created #idmef_address_t object is * stored in @ret. * * If @pos is #IDMEF_LIST_APPEND, @object will be inserted at the tail of the list. * If @pos is #IDMEF_LIST_PREPEND, @object will be inserted at the head of the list. * * Returns: 0 on success, or a negative value if an error occured. */ int idmef_node_new_address(idmef_node_t *ptr, idmef_address_t **ret, int pos) { int retval; prelude_return_val_if_fail(ptr, prelude_error(PRELUDE_ERROR_ASSERTION)); retval = idmef_address_new(ret); if ( retval < 0 ) return retval; list_insert(&ptr->address_list, &(*ret)->list, pos); return 0; } /** * idmef_node_copy: * @src: Source of the copy. * @dst: Where to copy the object. * * Copy a new #idmef_node_t object from @src to @dst. * * Returns: 0 on success, a negative value if an error occured. */ int idmef_node_copy(const idmef_node_t *src, idmef_node_t *dst) { int ret; prelude_return_val_if_fail(src, prelude_error(PRELUDE_ERROR_ASSERTION)); prelude_return_val_if_fail(dst, prelude_error(PRELUDE_ERROR_ASSERTION)); ret = 0; if ( src->ident ) { ret = prelude_string_clone(src->ident, &dst->ident); if ( ret < 0 ) return ret; } dst->category = src->category; if ( src->location ) { ret = prelude_string_clone(src->location, &dst->location); if ( ret < 0 ) return ret; } if ( src->name ) { ret = prelude_string_clone(src->name, &dst->name); if ( ret < 0 ) return ret; } { prelude_list_t *n, *tmp; idmef_address_t *entry, *new; prelude_list_for_each_safe(&src->address_list, tmp, n) { entry = prelude_list_entry(tmp, idmef_address_t, list); idmef_address_clone(entry, &new); prelude_list_add_tail(&dst->address_list, &new->list); } } return 0; } /** * idmef_node_clone: * @src: Object to be cloned. * @dst: Address where to store the pointer to the cloned object. * * Create a copy of @src, and store it in @dst. * * Returns: 0 on success, a negative value if an error occured. */ int idmef_node_clone(idmef_node_t *src, idmef_node_t **dst) { int ret; prelude_return_val_if_fail(src, prelude_error(PRELUDE_ERROR_ASSERTION)); ret = idmef_node_new(dst); if ( ret < 0 ) return ret; return idmef_node_copy(src, *dst); } /** * idmef_node_compare: * @obj1: Object to compare with @obj2. * @obj2: Object to compare with @obj1. * * Compare @obj1 with @obj2. * * Returns: 0 on match, a negative value on comparison failure. */ int idmef_node_compare(const idmef_node_t *obj1, const idmef_node_t *obj2) { int ret = 0; if ( obj1 == NULL && obj2 == NULL ) return 0; else if ( obj1 == NULL || obj2 == NULL ) return -1; ret = prelude_string_compare(obj1->ident, obj2->ident); if ( ret != 0 ) return ret; if ( obj1->category != obj2->category ) return -1; ret = prelude_string_compare(obj1->location, obj2->location); if ( ret != 0 ) return ret; ret = prelude_string_compare(obj1->name, obj2->name); if ( ret != 0 ) return ret; { prelude_list_t *tmp1, *tmp2; idmef_address_t *entry1, *entry2; tmp1 = tmp2 = NULL; do { entry1 = entry2 = NULL; prelude_list_for_each_continue(&obj1->address_list, tmp1) { entry1 = prelude_list_entry(tmp1, idmef_address_t, list); break; } prelude_list_for_each_continue(&obj2->address_list, tmp2) { entry2 = prelude_list_entry(tmp2, idmef_address_t, list); break; } ret = idmef_address_compare(entry1, entry2); if ( ret != 0 ) return ret; } while ( entry1 && entry2 ); } return ret; } /** * idmef_source_new: * @ret: Pointer where to store the created #idmef_source_t object. * * Create a new #idmef_source_t object. * * Returns: 0 on success, a negative value if an error occured. */ int idmef_source_new(idmef_source_t **ret) { *ret = calloc(1, sizeof(**ret)); if ( ! *ret ) return prelude_error_from_errno(errno); prelude_list_init(&(*ret)->list); (*ret)->refcount = 1; return 0; } /** * idmef_source_ref: * @source: pointer to a #idmef_source_t object. * * Increase @source reference count, so that it can be referenced * multiple time. * * Returns: a pointer to @source. */ idmef_source_t *idmef_source_ref(idmef_source_t *source) { prelude_return_val_if_fail(source, NULL); source->refcount++; return source; } int _idmef_source_get_child(void *p, idmef_class_child_id_t child, void **childptr) { idmef_source_t *ptr = p; prelude_return_val_if_fail(p, prelude_error(PRELUDE_ERROR_ASSERTION)); *childptr = NULL; switch ( child ) { case 0: return get_value_from_string((idmef_value_t **) childptr, ptr->ident, TRUE); case 1: return idmef_value_new_enum_from_numeric((idmef_value_t **) childptr, IDMEF_CLASS_ID_SOURCE_SPOOFED, ptr->spoofed); case 2: return get_value_from_string((idmef_value_t **) childptr, ptr->interface, TRUE); case 3: *childptr = ptr->node; return 0; case 4: *childptr = ptr->user; return 0; case 5: *childptr = ptr->process; return 0; case 6: *childptr = ptr->service; return 0; default: return prelude_error(PRELUDE_ERROR_IDMEF_CLASS_UNKNOWN_CHILD); } } int _idmef_source_new_child(void *p, idmef_class_child_id_t child, int n, void **ret) { idmef_source_t *ptr = p; prelude_return_val_if_fail(p, prelude_error(PRELUDE_ERROR_ASSERTION)); switch ( child ) { case 0: return idmef_source_new_ident(ptr, (prelude_string_t **) ret); case 1: return idmef_source_new_spoofed(ptr, (idmef_source_spoofed_t **) ret); case 2: return idmef_source_new_interface(ptr, (prelude_string_t **) ret); case 3: return idmef_source_new_node(ptr, (idmef_node_t **) ret); case 4: return idmef_source_new_user(ptr, (idmef_user_t **) ret); case 5: return idmef_source_new_process(ptr, (idmef_process_t **) ret); case 6: return idmef_source_new_service(ptr, (idmef_service_t **) ret); default: return prelude_error(PRELUDE_ERROR_IDMEF_CLASS_UNKNOWN_CHILD); } } int _idmef_source_destroy_child(void *p, idmef_class_child_id_t child, int n) { idmef_source_t *ptr = p; prelude_return_val_if_fail(p, prelude_error(PRELUDE_ERROR_ASSERTION)); switch ( child ) { case 0: if ( ptr->ident ) { prelude_string_destroy(ptr->ident); ptr->ident = NULL; } return 0; case 1: ptr->spoofed = 0; return 0; case 2: if ( ptr->interface ) { prelude_string_destroy(ptr->interface); ptr->interface = NULL; } return 0; case 3: if ( ptr->node ) { idmef_node_destroy(ptr->node); ptr->node = NULL; } return 0; case 4: if ( ptr->user ) { idmef_user_destroy(ptr->user); ptr->user = NULL; } return 0; case 5: if ( ptr->process ) { idmef_process_destroy(ptr->process); ptr->process = NULL; } return 0; case 6: if ( ptr->service ) { idmef_service_destroy(ptr->service); ptr->service = NULL; } return 0; default: return prelude_error(PRELUDE_ERROR_IDMEF_CLASS_UNKNOWN_CHILD); } } static void idmef_source_destroy_internal(idmef_source_t *ptr) { prelude_return_if_fail(ptr); if ( ! prelude_list_is_empty(&ptr->list) ) prelude_list_del_init(&ptr->list); if ( ptr->ident ) { prelude_string_destroy(ptr->ident); ptr->ident = NULL; } if ( ptr->interface ) { prelude_string_destroy(ptr->interface); ptr->interface = NULL; } if ( ptr->node ) { idmef_node_destroy(ptr->node); ptr->node = NULL; } if ( ptr->user ) { idmef_user_destroy(ptr->user); ptr->user = NULL; } if ( ptr->process ) { idmef_process_destroy(ptr->process); ptr->process = NULL; } if ( ptr->service ) { idmef_service_destroy(ptr->service); ptr->service = NULL; } /* free() should be done by the caller */ } /** * idmef_source_destroy: * @ptr: pointer to a #idmef_source_t object. * * Destroy @ptr and all of it's children. * The objects are only destroyed if their reference count reach zero. */ void idmef_source_destroy(idmef_source_t *ptr) { prelude_return_if_fail(ptr); if ( --ptr->refcount ) return; idmef_source_destroy_internal(ptr); free(ptr); } /** * *idmef_source_get_ident: * @ptr: pointer to a #idmef_source_t object. * * Get ident children of the #idmef_source_t object. * * Returns: a pointer to a prelude_string_t object, or NULL if the children object is not set. */ prelude_string_t *idmef_source_get_ident(idmef_source_t *ptr) { prelude_return_val_if_fail(ptr, 0); /* FIXME */ return ptr->ident; } /** * idmef_source_set_ident: * @ptr: pointer to a #idmef_source_t object. * @ident: pointer to a #prelude_string_t object. * * Set @ident object as a children of @ptr. * if @ptr already contain an @ident object, then it is destroyed, * and updated to point to the provided @ident object. */ void idmef_source_set_ident(idmef_source_t *ptr, prelude_string_t *ident) { prelude_return_if_fail(ptr); if ( ptr->ident ) prelude_string_destroy(ptr->ident); ptr->ident = ident; } /** * idmef_source_new_ident: * @ptr: pointer to a #idmef_source_t object. * @ret: pointer to an address where to store the created #prelude_string_t object. * * Create a new ident object, children of #idmef_source_t. * If @ptr already contain a #prelude_string_t object, then it is destroyed. * * Returns: 0 on success, or a negative value if an error occured. */ int idmef_source_new_ident(idmef_source_t *ptr, prelude_string_t **ret) { int retval; prelude_return_val_if_fail(ptr, prelude_error(PRELUDE_ERROR_ASSERTION)); if ( ! ptr->ident ) { retval = prelude_string_new(&ptr->ident); if ( retval < 0 ) return retval; } *ret = ptr->ident; return 0; } /** * idmef_source_get_spoofed: * @ptr: pointer to a #idmef_source_t object. * * Get spoofed children of the #idmef_source_t object. * * Returns: a pointer to a idmef_source_spoofed_t object, or NULL if the children object is not set. */ idmef_source_spoofed_t idmef_source_get_spoofed(idmef_source_t *ptr) { prelude_return_val_if_fail(ptr, 0); /* FIXME */ return ptr->spoofed; } /** * idmef_source_set_spoofed: * @ptr: pointer to a #idmef_source_t object. * @spoofed: pointer to a #idmef_source_spoofed_t object. * * Set @spoofed object as a children of @ptr. * if @ptr already contain an @spoofed object, then it is destroyed, * and updated to point to the provided @spoofed object. */ void idmef_source_set_spoofed(idmef_source_t *ptr, idmef_source_spoofed_t spoofed) { prelude_return_if_fail(ptr); ptr->spoofed = spoofed; } /** * idmef_source_new_spoofed: * @ptr: pointer to a #idmef_source_t object. * @ret: pointer to an address where to store the created #idmef_source_spoofed_t object. * * Create a new spoofed object, children of #idmef_source_t. * If @ptr already contain a #idmef_source_spoofed_t object, then it is destroyed. * * Returns: 0 on success, or a negative value if an error occured. */ int idmef_source_new_spoofed(idmef_source_t *ptr, idmef_source_spoofed_t **ret) { prelude_return_val_if_fail(ptr, prelude_error(PRELUDE_ERROR_ASSERTION)); *ret = &ptr->spoofed; return 0; } /** * *idmef_source_get_interface: * @ptr: pointer to a #idmef_source_t object. * * Get interface children of the #idmef_source_t object. * * Returns: a pointer to a prelude_string_t object, or NULL if the children object is not set. */ prelude_string_t *idmef_source_get_interface(idmef_source_t *ptr) { prelude_return_val_if_fail(ptr, 0); /* FIXME */ return ptr->interface; } /** * idmef_source_set_interface: * @ptr: pointer to a #idmef_source_t object. * @interface: pointer to a #prelude_string_t object. * * Set @interface object as a children of @ptr. * if @ptr already contain an @interface object, then it is destroyed, * and updated to point to the provided @interface object. */ void idmef_source_set_interface(idmef_source_t *ptr, prelude_string_t *interface) { prelude_return_if_fail(ptr); if ( ptr->interface ) prelude_string_destroy(ptr->interface); ptr->interface = interface; } /** * idmef_source_new_interface: * @ptr: pointer to a #idmef_source_t object. * @ret: pointer to an address where to store the created #prelude_string_t object. * * Create a new interface object, children of #idmef_source_t. * If @ptr already contain a #prelude_string_t object, then it is destroyed. * * Returns: 0 on success, or a negative value if an error occured. */ int idmef_source_new_interface(idmef_source_t *ptr, prelude_string_t **ret) { int retval; prelude_return_val_if_fail(ptr, prelude_error(PRELUDE_ERROR_ASSERTION)); if ( ! ptr->interface ) { retval = prelude_string_new(&ptr->interface); if ( retval < 0 ) return retval; } *ret = ptr->interface; return 0; } /** * *idmef_source_get_node: * @ptr: pointer to a #idmef_source_t object. * * Get node children of the #idmef_source_t object. * * Returns: a pointer to a idmef_node_t object, or NULL if the children object is not set. */ idmef_node_t *idmef_source_get_node(idmef_source_t *ptr) { prelude_return_val_if_fail(ptr, 0); /* FIXME */ return ptr->node; } /** * idmef_source_set_node: * @ptr: pointer to a #idmef_source_t object. * @node: pointer to a #idmef_node_t object. * * Set @node object as a children of @ptr. * if @ptr already contain an @node object, then it is destroyed, * and updated to point to the provided @node object. */ void idmef_source_set_node(idmef_source_t *ptr, idmef_node_t *node) { prelude_return_if_fail(ptr); if ( ptr->node ) idmef_node_destroy(ptr->node); ptr->node = node; } /** * idmef_source_new_node: * @ptr: pointer to a #idmef_source_t object. * @ret: pointer to an address where to store the created #idmef_node_t object. * * Create a new node object, children of #idmef_source_t. * If @ptr already contain a #idmef_node_t object, then it is destroyed. * * Returns: 0 on success, or a negative value if an error occured. */ int idmef_source_new_node(idmef_source_t *ptr, idmef_node_t **ret) { int retval; prelude_return_val_if_fail(ptr, prelude_error(PRELUDE_ERROR_ASSERTION)); if ( ! ptr->node ) { retval = idmef_node_new(&ptr->node); if ( retval < 0 ) return retval; } *ret = ptr->node; return 0; } /** * *idmef_source_get_user: * @ptr: pointer to a #idmef_source_t object. * * Get user children of the #idmef_source_t object. * * Returns: a pointer to a idmef_user_t object, or NULL if the children object is not set. */ idmef_user_t *idmef_source_get_user(idmef_source_t *ptr) { prelude_return_val_if_fail(ptr, 0); /* FIXME */ return ptr->user; } /** * idmef_source_set_user: * @ptr: pointer to a #idmef_source_t object. * @user: pointer to a #idmef_user_t object. * * Set @user object as a children of @ptr. * if @ptr already contain an @user object, then it is destroyed, * and updated to point to the provided @user object. */ void idmef_source_set_user(idmef_source_t *ptr, idmef_user_t *user) { prelude_return_if_fail(ptr); if ( ptr->user ) idmef_user_destroy(ptr->user); ptr->user = user; } /** * idmef_source_new_user: * @ptr: pointer to a #idmef_source_t object. * @ret: pointer to an address where to store the created #idmef_user_t object. * * Create a new user object, children of #idmef_source_t. * If @ptr already contain a #idmef_user_t object, then it is destroyed. * * Returns: 0 on success, or a negative value if an error occured. */ int idmef_source_new_user(idmef_source_t *ptr, idmef_user_t **ret) { int retval; prelude_return_val_if_fail(ptr, prelude_error(PRELUDE_ERROR_ASSERTION)); if ( ! ptr->user ) { retval = idmef_user_new(&ptr->user); if ( retval < 0 ) return retval; } *ret = ptr->user; return 0; } /** * *idmef_source_get_process: * @ptr: pointer to a #idmef_source_t object. * * Get process children of the #idmef_source_t object. * * Returns: a pointer to a idmef_process_t object, or NULL if the children object is not set. */ idmef_process_t *idmef_source_get_process(idmef_source_t *ptr) { prelude_return_val_if_fail(ptr, 0); /* FIXME */ return ptr->process; } /** * idmef_source_set_process: * @ptr: pointer to a #idmef_source_t object. * @process: pointer to a #idmef_process_t object. * * Set @process object as a children of @ptr. * if @ptr already contain an @process object, then it is destroyed, * and updated to point to the provided @process object. */ void idmef_source_set_process(idmef_source_t *ptr, idmef_process_t *process) { prelude_return_if_fail(ptr); if ( ptr->process ) idmef_process_destroy(ptr->process); ptr->process = process; } /** * idmef_source_new_process: * @ptr: pointer to a #idmef_source_t object. * @ret: pointer to an address where to store the created #idmef_process_t object. * * Create a new process object, children of #idmef_source_t. * If @ptr already contain a #idmef_process_t object, then it is destroyed. * * Returns: 0 on success, or a negative value if an error occured. */ int idmef_source_new_process(idmef_source_t *ptr, idmef_process_t **ret) { int retval; prelude_return_val_if_fail(ptr, prelude_error(PRELUDE_ERROR_ASSERTION)); if ( ! ptr->process ) { retval = idmef_process_new(&ptr->process); if ( retval < 0 ) return retval; } *ret = ptr->process; return 0; } /** * *idmef_source_get_service: * @ptr: pointer to a #idmef_source_t object. * * Get service children of the #idmef_source_t object. * * Returns: a pointer to a idmef_service_t object, or NULL if the children object is not set. */ idmef_service_t *idmef_source_get_service(idmef_source_t *ptr) { prelude_return_val_if_fail(ptr, 0); /* FIXME */ return ptr->service; } /** * idmef_source_set_service: * @ptr: pointer to a #idmef_source_t object. * @service: pointer to a #idmef_service_t object. * * Set @service object as a children of @ptr. * if @ptr already contain an @service object, then it is destroyed, * and updated to point to the provided @service object. */ void idmef_source_set_service(idmef_source_t *ptr, idmef_service_t *service) { prelude_return_if_fail(ptr); if ( ptr->service ) idmef_service_destroy(ptr->service); ptr->service = service; } /** * idmef_source_new_service: * @ptr: pointer to a #idmef_source_t object. * @ret: pointer to an address where to store the created #idmef_service_t object. * * Create a new service object, children of #idmef_source_t. * If @ptr already contain a #idmef_service_t object, then it is destroyed. * * Returns: 0 on success, or a negative value if an error occured. */ int idmef_source_new_service(idmef_source_t *ptr, idmef_service_t **ret) { int retval; prelude_return_val_if_fail(ptr, prelude_error(PRELUDE_ERROR_ASSERTION)); if ( ! ptr->service ) { retval = idmef_service_new(&ptr->service); if ( retval < 0 ) return retval; } *ret = ptr->service; return 0; } /** * idmef_source_copy: * @src: Source of the copy. * @dst: Where to copy the object. * * Copy a new #idmef_source_t object from @src to @dst. * * Returns: 0 on success, a negative value if an error occured. */ int idmef_source_copy(const idmef_source_t *src, idmef_source_t *dst) { int ret; prelude_return_val_if_fail(src, prelude_error(PRELUDE_ERROR_ASSERTION)); prelude_return_val_if_fail(dst, prelude_error(PRELUDE_ERROR_ASSERTION)); ret = 0; if ( src->ident ) { ret = prelude_string_clone(src->ident, &dst->ident); if ( ret < 0 ) return ret; } dst->spoofed = src->spoofed; if ( src->interface ) { ret = prelude_string_clone(src->interface, &dst->interface); if ( ret < 0 ) return ret; } if ( src->node ) { ret = idmef_node_clone(src->node, &dst->node); if ( ret < 0 ) return ret; } if ( src->user ) { ret = idmef_user_clone(src->user, &dst->user); if ( ret < 0 ) return ret; } if ( src->process ) { ret = idmef_process_clone(src->process, &dst->process); if ( ret < 0 ) return ret; } if ( src->service ) { ret = idmef_service_clone(src->service, &dst->service); if ( ret < 0 ) return ret; } return 0; } /** * idmef_source_clone: * @src: Object to be cloned. * @dst: Address where to store the pointer to the cloned object. * * Create a copy of @src, and store it in @dst. * * Returns: 0 on success, a negative value if an error occured. */ int idmef_source_clone(idmef_source_t *src, idmef_source_t **dst) { int ret; prelude_return_val_if_fail(src, prelude_error(PRELUDE_ERROR_ASSERTION)); ret = idmef_source_new(dst); if ( ret < 0 ) return ret; return idmef_source_copy(src, *dst); } /** * idmef_source_compare: * @obj1: Object to compare with @obj2. * @obj2: Object to compare with @obj1. * * Compare @obj1 with @obj2. * * Returns: 0 on match, a negative value on comparison failure. */ int idmef_source_compare(const idmef_source_t *obj1, const idmef_source_t *obj2) { int ret = 0; if ( obj1 == NULL && obj2 == NULL ) return 0; else if ( obj1 == NULL || obj2 == NULL ) return -1; ret = prelude_string_compare(obj1->ident, obj2->ident); if ( ret != 0 ) return ret; if ( obj1->spoofed != obj2->spoofed ) return -1; ret = prelude_string_compare(obj1->interface, obj2->interface); if ( ret != 0 ) return ret; ret = idmef_node_compare(obj1->node, obj2->node); if ( ret != 0 ) return ret; ret = idmef_user_compare(obj1->user, obj2->user); if ( ret != 0 ) return ret; ret = idmef_process_compare(obj1->process, obj2->process); if ( ret != 0 ) return ret; ret = idmef_service_compare(obj1->service, obj2->service); if ( ret != 0 ) return ret; return ret; } /** * idmef_file_access_new: * @ret: Pointer where to store the created #idmef_file_access_t object. * * Create a new #idmef_file_access_t object. * * Returns: 0 on success, a negative value if an error occured. */ int idmef_file_access_new(idmef_file_access_t **ret) { *ret = calloc(1, sizeof(**ret)); if ( ! *ret ) return prelude_error_from_errno(errno); prelude_list_init(&(*ret)->list); (*ret)->refcount = 1; prelude_list_init(&(*ret)->permission_list); { int retval = idmef_user_id_new(&(*ret)->user_id); if ( retval < 0 ) { idmef_file_access_destroy(*ret); *ret = NULL; return retval; } } return 0; } /** * idmef_file_access_ref: * @file_access: pointer to a #idmef_file_access_t object. * * Increase @file_access reference count, so that it can be referenced * multiple time. * * Returns: a pointer to @file_access. */ idmef_file_access_t *idmef_file_access_ref(idmef_file_access_t *file_access) { prelude_return_val_if_fail(file_access, NULL); file_access->refcount++; return file_access; } int _idmef_file_access_get_child(void *p, idmef_class_child_id_t child, void **childptr) { idmef_file_access_t *ptr = p; prelude_return_val_if_fail(p, prelude_error(PRELUDE_ERROR_ASSERTION)); *childptr = NULL; switch ( child ) { case 0: *childptr = ptr->user_id; return 0; case 1: *childptr = &ptr->permission_list; return 0; default: return prelude_error(PRELUDE_ERROR_IDMEF_CLASS_UNKNOWN_CHILD); } } int _idmef_file_access_new_child(void *p, idmef_class_child_id_t child, int n, void **ret) { idmef_file_access_t *ptr = p; prelude_return_val_if_fail(p, prelude_error(PRELUDE_ERROR_ASSERTION)); switch ( child ) { case 0: return idmef_file_access_new_user_id(ptr, (idmef_user_id_t **) ret); case 1: { int i = 0; prelude_list_t *tmp; if ( n == IDMEF_LIST_APPEND || n == IDMEF_LIST_PREPEND ) return idmef_file_access_new_permission(ptr, (prelude_string_t **) ret, n); if ( n >= 0 ) { prelude_list_for_each(&ptr->permission_list, tmp) { if ( i++ == n ) { *ret = prelude_list_entry(tmp, prelude_string_t, list); return 0; } } if ( i != n ) return prelude_error(PRELUDE_ERROR_IDMEF_TREE_INDEX_UNDEFINED); } else { int pos = (-n) - 1; /* With negative value, -1 is the base, translate to 0 */ prelude_list_for_each_reversed(&ptr->permission_list, tmp) { if ( i++ == pos ) { *ret = prelude_list_entry(tmp, prelude_string_t, list); return 0; } } if ( i != pos ) return prelude_error(PRELUDE_ERROR_IDMEF_TREE_INDEX_UNDEFINED); } return idmef_file_access_new_permission(ptr, (prelude_string_t **) ret, n); } default: return prelude_error(PRELUDE_ERROR_IDMEF_CLASS_UNKNOWN_CHILD); } } int _idmef_file_access_destroy_child(void *p, idmef_class_child_id_t child, int n) { idmef_file_access_t *ptr = p; prelude_return_val_if_fail(p, prelude_error(PRELUDE_ERROR_ASSERTION)); switch ( child ) { case 0: if ( ptr->user_id ) { idmef_user_id_destroy(ptr->user_id); ptr->user_id = NULL; } return 0; case 1: { int i = 0; prelude_list_t *tmp; if ( n >= 0 ) { prelude_list_for_each(&ptr->permission_list, tmp) { if ( i++ == n ) { void *b = prelude_list_entry(tmp, prelude_string_t, list); prelude_string_destroy(b); return 0; } } if ( i != n ) return prelude_error(PRELUDE_ERROR_IDMEF_TREE_INDEX_UNDEFINED); } else { int pos = (-n) - 1; /* With negative value, -1 is the base, translate to 0 */ prelude_list_for_each_reversed(&ptr->permission_list, tmp) { if ( i++ == pos ) { void *b = prelude_list_entry(tmp, prelude_string_t, list); prelude_string_destroy(b); return 0; } } if ( i != pos ) return prelude_error(PRELUDE_ERROR_IDMEF_TREE_INDEX_UNDEFINED); } } default: return prelude_error(PRELUDE_ERROR_IDMEF_CLASS_UNKNOWN_CHILD); } } static void idmef_file_access_destroy_internal(idmef_file_access_t *ptr) { prelude_return_if_fail(ptr); if ( ! prelude_list_is_empty(&ptr->list) ) prelude_list_del_init(&ptr->list); if ( ptr->user_id ) { idmef_user_id_destroy(ptr->user_id); ptr->user_id = NULL; } { prelude_list_t *n, *tmp; prelude_string_t *entry; prelude_list_for_each_safe(&ptr->permission_list, tmp, n) { entry = prelude_list_entry(tmp, prelude_string_t, list); prelude_list_del_init(&entry->list); prelude_string_destroy(entry); } } /* free() should be done by the caller */ } /** * idmef_file_access_destroy: * @ptr: pointer to a #idmef_file_access_t object. * * Destroy @ptr and all of it's children. * The objects are only destroyed if their reference count reach zero. */ void idmef_file_access_destroy(idmef_file_access_t *ptr) { prelude_return_if_fail(ptr); if ( --ptr->refcount ) return; idmef_file_access_destroy_internal(ptr); free(ptr); } /** * *idmef_file_access_get_user_id: * @ptr: pointer to a #idmef_file_access_t object. * * Get user_id children of the #idmef_file_access_t object. * * Returns: a pointer to a idmef_user_id_t object, or NULL if the children object is not set. */ idmef_user_id_t *idmef_file_access_get_user_id(idmef_file_access_t *ptr) { prelude_return_val_if_fail(ptr, 0); /* FIXME */ return ptr->user_id; } /** * idmef_file_access_set_user_id: * @ptr: pointer to a #idmef_file_access_t object. * @user_id: pointer to a #idmef_user_id_t object. * * Set @user_id object as a children of @ptr. * if @ptr already contain an @user_id object, then it is destroyed, * and updated to point to the provided @user_id object. */ void idmef_file_access_set_user_id(idmef_file_access_t *ptr, idmef_user_id_t *user_id) { prelude_return_if_fail(ptr); if ( ptr->user_id ) idmef_user_id_destroy(ptr->user_id); ptr->user_id = user_id; } /** * idmef_file_access_new_user_id: * @ptr: pointer to a #idmef_file_access_t object. * @ret: pointer to an address where to store the created #idmef_user_id_t object. * * Create a new user_id object, children of #idmef_file_access_t. * If @ptr already contain a #idmef_user_id_t object, then it is destroyed. * * Returns: 0 on success, or a negative value if an error occured. */ int idmef_file_access_new_user_id(idmef_file_access_t *ptr, idmef_user_id_t **ret) { int retval; prelude_return_val_if_fail(ptr, prelude_error(PRELUDE_ERROR_ASSERTION)); if ( ! ptr->user_id ) { retval = idmef_user_id_new(&ptr->user_id); if ( retval < 0 ) return retval; } *ret = ptr->user_id; return 0; } /** * idmef_file_access_get_next_permission: * @file_access: pointer to a #idmef_file_access_t object. * @prelude_string_cur: pointer to a #prelude_string_t object. * * Get the next #prelude_string_t object listed in @ptr. * When iterating over the prelude_string_t object listed in @ptr, * @object should be set to the latest returned #prelude_string_t object. * * Returns: the next #prelude_string_t in the list. */ prelude_string_t *idmef_file_access_get_next_permission(idmef_file_access_t *file_access, prelude_string_t *prelude_string_cur) { prelude_list_t *tmp = (prelude_string_cur) ? &prelude_string_cur->list : NULL; prelude_return_val_if_fail(file_access, NULL); prelude_list_for_each_continue(&file_access->permission_list, tmp) return prelude_list_entry(tmp, prelude_string_t, list); return NULL; } /** * idmef_file_access_set_permission: * @ptr: pointer to a #idmef_file_access_t object. * @object: pointer to a #prelude_string_t object. * @pos: Position in the list. * * Add @object to position @pos of @ptr list of #prelude_string_t object. * * If @pos is #IDMEF_LIST_APPEND, @object will be inserted at the tail of the list. * If @pos is #IDMEF_LIST_PREPEND, @object will be inserted at the head of the list. */ void idmef_file_access_set_permission(idmef_file_access_t *ptr, prelude_string_t *object, int pos) { prelude_return_if_fail(ptr); prelude_return_if_fail(object); if ( ! prelude_list_is_empty(&object->list) ) prelude_list_del_init(&object->list); list_insert(&ptr->permission_list, &object->list, pos); } /** * idmef_file_access_new_permission: * @ptr: pointer to a #idmef_file_access_t object. * @ret: pointer to an address where to store the created #prelude_string_t object. * @pos: position in the list. * * Create a new #prelude_string_t children of @ptr, and add it to position @pos of * @ptr list of #prelude_string_t object. The created #prelude_string_t object is * stored in @ret. * * If @pos is #IDMEF_LIST_APPEND, @object will be inserted at the tail of the list. * If @pos is #IDMEF_LIST_PREPEND, @object will be inserted at the head of the list. * * Returns: 0 on success, or a negative value if an error occured. */ int idmef_file_access_new_permission(idmef_file_access_t *ptr, prelude_string_t **ret, int pos) { int retval; prelude_return_val_if_fail(ptr, prelude_error(PRELUDE_ERROR_ASSERTION)); retval = prelude_string_new(ret); if ( retval < 0 ) return retval; list_insert(&ptr->permission_list, &(*ret)->list, pos); return 0; } /** * idmef_file_access_copy: * @src: Source of the copy. * @dst: Where to copy the object. * * Copy a new #idmef_file_access_t object from @src to @dst. * * Returns: 0 on success, a negative value if an error occured. */ int idmef_file_access_copy(const idmef_file_access_t *src, idmef_file_access_t *dst) { int ret; prelude_return_val_if_fail(src, prelude_error(PRELUDE_ERROR_ASSERTION)); prelude_return_val_if_fail(dst, prelude_error(PRELUDE_ERROR_ASSERTION)); ret = 0; if ( src->user_id ) { ret = idmef_user_id_copy(src->user_id, dst->user_id); if ( ret < 0 ) return ret; } { prelude_list_t *n, *tmp; prelude_string_t *entry, *new; prelude_list_for_each_safe(&src->permission_list, tmp, n) { entry = prelude_list_entry(tmp, prelude_string_t, list); prelude_string_clone(entry, &new); prelude_list_add_tail(&dst->permission_list, &new->list); } } return 0; } /** * idmef_file_access_clone: * @src: Object to be cloned. * @dst: Address where to store the pointer to the cloned object. * * Create a copy of @src, and store it in @dst. * * Returns: 0 on success, a negative value if an error occured. */ int idmef_file_access_clone(idmef_file_access_t *src, idmef_file_access_t **dst) { int ret; prelude_return_val_if_fail(src, prelude_error(PRELUDE_ERROR_ASSERTION)); ret = idmef_file_access_new(dst); if ( ret < 0 ) return ret; return idmef_file_access_copy(src, *dst); } /** * idmef_file_access_compare: * @obj1: Object to compare with @obj2. * @obj2: Object to compare with @obj1. * * Compare @obj1 with @obj2. * * Returns: 0 on match, a negative value on comparison failure. */ int idmef_file_access_compare(const idmef_file_access_t *obj1, const idmef_file_access_t *obj2) { int ret = 0; if ( obj1 == NULL && obj2 == NULL ) return 0; else if ( obj1 == NULL || obj2 == NULL ) return -1; ret = idmef_user_id_compare(obj1->user_id, obj2->user_id); if ( ret != 0 ) return ret; { prelude_list_t *tmp1, *tmp2; prelude_string_t *entry1, *entry2; tmp1 = tmp2 = NULL; do { entry1 = entry2 = NULL; prelude_list_for_each_continue(&obj1->permission_list, tmp1) { entry1 = prelude_list_entry(tmp1, prelude_string_t, list); break; } prelude_list_for_each_continue(&obj2->permission_list, tmp2) { entry2 = prelude_list_entry(tmp2, prelude_string_t, list); break; } ret = prelude_string_compare(entry1, entry2); if ( ret != 0 ) return ret; } while ( entry1 && entry2 ); } return ret; } /** * idmef_inode_new: * @ret: Pointer where to store the created #idmef_inode_t object. * * Create a new #idmef_inode_t object. * * Returns: 0 on success, a negative value if an error occured. */ int idmef_inode_new(idmef_inode_t **ret) { *ret = calloc(1, sizeof(**ret)); if ( ! *ret ) return prelude_error_from_errno(errno); (*ret)->refcount = 1; return 0; } /** * idmef_inode_ref: * @inode: pointer to a #idmef_inode_t object. * * Increase @inode reference count, so that it can be referenced * multiple time. * * Returns: a pointer to @inode. */ idmef_inode_t *idmef_inode_ref(idmef_inode_t *inode) { prelude_return_val_if_fail(inode, NULL); inode->refcount++; return inode; } int _idmef_inode_get_child(void *p, idmef_class_child_id_t child, void **childptr) { idmef_inode_t *ptr = p; prelude_return_val_if_fail(p, prelude_error(PRELUDE_ERROR_ASSERTION)); *childptr = NULL; switch ( child ) { case 0: return get_value_from_time((idmef_value_t **) childptr, ptr->change_time, TRUE); case 1: return (ptr->number_is_set) ? idmef_value_new_uint32((idmef_value_t **) childptr, ptr->number) : 0; case 2: return (ptr->major_device_is_set) ? idmef_value_new_uint32((idmef_value_t **) childptr, ptr->major_device) : 0; case 3: return (ptr->minor_device_is_set) ? idmef_value_new_uint32((idmef_value_t **) childptr, ptr->minor_device) : 0; case 4: return (ptr->c_major_device_is_set) ? idmef_value_new_uint32((idmef_value_t **) childptr, ptr->c_major_device) : 0; case 5: return (ptr->c_minor_device_is_set) ? idmef_value_new_uint32((idmef_value_t **) childptr, ptr->c_minor_device) : 0; default: return prelude_error(PRELUDE_ERROR_IDMEF_CLASS_UNKNOWN_CHILD); } } int _idmef_inode_new_child(void *p, idmef_class_child_id_t child, int n, void **ret) { idmef_inode_t *ptr = p; prelude_return_val_if_fail(p, prelude_error(PRELUDE_ERROR_ASSERTION)); switch ( child ) { case 0: return idmef_inode_new_change_time(ptr, (idmef_time_t **) ret); case 1: return idmef_inode_new_number(ptr, (uint32_t **) ret); case 2: return idmef_inode_new_major_device(ptr, (uint32_t **) ret); case 3: return idmef_inode_new_minor_device(ptr, (uint32_t **) ret); case 4: return idmef_inode_new_c_major_device(ptr, (uint32_t **) ret); case 5: return idmef_inode_new_c_minor_device(ptr, (uint32_t **) ret); default: return prelude_error(PRELUDE_ERROR_IDMEF_CLASS_UNKNOWN_CHILD); } } int _idmef_inode_destroy_child(void *p, idmef_class_child_id_t child, int n) { idmef_inode_t *ptr = p; prelude_return_val_if_fail(p, prelude_error(PRELUDE_ERROR_ASSERTION)); switch ( child ) { case 0: if ( ptr->change_time ) { idmef_time_destroy(ptr->change_time); ptr->change_time = NULL; } return 0; case 1: ptr->number_is_set = 0; return 0; case 2: ptr->major_device_is_set = 0; return 0; case 3: ptr->minor_device_is_set = 0; return 0; case 4: ptr->c_major_device_is_set = 0; return 0; case 5: ptr->c_minor_device_is_set = 0; return 0; default: return prelude_error(PRELUDE_ERROR_IDMEF_CLASS_UNKNOWN_CHILD); } } static void idmef_inode_destroy_internal(idmef_inode_t *ptr) { prelude_return_if_fail(ptr); if ( ptr->change_time ) { idmef_time_destroy(ptr->change_time); ptr->change_time = NULL; } /* free() should be done by the caller */ } /** * idmef_inode_destroy: * @ptr: pointer to a #idmef_inode_t object. * * Destroy @ptr and all of it's children. * The objects are only destroyed if their reference count reach zero. */ void idmef_inode_destroy(idmef_inode_t *ptr) { prelude_return_if_fail(ptr); if ( --ptr->refcount ) return; idmef_inode_destroy_internal(ptr); free(ptr); } /** * *idmef_inode_get_change_time: * @ptr: pointer to a #idmef_inode_t object. * * Get change_time children of the #idmef_inode_t object. * * Returns: a pointer to a idmef_time_t object, or NULL if the children object is not set. */ idmef_time_t *idmef_inode_get_change_time(idmef_inode_t *ptr) { prelude_return_val_if_fail(ptr, 0); /* FIXME */ return ptr->change_time; } /** * idmef_inode_set_change_time: * @ptr: pointer to a #idmef_inode_t object. * @change_time: pointer to a #idmef_time_t object. * * Set @change_time object as a children of @ptr. * if @ptr already contain an @change_time object, then it is destroyed, * and updated to point to the provided @change_time object. */ void idmef_inode_set_change_time(idmef_inode_t *ptr, idmef_time_t *change_time) { prelude_return_if_fail(ptr); if ( ptr->change_time ) idmef_time_destroy(ptr->change_time); ptr->change_time = change_time; } /** * idmef_inode_new_change_time: * @ptr: pointer to a #idmef_inode_t object. * @ret: pointer to an address where to store the created #idmef_time_t object. * * Create a new change_time object, children of #idmef_inode_t. * If @ptr already contain a #idmef_time_t object, then it is destroyed. * * Returns: 0 on success, or a negative value if an error occured. */ int idmef_inode_new_change_time(idmef_inode_t *ptr, idmef_time_t **ret) { int retval; prelude_return_val_if_fail(ptr, prelude_error(PRELUDE_ERROR_ASSERTION)); if ( ! ptr->change_time ) { retval = idmef_time_new(&ptr->change_time); if ( retval < 0 ) return retval; } *ret = ptr->change_time; return 0; } /** * *idmef_inode_get_number: * @ptr: pointer to a #idmef_inode_t object. * * Get number children of the #idmef_inode_t object. * * Returns: a pointer to a uint32_t object, or NULL if the children object is not set. */ uint32_t *idmef_inode_get_number(idmef_inode_t *ptr) { prelude_return_val_if_fail(ptr, 0); /* FIXME */ return ptr->number_is_set ? &ptr->number : NULL; } /** * idmef_inode_set_number: * @ptr: pointer to a #idmef_inode_t object. * @number: pointer to a #uint32_t object. * * Set @number object as a children of @ptr. * if @ptr already contain an @number object, then it is destroyed, * and updated to point to the provided @number object. */ void idmef_inode_set_number(idmef_inode_t *ptr, uint32_t number) { prelude_return_if_fail(ptr); ptr->number = number; ptr->number_is_set = 1; } void idmef_inode_unset_number(idmef_inode_t *ptr) { prelude_return_if_fail(ptr); ptr->number_is_set = 0; } /** * idmef_inode_new_number: * @ptr: pointer to a #idmef_inode_t object. * @ret: pointer to an address where to store the created #uint32_t object. * * Create a new number object, children of #idmef_inode_t. * If @ptr already contain a #uint32_t object, then it is destroyed. * * Returns: 0 on success, or a negative value if an error occured. */ int idmef_inode_new_number(idmef_inode_t *ptr, uint32_t **ret) { prelude_return_val_if_fail(ptr, prelude_error(PRELUDE_ERROR_ASSERTION)); ptr->number_is_set = 1; *ret = &ptr->number; return 0; } /** * *idmef_inode_get_major_device: * @ptr: pointer to a #idmef_inode_t object. * * Get major_device children of the #idmef_inode_t object. * * Returns: a pointer to a uint32_t object, or NULL if the children object is not set. */ uint32_t *idmef_inode_get_major_device(idmef_inode_t *ptr) { prelude_return_val_if_fail(ptr, 0); /* FIXME */ return ptr->major_device_is_set ? &ptr->major_device : NULL; } /** * idmef_inode_set_major_device: * @ptr: pointer to a #idmef_inode_t object. * @major_device: pointer to a #uint32_t object. * * Set @major_device object as a children of @ptr. * if @ptr already contain an @major_device object, then it is destroyed, * and updated to point to the provided @major_device object. */ void idmef_inode_set_major_device(idmef_inode_t *ptr, uint32_t major_device) { prelude_return_if_fail(ptr); ptr->major_device = major_device; ptr->major_device_is_set = 1; } void idmef_inode_unset_major_device(idmef_inode_t *ptr) { prelude_return_if_fail(ptr); ptr->major_device_is_set = 0; } /** * idmef_inode_new_major_device: * @ptr: pointer to a #idmef_inode_t object. * @ret: pointer to an address where to store the created #uint32_t object. * * Create a new major_device object, children of #idmef_inode_t. * If @ptr already contain a #uint32_t object, then it is destroyed. * * Returns: 0 on success, or a negative value if an error occured. */ int idmef_inode_new_major_device(idmef_inode_t *ptr, uint32_t **ret) { prelude_return_val_if_fail(ptr, prelude_error(PRELUDE_ERROR_ASSERTION)); ptr->major_device_is_set = 1; *ret = &ptr->major_device; return 0; } /** * *idmef_inode_get_minor_device: * @ptr: pointer to a #idmef_inode_t object. * * Get minor_device children of the #idmef_inode_t object. * * Returns: a pointer to a uint32_t object, or NULL if the children object is not set. */ uint32_t *idmef_inode_get_minor_device(idmef_inode_t *ptr) { prelude_return_val_if_fail(ptr, 0); /* FIXME */ return ptr->minor_device_is_set ? &ptr->minor_device : NULL; } /** * idmef_inode_set_minor_device: * @ptr: pointer to a #idmef_inode_t object. * @minor_device: pointer to a #uint32_t object. * * Set @minor_device object as a children of @ptr. * if @ptr already contain an @minor_device object, then it is destroyed, * and updated to point to the provided @minor_device object. */ void idmef_inode_set_minor_device(idmef_inode_t *ptr, uint32_t minor_device) { prelude_return_if_fail(ptr); ptr->minor_device = minor_device; ptr->minor_device_is_set = 1; } void idmef_inode_unset_minor_device(idmef_inode_t *ptr) { prelude_return_if_fail(ptr); ptr->minor_device_is_set = 0; } /** * idmef_inode_new_minor_device: * @ptr: pointer to a #idmef_inode_t object. * @ret: pointer to an address where to store the created #uint32_t object. * * Create a new minor_device object, children of #idmef_inode_t. * If @ptr already contain a #uint32_t object, then it is destroyed. * * Returns: 0 on success, or a negative value if an error occured. */ int idmef_inode_new_minor_device(idmef_inode_t *ptr, uint32_t **ret) { prelude_return_val_if_fail(ptr, prelude_error(PRELUDE_ERROR_ASSERTION)); ptr->minor_device_is_set = 1; *ret = &ptr->minor_device; return 0; } /** * *idmef_inode_get_c_major_device: * @ptr: pointer to a #idmef_inode_t object. * * Get c_major_device children of the #idmef_inode_t object. * * Returns: a pointer to a uint32_t object, or NULL if the children object is not set. */ uint32_t *idmef_inode_get_c_major_device(idmef_inode_t *ptr) { prelude_return_val_if_fail(ptr, 0); /* FIXME */ return ptr->c_major_device_is_set ? &ptr->c_major_device : NULL; } /** * idmef_inode_set_c_major_device: * @ptr: pointer to a #idmef_inode_t object. * @c_major_device: pointer to a #uint32_t object. * * Set @c_major_device object as a children of @ptr. * if @ptr already contain an @c_major_device object, then it is destroyed, * and updated to point to the provided @c_major_device object. */ void idmef_inode_set_c_major_device(idmef_inode_t *ptr, uint32_t c_major_device) { prelude_return_if_fail(ptr); ptr->c_major_device = c_major_device; ptr->c_major_device_is_set = 1; } void idmef_inode_unset_c_major_device(idmef_inode_t *ptr) { prelude_return_if_fail(ptr); ptr->c_major_device_is_set = 0; } /** * idmef_inode_new_c_major_device: * @ptr: pointer to a #idmef_inode_t object. * @ret: pointer to an address where to store the created #uint32_t object. * * Create a new c_major_device object, children of #idmef_inode_t. * If @ptr already contain a #uint32_t object, then it is destroyed. * * Returns: 0 on success, or a negative value if an error occured. */ int idmef_inode_new_c_major_device(idmef_inode_t *ptr, uint32_t **ret) { prelude_return_val_if_fail(ptr, prelude_error(PRELUDE_ERROR_ASSERTION)); ptr->c_major_device_is_set = 1; *ret = &ptr->c_major_device; return 0; } /** * *idmef_inode_get_c_minor_device: * @ptr: pointer to a #idmef_inode_t object. * * Get c_minor_device children of the #idmef_inode_t object. * * Returns: a pointer to a uint32_t object, or NULL if the children object is not set. */ uint32_t *idmef_inode_get_c_minor_device(idmef_inode_t *ptr) { prelude_return_val_if_fail(ptr, 0); /* FIXME */ return ptr->c_minor_device_is_set ? &ptr->c_minor_device : NULL; } /** * idmef_inode_set_c_minor_device: * @ptr: pointer to a #idmef_inode_t object. * @c_minor_device: pointer to a #uint32_t object. * * Set @c_minor_device object as a children of @ptr. * if @ptr already contain an @c_minor_device object, then it is destroyed, * and updated to point to the provided @c_minor_device object. */ void idmef_inode_set_c_minor_device(idmef_inode_t *ptr, uint32_t c_minor_device) { prelude_return_if_fail(ptr); ptr->c_minor_device = c_minor_device; ptr->c_minor_device_is_set = 1; } void idmef_inode_unset_c_minor_device(idmef_inode_t *ptr) { prelude_return_if_fail(ptr); ptr->c_minor_device_is_set = 0; } /** * idmef_inode_new_c_minor_device: * @ptr: pointer to a #idmef_inode_t object. * @ret: pointer to an address where to store the created #uint32_t object. * * Create a new c_minor_device object, children of #idmef_inode_t. * If @ptr already contain a #uint32_t object, then it is destroyed. * * Returns: 0 on success, or a negative value if an error occured. */ int idmef_inode_new_c_minor_device(idmef_inode_t *ptr, uint32_t **ret) { prelude_return_val_if_fail(ptr, prelude_error(PRELUDE_ERROR_ASSERTION)); ptr->c_minor_device_is_set = 1; *ret = &ptr->c_minor_device; return 0; } /** * idmef_inode_copy: * @src: Source of the copy. * @dst: Where to copy the object. * * Copy a new #idmef_inode_t object from @src to @dst. * * Returns: 0 on success, a negative value if an error occured. */ int idmef_inode_copy(const idmef_inode_t *src, idmef_inode_t *dst) { int ret; prelude_return_val_if_fail(src, prelude_error(PRELUDE_ERROR_ASSERTION)); prelude_return_val_if_fail(dst, prelude_error(PRELUDE_ERROR_ASSERTION)); ret = 0; if ( src->change_time ) { ret = idmef_time_clone(src->change_time, &dst->change_time); if ( ret < 0 ) return ret; } dst->number_is_set = src->number_is_set; dst->number = src->number; dst->major_device_is_set = src->major_device_is_set; dst->major_device = src->major_device; dst->minor_device_is_set = src->minor_device_is_set; dst->minor_device = src->minor_device; dst->c_major_device_is_set = src->c_major_device_is_set; dst->c_major_device = src->c_major_device; dst->c_minor_device_is_set = src->c_minor_device_is_set; dst->c_minor_device = src->c_minor_device; return 0; } /** * idmef_inode_clone: * @src: Object to be cloned. * @dst: Address where to store the pointer to the cloned object. * * Create a copy of @src, and store it in @dst. * * Returns: 0 on success, a negative value if an error occured. */ int idmef_inode_clone(idmef_inode_t *src, idmef_inode_t **dst) { int ret; prelude_return_val_if_fail(src, prelude_error(PRELUDE_ERROR_ASSERTION)); ret = idmef_inode_new(dst); if ( ret < 0 ) return ret; return idmef_inode_copy(src, *dst); } /** * idmef_inode_compare: * @obj1: Object to compare with @obj2. * @obj2: Object to compare with @obj1. * * Compare @obj1 with @obj2. * * Returns: 0 on match, a negative value on comparison failure. */ int idmef_inode_compare(const idmef_inode_t *obj1, const idmef_inode_t *obj2) { int ret = 0; if ( obj1 == NULL && obj2 == NULL ) return 0; else if ( obj1 == NULL || obj2 == NULL ) return -1; ret = idmef_time_compare(obj1->change_time, obj2->change_time); if ( ret != 0 ) return ret; if ( obj1->number_is_set != obj2->number_is_set ) return -1; if ( obj1->number_is_set && obj1->number != obj2->number ) return -1; if ( obj1->major_device_is_set != obj2->major_device_is_set ) return -1; if ( obj1->major_device_is_set && obj1->major_device != obj2->major_device ) return -1; if ( obj1->minor_device_is_set != obj2->minor_device_is_set ) return -1; if ( obj1->minor_device_is_set && obj1->minor_device != obj2->minor_device ) return -1; if ( obj1->c_major_device_is_set != obj2->c_major_device_is_set ) return -1; if ( obj1->c_major_device_is_set && obj1->c_major_device != obj2->c_major_device ) return -1; if ( obj1->c_minor_device_is_set != obj2->c_minor_device_is_set ) return -1; if ( obj1->c_minor_device_is_set && obj1->c_minor_device != obj2->c_minor_device ) return -1; return ret; } /** * idmef_checksum_new: * @ret: Pointer where to store the created #idmef_checksum_t object. * * Create a new #idmef_checksum_t object. * * Returns: 0 on success, a negative value if an error occured. */ int idmef_checksum_new(idmef_checksum_t **ret) { *ret = calloc(1, sizeof(**ret)); if ( ! *ret ) return prelude_error_from_errno(errno); prelude_list_init(&(*ret)->list); (*ret)->refcount = 1; { int retval = prelude_string_new(&(*ret)->value); if ( retval < 0 ) { idmef_checksum_destroy(*ret); *ret = NULL; return retval; } } return 0; } /** * idmef_checksum_ref: * @checksum: pointer to a #idmef_checksum_t object. * * Increase @checksum reference count, so that it can be referenced * multiple time. * * Returns: a pointer to @checksum. */ idmef_checksum_t *idmef_checksum_ref(idmef_checksum_t *checksum) { prelude_return_val_if_fail(checksum, NULL); checksum->refcount++; return checksum; } int _idmef_checksum_get_child(void *p, idmef_class_child_id_t child, void **childptr) { idmef_checksum_t *ptr = p; prelude_return_val_if_fail(p, prelude_error(PRELUDE_ERROR_ASSERTION)); *childptr = NULL; switch ( child ) { case 0: return get_value_from_string((idmef_value_t **) childptr, ptr->value, TRUE); case 1: return get_value_from_string((idmef_value_t **) childptr, ptr->key, TRUE); case 2: return idmef_value_new_enum_from_numeric((idmef_value_t **) childptr, IDMEF_CLASS_ID_CHECKSUM_ALGORITHM, ptr->algorithm); default: return prelude_error(PRELUDE_ERROR_IDMEF_CLASS_UNKNOWN_CHILD); } } int _idmef_checksum_new_child(void *p, idmef_class_child_id_t child, int n, void **ret) { idmef_checksum_t *ptr = p; prelude_return_val_if_fail(p, prelude_error(PRELUDE_ERROR_ASSERTION)); switch ( child ) { case 0: return idmef_checksum_new_value(ptr, (prelude_string_t **) ret); case 1: return idmef_checksum_new_key(ptr, (prelude_string_t **) ret); case 2: return idmef_checksum_new_algorithm(ptr, (idmef_checksum_algorithm_t **) ret); default: return prelude_error(PRELUDE_ERROR_IDMEF_CLASS_UNKNOWN_CHILD); } } int _idmef_checksum_destroy_child(void *p, idmef_class_child_id_t child, int n) { idmef_checksum_t *ptr = p; prelude_return_val_if_fail(p, prelude_error(PRELUDE_ERROR_ASSERTION)); switch ( child ) { case 0: if ( ptr->value ) { prelude_string_destroy(ptr->value); ptr->value = NULL; } return 0; case 1: if ( ptr->key ) { prelude_string_destroy(ptr->key); ptr->key = NULL; } return 0; case 2: ptr->algorithm = 0; return 0; default: return prelude_error(PRELUDE_ERROR_IDMEF_CLASS_UNKNOWN_CHILD); } } static void idmef_checksum_destroy_internal(idmef_checksum_t *ptr) { prelude_return_if_fail(ptr); if ( ! prelude_list_is_empty(&ptr->list) ) prelude_list_del_init(&ptr->list); if ( ptr->value ) { prelude_string_destroy(ptr->value); ptr->value = NULL; } if ( ptr->key ) { prelude_string_destroy(ptr->key); ptr->key = NULL; } /* free() should be done by the caller */ } /** * idmef_checksum_destroy: * @ptr: pointer to a #idmef_checksum_t object. * * Destroy @ptr and all of it's children. * The objects are only destroyed if their reference count reach zero. */ void idmef_checksum_destroy(idmef_checksum_t *ptr) { prelude_return_if_fail(ptr); if ( --ptr->refcount ) return; idmef_checksum_destroy_internal(ptr); free(ptr); } /** * *idmef_checksum_get_value: * @ptr: pointer to a #idmef_checksum_t object. * * Get value children of the #idmef_checksum_t object. * * Returns: a pointer to a prelude_string_t object, or NULL if the children object is not set. */ prelude_string_t *idmef_checksum_get_value(idmef_checksum_t *ptr) { prelude_return_val_if_fail(ptr, 0); /* FIXME */ return ptr->value; } /** * idmef_checksum_set_value: * @ptr: pointer to a #idmef_checksum_t object. * @value: pointer to a #prelude_string_t object. * * Set @value object as a children of @ptr. * if @ptr already contain an @value object, then it is destroyed, * and updated to point to the provided @value object. */ void idmef_checksum_set_value(idmef_checksum_t *ptr, prelude_string_t *value) { prelude_return_if_fail(ptr); if ( ptr->value ) prelude_string_destroy(ptr->value); ptr->value = value; } /** * idmef_checksum_new_value: * @ptr: pointer to a #idmef_checksum_t object. * @ret: pointer to an address where to store the created #prelude_string_t object. * * Create a new value object, children of #idmef_checksum_t. * If @ptr already contain a #prelude_string_t object, then it is destroyed. * * Returns: 0 on success, or a negative value if an error occured. */ int idmef_checksum_new_value(idmef_checksum_t *ptr, prelude_string_t **ret) { int retval; prelude_return_val_if_fail(ptr, prelude_error(PRELUDE_ERROR_ASSERTION)); if ( ! ptr->value ) { retval = prelude_string_new(&ptr->value); if ( retval < 0 ) return retval; } *ret = ptr->value; return 0; } /** * *idmef_checksum_get_key: * @ptr: pointer to a #idmef_checksum_t object. * * Get key children of the #idmef_checksum_t object. * * Returns: a pointer to a prelude_string_t object, or NULL if the children object is not set. */ prelude_string_t *idmef_checksum_get_key(idmef_checksum_t *ptr) { prelude_return_val_if_fail(ptr, 0); /* FIXME */ return ptr->key; } /** * idmef_checksum_set_key: * @ptr: pointer to a #idmef_checksum_t object. * @key: pointer to a #prelude_string_t object. * * Set @key object as a children of @ptr. * if @ptr already contain an @key object, then it is destroyed, * and updated to point to the provided @key object. */ void idmef_checksum_set_key(idmef_checksum_t *ptr, prelude_string_t *key) { prelude_return_if_fail(ptr); if ( ptr->key ) prelude_string_destroy(ptr->key); ptr->key = key; } /** * idmef_checksum_new_key: * @ptr: pointer to a #idmef_checksum_t object. * @ret: pointer to an address where to store the created #prelude_string_t object. * * Create a new key object, children of #idmef_checksum_t. * If @ptr already contain a #prelude_string_t object, then it is destroyed. * * Returns: 0 on success, or a negative value if an error occured. */ int idmef_checksum_new_key(idmef_checksum_t *ptr, prelude_string_t **ret) { int retval; prelude_return_val_if_fail(ptr, prelude_error(PRELUDE_ERROR_ASSERTION)); if ( ! ptr->key ) { retval = prelude_string_new(&ptr->key); if ( retval < 0 ) return retval; } *ret = ptr->key; return 0; } /** * idmef_checksum_get_algorithm: * @ptr: pointer to a #idmef_checksum_t object. * * Get algorithm children of the #idmef_checksum_t object. * * Returns: a pointer to a idmef_checksum_algorithm_t object, or NULL if the children object is not set. */ idmef_checksum_algorithm_t idmef_checksum_get_algorithm(idmef_checksum_t *ptr) { prelude_return_val_if_fail(ptr, 0); /* FIXME */ return ptr->algorithm; } /** * idmef_checksum_set_algorithm: * @ptr: pointer to a #idmef_checksum_t object. * @algorithm: pointer to a #idmef_checksum_algorithm_t object. * * Set @algorithm object as a children of @ptr. * if @ptr already contain an @algorithm object, then it is destroyed, * and updated to point to the provided @algorithm object. */ void idmef_checksum_set_algorithm(idmef_checksum_t *ptr, idmef_checksum_algorithm_t algorithm) { prelude_return_if_fail(ptr); ptr->algorithm = algorithm; } /** * idmef_checksum_new_algorithm: * @ptr: pointer to a #idmef_checksum_t object. * @ret: pointer to an address where to store the created #idmef_checksum_algorithm_t object. * * Create a new algorithm object, children of #idmef_checksum_t. * If @ptr already contain a #idmef_checksum_algorithm_t object, then it is destroyed. * * Returns: 0 on success, or a negative value if an error occured. */ int idmef_checksum_new_algorithm(idmef_checksum_t *ptr, idmef_checksum_algorithm_t **ret) { prelude_return_val_if_fail(ptr, prelude_error(PRELUDE_ERROR_ASSERTION)); *ret = &ptr->algorithm; return 0; } /** * idmef_checksum_copy: * @src: Source of the copy. * @dst: Where to copy the object. * * Copy a new #idmef_checksum_t object from @src to @dst. * * Returns: 0 on success, a negative value if an error occured. */ int idmef_checksum_copy(const idmef_checksum_t *src, idmef_checksum_t *dst) { int ret; prelude_return_val_if_fail(src, prelude_error(PRELUDE_ERROR_ASSERTION)); prelude_return_val_if_fail(dst, prelude_error(PRELUDE_ERROR_ASSERTION)); ret = 0; if ( src->value ) { ret = prelude_string_copy(src->value, dst->value); if ( ret < 0 ) return ret; } if ( src->key ) { ret = prelude_string_clone(src->key, &dst->key); if ( ret < 0 ) return ret; } dst->algorithm = src->algorithm; return 0; } /** * idmef_checksum_clone: * @src: Object to be cloned. * @dst: Address where to store the pointer to the cloned object. * * Create a copy of @src, and store it in @dst. * * Returns: 0 on success, a negative value if an error occured. */ int idmef_checksum_clone(idmef_checksum_t *src, idmef_checksum_t **dst) { int ret; prelude_return_val_if_fail(src, prelude_error(PRELUDE_ERROR_ASSERTION)); ret = idmef_checksum_new(dst); if ( ret < 0 ) return ret; return idmef_checksum_copy(src, *dst); } /** * idmef_checksum_compare: * @obj1: Object to compare with @obj2. * @obj2: Object to compare with @obj1. * * Compare @obj1 with @obj2. * * Returns: 0 on match, a negative value on comparison failure. */ int idmef_checksum_compare(const idmef_checksum_t *obj1, const idmef_checksum_t *obj2) { int ret = 0; if ( obj1 == NULL && obj2 == NULL ) return 0; else if ( obj1 == NULL || obj2 == NULL ) return -1; ret = prelude_string_compare(obj1->value, obj2->value); if ( ret != 0 ) return ret; ret = prelude_string_compare(obj1->key, obj2->key); if ( ret != 0 ) return ret; if ( obj1->algorithm != obj2->algorithm ) return -1; return ret; } /** * idmef_file_new: * @ret: Pointer where to store the created #idmef_file_t object. * * Create a new #idmef_file_t object. * * Returns: 0 on success, a negative value if an error occured. */ int idmef_file_new(idmef_file_t **ret) { *ret = calloc(1, sizeof(**ret)); if ( ! *ret ) return prelude_error_from_errno(errno); prelude_list_init(&(*ret)->list); (*ret)->refcount = 1; prelude_list_init(&(*ret)->file_access_list); prelude_list_init(&(*ret)->linkage_list); prelude_list_init(&(*ret)->checksum_list); { int retval = prelude_string_new(&(*ret)->name); if ( retval < 0 ) { idmef_file_destroy(*ret); *ret = NULL; return retval; } } { int retval = prelude_string_new(&(*ret)->path); if ( retval < 0 ) { idmef_file_destroy(*ret); *ret = NULL; return retval; } } return 0; } /** * idmef_file_ref: * @file: pointer to a #idmef_file_t object. * * Increase @file reference count, so that it can be referenced * multiple time. * * Returns: a pointer to @file. */ idmef_file_t *idmef_file_ref(idmef_file_t *file) { prelude_return_val_if_fail(file, NULL); file->refcount++; return file; } int _idmef_file_get_child(void *p, idmef_class_child_id_t child, void **childptr) { idmef_file_t *ptr = p; prelude_return_val_if_fail(p, prelude_error(PRELUDE_ERROR_ASSERTION)); *childptr = NULL; switch ( child ) { case 0: return get_value_from_string((idmef_value_t **) childptr, ptr->ident, TRUE); case 1: return get_value_from_string((idmef_value_t **) childptr, ptr->name, TRUE); case 2: return get_value_from_string((idmef_value_t **) childptr, ptr->path, TRUE); case 3: return get_value_from_time((idmef_value_t **) childptr, ptr->create_time, TRUE); case 4: return get_value_from_time((idmef_value_t **) childptr, ptr->modify_time, TRUE); case 5: return get_value_from_time((idmef_value_t **) childptr, ptr->access_time, TRUE); case 6: return (ptr->data_size_is_set) ? idmef_value_new_uint64((idmef_value_t **) childptr, ptr->data_size) : 0; case 7: return (ptr->disk_size_is_set) ? idmef_value_new_uint64((idmef_value_t **) childptr, ptr->disk_size) : 0; case 8: *childptr = &ptr->file_access_list; return 0; case 9: *childptr = &ptr->linkage_list; return 0; case 10: *childptr = ptr->inode; return 0; case 11: *childptr = &ptr->checksum_list; return 0; case 12: return idmef_value_new_enum_from_numeric((idmef_value_t **) childptr, IDMEF_CLASS_ID_FILE_CATEGORY, ptr->category); case 13: if ( ! ptr->fstype_is_set ) return 0; return idmef_value_new_enum_from_numeric((idmef_value_t **) childptr, IDMEF_CLASS_ID_FILE_FSTYPE, ptr->fstype); case 14: return get_value_from_string((idmef_value_t **) childptr, ptr->file_type, TRUE); default: return prelude_error(PRELUDE_ERROR_IDMEF_CLASS_UNKNOWN_CHILD); } } int _idmef_file_new_child(void *p, idmef_class_child_id_t child, int n, void **ret) { idmef_file_t *ptr = p; prelude_return_val_if_fail(p, prelude_error(PRELUDE_ERROR_ASSERTION)); switch ( child ) { case 0: return idmef_file_new_ident(ptr, (prelude_string_t **) ret); case 1: return idmef_file_new_name(ptr, (prelude_string_t **) ret); case 2: return idmef_file_new_path(ptr, (prelude_string_t **) ret); case 3: return idmef_file_new_create_time(ptr, (idmef_time_t **) ret); case 4: return idmef_file_new_modify_time(ptr, (idmef_time_t **) ret); case 5: return idmef_file_new_access_time(ptr, (idmef_time_t **) ret); case 6: return idmef_file_new_data_size(ptr, (uint64_t **) ret); case 7: return idmef_file_new_disk_size(ptr, (uint64_t **) ret); case 8: { int i = 0; prelude_list_t *tmp; if ( n == IDMEF_LIST_APPEND || n == IDMEF_LIST_PREPEND ) return idmef_file_new_file_access(ptr, (idmef_file_access_t **) ret, n); if ( n >= 0 ) { prelude_list_for_each(&ptr->file_access_list, tmp) { if ( i++ == n ) { *ret = prelude_list_entry(tmp, idmef_file_access_t, list); return 0; } } if ( i != n ) return prelude_error(PRELUDE_ERROR_IDMEF_TREE_INDEX_UNDEFINED); } else { int pos = (-n) - 1; /* With negative value, -1 is the base, translate to 0 */ prelude_list_for_each_reversed(&ptr->file_access_list, tmp) { if ( i++ == pos ) { *ret = prelude_list_entry(tmp, idmef_file_access_t, list); return 0; } } if ( i != pos ) return prelude_error(PRELUDE_ERROR_IDMEF_TREE_INDEX_UNDEFINED); } return idmef_file_new_file_access(ptr, (idmef_file_access_t **) ret, n); } case 9: { int i = 0; prelude_list_t *tmp; if ( n == IDMEF_LIST_APPEND || n == IDMEF_LIST_PREPEND ) return idmef_file_new_linkage(ptr, (idmef_linkage_t **) ret, n); if ( n >= 0 ) { prelude_list_for_each(&ptr->linkage_list, tmp) { if ( i++ == n ) { *ret = prelude_list_entry(tmp, idmef_linkage_t, list); return 0; } } if ( i != n ) return prelude_error(PRELUDE_ERROR_IDMEF_TREE_INDEX_UNDEFINED); } else { int pos = (-n) - 1; /* With negative value, -1 is the base, translate to 0 */ prelude_list_for_each_reversed(&ptr->linkage_list, tmp) { if ( i++ == pos ) { *ret = prelude_list_entry(tmp, idmef_linkage_t, list); return 0; } } if ( i != pos ) return prelude_error(PRELUDE_ERROR_IDMEF_TREE_INDEX_UNDEFINED); } return idmef_file_new_linkage(ptr, (idmef_linkage_t **) ret, n); } case 10: return idmef_file_new_inode(ptr, (idmef_inode_t **) ret); case 11: { int i = 0; prelude_list_t *tmp; if ( n == IDMEF_LIST_APPEND || n == IDMEF_LIST_PREPEND ) return idmef_file_new_checksum(ptr, (idmef_checksum_t **) ret, n); if ( n >= 0 ) { prelude_list_for_each(&ptr->checksum_list, tmp) { if ( i++ == n ) { *ret = prelude_list_entry(tmp, idmef_checksum_t, list); return 0; } } if ( i != n ) return prelude_error(PRELUDE_ERROR_IDMEF_TREE_INDEX_UNDEFINED); } else { int pos = (-n) - 1; /* With negative value, -1 is the base, translate to 0 */ prelude_list_for_each_reversed(&ptr->checksum_list, tmp) { if ( i++ == pos ) { *ret = prelude_list_entry(tmp, idmef_checksum_t, list); return 0; } } if ( i != pos ) return prelude_error(PRELUDE_ERROR_IDMEF_TREE_INDEX_UNDEFINED); } return idmef_file_new_checksum(ptr, (idmef_checksum_t **) ret, n); } case 12: return idmef_file_new_category(ptr, (idmef_file_category_t **) ret); case 13: return idmef_file_new_fstype(ptr, (idmef_file_fstype_t **) ret); case 14: return idmef_file_new_file_type(ptr, (prelude_string_t **) ret); default: return prelude_error(PRELUDE_ERROR_IDMEF_CLASS_UNKNOWN_CHILD); } } int _idmef_file_destroy_child(void *p, idmef_class_child_id_t child, int n) { idmef_file_t *ptr = p; prelude_return_val_if_fail(p, prelude_error(PRELUDE_ERROR_ASSERTION)); switch ( child ) { case 0: if ( ptr->ident ) { prelude_string_destroy(ptr->ident); ptr->ident = NULL; } return 0; case 1: if ( ptr->name ) { prelude_string_destroy(ptr->name); ptr->name = NULL; } return 0; case 2: if ( ptr->path ) { prelude_string_destroy(ptr->path); ptr->path = NULL; } return 0; case 3: if ( ptr->create_time ) { idmef_time_destroy(ptr->create_time); ptr->create_time = NULL; } return 0; case 4: if ( ptr->modify_time ) { idmef_time_destroy(ptr->modify_time); ptr->modify_time = NULL; } return 0; case 5: if ( ptr->access_time ) { idmef_time_destroy(ptr->access_time); ptr->access_time = NULL; } return 0; case 6: ptr->data_size_is_set = 0; return 0; case 7: ptr->disk_size_is_set = 0; return 0; case 8: { int i = 0; prelude_list_t *tmp; if ( n >= 0 ) { prelude_list_for_each(&ptr->file_access_list, tmp) { if ( i++ == n ) { void *b = prelude_list_entry(tmp, idmef_file_access_t, list); idmef_file_access_destroy(b); return 0; } } if ( i != n ) return prelude_error(PRELUDE_ERROR_IDMEF_TREE_INDEX_UNDEFINED); } else { int pos = (-n) - 1; /* With negative value, -1 is the base, translate to 0 */ prelude_list_for_each_reversed(&ptr->file_access_list, tmp) { if ( i++ == pos ) { void *b = prelude_list_entry(tmp, idmef_file_access_t, list); idmef_file_access_destroy(b); return 0; } } if ( i != pos ) return prelude_error(PRELUDE_ERROR_IDMEF_TREE_INDEX_UNDEFINED); } } case 9: { int i = 0; prelude_list_t *tmp; if ( n >= 0 ) { prelude_list_for_each(&ptr->linkage_list, tmp) { if ( i++ == n ) { void *b = prelude_list_entry(tmp, idmef_linkage_t, list); idmef_linkage_destroy(b); return 0; } } if ( i != n ) return prelude_error(PRELUDE_ERROR_IDMEF_TREE_INDEX_UNDEFINED); } else { int pos = (-n) - 1; /* With negative value, -1 is the base, translate to 0 */ prelude_list_for_each_reversed(&ptr->linkage_list, tmp) { if ( i++ == pos ) { void *b = prelude_list_entry(tmp, idmef_linkage_t, list); idmef_linkage_destroy(b); return 0; } } if ( i != pos ) return prelude_error(PRELUDE_ERROR_IDMEF_TREE_INDEX_UNDEFINED); } } case 10: if ( ptr->inode ) { idmef_inode_destroy(ptr->inode); ptr->inode = NULL; } return 0; case 11: { int i = 0; prelude_list_t *tmp; if ( n >= 0 ) { prelude_list_for_each(&ptr->checksum_list, tmp) { if ( i++ == n ) { void *b = prelude_list_entry(tmp, idmef_checksum_t, list); idmef_checksum_destroy(b); return 0; } } if ( i != n ) return prelude_error(PRELUDE_ERROR_IDMEF_TREE_INDEX_UNDEFINED); } else { int pos = (-n) - 1; /* With negative value, -1 is the base, translate to 0 */ prelude_list_for_each_reversed(&ptr->checksum_list, tmp) { if ( i++ == pos ) { void *b = prelude_list_entry(tmp, idmef_checksum_t, list); idmef_checksum_destroy(b); return 0; } } if ( i != pos ) return prelude_error(PRELUDE_ERROR_IDMEF_TREE_INDEX_UNDEFINED); } } case 12: ptr->category = 0; return 0; case 13: ptr->fstype_is_set = 0; return 0; case 14: if ( ptr->file_type ) { prelude_string_destroy(ptr->file_type); ptr->file_type = NULL; } return 0; default: return prelude_error(PRELUDE_ERROR_IDMEF_CLASS_UNKNOWN_CHILD); } } static void idmef_file_destroy_internal(idmef_file_t *ptr) { prelude_return_if_fail(ptr); if ( ! prelude_list_is_empty(&ptr->list) ) prelude_list_del_init(&ptr->list); if ( ptr->ident ) { prelude_string_destroy(ptr->ident); ptr->ident = NULL; } if ( ptr->name ) { prelude_string_destroy(ptr->name); ptr->name = NULL; } if ( ptr->path ) { prelude_string_destroy(ptr->path); ptr->path = NULL; } if ( ptr->create_time ) { idmef_time_destroy(ptr->create_time); ptr->create_time = NULL; } if ( ptr->modify_time ) { idmef_time_destroy(ptr->modify_time); ptr->modify_time = NULL; } if ( ptr->access_time ) { idmef_time_destroy(ptr->access_time); ptr->access_time = NULL; } { prelude_list_t *n, *tmp; idmef_file_access_t *entry; prelude_list_for_each_safe(&ptr->file_access_list, tmp, n) { entry = prelude_list_entry(tmp, idmef_file_access_t, list); prelude_list_del_init(&entry->list); idmef_file_access_destroy(entry); } } { prelude_list_t *n, *tmp; idmef_linkage_t *entry; prelude_list_for_each_safe(&ptr->linkage_list, tmp, n) { entry = prelude_list_entry(tmp, idmef_linkage_t, list); prelude_list_del_init(&entry->list); idmef_linkage_destroy(entry); } } if ( ptr->inode ) { idmef_inode_destroy(ptr->inode); ptr->inode = NULL; } { prelude_list_t *n, *tmp; idmef_checksum_t *entry; prelude_list_for_each_safe(&ptr->checksum_list, tmp, n) { entry = prelude_list_entry(tmp, idmef_checksum_t, list); prelude_list_del_init(&entry->list); idmef_checksum_destroy(entry); } } if ( ptr->file_type ) { prelude_string_destroy(ptr->file_type); ptr->file_type = NULL; } /* free() should be done by the caller */ } /** * idmef_file_destroy: * @ptr: pointer to a #idmef_file_t object. * * Destroy @ptr and all of it's children. * The objects are only destroyed if their reference count reach zero. */ void idmef_file_destroy(idmef_file_t *ptr) { prelude_return_if_fail(ptr); if ( --ptr->refcount ) return; idmef_file_destroy_internal(ptr); free(ptr); } /** * *idmef_file_get_ident: * @ptr: pointer to a #idmef_file_t object. * * Get ident children of the #idmef_file_t object. * * Returns: a pointer to a prelude_string_t object, or NULL if the children object is not set. */ prelude_string_t *idmef_file_get_ident(idmef_file_t *ptr) { prelude_return_val_if_fail(ptr, 0); /* FIXME */ return ptr->ident; } /** * idmef_file_set_ident: * @ptr: pointer to a #idmef_file_t object. * @ident: pointer to a #prelude_string_t object. * * Set @ident object as a children of @ptr. * if @ptr already contain an @ident object, then it is destroyed, * and updated to point to the provided @ident object. */ void idmef_file_set_ident(idmef_file_t *ptr, prelude_string_t *ident) { prelude_return_if_fail(ptr); if ( ptr->ident ) prelude_string_destroy(ptr->ident); ptr->ident = ident; } /** * idmef_file_new_ident: * @ptr: pointer to a #idmef_file_t object. * @ret: pointer to an address where to store the created #prelude_string_t object. * * Create a new ident object, children of #idmef_file_t. * If @ptr already contain a #prelude_string_t object, then it is destroyed. * * Returns: 0 on success, or a negative value if an error occured. */ int idmef_file_new_ident(idmef_file_t *ptr, prelude_string_t **ret) { int retval; prelude_return_val_if_fail(ptr, prelude_error(PRELUDE_ERROR_ASSERTION)); if ( ! ptr->ident ) { retval = prelude_string_new(&ptr->ident); if ( retval < 0 ) return retval; } *ret = ptr->ident; return 0; } /** * *idmef_file_get_name: * @ptr: pointer to a #idmef_file_t object. * * Get name children of the #idmef_file_t object. * * Returns: a pointer to a prelude_string_t object, or NULL if the children object is not set. */ prelude_string_t *idmef_file_get_name(idmef_file_t *ptr) { prelude_return_val_if_fail(ptr, 0); /* FIXME */ return ptr->name; } /** * idmef_file_set_name: * @ptr: pointer to a #idmef_file_t object. * @name: pointer to a #prelude_string_t object. * * Set @name object as a children of @ptr. * if @ptr already contain an @name object, then it is destroyed, * and updated to point to the provided @name object. */ void idmef_file_set_name(idmef_file_t *ptr, prelude_string_t *name) { prelude_return_if_fail(ptr); if ( ptr->name ) prelude_string_destroy(ptr->name); ptr->name = name; } /** * idmef_file_new_name: * @ptr: pointer to a #idmef_file_t object. * @ret: pointer to an address where to store the created #prelude_string_t object. * * Create a new name object, children of #idmef_file_t. * If @ptr already contain a #prelude_string_t object, then it is destroyed. * * Returns: 0 on success, or a negative value if an error occured. */ int idmef_file_new_name(idmef_file_t *ptr, prelude_string_t **ret) { int retval; prelude_return_val_if_fail(ptr, prelude_error(PRELUDE_ERROR_ASSERTION)); if ( ! ptr->name ) { retval = prelude_string_new(&ptr->name); if ( retval < 0 ) return retval; } *ret = ptr->name; return 0; } /** * *idmef_file_get_path: * @ptr: pointer to a #idmef_file_t object. * * Get path children of the #idmef_file_t object. * * Returns: a pointer to a prelude_string_t object, or NULL if the children object is not set. */ prelude_string_t *idmef_file_get_path(idmef_file_t *ptr) { prelude_return_val_if_fail(ptr, 0); /* FIXME */ return ptr->path; } /** * idmef_file_set_path: * @ptr: pointer to a #idmef_file_t object. * @path: pointer to a #prelude_string_t object. * * Set @path object as a children of @ptr. * if @ptr already contain an @path object, then it is destroyed, * and updated to point to the provided @path object. */ void idmef_file_set_path(idmef_file_t *ptr, prelude_string_t *path) { prelude_return_if_fail(ptr); if ( ptr->path ) prelude_string_destroy(ptr->path); ptr->path = path; } /** * idmef_file_new_path: * @ptr: pointer to a #idmef_file_t object. * @ret: pointer to an address where to store the created #prelude_string_t object. * * Create a new path object, children of #idmef_file_t. * If @ptr already contain a #prelude_string_t object, then it is destroyed. * * Returns: 0 on success, or a negative value if an error occured. */ int idmef_file_new_path(idmef_file_t *ptr, prelude_string_t **ret) { int retval; prelude_return_val_if_fail(ptr, prelude_error(PRELUDE_ERROR_ASSERTION)); if ( ! ptr->path ) { retval = prelude_string_new(&ptr->path); if ( retval < 0 ) return retval; } *ret = ptr->path; return 0; } /** * *idmef_file_get_create_time: * @ptr: pointer to a #idmef_file_t object. * * Get create_time children of the #idmef_file_t object. * * Returns: a pointer to a idmef_time_t object, or NULL if the children object is not set. */ idmef_time_t *idmef_file_get_create_time(idmef_file_t *ptr) { prelude_return_val_if_fail(ptr, 0); /* FIXME */ return ptr->create_time; } /** * idmef_file_set_create_time: * @ptr: pointer to a #idmef_file_t object. * @create_time: pointer to a #idmef_time_t object. * * Set @create_time object as a children of @ptr. * if @ptr already contain an @create_time object, then it is destroyed, * and updated to point to the provided @create_time object. */ void idmef_file_set_create_time(idmef_file_t *ptr, idmef_time_t *create_time) { prelude_return_if_fail(ptr); if ( ptr->create_time ) idmef_time_destroy(ptr->create_time); ptr->create_time = create_time; } /** * idmef_file_new_create_time: * @ptr: pointer to a #idmef_file_t object. * @ret: pointer to an address where to store the created #idmef_time_t object. * * Create a new create_time object, children of #idmef_file_t. * If @ptr already contain a #idmef_time_t object, then it is destroyed. * * Returns: 0 on success, or a negative value if an error occured. */ int idmef_file_new_create_time(idmef_file_t *ptr, idmef_time_t **ret) { int retval; prelude_return_val_if_fail(ptr, prelude_error(PRELUDE_ERROR_ASSERTION)); if ( ! ptr->create_time ) { retval = idmef_time_new(&ptr->create_time); if ( retval < 0 ) return retval; } *ret = ptr->create_time; return 0; } /** * *idmef_file_get_modify_time: * @ptr: pointer to a #idmef_file_t object. * * Get modify_time children of the #idmef_file_t object. * * Returns: a pointer to a idmef_time_t object, or NULL if the children object is not set. */ idmef_time_t *idmef_file_get_modify_time(idmef_file_t *ptr) { prelude_return_val_if_fail(ptr, 0); /* FIXME */ return ptr->modify_time; } /** * idmef_file_set_modify_time: * @ptr: pointer to a #idmef_file_t object. * @modify_time: pointer to a #idmef_time_t object. * * Set @modify_time object as a children of @ptr. * if @ptr already contain an @modify_time object, then it is destroyed, * and updated to point to the provided @modify_time object. */ void idmef_file_set_modify_time(idmef_file_t *ptr, idmef_time_t *modify_time) { prelude_return_if_fail(ptr); if ( ptr->modify_time ) idmef_time_destroy(ptr->modify_time); ptr->modify_time = modify_time; } /** * idmef_file_new_modify_time: * @ptr: pointer to a #idmef_file_t object. * @ret: pointer to an address where to store the created #idmef_time_t object. * * Create a new modify_time object, children of #idmef_file_t. * If @ptr already contain a #idmef_time_t object, then it is destroyed. * * Returns: 0 on success, or a negative value if an error occured. */ int idmef_file_new_modify_time(idmef_file_t *ptr, idmef_time_t **ret) { int retval; prelude_return_val_if_fail(ptr, prelude_error(PRELUDE_ERROR_ASSERTION)); if ( ! ptr->modify_time ) { retval = idmef_time_new(&ptr->modify_time); if ( retval < 0 ) return retval; } *ret = ptr->modify_time; return 0; } /** * *idmef_file_get_access_time: * @ptr: pointer to a #idmef_file_t object. * * Get access_time children of the #idmef_file_t object. * * Returns: a pointer to a idmef_time_t object, or NULL if the children object is not set. */ idmef_time_t *idmef_file_get_access_time(idmef_file_t *ptr) { prelude_return_val_if_fail(ptr, 0); /* FIXME */ return ptr->access_time; } /** * idmef_file_set_access_time: * @ptr: pointer to a #idmef_file_t object. * @access_time: pointer to a #idmef_time_t object. * * Set @access_time object as a children of @ptr. * if @ptr already contain an @access_time object, then it is destroyed, * and updated to point to the provided @access_time object. */ void idmef_file_set_access_time(idmef_file_t *ptr, idmef_time_t *access_time) { prelude_return_if_fail(ptr); if ( ptr->access_time ) idmef_time_destroy(ptr->access_time); ptr->access_time = access_time; } /** * idmef_file_new_access_time: * @ptr: pointer to a #idmef_file_t object. * @ret: pointer to an address where to store the created #idmef_time_t object. * * Create a new access_time object, children of #idmef_file_t. * If @ptr already contain a #idmef_time_t object, then it is destroyed. * * Returns: 0 on success, or a negative value if an error occured. */ int idmef_file_new_access_time(idmef_file_t *ptr, idmef_time_t **ret) { int retval; prelude_return_val_if_fail(ptr, prelude_error(PRELUDE_ERROR_ASSERTION)); if ( ! ptr->access_time ) { retval = idmef_time_new(&ptr->access_time); if ( retval < 0 ) return retval; } *ret = ptr->access_time; return 0; } /** * *idmef_file_get_data_size: * @ptr: pointer to a #idmef_file_t object. * * Get data_size children of the #idmef_file_t object. * * Returns: a pointer to a uint64_t object, or NULL if the children object is not set. */ uint64_t *idmef_file_get_data_size(idmef_file_t *ptr) { prelude_return_val_if_fail(ptr, 0); /* FIXME */ return ptr->data_size_is_set ? &ptr->data_size : NULL; } /** * idmef_file_set_data_size: * @ptr: pointer to a #idmef_file_t object. * @data_size: pointer to a #uint64_t object. * * Set @data_size object as a children of @ptr. * if @ptr already contain an @data_size object, then it is destroyed, * and updated to point to the provided @data_size object. */ void idmef_file_set_data_size(idmef_file_t *ptr, uint64_t data_size) { prelude_return_if_fail(ptr); ptr->data_size = data_size; ptr->data_size_is_set = 1; } void idmef_file_unset_data_size(idmef_file_t *ptr) { prelude_return_if_fail(ptr); ptr->data_size_is_set = 0; } /** * idmef_file_new_data_size: * @ptr: pointer to a #idmef_file_t object. * @ret: pointer to an address where to store the created #uint64_t object. * * Create a new data_size object, children of #idmef_file_t. * If @ptr already contain a #uint64_t object, then it is destroyed. * * Returns: 0 on success, or a negative value if an error occured. */ int idmef_file_new_data_size(idmef_file_t *ptr, uint64_t **ret) { prelude_return_val_if_fail(ptr, prelude_error(PRELUDE_ERROR_ASSERTION)); ptr->data_size_is_set = 1; *ret = &ptr->data_size; return 0; } /** * *idmef_file_get_disk_size: * @ptr: pointer to a #idmef_file_t object. * * Get disk_size children of the #idmef_file_t object. * * Returns: a pointer to a uint64_t object, or NULL if the children object is not set. */ uint64_t *idmef_file_get_disk_size(idmef_file_t *ptr) { prelude_return_val_if_fail(ptr, 0); /* FIXME */ return ptr->disk_size_is_set ? &ptr->disk_size : NULL; } /** * idmef_file_set_disk_size: * @ptr: pointer to a #idmef_file_t object. * @disk_size: pointer to a #uint64_t object. * * Set @disk_size object as a children of @ptr. * if @ptr already contain an @disk_size object, then it is destroyed, * and updated to point to the provided @disk_size object. */ void idmef_file_set_disk_size(idmef_file_t *ptr, uint64_t disk_size) { prelude_return_if_fail(ptr); ptr->disk_size = disk_size; ptr->disk_size_is_set = 1; } void idmef_file_unset_disk_size(idmef_file_t *ptr) { prelude_return_if_fail(ptr); ptr->disk_size_is_set = 0; } /** * idmef_file_new_disk_size: * @ptr: pointer to a #idmef_file_t object. * @ret: pointer to an address where to store the created #uint64_t object. * * Create a new disk_size object, children of #idmef_file_t. * If @ptr already contain a #uint64_t object, then it is destroyed. * * Returns: 0 on success, or a negative value if an error occured. */ int idmef_file_new_disk_size(idmef_file_t *ptr, uint64_t **ret) { prelude_return_val_if_fail(ptr, prelude_error(PRELUDE_ERROR_ASSERTION)); ptr->disk_size_is_set = 1; *ret = &ptr->disk_size; return 0; } /** * idmef_file_get_next_file_access: * @file: pointer to a #idmef_file_t object. * @file_access_cur: pointer to a #idmef_file_access_t object. * * Get the next #idmef_file_access_t object listed in @ptr. * When iterating over the idmef_file_access_t object listed in @ptr, * @object should be set to the latest returned #idmef_file_access_t object. * * Returns: the next #idmef_file_access_t in the list. */ idmef_file_access_t *idmef_file_get_next_file_access(idmef_file_t *file, idmef_file_access_t *file_access_cur) { prelude_list_t *tmp = (file_access_cur) ? &file_access_cur->list : NULL; prelude_return_val_if_fail(file, NULL); prelude_list_for_each_continue(&file->file_access_list, tmp) return prelude_list_entry(tmp, idmef_file_access_t, list); return NULL; } /** * idmef_file_set_file_access: * @ptr: pointer to a #idmef_file_t object. * @object: pointer to a #idmef_file_access_t object. * @pos: Position in the list. * * Add @object to position @pos of @ptr list of #idmef_file_access_t object. * * If @pos is #IDMEF_LIST_APPEND, @object will be inserted at the tail of the list. * If @pos is #IDMEF_LIST_PREPEND, @object will be inserted at the head of the list. */ void idmef_file_set_file_access(idmef_file_t *ptr, idmef_file_access_t *object, int pos) { prelude_return_if_fail(ptr); prelude_return_if_fail(object); if ( ! prelude_list_is_empty(&object->list) ) prelude_list_del_init(&object->list); list_insert(&ptr->file_access_list, &object->list, pos); } /** * idmef_file_new_file_access: * @ptr: pointer to a #idmef_file_t object. * @ret: pointer to an address where to store the created #idmef_file_access_t object. * @pos: position in the list. * * Create a new #idmef_file_access_t children of @ptr, and add it to position @pos of * @ptr list of #idmef_file_access_t object. The created #idmef_file_access_t object is * stored in @ret. * * If @pos is #IDMEF_LIST_APPEND, @object will be inserted at the tail of the list. * If @pos is #IDMEF_LIST_PREPEND, @object will be inserted at the head of the list. * * Returns: 0 on success, or a negative value if an error occured. */ int idmef_file_new_file_access(idmef_file_t *ptr, idmef_file_access_t **ret, int pos) { int retval; prelude_return_val_if_fail(ptr, prelude_error(PRELUDE_ERROR_ASSERTION)); retval = idmef_file_access_new(ret); if ( retval < 0 ) return retval; list_insert(&ptr->file_access_list, &(*ret)->list, pos); return 0; } /** * idmef_file_get_next_linkage: * @file: pointer to a #idmef_file_t object. * @linkage_cur: pointer to a #idmef_linkage_t object. * * Get the next #idmef_linkage_t object listed in @ptr. * When iterating over the idmef_linkage_t object listed in @ptr, * @object should be set to the latest returned #idmef_linkage_t object. * * Returns: the next #idmef_linkage_t in the list. */ idmef_linkage_t *idmef_file_get_next_linkage(idmef_file_t *file, idmef_linkage_t *linkage_cur) { prelude_list_t *tmp = (linkage_cur) ? &linkage_cur->list : NULL; prelude_return_val_if_fail(file, NULL); prelude_list_for_each_continue(&file->linkage_list, tmp) return prelude_list_entry(tmp, idmef_linkage_t, list); return NULL; } /** * idmef_file_set_linkage: * @ptr: pointer to a #idmef_file_t object. * @object: pointer to a #idmef_linkage_t object. * @pos: Position in the list. * * Add @object to position @pos of @ptr list of #idmef_linkage_t object. * * If @pos is #IDMEF_LIST_APPEND, @object will be inserted at the tail of the list. * If @pos is #IDMEF_LIST_PREPEND, @object will be inserted at the head of the list. */ void idmef_file_set_linkage(idmef_file_t *ptr, idmef_linkage_t *object, int pos) { prelude_return_if_fail(ptr); prelude_return_if_fail(object); if ( ! prelude_list_is_empty(&object->list) ) prelude_list_del_init(&object->list); list_insert(&ptr->linkage_list, &object->list, pos); } /** * idmef_file_new_linkage: * @ptr: pointer to a #idmef_file_t object. * @ret: pointer to an address where to store the created #idmef_linkage_t object. * @pos: position in the list. * * Create a new #idmef_linkage_t children of @ptr, and add it to position @pos of * @ptr list of #idmef_linkage_t object. The created #idmef_linkage_t object is * stored in @ret. * * If @pos is #IDMEF_LIST_APPEND, @object will be inserted at the tail of the list. * If @pos is #IDMEF_LIST_PREPEND, @object will be inserted at the head of the list. * * Returns: 0 on success, or a negative value if an error occured. */ int idmef_file_new_linkage(idmef_file_t *ptr, idmef_linkage_t **ret, int pos) { int retval; prelude_return_val_if_fail(ptr, prelude_error(PRELUDE_ERROR_ASSERTION)); retval = idmef_linkage_new(ret); if ( retval < 0 ) return retval; list_insert(&ptr->linkage_list, &(*ret)->list, pos); return 0; } /** * *idmef_file_get_inode: * @ptr: pointer to a #idmef_file_t object. * * Get inode children of the #idmef_file_t object. * * Returns: a pointer to a idmef_inode_t object, or NULL if the children object is not set. */ idmef_inode_t *idmef_file_get_inode(idmef_file_t *ptr) { prelude_return_val_if_fail(ptr, 0); /* FIXME */ return ptr->inode; } /** * idmef_file_set_inode: * @ptr: pointer to a #idmef_file_t object. * @inode: pointer to a #idmef_inode_t object. * * Set @inode object as a children of @ptr. * if @ptr already contain an @inode object, then it is destroyed, * and updated to point to the provided @inode object. */ void idmef_file_set_inode(idmef_file_t *ptr, idmef_inode_t *inode) { prelude_return_if_fail(ptr); if ( ptr->inode ) idmef_inode_destroy(ptr->inode); ptr->inode = inode; } /** * idmef_file_new_inode: * @ptr: pointer to a #idmef_file_t object. * @ret: pointer to an address where to store the created #idmef_inode_t object. * * Create a new inode object, children of #idmef_file_t. * If @ptr already contain a #idmef_inode_t object, then it is destroyed. * * Returns: 0 on success, or a negative value if an error occured. */ int idmef_file_new_inode(idmef_file_t *ptr, idmef_inode_t **ret) { int retval; prelude_return_val_if_fail(ptr, prelude_error(PRELUDE_ERROR_ASSERTION)); if ( ! ptr->inode ) { retval = idmef_inode_new(&ptr->inode); if ( retval < 0 ) return retval; } *ret = ptr->inode; return 0; } /** * idmef_file_get_next_checksum: * @file: pointer to a #idmef_file_t object. * @checksum_cur: pointer to a #idmef_checksum_t object. * * Get the next #idmef_checksum_t object listed in @ptr. * When iterating over the idmef_checksum_t object listed in @ptr, * @object should be set to the latest returned #idmef_checksum_t object. * * Returns: the next #idmef_checksum_t in the list. */ idmef_checksum_t *idmef_file_get_next_checksum(idmef_file_t *file, idmef_checksum_t *checksum_cur) { prelude_list_t *tmp = (checksum_cur) ? &checksum_cur->list : NULL; prelude_return_val_if_fail(file, NULL); prelude_list_for_each_continue(&file->checksum_list, tmp) return prelude_list_entry(tmp, idmef_checksum_t, list); return NULL; } /** * idmef_file_set_checksum: * @ptr: pointer to a #idmef_file_t object. * @object: pointer to a #idmef_checksum_t object. * @pos: Position in the list. * * Add @object to position @pos of @ptr list of #idmef_checksum_t object. * * If @pos is #IDMEF_LIST_APPEND, @object will be inserted at the tail of the list. * If @pos is #IDMEF_LIST_PREPEND, @object will be inserted at the head of the list. */ void idmef_file_set_checksum(idmef_file_t *ptr, idmef_checksum_t *object, int pos) { prelude_return_if_fail(ptr); prelude_return_if_fail(object); if ( ! prelude_list_is_empty(&object->list) ) prelude_list_del_init(&object->list); list_insert(&ptr->checksum_list, &object->list, pos); } /** * idmef_file_new_checksum: * @ptr: pointer to a #idmef_file_t object. * @ret: pointer to an address where to store the created #idmef_checksum_t object. * @pos: position in the list. * * Create a new #idmef_checksum_t children of @ptr, and add it to position @pos of * @ptr list of #idmef_checksum_t object. The created #idmef_checksum_t object is * stored in @ret. * * If @pos is #IDMEF_LIST_APPEND, @object will be inserted at the tail of the list. * If @pos is #IDMEF_LIST_PREPEND, @object will be inserted at the head of the list. * * Returns: 0 on success, or a negative value if an error occured. */ int idmef_file_new_checksum(idmef_file_t *ptr, idmef_checksum_t **ret, int pos) { int retval; prelude_return_val_if_fail(ptr, prelude_error(PRELUDE_ERROR_ASSERTION)); retval = idmef_checksum_new(ret); if ( retval < 0 ) return retval; list_insert(&ptr->checksum_list, &(*ret)->list, pos); return 0; } /** * idmef_file_get_category: * @ptr: pointer to a #idmef_file_t object. * * Get category children of the #idmef_file_t object. * * Returns: a pointer to a idmef_file_category_t object, or NULL if the children object is not set. */ idmef_file_category_t idmef_file_get_category(idmef_file_t *ptr) { prelude_return_val_if_fail(ptr, 0); /* FIXME */ return ptr->category; } /** * idmef_file_set_category: * @ptr: pointer to a #idmef_file_t object. * @category: pointer to a #idmef_file_category_t object. * * Set @category object as a children of @ptr. * if @ptr already contain an @category object, then it is destroyed, * and updated to point to the provided @category object. */ void idmef_file_set_category(idmef_file_t *ptr, idmef_file_category_t category) { prelude_return_if_fail(ptr); ptr->category = category; } /** * idmef_file_new_category: * @ptr: pointer to a #idmef_file_t object. * @ret: pointer to an address where to store the created #idmef_file_category_t object. * * Create a new category object, children of #idmef_file_t. * If @ptr already contain a #idmef_file_category_t object, then it is destroyed. * * Returns: 0 on success, or a negative value if an error occured. */ int idmef_file_new_category(idmef_file_t *ptr, idmef_file_category_t **ret) { prelude_return_val_if_fail(ptr, prelude_error(PRELUDE_ERROR_ASSERTION)); *ret = &ptr->category; return 0; } /** * *idmef_file_get_fstype: * @ptr: pointer to a #idmef_file_t object. * * Get fstype children of the #idmef_file_t object. * * Returns: a pointer to a idmef_file_fstype_t object, or NULL if the children object is not set. */ idmef_file_fstype_t *idmef_file_get_fstype(idmef_file_t *ptr) { prelude_return_val_if_fail(ptr, 0); /* FIXME */ return ptr->fstype_is_set ? &ptr->fstype : NULL; } /** * idmef_file_set_fstype: * @ptr: pointer to a #idmef_file_t object. * @fstype: pointer to a #idmef_file_fstype_t object. * * Set @fstype object as a children of @ptr. * if @ptr already contain an @fstype object, then it is destroyed, * and updated to point to the provided @fstype object. */ void idmef_file_set_fstype(idmef_file_t *ptr, idmef_file_fstype_t fstype) { prelude_return_if_fail(ptr); ptr->fstype = fstype; ptr->fstype_is_set = 1; } void idmef_file_unset_fstype(idmef_file_t *ptr) { prelude_return_if_fail(ptr); ptr->fstype_is_set = 0; } /** * idmef_file_new_fstype: * @ptr: pointer to a #idmef_file_t object. * @ret: pointer to an address where to store the created #idmef_file_fstype_t object. * * Create a new fstype object, children of #idmef_file_t. * If @ptr already contain a #idmef_file_fstype_t object, then it is destroyed. * * Returns: 0 on success, or a negative value if an error occured. */ int idmef_file_new_fstype(idmef_file_t *ptr, idmef_file_fstype_t **ret) { prelude_return_val_if_fail(ptr, prelude_error(PRELUDE_ERROR_ASSERTION)); ptr->fstype_is_set = 1; *ret = &ptr->fstype; return 0; } /** * *idmef_file_get_file_type: * @ptr: pointer to a #idmef_file_t object. * * Get file_type children of the #idmef_file_t object. * * Returns: a pointer to a prelude_string_t object, or NULL if the children object is not set. */ prelude_string_t *idmef_file_get_file_type(idmef_file_t *ptr) { prelude_return_val_if_fail(ptr, 0); /* FIXME */ return ptr->file_type; } /** * idmef_file_set_file_type: * @ptr: pointer to a #idmef_file_t object. * @file_type: pointer to a #prelude_string_t object. * * Set @file_type object as a children of @ptr. * if @ptr already contain an @file_type object, then it is destroyed, * and updated to point to the provided @file_type object. */ void idmef_file_set_file_type(idmef_file_t *ptr, prelude_string_t *file_type) { prelude_return_if_fail(ptr); if ( ptr->file_type ) prelude_string_destroy(ptr->file_type); ptr->file_type = file_type; } /** * idmef_file_new_file_type: * @ptr: pointer to a #idmef_file_t object. * @ret: pointer to an address where to store the created #prelude_string_t object. * * Create a new file_type object, children of #idmef_file_t. * If @ptr already contain a #prelude_string_t object, then it is destroyed. * * Returns: 0 on success, or a negative value if an error occured. */ int idmef_file_new_file_type(idmef_file_t *ptr, prelude_string_t **ret) { int retval; prelude_return_val_if_fail(ptr, prelude_error(PRELUDE_ERROR_ASSERTION)); if ( ! ptr->file_type ) { retval = prelude_string_new(&ptr->file_type); if ( retval < 0 ) return retval; } *ret = ptr->file_type; return 0; } /** * idmef_file_copy: * @src: Source of the copy. * @dst: Where to copy the object. * * Copy a new #idmef_file_t object from @src to @dst. * * Returns: 0 on success, a negative value if an error occured. */ int idmef_file_copy(const idmef_file_t *src, idmef_file_t *dst) { int ret; prelude_return_val_if_fail(src, prelude_error(PRELUDE_ERROR_ASSERTION)); prelude_return_val_if_fail(dst, prelude_error(PRELUDE_ERROR_ASSERTION)); ret = 0; if ( src->ident ) { ret = prelude_string_clone(src->ident, &dst->ident); if ( ret < 0 ) return ret; } if ( src->name ) { ret = prelude_string_copy(src->name, dst->name); if ( ret < 0 ) return ret; } if ( src->path ) { ret = prelude_string_copy(src->path, dst->path); if ( ret < 0 ) return ret; } if ( src->create_time ) { ret = idmef_time_clone(src->create_time, &dst->create_time); if ( ret < 0 ) return ret; } if ( src->modify_time ) { ret = idmef_time_clone(src->modify_time, &dst->modify_time); if ( ret < 0 ) return ret; } if ( src->access_time ) { ret = idmef_time_clone(src->access_time, &dst->access_time); if ( ret < 0 ) return ret; } dst->data_size_is_set = src->data_size_is_set; dst->data_size = src->data_size; dst->disk_size_is_set = src->disk_size_is_set; dst->disk_size = src->disk_size; { prelude_list_t *n, *tmp; idmef_file_access_t *entry, *new; prelude_list_for_each_safe(&src->file_access_list, tmp, n) { entry = prelude_list_entry(tmp, idmef_file_access_t, list); idmef_file_access_clone(entry, &new); prelude_list_add_tail(&dst->file_access_list, &new->list); } } { prelude_list_t *n, *tmp; idmef_linkage_t *entry, *new; prelude_list_for_each_safe(&src->linkage_list, tmp, n) { entry = prelude_list_entry(tmp, idmef_linkage_t, list); idmef_linkage_clone(entry, &new); prelude_list_add_tail(&dst->linkage_list, &new->list); } } if ( src->inode ) { ret = idmef_inode_clone(src->inode, &dst->inode); if ( ret < 0 ) return ret; } { prelude_list_t *n, *tmp; idmef_checksum_t *entry, *new; prelude_list_for_each_safe(&src->checksum_list, tmp, n) { entry = prelude_list_entry(tmp, idmef_checksum_t, list); idmef_checksum_clone(entry, &new); prelude_list_add_tail(&dst->checksum_list, &new->list); } } dst->category = src->category; dst->fstype_is_set = src->fstype_is_set; dst->fstype = src->fstype; if ( src->file_type ) { ret = prelude_string_clone(src->file_type, &dst->file_type); if ( ret < 0 ) return ret; } return 0; } /** * idmef_file_clone: * @src: Object to be cloned. * @dst: Address where to store the pointer to the cloned object. * * Create a copy of @src, and store it in @dst. * * Returns: 0 on success, a negative value if an error occured. */ int idmef_file_clone(idmef_file_t *src, idmef_file_t **dst) { int ret; prelude_return_val_if_fail(src, prelude_error(PRELUDE_ERROR_ASSERTION)); ret = idmef_file_new(dst); if ( ret < 0 ) return ret; return idmef_file_copy(src, *dst); } /** * idmef_file_compare: * @obj1: Object to compare with @obj2. * @obj2: Object to compare with @obj1. * * Compare @obj1 with @obj2. * * Returns: 0 on match, a negative value on comparison failure. */ int idmef_file_compare(const idmef_file_t *obj1, const idmef_file_t *obj2) { int ret = 0; if ( obj1 == NULL && obj2 == NULL ) return 0; else if ( obj1 == NULL || obj2 == NULL ) return -1; ret = prelude_string_compare(obj1->ident, obj2->ident); if ( ret != 0 ) return ret; ret = prelude_string_compare(obj1->name, obj2->name); if ( ret != 0 ) return ret; ret = prelude_string_compare(obj1->path, obj2->path); if ( ret != 0 ) return ret; ret = idmef_time_compare(obj1->create_time, obj2->create_time); if ( ret != 0 ) return ret; ret = idmef_time_compare(obj1->modify_time, obj2->modify_time); if ( ret != 0 ) return ret; ret = idmef_time_compare(obj1->access_time, obj2->access_time); if ( ret != 0 ) return ret; if ( obj1->data_size_is_set != obj2->data_size_is_set ) return -1; if ( obj1->data_size_is_set && obj1->data_size != obj2->data_size ) return -1; if ( obj1->disk_size_is_set != obj2->disk_size_is_set ) return -1; if ( obj1->disk_size_is_set && obj1->disk_size != obj2->disk_size ) return -1; { prelude_list_t *tmp1, *tmp2; idmef_file_access_t *entry1, *entry2; tmp1 = tmp2 = NULL; do { entry1 = entry2 = NULL; prelude_list_for_each_continue(&obj1->file_access_list, tmp1) { entry1 = prelude_list_entry(tmp1, idmef_file_access_t, list); break; } prelude_list_for_each_continue(&obj2->file_access_list, tmp2) { entry2 = prelude_list_entry(tmp2, idmef_file_access_t, list); break; } ret = idmef_file_access_compare(entry1, entry2); if ( ret != 0 ) return ret; } while ( entry1 && entry2 ); } { prelude_list_t *tmp1, *tmp2; idmef_linkage_t *entry1, *entry2; tmp1 = tmp2 = NULL; do { entry1 = entry2 = NULL; prelude_list_for_each_continue(&obj1->linkage_list, tmp1) { entry1 = prelude_list_entry(tmp1, idmef_linkage_t, list); break; } prelude_list_for_each_continue(&obj2->linkage_list, tmp2) { entry2 = prelude_list_entry(tmp2, idmef_linkage_t, list); break; } ret = idmef_linkage_compare(entry1, entry2); if ( ret != 0 ) return ret; } while ( entry1 && entry2 ); } ret = idmef_inode_compare(obj1->inode, obj2->inode); if ( ret != 0 ) return ret; { prelude_list_t *tmp1, *tmp2; idmef_checksum_t *entry1, *entry2; tmp1 = tmp2 = NULL; do { entry1 = entry2 = NULL; prelude_list_for_each_continue(&obj1->checksum_list, tmp1) { entry1 = prelude_list_entry(tmp1, idmef_checksum_t, list); break; } prelude_list_for_each_continue(&obj2->checksum_list, tmp2) { entry2 = prelude_list_entry(tmp2, idmef_checksum_t, list); break; } ret = idmef_checksum_compare(entry1, entry2); if ( ret != 0 ) return ret; } while ( entry1 && entry2 ); } if ( obj1->category != obj2->category ) return -1; if ( obj1->fstype_is_set != obj2->fstype_is_set ) return -1; if ( obj1->fstype_is_set && obj1->fstype != obj2->fstype ) return -1; ret = prelude_string_compare(obj1->file_type, obj2->file_type); if ( ret != 0 ) return ret; return ret; } /** * idmef_linkage_new: * @ret: Pointer where to store the created #idmef_linkage_t object. * * Create a new #idmef_linkage_t object. * * Returns: 0 on success, a negative value if an error occured. */ int idmef_linkage_new(idmef_linkage_t **ret) { *ret = calloc(1, sizeof(**ret)); if ( ! *ret ) return prelude_error_from_errno(errno); prelude_list_init(&(*ret)->list); (*ret)->refcount = 1; { int retval = prelude_string_new(&(*ret)->name); if ( retval < 0 ) { idmef_linkage_destroy(*ret); *ret = NULL; return retval; } } { int retval = prelude_string_new(&(*ret)->path); if ( retval < 0 ) { idmef_linkage_destroy(*ret); *ret = NULL; return retval; } } { int retval = idmef_file_new(&(*ret)->file); if ( retval < 0 ) { idmef_linkage_destroy(*ret); *ret = NULL; return retval; } } return 0; } /** * idmef_linkage_ref: * @linkage: pointer to a #idmef_linkage_t object. * * Increase @linkage reference count, so that it can be referenced * multiple time. * * Returns: a pointer to @linkage. */ idmef_linkage_t *idmef_linkage_ref(idmef_linkage_t *linkage) { prelude_return_val_if_fail(linkage, NULL); linkage->refcount++; return linkage; } int _idmef_linkage_get_child(void *p, idmef_class_child_id_t child, void **childptr) { idmef_linkage_t *ptr = p; prelude_return_val_if_fail(p, prelude_error(PRELUDE_ERROR_ASSERTION)); *childptr = NULL; switch ( child ) { case 0: return idmef_value_new_enum_from_numeric((idmef_value_t **) childptr, IDMEF_CLASS_ID_LINKAGE_CATEGORY, ptr->category); case 1: return get_value_from_string((idmef_value_t **) childptr, ptr->name, TRUE); case 2: return get_value_from_string((idmef_value_t **) childptr, ptr->path, TRUE); case 3: *childptr = ptr->file; return 0; default: return prelude_error(PRELUDE_ERROR_IDMEF_CLASS_UNKNOWN_CHILD); } } int _idmef_linkage_new_child(void *p, idmef_class_child_id_t child, int n, void **ret) { idmef_linkage_t *ptr = p; prelude_return_val_if_fail(p, prelude_error(PRELUDE_ERROR_ASSERTION)); switch ( child ) { case 0: return idmef_linkage_new_category(ptr, (idmef_linkage_category_t **) ret); case 1: return idmef_linkage_new_name(ptr, (prelude_string_t **) ret); case 2: return idmef_linkage_new_path(ptr, (prelude_string_t **) ret); case 3: return idmef_linkage_new_file(ptr, (idmef_file_t **) ret); default: return prelude_error(PRELUDE_ERROR_IDMEF_CLASS_UNKNOWN_CHILD); } } int _idmef_linkage_destroy_child(void *p, idmef_class_child_id_t child, int n) { idmef_linkage_t *ptr = p; prelude_return_val_if_fail(p, prelude_error(PRELUDE_ERROR_ASSERTION)); switch ( child ) { case 0: ptr->category = 0; return 0; case 1: if ( ptr->name ) { prelude_string_destroy(ptr->name); ptr->name = NULL; } return 0; case 2: if ( ptr->path ) { prelude_string_destroy(ptr->path); ptr->path = NULL; } return 0; case 3: if ( ptr->file ) { idmef_file_destroy(ptr->file); ptr->file = NULL; } return 0; default: return prelude_error(PRELUDE_ERROR_IDMEF_CLASS_UNKNOWN_CHILD); } } static void idmef_linkage_destroy_internal(idmef_linkage_t *ptr) { prelude_return_if_fail(ptr); if ( ! prelude_list_is_empty(&ptr->list) ) prelude_list_del_init(&ptr->list); if ( ptr->name ) { prelude_string_destroy(ptr->name); ptr->name = NULL; } if ( ptr->path ) { prelude_string_destroy(ptr->path); ptr->path = NULL; } if ( ptr->file ) { idmef_file_destroy(ptr->file); ptr->file = NULL; } /* free() should be done by the caller */ } /** * idmef_linkage_destroy: * @ptr: pointer to a #idmef_linkage_t object. * * Destroy @ptr and all of it's children. * The objects are only destroyed if their reference count reach zero. */ void idmef_linkage_destroy(idmef_linkage_t *ptr) { prelude_return_if_fail(ptr); if ( --ptr->refcount ) return; idmef_linkage_destroy_internal(ptr); free(ptr); } /** * idmef_linkage_get_category: * @ptr: pointer to a #idmef_linkage_t object. * * Get category children of the #idmef_linkage_t object. * * Returns: a pointer to a idmef_linkage_category_t object, or NULL if the children object is not set. */ idmef_linkage_category_t idmef_linkage_get_category(idmef_linkage_t *ptr) { prelude_return_val_if_fail(ptr, 0); /* FIXME */ return ptr->category; } /** * idmef_linkage_set_category: * @ptr: pointer to a #idmef_linkage_t object. * @category: pointer to a #idmef_linkage_category_t object. * * Set @category object as a children of @ptr. * if @ptr already contain an @category object, then it is destroyed, * and updated to point to the provided @category object. */ void idmef_linkage_set_category(idmef_linkage_t *ptr, idmef_linkage_category_t category) { prelude_return_if_fail(ptr); ptr->category = category; } /** * idmef_linkage_new_category: * @ptr: pointer to a #idmef_linkage_t object. * @ret: pointer to an address where to store the created #idmef_linkage_category_t object. * * Create a new category object, children of #idmef_linkage_t. * If @ptr already contain a #idmef_linkage_category_t object, then it is destroyed. * * Returns: 0 on success, or a negative value if an error occured. */ int idmef_linkage_new_category(idmef_linkage_t *ptr, idmef_linkage_category_t **ret) { prelude_return_val_if_fail(ptr, prelude_error(PRELUDE_ERROR_ASSERTION)); *ret = &ptr->category; return 0; } /** * *idmef_linkage_get_name: * @ptr: pointer to a #idmef_linkage_t object. * * Get name children of the #idmef_linkage_t object. * * Returns: a pointer to a prelude_string_t object, or NULL if the children object is not set. */ prelude_string_t *idmef_linkage_get_name(idmef_linkage_t *ptr) { prelude_return_val_if_fail(ptr, 0); /* FIXME */ return ptr->name; } /** * idmef_linkage_set_name: * @ptr: pointer to a #idmef_linkage_t object. * @name: pointer to a #prelude_string_t object. * * Set @name object as a children of @ptr. * if @ptr already contain an @name object, then it is destroyed, * and updated to point to the provided @name object. */ void idmef_linkage_set_name(idmef_linkage_t *ptr, prelude_string_t *name) { prelude_return_if_fail(ptr); if ( ptr->name ) prelude_string_destroy(ptr->name); ptr->name = name; } /** * idmef_linkage_new_name: * @ptr: pointer to a #idmef_linkage_t object. * @ret: pointer to an address where to store the created #prelude_string_t object. * * Create a new name object, children of #idmef_linkage_t. * If @ptr already contain a #prelude_string_t object, then it is destroyed. * * Returns: 0 on success, or a negative value if an error occured. */ int idmef_linkage_new_name(idmef_linkage_t *ptr, prelude_string_t **ret) { int retval; prelude_return_val_if_fail(ptr, prelude_error(PRELUDE_ERROR_ASSERTION)); if ( ! ptr->name ) { retval = prelude_string_new(&ptr->name); if ( retval < 0 ) return retval; } *ret = ptr->name; return 0; } /** * *idmef_linkage_get_path: * @ptr: pointer to a #idmef_linkage_t object. * * Get path children of the #idmef_linkage_t object. * * Returns: a pointer to a prelude_string_t object, or NULL if the children object is not set. */ prelude_string_t *idmef_linkage_get_path(idmef_linkage_t *ptr) { prelude_return_val_if_fail(ptr, 0); /* FIXME */ return ptr->path; } /** * idmef_linkage_set_path: * @ptr: pointer to a #idmef_linkage_t object. * @path: pointer to a #prelude_string_t object. * * Set @path object as a children of @ptr. * if @ptr already contain an @path object, then it is destroyed, * and updated to point to the provided @path object. */ void idmef_linkage_set_path(idmef_linkage_t *ptr, prelude_string_t *path) { prelude_return_if_fail(ptr); if ( ptr->path ) prelude_string_destroy(ptr->path); ptr->path = path; } /** * idmef_linkage_new_path: * @ptr: pointer to a #idmef_linkage_t object. * @ret: pointer to an address where to store the created #prelude_string_t object. * * Create a new path object, children of #idmef_linkage_t. * If @ptr already contain a #prelude_string_t object, then it is destroyed. * * Returns: 0 on success, or a negative value if an error occured. */ int idmef_linkage_new_path(idmef_linkage_t *ptr, prelude_string_t **ret) { int retval; prelude_return_val_if_fail(ptr, prelude_error(PRELUDE_ERROR_ASSERTION)); if ( ! ptr->path ) { retval = prelude_string_new(&ptr->path); if ( retval < 0 ) return retval; } *ret = ptr->path; return 0; } /** * *idmef_linkage_get_file: * @ptr: pointer to a #idmef_linkage_t object. * * Get file children of the #idmef_linkage_t object. * * Returns: a pointer to a idmef_file_t object, or NULL if the children object is not set. */ idmef_file_t *idmef_linkage_get_file(idmef_linkage_t *ptr) { prelude_return_val_if_fail(ptr, 0); /* FIXME */ return ptr->file; } /** * idmef_linkage_set_file: * @ptr: pointer to a #idmef_linkage_t object. * @file: pointer to a #idmef_file_t object. * * Set @file object as a children of @ptr. * if @ptr already contain an @file object, then it is destroyed, * and updated to point to the provided @file object. */ void idmef_linkage_set_file(idmef_linkage_t *ptr, idmef_file_t *file) { prelude_return_if_fail(ptr); if ( ptr->file ) idmef_file_destroy(ptr->file); ptr->file = file; } /** * idmef_linkage_new_file: * @ptr: pointer to a #idmef_linkage_t object. * @ret: pointer to an address where to store the created #idmef_file_t object. * * Create a new file object, children of #idmef_linkage_t. * If @ptr already contain a #idmef_file_t object, then it is destroyed. * * Returns: 0 on success, or a negative value if an error occured. */ int idmef_linkage_new_file(idmef_linkage_t *ptr, idmef_file_t **ret) { int retval; prelude_return_val_if_fail(ptr, prelude_error(PRELUDE_ERROR_ASSERTION)); if ( ! ptr->file ) { retval = idmef_file_new(&ptr->file); if ( retval < 0 ) return retval; } *ret = ptr->file; return 0; } /** * idmef_linkage_copy: * @src: Source of the copy. * @dst: Where to copy the object. * * Copy a new #idmef_linkage_t object from @src to @dst. * * Returns: 0 on success, a negative value if an error occured. */ int idmef_linkage_copy(const idmef_linkage_t *src, idmef_linkage_t *dst) { int ret; prelude_return_val_if_fail(src, prelude_error(PRELUDE_ERROR_ASSERTION)); prelude_return_val_if_fail(dst, prelude_error(PRELUDE_ERROR_ASSERTION)); ret = 0; dst->category = src->category; if ( src->name ) { ret = prelude_string_copy(src->name, dst->name); if ( ret < 0 ) return ret; } if ( src->path ) { ret = prelude_string_copy(src->path, dst->path); if ( ret < 0 ) return ret; } if ( src->file ) { ret = idmef_file_copy(src->file, dst->file); if ( ret < 0 ) return ret; } return 0; } /** * idmef_linkage_clone: * @src: Object to be cloned. * @dst: Address where to store the pointer to the cloned object. * * Create a copy of @src, and store it in @dst. * * Returns: 0 on success, a negative value if an error occured. */ int idmef_linkage_clone(idmef_linkage_t *src, idmef_linkage_t **dst) { int ret; prelude_return_val_if_fail(src, prelude_error(PRELUDE_ERROR_ASSERTION)); ret = idmef_linkage_new(dst); if ( ret < 0 ) return ret; return idmef_linkage_copy(src, *dst); } /** * idmef_linkage_compare: * @obj1: Object to compare with @obj2. * @obj2: Object to compare with @obj1. * * Compare @obj1 with @obj2. * * Returns: 0 on match, a negative value on comparison failure. */ int idmef_linkage_compare(const idmef_linkage_t *obj1, const idmef_linkage_t *obj2) { int ret = 0; if ( obj1 == NULL && obj2 == NULL ) return 0; else if ( obj1 == NULL || obj2 == NULL ) return -1; if ( obj1->category != obj2->category ) return -1; ret = prelude_string_compare(obj1->name, obj2->name); if ( ret != 0 ) return ret; ret = prelude_string_compare(obj1->path, obj2->path); if ( ret != 0 ) return ret; ret = idmef_file_compare(obj1->file, obj2->file); if ( ret != 0 ) return ret; return ret; } /** * idmef_target_new: * @ret: Pointer where to store the created #idmef_target_t object. * * Create a new #idmef_target_t object. * * Returns: 0 on success, a negative value if an error occured. */ int idmef_target_new(idmef_target_t **ret) { *ret = calloc(1, sizeof(**ret)); if ( ! *ret ) return prelude_error_from_errno(errno); prelude_list_init(&(*ret)->list); (*ret)->refcount = 1; prelude_list_init(&(*ret)->file_list); return 0; } /** * idmef_target_ref: * @target: pointer to a #idmef_target_t object. * * Increase @target reference count, so that it can be referenced * multiple time. * * Returns: a pointer to @target. */ idmef_target_t *idmef_target_ref(idmef_target_t *target) { prelude_return_val_if_fail(target, NULL); target->refcount++; return target; } int _idmef_target_get_child(void *p, idmef_class_child_id_t child, void **childptr) { idmef_target_t *ptr = p; prelude_return_val_if_fail(p, prelude_error(PRELUDE_ERROR_ASSERTION)); *childptr = NULL; switch ( child ) { case 0: return get_value_from_string((idmef_value_t **) childptr, ptr->ident, TRUE); case 1: return idmef_value_new_enum_from_numeric((idmef_value_t **) childptr, IDMEF_CLASS_ID_TARGET_DECOY, ptr->decoy); case 2: return get_value_from_string((idmef_value_t **) childptr, ptr->interface, TRUE); case 3: *childptr = ptr->node; return 0; case 4: *childptr = ptr->user; return 0; case 5: *childptr = ptr->process; return 0; case 6: *childptr = ptr->service; return 0; case 7: *childptr = &ptr->file_list; return 0; default: return prelude_error(PRELUDE_ERROR_IDMEF_CLASS_UNKNOWN_CHILD); } } int _idmef_target_new_child(void *p, idmef_class_child_id_t child, int n, void **ret) { idmef_target_t *ptr = p; prelude_return_val_if_fail(p, prelude_error(PRELUDE_ERROR_ASSERTION)); switch ( child ) { case 0: return idmef_target_new_ident(ptr, (prelude_string_t **) ret); case 1: return idmef_target_new_decoy(ptr, (idmef_target_decoy_t **) ret); case 2: return idmef_target_new_interface(ptr, (prelude_string_t **) ret); case 3: return idmef_target_new_node(ptr, (idmef_node_t **) ret); case 4: return idmef_target_new_user(ptr, (idmef_user_t **) ret); case 5: return idmef_target_new_process(ptr, (idmef_process_t **) ret); case 6: return idmef_target_new_service(ptr, (idmef_service_t **) ret); case 7: { int i = 0; prelude_list_t *tmp; if ( n == IDMEF_LIST_APPEND || n == IDMEF_LIST_PREPEND ) return idmef_target_new_file(ptr, (idmef_file_t **) ret, n); if ( n >= 0 ) { prelude_list_for_each(&ptr->file_list, tmp) { if ( i++ == n ) { *ret = prelude_list_entry(tmp, idmef_file_t, list); return 0; } } if ( i != n ) return prelude_error(PRELUDE_ERROR_IDMEF_TREE_INDEX_UNDEFINED); } else { int pos = (-n) - 1; /* With negative value, -1 is the base, translate to 0 */ prelude_list_for_each_reversed(&ptr->file_list, tmp) { if ( i++ == pos ) { *ret = prelude_list_entry(tmp, idmef_file_t, list); return 0; } } if ( i != pos ) return prelude_error(PRELUDE_ERROR_IDMEF_TREE_INDEX_UNDEFINED); } return idmef_target_new_file(ptr, (idmef_file_t **) ret, n); } default: return prelude_error(PRELUDE_ERROR_IDMEF_CLASS_UNKNOWN_CHILD); } } int _idmef_target_destroy_child(void *p, idmef_class_child_id_t child, int n) { idmef_target_t *ptr = p; prelude_return_val_if_fail(p, prelude_error(PRELUDE_ERROR_ASSERTION)); switch ( child ) { case 0: if ( ptr->ident ) { prelude_string_destroy(ptr->ident); ptr->ident = NULL; } return 0; case 1: ptr->decoy = 0; return 0; case 2: if ( ptr->interface ) { prelude_string_destroy(ptr->interface); ptr->interface = NULL; } return 0; case 3: if ( ptr->node ) { idmef_node_destroy(ptr->node); ptr->node = NULL; } return 0; case 4: if ( ptr->user ) { idmef_user_destroy(ptr->user); ptr->user = NULL; } return 0; case 5: if ( ptr->process ) { idmef_process_destroy(ptr->process); ptr->process = NULL; } return 0; case 6: if ( ptr->service ) { idmef_service_destroy(ptr->service); ptr->service = NULL; } return 0; case 7: { int i = 0; prelude_list_t *tmp; if ( n >= 0 ) { prelude_list_for_each(&ptr->file_list, tmp) { if ( i++ == n ) { void *b = prelude_list_entry(tmp, idmef_file_t, list); idmef_file_destroy(b); return 0; } } if ( i != n ) return prelude_error(PRELUDE_ERROR_IDMEF_TREE_INDEX_UNDEFINED); } else { int pos = (-n) - 1; /* With negative value, -1 is the base, translate to 0 */ prelude_list_for_each_reversed(&ptr->file_list, tmp) { if ( i++ == pos ) { void *b = prelude_list_entry(tmp, idmef_file_t, list); idmef_file_destroy(b); return 0; } } if ( i != pos ) return prelude_error(PRELUDE_ERROR_IDMEF_TREE_INDEX_UNDEFINED); } } default: return prelude_error(PRELUDE_ERROR_IDMEF_CLASS_UNKNOWN_CHILD); } } static void idmef_target_destroy_internal(idmef_target_t *ptr) { prelude_return_if_fail(ptr); if ( ! prelude_list_is_empty(&ptr->list) ) prelude_list_del_init(&ptr->list); if ( ptr->ident ) { prelude_string_destroy(ptr->ident); ptr->ident = NULL; } if ( ptr->interface ) { prelude_string_destroy(ptr->interface); ptr->interface = NULL; } if ( ptr->node ) { idmef_node_destroy(ptr->node); ptr->node = NULL; } if ( ptr->user ) { idmef_user_destroy(ptr->user); ptr->user = NULL; } if ( ptr->process ) { idmef_process_destroy(ptr->process); ptr->process = NULL; } if ( ptr->service ) { idmef_service_destroy(ptr->service); ptr->service = NULL; } { prelude_list_t *n, *tmp; idmef_file_t *entry; prelude_list_for_each_safe(&ptr->file_list, tmp, n) { entry = prelude_list_entry(tmp, idmef_file_t, list); prelude_list_del_init(&entry->list); idmef_file_destroy(entry); } } /* free() should be done by the caller */ } /** * idmef_target_destroy: * @ptr: pointer to a #idmef_target_t object. * * Destroy @ptr and all of it's children. * The objects are only destroyed if their reference count reach zero. */ void idmef_target_destroy(idmef_target_t *ptr) { prelude_return_if_fail(ptr); if ( --ptr->refcount ) return; idmef_target_destroy_internal(ptr); free(ptr); } /** * *idmef_target_get_ident: * @ptr: pointer to a #idmef_target_t object. * * Get ident children of the #idmef_target_t object. * * Returns: a pointer to a prelude_string_t object, or NULL if the children object is not set. */ prelude_string_t *idmef_target_get_ident(idmef_target_t *ptr) { prelude_return_val_if_fail(ptr, 0); /* FIXME */ return ptr->ident; } /** * idmef_target_set_ident: * @ptr: pointer to a #idmef_target_t object. * @ident: pointer to a #prelude_string_t object. * * Set @ident object as a children of @ptr. * if @ptr already contain an @ident object, then it is destroyed, * and updated to point to the provided @ident object. */ void idmef_target_set_ident(idmef_target_t *ptr, prelude_string_t *ident) { prelude_return_if_fail(ptr); if ( ptr->ident ) prelude_string_destroy(ptr->ident); ptr->ident = ident; } /** * idmef_target_new_ident: * @ptr: pointer to a #idmef_target_t object. * @ret: pointer to an address where to store the created #prelude_string_t object. * * Create a new ident object, children of #idmef_target_t. * If @ptr already contain a #prelude_string_t object, then it is destroyed. * * Returns: 0 on success, or a negative value if an error occured. */ int idmef_target_new_ident(idmef_target_t *ptr, prelude_string_t **ret) { int retval; prelude_return_val_if_fail(ptr, prelude_error(PRELUDE_ERROR_ASSERTION)); if ( ! ptr->ident ) { retval = prelude_string_new(&ptr->ident); if ( retval < 0 ) return retval; } *ret = ptr->ident; return 0; } /** * idmef_target_get_decoy: * @ptr: pointer to a #idmef_target_t object. * * Get decoy children of the #idmef_target_t object. * * Returns: a pointer to a idmef_target_decoy_t object, or NULL if the children object is not set. */ idmef_target_decoy_t idmef_target_get_decoy(idmef_target_t *ptr) { prelude_return_val_if_fail(ptr, 0); /* FIXME */ return ptr->decoy; } /** * idmef_target_set_decoy: * @ptr: pointer to a #idmef_target_t object. * @decoy: pointer to a #idmef_target_decoy_t object. * * Set @decoy object as a children of @ptr. * if @ptr already contain an @decoy object, then it is destroyed, * and updated to point to the provided @decoy object. */ void idmef_target_set_decoy(idmef_target_t *ptr, idmef_target_decoy_t decoy) { prelude_return_if_fail(ptr); ptr->decoy = decoy; } /** * idmef_target_new_decoy: * @ptr: pointer to a #idmef_target_t object. * @ret: pointer to an address where to store the created #idmef_target_decoy_t object. * * Create a new decoy object, children of #idmef_target_t. * If @ptr already contain a #idmef_target_decoy_t object, then it is destroyed. * * Returns: 0 on success, or a negative value if an error occured. */ int idmef_target_new_decoy(idmef_target_t *ptr, idmef_target_decoy_t **ret) { prelude_return_val_if_fail(ptr, prelude_error(PRELUDE_ERROR_ASSERTION)); *ret = &ptr->decoy; return 0; } /** * *idmef_target_get_interface: * @ptr: pointer to a #idmef_target_t object. * * Get interface children of the #idmef_target_t object. * * Returns: a pointer to a prelude_string_t object, or NULL if the children object is not set. */ prelude_string_t *idmef_target_get_interface(idmef_target_t *ptr) { prelude_return_val_if_fail(ptr, 0); /* FIXME */ return ptr->interface; } /** * idmef_target_set_interface: * @ptr: pointer to a #idmef_target_t object. * @interface: pointer to a #prelude_string_t object. * * Set @interface object as a children of @ptr. * if @ptr already contain an @interface object, then it is destroyed, * and updated to point to the provided @interface object. */ void idmef_target_set_interface(idmef_target_t *ptr, prelude_string_t *interface) { prelude_return_if_fail(ptr); if ( ptr->interface ) prelude_string_destroy(ptr->interface); ptr->interface = interface; } /** * idmef_target_new_interface: * @ptr: pointer to a #idmef_target_t object. * @ret: pointer to an address where to store the created #prelude_string_t object. * * Create a new interface object, children of #idmef_target_t. * If @ptr already contain a #prelude_string_t object, then it is destroyed. * * Returns: 0 on success, or a negative value if an error occured. */ int idmef_target_new_interface(idmef_target_t *ptr, prelude_string_t **ret) { int retval; prelude_return_val_if_fail(ptr, prelude_error(PRELUDE_ERROR_ASSERTION)); if ( ! ptr->interface ) { retval = prelude_string_new(&ptr->interface); if ( retval < 0 ) return retval; } *ret = ptr->interface; return 0; } /** * *idmef_target_get_node: * @ptr: pointer to a #idmef_target_t object. * * Get node children of the #idmef_target_t object. * * Returns: a pointer to a idmef_node_t object, or NULL if the children object is not set. */ idmef_node_t *idmef_target_get_node(idmef_target_t *ptr) { prelude_return_val_if_fail(ptr, 0); /* FIXME */ return ptr->node; } /** * idmef_target_set_node: * @ptr: pointer to a #idmef_target_t object. * @node: pointer to a #idmef_node_t object. * * Set @node object as a children of @ptr. * if @ptr already contain an @node object, then it is destroyed, * and updated to point to the provided @node object. */ void idmef_target_set_node(idmef_target_t *ptr, idmef_node_t *node) { prelude_return_if_fail(ptr); if ( ptr->node ) idmef_node_destroy(ptr->node); ptr->node = node; } /** * idmef_target_new_node: * @ptr: pointer to a #idmef_target_t object. * @ret: pointer to an address where to store the created #idmef_node_t object. * * Create a new node object, children of #idmef_target_t. * If @ptr already contain a #idmef_node_t object, then it is destroyed. * * Returns: 0 on success, or a negative value if an error occured. */ int idmef_target_new_node(idmef_target_t *ptr, idmef_node_t **ret) { int retval; prelude_return_val_if_fail(ptr, prelude_error(PRELUDE_ERROR_ASSERTION)); if ( ! ptr->node ) { retval = idmef_node_new(&ptr->node); if ( retval < 0 ) return retval; } *ret = ptr->node; return 0; } /** * *idmef_target_get_user: * @ptr: pointer to a #idmef_target_t object. * * Get user children of the #idmef_target_t object. * * Returns: a pointer to a idmef_user_t object, or NULL if the children object is not set. */ idmef_user_t *idmef_target_get_user(idmef_target_t *ptr) { prelude_return_val_if_fail(ptr, 0); /* FIXME */ return ptr->user; } /** * idmef_target_set_user: * @ptr: pointer to a #idmef_target_t object. * @user: pointer to a #idmef_user_t object. * * Set @user object as a children of @ptr. * if @ptr already contain an @user object, then it is destroyed, * and updated to point to the provided @user object. */ void idmef_target_set_user(idmef_target_t *ptr, idmef_user_t *user) { prelude_return_if_fail(ptr); if ( ptr->user ) idmef_user_destroy(ptr->user); ptr->user = user; } /** * idmef_target_new_user: * @ptr: pointer to a #idmef_target_t object. * @ret: pointer to an address where to store the created #idmef_user_t object. * * Create a new user object, children of #idmef_target_t. * If @ptr already contain a #idmef_user_t object, then it is destroyed. * * Returns: 0 on success, or a negative value if an error occured. */ int idmef_target_new_user(idmef_target_t *ptr, idmef_user_t **ret) { int retval; prelude_return_val_if_fail(ptr, prelude_error(PRELUDE_ERROR_ASSERTION)); if ( ! ptr->user ) { retval = idmef_user_new(&ptr->user); if ( retval < 0 ) return retval; } *ret = ptr->user; return 0; } /** * *idmef_target_get_process: * @ptr: pointer to a #idmef_target_t object. * * Get process children of the #idmef_target_t object. * * Returns: a pointer to a idmef_process_t object, or NULL if the children object is not set. */ idmef_process_t *idmef_target_get_process(idmef_target_t *ptr) { prelude_return_val_if_fail(ptr, 0); /* FIXME */ return ptr->process; } /** * idmef_target_set_process: * @ptr: pointer to a #idmef_target_t object. * @process: pointer to a #idmef_process_t object. * * Set @process object as a children of @ptr. * if @ptr already contain an @process object, then it is destroyed, * and updated to point to the provided @process object. */ void idmef_target_set_process(idmef_target_t *ptr, idmef_process_t *process) { prelude_return_if_fail(ptr); if ( ptr->process ) idmef_process_destroy(ptr->process); ptr->process = process; } /** * idmef_target_new_process: * @ptr: pointer to a #idmef_target_t object. * @ret: pointer to an address where to store the created #idmef_process_t object. * * Create a new process object, children of #idmef_target_t. * If @ptr already contain a #idmef_process_t object, then it is destroyed. * * Returns: 0 on success, or a negative value if an error occured. */ int idmef_target_new_process(idmef_target_t *ptr, idmef_process_t **ret) { int retval; prelude_return_val_if_fail(ptr, prelude_error(PRELUDE_ERROR_ASSERTION)); if ( ! ptr->process ) { retval = idmef_process_new(&ptr->process); if ( retval < 0 ) return retval; } *ret = ptr->process; return 0; } /** * *idmef_target_get_service: * @ptr: pointer to a #idmef_target_t object. * * Get service children of the #idmef_target_t object. * * Returns: a pointer to a idmef_service_t object, or NULL if the children object is not set. */ idmef_service_t *idmef_target_get_service(idmef_target_t *ptr) { prelude_return_val_if_fail(ptr, 0); /* FIXME */ return ptr->service; } /** * idmef_target_set_service: * @ptr: pointer to a #idmef_target_t object. * @service: pointer to a #idmef_service_t object. * * Set @service object as a children of @ptr. * if @ptr already contain an @service object, then it is destroyed, * and updated to point to the provided @service object. */ void idmef_target_set_service(idmef_target_t *ptr, idmef_service_t *service) { prelude_return_if_fail(ptr); if ( ptr->service ) idmef_service_destroy(ptr->service); ptr->service = service; } /** * idmef_target_new_service: * @ptr: pointer to a #idmef_target_t object. * @ret: pointer to an address where to store the created #idmef_service_t object. * * Create a new service object, children of #idmef_target_t. * If @ptr already contain a #idmef_service_t object, then it is destroyed. * * Returns: 0 on success, or a negative value if an error occured. */ int idmef_target_new_service(idmef_target_t *ptr, idmef_service_t **ret) { int retval; prelude_return_val_if_fail(ptr, prelude_error(PRELUDE_ERROR_ASSERTION)); if ( ! ptr->service ) { retval = idmef_service_new(&ptr->service); if ( retval < 0 ) return retval; } *ret = ptr->service; return 0; } /** * idmef_target_get_next_file: * @target: pointer to a #idmef_target_t object. * @file_cur: pointer to a #idmef_file_t object. * * Get the next #idmef_file_t object listed in @ptr. * When iterating over the idmef_file_t object listed in @ptr, * @object should be set to the latest returned #idmef_file_t object. * * Returns: the next #idmef_file_t in the list. */ idmef_file_t *idmef_target_get_next_file(idmef_target_t *target, idmef_file_t *file_cur) { prelude_list_t *tmp = (file_cur) ? &file_cur->list : NULL; prelude_return_val_if_fail(target, NULL); prelude_list_for_each_continue(&target->file_list, tmp) return prelude_list_entry(tmp, idmef_file_t, list); return NULL; } /** * idmef_target_set_file: * @ptr: pointer to a #idmef_target_t object. * @object: pointer to a #idmef_file_t object. * @pos: Position in the list. * * Add @object to position @pos of @ptr list of #idmef_file_t object. * * If @pos is #IDMEF_LIST_APPEND, @object will be inserted at the tail of the list. * If @pos is #IDMEF_LIST_PREPEND, @object will be inserted at the head of the list. */ void idmef_target_set_file(idmef_target_t *ptr, idmef_file_t *object, int pos) { prelude_return_if_fail(ptr); prelude_return_if_fail(object); if ( ! prelude_list_is_empty(&object->list) ) prelude_list_del_init(&object->list); list_insert(&ptr->file_list, &object->list, pos); } /** * idmef_target_new_file: * @ptr: pointer to a #idmef_target_t object. * @ret: pointer to an address where to store the created #idmef_file_t object. * @pos: position in the list. * * Create a new #idmef_file_t children of @ptr, and add it to position @pos of * @ptr list of #idmef_file_t object. The created #idmef_file_t object is * stored in @ret. * * If @pos is #IDMEF_LIST_APPEND, @object will be inserted at the tail of the list. * If @pos is #IDMEF_LIST_PREPEND, @object will be inserted at the head of the list. * * Returns: 0 on success, or a negative value if an error occured. */ int idmef_target_new_file(idmef_target_t *ptr, idmef_file_t **ret, int pos) { int retval; prelude_return_val_if_fail(ptr, prelude_error(PRELUDE_ERROR_ASSERTION)); retval = idmef_file_new(ret); if ( retval < 0 ) return retval; list_insert(&ptr->file_list, &(*ret)->list, pos); return 0; } /** * idmef_target_copy: * @src: Source of the copy. * @dst: Where to copy the object. * * Copy a new #idmef_target_t object from @src to @dst. * * Returns: 0 on success, a negative value if an error occured. */ int idmef_target_copy(const idmef_target_t *src, idmef_target_t *dst) { int ret; prelude_return_val_if_fail(src, prelude_error(PRELUDE_ERROR_ASSERTION)); prelude_return_val_if_fail(dst, prelude_error(PRELUDE_ERROR_ASSERTION)); ret = 0; if ( src->ident ) { ret = prelude_string_clone(src->ident, &dst->ident); if ( ret < 0 ) return ret; } dst->decoy = src->decoy; if ( src->interface ) { ret = prelude_string_clone(src->interface, &dst->interface); if ( ret < 0 ) return ret; } if ( src->node ) { ret = idmef_node_clone(src->node, &dst->node); if ( ret < 0 ) return ret; } if ( src->user ) { ret = idmef_user_clone(src->user, &dst->user); if ( ret < 0 ) return ret; } if ( src->process ) { ret = idmef_process_clone(src->process, &dst->process); if ( ret < 0 ) return ret; } if ( src->service ) { ret = idmef_service_clone(src->service, &dst->service); if ( ret < 0 ) return ret; } { prelude_list_t *n, *tmp; idmef_file_t *entry, *new; prelude_list_for_each_safe(&src->file_list, tmp, n) { entry = prelude_list_entry(tmp, idmef_file_t, list); idmef_file_clone(entry, &new); prelude_list_add_tail(&dst->file_list, &new->list); } } return 0; } /** * idmef_target_clone: * @src: Object to be cloned. * @dst: Address where to store the pointer to the cloned object. * * Create a copy of @src, and store it in @dst. * * Returns: 0 on success, a negative value if an error occured. */ int idmef_target_clone(idmef_target_t *src, idmef_target_t **dst) { int ret; prelude_return_val_if_fail(src, prelude_error(PRELUDE_ERROR_ASSERTION)); ret = idmef_target_new(dst); if ( ret < 0 ) return ret; return idmef_target_copy(src, *dst); } /** * idmef_target_compare: * @obj1: Object to compare with @obj2. * @obj2: Object to compare with @obj1. * * Compare @obj1 with @obj2. * * Returns: 0 on match, a negative value on comparison failure. */ int idmef_target_compare(const idmef_target_t *obj1, const idmef_target_t *obj2) { int ret = 0; if ( obj1 == NULL && obj2 == NULL ) return 0; else if ( obj1 == NULL || obj2 == NULL ) return -1; ret = prelude_string_compare(obj1->ident, obj2->ident); if ( ret != 0 ) return ret; if ( obj1->decoy != obj2->decoy ) return -1; ret = prelude_string_compare(obj1->interface, obj2->interface); if ( ret != 0 ) return ret; ret = idmef_node_compare(obj1->node, obj2->node); if ( ret != 0 ) return ret; ret = idmef_user_compare(obj1->user, obj2->user); if ( ret != 0 ) return ret; ret = idmef_process_compare(obj1->process, obj2->process); if ( ret != 0 ) return ret; ret = idmef_service_compare(obj1->service, obj2->service); if ( ret != 0 ) return ret; { prelude_list_t *tmp1, *tmp2; idmef_file_t *entry1, *entry2; tmp1 = tmp2 = NULL; do { entry1 = entry2 = NULL; prelude_list_for_each_continue(&obj1->file_list, tmp1) { entry1 = prelude_list_entry(tmp1, idmef_file_t, list); break; } prelude_list_for_each_continue(&obj2->file_list, tmp2) { entry2 = prelude_list_entry(tmp2, idmef_file_t, list); break; } ret = idmef_file_compare(entry1, entry2); if ( ret != 0 ) return ret; } while ( entry1 && entry2 ); } return ret; } /** * idmef_analyzer_new: * @ret: Pointer where to store the created #idmef_analyzer_t object. * * Create a new #idmef_analyzer_t object. * * Returns: 0 on success, a negative value if an error occured. */ int idmef_analyzer_new(idmef_analyzer_t **ret) { *ret = calloc(1, sizeof(**ret)); if ( ! *ret ) return prelude_error_from_errno(errno); prelude_list_init(&(*ret)->list); (*ret)->refcount = 1; return 0; } /** * idmef_analyzer_ref: * @analyzer: pointer to a #idmef_analyzer_t object. * * Increase @analyzer reference count, so that it can be referenced * multiple time. * * Returns: a pointer to @analyzer. */ idmef_analyzer_t *idmef_analyzer_ref(idmef_analyzer_t *analyzer) { prelude_return_val_if_fail(analyzer, NULL); analyzer->refcount++; return analyzer; } int _idmef_analyzer_get_child(void *p, idmef_class_child_id_t child, void **childptr) { idmef_analyzer_t *ptr = p; prelude_return_val_if_fail(p, prelude_error(PRELUDE_ERROR_ASSERTION)); *childptr = NULL; switch ( child ) { case 0: return get_value_from_string((idmef_value_t **) childptr, ptr->analyzerid, TRUE); case 1: return get_value_from_string((idmef_value_t **) childptr, ptr->name, TRUE); case 2: return get_value_from_string((idmef_value_t **) childptr, ptr->manufacturer, TRUE); case 3: return get_value_from_string((idmef_value_t **) childptr, ptr->model, TRUE); case 4: return get_value_from_string((idmef_value_t **) childptr, ptr->version, TRUE); case 5: return get_value_from_string((idmef_value_t **) childptr, ptr->class, TRUE); case 6: return get_value_from_string((idmef_value_t **) childptr, ptr->ostype, TRUE); case 7: return get_value_from_string((idmef_value_t **) childptr, ptr->osversion, TRUE); case 8: *childptr = ptr->node; return 0; case 9: *childptr = ptr->process; return 0; default: return prelude_error(PRELUDE_ERROR_IDMEF_CLASS_UNKNOWN_CHILD); } } int _idmef_analyzer_new_child(void *p, idmef_class_child_id_t child, int n, void **ret) { idmef_analyzer_t *ptr = p; prelude_return_val_if_fail(p, prelude_error(PRELUDE_ERROR_ASSERTION)); switch ( child ) { case 0: return idmef_analyzer_new_analyzerid(ptr, (prelude_string_t **) ret); case 1: return idmef_analyzer_new_name(ptr, (prelude_string_t **) ret); case 2: return idmef_analyzer_new_manufacturer(ptr, (prelude_string_t **) ret); case 3: return idmef_analyzer_new_model(ptr, (prelude_string_t **) ret); case 4: return idmef_analyzer_new_version(ptr, (prelude_string_t **) ret); case 5: return idmef_analyzer_new_class(ptr, (prelude_string_t **) ret); case 6: return idmef_analyzer_new_ostype(ptr, (prelude_string_t **) ret); case 7: return idmef_analyzer_new_osversion(ptr, (prelude_string_t **) ret); case 8: return idmef_analyzer_new_node(ptr, (idmef_node_t **) ret); case 9: return idmef_analyzer_new_process(ptr, (idmef_process_t **) ret); default: return prelude_error(PRELUDE_ERROR_IDMEF_CLASS_UNKNOWN_CHILD); } } int _idmef_analyzer_destroy_child(void *p, idmef_class_child_id_t child, int n) { idmef_analyzer_t *ptr = p; prelude_return_val_if_fail(p, prelude_error(PRELUDE_ERROR_ASSERTION)); switch ( child ) { case 0: if ( ptr->analyzerid ) { prelude_string_destroy(ptr->analyzerid); ptr->analyzerid = NULL; } return 0; case 1: if ( ptr->name ) { prelude_string_destroy(ptr->name); ptr->name = NULL; } return 0; case 2: if ( ptr->manufacturer ) { prelude_string_destroy(ptr->manufacturer); ptr->manufacturer = NULL; } return 0; case 3: if ( ptr->model ) { prelude_string_destroy(ptr->model); ptr->model = NULL; } return 0; case 4: if ( ptr->version ) { prelude_string_destroy(ptr->version); ptr->version = NULL; } return 0; case 5: if ( ptr->class ) { prelude_string_destroy(ptr->class); ptr->class = NULL; } return 0; case 6: if ( ptr->ostype ) { prelude_string_destroy(ptr->ostype); ptr->ostype = NULL; } return 0; case 7: if ( ptr->osversion ) { prelude_string_destroy(ptr->osversion); ptr->osversion = NULL; } return 0; case 8: if ( ptr->node ) { idmef_node_destroy(ptr->node); ptr->node = NULL; } return 0; case 9: if ( ptr->process ) { idmef_process_destroy(ptr->process); ptr->process = NULL; } return 0; default: return prelude_error(PRELUDE_ERROR_IDMEF_CLASS_UNKNOWN_CHILD); } } static void idmef_analyzer_destroy_internal(idmef_analyzer_t *ptr) { prelude_return_if_fail(ptr); if ( ! prelude_list_is_empty(&ptr->list) ) prelude_list_del_init(&ptr->list); if ( ptr->analyzerid ) { prelude_string_destroy(ptr->analyzerid); ptr->analyzerid = NULL; } if ( ptr->name ) { prelude_string_destroy(ptr->name); ptr->name = NULL; } if ( ptr->manufacturer ) { prelude_string_destroy(ptr->manufacturer); ptr->manufacturer = NULL; } if ( ptr->model ) { prelude_string_destroy(ptr->model); ptr->model = NULL; } if ( ptr->version ) { prelude_string_destroy(ptr->version); ptr->version = NULL; } if ( ptr->class ) { prelude_string_destroy(ptr->class); ptr->class = NULL; } if ( ptr->ostype ) { prelude_string_destroy(ptr->ostype); ptr->ostype = NULL; } if ( ptr->osversion ) { prelude_string_destroy(ptr->osversion); ptr->osversion = NULL; } if ( ptr->node ) { idmef_node_destroy(ptr->node); ptr->node = NULL; } if ( ptr->process ) { idmef_process_destroy(ptr->process); ptr->process = NULL; } /* free() should be done by the caller */ } /** * idmef_analyzer_destroy: * @ptr: pointer to a #idmef_analyzer_t object. * * Destroy @ptr and all of it's children. * The objects are only destroyed if their reference count reach zero. */ void idmef_analyzer_destroy(idmef_analyzer_t *ptr) { prelude_return_if_fail(ptr); if ( --ptr->refcount ) return; idmef_analyzer_destroy_internal(ptr); free(ptr); } /** * *idmef_analyzer_get_analyzerid: * @ptr: pointer to a #idmef_analyzer_t object. * * Get analyzerid children of the #idmef_analyzer_t object. * * Returns: a pointer to a prelude_string_t object, or NULL if the children object is not set. */ prelude_string_t *idmef_analyzer_get_analyzerid(idmef_analyzer_t *ptr) { prelude_return_val_if_fail(ptr, 0); /* FIXME */ return ptr->analyzerid; } /** * idmef_analyzer_set_analyzerid: * @ptr: pointer to a #idmef_analyzer_t object. * @analyzerid: pointer to a #prelude_string_t object. * * Set @analyzerid object as a children of @ptr. * if @ptr already contain an @analyzerid object, then it is destroyed, * and updated to point to the provided @analyzerid object. */ void idmef_analyzer_set_analyzerid(idmef_analyzer_t *ptr, prelude_string_t *analyzerid) { prelude_return_if_fail(ptr); if ( ptr->analyzerid ) prelude_string_destroy(ptr->analyzerid); ptr->analyzerid = analyzerid; } /** * idmef_analyzer_new_analyzerid: * @ptr: pointer to a #idmef_analyzer_t object. * @ret: pointer to an address where to store the created #prelude_string_t object. * * Create a new analyzerid object, children of #idmef_analyzer_t. * If @ptr already contain a #prelude_string_t object, then it is destroyed. * * Returns: 0 on success, or a negative value if an error occured. */ int idmef_analyzer_new_analyzerid(idmef_analyzer_t *ptr, prelude_string_t **ret) { int retval; prelude_return_val_if_fail(ptr, prelude_error(PRELUDE_ERROR_ASSERTION)); if ( ! ptr->analyzerid ) { retval = prelude_string_new(&ptr->analyzerid); if ( retval < 0 ) return retval; } *ret = ptr->analyzerid; return 0; } /** * *idmef_analyzer_get_name: * @ptr: pointer to a #idmef_analyzer_t object. * * Get name children of the #idmef_analyzer_t object. * * Returns: a pointer to a prelude_string_t object, or NULL if the children object is not set. */ prelude_string_t *idmef_analyzer_get_name(idmef_analyzer_t *ptr) { prelude_return_val_if_fail(ptr, 0); /* FIXME */ return ptr->name; } /** * idmef_analyzer_set_name: * @ptr: pointer to a #idmef_analyzer_t object. * @name: pointer to a #prelude_string_t object. * * Set @name object as a children of @ptr. * if @ptr already contain an @name object, then it is destroyed, * and updated to point to the provided @name object. */ void idmef_analyzer_set_name(idmef_analyzer_t *ptr, prelude_string_t *name) { prelude_return_if_fail(ptr); if ( ptr->name ) prelude_string_destroy(ptr->name); ptr->name = name; } /** * idmef_analyzer_new_name: * @ptr: pointer to a #idmef_analyzer_t object. * @ret: pointer to an address where to store the created #prelude_string_t object. * * Create a new name object, children of #idmef_analyzer_t. * If @ptr already contain a #prelude_string_t object, then it is destroyed. * * Returns: 0 on success, or a negative value if an error occured. */ int idmef_analyzer_new_name(idmef_analyzer_t *ptr, prelude_string_t **ret) { int retval; prelude_return_val_if_fail(ptr, prelude_error(PRELUDE_ERROR_ASSERTION)); if ( ! ptr->name ) { retval = prelude_string_new(&ptr->name); if ( retval < 0 ) return retval; } *ret = ptr->name; return 0; } /** * *idmef_analyzer_get_manufacturer: * @ptr: pointer to a #idmef_analyzer_t object. * * Get manufacturer children of the #idmef_analyzer_t object. * * Returns: a pointer to a prelude_string_t object, or NULL if the children object is not set. */ prelude_string_t *idmef_analyzer_get_manufacturer(idmef_analyzer_t *ptr) { prelude_return_val_if_fail(ptr, 0); /* FIXME */ return ptr->manufacturer; } /** * idmef_analyzer_set_manufacturer: * @ptr: pointer to a #idmef_analyzer_t object. * @manufacturer: pointer to a #prelude_string_t object. * * Set @manufacturer object as a children of @ptr. * if @ptr already contain an @manufacturer object, then it is destroyed, * and updated to point to the provided @manufacturer object. */ void idmef_analyzer_set_manufacturer(idmef_analyzer_t *ptr, prelude_string_t *manufacturer) { prelude_return_if_fail(ptr); if ( ptr->manufacturer ) prelude_string_destroy(ptr->manufacturer); ptr->manufacturer = manufacturer; } /** * idmef_analyzer_new_manufacturer: * @ptr: pointer to a #idmef_analyzer_t object. * @ret: pointer to an address where to store the created #prelude_string_t object. * * Create a new manufacturer object, children of #idmef_analyzer_t. * If @ptr already contain a #prelude_string_t object, then it is destroyed. * * Returns: 0 on success, or a negative value if an error occured. */ int idmef_analyzer_new_manufacturer(idmef_analyzer_t *ptr, prelude_string_t **ret) { int retval; prelude_return_val_if_fail(ptr, prelude_error(PRELUDE_ERROR_ASSERTION)); if ( ! ptr->manufacturer ) { retval = prelude_string_new(&ptr->manufacturer); if ( retval < 0 ) return retval; } *ret = ptr->manufacturer; return 0; } /** * *idmef_analyzer_get_model: * @ptr: pointer to a #idmef_analyzer_t object. * * Get model children of the #idmef_analyzer_t object. * * Returns: a pointer to a prelude_string_t object, or NULL if the children object is not set. */ prelude_string_t *idmef_analyzer_get_model(idmef_analyzer_t *ptr) { prelude_return_val_if_fail(ptr, 0); /* FIXME */ return ptr->model; } /** * idmef_analyzer_set_model: * @ptr: pointer to a #idmef_analyzer_t object. * @model: pointer to a #prelude_string_t object. * * Set @model object as a children of @ptr. * if @ptr already contain an @model object, then it is destroyed, * and updated to point to the provided @model object. */ void idmef_analyzer_set_model(idmef_analyzer_t *ptr, prelude_string_t *model) { prelude_return_if_fail(ptr); if ( ptr->model ) prelude_string_destroy(ptr->model); ptr->model = model; } /** * idmef_analyzer_new_model: * @ptr: pointer to a #idmef_analyzer_t object. * @ret: pointer to an address where to store the created #prelude_string_t object. * * Create a new model object, children of #idmef_analyzer_t. * If @ptr already contain a #prelude_string_t object, then it is destroyed. * * Returns: 0 on success, or a negative value if an error occured. */ int idmef_analyzer_new_model(idmef_analyzer_t *ptr, prelude_string_t **ret) { int retval; prelude_return_val_if_fail(ptr, prelude_error(PRELUDE_ERROR_ASSERTION)); if ( ! ptr->model ) { retval = prelude_string_new(&ptr->model); if ( retval < 0 ) return retval; } *ret = ptr->model; return 0; } /** * *idmef_analyzer_get_version: * @ptr: pointer to a #idmef_analyzer_t object. * * Get version children of the #idmef_analyzer_t object. * * Returns: a pointer to a prelude_string_t object, or NULL if the children object is not set. */ prelude_string_t *idmef_analyzer_get_version(idmef_analyzer_t *ptr) { prelude_return_val_if_fail(ptr, 0); /* FIXME */ return ptr->version; } /** * idmef_analyzer_set_version: * @ptr: pointer to a #idmef_analyzer_t object. * @version: pointer to a #prelude_string_t object. * * Set @version object as a children of @ptr. * if @ptr already contain an @version object, then it is destroyed, * and updated to point to the provided @version object. */ void idmef_analyzer_set_version(idmef_analyzer_t *ptr, prelude_string_t *version) { prelude_return_if_fail(ptr); if ( ptr->version ) prelude_string_destroy(ptr->version); ptr->version = version; } /** * idmef_analyzer_new_version: * @ptr: pointer to a #idmef_analyzer_t object. * @ret: pointer to an address where to store the created #prelude_string_t object. * * Create a new version object, children of #idmef_analyzer_t. * If @ptr already contain a #prelude_string_t object, then it is destroyed. * * Returns: 0 on success, or a negative value if an error occured. */ int idmef_analyzer_new_version(idmef_analyzer_t *ptr, prelude_string_t **ret) { int retval; prelude_return_val_if_fail(ptr, prelude_error(PRELUDE_ERROR_ASSERTION)); if ( ! ptr->version ) { retval = prelude_string_new(&ptr->version); if ( retval < 0 ) return retval; } *ret = ptr->version; return 0; } /** * *idmef_analyzer_get_class: * @ptr: pointer to a #idmef_analyzer_t object. * * Get class children of the #idmef_analyzer_t object. * * Returns: a pointer to a prelude_string_t object, or NULL if the children object is not set. */ prelude_string_t *idmef_analyzer_get_class(idmef_analyzer_t *ptr) { prelude_return_val_if_fail(ptr, 0); /* FIXME */ return ptr->class; } /** * idmef_analyzer_set_class: * @ptr: pointer to a #idmef_analyzer_t object. * @class_str: pointer to a #prelude_string_t object. * * Set @class_str object as a children of @ptr. * if @ptr already contain an @class_str object, then it is destroyed, * and updated to point to the provided @class_str object. */ void idmef_analyzer_set_class(idmef_analyzer_t *ptr, prelude_string_t *class_str) { prelude_return_if_fail(ptr); if ( ptr->class ) prelude_string_destroy(ptr->class); ptr->class = class_str; } /** * idmef_analyzer_new_class: * @ptr: pointer to a #idmef_analyzer_t object. * @ret: pointer to an address where to store the created #prelude_string_t object. * * Create a new class object, children of #idmef_analyzer_t. * If @ptr already contain a #prelude_string_t object, then it is destroyed. * * Returns: 0 on success, or a negative value if an error occured. */ int idmef_analyzer_new_class(idmef_analyzer_t *ptr, prelude_string_t **ret) { int retval; prelude_return_val_if_fail(ptr, prelude_error(PRELUDE_ERROR_ASSERTION)); if ( ! ptr->class ) { retval = prelude_string_new(&ptr->class); if ( retval < 0 ) return retval; } *ret = ptr->class; return 0; } /** * *idmef_analyzer_get_ostype: * @ptr: pointer to a #idmef_analyzer_t object. * * Get ostype children of the #idmef_analyzer_t object. * * Returns: a pointer to a prelude_string_t object, or NULL if the children object is not set. */ prelude_string_t *idmef_analyzer_get_ostype(idmef_analyzer_t *ptr) { prelude_return_val_if_fail(ptr, 0); /* FIXME */ return ptr->ostype; } /** * idmef_analyzer_set_ostype: * @ptr: pointer to a #idmef_analyzer_t object. * @ostype: pointer to a #prelude_string_t object. * * Set @ostype object as a children of @ptr. * if @ptr already contain an @ostype object, then it is destroyed, * and updated to point to the provided @ostype object. */ void idmef_analyzer_set_ostype(idmef_analyzer_t *ptr, prelude_string_t *ostype) { prelude_return_if_fail(ptr); if ( ptr->ostype ) prelude_string_destroy(ptr->ostype); ptr->ostype = ostype; } /** * idmef_analyzer_new_ostype: * @ptr: pointer to a #idmef_analyzer_t object. * @ret: pointer to an address where to store the created #prelude_string_t object. * * Create a new ostype object, children of #idmef_analyzer_t. * If @ptr already contain a #prelude_string_t object, then it is destroyed. * * Returns: 0 on success, or a negative value if an error occured. */ int idmef_analyzer_new_ostype(idmef_analyzer_t *ptr, prelude_string_t **ret) { int retval; prelude_return_val_if_fail(ptr, prelude_error(PRELUDE_ERROR_ASSERTION)); if ( ! ptr->ostype ) { retval = prelude_string_new(&ptr->ostype); if ( retval < 0 ) return retval; } *ret = ptr->ostype; return 0; } /** * *idmef_analyzer_get_osversion: * @ptr: pointer to a #idmef_analyzer_t object. * * Get osversion children of the #idmef_analyzer_t object. * * Returns: a pointer to a prelude_string_t object, or NULL if the children object is not set. */ prelude_string_t *idmef_analyzer_get_osversion(idmef_analyzer_t *ptr) { prelude_return_val_if_fail(ptr, 0); /* FIXME */ return ptr->osversion; } /** * idmef_analyzer_set_osversion: * @ptr: pointer to a #idmef_analyzer_t object. * @osversion: pointer to a #prelude_string_t object. * * Set @osversion object as a children of @ptr. * if @ptr already contain an @osversion object, then it is destroyed, * and updated to point to the provided @osversion object. */ void idmef_analyzer_set_osversion(idmef_analyzer_t *ptr, prelude_string_t *osversion) { prelude_return_if_fail(ptr); if ( ptr->osversion ) prelude_string_destroy(ptr->osversion); ptr->osversion = osversion; } /** * idmef_analyzer_new_osversion: * @ptr: pointer to a #idmef_analyzer_t object. * @ret: pointer to an address where to store the created #prelude_string_t object. * * Create a new osversion object, children of #idmef_analyzer_t. * If @ptr already contain a #prelude_string_t object, then it is destroyed. * * Returns: 0 on success, or a negative value if an error occured. */ int idmef_analyzer_new_osversion(idmef_analyzer_t *ptr, prelude_string_t **ret) { int retval; prelude_return_val_if_fail(ptr, prelude_error(PRELUDE_ERROR_ASSERTION)); if ( ! ptr->osversion ) { retval = prelude_string_new(&ptr->osversion); if ( retval < 0 ) return retval; } *ret = ptr->osversion; return 0; } /** * *idmef_analyzer_get_node: * @ptr: pointer to a #idmef_analyzer_t object. * * Get node children of the #idmef_analyzer_t object. * * Returns: a pointer to a idmef_node_t object, or NULL if the children object is not set. */ idmef_node_t *idmef_analyzer_get_node(idmef_analyzer_t *ptr) { prelude_return_val_if_fail(ptr, 0); /* FIXME */ return ptr->node; } /** * idmef_analyzer_set_node: * @ptr: pointer to a #idmef_analyzer_t object. * @node: pointer to a #idmef_node_t object. * * Set @node object as a children of @ptr. * if @ptr already contain an @node object, then it is destroyed, * and updated to point to the provided @node object. */ void idmef_analyzer_set_node(idmef_analyzer_t *ptr, idmef_node_t *node) { prelude_return_if_fail(ptr); if ( ptr->node ) idmef_node_destroy(ptr->node); ptr->node = node; } /** * idmef_analyzer_new_node: * @ptr: pointer to a #idmef_analyzer_t object. * @ret: pointer to an address where to store the created #idmef_node_t object. * * Create a new node object, children of #idmef_analyzer_t. * If @ptr already contain a #idmef_node_t object, then it is destroyed. * * Returns: 0 on success, or a negative value if an error occured. */ int idmef_analyzer_new_node(idmef_analyzer_t *ptr, idmef_node_t **ret) { int retval; prelude_return_val_if_fail(ptr, prelude_error(PRELUDE_ERROR_ASSERTION)); if ( ! ptr->node ) { retval = idmef_node_new(&ptr->node); if ( retval < 0 ) return retval; } *ret = ptr->node; return 0; } /** * *idmef_analyzer_get_process: * @ptr: pointer to a #idmef_analyzer_t object. * * Get process children of the #idmef_analyzer_t object. * * Returns: a pointer to a idmef_process_t object, or NULL if the children object is not set. */ idmef_process_t *idmef_analyzer_get_process(idmef_analyzer_t *ptr) { prelude_return_val_if_fail(ptr, 0); /* FIXME */ return ptr->process; } /** * idmef_analyzer_set_process: * @ptr: pointer to a #idmef_analyzer_t object. * @process: pointer to a #idmef_process_t object. * * Set @process object as a children of @ptr. * if @ptr already contain an @process object, then it is destroyed, * and updated to point to the provided @process object. */ void idmef_analyzer_set_process(idmef_analyzer_t *ptr, idmef_process_t *process) { prelude_return_if_fail(ptr); if ( ptr->process ) idmef_process_destroy(ptr->process); ptr->process = process; } /** * idmef_analyzer_new_process: * @ptr: pointer to a #idmef_analyzer_t object. * @ret: pointer to an address where to store the created #idmef_process_t object. * * Create a new process object, children of #idmef_analyzer_t. * If @ptr already contain a #idmef_process_t object, then it is destroyed. * * Returns: 0 on success, or a negative value if an error occured. */ int idmef_analyzer_new_process(idmef_analyzer_t *ptr, idmef_process_t **ret) { int retval; prelude_return_val_if_fail(ptr, prelude_error(PRELUDE_ERROR_ASSERTION)); if ( ! ptr->process ) { retval = idmef_process_new(&ptr->process); if ( retval < 0 ) return retval; } *ret = ptr->process; return 0; } /** * idmef_analyzer_copy: * @src: Source of the copy. * @dst: Where to copy the object. * * Copy a new #idmef_analyzer_t object from @src to @dst. * * Returns: 0 on success, a negative value if an error occured. */ int idmef_analyzer_copy(const idmef_analyzer_t *src, idmef_analyzer_t *dst) { int ret; prelude_return_val_if_fail(src, prelude_error(PRELUDE_ERROR_ASSERTION)); prelude_return_val_if_fail(dst, prelude_error(PRELUDE_ERROR_ASSERTION)); ret = 0; if ( src->analyzerid ) { ret = prelude_string_clone(src->analyzerid, &dst->analyzerid); if ( ret < 0 ) return ret; } if ( src->name ) { ret = prelude_string_clone(src->name, &dst->name); if ( ret < 0 ) return ret; } if ( src->manufacturer ) { ret = prelude_string_clone(src->manufacturer, &dst->manufacturer); if ( ret < 0 ) return ret; } if ( src->model ) { ret = prelude_string_clone(src->model, &dst->model); if ( ret < 0 ) return ret; } if ( src->version ) { ret = prelude_string_clone(src->version, &dst->version); if ( ret < 0 ) return ret; } if ( src->class ) { ret = prelude_string_clone(src->class, &dst->class); if ( ret < 0 ) return ret; } if ( src->ostype ) { ret = prelude_string_clone(src->ostype, &dst->ostype); if ( ret < 0 ) return ret; } if ( src->osversion ) { ret = prelude_string_clone(src->osversion, &dst->osversion); if ( ret < 0 ) return ret; } if ( src->node ) { ret = idmef_node_clone(src->node, &dst->node); if ( ret < 0 ) return ret; } if ( src->process ) { ret = idmef_process_clone(src->process, &dst->process); if ( ret < 0 ) return ret; } return 0; } /** * idmef_analyzer_clone: * @src: Object to be cloned. * @dst: Address where to store the pointer to the cloned object. * * Create a copy of @src, and store it in @dst. * * Returns: 0 on success, a negative value if an error occured. */ int idmef_analyzer_clone(idmef_analyzer_t *src, idmef_analyzer_t **dst) { int ret; prelude_return_val_if_fail(src, prelude_error(PRELUDE_ERROR_ASSERTION)); ret = idmef_analyzer_new(dst); if ( ret < 0 ) return ret; return idmef_analyzer_copy(src, *dst); } /** * idmef_analyzer_compare: * @obj1: Object to compare with @obj2. * @obj2: Object to compare with @obj1. * * Compare @obj1 with @obj2. * * Returns: 0 on match, a negative value on comparison failure. */ int idmef_analyzer_compare(const idmef_analyzer_t *obj1, const idmef_analyzer_t *obj2) { int ret = 0; if ( obj1 == NULL && obj2 == NULL ) return 0; else if ( obj1 == NULL || obj2 == NULL ) return -1; ret = prelude_string_compare(obj1->analyzerid, obj2->analyzerid); if ( ret != 0 ) return ret; ret = prelude_string_compare(obj1->name, obj2->name); if ( ret != 0 ) return ret; ret = prelude_string_compare(obj1->manufacturer, obj2->manufacturer); if ( ret != 0 ) return ret; ret = prelude_string_compare(obj1->model, obj2->model); if ( ret != 0 ) return ret; ret = prelude_string_compare(obj1->version, obj2->version); if ( ret != 0 ) return ret; ret = prelude_string_compare(obj1->class, obj2->class); if ( ret != 0 ) return ret; ret = prelude_string_compare(obj1->ostype, obj2->ostype); if ( ret != 0 ) return ret; ret = prelude_string_compare(obj1->osversion, obj2->osversion); if ( ret != 0 ) return ret; ret = idmef_node_compare(obj1->node, obj2->node); if ( ret != 0 ) return ret; ret = idmef_process_compare(obj1->process, obj2->process); if ( ret != 0 ) return ret; return ret; } /** * idmef_alertident_new: * @ret: Pointer where to store the created #idmef_alertident_t object. * * Create a new #idmef_alertident_t object. * * Returns: 0 on success, a negative value if an error occured. */ int idmef_alertident_new(idmef_alertident_t **ret) { *ret = calloc(1, sizeof(**ret)); if ( ! *ret ) return prelude_error_from_errno(errno); prelude_list_init(&(*ret)->list); (*ret)->refcount = 1; { int retval = prelude_string_new(&(*ret)->alertident); if ( retval < 0 ) { idmef_alertident_destroy(*ret); *ret = NULL; return retval; } } return 0; } /** * idmef_alertident_ref: * @alertident: pointer to a #idmef_alertident_t object. * * Increase @alertident reference count, so that it can be referenced * multiple time. * * Returns: a pointer to @alertident. */ idmef_alertident_t *idmef_alertident_ref(idmef_alertident_t *alertident) { prelude_return_val_if_fail(alertident, NULL); alertident->refcount++; return alertident; } int _idmef_alertident_get_child(void *p, idmef_class_child_id_t child, void **childptr) { idmef_alertident_t *ptr = p; prelude_return_val_if_fail(p, prelude_error(PRELUDE_ERROR_ASSERTION)); *childptr = NULL; switch ( child ) { case 0: return get_value_from_string((idmef_value_t **) childptr, ptr->alertident, TRUE); case 1: return get_value_from_string((idmef_value_t **) childptr, ptr->analyzerid, TRUE); default: return prelude_error(PRELUDE_ERROR_IDMEF_CLASS_UNKNOWN_CHILD); } } int _idmef_alertident_new_child(void *p, idmef_class_child_id_t child, int n, void **ret) { idmef_alertident_t *ptr = p; prelude_return_val_if_fail(p, prelude_error(PRELUDE_ERROR_ASSERTION)); switch ( child ) { case 0: return idmef_alertident_new_alertident(ptr, (prelude_string_t **) ret); case 1: return idmef_alertident_new_analyzerid(ptr, (prelude_string_t **) ret); default: return prelude_error(PRELUDE_ERROR_IDMEF_CLASS_UNKNOWN_CHILD); } } int _idmef_alertident_destroy_child(void *p, idmef_class_child_id_t child, int n) { idmef_alertident_t *ptr = p; prelude_return_val_if_fail(p, prelude_error(PRELUDE_ERROR_ASSERTION)); switch ( child ) { case 0: if ( ptr->alertident ) { prelude_string_destroy(ptr->alertident); ptr->alertident = NULL; } return 0; case 1: if ( ptr->analyzerid ) { prelude_string_destroy(ptr->analyzerid); ptr->analyzerid = NULL; } return 0; default: return prelude_error(PRELUDE_ERROR_IDMEF_CLASS_UNKNOWN_CHILD); } } static void idmef_alertident_destroy_internal(idmef_alertident_t *ptr) { prelude_return_if_fail(ptr); if ( ! prelude_list_is_empty(&ptr->list) ) prelude_list_del_init(&ptr->list); if ( ptr->alertident ) { prelude_string_destroy(ptr->alertident); ptr->alertident = NULL; } if ( ptr->analyzerid ) { prelude_string_destroy(ptr->analyzerid); ptr->analyzerid = NULL; } /* free() should be done by the caller */ } /** * idmef_alertident_destroy: * @ptr: pointer to a #idmef_alertident_t object. * * Destroy @ptr and all of it's children. * The objects are only destroyed if their reference count reach zero. */ void idmef_alertident_destroy(idmef_alertident_t *ptr) { prelude_return_if_fail(ptr); if ( --ptr->refcount ) return; idmef_alertident_destroy_internal(ptr); free(ptr); } /** * *idmef_alertident_get_alertident: * @ptr: pointer to a #idmef_alertident_t object. * * Get alertident children of the #idmef_alertident_t object. * * Returns: a pointer to a prelude_string_t object, or NULL if the children object is not set. */ prelude_string_t *idmef_alertident_get_alertident(idmef_alertident_t *ptr) { prelude_return_val_if_fail(ptr, 0); /* FIXME */ return ptr->alertident; } /** * idmef_alertident_set_alertident: * @ptr: pointer to a #idmef_alertident_t object. * @alertident: pointer to a #prelude_string_t object. * * Set @alertident object as a children of @ptr. * if @ptr already contain an @alertident object, then it is destroyed, * and updated to point to the provided @alertident object. */ void idmef_alertident_set_alertident(idmef_alertident_t *ptr, prelude_string_t *alertident) { prelude_return_if_fail(ptr); if ( ptr->alertident ) prelude_string_destroy(ptr->alertident); ptr->alertident = alertident; } /** * idmef_alertident_new_alertident: * @ptr: pointer to a #idmef_alertident_t object. * @ret: pointer to an address where to store the created #prelude_string_t object. * * Create a new alertident object, children of #idmef_alertident_t. * If @ptr already contain a #prelude_string_t object, then it is destroyed. * * Returns: 0 on success, or a negative value if an error occured. */ int idmef_alertident_new_alertident(idmef_alertident_t *ptr, prelude_string_t **ret) { int retval; prelude_return_val_if_fail(ptr, prelude_error(PRELUDE_ERROR_ASSERTION)); if ( ! ptr->alertident ) { retval = prelude_string_new(&ptr->alertident); if ( retval < 0 ) return retval; } *ret = ptr->alertident; return 0; } /** * *idmef_alertident_get_analyzerid: * @ptr: pointer to a #idmef_alertident_t object. * * Get analyzerid children of the #idmef_alertident_t object. * * Returns: a pointer to a prelude_string_t object, or NULL if the children object is not set. */ prelude_string_t *idmef_alertident_get_analyzerid(idmef_alertident_t *ptr) { prelude_return_val_if_fail(ptr, 0); /* FIXME */ return ptr->analyzerid; } /** * idmef_alertident_set_analyzerid: * @ptr: pointer to a #idmef_alertident_t object. * @analyzerid: pointer to a #prelude_string_t object. * * Set @analyzerid object as a children of @ptr. * if @ptr already contain an @analyzerid object, then it is destroyed, * and updated to point to the provided @analyzerid object. */ void idmef_alertident_set_analyzerid(idmef_alertident_t *ptr, prelude_string_t *analyzerid) { prelude_return_if_fail(ptr); if ( ptr->analyzerid ) prelude_string_destroy(ptr->analyzerid); ptr->analyzerid = analyzerid; } /** * idmef_alertident_new_analyzerid: * @ptr: pointer to a #idmef_alertident_t object. * @ret: pointer to an address where to store the created #prelude_string_t object. * * Create a new analyzerid object, children of #idmef_alertident_t. * If @ptr already contain a #prelude_string_t object, then it is destroyed. * * Returns: 0 on success, or a negative value if an error occured. */ int idmef_alertident_new_analyzerid(idmef_alertident_t *ptr, prelude_string_t **ret) { int retval; prelude_return_val_if_fail(ptr, prelude_error(PRELUDE_ERROR_ASSERTION)); if ( ! ptr->analyzerid ) { retval = prelude_string_new(&ptr->analyzerid); if ( retval < 0 ) return retval; } *ret = ptr->analyzerid; return 0; } /** * idmef_alertident_copy: * @src: Source of the copy. * @dst: Where to copy the object. * * Copy a new #idmef_alertident_t object from @src to @dst. * * Returns: 0 on success, a negative value if an error occured. */ int idmef_alertident_copy(const idmef_alertident_t *src, idmef_alertident_t *dst) { int ret; prelude_return_val_if_fail(src, prelude_error(PRELUDE_ERROR_ASSERTION)); prelude_return_val_if_fail(dst, prelude_error(PRELUDE_ERROR_ASSERTION)); ret = 0; if ( src->alertident ) { ret = prelude_string_copy(src->alertident, dst->alertident); if ( ret < 0 ) return ret; } if ( src->analyzerid ) { ret = prelude_string_clone(src->analyzerid, &dst->analyzerid); if ( ret < 0 ) return ret; } return 0; } /** * idmef_alertident_clone: * @src: Object to be cloned. * @dst: Address where to store the pointer to the cloned object. * * Create a copy of @src, and store it in @dst. * * Returns: 0 on success, a negative value if an error occured. */ int idmef_alertident_clone(idmef_alertident_t *src, idmef_alertident_t **dst) { int ret; prelude_return_val_if_fail(src, prelude_error(PRELUDE_ERROR_ASSERTION)); ret = idmef_alertident_new(dst); if ( ret < 0 ) return ret; return idmef_alertident_copy(src, *dst); } /** * idmef_alertident_compare: * @obj1: Object to compare with @obj2. * @obj2: Object to compare with @obj1. * * Compare @obj1 with @obj2. * * Returns: 0 on match, a negative value on comparison failure. */ int idmef_alertident_compare(const idmef_alertident_t *obj1, const idmef_alertident_t *obj2) { int ret = 0; if ( obj1 == NULL && obj2 == NULL ) return 0; else if ( obj1 == NULL || obj2 == NULL ) return -1; ret = prelude_string_compare(obj1->alertident, obj2->alertident); if ( ret != 0 ) return ret; ret = prelude_string_compare(obj1->analyzerid, obj2->analyzerid); if ( ret != 0 ) return ret; return ret; } /** * idmef_impact_new: * @ret: Pointer where to store the created #idmef_impact_t object. * * Create a new #idmef_impact_t object. * * Returns: 0 on success, a negative value if an error occured. */ int idmef_impact_new(idmef_impact_t **ret) { *ret = calloc(1, sizeof(**ret)); if ( ! *ret ) return prelude_error_from_errno(errno); (*ret)->refcount = 1; return 0; } /** * idmef_impact_ref: * @impact: pointer to a #idmef_impact_t object. * * Increase @impact reference count, so that it can be referenced * multiple time. * * Returns: a pointer to @impact. */ idmef_impact_t *idmef_impact_ref(idmef_impact_t *impact) { prelude_return_val_if_fail(impact, NULL); impact->refcount++; return impact; } int _idmef_impact_get_child(void *p, idmef_class_child_id_t child, void **childptr) { idmef_impact_t *ptr = p; prelude_return_val_if_fail(p, prelude_error(PRELUDE_ERROR_ASSERTION)); *childptr = NULL; switch ( child ) { case 0: if ( ! ptr->severity_is_set ) return 0; return idmef_value_new_enum_from_numeric((idmef_value_t **) childptr, IDMEF_CLASS_ID_IMPACT_SEVERITY, ptr->severity); case 1: if ( ! ptr->completion_is_set ) return 0; return idmef_value_new_enum_from_numeric((idmef_value_t **) childptr, IDMEF_CLASS_ID_IMPACT_COMPLETION, ptr->completion); case 2: return idmef_value_new_enum_from_numeric((idmef_value_t **) childptr, IDMEF_CLASS_ID_IMPACT_TYPE, ptr->type); case 3: return get_value_from_string((idmef_value_t **) childptr, ptr->description, TRUE); default: return prelude_error(PRELUDE_ERROR_IDMEF_CLASS_UNKNOWN_CHILD); } } int _idmef_impact_new_child(void *p, idmef_class_child_id_t child, int n, void **ret) { idmef_impact_t *ptr = p; prelude_return_val_if_fail(p, prelude_error(PRELUDE_ERROR_ASSERTION)); switch ( child ) { case 0: return idmef_impact_new_severity(ptr, (idmef_impact_severity_t **) ret); case 1: return idmef_impact_new_completion(ptr, (idmef_impact_completion_t **) ret); case 2: return idmef_impact_new_type(ptr, (idmef_impact_type_t **) ret); case 3: return idmef_impact_new_description(ptr, (prelude_string_t **) ret); default: return prelude_error(PRELUDE_ERROR_IDMEF_CLASS_UNKNOWN_CHILD); } } int _idmef_impact_destroy_child(void *p, idmef_class_child_id_t child, int n) { idmef_impact_t *ptr = p; prelude_return_val_if_fail(p, prelude_error(PRELUDE_ERROR_ASSERTION)); switch ( child ) { case 0: ptr->severity_is_set = 0; return 0; case 1: ptr->completion_is_set = 0; return 0; case 2: ptr->type = 0; return 0; case 3: if ( ptr->description ) { prelude_string_destroy(ptr->description); ptr->description = NULL; } return 0; default: return prelude_error(PRELUDE_ERROR_IDMEF_CLASS_UNKNOWN_CHILD); } } static void idmef_impact_destroy_internal(idmef_impact_t *ptr) { prelude_return_if_fail(ptr); if ( ptr->description ) { prelude_string_destroy(ptr->description); ptr->description = NULL; } /* free() should be done by the caller */ } /** * idmef_impact_destroy: * @ptr: pointer to a #idmef_impact_t object. * * Destroy @ptr and all of it's children. * The objects are only destroyed if their reference count reach zero. */ void idmef_impact_destroy(idmef_impact_t *ptr) { prelude_return_if_fail(ptr); if ( --ptr->refcount ) return; idmef_impact_destroy_internal(ptr); free(ptr); } /** * *idmef_impact_get_severity: * @ptr: pointer to a #idmef_impact_t object. * * Get severity children of the #idmef_impact_t object. * * Returns: a pointer to a idmef_impact_severity_t object, or NULL if the children object is not set. */ idmef_impact_severity_t *idmef_impact_get_severity(idmef_impact_t *ptr) { prelude_return_val_if_fail(ptr, 0); /* FIXME */ return ptr->severity_is_set ? &ptr->severity : NULL; } /** * idmef_impact_set_severity: * @ptr: pointer to a #idmef_impact_t object. * @severity: pointer to a #idmef_impact_severity_t object. * * Set @severity object as a children of @ptr. * if @ptr already contain an @severity object, then it is destroyed, * and updated to point to the provided @severity object. */ void idmef_impact_set_severity(idmef_impact_t *ptr, idmef_impact_severity_t severity) { prelude_return_if_fail(ptr); ptr->severity = severity; ptr->severity_is_set = 1; } void idmef_impact_unset_severity(idmef_impact_t *ptr) { prelude_return_if_fail(ptr); ptr->severity_is_set = 0; } /** * idmef_impact_new_severity: * @ptr: pointer to a #idmef_impact_t object. * @ret: pointer to an address where to store the created #idmef_impact_severity_t object. * * Create a new severity object, children of #idmef_impact_t. * If @ptr already contain a #idmef_impact_severity_t object, then it is destroyed. * * Returns: 0 on success, or a negative value if an error occured. */ int idmef_impact_new_severity(idmef_impact_t *ptr, idmef_impact_severity_t **ret) { prelude_return_val_if_fail(ptr, prelude_error(PRELUDE_ERROR_ASSERTION)); ptr->severity_is_set = 1; *ret = &ptr->severity; return 0; } /** * *idmef_impact_get_completion: * @ptr: pointer to a #idmef_impact_t object. * * Get completion children of the #idmef_impact_t object. * * Returns: a pointer to a idmef_impact_completion_t object, or NULL if the children object is not set. */ idmef_impact_completion_t *idmef_impact_get_completion(idmef_impact_t *ptr) { prelude_return_val_if_fail(ptr, 0); /* FIXME */ return ptr->completion_is_set ? &ptr->completion : NULL; } /** * idmef_impact_set_completion: * @ptr: pointer to a #idmef_impact_t object. * @completion: pointer to a #idmef_impact_completion_t object. * * Set @completion object as a children of @ptr. * if @ptr already contain an @completion object, then it is destroyed, * and updated to point to the provided @completion object. */ void idmef_impact_set_completion(idmef_impact_t *ptr, idmef_impact_completion_t completion) { prelude_return_if_fail(ptr); ptr->completion = completion; ptr->completion_is_set = 1; } void idmef_impact_unset_completion(idmef_impact_t *ptr) { prelude_return_if_fail(ptr); ptr->completion_is_set = 0; } /** * idmef_impact_new_completion: * @ptr: pointer to a #idmef_impact_t object. * @ret: pointer to an address where to store the created #idmef_impact_completion_t object. * * Create a new completion object, children of #idmef_impact_t. * If @ptr already contain a #idmef_impact_completion_t object, then it is destroyed. * * Returns: 0 on success, or a negative value if an error occured. */ int idmef_impact_new_completion(idmef_impact_t *ptr, idmef_impact_completion_t **ret) { prelude_return_val_if_fail(ptr, prelude_error(PRELUDE_ERROR_ASSERTION)); ptr->completion_is_set = 1; *ret = &ptr->completion; return 0; } /** * idmef_impact_get_type: * @ptr: pointer to a #idmef_impact_t object. * * Get type children of the #idmef_impact_t object. * * Returns: a pointer to a idmef_impact_type_t object, or NULL if the children object is not set. */ idmef_impact_type_t idmef_impact_get_type(idmef_impact_t *ptr) { prelude_return_val_if_fail(ptr, 0); /* FIXME */ return ptr->type; } /** * idmef_impact_set_type: * @ptr: pointer to a #idmef_impact_t object. * @type: pointer to a #idmef_impact_type_t object. * * Set @type object as a children of @ptr. * if @ptr already contain an @type object, then it is destroyed, * and updated to point to the provided @type object. */ void idmef_impact_set_type(idmef_impact_t *ptr, idmef_impact_type_t type) { prelude_return_if_fail(ptr); ptr->type = type; } /** * idmef_impact_new_type: * @ptr: pointer to a #idmef_impact_t object. * @ret: pointer to an address where to store the created #idmef_impact_type_t object. * * Create a new type object, children of #idmef_impact_t. * If @ptr already contain a #idmef_impact_type_t object, then it is destroyed. * * Returns: 0 on success, or a negative value if an error occured. */ int idmef_impact_new_type(idmef_impact_t *ptr, idmef_impact_type_t **ret) { prelude_return_val_if_fail(ptr, prelude_error(PRELUDE_ERROR_ASSERTION)); *ret = &ptr->type; return 0; } /** * *idmef_impact_get_description: * @ptr: pointer to a #idmef_impact_t object. * * Get description children of the #idmef_impact_t object. * * Returns: a pointer to a prelude_string_t object, or NULL if the children object is not set. */ prelude_string_t *idmef_impact_get_description(idmef_impact_t *ptr) { prelude_return_val_if_fail(ptr, 0); /* FIXME */ return ptr->description; } /** * idmef_impact_set_description: * @ptr: pointer to a #idmef_impact_t object. * @description: pointer to a #prelude_string_t object. * * Set @description object as a children of @ptr. * if @ptr already contain an @description object, then it is destroyed, * and updated to point to the provided @description object. */ void idmef_impact_set_description(idmef_impact_t *ptr, prelude_string_t *description) { prelude_return_if_fail(ptr); if ( ptr->description ) prelude_string_destroy(ptr->description); ptr->description = description; } /** * idmef_impact_new_description: * @ptr: pointer to a #idmef_impact_t object. * @ret: pointer to an address where to store the created #prelude_string_t object. * * Create a new description object, children of #idmef_impact_t. * If @ptr already contain a #prelude_string_t object, then it is destroyed. * * Returns: 0 on success, or a negative value if an error occured. */ int idmef_impact_new_description(idmef_impact_t *ptr, prelude_string_t **ret) { int retval; prelude_return_val_if_fail(ptr, prelude_error(PRELUDE_ERROR_ASSERTION)); if ( ! ptr->description ) { retval = prelude_string_new(&ptr->description); if ( retval < 0 ) return retval; } *ret = ptr->description; return 0; } /** * idmef_impact_copy: * @src: Source of the copy. * @dst: Where to copy the object. * * Copy a new #idmef_impact_t object from @src to @dst. * * Returns: 0 on success, a negative value if an error occured. */ int idmef_impact_copy(const idmef_impact_t *src, idmef_impact_t *dst) { int ret; prelude_return_val_if_fail(src, prelude_error(PRELUDE_ERROR_ASSERTION)); prelude_return_val_if_fail(dst, prelude_error(PRELUDE_ERROR_ASSERTION)); ret = 0; dst->severity_is_set = src->severity_is_set; dst->severity = src->severity; dst->completion_is_set = src->completion_is_set; dst->completion = src->completion; dst->type = src->type; if ( src->description ) { ret = prelude_string_clone(src->description, &dst->description); if ( ret < 0 ) return ret; } return 0; } /** * idmef_impact_clone: * @src: Object to be cloned. * @dst: Address where to store the pointer to the cloned object. * * Create a copy of @src, and store it in @dst. * * Returns: 0 on success, a negative value if an error occured. */ int idmef_impact_clone(idmef_impact_t *src, idmef_impact_t **dst) { int ret; prelude_return_val_if_fail(src, prelude_error(PRELUDE_ERROR_ASSERTION)); ret = idmef_impact_new(dst); if ( ret < 0 ) return ret; return idmef_impact_copy(src, *dst); } /** * idmef_impact_compare: * @obj1: Object to compare with @obj2. * @obj2: Object to compare with @obj1. * * Compare @obj1 with @obj2. * * Returns: 0 on match, a negative value on comparison failure. */ int idmef_impact_compare(const idmef_impact_t *obj1, const idmef_impact_t *obj2) { int ret = 0; if ( obj1 == NULL && obj2 == NULL ) return 0; else if ( obj1 == NULL || obj2 == NULL ) return -1; if ( obj1->severity_is_set != obj2->severity_is_set ) return -1; if ( obj1->severity_is_set && obj1->severity != obj2->severity ) return -1; if ( obj1->completion_is_set != obj2->completion_is_set ) return -1; if ( obj1->completion_is_set && obj1->completion != obj2->completion ) return -1; if ( obj1->type != obj2->type ) return -1; ret = prelude_string_compare(obj1->description, obj2->description); if ( ret != 0 ) return ret; return ret; } /** * idmef_action_new: * @ret: Pointer where to store the created #idmef_action_t object. * * Create a new #idmef_action_t object. * * Returns: 0 on success, a negative value if an error occured. */ int idmef_action_new(idmef_action_t **ret) { *ret = calloc(1, sizeof(**ret)); if ( ! *ret ) return prelude_error_from_errno(errno); prelude_list_init(&(*ret)->list); (*ret)->refcount = 1; return 0; } /** * idmef_action_ref: * @action: pointer to a #idmef_action_t object. * * Increase @action reference count, so that it can be referenced * multiple time. * * Returns: a pointer to @action. */ idmef_action_t *idmef_action_ref(idmef_action_t *action) { prelude_return_val_if_fail(action, NULL); action->refcount++; return action; } int _idmef_action_get_child(void *p, idmef_class_child_id_t child, void **childptr) { idmef_action_t *ptr = p; prelude_return_val_if_fail(p, prelude_error(PRELUDE_ERROR_ASSERTION)); *childptr = NULL; switch ( child ) { case 0: return idmef_value_new_enum_from_numeric((idmef_value_t **) childptr, IDMEF_CLASS_ID_ACTION_CATEGORY, ptr->category); case 1: return get_value_from_string((idmef_value_t **) childptr, ptr->description, TRUE); default: return prelude_error(PRELUDE_ERROR_IDMEF_CLASS_UNKNOWN_CHILD); } } int _idmef_action_new_child(void *p, idmef_class_child_id_t child, int n, void **ret) { idmef_action_t *ptr = p; prelude_return_val_if_fail(p, prelude_error(PRELUDE_ERROR_ASSERTION)); switch ( child ) { case 0: return idmef_action_new_category(ptr, (idmef_action_category_t **) ret); case 1: return idmef_action_new_description(ptr, (prelude_string_t **) ret); default: return prelude_error(PRELUDE_ERROR_IDMEF_CLASS_UNKNOWN_CHILD); } } int _idmef_action_destroy_child(void *p, idmef_class_child_id_t child, int n) { idmef_action_t *ptr = p; prelude_return_val_if_fail(p, prelude_error(PRELUDE_ERROR_ASSERTION)); switch ( child ) { case 0: ptr->category = 0; return 0; case 1: if ( ptr->description ) { prelude_string_destroy(ptr->description); ptr->description = NULL; } return 0; default: return prelude_error(PRELUDE_ERROR_IDMEF_CLASS_UNKNOWN_CHILD); } } static void idmef_action_destroy_internal(idmef_action_t *ptr) { prelude_return_if_fail(ptr); if ( ! prelude_list_is_empty(&ptr->list) ) prelude_list_del_init(&ptr->list); if ( ptr->description ) { prelude_string_destroy(ptr->description); ptr->description = NULL; } /* free() should be done by the caller */ } /** * idmef_action_destroy: * @ptr: pointer to a #idmef_action_t object. * * Destroy @ptr and all of it's children. * The objects are only destroyed if their reference count reach zero. */ void idmef_action_destroy(idmef_action_t *ptr) { prelude_return_if_fail(ptr); if ( --ptr->refcount ) return; idmef_action_destroy_internal(ptr); free(ptr); } /** * idmef_action_get_category: * @ptr: pointer to a #idmef_action_t object. * * Get category children of the #idmef_action_t object. * * Returns: a pointer to a idmef_action_category_t object, or NULL if the children object is not set. */ idmef_action_category_t idmef_action_get_category(idmef_action_t *ptr) { prelude_return_val_if_fail(ptr, 0); /* FIXME */ return ptr->category; } /** * idmef_action_set_category: * @ptr: pointer to a #idmef_action_t object. * @category: pointer to a #idmef_action_category_t object. * * Set @category object as a children of @ptr. * if @ptr already contain an @category object, then it is destroyed, * and updated to point to the provided @category object. */ void idmef_action_set_category(idmef_action_t *ptr, idmef_action_category_t category) { prelude_return_if_fail(ptr); ptr->category = category; } /** * idmef_action_new_category: * @ptr: pointer to a #idmef_action_t object. * @ret: pointer to an address where to store the created #idmef_action_category_t object. * * Create a new category object, children of #idmef_action_t. * If @ptr already contain a #idmef_action_category_t object, then it is destroyed. * * Returns: 0 on success, or a negative value if an error occured. */ int idmef_action_new_category(idmef_action_t *ptr, idmef_action_category_t **ret) { prelude_return_val_if_fail(ptr, prelude_error(PRELUDE_ERROR_ASSERTION)); *ret = &ptr->category; return 0; } /** * *idmef_action_get_description: * @ptr: pointer to a #idmef_action_t object. * * Get description children of the #idmef_action_t object. * * Returns: a pointer to a prelude_string_t object, or NULL if the children object is not set. */ prelude_string_t *idmef_action_get_description(idmef_action_t *ptr) { prelude_return_val_if_fail(ptr, 0); /* FIXME */ return ptr->description; } /** * idmef_action_set_description: * @ptr: pointer to a #idmef_action_t object. * @description: pointer to a #prelude_string_t object. * * Set @description object as a children of @ptr. * if @ptr already contain an @description object, then it is destroyed, * and updated to point to the provided @description object. */ void idmef_action_set_description(idmef_action_t *ptr, prelude_string_t *description) { prelude_return_if_fail(ptr); if ( ptr->description ) prelude_string_destroy(ptr->description); ptr->description = description; } /** * idmef_action_new_description: * @ptr: pointer to a #idmef_action_t object. * @ret: pointer to an address where to store the created #prelude_string_t object. * * Create a new description object, children of #idmef_action_t. * If @ptr already contain a #prelude_string_t object, then it is destroyed. * * Returns: 0 on success, or a negative value if an error occured. */ int idmef_action_new_description(idmef_action_t *ptr, prelude_string_t **ret) { int retval; prelude_return_val_if_fail(ptr, prelude_error(PRELUDE_ERROR_ASSERTION)); if ( ! ptr->description ) { retval = prelude_string_new(&ptr->description); if ( retval < 0 ) return retval; } *ret = ptr->description; return 0; } /** * idmef_action_copy: * @src: Source of the copy. * @dst: Where to copy the object. * * Copy a new #idmef_action_t object from @src to @dst. * * Returns: 0 on success, a negative value if an error occured. */ int idmef_action_copy(const idmef_action_t *src, idmef_action_t *dst) { int ret; prelude_return_val_if_fail(src, prelude_error(PRELUDE_ERROR_ASSERTION)); prelude_return_val_if_fail(dst, prelude_error(PRELUDE_ERROR_ASSERTION)); ret = 0; dst->category = src->category; if ( src->description ) { ret = prelude_string_clone(src->description, &dst->description); if ( ret < 0 ) return ret; } return 0; } /** * idmef_action_clone: * @src: Object to be cloned. * @dst: Address where to store the pointer to the cloned object. * * Create a copy of @src, and store it in @dst. * * Returns: 0 on success, a negative value if an error occured. */ int idmef_action_clone(idmef_action_t *src, idmef_action_t **dst) { int ret; prelude_return_val_if_fail(src, prelude_error(PRELUDE_ERROR_ASSERTION)); ret = idmef_action_new(dst); if ( ret < 0 ) return ret; return idmef_action_copy(src, *dst); } /** * idmef_action_compare: * @obj1: Object to compare with @obj2. * @obj2: Object to compare with @obj1. * * Compare @obj1 with @obj2. * * Returns: 0 on match, a negative value on comparison failure. */ int idmef_action_compare(const idmef_action_t *obj1, const idmef_action_t *obj2) { int ret = 0; if ( obj1 == NULL && obj2 == NULL ) return 0; else if ( obj1 == NULL || obj2 == NULL ) return -1; if ( obj1->category != obj2->category ) return -1; ret = prelude_string_compare(obj1->description, obj2->description); if ( ret != 0 ) return ret; return ret; } /** * idmef_confidence_new: * @ret: Pointer where to store the created #idmef_confidence_t object. * * Create a new #idmef_confidence_t object. * * Returns: 0 on success, a negative value if an error occured. */ int idmef_confidence_new(idmef_confidence_t **ret) { *ret = calloc(1, sizeof(**ret)); if ( ! *ret ) return prelude_error_from_errno(errno); (*ret)->refcount = 1; return 0; } /** * idmef_confidence_ref: * @confidence: pointer to a #idmef_confidence_t object. * * Increase @confidence reference count, so that it can be referenced * multiple time. * * Returns: a pointer to @confidence. */ idmef_confidence_t *idmef_confidence_ref(idmef_confidence_t *confidence) { prelude_return_val_if_fail(confidence, NULL); confidence->refcount++; return confidence; } int _idmef_confidence_get_child(void *p, idmef_class_child_id_t child, void **childptr) { idmef_confidence_t *ptr = p; prelude_return_val_if_fail(p, prelude_error(PRELUDE_ERROR_ASSERTION)); *childptr = NULL; switch ( child ) { case 0: return idmef_value_new_enum_from_numeric((idmef_value_t **) childptr, IDMEF_CLASS_ID_CONFIDENCE_RATING, ptr->rating); case 1: return idmef_value_new_float((idmef_value_t **) childptr, ptr->confidence); default: return prelude_error(PRELUDE_ERROR_IDMEF_CLASS_UNKNOWN_CHILD); } } int _idmef_confidence_new_child(void *p, idmef_class_child_id_t child, int n, void **ret) { idmef_confidence_t *ptr = p; prelude_return_val_if_fail(p, prelude_error(PRELUDE_ERROR_ASSERTION)); switch ( child ) { case 0: return idmef_confidence_new_rating(ptr, (idmef_confidence_rating_t **) ret); case 1: return idmef_confidence_new_confidence(ptr, (float **) ret); default: return prelude_error(PRELUDE_ERROR_IDMEF_CLASS_UNKNOWN_CHILD); } } int _idmef_confidence_destroy_child(void *p, idmef_class_child_id_t child, int n) { idmef_confidence_t *ptr = p; prelude_return_val_if_fail(p, prelude_error(PRELUDE_ERROR_ASSERTION)); switch ( child ) { case 0: ptr->rating = 0; return 0; default: return prelude_error(PRELUDE_ERROR_IDMEF_CLASS_UNKNOWN_CHILD); } } static void idmef_confidence_destroy_internal(idmef_confidence_t *ptr) { prelude_return_if_fail(ptr); /* free() should be done by the caller */ } /** * idmef_confidence_destroy: * @ptr: pointer to a #idmef_confidence_t object. * * Destroy @ptr and all of it's children. * The objects are only destroyed if their reference count reach zero. */ void idmef_confidence_destroy(idmef_confidence_t *ptr) { prelude_return_if_fail(ptr); if ( --ptr->refcount ) return; idmef_confidence_destroy_internal(ptr); free(ptr); } /** * idmef_confidence_get_rating: * @ptr: pointer to a #idmef_confidence_t object. * * Get rating children of the #idmef_confidence_t object. * * Returns: a pointer to a idmef_confidence_rating_t object, or NULL if the children object is not set. */ idmef_confidence_rating_t idmef_confidence_get_rating(idmef_confidence_t *ptr) { prelude_return_val_if_fail(ptr, 0); /* FIXME */ return ptr->rating; } /** * idmef_confidence_set_rating: * @ptr: pointer to a #idmef_confidence_t object. * @rating: pointer to a #idmef_confidence_rating_t object. * * Set @rating object as a children of @ptr. * if @ptr already contain an @rating object, then it is destroyed, * and updated to point to the provided @rating object. */ void idmef_confidence_set_rating(idmef_confidence_t *ptr, idmef_confidence_rating_t rating) { prelude_return_if_fail(ptr); ptr->rating = rating; } /** * idmef_confidence_new_rating: * @ptr: pointer to a #idmef_confidence_t object. * @ret: pointer to an address where to store the created #idmef_confidence_rating_t object. * * Create a new rating object, children of #idmef_confidence_t. * If @ptr already contain a #idmef_confidence_rating_t object, then it is destroyed. * * Returns: 0 on success, or a negative value if an error occured. */ int idmef_confidence_new_rating(idmef_confidence_t *ptr, idmef_confidence_rating_t **ret) { prelude_return_val_if_fail(ptr, prelude_error(PRELUDE_ERROR_ASSERTION)); *ret = &ptr->rating; return 0; } /** * idmef_confidence_get_confidence: * @ptr: pointer to a #idmef_confidence_t object. * * Get confidence children of the #idmef_confidence_t object. * * Returns: a pointer to a float object, or NULL if the children object is not set. */ float idmef_confidence_get_confidence(idmef_confidence_t *ptr) { prelude_return_val_if_fail(ptr, 0); /* FIXME */ return ptr->confidence; } /** * idmef_confidence_set_confidence: * @ptr: pointer to a #idmef_confidence_t object. * @confidence: pointer to a #float object. * * Set @confidence object as a children of @ptr. * if @ptr already contain an @confidence object, then it is destroyed, * and updated to point to the provided @confidence object. */ void idmef_confidence_set_confidence(idmef_confidence_t *ptr, float confidence) { prelude_return_if_fail(ptr); ptr->confidence = confidence; } /** * idmef_confidence_new_confidence: * @ptr: pointer to a #idmef_confidence_t object. * @ret: pointer to an address where to store the created #float object. * * Create a new confidence object, children of #idmef_confidence_t. * If @ptr already contain a #float object, then it is destroyed. * * Returns: 0 on success, or a negative value if an error occured. */ int idmef_confidence_new_confidence(idmef_confidence_t *ptr, float **ret) { prelude_return_val_if_fail(ptr, prelude_error(PRELUDE_ERROR_ASSERTION)); *ret = &ptr->confidence; return 0; } /** * idmef_confidence_copy: * @src: Source of the copy. * @dst: Where to copy the object. * * Copy a new #idmef_confidence_t object from @src to @dst. * * Returns: 0 on success, a negative value if an error occured. */ int idmef_confidence_copy(const idmef_confidence_t *src, idmef_confidence_t *dst) { int ret; prelude_return_val_if_fail(src, prelude_error(PRELUDE_ERROR_ASSERTION)); prelude_return_val_if_fail(dst, prelude_error(PRELUDE_ERROR_ASSERTION)); ret = 0; dst->rating = src->rating; dst->confidence = src->confidence; return 0; } /** * idmef_confidence_clone: * @src: Object to be cloned. * @dst: Address where to store the pointer to the cloned object. * * Create a copy of @src, and store it in @dst. * * Returns: 0 on success, a negative value if an error occured. */ int idmef_confidence_clone(idmef_confidence_t *src, idmef_confidence_t **dst) { int ret; prelude_return_val_if_fail(src, prelude_error(PRELUDE_ERROR_ASSERTION)); ret = idmef_confidence_new(dst); if ( ret < 0 ) return ret; return idmef_confidence_copy(src, *dst); } /** * idmef_confidence_compare: * @obj1: Object to compare with @obj2. * @obj2: Object to compare with @obj1. * * Compare @obj1 with @obj2. * * Returns: 0 on match, a negative value on comparison failure. */ int idmef_confidence_compare(const idmef_confidence_t *obj1, const idmef_confidence_t *obj2) { int ret = 0; if ( obj1 == NULL && obj2 == NULL ) return 0; else if ( obj1 == NULL || obj2 == NULL ) return -1; if ( obj1->rating != obj2->rating ) return -1; ret = float_compare(obj1->confidence, obj2->confidence); return ret; } /** * idmef_assessment_new: * @ret: Pointer where to store the created #idmef_assessment_t object. * * Create a new #idmef_assessment_t object. * * Returns: 0 on success, a negative value if an error occured. */ int idmef_assessment_new(idmef_assessment_t **ret) { *ret = calloc(1, sizeof(**ret)); if ( ! *ret ) return prelude_error_from_errno(errno); (*ret)->refcount = 1; prelude_list_init(&(*ret)->action_list); return 0; } /** * idmef_assessment_ref: * @assessment: pointer to a #idmef_assessment_t object. * * Increase @assessment reference count, so that it can be referenced * multiple time. * * Returns: a pointer to @assessment. */ idmef_assessment_t *idmef_assessment_ref(idmef_assessment_t *assessment) { prelude_return_val_if_fail(assessment, NULL); assessment->refcount++; return assessment; } int _idmef_assessment_get_child(void *p, idmef_class_child_id_t child, void **childptr) { idmef_assessment_t *ptr = p; prelude_return_val_if_fail(p, prelude_error(PRELUDE_ERROR_ASSERTION)); *childptr = NULL; switch ( child ) { case 0: *childptr = ptr->impact; return 0; case 1: *childptr = &ptr->action_list; return 0; case 2: *childptr = ptr->confidence; return 0; default: return prelude_error(PRELUDE_ERROR_IDMEF_CLASS_UNKNOWN_CHILD); } } int _idmef_assessment_new_child(void *p, idmef_class_child_id_t child, int n, void **ret) { idmef_assessment_t *ptr = p; prelude_return_val_if_fail(p, prelude_error(PRELUDE_ERROR_ASSERTION)); switch ( child ) { case 0: return idmef_assessment_new_impact(ptr, (idmef_impact_t **) ret); case 1: { int i = 0; prelude_list_t *tmp; if ( n == IDMEF_LIST_APPEND || n == IDMEF_LIST_PREPEND ) return idmef_assessment_new_action(ptr, (idmef_action_t **) ret, n); if ( n >= 0 ) { prelude_list_for_each(&ptr->action_list, tmp) { if ( i++ == n ) { *ret = prelude_list_entry(tmp, idmef_action_t, list); return 0; } } if ( i != n ) return prelude_error(PRELUDE_ERROR_IDMEF_TREE_INDEX_UNDEFINED); } else { int pos = (-n) - 1; /* With negative value, -1 is the base, translate to 0 */ prelude_list_for_each_reversed(&ptr->action_list, tmp) { if ( i++ == pos ) { *ret = prelude_list_entry(tmp, idmef_action_t, list); return 0; } } if ( i != pos ) return prelude_error(PRELUDE_ERROR_IDMEF_TREE_INDEX_UNDEFINED); } return idmef_assessment_new_action(ptr, (idmef_action_t **) ret, n); } case 2: return idmef_assessment_new_confidence(ptr, (idmef_confidence_t **) ret); default: return prelude_error(PRELUDE_ERROR_IDMEF_CLASS_UNKNOWN_CHILD); } } int _idmef_assessment_destroy_child(void *p, idmef_class_child_id_t child, int n) { idmef_assessment_t *ptr = p; prelude_return_val_if_fail(p, prelude_error(PRELUDE_ERROR_ASSERTION)); switch ( child ) { case 0: if ( ptr->impact ) { idmef_impact_destroy(ptr->impact); ptr->impact = NULL; } return 0; case 1: { int i = 0; prelude_list_t *tmp; if ( n >= 0 ) { prelude_list_for_each(&ptr->action_list, tmp) { if ( i++ == n ) { void *b = prelude_list_entry(tmp, idmef_action_t, list); idmef_action_destroy(b); return 0; } } if ( i != n ) return prelude_error(PRELUDE_ERROR_IDMEF_TREE_INDEX_UNDEFINED); } else { int pos = (-n) - 1; /* With negative value, -1 is the base, translate to 0 */ prelude_list_for_each_reversed(&ptr->action_list, tmp) { if ( i++ == pos ) { void *b = prelude_list_entry(tmp, idmef_action_t, list); idmef_action_destroy(b); return 0; } } if ( i != pos ) return prelude_error(PRELUDE_ERROR_IDMEF_TREE_INDEX_UNDEFINED); } } case 2: if ( ptr->confidence ) { idmef_confidence_destroy(ptr->confidence); ptr->confidence = NULL; } return 0; default: return prelude_error(PRELUDE_ERROR_IDMEF_CLASS_UNKNOWN_CHILD); } } static void idmef_assessment_destroy_internal(idmef_assessment_t *ptr) { prelude_return_if_fail(ptr); if ( ptr->impact ) { idmef_impact_destroy(ptr->impact); ptr->impact = NULL; } { prelude_list_t *n, *tmp; idmef_action_t *entry; prelude_list_for_each_safe(&ptr->action_list, tmp, n) { entry = prelude_list_entry(tmp, idmef_action_t, list); prelude_list_del_init(&entry->list); idmef_action_destroy(entry); } } if ( ptr->confidence ) { idmef_confidence_destroy(ptr->confidence); ptr->confidence = NULL; } /* free() should be done by the caller */ } /** * idmef_assessment_destroy: * @ptr: pointer to a #idmef_assessment_t object. * * Destroy @ptr and all of it's children. * The objects are only destroyed if their reference count reach zero. */ void idmef_assessment_destroy(idmef_assessment_t *ptr) { prelude_return_if_fail(ptr); if ( --ptr->refcount ) return; idmef_assessment_destroy_internal(ptr); free(ptr); } /** * *idmef_assessment_get_impact: * @ptr: pointer to a #idmef_assessment_t object. * * Get impact children of the #idmef_assessment_t object. * * Returns: a pointer to a idmef_impact_t object, or NULL if the children object is not set. */ idmef_impact_t *idmef_assessment_get_impact(idmef_assessment_t *ptr) { prelude_return_val_if_fail(ptr, 0); /* FIXME */ return ptr->impact; } /** * idmef_assessment_set_impact: * @ptr: pointer to a #idmef_assessment_t object. * @impact: pointer to a #idmef_impact_t object. * * Set @impact object as a children of @ptr. * if @ptr already contain an @impact object, then it is destroyed, * and updated to point to the provided @impact object. */ void idmef_assessment_set_impact(idmef_assessment_t *ptr, idmef_impact_t *impact) { prelude_return_if_fail(ptr); if ( ptr->impact ) idmef_impact_destroy(ptr->impact); ptr->impact = impact; } /** * idmef_assessment_new_impact: * @ptr: pointer to a #idmef_assessment_t object. * @ret: pointer to an address where to store the created #idmef_impact_t object. * * Create a new impact object, children of #idmef_assessment_t. * If @ptr already contain a #idmef_impact_t object, then it is destroyed. * * Returns: 0 on success, or a negative value if an error occured. */ int idmef_assessment_new_impact(idmef_assessment_t *ptr, idmef_impact_t **ret) { int retval; prelude_return_val_if_fail(ptr, prelude_error(PRELUDE_ERROR_ASSERTION)); if ( ! ptr->impact ) { retval = idmef_impact_new(&ptr->impact); if ( retval < 0 ) return retval; } *ret = ptr->impact; return 0; } /** * idmef_assessment_get_next_action: * @assessment: pointer to a #idmef_assessment_t object. * @action_cur: pointer to a #idmef_action_t object. * * Get the next #idmef_action_t object listed in @ptr. * When iterating over the idmef_action_t object listed in @ptr, * @object should be set to the latest returned #idmef_action_t object. * * Returns: the next #idmef_action_t in the list. */ idmef_action_t *idmef_assessment_get_next_action(idmef_assessment_t *assessment, idmef_action_t *action_cur) { prelude_list_t *tmp = (action_cur) ? &action_cur->list : NULL; prelude_return_val_if_fail(assessment, NULL); prelude_list_for_each_continue(&assessment->action_list, tmp) return prelude_list_entry(tmp, idmef_action_t, list); return NULL; } /** * idmef_assessment_set_action: * @ptr: pointer to a #idmef_assessment_t object. * @object: pointer to a #idmef_action_t object. * @pos: Position in the list. * * Add @object to position @pos of @ptr list of #idmef_action_t object. * * If @pos is #IDMEF_LIST_APPEND, @object will be inserted at the tail of the list. * If @pos is #IDMEF_LIST_PREPEND, @object will be inserted at the head of the list. */ void idmef_assessment_set_action(idmef_assessment_t *ptr, idmef_action_t *object, int pos) { prelude_return_if_fail(ptr); prelude_return_if_fail(object); if ( ! prelude_list_is_empty(&object->list) ) prelude_list_del_init(&object->list); list_insert(&ptr->action_list, &object->list, pos); } /** * idmef_assessment_new_action: * @ptr: pointer to a #idmef_assessment_t object. * @ret: pointer to an address where to store the created #idmef_action_t object. * @pos: position in the list. * * Create a new #idmef_action_t children of @ptr, and add it to position @pos of * @ptr list of #idmef_action_t object. The created #idmef_action_t object is * stored in @ret. * * If @pos is #IDMEF_LIST_APPEND, @object will be inserted at the tail of the list. * If @pos is #IDMEF_LIST_PREPEND, @object will be inserted at the head of the list. * * Returns: 0 on success, or a negative value if an error occured. */ int idmef_assessment_new_action(idmef_assessment_t *ptr, idmef_action_t **ret, int pos) { int retval; prelude_return_val_if_fail(ptr, prelude_error(PRELUDE_ERROR_ASSERTION)); retval = idmef_action_new(ret); if ( retval < 0 ) return retval; list_insert(&ptr->action_list, &(*ret)->list, pos); return 0; } /** * *idmef_assessment_get_confidence: * @ptr: pointer to a #idmef_assessment_t object. * * Get confidence children of the #idmef_assessment_t object. * * Returns: a pointer to a idmef_confidence_t object, or NULL if the children object is not set. */ idmef_confidence_t *idmef_assessment_get_confidence(idmef_assessment_t *ptr) { prelude_return_val_if_fail(ptr, 0); /* FIXME */ return ptr->confidence; } /** * idmef_assessment_set_confidence: * @ptr: pointer to a #idmef_assessment_t object. * @confidence: pointer to a #idmef_confidence_t object. * * Set @confidence object as a children of @ptr. * if @ptr already contain an @confidence object, then it is destroyed, * and updated to point to the provided @confidence object. */ void idmef_assessment_set_confidence(idmef_assessment_t *ptr, idmef_confidence_t *confidence) { prelude_return_if_fail(ptr); if ( ptr->confidence ) idmef_confidence_destroy(ptr->confidence); ptr->confidence = confidence; } /** * idmef_assessment_new_confidence: * @ptr: pointer to a #idmef_assessment_t object. * @ret: pointer to an address where to store the created #idmef_confidence_t object. * * Create a new confidence object, children of #idmef_assessment_t. * If @ptr already contain a #idmef_confidence_t object, then it is destroyed. * * Returns: 0 on success, or a negative value if an error occured. */ int idmef_assessment_new_confidence(idmef_assessment_t *ptr, idmef_confidence_t **ret) { int retval; prelude_return_val_if_fail(ptr, prelude_error(PRELUDE_ERROR_ASSERTION)); if ( ! ptr->confidence ) { retval = idmef_confidence_new(&ptr->confidence); if ( retval < 0 ) return retval; } *ret = ptr->confidence; return 0; } /** * idmef_assessment_copy: * @src: Source of the copy. * @dst: Where to copy the object. * * Copy a new #idmef_assessment_t object from @src to @dst. * * Returns: 0 on success, a negative value if an error occured. */ int idmef_assessment_copy(const idmef_assessment_t *src, idmef_assessment_t *dst) { int ret; prelude_return_val_if_fail(src, prelude_error(PRELUDE_ERROR_ASSERTION)); prelude_return_val_if_fail(dst, prelude_error(PRELUDE_ERROR_ASSERTION)); ret = 0; if ( src->impact ) { ret = idmef_impact_clone(src->impact, &dst->impact); if ( ret < 0 ) return ret; } { prelude_list_t *n, *tmp; idmef_action_t *entry, *new; prelude_list_for_each_safe(&src->action_list, tmp, n) { entry = prelude_list_entry(tmp, idmef_action_t, list); idmef_action_clone(entry, &new); prelude_list_add_tail(&dst->action_list, &new->list); } } if ( src->confidence ) { ret = idmef_confidence_clone(src->confidence, &dst->confidence); if ( ret < 0 ) return ret; } return 0; } /** * idmef_assessment_clone: * @src: Object to be cloned. * @dst: Address where to store the pointer to the cloned object. * * Create a copy of @src, and store it in @dst. * * Returns: 0 on success, a negative value if an error occured. */ int idmef_assessment_clone(idmef_assessment_t *src, idmef_assessment_t **dst) { int ret; prelude_return_val_if_fail(src, prelude_error(PRELUDE_ERROR_ASSERTION)); ret = idmef_assessment_new(dst); if ( ret < 0 ) return ret; return idmef_assessment_copy(src, *dst); } /** * idmef_assessment_compare: * @obj1: Object to compare with @obj2. * @obj2: Object to compare with @obj1. * * Compare @obj1 with @obj2. * * Returns: 0 on match, a negative value on comparison failure. */ int idmef_assessment_compare(const idmef_assessment_t *obj1, const idmef_assessment_t *obj2) { int ret = 0; if ( obj1 == NULL && obj2 == NULL ) return 0; else if ( obj1 == NULL || obj2 == NULL ) return -1; ret = idmef_impact_compare(obj1->impact, obj2->impact); if ( ret != 0 ) return ret; { prelude_list_t *tmp1, *tmp2; idmef_action_t *entry1, *entry2; tmp1 = tmp2 = NULL; do { entry1 = entry2 = NULL; prelude_list_for_each_continue(&obj1->action_list, tmp1) { entry1 = prelude_list_entry(tmp1, idmef_action_t, list); break; } prelude_list_for_each_continue(&obj2->action_list, tmp2) { entry2 = prelude_list_entry(tmp2, idmef_action_t, list); break; } ret = idmef_action_compare(entry1, entry2); if ( ret != 0 ) return ret; } while ( entry1 && entry2 ); } ret = idmef_confidence_compare(obj1->confidence, obj2->confidence); if ( ret != 0 ) return ret; return ret; } /** * idmef_tool_alert_new: * @ret: Pointer where to store the created #idmef_tool_alert_t object. * * Create a new #idmef_tool_alert_t object. * * Returns: 0 on success, a negative value if an error occured. */ int idmef_tool_alert_new(idmef_tool_alert_t **ret) { *ret = calloc(1, sizeof(**ret)); if ( ! *ret ) return prelude_error_from_errno(errno); (*ret)->refcount = 1; prelude_list_init(&(*ret)->alertident_list); { int retval = prelude_string_new(&(*ret)->name); if ( retval < 0 ) { idmef_tool_alert_destroy(*ret); *ret = NULL; return retval; } } return 0; } /** * idmef_tool_alert_ref: * @tool_alert: pointer to a #idmef_tool_alert_t object. * * Increase @tool_alert reference count, so that it can be referenced * multiple time. * * Returns: a pointer to @tool_alert. */ idmef_tool_alert_t *idmef_tool_alert_ref(idmef_tool_alert_t *tool_alert) { prelude_return_val_if_fail(tool_alert, NULL); tool_alert->refcount++; return tool_alert; } int _idmef_tool_alert_get_child(void *p, idmef_class_child_id_t child, void **childptr) { idmef_tool_alert_t *ptr = p; prelude_return_val_if_fail(p, prelude_error(PRELUDE_ERROR_ASSERTION)); *childptr = NULL; switch ( child ) { case 0: return get_value_from_string((idmef_value_t **) childptr, ptr->name, TRUE); case 1: return get_value_from_string((idmef_value_t **) childptr, ptr->command, TRUE); case 2: *childptr = &ptr->alertident_list; return 0; default: return prelude_error(PRELUDE_ERROR_IDMEF_CLASS_UNKNOWN_CHILD); } } int _idmef_tool_alert_new_child(void *p, idmef_class_child_id_t child, int n, void **ret) { idmef_tool_alert_t *ptr = p; prelude_return_val_if_fail(p, prelude_error(PRELUDE_ERROR_ASSERTION)); switch ( child ) { case 0: return idmef_tool_alert_new_name(ptr, (prelude_string_t **) ret); case 1: return idmef_tool_alert_new_command(ptr, (prelude_string_t **) ret); case 2: { int i = 0; prelude_list_t *tmp; if ( n == IDMEF_LIST_APPEND || n == IDMEF_LIST_PREPEND ) return idmef_tool_alert_new_alertident(ptr, (idmef_alertident_t **) ret, n); if ( n >= 0 ) { prelude_list_for_each(&ptr->alertident_list, tmp) { if ( i++ == n ) { *ret = prelude_list_entry(tmp, idmef_alertident_t, list); return 0; } } if ( i != n ) return prelude_error(PRELUDE_ERROR_IDMEF_TREE_INDEX_UNDEFINED); } else { int pos = (-n) - 1; /* With negative value, -1 is the base, translate to 0 */ prelude_list_for_each_reversed(&ptr->alertident_list, tmp) { if ( i++ == pos ) { *ret = prelude_list_entry(tmp, idmef_alertident_t, list); return 0; } } if ( i != pos ) return prelude_error(PRELUDE_ERROR_IDMEF_TREE_INDEX_UNDEFINED); } return idmef_tool_alert_new_alertident(ptr, (idmef_alertident_t **) ret, n); } default: return prelude_error(PRELUDE_ERROR_IDMEF_CLASS_UNKNOWN_CHILD); } } int _idmef_tool_alert_destroy_child(void *p, idmef_class_child_id_t child, int n) { idmef_tool_alert_t *ptr = p; prelude_return_val_if_fail(p, prelude_error(PRELUDE_ERROR_ASSERTION)); switch ( child ) { case 0: if ( ptr->name ) { prelude_string_destroy(ptr->name); ptr->name = NULL; } return 0; case 1: if ( ptr->command ) { prelude_string_destroy(ptr->command); ptr->command = NULL; } return 0; case 2: { int i = 0; prelude_list_t *tmp; if ( n >= 0 ) { prelude_list_for_each(&ptr->alertident_list, tmp) { if ( i++ == n ) { void *b = prelude_list_entry(tmp, idmef_alertident_t, list); idmef_alertident_destroy(b); return 0; } } if ( i != n ) return prelude_error(PRELUDE_ERROR_IDMEF_TREE_INDEX_UNDEFINED); } else { int pos = (-n) - 1; /* With negative value, -1 is the base, translate to 0 */ prelude_list_for_each_reversed(&ptr->alertident_list, tmp) { if ( i++ == pos ) { void *b = prelude_list_entry(tmp, idmef_alertident_t, list); idmef_alertident_destroy(b); return 0; } } if ( i != pos ) return prelude_error(PRELUDE_ERROR_IDMEF_TREE_INDEX_UNDEFINED); } } default: return prelude_error(PRELUDE_ERROR_IDMEF_CLASS_UNKNOWN_CHILD); } } static void idmef_tool_alert_destroy_internal(idmef_tool_alert_t *ptr) { prelude_return_if_fail(ptr); if ( ptr->name ) { prelude_string_destroy(ptr->name); ptr->name = NULL; } if ( ptr->command ) { prelude_string_destroy(ptr->command); ptr->command = NULL; } { prelude_list_t *n, *tmp; idmef_alertident_t *entry; prelude_list_for_each_safe(&ptr->alertident_list, tmp, n) { entry = prelude_list_entry(tmp, idmef_alertident_t, list); prelude_list_del_init(&entry->list); idmef_alertident_destroy(entry); } } /* free() should be done by the caller */ } /** * idmef_tool_alert_destroy: * @ptr: pointer to a #idmef_tool_alert_t object. * * Destroy @ptr and all of it's children. * The objects are only destroyed if their reference count reach zero. */ void idmef_tool_alert_destroy(idmef_tool_alert_t *ptr) { prelude_return_if_fail(ptr); if ( --ptr->refcount ) return; idmef_tool_alert_destroy_internal(ptr); free(ptr); } /** * *idmef_tool_alert_get_name: * @ptr: pointer to a #idmef_tool_alert_t object. * * Get name children of the #idmef_tool_alert_t object. * * Returns: a pointer to a prelude_string_t object, or NULL if the children object is not set. */ prelude_string_t *idmef_tool_alert_get_name(idmef_tool_alert_t *ptr) { prelude_return_val_if_fail(ptr, 0); /* FIXME */ return ptr->name; } /** * idmef_tool_alert_set_name: * @ptr: pointer to a #idmef_tool_alert_t object. * @name: pointer to a #prelude_string_t object. * * Set @name object as a children of @ptr. * if @ptr already contain an @name object, then it is destroyed, * and updated to point to the provided @name object. */ void idmef_tool_alert_set_name(idmef_tool_alert_t *ptr, prelude_string_t *name) { prelude_return_if_fail(ptr); if ( ptr->name ) prelude_string_destroy(ptr->name); ptr->name = name; } /** * idmef_tool_alert_new_name: * @ptr: pointer to a #idmef_tool_alert_t object. * @ret: pointer to an address where to store the created #prelude_string_t object. * * Create a new name object, children of #idmef_tool_alert_t. * If @ptr already contain a #prelude_string_t object, then it is destroyed. * * Returns: 0 on success, or a negative value if an error occured. */ int idmef_tool_alert_new_name(idmef_tool_alert_t *ptr, prelude_string_t **ret) { int retval; prelude_return_val_if_fail(ptr, prelude_error(PRELUDE_ERROR_ASSERTION)); if ( ! ptr->name ) { retval = prelude_string_new(&ptr->name); if ( retval < 0 ) return retval; } *ret = ptr->name; return 0; } /** * *idmef_tool_alert_get_command: * @ptr: pointer to a #idmef_tool_alert_t object. * * Get command children of the #idmef_tool_alert_t object. * * Returns: a pointer to a prelude_string_t object, or NULL if the children object is not set. */ prelude_string_t *idmef_tool_alert_get_command(idmef_tool_alert_t *ptr) { prelude_return_val_if_fail(ptr, 0); /* FIXME */ return ptr->command; } /** * idmef_tool_alert_set_command: * @ptr: pointer to a #idmef_tool_alert_t object. * @command: pointer to a #prelude_string_t object. * * Set @command object as a children of @ptr. * if @ptr already contain an @command object, then it is destroyed, * and updated to point to the provided @command object. */ void idmef_tool_alert_set_command(idmef_tool_alert_t *ptr, prelude_string_t *command) { prelude_return_if_fail(ptr); if ( ptr->command ) prelude_string_destroy(ptr->command); ptr->command = command; } /** * idmef_tool_alert_new_command: * @ptr: pointer to a #idmef_tool_alert_t object. * @ret: pointer to an address where to store the created #prelude_string_t object. * * Create a new command object, children of #idmef_tool_alert_t. * If @ptr already contain a #prelude_string_t object, then it is destroyed. * * Returns: 0 on success, or a negative value if an error occured. */ int idmef_tool_alert_new_command(idmef_tool_alert_t *ptr, prelude_string_t **ret) { int retval; prelude_return_val_if_fail(ptr, prelude_error(PRELUDE_ERROR_ASSERTION)); if ( ! ptr->command ) { retval = prelude_string_new(&ptr->command); if ( retval < 0 ) return retval; } *ret = ptr->command; return 0; } /** * idmef_tool_alert_get_next_alertident: * @tool_alert: pointer to a #idmef_tool_alert_t object. * @alertident_cur: pointer to a #idmef_alertident_t object. * * Get the next #idmef_alertident_t object listed in @ptr. * When iterating over the idmef_alertident_t object listed in @ptr, * @object should be set to the latest returned #idmef_alertident_t object. * * Returns: the next #idmef_alertident_t in the list. */ idmef_alertident_t *idmef_tool_alert_get_next_alertident(idmef_tool_alert_t *tool_alert, idmef_alertident_t *alertident_cur) { prelude_list_t *tmp = (alertident_cur) ? &alertident_cur->list : NULL; prelude_return_val_if_fail(tool_alert, NULL); prelude_list_for_each_continue(&tool_alert->alertident_list, tmp) return prelude_list_entry(tmp, idmef_alertident_t, list); return NULL; } /** * idmef_tool_alert_set_alertident: * @ptr: pointer to a #idmef_tool_alert_t object. * @object: pointer to a #idmef_alertident_t object. * @pos: Position in the list. * * Add @object to position @pos of @ptr list of #idmef_alertident_t object. * * If @pos is #IDMEF_LIST_APPEND, @object will be inserted at the tail of the list. * If @pos is #IDMEF_LIST_PREPEND, @object will be inserted at the head of the list. */ void idmef_tool_alert_set_alertident(idmef_tool_alert_t *ptr, idmef_alertident_t *object, int pos) { prelude_return_if_fail(ptr); prelude_return_if_fail(object); if ( ! prelude_list_is_empty(&object->list) ) prelude_list_del_init(&object->list); list_insert(&ptr->alertident_list, &object->list, pos); } /** * idmef_tool_alert_new_alertident: * @ptr: pointer to a #idmef_tool_alert_t object. * @ret: pointer to an address where to store the created #idmef_alertident_t object. * @pos: position in the list. * * Create a new #idmef_alertident_t children of @ptr, and add it to position @pos of * @ptr list of #idmef_alertident_t object. The created #idmef_alertident_t object is * stored in @ret. * * If @pos is #IDMEF_LIST_APPEND, @object will be inserted at the tail of the list. * If @pos is #IDMEF_LIST_PREPEND, @object will be inserted at the head of the list. * * Returns: 0 on success, or a negative value if an error occured. */ int idmef_tool_alert_new_alertident(idmef_tool_alert_t *ptr, idmef_alertident_t **ret, int pos) { int retval; prelude_return_val_if_fail(ptr, prelude_error(PRELUDE_ERROR_ASSERTION)); retval = idmef_alertident_new(ret); if ( retval < 0 ) return retval; list_insert(&ptr->alertident_list, &(*ret)->list, pos); return 0; } /** * idmef_tool_alert_copy: * @src: Source of the copy. * @dst: Where to copy the object. * * Copy a new #idmef_tool_alert_t object from @src to @dst. * * Returns: 0 on success, a negative value if an error occured. */ int idmef_tool_alert_copy(const idmef_tool_alert_t *src, idmef_tool_alert_t *dst) { int ret; prelude_return_val_if_fail(src, prelude_error(PRELUDE_ERROR_ASSERTION)); prelude_return_val_if_fail(dst, prelude_error(PRELUDE_ERROR_ASSERTION)); ret = 0; if ( src->name ) { ret = prelude_string_copy(src->name, dst->name); if ( ret < 0 ) return ret; } if ( src->command ) { ret = prelude_string_clone(src->command, &dst->command); if ( ret < 0 ) return ret; } { prelude_list_t *n, *tmp; idmef_alertident_t *entry, *new; prelude_list_for_each_safe(&src->alertident_list, tmp, n) { entry = prelude_list_entry(tmp, idmef_alertident_t, list); idmef_alertident_clone(entry, &new); prelude_list_add_tail(&dst->alertident_list, &new->list); } } return 0; } /** * idmef_tool_alert_clone: * @src: Object to be cloned. * @dst: Address where to store the pointer to the cloned object. * * Create a copy of @src, and store it in @dst. * * Returns: 0 on success, a negative value if an error occured. */ int idmef_tool_alert_clone(idmef_tool_alert_t *src, idmef_tool_alert_t **dst) { int ret; prelude_return_val_if_fail(src, prelude_error(PRELUDE_ERROR_ASSERTION)); ret = idmef_tool_alert_new(dst); if ( ret < 0 ) return ret; return idmef_tool_alert_copy(src, *dst); } /** * idmef_tool_alert_compare: * @obj1: Object to compare with @obj2. * @obj2: Object to compare with @obj1. * * Compare @obj1 with @obj2. * * Returns: 0 on match, a negative value on comparison failure. */ int idmef_tool_alert_compare(const idmef_tool_alert_t *obj1, const idmef_tool_alert_t *obj2) { int ret = 0; if ( obj1 == NULL && obj2 == NULL ) return 0; else if ( obj1 == NULL || obj2 == NULL ) return -1; ret = prelude_string_compare(obj1->name, obj2->name); if ( ret != 0 ) return ret; ret = prelude_string_compare(obj1->command, obj2->command); if ( ret != 0 ) return ret; { prelude_list_t *tmp1, *tmp2; idmef_alertident_t *entry1, *entry2; tmp1 = tmp2 = NULL; do { entry1 = entry2 = NULL; prelude_list_for_each_continue(&obj1->alertident_list, tmp1) { entry1 = prelude_list_entry(tmp1, idmef_alertident_t, list); break; } prelude_list_for_each_continue(&obj2->alertident_list, tmp2) { entry2 = prelude_list_entry(tmp2, idmef_alertident_t, list); break; } ret = idmef_alertident_compare(entry1, entry2); if ( ret != 0 ) return ret; } while ( entry1 && entry2 ); } return ret; } /** * idmef_correlation_alert_new: * @ret: Pointer where to store the created #idmef_correlation_alert_t object. * * Create a new #idmef_correlation_alert_t object. * * Returns: 0 on success, a negative value if an error occured. */ int idmef_correlation_alert_new(idmef_correlation_alert_t **ret) { *ret = calloc(1, sizeof(**ret)); if ( ! *ret ) return prelude_error_from_errno(errno); (*ret)->refcount = 1; prelude_list_init(&(*ret)->alertident_list); { int retval = prelude_string_new(&(*ret)->name); if ( retval < 0 ) { idmef_correlation_alert_destroy(*ret); *ret = NULL; return retval; } } return 0; } /** * idmef_correlation_alert_ref: * @correlation_alert: pointer to a #idmef_correlation_alert_t object. * * Increase @correlation_alert reference count, so that it can be referenced * multiple time. * * Returns: a pointer to @correlation_alert. */ idmef_correlation_alert_t *idmef_correlation_alert_ref(idmef_correlation_alert_t *correlation_alert) { prelude_return_val_if_fail(correlation_alert, NULL); correlation_alert->refcount++; return correlation_alert; } int _idmef_correlation_alert_get_child(void *p, idmef_class_child_id_t child, void **childptr) { idmef_correlation_alert_t *ptr = p; prelude_return_val_if_fail(p, prelude_error(PRELUDE_ERROR_ASSERTION)); *childptr = NULL; switch ( child ) { case 0: return get_value_from_string((idmef_value_t **) childptr, ptr->name, TRUE); case 1: *childptr = &ptr->alertident_list; return 0; default: return prelude_error(PRELUDE_ERROR_IDMEF_CLASS_UNKNOWN_CHILD); } } int _idmef_correlation_alert_new_child(void *p, idmef_class_child_id_t child, int n, void **ret) { idmef_correlation_alert_t *ptr = p; prelude_return_val_if_fail(p, prelude_error(PRELUDE_ERROR_ASSERTION)); switch ( child ) { case 0: return idmef_correlation_alert_new_name(ptr, (prelude_string_t **) ret); case 1: { int i = 0; prelude_list_t *tmp; if ( n == IDMEF_LIST_APPEND || n == IDMEF_LIST_PREPEND ) return idmef_correlation_alert_new_alertident(ptr, (idmef_alertident_t **) ret, n); if ( n >= 0 ) { prelude_list_for_each(&ptr->alertident_list, tmp) { if ( i++ == n ) { *ret = prelude_list_entry(tmp, idmef_alertident_t, list); return 0; } } if ( i != n ) return prelude_error(PRELUDE_ERROR_IDMEF_TREE_INDEX_UNDEFINED); } else { int pos = (-n) - 1; /* With negative value, -1 is the base, translate to 0 */ prelude_list_for_each_reversed(&ptr->alertident_list, tmp) { if ( i++ == pos ) { *ret = prelude_list_entry(tmp, idmef_alertident_t, list); return 0; } } if ( i != pos ) return prelude_error(PRELUDE_ERROR_IDMEF_TREE_INDEX_UNDEFINED); } return idmef_correlation_alert_new_alertident(ptr, (idmef_alertident_t **) ret, n); } default: return prelude_error(PRELUDE_ERROR_IDMEF_CLASS_UNKNOWN_CHILD); } } int _idmef_correlation_alert_destroy_child(void *p, idmef_class_child_id_t child, int n) { idmef_correlation_alert_t *ptr = p; prelude_return_val_if_fail(p, prelude_error(PRELUDE_ERROR_ASSERTION)); switch ( child ) { case 0: if ( ptr->name ) { prelude_string_destroy(ptr->name); ptr->name = NULL; } return 0; case 1: { int i = 0; prelude_list_t *tmp; if ( n >= 0 ) { prelude_list_for_each(&ptr->alertident_list, tmp) { if ( i++ == n ) { void *b = prelude_list_entry(tmp, idmef_alertident_t, list); idmef_alertident_destroy(b); return 0; } } if ( i != n ) return prelude_error(PRELUDE_ERROR_IDMEF_TREE_INDEX_UNDEFINED); } else { int pos = (-n) - 1; /* With negative value, -1 is the base, translate to 0 */ prelude_list_for_each_reversed(&ptr->alertident_list, tmp) { if ( i++ == pos ) { void *b = prelude_list_entry(tmp, idmef_alertident_t, list); idmef_alertident_destroy(b); return 0; } } if ( i != pos ) return prelude_error(PRELUDE_ERROR_IDMEF_TREE_INDEX_UNDEFINED); } } default: return prelude_error(PRELUDE_ERROR_IDMEF_CLASS_UNKNOWN_CHILD); } } static void idmef_correlation_alert_destroy_internal(idmef_correlation_alert_t *ptr) { prelude_return_if_fail(ptr); if ( ptr->name ) { prelude_string_destroy(ptr->name); ptr->name = NULL; } { prelude_list_t *n, *tmp; idmef_alertident_t *entry; prelude_list_for_each_safe(&ptr->alertident_list, tmp, n) { entry = prelude_list_entry(tmp, idmef_alertident_t, list); prelude_list_del_init(&entry->list); idmef_alertident_destroy(entry); } } /* free() should be done by the caller */ } /** * idmef_correlation_alert_destroy: * @ptr: pointer to a #idmef_correlation_alert_t object. * * Destroy @ptr and all of it's children. * The objects are only destroyed if their reference count reach zero. */ void idmef_correlation_alert_destroy(idmef_correlation_alert_t *ptr) { prelude_return_if_fail(ptr); if ( --ptr->refcount ) return; idmef_correlation_alert_destroy_internal(ptr); free(ptr); } /** * *idmef_correlation_alert_get_name: * @ptr: pointer to a #idmef_correlation_alert_t object. * * Get name children of the #idmef_correlation_alert_t object. * * Returns: a pointer to a prelude_string_t object, or NULL if the children object is not set. */ prelude_string_t *idmef_correlation_alert_get_name(idmef_correlation_alert_t *ptr) { prelude_return_val_if_fail(ptr, 0); /* FIXME */ return ptr->name; } /** * idmef_correlation_alert_set_name: * @ptr: pointer to a #idmef_correlation_alert_t object. * @name: pointer to a #prelude_string_t object. * * Set @name object as a children of @ptr. * if @ptr already contain an @name object, then it is destroyed, * and updated to point to the provided @name object. */ void idmef_correlation_alert_set_name(idmef_correlation_alert_t *ptr, prelude_string_t *name) { prelude_return_if_fail(ptr); if ( ptr->name ) prelude_string_destroy(ptr->name); ptr->name = name; } /** * idmef_correlation_alert_new_name: * @ptr: pointer to a #idmef_correlation_alert_t object. * @ret: pointer to an address where to store the created #prelude_string_t object. * * Create a new name object, children of #idmef_correlation_alert_t. * If @ptr already contain a #prelude_string_t object, then it is destroyed. * * Returns: 0 on success, or a negative value if an error occured. */ int idmef_correlation_alert_new_name(idmef_correlation_alert_t *ptr, prelude_string_t **ret) { int retval; prelude_return_val_if_fail(ptr, prelude_error(PRELUDE_ERROR_ASSERTION)); if ( ! ptr->name ) { retval = prelude_string_new(&ptr->name); if ( retval < 0 ) return retval; } *ret = ptr->name; return 0; } /** * idmef_correlation_alert_get_next_alertident: * @correlation_alert: pointer to a #idmef_correlation_alert_t object. * @alertident_cur: pointer to a #idmef_alertident_t object. * * Get the next #idmef_alertident_t object listed in @ptr. * When iterating over the idmef_alertident_t object listed in @ptr, * @object should be set to the latest returned #idmef_alertident_t object. * * Returns: the next #idmef_alertident_t in the list. */ idmef_alertident_t *idmef_correlation_alert_get_next_alertident(idmef_correlation_alert_t *correlation_alert, idmef_alertident_t *alertident_cur) { prelude_list_t *tmp = (alertident_cur) ? &alertident_cur->list : NULL; prelude_return_val_if_fail(correlation_alert, NULL); prelude_list_for_each_continue(&correlation_alert->alertident_list, tmp) return prelude_list_entry(tmp, idmef_alertident_t, list); return NULL; } /** * idmef_correlation_alert_set_alertident: * @ptr: pointer to a #idmef_correlation_alert_t object. * @object: pointer to a #idmef_alertident_t object. * @pos: Position in the list. * * Add @object to position @pos of @ptr list of #idmef_alertident_t object. * * If @pos is #IDMEF_LIST_APPEND, @object will be inserted at the tail of the list. * If @pos is #IDMEF_LIST_PREPEND, @object will be inserted at the head of the list. */ void idmef_correlation_alert_set_alertident(idmef_correlation_alert_t *ptr, idmef_alertident_t *object, int pos) { prelude_return_if_fail(ptr); prelude_return_if_fail(object); if ( ! prelude_list_is_empty(&object->list) ) prelude_list_del_init(&object->list); list_insert(&ptr->alertident_list, &object->list, pos); } /** * idmef_correlation_alert_new_alertident: * @ptr: pointer to a #idmef_correlation_alert_t object. * @ret: pointer to an address where to store the created #idmef_alertident_t object. * @pos: position in the list. * * Create a new #idmef_alertident_t children of @ptr, and add it to position @pos of * @ptr list of #idmef_alertident_t object. The created #idmef_alertident_t object is * stored in @ret. * * If @pos is #IDMEF_LIST_APPEND, @object will be inserted at the tail of the list. * If @pos is #IDMEF_LIST_PREPEND, @object will be inserted at the head of the list. * * Returns: 0 on success, or a negative value if an error occured. */ int idmef_correlation_alert_new_alertident(idmef_correlation_alert_t *ptr, idmef_alertident_t **ret, int pos) { int retval; prelude_return_val_if_fail(ptr, prelude_error(PRELUDE_ERROR_ASSERTION)); retval = idmef_alertident_new(ret); if ( retval < 0 ) return retval; list_insert(&ptr->alertident_list, &(*ret)->list, pos); return 0; } /** * idmef_correlation_alert_copy: * @src: Source of the copy. * @dst: Where to copy the object. * * Copy a new #idmef_correlation_alert_t object from @src to @dst. * * Returns: 0 on success, a negative value if an error occured. */ int idmef_correlation_alert_copy(const idmef_correlation_alert_t *src, idmef_correlation_alert_t *dst) { int ret; prelude_return_val_if_fail(src, prelude_error(PRELUDE_ERROR_ASSERTION)); prelude_return_val_if_fail(dst, prelude_error(PRELUDE_ERROR_ASSERTION)); ret = 0; if ( src->name ) { ret = prelude_string_copy(src->name, dst->name); if ( ret < 0 ) return ret; } { prelude_list_t *n, *tmp; idmef_alertident_t *entry, *new; prelude_list_for_each_safe(&src->alertident_list, tmp, n) { entry = prelude_list_entry(tmp, idmef_alertident_t, list); idmef_alertident_clone(entry, &new); prelude_list_add_tail(&dst->alertident_list, &new->list); } } return 0; } /** * idmef_correlation_alert_clone: * @src: Object to be cloned. * @dst: Address where to store the pointer to the cloned object. * * Create a copy of @src, and store it in @dst. * * Returns: 0 on success, a negative value if an error occured. */ int idmef_correlation_alert_clone(idmef_correlation_alert_t *src, idmef_correlation_alert_t **dst) { int ret; prelude_return_val_if_fail(src, prelude_error(PRELUDE_ERROR_ASSERTION)); ret = idmef_correlation_alert_new(dst); if ( ret < 0 ) return ret; return idmef_correlation_alert_copy(src, *dst); } /** * idmef_correlation_alert_compare: * @obj1: Object to compare with @obj2. * @obj2: Object to compare with @obj1. * * Compare @obj1 with @obj2. * * Returns: 0 on match, a negative value on comparison failure. */ int idmef_correlation_alert_compare(const idmef_correlation_alert_t *obj1, const idmef_correlation_alert_t *obj2) { int ret = 0; if ( obj1 == NULL && obj2 == NULL ) return 0; else if ( obj1 == NULL || obj2 == NULL ) return -1; ret = prelude_string_compare(obj1->name, obj2->name); if ( ret != 0 ) return ret; { prelude_list_t *tmp1, *tmp2; idmef_alertident_t *entry1, *entry2; tmp1 = tmp2 = NULL; do { entry1 = entry2 = NULL; prelude_list_for_each_continue(&obj1->alertident_list, tmp1) { entry1 = prelude_list_entry(tmp1, idmef_alertident_t, list); break; } prelude_list_for_each_continue(&obj2->alertident_list, tmp2) { entry2 = prelude_list_entry(tmp2, idmef_alertident_t, list); break; } ret = idmef_alertident_compare(entry1, entry2); if ( ret != 0 ) return ret; } while ( entry1 && entry2 ); } return ret; } /** * idmef_overflow_alert_new: * @ret: Pointer where to store the created #idmef_overflow_alert_t object. * * Create a new #idmef_overflow_alert_t object. * * Returns: 0 on success, a negative value if an error occured. */ int idmef_overflow_alert_new(idmef_overflow_alert_t **ret) { *ret = calloc(1, sizeof(**ret)); if ( ! *ret ) return prelude_error_from_errno(errno); (*ret)->refcount = 1; { int retval = prelude_string_new(&(*ret)->program); if ( retval < 0 ) { idmef_overflow_alert_destroy(*ret); *ret = NULL; return retval; } } return 0; } /** * idmef_overflow_alert_ref: * @overflow_alert: pointer to a #idmef_overflow_alert_t object. * * Increase @overflow_alert reference count, so that it can be referenced * multiple time. * * Returns: a pointer to @overflow_alert. */ idmef_overflow_alert_t *idmef_overflow_alert_ref(idmef_overflow_alert_t *overflow_alert) { prelude_return_val_if_fail(overflow_alert, NULL); overflow_alert->refcount++; return overflow_alert; } int _idmef_overflow_alert_get_child(void *p, idmef_class_child_id_t child, void **childptr) { idmef_overflow_alert_t *ptr = p; prelude_return_val_if_fail(p, prelude_error(PRELUDE_ERROR_ASSERTION)); *childptr = NULL; switch ( child ) { case 0: return get_value_from_string((idmef_value_t **) childptr, ptr->program, TRUE); case 1: return (ptr->size_is_set) ? idmef_value_new_uint32((idmef_value_t **) childptr, ptr->size) : 0; case 2: return get_value_from_data((idmef_value_t **) childptr, ptr->buffer, TRUE); default: return prelude_error(PRELUDE_ERROR_IDMEF_CLASS_UNKNOWN_CHILD); } } int _idmef_overflow_alert_new_child(void *p, idmef_class_child_id_t child, int n, void **ret) { idmef_overflow_alert_t *ptr = p; prelude_return_val_if_fail(p, prelude_error(PRELUDE_ERROR_ASSERTION)); switch ( child ) { case 0: return idmef_overflow_alert_new_program(ptr, (prelude_string_t **) ret); case 1: return idmef_overflow_alert_new_size(ptr, (uint32_t **) ret); case 2: return idmef_overflow_alert_new_buffer(ptr, (idmef_data_t **) ret); default: return prelude_error(PRELUDE_ERROR_IDMEF_CLASS_UNKNOWN_CHILD); } } int _idmef_overflow_alert_destroy_child(void *p, idmef_class_child_id_t child, int n) { idmef_overflow_alert_t *ptr = p; prelude_return_val_if_fail(p, prelude_error(PRELUDE_ERROR_ASSERTION)); switch ( child ) { case 0: if ( ptr->program ) { prelude_string_destroy(ptr->program); ptr->program = NULL; } return 0; case 1: ptr->size_is_set = 0; return 0; case 2: if ( ptr->buffer ) { idmef_data_destroy(ptr->buffer); ptr->buffer = NULL; } return 0; default: return prelude_error(PRELUDE_ERROR_IDMEF_CLASS_UNKNOWN_CHILD); } } static void idmef_overflow_alert_destroy_internal(idmef_overflow_alert_t *ptr) { prelude_return_if_fail(ptr); if ( ptr->program ) { prelude_string_destroy(ptr->program); ptr->program = NULL; } if ( ptr->buffer ) { idmef_data_destroy(ptr->buffer); ptr->buffer = NULL; } /* free() should be done by the caller */ } /** * idmef_overflow_alert_destroy: * @ptr: pointer to a #idmef_overflow_alert_t object. * * Destroy @ptr and all of it's children. * The objects are only destroyed if their reference count reach zero. */ void idmef_overflow_alert_destroy(idmef_overflow_alert_t *ptr) { prelude_return_if_fail(ptr); if ( --ptr->refcount ) return; idmef_overflow_alert_destroy_internal(ptr); free(ptr); } /** * *idmef_overflow_alert_get_program: * @ptr: pointer to a #idmef_overflow_alert_t object. * * Get program children of the #idmef_overflow_alert_t object. * * Returns: a pointer to a prelude_string_t object, or NULL if the children object is not set. */ prelude_string_t *idmef_overflow_alert_get_program(idmef_overflow_alert_t *ptr) { prelude_return_val_if_fail(ptr, 0); /* FIXME */ return ptr->program; } /** * idmef_overflow_alert_set_program: * @ptr: pointer to a #idmef_overflow_alert_t object. * @program: pointer to a #prelude_string_t object. * * Set @program object as a children of @ptr. * if @ptr already contain an @program object, then it is destroyed, * and updated to point to the provided @program object. */ void idmef_overflow_alert_set_program(idmef_overflow_alert_t *ptr, prelude_string_t *program) { prelude_return_if_fail(ptr); if ( ptr->program ) prelude_string_destroy(ptr->program); ptr->program = program; } /** * idmef_overflow_alert_new_program: * @ptr: pointer to a #idmef_overflow_alert_t object. * @ret: pointer to an address where to store the created #prelude_string_t object. * * Create a new program object, children of #idmef_overflow_alert_t. * If @ptr already contain a #prelude_string_t object, then it is destroyed. * * Returns: 0 on success, or a negative value if an error occured. */ int idmef_overflow_alert_new_program(idmef_overflow_alert_t *ptr, prelude_string_t **ret) { int retval; prelude_return_val_if_fail(ptr, prelude_error(PRELUDE_ERROR_ASSERTION)); if ( ! ptr->program ) { retval = prelude_string_new(&ptr->program); if ( retval < 0 ) return retval; } *ret = ptr->program; return 0; } /** * *idmef_overflow_alert_get_size: * @ptr: pointer to a #idmef_overflow_alert_t object. * * Get size children of the #idmef_overflow_alert_t object. * * Returns: a pointer to a uint32_t object, or NULL if the children object is not set. */ uint32_t *idmef_overflow_alert_get_size(idmef_overflow_alert_t *ptr) { prelude_return_val_if_fail(ptr, 0); /* FIXME */ return ptr->size_is_set ? &ptr->size : NULL; } /** * idmef_overflow_alert_set_size: * @ptr: pointer to a #idmef_overflow_alert_t object. * @size: pointer to a #uint32_t object. * * Set @size object as a children of @ptr. * if @ptr already contain an @size object, then it is destroyed, * and updated to point to the provided @size object. */ void idmef_overflow_alert_set_size(idmef_overflow_alert_t *ptr, uint32_t size) { prelude_return_if_fail(ptr); ptr->size = size; ptr->size_is_set = 1; } void idmef_overflow_alert_unset_size(idmef_overflow_alert_t *ptr) { prelude_return_if_fail(ptr); ptr->size_is_set = 0; } /** * idmef_overflow_alert_new_size: * @ptr: pointer to a #idmef_overflow_alert_t object. * @ret: pointer to an address where to store the created #uint32_t object. * * Create a new size object, children of #idmef_overflow_alert_t. * If @ptr already contain a #uint32_t object, then it is destroyed. * * Returns: 0 on success, or a negative value if an error occured. */ int idmef_overflow_alert_new_size(idmef_overflow_alert_t *ptr, uint32_t **ret) { prelude_return_val_if_fail(ptr, prelude_error(PRELUDE_ERROR_ASSERTION)); ptr->size_is_set = 1; *ret = &ptr->size; return 0; } /** * *idmef_overflow_alert_get_buffer: * @ptr: pointer to a #idmef_overflow_alert_t object. * * Get buffer children of the #idmef_overflow_alert_t object. * * Returns: a pointer to a idmef_data_t object, or NULL if the children object is not set. */ idmef_data_t *idmef_overflow_alert_get_buffer(idmef_overflow_alert_t *ptr) { prelude_return_val_if_fail(ptr, 0); /* FIXME */ return ptr->buffer; } /** * idmef_overflow_alert_set_buffer: * @ptr: pointer to a #idmef_overflow_alert_t object. * @buffer: pointer to a #idmef_data_t object. * * Set @buffer object as a children of @ptr. * if @ptr already contain an @buffer object, then it is destroyed, * and updated to point to the provided @buffer object. */ void idmef_overflow_alert_set_buffer(idmef_overflow_alert_t *ptr, idmef_data_t *buffer) { prelude_return_if_fail(ptr); if ( ptr->buffer ) idmef_data_destroy(ptr->buffer); ptr->buffer = buffer; } /** * idmef_overflow_alert_new_buffer: * @ptr: pointer to a #idmef_overflow_alert_t object. * @ret: pointer to an address where to store the created #idmef_data_t object. * * Create a new buffer object, children of #idmef_overflow_alert_t. * If @ptr already contain a #idmef_data_t object, then it is destroyed. * * Returns: 0 on success, or a negative value if an error occured. */ int idmef_overflow_alert_new_buffer(idmef_overflow_alert_t *ptr, idmef_data_t **ret) { int retval; prelude_return_val_if_fail(ptr, prelude_error(PRELUDE_ERROR_ASSERTION)); if ( ! ptr->buffer ) { retval = idmef_data_new(&ptr->buffer); if ( retval < 0 ) return retval; } *ret = ptr->buffer; return 0; } /** * idmef_overflow_alert_copy: * @src: Source of the copy. * @dst: Where to copy the object. * * Copy a new #idmef_overflow_alert_t object from @src to @dst. * * Returns: 0 on success, a negative value if an error occured. */ int idmef_overflow_alert_copy(const idmef_overflow_alert_t *src, idmef_overflow_alert_t *dst) { int ret; prelude_return_val_if_fail(src, prelude_error(PRELUDE_ERROR_ASSERTION)); prelude_return_val_if_fail(dst, prelude_error(PRELUDE_ERROR_ASSERTION)); ret = 0; if ( src->program ) { ret = prelude_string_copy(src->program, dst->program); if ( ret < 0 ) return ret; } dst->size_is_set = src->size_is_set; dst->size = src->size; if ( src->buffer ) { ret = idmef_data_clone(src->buffer, &dst->buffer); if ( ret < 0 ) return ret; } return 0; } /** * idmef_overflow_alert_clone: * @src: Object to be cloned. * @dst: Address where to store the pointer to the cloned object. * * Create a copy of @src, and store it in @dst. * * Returns: 0 on success, a negative value if an error occured. */ int idmef_overflow_alert_clone(idmef_overflow_alert_t *src, idmef_overflow_alert_t **dst) { int ret; prelude_return_val_if_fail(src, prelude_error(PRELUDE_ERROR_ASSERTION)); ret = idmef_overflow_alert_new(dst); if ( ret < 0 ) return ret; return idmef_overflow_alert_copy(src, *dst); } /** * idmef_overflow_alert_compare: * @obj1: Object to compare with @obj2. * @obj2: Object to compare with @obj1. * * Compare @obj1 with @obj2. * * Returns: 0 on match, a negative value on comparison failure. */ int idmef_overflow_alert_compare(const idmef_overflow_alert_t *obj1, const idmef_overflow_alert_t *obj2) { int ret = 0; if ( obj1 == NULL && obj2 == NULL ) return 0; else if ( obj1 == NULL || obj2 == NULL ) return -1; ret = prelude_string_compare(obj1->program, obj2->program); if ( ret != 0 ) return ret; if ( obj1->size_is_set != obj2->size_is_set ) return -1; if ( obj1->size_is_set && obj1->size != obj2->size ) return -1; ret = idmef_data_compare(obj1->buffer, obj2->buffer); if ( ret != 0 ) return ret; return ret; } /** * idmef_alert_new: * @ret: Pointer where to store the created #idmef_alert_t object. * * Create a new #idmef_alert_t object. * * Returns: 0 on success, a negative value if an error occured. */ int idmef_alert_new(idmef_alert_t **ret) { *ret = calloc(1, sizeof(**ret)); if ( ! *ret ) return prelude_error_from_errno(errno); (*ret)->refcount = 1; prelude_list_init(&(*ret)->analyzer_list); prelude_list_init(&(*ret)->source_list); prelude_list_init(&(*ret)->target_list); prelude_list_init(&(*ret)->additional_data_list); { int retval = idmef_time_new(&(*ret)->create_time); if ( retval < 0 ) { idmef_alert_destroy(*ret); *ret = NULL; return retval; } } idmef_time_set_from_gettimeofday((*ret)->create_time); { int retval = idmef_classification_new(&(*ret)->classification); if ( retval < 0 ) { idmef_alert_destroy(*ret); *ret = NULL; return retval; } } return 0; } /** * idmef_alert_ref: * @alert: pointer to a #idmef_alert_t object. * * Increase @alert reference count, so that it can be referenced * multiple time. * * Returns: a pointer to @alert. */ idmef_alert_t *idmef_alert_ref(idmef_alert_t *alert) { prelude_return_val_if_fail(alert, NULL); alert->refcount++; return alert; } int _idmef_alert_get_child(void *p, idmef_class_child_id_t child, void **childptr) { idmef_alert_t *ptr = p; prelude_return_val_if_fail(p, prelude_error(PRELUDE_ERROR_ASSERTION)); *childptr = NULL; switch ( child ) { case 0: return get_value_from_string((idmef_value_t **) childptr, ptr->messageid, TRUE); case 1: *childptr = &ptr->analyzer_list; return 0; case 2: return get_value_from_time((idmef_value_t **) childptr, ptr->create_time, TRUE); case 3: *childptr = ptr->classification; return 0; case 4: return get_value_from_time((idmef_value_t **) childptr, ptr->detect_time, TRUE); case 5: return get_value_from_time((idmef_value_t **) childptr, ptr->analyzer_time, TRUE); case 6: *childptr = &ptr->source_list; return 0; case 7: *childptr = &ptr->target_list; return 0; case 8: *childptr = ptr->assessment; return 0; case 9: *childptr = &ptr->additional_data_list; return 0; case 10: *childptr = ( ptr->type == IDMEF_ALERT_TYPE_TOOL ) ? ptr->detail.tool_alert : NULL; return 0; case 11: *childptr = ( ptr->type == IDMEF_ALERT_TYPE_CORRELATION ) ? ptr->detail.correlation_alert : NULL; return 0; case 12: *childptr = ( ptr->type == IDMEF_ALERT_TYPE_OVERFLOW ) ? ptr->detail.overflow_alert : NULL; return 0; default: return prelude_error(PRELUDE_ERROR_IDMEF_CLASS_UNKNOWN_CHILD); } } int _idmef_alert_new_child(void *p, idmef_class_child_id_t child, int n, void **ret) { idmef_alert_t *ptr = p; prelude_return_val_if_fail(p, prelude_error(PRELUDE_ERROR_ASSERTION)); switch ( child ) { case 0: return idmef_alert_new_messageid(ptr, (prelude_string_t **) ret); case 1: { int i = 0; prelude_list_t *tmp; if ( n == IDMEF_LIST_APPEND || n == IDMEF_LIST_PREPEND ) return idmef_alert_new_analyzer(ptr, (idmef_analyzer_t **) ret, n); if ( n >= 0 ) { prelude_list_for_each(&ptr->analyzer_list, tmp) { if ( i++ == n ) { *ret = prelude_list_entry(tmp, idmef_analyzer_t, list); return 0; } } if ( i != n ) return prelude_error(PRELUDE_ERROR_IDMEF_TREE_INDEX_UNDEFINED); } else { int pos = (-n) - 1; /* With negative value, -1 is the base, translate to 0 */ prelude_list_for_each_reversed(&ptr->analyzer_list, tmp) { if ( i++ == pos ) { *ret = prelude_list_entry(tmp, idmef_analyzer_t, list); return 0; } } if ( i != pos ) return prelude_error(PRELUDE_ERROR_IDMEF_TREE_INDEX_UNDEFINED); } return idmef_alert_new_analyzer(ptr, (idmef_analyzer_t **) ret, n); } case 2: return idmef_alert_new_create_time(ptr, (idmef_time_t **) ret); case 3: return idmef_alert_new_classification(ptr, (idmef_classification_t **) ret); case 4: return idmef_alert_new_detect_time(ptr, (idmef_time_t **) ret); case 5: return idmef_alert_new_analyzer_time(ptr, (idmef_time_t **) ret); case 6: { int i = 0; prelude_list_t *tmp; if ( n == IDMEF_LIST_APPEND || n == IDMEF_LIST_PREPEND ) return idmef_alert_new_source(ptr, (idmef_source_t **) ret, n); if ( n >= 0 ) { prelude_list_for_each(&ptr->source_list, tmp) { if ( i++ == n ) { *ret = prelude_list_entry(tmp, idmef_source_t, list); return 0; } } if ( i != n ) return prelude_error(PRELUDE_ERROR_IDMEF_TREE_INDEX_UNDEFINED); } else { int pos = (-n) - 1; /* With negative value, -1 is the base, translate to 0 */ prelude_list_for_each_reversed(&ptr->source_list, tmp) { if ( i++ == pos ) { *ret = prelude_list_entry(tmp, idmef_source_t, list); return 0; } } if ( i != pos ) return prelude_error(PRELUDE_ERROR_IDMEF_TREE_INDEX_UNDEFINED); } return idmef_alert_new_source(ptr, (idmef_source_t **) ret, n); } case 7: { int i = 0; prelude_list_t *tmp; if ( n == IDMEF_LIST_APPEND || n == IDMEF_LIST_PREPEND ) return idmef_alert_new_target(ptr, (idmef_target_t **) ret, n); if ( n >= 0 ) { prelude_list_for_each(&ptr->target_list, tmp) { if ( i++ == n ) { *ret = prelude_list_entry(tmp, idmef_target_t, list); return 0; } } if ( i != n ) return prelude_error(PRELUDE_ERROR_IDMEF_TREE_INDEX_UNDEFINED); } else { int pos = (-n) - 1; /* With negative value, -1 is the base, translate to 0 */ prelude_list_for_each_reversed(&ptr->target_list, tmp) { if ( i++ == pos ) { *ret = prelude_list_entry(tmp, idmef_target_t, list); return 0; } } if ( i != pos ) return prelude_error(PRELUDE_ERROR_IDMEF_TREE_INDEX_UNDEFINED); } return idmef_alert_new_target(ptr, (idmef_target_t **) ret, n); } case 8: return idmef_alert_new_assessment(ptr, (idmef_assessment_t **) ret); case 9: { int i = 0; prelude_list_t *tmp; if ( n == IDMEF_LIST_APPEND || n == IDMEF_LIST_PREPEND ) return idmef_alert_new_additional_data(ptr, (idmef_additional_data_t **) ret, n); if ( n >= 0 ) { prelude_list_for_each(&ptr->additional_data_list, tmp) { if ( i++ == n ) { *ret = prelude_list_entry(tmp, idmef_additional_data_t, list); return 0; } } if ( i != n ) return prelude_error(PRELUDE_ERROR_IDMEF_TREE_INDEX_UNDEFINED); } else { int pos = (-n) - 1; /* With negative value, -1 is the base, translate to 0 */ prelude_list_for_each_reversed(&ptr->additional_data_list, tmp) { if ( i++ == pos ) { *ret = prelude_list_entry(tmp, idmef_additional_data_t, list); return 0; } } if ( i != pos ) return prelude_error(PRELUDE_ERROR_IDMEF_TREE_INDEX_UNDEFINED); } return idmef_alert_new_additional_data(ptr, (idmef_additional_data_t **) ret, n); } case 10: return idmef_alert_new_tool_alert(ptr, (idmef_tool_alert_t **) ret); case 11: return idmef_alert_new_correlation_alert(ptr, (idmef_correlation_alert_t **) ret); case 12: return idmef_alert_new_overflow_alert(ptr, (idmef_overflow_alert_t **) ret); default: return prelude_error(PRELUDE_ERROR_IDMEF_CLASS_UNKNOWN_CHILD); } } int _idmef_alert_destroy_child(void *p, idmef_class_child_id_t child, int n) { idmef_alert_t *ptr = p; prelude_return_val_if_fail(p, prelude_error(PRELUDE_ERROR_ASSERTION)); switch ( child ) { case 0: if ( ptr->messageid ) { prelude_string_destroy(ptr->messageid); ptr->messageid = NULL; } return 0; case 1: { int i = 0; prelude_list_t *tmp; if ( n >= 0 ) { prelude_list_for_each(&ptr->analyzer_list, tmp) { if ( i++ == n ) { void *b = prelude_list_entry(tmp, idmef_analyzer_t, list); idmef_analyzer_destroy(b); return 0; } } if ( i != n ) return prelude_error(PRELUDE_ERROR_IDMEF_TREE_INDEX_UNDEFINED); } else { int pos = (-n) - 1; /* With negative value, -1 is the base, translate to 0 */ prelude_list_for_each_reversed(&ptr->analyzer_list, tmp) { if ( i++ == pos ) { void *b = prelude_list_entry(tmp, idmef_analyzer_t, list); idmef_analyzer_destroy(b); return 0; } } if ( i != pos ) return prelude_error(PRELUDE_ERROR_IDMEF_TREE_INDEX_UNDEFINED); } } case 2: if ( ptr->create_time ) { idmef_time_destroy(ptr->create_time); ptr->create_time = NULL; } return 0; case 3: if ( ptr->classification ) { idmef_classification_destroy(ptr->classification); ptr->classification = NULL; } return 0; case 4: if ( ptr->detect_time ) { idmef_time_destroy(ptr->detect_time); ptr->detect_time = NULL; } return 0; case 5: if ( ptr->analyzer_time ) { idmef_time_destroy(ptr->analyzer_time); ptr->analyzer_time = NULL; } return 0; case 6: { int i = 0; prelude_list_t *tmp; if ( n >= 0 ) { prelude_list_for_each(&ptr->source_list, tmp) { if ( i++ == n ) { void *b = prelude_list_entry(tmp, idmef_source_t, list); idmef_source_destroy(b); return 0; } } if ( i != n ) return prelude_error(PRELUDE_ERROR_IDMEF_TREE_INDEX_UNDEFINED); } else { int pos = (-n) - 1; /* With negative value, -1 is the base, translate to 0 */ prelude_list_for_each_reversed(&ptr->source_list, tmp) { if ( i++ == pos ) { void *b = prelude_list_entry(tmp, idmef_source_t, list); idmef_source_destroy(b); return 0; } } if ( i != pos ) return prelude_error(PRELUDE_ERROR_IDMEF_TREE_INDEX_UNDEFINED); } } case 7: { int i = 0; prelude_list_t *tmp; if ( n >= 0 ) { prelude_list_for_each(&ptr->target_list, tmp) { if ( i++ == n ) { void *b = prelude_list_entry(tmp, idmef_target_t, list); idmef_target_destroy(b); return 0; } } if ( i != n ) return prelude_error(PRELUDE_ERROR_IDMEF_TREE_INDEX_UNDEFINED); } else { int pos = (-n) - 1; /* With negative value, -1 is the base, translate to 0 */ prelude_list_for_each_reversed(&ptr->target_list, tmp) { if ( i++ == pos ) { void *b = prelude_list_entry(tmp, idmef_target_t, list); idmef_target_destroy(b); return 0; } } if ( i != pos ) return prelude_error(PRELUDE_ERROR_IDMEF_TREE_INDEX_UNDEFINED); } } case 8: if ( ptr->assessment ) { idmef_assessment_destroy(ptr->assessment); ptr->assessment = NULL; } return 0; case 9: { int i = 0; prelude_list_t *tmp; if ( n >= 0 ) { prelude_list_for_each(&ptr->additional_data_list, tmp) { if ( i++ == n ) { void *b = prelude_list_entry(tmp, idmef_additional_data_t, list); idmef_additional_data_destroy(b); return 0; } } if ( i != n ) return prelude_error(PRELUDE_ERROR_IDMEF_TREE_INDEX_UNDEFINED); } else { int pos = (-n) - 1; /* With negative value, -1 is the base, translate to 0 */ prelude_list_for_each_reversed(&ptr->additional_data_list, tmp) { if ( i++ == pos ) { void *b = prelude_list_entry(tmp, idmef_additional_data_t, list); idmef_additional_data_destroy(b); return 0; } } if ( i != pos ) return prelude_error(PRELUDE_ERROR_IDMEF_TREE_INDEX_UNDEFINED); } } case 10: if ( ptr->type != IDMEF_ALERT_TYPE_TOOL ) return 0; idmef_tool_alert_destroy(ptr->detail.tool_alert); ptr->detail.tool_alert = NULL; ptr->type = 0; return 0; case 11: if ( ptr->type != IDMEF_ALERT_TYPE_CORRELATION ) return 0; idmef_correlation_alert_destroy(ptr->detail.correlation_alert); ptr->detail.correlation_alert = NULL; ptr->type = 0; return 0; case 12: if ( ptr->type != IDMEF_ALERT_TYPE_OVERFLOW ) return 0; idmef_overflow_alert_destroy(ptr->detail.overflow_alert); ptr->detail.overflow_alert = NULL; ptr->type = 0; return 0; default: return prelude_error(PRELUDE_ERROR_IDMEF_CLASS_UNKNOWN_CHILD); } } static void idmef_alert_destroy_internal(idmef_alert_t *ptr) { prelude_return_if_fail(ptr); if ( ptr->messageid ) { prelude_string_destroy(ptr->messageid); ptr->messageid = NULL; } { prelude_list_t *n, *tmp; idmef_analyzer_t *entry; prelude_list_for_each_safe(&ptr->analyzer_list, tmp, n) { entry = prelude_list_entry(tmp, idmef_analyzer_t, list); prelude_list_del_init(&entry->list); idmef_analyzer_destroy(entry); } } if ( ptr->create_time ) { idmef_time_destroy(ptr->create_time); ptr->create_time = NULL; } if ( ptr->classification ) { idmef_classification_destroy(ptr->classification); ptr->classification = NULL; } if ( ptr->detect_time ) { idmef_time_destroy(ptr->detect_time); ptr->detect_time = NULL; } if ( ptr->analyzer_time ) { idmef_time_destroy(ptr->analyzer_time); ptr->analyzer_time = NULL; } { prelude_list_t *n, *tmp; idmef_source_t *entry; prelude_list_for_each_safe(&ptr->source_list, tmp, n) { entry = prelude_list_entry(tmp, idmef_source_t, list); prelude_list_del_init(&entry->list); idmef_source_destroy(entry); } } { prelude_list_t *n, *tmp; idmef_target_t *entry; prelude_list_for_each_safe(&ptr->target_list, tmp, n) { entry = prelude_list_entry(tmp, idmef_target_t, list); prelude_list_del_init(&entry->list); idmef_target_destroy(entry); } } if ( ptr->assessment ) { idmef_assessment_destroy(ptr->assessment); ptr->assessment = NULL; } { prelude_list_t *n, *tmp; idmef_additional_data_t *entry; prelude_list_for_each_safe(&ptr->additional_data_list, tmp, n) { entry = prelude_list_entry(tmp, idmef_additional_data_t, list); prelude_list_del_init(&entry->list); idmef_additional_data_destroy(entry); } } switch ( ptr->type ) { case IDMEF_ALERT_TYPE_TOOL: idmef_tool_alert_destroy(ptr->detail.tool_alert); ptr->detail.tool_alert = NULL; break; case IDMEF_ALERT_TYPE_CORRELATION: idmef_correlation_alert_destroy(ptr->detail.correlation_alert); ptr->detail.correlation_alert = NULL; break; case IDMEF_ALERT_TYPE_OVERFLOW: idmef_overflow_alert_destroy(ptr->detail.overflow_alert); ptr->detail.overflow_alert = NULL; break; default: break; } /* free() should be done by the caller */ } /** * idmef_alert_destroy: * @ptr: pointer to a #idmef_alert_t object. * * Destroy @ptr and all of it's children. * The objects are only destroyed if their reference count reach zero. */ void idmef_alert_destroy(idmef_alert_t *ptr) { prelude_return_if_fail(ptr); if ( --ptr->refcount ) return; idmef_alert_destroy_internal(ptr); free(ptr); } /** * *idmef_alert_get_messageid: * @ptr: pointer to a #idmef_alert_t object. * * Get messageid children of the #idmef_alert_t object. * * Returns: a pointer to a prelude_string_t object, or NULL if the children object is not set. */ prelude_string_t *idmef_alert_get_messageid(idmef_alert_t *ptr) { prelude_return_val_if_fail(ptr, 0); /* FIXME */ return ptr->messageid; } /** * idmef_alert_set_messageid: * @ptr: pointer to a #idmef_alert_t object. * @messageid: pointer to a #prelude_string_t object. * * Set @messageid object as a children of @ptr. * if @ptr already contain an @messageid object, then it is destroyed, * and updated to point to the provided @messageid object. */ void idmef_alert_set_messageid(idmef_alert_t *ptr, prelude_string_t *messageid) { prelude_return_if_fail(ptr); if ( ptr->messageid ) prelude_string_destroy(ptr->messageid); ptr->messageid = messageid; } /** * idmef_alert_new_messageid: * @ptr: pointer to a #idmef_alert_t object. * @ret: pointer to an address where to store the created #prelude_string_t object. * * Create a new messageid object, children of #idmef_alert_t. * If @ptr already contain a #prelude_string_t object, then it is destroyed. * * Returns: 0 on success, or a negative value if an error occured. */ int idmef_alert_new_messageid(idmef_alert_t *ptr, prelude_string_t **ret) { int retval; prelude_return_val_if_fail(ptr, prelude_error(PRELUDE_ERROR_ASSERTION)); if ( ! ptr->messageid ) { retval = prelude_string_new(&ptr->messageid); if ( retval < 0 ) return retval; } *ret = ptr->messageid; return 0; } /** * idmef_alert_get_next_analyzer: * @alert: pointer to a #idmef_alert_t object. * @analyzer_cur: pointer to a #idmef_analyzer_t object. * * Get the next #idmef_analyzer_t object listed in @ptr. * When iterating over the idmef_analyzer_t object listed in @ptr, * @object should be set to the latest returned #idmef_analyzer_t object. * * Returns: the next #idmef_analyzer_t in the list. */ idmef_analyzer_t *idmef_alert_get_next_analyzer(idmef_alert_t *alert, idmef_analyzer_t *analyzer_cur) { prelude_list_t *tmp = (analyzer_cur) ? &analyzer_cur->list : NULL; prelude_return_val_if_fail(alert, NULL); prelude_list_for_each_continue(&alert->analyzer_list, tmp) return prelude_list_entry(tmp, idmef_analyzer_t, list); return NULL; } /** * idmef_alert_set_analyzer: * @ptr: pointer to a #idmef_alert_t object. * @object: pointer to a #idmef_analyzer_t object. * @pos: Position in the list. * * Add @object to position @pos of @ptr list of #idmef_analyzer_t object. * * If @pos is #IDMEF_LIST_APPEND, @object will be inserted at the tail of the list. * If @pos is #IDMEF_LIST_PREPEND, @object will be inserted at the head of the list. */ void idmef_alert_set_analyzer(idmef_alert_t *ptr, idmef_analyzer_t *object, int pos) { prelude_return_if_fail(ptr); prelude_return_if_fail(object); if ( ! prelude_list_is_empty(&object->list) ) prelude_list_del_init(&object->list); list_insert(&ptr->analyzer_list, &object->list, pos); } /** * idmef_alert_new_analyzer: * @ptr: pointer to a #idmef_alert_t object. * @ret: pointer to an address where to store the created #idmef_analyzer_t object. * @pos: position in the list. * * Create a new #idmef_analyzer_t children of @ptr, and add it to position @pos of * @ptr list of #idmef_analyzer_t object. The created #idmef_analyzer_t object is * stored in @ret. * * If @pos is #IDMEF_LIST_APPEND, @object will be inserted at the tail of the list. * If @pos is #IDMEF_LIST_PREPEND, @object will be inserted at the head of the list. * * Returns: 0 on success, or a negative value if an error occured. */ int idmef_alert_new_analyzer(idmef_alert_t *ptr, idmef_analyzer_t **ret, int pos) { int retval; prelude_return_val_if_fail(ptr, prelude_error(PRELUDE_ERROR_ASSERTION)); retval = idmef_analyzer_new(ret); if ( retval < 0 ) return retval; list_insert(&ptr->analyzer_list, &(*ret)->list, pos); return 0; } /** * *idmef_alert_get_create_time: * @ptr: pointer to a #idmef_alert_t object. * * Get create_time children of the #idmef_alert_t object. * * Returns: a pointer to a idmef_time_t object, or NULL if the children object is not set. */ idmef_time_t *idmef_alert_get_create_time(idmef_alert_t *ptr) { prelude_return_val_if_fail(ptr, 0); /* FIXME */ return ptr->create_time; } /** * idmef_alert_set_create_time: * @ptr: pointer to a #idmef_alert_t object. * @create_time: pointer to a #idmef_time_t object. * * Set @create_time object as a children of @ptr. * if @ptr already contain an @create_time object, then it is destroyed, * and updated to point to the provided @create_time object. */ void idmef_alert_set_create_time(idmef_alert_t *ptr, idmef_time_t *create_time) { prelude_return_if_fail(ptr); if ( ptr->create_time ) idmef_time_destroy(ptr->create_time); ptr->create_time = create_time; } /** * idmef_alert_new_create_time: * @ptr: pointer to a #idmef_alert_t object. * @ret: pointer to an address where to store the created #idmef_time_t object. * * Create a new create_time object, children of #idmef_alert_t. * If @ptr already contain a #idmef_time_t object, then it is destroyed. * * Returns: 0 on success, or a negative value if an error occured. */ int idmef_alert_new_create_time(idmef_alert_t *ptr, idmef_time_t **ret) { int retval; prelude_return_val_if_fail(ptr, prelude_error(PRELUDE_ERROR_ASSERTION)); if ( ! ptr->create_time ) { retval = idmef_time_new(&ptr->create_time); if ( retval < 0 ) return retval; } *ret = ptr->create_time; return 0; } /** * *idmef_alert_get_classification: * @ptr: pointer to a #idmef_alert_t object. * * Get classification children of the #idmef_alert_t object. * * Returns: a pointer to a idmef_classification_t object, or NULL if the children object is not set. */ idmef_classification_t *idmef_alert_get_classification(idmef_alert_t *ptr) { prelude_return_val_if_fail(ptr, 0); /* FIXME */ return ptr->classification; } /** * idmef_alert_set_classification: * @ptr: pointer to a #idmef_alert_t object. * @classification: pointer to a #idmef_classification_t object. * * Set @classification object as a children of @ptr. * if @ptr already contain an @classification object, then it is destroyed, * and updated to point to the provided @classification object. */ void idmef_alert_set_classification(idmef_alert_t *ptr, idmef_classification_t *classification) { prelude_return_if_fail(ptr); if ( ptr->classification ) idmef_classification_destroy(ptr->classification); ptr->classification = classification; } /** * idmef_alert_new_classification: * @ptr: pointer to a #idmef_alert_t object. * @ret: pointer to an address where to store the created #idmef_classification_t object. * * Create a new classification object, children of #idmef_alert_t. * If @ptr already contain a #idmef_classification_t object, then it is destroyed. * * Returns: 0 on success, or a negative value if an error occured. */ int idmef_alert_new_classification(idmef_alert_t *ptr, idmef_classification_t **ret) { int retval; prelude_return_val_if_fail(ptr, prelude_error(PRELUDE_ERROR_ASSERTION)); if ( ! ptr->classification ) { retval = idmef_classification_new(&ptr->classification); if ( retval < 0 ) return retval; } *ret = ptr->classification; return 0; } /** * *idmef_alert_get_detect_time: * @ptr: pointer to a #idmef_alert_t object. * * Get detect_time children of the #idmef_alert_t object. * * Returns: a pointer to a idmef_time_t object, or NULL if the children object is not set. */ idmef_time_t *idmef_alert_get_detect_time(idmef_alert_t *ptr) { prelude_return_val_if_fail(ptr, 0); /* FIXME */ return ptr->detect_time; } /** * idmef_alert_set_detect_time: * @ptr: pointer to a #idmef_alert_t object. * @detect_time: pointer to a #idmef_time_t object. * * Set @detect_time object as a children of @ptr. * if @ptr already contain an @detect_time object, then it is destroyed, * and updated to point to the provided @detect_time object. */ void idmef_alert_set_detect_time(idmef_alert_t *ptr, idmef_time_t *detect_time) { prelude_return_if_fail(ptr); if ( ptr->detect_time ) idmef_time_destroy(ptr->detect_time); ptr->detect_time = detect_time; } /** * idmef_alert_new_detect_time: * @ptr: pointer to a #idmef_alert_t object. * @ret: pointer to an address where to store the created #idmef_time_t object. * * Create a new detect_time object, children of #idmef_alert_t. * If @ptr already contain a #idmef_time_t object, then it is destroyed. * * Returns: 0 on success, or a negative value if an error occured. */ int idmef_alert_new_detect_time(idmef_alert_t *ptr, idmef_time_t **ret) { int retval; prelude_return_val_if_fail(ptr, prelude_error(PRELUDE_ERROR_ASSERTION)); if ( ! ptr->detect_time ) { retval = idmef_time_new(&ptr->detect_time); if ( retval < 0 ) return retval; } *ret = ptr->detect_time; return 0; } /** * *idmef_alert_get_analyzer_time: * @ptr: pointer to a #idmef_alert_t object. * * Get analyzer_time children of the #idmef_alert_t object. * * Returns: a pointer to a idmef_time_t object, or NULL if the children object is not set. */ idmef_time_t *idmef_alert_get_analyzer_time(idmef_alert_t *ptr) { prelude_return_val_if_fail(ptr, 0); /* FIXME */ return ptr->analyzer_time; } /** * idmef_alert_set_analyzer_time: * @ptr: pointer to a #idmef_alert_t object. * @analyzer_time: pointer to a #idmef_time_t object. * * Set @analyzer_time object as a children of @ptr. * if @ptr already contain an @analyzer_time object, then it is destroyed, * and updated to point to the provided @analyzer_time object. */ void idmef_alert_set_analyzer_time(idmef_alert_t *ptr, idmef_time_t *analyzer_time) { prelude_return_if_fail(ptr); if ( ptr->analyzer_time ) idmef_time_destroy(ptr->analyzer_time); ptr->analyzer_time = analyzer_time; } /** * idmef_alert_new_analyzer_time: * @ptr: pointer to a #idmef_alert_t object. * @ret: pointer to an address where to store the created #idmef_time_t object. * * Create a new analyzer_time object, children of #idmef_alert_t. * If @ptr already contain a #idmef_time_t object, then it is destroyed. * * Returns: 0 on success, or a negative value if an error occured. */ int idmef_alert_new_analyzer_time(idmef_alert_t *ptr, idmef_time_t **ret) { int retval; prelude_return_val_if_fail(ptr, prelude_error(PRELUDE_ERROR_ASSERTION)); if ( ! ptr->analyzer_time ) { retval = idmef_time_new(&ptr->analyzer_time); if ( retval < 0 ) return retval; } *ret = ptr->analyzer_time; return 0; } /** * idmef_alert_get_next_source: * @alert: pointer to a #idmef_alert_t object. * @source_cur: pointer to a #idmef_source_t object. * * Get the next #idmef_source_t object listed in @ptr. * When iterating over the idmef_source_t object listed in @ptr, * @object should be set to the latest returned #idmef_source_t object. * * Returns: the next #idmef_source_t in the list. */ idmef_source_t *idmef_alert_get_next_source(idmef_alert_t *alert, idmef_source_t *source_cur) { prelude_list_t *tmp = (source_cur) ? &source_cur->list : NULL; prelude_return_val_if_fail(alert, NULL); prelude_list_for_each_continue(&alert->source_list, tmp) return prelude_list_entry(tmp, idmef_source_t, list); return NULL; } /** * idmef_alert_set_source: * @ptr: pointer to a #idmef_alert_t object. * @object: pointer to a #idmef_source_t object. * @pos: Position in the list. * * Add @object to position @pos of @ptr list of #idmef_source_t object. * * If @pos is #IDMEF_LIST_APPEND, @object will be inserted at the tail of the list. * If @pos is #IDMEF_LIST_PREPEND, @object will be inserted at the head of the list. */ void idmef_alert_set_source(idmef_alert_t *ptr, idmef_source_t *object, int pos) { prelude_return_if_fail(ptr); prelude_return_if_fail(object); if ( ! prelude_list_is_empty(&object->list) ) prelude_list_del_init(&object->list); list_insert(&ptr->source_list, &object->list, pos); } /** * idmef_alert_new_source: * @ptr: pointer to a #idmef_alert_t object. * @ret: pointer to an address where to store the created #idmef_source_t object. * @pos: position in the list. * * Create a new #idmef_source_t children of @ptr, and add it to position @pos of * @ptr list of #idmef_source_t object. The created #idmef_source_t object is * stored in @ret. * * If @pos is #IDMEF_LIST_APPEND, @object will be inserted at the tail of the list. * If @pos is #IDMEF_LIST_PREPEND, @object will be inserted at the head of the list. * * Returns: 0 on success, or a negative value if an error occured. */ int idmef_alert_new_source(idmef_alert_t *ptr, idmef_source_t **ret, int pos) { int retval; prelude_return_val_if_fail(ptr, prelude_error(PRELUDE_ERROR_ASSERTION)); retval = idmef_source_new(ret); if ( retval < 0 ) return retval; list_insert(&ptr->source_list, &(*ret)->list, pos); return 0; } /** * idmef_alert_get_next_target: * @alert: pointer to a #idmef_alert_t object. * @target_cur: pointer to a #idmef_target_t object. * * Get the next #idmef_target_t object listed in @ptr. * When iterating over the idmef_target_t object listed in @ptr, * @object should be set to the latest returned #idmef_target_t object. * * Returns: the next #idmef_target_t in the list. */ idmef_target_t *idmef_alert_get_next_target(idmef_alert_t *alert, idmef_target_t *target_cur) { prelude_list_t *tmp = (target_cur) ? &target_cur->list : NULL; prelude_return_val_if_fail(alert, NULL); prelude_list_for_each_continue(&alert->target_list, tmp) return prelude_list_entry(tmp, idmef_target_t, list); return NULL; } /** * idmef_alert_set_target: * @ptr: pointer to a #idmef_alert_t object. * @object: pointer to a #idmef_target_t object. * @pos: Position in the list. * * Add @object to position @pos of @ptr list of #idmef_target_t object. * * If @pos is #IDMEF_LIST_APPEND, @object will be inserted at the tail of the list. * If @pos is #IDMEF_LIST_PREPEND, @object will be inserted at the head of the list. */ void idmef_alert_set_target(idmef_alert_t *ptr, idmef_target_t *object, int pos) { prelude_return_if_fail(ptr); prelude_return_if_fail(object); if ( ! prelude_list_is_empty(&object->list) ) prelude_list_del_init(&object->list); list_insert(&ptr->target_list, &object->list, pos); } /** * idmef_alert_new_target: * @ptr: pointer to a #idmef_alert_t object. * @ret: pointer to an address where to store the created #idmef_target_t object. * @pos: position in the list. * * Create a new #idmef_target_t children of @ptr, and add it to position @pos of * @ptr list of #idmef_target_t object. The created #idmef_target_t object is * stored in @ret. * * If @pos is #IDMEF_LIST_APPEND, @object will be inserted at the tail of the list. * If @pos is #IDMEF_LIST_PREPEND, @object will be inserted at the head of the list. * * Returns: 0 on success, or a negative value if an error occured. */ int idmef_alert_new_target(idmef_alert_t *ptr, idmef_target_t **ret, int pos) { int retval; prelude_return_val_if_fail(ptr, prelude_error(PRELUDE_ERROR_ASSERTION)); retval = idmef_target_new(ret); if ( retval < 0 ) return retval; list_insert(&ptr->target_list, &(*ret)->list, pos); return 0; } /** * *idmef_alert_get_assessment: * @ptr: pointer to a #idmef_alert_t object. * * Get assessment children of the #idmef_alert_t object. * * Returns: a pointer to a idmef_assessment_t object, or NULL if the children object is not set. */ idmef_assessment_t *idmef_alert_get_assessment(idmef_alert_t *ptr) { prelude_return_val_if_fail(ptr, 0); /* FIXME */ return ptr->assessment; } /** * idmef_alert_set_assessment: * @ptr: pointer to a #idmef_alert_t object. * @assessment: pointer to a #idmef_assessment_t object. * * Set @assessment object as a children of @ptr. * if @ptr already contain an @assessment object, then it is destroyed, * and updated to point to the provided @assessment object. */ void idmef_alert_set_assessment(idmef_alert_t *ptr, idmef_assessment_t *assessment) { prelude_return_if_fail(ptr); if ( ptr->assessment ) idmef_assessment_destroy(ptr->assessment); ptr->assessment = assessment; } /** * idmef_alert_new_assessment: * @ptr: pointer to a #idmef_alert_t object. * @ret: pointer to an address where to store the created #idmef_assessment_t object. * * Create a new assessment object, children of #idmef_alert_t. * If @ptr already contain a #idmef_assessment_t object, then it is destroyed. * * Returns: 0 on success, or a negative value if an error occured. */ int idmef_alert_new_assessment(idmef_alert_t *ptr, idmef_assessment_t **ret) { int retval; prelude_return_val_if_fail(ptr, prelude_error(PRELUDE_ERROR_ASSERTION)); if ( ! ptr->assessment ) { retval = idmef_assessment_new(&ptr->assessment); if ( retval < 0 ) return retval; } *ret = ptr->assessment; return 0; } /** * idmef_alert_get_next_additional_data: * @alert: pointer to a #idmef_alert_t object. * @additional_data_cur: pointer to a #idmef_additional_data_t object. * * Get the next #idmef_additional_data_t object listed in @ptr. * When iterating over the idmef_additional_data_t object listed in @ptr, * @object should be set to the latest returned #idmef_additional_data_t object. * * Returns: the next #idmef_additional_data_t in the list. */ idmef_additional_data_t *idmef_alert_get_next_additional_data(idmef_alert_t *alert, idmef_additional_data_t *additional_data_cur) { prelude_list_t *tmp = (additional_data_cur) ? &additional_data_cur->list : NULL; prelude_return_val_if_fail(alert, NULL); prelude_list_for_each_continue(&alert->additional_data_list, tmp) return prelude_list_entry(tmp, idmef_additional_data_t, list); return NULL; } /** * idmef_alert_set_additional_data: * @ptr: pointer to a #idmef_alert_t object. * @object: pointer to a #idmef_additional_data_t object. * @pos: Position in the list. * * Add @object to position @pos of @ptr list of #idmef_additional_data_t object. * * If @pos is #IDMEF_LIST_APPEND, @object will be inserted at the tail of the list. * If @pos is #IDMEF_LIST_PREPEND, @object will be inserted at the head of the list. */ void idmef_alert_set_additional_data(idmef_alert_t *ptr, idmef_additional_data_t *object, int pos) { prelude_return_if_fail(ptr); prelude_return_if_fail(object); if ( ! prelude_list_is_empty(&object->list) ) prelude_list_del_init(&object->list); list_insert(&ptr->additional_data_list, &object->list, pos); } /** * idmef_alert_new_additional_data: * @ptr: pointer to a #idmef_alert_t object. * @ret: pointer to an address where to store the created #idmef_additional_data_t object. * @pos: position in the list. * * Create a new #idmef_additional_data_t children of @ptr, and add it to position @pos of * @ptr list of #idmef_additional_data_t object. The created #idmef_additional_data_t object is * stored in @ret. * * If @pos is #IDMEF_LIST_APPEND, @object will be inserted at the tail of the list. * If @pos is #IDMEF_LIST_PREPEND, @object will be inserted at the head of the list. * * Returns: 0 on success, or a negative value if an error occured. */ int idmef_alert_new_additional_data(idmef_alert_t *ptr, idmef_additional_data_t **ret, int pos) { int retval; prelude_return_val_if_fail(ptr, prelude_error(PRELUDE_ERROR_ASSERTION)); retval = idmef_additional_data_new(ret); if ( retval < 0 ) return retval; list_insert(&ptr->additional_data_list, &(*ret)->list, pos); return 0; } /** * idmef_alert_get_type: * @ptr: pointer to a #idmef_alert_t object. * * Access the type children of @ptr. * * Returns: a pointer to the #idmef_alert_type_t children, or NULL if it is not set. */ idmef_alert_type_t idmef_alert_get_type(idmef_alert_t *ptr) { prelude_return_val_if_fail(ptr, prelude_error(PRELUDE_ERROR_ASSERTION)); return ptr->type; } /** * idmef_alert_get_tool_alert: * @ptr: pointer to a #idmef_alert_t object. * * Access the tool_alert children of @ptr. * * Returns: a pointer to the #idmef_tool_alert_t children, or NULL if it is not set. */ idmef_tool_alert_t *idmef_alert_get_tool_alert(idmef_alert_t *ptr) { prelude_return_val_if_fail(ptr, NULL); return (ptr->type == IDMEF_ALERT_TYPE_TOOL) ? ptr->detail.tool_alert : NULL; } /** * idmef_alert_set_tool_alert: * @ptr: pointer to a #idmef_alert_t object. * @tool_alert: pointer to a #idmef_tool_alert_t object. * * Set @tool_alert object as a children of @ptr. * if @ptr already contain a @tool_alert object, then it is destroyed, * and updated to point to the provided @tool_alert object. */ void idmef_alert_set_tool_alert(idmef_alert_t *ptr, idmef_tool_alert_t *tool_alert) { prelude_return_if_fail(ptr); switch ( ptr->type ) { case IDMEF_ALERT_TYPE_TOOL: idmef_tool_alert_destroy(ptr->detail.tool_alert); break; case IDMEF_ALERT_TYPE_CORRELATION: idmef_correlation_alert_destroy(ptr->detail.correlation_alert); break; case IDMEF_ALERT_TYPE_OVERFLOW: idmef_overflow_alert_destroy(ptr->detail.overflow_alert); break; default: break; } ptr->detail.tool_alert = tool_alert; ptr->type = (tool_alert) ? IDMEF_ALERT_TYPE_TOOL : 0; } /** * idmef_alert_new_tool_alert: * @ptr: pointer to a #idmef_alert_t object. * @ret: pointer where to store the created #idmef_tool_alert_t object. * * Create a new idmef_tool_alert_t object, children of #idmef_alert_t. * If @ptr already contain a #idmef_tool_alert_t object, then it is destroyed. * * Returns: 0 on success, or a negative value if an error occured. */ int idmef_alert_new_tool_alert(idmef_alert_t *ptr, idmef_tool_alert_t **ret) { int retval; prelude_return_val_if_fail(ptr, prelude_error(PRELUDE_ERROR_ASSERTION)); switch ( ptr->type ) { case IDMEF_ALERT_TYPE_TOOL: *ret = ptr->detail.tool_alert; return 0; case IDMEF_ALERT_TYPE_CORRELATION: idmef_correlation_alert_destroy(ptr->detail.correlation_alert); break; case IDMEF_ALERT_TYPE_OVERFLOW: idmef_overflow_alert_destroy(ptr->detail.overflow_alert); break; default: break; } retval = idmef_tool_alert_new(ret); if ( retval < 0 ) return retval; ptr->type = IDMEF_ALERT_TYPE_TOOL; ptr->detail.tool_alert = *ret; return 0; } /** * idmef_alert_get_correlation_alert: * @ptr: pointer to a #idmef_alert_t object. * * Access the correlation_alert children of @ptr. * * Returns: a pointer to the #idmef_correlation_alert_t children, or NULL if it is not set. */ idmef_correlation_alert_t *idmef_alert_get_correlation_alert(idmef_alert_t *ptr) { prelude_return_val_if_fail(ptr, NULL); return (ptr->type == IDMEF_ALERT_TYPE_CORRELATION) ? ptr->detail.correlation_alert : NULL; } /** * idmef_alert_set_correlation_alert: * @ptr: pointer to a #idmef_alert_t object. * @correlation_alert: pointer to a #idmef_correlation_alert_t object. * * Set @correlation_alert object as a children of @ptr. * if @ptr already contain a @correlation_alert object, then it is destroyed, * and updated to point to the provided @correlation_alert object. */ void idmef_alert_set_correlation_alert(idmef_alert_t *ptr, idmef_correlation_alert_t *correlation_alert) { prelude_return_if_fail(ptr); switch ( ptr->type ) { case IDMEF_ALERT_TYPE_TOOL: idmef_tool_alert_destroy(ptr->detail.tool_alert); break; case IDMEF_ALERT_TYPE_CORRELATION: idmef_correlation_alert_destroy(ptr->detail.correlation_alert); break; case IDMEF_ALERT_TYPE_OVERFLOW: idmef_overflow_alert_destroy(ptr->detail.overflow_alert); break; default: break; } ptr->detail.correlation_alert = correlation_alert; ptr->type = (correlation_alert) ? IDMEF_ALERT_TYPE_CORRELATION : 0; } /** * idmef_alert_new_correlation_alert: * @ptr: pointer to a #idmef_alert_t object. * @ret: pointer where to store the created #idmef_correlation_alert_t object. * * Create a new idmef_correlation_alert_t object, children of #idmef_alert_t. * If @ptr already contain a #idmef_correlation_alert_t object, then it is destroyed. * * Returns: 0 on success, or a negative value if an error occured. */ int idmef_alert_new_correlation_alert(idmef_alert_t *ptr, idmef_correlation_alert_t **ret) { int retval; prelude_return_val_if_fail(ptr, prelude_error(PRELUDE_ERROR_ASSERTION)); switch ( ptr->type ) { case IDMEF_ALERT_TYPE_TOOL: idmef_tool_alert_destroy(ptr->detail.tool_alert); break; case IDMEF_ALERT_TYPE_CORRELATION: *ret = ptr->detail.correlation_alert; return 0; case IDMEF_ALERT_TYPE_OVERFLOW: idmef_overflow_alert_destroy(ptr->detail.overflow_alert); break; default: break; } retval = idmef_correlation_alert_new(ret); if ( retval < 0 ) return retval; ptr->type = IDMEF_ALERT_TYPE_CORRELATION; ptr->detail.correlation_alert = *ret; return 0; } /** * idmef_alert_get_overflow_alert: * @ptr: pointer to a #idmef_alert_t object. * * Access the overflow_alert children of @ptr. * * Returns: a pointer to the #idmef_overflow_alert_t children, or NULL if it is not set. */ idmef_overflow_alert_t *idmef_alert_get_overflow_alert(idmef_alert_t *ptr) { prelude_return_val_if_fail(ptr, NULL); return (ptr->type == IDMEF_ALERT_TYPE_OVERFLOW) ? ptr->detail.overflow_alert : NULL; } /** * idmef_alert_set_overflow_alert: * @ptr: pointer to a #idmef_alert_t object. * @overflow_alert: pointer to a #idmef_overflow_alert_t object. * * Set @overflow_alert object as a children of @ptr. * if @ptr already contain a @overflow_alert object, then it is destroyed, * and updated to point to the provided @overflow_alert object. */ void idmef_alert_set_overflow_alert(idmef_alert_t *ptr, idmef_overflow_alert_t *overflow_alert) { prelude_return_if_fail(ptr); switch ( ptr->type ) { case IDMEF_ALERT_TYPE_TOOL: idmef_tool_alert_destroy(ptr->detail.tool_alert); break; case IDMEF_ALERT_TYPE_CORRELATION: idmef_correlation_alert_destroy(ptr->detail.correlation_alert); break; case IDMEF_ALERT_TYPE_OVERFLOW: idmef_overflow_alert_destroy(ptr->detail.overflow_alert); break; default: break; } ptr->detail.overflow_alert = overflow_alert; ptr->type = (overflow_alert) ? IDMEF_ALERT_TYPE_OVERFLOW : 0; } /** * idmef_alert_new_overflow_alert: * @ptr: pointer to a #idmef_alert_t object. * @ret: pointer where to store the created #idmef_overflow_alert_t object. * * Create a new idmef_overflow_alert_t object, children of #idmef_alert_t. * If @ptr already contain a #idmef_overflow_alert_t object, then it is destroyed. * * Returns: 0 on success, or a negative value if an error occured. */ int idmef_alert_new_overflow_alert(idmef_alert_t *ptr, idmef_overflow_alert_t **ret) { int retval; prelude_return_val_if_fail(ptr, prelude_error(PRELUDE_ERROR_ASSERTION)); switch ( ptr->type ) { case IDMEF_ALERT_TYPE_TOOL: idmef_tool_alert_destroy(ptr->detail.tool_alert); break; case IDMEF_ALERT_TYPE_CORRELATION: idmef_correlation_alert_destroy(ptr->detail.correlation_alert); break; case IDMEF_ALERT_TYPE_OVERFLOW: *ret = ptr->detail.overflow_alert; return 0; default: break; } retval = idmef_overflow_alert_new(ret); if ( retval < 0 ) return retval; ptr->type = IDMEF_ALERT_TYPE_OVERFLOW; ptr->detail.overflow_alert = *ret; return 0; } /** * idmef_alert_copy: * @src: Source of the copy. * @dst: Where to copy the object. * * Copy a new #idmef_alert_t object from @src to @dst. * * Returns: 0 on success, a negative value if an error occured. */ int idmef_alert_copy(const idmef_alert_t *src, idmef_alert_t *dst) { int ret; prelude_return_val_if_fail(src, prelude_error(PRELUDE_ERROR_ASSERTION)); prelude_return_val_if_fail(dst, prelude_error(PRELUDE_ERROR_ASSERTION)); ret = 0; if ( src->messageid ) { ret = prelude_string_clone(src->messageid, &dst->messageid); if ( ret < 0 ) return ret; } { prelude_list_t *n, *tmp; idmef_analyzer_t *entry, *new; prelude_list_for_each_safe(&src->analyzer_list, tmp, n) { entry = prelude_list_entry(tmp, idmef_analyzer_t, list); idmef_analyzer_clone(entry, &new); prelude_list_add_tail(&dst->analyzer_list, &new->list); } } if ( src->create_time ) { ret = idmef_time_copy(src->create_time, dst->create_time); if ( ret < 0 ) return ret; } if ( src->classification ) { ret = idmef_classification_copy(src->classification, dst->classification); if ( ret < 0 ) return ret; } if ( src->detect_time ) { ret = idmef_time_clone(src->detect_time, &dst->detect_time); if ( ret < 0 ) return ret; } if ( src->analyzer_time ) { ret = idmef_time_clone(src->analyzer_time, &dst->analyzer_time); if ( ret < 0 ) return ret; } { prelude_list_t *n, *tmp; idmef_source_t *entry, *new; prelude_list_for_each_safe(&src->source_list, tmp, n) { entry = prelude_list_entry(tmp, idmef_source_t, list); idmef_source_clone(entry, &new); prelude_list_add_tail(&dst->source_list, &new->list); } } { prelude_list_t *n, *tmp; idmef_target_t *entry, *new; prelude_list_for_each_safe(&src->target_list, tmp, n) { entry = prelude_list_entry(tmp, idmef_target_t, list); idmef_target_clone(entry, &new); prelude_list_add_tail(&dst->target_list, &new->list); } } if ( src->assessment ) { ret = idmef_assessment_clone(src->assessment, &dst->assessment); if ( ret < 0 ) return ret; } { prelude_list_t *n, *tmp; idmef_additional_data_t *entry, *new; prelude_list_for_each_safe(&src->additional_data_list, tmp, n) { entry = prelude_list_entry(tmp, idmef_additional_data_t, list); idmef_additional_data_clone(entry, &new); prelude_list_add_tail(&dst->additional_data_list, &new->list); } } switch ( src->type ) { case IDMEF_ALERT_TYPE_TOOL: ret = idmef_tool_alert_clone(src->detail.tool_alert, &dst->detail.tool_alert); break; case IDMEF_ALERT_TYPE_CORRELATION: ret = idmef_correlation_alert_clone(src->detail.correlation_alert, &dst->detail.correlation_alert); break; case IDMEF_ALERT_TYPE_OVERFLOW: ret = idmef_overflow_alert_clone(src->detail.overflow_alert, &dst->detail.overflow_alert); break; default: break; } if ( ret < 0 ) return ret; dst->type = src->type; return 0; } /** * idmef_alert_clone: * @src: Object to be cloned. * @dst: Address where to store the pointer to the cloned object. * * Create a copy of @src, and store it in @dst. * * Returns: 0 on success, a negative value if an error occured. */ int idmef_alert_clone(idmef_alert_t *src, idmef_alert_t **dst) { int ret; prelude_return_val_if_fail(src, prelude_error(PRELUDE_ERROR_ASSERTION)); ret = idmef_alert_new(dst); if ( ret < 0 ) return ret; return idmef_alert_copy(src, *dst); } /** * idmef_alert_compare: * @obj1: Object to compare with @obj2. * @obj2: Object to compare with @obj1. * * Compare @obj1 with @obj2. * * Returns: 0 on match, a negative value on comparison failure. */ int idmef_alert_compare(const idmef_alert_t *obj1, const idmef_alert_t *obj2) { int ret = 0; if ( obj1 == NULL && obj2 == NULL ) return 0; else if ( obj1 == NULL || obj2 == NULL ) return -1; ret = prelude_string_compare(obj1->messageid, obj2->messageid); if ( ret != 0 ) return ret; { prelude_list_t *tmp1, *tmp2; idmef_analyzer_t *entry1, *entry2; tmp1 = tmp2 = NULL; do { entry1 = entry2 = NULL; prelude_list_for_each_continue(&obj1->analyzer_list, tmp1) { entry1 = prelude_list_entry(tmp1, idmef_analyzer_t, list); break; } prelude_list_for_each_continue(&obj2->analyzer_list, tmp2) { entry2 = prelude_list_entry(tmp2, idmef_analyzer_t, list); break; } ret = idmef_analyzer_compare(entry1, entry2); if ( ret != 0 ) return ret; } while ( entry1 && entry2 ); } ret = idmef_time_compare(obj1->create_time, obj2->create_time); if ( ret != 0 ) return ret; ret = idmef_classification_compare(obj1->classification, obj2->classification); if ( ret != 0 ) return ret; ret = idmef_time_compare(obj1->detect_time, obj2->detect_time); if ( ret != 0 ) return ret; ret = idmef_time_compare(obj1->analyzer_time, obj2->analyzer_time); if ( ret != 0 ) return ret; { prelude_list_t *tmp1, *tmp2; idmef_source_t *entry1, *entry2; tmp1 = tmp2 = NULL; do { entry1 = entry2 = NULL; prelude_list_for_each_continue(&obj1->source_list, tmp1) { entry1 = prelude_list_entry(tmp1, idmef_source_t, list); break; } prelude_list_for_each_continue(&obj2->source_list, tmp2) { entry2 = prelude_list_entry(tmp2, idmef_source_t, list); break; } ret = idmef_source_compare(entry1, entry2); if ( ret != 0 ) return ret; } while ( entry1 && entry2 ); } { prelude_list_t *tmp1, *tmp2; idmef_target_t *entry1, *entry2; tmp1 = tmp2 = NULL; do { entry1 = entry2 = NULL; prelude_list_for_each_continue(&obj1->target_list, tmp1) { entry1 = prelude_list_entry(tmp1, idmef_target_t, list); break; } prelude_list_for_each_continue(&obj2->target_list, tmp2) { entry2 = prelude_list_entry(tmp2, idmef_target_t, list); break; } ret = idmef_target_compare(entry1, entry2); if ( ret != 0 ) return ret; } while ( entry1 && entry2 ); } ret = idmef_assessment_compare(obj1->assessment, obj2->assessment); if ( ret != 0 ) return ret; { prelude_list_t *tmp1, *tmp2; idmef_additional_data_t *entry1, *entry2; tmp1 = tmp2 = NULL; do { entry1 = entry2 = NULL; prelude_list_for_each_continue(&obj1->additional_data_list, tmp1) { entry1 = prelude_list_entry(tmp1, idmef_additional_data_t, list); break; } prelude_list_for_each_continue(&obj2->additional_data_list, tmp2) { entry2 = prelude_list_entry(tmp2, idmef_additional_data_t, list); break; } ret = idmef_additional_data_compare(entry1, entry2); if ( ret != 0 ) return ret; } while ( entry1 && entry2 ); } if ( obj1->type != obj2->type ) return -1; switch ( obj1->type ) { case IDMEF_ALERT_TYPE_TOOL: ret = idmef_tool_alert_compare(obj1->detail.tool_alert, obj2->detail.tool_alert); break; case IDMEF_ALERT_TYPE_CORRELATION: ret = idmef_correlation_alert_compare(obj1->detail.correlation_alert, obj2->detail.correlation_alert); break; case IDMEF_ALERT_TYPE_OVERFLOW: ret = idmef_overflow_alert_compare(obj1->detail.overflow_alert, obj2->detail.overflow_alert); break; default: break; } return ret; } /** * idmef_heartbeat_new: * @ret: Pointer where to store the created #idmef_heartbeat_t object. * * Create a new #idmef_heartbeat_t object. * * Returns: 0 on success, a negative value if an error occured. */ int idmef_heartbeat_new(idmef_heartbeat_t **ret) { *ret = calloc(1, sizeof(**ret)); if ( ! *ret ) return prelude_error_from_errno(errno); (*ret)->refcount = 1; prelude_list_init(&(*ret)->analyzer_list); prelude_list_init(&(*ret)->additional_data_list); { int retval = idmef_time_new(&(*ret)->create_time); if ( retval < 0 ) { idmef_heartbeat_destroy(*ret); *ret = NULL; return retval; } } idmef_time_set_from_gettimeofday((*ret)->create_time); return 0; } /** * idmef_heartbeat_ref: * @heartbeat: pointer to a #idmef_heartbeat_t object. * * Increase @heartbeat reference count, so that it can be referenced * multiple time. * * Returns: a pointer to @heartbeat. */ idmef_heartbeat_t *idmef_heartbeat_ref(idmef_heartbeat_t *heartbeat) { prelude_return_val_if_fail(heartbeat, NULL); heartbeat->refcount++; return heartbeat; } int _idmef_heartbeat_get_child(void *p, idmef_class_child_id_t child, void **childptr) { idmef_heartbeat_t *ptr = p; prelude_return_val_if_fail(p, prelude_error(PRELUDE_ERROR_ASSERTION)); *childptr = NULL; switch ( child ) { case 0: return get_value_from_string((idmef_value_t **) childptr, ptr->messageid, TRUE); case 1: *childptr = &ptr->analyzer_list; return 0; case 2: return get_value_from_time((idmef_value_t **) childptr, ptr->create_time, TRUE); case 3: return get_value_from_time((idmef_value_t **) childptr, ptr->analyzer_time, TRUE); case 4: return (ptr->heartbeat_interval_is_set) ? idmef_value_new_uint32((idmef_value_t **) childptr, ptr->heartbeat_interval) : 0; case 5: *childptr = &ptr->additional_data_list; return 0; default: return prelude_error(PRELUDE_ERROR_IDMEF_CLASS_UNKNOWN_CHILD); } } int _idmef_heartbeat_new_child(void *p, idmef_class_child_id_t child, int n, void **ret) { idmef_heartbeat_t *ptr = p; prelude_return_val_if_fail(p, prelude_error(PRELUDE_ERROR_ASSERTION)); switch ( child ) { case 0: return idmef_heartbeat_new_messageid(ptr, (prelude_string_t **) ret); case 1: { int i = 0; prelude_list_t *tmp; if ( n == IDMEF_LIST_APPEND || n == IDMEF_LIST_PREPEND ) return idmef_heartbeat_new_analyzer(ptr, (idmef_analyzer_t **) ret, n); if ( n >= 0 ) { prelude_list_for_each(&ptr->analyzer_list, tmp) { if ( i++ == n ) { *ret = prelude_list_entry(tmp, idmef_analyzer_t, list); return 0; } } if ( i != n ) return prelude_error(PRELUDE_ERROR_IDMEF_TREE_INDEX_UNDEFINED); } else { int pos = (-n) - 1; /* With negative value, -1 is the base, translate to 0 */ prelude_list_for_each_reversed(&ptr->analyzer_list, tmp) { if ( i++ == pos ) { *ret = prelude_list_entry(tmp, idmef_analyzer_t, list); return 0; } } if ( i != pos ) return prelude_error(PRELUDE_ERROR_IDMEF_TREE_INDEX_UNDEFINED); } return idmef_heartbeat_new_analyzer(ptr, (idmef_analyzer_t **) ret, n); } case 2: return idmef_heartbeat_new_create_time(ptr, (idmef_time_t **) ret); case 3: return idmef_heartbeat_new_analyzer_time(ptr, (idmef_time_t **) ret); case 4: return idmef_heartbeat_new_heartbeat_interval(ptr, (uint32_t **) ret); case 5: { int i = 0; prelude_list_t *tmp; if ( n == IDMEF_LIST_APPEND || n == IDMEF_LIST_PREPEND ) return idmef_heartbeat_new_additional_data(ptr, (idmef_additional_data_t **) ret, n); if ( n >= 0 ) { prelude_list_for_each(&ptr->additional_data_list, tmp) { if ( i++ == n ) { *ret = prelude_list_entry(tmp, idmef_additional_data_t, list); return 0; } } if ( i != n ) return prelude_error(PRELUDE_ERROR_IDMEF_TREE_INDEX_UNDEFINED); } else { int pos = (-n) - 1; /* With negative value, -1 is the base, translate to 0 */ prelude_list_for_each_reversed(&ptr->additional_data_list, tmp) { if ( i++ == pos ) { *ret = prelude_list_entry(tmp, idmef_additional_data_t, list); return 0; } } if ( i != pos ) return prelude_error(PRELUDE_ERROR_IDMEF_TREE_INDEX_UNDEFINED); } return idmef_heartbeat_new_additional_data(ptr, (idmef_additional_data_t **) ret, n); } default: return prelude_error(PRELUDE_ERROR_IDMEF_CLASS_UNKNOWN_CHILD); } } int _idmef_heartbeat_destroy_child(void *p, idmef_class_child_id_t child, int n) { idmef_heartbeat_t *ptr = p; prelude_return_val_if_fail(p, prelude_error(PRELUDE_ERROR_ASSERTION)); switch ( child ) { case 0: if ( ptr->messageid ) { prelude_string_destroy(ptr->messageid); ptr->messageid = NULL; } return 0; case 1: { int i = 0; prelude_list_t *tmp; if ( n >= 0 ) { prelude_list_for_each(&ptr->analyzer_list, tmp) { if ( i++ == n ) { void *b = prelude_list_entry(tmp, idmef_analyzer_t, list); idmef_analyzer_destroy(b); return 0; } } if ( i != n ) return prelude_error(PRELUDE_ERROR_IDMEF_TREE_INDEX_UNDEFINED); } else { int pos = (-n) - 1; /* With negative value, -1 is the base, translate to 0 */ prelude_list_for_each_reversed(&ptr->analyzer_list, tmp) { if ( i++ == pos ) { void *b = prelude_list_entry(tmp, idmef_analyzer_t, list); idmef_analyzer_destroy(b); return 0; } } if ( i != pos ) return prelude_error(PRELUDE_ERROR_IDMEF_TREE_INDEX_UNDEFINED); } } case 2: if ( ptr->create_time ) { idmef_time_destroy(ptr->create_time); ptr->create_time = NULL; } return 0; case 3: if ( ptr->analyzer_time ) { idmef_time_destroy(ptr->analyzer_time); ptr->analyzer_time = NULL; } return 0; case 4: ptr->heartbeat_interval_is_set = 0; return 0; case 5: { int i = 0; prelude_list_t *tmp; if ( n >= 0 ) { prelude_list_for_each(&ptr->additional_data_list, tmp) { if ( i++ == n ) { void *b = prelude_list_entry(tmp, idmef_additional_data_t, list); idmef_additional_data_destroy(b); return 0; } } if ( i != n ) return prelude_error(PRELUDE_ERROR_IDMEF_TREE_INDEX_UNDEFINED); } else { int pos = (-n) - 1; /* With negative value, -1 is the base, translate to 0 */ prelude_list_for_each_reversed(&ptr->additional_data_list, tmp) { if ( i++ == pos ) { void *b = prelude_list_entry(tmp, idmef_additional_data_t, list); idmef_additional_data_destroy(b); return 0; } } if ( i != pos ) return prelude_error(PRELUDE_ERROR_IDMEF_TREE_INDEX_UNDEFINED); } } default: return prelude_error(PRELUDE_ERROR_IDMEF_CLASS_UNKNOWN_CHILD); } } static void idmef_heartbeat_destroy_internal(idmef_heartbeat_t *ptr) { prelude_return_if_fail(ptr); if ( ptr->messageid ) { prelude_string_destroy(ptr->messageid); ptr->messageid = NULL; } { prelude_list_t *n, *tmp; idmef_analyzer_t *entry; prelude_list_for_each_safe(&ptr->analyzer_list, tmp, n) { entry = prelude_list_entry(tmp, idmef_analyzer_t, list); prelude_list_del_init(&entry->list); idmef_analyzer_destroy(entry); } } if ( ptr->create_time ) { idmef_time_destroy(ptr->create_time); ptr->create_time = NULL; } if ( ptr->analyzer_time ) { idmef_time_destroy(ptr->analyzer_time); ptr->analyzer_time = NULL; } { prelude_list_t *n, *tmp; idmef_additional_data_t *entry; prelude_list_for_each_safe(&ptr->additional_data_list, tmp, n) { entry = prelude_list_entry(tmp, idmef_additional_data_t, list); prelude_list_del_init(&entry->list); idmef_additional_data_destroy(entry); } } /* free() should be done by the caller */ } /** * idmef_heartbeat_destroy: * @ptr: pointer to a #idmef_heartbeat_t object. * * Destroy @ptr and all of it's children. * The objects are only destroyed if their reference count reach zero. */ void idmef_heartbeat_destroy(idmef_heartbeat_t *ptr) { prelude_return_if_fail(ptr); if ( --ptr->refcount ) return; idmef_heartbeat_destroy_internal(ptr); free(ptr); } /** * *idmef_heartbeat_get_messageid: * @ptr: pointer to a #idmef_heartbeat_t object. * * Get messageid children of the #idmef_heartbeat_t object. * * Returns: a pointer to a prelude_string_t object, or NULL if the children object is not set. */ prelude_string_t *idmef_heartbeat_get_messageid(idmef_heartbeat_t *ptr) { prelude_return_val_if_fail(ptr, 0); /* FIXME */ return ptr->messageid; } /** * idmef_heartbeat_set_messageid: * @ptr: pointer to a #idmef_heartbeat_t object. * @messageid: pointer to a #prelude_string_t object. * * Set @messageid object as a children of @ptr. * if @ptr already contain an @messageid object, then it is destroyed, * and updated to point to the provided @messageid object. */ void idmef_heartbeat_set_messageid(idmef_heartbeat_t *ptr, prelude_string_t *messageid) { prelude_return_if_fail(ptr); if ( ptr->messageid ) prelude_string_destroy(ptr->messageid); ptr->messageid = messageid; } /** * idmef_heartbeat_new_messageid: * @ptr: pointer to a #idmef_heartbeat_t object. * @ret: pointer to an address where to store the created #prelude_string_t object. * * Create a new messageid object, children of #idmef_heartbeat_t. * If @ptr already contain a #prelude_string_t object, then it is destroyed. * * Returns: 0 on success, or a negative value if an error occured. */ int idmef_heartbeat_new_messageid(idmef_heartbeat_t *ptr, prelude_string_t **ret) { int retval; prelude_return_val_if_fail(ptr, prelude_error(PRELUDE_ERROR_ASSERTION)); if ( ! ptr->messageid ) { retval = prelude_string_new(&ptr->messageid); if ( retval < 0 ) return retval; } *ret = ptr->messageid; return 0; } /** * idmef_heartbeat_get_next_analyzer: * @heartbeat: pointer to a #idmef_heartbeat_t object. * @analyzer_cur: pointer to a #idmef_analyzer_t object. * * Get the next #idmef_analyzer_t object listed in @ptr. * When iterating over the idmef_analyzer_t object listed in @ptr, * @object should be set to the latest returned #idmef_analyzer_t object. * * Returns: the next #idmef_analyzer_t in the list. */ idmef_analyzer_t *idmef_heartbeat_get_next_analyzer(idmef_heartbeat_t *heartbeat, idmef_analyzer_t *analyzer_cur) { prelude_list_t *tmp = (analyzer_cur) ? &analyzer_cur->list : NULL; prelude_return_val_if_fail(heartbeat, NULL); prelude_list_for_each_continue(&heartbeat->analyzer_list, tmp) return prelude_list_entry(tmp, idmef_analyzer_t, list); return NULL; } /** * idmef_heartbeat_set_analyzer: * @ptr: pointer to a #idmef_heartbeat_t object. * @object: pointer to a #idmef_analyzer_t object. * @pos: Position in the list. * * Add @object to position @pos of @ptr list of #idmef_analyzer_t object. * * If @pos is #IDMEF_LIST_APPEND, @object will be inserted at the tail of the list. * If @pos is #IDMEF_LIST_PREPEND, @object will be inserted at the head of the list. */ void idmef_heartbeat_set_analyzer(idmef_heartbeat_t *ptr, idmef_analyzer_t *object, int pos) { prelude_return_if_fail(ptr); prelude_return_if_fail(object); if ( ! prelude_list_is_empty(&object->list) ) prelude_list_del_init(&object->list); list_insert(&ptr->analyzer_list, &object->list, pos); } /** * idmef_heartbeat_new_analyzer: * @ptr: pointer to a #idmef_heartbeat_t object. * @ret: pointer to an address where to store the created #idmef_analyzer_t object. * @pos: position in the list. * * Create a new #idmef_analyzer_t children of @ptr, and add it to position @pos of * @ptr list of #idmef_analyzer_t object. The created #idmef_analyzer_t object is * stored in @ret. * * If @pos is #IDMEF_LIST_APPEND, @object will be inserted at the tail of the list. * If @pos is #IDMEF_LIST_PREPEND, @object will be inserted at the head of the list. * * Returns: 0 on success, or a negative value if an error occured. */ int idmef_heartbeat_new_analyzer(idmef_heartbeat_t *ptr, idmef_analyzer_t **ret, int pos) { int retval; prelude_return_val_if_fail(ptr, prelude_error(PRELUDE_ERROR_ASSERTION)); retval = idmef_analyzer_new(ret); if ( retval < 0 ) return retval; list_insert(&ptr->analyzer_list, &(*ret)->list, pos); return 0; } /** * *idmef_heartbeat_get_create_time: * @ptr: pointer to a #idmef_heartbeat_t object. * * Get create_time children of the #idmef_heartbeat_t object. * * Returns: a pointer to a idmef_time_t object, or NULL if the children object is not set. */ idmef_time_t *idmef_heartbeat_get_create_time(idmef_heartbeat_t *ptr) { prelude_return_val_if_fail(ptr, 0); /* FIXME */ return ptr->create_time; } /** * idmef_heartbeat_set_create_time: * @ptr: pointer to a #idmef_heartbeat_t object. * @create_time: pointer to a #idmef_time_t object. * * Set @create_time object as a children of @ptr. * if @ptr already contain an @create_time object, then it is destroyed, * and updated to point to the provided @create_time object. */ void idmef_heartbeat_set_create_time(idmef_heartbeat_t *ptr, idmef_time_t *create_time) { prelude_return_if_fail(ptr); if ( ptr->create_time ) idmef_time_destroy(ptr->create_time); ptr->create_time = create_time; } /** * idmef_heartbeat_new_create_time: * @ptr: pointer to a #idmef_heartbeat_t object. * @ret: pointer to an address where to store the created #idmef_time_t object. * * Create a new create_time object, children of #idmef_heartbeat_t. * If @ptr already contain a #idmef_time_t object, then it is destroyed. * * Returns: 0 on success, or a negative value if an error occured. */ int idmef_heartbeat_new_create_time(idmef_heartbeat_t *ptr, idmef_time_t **ret) { int retval; prelude_return_val_if_fail(ptr, prelude_error(PRELUDE_ERROR_ASSERTION)); if ( ! ptr->create_time ) { retval = idmef_time_new(&ptr->create_time); if ( retval < 0 ) return retval; } *ret = ptr->create_time; return 0; } /** * *idmef_heartbeat_get_analyzer_time: * @ptr: pointer to a #idmef_heartbeat_t object. * * Get analyzer_time children of the #idmef_heartbeat_t object. * * Returns: a pointer to a idmef_time_t object, or NULL if the children object is not set. */ idmef_time_t *idmef_heartbeat_get_analyzer_time(idmef_heartbeat_t *ptr) { prelude_return_val_if_fail(ptr, 0); /* FIXME */ return ptr->analyzer_time; } /** * idmef_heartbeat_set_analyzer_time: * @ptr: pointer to a #idmef_heartbeat_t object. * @analyzer_time: pointer to a #idmef_time_t object. * * Set @analyzer_time object as a children of @ptr. * if @ptr already contain an @analyzer_time object, then it is destroyed, * and updated to point to the provided @analyzer_time object. */ void idmef_heartbeat_set_analyzer_time(idmef_heartbeat_t *ptr, idmef_time_t *analyzer_time) { prelude_return_if_fail(ptr); if ( ptr->analyzer_time ) idmef_time_destroy(ptr->analyzer_time); ptr->analyzer_time = analyzer_time; } /** * idmef_heartbeat_new_analyzer_time: * @ptr: pointer to a #idmef_heartbeat_t object. * @ret: pointer to an address where to store the created #idmef_time_t object. * * Create a new analyzer_time object, children of #idmef_heartbeat_t. * If @ptr already contain a #idmef_time_t object, then it is destroyed. * * Returns: 0 on success, or a negative value if an error occured. */ int idmef_heartbeat_new_analyzer_time(idmef_heartbeat_t *ptr, idmef_time_t **ret) { int retval; prelude_return_val_if_fail(ptr, prelude_error(PRELUDE_ERROR_ASSERTION)); if ( ! ptr->analyzer_time ) { retval = idmef_time_new(&ptr->analyzer_time); if ( retval < 0 ) return retval; } *ret = ptr->analyzer_time; return 0; } /** * *idmef_heartbeat_get_heartbeat_interval: * @ptr: pointer to a #idmef_heartbeat_t object. * * Get heartbeat_interval children of the #idmef_heartbeat_t object. * * Returns: a pointer to a uint32_t object, or NULL if the children object is not set. */ uint32_t *idmef_heartbeat_get_heartbeat_interval(idmef_heartbeat_t *ptr) { prelude_return_val_if_fail(ptr, 0); /* FIXME */ return ptr->heartbeat_interval_is_set ? &ptr->heartbeat_interval : NULL; } /** * idmef_heartbeat_set_heartbeat_interval: * @ptr: pointer to a #idmef_heartbeat_t object. * @heartbeat_interval: pointer to a #uint32_t object. * * Set @heartbeat_interval object as a children of @ptr. * if @ptr already contain an @heartbeat_interval object, then it is destroyed, * and updated to point to the provided @heartbeat_interval object. */ void idmef_heartbeat_set_heartbeat_interval(idmef_heartbeat_t *ptr, uint32_t heartbeat_interval) { prelude_return_if_fail(ptr); ptr->heartbeat_interval = heartbeat_interval; ptr->heartbeat_interval_is_set = 1; } void idmef_heartbeat_unset_heartbeat_interval(idmef_heartbeat_t *ptr) { prelude_return_if_fail(ptr); ptr->heartbeat_interval_is_set = 0; } /** * idmef_heartbeat_new_heartbeat_interval: * @ptr: pointer to a #idmef_heartbeat_t object. * @ret: pointer to an address where to store the created #uint32_t object. * * Create a new heartbeat_interval object, children of #idmef_heartbeat_t. * If @ptr already contain a #uint32_t object, then it is destroyed. * * Returns: 0 on success, or a negative value if an error occured. */ int idmef_heartbeat_new_heartbeat_interval(idmef_heartbeat_t *ptr, uint32_t **ret) { prelude_return_val_if_fail(ptr, prelude_error(PRELUDE_ERROR_ASSERTION)); ptr->heartbeat_interval_is_set = 1; *ret = &ptr->heartbeat_interval; return 0; } /** * idmef_heartbeat_get_next_additional_data: * @heartbeat: pointer to a #idmef_heartbeat_t object. * @additional_data_cur: pointer to a #idmef_additional_data_t object. * * Get the next #idmef_additional_data_t object listed in @ptr. * When iterating over the idmef_additional_data_t object listed in @ptr, * @object should be set to the latest returned #idmef_additional_data_t object. * * Returns: the next #idmef_additional_data_t in the list. */ idmef_additional_data_t *idmef_heartbeat_get_next_additional_data(idmef_heartbeat_t *heartbeat, idmef_additional_data_t *additional_data_cur) { prelude_list_t *tmp = (additional_data_cur) ? &additional_data_cur->list : NULL; prelude_return_val_if_fail(heartbeat, NULL); prelude_list_for_each_continue(&heartbeat->additional_data_list, tmp) return prelude_list_entry(tmp, idmef_additional_data_t, list); return NULL; } /** * idmef_heartbeat_set_additional_data: * @ptr: pointer to a #idmef_heartbeat_t object. * @object: pointer to a #idmef_additional_data_t object. * @pos: Position in the list. * * Add @object to position @pos of @ptr list of #idmef_additional_data_t object. * * If @pos is #IDMEF_LIST_APPEND, @object will be inserted at the tail of the list. * If @pos is #IDMEF_LIST_PREPEND, @object will be inserted at the head of the list. */ void idmef_heartbeat_set_additional_data(idmef_heartbeat_t *ptr, idmef_additional_data_t *object, int pos) { prelude_return_if_fail(ptr); prelude_return_if_fail(object); if ( ! prelude_list_is_empty(&object->list) ) prelude_list_del_init(&object->list); list_insert(&ptr->additional_data_list, &object->list, pos); } /** * idmef_heartbeat_new_additional_data: * @ptr: pointer to a #idmef_heartbeat_t object. * @ret: pointer to an address where to store the created #idmef_additional_data_t object. * @pos: position in the list. * * Create a new #idmef_additional_data_t children of @ptr, and add it to position @pos of * @ptr list of #idmef_additional_data_t object. The created #idmef_additional_data_t object is * stored in @ret. * * If @pos is #IDMEF_LIST_APPEND, @object will be inserted at the tail of the list. * If @pos is #IDMEF_LIST_PREPEND, @object will be inserted at the head of the list. * * Returns: 0 on success, or a negative value if an error occured. */ int idmef_heartbeat_new_additional_data(idmef_heartbeat_t *ptr, idmef_additional_data_t **ret, int pos) { int retval; prelude_return_val_if_fail(ptr, prelude_error(PRELUDE_ERROR_ASSERTION)); retval = idmef_additional_data_new(ret); if ( retval < 0 ) return retval; list_insert(&ptr->additional_data_list, &(*ret)->list, pos); return 0; } /** * idmef_heartbeat_copy: * @src: Source of the copy. * @dst: Where to copy the object. * * Copy a new #idmef_heartbeat_t object from @src to @dst. * * Returns: 0 on success, a negative value if an error occured. */ int idmef_heartbeat_copy(const idmef_heartbeat_t *src, idmef_heartbeat_t *dst) { int ret; prelude_return_val_if_fail(src, prelude_error(PRELUDE_ERROR_ASSERTION)); prelude_return_val_if_fail(dst, prelude_error(PRELUDE_ERROR_ASSERTION)); ret = 0; if ( src->messageid ) { ret = prelude_string_clone(src->messageid, &dst->messageid); if ( ret < 0 ) return ret; } { prelude_list_t *n, *tmp; idmef_analyzer_t *entry, *new; prelude_list_for_each_safe(&src->analyzer_list, tmp, n) { entry = prelude_list_entry(tmp, idmef_analyzer_t, list); idmef_analyzer_clone(entry, &new); prelude_list_add_tail(&dst->analyzer_list, &new->list); } } if ( src->create_time ) { ret = idmef_time_copy(src->create_time, dst->create_time); if ( ret < 0 ) return ret; } if ( src->analyzer_time ) { ret = idmef_time_clone(src->analyzer_time, &dst->analyzer_time); if ( ret < 0 ) return ret; } dst->heartbeat_interval_is_set = src->heartbeat_interval_is_set; dst->heartbeat_interval = src->heartbeat_interval; { prelude_list_t *n, *tmp; idmef_additional_data_t *entry, *new; prelude_list_for_each_safe(&src->additional_data_list, tmp, n) { entry = prelude_list_entry(tmp, idmef_additional_data_t, list); idmef_additional_data_clone(entry, &new); prelude_list_add_tail(&dst->additional_data_list, &new->list); } } return 0; } /** * idmef_heartbeat_clone: * @src: Object to be cloned. * @dst: Address where to store the pointer to the cloned object. * * Create a copy of @src, and store it in @dst. * * Returns: 0 on success, a negative value if an error occured. */ int idmef_heartbeat_clone(idmef_heartbeat_t *src, idmef_heartbeat_t **dst) { int ret; prelude_return_val_if_fail(src, prelude_error(PRELUDE_ERROR_ASSERTION)); ret = idmef_heartbeat_new(dst); if ( ret < 0 ) return ret; return idmef_heartbeat_copy(src, *dst); } /** * idmef_heartbeat_compare: * @obj1: Object to compare with @obj2. * @obj2: Object to compare with @obj1. * * Compare @obj1 with @obj2. * * Returns: 0 on match, a negative value on comparison failure. */ int idmef_heartbeat_compare(const idmef_heartbeat_t *obj1, const idmef_heartbeat_t *obj2) { int ret = 0; if ( obj1 == NULL && obj2 == NULL ) return 0; else if ( obj1 == NULL || obj2 == NULL ) return -1; ret = prelude_string_compare(obj1->messageid, obj2->messageid); if ( ret != 0 ) return ret; { prelude_list_t *tmp1, *tmp2; idmef_analyzer_t *entry1, *entry2; tmp1 = tmp2 = NULL; do { entry1 = entry2 = NULL; prelude_list_for_each_continue(&obj1->analyzer_list, tmp1) { entry1 = prelude_list_entry(tmp1, idmef_analyzer_t, list); break; } prelude_list_for_each_continue(&obj2->analyzer_list, tmp2) { entry2 = prelude_list_entry(tmp2, idmef_analyzer_t, list); break; } ret = idmef_analyzer_compare(entry1, entry2); if ( ret != 0 ) return ret; } while ( entry1 && entry2 ); } ret = idmef_time_compare(obj1->create_time, obj2->create_time); if ( ret != 0 ) return ret; ret = idmef_time_compare(obj1->analyzer_time, obj2->analyzer_time); if ( ret != 0 ) return ret; if ( obj1->heartbeat_interval_is_set != obj2->heartbeat_interval_is_set ) return -1; if ( obj1->heartbeat_interval_is_set && obj1->heartbeat_interval != obj2->heartbeat_interval ) return -1; { prelude_list_t *tmp1, *tmp2; idmef_additional_data_t *entry1, *entry2; tmp1 = tmp2 = NULL; do { entry1 = entry2 = NULL; prelude_list_for_each_continue(&obj1->additional_data_list, tmp1) { entry1 = prelude_list_entry(tmp1, idmef_additional_data_t, list); break; } prelude_list_for_each_continue(&obj2->additional_data_list, tmp2) { entry2 = prelude_list_entry(tmp2, idmef_additional_data_t, list); break; } ret = idmef_additional_data_compare(entry1, entry2); if ( ret != 0 ) return ret; } while ( entry1 && entry2 ); } return ret; } /** * idmef_message_new: * @ret: Pointer where to store the created #idmef_message_t object. * * Create a new #idmef_message_t object. * * Returns: 0 on success, a negative value if an error occured. */ int idmef_message_new(idmef_message_t **ret) { *ret = calloc(1, sizeof(**ret)); if ( ! *ret ) return prelude_error_from_errno(errno); (*ret)->refcount = 1; { int retval = prelude_string_new(&(*ret)->version); if ( retval < 0 ) { idmef_message_destroy(*ret); *ret = NULL; return retval; } } return 0; } /** * idmef_message_ref: * @message: pointer to a #idmef_message_t object. * * Increase @message reference count, so that it can be referenced * multiple time. * * Returns: a pointer to @message. */ idmef_message_t *idmef_message_ref(idmef_message_t *message) { prelude_return_val_if_fail(message, NULL); message->refcount++; return message; } int _idmef_message_get_child(void *p, idmef_class_child_id_t child, void **childptr) { idmef_message_t *ptr = p; prelude_return_val_if_fail(p, prelude_error(PRELUDE_ERROR_ASSERTION)); *childptr = NULL; switch ( child ) { case 0: return get_value_from_string((idmef_value_t **) childptr, ptr->version, TRUE); case 1: *childptr = ( ptr->type == IDMEF_MESSAGE_TYPE_ALERT ) ? ptr->message.alert : NULL; return 0; case 2: *childptr = ( ptr->type == IDMEF_MESSAGE_TYPE_HEARTBEAT ) ? ptr->message.heartbeat : NULL; return 0; default: return prelude_error(PRELUDE_ERROR_IDMEF_CLASS_UNKNOWN_CHILD); } } int _idmef_message_new_child(void *p, idmef_class_child_id_t child, int n, void **ret) { idmef_message_t *ptr = p; prelude_return_val_if_fail(p, prelude_error(PRELUDE_ERROR_ASSERTION)); switch ( child ) { case 0: return idmef_message_new_version(ptr, (prelude_string_t **) ret); case 1: return idmef_message_new_alert(ptr, (idmef_alert_t **) ret); case 2: return idmef_message_new_heartbeat(ptr, (idmef_heartbeat_t **) ret); default: return prelude_error(PRELUDE_ERROR_IDMEF_CLASS_UNKNOWN_CHILD); } } int _idmef_message_destroy_child(void *p, idmef_class_child_id_t child, int n) { idmef_message_t *ptr = p; prelude_return_val_if_fail(p, prelude_error(PRELUDE_ERROR_ASSERTION)); switch ( child ) { case 0: if ( ptr->version ) { prelude_string_destroy(ptr->version); ptr->version = NULL; } return 0; case 1: if ( ptr->type != IDMEF_MESSAGE_TYPE_ALERT ) return 0; idmef_alert_destroy(ptr->message.alert); ptr->message.alert = NULL; ptr->type = 0; return 0; case 2: if ( ptr->type != IDMEF_MESSAGE_TYPE_HEARTBEAT ) return 0; idmef_heartbeat_destroy(ptr->message.heartbeat); ptr->message.heartbeat = NULL; ptr->type = 0; return 0; default: return prelude_error(PRELUDE_ERROR_IDMEF_CLASS_UNKNOWN_CHILD); } } static void idmef_message_destroy_internal(idmef_message_t *ptr) { prelude_return_if_fail(ptr); if ( ptr->version ) { prelude_string_destroy(ptr->version); ptr->version = NULL; } switch ( ptr->type ) { case IDMEF_MESSAGE_TYPE_ALERT: idmef_alert_destroy(ptr->message.alert); ptr->message.alert = NULL; break; case IDMEF_MESSAGE_TYPE_HEARTBEAT: idmef_heartbeat_destroy(ptr->message.heartbeat); ptr->message.heartbeat = NULL; break; default: break; } /* free() should be done by the caller */ } /** * *idmef_message_get_version: * @ptr: pointer to a #idmef_message_t object. * * Get version children of the #idmef_message_t object. * * Returns: a pointer to a prelude_string_t object, or NULL if the children object is not set. */ prelude_string_t *idmef_message_get_version(idmef_message_t *ptr) { prelude_return_val_if_fail(ptr, 0); /* FIXME */ return ptr->version; } /** * idmef_message_set_version: * @ptr: pointer to a #idmef_message_t object. * @version: pointer to a #prelude_string_t object. * * Set @version object as a children of @ptr. * if @ptr already contain an @version object, then it is destroyed, * and updated to point to the provided @version object. */ void idmef_message_set_version(idmef_message_t *ptr, prelude_string_t *version) { prelude_return_if_fail(ptr); if ( ptr->version ) prelude_string_destroy(ptr->version); ptr->version = version; } /** * idmef_message_new_version: * @ptr: pointer to a #idmef_message_t object. * @ret: pointer to an address where to store the created #prelude_string_t object. * * Create a new version object, children of #idmef_message_t. * If @ptr already contain a #prelude_string_t object, then it is destroyed. * * Returns: 0 on success, or a negative value if an error occured. */ int idmef_message_new_version(idmef_message_t *ptr, prelude_string_t **ret) { int retval; prelude_return_val_if_fail(ptr, prelude_error(PRELUDE_ERROR_ASSERTION)); if ( ! ptr->version ) { retval = prelude_string_new(&ptr->version); if ( retval < 0 ) return retval; } *ret = ptr->version; return 0; } /** * idmef_message_get_type: * @ptr: pointer to a #idmef_message_t object. * * Access the type children of @ptr. * * Returns: a pointer to the #idmef_message_type_t children, or NULL if it is not set. */ idmef_message_type_t idmef_message_get_type(idmef_message_t *ptr) { prelude_return_val_if_fail(ptr, prelude_error(PRELUDE_ERROR_ASSERTION)); return ptr->type; } /** * idmef_message_get_alert: * @ptr: pointer to a #idmef_message_t object. * * Access the alert children of @ptr. * * Returns: a pointer to the #idmef_alert_t children, or NULL if it is not set. */ idmef_alert_t *idmef_message_get_alert(idmef_message_t *ptr) { prelude_return_val_if_fail(ptr, NULL); return (ptr->type == IDMEF_MESSAGE_TYPE_ALERT) ? ptr->message.alert : NULL; } /** * idmef_message_set_alert: * @ptr: pointer to a #idmef_message_t object. * @alert: pointer to a #idmef_alert_t object. * * Set @alert object as a children of @ptr. * if @ptr already contain a @alert object, then it is destroyed, * and updated to point to the provided @alert object. */ void idmef_message_set_alert(idmef_message_t *ptr, idmef_alert_t *alert) { prelude_return_if_fail(ptr); switch ( ptr->type ) { case IDMEF_MESSAGE_TYPE_ALERT: idmef_alert_destroy(ptr->message.alert); break; case IDMEF_MESSAGE_TYPE_HEARTBEAT: idmef_heartbeat_destroy(ptr->message.heartbeat); break; default: break; } ptr->message.alert = alert; ptr->type = (alert) ? IDMEF_MESSAGE_TYPE_ALERT : 0; } /** * idmef_message_new_alert: * @ptr: pointer to a #idmef_message_t object. * @ret: pointer where to store the created #idmef_alert_t object. * * Create a new idmef_alert_t object, children of #idmef_message_t. * If @ptr already contain a #idmef_alert_t object, then it is destroyed. * * Returns: 0 on success, or a negative value if an error occured. */ int idmef_message_new_alert(idmef_message_t *ptr, idmef_alert_t **ret) { int retval; prelude_return_val_if_fail(ptr, prelude_error(PRELUDE_ERROR_ASSERTION)); switch ( ptr->type ) { case IDMEF_MESSAGE_TYPE_ALERT: *ret = ptr->message.alert; return 0; case IDMEF_MESSAGE_TYPE_HEARTBEAT: idmef_heartbeat_destroy(ptr->message.heartbeat); break; default: break; } retval = idmef_alert_new(ret); if ( retval < 0 ) return retval; ptr->type = IDMEF_MESSAGE_TYPE_ALERT; ptr->message.alert = *ret; return 0; } /** * idmef_message_get_heartbeat: * @ptr: pointer to a #idmef_message_t object. * * Access the heartbeat children of @ptr. * * Returns: a pointer to the #idmef_heartbeat_t children, or NULL if it is not set. */ idmef_heartbeat_t *idmef_message_get_heartbeat(idmef_message_t *ptr) { prelude_return_val_if_fail(ptr, NULL); return (ptr->type == IDMEF_MESSAGE_TYPE_HEARTBEAT) ? ptr->message.heartbeat : NULL; } /** * idmef_message_set_heartbeat: * @ptr: pointer to a #idmef_message_t object. * @heartbeat: pointer to a #idmef_heartbeat_t object. * * Set @heartbeat object as a children of @ptr. * if @ptr already contain a @heartbeat object, then it is destroyed, * and updated to point to the provided @heartbeat object. */ void idmef_message_set_heartbeat(idmef_message_t *ptr, idmef_heartbeat_t *heartbeat) { prelude_return_if_fail(ptr); switch ( ptr->type ) { case IDMEF_MESSAGE_TYPE_ALERT: idmef_alert_destroy(ptr->message.alert); break; case IDMEF_MESSAGE_TYPE_HEARTBEAT: idmef_heartbeat_destroy(ptr->message.heartbeat); break; default: break; } ptr->message.heartbeat = heartbeat; ptr->type = (heartbeat) ? IDMEF_MESSAGE_TYPE_HEARTBEAT : 0; } /** * idmef_message_new_heartbeat: * @ptr: pointer to a #idmef_message_t object. * @ret: pointer where to store the created #idmef_heartbeat_t object. * * Create a new idmef_heartbeat_t object, children of #idmef_message_t. * If @ptr already contain a #idmef_heartbeat_t object, then it is destroyed. * * Returns: 0 on success, or a negative value if an error occured. */ int idmef_message_new_heartbeat(idmef_message_t *ptr, idmef_heartbeat_t **ret) { int retval; prelude_return_val_if_fail(ptr, prelude_error(PRELUDE_ERROR_ASSERTION)); switch ( ptr->type ) { case IDMEF_MESSAGE_TYPE_ALERT: idmef_alert_destroy(ptr->message.alert); break; case IDMEF_MESSAGE_TYPE_HEARTBEAT: *ret = ptr->message.heartbeat; return 0; default: break; } retval = idmef_heartbeat_new(ret); if ( retval < 0 ) return retval; ptr->type = IDMEF_MESSAGE_TYPE_HEARTBEAT; ptr->message.heartbeat = *ret; return 0; } /** * idmef_message_copy: * @src: Source of the copy. * @dst: Where to copy the object. * * Copy a new #idmef_message_t object from @src to @dst. * * Returns: 0 on success, a negative value if an error occured. */ int idmef_message_copy(const idmef_message_t *src, idmef_message_t *dst) { int ret; prelude_return_val_if_fail(src, prelude_error(PRELUDE_ERROR_ASSERTION)); prelude_return_val_if_fail(dst, prelude_error(PRELUDE_ERROR_ASSERTION)); ret = 0; if ( src->version ) { ret = prelude_string_copy(src->version, dst->version); if ( ret < 0 ) return ret; } switch ( src->type ) { case IDMEF_MESSAGE_TYPE_ALERT: ret = idmef_alert_clone(src->message.alert, &dst->message.alert); break; case IDMEF_MESSAGE_TYPE_HEARTBEAT: ret = idmef_heartbeat_clone(src->message.heartbeat, &dst->message.heartbeat); break; default: break; } if ( ret < 0 ) return ret; dst->type = src->type; return 0; } /** * idmef_message_clone: * @src: Object to be cloned. * @dst: Address where to store the pointer to the cloned object. * * Create a copy of @src, and store it in @dst. * * Returns: 0 on success, a negative value if an error occured. */ int idmef_message_clone(idmef_message_t *src, idmef_message_t **dst) { int ret; prelude_return_val_if_fail(src, prelude_error(PRELUDE_ERROR_ASSERTION)); ret = idmef_message_new(dst); if ( ret < 0 ) return ret; return idmef_message_copy(src, *dst); } /** * idmef_message_compare: * @obj1: Object to compare with @obj2. * @obj2: Object to compare with @obj1. * * Compare @obj1 with @obj2. * * Returns: 0 on match, a negative value on comparison failure. */ int idmef_message_compare(const idmef_message_t *obj1, const idmef_message_t *obj2) { int ret = 0; if ( obj1 == NULL && obj2 == NULL ) return 0; else if ( obj1 == NULL || obj2 == NULL ) return -1; ret = prelude_string_compare(obj1->version, obj2->version); if ( ret != 0 ) return ret; if ( obj1->type != obj2->type ) return -1; switch ( obj1->type ) { case IDMEF_MESSAGE_TYPE_ALERT: ret = idmef_alert_compare(obj1->message.alert, obj2->message.alert); break; case IDMEF_MESSAGE_TYPE_HEARTBEAT: ret = idmef_heartbeat_compare(obj1->message.heartbeat, obj2->message.heartbeat); break; default: break; } return ret; } void idmef_message_set_pmsg(idmef_message_t *message, prelude_msg_t *msg) { prelude_return_if_fail(message); message->pmsg = msg; } prelude_msg_t *idmef_message_get_pmsg(idmef_message_t *message) { prelude_return_val_if_fail(message, NULL); return message->pmsg; } /** * idmef_message_destroy: * @ptr: pointer to a #idmef_message_t object. * * Destroy @ptr and all of it's children. * The objects are only destroyed if their reference count reach zero. */ void idmef_message_destroy(idmef_message_t *ptr) { prelude_return_if_fail(ptr); if ( --ptr->refcount ) return; idmef_message_destroy_internal(ptr); if ( ptr->pmsg ) prelude_msg_destroy(ptr->pmsg); free(ptr); } libprelude-1.0.0/src/idmef-message-read.c0000664000076400007640000024002511202225026015137 00000000000000 /***** * * Copyright (C) 2001,2002,2003,2004,2005 PreludeIDS Technologies. All Rights Reserved. * Author: Yoann Vandoorselaere * Author: Nicolas Delon * * This file is part of the Prelude library. * * 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; see the file COPYING. If not, write to * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. * *****/ /* Auto-generated by the GenerateIDMEFMessageReadC package */ #include "config.h" #include #include #define PRELUDE_ERROR_SOURCE_DEFAULT PRELUDE_ERROR_SOURCE_IDMEF_MESSAGE_READ #include "prelude-error.h" #include "prelude-inttypes.h" #include "prelude-list.h" #include "prelude-extract.h" #include "prelude-io.h" #include "idmef-message-id.h" #include "idmef.h" #include "idmef-tree-wrap.h" #include "idmef-message-read.h" #define prelude_extract_string_safe(out, buf, len, msg) extract_string_safe_f(__FUNCTION__, __LINE__, out, buf, len) static inline int extract_string_safe_f(const char *f, int line, prelude_string_t **out, char *buf, size_t len) { int ret; /* * we use len - 1 since len is supposed to include \0 to avoid making a dup. */ ret = prelude_string_new_ref_fast(out, buf, len - 1); if ( ret < 0 ) ret = prelude_error_verbose(prelude_error_get_code(ret), "%s:%d could not extract IDMEF string: %s", f, line, prelude_strerror(ret)); return ret; } static inline int prelude_extract_time_safe(idmef_time_t **out, void *buf, size_t len, prelude_msg_t *msg) { int ret; /* * sizeof(sec) + sizeof(usec) + sizeof(gmt offset). */ if ( len != 12 ) return prelude_error_make(PRELUDE_ERROR_SOURCE_EXTRACT, PRELUDE_ERROR_INVAL_IDMEF_TIME); ret = idmef_time_new(out); if ( ret < 0 ) return ret; idmef_time_set_sec(*out, prelude_extract_uint32(buf)); idmef_time_set_usec(*out, prelude_extract_uint32((unsigned char *) buf + 4)); idmef_time_set_gmt_offset(*out, prelude_extract_int32((unsigned char *) buf + 8)); return 0; } static inline int prelude_extract_data_safe(idmef_data_t **out, void *buf, uint32_t len, prelude_msg_t *msg) { int ret; uint8_t tag; idmef_data_type_t type = 0; ret = prelude_extract_uint32_safe(&type, buf, len); if ( ret < 0 ) return ret; ret = prelude_msg_get(msg, &tag, &len, &buf); if ( ret < 0 ) return ret; *out = NULL; switch ( type ) { case IDMEF_DATA_TYPE_CHAR: { uint8_t tmp = 0; ret = prelude_extract_uint8_safe(&tmp, buf, len); if ( ret < 0 ) return ret; ret = idmef_data_new_char(out, (char) tmp); break; } case IDMEF_DATA_TYPE_BYTE: { uint8_t tmp = 0; ret = prelude_extract_uint8_safe(&tmp, buf, len); if ( ret < 0 ) return ret; ret = idmef_data_new_byte(out, tmp); break; } case IDMEF_DATA_TYPE_UINT32: { uint32_t tmp = 0; ret = prelude_extract_uint32_safe(&tmp, buf, len); if ( ret < 0 ) return ret; ret = idmef_data_new_uint32(out, tmp); break; } case IDMEF_DATA_TYPE_UINT64: { uint64_t tmp = 0; ret = prelude_extract_uint64_safe(&tmp, buf, len); if ( ret < 0 ) return ret; ret = idmef_data_new_uint64(out, tmp); break; } case IDMEF_DATA_TYPE_FLOAT: { float tmp = 0; ret = prelude_extract_float_safe(&tmp, buf, len); if ( ret < 0 ) return ret; ret = idmef_data_new_float(out, tmp); break; } case IDMEF_DATA_TYPE_BYTE_STRING: { ret = idmef_data_new_ptr_ref_fast(out, type, buf, len); break; } case IDMEF_DATA_TYPE_CHAR_STRING: { const char *tmp = NULL; ret = prelude_extract_characters_safe(&tmp, buf, len); if ( ret < 0 ) return ret; ret = idmef_data_new_ptr_ref_fast(out, type, tmp, len); break; } case IDMEF_DATA_TYPE_UNKNOWN: /* nop */; } return ret; } /** * idmef_additional_data_read: * @additional_data: Pointer to a #idmef_additional_data_t object. * @msg: Pointer to a #prelude_msg_t object, containing a message. * * Read an idmef_additional_data from the @msg message, and * store it into @additional_data. * * Returns: 0 on success, a negative value if an error occured. */ int idmef_additional_data_read(idmef_additional_data_t *additional_data, prelude_msg_t *msg) { int ret; void *buf; uint8_t tag; uint32_t len; while ( 1 ) { ret = prelude_msg_get(msg, &tag, &len, &buf); if ( ret < 0 ) return ret; switch ( tag ) { case IDMEF_MSG_ADDITIONAL_DATA_TYPE: { int32_t tmp = 0; ret = prelude_extract_int32_safe(&tmp, buf, len); if ( ret < 0 ) return ret; idmef_additional_data_set_type(additional_data, tmp); break; } case IDMEF_MSG_ADDITIONAL_DATA_MEANING: { prelude_string_t *tmp = NULL; ret = prelude_extract_string_safe(&tmp, buf, len, msg); if ( ret < 0 ) return ret; idmef_additional_data_set_meaning(additional_data, tmp); break; } case IDMEF_MSG_ADDITIONAL_DATA_DATA: { idmef_data_t *tmp = NULL; ret = prelude_extract_data_safe(&tmp, buf, len, msg); if ( ret < 0 ) return ret; idmef_additional_data_set_data(additional_data, tmp); break; } case IDMEF_MSG_END_OF_TAG: return 0; default: return prelude_error_verbose(PRELUDE_ERROR_IDMEF_UNKNOWN_TAG, "Unknown tag while reading idmef_additional_data_t: '%u'", tag); } } return 0; } /** * idmef_reference_read: * @reference: Pointer to a #idmef_reference_t object. * @msg: Pointer to a #prelude_msg_t object, containing a message. * * Read an idmef_reference from the @msg message, and * store it into @reference. * * Returns: 0 on success, a negative value if an error occured. */ int idmef_reference_read(idmef_reference_t *reference, prelude_msg_t *msg) { int ret; void *buf; uint8_t tag; uint32_t len; while ( 1 ) { ret = prelude_msg_get(msg, &tag, &len, &buf); if ( ret < 0 ) return ret; switch ( tag ) { case IDMEF_MSG_REFERENCE_ORIGIN: { int32_t tmp = 0; ret = prelude_extract_int32_safe(&tmp, buf, len); if ( ret < 0 ) return ret; idmef_reference_set_origin(reference, tmp); break; } case IDMEF_MSG_REFERENCE_NAME: { prelude_string_t *tmp = NULL; ret = prelude_extract_string_safe(&tmp, buf, len, msg); if ( ret < 0 ) return ret; idmef_reference_set_name(reference, tmp); break; } case IDMEF_MSG_REFERENCE_URL: { prelude_string_t *tmp = NULL; ret = prelude_extract_string_safe(&tmp, buf, len, msg); if ( ret < 0 ) return ret; idmef_reference_set_url(reference, tmp); break; } case IDMEF_MSG_REFERENCE_MEANING: { prelude_string_t *tmp = NULL; ret = prelude_extract_string_safe(&tmp, buf, len, msg); if ( ret < 0 ) return ret; idmef_reference_set_meaning(reference, tmp); break; } case IDMEF_MSG_END_OF_TAG: return 0; default: return prelude_error_verbose(PRELUDE_ERROR_IDMEF_UNKNOWN_TAG, "Unknown tag while reading idmef_reference_t: '%u'", tag); } } return 0; } /** * idmef_classification_read: * @classification: Pointer to a #idmef_classification_t object. * @msg: Pointer to a #prelude_msg_t object, containing a message. * * Read an idmef_classification from the @msg message, and * store it into @classification. * * Returns: 0 on success, a negative value if an error occured. */ int idmef_classification_read(idmef_classification_t *classification, prelude_msg_t *msg) { int ret; void *buf; uint8_t tag; uint32_t len; while ( 1 ) { ret = prelude_msg_get(msg, &tag, &len, &buf); if ( ret < 0 ) return ret; switch ( tag ) { case IDMEF_MSG_CLASSIFICATION_IDENT: { prelude_string_t *tmp = NULL; ret = prelude_extract_string_safe(&tmp, buf, len, msg); if ( ret < 0 ) return ret; idmef_classification_set_ident(classification, tmp); break; } case IDMEF_MSG_CLASSIFICATION_TEXT: { prelude_string_t *tmp = NULL; ret = prelude_extract_string_safe(&tmp, buf, len, msg); if ( ret < 0 ) return ret; idmef_classification_set_text(classification, tmp); break; } case IDMEF_MSG_REFERENCE_TAG: { int ret; idmef_reference_t *tmp = NULL; ret = idmef_classification_new_reference(classification, &tmp, -1); if ( ret < 0 ) return ret; ret = idmef_reference_read(tmp, msg); if ( ret < 0 ) return ret; break; } case IDMEF_MSG_END_OF_TAG: return 0; default: return prelude_error_verbose(PRELUDE_ERROR_IDMEF_UNKNOWN_TAG, "Unknown tag while reading idmef_classification_t: '%u'", tag); } } return 0; } /** * idmef_user_id_read: * @user_id: Pointer to a #idmef_user_id_t object. * @msg: Pointer to a #prelude_msg_t object, containing a message. * * Read an idmef_user_id from the @msg message, and * store it into @user_id. * * Returns: 0 on success, a negative value if an error occured. */ int idmef_user_id_read(idmef_user_id_t *user_id, prelude_msg_t *msg) { int ret; void *buf; uint8_t tag; uint32_t len; while ( 1 ) { ret = prelude_msg_get(msg, &tag, &len, &buf); if ( ret < 0 ) return ret; switch ( tag ) { case IDMEF_MSG_USER_ID_IDENT: { prelude_string_t *tmp = NULL; ret = prelude_extract_string_safe(&tmp, buf, len, msg); if ( ret < 0 ) return ret; idmef_user_id_set_ident(user_id, tmp); break; } case IDMEF_MSG_USER_ID_TYPE: { int32_t tmp = 0; ret = prelude_extract_int32_safe(&tmp, buf, len); if ( ret < 0 ) return ret; idmef_user_id_set_type(user_id, tmp); break; } case IDMEF_MSG_USER_ID_TTY: { prelude_string_t *tmp = NULL; ret = prelude_extract_string_safe(&tmp, buf, len, msg); if ( ret < 0 ) return ret; idmef_user_id_set_tty(user_id, tmp); break; } case IDMEF_MSG_USER_ID_NAME: { prelude_string_t *tmp = NULL; ret = prelude_extract_string_safe(&tmp, buf, len, msg); if ( ret < 0 ) return ret; idmef_user_id_set_name(user_id, tmp); break; } case IDMEF_MSG_USER_ID_NUMBER: { uint32_t tmp = 0; ret = prelude_extract_uint32_safe(&tmp, buf, len); if ( ret < 0 ) return ret; idmef_user_id_set_number(user_id, tmp); break; } case IDMEF_MSG_END_OF_TAG: return 0; default: return prelude_error_verbose(PRELUDE_ERROR_IDMEF_UNKNOWN_TAG, "Unknown tag while reading idmef_user_id_t: '%u'", tag); } } return 0; } /** * idmef_user_read: * @user: Pointer to a #idmef_user_t object. * @msg: Pointer to a #prelude_msg_t object, containing a message. * * Read an idmef_user from the @msg message, and * store it into @user. * * Returns: 0 on success, a negative value if an error occured. */ int idmef_user_read(idmef_user_t *user, prelude_msg_t *msg) { int ret; void *buf; uint8_t tag; uint32_t len; while ( 1 ) { ret = prelude_msg_get(msg, &tag, &len, &buf); if ( ret < 0 ) return ret; switch ( tag ) { case IDMEF_MSG_USER_IDENT: { prelude_string_t *tmp = NULL; ret = prelude_extract_string_safe(&tmp, buf, len, msg); if ( ret < 0 ) return ret; idmef_user_set_ident(user, tmp); break; } case IDMEF_MSG_USER_CATEGORY: { int32_t tmp = 0; ret = prelude_extract_int32_safe(&tmp, buf, len); if ( ret < 0 ) return ret; idmef_user_set_category(user, tmp); break; } case IDMEF_MSG_USER_ID_TAG: { int ret; idmef_user_id_t *tmp = NULL; ret = idmef_user_new_user_id(user, &tmp, -1); if ( ret < 0 ) return ret; ret = idmef_user_id_read(tmp, msg); if ( ret < 0 ) return ret; break; } case IDMEF_MSG_END_OF_TAG: return 0; default: return prelude_error_verbose(PRELUDE_ERROR_IDMEF_UNKNOWN_TAG, "Unknown tag while reading idmef_user_t: '%u'", tag); } } return 0; } /** * idmef_address_read: * @address: Pointer to a #idmef_address_t object. * @msg: Pointer to a #prelude_msg_t object, containing a message. * * Read an idmef_address from the @msg message, and * store it into @address. * * Returns: 0 on success, a negative value if an error occured. */ int idmef_address_read(idmef_address_t *address, prelude_msg_t *msg) { int ret; void *buf; uint8_t tag; uint32_t len; while ( 1 ) { ret = prelude_msg_get(msg, &tag, &len, &buf); if ( ret < 0 ) return ret; switch ( tag ) { case IDMEF_MSG_ADDRESS_IDENT: { prelude_string_t *tmp = NULL; ret = prelude_extract_string_safe(&tmp, buf, len, msg); if ( ret < 0 ) return ret; idmef_address_set_ident(address, tmp); break; } case IDMEF_MSG_ADDRESS_CATEGORY: { int32_t tmp = 0; ret = prelude_extract_int32_safe(&tmp, buf, len); if ( ret < 0 ) return ret; idmef_address_set_category(address, tmp); break; } case IDMEF_MSG_ADDRESS_VLAN_NAME: { prelude_string_t *tmp = NULL; ret = prelude_extract_string_safe(&tmp, buf, len, msg); if ( ret < 0 ) return ret; idmef_address_set_vlan_name(address, tmp); break; } case IDMEF_MSG_ADDRESS_VLAN_NUM: { int32_t tmp = 0; ret = prelude_extract_int32_safe(&tmp, buf, len); if ( ret < 0 ) return ret; idmef_address_set_vlan_num(address, tmp); break; } case IDMEF_MSG_ADDRESS_ADDRESS: { prelude_string_t *tmp = NULL; ret = prelude_extract_string_safe(&tmp, buf, len, msg); if ( ret < 0 ) return ret; idmef_address_set_address(address, tmp); break; } case IDMEF_MSG_ADDRESS_NETMASK: { prelude_string_t *tmp = NULL; ret = prelude_extract_string_safe(&tmp, buf, len, msg); if ( ret < 0 ) return ret; idmef_address_set_netmask(address, tmp); break; } case IDMEF_MSG_END_OF_TAG: return 0; default: return prelude_error_verbose(PRELUDE_ERROR_IDMEF_UNKNOWN_TAG, "Unknown tag while reading idmef_address_t: '%u'", tag); } } return 0; } /** * idmef_process_read: * @process: Pointer to a #idmef_process_t object. * @msg: Pointer to a #prelude_msg_t object, containing a message. * * Read an idmef_process from the @msg message, and * store it into @process. * * Returns: 0 on success, a negative value if an error occured. */ int idmef_process_read(idmef_process_t *process, prelude_msg_t *msg) { int ret; void *buf; uint8_t tag; uint32_t len; while ( 1 ) { ret = prelude_msg_get(msg, &tag, &len, &buf); if ( ret < 0 ) return ret; switch ( tag ) { case IDMEF_MSG_PROCESS_IDENT: { prelude_string_t *tmp = NULL; ret = prelude_extract_string_safe(&tmp, buf, len, msg); if ( ret < 0 ) return ret; idmef_process_set_ident(process, tmp); break; } case IDMEF_MSG_PROCESS_NAME: { prelude_string_t *tmp = NULL; ret = prelude_extract_string_safe(&tmp, buf, len, msg); if ( ret < 0 ) return ret; idmef_process_set_name(process, tmp); break; } case IDMEF_MSG_PROCESS_PID: { uint32_t tmp = 0; ret = prelude_extract_uint32_safe(&tmp, buf, len); if ( ret < 0 ) return ret; idmef_process_set_pid(process, tmp); break; } case IDMEF_MSG_PROCESS_PATH: { prelude_string_t *tmp = NULL; ret = prelude_extract_string_safe(&tmp, buf, len, msg); if ( ret < 0 ) return ret; idmef_process_set_path(process, tmp); break; } case IDMEF_MSG_PROCESS_ARG: { prelude_string_t *tmp = NULL; ret = prelude_extract_string_safe(&tmp, buf, len, msg); if ( ret < 0 ) return ret; idmef_process_set_arg(process, tmp, -1); break; } case IDMEF_MSG_PROCESS_ENV: { prelude_string_t *tmp = NULL; ret = prelude_extract_string_safe(&tmp, buf, len, msg); if ( ret < 0 ) return ret; idmef_process_set_env(process, tmp, -1); break; } case IDMEF_MSG_END_OF_TAG: return 0; default: return prelude_error_verbose(PRELUDE_ERROR_IDMEF_UNKNOWN_TAG, "Unknown tag while reading idmef_process_t: '%u'", tag); } } return 0; } /** * idmef_web_service_read: * @web_service: Pointer to a #idmef_web_service_t object. * @msg: Pointer to a #prelude_msg_t object, containing a message. * * Read an idmef_web_service from the @msg message, and * store it into @web_service. * * Returns: 0 on success, a negative value if an error occured. */ int idmef_web_service_read(idmef_web_service_t *web_service, prelude_msg_t *msg) { int ret; void *buf; uint8_t tag; uint32_t len; while ( 1 ) { ret = prelude_msg_get(msg, &tag, &len, &buf); if ( ret < 0 ) return ret; switch ( tag ) { case IDMEF_MSG_WEB_SERVICE_URL: { prelude_string_t *tmp = NULL; ret = prelude_extract_string_safe(&tmp, buf, len, msg); if ( ret < 0 ) return ret; idmef_web_service_set_url(web_service, tmp); break; } case IDMEF_MSG_WEB_SERVICE_CGI: { prelude_string_t *tmp = NULL; ret = prelude_extract_string_safe(&tmp, buf, len, msg); if ( ret < 0 ) return ret; idmef_web_service_set_cgi(web_service, tmp); break; } case IDMEF_MSG_WEB_SERVICE_HTTP_METHOD: { prelude_string_t *tmp = NULL; ret = prelude_extract_string_safe(&tmp, buf, len, msg); if ( ret < 0 ) return ret; idmef_web_service_set_http_method(web_service, tmp); break; } case IDMEF_MSG_WEB_SERVICE_ARG: { prelude_string_t *tmp = NULL; ret = prelude_extract_string_safe(&tmp, buf, len, msg); if ( ret < 0 ) return ret; idmef_web_service_set_arg(web_service, tmp, -1); break; } case IDMEF_MSG_END_OF_TAG: return 0; default: return prelude_error_verbose(PRELUDE_ERROR_IDMEF_UNKNOWN_TAG, "Unknown tag while reading idmef_web_service_t: '%u'", tag); } } return 0; } /** * idmef_snmp_service_read: * @snmp_service: Pointer to a #idmef_snmp_service_t object. * @msg: Pointer to a #prelude_msg_t object, containing a message. * * Read an idmef_snmp_service from the @msg message, and * store it into @snmp_service. * * Returns: 0 on success, a negative value if an error occured. */ int idmef_snmp_service_read(idmef_snmp_service_t *snmp_service, prelude_msg_t *msg) { int ret; void *buf; uint8_t tag; uint32_t len; while ( 1 ) { ret = prelude_msg_get(msg, &tag, &len, &buf); if ( ret < 0 ) return ret; switch ( tag ) { case IDMEF_MSG_SNMP_SERVICE_OID: { prelude_string_t *tmp = NULL; ret = prelude_extract_string_safe(&tmp, buf, len, msg); if ( ret < 0 ) return ret; idmef_snmp_service_set_oid(snmp_service, tmp); break; } case IDMEF_MSG_SNMP_SERVICE_MESSAGE_PROCESSING_MODEL: { uint32_t tmp = 0; ret = prelude_extract_uint32_safe(&tmp, buf, len); if ( ret < 0 ) return ret; idmef_snmp_service_set_message_processing_model(snmp_service, tmp); break; } case IDMEF_MSG_SNMP_SERVICE_SECURITY_MODEL: { uint32_t tmp = 0; ret = prelude_extract_uint32_safe(&tmp, buf, len); if ( ret < 0 ) return ret; idmef_snmp_service_set_security_model(snmp_service, tmp); break; } case IDMEF_MSG_SNMP_SERVICE_SECURITY_NAME: { prelude_string_t *tmp = NULL; ret = prelude_extract_string_safe(&tmp, buf, len, msg); if ( ret < 0 ) return ret; idmef_snmp_service_set_security_name(snmp_service, tmp); break; } case IDMEF_MSG_SNMP_SERVICE_SECURITY_LEVEL: { uint32_t tmp = 0; ret = prelude_extract_uint32_safe(&tmp, buf, len); if ( ret < 0 ) return ret; idmef_snmp_service_set_security_level(snmp_service, tmp); break; } case IDMEF_MSG_SNMP_SERVICE_CONTEXT_NAME: { prelude_string_t *tmp = NULL; ret = prelude_extract_string_safe(&tmp, buf, len, msg); if ( ret < 0 ) return ret; idmef_snmp_service_set_context_name(snmp_service, tmp); break; } case IDMEF_MSG_SNMP_SERVICE_CONTEXT_ENGINE_ID: { prelude_string_t *tmp = NULL; ret = prelude_extract_string_safe(&tmp, buf, len, msg); if ( ret < 0 ) return ret; idmef_snmp_service_set_context_engine_id(snmp_service, tmp); break; } case IDMEF_MSG_SNMP_SERVICE_COMMAND: { prelude_string_t *tmp = NULL; ret = prelude_extract_string_safe(&tmp, buf, len, msg); if ( ret < 0 ) return ret; idmef_snmp_service_set_command(snmp_service, tmp); break; } case IDMEF_MSG_SNMP_SERVICE_COMMUNITY: { prelude_string_t *tmp = NULL; ret = prelude_extract_string_safe(&tmp, buf, len, msg); if ( ret < 0 ) return ret; idmef_snmp_service_set_community(snmp_service, tmp); break; } case IDMEF_MSG_END_OF_TAG: return 0; default: return prelude_error_verbose(PRELUDE_ERROR_IDMEF_UNKNOWN_TAG, "Unknown tag while reading idmef_snmp_service_t: '%u'", tag); } } return 0; } /** * idmef_service_read: * @service: Pointer to a #idmef_service_t object. * @msg: Pointer to a #prelude_msg_t object, containing a message. * * Read an idmef_service from the @msg message, and * store it into @service. * * Returns: 0 on success, a negative value if an error occured. */ int idmef_service_read(idmef_service_t *service, prelude_msg_t *msg) { int ret; void *buf; uint8_t tag; uint32_t len; while ( 1 ) { ret = prelude_msg_get(msg, &tag, &len, &buf); if ( ret < 0 ) return ret; switch ( tag ) { case IDMEF_MSG_SERVICE_IDENT: { prelude_string_t *tmp = NULL; ret = prelude_extract_string_safe(&tmp, buf, len, msg); if ( ret < 0 ) return ret; idmef_service_set_ident(service, tmp); break; } case IDMEF_MSG_SERVICE_IP_VERSION: { uint8_t tmp = 0; ret = prelude_extract_uint8_safe(&tmp, buf, len); if ( ret < 0 ) return ret; idmef_service_set_ip_version(service, tmp); break; } case IDMEF_MSG_SERVICE_IANA_PROTOCOL_NUMBER: { uint8_t tmp = 0; ret = prelude_extract_uint8_safe(&tmp, buf, len); if ( ret < 0 ) return ret; idmef_service_set_iana_protocol_number(service, tmp); break; } case IDMEF_MSG_SERVICE_IANA_PROTOCOL_NAME: { prelude_string_t *tmp = NULL; ret = prelude_extract_string_safe(&tmp, buf, len, msg); if ( ret < 0 ) return ret; idmef_service_set_iana_protocol_name(service, tmp); break; } case IDMEF_MSG_SERVICE_NAME: { prelude_string_t *tmp = NULL; ret = prelude_extract_string_safe(&tmp, buf, len, msg); if ( ret < 0 ) return ret; idmef_service_set_name(service, tmp); break; } case IDMEF_MSG_SERVICE_PORT: { uint16_t tmp = 0; ret = prelude_extract_uint16_safe(&tmp, buf, len); if ( ret < 0 ) return ret; idmef_service_set_port(service, tmp); break; } case IDMEF_MSG_SERVICE_PORTLIST: { prelude_string_t *tmp = NULL; ret = prelude_extract_string_safe(&tmp, buf, len, msg); if ( ret < 0 ) return ret; idmef_service_set_portlist(service, tmp); break; } case IDMEF_MSG_SERVICE_PROTOCOL: { prelude_string_t *tmp = NULL; ret = prelude_extract_string_safe(&tmp, buf, len, msg); if ( ret < 0 ) return ret; idmef_service_set_protocol(service, tmp); break; } case IDMEF_MSG_WEB_SERVICE_TAG: { int ret; idmef_web_service_t *tmp = NULL; ret = idmef_service_new_web_service(service, &tmp); if ( ret < 0 ) return ret; ret = idmef_web_service_read(tmp, msg); if ( ret < 0 ) return ret; break; } case IDMEF_MSG_SNMP_SERVICE_TAG: { int ret; idmef_snmp_service_t *tmp = NULL; ret = idmef_service_new_snmp_service(service, &tmp); if ( ret < 0 ) return ret; ret = idmef_snmp_service_read(tmp, msg); if ( ret < 0 ) return ret; break; } case IDMEF_MSG_END_OF_TAG: return 0; default: return prelude_error_verbose(PRELUDE_ERROR_IDMEF_UNKNOWN_TAG, "Unknown tag while reading idmef_service_t: '%u'", tag); } } return 0; } /** * idmef_node_read: * @node: Pointer to a #idmef_node_t object. * @msg: Pointer to a #prelude_msg_t object, containing a message. * * Read an idmef_node from the @msg message, and * store it into @node. * * Returns: 0 on success, a negative value if an error occured. */ int idmef_node_read(idmef_node_t *node, prelude_msg_t *msg) { int ret; void *buf; uint8_t tag; uint32_t len; while ( 1 ) { ret = prelude_msg_get(msg, &tag, &len, &buf); if ( ret < 0 ) return ret; switch ( tag ) { case IDMEF_MSG_NODE_IDENT: { prelude_string_t *tmp = NULL; ret = prelude_extract_string_safe(&tmp, buf, len, msg); if ( ret < 0 ) return ret; idmef_node_set_ident(node, tmp); break; } case IDMEF_MSG_NODE_CATEGORY: { int32_t tmp = 0; ret = prelude_extract_int32_safe(&tmp, buf, len); if ( ret < 0 ) return ret; idmef_node_set_category(node, tmp); break; } case IDMEF_MSG_NODE_LOCATION: { prelude_string_t *tmp = NULL; ret = prelude_extract_string_safe(&tmp, buf, len, msg); if ( ret < 0 ) return ret; idmef_node_set_location(node, tmp); break; } case IDMEF_MSG_NODE_NAME: { prelude_string_t *tmp = NULL; ret = prelude_extract_string_safe(&tmp, buf, len, msg); if ( ret < 0 ) return ret; idmef_node_set_name(node, tmp); break; } case IDMEF_MSG_ADDRESS_TAG: { int ret; idmef_address_t *tmp = NULL; ret = idmef_node_new_address(node, &tmp, -1); if ( ret < 0 ) return ret; ret = idmef_address_read(tmp, msg); if ( ret < 0 ) return ret; break; } case IDMEF_MSG_END_OF_TAG: return 0; default: return prelude_error_verbose(PRELUDE_ERROR_IDMEF_UNKNOWN_TAG, "Unknown tag while reading idmef_node_t: '%u'", tag); } } return 0; } /** * idmef_source_read: * @source: Pointer to a #idmef_source_t object. * @msg: Pointer to a #prelude_msg_t object, containing a message. * * Read an idmef_source from the @msg message, and * store it into @source. * * Returns: 0 on success, a negative value if an error occured. */ int idmef_source_read(idmef_source_t *source, prelude_msg_t *msg) { int ret; void *buf; uint8_t tag; uint32_t len; while ( 1 ) { ret = prelude_msg_get(msg, &tag, &len, &buf); if ( ret < 0 ) return ret; switch ( tag ) { case IDMEF_MSG_SOURCE_IDENT: { prelude_string_t *tmp = NULL; ret = prelude_extract_string_safe(&tmp, buf, len, msg); if ( ret < 0 ) return ret; idmef_source_set_ident(source, tmp); break; } case IDMEF_MSG_SOURCE_SPOOFED: { int32_t tmp = 0; ret = prelude_extract_int32_safe(&tmp, buf, len); if ( ret < 0 ) return ret; idmef_source_set_spoofed(source, tmp); break; } case IDMEF_MSG_SOURCE_INTERFACE: { prelude_string_t *tmp = NULL; ret = prelude_extract_string_safe(&tmp, buf, len, msg); if ( ret < 0 ) return ret; idmef_source_set_interface(source, tmp); break; } case IDMEF_MSG_NODE_TAG: { int ret; idmef_node_t *tmp = NULL; ret = idmef_source_new_node(source, &tmp); if ( ret < 0 ) return ret; ret = idmef_node_read(tmp, msg); if ( ret < 0 ) return ret; break; } case IDMEF_MSG_USER_TAG: { int ret; idmef_user_t *tmp = NULL; ret = idmef_source_new_user(source, &tmp); if ( ret < 0 ) return ret; ret = idmef_user_read(tmp, msg); if ( ret < 0 ) return ret; break; } case IDMEF_MSG_PROCESS_TAG: { int ret; idmef_process_t *tmp = NULL; ret = idmef_source_new_process(source, &tmp); if ( ret < 0 ) return ret; ret = idmef_process_read(tmp, msg); if ( ret < 0 ) return ret; break; } case IDMEF_MSG_SERVICE_TAG: { int ret; idmef_service_t *tmp = NULL; ret = idmef_source_new_service(source, &tmp); if ( ret < 0 ) return ret; ret = idmef_service_read(tmp, msg); if ( ret < 0 ) return ret; break; } case IDMEF_MSG_END_OF_TAG: return 0; default: return prelude_error_verbose(PRELUDE_ERROR_IDMEF_UNKNOWN_TAG, "Unknown tag while reading idmef_source_t: '%u'", tag); } } return 0; } /** * idmef_file_access_read: * @file_access: Pointer to a #idmef_file_access_t object. * @msg: Pointer to a #prelude_msg_t object, containing a message. * * Read an idmef_file_access from the @msg message, and * store it into @file_access. * * Returns: 0 on success, a negative value if an error occured. */ int idmef_file_access_read(idmef_file_access_t *file_access, prelude_msg_t *msg) { int ret; void *buf; uint8_t tag; uint32_t len; while ( 1 ) { ret = prelude_msg_get(msg, &tag, &len, &buf); if ( ret < 0 ) return ret; switch ( tag ) { case IDMEF_MSG_USER_ID_TAG: { int ret; idmef_user_id_t *tmp = NULL; ret = idmef_file_access_new_user_id(file_access, &tmp); if ( ret < 0 ) return ret; ret = idmef_user_id_read(tmp, msg); if ( ret < 0 ) return ret; break; } case IDMEF_MSG_FILE_ACCESS_PERMISSION: { prelude_string_t *tmp = NULL; ret = prelude_extract_string_safe(&tmp, buf, len, msg); if ( ret < 0 ) return ret; idmef_file_access_set_permission(file_access, tmp, -1); break; } case IDMEF_MSG_END_OF_TAG: return 0; default: return prelude_error_verbose(PRELUDE_ERROR_IDMEF_UNKNOWN_TAG, "Unknown tag while reading idmef_file_access_t: '%u'", tag); } } return 0; } /** * idmef_inode_read: * @inode: Pointer to a #idmef_inode_t object. * @msg: Pointer to a #prelude_msg_t object, containing a message. * * Read an idmef_inode from the @msg message, and * store it into @inode. * * Returns: 0 on success, a negative value if an error occured. */ int idmef_inode_read(idmef_inode_t *inode, prelude_msg_t *msg) { int ret; void *buf; uint8_t tag; uint32_t len; while ( 1 ) { ret = prelude_msg_get(msg, &tag, &len, &buf); if ( ret < 0 ) return ret; switch ( tag ) { case IDMEF_MSG_INODE_CHANGE_TIME: { idmef_time_t *tmp = NULL; ret = prelude_extract_time_safe(&tmp, buf, len, msg); if ( ret < 0 ) return ret; idmef_inode_set_change_time(inode, tmp); break; } case IDMEF_MSG_INODE_NUMBER: { uint32_t tmp = 0; ret = prelude_extract_uint32_safe(&tmp, buf, len); if ( ret < 0 ) return ret; idmef_inode_set_number(inode, tmp); break; } case IDMEF_MSG_INODE_MAJOR_DEVICE: { uint32_t tmp = 0; ret = prelude_extract_uint32_safe(&tmp, buf, len); if ( ret < 0 ) return ret; idmef_inode_set_major_device(inode, tmp); break; } case IDMEF_MSG_INODE_MINOR_DEVICE: { uint32_t tmp = 0; ret = prelude_extract_uint32_safe(&tmp, buf, len); if ( ret < 0 ) return ret; idmef_inode_set_minor_device(inode, tmp); break; } case IDMEF_MSG_INODE_C_MAJOR_DEVICE: { uint32_t tmp = 0; ret = prelude_extract_uint32_safe(&tmp, buf, len); if ( ret < 0 ) return ret; idmef_inode_set_c_major_device(inode, tmp); break; } case IDMEF_MSG_INODE_C_MINOR_DEVICE: { uint32_t tmp = 0; ret = prelude_extract_uint32_safe(&tmp, buf, len); if ( ret < 0 ) return ret; idmef_inode_set_c_minor_device(inode, tmp); break; } case IDMEF_MSG_END_OF_TAG: return 0; default: return prelude_error_verbose(PRELUDE_ERROR_IDMEF_UNKNOWN_TAG, "Unknown tag while reading idmef_inode_t: '%u'", tag); } } return 0; } /** * idmef_checksum_read: * @checksum: Pointer to a #idmef_checksum_t object. * @msg: Pointer to a #prelude_msg_t object, containing a message. * * Read an idmef_checksum from the @msg message, and * store it into @checksum. * * Returns: 0 on success, a negative value if an error occured. */ int idmef_checksum_read(idmef_checksum_t *checksum, prelude_msg_t *msg) { int ret; void *buf; uint8_t tag; uint32_t len; while ( 1 ) { ret = prelude_msg_get(msg, &tag, &len, &buf); if ( ret < 0 ) return ret; switch ( tag ) { case IDMEF_MSG_CHECKSUM_VALUE: { prelude_string_t *tmp = NULL; ret = prelude_extract_string_safe(&tmp, buf, len, msg); if ( ret < 0 ) return ret; idmef_checksum_set_value(checksum, tmp); break; } case IDMEF_MSG_CHECKSUM_KEY: { prelude_string_t *tmp = NULL; ret = prelude_extract_string_safe(&tmp, buf, len, msg); if ( ret < 0 ) return ret; idmef_checksum_set_key(checksum, tmp); break; } case IDMEF_MSG_CHECKSUM_ALGORITHM: { int32_t tmp = 0; ret = prelude_extract_int32_safe(&tmp, buf, len); if ( ret < 0 ) return ret; idmef_checksum_set_algorithm(checksum, tmp); break; } case IDMEF_MSG_END_OF_TAG: return 0; default: return prelude_error_verbose(PRELUDE_ERROR_IDMEF_UNKNOWN_TAG, "Unknown tag while reading idmef_checksum_t: '%u'", tag); } } return 0; } /** * idmef_file_read: * @file: Pointer to a #idmef_file_t object. * @msg: Pointer to a #prelude_msg_t object, containing a message. * * Read an idmef_file from the @msg message, and * store it into @file. * * Returns: 0 on success, a negative value if an error occured. */ int idmef_file_read(idmef_file_t *file, prelude_msg_t *msg) { int ret; void *buf; uint8_t tag; uint32_t len; while ( 1 ) { ret = prelude_msg_get(msg, &tag, &len, &buf); if ( ret < 0 ) return ret; switch ( tag ) { case IDMEF_MSG_FILE_IDENT: { prelude_string_t *tmp = NULL; ret = prelude_extract_string_safe(&tmp, buf, len, msg); if ( ret < 0 ) return ret; idmef_file_set_ident(file, tmp); break; } case IDMEF_MSG_FILE_NAME: { prelude_string_t *tmp = NULL; ret = prelude_extract_string_safe(&tmp, buf, len, msg); if ( ret < 0 ) return ret; idmef_file_set_name(file, tmp); break; } case IDMEF_MSG_FILE_PATH: { prelude_string_t *tmp = NULL; ret = prelude_extract_string_safe(&tmp, buf, len, msg); if ( ret < 0 ) return ret; idmef_file_set_path(file, tmp); break; } case IDMEF_MSG_FILE_CREATE_TIME: { idmef_time_t *tmp = NULL; ret = prelude_extract_time_safe(&tmp, buf, len, msg); if ( ret < 0 ) return ret; idmef_file_set_create_time(file, tmp); break; } case IDMEF_MSG_FILE_MODIFY_TIME: { idmef_time_t *tmp = NULL; ret = prelude_extract_time_safe(&tmp, buf, len, msg); if ( ret < 0 ) return ret; idmef_file_set_modify_time(file, tmp); break; } case IDMEF_MSG_FILE_ACCESS_TIME: { idmef_time_t *tmp = NULL; ret = prelude_extract_time_safe(&tmp, buf, len, msg); if ( ret < 0 ) return ret; idmef_file_set_access_time(file, tmp); break; } case IDMEF_MSG_FILE_DATA_SIZE: { uint64_t tmp = 0; ret = prelude_extract_uint64_safe(&tmp, buf, len); if ( ret < 0 ) return ret; idmef_file_set_data_size(file, tmp); break; } case IDMEF_MSG_FILE_DISK_SIZE: { uint64_t tmp = 0; ret = prelude_extract_uint64_safe(&tmp, buf, len); if ( ret < 0 ) return ret; idmef_file_set_disk_size(file, tmp); break; } case IDMEF_MSG_FILE_ACCESS_TAG: { int ret; idmef_file_access_t *tmp = NULL; ret = idmef_file_new_file_access(file, &tmp, -1); if ( ret < 0 ) return ret; ret = idmef_file_access_read(tmp, msg); if ( ret < 0 ) return ret; break; } case IDMEF_MSG_LINKAGE_TAG: { int ret; idmef_linkage_t *tmp = NULL; ret = idmef_file_new_linkage(file, &tmp, -1); if ( ret < 0 ) return ret; ret = idmef_linkage_read(tmp, msg); if ( ret < 0 ) return ret; break; } case IDMEF_MSG_INODE_TAG: { int ret; idmef_inode_t *tmp = NULL; ret = idmef_file_new_inode(file, &tmp); if ( ret < 0 ) return ret; ret = idmef_inode_read(tmp, msg); if ( ret < 0 ) return ret; break; } case IDMEF_MSG_CHECKSUM_TAG: { int ret; idmef_checksum_t *tmp = NULL; ret = idmef_file_new_checksum(file, &tmp, -1); if ( ret < 0 ) return ret; ret = idmef_checksum_read(tmp, msg); if ( ret < 0 ) return ret; break; } case IDMEF_MSG_FILE_CATEGORY: { int32_t tmp = 0; ret = prelude_extract_int32_safe(&tmp, buf, len); if ( ret < 0 ) return ret; idmef_file_set_category(file, tmp); break; } case IDMEF_MSG_FILE_FSTYPE: { int32_t tmp = 0; ret = prelude_extract_int32_safe(&tmp, buf, len); if ( ret < 0 ) return ret; idmef_file_set_fstype(file, tmp); break; } case IDMEF_MSG_FILE_FILE_TYPE: { prelude_string_t *tmp = NULL; ret = prelude_extract_string_safe(&tmp, buf, len, msg); if ( ret < 0 ) return ret; idmef_file_set_file_type(file, tmp); break; } case IDMEF_MSG_END_OF_TAG: return 0; default: return prelude_error_verbose(PRELUDE_ERROR_IDMEF_UNKNOWN_TAG, "Unknown tag while reading idmef_file_t: '%u'", tag); } } return 0; } /** * idmef_linkage_read: * @linkage: Pointer to a #idmef_linkage_t object. * @msg: Pointer to a #prelude_msg_t object, containing a message. * * Read an idmef_linkage from the @msg message, and * store it into @linkage. * * Returns: 0 on success, a negative value if an error occured. */ int idmef_linkage_read(idmef_linkage_t *linkage, prelude_msg_t *msg) { int ret; void *buf; uint8_t tag; uint32_t len; while ( 1 ) { ret = prelude_msg_get(msg, &tag, &len, &buf); if ( ret < 0 ) return ret; switch ( tag ) { case IDMEF_MSG_LINKAGE_CATEGORY: { int32_t tmp = 0; ret = prelude_extract_int32_safe(&tmp, buf, len); if ( ret < 0 ) return ret; idmef_linkage_set_category(linkage, tmp); break; } case IDMEF_MSG_LINKAGE_NAME: { prelude_string_t *tmp = NULL; ret = prelude_extract_string_safe(&tmp, buf, len, msg); if ( ret < 0 ) return ret; idmef_linkage_set_name(linkage, tmp); break; } case IDMEF_MSG_LINKAGE_PATH: { prelude_string_t *tmp = NULL; ret = prelude_extract_string_safe(&tmp, buf, len, msg); if ( ret < 0 ) return ret; idmef_linkage_set_path(linkage, tmp); break; } case IDMEF_MSG_FILE_TAG: { int ret; idmef_file_t *tmp = NULL; ret = idmef_linkage_new_file(linkage, &tmp); if ( ret < 0 ) return ret; ret = idmef_file_read(tmp, msg); if ( ret < 0 ) return ret; break; } case IDMEF_MSG_END_OF_TAG: return 0; default: return prelude_error_verbose(PRELUDE_ERROR_IDMEF_UNKNOWN_TAG, "Unknown tag while reading idmef_linkage_t: '%u'", tag); } } return 0; } /** * idmef_target_read: * @target: Pointer to a #idmef_target_t object. * @msg: Pointer to a #prelude_msg_t object, containing a message. * * Read an idmef_target from the @msg message, and * store it into @target. * * Returns: 0 on success, a negative value if an error occured. */ int idmef_target_read(idmef_target_t *target, prelude_msg_t *msg) { int ret; void *buf; uint8_t tag; uint32_t len; while ( 1 ) { ret = prelude_msg_get(msg, &tag, &len, &buf); if ( ret < 0 ) return ret; switch ( tag ) { case IDMEF_MSG_TARGET_IDENT: { prelude_string_t *tmp = NULL; ret = prelude_extract_string_safe(&tmp, buf, len, msg); if ( ret < 0 ) return ret; idmef_target_set_ident(target, tmp); break; } case IDMEF_MSG_TARGET_DECOY: { int32_t tmp = 0; ret = prelude_extract_int32_safe(&tmp, buf, len); if ( ret < 0 ) return ret; idmef_target_set_decoy(target, tmp); break; } case IDMEF_MSG_TARGET_INTERFACE: { prelude_string_t *tmp = NULL; ret = prelude_extract_string_safe(&tmp, buf, len, msg); if ( ret < 0 ) return ret; idmef_target_set_interface(target, tmp); break; } case IDMEF_MSG_NODE_TAG: { int ret; idmef_node_t *tmp = NULL; ret = idmef_target_new_node(target, &tmp); if ( ret < 0 ) return ret; ret = idmef_node_read(tmp, msg); if ( ret < 0 ) return ret; break; } case IDMEF_MSG_USER_TAG: { int ret; idmef_user_t *tmp = NULL; ret = idmef_target_new_user(target, &tmp); if ( ret < 0 ) return ret; ret = idmef_user_read(tmp, msg); if ( ret < 0 ) return ret; break; } case IDMEF_MSG_PROCESS_TAG: { int ret; idmef_process_t *tmp = NULL; ret = idmef_target_new_process(target, &tmp); if ( ret < 0 ) return ret; ret = idmef_process_read(tmp, msg); if ( ret < 0 ) return ret; break; } case IDMEF_MSG_SERVICE_TAG: { int ret; idmef_service_t *tmp = NULL; ret = idmef_target_new_service(target, &tmp); if ( ret < 0 ) return ret; ret = idmef_service_read(tmp, msg); if ( ret < 0 ) return ret; break; } case IDMEF_MSG_FILE_TAG: { int ret; idmef_file_t *tmp = NULL; ret = idmef_target_new_file(target, &tmp, -1); if ( ret < 0 ) return ret; ret = idmef_file_read(tmp, msg); if ( ret < 0 ) return ret; break; } case IDMEF_MSG_END_OF_TAG: return 0; default: return prelude_error_verbose(PRELUDE_ERROR_IDMEF_UNKNOWN_TAG, "Unknown tag while reading idmef_target_t: '%u'", tag); } } return 0; } /** * idmef_analyzer_read: * @analyzer: Pointer to a #idmef_analyzer_t object. * @msg: Pointer to a #prelude_msg_t object, containing a message. * * Read an idmef_analyzer from the @msg message, and * store it into @analyzer. * * Returns: 0 on success, a negative value if an error occured. */ int idmef_analyzer_read(idmef_analyzer_t *analyzer, prelude_msg_t *msg) { int ret; void *buf; uint8_t tag; uint32_t len; while ( 1 ) { ret = prelude_msg_get(msg, &tag, &len, &buf); if ( ret < 0 ) return ret; switch ( tag ) { case IDMEF_MSG_ANALYZER_ANALYZERID: { prelude_string_t *tmp = NULL; ret = prelude_extract_string_safe(&tmp, buf, len, msg); if ( ret < 0 ) return ret; idmef_analyzer_set_analyzerid(analyzer, tmp); break; } case IDMEF_MSG_ANALYZER_NAME: { prelude_string_t *tmp = NULL; ret = prelude_extract_string_safe(&tmp, buf, len, msg); if ( ret < 0 ) return ret; idmef_analyzer_set_name(analyzer, tmp); break; } case IDMEF_MSG_ANALYZER_MANUFACTURER: { prelude_string_t *tmp = NULL; ret = prelude_extract_string_safe(&tmp, buf, len, msg); if ( ret < 0 ) return ret; idmef_analyzer_set_manufacturer(analyzer, tmp); break; } case IDMEF_MSG_ANALYZER_MODEL: { prelude_string_t *tmp = NULL; ret = prelude_extract_string_safe(&tmp, buf, len, msg); if ( ret < 0 ) return ret; idmef_analyzer_set_model(analyzer, tmp); break; } case IDMEF_MSG_ANALYZER_VERSION: { prelude_string_t *tmp = NULL; ret = prelude_extract_string_safe(&tmp, buf, len, msg); if ( ret < 0 ) return ret; idmef_analyzer_set_version(analyzer, tmp); break; } case IDMEF_MSG_ANALYZER_CLASS: { prelude_string_t *tmp = NULL; ret = prelude_extract_string_safe(&tmp, buf, len, msg); if ( ret < 0 ) return ret; idmef_analyzer_set_class(analyzer, tmp); break; } case IDMEF_MSG_ANALYZER_OSTYPE: { prelude_string_t *tmp = NULL; ret = prelude_extract_string_safe(&tmp, buf, len, msg); if ( ret < 0 ) return ret; idmef_analyzer_set_ostype(analyzer, tmp); break; } case IDMEF_MSG_ANALYZER_OSVERSION: { prelude_string_t *tmp = NULL; ret = prelude_extract_string_safe(&tmp, buf, len, msg); if ( ret < 0 ) return ret; idmef_analyzer_set_osversion(analyzer, tmp); break; } case IDMEF_MSG_NODE_TAG: { int ret; idmef_node_t *tmp = NULL; ret = idmef_analyzer_new_node(analyzer, &tmp); if ( ret < 0 ) return ret; ret = idmef_node_read(tmp, msg); if ( ret < 0 ) return ret; break; } case IDMEF_MSG_PROCESS_TAG: { int ret; idmef_process_t *tmp = NULL; ret = idmef_analyzer_new_process(analyzer, &tmp); if ( ret < 0 ) return ret; ret = idmef_process_read(tmp, msg); if ( ret < 0 ) return ret; break; } case IDMEF_MSG_END_OF_TAG: return 0; default: return prelude_error_verbose(PRELUDE_ERROR_IDMEF_UNKNOWN_TAG, "Unknown tag while reading idmef_analyzer_t: '%u'", tag); } } return 0; } /** * idmef_alertident_read: * @alertident: Pointer to a #idmef_alertident_t object. * @msg: Pointer to a #prelude_msg_t object, containing a message. * * Read an idmef_alertident from the @msg message, and * store it into @alertident. * * Returns: 0 on success, a negative value if an error occured. */ int idmef_alertident_read(idmef_alertident_t *alertident, prelude_msg_t *msg) { int ret; void *buf; uint8_t tag; uint32_t len; while ( 1 ) { ret = prelude_msg_get(msg, &tag, &len, &buf); if ( ret < 0 ) return ret; switch ( tag ) { case IDMEF_MSG_ALERTIDENT_ALERTIDENT: { prelude_string_t *tmp = NULL; ret = prelude_extract_string_safe(&tmp, buf, len, msg); if ( ret < 0 ) return ret; idmef_alertident_set_alertident(alertident, tmp); break; } case IDMEF_MSG_ALERTIDENT_ANALYZERID: { prelude_string_t *tmp = NULL; ret = prelude_extract_string_safe(&tmp, buf, len, msg); if ( ret < 0 ) return ret; idmef_alertident_set_analyzerid(alertident, tmp); break; } case IDMEF_MSG_END_OF_TAG: return 0; default: return prelude_error_verbose(PRELUDE_ERROR_IDMEF_UNKNOWN_TAG, "Unknown tag while reading idmef_alertident_t: '%u'", tag); } } return 0; } /** * idmef_impact_read: * @impact: Pointer to a #idmef_impact_t object. * @msg: Pointer to a #prelude_msg_t object, containing a message. * * Read an idmef_impact from the @msg message, and * store it into @impact. * * Returns: 0 on success, a negative value if an error occured. */ int idmef_impact_read(idmef_impact_t *impact, prelude_msg_t *msg) { int ret; void *buf; uint8_t tag; uint32_t len; while ( 1 ) { ret = prelude_msg_get(msg, &tag, &len, &buf); if ( ret < 0 ) return ret; switch ( tag ) { case IDMEF_MSG_IMPACT_SEVERITY: { int32_t tmp = 0; ret = prelude_extract_int32_safe(&tmp, buf, len); if ( ret < 0 ) return ret; idmef_impact_set_severity(impact, tmp); break; } case IDMEF_MSG_IMPACT_COMPLETION: { int32_t tmp = 0; ret = prelude_extract_int32_safe(&tmp, buf, len); if ( ret < 0 ) return ret; idmef_impact_set_completion(impact, tmp); break; } case IDMEF_MSG_IMPACT_TYPE: { int32_t tmp = 0; ret = prelude_extract_int32_safe(&tmp, buf, len); if ( ret < 0 ) return ret; idmef_impact_set_type(impact, tmp); break; } case IDMEF_MSG_IMPACT_DESCRIPTION: { prelude_string_t *tmp = NULL; ret = prelude_extract_string_safe(&tmp, buf, len, msg); if ( ret < 0 ) return ret; idmef_impact_set_description(impact, tmp); break; } case IDMEF_MSG_END_OF_TAG: return 0; default: return prelude_error_verbose(PRELUDE_ERROR_IDMEF_UNKNOWN_TAG, "Unknown tag while reading idmef_impact_t: '%u'", tag); } } return 0; } /** * idmef_action_read: * @action: Pointer to a #idmef_action_t object. * @msg: Pointer to a #prelude_msg_t object, containing a message. * * Read an idmef_action from the @msg message, and * store it into @action. * * Returns: 0 on success, a negative value if an error occured. */ int idmef_action_read(idmef_action_t *action, prelude_msg_t *msg) { int ret; void *buf; uint8_t tag; uint32_t len; while ( 1 ) { ret = prelude_msg_get(msg, &tag, &len, &buf); if ( ret < 0 ) return ret; switch ( tag ) { case IDMEF_MSG_ACTION_CATEGORY: { int32_t tmp = 0; ret = prelude_extract_int32_safe(&tmp, buf, len); if ( ret < 0 ) return ret; idmef_action_set_category(action, tmp); break; } case IDMEF_MSG_ACTION_DESCRIPTION: { prelude_string_t *tmp = NULL; ret = prelude_extract_string_safe(&tmp, buf, len, msg); if ( ret < 0 ) return ret; idmef_action_set_description(action, tmp); break; } case IDMEF_MSG_END_OF_TAG: return 0; default: return prelude_error_verbose(PRELUDE_ERROR_IDMEF_UNKNOWN_TAG, "Unknown tag while reading idmef_action_t: '%u'", tag); } } return 0; } /** * idmef_confidence_read: * @confidence: Pointer to a #idmef_confidence_t object. * @msg: Pointer to a #prelude_msg_t object, containing a message. * * Read an idmef_confidence from the @msg message, and * store it into @confidence. * * Returns: 0 on success, a negative value if an error occured. */ int idmef_confidence_read(idmef_confidence_t *confidence, prelude_msg_t *msg) { int ret; void *buf; uint8_t tag; uint32_t len; while ( 1 ) { ret = prelude_msg_get(msg, &tag, &len, &buf); if ( ret < 0 ) return ret; switch ( tag ) { case IDMEF_MSG_CONFIDENCE_RATING: { int32_t tmp = 0; ret = prelude_extract_int32_safe(&tmp, buf, len); if ( ret < 0 ) return ret; idmef_confidence_set_rating(confidence, tmp); break; } case IDMEF_MSG_CONFIDENCE_CONFIDENCE: { float tmp = 0; ret = prelude_extract_float_safe(&tmp, buf, len); if ( ret < 0 ) return ret; idmef_confidence_set_confidence(confidence, tmp); break; } case IDMEF_MSG_END_OF_TAG: return 0; default: return prelude_error_verbose(PRELUDE_ERROR_IDMEF_UNKNOWN_TAG, "Unknown tag while reading idmef_confidence_t: '%u'", tag); } } return 0; } /** * idmef_assessment_read: * @assessment: Pointer to a #idmef_assessment_t object. * @msg: Pointer to a #prelude_msg_t object, containing a message. * * Read an idmef_assessment from the @msg message, and * store it into @assessment. * * Returns: 0 on success, a negative value if an error occured. */ int idmef_assessment_read(idmef_assessment_t *assessment, prelude_msg_t *msg) { int ret; void *buf; uint8_t tag; uint32_t len; while ( 1 ) { ret = prelude_msg_get(msg, &tag, &len, &buf); if ( ret < 0 ) return ret; switch ( tag ) { case IDMEF_MSG_IMPACT_TAG: { int ret; idmef_impact_t *tmp = NULL; ret = idmef_assessment_new_impact(assessment, &tmp); if ( ret < 0 ) return ret; ret = idmef_impact_read(tmp, msg); if ( ret < 0 ) return ret; break; } case IDMEF_MSG_ACTION_TAG: { int ret; idmef_action_t *tmp = NULL; ret = idmef_assessment_new_action(assessment, &tmp, -1); if ( ret < 0 ) return ret; ret = idmef_action_read(tmp, msg); if ( ret < 0 ) return ret; break; } case IDMEF_MSG_CONFIDENCE_TAG: { int ret; idmef_confidence_t *tmp = NULL; ret = idmef_assessment_new_confidence(assessment, &tmp); if ( ret < 0 ) return ret; ret = idmef_confidence_read(tmp, msg); if ( ret < 0 ) return ret; break; } case IDMEF_MSG_END_OF_TAG: return 0; default: return prelude_error_verbose(PRELUDE_ERROR_IDMEF_UNKNOWN_TAG, "Unknown tag while reading idmef_assessment_t: '%u'", tag); } } return 0; } /** * idmef_tool_alert_read: * @tool_alert: Pointer to a #idmef_tool_alert_t object. * @msg: Pointer to a #prelude_msg_t object, containing a message. * * Read an idmef_tool_alert from the @msg message, and * store it into @tool_alert. * * Returns: 0 on success, a negative value if an error occured. */ int idmef_tool_alert_read(idmef_tool_alert_t *tool_alert, prelude_msg_t *msg) { int ret; void *buf; uint8_t tag; uint32_t len; while ( 1 ) { ret = prelude_msg_get(msg, &tag, &len, &buf); if ( ret < 0 ) return ret; switch ( tag ) { case IDMEF_MSG_TOOL_ALERT_NAME: { prelude_string_t *tmp = NULL; ret = prelude_extract_string_safe(&tmp, buf, len, msg); if ( ret < 0 ) return ret; idmef_tool_alert_set_name(tool_alert, tmp); break; } case IDMEF_MSG_TOOL_ALERT_COMMAND: { prelude_string_t *tmp = NULL; ret = prelude_extract_string_safe(&tmp, buf, len, msg); if ( ret < 0 ) return ret; idmef_tool_alert_set_command(tool_alert, tmp); break; } case IDMEF_MSG_ALERTIDENT_TAG: { int ret; idmef_alertident_t *tmp = NULL; ret = idmef_tool_alert_new_alertident(tool_alert, &tmp, -1); if ( ret < 0 ) return ret; ret = idmef_alertident_read(tmp, msg); if ( ret < 0 ) return ret; break; } case IDMEF_MSG_END_OF_TAG: return 0; default: return prelude_error_verbose(PRELUDE_ERROR_IDMEF_UNKNOWN_TAG, "Unknown tag while reading idmef_tool_alert_t: '%u'", tag); } } return 0; } /** * idmef_correlation_alert_read: * @correlation_alert: Pointer to a #idmef_correlation_alert_t object. * @msg: Pointer to a #prelude_msg_t object, containing a message. * * Read an idmef_correlation_alert from the @msg message, and * store it into @correlation_alert. * * Returns: 0 on success, a negative value if an error occured. */ int idmef_correlation_alert_read(idmef_correlation_alert_t *correlation_alert, prelude_msg_t *msg) { int ret; void *buf; uint8_t tag; uint32_t len; while ( 1 ) { ret = prelude_msg_get(msg, &tag, &len, &buf); if ( ret < 0 ) return ret; switch ( tag ) { case IDMEF_MSG_CORRELATION_ALERT_NAME: { prelude_string_t *tmp = NULL; ret = prelude_extract_string_safe(&tmp, buf, len, msg); if ( ret < 0 ) return ret; idmef_correlation_alert_set_name(correlation_alert, tmp); break; } case IDMEF_MSG_ALERTIDENT_TAG: { int ret; idmef_alertident_t *tmp = NULL; ret = idmef_correlation_alert_new_alertident(correlation_alert, &tmp, -1); if ( ret < 0 ) return ret; ret = idmef_alertident_read(tmp, msg); if ( ret < 0 ) return ret; break; } case IDMEF_MSG_END_OF_TAG: return 0; default: return prelude_error_verbose(PRELUDE_ERROR_IDMEF_UNKNOWN_TAG, "Unknown tag while reading idmef_correlation_alert_t: '%u'", tag); } } return 0; } /** * idmef_overflow_alert_read: * @overflow_alert: Pointer to a #idmef_overflow_alert_t object. * @msg: Pointer to a #prelude_msg_t object, containing a message. * * Read an idmef_overflow_alert from the @msg message, and * store it into @overflow_alert. * * Returns: 0 on success, a negative value if an error occured. */ int idmef_overflow_alert_read(idmef_overflow_alert_t *overflow_alert, prelude_msg_t *msg) { int ret; void *buf; uint8_t tag; uint32_t len; while ( 1 ) { ret = prelude_msg_get(msg, &tag, &len, &buf); if ( ret < 0 ) return ret; switch ( tag ) { case IDMEF_MSG_OVERFLOW_ALERT_PROGRAM: { prelude_string_t *tmp = NULL; ret = prelude_extract_string_safe(&tmp, buf, len, msg); if ( ret < 0 ) return ret; idmef_overflow_alert_set_program(overflow_alert, tmp); break; } case IDMEF_MSG_OVERFLOW_ALERT_SIZE: { uint32_t tmp = 0; ret = prelude_extract_uint32_safe(&tmp, buf, len); if ( ret < 0 ) return ret; idmef_overflow_alert_set_size(overflow_alert, tmp); break; } case IDMEF_MSG_OVERFLOW_ALERT_BUFFER: { idmef_data_t *tmp = NULL; ret = prelude_extract_data_safe(&tmp, buf, len, msg); if ( ret < 0 ) return ret; idmef_overflow_alert_set_buffer(overflow_alert, tmp); break; } case IDMEF_MSG_END_OF_TAG: return 0; default: return prelude_error_verbose(PRELUDE_ERROR_IDMEF_UNKNOWN_TAG, "Unknown tag while reading idmef_overflow_alert_t: '%u'", tag); } } return 0; } /** * idmef_alert_read: * @alert: Pointer to a #idmef_alert_t object. * @msg: Pointer to a #prelude_msg_t object, containing a message. * * Read an idmef_alert from the @msg message, and * store it into @alert. * * Returns: 0 on success, a negative value if an error occured. */ int idmef_alert_read(idmef_alert_t *alert, prelude_msg_t *msg) { int ret; void *buf; uint8_t tag; uint32_t len; while ( 1 ) { ret = prelude_msg_get(msg, &tag, &len, &buf); if ( ret < 0 ) return ret; switch ( tag ) { case IDMEF_MSG_ALERT_MESSAGEID: { prelude_string_t *tmp = NULL; ret = prelude_extract_string_safe(&tmp, buf, len, msg); if ( ret < 0 ) return ret; idmef_alert_set_messageid(alert, tmp); break; } case IDMEF_MSG_ANALYZER_TAG: { int ret; idmef_analyzer_t *tmp = NULL; ret = idmef_alert_new_analyzer(alert, &tmp, -1); if ( ret < 0 ) return ret; ret = idmef_analyzer_read(tmp, msg); if ( ret < 0 ) return ret; break; } case IDMEF_MSG_ALERT_CREATE_TIME: { idmef_time_t *tmp = NULL; ret = prelude_extract_time_safe(&tmp, buf, len, msg); if ( ret < 0 ) return ret; idmef_alert_set_create_time(alert, tmp); break; } case IDMEF_MSG_CLASSIFICATION_TAG: { int ret; idmef_classification_t *tmp = NULL; ret = idmef_alert_new_classification(alert, &tmp); if ( ret < 0 ) return ret; ret = idmef_classification_read(tmp, msg); if ( ret < 0 ) return ret; break; } case IDMEF_MSG_ALERT_DETECT_TIME: { idmef_time_t *tmp = NULL; ret = prelude_extract_time_safe(&tmp, buf, len, msg); if ( ret < 0 ) return ret; idmef_alert_set_detect_time(alert, tmp); break; } case IDMEF_MSG_ALERT_ANALYZER_TIME: { idmef_time_t *tmp = NULL; ret = prelude_extract_time_safe(&tmp, buf, len, msg); if ( ret < 0 ) return ret; idmef_alert_set_analyzer_time(alert, tmp); break; } case IDMEF_MSG_SOURCE_TAG: { int ret; idmef_source_t *tmp = NULL; ret = idmef_alert_new_source(alert, &tmp, -1); if ( ret < 0 ) return ret; ret = idmef_source_read(tmp, msg); if ( ret < 0 ) return ret; break; } case IDMEF_MSG_TARGET_TAG: { int ret; idmef_target_t *tmp = NULL; ret = idmef_alert_new_target(alert, &tmp, -1); if ( ret < 0 ) return ret; ret = idmef_target_read(tmp, msg); if ( ret < 0 ) return ret; break; } case IDMEF_MSG_ASSESSMENT_TAG: { int ret; idmef_assessment_t *tmp = NULL; ret = idmef_alert_new_assessment(alert, &tmp); if ( ret < 0 ) return ret; ret = idmef_assessment_read(tmp, msg); if ( ret < 0 ) return ret; break; } case IDMEF_MSG_ADDITIONAL_DATA_TAG: { int ret; idmef_additional_data_t *tmp = NULL; ret = idmef_alert_new_additional_data(alert, &tmp, -1); if ( ret < 0 ) return ret; ret = idmef_additional_data_read(tmp, msg); if ( ret < 0 ) return ret; break; } case IDMEF_MSG_TOOL_ALERT_TAG: { int ret; idmef_tool_alert_t *tmp = NULL; ret = idmef_alert_new_tool_alert(alert, &tmp); if ( ret < 0 ) return ret; ret = idmef_tool_alert_read(tmp, msg); if ( ret < 0 ) return ret; break; } case IDMEF_MSG_CORRELATION_ALERT_TAG: { int ret; idmef_correlation_alert_t *tmp = NULL; ret = idmef_alert_new_correlation_alert(alert, &tmp); if ( ret < 0 ) return ret; ret = idmef_correlation_alert_read(tmp, msg); if ( ret < 0 ) return ret; break; } case IDMEF_MSG_OVERFLOW_ALERT_TAG: { int ret; idmef_overflow_alert_t *tmp = NULL; ret = idmef_alert_new_overflow_alert(alert, &tmp); if ( ret < 0 ) return ret; ret = idmef_overflow_alert_read(tmp, msg); if ( ret < 0 ) return ret; break; } case IDMEF_MSG_END_OF_TAG: return 0; default: return prelude_error_verbose(PRELUDE_ERROR_IDMEF_UNKNOWN_TAG, "Unknown tag while reading idmef_alert_t: '%u'", tag); } } return 0; } /** * idmef_heartbeat_read: * @heartbeat: Pointer to a #idmef_heartbeat_t object. * @msg: Pointer to a #prelude_msg_t object, containing a message. * * Read an idmef_heartbeat from the @msg message, and * store it into @heartbeat. * * Returns: 0 on success, a negative value if an error occured. */ int idmef_heartbeat_read(idmef_heartbeat_t *heartbeat, prelude_msg_t *msg) { int ret; void *buf; uint8_t tag; uint32_t len; while ( 1 ) { ret = prelude_msg_get(msg, &tag, &len, &buf); if ( ret < 0 ) return ret; switch ( tag ) { case IDMEF_MSG_HEARTBEAT_MESSAGEID: { prelude_string_t *tmp = NULL; ret = prelude_extract_string_safe(&tmp, buf, len, msg); if ( ret < 0 ) return ret; idmef_heartbeat_set_messageid(heartbeat, tmp); break; } case IDMEF_MSG_ANALYZER_TAG: { int ret; idmef_analyzer_t *tmp = NULL; ret = idmef_heartbeat_new_analyzer(heartbeat, &tmp, -1); if ( ret < 0 ) return ret; ret = idmef_analyzer_read(tmp, msg); if ( ret < 0 ) return ret; break; } case IDMEF_MSG_HEARTBEAT_CREATE_TIME: { idmef_time_t *tmp = NULL; ret = prelude_extract_time_safe(&tmp, buf, len, msg); if ( ret < 0 ) return ret; idmef_heartbeat_set_create_time(heartbeat, tmp); break; } case IDMEF_MSG_HEARTBEAT_ANALYZER_TIME: { idmef_time_t *tmp = NULL; ret = prelude_extract_time_safe(&tmp, buf, len, msg); if ( ret < 0 ) return ret; idmef_heartbeat_set_analyzer_time(heartbeat, tmp); break; } case IDMEF_MSG_HEARTBEAT_HEARTBEAT_INTERVAL: { uint32_t tmp = 0; ret = prelude_extract_uint32_safe(&tmp, buf, len); if ( ret < 0 ) return ret; idmef_heartbeat_set_heartbeat_interval(heartbeat, tmp); break; } case IDMEF_MSG_ADDITIONAL_DATA_TAG: { int ret; idmef_additional_data_t *tmp = NULL; ret = idmef_heartbeat_new_additional_data(heartbeat, &tmp, -1); if ( ret < 0 ) return ret; ret = idmef_additional_data_read(tmp, msg); if ( ret < 0 ) return ret; break; } case IDMEF_MSG_END_OF_TAG: return 0; default: return prelude_error_verbose(PRELUDE_ERROR_IDMEF_UNKNOWN_TAG, "Unknown tag while reading idmef_heartbeat_t: '%u'", tag); } } return 0; } /** * idmef_message_read: * @message: Pointer to a #idmef_message_t object. * @msg: Pointer to a #prelude_msg_t object, containing a message. * * Read an idmef_message from the @msg message, and * store it into @message. * * Returns: 0 on success, a negative value if an error occured. */ int idmef_message_read(idmef_message_t *message, prelude_msg_t *msg) { int ret; void *buf; uint8_t tag; uint32_t len; while ( 1 ) { ret = prelude_msg_get(msg, &tag, &len, &buf); if ( ret < 0 ) return ret; switch ( tag ) { case IDMEF_MSG_MESSAGE_VERSION: { prelude_string_t *tmp = NULL; ret = prelude_extract_string_safe(&tmp, buf, len, msg); if ( ret < 0 ) return ret; idmef_message_set_version(message, tmp); break; } case IDMEF_MSG_ALERT_TAG: { int ret; idmef_alert_t *tmp = NULL; ret = idmef_message_new_alert(message, &tmp); if ( ret < 0 ) return ret; ret = idmef_alert_read(tmp, msg); if ( ret < 0 ) return ret; break; } case IDMEF_MSG_HEARTBEAT_TAG: { int ret; idmef_heartbeat_t *tmp = NULL; ret = idmef_message_new_heartbeat(message, &tmp); if ( ret < 0 ) return ret; ret = idmef_heartbeat_read(tmp, msg); if ( ret < 0 ) return ret; break; } case IDMEF_MSG_END_OF_TAG: return 0; default: return prelude_error_verbose(PRELUDE_ERROR_IDMEF_UNKNOWN_TAG, "Unknown tag while reading idmef_message_t: '%u'", tag); } } return 0; } libprelude-1.0.0/src/prelude-option-wide.c0000664000076400007640000004110411325615276015431 00000000000000/***** * * Copyright (C) 2004,2005 PreludeIDS Technologies. All Rights Reserved. * Author: Yoann Vandoorselaere * * This file is part of the Prelude library. * * 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; see the file COPYING. If not, write to * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. * *****/ #include "config.h" #include "libmissing.h" #include #include #include #include #include #include "prelude-error.h" #include "prelude-log.h" #include "prelude-extract.h" #include "prelude-io.h" #include "prelude-msgbuf.h" #include "prelude-client.h" #include "prelude-message-id.h" #include "prelude-option.h" #include "prelude-option-wide.h" #include "common.h" #include "config-engine.h" static int config_save_value(config_t *cfg, int rtype, prelude_option_t *last, int is_last_cmd, char **prev, const char *option, const char *value, unsigned int *line) { int ret = 0; char buf[1024]; if ( ! (prelude_option_get_type(last) & PRELUDE_OPTION_TYPE_CFG) ) return -1; if ( rtype != PRELUDE_MSG_OPTION_SET && rtype != PRELUDE_MSG_OPTION_DESTROY ) return -1; if ( prelude_option_has_optlist(last) ) { if ( prelude_option_get_type(last) & PRELUDE_OPTION_TYPE_CONTEXT ) snprintf(buf, sizeof(buf), "%s=%s", option, (value) ? value : "default"); else snprintf(buf, sizeof(buf), "%s", option); if ( *prev ) free(*prev); *prev = strdup(buf); if ( ! *prev ) return prelude_error_from_errno(errno); if ( rtype == PRELUDE_MSG_OPTION_SET ) return _config_set(cfg, buf, NULL, NULL, line); else if ( is_last_cmd ) return _config_del(cfg, buf, NULL); } if ( rtype == PRELUDE_MSG_OPTION_SET ) ret = _config_set(cfg, *prev, option, value, line); else if ( is_last_cmd ) ret = _config_del(cfg, *prev, option); return ret; } static int parse_single(void **context, prelude_option_t **last, int is_last_cmd, int rtype, const char *option, const char *value, prelude_string_t *out) { int ret = 0; *last = prelude_option_search(*last, option, PRELUDE_OPTION_TYPE_WIDE, 0); if ( ! *last ) { prelude_string_sprintf(out, "Unknown option: %s.\n", option); return -1; } if ( rtype == PRELUDE_MSG_OPTION_SET ) ret = prelude_option_invoke_set(*last, value, out, context); else if ( is_last_cmd ) { if ( rtype == PRELUDE_MSG_OPTION_DESTROY ) ret = prelude_option_invoke_destroy(*last, value, out, *context); else if ( rtype == PRELUDE_MSG_OPTION_GET ) ret = prelude_option_invoke_get(*last, value, out, *context); else if ( rtype == PRELUDE_MSG_OPTION_COMMIT ) ret = prelude_option_invoke_commit(*last, value, out, *context); } return ret; } static char *option_strsep(char **request) { char *start = *request; prelude_bool_t ignore = FALSE; if ( ! *request ) return NULL; while ( **request ) { if ( ignore == TRUE && **request == ']' ) ignore = FALSE; if ( ignore == FALSE && **request == '[' ) ignore = TRUE; if ( ignore == FALSE && **request == '.' ) { **request = 0; *request = *request + 1; return start; } (*request)++; } if ( start != *request ) { *request = NULL; return start; } return NULL; } static int parse_request(prelude_client_t *client, int rtype, char *request, prelude_string_t *out) { config_t *cfg; void *context = client; char pname[256], iname[256]; prelude_option_t *last = NULL; int ret = 0, last_cmd = 0, ent; char *str, *value, *prev = NULL, *ptr = NULL; unsigned int line = 0; ret = _config_open(&cfg, prelude_client_get_config_filename(client)); if ( ret < 0 ) return ret; value = request; strsep(&value, "="); while ( (str = (option_strsep(&request))) ) { if ( ! request ) { last_cmd = 1; ptr = value; } *pname = 0; *iname = 0; ent = ret = sscanf(str, "%255[^[][%255[^]]", pname, iname); if ( ret < 1 ) { prelude_string_sprintf(out, "Error parsing option path"); break; } ret = parse_single(&context, &last, last_cmd, rtype, pname, (ent == 2) ? iname : ptr, out); if ( ret < 0 ) break; config_save_value(cfg, rtype, last, last_cmd, &prev, pname, (ent == 2) ? iname : ptr, &line); } _config_close(cfg); free(prev); return ret; } static void send_string(prelude_msgbuf_t *msgbuf, prelude_string_t *out, int type) { size_t len; len = prelude_string_is_empty(out) ? 0 : (prelude_string_get_len(out) + 1); if ( type == PRELUDE_MSG_OPTION_VALUE && ! len ) return; prelude_msgbuf_set(msgbuf, type, len, prelude_string_get_string(out)); } static void send_error(prelude_msgbuf_t *msgbuf, const char *fmt, ...) { int ret; va_list ap; prelude_string_t *out; va_start(ap, fmt); ret = prelude_string_new(&out); if ( ret < 0 ) return; prelude_string_vprintf(out, fmt, ap); va_end(ap); send_string(msgbuf, out, PRELUDE_MSG_OPTION_ERROR); prelude_string_destroy(out); } static int read_option_request(prelude_client_t *client, prelude_msgbuf_t *msgbuf, prelude_msg_t *msg) { void *buf; uint8_t tag; char *request; uint32_t len, hop; int ret, type = -1; prelude_string_t *out; while ( prelude_msg_get(msg, &tag, &len, &buf) == 0 ) { switch (tag) { case PRELUDE_MSG_OPTION_SET: case PRELUDE_MSG_OPTION_GET: case PRELUDE_MSG_OPTION_COMMIT: case PRELUDE_MSG_OPTION_DESTROY: type = tag; break; case PRELUDE_MSG_OPTION_HOP: ret = prelude_extract_uint32_safe(&hop, buf, len); if ( ret < 0 ) return ret; hop = htonl(hop - 1); prelude_msgbuf_set(msgbuf, tag, len, &hop); break; case PRELUDE_MSG_OPTION_TARGET_ID: case PRELUDE_MSG_OPTION_TARGET_INSTANCE_ID: case PRELUDE_MSG_OPTION_REQUEST_ID: prelude_msgbuf_set(msgbuf, tag, len, buf); break; case PRELUDE_MSG_OPTION_LIST: return prelude_option_wide_send_msg(msgbuf, client); case PRELUDE_MSG_OPTION_VALUE: ret = prelude_extract_characters_safe((const char **) &request, buf, len); if ( ret < 0 ) return ret; if ( type < 0 || ! request ) { send_error(msgbuf, "No request specified"); return -1; } ret = prelude_string_new(&out); if ( ret < 0 ) return ret; ret = parse_request(client, type, request, out); send_string(msgbuf, out, (ret < 0) ? PRELUDE_MSG_OPTION_ERROR : PRELUDE_MSG_OPTION_VALUE); prelude_string_destroy(out); break; default: send_error(msgbuf, "Unknown option tag: %d", tag); return -1; } } return 0; } static int read_option_list(prelude_msg_t *msg, prelude_option_t *opt, uint64_t *source_id) { int ret; void *buf; uint8_t tag; const char *tmp = NULL; uint32_t dlen, tmpint = 0; prelude_option_t *newopt; if ( ! opt ) return -1; while ( (ret = prelude_msg_get(msg, &tag, &dlen, &buf)) == 0 ) { switch (tag) { case PRELUDE_MSG_OPTION_START: ret = prelude_option_new(opt, &newopt); if ( ret < 0 ) break; read_option_list(msg, newopt, source_id); break; case PRELUDE_MSG_OPTION_END: return 0; case PRELUDE_MSG_OPTION_VALUE: ret = prelude_extract_characters_safe(&tmp, buf, dlen); if ( ret < 0 ) return ret; prelude_option_set_value(opt, tmp); break; case PRELUDE_MSG_OPTION_NAME: ret = prelude_extract_characters_safe(&tmp, buf, dlen); if ( ret < 0 ) return ret; prelude_option_set_longopt(opt, tmp); break; case PRELUDE_MSG_OPTION_DESC: ret = prelude_extract_characters_safe(&tmp, buf, dlen); if ( ret < 0 ) return ret; prelude_option_set_description(opt, tmp); break; case PRELUDE_MSG_OPTION_HELP: ret = prelude_extract_characters_safe(&tmp, buf, dlen); if ( ret < 0 ) return ret; prelude_option_set_help(opt, tmp); break; case PRELUDE_MSG_OPTION_INPUT_VALIDATION: ret = prelude_extract_characters_safe(&tmp, buf, dlen); if ( ret < 0 ) return ret; prelude_option_set_input_validation_regex(opt, tmp); break; case PRELUDE_MSG_OPTION_HAS_ARG: ret = prelude_extract_uint32_safe(&tmpint, buf, dlen); if ( ret < 0 ) return ret; prelude_option_set_has_arg(opt, tmpint); break; case PRELUDE_MSG_OPTION_TYPE: ret = prelude_extract_uint32_safe(&tmpint, buf, dlen); if ( ret < 0 ) return ret; prelude_option_set_type(opt, tmpint); break; case PRELUDE_MSG_OPTION_INPUT_TYPE: ret = prelude_extract_uint32_safe(&tmpint, buf, dlen); if ( ret < 0 ) return ret; prelude_option_set_input_type(opt, tmpint); break; default: /* * for compatibility purpose, don't return an error on unknow tag. */ prelude_log(PRELUDE_LOG_WARN, "unknown option tag %d.\n", tag); } } return 0; } int prelude_option_process_request(prelude_client_t *client, prelude_msg_t *msg, prelude_msgbuf_t *out) { uint8_t tag; tag = prelude_msg_get_tag(msg); if ( tag != PRELUDE_MSG_OPTION_REQUEST ) return -1; prelude_msg_set_tag(prelude_msgbuf_get_msg(out), PRELUDE_MSG_OPTION_REPLY); return read_option_request(client, out, msg); } int prelude_option_push_request(prelude_msgbuf_t *msg, int type, const char *request) { prelude_msgbuf_set(msg, type, 0, 0); if ( request ) prelude_msgbuf_set(msg, PRELUDE_MSG_OPTION_VALUE, strlen(request) + 1, request); return 0; } int prelude_option_new_request(prelude_msgbuf_t *msgbuf, uint32_t request_id, uint64_t *target_id, size_t size) { size_t i; uint32_t hop, instance_id = 0; prelude_msg_set_tag(prelude_msgbuf_get_msg(msgbuf), PRELUDE_MSG_OPTION_REQUEST); /* * the caller is supposed to provide a full path, * from him to the destination, to the original hop is 1. */ hop = htonl(1); for ( i = 0; i < size; i++ ) target_id[i] = prelude_hton64(target_id[i]); request_id = htonl(request_id); prelude_msgbuf_set(msgbuf, PRELUDE_MSG_OPTION_REQUEST_ID, sizeof(request_id), &request_id); prelude_msgbuf_set(msgbuf, PRELUDE_MSG_OPTION_TARGET_ID, i * sizeof(*target_id), target_id); prelude_msgbuf_set(msgbuf, PRELUDE_MSG_OPTION_TARGET_INSTANCE_ID, sizeof(instance_id), &instance_id); prelude_msgbuf_set(msgbuf, PRELUDE_MSG_OPTION_HOP, sizeof(hop), &hop); return 0; } int prelude_option_recv_reply(prelude_msg_t *msg, uint64_t *source_id, uint32_t *request_id, void **value) { void *buf; uint8_t tag; uint32_t dlen; int ret, type = -1; *value = NULL; while ( (ret = prelude_msg_get(msg, &tag, &dlen, &buf)) == 0 ) { switch (tag) { case PRELUDE_MSG_OPTION_HOP: break; case PRELUDE_MSG_OPTION_REQUEST_ID: type = PRELUDE_OPTION_REPLY_TYPE_SET; ret = prelude_extract_uint32_safe(request_id, buf, dlen); if ( ret < 0 ) return ret; break; case PRELUDE_MSG_OPTION_VALUE: type = PRELUDE_OPTION_REPLY_TYPE_GET; ret = prelude_extract_characters_safe((const char **) value, buf, dlen); if ( ret < 0 ) return ret; break; case PRELUDE_MSG_OPTION_ERROR: type = PRELUDE_OPTION_REPLY_TYPE_ERROR; if ( ! dlen ) { *value = "No error message"; break; } ret = prelude_extract_characters_safe((const char **) value, buf, dlen); if ( ret < 0 ) return ret; break; case PRELUDE_MSG_OPTION_TARGET_ID: if ( dlen % sizeof(uint64_t) != 0 || dlen < (2 * sizeof(uint64_t)) ) return -1; *source_id = prelude_extract_uint64((unsigned char *) buf + (dlen - sizeof(uint64_t))); break; case PRELUDE_MSG_OPTION_LIST: type = PRELUDE_OPTION_REPLY_TYPE_LIST; ret = prelude_option_new(NULL, (prelude_option_t **) value); if ( ret < 0 ) return ret; ret = read_option_list(msg, *value, NULL); if ( ret < 0 ) return ret; break; default: prelude_log(PRELUDE_LOG_WARN, "unknown option tag %d.\n", tag); } } return type; } libprelude-1.0.0/src/prelude-timer.c0000664000076400007640000002642611202225027014306 00000000000000/***** * * Copyright (C) 1999-2005 PreludeIDS Technologies. All Rights Reserved. * Author: Yoann Vandoorselaere * * This file is part of the Prelude library. * * 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; see the file COPYING. If not, write to * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. * *****/ #include "config.h" #include #include #include #include #include "glthread/thread.h" #include "glthread/lock.h" #include "glthread/cond.h" #include "prelude-log.h" #include "prelude-list.h" #include "prelude-linked-object.h" #include "prelude-async.h" #include "prelude-error.h" #include "prelude-timer.h" static PRELUDE_LIST(timer_list); static gl_lock_t mutex = gl_lock_initializer; inline static void timer_lock_list(void) { gl_lock_lock(mutex); } inline static void timer_unlock_list(void) { gl_lock_unlock(mutex); } /* * Return the time elapsed by a timer 'timer' from now, * to the time it was created / reset. */ static time_t time_elapsed(prelude_timer_t *timer, time_t now) { return now - timer->start_time; } static time_t time_remaining(prelude_timer_t *timer, time_t now) { return timer->expire - time_elapsed(timer, now); } /* * If timer 'timer' need to be waked up (it elapsed >= time * for it to expire), call it's callback function, with it's * registered argument. * * All expired timer should be destroyed. */ static int wake_up_if_needed(prelude_timer_t *timer, time_t now) { assert(timer->start_time != -1); if ( now == -1 || time_elapsed(timer, now) >= prelude_timer_get_expire(timer) ) { timer->start_time = -1; prelude_timer_get_callback(timer)(prelude_timer_get_data(timer)); return 0; } return -1; } static prelude_timer_t *get_next_timer(void) { prelude_list_t *tmp; prelude_timer_t *timer = NULL; gl_lock_lock(mutex); prelude_list_for_each(&timer_list, tmp) { timer = prelude_list_entry(tmp, prelude_timer_t, list); break; } gl_lock_unlock(mutex); return timer; } /* * Walk the list of timer, * call the wake_up_if_need_function on each timer. */ static void walk_and_wake_up_timer(time_t now) { int ret, woke = 0; prelude_timer_t *timer; while ( (timer = get_next_timer()) ) { ret = wake_up_if_needed(timer, now); if ( ret < 0 ) break; woke++; } prelude_log_debug(5, "woke up %d timer\n", woke); } /* * search the timer list forward for the timer entry * that should be before our inserted timer. */ static prelude_list_t *search_previous_forward(prelude_timer_t *timer, time_t expire) { int hop = 0; prelude_timer_t *cur; prelude_list_t *tmp, *prev = NULL; prelude_list_for_each(&timer_list, tmp) { cur = prelude_list_entry(tmp, prelude_timer_t, list); hop++; if ( (cur->start_time + cur->expire) < expire ) { /* * we found a previous timer (expiring before us), * but we're walking the list forward, and there could be more... * save and continue. */ prev = tmp; continue; } else if ( (cur->start_time + cur->expire) == expire ) { /* * we found a timer that's expiring at the same time * as us. Return it as the previous insertion point. */ prelude_log_debug(5, "[expire=%d] found forward in %d hop at %p\n", timer->expire, hop, cur); return tmp; } else if ( (cur->start_time + cur->expire) > expire ) { /* * we found a timer expiring after us. We can return * the previously saved entry. */ prelude_log_debug(5, "[expire=%d] found forward in %d hop at %p\n", timer->expire, hop, cur); assert(prev); return prev; } } /* * this should never happen, as search_previous_timer verify * if timer should be inserted last. */ abort(); } /* * search the timer list backward for the timer entry * that should be before our inserted timer. */ static prelude_list_t *search_previous_backward(prelude_timer_t *timer, time_t expire) { int hop = 0; prelude_timer_t *cur; prelude_list_t *tmp; for ( tmp = timer_list.prev; tmp != &timer_list; tmp = tmp->prev ) { cur = prelude_list_entry(tmp, prelude_timer_t, list); if ( (cur->start_time + cur->expire) <= expire ) { prelude_log_debug(5, "[expire=%d] found backward in %d hop at %p\n", timer->expire, hop + 1, cur); assert(tmp); return tmp; } hop++; } /* * this should never happen, as search_previous_timer verify * if timer should be inserted first. */ abort(); } inline static prelude_timer_t *get_first_timer(void) { return prelude_list_entry(timer_list.next, prelude_timer_t, list); } inline static prelude_timer_t *get_last_timer(void) { return prelude_list_entry(timer_list.prev, prelude_timer_t, list); } /* * On entering in this function, we know that : * - expire is > than first_expire. * - expire is < than last_expire. */ static prelude_list_t *search_previous_timer(prelude_timer_t *timer) { time_t expire; prelude_timer_t *last, *first; time_t last_remaining, first_remaining; last = get_last_timer(); first = get_first_timer(); /* * timer we want to insert expire after (or at the same time) the known * to be expiring last timer. This mean we should insert the new timer * at the end of the list. */ if ( timer->expire >= time_remaining(last, timer->start_time) ) { assert(timer_list.prev); prelude_log_debug(5, "[expire=%d] found without search (insert last)\n", timer->expire); return timer_list.prev; } /* * timer we want to insert expire before (or at the same time), the known * to be expiring first timer. This mean we should insert the new timer at * the beginning of the list. */ if ( timer->expire <= time_remaining(first, timer->start_time) ) { prelude_log_debug(5, "[expire=%d] found without search (insert first)\n", timer->expire); return &timer_list; } /* * we now know we expire after the first expiring timer, * but before the last expiring one. * * compute expiration time for current, last, and first timer. */ expire = timer->expire + timer->start_time; last_remaining = time_remaining(last, timer->start_time); first_remaining = time_remaining(first, timer->start_time); /* * use the better list iterating function to find the previous timer. */ if ( (last_remaining - timer->expire) > (timer->expire - first_remaining) ) /* * previous is probably near the beginning of the list. */ return search_previous_forward(timer, timer->expire + timer->start_time); else /* * previous is probably near the end of the list. */ return search_previous_backward(timer, timer->expire + timer->start_time); } static void timer_destroy_unlocked(prelude_timer_t *timer) { if ( ! prelude_list_is_empty(&timer->list) ) prelude_list_del_init(&timer->list); } static void timer_init_unlocked(prelude_timer_t *timer) { prelude_list_t *prev; timer->start_time = time(NULL); if ( ! prelude_list_is_empty(&timer_list) ) prev = search_previous_timer(timer); else prev = &timer_list; prelude_list_add(prev, &timer->list); } /** * prelude_timer_init: * @timer: timer to initialize. * * Initialize a timer (add it to the timer list). */ void prelude_timer_init(prelude_timer_t *timer) { timer_lock_list(); timer_init_unlocked(timer); timer_unlock_list(); } /** * prelude_timer_init_list: * @timer: Pointer to a #prelude_timer_t object. * * Initialize @timer list member. This is useful if * you're going to call prelude_timer_destroy() on timer * for which prelude_timer_init() was never called. * */ void prelude_timer_init_list(prelude_timer_t *timer) { prelude_list_init(&timer->list); } /** * prelude_timer_reset: * @timer: the timer to reset. * * Reset timer 'timer', as if it was just started. */ void prelude_timer_reset(prelude_timer_t *timer) { timer_lock_list(); timer_destroy_unlocked(timer); timer_init_unlocked(timer); timer_unlock_list(); } /** * prelude_timer_destroy: * @timer: the timer to destroy. * * Destroy the timer 'timer', * this remove it from the active timer list. */ void prelude_timer_destroy(prelude_timer_t *timer) { timer_lock_list(); timer_destroy_unlocked(timer); timer_unlock_list(); } /** * prelude_timer_wake_up: * * Wake up timer that need it. * This function should be called every second to work properly. */ void prelude_timer_wake_up(void) { time_t now = time(NULL); walk_and_wake_up_timer(now); } /** * prelude_timer_flush: * * Expire every timer. */ void prelude_timer_flush(void) { walk_and_wake_up_timer(-1); } /** * prelude_timer_lock_critical_region: * * Deactivate timer wake-up until timer_unlock_critical_region() is called. */ void prelude_timer_lock_critical_region(void) { timer_lock_list(); } /** * prelude_timer_unlock_critical_region: * * Reactivate timer wake-up after timer_lock_critical_regions() has been called. */ void prelude_timer_unlock_critical_region(void) { timer_unlock_list(); } int _prelude_timer_init(void) { return 0; } void _prelude_timer_fork_prepare(void) { prelude_timer_lock_critical_region(); } void _prelude_timer_fork_parent(void) { prelude_timer_unlock_critical_region(); } void _prelude_timer_fork_child(void) { prelude_list_init(&timer_list); gl_lock_init(mutex); } libprelude-1.0.0/src/idmef-criteria-string.yac.h0000664000076400007640000000740511202225026016473 00000000000000/* A Bison parser, made by GNU Bison 2.3. */ /* Skeleton interface for Bison's Yacc-like parsers in C Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ /* As a special exception, you may create a larger work that contains part or all of the Bison parser skeleton and distribute that work under terms of your choice, so long as that work isn't itself a parser generator using the skeleton or a modified version thereof as a parser skeleton. Alternatively, if you modify or redistribute the parser skeleton itself, you may (at your option) remove this special exception, which will cause the skeleton and the resulting Bison output files to be licensed under the GNU General Public License without this special exception. This special exception was added by the Free Software Foundation in version 2.2 of Bison. */ /* Tokens. */ #ifndef YYTOKENTYPE # define YYTOKENTYPE /* Put the tokens into the symbol table, so that GDB and other debuggers know about them. */ enum yytokentype { TOK_IDMEF_VALUE = 258, TOK_IDMEF_PATH = 259, TOK_RELATION_SUBSTRING = 260, TOK_RELATION_SUBSTRING_NOCASE = 261, TOK_RELATION_NOT_SUBSTRING = 262, TOK_RELATION_NOT_SUBSTRING_NOCASE = 263, TOK_RELATION_REGEXP = 264, TOK_RELATION_REGEXP_NOCASE = 265, TOK_RELATION_NOT_REGEXP = 266, TOK_RELATION_NOT_REGEXP_NOCASE = 267, TOK_RELATION_GREATER = 268, TOK_RELATION_GREATER_OR_EQUAL = 269, TOK_RELATION_LESS = 270, TOK_RELATION_LESS_OR_EQUAL = 271, TOK_RELATION_EQUAL = 272, TOK_RELATION_EQUAL_NOCASE = 273, TOK_RELATION_NOT_EQUAL = 274, TOK_RELATION_NOT_EQUAL_NOCASE = 275, TOK_NOT = 276, TOK_OPERATOR_AND = 277, TOK_OPERATOR_OR = 278, TOK_ERROR = 279 }; #endif /* Tokens. */ #define TOK_IDMEF_VALUE 258 #define TOK_IDMEF_PATH 259 #define TOK_RELATION_SUBSTRING 260 #define TOK_RELATION_SUBSTRING_NOCASE 261 #define TOK_RELATION_NOT_SUBSTRING 262 #define TOK_RELATION_NOT_SUBSTRING_NOCASE 263 #define TOK_RELATION_REGEXP 264 #define TOK_RELATION_REGEXP_NOCASE 265 #define TOK_RELATION_NOT_REGEXP 266 #define TOK_RELATION_NOT_REGEXP_NOCASE 267 #define TOK_RELATION_GREATER 268 #define TOK_RELATION_GREATER_OR_EQUAL 269 #define TOK_RELATION_LESS 270 #define TOK_RELATION_LESS_OR_EQUAL 271 #define TOK_RELATION_EQUAL 272 #define TOK_RELATION_EQUAL_NOCASE 273 #define TOK_RELATION_NOT_EQUAL 274 #define TOK_RELATION_NOT_EQUAL_NOCASE 275 #define TOK_NOT 276 #define TOK_OPERATOR_AND 277 #define TOK_OPERATOR_OR 278 #define TOK_ERROR 279 #if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED typedef union YYSTYPE #line 99 "idmef-criteria-string.yac.y" { char *str; int operator; idmef_path_t *path; idmef_criteria_t *criteria; idmef_criterion_operator_t relation; } /* Line 1489 of yacc.c. */ #line 105 "idmef-criteria-string.yac.h" YYSTYPE; # define yystype YYSTYPE /* obsolescent; will be withdrawn */ # define YYSTYPE_IS_DECLARED 1 # define YYSTYPE_IS_TRIVIAL 1 #endif extern YYSTYPE yylval; libprelude-1.0.0/src/idmef-value-type.c0000664000076400007640000006046411325615276014724 00000000000000/***** * * Copyright (C) 2003, 2004, 2005 PreludeIDS Technologies. All Rights Reserved. * Author: Yoann Vandoorselaere * * This file is part of the Prelude library. * * 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; see the file COPYING. If not, write to * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. * *****/ #include "libmissing.h" #include #include #include #include #include "prelude-inttypes.h" #include "prelude-string.h" #define PRELUDE_ERROR_SOURCE_DEFAULT PRELUDE_ERROR_SOURCE_IDMEF_VALUE_TYPE #include "prelude-error.h" #include "prelude-inttypes.h" #include "idmef-time.h" #include "idmef-data.h" #include "idmef-value-type.h" #define CLASS_OPERATOR IDMEF_CRITERION_OPERATOR_NULL|IDMEF_CRITERION_OPERATOR_NOT| \ IDMEF_CRITERION_OPERATOR_EQUAL #define DATA_OPERATOR IDMEF_CRITERION_OPERATOR_EQUAL|IDMEF_CRITERION_OPERATOR_NOT| \ IDMEF_CRITERION_OPERATOR_LESSER|IDMEF_CRITERION_OPERATOR_GREATER|IDMEF_CRITERION_OPERATOR_SUBSTR #define TIME_OPERATOR IDMEF_CRITERION_OPERATOR_LESSER|IDMEF_CRITERION_OPERATOR_GREATER| \ IDMEF_CRITERION_OPERATOR_EQUAL|IDMEF_CRITERION_OPERATOR_NOT #define STRING_OPERATOR IDMEF_CRITERION_OPERATOR_SUBSTR|IDMEF_CRITERION_OPERATOR_EQUAL| \ IDMEF_CRITERION_OPERATOR_NOT|IDMEF_CRITERION_OPERATOR_NOCASE #define INTEGER_OPERATOR IDMEF_CRITERION_OPERATOR_LESSER|IDMEF_CRITERION_OPERATOR_GREATER|\ IDMEF_CRITERION_OPERATOR_EQUAL|IDMEF_CRITERION_OPERATOR_NOT #define ENUM_OPERATOR STRING_OPERATOR|INTEGER_OPERATOR #define GENERIC_ONE_BASE_RW_FUNC(scanfmt, printfmt, name, type) \ static int name ## _read(idmef_value_type_t *dst, const char *buf) \ { \ int ret; \ ret = sscanf(buf, (scanfmt), &(dst)->data. name ##_val); \ return (ret == 1) ? 0 : prelude_error_verbose(PRELUDE_ERROR_IDMEF_VALUE_TYPE_PARSE, \ "Reading " #name " value failed"); \ } \ \ static int name ## _write(const idmef_value_type_t *src, prelude_string_t *out) \ { \ return prelude_string_sprintf(out, (printfmt), src->data.name ##_val); \ } #define GENERIC_TWO_BASES_RW_FUNC(fmt_dec, fmt_hex, name, type) \ static int name ## _read(idmef_value_type_t *dst, const char *buf) \ { \ int ret; \ \ if ( strncasecmp(buf, "0x", 2) == 0 ) \ ret = sscanf(buf, (fmt_hex), &(dst)->data. name ##_val); \ else \ ret = sscanf(buf, (fmt_dec), &(dst)->data. name ##_val); \ \ return (ret == 1) ? 0 : prelude_error_verbose(PRELUDE_ERROR_IDMEF_VALUE_TYPE_PARSE, \ "Reading " #name " value failed"); \ } \ \ static int name ## _write(const idmef_value_type_t *src, prelude_string_t *out) \ { \ return prelude_string_sprintf(out, (fmt_dec), src->data.name ##_val); \ } typedef struct { const char *name; size_t len; idmef_criterion_operator_t operator; int (*copy)(const idmef_value_type_t *src, void *dst, size_t size); int (*clone)(const idmef_value_type_t *src, idmef_value_type_t *dst, size_t size); int (*ref)(const idmef_value_type_t *src); void (*destroy)(idmef_value_type_t *type); int (*compare)(const idmef_value_type_t *t1, const idmef_value_type_t *t2, size_t size, idmef_criterion_operator_t op); int (*read)(idmef_value_type_t *dst, const char *buf); int (*write)(const idmef_value_type_t *src, prelude_string_t *out); } idmef_value_type_operation_t; static int byte_read(idmef_value_type_t *dst, const char *buf, unsigned int min, unsigned int max) { char *endptr; long int tmp; tmp = strtol(buf, &endptr, 0); if ( buf == endptr || tmp < min || tmp > max ) return prelude_error_verbose(PRELUDE_ERROR_IDMEF_VALUE_TYPE_PARSE, "Value out of range, required: [%u-%u], got %s", min, max, buf); dst->data.int8_val = (int8_t) tmp; return 0; } static int int8_write(const idmef_value_type_t *src, prelude_string_t *out) { return prelude_string_sprintf(out, "%d", (int) src->data.int8_val); } static int uint8_write(const idmef_value_type_t *src, prelude_string_t *out) { return prelude_string_sprintf(out, "%u", (int) src->data.int8_val); } static int int8_read(idmef_value_type_t *dst, const char *buf) { return byte_read(dst, buf, PRELUDE_INT8_MIN, PRELUDE_INT8_MAX); } static int uint8_read(idmef_value_type_t *dst, const char *buf) { return byte_read(dst, buf, 0, PRELUDE_UINT8_MAX); } GENERIC_TWO_BASES_RW_FUNC("%hd", "%hx", int16, int16_t) GENERIC_TWO_BASES_RW_FUNC("%hu", "%hx", uint16, uint16_t) GENERIC_TWO_BASES_RW_FUNC("%d", "%x", int32, int32_t) GENERIC_TWO_BASES_RW_FUNC("%u", "%x", uint32, uint32_t) GENERIC_TWO_BASES_RW_FUNC("%" PRELUDE_PRId64, "%" PRELUDE_PRIx64, int64, int64_t) GENERIC_TWO_BASES_RW_FUNC("%" PRELUDE_PRIu64, "%" PRELUDE_PRIx64, uint64, uint64_t) GENERIC_ONE_BASE_RW_FUNC("%f", "%f", float, float) GENERIC_ONE_BASE_RW_FUNC("%lf", "%f", double, double) /* * generic functions. */ static int charstring_compare(const char *s1, const char *s2, idmef_criterion_operator_t op) { if ( ! s1 || ! s2 ) return (s1) ? 1 : -1; if ( op == (IDMEF_CRITERION_OPERATOR_EQUAL|IDMEF_CRITERION_OPERATOR_NOCASE) && strcasecmp(s1, s2) == 0 ) return 0; else if ( op == IDMEF_CRITERION_OPERATOR_EQUAL && strcmp(s1, s2) == 0 ) return 0; else if ( op == (IDMEF_CRITERION_OPERATOR_SUBSTR|IDMEF_CRITERION_OPERATOR_NOCASE) && strcasestr(s1, s2) ) return 0; else if ( op == IDMEF_CRITERION_OPERATOR_SUBSTR && strstr(s1, s2) ) return 0; return -1; } static int generic_copy(const idmef_value_type_t *src, void *dst, size_t size) { memcpy(dst, &src->data, size); return 0; } static int generic_clone(const idmef_value_type_t *src, idmef_value_type_t *dst, size_t size) { memcpy(&dst->data, &src->data, size); return 0; } static int generic_compare(const idmef_value_type_t *t1, const idmef_value_type_t *t2, size_t size, idmef_criterion_operator_t op) { int ret; ret = memcmp(&t1->data, &t2->data, size); if ( ret == 0 && op & IDMEF_CRITERION_OPERATOR_EQUAL ) return 0; if ( ret < 0 && op & IDMEF_CRITERION_OPERATOR_LESSER ) return 0; if ( ret > 0 && op & IDMEF_CRITERION_OPERATOR_GREATER ) return 0; return -1; } /* * Enum specific */ static int enum_copy(const idmef_value_type_t *src, void *dst, size_t size) { *(int *)dst = src->data.enum_val.value; return 0; } static int enum_read(idmef_value_type_t *dst, const char *buf) { int ret; ret = sscanf(buf, "%d", &(dst)->data.enum_val.value); return (ret == 1) ? 0 : prelude_error_verbose(PRELUDE_ERROR_IDMEF_VALUE_TYPE_PARSE, "Reading enum value failed"); } static int enum_write(const idmef_value_type_t *src, prelude_string_t *out) { const char *str; str = idmef_class_enum_to_string(src->data.enum_val.class_id, src->data.enum_val.value); if ( ! str ) return prelude_error_verbose(PRELUDE_ERROR_IDMEF_VALUE_TYPE_PARSE, "Enumeration conversion from numeric to string failed"); return prelude_string_cat(out, str); } static int enum_compare(const idmef_value_type_t *src, const idmef_value_type_t *dst, size_t size, idmef_criterion_operator_t op) { const char *s1; if ( dst->id == IDMEF_VALUE_TYPE_STRING ) { s1 = idmef_class_enum_to_string(src->data.enum_val.class_id, src->data.enum_val.value); if ( ! s1 ) return prelude_error_verbose(PRELUDE_ERROR_IDMEF_VALUE_TYPE_PARSE, "Enumeration conversion from numeric to string failed"); return charstring_compare(s1, prelude_string_get_string(dst->data.string_val), op); } return generic_compare(src, dst, size, op); } /* * time specific function. */ static int time_compare(const idmef_value_type_t *t1, const idmef_value_type_t *t2, size_t size, idmef_criterion_operator_t op) { int ret; ret = idmef_time_compare(t1->data.time_val, t2->data.time_val); if ( op & IDMEF_CRITERION_OPERATOR_EQUAL && ret == 0 ) return 0; else if ( op & IDMEF_CRITERION_OPERATOR_LESSER && ret < 0 ) return 0; else if ( op & IDMEF_CRITERION_OPERATOR_GREATER && ret > 0 ) return 0; return -1; } static int time_read(idmef_value_type_t *dst, const char *buf) { int ret; ret = idmef_time_new_from_ntpstamp(&dst->data.time_val, buf); if ( ret == 0 ) return 0; ret = idmef_time_new_from_string(&dst->data.time_val, buf); if ( ret == 0 ) return 0; return prelude_error_verbose(PRELUDE_ERROR_IDMEF_VALUE_TYPE_PARSE, "Invalid time format specified: '%s'", buf); } static int time_write(const idmef_value_type_t *src, prelude_string_t *out) { return idmef_time_to_string(src->data.time_val, out); } static int time_copy(const idmef_value_type_t *src, void *dst, size_t size) { return idmef_time_copy(src->data.time_val, dst); } static int time_clone(const idmef_value_type_t *src, idmef_value_type_t *dst, size_t size) { return idmef_time_clone(src->data.time_val, &dst->data.time_val); } static int time_ref(const idmef_value_type_t *src) { idmef_time_ref(src->data.time_val); return 0; } static void time_destroy(idmef_value_type_t *type) { idmef_time_destroy(type->data.time_val); } /* * */ static int string_compare(const idmef_value_type_t *t1, const idmef_value_type_t *t2, size_t size, idmef_criterion_operator_t op) { const char *s1 = NULL, *s2 = NULL; if ( t1->data.string_val ) s1 = prelude_string_get_string(t1->data.string_val); if ( t2->data.string_val ) s2 = prelude_string_get_string(t2->data.string_val); return charstring_compare(s1, s2, op); } static int string_read(idmef_value_type_t *dst, const char *buf) { return prelude_string_new_dup(&dst->data.string_val, buf); } static int string_copy(const idmef_value_type_t *src, void *dst, size_t size) { return prelude_string_copy_dup(src->data.string_val, dst); } static int string_ref(const idmef_value_type_t *src) { prelude_string_ref(src->data.string_val); return 0; } static int string_clone(const idmef_value_type_t *src, idmef_value_type_t *dst, size_t size) { return prelude_string_clone(src->data.string_val, &dst->data.string_val); } static void string_destroy(idmef_value_type_t *type) { prelude_string_destroy(type->data.string_val); } static int string_write(const idmef_value_type_t *src, prelude_string_t *out) { return prelude_string_sprintf(out, "%s", prelude_string_get_string(src->data.string_val)); } /* * data specific functions */ static int data_compare(const idmef_value_type_t *t1, const idmef_value_type_t *t2, size_t len, idmef_criterion_operator_t op) { int ret; size_t s1_len, s2_len; const void *s1 = NULL, *s2 = NULL; if ( t1->data.data_val ) s1 = idmef_data_get_data(t1->data.data_val); if ( t2->data.string_val ) s2 = idmef_data_get_data(t2->data.data_val); if ( ! s1 || ! s2 ) return (s1) ? 1 : -1; if ( op & IDMEF_CRITERION_OPERATOR_SUBSTR ) { s1_len = idmef_data_get_len(t1->data.data_val); s2_len = idmef_data_get_len(t2->data.data_val); return ( memmem(s1, s1_len, s2, s2_len) ) ? 0 : -1; } ret = idmef_data_compare(t1->data.data_val, t2->data.data_val); if ( ret == 0 && op & IDMEF_CRITERION_OPERATOR_EQUAL ) return 0; else if ( ret < 0 && op & IDMEF_CRITERION_OPERATOR_LESSER ) return 0; else if ( ret > 0 && op & IDMEF_CRITERION_OPERATOR_GREATER ) return 0; return -1; } static int data_read(idmef_value_type_t *dst, const char *src) { return idmef_data_new_char_string_dup_fast(&dst->data.data_val, src, strlen(src)); } static int data_write(const idmef_value_type_t *src, prelude_string_t *out) { return idmef_data_to_string(src->data.data_val, out); } static int data_copy(const idmef_value_type_t *src, void *dst, size_t size) { return idmef_data_copy_dup(src->data.data_val, dst); } static int data_clone(const idmef_value_type_t *src, idmef_value_type_t *dst, size_t size) { return idmef_data_clone(src->data.data_val, &dst->data.data_val); } static int data_ref(const idmef_value_type_t *src) { idmef_data_ref(src->data.data_val); return 0; } static void data_destroy(idmef_value_type_t *type) { idmef_data_destroy(type->data.data_val); } /* * */ static int class_compare(const idmef_value_type_t *c1, const idmef_value_type_t *c2, size_t len, idmef_criterion_operator_t op) { return idmef_class_compare(c1->data.class_val.class_id, c1->data.class_val.object, c2->data.class_val.object); } static int class_copy(const idmef_value_type_t *src, void *dst, size_t size) { return idmef_class_copy(src->data.class_val.class_id, src->data.class_val.object, dst); } static int class_clone(const idmef_value_type_t *src, idmef_value_type_t *dst, size_t size) { dst->data.class_val.class_id = src->data.class_val.class_id; return idmef_class_clone(src->data.class_val.class_id, src->data.class_val.object, &dst->data.class_val.object); } static int class_ref(const idmef_value_type_t *src) { return idmef_class_ref(src->data.class_val.class_id, src->data.class_val.object); } static void class_destroy(idmef_value_type_t *type) { idmef_class_destroy(type->data.class_val.class_id, type->data.class_val.object); } static const idmef_value_type_operation_t ops_tbl[] = { { "unknown", 0, 0, NULL, NULL, NULL, NULL, NULL, NULL, NULL }, { "int8", sizeof(int8_t), INTEGER_OPERATOR, generic_copy, generic_clone, NULL, NULL, generic_compare, int8_read, int8_write }, { "uint8", sizeof(uint8_t), INTEGER_OPERATOR, generic_copy, generic_clone, NULL, NULL, generic_compare, uint8_read, uint8_write }, { "int16", sizeof(int16_t), INTEGER_OPERATOR, generic_copy, generic_clone, NULL, NULL, generic_compare, int16_read, int16_write }, { "uint16", sizeof(uint16_t), INTEGER_OPERATOR, generic_copy, generic_clone, NULL, NULL, generic_compare, uint16_read, uint16_write }, { "int32", sizeof(int32_t), INTEGER_OPERATOR, generic_copy, generic_clone, NULL, NULL, generic_compare, int32_read, int32_write }, { "uint32", sizeof(uint32_t), INTEGER_OPERATOR, generic_copy, generic_clone, NULL, NULL, generic_compare, uint32_read, uint32_write }, { "int64", sizeof(int64_t), INTEGER_OPERATOR, generic_copy, generic_clone, NULL, NULL, generic_compare, int64_read, int64_write }, { "uint64", sizeof(uint64_t), INTEGER_OPERATOR, generic_copy, generic_clone, NULL, NULL, generic_compare, uint64_read, uint64_write }, { "float", sizeof(float), INTEGER_OPERATOR, generic_copy, generic_clone, NULL, NULL, generic_compare, float_read, float_write }, { "double", sizeof(double), INTEGER_OPERATOR, generic_copy, generic_clone, NULL, NULL, generic_compare, double_read, double_write }, { "string", 0, STRING_OPERATOR, string_copy, string_clone, string_ref, string_destroy, string_compare, string_read, string_write }, { "time", 0, TIME_OPERATOR, time_copy, time_clone, time_ref, time_destroy, time_compare, time_read, time_write }, { "data", 0, DATA_OPERATOR, data_copy, data_clone, data_ref, data_destroy, data_compare, data_read, data_write }, { "enum", sizeof(idmef_value_type_enum_t), ENUM_OPERATOR, enum_copy, generic_clone, NULL, NULL, enum_compare, enum_read, enum_write, }, { "list", 0, 0, NULL, NULL, NULL, NULL, NULL, NULL, NULL }, { "class", 0, CLASS_OPERATOR, class_copy, class_clone, class_ref, class_destroy, class_compare, NULL, NULL }, }; static int is_type_valid(idmef_value_type_id_t type) { if ( type < 0 || (size_t) type >= (sizeof(ops_tbl) / sizeof(*ops_tbl)) ) return prelude_error_verbose(PRELUDE_ERROR_IDMEF_VALUE_TYPE_UNKNOWN, "Unknown IDMEF type id: '%d'", type); return 0; } const char *idmef_value_type_to_string(idmef_value_type_id_t type) { int ret; ret = is_type_valid(type); if ( ret < 0 ) return NULL; return ops_tbl[type].name; } int idmef_value_type_clone(const idmef_value_type_t *src, idmef_value_type_t *dst) { int ret; assert(dst->id == src->id); ret = is_type_valid(dst->id); if ( ret < 0 ) return ret; if ( ! ops_tbl[dst->id].clone ) return prelude_error_verbose(PRELUDE_ERROR_IDMEF_VALUE_TYPE_CLONE_UNAVAILABLE, "Object type '%s' does not support clone operation", idmef_value_type_to_string(dst->id)); return ops_tbl[dst->id].clone(src, dst, ops_tbl[dst->id].len); } int idmef_value_type_copy(const idmef_value_type_t *src, void *dst) { int ret; ret = is_type_valid(src->id); if ( ret < 0 ) return ret; if ( ! ops_tbl[src->id].copy ) return prelude_error_verbose(PRELUDE_ERROR_IDMEF_VALUE_TYPE_COPY_UNAVAILABLE, "Object type '%s' does not support copy operation", idmef_value_type_to_string(src->id)); return ops_tbl[src->id].copy(src, dst, ops_tbl[src->id].len); } int idmef_value_type_ref(const idmef_value_type_t *vt) { int ret; ret = is_type_valid(vt->id); if ( ret < 0 ) return ret; if ( ! ops_tbl[vt->id].ref ) return prelude_error_verbose(PRELUDE_ERROR_IDMEF_VALUE_TYPE_REF_UNAVAILABLE, "Object type '%s' does not support ref operation", idmef_value_type_to_string(vt->id)); return ops_tbl[vt->id].ref(vt); } int idmef_value_type_compare(const idmef_value_type_t *type1, const idmef_value_type_t *type2, idmef_criterion_operator_t op) { int ret; ret = is_type_valid(type1->id); if ( ret < 0 ) return ret; if ( type1->id != type2->id ) { if ( type1->id != IDMEF_VALUE_TYPE_ENUM && type2->id != IDMEF_VALUE_TYPE_STRING ) return prelude_error(PRELUDE_ERROR_IDMEF_VALUE_TYPE_COMPARE_MISMATCH); } assert(op & ops_tbl[type1->id].operator); if ( ! ops_tbl[type1->id].compare ) return prelude_error_verbose(PRELUDE_ERROR_IDMEF_VALUE_TYPE_COMPARE_UNAVAILABLE, "Object type '%s' does not support compare operation", idmef_value_type_to_string(type1->id)); ret = ops_tbl[type1->id].compare(type1, type2, ops_tbl[type1->id].len, op & ~IDMEF_CRITERION_OPERATOR_NOT); if ( ret < 0 ) /* not an error -> no match */ ret = 1; if ( op & IDMEF_CRITERION_OPERATOR_NOT ) return (ret == 0) ? 1 : 0; else return ret; } int idmef_value_type_read(idmef_value_type_t *dst, const char *buf) { int ret; ret = is_type_valid(dst->id); if ( ret < 0 ) return ret; if ( ! ops_tbl[dst->id].read ) return prelude_error_verbose(PRELUDE_ERROR_IDMEF_VALUE_TYPE_READ_UNAVAILABLE, "Object type '%s' does not support read operation", idmef_value_type_to_string(dst->id)); ret = ops_tbl[dst->id].read(dst, buf); return (ret < 0) ? ret : 0; } int idmef_value_type_write(const idmef_value_type_t *src, prelude_string_t *out) { int ret; ret = is_type_valid(src->id); if ( ret < 0 ) return ret; if ( ! ops_tbl[src->id].write ) return prelude_error_verbose(PRELUDE_ERROR_IDMEF_VALUE_TYPE_WRITE_UNAVAILABLE, "Object type '%s' does not support write operation", idmef_value_type_to_string(src->id)); return ops_tbl[src->id].write(src, out); } void idmef_value_type_destroy(idmef_value_type_t *type) { int ret; ret = is_type_valid(type->id); if ( ret < 0 ) return; if ( ! ops_tbl[type->id].destroy ) return; ops_tbl[type->id].destroy(type); } int idmef_value_type_check_operator(idmef_value_type_id_t type, idmef_criterion_operator_t op) { int ret; ret = is_type_valid(type); if ( ret < 0 ) return ret; if ( (~ops_tbl[type].operator & op) == 0 ) return 0; return prelude_error_verbose(PRELUDE_ERROR_IDMEF_CRITERION_UNSUPPORTED_OPERATOR, "Object type '%s' does not support operator '%s'", idmef_value_type_to_string(type), idmef_criterion_operator_to_string(op)); } int idmef_value_type_get_applicable_operators(idmef_value_type_id_t type, idmef_criterion_operator_t *result) { int ret; ret = is_type_valid(type); if ( ret < 0 ) return ret; *result = ops_tbl[type].operator; return 0; } libprelude-1.0.0/src/prelude-thread.c0000664000076400007640000000447111202225027014431 00000000000000/***** * * Copyright (C) 2005 PreludeIDS Technologies. All Rights Reserved. * Author: Yoann Vandoorselaere * * This file is part of the Prelude library. * * 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; see the file COPYING. If not, write to * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. * *****/ #include "config.h" #include #include #include #include #include "glthread/tls.h" #include "glthread/lock.h" #include "prelude.h" #include "prelude-inttypes.h" #include "prelude-thread.h" #include "prelude-log.h" gl_once_define(static, init_once); static gl_tls_key_t thread_error_key; static void thread_error_key_destroy(void *value) { free(value); } static void thread_init(void) { gl_tls_key_init(thread_error_key, thread_error_key_destroy); } /* * */ int prelude_thread_init(void *nil) { int ret; ret = glthread_once(&init_once, thread_init); if ( ret < 0 ) return prelude_error_from_errno(ret); return 0; } /* * */ void _prelude_thread_deinit(void) { char *previous; previous = gl_tls_get(thread_error_key); if ( previous ) free(previous); gl_tls_key_destroy(thread_error_key); } int _prelude_thread_set_error(const char *error) { char *previous; /* * Make sure prelude_thread_init() has been called before using * thread local storage. */ prelude_thread_init(NULL); previous = gl_tls_get(thread_error_key); if ( previous ) free(previous); gl_tls_set(thread_error_key, strdup(error)); return 0; } const char *_prelude_thread_get_error(void) { return gl_tls_get(thread_error_key); } libprelude-1.0.0/src/prelude-connection.c0000664000076400007640000007313511325615276015343 00000000000000/***** * * Copyright (C) 2001-2005,2006,2007 PreludeIDS Technologies. All Rights Reserved. * Author: Yoann Vandoorselaere * * This file is part of the Prelude library. * * 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; see the file COPYING. If not, write to * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. * *****/ #include "config.h" #include "libmissing.h" #include #include #include #include #include #include #include #include #include #include #include #include #include #include #ifdef HAVE_SYS_UN_H # include #endif #ifdef HAVE_SYS_IOCTL_H # include #endif #ifdef HAVE_NETINET_TCP_H # include /* TCP keepalive stuff */ #endif #define PRELUDE_ERROR_SOURCE_DEFAULT PRELUDE_ERROR_SOURCE_CONNECTION #include "prelude-error.h" #include "common.h" #include "prelude-inttypes.h" #include "prelude-client.h" #include "prelude-log.h" #include "prelude-io.h" #include "prelude-msg.h" #include "prelude-message-id.h" #include "prelude-client.h" #include "prelude-option.h" #include "prelude-list.h" #include "prelude-linked-object.h" #include "tls-auth.h" #define PRELUDE_CONNECTION_OWN_FD 0x02 /* * Default port to connect to. */ #define DEFAULT_PORT 4690 /* * Path to the default Unix socket. */ #define UNIX_SOCKET "/tmp/.prelude-unix" /* * FIXME: we need a high level configuration object allowing * to fetch per-client settings easily. */ int _prelude_connection_keepalive_time = 0; int _prelude_connection_keepalive_probes = 0; int _prelude_connection_keepalive_intvl = 0; struct prelude_connection { PRELUDE_LINKED_OBJECT; int refcount; char *saddr; unsigned int sport; char *daddr; unsigned int dport; socklen_t salen; struct sockaddr *sa; prelude_io_t *fd; uint64_t peer_analyzerid; prelude_connection_permission_t permission; void *data; prelude_msg_t *msg; prelude_connection_state_t state; }; static int connection_write_msgbuf(prelude_msgbuf_t *msgbuf, prelude_msg_t *msg) { return prelude_connection_send(prelude_msgbuf_get_data(msgbuf), msg); } static int auth_error(prelude_connection_t *cnx, prelude_connection_permission_t reqperms, prelude_client_profile_t *cp, prelude_error_t error, const char *fmt, ...) { int ret; va_list ap; char *tmp, buf[1024]; prelude_string_t *out; prelude_string_new(&out); prelude_connection_permission_to_string(reqperms, out); tmp = strrchr(cnx->daddr, ':'); if ( tmp ) *tmp = '\0'; va_start(ap, fmt); vsnprintf(buf, sizeof(buf), fmt, ap); va_end(ap); ret = prelude_error_verbose_make(prelude_error_get_source(error), prelude_error_get_code(error), "%s.\n\n" "In order to register this sensor, please run:\n" "prelude-admin register %s \"%s\" %s --uid %d --gid %d", buf, prelude_client_profile_get_name(cp), prelude_string_get_string(out), (cnx->sa->sa_family == AF_UNIX) ? "" : cnx->daddr, (int) prelude_client_profile_get_uid(cp), (int) prelude_client_profile_get_gid(cp)); prelude_string_destroy(out); if ( tmp ) *tmp = ':'; return ret; } /* * Check if the tcp connection has been closed by peer * i.e if peer has sent a FIN tcp segment. * * It is important to call this function before writing on * a tcp socket, otherwise the write will succeed despite * the remote socket has been closed and next write will lead * to a broken pipe */ static int is_tcp_connection_still_established(prelude_io_t *pio) { int pending, ret; struct pollfd pfd; pfd.events = POLLIN; pfd.fd = prelude_io_get_fd(pio); ret = poll(&pfd, 1, 0); if ( ret < 0 ) return prelude_error_from_errno(errno); if ( ret == 0 ) return 0; if ( pfd.revents & POLLERR || pfd.revents & POLLHUP ) return prelude_error_from_errno(EPIPE); if ( ! (pfd.revents & POLLIN) ) return 0; /* * Get the number of bytes to read */ pending = prelude_io_pending(pio); if ( pending <= 0 ) return prelude_error_from_errno(EPIPE); return 0; } static void set_single_socket_option(int sock, const char *name, int level, int option, int value) { int ret; if ( ! value ) return; if ( option < 0 ) { prelude_log(PRELUDE_LOG_ERR, "'%s' socket option is unavailable on this system.\n", name); return; } ret = setsockopt(sock, level, option, (void *) &value, sizeof(value)); if ( ret < 0 ) prelude_log(PRELUDE_LOG_ERR, "could not set '%s' socket option: %s.\n", name, strerror(errno)); } static void set_inet_socket_option(int sock, struct sockaddr *sa) { # ifdef TCP_KEEPIDLE set_single_socket_option(sock, "tcp-keepalive-time", IPPROTO_TCP, TCP_KEEPIDLE, _prelude_connection_keepalive_time); # else set_single_socket_option(sock, "tcp-keepalive-time", IPPROTO_TCP, -1, _prelude_connection_keepalive_time); # endif # ifdef TCP_KEEPINTVL set_single_socket_option(sock, "tcp-keepalive-intvl", IPPROTO_TCP, TCP_KEEPINTVL, _prelude_connection_keepalive_intvl); # else set_single_socket_option(sock, "tcp-keepalive-intvl", IPPROTO_TCP, -1, _prelude_connection_keepalive_intvl); # endif # ifdef TCP_KEEPCNT set_single_socket_option(sock, "tcp-keepalive-probes", IPPROTO_TCP, TCP_KEEPCNT, _prelude_connection_keepalive_probes); # else set_single_socket_option(sock, "tcp-keepalive-probes", IPPROTO_TCP, -1, _prelude_connection_keepalive_probes); # endif } /* * Connect to the specified address in a generic manner * (can be Unix or Inet ). */ static int generic_connect(struct sockaddr *sa, socklen_t salen) { int ret, sock; sock = socket(sa->sa_family, SOCK_STREAM, 0); if ( sock < 0 ) return prelude_error_from_errno(errno); #if !((defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__) fcntl(sock, F_SETFD, fcntl(sock, F_GETFD) | FD_CLOEXEC); ret = fcntl(sock, F_SETOWN, getpid()); if ( ret < 0 ) { close(sock); return prelude_error_from_errno(errno); } #endif set_single_socket_option(sock, "SO_KEEPALIVE", SOL_SOCKET, SO_KEEPALIVE, 1); if ( sa->sa_family != AF_UNIX ) set_inet_socket_option(sock, sa); ret = connect(sock, sa, salen); if ( ret < 0 ) { close(sock); return prelude_error_from_errno(errno); } return sock; } static int handle_authentication(prelude_connection_t *cnx, prelude_connection_permission_t reqperms, prelude_client_profile_t *cp, int crypt) { int ret; prelude_string_t *gbuf, *wbuf; ret = tls_auth_connection(cp, cnx->fd, crypt, &cnx->peer_analyzerid, &cnx->permission); if ( ret < 0 ) return auth_error(cnx, reqperms, cp, ret, "%s", prelude_strerror(ret)); if ( (cnx->permission & reqperms) != reqperms ) { ret = prelude_string_new(&gbuf); if ( ret < 0 ) goto err; ret = prelude_string_new(&wbuf); if ( ret < 0 ) { prelude_string_destroy(gbuf); goto err; } prelude_connection_permission_to_string(cnx->permission, gbuf); prelude_connection_permission_to_string(reqperms, wbuf); ret = auth_error(cnx, reqperms, cp, prelude_error(PRELUDE_ERROR_PROFILE), "Insufficient credentials: got '%s' but at least '%s' required", prelude_string_get_string(gbuf), prelude_string_get_string(wbuf)); prelude_string_destroy(gbuf); prelude_string_destroy(wbuf); err: return ret; } prelude_log(PRELUDE_LOG_INFO, "TLS authentication succeed with Prelude Manager.\n"); return 0; } static int start_inet_connection(prelude_connection_t *cnx, prelude_connection_permission_t reqperms, prelude_client_profile_t *profile) { socklen_t len; int sock, ret, tmp; union { struct sockaddr sa; #ifdef HAVE_IPV6 struct sockaddr_in6 addr; # define ADDR_PORT(x) (x).sin6_port #else struct sockaddr_in addr; # define ADDR_PORT(x) (x).sin_port #endif } addr; sock = generic_connect(cnx->sa, cnx->salen); if ( sock < 0 ) return sock; prelude_io_set_sys_io(cnx->fd, sock); ret = handle_authentication(cnx, reqperms, profile, 1); if ( ret < 0 ) { do { tmp = prelude_io_close(cnx->fd); } while ( tmp < 0 && ! prelude_io_is_error_fatal(cnx->fd, tmp) ); return ret; } /* * Get information about the connection, * because the sensor might want to know source addr/port used. */ len = sizeof(addr.addr); ret = getsockname(sock, &addr.sa, &len); if ( ret < 0 ) ret = prelude_error_verbose(PRELUDE_ERROR_SYSTEM_ERROR, "getsockname failed: %s", strerror(errno)); else { char buf[512]; if ( inet_ntop(addr.sa.sa_family, prelude_sockaddr_get_inaddr(&addr.sa), buf, sizeof(buf)) ) cnx->saddr = strdup(buf); else cnx->saddr = NULL; cnx->sport = ntohs(ADDR_PORT(addr.addr)); } return ret; } #if !((defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__) static int start_unix_connection(prelude_connection_t *cnx, prelude_connection_permission_t reqperms, prelude_client_profile_t *profile) { int ret, sock, tmp; sock = generic_connect(cnx->sa, cnx->salen); if ( sock < 0 ) return sock; prelude_io_set_sys_io(cnx->fd, sock); ret = handle_authentication(cnx, reqperms, profile, 0); if ( ret < 0 ) do { tmp = prelude_io_close(cnx->fd); } while ( tmp < 0 && ! prelude_io_is_error_fatal(cnx->fd, tmp) ); return ret; } #endif static int do_connect(prelude_connection_t *cnx, prelude_connection_permission_t reqperms, prelude_client_profile_t *profile) { int ret = 0; if ( cnx->sa->sa_family != AF_UNIX ) { prelude_log(PRELUDE_LOG_INFO, "Connecting to %s prelude Manager server.\n", cnx->daddr); ret = start_inet_connection(cnx, reqperms, profile); } #if !((defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__) else { prelude_log(PRELUDE_LOG_INFO, "Connecting to %s (UNIX) prelude Manager server.\n", ((struct sockaddr_un *) cnx->sa)->sun_path); ret = start_unix_connection(cnx, reqperms, profile); } #endif return ret; } static int close_connection_fd(prelude_connection_t *cnx) { int ret; if ( ! (cnx->state & PRELUDE_CONNECTION_STATE_ESTABLISHED) ) return -1; ret = prelude_io_close(cnx->fd); if ( ret >= 0 || prelude_io_is_error_fatal(cnx->fd, ret) ) { if ( cnx->saddr ) { free(cnx->saddr); cnx->saddr = NULL; } cnx->state &= ~PRELUDE_CONNECTION_STATE_ESTABLISHED; } return ret; } static int close_connection_fd_block(prelude_connection_t *cnx) { int ret; if ( ! (cnx->state & PRELUDE_CONNECTION_STATE_ESTABLISHED) ) return -1; do { ret = close_connection_fd(cnx); } while ( ret < 0 && ! prelude_io_is_error_fatal(cnx->fd, ret) ); return ret; } static void destroy_connection_fd(prelude_connection_t *cnx) { close_connection_fd_block(cnx); if ( cnx->state & PRELUDE_CONNECTION_OWN_FD ) prelude_io_destroy(cnx->fd); } static prelude_bool_t is_unix_addr(prelude_connection_t *cnx, const char *addr) { int ret; const char *ptr; ret = strncmp(addr, "unix", 4); if ( ret != 0 ) return FALSE; ptr = strchr(addr, ':'); if ( ptr && *(ptr + 1) ) cnx->daddr = strdup(ptr + 1); else cnx->daddr = strdup(UNIX_SOCKET); return TRUE; } static int do_getaddrinfo(prelude_connection_t *cnx, struct addrinfo **ai, const char *addr_string) { int ret; struct addrinfo hints; char buf[1024], *addr; unsigned int port = DEFAULT_PORT; ret = prelude_parse_address(addr_string, &addr, &port); if ( ret < 0 ) return ret; memset(&hints, 0, sizeof(hints)); snprintf(buf, sizeof(buf), "%u", port); #ifdef AI_ADDRCONFIG hints.ai_flags = AI_ADDRCONFIG; #endif hints.ai_family = PF_UNSPEC; hints.ai_socktype = SOCK_STREAM; hints.ai_protocol = IPPROTO_TCP; ret = getaddrinfo(addr, buf, &hints, ai); if ( ret != 0 ) { ret = prelude_error_verbose(PRELUDE_ERROR_CANT_RESOLVE, "could not resolve '%s': %s", addr, (ret == EAI_SYSTEM) ? strerror(errno) : gai_strerror(ret)); free(addr); return ret; } snprintf(buf, sizeof(buf), "%s:%d", addr, port); free(addr); cnx->daddr = strdup(buf); return 0; } static int resolve_addr(prelude_connection_t *cnx, const char *addr) { struct addrinfo *ai = NULL; int ret, ai_family, ai_addrlen; #if !((defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__) struct sockaddr_un *un; #endif if ( is_unix_addr(cnx, addr) ) { #if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__ return prelude_error_verbose(PRELUDE_ERROR_GENERIC, "UNIX socket are not supported under this environment"); #else ai_family = AF_UNIX; ai_addrlen = sizeof(*un); #endif } else { ret = do_getaddrinfo(cnx, &ai, addr); if ( ret < 0 ) return ret; ai_family = ai->ai_family; ai_addrlen = ai->ai_addrlen; } cnx->sa = malloc(ai_addrlen); if ( ! cnx->sa ) { if ( ai ) freeaddrinfo(ai); return prelude_error_from_errno(errno); } cnx->salen = ai_addrlen; cnx->sa->sa_family = ai_family; if ( ai_family != AF_UNIX ) { memcpy(cnx->sa, ai->ai_addr, ai->ai_addrlen); freeaddrinfo(ai); } #if !((defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__) else { un = (struct sockaddr_un *) cnx->sa; strncpy(un->sun_path, cnx->daddr, sizeof(un->sun_path)); } #endif return 0; } /** * prelude_connection_destroy: * @conn: Pointer to a #prelude_connection_t object. * * Destroy the connection referenced by @conn. * * In case the connection is still alive, it is closed in a blocking * manner. Use prelude_connection_close() if you want to close the * connection in a non blocking manner prior prelude_connection_destroy(). */ void prelude_connection_destroy(prelude_connection_t *conn) { prelude_return_if_fail(conn); if ( --conn->refcount > 0 ) return; destroy_connection_fd(conn); free(conn->daddr); free(conn->sa); free(conn); } int prelude_connection_new(prelude_connection_t **out, const char *addr) { int ret; prelude_connection_t *new; prelude_return_val_if_fail(addr, prelude_error(PRELUDE_ERROR_ASSERTION)); #if !((defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__) signal(SIGPIPE, SIG_IGN); #endif new = calloc(1, sizeof(*new)); if ( ! new ) return prelude_error_from_errno(errno); new->refcount = 1; ret = prelude_io_new(&new->fd); if ( ret < 0 ) { free(new); return ret; } if ( addr ) { ret = resolve_addr(new, addr); if ( ret < 0 ) { prelude_io_destroy(new->fd); free(new); return ret; } } new->state = PRELUDE_CONNECTION_OWN_FD; *out = new; return 0; } void prelude_connection_set_fd_ref(prelude_connection_t *cnx, prelude_io_t *fd) { prelude_return_if_fail(cnx); prelude_return_if_fail(fd); destroy_connection_fd(cnx); cnx->fd = fd; cnx->state &= ~PRELUDE_CONNECTION_OWN_FD; } void prelude_connection_set_fd_nodup(prelude_connection_t *cnx, prelude_io_t *fd) { prelude_return_if_fail(cnx); prelude_return_if_fail(fd); destroy_connection_fd(cnx); cnx->fd = fd; cnx->state |= PRELUDE_CONNECTION_OWN_FD; } int prelude_connection_connect(prelude_connection_t *conn, prelude_client_profile_t *profile, prelude_connection_permission_t permission) { int ret; prelude_msg_t *msg; prelude_return_val_if_fail(conn, prelude_error(PRELUDE_ERROR_ASSERTION)); prelude_return_val_if_fail(profile, prelude_error(PRELUDE_ERROR_ASSERTION)); close_connection_fd_block(conn); ret = do_connect(conn, permission, profile); if ( ret < 0 ) return ret; ret = prelude_msg_new(&msg, 1, sizeof(uint8_t), PRELUDE_MSG_CONNECTION_CAPABILITY, 0); if ( ret < 0 ) goto err; prelude_msg_set(msg, permission, 0, NULL); ret = prelude_msg_write(msg, conn->fd); prelude_msg_destroy(msg); if ( ret < 0 ) goto err; conn->state |= PRELUDE_CONNECTION_STATE_ESTABLISHED; return ret; err: close_connection_fd_block(conn); return ret; } int prelude_connection_close(prelude_connection_t *cnx) { prelude_return_val_if_fail(cnx, prelude_error(PRELUDE_ERROR_ASSERTION)); return close_connection_fd(cnx); } int prelude_connection_send(prelude_connection_t *cnx, prelude_msg_t *msg) { ssize_t ret; prelude_return_val_if_fail(cnx, prelude_error(PRELUDE_ERROR_ASSERTION)); prelude_return_val_if_fail(msg, prelude_error(PRELUDE_ERROR_ASSERTION)); if ( ! (cnx->state & PRELUDE_CONNECTION_STATE_ESTABLISHED) ) return -1; ret = prelude_msg_write(msg, cnx->fd); if ( ret < 0 ) return ret; ret = is_tcp_connection_still_established(cnx->fd); if ( ret < 0 ) return ret; return ret; } int prelude_connection_recv(prelude_connection_t *cnx, prelude_msg_t **msg) { int ret; uint8_t tag; prelude_return_val_if_fail(cnx, prelude_error(PRELUDE_ERROR_ASSERTION)); if ( ! (cnx->state & PRELUDE_CONNECTION_STATE_ESTABLISHED) ) return -1; ret = prelude_msg_read(msg, cnx->fd); if ( ret < 0 ) return ret; tag = prelude_msg_get_tag(*msg); if ( tag == PRELUDE_MSG_IDMEF && !(cnx->permission & PRELUDE_CONNECTION_PERMISSION_IDMEF_READ) ) return prelude_error_verbose(PRELUDE_ERROR_PROFILE, "Insufficient credentials for receiving IDMEF message"); if ( tag == PRELUDE_MSG_OPTION_REQUEST && !(cnx->permission & PRELUDE_CONNECTION_PERMISSION_ADMIN_READ) ) return prelude_error_verbose(PRELUDE_ERROR_PROFILE, "Insufficient credentials for receiving administrative message"); return ret; } int prelude_connection_recv_idmef(prelude_connection_t *con, idmef_message_t **idmef) { int ret; ret = prelude_connection_recv(con, &con->msg); if ( ret < 0 ) { if ( prelude_error_get_code(ret) != PRELUDE_ERROR_EAGAIN ) con->msg = NULL; return ret; } if ( prelude_msg_get_tag(con->msg) != PRELUDE_MSG_IDMEF ) { prelude_msg_destroy(con->msg); con->msg = NULL; return prelude_error_from_errno(EINVAL); } ret = idmef_message_new(idmef); if ( ret < 0 ) { prelude_msg_destroy(con->msg); con->msg = NULL; return ret; } ret = idmef_message_read(*idmef, con->msg); if ( ret < 0 ) { idmef_message_destroy(*idmef); prelude_msg_destroy(con->msg); con->msg = NULL; return ret; } idmef_message_set_pmsg(*idmef, con->msg); con->msg = NULL; return ret; } /** * prelude_connection_get_fd: * @cnx: Pointer to a #prelude_connection_t object. * * Returns: A pointer to the #prelude_io_t object used for * communicating with the peer. */ prelude_io_t *prelude_connection_get_fd(prelude_connection_t *cnx) { prelude_return_val_if_fail(cnx, NULL); return cnx->fd; } /** * prelude_connection_get_local_addr: * @cnx: Pointer to a #prelude_connection_t object. * * Returns: the local address used to connect. */ const char *prelude_connection_get_local_addr(prelude_connection_t *cnx) { prelude_return_val_if_fail(cnx, NULL); return cnx->saddr; } /** * prelude_connection_get_local_port: * @cnx: Pointer to a #prelude_connection_t object. * * Returns: the local port used to connect. */ unsigned int prelude_connection_get_local_port(prelude_connection_t *cnx) { prelude_return_val_if_fail(cnx, 0); return cnx->sport; } /** * prelude_connection_is_alive: * @cnx: Pointer to a #prelude_connection_t object. * * Returns: 0 if the connection associated with @cnx is alive, -1 otherwise. */ prelude_bool_t prelude_connection_is_alive(prelude_connection_t *cnx) { prelude_return_val_if_fail(cnx, FALSE); return (cnx->state & PRELUDE_CONNECTION_STATE_ESTABLISHED) ? TRUE : FALSE; } void prelude_connection_set_state(prelude_connection_t *cnx, prelude_connection_state_t state) { prelude_return_if_fail(cnx); cnx->state = state; } prelude_connection_state_t prelude_connection_get_state(prelude_connection_t *cnx) { prelude_return_val_if_fail(cnx, prelude_error(PRELUDE_ERROR_ASSERTION)); return cnx->state; } ssize_t prelude_connection_forward(prelude_connection_t *cnx, prelude_io_t *src, size_t count) { ssize_t ret; prelude_return_val_if_fail(cnx, prelude_error(PRELUDE_ERROR_ASSERTION)); prelude_return_val_if_fail(src, prelude_error(PRELUDE_ERROR_ASSERTION)); if ( ! (cnx->state & PRELUDE_CONNECTION_STATE_ESTABLISHED) ) return -1; ret = prelude_io_forward(cnx->fd, src, count); if ( ret < 0 ) return ret; ret = is_tcp_connection_still_established(cnx->fd); if ( ret < 0 ) return ret; return 0; } const char *prelude_connection_get_default_socket_filename(void) { return UNIX_SOCKET; } unsigned int prelude_connection_get_peer_port(prelude_connection_t *cnx) { prelude_return_val_if_fail(cnx, 0); return cnx->dport; } const char *prelude_connection_get_peer_addr(prelude_connection_t *cnx) { prelude_return_val_if_fail(cnx, NULL); return cnx->daddr; } uint64_t prelude_connection_get_peer_analyzerid(prelude_connection_t *cnx) { prelude_return_val_if_fail(cnx, 0); return cnx->peer_analyzerid; } void prelude_connection_set_peer_analyzerid(prelude_connection_t *cnx, uint64_t analyzerid) { prelude_return_if_fail(cnx); cnx->peer_analyzerid = analyzerid; } int prelude_connection_new_msgbuf(prelude_connection_t *connection, prelude_msgbuf_t **msgbuf) { int ret; prelude_return_val_if_fail(connection, prelude_error(PRELUDE_ERROR_ASSERTION)); ret = prelude_msgbuf_new(msgbuf); if ( ret < 0 ) return ret; prelude_msgbuf_set_data(*msgbuf, connection); prelude_msgbuf_set_callback(*msgbuf, connection_write_msgbuf); return 0; } void prelude_connection_set_data(prelude_connection_t *conn, void *data) { prelude_return_if_fail(conn); conn->data = data; } void *prelude_connection_get_data(prelude_connection_t *conn) { prelude_return_val_if_fail(conn, NULL); return conn->data; } int prelude_connection_permission_new_from_string(prelude_connection_permission_t *out, const char *permission) { int i, c; const char *tptr; char buf[1024], *tmp; const struct { const char *name; prelude_connection_permission_t val_read; prelude_connection_permission_t val_write; } tbl[] = { { "idmef", PRELUDE_CONNECTION_PERMISSION_IDMEF_READ, PRELUDE_CONNECTION_PERMISSION_IDMEF_WRITE }, { "admin", PRELUDE_CONNECTION_PERMISSION_ADMIN_READ, PRELUDE_CONNECTION_PERMISSION_ADMIN_WRITE }, { NULL, 0, 0 }, }; prelude_return_val_if_fail(out, prelude_error(PRELUDE_ERROR_ASSERTION)); prelude_return_val_if_fail(permission, prelude_error(PRELUDE_ERROR_ASSERTION)); *out = 0; strncpy(buf, permission, sizeof(buf)); tmp = buf; while ( (tptr = strsep(&tmp, ":")) ) { if ( ! tmp ) continue; while ( *tptr == ' ' ) tptr++; if ( ! *tptr ) continue; for ( i = 0; tbl[i].name; i++ ) { if ( strcmp(tbl[i].name, tptr) != 0 ) continue; break; } if ( ! tbl[i].name ) return prelude_error_verbose(PRELUDE_ERROR_UNKNOWN_PERMISSION_TYPE, "unknown permission type '%s'", tptr); while ( *tmp == ' ' ) tmp++; while ( (c = *tmp++) ) { if ( c == 'r' ) *out |= tbl[i].val_read; else if ( c == 'w' ) *out |= tbl[i].val_write; else if ( c == ' ' ) break; else return prelude_error_verbose(PRELUDE_ERROR_UNKNOWN_PERMISSION_BIT, "unknown permission bit: '%c'", c); } } return 0; } int prelude_connection_permission_to_string(prelude_connection_permission_t permission, prelude_string_t *out) { size_t i; int ret = 0; const struct { const char *name; prelude_connection_permission_t val_read; prelude_connection_permission_t val_write; } tbl[] = { { "idmef", PRELUDE_CONNECTION_PERMISSION_IDMEF_READ, PRELUDE_CONNECTION_PERMISSION_IDMEF_WRITE }, { "admin", PRELUDE_CONNECTION_PERMISSION_ADMIN_READ, PRELUDE_CONNECTION_PERMISSION_ADMIN_WRITE }, }; prelude_return_val_if_fail(out, prelude_error(PRELUDE_ERROR_ASSERTION)); for ( i = 0; i < (sizeof(tbl) / sizeof(*tbl)); i++ ) { if ( ! (permission & (tbl[i].val_read|tbl[i].val_write)) ) continue; ret = prelude_string_sprintf(out, "%s%s:", (! prelude_string_is_empty(out)) ? " " : "", tbl[i].name); if ( ret < 0 ) return ret; if ( (permission & tbl[i].val_read) == tbl[i].val_read ) prelude_string_cat(out, "r"); if ( (permission & tbl[i].val_write) == tbl[i].val_write ) prelude_string_cat(out, "w"); } return 0; } prelude_connection_permission_t prelude_connection_get_permission(prelude_connection_t *conn) { prelude_return_val_if_fail(conn, 0); return conn->permission; } /** * prelude_connection_ref: * @conn: Pointer to a #prelude_connection_t object to reference. * * Increases @conn reference count. * * prelude_connection_destroy() will decrease the refcount until it * reaches 0, at which point @conn will be destroyed. * * Returns: @conn. */ prelude_connection_t *prelude_connection_ref(prelude_connection_t *conn) { prelude_return_val_if_fail(conn, NULL); conn->refcount++; return conn; } libprelude-1.0.0/src/prelude-async.c0000664000076400007640000002201611202225026014271 00000000000000/***** * * Copyright (C) 2001-2005,2006,2007 PreludeIDS Technologies. All Rights Reserved. * Author: Yoann Vandoorselaere * * This file is part of the Prelude library. * * 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; see the file COPYING. If not, write to * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. * *****/ #include "config.h" #include "libmissing.h" #include #include #include #include #include #include #include #if TIME_WITH_SYS_TIME # include # include #else # if HAVE_SYS_TIME_H # include # else # include # endif #endif #include "glthread/thread.h" #include "glthread/lock.h" #include "glthread/cond.h" #include "prelude-list.h" #include "prelude-inttypes.h" #include "prelude-linked-object.h" #include "prelude-timer.h" #include "prelude-log.h" #include "prelude-io.h" #include "prelude-async.h" static PRELUDE_LIST(joblist); static prelude_async_flags_t async_flags = 0; static prelude_bool_t stop_processing = FALSE; static gl_thread_t thread; static gl_cond_t cond = gl_cond_initializer; static gl_lock_t mutex = gl_lock_initializer; static volatile sig_atomic_t is_initialized = FALSE; static int timespec_elapsed(struct timespec *end, struct timespec *start) { int diff = end->tv_sec - start->tv_sec; if ( end->tv_nsec < start->tv_nsec ) diff -= 1; return diff; } static prelude_bool_t timespec_expired(struct timespec *end, struct timespec *start) { return ( timespec_elapsed(end, start) ) ? TRUE : FALSE; } static inline struct timespec *get_timespec(struct timespec *ts) { struct timeval now; gettimeofday(&now, NULL); ts->tv_sec = now.tv_sec; ts->tv_nsec = now.tv_usec * 1000; return ts; } static int wait_timer_and_data(prelude_async_flags_t *flags) { int ret; struct timespec ts; static struct timespec last_wakeup; prelude_bool_t no_job_available = TRUE; get_timespec(&last_wakeup); last_wakeup.tv_sec--; while ( no_job_available ) { ret = 0; gl_lock_lock(mutex); ts.tv_sec = last_wakeup.tv_sec + 1; ts.tv_nsec = last_wakeup.tv_nsec; while ( (no_job_available = prelude_list_is_empty(&joblist)) && ! stop_processing && async_flags == *flags && ret != ETIMEDOUT ) { ret = glthread_cond_timedwait(&cond, &mutex, &ts); } if ( no_job_available && stop_processing ) { gl_lock_unlock(mutex); return -1; } *flags = async_flags; gl_lock_unlock(mutex); if ( ret == ETIMEDOUT || timespec_expired(get_timespec(&ts), &last_wakeup) ) { prelude_timer_wake_up(); last_wakeup.tv_sec = ts.tv_sec; last_wakeup.tv_nsec = ts.tv_nsec; } } return 0; } static int wait_data(prelude_async_flags_t *flags) { gl_lock_lock(mutex); while ( prelude_list_is_empty(&joblist) && ! stop_processing && async_flags == *flags ) gl_cond_wait(cond, mutex); if ( prelude_list_is_empty(&joblist) && stop_processing ) { gl_lock_unlock(mutex); return -1; } *flags = async_flags; gl_lock_unlock(mutex); return 0; } static prelude_async_object_t *get_next_job(void) { prelude_list_t *tmp; prelude_async_object_t *obj = NULL; gl_lock_lock(mutex); prelude_list_for_each(&joblist, tmp) { obj = prelude_linked_object_get_object(tmp); prelude_linked_object_del((prelude_linked_object_t *) obj); break; } gl_lock_unlock(mutex); return obj; } static void *async_thread(void *arg) { int ret; sigset_t set; prelude_async_object_t *obj; prelude_async_flags_t nflags = async_flags; ret = sigfillset(&set); if ( ret < 0 ) { prelude_log(PRELUDE_LOG_ERR, "sigfillset error: %s.\n", strerror(errno)); return NULL; } ret = glthread_sigmask(SIG_BLOCK, &set, NULL); if ( ret < 0 ) { prelude_log(PRELUDE_LOG_ERR, "pthread_sigmask error: %s.\n", strerror(errno)); return NULL; } while ( 1 ) { if ( nflags & PRELUDE_ASYNC_FLAGS_TIMER ) ret = wait_timer_and_data(&nflags); else ret = wait_data(&nflags); if ( ret < 0 ) { /* * On some implementation (namely, recent Linux + glibc version), * calling pthread_exit() from a shared library and joining the thread from * an atexit callback result in a deadlock. * * Appear to be related to: * http://sources.redhat.com/bugzilla/show_bug.cgi?id=654 * * Simply returning from the thread seems to fix this problem. */ break; } while ( (obj = get_next_job()) ) obj->_async_func(obj, obj->_async_data); } return NULL; } static int do_init_async(void) { int ret; ret = glthread_create(&thread, async_thread, NULL); if ( ret != 0 ) { prelude_log(PRELUDE_LOG_ERR, "error creating asynchronous thread: %s.\n", strerror(ret)); return ret; } /* * There is a problem with OpenBSD, where using atexit() from a multithread * application result in a deadlock. No workaround has been found at the moment. * */ #if ! defined(__OpenBSD__) return atexit(prelude_async_exit); #else return 0; #endif } /** * prelude_async_set_flags: * @flags: flags you want to set * * Sets flags to the asynchronous subsystem. * */ void prelude_async_set_flags(prelude_async_flags_t flags) { gl_lock_lock(mutex); async_flags = flags; gl_cond_signal(cond); gl_lock_unlock(mutex); } /** * prelude_async_get_flags: * * Retrieves flags from the asynchronous subsystem * * Returns: asynchronous flags */ prelude_async_flags_t prelude_async_get_flags(void) { return async_flags; } /** * prelude_async_init: * * Initialize the asynchronous subsystem. * * Returns: 0 on success, -1 if an error occured. */ int prelude_async_init(void) { if ( ! is_initialized ) { is_initialized = TRUE; stop_processing = FALSE; return do_init_async(); } return 0; } /** * prelude_async_add: * @obj: Pointer to a #prelude_async_t object. * * Adds @obj to the asynchronous processing list. */ void prelude_async_add(prelude_async_object_t *obj) { gl_lock_lock(mutex); prelude_linked_object_add_tail(&joblist, (prelude_linked_object_t *) obj); gl_cond_signal(cond); gl_lock_unlock(mutex); } /** * prelude_async_del: * @obj: Pointer to a #prelude_async_t object. * * Deletes @obj from the asynchronous processing list. */ void prelude_async_del(prelude_async_object_t *obj) { gl_lock_lock(mutex); prelude_linked_object_del((prelude_linked_object_t *) obj); gl_lock_unlock(mutex); } void prelude_async_exit(void) { prelude_bool_t has_job; if ( ! is_initialized ) return; gl_lock_lock(mutex); stop_processing = TRUE; gl_cond_signal(cond); has_job = ! prelude_list_is_empty(&joblist); gl_lock_unlock(mutex); if ( has_job ) prelude_log(PRELUDE_LOG_INFO, "Waiting for asynchronous operation to complete.\n"); gl_thread_join(thread, NULL); gl_cond_destroy(cond); gl_lock_destroy(mutex); is_initialized = FALSE; } void _prelude_async_fork_prepare(void) { gl_lock_lock(mutex); } void _prelude_async_fork_parent(void) { gl_lock_unlock(mutex); } void _prelude_async_fork_child(void) { is_initialized = FALSE; prelude_list_init(&joblist); gl_lock_init(mutex); gl_cond_init(cond); } libprelude-1.0.0/src/idmef-criteria-string.yac.y0000664000076400007640000002375311202225026016520 00000000000000/***** * * Copyright (C) 2003-2005,2006,2007 PreludeIDS Technologies. All Rights Reserved. * Author: Krzysztof Zaraska * Author: Nicolas Delon * * This file is part of the Prelude library. * * 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; see the file COPYING. If not, write to * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. * *****/ %{ #define PRELUDE_ERROR_SOURCE_DEFAULT PRELUDE_ERROR_SOURCE_IDMEF_CRITERIA #include #include #include #include #include #include #include "glthread/lock.h" #include "prelude-log.h" #include "prelude-error.h" #include "prelude-inttypes.h" #include "idmef.h" #include "idmef-criteria.h" #include "common.h" static int path_count = 0; static int real_ret = 0; static idmef_path_t *cur_path; static idmef_criteria_t *processed_criteria; static idmef_criterion_operator_t cur_operator; gl_lock_t _criteria_parse_mutex = gl_lock_initializer; #define operator_or 1 #define operator_and 2 extern int yylex(void); extern void yylex_init(void); extern void yylex_destroy(void); static void yyerror(char *s); extern void *yy_scan_string(const char *); extern void yy_delete_buffer(void *); void _idmef_criteria_string_init_lexer(void); #define YYERROR_VERBOSE static int create_criteria(idmef_criteria_t **criteria, idmef_path_t *path, idmef_criterion_value_t *value, idmef_criterion_operator_t operator) { idmef_criterion_t *criterion; real_ret = idmef_criteria_new(criteria); if ( real_ret < 0 ) goto err; if ( path_count++ > 0 ) idmef_path_ref(path); real_ret = idmef_criterion_new(&criterion, path, value, operator); if ( real_ret < 0 ) { idmef_criteria_destroy(*criteria); goto err; } idmef_criteria_set_criterion(*criteria, criterion); return 0; err: idmef_path_destroy(path); cur_path = NULL; return real_ret; } %} %union { char *str; int operator; idmef_path_t *path; idmef_criteria_t *criteria; idmef_criterion_operator_t relation; } /* BISON Declarations */ %token TOK_IDMEF_VALUE "" %token TOK_IDMEF_PATH "" %destructor { free($$); } TOK_IDMEF_VALUE TOK_IDMEF_PATH %destructor { idmef_criteria_destroy($$); } criteria %token TOK_RELATION_SUBSTRING "<>" %token TOK_RELATION_SUBSTRING_NOCASE "<>*" %token TOK_RELATION_NOT_SUBSTRING "!<>" %token TOK_RELATION_NOT_SUBSTRING_NOCASE "!<>*" %token TOK_RELATION_REGEXP "~" %token TOK_RELATION_REGEXP_NOCASE "~*" %token TOK_RELATION_NOT_REGEXP "!~" %token TOK_RELATION_NOT_REGEXP_NOCASE "!~*" %token TOK_RELATION_GREATER ">" %token TOK_RELATION_GREATER_OR_EQUAL ">=" %token TOK_RELATION_LESS "<" %token TOK_RELATION_LESS_OR_EQUAL "<=" %token TOK_RELATION_EQUAL "=" %token TOK_RELATION_EQUAL_NOCASE "=*" %token TOK_RELATION_NOT_EQUAL "!=" %token TOK_RELATION_NOT_EQUAL_NOCASE "!=*" %token TOK_NOT "!" %token TOK_OPERATOR_AND "&&" %token TOK_OPERATOR_OR "||" %token TOK_ERROR %type criteria %type criteria_base %type value %type multiple_value %type criterion %type path %type relation %type operator /* Grammar follows */ %% input: criteria { processed_criteria = $1; } ; criteria: criteria_base { $$ = $1; } | criteria operator criteria_base { if ( $2 == operator_or ) idmef_criteria_or_criteria($1, $3); else idmef_criteria_and_criteria($1, $3); $$ = $1; } ; criteria_base: criterion { $$ = $1; } | '(' criteria ')' { $$ = $2; } | TOK_NOT '(' criteria ')' { idmef_criteria_set_negation($3, TRUE); $$ = $3; } ; criterion: path relation '(' multiple_value ')' { $$ = $4; } | path relation value { $$ = $3; } | path { idmef_criteria_t *criteria; real_ret = create_criteria(&criteria, $1, NULL, IDMEF_CRITERION_OPERATOR_NOT|IDMEF_CRITERION_OPERATOR_NULL); if ( real_ret < 0 ) YYABORT; $$ = criteria; } | TOK_NOT path { idmef_criteria_t *criteria; real_ret = create_criteria(&criteria, $2, NULL, IDMEF_CRITERION_OPERATOR_NULL); if ( real_ret < 0 ) YYABORT; $$ = criteria; } ; path: TOK_IDMEF_PATH { real_ret = idmef_path_new_fast(&cur_path, $1); free($1); if ( real_ret < 0 ) YYABORT; path_count = 0; $$ = cur_path; } ; value: TOK_IDMEF_VALUE { idmef_criteria_t *criteria; idmef_criterion_value_t *value = NULL; real_ret = idmef_criterion_value_new_from_string(&value, cur_path, $1, cur_operator); free($1); if ( real_ret < 0 ) YYABORT; real_ret = create_criteria(&criteria, cur_path, value, cur_operator); if ( real_ret < 0 ) YYABORT; $$ = criteria; } ; multiple_value: multiple_value operator multiple_value { if ( $2 == operator_or ) idmef_criteria_or_criteria($1, $3); else idmef_criteria_and_criteria($1, $3); $$ = $1; } | '(' multiple_value ')' { $$ = $2; } | value { $$ = $1; } ; relation: TOK_RELATION_SUBSTRING { cur_operator = $$ = IDMEF_CRITERION_OPERATOR_SUBSTR; } | TOK_RELATION_SUBSTRING_NOCASE { cur_operator = $$ = IDMEF_CRITERION_OPERATOR_SUBSTR|IDMEF_CRITERION_OPERATOR_NOCASE; } | TOK_RELATION_NOT_SUBSTRING { cur_operator = $$ = IDMEF_CRITERION_OPERATOR_SUBSTR|IDMEF_CRITERION_OPERATOR_NOT; } | TOK_RELATION_NOT_SUBSTRING_NOCASE { cur_operator = $$ = IDMEF_CRITERION_OPERATOR_SUBSTR|IDMEF_CRITERION_OPERATOR_NOT|IDMEF_CRITERION_OPERATOR_NOCASE; } | TOK_RELATION_REGEXP { cur_operator = $$ = IDMEF_CRITERION_OPERATOR_REGEX; } | TOK_RELATION_REGEXP_NOCASE { cur_operator = $$ = IDMEF_CRITERION_OPERATOR_REGEX|IDMEF_CRITERION_OPERATOR_NOCASE; } | TOK_RELATION_NOT_REGEXP { cur_operator = $$ = IDMEF_CRITERION_OPERATOR_REGEX|IDMEF_CRITERION_OPERATOR_NOT; } | TOK_RELATION_NOT_REGEXP_NOCASE { cur_operator = $$ = IDMEF_CRITERION_OPERATOR_REGEX|IDMEF_CRITERION_OPERATOR_NOT|IDMEF_CRITERION_OPERATOR_NOCASE; } | TOK_RELATION_GREATER { cur_operator = $$ = IDMEF_CRITERION_OPERATOR_GREATER; } | TOK_RELATION_GREATER_OR_EQUAL { cur_operator = $$ = IDMEF_CRITERION_OPERATOR_GREATER|IDMEF_CRITERION_OPERATOR_EQUAL; } | TOK_RELATION_LESS { cur_operator = $$ = IDMEF_CRITERION_OPERATOR_LESSER; } | TOK_RELATION_LESS_OR_EQUAL { cur_operator = $$ = IDMEF_CRITERION_OPERATOR_LESSER|IDMEF_CRITERION_OPERATOR_EQUAL; } | TOK_RELATION_EQUAL { cur_operator = $$ = IDMEF_CRITERION_OPERATOR_EQUAL; } | TOK_RELATION_EQUAL_NOCASE { cur_operator = $$ = IDMEF_CRITERION_OPERATOR_EQUAL|IDMEF_CRITERION_OPERATOR_NOCASE; } | TOK_RELATION_NOT_EQUAL { cur_operator = $$ = IDMEF_CRITERION_OPERATOR_EQUAL|IDMEF_CRITERION_OPERATOR_NOT; } | TOK_RELATION_NOT_EQUAL_NOCASE { cur_operator = $$ = IDMEF_CRITERION_OPERATOR_EQUAL|IDMEF_CRITERION_OPERATOR_NOCASE|IDMEF_CRITERION_OPERATOR_NOT; } | TOK_NOT { cur_operator = $$ = IDMEF_CRITERION_OPERATOR_NULL; } | TOK_ERROR { real_ret = prelude_error_verbose(PRELUDE_ERROR_IDMEF_CRITERIA_PARSE, "Criteria parser reported: Invalid operator found"); YYERROR; } ; operator: TOK_OPERATOR_AND { $$ = operator_and; } | TOK_OPERATOR_OR { $$ = operator_or; } ; %% static void yyerror(char *s) /* Called by yyparse on error */ { real_ret = prelude_error_verbose_make(PRELUDE_ERROR_SOURCE_IDMEF_CRITERIA, PRELUDE_ERROR_IDMEF_CRITERIA_PARSE, "IDMEF-Criteria parser: %s", s); } int idmef_criteria_new_from_string(idmef_criteria_t **new_criteria, const char *str) { int ret; void *state; prelude_return_val_if_fail(str, -1); gl_lock_lock(_criteria_parse_mutex); real_ret = 0; processed_criteria = NULL; state = yy_scan_string(str); ret = yyparse(); yy_delete_buffer(state); if ( ret != 0 ) { _idmef_criteria_string_init_lexer(); if ( real_ret ) ret = real_ret; else ret = prelude_error_make(PRELUDE_ERROR_SOURCE_IDMEF_CRITERIA, PRELUDE_ERROR_IDMEF_CRITERIA_PARSE); if ( processed_criteria ) idmef_criteria_destroy(processed_criteria); } else *new_criteria = processed_criteria; gl_lock_unlock(_criteria_parse_mutex); return ret; } libprelude-1.0.0/src/idmef-criteria-string.yac.c0000664000076400007640000015531111202225026016466 00000000000000/* A Bison parser, made by GNU Bison 2.3. */ /* Skeleton implementation for Bison's Yacc-like parsers in C Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ /* As a special exception, you may create a larger work that contains part or all of the Bison parser skeleton and distribute that work under terms of your choice, so long as that work isn't itself a parser generator using the skeleton or a modified version thereof as a parser skeleton. Alternatively, if you modify or redistribute the parser skeleton itself, you may (at your option) remove this special exception, which will cause the skeleton and the resulting Bison output files to be licensed under the GNU General Public License without this special exception. This special exception was added by the Free Software Foundation in version 2.2 of Bison. */ /* C LALR(1) parser skeleton written by Richard Stallman, by simplifying the original so-called "semantic" parser. */ /* All symbols defined below should begin with yy or YY, to avoid infringing on user name space. This should be done even for local variables, as they might otherwise be expanded by user macros. There are some unavoidable exceptions within include files to define necessary library symbols; they are noted "INFRINGES ON USER NAME SPACE" below. */ /* Identify Bison output. */ #define YYBISON 1 /* Bison version. */ #define YYBISON_VERSION "2.3" /* Skeleton name. */ #define YYSKELETON_NAME "yacc.c" /* Pure parsers. */ #define YYPURE 0 /* Using locations. */ #define YYLSP_NEEDED 0 /* Tokens. */ #ifndef YYTOKENTYPE # define YYTOKENTYPE /* Put the tokens into the symbol table, so that GDB and other debuggers know about them. */ enum yytokentype { TOK_IDMEF_VALUE = 258, TOK_IDMEF_PATH = 259, TOK_RELATION_SUBSTRING = 260, TOK_RELATION_SUBSTRING_NOCASE = 261, TOK_RELATION_NOT_SUBSTRING = 262, TOK_RELATION_NOT_SUBSTRING_NOCASE = 263, TOK_RELATION_REGEXP = 264, TOK_RELATION_REGEXP_NOCASE = 265, TOK_RELATION_NOT_REGEXP = 266, TOK_RELATION_NOT_REGEXP_NOCASE = 267, TOK_RELATION_GREATER = 268, TOK_RELATION_GREATER_OR_EQUAL = 269, TOK_RELATION_LESS = 270, TOK_RELATION_LESS_OR_EQUAL = 271, TOK_RELATION_EQUAL = 272, TOK_RELATION_EQUAL_NOCASE = 273, TOK_RELATION_NOT_EQUAL = 274, TOK_RELATION_NOT_EQUAL_NOCASE = 275, TOK_NOT = 276, TOK_OPERATOR_AND = 277, TOK_OPERATOR_OR = 278, TOK_ERROR = 279 }; #endif /* Tokens. */ #define TOK_IDMEF_VALUE 258 #define TOK_IDMEF_PATH 259 #define TOK_RELATION_SUBSTRING 260 #define TOK_RELATION_SUBSTRING_NOCASE 261 #define TOK_RELATION_NOT_SUBSTRING 262 #define TOK_RELATION_NOT_SUBSTRING_NOCASE 263 #define TOK_RELATION_REGEXP 264 #define TOK_RELATION_REGEXP_NOCASE 265 #define TOK_RELATION_NOT_REGEXP 266 #define TOK_RELATION_NOT_REGEXP_NOCASE 267 #define TOK_RELATION_GREATER 268 #define TOK_RELATION_GREATER_OR_EQUAL 269 #define TOK_RELATION_LESS 270 #define TOK_RELATION_LESS_OR_EQUAL 271 #define TOK_RELATION_EQUAL 272 #define TOK_RELATION_EQUAL_NOCASE 273 #define TOK_RELATION_NOT_EQUAL 274 #define TOK_RELATION_NOT_EQUAL_NOCASE 275 #define TOK_NOT 276 #define TOK_OPERATOR_AND 277 #define TOK_OPERATOR_OR 278 #define TOK_ERROR 279 /* Copy the first part of user declarations. */ #line 25 "idmef-criteria-string.yac.y" #define PRELUDE_ERROR_SOURCE_DEFAULT PRELUDE_ERROR_SOURCE_IDMEF_CRITERIA #include #include #include #include #include #include #include "glthread/lock.h" #include "prelude-log.h" #include "prelude-error.h" #include "prelude-inttypes.h" #include "idmef.h" #include "idmef-criteria.h" #include "common.h" static int path_count = 0; static int real_ret = 0; static idmef_path_t *cur_path; static idmef_criteria_t *processed_criteria; static idmef_criterion_operator_t cur_operator; gl_lock_t _criteria_parse_mutex = gl_lock_initializer; #define operator_or 1 #define operator_and 2 extern int yylex(void); extern void yylex_init(void); extern void yylex_destroy(void); static void yyerror(char *s); extern void *yy_scan_string(const char *); extern void yy_delete_buffer(void *); void _idmef_criteria_string_init_lexer(void); #define YYERROR_VERBOSE static int create_criteria(idmef_criteria_t **criteria, idmef_path_t *path, idmef_criterion_value_t *value, idmef_criterion_operator_t operator) { idmef_criterion_t *criterion; real_ret = idmef_criteria_new(criteria); if ( real_ret < 0 ) goto err; if ( path_count++ > 0 ) idmef_path_ref(path); real_ret = idmef_criterion_new(&criterion, path, value, operator); if ( real_ret < 0 ) { idmef_criteria_destroy(*criteria); goto err; } idmef_criteria_set_criterion(*criteria, criterion); return 0; err: idmef_path_destroy(path); cur_path = NULL; return real_ret; } /* Enabling traces. */ #ifndef YYDEBUG # define YYDEBUG 0 #endif /* Enabling verbose error messages. */ #ifdef YYERROR_VERBOSE # undef YYERROR_VERBOSE # define YYERROR_VERBOSE 1 #else # define YYERROR_VERBOSE 0 #endif /* Enabling the token table. */ #ifndef YYTOKEN_TABLE # define YYTOKEN_TABLE 0 #endif #if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED typedef union YYSTYPE #line 99 "idmef-criteria-string.yac.y" { char *str; int operator; idmef_path_t *path; idmef_criteria_t *criteria; idmef_criterion_operator_t relation; } /* Line 187 of yacc.c. */ #line 226 "idmef-criteria-string.yac.c" YYSTYPE; # define yystype YYSTYPE /* obsolescent; will be withdrawn */ # define YYSTYPE_IS_DECLARED 1 # define YYSTYPE_IS_TRIVIAL 1 #endif /* Copy the second part of user declarations. */ /* Line 216 of yacc.c. */ #line 239 "idmef-criteria-string.yac.c" #ifdef short # undef short #endif #ifdef YYTYPE_UINT8 typedef YYTYPE_UINT8 yytype_uint8; #else typedef unsigned char yytype_uint8; #endif #ifdef YYTYPE_INT8 typedef YYTYPE_INT8 yytype_int8; #elif (defined __STDC__ || defined __C99__FUNC__ \ || defined __cplusplus || defined _MSC_VER) typedef signed char yytype_int8; #else typedef short int yytype_int8; #endif #ifdef YYTYPE_UINT16 typedef YYTYPE_UINT16 yytype_uint16; #else typedef unsigned short int yytype_uint16; #endif #ifdef YYTYPE_INT16 typedef YYTYPE_INT16 yytype_int16; #else typedef short int yytype_int16; #endif #ifndef YYSIZE_T # ifdef __SIZE_TYPE__ # define YYSIZE_T __SIZE_TYPE__ # elif defined size_t # define YYSIZE_T size_t # elif ! defined YYSIZE_T && (defined __STDC__ || defined __C99__FUNC__ \ || defined __cplusplus || defined _MSC_VER) # include /* INFRINGES ON USER NAME SPACE */ # define YYSIZE_T size_t # else # define YYSIZE_T unsigned int # endif #endif #define YYSIZE_MAXIMUM ((YYSIZE_T) -1) #ifndef YY_ # if YYENABLE_NLS # if ENABLE_NLS # include /* INFRINGES ON USER NAME SPACE */ # define YY_(msgid) dgettext ("bison-runtime", msgid) # endif # endif # ifndef YY_ # define YY_(msgid) msgid # endif #endif /* Suppress unused-variable warnings by "using" E. */ #if ! defined lint || defined __GNUC__ # define YYUSE(e) ((void) (e)) #else # define YYUSE(e) /* empty */ #endif /* Identity function, used to suppress warnings about constant conditions. */ #ifndef lint # define YYID(n) (n) #else #if (defined __STDC__ || defined __C99__FUNC__ \ || defined __cplusplus || defined _MSC_VER) static int YYID (int i) #else static int YYID (i) int i; #endif { return i; } #endif #if ! defined yyoverflow || YYERROR_VERBOSE /* The parser invokes alloca or malloc; define the necessary symbols. */ # ifdef YYSTACK_USE_ALLOCA # if YYSTACK_USE_ALLOCA # ifdef __GNUC__ # define YYSTACK_ALLOC __builtin_alloca # elif defined __BUILTIN_VA_ARG_INCR # include /* INFRINGES ON USER NAME SPACE */ # elif defined _AIX # define YYSTACK_ALLOC __alloca # elif defined _MSC_VER # include /* INFRINGES ON USER NAME SPACE */ # define alloca _alloca # else # define YYSTACK_ALLOC alloca # if ! defined _ALLOCA_H && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \ || defined __cplusplus || defined _MSC_VER) # include /* INFRINGES ON USER NAME SPACE */ # ifndef _STDLIB_H # define _STDLIB_H 1 # endif # endif # endif # endif # endif # ifdef YYSTACK_ALLOC /* Pacify GCC's `empty if-body' warning. */ # define YYSTACK_FREE(Ptr) do { /* empty */; } while (YYID (0)) # ifndef YYSTACK_ALLOC_MAXIMUM /* The OS might guarantee only one guard page at the bottom of the stack, and a page size can be as small as 4096 bytes. So we cannot safely invoke alloca (N) if N exceeds 4096. Use a slightly smaller number to allow for a few compiler-allocated temporary stack slots. */ # define YYSTACK_ALLOC_MAXIMUM 4032 /* reasonable circa 2006 */ # endif # else # define YYSTACK_ALLOC YYMALLOC # define YYSTACK_FREE YYFREE # ifndef YYSTACK_ALLOC_MAXIMUM # define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM # endif # if (defined __cplusplus && ! defined _STDLIB_H \ && ! ((defined YYMALLOC || defined malloc) \ && (defined YYFREE || defined free))) # include /* INFRINGES ON USER NAME SPACE */ # ifndef _STDLIB_H # define _STDLIB_H 1 # endif # endif # ifndef YYMALLOC # define YYMALLOC malloc # if ! defined malloc && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \ || defined __cplusplus || defined _MSC_VER) void *malloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */ # endif # endif # ifndef YYFREE # define YYFREE free # if ! defined free && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \ || defined __cplusplus || defined _MSC_VER) void free (void *); /* INFRINGES ON USER NAME SPACE */ # endif # endif # endif #endif /* ! defined yyoverflow || YYERROR_VERBOSE */ #if (! defined yyoverflow \ && (! defined __cplusplus \ || (defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL))) /* A type that is properly aligned for any stack member. */ union yyalloc { yytype_int16 yyss; YYSTYPE yyvs; }; /* The size of the maximum gap between one aligned stack and the next. */ # define YYSTACK_GAP_MAXIMUM (sizeof (union yyalloc) - 1) /* The size of an array large to enough to hold all stacks, each with N elements. */ # define YYSTACK_BYTES(N) \ ((N) * (sizeof (yytype_int16) + sizeof (YYSTYPE)) \ + YYSTACK_GAP_MAXIMUM) /* Copy COUNT objects from FROM to TO. The source and destination do not overlap. */ # ifndef YYCOPY # if defined __GNUC__ && 1 < __GNUC__ # define YYCOPY(To, From, Count) \ __builtin_memcpy (To, From, (Count) * sizeof (*(From))) # else # define YYCOPY(To, From, Count) \ do \ { \ YYSIZE_T yyi; \ for (yyi = 0; yyi < (Count); yyi++) \ (To)[yyi] = (From)[yyi]; \ } \ while (YYID (0)) # endif # endif /* Relocate STACK from its old location to the new one. The local variables YYSIZE and YYSTACKSIZE give the old and new number of elements in the stack, and YYPTR gives the new location of the stack. Advance YYPTR to a properly aligned location for the next stack. */ # define YYSTACK_RELOCATE(Stack) \ do \ { \ YYSIZE_T yynewbytes; \ YYCOPY (&yyptr->Stack, Stack, yysize); \ Stack = &yyptr->Stack; \ yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \ yyptr += yynewbytes / sizeof (*yyptr); \ } \ while (YYID (0)) #endif /* YYFINAL -- State number of the termination state. */ #define YYFINAL 12 /* YYLAST -- Last index in YYTABLE. */ #define YYLAST 54 /* YYNTOKENS -- Number of terminals. */ #define YYNTOKENS 27 /* YYNNTS -- Number of nonterminals. */ #define YYNNTS 10 /* YYNRULES -- Number of rules. */ #define YYNRULES 36 /* YYNRULES -- Number of states. */ #define YYNSTATES 50 /* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX. */ #define YYUNDEFTOK 2 #define YYMAXUTOK 279 #define YYTRANSLATE(YYX) \ ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK) /* YYTRANSLATE[YYLEX] -- Bison symbol number corresponding to YYLEX. */ static const yytype_uint8 yytranslate[] = { 0, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 25, 26, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24 }; #if YYDEBUG /* YYPRHS[YYN] -- Index of the first RHS symbol of rule number YYN in YYRHS. */ static const yytype_uint8 yyprhs[] = { 0, 0, 3, 5, 7, 11, 13, 17, 22, 28, 32, 34, 37, 39, 41, 45, 49, 51, 53, 55, 57, 59, 61, 63, 65, 67, 69, 71, 73, 75, 77, 79, 81, 83, 85, 87, 89 }; /* YYRHS -- A `-1'-separated list of the rules' RHS. */ static const yytype_int8 yyrhs[] = { 28, 0, -1, 29, -1, 30, -1, 29, 36, 30, -1, 31, -1, 25, 29, 26, -1, 21, 25, 29, 26, -1, 32, 35, 25, 34, 26, -1, 32, 35, 33, -1, 32, -1, 21, 32, -1, 4, -1, 3, -1, 34, 36, 34, -1, 25, 34, 26, -1, 33, -1, 5, -1, 6, -1, 7, -1, 8, -1, 9, -1, 10, -1, 11, -1, 12, -1, 13, -1, 14, -1, 15, -1, 16, -1, 17, -1, 18, -1, 19, -1, 20, -1, 21, -1, 24, -1, 22, -1, 23, -1 }; /* YYRLINE[YYN] -- source line where rule number YYN was defined. */ static const yytype_uint16 yyrline[] = { 0, 154, 154, 161, 165, 176, 180, 184, 192, 196, 200, 210, 223, 237, 258, 267, 271, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 299, 300 }; #endif #if YYDEBUG || YYERROR_VERBOSE || YYTOKEN_TABLE /* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM. First, the terminals, then, starting at YYNTOKENS, nonterminals. */ static const char *const yytname[] = { "$end", "error", "$undefined", "\"\"", "\"\"", "\"<>\"", "\"<>*\"", "\"!<>\"", "\"!<>*\"", "\"~\"", "\"~*\"", "\"!~\"", "\"!~*\"", "\">\"", "\">=\"", "\"<\"", "\"<=\"", "\"=\"", "\"=*\"", "\"!=\"", "\"!=*\"", "\"!\"", "\"&&\"", "\"||\"", "TOK_ERROR", "'('", "')'", "$accept", "input", "criteria", "criteria_base", "criterion", "path", "value", "multiple_value", "relation", "operator", 0 }; #endif # ifdef YYPRINT /* YYTOKNUM[YYLEX-NUM] -- Internal token number corresponding to token YYLEX-NUM. */ static const yytype_uint16 yytoknum[] = { 0, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 40, 41 }; # endif /* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */ static const yytype_uint8 yyr1[] = { 0, 27, 28, 29, 29, 30, 30, 30, 31, 31, 31, 31, 32, 33, 34, 34, 34, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 36, 36 }; /* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN. */ static const yytype_uint8 yyr2[] = { 0, 2, 1, 1, 3, 1, 3, 4, 5, 3, 1, 2, 1, 1, 3, 3, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 }; /* YYDEFACT[STATE-NAME] -- Default rule to reduce with in state STATE-NUM when YYTABLE doesn't specify something else to do. Zero means the default is an error. */ static const yytype_uint8 yydefact[] = { 0, 12, 0, 0, 0, 2, 3, 5, 10, 0, 11, 0, 1, 35, 36, 0, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 0, 0, 6, 4, 13, 0, 9, 7, 0, 16, 0, 0, 8, 0, 15, 14 }; /* YYDEFGOTO[NTERM-NUM]. */ static const yytype_int8 yydefgoto[] = { -1, 4, 5, 6, 7, 8, 43, 44, 34, 15 }; /* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing STATE-NUM. */ #define YYPACT_NINF -38 static const yytype_int8 yypact[] = { -1, -38, 0, -1, 6, 31, -38, -38, 21, -1, -38, -7, -38, -38, -38, -1, -38, -38, -38, -38, -38, -38, -38, -38, -38, -38, -38, -38, -38, -38, -38, -38, -38, -38, -3, -5, -38, -38, -38, -2, -38, -38, -2, -38, 24, 26, -38, -2, -38, 31 }; /* YYPGOTO[NTERM-NUM]. */ static const yytype_int8 yypgoto[] = { -38, -38, 2, -13, -38, 8, -21, -33, -38, -37 }; /* YYTABLE[YYPACT[STATE-NUM]]. What to do in state STATE-NUM. If positive, shift that token. If negative, reduce the rule which number is the opposite. If zero, do what YYDEFACT says. If YYTABLE_NINF, syntax error. */ #define YYTABLE_NINF -1 static const yytype_uint8 yytable[] = { 38, 38, 37, 1, 1, 11, 12, 47, 47, 45, 10, 35, 47, 40, 49, 13, 14, 13, 14, 36, 2, 41, 39, 42, 3, 9, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 0, 0, 33, 13, 14, 13, 14, 46, 0, 48, 13, 14 }; static const yytype_int8 yycheck[] = { 3, 3, 15, 4, 4, 3, 0, 44, 45, 42, 2, 9, 49, 34, 47, 22, 23, 22, 23, 26, 21, 26, 25, 25, 25, 25, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, -1, -1, 24, 22, 23, 22, 23, 26, -1, 26, 22, 23 }; /* YYSTOS[STATE-NUM] -- The (internal number of the) accessing symbol of state STATE-NUM. */ static const yytype_uint8 yystos[] = { 0, 4, 21, 25, 28, 29, 30, 31, 32, 25, 32, 29, 0, 22, 23, 36, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 24, 35, 29, 26, 30, 3, 25, 33, 26, 25, 33, 34, 34, 26, 36, 26, 34 }; #define yyerrok (yyerrstatus = 0) #define yyclearin (yychar = YYEMPTY) #define YYEMPTY (-2) #define YYEOF 0 #define YYACCEPT goto yyacceptlab #define YYABORT goto yyabortlab #define YYERROR goto yyerrorlab /* Like YYERROR except do call yyerror. This remains here temporarily to ease the transition to the new meaning of YYERROR, for GCC. Once GCC version 2 has supplanted version 1, this can go. */ #define YYFAIL goto yyerrlab #define YYRECOVERING() (!!yyerrstatus) #define YYBACKUP(Token, Value) \ do \ if (yychar == YYEMPTY && yylen == 1) \ { \ yychar = (Token); \ yylval = (Value); \ yytoken = YYTRANSLATE (yychar); \ YYPOPSTACK (1); \ goto yybackup; \ } \ else \ { \ yyerror (YY_("syntax error: cannot back up")); \ YYERROR; \ } \ while (YYID (0)) #define YYTERROR 1 #define YYERRCODE 256 /* YYLLOC_DEFAULT -- Set CURRENT to span from RHS[1] to RHS[N]. If N is 0, then set CURRENT to the empty location which ends the previous symbol: RHS[0] (always defined). */ #define YYRHSLOC(Rhs, K) ((Rhs)[K]) #ifndef YYLLOC_DEFAULT # define YYLLOC_DEFAULT(Current, Rhs, N) \ do \ if (YYID (N)) \ { \ (Current).first_line = YYRHSLOC (Rhs, 1).first_line; \ (Current).first_column = YYRHSLOC (Rhs, 1).first_column; \ (Current).last_line = YYRHSLOC (Rhs, N).last_line; \ (Current).last_column = YYRHSLOC (Rhs, N).last_column; \ } \ else \ { \ (Current).first_line = (Current).last_line = \ YYRHSLOC (Rhs, 0).last_line; \ (Current).first_column = (Current).last_column = \ YYRHSLOC (Rhs, 0).last_column; \ } \ while (YYID (0)) #endif /* YY_LOCATION_PRINT -- Print the location on the stream. This macro was not mandated originally: define only if we know we won't break user code: when these are the locations we know. */ #ifndef YY_LOCATION_PRINT # if YYLTYPE_IS_TRIVIAL # define YY_LOCATION_PRINT(File, Loc) \ fprintf (File, "%d.%d-%d.%d", \ (Loc).first_line, (Loc).first_column, \ (Loc).last_line, (Loc).last_column) # else # define YY_LOCATION_PRINT(File, Loc) ((void) 0) # endif #endif /* YYLEX -- calling `yylex' with the right arguments. */ #ifdef YYLEX_PARAM # define YYLEX yylex (YYLEX_PARAM) #else # define YYLEX yylex () #endif /* Enable debugging if requested. */ #if YYDEBUG # ifndef YYFPRINTF # include /* INFRINGES ON USER NAME SPACE */ # define YYFPRINTF fprintf # endif # define YYDPRINTF(Args) \ do { \ if (yydebug) \ YYFPRINTF Args; \ } while (YYID (0)) # define YY_SYMBOL_PRINT(Title, Type, Value, Location) \ do { \ if (yydebug) \ { \ YYFPRINTF (stderr, "%s ", Title); \ yy_symbol_print (stderr, \ Type, Value); \ YYFPRINTF (stderr, "\n"); \ } \ } while (YYID (0)) /*--------------------------------. | Print this symbol on YYOUTPUT. | `--------------------------------*/ /*ARGSUSED*/ #if (defined __STDC__ || defined __C99__FUNC__ \ || defined __cplusplus || defined _MSC_VER) static void yy_symbol_value_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep) #else static void yy_symbol_value_print (yyoutput, yytype, yyvaluep) FILE *yyoutput; int yytype; YYSTYPE const * const yyvaluep; #endif { if (!yyvaluep) return; # ifdef YYPRINT if (yytype < YYNTOKENS) YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep); # else YYUSE (yyoutput); # endif switch (yytype) { default: break; } } /*--------------------------------. | Print this symbol on YYOUTPUT. | `--------------------------------*/ #if (defined __STDC__ || defined __C99__FUNC__ \ || defined __cplusplus || defined _MSC_VER) static void yy_symbol_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep) #else static void yy_symbol_print (yyoutput, yytype, yyvaluep) FILE *yyoutput; int yytype; YYSTYPE const * const yyvaluep; #endif { if (yytype < YYNTOKENS) YYFPRINTF (yyoutput, "token %s (", yytname[yytype]); else YYFPRINTF (yyoutput, "nterm %s (", yytname[yytype]); yy_symbol_value_print (yyoutput, yytype, yyvaluep); YYFPRINTF (yyoutput, ")"); } /*------------------------------------------------------------------. | yy_stack_print -- Print the state stack from its BOTTOM up to its | | TOP (included). | `------------------------------------------------------------------*/ #if (defined __STDC__ || defined __C99__FUNC__ \ || defined __cplusplus || defined _MSC_VER) static void yy_stack_print (yytype_int16 *bottom, yytype_int16 *top) #else static void yy_stack_print (bottom, top) yytype_int16 *bottom; yytype_int16 *top; #endif { YYFPRINTF (stderr, "Stack now"); for (; bottom <= top; ++bottom) YYFPRINTF (stderr, " %d", *bottom); YYFPRINTF (stderr, "\n"); } # define YY_STACK_PRINT(Bottom, Top) \ do { \ if (yydebug) \ yy_stack_print ((Bottom), (Top)); \ } while (YYID (0)) /*------------------------------------------------. | Report that the YYRULE is going to be reduced. | `------------------------------------------------*/ #if (defined __STDC__ || defined __C99__FUNC__ \ || defined __cplusplus || defined _MSC_VER) static void yy_reduce_print (YYSTYPE *yyvsp, int yyrule) #else static void yy_reduce_print (yyvsp, yyrule) YYSTYPE *yyvsp; int yyrule; #endif { int yynrhs = yyr2[yyrule]; int yyi; unsigned long int yylno = yyrline[yyrule]; YYFPRINTF (stderr, "Reducing stack by rule %d (line %lu):\n", yyrule - 1, yylno); /* The symbols being reduced. */ for (yyi = 0; yyi < yynrhs; yyi++) { fprintf (stderr, " $%d = ", yyi + 1); yy_symbol_print (stderr, yyrhs[yyprhs[yyrule] + yyi], &(yyvsp[(yyi + 1) - (yynrhs)]) ); fprintf (stderr, "\n"); } } # define YY_REDUCE_PRINT(Rule) \ do { \ if (yydebug) \ yy_reduce_print (yyvsp, Rule); \ } while (YYID (0)) /* Nonzero means print parse trace. It is left uninitialized so that multiple parsers can coexist. */ int yydebug; #else /* !YYDEBUG */ # define YYDPRINTF(Args) # define YY_SYMBOL_PRINT(Title, Type, Value, Location) # define YY_STACK_PRINT(Bottom, Top) # define YY_REDUCE_PRINT(Rule) #endif /* !YYDEBUG */ /* YYINITDEPTH -- initial size of the parser's stacks. */ #ifndef YYINITDEPTH # define YYINITDEPTH 200 #endif /* YYMAXDEPTH -- maximum size the stacks can grow to (effective only if the built-in stack extension method is used). Do not make this value too large; the results are undefined if YYSTACK_ALLOC_MAXIMUM < YYSTACK_BYTES (YYMAXDEPTH) evaluated with infinite-precision integer arithmetic. */ #ifndef YYMAXDEPTH # define YYMAXDEPTH 10000 #endif #if YYERROR_VERBOSE # ifndef yystrlen # if defined __GLIBC__ && defined _STRING_H # define yystrlen strlen # else /* Return the length of YYSTR. */ #if (defined __STDC__ || defined __C99__FUNC__ \ || defined __cplusplus || defined _MSC_VER) static YYSIZE_T yystrlen (const char *yystr) #else static YYSIZE_T yystrlen (yystr) const char *yystr; #endif { YYSIZE_T yylen; for (yylen = 0; yystr[yylen]; yylen++) continue; return yylen; } # endif # endif # ifndef yystpcpy # if defined __GLIBC__ && defined _STRING_H && defined _GNU_SOURCE # define yystpcpy stpcpy # else /* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in YYDEST. */ #if (defined __STDC__ || defined __C99__FUNC__ \ || defined __cplusplus || defined _MSC_VER) static char * yystpcpy (char *yydest, const char *yysrc) #else static char * yystpcpy (yydest, yysrc) char *yydest; const char *yysrc; #endif { char *yyd = yydest; const char *yys = yysrc; while ((*yyd++ = *yys++) != '\0') continue; return yyd - 1; } # endif # endif # ifndef yytnamerr /* Copy to YYRES the contents of YYSTR after stripping away unnecessary quotes and backslashes, so that it's suitable for yyerror. The heuristic is that double-quoting is unnecessary unless the string contains an apostrophe, a comma, or backslash (other than backslash-backslash). YYSTR is taken from yytname. If YYRES is null, do not copy; instead, return the length of what the result would have been. */ static YYSIZE_T yytnamerr (char *yyres, const char *yystr) { if (*yystr == '"') { YYSIZE_T yyn = 0; char const *yyp = yystr; for (;;) switch (*++yyp) { case '\'': case ',': goto do_not_strip_quotes; case '\\': if (*++yyp != '\\') goto do_not_strip_quotes; /* Fall through. */ default: if (yyres) yyres[yyn] = *yyp; yyn++; break; case '"': if (yyres) yyres[yyn] = '\0'; return yyn; } do_not_strip_quotes: ; } if (! yyres) return yystrlen (yystr); return yystpcpy (yyres, yystr) - yyres; } # endif /* Copy into YYRESULT an error message about the unexpected token YYCHAR while in state YYSTATE. Return the number of bytes copied, including the terminating null byte. If YYRESULT is null, do not copy anything; just return the number of bytes that would be copied. As a special case, return 0 if an ordinary "syntax error" message will do. Return YYSIZE_MAXIMUM if overflow occurs during size calculation. */ static YYSIZE_T yysyntax_error (char *yyresult, int yystate, int yychar) { int yyn = yypact[yystate]; if (! (YYPACT_NINF < yyn && yyn <= YYLAST)) return 0; else { int yytype = YYTRANSLATE (yychar); YYSIZE_T yysize0 = yytnamerr (0, yytname[yytype]); YYSIZE_T yysize = yysize0; YYSIZE_T yysize1; int yysize_overflow = 0; enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 }; char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM]; int yyx; # if 0 /* This is so xgettext sees the translatable formats that are constructed on the fly. */ YY_("syntax error, unexpected %s"); YY_("syntax error, unexpected %s, expecting %s"); YY_("syntax error, unexpected %s, expecting %s or %s"); YY_("syntax error, unexpected %s, expecting %s or %s or %s"); YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s"); # endif char *yyfmt; char const *yyf; static char const yyunexpected[] = "syntax error, unexpected %s"; static char const yyexpecting[] = ", expecting %s"; static char const yyor[] = " or %s"; char yyformat[sizeof yyunexpected + sizeof yyexpecting - 1 + ((YYERROR_VERBOSE_ARGS_MAXIMUM - 2) * (sizeof yyor - 1))]; char const *yyprefix = yyexpecting; /* Start YYX at -YYN if negative to avoid negative indexes in YYCHECK. */ int yyxbegin = yyn < 0 ? -yyn : 0; /* Stay within bounds of both yycheck and yytname. */ int yychecklim = YYLAST - yyn + 1; int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS; int yycount = 1; yyarg[0] = yytname[yytype]; yyfmt = yystpcpy (yyformat, yyunexpected); for (yyx = yyxbegin; yyx < yyxend; ++yyx) if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR) { if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM) { yycount = 1; yysize = yysize0; yyformat[sizeof yyunexpected - 1] = '\0'; break; } yyarg[yycount++] = yytname[yyx]; yysize1 = yysize + yytnamerr (0, yytname[yyx]); yysize_overflow |= (yysize1 < yysize); yysize = yysize1; yyfmt = yystpcpy (yyfmt, yyprefix); yyprefix = yyor; } yyf = YY_(yyformat); yysize1 = yysize + yystrlen (yyf); yysize_overflow |= (yysize1 < yysize); yysize = yysize1; if (yysize_overflow) return YYSIZE_MAXIMUM; if (yyresult) { /* Avoid sprintf, as that infringes on the user's name space. Don't have undefined behavior even if the translation produced a string with the wrong number of "%s"s. */ char *yyp = yyresult; int yyi = 0; while ((*yyp = *yyf) != '\0') { if (*yyp == '%' && yyf[1] == 's' && yyi < yycount) { yyp += yytnamerr (yyp, yyarg[yyi++]); yyf += 2; } else { yyp++; yyf++; } } } return yysize; } } #endif /* YYERROR_VERBOSE */ /*-----------------------------------------------. | Release the memory associated to this symbol. | `-----------------------------------------------*/ /*ARGSUSED*/ #if (defined __STDC__ || defined __C99__FUNC__ \ || defined __cplusplus || defined _MSC_VER) static void yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep) #else static void yydestruct (yymsg, yytype, yyvaluep) const char *yymsg; int yytype; YYSTYPE *yyvaluep; #endif { YYUSE (yyvaluep); if (!yymsg) yymsg = "Deleting"; YY_SYMBOL_PRINT (yymsg, yytype, yyvaluep, yylocationp); switch (yytype) { case 3: /* "\"\"" */ #line 112 "idmef-criteria-string.yac.y" { free((yyvaluep->str)); }; #line 1164 "idmef-criteria-string.yac.c" break; case 4: /* "\"\"" */ #line 112 "idmef-criteria-string.yac.y" { free((yyvaluep->str)); }; #line 1169 "idmef-criteria-string.yac.c" break; case 29: /* "criteria" */ #line 113 "idmef-criteria-string.yac.y" { idmef_criteria_destroy((yyvaluep->criteria)); }; #line 1174 "idmef-criteria-string.yac.c" break; default: break; } } /* Prevent warnings from -Wmissing-prototypes. */ #ifdef YYPARSE_PARAM #if defined __STDC__ || defined __cplusplus int yyparse (void *YYPARSE_PARAM); #else int yyparse (); #endif #else /* ! YYPARSE_PARAM */ #if defined __STDC__ || defined __cplusplus int yyparse (void); #else int yyparse (); #endif #endif /* ! YYPARSE_PARAM */ /* The look-ahead symbol. */ int yychar; /* The semantic value of the look-ahead symbol. */ YYSTYPE yylval; /* Number of syntax errors so far. */ int yynerrs; /*----------. | yyparse. | `----------*/ #ifdef YYPARSE_PARAM #if (defined __STDC__ || defined __C99__FUNC__ \ || defined __cplusplus || defined _MSC_VER) int yyparse (void *YYPARSE_PARAM) #else int yyparse (YYPARSE_PARAM) void *YYPARSE_PARAM; #endif #else /* ! YYPARSE_PARAM */ #if (defined __STDC__ || defined __C99__FUNC__ \ || defined __cplusplus || defined _MSC_VER) int yyparse (void) #else int yyparse () #endif #endif { int yystate; int yyn; int yyresult; /* Number of tokens to shift before error messages enabled. */ int yyerrstatus; /* Look-ahead token as an internal (translated) token number. */ int yytoken = 0; #if YYERROR_VERBOSE /* Buffer for error messages, and its allocated size. */ char yymsgbuf[128]; char *yymsg = yymsgbuf; YYSIZE_T yymsg_alloc = sizeof yymsgbuf; #endif /* Three stacks and their tools: `yyss': related to states, `yyvs': related to semantic values, `yyls': related to locations. Refer to the stacks thru separate pointers, to allow yyoverflow to reallocate them elsewhere. */ /* The state stack. */ yytype_int16 yyssa[YYINITDEPTH]; yytype_int16 *yyss = yyssa; yytype_int16 *yyssp; /* The semantic value stack. */ YYSTYPE yyvsa[YYINITDEPTH]; YYSTYPE *yyvs = yyvsa; YYSTYPE *yyvsp; #define YYPOPSTACK(N) (yyvsp -= (N), yyssp -= (N)) YYSIZE_T yystacksize = YYINITDEPTH; /* The variables used to return semantic value and location from the action routines. */ YYSTYPE yyval; /* The number of symbols on the RHS of the reduced rule. Keep to zero when no symbol should be popped. */ int yylen = 0; YYDPRINTF ((stderr, "Starting parse\n")); yystate = 0; yyerrstatus = 0; yynerrs = 0; yychar = YYEMPTY; /* Cause a token to be read. */ /* Initialize stack pointers. Waste one element of value and location stack so that they stay on the same level as the state stack. The wasted elements are never initialized. */ yyssp = yyss; yyvsp = yyvs; goto yysetstate; /*------------------------------------------------------------. | yynewstate -- Push a new state, which is found in yystate. | `------------------------------------------------------------*/ yynewstate: /* In all cases, when you get here, the value and location stacks have just been pushed. So pushing a state here evens the stacks. */ yyssp++; yysetstate: *yyssp = yystate; if (yyss + yystacksize - 1 <= yyssp) { /* Get the current used size of the three stacks, in elements. */ YYSIZE_T yysize = yyssp - yyss + 1; #ifdef yyoverflow { /* Give user a chance to reallocate the stack. Use copies of these so that the &'s don't force the real ones into memory. */ YYSTYPE *yyvs1 = yyvs; yytype_int16 *yyss1 = yyss; /* Each stack pointer address is followed by the size of the data in use in that stack, in bytes. This used to be a conditional around just the two extra args, but that might be undefined if yyoverflow is a macro. */ yyoverflow (YY_("memory exhausted"), &yyss1, yysize * sizeof (*yyssp), &yyvs1, yysize * sizeof (*yyvsp), &yystacksize); yyss = yyss1; yyvs = yyvs1; } #else /* no yyoverflow */ # ifndef YYSTACK_RELOCATE goto yyexhaustedlab; # else /* Extend the stack our own way. */ if (YYMAXDEPTH <= yystacksize) goto yyexhaustedlab; yystacksize *= 2; if (YYMAXDEPTH < yystacksize) yystacksize = YYMAXDEPTH; { yytype_int16 *yyss1 = yyss; union yyalloc *yyptr = (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize)); if (! yyptr) goto yyexhaustedlab; YYSTACK_RELOCATE (yyss); YYSTACK_RELOCATE (yyvs); # undef YYSTACK_RELOCATE if (yyss1 != yyssa) YYSTACK_FREE (yyss1); } # endif #endif /* no yyoverflow */ yyssp = yyss + yysize - 1; yyvsp = yyvs + yysize - 1; YYDPRINTF ((stderr, "Stack size increased to %lu\n", (unsigned long int) yystacksize)); if (yyss + yystacksize - 1 <= yyssp) YYABORT; } YYDPRINTF ((stderr, "Entering state %d\n", yystate)); goto yybackup; /*-----------. | yybackup. | `-----------*/ yybackup: /* Do appropriate processing given the current state. Read a look-ahead token if we need one and don't already have one. */ /* First try to decide what to do without reference to look-ahead token. */ yyn = yypact[yystate]; if (yyn == YYPACT_NINF) goto yydefault; /* Not known => get a look-ahead token if don't already have one. */ /* YYCHAR is either YYEMPTY or YYEOF or a valid look-ahead symbol. */ if (yychar == YYEMPTY) { YYDPRINTF ((stderr, "Reading a token: ")); yychar = YYLEX; } if (yychar <= YYEOF) { yychar = yytoken = YYEOF; YYDPRINTF ((stderr, "Now at end of input.\n")); } else { yytoken = YYTRANSLATE (yychar); YY_SYMBOL_PRINT ("Next token is", yytoken, &yylval, &yylloc); } /* If the proper action on seeing token YYTOKEN is to reduce or to detect an error, take that action. */ yyn += yytoken; if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) goto yydefault; yyn = yytable[yyn]; if (yyn <= 0) { if (yyn == 0 || yyn == YYTABLE_NINF) goto yyerrlab; yyn = -yyn; goto yyreduce; } if (yyn == YYFINAL) YYACCEPT; /* Count tokens shifted since error; after three, turn off error status. */ if (yyerrstatus) yyerrstatus--; /* Shift the look-ahead token. */ YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc); /* Discard the shifted token unless it is eof. */ if (yychar != YYEOF) yychar = YYEMPTY; yystate = yyn; *++yyvsp = yylval; goto yynewstate; /*-----------------------------------------------------------. | yydefault -- do the default action for the current state. | `-----------------------------------------------------------*/ yydefault: yyn = yydefact[yystate]; if (yyn == 0) goto yyerrlab; goto yyreduce; /*-----------------------------. | yyreduce -- Do a reduction. | `-----------------------------*/ yyreduce: /* yyn is the number of a rule to reduce with. */ yylen = yyr2[yyn]; /* If YYLEN is nonzero, implement the default value of the action: `$$ = $1'. Otherwise, the following line sets YYVAL to garbage. This behavior is undocumented and Bison users should not rely upon it. Assigning to YYVAL unconditionally makes the parser a bit smaller, and it avoids a GCC warning that YYVAL may be used uninitialized. */ yyval = yyvsp[1-yylen]; YY_REDUCE_PRINT (yyn); switch (yyn) { case 2: #line 154 "idmef-criteria-string.yac.y" { processed_criteria = (yyvsp[(1) - (1)].criteria); } break; case 3: #line 161 "idmef-criteria-string.yac.y" { (yyval.criteria) = (yyvsp[(1) - (1)].criteria); } break; case 4: #line 165 "idmef-criteria-string.yac.y" { if ( (yyvsp[(2) - (3)].operator) == operator_or ) idmef_criteria_or_criteria((yyvsp[(1) - (3)].criteria), (yyvsp[(3) - (3)].criteria)); else idmef_criteria_and_criteria((yyvsp[(1) - (3)].criteria), (yyvsp[(3) - (3)].criteria)); (yyval.criteria) = (yyvsp[(1) - (3)].criteria); } break; case 5: #line 176 "idmef-criteria-string.yac.y" { (yyval.criteria) = (yyvsp[(1) - (1)].criteria); } break; case 6: #line 180 "idmef-criteria-string.yac.y" { (yyval.criteria) = (yyvsp[(2) - (3)].criteria); } break; case 7: #line 184 "idmef-criteria-string.yac.y" { idmef_criteria_set_negation((yyvsp[(3) - (4)].criteria), TRUE); (yyval.criteria) = (yyvsp[(3) - (4)].criteria); } break; case 8: #line 192 "idmef-criteria-string.yac.y" { (yyval.criteria) = (yyvsp[(4) - (5)].criteria); } break; case 9: #line 196 "idmef-criteria-string.yac.y" { (yyval.criteria) = (yyvsp[(3) - (3)].criteria); } break; case 10: #line 200 "idmef-criteria-string.yac.y" { idmef_criteria_t *criteria; real_ret = create_criteria(&criteria, (yyvsp[(1) - (1)].path), NULL, IDMEF_CRITERION_OPERATOR_NOT|IDMEF_CRITERION_OPERATOR_NULL); if ( real_ret < 0 ) YYABORT; (yyval.criteria) = criteria; } break; case 11: #line 210 "idmef-criteria-string.yac.y" { idmef_criteria_t *criteria; real_ret = create_criteria(&criteria, (yyvsp[(2) - (2)].path), NULL, IDMEF_CRITERION_OPERATOR_NULL); if ( real_ret < 0 ) YYABORT; (yyval.criteria) = criteria; } break; case 12: #line 223 "idmef-criteria-string.yac.y" { real_ret = idmef_path_new_fast(&cur_path, (yyvsp[(1) - (1)].str)); free((yyvsp[(1) - (1)].str)); if ( real_ret < 0 ) YYABORT; path_count = 0; (yyval.path) = cur_path; } break; case 13: #line 237 "idmef-criteria-string.yac.y" { idmef_criteria_t *criteria; idmef_criterion_value_t *value = NULL; real_ret = idmef_criterion_value_new_from_string(&value, cur_path, (yyvsp[(1) - (1)].str), cur_operator); free((yyvsp[(1) - (1)].str)); if ( real_ret < 0 ) YYABORT; real_ret = create_criteria(&criteria, cur_path, value, cur_operator); if ( real_ret < 0 ) YYABORT; (yyval.criteria) = criteria; } break; case 14: #line 258 "idmef-criteria-string.yac.y" { if ( (yyvsp[(2) - (3)].operator) == operator_or ) idmef_criteria_or_criteria((yyvsp[(1) - (3)].criteria), (yyvsp[(3) - (3)].criteria)); else idmef_criteria_and_criteria((yyvsp[(1) - (3)].criteria), (yyvsp[(3) - (3)].criteria)); (yyval.criteria) = (yyvsp[(1) - (3)].criteria); } break; case 15: #line 267 "idmef-criteria-string.yac.y" { (yyval.criteria) = (yyvsp[(2) - (3)].criteria); } break; case 16: #line 271 "idmef-criteria-string.yac.y" { (yyval.criteria) = (yyvsp[(1) - (1)].criteria); } break; case 17: #line 278 "idmef-criteria-string.yac.y" { cur_operator = (yyval.relation) = IDMEF_CRITERION_OPERATOR_SUBSTR; } break; case 18: #line 279 "idmef-criteria-string.yac.y" { cur_operator = (yyval.relation) = IDMEF_CRITERION_OPERATOR_SUBSTR|IDMEF_CRITERION_OPERATOR_NOCASE; } break; case 19: #line 280 "idmef-criteria-string.yac.y" { cur_operator = (yyval.relation) = IDMEF_CRITERION_OPERATOR_SUBSTR|IDMEF_CRITERION_OPERATOR_NOT; } break; case 20: #line 281 "idmef-criteria-string.yac.y" { cur_operator = (yyval.relation) = IDMEF_CRITERION_OPERATOR_SUBSTR|IDMEF_CRITERION_OPERATOR_NOT|IDMEF_CRITERION_OPERATOR_NOCASE; } break; case 21: #line 282 "idmef-criteria-string.yac.y" { cur_operator = (yyval.relation) = IDMEF_CRITERION_OPERATOR_REGEX; } break; case 22: #line 283 "idmef-criteria-string.yac.y" { cur_operator = (yyval.relation) = IDMEF_CRITERION_OPERATOR_REGEX|IDMEF_CRITERION_OPERATOR_NOCASE; } break; case 23: #line 284 "idmef-criteria-string.yac.y" { cur_operator = (yyval.relation) = IDMEF_CRITERION_OPERATOR_REGEX|IDMEF_CRITERION_OPERATOR_NOT; } break; case 24: #line 285 "idmef-criteria-string.yac.y" { cur_operator = (yyval.relation) = IDMEF_CRITERION_OPERATOR_REGEX|IDMEF_CRITERION_OPERATOR_NOT|IDMEF_CRITERION_OPERATOR_NOCASE; } break; case 25: #line 286 "idmef-criteria-string.yac.y" { cur_operator = (yyval.relation) = IDMEF_CRITERION_OPERATOR_GREATER; } break; case 26: #line 287 "idmef-criteria-string.yac.y" { cur_operator = (yyval.relation) = IDMEF_CRITERION_OPERATOR_GREATER|IDMEF_CRITERION_OPERATOR_EQUAL; } break; case 27: #line 288 "idmef-criteria-string.yac.y" { cur_operator = (yyval.relation) = IDMEF_CRITERION_OPERATOR_LESSER; } break; case 28: #line 289 "idmef-criteria-string.yac.y" { cur_operator = (yyval.relation) = IDMEF_CRITERION_OPERATOR_LESSER|IDMEF_CRITERION_OPERATOR_EQUAL; } break; case 29: #line 290 "idmef-criteria-string.yac.y" { cur_operator = (yyval.relation) = IDMEF_CRITERION_OPERATOR_EQUAL; } break; case 30: #line 291 "idmef-criteria-string.yac.y" { cur_operator = (yyval.relation) = IDMEF_CRITERION_OPERATOR_EQUAL|IDMEF_CRITERION_OPERATOR_NOCASE; } break; case 31: #line 292 "idmef-criteria-string.yac.y" { cur_operator = (yyval.relation) = IDMEF_CRITERION_OPERATOR_EQUAL|IDMEF_CRITERION_OPERATOR_NOT; } break; case 32: #line 293 "idmef-criteria-string.yac.y" { cur_operator = (yyval.relation) = IDMEF_CRITERION_OPERATOR_EQUAL|IDMEF_CRITERION_OPERATOR_NOCASE|IDMEF_CRITERION_OPERATOR_NOT; } break; case 33: #line 294 "idmef-criteria-string.yac.y" { cur_operator = (yyval.relation) = IDMEF_CRITERION_OPERATOR_NULL; } break; case 34: #line 295 "idmef-criteria-string.yac.y" { real_ret = prelude_error_verbose(PRELUDE_ERROR_IDMEF_CRITERIA_PARSE, "Criteria parser reported: Invalid operator found"); YYERROR; } break; case 35: #line 299 "idmef-criteria-string.yac.y" { (yyval.operator) = operator_and; } break; case 36: #line 300 "idmef-criteria-string.yac.y" { (yyval.operator) = operator_or; } break; /* Line 1267 of yacc.c. */ #line 1733 "idmef-criteria-string.yac.c" default: break; } YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc); YYPOPSTACK (yylen); yylen = 0; YY_STACK_PRINT (yyss, yyssp); *++yyvsp = yyval; /* Now `shift' the result of the reduction. Determine what state that goes to, based on the state we popped back to and the rule number reduced by. */ yyn = yyr1[yyn]; yystate = yypgoto[yyn - YYNTOKENS] + *yyssp; if (0 <= yystate && yystate <= YYLAST && yycheck[yystate] == *yyssp) yystate = yytable[yystate]; else yystate = yydefgoto[yyn - YYNTOKENS]; goto yynewstate; /*------------------------------------. | yyerrlab -- here on detecting error | `------------------------------------*/ yyerrlab: /* If not already recovering from an error, report this error. */ if (!yyerrstatus) { ++yynerrs; #if ! YYERROR_VERBOSE yyerror (YY_("syntax error")); #else { YYSIZE_T yysize = yysyntax_error (0, yystate, yychar); if (yymsg_alloc < yysize && yymsg_alloc < YYSTACK_ALLOC_MAXIMUM) { YYSIZE_T yyalloc = 2 * yysize; if (! (yysize <= yyalloc && yyalloc <= YYSTACK_ALLOC_MAXIMUM)) yyalloc = YYSTACK_ALLOC_MAXIMUM; if (yymsg != yymsgbuf) YYSTACK_FREE (yymsg); yymsg = (char *) YYSTACK_ALLOC (yyalloc); if (yymsg) yymsg_alloc = yyalloc; else { yymsg = yymsgbuf; yymsg_alloc = sizeof yymsgbuf; } } if (0 < yysize && yysize <= yymsg_alloc) { (void) yysyntax_error (yymsg, yystate, yychar); yyerror (yymsg); } else { yyerror (YY_("syntax error")); if (yysize != 0) goto yyexhaustedlab; } } #endif } if (yyerrstatus == 3) { /* If just tried and failed to reuse look-ahead token after an error, discard it. */ if (yychar <= YYEOF) { /* Return failure if at end of input. */ if (yychar == YYEOF) YYABORT; } else { yydestruct ("Error: discarding", yytoken, &yylval); yychar = YYEMPTY; } } /* Else will try to reuse look-ahead token after shifting the error token. */ goto yyerrlab1; /*---------------------------------------------------. | yyerrorlab -- error raised explicitly by YYERROR. | `---------------------------------------------------*/ yyerrorlab: /* Pacify compilers like GCC when the user code never invokes YYERROR and the label yyerrorlab therefore never appears in user code. */ if (/*CONSTCOND*/ 0) goto yyerrorlab; /* Do not reclaim the symbols of the rule which action triggered this YYERROR. */ YYPOPSTACK (yylen); yylen = 0; YY_STACK_PRINT (yyss, yyssp); yystate = *yyssp; goto yyerrlab1; /*-------------------------------------------------------------. | yyerrlab1 -- common code for both syntax error and YYERROR. | `-------------------------------------------------------------*/ yyerrlab1: yyerrstatus = 3; /* Each real token shifted decrements this. */ for (;;) { yyn = yypact[yystate]; if (yyn != YYPACT_NINF) { yyn += YYTERROR; if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR) { yyn = yytable[yyn]; if (0 < yyn) break; } } /* Pop the current state because it cannot handle the error token. */ if (yyssp == yyss) YYABORT; yydestruct ("Error: popping", yystos[yystate], yyvsp); YYPOPSTACK (1); yystate = *yyssp; YY_STACK_PRINT (yyss, yyssp); } if (yyn == YYFINAL) YYACCEPT; *++yyvsp = yylval; /* Shift the error token. */ YY_SYMBOL_PRINT ("Shifting", yystos[yyn], yyvsp, yylsp); yystate = yyn; goto yynewstate; /*-------------------------------------. | yyacceptlab -- YYACCEPT comes here. | `-------------------------------------*/ yyacceptlab: yyresult = 0; goto yyreturn; /*-----------------------------------. | yyabortlab -- YYABORT comes here. | `-----------------------------------*/ yyabortlab: yyresult = 1; goto yyreturn; #ifndef yyoverflow /*-------------------------------------------------. | yyexhaustedlab -- memory exhaustion comes here. | `-------------------------------------------------*/ yyexhaustedlab: yyerror (YY_("memory exhausted")); yyresult = 2; /* Fall through. */ #endif yyreturn: if (yychar != YYEOF && yychar != YYEMPTY) yydestruct ("Cleanup: discarding lookahead", yytoken, &yylval); /* Do not reclaim the symbols of the rule which action triggered this YYABORT or YYACCEPT. */ YYPOPSTACK (yylen); YY_STACK_PRINT (yyss, yyssp); while (yyssp != yyss) { yydestruct ("Cleanup: popping", yystos[*yyssp], yyvsp); YYPOPSTACK (1); } #ifndef yyoverflow if (yyss != yyssa) YYSTACK_FREE (yyss); #endif #if YYERROR_VERBOSE if (yymsg != yymsgbuf) YYSTACK_FREE (yymsg); #endif /* Make sure YYID is used. */ return YYID (yyresult); } #line 303 "idmef-criteria-string.yac.y" static void yyerror(char *s) /* Called by yyparse on error */ { real_ret = prelude_error_verbose_make(PRELUDE_ERROR_SOURCE_IDMEF_CRITERIA, PRELUDE_ERROR_IDMEF_CRITERIA_PARSE, "IDMEF-Criteria parser: %s", s); } int idmef_criteria_new_from_string(idmef_criteria_t **new_criteria, const char *str) { int ret; void *state; prelude_return_val_if_fail(str, -1); gl_lock_lock(_criteria_parse_mutex); real_ret = 0; processed_criteria = NULL; state = yy_scan_string(str); ret = yyparse(); yy_delete_buffer(state); if ( ret != 0 ) { _idmef_criteria_string_init_lexer(); if ( real_ret ) ret = real_ret; else ret = prelude_error_make(PRELUDE_ERROR_SOURCE_IDMEF_CRITERIA, PRELUDE_ERROR_IDMEF_CRITERIA_PARSE); if ( processed_criteria ) idmef_criteria_destroy(processed_criteria); } else *new_criteria = processed_criteria; gl_lock_unlock(_criteria_parse_mutex); return ret; } libprelude-1.0.0/src/idmef-message-print.c0000664000076400007640000024526011202225026015366 00000000000000 /***** * * Copyright (C) 2004-2006,2007 PreludeIDS Technologies. All Rights Reserved. * Author: Yoann Vandoorselaere * Author: Nicolas Delon * * This file is part of the Prelude library. * * 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; see the file COPYING. If not, write to * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. * *****/ /* Auto-generated by the GenerateIDMEFMessagePrintC package */ #include "config.h" #include "libmissing.h" #include #include "idmef.h" #include "idmef-tree-wrap.h" #include "idmef-message-print.h" static int indent = 0; static void print_indent(prelude_io_t *fd) { int cnt; for ( cnt = 0; cnt < indent; cnt++ ) prelude_io_write(fd, " ", 1); } static void print_string(prelude_string_t *string, prelude_io_t *fd) { if ( prelude_string_is_empty(string) ) prelude_io_write(fd, "", 7); else prelude_io_write(fd, prelude_string_get_string(string), prelude_string_get_len(string)); } static void print_uint8(uint8_t i, prelude_io_t *fd) { int len; char buf[sizeof("255")]; /* * %hh convertion specifier is not portable. */ len = snprintf(buf, sizeof(buf), "%u", (unsigned int) i); prelude_io_write(fd, buf, len); } static void print_uint16(uint16_t i, prelude_io_t *fd) { int len; char buf[sizeof("65535")]; len = snprintf(buf, sizeof(buf), "%hu", i); prelude_io_write(fd, buf, len); } static void print_int32(int32_t i, prelude_io_t *fd) { int len; char buf[sizeof("4294967296")]; len = snprintf(buf, sizeof(buf), "%d", i); prelude_io_write(fd, buf, len); } static void print_uint32(uint32_t i, prelude_io_t *fd) { int len; char buf[sizeof("4294967296")]; len = snprintf(buf, sizeof(buf), "%u", i); prelude_io_write(fd, buf, len); } static void print_uint64(uint64_t i, prelude_io_t *fd) { int len; char buf[sizeof("18446744073709551616")]; len = snprintf(buf, sizeof(buf), "%" PRELUDE_PRIu64, i); prelude_io_write(fd, buf, len); } static void print_float(float f, prelude_io_t *fd) { int len; char buf[32]; len = snprintf(buf, sizeof(buf), "%f", f); prelude_io_write(fd, buf, len); } static void print_time(idmef_time_t *t, prelude_io_t *fd) { int len; time_t _time; struct tm _tm; char tmp[32], buf[128]; _time = idmef_time_get_sec(t) + idmef_time_get_gmt_offset(t); if ( ! gmtime_r(&_time, &_tm) ) return; len = strftime(tmp, sizeof(tmp), "%d/%m/%Y %H:%M:%S", &_tm); if ( len == 0 ) return; len = snprintf(buf, sizeof(buf), "%s.%u %+.2d:%.2d", tmp, idmef_time_get_usec(t), idmef_time_get_gmt_offset(t) / 3600, idmef_time_get_gmt_offset(t) % 3600 / 60); prelude_io_write(fd, buf, len); } /* print data as a string */ static int print_data(idmef_data_t *data, prelude_io_t *fd) { int ret; prelude_string_t *out; ret = prelude_string_new(&out); if ( ret < 0 ) return ret; ret = idmef_data_to_string(data, out); if ( ret < 0 ) { prelude_string_destroy(out); return ret; } prelude_io_write(fd, prelude_string_get_string(out), prelude_string_get_len(out)); prelude_string_destroy(out); return 0; } static void print_enum(const char *s, int i, prelude_io_t *fd) { int len; char buf[512]; if ( ! s ) s = ""; len = snprintf(buf, sizeof(buf), "%s (%d)", s, i); prelude_io_write(fd, buf, len); } /** * idmef_additional_data_print: * @ptr: Pointer to an idmef_additional_data_t object. * @fd: Pointer to a #prelude_io_t object where to print @ptr to. * * This function will convert @ptr to a string suitable for writing, * and write it to the provided @fd descriptor. */ void idmef_additional_data_print(idmef_additional_data_t *ptr, prelude_io_t *fd) { if ( ! ptr ) return; indent += 8; { int i = idmef_additional_data_get_type(ptr); { print_indent(fd); prelude_io_write(fd, "type: ", sizeof("type: ") - 1); print_enum(idmef_additional_data_type_to_string(i), i, fd); prelude_io_write(fd, "\n", sizeof("\n") - 1); } } { prelude_string_t *field; const char tmp[] = "meaning: "; field = idmef_additional_data_get_meaning(ptr); if ( field ) { print_indent(fd); prelude_io_write(fd, tmp, sizeof(tmp) - 1); print_string(field, fd); prelude_io_write(fd, "\n", sizeof("\n") - 1); } } { idmef_data_t *field; const char tmp[] = "data: "; field = idmef_additional_data_get_data(ptr); if ( field ) { print_indent(fd); prelude_io_write(fd, tmp, sizeof(tmp) - 1); print_data(field, fd); prelude_io_write(fd, "\n", sizeof("\n") - 1); } } indent -= 8; } /** * idmef_reference_print: * @ptr: Pointer to an idmef_reference_t object. * @fd: Pointer to a #prelude_io_t object where to print @ptr to. * * This function will convert @ptr to a string suitable for writing, * and write it to the provided @fd descriptor. */ void idmef_reference_print(idmef_reference_t *ptr, prelude_io_t *fd) { if ( ! ptr ) return; indent += 8; { int i = idmef_reference_get_origin(ptr); { print_indent(fd); prelude_io_write(fd, "origin: ", sizeof("origin: ") - 1); print_enum(idmef_reference_origin_to_string(i), i, fd); prelude_io_write(fd, "\n", sizeof("\n") - 1); } } { prelude_string_t *field; const char tmp[] = "name: "; field = idmef_reference_get_name(ptr); if ( field ) { print_indent(fd); prelude_io_write(fd, tmp, sizeof(tmp) - 1); print_string(field, fd); prelude_io_write(fd, "\n", sizeof("\n") - 1); } } { prelude_string_t *field; const char tmp[] = "url: "; field = idmef_reference_get_url(ptr); if ( field ) { print_indent(fd); prelude_io_write(fd, tmp, sizeof(tmp) - 1); print_string(field, fd); prelude_io_write(fd, "\n", sizeof("\n") - 1); } } { prelude_string_t *field; const char tmp[] = "meaning: "; field = idmef_reference_get_meaning(ptr); if ( field ) { print_indent(fd); prelude_io_write(fd, tmp, sizeof(tmp) - 1); print_string(field, fd); prelude_io_write(fd, "\n", sizeof("\n") - 1); } } indent -= 8; } /** * idmef_classification_print: * @ptr: Pointer to an idmef_classification_t object. * @fd: Pointer to a #prelude_io_t object where to print @ptr to. * * This function will convert @ptr to a string suitable for writing, * and write it to the provided @fd descriptor. */ void idmef_classification_print(idmef_classification_t *ptr, prelude_io_t *fd) { if ( ! ptr ) return; indent += 8; { prelude_string_t *field; const char tmp[] = "ident: "; field = idmef_classification_get_ident(ptr); if ( field ) { print_indent(fd); prelude_io_write(fd, tmp, sizeof(tmp) - 1); print_string(field, fd); prelude_io_write(fd, "\n", sizeof("\n") - 1); } } { prelude_string_t *field; const char tmp[] = "text: "; field = idmef_classification_get_text(ptr); if ( field ) { print_indent(fd); prelude_io_write(fd, tmp, sizeof(tmp) - 1); print_string(field, fd); prelude_io_write(fd, "\n", sizeof("\n") - 1); } } { char buf[128]; idmef_reference_t *elem = NULL; int cnt = 0, len; while ( (elem = idmef_classification_get_next_reference(ptr, elem)) ) { print_indent(fd); len = snprintf(buf, sizeof(buf), "reference(%d): \n", cnt); prelude_io_write(fd, buf, len); idmef_reference_print(elem, fd); cnt++; } } indent -= 8; } /** * idmef_user_id_print: * @ptr: Pointer to an idmef_user_id_t object. * @fd: Pointer to a #prelude_io_t object where to print @ptr to. * * This function will convert @ptr to a string suitable for writing, * and write it to the provided @fd descriptor. */ void idmef_user_id_print(idmef_user_id_t *ptr, prelude_io_t *fd) { if ( ! ptr ) return; indent += 8; { prelude_string_t *field; const char tmp[] = "ident: "; field = idmef_user_id_get_ident(ptr); if ( field ) { print_indent(fd); prelude_io_write(fd, tmp, sizeof(tmp) - 1); print_string(field, fd); prelude_io_write(fd, "\n", sizeof("\n") - 1); } } { int i = idmef_user_id_get_type(ptr); { print_indent(fd); prelude_io_write(fd, "type: ", sizeof("type: ") - 1); print_enum(idmef_user_id_type_to_string(i), i, fd); prelude_io_write(fd, "\n", sizeof("\n") - 1); } } { prelude_string_t *field; const char tmp[] = "tty: "; field = idmef_user_id_get_tty(ptr); if ( field ) { print_indent(fd); prelude_io_write(fd, tmp, sizeof(tmp) - 1); print_string(field, fd); prelude_io_write(fd, "\n", sizeof("\n") - 1); } } { prelude_string_t *field; const char tmp[] = "name: "; field = idmef_user_id_get_name(ptr); if ( field ) { print_indent(fd); prelude_io_write(fd, tmp, sizeof(tmp) - 1); print_string(field, fd); prelude_io_write(fd, "\n", sizeof("\n") - 1); } } { uint32_t *field; const char tmp[] = "number: "; field = idmef_user_id_get_number(ptr); if ( field ) { print_indent(fd); prelude_io_write(fd, tmp, sizeof(tmp) - 1); print_uint32(*field, fd); prelude_io_write(fd, "\n", sizeof("\n") - 1); } } indent -= 8; } /** * idmef_user_print: * @ptr: Pointer to an idmef_user_t object. * @fd: Pointer to a #prelude_io_t object where to print @ptr to. * * This function will convert @ptr to a string suitable for writing, * and write it to the provided @fd descriptor. */ void idmef_user_print(idmef_user_t *ptr, prelude_io_t *fd) { if ( ! ptr ) return; indent += 8; { prelude_string_t *field; const char tmp[] = "ident: "; field = idmef_user_get_ident(ptr); if ( field ) { print_indent(fd); prelude_io_write(fd, tmp, sizeof(tmp) - 1); print_string(field, fd); prelude_io_write(fd, "\n", sizeof("\n") - 1); } } { int i = idmef_user_get_category(ptr); { print_indent(fd); prelude_io_write(fd, "category: ", sizeof("category: ") - 1); print_enum(idmef_user_category_to_string(i), i, fd); prelude_io_write(fd, "\n", sizeof("\n") - 1); } } { char buf[128]; idmef_user_id_t *elem = NULL; int cnt = 0, len; while ( (elem = idmef_user_get_next_user_id(ptr, elem)) ) { print_indent(fd); len = snprintf(buf, sizeof(buf), "user_id(%d): \n", cnt); prelude_io_write(fd, buf, len); idmef_user_id_print(elem, fd); cnt++; } } indent -= 8; } /** * idmef_address_print: * @ptr: Pointer to an idmef_address_t object. * @fd: Pointer to a #prelude_io_t object where to print @ptr to. * * This function will convert @ptr to a string suitable for writing, * and write it to the provided @fd descriptor. */ void idmef_address_print(idmef_address_t *ptr, prelude_io_t *fd) { if ( ! ptr ) return; indent += 8; { prelude_string_t *field; const char tmp[] = "ident: "; field = idmef_address_get_ident(ptr); if ( field ) { print_indent(fd); prelude_io_write(fd, tmp, sizeof(tmp) - 1); print_string(field, fd); prelude_io_write(fd, "\n", sizeof("\n") - 1); } } { int i = idmef_address_get_category(ptr); { print_indent(fd); prelude_io_write(fd, "category: ", sizeof("category: ") - 1); print_enum(idmef_address_category_to_string(i), i, fd); prelude_io_write(fd, "\n", sizeof("\n") - 1); } } { prelude_string_t *field; const char tmp[] = "vlan_name: "; field = idmef_address_get_vlan_name(ptr); if ( field ) { print_indent(fd); prelude_io_write(fd, tmp, sizeof(tmp) - 1); print_string(field, fd); prelude_io_write(fd, "\n", sizeof("\n") - 1); } } { int32_t *field; const char tmp[] = "vlan_num: "; field = idmef_address_get_vlan_num(ptr); if ( field ) { print_indent(fd); prelude_io_write(fd, tmp, sizeof(tmp) - 1); print_int32(*field, fd); prelude_io_write(fd, "\n", sizeof("\n") - 1); } } { prelude_string_t *field; const char tmp[] = "address: "; field = idmef_address_get_address(ptr); if ( field ) { print_indent(fd); prelude_io_write(fd, tmp, sizeof(tmp) - 1); print_string(field, fd); prelude_io_write(fd, "\n", sizeof("\n") - 1); } } { prelude_string_t *field; const char tmp[] = "netmask: "; field = idmef_address_get_netmask(ptr); if ( field ) { print_indent(fd); prelude_io_write(fd, tmp, sizeof(tmp) - 1); print_string(field, fd); prelude_io_write(fd, "\n", sizeof("\n") - 1); } } indent -= 8; } /** * idmef_process_print: * @ptr: Pointer to an idmef_process_t object. * @fd: Pointer to a #prelude_io_t object where to print @ptr to. * * This function will convert @ptr to a string suitable for writing, * and write it to the provided @fd descriptor. */ void idmef_process_print(idmef_process_t *ptr, prelude_io_t *fd) { if ( ! ptr ) return; indent += 8; { prelude_string_t *field; const char tmp[] = "ident: "; field = idmef_process_get_ident(ptr); if ( field ) { print_indent(fd); prelude_io_write(fd, tmp, sizeof(tmp) - 1); print_string(field, fd); prelude_io_write(fd, "\n", sizeof("\n") - 1); } } { prelude_string_t *field; const char tmp[] = "name: "; field = idmef_process_get_name(ptr); if ( field ) { print_indent(fd); prelude_io_write(fd, tmp, sizeof(tmp) - 1); print_string(field, fd); prelude_io_write(fd, "\n", sizeof("\n") - 1); } } { uint32_t *field; const char tmp[] = "pid: "; field = idmef_process_get_pid(ptr); if ( field ) { print_indent(fd); prelude_io_write(fd, tmp, sizeof(tmp) - 1); print_uint32(*field, fd); prelude_io_write(fd, "\n", sizeof("\n") - 1); } } { prelude_string_t *field; const char tmp[] = "path: "; field = idmef_process_get_path(ptr); if ( field ) { print_indent(fd); prelude_io_write(fd, tmp, sizeof(tmp) - 1); print_string(field, fd); prelude_io_write(fd, "\n", sizeof("\n") - 1); } } { char buf[128]; prelude_string_t *elem = NULL; int cnt = 0, len; while ( (elem = idmef_process_get_next_arg(ptr, elem)) ) { print_indent(fd); len = snprintf(buf, sizeof(buf), "arg(%d): ", cnt); prelude_io_write(fd, buf, len); print_string(elem, fd); prelude_io_write(fd, "\n", sizeof("\n") - 1); cnt++; } } { char buf[128]; prelude_string_t *elem = NULL; int cnt = 0, len; while ( (elem = idmef_process_get_next_env(ptr, elem)) ) { print_indent(fd); len = snprintf(buf, sizeof(buf), "env(%d): ", cnt); prelude_io_write(fd, buf, len); print_string(elem, fd); prelude_io_write(fd, "\n", sizeof("\n") - 1); cnt++; } } indent -= 8; } /** * idmef_web_service_print: * @ptr: Pointer to an idmef_web_service_t object. * @fd: Pointer to a #prelude_io_t object where to print @ptr to. * * This function will convert @ptr to a string suitable for writing, * and write it to the provided @fd descriptor. */ void idmef_web_service_print(idmef_web_service_t *ptr, prelude_io_t *fd) { if ( ! ptr ) return; indent += 8; { prelude_string_t *field; const char tmp[] = "url: "; field = idmef_web_service_get_url(ptr); if ( field ) { print_indent(fd); prelude_io_write(fd, tmp, sizeof(tmp) - 1); print_string(field, fd); prelude_io_write(fd, "\n", sizeof("\n") - 1); } } { prelude_string_t *field; const char tmp[] = "cgi: "; field = idmef_web_service_get_cgi(ptr); if ( field ) { print_indent(fd); prelude_io_write(fd, tmp, sizeof(tmp) - 1); print_string(field, fd); prelude_io_write(fd, "\n", sizeof("\n") - 1); } } { prelude_string_t *field; const char tmp[] = "http_method: "; field = idmef_web_service_get_http_method(ptr); if ( field ) { print_indent(fd); prelude_io_write(fd, tmp, sizeof(tmp) - 1); print_string(field, fd); prelude_io_write(fd, "\n", sizeof("\n") - 1); } } { char buf[128]; prelude_string_t *elem = NULL; int cnt = 0, len; while ( (elem = idmef_web_service_get_next_arg(ptr, elem)) ) { print_indent(fd); len = snprintf(buf, sizeof(buf), "arg(%d): ", cnt); prelude_io_write(fd, buf, len); print_string(elem, fd); prelude_io_write(fd, "\n", sizeof("\n") - 1); cnt++; } } indent -= 8; } /** * idmef_snmp_service_print: * @ptr: Pointer to an idmef_snmp_service_t object. * @fd: Pointer to a #prelude_io_t object where to print @ptr to. * * This function will convert @ptr to a string suitable for writing, * and write it to the provided @fd descriptor. */ void idmef_snmp_service_print(idmef_snmp_service_t *ptr, prelude_io_t *fd) { if ( ! ptr ) return; indent += 8; { prelude_string_t *field; const char tmp[] = "oid: "; field = idmef_snmp_service_get_oid(ptr); if ( field ) { print_indent(fd); prelude_io_write(fd, tmp, sizeof(tmp) - 1); print_string(field, fd); prelude_io_write(fd, "\n", sizeof("\n") - 1); } } { uint32_t *field; const char tmp[] = "message_processing_model: "; field = idmef_snmp_service_get_message_processing_model(ptr); if ( field ) { print_indent(fd); prelude_io_write(fd, tmp, sizeof(tmp) - 1); print_uint32(*field, fd); prelude_io_write(fd, "\n", sizeof("\n") - 1); } } { uint32_t *field; const char tmp[] = "security_model: "; field = idmef_snmp_service_get_security_model(ptr); if ( field ) { print_indent(fd); prelude_io_write(fd, tmp, sizeof(tmp) - 1); print_uint32(*field, fd); prelude_io_write(fd, "\n", sizeof("\n") - 1); } } { prelude_string_t *field; const char tmp[] = "security_name: "; field = idmef_snmp_service_get_security_name(ptr); if ( field ) { print_indent(fd); prelude_io_write(fd, tmp, sizeof(tmp) - 1); print_string(field, fd); prelude_io_write(fd, "\n", sizeof("\n") - 1); } } { uint32_t *field; const char tmp[] = "security_level: "; field = idmef_snmp_service_get_security_level(ptr); if ( field ) { print_indent(fd); prelude_io_write(fd, tmp, sizeof(tmp) - 1); print_uint32(*field, fd); prelude_io_write(fd, "\n", sizeof("\n") - 1); } } { prelude_string_t *field; const char tmp[] = "context_name: "; field = idmef_snmp_service_get_context_name(ptr); if ( field ) { print_indent(fd); prelude_io_write(fd, tmp, sizeof(tmp) - 1); print_string(field, fd); prelude_io_write(fd, "\n", sizeof("\n") - 1); } } { prelude_string_t *field; const char tmp[] = "context_engine_id: "; field = idmef_snmp_service_get_context_engine_id(ptr); if ( field ) { print_indent(fd); prelude_io_write(fd, tmp, sizeof(tmp) - 1); print_string(field, fd); prelude_io_write(fd, "\n", sizeof("\n") - 1); } } { prelude_string_t *field; const char tmp[] = "command: "; field = idmef_snmp_service_get_command(ptr); if ( field ) { print_indent(fd); prelude_io_write(fd, tmp, sizeof(tmp) - 1); print_string(field, fd); prelude_io_write(fd, "\n", sizeof("\n") - 1); } } { prelude_string_t *field; const char tmp[] = "community: "; field = idmef_snmp_service_get_community(ptr); if ( field ) { print_indent(fd); prelude_io_write(fd, tmp, sizeof(tmp) - 1); print_string(field, fd); prelude_io_write(fd, "\n", sizeof("\n") - 1); } } indent -= 8; } /** * idmef_service_print: * @ptr: Pointer to an idmef_service_t object. * @fd: Pointer to a #prelude_io_t object where to print @ptr to. * * This function will convert @ptr to a string suitable for writing, * and write it to the provided @fd descriptor. */ void idmef_service_print(idmef_service_t *ptr, prelude_io_t *fd) { if ( ! ptr ) return; indent += 8; { prelude_string_t *field; const char tmp[] = "ident: "; field = idmef_service_get_ident(ptr); if ( field ) { print_indent(fd); prelude_io_write(fd, tmp, sizeof(tmp) - 1); print_string(field, fd); prelude_io_write(fd, "\n", sizeof("\n") - 1); } } { uint8_t *field; const char tmp[] = "ip_version: "; field = idmef_service_get_ip_version(ptr); if ( field ) { print_indent(fd); prelude_io_write(fd, tmp, sizeof(tmp) - 1); print_uint8(*field, fd); prelude_io_write(fd, "\n", sizeof("\n") - 1); } } { uint8_t *field; const char tmp[] = "iana_protocol_number: "; field = idmef_service_get_iana_protocol_number(ptr); if ( field ) { print_indent(fd); prelude_io_write(fd, tmp, sizeof(tmp) - 1); print_uint8(*field, fd); prelude_io_write(fd, "\n", sizeof("\n") - 1); } } { prelude_string_t *field; const char tmp[] = "iana_protocol_name: "; field = idmef_service_get_iana_protocol_name(ptr); if ( field ) { print_indent(fd); prelude_io_write(fd, tmp, sizeof(tmp) - 1); print_string(field, fd); prelude_io_write(fd, "\n", sizeof("\n") - 1); } } { prelude_string_t *field; const char tmp[] = "name: "; field = idmef_service_get_name(ptr); if ( field ) { print_indent(fd); prelude_io_write(fd, tmp, sizeof(tmp) - 1); print_string(field, fd); prelude_io_write(fd, "\n", sizeof("\n") - 1); } } { uint16_t *field; const char tmp[] = "port: "; field = idmef_service_get_port(ptr); if ( field ) { print_indent(fd); prelude_io_write(fd, tmp, sizeof(tmp) - 1); print_uint16(*field, fd); prelude_io_write(fd, "\n", sizeof("\n") - 1); } } { prelude_string_t *field; const char tmp[] = "portlist: "; field = idmef_service_get_portlist(ptr); if ( field ) { print_indent(fd); prelude_io_write(fd, tmp, sizeof(tmp) - 1); print_string(field, fd); prelude_io_write(fd, "\n", sizeof("\n") - 1); } } { prelude_string_t *field; const char tmp[] = "protocol: "; field = idmef_service_get_protocol(ptr); if ( field ) { print_indent(fd); prelude_io_write(fd, tmp, sizeof(tmp) - 1); print_string(field, fd); prelude_io_write(fd, "\n", sizeof("\n") - 1); } } switch ( idmef_service_get_type(ptr) ) { case IDMEF_SERVICE_TYPE_WEB: print_indent(fd); prelude_io_write(fd, "web_service:\n", sizeof("web_service:\n") - 1); idmef_web_service_print(idmef_service_get_web_service(ptr), fd); break; case IDMEF_SERVICE_TYPE_SNMP: print_indent(fd); prelude_io_write(fd, "snmp_service:\n", sizeof("snmp_service:\n") - 1); idmef_snmp_service_print(idmef_service_get_snmp_service(ptr), fd); break; default: break; } indent -= 8; } /** * idmef_node_print: * @ptr: Pointer to an idmef_node_t object. * @fd: Pointer to a #prelude_io_t object where to print @ptr to. * * This function will convert @ptr to a string suitable for writing, * and write it to the provided @fd descriptor. */ void idmef_node_print(idmef_node_t *ptr, prelude_io_t *fd) { if ( ! ptr ) return; indent += 8; { prelude_string_t *field; const char tmp[] = "ident: "; field = idmef_node_get_ident(ptr); if ( field ) { print_indent(fd); prelude_io_write(fd, tmp, sizeof(tmp) - 1); print_string(field, fd); prelude_io_write(fd, "\n", sizeof("\n") - 1); } } { int i = idmef_node_get_category(ptr); { print_indent(fd); prelude_io_write(fd, "category: ", sizeof("category: ") - 1); print_enum(idmef_node_category_to_string(i), i, fd); prelude_io_write(fd, "\n", sizeof("\n") - 1); } } { prelude_string_t *field; const char tmp[] = "location: "; field = idmef_node_get_location(ptr); if ( field ) { print_indent(fd); prelude_io_write(fd, tmp, sizeof(tmp) - 1); print_string(field, fd); prelude_io_write(fd, "\n", sizeof("\n") - 1); } } { prelude_string_t *field; const char tmp[] = "name: "; field = idmef_node_get_name(ptr); if ( field ) { print_indent(fd); prelude_io_write(fd, tmp, sizeof(tmp) - 1); print_string(field, fd); prelude_io_write(fd, "\n", sizeof("\n") - 1); } } { char buf[128]; idmef_address_t *elem = NULL; int cnt = 0, len; while ( (elem = idmef_node_get_next_address(ptr, elem)) ) { print_indent(fd); len = snprintf(buf, sizeof(buf), "address(%d): \n", cnt); prelude_io_write(fd, buf, len); idmef_address_print(elem, fd); cnt++; } } indent -= 8; } /** * idmef_source_print: * @ptr: Pointer to an idmef_source_t object. * @fd: Pointer to a #prelude_io_t object where to print @ptr to. * * This function will convert @ptr to a string suitable for writing, * and write it to the provided @fd descriptor. */ void idmef_source_print(idmef_source_t *ptr, prelude_io_t *fd) { if ( ! ptr ) return; indent += 8; { prelude_string_t *field; const char tmp[] = "ident: "; field = idmef_source_get_ident(ptr); if ( field ) { print_indent(fd); prelude_io_write(fd, tmp, sizeof(tmp) - 1); print_string(field, fd); prelude_io_write(fd, "\n", sizeof("\n") - 1); } } { int i = idmef_source_get_spoofed(ptr); { print_indent(fd); prelude_io_write(fd, "spoofed: ", sizeof("spoofed: ") - 1); print_enum(idmef_source_spoofed_to_string(i), i, fd); prelude_io_write(fd, "\n", sizeof("\n") - 1); } } { prelude_string_t *field; const char tmp[] = "interface: "; field = idmef_source_get_interface(ptr); if ( field ) { print_indent(fd); prelude_io_write(fd, tmp, sizeof(tmp) - 1); print_string(field, fd); prelude_io_write(fd, "\n", sizeof("\n") - 1); } } { idmef_node_t *field; field = idmef_source_get_node(ptr); if ( field ) { print_indent(fd); prelude_io_write(fd, "node:\n", sizeof("node:\n") - 1); idmef_node_print(field, fd); } } { idmef_user_t *field; field = idmef_source_get_user(ptr); if ( field ) { print_indent(fd); prelude_io_write(fd, "user:\n", sizeof("user:\n") - 1); idmef_user_print(field, fd); } } { idmef_process_t *field; field = idmef_source_get_process(ptr); if ( field ) { print_indent(fd); prelude_io_write(fd, "process:\n", sizeof("process:\n") - 1); idmef_process_print(field, fd); } } { idmef_service_t *field; field = idmef_source_get_service(ptr); if ( field ) { print_indent(fd); prelude_io_write(fd, "service:\n", sizeof("service:\n") - 1); idmef_service_print(field, fd); } } indent -= 8; } /** * idmef_file_access_print: * @ptr: Pointer to an idmef_file_access_t object. * @fd: Pointer to a #prelude_io_t object where to print @ptr to. * * This function will convert @ptr to a string suitable for writing, * and write it to the provided @fd descriptor. */ void idmef_file_access_print(idmef_file_access_t *ptr, prelude_io_t *fd) { if ( ! ptr ) return; indent += 8; { idmef_user_id_t *field; field = idmef_file_access_get_user_id(ptr); if ( field ) { print_indent(fd); prelude_io_write(fd, "user_id:\n", sizeof("user_id:\n") - 1); idmef_user_id_print(field, fd); } } { char buf[128]; prelude_string_t *elem = NULL; int cnt = 0, len; while ( (elem = idmef_file_access_get_next_permission(ptr, elem)) ) { print_indent(fd); len = snprintf(buf, sizeof(buf), "permission(%d): ", cnt); prelude_io_write(fd, buf, len); print_string(elem, fd); prelude_io_write(fd, "\n", sizeof("\n") - 1); cnt++; } } indent -= 8; } /** * idmef_inode_print: * @ptr: Pointer to an idmef_inode_t object. * @fd: Pointer to a #prelude_io_t object where to print @ptr to. * * This function will convert @ptr to a string suitable for writing, * and write it to the provided @fd descriptor. */ void idmef_inode_print(idmef_inode_t *ptr, prelude_io_t *fd) { if ( ! ptr ) return; indent += 8; { idmef_time_t *field; const char tmp[] = "change_time: "; field = idmef_inode_get_change_time(ptr); if ( field ) { print_indent(fd); prelude_io_write(fd, tmp, sizeof(tmp) - 1); print_time(field, fd); prelude_io_write(fd, "\n", sizeof("\n") - 1); } } { uint32_t *field; const char tmp[] = "number: "; field = idmef_inode_get_number(ptr); if ( field ) { print_indent(fd); prelude_io_write(fd, tmp, sizeof(tmp) - 1); print_uint32(*field, fd); prelude_io_write(fd, "\n", sizeof("\n") - 1); } } { uint32_t *field; const char tmp[] = "major_device: "; field = idmef_inode_get_major_device(ptr); if ( field ) { print_indent(fd); prelude_io_write(fd, tmp, sizeof(tmp) - 1); print_uint32(*field, fd); prelude_io_write(fd, "\n", sizeof("\n") - 1); } } { uint32_t *field; const char tmp[] = "minor_device: "; field = idmef_inode_get_minor_device(ptr); if ( field ) { print_indent(fd); prelude_io_write(fd, tmp, sizeof(tmp) - 1); print_uint32(*field, fd); prelude_io_write(fd, "\n", sizeof("\n") - 1); } } { uint32_t *field; const char tmp[] = "c_major_device: "; field = idmef_inode_get_c_major_device(ptr); if ( field ) { print_indent(fd); prelude_io_write(fd, tmp, sizeof(tmp) - 1); print_uint32(*field, fd); prelude_io_write(fd, "\n", sizeof("\n") - 1); } } { uint32_t *field; const char tmp[] = "c_minor_device: "; field = idmef_inode_get_c_minor_device(ptr); if ( field ) { print_indent(fd); prelude_io_write(fd, tmp, sizeof(tmp) - 1); print_uint32(*field, fd); prelude_io_write(fd, "\n", sizeof("\n") - 1); } } indent -= 8; } /** * idmef_checksum_print: * @ptr: Pointer to an idmef_checksum_t object. * @fd: Pointer to a #prelude_io_t object where to print @ptr to. * * This function will convert @ptr to a string suitable for writing, * and write it to the provided @fd descriptor. */ void idmef_checksum_print(idmef_checksum_t *ptr, prelude_io_t *fd) { if ( ! ptr ) return; indent += 8; { prelude_string_t *field; const char tmp[] = "value: "; field = idmef_checksum_get_value(ptr); if ( field ) { print_indent(fd); prelude_io_write(fd, tmp, sizeof(tmp) - 1); print_string(field, fd); prelude_io_write(fd, "\n", sizeof("\n") - 1); } } { prelude_string_t *field; const char tmp[] = "key: "; field = idmef_checksum_get_key(ptr); if ( field ) { print_indent(fd); prelude_io_write(fd, tmp, sizeof(tmp) - 1); print_string(field, fd); prelude_io_write(fd, "\n", sizeof("\n") - 1); } } { int i = idmef_checksum_get_algorithm(ptr); { print_indent(fd); prelude_io_write(fd, "algorithm: ", sizeof("algorithm: ") - 1); print_enum(idmef_checksum_algorithm_to_string(i), i, fd); prelude_io_write(fd, "\n", sizeof("\n") - 1); } } indent -= 8; } /** * idmef_file_print: * @ptr: Pointer to an idmef_file_t object. * @fd: Pointer to a #prelude_io_t object where to print @ptr to. * * This function will convert @ptr to a string suitable for writing, * and write it to the provided @fd descriptor. */ void idmef_file_print(idmef_file_t *ptr, prelude_io_t *fd) { if ( ! ptr ) return; indent += 8; { prelude_string_t *field; const char tmp[] = "ident: "; field = idmef_file_get_ident(ptr); if ( field ) { print_indent(fd); prelude_io_write(fd, tmp, sizeof(tmp) - 1); print_string(field, fd); prelude_io_write(fd, "\n", sizeof("\n") - 1); } } { prelude_string_t *field; const char tmp[] = "name: "; field = idmef_file_get_name(ptr); if ( field ) { print_indent(fd); prelude_io_write(fd, tmp, sizeof(tmp) - 1); print_string(field, fd); prelude_io_write(fd, "\n", sizeof("\n") - 1); } } { prelude_string_t *field; const char tmp[] = "path: "; field = idmef_file_get_path(ptr); if ( field ) { print_indent(fd); prelude_io_write(fd, tmp, sizeof(tmp) - 1); print_string(field, fd); prelude_io_write(fd, "\n", sizeof("\n") - 1); } } { idmef_time_t *field; const char tmp[] = "create_time: "; field = idmef_file_get_create_time(ptr); if ( field ) { print_indent(fd); prelude_io_write(fd, tmp, sizeof(tmp) - 1); print_time(field, fd); prelude_io_write(fd, "\n", sizeof("\n") - 1); } } { idmef_time_t *field; const char tmp[] = "modify_time: "; field = idmef_file_get_modify_time(ptr); if ( field ) { print_indent(fd); prelude_io_write(fd, tmp, sizeof(tmp) - 1); print_time(field, fd); prelude_io_write(fd, "\n", sizeof("\n") - 1); } } { idmef_time_t *field; const char tmp[] = "access_time: "; field = idmef_file_get_access_time(ptr); if ( field ) { print_indent(fd); prelude_io_write(fd, tmp, sizeof(tmp) - 1); print_time(field, fd); prelude_io_write(fd, "\n", sizeof("\n") - 1); } } { uint64_t *field; const char tmp[] = "data_size: "; field = idmef_file_get_data_size(ptr); if ( field ) { print_indent(fd); prelude_io_write(fd, tmp, sizeof(tmp) - 1); print_uint64(*field, fd); prelude_io_write(fd, "\n", sizeof("\n") - 1); } } { uint64_t *field; const char tmp[] = "disk_size: "; field = idmef_file_get_disk_size(ptr); if ( field ) { print_indent(fd); prelude_io_write(fd, tmp, sizeof(tmp) - 1); print_uint64(*field, fd); prelude_io_write(fd, "\n", sizeof("\n") - 1); } } { char buf[128]; idmef_file_access_t *elem = NULL; int cnt = 0, len; while ( (elem = idmef_file_get_next_file_access(ptr, elem)) ) { print_indent(fd); len = snprintf(buf, sizeof(buf), "file_access(%d): \n", cnt); prelude_io_write(fd, buf, len); idmef_file_access_print(elem, fd); cnt++; } } { char buf[128]; idmef_linkage_t *elem = NULL; int cnt = 0, len; while ( (elem = idmef_file_get_next_linkage(ptr, elem)) ) { print_indent(fd); len = snprintf(buf, sizeof(buf), "linkage(%d): \n", cnt); prelude_io_write(fd, buf, len); idmef_linkage_print(elem, fd); cnt++; } } { idmef_inode_t *field; field = idmef_file_get_inode(ptr); if ( field ) { print_indent(fd); prelude_io_write(fd, "inode:\n", sizeof("inode:\n") - 1); idmef_inode_print(field, fd); } } { char buf[128]; idmef_checksum_t *elem = NULL; int cnt = 0, len; while ( (elem = idmef_file_get_next_checksum(ptr, elem)) ) { print_indent(fd); len = snprintf(buf, sizeof(buf), "checksum(%d): \n", cnt); prelude_io_write(fd, buf, len); idmef_checksum_print(elem, fd); cnt++; } } { int i = idmef_file_get_category(ptr); { print_indent(fd); prelude_io_write(fd, "category: ", sizeof("category: ") - 1); print_enum(idmef_file_category_to_string(i), i, fd); prelude_io_write(fd, "\n", sizeof("\n") - 1); } } { int *i = idmef_file_get_fstype(ptr); if ( i ) { print_indent(fd); prelude_io_write(fd, "fstype: ", sizeof("fstype: ") - 1); print_enum(idmef_file_fstype_to_string(*i), *i, fd); prelude_io_write(fd, "\n", sizeof("\n") - 1); } } { prelude_string_t *field; const char tmp[] = "file_type: "; field = idmef_file_get_file_type(ptr); if ( field ) { print_indent(fd); prelude_io_write(fd, tmp, sizeof(tmp) - 1); print_string(field, fd); prelude_io_write(fd, "\n", sizeof("\n") - 1); } } indent -= 8; } /** * idmef_linkage_print: * @ptr: Pointer to an idmef_linkage_t object. * @fd: Pointer to a #prelude_io_t object where to print @ptr to. * * This function will convert @ptr to a string suitable for writing, * and write it to the provided @fd descriptor. */ void idmef_linkage_print(idmef_linkage_t *ptr, prelude_io_t *fd) { if ( ! ptr ) return; indent += 8; { int i = idmef_linkage_get_category(ptr); { print_indent(fd); prelude_io_write(fd, "category: ", sizeof("category: ") - 1); print_enum(idmef_linkage_category_to_string(i), i, fd); prelude_io_write(fd, "\n", sizeof("\n") - 1); } } { prelude_string_t *field; const char tmp[] = "name: "; field = idmef_linkage_get_name(ptr); if ( field ) { print_indent(fd); prelude_io_write(fd, tmp, sizeof(tmp) - 1); print_string(field, fd); prelude_io_write(fd, "\n", sizeof("\n") - 1); } } { prelude_string_t *field; const char tmp[] = "path: "; field = idmef_linkage_get_path(ptr); if ( field ) { print_indent(fd); prelude_io_write(fd, tmp, sizeof(tmp) - 1); print_string(field, fd); prelude_io_write(fd, "\n", sizeof("\n") - 1); } } { idmef_file_t *field; field = idmef_linkage_get_file(ptr); if ( field ) { print_indent(fd); prelude_io_write(fd, "file:\n", sizeof("file:\n") - 1); idmef_file_print(field, fd); } } indent -= 8; } /** * idmef_target_print: * @ptr: Pointer to an idmef_target_t object. * @fd: Pointer to a #prelude_io_t object where to print @ptr to. * * This function will convert @ptr to a string suitable for writing, * and write it to the provided @fd descriptor. */ void idmef_target_print(idmef_target_t *ptr, prelude_io_t *fd) { if ( ! ptr ) return; indent += 8; { prelude_string_t *field; const char tmp[] = "ident: "; field = idmef_target_get_ident(ptr); if ( field ) { print_indent(fd); prelude_io_write(fd, tmp, sizeof(tmp) - 1); print_string(field, fd); prelude_io_write(fd, "\n", sizeof("\n") - 1); } } { int i = idmef_target_get_decoy(ptr); { print_indent(fd); prelude_io_write(fd, "decoy: ", sizeof("decoy: ") - 1); print_enum(idmef_target_decoy_to_string(i), i, fd); prelude_io_write(fd, "\n", sizeof("\n") - 1); } } { prelude_string_t *field; const char tmp[] = "interface: "; field = idmef_target_get_interface(ptr); if ( field ) { print_indent(fd); prelude_io_write(fd, tmp, sizeof(tmp) - 1); print_string(field, fd); prelude_io_write(fd, "\n", sizeof("\n") - 1); } } { idmef_node_t *field; field = idmef_target_get_node(ptr); if ( field ) { print_indent(fd); prelude_io_write(fd, "node:\n", sizeof("node:\n") - 1); idmef_node_print(field, fd); } } { idmef_user_t *field; field = idmef_target_get_user(ptr); if ( field ) { print_indent(fd); prelude_io_write(fd, "user:\n", sizeof("user:\n") - 1); idmef_user_print(field, fd); } } { idmef_process_t *field; field = idmef_target_get_process(ptr); if ( field ) { print_indent(fd); prelude_io_write(fd, "process:\n", sizeof("process:\n") - 1); idmef_process_print(field, fd); } } { idmef_service_t *field; field = idmef_target_get_service(ptr); if ( field ) { print_indent(fd); prelude_io_write(fd, "service:\n", sizeof("service:\n") - 1); idmef_service_print(field, fd); } } { char buf[128]; idmef_file_t *elem = NULL; int cnt = 0, len; while ( (elem = idmef_target_get_next_file(ptr, elem)) ) { print_indent(fd); len = snprintf(buf, sizeof(buf), "file(%d): \n", cnt); prelude_io_write(fd, buf, len); idmef_file_print(elem, fd); cnt++; } } indent -= 8; } /** * idmef_analyzer_print: * @ptr: Pointer to an idmef_analyzer_t object. * @fd: Pointer to a #prelude_io_t object where to print @ptr to. * * This function will convert @ptr to a string suitable for writing, * and write it to the provided @fd descriptor. */ void idmef_analyzer_print(idmef_analyzer_t *ptr, prelude_io_t *fd) { if ( ! ptr ) return; indent += 8; { prelude_string_t *field; const char tmp[] = "analyzerid: "; field = idmef_analyzer_get_analyzerid(ptr); if ( field ) { print_indent(fd); prelude_io_write(fd, tmp, sizeof(tmp) - 1); print_string(field, fd); prelude_io_write(fd, "\n", sizeof("\n") - 1); } } { prelude_string_t *field; const char tmp[] = "name: "; field = idmef_analyzer_get_name(ptr); if ( field ) { print_indent(fd); prelude_io_write(fd, tmp, sizeof(tmp) - 1); print_string(field, fd); prelude_io_write(fd, "\n", sizeof("\n") - 1); } } { prelude_string_t *field; const char tmp[] = "manufacturer: "; field = idmef_analyzer_get_manufacturer(ptr); if ( field ) { print_indent(fd); prelude_io_write(fd, tmp, sizeof(tmp) - 1); print_string(field, fd); prelude_io_write(fd, "\n", sizeof("\n") - 1); } } { prelude_string_t *field; const char tmp[] = "model: "; field = idmef_analyzer_get_model(ptr); if ( field ) { print_indent(fd); prelude_io_write(fd, tmp, sizeof(tmp) - 1); print_string(field, fd); prelude_io_write(fd, "\n", sizeof("\n") - 1); } } { prelude_string_t *field; const char tmp[] = "version: "; field = idmef_analyzer_get_version(ptr); if ( field ) { print_indent(fd); prelude_io_write(fd, tmp, sizeof(tmp) - 1); print_string(field, fd); prelude_io_write(fd, "\n", sizeof("\n") - 1); } } { prelude_string_t *field; const char tmp[] = "class: "; field = idmef_analyzer_get_class(ptr); if ( field ) { print_indent(fd); prelude_io_write(fd, tmp, sizeof(tmp) - 1); print_string(field, fd); prelude_io_write(fd, "\n", sizeof("\n") - 1); } } { prelude_string_t *field; const char tmp[] = "ostype: "; field = idmef_analyzer_get_ostype(ptr); if ( field ) { print_indent(fd); prelude_io_write(fd, tmp, sizeof(tmp) - 1); print_string(field, fd); prelude_io_write(fd, "\n", sizeof("\n") - 1); } } { prelude_string_t *field; const char tmp[] = "osversion: "; field = idmef_analyzer_get_osversion(ptr); if ( field ) { print_indent(fd); prelude_io_write(fd, tmp, sizeof(tmp) - 1); print_string(field, fd); prelude_io_write(fd, "\n", sizeof("\n") - 1); } } { idmef_node_t *field; field = idmef_analyzer_get_node(ptr); if ( field ) { print_indent(fd); prelude_io_write(fd, "node:\n", sizeof("node:\n") - 1); idmef_node_print(field, fd); } } { idmef_process_t *field; field = idmef_analyzer_get_process(ptr); if ( field ) { print_indent(fd); prelude_io_write(fd, "process:\n", sizeof("process:\n") - 1); idmef_process_print(field, fd); } } indent -= 8; } /** * idmef_alertident_print: * @ptr: Pointer to an idmef_alertident_t object. * @fd: Pointer to a #prelude_io_t object where to print @ptr to. * * This function will convert @ptr to a string suitable for writing, * and write it to the provided @fd descriptor. */ void idmef_alertident_print(idmef_alertident_t *ptr, prelude_io_t *fd) { if ( ! ptr ) return; indent += 8; { prelude_string_t *field; const char tmp[] = "alertident: "; field = idmef_alertident_get_alertident(ptr); if ( field ) { print_indent(fd); prelude_io_write(fd, tmp, sizeof(tmp) - 1); print_string(field, fd); prelude_io_write(fd, "\n", sizeof("\n") - 1); } } { prelude_string_t *field; const char tmp[] = "analyzerid: "; field = idmef_alertident_get_analyzerid(ptr); if ( field ) { print_indent(fd); prelude_io_write(fd, tmp, sizeof(tmp) - 1); print_string(field, fd); prelude_io_write(fd, "\n", sizeof("\n") - 1); } } indent -= 8; } /** * idmef_impact_print: * @ptr: Pointer to an idmef_impact_t object. * @fd: Pointer to a #prelude_io_t object where to print @ptr to. * * This function will convert @ptr to a string suitable for writing, * and write it to the provided @fd descriptor. */ void idmef_impact_print(idmef_impact_t *ptr, prelude_io_t *fd) { if ( ! ptr ) return; indent += 8; { int *i = idmef_impact_get_severity(ptr); if ( i ) { print_indent(fd); prelude_io_write(fd, "severity: ", sizeof("severity: ") - 1); print_enum(idmef_impact_severity_to_string(*i), *i, fd); prelude_io_write(fd, "\n", sizeof("\n") - 1); } } { int *i = idmef_impact_get_completion(ptr); if ( i ) { print_indent(fd); prelude_io_write(fd, "completion: ", sizeof("completion: ") - 1); print_enum(idmef_impact_completion_to_string(*i), *i, fd); prelude_io_write(fd, "\n", sizeof("\n") - 1); } } { int i = idmef_impact_get_type(ptr); { print_indent(fd); prelude_io_write(fd, "type: ", sizeof("type: ") - 1); print_enum(idmef_impact_type_to_string(i), i, fd); prelude_io_write(fd, "\n", sizeof("\n") - 1); } } { prelude_string_t *field; const char tmp[] = "description: "; field = idmef_impact_get_description(ptr); if ( field ) { print_indent(fd); prelude_io_write(fd, tmp, sizeof(tmp) - 1); print_string(field, fd); prelude_io_write(fd, "\n", sizeof("\n") - 1); } } indent -= 8; } /** * idmef_action_print: * @ptr: Pointer to an idmef_action_t object. * @fd: Pointer to a #prelude_io_t object where to print @ptr to. * * This function will convert @ptr to a string suitable for writing, * and write it to the provided @fd descriptor. */ void idmef_action_print(idmef_action_t *ptr, prelude_io_t *fd) { if ( ! ptr ) return; indent += 8; { int i = idmef_action_get_category(ptr); { print_indent(fd); prelude_io_write(fd, "category: ", sizeof("category: ") - 1); print_enum(idmef_action_category_to_string(i), i, fd); prelude_io_write(fd, "\n", sizeof("\n") - 1); } } { prelude_string_t *field; const char tmp[] = "description: "; field = idmef_action_get_description(ptr); if ( field ) { print_indent(fd); prelude_io_write(fd, tmp, sizeof(tmp) - 1); print_string(field, fd); prelude_io_write(fd, "\n", sizeof("\n") - 1); } } indent -= 8; } /** * idmef_confidence_print: * @ptr: Pointer to an idmef_confidence_t object. * @fd: Pointer to a #prelude_io_t object where to print @ptr to. * * This function will convert @ptr to a string suitable for writing, * and write it to the provided @fd descriptor. */ void idmef_confidence_print(idmef_confidence_t *ptr, prelude_io_t *fd) { if ( ! ptr ) return; indent += 8; { int i = idmef_confidence_get_rating(ptr); { print_indent(fd); prelude_io_write(fd, "rating: ", sizeof("rating: ") - 1); print_enum(idmef_confidence_rating_to_string(i), i, fd); prelude_io_write(fd, "\n", sizeof("\n") - 1); } } print_indent(fd); prelude_io_write(fd, "confidence: ", sizeof("confidence: ") - 1); print_float(idmef_confidence_get_confidence(ptr), fd); prelude_io_write(fd, "\n", sizeof("\n") - 1); indent -= 8; } /** * idmef_assessment_print: * @ptr: Pointer to an idmef_assessment_t object. * @fd: Pointer to a #prelude_io_t object where to print @ptr to. * * This function will convert @ptr to a string suitable for writing, * and write it to the provided @fd descriptor. */ void idmef_assessment_print(idmef_assessment_t *ptr, prelude_io_t *fd) { if ( ! ptr ) return; indent += 8; { idmef_impact_t *field; field = idmef_assessment_get_impact(ptr); if ( field ) { print_indent(fd); prelude_io_write(fd, "impact:\n", sizeof("impact:\n") - 1); idmef_impact_print(field, fd); } } { char buf[128]; idmef_action_t *elem = NULL; int cnt = 0, len; while ( (elem = idmef_assessment_get_next_action(ptr, elem)) ) { print_indent(fd); len = snprintf(buf, sizeof(buf), "action(%d): \n", cnt); prelude_io_write(fd, buf, len); idmef_action_print(elem, fd); cnt++; } } { idmef_confidence_t *field; field = idmef_assessment_get_confidence(ptr); if ( field ) { print_indent(fd); prelude_io_write(fd, "confidence:\n", sizeof("confidence:\n") - 1); idmef_confidence_print(field, fd); } } indent -= 8; } /** * idmef_tool_alert_print: * @ptr: Pointer to an idmef_tool_alert_t object. * @fd: Pointer to a #prelude_io_t object where to print @ptr to. * * This function will convert @ptr to a string suitable for writing, * and write it to the provided @fd descriptor. */ void idmef_tool_alert_print(idmef_tool_alert_t *ptr, prelude_io_t *fd) { if ( ! ptr ) return; indent += 8; { prelude_string_t *field; const char tmp[] = "name: "; field = idmef_tool_alert_get_name(ptr); if ( field ) { print_indent(fd); prelude_io_write(fd, tmp, sizeof(tmp) - 1); print_string(field, fd); prelude_io_write(fd, "\n", sizeof("\n") - 1); } } { prelude_string_t *field; const char tmp[] = "command: "; field = idmef_tool_alert_get_command(ptr); if ( field ) { print_indent(fd); prelude_io_write(fd, tmp, sizeof(tmp) - 1); print_string(field, fd); prelude_io_write(fd, "\n", sizeof("\n") - 1); } } { char buf[128]; idmef_alertident_t *elem = NULL; int cnt = 0, len; while ( (elem = idmef_tool_alert_get_next_alertident(ptr, elem)) ) { print_indent(fd); len = snprintf(buf, sizeof(buf), "alertident(%d): \n", cnt); prelude_io_write(fd, buf, len); idmef_alertident_print(elem, fd); cnt++; } } indent -= 8; } /** * idmef_correlation_alert_print: * @ptr: Pointer to an idmef_correlation_alert_t object. * @fd: Pointer to a #prelude_io_t object where to print @ptr to. * * This function will convert @ptr to a string suitable for writing, * and write it to the provided @fd descriptor. */ void idmef_correlation_alert_print(idmef_correlation_alert_t *ptr, prelude_io_t *fd) { if ( ! ptr ) return; indent += 8; { prelude_string_t *field; const char tmp[] = "name: "; field = idmef_correlation_alert_get_name(ptr); if ( field ) { print_indent(fd); prelude_io_write(fd, tmp, sizeof(tmp) - 1); print_string(field, fd); prelude_io_write(fd, "\n", sizeof("\n") - 1); } } { char buf[128]; idmef_alertident_t *elem = NULL; int cnt = 0, len; while ( (elem = idmef_correlation_alert_get_next_alertident(ptr, elem)) ) { print_indent(fd); len = snprintf(buf, sizeof(buf), "alertident(%d): \n", cnt); prelude_io_write(fd, buf, len); idmef_alertident_print(elem, fd); cnt++; } } indent -= 8; } /** * idmef_overflow_alert_print: * @ptr: Pointer to an idmef_overflow_alert_t object. * @fd: Pointer to a #prelude_io_t object where to print @ptr to. * * This function will convert @ptr to a string suitable for writing, * and write it to the provided @fd descriptor. */ void idmef_overflow_alert_print(idmef_overflow_alert_t *ptr, prelude_io_t *fd) { if ( ! ptr ) return; indent += 8; { prelude_string_t *field; const char tmp[] = "program: "; field = idmef_overflow_alert_get_program(ptr); if ( field ) { print_indent(fd); prelude_io_write(fd, tmp, sizeof(tmp) - 1); print_string(field, fd); prelude_io_write(fd, "\n", sizeof("\n") - 1); } } { uint32_t *field; const char tmp[] = "size: "; field = idmef_overflow_alert_get_size(ptr); if ( field ) { print_indent(fd); prelude_io_write(fd, tmp, sizeof(tmp) - 1); print_uint32(*field, fd); prelude_io_write(fd, "\n", sizeof("\n") - 1); } } { idmef_data_t *field; const char tmp[] = "buffer: "; field = idmef_overflow_alert_get_buffer(ptr); if ( field ) { print_indent(fd); prelude_io_write(fd, tmp, sizeof(tmp) - 1); print_data(field, fd); prelude_io_write(fd, "\n", sizeof("\n") - 1); } } indent -= 8; } /** * idmef_alert_print: * @ptr: Pointer to an idmef_alert_t object. * @fd: Pointer to a #prelude_io_t object where to print @ptr to. * * This function will convert @ptr to a string suitable for writing, * and write it to the provided @fd descriptor. */ void idmef_alert_print(idmef_alert_t *ptr, prelude_io_t *fd) { if ( ! ptr ) return; indent += 8; { prelude_string_t *field; const char tmp[] = "messageid: "; field = idmef_alert_get_messageid(ptr); if ( field ) { print_indent(fd); prelude_io_write(fd, tmp, sizeof(tmp) - 1); print_string(field, fd); prelude_io_write(fd, "\n", sizeof("\n") - 1); } } { char buf[128]; idmef_analyzer_t *elem = NULL; int cnt = 0, len; while ( (elem = idmef_alert_get_next_analyzer(ptr, elem)) ) { print_indent(fd); len = snprintf(buf, sizeof(buf), "analyzer(%d): \n", cnt); prelude_io_write(fd, buf, len); idmef_analyzer_print(elem, fd); cnt++; } } { idmef_time_t *field; const char tmp[] = "create_time: "; field = idmef_alert_get_create_time(ptr); if ( field ) { print_indent(fd); prelude_io_write(fd, tmp, sizeof(tmp) - 1); print_time(field, fd); prelude_io_write(fd, "\n", sizeof("\n") - 1); } } { idmef_classification_t *field; field = idmef_alert_get_classification(ptr); if ( field ) { print_indent(fd); prelude_io_write(fd, "classification:\n", sizeof("classification:\n") - 1); idmef_classification_print(field, fd); } } { idmef_time_t *field; const char tmp[] = "detect_time: "; field = idmef_alert_get_detect_time(ptr); if ( field ) { print_indent(fd); prelude_io_write(fd, tmp, sizeof(tmp) - 1); print_time(field, fd); prelude_io_write(fd, "\n", sizeof("\n") - 1); } } { idmef_time_t *field; const char tmp[] = "analyzer_time: "; field = idmef_alert_get_analyzer_time(ptr); if ( field ) { print_indent(fd); prelude_io_write(fd, tmp, sizeof(tmp) - 1); print_time(field, fd); prelude_io_write(fd, "\n", sizeof("\n") - 1); } } { char buf[128]; idmef_source_t *elem = NULL; int cnt = 0, len; while ( (elem = idmef_alert_get_next_source(ptr, elem)) ) { print_indent(fd); len = snprintf(buf, sizeof(buf), "source(%d): \n", cnt); prelude_io_write(fd, buf, len); idmef_source_print(elem, fd); cnt++; } } { char buf[128]; idmef_target_t *elem = NULL; int cnt = 0, len; while ( (elem = idmef_alert_get_next_target(ptr, elem)) ) { print_indent(fd); len = snprintf(buf, sizeof(buf), "target(%d): \n", cnt); prelude_io_write(fd, buf, len); idmef_target_print(elem, fd); cnt++; } } { idmef_assessment_t *field; field = idmef_alert_get_assessment(ptr); if ( field ) { print_indent(fd); prelude_io_write(fd, "assessment:\n", sizeof("assessment:\n") - 1); idmef_assessment_print(field, fd); } } { char buf[128]; idmef_additional_data_t *elem = NULL; int cnt = 0, len; while ( (elem = idmef_alert_get_next_additional_data(ptr, elem)) ) { print_indent(fd); len = snprintf(buf, sizeof(buf), "additional_data(%d): \n", cnt); prelude_io_write(fd, buf, len); idmef_additional_data_print(elem, fd); cnt++; } } switch ( idmef_alert_get_type(ptr) ) { case IDMEF_ALERT_TYPE_TOOL: print_indent(fd); prelude_io_write(fd, "tool_alert:\n", sizeof("tool_alert:\n") - 1); idmef_tool_alert_print(idmef_alert_get_tool_alert(ptr), fd); break; case IDMEF_ALERT_TYPE_CORRELATION: print_indent(fd); prelude_io_write(fd, "correlation_alert:\n", sizeof("correlation_alert:\n") - 1); idmef_correlation_alert_print(idmef_alert_get_correlation_alert(ptr), fd); break; case IDMEF_ALERT_TYPE_OVERFLOW: print_indent(fd); prelude_io_write(fd, "overflow_alert:\n", sizeof("overflow_alert:\n") - 1); idmef_overflow_alert_print(idmef_alert_get_overflow_alert(ptr), fd); break; default: break; } indent -= 8; } /** * idmef_heartbeat_print: * @ptr: Pointer to an idmef_heartbeat_t object. * @fd: Pointer to a #prelude_io_t object where to print @ptr to. * * This function will convert @ptr to a string suitable for writing, * and write it to the provided @fd descriptor. */ void idmef_heartbeat_print(idmef_heartbeat_t *ptr, prelude_io_t *fd) { if ( ! ptr ) return; indent += 8; { prelude_string_t *field; const char tmp[] = "messageid: "; field = idmef_heartbeat_get_messageid(ptr); if ( field ) { print_indent(fd); prelude_io_write(fd, tmp, sizeof(tmp) - 1); print_string(field, fd); prelude_io_write(fd, "\n", sizeof("\n") - 1); } } { char buf[128]; idmef_analyzer_t *elem = NULL; int cnt = 0, len; while ( (elem = idmef_heartbeat_get_next_analyzer(ptr, elem)) ) { print_indent(fd); len = snprintf(buf, sizeof(buf), "analyzer(%d): \n", cnt); prelude_io_write(fd, buf, len); idmef_analyzer_print(elem, fd); cnt++; } } { idmef_time_t *field; const char tmp[] = "create_time: "; field = idmef_heartbeat_get_create_time(ptr); if ( field ) { print_indent(fd); prelude_io_write(fd, tmp, sizeof(tmp) - 1); print_time(field, fd); prelude_io_write(fd, "\n", sizeof("\n") - 1); } } { idmef_time_t *field; const char tmp[] = "analyzer_time: "; field = idmef_heartbeat_get_analyzer_time(ptr); if ( field ) { print_indent(fd); prelude_io_write(fd, tmp, sizeof(tmp) - 1); print_time(field, fd); prelude_io_write(fd, "\n", sizeof("\n") - 1); } } { uint32_t *field; const char tmp[] = "heartbeat_interval: "; field = idmef_heartbeat_get_heartbeat_interval(ptr); if ( field ) { print_indent(fd); prelude_io_write(fd, tmp, sizeof(tmp) - 1); print_uint32(*field, fd); prelude_io_write(fd, "\n", sizeof("\n") - 1); } } { char buf[128]; idmef_additional_data_t *elem = NULL; int cnt = 0, len; while ( (elem = idmef_heartbeat_get_next_additional_data(ptr, elem)) ) { print_indent(fd); len = snprintf(buf, sizeof(buf), "additional_data(%d): \n", cnt); prelude_io_write(fd, buf, len); idmef_additional_data_print(elem, fd); cnt++; } } indent -= 8; } /** * idmef_message_print: * @ptr: Pointer to an idmef_message_t object. * @fd: Pointer to a #prelude_io_t object where to print @ptr to. * * This function will convert @ptr to a string suitable for writing, * and write it to the provided @fd descriptor. */ void idmef_message_print(idmef_message_t *ptr, prelude_io_t *fd) { if ( ! ptr ) return; { prelude_string_t *field; const char tmp[] = "version: "; field = idmef_message_get_version(ptr); if ( field ) { print_indent(fd); prelude_io_write(fd, tmp, sizeof(tmp) - 1); print_string(field, fd); prelude_io_write(fd, "\n", sizeof("\n") - 1); } } switch ( idmef_message_get_type(ptr) ) { case IDMEF_MESSAGE_TYPE_ALERT: print_indent(fd); prelude_io_write(fd, "alert:\n", sizeof("alert:\n") - 1); idmef_alert_print(idmef_message_get_alert(ptr), fd); break; case IDMEF_MESSAGE_TYPE_HEARTBEAT: print_indent(fd); prelude_io_write(fd, "heartbeat:\n", sizeof("heartbeat:\n") - 1); idmef_heartbeat_print(idmef_message_get_heartbeat(ptr), fd); break; default: break; } } libprelude-1.0.0/src/idmef-path.c0000664000076400007640000011413311325615276013556 00000000000000/***** * * Copyright (C) 2002, 2003 PreludeIDS Technologies. All Rights Reserved. * Author: Krzysztof Zaraska * Yoann Vandoorselaere * * This file is part of the Prelude library. * * 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; see the file COPYING. If not, write to * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. * *****/ #include "libmissing.h" #include #include #include #include #include #include #include #include "glthread/lock.h" #include "prelude-hash.h" #include "prelude-log.h" #include "prelude-inttypes.h" #include "prelude-string.h" #define PRELUDE_ERROR_SOURCE_DEFAULT PRELUDE_ERROR_SOURCE_IDMEF_PATH #include "prelude-error.h" #include "idmef-time.h" #include "idmef-data.h" #include "idmef-class.h" #include "idmef-value.h" #include "idmef-tree-wrap.h" #include "idmef-path.h" #include "prelude-string.h" #include "prelude-linked-object.h" #include "common.h" #define MAX_DEPTH 16 #define MAX_NAME_LEN 128 #define HASH_DEFAULT_SIZE 128 #define INDEX_UNDEFINED INT_MIN #define INDEX_FORBIDDEN (INT_MIN + 1) typedef struct idmef_path_element { int index; idmef_class_id_t class; idmef_class_child_id_t position; idmef_value_type_id_t value_type; } idmef_path_element_t; struct idmef_path { gl_lock_t mutex; char name[MAX_NAME_LEN]; int refcount; unsigned int depth; idmef_path_element_t elem[MAX_DEPTH]; }; typedef struct { const idmef_path_t *path; idmef_message_t *message; prelude_bool_t reversed; prelude_bool_t delete_list; } value_list_t; static int do_idmef_value_iterate(idmef_value_t *value, value_list_t *vl); static prelude_bool_t flush_cache = FALSE; static prelude_hash_t *cached_path = NULL; static gl_lock_t cached_path_mutex = gl_lock_initializer; static void path_lock_cb(void *data) { idmef_path_t *path = data; gl_lock_lock(path->mutex); } static void path_reinit_cb(void *data) { idmef_path_t *path = data; gl_lock_init(path->mutex); } static void path_unlock_cb(void *data) { idmef_path_t *path = data; gl_lock_unlock(path->mutex); } static void flush_cache_if_wanted(void *ptr) { if ( flush_cache ) idmef_path_destroy(ptr); } /* * call with mutex held. */ static int initialize_path_cache_if_needed(void) { if ( cached_path ) return 0; return prelude_hash_new2(&cached_path, HASH_DEFAULT_SIZE, NULL, NULL, NULL, flush_cache_if_wanted); } static int build_name(idmef_path_t *path) { unsigned int i; const char *name; char buf[16] = { 0 }; idmef_class_id_t class; /* * we don't need gl_lock_{,un}lock since the path has no name * it means that it is not in the cache and thus, not shared */ path->name[0] = '\0'; class = IDMEF_CLASS_ID_MESSAGE; for ( i = 0; i < path->depth; i++ ) { if ( i > 0 ) strncat(path->name, ".", sizeof(path->name) - strlen(path->name)); name = idmef_path_get_name(path, i); if ( ! name ) return prelude_error(PRELUDE_ERROR_IDMEF_PATH_INTEGRITY); strncat(path->name, name, sizeof(path->name) - strlen(path->name)); if ( path->elem[i].index != INDEX_UNDEFINED && path->elem[i].index != INDEX_FORBIDDEN ) { snprintf(buf, sizeof(buf), "(%d)", path->elem[i].index); strncat(path->name, buf, sizeof(path->name) - strlen(path->name)); } class = idmef_class_get_child_class(class, path->elem[i].position); if ( class < 0 && i < path->depth - 1 ) return prelude_error(PRELUDE_ERROR_IDMEF_PATH_INTEGRITY); } return 0; } static int idmef_path_get_internal(idmef_value_t **ret, const idmef_path_t *path, unsigned int depth, void *parent, idmef_class_id_t parent_class); static int idmef_path_get_list_internal(idmef_value_t **value_list, const idmef_path_t *path, int depth, prelude_list_t *list, idmef_class_id_t parent_class) { int ret; prelude_list_t *tmp; idmef_value_t *value; unsigned int cnt = 0; ret = idmef_value_new_list(value_list); if ( ret < 0 ) return ret; prelude_list_for_each(list, tmp) { value = NULL; if ( parent_class >= 0 ) ret = idmef_path_get_internal(&value, path, depth, tmp, parent_class); else { idmef_value_type_id_t type = path->elem[depth - 1].value_type; ret = idmef_value_new(&value, type, tmp); if ( ret == 0 ) { idmef_value_type_t vt; vt.id = type; vt.data.string_val = (void *) tmp; ret = idmef_value_type_ref(&vt); if ( ret < 0 ) idmef_value_destroy(value); else ret = 1; } } if ( ret == 0 ) continue; if ( ret < 0 ) { idmef_value_destroy(*value_list); return ret; } ret = idmef_value_list_add(*value_list, value); if ( ret < 0 ) { idmef_value_destroy(*value_list); return ret; } cnt++; } if ( ! cnt ) idmef_value_destroy(*value_list); return cnt; } static int idmef_path_get_nth_internal(idmef_value_t **value, const idmef_path_t *path, unsigned int depth, prelude_list_t *list, idmef_class_id_t parent_class, int which) { int cnt = 0; prelude_list_t *tmp; if ( which >= 0 ) { prelude_list_for_each(list, tmp) { if ( cnt++ == which ) return idmef_path_get_internal(value, path, depth, tmp, parent_class); } } else { which = -which; which--; /* With negative value, -1 is the base, translate to 0 */ prelude_list_for_each_reversed(list, tmp) { if ( cnt++ == which ) return idmef_path_get_internal(value, path, depth, tmp, parent_class); } } return 0; } static int idmef_path_get_internal(idmef_value_t **value, const idmef_path_t *path, unsigned int depth, void *parent, idmef_class_id_t parent_class) { void *child; int ret, which; idmef_class_id_t child_class; idmef_class_child_id_t child_id; if ( depth < path->depth ) { child_id = path->elem[depth].position; ret = idmef_class_get_child(parent, parent_class, child_id, &child); if ( ret < 0 ) return ret; if ( ! child ) return 0; child_class = idmef_class_get_child_class(parent_class, child_id); which = path->elem[depth].index; if ( which == INDEX_FORBIDDEN ) return idmef_path_get_internal(value, path, depth + 1, child, child_class); if ( which == INDEX_UNDEFINED || which == IDMEF_LIST_APPEND || which == IDMEF_LIST_PREPEND ) return idmef_path_get_list_internal(value, path, depth + 1, child, child_class); return idmef_path_get_nth_internal(value, path, depth + 1, child, child_class, which); } if ( parent_class < 0 || (path->depth > 0 && path->elem[path->depth - 1].value_type == IDMEF_VALUE_TYPE_ENUM) ) { *value = parent; return 1; } ret = (ret = idmef_value_new_class(value, parent_class, parent) < 0) ? ret : 1; if ( ret == 1 ) idmef_class_ref(parent_class, parent); return ret; } static void delete_listed_child(void *parent, idmef_class_id_t class, const idmef_path_element_t *elem) { int ret; void *obj; prelude_list_t *head, *tmp, *bkp; ret = idmef_class_get_child(parent, class, elem->position, (void *) &head); if ( ret < 0 ) return; prelude_list_for_each_safe(head, tmp, bkp) { obj = prelude_linked_object_get_object(tmp); /* * The object might be referenced from other place than * this message, in which case idmef_class_destroy() * will only decrease it's reference count. * * We manually call prelude_list_del_init() in order to * disassociate the object from the message. */ prelude_list_del_init(tmp); idmef_class_destroy(idmef_class_get_child_class(class, elem->position), obj); } } static int _idmef_path_set(const idmef_path_t *path, idmef_message_t *message, idmef_value_t *value, prelude_bool_t *delete_list) { size_t i; void *ptr; int ret, index; idmef_value_type_id_t tid; const idmef_path_element_t *elem; idmef_class_id_t class, parent_class; ptr = message; parent_class = class = IDMEF_CLASS_ID_MESSAGE; for ( i = 0; i < path->depth; i++ ) { elem = &path->elem[i]; index = elem->index; /* * We don't want to allow the user to set a single field within a listed * object without specifying the object index: alert.source.interface = "blah". */ if ( i + 1 < path->depth && index == INDEX_UNDEFINED && idmef_class_is_child_list(class, elem->position) ) return prelude_error_verbose(PRELUDE_ERROR_IDMEF_PATH_MISS_INDEX, "IDMEF path element '%s' need indexing", idmef_class_get_name(elem->class)); if ( index == INDEX_UNDEFINED && idmef_class_is_child_list(class, elem->position) ) { index = IDMEF_LIST_APPEND; if ( *delete_list ) { *delete_list = FALSE; delete_listed_child(ptr, class, elem); if ( ! value ) return 0; } } parent_class = class; if ( value || i < (path->depth - 1) ) { ret = idmef_class_new_child(ptr, class, elem->position, index, &ptr); if ( ret < 0 ) return ret; class = idmef_class_get_child_class(class, elem->position); assert( ! (class < 0 && i < path->depth - 1) ); } } if ( ! value ) return idmef_class_destroy_child(ptr, parent_class, path->elem[path->depth - 1].position, path->elem[path->depth - 1].index); tid = idmef_class_get_child_value_type(parent_class, path->elem[path->depth - 1].position); return _idmef_value_copy_internal(value, tid, class, ptr); } static int unroll_listed_value(idmef_value_t *value, void *extra) { value_list_t *val = extra; if ( idmef_value_is_list(value) ) return do_idmef_value_iterate(value, extra); return _idmef_path_set(val->path, val->message, value, &val->delete_list); } static int do_idmef_value_iterate(idmef_value_t *value, value_list_t *vl) { int ret; if ( vl->reversed ) ret = idmef_value_iterate_reversed(value, unroll_listed_value, vl); else ret = idmef_value_iterate(value, unroll_listed_value, vl); return ret; } /** * idmef_path_get: * @path: Pointer to a #idmef_path_t object. * @message: Pointer to a #idmef_message_t object. * @ret: Address where to store the retrieved #idmef_value_t. * * This function retrieves the value for @path within @message, * and stores it into the provided @ret address of type #idmef_value_t. * * Returns: The number of element retrieved, or a negative value if an error occured. */ int idmef_path_get(const idmef_path_t *path, idmef_message_t *message, idmef_value_t **ret) { return idmef_path_get_internal(ret, path, 0, message, IDMEF_CLASS_ID_MESSAGE); } /** * idmef_path_set: * @path: Pointer to a #idmef_path_t object. * @message: Pointer to a #idmef_message_t object. * @value: Pointer to a #idmef_value_t object. * * This function sets the provided @value for @path within @message. * * Returns: 0 on success, a negative value if an error occured. */ int idmef_path_set(const idmef_path_t *path, idmef_message_t *message, idmef_value_t *value) { prelude_bool_t delete_list = TRUE; if ( path->depth < 1 ) return prelude_error_verbose(PRELUDE_ERROR_GENERIC, "Path with depth of 0 are not allowed"); /* * Allow raw list copy (example: alert.source = alert.source, * alert.source(>>) = alert.source, alert.source(<<) = alert.source. */ if ( value && idmef_value_is_list(value) ) { value_list_t vl; vl.path = path; vl.message = message; vl.delete_list = TRUE; vl.reversed = (path->elem[path->depth - 1].index == IDMEF_LIST_PREPEND) ? TRUE : FALSE; return do_idmef_value_iterate(value, &vl); } return _idmef_path_set(path, message, value, &delete_list); } /* * idmef_object_create returns: * -1 if something wrong happen * 0 for a new empty object * 1 for an existing object already in the cache */ static int idmef_path_create(idmef_path_t **path, const char *buffer) { int ret; gl_lock_lock(cached_path_mutex); ret = initialize_path_cache_if_needed(); if ( ret < 0 ) { gl_lock_unlock(cached_path_mutex); return ret; } *path = prelude_hash_get(cached_path, buffer); gl_lock_unlock(cached_path_mutex); if ( *path ) return 1; *path = calloc(1, sizeof(**path)); if ( ! *path ) return prelude_error_from_errno(errno); (*path)->refcount = 1; gl_lock_init((*path)->mutex); return 0; } /* * return 1 if we are reading the last object. * return 0 if reading an object. * return -1 if there is no more things to read. */ static int parse_path_token(char **sptr, char **out) { char *buf = *sptr, *ptr; if ( *buf == '\0' ) *buf++ = '.'; *out = buf; ptr = strchr(buf, '.'); if ( ! ptr ) return -1; *ptr = '\0'; *sptr = ptr; return 0; } static int idmef_path_parse_new(idmef_path_t *path, const char *buffer) { size_t len; int index = -1, is_last; unsigned int depth = 0; char *endptr, *ptr, *ptr2; idmef_class_child_id_t child = 0; idmef_class_id_t class, prev_class = 0; idmef_value_type_id_t vtype; len = strlen(buffer) + 1; if ( len >= sizeof(path->name) ) return prelude_error(PRELUDE_ERROR_IDMEF_PATH_LENGTH); memcpy(path->name, buffer, len); ptr = NULL; endptr = path->name; class = IDMEF_CLASS_ID_MESSAGE; do { index = INDEX_UNDEFINED; is_last = parse_path_token(&endptr, &ptr); ptr2 = strchr(ptr, '('); if ( ptr2 ) { *ptr2 = '\0'; if ( strncmp(ptr2 + 1, "<<", 2) == 0 ) index = IDMEF_LIST_PREPEND; else if ( strncmp(ptr2 + 1, ">>", 2) == 0 ) index = IDMEF_LIST_APPEND; else if ( strncmp(ptr2 + 1, "*", 1) != 0 ) index = strtol(ptr2 + 1, NULL, 0); } child = idmef_class_find_child(class, ptr); if ( child < 0 ) return child; path->elem[depth].position = child; if ( ptr2 ) *ptr2 = '('; if ( index == INDEX_UNDEFINED ) path->elem[depth].index = idmef_class_is_child_list(class, child) ? INDEX_UNDEFINED : INDEX_FORBIDDEN; else { if ( ! idmef_class_is_child_list(class, child) ) return prelude_error_verbose(PRELUDE_ERROR_IDMEF_PATH_INDEX_FORBIDDEN, "Invalid IDMEF path element '%s': indexing not supported", ptr); path->elem[depth].index = index; } prev_class = class; /* The last object may not be a structure */ vtype = path->elem[depth].value_type = idmef_class_get_child_value_type(class, child); if ( vtype != IDMEF_VALUE_TYPE_CLASS && ! is_last ) return prelude_error_verbose(PRELUDE_ERROR_GENERIC, "IDMEF element '%s' is a leaf and thus has no child '%s'", ptr, endptr + 1); class = path->elem[depth].class = idmef_class_get_child_class(class, child); if ( ++depth == MAX_DEPTH ) return prelude_error(PRELUDE_ERROR_IDMEF_PATH_DEPTH); } while ( ! is_last ); path->depth = depth; return 0; } /** * idmef_path_new_fast: * @path: Address where to store the created #idmef_path_t object. * @buffer: Name of the path to create. * * Creates a #idmef_path_t object pointing to @buffer, and stores it within @path. * * Returns: 0 on success, or a negative value if an error occured. */ int idmef_path_new_fast(idmef_path_t **path, const char *buffer) { int ret; prelude_return_val_if_fail(buffer, prelude_error(PRELUDE_ERROR_ASSERTION)); ret = idmef_path_create(path, buffer); if ( ret < 0 ) return ret; if ( ret == 1 ) { idmef_path_ref(*path); return 0; } if ( *buffer == '\0' ) (*path)->elem[0].class = IDMEF_CLASS_ID_MESSAGE; else { ret = idmef_path_parse_new(*path, buffer); if ( ret < 0 ) { gl_lock_destroy((*path)->mutex); free(*path); return ret; } } gl_lock_lock(cached_path_mutex); if ( prelude_hash_set(cached_path, (*path)->name, *path) < 0 ) { gl_lock_destroy((*path)->mutex); free(*path); gl_lock_unlock(cached_path_mutex); return ret; } gl_lock_unlock(cached_path_mutex); idmef_path_ref(*path); return 0; } /** * idmef_path_new_v: * @path: Address where to store the created #idmef_path_t object. * @format: Format string. * @args: Pointer to a variable argument list. * * Creates an #idmef_path_t object pointing to the provided format * string @format and @args, and stores it within @path. * * Returns: 0 on success, or a negative value if an error occured. */ int idmef_path_new_v(idmef_path_t **path, const char *format, va_list args) { int ret; char buffer[MAX_NAME_LEN]; prelude_return_val_if_fail(format, prelude_error(PRELUDE_ERROR_ASSERTION)); ret = vsnprintf(buffer, sizeof(buffer), format, args); if ( ret < 0 || (size_t) ret > sizeof(buffer) - 1 ) return prelude_error(PRELUDE_ERROR_IDMEF_PATH_LENGTH); return idmef_path_new_fast(path, buffer); } /** * idmef_path_new: * @path: Address where to store the created #idmef_path_t object. * @format: Format string. * @...: Arguments list. * * Creates an #idmef_path_t object pointing to the provided format * string @format and @..., and stores it within @path. * * Returns: 0 on success, or a negative value if an error occured. */ int idmef_path_new(idmef_path_t **path, const char *format, ...) { int ret; va_list args; prelude_return_val_if_fail(format, prelude_error(PRELUDE_ERROR_ASSERTION)); va_start(args, format); ret = idmef_path_new_v(path, format, args); va_end(args); return ret; } /** * idmef_path_get_class: * @path: Pointer to an #idmef_path_t object. * @depth: Depth of @path to retrieve the #idmef_class_id_t from. * * Retrieves the #idmef_class_id_t value for the element of @path * located at @depth. If depth is -1, the last element depth is addressed. * * Returns: The #idmef_class_id_t for the elemnt, or a negative value if an error occured. */ idmef_class_id_t idmef_path_get_class(const idmef_path_t *path, int depth) { prelude_return_val_if_fail(path, prelude_error(PRELUDE_ERROR_ASSERTION)); if ( depth < 0 ) depth = path->depth - 1; if ( path->depth == 0 && depth < 0 ) return IDMEF_CLASS_ID_MESSAGE; return path->elem[depth].class; } /** * idmef_path_get_value_type: * @path: Pointer to an #idmef_path_t object. * @depth: Depth of @path to retrieve the #idmef_value_type_id_t from. * * Retrieves the #idmef_value_type_id_t identifying the type of value * acceptable for this path element, for the @path element located at * @depth. If depth is -1, the last element depth is addressed. * * Returns: The #idmef_value_type_id_t for the element, or a negative value if an error occured. */ idmef_value_type_id_t idmef_path_get_value_type(const idmef_path_t *path, int depth) { prelude_return_val_if_fail(path, prelude_error(PRELUDE_ERROR_ASSERTION)); if ( depth < 0 ) depth = path->depth - 1; if ( path->depth == 0 && depth < 0 ) return IDMEF_VALUE_TYPE_CLASS; return path->elem[depth].value_type; } static inline int invalidate(idmef_path_t *path) { int ret; gl_lock_lock(path->mutex); if ( path->refcount == 1 ) { gl_lock_unlock(path->mutex); return 0; /* not cached */ } /* * We can modify the path only if the caller * is the only entity that has pointer to it. * * The path should have refcount equal to 1 or 2. * If refcount is equal to 1, it means that only the caller * has the pointer to the path, so we can modify it. * * If refcount is equal to 2, that means that the path * can also be present in the cached_path hash, * so it should be removed from the hash before modification. * If, however, refcount is 2 but the path is not present * in the hash, we cannot continue, as there exists * another entity that has pointer to the path. */ if ( path->refcount > 2 ) { gl_lock_unlock(path->mutex); return -1; } if ( path->refcount == 2 ) { gl_lock_lock(cached_path_mutex); ret = prelude_hash_elem_destroy(cached_path, path->name); gl_lock_unlock(cached_path_mutex); if ( ret == 0 ) path->refcount--; /* path was present in a hash */ else { gl_lock_unlock(path->mutex); return -1; /* path was not present in a hash and refcount != 1 */ } } gl_lock_unlock(path->mutex); return 0; /* successfully invalidated */ } /** * idmef_path_set_index: * @path: Pointer to an #idmef_path_t object. * @depth: Depth of @path to set @index for. * @index: Index for the provided element @depth. * * Modifies @index for the element located at @depth of provided @path. * This function is only applicable for element that accept listed value. * * Returns: 0 on success, a negative value if an error occured. */ int idmef_path_set_index(idmef_path_t *path, unsigned int depth, int index) { int ret; prelude_return_val_if_fail(path, prelude_error(PRELUDE_ERROR_ASSERTION)); prelude_return_val_if_fail(depth < path->depth, prelude_error(PRELUDE_ERROR_IDMEF_PATH_DEPTH)); if ( index == INDEX_FORBIDDEN ) return prelude_error(PRELUDE_ERROR_IDMEF_PATH_INDEX_RESERVED); if ( path->elem[depth].index == INDEX_FORBIDDEN ) return prelude_error(PRELUDE_ERROR_IDMEF_PATH_INDEX_FORBIDDEN); ret = invalidate(path); if ( ret < 0 ) return ret; path->elem[depth].index = index; ret = build_name(path); if ( ret < 0 ) return ret; return 0; } /** * idmef_path_undefine_index: * @path: Pointer to an #idmef_path_t object. * @depth: Depth of @path to undefine the index for. * * Modifies the element located at @depth of provided @path so that it's * index is undefined. * * This function is only applicable for element that accept listed value. * * Returns: 0 on success, a negative value if an error occured. */ int idmef_path_undefine_index(idmef_path_t *path, unsigned int depth) { prelude_return_val_if_fail(path, prelude_error(PRELUDE_ERROR_ASSERTION)); return idmef_path_set_index(path, depth, INDEX_UNDEFINED); } /** * idmef_path_get_index: * @path: Pointer to an #idmef_path_t object. * @depth: Depth of @path to retrieve the index from. * * Gets the current index for element located at @depth of @path. * This function is only applicable for element that accepts listed value. * * Returns: The element index, or a negative value if an error occured. */ int idmef_path_get_index(const idmef_path_t *path, unsigned int depth) { prelude_return_val_if_fail(path, prelude_error(PRELUDE_ERROR_ASSERTION)); prelude_return_val_if_fail(depth < path->depth, prelude_error(PRELUDE_ERROR_IDMEF_PATH_DEPTH)); if ( path->elem[depth].index == INDEX_UNDEFINED ) return prelude_error(PRELUDE_ERROR_IDMEF_PATH_INDEX_UNDEFINED); if ( path->elem[depth].index == INDEX_FORBIDDEN ) return prelude_error(PRELUDE_ERROR_IDMEF_PATH_INDEX_FORBIDDEN); return path->elem[depth].index; } /** * idmef_path_make_child: * @path: Pointer to an #idmef_path_t object. * @child_name: Name of the child element to create. * @index: Index for @child_name, if applicable. * * Modifies @path so that it points to the child node identified by @child_name, * children of the current path. That is if the path is currently pointing to * alert.classification, and @child_name is set to "text", @path will be * modified to point to alert.classification.text. * * Returns: 0 on success, or a negative value if an error occured. */ int idmef_path_make_child(idmef_path_t *path, const char *child_name, int index) { int ret; char buf[16] = { 0 }; idmef_class_id_t class; idmef_class_child_id_t child; prelude_return_val_if_fail(path, prelude_error(PRELUDE_ERROR_ASSERTION)); prelude_return_val_if_fail(child_name, prelude_error(PRELUDE_ERROR_ASSERTION)); if ( path->depth > MAX_DEPTH - 1 ) return prelude_error(PRELUDE_ERROR_IDMEF_PATH_DEPTH); class = idmef_path_get_class(path, -1); child = idmef_class_find_child(class, child_name); if ( child < 0 ) return child; ret = invalidate(path); if ( ret < 0 ) return ret; if ( index >= 0 && idmef_class_is_child_list(class, child) ) snprintf(buf, sizeof(buf), "(%d)", index); snprintf(path->name + strlen(path->name), sizeof(path->name) - strlen(path->name), "%s%s%s", (path->depth > 0) ? "." : "", child_name, buf); path->depth++; path->elem[path->depth - 1].position = child; if ( idmef_class_is_child_list(class, child) ) path->elem[path->depth - 1].index = (index < 0) ? INDEX_UNDEFINED : index; else path->elem[path->depth - 1].index = INDEX_FORBIDDEN; path->elem[path->depth - 1].class = idmef_class_get_child_class(class, child); path->elem[path->depth - 1].value_type = idmef_class_get_child_value_type(class, child); return 0; } /** * idmef_path_make_parent: * @path: Pointer to an #idmef_path_t object. * * Removes the last element of the path. That is, if @path is currently pointing to * alert.classification, @path will be modified to point to alert. * * Returns: 0 on success, or a negative value if an error occured. */ int idmef_path_make_parent(idmef_path_t *path) { int ret; char *ptr; prelude_return_val_if_fail(path, prelude_error(PRELUDE_ERROR_ASSERTION)); if ( path->depth == 0 ) return prelude_error(PRELUDE_ERROR_IDMEF_PATH_PARENT_ROOT); ret = invalidate(path); if ( ret < 0 ) return ret; path->depth--; if ( path->name[0] ) { ptr = strrchr(path->name, '.'); if ( ! ptr ) ptr = path->name; /* top-level path */ *ptr = '\0'; } return 0; } /** * idmef_path_destroy: * @path: Pointer to an #idmef_path_t object. * * Destroys the provided @path object. */ void idmef_path_destroy(idmef_path_t *path) { prelude_return_if_fail(path); gl_lock_lock(path->mutex); if ( --path->refcount ) { gl_lock_unlock(path->mutex); return; } gl_lock_unlock(path->mutex); gl_lock_destroy(path->mutex); free(path); } /** * idmef_path_ncompare: * @p1: Pointer to an #idmef_path_t object. * @p2: Pointer to another #idmef_path_t object. * @depth: Maximum depth to use for path comparison. * * Compares @p1 and @p2 elements up to @depth. * * Returns: 0 if both element match, a negative value otherwise. */ int idmef_path_ncompare(const idmef_path_t *p1, const idmef_path_t *p2, unsigned int depth) { unsigned int i; prelude_return_val_if_fail(p1, prelude_error(PRELUDE_ERROR_ASSERTION)); prelude_return_val_if_fail(p2, prelude_error(PRELUDE_ERROR_ASSERTION)); for ( i = 0; i < depth; i++ ) { if ( p1->elem[i].index != p2->elem[i].index ) return -1; if ( p1->elem[i].position - p2->elem[i].position ) return -1; } return 0; } /** * idmef_path_compare: * @p1: Pointer to an #idmef_path_t object. * @p2: Pointer to another #idmef_path_t object. * * Compares @p1 and @p2 elements. * * Returns: 0 if both element match, a negative value otherwise. */ int idmef_path_compare(const idmef_path_t *p1, const idmef_path_t *p2) { prelude_return_val_if_fail(p1, prelude_error(PRELUDE_ERROR_ASSERTION)); prelude_return_val_if_fail(p2, prelude_error(PRELUDE_ERROR_ASSERTION)); if ( p1->depth != p2->depth ) return -1; return idmef_path_ncompare(p1, p2, p1->depth); } /** * idmef_path_clone: * @src: Pointer to an #idmef_path_t object. * @dst: Address where to store the copy of @src. * * Clones @src and stores the result in the provided @dst address. * * Returns: 0 on success, a negative value otherwise. */ int idmef_path_clone(const idmef_path_t *src, idmef_path_t **dst) { prelude_return_val_if_fail(src, prelude_error(PRELUDE_ERROR_ASSERTION)); *dst = calloc(1, sizeof(**dst)); if ( ! *dst ) return prelude_error_from_errno(errno); (*dst)->refcount = 1; (*dst)->depth = src->depth; strncpy((*dst)->name, src->name, sizeof(src->name)); memcpy((*dst)->elem, src->elem, src->depth * sizeof(idmef_path_element_t)); gl_lock_init((*dst)->mutex); return 0; } /** * idmef_path_check_operator: * @path: Pointer to a #idmef_path_t object. * @op: Operator to check compatibility with. * * Check whether @op can apply to value pointed to by @path. * * Returns: 0 on success, a negative value if an error occured. */ int idmef_path_check_operator(const idmef_path_t *path, idmef_criterion_operator_t op) { prelude_return_val_if_fail(path, prelude_error(PRELUDE_ERROR_ASSERTION)); return idmef_value_type_check_operator(idmef_path_get_value_type(path, -1), op); } /** * idmef_path_get_applicable_operators: * @path: Pointer to a #idmef_path_t object. * @result: Pointer to storage for applicable operator. * * Retrieve all applicable operator that might be used by the type of * value pointed to by @path. * * Returns: 0 on success, a negative value if an error occured. */ int idmef_path_get_applicable_operators(const idmef_path_t *path, idmef_criterion_operator_t *result) { prelude_return_val_if_fail(path && result, prelude_error(PRELUDE_ERROR_ASSERTION)); return idmef_value_type_get_applicable_operators(idmef_path_get_value_type(path, -1), result); } /** * idmef_path_ref: * @path: Pointer to an #idmef_path_t object. * * Increases @path reference count. * * idmef_path_destroy() will destroy the refcount until it reaches 0, * at which point the path will be destroyed. * * Returns: The provided @path is returned. */ idmef_path_t *idmef_path_ref(idmef_path_t *path) { prelude_return_val_if_fail(path, NULL); gl_lock_lock(path->mutex); path->refcount++; gl_lock_unlock(path->mutex); return path; } /** * idmef_path_is_ambiguous: * @path: Pointer to an #idmef_path_t object. * * Returns TRUE if @path contain elements that are supposed * to be listed, but for which no index were provided. * * Returns: TRUE if the object is ambiguous, FALSE otherwise. */ prelude_bool_t idmef_path_is_ambiguous(const idmef_path_t *path) { size_t i; prelude_return_val_if_fail(path, FALSE); for ( i = 0; i < path->depth; i++ ) { if ( path->elem[i].index == INDEX_UNDEFINED ) return TRUE; } return FALSE; } /** * idmef_path_has_lists: * @path: Pointer to an #idmef_path_t object. * * Returns: the number of listed element within @path. */ int idmef_path_has_lists(const idmef_path_t *path) { size_t i; int ret = 0; prelude_return_val_if_fail(path, 0); for ( i = 0; i < path->depth; i++ ) { if ( path->elem[i].index != INDEX_FORBIDDEN ) ret++; } return ret; } prelude_bool_t idmef_path_is_list(const idmef_path_t *path, int depth) { prelude_return_val_if_fail(path, FALSE); if ( depth < 0 ) depth = path->depth - 1; return path->elem[depth].index != INDEX_FORBIDDEN; } /** * idmef_path_get_depth: * @path: Pointer to an #idmef_path_t object. * * Returns: @depth number of elements. */ unsigned int idmef_path_get_depth(const idmef_path_t *path) { prelude_return_val_if_fail(path, 0); return path->depth; } /** * idmef_path_get_name: * @path: Pointer to an #idmef_path_t object. * @depth: Depth of the @path element to get the name from. * * Returns the full path name if the provided @depth is -1, or the specific * element name if depth is set. That is, for a @path pointing to * "alert.classification.text": A depth of -1 would return "alert.classification.text"; * a depth of 0 would return "alert"; a depth of 1 would return "classification"; and * a depth of 2 would return "text". * * Returns: @path name relative to the provided @dept. */ const char *idmef_path_get_name(const idmef_path_t *path, int depth) { const char *ret; const idmef_path_element_t *elem; prelude_return_val_if_fail(path, NULL); prelude_return_val_if_fail(depth < 0 || (size_t) depth < path->depth, NULL); if ( depth < 0 ) return path->name; elem = &path->elem[depth]; if ( depth > 0 && (elem->class < 0 || elem->value_type == IDMEF_VALUE_TYPE_ENUM) ) ret = idmef_class_get_child_name(path->elem[depth - 1].class, elem->position); else ret = idmef_class_get_name(elem->class); return ret; } void _idmef_path_cache_lock(void) { gl_lock_lock(cached_path_mutex); if ( cached_path ) prelude_hash_iterate(cached_path, path_lock_cb); } void _idmef_path_cache_reinit(void) { gl_lock_init(cached_path_mutex); if ( cached_path ) prelude_hash_iterate(cached_path, path_reinit_cb); } void _idmef_path_cache_unlock(void) { if ( cached_path ) prelude_hash_iterate(cached_path, path_unlock_cb); gl_lock_unlock(cached_path_mutex); } void _idmef_path_cache_destroy(void) { if ( ! cached_path ) return; flush_cache = TRUE; prelude_hash_destroy(cached_path); flush_cache = FALSE; } libprelude-1.0.0/tests/0000775000076400007640000000000011347714757012034 500000000000000libprelude-1.0.0/tests/idmef.c0000664000076400007640000000111111202225027013147 00000000000000#include "config.h" #include #include #include "prelude.h" #define TEST_STR "abcdefghijklmnopqrstuvwxyz" #define MAX_LAG_SEC 3 int main(void) { time_t now; idmef_time_t *ctime; idmef_alert_t *alert; idmef_message_t *idmef; assert(idmef_message_new(&idmef) == 0); assert(idmef_message_new_alert(idmef, &alert) == 0); ctime = idmef_alert_get_create_time(alert); assert(ctime != NULL); now = time(NULL); assert(now - idmef_time_get_sec(ctime) < MAX_LAG_SEC); exit(0); } libprelude-1.0.0/tests/prelude-string.c0000664000076400007640000000166511202225027015045 00000000000000#include "config.h" #include #include #include "prelude.h" #define TEST_COUNT 10 #define TEST_STR "abcdefghijklmnopqrstuvwxyz" static void create_str(prelude_string_t **str) { size_t i; assert(prelude_string_new(str) == 0); assert(prelude_string_is_empty(*str) == TRUE); for ( i = 0; i < TEST_COUNT; i++ ) { assert(prelude_string_cat(*str, TEST_STR) >= 0); } assert(prelude_string_get_len(*str) == (TEST_COUNT * (sizeof(TEST_STR) - 1))); } int main(void) { prelude_string_t *str1, *str2; create_str(&str1); assert(prelude_string_clone(str1, &str2) == 0); assert(prelude_string_compare(str1, str2) == 0); assert(prelude_string_cat(str2, "won't match") >= 0); assert(prelude_string_compare(str1, str2) != 0); prelude_string_destroy(str1); prelude_string_destroy(str2); exit(0); } libprelude-1.0.0/tests/idmef-value.c0000664000076400007640000002311711202225027014273 00000000000000#include "config.h" #include #include #include #include "prelude.h" static void cast_data(idmef_value_t *value) { assert(_idmef_value_cast(value, IDMEF_VALUE_TYPE_INT8, -1) < 0); assert(_idmef_value_cast(value, IDMEF_VALUE_TYPE_UINT8, -1) < 0); assert(_idmef_value_cast(value, IDMEF_VALUE_TYPE_INT16, -1) < 0); assert(_idmef_value_cast(value, IDMEF_VALUE_TYPE_UINT16, -1) < 0); assert(_idmef_value_cast(value, IDMEF_VALUE_TYPE_INT32, -1) < 0); assert(_idmef_value_cast(value, IDMEF_VALUE_TYPE_UINT32, -1) < 0); assert(_idmef_value_cast(value, IDMEF_VALUE_TYPE_INT64, -1) < 0); assert(_idmef_value_cast(value, IDMEF_VALUE_TYPE_UINT64, -1) < 0); assert(_idmef_value_cast(value, IDMEF_VALUE_TYPE_FLOAT, -1) < 0); assert(_idmef_value_cast(value, IDMEF_VALUE_TYPE_DOUBLE, -1) < 0); assert(_idmef_value_cast(value, IDMEF_VALUE_TYPE_TIME, -1) < 0); assert(_idmef_value_cast(value, IDMEF_VALUE_TYPE_ENUM, -1) < 0); assert(_idmef_value_cast(value, IDMEF_VALUE_TYPE_LIST, -1) < 0); assert(_idmef_value_cast(value, IDMEF_VALUE_TYPE_CLASS, -1) < 0); assert(_idmef_value_cast(value, IDMEF_VALUE_TYPE_STRING, -1) == 0); assert(idmef_value_get_type(value) == IDMEF_VALUE_TYPE_STRING); } static void cast_int8(void) { idmef_value_t *value; assert(idmef_value_new_int8(&value, INT8_MIN) == 0); assert(_idmef_value_cast(value, IDMEF_VALUE_TYPE_UINT8, -1) < 0); assert(_idmef_value_cast(value, IDMEF_VALUE_TYPE_UINT16, -1) < 0); assert(_idmef_value_cast(value, IDMEF_VALUE_TYPE_UINT32, -1) < 0); assert(_idmef_value_cast(value, IDMEF_VALUE_TYPE_UINT64, -1) < 0); assert(_idmef_value_cast(value, IDMEF_VALUE_TYPE_INT16, -1) == 0); assert(idmef_value_get_type(value) == IDMEF_VALUE_TYPE_INT16); assert(idmef_value_get_int16(value) == INT8_MIN); idmef_value_destroy(value); assert(idmef_value_new_int8(&value, INT8_MIN) == 0); assert(_idmef_value_cast(value, IDMEF_VALUE_TYPE_INT32, -1) == 0); assert(idmef_value_get_type(value) == IDMEF_VALUE_TYPE_INT32); assert(idmef_value_get_int32(value) == INT8_MIN); idmef_value_destroy(value); assert(idmef_value_new_int8(&value, INT8_MIN) == 0); assert(_idmef_value_cast(value, IDMEF_VALUE_TYPE_INT64, -1) == 0); assert(idmef_value_get_type(value) == IDMEF_VALUE_TYPE_INT64); assert(idmef_value_get_int64(value) == INT8_MIN); idmef_value_destroy(value); assert(idmef_value_new_int8(&value, INT8_MIN) == 0); assert(_idmef_value_cast(value, IDMEF_VALUE_TYPE_FLOAT, -1) == 0); assert(idmef_value_get_type(value) == IDMEF_VALUE_TYPE_FLOAT); assert(idmef_value_get_float(value) == INT8_MIN); idmef_value_destroy(value); assert(idmef_value_new_int8(&value, INT8_MIN) == 0); assert(_idmef_value_cast(value, IDMEF_VALUE_TYPE_DOUBLE, -1) == 0); assert(idmef_value_get_type(value) == IDMEF_VALUE_TYPE_DOUBLE); assert(idmef_value_get_double(value) == INT8_MIN); idmef_value_destroy(value); assert(idmef_value_new_int8(&value, INT8_MIN) == 0); assert(_idmef_value_cast(value, IDMEF_VALUE_TYPE_DATA, -1) == 0); assert(idmef_value_get_type(value) == IDMEF_VALUE_TYPE_DATA); assert((int) idmef_data_get_uint32(idmef_value_get_data(value)) == INT8_MIN); idmef_value_destroy(value); } static void cast_int16(void) { idmef_value_t *value; assert(idmef_value_new_int16(&value, INT16_MIN) == 0); assert(_idmef_value_cast(value, IDMEF_VALUE_TYPE_INT8, -1) < 0); assert(_idmef_value_cast(value, IDMEF_VALUE_TYPE_UINT8, -1) < 0); assert(_idmef_value_cast(value, IDMEF_VALUE_TYPE_UINT16, -1) < 0); assert(_idmef_value_cast(value, IDMEF_VALUE_TYPE_UINT32, -1) < 0); assert(_idmef_value_cast(value, IDMEF_VALUE_TYPE_UINT64, -1) < 0); assert(_idmef_value_cast(value, IDMEF_VALUE_TYPE_INT32, -1) == 0); assert(idmef_value_get_type(value) == IDMEF_VALUE_TYPE_INT32); assert(idmef_value_get_int32(value) == INT16_MIN); idmef_value_destroy(value); assert(idmef_value_new_int16(&value, INT16_MIN) == 0); assert(_idmef_value_cast(value, IDMEF_VALUE_TYPE_INT64, -1) == 0); assert(idmef_value_get_type(value) == IDMEF_VALUE_TYPE_INT64); assert(idmef_value_get_int64(value) == INT16_MIN); idmef_value_destroy(value); assert(idmef_value_new_int16(&value, INT16_MIN) == 0); assert(_idmef_value_cast(value, IDMEF_VALUE_TYPE_FLOAT, -1) == 0); assert(idmef_value_get_type(value) == IDMEF_VALUE_TYPE_FLOAT); assert(idmef_value_get_float(value) == INT16_MIN); idmef_value_destroy(value); assert(idmef_value_new_int16(&value, INT16_MIN) == 0); assert(_idmef_value_cast(value, IDMEF_VALUE_TYPE_DOUBLE, -1) == 0); assert(idmef_value_get_type(value) == IDMEF_VALUE_TYPE_DOUBLE); assert(idmef_value_get_double(value) == INT16_MIN); idmef_value_destroy(value); assert(idmef_value_new_int16(&value, INT16_MIN) == 0); assert(_idmef_value_cast(value, IDMEF_VALUE_TYPE_DATA, -1) == 0); assert(idmef_value_get_type(value) == IDMEF_VALUE_TYPE_DATA); assert((int) idmef_data_get_uint32(idmef_value_get_data(value)) == INT16_MIN); idmef_value_destroy(value); } static void cast_int32(void) { idmef_value_t *value; assert(idmef_value_new_int32(&value, INT32_MIN) == 0); assert(_idmef_value_cast(value, IDMEF_VALUE_TYPE_INT8, -1) < 0); assert(_idmef_value_cast(value, IDMEF_VALUE_TYPE_INT16, -1) < 0); assert(_idmef_value_cast(value, IDMEF_VALUE_TYPE_UINT8, -1) < 0); assert(_idmef_value_cast(value, IDMEF_VALUE_TYPE_UINT16, -1) < 0); assert(_idmef_value_cast(value, IDMEF_VALUE_TYPE_UINT32, -1) < 0); assert(_idmef_value_cast(value, IDMEF_VALUE_TYPE_UINT64, -1) < 0); assert(_idmef_value_cast(value, IDMEF_VALUE_TYPE_INT64, -1) == 0); assert(idmef_value_get_type(value) == IDMEF_VALUE_TYPE_INT64); assert(idmef_value_get_int64(value) == INT32_MIN); idmef_value_destroy(value); assert(idmef_value_new_int32(&value, INT32_MIN) == 0); assert(_idmef_value_cast(value, IDMEF_VALUE_TYPE_FLOAT, -1) == 0); assert(idmef_value_get_type(value) == IDMEF_VALUE_TYPE_FLOAT); assert(idmef_value_get_float(value) == INT32_MIN); idmef_value_destroy(value); assert(idmef_value_new_int32(&value, INT32_MIN) == 0); assert(_idmef_value_cast(value, IDMEF_VALUE_TYPE_DOUBLE, -1) == 0); assert(idmef_value_get_type(value) == IDMEF_VALUE_TYPE_DOUBLE); assert(idmef_value_get_double(value) == INT32_MIN); idmef_value_destroy(value); assert(idmef_value_new_int32(&value, INT32_MIN) == 0); assert(_idmef_value_cast(value, IDMEF_VALUE_TYPE_DATA, -1) == 0); assert(idmef_value_get_type(value) == IDMEF_VALUE_TYPE_DATA); assert((int) idmef_data_get_uint32(idmef_value_get_data(value)) == INT32_MIN); idmef_value_destroy(value); assert(idmef_value_new_int32(&value, INT32_MAX) == 0); assert(_idmef_value_cast(value, IDMEF_VALUE_TYPE_TIME, -1) == 0); assert(idmef_value_get_type(value) == IDMEF_VALUE_TYPE_TIME); assert(idmef_time_get_sec(idmef_value_get_time(value)) == INT32_MAX); idmef_value_destroy(value); } static void cast_string(void) { idmef_data_t *data; idmef_value_t *value; prelude_string_t *str; assert(prelude_string_new_ref(&str, "abcdefgh") == 0); assert(idmef_value_new_string(&value, str) == 0); idmef_value_dont_have_own_data(value); assert(_idmef_value_cast(value, IDMEF_VALUE_TYPE_INT8, -1) < 0); // assert(_idmef_value_cast(value, IDMEF_VALUE_TYPE_UINT8, -1) < 0); assert(_idmef_value_cast(value, IDMEF_VALUE_TYPE_INT16, -1) < 0); assert(_idmef_value_cast(value, IDMEF_VALUE_TYPE_UINT16, -1) < 0); assert(_idmef_value_cast(value, IDMEF_VALUE_TYPE_INT32, -1) < 0); assert(_idmef_value_cast(value, IDMEF_VALUE_TYPE_UINT32, -1) < 0); assert(_idmef_value_cast(value, IDMEF_VALUE_TYPE_INT64, -1) < 0); assert(_idmef_value_cast(value, IDMEF_VALUE_TYPE_UINT64, -1) < 0); assert(_idmef_value_cast(value, IDMEF_VALUE_TYPE_FLOAT, -1) < 0); assert(_idmef_value_cast(value, IDMEF_VALUE_TYPE_DOUBLE, -1) < 0); assert(_idmef_value_cast(value, IDMEF_VALUE_TYPE_TIME, -1) < 0); assert(_idmef_value_cast(value, IDMEF_VALUE_TYPE_ENUM, -1) < 0); assert(_idmef_value_cast(value, IDMEF_VALUE_TYPE_LIST, -1) < 0); assert(_idmef_value_cast(value, IDMEF_VALUE_TYPE_CLASS, -1) < 0); assert(_idmef_value_cast(value, IDMEF_VALUE_TYPE_DATA, -1) == 0); assert(idmef_value_get_type(value) == IDMEF_VALUE_TYPE_DATA); assert(data = idmef_value_get_data(value)); assert(idmef_data_get_len(data) == (prelude_string_get_len(str) + 1)); assert(memcmp(prelude_string_get_string(str), idmef_data_get_data(data), idmef_data_get_len(data)) == 0); prelude_string_destroy(str); cast_data(value); idmef_value_destroy(value); assert(prelude_string_new_ref(&str, "2008-01-01 20:42:31") == 0); assert(idmef_value_new_string(&value, str) == 0); assert(_idmef_value_cast(value, IDMEF_VALUE_TYPE_TIME, -1) == 0); idmef_value_destroy(value); } int main(void) { cast_int8(); cast_int16(); cast_int32(); cast_string(); exit(0); } libprelude-1.0.0/tests/idmef-criteria.c0000664000076400007640000000440711202225027014762 00000000000000#include "config.h" #include #include #include "prelude.h" static void test_criteria(idmef_message_t *idmef, const char *criteria_str, int expect_create, int expect_match) { idmef_criteria_t *criteria; if ( expect_create < 0 ) { assert(idmef_criteria_new_from_string(&criteria, criteria_str) < 0); return; } else assert(idmef_criteria_new_from_string(&criteria, criteria_str) == 0); assert(idmef_criteria_match(criteria, idmef) == expect_match); idmef_criteria_destroy(criteria); } int main(void) { idmef_alert_t *alert; idmef_message_t *idmef; idmef_classification_t *classification; prelude_string_t *str; assert(prelude_string_new_ref(&str, "A") == 0); assert(idmef_message_new(&idmef) == 0); assert(idmef_message_new_alert(idmef, &alert) == 0); assert(idmef_alert_new_classification(alert, &classification) == 0); idmef_classification_set_text(classification, str); test_criteria(idmef, "alert", 0, 1); test_criteria(idmef, "heartbeat", 0, 0); test_criteria(idmef, "alert || heartbeat", 0, 1); test_criteria(idmef, "alert.classification.txt == A", -1, -1); test_criteria(idmef, "alert.classification.text = (A || B || C || D) || heartbeat", 0, 1); test_criteria(idmef, "(alert.classification.text == A || heartbeat", -1, -1); prelude_string_set_ref(str, "My String"); test_criteria(idmef, "alert.classification.text != 'My String'", 0, 0); test_criteria(idmef, "alert.classification.text != 'random'", 0, 1); test_criteria(idmef, "alert.classification.text == 'My String'", 0, 1); test_criteria(idmef, "alert.classification.text <> 'My'", 0, 1); test_criteria(idmef, "alert.classification.text <> 'my'", 0, 0); test_criteria(idmef, "alert.classification.text <>* 'my'", 0, 1); test_criteria(idmef, "alert.classification.text ~ 'My String'", 0, 1); test_criteria(idmef, "alert.classification.text ~ 'My (String|Check)'", 0, 1); test_criteria(idmef, "alert.classification.text ~ 'my'", 0, 0); test_criteria(idmef, "alert.classification.text ~* 'my'", 0, 1); exit(0); } libprelude-1.0.0/tests/Makefile.am0000664000076400007640000000352511202312107013762 00000000000000TESTS = async-timer idmef idmef-criteria idmef-message-helper idmef-path idmef-value prelude-client prelude-string check_PROGRAMS = $(TESTS) LDADD = $(top_builddir)/src/libprelude.la ../libmissing/libmissing.la AM_CPPFLAGS = -I$(top_builddir)/src/include -I$(top_srcdir)/src/include -I$(top_builddir)/src/libprelude-error -I$(top_builddir)/libmissing -I$(top_srcdir)/libmissing idmef_value_LDADD = $(top_builddir)/src/idmef-value.lo $(LDADD) async_timer_LDADD = @LTLIBMULTITHREAD@ $(LDADD) if HAVE_VALGRIND check-local: $(MAKE) valgrind %.valgrind: % $(LIBTOOL) --mode=execute \ $(VALGRIND) -q \ --tool=memcheck --leak-check=full --trace-children=yes \ --leak-resolution=high --num-callers=20 \ $* 2>&1 | tee valgrind.log @if grep "==" valgrind.log > /dev/null 2>&1; then \ rm valgrind.log; \ exit 1; \ fi @rm valgrind.log valgrind: $(TESTS) @echo "Valgrinding tests ..." @failed=0; \ for t in $(TESTS); do \ $(MAKE) $$t.valgrind; \ if test "$$?" -ne 0; then \ echo "Valgrind error for test $$t"; \ failed=`expr $$failed + 1`; \ whicht="$$whicht $$t"; \ fi; \ done; \ if test "$$failed" -ne 0; then \ echo "$$failed tests had leaks or errors under valgrind:"; \ echo "$$whicht"; \ false; \ fi else valgrind: endif -include $(top_srcdir)/git.mk libprelude-1.0.0/tests/prelude-client.c0000664000076400007640000000107211202225027015005 00000000000000#include "config.h" #include #include #include #include "prelude.h" int main(int argc, char **argv) { int ret; prelude_client_t *client; assert(prelude_init(&argc, argv) == 0); assert(prelude_client_new(&client, "Client that does not exist") == 0); assert((ret = prelude_client_start(client)) < 0); assert(prelude_error_get_code(ret) == PRELUDE_ERROR_PROFILE); prelude_client_destroy(client, PRELUDE_CLIENT_EXIT_STATUS_FAILURE); prelude_deinit(); return 0; } libprelude-1.0.0/tests/Makefile.in0000664000076400007640000015512611347714460014022 00000000000000# Makefile.in generated by automake 1.11.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, # Inc. # This Makefile.in 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. @SET_MAKE@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ target_triplet = @target@ TESTS = async-timer$(EXEEXT) idmef$(EXEEXT) idmef-criteria$(EXEEXT) \ idmef-message-helper$(EXEEXT) idmef-path$(EXEEXT) \ idmef-value$(EXEEXT) prelude-client$(EXEEXT) \ prelude-string$(EXEEXT) check_PROGRAMS = $(am__EXEEXT_1) subdir = tests DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/libmissing/m4/00gnulib.m4 \ $(top_srcdir)/libmissing/m4/alloca.m4 \ $(top_srcdir)/libmissing/m4/arpa_inet_h.m4 \ $(top_srcdir)/libmissing/m4/btowc.m4 \ $(top_srcdir)/libmissing/m4/close.m4 \ $(top_srcdir)/libmissing/m4/codeset.m4 \ $(top_srcdir)/libmissing/m4/cond.m4 \ $(top_srcdir)/libmissing/m4/dos.m4 \ $(top_srcdir)/libmissing/m4/dup2.m4 \ $(top_srcdir)/libmissing/m4/errno_h.m4 \ $(top_srcdir)/libmissing/m4/exponentd.m4 \ $(top_srcdir)/libmissing/m4/exponentf.m4 \ $(top_srcdir)/libmissing/m4/exponentl.m4 \ $(top_srcdir)/libmissing/m4/extensions.m4 \ $(top_srcdir)/libmissing/m4/fclose.m4 \ $(top_srcdir)/libmissing/m4/fcntl-o.m4 \ $(top_srcdir)/libmissing/m4/fcntl_h.m4 \ $(top_srcdir)/libmissing/m4/float_h.m4 \ $(top_srcdir)/libmissing/m4/fopen.m4 \ $(top_srcdir)/libmissing/m4/fpieee.m4 \ $(top_srcdir)/libmissing/m4/frexp.m4 \ $(top_srcdir)/libmissing/m4/frexpl.m4 \ $(top_srcdir)/libmissing/m4/fseeko.m4 \ $(top_srcdir)/libmissing/m4/ftw.m4 \ $(top_srcdir)/libmissing/m4/getaddrinfo.m4 \ $(top_srcdir)/libmissing/m4/getdelim.m4 \ $(top_srcdir)/libmissing/m4/gethostname.m4 \ $(top_srcdir)/libmissing/m4/getline.m4 \ $(top_srcdir)/libmissing/m4/getpagesize.m4 \ $(top_srcdir)/libmissing/m4/getpass.m4 \ $(top_srcdir)/libmissing/m4/gettimeofday.m4 \ $(top_srcdir)/libmissing/m4/glibc21.m4 \ $(top_srcdir)/libmissing/m4/gnulib-common.m4 \ $(top_srcdir)/libmissing/m4/gnulib-comp.m4 \ $(top_srcdir)/libmissing/m4/gnulib-tool.m4 \ $(top_srcdir)/libmissing/m4/hostent.m4 \ $(top_srcdir)/libmissing/m4/include_next.m4 \ $(top_srcdir)/libmissing/m4/inet_ntop.m4 \ $(top_srcdir)/libmissing/m4/inet_pton.m4 \ $(top_srcdir)/libmissing/m4/intmax_t.m4 \ $(top_srcdir)/libmissing/m4/inttypes_h.m4 \ $(top_srcdir)/libmissing/m4/isnand.m4 \ $(top_srcdir)/libmissing/m4/isnanf.m4 \ $(top_srcdir)/libmissing/m4/isnanl.m4 \ $(top_srcdir)/libmissing/m4/langinfo_h.m4 \ $(top_srcdir)/libmissing/m4/ldexpl.m4 \ $(top_srcdir)/libmissing/m4/lib-ld.m4 \ $(top_srcdir)/libmissing/m4/lib-link.m4 \ $(top_srcdir)/libmissing/m4/lib-prefix.m4 \ $(top_srcdir)/libmissing/m4/localcharset.m4 \ $(top_srcdir)/libmissing/m4/locale-fr.m4 \ $(top_srcdir)/libmissing/m4/locale-ja.m4 \ $(top_srcdir)/libmissing/m4/locale-tr.m4 \ $(top_srcdir)/libmissing/m4/locale-zh.m4 \ $(top_srcdir)/libmissing/m4/lock.m4 \ $(top_srcdir)/libmissing/m4/longlong.m4 \ $(top_srcdir)/libmissing/m4/lseek.m4 \ $(top_srcdir)/libmissing/m4/lstat.m4 \ $(top_srcdir)/libmissing/m4/malloc.m4 \ $(top_srcdir)/libmissing/m4/math_h.m4 \ $(top_srcdir)/libmissing/m4/mbrtowc.m4 \ $(top_srcdir)/libmissing/m4/mbsinit.m4 \ $(top_srcdir)/libmissing/m4/mbstate_t.m4 \ $(top_srcdir)/libmissing/m4/memchr.m4 \ $(top_srcdir)/libmissing/m4/memmem.m4 \ $(top_srcdir)/libmissing/m4/minmax.m4 \ $(top_srcdir)/libmissing/m4/mktime.m4 \ $(top_srcdir)/libmissing/m4/mmap-anon.m4 \ $(top_srcdir)/libmissing/m4/mode_t.m4 \ $(top_srcdir)/libmissing/m4/multiarch.m4 \ $(top_srcdir)/libmissing/m4/netdb_h.m4 \ $(top_srcdir)/libmissing/m4/netinet_in_h.m4 \ $(top_srcdir)/libmissing/m4/nl_langinfo.m4 \ $(top_srcdir)/libmissing/m4/nocrash.m4 \ $(top_srcdir)/libmissing/m4/onceonly.m4 \ $(top_srcdir)/libmissing/m4/open.m4 \ $(top_srcdir)/libmissing/m4/pathmax.m4 \ $(top_srcdir)/libmissing/m4/perror.m4 \ $(top_srcdir)/libmissing/m4/poll.m4 \ $(top_srcdir)/libmissing/m4/printf-frexp.m4 \ $(top_srcdir)/libmissing/m4/printf-frexpl.m4 \ $(top_srcdir)/libmissing/m4/printf.m4 \ $(top_srcdir)/libmissing/m4/realloc.m4 \ $(top_srcdir)/libmissing/m4/regex.m4 \ $(top_srcdir)/libmissing/m4/relocatable-lib.m4 \ $(top_srcdir)/libmissing/m4/select.m4 \ $(top_srcdir)/libmissing/m4/servent.m4 \ $(top_srcdir)/libmissing/m4/signal_h.m4 \ $(top_srcdir)/libmissing/m4/signalblocking.m4 \ $(top_srcdir)/libmissing/m4/signbit.m4 \ $(top_srcdir)/libmissing/m4/size_max.m4 \ $(top_srcdir)/libmissing/m4/sleep.m4 \ $(top_srcdir)/libmissing/m4/snprintf-posix.m4 \ $(top_srcdir)/libmissing/m4/snprintf.m4 \ $(top_srcdir)/libmissing/m4/sockets.m4 \ $(top_srcdir)/libmissing/m4/socklen.m4 \ $(top_srcdir)/libmissing/m4/sockpfaf.m4 \ $(top_srcdir)/libmissing/m4/ssize_t.m4 \ $(top_srcdir)/libmissing/m4/stat.m4 \ $(top_srcdir)/libmissing/m4/stdbool.m4 \ $(top_srcdir)/libmissing/m4/stddef_h.m4 \ $(top_srcdir)/libmissing/m4/stdint.m4 \ $(top_srcdir)/libmissing/m4/stdint_h.m4 \ $(top_srcdir)/libmissing/m4/stdio_h.m4 \ $(top_srcdir)/libmissing/m4/stdlib_h.m4 \ $(top_srcdir)/libmissing/m4/strcase.m4 \ $(top_srcdir)/libmissing/m4/strcasestr.m4 \ $(top_srcdir)/libmissing/m4/strdup.m4 \ $(top_srcdir)/libmissing/m4/strerror.m4 \ $(top_srcdir)/libmissing/m4/string_h.m4 \ $(top_srcdir)/libmissing/m4/strings_h.m4 \ $(top_srcdir)/libmissing/m4/strndup.m4 \ $(top_srcdir)/libmissing/m4/strnlen.m4 \ $(top_srcdir)/libmissing/m4/strptime.m4 \ $(top_srcdir)/libmissing/m4/strsep.m4 \ $(top_srcdir)/libmissing/m4/symlink.m4 \ $(top_srcdir)/libmissing/m4/sys_ioctl_h.m4 \ $(top_srcdir)/libmissing/m4/sys_select_h.m4 \ $(top_srcdir)/libmissing/m4/sys_socket_h.m4 \ $(top_srcdir)/libmissing/m4/sys_stat_h.m4 \ $(top_srcdir)/libmissing/m4/sys_time_h.m4 \ $(top_srcdir)/libmissing/m4/sys_utsname_h.m4 \ $(top_srcdir)/libmissing/m4/thread.m4 \ $(top_srcdir)/libmissing/m4/threadlib.m4 \ $(top_srcdir)/libmissing/m4/time_h.m4 \ $(top_srcdir)/libmissing/m4/time_r.m4 \ $(top_srcdir)/libmissing/m4/timegm.m4 \ $(top_srcdir)/libmissing/m4/tls.m4 \ $(top_srcdir)/libmissing/m4/tm_gmtoff.m4 \ $(top_srcdir)/libmissing/m4/uname.m4 \ $(top_srcdir)/libmissing/m4/ungetc.m4 \ $(top_srcdir)/libmissing/m4/unistd_h.m4 \ $(top_srcdir)/libmissing/m4/vasnprintf.m4 \ $(top_srcdir)/libmissing/m4/vsnprintf-posix.m4 \ $(top_srcdir)/libmissing/m4/vsnprintf.m4 \ $(top_srcdir)/libmissing/m4/warn-on-use.m4 \ $(top_srcdir)/libmissing/m4/wchar.m4 \ $(top_srcdir)/libmissing/m4/wchar_t.m4 \ $(top_srcdir)/libmissing/m4/wcrtomb.m4 \ $(top_srcdir)/libmissing/m4/wctob.m4 \ $(top_srcdir)/libmissing/m4/wctype.m4 \ $(top_srcdir)/libmissing/m4/wint_t.m4 \ $(top_srcdir)/libmissing/m4/write.m4 \ $(top_srcdir)/libmissing/m4/xsize.m4 \ $(top_srcdir)/libmissing/m4/yield.m4 \ $(top_srcdir)/m4/ac_compile_check_sizeof.m4 \ $(top_srcdir)/m4/am_path_ruby.m4 $(top_srcdir)/m4/argz.m4 \ $(top_srcdir)/m4/as-ac-expand.m4 \ $(top_srcdir)/m4/ax_c_check_flag.m4 \ $(top_srcdir)/m4/ax_check_aligned_access_required.m4 \ $(top_srcdir)/m4/ax_create_prelude_inttypes_h.m4 \ $(top_srcdir)/m4/ax_ld_check_flag.m4 \ $(top_srcdir)/m4/gtk-doc.m4 $(top_srcdir)/m4/libgcrypt.m4 \ $(top_srcdir)/m4/libgnutls-extra.m4 \ $(top_srcdir)/m4/libgnutls.m4 $(top_srcdir)/m4/libtool.m4 \ $(top_srcdir)/m4/ltdl.m4 $(top_srcdir)/m4/ltoptions.m4 \ $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/m4/pkg.m4 \ $(top_srcdir)/configure.in am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = am__EXEEXT_1 = async-timer$(EXEEXT) idmef$(EXEEXT) \ idmef-criteria$(EXEEXT) idmef-message-helper$(EXEEXT) \ idmef-path$(EXEEXT) idmef-value$(EXEEXT) \ prelude-client$(EXEEXT) prelude-string$(EXEEXT) async_timer_SOURCES = async-timer.c async_timer_OBJECTS = async-timer.$(OBJEXT) async_timer_DEPENDENCIES = $(LDADD) idmef_SOURCES = idmef.c idmef_OBJECTS = idmef.$(OBJEXT) idmef_LDADD = $(LDADD) idmef_DEPENDENCIES = $(top_builddir)/src/libprelude.la \ ../libmissing/libmissing.la idmef_criteria_SOURCES = idmef-criteria.c idmef_criteria_OBJECTS = idmef-criteria.$(OBJEXT) idmef_criteria_LDADD = $(LDADD) idmef_criteria_DEPENDENCIES = $(top_builddir)/src/libprelude.la \ ../libmissing/libmissing.la idmef_message_helper_SOURCES = idmef-message-helper.c idmef_message_helper_OBJECTS = idmef-message-helper.$(OBJEXT) idmef_message_helper_LDADD = $(LDADD) idmef_message_helper_DEPENDENCIES = $(top_builddir)/src/libprelude.la \ ../libmissing/libmissing.la idmef_path_SOURCES = idmef-path.c idmef_path_OBJECTS = idmef-path.$(OBJEXT) idmef_path_LDADD = $(LDADD) idmef_path_DEPENDENCIES = $(top_builddir)/src/libprelude.la \ ../libmissing/libmissing.la idmef_value_SOURCES = idmef-value.c idmef_value_OBJECTS = idmef-value.$(OBJEXT) idmef_value_DEPENDENCIES = $(top_builddir)/src/idmef-value.lo $(LDADD) prelude_client_SOURCES = prelude-client.c prelude_client_OBJECTS = prelude-client.$(OBJEXT) prelude_client_LDADD = $(LDADD) prelude_client_DEPENDENCIES = $(top_builddir)/src/libprelude.la \ ../libmissing/libmissing.la prelude_string_SOURCES = prelude-string.c prelude_string_OBJECTS = prelude-string.$(OBJEXT) prelude_string_LDADD = $(LDADD) prelude_string_DEPENDENCIES = $(top_builddir)/src/libprelude.la \ ../libmissing/libmissing.la DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) CCLD = $(CC) LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ $(LDFLAGS) -o $@ SOURCES = async-timer.c idmef.c idmef-criteria.c \ idmef-message-helper.c idmef-path.c idmef-value.c \ prelude-client.c prelude-string.c DIST_SOURCES = async-timer.c idmef.c idmef-criteria.c \ idmef-message-helper.c idmef-path.c idmef-value.c \ prelude-client.c prelude-string.c ETAGS = etags CTAGS = ctags am__tty_colors = \ red=; grn=; lgn=; blu=; std= DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ ALLOCA = @ALLOCA@ ALLOCA_H = @ALLOCA_H@ AMTAR = @AMTAR@ APPLE_UNIVERSAL_BUILD = @APPLE_UNIVERSAL_BUILD@ AR = @AR@ ARGZ_H = @ARGZ_H@ AS = @AS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ BINDINGS_CC = @BINDINGS_CC@ BINDIR = @BINDIR@ BITSIZEOF_PTRDIFF_T = @BITSIZEOF_PTRDIFF_T@ BITSIZEOF_SIG_ATOMIC_T = @BITSIZEOF_SIG_ATOMIC_T@ BITSIZEOF_SIZE_T = @BITSIZEOF_SIZE_T@ BITSIZEOF_WCHAR_T = @BITSIZEOF_WCHAR_T@ BITSIZEOF_WINT_T = @BITSIZEOF_WINT_T@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CC_FOR_BUILD = @CC_FOR_BUILD@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EMULTIHOP_HIDDEN = @EMULTIHOP_HIDDEN@ EMULTIHOP_VALUE = @EMULTIHOP_VALUE@ ENOLINK_HIDDEN = @ENOLINK_HIDDEN@ ENOLINK_VALUE = @ENOLINK_VALUE@ EOVERFLOW_HIDDEN = @EOVERFLOW_HIDDEN@ EOVERFLOW_VALUE = @EOVERFLOW_VALUE@ ERRNO_H = @ERRNO_H@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ FLOAT_H = @FLOAT_H@ GETADDRINFO_LIB = @GETADDRINFO_LIB@ GETHOSTNAME_LIB = @GETHOSTNAME_LIB@ GLIBC21 = @GLIBC21@ GNULIB_ACCEPT = @GNULIB_ACCEPT@ GNULIB_ACCEPT4 = @GNULIB_ACCEPT4@ GNULIB_ACOSL = @GNULIB_ACOSL@ GNULIB_ASINL = @GNULIB_ASINL@ GNULIB_ATANL = @GNULIB_ATANL@ GNULIB_ATOLL = @GNULIB_ATOLL@ GNULIB_BIND = @GNULIB_BIND@ GNULIB_BTOWC = @GNULIB_BTOWC@ GNULIB_CALLOC_POSIX = @GNULIB_CALLOC_POSIX@ GNULIB_CANONICALIZE_FILE_NAME = @GNULIB_CANONICALIZE_FILE_NAME@ GNULIB_CEILF = @GNULIB_CEILF@ GNULIB_CEILL = @GNULIB_CEILL@ GNULIB_CHOWN = @GNULIB_CHOWN@ GNULIB_CLOSE = @GNULIB_CLOSE@ GNULIB_CONNECT = @GNULIB_CONNECT@ GNULIB_COSL = @GNULIB_COSL@ GNULIB_DPRINTF = @GNULIB_DPRINTF@ GNULIB_DUP2 = @GNULIB_DUP2@ GNULIB_DUP3 = @GNULIB_DUP3@ GNULIB_ENVIRON = @GNULIB_ENVIRON@ GNULIB_EUIDACCESS = @GNULIB_EUIDACCESS@ GNULIB_EXPL = @GNULIB_EXPL@ GNULIB_FACCESSAT = @GNULIB_FACCESSAT@ GNULIB_FCHDIR = @GNULIB_FCHDIR@ GNULIB_FCHMODAT = @GNULIB_FCHMODAT@ GNULIB_FCHOWNAT = @GNULIB_FCHOWNAT@ GNULIB_FCLOSE = @GNULIB_FCLOSE@ GNULIB_FCNTL = @GNULIB_FCNTL@ GNULIB_FFLUSH = @GNULIB_FFLUSH@ GNULIB_FLOORF = @GNULIB_FLOORF@ GNULIB_FLOORL = @GNULIB_FLOORL@ GNULIB_FOPEN = @GNULIB_FOPEN@ GNULIB_FPRINTF = @GNULIB_FPRINTF@ GNULIB_FPRINTF_POSIX = @GNULIB_FPRINTF_POSIX@ GNULIB_FPURGE = @GNULIB_FPURGE@ GNULIB_FPUTC = @GNULIB_FPUTC@ GNULIB_FPUTS = @GNULIB_FPUTS@ GNULIB_FREOPEN = @GNULIB_FREOPEN@ GNULIB_FREXP = @GNULIB_FREXP@ GNULIB_FREXPL = @GNULIB_FREXPL@ GNULIB_FSEEK = @GNULIB_FSEEK@ GNULIB_FSEEKO = @GNULIB_FSEEKO@ GNULIB_FSTATAT = @GNULIB_FSTATAT@ GNULIB_FSYNC = @GNULIB_FSYNC@ GNULIB_FTELL = @GNULIB_FTELL@ GNULIB_FTELLO = @GNULIB_FTELLO@ GNULIB_FTRUNCATE = @GNULIB_FTRUNCATE@ GNULIB_FUTIMENS = @GNULIB_FUTIMENS@ GNULIB_FWRITE = @GNULIB_FWRITE@ GNULIB_GETADDRINFO = @GNULIB_GETADDRINFO@ GNULIB_GETCWD = @GNULIB_GETCWD@ GNULIB_GETDELIM = @GNULIB_GETDELIM@ GNULIB_GETDOMAINNAME = @GNULIB_GETDOMAINNAME@ GNULIB_GETDTABLESIZE = @GNULIB_GETDTABLESIZE@ GNULIB_GETGROUPS = @GNULIB_GETGROUPS@ GNULIB_GETHOSTNAME = @GNULIB_GETHOSTNAME@ GNULIB_GETLINE = @GNULIB_GETLINE@ GNULIB_GETLOADAVG = @GNULIB_GETLOADAVG@ GNULIB_GETLOGIN = @GNULIB_GETLOGIN@ GNULIB_GETLOGIN_R = @GNULIB_GETLOGIN_R@ GNULIB_GETPAGESIZE = @GNULIB_GETPAGESIZE@ GNULIB_GETPEERNAME = @GNULIB_GETPEERNAME@ GNULIB_GETSOCKNAME = @GNULIB_GETSOCKNAME@ GNULIB_GETSOCKOPT = @GNULIB_GETSOCKOPT@ GNULIB_GETSUBOPT = @GNULIB_GETSUBOPT@ GNULIB_GETTIMEOFDAY = @GNULIB_GETTIMEOFDAY@ GNULIB_GETUSERSHELL = @GNULIB_GETUSERSHELL@ GNULIB_INET_NTOP = @GNULIB_INET_NTOP@ GNULIB_INET_PTON = @GNULIB_INET_PTON@ GNULIB_IOCTL = @GNULIB_IOCTL@ GNULIB_ISFINITE = @GNULIB_ISFINITE@ GNULIB_ISINF = @GNULIB_ISINF@ GNULIB_ISNAN = @GNULIB_ISNAN@ GNULIB_ISNAND = @GNULIB_ISNAND@ GNULIB_ISNANF = @GNULIB_ISNANF@ GNULIB_ISNANL = @GNULIB_ISNANL@ GNULIB_LCHMOD = @GNULIB_LCHMOD@ GNULIB_LCHOWN = @GNULIB_LCHOWN@ GNULIB_LDEXPL = @GNULIB_LDEXPL@ GNULIB_LINK = @GNULIB_LINK@ GNULIB_LINKAT = @GNULIB_LINKAT@ GNULIB_LISTEN = @GNULIB_LISTEN@ GNULIB_LOGL = @GNULIB_LOGL@ GNULIB_LSEEK = @GNULIB_LSEEK@ GNULIB_LSTAT = @GNULIB_LSTAT@ GNULIB_MALLOC_POSIX = @GNULIB_MALLOC_POSIX@ GNULIB_MBRLEN = @GNULIB_MBRLEN@ GNULIB_MBRTOWC = @GNULIB_MBRTOWC@ GNULIB_MBSCASECMP = @GNULIB_MBSCASECMP@ GNULIB_MBSCASESTR = @GNULIB_MBSCASESTR@ GNULIB_MBSCHR = @GNULIB_MBSCHR@ GNULIB_MBSCSPN = @GNULIB_MBSCSPN@ GNULIB_MBSINIT = @GNULIB_MBSINIT@ GNULIB_MBSLEN = @GNULIB_MBSLEN@ GNULIB_MBSNCASECMP = @GNULIB_MBSNCASECMP@ GNULIB_MBSNLEN = @GNULIB_MBSNLEN@ GNULIB_MBSNRTOWCS = @GNULIB_MBSNRTOWCS@ GNULIB_MBSPBRK = @GNULIB_MBSPBRK@ GNULIB_MBSPCASECMP = @GNULIB_MBSPCASECMP@ GNULIB_MBSRCHR = @GNULIB_MBSRCHR@ GNULIB_MBSRTOWCS = @GNULIB_MBSRTOWCS@ GNULIB_MBSSEP = @GNULIB_MBSSEP@ GNULIB_MBSSPN = @GNULIB_MBSSPN@ GNULIB_MBSSTR = @GNULIB_MBSSTR@ GNULIB_MBSTOK_R = @GNULIB_MBSTOK_R@ GNULIB_MEMCHR = @GNULIB_MEMCHR@ GNULIB_MEMMEM = @GNULIB_MEMMEM@ GNULIB_MEMPCPY = @GNULIB_MEMPCPY@ GNULIB_MEMRCHR = @GNULIB_MEMRCHR@ GNULIB_MKDIRAT = @GNULIB_MKDIRAT@ GNULIB_MKDTEMP = @GNULIB_MKDTEMP@ GNULIB_MKFIFO = @GNULIB_MKFIFO@ GNULIB_MKFIFOAT = @GNULIB_MKFIFOAT@ GNULIB_MKNOD = @GNULIB_MKNOD@ GNULIB_MKNODAT = @GNULIB_MKNODAT@ GNULIB_MKOSTEMP = @GNULIB_MKOSTEMP@ GNULIB_MKOSTEMPS = @GNULIB_MKOSTEMPS@ GNULIB_MKSTEMP = @GNULIB_MKSTEMP@ GNULIB_MKSTEMPS = @GNULIB_MKSTEMPS@ GNULIB_NL_LANGINFO = @GNULIB_NL_LANGINFO@ GNULIB_OBSTACK_PRINTF = @GNULIB_OBSTACK_PRINTF@ GNULIB_OBSTACK_PRINTF_POSIX = @GNULIB_OBSTACK_PRINTF_POSIX@ GNULIB_OPEN = @GNULIB_OPEN@ GNULIB_OPENAT = @GNULIB_OPENAT@ GNULIB_PERROR = @GNULIB_PERROR@ GNULIB_PIPE2 = @GNULIB_PIPE2@ GNULIB_POPEN = @GNULIB_POPEN@ GNULIB_PREAD = @GNULIB_PREAD@ GNULIB_PRINTF = @GNULIB_PRINTF@ GNULIB_PRINTF_POSIX = @GNULIB_PRINTF_POSIX@ GNULIB_PUTC = @GNULIB_PUTC@ GNULIB_PUTCHAR = @GNULIB_PUTCHAR@ GNULIB_PUTENV = @GNULIB_PUTENV@ GNULIB_PUTS = @GNULIB_PUTS@ GNULIB_RANDOM_R = @GNULIB_RANDOM_R@ GNULIB_RAWMEMCHR = @GNULIB_RAWMEMCHR@ GNULIB_READLINK = @GNULIB_READLINK@ GNULIB_READLINKAT = @GNULIB_READLINKAT@ GNULIB_REALLOC_POSIX = @GNULIB_REALLOC_POSIX@ GNULIB_REALPATH = @GNULIB_REALPATH@ GNULIB_RECV = @GNULIB_RECV@ GNULIB_RECVFROM = @GNULIB_RECVFROM@ GNULIB_REMOVE = @GNULIB_REMOVE@ GNULIB_RENAME = @GNULIB_RENAME@ GNULIB_RENAMEAT = @GNULIB_RENAMEAT@ GNULIB_RMDIR = @GNULIB_RMDIR@ GNULIB_ROUND = @GNULIB_ROUND@ GNULIB_ROUNDF = @GNULIB_ROUNDF@ GNULIB_ROUNDL = @GNULIB_ROUNDL@ GNULIB_RPMATCH = @GNULIB_RPMATCH@ GNULIB_SELECT = @GNULIB_SELECT@ GNULIB_SEND = @GNULIB_SEND@ GNULIB_SENDTO = @GNULIB_SENDTO@ GNULIB_SETENV = @GNULIB_SETENV@ GNULIB_SETSOCKOPT = @GNULIB_SETSOCKOPT@ GNULIB_SHUTDOWN = @GNULIB_SHUTDOWN@ GNULIB_SIGACTION = @GNULIB_SIGACTION@ GNULIB_SIGNAL_H_SIGPIPE = @GNULIB_SIGNAL_H_SIGPIPE@ GNULIB_SIGNBIT = @GNULIB_SIGNBIT@ GNULIB_SIGPROCMASK = @GNULIB_SIGPROCMASK@ GNULIB_SINL = @GNULIB_SINL@ GNULIB_SLEEP = @GNULIB_SLEEP@ GNULIB_SNPRINTF = @GNULIB_SNPRINTF@ GNULIB_SOCKET = @GNULIB_SOCKET@ GNULIB_SPRINTF_POSIX = @GNULIB_SPRINTF_POSIX@ GNULIB_SQRTL = @GNULIB_SQRTL@ GNULIB_STAT = @GNULIB_STAT@ GNULIB_STDIO_H_SIGPIPE = @GNULIB_STDIO_H_SIGPIPE@ GNULIB_STPCPY = @GNULIB_STPCPY@ GNULIB_STPNCPY = @GNULIB_STPNCPY@ GNULIB_STRCASESTR = @GNULIB_STRCASESTR@ GNULIB_STRCHRNUL = @GNULIB_STRCHRNUL@ GNULIB_STRDUP = @GNULIB_STRDUP@ GNULIB_STRERROR = @GNULIB_STRERROR@ GNULIB_STRNDUP = @GNULIB_STRNDUP@ GNULIB_STRNLEN = @GNULIB_STRNLEN@ GNULIB_STRPBRK = @GNULIB_STRPBRK@ GNULIB_STRSEP = @GNULIB_STRSEP@ GNULIB_STRSIGNAL = @GNULIB_STRSIGNAL@ GNULIB_STRSTR = @GNULIB_STRSTR@ GNULIB_STRTOD = @GNULIB_STRTOD@ GNULIB_STRTOK_R = @GNULIB_STRTOK_R@ GNULIB_STRTOLL = @GNULIB_STRTOLL@ GNULIB_STRTOULL = @GNULIB_STRTOULL@ GNULIB_STRVERSCMP = @GNULIB_STRVERSCMP@ GNULIB_SYMLINK = @GNULIB_SYMLINK@ GNULIB_SYMLINKAT = @GNULIB_SYMLINKAT@ GNULIB_TANL = @GNULIB_TANL@ GNULIB_TRUNC = @GNULIB_TRUNC@ GNULIB_TRUNCF = @GNULIB_TRUNCF@ GNULIB_TRUNCL = @GNULIB_TRUNCL@ GNULIB_UNAME = @GNULIB_UNAME@ GNULIB_UNISTD_H_GETOPT = @GNULIB_UNISTD_H_GETOPT@ GNULIB_UNISTD_H_SIGPIPE = @GNULIB_UNISTD_H_SIGPIPE@ GNULIB_UNLINK = @GNULIB_UNLINK@ GNULIB_UNLINKAT = @GNULIB_UNLINKAT@ GNULIB_UNSETENV = @GNULIB_UNSETENV@ GNULIB_USLEEP = @GNULIB_USLEEP@ GNULIB_UTIMENSAT = @GNULIB_UTIMENSAT@ GNULIB_VASPRINTF = @GNULIB_VASPRINTF@ GNULIB_VDPRINTF = @GNULIB_VDPRINTF@ GNULIB_VFPRINTF = @GNULIB_VFPRINTF@ GNULIB_VFPRINTF_POSIX = @GNULIB_VFPRINTF_POSIX@ GNULIB_VPRINTF = @GNULIB_VPRINTF@ GNULIB_VPRINTF_POSIX = @GNULIB_VPRINTF_POSIX@ GNULIB_VSNPRINTF = @GNULIB_VSNPRINTF@ GNULIB_VSPRINTF_POSIX = @GNULIB_VSPRINTF_POSIX@ GNULIB_WCRTOMB = @GNULIB_WCRTOMB@ GNULIB_WCSNRTOMBS = @GNULIB_WCSNRTOMBS@ GNULIB_WCSRTOMBS = @GNULIB_WCSRTOMBS@ GNULIB_WCTOB = @GNULIB_WCTOB@ GNULIB_WCWIDTH = @GNULIB_WCWIDTH@ GNULIB_WRITE = @GNULIB_WRITE@ GREP = @GREP@ GTKDOC_CHECK = @GTKDOC_CHECK@ HAVE_ACCEPT4 = @HAVE_ACCEPT4@ HAVE_ACOSL = @HAVE_ACOSL@ HAVE_ARPA_INET_H = @HAVE_ARPA_INET_H@ HAVE_ASINL = @HAVE_ASINL@ HAVE_ATANL = @HAVE_ATANL@ HAVE_ATOLL = @HAVE_ATOLL@ HAVE_BTOWC = @HAVE_BTOWC@ HAVE_CALLOC_POSIX = @HAVE_CALLOC_POSIX@ HAVE_CANONICALIZE_FILE_NAME = @HAVE_CANONICALIZE_FILE_NAME@ HAVE_CHOWN = @HAVE_CHOWN@ HAVE_COSL = @HAVE_COSL@ HAVE_CXX = @HAVE_CXX@ HAVE_DECL_ACOSL = @HAVE_DECL_ACOSL@ HAVE_DECL_ASINL = @HAVE_DECL_ASINL@ HAVE_DECL_ATANL = @HAVE_DECL_ATANL@ HAVE_DECL_COSL = @HAVE_DECL_COSL@ HAVE_DECL_ENVIRON = @HAVE_DECL_ENVIRON@ HAVE_DECL_EXPL = @HAVE_DECL_EXPL@ HAVE_DECL_FPURGE = @HAVE_DECL_FPURGE@ HAVE_DECL_FREEADDRINFO = @HAVE_DECL_FREEADDRINFO@ HAVE_DECL_FREXPL = @HAVE_DECL_FREXPL@ HAVE_DECL_GAI_STRERROR = @HAVE_DECL_GAI_STRERROR@ HAVE_DECL_GETADDRINFO = @HAVE_DECL_GETADDRINFO@ HAVE_DECL_GETDELIM = @HAVE_DECL_GETDELIM@ HAVE_DECL_GETLINE = @HAVE_DECL_GETLINE@ HAVE_DECL_GETLOADAVG = @HAVE_DECL_GETLOADAVG@ HAVE_DECL_GETLOGIN_R = @HAVE_DECL_GETLOGIN_R@ HAVE_DECL_GETNAMEINFO = @HAVE_DECL_GETNAMEINFO@ HAVE_DECL_INET_NTOP = @HAVE_DECL_INET_NTOP@ HAVE_DECL_INET_PTON = @HAVE_DECL_INET_PTON@ HAVE_DECL_LDEXPL = @HAVE_DECL_LDEXPL@ HAVE_DECL_LOGL = @HAVE_DECL_LOGL@ HAVE_DECL_MEMMEM = @HAVE_DECL_MEMMEM@ HAVE_DECL_MEMRCHR = @HAVE_DECL_MEMRCHR@ HAVE_DECL_OBSTACK_PRINTF = @HAVE_DECL_OBSTACK_PRINTF@ HAVE_DECL_SINL = @HAVE_DECL_SINL@ HAVE_DECL_SNPRINTF = @HAVE_DECL_SNPRINTF@ HAVE_DECL_SQRTL = @HAVE_DECL_SQRTL@ HAVE_DECL_STRDUP = @HAVE_DECL_STRDUP@ HAVE_DECL_STRERROR = @HAVE_DECL_STRERROR@ HAVE_DECL_STRNCASECMP = @HAVE_DECL_STRNCASECMP@ HAVE_DECL_STRNDUP = @HAVE_DECL_STRNDUP@ HAVE_DECL_STRNLEN = @HAVE_DECL_STRNLEN@ HAVE_DECL_STRSIGNAL = @HAVE_DECL_STRSIGNAL@ HAVE_DECL_STRTOK_R = @HAVE_DECL_STRTOK_R@ HAVE_DECL_TANL = @HAVE_DECL_TANL@ HAVE_DECL_TRUNC = @HAVE_DECL_TRUNC@ HAVE_DECL_TRUNCF = @HAVE_DECL_TRUNCF@ HAVE_DECL_VSNPRINTF = @HAVE_DECL_VSNPRINTF@ HAVE_DECL_WCTOB = @HAVE_DECL_WCTOB@ HAVE_DECL_WCWIDTH = @HAVE_DECL_WCWIDTH@ HAVE_DPRINTF = @HAVE_DPRINTF@ HAVE_DUP2 = @HAVE_DUP2@ HAVE_DUP3 = @HAVE_DUP3@ HAVE_EUIDACCESS = @HAVE_EUIDACCESS@ HAVE_EXPL = @HAVE_EXPL@ HAVE_FACCESSAT = @HAVE_FACCESSAT@ HAVE_FCHMODAT = @HAVE_FCHMODAT@ HAVE_FCHOWNAT = @HAVE_FCHOWNAT@ HAVE_FCNTL = @HAVE_FCNTL@ HAVE_FSTATAT = @HAVE_FSTATAT@ HAVE_FSYNC = @HAVE_FSYNC@ HAVE_FTRUNCATE = @HAVE_FTRUNCATE@ HAVE_FUTIMENS = @HAVE_FUTIMENS@ HAVE_GETDOMAINNAME = @HAVE_GETDOMAINNAME@ HAVE_GETDTABLESIZE = @HAVE_GETDTABLESIZE@ HAVE_GETGROUPS = @HAVE_GETGROUPS@ HAVE_GETHOSTNAME = @HAVE_GETHOSTNAME@ HAVE_GETLOGIN = @HAVE_GETLOGIN@ HAVE_GETPAGESIZE = @HAVE_GETPAGESIZE@ HAVE_GETSUBOPT = @HAVE_GETSUBOPT@ HAVE_GETUSERSHELL = @HAVE_GETUSERSHELL@ HAVE_INTTYPES_H = @HAVE_INTTYPES_H@ HAVE_ISNAND = @HAVE_ISNAND@ HAVE_ISNANF = @HAVE_ISNANF@ HAVE_ISNANL = @HAVE_ISNANL@ HAVE_ISWCNTRL = @HAVE_ISWCNTRL@ HAVE_LANGINFO_CODESET = @HAVE_LANGINFO_CODESET@ HAVE_LANGINFO_ERA = @HAVE_LANGINFO_ERA@ HAVE_LANGINFO_H = @HAVE_LANGINFO_H@ HAVE_LCHMOD = @HAVE_LCHMOD@ HAVE_LCHOWN = @HAVE_LCHOWN@ HAVE_LINK = @HAVE_LINK@ HAVE_LINKAT = @HAVE_LINKAT@ HAVE_LOGL = @HAVE_LOGL@ HAVE_LONG_LONG_INT = @HAVE_LONG_LONG_INT@ HAVE_LSTAT = @HAVE_LSTAT@ HAVE_MALLOC_POSIX = @HAVE_MALLOC_POSIX@ HAVE_MBRLEN = @HAVE_MBRLEN@ HAVE_MBRTOWC = @HAVE_MBRTOWC@ HAVE_MBSINIT = @HAVE_MBSINIT@ HAVE_MBSLEN = @HAVE_MBSLEN@ HAVE_MBSNRTOWCS = @HAVE_MBSNRTOWCS@ HAVE_MBSRTOWCS = @HAVE_MBSRTOWCS@ HAVE_MEMPCPY = @HAVE_MEMPCPY@ HAVE_MKDIRAT = @HAVE_MKDIRAT@ HAVE_MKDTEMP = @HAVE_MKDTEMP@ HAVE_MKFIFO = @HAVE_MKFIFO@ HAVE_MKFIFOAT = @HAVE_MKFIFOAT@ HAVE_MKNOD = @HAVE_MKNOD@ HAVE_MKNODAT = @HAVE_MKNODAT@ HAVE_MKOSTEMP = @HAVE_MKOSTEMP@ HAVE_MKOSTEMPS = @HAVE_MKOSTEMPS@ HAVE_MKSTEMPS = @HAVE_MKSTEMPS@ HAVE_NETDB_H = @HAVE_NETDB_H@ HAVE_NETINET_IN_H = @HAVE_NETINET_IN_H@ HAVE_NL_LANGINFO = @HAVE_NL_LANGINFO@ HAVE_OPENAT = @HAVE_OPENAT@ HAVE_OS_H = @HAVE_OS_H@ HAVE_PIPE2 = @HAVE_PIPE2@ HAVE_POSIX_SIGNALBLOCKING = @HAVE_POSIX_SIGNALBLOCKING@ HAVE_PREAD = @HAVE_PREAD@ HAVE_RANDOM_H = @HAVE_RANDOM_H@ HAVE_RANDOM_R = @HAVE_RANDOM_R@ HAVE_RAWMEMCHR = @HAVE_RAWMEMCHR@ HAVE_READLINK = @HAVE_READLINK@ HAVE_READLINKAT = @HAVE_READLINKAT@ HAVE_REALLOC_POSIX = @HAVE_REALLOC_POSIX@ HAVE_REALPATH = @HAVE_REALPATH@ HAVE_RENAMEAT = @HAVE_RENAMEAT@ HAVE_RPMATCH = @HAVE_RPMATCH@ HAVE_SA_FAMILY_T = @HAVE_SA_FAMILY_T@ HAVE_SETENV = @HAVE_SETENV@ HAVE_SIGACTION = @HAVE_SIGACTION@ HAVE_SIGINFO_T = @HAVE_SIGINFO_T@ HAVE_SIGNED_SIG_ATOMIC_T = @HAVE_SIGNED_SIG_ATOMIC_T@ HAVE_SIGNED_WCHAR_T = @HAVE_SIGNED_WCHAR_T@ HAVE_SIGNED_WINT_T = @HAVE_SIGNED_WINT_T@ HAVE_SIGSET_T = @HAVE_SIGSET_T@ HAVE_SINL = @HAVE_SINL@ HAVE_SLEEP = @HAVE_SLEEP@ HAVE_SQRTL = @HAVE_SQRTL@ HAVE_STDINT_H = @HAVE_STDINT_H@ HAVE_STPCPY = @HAVE_STPCPY@ HAVE_STPNCPY = @HAVE_STPNCPY@ HAVE_STRCASECMP = @HAVE_STRCASECMP@ HAVE_STRCASESTR = @HAVE_STRCASESTR@ HAVE_STRCHRNUL = @HAVE_STRCHRNUL@ HAVE_STRPBRK = @HAVE_STRPBRK@ HAVE_STRSEP = @HAVE_STRSEP@ HAVE_STRTOD = @HAVE_STRTOD@ HAVE_STRTOLL = @HAVE_STRTOLL@ HAVE_STRTOULL = @HAVE_STRTOULL@ HAVE_STRUCT_ADDRINFO = @HAVE_STRUCT_ADDRINFO@ HAVE_STRUCT_RANDOM_DATA = @HAVE_STRUCT_RANDOM_DATA@ HAVE_STRUCT_SIGACTION_SA_SIGACTION = @HAVE_STRUCT_SIGACTION_SA_SIGACTION@ HAVE_STRUCT_SOCKADDR_STORAGE = @HAVE_STRUCT_SOCKADDR_STORAGE@ HAVE_STRUCT_TIMEVAL = @HAVE_STRUCT_TIMEVAL@ HAVE_STRUCT_UTSNAME = @HAVE_STRUCT_UTSNAME@ HAVE_STRVERSCMP = @HAVE_STRVERSCMP@ HAVE_SYMLINK = @HAVE_SYMLINK@ HAVE_SYMLINKAT = @HAVE_SYMLINKAT@ HAVE_SYS_BITYPES_H = @HAVE_SYS_BITYPES_H@ HAVE_SYS_INTTYPES_H = @HAVE_SYS_INTTYPES_H@ HAVE_SYS_IOCTL_H = @HAVE_SYS_IOCTL_H@ HAVE_SYS_LOADAVG_H = @HAVE_SYS_LOADAVG_H@ HAVE_SYS_PARAM_H = @HAVE_SYS_PARAM_H@ HAVE_SYS_SELECT_H = @HAVE_SYS_SELECT_H@ HAVE_SYS_SOCKET_H = @HAVE_SYS_SOCKET_H@ HAVE_SYS_TIME_H = @HAVE_SYS_TIME_H@ HAVE_SYS_TYPES_H = @HAVE_SYS_TYPES_H@ HAVE_SYS_UTSNAME_H = @HAVE_SYS_UTSNAME_H@ HAVE_TANL = @HAVE_TANL@ HAVE_TYPE_VOLATILE_SIG_ATOMIC_T = @HAVE_TYPE_VOLATILE_SIG_ATOMIC_T@ HAVE_UNAME = @HAVE_UNAME@ HAVE_UNISTD_H = @HAVE_UNISTD_H@ HAVE_UNLINKAT = @HAVE_UNLINKAT@ HAVE_UNSETENV = @HAVE_UNSETENV@ HAVE_UNSIGNED_LONG_LONG_INT = @HAVE_UNSIGNED_LONG_LONG_INT@ HAVE_USLEEP = @HAVE_USLEEP@ HAVE_UTIMENSAT = @HAVE_UTIMENSAT@ HAVE_VASPRINTF = @HAVE_VASPRINTF@ HAVE_VDPRINTF = @HAVE_VDPRINTF@ HAVE_WCHAR_H = @HAVE_WCHAR_H@ HAVE_WCHAR_T = @HAVE_WCHAR_T@ HAVE_WCRTOMB = @HAVE_WCRTOMB@ HAVE_WCSNRTOMBS = @HAVE_WCSNRTOMBS@ HAVE_WCSRTOMBS = @HAVE_WCSRTOMBS@ HAVE_WCTYPE_H = @HAVE_WCTYPE_H@ HAVE_WINSOCK2_H = @HAVE_WINSOCK2_H@ HAVE_WINT_T = @HAVE_WINT_T@ HAVE_WS2TCPIP_H = @HAVE_WS2TCPIP_H@ HAVE__BOOL = @HAVE__BOOL@ HOSTENT_LIB = @HOSTENT_LIB@ HTML_DIR = @HTML_DIR@ INCLTDL = @INCLTDL@ INCLUDE_NEXT = @INCLUDE_NEXT@ INCLUDE_NEXT_AS_FIRST_DIRECTIVE = @INCLUDE_NEXT_AS_FIRST_DIRECTIVE@ INET_NTOP_LIB = @INET_NTOP_LIB@ INET_PTON_LIB = @INET_PTON_LIB@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LD = @LD@ LDFLAGS = @LDFLAGS@ LEX = @LEX@ LEXLIB = @LEXLIB@ LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@ LIBADD_DL = @LIBADD_DL@ LIBADD_DLD_LINK = @LIBADD_DLD_LINK@ LIBADD_DLOPEN = @LIBADD_DLOPEN@ LIBADD_SHL_LOAD = @LIBADD_SHL_LOAD@ LIBDIR = @LIBDIR@ LIBGCRYPT_CFLAGS = @LIBGCRYPT_CFLAGS@ LIBGCRYPT_CONFIG = @LIBGCRYPT_CONFIG@ LIBGCRYPT_LIBS = @LIBGCRYPT_LIBS@ LIBGNUTLS_CFLAGS = @LIBGNUTLS_CFLAGS@ LIBGNUTLS_CONFIG = @LIBGNUTLS_CONFIG@ LIBGNUTLS_EXTRA_CFLAGS = @LIBGNUTLS_EXTRA_CFLAGS@ LIBGNUTLS_EXTRA_CONFIG = @LIBGNUTLS_EXTRA_CONFIG@ LIBGNUTLS_EXTRA_LIBS = @LIBGNUTLS_EXTRA_LIBS@ LIBGNUTLS_LIBS = @LIBGNUTLS_LIBS@ LIBINTL = @LIBINTL@ LIBLTDL = @LIBLTDL@ LIBMULTITHREAD = @LIBMULTITHREAD@ LIBOBJS = @LIBOBJS@ LIBPRELUDECPP_SONAME = @LIBPRELUDECPP_SONAME@ LIBPRELUDE_CFLAGS = @LIBPRELUDE_CFLAGS@ LIBPRELUDE_LIBS = @LIBPRELUDE_LIBS@ LIBPRELUDE_SONAME = @LIBPRELUDE_SONAME@ LIBPTH = @LIBPTH@ LIBPTH_PREFIX = @LIBPTH_PREFIX@ LIBS = @LIBS@ LIBSOCKET = @LIBSOCKET@ LIBTESTS_LIBDEPS = @LIBTESTS_LIBDEPS@ LIBTHREAD = @LIBTHREAD@ LIBTOOL = @LIBTOOL@ LIPO = @LIPO@ LN_S = @LN_S@ LOCALCHARSET_TESTS_ENVIRONMENT = @LOCALCHARSET_TESTS_ENVIRONMENT@ LOCALE_FR = @LOCALE_FR@ LOCALE_FR_UTF8 = @LOCALE_FR_UTF8@ LOCALE_JA = @LOCALE_JA@ LOCALE_TR_UTF8 = @LOCALE_TR_UTF8@ LOCALE_ZH_CN = @LOCALE_ZH_CN@ LOCALSTATEDIR = @LOCALSTATEDIR@ LTALLOCA = @LTALLOCA@ LTDLDEPS = @LTDLDEPS@ LTDLINCL = @LTDLINCL@ LTDLOPEN = @LTDLOPEN@ LTLIBINTL = @LTLIBINTL@ LTLIBMULTITHREAD = @LTLIBMULTITHREAD@ LTLIBOBJS = @LTLIBOBJS@ LTLIBPTH = @LTLIBPTH@ LTLIBTHREAD = @LTLIBTHREAD@ LT_CONFIG_H = @LT_CONFIG_H@ LT_DLLOADERS = @LT_DLLOADERS@ LT_DLPREOPEN = @LT_DLPREOPEN@ LUA_CFLAGS = @LUA_CFLAGS@ LUA_CONFIG = @LUA_CONFIG@ LUA_LIBS = @LUA_LIBS@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MKDIR_P = @MKDIR_P@ NETDB_H = @NETDB_H@ NETINET_IN_H = @NETINET_IN_H@ NEXT_ARPA_INET_H = @NEXT_ARPA_INET_H@ NEXT_AS_FIRST_DIRECTIVE_ARPA_INET_H = @NEXT_AS_FIRST_DIRECTIVE_ARPA_INET_H@ NEXT_AS_FIRST_DIRECTIVE_ERRNO_H = @NEXT_AS_FIRST_DIRECTIVE_ERRNO_H@ NEXT_AS_FIRST_DIRECTIVE_FCNTL_H = @NEXT_AS_FIRST_DIRECTIVE_FCNTL_H@ NEXT_AS_FIRST_DIRECTIVE_FLOAT_H = @NEXT_AS_FIRST_DIRECTIVE_FLOAT_H@ NEXT_AS_FIRST_DIRECTIVE_LANGINFO_H = @NEXT_AS_FIRST_DIRECTIVE_LANGINFO_H@ NEXT_AS_FIRST_DIRECTIVE_MATH_H = @NEXT_AS_FIRST_DIRECTIVE_MATH_H@ NEXT_AS_FIRST_DIRECTIVE_NETDB_H = @NEXT_AS_FIRST_DIRECTIVE_NETDB_H@ NEXT_AS_FIRST_DIRECTIVE_NETINET_IN_H = @NEXT_AS_FIRST_DIRECTIVE_NETINET_IN_H@ NEXT_AS_FIRST_DIRECTIVE_SIGNAL_H = @NEXT_AS_FIRST_DIRECTIVE_SIGNAL_H@ NEXT_AS_FIRST_DIRECTIVE_STDDEF_H = @NEXT_AS_FIRST_DIRECTIVE_STDDEF_H@ NEXT_AS_FIRST_DIRECTIVE_STDINT_H = @NEXT_AS_FIRST_DIRECTIVE_STDINT_H@ NEXT_AS_FIRST_DIRECTIVE_STDIO_H = @NEXT_AS_FIRST_DIRECTIVE_STDIO_H@ NEXT_AS_FIRST_DIRECTIVE_STDLIB_H = @NEXT_AS_FIRST_DIRECTIVE_STDLIB_H@ NEXT_AS_FIRST_DIRECTIVE_STRINGS_H = @NEXT_AS_FIRST_DIRECTIVE_STRINGS_H@ NEXT_AS_FIRST_DIRECTIVE_STRING_H = @NEXT_AS_FIRST_DIRECTIVE_STRING_H@ NEXT_AS_FIRST_DIRECTIVE_SYS_IOCTL_H = @NEXT_AS_FIRST_DIRECTIVE_SYS_IOCTL_H@ NEXT_AS_FIRST_DIRECTIVE_SYS_SELECT_H = @NEXT_AS_FIRST_DIRECTIVE_SYS_SELECT_H@ NEXT_AS_FIRST_DIRECTIVE_SYS_SOCKET_H = @NEXT_AS_FIRST_DIRECTIVE_SYS_SOCKET_H@ NEXT_AS_FIRST_DIRECTIVE_SYS_STAT_H = @NEXT_AS_FIRST_DIRECTIVE_SYS_STAT_H@ NEXT_AS_FIRST_DIRECTIVE_SYS_TIME_H = @NEXT_AS_FIRST_DIRECTIVE_SYS_TIME_H@ NEXT_AS_FIRST_DIRECTIVE_SYS_UTSNAME_H = @NEXT_AS_FIRST_DIRECTIVE_SYS_UTSNAME_H@ NEXT_AS_FIRST_DIRECTIVE_TIME_H = @NEXT_AS_FIRST_DIRECTIVE_TIME_H@ NEXT_AS_FIRST_DIRECTIVE_UNISTD_H = @NEXT_AS_FIRST_DIRECTIVE_UNISTD_H@ NEXT_AS_FIRST_DIRECTIVE_WCHAR_H = @NEXT_AS_FIRST_DIRECTIVE_WCHAR_H@ NEXT_AS_FIRST_DIRECTIVE_WCTYPE_H = @NEXT_AS_FIRST_DIRECTIVE_WCTYPE_H@ NEXT_ERRNO_H = @NEXT_ERRNO_H@ NEXT_FCNTL_H = @NEXT_FCNTL_H@ NEXT_FLOAT_H = @NEXT_FLOAT_H@ NEXT_LANGINFO_H = @NEXT_LANGINFO_H@ NEXT_MATH_H = @NEXT_MATH_H@ NEXT_NETDB_H = @NEXT_NETDB_H@ NEXT_NETINET_IN_H = @NEXT_NETINET_IN_H@ NEXT_SIGNAL_H = @NEXT_SIGNAL_H@ NEXT_STDDEF_H = @NEXT_STDDEF_H@ NEXT_STDINT_H = @NEXT_STDINT_H@ NEXT_STDIO_H = @NEXT_STDIO_H@ NEXT_STDLIB_H = @NEXT_STDLIB_H@ NEXT_STRINGS_H = @NEXT_STRINGS_H@ NEXT_STRING_H = @NEXT_STRING_H@ NEXT_SYS_IOCTL_H = @NEXT_SYS_IOCTL_H@ NEXT_SYS_SELECT_H = @NEXT_SYS_SELECT_H@ NEXT_SYS_SOCKET_H = @NEXT_SYS_SOCKET_H@ NEXT_SYS_STAT_H = @NEXT_SYS_STAT_H@ NEXT_SYS_TIME_H = @NEXT_SYS_TIME_H@ NEXT_SYS_UTSNAME_H = @NEXT_SYS_UTSNAME_H@ NEXT_TIME_H = @NEXT_TIME_H@ NEXT_UNISTD_H = @NEXT_UNISTD_H@ NEXT_WCHAR_H = @NEXT_WCHAR_H@ NEXT_WCTYPE_H = @NEXT_WCTYPE_H@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PCFLAGS = @PCFLAGS@ PERL = @PERL@ PERL_EXTRA_PARAMS = @PERL_EXTRA_PARAMS@ PKG_CONFIG = @PKG_CONFIG@ POLL_H = @POLL_H@ PRAGMA_SYSTEM_HEADER = @PRAGMA_SYSTEM_HEADER@ PRELUDE_ADMIN_CFLAGS = @PRELUDE_ADMIN_CFLAGS@ PRELUDE_ADMIN_LIBS = @PRELUDE_ADMIN_LIBS@ PRELUDE_CONFIG_DIR = @PRELUDE_CONFIG_DIR@ PRELUDE_SPOOL_DIR = @PRELUDE_SPOOL_DIR@ PTHREAD_CFLAGS = @PTHREAD_CFLAGS@ PTHREAD_LDFLAGS = @PTHREAD_LDFLAGS@ PTHREAD_LIBS = @PTHREAD_LIBS@ PTRDIFF_T_SUFFIX = @PTRDIFF_T_SUFFIX@ PYTHON = @PYTHON@ RANLIB = @RANLIB@ RELOCATABLE = @RELOCATABLE@ REPLACE_BTOWC = @REPLACE_BTOWC@ REPLACE_CANONICALIZE_FILE_NAME = @REPLACE_CANONICALIZE_FILE_NAME@ REPLACE_CEILF = @REPLACE_CEILF@ REPLACE_CEILL = @REPLACE_CEILL@ REPLACE_CHOWN = @REPLACE_CHOWN@ REPLACE_CLOSE = @REPLACE_CLOSE@ REPLACE_DPRINTF = @REPLACE_DPRINTF@ REPLACE_DUP = @REPLACE_DUP@ REPLACE_DUP2 = @REPLACE_DUP2@ REPLACE_FCHDIR = @REPLACE_FCHDIR@ REPLACE_FCHOWNAT = @REPLACE_FCHOWNAT@ REPLACE_FCLOSE = @REPLACE_FCLOSE@ REPLACE_FCNTL = @REPLACE_FCNTL@ REPLACE_FFLUSH = @REPLACE_FFLUSH@ REPLACE_FLOORF = @REPLACE_FLOORF@ REPLACE_FLOORL = @REPLACE_FLOORL@ REPLACE_FOPEN = @REPLACE_FOPEN@ REPLACE_FPRINTF = @REPLACE_FPRINTF@ REPLACE_FPURGE = @REPLACE_FPURGE@ REPLACE_FREOPEN = @REPLACE_FREOPEN@ REPLACE_FREXP = @REPLACE_FREXP@ REPLACE_FREXPL = @REPLACE_FREXPL@ REPLACE_FSEEK = @REPLACE_FSEEK@ REPLACE_FSEEKO = @REPLACE_FSEEKO@ REPLACE_FSTAT = @REPLACE_FSTAT@ REPLACE_FSTATAT = @REPLACE_FSTATAT@ REPLACE_FTELL = @REPLACE_FTELL@ REPLACE_FTELLO = @REPLACE_FTELLO@ REPLACE_FUTIMENS = @REPLACE_FUTIMENS@ REPLACE_GETCWD = @REPLACE_GETCWD@ REPLACE_GETDELIM = @REPLACE_GETDELIM@ REPLACE_GETGROUPS = @REPLACE_GETGROUPS@ REPLACE_GETLINE = @REPLACE_GETLINE@ REPLACE_GETPAGESIZE = @REPLACE_GETPAGESIZE@ REPLACE_GETTIMEOFDAY = @REPLACE_GETTIMEOFDAY@ REPLACE_HUGE_VAL = @REPLACE_HUGE_VAL@ REPLACE_ISFINITE = @REPLACE_ISFINITE@ REPLACE_ISINF = @REPLACE_ISINF@ REPLACE_ISNAN = @REPLACE_ISNAN@ REPLACE_ISWCNTRL = @REPLACE_ISWCNTRL@ REPLACE_LCHOWN = @REPLACE_LCHOWN@ REPLACE_LDEXPL = @REPLACE_LDEXPL@ REPLACE_LINK = @REPLACE_LINK@ REPLACE_LINKAT = @REPLACE_LINKAT@ REPLACE_LOCALTIME_R = @REPLACE_LOCALTIME_R@ REPLACE_LSEEK = @REPLACE_LSEEK@ REPLACE_LSTAT = @REPLACE_LSTAT@ REPLACE_MBRLEN = @REPLACE_MBRLEN@ REPLACE_MBRTOWC = @REPLACE_MBRTOWC@ REPLACE_MBSINIT = @REPLACE_MBSINIT@ REPLACE_MBSNRTOWCS = @REPLACE_MBSNRTOWCS@ REPLACE_MBSRTOWCS = @REPLACE_MBSRTOWCS@ REPLACE_MBSTATE_T = @REPLACE_MBSTATE_T@ REPLACE_MEMCHR = @REPLACE_MEMCHR@ REPLACE_MEMMEM = @REPLACE_MEMMEM@ REPLACE_MKDIR = @REPLACE_MKDIR@ REPLACE_MKFIFO = @REPLACE_MKFIFO@ REPLACE_MKNOD = @REPLACE_MKNOD@ REPLACE_MKSTEMP = @REPLACE_MKSTEMP@ REPLACE_MKTIME = @REPLACE_MKTIME@ REPLACE_NAN = @REPLACE_NAN@ REPLACE_NANOSLEEP = @REPLACE_NANOSLEEP@ REPLACE_NL_LANGINFO = @REPLACE_NL_LANGINFO@ REPLACE_NULL = @REPLACE_NULL@ REPLACE_OBSTACK_PRINTF = @REPLACE_OBSTACK_PRINTF@ REPLACE_OPEN = @REPLACE_OPEN@ REPLACE_OPENAT = @REPLACE_OPENAT@ REPLACE_PERROR = @REPLACE_PERROR@ REPLACE_POPEN = @REPLACE_POPEN@ REPLACE_PREAD = @REPLACE_PREAD@ REPLACE_PRINTF = @REPLACE_PRINTF@ REPLACE_PUTENV = @REPLACE_PUTENV@ REPLACE_READLINK = @REPLACE_READLINK@ REPLACE_REALPATH = @REPLACE_REALPATH@ REPLACE_REMOVE = @REPLACE_REMOVE@ REPLACE_RENAME = @REPLACE_RENAME@ REPLACE_RENAMEAT = @REPLACE_RENAMEAT@ REPLACE_RMDIR = @REPLACE_RMDIR@ REPLACE_ROUND = @REPLACE_ROUND@ REPLACE_ROUNDF = @REPLACE_ROUNDF@ REPLACE_ROUNDL = @REPLACE_ROUNDL@ REPLACE_SELECT = @REPLACE_SELECT@ REPLACE_SETENV = @REPLACE_SETENV@ REPLACE_SIGNBIT = @REPLACE_SIGNBIT@ REPLACE_SIGNBIT_USING_GCC = @REPLACE_SIGNBIT_USING_GCC@ REPLACE_SLEEP = @REPLACE_SLEEP@ REPLACE_SNPRINTF = @REPLACE_SNPRINTF@ REPLACE_SPRINTF = @REPLACE_SPRINTF@ REPLACE_STAT = @REPLACE_STAT@ REPLACE_STDIO_WRITE_FUNCS = @REPLACE_STDIO_WRITE_FUNCS@ REPLACE_STRCASESTR = @REPLACE_STRCASESTR@ REPLACE_STRDUP = @REPLACE_STRDUP@ REPLACE_STRERROR = @REPLACE_STRERROR@ REPLACE_STRNDUP = @REPLACE_STRNDUP@ REPLACE_STRPTIME = @REPLACE_STRPTIME@ REPLACE_STRSIGNAL = @REPLACE_STRSIGNAL@ REPLACE_STRSTR = @REPLACE_STRSTR@ REPLACE_STRTOD = @REPLACE_STRTOD@ REPLACE_STRTOK_R = @REPLACE_STRTOK_R@ REPLACE_SYMLINK = @REPLACE_SYMLINK@ REPLACE_TIMEGM = @REPLACE_TIMEGM@ REPLACE_TRUNCL = @REPLACE_TRUNCL@ REPLACE_UNLINK = @REPLACE_UNLINK@ REPLACE_UNLINKAT = @REPLACE_UNLINKAT@ REPLACE_UNSETENV = @REPLACE_UNSETENV@ REPLACE_USLEEP = @REPLACE_USLEEP@ REPLACE_UTIMENSAT = @REPLACE_UTIMENSAT@ REPLACE_VASPRINTF = @REPLACE_VASPRINTF@ REPLACE_VDPRINTF = @REPLACE_VDPRINTF@ REPLACE_VFPRINTF = @REPLACE_VFPRINTF@ REPLACE_VPRINTF = @REPLACE_VPRINTF@ REPLACE_VSNPRINTF = @REPLACE_VSNPRINTF@ REPLACE_VSPRINTF = @REPLACE_VSPRINTF@ REPLACE_WCRTOMB = @REPLACE_WCRTOMB@ REPLACE_WCSNRTOMBS = @REPLACE_WCSNRTOMBS@ REPLACE_WCSRTOMBS = @REPLACE_WCSRTOMBS@ REPLACE_WCTOB = @REPLACE_WCTOB@ REPLACE_WCWIDTH = @REPLACE_WCWIDTH@ REPLACE_WRITE = @REPLACE_WRITE@ RUBY = @RUBY@ RUBY_CCFLAGS = @RUBY_CCFLAGS@ RUBY_EXEC_PREFIX = @RUBY_EXEC_PREFIX@ RUBY_INCLUDES = @RUBY_INCLUDES@ RUBY_LIBS = @RUBY_LIBS@ RUBY_PLATFORM = @RUBY_PLATFORM@ RUBY_PREFIX = @RUBY_PREFIX@ RUBY_VERSION = @RUBY_VERSION@ SED = @SED@ SERVENT_LIB = @SERVENT_LIB@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ SIG_ATOMIC_T_SUFFIX = @SIG_ATOMIC_T_SUFFIX@ SIZE_T_SUFFIX = @SIZE_T_SUFFIX@ STDBOOL_H = @STDBOOL_H@ STDDEF_H = @STDDEF_H@ STDINT_H = @STDINT_H@ STRIP = @STRIP@ SWIG = @SWIG@ SYSCONFDIR = @SYSCONFDIR@ SYS_IOCTL_H_HAVE_WINSOCK2_H = @SYS_IOCTL_H_HAVE_WINSOCK2_H@ SYS_IOCTL_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS = @SYS_IOCTL_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS@ SYS_SOCKET_H = @SYS_SOCKET_H@ SYS_TIME_H_DEFINES_STRUCT_TIMESPEC = @SYS_TIME_H_DEFINES_STRUCT_TIMESPEC@ TIME_H_DEFINES_STRUCT_TIMESPEC = @TIME_H_DEFINES_STRUCT_TIMESPEC@ UNDEFINE_STRTOK_R = @UNDEFINE_STRTOK_R@ UNISTD_H_HAVE_WINSOCK2_H = @UNISTD_H_HAVE_WINSOCK2_H@ UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS = @UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS@ VALGRIND = @VALGRIND@ VERSION = @VERSION@ WCHAR_T_SUFFIX = @WCHAR_T_SUFFIX@ WCTYPE_H = @WCTYPE_H@ WINT_T_SUFFIX = @WINT_T_SUFFIX@ YACC = @YACC@ YFLAGS = @YFLAGS@ YIELD_LIB = @YIELD_LIB@ __PRELUDE_64BIT_FORMAT_PREFIX = @__PRELUDE_64BIT_FORMAT_PREFIX@ __PRELUDE_HAVE_64BIT_LONG = @__PRELUDE_HAVE_64BIT_LONG@ __PRELUDE_HAVE_INTTYPES_H = @__PRELUDE_HAVE_INTTYPES_H@ __PRELUDE_HAVE_STDINT_H = @__PRELUDE_HAVE_STDINT_H@ __PRELUDE_STDINT_HAVE_UINT16 = @__PRELUDE_STDINT_HAVE_UINT16@ __PRELUDE_STDINT_HAVE_UINT32 = @__PRELUDE_STDINT_HAVE_UINT32@ __PRELUDE_STDINT_HAVE_UINT64 = @__PRELUDE_STDINT_HAVE_UINT64@ __PRELUDE_STDINT_HAVE_UINT8 = @__PRELUDE_STDINT_HAVE_UINT8@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ gl_LIBOBJS = @gl_LIBOBJS@ gl_LTLIBOBJS = @gl_LTLIBOBJS@ gltests_LIBOBJS = @gltests_LIBOBJS@ gltests_LTLIBOBJS = @gltests_LTLIBOBJS@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ lt_ECHO = @lt_ECHO@ ltdl_LIBOBJS = @ltdl_LIBOBJS@ ltdl_LTLIBOBJS = @ltdl_LTLIBOBJS@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ pkgrbexecdir = @pkgrbexecdir@ pkgrubydir = @pkgrubydir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ rbexecdir = @rbexecdir@ rubydir = @rubydir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sys_symbol_underscore = @sys_symbol_underscore@ sysconfdir = @sysconfdir@ target = @target@ target_alias = @target_alias@ target_cpu = @target_cpu@ target_os = @target_os@ target_vendor = @target_vendor@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ LDADD = $(top_builddir)/src/libprelude.la ../libmissing/libmissing.la AM_CPPFLAGS = -I$(top_builddir)/src/include -I$(top_srcdir)/src/include -I$(top_builddir)/src/libprelude-error -I$(top_builddir)/libmissing -I$(top_srcdir)/libmissing idmef_value_LDADD = $(top_builddir)/src/idmef-value.lo $(LDADD) async_timer_LDADD = @LTLIBMULTITHREAD@ $(LDADD) all: all-am .SUFFIXES: .SUFFIXES: .c .lo .o .obj $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu tests/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu tests/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): clean-checkPROGRAMS: @list='$(check_PROGRAMS)'; test -n "$$list" || exit 0; \ echo " rm -f" $$list; \ rm -f $$list || exit $$?; \ test -n "$(EXEEXT)" || exit 0; \ list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ echo " rm -f" $$list; \ rm -f $$list async-timer$(EXEEXT): $(async_timer_OBJECTS) $(async_timer_DEPENDENCIES) @rm -f async-timer$(EXEEXT) $(LINK) $(async_timer_OBJECTS) $(async_timer_LDADD) $(LIBS) idmef$(EXEEXT): $(idmef_OBJECTS) $(idmef_DEPENDENCIES) @rm -f idmef$(EXEEXT) $(LINK) $(idmef_OBJECTS) $(idmef_LDADD) $(LIBS) idmef-criteria$(EXEEXT): $(idmef_criteria_OBJECTS) $(idmef_criteria_DEPENDENCIES) @rm -f idmef-criteria$(EXEEXT) $(LINK) $(idmef_criteria_OBJECTS) $(idmef_criteria_LDADD) $(LIBS) idmef-message-helper$(EXEEXT): $(idmef_message_helper_OBJECTS) $(idmef_message_helper_DEPENDENCIES) @rm -f idmef-message-helper$(EXEEXT) $(LINK) $(idmef_message_helper_OBJECTS) $(idmef_message_helper_LDADD) $(LIBS) idmef-path$(EXEEXT): $(idmef_path_OBJECTS) $(idmef_path_DEPENDENCIES) @rm -f idmef-path$(EXEEXT) $(LINK) $(idmef_path_OBJECTS) $(idmef_path_LDADD) $(LIBS) idmef-value$(EXEEXT): $(idmef_value_OBJECTS) $(idmef_value_DEPENDENCIES) @rm -f idmef-value$(EXEEXT) $(LINK) $(idmef_value_OBJECTS) $(idmef_value_LDADD) $(LIBS) prelude-client$(EXEEXT): $(prelude_client_OBJECTS) $(prelude_client_DEPENDENCIES) @rm -f prelude-client$(EXEEXT) $(LINK) $(prelude_client_OBJECTS) $(prelude_client_LDADD) $(LIBS) prelude-string$(EXEEXT): $(prelude_string_OBJECTS) $(prelude_string_DEPENDENCIES) @rm -f prelude-string$(EXEEXT) $(LINK) $(prelude_string_OBJECTS) $(prelude_string_LDADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/async-timer.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/idmef-criteria.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/idmef-message-helper.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/idmef-path.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/idmef-value.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/idmef.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/prelude-client.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/prelude-string.Po@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(COMPILE) -c $< .c.obj: @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` .c.lo: @am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ mkid -fID $$unique tags: TAGS TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) set x; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: CTAGS CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags check-TESTS: $(TESTS) @failed=0; all=0; xfail=0; xpass=0; skip=0; \ srcdir=$(srcdir); export srcdir; \ list=' $(TESTS) '; \ $(am__tty_colors); \ if test -n "$$list"; then \ for tst in $$list; do \ if test -f ./$$tst; then dir=./; \ elif test -f $$tst; then dir=; \ else dir="$(srcdir)/"; fi; \ if $(TESTS_ENVIRONMENT) $${dir}$$tst; then \ all=`expr $$all + 1`; \ case " $(XFAIL_TESTS) " in \ *[\ \ ]$$tst[\ \ ]*) \ xpass=`expr $$xpass + 1`; \ failed=`expr $$failed + 1`; \ col=$$red; res=XPASS; \ ;; \ *) \ col=$$grn; res=PASS; \ ;; \ esac; \ elif test $$? -ne 77; then \ all=`expr $$all + 1`; \ case " $(XFAIL_TESTS) " in \ *[\ \ ]$$tst[\ \ ]*) \ xfail=`expr $$xfail + 1`; \ col=$$lgn; res=XFAIL; \ ;; \ *) \ failed=`expr $$failed + 1`; \ col=$$red; res=FAIL; \ ;; \ esac; \ else \ skip=`expr $$skip + 1`; \ col=$$blu; res=SKIP; \ fi; \ echo "$${col}$$res$${std}: $$tst"; \ done; \ if test "$$all" -eq 1; then \ tests="test"; \ All=""; \ else \ tests="tests"; \ All="All "; \ fi; \ if test "$$failed" -eq 0; then \ if test "$$xfail" -eq 0; then \ banner="$$All$$all $$tests passed"; \ else \ if test "$$xfail" -eq 1; then failures=failure; else failures=failures; fi; \ banner="$$All$$all $$tests behaved as expected ($$xfail expected $$failures)"; \ fi; \ else \ if test "$$xpass" -eq 0; then \ banner="$$failed of $$all $$tests failed"; \ else \ if test "$$xpass" -eq 1; then passes=pass; else passes=passes; fi; \ banner="$$failed of $$all $$tests did not behave as expected ($$xpass unexpected $$passes)"; \ fi; \ fi; \ dashes="$$banner"; \ skipped=""; \ if test "$$skip" -ne 0; then \ if test "$$skip" -eq 1; then \ skipped="($$skip test was not run)"; \ else \ skipped="($$skip tests were not run)"; \ fi; \ test `echo "$$skipped" | wc -c` -le `echo "$$banner" | wc -c` || \ dashes="$$skipped"; \ fi; \ report=""; \ if test "$$failed" -ne 0 && test -n "$(PACKAGE_BUGREPORT)"; then \ report="Please report to $(PACKAGE_BUGREPORT)"; \ test `echo "$$report" | wc -c` -le `echo "$$banner" | wc -c` || \ dashes="$$report"; \ fi; \ dashes=`echo "$$dashes" | sed s/./=/g`; \ if test "$$failed" -eq 0; then \ echo "$$grn$$dashes"; \ else \ echo "$$red$$dashes"; \ fi; \ echo "$$banner"; \ test -z "$$skipped" || echo "$$skipped"; \ test -z "$$report" || echo "$$report"; \ echo "$$dashes$$std"; \ test "$$failed" -eq 0; \ else :; fi distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done @HAVE_VALGRIND_FALSE@check-local: check-am: all-am $(MAKE) $(AM_MAKEFLAGS) $(check_PROGRAMS) $(MAKE) $(AM_MAKEFLAGS) check-TESTS check-local check: check-am all-am: Makefile installdirs: install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-checkPROGRAMS clean-generic clean-libtool \ mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: .MAKE: check-am install-am install-strip .PHONY: CTAGS GTAGS all all-am check check-TESTS check-am check-local \ clean clean-checkPROGRAMS clean-generic clean-libtool ctags \ distclean distclean-compile distclean-generic \ distclean-libtool distclean-tags distdir dvi dvi-am html \ html-am info info-am install install-am install-data \ install-data-am install-dvi install-dvi-am install-exec \ install-exec-am install-html install-html-am install-info \ install-info-am install-man install-pdf install-pdf-am \ install-ps install-ps-am install-strip installcheck \ installcheck-am installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-compile \ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ tags uninstall uninstall-am @HAVE_VALGRIND_TRUE@check-local: @HAVE_VALGRIND_TRUE@ $(MAKE) valgrind @HAVE_VALGRIND_TRUE@%.valgrind: % @HAVE_VALGRIND_TRUE@ $(LIBTOOL) --mode=execute \ @HAVE_VALGRIND_TRUE@ $(VALGRIND) -q \ @HAVE_VALGRIND_TRUE@ --tool=memcheck --leak-check=full --trace-children=yes \ @HAVE_VALGRIND_TRUE@ --leak-resolution=high --num-callers=20 \ @HAVE_VALGRIND_TRUE@ $* 2>&1 | tee valgrind.log @HAVE_VALGRIND_TRUE@ @if grep "==" valgrind.log > /dev/null 2>&1; then \ @HAVE_VALGRIND_TRUE@ rm valgrind.log; \ @HAVE_VALGRIND_TRUE@ exit 1; \ @HAVE_VALGRIND_TRUE@ fi @HAVE_VALGRIND_TRUE@ @rm valgrind.log @HAVE_VALGRIND_TRUE@valgrind: $(TESTS) @HAVE_VALGRIND_TRUE@ @echo "Valgrinding tests ..." @HAVE_VALGRIND_TRUE@ @failed=0; \ @HAVE_VALGRIND_TRUE@ for t in $(TESTS); do \ @HAVE_VALGRIND_TRUE@ $(MAKE) $$t.valgrind; \ @HAVE_VALGRIND_TRUE@ if test "$$?" -ne 0; then \ @HAVE_VALGRIND_TRUE@ echo "Valgrind error for test $$t"; \ @HAVE_VALGRIND_TRUE@ failed=`expr $$failed + 1`; \ @HAVE_VALGRIND_TRUE@ whicht="$$whicht $$t"; \ @HAVE_VALGRIND_TRUE@ fi; \ @HAVE_VALGRIND_TRUE@ done; \ @HAVE_VALGRIND_TRUE@ if test "$$failed" -ne 0; then \ @HAVE_VALGRIND_TRUE@ echo "$$failed tests had leaks or errors under valgrind:"; \ @HAVE_VALGRIND_TRUE@ echo "$$whicht"; \ @HAVE_VALGRIND_TRUE@ false; \ @HAVE_VALGRIND_TRUE@ fi @HAVE_VALGRIND_FALSE@valgrind: -include $(top_srcdir)/git.mk # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: libprelude-1.0.0/tests/async-timer.c0000664000076400007640000000264311202225027014331 00000000000000#include "config.h" #include #include #include #include "prelude.h" #include "glthread/lock.h" struct asyncobj { PRELUDE_ASYNC_OBJECT; int myval; }; static int async_done = 0; static int timer_count = 0; static gl_lock_t lock = gl_lock_initializer; static void timer_cb(void *data) { gl_lock_lock(lock); timer_count++; prelude_timer_reset(data); gl_lock_unlock(lock); } static void async_func(void *obj, void *data) { struct asyncobj *ptr = obj; gl_lock_lock(lock); async_done = 1; assert(ptr->myval == 10); gl_lock_unlock(lock); } int main(void) { prelude_timer_t timer; struct asyncobj myobj; assert(prelude_init(NULL, NULL) == 0); assert(prelude_async_init() == 0); prelude_async_set_flags(PRELUDE_ASYNC_FLAGS_TIMER); prelude_timer_set_expire(&timer, 1); prelude_timer_set_data(&timer, &timer); prelude_timer_set_callback(&timer, timer_cb); prelude_timer_init(&timer); sleep(3); gl_lock_lock(lock); assert(timer_count >= 2); gl_lock_unlock(lock); myobj.myval = 10; prelude_async_set_callback((prelude_async_object_t *) &myobj, async_func); prelude_async_add((prelude_async_object_t *) &myobj); prelude_async_exit(); assert(async_done); exit(0); } libprelude-1.0.0/tests/idmef-message-helper.c0000664000076400007640000000270111322643023016057 00000000000000#include "config.h" #include #include #include #include "prelude.h" #define FLOAT_TOLERANCE 0.0001 #ifndef ABS # define ABS(x) (((x) < 0) ? -(x) : (x)) #endif #ifndef MAX # define MAX(x, y) ((x) > (y) ? (x) : (y)) #endif static double reldif(double a, double b) { double c = ABS(a); double d = ABS(b); d = MAX(c, d); return d == 0.0 ? 0.0 : ABS(a - b) / d; } int main(void) { char *res; double resd; idmef_message_t *idmef; assert(idmef_message_new(&idmef) == 0); assert(idmef_message_set_string(idmef, "alert.classification.text", "Random value") == 0); assert(idmef_message_get_string(idmef, "alert.classification.text", &res) == 0); assert(strcmp("Random value", res) == 0); free(res); assert(idmef_message_set_string(idmef, "alert.assessment.impact.severity", "high") == 0); assert(idmef_message_get_string(idmef, "alert.assessment.impact.severity", &res) == 0); assert(strcmp("high", res) == 0); free(res); assert(idmef_message_set_number(idmef, "alert.assessment.confidence.confidence", 10.2) == 0); assert(idmef_message_get_number(idmef, "alert.assessment.confidence.confidence", &resd) == 0); assert(reldif(resd, 10.2) <= FLOAT_TOLERANCE); assert(idmef_message_set_string(idmef, "alert.assessment.impact.severity", "Random value") < 0); exit(0); } libprelude-1.0.0/tests/idmef-path.c0000664000076400007640000000645711322643477014143 00000000000000#include "config.h" #include #include #include #include "prelude.h" static void set_value_check(idmef_message_t *idmef, const char *paths, const char *str_value, prelude_bool_t verify_get) { idmef_path_t *path; idmef_value_t *value; prelude_string_t *str; prelude_string_t *res; assert(idmef_path_new_fast(&path, paths) == 0); assert(prelude_string_new_ref(&str, str_value) == 0); assert(idmef_value_new_string(&value, str) == 0); if ( verify_get ) assert(idmef_path_set(path, idmef, value) == 0); else assert(idmef_path_set(path, idmef, value) < 0); idmef_value_destroy(value); if ( ! verify_get ) { idmef_path_destroy(path); return; } assert(idmef_path_get(path, idmef, &value) > 0); assert(prelude_string_new(&res) == 0); assert(idmef_value_to_string(value, res) >= 0); assert(strcmp(str_value, prelude_string_get_string(res)) == 0); prelude_string_destroy(res); idmef_value_destroy(value); idmef_path_destroy(path); } int main(void) { int i, ret; idmef_value_t *value; idmef_path_t *path; idmef_message_t *idmef; struct { const char *path; int depth; prelude_bool_t has_list; prelude_bool_t ambiguous; prelude_bool_t successful; } plist[] = { { "alert.classification.text", 3, FALSE, FALSE, TRUE }, { "alert.assessment.impact.severity", 4, FALSE, FALSE, TRUE }, { "alert.source.node.name", 4, TRUE, TRUE, TRUE }, { "alert.target(0).node.name", 4, TRUE, FALSE, TRUE }, { "alert.invalid.path", 0, FALSE, FALSE, FALSE } }; assert(idmef_message_new(&idmef) == 0); for ( i = 0; i < sizeof(plist) / sizeof(*plist); i++ ) { ret = idmef_path_new_fast(&path, plist[i].path); assert((plist[i].successful == TRUE && ret == 0) || (plist[i].successful == FALSE && ret < 0)); if ( ret < 0 ) continue; assert(strcmp(plist[i].path, idmef_path_get_name(path, -1)) == 0); assert(idmef_path_get_depth(path) == plist[i].depth); assert(idmef_path_has_lists(path) == plist[i].has_list); assert(idmef_path_is_ambiguous(path) == plist[i].ambiguous); if ( plist[i].ambiguous ) { idmef_path_destroy(path); continue; } /* * Check whether setting NULL value work. */ ret = idmef_path_set(path, idmef, NULL); assert(ret == 0); ret = idmef_path_get(path, idmef, &value); assert(ret == 0); /* empty value */ idmef_path_destroy(path); } set_value_check(idmef, "alert.classification.text", "Random value", TRUE); set_value_check(idmef, "alert.assessment.impact.severity", "high", TRUE); set_value_check(idmef, "alert.assessment.impact.severity", "Invalid enumeration", FALSE); exit(0); } libprelude-1.0.0/aclocal.m40000664000076400007640000012711611347714435012453 00000000000000# generated automatically by aclocal 1.11.1 -*- Autoconf -*- # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, # 2005, 2006, 2007, 2008, 2009 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. m4_ifndef([AC_AUTOCONF_VERSION], [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.63],, [m4_warning([this file was generated for autoconf 2.63. You have another version of autoconf. It may work, but is not guaranteed to. If you have problems, you may need to regenerate the build system entirely. To do so, use the procedure documented by the package, typically `autoreconf'.])]) # Copyright (C) 2002, 2003, 2005, 2006, 2007, 2008 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. # 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. # (This private macro should not be called outside this file.) AC_DEFUN([AM_AUTOMAKE_VERSION], [am__api_version='1.11' dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to dnl require some minimum version. Point them to the right macro. m4_if([$1], [1.11.1], [], [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl ]) # _AM_AUTOCONF_VERSION(VERSION) # ----------------------------- # aclocal traces this macro to find the Autoconf version. # This is a private macro too. Using m4_define simplifies # the logic in aclocal, which can simply ignore this definition. m4_define([_AM_AUTOCONF_VERSION], []) # AM_SET_CURRENT_AUTOMAKE_VERSION # ------------------------------- # Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced. # This function is AC_REQUIREd by AM_INIT_AUTOMAKE. AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], [AM_AUTOMAKE_VERSION([1.11.1])dnl m4_ifndef([AC_AUTOCONF_VERSION], [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl _AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))]) # AM_AUX_DIR_EXPAND -*- Autoconf -*- # Copyright (C) 2001, 2003, 2005 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. # 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, 2004, 2005, 2006, 2008 # 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. # serial 9 # 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])dnl AC_SUBST([$1_FALSE])dnl _AM_SUBST_NOTMAKE([$1_TRUE])dnl _AM_SUBST_NOTMAKE([$1_FALSE])dnl m4_define([_AM_COND_VALUE_$1], [$2])dnl 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])]) # Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2009 # 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. # serial 10 # 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], UPC, [depcc="$UPC" am_compiler_list=], [$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 am__universal=false m4_case([$1], [CC], [case " $depcc " in #( *\ -arch\ *\ -arch\ *) am__universal=true ;; esac], [CXX], [case " $depcc " in #( *\ -arch\ *\ -arch\ *) am__universal=true ;; esac]) 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 # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with # Solaris 8's {/usr,}/bin/sh. touch sub/conftst$i.h done echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf # 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. Also, some Intel # versions had trouble with output in subdirs am__obj=sub/conftest.${OBJEXT-o} am__minus_obj="-o $am__obj" case $depmode in gcc) # This depmode causes a compiler race in universal mode. test "$am__universal" = false || continue ;; 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 ;; msvisualcpp | msvcmsys) # This compiler won't grok `-c -o', but also, the minuso test has # not run yet. These depmodes are late enough in the game, and # so weak that their functioning should not be impacted. am__obj=conftest.${OBJEXT-o} am__minus_obj= ;; none) break ;; esac if depmode=$depmode \ source=sub/conftest.c object=$am__obj \ depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ >/dev/null 2>conftest.err && grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && grep $am__obj 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 # or remarks (even with -Werror). So we grep stderr for any message # that says an option was ignored or not supported. # When given -MP, icc 7.0 and 7.1 complain thusly: # icc: Command line warning: ignoring option '-M'; no argument required # The diagnosis changed in icc 8.0: # icc: Command line remark: option '-MP' not supported if (grep 'ignoring option' conftest.err || grep 'not supported' 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__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])dnl _AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl ]) # Generate code to set up dependency tracking. -*- Autoconf -*- # Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2008 # 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. #serial 5 # _AM_OUTPUT_DEPENDENCY_COMMANDS # ------------------------------ AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS], [{ # Autoconf 2.62 quotes --file arguments for eval, but not when files # are listed without --file. Let's play safe and only enable the eval # if we detect the quoting. case $CONFIG_FILES in *\'*) eval set x "$CONFIG_FILES" ;; *) set x $CONFIG_FILES ;; esac shift for mf 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. # Grep'ing the whole file is not good either: AIX grep has a line # limit of 2048, but all sed's we know have understand at least 4000. if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then dirpart=`AS_DIRNAME("$mf")` else continue fi # Extract the definition of DEPDIR, am__include, and am__quote # from the Makefile without running `make'. DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` test -z "$DEPDIR" && continue am__include=`sed -n 's/^am__include = //p' < "$mf"` test -z "am__include" && continue am__quote=`sed -n 's/^am__quote = //p' < "$mf"` # When using ansi2knr, U may be empty or an underscore; expand it U=`sed -n 's/^U = //p' < "$mf"` # Find all dependency output files, they are included files with # $(DEPDIR) in their names. 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 " s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/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"]) ]) # Do all the work for Automake. -*- Autoconf -*- # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, # 2005, 2006, 2008, 2009 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. # serial 16 # 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. # 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.62])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 if test "`cd $srcdir && pwd`" != "`pwd`"; then # Use -I$(srcdir) only when $(srcdir) != ., so that make's output # is not polluted with repeated "-I." AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl # test to see if srcdir already configured if test -f $srcdir/config.status; then AC_MSG_ERROR([source directory already configured; run "make distclean" there first]) fi 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 dnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT. m4_if(m4_ifdef([AC_PACKAGE_NAME], 1)m4_ifdef([AC_PACKAGE_VERSION], 1), 11,, [m4_fatal([AC_INIT should be called with package and version arguments])])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) AC_REQUIRE([AM_PROG_INSTALL_SH])dnl AC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl 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([tar-ustar], [_AM_PROG_TAR([ustar])], [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])], [_AM_PROG_TAR([v7])])]) _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 AC_PROVIDE_IFELSE([AC_PROG_OBJC], [_AM_DEPENDENCIES(OBJC)], [define([AC_PROG_OBJC], defn([AC_PROG_OBJC])[_AM_DEPENDENCIES(OBJC)])])dnl ]) _AM_IF_OPTION([silent-rules], [AC_REQUIRE([AM_SILENT_RULES])])dnl dnl The `parallel-tests' driver may need to know about EXEEXT, so add the dnl `am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen. This macro dnl is hooked onto _AC_COMPILER_EXEEXT early, see below. AC_CONFIG_COMMANDS_PRE(dnl [m4_provide_if([_AM_COMPILER_EXEEXT], [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl ]) dnl Hook into `_AC_COMPILER_EXEEXT' early to learn its expansion. Do not dnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further dnl mangled by Autoconf and run in a shell conditional statement. m4_define([_AC_COMPILER_EXEEXT], m4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])]) # 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_arg=$1 _am_stamp_count=1 for _am_header in $config_headers :; do case $_am_header in $_am_arg | $_am_arg:* ) break ;; * ) _am_stamp_count=`expr $_am_stamp_count + 1` ;; esac done echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count]) # Copyright (C) 2001, 2003, 2005, 2008 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. # AM_PROG_INSTALL_SH # ------------------ # Define $install_sh. AC_DEFUN([AM_PROG_INSTALL_SH], [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl if test x"${install_sh}" != xset; then case $am_aux_dir in *\ * | *\ *) install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;; *) install_sh="\${SHELL} $am_aux_dir/install-sh" esac fi AC_SUBST(install_sh)]) # Copyright (C) 2003, 2005 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. # serial 2 # 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])]) # Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2005 # 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. # serial 5 # AM_PROG_LEX # ----------- # Autoconf leaves LEX=: if lex or flex can't be found. Change that to a # "missing" invocation, for better error output. AC_DEFUN([AM_PROG_LEX], [AC_PREREQ(2.50)dnl AC_REQUIRE([AM_MISSING_HAS_RUN])dnl AC_REQUIRE([AC_PROG_LEX])dnl if test "$LEX" = :; then LEX=${am_missing_run}flex fi]) # Add --enable-maintainer-mode option to configure. -*- Autoconf -*- # From Jim Meyering # Copyright (C) 1996, 1998, 2000, 2001, 2002, 2003, 2004, 2005, 2008 # 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. # serial 5 # AM_MAINTAINER_MODE([DEFAULT-MODE]) # ---------------------------------- # Control maintainer-specific portions of Makefiles. # Default is to disable them, unless `enable' is passed literally. # For symmetry, `disable' may be passed as well. Anyway, the user # can override the default with the --enable/--disable switch. AC_DEFUN([AM_MAINTAINER_MODE], [m4_case(m4_default([$1], [disable]), [enable], [m4_define([am_maintainer_other], [disable])], [disable], [m4_define([am_maintainer_other], [enable])], [m4_define([am_maintainer_other], [enable]) m4_warn([syntax], [unexpected argument to AM@&t@_MAINTAINER_MODE: $1])]) AC_MSG_CHECKING([whether to am_maintainer_other maintainer-specific portions of Makefiles]) dnl maintainer-mode's default is 'disable' unless 'enable' is passed AC_ARG_ENABLE([maintainer-mode], [ --][am_maintainer_other][-maintainer-mode am_maintainer_other make rules and dependencies not useful (and sometimes confusing) to the casual installer], [USE_MAINTAINER_MODE=$enableval], [USE_MAINTAINER_MODE=]m4_if(am_maintainer_other, [enable], [no], [yes])) AC_MSG_RESULT([$USE_MAINTAINER_MODE]) AM_CONDITIONAL([MAINTAINER_MODE], [test $USE_MAINTAINER_MODE = yes]) MAINT=$MAINTAINER_MODE_TRUE AC_SUBST([MAINT])dnl ] ) AU_DEFUN([jm_MAINTAINER_MODE], [AM_MAINTAINER_MODE]) # Check to see how 'make' treats includes. -*- Autoconf -*- # Copyright (C) 2001, 2002, 2003, 2005, 2009 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. # serial 4 # 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 this is the am__doit target .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 # Ignore all kinds of additional output from `make'. case `$am_make -s -f confmf 2> /dev/null` in #( *the\ am__doit\ target*) am__include=include am__quote= _am_result=GNU ;; esac # Now try BSD make style include. if test "$am__include" = "#"; then echo '.include "confinc"' > confmf case `$am_make -s -f confmf 2> /dev/null` in #( *the\ am__doit\ target*) am__include=.include am__quote="\"" _am_result=BSD ;; esac fi AC_SUBST([am__include]) AC_SUBST([am__quote]) AC_MSG_RESULT([$_am_result]) rm -f confinc confmf ]) # Copyright (C) 1999, 2000, 2001, 2003, 2004, 2005, 2008 # 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. # serial 6 # AM_PROG_CC_C_O # -------------- # Like AC_PROG_CC_C_O, but changed for automake. AC_DEFUN([AM_PROG_CC_C_O], [AC_REQUIRE([AC_PROG_CC_C_O])dnl AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl AC_REQUIRE_AUX_FILE([compile])dnl # FIXME: we rely on the cache variable name because # there is no other way. set dummy $CC am_cc=`echo $[2] | sed ['s/[^a-zA-Z0-9_]/_/g;s/^[0-9]/_/']` eval am_t=\$ac_cv_prog_cc_${am_cc}_c_o if test "$am_t" != yes; then # Losing compiler, so override with the script. # FIXME: It is wrong to rewrite CC. # But if we don't then we get into trouble of one sort or another. # A longer-term fix would be to have automake use am__CC in this case, # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)" CC="$am_aux_dir/compile $CC" fi dnl Make sure AC_PROG_CC is never called again, or it will override our dnl setting of CC. m4_define([AC_PROG_CC], [m4_fatal([AC_PROG_CC cannot be called after AM_PROG_CC_C_O])]) ]) # Fake the existence of programs that GNU maintainers use. -*- Autoconf -*- # Copyright (C) 1997, 1999, 2000, 2001, 2003, 2004, 2005, 2008 # 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. # serial 6 # 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 AC_REQUIRE_AUX_FILE([missing])dnl if test x"${MISSING+set}" != xset; then case $am_aux_dir in *\ * | *\ *) MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;; *) MISSING="\${SHELL} $am_aux_dir/missing" ;; esac fi # 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 ]) # Copyright (C) 2003, 2004, 2005, 2006 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. # AM_PROG_MKDIR_P # --------------- # Check for `mkdir -p'. AC_DEFUN([AM_PROG_MKDIR_P], [AC_PREREQ([2.60])dnl AC_REQUIRE([AC_PROG_MKDIR_P])dnl dnl Automake 1.8 to 1.9.6 used to define mkdir_p. We now use MKDIR_P, dnl while keeping a definition of mkdir_p for backward compatibility. dnl @MKDIR_P@ is magic: AC_OUTPUT adjusts its value for each Makefile. dnl However we cannot define mkdir_p as $(MKDIR_P) for the sake of dnl Makefile.ins that do not define MKDIR_P, so we do our own dnl adjustment using top_builddir (which is defined more often than dnl MKDIR_P). AC_SUBST([mkdir_p], ["$MKDIR_P"])dnl case $mkdir_p in [[\\/$]]* | ?:[[\\/]]*) ;; */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;; esac ]) # Helper functions for option handling. -*- Autoconf -*- # Copyright (C) 2001, 2002, 2003, 2005, 2008 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. # serial 4 # _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], [m4_foreach_w([_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])]) # Check to make sure that the build environment is sane. -*- Autoconf -*- # Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005, 2008 # 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. # serial 5 # 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 # Reject unsafe characters in $srcdir or the absolute working directory # name. Accept space and tab only in the latter. am_lf=' ' case `pwd` in *[[\\\"\#\$\&\'\`$am_lf]]*) AC_MSG_ERROR([unsafe absolute working directory name]);; esac case $srcdir in *[[\\\"\#\$\&\'\`$am_lf\ \ ]]*) AC_MSG_ERROR([unsafe srcdir value: `$srcdir']);; esac # 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)]) # Copyright (C) 2001, 2003, 2005 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. # AM_PROG_INSTALL_STRIP # --------------------- # 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="\$(install_sh) -c -s" AC_SUBST([INSTALL_STRIP_PROGRAM])]) # Copyright (C) 2006, 2008 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. # serial 2 # _AM_SUBST_NOTMAKE(VARIABLE) # --------------------------- # Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in. # This macro is traced by Automake. AC_DEFUN([_AM_SUBST_NOTMAKE]) # AM_SUBST_NOTMAKE(VARIABLE) # --------------------------- # Public sister of _AM_SUBST_NOTMAKE. AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)]) # Check how to create a tarball. -*- Autoconf -*- # Copyright (C) 2004, 2005 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. # serial 2 # _AM_PROG_TAR(FORMAT) # -------------------- # Check how to create a tarball in format FORMAT. # FORMAT should be one of `v7', `ustar', or `pax'. # # Substitute a variable $(am__tar) that is a command # writing to stdout a FORMAT-tarball containing the directory # $tardir. # tardir=directory && $(am__tar) > result.tar # # Substitute a variable $(am__untar) that extract such # a tarball read from stdin. # $(am__untar) < result.tar AC_DEFUN([_AM_PROG_TAR], [# Always define AMTAR for backward compatibility. AM_MISSING_PROG([AMTAR], [tar]) m4_if([$1], [v7], [am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'], [m4_case([$1], [ustar],, [pax],, [m4_fatal([Unknown tar format])]) AC_MSG_CHECKING([how to create a $1 tar archive]) # Loop over all known methods to create a tar archive until one works. _am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none' _am_tools=${am_cv_prog_tar_$1-$_am_tools} # Do not fold the above two line into one, because Tru64 sh and # Solaris sh will not grok spaces in the rhs of `-'. for _am_tool in $_am_tools do case $_am_tool in gnutar) for _am_tar in tar gnutar gtar; do AM_RUN_LOG([$_am_tar --version]) && break done am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"' am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"' am__untar="$_am_tar -xf -" ;; plaintar) # Must skip GNU tar: if it does not support --format= it doesn't create # ustar tarball either. (tar --version) >/dev/null 2>&1 && continue am__tar='tar chf - "$$tardir"' am__tar_='tar chf - "$tardir"' am__untar='tar xf -' ;; pax) am__tar='pax -L -x $1 -w "$$tardir"' am__tar_='pax -L -x $1 -w "$tardir"' am__untar='pax -r' ;; cpio) am__tar='find "$$tardir" -print | cpio -o -H $1 -L' am__tar_='find "$tardir" -print | cpio -o -H $1 -L' am__untar='cpio -i -H $1 -d' ;; none) am__tar=false am__tar_=false am__untar=false ;; esac # If the value was cached, stop now. We just wanted to have am__tar # and am__untar set. test -n "${am_cv_prog_tar_$1}" && break # tar/untar a dummy directory, and stop if the command works rm -rf conftest.dir mkdir conftest.dir echo GrepMe > conftest.dir/file AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar]) rm -rf conftest.dir if test -s conftest.tar; then AM_RUN_LOG([$am__untar /dev/null 2>&1 && break fi done rm -rf conftest.dir AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool]) AC_MSG_RESULT([$am_cv_prog_tar_$1])]) AC_SUBST([am__tar]) AC_SUBST([am__untar]) ]) # _AM_PROG_TAR m4_include([libmissing/m4/00gnulib.m4]) m4_include([libmissing/m4/alloca.m4]) m4_include([libmissing/m4/arpa_inet_h.m4]) m4_include([libmissing/m4/btowc.m4]) m4_include([libmissing/m4/close.m4]) m4_include([libmissing/m4/codeset.m4]) m4_include([libmissing/m4/cond.m4]) m4_include([libmissing/m4/dos.m4]) m4_include([libmissing/m4/dup2.m4]) m4_include([libmissing/m4/errno_h.m4]) m4_include([libmissing/m4/exponentd.m4]) m4_include([libmissing/m4/exponentf.m4]) m4_include([libmissing/m4/exponentl.m4]) m4_include([libmissing/m4/extensions.m4]) m4_include([libmissing/m4/fclose.m4]) m4_include([libmissing/m4/fcntl-o.m4]) m4_include([libmissing/m4/fcntl_h.m4]) m4_include([libmissing/m4/float_h.m4]) m4_include([libmissing/m4/fopen.m4]) m4_include([libmissing/m4/fpieee.m4]) m4_include([libmissing/m4/frexp.m4]) m4_include([libmissing/m4/frexpl.m4]) m4_include([libmissing/m4/fseeko.m4]) m4_include([libmissing/m4/ftw.m4]) m4_include([libmissing/m4/getaddrinfo.m4]) m4_include([libmissing/m4/getdelim.m4]) m4_include([libmissing/m4/gethostname.m4]) m4_include([libmissing/m4/getline.m4]) m4_include([libmissing/m4/getpagesize.m4]) m4_include([libmissing/m4/getpass.m4]) m4_include([libmissing/m4/gettimeofday.m4]) m4_include([libmissing/m4/glibc21.m4]) m4_include([libmissing/m4/gnulib-common.m4]) m4_include([libmissing/m4/gnulib-comp.m4]) m4_include([libmissing/m4/gnulib-tool.m4]) m4_include([libmissing/m4/hostent.m4]) m4_include([libmissing/m4/include_next.m4]) m4_include([libmissing/m4/inet_ntop.m4]) m4_include([libmissing/m4/inet_pton.m4]) m4_include([libmissing/m4/intmax_t.m4]) m4_include([libmissing/m4/inttypes_h.m4]) m4_include([libmissing/m4/isnand.m4]) m4_include([libmissing/m4/isnanf.m4]) m4_include([libmissing/m4/isnanl.m4]) m4_include([libmissing/m4/langinfo_h.m4]) m4_include([libmissing/m4/ldexpl.m4]) m4_include([libmissing/m4/lib-ld.m4]) m4_include([libmissing/m4/lib-link.m4]) m4_include([libmissing/m4/lib-prefix.m4]) m4_include([libmissing/m4/localcharset.m4]) m4_include([libmissing/m4/locale-fr.m4]) m4_include([libmissing/m4/locale-ja.m4]) m4_include([libmissing/m4/locale-tr.m4]) m4_include([libmissing/m4/locale-zh.m4]) m4_include([libmissing/m4/lock.m4]) m4_include([libmissing/m4/longlong.m4]) m4_include([libmissing/m4/lseek.m4]) m4_include([libmissing/m4/lstat.m4]) m4_include([libmissing/m4/malloc.m4]) m4_include([libmissing/m4/math_h.m4]) m4_include([libmissing/m4/mbrtowc.m4]) m4_include([libmissing/m4/mbsinit.m4]) m4_include([libmissing/m4/mbstate_t.m4]) m4_include([libmissing/m4/memchr.m4]) m4_include([libmissing/m4/memmem.m4]) m4_include([libmissing/m4/minmax.m4]) m4_include([libmissing/m4/mktime.m4]) m4_include([libmissing/m4/mmap-anon.m4]) m4_include([libmissing/m4/mode_t.m4]) m4_include([libmissing/m4/multiarch.m4]) m4_include([libmissing/m4/netdb_h.m4]) m4_include([libmissing/m4/netinet_in_h.m4]) m4_include([libmissing/m4/nl_langinfo.m4]) m4_include([libmissing/m4/nocrash.m4]) m4_include([libmissing/m4/onceonly.m4]) m4_include([libmissing/m4/open.m4]) m4_include([libmissing/m4/pathmax.m4]) m4_include([libmissing/m4/perror.m4]) m4_include([libmissing/m4/poll.m4]) m4_include([libmissing/m4/printf-frexp.m4]) m4_include([libmissing/m4/printf-frexpl.m4]) m4_include([libmissing/m4/printf.m4]) m4_include([libmissing/m4/realloc.m4]) m4_include([libmissing/m4/regex.m4]) m4_include([libmissing/m4/relocatable-lib.m4]) m4_include([libmissing/m4/select.m4]) m4_include([libmissing/m4/servent.m4]) m4_include([libmissing/m4/signal_h.m4]) m4_include([libmissing/m4/signalblocking.m4]) m4_include([libmissing/m4/signbit.m4]) m4_include([libmissing/m4/size_max.m4]) m4_include([libmissing/m4/sleep.m4]) m4_include([libmissing/m4/snprintf-posix.m4]) m4_include([libmissing/m4/snprintf.m4]) m4_include([libmissing/m4/sockets.m4]) m4_include([libmissing/m4/socklen.m4]) m4_include([libmissing/m4/sockpfaf.m4]) m4_include([libmissing/m4/ssize_t.m4]) m4_include([libmissing/m4/stat.m4]) m4_include([libmissing/m4/stdbool.m4]) m4_include([libmissing/m4/stddef_h.m4]) m4_include([libmissing/m4/stdint.m4]) m4_include([libmissing/m4/stdint_h.m4]) m4_include([libmissing/m4/stdio_h.m4]) m4_include([libmissing/m4/stdlib_h.m4]) m4_include([libmissing/m4/strcase.m4]) m4_include([libmissing/m4/strcasestr.m4]) m4_include([libmissing/m4/strdup.m4]) m4_include([libmissing/m4/strerror.m4]) m4_include([libmissing/m4/string_h.m4]) m4_include([libmissing/m4/strings_h.m4]) m4_include([libmissing/m4/strndup.m4]) m4_include([libmissing/m4/strnlen.m4]) m4_include([libmissing/m4/strptime.m4]) m4_include([libmissing/m4/strsep.m4]) m4_include([libmissing/m4/symlink.m4]) m4_include([libmissing/m4/sys_ioctl_h.m4]) m4_include([libmissing/m4/sys_select_h.m4]) m4_include([libmissing/m4/sys_socket_h.m4]) m4_include([libmissing/m4/sys_stat_h.m4]) m4_include([libmissing/m4/sys_time_h.m4]) m4_include([libmissing/m4/sys_utsname_h.m4]) m4_include([libmissing/m4/thread.m4]) m4_include([libmissing/m4/threadlib.m4]) m4_include([libmissing/m4/time_h.m4]) m4_include([libmissing/m4/time_r.m4]) m4_include([libmissing/m4/timegm.m4]) m4_include([libmissing/m4/tls.m4]) m4_include([libmissing/m4/tm_gmtoff.m4]) m4_include([libmissing/m4/uname.m4]) m4_include([libmissing/m4/ungetc.m4]) m4_include([libmissing/m4/unistd_h.m4]) m4_include([libmissing/m4/vasnprintf.m4]) m4_include([libmissing/m4/vsnprintf-posix.m4]) m4_include([libmissing/m4/vsnprintf.m4]) m4_include([libmissing/m4/warn-on-use.m4]) m4_include([libmissing/m4/wchar.m4]) m4_include([libmissing/m4/wchar_t.m4]) m4_include([libmissing/m4/wcrtomb.m4]) m4_include([libmissing/m4/wctob.m4]) m4_include([libmissing/m4/wctype.m4]) m4_include([libmissing/m4/wint_t.m4]) m4_include([libmissing/m4/write.m4]) m4_include([libmissing/m4/xsize.m4]) m4_include([libmissing/m4/yield.m4]) m4_include([m4/ac_compile_check_sizeof.m4]) m4_include([m4/am_path_ruby.m4]) m4_include([m4/argz.m4]) m4_include([m4/as-ac-expand.m4]) m4_include([m4/ax_c_check_flag.m4]) m4_include([m4/ax_check_aligned_access_required.m4]) m4_include([m4/ax_create_prelude_inttypes_h.m4]) m4_include([m4/ax_ld_check_flag.m4]) m4_include([m4/gtk-doc.m4]) m4_include([m4/libgcrypt.m4]) m4_include([m4/libgnutls-extra.m4]) m4_include([m4/libgnutls.m4]) m4_include([m4/libtool.m4]) m4_include([m4/ltdl.m4]) m4_include([m4/ltoptions.m4]) m4_include([m4/ltsugar.m4]) m4_include([m4/ltversion.m4]) m4_include([m4/lt~obsolete.m4]) m4_include([m4/pkg.m4]) libprelude-1.0.0/ChangeLog0000664000076400007640000611331411347715001012354 00000000000000# Generated by Makefile. Do not edit. commit 78ca8ac53f9c0f9071fcc9a8e975342bea40c641 Author: Yoann Vandoorselaere Date: Tue Mar 16 15:46:51 2010 +0100 Update NEWS, bump version number NEWS | 6 ++++++ configure.in | 4 ++-- docs/api/libprelude-decl.txt | 2 +- 3 files changed, 9 insertions(+), 3 deletions(-) commit 5245209e041a9f3e51b844ec91ece07a1c608190 Author: Yoann Vandoorselaere Date: Mon Feb 8 11:18:30 2010 +0100 Use posix version of GnuLib snprintf/vsnprintf module Prelude user can now rely on C99 format definition when using prelude-string. libmissing/Makefile.am | 185 ++- libmissing/fpucw.h | 107 ++ libmissing/frexp.c | 166 ++ libmissing/frexpl.c | 18 + libmissing/isnan.c | 173 ++ libmissing/isnand-nolibm.h | 33 + libmissing/isnand.c | 19 + libmissing/isnanf-nolibm.h | 33 + libmissing/isnanf.c | 20 + libmissing/isnanl-nolibm.h | 33 + libmissing/isnanl.c | 20 + libmissing/m4/exponentd.m4 | 114 ++ libmissing/m4/exponentf.m4 | 91 + libmissing/m4/exponentl.m4 | 97 + libmissing/m4/fpieee.m4 | 52 + libmissing/m4/frexp.m4 | 146 ++ libmissing/m4/frexpl.m4 | 186 ++ libmissing/m4/getdelim.m4 | 65 +- libmissing/m4/getline.m4 | 38 +- libmissing/m4/gettimeofday.m4 | 61 +- libmissing/m4/gnulib-cache.m4 | 6 +- libmissing/m4/gnulib-comp.m4 | 80 + libmissing/m4/isnand.m4 | 95 + libmissing/m4/isnanf.m4 | 179 ++ libmissing/m4/isnanl.m4 | 245 +++ libmissing/m4/ldexpl.m4 | 88 + libmissing/m4/math_h.m4 | 128 ++ libmissing/m4/nocrash.m4 | 102 + libmissing/m4/printf-frexp.m4 | 45 + libmissing/m4/printf-frexpl.m4 | 64 + libmissing/m4/regex.m4 | 7 + libmissing/m4/signbit.m4 | 287 +++ libmissing/m4/snprintf-posix.m4 | 126 ++ libmissing/m4/stdio_h.m4 | 3 +- libmissing/m4/sys_time_h.m4 | 44 +- libmissing/m4/vsnprintf-posix.m4 | 127 ++ libmissing/math.in.h | 633 +++++++ libmissing/printf-frexp.c | 188 ++ libmissing/printf-frexp.h | 23 + libmissing/printf-frexpl.c | 18 + libmissing/printf-frexpl.h | 23 + libmissing/regcomp.c | 15 +- libmissing/signbitd.c | 64 + libmissing/signbitf.c | 64 + libmissing/signbitl.c | 64 + libmissing/stdio.in.h | 6 +- libmissing/sys_time.in.h | 16 +- libmissing/tests/Makefile.am | 102 + libmissing/tests/ignore-value.h | 37 + libmissing/tests/nan.h | 60 + libmissing/tests/test-frexp.c | 199 ++ libmissing/tests/test-frexpl.c | 223 +++ libmissing/tests/test-getdelim.c | 19 +- libmissing/tests/test-getline.c | 19 +- libmissing/tests/test-gettimeofday.c | 8 +- libmissing/tests/test-isnand-nolibm.c | 22 + libmissing/tests/test-isnand.h | 65 + libmissing/tests/test-isnanf-nolibm.c | 21 + libmissing/tests/test-isnanf.h | 67 + libmissing/tests/test-isnanl-nolibm.c | 23 + libmissing/tests/test-isnanl.h | 141 ++ libmissing/tests/test-lstat.c | 3 +- libmissing/tests/test-math.c | 53 + libmissing/tests/test-poll.c | 2 +- libmissing/tests/test-printf-frexp.c | 119 ++ libmissing/tests/test-printf-frexpl.c | 134 ++ libmissing/tests/test-signbit.c | 197 ++ libmissing/tests/test-snprintf-posix.c | 38 + libmissing/tests/test-snprintf-posix.h | 3113 +++++++++++++++++++++++++++++++ libmissing/tests/test-symlink.c | 3 +- libmissing/tests/test-vsnprintf-posix.c | 51 + 71 files changed, 9026 insertions(+), 90 deletions(-) commit 7e5d8ca799e0ad4d9b10dc160b22ba6b35c03082 Author: Yoann Vandoorselaere Date: Fri Jan 29 17:16:44 2010 +0100 Update NEWS, bump version NEWS | 38 +++++++++++++++++++++++++++++++++++++ configure.in | 16 +++++++------- docs/api/libprelude-decl.txt | 16 ++++++++++++-- docs/api/libprelude-sections.txt | 2 + docs/api/tmpl/prelude-option.sgml | 18 +++++++++++++++++ 5 files changed, 79 insertions(+), 11 deletions(-) commit 4c93305382bbb0ac632637b150202b3b9f0d9d4a Author: Yoann Vandoorselaere Date: Fri Jan 29 17:14:51 2010 +0100 Compilation fixes for WIN32 Python bindings bindings/libpreludecpp.i | 6 +++- bindings/python/libpreludecpp-python.i | 3 -- bindings/python/setup.py.in | 2 +- configure.in | 33 +++++++++++++++++-------------- 4 files changed, 23 insertions(+), 21 deletions(-) commit 590610e9de158ab518dd887e66413e3f8aaf9eee Author: Yoann Vandoorselaere Date: Fri Jan 29 11:18:36 2010 +0100 Move libprelude_perl.i to the Perl bindings directory bindings/low-level/Makefile.am | 4 +- bindings/low-level/libprelude.i | 2 +- bindings/low-level/libprelude_perl.i | 376 ----------------------------- bindings/low-level/perl/libprelude_perl.i | 376 +++++++++++++++++++++++++++++ 4 files changed, 379 insertions(+), 379 deletions(-) commit d496681bd7449d284b845c8f67b220a02804ae96 Author: Yoann Vandoorselaere Date: Thu Jan 21 21:45:14 2010 +0100 Workaround Win32 compilation error bindings/c++/include/prelude-log.hxx | 3 +++ 1 files changed, 3 insertions(+), 0 deletions(-) commit d07c76e008a486d3e2accffefeb4a646f5181763 Author: Yoann Vandoorselaere Date: Thu Jan 21 21:43:26 2010 +0100 Fix Win32 compatibility breakage dues to a GnuTLS change GnuTLS seems to use internal send/recv function that are incompatible with the way we manage socket on Win32 system. This change introduce our own push/pull function callback, used by GnuTLS, and restore Win32 compatibility. prelude-admin/prelude-admin.c | 48 +++++++++++++++++++++++++++++++++++------ prelude-admin/server.c | 47 +++++++++++++++++++++++++++++++++++----- src/tls-auth.c | 32 +++++++++++++++++++++++++- 3 files changed, 112 insertions(+), 15 deletions(-) commit 62ce31ccfbb1d55cafbc6d6432cf2967825f7552 Author: Yoann Vandoorselaere Date: Wed Jan 20 18:15:17 2010 +0100 Update GnuLib code libmissing/Makefile.am | 110 +++++----- libmissing/arpa_inet.in.h | 20 +- libmissing/langinfo.in.h | 10 +- libmissing/m4/arpa_inet_h.m4 | 12 +- libmissing/m4/fcntl_h.m4 | 8 +- libmissing/m4/gnulib-common.m4 | 10 +- libmissing/m4/gnulib-comp.m4 | 3 +- libmissing/m4/langinfo_h.m4 | 7 +- libmissing/m4/signal_h.m4 | 8 +- libmissing/m4/stdio_h.m4 | 10 +- libmissing/m4/stdlib_h.m4 | 16 ++- libmissing/m4/string_h.m4 | 9 +- libmissing/m4/strings_h.m4 | 6 + libmissing/m4/sys_ioctl_h.m4 | 11 +- libmissing/m4/sys_select_h.m4 | 13 +- libmissing/m4/sys_socket_h.m4 | 14 ++- libmissing/m4/sys_stat_h.m4 | 7 +- libmissing/m4/sys_utsname_h.m4 | 7 +- libmissing/m4/unistd_h.m4 | 21 ++- libmissing/m4/warn-on-use.m4 | 45 ++++ libmissing/m4/wchar.m4 | 15 ++- libmissing/regcomp.c | 111 ++++++----- libmissing/regex_internal.c | 97 +++++----- libmissing/regex_internal.h | 17 ++ libmissing/regexec.c | 146 +++++++------- libmissing/signal.in.h | 68 +++--- libmissing/stdio.in.h | 374 +++++++++++++++++++--------------- libmissing/stdlib.in.h | 185 ++++++++--------- libmissing/string.in.h | 230 ++++++++++----------- libmissing/strings.in.h | 35 ++-- libmissing/sys_ioctl.in.h | 10 +- libmissing/sys_select.in.h | 10 +- libmissing/sys_socket.in.h | 122 ++++++------ libmissing/sys_stat.in.h | 100 +++++----- libmissing/sys_utsname.in.h | 12 +- libmissing/tests/Makefile.am | 66 +++---- libmissing/tests/fcntl.in.h | 31 ++-- libmissing/tests/test-cond.c | 1 + libmissing/tests/test-fseeko.c | 6 +- libmissing/tests/test-gethostname.c | 2 +- libmissing/tests/test-gettimeofday.c | 2 +- libmissing/tests/test-memchr.c | 2 +- libmissing/tests/test-memmem.c | 2 +- libmissing/tests/test-poll.c | 2 +- libmissing/tests/test-sockets.c | 2 +- libmissing/unistd.in.h | 309 ++++++++++++++-------------- libmissing/vasnprintf.h | 15 +- libmissing/wchar.in.h | 92 ++++---- warn-on-use.h | 75 +++++++ 49 files changed, 1393 insertions(+), 1093 deletions(-) commit 889abf08214e13cc37141b6623f3398f88ffdfdc Author: Yoann Vandoorselaere Date: Wed Jan 20 18:11:28 2010 +0100 Fix warning prelude-admin/server.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) commit 863032806d52c96ad222f6a255387b2046be3d81 Author: Yoann Vandoorselaere Date: Wed Jan 20 17:31:36 2010 +0100 Remove --enable-easy-bindings from DISTCHECK_CONFIGURE_FLAGS This is now enabled by default. Makefile.am | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) commit 171ce0faf72efc2ec156ca51d104aa80c570b51a Author: Yoann Vandoorselaere Date: Wed Jan 20 17:30:24 2010 +0100 Cleanup PKG_CHECK_MODULES Remove not needed PKG_CHECK_EXISTS() call, fixes gnutls-extra header check. configure.in | 14 ++++++-------- 1 files changed, 6 insertions(+), 8 deletions(-) commit 6d43c53505a3071d4b66e4d2a4aa13a56bb80934 Author: Yoann Vandoorselaere Date: Wed Jan 20 15:51:54 2010 +0100 Prevent unsafe modification of Libprelude provided Analyzer object Modifying the idmef_node_t or idmef_address_t object within an idmef_analyzer_t retrieved through prelude_client_get_analyzer() could result in undefined behavior when the analyzer was later accessed through the administrative console. src/include/prelude-option.h | 15 +++-- src/prelude-client.c | 136 +++++++++++++++++++++++++++++++++++------- src/prelude-option.c | 13 ++++ 3 files changed, 137 insertions(+), 27 deletions(-) commit e5144093e11a987116175a073fb1c44572caeb42 Author: Yoann Vandoorselaere Date: Wed Jan 20 15:40:29 2010 +0100 Default to 2048 bits TLS keys http://www.rsa.com/rsalabs/node.asp?id=2007 tls.conf | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) commit 2a5c07f93ca963760b303b383e3adec0304443c9 Author: Yoann Vandoorselaere Date: Wed Jan 20 15:37:43 2010 +0100 Prevent IDMEF copy from failing if a required children is unavailable The previous behavior when copying an IDMEF object was to fail if one of the children to be copied was required but unavailable. Since we don't want to make assumption in the API (the caller could temporarily destroy a required children, to recreate it later), carry on with the copy if one of the required children is not available. src/idmef-tree-wrap.c | 176 ++++++++++++++-------- src/idmef-wrappers-gen/GenerateIDMEFTreeWrapC.pm | 8 +- 2 files changed, 115 insertions(+), 69 deletions(-) commit b8187d69561efca533697fd976b5f8597f923c4a Author: Yoann Vandoorselaere Date: Mon Jan 18 17:46:37 2010 +0100 Fixes some warnings uncovered by -Wextra prelude-admin/prelude-admin.c | 27 ++++---- prelude-admin/server.c | 22 +++--- prelude-admin/tls-register.c | 12 ++-- src/common.c | 4 +- src/config-engine.c | 27 ++++---- src/idmef-additional-data.c | 4 +- src/idmef-class.c | 6 +- src/idmef-criterion-value.c | 7 +- src/idmef-message-helpers.c | 1 + src/idmef-path.c | 18 +++-- src/idmef-tree-wrap.c | 80 +++++++++++----------- src/idmef-value-type.c | 10 ++- src/idmef-wrappers-gen/GenerateIDMEFTreeData.pm | 7 +- src/idmef-wrappers-gen/GenerateIDMEFTreeWrapC.pm | 4 +- src/include/idmef-path.h | 4 +- src/include/idmef-tree-data.h | 50 +++++++------- src/libprelude-error/strerror.c | 2 +- src/libprelude-error/strsource.c | 2 +- src/prelude-connection.c | 24 ++++--- src/prelude-failover.c | 10 ++-- src/prelude-io.c | 7 +- src/prelude-log.c | 8 +- src/prelude-option-wide.c | 2 +- src/prelude-string.c | 2 +- src/prelude.c | 12 +++- 25 files changed, 190 insertions(+), 162 deletions(-) commit 0226b50f6ea31f8b81144d4c792d944d51ba5ccc Author: Yoann Vandoorselaere Date: Mon Jan 18 19:19:57 2010 +0100 Whitespace police src/prelude-hash.c | 154 ++++++++++++++++++++++++++-------------------------- 1 files changed, 77 insertions(+), 77 deletions(-) commit 31c57aa4b5bdb9e57392f37d39b0330c854cab0f Author: Yoann Vandoorselaere Date: Sun Jan 17 01:58:45 2010 +0100 EasyBindings are now enabled by default configure.in | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) commit 5c0053dd8ac606040e10a9a489e0d36e3ea52e44 Author: Yoann Vandoorselaere Date: Wed Jan 13 17:37:51 2010 +0100 Improve retrieval of list of IDMEF object When retrieving a list of IDMEF object, return a Python list containing one IDMEFValue for each object. This behavior is more consistant than retrieving a single IDMEFValue carrying the whole list, and might permit the user to play with the object directly if we extand the API in the future. Compatibility with the old implementation for setting whole list is achived by converting back the list of IDMEFValue to an IDMEFValue of the list type on Set(). bindings/c++/idmef-path.cxx | 11 +++++++++++ bindings/c++/idmef-value.cxx | 13 +++++++++++++ bindings/c++/idmef.cxx | 6 ++++++ bindings/c++/include/idmef-path.hxx | 1 + bindings/c++/include/idmef-value.hxx | 1 + bindings/c++/include/idmef.hxx | 1 + bindings/libpreludecpp.i | 24 ++---------------------- 7 files changed, 35 insertions(+), 22 deletions(-) commit afdcdd91567e15dadacea31e5f6f35d2d6549ace Author: Yoann Vandoorselaere Date: Tue Jan 12 09:15:23 2010 +0100 Fix argv memory leak on bindings initialization bindings/perl/libpreludecpp-perl.i | 2 ++ bindings/python/libpreludecpp-python.i | 2 ++ bindings/ruby/libpreludecpp-ruby.i | 2 ++ 3 files changed, 6 insertions(+), 0 deletions(-) commit 0b18f29122de8795f1b1a2d826e6c4738220da9c Author: Yoann Vandoorselaere Date: Tue Jan 12 09:13:54 2010 +0100 Move libpreludecpp-perl.i to perl subdirectory bindings/Makefile.am | 4 +- bindings/libpreludecpp-perl.i | 192 ------------------------------------ bindings/libpreludecpp.i | 2 +- bindings/perl/libpreludecpp-perl.i | 192 ++++++++++++++++++++++++++++++++++++ 4 files changed, 195 insertions(+), 195 deletions(-) commit 49fa1982d8c79e520ce63ab774c05d86672be52a Author: Yoann Vandoorselaere Date: Tue Jan 12 05:44:30 2010 +0100 Oops: fix invalid prelude_return_val_if_fail() usage I wasn't on drug yesterday, I swear ;). Fix 8af3e5fd98cd2b92146b1f433344d44e8ce9372e regression. src/idmef-path.c | 6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-) commit 8af3e5fd98cd2b92146b1f433344d44e8ce9372e Author: Yoann Vandoorselaere Date: Mon Jan 11 17:00:26 2010 +0100 Flexelint warnings fixes Thanks Steve Grubb for reporting these! prelude-admin/prelude-admin.c: fix possible leak on getpass() error. src/idmef-data.c: fix potential invalid read if sizeof(char) > 1. src/idmef-path.c: idmef_path_set_index() would accept an off by one depth. src/prelude-connection.c: fix invalid pointer dereference in case malloc fail and we are using UNIX socket. prelude-admin/prelude-admin.c | 5 ++++- src/idmef-data.c | 6 +++--- src/idmef-path.c | 11 ++++------- src/prelude-connection.c | 6 ++++-- 4 files changed, 15 insertions(+), 13 deletions(-) commit 59fa51c48f539a856b760d93a67f042cddc78e4b Author: Yoann Vandoorselaere Date: Mon Jan 11 13:07:53 2010 +0100 Update GnuLib code (fixes stat module inclusion) libmissing/stat.c | 104 +++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 files changed, 104 insertions(+), 0 deletions(-) commit f4315ae81a779f222b916924cafc4acf43d6e141 Author: Yoann Vandoorselaere Date: Mon Jan 11 12:54:55 2010 +0100 Update GnuLib code (fixes stat module inclusion) libmissing/Makefile.am | 9 ++++ libmissing/ftw.c | 1 + libmissing/m4/gnulib-comp.m4 | 6 +- libmissing/tests/Makefile.am | 9 ---- libmissing/tests/stat.c | 104 ------------------------------------------ 5 files changed, 13 insertions(+), 116 deletions(-) commit 91f57a99833310a1f543af0dc385bd32c1c7bdbb Author: Yoann Vandoorselaere Date: Mon Jan 11 12:23:35 2010 +0100 Update NEWS, bump version number INSTALL | 97 +++++++++++++++++++++++++++++++++++++++++++++++---------- NEWS | 25 ++++++++++++++- configure.in | 6 ++-- 3 files changed, 107 insertions(+), 21 deletions(-) commit 221687634bfc646d7e2bbd1083d7cdc8e4113a46 Author: Yoann Vandoorselaere Date: Tue Dec 1 14:09:44 2009 +0100 Update GnuLib code arg-nonnull.h | 26 + config.rpath | 2 +- libmissing/Makefile.am | 545 ++- libmissing/accept.c | 2 +- libmissing/alignof.h | 2 +- libmissing/alloca.c | 154 +- libmissing/alloca.in.h | 4 +- libmissing/arpa_inet.in.h | 19 +- libmissing/asnprintf.c | 2 +- libmissing/bind.c | 2 +- libmissing/btowc.c | 4 +- libmissing/c-ctype.c | 2 +- libmissing/c-ctype.h | 2 +- libmissing/close-hook.c | 4 +- libmissing/close-hook.h | 2 +- libmissing/close.c | 4 +- libmissing/config.charset | 1116 +++--- libmissing/connect.c | 6 +- libmissing/doc/relocatable.texi | 2 +- libmissing/dup2.c | 91 +- libmissing/errno.in.h | 2 +- libmissing/fclose.c | 2 +- libmissing/float+.h | 2 +- libmissing/float.in.h | 2 +- libmissing/fopen.c | 60 +- libmissing/fseeko.c | 55 +- libmissing/gai_strerror.c | 3 +- libmissing/getaddrinfo.c | 171 +- libmissing/getdelim.c | 82 +- libmissing/gethostname.c | 105 + libmissing/getline.c | 2 +- libmissing/getpagesize.c | 39 - libmissing/getpass.c | 47 +- libmissing/getpass.h | 2 +- libmissing/getsockname.c | 2 +- libmissing/gettext.h | 31 +- libmissing/gettimeofday.c | 5 +- libmissing/glthread/cond.c | 302 +- libmissing/glthread/cond.h | 2 +- libmissing/glthread/lock.c | 436 +- libmissing/glthread/lock.h | 2 +- libmissing/glthread/thread.c | 34 +- libmissing/glthread/thread.h | 2 +- libmissing/glthread/threadlib.c | 20 +- libmissing/glthread/tls.c | 2 +- libmissing/glthread/tls.h | 2 +- libmissing/inet_ntop.c | 92 +- libmissing/inet_pton.c | 166 +- libmissing/intprops.h | 50 +- libmissing/ioctl.c | 2 +- libmissing/langinfo.in.h | 162 + libmissing/listen.c | 2 +- libmissing/localcharset.c | 482 ++- libmissing/localcharset.h | 2 +- libmissing/lseek.c | 2 +- libmissing/m4/00gnulib.m4 | 2 +- libmissing/m4/alloca.m4 | 3 +- libmissing/m4/arpa_inet_h.m4 | 13 +- libmissing/m4/btowc.m4 | 9 +- libmissing/m4/close.m4 | 11 +- libmissing/m4/codeset.m4 | 2 +- libmissing/m4/cond.m4 | 2 +- libmissing/m4/dos.m4 | 71 + libmissing/m4/dup2.m4 | 47 +- libmissing/m4/errno_h.m4 | 2 +- libmissing/m4/extensions.m4 | 22 +- libmissing/m4/fclose.m4 | 8 +- libmissing/m4/fcntl-o.m4 | 81 + libmissing/m4/fcntl_h.m4 | 35 + libmissing/m4/float_h.m4 | 2 +- libmissing/m4/fopen.m4 | 2 +- libmissing/m4/fseeko.m4 | 17 +- libmissing/m4/getaddrinfo.m4 | 25 +- libmissing/m4/getdelim.m4 | 2 +- libmissing/m4/gethostname.m4 | 101 + libmissing/m4/getline.m4 | 19 +- libmissing/m4/getpagesize.m4 | 3 +- libmissing/m4/getpass.m4 | 3 +- libmissing/m4/gettimeofday.m4 | 52 +- libmissing/m4/glibc21.m4 | 10 +- libmissing/m4/gnulib-cache.m4 | 2 +- libmissing/m4/gnulib-common.m4 | 25 +- libmissing/m4/gnulib-comp.m4 | 121 +- libmissing/m4/gnulib-tool.m4 | 2 +- libmissing/m4/hostent.m4 | 2 +- libmissing/m4/include_next.m4 | 80 +- libmissing/m4/inet_ntop.m4 | 19 +- libmissing/m4/inet_pton.m4 | 18 +- libmissing/m4/intmax_t.m4 | 3 +- libmissing/m4/inttypes_h.m4 | 2 +- libmissing/m4/langinfo_h.m4 | 69 + libmissing/m4/lib-ld.m4 | 8 +- libmissing/m4/lib-link.m4 | 2 +- libmissing/m4/lib-prefix.m4 | 2 +- libmissing/m4/localcharset.m4 | 5 +- libmissing/m4/locale-fr.m4 | 2 +- libmissing/m4/locale-ja.m4 | 2 +- libmissing/m4/locale-tr.m4 | 97 + libmissing/m4/locale-zh.m4 | 2 +- libmissing/m4/lock.m4 | 2 +- libmissing/m4/longlong.m4 | 66 +- libmissing/m4/lseek.m4 | 22 +- libmissing/m4/lstat.m4 | 28 + libmissing/m4/malloc.m4 | 2 +- libmissing/m4/mbrtowc.m4 | 3 +- libmissing/m4/mbsinit.m4 | 2 +- libmissing/m4/mbstate_t.m4 | 18 +- libmissing/m4/memchr.m4 | 10 +- libmissing/m4/memmem.m4 | 31 +- libmissing/m4/minmax.m4 | 2 +- libmissing/m4/mktime.m4 | 67 +- libmissing/m4/mmap-anon.m4 | 2 +- libmissing/m4/mode_t.m4 | 26 + libmissing/m4/multiarch.m4 | 2 +- libmissing/m4/netdb_h.m4 | 5 +- libmissing/m4/netinet_in_h.m4 | 2 +- libmissing/m4/nl_langinfo.m4 | 25 + libmissing/m4/onceonly.m4 | 3 +- libmissing/m4/open.m4 | 74 + libmissing/m4/pathmax.m4 | 3 +- libmissing/m4/perror.m4 | 2 +- libmissing/m4/poll.m4 | 9 +- libmissing/m4/printf.m4 | 2 +- libmissing/m4/realloc.m4 | 2 +- libmissing/m4/regex.m4 | 267 +- libmissing/m4/relocatable-lib.m4 | 10 +- libmissing/m4/select.m4 | 9 +- libmissing/m4/servent.m4 | 2 +- libmissing/m4/signal_h.m4 | 5 +- libmissing/m4/signalblocking.m4 | 2 +- libmissing/m4/size_max.m4 | 2 +- libmissing/m4/sleep.m4 | 37 +- libmissing/m4/snprintf.m4 | 2 +- libmissing/m4/sockets.m4 | 32 +- libmissing/m4/socklen.m4 | 40 +- libmissing/m4/sockpfaf.m4 | 20 +- libmissing/m4/ssize_t.m4 | 2 +- libmissing/m4/stat.m4 | 63 + libmissing/m4/stdbool.m4 | 140 +- libmissing/m4/stddef_h.m4 | 45 + libmissing/m4/stdint.m4 | 14 +- libmissing/m4/stdint_h.m4 | 2 +- libmissing/m4/stdio_h.m4 | 113 +- libmissing/m4/stdlib_h.m4 | 29 +- libmissing/m4/strcase.m4 | 2 +- libmissing/m4/strcasestr.m4 | 30 +- libmissing/m4/strdup.m4 | 2 +- libmissing/m4/strerror.m4 | 2 +- libmissing/m4/string_h.m4 | 59 +- libmissing/m4/strings_h.m4 | 2 +- libmissing/m4/strndup.m4 | 48 +- libmissing/m4/strnlen.m4 | 3 +- libmissing/m4/strptime.m4 | 2 +- libmissing/m4/strsep.m4 | 3 +- libmissing/m4/symlink.m4 | 38 + libmissing/m4/sys_ioctl_h.m4 | 18 +- libmissing/m4/sys_select_h.m4 | 54 +- libmissing/m4/sys_socket_h.m4 | 8 +- libmissing/m4/sys_stat_h.m4 | 56 +- libmissing/m4/sys_time_h.m4 | 16 +- libmissing/m4/sys_utsname_h.m4 | 42 + libmissing/m4/thread.m4 | 2 +- libmissing/m4/threadlib.m4 | 15 +- libmissing/m4/time_h.m4 | 22 +- libmissing/m4/time_r.m4 | 21 +- libmissing/m4/timegm.m4 | 4 +- libmissing/m4/tls.m4 | 2 +- libmissing/m4/tm_gmtoff.m4 | 2 +- libmissing/m4/uname.m4 | 12 +- libmissing/m4/ungetc.m4 | 36 +- libmissing/m4/unistd_h.m4 | 51 +- libmissing/m4/vasnprintf.m4 | 2 +- libmissing/m4/vsnprintf.m4 | 2 +- libmissing/m4/wchar.m4 | 89 +- libmissing/m4/wchar_t.m4 | 2 +- libmissing/m4/wcrtomb.m4 | 2 +- libmissing/m4/wctob.m4 | 2 +- libmissing/m4/wctype.m4 | 32 +- libmissing/m4/wint_t.m4 | 2 +- libmissing/m4/write.m4 | 2 +- libmissing/m4/xsize.m4 | 2 +- libmissing/m4/yield.m4 | 2 +- libmissing/malloc.c | 2 +- libmissing/mbrtowc.c | 474 +- libmissing/mbsinit.c | 2 +- libmissing/memchr.c | 26 +- libmissing/memmem.c | 10 +- libmissing/minmax.h | 3 +- libmissing/mktime-internal.h | 4 + libmissing/mktime.c | 378 +- libmissing/netdb.in.h | 88 +- libmissing/netinet_in.in.h | 2 +- libmissing/nl_langinfo.c | 260 ++ libmissing/pathmax.h | 5 +- libmissing/perror.c | 2 +- libmissing/poll.c | 275 +- libmissing/poll.in.h | 20 +- libmissing/printf-args.c | 211 +- libmissing/printf-args.h | 55 +- libmissing/printf-parse.c | 940 ++-- libmissing/printf-parse.h | 21 +- libmissing/realloc.c | 5 +- libmissing/ref-add.sin | 2 +- libmissing/ref-del.sin | 2 +- libmissing/regcomp.c | 34 +- libmissing/regex.c | 3 +- libmissing/regex.h | 5 +- libmissing/regex_internal.c | 4 +- libmissing/regex_internal.h | 9 +- libmissing/regexec.c | 15 +- libmissing/relocatable.c | 276 +- libmissing/relocatable.h | 8 +- libmissing/select.c | 231 +- libmissing/setsockopt.c | 5 +- libmissing/signal.in.h | 129 +- libmissing/sigprocmask.c | 158 +- libmissing/size_max.h | 2 +- libmissing/sleep.c | 33 +- libmissing/snprintf.c | 12 +- libmissing/socket.c | 10 +- libmissing/sockets.c | 118 + libmissing/sockets.h | 51 + libmissing/stdbool.in.h | 2 +- libmissing/stddef.in.h | 86 + libmissing/stdint.in.h | 10 +- libmissing/stdio-impl.h | 44 +- libmissing/stdio-write.c | 48 +- libmissing/stdio.in.h | 735 ++-- libmissing/stdlib.in.h | 299 +- libmissing/str-two-way.h | 362 +- libmissing/strcasecmp.c | 4 +- libmissing/strcasestr.c | 20 +- libmissing/strdup.c | 4 +- libmissing/streq.h | 2 +- libmissing/strerror.c | 10 +- libmissing/string.in.h | 134 +- libmissing/strings.in.h | 10 +- libmissing/strncasecmp.c | 4 +- libmissing/strndup.c | 4 +- libmissing/strnlen.c | 2 +- libmissing/strptime.c | 1617 ++++---- libmissing/strsep.c | 2 +- libmissing/sys_ioctl.in.h | 15 +- libmissing/sys_select.in.h | 16 +- libmissing/sys_socket.in.h | 95 +- libmissing/sys_stat.in.h | 239 +- libmissing/sys_time.in.h | 7 +- libmissing/sys_utsname.in.h | 96 + libmissing/tests/Makefile.am | 369 ++- libmissing/tests/binary-io.h | 66 + libmissing/tests/c-strcase.h | 56 + libmissing/tests/c-strcasecmp.c | 57 + libmissing/tests/c-strncasecmp.c | 57 + libmissing/tests/fcntl.in.h | 257 ++ libmissing/tests/getpagesize.c | 39 + libmissing/tests/glthread/yield.h | 2 +- libmissing/tests/lstat.c | 91 + libmissing/tests/macros.h | 64 + libmissing/tests/open.c | 166 + libmissing/tests/same-inode.h | 25 + libmissing/tests/signature.h | 48 + libmissing/tests/sockets.c | 108 - libmissing/tests/sockets.h | 51 - libmissing/tests/stat.c | 104 + libmissing/tests/symlink.c | 57 + libmissing/tests/test-alignof.c | 2 +- libmissing/tests/test-alloca-opt.c | 2 +- libmissing/tests/test-arpa_inet.c | 4 +- libmissing/tests/test-binary-io.c | 64 + libmissing/tests/test-binary-io.sh | 11 + libmissing/tests/test-btowc.c | 42 +- libmissing/tests/test-c-ctype.c | 636 ++-- libmissing/tests/test-c-strcase.sh | 21 + libmissing/tests/test-c-strcasecmp.c | 65 + libmissing/tests/test-c-strncasecmp.c | 79 + libmissing/tests/test-cond.c | 2 +- libmissing/tests/test-dup2.c | 193 + libmissing/tests/test-errno.c | 2 +- libmissing/tests/test-fcntl-h.c | 38 + libmissing/tests/test-fopen.c | 31 +- libmissing/tests/test-fopen.h | 73 + libmissing/tests/test-fseeko.c | 30 +- libmissing/tests/test-getaddrinfo.c | 83 +- libmissing/tests/test-getdelim.c | 20 +- libmissing/tests/test-gethostname.c | 67 + libmissing/tests/test-getline.c | 20 +- libmissing/tests/test-gettimeofday.c | 8 +- libmissing/tests/test-inet_ntop.c | 56 + libmissing/tests/test-inet_pton.c | 58 + libmissing/tests/test-langinfo.c | 92 + libmissing/tests/test-lock.c | 58 +- libmissing/tests/test-lseek.c | 25 +- libmissing/tests/test-lstat.c | 59 + libmissing/tests/test-lstat.h | 116 + libmissing/tests/test-mbrtowc.c | 461 +- libmissing/tests/test-mbsinit.c | 23 +- libmissing/tests/test-memchr.c | 69 +- libmissing/tests/test-memmem.c | 79 +- libmissing/tests/test-netdb.c | 2 +- libmissing/tests/test-netinet_in.c | 4 +- libmissing/tests/test-nl_langinfo.c | 115 + libmissing/tests/test-nl_langinfo.sh | 17 + libmissing/tests/test-open.c | 41 + libmissing/tests/test-open.h | 87 + libmissing/tests/test-perror.c | 5 +- libmissing/tests/test-poll.c | 15 +- libmissing/tests/test-select-fd.c | 68 +- libmissing/tests/test-select-stdin.c | 50 +- libmissing/tests/test-select.c | 29 +- libmissing/tests/test-signal.c | 105 +- libmissing/tests/test-sleep.c | 45 +- libmissing/tests/test-snprintf.c | 46 +- libmissing/tests/test-sockets.c | 2 +- libmissing/tests/test-stat.c | 56 + libmissing/tests/test-stat.h | 100 + libmissing/tests/test-stdbool.c | 2 +- libmissing/tests/test-stddef.c | 38 + libmissing/tests/test-stdint.c | 4 +- libmissing/tests/test-stdio.c | 11 +- libmissing/tests/test-stdlib.c | 4 +- libmissing/tests/test-strcasestr.c | 66 +- libmissing/tests/test-strerror.c | 24 +- libmissing/tests/test-string.c | 4 +- libmissing/tests/test-strings.c | 2 +- libmissing/tests/test-symlink.c | 46 + libmissing/tests/test-symlink.h | 95 + libmissing/tests/test-sys_ioctl.c | 27 + libmissing/tests/test-sys_select.c | 9 +- libmissing/tests/test-sys_socket.c | 6 +- libmissing/tests/test-sys_stat.c | 29 +- libmissing/tests/test-sys_time.c | 4 +- libmissing/tests/test-sys_utsname.c | 37 + libmissing/tests/test-time.c | 10 +- libmissing/tests/test-tls.c | 30 +- libmissing/tests/test-uname.c | 64 + libmissing/tests/test-unistd.c | 4 +- libmissing/tests/test-vasnprintf.c | 23 +- libmissing/tests/test-vsnprintf.c | 46 +- libmissing/tests/test-wchar.c | 10 +- libmissing/tests/test-wcrtomb.c | 134 +- libmissing/tests/test-wctype.c | 32 +- libmissing/tests/w32sock.h | 62 - libmissing/tests/wctob.c | 2 +- libmissing/tests/zerosize-ptr.h | 10 +- libmissing/time.in.h | 34 +- libmissing/time_r.c | 2 +- libmissing/timegm.c | 6 +- libmissing/uname.c | 349 +- libmissing/uname.h | 51 - libmissing/unistd.in.h | 456 ++- libmissing/vasnprintf.c | 8063 +++++++++++++++++---------------- libmissing/vasnprintf.h | 2 +- libmissing/verify.h | 6 +- libmissing/vsnprintf.c | 12 +- libmissing/w32sock.h | 3 +- libmissing/wchar.in.h | 31 +- libmissing/wcrtomb.c | 12 +- libmissing/wctype.in.h | 121 +- libmissing/write.c | 18 +- libmissing/xsize.h | 2 +- libprelude-config.in | 2 +- link-warning.h | 29 +- src/Makefile.am | 2 +- src/prelude-client.c | 2 +- 364 files changed, 18331 insertions(+), 11766 deletions(-) commit e79c7e6e16d8e17e7e947b738c042842316634a3 Author: Yoann Vandoorselaere Date: Mon Jan 11 10:57:02 2010 +0100 Increase maximum message size The old message size (1mb) could be a problem for systems sending very large alerts (example: CorrelationAlert with a lot of sources and target). This increase the maximum message size to 100mb. src/prelude-msg.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) commit 1c88fd5c9dc34256d0d11c9fb262195b77c03603 Author: Yoann Vandoorselaere Date: Wed Jan 6 09:13:23 2010 +0100 Increase reference count when using IDMEFTime from within an IDMEFValue Referencing the idmef_time_t object is necessary to prevent a double free when the object are destroyed. bindings/c++/idmef-value.cxx | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) commit 76f52dce9f11a7658f7f96945d006693e63962c2 Author: Yoann Vandoorselaere Date: Thu Dec 10 13:34:14 2009 +0100 Fix idmef_data_t (type CHAR_STRING) mapping to high level language string We used to enclose the terminating \0 when mapping an idmef_data_t of type IDMEF_DATA_TYPE_CHAR_STRING to an high level language string. bindings/libpreludecpp.i | 5 ++++- 1 files changed, 4 insertions(+), 1 deletions(-) commit 93b78633b9aa94bd5dd5bfe43bb6a40ac5c392bd Author: Yoann Vandoorselaere Date: Mon Dec 7 09:51:59 2009 +0100 Fix typo src/common.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) commit 041082281eb7a17e2d2c319b02ef1154595b7e8c Author: Yoann Vandoorselaere Date: Tue Dec 1 14:22:34 2009 +0100 Fix Ruby include path detection on certain systems Thanks to Dominik Elsbroek for reporting the issue, as well as the proper fix. Close #366. m4/am_path_ruby.m4 | 9 +++++---- 1 files changed, 5 insertions(+), 4 deletions(-) commit a626cbec816ddb6bab001aa650d8dae0d3aed6eb Author: Yoann Vandoorselaere Date: Fri Dec 4 10:21:45 2009 +0100 Fix critical warnings on destroy when assigning NULL value to IDMEF union When setting an IDMEF union member to NULL, make sure we reset the variable holding the object type to zero, so that we do not get a critical warning when the parent object is destroyed. src/idmef-tree-wrap.c | 14 +++++++------- src/idmef-wrappers-gen/GenerateIDMEFTreeWrapC.pm | 2 +- 2 files changed, 8 insertions(+), 8 deletions(-) commit be3b52247cb0cf91a16b2e2f14e5a6f1c8853245 Author: Yoann Vandoorselaere Date: Fri Dec 4 10:17:44 2009 +0100 Whitespace police src/idmef-wrappers-gen/GenerateIDMEFTreeWrapC.pm | 12 ++++++------ 1 files changed, 6 insertions(+), 6 deletions(-) commit 3db6454e524636fc7f90b24bc54059caf9eb02a1 Author: Yoann Vandoorselaere Date: Thu Dec 3 12:39:28 2009 +0100 Fix IDMEF severity to message priority mapping Fix regression introduced in commit 8cbf9e7b, due to informational severity remapping. Message priority will now be correctly assigned depending on the source IDMEF message. src/common.c | 8 ++++---- 1 files changed, 4 insertions(+), 4 deletions(-) commit abf647815028603cfd8889275715ef02dd8a4652 Author: Yoann Vandoorselaere Date: Tue Aug 11 17:26:28 2009 +0200 Update NEWS, bump version NEWS | 8 ++++++++ configure.in | 2 +- 2 files changed, 9 insertions(+), 1 deletions(-) commit 979d9c750075f820b250e9b54a6354b09384f44f Author: Yoann Vandoorselaere Date: Wed Jul 8 16:45:57 2009 +0200 Update NEWS, bump version NEWS | 23 +++++++++++++++++++++++ configure.in | 12 ++++++------ docs/api/libprelude-decl.txt | 2 +- 3 files changed, 30 insertions(+), 7 deletions(-) commit 6a1064b9dc3446b0b7bfead9881e8c2e49a76764 Author: Yoann Vandoorselaere Date: Wed Jul 8 15:53:17 2009 +0200 Fixes idmef_time_set_from_string() implementation The previous version would often yield in incorrect GMT offset / time calculation. Fix the documentation, since this function was always meant to assume localtime as input. Verbose error reporting. src/idmef-time.c | 28 ++++++++++++++++++---------- 1 files changed, 18 insertions(+), 10 deletions(-) commit faf9667a6e449e7d876ea1bf37b3e62e171e69bf Author: Yoann Vandoorselaere Date: Wed Jul 8 15:52:50 2009 +0200 Update GnuLib code libmissing/Makefile.am | 23 ++++++ libmissing/errno.in.h | 7 ++- libmissing/getpagesize.c | 39 +++++++++ libmissing/m4/errno_h.m4 | 5 +- libmissing/m4/gnulib-comp.m4 | 12 ++- libmissing/m4/lib-link.m4 | 7 +- libmissing/m4/mbrtowc.m4 | 3 +- libmissing/m4/memchr.m4 | 86 ++++++++++++++++++++ libmissing/m4/stdio_h.m4 | 5 +- libmissing/m4/strcasestr.m4 | 22 ++++-- libmissing/m4/string_h.m4 | 6 +- libmissing/memchr.c | 172 ++++++++++++++++++++++++++++++++++++++++ libmissing/memchr.valgrind | 14 +++ libmissing/stdio.in.h | 20 +++++- libmissing/strerror.c | 8 ++- libmissing/string.in.h | 17 ++++- libmissing/tests/Makefile.am | 17 ++-- libmissing/tests/getpagesize.c | 39 --------- libmissing/tests/test-memchr.c | 130 ++++++++++++++++++++++++++++++ libmissing/tests/test-stdio.c | 8 ++- libmissing/tests/test-stdlib.c | 8 ++- libmissing/tests/test-string.c | 8 ++- libmissing/tests/test-unistd.c | 6 ++ 23 files changed, 591 insertions(+), 71 deletions(-) commit eb3e7df1826ffb5d6b4b5ddc693a2cb5db5a13ca Author: Yoann Vandoorselaere Date: Wed Jul 1 16:43:27 2009 +0200 Update autoconf generated file INSTALL | 107 ++++++++++++++++++++++++++++++++++++++++++++++++++------------ 1 files changed, 86 insertions(+), 21 deletions(-) commit fc379897a6e0ed2f424b0f1c1322de6069f53109 Author: Yoann Vandoorselaere Date: Thu Jun 25 10:36:14 2009 +0200 Fix Lua module crash. Do not attempt to walk through the Lua argument table if it is not a table. bindings/lua/libpreludecpp-lua.i | 3 +++ 1 files changed, 3 insertions(+), 0 deletions(-) commit e824ff3d94472fed6bb5d9c8562f2f14e4405ce3 Author: Yoann Vandoorselaere Date: Thu Jun 25 09:39:19 2009 +0200 Fix prelude-client initialization problem with empty argv[0] prelude_client_init() could return an error if argc was 1 but argv[0] was empty. Make sure to not call _prelude_get_file_name_and_path() in this specific case. src/prelude-client.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) commit dc525fd6e6e22f52a785fb6c69c5cec6e8cb42d4 Author: Yoann Vandoorselaere Date: Wed Jun 24 17:35:34 2009 +0200 Fix error in case of multiple initialization. Avoid running the initialization code twice since it would result in a fill_client_infos() error (due to idmef_analyzer_t object reuse, and string concatenation). src/prelude-client.c | 7 +++++++ 1 files changed, 7 insertions(+), 0 deletions(-) commit dfed1bc7fb7dbb3eaeac20b36f7738ea582378d2 Author: Yoann Vandoorselaere Date: Fri Jun 19 00:33:19 2009 +0200 Initial prelude-log C++/Python/Ruby/Perl/Lua bindings support. This implement language bindings for the PreludeLog interface. High level language use a specific check so that the log callback is not called from a different thread than the initialisation thread, since we cannot efficiently protect SWIG generated object. bindings/c++/Makefile.am | 3 +- bindings/c++/include/Makefile.am | 3 +- bindings/c++/include/prelude-log.hxx | 56 ++++++++++++++++++++++++++++++++ bindings/c++/prelude-log.cxx | 42 ++++++++++++++++++++++++ bindings/libpreludecpp-perl.i | 41 ++++++++++++++++++++++- bindings/libpreludecpp.i | 5 +++ bindings/lua/Makefile.am | 2 +- bindings/lua/libpreludecpp-lua.i | 35 +++++++++++++++++++- bindings/perl/Makefile.PL.in | 2 +- bindings/python/libpreludecpp-python.i | 34 +++++++++++++++++++ bindings/python/setup.py.in | 2 +- bindings/ruby/Makefile.am | 2 +- bindings/ruby/libpreludecpp-ruby.i | 31 +++++++++++++++++- bindings/tests/test.lua | 5 +++ bindings/tests/test.pl | 9 +++++ bindings/tests/test.py | 6 +++ bindings/tests/test.rb | 1 + 17 files changed, 268 insertions(+), 11 deletions(-) commit 80b869e15f0e53224922be8eff302a700639c019 Author: Yoann Vandoorselaere Date: Thu Jun 18 09:28:01 2009 +0200 Documentation update and fixes. Update gtk-doc.make to a newer version. Use PRELUDE_DISABLED_DEPRECATED to properly mark function as deprecated (avoid a gtk-doc warning). Various gtk-doc warnings fixes. Document prelude_async_flags_t directly within the header file. docs/api/Makefile.am | 2 +- docs/api/libprelude-decl.txt | 4904 +++++++++++++++++++------------------- docs/api/tmpl/prelude-async.sgml | 3 +- gtk-doc.make | 47 +- src/idmef-path.c | 8 +- src/include/prelude-async.h | 11 + src/include/prelude-client.h | 9 +- src/prelude-client.c | 3 +- src/prelude-option.c | 2 +- 9 files changed, 2512 insertions(+), 2477 deletions(-) commit 40c09ef78f4f27c4d86944cac30441e7da405f44 Author: Yoann Vandoorselaere Date: Thu Jun 18 08:58:39 2009 +0200 Whitespace police src/prelude-option.c | 536 +++++++++++++++++++++++++------------------------- 1 files changed, 268 insertions(+), 268 deletions(-) commit fc16f0a86a4655e8835d47699d40244a6b635233 Author: Yoann Vandoorselaere Date: Wed Jun 17 15:41:38 2009 +0200 Make the profile permission respect required ownership. The analyzerid file within the prelude-admin created profile would be created with default ownership, without following --uid / --gid option requirement. Thanks to Pierre Chifflier for pointing this out. prelude-admin/prelude-admin.c | 4 ++++ 1 files changed, 4 insertions(+), 0 deletions(-) commit dcf5f25fc100e9831b959f2af47fd7a7a974166b Author: Yoann Vandoorselaere Date: Tue Jun 16 13:24:19 2009 +0200 Proper argument checking on Python and Ruby left/right IDMEF shift. Ruby and Python bindings were not properly checking whether the argument was a file descriptor in case the left/right shift IDMEF operator were used. bindings/python/libpreludecpp-python.i | 8 ++++---- bindings/ruby/libpreludecpp-ruby.i | 9 ++++----- 2 files changed, 8 insertions(+), 9 deletions(-) commit 49f5c052d772f3e3c7e57ac0e4563800d4bd9951 Author: Yoann Vandoorselaere Date: Mon Jun 8 14:26:12 2009 +0200 Update NEWS, documentation, bump version number. NEWS | 16 ++++++++++++++++ configure.in | 8 ++++---- docs/api/libprelude-decl.txt | 17 ++++++++++++++++- docs/api/libprelude-sections.txt | 3 +++ docs/api/tmpl/idmef-path.sgml | 20 ++++++++++++++++++++ docs/api/tmpl/idmef-value.sgml | 10 ++++++++++ 6 files changed, 69 insertions(+), 5 deletions(-) commit 562e8a51177875b5990eb6244fcb4a7b622c73bc Author: Yoann Vandoorselaere Date: Mon Jun 8 13:19:36 2009 +0200 Update GnuLib code. libmissing/alignof.h | 32 ++++++++++++++++++++++++++------ libmissing/tests/test-alignof.c | 10 +++++++++- libmissing/tests/zerosize-ptr.h | 4 +++- 3 files changed, 38 insertions(+), 8 deletions(-) commit f103c651c1520c97257388521248cea1c1cf0acb Author: Yoann Vandoorselaere Date: Mon Jun 8 12:58:39 2009 +0200 Fix potential problem with recent libtool version. configure.in | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) commit e09481fc975151a096b249cf40188105d2b30156 Author: Yoann Vandoorselaere Date: Mon Jun 8 12:57:10 2009 +0200 Workaround distcheck problem. bindings/Makefile.am | 1 + 1 files changed, 1 insertions(+), 0 deletions(-) commit ffb878593face4f782147a44e46724d8a3f757b3 Author: Yoann Vandoorselaere Date: Fri Jun 5 17:34:57 2009 +0200 Add C++ bindings for prelude_check_version(). bindings/c++/Makefile.am | 1 + bindings/c++/include/prelude.hxx | 4 ++++ bindings/c++/prelude.cxx | 31 +++++++++++++++++++++++++++++++ 3 files changed, 36 insertions(+), 0 deletions(-) commit 711ede8041785d7efa918885ee17ade79c5ed77c Author: Yoann Vandoorselaere Date: Fri Jun 5 17:33:40 2009 +0200 Use std::vector in place of std::list for improved SWIG portability. bindings/c++/idmef-value.cxx | 6 +++--- bindings/c++/include/idmef-value.hxx | 4 ++-- bindings/c++/include/prelude-connection-pool.hxx | 2 +- bindings/c++/prelude-connection-pool.cxx | 6 +++--- bindings/libpreludecpp-perl.i | 9 ++------- bindings/libpreludecpp.i | 9 ++++++++- bindings/lua/libpreludecpp-lua.i | 5 ++--- bindings/python/libpreludecpp-python.i | 6 ++---- bindings/ruby/libpreludecpp-ruby.i | 8 ++------ 9 files changed, 25 insertions(+), 30 deletions(-) commit c46c54eb5ca49b9970d5c32b6eb915d9ce3c4366 Author: Yoann Vandoorselaere Date: Fri Jun 5 17:29:33 2009 +0200 Modify prelude_check_version() so that it verify the patch level. src/prelude.c | 14 +++++++------- 1 files changed, 7 insertions(+), 7 deletions(-) commit 57cae28ffef8532a7b615ea135a61a0a28bacea6 Author: Yoann Vandoorselaere Date: Fri Jun 5 09:50:46 2009 +0200 Whitespace police. m4/Makefile.am | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) commit e79e55a1c4c749885ae77d303abb328de9299050 Author: Yoann Vandoorselaere Date: Thu Jun 4 15:48:59 2009 +0200 Set analyzer before sending IDMEF messages. Prior to this change, it was the responsability of the user to set the IDMEFAnalyzer object in an IDMEF message to be sent. In order to make it easier to write sensors, this is now automated as part of the sending process. src/common.c | 29 +++++++++++++++++++++++++++++ 1 files changed, 29 insertions(+), 0 deletions(-) commit 7d53cc678e04594cf4d1809e86c29c7fb6189a49 Author: Yoann Vandoorselaere Date: Thu Jun 4 15:38:09 2009 +0200 Fix NULL pointer dereference with empty value. Previously config-engine would not handle setting configuration key to empty value. Thanks Jérôme Soyer for pointing out this. src/config-engine.c | 6 +++++- src/variable.c | 21 ++++++++++++++------- 2 files changed, 19 insertions(+), 8 deletions(-) commit 1790a0a63829f17431362fad8d081ee4bfd9e3a9 Author: Yoann Vandoorselaere Date: Tue Jun 2 13:28:04 2009 +0200 GnuLib code update. libmissing/Makefile.am | 1 + libmissing/alignof.h | 8 ---- libmissing/getdelim.c | 8 ++--- libmissing/m4/getpagesize.m4 | 29 ++++++++++++++++ libmissing/m4/gnulib-comp.m4 | 10 +++++ libmissing/m4/include_next.m4 | 32 +++++++++++++---- libmissing/m4/mmap-anon.m4 | 59 ++++++++++++++++++++++++++++++++ libmissing/m4/size_max.m4 | 17 ++++++--- libmissing/m4/sys_socket_h.m4 | 7 +++- libmissing/sys_socket.in.h | 4 ++ libmissing/tests/Makefile.am | 20 ++++++++++- libmissing/tests/getpagesize.c | 39 +++++++++++++++++++++ libmissing/tests/test-alignof.c | 51 +++++++++++++++++++++++++++ libmissing/tests/test-memmem.c | 8 +++-- libmissing/tests/test-sys_socket.c | 2 + libmissing/tests/zerosize-ptr.h | 66 ++++++++++++++++++++++++++++++++++++ 16 files changed, 330 insertions(+), 31 deletions(-) commit 78255a19a0bfbb8b1a748d7d42a75e241d1d5f6c Author: Yoann Vandoorselaere Date: Tue May 19 16:56:33 2009 +0200 Implement functions to retrieve applicable operators. This implement function to retrieve applicable operatoris for a given idmef_path_t, idmef_value_t or idmef_value_type_t. It also add the idmef_path_check_operator() function that was previously missing. New functions: - idmef_path_check_operator() - idmef_path_get_applicable_operators() - idmef_value_get_applicable_operators() - idmef_value_type_get_applicable_operators() bindings/c++/idmef-path.cxx | 19 +++++++++++++++++++ bindings/c++/include/idmef-path.hxx | 3 +++ src/idmef-path.c | 35 +++++++++++++++++++++++++++++++++++ src/idmef-value-type.c | 15 +++++++++++++++ src/idmef-value.c | 19 +++++++++++++++++++ src/include/idmef-path.h | 14 +++++++++----- src/include/idmef-value-type.h | 2 ++ src/include/idmef-value.h | 2 ++ 8 files changed, 104 insertions(+), 5 deletions(-) commit 5b946fa8902d9a976eca0cc12997010c6e07e79b Author: Yoann Vandoorselaere Date: Tue May 19 16:46:55 2009 +0200 Minor API fixes The idmef_value_type_check_operator() function should take an idmef_value_type_id_t argument. There is no API breakage since idmef-value-type API is considered private. src/idmef-criterion-value.c | 12 ++++++------ src/idmef-value-type.c | 8 ++++---- src/idmef-value.c | 3 +-- src/include/idmef-value-type.h | 2 +- 4 files changed, 12 insertions(+), 13 deletions(-) commit deb88fd0e0b7205580899dfec5f50fdd059a106d Author: Yoann Vandoorselaere Date: Tue May 19 10:55:47 2009 +0200 Return an error when string character are provided for a 8 bit integer. Previously, using a string as value for an IDMEF path which type was (u)int8 would not generate an error. src/idmef-value-type.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) commit 9d76d323ae1d317ef486e21fc57e5d4ab3c5ef81 Author: Yoann Vandoorselaere Date: Fri May 15 17:10:20 2009 +0200 Allow substring comparions of enumeration value Make it possible to compare an enumeration path with a string by using the standard substring operator (<> or <>*). src/idmef-criterion-value.c | 6 +++- src/idmef-value-type.c | 68 +++++++++++++++++++++++++++++------------- 2 files changed, 52 insertions(+), 22 deletions(-) commit b8bd6a3ffad39a646d2601d638405ebc0d5f22ad Author: Yoann Vandoorselaere Date: Fri May 15 17:07:54 2009 +0200 Minor optimisation Fetch the value type only once. src/idmef-criterion-value.c | 10 ++++------ 1 files changed, 4 insertions(+), 6 deletions(-) commit 16d15738c29743b82d5392b2a5c131d6bd557214 Author: Yoann Vandoorselaere Date: Tue May 12 18:33:30 2009 +0200 Update GnuLib code. libmissing/Makefile.am | 17 +++++++-- libmissing/alignof.h | 41 ++++++++++++++++++++++ libmissing/gettext.h | 11 +++++- libmissing/m4/btowc.m4 | 6 ++-- libmissing/m4/errno_h.m4 | 3 +- libmissing/m4/gnulib-comp.m4 | 5 ++- libmissing/m4/lib-link.m4 | 17 +++++---- libmissing/m4/lib-prefix.m4 | 7 +++- libmissing/m4/mbrtowc.m4 | 12 +++--- libmissing/m4/multiarch.m4 | 3 +- libmissing/m4/sys_socket_h.m4 | 65 ++++++++++++++++++++++++----------- libmissing/m4/vasnprintf.m4 | 6 ++-- libmissing/m4/wchar.m4 | 51 ++++++++++++++------------- libmissing/m4/wcrtomb.m4 | 24 ++++++++----- libmissing/m4/wctob.m4 | 6 ++-- libmissing/sys_socket.in.h | 20 +++++++++++ libmissing/tests/Makefile.am | 2 - libmissing/tests/test-sys_socket.c | 6 +++- libmissing/vasnprintf.c | 66 +++++++++++++++++------------------ libmissing/wchar.in.h | 6 +++- 20 files changed, 245 insertions(+), 129 deletions(-) commit ae1001bf490b34dbecac47c699918495b363131e Author: Yoann Vandoorselaere Date: Tue May 12 18:03:40 2009 +0200 Automatic .gitignores generation. Makefile.am | 23 ++ bindings/Makefile.am | 16 +- bindings/c++/Makefile.am | 2 + bindings/c++/include/Makefile.am | 2 + bindings/low-level/Makefile.am | 10 + bindings/low-level/python/Makefile.am | 2 + bindings/lua/Makefile.am | 2 + bindings/python/Makefile.am | 2 + bindings/ruby/Makefile.am | 2 + docs/Makefile.am | 2 + docs/api/Makefile.am | 2 + docs/api/tmpl/prelude-client-profile.sgml | 277 +++++++++++++ docs/api/tmpl/prelude-error.sgml | 382 ++++++++++++++++++ docs/api/tmpl/prelude-option-wide.sgml | 93 +++++ docs/api/tmpl/prelude-option.sgml | 609 +++++++++++++++++++++++++++++ docs/api/tmpl/prelude-timer.sgml | 141 +++++++ docs/manpages/Makefile.am | 2 + git.mk | 183 +++++++++ libmissing/Makefile.am | 2 + libmissing/tests/Makefile.am | 2 + m4/Makefile.am | 12 +- prelude-admin/Makefile.am | 2 + src/Makefile.am | 2 + src/include/Makefile.am | 2 + src/libprelude-error/Makefile.am | 2 + tests/Makefile.am | 2 + 26 files changed, 1775 insertions(+), 3 deletions(-) commit b47048bdf873de3feb0f50095e4b50466964f718 Author: Yoann Vandoorselaere Date: Tue May 12 14:19:59 2009 +0200 Add dummy ChangeLog file, prevent autoconf failure. ChangeLog | 4 ++++ 1 files changed, 4 insertions(+), 0 deletions(-) commit 2e5c2630016b5814e15afb77c56160f2bf525c72 Author: Yoann Vandoorselaere Date: Wed Apr 22 14:54:25 2009 +0000 Tags 0.9.22 git-svn-id: file:///home/yoann/SVN/libprelude/tags/libprelude-0.9.22@11164 09c5ec92-17d4-0310-903a-819935f44dba commit 501c8e20f6895009da67bd45745d5a2133104c07 Author: Yoann Vandoorselaere Date: Wed Apr 22 14:53:55 2009 +0000 Update docs, news, bump version. git-svn-id: file:///home/yoann/SVN/libprelude/trunk@11163 09c5ec92-17d4-0310-903a-819935f44dba NEWS | 22 ++++++++++++++++++++++ configure.in | 12 ++++++------ docs/api/libprelude-sections.txt | 1 + docs/api/tmpl/prelude-plugin.sgml | 7 +++++++ 4 files changed, 36 insertions(+), 6 deletions(-) commit f6ba14700c1a1e6547efbe0574711920e06d3d97 Author: Yoann Vandoorselaere Date: Wed Apr 22 14:53:49 2009 +0000 Add libprelude.pc.in, not generated libprelude.pc git-svn-id: file:///home/yoann/SVN/libprelude/trunk@11162 09c5ec92-17d4-0310-903a-819935f44dba src/libprelude.pc | 14 -------------- src/libprelude.pc.in | 14 ++++++++++++++ 2 files changed, 14 insertions(+), 14 deletions(-) commit 13bce7e566363a3d1d65a69aeb284d916a8eefaf Author: Yoann Vandoorselaere Date: Wed Apr 22 11:54:52 2009 +0000 Distribute a pkgconfig file. git-svn-id: file:///home/yoann/SVN/libprelude/trunk@11161 09c5ec92-17d4-0310-903a-819935f44dba configure.in | 1 + src/Makefile.am | 4 ++++ src/libprelude.pc | 14 ++++++++++++++ 3 files changed, 19 insertions(+), 0 deletions(-) commit 9e0aab68b5f5646c92630f127c8d193fcb6dd000 Author: Yoann Vandoorselaere Date: Wed Apr 22 09:43:24 2009 +0000 Remove COMMON_LIBS, since GnuLib is now used to detect theses library. When available, use pkg-config for GnuTLS/Gnutls-Extra checking. Check for Gnutls-Extra SRP support have been modified to be more flexible, this simplify the SRP support code. git-svn-id: file:///home/yoann/SVN/libprelude/trunk@11160 09c5ec92-17d4-0310-903a-819935f44dba configure.in | 61 ++++++---------- m4/pkg.m4 | 155 +++++++++++++++++++++++++++++++++++++++++ prelude-admin/prelude-admin.c | 4 +- prelude-admin/server.c | 12 ++-- 4 files changed, 187 insertions(+), 45 deletions(-) commit 53f30cda84362dff336b5dc902500c5457a87e34 Author: Yoann Vandoorselaere Date: Wed Apr 22 09:43:21 2009 +0000 Use $(GETADDRINFO_LIB) $(HOSTENT_LIB) $(LTLIBINTL) $(LTLIBTHREAD) $(SERVENT_LIB) when linking, as specified by the GnuLib documentation (fix a WIN32 build issue). git-svn-id: file:///home/yoann/SVN/libprelude/trunk@11159 09c5ec92-17d4-0310-903a-819935f44dba libprelude-config.in | 2 +- prelude-admin/Makefile.am | 2 +- src/Makefile.am | 5 ++--- 3 files changed, 4 insertions(+), 5 deletions(-) commit 041f45497218b224823b1daf44d9659820dc53ce Author: Yoann Vandoorselaere Date: Wed Apr 22 09:43:18 2009 +0000 Improved GnuLib fixes, use AC_TRY_RUN support. git-svn-id: file:///home/yoann/SVN/libprelude/trunk@11158 09c5ec92-17d4-0310-903a-819935f44dba libmissing/m4/btowc.m4 | 4 ++-- libmissing/m4/mbrtowc.m4 | 20 ++++++++++---------- libmissing/m4/wcrtomb.m4 | 4 ++-- libmissing/m4/wctob.m4 | 4 ++-- 4 files changed, 16 insertions(+), 16 deletions(-) commit fe914c2239450e46887e00f3de802f1757e1a84a Author: Yoann Vandoorselaere Date: Wed Apr 22 09:43:14 2009 +0000 Cross compilation fixes. git-svn-id: file:///home/yoann/SVN/libprelude/trunk@11157 09c5ec92-17d4-0310-903a-819935f44dba libmissing/m4/btowc.m4 | 2 +- libmissing/m4/mbrtowc.m4 | 10 +++++----- libmissing/m4/wcrtomb.m4 | 2 +- libmissing/m4/wctob.m4 | 2 +- 4 files changed, 8 insertions(+), 8 deletions(-) commit 59f04b436acb15b34a0d3800d819c59fe2ae11e0 Author: Yoann Vandoorselaere Date: Wed Apr 22 09:43:10 2009 +0000 ChangeLog is now autogenerated. git-svn-id: file:///home/yoann/SVN/libprelude/trunk@11156 09c5ec92-17d4-0310-903a-819935f44dba ChangeLog | 3222 ------------------------------------------------------------- 1 files changed, 0 insertions(+), 3222 deletions(-) commit 016a7a6dddef6d0afa4f19db6787bc5699410f38 Author: Yoann Vandoorselaere Date: Mon Apr 20 15:05:37 2009 +0000 Install C++ headers in the standard libprelude headers directory, avoid adding another include path. git-svn-id: file:///home/yoann/SVN/libprelude/trunk@11155 09c5ec92-17d4-0310-903a-819935f44dba bindings/c++/include/Makefile.am | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) commit ad09ab687d518dce428a1e2df05db00960e27722 Author: Yoann Vandoorselaere Date: Mon Apr 20 15:05:34 2009 +0000 Update documentation. git-svn-id: file:///home/yoann/SVN/libprelude/trunk@11154 09c5ec92-17d4-0310-903a-819935f44dba docs/api/libprelude-decl.txt | 6614 +++++++++++++++++++++--------------------- 1 files changed, 3307 insertions(+), 3307 deletions(-) commit 364cc96dbd5ebaa34e6f271ca1dcf6942e3c3a94 Author: Yoann Vandoorselaere Date: Mon Apr 20 15:05:30 2009 +0000 Automatic ChangeLog generation (from http://live.gnome.org/Git/ChangeLog). git-svn-id: file:///home/yoann/SVN/libprelude/trunk@11153 09c5ec92-17d4-0310-903a-819935f44dba Makefile.am | 14 ++++++++++++++ 1 files changed, 14 insertions(+), 0 deletions(-) commit 158a8d05c810a4a159cedc076951db2e7956d691 Author: Yoann Vandoorselaere Date: Mon Apr 20 14:25:26 2009 +0000 Remove '--without-system-ltdl', deprecated by libtool 2.x git-svn-id: file:///home/yoann/SVN/libprelude/trunk@11152 09c5ec92-17d4-0310-903a-819935f44dba Makefile.am | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) commit a698b05b1f696fff1609f0b4d42d57bf4ce37a93 Author: Yoann Vandoorselaere Date: Mon Apr 20 14:25:22 2009 +0000 Update GnuLib code. git-svn-id: file:///home/yoann/SVN/libprelude/trunk@11151 09c5ec92-17d4-0310-903a-819935f44dba libmissing/Makefile.am | 11 ++++++++--- libmissing/m4/inet_ntop.m4 | 15 +++++++++++++-- 2 files changed, 21 insertions(+), 5 deletions(-) commit 889ddcec7e43b45a985ba8f7814d9a30edbe7f00 Author: Yoann Vandoorselaere Date: Mon Apr 20 14:25:18 2009 +0000 Add GnuLib autogenerated file. git-svn-id: file:///home/yoann/SVN/libprelude/trunk@11150 09c5ec92-17d4-0310-903a-819935f44dba config.rpath | 672 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 files changed, 672 insertions(+), 0 deletions(-) commit 9b35985f3df8d19c6dd5e2647fce94e73c42c395 Author: Yoann Vandoorselaere Date: Mon Apr 20 14:25:14 2009 +0000 Implement IDMEFCriterionOperatorEnum enumeration. git-svn-id: file:///home/yoann/SVN/libprelude/trunk@11149 09c5ec92-17d4-0310-903a-819935f44dba bindings/c++/include/idmef-criteria.hxx | 32 ++++++++++++++++++++++++++++++- 1 files changed, 31 insertions(+), 1 deletions(-) commit d2d55a6864fdd994802e91f2878bd948cc125c64 Author: Yoann Vandoorselaere Date: Mon Apr 20 14:25:09 2009 +0000 Update to fit enumeration prefix change. git-svn-id: file:///home/yoann/SVN/libprelude/trunk@11148 09c5ec92-17d4-0310-903a-819935f44dba bindings/c++/prelude-client-easy.cxx | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) commit 95aec83fefb596202cc70c99acb6307b5c360736 Author: Yoann Vandoorselaere Date: Mon Apr 20 14:25:05 2009 +0000 Prefix enumeration to avoid conflict. git-svn-id: file:///home/yoann/SVN/libprelude/trunk@11147 09c5ec92-17d4-0310-903a-819935f44dba bindings/c++/include/prelude-client.hxx | 13 +++++++++++-- 1 files changed, 11 insertions(+), 2 deletions(-) commit 6aa0daa7c6afc7d2648843f8e07e3d1127153d3e Author: Yoann Vandoorselaere Date: Mon Apr 20 13:21:43 2009 +0000 Bind IDMEFValue::Match() method to idmef_value_match(). git-svn-id: file:///home/yoann/SVN/libprelude/trunk@11146 09c5ec92-17d4-0310-903a-819935f44dba bindings/c++/idmef-value.cxx | 6 ++++++ bindings/c++/include/idmef-value.hxx | 1 + 2 files changed, 7 insertions(+), 0 deletions(-) commit 6e1ed024e0a408b03d3480a54dad01b2ca824463 Author: Yoann Vandoorselaere Date: Wed Apr 15 13:34:05 2009 +0000 Old behavior when returning an IDMEFValue was to map it's internal type to a type understood by the target language. We preserve this behavior unless the IDMEFValue is a list of "class" value (class value can't be mapped back to the target language). In this case we return the raw IDMEFValue object, which can be used directly from the target language. git-svn-id: file:///home/yoann/SVN/libprelude/trunk@11145 09c5ec92-17d4-0310-903a-819935f44dba bindings/libpreludecpp.i | 31 +++++++++++++++++++++++++++---- 1 files changed, 27 insertions(+), 4 deletions(-) commit c53d59fe14de1eae29ea096c64303934d6f3d563 Author: Yoann Vandoorselaere Date: Tue Apr 14 16:18:39 2009 +0000 When an IDMEF value carry a class, return the IDMEFValue proxy to the caller since we currently cannot map it to the real IDMEF datatype. git-svn-id: file:///home/yoann/SVN/libprelude/trunk@11144 09c5ec92-17d4-0310-903a-819935f44dba bindings/libpreludecpp.i | 3 +++ 1 files changed, 3 insertions(+), 0 deletions(-) commit 02824099d6597a8becbf7974fe9505aa667ad785 Author: Yoann Vandoorselaere Date: Wed Apr 8 13:09:27 2009 +0000 Fix float comparison issue reported by Steve Grubb . The fix introduce a new float_compare() function which subtract the integer representations of two floats to check how close they are. If the difference is zero, they are identical. If the difference is one, they are adjacent floats. In general, if the difference is n then there are n-1 floats between them. git-svn-id: file:///home/yoann/SVN/libprelude/trunk@11127 09c5ec92-17d4-0310-903a-819935f44dba src/idmef-tree-wrap.c | 39 ++++++++++++++++++- src/idmef-wrappers-gen/GenerateIDMEFTreeWrapC.pm | 44 +++++++++++++++++++++- 2 files changed, 80 insertions(+), 3 deletions(-) commit 05cb4d10f27c30d11e548cf549cb792e5d40c39a Author: Yoann Vandoorselaere Date: Wed Apr 8 13:09:21 2009 +0000 Checking float for equality isn't reliable. Thanks to Steve Grubb for pointing this out. git-svn-id: file:///home/yoann/SVN/libprelude/trunk@11126 09c5ec92-17d4-0310-903a-819935f44dba src/idmef-time.c | 20 ++++++++++++-------- 1 files changed, 12 insertions(+), 8 deletions(-) commit d6e203f20c93985531be0d78cc8cc50106d610fe Author: Yoann Vandoorselaere Date: Tue Apr 7 08:10:31 2009 +0000 Fix NULL pointer dereference if search_entry() is called with a NULL index (although that never happen in the current code base). Thanks Steve Grubb for pointing that out. git-svn-id: file:///home/yoann/SVN/libprelude/trunk@11125 09c5ec92-17d4-0310-903a-819935f44dba src/config-engine.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) commit 50851ab9478fb198565a5cc1803cf1e43a526878 Author: Yoann Vandoorselaere Date: Tue Apr 7 08:10:28 2009 +0000 Fix off by one when checking the type array size. Thanks Steve Grubb for reporting this issue. git-svn-id: file:///home/yoann/SVN/libprelude/trunk@11124 09c5ec92-17d4-0310-903a-819935f44dba src/idmef-additional-data.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) commit 1eec3f44ccad537cebf0885be6d4c56df05b1799 Author: Yoann Vandoorselaere Date: Tue Apr 7 07:51:35 2009 +0000 Update GnuLib code. git-svn-id: file:///home/yoann/SVN/libprelude/trunk@11123 09c5ec92-17d4-0310-903a-819935f44dba libmissing/Makefile.am | 130 +++++++- libmissing/arpa_inet.in.h | 8 + libmissing/btowc.c | 38 ++ libmissing/close-hook.c | 91 +++++ libmissing/close-hook.h | 72 ++++ libmissing/close.c | 48 +--- libmissing/config.charset | 46 +++- libmissing/doc/relocatable.texi | 62 ++++ libmissing/fopen.c | 4 +- libmissing/fseeko.c | 45 ++- libmissing/gai_strerror.c | 4 +- libmissing/gettimeofday.c | 17 +- libmissing/glthread/threadlib.c | 7 +- libmissing/ioctl.c | 4 +- libmissing/localcharset.c | 41 ++- libmissing/m4/00gnulib.m4 | 30 ++ libmissing/m4/alloca.m4 | 6 +- libmissing/m4/btowc.m4 | 68 ++++ libmissing/m4/close.m4 | 4 +- libmissing/m4/codeset.m4 | 12 +- libmissing/m4/errno_h.m4 | 28 +- libmissing/m4/extensions.m4 | 32 ++- libmissing/m4/fopen.m4 | 28 +- libmissing/m4/getaddrinfo.m4 | 70 +++-- libmissing/m4/getline.m4 | 11 +- libmissing/m4/getpass.m4 | 16 +- libmissing/m4/gettimeofday.m4 | 10 +- libmissing/m4/glibc21.m4 | 14 +- libmissing/m4/gnulib-cache.m4 | 2 +- libmissing/m4/gnulib-common.m4 | 31 ++- libmissing/m4/gnulib-comp.m4 | 77 ++++- libmissing/m4/hostent.m4 | 45 +++ libmissing/m4/include_next.m4 | 59 +++- libmissing/m4/inet_ntop.m4 | 6 +- libmissing/m4/inet_pton.m4 | 6 +- libmissing/m4/intmax_t.m4 | 16 +- libmissing/m4/inttypes_h.m4 | 12 +- libmissing/m4/lib-ld.m4 | 14 +- libmissing/m4/lib-link.m4 | 18 +- libmissing/m4/localcharset.m4 | 6 +- libmissing/m4/locale-fr.m4 | 185 ++++++++++ libmissing/m4/locale-ja.m4 | 107 ++++++ libmissing/m4/locale-zh.m4 | 92 +++++ libmissing/m4/lock.m4 | 8 +- libmissing/m4/longlong.m4 | 8 +- libmissing/m4/malloc.m4 | 6 +- libmissing/m4/mbrtowc.m4 | 382 ++++++++++++++++++++ libmissing/m4/mbsinit.m4 | 30 ++ libmissing/m4/mbstate_t.m4 | 16 +- libmissing/m4/memmem.m4 | 8 +- libmissing/m4/minmax.m4 | 6 +- libmissing/m4/mktime.m4 | 30 +- libmissing/m4/multiarch.m4 | 66 ++++ libmissing/m4/netdb_h.m4 | 12 +- libmissing/m4/pathmax.m4 | 7 +- libmissing/m4/poll.m4 | 16 +- libmissing/m4/printf.m4 | 244 +++++++++---- libmissing/m4/realloc.m4 | 6 +- libmissing/m4/regex.m4 | 17 +- libmissing/m4/relocatable-lib.m4 | 10 +- libmissing/m4/select.m4 | 52 +++ libmissing/m4/servent.m4 | 47 +++ libmissing/m4/signal_h.m4 | 12 +- libmissing/m4/signalblocking.m4 | 8 +- libmissing/m4/size_max.m4 | 14 +- libmissing/m4/sockets.m4 | 43 ++- libmissing/m4/sockpfaf.m4 | 20 +- libmissing/m4/stdbool.m4 | 4 +- libmissing/m4/stdint.m4 | 95 +++++- libmissing/m4/stdint_h.m4 | 12 +- libmissing/m4/stdio_h.m4 | 10 +- libmissing/m4/stdlib_h.m4 | 17 +- libmissing/m4/strcase.m4 | 10 +- libmissing/m4/strdup.m4 | 12 +- libmissing/m4/strndup.m4 | 8 +- libmissing/m4/strnlen.m4 | 8 +- libmissing/m4/strptime.m4 | 6 +- libmissing/m4/strsep.m4 | 6 +- libmissing/m4/sys_select_h.m4 | 6 +- libmissing/m4/threadlib.m4 | 43 ++-- libmissing/m4/timegm.m4 | 8 +- libmissing/m4/tm_gmtoff.m4 | 6 +- libmissing/m4/ungetc.m4 | 36 ++ libmissing/m4/unistd_h.m4 | 6 +- libmissing/m4/vasnprintf.m4 | 52 ++- libmissing/m4/wchar.m4 | 34 ++- libmissing/m4/wchar_t.m4 | 10 +- libmissing/m4/wcrtomb.m4 | 88 +++++ libmissing/m4/wctob.m4 | 91 +++++ libmissing/m4/wint_t.m4 | 10 +- libmissing/m4/xsize.m4 | 6 +- libmissing/m4/yield.m4 | 8 +- libmissing/mbrtowc.c | 386 ++++++++++++++++++++ libmissing/mbsinit.c | 47 +++ libmissing/netdb.in.h | 10 +- libmissing/pathmax.h | 4 +- libmissing/poll.c | 61 ++-- libmissing/regcomp.c | 81 +++-- libmissing/regex_internal.c | 24 +- libmissing/regex_internal.h | 10 +- libmissing/regexec.c | 11 +- libmissing/select.c | 446 +++++++++++++++++++++++ libmissing/setsockopt.c | 21 +- libmissing/signal.in.h | 11 +- libmissing/stdint.in.h | 120 +++++-- libmissing/stdio.in.h | 32 ++ libmissing/stdlib.in.h | 12 +- libmissing/streq.h | 176 +++++++++ libmissing/strerror.c | 204 +++++++---- libmissing/sys_select.in.h | 27 ++- libmissing/sys_socket.in.h | 6 +- libmissing/sys_stat.in.h | 5 +- libmissing/sys_time.in.h | 8 + libmissing/tests/Makefile.am | 84 ++++- libmissing/tests/sockets.c | 55 +++- libmissing/tests/sockets.h | 23 ++- libmissing/tests/test-btowc.c | 71 ++++ libmissing/tests/test-btowc1.sh | 15 + libmissing/tests/test-btowc2.sh | 15 + libmissing/tests/test-fseeko.c | 19 +- libmissing/tests/test-fseeko2.sh | 3 + libmissing/tests/test-getaddrinfo.c | 25 ++- libmissing/tests/test-lock.c | 23 +- libmissing/tests/test-mbrtowc.c | 330 +++++++++++++++++ libmissing/tests/test-mbrtowc1.sh | 15 + libmissing/tests/test-mbrtowc2.sh | 15 + libmissing/tests/test-mbrtowc3.sh | 15 + libmissing/tests/test-mbrtowc4.sh | 15 + libmissing/tests/test-mbsinit.c | 62 ++++ libmissing/tests/test-mbsinit.sh | 15 + libmissing/tests/test-poll.c | 2 - libmissing/tests/test-select-in.sh | 4 + libmissing/tests/test-select-out.sh | 14 +- libmissing/tests/test-signal.c | 28 ++ libmissing/tests/test-sockets.c | 4 +- libmissing/tests/test-tls.c | 8 +- libmissing/tests/test-unistd.c | 8 +- libmissing/tests/test-wcrtomb.c | 162 +++++++++ libmissing/tests/test-wcrtomb.sh | 35 ++ libmissing/tests/verify.h | 140 -------- libmissing/tests/w32sock.h | 62 ++++ libmissing/tests/wctob.c | 37 ++ libmissing/unistd.in.h | 37 ++- libmissing/vasnprintf.c | 664 +++++++++++++++++++++++++++++++++-- libmissing/verify.h | 140 ++++++++ libmissing/wchar.in.h | 211 +++++++++++- libmissing/wcrtomb.c | 53 +++ libmissing/wctype.in.h | 3 + libmissing/winsock-select.c | 423 ---------------------- 149 files changed, 6432 insertions(+), 1387 deletions(-) commit 5585d3c7e76eb97bc9f0d1ec80d012f4cf0d77dc Author: Yoann Vandoorselaere Date: Fri Nov 14 16:22:12 2008 +0000 Update NEWS, bump version number. git-svn-id: file:///home/yoann/SVN/libprelude/trunk@11101 09c5ec92-17d4-0310-903a-819935f44dba NEWS | 31 +++++++++++++++++++++++++++++-- configure.in | 5 ++--- docs/api/libprelude-decl.txt | 8 ++++++-- 3 files changed, 37 insertions(+), 7 deletions(-) commit 3769080e2b1f5f1fd858d7d620b109ee1272d41d Author: Yoann Vandoorselaere Date: Fri Nov 14 16:22:07 2008 +0000 Correct libmissing path. git-svn-id: file:///home/yoann/SVN/libprelude/trunk@11100 09c5ec92-17d4-0310-903a-819935f44dba src/Makefile.am | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) commit 9578b79a1ac1df3601ab14b5c851e7f33cc8d4ef Author: Yoann Vandoorselaere Date: Fri Nov 14 16:22:05 2008 +0000 Update. git-svn-id: file:///home/yoann/SVN/libprelude/trunk@11099 09c5ec92-17d4-0310-903a-819935f44dba INSTALL | 53 +++++++++++++++++++++++++++-------------------------- 1 files changed, 27 insertions(+), 26 deletions(-) commit e903e662e83d3bed17c4aa75eb628811ca4deb96 Author: Yoann Vandoorselaere Date: Fri Nov 14 16:22:02 2008 +0000 Workaround broken GnuLib select test. git-svn-id: file:///home/yoann/SVN/libprelude/trunk@11098 09c5ec92-17d4-0310-903a-819935f44dba libmissing/tests/test-select-out.sh | 12 ++++++------ 1 files changed, 6 insertions(+), 6 deletions(-) commit 34ebbc486c46100d0a5d06370086f217e2d856ac Author: Yoann Vandoorselaere Date: Fri Nov 14 16:21:58 2008 +0000 Make the lock static, fix compile failure due to multiple declaration. git-svn-id: file:///home/yoann/SVN/libprelude/trunk@11097 09c5ec92-17d4-0310-903a-819935f44dba src/prelude-client-profile.c | 2 +- tests/async-timer.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit d6a2caed819ae84e3b42a54eb3c18b3a8347e794 Author: Yoann Vandoorselaere Date: Fri Nov 14 16:21:54 2008 +0000 Use idmef_path_new_fast(), kill warning. git-svn-id: file:///home/yoann/SVN/libprelude/trunk@11096 09c5ec92-17d4-0310-903a-819935f44dba tests/idmef-path.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) commit c715d06406603217fe9776cc37c246184a07c0a6 Author: Yoann Vandoorselaere Date: Fri Nov 14 16:21:52 2008 +0000 Fix warning. git-svn-id: file:///home/yoann/SVN/libprelude/trunk@11095 09c5ec92-17d4-0310-903a-819935f44dba src/prelude-plugin.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) commit 7fb4720b9e8cc3b2e812400634adc0825789fa1e Author: Yoann Vandoorselaere Date: Fri Nov 14 16:21:49 2008 +0000 Remove check for ioctl.h, this is already handled by GnuLib. git-svn-id: file:///home/yoann/SVN/libprelude/trunk@11094 09c5ec92-17d4-0310-903a-819935f44dba configure.in | 2 +- src/prelude-io.c | 5 +---- 2 files changed, 2 insertions(+), 5 deletions(-) commit 7c1e7b28a9ca9551da7dc958cea46d05acdd4aa7 Author: Yoann Vandoorselaere Date: Fri Nov 14 16:21:43 2008 +0000 Update GnuLib code. git-svn-id: file:///home/yoann/SVN/libprelude/trunk@11093 09c5ec92-17d4-0310-903a-819935f44dba libmissing/Makefile.am | 83 ++++++++++++++++++++++++++++++++++++++- libmissing/accept.c | 42 ++++++++++++++++++++ libmissing/bind.c | 40 +++++++++++++++++++ libmissing/close.c | 82 ++++++++++++++++++++++++++++++++++++++ libmissing/fclose.c | 47 ++++++++++++++++++++++ libmissing/ioctl.c | 49 +++++++++++++++++++++++ libmissing/listen.c | 40 +++++++++++++++++++ libmissing/m4/gnulib-cache.m4 | 8 +++- libmissing/m4/gnulib-comp.m4 | 71 ++++++++++++++++----------------- libmissing/sys_ioctl.in.h | 70 ++++++++++++++++++++++++++++++++ libmissing/tests/Makefile.am | 81 -------------------------------------- libmissing/tests/accept.c | 42 -------------------- libmissing/tests/bind.c | 40 ------------------- libmissing/tests/close.c | 82 -------------------------------------- libmissing/tests/fclose.c | 47 ---------------------- libmissing/tests/ioctl.c | 49 ----------------------- libmissing/tests/listen.c | 40 ------------------- libmissing/tests/sys_ioctl.in.h | 70 -------------------------------- libmissing/tests/w32sock.h | 62 ----------------------------- 19 files changed, 494 insertions(+), 551 deletions(-) commit 307557c1d03a7c5f5dddf6f904d6446a907dd65b Author: Yoann Vandoorselaere Date: Wed Nov 12 14:21:59 2008 +0000 Attempt to fix automatic build for buildbot using earlier libtool version. git-svn-id: file:///home/yoann/SVN/libprelude/trunk@11092 09c5ec92-17d4-0310-903a-819935f44dba configure.in | 1 + 1 files changed, 1 insertions(+), 0 deletions(-) commit db4407d4bdca5d4b358a1a73a31f40468b6b15d0 Author: Yoann Vandoorselaere Date: Wed Nov 12 13:59:44 2008 +0000 Update LTDL requirements. git-svn-id: file:///home/yoann/SVN/libprelude/trunk@11091 09c5ec92-17d4-0310-903a-819935f44dba src/Makefile.am | 5 +++-- 1 files changed, 3 insertions(+), 2 deletions(-) commit 5c1b03ded8b86b77ba9ffc41c045107696207e24 Author: Yoann Vandoorselaere Date: Wed Nov 12 13:59:41 2008 +0000 Update GnuLib code. git-svn-id: file:///home/yoann/SVN/libprelude/trunk@11090 09c5ec92-17d4-0310-903a-819935f44dba libmissing/Makefile.am | 5 ++ libmissing/config.charset | 6 +- libmissing/fseeko.c | 2 +- libmissing/m4/getaddrinfo.m4 | 22 ++++++++- libmissing/m4/gnulib-comp.m4 | 5 ++ libmissing/m4/netdb_h.m4 | 8 +++- libmissing/m4/printf.m4 | 9 +++- libmissing/m4/sys_ioctl_h.m4 | 11 +++-- libmissing/netdb.in.h | 12 +++--- libmissing/sys_stat.in.h | 12 +++++ libmissing/tests/Makefile.am | 12 +++-- libmissing/tests/sockets.h | 4 +- libmissing/tests/test-select-fd.c | 72 ++++++++++++++++++++++++++++++ libmissing/tests/test-select-in.sh | 33 ++++++++++++++ libmissing/tests/test-select-out.sh | 33 ++++++++++++++ libmissing/tests/test-select-stdin.c | 80 ++++++++++++++++++++++++++++++++++ 16 files changed, 301 insertions(+), 25 deletions(-) commit f3a4dd62ad17aee6094e7ada65d59c366fa09e78 Author: Yoann Vandoorselaere Date: Wed Nov 12 13:59:37 2008 +0000 Update GtkDoc detection code. git-svn-id: file:///home/yoann/SVN/libprelude/trunk@11089 09c5ec92-17d4-0310-903a-819935f44dba Makefile.am | 5 ----- m4/gtk-doc.m4 | 52 +++++++++++++++++++--------------------------------- 2 files changed, 19 insertions(+), 38 deletions(-) commit 4b6cdcab02534f626a5c5d8b23b0edf027fb70c4 Author: Yoann Vandoorselaere Date: Wed Nov 12 13:59:34 2008 +0000 Remove deprecated. git-svn-id: file:///home/yoann/SVN/libprelude/trunk@11088 09c5ec92-17d4-0310-903a-819935f44dba configure.in | 52 ++++++---------------------------------------------- 1 files changed, 6 insertions(+), 46 deletions(-) commit 0d2213435c0e4e61e118108c2e194a74411bfd67 Author: Yoann Vandoorselaere Date: Wed Nov 12 13:59:29 2008 +0000 Increase symbol table size. git-svn-id: file:///home/yoann/SVN/libprelude/trunk@11087 09c5ec92-17d4-0310-903a-819935f44dba src/prelude-plugin.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) commit f671c7e5e2bcc327abcbbbfbc7b9e997acdaeb50 Author: Yoann Vandoorselaere Date: Wed Nov 12 09:36:53 2008 +0000 Workaround libtool/libltdl 1.5 -> 2.x ABI compatibility issues. This introduce two fixes: - Fix a crash when an application use a different libtool version than the libltdl version used to compile libprelude. In order to prevent this problem, we automatically rewrite symbol table provided by libtool 1.5 application, and make it compatible with libltdl 2.2 (we will now ship libtool/ltdl 2.2 as the default with libprelude). - Automatic handling of symbol renaming between libtool 1.5 -> 2.x, which solve application linking problem. This fix #294. git-svn-id: file:///home/yoann/SVN/libprelude/trunk@11086 09c5ec92-17d4-0310-903a-819935f44dba m4/libprelude.m4 | 5 +++++ src/include/prelude-plugin.h | 17 ++++++++++++----- src/prelude-plugin.c | 33 ++++++++++++++++++++++++++++++--- 3 files changed, 47 insertions(+), 8 deletions(-) commit 366e0eb50ac80cdb822eb0ca708ee36cdaa7af31 Author: Yoann Vandoorselaere Date: Wed Nov 12 09:36:48 2008 +0000 Update GnuLib code. git-svn-id: file:///home/yoann/SVN/libprelude/trunk@11085 09c5ec92-17d4-0310-903a-819935f44dba libmissing/Makefile.am | 63 ++----- libmissing/connect.c | 47 +++++ libmissing/getsockname.c | 40 +++++ libmissing/glthread/thread.c | 1 + libmissing/m4/gnulib-comp.m4 | 50 +++--- libmissing/m4/include_next.m4 | 18 ++- libmissing/m4/memchr.m4 | 18 -- libmissing/m4/memcmp.m4 | 31 ---- libmissing/m4/netdb_h.m4 | 5 +- libmissing/m4/stdlib_h.m4 | 44 +++-- libmissing/m4/strpbrk.m4 | 18 -- libmissing/m4/sys_socket_h.m4 | 8 +- libmissing/m4/unistd_h.m4 | 4 +- libmissing/memchr.c | 172 ------------------- libmissing/memcmp.c | 361 --------------------------------------- libmissing/netdb.in.h | 5 +- libmissing/raise.c | 30 ---- libmissing/setsockopt.c | 40 +++++ libmissing/signal.in.h | 6 + libmissing/socket.c | 43 +++++ libmissing/stdlib.in.h | 54 ++++++ libmissing/strpbrk.c | 42 ----- libmissing/sys_socket.in.h | 15 +- libmissing/sys_stat.in.h | 19 ++- libmissing/tests/Makefile.am | 64 +++++--- libmissing/tests/accept.c | 42 +++++ libmissing/tests/bind.c | 40 +++++ libmissing/tests/close.c | 37 ++++ libmissing/tests/ioctl.c | 49 ++++++ libmissing/tests/listen.c | 40 +++++ libmissing/tests/sys_ioctl.in.h | 70 ++++++++ libmissing/tests/test-memchr.c | 100 ----------- libmissing/tests/test-memcmp.c | 82 --------- libmissing/tests/w32sock.h | 62 +++++++ libmissing/tests/winsock.c | 348 ------------------------------------- libmissing/unistd.in.h | 72 ++++++++ libmissing/w32sock.h | 62 +++++++ libmissing/winsock.c | 348 ------------------------------------- 38 files changed, 861 insertions(+), 1689 deletions(-) commit bd07d181a5657ea26d12519a2898b505210d3fa4 Author: Yoann Vandoorselaere Date: Wed Nov 5 08:54:54 2008 +0000 Cygwin compilation fixes. git-svn-id: file:///home/yoann/SVN/libprelude/trunk@11082 09c5ec92-17d4-0310-903a-819935f44dba src/prelude-failover.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) commit 37b792f7ee4700feec3dd8bfcb182ff57ce835c4 Author: Yoann Vandoorselaere Date: Tue Nov 4 13:42:34 2008 +0000 Fix compilation when IPv6 is not available. git-svn-id: file:///home/yoann/SVN/libprelude/trunk@11080 09c5ec92-17d4-0310-903a-819935f44dba src/prelude-client.c | 4 ++++ 1 files changed, 4 insertions(+), 0 deletions(-) commit 228e9175868d80fc9f3373d11adceebcb4e5ffa4 Author: Yoann Vandoorselaere Date: Tue Nov 4 13:42:27 2008 +0000 Fix error with recent autotools version. git-svn-id: file:///home/yoann/SVN/libprelude/trunk@11079 09c5ec92-17d4-0310-903a-819935f44dba configure.in | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) commit aa55bd8381db0e5fdc2a11b5f1192e36eb149360 Author: Yoann Vandoorselaere Date: Tue Oct 21 13:46:37 2008 +0000 Fix OpenBSD poll unit-test. git-svn-id: file:///home/yoann/SVN/libprelude/trunk@11077 09c5ec92-17d4-0310-903a-819935f44dba libmissing/tests/test-poll.c | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) commit 3dcb823325f24539dfe55a263a0cd646a741ad87 Author: Yoann Vandoorselaere Date: Tue Oct 21 08:58:54 2008 +0000 Include GnuLib replacement headers directly. git-svn-id: file:///home/yoann/SVN/libprelude/trunk@11076 09c5ec92-17d4-0310-903a-819935f44dba prelude-admin/prelude-admin.c | 1 + prelude-admin/server.c | 5 ++++- 2 files changed, 5 insertions(+), 1 deletions(-) commit bb2fe592955a1e7c33d54eec93ee491f77db0455 Author: Yoann Vandoorselaere Date: Tue Oct 21 08:58:52 2008 +0000 Include GnuLib replacement headers directly. git-svn-id: file:///home/yoann/SVN/libprelude/trunk@11075 09c5ec92-17d4-0310-903a-819935f44dba src/idmef-criterion-value.c | 2 +- src/include/libmissing.h | 10 ---------- src/prelude-client.c | 2 ++ src/prelude-connection.c | 3 +++ src/prelude-io.c | 2 +- 5 files changed, 7 insertions(+), 12 deletions(-) commit ca377fa43ebac9782e2f493b93d9aab3cb67e82a Author: Yoann Vandoorselaere Date: Tue Oct 21 08:58:44 2008 +0000 Gnulib code update. git-svn-id: file:///home/yoann/SVN/libprelude/trunk@11074 09c5ec92-17d4-0310-903a-819935f44dba libmissing/Makefile.am | 52 ++++- libmissing/arpa_inet.in.h | 2 + libmissing/errno.in.h | 2 + libmissing/float.in.h | 2 + libmissing/gai_strerror.c | 7 +- libmissing/getaddrinfo.c | 18 ++- libmissing/getaddrinfo.h | 163 ----------- libmissing/glthread/cond.c | 540 ++++++++++++++++++++++++----------- libmissing/glthread/cond.h | 44 ++-- libmissing/glthread/lock.c | 5 + libmissing/glthread/lock.h | 6 +- libmissing/glthread/thread.c | 13 +- libmissing/glthread/thread.h | 3 + libmissing/m4/close.m4 | 25 ++ libmissing/m4/fclose.m4 | 18 ++ libmissing/m4/getaddrinfo.m4 | 16 +- libmissing/m4/gnulib-common.m4 | 12 +- libmissing/m4/gnulib-comp.m4 | 16 +- libmissing/m4/netdb_h.m4 | 32 ++ libmissing/m4/sleep.m4 | 13 +- libmissing/m4/stdio_h.m4 | 4 +- libmissing/m4/stdlib_h.m4 | 11 +- libmissing/m4/sys_ioctl_h.m4 | 60 ++++ libmissing/m4/sys_socket_h.m4 | 11 +- libmissing/m4/sys_stat_h.m4 | 6 +- libmissing/m4/unistd_h.m4 | 11 +- libmissing/netdb.in.h | 189 ++++++++++++ libmissing/netinet_in.in.h | 2 + libmissing/signal.in.h | 2 + libmissing/sigprocmask.c | 40 +++- libmissing/stdint.in.h | 2 + libmissing/stdio.in.h | 17 ++ libmissing/stdlib.in.h | 81 ++++++ libmissing/string.in.h | 2 + libmissing/strings.in.h | 2 + libmissing/sys_select.in.h | 2 + libmissing/sys_socket.in.h | 36 ++- libmissing/sys_stat.in.h | 52 ++++- libmissing/sys_time.in.h | 2 + libmissing/tests/Makefile.am | 27 ++ libmissing/tests/close.c | 45 +++ libmissing/tests/fclose.c | 47 +++ libmissing/tests/test-getaddrinfo.c | 2 +- libmissing/tests/test-lock.c | 13 + libmissing/tests/test-netdb.c | 29 ++ libmissing/tests/test-poll.c | 3 +- libmissing/tests/test-select.c | 1 + libmissing/tests/winsock.c | 106 +++++--- libmissing/time.in.h | 2 + libmissing/unistd.in.h | 99 ++++++- libmissing/wchar.in.h | 2 + libmissing/wctype.in.h | 2 + libmissing/winsock.c | 106 +++++--- 53 files changed, 1533 insertions(+), 472 deletions(-) commit 6e6f277d4f16d6c7c4ce12dc6d6bcf89fc339343 Author: Yoann Vandoorselaere Date: Fri Oct 17 13:10:13 2008 +0000 Add debug message on heartbeat. git-svn-id: file:///home/yoann/SVN/libprelude/trunk@11073 09c5ec92-17d4-0310-903a-819935f44dba src/prelude-client.c | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) commit ae22a12d7bde27e7e2f9a929ac4c607e3da079c7 Author: Yoann Vandoorselaere Date: Fri Oct 17 08:47:24 2008 +0000 Fix possible compilation problem with some GCC version (fix #325). git-svn-id: file:///home/yoann/SVN/libprelude/trunk@11068 09c5ec92-17d4-0310-903a-819935f44dba src/idmef-tree-wrap.c | 522 ++++++++-------------- src/idmef-wrappers-gen/GenerateIDMEFTreeWrapC.pm | 23 +- 2 files changed, 205 insertions(+), 340 deletions(-) commit cfd0b89da054f09ce82b63a8da559cfe1654aaa7 Author: Yoann Vandoorselaere Date: Mon Oct 13 13:23:48 2008 +0000 Update NEWS, bump version. git-svn-id: file:///home/yoann/SVN/libprelude/trunk@11062 09c5ec92-17d4-0310-903a-819935f44dba NEWS | 7 +++++++ configure.in | 4 ++-- docs/api/libprelude-decl.txt | 2 +- 3 files changed, 10 insertions(+), 3 deletions(-) commit 37f733357950b784fc65183a25dedd1c366fc658 Author: Yoann Vandoorselaere Date: Wed Oct 8 12:52:35 2008 +0000 Fix NULL pointer dereference in case of NULL client profile (fix #320). git-svn-id: file:///home/yoann/SVN/libprelude/trunk@11061 09c5ec92-17d4-0310-903a-819935f44dba src/prelude-client-profile.c | 11 ++++++++--- 1 files changed, 8 insertions(+), 3 deletions(-) commit 79560ec60f748fefeb846a6b61b75b5160f5f574 Author: Yoann Vandoorselaere Date: Mon Oct 6 15:23:16 2008 +0000 Late fix C++ build problem: this will be part of the 0.9.21.1 release. git-svn-id: file:///home/yoann/SVN/libprelude/trunk@11058 09c5ec92-17d4-0310-903a-819935f44dba bindings/c++/include/prelude-client-profile.hxx | 1 + 1 files changed, 1 insertions(+), 0 deletions(-) commit 7e902046ec3e5b069cc716b30f380fff60a317d7 Author: Yoann Vandoorselaere Date: Mon Oct 6 14:01:19 2008 +0000 Update NEWS, documentation, bump version number. git-svn-id: file:///home/yoann/SVN/libprelude/trunk@11056 09c5ec92-17d4-0310-903a-819935f44dba NEWS | 17 +++++++++++++++++ configure.in | 8 ++++---- docs/api/libprelude-decl.txt | 12 +++++++++++- docs/api/libprelude-sections.txt | 2 ++ docs/api/tmpl/prelude-client.sgml | 9 +++++++++ 5 files changed, 43 insertions(+), 5 deletions(-) commit 5a8390c5569730cfee819c45b547628c3e1eed84 Author: Yoann Vandoorselaere Date: Mon Oct 6 14:01:16 2008 +0000 Remove WIN32 specific workaround, now handled by GnuLib. git-svn-id: file:///home/yoann/SVN/libprelude/trunk@11055 09c5ec92-17d4-0310-903a-819935f44dba src/prelude-io.c | 4 ---- 1 files changed, 0 insertions(+), 4 deletions(-) commit 0382b38f87ff02b60f69ae3376f3eb4fbb869b02 Author: Yoann Vandoorselaere Date: Mon Oct 6 14:01:13 2008 +0000 Remove THREADCPPFLAGS usage until they are proven required. git-svn-id: file:///home/yoann/SVN/libprelude/trunk@11054 09c5ec92-17d4-0310-903a-819935f44dba libprelude-config.in | 2 +- src/Makefile.am | 2 +- src/libprelude-error/Makefile.am | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) commit 5f4c3602b6a6c011a7cd958950e3fd7716d219b3 Author: Yoann Vandoorselaere Date: Mon Oct 6 14:01:07 2008 +0000 Update GnuLib code. git-svn-id: file:///home/yoann/SVN/libprelude/trunk@11053 09c5ec92-17d4-0310-903a-819935f44dba libmissing/Makefile.am | 143 +++++++++++- libmissing/arpa_inet.in.h | 2 + libmissing/c-ctype.h | 17 ++- libmissing/errno.in.h | 4 +- libmissing/fopen.c | 68 +++++-- libmissing/glthread/cond.h | 14 +- libmissing/glthread/thread.c | 244 ++++++++++---------- libmissing/glthread/thread.h | 20 +- libmissing/intprops.h | 77 ++++++ libmissing/m4/arpa_inet_h.m4 | 9 +- libmissing/m4/fopen.m4 | 9 +- libmissing/m4/gnulib-cache.m4 | 10 +- libmissing/m4/gnulib-comp.m4 | 64 +++++- libmissing/m4/inet_ntop.m4 | 5 +- libmissing/m4/inet_pton.m4 | 5 +- libmissing/m4/memcmp.m4 | 2 +- libmissing/m4/perror.m4 | 17 ++ libmissing/m4/signal_h.m4 | 3 +- libmissing/m4/sockets.m4 | 64 ++++-- libmissing/m4/stdio_h.m4 | 36 +++- libmissing/m4/strdup.m4 | 22 ++- libmissing/m4/strerror.m4 | 68 ++++++ libmissing/m4/string_h.m4 | 9 +- libmissing/m4/sys_select_h.m4 | 20 ++- libmissing/m4/sys_socket_h.m4 | 62 +++++- libmissing/m4/thread.m4 | 6 +- libmissing/m4/threadlib.m4 | 8 +- libmissing/m4/unistd_h.m4 | 33 ++- libmissing/m4/wchar.m4 | 25 ++- libmissing/m4/write.m4 | 20 ++ libmissing/perror.c | 35 +++ libmissing/poll.c | 445 +++++++++++++++++++++++++++++++----- libmissing/signal.in.h | 21 ++ libmissing/sigprocmask.c | 51 ++++ libmissing/stdio-write.c | 148 ++++++++++++ libmissing/stdio.in.h | 55 +++++ libmissing/strerror.c | 273 ++++++++++++++++++++++ libmissing/string.in.h | 6 +- libmissing/sys_select.in.h | 31 +++ libmissing/sys_socket.in.h | 286 +++++++++++++++++++++++- libmissing/tests/Makefile.am | 57 +++++- libmissing/tests/intprops.h | 77 ------ libmissing/tests/test-cond.c | 111 +++++----- libmissing/tests/test-fopen.c | 1 + libmissing/tests/test-lock.c | 20 ++- libmissing/tests/test-perror.c | 34 +++ libmissing/tests/test-perror.sh | 27 +++ libmissing/tests/test-poll.c | 10 +- libmissing/tests/test-select.c | 375 ++++++++++++++++++++++++++++++ libmissing/tests/test-strerror.c | 65 ++++++ libmissing/tests/test-sys_select.c | 5 +- libmissing/tests/test-tls.c | 4 +- libmissing/tests/test-wchar.c | 6 +- libmissing/tests/test-wctype.c | 3 + libmissing/tests/winsock.c | 308 +++++++++++++++++++++++++ libmissing/unistd.in.h | 46 ++++ libmissing/vasnprintf.c | 29 ++- libmissing/wchar.in.h | 6 + libmissing/wctype.in.h | 31 ++-- libmissing/winsock-select.c | 423 ++++++++++++++++++++++++++++++++++ libmissing/winsock.c | 308 +++++++++++++++++++++++++ libmissing/write.c | 62 +++++ 62 files changed, 3985 insertions(+), 460 deletions(-) commit 24d0f1e1b251f6f84c20c9f39949f5e225da68a1 Author: Yoann Vandoorselaere Date: Fri Oct 3 15:20:09 2008 +0000 Fix path issue in case libprelude was configured with specific path outside of $prefix (fix #319). git-svn-id: file:///home/yoann/SVN/libprelude/trunk@11052 09c5ec92-17d4-0310-903a-819935f44dba src/prelude-client-profile.c | 111 ++++++++++++++++++++++++++++-------------- 1 files changed, 74 insertions(+), 37 deletions(-) commit 174186a6e232bcb4a098e6eb7a744610e90690cc Author: Yoann Vandoorselaere Date: Fri Oct 3 15:20:07 2008 +0000 Fix a bug where building EasyBindings would be done although they are not enabled. git-svn-id: file:///home/yoann/SVN/libprelude/trunk@11051 09c5ec92-17d4-0310-903a-819935f44dba bindings/Makefile.am | 22 ++++++---------------- 1 files changed, 6 insertions(+), 16 deletions(-) commit 5070260e92f8c9925e1dab24737b64a2c5e86fff Author: Yoann Vandoorselaere Date: Fri Oct 3 15:20:05 2008 +0000 Remove dependency on perror(). git-svn-id: file:///home/yoann/SVN/libprelude/trunk@11050 09c5ec92-17d4-0310-903a-819935f44dba prelude-admin/server.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) commit 9c236970011fee646444ab996d73107605ad62fe Author: Yoann Vandoorselaere Date: Fri Oct 3 15:20:01 2008 +0000 Add missing sys/select.h git-svn-id: file:///home/yoann/SVN/libprelude/trunk@11049 09c5ec92-17d4-0310-903a-819935f44dba src/prelude-connection-pool.c | 1 + 1 files changed, 1 insertions(+), 0 deletions(-) commit 31bf45ec783d6cccf2190208ae80294b48fad0a3 Author: Yoann Vandoorselaere Date: Wed Sep 24 11:23:20 2008 +0000 Add refcount support. git-svn-id: file:///home/yoann/SVN/libprelude/trunk@11048 09c5ec92-17d4-0310-903a-819935f44dba bindings/c++/include/prelude-client-profile.hxx | 24 +++++---- bindings/c++/include/prelude-client.hxx | 9 +--- bindings/c++/prelude-client-profile.cxx | 62 ++++++++++++++-------- bindings/c++/prelude-client.cxx | 23 +++++++- bindings/libpreludecpp.i | 12 ---- 5 files changed, 74 insertions(+), 56 deletions(-) commit c21aa01c4ad057a9539113b000531047183f2c74 Author: Yoann Vandoorselaere Date: Wed Sep 24 10:53:48 2008 +0000 Add refcount to prelude_client_t object. git-svn-id: file:///home/yoann/SVN/libprelude/trunk@11047 09c5ec92-17d4-0310-903a-819935f44dba src/include/prelude-client.h | 2 ++ src/prelude-client.c | 15 +++++++++++++++ 2 files changed, 17 insertions(+), 0 deletions(-) commit 91ca09c721adbe5535a24f5af2847777df5daec8 Author: Yoann Vandoorselaere Date: Wed Sep 24 10:49:40 2008 +0000 Add refcount support to the prelude_client_profile_t object. git-svn-id: file:///home/yoann/SVN/libprelude/trunk@11046 09c5ec92-17d4-0310-903a-819935f44dba src/include/prelude-client-profile.h | 2 ++ src/prelude-client-profile.c | 14 ++++++++++++++ 2 files changed, 16 insertions(+), 0 deletions(-) commit e787c06e61ea3212ea7cd0072d039ba441f46210 Author: Yoann Vandoorselaere Date: Wed Sep 24 09:05:44 2008 +0000 Update README. git-svn-id: file:///home/yoann/SVN/libprelude/trunk@11042 09c5ec92-17d4-0310-903a-819935f44dba README | 6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-) commit 4d684747391b1a11bbc91c4524affd6023fc54c8 Author: Yoann Vandoorselaere Date: Wed Sep 24 08:54:24 2008 +0000 No pointer usage. git-svn-id: file:///home/yoann/SVN/libprelude/trunk@11039 09c5ec92-17d4-0310-903a-819935f44dba bindings/c++/idmef-criteria.cxx | 12 ++++++------ bindings/c++/include/idmef-criteria.hxx | 6 +++--- 2 files changed, 9 insertions(+), 9 deletions(-) commit 5ace60285a720b49ac33e830920597f78a4df4ed Author: Yoann Vandoorselaere Date: Wed Sep 24 08:54:23 2008 +0000 Fix assertion warning if no address can be found. git-svn-id: file:///home/yoann/SVN/libprelude/trunk@11038 09c5ec92-17d4-0310-903a-819935f44dba src/prelude-client.c | 25 +++++++++++++++---------- 1 files changed, 15 insertions(+), 10 deletions(-) commit 1d1e24a1e69f9d5e9c285b6c6cd1034d04f3994c Author: Yoann Vandoorselaere Date: Fri Sep 19 15:16:03 2008 +0000 Update NEWS, bump version. git-svn-id: file:///home/yoann/SVN/libprelude/trunk@11029 09c5ec92-17d4-0310-903a-819935f44dba NEWS | 20 ++++++++++++++++++++ configure.in | 13 +++++++------ docs/api/libprelude-decl.txt | 31 ++++++++++++++++++++++++++----- docs/api/libprelude-sections.txt | 2 ++ 4 files changed, 55 insertions(+), 11 deletions(-) commit 48041184b4a0a84de24468acce812e0cc78c2b74 Author: Yoann Vandoorselaere Date: Fri Sep 19 15:16:00 2008 +0000 Add SetPrefix() and GetPrefix() function. git-svn-id: file:///home/yoann/SVN/libprelude/trunk@11028 09c5ec92-17d4-0310-903a-819935f44dba bindings/c++/include/prelude-client-profile.hxx | 3 +++ bindings/c++/prelude-client-profile.cxx | 15 +++++++++++++++ 2 files changed, 18 insertions(+), 0 deletions(-) commit 05b56f0fdd64f7aca096654578359e41e9a3a625 Author: Yoann Vandoorselaere Date: Fri Sep 19 11:40:20 2008 +0000 Ignore test-poll error on OpenBSD. git-svn-id: file:///home/yoann/SVN/libprelude/trunk@11027 09c5ec92-17d4-0310-903a-819935f44dba libmissing/tests/test-poll.c | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) commit 0f626dd248fd5deb2ee09db2fa35f5996cfdec19 Author: Yoann Vandoorselaere Date: Fri Sep 19 11:38:19 2008 +0000 Make prelude-client-profile self contained: use prelude_uid_t / prelude_gid_t. git-svn-id: file:///home/yoann/SVN/libprelude/trunk@11026 09c5ec92-17d4-0310-903a-819935f44dba Makefile.am | 12 +++++++++++- configure.in | 2 +- src/include/prelude-client-profile.h | 22 ++++++++++++++++++---- src/prelude-client-profile.c | 12 ++++++------ 4 files changed, 36 insertions(+), 12 deletions(-) commit c7f757258c09ee2b041c3c7e773770c2d34f7c51 Author: Yoann Vandoorselaere Date: Fri Sep 19 11:11:25 2008 +0000 Add Python package description, author, url, and version. Do not use config.h, since we are not using libmissing. git-svn-id: file:///home/yoann/SVN/libprelude/trunk@11025 09c5ec92-17d4-0310-903a-819935f44dba bindings/low-level/python/setup.py.in | 6 +++++- bindings/python/setup.py.in | 6 +++++- 2 files changed, 10 insertions(+), 2 deletions(-) commit 7bbba611f043a8d693132d59b53ad0c406e50f21 Author: Yoann Vandoorselaere Date: Fri Sep 19 11:11:23 2008 +0000 Remove deprecated check. git-svn-id: file:///home/yoann/SVN/libprelude/trunk@11024 09c5ec92-17d4-0310-903a-819935f44dba configure.in | 7 ------- 1 files changed, 0 insertions(+), 7 deletions(-) commit ea686ed2527c8ae6472701fb0b337a5ebaea4892 Author: Yoann Vandoorselaere Date: Fri Sep 19 11:11:20 2008 +0000 Update documentation. git-svn-id: file:///home/yoann/SVN/libprelude/trunk@11023 09c5ec92-17d4-0310-903a-819935f44dba docs/api/libprelude-decl.txt | 12 +++++++++++- docs/api/libprelude-sections.txt | 3 +++ 2 files changed, 14 insertions(+), 1 deletions(-) commit e9b44330190fb10eaffc308c191b5c5d736af7e0 Author: Yoann Vandoorselaere Date: Fri Sep 19 11:11:17 2008 +0000 Fix use of uninitialized condition. git-svn-id: file:///home/yoann/SVN/libprelude/trunk@11022 09c5ec92-17d4-0310-903a-819935f44dba src/prelude-async.c | 9 ++------- 1 files changed, 2 insertions(+), 7 deletions(-) commit 3610e2f5db3e1968f6ea7565bbf532cdafa55410 Author: Yoann Vandoorselaere Date: Fri Sep 19 11:11:13 2008 +0000 Add prelude_client_profile_get_prefix(). git-svn-id: file:///home/yoann/SVN/libprelude/trunk@11021 09c5ec92-17d4-0310-903a-819935f44dba src/include/prelude-client-profile.h | 3 +++ src/prelude-client-profile.c | 23 +++++++++++++++++++++++ 2 files changed, 26 insertions(+), 0 deletions(-) commit 5aff3a4f48b857b02ee8f35ac19e036612c6e384 Author: Yoann Vandoorselaere Date: Thu Sep 18 13:16:48 2008 +0000 User can now set the working prefix using the LIBPRELUDE_PREFIX environment variable. git-svn-id: file:///home/yoann/SVN/libprelude/trunk@11020 09c5ec92-17d4-0310-903a-819935f44dba src/prelude-client-profile.c | 3 ++- src/prelude.c | 5 +++++ 2 files changed, 7 insertions(+), 1 deletions(-) commit cce34609592666d1331a1c840d59127eac8853fd Author: Yoann Vandoorselaere Date: Thu Sep 18 13:16:45 2008 +0000 Use PATH_MAX. git-svn-id: file:///home/yoann/SVN/libprelude/trunk@11019 09c5ec92-17d4-0310-903a-819935f44dba src/prelude-client.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) commit 02195b99889876f04f5d49c22237c87647c8ca8d Author: Yoann Vandoorselaere Date: Thu Sep 18 11:00:21 2008 +0000 Fix WIN32 compile warnings. git-svn-id: file:///home/yoann/SVN/libprelude/trunk@11017 09c5ec92-17d4-0310-903a-819935f44dba src/prelude-failover.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) commit ca5138da473a07595bb1cb511ec5e5061623c6c5 Author: Yoann Vandoorselaere Date: Thu Sep 18 10:53:30 2008 +0000 Special case Cygwin. git-svn-id: file:///home/yoann/SVN/libprelude/trunk@11016 09c5ec92-17d4-0310-903a-819935f44dba prelude-admin/prelude-admin.c | 24 ++++++++++++------------ prelude-admin/tls-register.c | 4 ++-- 2 files changed, 14 insertions(+), 14 deletions(-) commit d29cf15fe32dea68824e94d32878cf2058219185 Author: Yoann Vandoorselaere Date: Thu Sep 18 10:46:53 2008 +0000 Update GNuLib code, include fopen and uname module. git-svn-id: file:///home/yoann/SVN/libprelude/trunk@11015 09c5ec92-17d4-0310-903a-819935f44dba libmissing/Makefile.am | 20 +++++- libmissing/fopen.c | 65 ++++++++++++++++++ libmissing/m4/fopen.m4 | 50 ++++++++++++++ libmissing/m4/gnulib-cache.m4 | 4 +- libmissing/m4/gnulib-comp.m4 | 9 +++ libmissing/m4/uname.m4 | 18 +++++ libmissing/tests/Makefile.am | 9 +++ libmissing/tests/test-fopen.c | 44 ++++++++++++ libmissing/uname.c | 147 +++++++++++++++++++++++++++++++++++++++++ libmissing/uname.h | 51 ++++++++++++++ src/prelude-client.c | 22 +------ 11 files changed, 416 insertions(+), 23 deletions(-) commit bb99d0f84dacc4999cd2660dbfe48a25b7142cea Author: Yoann Vandoorselaere Date: Thu Sep 18 10:46:49 2008 +0000 Include config.h git-svn-id: file:///home/yoann/SVN/libprelude/trunk@11014 09c5ec92-17d4-0310-903a-819935f44dba tests/async-timer.c | 2 ++ tests/idmef-criteria.c | 2 ++ tests/idmef-message-helper.c | 2 ++ tests/idmef-path.c | 2 ++ tests/idmef-value.c | 2 ++ tests/idmef.c | 2 ++ tests/prelude-client.c | 2 ++ tests/prelude-string.c | 2 ++ 8 files changed, 16 insertions(+), 0 deletions(-) commit fc0a95e6a62fe6c9088661e0f24b1aedaf0d7e25 Author: Yoann Vandoorselaere Date: Thu Sep 18 10:46:46 2008 +0000 Link with libmissing. git-svn-id: file:///home/yoann/SVN/libprelude/trunk@11013 09c5ec92-17d4-0310-903a-819935f44dba tests/Makefile.am | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) commit 4eb86c32be8a9efe320ef81dfa3c9881220b043f Author: Yoann Vandoorselaere Date: Thu Sep 18 10:46:44 2008 +0000 Update GnuLib code, WIN32 compatibility for gl_cond_t. git-svn-id: file:///home/yoann/SVN/libprelude/trunk@11012 09c5ec92-17d4-0310-903a-819935f44dba libmissing/Makefile.am | 12 ++- libmissing/glthread/cond.c | 189 +++++++++++++++++++++++++++++++++++++++++ libmissing/glthread/cond.h | 57 ++++++++++++- libmissing/m4/gnulib-cache.m4 | 3 +- libmissing/m4/gnulib-comp.m4 | 5 + libmissing/m4/sleep.m4 | 19 ++++ libmissing/sleep.c | 46 ++++++++++ libmissing/tests/Makefile.am | 9 ++ libmissing/tests/test-cond.c | 1 + libmissing/tests/test-sleep.c | 47 ++++++++++ libmissing/vasnprintf.c | 61 ++++++++++++-- 11 files changed, 439 insertions(+), 10 deletions(-) commit 7a806cceeb7ccacaf373c193a4415aa928d7abf8 Author: Yoann Vandoorselaere Date: Thu Sep 18 10:46:40 2008 +0000 Make variable.h private. git-svn-id: file:///home/yoann/SVN/libprelude/trunk@11011 09c5ec92-17d4-0310-903a-819935f44dba src/include/Makefile.am | 3 +-- 1 files changed, 1 insertions(+), 2 deletions(-) commit aecc46099912efd6f791ff7f18c2b44fc676347c Author: Yoann Vandoorselaere Date: Thu Sep 18 10:46:38 2008 +0000 Make a difference between WIN32 and Cygwin. git-svn-id: file:///home/yoann/SVN/libprelude/trunk@11010 09c5ec92-17d4-0310-903a-819935f44dba src/common.c | 6 +++--- src/daemonize.c | 8 ++++---- src/prelude-client-profile.c | 2 +- src/prelude-connection-pool.c | 2 +- src/prelude-connection.c | 14 +++++++------- src/prelude-failover.c | 10 +++++----- src/prelude-io.c | 2 +- src/prelude-log.c | 6 +++--- 8 files changed, 25 insertions(+), 25 deletions(-) commit 3f2a8a55f9961735f3a69fb7216604cc9b31481b Author: Yoann Vandoorselaere Date: Thu Sep 18 10:46:34 2008 +0000 Fix documentation header. git-svn-id: file:///home/yoann/SVN/libprelude/trunk@11009 09c5ec92-17d4-0310-903a-819935f44dba src/prelude-client-profile.c | 1 + 1 files changed, 1 insertions(+), 0 deletions(-) commit e4c508deb03ca8a504f32a08a5319d775f5801f9 Author: Yoann Vandoorselaere Date: Thu Sep 18 10:46:31 2008 +0000 No permission warning on WIN32. git-svn-id: file:///home/yoann/SVN/libprelude/trunk@11008 09c5ec92-17d4-0310-903a-819935f44dba prelude-admin/prelude-admin.c | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) commit f1c7f343c2592d968a5ff0f415724d6c93581850 Author: Yoann Vandoorselaere Date: Thu Sep 18 10:46:29 2008 +0000 Fix include ordering to workaround an issue with certain C++ compiler triggered by config.h redefinition. git-svn-id: file:///home/yoann/SVN/libprelude/trunk@11007 09c5ec92-17d4-0310-903a-819935f44dba bindings/c++/include/prelude-client.hxx | 1 - bindings/c++/prelude-client-easy.cxx | 7 +------ bindings/c++/prelude-client.cxx | 12 ++++-------- bindings/c++/prelude-error.cxx | 3 ++- 4 files changed, 7 insertions(+), 16 deletions(-) commit 67e1f675d72ef4719fc55557d271f1c7e426e2fe Author: Yoann Vandoorselaere Date: Thu Sep 18 10:46:26 2008 +0000 Fix INSTALLDIR definition on WIN32, this is necessary since libtool install generated DLL in bindir. git-svn-id: file:///home/yoann/SVN/libprelude/trunk@11006 09c5ec92-17d4-0310-903a-819935f44dba configure.in | 14 +++++++++++++- 1 files changed, 13 insertions(+), 1 deletions(-) commit 6f48651aaf2eec8f5cb432ce7106324840fb113d Author: Yoann Vandoorselaere Date: Thu Sep 18 10:46:23 2008 +0000 Error handling improvement. git-svn-id: file:///home/yoann/SVN/libprelude/trunk@11005 09c5ec92-17d4-0310-903a-819935f44dba src/daemonize.c | 10 ++++++++-- 1 files changed, 8 insertions(+), 2 deletions(-) commit a7aabe6a8adc77f7a7a13f8fd8d0d0ee3f8309b2 Author: Yoann Vandoorselaere Date: Tue Sep 16 14:38:58 2008 +0000 Remove superfluous close() statement. git-svn-id: file:///home/yoann/SVN/libprelude/trunk@11004 09c5ec92-17d4-0310-903a-819935f44dba src/daemonize.c | 4 +--- 1 files changed, 1 insertions(+), 3 deletions(-) commit e62a42598e3289bedafd3b5e549aac2e3f60b36e Author: Yoann Vandoorselaere Date: Tue Sep 16 14:38:21 2008 +0000 Add the dup2 module. git-svn-id: file:///home/yoann/SVN/libprelude/trunk@11003 09c5ec92-17d4-0310-903a-819935f44dba libmissing/Makefile.am | 11 +++++++- libmissing/dup2.c | 57 +++++++++++++++++++++++++++++++++++++++++ libmissing/m4/dup2.m4 | 15 +++++++++++ libmissing/m4/gnulib-cache.m4 | 3 +- libmissing/m4/gnulib-comp.m4 | 4 +++ 5 files changed, 88 insertions(+), 2 deletions(-) commit 37f28df55ea6c748bc746844110093c91068bb1f Author: Yoann Vandoorselaere Date: Tue Sep 16 14:14:12 2008 +0000 Bind stdin, stdout, and stderr to '/dev/null'. Correctly fixes #311. git-svn-id: file:///home/yoann/SVN/libprelude/trunk@11002 09c5ec92-17d4-0310-903a-819935f44dba src/daemonize.c | 24 +++++++++++------------- 1 files changed, 11 insertions(+), 13 deletions(-) commit f6e5df50f8bb6301dd2f603aa632fb3d6740650e Author: Yoann Vandoorselaere Date: Tue Sep 16 09:20:19 2008 +0000 Update GnuLib code. git-svn-id: file:///home/yoann/SVN/libprelude/trunk@11001 09c5ec92-17d4-0310-903a-819935f44dba libmissing/tests/test-memchr.c | 4 +++- libmissing/tests/test-poll.c | 12 ++++-------- 2 files changed, 7 insertions(+), 9 deletions(-) commit eefab48232f4f6e3ab1046920533b7f8ec4dde1e Author: Yoann Vandoorselaere Date: Tue Sep 16 09:17:33 2008 +0000 Remove old email addresses. git-svn-id: file:///home/yoann/SVN/libprelude/trunk@11000 09c5ec92-17d4-0310-903a-819935f44dba src/idmef-criteria-string.lex.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) commit 68533541b0963ecf16ac4a43a2eddb7f78637313 Author: Yoann Vandoorselaere Date: Mon Sep 15 12:56:54 2008 +0000 Only close stdin/stdout/stderr if they are connected to a terminal. This prevent closing invalid descriptor. (fix #311). git-svn-id: file:///home/yoann/SVN/libprelude/trunk@10998 09c5ec92-17d4-0310-903a-819935f44dba src/daemonize.c | 25 +++++++++++++------------ 1 files changed, 13 insertions(+), 12 deletions(-) commit 6e141f34898d09401a4c90733c78db43c837b081 Author: Yoann Vandoorselaere Date: Mon Sep 15 11:48:09 2008 +0000 Update GnuLib code. git-svn-id: file:///home/yoann/SVN/libprelude/trunk@10997 09c5ec92-17d4-0310-903a-819935f44dba libmissing/m4/errno_h.m4 | 26 +++++++++++++++++++++++++- 1 files changed, 25 insertions(+), 1 deletions(-) commit 248136c54e847681368770626b4c22f3159f92da Author: Yoann Vandoorselaere Date: Mon Sep 15 10:35:10 2008 +0000 Update GnuLib code. git-svn-id: file:///home/yoann/SVN/libprelude/trunk@10996 09c5ec92-17d4-0310-903a-819935f44dba libmissing/errno.in.h | 21 +++++++++++---------- libmissing/m4/errno_h.m4 | 4 ++-- 2 files changed, 13 insertions(+), 12 deletions(-) commit 059c77ef75b250e1ffbd9a9c84f4ae3b68852a36 Author: Yoann Vandoorselaere Date: Mon Sep 15 10:31:47 2008 +0000 Implement prelude_client_profile_get_default_config_dirname(), and prelude_client_profile_set_prefix(). Modify prelude-admin so that it always use prelude-client-profile function in order to retrieve libprelude specific path. Use the relocatable module from prelude-client-profile in order to relocate path when needed. This fix #255. git-svn-id: file:///home/yoann/SVN/libprelude/trunk@10995 09c5ec92-17d4-0310-903a-819935f44dba configure.in | 2 + prelude-admin/prelude-admin.c | 60 ++++++++--- src/include/prelude-client-profile.h | 8 +- src/prelude-client-profile.c | 190 +++++++++++++++++++++++++++++++--- 4 files changed, 227 insertions(+), 33 deletions(-) commit 7444aac598b4338a9cce3984a032954ff0ea3947 Author: Yoann Vandoorselaere Date: Mon Sep 15 09:24:30 2008 +0000 Add test target git-svn-id: file:///home/yoann/SVN/libprelude/trunk@10994 09c5ec92-17d4-0310-903a-819935f44dba libmissing/Makefile.am | 1 + 1 files changed, 1 insertions(+), 0 deletions(-) commit 8469e48e62b01ba45994b0d3cc9ab3e197be2a06 Author: Yoann Vandoorselaere Date: Mon Sep 15 09:21:25 2008 +0000 GnuLib update, fixes a number of Win32 compilation error, include the relocatable module. git-svn-id: file:///home/yoann/SVN/libprelude/trunk@10993 09c5ec92-17d4-0310-903a-819935f44dba libmissing/Makefile.am | 50 ++++- libmissing/errno.in.h | 150 +++++++++++ libmissing/glthread/cond.c | 21 ++ libmissing/glthread/cond.h | 7 +- libmissing/m4/eoverflow.m4 | 70 ------ libmissing/m4/errno_h.m4 | 89 +++++++ libmissing/m4/gnulib-cache.m4 | 3 +- libmissing/m4/gnulib-comp.m4 | 30 ++- libmissing/m4/relocatable-lib.m4 | 56 +++++ libmissing/m4/sockets.m4 | 35 +++ libmissing/m4/stdio_h.m4 | 96 ++++---- libmissing/poll.c | 6 + libmissing/relocatable.c | 493 +++++++++++++++++++++++++++++++++++++ libmissing/relocatable.h | 83 +++++++ libmissing/stdio.in.h | 16 ++ libmissing/sys_socket.in.h | 10 - libmissing/tests/Makefile.am | 47 +++-- libmissing/tests/dummy.c | 42 ---- libmissing/tests/sockets.c | 57 +++++ libmissing/tests/sockets.h | 32 +++ libmissing/tests/test-EOVERFLOW.c | 32 --- libmissing/tests/test-errno.c | 117 +++++++++ libmissing/tests/test-poll.c | 379 ++++++++++++++++++++++++++++ libmissing/tests/test-sockets.c | 44 ++++ libmissing/tests/test-tls.c | 126 +--------- 25 files changed, 1727 insertions(+), 364 deletions(-) commit f43b91f2ae441b2f915f261575edfc814d687c2c Author: Yoann Vandoorselaere Date: Mon Sep 15 09:21:20 2008 +0000 Move libgcrypt and gnutls initialization upon start. This is required since gcrypt is now used for operation outside authentication. Solve a WIN32 problem. git-svn-id: file:///home/yoann/SVN/libprelude/trunk@10992 09c5ec92-17d4-0310-903a-819935f44dba src/prelude.c | 56 +++++++++++++++++++++++++++++++++++- src/tls-auth.c | 86 ++------------------------------------------------------ 2 files changed, 58 insertions(+), 84 deletions(-) commit c62393c7394875cb6b7e117c44ac9cb9a38db758 Author: Yoann Vandoorselaere Date: Fri Sep 12 14:52:03 2008 +0000 Set CLOEXEC on opened fd. git-svn-id: file:///home/yoann/SVN/libprelude/trunk@10991 09c5ec92-17d4-0310-903a-819935f44dba src/prelude-failover.c | 12 ++++++++++++ 1 files changed, 12 insertions(+), 0 deletions(-) commit 8183e28ae6accac6fbf302d3e1a33427d815089d Author: Yoann Vandoorselaere Date: Fri Sep 12 14:52:00 2008 +0000 Fix win32 return value. git-svn-id: file:///home/yoann/SVN/libprelude/trunk@10990 09c5ec92-17d4-0310-903a-819935f44dba src/prelude-failover.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) commit 99fee34abcc26682cfa6480d5853046da5c93079 Author: Yoann Vandoorselaere Date: Fri Sep 12 14:51:57 2008 +0000 Increase FD_SETSIZE to a decent value on WIN32. We can easily go higher than the default size due to failover. git-svn-id: file:///home/yoann/SVN/libprelude/trunk@10989 09c5ec92-17d4-0310-903a-819935f44dba src/prelude-connection-pool.c | 5 +++++ 1 files changed, 5 insertions(+), 0 deletions(-) commit 1e0c85762d0b6c0b29b02295ff96e0b3f1fbdd34 Author: Yoann Vandoorselaere Date: Fri Sep 12 14:51:54 2008 +0000 Remove invalid mail address. git-svn-id: file:///home/yoann/SVN/libprelude/trunk@10988 09c5ec92-17d4-0310-903a-819935f44dba src/idmef-class.c | 2 +- src/idmef-criteria-string.lex.l | 4 ++-- src/idmef-path.c | 2 +- src/prelude-string.c | 3 +-- 4 files changed, 5 insertions(+), 6 deletions(-) commit 941358502dff744083527fdff6aa45e0771bf67f Author: Yoann Vandoorselaere Date: Fri Sep 12 14:51:51 2008 +0000 Win32 compatibility fixes. git-svn-id: file:///home/yoann/SVN/libprelude/trunk@10987 09c5ec92-17d4-0310-903a-819935f44dba src/prelude-connection.c | 5 +---- 1 files changed, 1 insertions(+), 4 deletions(-) commit fc223900dcacb06c4ef5583ce7744b646f80bea3 Author: Yoann Vandoorselaere Date: Fri Sep 12 14:51:47 2008 +0000 Remove obsolete. git-svn-id: file:///home/yoann/SVN/libprelude/trunk@10986 09c5ec92-17d4-0310-903a-819935f44dba src/idmef-message-write.c | 6 ------ .../GenerateIDMEFMessageWriteC.pm | 6 ------ 2 files changed, 0 insertions(+), 12 deletions(-) commit c77210e1facc6df8a80fa5cfdf8044dd4158136a Author: Yoann Vandoorselaere Date: Wed Sep 10 14:28:08 2008 +0000 Win32 compatibility fixes. git-svn-id: file:///home/yoann/SVN/libprelude/trunk@10978 09c5ec92-17d4-0310-903a-819935f44dba src/prelude-failover.c | 10 +++++----- 1 files changed, 5 insertions(+), 5 deletions(-) commit 6c6c1b00e2ba8c036af17c6139acd9a47fdfb839 Author: Yoann Vandoorselaere Date: Wed Sep 10 14:27:07 2008 +0000 Win32 compatibility fixes. git-svn-id: file:///home/yoann/SVN/libprelude/trunk@10977 09c5ec92-17d4-0310-903a-819935f44dba src/prelude-log.c | 6 ++++++ 1 files changed, 6 insertions(+), 0 deletions(-) commit 171abd3035594b13c919f3643233c82035ed45bc Author: Yoann Vandoorselaere Date: Wed Sep 10 14:20:58 2008 +0000 Win32 compatibility. git-svn-id: file:///home/yoann/SVN/libprelude/trunk@10976 09c5ec92-17d4-0310-903a-819935f44dba prelude-admin/prelude-admin.c | 9 ++++++--- 1 files changed, 6 insertions(+), 3 deletions(-) commit e4f51e5f7d23b7b808ea06df56ffa16ea70c1c4f Author: Yoann Vandoorselaere Date: Wed Sep 10 14:18:32 2008 +0000 Add inet_pton module. git-svn-id: file:///home/yoann/SVN/libprelude/trunk@10975 09c5ec92-17d4-0310-903a-819935f44dba libmissing/Makefile.am | 17 ++- libmissing/c-ctype.c | 396 ++++++++++++++++++++++++++++++++++++++ libmissing/c-ctype.h | 280 +++++++++++++++++++++++++++ libmissing/inet_pton.c | 257 +++++++++++++++++++++++++ libmissing/m4/gnulib-cache.m4 | 3 +- libmissing/m4/gnulib-comp.m4 | 7 + libmissing/m4/inet_pton.m4 | 27 +++ libmissing/tests/Makefile.am | 9 + libmissing/tests/test-c-ctype.c | 398 +++++++++++++++++++++++++++++++++++++++ 9 files changed, 1392 insertions(+), 2 deletions(-) commit 8a7c1cd64336d0f740e66ef27e3781f417c2c345 Author: Yoann Vandoorselaere Date: Wed Sep 10 14:15:51 2008 +0000 Add sys_stat module. git-svn-id: file:///home/yoann/SVN/libprelude/trunk@10974 09c5ec92-17d4-0310-903a-819935f44dba libmissing/Makefile.am | 27 ++++- libmissing/m4/gnulib-cache.m4 | 3 +- libmissing/m4/gnulib-comp.m4 | 5 + libmissing/m4/include_next.m4 | 6 +- libmissing/m4/sys_stat_h.m4 | 55 +++++++ libmissing/sys_stat.in.h | 293 ++++++++++++++++++++++++++++++++++++++ libmissing/tests/Makefile.am | 9 ++ libmissing/tests/test-sys_stat.c | 263 ++++++++++++++++++++++++++++++++++ 8 files changed, 658 insertions(+), 3 deletions(-) commit 19bdeb82eca51f33060799996eb3606ebb45448d Author: Yoann Vandoorselaere Date: Wed Sep 10 14:15:24 2008 +0000 Fix possible configure warning. git-svn-id: file:///home/yoann/SVN/libprelude/trunk@10973 09c5ec92-17d4-0310-903a-819935f44dba m4/libprelude.m4 | 20 +++++++++++--------- 1 files changed, 11 insertions(+), 9 deletions(-) commit c43b0fa95532bfd4b74ffe19637e51c5114fdae2 Author: Yoann Vandoorselaere Date: Tue Sep 9 08:54:01 2008 +0000 Update NEWS, bump version number. git-svn-id: file:///home/yoann/SVN/libprelude/trunk@10963 09c5ec92-17d4-0310-903a-819935f44dba NEWS | 8 ++++++++ configure.in | 4 ++-- 2 files changed, 10 insertions(+), 2 deletions(-) commit 38632b3f4910bd4a0b7b93c416706a72c14b9260 Author: Yoann Vandoorselaere Date: Tue Sep 9 08:52:42 2008 +0000 Make sure thread storage is initialized before any call to prelude_error (fix #312). git-svn-id: file:///home/yoann/SVN/libprelude/trunk@10962 09c5ec92-17d4-0310-903a-819935f44dba src/prelude-thread.c | 21 ++++++++++++++++++++- 1 files changed, 20 insertions(+), 1 deletions(-) commit c2b110c92be68e151acd41b0f8a81335b0f05f15 Author: Yoann Vandoorselaere Date: Sat Sep 6 17:15:21 2008 +0000 Fix invalid read. git-svn-id: file:///home/yoann/SVN/libprelude/trunk@10961 09c5ec92-17d4-0310-903a-819935f44dba src/idmef-class.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) commit 3919095103619ada26c5edf9b903c9c526f5ddd3 Author: Yoann Vandoorselaere Date: Fri Sep 5 16:20:16 2008 +0000 Update NEWS, bump version. git-svn-id: file:///home/yoann/SVN/libprelude/trunk@10959 09c5ec92-17d4-0310-903a-819935f44dba NEWS | 8 ++++++++ configure.in | 4 ++-- 2 files changed, 10 insertions(+), 2 deletions(-) commit 9abf180927264c22f5e718dd14a5b75e96f7c5a0 Author: Yoann Vandoorselaere Date: Fri Sep 5 16:20:13 2008 +0000 Correct libtool usage. Unit-test improvement. git-svn-id: file:///home/yoann/SVN/libprelude/trunk@10958 09c5ec92-17d4-0310-903a-819935f44dba tests/Makefile.am | 2 +- tests/async-timer.c | 6 +++++- 2 files changed, 6 insertions(+), 2 deletions(-) commit ca4328044a0ed7bcdffe1c299407d3e8c662aec5 Author: Yoann Vandoorselaere Date: Fri Sep 5 16:20:09 2008 +0000 Add asynchronous stack unit-tests. git-svn-id: file:///home/yoann/SVN/libprelude/trunk@10957 09c5ec92-17d4-0310-903a-819935f44dba tests/Makefile.am | 5 ++- tests/async-timer.c | 64 +++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 67 insertions(+), 2 deletions(-) commit 31e6ba96f1271110ef24f107fade7a57aaf5b989 Author: Yoann Vandoorselaere Date: Fri Sep 5 10:50:05 2008 +0000 Fix for wrong gl_cond_timedwait() usage. git-svn-id: file:///home/yoann/SVN/libprelude/trunk@10956 09c5ec92-17d4-0310-903a-819935f44dba src/prelude-async.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) commit b5f9d35597012f7bc5bbae951e976779a9ad2713 Author: Yoann Vandoorselaere Date: Fri Sep 5 10:50:01 2008 +0000 Warning fixes. git-svn-id: file:///home/yoann/SVN/libprelude/trunk@10955 09c5ec92-17d4-0310-903a-819935f44dba bindings/c++/idmef-path.cxx | 2 ++ bindings/c++/idmef-value.cxx | 11 ++--------- bindings/c++/prelude-client.cxx | 3 +++ bindings/c++/prelude-connection-pool.cxx | 2 -- 4 files changed, 7 insertions(+), 11 deletions(-) commit a300f45d31d0b91049ea6e0f525ebd114ca70fdf Author: Yoann Vandoorselaere Date: Wed Sep 3 15:07:41 2008 +0000 Update NEWS, bump version. git-svn-id: file:///home/yoann/SVN/libprelude/trunk@10953 09c5ec92-17d4-0310-903a-819935f44dba NEWS | 29 +++++++++++++++++++++++++++++ configure.in | 8 ++++---- libmissing/Makefile.am | 1 + 3 files changed, 34 insertions(+), 4 deletions(-) commit c61c21a2d21926013369eadcbaae4ee49b80b9a8 Author: Yoann Vandoorselaere Date: Wed Sep 3 15:07:38 2008 +0000 Automatic node name/address detection. git-svn-id: file:///home/yoann/SVN/libprelude/trunk@10952 09c5ec92-17d4-0310-903a-819935f44dba src/prelude-client.c | 111 ++++++++++++++++++++++++++++++++++++++++++++++++++ 1 files changed, 111 insertions(+), 0 deletions(-) commit a5bf69e427ee106a4baabc92fcdd2f9bfe63a357 Author: Yoann Vandoorselaere Date: Wed Sep 3 14:22:20 2008 +0000 Update GnuLib code. git-svn-id: file:///home/yoann/SVN/libprelude/trunk@10951 09c5ec92-17d4-0310-903a-819935f44dba libmissing/Makefile.am | 49 ++++-- libmissing/arpa_inet.in.h | 2 + libmissing/float.in.h | 4 +- libmissing/getdelim.c | 15 +- libmissing/m4/getdelim.m4 | 1 + libmissing/m4/include_next.m4 | 28 +++- libmissing/m4/lib-link.m4 | 27 +++- libmissing/m4/lib-prefix.m4 | 88 +++++++--- libmissing/netinet_in.in.h | 4 +- libmissing/poll.c | 390 +++++------------------------------------ libmissing/signal.in.h | 2 + libmissing/stdint.in.h | 3 +- libmissing/stdio.in.h | 2 + libmissing/stdlib.in.h | 2 + libmissing/string.in.h | 2 + libmissing/strings.in.h | 4 +- libmissing/sys_select.in.h | 4 +- libmissing/sys_socket.in.h | 2 + libmissing/sys_time.in.h | 4 +- libmissing/time.in.h | 4 +- libmissing/unistd.in.h | 2 + libmissing/vasnprintf.c | 2 +- libmissing/wchar.in.h | 2 + libmissing/wctype.in.h | 2 + 24 files changed, 226 insertions(+), 419 deletions(-) commit 1f3909a5c65f900c9bc7b9a7273476830ab2ab03 Author: Yoann Vandoorselaere Date: Wed Sep 3 14:22:12 2008 +0000 Consistency fixes: return the old value instead of creating a new one, this is the same as with raw IDMEF object. git-svn-id: file:///home/yoann/SVN/libprelude/trunk@10950 09c5ec92-17d4-0310-903a-819935f44dba src/idmef-tree-wrap.c | 836 ++++++++++------------ src/idmef-wrappers-gen/GenerateIDMEFTreeWrapC.pm | 26 +- 2 files changed, 385 insertions(+), 477 deletions(-) commit a2ebb274434423411fd40f7c77fca72d93e4deb1 Author: Yoann Vandoorselaere Date: Tue Sep 2 10:02:39 2008 +0000 Use SendIDMEF() method. git-svn-id: file:///home/yoann/SVN/libprelude/trunk@10949 09c5ec92-17d4-0310-903a-819935f44dba bindings/tests/test.pl | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) commit c32e14a702629ae5380ece48f97888ee498db1ba Author: Yoann Vandoorselaere Date: Tue Sep 2 09:04:11 2008 +0000 Update documentation. git-svn-id: file:///home/yoann/SVN/libprelude/trunk@10948 09c5ec92-17d4-0310-903a-819935f44dba docs/api/libprelude-decl.txt | 98 +++------------- docs/api/libprelude-sections.txt | 55 ++++++--- docs/api/tmpl/idmef-criteria.sgml | 9 ++ docs/api/tmpl/idmef-tree-wrap.sgml | 90 ++++++++++++++ docs/api/tmpl/idmef-value.sgml | 174 ++++++++++++++++++++++++++++ docs/api/tmpl/prelude-client.sgml | 22 ++++ docs/api/tmpl/prelude-connection-pool.sgml | 10 ++ docs/api/tmpl/prelude-connection.sgml | 19 +++ docs/api/tmpl/prelude-msg.sgml | 9 ++ docs/api/tmpl/prelude.sgml | 23 ++++- 10 files changed, 409 insertions(+), 100 deletions(-) commit 97f8effcba893b02c39e5c41c12f6da99c4eb303 Author: Yoann Vandoorselaere Date: Tue Sep 2 09:04:06 2008 +0000 Only call valgrind target if HAVE_VALGRIND is defined. git-svn-id: file:///home/yoann/SVN/libprelude/trunk@10947 09c5ec92-17d4-0310-903a-819935f44dba tests/Makefile.am | 5 ++--- 1 files changed, 2 insertions(+), 3 deletions(-) commit 15e359eeb8ade7fb71c82ab711f75a329343f532 Author: Yoann Vandoorselaere Date: Tue Sep 2 09:04:03 2008 +0000 Fix API doc generation. git-svn-id: file:///home/yoann/SVN/libprelude/trunk@10946 09c5ec92-17d4-0310-903a-819935f44dba src/idmef-message-helpers.c | 4 ++-- src/include/idmef-message-helpers.h | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) commit dbb87342306d438d7f3f634e6f2d294c4d813c8b Author: Yoann Vandoorselaere Date: Tue Sep 2 09:04:00 2008 +0000 Fix Perl PreludeEasy bindings IDMEF->Read(). git-svn-id: file:///home/yoann/SVN/libprelude/trunk@10945 09c5ec92-17d4-0310-903a-819935f44dba bindings/libpreludecpp-perl.i | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) commit 0fef7eb7e45e6903bc30257b4c050f964a11f19b Author: Yoann Vandoorselaere Date: Thu Aug 28 10:30:04 2008 +0000 Call glthread_atfork() from a single place in prelude.c, introduce prelude_fork_prepare(), prelude_fork_parent() and prelude_fork_child() for system that doesn't have an 'atfork' function. git-svn-id: file:///home/yoann/SVN/libprelude/trunk@10942 09c5ec92-17d4-0310-903a-819935f44dba src/include/prelude-async.h | 12 +++++-- src/include/prelude-timer.h | 15 ++++++--- src/include/prelude.h.in | 7 ++++ src/prelude-async.c | 56 ++++++++++++++-------------------- src/prelude-timer.c | 32 ++++++++++---------- src/prelude.c | 69 +++++++++++++++++++++++++++--------------- 6 files changed, 109 insertions(+), 82 deletions(-) commit 5a81af325f07615332baca927c783e9fc0103a4a Author: Yoann Vandoorselaere Date: Wed Aug 27 12:43:05 2008 +0000 Update GnuLib code. git-svn-id: file:///home/yoann/SVN/libprelude/trunk@10932 09c5ec92-17d4-0310-903a-819935f44dba libmissing/Makefile.am | 3 + libmissing/m4/string_h.m4 | 4 +- libmissing/poll.c | 390 +++++++++++++++++++++++++++++++++---- libmissing/string.in.h | 12 ++ libmissing/tests/glthread/yield.h | 121 ++++++++++++ libmissing/tests/test-lock.c | 3 + libmissing/tests/test-tls.c | 3 + 7 files changed, 495 insertions(+), 41 deletions(-) commit 8c3cce2c1536f6f9d1cba31fd3ec6c3c4085a5fe Author: Yoann Vandoorselaere Date: Wed Aug 27 12:15:01 2008 +0000 Update. git-svn-id: file:///home/yoann/SVN/libprelude/trunk@10931 09c5ec92-17d4-0310-903a-819935f44dba libmissing/m4/thread.m4 | 3 +++ 1 files changed, 3 insertions(+), 0 deletions(-) commit 0fb62507f5b6be84fd49fb69283095679329755d Author: Yoann Vandoorselaere Date: Wed Aug 27 12:14:59 2008 +0000 Add new --thread and --no-thread option to libprelude-config. Update m4/libprelude.m4 to use them. git-svn-id: file:///home/yoann/SVN/libprelude/trunk@10930 09c5ec92-17d4-0310-903a-819935f44dba libprelude-config.in | 61 ++++++++++++++++++++++++++++++++++++------------- m4/libprelude.m4 | 42 +++++++++++++++++++-------------- 2 files changed, 69 insertions(+), 34 deletions(-) commit 74552caa16f5a9845d8d5b55c5539a63332273fc Author: Yoann Vandoorselaere Date: Wed Aug 27 12:14:56 2008 +0000 Use glthread. git-svn-id: file:///home/yoann/SVN/libprelude/trunk@10929 09c5ec92-17d4-0310-903a-819935f44dba src/Makefile.am | 6 +++--- src/libprelude-error/Makefile.am | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) commit 6618b7e32152fe2f66eb3f6c040953caceb60ad3 Author: Yoann Vandoorselaere Date: Wed Aug 27 12:14:53 2008 +0000 Only rely on glthread API. git-svn-id: file:///home/yoann/SVN/libprelude/trunk@10928 09c5ec92-17d4-0310-903a-819935f44dba src/prelude-async.c | 36 +++--------------------------------- 1 files changed, 3 insertions(+), 33 deletions(-) commit 838cd970111a1689f43887e8fa6d7f8e46e3017e Author: Yoann Vandoorselaere Date: Wed Aug 27 12:14:49 2008 +0000 Remove any direct pthread dependencies. git-svn-id: file:///home/yoann/SVN/libprelude/trunk@10927 09c5ec92-17d4-0310-903a-819935f44dba configure.in | 21 --------------------- 1 files changed, 0 insertions(+), 21 deletions(-) commit 57378c98bc0916474ef5a017941fd96c308adae2 Author: Yoann Vandoorselaere Date: Wed Aug 27 12:14:40 2008 +0000 Use glthead. git-svn-id: file:///home/yoann/SVN/libprelude/trunk@10926 09c5ec92-17d4-0310-903a-819935f44dba src/idmef-criteria-string.yac.c | 2 +- src/idmef-criteria-string.yac.y | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit e481ec6328c5dcbdca3a7cfc04ff9ff8724778b9 Author: Yoann Vandoorselaere Date: Wed Aug 27 12:14:37 2008 +0000 Add necessary thread dependency. git-svn-id: file:///home/yoann/SVN/libprelude/trunk@10925 09c5ec92-17d4-0310-903a-819935f44dba bindings/low-level/perl/Makefile.PL.in | 6 +++--- bindings/low-level/python/setup.py.in | 4 ++-- bindings/perl/Makefile.PL.in | 6 +++--- bindings/python/setup.py.in | 4 ++-- 4 files changed, 10 insertions(+), 10 deletions(-) commit 725e1534287bdb788c1f3d4df4d8b95e6aefdc8c Author: Yoann Vandoorselaere Date: Wed Aug 27 12:14:34 2008 +0000 Update to glthread git-svn-id: file:///home/yoann/SVN/libprelude/trunk@10924 09c5ec92-17d4-0310-903a-819935f44dba configure.in | 45 ++------- m4/acx_pthread.m4 | 280 ----------------------------------------------------- 2 files changed, 8 insertions(+), 317 deletions(-) commit 23410ebc199b5ae75ccbc89dfd874ef859f6d6f3 Author: Yoann Vandoorselaere Date: Wed Aug 27 12:14:31 2008 +0000 Cleanup. git-svn-id: file:///home/yoann/SVN/libprelude/trunk@10923 09c5ec92-17d4-0310-903a-819935f44dba src/prelude-thread.c | 2 -- 1 files changed, 0 insertions(+), 2 deletions(-) commit 5493d81311f2a7f91ec4383a31bd1e5602e772ad Author: Yoann Vandoorselaere Date: Wed Aug 27 12:14:28 2008 +0000 Add sigprocmask module. git-svn-id: file:///home/yoann/SVN/libprelude/trunk@10922 09c5ec92-17d4-0310-903a-819935f44dba libmissing/Makefile.am | 48 ++++++++- libmissing/m4/gnulib-cache.m4 | 3 +- libmissing/m4/gnulib-comp.m4 | 9 ++ libmissing/m4/signal_h.m4 | 31 +++++ libmissing/m4/signalblocking.m4 | 42 +++++++ libmissing/raise.c | 30 +++++ libmissing/signal.in.h | 162 ++++++++++++++++++++++++++ libmissing/sigprocmask.c | 242 +++++++++++++++++++++++++++++++++++++++ 8 files changed, 565 insertions(+), 2 deletions(-) commit f67468df8b5e512b2123cbf301725683ddfe0999 Author: Yoann Vandoorselaere Date: Wed Aug 27 12:14:25 2008 +0000 Remove deprecated. git-svn-id: file:///home/yoann/SVN/libprelude/trunk@10921 09c5ec92-17d4-0310-903a-819935f44dba src/include/prelude-thread.h | 55 +-------- src/prelude-thread.c | 304 ++---------------------------------------- 2 files changed, 15 insertions(+), 344 deletions(-) commit e621a51379c2d8f3bce4d45f2ce8217e02ff0c46 Author: Yoann Vandoorselaere Date: Wed Aug 27 12:14:23 2008 +0000 Update to glthread API, use sigprocmask GnuLib module. git-svn-id: file:///home/yoann/SVN/libprelude/trunk@10920 09c5ec92-17d4-0310-903a-819935f44dba src/prelude-async.c | 145 ++++++++++++++------------------------------------ 1 files changed, 41 insertions(+), 104 deletions(-) commit 650f466b3633d11cdeac025302519b5bc7bb745c Author: Yoann Vandoorselaere Date: Wed Aug 27 12:14:20 2008 +0000 Update to glthread API. git-svn-id: file:///home/yoann/SVN/libprelude/trunk@10919 09c5ec92-17d4-0310-903a-819935f44dba src/idmef-criteria-string.yac.c | 107 ++++++++++++++++++++------------------- src/idmef-criteria-string.yac.h | 2 +- 2 files changed, 55 insertions(+), 54 deletions(-) commit 83804bf0d0c6de48d0aed946a0e1494ab5ff57e0 Author: Yoann Vandoorselaere Date: Wed Aug 27 12:14:17 2008 +0000 Update to glthread API. git-svn-id: file:///home/yoann/SVN/libprelude/trunk@10918 09c5ec92-17d4-0310-903a-819935f44dba src/prelude-client.c | 14 +++++++------- 1 files changed, 7 insertions(+), 7 deletions(-) commit 90443918685b4bb70c2864a660fd281bc6f6bd70 Author: Yoann Vandoorselaere Date: Wed Aug 27 12:14:14 2008 +0000 Update to glthread API. git-svn-id: file:///home/yoann/SVN/libprelude/trunk@10917 09c5ec92-17d4-0310-903a-819935f44dba src/prelude.c | 16 +++++++++------- 1 files changed, 9 insertions(+), 7 deletions(-) commit 05f449d09bf9ea1ed4e76d0b1008d5aa63fe6c2d Author: Yoann Vandoorselaere Date: Wed Aug 27 12:14:11 2008 +0000 Add missing signal.h git-svn-id: file:///home/yoann/SVN/libprelude/trunk@10916 09c5ec92-17d4-0310-903a-819935f44dba prelude-admin/prelude-admin.c | 1 + 1 files changed, 1 insertions(+), 0 deletions(-) commit 6bdc4a392e15e019866b259b0ba3bf373e3d3d96 Author: Yoann Vandoorselaere Date: Wed Aug 27 12:14:08 2008 +0000 Add missing signal.h git-svn-id: file:///home/yoann/SVN/libprelude/trunk@10915 09c5ec92-17d4-0310-903a-819935f44dba src/prelude-failover.c | 1 + 1 files changed, 1 insertions(+), 0 deletions(-) commit 54eeeab0d61cb729f81945aeae11ce82ba8b4ccd Author: Yoann Vandoorselaere Date: Wed Aug 27 12:14:05 2008 +0000 Include missing glthread code. git-svn-id: file:///home/yoann/SVN/libprelude/trunk@10914 09c5ec92-17d4-0310-903a-819935f44dba libmissing/m4/cond.m4 | 11 + libmissing/m4/lib-ld.m4 | 110 +++++++ libmissing/m4/lib-link.m4 | 739 ++++++++++++++++++++++++++++++++++++++++++ libmissing/m4/lib-prefix.m4 | 185 +++++++++++ libmissing/m4/lock.m4 | 37 +++ libmissing/tests/test-cond.c | 211 ++++++++++++ libmissing/tests/test-lock.c | 554 +++++++++++++++++++++++++++++++ libmissing/tests/test-tls.c | 323 ++++++++++++++++++ 8 files changed, 2170 insertions(+), 0 deletions(-) commit e9044df67983f5476ea8dd6e25788121f08ac3c7 Author: Yoann Vandoorselaere Date: Wed Aug 27 12:14:02 2008 +0000 Include glthread modules. git-svn-id: file:///home/yoann/SVN/libprelude/trunk@10913 09c5ec92-17d4-0310-903a-819935f44dba libmissing/Makefile.am | 43 ++- libmissing/glthread/cond.c | 52 ++ libmissing/glthread/cond.h | 348 +++++++++++++ libmissing/glthread/lock.c | 1053 +++++++++++++++++++++++++++++++++++++++ libmissing/glthread/lock.h | 927 ++++++++++++++++++++++++++++++++++ libmissing/glthread/thread.c | 206 ++++++++ libmissing/glthread/thread.h | 369 ++++++++++++++ libmissing/glthread/threadlib.c | 69 +++ libmissing/glthread/tls.c | 61 +++ libmissing/glthread/tls.h | 298 +++++++++++ libmissing/m4/gnulib-cache.m4 | 6 +- libmissing/m4/gnulib-comp.m4 | 42 ++ libmissing/m4/thread.m4 | 15 + libmissing/m4/threadlib.m4 | 314 ++++++++++++ libmissing/m4/tls.m4 | 12 + libmissing/m4/yield.m4 | 19 + libmissing/tests/Makefile.am | 34 ++ 17 files changed, 3865 insertions(+), 3 deletions(-) commit ef19560d66eb8f057fc932bf61ec9f9c24e91233 Author: Yoann Vandoorselaere Date: Wed Aug 27 12:13:58 2008 +0000 Update to glthread API. git-svn-id: file:///home/yoann/SVN/libprelude/trunk@10912 09c5ec92-17d4-0310-903a-819935f44dba src/tls-auth.c | 57 +++++++++++++++++++++++++++++++++++++++++++++++++------ 1 files changed, 50 insertions(+), 7 deletions(-) commit 2b81008c6142a2c730fd2fdbfec41f01a315cf28 Author: Yoann Vandoorselaere Date: Wed Aug 27 12:13:56 2008 +0000 Update to glthread API. git-svn-id: file:///home/yoann/SVN/libprelude/trunk@10911 09c5ec92-17d4-0310-903a-819935f44dba src/prelude-timer.c | 23 +++++++++++++---------- 1 files changed, 13 insertions(+), 10 deletions(-) commit f9db56de35dc6205dc3840139833905626874222 Author: Yoann Vandoorselaere Date: Wed Aug 27 12:13:52 2008 +0000 Update to glthread API. git-svn-id: file:///home/yoann/SVN/libprelude/trunk@10910 09c5ec92-17d4-0310-903a-819935f44dba src/idmef-criteria-string.yac.y | 7 ++++--- 1 files changed, 4 insertions(+), 3 deletions(-) commit e60f8c2a8a03258d22031dbc8625bddce66dddcc Author: Yoann Vandoorselaere Date: Wed Aug 27 12:13:49 2008 +0000 Update to glthread API. git-svn-id: file:///home/yoann/SVN/libprelude/trunk@10909 09c5ec92-17d4-0310-903a-819935f44dba src/idmef-path.c | 67 +++++++++++++++++++++++++++-------------------------- 1 files changed, 34 insertions(+), 33 deletions(-) commit f90689683ae96879058e5cb7788af20ccf159537 Author: Yoann Vandoorselaere Date: Wed Aug 27 12:13:46 2008 +0000 Update to glthread API. git-svn-id: file:///home/yoann/SVN/libprelude/trunk@10908 09c5ec92-17d4-0310-903a-819935f44dba src/prelude-failover.c | 7 ++++--- 1 files changed, 4 insertions(+), 3 deletions(-) commit 6f8f417cc96b27710b1a60fbd762b25a3e5f7ef3 Author: Yoann Vandoorselaere Date: Wed Aug 27 12:13:39 2008 +0000 Update to glthread API. git-svn-id: file:///home/yoann/SVN/libprelude/trunk@10907 09c5ec92-17d4-0310-903a-819935f44dba src/prelude-connection-pool.c | 58 +++++++++++++++++++++------------------- 1 files changed, 30 insertions(+), 28 deletions(-) commit 390a6c6741f9bec50e566f43c3d162215d5f5ac1 Author: Yoann Vandoorselaere Date: Mon Aug 18 15:31:23 2008 +0000 Support for valgrind when running unit-test. The code was adapted from gstreamer Makefile. git-svn-id: file:///home/yoann/SVN/libprelude/trunk@10874 09c5ec92-17d4-0310-903a-819935f44dba configure.in | 26 ++++++++++++++++++++++++++ tests/Makefile.am | 36 ++++++++++++++++++++++++++++++++++++ 2 files changed, 62 insertions(+), 0 deletions(-) commit 20499172fbbda63513d0b4b528864ba66e945c53 Author: Yoann Vandoorselaere Date: Mon Aug 18 12:34:48 2008 +0000 Prevent memory leak. git-svn-id: file:///home/yoann/SVN/libprelude/trunk@10873 09c5ec92-17d4-0310-903a-819935f44dba tests/prelude-client.c | 3 +++ 1 files changed, 3 insertions(+), 0 deletions(-) commit 0b741d648e0ade91d53651f53c66abaed1876959 Author: Yoann Vandoorselaere Date: Mon Aug 18 12:34:46 2008 +0000 Handle potential lags between command (prevent failure when running under valgrind). git-svn-id: file:///home/yoann/SVN/libprelude/trunk@10872 09c5ec92-17d4-0310-903a-819935f44dba tests/idmef.c | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) commit ceda121ae6e70e98ccfa4de281dcd3a857645e76 Author: Yoann Vandoorselaere Date: Mon Aug 18 12:34:42 2008 +0000 Update Yacc generated code. git-svn-id: file:///home/yoann/SVN/libprelude/trunk@10871 09c5ec92-17d4-0310-903a-819935f44dba src/idmef-criteria-string.yac.c | 84 +++++++++++++++++++------------------- 1 files changed, 42 insertions(+), 42 deletions(-) commit 50f015926aa8bf3b78bafcc387caf4702c579c64 Author: Yoann Vandoorselaere Date: Mon Aug 18 12:34:37 2008 +0000 Revert [10864]. git-svn-id: file:///home/yoann/SVN/libprelude/trunk@10870 09c5ec92-17d4-0310-903a-819935f44dba src/idmef-criteria-string.yac.y | 3 +-- 1 files changed, 1 insertions(+), 2 deletions(-) commit 492f5b26412af70d6bc73d41dbbc446ed1adf90e Author: Yoann Vandoorselaere Date: Mon Aug 18 09:23:31 2008 +0000 Add missing. git-svn-id: file:///home/yoann/SVN/libprelude/trunk@10866 09c5ec92-17d4-0310-903a-819935f44dba src/idmef-criteria-string.yac.h | 112 +++++++++++++++++++++++++++++++++++++++ 1 files changed, 112 insertions(+), 0 deletions(-) commit 1117206cb7cb73ac5da45220a04febf3323f8e85 Author: Yoann Vandoorselaere Date: Mon Aug 18 09:14:47 2008 +0000 Add flex/yacc generated file, help build bots. git-svn-id: file:///home/yoann/SVN/libprelude/trunk@10865 09c5ec92-17d4-0310-903a-819935f44dba src/idmef-criteria-string.lex.c | 2182 +++++++++++++++++++++++++++++++++++++++ src/idmef-criteria-string.yac.c | 1990 +++++++++++++++++++++++++++++++++++ 2 files changed, 4172 insertions(+), 0 deletions(-) commit 2ab95682174866a668e611971624eb319da9a643 Author: Yoann Vandoorselaere Date: Mon Aug 18 09:01:27 2008 +0000 Should fix an OpenBSD yacc generation problem. git-svn-id: file:///home/yoann/SVN/libprelude/trunk@10864 09c5ec92-17d4-0310-903a-819935f44dba src/idmef-criteria-string.yac.y | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) commit 385cf8742c859c8aedf744bd954d940c6a9ec619 Author: Yoann Vandoorselaere Date: Thu Aug 14 14:01:40 2008 +0000 When copying the value prior doing the cast, set the copy to not own the value data. git-svn-id: file:///home/yoann/SVN/libprelude/trunk@10846 09c5ec92-17d4-0310-903a-819935f44dba src/idmef-value.c | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) commit f9fe9918ab705035d87fe58bb5422dd986e5e4ef Author: Yoann Vandoorselaere Date: Thu Aug 14 14:01:38 2008 +0000 New idmef-message-helper unit-test git-svn-id: file:///home/yoann/SVN/libprelude/trunk@10845 09c5ec92-17d4-0310-903a-819935f44dba tests/Makefile.am | 2 +- tests/idmef-message-helper.c | 53 ++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 54 insertions(+), 1 deletions(-) commit 9829d690ef860172cd9018ad6a989d4463e0f4c6 Author: Yoann Vandoorselaere Date: Thu Aug 14 14:01:35 2008 +0000 Fix idmef-path unit-test. git-svn-id: file:///home/yoann/SVN/libprelude/trunk@10844 09c5ec92-17d4-0310-903a-819935f44dba tests/idmef-path.c | 11 ++++++----- 1 files changed, 6 insertions(+), 5 deletions(-) commit d8529f66e1ef6ccb60c85bdd70ec211e29d900dc Author: Yoann Vandoorselaere Date: Thu Aug 14 08:35:41 2008 +0000 Include GnuLib tests directory. git-svn-id: file:///home/yoann/SVN/libprelude/trunk@10841 09c5ec92-17d4-0310-903a-819935f44dba libmissing/tests/Makefile.am | 342 ++++++++++++++++++++++++++++++++ libmissing/tests/dummy.c | 42 ++++ libmissing/tests/intprops.h | 77 +++++++ libmissing/tests/test-EOVERFLOW.c | 32 +++ libmissing/tests/test-alloca-opt.c | 62 ++++++ libmissing/tests/test-arpa_inet.c | 27 +++ libmissing/tests/test-fseeko.c | 65 ++++++ libmissing/tests/test-fseeko.sh | 5 + libmissing/tests/test-getaddrinfo.c | 155 +++++++++++++++ libmissing/tests/test-getdelim.c | 90 +++++++++ libmissing/tests/test-getline.c | 90 +++++++++ libmissing/tests/test-gettimeofday.c | 45 +++++ libmissing/tests/test-lseek.c | 103 ++++++++++ libmissing/tests/test-lseek.sh | 17 ++ libmissing/tests/test-memchr.c | 98 +++++++++ libmissing/tests/test-memcmp.c | 82 ++++++++ libmissing/tests/test-memmem.c | 188 ++++++++++++++++++ libmissing/tests/test-netinet_in.c | 27 +++ libmissing/tests/test-snprintf.c | 72 +++++++ libmissing/tests/test-stdbool.c | 95 +++++++++ libmissing/tests/test-stdint.c | 360 ++++++++++++++++++++++++++++++++++ libmissing/tests/test-stdio.c | 30 +++ libmissing/tests/test-stdlib.c | 37 ++++ libmissing/tests/test-strcasestr.c | 155 +++++++++++++++ libmissing/tests/test-string.c | 27 +++ libmissing/tests/test-strings.c | 27 +++ libmissing/tests/test-sys_select.c | 27 +++ libmissing/tests/test-sys_socket.c | 47 +++++ libmissing/tests/test-sys_time.c | 29 +++ libmissing/tests/test-time.c | 29 +++ libmissing/tests/test-unistd.c | 44 ++++ libmissing/tests/test-vasnprintf.c | 128 ++++++++++++ libmissing/tests/test-vsnprintf.c | 85 ++++++++ libmissing/tests/test-wchar.c | 27 +++ libmissing/tests/test-wctype.c | 43 ++++ libmissing/tests/verify.h | 140 +++++++++++++ 36 files changed, 2949 insertions(+), 0 deletions(-) commit f0fa1e5206e9c907f0b8b4e3144f49d770925c05 Author: Yoann Vandoorselaere Date: Thu Aug 14 08:30:01 2008 +0000 On profile error, make sure the code is always PRELUDE_ERROR_PROFILE. More error checking. git-svn-id: file:///home/yoann/SVN/libprelude/trunk@10840 09c5ec92-17d4-0310-903a-819935f44dba src/prelude-client.c | 8 ++++++-- 1 files changed, 6 insertions(+), 2 deletions(-) commit 7f7ec6c04bb7063e7d47de354805ab43f3b30478 Author: Yoann Vandoorselaere Date: Thu Aug 14 08:29:58 2008 +0000 If casting the value fail, return unmodified idmef-value. Fixed non working uint32 and uint64 to time cast. Honor 'own_data' boolean when casting from/to a string (possible double free). git-svn-id: file:///home/yoann/SVN/libprelude/trunk@10839 09c5ec92-17d4-0310-903a-819935f44dba src/idmef-value.c | 78 ++++++++++++++++++++++++++++++++++------------------- 1 files changed, 50 insertions(+), 28 deletions(-) commit 88343263540fcbd8033ff141740ccee6c332860c Author: Yoann Vandoorselaere Date: Thu Aug 14 08:29:55 2008 +0000 Update GnuLib options. git-svn-id: file:///home/yoann/SVN/libprelude/trunk@10838 09c5ec92-17d4-0310-903a-819935f44dba libmissing/Makefile.am | 2 +- libmissing/m4/gnulib-cache.m4 | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) commit ad78303831c28fd29cadd3ac108f298bf5b3d634 Author: Yoann Vandoorselaere Date: Thu Aug 14 08:29:53 2008 +0000 Start implementing libprelude unit tests. git-svn-id: file:///home/yoann/SVN/libprelude/trunk@10837 09c5ec92-17d4-0310-903a-819935f44dba Makefile.am | 4 +- configure.in | 2 + tests/Makefile.am | 9 ++ tests/idmef-criteria.c | 57 +++++++++++++ tests/idmef-path.c | 97 ++++++++++++++++++++++ tests/idmef-value.c | 208 ++++++++++++++++++++++++++++++++++++++++++++++++ tests/idmef.c | 25 ++++++ tests/prelude-client.c | 18 ++++ tests/prelude-string.c | 39 +++++++++ 9 files changed, 457 insertions(+), 2 deletions(-) commit 7d021186bd7a7d413c9ebaab0d1b64901b6b77c9 Author: Yoann Vandoorselaere Date: Thu Aug 14 08:29:49 2008 +0000 Update GnuLib code, include unit tests. git-svn-id: file:///home/yoann/SVN/libprelude/trunk@10836 09c5ec92-17d4-0310-903a-819935f44dba libmissing/Makefile.am | 2 +- libmissing/m4/gnulib-cache.m4 | 5 ++- libmissing/m4/gnulib-comp.m4 | 46 +++++++++++++++++++++++++++++++++++++++- libmissing/mktime.c | 4 ++- libmissing/poll.c | 34 +++++++++++++++++++++--------- libmissing/regex_internal.h | 4 +- 6 files changed, 77 insertions(+), 18 deletions(-) commit b7333774d0f185baff8cc09135d233b964cd8372 Author: Yoann Vandoorselaere Date: Mon Aug 11 12:43:49 2008 +0000 Add missing autogenerated files. git-svn-id: file:///home/yoann/SVN/libprelude/trunk@10833 09c5ec92-17d4-0310-903a-819935f44dba bindings/low-level/python/setup.py.in | 85 +++++++++++++++++++++++++++++++++ bindings/python/setup.py.in | 85 +++++++++++++++++++++++++++++++++ 2 files changed, 170 insertions(+), 0 deletions(-) commit d85a288a076ee5f1d91720133112fb8b83866386 Author: Yoann Vandoorselaere Date: Mon Aug 11 12:39:30 2008 +0000 Exit in case of command failure. git-svn-id: file:///home/yoann/SVN/libprelude/trunk@10832 09c5ec92-17d4-0310-903a-819935f44dba autogen.sh | 8 ++++---- 1 files changed, 4 insertions(+), 4 deletions(-) commit 8e026033f3043d0d380bcc99b04a97c03f1058ba Author: Yoann Vandoorselaere Date: Mon Aug 11 12:39:12 2008 +0000 Correct C++ include installation path. git-svn-id: file:///home/yoann/SVN/libprelude/trunk@10831 09c5ec92-17d4-0310-903a-819935f44dba bindings/c++/include/Makefile.am | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) commit c43ffb1df74b62a8c95dc3493aef2b6ba5474eba Author: Yoann Vandoorselaere Date: Tue Aug 5 13:28:32 2008 +0000 Update NEWS, version bump. git-svn-id: file:///home/yoann/SVN/libprelude/trunk@10828 09c5ec92-17d4-0310-903a-819935f44dba NEWS | 41 +++++++++++++++++++++++++++++++++-------- configure.in | 10 +++++----- 2 files changed, 38 insertions(+), 13 deletions(-) commit 0323ce6faab7249eb1bff902090aa26dbecd1584 Author: Yoann Vandoorselaere Date: Tue Aug 5 13:26:24 2008 +0000 Remove unstable API. git-svn-id: file:///home/yoann/SVN/libprelude/trunk@10827 09c5ec92-17d4-0310-903a-819935f44dba bindings/c++/include/prelude-error.hxx | 2 -- bindings/c++/prelude-error.cxx | 7 ------- 2 files changed, 0 insertions(+), 9 deletions(-) commit a18538915f05b6403d83d7ee00e2541fbca578a0 Author: Yoann Vandoorselaere Date: Tue Aug 5 11:13:30 2008 +0000 Revert to Python distutils for installing language bindings. Using autoconf would work, but wouldn't install in the correct prefix in case the user running make install was root. git-svn-id: file:///home/yoann/SVN/libprelude/trunk@10826 09c5ec92-17d4-0310-903a-819935f44dba Makefile.am | 2 +- bindings/low-level/python/Makefile.am | 26 +++++++++++++++----------- bindings/python/Makefile.am | 24 +++++++++++++++--------- bindings/ruby/Makefile.am | 1 - configure.in | 20 ++++++++++++++++++-- 5 files changed, 49 insertions(+), 24 deletions(-) commit 50a26db16200ba5d20ad4519c733f439b53a5b4d Author: Yoann Vandoorselaere Date: Tue Aug 5 08:32:38 2008 +0000 Fix typo. git-svn-id: file:///home/yoann/SVN/libprelude/trunk@10825 09c5ec92-17d4-0310-903a-819935f44dba bindings/low-level/python/Makefile.am | 2 +- bindings/python/Makefile.am | 2 +- bindings/ruby/Makefile.am | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) commit 8456bac87db74fc2fb0bdc94d5fa1fc6455861ba Author: Yoann Vandoorselaere Date: Mon Aug 4 16:07:40 2008 +0000 Set library soname, link to libprelude.la. git-svn-id: file:///home/yoann/SVN/libprelude/trunk@10824 09c5ec92-17d4-0310-903a-819935f44dba bindings/c++/Makefile.am | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) commit d4601bfc667f5b94e2db1e26a184957ab9cd53df Author: Yoann Vandoorselaere Date: Mon Aug 4 16:07:36 2008 +0000 Error out if EasyBindings are enabled, but not C++ compiler is available. git-svn-id: file:///home/yoann/SVN/libprelude/trunk@10823 09c5ec92-17d4-0310-903a-819935f44dba configure.in | 13 +++++++++++++ 1 files changed, 13 insertions(+), 0 deletions(-) commit 44daf32ecc94a5dc2fb3dbaef56a9ee8dabceadd Author: Yoann Vandoorselaere Date: Mon Aug 4 16:07:33 2008 +0000 Correct variable name. git-svn-id: file:///home/yoann/SVN/libprelude/trunk@10822 09c5ec92-17d4-0310-903a-819935f44dba bindings/low-level/python/Makefile.am | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) commit a916c8f86baf73f5f88a815f66516c732313edeb Author: Yoann Vandoorselaere Date: Mon Aug 4 14:30:23 2008 +0000 Set error, when creating a PreludeError() from string. git-svn-id: file:///home/yoann/SVN/libprelude/trunk@10821 09c5ec92-17d4-0310-903a-819935f44dba bindings/c++/prelude-error.cxx | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) commit aea94b5fe1d9c21a19b162c11609fff0b74c60df Author: Yoann Vandoorselaere Date: Mon Aug 4 14:30:18 2008 +0000 Handle more Ruby version. git-svn-id: file:///home/yoann/SVN/libprelude/trunk@10820 09c5ec92-17d4-0310-903a-819935f44dba m4/am_path_ruby.m4 | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) commit 2f97c988c2b739eb398c0253cfdf1fef8634d5ac Author: Yoann Vandoorselaere Date: Mon Aug 4 14:30:16 2008 +0000 Add RUBY_CFLAGS, RUBY_LIBS where appropriate. git-svn-id: file:///home/yoann/SVN/libprelude/trunk@10819 09c5ec92-17d4-0310-903a-819935f44dba bindings/ruby/Makefile.am | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) commit dd8646ffa437878f85d00d8df9adcfa615f945d7 Author: Yoann Vandoorselaere Date: Mon Aug 4 14:30:13 2008 +0000 Complete Python/Ruby check. git-svn-id: file:///home/yoann/SVN/libprelude/trunk@10818 09c5ec92-17d4-0310-903a-819935f44dba configure.in | 34 +++++++++++++++++++++++----------- 1 files changed, 23 insertions(+), 11 deletions(-) commit 8c5b040ddcaf2709c48872f5360db5f22994b144 Author: Yoann Vandoorselaere Date: Mon Aug 4 14:30:11 2008 +0000 Add missing link to libprelude. git-svn-id: file:///home/yoann/SVN/libprelude/trunk@10817 09c5ec92-17d4-0310-903a-819935f44dba bindings/low-level/python/Makefile.am | 1 + 1 files changed, 1 insertions(+), 0 deletions(-) commit c31e75a3e796d0e79844d7460bd579d7088e3f8e Author: Pierre Chifflier Date: Thu Jul 31 09:30:48 2008 +0000 Fix ruby detection: check if we can actually build extensions, not only if the interpreter is present. git-svn-id: file:///home/yoann/SVN/libprelude/trunk@10799 09c5ec92-17d4-0310-903a-819935f44dba configure.in | 9 +++++++++ 1 files changed, 9 insertions(+), 0 deletions(-) commit 5b019fe8c8b2f87f0deeda89d1f8a3e3e23b558f Author: Pierre Chifflier Date: Thu Jul 31 09:07:55 2008 +0000 Fix build without easy bindings. git-svn-id: file:///home/yoann/SVN/libprelude/trunk@10798 09c5ec92-17d4-0310-903a-819935f44dba bindings/lua/Makefile.am | 7 ++++++- 1 files changed, 6 insertions(+), 1 deletions(-) commit b623587b66b64a1e281e4cff5b21f3f5de7251c6 Author: Yoann Vandoorselaere Date: Tue Jul 29 12:56:02 2008 +0000 Do not include generated script in the distribution. git-svn-id: file:///home/yoann/SVN/libprelude/trunk@10782 09c5ec92-17d4-0310-903a-819935f44dba prelude-admin/Makefile.am | 3 +-- 1 files changed, 1 insertions(+), 2 deletions(-) commit 7bc07af23ab070962a1ee78d4ecf3a79060f5409 Author: Yoann Vandoorselaere Date: Tue Jul 29 12:55:58 2008 +0000 Really fix regression introduced in [10653], alert created with empty CreateTime. git-svn-id: file:///home/yoann/SVN/libprelude/trunk@10781 09c5ec92-17d4-0310-903a-819935f44dba src/idmef-tree-wrap.c | 8 ++++---- src/idmef-wrappers-gen/GenerateIDMEFTreeWrapC.pm | 13 +++++++------ 2 files changed, 11 insertions(+), 10 deletions(-) commit 477f9836482d1bcafe4396f3eb866ffc21356bce Author: Yoann Vandoorselaere Date: Mon Jul 28 15:50:08 2008 +0000 Update. git-svn-id: file:///home/yoann/SVN/libprelude/trunk@10773 09c5ec92-17d4-0310-903a-819935f44dba docs/api/libprelude-decl.txt | 171 +++++++++++++++++++++++++++++++++++++++++- 1 files changed, 168 insertions(+), 3 deletions(-) commit c016c4def354b64183a8d02ee60c7c14f02a8872 Author: Yoann Vandoorselaere Date: Mon Jul 28 15:50:02 2008 +0000 Remove unused. git-svn-id: file:///home/yoann/SVN/libprelude/trunk@10772 09c5ec92-17d4-0310-903a-819935f44dba bindings/libpreludecpp.i | 2 -- 1 files changed, 0 insertions(+), 2 deletions(-) commit d4c82a89ed3bc8cb5b291c8060e7bebc02f00ca0 Author: Yoann Vandoorselaere Date: Mon Jul 28 15:49:59 2008 +0000 Fix regression introduced in [10653], alert created with empty CreateTime. git-svn-id: file:///home/yoann/SVN/libprelude/trunk@10771 09c5ec92-17d4-0310-903a-819935f44dba src/idmef-tree-wrap.c | 4 ++++ src/idmef-wrappers-gen/GenerateIDMEFTreeWrapC.pm | 4 ++-- 2 files changed, 6 insertions(+), 2 deletions(-) commit 718ffbeb61bf6e99bef2eddaf838b94f28bc3280 Author: Yoann Vandoorselaere Date: Fri Jul 25 15:10:54 2008 +0000 Implement prelude_connection_recv_idmef(). Implement Connection::RecvIDMEF() and Connection::GetFd(). git-svn-id: file:///home/yoann/SVN/libprelude/trunk@10757 09c5ec92-17d4-0310-903a-819935f44dba bindings/c++/include/prelude-connection.hxx | 6 ++++ bindings/c++/prelude-connection.cxx | 26 +++++++++++++++++- src/include/prelude-connection.h | 4 ++- src/prelude-connection.c | 38 +++++++++++++++++++++++++++ 4 files changed, 71 insertions(+), 3 deletions(-) commit 9ccc8d77720bf7d9b264165400807b5c051d4f7e Author: Yoann Vandoorselaere Date: Fri Jul 25 15:08:34 2008 +0000 Consistancy fixes. git-svn-id: file:///home/yoann/SVN/libprelude/trunk@10756 09c5ec92-17d4-0310-903a-819935f44dba bindings/ruby/Makefile.am | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) commit 01f29871249155166cdb488ac4f33c8d054e13fb Author: Yoann Vandoorselaere Date: Fri Jul 25 15:05:30 2008 +0000 API style fixes. Implement std::string operator for PreludeError. git-svn-id: file:///home/yoann/SVN/libprelude/trunk@10755 09c5ec92-17d4-0310-903a-819935f44dba bindings/c++/include/prelude-error.hxx | 3 ++- bindings/c++/prelude-error.cxx | 8 +++++++- 2 files changed, 9 insertions(+), 2 deletions(-) commit c3f11f3379224056aae7b2326bcb2f18a07016e6 Author: Yoann Vandoorselaere Date: Fri Jul 25 13:09:40 2008 +0000 Remove un-needed dependency. git-svn-id: file:///home/yoann/SVN/libprelude/trunk@10752 09c5ec92-17d4-0310-903a-819935f44dba bindings/c++/include/idmef.hxx | 1 - 1 files changed, 0 insertions(+), 1 deletions(-) commit 268ecdb16ed8a1be3666516b1da9a64c19f66916 Author: Yoann Vandoorselaere Date: Fri Jul 25 13:07:59 2008 +0000 Fix Ruby detection. git-svn-id: file:///home/yoann/SVN/libprelude/trunk@10751 09c5ec92-17d4-0310-903a-819935f44dba configure.in | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) commit e1537694fae02bf188264f5a876b3cb13b77b705 Author: Yoann Vandoorselaere Date: Fri Jul 25 13:07:56 2008 +0000 When language support exception, return the native exception object (not only a string, excepted for Perl and LUA, which does not support exception). git-svn-id: file:///home/yoann/SVN/libprelude/trunk@10750 09c5ec92-17d4-0310-903a-819935f44dba bindings/libpreludecpp-perl.i | 6 ++++++ bindings/libpreludecpp.i | 6 ++---- bindings/lua/libpreludecpp-lua.i | 5 +++++ 3 files changed, 13 insertions(+), 4 deletions(-) commit 1039c917c3a505bf1ed23bba3a3302cf7545f215 Author: Yoann Vandoorselaere Date: Fri Jul 25 08:01:14 2008 +0000 Make Python bindings generation depend on all .hxx files. git-svn-id: file:///home/yoann/SVN/libprelude/trunk@10744 09c5ec92-17d4-0310-903a-819935f44dba bindings/python/Makefile.am | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) commit 81296623afd0c077e05130be9d26fd541ed7bce1 Author: Yoann Vandoorselaere Date: Fri Jul 25 08:00:16 2008 +0000 Implement prelude_connection_pool_del_connection(), map to ConnectionPool::DelConnection(). git-svn-id: file:///home/yoann/SVN/libprelude/trunk@10743 09c5ec92-17d4-0310-903a-819935f44dba bindings/c++/include/prelude-connection-pool.hxx | 2 + bindings/c++/prelude-connection-pool.cxx | 6 ++ src/include/prelude-connection-pool.h | 2 + src/prelude-connection-pool.c | 55 ++++++++++++++++++--- 4 files changed, 57 insertions(+), 8 deletions(-) commit 7e3d29c9e213de82d3ed7cac6cfe04ed70a54f35 Author: Yoann Vandoorselaere Date: Fri Jul 25 07:27:41 2008 +0000 Make bindings generation depend on all .hxx files. git-svn-id: file:///home/yoann/SVN/libprelude/trunk@10742 09c5ec92-17d4-0310-903a-819935f44dba bindings/Makefile.am | 15 +-------------- bindings/lua/Makefile.am | 2 +- bindings/ruby/Makefile.am | 2 +- 3 files changed, 3 insertions(+), 16 deletions(-) commit 0e57ac3c1b62859a2546e7a0bd4e0f8f96c069bc Author: Yoann Vandoorselaere Date: Thu Jul 24 12:50:56 2008 +0000 Remove deprecated, fix libpreludecpp-lua.i path. git-svn-id: file:///home/yoann/SVN/libprelude/trunk@10739 09c5ec92-17d4-0310-903a-819935f44dba bindings/low-level/python/setup.py.in | 85 --------------------------------- bindings/lua/Makefile.am | 2 +- bindings/python/setup.py.in | 85 --------------------------------- bindings/ruby/extconf.rb.in | 14 ----- 4 files changed, 1 insertions(+), 185 deletions(-) commit 8b6a368f42f39229aa1f8b14adb67a58b123f7e6 Author: Yoann Vandoorselaere Date: Thu Jul 24 12:19:48 2008 +0000 Squashed commit of the following: commit 876984d7209d99a4fca597d443fd5e1e02fdfc27 Author: yoann Date: Thu Jul 24 11:58:25 2008 +0000 Add missing git-svn-id: https://svn.prelude-ids.org/libprelude/branches/libprelude-easy-bindings@10736 09c5ec92-17d4-0310-903a-819935f44dba commit 08de6d98ea57671ad2223fefc58ddb8c82922e14 Author: yoann Date: Thu Jul 24 11:58:21 2008 +0000 Add missing git-svn-id: https://svn.prelude-ids.org/libprelude/branches/libprelude-easy-bindings@10735 09c5ec92-17d4-0310-903a-819935f44dba commit d5735641eb9efe4a3d26ed2a458dcf98cebcfe82 Author: yoann Date: Thu Jul 24 08:00:04 2008 +0000 Use autoconf AM_PATH_PYTHON(), implement AM_PATH_RUBY, based on AM_PATH_PYTHON(). Build Python/Ruby modules using the automake build system. git-svn-id: https://svn.prelude-ids.org/libprelude/branches/libprelude-easy-bindings@10731 09c5ec92-17d4-0310-903a-819935f44dba commit 939c55d77dd3717de3c71b9e25038260352b7bd1 Author: yoann Date: Tue Jul 22 16:44:27 2008 +0000 Disable ruby support for now, since we haven't been able to find a way to install these binding cleanly. git-svn-id: https://svn.prelude-ids.org/libprelude/branches/libprelude-easy-bindings@10726 09c5ec92-17d4-0310-903a-819935f44dba commit fbb5d38873825af8315faa4e5c058bfd88944ef9 Author: yoann Date: Tue Jul 22 13:45:11 2008 +0000 Fix reference to an inexisting variable. git-svn-id: https://svn.prelude-ids.org/libprelude/branches/libprelude-easy-bindings@10712 09c5ec92-17d4-0310-903a-819935f44dba commit 26f9ee544d8e8746690a5813d653200bfe6d7c4d Author: yoann Date: Wed Jun 25 14:48:25 2008 +0000 Fix the profile name git-svn-id: https://svn.prelude-ids.org/libprelude/branches/libprelude-easy-bindings@10607 09c5ec92-17d4-0310-903a-819935f44dba commit 10aa052077d33b3ceec87fc23c8c6c39cb6ee308 Author: yoann Date: Wed Jun 25 14:45:30 2008 +0000 Update pooling test to fit latest RecvIDMEF API changes. git-svn-id: https://svn.prelude-ids.org/libprelude/branches/libprelude-easy-bindings@10606 09c5ec92-17d4-0310-903a-819935f44dba commit c1464ce1ffc35b4a1c04d237d5cc2ed654bbbe1d Author: yoann Date: Mon May 26 15:01:49 2008 +0000 Modify RecvIDMEF prototype so that it might return information about whether or not a message was received. Update alert_saver.py example. git-svn-id: https://svn.prelude-ids.org/libprelude/branches/libprelude-easy-bindings@10593 09c5ec92-17d4-0310-903a-819935f44dba commit 053d3f33f1c92d0a06755ec25cf63e360c9d6bd9 Author: yoann Date: Mon May 26 15:01:42 2008 +0000 Remove confusing operator. git-svn-id: https://svn.prelude-ids.org/libprelude/branches/libprelude-easy-bindings@10592 09c5ec92-17d4-0310-903a-819935f44dba commit 116c684f4ce43e411b858afbf3162a03b7031a55 Author: toady Date: Sun May 25 22:17:59 2008 +0000 uninstall target to remove ruby PreludeEasy library git-svn-id: https://svn.prelude-ids.org/libprelude/branches/libprelude-easy-bindings@10591 09c5ec92-17d4-0310-903a-819935f44dba commit 4282aa16a50f2b509656c804fa292c00bab6b605 Author: toady Date: Mon May 19 21:12:51 2008 +0000 remove my dirty hack away from svn git-svn-id: https://svn.prelude-ids.org/libprelude/branches/libprelude-easy-bindings@10590 09c5ec92-17d4-0310-903a-819935f44dba commit e69c1b357d4be2dbf50814000692b08e4a56e7bb Author: pollux Date: Mon May 12 15:00:42 2008 +0000 Update comments in ruby and lua examples git-svn-id: https://svn.prelude-ids.org/libprelude/branches/libprelude-easy-bindings@10589 09c5ec92-17d4-0310-903a-819935f44dba commit b2c876c6da0b07e2ffdce482d805eeba2f45f0df Author: pollux Date: Mon May 12 14:54:24 2008 +0000 Lua bindings: check if argument for Read/Write is a file, and throw an exception if not. git-svn-id: https://svn.prelude-ids.org/libprelude/branches/libprelude-easy-bindings@10588 09c5ec92-17d4-0310-903a-819935f44dba commit f834fe45a7c9762bdf4c80c3fb07de2aceee1ad2 Author: pollux Date: Mon May 12 14:40:55 2008 +0000 Fix Lua >= 5.1 detection git-svn-id: https://svn.prelude-ids.org/libprelude/branches/libprelude-easy-bindings@10587 09c5ec92-17d4-0310-903a-819935f44dba commit ed1400545f14274d5f98f09489093fdfa0b60dd4 Author: pollux Date: Mon May 12 14:05:32 2008 +0000 Python bindings: check if argument for Read/Write is a file, and throw an exception if not. git-svn-id: https://svn.prelude-ids.org/libprelude/branches/libprelude-easy-bindings@10586 09c5ec92-17d4-0310-903a-819935f44dba commit 858b1604c6c2fdd4ac524594d7795780f1e93a2f Author: pollux Date: Wed May 7 13:00:44 2008 +0000 Update examples for alert saving/replaying to current Easy bindings API. git-svn-id: https://svn.prelude-ids.org/libprelude/branches/libprelude-easy-bindings@10580 09c5ec92-17d4-0310-903a-819935f44dba commit dcb45dbbc823d61963d69887b99db546fda4ac41 Author: yoann Date: Wed May 7 09:19:51 2008 +0000 Include idmef-message-helpers.h, not idmef-message-helper.h git-svn-id: https://svn.prelude-ids.org/libprelude/branches/libprelude-easy-bindings@10579 09c5ec92-17d4-0310-903a-819935f44dba commit 52fd7b2ce1d1f3daabefa8cb7aa041a427fc027d Author: yoann Date: Wed May 7 08:55:50 2008 +0000 Cleanup. git-svn-id: https://svn.prelude-ids.org/libprelude/branches/libprelude-easy-bindings@10578 09c5ec92-17d4-0310-903a-819935f44dba commit e0486b17d2174ca7a9995a1a4f1fdd26363c69fb Author: yoann Date: Wed May 7 07:51:44 2008 +0000 Rename readIDMEF / writeIDMEF to Read() / Write(). git-svn-id: https://svn.prelude-ids.org/libprelude/branches/libprelude-easy-bindings@10576 09c5ec92-17d4-0310-903a-819935f44dba commit 26367d3ab6daae49a4ff95e6efc48bbcddb56f3d Author: yoann Date: Wed May 7 07:51:40 2008 +0000 Helper is plural... git-svn-id: https://svn.prelude-ids.org/libprelude/branches/libprelude-easy-bindings@10575 09c5ec92-17d4-0310-903a-819935f44dba commit bd4bd43e827dc5b8d4a3d1b2a2873e5045017372 Author: yoann Date: Wed May 7 07:43:14 2008 +0000 Implement a bunch of C IDMEF messages helpers functions: idmef_message_set_value(); idmef_message_get_value(); idmef_message_set_string(); idmef_message_get_string(); idmef_message_set_number(); idmef_message_get_number(); idmef_message_set_data(); idmef_message_get_data(); git-svn-id: https://svn.prelude-ids.org/libprelude/branches/libprelude-easy-bindings@10574 09c5ec92-17d4-0310-903a-819935f44dba commit 5e78cfb2d64e5ad3244c5650c3fddbd050b30cff Author: yoann Date: Wed May 7 07:43:06 2008 +0000 Ability to cast IDMEF value to string. Move casting to/from string to separate functions. git-svn-id: https://svn.prelude-ids.org/libprelude/branches/libprelude-easy-bindings@10573 09c5ec92-17d4-0310-903a-819935f44dba commit 5f39a7e60f87ad0df7c1ecad787f2142b4e8ddad Author: yoann Date: Wed Apr 30 15:28:02 2008 +0000 Implement _idmef_value_copy_internal(), that is able to make use of _idmef_value_cast() without modifying the input value. Modify idmef_path_set() to use _idmef_value_copy_internal() in place of _idmef_value_cast(): avoid modifying the input value. git-svn-id: https://svn.prelude-ids.org/libprelude/branches/libprelude-easy-bindings@10563 09c5ec92-17d4-0310-903a-819935f44dba commit 0dd89971d2a8c42818155d2e5e35deed7bf039e4 Author: toady Date: Tue Apr 29 12:56:42 2008 +0000 use the sed variable from autotools git-svn-id: https://svn.prelude-ids.org/libprelude/branches/libprelude-easy-bindings@10560 09c5ec92-17d4-0310-903a-819935f44dba commit efe2d5ea8f3072908fe11c1287133f7f9bcf410b Author: yoann Date: Tue Apr 29 12:40:49 2008 +0000 Add missing. git-svn-id: https://svn.prelude-ids.org/libprelude/branches/libprelude-easy-bindings@10559 09c5ec92-17d4-0310-903a-819935f44dba commit 46ae22f69b7a557869d5c0861dc88728e85146bc Author: toady Date: Tue Apr 29 12:39:26 2008 +0000 handling ruby mkmf crap to have a clean install that respects the prefix git-svn-id: https://svn.prelude-ids.org/libprelude/branches/libprelude-easy-bindings@10558 09c5ec92-17d4-0310-903a-819935f44dba commit 2b0be608b049893f2140250534ea606bf57829aa Author: yoann Date: Tue Apr 29 12:36:53 2008 +0000 More prelude-easy -> preludecpp renaming. git-svn-id: https://svn.prelude-ids.org/libprelude/branches/libprelude-easy-bindings@10557 09c5ec92-17d4-0310-903a-819935f44dba commit abcd6d931831c09ff28f15188cd5e8b489a2e5d6 Author: yoann Date: Tue Apr 29 12:36:20 2008 +0000 Start renaming prelude-easy to preludecpp git-svn-id: https://svn.prelude-ids.org/libprelude/branches/libprelude-easy-bindings@10556 09c5ec92-17d4-0310-903a-819935f44dba commit be1823ef3160a675f08e4754a25097218410be26 Author: yoann Date: Fri Apr 25 12:47:19 2008 +0000 Remove unused PreludeIO wrapper. Start fixing distcheck. git-svn-id: https://svn.prelude-ids.org/libprelude/branches/libprelude-easy-bindings@10544 09c5ec92-17d4-0310-903a-819935f44dba commit 4e9c45ce1cd7a932ee42bcac8f72fe56fa0320b3 Author: yoann Date: Fri Apr 25 09:23:05 2008 +0000 Handle redirection operator. git-svn-id: https://svn.prelude-ids.org/libprelude/branches/libprelude-easy-bindings@10543 09c5ec92-17d4-0310-903a-819935f44dba commit fbf996fe3086fa657edc8b0e74ed3353d165c702 Author: yoann Date: Thu Apr 24 08:14:50 2008 +0000 Remove debugging spew, fix coding style. git-svn-id: https://svn.prelude-ids.org/libprelude/branches/libprelude-easy-bindings@10533 09c5ec92-17d4-0310-903a-819935f44dba commit 86477c68ee5f246badc53b49e6a49900e2ec3f4a Author: yoann Date: Thu Apr 24 08:14:20 2008 +0000 Handle read/write error correctly. git-svn-id: https://svn.prelude-ids.org/libprelude/branches/libprelude-easy-bindings@10532 09c5ec92-17d4-0310-903a-819935f44dba commit 5365c57bde7ab9c3f62bf0955712d486683df485 Author: pollux Date: Wed Apr 23 12:22:00 2008 +0000 Implement basic stream operator to set timeout when reading idmef object. Example: client >> SetRecvTimeout(10) >> idmef; git-svn-id: https://svn.prelude-ids.org/libprelude/branches/libprelude-easy-bindings@10518 09c5ec92-17d4-0310-903a-819935f44dba commit 17fdd2177974759c902ebcf6dacf4c5da7d806a6 Author: pollux Date: Mon Apr 21 13:19:44 2008 +0000 Test code for read/write IDMEF in lua, ruby, perl and python git-svn-id: https://svn.prelude-ids.org/libprelude/branches/libprelude-easy-bindings@10508 09c5ec92-17d4-0310-903a-819935f44dba commit 4334a0fb491ee15830790278630ab553f1e0bf33 Author: pollux Date: Mon Apr 21 13:13:06 2008 +0000 Fix installation of ruby bindings (now respect ) git-svn-id: https://svn.prelude-ids.org/libprelude/branches/libprelude-easy-bindings@10507 09c5ec92-17d4-0310-903a-819935f44dba commit 652426c44525fd64377ae0ccc211e7a454610356 Author: pollux Date: Mon Apr 21 12:06:31 2008 +0000 Fix read/write functions: extract PerlIO object from SV git-svn-id: https://svn.prelude-ids.org/libprelude/branches/libprelude-easy-bindings@10506 09c5ec92-17d4-0310-903a-819935f44dba commit 24cdee039978d0baa49205753865d73023d60a3e Author: yoann Date: Mon Apr 21 09:33:38 2008 +0000 Fix invalid member function declaration. git-svn-id: https://svn.prelude-ids.org/libprelude/branches/libprelude-easy-bindings@10505 09c5ec92-17d4-0310-903a-819935f44dba commit c064630ed223fb749b4d99a6af9963678abf06db Author: yoann Date: Mon Apr 21 08:54:53 2008 +0000 Start modularizing of IDMEF read/write code. git-svn-id: https://svn.prelude-ids.org/libprelude/branches/libprelude-easy-bindings@10504 09c5ec92-17d4-0310-903a-819935f44dba commit 19d3d1d6225def9c62d476d9195d32a8ebaa159e Author: pollux Date: Sun Apr 20 13:55:36 2008 +0000 Ruby bindings: add functions to read/write IDMEF files from/to Ruby IO objects. git-svn-id: https://svn.prelude-ids.org/libprelude/branches/libprelude-easy-bindings@10503 09c5ec92-17d4-0310-903a-819935f44dba commit 4dc6df114573099fff46be8b43ef9de29edbaf60 Author: pollux Date: Sun Apr 20 12:52:47 2008 +0000 LUA bindings: add functions to read/write IDMEF files from/to LUA IO objects. git-svn-id: https://svn.prelude-ids.org/libprelude/branches/libprelude-easy-bindings@10502 09c5ec92-17d4-0310-903a-819935f44dba commit 7ba9bd72b1e9107fd8ece944f78a2a9accf03e8c Author: toady Date: Thu Apr 17 09:54:18 2008 +0000 ruby workaround to cleanly install lib git-svn-id: https://svn.prelude-ids.org/libprelude/branches/libprelude-easy-bindings@10496 09c5ec92-17d4-0310-903a-819935f44dba commit 1e95b4c2252b50f1dc16ac5af8bf38619e5c1fc1 Author: pollux Date: Thu Apr 17 08:03:34 2008 +0000 Fix lua detection to work with version 5.0 git-svn-id: https://svn.prelude-ids.org/libprelude/branches/libprelude-easy-bindings@10492 09c5ec92-17d4-0310-903a-819935f44dba commit 9b4df0521d1b97b5a8c04687d9be50db1a8b8661 Author: pollux Date: Wed Apr 16 19:26:59 2008 +0000 Recent versions of lua (>= 5.1) use pkg-config (and not the previous tool lua-config). git-svn-id: https://svn.prelude-ids.org/libprelude/branches/libprelude-easy-bindings@10491 09c5ec92-17d4-0310-903a-819935f44dba commit 11b70c8b9950c119f61627a7ac111cd6aa600db9 Author: pollux Date: Wed Apr 16 18:51:01 2008 +0000 Python bindings: add functions to read/write IDMEF files from/to Python IO objects. git-svn-id: https://svn.prelude-ids.org/libprelude/branches/libprelude-easy-bindings@10490 09c5ec92-17d4-0310-903a-819935f44dba commit 15649e060be4813f162ebf9707d6d76e9244c707 Author: pollux Date: Wed Apr 16 18:50:07 2008 +0000 Perl bindings: add functions to read/write IDMEF files from/to perl IO objects. git-svn-id: https://svn.prelude-ids.org/libprelude/branches/libprelude-easy-bindings@10489 09c5ec92-17d4-0310-903a-819935f44dba commit d1da1a34feb08a5c307c77b67320adda02d3e560 Author: yoann Date: Thu Apr 3 14:45:07 2008 +0000 Fix a harmless race in the way we checked for global async_flags change. git-svn-id: https://svn.prelude-ids.org/libprelude/branches/libprelude-easy-bindings@10471 09c5ec92-17d4-0310-903a-819935f44dba commit b3a86091420706ac99ead0ea0e5ec2fe49b0d75a Author: yoann Date: Thu Apr 3 14:45:03 2008 +0000 Remove old cross bindings initialization code, replaced with language specific call to prelude_init(). git-svn-id: https://svn.prelude-ids.org/libprelude/branches/libprelude-easy-bindings@10470 09c5ec92-17d4-0310-903a-819935f44dba commit 42b4b45b05505baec2f1383cbd38e1b7f2a73b71 Author: yoann Date: Thu Mar 27 16:59:55 2008 +0000 When the module initialize, retrieve argc/argv from lua/perl/ruby/python, and use the result to call prelude_init(). git-svn-id: https://svn.prelude-ids.org/libprelude/branches/libprelude-easy-bindings@10446 09c5ec92-17d4-0310-903a-819935f44dba commit f0eaef2e7b1c3afc50c9d92ce2f81481c066f936 Author: yoann Date: Thu Mar 13 18:01:02 2008 +0000 Add idmef << client, and client >> idmef operator for reading IDMEF messages. git-svn-id: https://svn.prelude-ids.org/libprelude/branches/libprelude-easy-bindings@10404 09c5ec92-17d4-0310-903a-819935f44dba commit 183ece0cb35a3c5773b04f461930e9fdeb95fde7 Author: yoann Date: Thu Mar 13 18:00:52 2008 +0000 When casting a double/float to idmef_data_t, make sure we're not dealing with an integer value. If we are, set the resulting idmef_data_t to integer. git-svn-id: https://svn.prelude-ids.org/libprelude/branches/libprelude-easy-bindings@10403 09c5ec92-17d4-0310-903a-819935f44dba commit 1a835e13d8f04c6a2ec547de7bb3947170bf336d Author: yoann Date: Thu Mar 13 18:00:48 2008 +0000 data / time and enum are special types. git-svn-id: https://svn.prelude-ids.org/libprelude/branches/libprelude-easy-bindings@10402 09c5ec92-17d4-0310-903a-819935f44dba commit d0c5607fd704f2341ff84fa76c48f07acec23f20 Author: yoann Date: Thu Mar 13 12:27:37 2008 +0000 Fix check when casting double and float value. Compute the relative difference between the two values and then error out if it exceed a certain threshold. git-svn-id: https://svn.prelude-ids.org/libprelude/branches/libprelude-easy-bindings@10398 09c5ec92-17d4-0310-903a-819935f44dba commit 083ba414d1123e0b50e5ea519ff5a4d940928d75 Author: yoann Date: Wed Mar 12 17:21:53 2008 +0000 Remove home made implementation of RecvIDMEF(), and wrap the new prelude_client_recv_idmef() API function as a Client class method. git-svn-id: https://svn.prelude-ids.org/libprelude/branches/libprelude-easy-bindings@10397 09c5ec92-17d4-0310-903a-819935f44dba commit b942e0a32026ebea69815d4551966fd8dbc01a88 Author: yoann Date: Wed Mar 12 17:21:43 2008 +0000 Implement prelude_client_recv_msg() and prelude_client_recv_idmef(). git-svn-id: https://svn.prelude-ids.org/libprelude/branches/libprelude-easy-bindings@10396 09c5ec92-17d4-0310-903a-819935f44dba commit f0b780d086f04267b3597d34f763bc7bd449ec32 Author: yoann Date: Wed Mar 12 17:21:35 2008 +0000 Use the provided timeout parameter. git-svn-id: https://svn.prelude-ids.org/libprelude/branches/libprelude-easy-bindings@10395 09c5ec92-17d4-0310-903a-819935f44dba commit a4020b390583b98da854085dcb6e7f8f4d5aefbf Author: yoann Date: Tue Mar 11 15:32:37 2008 +0000 Return an empty list if _value is NULL. git-svn-id: https://svn.prelude-ids.org/libprelude/branches/libprelude-easy-bindings@10391 09c5ec92-17d4-0310-903a-819935f44dba commit eab69d13e655acc4cf2ab93f33d7b311c6b21c95 Author: yoann Date: Tue Mar 11 14:08:07 2008 +0000 Return _idmef_value_cast() error if any. git-svn-id: https://svn.prelude-ids.org/libprelude/branches/libprelude-easy-bindings@10389 09c5ec92-17d4-0310-903a-819935f44dba commit 8b52caf9f02d1fafda6a947cc869f926756f3130 Author: yoann Date: Tue Mar 11 14:08:00 2008 +0000 When casting a value, appropriatly detect target value overflow and issue the appropriate error. git-svn-id: https://svn.prelude-ids.org/libprelude/branches/libprelude-easy-bindings@10388 09c5ec92-17d4-0310-903a-819935f44dba commit f0943248cfe5804ca96cc613befa4eef1f465970 Author: yoann Date: Mon Mar 10 11:44:37 2008 +0000 Some cleanup, update for latest code. git-svn-id: https://svn.prelude-ids.org/libprelude/branches/libprelude-easy-bindings@10384 09c5ec92-17d4-0310-903a-819935f44dba commit 3791a4cd50884034e41826b778bffaba0cf80aab Author: yoann Date: Mon Mar 10 11:44:32 2008 +0000 Pass IDMEF message by value, allow using pointer to an IDMEFValue instead of a reference (allow for NULL value). git-svn-id: https://svn.prelude-ids.org/libprelude/branches/libprelude-easy-bindings@10383 09c5ec92-17d4-0310-903a-819935f44dba commit 76e0081d51f6773f5ad659a198d144b09ad8c236 Author: yoann Date: Mon Mar 10 11:44:25 2008 +0000 Fix double declaration. git-svn-id: https://svn.prelude-ids.org/libprelude/branches/libprelude-easy-bindings@10382 09c5ec92-17d4-0310-903a-819935f44dba commit 30fceea065952bae2ba4f27add86f7664d01f61a Author: Yoann Vandoorselaere Date: Fri Mar 7 12:11:28 2008 +0100 When we encounter a TLS fatal error on close, close the connection fd immediatly. commit afc21d31c516d33f956173ed852da85a10b3bfbc Author: yoann Date: Thu Mar 6 16:24:24 2008 +0000 Adapt to trunk build system modification. git-svn-id: https://svn.prelude-ids.org/libprelude/branches/libprelude-easy-bindings@10353 09c5ec92-17d4-0310-903a-819935f44dba commit 600d68b534f25612e6923659a3e51d6e2c599723 Author: yoann Date: Thu Mar 6 16:24:20 2008 +0000 Adapt to trunk latest build fixes. git-svn-id: https://svn.prelude-ids.org/libprelude/branches/libprelude-easy-bindings@10352 09c5ec92-17d4-0310-903a-819935f44dba commit d5a7144fac43a79b3a466b81f35a61b735b145fc Author: yoann Date: Thu Mar 6 11:57:15 2008 +0000 Revert "Revert "Merge ../libprelude"" This reverts commit 649250f27acfefab2271f2bddfabd024951e7c2e. git-svn-id: https://svn.prelude-ids.org/libprelude/branches/libprelude-easy-bindings@10345 09c5ec92-17d4-0310-903a-819935f44dba commit a684d07ec9cbe604a18c94c7243a7b9a9376664c Author: yoann Date: Thu Mar 6 11:57:01 2008 +0000 Revert "Merge ../libprelude" This reverts commit 396e763eb281266e37a7501f4f2ea084656435d0. git-svn-id: https://svn.prelude-ids.org/libprelude/branches/libprelude-easy-bindings@10344 09c5ec92-17d4-0310-903a-819935f44dba commit 21a42c7aba965cb5808b4e2c8f6cc626b557a207 Author: yoann Date: Thu Mar 6 11:56:52 2008 +0000 Revert "Fix conflict." This reverts commit 120920f7947aa65e739cd01a3eeb97684c26e465. git-svn-id: https://svn.prelude-ids.org/libprelude/branches/libprelude-easy-bindings@10343 09c5ec92-17d4-0310-903a-819935f44dba commit 14b9cfac90a19ea8f696b28c3939eb7786d99e22 Author: yoann Date: Thu Mar 6 11:56:38 2008 +0000 Fix conflict. git-svn-id: https://svn.prelude-ids.org/libprelude/branches/libprelude-easy-bindings@10342 09c5ec92-17d4-0310-903a-819935f44dba commit 821f6be190aee6e4f7b0ceba996bd833482dec51 Author: yoann Date: Thu Mar 6 11:56:21 2008 +0000 Fix retrieval of IDMEFTime (this actually will break retrieval of static IDMEF time within the tree - work in progress). git-svn-id: https://svn.prelude-ids.org/libprelude/branches/libprelude-easy-bindings@10340 09c5ec92-17d4-0310-903a-819935f44dba commit 0b7337ae8d229c2ac455fab40c1550b9ee66822d Author: yoann Date: Thu Mar 6 11:56:15 2008 +0000 Reference connection before pushing it into the list. git-svn-id: https://svn.prelude-ids.org/libprelude/branches/libprelude-easy-bindings@10339 09c5ec92-17d4-0310-903a-819935f44dba commit 0ad844c2c7c24fce04afc788e7234709d69a8136 Author: yoann Date: Thu Mar 6 11:56:10 2008 +0000 Use reference on object copy. Implement Clone() method. git-svn-id: https://svn.prelude-ids.org/libprelude/branches/libprelude-easy-bindings@10338 09c5ec92-17d4-0310-903a-819935f44dba commit b87c8f2b71553c6a6dd5bffb940a3ca80da233b2 Author: yoann Date: Wed Mar 5 16:32:11 2008 +0000 Use reference to object, and Clone() method to copy. git-svn-id: https://svn.prelude-ids.org/libprelude/branches/libprelude-easy-bindings@10335 09c5ec92-17d4-0310-903a-819935f44dba commit d533456bb82fc47a48f5e3fb625c345ca09dd128 Author: yoann Date: Tue Mar 4 15:24:25 2008 +0000 Fix possible ClientProfile leak. git-svn-id: https://svn.prelude-ids.org/libprelude/branches/libprelude-easy-bindings@10333 09c5ec92-17d4-0310-903a-819935f44dba commit 55f17201fd04b1cc3ac7b0a3e9b2ffe3e469f30b Author: yoann Date: Tue Mar 4 14:56:13 2008 +0000 Proper handling of ConnectionPool copy/reference. Reference connection before calling prelude_connection_pool_add_connection(), since it's not owned by prelude_connection_pool. git-svn-id: https://svn.prelude-ids.org/libprelude/branches/libprelude-easy-bindings@10332 09c5ec92-17d4-0310-903a-819935f44dba commit 4fbbcb84b67ddb5709d5baa2ce28ac0f6e4cd35a Author: yoann Date: Tue Mar 4 14:56:09 2008 +0000 Implement prelude_connection_pool_ref(), necessary for proper handling of ConnectionPool class. git-svn-id: https://svn.prelude-ids.org/libprelude/branches/libprelude-easy-bindings@10331 09c5ec92-17d4-0310-903a-819935f44dba commit 47147c9690571099ed45c0fcec2e7608695c496c Author: yoann Date: Tue Mar 4 14:56:05 2008 +0000 Reference the connection where needed. git-svn-id: https://svn.prelude-ids.org/libprelude/branches/libprelude-easy-bindings@10330 09c5ec92-17d4-0310-903a-819935f44dba commit a1d461e86066ec29a3d089831bda5bd6f22d2324 Author: yoann Date: Tue Mar 4 14:55:58 2008 +0000 Handle AUTOCONFIG Client flags. git-svn-id: https://svn.prelude-ids.org/libprelude/branches/libprelude-easy-bindings@10329 09c5ec92-17d4-0310-903a-819935f44dba commit 3fbe98dc80b47a4f2edd1178729eadd18b866e0b Author: yoann Date: Tue Mar 4 12:35:01 2008 +0000 Add refcount support to prelude_connection_t API. git-svn-id: https://svn.prelude-ids.org/libprelude/branches/libprelude-easy-bindings@10323 09c5ec92-17d4-0310-903a-819935f44dba commit 7a446f171e73d73d5a05035ccc27110e80bf1df0 Author: yoann Date: Tue Mar 4 12:34:55 2008 +0000 Add refcount support to idmef_criteria_t API. git-svn-id: https://svn.prelude-ids.org/libprelude/branches/libprelude-easy-bindings@10322 09c5ec92-17d4-0310-903a-819935f44dba commit 75e43a10d4ba339258ffbd2df1906c6ca273604d Author: yoann Date: Mon Mar 3 17:57:04 2008 +0000 Link to libpelude.la, should fix build breakage experienced by certain users. git-svn-id: https://svn.prelude-ids.org/libprelude/branches/libprelude-easy-bindings@10319 09c5ec92-17d4-0310-903a-819935f44dba commit bb06cfeecf3885b54909b1512789dee62699921d Author: yoann Date: Mon Mar 3 17:14:16 2008 +0000 Add support for --c++ command line option. git-svn-id: https://svn.prelude-ids.org/libprelude/branches/libprelude-easy-bindings@10318 09c5ec92-17d4-0310-903a-819935f44dba commit 323072028d109db690a58bdc7be3d120c60dbbb8 Author: yoann Date: Mon Mar 3 16:56:05 2008 +0000 Correct include path, and include install directory. git-svn-id: https://svn.prelude-ids.org/libprelude/branches/libprelude-easy-bindings@10317 09c5ec92-17d4-0310-903a-819935f44dba commit 6048e941d0c3f0315a5b79b1785307cf0d9a7955 Author: yoann Date: Wed Feb 27 11:42:18 2008 +0000 Pass IDMEFTime() and IDMEFValue() by reference. git-svn-id: https://svn.prelude-ids.org/libprelude/branches/libprelude-easy-bindings@10296 09c5ec92-17d4-0310-903a-819935f44dba commit de95b4535f3b06a1634c5afe47e7a4a77db06f39 Author: yoann Date: Tue Feb 26 13:50:09 2008 +0000 New sample test for LUA, Perl, Ruby, Python. Each test program demonstrate how to set and retrieved IDMEF fields, creating a client and sending the created IDMEF message to this client. git-svn-id: https://svn.prelude-ids.org/libprelude/branches/libprelude-easy-bindings@10295 09c5ec92-17d4-0310-903a-819935f44dba commit 0ed5547ccd9d339d7fb416e81d5ad0e08d041e0e Author: yoann Date: Tue Feb 26 13:45:35 2008 +0000 Remove debugging code, use in-class ToString() declaration in place of renaming un-handled std::string operator. git-svn-id: https://svn.prelude-ids.org/libprelude/branches/libprelude-easy-bindings@10294 09c5ec92-17d4-0310-903a-819935f44dba commit e13bc89763a70ed89e1931614d1c1fea3c3e43a8 Author: yoann Date: Tue Feb 26 13:45:32 2008 +0000 Correctly automate printing of class with LUA. git-svn-id: https://svn.prelude-ids.org/libprelude/branches/libprelude-easy-bindings@10293 09c5ec92-17d4-0310-903a-819935f44dba commit 4b37406eb41b24e437e9c8a16c5104757c606be4 Author: yoann Date: Tue Feb 26 13:45:28 2008 +0000 Implement ToString() method, used by operator std::string(). git-svn-id: https://svn.prelude-ids.org/libprelude/branches/libprelude-easy-bindings@10292 09c5ec92-17d4-0310-903a-819935f44dba commit 8bbcc0691574d01b2c0db26ea7471de30e04e72a Author: yoann Date: Tue Feb 26 12:33:47 2008 +0000 Move language specific stuff to language specific typemaps. Kill most Swig warnings. Corrected implementation of Perl listed IDMEFValue retrieval. git-svn-id: https://svn.prelude-ids.org/libprelude/branches/libprelude-easy-bindings@10291 09c5ec92-17d4-0310-903a-819935f44dba commit dc4588699f60a213283fadc021dfbc9b4c4009b2 Author: yoann Date: Tue Feb 26 12:33:32 2008 +0000 Consistency work on 'const' keyword use. git-svn-id: https://svn.prelude-ids.org/libprelude/branches/libprelude-easy-bindings@10290 09c5ec92-17d4-0310-903a-819935f44dba commit 7b0e628b079c9034fd95437837ddb968b9ca397a Author: yoann Date: Tue Feb 26 12:33:23 2008 +0000 Fix a bug that prevented generation of Python swig generated code to be triggered in case easy_python.i changed. git-svn-id: https://svn.prelude-ids.org/libprelude/branches/libprelude-easy-bindings@10289 09c5ec92-17d4-0310-903a-819935f44dba commit 66a091afbdf721614b319e944d725c5c67682b80 Author: yoann Date: Mon Feb 25 17:11:35 2008 +0000 Update connection list on GetConnectionList(), since the list might have been updated in the backend. git-svn-id: https://svn.prelude-ids.org/libprelude/branches/libprelude-easy-bindings@10288 09c5ec92-17d4-0310-903a-819935f44dba commit fb24d374a0931a4a7e68bfad858526af334077d7 Author: yoann Date: Mon Feb 25 17:11:22 2008 +0000 Fix compilation error with certain GCC version. git-svn-id: https://svn.prelude-ids.org/libprelude/branches/libprelude-easy-bindings@10287 09c5ec92-17d4-0310-903a-819935f44dba commit a76483c397db41e2dae266f3aa357d7449392712 Author: yoann Date: Mon Feb 25 17:11:13 2008 +0000 Make _profile member accessible from the Client class. git-svn-id: https://svn.prelude-ids.org/libprelude/branches/libprelude-easy-bindings@10286 09c5ec92-17d4-0310-903a-819935f44dba commit beb77a02331b4fb2e59c45e731dc49cd8f3e22c1 Author: yoann Date: Mon Feb 25 17:11:10 2008 +0000 Make the Client class inherit from ClientProfile. Additionally, update the profile on Init() method call. git-svn-id: https://svn.prelude-ids.org/libprelude/branches/libprelude-easy-bindings@10285 09c5ec92-17d4-0310-903a-819935f44dba commit 79012e82948129655c6576472924542737048018 Author: yoann Date: Mon Feb 25 17:11:04 2008 +0000 Add missing include file dependencies. git-svn-id: https://svn.prelude-ids.org/libprelude/branches/libprelude-easy-bindings@10284 09c5ec92-17d4-0310-903a-819935f44dba commit c7fe144077b04b26a4d553ba3a4f64026774e99a Author: yoann Date: Mon Feb 25 16:29:55 2008 +0000 Use redirection operator. git-svn-id: https://svn.prelude-ids.org/libprelude/branches/libprelude-easy-bindings@10283 09c5ec92-17d4-0310-903a-819935f44dba commit 2636216438a99c3b2f571a2cacdd49d15d848d63 Author: yoann Date: Mon Feb 25 16:07:44 2008 +0000 Implement LUA and Ruby bindings. All bindings now feature retrieval of listed IDMEFValue (except Perl, still having problem). git-svn-id: https://svn.prelude-ids.org/libprelude/branches/libprelude-easy-bindings@10282 09c5ec92-17d4-0310-903a-819935f44dba commit ae2579b5e2f8841eeb6a261e42cf158927773d2d Author: yoann Date: Sat Feb 23 10:32:21 2008 +0000 Fix undefined reference. git-svn-id: https://svn.prelude-ids.org/libprelude/branches/libprelude-easy-bindings@10281 09c5ec92-17d4-0310-903a-819935f44dba commit 35218bd73c529383676045cce0edadf13e5426d5 Author: yoann Date: Sat Feb 23 10:28:30 2008 +0000 More work on automatic cast, remove old accessors. git-svn-id: https://svn.prelude-ids.org/libprelude/branches/libprelude-easy-bindings@10280 09c5ec92-17d4-0310-903a-819935f44dba commit 7b9da50d9cc76d18881e05a79f3e2559b2c9f2a9 Author: yoann Date: Sat Feb 23 10:28:24 2008 +0000 More automatic cast. git-svn-id: https://svn.prelude-ids.org/libprelude/branches/libprelude-easy-bindings@10279 09c5ec92-17d4-0310-903a-819935f44dba commit 85dbe62ffee478c8de6f244c54a38d88ccf980f1 Author: yoann Date: Sat Feb 23 10:28:20 2008 +0000 Fix broken overload for AddConnection() method. git-svn-id: https://svn.prelude-ids.org/libprelude/branches/libprelude-easy-bindings@10278 09c5ec92-17d4-0310-903a-819935f44dba commit 5f0e8157dfad4af4a36d36b290b6789603dea083 Author: yoann Date: Sat Feb 23 10:28:16 2008 +0000 Implement some missing methods. git-svn-id: https://svn.prelude-ids.org/libprelude/branches/libprelude-easy-bindings@10277 09c5ec92-17d4-0310-903a-819935f44dba commit 5423ff98e93d229285a2bd97ee87045ea02d6774 Author: yoann Date: Sat Feb 23 10:28:12 2008 +0000 Rewrite bindings for prelude-connection-pool. git-svn-id: https://svn.prelude-ids.org/libprelude/branches/libprelude-easy-bindings@10276 09c5ec92-17d4-0310-903a-819935f44dba commit 2a6ea017255b68ccdaa718a8081400f1b2f39463 Author: yoann Date: Sat Feb 23 10:28:08 2008 +0000 Automatic cast to prelude_connection_t. git-svn-id: https://svn.prelude-ids.org/libprelude/branches/libprelude-easy-bindings@10275 09c5ec92-17d4-0310-903a-819935f44dba commit a2a2b6f90cf2a4cfb039658aa6a24825efbd7a02 Author: yoann Date: Sat Feb 23 10:28:04 2008 +0000 Add the Connection class, bindings for prelude-connection. git-svn-id: https://svn.prelude-ids.org/libprelude/branches/libprelude-easy-bindings@10274 09c5ec92-17d4-0310-903a-819935f44dba commit 432449b32b55ea0122f4d25bab53697b6fc6177d Author: yoann Date: Sat Feb 23 10:27:59 2008 +0000 Code cleanup, Start() has to be called by the user. git-svn-id: https://svn.prelude-ids.org/libprelude/branches/libprelude-easy-bindings@10273 09c5ec92-17d4-0310-903a-819935f44dba commit 5443ae8805123934e64b428da8ac4cd0b9385734 Author: yoann Date: Sat Feb 23 10:27:27 2008 +0000 Support copying of IDMEF object. git-svn-id: https://svn.prelude-ids.org/libprelude/branches/libprelude-easy-bindings@10272 09c5ec92-17d4-0310-903a-819935f44dba commit 589c766e6377a494580922c0694f19381847940c Author: yoann Date: Fri Feb 22 15:10:34 2008 +0000 Minor cleanup, add << and >> operator to IDMEF and Client class: - client << idmef - idmef >> client git-svn-id: https://svn.prelude-ids.org/libprelude/branches/libprelude-easy-bindings@10271 09c5ec92-17d4-0310-903a-819935f44dba commit 1b9eb6a1e4aa742d4aa4b58ea5f13466290a9bd7 Author: yoann Date: Fri Feb 22 15:10:11 2008 +0000 Publicly inherit Prelude::Client, remove SendIDMEF method, use the parent method. Add code to handle option message on RecvIDMEF(). git-svn-id: https://svn.prelude-ids.org/libprelude/branches/libprelude-easy-bindings@10270 09c5ec92-17d4-0310-903a-819935f44dba commit 6e95a8d968aefa2bcc3120abf879a97fff70b031 Author: yoann Date: Fri Feb 22 15:09:35 2008 +0000 Add a new constructor, taking the profile name as argument, and a GetClientProfile() method. git-svn-id: https://svn.prelude-ids.org/libprelude/branches/libprelude-easy-bindings@10269 09c5ec92-17d4-0310-903a-819935f44dba commit 19b9975ca0d09fc37d668fbc8ed4528593d8f8bf Author: yoann Date: Thu Feb 21 16:19:39 2008 +0000 Encapsulate every class into the Prelude namespace. git-svn-id: https://svn.prelude-ids.org/libprelude/branches/libprelude-easy-bindings@10268 09c5ec92-17d4-0310-903a-819935f44dba commit ae97c8a59c9f5e747e111e9c3f55eafd9ab7be48 Author: yoann Date: Thu Feb 21 14:20:44 2008 +0000 Exception class improvements. git-svn-id: https://svn.prelude-ids.org/libprelude/branches/libprelude-easy-bindings@10267 09c5ec92-17d4-0310-903a-819935f44dba commit 6a7f345af76fa53b4d4d5b2f8ea43ea311292b89 Author: yoann Date: Thu Feb 21 13:44:22 2008 +0000 Update test. git-svn-id: https://svn.prelude-ids.org/libprelude/branches/libprelude-easy-bindings@10266 09c5ec92-17d4-0310-903a-819935f44dba commit 4c73f94695f1ec4071848491080a155ff66d5be6 Author: yoann Date: Thu Feb 21 13:44:18 2008 +0000 Update.. git-svn-id: https://svn.prelude-ids.org/libprelude/branches/libprelude-easy-bindings@10265 09c5ec92-17d4-0310-903a-819935f44dba commit 9ba90b2f7f721894ab6b08e786426e6f4917aa1b Author: yoann Date: Thu Feb 21 13:40:42 2008 +0000 Do not try to send a final heartbeat on prelude_client_destroy() if the client object was not at least at the starting status (fix possible assertion on destroy). git-svn-id: https://svn.prelude-ids.org/libprelude/branches/libprelude-easy-bindings@10264 09c5ec92-17d4-0310-903a-819935f44dba commit bed1239acff5e297006a9cc690da276e0eff77a4 Author: yoann Date: Thu Feb 21 13:10:24 2008 +0000 Implement ClientEasy() class, inheriting from the Client() class, and allowing easy implementation of a Prelude client. git-svn-id: https://svn.prelude-ids.org/libprelude/branches/libprelude-easy-bindings@10262 09c5ec92-17d4-0310-903a-819935f44dba commit f458c885e6fb501431f9353bdf9759814240b9e5 Author: yoann Date: Thu Feb 21 13:10:19 2008 +0000 Don't provide any helper in Client() bindings to PreludeClient, wrap the interface in a strict fashion. git-svn-id: https://svn.prelude-ids.org/libprelude/branches/libprelude-easy-bindings@10261 09c5ec92-17d4-0310-903a-819935f44dba commit 1e318df2e70939c2ddf73d4a31589accebd41868 Author: yoann Date: Thu Feb 21 11:41:19 2008 +0000 Introduce prelude_msg_get_message_data(), that provide access to the whole message buffer. Modify IDMEF class so that it make use of this function in order to write a message to an ofstream. git-svn-id: https://svn.prelude-ids.org/libprelude/branches/libprelude-easy-bindings@10260 09c5ec92-17d4-0310-903a-819935f44dba commit 1e519edf7fe0cb83680b826c39e9373d13d6dc55 Author: yoann Date: Wed Feb 20 17:58:37 2008 +0000 Major rework, IDMEFValue is not returned as a pointer anymore. Reference to low level idmef_value_t are handled cleanly. The C++ code for retrieving listed idmef-value is in place. Major IDMEF class rework, implement << and >> operator on ofstream and ifstream. git-svn-id: https://svn.prelude-ids.org/libprelude/branches/libprelude-easy-bindings@10259 09c5ec92-17d4-0310-903a-819935f44dba commit 3d55ee0345ff115b436b658de49bbd95addc4ffa Author: yoann Date: Wed Feb 20 17:39:18 2008 +0000 Cleanup. git-svn-id: https://svn.prelude-ids.org/libprelude/branches/libprelude-easy-bindings@10258 09c5ec92-17d4-0310-903a-819935f44dba commit aca082c7b81cdea41ba0e5b3567391c6aab88f8f Author: yoann Date: Wed Feb 20 16:32:45 2008 +0000 Whitespace police. git-svn-id: https://svn.prelude-ids.org/libprelude/branches/libprelude-easy-bindings@10257 09c5ec92-17d4-0310-903a-819935f44dba commit 9976f32f03a6db186a5ef502e40cfaa16381bc8a Author: yoann Date: Wed Feb 20 09:39:09 2008 +0000 [PATCH] Allow user to associate it's own callback function to a prelude_io_t object. Implement: - prelude_io_set_write_callback() - prelude_io_set_read_callback() - prelude_io_set_pending_callback() - prelude_io_set_fdptr(). git-svn-id: https://svn.prelude-ids.org/libprelude/branches/libprelude-easy-bindings@10255 09c5ec92-17d4-0310-903a-819935f44dba commit d53df1f86ca276041adcdf5c6cc0556b4bd32ace Author: yoann Date: Wed Feb 20 09:20:32 2008 +0000 Fix string translation of IDMEF_CRITERION_OPERATOR_(NOT_)NULL to string. Remove gratuitous space insertion when dumping criteria. git-svn-id: https://svn.prelude-ids.org/libprelude/branches/libprelude-easy-bindings@10253 09c5ec92-17d4-0310-903a-819935f44dba commit 1543baddabb6e2eb65fdfe63914d67ef355b503d Author: yoann Date: Wed Feb 20 09:20:23 2008 +0000 Whitespace police. git-svn-id: https://svn.prelude-ids.org/libprelude/branches/libprelude-easy-bindings@10252 09c5ec92-17d4-0310-903a-819935f44dba commit ecbfde59ff580c6499405c090d4f3b6547a6175c Author: yoann Date: Wed Feb 20 09:20:18 2008 +0000 In case of invalid enumeration value, print . git-svn-id: https://svn.prelude-ids.org/libprelude/branches/libprelude-easy-bindings@10251 09c5ec92-17d4-0310-903a-819935f44dba commit bb0db770a8b3c044490ebdd2336dde7e9333c859 Author: yoann Date: Wed Feb 20 09:20:14 2008 +0000 (bindings): for functions returning pointers to integers, dereference the pointer and return either the integer, or the native equivalent to NULL (None for Python, undef for Perl). git-svn-id: https://svn.prelude-ids.org/libprelude/branches/libprelude-easy-bindings@10250 09c5ec92-17d4-0310-903a-819935f44dba commit 302083efd0879aff28d62b3dfcd519480de1c718 Author: yoann Date: Wed Feb 20 09:19:59 2008 +0000 Update NEWS, bump version number. git-svn-id: https://svn.prelude-ids.org/libprelude/branches/libprelude-easy-bindings@10249 09c5ec92-17d4-0310-903a-819935f44dba commit db00d5721d4b26dd62a25340c3c6706605f1bbee Author: yoann Date: Wed Feb 20 09:19:46 2008 +0000 Update GnuLib code. git-svn-id: https://svn.prelude-ids.org/libprelude/branches/libprelude-easy-bindings@10248 09c5ec92-17d4-0310-903a-819935f44dba commit 70d612feda3534fa40a15ce359b9305c284ded2a Author: yoann Date: Wed Feb 20 09:19:17 2008 +0000 SWIG bindings: add typemaps to arguments of *_get_next* functions, to allow NULL arguments, which are forbidden by default by SWIG (Fix #269) git-svn-id: https://svn.prelude-ids.org/libprelude/branches/libprelude-easy-bindings@10247 09c5ec92-17d4-0310-903a-819935f44dba commit 7fdec558ecc252a3421922f9cced4cbe9f3cd92a Author: yoann Date: Wed Feb 20 09:19:12 2008 +0000 FreeBSD compilation fix. git-svn-id: https://svn.prelude-ids.org/libprelude/branches/libprelude-easy-bindings@10246 09c5ec92-17d4-0310-903a-819935f44dba commit 62473da95bddc6916a0ecb8a26354d2e32968b05 Author: yoann Date: Wed Feb 20 09:18:57 2008 +0000 Whitespace police. git-svn-id: https://svn.prelude-ids.org/libprelude/branches/libprelude-easy-bindings@10245 09c5ec92-17d4-0310-903a-819935f44dba commit 0acb1e511dacc9e0e46083184ab3bd4125f7b2ef Author: yoann Date: Wed Feb 20 09:18:52 2008 +0000 Update to newer acx_pthread.m4 git-svn-id: https://svn.prelude-ids.org/libprelude/branches/libprelude-easy-bindings@10244 09c5ec92-17d4-0310-903a-819935f44dba commit f6fde960b5dc523763084cc32f549d0a9d908d1c Author: yoann Date: Wed Feb 20 09:18:41 2008 +0000 Solaris warnings fixes. git-svn-id: https://svn.prelude-ids.org/libprelude/branches/libprelude-easy-bindings@10243 09c5ec92-17d4-0310-903a-819935f44dba commit 5925b970e442bf769c7821e2a1ff294d38c2daa6 Author: yoann Date: Wed Feb 20 09:18:29 2008 +0000 Update NEWS, bump version number. git-svn-id: https://svn.prelude-ids.org/libprelude/branches/libprelude-easy-bindings@10242 09c5ec92-17d4-0310-903a-819935f44dba commit d15000d45ebf673bb7eda8fb0d79f764f3a6cc70 Author: yoann Date: Wed Feb 20 09:18:10 2008 +0000 Avoid warning while generating the documentation due to change in the way we named function argument for auto generated IDMEF functions. git-svn-id: https://svn.prelude-ids.org/libprelude/branches/libprelude-easy-bindings@10241 09c5ec92-17d4-0310-903a-819935f44dba commit 1d887995620714dc70e29c09fd9da027d78a49c2 Author: yoann Date: Wed Feb 20 09:17:39 2008 +0000 Update GnuLib code. git-svn-id: https://svn.prelude-ids.org/libprelude/branches/libprelude-easy-bindings@10240 09c5ec92-17d4-0310-903a-819935f44dba commit 5629a11e5cc932eb9c4acea90f3967fb2f96eade Author: yoann Date: Wed Feb 20 09:16:52 2008 +0000 Improve error message in case of locking error. git-svn-id: https://svn.prelude-ids.org/libprelude/branches/libprelude-easy-bindings@10239 09c5ec92-17d4-0310-903a-819935f44dba commit f3c4b7f5ab1828f4249d0db60efd762e95a39609 Author: yoann Date: Wed Feb 20 09:16:36 2008 +0000 Fix invalid use of 'GNUTLS_X509_CRT_LIST_IMPORT_FAIL_IF_EXCEED' with early GnuTLS version (close #268). git-svn-id: https://svn.prelude-ids.org/libprelude/branches/libprelude-easy-bindings@10238 09c5ec92-17d4-0310-903a-819935f44dba commit 1c508db0b07346390bd7b75bfce6a3c0e646b467 Author: yoann Date: Wed Feb 20 09:16:18 2008 +0000 Small improvement to the way pthread_cond_timedwait() absolute time is computed. git-svn-id: https://svn.prelude-ids.org/libprelude/branches/libprelude-easy-bindings@10237 09c5ec92-17d4-0310-903a-819935f44dba commit 23601dc70afb42daebf2e021314046804a18bc70 Author: yoann Date: Wed Feb 20 09:15:56 2008 +0000 Send heartbeat as high priority message. It is important that heartbeat are delivred in time, since they give indication about the health of the system. git-svn-id: https://svn.prelude-ids.org/libprelude/branches/libprelude-easy-bindings@10236 09c5ec92-17d4-0310-903a-819935f44dba commit 05a8c3c98aca5d4c8f104a37fe076fc21849541b Author: yoann Date: Wed Feb 20 09:15:44 2008 +0000 Whitespace police. git-svn-id: https://svn.prelude-ids.org/libprelude/branches/libprelude-easy-bindings@10235 09c5ec92-17d4-0310-903a-819935f44dba commit 22c91712a43a79df5c4687cdd62777f86d8f7270 Author: yoann Date: Wed Feb 20 09:15:22 2008 +0000 Patch from Pierre Chifflier to propagate CC variable when building bindings (fix #264). git-svn-id: https://svn.prelude-ids.org/libprelude/branches/libprelude-easy-bindings@10234 09c5ec92-17d4-0310-903a-819935f44dba commit e8dca7863e99cd34e677b1b4ca71a249c7b52bef Author: yoann Date: Wed Feb 20 09:15:17 2008 +0000 (enhancement): Improving assertion messages by separating variables check git-svn-id: https://svn.prelude-ids.org/libprelude/branches/libprelude-easy-bindings@10233 09c5ec92-17d4-0310-903a-819935f44dba commit 07fb53105b257b616fe24ca35776bfb9170794eb Author: yoann Date: Wed Feb 20 09:15:06 2008 +0000 (bugfix): This assert should check the two values git-svn-id: https://svn.prelude-ids.org/libprelude/branches/libprelude-easy-bindings@10232 09c5ec92-17d4-0310-903a-819935f44dba commit e05e1058d8b0790c031b2cd779d94389f3f9feb4 Author: yoann Date: Wed Feb 20 09:14:55 2008 +0000 (enhancement): Improving assertion messages by separating variables check git-svn-id: https://svn.prelude-ids.org/libprelude/branches/libprelude-easy-bindings@10231 09c5ec92-17d4-0310-903a-819935f44dba commit 0ec128392085e0fc39f2a899b443aebf54f6e5ec Author: yoann Date: Wed Feb 20 09:14:38 2008 +0000 Directory creation permissions fixes. Specify our own umask() before creating any profile with prelude-admin, so that the created group will always have the correct permissions. Make the profile backup directory group writable. The profile directory itself remain group readable. git-svn-id: https://svn.prelude-ids.org/libprelude/branches/libprelude-easy-bindings@10230 09c5ec92-17d4-0310-903a-819935f44dba commit 56d3f8ac32591f21ab3f2f63fa4624bf2a656e3f Author: yoann Date: Wed Feb 20 09:14:31 2008 +0000 Revert "Mask group write / other all permissions before creating any files." This reverts commit b0ce0a5e2a7604c9062fd463a37e4999a375994e. git-svn-id: https://svn.prelude-ids.org/libprelude/branches/libprelude-easy-bindings@10229 09c5ec92-17d4-0310-903a-819935f44dba commit 83dfab83c76cc63bfdfcee4fd18e523f098fb027 Author: yoann Date: Wed Feb 20 09:14:23 2008 +0000 Mask group write / other all permissions before creating any files. git-svn-id: https://svn.prelude-ids.org/libprelude/branches/libprelude-easy-bindings@10228 09c5ec92-17d4-0310-903a-819935f44dba commit 1f908d3d52e5fd0003787fa498fe9fecaf6bec08 Author: yoann Date: Wed Feb 20 08:56:40 2008 +0000 (enhancement): Improving assertion messages by separating variables check git-svn-id: https://svn.prelude-ids.org/libprelude/branches/libprelude-easy-bindings@10227 09c5ec92-17d4-0310-903a-819935f44dba commit 7140f4558b9bfc42a5acba83e806dc465c08a223 Author: yoann Date: Wed Feb 20 08:56:30 2008 +0000 Set appropriate umask() before creating failover files. Additionally set the failover file group writable. git-svn-id: https://svn.prelude-ids.org/libprelude/branches/libprelude-easy-bindings@10226 09c5ec92-17d4-0310-903a-819935f44dba commit e209631acf282f618a0dadf9f3b7b7d35ef8c74a Author: yoann Date: Wed Feb 20 08:56:21 2008 +0000 Directory creation permissions fixes. Specify our own umask() before creating any profile with prelude-admin, so that the created group will always have the correct permissions. Make the profile backup directory group writable. The profile directory itself remain group readable. git-svn-id: https://svn.prelude-ids.org/libprelude/branches/libprelude-easy-bindings@10225 09c5ec92-17d4-0310-903a-819935f44dba commit 82d36bbaa70c7b6c0df59f4f92d5efd51c95a34b Author: yoann Date: Wed Feb 20 08:56:12 2008 +0000 Revert "Mask group write / other all permissions before creating any files." This reverts commit b0ce0a5e2a7604c9062fd463a37e4999a375994e. git-svn-id: https://svn.prelude-ids.org/libprelude/branches/libprelude-easy-bindings@10224 09c5ec92-17d4-0310-903a-819935f44dba commit c60ad49214494877d0bb601aa002aeaace4b5924 Author: yoann Date: Wed Feb 20 08:56:07 2008 +0000 Mask group write / other all permissions before creating any files. git-svn-id: https://svn.prelude-ids.org/libprelude/branches/libprelude-easy-bindings@10223 09c5ec92-17d4-0310-903a-819935f44dba commit 559eafb13ac1e1f2eab83d5be4d2c6f15bd6b2cb Author: yoann Date: Wed Feb 20 08:55:57 2008 +0000 Correctly format "send" command help output. git-svn-id: https://svn.prelude-ids.org/libprelude/branches/libprelude-easy-bindings@10222 09c5ec92-17d4-0310-903a-819935f44dba commit 766913b62ab9f1ca00e89b924e7af56f36b44b01 Author: yoann Date: Wed Feb 20 08:52:43 2008 +0000 (fix): when the analyzer has a white space in its name git-svn-id: https://svn.prelude-ids.org/libprelude/branches/libprelude-easy-bindings@10221 09c5ec92-17d4-0310-903a-819935f44dba commit 0417cf36fd9a9a4e4121a576ac675c9f8a919061 Author: yoann Date: Wed Feb 20 08:50:09 2008 +0000 Constructor taking the native C type as argument now take an optional own_data integer (default to FALSE). git-svn-id: https://svn.prelude-ids.org/libprelude/branches/libprelude-easy-bindings@10220 09c5ec92-17d4-0310-903a-819935f44dba commit 7df8222ee5e4154ca00123c645bf2b6985bbd5f6 Author: yoann Date: Wed Feb 20 08:50:04 2008 +0000 Remove Clone() and Copy() method, that are now handled by specialized operator. Add the necessary operator for time comparison. git-svn-id: https://svn.prelude-ids.org/libprelude/branches/libprelude-easy-bindings@10219 09c5ec92-17d4-0310-903a-819935f44dba commit bf5ce9a85f1d86cdd26df7e82d9f1643e61258ac Author: yoann Date: Wed Feb 20 08:49:59 2008 +0000 Implement ToString() method, add std::string operator. Copy/clone the criteria on object copy. git-svn-id: https://svn.prelude-ids.org/libprelude/branches/libprelude-easy-bindings@10218 09c5ec92-17d4-0310-903a-819935f44dba commit a100f1dbaad6c7c8469d64a93a126d39078e8073 Author: yoann Date: Wed Feb 20 08:49:16 2008 +0000 Avoid undefined reference with bindings. git-svn-id: https://svn.prelude-ids.org/libprelude/branches/libprelude-easy-bindings@10217 09c5ec92-17d4-0310-903a-819935f44dba commit c6f0d771e9c17d5eadeaed936926a96f0df9f5c0 Author: yoann Date: Sat Feb 16 17:37:56 2008 +0000 More idmef-value to 'data' cast fixes. git-svn-id: https://svn.prelude-ids.org/libprelude/branches/libprelude-easy-bindings@10213 09c5ec92-17d4-0310-903a-819935f44dba commit 40450c24c7f1f893287c6046ce3166aaa7f1ec1f Author: yoann Date: Sat Feb 16 14:07:55 2008 +0000 Fix double idmef_time_t free. git-svn-id: https://svn.prelude-ids.org/libprelude/branches/libprelude-easy-bindings@10212 09c5ec92-17d4-0310-903a-819935f44dba commit e61cef469800e50f1e6d369943dc13d6b73a76d2 Author: yoann Date: Sat Feb 16 13:58:48 2008 +0000 Missing idmef-value update for 'data' type cast. git-svn-id: https://svn.prelude-ids.org/libprelude/branches/libprelude-easy-bindings@10211 09c5ec92-17d4-0310-903a-819935f44dba commit 0f16531bfdcfa910f3c0efe6eaa4f5278b193fd5 Author: yoann Date: Sat Feb 16 13:58:44 2008 +0000 Move operator definition where they belong, and properly handle most contained idmef_value_t. git-svn-id: https://svn.prelude-ids.org/libprelude/branches/libprelude-easy-bindings@10210 09c5ec92-17d4-0310-903a-819935f44dba commit 18b14783855ec7c1fa2dcee70faaedf7a296bfbd Author: yoann Date: Sat Feb 16 13:58:39 2008 +0000 Implement prelude_except_if_fail(), improve PreludeError class. git-svn-id: https://svn.prelude-ids.org/libprelude/branches/libprelude-easy-bindings@10209 09c5ec92-17d4-0310-903a-819935f44dba commit 25c9594a8278beebdd746ba96da5b0d0dba16b48 Author: yoann Date: Sat Feb 16 13:58:04 2008 +0000 Attempt to cast the provided value if it not compatible with the path. Until now, if an user tried to set a path of a specific type with an idmef_value_t object containing another type, idmef_path_set() would return an error. We now attempt to cast the user provided idmef_value_t to the path defined value. git-svn-id: https://svn.prelude-ids.org/libprelude/branches/libprelude-easy-bindings@10208 09c5ec92-17d4-0310-903a-819935f44dba commit bef23efc49d837da13d06694d89693fab59d34be Author: yoann Date: Sat Feb 16 13:25:45 2008 +0000 Allow casting idmef_value_t to an idmef_value_t of another type. This provide a set of enhancements to the idmef-value interface: - idmef_value_set() function for every idmef-value type. - _idmef_value_cast() to convert the given idmef_value_t, to the provided idmef_value_type_id_t argument. - Refactor some code. git-svn-id: https://svn.prelude-ids.org/libprelude/branches/libprelude-easy-bindings@10207 09c5ec92-17d4-0310-903a-819935f44dba commit 8264ef2b9bd6b977e5be8c6b0de6a7976da9d557 Author: yoann Date: Fri Feb 15 09:07:21 2008 +0000 Improved error message, in case no compatible data is found. git-svn-id: https://svn.prelude-ids.org/libprelude/branches/libprelude-easy-bindings@10206 09c5ec92-17d4-0310-903a-819935f44dba commit e528bca7469b7b0c32830bdce4cd629fd4532d91 Author: yoann Date: Fri Feb 15 09:07:13 2008 +0000 Declare optional arguments in the IDMEFPath header. git-svn-id: https://svn.prelude-ids.org/libprelude/branches/libprelude-easy-bindings@10205 09c5ec92-17d4-0310-903a-819935f44dba commit e2a0ea9ab1054aaaeafce89a10d0c3aa1e2cb59e Author: yoann Date: Fri Feb 15 09:07:04 2008 +0000 Ability to set IDMEFTime object. git-svn-id: https://svn.prelude-ids.org/libprelude/branches/libprelude-easy-bindings@10204 09c5ec92-17d4-0310-903a-819935f44dba commit b1b140076356c3aa708ff3adb607810b5a24a5b1 Author: yoann Date: Fri Feb 15 09:06:59 2008 +0000 Handle Get() for value of type data. git-svn-id: https://svn.prelude-ids.org/libprelude/branches/libprelude-easy-bindings@10203 09c5ec92-17d4-0310-903a-819935f44dba commit b1771660acfd3436f0f74a4a6a5e4cc4609d715e Author: yoann Date: Fri Feb 15 09:06:52 2008 +0000 Detailled error message in case of unsupported value. git-svn-id: https://svn.prelude-ids.org/libprelude/branches/libprelude-easy-bindings@10202 09c5ec92-17d4-0310-903a-819935f44dba commit 459907eb014bc1678dfd74824ef3724cbfd12d18 Author: yoann Date: Thu Feb 14 17:00:31 2008 +0000 Provide the ability to specify our own PreludeError() message. git-svn-id: https://svn.prelude-ids.org/libprelude/branches/libprelude-easy-bindings@10201 09c5ec92-17d4-0310-903a-819935f44dba commit dfae951a38633c4efd5925ee0460042dddcd7920 Author: yoann Date: Thu Feb 14 17:00:18 2008 +0000 Compile c++ before low-level bindings. git-svn-id: https://svn.prelude-ids.org/libprelude/branches/libprelude-easy-bindings@10200 09c5ec92-17d4-0310-903a-819935f44dba commit c6f130d24a4446941ffc4744426d6709eef7d949 Author: yoann Date: Thu Feb 14 17:00:11 2008 +0000 More detailed error messages, bind IDMEFTime operator. git-svn-id: https://svn.prelude-ids.org/libprelude/branches/libprelude-easy-bindings@10199 09c5ec92-17d4-0310-903a-819935f44dba commit 67ac54e4dd487738026e7ee5d8e29a9976a643db Author: yoann Date: Thu Feb 14 16:58:42 2008 +0000 Implement int, long, double, and std::string operator for IDMEFTime. git-svn-id: https://svn.prelude-ids.org/libprelude/branches/libprelude-easy-bindings@10198 09c5ec92-17d4-0310-903a-819935f44dba commit 03b385ddeebb4cd05083e980aa1d2f0449a4f79c Author: yoann Date: Thu Feb 14 10:00:16 2008 +0000 Handle IDMEFTime * return from Get() method. git-svn-id: https://svn.prelude-ids.org/libprelude/branches/libprelude-easy-bindings@10197 09c5ec92-17d4-0310-903a-819935f44dba commit 896776f2788d09fea9602de86887f3c5777be24b Author: yoann Date: Thu Feb 14 08:54:09 2008 +0000 Return undef/None when required, and handle a Perl specific issue where returned values would always be undef. git-svn-id: https://svn.prelude-ids.org/libprelude/branches/libprelude-easy-bindings@10196 09c5ec92-17d4-0310-903a-819935f44dba commit c90879076c4371cbfb2453a7990c57326fbf058e Author: yoann Date: Thu Feb 14 08:49:03 2008 +0000 Continued work on idmef-tree-wrap.hxx auto-generation. git-svn-id: https://svn.prelude-ids.org/libprelude/branches/libprelude-easy-bindings@10195 09c5ec92-17d4-0310-903a-819935f44dba commit 5fbf3c51a350e0e78e192e665ad3765fcfd9ab97 Author: yoann Date: Thu Feb 14 08:16:31 2008 +0000 Map prelude low-level datatype to type understood by Swig. Additionally, check that IDMEFValue pointer is not NULL in the IDMEFValue * typemap. git-svn-id: https://svn.prelude-ids.org/libprelude/branches/libprelude-easy-bindings@10194 09c5ec92-17d4-0310-903a-819935f44dba commit b3b93701d598c8b214e5191e99a611bb6bc11763 Author: yoann Date: Thu Feb 14 08:16:27 2008 +0000 Perl headers define a Copy() macro that conflict with our Copy methods, this should fix the compilation problem. git-svn-id: https://svn.prelude-ids.org/libprelude/branches/libprelude-easy-bindings@10193 09c5ec92-17d4-0310-903a-819935f44dba commit 0a7a09766235043aafa4e311e845bb9dff701fbd Author: yoann Date: Thu Feb 14 08:16:23 2008 +0000 Avoid undefined reference in perl/python bindings. git-svn-id: https://svn.prelude-ids.org/libprelude/branches/libprelude-easy-bindings@10192 09c5ec92-17d4-0310-903a-819935f44dba commit 5c0cc2d05ed70948703a6e60f38aa903222a9ff2 Author: yoann Date: Thu Feb 14 08:16:01 2008 +0000 Returned IDMEFValue are a pointer again, so we can handle NULL value, which is not an error. Implement missing Set() operator. git-svn-id: https://svn.prelude-ids.org/libprelude/branches/libprelude-easy-bindings@10191 09c5ec92-17d4-0310-903a-819935f44dba commit 6eceff3af6b21dc608fb7e6168854ab75dac1c73 Author: yoann Date: Thu Feb 14 08:15:55 2008 +0000 Implement language independant exception handling. git-svn-id: https://svn.prelude-ids.org/libprelude/branches/libprelude-easy-bindings@10190 09c5ec92-17d4-0310-903a-819935f44dba commit d58032eeb74a85c787ed1f2ba9f6bd98c62e43d1 Author: yoann Date: Thu Feb 14 08:15:50 2008 +0000 Further work on generic exception handling. Implement GetMessage() and GetError() methods. Declare a const char* operator. git-svn-id: https://svn.prelude-ids.org/libprelude/branches/libprelude-easy-bindings@10189 09c5ec92-17d4-0310-903a-819935f44dba commit 1a76e40aa6c706dac7cc44f5f815b5e769c6dfa7 Author: yoann Date: Thu Feb 14 08:13:46 2008 +0000 Do not use prelude_string_get_string_released, since it modify the source string. git-svn-id: https://svn.prelude-ids.org/libprelude/branches/libprelude-easy-bindings@10188 09c5ec92-17d4-0310-903a-819935f44dba commit 21fed04533be391e0cc3117aae7f66f1db0510f4 Author: yoann Date: Mon Feb 11 20:53:39 2008 +0000 New IDMEFTime C++ wrapper, requirement for wrapping IDMEF tree. git-svn-id: https://svn.prelude-ids.org/libprelude/branches/libprelude-easy-bindings@10187 09c5ec92-17d4-0310-903a-819935f44dba commit c7da494c6b0a84cc398c0dec386febe3475b45c9 Author: yoann Date: Mon Feb 11 18:03:47 2008 +0000 More work on wrapping the whole IDMEF tree. Still not functional throught. git-svn-id: https://svn.prelude-ids.org/libprelude/branches/libprelude-easy-bindings@10186 09c5ec92-17d4-0310-903a-819935f44dba commit 60bf274de1de4f9933bea538eafd095db55be2dd Author: yoann Date: Mon Feb 11 16:43:57 2008 +0000 Update low-level bindings directory. git-svn-id: https://svn.prelude-ids.org/libprelude/branches/libprelude-easy-bindings@10185 09c5ec92-17d4-0310-903a-819935f44dba commit e5960c18de5e495e5b5962f814b457211b21e69f Author: yoann Date: Mon Feb 11 16:36:27 2008 +0000 Remove debug spew. git-svn-id: https://svn.prelude-ids.org/libprelude/branches/libprelude-easy-bindings@10184 09c5ec92-17d4-0310-903a-819935f44dba commit 429f1035f437ca3730e1c7274ced41e4ed37e713 Author: yoann Date: Mon Feb 11 16:35:29 2008 +0000 make distcheck fixes. git-svn-id: https://svn.prelude-ids.org/libprelude/branches/libprelude-easy-bindings@10183 09c5ec92-17d4-0310-903a-819935f44dba commit 05a376171f87f57e1aa783d34f583db7fb9b2ab7 Author: yoann Date: Mon Feb 11 15:40:56 2008 +0000 Generate SWIG bindings for idmef-criteria. git-svn-id: https://svn.prelude-ids.org/libprelude/branches/libprelude-easy-bindings@10182 09c5ec92-17d4-0310-903a-819935f44dba commit ceb7792e59ae5ca02f486a1628edfec24e524092 Author: yoann Date: Mon Feb 11 15:30:44 2008 +0000 Add missing copyright notice. git-svn-id: https://svn.prelude-ids.org/libprelude/branches/libprelude-easy-bindings@10181 09c5ec92-17d4-0310-903a-819935f44dba commit 5ab5c174b41cab6dd7754dc60fadaca05dfb9511 Author: yoann Date: Mon Feb 11 15:24:32 2008 +0000 Add idmef-criteria.cxx to the build. git-svn-id: https://svn.prelude-ids.org/libprelude/branches/libprelude-easy-bindings@10180 09c5ec92-17d4-0310-903a-819935f44dba commit 9c7871d2fd27c593bb40f036cda366d587d3cfb2 Author: yoann Date: Mon Feb 11 15:24:28 2008 +0000 C++ bindings for idmef-criteria API. git-svn-id: https://svn.prelude-ids.org/libprelude/branches/libprelude-easy-bindings@10179 09c5ec92-17d4-0310-903a-819935f44dba commit d1cf3fbe828498b5f181b31b9e12e695d84f03d6 Author: yoann Date: Mon Feb 11 15:23:06 2008 +0000 Add missing. git-svn-id: https://svn.prelude-ids.org/libprelude/branches/libprelude-easy-bindings@10178 09c5ec92-17d4-0310-903a-819935f44dba commit 92579fa7afaed39274d58970be79720fe1a7008d Author: yoann Date: Mon Feb 11 15:21:53 2008 +0000 Fix include filename. git-svn-id: https://svn.prelude-ids.org/libprelude/branches/libprelude-easy-bindings@10177 09c5ec92-17d4-0310-903a-819935f44dba commit 03b049598c98fe73e79d1833a0c87ed05eaa6001 Author: yoann Date: Mon Feb 11 14:49:00 2008 +0000 Generate idmef-tree-wrap.hxx within 'bindings/c++/include'. git-svn-id: https://svn.prelude-ids.org/libprelude/branches/libprelude-easy-bindings@10176 09c5ec92-17d4-0310-903a-819935f44dba commit f73f14bd6d8a67956d4876eaa932d9d7e704df92 Author: yoann Date: Mon Feb 11 14:47:12 2008 +0000 Normalize C++ bindings filename, move headers to 'include' subdirectory. git-svn-id: https://svn.prelude-ids.org/libprelude/branches/libprelude-easy-bindings@10175 09c5ec92-17d4-0310-903a-819935f44dba commit eba4e4c4b592635b041e7c6974b8934b0ac8af35 Author: yoann Date: Mon Feb 11 09:24:09 2008 +0000 Apply IDMEFValue typemap to IDMEF::Get(). git-svn-id: https://svn.prelude-ids.org/libprelude/branches/libprelude-easy-bindings@10174 09c5ec92-17d4-0310-903a-819935f44dba commit 5c6ccd058ad4070f377d985606edff2b4715ce77 Author: yoann Date: Mon Feb 11 09:24:00 2008 +0000 Multiple input datatype for IDMEF::Set() git-svn-id: https://svn.prelude-ids.org/libprelude/branches/libprelude-easy-bindings@10173 09c5ec92-17d4-0310-903a-819935f44dba commit 00818054eea2f13e48d2f5c597c4d426437a04ab Author: yoann Date: Mon Feb 11 09:05:07 2008 +0000 Modify IDMEF::Set() and IDMEF::Get() so that they use IDMEFValue. Simplify the code by using the IDMEFPath() API. git-svn-id: https://svn.prelude-ids.org/libprelude/branches/libprelude-easy-bindings@10172 09c5ec92-17d4-0310-903a-819935f44dba commit c91490528bfaaa1859b87b7ec186f00de3d0ab11 Author: yoann Date: Sun Feb 10 18:59:58 2008 +0000 Make IDMEFPath::Get() return a copy of the IDMEFValue object git-svn-id: https://svn.prelude-ids.org/libprelude/branches/libprelude-easy-bindings@10171 09c5ec92-17d4-0310-903a-819935f44dba commit 0a58a8fb88daa10b466baabf8f21d940b3e9c19b Author: pollux Date: Sun Feb 10 18:41:17 2008 +0000 Bindings: set dependencies on c++ headers git-svn-id: https://svn.prelude-ids.org/libprelude/branches/libprelude-easy-bindings@10170 09c5ec92-17d4-0310-903a-819935f44dba commit 83707b695b46fba9a1afb04ed1ecf1021c1fd961 Author: yoann Date: Sun Feb 10 18:33:35 2008 +0000 IDMEFValue::Get() typemap, convert to native language type. git-svn-id: https://svn.prelude-ids.org/libprelude/branches/libprelude-easy-bindings@10169 09c5ec92-17d4-0310-903a-819935f44dba commit d58d1b77f7b4fee7a43643c213ec5e6362055055 Author: yoann Date: Sun Feb 10 18:33:26 2008 +0000 Header update. git-svn-id: https://svn.prelude-ids.org/libprelude/branches/libprelude-easy-bindings@10168 09c5ec92-17d4-0310-903a-819935f44dba commit d7b915743ea758846f4fbe158f7c93feab6a143d Author: yoann Date: Sun Feb 10 18:33:07 2008 +0000 Handle Set() for std::string, char string, and integer. More input type to come (specific integer size, etc). git-svn-id: https://svn.prelude-ids.org/libprelude/branches/libprelude-easy-bindings@10167 09c5ec92-17d4-0310-903a-819935f44dba commit f1a42b6d90ed0ab398acf3fabe259457aa62998a Author: yoann Date: Sun Feb 10 18:32:58 2008 +0000 Implement IDMEFValue->GetType(). git-svn-id: https://svn.prelude-ids.org/libprelude/branches/libprelude-easy-bindings@10166 09c5ec92-17d4-0310-903a-819935f44dba commit 386e2aac6eaa609df5a88ad6610b8c6b5108acc7 Author: pollux Date: Sun Feb 10 18:32:30 2008 +0000 Bindings: do not build easy bindings if the flag was not specified when calling configure. git-svn-id: https://svn.prelude-ids.org/libprelude/branches/libprelude-easy-bindings@10165 09c5ec92-17d4-0310-903a-819935f44dba commit a37cace8b1719d53fd244394f4e16be1d68f6fe0 Author: pollux Date: Sun Feb 10 15:35:12 2008 +0000 Bindings: fix build flags to link perl and python modules to the C++ lib. git-svn-id: https://svn.prelude-ids.org/libprelude/branches/libprelude-easy-bindings@10164 09c5ec92-17d4-0310-903a-819935f44dba commit 342295177a586259f8fad2b7436d66c7045ec898 Author: pollux Date: Sun Feb 10 14:23:39 2008 +0000 Bindings: - include generated files in dist target - remove -noproxy option from swig, this prevent generating the .py file - fix names in python module git-svn-id: https://svn.prelude-ids.org/libprelude/branches/libprelude-easy-bindings@10163 09c5ec92-17d4-0310-903a-819935f44dba commit 0707bdb92f9cf57a15956c6159e239efc4b48ce5 Author: pollux Date: Sun Feb 10 14:12:56 2008 +0000 Bindings: use similar method than low-level bindings to install: - ask autotools to generate a Makefile.PL and setup.py - move swig files to the bindings/ directory, and generate files in proper subdirectory - use perl and python native system to build extensions - make install also uses native system This makes installation work to Prelude Easy bindings. git-svn-id: https://svn.prelude-ids.org/libprelude/branches/libprelude-easy-bindings@10162 09c5ec92-17d4-0310-903a-819935f44dba commit df7120fea947709b51bdce52820a86dc6c93d65f Author: yoann Date: Sat Feb 9 18:05:47 2008 +0000 Generate low-level typemap in the correct bindings directory. Start implementing GenerateIDMEFTreeWrapHxx.pm. Some renaming. git-svn-id: https://svn.prelude-ids.org/libprelude/branches/libprelude-easy-bindings@10161 09c5ec92-17d4-0310-903a-819935f44dba commit e7dc9144db84caa56cf4e1ed748a7595a3ba2d78 Author: yoann Date: Sat Feb 9 17:38:49 2008 +0000 Update Makefile.am and libprelude-easy.i Completly wrap the idmef_path_t API. git-svn-id: https://svn.prelude-ids.org/libprelude/branches/libprelude-easy-bindings@10160 09c5ec92-17d4-0310-903a-819935f44dba commit f321364a5883f04738e3e2852c158dafda38d577 Author: yoann Date: Sat Feb 9 17:36:01 2008 +0000 Start wrapping idmef_value_t interface. Start of PreludeError exception class. git-svn-id: https://svn.prelude-ids.org/libprelude/branches/libprelude-easy-bindings@10159 09c5ec92-17d4-0310-903a-819935f44dba commit ee2765a6e425921aa56ddf0414fe935f7c842b32 Author: yoann Date: Sat Feb 9 17:34:28 2008 +0000 Missing 'extern C' for C++ build. git-svn-id: https://svn.prelude-ids.org/libprelude/branches/libprelude-easy-bindings@10158 09c5ec92-17d4-0310-903a-819935f44dba commit 23dc9b24459a02adc6055d7548e08ac25b111849 Author: yoann Date: Fri Feb 8 12:54:40 2008 +0000 More fixes. git-svn-id: https://svn.prelude-ids.org/libprelude/branches/libprelude-easy-bindings@10156 09c5ec92-17d4-0310-903a-819935f44dba commit bc11cbd77355a63a0a268e642af4a45cf3a00fd7 Author: yoann Date: Fri Feb 8 09:25:42 2008 +0000 More IDMEFTreeWrap C++ bindings work. - Each IDMEF object should get it's own class. - Remove extra code. - Call underlying C function. git-svn-id: https://svn.prelude-ids.org/libprelude/branches/libprelude-easy-bindings@10155 09c5ec92-17d4-0310-903a-819935f44dba commit 832f4b10f4b018340b0b72d55d01558589bd7aaf Author: toady Date: Thu Feb 7 23:31:48 2008 +0000 Start wrapping idmef tree git-svn-id: https://svn.prelude-ids.org/libprelude/branches/libprelude-easy-bindings@10154 09c5ec92-17d4-0310-903a-819935f44dba commit 164445798d393fbc779cfa684527084a81ceb1a9 Author: pollux Date: Tue Feb 5 19:59:09 2008 +0000 Bindings: move swig files into proper directories, and delete swig subdirectory git-svn-id: https://svn.prelude-ids.org/libprelude/branches/libprelude-easy-bindings@10145 09c5ec92-17d4-0310-903a-819935f44dba commit c64d47649390151f05ef7dfa1f041d3dd2fd1211 Author: pollux Date: Fri Feb 1 20:19:54 2008 +0000 (bindings) Add function to get unique message ID git-svn-id: https://svn.prelude-ids.org/libprelude/branches/libprelude-easy-bindings@10139 09c5ec92-17d4-0310-903a-819935f44dba commit 04174e2265c1f2962a7c87f5fbba6181b4135e09 Author: pollux Date: Fri Feb 1 15:54:46 2008 +0000 Remove perl and python code from C++ library. Remove test code from bindings (Fix #276) git-svn-id: https://svn.prelude-ids.org/libprelude/branches/libprelude-easy-bindings@10138 09c5ec92-17d4-0310-903a-819935f44dba commit 4d142ddffbf2f98bbe4bd94a3e4031e9527858d2 Author: pollux Date: Fri Feb 1 11:07:16 2008 +0000 Add configure flag to enable Easy bindings (disabled by default). git-svn-id: https://svn.prelude-ids.org/libprelude/branches/libprelude-easy-bindings@10137 09c5ec92-17d4-0310-903a-819935f44dba commit c4964bf05e65116aade731020255ca6ea83b4514 Author: pollux Date: Fri Feb 1 10:28:01 2008 +0000 Bindings: new directory hierarchy - move traditional bindings to "low-level" - build c++ code as a standalone library (which can be used as a c++ interface to libprelude) - split perl and python code for high-level bindings git-svn-id: https://svn.prelude-ids.org/libprelude/branches/libprelude-easy-bindings@10136 09c5ec92-17d4-0310-903a-819935f44dba commit 57d40e6524d2abecfb81b34e8e5f767ea5c873a0 Author: pollux Date: Wed Jan 30 12:20:33 2008 +0000 Create directories for now bindings tree git-svn-id: https://svn.prelude-ids.org/libprelude/branches/libprelude-easy-bindings@10135 09c5ec92-17d4-0310-903a-819935f44dba commit fb65fedb52c5d623a2a1b4eb7ae06ae874877604 Author: pollux Date: Sat Jan 26 12:45:47 2008 +0000 (bindings): for functions returning pointers to integers, dereference the pointer and return either the integer, or the native equivalent to NULL (None for Python, undef for Perl). (Fix #274) git-svn-id: https://svn.prelude-ids.org/libprelude/branches/libprelude-easy-bindings@10132 09c5ec92-17d4-0310-903a-819935f44dba commit 2f9ce0f14ded7203346551c91642b8e73e72dc45 Author: pollux Date: Tue Jan 22 13:29:41 2008 +0000 Backport r10125 to PreludeEasy branch. git-svn-id: https://svn.prelude-ids.org/libprelude/branches/libprelude-easy-bindings@10126 09c5ec92-17d4-0310-903a-819935f44dba commit fd2eaaf38578d20d7ea026db16ef07259499ef52 Author: pollux Date: Mon Jan 21 19:27:07 2008 +0000 Backport r10123 from trunk: Improve prototype for get_next functions, use _cur as a suffix for the iterative argument (shall be used to special case get_next code using swig typemap, without breaking others functions - refs #269). git-svn-id: https://svn.prelude-ids.org/libprelude/branches/libprelude-easy-bindings@10124 09c5ec92-17d4-0310-903a-819935f44dba commit ccd360b9b2b4bcbe1dee886d2d26cce71a8d3239 Author: toady Date: Mon Jan 14 10:47:54 2008 +0000 Use GvGen to produce nice graphs git-svn-id: https://svn.prelude-ids.org/libprelude/branches/libprelude-easy-bindings@10122 09c5ec92-17d4-0310-903a-819935f44dba commit bb0f7c7a84ba10a65caa7456ec7f408791480f3d Author: toady Date: Thu Jan 3 16:35:45 2008 +0000 Graph alerts using rtg git-svn-id: https://svn.prelude-ids.org/libprelude/branches/libprelude-easy-bindings@10119 09c5ec92-17d4-0310-903a-819935f44dba commit 20b431b84958ccf3968ea6012d7386ecd9e0c459 Author: pollux Date: Wed Nov 28 21:32:42 2007 +0000 Enhancement: allow user to specify alerts directory on command line git-svn-id: https://svn.prelude-ids.org/libprelude/branches/libprelude-easy-bindings@10076 09c5ec92-17d4-0310-903a-819935f44dba commit f146120a0d75d70bb134837718f4f5b593ceb7ad Author: pollux Date: Wed Nov 28 21:27:47 2007 +0000 Small tool to replay alerts git-svn-id: https://svn.prelude-ids.org/libprelude/branches/libprelude-easy-bindings@10075 09c5ec92-17d4-0310-903a-819935f44dba commit 0f027e9c471e2033831c0b3bd6e2d2ab3dbdb585 Author: pollux Date: Wed Nov 28 21:13:16 2007 +0000 New utility to connect to a prelude manager, and save all alerts in files (for replay) git-svn-id: https://svn.prelude-ids.org/libprelude/branches/libprelude-easy-bindings@10074 09c5ec92-17d4-0310-903a-819935f44dba commit ba0cc62057fb910eb42b4a9ff7fff767a6af9572 Author: pollux Date: Sun Nov 25 15:44:46 2007 +0000 Add extern "C" to generators for files idmef-message-{read,write}, so they can be included in C++ files. git-svn-id: https://svn.prelude-ids.org/libprelude/branches/libprelude-easy-bindings@10070 09c5ec92-17d4-0310-903a-819935f44dba commit 213ee9e2392822ff0d32dbfaf3c3187b2ef9e3f8 Author: pollux Date: Sun Nov 25 15:19:55 2007 +0000 Add functions to read/write IDMEF messages to files. git-svn-id: https://svn.prelude-ids.org/libprelude/branches/libprelude-easy-bindings@10069 09c5ec92-17d4-0310-903a-819935f44dba commit 36f877ed8c2243b0fe6d0e46cf7b3c2945253b9a Author: pollux Date: Sun Nov 25 15:17:22 2007 +0000 Export header functions as C (using extern "C") for idmef-message-{read,write} headers, so they can be used in C++ files. git-svn-id: https://svn.prelude-ids.org/libprelude/branches/libprelude-easy-bindings@10068 09c5ec92-17d4-0310-903a-819935f44dba commit 579f7b349baa6d156ae2773c3fe629875a4e2b77 Author: toady Date: Tue Nov 20 16:28:33 2007 +0000 Graph uniques alerts from classification.text git-svn-id: https://svn.prelude-ids.org/libprelude/branches/libprelude-easy-bindings@10063 09c5ec92-17d4-0310-903a-819935f44dba commit e23d1fc48f07f4e0df6121874c2ffbbaad30ac63 Author: toady Date: Tue Nov 20 14:01:54 2007 +0000 Multi-dimensional IDMEF messages plotting using gd git-svn-id: https://svn.prelude-ids.org/libprelude/branches/libprelude-easy-bindings@10062 09c5ec92-17d4-0310-903a-819935f44dba commit eee584c50c3ec244cfe94d2f0162f2c64469bc37 Author: pollux Date: Mon Nov 19 15:19:25 2007 +0000 Better error handling: tell swig to catch exceptions of type (const char*) and use them in constructors and functions. git-svn-id: https://svn.prelude-ids.org/libprelude/branches/libprelude-easy-bindings@10057 09c5ec92-17d4-0310-903a-819935f44dba commit 6971a44d98c897f48ae49ce5a77d0752816a4827 Author: pollux Date: Mon Nov 19 13:34:01 2007 +0000 Suppress CR when waiting for alert git-svn-id: https://svn.prelude-ids.org/libprelude/branches/libprelude-easy-bindings@10056 09c5ec92-17d4-0310-903a-819935f44dba commit 327553459bb94d5a20cab7a5c6c2c200c42c19dc Author: pollux Date: Mon Nov 19 13:28:00 2007 +0000 Dot not try to convert IDMEF value if we do not have one git-svn-id: https://svn.prelude-ids.org/libprelude/branches/libprelude-easy-bindings@10055 09c5ec92-17d4-0310-903a-819935f44dba commit faa412135e33af5ad65de869c07952015df10b63 Author: pollux Date: Mon Nov 19 12:15:58 2007 +0000 Use idmef_value_to_string to convert values git-svn-id: https://svn.prelude-ids.org/libprelude/branches/libprelude-easy-bindings@10054 09c5ec92-17d4-0310-903a-819935f44dba commit 4f7f5994ea44a3d42984cb202e413aeb327c778e Author: toady Date: Mon Nov 19 08:58:33 2007 +0000 ÂGraph IDMEF messages tool git-svn-id: https://svn.prelude-ids.org/libprelude/branches/libprelude-easy-bindings@10053 09c5ec92-17d4-0310-903a-819935f44dba commit 1f213322a64ce9633e538cfb9e48104caf63261f Author: pollux Date: Sat Nov 17 16:02:14 2007 +0000 Remove debug code git-svn-id: https://svn.prelude-ids.org/libprelude/branches/libprelude-easy-bindings@10052 09c5ec92-17d4-0310-903a-819935f44dba commit 7856d807e488bdf9f9ea4bc05b9e4b38d3c1e371 Author: pollux Date: Sat Nov 17 15:58:58 2007 +0000 Add function Get to IDMEF object. git-svn-id: https://svn.prelude-ids.org/libprelude/branches/libprelude-easy-bindings@10051 09c5ec92-17d4-0310-903a-819935f44dba commit a2b117c47218db2c1319c7deed34977eb5145f8c Author: pollux Date: Sat Nov 17 15:25:24 2007 +0000 Implement read of IDMEF messages using polling (and a pool ;) git-svn-id: https://svn.prelude-ids.org/libprelude/branches/libprelude-easy-bindings@10050 09c5ec92-17d4-0310-903a-819935f44dba commit a1d50d8a1958fc6f49654bf661168151d1427b56 Author: pollux Date: Sat Nov 17 13:53:44 2007 +0000 mark file as executable git-svn-id: https://svn.prelude-ids.org/libprelude/branches/libprelude-easy-bindings@10049 09c5ec92-17d4-0310-903a-819935f44dba commit fec825ab328ec7dfad8d49661cdd70ca74b5abce Author: pollux Date: Sat Nov 17 13:42:29 2007 +0000 all paths to test file, and show error when importing if any git-svn-id: https://svn.prelude-ids.org/libprelude/branches/libprelude-easy-bindings@10048 09c5ec92-17d4-0310-903a-819935f44dba commit c0a35c2f063b62e0f277cd7c24f5f87483edc670 Author: toady Date: Fri Nov 16 15:55:02 2007 +0000 Test stuff git-svn-id: https://svn.prelude-ids.org/libprelude/branches/libprelude-easy-bindings@10047 09c5ec92-17d4-0310-903a-819935f44dba commit 62ac443d5a404198ac4dd503a3c2d19c6a3346ff Author: pollux Date: Fri Nov 16 09:18:12 2007 +0000 Display python error if import fails git-svn-id: https://svn.prelude-ids.org/libprelude/branches/libprelude-easy-bindings@10046 09c5ec92-17d4-0310-903a-819935f44dba commit 8c4d94601f19115a3dea030028a90d956a0a7be0 Author: toady Date: Thu Nov 15 16:49:00 2007 +0000 C++ stuff git-svn-id: https://svn.prelude-ids.org/libprelude/branches/libprelude-easy-bindings@10045 09c5ec92-17d4-0310-903a-819935f44dba commit be99e5e0e2f7ce8408efaf66a3922c807fdfdaea Author: toady Date: Thu Nov 15 09:24:46 2007 +0000 Removed useless code (used to print on strerr the idmef message only) git-svn-id: https://svn.prelude-ids.org/libprelude/branches/libprelude-easy-bindings@10044 09c5ec92-17d4-0310-903a-819935f44dba commit c904ad7de41a43628345fabec728e80ea158b88e Author: pollux Date: Wed Nov 14 16:49:06 2007 +0000 Create IDMEF object from prelude alert. Now all we have to do is to run the callback. git-svn-id: https://svn.prelude-ids.org/libprelude/branches/libprelude-easy-bindings@10043 09c5ec92-17d4-0310-903a-819935f44dba commit 6172b059269d23736ce19c78af1367c30804b870 Author: toady Date: Wed Nov 14 16:30:07 2007 +0000 Code to manage pooling git-svn-id: https://svn.prelude-ids.org/libprelude/branches/libprelude-easy-bindings@10042 09c5ec92-17d4-0310-903a-819935f44dba commit db6bdb8efb24742fc37fa1fce0b1dc596c7f51cc Author: pollux Date: Wed Nov 14 15:05:59 2007 +0000 Add support functions to send an IDMEF object to the callback. Trying to build and send the object directly is quite impossible, due to the way SWIG generates and wraps its objects. This problem was solved in a tricky way, by (temporarily) storing the object in memory, and passing a unique id to the callback. The callback can then use it to get the object (which is removed from the array after). git-svn-id: https://svn.prelude-ids.org/libprelude/branches/libprelude-easy-bindings@10041 09c5ec92-17d4-0310-903a-819935f44dba commit da77683d874567fd09bbe29142d6a0477f1e8406 Author: pollux Date: Tue Nov 13 14:59:11 2007 +0000 Tests for callbacks git-svn-id: https://svn.prelude-ids.org/libprelude/branches/libprelude-easy-bindings@10040 09c5ec92-17d4-0310-903a-819935f44dba commit 88dbf76653d56186db78bfa6a5cd3f1e29a29e2a Author: pollux Date: Sun Nov 11 13:18:33 2007 +0000 Proof-of-concept code for calling Perl callbacks from SWIG. git-svn-id: https://svn.prelude-ids.org/libprelude/branches/libprelude-easy-bindings@10038 09c5ec92-17d4-0310-903a-819935f44dba commit 51f6fcbdee9973d07e4951da1132f709768c5c77 Author: pollux Date: Fri Nov 9 10:04:21 2007 +0000 Proof-of-concept code for registering and calling Python callbacks from SWIG code. git-svn-id: https://svn.prelude-ids.org/libprelude/branches/libprelude-easy-bindings@10035 09c5ec92-17d4-0310-903a-819935f44dba commit 921ec9059f783db476af24a4b52adb548ced2246 Author: toady Date: Tue Oct 23 15:00:19 2007 +0000 Preliminary support for prelude connection pool git-svn-id: https://svn.prelude-ids.org/libprelude/branches/libprelude-easy-bindings@10021 09c5ec92-17d4-0310-903a-819935f44dba commit 002dff8cc340ad8d0981e76c63222ebdf3328a87 Author: toady Date: Tue Oct 23 08:35:20 2007 +0000 Python test for easy bindings git-svn-id: https://svn.prelude-ids.org/libprelude/branches/libprelude-easy-bindings@10020 09c5ec92-17d4-0310-903a-819935f44dba commit f02871549cc21fc4b2bf32426e2210c382efb6ff Author: pollux Date: Mon Oct 22 20:02:49 2007 +0000 Move initialization code to module init. git-svn-id: https://svn.prelude-ids.org/libprelude/branches/libprelude-easy-bindings@10019 09c5ec92-17d4-0310-903a-819935f44dba commit 1b1d9dc8c93d80aefd61698f1acc7f413aff1634 Author: toady Date: Mon Oct 22 15:58:15 2007 +0000 (bugfix): Missing initialization and more verbose error messages git-svn-id: https://svn.prelude-ids.org/libprelude/branches/libprelude-easy-bindings@10018 09c5ec92-17d4-0310-903a-819935f44dba commit fe6911eb42e61334cd83c35e077dda185ffab53d Author: pollux Date: Mon Oct 22 14:25:57 2007 +0000 Merge trunk modifications 10014 to 10016 git-svn-id: https://svn.prelude-ids.org/libprelude/branches/libprelude-easy-bindings@10017 09c5ec92-17d4-0310-903a-819935f44dba commit 0288c8737c4e521e773d68cabfce37f522a9498a Author: pollux Date: Sat Oct 20 09:22:36 2007 +0000 * Use local headers (to allow build even if other headers are installed in system paths) * Set default arguments for Client constructor, and allow swig to wrap them * Use prelude_string_set_ref_fast instead of prelude_string_set_constant git-svn-id: https://svn.prelude-ids.org/libprelude/branches/libprelude-easy-bindings@10014 09c5ec92-17d4-0310-903a-819935f44dba commit c3d3552efdb7ebe0db7b36f91c9fa477cdb8b568 Author: pollux Date: Fri Oct 19 14:52:50 2007 +0000 Merge trunk modifications 10006 to 10012 git-svn-id: https://svn.prelude-ids.org/libprelude/branches/libprelude-easy-bindings@10013 09c5ec92-17d4-0310-903a-819935f44dba commit 1452ff2c667fe05bacb9c792a802c2c68d60683e Author: pollux Date: Fri Oct 19 14:02:45 2007 +0000 Merge patches 9998 to 10004 from trunk git-svn-id: https://svn.prelude-ids.org/libprelude/branches/libprelude-easy-bindings@10005 09c5ec92-17d4-0310-903a-819935f44dba commit 9634ab885480c1a863042183764229fd86e36c33 Author: pollux Date: Fri Oct 19 12:10:17 2007 +0000 Add code to setup analyzer informations when creating client git-svn-id: https://svn.prelude-ids.org/libprelude/branches/libprelude-easy-bindings@9997 09c5ec92-17d4-0310-903a-819935f44dba commit b0cd57a74459811f5000ccb8fa7aa3d4c4e3c613 Author: pollux Date: Thu Oct 18 10:10:45 2007 +0000 Fix Makefile for swig generation git-svn-id: https://svn.prelude-ids.org/libprelude/branches/libprelude-easy-bindings@9987 09c5ec92-17d4-0310-903a-819935f44dba commit 4afd50b056ca408749ff7ef61bd2cfb011a58b45 Author: pollux Date: Thu Oct 18 09:58:43 2007 +0000 Remove generated swig files from svn, and ask configure to generate swig makefile git-svn-id: https://svn.prelude-ids.org/libprelude/branches/libprelude-easy-bindings@9986 09c5ec92-17d4-0310-903a-819935f44dba commit f06aa230f18e5725ed641cde08d1d31268efb704 Author: pollux Date: Tue Oct 16 17:30:33 2007 +0000 Prelude::Easy bindings (autotools conf) git-svn-id: https://svn.prelude-ids.org/libprelude/branches/libprelude-easy-bindings@9985 09c5ec92-17d4-0310-903a-819935f44dba commit 3175ff08eecff7f88abe42bb23f168e9598458dd Author: pollux Date: Tue Oct 16 17:29:50 2007 +0000 Prelude::Easy bindings (c++ code) git-svn-id: https://svn.prelude-ids.org/libprelude/branches/libprelude-easy-bindings@9984 09c5ec92-17d4-0310-903a-819935f44dba commit ac462139fa0f448773dd4eda4aba6d6779cbf77e Author: pollux Date: Tue Oct 16 17:28:51 2007 +0000 Prelude::Easy bindings (swig) git-svn-id: https://svn.prelude-ids.org/libprelude/branches/libprelude-easy-bindings@9983 09c5ec92-17d4-0310-903a-819935f44dba commit b9d87377fa44729b6ae3a3184791d2ce57967f46 Author: pollux Date: Mon Oct 8 18:16:35 2007 +0000 Doh ! const char* *is* the correct type ! git-svn-id: https://svn.prelude-ids.org/libprelude/branches/libprelude-easy-bindings@9979 09c5ec92-17d4-0310-903a-819935f44dba commit c0fa12d1abff23c7cd34633ed85d18b47245634b Author: pollux Date: Mon Oct 8 18:11:46 2007 +0000 Change cast from char* to unsigned char*, to be stricter on the conversion git-svn-id: https://svn.prelude-ids.org/libprelude/branches/libprelude-easy-bindings@9978 09c5ec92-17d4-0310-903a-819935f44dba commit 5c689149401a00071cf2025d4159cc268c04ab36 Author: pollux Date: Sun Oct 7 20:30:30 2007 +0000 Conversion from void * to char * needs an explicit cast in c++ git-svn-id: https://svn.prelude-ids.org/libprelude/branches/libprelude-easy-bindings@9974 09c5ec92-17d4-0310-903a-819935f44dba commit 073d0319ccfa6a2b51cfc66a61c988b6ea3103b7 Author: pollux Date: Sun Oct 7 20:16:15 2007 +0000 Conversion from void * to char * needs a cast in c++ git-svn-id: https://svn.prelude-ids.org/libprelude/branches/libprelude-easy-bindings@9973 09c5ec92-17d4-0310-903a-819935f44dba commit d1522aa8ab60310baf7bfedede906ef1ee52df67 Author: pollux Date: Sun Oct 7 20:03:00 2007 +0000 Fix use of c++ keywords in swig wrappers git-svn-id: https://svn.prelude-ids.org/libprelude/branches/libprelude-easy-bindings@9972 09c5ec92-17d4-0310-903a-819935f44dba commit e614b42e00339aaa6651d1e479e1039a3cc208ff Author: pollux Date: Sun Oct 7 19:41:24 2007 +0000 * Allow perl and python bindings to use $CC variable when building This makes build of bindings work correctly when using ccache * Move cleaning of targets in clean-local This does not override standard clean command, and allows building other targets in the same Makefile.am git-svn-id: https://svn.prelude-ids.org/libprelude/branches/libprelude-easy-bindings@9971 09c5ec92-17d4-0310-903a-819935f44dba commit 43aa071d90bc5f01ab08b95dbb202041acb4f400 Author: yoann Date: Fri Oct 5 14:46:53 2007 +0000 Branche libprelude for Pierre Chifflier bindings work: easy libprelude bindings for more languages. git-svn-id: https://svn.prelude-ids.org/libprelude/branches/libprelude-easy-bindings@9969 09c5ec92-17d4-0310-903a-819935f44dba git-svn-id: file:///home/yoann/SVN/libprelude/trunk@10737 09c5ec92-17d4-0310-903a-819935f44dba Makefile.am | 2 +- bindings/Makefile.am | 76 +-- bindings/c++/Makefile.am | 23 + bindings/c++/idmef-criteria.cxx | 155 +++++ bindings/c++/idmef-path.cxx | 351 ++++++++++++ bindings/c++/idmef-time.cxx | 275 +++++++++ bindings/c++/idmef-value.cxx | 443 +++++++++++++++ bindings/c++/idmef.cxx | 286 ++++++++++ bindings/c++/include/Makefile.am | 16 + bindings/c++/include/idmef-criteria.hxx | 57 ++ bindings/c++/include/idmef-path.hxx | 84 +++ bindings/c++/include/idmef-time.hxx | 75 +++ bindings/c++/include/idmef-value.hxx | 80 +++ bindings/c++/include/idmef.hxx | 65 +++ bindings/c++/include/prelude-client-easy.hxx | 28 + bindings/c++/include/prelude-client-profile.hxx | 47 ++ bindings/c++/include/prelude-client.hxx | 74 +++ bindings/c++/include/prelude-connection-pool.hxx | 65 +++ bindings/c++/include/prelude-connection.hxx | 70 +++ bindings/c++/include/prelude-error.hxx | 54 ++ bindings/c++/include/prelude.hxx | 37 ++ bindings/c++/prelude-client-easy.cxx | 53 ++ bindings/c++/prelude-client-profile.cxx | 106 ++++ bindings/c++/prelude-client.cxx | 167 ++++++ bindings/c++/prelude-connection-pool.cxx | 181 ++++++ bindings/c++/prelude-connection.cxx | 177 ++++++ bindings/c++/prelude-error.cxx | 61 ++ bindings/idmef-value-class-mapping.i | 80 --- bindings/libprelude.i | 264 --------- bindings/libprelude_perl.i | 376 ------------ bindings/libprelude_python.i | 509 ----------------- bindings/libpreludecpp-perl.i | 154 +++++ bindings/libpreludecpp.i | 203 +++++++ bindings/low-level/Makefile.am | 51 ++ bindings/low-level/idmef-value-class-mapping.i | 80 +++ bindings/low-level/libprelude.i | 264 +++++++++ bindings/low-level/libprelude_perl.i | 376 ++++++++++++ bindings/low-level/perl/Makefile.PL.in | 45 ++ bindings/low-level/perl/Prelude.pm | 21 + bindings/low-level/python/Makefile.am | 19 + bindings/low-level/python/libprelude-python.i | 509 +++++++++++++++++ bindings/low-level/python/prelude.py | 11 + bindings/low-level/python/setup.py.in | 85 +++ bindings/lua/Makefile.am | 18 + bindings/lua/libpreludecpp-lua.i | 319 +++++++++++ bindings/perl/Makefile.PL.in | 14 +- bindings/perl/Prelude.pm | 21 - bindings/python/Makefile.am | 21 + bindings/python/libpreludecpp-python.i | 159 ++++++ bindings/python/prelude.py | 11 - bindings/python/setup.py.in | 20 +- bindings/ruby/Makefile.am | 19 + bindings/ruby/extconf.rb.in | 14 + bindings/ruby/libpreludecpp-ruby.i | 167 ++++++ bindings/tests/alert_replay.py | 40 ++ bindings/tests/alert_saver.py | 56 ++ bindings/tests/callback.pl | 20 + bindings/tests/callback.py | 23 + bindings/tests/load.py | 16 + bindings/tests/pooling.py | 13 + bindings/tests/save.py | 16 + bindings/tests/send_alert.py | 11 + bindings/tests/test.lua | 45 ++ bindings/tests/test.pl | 45 ++ bindings/tests/test.py | 44 ++ bindings/tests/test.rb | 46 ++ bindings/tools/idmef-path-gd.py | 193 +++++++ bindings/tools/idmef-path-graph.py | 58 ++ bindings/tools/idmef-path-gvgen.py | 89 +++ bindings/tools/idmef-path-rtg.py | 103 ++++ configure.in | 110 +++- libprelude-config.in | 14 +- m4/am_check_python_headers.m4 | 24 + m4/am_path_ruby.m4 | 113 ++++ prelude-admin/prelude-admin.c | 2 +- src/Makefile.am | 1 + src/idmef-criteria.c | 25 + src/idmef-message-helpers.c | 300 ++++++++++ src/idmef-path.c | 8 +- src/idmef-value.c | 508 +++++++++++++++-- src/idmef-wrappers-gen/GenerateIDMEFTreeWrapCxx.pm | 596 ++++++++++++++++++++ src/idmef-wrappers-gen/GenerateIDMEFTreeWrapHxx.pm | 323 +++++++++++ src/idmef-wrappers-gen/generator.pl | 16 +- src/include/Makefile.am | 1 + src/include/idmef-criteria.h | 1 + src/include/idmef-message-helpers.h | 39 ++ src/include/idmef-value.h | 26 + src/include/idmef.h | 1 + src/include/prelude-client.h | 4 + src/include/prelude-connection.h | 4 + src/include/prelude-msg.h | 6 +- src/include/prelude-string.h | 4 +- src/prelude-client.c | 89 +++ src/prelude-connection.c | 25 + src/prelude-msg.c | 16 + 95 files changed, 8593 insertions(+), 1419 deletions(-) commit 52df3657e1c102307865dcf85c05b9f8368d3b9c Author: Yoann Vandoorselaere Date: Thu Jul 24 08:28:37 2008 +0000 If a possible invalid pointer dereference if new_connection() failed in case of unavailable profile. git-svn-id: file:///home/yoann/SVN/libprelude/trunk@10732 09c5ec92-17d4-0310-903a-819935f44dba src/prelude-connection-pool.c | 39 +++++++++++++++++++++------------------ 1 files changed, 21 insertions(+), 18 deletions(-) commit 41b6176bb68ddc54e3ff7ffe263cbf12733e16e8 Author: Yoann Vandoorselaere Date: Mon Jul 21 08:56:23 2008 +0000 Update NEWS, bump version. git-svn-id: file:///home/yoann/SVN/libprelude/trunk@10692 09c5ec92-17d4-0310-903a-819935f44dba NEWS | 12 ++++++++++++ configure.in | 4 ++-- 2 files changed, 14 insertions(+), 2 deletions(-) commit c7aa1dbaa1c62128aedbce55c2e56f579282b61e Author: Yoann Vandoorselaere Date: Mon Jul 21 08:56:19 2008 +0000 Temporarily disable mutex locking while calling event handler, since we really need recursive mutex support for this task. git-svn-id: file:///home/yoann/SVN/libprelude/trunk@10691 09c5ec92-17d4-0310-903a-819935f44dba src/prelude-connection-pool.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) commit de4d5edeee487383366116d92ecf7a14de1b847a Author: Yoann Vandoorselaere Date: Mon Jul 21 08:14:59 2008 +0000 Include time.h for time_t definition, fix #301. git-svn-id: file:///home/yoann/SVN/libprelude/trunk@10690 09c5ec92-17d4-0310-903a-819935f44dba src/include/prelude-timer.h | 12 ++++++++++++ 1 files changed, 12 insertions(+), 0 deletions(-) commit dcd351799a9ad54d4bd1119c0d00c17ff346beb3 Author: Yoann Vandoorselaere Date: Mon Jul 21 08:14:55 2008 +0000 Fix compilation error with GnuTLS < 2.2.0 (fix #302). git-svn-id: file:///home/yoann/SVN/libprelude/trunk@10689 09c5ec92-17d4-0310-903a-819935f44dba src/tls-auth.c | 3 +-- 1 files changed, 1 insertions(+), 2 deletions(-) commit 0e440257013d4f8e5fd2966242942f75deeba02b Author: Yoann Vandoorselaere Date: Fri Jul 18 15:49:36 2008 +0000 Update News, documentation, bump version number. git-svn-id: file:///home/yoann/SVN/libprelude/trunk@10686 09c5ec92-17d4-0310-903a-819935f44dba NEWS | 36 ++++++++++++++++++++++++++++++++++++ configure.in | 10 +++++----- docs/api/libprelude-decl.txt | 18 ++++++++++++++---- docs/api/libprelude-sections.txt | 2 ++ docs/api/tmpl/idmef-criteria.sgml | 18 ++++++++++++++++++ 5 files changed, 75 insertions(+), 9 deletions(-) commit bfb8b27819565ad91b0a348ad1b408139fbdca1c Author: Yoann Vandoorselaere Date: Fri Jul 18 15:49:32 2008 +0000 Missing include file. git-svn-id: file:///home/yoann/SVN/libprelude/trunk@10685 09c5ec92-17d4-0310-903a-819935f44dba src/prelude.c | 1 + 1 files changed, 1 insertions(+), 0 deletions(-) commit 4a48338b8912b16e8a92b7a8ebd634d45ff595d2 Author: Yoann Vandoorselaere Date: Fri Jul 18 15:49:29 2008 +0000 Update GnuLib code. git-svn-id: file:///home/yoann/SVN/libprelude/trunk@10684 09c5ec92-17d4-0310-903a-819935f44dba libmissing/vasnprintf.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) commit af9082d65e2ae3775a4ce1910ce7650a15735ad9 Author: Yoann Vandoorselaere Date: Fri Jul 18 15:16:40 2008 +0000 Unset all variable on exit. git-svn-id: file:///home/yoann/SVN/libprelude/trunk@10683 09c5ec92-17d4-0310-903a-819935f44dba src/include/variable.h | 1 + src/prelude.c | 4 ++++ src/variable.c | 24 ++++++++++++++++++------ 3 files changed, 23 insertions(+), 6 deletions(-) commit 8f59c9d37b428206d54fb2dcfd8d3dd571ac47f8 Author: Yoann Vandoorselaere Date: Fri Jul 18 15:13:45 2008 +0000 Add support for newer GnuTLS 2.2.0 session priority functions. When the option is available, the user might specify TLS settings through the "tls-options" configuration entry. This additionally fix #299 (problem negotiating compression method when connecting to Prelude-Manager). git-svn-id: file:///home/yoann/SVN/libprelude/trunk@10682 09c5ec92-17d4-0310-903a-819935f44dba client.conf.in | 55 +++++++++++++++++----- configure.in | 6 +++ src/include/tls-auth.h | 4 ++ src/prelude-client.c | 11 +++++ src/tls-auth.c | 115 +++++++++++++++++++++++++++++++++++++++++++++--- 5 files changed, 172 insertions(+), 19 deletions(-) commit 159c2ecba63f7d64cc68267ff98bca186985ca16 Author: Yoann Vandoorselaere Date: Wed Jul 16 16:14:57 2008 +0000 Temporarily prevent libprelude from settings the version, since it trigger a Prelude-Manager warning when reading the message. Will fix Prelude-Manager before re-enabling this code. git-svn-id: file:///home/yoann/SVN/libprelude/trunk@10664 09c5ec92-17d4-0310-903a-819935f44dba src/idmef-tree-wrap.c | 3 ++- src/idmef-wrappers-gen/GenerateIDMEFTreeWrapC.pm | 8 ++++---- 2 files changed, 6 insertions(+), 5 deletions(-) commit 29257ecb96c7fa66994770386fea2b6d5333882e Author: Yoann Vandoorselaere Date: Wed Jul 16 08:22:33 2008 +0000 Remove change that prevented TOK_NOT to be taken into account as an idmef-criteria operator. git-svn-id: file:///home/yoann/SVN/libprelude/trunk@10663 09c5ec92-17d4-0310-903a-819935f44dba src/idmef-criteria-string.yac.y | 5 ----- 1 files changed, 0 insertions(+), 5 deletions(-) commit 88875c0394d376711033d784d388f743d83bea27 Author: Yoann Vandoorselaere Date: Tue Jul 15 08:04:09 2008 +0000 Implement negation of idmef-criteria, allowing to write criteria like: ! (alert.classification.text = A || alert.classification.text = B) git-svn-id: file:///home/yoann/SVN/libprelude/trunk@10658 09c5ec92-17d4-0310-903a-819935f44dba src/idmef-criteria-string.lex.l | 2 +- src/idmef-criteria-string.yac.y | 63 ++++++++++++++++++++++---------------- 2 files changed, 37 insertions(+), 28 deletions(-) commit 13c068ff4187987f8bce69009edda72586fd0fc6 Author: Yoann Vandoorselaere Date: Tue Jul 15 08:04:07 2008 +0000 Revert changeset [10626], since the workaround break on libtool 1.5.x installation. This reopen #294. git-svn-id: file:///home/yoann/SVN/libprelude/trunk@10657 09c5ec92-17d4-0310-903a-819935f44dba src/include/prelude-plugin.h | 2 -- 1 files changed, 0 insertions(+), 2 deletions(-) commit 459d43a6087625d8f758275e03f6439dc347046c Author: Yoann Vandoorselaere Date: Tue Jul 15 08:04:04 2008 +0000 Implement idmef_criteria_set_negation() / idmef_criteria_get_negation(), allowing to mark a given criteria as 'negated'. git-svn-id: file:///home/yoann/SVN/libprelude/trunk@10656 09c5ec92-17d4-0310-903a-819935f44dba src/idmef-criteria.c | 28 ++++++++++++++++++++++------ src/include/idmef-criteria.h | 4 ++++ 2 files changed, 26 insertions(+), 6 deletions(-) commit 8333426100cdcba5da778552826744a6da76118d Author: Yoann Vandoorselaere Date: Tue Jul 15 08:04:02 2008 +0000 Fix multiples problem with prelude_read_multiline / prelude_read_multiline2. git-svn-id: file:///home/yoann/SVN/libprelude/trunk@10655 09c5ec92-17d4-0310-903a-819935f44dba src/common.c | 87 ++++++++++++++++++++++++++++++++++++++++------------------ 1 files changed, 60 insertions(+), 27 deletions(-) commit 99f94eeb8c59821df12539196d8534262181f180 Author: Yoann Vandoorselaere Date: Tue Jul 15 08:03:58 2008 +0000 Update GnuLib code. git-svn-id: file:///home/yoann/SVN/libprelude/trunk@10654 09c5ec92-17d4-0310-903a-819935f44dba libmissing/Makefile.am | 8 +++++- libmissing/arpa_inet.in.h | 27 +++++++++++++----- libmissing/getaddrinfo.c | 7 +++-- libmissing/getaddrinfo.h | 10 ++++++- libmissing/m4/arpa_inet_h.m4 | 13 ++++++--- libmissing/m4/gnulib-cache.m4 | 25 ++++++++++++++++- libmissing/m4/gnulib-common.m4 | 9 +++++- libmissing/m4/gnulib-comp.m4 | 58 ++++++++++++++++++++++++--------------- libmissing/m4/gnulib-tool.m4 | 28 ++++++++++++++++++- libmissing/m4/inet_ntop.m4 | 11 +++++++- libmissing/m4/memcmp.m4 | 16 +++++++++- libmissing/m4/memmem.m4 | 28 ++++++++++++++++--- libmissing/m4/onceonly.m4 | 15 ++++++---- libmissing/m4/stdio_h.m4 | 6 +++- libmissing/m4/strcasestr.m4 | 30 +++++++++++++++++--- libmissing/m4/wctype.m4 | 13 +++++---- libmissing/regcomp.c | 52 +++++++++++++++++------------------ libmissing/regex_internal.c | 6 +--- libmissing/regexec.c | 7 +++-- libmissing/stdbool.in.h | 6 ++-- libmissing/stdio-impl.h | 4 +- libmissing/stdio.in.h | 20 ++++++++++++++ libmissing/str-two-way.h | 4 ++- libmissing/vasnprintf.c | 21 ++++++++++++-- 24 files changed, 312 insertions(+), 112 deletions(-) commit 956c2b4c49605d4351cc32276cb13164be7f450d Author: Yoann Vandoorselaere Date: Tue Jul 15 08:03:49 2008 +0000 Never use non-pointer field, always use the "required" keyword. Fix API consistency issue, that could lead to unexpected behavior. git-svn-id: file:///home/yoann/SVN/libprelude/trunk@10653 09c5ec92-17d4-0310-903a-819935f44dba src/idmef-tree-wrap.c | 968 +++++++++++++++++++++++++---------- src/idmef-wrappers-gen/idmef-tree.h | 38 +- src/include/idmef-tree-wrap.h | 38 +- 3 files changed, 738 insertions(+), 306 deletions(-) commit 755a62c0ec5146b027e31a9b392ff80a84c7dbac Author: Yoann Vandoorselaere Date: Thu Jul 10 14:27:15 2008 +0000 Fix an IDMEF-Criteria matching problem, where the match function would not attempt to match a OR after multiple consecutive failed AND. Thanks Alexander Afonyashin for pointing out the problem. A rule that triggered the problem was: (alert.target.user.user_id.name != 'whatever' && alert.classification.text == 'anything') || heartbeat When this version worked correctly: heartbeat || (alert.target.user.user_id.name != 'whatever' && alert.classification.text == 'anything') git-svn-id: file:///home/yoann/SVN/libprelude/trunk@10638 09c5ec92-17d4-0310-903a-819935f44dba src/idmef-criteria.c | 13 +++++-------- 1 files changed, 5 insertions(+), 8 deletions(-) commit 3d359f9b24f39b55e0d1398ceab7f2820e1d335e Author: Yoann Vandoorselaere Date: Thu Jul 10 08:59:11 2008 +0000 Update. git-svn-id: file:///home/yoann/SVN/libprelude/trunk@10637 09c5ec92-17d4-0310-903a-819935f44dba src/include/variable.h | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) commit 28fa7a2e9e184fc223759b927890b65cf1eb06b8 Author: Yoann Vandoorselaere Date: Thu Jul 10 08:59:08 2008 +0000 Implement variable substitution in Prelude configuration files. git-svn-id: file:///home/yoann/SVN/libprelude/trunk@10636 09c5ec92-17d4-0310-903a-819935f44dba src/config-engine.c | 70 ++++++++++++++++++++++++++++++++++++++++++++++++-- src/variable.c | 42 ++++++++++++++++++++---------- 2 files changed, 95 insertions(+), 17 deletions(-) commit 99b12c10caa3e5f8958e037370e8eb5ee4b1c213 Author: Yoann Vandoorselaere Date: Thu Jul 10 07:00:46 2008 +0000 Handle correctly multiples opening parenthesis within multiples value. idmef.path = ((A && B) || (C && D)). Thanks to Sebastien Tricaud for helping with the yacc part. git-svn-id: file:///home/yoann/SVN/libprelude/trunk@10635 09c5ec92-17d4-0310-903a-819935f44dba src/idmef-criteria-string.lex.l | 18 +++++++++++------- src/idmef-criteria-string.yac.y | 8 ++++++-- 2 files changed, 17 insertions(+), 9 deletions(-) commit 3a50047d16ba526c962dcdeb63726a4bf0d95213 Author: Yoann Vandoorselaere Date: Wed Jul 9 16:37:31 2008 +0000 Fixes some lexer regression, simpler scheme for multiples values. git-svn-id: file:///home/yoann/SVN/libprelude/trunk@10634 09c5ec92-17d4-0310-903a-819935f44dba src/idmef-criteria-string.lex.l | 146 +++++++++++++++++++------------------- 1 files changed, 73 insertions(+), 73 deletions(-) commit f92b2a6cef0ea388029a9dc18cd4039ecbbb78e5 Author: Yoann Vandoorselaere Date: Wed Jul 9 16:37:22 2008 +0000 Whitespace police. git-svn-id: file:///home/yoann/SVN/libprelude/trunk@10633 09c5ec92-17d4-0310-903a-819935f44dba src/config-engine.c | 296 +++++++++++++++++++++++++------------------------- 1 files changed, 148 insertions(+), 148 deletions(-) commit cfe72e9afafda1ae26bdb17a762d84a700f00bcf Author: Yoann Vandoorselaere Date: Mon Jul 7 16:38:04 2008 +0000 Allow IDMEF criteria with multiples values for a single path, as can be seen in the following example: alert.classification.text = (A || B || C || D) This will be internally translated to the original criteria language: alert.classification.text = A || alert.classification.text = B || alert.classification.text = C || alert.classification.text = D git-svn-id: file:///home/yoann/SVN/libprelude/trunk@10632 09c5ec92-17d4-0310-903a-819935f44dba src/idmef-criteria-string.lex.l | 134 +++++++++++------- src/idmef-criteria-string.yac.y | 291 ++++++++++++++++++++++----------------- 2 files changed, 244 insertions(+), 181 deletions(-) commit 60c84339afb612c021ed75b5827ee5b242c19ed6 Author: Yoann Vandoorselaere Date: Tue Jul 1 08:28:21 2008 +0000 Transparently handle libtool 2.2 ABI change. Fix #294. git-svn-id: file:///home/yoann/SVN/libprelude/trunk@10626 09c5ec92-17d4-0310-903a-819935f44dba src/include/prelude-plugin.h | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) commit e39238c456eeaedb94bd2b63f4c6876f65a3f3fe Author: Yoann Vandoorselaere Date: Tue Jul 1 08:28:13 2008 +0000 Whitespace police. git-svn-id: file:///home/yoann/SVN/libprelude/trunk@10625 09c5ec92-17d4-0310-903a-819935f44dba src/idmef-criteria-string.lex.l | 156 +++++++++++++++++++------------------- 1 files changed, 78 insertions(+), 78 deletions(-) commit 6aaf119c66b45e3844acc90a72e469d2ead528fc Author: Yoann Vandoorselaere Date: Sun Jun 15 10:03:30 2008 +0000 Error out if GnuTLS initialization fail. git-svn-id: file:///home/yoann/SVN/libprelude/trunk@10594 09c5ec92-17d4-0310-903a-819935f44dba prelude-admin/prelude-admin.c | 7 ++++++- 1 files changed, 6 insertions(+), 1 deletions(-) commit 1374085862aca98dbfc636d7051904c97eafeae8 Author: Yoann Vandoorselaere Date: Tue May 6 16:34:01 2008 +0000 Update NEWS, bump version number. git-svn-id: file:///home/yoann/SVN/libprelude/trunk@10571 09c5ec92-17d4-0310-903a-819935f44dba NEWS | 6 ++++++ configure.in | 4 ++-- 2 files changed, 8 insertions(+), 2 deletions(-) commit 4cfcd26b864dbd94cf4214ca67a4e210c55eb909 Author: Yoann Vandoorselaere Date: Tue May 6 16:33:55 2008 +0000 Update GnuLib code. git-svn-id: file:///home/yoann/SVN/libprelude/trunk@10570 09c5ec92-17d4-0310-903a-819935f44dba libmissing/Makefile.am | 15 ++++---- libmissing/arpa_inet.in.h | 24 ++++++++++++- libmissing/inet_ntop.c | 4 +- libmissing/inet_ntop.h | 42 ---------------------- libmissing/intprops.h | 77 ----------------------------------------- libmissing/m4/arpa_inet_h.m4 | 3 ++ libmissing/m4/gnulib-comp.m4 | 2 - libmissing/m4/inet_ntop.m4 | 7 ++-- libmissing/m4/stdlib_h.m4 | 4 ++- libmissing/m4/string_h.m4 | 2 + libmissing/m4/sys_socket_h.m4 | 2 + libmissing/memchr.c | 6 +-- libmissing/stdlib.in.h | 15 ++++++++ libmissing/string.in.h | 16 ++++++++ libmissing/sys_socket.in.h | 2 +- src/include/libmissing.h | 2 +- 16 files changed, 79 insertions(+), 144 deletions(-) commit 579da05d9db9ada7f5a1d88699b3b992dd8faab7 Author: Yoann Vandoorselaere Date: Tue May 6 15:34:05 2008 +0000 Define pthread weak symbols when support. Fix unresolved symbols on some architecture (fix #287). git-svn-id: file:///home/yoann/SVN/libprelude/trunk@10569 09c5ec92-17d4-0310-903a-819935f44dba src/prelude-async.c | 24 ++++++++++++++++++++++++ src/prelude-thread.c | 38 ++++++++++++++++++++++++++++++++++++++ 2 files changed, 62 insertions(+), 0 deletions(-) commit f734a79c16fde267b21e93b9e66a3f4739aa7491 Author: Yoann Vandoorselaere Date: Tue May 6 15:33:56 2008 +0000 Whitespace police. git-svn-id: file:///home/yoann/SVN/libprelude/trunk@10568 09c5ec92-17d4-0310-903a-819935f44dba src/prelude-thread.c | 32 ++++++++++++++++---------------- 1 files changed, 16 insertions(+), 16 deletions(-) commit fb742912a1a7cdffc41536c3a75c235203b0f079 Author: Yoann Vandoorselaere Date: Wed Apr 30 11:57:11 2008 +0000 Make idmef_value_iterate(), idmef_value_iterate_reversed(), idmef_value_get_nth() idmef_value_t argument const. The callback argument remain non const, if the user wish to modify the value. git-svn-id: file:///home/yoann/SVN/libprelude/trunk@10561 09c5ec92-17d4-0310-903a-819935f44dba src/idmef-value.c | 28 ++++++++++++++++++++-------- src/include/idmef-value.h | 8 ++++---- 2 files changed, 24 insertions(+), 12 deletions(-) commit 622c2040afb9f8d2e647c57f3fd64e3db120e182 Author: Yoann Vandoorselaere Date: Mon Apr 28 11:40:35 2008 +0000 Update NEWS, bump version number. git-svn-id: file:///home/yoann/SVN/libprelude/trunk@10549 09c5ec92-17d4-0310-903a-819935f44dba NEWS | 6 ++++++ configure.in | 4 ++-- 2 files changed, 8 insertions(+), 2 deletions(-) commit d27107e1eb588c175a3d14045b73c6b9a23c5935 Author: Yoann Vandoorselaere Date: Mon Apr 28 11:29:33 2008 +0000 Update GnuLib code. git-svn-id: file:///home/yoann/SVN/libprelude/trunk@10548 09c5ec92-17d4-0310-903a-819935f44dba libmissing/Makefile.am | 9 ++- libmissing/fseeko.c | 53 +++-------- libmissing/intprops.h | 77 +++++++++++++++ libmissing/m4/gnulib-comp.m4 | 2 + libmissing/memchr.c | 210 ++++++++++++++++++----------------------- libmissing/stdio-impl.h | 94 +++++++++++++++++++ 6 files changed, 287 insertions(+), 158 deletions(-) commit 618cc0cd84d24f7b2ad12ccef55f79f6fd61adc3 Author: Yoann Vandoorselaere Date: Fri Apr 25 16:07:32 2008 +0000 Remove debug spew, thanks Pierre Chifflier for pointing this out. git-svn-id: file:///home/yoann/SVN/libprelude/trunk@10547 09c5ec92-17d4-0310-903a-819935f44dba src/prelude-connection-pool.c | 1 - 1 files changed, 0 insertions(+), 1 deletions(-) commit 5fddb72580c2e8f87eac8910b479e18a9f6bbedc Author: Yoann Vandoorselaere Date: Fri Apr 25 13:14:57 2008 +0000 Missing GnuLib file. git-svn-id: file:///home/yoann/SVN/libprelude/trunk@10545 09c5ec92-17d4-0310-903a-819935f44dba link-warning.h | 28 ++++++++++++++++++++++++++++ 1 files changed, 28 insertions(+), 0 deletions(-) commit 2864ad4232a4a3ee1ec1d094dd44145619747d1e Author: Yoann Vandoorselaere Date: Thu Apr 24 11:43:47 2008 +0000 Update NEWS, bump version number. git-svn-id: file:///home/yoann/SVN/libprelude/trunk@10537 09c5ec92-17d4-0310-903a-819935f44dba NEWS | 41 +++++++++++++++++++++++++++++++++++++++++ configure.in | 10 +++++----- 2 files changed, 46 insertions(+), 5 deletions(-) commit 94e820c47801e7301b72cb19d4bcf2719330d19d Author: Yoann Vandoorselaere Date: Thu Apr 24 11:43:35 2008 +0000 Update API documentation. git-svn-id: file:///home/yoann/SVN/libprelude/trunk@10536 09c5ec92-17d4-0310-903a-819935f44dba docs/api/libprelude-decl.txt | 144 +++++++++++++++++----------- docs/api/libprelude-sections.txt | 18 +++- docs/api/tmpl/idmef-time.sgml | 6 - docs/api/tmpl/idmef-tree-wrap.sgml | 80 ++++++++-------- docs/api/tmpl/prelude-client.sgml | 1 + docs/api/tmpl/prelude-connection-pool.sgml | 11 ++- docs/api/tmpl/prelude-ident.sgml | 3 +- docs/api/tmpl/prelude-io.sgml | 36 +++++++ docs/api/tmpl/prelude-msg.sgml | 63 ++++++++++++ docs/api/tmpl/prelude-string.sgml | 9 -- gtk-doc.make | 19 ++-- 11 files changed, 265 insertions(+), 125 deletions(-) commit 49a46977b777164bb03373e1644fc9d8cd4fb9fd Author: Yoann Vandoorselaere Date: Thu Apr 24 11:43:20 2008 +0000 Fixes for API doc generation. git-svn-id: file:///home/yoann/SVN/libprelude/trunk@10535 09c5ec92-17d4-0310-903a-819935f44dba src/common.c | 2 -- src/include/prelude-connection-pool.h | 2 +- src/prelude-io.c | 4 ++-- 3 files changed, 3 insertions(+), 5 deletions(-) commit 7e1a5335c415b60b22153d20ba37e566f81b18d6 Author: Yoann Vandoorselaere Date: Thu Apr 24 11:43:04 2008 +0000 Update GnuLib code. git-svn-id: file:///home/yoann/SVN/libprelude/trunk@10534 09c5ec92-17d4-0310-903a-819935f44dba libmissing/Makefile.am | 24 +- libmissing/alloca.in.h | 4 +- libmissing/arpa_inet.in.h | 45 ++ libmissing/fseeko.c | 23 +- libmissing/getaddrinfo.c | 2 +- libmissing/getdelim.c | 13 +- libmissing/localcharset.c | 6 +- libmissing/m4/absolute-header.m4 | 49 -- libmissing/m4/arpa_inet_h.m4 | 21 +- libmissing/m4/extensions.m4 | 6 +- libmissing/m4/fseeko.m4 | 8 +- libmissing/m4/gnulib-cache.m4 | 2 +- libmissing/m4/gnulib-common.m4 | 23 +- libmissing/m4/gnulib-comp.m4 | 12 +- libmissing/m4/include_next.m4 | 9 +- libmissing/m4/mbstate_t.m4 | 30 + libmissing/m4/memmem.m4 | 6 +- libmissing/m4/netinet_in_h.m4 | 6 +- libmissing/m4/onceonly.m4 | 87 +++ libmissing/m4/onceonly_2_57.m4 | 86 --- libmissing/m4/printf.m4 | 1309 ++++++++++++++++++++++++++++++++++++++ libmissing/m4/regex.m4 | 12 +- libmissing/m4/snprintf.m4 | 15 +- libmissing/m4/stdint.m4 | 20 +- libmissing/m4/stdio_h.m4 | 10 +- libmissing/m4/stdlib_h.m4 | 7 +- libmissing/m4/strcasestr.m4 | 6 +- libmissing/m4/strndup.m4 | 8 +- libmissing/m4/sys_select_h.m4 | 6 +- libmissing/m4/sys_socket_h.m4 | 27 +- libmissing/m4/time_r.m4 | 6 +- libmissing/m4/unistd_h.m4 | 6 +- libmissing/m4/vasnprintf.m4 | 21 +- libmissing/m4/vsnprintf.m4 | 15 +- libmissing/m4/wctype.m4 | 33 +- libmissing/poll.c | 10 +- libmissing/regex_internal.h | 4 +- libmissing/snprintf.c | 7 +- libmissing/stdlib.in.h | 19 +- libmissing/sys_socket.in.h | 37 +- libmissing/unistd.in.h | 22 +- libmissing/vasnprintf.c | 305 ++++++--- libmissing/vsnprintf.c | 7 +- libmissing/wchar.in.h | 11 +- libmissing/wctype.in.h | 21 +- libmissing/xsize.h | 4 +- 46 files changed, 2050 insertions(+), 360 deletions(-) commit e6243d48ff624a0c18f9789804e3a90238b4fe9a Author: Yoann Vandoorselaere Date: Thu Apr 17 17:29:19 2008 +0000 Check for empty profile name on all prelude-admin commands. git-svn-id: file:///home/yoann/SVN/libprelude/trunk@10501 09c5ec92-17d4-0310-903a-819935f44dba prelude-admin/prelude-admin.c | 42 ++++++++++++++++++++++++++++++++++++++++- 1 files changed, 41 insertions(+), 1 deletions(-) commit 686868cf0f4bb88d7d724b023993031d0318f26c Author: Yoann Vandoorselaere Date: Thu Apr 17 17:04:53 2008 +0000 Fix possible profile directory deletion in case prelude-admin del is called with an empty profile name argument. git-svn-id: file:///home/yoann/SVN/libprelude/trunk@10500 09c5ec92-17d4-0310-903a-819935f44dba prelude-admin/prelude-admin.c | 5 +++++ 1 files changed, 5 insertions(+), 0 deletions(-) commit 4a03f8c87c18d6060cbc2058ff71bd81dbbef4dc Author: Yoann Vandoorselaere Date: Thu Apr 17 17:04:49 2008 +0000 Whitespace police. git-svn-id: file:///home/yoann/SVN/libprelude/trunk@10499 09c5ec92-17d4-0310-903a-819935f44dba NEWS | 1036 +++++++++++++++++++++++++++++++++--------------------------------- 1 files changed, 518 insertions(+), 518 deletions(-) commit dfacce061e04316bed3f531ee9da8a72dc95dac7 Author: Yoann Vandoorselaere Date: Thu Apr 3 15:06:47 2008 +0000 Missing declaration. git-svn-id: file:///home/yoann/SVN/libprelude/trunk@10479 09c5ec92-17d4-0310-903a-819935f44dba src/include/prelude-connection-pool.h | 6 ++++-- 1 files changed, 4 insertions(+), 2 deletions(-) commit c6b6b1568e31652ec913cc5363767e0bbfbf49a1 Author: Yoann Vandoorselaere Date: Thu Apr 3 14:43:20 2008 +0000 Revert "Fix more possible race in prelude-async, code cleanup." This reverts commit 1686567933707626e4f2a80e9208e97e7444e814. git-svn-id: file:///home/yoann/SVN/libprelude/trunk@10469 09c5ec92-17d4-0310-903a-819935f44dba src/prelude-async.c | 139 ++++++++++++++++++++++++++------------------------- 1 files changed, 70 insertions(+), 69 deletions(-) commit 19cc5ca8e68396738cb6551c39da4eef2206e467 Author: Yoann Vandoorselaere Date: Thu Apr 3 14:42:53 2008 +0000 Revert "Fix typo." This reverts commit 16a78872939a283fc8922649e9f4a32396e041b1. git-svn-id: file:///home/yoann/SVN/libprelude/trunk@10468 09c5ec92-17d4-0310-903a-819935f44dba src/prelude-async.c | 20 +++++++++----------- 1 files changed, 9 insertions(+), 11 deletions(-) commit 1aff5a5f1d9284be291278fab787bddc0ade8a6e Author: Yoann Vandoorselaere Date: Thu Apr 3 14:40:37 2008 +0000 Cleanup, thread safety work. Make prelude_connection_pool_add_connection() work on regular pool (handle before/after init, un-connected connection). git-svn-id: file:///home/yoann/SVN/libprelude/trunk@10467 09c5ec92-17d4-0310-903a-819935f44dba src/prelude-connection-pool.c | 850 +++++++++++++++++++++++------------------ 1 files changed, 477 insertions(+), 373 deletions(-) commit f8093bc4fcc35e76000cd758e1d15a82e42de62f Author: Yoann Vandoorselaere Date: Tue Apr 1 10:01:02 2008 +0000 Make sure we always remove the PRELUDE_CONNECTION_STATE_ESTABLISHED bit, even if the connection closure fail. This also fix a possible memory leak. git-svn-id: file:///home/yoann/SVN/libprelude/trunk@10457 09c5ec92-17d4-0310-903a-819935f44dba src/prelude-connection.c | 15 +++++++-------- 1 files changed, 7 insertions(+), 8 deletions(-) commit a164a044ecb8533623e5691f31397c15a2f04fed Author: Yoann Vandoorselaere Date: Mon Mar 31 13:45:09 2008 +0000 Fix typo. git-svn-id: file:///home/yoann/SVN/libprelude/trunk@10455 09c5ec92-17d4-0310-903a-819935f44dba src/prelude-async.c | 20 +++++++++++--------- 1 files changed, 11 insertions(+), 9 deletions(-) commit 64bedc59d3dd29dfa86ac9faafcbbebedf8faf20 Author: Yoann Vandoorselaere Date: Mon Mar 31 13:00:34 2008 +0000 Use the initial analyzer object when triggering the first heartbeat, then make the copy (to be used by the asynchronous thread) and initialize the heartbeat timer. This make sure we have correct _analyzer_copy visibility from the asynchronous thread. git-svn-id: file:///home/yoann/SVN/libprelude/trunk@10454 09c5ec92-17d4-0310-903a-819935f44dba src/prelude-client.c | 29 +++++++++++++++++++---------- 1 files changed, 19 insertions(+), 10 deletions(-) commit 202d7dc726b85a6f1583cde93d24f6cc0240696f Author: Yoann Vandoorselaere Date: Mon Mar 31 11:57:47 2008 +0000 Fix more possible race in prelude-async, code cleanup. git-svn-id: file:///home/yoann/SVN/libprelude/trunk@10453 09c5ec92-17d4-0310-903a-819935f44dba src/prelude-async.c | 139 +++++++++++++++++++++++++-------------------------- 1 files changed, 69 insertions(+), 70 deletions(-) commit 141af110726b5f9ebb2f401ea29d4da94bd9664c Author: Yoann Vandoorselaere Date: Fri Mar 28 10:05:05 2008 +0000 Set async flags before starting the asynchronous thread: fix another possible harmless race. git-svn-id: file:///home/yoann/SVN/libprelude/trunk@10452 09c5ec92-17d4-0310-903a-819935f44dba src/prelude-client.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) commit 40157d4852f2ef277e9a3ffa0029240378970d08 Author: Yoann Vandoorselaere Date: Fri Mar 28 09:59:15 2008 +0000 Fix a harmless race in the way we checked for global async_flags change. git-svn-id: file:///home/yoann/SVN/libprelude/trunk@10451 09c5ec92-17d4-0310-903a-819935f44dba src/prelude-async.c | 22 ++++++++++------------ 1 files changed, 10 insertions(+), 12 deletions(-) commit a89b484b23d077ba5d2e879caa6e02371675672c Author: Yoann Vandoorselaere Date: Fri Mar 28 09:59:09 2008 +0000 Always lock timer mutex, without relying on the async stack state (fix a possible race condition). Remove global count variable, that was used only for debugging but not mutex protected. git-svn-id: file:///home/yoann/SVN/libprelude/trunk@10450 09c5ec92-17d4-0310-903a-819935f44dba src/prelude-timer.c | 15 ++++----------- 1 files changed, 4 insertions(+), 11 deletions(-) commit 08d3f94d44784b716ae422bb00256943c69c2a24 Author: Yoann Vandoorselaere Date: Fri Mar 28 09:58:58 2008 +0000 Whitespace police. git-svn-id: file:///home/yoann/SVN/libprelude/trunk@10449 09c5ec92-17d4-0310-903a-819935f44dba src/prelude-timer.c | 82 +++++++++++++++++++++++++------------------------- 1 files changed, 41 insertions(+), 41 deletions(-) commit 1ade2a700efca7323d3c624944e5d8c5fde7509b Author: Yoann Vandoorselaere Date: Thu Mar 27 15:17:44 2008 +0000 More build fixes. git-svn-id: file:///home/yoann/SVN/libprelude/trunk@10442 09c5ec92-17d4-0310-903a-819935f44dba configure.in | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) commit e74eb47355d689438729742d59882617dfcf2207 Author: Yoann Vandoorselaere Date: Thu Mar 27 15:11:45 2008 +0000 Fix build breakage. git-svn-id: file:///home/yoann/SVN/libprelude/trunk@10441 09c5ec92-17d4-0310-903a-819935f44dba Makefile.am | 56 +++++++++++++++++++++++++------------------------- configure.in | 9 ++++++- gtk-doc.make | 33 +++++++++++++++++++++++------ idmef-client.conf.in | 4 +- libprelude-config.in | 2 +- 5 files changed, 64 insertions(+), 40 deletions(-) commit ff9195585beed3cf5f53cab0a6f5cb6e04ded145 Author: Yoann Vandoorselaere Date: Wed Mar 19 08:57:57 2008 +0000 Remove invalid '\n'. git-svn-id: file:///home/yoann/SVN/libprelude/trunk@10405 09c5ec92-17d4-0310-903a-819935f44dba src/prelude-ident.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) commit 9b475c97f8e073734090ba97516a6d1ebe7d690f Author: Yoann Vandoorselaere Date: Tue Mar 11 15:37:23 2008 +0000 Oops. git-svn-id: file:///home/yoann/SVN/libprelude/trunk@10393 09c5ec92-17d4-0310-903a-819935f44dba configure.in | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) commit f6ddc40a938de8c7930436b3ac7e0813fb7239c3 Author: Yoann Vandoorselaere Date: Tue Mar 11 15:31:47 2008 +0000 Fix broken substitution. git-svn-id: file:///home/yoann/SVN/libprelude/trunk@10390 09c5ec92-17d4-0310-903a-819935f44dba configure.in | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) commit f57997f3ff854553a145c228d218aadb61aafaa6 Author: Yoann Vandoorselaere Date: Tue Mar 11 08:58:50 2008 +0000 Build system cleanup, enable RELRO when possible. git-svn-id: file:///home/yoann/SVN/libprelude/trunk@10386 09c5ec92-17d4-0310-903a-819935f44dba configure.in | 447 ++++++++++++++------------------ libprelude-config.in | 4 +- m4/as-ac-expand.m4 | 43 +++ m4/ax_c_check_flag.m4 | 90 +++++++ m4/ax_cflags_gcc_option.m4 | 183 ------------- m4/ax_check_aligned_access_required.m4 | 96 +++++++ m4/ax_ld_check_flag.m4 | 98 +++++++ prelude-admin/Makefile.am | 3 +- src/Makefile.am | 5 +- 9 files changed, 521 insertions(+), 448 deletions(-) commit d7fb42399485b71f6b3fba812dc27dd2ffae83a0 Author: Yoann Vandoorselaere Date: Tue Mar 11 08:54:29 2008 +0000 Implement RFC 4122 UUIDv1 identifier generation, safer than our previous implementation in case of clock skew, or multiple client with the same analyzerid sending alert in parallel. git-svn-id: file:///home/yoann/SVN/libprelude/trunk@10385 09c5ec92-17d4-0310-903a-819935f44dba src/common.c | 2 +- src/include/prelude-ident.h | 9 ++- src/prelude-ident.c | 168 ++++++++++++++++++++++++++++++++++++------- 3 files changed, 148 insertions(+), 31 deletions(-) commit b7732d1638dacc6bd450256b9b579b98c00f893d Author: Yoann Vandoorselaere Date: Mon Mar 10 10:47:57 2008 +0000 Allow C++ compilation. git-svn-id: file:///home/yoann/SVN/libprelude/trunk@10379 09c5ec92-17d4-0310-903a-819935f44dba .../GenerateIDMEFMessageReadH.pm | 25 +++++++++++++------ .../GenerateIDMEFMessageWriteH.pm | 25 +++++++++++++------ src/include/common.h | 6 ++++ src/include/idmef-message-read.h | 9 +++++++ src/include/idmef-message-write.h | 9 +++++++ src/include/prelude-extract.h | 8 ++++++ 6 files changed, 66 insertions(+), 16 deletions(-) commit 605e614faeec17d758cd95c29c270353373120f2 Author: Yoann Vandoorselaere Date: Mon Mar 10 10:47:37 2008 +0000 Remove unused. git-svn-id: file:///home/yoann/SVN/libprelude/trunk@10378 09c5ec92-17d4-0310-903a-819935f44dba src/common.c | 2 -- 1 files changed, 0 insertions(+), 2 deletions(-) commit fe2b56d83b9f7bd5273fbd6dec283007064bbaca Author: Yoann Vandoorselaere Date: Mon Mar 10 10:21:31 2008 +0000 Do not allow setting a path which depth is 0 (root message), since it make no sense. When deleting listed element, make sure we call prelude_list_del_init(), since the destroy function won't do it for us if the element is referenced somewhere else. Additionally, idmef_path_set() now allow NULL value in order to destroy an existing path value (this use the new idmef_class_child_destroy() stuff). git-svn-id: file:///home/yoann/SVN/libprelude/trunk@10377 09c5ec92-17d4-0310-903a-819935f44dba src/idmef-path.c | 53 ++++++++++++++++++++++++++++++++++++----------------- 1 files changed, 36 insertions(+), 17 deletions(-) commit d4f4602b25de4473b4dccd37a12c13be26bcad2c Author: Yoann Vandoorselaere Date: Mon Mar 10 10:21:17 2008 +0000 New idmef_class_destroy_child() function, calling the low-level _idmef__destroy_child() function for the required class. git-svn-id: file:///home/yoann/SVN/libprelude/trunk@10376 09c5ec92-17d4-0310-903a-819935f44dba src/idmef-class.c | 14 +++++++++++++- src/include/idmef-class.h | 2 ++ 2 files changed, 15 insertions(+), 1 deletions(-) commit ba46138624cdd77a2b7a9b1cb457a0d4bca7c011 Author: Yoann Vandoorselaere Date: Mon Mar 10 10:21:01 2008 +0000 Whitespace police git-svn-id: file:///home/yoann/SVN/libprelude/trunk@10375 09c5ec92-17d4-0310-903a-819935f44dba src/idmef-class.c | 14 +++++++------- 1 files changed, 7 insertions(+), 7 deletions(-) commit d9c0a49eaf1ef00d37283b9117082ed82b013947 Author: Yoann Vandoorselaere Date: Mon Mar 10 10:20:51 2008 +0000 Generate _idmef__destroy_child() function, to be used from the idmef-path API in order to generically destroy a class child. git-svn-id: file:///home/yoann/SVN/libprelude/trunk@10374 09c5ec92-17d4-0310-903a-819935f44dba src/idmef-message-read.c | 1 + src/idmef-tree-wrap.c | 1888 ++++++++++++++++++++++ src/idmef-wrappers-gen/GenerateIDMEFTreeData.pm | 185 ++-- src/idmef-wrappers-gen/GenerateIDMEFTreeWrapC.pm | 153 ++ src/idmef-wrappers-gen/GenerateIDMEFTreeWrapH.pm | 199 ++-- src/include/idmef-tree-data.h | 121 +- src/include/idmef-tree-wrap.h | 30 + 7 files changed, 2332 insertions(+), 245 deletions(-) commit c4e93fa7367062bac0a60bbcb5c67199a366ddee Author: Yoann Vandoorselaere Date: Mon Mar 10 10:20:35 2008 +0000 When we encounter a TLS fatal error on close, close the connection fd immediatly. git-svn-id: file:///home/yoann/SVN/libprelude/trunk@10373 09c5ec92-17d4-0310-903a-819935f44dba src/common.c | 19 ------------------- src/prelude-io.c | 9 +++++++-- 2 files changed, 7 insertions(+), 21 deletions(-) commit 8a746936cbf7a8ccb6004656e4389e831187f0f5 Author: Yoann Vandoorselaere Date: Thu Mar 6 17:38:18 2008 +0000 Allow cloning of empty prelude-string. git-svn-id: file:///home/yoann/SVN/libprelude/trunk@10362 09c5ec92-17d4-0310-903a-819935f44dba src/prelude-string.c | 1 - 1 files changed, 0 insertions(+), 1 deletions(-) commit 071d2c23125b46459ef2cfeab5caab2b05c934bf Author: Yoann Vandoorselaere Date: Thu Mar 6 17:35:59 2008 +0000 Fix invalid if condition in auto generated code. git-svn-id: file:///home/yoann/SVN/libprelude/trunk@10361 09c5ec92-17d4-0310-903a-819935f44dba src/idmef-tree-wrap.c | 4 +- src/idmef-wrappers-gen/GenerateIDMEFTreeWrapC.pm | 36 +++++++++++----------- 2 files changed, 20 insertions(+), 20 deletions(-) commit 82af17ab569ad723b44dd582169ee0c51cb65163 Author: Yoann Vandoorselaere Date: Thu Mar 6 17:23:02 2008 +0000 Destroy previous connection pool if any. git-svn-id: file:///home/yoann/SVN/libprelude/trunk@10359 09c5ec92-17d4-0310-903a-819935f44dba src/prelude-client.c | 3 +++ 1 files changed, 3 insertions(+), 0 deletions(-) commit 72d390756188efe543bc60bf93b242ee345802e6 Author: Yoann Vandoorselaere Date: Thu Mar 6 17:19:20 2008 +0000 Work toward unifying memory handling of class value retrieval through idmef_path_t. All class are now dynamically allocated, and class required within their parent are automatically allocated at parent initialization. git-svn-id: file:///home/yoann/SVN/libprelude/trunk@10356 09c5ec92-17d4-0310-903a-819935f44dba src/idmef-tree-wrap.c | 171 ++++++++++++++++----- src/idmef-wrappers-gen/GenerateIDMEFTreeWrapC.pm | 56 +++++++- src/idmef-wrappers-gen/IDMEFTree.pm | 43 ++++++- src/idmef-wrappers-gen/idmef-tree.h | 6 +- src/include/idmef-tree-wrap.h | 6 +- 5 files changed, 232 insertions(+), 50 deletions(-) commit 860b6b0e0503bf389e4ce8152d01e289ec9c65ed Author: Yoann Vandoorselaere Date: Thu Mar 6 16:59:40 2008 +0000 Work toward unifying memory handling of value retrieval through idmef_path_t. This change allow the user to retrieve and keep a static value (not dynamically allocated), even through it's associated IDMEF message is freed. When an user retrieve a static IDMEF value, we now automatically perform a copy. git-svn-id: file:///home/yoann/SVN/libprelude/trunk@10355 09c5ec92-17d4-0310-903a-819935f44dba src/idmef-tree-wrap.c | 42 +++++++++++++++------ src/idmef-wrappers-gen/GenerateIDMEFTreeWrapC.pm | 42 +++++++++++++++------ 2 files changed, 60 insertions(+), 24 deletions(-) commit b51b82bac50b0330139f93b4e8f1ac9dcbc5f318 Author: Yoann Vandoorselaere Date: Thu Mar 6 16:22:31 2008 +0000 Work toward unifying memory handling of value retrieval through idmef_path_t. This change allow the user to keep a listed value around even through the idmef_message_t it was retrieved from has been destroyed. git-svn-id: file:///home/yoann/SVN/libprelude/trunk@10350 09c5ec92-17d4-0310-903a-819935f44dba src/idmef-path.c | 20 +++++++++++++++----- 1 files changed, 15 insertions(+), 5 deletions(-) commit 38d40e286449ae5bf64af5c9713739bea83e4443 Author: Yoann Vandoorselaere Date: Thu Mar 6 15:41:13 2008 +0000 Implement idmef_value_type_ref(). git-svn-id: file:///home/yoann/SVN/libprelude/trunk@10349 09c5ec92-17d4-0310-903a-819935f44dba src/idmef-value-type.c | 83 ++++++++++++++++++++++++++--------- src/include/idmef-value-type.h | 1 + src/libprelude-error/err-codes.h.in | 4 +- 3 files changed, 66 insertions(+), 22 deletions(-) commit 84ef4babc28781095b079f5e55899cc6cf01f4de Author: Yoann Vandoorselaere Date: Thu Mar 6 15:41:08 2008 +0000 Whitespace police. git-svn-id: file:///home/yoann/SVN/libprelude/trunk@10348 09c5ec92-17d4-0310-903a-819935f44dba src/idmef-value-type.c | 142 ++++++++++++++++++++-------------------- src/include/idmef-value-type.h | 20 +++--- 2 files changed, 81 insertions(+), 81 deletions(-) commit 345c58e5f4877e17a20c2fe711fd33520999954d Author: Yoann Vandoorselaere Date: Thu Mar 6 15:40:57 2008 +0000 Forgot this part. git-svn-id: file:///home/yoann/SVN/libprelude/trunk@10347 09c5ec92-17d4-0310-903a-819935f44dba configure.in | 36 +++++++++++++++++------------------- 1 files changed, 17 insertions(+), 19 deletions(-) commit d2057b8515c31136a1df3794a9ad803b6bd1b21f Author: Yoann Vandoorselaere Date: Thu Mar 6 15:40:50 2008 +0000 Build system cleanup. Use default system CFLAGS for GnuLib / bindings build. Make it impossible for the user to overwrite the -pthread CFLAGS. git-svn-id: file:///home/yoann/SVN/libprelude/trunk@10346 09c5ec92-17d4-0310-903a-819935f44dba Makefile.am | 14 +++++++------- bindings/perl/Makefile.PL.in | 2 +- bindings/python/setup.py.in | 2 +- libprelude-config.in | 2 +- prelude-admin/Makefile.am | 5 ++--- src/Makefile.am | 9 ++++----- src/libprelude-error/Makefile.am | 5 +++-- 7 files changed, 19 insertions(+), 20 deletions(-) commit e9db93980af0e65a2b501ccf91f3f1a9e526ebe0 Author: Yoann Vandoorselaere Date: Thu Mar 6 11:18:32 2008 +0000 Allow copy/clone of empty prelude_string_t. git-svn-id: file:///home/yoann/SVN/libprelude/trunk@10337 09c5ec92-17d4-0310-903a-819935f44dba src/prelude-string.c | 40 +++++++++++++++++++++------------------- 1 files changed, 21 insertions(+), 19 deletions(-) commit d132e52157e29ebe96234a6e36c193c1c52626c4 Author: Yoann Vandoorselaere Date: Thu Mar 6 11:18:24 2008 +0000 Fix printing of empty IDMEF string (print ). git-svn-id: file:///home/yoann/SVN/libprelude/trunk@10336 09c5ec92-17d4-0310-903a-819935f44dba src/idmef-message-print.c | 11 ++++------- .../GenerateIDMEFMessagePrintC.pm | 11 ++++------- 2 files changed, 8 insertions(+), 14 deletions(-) commit 05ca2b76feddb23212e532a9b2705a708cd8f09f Author: Yoann Vandoorselaere Date: Tue Mar 4 14:09:45 2008 +0000 Implement PRELUDE_CLIENT_FLAGS_AUTOCONFIG, which is set by default, but that applications might unset in order for their client not to read the default profile/global configuration. Might be triggered by: - prelude_client_set_flags(client, flags) - prelude_client_set_config_filename(client, NULL); git-svn-id: file:///home/yoann/SVN/libprelude/trunk@10327 09c5ec92-17d4-0310-903a-819935f44dba src/include/prelude-client.h | 11 ++++++----- src/prelude-client.c | 27 +++++++++++++++++---------- 2 files changed, 23 insertions(+), 15 deletions(-) commit 3a3b9a6274ff4abc14da68852ce2bd078b7f53ca Author: Yoann Vandoorselaere Date: Tue Mar 4 12:48:30 2008 +0000 Duplicate close_connction_fd_block() check in close_connection_fd(), since we assume error from close_connection_fd to be IO error. git-svn-id: file:///home/yoann/SVN/libprelude/trunk@10325 09c5ec92-17d4-0310-903a-819935f44dba src/prelude-connection.c | 3 +++ 1 files changed, 3 insertions(+), 0 deletions(-) commit 16fc5a4a75f57d41e19b0a070c93b601b8260d39 Author: Yoann Vandoorselaere Date: Thu Feb 21 13:39:19 2008 +0000 Do not try to send a final heartbeat on prelude_client_destroy() if the client object was not at least at the starting status (fix possible assertion on destroy). git-svn-id: file:///home/yoann/SVN/libprelude/trunk@10263 09c5ec92-17d4-0310-903a-819935f44dba src/prelude-client.c | 5 ++++- 1 files changed, 4 insertions(+), 1 deletions(-) commit 1601518aeeb1ea33c10e1a4999d31e45e5fe0c99 Author: Yoann Vandoorselaere Date: Wed Feb 20 16:31:14 2008 +0000 Whitespace police. git-svn-id: file:///home/yoann/SVN/libprelude/trunk@10256 09c5ec92-17d4-0310-903a-819935f44dba src/prelude-msg.c | 198 ++++++++++++++++++++++++++-------------------------- 1 files changed, 99 insertions(+), 99 deletions(-) commit 65a36bdbb69fa991df83d730751c944e08d55091 Author: Yoann Vandoorselaere Date: Wed Feb 20 09:35:26 2008 +0000 Allow user to associate it's own callback function to a prelude_io_t object. Implement: - prelude_io_set_write_callback() - prelude_io_set_read_callback() - prelude_io_set_pending_callback() - prelude_io_set_fdptr(). git-svn-id: file:///home/yoann/SVN/libprelude/trunk@10254 09c5ec92-17d4-0310-903a-819935f44dba src/include/prelude-io.h | 15 ++++++++-- src/prelude-io.c | 65 +++++++++++++++++++++++++++++++++++++++++++-- 2 files changed, 74 insertions(+), 6 deletions(-) commit de0cfcf268390827a647e5a9e098cccdb7db839b Author: Yoann Vandoorselaere Date: Wed Feb 20 08:36:43 2008 +0000 Fix string translation of IDMEF_CRITERION_OPERATOR_(NOT_)NULL to string. Remove gratuitous space insertion when dumping criteria. git-svn-id: file:///home/yoann/SVN/libprelude/trunk@10216 09c5ec92-17d4-0310-903a-819935f44dba src/idmef-criteria.c | 6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-) commit 919787bc612c1811f59d43944deeeef7ea210832 Author: Yoann Vandoorselaere Date: Wed Feb 20 08:36:19 2008 +0000 Whitespace police. git-svn-id: file:///home/yoann/SVN/libprelude/trunk@10215 09c5ec92-17d4-0310-903a-819935f44dba src/idmef-criteria.c | 14 +++++++------- 1 files changed, 7 insertions(+), 7 deletions(-) commit 584b0b6babbbbbe912293fd36a21c386583c715b Author: Yoann Vandoorselaere Date: Sat Feb 9 17:32:55 2008 +0000 Missing 'extern C' for C++ build. git-svn-id: file:///home/yoann/SVN/libprelude/trunk@10157 09c5ec92-17d4-0310-903a-819935f44dba src/include/idmef-class.h | 8 ++++++++ 1 files changed, 8 insertions(+), 0 deletions(-) commit 2af15ed6267b9a5f70bdfdeb95d7067ec0a99577 Author: Yoann Vandoorselaere Date: Tue Feb 5 08:22:28 2008 +0000 In case of invalid enumeration value, print . git-svn-id: file:///home/yoann/SVN/libprelude/trunk@10140 09c5ec92-17d4-0310-903a-819935f44dba src/idmef-message-print.c | 3 +++ .../GenerateIDMEFMessagePrintC.pm | 3 +++ 2 files changed, 6 insertions(+), 0 deletions(-) commit 73b0316a0722e3bb705baa82394597376658d906 Author: Pierre Chifflier Date: Sat Jan 26 12:40:33 2008 +0000 (bindings): for functions returning pointers to integers, dereference the pointer and return either the integer, or the native equivalent to NULL (None for Python, undef for Perl). git-svn-id: file:///home/yoann/SVN/libprelude/trunk@10131 09c5ec92-17d4-0310-903a-819935f44dba bindings/libprelude.i | 23 +++++++++++++++++++++++ bindings/libprelude_perl.i | 36 ++++++++++++++++++++++++++++++++++++ bindings/libprelude_python.i | 32 ++++++++++++++++++++++++++++++++ 3 files changed, 91 insertions(+), 0 deletions(-) commit 8678c7764d60fe7e9cebefc476517f8a7e614d63 Author: Yoann Vandoorselaere Date: Wed Jan 23 14:57:34 2008 +0000 Update NEWS, bump version number. git-svn-id: file:///home/yoann/SVN/libprelude/trunk@10128 09c5ec92-17d4-0310-903a-819935f44dba NEWS | 13 +++++++++++++ configure.in | 4 ++-- 2 files changed, 15 insertions(+), 2 deletions(-) commit b61f271faf401a65a1ae9d0f990bfaff5cd2696b Author: Yoann Vandoorselaere Date: Wed Jan 23 14:41:43 2008 +0000 Update GnuLib code. git-svn-id: file:///home/yoann/SVN/libprelude/trunk@10127 09c5ec92-17d4-0310-903a-819935f44dba libmissing/Makefile.am | 72 ++++++-- libmissing/float.in.h | 2 +- libmissing/fseeko.c | 3 + libmissing/m4/alloca.m4 | 8 +- libmissing/m4/eealloc.m4 | 32 --- libmissing/m4/float_h.m4 | 4 +- libmissing/m4/getdelim.m4 | 4 +- libmissing/m4/getline.m4 | 4 +- libmissing/m4/gnulib-comp.m4 | 89 ++++++++- libmissing/m4/malloca.m4 | 14 -- libmissing/m4/memchr.m4 | 18 ++ libmissing/m4/memcmp.m4 | 19 ++ libmissing/m4/memmem.m4 | 49 +++++- libmissing/m4/stdio_h.m4 | 15 +- libmissing/m4/stdlib_h.m4 | 7 +- libmissing/m4/strcase.m4 | 8 +- libmissing/m4/strcasestr.m4 | 55 +++++- libmissing/m4/string_h.m4 | 13 +- libmissing/m4/strings_h.m4 | 33 ++++ libmissing/m4/unistd_h.m4 | 7 +- libmissing/malloca.c | 137 -------------- libmissing/malloca.h | 124 ------------ libmissing/malloca.valgrind | 7 - libmissing/memchr.c | 200 ++++++++++++++++++++ libmissing/memcmp.c | 361 +++++++++++++++++++++++++++++++++++ libmissing/memmem.c | 55 ++++-- libmissing/printf-parse.c | 40 ++++- libmissing/regcomp.c | 2 +- libmissing/stdint.in.h | 10 +- libmissing/stdio.in.h | 4 +- libmissing/stdlib.in.h | 25 +++- libmissing/str-two-way.h | 427 ++++++++++++++++++++++++++++++++++++++++++ libmissing/strcasestr.c | 233 +++++------------------ libmissing/string.in.h | 128 +++++++------ libmissing/strings.in.h | 86 +++++++++ libmissing/unistd.in.h | 58 ++++++ libmissing/vasnprintf.c | 3 + libmissing/vasnprintf.h | 4 +- 38 files changed, 1714 insertions(+), 646 deletions(-) commit a9eb56c80500efce19b885270a725808d68541ca Author: Pierre Chifflier Date: Tue Jan 22 13:26:16 2008 +0000 SWIG bindings: add typemaps to arguments of *_get_next* functions, to allow NULL arguments, which are forbidden by default by SWIG (Fix #269) git-svn-id: file:///home/yoann/SVN/libprelude/trunk@10125 09c5ec92-17d4-0310-903a-819935f44dba bindings/libprelude.i | 22 +++++++++++++++++++++- bindings/libprelude_perl.i | 15 +++++++++++++++ bindings/libprelude_python.i | 12 ++++++++++++ 3 files changed, 48 insertions(+), 1 deletions(-) commit ee99926a56a15fbed752aa55838a79e2d1aed14b Author: Yoann Vandoorselaere Date: Thu Jan 17 17:07:25 2008 +0000 Improve prototype for get_next functions, use _cur as a suffix for the iterative argument (shall be used to special case get_next code using swig typemap, without breaking others functions - refs #269). git-svn-id: file:///home/yoann/SVN/libprelude/trunk@10123 09c5ec92-17d4-0310-903a-819935f44dba src/idmef-tree-wrap.c | 240 +++++++++++----------- src/idmef-wrappers-gen/GenerateIDMEFTreeWrapC.pm | 12 +- src/idmef-wrappers-gen/GenerateIDMEFTreeWrapH.pm | 2 +- src/include/idmef-tree-wrap.h | 40 ++-- 4 files changed, 147 insertions(+), 147 deletions(-) commit 7f0826e3dd65496c80c66c92707cc58ccf6b892d Author: Yoann Vandoorselaere Date: Tue Jan 8 11:20:01 2008 +0000 FreeBSD compilation fix. git-svn-id: file:///home/yoann/SVN/libprelude/trunk@10121 09c5ec92-17d4-0310-903a-819935f44dba src/include/prelude-extract.h | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) commit 2149665f4090fc090d45ed8840afff4a238d6a0d Author: Yoann Vandoorselaere Date: Tue Jan 8 11:17:45 2008 +0000 Whitespace police. git-svn-id: file:///home/yoann/SVN/libprelude/trunk@10120 09c5ec92-17d4-0310-903a-819935f44dba src/include/prelude-extract.h | 52 ++++++++++++++++++++-------------------- 1 files changed, 26 insertions(+), 26 deletions(-) commit 33d7cc04f694d5bfe5b047e39420daab094d79b2 Author: Yoann Vandoorselaere Date: Thu Dec 6 11:04:25 2007 +0000 Make sure we use no additional GnuLib compiler flags when build bindings. This fix bindings compilation failure on some architecture (Solaris). git-svn-id: file:///home/yoann/SVN/libprelude/trunk@10084 09c5ec92-17d4-0310-903a-819935f44dba bindings/Makefile.am | 4 ++-- configure.in | 21 +++++++++++++++++++-- 2 files changed, 21 insertions(+), 4 deletions(-) commit b5240392a9c4383a100777fa970e09f8f5ffb789 Author: Yoann Vandoorselaere Date: Thu Dec 6 11:04:12 2007 +0000 Update to newer acx_pthread.m4 git-svn-id: file:///home/yoann/SVN/libprelude/trunk@10083 09c5ec92-17d4-0310-903a-819935f44dba m4/acx_pthread.m4 | 178 ++++++++++++++++++++++++++++++++-------------------- 1 files changed, 109 insertions(+), 69 deletions(-) commit 20c5f5f52f29d7b3041fe30ca44628ab0b5f48a3 Author: Yoann Vandoorselaere Date: Thu Dec 6 08:50:16 2007 +0000 Solaris warnings fixes. git-svn-id: file:///home/yoann/SVN/libprelude/trunk@10082 09c5ec92-17d4-0310-903a-819935f44dba prelude-admin/prelude-admin.c | 4 ++-- src/prelude-client.c | 8 ++++---- src/prelude-connection.c | 4 ++-- src/prelude-log.c | 2 +- 4 files changed, 9 insertions(+), 9 deletions(-) commit 1ec0a23b344f72433841648bd7cf723a9094c752 Author: Yoann Vandoorselaere Date: Fri Nov 23 11:08:29 2007 +0000 Update NEWS, bump version number. git-svn-id: file:///home/yoann/SVN/libprelude/trunk@10067 09c5ec92-17d4-0310-903a-819935f44dba NEWS | 20 ++++++++++++++++++++ configure.in | 4 ++-- 2 files changed, 22 insertions(+), 2 deletions(-) commit f56e8264717b2105f9ad1a901a962a32dd20765a Author: Yoann Vandoorselaere Date: Fri Nov 23 11:08:22 2007 +0000 Avoid warning while generating the documentation due to change in the way we named function argument for auto generated IDMEF functions. git-svn-id: file:///home/yoann/SVN/libprelude/trunk@10066 09c5ec92-17d4-0310-903a-819935f44dba docs/api/libprelude-decl.txt | 66 +++++++++++---------- docs/api/tmpl/idmef-tree-wrap.sgml | 60 ++++++++++---------- src/idmef-wrappers-gen/GenerateIDMEFTreeWrapH.pm | 2 +- src/include/idmef-tree-wrap.h | 60 ++++++++++---------- 4 files changed, 96 insertions(+), 92 deletions(-) commit 2d3f1c9f05ae53a92b0438cd1289390aed566557 Author: Yoann Vandoorselaere Date: Fri Nov 23 11:08:08 2007 +0000 Update GnuLib code. git-svn-id: file:///home/yoann/SVN/libprelude/trunk@10065 09c5ec92-17d4-0310-903a-819935f44dba libmissing/Makefile.am | 102 +++-- libmissing/alloca.c | 2 +- libmissing/alloca.in.h | 54 +++ libmissing/alloca_.h | 54 --- libmissing/asnprintf.c | 2 +- libmissing/config.charset | 36 +- libmissing/float+.h | 2 +- libmissing/float.in.h | 58 +++ libmissing/float_.h | 59 --- libmissing/fseeko.c | 6 +- libmissing/gai_strerror.c | 2 +- libmissing/getaddrinfo.c | 2 +- libmissing/getaddrinfo.h | 2 +- libmissing/getdelim.c | 2 +- libmissing/getline.c | 2 +- libmissing/getpass.c | 2 +- libmissing/getpass.h | 2 +- libmissing/gettext.h | 2 +- libmissing/gettimeofday.c | 8 +- libmissing/inet_ntop.c | 2 +- libmissing/inet_ntop.h | 2 +- libmissing/localcharset.c | 2 +- libmissing/localcharset.h | 2 +- libmissing/lseek.c | 2 +- libmissing/m4/getaddrinfo.m4 | 31 +- libmissing/m4/gnulib-common.m4 | 45 ++- libmissing/m4/gnulib-comp.m4 | 48 ++- libmissing/m4/intmax_t.m4 | 12 +- libmissing/m4/longlong.m4 | 78 +++- libmissing/m4/socklen.m4 | 4 +- libmissing/m4/stdint.m4 | 4 +- libmissing/m4/stdio_h.m4 | 6 +- libmissing/m4/stdlib_h.m4 | 4 +- libmissing/m4/strsep.m4 | 4 +- libmissing/m4/ulonglong.m4 | 48 -- libmissing/m4/vasnprintf.m4 | 52 +++- libmissing/m4/wint_t.m4 | 2 +- libmissing/malloc.c | 2 +- libmissing/malloca.c | 2 +- libmissing/malloca.h | 2 +- libmissing/memmem.c | 2 +- libmissing/minmax.h | 2 +- libmissing/mktime.c | 2 +- libmissing/netinet_in.in.h | 43 ++ libmissing/netinet_in_.h | 43 -- libmissing/pathmax.h | 2 +- libmissing/poll.c | 2 +- libmissing/poll.in.h | 53 +++ libmissing/poll_.h | 53 --- libmissing/printf-args.c | 2 +- libmissing/printf-args.h | 2 +- libmissing/printf-parse.c | 27 +- libmissing/printf-parse.h | 2 +- libmissing/realloc.c | 42 ++- libmissing/ref-add.sin | 2 +- libmissing/ref-del.sin | 2 +- libmissing/regcomp.c | 2 +- libmissing/regex.c | 2 +- libmissing/regex.h | 2 +- libmissing/regex_internal.c | 2 +- libmissing/regex_internal.h | 2 +- libmissing/regexec.c | 2 +- libmissing/size_max.h | 2 +- libmissing/snprintf.c | 2 +- libmissing/stdbool.in.h | 119 +++++ libmissing/stdbool_.h | 118 ----- libmissing/stdint.in.h | 516 ++++++++++++++++++++++ libmissing/stdint_.h | 508 ---------------------- libmissing/stdio.in.h | 382 +++++++++++++++++ libmissing/stdio_.h | 356 ---------------- libmissing/stdlib.in.h | 185 ++++++++ libmissing/stdlib_.h | 177 -------- libmissing/strcasecmp.c | 2 +- libmissing/strcasestr.c | 2 +- libmissing/strdup.c | 2 +- libmissing/string.in.h | 563 ++++++++++++++++++++++++ libmissing/string_.h | 565 ------------------------ libmissing/strncasecmp.c | 2 +- libmissing/strndup.c | 2 +- libmissing/strnlen.c | 2 +- libmissing/strpbrk.c | 2 +- libmissing/strptime.c | 2 +- libmissing/strsep.c | 2 +- libmissing/sys_select.in.h | 43 ++ libmissing/sys_select_.h | 43 -- libmissing/sys_socket.in.h | 91 ++++ libmissing/sys_socket_.h | 91 ---- libmissing/sys_time.in.h | 52 +++ libmissing/sys_time_.h | 52 --- libmissing/time.in.h | 114 +++++ libmissing/time_.h | 114 ----- libmissing/time_r.c | 2 +- libmissing/timegm.c | 2 +- libmissing/unistd.in.h | 262 ++++++++++++ libmissing/unistd_.h | 262 ------------ libmissing/vasnprintf.c | 924 +++++++++++++++++++++++++++++++++++----- libmissing/vasnprintf.h | 2 +- libmissing/vsnprintf.c | 2 +- libmissing/wchar.in.h | 82 ++++ libmissing/wchar_.h | 82 ---- libmissing/wctype.in.h | 161 +++++++ libmissing/wctype_.h | 161 ------- libmissing/xsize.h | 2 +- 103 files changed, 4010 insertions(+), 3091 deletions(-) commit 461c3933a8ff6ccf39c955f46e3c890eee491e12 Author: Yoann Vandoorselaere Date: Wed Nov 21 16:32:37 2007 +0000 Improve error message in case of locking error. git-svn-id: file:///home/yoann/SVN/libprelude/trunk@10064 09c5ec92-17d4-0310-903a-819935f44dba src/prelude-failover.c | 9 +++++---- 1 files changed, 5 insertions(+), 4 deletions(-) commit dcce18cd0e9090ea8a7436d45744b31b2db1f33e Author: Yoann Vandoorselaere Date: Tue Nov 20 09:01:39 2007 +0000 Fix invalid use of 'GNUTLS_X509_CRT_LIST_IMPORT_FAIL_IF_EXCEED' with early GnuTLS version (close #268). git-svn-id: file:///home/yoann/SVN/libprelude/trunk@10061 09c5ec92-17d4-0310-903a-819935f44dba prelude-admin/prelude-admin.c | 2 +- src/include/tls-util.h | 2 +- src/tls-util.c | 8 ++++---- 3 files changed, 6 insertions(+), 6 deletions(-) commit f3d82a62c9d94f4080d3616368fd86d4a13d5078 Author: Yoann Vandoorselaere Date: Mon Nov 12 16:34:52 2007 +0000 Small improvement to the way pthread_cond_timedwait() absolute time is computed. git-svn-id: file:///home/yoann/SVN/libprelude/trunk@10039 09c5ec92-17d4-0310-903a-819935f44dba src/prelude-async.c | 40 +++++++++++++++++++++++----------------- 1 files changed, 23 insertions(+), 17 deletions(-) commit 0cbfdf6adc90edefecf0c5ca8e3b0bd39a31a307 Author: Yoann Vandoorselaere Date: Wed Nov 7 15:44:28 2007 +0000 Send heartbeat as high priority message. It is important that heartbeat are delivred in time, since they give indication about the health of the system. git-svn-id: file:///home/yoann/SVN/libprelude/trunk@10032 09c5ec92-17d4-0310-903a-819935f44dba src/idmef-message-write.c | 2 ++ .../GenerateIDMEFMessageWriteC.pm | 4 ++++ 2 files changed, 6 insertions(+), 0 deletions(-) commit 72e5baa595b095481dbb39722b45a90278e2b760 Author: Yoann Vandoorselaere Date: Wed Nov 7 15:43:21 2007 +0000 Whitespace police. git-svn-id: file:///home/yoann/SVN/libprelude/trunk@10031 09c5ec92-17d4-0310-903a-819935f44dba src/idmef-message-write.c | 524 +++++++++++--------- .../GenerateIDMEFMessageWriteC.pm | 234 +++++----- 2 files changed, 394 insertions(+), 364 deletions(-) commit 0bdf2719200bd949bdc05539875f28ccd9a8668b Author: Yoann Vandoorselaere Date: Fri Nov 2 12:57:48 2007 +0000 Patch from Pierre Chifflier to propagate CC variable when building bindings (fix #264). git-svn-id: file:///home/yoann/SVN/libprelude/trunk@10024 09c5ec92-17d4-0310-903a-819935f44dba bindings/Makefile.am | 6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-) commit 07858866d5361becff471197558148152afeefcf Author: Sebastien Tricaud Date: Mon Oct 22 14:23:18 2007 +0000 (enhancement): More explicit data type assertions with idmef_foobar_ref() functions git-svn-id: file:///home/yoann/SVN/libprelude/trunk@10016 09c5ec92-17d4-0310-903a-819935f44dba src/idmef-tree-wrap.c | 420 +++++++++++----------- src/idmef-wrappers-gen/GenerateIDMEFTreeWrapC.pm | 14 +- 2 files changed, 217 insertions(+), 217 deletions(-) commit 56ad3082186d79bf323fd00ab06edcd39c706eb0 Author: Sebastien Tricaud Date: Mon Oct 22 14:20:09 2007 +0000 (enhancement): Improving assertion messages by separating variables check git-svn-id: file:///home/yoann/SVN/libprelude/trunk@10015 09c5ec92-17d4-0310-903a-819935f44dba src/idmef-tree-wrap.c | 153 ++++++++++++++------- src/idmef-wrappers-gen/GenerateIDMEFTreeWrapC.pm | 9 +- 2 files changed, 108 insertions(+), 54 deletions(-) commit 7cded7ea64409242fc699c118316abb2294b577a Author: Sebastien Tricaud Date: Fri Oct 19 14:46:45 2007 +0000 (enhancement): Improving assertion messages by separating variables check git-svn-id: file:///home/yoann/SVN/libprelude/trunk@10012 09c5ec92-17d4-0310-903a-819935f44dba src/prelude-string.c | 43 ++++++++++++++++++++++++++++++------------- 1 files changed, 30 insertions(+), 13 deletions(-) commit 12c24fd1776356ca2cfcb2e55b83f4179fb735c0 Author: Sebastien Tricaud Date: Fri Oct 19 14:41:49 2007 +0000 (enhancement): Improving assertion messages by separating variables check git-svn-id: file:///home/yoann/SVN/libprelude/trunk@10011 09c5ec92-17d4-0310-903a-819935f44dba src/prelude-io.c | 30 ++++++++++++++++++++++-------- 1 files changed, 22 insertions(+), 8 deletions(-) commit 6732fc49d8ffd3cdddb1418026c93d677289a83c Author: Sebastien Tricaud Date: Fri Oct 19 14:38:59 2007 +0000 (enhancement): Improving assertion messages by separating variables check git-svn-id: file:///home/yoann/SVN/libprelude/trunk@10010 09c5ec92-17d4-0310-903a-819935f44dba src/prelude-connection-pool.c | 21 ++++++++++++++------- 1 files changed, 14 insertions(+), 7 deletions(-) commit 4b2e8f558e3716bd1011128cba4f2af4b961d774 Author: Sebastien Tricaud Date: Fri Oct 19 14:36:54 2007 +0000 (enhancement): Improving assertion messages by separating variables check git-svn-id: file:///home/yoann/SVN/libprelude/trunk@10009 09c5ec92-17d4-0310-903a-819935f44dba src/prelude-connection.c | 21 ++++++++++++++------- 1 files changed, 14 insertions(+), 7 deletions(-) commit c432971f3ad1c48cbae6775f140f5ea1ce1aaba3 Author: Sebastien Tricaud Date: Fri Oct 19 14:33:47 2007 +0000 (enhancement): Improving assertion messages by separating variables check git-svn-id: file:///home/yoann/SVN/libprelude/trunk@10008 09c5ec92-17d4-0310-903a-819935f44dba src/prelude-client-profile.c | 43 +++++++++++++++++++++++++++++++---------- 1 files changed, 32 insertions(+), 11 deletions(-) commit b4db2c0d8e63ee040794fe014678233b88790ec2 Author: Sebastien Tricaud Date: Fri Oct 19 14:31:06 2007 +0000 (enhancement): Improving assertion messages by separating variables check git-svn-id: file:///home/yoann/SVN/libprelude/trunk@10007 09c5ec92-17d4-0310-903a-819935f44dba src/prelude-client.c | 21 +++++++++++++++------ 1 files changed, 15 insertions(+), 6 deletions(-) commit 9e999a98ae5a950798aa04b6a783ca8b2ca43a91 Author: Sebastien Tricaud Date: Fri Oct 19 14:26:15 2007 +0000 (enhancement): Improving assertion messages by separating variables check git-svn-id: file:///home/yoann/SVN/libprelude/trunk@10006 09c5ec92-17d4-0310-903a-819935f44dba src/idmef-time.c | 21 ++++++++++++++------- 1 files changed, 14 insertions(+), 7 deletions(-) commit 8862ff79fc5b71929a6e223517743a116c6adb02 Author: Sebastien Tricaud Date: Fri Oct 19 13:49:00 2007 +0000 (fix): whitespace police git-svn-id: file:///home/yoann/SVN/libprelude/trunk@10004 09c5ec92-17d4-0310-903a-819935f44dba src/idmef-data.c | 18 +++++++++--------- 1 files changed, 9 insertions(+), 9 deletions(-) commit c54107c0c14d869d598f49031f330702f52e2daf Author: Sebastien Tricaud Date: Fri Oct 19 13:47:20 2007 +0000 (bugfix): This assert should check the two values git-svn-id: file:///home/yoann/SVN/libprelude/trunk@10003 09c5ec92-17d4-0310-903a-819935f44dba src/idmef-criteria.c | 3 +-- 1 files changed, 1 insertions(+), 2 deletions(-) commit 4541253ba9d5914d881f9f4fa5578091c4cab169 Author: Sebastien Tricaud Date: Fri Oct 19 13:38:55 2007 +0000 (fix): whitespace police git-svn-id: file:///home/yoann/SVN/libprelude/trunk@10002 09c5ec92-17d4-0310-903a-819935f44dba src/idmef-value.c | 14 +++++++------- 1 files changed, 7 insertions(+), 7 deletions(-) commit 8ef528ef3820de007b433d957fb181c7a6eae01d Author: Sebastien Tricaud Date: Fri Oct 19 13:35:45 2007 +0000 (enhancement): Improving assertion messages by separating variables check git-svn-id: file:///home/yoann/SVN/libprelude/trunk@10001 09c5ec92-17d4-0310-903a-819935f44dba src/idmef-path.c | 10 +++++++--- 1 files changed, 7 insertions(+), 3 deletions(-) commit adb44e3f732e35df25e1351541c33ac8e0b84bad Author: Sebastien Tricaud Date: Fri Oct 19 13:24:21 2007 +0000 (enhancement): Improving assertion messages by separating variables check git-svn-id: file:///home/yoann/SVN/libprelude/trunk@10000 09c5ec92-17d4-0310-903a-819935f44dba src/idmef-value.c | 27 +++++++++++++++++++-------- 1 files changed, 19 insertions(+), 8 deletions(-) commit 099d6e7620c4837f93f1a4cd6268b77694a145b5 Author: Sebastien Tricaud Date: Fri Oct 19 13:24:00 2007 +0000 (enhancement): Improving assertion messages by separating variables check git-svn-id: file:///home/yoann/SVN/libprelude/trunk@9999 09c5ec92-17d4-0310-903a-819935f44dba src/idmef-data.c | 30 +++++++++++++++++++++--------- 1 files changed, 21 insertions(+), 9 deletions(-) commit 7d1919c119de13a9e3f3f4fe7e0eb987f1dae4af Author: Sebastien Tricaud Date: Fri Oct 19 13:23:30 2007 +0000 (enhancement): Improving assertion messages by separating variables check git-svn-id: file:///home/yoann/SVN/libprelude/trunk@9998 09c5ec92-17d4-0310-903a-819935f44dba src/idmef-criteria.c | 32 ++++++++++++++++++++++---------- 1 files changed, 22 insertions(+), 10 deletions(-) commit ca429a5642e449b972c6d4ae891621916e9d4ce1 Author: Yoann Vandoorselaere Date: Thu Oct 18 10:43:24 2007 +0000 Set appropriate umask() before creating failover files. Additionally set the failover file group writable. git-svn-id: file:///home/yoann/SVN/libprelude/trunk@9992 09c5ec92-17d4-0310-903a-819935f44dba src/prelude-failover.c | 27 ++++++++++++++++++++++----- 1 files changed, 22 insertions(+), 5 deletions(-) commit 3c4441d7fc1eefeb38612bbdbc9b340916f8764c Author: Yoann Vandoorselaere Date: Thu Oct 18 10:43:12 2007 +0000 Directory creation permissions fixes. Specify our own umask() before creating any profile with prelude-admin, so that the created group will always have the correct permissions. Make the profile backup directory group writable. The profile directory itself remain group readable. git-svn-id: file:///home/yoann/SVN/libprelude/trunk@9991 09c5ec92-17d4-0310-903a-819935f44dba prelude-admin/prelude-admin.c | 34 +++++++++++++++------------------- 1 files changed, 15 insertions(+), 19 deletions(-) commit 7f57844b5a95048f1803bef6f505b86401cc87cc Author: Yoann Vandoorselaere Date: Thu Oct 18 10:42:59 2007 +0000 Revert "Mask group write / other all permissions before creating any files." This reverts commit b0ce0a5e2a7604c9062fd463a37e4999a375994e. git-svn-id: file:///home/yoann/SVN/libprelude/trunk@9990 09c5ec92-17d4-0310-903a-819935f44dba prelude-admin/prelude-admin.c | 11 +++++++++-- 1 files changed, 9 insertions(+), 2 deletions(-) commit 105eee067d7ab29e3d02f711d3060611b817d734 Author: Yoann Vandoorselaere Date: Thu Oct 18 10:42:48 2007 +0000 Mask group write / other all permissions before creating any files. git-svn-id: file:///home/yoann/SVN/libprelude/trunk@9989 09c5ec92-17d4-0310-903a-819935f44dba prelude-admin/prelude-admin.c | 11 ++--------- 1 files changed, 2 insertions(+), 9 deletions(-) commit 1b6e03a253f1787f6ea29409e98202548e727023 Author: Yoann Vandoorselaere Date: Thu Oct 18 10:40:22 2007 +0000 Correctly format "send" command help output. git-svn-id: file:///home/yoann/SVN/libprelude/trunk@9988 09c5ec92-17d4-0310-903a-819935f44dba prelude-admin/prelude-admin.c | 6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-) commit 0ae005f6c37c8870abbd695f735e86416ad026d0 Author: Sebastien Tricaud Date: Mon Oct 8 12:51:28 2007 +0000 (fix): when the analyzer has a white space in its name git-svn-id: file:///home/yoann/SVN/libprelude/trunk@9976 09c5ec92-17d4-0310-903a-819935f44dba src/prelude-client.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) commit d412fb7d5a2a1ecd999c3a883ac37e8d41f7ddb9 Author: Yoann Vandoorselaere Date: Mon Oct 1 12:47:35 2007 +0000 Update NEWS, documentation. Bump version number. git-svn-id: file:///home/yoann/SVN/libprelude/trunk@9959 09c5ec92-17d4-0310-903a-819935f44dba NEWS | 18 +++++++++++++++++- configure.in | 6 +++--- docs/api/libprelude-decl.txt | 2 +- 3 files changed, 21 insertions(+), 5 deletions(-) commit 71b33913b1f05cc2c9f7ab9b8bb641a657c86ee0 Author: Yoann Vandoorselaere Date: Mon Oct 1 12:47:24 2007 +0000 Update GnuLib code. git-svn-id: file:///home/yoann/SVN/libprelude/trunk@9958 09c5ec92-17d4-0310-903a-819935f44dba libmissing/Makefile.am | 63 ++++++++++++++ libmissing/m4/absolute-header.m4 | 49 +++++++++++ libmissing/m4/extensions.m4 | 52 ++++++++--- libmissing/m4/getaddrinfo.m4 | 4 +- libmissing/m4/getdelim.m4 | 4 +- libmissing/m4/getline.m4 | 4 +- libmissing/m4/gnulib-comp.m4 | 35 ++++++-- libmissing/m4/malloc.m4 | 41 +++++++++ libmissing/m4/memmem.m4 | 4 +- libmissing/m4/realloc.m4 | 23 +++++ libmissing/m4/regex.m4 | 4 +- libmissing/m4/stdlib_h.m4 | 35 ++++++++ libmissing/m4/string_h.m4 | 3 + libmissing/m4/strndup.m4 | 6 +- libmissing/m4/strnlen.m4 | 6 +- libmissing/m4/strsep.m4 | 4 +- libmissing/malloc.c | 30 ++++++- libmissing/realloc.c | 65 ++++++++++++++ libmissing/stdio_.h | 27 +++--- libmissing/stdlib_.h | 177 ++++++++++++++++++++++++++++++++++++++ libmissing/string_.h | 17 ++++ 21 files changed, 597 insertions(+), 56 deletions(-) commit 9d92f2e8f60d4fe9982c032370b7d81fe5818e86 Author: Yoann Vandoorselaere Date: Mon Oct 1 10:49:53 2007 +0000 Correct prelude-admin "list" command help. git-svn-id: file:///home/yoann/SVN/libprelude/trunk@9957 09c5ec92-17d4-0310-903a-819935f44dba prelude-admin/prelude-admin.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) commit 04fdc1ca32e49aca8b155fd1bd4c26ee7ba88877 Author: Yoann Vandoorselaere Date: Mon Oct 1 10:41:31 2007 +0000 Correct printing of IDMEF time field when they use a different GMT offset than local. git-svn-id: file:///home/yoann/SVN/libprelude/trunk@9956 09c5ec92-17d4-0310-903a-819935f44dba src/idmef-message-print.c | 4 ++-- .../GenerateIDMEFMessagePrintC.pm | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) commit e7d30b68ed18aef5329248b094311a18530ddcd5 Author: Yoann Vandoorselaere Date: Mon Oct 1 10:41:22 2007 +0000 Whitespace police. git-svn-id: file:///home/yoann/SVN/libprelude/trunk@9955 09c5ec92-17d4-0310-903a-819935f44dba src/idmef-message-print.c | 3120 ++++++++++---------- .../GenerateIDMEFMessagePrintC.pm | 274 +- 2 files changed, 1697 insertions(+), 1697 deletions(-) commit 76c19a33138ac9261748cada8ae2eeea4dfd0166 Author: Yoann Vandoorselaere Date: Fri Sep 7 16:04:14 2007 +0000 Implement multiple analyzer deletion. Correct error reporting in case we get FTW_DNR. git-svn-id: file:///home/yoann/SVN/libprelude/trunk@9899 09c5ec92-17d4-0310-903a-819935f44dba prelude-admin/prelude-admin.c | 22 ++++++++++++---------- 1 files changed, 12 insertions(+), 10 deletions(-) commit 68b8ec43838cfb19ce766d24c8161bb891e371f3 Author: Yoann Vandoorselaere Date: Fri Sep 7 15:51:24 2007 +0000 Implement prelude-admin (list [-l]). Multiple improvement to the utility, including handling of the --help command line option, and other bug fixes. git-svn-id: file:///home/yoann/SVN/libprelude/trunk@9898 09c5ec92-17d4-0310-903a-819935f44dba prelude-admin/prelude-admin.c | 515 ++++++++++++++++++++++++++++++++--------- 1 files changed, 408 insertions(+), 107 deletions(-) commit 0f7ab7d305f8b65075e14bb3d706b24a05aef7ad Author: Yoann Vandoorselaere Date: Fri Sep 7 13:21:58 2007 +0000 Implement _prelude_tls_crt_list_import() function, which use gnutls_x509_crt_list_import() if available, or it's own implementation (which deprecate load_individual_cert). git-svn-id: file:///home/yoann/SVN/libprelude/trunk@9897 09c5ec92-17d4-0310-903a-819935f44dba configure.in | 2 + src/include/tls-util.h | 5 +- src/tls-auth.c | 58 ++++++++++++++--- src/tls-util.c | 163 ++++++++++++++++++++++++++++-------------------- 4 files changed, 150 insertions(+), 78 deletions(-) commit e5ea34619379a84dad4bbf58185f846add4d5049 Author: Yoann Vandoorselaere Date: Fri Sep 7 09:45:00 2007 +0000 Patch to avoid struct typespec redefinition, due to variable mispelling. This fixes a compilation problem on OpenBSD 3.8. git-svn-id: file:///home/yoann/SVN/libprelude/trunk@9896 09c5ec92-17d4-0310-903a-819935f44dba libmissing/m4/time_h.m4 | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) commit 77305a4722e450067569ad1cf4964e9be2be0807 Author: Yoann Vandoorselaere Date: Tue Sep 4 14:40:17 2007 +0000 Update NEWS, documentation, bump version number. git-svn-id: file:///home/yoann/SVN/libprelude/trunk@9882 09c5ec92-17d4-0310-903a-819935f44dba NEWS | 17 +++++++++ configure.in | 4 +- docs/api/libprelude-decl.txt | 74 ++++++++++++++++++++++---------------- docs/api/libprelude-sections.txt | 17 ++++----- 4 files changed, 70 insertions(+), 42 deletions(-) commit 023b80cb7e7fc8e11b99b8bd3938c085a0972ad4 Author: Yoann Vandoorselaere Date: Tue Sep 4 14:40:10 2007 +0000 prelude-error API documentation. git-svn-id: file:///home/yoann/SVN/libprelude/trunk@9881 09c5ec92-17d4-0310-903a-819935f44dba src/libprelude-error/prelude-error.c | 87 +++++++++++++++++++++++++++++- src/libprelude-error/prelude-error.h.in | 4 +- 2 files changed, 86 insertions(+), 5 deletions(-) commit fbb840d0ba9f045f6424a207e982c0af1d99e559 Author: Yoann Vandoorselaere Date: Tue Sep 4 13:57:11 2007 +0000 Write the forked PID to the specified pidfile (0.9.15 regression) (fix #257). git-svn-id: file:///home/yoann/SVN/libprelude/trunk@9880 09c5ec92-17d4-0310-903a-819935f44dba src/daemonize.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) commit 8cf3c1d969838734bae72c174f663a7fbebfb6bc Author: Yoann Vandoorselaere Date: Tue Sep 4 13:57:05 2007 +0000 Minor code cleanup. git-svn-id: file:///home/yoann/SVN/libprelude/trunk@9879 09c5ec92-17d4-0310-903a-819935f44dba src/idmef-criteria.c | 8 ++------ 1 files changed, 2 insertions(+), 6 deletions(-) commit 1a88706127db18c2371734e9f9d52ca8bb26dee5 Author: Yoann Vandoorselaere Date: Tue Sep 4 12:58:21 2007 +0000 Fix double free on idmef_criterion_value_t cloned regexp object. (thanks to Helmut Azbest for pointing out the issue). Additionally, we don't clone the backend value anymore since the caller has no way of modyfing it after it is compiled. git-svn-id: file:///home/yoann/SVN/libprelude/trunk@9876 09c5ec92-17d4-0310-903a-819935f44dba src/idmef-criterion-value.c | 45 ++++++++++++++++++++++--------------------- 1 files changed, 23 insertions(+), 22 deletions(-) commit 8e35bde7a1b14f3a36e215a2097ffb4bd54cf917 Author: Yoann Vandoorselaere Date: Tue Sep 4 12:58:12 2007 +0000 Remove unused list member, and avoid copying when it is not needed. git-svn-id: file:///home/yoann/SVN/libprelude/trunk@9875 09c5ec92-17d4-0310-903a-819935f44dba src/idmef-criteria.c | 4 +--- 1 files changed, 1 insertions(+), 3 deletions(-) commit 7b0cd57e21a86283cbbf9ea294b08334846265cd Author: Yoann Vandoorselaere Date: Tue Sep 4 12:57:58 2007 +0000 Fix warning due to earlier prelude-error un-inlining. git-svn-id: file:///home/yoann/SVN/libprelude/trunk@9874 09c5ec92-17d4-0310-903a-819935f44dba src/prelude-option-wide.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) commit 1887245508627e45df50a7197cce55ecac591e99 Author: Yoann Vandoorselaere Date: Tue Sep 4 12:57:54 2007 +0000 Whitespace police. git-svn-id: file:///home/yoann/SVN/libprelude/trunk@9873 09c5ec92-17d4-0310-903a-819935f44dba src/prelude-option-wide.c | 168 ++++++++++++++++++++++---------------------- 1 files changed, 84 insertions(+), 84 deletions(-) commit b5e1f8b48381f310118b589ddf924e74361a159b Author: Yoann Vandoorselaere Date: Tue Sep 4 12:57:49 2007 +0000 Allow Python thread to run, while entering libprelude C function. Avoid Python thread from stalling while blocking libprelude function are waiting. git-svn-id: file:///home/yoann/SVN/libprelude/trunk@9872 09c5ec92-17d4-0310-903a-819935f44dba bindings/libprelude_python.i | 6 ++++++ 1 files changed, 6 insertions(+), 0 deletions(-) commit 3b0f1cbf7d02e7f183db8745fedca52907834aeb Author: Yoann Vandoorselaere Date: Fri Aug 31 07:15:59 2007 +0000 Prevent possible NULL pointer dereference on destroy() error. git-svn-id: file:///home/yoann/SVN/libprelude/trunk@9871 09c5ec92-17d4-0310-903a-819935f44dba src/prelude-plugin.c | 20 +++++++++++++++++++- 1 files changed, 19 insertions(+), 1 deletions(-) commit dec6f66261cbb6954a40d3176d70766ce1983951 Author: Yoann Vandoorselaere Date: Thu Aug 30 15:26:18 2007 +0000 Return PRELUDE_ERROR_ASSERTION when API check fail. git-svn-id: file:///home/yoann/SVN/libprelude/trunk@9870 09c5ec92-17d4-0310-903a-819935f44dba src/idmef-criteria.c | 24 +- src/idmef-data.c | 28 +- src/idmef-path.c | 26 +- src/idmef-time.c | 24 +- src/idmef-tree-wrap.c | 600 +++++++++++----------- src/idmef-value.c | 48 +- src/idmef-wrappers-gen/GenerateIDMEFTreeWrapC.pm | 20 +- src/libprelude-error/err-codes.h.in | 1 + src/prelude-client-profile.c | 8 +- src/prelude-client.c | 18 +- src/prelude-connection-pool.c | 18 +- src/prelude-connection.c | 20 +- src/prelude-io.c | 26 +- src/prelude-log.c | 2 +- src/prelude-string.c | 40 +- 15 files changed, 452 insertions(+), 451 deletions(-) commit 60d0b63469216657c64bf54962d595bd3dcb4785 Author: Yoann Vandoorselaere Date: Thu Aug 30 13:00:35 2007 +0000 Call the instance destroy() function on unsubscribe. Simplify plugin_desactivate() code. git-svn-id: file:///home/yoann/SVN/libprelude/trunk@9869 09c5ec92-17d4-0310-903a-819935f44dba src/prelude-plugin.c | 37 ++++++++++++++++++++----------------- 1 files changed, 20 insertions(+), 17 deletions(-) commit 3f21331f1b80b513ec114c1cbf38bf9ddbdcf3ed Author: Yoann Vandoorselaere Date: Thu Aug 30 11:29:53 2007 +0000 Do not inline prelude-error function when possible. This is done in order to prevent future change to the internal error handling from breaking ABI. git-svn-id: file:///home/yoann/SVN/libprelude/trunk@9868 09c5ec92-17d4-0310-903a-819935f44dba src/libprelude-error/Makefile.am | 2 +- src/libprelude-error/code-from-errno.c | 37 -------- src/libprelude-error/code-to-errno.c | 39 -------- src/libprelude-error/prelude-error.c | 150 +++++++++++++++++++++++++++++++ src/libprelude-error/prelude-error.h.in | 131 ++++++--------------------- 5 files changed, 179 insertions(+), 180 deletions(-) commit a61ea9a46801bac3400a4274f7b62a5a2fc924fd Author: Yoann Vandoorselaere Date: Wed Aug 29 10:39:58 2007 +0000 Update NEWS, bump version number. git-svn-id: file:///home/yoann/SVN/libprelude/trunk@9864 09c5ec92-17d4-0310-903a-819935f44dba NEWS | 13 +++++++++++++ configure.in | 4 ++-- docs/api/libprelude-decl.txt | 2 +- 3 files changed, 16 insertions(+), 3 deletions(-) commit 3cdbb8626620ad0bc0a3aa59ccd518208d4479aa Author: Yoann Vandoorselaere Date: Tue Aug 28 15:09:45 2007 +0000 Use prelude_return_if_fail() in place of prelude_log(). Emit a critical warning when trying to copy or clone an empty prelude-string. git-svn-id: file:///home/yoann/SVN/libprelude/trunk@9863 09c5ec92-17d4-0310-903a-819935f44dba src/prelude-string.c | 64 +++++++++++++------------------------------------ 1 files changed, 17 insertions(+), 47 deletions(-) commit a8683373383bef02b10e23ef8830fee9ed7f339b Author: Yoann Vandoorselaere Date: Tue Aug 28 11:05:52 2007 +0000 Fix for native awk limitation (fix #256). Include patch by Pierre Chifflier , to fix build error on system that use native awk implementation in place of GNU awk. git-svn-id: file:///home/yoann/SVN/libprelude/trunk@9862 09c5ec92-17d4-0310-903a-819935f44dba src/libprelude-error/mkerrcodes.awk | 3 +-- 1 files changed, 1 insertions(+), 2 deletions(-) commit 2bb4c1213efa70a8ba808bffcb2107959230b0f5 Author: Yoann Vandoorselaere Date: Fri Aug 24 09:05:13 2007 +0000 Correction to the 'prelude-admin send' help message. git-svn-id: file:///home/yoann/SVN/libprelude/trunk@9860 09c5ec92-17d4-0310-903a-819935f44dba prelude-admin/prelude-admin.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) commit 8de68bfb029fcd477141534f363070f629f38d05 Author: Yoann Vandoorselaere Date: Thu Aug 23 16:23:15 2007 +0000 Bump version number, update documentation, update NEWS. git-svn-id: file:///home/yoann/SVN/libprelude/trunk@9851 09c5ec92-17d4-0310-903a-819935f44dba NEWS | 53 +++++++++++++++++++++++++++++++++++ configure.in | 6 ++-- docs/api/libprelude-decl.txt | 22 ++++++++++++++- docs/api/libprelude-sections.txt | 4 ++ docs/api/tmpl/prelude-failover.sgml | 36 +++++++++++++++++++++++ 5 files changed, 117 insertions(+), 4 deletions(-) commit 048a2fbb23c4b6743b3ee19aba9c5383ab81d7b4 Author: Yoann Vandoorselaere Date: Thu Aug 23 16:06:40 2007 +0000 Fix warnings. git-svn-id: file:///home/yoann/SVN/libprelude/trunk@9850 09c5ec92-17d4-0310-903a-819935f44dba src/prelude-failover.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) commit 748a59f5f731b4d6864bbaac889c9339e340bed1 Author: Yoann Vandoorselaere Date: Thu Aug 23 16:05:55 2007 +0000 Fix make distcheck. git-svn-id: file:///home/yoann/SVN/libprelude/trunk@9849 09c5ec92-17d4-0310-903a-819935f44dba docs/manpages/Makefile.am | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) commit d928a4edfc66db9be564e971eea4c8ce6405660a Author: Yoann Vandoorselaere Date: Thu Aug 23 16:05:45 2007 +0000 Improved failover reporting. Check FD_SETSIZE in connection_pool_check_event(). git-svn-id: file:///home/yoann/SVN/libprelude/trunk@9848 09c5ec92-17d4-0310-903a-819935f44dba src/prelude-connection-pool.c | 19 ++++++++++++------- 1 files changed, 12 insertions(+), 7 deletions(-) commit 0bfd82f938f69c4fb431de127f6e6480bc87c010 Author: Yoann Vandoorselaere Date: Thu Aug 23 16:05:18 2007 +0000 Update GnuLib code. git-svn-id: file:///home/yoann/SVN/libprelude/trunk@9847 09c5ec92-17d4-0310-903a-819935f44dba libmissing/Makefile.am | 11 +++++++-- libmissing/getdelim.c | 15 ++++++++++--- libmissing/getdelim.h | 28 ------------------------- libmissing/getline.c | 5 +-- libmissing/getline.h | 28 ------------------------- libmissing/getpass.c | 2 - libmissing/m4/getdelim.m4 | 15 +++++++++---- libmissing/m4/getline.m4 | 24 +++++++++++---------- libmissing/m4/gnulib-cache.m4 | 4 +- libmissing/m4/gnulib-comp.m4 | 4 +- libmissing/m4/stdio_h.m4 | 5 ++++ libmissing/stdio_.h | 45 +++++++++++++++++++++++++++++++++++++++- 12 files changed, 96 insertions(+), 90 deletions(-) commit fcd8f933a4e8bc1a37c556e4d9884dd5c29e7f31 Author: Yoann Vandoorselaere Date: Thu Aug 23 15:10:24 2007 +0000 New Failover implementation. Feature a real 'journaling' log, allowing to restart where we were interupted. Doesn't spew file all over the failover like the older implementation. Allow multiple process to write to the same failover. git-svn-id: file:///home/yoann/SVN/libprelude/trunk@9846 09c5ec92-17d4-0310-903a-819935f44dba src/include/prelude-failover.h | 10 +- src/prelude-failover.c | 624 ++++++++++++++++++++++++++++------------ 2 files changed, 449 insertions(+), 185 deletions(-) commit 919801b3dc7c00acc39bf14fdc97c4be98d7b065 Author: Yoann Vandoorselaere Date: Wed Aug 22 14:46:06 2007 +0000 Continued prelude-async fixes. Avoid deadlock due to a Linux+Glibc bug, when calling pthread_exit() while joining from an atexit() callback (from a shared library). Seems related to: http://sources.redhat.com/bugzilla/show_bug.cgi?id=654 Don't use the atexit() callback at all on OpenBSD since it trigger a deadlock in the OpenBSD pthread code for which no workaround has been found. git-svn-id: file:///home/yoann/SVN/libprelude/trunk@9838 09c5ec92-17d4-0310-903a-819935f44dba src/prelude-async.c | 51 ++++++++++++++++++++++++++++++++++++--------------- 1 files changed, 36 insertions(+), 15 deletions(-) commit 3e55d069e2bca85077b2c45512aecdc8036fec28 Author: Yoann Vandoorselaere Date: Wed Aug 22 14:41:33 2007 +0000 Make spool and profile directory use mode 711 rather than 755. git-svn-id: file:///home/yoann/SVN/libprelude/trunk@9837 09c5ec92-17d4-0310-903a-819935f44dba Makefile.am | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) commit 4ad931a41260c7c14f12007972e8e95d56faa568 Author: Yoann Vandoorselaere Date: Wed Aug 22 10:28:53 2007 +0000 Handle getcwd() error more friendly. getcwd() could return an error in case of permission problem, leading to prelude_init() returning an error. git-svn-id: file:///home/yoann/SVN/libprelude/trunk@9836 09c5ec92-17d4-0310-903a-819935f44dba src/common.c | 15 ++++++++++++--- src/prelude.c | 2 +- 2 files changed, 13 insertions(+), 4 deletions(-) commit 46a68613ce533b2ab0e0184618bbaa41b8ad312e Author: Yoann Vandoorselaere Date: Wed Aug 22 10:26:13 2007 +0000 Fix a long time issue where all files permission wouldn't be updated in case the user is registering an existing profile with new permission. Fix a possible crash introduced in an earlier commit, because of a va_list being reused. git-svn-id: file:///home/yoann/SVN/libprelude/trunk@9835 09c5ec92-17d4-0310-903a-819935f44dba prelude-admin/prelude-admin.c | 167 ++++++++++++++++++++--------------------- 1 files changed, 82 insertions(+), 85 deletions(-) commit 976632c35a95b4529e91a952d90a02e1272cdd6d Author: Yoann Vandoorselaere Date: Wed Aug 22 10:25:59 2007 +0000 Coding style fix. git-svn-id: file:///home/yoann/SVN/libprelude/trunk@9834 09c5ec92-17d4-0310-903a-819935f44dba prelude-admin/tls-register.c | 3 +-- 1 files changed, 1 insertions(+), 2 deletions(-) commit 12b7f8559756496e8a84ccfb4bdf32ab3c94f788 Author: Yoann Vandoorselaere Date: Mon Aug 20 15:16:20 2007 +0000 Update GnuLib code. git-svn-id: file:///home/yoann/SVN/libprelude/trunk@9826 09c5ec92-17d4-0310-903a-819935f44dba libmissing/fseeko.c | 4 +++- libmissing/lseek.c | 22 +++++++++++++++++++--- libmissing/m4/lseek.m4 | 6 +++--- 3 files changed, 25 insertions(+), 7 deletions(-) commit d67c5258a274df13704c958518969aea324904c6 Author: Yoann Vandoorselaere Date: Mon Aug 20 15:03:05 2007 +0000 Fix gcry_set_progress_handler() warnings. git-svn-id: file:///home/yoann/SVN/libprelude/trunk@9825 09c5ec92-17d4-0310-903a-819935f44dba prelude-admin/tls-register.c | 1 + 1 files changed, 1 insertions(+), 0 deletions(-) commit b03d46efe6368d012fb6c8ae20305fc96d5476ee Author: Yoann Vandoorselaere Date: Mon Aug 20 14:25:19 2007 +0000 Theses files shouldn't have been commited. git-svn-id: file:///home/yoann/SVN/libprelude/trunk@9824 09c5ec92-17d4-0310-903a-819935f44dba prelude-admin/Makefile | 815 ----------------------------------------- prelude-admin/Makefile.in | 815 ----------------------------------------- prelude-admin/prelude-adduser | 17 - prelude-admin/prelude-admin | 117 ------ 4 files changed, 0 insertions(+), 1764 deletions(-) commit 54a9d356987cffbdb76fa9b61f62d3ad7df15dfc Author: Yoann Vandoorselaere Date: Mon Aug 20 14:24:32 2007 +0000 Update print/send documentation. git-svn-id: file:///home/yoann/SVN/libprelude/trunk@9823 09c5ec92-17d4-0310-903a-819935f44dba prelude-admin/prelude-admin.c | 9 +++++---- 1 files changed, 5 insertions(+), 4 deletions(-) commit bda6cd5f41ad2e61c365c5a2a8611a617efe039c Author: Yoann Vandoorselaere Date: Mon Aug 20 14:24:19 2007 +0000 Improvement to Prelude-Admin: - Make the help text simpler. Output less text, and try to provide the user with obvious guideline. - Add a print/send command, to print or send a file containing binary IDMEF data. git-svn-id: file:///home/yoann/SVN/libprelude/trunk@9822 09c5ec92-17d4-0310-903a-819935f44dba prelude-admin/Makefile | 815 +++++++++++++++++++++++++++++++ prelude-admin/Makefile.in | 815 +++++++++++++++++++++++++++++++ prelude-admin/prelude-adduser | 17 + prelude-admin/prelude-admin | 117 +++++ prelude-admin/prelude-admin.c | 1062 +++++++++++++++++++++++++++-------------- prelude-admin/server.c | 138 +++--- prelude-admin/tls-register.c | 165 ++++---- prelude-admin/tls-register.h | 2 +- 8 files changed, 2618 insertions(+), 513 deletions(-) commit 368176b5e458956fabe050dabc462fd333826348 Author: Yoann Vandoorselaere Date: Mon Aug 20 08:35:56 2007 +0000 Add new status flags to check whether the client was initialized or not, rather than relying on the checksum which might remain NULL in some case. git-svn-id: file:///home/yoann/SVN/libprelude/trunk@9821 09c5ec92-17d4-0310-903a-819935f44dba src/prelude-client.c | 13 +++++++++---- 1 files changed, 9 insertions(+), 4 deletions(-) commit b62001759cd270c6b4a4c6e97251a96571adb401 Author: Yoann Vandoorselaere Date: Sun Aug 19 16:10:09 2007 +0000 Fix negative match of listed value. When matching multiple values within the same path using a negative operator, return an explicit 'no match' if the provided value was found at least once. git-svn-id: file:///home/yoann/SVN/libprelude/trunk@9820 09c5ec92-17d4-0310-903a-819935f44dba src/idmef-criterion-value.c | 40 ++++++++++++++++++++++------------------ 1 files changed, 22 insertions(+), 18 deletions(-) commit 9c4421155dd1c3dcb7405d151b45158226c65021 Author: Yoann Vandoorselaere Date: Sun Aug 19 16:09:50 2007 +0000 Ability to use string representation of log priority to set abort level. git-svn-id: file:///home/yoann/SVN/libprelude/trunk@9819 09c5ec92-17d4-0310-903a-819935f44dba src/include/prelude-log.h | 2 ++ src/prelude-log.c | 37 +++++++++++++++++++++++++++++++++++++ src/prelude.c | 9 ++++++--- 3 files changed, 45 insertions(+), 3 deletions(-) commit 2727b3058cc3f8b21edf1be8f3a9311e30f1315c Author: Yoann Vandoorselaere Date: Fri Aug 17 16:59:21 2007 +0000 Protect against bad prelude-io usage. git-svn-id: file:///home/yoann/SVN/libprelude/trunk@9818 09c5ec92-17d4-0310-903a-819935f44dba src/prelude-io.c | 12 ++++++++---- 1 files changed, 8 insertions(+), 4 deletions(-) commit 5a0cf85b41866415b43ab5c0c69ae07cd2b8c0d4 Author: Yoann Vandoorselaere Date: Fri Aug 17 16:54:22 2007 +0000 Only class element might not be the last element of a path. This is an additional fix for ticket #251, which should trigger prior to the [9809] error handling due to a NULL children list, but with a more descriptive error message (refs #251). git-svn-id: file:///home/yoann/SVN/libprelude/trunk@9817 09c5ec92-17d4-0310-903a-819935f44dba src/idmef-path.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) commit 8e518709e9741d8309b0406ec2c51423184d1244 Author: Yoann Vandoorselaere Date: Fri Aug 17 16:54:13 2007 +0000 Fix typo in function documentation. git-svn-id: file:///home/yoann/SVN/libprelude/trunk@9816 09c5ec92-17d4-0310-903a-819935f44dba src/idmef-path.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) commit e7ceabbd034725f8625eae36b5f50225de5ed263 Author: Yoann Vandoorselaere Date: Fri Aug 17 16:54:04 2007 +0000 Whitespace police. git-svn-id: file:///home/yoann/SVN/libprelude/trunk@9815 09c5ec92-17d4-0310-903a-819935f44dba src/idmef-criterion-value.c | 170 +++++++++++++++++++++--------------------- 1 files changed, 85 insertions(+), 85 deletions(-) commit fc8de4cddc38628dfddc127bdc66bf9e258c71d3 Author: Yoann Vandoorselaere Date: Fri Aug 17 16:53:43 2007 +0000 Improved error message. git-svn-id: file:///home/yoann/SVN/libprelude/trunk@9814 09c5ec92-17d4-0310-903a-819935f44dba src/prelude-client-profile.c | 9 +++++++++ 1 files changed, 9 insertions(+), 0 deletions(-) commit 4ea3961b0c06e6390314dbd1a5ffc9d467f7dfe5 Author: Yoann Vandoorselaere Date: Fri Aug 17 16:53:37 2007 +0000 Whitespace police. git-svn-id: file:///home/yoann/SVN/libprelude/trunk@9813 09c5ec92-17d4-0310-903a-819935f44dba prelude-admin/tls-register.c | 238 +++++++++++++++++++++--------------------- 1 files changed, 119 insertions(+), 119 deletions(-) commit b799059d46e481cb8ce6ace845c1f3498733c1b3 Author: Sebastien Tricaud Date: Fri Aug 17 13:52:31 2007 +0000 (bugfix,#251): Fixes segmentation fault when setting an invalid idmef child in the first place git-svn-id: file:///home/yoann/SVN/libprelude/trunk@9809 09c5ec92-17d4-0310-903a-819935f44dba src/idmef-class.c | 10 ++++++---- 1 files changed, 6 insertions(+), 4 deletions(-) commit 87698dad872932df0e087ae33880c79520a61566 Author: Yoann Vandoorselaere Date: Thu Aug 9 08:56:53 2007 +0000 GnuLib code update. git-svn-id: file:///home/yoann/SVN/libprelude/trunk@9784 09c5ec92-17d4-0310-903a-819935f44dba libmissing/float+.h | 148 +++++++++++++++++++++++ libmissing/float_.h | 59 +++++++++ libmissing/fseeko.c | 114 ++++++++++++++++++ libmissing/lseek.c | 46 +++++++ libmissing/m4/float_h.m4 | 19 +++ libmissing/m4/include_next.m4 | 107 +++++++++++++++++ libmissing/m4/lseek.m4 | 50 ++++++++ libmissing/m4/malloca.m4 | 14 ++ libmissing/m4/unistd_h.m4 | 56 +++++++++ libmissing/malloca.c | 137 +++++++++++++++++++++ libmissing/malloca.h | 124 +++++++++++++++++++ libmissing/malloca.valgrind | 7 + libmissing/unistd_.h | 262 +++++++++++++++++++++++++++++++++++++++++ 13 files changed, 1143 insertions(+), 0 deletions(-) commit 628d6741b16c4da2f6c2c85eec9228c58c7949cb Author: Yoann Vandoorselaere Date: Thu Aug 9 08:56:27 2007 +0000 Whitespace police. git-svn-id: file:///home/yoann/SVN/libprelude/trunk@9783 09c5ec92-17d4-0310-903a-819935f44dba prelude-admin/prelude-admin.c | 424 ++++++++++++++++++++-------------------- 1 files changed, 212 insertions(+), 212 deletions(-) commit 139aa41dd16337b2576fd4b90dfa585179a2121a Author: Yoann Vandoorselaere Date: Wed Aug 8 13:50:02 2007 +0000 Add missing IDMEF_CRITERION_OPERATOR_EQUAL_NOCASE and IDMEF_CRITERION_OPERATOR_NOT_EQUAL_NOCASE to idmef_criterion_operator_to_string(). git-svn-id: file:///home/yoann/SVN/libprelude/trunk@9778 09c5ec92-17d4-0310-903a-819935f44dba src/idmef-criteria.c | 3 +++ 1 files changed, 3 insertions(+), 0 deletions(-) commit 26b5883f33b25203220f887cb2f67d126ff52460 Author: Yoann Vandoorselaere Date: Wed Aug 8 13:49:52 2007 +0000 Update GnuLib code. git-svn-id: file:///home/yoann/SVN/libprelude/trunk@9777 09c5ec92-17d4-0310-903a-819935f44dba libmissing/Makefile.am | 146 ++- libmissing/allocsa.c | 137 -- libmissing/allocsa.h | 124 -- libmissing/allocsa.valgrind | 7 - libmissing/m4/absolute-header.m4 | 44 - libmissing/m4/allocsa.m4 | 14 - libmissing/m4/fseeko.m4 | 15 +- libmissing/m4/getaddrinfo.m4 | 31 +- libmissing/m4/gnulib-cache.m4 | 2 + libmissing/m4/gnulib-comp.m4 | 24 +- libmissing/m4/netinet_in_h.m4 | 6 +- libmissing/m4/regex.m4 | 15 +- libmissing/m4/stdint.m4 | 70 +- libmissing/m4/stdio_h.m4 | 33 +- libmissing/m4/string_h.m4 | 5 +- libmissing/m4/sys_select_h.m4 | 7 +- libmissing/m4/sys_socket_h.m4 | 7 +- libmissing/m4/sys_time_h.m4 | 6 +- libmissing/m4/time_h.m4 | 4 +- libmissing/m4/vasnprintf.m4 | 73 +- libmissing/m4/wchar.m4 | 39 +- libmissing/m4/wctype.m4 | 7 +- libmissing/m4/wint_t.m4 | 2 +- libmissing/netinet_in_.h | 14 +- libmissing/printf-args.c | 54 +- libmissing/printf-args.h | 24 +- libmissing/printf-parse.c | 65 +- libmissing/printf-parse.h | 115 ++- libmissing/regex_internal.h | 2 +- libmissing/stdint_.h | 20 +- libmissing/stdio_.h | 77 +- libmissing/strcasestr.c | 6 +- libmissing/string_.h | 26 +- libmissing/sys_select_.h | 14 +- libmissing/sys_socket_.h | 18 +- libmissing/sys_time_.h | 32 +- libmissing/time_.h | 100 +- libmissing/vasnprintf.c | 2753 +++++++++++++++++++++++++++++++++++--- libmissing/wchar_.h | 53 +- libmissing/wctype_.h | 18 +- 40 files changed, 3441 insertions(+), 768 deletions(-) commit 2b6c91393e13a6d7e44f14201c66ee4f6ccb7c58 Author: Yoann Vandoorselaere Date: Wed Aug 8 13:49:17 2007 +0000 Automatically switch to syslog mode if we detect stdout or stderr closure. git-svn-id: file:///home/yoann/SVN/libprelude/trunk@9776 09c5ec92-17d4-0310-903a-819935f44dba src/prelude-log.c | 98 +++++++++++++++++++++++++++++++++++++++-------------- 1 files changed, 72 insertions(+), 26 deletions(-) commit f428c5b1b35551f8cab75469c09f25b827431f38 Author: Yoann Vandoorselaere Date: Wed Aug 8 10:32:47 2007 +0000 Lock pidfile in the children, since advisory lock aren't shared accross fork(). Improved error reporting in case the lock is already held. Don't try to delete the lockfile on exit() (there is no problem with leaving it here since it is protected by the advisory lock) (fix #223). git-svn-id: file:///home/yoann/SVN/libprelude/trunk@9775 09c5ec92-17d4-0310-903a-819935f44dba src/daemonize.c | 41 +++++++++++------------------------------ 1 files changed, 11 insertions(+), 30 deletions(-) commit 0beca151fe08078d1ce186eb0653c5e99e9dd2a6 Author: Yoann Vandoorselaere Date: Wed Aug 8 10:32:22 2007 +0000 Whitespace police. git-svn-id: file:///home/yoann/SVN/libprelude/trunk@9774 09c5ec92-17d4-0310-903a-819935f44dba src/daemonize.c | 62 +++++++++++++++++++++++++++--------------------------- 1 files changed, 31 insertions(+), 31 deletions(-) commit f41b263b15975be2af07f980647bf1260617243b Author: Sebastien Tricaud Date: Thu Aug 2 12:57:41 2007 +0000 moved man directory to manpages just as in libpreludedb git-svn-id: file:///home/yoann/SVN/libprelude/trunk@9768 09c5ec92-17d4-0310-903a-819935f44dba configure.in | 2 +- docs/Makefile.am | 2 +- docs/man/Makefile.am | 2 - docs/man/prelude-admin.1 | 153 ----------------------------------------- docs/manpages/Makefile.am | 2 + docs/manpages/prelude-admin.1 | 153 +++++++++++++++++++++++++++++++++++++++++ 6 files changed, 157 insertions(+), 157 deletions(-) commit d99023520af11320b54fabc5db0662b4c8f25015 Author: Sebastien Tricaud Date: Thu Aug 2 12:51:43 2007 +0000 autotools: remove datarootdir setting warning git-svn-id: file:///home/yoann/SVN/libprelude/trunk@9767 09c5ec92-17d4-0310-903a-819935f44dba prelude-admin/prelude-adduser.in | 1 + 1 files changed, 1 insertions(+), 0 deletions(-) commit 4f4bc8dadf0c0b3bca2fc6e58999d33506549905 Author: Sebastien Tricaud Date: Wed Aug 1 19:59:09 2007 +0000 documentation: prelude-admin manpage included, thanks to Frederic Motte git-svn-id: file:///home/yoann/SVN/libprelude/trunk@9763 09c5ec92-17d4-0310-903a-819935f44dba configure.in | 1 + docs/Makefile.am | 2 +- docs/man/Makefile.am | 2 + docs/man/prelude-admin.1 | 153 ++++++++++++++++++++++++++++++++++++++++++++++ 4 files changed, 157 insertions(+), 1 deletions(-) commit ccd3a70144e1f9e8ced166165581568750ecfca0 Author: Sebastien Tricaud Date: Tue Jul 31 13:52:04 2007 +0000 prelude-admin: Add full path into shell script; move prelude-adduser.c into prelude-admin.c git-svn-id: file:///home/yoann/SVN/libprelude/trunk@9743 09c5ec92-17d4-0310-903a-819935f44dba configure.in | 1 + prelude-admin/prelude-adduser | 10 - prelude-admin/prelude-adduser.c | 1514 -------------------------------------- prelude-admin/prelude-adduser.in | 16 + prelude-admin/prelude-admin.c | 1514 ++++++++++++++++++++++++++++++++++++++ 5 files changed, 1531 insertions(+), 1524 deletions(-) commit a5664f33ef0c93dd46a1990cfadd984fdc38f864 Author: Sebastien Tricaud Date: Tue Jul 31 12:58:00 2007 +0000 s/prelude-adduser/prelude-admin/g git-svn-id: file:///home/yoann/SVN/libprelude/trunk@9742 09c5ec92-17d4-0310-903a-819935f44dba Makefile.am | 4 +- configure.in | 12 +- prelude-adduser/Makefile.am | 18 - prelude-adduser/prelude-adduser.c | 1514 ------------------------------------- prelude-adduser/server.c | 422 ----------- prelude-adduser/server.h | 27 - prelude-adduser/tls-register.c | 1002 ------------------------ prelude-adduser/tls-register.h | 44 -- prelude-admin/Makefile.am | 21 + prelude-admin/prelude-adduser | 10 + prelude-admin/prelude-adduser.c | 1514 +++++++++++++++++++++++++++++++++++++ prelude-admin/server.c | 422 +++++++++++ prelude-admin/server.h | 27 + prelude-admin/tls-register.c | 1002 ++++++++++++++++++++++++ prelude-admin/tls-register.h | 44 ++ src/prelude-client.c | 4 +- src/prelude-connection.c | 2 +- 17 files changed, 3051 insertions(+), 3038 deletions(-) commit 82237b70b2cfc72412e2f4a4307249e7c90af385 Author: Yoann Vandoorselaere Date: Mon Jul 9 13:04:07 2007 +0000 Always re-initialize _prelude_internal_(argc|argv) on prelude_init(). Additionally, handle the case where argc is 0. Fix #242. git-svn-id: file:///home/yoann/SVN/libprelude/trunk@9671 09c5ec92-17d4-0310-903a-819935f44dba src/prelude.c | 5 ++++- 1 files changed, 4 insertions(+), 1 deletions(-) commit ebb82d5cb011304e6caa622e9383f4f569154e1a Author: Yoann Vandoorselaere Date: Fri Jul 6 12:28:03 2007 +0000 Better handle the case where we try to match a value against an object that is not set (alert.classification.text != 'anything' should match if alert.classification.text is NULL). git-svn-id: file:///home/yoann/SVN/libprelude/trunk@9662 09c5ec92-17d4-0310-903a-819935f44dba src/idmef-criteria.c | 6 +++++- 1 files changed, 5 insertions(+), 1 deletions(-) commit 5edd0e21a52416b501b681a93da9e3fd42fd7e52 Author: Yoann Vandoorselaere Date: Sat Jun 16 09:04:34 2007 +0000 Don't call prelude_async_exit() from the atexit() callback. Since it seem to fail on some pthread implementation (although this should be valid). git-svn-id: file:///home/yoann/SVN/libprelude/trunk@9658 09c5ec92-17d4-0310-903a-819935f44dba src/prelude-async.c | 19 ++++++++++++++----- 1 files changed, 14 insertions(+), 5 deletions(-) commit 21c38e63e6225a74d69b140511b0d4bd0e200d35 Author: Yoann Vandoorselaere Date: Sat Jun 16 09:04:27 2007 +0000 Whitespace police. git-svn-id: file:///home/yoann/SVN/libprelude/trunk@9657 09c5ec92-17d4-0310-903a-819935f44dba src/prelude-plugin.c | 180 +++++++++++++++++++++++++------------------------- 1 files changed, 90 insertions(+), 90 deletions(-) commit 55bd5d7d42457e6b1db084a4b26aca66e9f72741 Author: Yoann Vandoorselaere Date: Sat Jun 16 08:48:21 2007 +0000 Use SHA1 in place of MD5 for Analyzer checksum. git-svn-id: file:///home/yoann/SVN/libprelude/trunk@9656 09c5ec92-17d4-0310-903a-819935f44dba src/prelude-client.c | 32 ++++++++++++++++---------------- 1 files changed, 16 insertions(+), 16 deletions(-) commit 8e77bea1ed0b72d2faa2f61a6d348659e615695d Author: Yoann Vandoorselaere Date: Sat Jun 16 08:20:30 2007 +0000 Make use of prelude_return_if_fail() to protect against bad API usage. Fix a possible race condition with prelude_client_t reference to idmef_analyzer_t. git-svn-id: file:///home/yoann/SVN/libprelude/trunk@9655 09c5ec92-17d4-0310-903a-819935f44dba src/prelude-client.c | 53 +++++++++++++++++++++++++++++++++++++++++++++---- 1 files changed, 48 insertions(+), 5 deletions(-) commit 56c8462b629fdd5c7c689ecf9f5c2619d37b78e8 Author: Yoann Vandoorselaere Date: Sat Jun 16 07:47:18 2007 +0000 New LIBPRELUDE_ABORT variable, useful if you want libprelude to abort on critical assertion. git-svn-id: file:///home/yoann/SVN/libprelude/trunk@9654 09c5ec92-17d4-0310-903a-819935f44dba docs/api/libprelude-decl.txt | 55 ++++++++++++++++++++------------------- docs/api/tmpl/prelude-log.sgml | 1 + src/include/prelude-log.h | 2 + src/prelude-log.c | 13 +++++++++ src/prelude.c | 5 +++ 5 files changed, 49 insertions(+), 27 deletions(-) commit f44d5f562f64e12b20582e5607076d28924ce718 Author: Yoann Vandoorselaere Date: Sat Jun 16 07:47:05 2007 +0000 Remove duplicated NULL check. git-svn-id: file:///home/yoann/SVN/libprelude/trunk@9653 09c5ec92-17d4-0310-903a-819935f44dba src/prelude-string.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) commit fd5060e828f1a6f6fce1b3d111daaecdd5923e53 Author: Yoann Vandoorselaere Date: Fri Jun 15 16:28:36 2007 +0000 Event callback is optional. git-svn-id: file:///home/yoann/SVN/libprelude/trunk@9644 09c5ec92-17d4-0310-903a-819935f44dba src/prelude-connection-pool.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) commit 9dfac3706df276fa059f103e13f740846793e372 Author: Yoann Vandoorselaere Date: Fri Jun 15 16:24:53 2007 +0000 Make use of prelude_return_if_fail() to protect against bad API usage. git-svn-id: file:///home/yoann/SVN/libprelude/trunk@9643 09c5ec92-17d4-0310-903a-819935f44dba src/idmef-criteria-string.yac.y | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) commit 90ff9dc94d4f4f24865da8d52b43da4595644e94 Author: Yoann Vandoorselaere Date: Fri Jun 15 15:52:28 2007 +0000 Fix warning. git-svn-id: file:///home/yoann/SVN/libprelude/trunk@9642 09c5ec92-17d4-0310-903a-819935f44dba src/prelude-connection-pool.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) commit 026968177410ac8b45a3a77f8b90a750ce2abc26 Author: Yoann Vandoorselaere Date: Fri Jun 15 15:48:29 2007 +0000 Make use of prelude_return_if_fail() to protect against bad API usage. Remove log prefix. git-svn-id: file:///home/yoann/SVN/libprelude/trunk@9641 09c5ec92-17d4-0310-903a-819935f44dba src/prelude-connection-pool.c | 36 +++++++++++++++++++++++++++++++++--- 1 files changed, 33 insertions(+), 3 deletions(-) commit c69d88cf3e39579fc37bb106511c4576a4d67584 Author: Yoann Vandoorselaere Date: Fri Jun 15 15:44:43 2007 +0000 Make use of prelude_return_if_fail() to protect against bad API usage. Remove log prefix. git-svn-id: file:///home/yoann/SVN/libprelude/trunk@9640 09c5ec92-17d4-0310-903a-819935f44dba src/prelude-connection.c | 41 ++++++++++++++++++++++++++++++++++++++--- 1 files changed, 38 insertions(+), 3 deletions(-) commit 976d958d89fbeecdcc7b7d30cba876fd79f1907d Author: Yoann Vandoorselaere Date: Fri Jun 15 15:41:46 2007 +0000 Remove log prefix. git-svn-id: file:///home/yoann/SVN/libprelude/trunk@9639 09c5ec92-17d4-0310-903a-819935f44dba src/tls-auth.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) commit d98a75c0654a812566babff69ca9436a60a623ac Author: Yoann Vandoorselaere Date: Fri Jun 15 15:38:30 2007 +0000 Brand new logging format. Include a timestamp, log level, and process name. git-svn-id: file:///home/yoann/SVN/libprelude/trunk@9638 09c5ec92-17d4-0310-903a-819935f44dba src/prelude-log.c | 54 +++++++++++++++++++++++++++++++++++----------------- 1 files changed, 36 insertions(+), 18 deletions(-) commit 9371cbc2d6e67e8167ff13da8f4a776fd68bc762 Author: Yoann Vandoorselaere Date: Fri Jun 15 15:34:58 2007 +0000 Make use of prelude_return_if_fail() to protect against bad API usage. git-svn-id: file:///home/yoann/SVN/libprelude/trunk@9637 09c5ec92-17d4-0310-903a-819935f44dba src/prelude-io.c | 24 ++++++++++++++++++++++++ 1 files changed, 24 insertions(+), 0 deletions(-) commit 20edeeaad1634aa81fd615b15356f151a8ae194d Author: Yoann Vandoorselaere Date: Fri Jun 15 15:32:38 2007 +0000 Make use of prelude_return_if_fail() to protect against bad API usage. git-svn-id: file:///home/yoann/SVN/libprelude/trunk@9636 09c5ec92-17d4-0310-903a-819935f44dba src/idmef-value.c | 78 ++++++++++++++++++++++++++++++++++++++++++++--------- 1 files changed, 65 insertions(+), 13 deletions(-) commit 63a899f9e499bb56ef68765f987e363c64e8e154 Author: Yoann Vandoorselaere Date: Fri Jun 15 15:28:15 2007 +0000 Whitespace police. git-svn-id: file:///home/yoann/SVN/libprelude/trunk@9635 09c5ec92-17d4-0310-903a-819935f44dba src/include/idmef-value.h | 7 ++++--- 1 files changed, 4 insertions(+), 3 deletions(-) commit db9057696638314228e84b1b595fb13470e5068e Author: Yoann Vandoorselaere Date: Fri Jun 15 15:24:33 2007 +0000 Make use of prelude_return_if_fail() to protect against bad API usage. Make some arguments const. git-svn-id: file:///home/yoann/SVN/libprelude/trunk@9634 09c5ec92-17d4-0310-903a-819935f44dba src/idmef-criteria.c | 73 ++++++++++++++++++++++++++++-------------- src/include/idmef-criteria.h | 24 +++++++------- 2 files changed, 61 insertions(+), 36 deletions(-) commit 64cc349f0ed15f790133160dcaa83ba215253dc6 Author: Yoann Vandoorselaere Date: Fri Jun 15 15:21:41 2007 +0000 Whitespace police. git-svn-id: file:///home/yoann/SVN/libprelude/trunk@9633 09c5ec92-17d4-0310-903a-819935f44dba src/idmef-class.c | 88 ++++++++++++++++++++++++++-------------------------- 1 files changed, 44 insertions(+), 44 deletions(-) commit 29d98eab549ab8a11f7fcf3712bccb79e934efc2 Author: Yoann Vandoorselaere Date: Fri Jun 15 15:17:35 2007 +0000 Whitespace police. git-svn-id: file:///home/yoann/SVN/libprelude/trunk@9632 09c5ec92-17d4-0310-903a-819935f44dba src/include/idmef-criteria.h | 14 +++++++------- 1 files changed, 7 insertions(+), 7 deletions(-) commit d0fa20348e6e42d0f351223f6471ab8b34229649 Author: Yoann Vandoorselaere Date: Fri Jun 15 15:14:23 2007 +0000 Whitespace police. git-svn-id: file:///home/yoann/SVN/libprelude/trunk@9631 09c5ec92-17d4-0310-903a-819935f44dba src/idmef-criteria.c | 214 +++++++++++++++++++++++++------------------------- 1 files changed, 107 insertions(+), 107 deletions(-) commit 8ef93cb018d85c695f8a2efd590b4789a1e37e45 Author: Yoann Vandoorselaere Date: Fri Jun 15 15:11:48 2007 +0000 Whitespace police. git-svn-id: file:///home/yoann/SVN/libprelude/trunk@9630 09c5ec92-17d4-0310-903a-819935f44dba src/prelude-io.c | 186 +++++++++++++++++++++++++++--------------------------- 1 files changed, 93 insertions(+), 93 deletions(-) commit d9f4d7b9bcf2d35a9210c395ecc6ff08225f92fc Author: Yoann Vandoorselaere Date: Fri Jun 15 15:07:11 2007 +0000 Make use of prelude_return_if_fail() to protect against bad API usage git-svn-id: file:///home/yoann/SVN/libprelude/trunk@9629 09c5ec92-17d4-0310-903a-819935f44dba src/idmef-time.c | 37 ++++++++++++++++++++++++++++++++++++- 1 files changed, 36 insertions(+), 1 deletions(-) commit 1e1e6860327f6038b658ca366ee5ab8f1114db53 Author: Yoann Vandoorselaere Date: Fri Jun 15 15:03:24 2007 +0000 Whitespace police. git-svn-id: file:///home/yoann/SVN/libprelude/trunk@9628 09c5ec92-17d4-0310-903a-819935f44dba src/idmef-time.c | 70 +++++++++++++++++++++++++++--------------------------- 1 files changed, 35 insertions(+), 35 deletions(-) commit 7b1f53bdc54d6698ab51ce840ffb9ebc4259c1dd Author: Yoann Vandoorselaere Date: Fri Jun 15 15:00:33 2007 +0000 Fix build break. git-svn-id: file:///home/yoann/SVN/libprelude/trunk@9627 09c5ec92-17d4-0310-903a-819935f44dba src/idmef-criteria-string.yac.y | 3 +-- 1 files changed, 1 insertions(+), 2 deletions(-) commit e42c86b53fd64e6d5996c88d84f2a1042cf2fc59 Author: Yoann Vandoorselaere Date: Fri Jun 15 14:57:16 2007 +0000 Make use of prelude_return_if_fail() to protect against bad API usage git-svn-id: file:///home/yoann/SVN/libprelude/trunk@9626 09c5ec92-17d4-0310-903a-819935f44dba src/idmef-criteria-string.yac.y | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) commit f322f19ca5984f9dc10eb612d2311ade36c0b474 Author: Yoann Vandoorselaere Date: Fri Jun 15 14:54:13 2007 +0000 Whitespace police. git-svn-id: file:///home/yoann/SVN/libprelude/trunk@9625 09c5ec92-17d4-0310-903a-819935f44dba src/idmef-criteria-string.yac.y | 246 +++++++++++++++++++------------------- 1 files changed, 123 insertions(+), 123 deletions(-) commit 29c1e445eb2d048e6f4ae252bfbfb02d69f8b42e Author: Yoann Vandoorselaere Date: Fri Jun 15 14:51:48 2007 +0000 Whitespace police. git-svn-id: file:///home/yoann/SVN/libprelude/trunk@9624 09c5ec92-17d4-0310-903a-819935f44dba src/idmef-value.c | 322 ++++++++++++++++++++++++++-------------------------- 1 files changed, 161 insertions(+), 161 deletions(-) commit a83d214a729b090abe64c08a2db9e6b8e07fdd55 Author: Yoann Vandoorselaere Date: Fri Jun 15 14:48:14 2007 +0000 Make use of prelude_return_if_fail() to protect against bad API usage git-svn-id: file:///home/yoann/SVN/libprelude/trunk@9623 09c5ec92-17d4-0310-903a-819935f44dba src/prelude-client-profile.c | 28 ++++++++++++++++++++++++++++ 1 files changed, 28 insertions(+), 0 deletions(-) commit 696a5d79df6e92112a1e2e61d616ebe9b0580677 Author: Yoann Vandoorselaere Date: Fri Jun 15 14:45:18 2007 +0000 Whitespace police. git-svn-id: file:///home/yoann/SVN/libprelude/trunk@9622 09c5ec92-17d4-0310-903a-819935f44dba src/prelude-client-profile.c | 64 +++++++++++++++++++++--------------------- 1 files changed, 32 insertions(+), 32 deletions(-) commit 2935cb9994d8ef645fa70c8e9715d605f6b4e7e7 Author: Yoann Vandoorselaere Date: Fri Jun 15 14:42:33 2007 +0000 Fix build breakage introduced when adding prelude_return_val_if_fail() support. git-svn-id: file:///home/yoann/SVN/libprelude/trunk@9621 09c5ec92-17d4-0310-903a-819935f44dba src/idmef-path.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) commit 6cd32bca36ed9ab8af3634e8d18be9d8f10c3c42 Author: Yoann Vandoorselaere Date: Fri Jun 15 14:38:46 2007 +0000 Whitespace police. git-svn-id: file:///home/yoann/SVN/libprelude/trunk@9620 09c5ec92-17d4-0310-903a-819935f44dba src/prelude-connection-pool.c | 318 ++++++++++++++++++++-------------------- 1 files changed, 159 insertions(+), 159 deletions(-) commit be15aa678ff8a676217eefe3415ef514dd4f7f71 Author: Yoann Vandoorselaere Date: Wed Jun 13 13:28:24 2007 +0000 Make use of prelude_return_if_fail() to protect against bad API usage git-svn-id: file:///home/yoann/SVN/libprelude/trunk@9612 09c5ec92-17d4-0310-903a-819935f44dba src/idmef-path.c | 38 ++++++++++++++++++++++++++++++++++++++ 1 files changed, 38 insertions(+), 0 deletions(-) commit 28c7b228a2e81ba8208b588cd23a95638b2b59b5 Author: Yoann Vandoorselaere Date: Wed Jun 13 13:28:15 2007 +0000 Whitespace police. git-svn-id: file:///home/yoann/SVN/libprelude/trunk@9611 09c5ec92-17d4-0310-903a-819935f44dba src/idmef-path.c | 212 +++++++++++++++++++++++++++--------------------------- 1 files changed, 106 insertions(+), 106 deletions(-) commit edcd682b37202d187768068c302278dc55f58c5e Author: Yoann Vandoorselaere Date: Wed Jun 13 13:28:09 2007 +0000 Change fatal alert logging to priority warning. git-svn-id: file:///home/yoann/SVN/libprelude/trunk@9610 09c5ec92-17d4-0310-903a-819935f44dba src/tls-auth.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) commit 8e454312b4298964d491d3867c948be714d6e2a5 Author: Yoann Vandoorselaere Date: Wed Jun 13 13:27:46 2007 +0000 Whitespace police. git-svn-id: file:///home/yoann/SVN/libprelude/trunk@9609 09c5ec92-17d4-0310-903a-819935f44dba src/tls-auth.c | 78 ++++++++++++++++++++++++++++---------------------------- 1 files changed, 39 insertions(+), 39 deletions(-) commit 934a9bb77baffba311b8206ac3ea685fd3ef93ef Author: Yoann Vandoorselaere Date: Wed Jun 13 13:27:37 2007 +0000 In case we can't map to a specific syslog priority, revert to LOG_INFO. git-svn-id: file:///home/yoann/SVN/libprelude/trunk@9608 09c5ec92-17d4-0310-903a-819935f44dba src/prelude-log.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) commit 14de8abfb2766f31d9af5112048fddf73ae3c10e Author: Yoann Vandoorselaere Date: Wed Jun 13 13:27:05 2007 +0000 Make use of prelude_return_if_fail() to protect against bad API usage git-svn-id: file:///home/yoann/SVN/libprelude/trunk@9607 09c5ec92-17d4-0310-903a-819935f44dba src/idmef-data.c | 37 ++++++++++++++++++++++++++++++++++++- 1 files changed, 36 insertions(+), 1 deletions(-) commit ce49471d246bf676379a5162e286a4c7125c1099 Author: Yoann Vandoorselaere Date: Wed Jun 13 13:26:56 2007 +0000 Fix build breakage introduced with prelude_return_if_fail() addition. git-svn-id: file:///home/yoann/SVN/libprelude/trunk@9606 09c5ec92-17d4-0310-903a-819935f44dba src/prelude-string.c | 6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-) commit f702525d946e027520544c753a5967e3ccc477ee Author: Yoann Vandoorselaere Date: Wed Jun 13 13:26:44 2007 +0000 Whitespace police. git-svn-id: file:///home/yoann/SVN/libprelude/trunk@9605 09c5ec92-17d4-0310-903a-819935f44dba src/include/prelude-string.h | 20 ++++++++++---------- 1 files changed, 10 insertions(+), 10 deletions(-) commit 216c428178dafa14cda293b515bf577adcec45df Author: Yoann Vandoorselaere Date: Wed Jun 13 13:26:30 2007 +0000 Whitespace police. git-svn-id: file:///home/yoann/SVN/libprelude/trunk@9604 09c5ec92-17d4-0310-903a-819935f44dba src/idmef-data.c | 270 +++++++++++++++++++++++++++--------------------------- 1 files changed, 135 insertions(+), 135 deletions(-) commit 38d007febb83d48d77313ee587acf5f2a34a2583 Author: Yoann Vandoorselaere Date: Wed Jun 13 13:26:15 2007 +0000 Whitespace police. git-svn-id: file:///home/yoann/SVN/libprelude/trunk@9603 09c5ec92-17d4-0310-903a-819935f44dba src/idmef-additional-data.c | 170 +++++++++++++++++++++--------------------- 1 files changed, 85 insertions(+), 85 deletions(-) commit ce70290b0712f6be2b0fb57c819ba39920b9464b Author: Yoann Vandoorselaere Date: Wed Jun 13 13:25:59 2007 +0000 Make use of prelude_return_if_fail() to protect against bad API usage git-svn-id: file:///home/yoann/SVN/libprelude/trunk@9602 09c5ec92-17d4-0310-903a-819935f44dba src/prelude-string.c | 48 ++++++++++++++++++++++++++++++++++++++++++++++-- 1 files changed, 46 insertions(+), 2 deletions(-) commit 11988e0efff85d789d44f5a9a61abffb570538f9 Author: Yoann Vandoorselaere Date: Wed Jun 13 13:25:39 2007 +0000 Whitespace police. git-svn-id: file:///home/yoann/SVN/libprelude/trunk@9601 09c5ec92-17d4-0310-903a-819935f44dba src/prelude-string.c | 138 +++++++++++++++++++++++++------------------------- 1 files changed, 69 insertions(+), 69 deletions(-) commit 5ebe531d7f5201c0fceb347cee5f95498a004704 Author: Yoann Vandoorselaere Date: Wed Jun 13 13:25:13 2007 +0000 Use prelude_return_if_fail / prelude_return_val_if_fail macros. git-svn-id: file:///home/yoann/SVN/libprelude/trunk@9600 09c5ec92-17d4-0310-903a-819935f44dba src/idmef-tree-wrap.c | 1421 ++++++++++++++++++++++ src/idmef-wrappers-gen/GenerateIDMEFTreeWrapC.pm | 54 +- 2 files changed, 1473 insertions(+), 2 deletions(-) commit ad8d1e0f869cbe927728a878af6a7a7f4e262df5 Author: Yoann Vandoorselaere Date: Wed Jun 13 13:24:56 2007 +0000 New macro: prelude_return_val_if_fail() and prelude_return_if_fail(). git-svn-id: file:///home/yoann/SVN/libprelude/trunk@9599 09c5ec92-17d4-0310-903a-819935f44dba src/include/common.h | 21 ++++++++++++++++++++- 1 files changed, 20 insertions(+), 1 deletions(-) commit 4ffa7fb337c6227a992db6c3c9b0907f17bf00b5 Author: Yoann Vandoorselaere Date: Wed Jun 13 13:24:47 2007 +0000 Improve logging subsystem. New PRELUDE_LOG_CRIT level. Correctly map Prelude level to Syslog priority. Improved logging (include process PID and priority). git-svn-id: file:///home/yoann/SVN/libprelude/trunk@9598 09c5ec92-17d4-0310-903a-819935f44dba src/include/prelude-log.h | 10 +++++--- src/prelude-log.c | 49 +++++++++++++++++++++++++++++++++++++++----- 2 files changed, 49 insertions(+), 10 deletions(-) commit df3da4a423038d8eb0a112953391cda63c0ec6d4 Author: Yoann Vandoorselaere Date: Wed Jun 13 13:24:12 2007 +0000 Whitespace police. git-svn-id: file:///home/yoann/SVN/libprelude/trunk@9597 09c5ec92-17d4-0310-903a-819935f44dba src/include/prelude-log.h | 31 +++++++++++++++---------------- src/prelude-log.c | 38 +++++++++++++++++++------------------- 2 files changed, 34 insertions(+), 35 deletions(-) commit 7302323ab07277de9d86b611b371941fbbb3cb1b Author: Yoann Vandoorselaere Date: Wed Jun 13 13:23:58 2007 +0000 Whitespace police. git-svn-id: file:///home/yoann/SVN/libprelude/trunk@9596 09c5ec92-17d4-0310-903a-819935f44dba src/common.c | 148 +++++++++++++++++++++++++++++----------------------------- 1 files changed, 74 insertions(+), 74 deletions(-) commit c9362908ee2c598510610707ab2cbcb73d40cf7e Author: Yoann Vandoorselaere Date: Wed Jun 13 13:23:49 2007 +0000 Whitespace police. git-svn-id: file:///home/yoann/SVN/libprelude/trunk@9595 09c5ec92-17d4-0310-903a-819935f44dba src/idmef-tree-wrap.c | 1150 +++++++++++----------- src/idmef-wrappers-gen/GenerateIDMEFTreeWrapC.pm | 238 +++--- 2 files changed, 694 insertions(+), 694 deletions(-) commit a3d87923d7c5d0a9cf062d8af029d6245222c0f8 Author: Yoann Vandoorselaere Date: Wed Jun 13 13:23:37 2007 +0000 Whitespace police. git-svn-id: file:///home/yoann/SVN/libprelude/trunk@9594 09c5ec92-17d4-0310-903a-819935f44dba src/prelude-client.c | 362 +++++++++++++++++++++++++------------------------- 1 files changed, 181 insertions(+), 181 deletions(-) commit 2afa9c34b8f0a983d29a663245472bf925dbe8ab Author: Yoann Vandoorselaere Date: Wed Jun 13 13:23:28 2007 +0000 Whitespace police. git-svn-id: file:///home/yoann/SVN/libprelude/trunk@9593 09c5ec92-17d4-0310-903a-819935f44dba src/prelude-async.c | 96 +++++++++++++++++++++++++------------------------- 1 files changed, 48 insertions(+), 48 deletions(-) commit 0aa67980b5bce6e776ef6f6218ea757d371115d6 Author: Yoann Vandoorselaere Date: Wed Jun 13 13:23:14 2007 +0000 Cleanup. git-svn-id: file:///home/yoann/SVN/libprelude/trunk@9592 09c5ec92-17d4-0310-903a-819935f44dba Makefile.am | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) commit ef779d5121c4291d5b6abeae948f594893ca37ae Author: Yoann Vandoorselaere Date: Wed Jun 13 13:22:55 2007 +0000 TCP_KEEPIDLE, TCP_KEEPINTVL, TCP_KEEPCNT are only supported on inet socket. git-svn-id: file:///home/yoann/SVN/libprelude/trunk@9591 09c5ec92-17d4-0310-903a-819935f44dba src/prelude-connection.c | 49 ++++++++++++++++++++++++++------------------- 1 files changed, 28 insertions(+), 21 deletions(-) commit 575958914e7995e8130fb1a89aff827e7125a4c2 Author: Yoann Vandoorselaere Date: Wed Jun 13 13:22:45 2007 +0000 Whitespace police. git-svn-id: file:///home/yoann/SVN/libprelude/trunk@9590 09c5ec92-17d4-0310-903a-819935f44dba src/prelude-connection.c | 298 +++++++++++++++++++++++----------------------- 1 files changed, 149 insertions(+), 149 deletions(-) commit 988cbbab3679cec36e2e731118a42740f07eb07c Author: Yoann Vandoorselaere Date: Wed Jun 13 13:22:39 2007 +0000 Whitespace police. git-svn-id: file:///home/yoann/SVN/libprelude/trunk@9589 09c5ec92-17d4-0310-903a-819935f44dba src/prelude.c | 52 ++++++++++++++++++++++++++-------------------------- 1 files changed, 26 insertions(+), 26 deletions(-) commit e3d4decf0ae1793d05fedcacd4b4d4eaa5153b26 Author: Yoann Vandoorselaere Date: Sat Jun 9 15:10:50 2007 +0000 Conditionally call AC_CONFIG_SUBDIR() for libltdl. Use DIST_SUBDIR to prevent 'distclean' problem. Close #235. git-svn-id: file:///home/yoann/SVN/libprelude/trunk@9571 09c5ec92-17d4-0310-903a-819935f44dba Makefile.am | 2 ++ configure.in | 2 +- 2 files changed, 3 insertions(+), 1 deletions(-) commit eb216e85dd859a82261d34346ad7f2034652a0ad Author: Yoann Vandoorselaere Date: Tue May 15 21:20:23 2007 +0000 Update NEWS, documentation, bump version number. git-svn-id: file:///home/yoann/SVN/libprelude/trunk@9460 09c5ec92-17d4-0310-903a-819935f44dba NEWS | 17 +++++++++++++++++ configure.in | 10 +++++----- docs/api/libprelude-decl.txt | 7 ++++++- docs/api/libprelude-sections.txt | 1 + docs/api/tmpl/prelude-hash.sgml | 14 ++++++++++++++ 5 files changed, 43 insertions(+), 6 deletions(-) commit ed2f8f7adf64166afeedb7b81cf003c37e83336a Author: Yoann Vandoorselaere Date: Tue May 15 21:17:06 2007 +0000 Set SO_KEEPALIVE via set_socket_option(). git-svn-id: file:///home/yoann/SVN/libprelude/trunk@9459 09c5ec92-17d4-0310-903a-819935f44dba src/prelude-connection.c | 25 ++++++++++++------------- 1 files changed, 12 insertions(+), 13 deletions(-) commit 69ac2a9a191f3bfe0bdeb2921447b367c0ef9aab Author: Yoann Vandoorselaere Date: Tue May 15 21:13:53 2007 +0000 Update GnuLib code. git-svn-id: file:///home/yoann/SVN/libprelude/trunk@9458 09c5ec92-17d4-0310-903a-819935f44dba libmissing/m4/strsep.m4 | 5 ++++- 1 files changed, 4 insertions(+), 1 deletions(-) commit 0199e0ef55904aa5b942881589009a1348734e0c Author: Yoann Vandoorselaere Date: Tue May 15 21:10:39 2007 +0000 When the thread subsystem is used, free the data from the current thread on deinit(). git-svn-id: file:///home/yoann/SVN/libprelude/trunk@9457 09c5ec92-17d4-0310-903a-819935f44dba src/prelude-thread.c | 6 ++++++ 1 files changed, 6 insertions(+), 0 deletions(-) commit 126d30e5e9b15a3524ba84f36002620d8578c159 Author: Yoann Vandoorselaere Date: Tue May 15 21:07:27 2007 +0000 Use prelude_hash_new2(). git-svn-id: file:///home/yoann/SVN/libprelude/trunk@9456 09c5ec92-17d4-0310-903a-819935f44dba src/idmef-path.c | 7 ++++--- 1 files changed, 4 insertions(+), 3 deletions(-) commit 9efd604ca89f6d86fdffc100efd54dcaacad1df2 Author: Yoann Vandoorselaere Date: Tue May 15 21:04:08 2007 +0000 Implement prelude_hash_new2() The prelude_hash_new() function provided no way to set the hash table size. This new function fix this problem. Also, increase the default number of bucket from 16 to 128. git-svn-id: file:///home/yoann/SVN/libprelude/trunk@9455 09c5ec92-17d4-0310-903a-819935f44dba src/include/prelude-hash.h | 6 ++++++ src/prelude-hash.c | 27 +++++++++++++++++++-------- 2 files changed, 25 insertions(+), 8 deletions(-) commit a71b4eaa4780e358f67d2d1e8283b8976f4d4136 Author: Yoann Vandoorselaere Date: Tue May 15 10:07:43 2007 +0000 Some rewording. git-svn-id: file:///home/yoann/SVN/libprelude/trunk@9454 09c5ec92-17d4-0310-903a-819935f44dba client.conf.in | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) commit c1f151bcbb4f88e35d605876d1a8b220ca057c04 Author: Yoann Vandoorselaere Date: Tue May 15 10:07:30 2007 +0000 Implement TCP keepalive settings. On operating systems that support it, allow the users to specify connection keepalive settings. Available arameters are: - tcp-keepalive-time: The number of seconds the connection needs to be idle before TCP begins sending out keep-alive probes. - tcp-keepalive-probes: the number of not acknowledged probes to send before considering the connection dead. - tcp-keepalive-intvl: the interval between subsequent keepalive probes. git-svn-id: file:///home/yoann/SVN/libprelude/trunk@9453 09c5ec92-17d4-0310-903a-819935f44dba client.conf.in | 35 ++++++++++++++++++++++++- configure.in | 2 +- src/prelude-client.c | 46 +++++++++++++++++++++++++++++++- src/prelude-connection.c | 64 ++++++++++++++++++++++++++++++++++++++++++--- 4 files changed, 138 insertions(+), 9 deletions(-) commit dcda32574783a13c70c209b3510618c46a0c1ef9 Author: Yoann Vandoorselaere Date: Tue May 15 10:07:21 2007 +0000 Fix: Destroying listed idmef_value_t lead to modification of the referenced IDMEF message. When retrieving members from a listed idmef_value_t, idmef_value_dont_have_own_data() shall be used to prevent the listed values from being destroyed when idmef_value_destroy() is called. git-svn-id: file:///home/yoann/SVN/libprelude/trunk@9452 09c5ec92-17d4-0310-903a-819935f44dba src/idmef-path.c | 4 +++- 1 files changed, 3 insertions(+), 1 deletions(-) commit d101a2fc16639605451ba7d4f35f4dd4d6d1e13f Author: Yoann Vandoorselaere Date: Tue May 15 10:07:16 2007 +0000 Update GnuLib code. git-svn-id: file:///home/yoann/SVN/libprelude/trunk@9451 09c5ec92-17d4-0310-903a-819935f44dba libmissing/Makefile.am | 16 ++- libmissing/alloca_.h | 8 +- libmissing/allocsa.h | 4 - libmissing/float+.h | 150 --------------------- libmissing/getaddrinfo.h | 7 +- libmissing/getpass.c | 4 +- libmissing/m4/allocsa.m4 | 5 +- libmissing/m4/fseeko.m4 | 19 +++ libmissing/m4/gnulib-comp.m4 | 10 +- libmissing/m4/longdouble.m4 | 31 ----- libmissing/m4/socklen.m4 | 2 +- libmissing/m4/stdint.m4 | 16 +- libmissing/m4/stdio_h.m4 | 8 +- libmissing/m4/vasnprintf.m4 | 50 +++++++- libmissing/m4/wctype.m4 | 8 +- libmissing/poll_.h | 8 +- libmissing/printf-args.c | 2 - libmissing/printf-args.h | 4 - libmissing/printf-parse.c | 4 +- libmissing/socket_.h | 85 ------------ libmissing/stdbool_.h | 6 +- libmissing/stdio_.h | 83 ++++++++++++- libmissing/string_.h | 8 +- libmissing/sys_socket_.h | 85 ++++++++++++ libmissing/sys_time_.h | 6 +- libmissing/time_.h | 93 ++++++++------ libmissing/vasnprintf.c | 298 ++++++++++++++++++++++++++++-------------- libmissing/wchar_.h | 9 +- libmissing/wctype_.h | 27 +++- 29 files changed, 577 insertions(+), 479 deletions(-) commit 66d890b4cfea26aec33015fd2929f4ac80117774 Author: Yoann Vandoorselaere Date: Thu May 10 07:39:38 2007 +0000 Fix reading from passwd-file with newline (fix #221). When reading password from a file, remove newline at the end of the string. git-svn-id: file:///home/yoann/SVN/libprelude/trunk@9449 09c5ec92-17d4-0310-903a-819935f44dba prelude-adduser/prelude-adduser.c | 7 ++++++- 1 files changed, 6 insertions(+), 1 deletions(-) commit 2dd8aab1fead37be28f470eb9b8feae244bd956b Author: Yoann Vandoorselaere Date: Thu May 10 07:39:29 2007 +0000 When we fail to read an IDMEF message, provide more information about the place where the error happened. git-svn-id: file:///home/yoann/SVN/libprelude/trunk@9448 09c5ec92-17d4-0310-903a-819935f44dba src/idmef-message-read.c | Bin 81714 -> 81940 bytes .../GenerateIDMEFMessageReadC.pm | 11 ++++++++--- 2 files changed, 8 insertions(+), 3 deletions(-) commit 67df8250598086d1074d43a2f23164e813f576c8 Author: Yoann Vandoorselaere Date: Thu May 10 07:39:23 2007 +0000 More format string warning/fixes. git-svn-id: file:///home/yoann/SVN/libprelude/trunk@9447 09c5ec92-17d4-0310-903a-819935f44dba configure.in | 3 +++ src/prelude-option.c | 2 +- src/prelude.c | 2 +- 3 files changed, 5 insertions(+), 2 deletions(-) commit da012936b1b17ea46b71114dd77cd598671440cf Author: Yoann Vandoorselaere Date: Sat Apr 28 07:11:52 2007 +0000 Fix an issue with idmef_path_get() on empty path (pointing to the root message). git-svn-id: file:///home/yoann/SVN/libprelude/trunk@9390 09c5ec92-17d4-0310-903a-819935f44dba src/idmef-path.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) commit ea0f65d9ea5fc39dd408fce63c817b6d2819cf74 Author: Yoann Vandoorselaere Date: Sat Apr 14 10:26:27 2007 +0000 Module path migration: move /trunk/libprelude /libprelude/trunk git-svn-id: file:///home/yoann/SVN/libprelude/trunk@9119 09c5ec92-17d4-0310-903a-819935f44dba commit 0ab914fbaddb59c501ef545e10e8d1420c391c98 Author: Yoann Vandoorselaere Date: Fri Mar 30 14:33:53 2007 +0000 GnuLib code update. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@9008 09c5ec92-17d4-0310-903a-819935f44dba NEWS | 11 +++++++ configure.in | 4 +- docs/api/libprelude-decl.txt | 2 +- docs/api/tmpl/prelude-log.sgml | 2 - docs/api/tmpl/prelude-plugin.sgml | 42 ----------------------------- gtk-doc.make | 8 +++--- libmissing/Makefile.am | 3 ++ libmissing/m4/stdio_h.m4 | 5 +++- libmissing/stdio_.h | 16 +++++++++++ libmissing/vasnprintf.c | 53 ++++++++++++++++++++---------------- 10 files changed, 70 insertions(+), 76 deletions(-) commit a9dfd9094e5c0430a8d93670d619b17ac535de4f Author: Yoann Vandoorselaere Date: Tue Mar 27 10:21:09 2007 +0000 Update GnuLib code. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@8951 09c5ec92-17d4-0310-903a-819935f44dba libmissing/Makefile.am | 14 ++-- libmissing/float+.h | 150 ++++++++++++++++++++++++++++++++++++++++++ libmissing/getaddrinfo.c | 2 +- libmissing/m4/gnulib-comp.m4 | 1 + libmissing/m4/vasnprintf.m4 | 18 +++++- libmissing/poll.c | 5 ++ libmissing/printf-parse.c | 14 ++-- libmissing/regexec.c | 5 +- libmissing/string_.h | 4 +- libmissing/strptime.c | 7 ++- libmissing/vasnprintf.c | 57 ++++++++++++++-- 11 files changed, 248 insertions(+), 29 deletions(-) commit dae95310f0a6ae5a8354e1ba743e039ec4544bdc Author: Yoann Vandoorselaere Date: Tue Mar 27 10:10:49 2007 +0000 Unconditionally call AC_CONFIG_SUBDIRS(libltdl), distclean is broken otherwise. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@8950 09c5ec92-17d4-0310-903a-819935f44dba Makefile.am | 4 ++-- configure.in | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) commit 06754ff3cb13a7817bb6e66b827a3b87ce246d7f Author: Yoann Vandoorselaere Date: Tue Mar 27 09:41:30 2007 +0000 Improve error message. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@8949 09c5ec92-17d4-0310-903a-819935f44dba src/prelude-option.c | 7 ++++--- 1 files changed, 4 insertions(+), 3 deletions(-) commit 99cea06b009bc4d7e263c09f3183360e048c185f Author: Yoann Vandoorselaere Date: Mon Mar 26 08:13:09 2007 +0000 Remove unused. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@8942 09c5ec92-17d4-0310-903a-819935f44dba src/prelude-log.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) commit bacea1567e3420b08c4519cc967022b1182295d2 Author: Yoann Vandoorselaere Date: Mon Mar 26 07:54:57 2007 +0000 Handle verbose error reporting. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@8941 09c5ec92-17d4-0310-903a-819935f44dba src/prelude-option.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) commit da33dc9824fb04deac9fcd4f4f2b87019e218e84 Author: Yoann Vandoorselaere Date: Mon Mar 26 07:53:30 2007 +0000 Log the entry even if it is truncated because the buffer is too small. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@8940 09c5ec92-17d4-0310-903a-819935f44dba src/prelude-log.c | 4 +--- 1 files changed, 1 insertions(+), 3 deletions(-) commit c5419478c60aea5c57e68dfacfefa513edc7e8eb Author: Yoann Vandoorselaere Date: Mon Mar 26 07:50:49 2007 +0000 Fix optional integer comparison. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@8939 09c5ec92-17d4-0310-903a-819935f44dba src/idmef-tree-wrap.c | 84 +++++++++++----------- src/idmef-wrappers-gen/GenerateIDMEFTreeWrapC.pm | 8 ++- 2 files changed, 48 insertions(+), 44 deletions(-) commit b5c02295901a2d954ab5bb1c81be657b6f6c7517 Author: Yoann Vandoorselaere Date: Thu Mar 15 17:13:55 2007 +0000 Update NEWS, bump version number. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@8856 09c5ec92-17d4-0310-903a-819935f44dba NEWS | 20 ++++++++++++++++++++ configure.in | 4 ++-- 2 files changed, 22 insertions(+), 2 deletions(-) commit 99d950c3c2316a31aa90b3775a07c465439f1f2b Author: Yoann Vandoorselaere Date: Thu Mar 15 12:14:06 2007 +0000 Update. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@8855 09c5ec92-17d4-0310-903a-819935f44dba docs/api/libprelude-decl.txt | 8 ++++---- docs/api/tmpl/prelude-plugin.sgml | 2 ++ 2 files changed, 6 insertions(+), 4 deletions(-) commit 9b21ec22055bbc586d4ba217f7ca192507320abd Author: Yoann Vandoorselaere Date: Thu Mar 15 10:44:17 2007 +0000 Fix format string warning. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@8854 09c5ec92-17d4-0310-903a-819935f44dba src/idmef-criteria-string.yac.y | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) commit c8f2fc860bad1a97d52673febed84b4bfa01aae1 Author: Yoann Vandoorselaere Date: Thu Mar 15 10:41:49 2007 +0000 Fix warning. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@8853 09c5ec92-17d4-0310-903a-819935f44dba src/idmef-value-type.c | 13 ++++++------- 1 files changed, 6 insertions(+), 7 deletions(-) commit faedd5754faef15493d1b1b4589cab33a991f062 Author: Yoann Vandoorselaere Date: Thu Mar 15 10:04:12 2007 +0000 Fix a typo. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@8852 09c5ec92-17d4-0310-903a-819935f44dba src/idmef-criterion-value.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) commit 1e2c15a6645a4855b948bf8a4940ff402516e921 Author: Yoann Vandoorselaere Date: Thu Mar 15 10:02:46 2007 +0000 Allow regular expression on AdditionalData (the match will fail if the data is not of type char-string). Fix a regression introduced in [8381] that prevented broken down time and regex match to work. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@8851 09c5ec92-17d4-0310-903a-819935f44dba src/idmef-criterion-value.c | 56 +++++++++++++++++++++++++++++++++++++++++- 1 files changed, 54 insertions(+), 2 deletions(-) commit a8d0db8531ae6ab1076ee423940e7b669bb869b5 Author: Yoann Vandoorselaere Date: Wed Mar 14 17:53:08 2007 +0000 Update GnuLib code, import memmem module. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@8850 09c5ec92-17d4-0310-903a-819935f44dba libmissing/Makefile.am | 73 ++++++- libmissing/getaddrinfo.c | 4 +- libmissing/gettimeofday.c | 2 - libmissing/m4/gettimeofday.m4 | 4 +- libmissing/m4/gnulib-cache.m4 | 4 +- libmissing/m4/gnulib-comp.m4 | 13 +- libmissing/m4/memmem.m4 | 22 ++ libmissing/m4/mktime.m4 | 7 +- libmissing/m4/netinet_in_h.m4 | 28 ++- libmissing/m4/regex.m4 | 9 +- libmissing/m4/snprintf.m4 | 24 ++- libmissing/m4/stdio_h.m4 | 43 ++++ libmissing/m4/strptime.m4 | 3 +- libmissing/m4/sys_select_h.m4 | 28 ++- libmissing/m4/sys_socket_h.m4 | 51 ++++- libmissing/m4/sys_time_h.m4 | 8 +- libmissing/m4/time_r.m4 | 3 + libmissing/m4/timegm.m4 | 3 +- libmissing/m4/vasnprintf.m4 | 31 ++- libmissing/m4/vsnprintf.m4 | 24 ++- libmissing/memmem.c | 61 +++++ libmissing/netinet_in_.h | 37 +++ libmissing/snprintf.c | 7 +- libmissing/snprintf.h | 29 --- libmissing/socket_.h | 81 ++++--- libmissing/stdint_.h | 51 +++-- libmissing/stdio_.h | 192 +++++++++++++++ libmissing/string_.h | 46 ++-- libmissing/sys_select_.h | 37 +++ libmissing/sys_time_.h | 2 +- libmissing/time_.h | 2 +- libmissing/vasnprintf.c | 512 ++++++++++++++++++++++++++++++++++++++++- libmissing/vasnprintf.h | 10 +- libmissing/vsnprintf.c | 7 +- libmissing/vsnprintf.h | 31 --- src/include/libmissing.h | 7 +- 36 files changed, 1276 insertions(+), 220 deletions(-) commit 09ca882fd1b6dbdd250f64136dddc1aae75e9143 Author: Yoann Vandoorselaere Date: Wed Mar 14 17:49:42 2007 +0000 Cast size_t to uint64_t, and use the appropriate format string to avoid warnings. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@8849 09c5ec92-17d4-0310-903a-819935f44dba src/prelude-connection-pool.c | 4 ++-- src/prelude-msg.c | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) commit a7706112c6492020ee95ec2ee536981ce5084c8a Author: Yoann Vandoorselaere Date: Wed Mar 14 17:45:02 2007 +0000 Implement substring search for idmef_data_t (AdditionalData type). git-svn-id: file:///home/yoann/SVN/trunk/libprelude@8848 09c5ec92-17d4-0310-903a-819935f44dba src/idmef-value-type.c | 23 +++++++++++++++++++++-- 1 files changed, 21 insertions(+), 2 deletions(-) commit 49ea9ce3bc79b0220dbe43c7df856c5854d3ad16 Author: Yoann Vandoorselaere Date: Wed Mar 14 15:07:36 2007 +0000 Initialize the GMT offset in case we set the time from an NTP string. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@8847 09c5ec92-17d4-0310-903a-819935f44dba src/idmef-time.c | 1 + 1 files changed, 1 insertions(+), 0 deletions(-) commit dcebd15a87f9f560fa012d6e72a0acecd574a677 Author: Yoann Vandoorselaere Date: Tue Mar 13 11:45:38 2007 +0000 Format string fixes. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@8846 09c5ec92-17d4-0310-903a-819935f44dba src/idmef-additional-data.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) commit b8bfc90c8951e4872ea690f3565b449cf878eea2 Author: Yoann Vandoorselaere Date: Tue Mar 13 11:44:54 2007 +0000 Add format string checking capability if supported. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@8845 09c5ec92-17d4-0310-903a-819935f44dba src/include/idmef-path.h | 21 ++++++++++++++++- src/include/prelude-log.h | 35 +++++++++++++++++++++++------- src/include/prelude-string.h | 21 ++++++++++++++++- src/libprelude-error/prelude-error.h.in | 27 ++++++++++++++++++++++- 4 files changed, 90 insertions(+), 14 deletions(-) commit edbd07b465efdca3a3750a608af7fdfb8367828f Author: Yoann Vandoorselaere Date: Tue Mar 13 10:46:33 2007 +0000 Verbose error on _prelude_load_file() negative return value. Correctly handle ENOENT in remove_old_certificate(). Thanks to Helmut Azbest for pointing this out. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@8844 09c5ec92-17d4-0310-903a-819935f44dba prelude-adduser/tls-register.c | 50 ++++++++++++++++++++++++++++----------- 1 files changed, 36 insertions(+), 14 deletions(-) commit dcb0ddae7becfdc61c04cb4cdb4171be73de13c3 Author: Yoann Vandoorselaere Date: Tue Mar 13 10:26:40 2007 +0000 Slight format string fixes. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@8843 09c5ec92-17d4-0310-903a-819935f44dba src/prelude-connection-pool.c | 4 ++-- src/prelude-failover.c | 2 +- src/prelude-msg.c | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) commit ab23433dfd3d6ee84f73aaa3820378e664330a67 Author: Yoann Vandoorselaere Date: Tue Mar 13 09:52:31 2007 +0000 Consistently return an error if file size is zero. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@8842 09c5ec92-17d4-0310-903a-819935f44dba src/common.c | 13 ++++++++++--- 1 files changed, 10 insertions(+), 3 deletions(-) commit 7f742950ae206b175db0af13a18a9c458cb9ce77 Author: Yoann Vandoorselaere Date: Fri Mar 9 18:03:29 2007 +0000 Prevent NULL pointer dereference on invalid enumeration class. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@8840 09c5ec92-17d4-0310-903a-819935f44dba src/idmef-class.c | 14 +++++++++++++- 1 files changed, 13 insertions(+), 1 deletions(-) commit cc67f2f184a79822731a5ab87d5e6ee3bc0be110 Author: Yoann Vandoorselaere Date: Fri Mar 9 17:58:53 2007 +0000 Prevent NULL pointer dereference on invalid enumeration class. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@8839 09c5ec92-17d4-0310-903a-819935f44dba src/idmef-value-type.c | 4 +++- 1 files changed, 3 insertions(+), 1 deletions(-) commit c8f95b882ed2cc32f380d73f5ee555a456f0955b Author: Yoann Vandoorselaere Date: Tue Mar 6 11:06:36 2007 +0000 Make the path argument const in idmef_path_is_list(), idmef_path_has_lists() and idmef_path_is_ambiguous(). Fix an issue in idmef_path_set_index() where the path name wouldn't be updated correctly. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@8827 09c5ec92-17d4-0310-903a-819935f44dba src/idmef-path.c | 12 ++++++------ src/include/idmef-path.h | 6 +++--- 2 files changed, 9 insertions(+), 9 deletions(-) commit 187642f0828a05b6a4302f4cb4c13eecf842408e Author: Yoann Vandoorselaere Date: Tue Feb 20 13:46:41 2007 +0000 Update NEWS, documentation. Bump version number. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@8825 09c5ec92-17d4-0310-903a-819935f44dba NEWS | 28 ++++++++++++++++++++++++++++ configure.in | 6 +++--- docs/api/libprelude-decl.txt | 2 +- docs/api/tmpl/prelude-plugin.sgml | 4 ++++ 4 files changed, 36 insertions(+), 4 deletions(-) commit ee41188915eab35c9fa268f65a5e4edc49a9de0e Author: Yoann Vandoorselaere Date: Tue Feb 20 13:46:06 2007 +0000 Update GnuLib code. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@8824 09c5ec92-17d4-0310-903a-819935f44dba libmissing/string_.h | 6 ++++++ 1 files changed, 6 insertions(+), 0 deletions(-) commit daa49f3f4ba943adad8937f34df1278424df26ff Author: Yoann Vandoorselaere Date: Tue Feb 20 10:10:27 2007 +0000 Force --without-system-ltdl for make dist. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@8823 09c5ec92-17d4-0310-903a-819935f44dba Makefile.am | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) commit fc0d5eea09db3e6f362fd5020ba48c8596473726 Author: Yoann Vandoorselaere Date: Tue Feb 20 10:09:19 2007 +0000 Small inclusion fix, for system wide libltdl. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@8822 09c5ec92-17d4-0310-903a-819935f44dba src/prelude-plugin.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) commit a82b555edd41bcb182ca18fd325d03e6d5af6e59 Author: Yoann Vandoorselaere Date: Mon Feb 19 16:55:16 2007 +0000 Update gnulib code. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@8821 09c5ec92-17d4-0310-903a-819935f44dba libmissing/Makefile.am | 169 ++++++++++- libmissing/allocsa.c | 137 +++++++++ libmissing/allocsa.h | 128 ++++++++ libmissing/allocsa.valgrind | 7 + libmissing/config.charset | 639 +++++++++++++++++++++++++++++++++++++++++ libmissing/dummy.c | 30 -- libmissing/localcharset.c | 460 +++++++++++++++++++++++++++++ libmissing/localcharset.h | 41 +++ libmissing/m4/allocsa.m4 | 15 + libmissing/m4/eealloc.m4 | 32 ++ libmissing/m4/glibc21.m4 | 30 ++ libmissing/m4/gnulib-comp.m4 | 22 ++- libmissing/m4/localcharset.m4 | 16 + libmissing/m4/regex.m4 | 3 +- libmissing/m4/string_h.m4 | 46 ++-- libmissing/m4/strptime.m4 | 7 +- libmissing/m4/time_h.m4 | 76 +++++ libmissing/m4/time_r.m4 | 7 +- libmissing/m4/timegm.m4 | 12 +- libmissing/mktime.c | 8 +- libmissing/ref-add.sin | 30 ++ libmissing/ref-del.sin | 25 ++ libmissing/regcomp.c | 20 +-- libmissing/regex_internal.h | 4 +- libmissing/strcasestr.c | 144 +++++++++ libmissing/string_.h | 177 ++++++++---- libmissing/strptime.c | 5 +- libmissing/strptime.h | 30 -- libmissing/time_.h | 107 +++++++ libmissing/time_r.c | 4 +- libmissing/time_r.h | 52 ---- libmissing/timegm.c | 13 +- libmissing/timegm.h | 23 -- src/include/libmissing.h | 3 - 34 files changed, 2246 insertions(+), 276 deletions(-) commit 9937af9cd17c7b6d6c70984a2efcc7e23c64c5b1 Author: Yoann Vandoorselaere Date: Mon Feb 19 10:27:33 2007 +0000 Make sure we have an exception to process. This fix a crash with Python bindings upon signal reception. Fix #200. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@8819 09c5ec92-17d4-0310-903a-819935f44dba bindings/libprelude_python.i | 6 ++++-- 1 files changed, 4 insertions(+), 2 deletions(-) commit 2580ac7f03df9836d0ae799501c63b4287f5c421 Author: Yoann Vandoorselaere Date: Thu Feb 15 21:10:03 2007 +0000 Forgot to commit part of #199 fix. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@8818 09c5ec92-17d4-0310-903a-819935f44dba Makefile.am | 6 +++++- 1 files changed, 5 insertions(+), 1 deletions(-) commit 6537034e49cc915be3ba831dda03c2a42ad09f62 Author: Yoann Vandoorselaere Date: Thu Feb 15 21:05:30 2007 +0000 Win32 compilation fixes. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@8817 09c5ec92-17d4-0310-903a-819935f44dba src/daemonize.c | 29 +++++++++++++++++++++++++---- 1 files changed, 25 insertions(+), 4 deletions(-) commit f8ce57c97b8658df169b486e48600cd8363f3a3f Author: Yoann Vandoorselaere Date: Thu Feb 15 21:03:40 2007 +0000 Correct error message. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@8816 09c5ec92-17d4-0310-903a-819935f44dba prelude-adduser/prelude-adduser.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) commit 6e84c88bde7d707445be97d37c89f8a047a366a8 Author: Yoann Vandoorselaere Date: Thu Feb 15 21:01:51 2007 +0000 Implement --with-system-ltdl configure switch. The default is now to use the system wide ltdl library if it is available, unless specified otherwise. Modified patch from Victor Stinner . Fix #199. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@8815 09c5ec92-17d4-0310-903a-819935f44dba configure.in | 55 ++++++++++++++++++++++++++++++++++++++++++++----------- src/Makefile.am | 2 +- 2 files changed, 45 insertions(+), 12 deletions(-) commit a557a0c28f82ed360925f28a53cfbfcf092bd5a0 Author: Yoann Vandoorselaere Date: Thu Feb 15 20:57:43 2007 +0000 Add libmissing build directory to include path. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@8814 09c5ec92-17d4-0310-903a-819935f44dba prelude-adduser/Makefile.am | 2 +- src/Makefile.am | 12 ++++++------ 2 files changed, 7 insertions(+), 7 deletions(-) commit f70ba9a224c28713f46186cf9d2528f71a1e8959 Author: Yoann Vandoorselaere Date: Thu Feb 15 20:53:20 2007 +0000 Prevent NULL pointer dereference if no permission is specified after the permission type. Fix #197. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@8813 09c5ec92-17d4-0310-903a-819935f44dba src/prelude-connection.c | 4 +++- 1 files changed, 3 insertions(+), 1 deletions(-) commit 2cf24597868dccf11560e9bdfd21f0aa7e84a02c Author: Yoann Vandoorselaere Date: Fri Feb 9 10:49:44 2007 +0000 This work has been done by Sebastien Tricaud and myself: - Reset Yacc status before parsing, fix #195. - Enable YYERROR_VERBOSE for detailed error messages. - Fix string memory leak on criteria syntax error. - Fix possible criteria leak on criteria syntax error. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@8808 09c5ec92-17d4-0310-903a-819935f44dba src/idmef-criteria-string.lex.l | 12 ++++++++++++ src/idmef-criteria-string.yac.y | 21 ++++++++++++++++----- 2 files changed, 28 insertions(+), 5 deletions(-) commit 867000b9bd28ce4e1baf54d1723eafbb2f74aef3 Author: Yoann Vandoorselaere Date: Wed Feb 7 13:55:57 2007 +0000 Prefer anonymous authentication rather than SRP. We do this because there are compatibility issue with SRP between different GnuTLS version. Should fix #187. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@8800 09c5ec92-17d4-0310-903a-819935f44dba prelude-adduser/prelude-adduser.c | 13 ++++++++++++- prelude-adduser/server.c | 3 ++- 2 files changed, 14 insertions(+), 2 deletions(-) commit 79e71dd3c1aad6f338f98d53f1624c6b8f8c2384 Author: Yoann Vandoorselaere Date: Wed Feb 7 12:57:57 2007 +0000 Gnulib tool update. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@8799 09c5ec92-17d4-0310-903a-819935f44dba libmissing/Makefile.am | 73 ++++----- libmissing/dummy.c | 30 ++++ libmissing/gai_strerror.c | 1 + libmissing/m4/gnulib-comp.m4 | 27 ++-- libmissing/m4/mbchar.m4 | 13 -- libmissing/m4/mbiter.m4 | 17 -- libmissing/m4/mbrtowc.m4 | 31 ---- libmissing/m4/memchr.m4 | 18 -- libmissing/m4/regex.m4 | 59 ++++--- libmissing/m4/socklen.m4 | 6 +- libmissing/m4/strcase.m4 | 13 +- libmissing/m4/strcasestr.m4 | 13 +- libmissing/m4/string_h.m4 | 40 +++++- libmissing/m4/strptime.m4 | 6 +- libmissing/m4/tm_gmtoff.m4 | 14 ++ libmissing/m4/wcwidth.m4 | 30 ---- libmissing/mbchar.c | 36 ---- libmissing/mbchar.h | 353 ---------------------------------------- libmissing/mbuiter.h | 203 ----------------------- libmissing/memchr.c | 201 ----------------------- libmissing/printf-args.c | 12 +- libmissing/printf-args.h | 26 ++-- libmissing/printf-parse.c | 20 ++-- libmissing/regcomp.c | 20 +-- libmissing/regex_internal.h | 3 - libmissing/stdbool_.h | 5 +- libmissing/strcasecmp.c | 84 +++------- libmissing/strcasestr.c | 123 +++----------- libmissing/string_.h | 365 +++++++++++++++++++++++++++++++++++++----- libmissing/strncasecmp.c | 8 +- libmissing/strnlen1.c | 36 ---- libmissing/strnlen1.h | 40 ----- libmissing/strptime.c | 75 ++++----- libmissing/strptime.h | 17 ++- libmissing/strsep.c | 25 ++- libmissing/vasnprintf.c | 36 ++-- libmissing/wcwidth.h | 57 ------- 37 files changed, 670 insertions(+), 1466 deletions(-) commit 1728ef888c07efee32a88b394cbabc2e91b7c90c Author: Yoann Vandoorselaere Date: Sat Feb 3 09:19:56 2007 +0000 Remove deprecated strndup.h inclusion. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@8781 09c5ec92-17d4-0310-903a-819935f44dba src/idmef-criteria-string.lex.l | 1 - 1 files changed, 0 insertions(+), 1 deletions(-) commit ae6b80c6bfeaf2ce5c207e0e4e55af2ce3d580d1 Author: Yoann Vandoorselaere Date: Wed Jan 31 18:04:20 2007 +0000 Cleanup remove_old_certificate(). Make it work under Win32. Improved error handling. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@8780 09c5ec92-17d4-0310-903a-819935f44dba prelude-adduser/tls-register.c | 85 ++++++++++++++++++++++----------------- 1 files changed, 48 insertions(+), 37 deletions(-) commit 50256cb12687625c7ae3ad5709acdd52fe221522 Author: Yoann Vandoorselaere Date: Wed Jan 31 13:36:11 2007 +0000 GnuLib code update. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@8779 09c5ec92-17d4-0310-903a-819935f44dba libmissing/getdelim.c | 126 +++++ libmissing/getdelim.h | 28 + libmissing/getline.c | 30 + libmissing/getline.h | 28 + libmissing/getpass.c | 233 ++++++++ libmissing/getpass.h | 31 ++ libmissing/gettimeofday.c | 144 +++++ libmissing/m4/getdelim.m4 | 29 + libmissing/m4/getline.m4 | 79 +++ libmissing/m4/getpass.m4 | 47 ++ libmissing/m4/gettimeofday.m4 | 101 ++++ libmissing/m4/gnulib-common.m4 | 22 + libmissing/m4/string_h.m4 | 46 ++ libmissing/m4/strptime.m4 | 10 + libmissing/m4/sys_select_h.m4 | 18 + libmissing/m4/sys_time_h.m4 | 61 +++ libmissing/m4/wchar.m4 | 29 + libmissing/strcase.h | 56 -- libmissing/strcasestr.h | 30 - libmissing/strdup.h | 39 -- libmissing/string_.h | 182 +++++++ libmissing/strndup.h | 32 -- libmissing/strnlen.h | 32 -- libmissing/strpbrk.h | 28 - libmissing/strptime.c | 1147 ++++++++++++++++++++++++++++++++++++++++ libmissing/strptime.h | 27 + libmissing/strsep.h | 52 -- libmissing/sys_time_.h | 44 ++ libmissing/wchar_.h | 42 ++ 29 files changed, 2504 insertions(+), 269 deletions(-) commit 03d39734e6d83e8d0b3bfda5e6d3bb37f1930c55 Author: Yoann Vandoorselaere Date: Wed Jan 31 13:32:29 2007 +0000 GnuLib code update. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@8778 09c5ec92-17d4-0310-903a-819935f44dba src/include/libmissing.h | 11 ++++++----- 1 files changed, 6 insertions(+), 5 deletions(-) commit a8895602b13f8903c6311f11f9c470891a971675 Author: Yoann Vandoorselaere Date: Wed Jan 31 13:31:52 2007 +0000 GnuLib code update. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@8777 09c5ec92-17d4-0310-903a-819935f44dba libmissing/Makefile.am | 167 +++++++++++++++++++++++++++++++++++++---- libmissing/ftw.c | 4 +- libmissing/getaddrinfo.c | 5 +- libmissing/getaddrinfo.h | 7 ++- libmissing/m4/gnulib-cache.m4 | 4 +- libmissing/m4/gnulib-comp.m4 | 123 ++++++++---------------------- libmissing/m4/mbchar.m4 | 11 +-- libmissing/m4/mktime.m4 | 22 ++---- libmissing/m4/poll.m4 | 7 +- libmissing/m4/regex.m4 | 5 +- libmissing/m4/stdint.m4 | 80 +++++++++----------- libmissing/m4/strcase.m4 | 12 ++- libmissing/m4/strcasestr.m4 | 7 +- libmissing/m4/strdup.m4 | 11 ++- libmissing/m4/strndup.m4 | 9 ++- libmissing/m4/strnlen.m4 | 14 ++- libmissing/m4/strpbrk.m4 | 6 +- libmissing/m4/strsep.m4 | 10 ++- libmissing/m4/wctype.m4 | 15 +++- libmissing/m4/wcwidth.m4 | 17 ++-- libmissing/m4/wint_t.m4 | 14 +++- libmissing/poll.c | 31 ++++---- libmissing/regcomp.c | 12 ++-- libmissing/regex.h | 50 +++++++------ libmissing/regex_internal.c | 7 +- libmissing/regex_internal.h | 13 +-- libmissing/regexec.c | 10 +- libmissing/socket_.h | 10 +++ libmissing/stdint_.h | 8 +-- libmissing/strcasecmp.c | 4 +- libmissing/strcasestr.c | 6 +- libmissing/strdup.c | 8 +- libmissing/strncasecmp.c | 4 +- libmissing/strndup.c | 8 +- libmissing/strnlen.c | 4 +- libmissing/strsep.c | 6 +- libmissing/wctype_.h | 9 +- libmissing/wcwidth.h | 14 +--- 38 files changed, 424 insertions(+), 330 deletions(-) commit b115a9e592942f2cff4cdcadbbf896a2e5eba45a Author: Yoann Vandoorselaere Date: Wed Jan 31 11:26:04 2007 +0000 Include limits.h for LONG_MAX (fix #194). git-svn-id: file:///home/yoann/SVN/trunk/libprelude@8776 09c5ec92-17d4-0310-903a-819935f44dba src/include/prelude-inttypes.h.in | 1 + 1 files changed, 1 insertions(+), 0 deletions(-) commit e1295a46af65afed43df35774113cc5c2e535944 Author: Yoann Vandoorselaere Date: Fri Jan 26 16:47:03 2007 +0000 When dumping AdditionalData of type byte-string to string, encode the data using base64. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@8772 09c5ec92-17d4-0310-903a-819935f44dba src/idmef-data.c | 62 ++++++++++++++++++++++------------------------------- 1 files changed, 26 insertions(+), 36 deletions(-) commit 1dec3c6b8925bb2b08df1ce5c73c40125eb2a52f Author: Yoann Vandoorselaere Date: Fri Jan 19 13:53:16 2007 +0000 Use -no-undefined. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@8769 09c5ec92-17d4-0310-903a-819935f44dba src/libprelude-error/Makefile.am | 1 + 1 files changed, 1 insertions(+), 0 deletions(-) commit febd17a55ac7c4b6d81b084155fb8c9930e5d7ed Author: Yoann Vandoorselaere Date: Fri Jan 19 13:49:56 2007 +0000 Win32 compilation warning fix. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@8768 09c5ec92-17d4-0310-903a-819935f44dba src/prelude-io.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) commit 7a7af15ab01485cbe92faaa3c3dc52cd9696a42e Author: Yoann Vandoorselaere Date: Fri Jan 19 13:49:06 2007 +0000 Use prelude_error_from_errno(). git-svn-id: file:///home/yoann/SVN/trunk/libprelude@8767 09c5ec92-17d4-0310-903a-819935f44dba src/common.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) commit 9ced1f926a3ee029302153a5442a32d797b3ab31 Author: Yoann Vandoorselaere Date: Thu Jan 18 08:41:27 2007 +0000 Fix Win32 prelude_load_file(). git-svn-id: file:///home/yoann/SVN/trunk/libprelude@8766 09c5ec92-17d4-0310-903a-819935f44dba src/common.c | 34 +++++++++++++++++++++++++--------- 1 files changed, 25 insertions(+), 9 deletions(-) commit 1245d693714ad90914eb63f5ca4eaa2fcfed5107 Author: Yoann Vandoorselaere Date: Thu Jan 18 08:39:47 2007 +0000 Include libmissing.h git-svn-id: file:///home/yoann/SVN/trunk/libprelude@8765 09c5ec92-17d4-0310-903a-819935f44dba src/prelude-async.c | 1 + src/prelude-msg.c | 1 + 2 files changed, 2 insertions(+), 0 deletions(-) commit 175029b3cecb7d29097dfb3c089635c721459416 Author: Yoann Vandoorselaere Date: Tue Jan 16 15:35:28 2007 +0000 Avoid runtime checking for printf() and scanf() 64 bits conversion specifier. Find out correct conversion specifier using CPP macros instead. This fixes cross-compilation issues. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@8763 09c5ec92-17d4-0310-903a-819935f44dba configure.in | 1 + m4/ax_create_prelude_inttypes_h.m4 | 63 ------------------------------------ src/include/prelude-inttypes.h.in | 19 +++++++++++ 3 files changed, 20 insertions(+), 63 deletions(-) commit 709505a9ba0c9895b097f7449386ee9df9c1b454 Author: Yoann Vandoorselaere Date: Tue Jan 16 15:31:03 2007 +0000 Define CC_FOR_BUILD, to be used when cross-compiling. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@8762 09c5ec92-17d4-0310-903a-819935f44dba configure.in | 13 ++++++++++++- src/libprelude-error/Makefile.am | 2 +- 2 files changed, 13 insertions(+), 2 deletions(-) commit fd6ccd975d5d7b0e53c8da5e51ec8b548cb7c064 Author: Yoann Vandoorselaere Date: Tue Jan 16 15:21:09 2007 +0000 Win32 compatibility fixes: use _prelude_load_file() and _prelude_unload_file(). Don't try to retrieve system information through uname() under Win32. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@8761 09c5ec92-17d4-0310-903a-819935f44dba src/prelude-client.c | 95 +++++++++++++++++++++++++++++-------------------- 1 files changed, 56 insertions(+), 39 deletions(-) commit a51029e9f0f29ea71cad18715308ace77105837d Author: Yoann Vandoorselaere Date: Tue Jan 16 15:14:00 2007 +0000 Win32 compatibility fixes. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@8760 09c5ec92-17d4-0310-903a-819935f44dba prelude-adduser/Makefile.am | 1 - prelude-adduser/prelude-adduser.c | 23 +++++++++++++++++-- prelude-adduser/server.c | 2 +- prelude-adduser/tls-register.c | 43 +++++++++++++++++++++++++------------ 4 files changed, 50 insertions(+), 19 deletions(-) commit 3a0e4c0fb426da6b67b46c74dc3ceb834f40a720 Author: Yoann Vandoorselaere Date: Tue Jan 16 15:11:21 2007 +0000 Win32 compatibility fixes. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@8759 09c5ec92-17d4-0310-903a-819935f44dba configure.in | 3 +- src/prelude-connection.c | 54 ++++++++++++++++++++++++++++++--------------- 2 files changed, 37 insertions(+), 20 deletions(-) commit 684849b6c4f57378d7048ec488bab043a0c29e4d Author: Yoann Vandoorselaere Date: Tue Jan 16 14:30:22 2007 +0000 Include libmissing.h git-svn-id: file:///home/yoann/SVN/trunk/libprelude@8758 09c5ec92-17d4-0310-903a-819935f44dba src/prelude-ident.c | 1 + 1 files changed, 1 insertions(+), 0 deletions(-) commit efa9b849736a586998081e0a2f37e02040e44b5d Author: Yoann Vandoorselaere Date: Tue Jan 16 13:53:33 2007 +0000 Close fd, remove debugging code. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@8757 09c5ec92-17d4-0310-903a-819935f44dba src/common.c | 14 ++++++++++---- 1 files changed, 10 insertions(+), 4 deletions(-) commit d6ce64d6bb6a5662f25e38edcc27622c316c69e2 Author: Yoann Vandoorselaere Date: Tue Jan 16 13:52:30 2007 +0000 Support Win32 ReportEvent(). git-svn-id: file:///home/yoann/SVN/trunk/libprelude@8756 09c5ec92-17d4-0310-903a-819935f44dba src/prelude-log.c | 32 +++++++++++++++++++++++++++++++- 1 files changed, 31 insertions(+), 1 deletions(-) commit e0020cad901fac7916ced1195883568c2d692b79 Author: Yoann Vandoorselaere Date: Mon Jan 15 14:23:16 2007 +0000 Use _prelude_load_file() / _prelude_unload_file(). git-svn-id: file:///home/yoann/SVN/trunk/libprelude@8755 09c5ec92-17d4-0310-903a-819935f44dba src/tls-util.c | 48 ++++++------------------------------------------ 1 files changed, 6 insertions(+), 42 deletions(-) commit 6f5c7038018f30ca6734c90ec09a09921abb976c Author: Yoann Vandoorselaere Date: Mon Jan 15 14:18:23 2007 +0000 Lower case winsock2.h for cross compilation on case sensitive system. Implement _prelude_load_file() and _prelude_unload_file(). Workaround mmap() use under WIN32. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@8754 09c5ec92-17d4-0310-903a-819935f44dba src/common.c | 50 ++++++++++++++++++++++++++++++++++++++++++++++++++ src/include/common.h | 6 +++++- 2 files changed, 55 insertions(+), 1 deletions(-) commit b389b6cdc138cec009369f36e6071651cf6ae617 Author: Yoann Vandoorselaere Date: Mon Jan 15 13:47:56 2007 +0000 Fix for pthread_sigmask() and sigfillset() not available under Win32. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@8753 09c5ec92-17d4-0310-903a-819935f44dba src/prelude-async.c | 9 ++++++--- src/prelude-thread.c | 4 ++++ 2 files changed, 10 insertions(+), 3 deletions(-) commit 253c3d388e0a3cde19af080a1ae12b9e4898aec0 Author: Yoann Vandoorselaere Date: Mon Jan 15 13:45:18 2007 +0000 Update IDMEF code generator. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@8752 09c5ec92-17d4-0310-903a-819935f44dba .../GenerateIDMEFMessageWriteC.pm | 2 +- src/idmef-wrappers-gen/GenerateIDMEFTreeWrapC.pm | 5 +++++ src/idmef-wrappers-gen/GenerateIDMEFTreeWrapH.pm | 3 +++ 3 files changed, 9 insertions(+), 1 deletions(-) commit 196e56f9d8b3690a699926f7984e39f514790b40 Author: Yoann Vandoorselaere Date: Mon Jan 15 13:44:17 2007 +0000 Lower case winsock2.h for cross compilation on case sensitive system. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@8751 09c5ec92-17d4-0310-903a-819935f44dba src/idmef-message-write.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) commit c98a808af080197e7b5a4b484891dc5340feaa88 Author: Yoann Vandoorselaere Date: Mon Jan 15 13:42:55 2007 +0000 Fix compilation error under MinGW. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@8750 09c5ec92-17d4-0310-903a-819935f44dba src/idmef-tree-wrap.c | 5 +++++ src/include/idmef-tree-wrap.h | 3 +++ 2 files changed, 8 insertions(+), 0 deletions(-) commit 85d5c4da127de965cb92ef7fa028574cf8cab71e Author: Yoann Vandoorselaere Date: Mon Jan 15 11:09:12 2007 +0000 Win32 portability fixes. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@8749 09c5ec92-17d4-0310-903a-819935f44dba src/prelude-failover.c | 4 ++++ 1 files changed, 4 insertions(+), 0 deletions(-) commit dce037e4589ac5a91929cf8f475ccac270651b43 Author: Yoann Vandoorselaere Date: Mon Jan 15 10:57:17 2007 +0000 Win32 portability fixes. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@8748 09c5ec92-17d4-0310-903a-819935f44dba src/prelude-client-profile.c | 6 ++++++ 1 files changed, 6 insertions(+), 0 deletions(-) commit ea4376021b943b2bc4408d80448c18564b7ef448 Author: Yoann Vandoorselaere Date: Mon Jan 15 10:53:47 2007 +0000 Win32 portability fixes. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@8747 09c5ec92-17d4-0310-903a-819935f44dba configure.in | 1 + src/prelude-io.c | 9 +++++++-- 2 files changed, 8 insertions(+), 2 deletions(-) commit fff5906807fb1af369130132951105633515c47e Author: Yoann Vandoorselaere Date: Mon Jan 8 13:23:00 2007 +0000 Version bump. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@8742 09c5ec92-17d4-0310-903a-819935f44dba NEWS | 5 + configure.in | 2 +- docs/api/libprelude-decl.txt | 2 +- docs/api/tmpl/prelude-plugin.sgml | 1 + libmissing/m4/wctype.m4 | 36 +++++++++ libmissing/wctype_.h | 153 +++++++++++++++++++++++++++++++++++++ 6 files changed, 197 insertions(+), 2 deletions(-) commit 10abcd1d06c752a3ee1020e4c92d83a62bb88425 Author: Yoann Vandoorselaere Date: Mon Jan 8 13:22:40 2007 +0000 Fix make installation error when Perl bindings are disabled. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@8741 09c5ec92-17d4-0310-903a-819935f44dba bindings/Makefile.am | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) commit 5e8a71b3ad17bc87f78124cad2053214ec87ffb6 Author: Yoann Vandoorselaere Date: Fri Jan 5 17:06:58 2007 +0000 Update NEWS, documentation, Gnulib code. Bump version number. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@8733 09c5ec92-17d4-0310-903a-819935f44dba NEWS | 17 +++++ configure.in | 4 +- docs/api/libprelude-decl.txt | 2 +- docs/api/tmpl/prelude-plugin.sgml | 4 + libmissing/Makefile.am | 24 +++++++- libmissing/m4/gnulib-cache.m4 | 2 +- libmissing/m4/gnulib-comp.m4 | 87 +++++++++++++++++++++++++- libmissing/m4/mbchar.m4 | 3 - libmissing/m4/mktime.m4 | 28 +++++--- libmissing/m4/regex.m4 | 2 +- libmissing/m4/wcwidth.m4 | 4 +- libmissing/mbchar.h | 127 +------------------------------------ libmissing/poll.c | 105 +++++++++++++++--------------- libmissing/regex_internal.h | 4 +- libmissing/wcwidth.h | 18 +----- 15 files changed, 210 insertions(+), 221 deletions(-) commit fa905917e25342f428830ccade745bde2a313927 Author: Yoann Vandoorselaere Date: Fri Jan 5 16:53:16 2007 +0000 New configure --with-perl-installdirs flags: might be used to override default site perl installation. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@8732 09c5ec92-17d4-0310-903a-819935f44dba bindings/Makefile.am | 2 +- configure.in | 13 +++++++++++++ 2 files changed, 14 insertions(+), 1 deletions(-) commit 63e2232425e1f15651f78abe03520258a2a81a22 Author: Yoann Vandoorselaere Date: Fri Jan 5 15:27:55 2007 +0000 Fix make -j compilation. Ability for packagers to provide an INSTALLDIRS variable git-svn-id: file:///home/yoann/SVN/trunk/libprelude@8731 09c5ec92-17d4-0310-903a-819935f44dba bindings/Makefile.am | 32 ++++++++++++++------------------ 1 files changed, 14 insertions(+), 18 deletions(-) commit 2289289ae21b5b177da6d193101794c1d63d6067 Author: Yoann Vandoorselaere Date: Fri Jan 5 14:48:27 2007 +0000 Fix incorrect initialization warnings with old gcc version. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@8730 09c5ec92-17d4-0310-903a-819935f44dba src/idmef-message-read.c | Bin 80699 -> 81714 bytes .../GenerateIDMEFMessageReadC.pm | 19 ++++++++++--------- 2 files changed, 10 insertions(+), 9 deletions(-) commit 165f2a04ddbefd4cf3261f25dc32f48723628969 Author: Yoann Vandoorselaere Date: Wed Jan 3 10:47:26 2007 +0000 Call prelude_init() so LIBPRELUDE_TLS_DEBUG can be used with prelude-adduser. Correct analyzer registration message. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@8728 09c5ec92-17d4-0310-903a-819935f44dba prelude-adduser/prelude-adduser.c | 9 ++++++++- 1 files changed, 8 insertions(+), 1 deletions(-) commit c58b838aa03596a2b92c2ba27526acaa0b600750 Author: Yoann Vandoorselaere Date: Wed Jan 3 10:42:29 2007 +0000 Optional TLS debugging through LIBPRELUDE_TLS_DEBUG environment variable. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@8727 09c5ec92-17d4-0310-903a-819935f44dba src/prelude.c | 14 ++++++++++++++ 1 files changed, 14 insertions(+), 0 deletions(-) commit 8f5a48a4d6b9750a3eb942f197d61f928e6084c7 Author: Yoann Vandoorselaere Date: Sat Dec 30 14:56:46 2006 +0000 Ignore inline keyword to prevent error with old SWIG version. Map prelude_error_t. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@8724 09c5ec92-17d4-0310-903a-819935f44dba bindings/libprelude.i | 5 +++++ 1 files changed, 5 insertions(+), 0 deletions(-) commit b9f22c6e803fc6eb87c2774076d56892ecfb17a6 Author: Yoann Vandoorselaere Date: Fri Dec 29 12:43:59 2006 +0000 Generate bindings for the error handling API. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@8721 09c5ec92-17d4-0310-903a-819935f44dba bindings/libprelude.i | 7 ++----- 1 files changed, 2 insertions(+), 5 deletions(-) commit 00a8996b99a5f87dff837420a58ab304c819792d Author: Yoann Vandoorselaere Date: Thu Dec 21 09:06:38 2006 +0000 Small Perl/Python detection improvement. Fix #182. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@8708 09c5ec92-17d4-0310-903a-819935f44dba configure.in | 17 ++++++++++++----- 1 files changed, 12 insertions(+), 5 deletions(-) commit ef7a1524ce7f93669e8a8a5a315126783d00614b Author: Yoann Vandoorselaere Date: Wed Dec 20 20:35:01 2006 +0000 Update GnuLib code, NEWS, documentation. Version bump. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@8706 09c5ec92-17d4-0310-903a-819935f44dba NEWS | 20 +++ configure.in | 6 +- docs/api/libprelude-decl.txt | 62 +------- docs/api/libprelude-sections.txt | 33 ++++ docs/api/tmpl/idmef-tree-wrap.sgml | 320 ++++++++++++++++++++++++++++++++++++ docs/api/tmpl/prelude-plugin.sgml | 6 + docs/api/tmpl/prelude-string.sgml | 10 + 7 files changed, 393 insertions(+), 64 deletions(-) commit a051f2312ed4dc0150a5f81e6de661b458dfe7e8 Author: Yoann Vandoorselaere Date: Wed Dec 20 17:30:26 2006 +0000 Improve error checking. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@8701 09c5ec92-17d4-0310-903a-819935f44dba src/config-engine.c | 16 ++++++++++++---- 1 files changed, 12 insertions(+), 4 deletions(-) commit 8e2e7197053b6ed611bb9dce17373833420f8322 Author: Yoann Vandoorselaere Date: Wed Dec 20 17:26:21 2006 +0000 Compile with -no-cpp-precomp under Darwin. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@8700 09c5ec92-17d4-0310-903a-819935f44dba configure.in | 24 +++++++++++++++++++++++- 1 files changed, 23 insertions(+), 1 deletions(-) commit 05948f4ee46d70fcf014b57c0d78ffdceff9be2b Author: Yoann Vandoorselaere Date: Wed Dec 20 17:21:42 2006 +0000 Remove unused. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@8699 09c5ec92-17d4-0310-903a-819935f44dba prelude-adduser/server.c | 9 +++++---- 1 files changed, 5 insertions(+), 4 deletions(-) commit 5d810a9da8c930e5ba812b2e98b1cec0237f71d7 Author: Yoann Vandoorselaere Date: Wed Dec 20 17:17:05 2006 +0000 Improve error checking. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@8698 09c5ec92-17d4-0310-903a-819935f44dba prelude-adduser/prelude-adduser.c | 47 ++++++++++++++++++++++++++---------- 1 files changed, 34 insertions(+), 13 deletions(-) commit 2ed466fdbf3b6f031dc533687a85333d3dabc225 Author: Yoann Vandoorselaere Date: Wed Dec 20 17:08:54 2006 +0000 Improve error checking. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@8697 09c5ec92-17d4-0310-903a-819935f44dba src/daemonize.c | 6 +++++- 1 files changed, 5 insertions(+), 1 deletions(-) commit 13a04a5d117143e54e03ddb1965ac0f6ce342036 Author: Yoann Vandoorselaere Date: Wed Dec 20 09:04:00 2006 +0000 Remove unused. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@8684 09c5ec92-17d4-0310-903a-819935f44dba m4/ac_prototype.m4 | 192 --------------------------------------------- m4/ac_prototype_accept.m4 | 35 -------- 2 files changed, 0 insertions(+), 227 deletions(-) commit fad066c84f77dfaf95ef5d0b2b0985ac1c30041f Author: Yoann Vandoorselaere Date: Wed Dec 20 09:03:31 2006 +0000 Remove deprecated check (most now operated through GnuLib). Check for clock_gettime in libposix4 as well as librt. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@8683 09c5ec92-17d4-0310-903a-819935f44dba configure.in | 83 +++++++-------------------------------------------------- 1 files changed, 11 insertions(+), 72 deletions(-) commit 83f511978d870ca6131d6dc44f8adc21d6db5aba Author: Yoann Vandoorselaere Date: Wed Dec 20 08:57:49 2006 +0000 Remove un-necessary time.h inclusion. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@8682 09c5ec92-17d4-0310-903a-819935f44dba src/common.c | 1 - 1 files changed, 0 insertions(+), 1 deletions(-) commit 4217525e98b4f5119fc9394c2f8dc63b79a848b0 Author: Yoann Vandoorselaere Date: Wed Dec 20 08:55:51 2006 +0000 Remove un-necessary time.h inclusion. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@8681 09c5ec92-17d4-0310-903a-819935f44dba src/idmef-criterion-value.c | 1 - src/include/idmef-criterion-value.h | 3 +-- 2 files changed, 1 insertions(+), 3 deletions(-) commit f944d3a835f2ec02ee5d2c672433189cd37f69ad Author: Yoann Vandoorselaere Date: Wed Dec 20 08:52:37 2006 +0000 time.h inclusion fixes. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@8680 09c5ec92-17d4-0310-903a-819935f44dba src/idmef-message-print.c | 1 - .../GenerateIDMEFMessagePrintC.pm | 1 - 2 files changed, 0 insertions(+), 2 deletions(-) commit ec45abc628ef2e427467e7424c8db89ad56cd0cc Author: Yoann Vandoorselaere Date: Wed Dec 20 08:51:48 2006 +0000 time.h inclusion fixes. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@8679 09c5ec92-17d4-0310-903a-819935f44dba prelude-adduser/prelude-adduser.c | 12 +++++++++++- src/prelude-async.c | 12 +++++++++++- src/prelude-ident.c | 12 +++++++++++- src/prelude-msg.c | 12 +++++++++++- src/prelude-plugin.c | 12 +++++++++++- src/prelude-timer.c | 2 +- 6 files changed, 56 insertions(+), 6 deletions(-) commit 6426d866ddd9427811b0cbe2b88ab29c85952947 Author: Yoann Vandoorselaere Date: Wed Dec 20 08:50:03 2006 +0000 Remove unnecessary sys/time.h inclusion. Use GnuLib poll module. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@8678 09c5ec92-17d4-0310-903a-819935f44dba prelude-adduser/server.c | 2 -- 1 files changed, 0 insertions(+), 2 deletions(-) commit d937b7b8b3f86cd2bdbcca3d95b14fd135073bed Author: Yoann Vandoorselaere Date: Wed Dec 20 08:48:40 2006 +0000 Use GnuLib poll module. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@8677 09c5ec92-17d4-0310-903a-819935f44dba src/prelude-io.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) commit 786ac01dc2516f00859ba46bfae7ed1e400c47da Author: Yoann Vandoorselaere Date: Wed Dec 20 08:47:56 2006 +0000 Use GnuLib poll module. Ipv6 compatibility fix. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@8676 09c5ec92-17d4-0310-903a-819935f44dba src/prelude-connection.c | 17 ++++++++++++++--- 1 files changed, 14 insertions(+), 3 deletions(-) commit a27eab8225cd90dcd78beb8af1e683d5e0b05efe Author: Yoann Vandoorselaere Date: Wed Dec 20 08:45:25 2006 +0000 Update GnuLib code. Implement the poll() module. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@8675 09c5ec92-17d4-0310-903a-819935f44dba libmissing/Makefile.am | 177 +++++++++++++++++++++++++++++------- libmissing/getaddrinfo.c | 17 ++-- libmissing/gettext.h | 52 ++++++++--- libmissing/m4/alloca.m4 | 28 ++++-- libmissing/m4/codeset.m4 | 2 +- libmissing/m4/eoverflow.m4 | 12 ++- libmissing/m4/extensions.m4 | 64 ++++++++----- libmissing/m4/gnulib-cache.m4 | 4 +- libmissing/m4/gnulib-comp.m4 | 43 +++++++++- libmissing/m4/longlong.m4 | 32 ++++++- libmissing/m4/poll.m4 | 72 +++++++++++++++ libmissing/m4/regex.m4 | 4 +- libmissing/m4/signed.m4 | 18 ---- libmissing/m4/size_max.m4 | 76 +++++++++------- libmissing/m4/stdint.m4 | 24 ++++- libmissing/m4/strcase.m4 | 6 +- libmissing/m4/ulonglong.m4 | 48 ++++++++++ libmissing/m4/vasnprintf.m4 | 11 +- libmissing/m4/wcwidth.m4 | 3 +- libmissing/mbchar.c | 2 +- libmissing/mbchar.h | 18 ++-- libmissing/poll.c | 203 +++++++++++++++++++++++++++++++++++++++++ libmissing/poll_.h | 53 +++++++++++ libmissing/printf-args.c | 4 +- libmissing/printf-args.h | 10 +- libmissing/printf-parse.c | 25 ++++-- libmissing/regcomp.c | 14 ++-- libmissing/regex.h | 19 ++-- libmissing/regex_internal.h | 4 +- libmissing/regexec.c | 2 +- libmissing/stdint_.h | 71 +++++++++++---- libmissing/strcase.h | 12 ++- libmissing/strdup.c | 4 +- libmissing/strdup.h | 12 ++- libmissing/strnlen1.c | 2 +- libmissing/vasnprintf.c | 12 +- libmissing/wcwidth.h | 4 + src/include/libmissing.h | 20 +---- 38 files changed, 930 insertions(+), 254 deletions(-) commit 2bf4c2a298ad939369115e17a4b80819689a6ded Author: Yoann Vandoorselaere Date: Thu Nov 23 12:15:41 2006 +0000 In case we use an AF_UNIX socket, don't use the socket path for the registration warning, since registration-server doesn't handle UNIX socket connection. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@8604 09c5ec92-17d4-0310-903a-819935f44dba src/prelude-connection.c | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) commit 3a02dfd76b31d714df910b3e8e2c55142d62a1aa Author: Yoann Vandoorselaere Date: Thu Nov 23 11:57:27 2006 +0000 No backslash return on prelude_error_verbose(). git-svn-id: file:///home/yoann/SVN/trunk/libprelude@8603 09c5ec92-17d4-0310-903a-819935f44dba src/tls-auth.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) commit 2896b69798e3bfe226f83ab711746cb74c0de942 Author: Yoann Vandoorselaere Date: Tue Nov 14 09:33:45 2006 +0000 Remove unused. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@8573 09c5ec92-17d4-0310-903a-819935f44dba src/common.c | 1 - 1 files changed, 0 insertions(+), 1 deletions(-) commit de97fdafb4b1949f4c62ae84fba4f229e9dec226 Author: Yoann Vandoorselaere Date: Thu Nov 9 12:29:09 2006 +0000 Remove unused variable. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@8563 09c5ec92-17d4-0310-903a-819935f44dba src/idmef-path.c | 1 - 1 files changed, 0 insertions(+), 1 deletions(-) commit 0259b708172f7bab74050fc037470aa5cb7066ac Author: Yoann Vandoorselaere Date: Mon Nov 6 12:52:53 2006 +0000 More error checking on IDMEF object copy. Copy the union enumeration qualifier. Avoid SEGV on destroy of a copied object. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@8549 09c5ec92-17d4-0310-903a-819935f44dba src/idmef-tree-wrap.c | 721 ++++++++++++++++------ src/idmef-wrappers-gen/GenerateIDMEFTreeWrapC.pm | 32 +- 2 files changed, 574 insertions(+), 179 deletions(-) commit 8767da15315e66dab8a385e3c680fa79bc789d24 Author: Yoann Vandoorselaere Date: Sat Nov 4 10:51:21 2006 +0000 Use correct alignement function git-svn-id: file:///home/yoann/SVN/trunk/libprelude@8548 09c5ec92-17d4-0310-903a-819935f44dba src/include/prelude-extract.h | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) commit f56006489f1f94f639fde5d434d936021ff2328d Author: Yoann Vandoorselaere Date: Wed Nov 1 10:43:05 2006 +0000 Make it clear that we pack float as an uint32_t git-svn-id: file:///home/yoann/SVN/trunk/libprelude@8541 09c5ec92-17d4-0310-903a-819935f44dba src/include/prelude-extract.h | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) commit 4a50b6bed34ad00df482d36c2d91b3169e9fcdab Author: Yoann Vandoorselaere Date: Tue Oct 31 14:44:14 2006 +0000 Implement prelude_htonf() to pack float value to network byte order. Fix the float extraction function: prelude_extract_float(). git-svn-id: file:///home/yoann/SVN/trunk/libprelude@8540 09c5ec92-17d4-0310-903a-819935f44dba src/common.c | 12 ++++++++++++ src/idmef-message-write.c | 6 ++---- .../GenerateIDMEFMessageWriteC.pm | 6 ++---- src/include/common.h | 2 ++ src/include/prelude-extract.h | 9 ++++++++- 5 files changed, 26 insertions(+), 9 deletions(-) commit e7febcf65424513d79f1465e9497c6055cb81aef Author: Yoann Vandoorselaere Date: Tue Oct 10 16:12:49 2006 +0000 Bump version number, update GnuLib code, NEWS, documentation git-svn-id: file:///home/yoann/SVN/trunk/libprelude@8526 09c5ec92-17d4-0310-903a-819935f44dba NEWS | 28 +++++ configure.in | 10 +- docs/api/libprelude-decl.txt | 240 +++++++++++++++++++++++++++++++++++-- docs/api/tmpl/prelude-plugin.sgml | 2 + libmissing/Makefile.am | 69 +++++++----- libmissing/asnprintf.c | 6 +- libmissing/getaddrinfo.c | 2 +- libmissing/m4/extensions.m4 | 42 ++++--- libmissing/m4/gnulib-comp.m4 | 2 + libmissing/m4/regex.m4 | 36 +++++- libmissing/m4/signed.m4 | 7 +- libmissing/m4/sockpfaf.m4 | 8 +- libmissing/m4/strndup.m4 | 7 +- libmissing/m4/time_r.m4 | 3 +- libmissing/mbchar.c | 6 +- libmissing/printf-args.c | 4 +- libmissing/printf-parse.c | 6 +- libmissing/regex_internal.c | 112 ++++++++++++++---- libmissing/strcasecmp.c | 6 +- libmissing/strcasestr.c | 6 +- libmissing/strncasecmp.c | 6 +- libmissing/strndup.c | 41 ++----- libmissing/strndup.h | 20 ++-- libmissing/strnlen1.c | 6 +- libmissing/vasnprintf.c | 4 +- 25 files changed, 507 insertions(+), 172 deletions(-) commit 4cf2154f906f923e9a7d5d6e43f38f6bc65655b2 Author: Yoann Vandoorselaere Date: Thu Sep 14 11:34:16 2006 +0000 GnuLib code update. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@8504 09c5ec92-17d4-0310-903a-819935f44dba libmissing/Makefile.am | 2 +- libmissing/alloca.c | 4 +--- libmissing/gai_strerror.c | 5 +---- libmissing/inet_ntop.c | 7 +++---- libmissing/malloc.c | 7 +++---- libmissing/memchr.c | 4 ++-- libmissing/regex.c | 4 +--- libmissing/snprintf.c | 4 +--- libmissing/strdup.c | 9 +++------ libmissing/strndup.c | 4 +--- libmissing/strnlen.c | 4 +--- libmissing/strpbrk.c | 8 ++++---- libmissing/time_r.c | 4 +--- libmissing/timegm.c | 9 +++------ 14 files changed, 26 insertions(+), 49 deletions(-) commit 3df81891d0f280b08828c88c27dd8a8b536243ce Author: Yoann Vandoorselaere Date: Thu Sep 14 11:32:55 2006 +0000 Only export symbol starting with idmef_ or _?prelude. Fix prelude-adduser so that it reference directly needed object file. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@8503 09c5ec92-17d4-0310-903a-819935f44dba prelude-adduser/Makefile.am | 9 +++++++-- src/Makefile.am | 2 +- 2 files changed, 8 insertions(+), 3 deletions(-) commit ae09bcf6620f9e91f2f9628f017a2d27137a9250 Author: Yoann Vandoorselaere Date: Thu Sep 14 11:31:50 2006 +0000 #ifndef SWIG around unexported symbols. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@8502 09c5ec92-17d4-0310-903a-819935f44dba src/idmef-path.c | 6 -- src/idmef-wrappers-gen/GenerateIDMEFTreeWrapH.pm | 5 +- src/include/idmef-path.h | 12 +++- src/include/idmef-tree-wrap.h | 90 ++++++++++++++++++++++ 4 files changed, 105 insertions(+), 8 deletions(-) commit a1b804522f7ef367916f92ef7427ff859bf08e98 Author: Yoann Vandoorselaere Date: Wed Sep 13 15:13:24 2006 +0000 Update. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@8501 09c5ec92-17d4-0310-903a-819935f44dba gtk-doc.make | 12 +++++++----- 1 files changed, 7 insertions(+), 5 deletions(-) commit 31f18ea8fb5610c54be23bb0c5655e81c84f0298 Author: Yoann Vandoorselaere Date: Wed Sep 13 14:57:15 2006 +0000 Update GnuLib code. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@8500 09c5ec92-17d4-0310-903a-819935f44dba libmissing/Makefile.am | 17 ++++--- libmissing/getaddrinfo.c | 9 ++++ libmissing/m4/codeset.m4 | 6 +- libmissing/m4/gnulib-cache.m4 | 2 + libmissing/m4/gnulib-comp.m4 | 1 + libmissing/m4/mktime.m4 | 103 +++++++++++++++++++++++++++-------------- libmissing/mktime.c | 11 ++-- libmissing/stdint_.h | 2 + libmissing/vasnprintf.c | 22 ++------- libmissing/vsnprintf.c | 35 +++++++++++--- src/include/libmissing.h | 11 +---- 11 files changed, 134 insertions(+), 85 deletions(-) commit 8a95c52944087a599c48c7effb1d7f82a124c0a9 Author: Yoann Vandoorselaere Date: Wed Sep 13 14:53:16 2006 +0000 Remove declaration for private function. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@8499 09c5ec92-17d4-0310-903a-819935f44dba src/idmef-path.c | 5 +++++ src/include/idmef-path.h | 8 -------- 2 files changed, 5 insertions(+), 8 deletions(-) commit 26eb6ca9d12b9cf185ab6ceee8de45721c65b289 Author: Yoann Vandoorselaere Date: Wed Sep 6 14:21:08 2006 +0000 Prefix the config_* API with a dash, since it is supposed to be private. Avoid possible symbol conflict. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@8488 09c5ec92-17d4-0310-903a-819935f44dba prelude-adduser/prelude-adduser.c | 10 +++++----- src/config-engine.c | 28 ++++++++++++++-------------- src/include/config-engine.h | 16 ++++++++-------- src/prelude-option-wide.c | 12 ++++++------ src/prelude-option.c | 6 +++--- 5 files changed, 36 insertions(+), 36 deletions(-) commit d3ba538d742a732f5a817f50488023bf4d000bce Author: Yoann Vandoorselaere Date: Wed Aug 23 15:12:04 2006 +0000 GnuLib update. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@8479 09c5ec92-17d4-0310-903a-819935f44dba configure.in | 2 +- libmissing/Makefile.am | 77 ++++++- libmissing/m4/absolute-header.m4 | 44 ++++ libmissing/m4/getaddrinfo.m4 | 4 +- libmissing/m4/gnulib-cache.m4 | 3 +- libmissing/m4/gnulib-comp.m4 | 8 +- libmissing/m4/inet_ntop.m4 | 3 +- libmissing/m4/intmax_t.m4 | 6 +- libmissing/m4/inttypes_h.m4 | 6 +- libmissing/m4/longlong.m4 | 6 +- libmissing/m4/mbchar.m4 | 13 +- libmissing/m4/pathmax.m4 | 6 +- libmissing/m4/regex.m4 | 8 +- libmissing/m4/restrict.m4 | 38 ---- libmissing/m4/stdint.m4 | 361 ++++++++++++++++++++++++++++++ libmissing/m4/stdint_h.m4 | 6 +- libmissing/m4/strdup.m4 | 6 +- libmissing/m4/strndup.m4 | 4 +- libmissing/m4/strnlen.m4 | 6 +- libmissing/m4/time_r.m4 | 3 +- libmissing/m4/wcwidth.m4 | 12 +- libmissing/mbchar.h | 5 +- libmissing/regex.h | 11 +- libmissing/regex_internal.c | 33 ++- libmissing/regex_internal.h | 7 +- libmissing/snprintf.c | 38 +++- libmissing/stdint_.h | 454 ++++++++++++++++++++++++++++++++++++++ libmissing/strnlen1.c | 17 +- libmissing/strnlen1.h | 17 +- src/include/libmissing.h | 8 +- 30 files changed, 1064 insertions(+), 148 deletions(-) commit c4463081b1c557e1e14d8f18b9ba2e0f17f1ab06 Author: Yoann Vandoorselaere Date: Wed Aug 23 13:51:23 2006 +0000 New GnuLib files... git-svn-id: file:///home/yoann/SVN/trunk/libprelude@8477 09c5ec92-17d4-0310-903a-819935f44dba libmissing/m4/arpa_inet_h.m4 | 18 ++++++++++++++++++ libmissing/m4/netinet_in_h.m4 | 18 ++++++++++++++++++ 2 files changed, 36 insertions(+), 0 deletions(-) commit 06d69460d79bbbdf77fab362e89588d2fb45b51b Author: Yoann Vandoorselaere Date: Sun Aug 13 18:36:04 2006 +0000 Fix const warning. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@8431 09c5ec92-17d4-0310-903a-819935f44dba src/idmef-path.c | 6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-) commit f6323e864971850075b6dc4adc25e9eab9ce6736 Author: Yoann Vandoorselaere Date: Sun Aug 13 17:44:46 2006 +0000 Change to the way IDMEF listed element are handled. Specifying negative number as the position of the element from the low level API now allow to position the element at the specified (reversed) index. Using the high level API a negative index permit to address a list of element backward (replace an element). git-svn-id: file:///home/yoann/SVN/trunk/libprelude@8430 09c5ec92-17d4-0310-903a-819935f44dba src/idmef-tree-wrap.c | 46 +++++++++++----------- src/idmef-wrappers-gen/GenerateIDMEFTreeWrapC.pm | 8 ++-- 2 files changed, 27 insertions(+), 27 deletions(-) commit ad418a60dfccf5763371130be0a7bfa4c0d9d2c7 Author: Yoann Vandoorselaere Date: Sun Aug 13 13:57:29 2006 +0000 Update idmef-tree-data.h git-svn-id: file:///home/yoann/SVN/trunk/libprelude@8429 09c5ec92-17d4-0310-903a-819935f44dba src/include/idmef-tree-data.h | 141 ++++++++++++++++------------------------- 1 files changed, 56 insertions(+), 85 deletions(-) commit b5e36ae33ac7df332d2fb1fca7341908edc79e83 Author: Yoann Vandoorselaere Date: Sun Aug 13 13:35:09 2006 +0000 Introduce better error checking in the idmef-class API, which is now considered public and might be used by external application. Rename error code to reflect the API. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@8428 09c5ec92-17d4-0310-903a-819935f44dba src/idmef-class.c | 149 ++++++++++++++++------ src/idmef-tree-wrap.c | 120 +++++++++--------- src/idmef-wrappers-gen/GenerateIDMEFTreeData.pm | 9 +- src/idmef-wrappers-gen/GenerateIDMEFTreeWrapC.pm | 4 +- src/libprelude-error/err-codes.h.in | 11 +- 5 files changed, 185 insertions(+), 108 deletions(-) commit df8ffa4343b2f44ac0ec6d0ec7e2736cf893b577 Author: Yoann Vandoorselaere Date: Sun Aug 13 13:30:00 2006 +0000 Simplify idmef_path_parse_new(). Don't check for exact -1 returned value in path->class since idmef-class will be updated to return correct error code. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@8427 09c5ec92-17d4-0310-903a-819935f44dba src/idmef-path.c | 30 +++++++++++++----------------- 1 files changed, 13 insertions(+), 17 deletions(-) commit 88171d6a27de023b1c5a8e05eb7a8c62bfd3500f Author: Yoann Vandoorselaere Date: Fri Aug 11 16:59:16 2006 +0000 Build fixes for SWIG > 1.3.27. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@8426 09c5ec92-17d4-0310-903a-819935f44dba bindings/libprelude_python.i | 1 + 1 files changed, 1 insertions(+), 0 deletions(-) commit 801840605f8704acef7cb51cbf1ab95e4706e3c4 Author: Yoann Vandoorselaere Date: Mon Aug 7 12:11:13 2006 +0000 Handle NULL string value. Make idmef_value_type_compare() only return a negative value on error (not on mismatch). git-svn-id: file:///home/yoann/SVN/trunk/libprelude@8387 09c5ec92-17d4-0310-903a-819935f44dba src/idmef-value-type.c | 19 ++++++++++++++----- 1 files changed, 14 insertions(+), 5 deletions(-) commit bc3766b9ae4acf9080b172bed9ad1750ad5c56d9 Author: Yoann Vandoorselaere Date: Mon Aug 7 11:51:40 2006 +0000 Use idmef_data_compare() directly. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@8386 09c5ec92-17d4-0310-903a-819935f44dba src/idmef-value-type.c | 11 +---------- 1 files changed, 1 insertions(+), 10 deletions(-) commit 7d1056767e697e73a9ebd5257b7fcdb1b33e77ee Author: Yoann Vandoorselaere Date: Mon Aug 7 11:47:23 2006 +0000 Use idmef_time_compare() directly. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@8385 09c5ec92-17d4-0310-903a-819935f44dba src/idmef-value-type.c | 10 +++++----- 1 files changed, 5 insertions(+), 5 deletions(-) commit f26fadda548cfe165e8983cd588d43b99f838378 Author: Yoann Vandoorselaere Date: Mon Aug 7 11:45:18 2006 +0000 Hook class comparison function. Accept NULL, equal, not equal operator. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@8384 09c5ec92-17d4-0310-903a-819935f44dba src/idmef-value-type.c | 14 ++++++++++++-- 1 files changed, 12 insertions(+), 2 deletions(-) commit c2f0e51b180436aea541bfc5084ceb6594624fad Author: Yoann Vandoorselaere Date: Mon Aug 7 11:39:15 2006 +0000 Avoid throwing an exception on idmef_*_compare() negative return value, which is not an error. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@8383 09c5ec92-17d4-0310-903a-819935f44dba bindings/libprelude_python.i | 49 ++++++++++++++++++++++++++++++++++++++++++ 1 files changed, 49 insertions(+), 0 deletions(-) commit e3f83939908e313d2dfc41abdcaff9f5f766b1be Author: Yoann Vandoorselaere Date: Mon Aug 7 11:37:54 2006 +0000 Implement idmef_class_compare(). Hook IDMEF object compare function to the idmef-tree-data table. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@8382 09c5ec92-17d4-0310-903a-819935f44dba src/idmef-class.c | 10 ++++++ src/include/idmef-class.h | 2 + src/include/idmef-tree-data.h | 69 +++++++++++++++++++++-------------------- 3 files changed, 47 insertions(+), 34 deletions(-) commit d52c06a2ef9b39c62623557fc4788a461b7a3b80 Author: Yoann Vandoorselaere Date: Mon Aug 7 11:36:09 2006 +0000 No need to unroll listed value here anymore, since this is now automatically handled by the upper idmef_value_match() layer. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@8381 09c5ec92-17d4-0310-903a-819935f44dba src/idmef-criterion-value.c | 41 +---------------------------------------- 1 files changed, 1 insertions(+), 40 deletions(-) commit 1eed1bb479bc462f43053b786844b1c35f2cba60 Author: Yoann Vandoorselaere Date: Mon Aug 7 11:34:47 2006 +0000 Modify idmef_value_match() so that it always unroll listed value (do it for both val1 and val2. Remove assertion, and let idmef_value_type_compare() return an error code in case there is an issue. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@8380 09c5ec92-17d4-0310-903a-819935f44dba src/idmef-value.c | 29 ++++++++++++++++------------- 1 files changed, 16 insertions(+), 13 deletions(-) commit ee5115892ac1f4653cd3a92320833581f670a285 Author: Yoann Vandoorselaere Date: Mon Aug 7 11:07:55 2006 +0000 Remove gratuitous newline. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@8379 09c5ec92-17d4-0310-903a-819935f44dba src/include/idmef-criteria.h | 2 -- 1 files changed, 0 insertions(+), 2 deletions(-) commit 393d51e5f50f7dc43d33810f53d3e31abe22f8e5 Author: Yoann Vandoorselaere Date: Mon Aug 7 11:07:13 2006 +0000 consistency fix git-svn-id: file:///home/yoann/SVN/trunk/libprelude@8378 09c5ec92-17d4-0310-903a-819935f44dba src/idmef-data.c | 8 ++++---- 1 files changed, 4 insertions(+), 4 deletions(-) commit e545121fd9948c27d805347a5fe1a78fe67a6d81 Author: Yoann Vandoorselaere Date: Mon Aug 7 11:06:13 2006 +0000 consistency fix git-svn-id: file:///home/yoann/SVN/trunk/libprelude@8377 09c5ec92-17d4-0310-903a-819935f44dba src/idmef-data.c | 6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-) commit fcb7b7829b3ac887583c0a16b4674b030f38cd56 Author: Yoann Vandoorselaere Date: Mon Aug 7 11:02:59 2006 +0000 Make idmef_time_compare() return -1 if t1 is lesser than t2, 0 if they match, 1 if greater git-svn-id: file:///home/yoann/SVN/trunk/libprelude@8376 09c5ec92-17d4-0310-903a-819935f44dba src/idmef-time.c | 20 ++++++++++---------- 1 files changed, 10 insertions(+), 10 deletions(-) commit dc1f62628526e89860eb1f56997e61a7dbc0ab8a Author: Yoann Vandoorselaere Date: Fri Aug 4 06:05:12 2006 +0000 Make idmef_path_set() / idmef_path_get() path argument const. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@8372 09c5ec92-17d4-0310-903a-819935f44dba src/idmef-path.c | 18 +++++++++--------- src/include/idmef-path.h | 4 ++-- 2 files changed, 11 insertions(+), 11 deletions(-) commit 658d6cebe9335f763b5e10f6f24ccc0426ad974f Author: Yoann Vandoorselaere Date: Thu Aug 3 15:08:40 2006 +0000 Handle path using IDMEF_LIST_APPEND / IDMEF_LIST_PREPEND as path using an undefined list index on idmef_path_get() call. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@8371 09c5ec92-17d4-0310-903a-819935f44dba src/idmef-path.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) commit 43ec650db16641032b90caf4dc745042623cca95 Author: Yoann Vandoorselaere Date: Thu Aug 3 12:48:17 2006 +0000 Make criteria parser accept (*) list index. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@8370 09c5ec92-17d4-0310-903a-819935f44dba src/idmef-criteria-string.lex.l | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) commit be006ae0c567627b4ecdeeedd03353354eb2e1cd Author: Yoann Vandoorselaere Date: Tue Aug 1 17:31:30 2006 +0000 Remove debugging spew. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@8362 09c5ec92-17d4-0310-903a-819935f44dba src/idmef-tree-wrap.c | 4 +--- 1 files changed, 1 insertions(+), 3 deletions(-) commit 303b31ec9c8859f76b648451777b76e01ccf3721 Author: Yoann Vandoorselaere Date: Tue Aug 1 17:28:55 2006 +0000 Implement comparison function for idmef_data_t, idmef_time_t and prelude_string_t. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@8361 09c5ec92-17d4-0310-903a-819935f44dba src/idmef-data.c | 22 ++++++++++++++++++++++ src/idmef-time.c | 27 +++++++++++++++++++++++++++ src/include/idmef-data.h | 2 ++ src/include/idmef-time.h | 2 ++ src/include/prelude-string.h | 2 +- src/prelude-string.c | 26 ++++++++++++++++++++++++++ 6 files changed, 80 insertions(+), 1 deletions(-) commit 42c33a0ae7a3eaa059b5aac58d610fa5d0d8659b Author: Yoann Vandoorselaere Date: Tue Aug 1 17:27:27 2006 +0000 Implement comparison function for all IDMEF object. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@8360 09c5ec92-17d4-0310-903a-819935f44dba src/idmef-tree-wrap.c | 1760 ++++++++++++++++++++++ src/idmef-wrappers-gen/GenerateIDMEFTreeData.pm | 4 +- src/idmef-wrappers-gen/GenerateIDMEFTreeWrapC.pm | 120 ++ src/idmef-wrappers-gen/GenerateIDMEFTreeWrapH.pm | 1 + src/include/idmef-tree-wrap.h | 30 + 5 files changed, 1914 insertions(+), 1 deletions(-) commit af56d284b061c89f3585ebefa61a6034acaebfad Author: Yoann Vandoorselaere Date: Fri Jul 28 18:06:36 2006 +0000 Release 0.9.10.2 for real git-svn-id: file:///home/yoann/SVN/trunk/libprelude@8353 09c5ec92-17d4-0310-903a-819935f44dba docs/api/libprelude-decl.txt | 2 +- docs/api/tmpl/prelude-plugin.sgml | 1 + libmissing/Makefile.am | 30 ++++++++++++++++++++++++++++++ libmissing/inet_ntop.h | 10 ++-------- libmissing/m4/gnulib-comp.m4 | 4 ++++ libmissing/m4/inet_ntop.m4 | 3 +-- libmissing/mbchar.h | 36 ++++++++++++++++++++++++------------ libmissing/wcwidth.h | 9 ++++++++- 8 files changed, 71 insertions(+), 24 deletions(-) commit c905dc394dff8f9692eae44f860f01eb5ee3da39 Author: Yoann Vandoorselaere Date: Fri Jul 28 15:38:51 2006 +0000 Bump version number. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@8350 09c5ec92-17d4-0310-903a-819935f44dba NEWS | 9 +++++++++ configure.in | 4 ++-- 2 files changed, 11 insertions(+), 2 deletions(-) commit 8bcae0f3c3c7bf078341d693eda55f0f42c0053c Author: Yoann Vandoorselaere Date: Fri Jul 28 15:35:05 2006 +0000 Update GnuLib code including FreeBSD warnings fixes. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@8349 09c5ec92-17d4-0310-903a-819935f44dba libmissing/inet_ntop.h | 7 ++- libmissing/m4/inet_ntop.m4 | 1 + libmissing/m4/mbchar.m4 | 6 ++- libmissing/mbchar.h | 109 ++++++++++++++++++++++++++++++++++++++++++++ src/include/libmissing.h | 1 + 5 files changed, 121 insertions(+), 3 deletions(-) commit 17a24f5cc0cc6afc8511c0ba2a24bf9be89d6597 Author: Yoann Vandoorselaere Date: Thu Jul 27 10:28:22 2006 +0000 Since we don't generate binding for prelude-inttypes, bind prelude_bool_t manually. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@8340 09c5ec92-17d4-0310-903a-819935f44dba bindings/libprelude.i | 4 ++++ 1 files changed, 4 insertions(+), 0 deletions(-) commit e37a32c108ca65aaf010545ef9708223e6fc2eee Author: Yoann Vandoorselaere Date: Thu Jul 27 09:22:34 2006 +0000 Don't create binding for prelude-inttypes constant. These are system dependant. Fix possible bindings compilation warnings/problem. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@8339 09c5ec92-17d4-0310-903a-819935f44dba bindings/libprelude.i | 3 +-- 1 files changed, 1 insertions(+), 2 deletions(-) commit b424a3b4f35505e6f5189d902dde9ec6d10a1fa7 Author: Yoann Vandoorselaere Date: Thu Jul 27 08:25:54 2006 +0000 Missing inclusion. Fix undefined reference. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@8338 09c5ec92-17d4-0310-903a-819935f44dba src/idmef-path.c | 1 + 1 files changed, 1 insertions(+), 0 deletions(-) commit 1dba678e6f9cf8731d4290fab0a085d1c9e84f1d Author: Yoann Vandoorselaere Date: Tue Jul 25 14:00:09 2006 +0000 Update GnuLib code, documentation, NEWS. Bump version number. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@8335 09c5ec92-17d4-0310-903a-819935f44dba NEWS | 12 +++ configure.in | 3 +- docs/api/libprelude-decl.txt | 2 +- docs/api/tmpl/prelude-plugin.sgml | 2 + libmissing/gettext.h | 166 ++++++++++++++++++++++++++++++++++++- libmissing/printf-args.c | 10 ++- 6 files changed, 190 insertions(+), 5 deletions(-) commit 2fe3a01dfb5c8c145de5d57f85a82466fed5d295 Author: Yoann Vandoorselaere Date: Mon Jul 24 13:41:41 2006 +0000 Fix path ordering when checking for swig/perl/python git-svn-id: file:///home/yoann/SVN/trunk/libprelude@8332 09c5ec92-17d4-0310-903a-819935f44dba configure.in | 6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-) commit 30b0c40aa7220163bf3dbf2bcbb4027864294cbd Author: Yoann Vandoorselaere Date: Sat Jul 22 10:32:51 2006 +0000 Update GnuLib code. Should fix OpenBSD getaddrinfo() problem. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@8328 09c5ec92-17d4-0310-903a-819935f44dba libmissing/Makefile.am | 2 +- libmissing/getaddrinfo.c | 23 +++++--- libmissing/getaddrinfo.h | 134 ++++++++++++++++++++-------------------- libmissing/m4/gnulib-cache.m4 | 3 +- libmissing/m4/gnulib-comp.m4 | 1 + libmissing/m4/onceonly_2_57.m4 | 12 ++-- 6 files changed, 93 insertions(+), 82 deletions(-) commit 4d44c4a4a5c9c3a913d9a4dca25d86097aadbb83 Author: Yoann Vandoorselaere Date: Mon Jul 17 17:06:53 2006 +0000 Include fix reported in #168 git-svn-id: file:///home/yoann/SVN/trunk/libprelude@8326 09c5ec92-17d4-0310-903a-819935f44dba src/prelude-plugin.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) commit 59c6fca46c60bf02372b7daa7cadf1f84f06d994 Author: Yoann Vandoorselaere Date: Wed Jul 12 15:45:36 2006 +0000 Update documentation, Bump version number. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@8313 09c5ec92-17d4-0310-903a-819935f44dba NEWS | 19 + configure.in | 8 +- docs/api/libprelude-decl.txt | 676 ++++++++++------------------ docs/api/libprelude-docs.sgml | 1 - docs/api/libprelude-sections.txt | 212 ++++------ docs/api/tmpl/idmef-additional-data.sgml | 10 - docs/api/tmpl/idmef-data.sgml | 12 +- docs/api/tmpl/idmef-tree-wrap.sgml | 676 +++++++++++++--------------- docs/api/tmpl/idmef-value.sgml | 11 + docs/api/tmpl/prelude-client.sgml | 24 +- docs/api/tmpl/prelude-connection-pool.sgml | 12 +- docs/api/tmpl/prelude-plugin.sgml | 13 + 12 files changed, 707 insertions(+), 967 deletions(-) commit f768edebf0f076193a90673a57ba82f7eab0291d Author: Yoann Vandoorselaere Date: Wed Jul 12 14:00:42 2006 +0000 Prefix some private function with _ git-svn-id: file:///home/yoann/SVN/trunk/libprelude@8312 09c5ec92-17d4-0310-903a-819935f44dba src/idmef-tree-wrap.c | 120 +++++++++++----------- src/idmef-wrappers-gen/GenerateIDMEFTreeData.pm | 4 +- src/idmef-wrappers-gen/GenerateIDMEFTreeWrapC.pm | 4 +- src/idmef-wrappers-gen/GenerateIDMEFTreeWrapH.pm | 4 +- src/include/idmef-tree-data.h | 60 ++++++------ src/include/idmef-tree-wrap.h | 120 +++++++++++----------- 6 files changed, 156 insertions(+), 156 deletions(-) commit fa08194a0259b12c4ad23ce97a4823b89b5a9e11 Author: Yoann Vandoorselaere Date: Wed Jul 12 13:59:21 2006 +0000 Fix GCC4 warning git-svn-id: file:///home/yoann/SVN/trunk/libprelude@8311 09c5ec92-17d4-0310-903a-819935f44dba prelude-adduser/tls-register.c | 5 +++-- 1 files changed, 3 insertions(+), 2 deletions(-) commit ef5fc55edeea495a8ecae07526b039f0d2fcf72d Author: Yoann Vandoorselaere Date: Wed Jul 12 13:58:55 2006 +0000 Update GnuLib code git-svn-id: file:///home/yoann/SVN/trunk/libprelude@8310 09c5ec92-17d4-0310-903a-819935f44dba libmissing/Makefile.am | 2 +- libmissing/getaddrinfo.c | 21 +++++++++++++-------- libmissing/getaddrinfo.h | 8 ++++++++ libmissing/m4/gnulib-cache.m4 | 3 ++- libmissing/m4/gnulib-comp.m4 | 1 - libmissing/m4/regex.m4 | 7 ++++--- libmissing/m4/sockpfaf.m4 | 5 +++-- libmissing/m4/strndup.m4 | 14 ++++++++------ libmissing/regex_internal.h | 2 +- 9 files changed, 40 insertions(+), 23 deletions(-) commit 4abba22fd00cb05d05310be46c9525f57aadc561 Author: Yoann Vandoorselaere Date: Mon Jul 3 13:53:37 2006 +0000 Avoid refcounting object from idmef-value since this unfortunately result in memory leak for application that aren't prepared to this change. Instead we refcount on idmef_path_get() returned value, so that object might be shared and used freely. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@8303 09c5ec92-17d4-0310-903a-819935f44dba src/idmef-path.c | 8 ++++++-- src/idmef-tree-wrap.c | 6 ++++++ src/idmef-value.c | 9 ++++----- src/idmef-wrappers-gen/GenerateIDMEFTreeWrapC.pm | 6 ++++++ 4 files changed, 22 insertions(+), 7 deletions(-) commit 12e9bdf2901b0e70dd07180273fbc03649424938 Author: Yoann Vandoorselaere Date: Mon Jul 3 07:33:10 2006 +0000 Fix IDMEF object table initialization. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@8302 09c5ec92-17d4-0310-903a-819935f44dba src/idmef-wrappers-gen/GenerateIDMEFTreeData.pm | 5 +- src/include/idmef-tree-data.h | 50 +++++++++++----------- 2 files changed, 28 insertions(+), 27 deletions(-) commit 4df7d7e6e006ee3a0d50c70462e8a88166c314ea Author: Yoann Vandoorselaere Date: Mon Jul 3 07:32:42 2006 +0000 Fix enumeration cloning. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@8301 09c5ec92-17d4-0310-903a-819935f44dba src/idmef-value-type.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) commit f88c4a8bf9cb9e719ab6ab825a715ce293d6be02 Author: Yoann Vandoorselaere Date: Mon Jul 3 05:43:11 2006 +0000 Update GnuLib code git-svn-id: file:///home/yoann/SVN/trunk/libprelude@8296 09c5ec92-17d4-0310-903a-819935f44dba libmissing/Makefile.am | 19 ++++- libmissing/alloca_.h | 26 ++++--- libmissing/getaddrinfo.c | 175 +++++++++++++++++++++++++++++++++++++++-- libmissing/getaddrinfo.h | 43 ++++++++-- libmissing/inet_ntop.c | 8 +-- libmissing/m4/getaddrinfo.m4 | 25 +++++-- libmissing/m4/gnulib-comp.m4 | 3 + libmissing/m4/inet_ntop.m4 | 6 +- libmissing/m4/longlong.m4 | 39 +++++++-- libmissing/m4/size_max.m4 | 45 ++++++----- libmissing/m4/sockpfaf.m4 | 24 +++++- libmissing/m4/ssize_t.m4 | 13 ++-- libmissing/m4/wcwidth.m4 | 26 ++++++ libmissing/mbchar.h | 4 +- libmissing/size_max.h | 6 +- libmissing/socket_.h | 36 ++++----- libmissing/wcwidth.h | 70 +++++++++++++++++ 17 files changed, 456 insertions(+), 112 deletions(-) commit 7151c14debd2a302ba6f6c5dfa3a2ebbb3a521cd Author: Yoann Vandoorselaere Date: Mon Jul 3 05:31:47 2006 +0000 Fix warning git-svn-id: file:///home/yoann/SVN/trunk/libprelude@8292 09c5ec92-17d4-0310-903a-819935f44dba src/idmef-criterion-value.c | 8 +++++++- 1 files changed, 7 insertions(+), 1 deletions(-) commit 162c568f87b82bf19b2ab6ecab6ce75e86352b0c Author: Yoann Vandoorselaere Date: Thu Jun 29 07:12:33 2006 +0000 Invalid enumeration error reporting improvement git-svn-id: file:///home/yoann/SVN/trunk/libprelude@8279 09c5ec92-17d4-0310-903a-819935f44dba src/idmef-tree-wrap.c | 40 +++++++++++----------- src/idmef-wrappers-gen/GenerateIDMEFTreeWrapC.pm | 2 +- 2 files changed, 21 insertions(+), 21 deletions(-) commit 695392fd54e8eec182b0b22939d2d2c3adc7bd68 Author: Yoann Vandoorselaere Date: Wed Jun 28 16:49:47 2006 +0000 No need to use idmef_value_dont_have_own_data() here anymore git-svn-id: file:///home/yoann/SVN/trunk/libprelude@8278 09c5ec92-17d4-0310-903a-819935f44dba src/idmef-path.c | 6 ++---- 1 files changed, 2 insertions(+), 4 deletions(-) commit 5dafa3bcd1bdac5000f0858af7897c214e7fe608 Author: Yoann Vandoorselaere Date: Wed Jun 28 16:49:23 2006 +0000 Refcount support for idmef_alert_t and idmef_heartbeat_t object. Call idmef_value_dont_have_own_data() when retrieving class that are static part of another object. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@8277 09c5ec92-17d4-0310-903a-819935f44dba src/idmef-tree-wrap.c | 216 +++++++++++++--------- src/idmef-wrappers-gen/GenerateIDMEFTreeWrapC.pm | 26 ++- src/idmef-wrappers-gen/idmef-tree.h | 3 + src/include/idmef-tree-wrap.h | 5 + 4 files changed, 156 insertions(+), 94 deletions(-) commit ba3a03d78e6e04f452b8d45735b30e8b6b2544c4 Author: Yoann Vandoorselaere Date: Wed Jun 28 16:47:57 2006 +0000 Handle enum/class operation directly from idmef-value-type. Reference class when we use them, so that the class is automatically freed if we are the last reference. This ease the use of the idmef-value system. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@8276 09c5ec92-17d4-0310-903a-819935f44dba src/idmef-value.c | 140 +++++++++++++++++++---------------------------------- 1 files changed, 50 insertions(+), 90 deletions(-) commit ed5acd708f45df5564ea9e563c42101c520f6829 Author: Yoann Vandoorselaere Date: Wed Jun 28 16:42:56 2006 +0000 Support enum / class operation directly from idmef-value-type. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@8275 09c5ec92-17d4-0310-903a-819935f44dba src/idmef-value-type.c | 58 +++++++++++++++++++++++++++++++++++++-- src/include/idmef-value-type.h | 14 ++++++++- 2 files changed, 67 insertions(+), 5 deletions(-) commit 5cdfa7116b10e0e373c0c1dd67868d2fbb0f5df7 Author: Yoann Vandoorselaere Date: Wed Jun 28 16:40:18 2006 +0000 Support reference function from idmef-class git-svn-id: file:///home/yoann/SVN/trunk/libprelude@8274 09c5ec92-17d4-0310-903a-819935f44dba src/idmef-class.c | 11 +++++++++++ src/include/idmef-class.h | 2 ++ 2 files changed, 13 insertions(+), 0 deletions(-) commit e27bf635a0b622cc5f3f4e07a486e89c92824d1c Author: Yoann Vandoorselaere Date: Wed Jun 28 16:18:16 2006 +0000 Generate pointer to IDMEF object refcounting function. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@8273 09c5ec92-17d4-0310-903a-819935f44dba src/idmef-wrappers-gen/GenerateIDMEFTreeData.pm | 3 + src/include/idmef-tree-data.h | 101 ++++++++++++----------- 2 files changed, 54 insertions(+), 50 deletions(-) commit 6a617e838294fc67de7d97f3bec7fde427bee258 Author: Yoann Vandoorselaere Date: Wed Jun 28 13:33:16 2006 +0000 Fix IDMEF value leak on certain criteria. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@8272 09c5ec92-17d4-0310-903a-819935f44dba src/idmef-criteria.c | 6 ++++-- 1 files changed, 4 insertions(+), 2 deletions(-) commit ef9bb022003def59e667fef56c1855b0383b8be7 Author: Yoann Vandoorselaere Date: Tue Jun 27 17:57:35 2006 +0000 Fix list deletion. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@8271 09c5ec92-17d4-0310-903a-819935f44dba src/idmef-path.c | 49 +++++++++++++++++++++++++++++++++---------------- 1 files changed, 33 insertions(+), 16 deletions(-) commit 2ae676e3f8b9bd95f05751986d1536608df4cdeb Author: Yoann Vandoorselaere Date: Sat Jun 24 08:04:57 2006 +0000 Destroy child class, not parent git-svn-id: file:///home/yoann/SVN/trunk/libprelude@8269 09c5ec92-17d4-0310-903a-819935f44dba src/idmef-path.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) commit 103b89905048d157ad7f19f6aa7e34d875d24800 Author: Yoann Vandoorselaere Date: Sat Jun 24 07:49:25 2006 +0000 Fix possible path integrity problem (name vs path object content) when using (*) list operator. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@8268 09c5ec92-17d4-0310-903a-819935f44dba src/idmef-path.c | 9 +++++---- 1 files changed, 5 insertions(+), 4 deletions(-) commit 899dfd9b5baf6276cdfb2deee502cba000757615 Author: Yoann Vandoorselaere Date: Fri Jun 23 12:31:19 2006 +0000 remove unused. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@8267 09c5ec92-17d4-0310-903a-819935f44dba src/idmef-path.c | 1 - 1 files changed, 0 insertions(+), 1 deletions(-) commit ca8217dbad7a87e0a7e3376d0f53706c25fbdd03 Author: Yoann Vandoorselaere Date: Fri Jun 23 12:28:19 2006 +0000 Allow using idmef_path_set() on listed value. The following operation are now permitted: listed_object = listed_object2 -> will overwrite listed_object with listed_object2. listed_object(>>) = listed_object2 -> will append listed_object2 to listed_object. listed_object(<<) = listed_object2 -> will prepend listed_object2 to listed_object. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@8266 09c5ec92-17d4-0310-903a-819935f44dba src/idmef-path.c | 117 +++++++++++++++++++++++++++++++++++++++++++++--------- 1 files changed, 98 insertions(+), 19 deletions(-) commit 0d2989810a05ef9bd02a486fa47d048e70b1ffce Author: Yoann Vandoorselaere Date: Wed Jun 21 08:59:40 2006 +0000 Fix warnings. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@8264 09c5ec92-17d4-0310-903a-819935f44dba src/idmef-class.c | 2 ++ src/include/idmef-class.h | 6 +++--- 2 files changed, 5 insertions(+), 3 deletions(-) commit 1b02a23dc2c5ba7274d758affaf37cbf247fe4de Author: Yoann Vandoorselaere Date: Wed Jun 21 08:19:47 2006 +0000 Implement idmef_class_destroy() git-svn-id: file:///home/yoann/SVN/trunk/libprelude@8263 09c5ec92-17d4-0310-903a-819935f44dba src/idmef-class.c | 11 +++++++++++ src/include/idmef-class.h | 2 ++ 2 files changed, 13 insertions(+), 0 deletions(-) commit b01794eb9838d542ef5cda56e4ab8dee1bb8c84c Author: Yoann Vandoorselaere Date: Wed Jun 21 08:19:10 2006 +0000 Make the object table contain a pointer to the object destroy method git-svn-id: file:///home/yoann/SVN/trunk/libprelude@8262 09c5ec92-17d4-0310-903a-819935f44dba src/idmef-wrappers-gen/GenerateIDMEFTreeData.pm | 4 +- src/include/idmef-tree-data.h | 61 ++++++++++++----------- 2 files changed, 34 insertions(+), 31 deletions(-) commit eb5c5992b3c0d8626df2b90434ff6c6ac3c8cb70 Author: Yoann Vandoorselaere Date: Wed Jun 21 08:16:50 2006 +0000 Implement public idmef_value_type_to_string(). Fix duplicate return. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@8261 09c5ec92-17d4-0310-903a-819935f44dba src/idmef-value-type.c | 18 ++++++++---------- src/include/idmef-value-type.h | 2 ++ 2 files changed, 10 insertions(+), 10 deletions(-) commit 5c11f1637c2649f1734a05420fe57b0564a0c15c Author: Yoann Vandoorselaere Date: Tue Jun 20 11:32:21 2006 +0000 Implement idmef_value_iterate_reversed(). Propagate error return in idmef_value_iterate() as well. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@8260 09c5ec92-17d4-0310-903a-819935f44dba src/idmef-value.c | 24 ++++++++++++++++++++++-- src/include/idmef-value.h | 2 ++ 2 files changed, 24 insertions(+), 2 deletions(-) commit 622021c15d79d5ddb730b83c117d41b12c44a704 Author: Yoann Vandoorselaere Date: Mon Jun 12 14:51:02 2006 +0000 Fix build git-svn-id: file:///home/yoann/SVN/trunk/libprelude@8252 09c5ec92-17d4-0310-903a-819935f44dba src/idmef-tree-wrap.c | 506 +++++++++++----------- src/idmef-wrappers-gen/GenerateIDMEFTreeData.pm | 8 +- src/idmef-wrappers-gen/GenerateIDMEFTreeWrapC.pm | 16 +- src/include/idmef-tree-data.h | 100 +++--- 4 files changed, 315 insertions(+), 315 deletions(-) commit 72ae3e17b50c68dec1b52d259dbfe1edea0f340e Author: Yoann Vandoorselaere Date: Mon Jun 12 14:43:44 2006 +0000 Remove newly autogenerated function. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@8251 09c5ec92-17d4-0310-903a-819935f44dba src/idmef-additional-data.c | 20 -------------------- src/include/idmef-additional-data.h | 1 - 2 files changed, 0 insertions(+), 21 deletions(-) commit 878ae7b55a153081a0c418556b62b34f739fadbc Author: Yoann Vandoorselaere Date: Mon Jun 12 14:41:51 2006 +0000 Handle class copy/cloning. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@8250 09c5ec92-17d4-0310-903a-819935f44dba src/idmef-value.c | 22 +++++++++++++++++++++- 1 files changed, 21 insertions(+), 1 deletions(-) commit 5be44fa6d08d5e69a131a87383fcb332857cd54f Author: Yoann Vandoorselaere Date: Mon Jun 12 14:41:19 2006 +0000 Implement idmef_class_copy() / idmef_class_clone(). git-svn-id: file:///home/yoann/SVN/trunk/libprelude@8249 09c5ec92-17d4-0310-903a-819935f44dba src/idmef-class.c | 18 ++++++++++++++++++ src/include/idmef-class.h | 8 ++++++++ 2 files changed, 26 insertions(+), 0 deletions(-) commit 799305cc57fdc5b89ff9398f753b3d17dc8a0efd Author: Yoann Vandoorselaere Date: Mon Jun 12 14:40:21 2006 +0000 Generate _copy and _clone function for the whole IDMEF API. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@8248 09c5ec92-17d4-0310-903a-819935f44dba src/idmef-tree-wrap.c | 1732 +++++++++++++++++++++- src/idmef-wrappers-gen/GenerateIDMEFTreeData.pm | 10 +- src/idmef-wrappers-gen/GenerateIDMEFTreeWrapC.pm | 130 ++- src/idmef-wrappers-gen/GenerateIDMEFTreeWrapH.pm | 2 + src/include/idmef-tree-data.h | 102 +- src/include/idmef-tree-wrap.h | 60 + 6 files changed, 1963 insertions(+), 73 deletions(-) commit abef445d568617c6ae7d27658c196e7db6c1fe14 Author: Yoann Vandoorselaere Date: Tue Jun 6 08:27:33 2006 +0000 Update GnuLib stuff, NEWS, documentation. Bump version number. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@8233 09c5ec92-17d4-0310-903a-819935f44dba NEWS | 11 ++++++++ configure.in | 4 +- docs/api/libprelude-decl.txt | 2 +- docs/api/tmpl/idmef-criteria.sgml | 4 --- docs/api/tmpl/idmef-criterion-value.sgml | 6 ---- docs/api/tmpl/idmef-data.sgml | 25 ------------------- docs/api/tmpl/idmef-path.sgml | 10 ------- docs/api/tmpl/idmef-tree-wrap.sgml | 2 - docs/api/tmpl/idmef-value.sgml | 6 ---- docs/api/tmpl/prelude-client.sgml | 3 -- docs/api/tmpl/prelude-connection-pool.sgml | 8 ------ docs/api/tmpl/prelude-connection.sgml | 2 - docs/api/tmpl/prelude-log.sgml | 4 --- docs/api/tmpl/prelude-msg.sgml | 3 -- docs/api/tmpl/prelude-plugin.sgml | 4 +- docs/api/tmpl/prelude.sgml | 2 - libmissing/Makefile.am | 4 +- libmissing/m4/gnulib-cache.m4 | 3 +- libmissing/m4/gnulib-comp.m4 | 3 +- libmissing/m4/stdbool.m4 | 4 +- libmissing/m4/strndup.m4 | 36 ++++++++++++++++++++++++--- libmissing/printf-args.c | 21 +++++++++++++++- libmissing/regexec.c | 4 +- libmissing/strndup.c | 4 ++- 24 files changed, 81 insertions(+), 94 deletions(-) commit 6f2e57790c8f5630cede0475becef505081be779 Author: Yoann Vandoorselaere Date: Thu Jun 1 14:01:10 2006 +0000 Enumeration generation fixes. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@8222 09c5ec92-17d4-0310-903a-819935f44dba src/idmef-tree-wrap.c | 20 ++++++++++---------- src/idmef-wrappers-gen/GenerateIDMEFTreeWrapC.pm | 16 +++++++++++----- 2 files changed, 21 insertions(+), 15 deletions(-) commit 31fb7c169ce010a68123ffe56c7d542d9074847b Author: Yoann Vandoorselaere Date: Wed May 31 15:11:27 2006 +0000 Detailed, verbose error reporting for unsupported value operation git-svn-id: file:///home/yoann/SVN/trunk/libprelude@8221 09c5ec92-17d4-0310-903a-819935f44dba src/idmef-value-type.c | 26 ++++++++++++++++++-------- 1 files changed, 18 insertions(+), 8 deletions(-) commit e80d48bf03d53b282f14227ae38097f5f0b707fd Author: Yoann Vandoorselaere Date: Wed May 31 15:10:01 2006 +0000 Detailed, verbose error reporting when failing to read IDMEF message git-svn-id: file:///home/yoann/SVN/trunk/libprelude@8220 09c5ec92-17d4-0310-903a-819935f44dba src/idmef-message-read.c | Bin 78733 -> 80699 bytes .../GenerateIDMEFMessageReadC.pm | 2 +- 2 files changed, 1 insertions(+), 1 deletions(-) commit 8bce55a50533cc01a3b64980c923581610b6393e Author: Yoann Vandoorselaere Date: Thu May 18 10:08:31 2006 +0000 Fix idmef-tree-wrap.h generation due to latest enumeration handling change git-svn-id: file:///home/yoann/SVN/trunk/libprelude@8208 09c5ec92-17d4-0310-903a-819935f44dba src/idmef-wrappers-gen/GenerateIDMEFTreeWrapH.pm | 5 ++++- src/include/idmef-tree-wrap.h | 20 ++++++++++---------- 2 files changed, 14 insertions(+), 11 deletions(-) commit a42bbe06b09c9670cc255023169b77d6c707e2e0 Author: Yoann Vandoorselaere Date: Wed May 17 10:03:51 2006 +0000 Ability to provide specific enumeration text value instead of the default translation scheme. Used by the Checksum Algorithm enumeration for now. This is needed since certain IDMEF enumeration make special use of lower/upper case. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@8201 09c5ec92-17d4-0310-903a-819935f44dba src/idmef-tree-wrap.c | 20 ++++++++++---------- src/idmef-wrappers-gen/GenerateIDMEFTreeWrapC.pm | 20 ++++++++++++++------ src/idmef-wrappers-gen/IDMEFTree.pm | 10 +++++++--- src/idmef-wrappers-gen/idmef-tree.h | 20 ++++++++++---------- src/include/idmef-tree-wrap.h | 20 ++++++++++---------- 5 files changed, 51 insertions(+), 39 deletions(-) commit 6db8ec6b7fba8993ca17f06b7614c348bb88fd8e Author: Yoann Vandoorselaere Date: Wed May 17 08:29:44 2006 +0000 Fix FreeBSD compilation problem git-svn-id: file:///home/yoann/SVN/trunk/libprelude@8200 09c5ec92-17d4-0310-903a-819935f44dba src/include/libmissing.h | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) commit 8ce7a89e782c46420b53859e6f4625639caa5442 Author: Yoann Vandoorselaere Date: Wed May 3 11:07:13 2006 +0000 Bump version number, Update documentation git-svn-id: file:///home/yoann/SVN/trunk/libprelude@8178 09c5ec92-17d4-0310-903a-819935f44dba NEWS | 22 +++++++ configure.in | 11 ++-- docs/api/libprelude-decl.txt | 102 +++++++++++++++++++++++++++------- docs/api/libprelude-sections.txt | 12 ++++ docs/api/tmpl/idmef-tree-wrap.sgml | 108 ++++++++++++++++++++++++++++++++++++ docs/api/tmpl/prelude-plugin.sgml | 3 + 6 files changed, 231 insertions(+), 27 deletions(-) commit d304af94a841dbabb5153bf9e50bb802d7fbf924 Author: Yoann Vandoorselaere Date: Wed May 3 09:46:23 2006 +0000 GCC 4 warning fixes git-svn-id: file:///home/yoann/SVN/trunk/libprelude@8176 09c5ec92-17d4-0310-903a-819935f44dba bindings/libprelude_python.i | 11 +++++++---- 1 files changed, 7 insertions(+), 4 deletions(-) commit 7317702c0a25063fa7ab0c12feff75fce601dd7a Author: Yoann Vandoorselaere Date: Wed May 3 06:40:12 2006 +0000 Update Gnulib code git-svn-id: file:///home/yoann/SVN/trunk/libprelude@8175 09c5ec92-17d4-0310-903a-819935f44dba libmissing/m4/ssize_t.m4 | 20 ++++++++++++++++++++ 1 files changed, 20 insertions(+), 0 deletions(-) commit 3dc830f3180940e022f15d0fa6c6faa9617b15ec Author: Yoann Vandoorselaere Date: Wed May 3 06:39:30 2006 +0000 Update Gnulib code git-svn-id: file:///home/yoann/SVN/trunk/libprelude@8174 09c5ec92-17d4-0310-903a-819935f44dba libmissing/Makefile.am | 8 +- libmissing/m4/extensions.m4 | 3 + libmissing/m4/gnulib-comp.m4 | 2 + libmissing/m4/longdouble.m4 | 7 +- libmissing/m4/regex.m4 | 42 ++-- libmissing/m4/time_r.m4 | 3 +- libmissing/regcomp.c | 627 ++++++++++++++++++++++----------------- libmissing/regex.c | 7 +- libmissing/regex.h | 500 +++++++++++++------------------- libmissing/regex_internal.c | 271 +++++++++--------- libmissing/regex_internal.h | 195 +++++-------- libmissing/regexec.c | 667 +++++++++++++++++++++++------------------- libmissing/time_r.c | 8 - src/include/libmissing.h | 19 +- 14 files changed, 1191 insertions(+), 1168 deletions(-) commit bf878fbc5ae05d0ebb741dd771e263950866aec7 Author: Yoann Vandoorselaere Date: Wed May 3 06:14:31 2006 +0000 Fix GCC 4 warning git-svn-id: file:///home/yoann/SVN/trunk/libprelude@8173 09c5ec92-17d4-0310-903a-819935f44dba src/tls-auth.c | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) commit 121aaed570fa8801010d3444c1f610dec93cf84b Author: Yoann Vandoorselaere Date: Mon May 1 12:09:13 2006 +0000 Ignore character that are part of the option value when comparing option specified using --option=value. Fix handling of parent option. Should fix #150. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@8171 09c5ec92-17d4-0310-903a-819935f44dba src/prelude-option.c | 37 ++++++++++++++++++++++--------------- 1 files changed, 22 insertions(+), 15 deletions(-) commit 7e0bf9141df521b2768672568a95bebb4305e729 Author: Yoann Vandoorselaere Date: Fri Apr 28 08:56:50 2006 +0000 More multiline reading fixes. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@8162 09c5ec92-17d4-0310-903a-819935f44dba src/common.c | 14 ++++++++------ 1 files changed, 8 insertions(+), 6 deletions(-) commit f1c5592941b54e14a115128a2cc4d082f163ada2 Author: Yoann Vandoorselaere Date: Fri Apr 28 08:22:04 2006 +0000 Fix handling of \r\n terminated line. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@8161 09c5ec92-17d4-0310-903a-819935f44dba src/common.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) commit f4372ddf467d1a8eeb7df60da344b1bb3b2837a7 Author: Yoann Vandoorselaere Date: Thu Apr 27 13:17:47 2006 +0000 Create time is a required object, thus idmef_*_get_create_time() will never return NULL. Check the sec member and fill create_time if needed git-svn-id: file:///home/yoann/SVN/trunk/libprelude@8156 09c5ec92-17d4-0310-903a-819935f44dba src/common.c | 6 ++++-- 1 files changed, 4 insertions(+), 2 deletions(-) commit d2ea8fdea2c5ff292665a8a89ff26cc17a5abc52 Author: Yoann Vandoorselaere Date: Wed Apr 26 09:44:40 2006 +0000 Function constification git-svn-id: file:///home/yoann/SVN/trunk/libprelude@8153 09c5ec92-17d4-0310-903a-819935f44dba src/include/prelude-client-profile.h | 28 ++++++++++++++-------------- src/prelude-client-profile.c | 28 ++++++++++++++-------------- 2 files changed, 28 insertions(+), 28 deletions(-) commit 26d09806bf09a166f302145d9f2512d926b8d0e9 Author: Yoann Vandoorselaere Date: Wed Apr 26 09:44:05 2006 +0000 GCC 4 warning fix git-svn-id: file:///home/yoann/SVN/trunk/libprelude@8152 09c5ec92-17d4-0310-903a-819935f44dba prelude-adduser/server.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) commit 6228aa16c04f0eae58c434f3ebb113b4496ceb99 Author: Yoann Vandoorselaere Date: Fri Apr 21 09:11:47 2006 +0000 Keep deprecated community member for backward compatibility. Will be removed in future release. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@8147 09c5ec92-17d4-0310-903a-819935f44dba src/idmef-message-print.c | 14 +++++++ src/idmef-message-read.c | Bin 78371 -> 78733 bytes src/idmef-message-write.c | 4 ++ src/idmef-tree-wrap.c | 73 ++++++++++++++++++++++++++++++++++- src/idmef-wrappers-gen/idmef-tree.h | 5 ++ src/include/idmef-message-id.h | 1 + src/include/idmef-tree-data.h | 1 + src/include/idmef-tree-wrap.h | 9 ++++ 8 files changed, 106 insertions(+), 1 deletions(-) commit 2c6d6b773d205cc6c0fdf111fde3e45812a958d0 Author: Yoann Vandoorselaere Date: Fri Apr 21 08:18:25 2006 +0000 Rework SNMPService class for IDMEFv16 compliance: - Add message_processing_model member - Add security_model member - Add security_level member - Remove deprecated community member git-svn-id: file:///home/yoann/SVN/trunk/libprelude@8146 09c5ec92-17d4-0310-903a-819935f44dba src/idmef-message-print.c | 36 ++++++- src/idmef-message-read.c | Bin 77639 -> 78371 bytes src/idmef-message-write.c | 35 ++++++- src/idmef-tree-wrap.c | 200 +++++++++++++++++++++++++++-------- src/idmef-wrappers-gen/idmef-tree.h | 4 +- src/include/idmef-message-id.h | 12 ++- src/include/idmef-tree-data.h | 4 +- src/include/idmef-tree-wrap.h | 21 +++- 8 files changed, 252 insertions(+), 60 deletions(-) commit af601812f62a6805420c586a774a85ed9ffe6c51 Author: Yoann Vandoorselaere Date: Wed Apr 19 10:00:47 2006 +0000 Correct call to prelude_error_from_errno(). git-svn-id: file:///home/yoann/SVN/trunk/libprelude@8143 09c5ec92-17d4-0310-903a-819935f44dba src/prelude-connection-pool.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) commit 0378c8420ee6ff423fa0af8ad7521e62a40b013b Author: Yoann Vandoorselaere Date: Mon Apr 17 14:38:08 2006 +0000 --enable-(perl|python) become --with-(perl|python). We are supposed to use AC_ARG_WITH rather than AC_ARG_ENABLE when it require external dependencies. You can also provide a direct path to the perl/python/swig binary if you wish. --without-(swig|perl|python) behave as expected. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@8140 09c5ec92-17d4-0310-903a-819935f44dba configure.in | 57 ++++++++++++++++++++++++++++++++++++++++----------------- 1 files changed, 40 insertions(+), 17 deletions(-) commit d610c4f57ebe167ec635df94b81823b82cd0b090 Author: Yoann Vandoorselaere Date: Mon Apr 17 14:35:09 2006 +0000 Use AC_HELP_STRING() for readability. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@8139 09c5ec92-17d4-0310-903a-819935f44dba m4/libgnutls-extra.m4 | 2 +- m4/libgnutls.m4 | 2 +- m4/libprelude.m4 | 6 +++--- 3 files changed, 5 insertions(+), 5 deletions(-) commit 5a417d148dca799a822060d7513643689bf44aa3 Author: Yoann Vandoorselaere Date: Fri Apr 7 11:10:16 2006 +0000 untabify git-svn-id: file:///home/yoann/SVN/trunk/libprelude@8128 09c5ec92-17d4-0310-903a-819935f44dba src/idmef-path.c | 174 +++++++++++++++++++++++++++--------------------------- 1 files changed, 87 insertions(+), 87 deletions(-) commit f76c0077599bbd4759ba21eea2ce40e460f98b8f Author: Yoann Vandoorselaere Date: Fri Apr 7 11:09:14 2006 +0000 Improve error reporting. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@8127 09c5ec92-17d4-0310-903a-819935f44dba src/idmef-path.c | 8 +++++--- 1 files changed, 5 insertions(+), 3 deletions(-) commit 33b8d031cdbbfde35b839b9671e56d8a14ade3ab Author: Yoann Vandoorselaere Date: Tue Mar 28 17:16:18 2006 +0000 Forgot to commit latest 0.9.7.1 changes. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@8100 09c5ec92-17d4-0310-903a-819935f44dba NEWS | 5 +++++ configure.in | 4 ++-- docs/api/libprelude-decl.txt | 2 +- docs/api/tmpl/prelude-log.sgml | 6 ++---- docs/api/tmpl/prelude-plugin.sgml | 4 ++-- 5 files changed, 12 insertions(+), 9 deletions(-) commit 14421b5461b7eb5576c924b2783911c50c921fad Author: Yoann Vandoorselaere Date: Thu Mar 23 18:53:21 2006 +0000 Fix regression introduced in 8066 git-svn-id: file:///home/yoann/SVN/trunk/libprelude@8080 09c5ec92-17d4-0310-903a-819935f44dba src/prelude-msgbuf.c | 11 ++++------- 1 files changed, 4 insertions(+), 7 deletions(-) commit b624ddee527749529fbaa1dfbeca38e5643a720d Author: Yoann Vandoorselaere Date: Tue Mar 21 16:15:42 2006 +0000 Update GnuLib code, NEWS, bump version number. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@8069 09c5ec92-17d4-0310-903a-819935f44dba NEWS | 10 ++++++++++ configure.in | 2 +- gtk-doc.make | 12 ++++++------ libmissing/m4/regex.m4 | 41 +++++++++-------------------------------- libmissing/regex.h | 14 ++++++++------ libmissing/time_r.c | 14 +------------- libmissing/time_r.h | 21 ++++++++------------- 7 files changed, 43 insertions(+), 71 deletions(-) commit ca436b17b8e935fcdd852a408eba78a1854b3eaf Author: Yoann Vandoorselaere Date: Tue Mar 21 16:15:04 2006 +0000 We can't conditionally define the size of uint64_t since the typedef are directly handled by swig when generating the resulting source code. Thus revert to statically mapping int64_t to long long since it seem to work for everyone. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@8068 09c5ec92-17d4-0310-903a-819935f44dba bindings/libprelude.i | 10 ++-------- 1 files changed, 2 insertions(+), 8 deletions(-) commit 4846a9b0a2bb7af0f2f785e3dc2dfcd2d9d8735a Author: Yoann Vandoorselaere Date: Wed Mar 15 09:26:15 2006 +0000 Asynchronous callback don't error out on PRELUDE_ERROR_EAGAIN. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@8042 09c5ec92-17d4-0310-903a-819935f44dba src/prelude-msgbuf.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) commit 91db0a16e94bd7a2ac7813f819addecf8c078149 Author: Yoann Vandoorselaere Date: Tue Mar 14 19:04:38 2006 +0000 In asynchronous mode, only allocate the buffer when needed, rather than always keeping a buffer ready. This might avoid all kind of memory fragmentation problem on async message burst. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@8039 09c5ec92-17d4-0310-903a-819935f44dba src/prelude-msgbuf.c | 11 +++++++---- 1 files changed, 7 insertions(+), 4 deletions(-) commit a8e81a886523317652347a08471f069aea62469c Author: Yoann Vandoorselaere Date: Thu Mar 9 13:20:29 2006 +0000 Update documentation, NEWS. Bump version number. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@8035 09c5ec92-17d4-0310-903a-819935f44dba NEWS | 15 +++++++++++++++ configure.in | 8 ++++---- docs/api/libprelude-decl.txt | 7 +------ docs/api/libprelude-sections.txt | 1 - 4 files changed, 20 insertions(+), 11 deletions(-) commit b438e845c16551a581e89163b440d0d0d4a91503 Author: Yoann Vandoorselaere Date: Thu Mar 9 12:58:47 2006 +0000 Only print 'Waiting for asynchronous operation to complete' message if there are operation in the queue. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@8034 09c5ec92-17d4-0310-903a-819935f44dba src/prelude-async.c | 4 +++- 1 files changed, 3 insertions(+), 1 deletions(-) commit 374b901300bec0f1cf4a978bf8ed8d62da1769ce Author: Yoann Vandoorselaere Date: Thu Mar 9 10:48:32 2006 +0000 Fix an issue with system with both v4 and v6 interface, but which doesn't allow binding both 0.0.0.0 and :: . Since the behavior is hard to predict, we handle bind() EADDRINUSE failure quietly if another address of different family was already bound. Details: http://lists.debian.org/debian-ipv6/2001/01/msg00031.html git-svn-id: file:///home/yoann/SVN/trunk/libprelude@8030 09c5ec92-17d4-0310-903a-819935f44dba prelude-adduser/server.c | 40 +++++++++++++++++++++++++++------------- 1 files changed, 27 insertions(+), 13 deletions(-) commit 711c5910d4d274bb3c2f40d4d6b485958a1833c7 Author: Yoann Vandoorselaere Date: Wed Mar 8 09:48:23 2006 +0000 Fix small option leak. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@8023 09c5ec92-17d4-0310-903a-819935f44dba src/prelude-option.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) commit e96bba26985bd61edf3e84390b01f981f758e908 Author: Yoann Vandoorselaere Date: Wed Mar 8 09:38:03 2006 +0000 Fix for plugin without activation option git-svn-id: file:///home/yoann/SVN/trunk/libprelude@8022 09c5ec92-17d4-0310-903a-819935f44dba src/prelude-plugin.c | 28 ++++++++++++++++------------ 1 files changed, 16 insertions(+), 12 deletions(-) commit 12897bfabc632b8b76399fd3b9b81d3d58c01c1e Author: Yoann Vandoorselaere Date: Mon Mar 6 10:20:00 2006 +0000 Add configure magic for libgcrypt, since libprelude happen to directly call one gcrypt function to ensure thread safety. Note that this should not be needed due to the GnuTLS hard-wired gcrypt dependencies, but some distribution (Ubuntu/Debian) seem to come with a broken libgnutls-config script missing the gcrypt dependencies. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@8011 09c5ec92-17d4-0310-903a-819935f44dba configure.in | 19 +++++++++- m4/libgcrypt.m4 | 108 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ src/Makefile.am | 2 +- 3 files changed, 126 insertions(+), 3 deletions(-) commit 8783b5191bd0f276e597638a916c3bd047775a07 Author: Yoann Vandoorselaere Date: Sun Mar 5 11:34:50 2006 +0000 Bind prelude-timer API. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@8004 09c5ec92-17d4-0310-903a-819935f44dba bindings/libprelude.i | 1 + 1 files changed, 1 insertions(+), 0 deletions(-) commit 646cd7d1756afb4c9ca9b1a1e4c29d812ba93690 Author: Yoann Vandoorselaere Date: Sun Mar 5 11:34:25 2006 +0000 Remove old declaration. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@8003 09c5ec92-17d4-0310-903a-819935f44dba src/include/prelude-timer.h | 9 --------- 1 files changed, 0 insertions(+), 9 deletions(-) commit e59a445270f381d8bfd971c6e76fd2c263b57b32 Author: Yoann Vandoorselaere Date: Fri Mar 3 14:36:33 2006 +0000 Include flex build fix for *BSD. Update NEWS, documentation, bump version number. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@7997 09c5ec92-17d4-0310-903a-819935f44dba NEWS | 5 +++++ configure.in | 5 +++-- docs/api/libprelude-decl.txt | 2 +- src/Makefile.am | 8 ++++---- src/idmef-criteria-string.lex.l | 20 +++----------------- 5 files changed, 16 insertions(+), 24 deletions(-) commit 42a6c61f4b5831c8d0c05124ac21677408531748 Author: Yoann Vandoorselaere Date: Thu Mar 2 23:55:20 2006 +0000 No need to manuallym ap prelude_bool_t. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@7996 09c5ec92-17d4-0310-903a-819935f44dba bindings/libprelude.i | 2 -- 1 files changed, 0 insertions(+), 2 deletions(-) commit ef8cc46ac92277cee272445decda0c900a6f6e43 Author: Yoann Vandoorselaere Date: Thu Mar 2 11:22:42 2006 +0000 Update gnulib code, documentation, NEWS. Bump version number. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@7991 09c5ec92-17d4-0310-903a-819935f44dba NEWS | 55 ++++++++++++++++++++++++++++ configure.in | 6 ++-- docs/api/libprelude-decl.txt | 29 +++++++++++++-- docs/api/libprelude-sections.txt | 5 +++ docs/api/tmpl/idmef-tree-wrap.sgml | 14 +++++++ docs/api/tmpl/prelude-client.sgml | 21 +++++++++++ docs/api/tmpl/prelude-connection-pool.sgml | 12 ++++++ libmissing/getaddrinfo.c | 9 ++++- libmissing/m4/extensions.m4 | 2 +- libmissing/m4/getaddrinfo.m4 | 16 ++++---- 10 files changed, 152 insertions(+), 17 deletions(-) commit 50d70f5a6e69e141710030981604b5be2662869d Author: Yoann Vandoorselaere Date: Thu Mar 2 02:26:08 2006 +0000 Oops git-svn-id: file:///home/yoann/SVN/trunk/libprelude@7990 09c5ec92-17d4-0310-903a-819935f44dba src/include/prelude-inttypes.h.in | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) commit 8cfd19a09e742d8d1733c28deda1018503a1bdc3 Author: Yoann Vandoorselaere Date: Thu Mar 2 02:05:00 2006 +0000 Declare __PRELUDE_UINT64_SUFFIX to fix INT64_MIN/MAX decl. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@7989 09c5ec92-17d4-0310-903a-819935f44dba src/include/prelude-inttypes.h.in | 13 ++++++++++--- 1 files changed, 10 insertions(+), 3 deletions(-) commit 3d9b8f1d97726af77e07c0b213504a6cb2d6944d Author: Yoann Vandoorselaere Date: Thu Mar 2 02:04:12 2006 +0000 Update. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@7988 09c5ec92-17d4-0310-903a-819935f44dba src/include/idmef-tree-wrap.h | 1 + 1 files changed, 1 insertions(+), 0 deletions(-) commit 45fdef3cd8b6cf884ebf5636dacd714270d1b874 Author: Yoann Vandoorselaere Date: Thu Mar 2 02:03:27 2006 +0000 Include git-svn-id: file:///home/yoann/SVN/trunk/libprelude@7987 09c5ec92-17d4-0310-903a-819935f44dba src/idmef-wrappers-gen/GenerateIDMEFTreeWrapH.pm | 1 + 1 files changed, 1 insertions(+), 0 deletions(-) commit 03e5f37fd3621c8f3b7149d0ecc0b0d011cd402e Author: Yoann Vandoorselaere Date: Thu Mar 2 01:52:28 2006 +0000 Declare typemap for int64_t depending on prelude-inttypes own definition. This avoid having bindings using long long on architecture where 64 bits integer is a long. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@7986 09c5ec92-17d4-0310-903a-819935f44dba bindings/libprelude.i | 27 +++++++++++++++++++++------ 1 files changed, 21 insertions(+), 6 deletions(-) commit bf31c6beb54ebb70c5d3469f06419fb0dcf5263f Author: Yoann Vandoorselaere Date: Wed Mar 1 15:41:38 2006 +0000 Extend idmef-path to handle usage of (*) as a meaning of retrieving all listed element (currently being done using '.'). You can now use: - object(*).value as well as: - object.value git-svn-id: file:///home/yoann/SVN/trunk/libprelude@7984 09c5ec92-17d4-0310-903a-819935f44dba src/idmef-path.c | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) commit e3579255fd10a8ac98e90db18777d2821839c5ae Author: Yoann Vandoorselaere Date: Wed Mar 1 12:52:41 2006 +0000 Revert broken prelude-error bindings change. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@7983 09c5ec92-17d4-0310-903a-819935f44dba bindings/libprelude.i | 1 - src/libprelude-error/prelude-error.h.in | 3 --- 2 files changed, 0 insertions(+), 4 deletions(-) commit ba267f57124b3013a6b1c16a8798681d1f7f746d Author: Yoann Vandoorselaere Date: Wed Mar 1 02:13:57 2006 +0000 Use IDMEF_LIST_PREPEND in place of 0. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@7976 09c5ec92-17d4-0310-903a-819935f44dba src/prelude-client.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) commit dc2e26ffac7e03e828e1c825533b4116ff2f3ba4 Author: Yoann Vandoorselaere Date: Wed Mar 1 01:41:36 2006 +0000 Support for (<<) and (>>) listed object index, meaning to prepend the object, or to append it. This deprecate the usage of (-1) previously used for appending. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@7973 09c5ec92-17d4-0310-903a-819935f44dba src/idmef-path.c | 16 +++++++++++----- 1 files changed, 11 insertions(+), 5 deletions(-) commit d52bee9e340c0035ebc17949fbd5466a5e4a55db Author: Yoann Vandoorselaere Date: Wed Mar 1 01:40:07 2006 +0000 Untabify. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@7972 09c5ec92-17d4-0310-903a-819935f44dba src/idmef-tree-wrap.c | 5328 +++++++++++----------- src/idmef-wrappers-gen/GenerateIDMEFTreeWrapC.pm | 676 ++-- 2 files changed, 3002 insertions(+), 3002 deletions(-) commit e0b01b6f9f5cd7b2347b052e17760434479cc126 Author: Yoann Vandoorselaere Date: Wed Mar 1 01:39:23 2006 +0000 Ability to use negative index on listed object insertion, to specify the index backward. For compatibility purpose, insearting at the head (pos=0) and inserting at the tail (pos=-1) are still supported, but user should update to use IDMEF_LIST_PREPEND and IDMEF_LIST_APPEND. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@7971 09c5ec92-17d4-0310-903a-819935f44dba src/idmef-tree-wrap.c | 747 ++++++++++++++++------ src/idmef-wrappers-gen/GenerateIDMEFTreeWrapC.pm | 63 ++- src/idmef-wrappers-gen/GenerateIDMEFTreeWrapH.pm | 5 + src/include/idmef-tree-wrap.h | 5 + 4 files changed, 594 insertions(+), 226 deletions(-) commit ff121b2d89d07b4eaf39364a774dc6ced357ba88 Author: Yoann Vandoorselaere Date: Wed Mar 1 01:23:37 2006 +0000 Implement workaround for buggy libtool that will fail looking up symbol with preopening enabled in case the libtool archive is missing. Lot of distribution package seem to suffer from this. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@7970 09c5ec92-17d4-0310-903a-819935f44dba src/prelude-plugin.c | 37 ++++++++++++++++++++++++++++++++++--- 1 files changed, 34 insertions(+), 3 deletions(-) commit 3ad959868c5b237e36a0c8eadc9439cc43861c97 Author: Yoann Vandoorselaere Date: Mon Feb 27 14:09:23 2006 +0000 Fix leak on idmef_value_to_string() error. Handle outconn param. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@7945 09c5ec92-17d4-0310-903a-819935f44dba bindings/libprelude_perl.i | 34 +++++++++++++++++++++------------- bindings/libprelude_python.i | 21 +++++++++++++++------ 2 files changed, 36 insertions(+), 19 deletions(-) commit bd4299fcc4ee91a449da3d61c0c9097a2b1ab37c Author: Yoann Vandoorselaere Date: Mon Feb 27 12:03:29 2006 +0000 - Implement prelude_client_new_msgbuf(). - Implement prelude_client_handle_msg_default(), supposed to be called by a Prelude client getting a message we don't know how to handle. - Make the new prelude_connection_pool_recv() function take a prelude_connection_t address to store a pointer to the connection where an event is happening. Using outmsg is now optional. (Was required so that client can handle reading in a non blocking manner). git-svn-id: file:///home/yoann/SVN/trunk/libprelude@7936 09c5ec92-17d4-0310-903a-819935f44dba src/include/prelude-client.h | 4 + src/include/prelude-connection-pool.h | 2 +- src/prelude-client.c | 123 ++++++++++++++++----------------- src/prelude-connection-pool.c | 59 ++++++---------- 4 files changed, 89 insertions(+), 99 deletions(-) commit 3023214c1cae2f2063be09451859a6ede48c69ac Author: Yoann Vandoorselaere Date: Mon Feb 27 11:56:54 2006 +0000 Handle EAGAIN. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@7935 09c5ec92-17d4-0310-903a-819935f44dba src/prelude-msgbuf.c | 6 ++++-- 1 files changed, 4 insertions(+), 2 deletions(-) commit 63df5ba32568763693a7423de4b81d841549fa73 Author: Yoann Vandoorselaere Date: Sun Feb 26 12:04:40 2006 +0000 Remove unused variable. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@7915 09c5ec92-17d4-0310-903a-819935f44dba src/idmef-path.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) commit 99e821496e05bef9a87c55c622490758a1947525 Author: Yoann Vandoorselaere Date: Sun Feb 26 12:03:14 2006 +0000 Originally, -1 as the index of a listed value meant last element in the list. Make this more powerful by allowing other negative index to address the list in reverse. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@7914 09c5ec92-17d4-0310-903a-819935f44dba src/idmef-path.c | 31 ++++++++++++++++++------------- 1 files changed, 18 insertions(+), 13 deletions(-) commit 58ccd811cbb29eaa3879343ee7fbd5982c033d73 Author: Yoann Vandoorselaere Date: Fri Feb 24 00:51:09 2006 +0000 Reset event handler in case the client request IDMEF_READ, since the client is then responsible for reading incoming events. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@7896 09c5ec92-17d4-0310-903a-819935f44dba src/prelude-client.c | 3 +++ 1 files changed, 3 insertions(+), 0 deletions(-) commit 328465707f7c665d0af7a0c4903db2d906708bec Author: Yoann Vandoorselaere Date: Fri Feb 24 00:48:29 2006 +0000 On prelude_connection_pool_recv(), in case reading the message fail, don't return a successful read, but instead, continue looping through our fd set. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@7895 09c5ec92-17d4-0310-903a-819935f44dba src/prelude-connection-pool.c | 5 ++++- 1 files changed, 4 insertions(+), 1 deletions(-) commit 63ff4508d5b0f4ea69d2224b40a8af081c219715 Author: Yoann Vandoorselaere Date: Thu Feb 23 17:24:23 2006 +0000 Initialize ioctl() storage, seem that we get a false positive from valgrind otherwise. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@7891 09c5ec92-17d4-0310-903a-819935f44dba src/prelude-io.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) commit 4d552f962ed1b8d1af2ce99b914670c99fe0f3a0 Author: Yoann Vandoorselaere Date: Thu Feb 23 17:08:26 2006 +0000 Always include configuration file + error line on configuration file error. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@7890 09c5ec92-17d4-0310-903a-819935f44dba src/prelude-option.c | 26 +++++++++++++++----------- 1 files changed, 15 insertions(+), 11 deletions(-) commit 5dcf10643fc9b8f879c31c3e4f02fc876396548c Author: Yoann Vandoorselaere Date: Thu Feb 23 09:46:25 2006 +0000 Section value handling work. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@7889 09c5ec92-17d4-0310-903a-819935f44dba src/config-engine.c | 16 ++++++++-------- src/prelude-option-wide.c | 7 +++++-- 2 files changed, 13 insertions(+), 10 deletions(-) commit a5ad5c6a5cfb4a1441c106a912bf1f1fb80d6e02 Author: Yoann Vandoorselaere Date: Thu Feb 23 08:49:04 2006 +0000 Improve option parsing: option value can now be provided using --option=value. This format is now a requirement for option that use an optional argument. Provide arguments information in the option help. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@7888 09c5ec92-17d4-0310-903a-819935f44dba src/config-engine.c | 11 +-- src/prelude-option.c | 204 ++++++++++++++++++++++++++++++-------------------- 2 files changed, 126 insertions(+), 89 deletions(-) commit 80b840472184216569eb47bd57761d28eac3c1bb Author: Yoann Vandoorselaere Date: Thu Feb 23 08:44:04 2006 +0000 Include prelude-timer.h git-svn-id: file:///home/yoann/SVN/trunk/libprelude@7887 09c5ec92-17d4-0310-903a-819935f44dba src/include/prelude.h.in | 1 + 1 files changed, 1 insertions(+), 0 deletions(-) commit 1c8c78afd90424b86e73b0b8b72e0eb661af5eb8 Author: Yoann Vandoorselaere Date: Thu Feb 23 08:40:20 2006 +0000 cosmetic change. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@7886 09c5ec92-17d4-0310-903a-819935f44dba src/prelude-msgbuf.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) commit 327f98a2282d415fef9ae7baf300db1b780580b3 Author: Yoann Vandoorselaere Date: Wed Feb 22 15:53:13 2006 +0000 Fix prelude_client_destroy() deadlock issue. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@7867 09c5ec92-17d4-0310-903a-819935f44dba src/prelude-client.c | 6 ++---- 1 files changed, 2 insertions(+), 4 deletions(-) commit d15a30f1e52eb4c2e5034ec6faaa830ff4869518 Author: Yoann Vandoorselaere Date: Wed Feb 22 13:21:39 2006 +0000 git-svn-id: file:///home/yoann/SVN/trunk/libprelude@7864 09c5ec92-17d4-0310-903a-819935f44dba src/prelude-connection-pool.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) commit 71b66e558e292ef0d7b35c969745d5c7ee6c5713 Author: Yoann Vandoorselaere Date: Wed Feb 22 13:17:35 2006 +0000 Implement prelude_connection_pool_recv(), based on initial patch from Chet Luther . git-svn-id: file:///home/yoann/SVN/trunk/libprelude@7863 09c5ec92-17d4-0310-903a-819935f44dba src/include/prelude-connection-pool.h | 2 + src/prelude-connection-pool.c | 92 +++++++++++++++++++++++++++++---- 2 files changed, 83 insertions(+), 11 deletions(-) commit c50ea33cd5b9e05d958f67bb9308697f3527cae9 Author: Yoann Vandoorselaere Date: Wed Feb 22 12:40:11 2006 +0000 Error handling improvement. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@7862 09c5ec92-17d4-0310-903a-819935f44dba src/prelude-client.c | 49 +++++++++++++++++++++++++++---------------------- 1 files changed, 27 insertions(+), 22 deletions(-) commit c402fc3567eedd14038915736407a80e0703f9b2 Author: Yoann Vandoorselaere Date: Wed Feb 22 02:52:25 2006 +0000 Correct prelude_msg_t typemap again. No default parameter. Correctly initialize msg. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@7861 09c5ec92-17d4-0310-903a-819935f44dba bindings/libprelude_perl.i | 10 ++-------- bindings/libprelude_python.i | 10 ++-------- 2 files changed, 4 insertions(+), 16 deletions(-) commit 821061612662319d525b5240786878cd3279d460 Author: Yoann Vandoorselaere Date: Wed Feb 22 00:54:24 2006 +0000 Add prelude-error, prelude-connection-pool, idmef-message-read for bindings generation. Disable inline function in prelude-error in case we're reading from SWIG. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@7860 09c5ec92-17d4-0310-903a-819935f44dba bindings/libprelude.i | 3 +++ src/libprelude-error/prelude-error.h.in | 4 +++- 2 files changed, 6 insertions(+), 1 deletions(-) commit d306fb71ba642d71d07c861c317d3851aabf7058 Author: Yoann Vandoorselaere Date: Tue Feb 21 13:55:41 2006 +0000 More typemap fixes. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@7849 09c5ec92-17d4-0310-903a-819935f44dba bindings/libprelude.i | 3 ++- bindings/libprelude_perl.i | 2 +- bindings/libprelude_python.i | 2 +- 3 files changed, 4 insertions(+), 3 deletions(-) commit e97d68690dde928e4d7990fb61d4c4b963da3511 Author: Yoann Vandoorselaere Date: Tue Feb 21 08:29:08 2006 +0000 Definitely fix the problem where prelude-adduser will, on some system, listen to Ipv6 IP address as the default. We now bind every address returned by getaddrinfo(). git-svn-id: file:///home/yoann/SVN/trunk/libprelude@7846 09c5ec92-17d4-0310-903a-819935f44dba prelude-adduser/server.c | 217 ++++++++++++++++++++++------------------------ prelude-adduser/server.h | 2 - 2 files changed, 104 insertions(+), 115 deletions(-) commit caf5c7e731876947bbde62a8c02a8210354c1e37 Author: Yoann Vandoorselaere Date: Mon Feb 20 16:58:00 2006 +0000 Fix NULL pointer dereference introduced in latest prelude-adduser work. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@7845 09c5ec92-17d4-0310-903a-819935f44dba prelude-adduser/prelude-adduser.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) commit 993af3023a8c18c4502008d45cf93ca33bf04af5 Author: Yoann Vandoorselaere Date: Mon Feb 20 13:01:15 2006 +0000 Fix indentation, return bool. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@7844 09c5ec92-17d4-0310-903a-819935f44dba src/prelude-thread.c | 6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-) commit a55544385048d28ada3b9d2b019cba99c87630ae Author: Yoann Vandoorselaere Date: Mon Feb 20 12:59:43 2006 +0000 Documentation update. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@7843 09c5ec92-17d4-0310-903a-819935f44dba docs/api/libprelude-decl.txt | 118 -------------------------------------- docs/api/libprelude-sections.txt | 14 ----- docs/api/tmpl/prelude-msg.sgml | 9 --- 3 files changed, 0 insertions(+), 141 deletions(-) commit 1a8ac85596a3d9bdc18fcec9e8cab94a52c805bc Author: Yoann Vandoorselaere Date: Mon Feb 20 12:58:01 2006 +0000 More warning fixes. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@7842 09c5ec92-17d4-0310-903a-819935f44dba src/idmef-criteria-string.lex.l | 15 +++++++++++---- src/idmef-criteria-string.yac.y | 2 -- 2 files changed, 11 insertions(+), 6 deletions(-) commit 82f0c106f40ced3c098d8256542d34bcf7c09f5b Author: Yoann Vandoorselaere Date: Mon Feb 20 12:57:35 2006 +0000 Force inclusion of libmissing.h by using -include compile time option for lex/yacc generated file, since there is no way to force an header to be included at the top of the these file, by overriding their target. Fix documentation generation warnings. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@7841 09c5ec92-17d4-0310-903a-819935f44dba docs/api/Makefile.am | 4 ++-- src/Makefile.am | 17 +++++++++++++++++ 2 files changed, 19 insertions(+), 2 deletions(-) commit 538c8c30035075dacb7bd275d7ce6b0169fea1d2 Author: Yoann Vandoorselaere Date: Mon Feb 20 12:22:26 2006 +0000 Fix compile warning on some architecture. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@7840 09c5ec92-17d4-0310-903a-819935f44dba src/common.c | 14 +++++++++++--- 1 files changed, 11 insertions(+), 3 deletions(-) commit b248443bb22794cbc46f13fedc9949c0eb00dade Author: Yoann Vandoorselaere Date: Mon Feb 20 02:59:04 2006 +0000 Update gnulib code. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@7839 09c5ec92-17d4-0310-903a-819935f44dba libmissing/m4/getaddrinfo.m4 | 13 ++++++++----- libmissing/m4/socklen.m4 | 30 +++++++++++++++--------------- libmissing/m4/sys_socket_h.m4 | 8 ++++++-- 3 files changed, 29 insertions(+), 22 deletions(-) commit 312e695a11516d3f12408743c24b626037fe8b65 Author: Yoann Vandoorselaere Date: Mon Feb 20 00:36:20 2006 +0000 Fix crash in case of successive call to prelude_init(), prelude_deinit(), then prelude_init() again. Always reinitialize prelude-options. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@7837 09c5ec92-17d4-0310-903a-819935f44dba src/prelude-client.c | 3 --- src/prelude-option.c | 22 +++++++++++----------- 2 files changed, 11 insertions(+), 14 deletions(-) commit 63ba6f82dd2f5b6a0a1d0ad73d19e49fc0812272 Author: Yoann Vandoorselaere Date: Mon Feb 20 00:32:25 2006 +0000 Avoid using pthread_once_t since we can't re-initialize it in a portable way (fix solaris compilation problem). Create the key upon initialization. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@7836 09c5ec92-17d4-0310-903a-819935f44dba src/include/prelude-thread.h | 2 +- src/prelude-thread.c | 29 +++++++++++++++-------------- src/prelude.c | 2 +- 3 files changed, 17 insertions(+), 16 deletions(-) commit f1235e6dd1161e33141a089d48a1bd75d3617b3e Author: Yoann Vandoorselaere Date: Sun Feb 19 22:14:12 2006 +0000 Introduce --passwd and --passwd-file option for register and registration-server mode. Allow to specify one shot password on the command line, from a file, or from stdin. In case the site administrator deny the request, send a TLS alert to the requesting peer so that the user requesting registration get a "canceled" error. Improve error reporting. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@7833 09c5ec92-17d4-0310-903a-819935f44dba prelude-adduser/prelude-adduser.c | 284 +++++++++++++++++++++++++++---------- prelude-adduser/server.c | 97 +------------ prelude-adduser/server.h | 4 +- prelude-adduser/tls-register.c | 8 +- 4 files changed, 220 insertions(+), 173 deletions(-) commit 88cab767b2f007ecaa8312dffc497c3aaf0652b3 Author: Yoann Vandoorselaere Date: Sun Feb 19 17:03:51 2006 +0000 Show detailed error. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@7832 09c5ec92-17d4-0310-903a-819935f44dba prelude-adduser/tls-register.c | 18 +++++++++--------- 1 files changed, 9 insertions(+), 9 deletions(-) commit c1f02fd5e1ef583b494fcfca70a13ead7aa1daa3 Author: Yoann Vandoorselaere Date: Sun Feb 19 12:56:46 2006 +0000 If appropriate, send an alert in handle_gnutls_error(), so that the peer get the reason why the communication failed (handshake error for example). Use handle_gnutls_error() for gnutls_bye() error handling. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@7830 09c5ec92-17d4-0310-903a-819935f44dba src/tls-auth.c | 10 +++++++--- 1 files changed, 7 insertions(+), 3 deletions(-) commit 06e1dea406e25f9cb561de9bd55d78af8bcea58c Author: Yoann Vandoorselaere Date: Sun Feb 19 11:58:47 2006 +0000 Propagate prelude_io_read() error instead of defining our own. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@7829 09c5ec92-17d4-0310-903a-819935f44dba src/prelude-io.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) commit 2ddefb419704920d2e66bde7c1b66ea3e67dee53 Author: Yoann Vandoorselaere Date: Sat Feb 18 12:59:37 2006 +0000 Remove deprecated language keyword. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@7828 09c5ec92-17d4-0310-903a-819935f44dba bindings/libprelude_perl.i | 2 +- bindings/libprelude_python.i | 13 +++++++------ 2 files changed, 8 insertions(+), 7 deletions(-) commit a661fcad8b13b00bd7fae1ca5f3e27cb9069fe01 Author: Yoann Vandoorselaere Date: Fri Feb 17 14:55:24 2006 +0000 Make perl bindings more robust. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@7826 09c5ec92-17d4-0310-903a-819935f44dba bindings/libprelude_perl.i | 42 +++++++++++++++++++++++++++++++++--------- 1 files changed, 33 insertions(+), 9 deletions(-) commit d920a649bff4b80dfd4036b562876ebc88e51224 Author: Yoann Vandoorselaere Date: Thu Feb 16 23:27:08 2006 +0000 Fix idmef_path_get() typemap. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@7825 09c5ec92-17d4-0310-903a-819935f44dba bindings/libprelude_perl.i | 5 ++++- 1 files changed, 4 insertions(+), 1 deletions(-) commit 56db4f78586541ea888db2919ce871f2561e53a4 Author: Yoann Vandoorselaere Date: Thu Feb 16 16:29:20 2006 +0000 Fix parsing of string based broken down time. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@7824 09c5ec92-17d4-0310-903a-819935f44dba src/idmef-criterion-value.c | 19 +++++++++++-------- 1 files changed, 11 insertions(+), 8 deletions(-) commit 474c0024435db2f1b91055cb046485d439f96eb7 Author: Yoann Vandoorselaere Date: Wed Feb 15 09:33:10 2006 +0000 Only print 'Failover enabled:' header when the client did not disable failover. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@7812 09c5ec92-17d4-0310-903a-819935f44dba src/prelude-connection-pool.c | 6 ++++-- 1 files changed, 4 insertions(+), 2 deletions(-) commit 085e2ad317c4115a839b140bc2129ec843920746 Author: Yoann Vandoorselaere Date: Tue Feb 14 15:57:19 2006 +0000 Handle configuration file containing \r. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@7806 09c5ec92-17d4-0310-903a-819935f44dba src/config-engine.c | 14 +++++++------- 1 files changed, 7 insertions(+), 7 deletions(-) commit c5b2454b5f550eb7bf7d87405f2e48432155e3f5 Author: Yoann Vandoorselaere Date: Mon Feb 13 21:02:26 2006 +0000 Remove obsolete declaration. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@7797 09c5ec92-17d4-0310-903a-819935f44dba src/include/prelude-msg.h | 4 ---- 1 files changed, 0 insertions(+), 4 deletions(-) commit 8f2049d047b1aed95312a0c41c0bb2340e197e7c Author: Yoann Vandoorselaere Date: Mon Feb 13 15:35:31 2006 +0000 Return EOF once reading is finished. Return 0 otherwise, as advertised in the API doc. Thanks to Chet Luther for pointing out this. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@7796 09c5ec92-17d4-0310-903a-819935f44dba src/common.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) commit 041021690680f96b58f956a962b2d99b2e5f4fd1 Author: Yoann Vandoorselaere Date: Sat Feb 11 08:22:59 2006 +0000 Make prelude_read_multiline2 return 0 on success, as advertised in the function documentation. Thanks to Chet Luther for pointing this out. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@7780 09c5ec92-17d4-0310-903a-819935f44dba src/common.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) commit d544a26b70ee865feb0414ae189eb6812cff9595 Author: Yoann Vandoorselaere Date: Tue Feb 7 14:53:24 2006 +0000 Fix pthread_key usage bug. The key should not be destroyed from the key destruction callback, only the value should. Destroy the key from _prelude_thread_exit(), and reset thread_error_key_once so that the key is re-initialized if needed. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@7762 09c5ec92-17d4-0310-903a-819935f44dba src/prelude-thread.c | 24 ++++++++++++------------ 1 files changed, 12 insertions(+), 12 deletions(-) commit 3fc09b72824e3a1b9f23b39329e7c73794bc4d02 Author: Yoann Vandoorselaere Date: Mon Feb 6 17:58:17 2006 +0000 Update documentation, NEWS, bump version number. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@7749 09c5ec92-17d4-0310-903a-819935f44dba NEWS | 14 + configure.in | 6 +- docs/api/libprelude-decl.txt | 489 +------------------------------------ docs/api/libprelude-sections.txt | 6 + docs/api/tmpl/prelude-client.sgml | 9 + docs/api/tmpl/prelude-io.sgml | 10 + libmissing/m4/extensions.m4 | 13 +- 7 files changed, 64 insertions(+), 483 deletions(-) commit 43f77f5013a9191338d474935f01d4866a0de1ce Author: Yoann Vandoorselaere Date: Mon Feb 6 16:12:58 2006 +0000 Fix typo. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@7732 09c5ec92-17d4-0310-903a-819935f44dba src/prelude-client.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) commit a172e6a2f3efc595025ecf314b6845c5cd53e95d Author: Yoann Vandoorselaere Date: Mon Feb 6 16:07:23 2006 +0000 Avoid dup error. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@7731 09c5ec92-17d4-0310-903a-819935f44dba src/prelude-client.c | 8 +++++--- 1 files changed, 5 insertions(+), 3 deletions(-) commit 8373a575948b283ee50786de03e4816f982bc07a Author: Yoann Vandoorselaere Date: Mon Feb 6 15:27:52 2006 +0000 Fix error source check. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@7727 09c5ec92-17d4-0310-903a-819935f44dba src/prelude-client.c | 5 ++++- 1 files changed, 4 insertions(+), 1 deletions(-) commit 1cf89e747a835bdad83b1bf55524706806e5e87c Author: Yoann Vandoorselaere Date: Mon Feb 6 15:15:18 2006 +0000 Remove deprecated internal error code. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@7726 09c5ec92-17d4-0310-903a-819935f44dba src/libprelude-error/err-codes.h.in | 11 +---------- 1 files changed, 1 insertions(+), 10 deletions(-) commit 513a9143237c402662fc554be929573a387fa827 Author: Yoann Vandoorselaere Date: Mon Feb 6 15:14:52 2006 +0000 Mark prelude_client_is_setup_needed(), prelude_client_print_setup_error(), prelude_client_get_setup_error() as deprecated. Error reporting is now handled through the standard verbose error code. Simplified profile errors. In order to avoid duplicate error output for application currently using prelude_client_is_setup_needed() in combination with prelude_client_print_setup_error(), make sure prelude_client_is_setup_needed() always return FALSE. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@7725 09c5ec92-17d4-0310-903a-819935f44dba src/include/prelude-client.h | 12 +++++-- src/prelude-client.c | 68 ++++++++++++++++++++--------------------- 2 files changed, 41 insertions(+), 39 deletions(-) commit 1910c0e1400815b130ef8b5597880b4e6f96dfea Author: Yoann Vandoorselaere Date: Mon Feb 6 15:08:30 2006 +0000 Fix config_open() error handling. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@7724 09c5ec92-17d4-0310-903a-819935f44dba src/prelude-option.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) commit 77e221d12baf68b63b283b4df3032da708aa33eb Author: Yoann Vandoorselaere Date: Mon Feb 6 15:07:22 2006 +0000 Verbose error reporting. Use PRELUDE_ERROR_PROFILE error code. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@7723 09c5ec92-17d4-0310-903a-819935f44dba src/prelude-client-profile.c | 6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-) commit be3ec59be8fdb6b9cbea88e4e6b40992bea70189 Author: Yoann Vandoorselaere Date: Mon Feb 6 15:06:21 2006 +0000 Verbose error reporting. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@7722 09c5ec92-17d4-0310-903a-819935f44dba src/prelude-failover.c | 45 ++++++++++++++++++++++----------------------- 1 files changed, 22 insertions(+), 23 deletions(-) commit 6f13bf4c8cb15bec7f92ae69b2e033eeb86df2ac Author: Yoann Vandoorselaere Date: Mon Feb 6 15:05:06 2006 +0000 Handle profile error properly, now only through the PRELUDE_ERROR_PROFILE error code. Log a warning in case of failover failure. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@7721 09c5ec92-17d4-0310-903a-819935f44dba src/prelude-connection-pool.c | 25 ++++++++++++++++++------- 1 files changed, 18 insertions(+), 7 deletions(-) commit 20504ad27e614b8ef23c9b223975ab29b8e0eb8f Author: Yoann Vandoorselaere Date: Mon Feb 6 15:04:03 2006 +0000 More verbose error reporting. TLS error code cleanup. Make sure we return PRELUDE_ERROR_PROFILE for profile specific error, so that it can be handled by the upper layer. Fix call to prelude_io_is_error_fatal(). git-svn-id: file:///home/yoann/SVN/trunk/libprelude@7720 09c5ec92-17d4-0310-903a-819935f44dba src/prelude-connection.c | 14 +++++++------- 1 files changed, 7 insertions(+), 7 deletions(-) commit dc3a54d00ae49752b6f114e21b4aa0ed2d71ec9a Author: Yoann Vandoorselaere Date: Mon Feb 6 15:03:09 2006 +0000 More verbose error reporting. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@7719 09c5ec92-17d4-0310-903a-819935f44dba src/prelude-msg.c | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) commit c2db73f04814160f0ed54a52dc7a074a8507f366 Author: Yoann Vandoorselaere Date: Mon Feb 6 15:02:46 2006 +0000 Verbose error reporting. TLS error code cleanup. Make sure we return PRELUDE_ERROR_PROFILE for profile specific error, so that it can be handled by the upper layer. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@7718 09c5ec92-17d4-0310-903a-819935f44dba src/tls-auth.c | 17 ++++++++--------- 1 files changed, 8 insertions(+), 9 deletions(-) commit c4cb3606b5e2bab96686cbabcaf8d333a463c519 Author: Yoann Vandoorselaere Date: Mon Feb 6 15:01:42 2006 +0000 Verbose error reporting. TLS error code cleanup. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@7717 09c5ec92-17d4-0310-903a-819935f44dba src/tls-util.c | 41 ++++++++++++++++++++--------------------- 1 files changed, 20 insertions(+), 21 deletions(-) commit ee48efc64abac1604689dfcfdf56523b3641f493 Author: Yoann Vandoorselaere Date: Mon Feb 6 15:00:19 2006 +0000 More error handling work. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@7716 09c5ec92-17d4-0310-903a-819935f44dba src/prelude-io.c | 48 ++++++++++++++++++++++++++++-------------------- 1 files changed, 28 insertions(+), 20 deletions(-) commit 07baa73b18bd83d14e00ca9b019f43300009c722 Author: Yoann Vandoorselaere Date: Mon Feb 6 02:21:28 2006 +0000 Make distinction between real EOF, and gnutls EOF on read. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@7708 09c5ec92-17d4-0310-903a-819935f44dba src/prelude-io.c | 8 ++------ 1 files changed, 2 insertions(+), 6 deletions(-) commit 7947cb465bfd86de816fa345e86afca43164ecee Author: Yoann Vandoorselaere Date: Mon Feb 6 02:14:52 2006 +0000 Library failure if we are at init time and get PRELUDE_ERROR_INSUFFICIENT_CREDENTIALS. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@7707 09c5ec92-17d4-0310-903a-819935f44dba src/prelude-connection-pool.c | 7 +++++-- 1 files changed, 5 insertions(+), 2 deletions(-) commit b973931ded9355d630742d646e2ab4ddb92b62c9 Author: Yoann Vandoorselaere Date: Mon Feb 6 01:21:02 2006 +0000 Use newer verbose error reporting capability. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@7706 09c5ec92-17d4-0310-903a-819935f44dba src/prelude-option.c | 86 +++++++++++++++++++++++++------------------------ 1 files changed, 44 insertions(+), 42 deletions(-) commit 1add16e21fc741b7a1c8f6294d01bd4fdd8ff54b Author: Yoann Vandoorselaere Date: Mon Feb 6 01:18:30 2006 +0000 Return PRELUDE_BOOL_TRUE / PRELUDE_BOOL_FALSE in place of TRUE / FALSE. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@7705 09c5ec92-17d4-0310-903a-819935f44dba src/libprelude-error/prelude-error.h.in | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) commit f2bfbaf21d58fe3c3e21c2196ce3bb5cff49e801 Author: Yoann Vandoorselaere Date: Mon Feb 6 01:15:38 2006 +0000 Rename _prelude_error_verbose_common() to prelude_error_verbose_make_v(). Fix invalid conversion from int to prelude_bool_t (#130). git-svn-id: file:///home/yoann/SVN/trunk/libprelude@7704 09c5ec92-17d4-0310-903a-819935f44dba src/libprelude-error/prelude-error.h.in | 10 +++++----- 1 files changed, 5 insertions(+), 5 deletions(-) commit 44bc6b420aa503a6a006f390caf7a16a841e8f48 Author: Yoann Vandoorselaere Date: Wed Feb 1 14:34:07 2006 +0000 Fix OpenBSD build error due to ENOTSUP not being defined. Thanks to Raúl Collantes for pointing this out. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@7668 09c5ec92-17d4-0310-903a-819935f44dba src/prelude-io.c | 4 ++++ 1 files changed, 4 insertions(+), 0 deletions(-) commit 8628fe29ffaaf8e45c44c132d150c1ec1e91cd0d Author: Yoann Vandoorselaere Date: Mon Jan 30 13:35:10 2006 +0000 Ooops s/2005/2006. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@7655 09c5ec92-17d4-0310-903a-819935f44dba NEWS | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) commit f054f2e1e0ca49b99f55528c013449354825ee43 Author: Yoann Vandoorselaere Date: Mon Jan 30 13:18:20 2006 +0000 Update NEWS, documentation. Bump version number. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@7652 09c5ec92-17d4-0310-903a-819935f44dba NEWS | 12 ++++++++++++ configure.in | 8 ++++---- docs/api/libprelude-decl.txt | 22 +++++++++++++++++++++- docs/api/libprelude-docs.sgml | 1 - 4 files changed, 37 insertions(+), 6 deletions(-) commit eca0a76e89141750440cb6ff271806baaa9af026 Author: Yoann Vandoorselaere Date: Mon Jan 30 13:12:11 2006 +0000 Update gnulib code. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@7651 09c5ec92-17d4-0310-903a-819935f44dba libmissing/gai_strerror.c | 6 +++- libmissing/getaddrinfo.h | 16 +++++++++++-- libmissing/m4/getaddrinfo.m4 | 46 +++++++++++++++++++++++++++++++++++++---- libmissing/m4/stdbool.m4 | 11 +++++++-- libmissing/socket_.h | 16 ++++++++++++++ libmissing/stdbool_.h | 36 +++++++++++++++++++------------- 6 files changed, 103 insertions(+), 28 deletions(-) commit 4cb141655fee14c6fe0018c59acadfc54d50d803 Author: Yoann Vandoorselaere Date: Mon Jan 30 12:50:31 2006 +0000 Introduce prelude_client_get_setup_error(). git-svn-id: file:///home/yoann/SVN/trunk/libprelude@7650 09c5ec92-17d4-0310-903a-819935f44dba src/include/prelude-client.h | 2 + src/prelude-client.c | 90 ++++++++++++++++++++++++++--------------- 2 files changed, 59 insertions(+), 33 deletions(-) commit 8277880612636cce7aad2ab417869d947f524a99 Author: Yoann Vandoorselaere Date: Mon Jan 30 11:36:55 2006 +0000 Keep using ECONNRESET in case of GNUTLS_E_UNEXPECTED_PACKET_LENGTH git-svn-id: file:///home/yoann/SVN/trunk/libprelude@7649 09c5ec92-17d4-0310-903a-819935f44dba src/prelude-io.c | 10 +++++++--- 1 files changed, 7 insertions(+), 3 deletions(-) commit 88c1f8dde14a7bfbd6fca87bcb8fa8698646218e Author: Yoann Vandoorselaere Date: Mon Jan 30 11:33:49 2006 +0000 Verbose error reporting. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@7648 09c5ec92-17d4-0310-903a-819935f44dba src/config-engine.c | 6 ++++-- 1 files changed, 4 insertions(+), 2 deletions(-) commit e28307f6bd42d16ca4abbf2b148f04267dce6961 Author: Yoann Vandoorselaere Date: Sun Jan 29 19:09:12 2006 +0000 Variable mixup. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@7647 09c5ec92-17d4-0310-903a-819935f44dba src/prelude-io.c | 7 ++++--- 1 files changed, 4 insertions(+), 3 deletions(-) commit c67a9287b3b6a0087595360406677890b2a020d0 Author: Yoann Vandoorselaere Date: Sun Jan 29 13:05:22 2006 +0000 Fix distcheck. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@7646 09c5ec92-17d4-0310-903a-819935f44dba src/libprelude-error/Makefile.am | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) commit 4927f482b7b0440f4708a61daa8f87aa797e4313 Author: Yoann Vandoorselaere Date: Sat Jan 28 14:53:58 2006 +0000 More prelude-io error handling work. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@7642 09c5ec92-17d4-0310-903a-819935f44dba src/prelude-connection.c | 29 +++++++++++++++++------------ 1 files changed, 17 insertions(+), 12 deletions(-) commit 94fab024a328f1e369132da3efccafa4c73ebdbd Author: Yoann Vandoorselaere Date: Sat Jan 28 14:52:17 2006 +0000 Implement prelude_io_is_error_fatal(). More error handling work. Return verbose error. Make sure the caller get TLS alert. Deinitialize TLS on fatal error. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@7641 09c5ec92-17d4-0310-903a-819935f44dba src/include/prelude-io.h | 1 + src/libprelude-error/err-codes.h.in | 5 +- src/prelude-io.c | 140 ++++++++++++++++++++++------------ 3 files changed, 95 insertions(+), 51 deletions(-) commit cd67990b087c06604b7672438008ccd4f23a08f0 Author: Yoann Vandoorselaere Date: Sat Jan 28 01:44:03 2006 +0000 Formatting trick. Only print the setup message in case we're not going to return the error to the upper layer. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@7640 09c5ec92-17d4-0310-903a-819935f44dba src/prelude-connection-pool.c | 7 ++++--- 1 files changed, 4 insertions(+), 3 deletions(-) commit 01af637f4e39a93788031066a8f3318a1c849472 Author: Yoann Vandoorselaere Date: Sat Jan 28 01:33:50 2006 +0000 Use gnutls_certificate_verify_peers2() instead of deprecated gnutls_certificate_verify_peers(). More certificate validation. Send a fatal TLS alert to the peer on failure in order to notify it of the failure reason. Verbose error reporting. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@7639 09c5ec92-17d4-0310-903a-819935f44dba src/tls-auth.c | 78 +++++++++++++++++++++++++++++++++++++------------------ 1 files changed, 52 insertions(+), 26 deletions(-) commit 52f1b0055b8c33172e72c2cd8e30d6e76b8f447b Author: Yoann Vandoorselaere Date: Sat Jan 28 00:24:05 2006 +0000 Error beautification. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@7638 09c5ec92-17d4-0310-903a-819935f44dba src/prelude-option.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) commit 99fc5e8263c96721b38348a2505220c90a5ca5ee Author: Yoann Vandoorselaere Date: Sat Jan 28 00:22:56 2006 +0000 Verbose error reporting. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@7637 09c5ec92-17d4-0310-903a-819935f44dba src/idmef-path.c | 9 ++++++--- 1 files changed, 6 insertions(+), 3 deletions(-) commit 1f4f4d07b678d9e067a3c15d8f8b347bd7b41bc0 Author: Yoann Vandoorselaere Date: Fri Jan 27 01:58:31 2006 +0000 Free error ressource on prelude_deinit(). git-svn-id: file:///home/yoann/SVN/trunk/libprelude@7633 09c5ec92-17d4-0310-903a-819935f44dba src/include/prelude-thread.h | 2 ++ src/prelude-thread.c | 12 ++++++++++++ src/prelude.c | 2 ++ 3 files changed, 16 insertions(+), 0 deletions(-) commit 6d96d372d7b588d61daaf84bb8dfb00b0b2d56d2 Author: Yoann Vandoorselaere Date: Wed Jan 25 15:16:00 2006 +0000 Use prelude_error_verbose(). git-svn-id: file:///home/yoann/SVN/trunk/libprelude@7632 09c5ec92-17d4-0310-903a-819935f44dba src/prelude-msg.c | 7 +++---- 1 files changed, 3 insertions(+), 4 deletions(-) commit a7e8a1bf7fa2774d112b0b3a78d9e7b3257f2b53 Author: Yoann Vandoorselaere Date: Wed Jan 25 14:02:42 2006 +0000 Error reporting is propagated, and reported by prelude-connection-pool. Much improved error message. Avoid un-necessary noise. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@7631 09c5ec92-17d4-0310-903a-819935f44dba src/prelude-connection-pool.c | 11 +++++---- src/prelude-connection.c | 42 +++++++++++++++++++++++----------------- src/tls-auth.c | 41 ++++++++++++++------------------------- 3 files changed, 45 insertions(+), 49 deletions(-) commit cc8653c218dd58d9ab0c855c090e33d3c14bf7e6 Author: Yoann Vandoorselaere Date: Wed Jan 25 12:00:55 2006 +0000 Install prelude-thread.h, no required by prelude-error.h git-svn-id: file:///home/yoann/SVN/trunk/libprelude@7628 09c5ec92-17d4-0310-903a-819935f44dba src/include/Makefile.am | 5 +++-- 1 files changed, 3 insertions(+), 2 deletions(-) commit 190907250ca3ecf3af66023174ee5fff3af790b5 Author: Yoann Vandoorselaere Date: Wed Jan 25 11:52:41 2006 +0000 Update gnulib code. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@7627 09c5ec92-17d4-0310-903a-819935f44dba libmissing/Makefile.am | 19 ++++++++++++++++ libmissing/inet_ntop.h | 6 +--- libmissing/m4/gnulib-comp.m4 | 6 ++++- libmissing/m4/socklen.m4 | 22 +++++++++++++----- libmissing/m4/stdbool.m4 | 24 +++++++++++++++++++- libmissing/m4/sys_socket_h.m4 | 19 ++++++++++++++++ libmissing/regex_internal.h | 6 ++++- libmissing/socket_.h | 48 +++++++++++++++++++++++++++++++++++++++++ libmissing/stdbool_.h | 24 +++++++++++++++++--- libmissing/strndup.c | 23 +++++++++++++++---- libmissing/strnlen.c | 27 +++++------------------ libmissing/vasnprintf.c | 46 ++++++++++++++++++++------------------ 12 files changed, 205 insertions(+), 65 deletions(-) commit bff77d341a249fb40a653e1177d1a5a9181da352 Author: Yoann Vandoorselaere Date: Wed Jan 25 11:03:11 2006 +0000 Verbose error reporting. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@7626 09c5ec92-17d4-0310-903a-819935f44dba src/prelude-connection.c | 39 +++++++++++++++++++-------------------- 1 files changed, 19 insertions(+), 20 deletions(-) commit a6ab7222194c344cf9ceaff26e6cff7182d65fa7 Author: Yoann Vandoorselaere Date: Wed Jan 25 11:01:43 2006 +0000 Take care of verbose error, even when code is PRELUDE_ERROR_SYSTEM_ERROR. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@7625 09c5ec92-17d4-0310-903a-819935f44dba src/libprelude-error/strerror.c | 6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-) commit 03ec5c8c969648c3a2d8e4320eb2a4237701e08c Author: Yoann Vandoorselaere Date: Wed Jan 25 10:54:43 2006 +0000 Better error formatting. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@7624 09c5ec92-17d4-0310-903a-819935f44dba src/prelude-option.c | 9 ++++++--- 1 files changed, 6 insertions(+), 3 deletions(-) commit 34027424af867f1fe05026873bf8c0807eabd830 Author: Yoann Vandoorselaere Date: Wed Jan 25 10:49:46 2006 +0000 Don't waste usefull screen space when there is no source defined. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@7623 09c5ec92-17d4-0310-903a-819935f44dba src/libprelude-error/perror.c | 9 ++++++--- 1 files changed, 6 insertions(+), 3 deletions(-) commit b1333fcbb790f9207f658e603533be4dc308ab74 Author: Yoann Vandoorselaere Date: Wed Jan 25 10:12:22 2006 +0000 Remove old warning, that is now reported through prelude_error_verbose(). git-svn-id: file:///home/yoann/SVN/trunk/libprelude@7622 09c5ec92-17d4-0310-903a-819935f44dba src/prelude-io.c | 2 -- 1 files changed, 0 insertions(+), 2 deletions(-) commit aa04f29d3f3c99c7bcac79a702ea7000560a75f3 Author: Yoann Vandoorselaere Date: Wed Jan 25 00:12:51 2006 +0000 Improve error reporting. Really thread GNUTLS_E_UNEXPECTED_PACKET_LENGTH as EOF. Use GNUTLS_SHUT_WR instead of GNUTLS_SHUT_RDWR since we don't need peer confirmation. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@7621 09c5ec92-17d4-0310-903a-819935f44dba src/prelude-io.c | 19 +++++++------------ 1 files changed, 7 insertions(+), 12 deletions(-) commit 30862d5958a44578d97feda6f94c89ae27f8c488 Author: Yoann Vandoorselaere Date: Tue Jan 24 19:49:29 2006 +0000 Verbose REGEXP compilation error reporting. Early criterion operator check. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@7620 09c5ec92-17d4-0310-903a-819935f44dba src/idmef-criterion-value.c | 33 +++++++++++++++++++++++---------- 1 files changed, 23 insertions(+), 10 deletions(-) commit d752e264758ad8495e0d1e832de7bdf81e99c586 Author: Yoann Vandoorselaere Date: Tue Jan 24 19:37:20 2006 +0000 Verbose operator mismatch error reporting. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@7619 09c5ec92-17d4-0310-903a-819935f44dba src/idmef-value-type.c | 52 +++++++++++++++++++++++++++++------------------ 1 files changed, 32 insertions(+), 20 deletions(-) commit a23305c5ea7893788db761e6674292ae512942b8 Author: Yoann Vandoorselaere Date: Tue Jan 24 12:37:06 2006 +0000 Report verbose parser error. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@7618 09c5ec92-17d4-0310-903a-819935f44dba src/idmef-criteria-string.yac.y | 4 +++- 1 files changed, 3 insertions(+), 1 deletions(-) commit 2ba8895c80a9bf8d1f90126d59bf96cef479334c Author: Yoann Vandoorselaere Date: Tue Jan 24 11:43:58 2006 +0000 Verbose error messages. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@7617 09c5ec92-17d4-0310-903a-819935f44dba src/prelude-string.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) commit 90108f17ee9179f4f19a265b9ace15b774bc1834 Author: Yoann Vandoorselaere Date: Tue Jan 24 11:35:40 2006 +0000 Verbose error message. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@7616 09c5ec92-17d4-0310-903a-819935f44dba src/idmef-value-type.c | 24 +++++++++++++++--------- 1 files changed, 15 insertions(+), 9 deletions(-) commit 0655c7081c8d8b144b63acc0a0a6e109cf7a8a37 Author: Yoann Vandoorselaere Date: Tue Jan 24 11:05:34 2006 +0000 Improve error message. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@7615 09c5ec92-17d4-0310-903a-819935f44dba src/prelude-option.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) commit ae0d4b3d7d59d9ed89789d8c3c90da8a839688ec Author: Yoann Vandoorselaere Date: Tue Jan 24 11:05:09 2006 +0000 Use prelude_error_verbose() to point out the errornous element name. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@7614 09c5ec92-17d4-0310-903a-819935f44dba src/idmef-class.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) commit fb6722df8a16d0e2f11f58148133c39930000e4e Author: Yoann Vandoorselaere Date: Tue Jan 24 11:01:50 2006 +0000 Introduce prelude_error_verbose() and prelude_error_verbose_make() allowing to set verbose error message containing more details. Add prelude_error_is_verbose() to check whether a detailed explaination for the error is available. We use one of the error code reserved bit to define whether the error is verbose or not. prelude_strerror() is modified to return the verbose error, if available. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@7613 09c5ec92-17d4-0310-903a-819935f44dba src/libprelude-error/prelude-error.h.in | 76 ++++++++++++++++++++++++++++++- src/libprelude-error/strerror.c | 5 ++- 2 files changed, 79 insertions(+), 2 deletions(-) commit 8085c8c849acfa3da108aed18e6d835b1f9d08e0 Author: Yoann Vandoorselaere Date: Mon Jan 23 15:47:53 2006 +0000 Implement _prelude_thread_set_error() and _prelude_thread_get_error(). These might be used internally to set per thread detailed error message. prelude_strerror() will gather the detailed message if available. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@7612 09c5ec92-17d4-0310-903a-819935f44dba src/include/prelude-thread.h | 3 ++ src/prelude-thread.c | 60 ++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 63 insertions(+), 0 deletions(-) commit b7cb7a02d518e7c675f6ade2127623cdb13c9270 Author: Yoann Vandoorselaere Date: Mon Jan 16 09:49:37 2006 +0000 Implement prelude_read_multiline2(), using a variable length prelude_string_t object as the output buffer. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@7602 09c5ec92-17d4-0310-903a-819935f44dba src/common.c | 36 ++++++++++++++++++++++++++++++++++++ src/include/common.h | 2 ++ 2 files changed, 38 insertions(+), 0 deletions(-) commit 00415d17cb534eccc99010f2d8af5e11782fa6ee Author: Yoann Vandoorselaere Date: Mon Jan 9 11:45:29 2006 +0000 Version bump. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@7581 09c5ec92-17d4-0310-903a-819935f44dba NEWS | 18 ++- configure.in | 4 +- docs/api/libprelude-decl.txt | 455 +++++++++++++++++++++++++++++++++++++++++- 3 files changed, 473 insertions(+), 4 deletions(-) commit cdd0acca2c4cd1e2fc23e93dd8d23bf7b9b1c17d Author: Yoann Vandoorselaere Date: Sun Jan 8 18:04:23 2006 +0000 Fix libgnutls-extra SRP check. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@7578 09c5ec92-17d4-0310-903a-819935f44dba configure.in | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) commit 6ee0da5532abf858f0c0651f7ff36e5ad94db018 Author: Yoann Vandoorselaere Date: Sun Jan 8 13:45:23 2006 +0000 Make prelude-adduser use GnuTLS anonymous authentication in case SRP is not available. This is less secure than SRP since it is vulnerable to a man in the middle attack (although mitigated by the use of the one-shot password), but is becoming a requirement since some distribution disable SRP support because of patent issue. We keep using SRP by default if both prelude-adduser instance has it. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@7576 09c5ec92-17d4-0310-903a-819935f44dba configure.in | 24 ++------ prelude-adduser/prelude-adduser.c | 62 +++++++++++++++++++-- prelude-adduser/server.c | 107 ++++++++++++++++++++++++++++++------ 3 files changed, 151 insertions(+), 42 deletions(-) commit 1c271411aebb5a961cfbe24b0fbb9e7a9f1109d0 Author: Yoann Vandoorselaere Date: Sun Jan 8 12:42:34 2006 +0000 Fix a crash if _prelude_generic_optlist is NULL. Happen when specifying, for example, prelude-adduser option. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@7575 09c5ec92-17d4-0310-903a-819935f44dba src/prelude-option.c | 3 +++ 1 files changed, 3 insertions(+), 0 deletions(-) commit 6614bd1b4b89e1b482f1eda834f0c0f31849cb6b Author: Yoann Vandoorselaere Date: Sat Jan 7 16:18:26 2006 +0000 Implement analyzer revocation. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@7574 09c5ec92-17d4-0310-903a-819935f44dba prelude-adduser/prelude-adduser.c | 52 ++++++++++++++++++ prelude-adduser/tls-register.c | 109 ++++++++++++++++++++++++++++++++----- prelude-adduser/tls-register.h | 3 + 3 files changed, 149 insertions(+), 15 deletions(-) commit 98e121a37453c6639f2960e7a0dbc0ccf1a36546 Author: Yoann Vandoorselaere Date: Fri Jan 6 18:50:10 2006 +0000 Version bump. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@7572 09c5ec92-17d4-0310-903a-819935f44dba NEWS | 15 +++++++++++++++ configure.in | 6 +++--- docs/api/libprelude-decl.txt | 2 +- 3 files changed, 19 insertions(+), 4 deletions(-) commit 885cff64540648fc5bd0213c1e6322f8309cd242 Author: Yoann Vandoorselaere Date: Fri Jan 6 17:48:35 2006 +0000 Gnulib addition. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@7571 09c5ec92-17d4-0310-903a-819935f44dba libmissing/m4/socklen.m4 | 42 ++++++++++++++++++++++++++++++++++++++++++ 1 files changed, 42 insertions(+), 0 deletions(-) commit adaa6cccc6786c2c0561e09a5c98873d96522a4c Author: Yoann Vandoorselaere Date: Fri Jan 6 17:47:41 2006 +0000 GnuLib code update. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@7570 09c5ec92-17d4-0310-903a-819935f44dba libmissing/Makefile.am | 2 +- libmissing/m4/gettext.m4 | 549 ---------------------------------------- libmissing/m4/glibc2.m4 | 30 --- libmissing/m4/glibc21.m4 | 30 --- libmissing/m4/gnulib-cache.m4 | 6 +- libmissing/m4/gnulib-comp.m4 | 21 -- libmissing/m4/iconv.m4 | 101 -------- libmissing/m4/intdiv0.m4 | 70 ----- libmissing/m4/intmax.m4 | 30 --- libmissing/m4/inttypes-pri.m4 | 30 --- libmissing/m4/inttypes.m4 | 25 -- libmissing/m4/isc-posix.m4 | 24 -- libmissing/m4/lcmessage.m4 | 30 --- libmissing/m4/lib-ld.m4 | 110 -------- libmissing/m4/lib-link.m4 | 554 ----------------------------------------- libmissing/m4/lib-prefix.m4 | 185 -------------- libmissing/m4/nls.m4 | 51 ---- libmissing/m4/po.m4 | 429 ------------------------------- libmissing/m4/printf-posix.m4 | 44 ---- libmissing/m4/progtest.m4 | 92 ------- libmissing/m4/uintmax_t.m4 | 30 --- libmissing/m4/ulonglong.m4 | 23 -- 22 files changed, 4 insertions(+), 2462 deletions(-) commit da7b3f3a84bc012331a36d2079ba1ac1edb54ad8 Author: Yoann Vandoorselaere Date: Fri Jan 6 17:46:51 2006 +0000 Revert yesterday change, which had the side effect of creating another warning. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@7569 09c5ec92-17d4-0310-903a-819935f44dba src/prelude-plugin.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) commit a888052344b28c5c7bebd401615972dff3ccda2e Author: Yoann Vandoorselaere Date: Thu Jan 5 15:11:12 2006 +0000 Fix possible warning. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@7566 09c5ec92-17d4-0310-903a-819935f44dba src/prelude-plugin.c | 6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-) commit 00cb02ccf1bf8f48bdcae70e0dfe475ddb607dce Author: Yoann Vandoorselaere Date: Thu Jan 5 14:01:16 2006 +0000 Correct reading of source_id on option reply. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@7565 09c5ec92-17d4-0310-903a-819935f44dba src/prelude-option-wide.c | 6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-) commit 1e7ad4662d3aa9fc6b4d5ac4d0a41edaefad8a19 Author: Yoann Vandoorselaere Date: Thu Jan 5 13:22:36 2006 +0000 warning fixes. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@7564 09c5ec92-17d4-0310-903a-819935f44dba src/prelude-thread.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) commit 276f93116a92409796fb5c5b26d39a1b0dab8380 Author: Yoann Vandoorselaere Date: Thu Jan 5 13:04:25 2006 +0000 Unsigned. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@7563 09c5ec92-17d4-0310-903a-819935f44dba src/idmef-time.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) commit 9f2c31c6212ce00a642529cc60a24f8c2e545ccf Author: Yoann Vandoorselaere Date: Thu Jan 5 00:39:36 2006 +0000 Avoid modifying argv array, move unhandled option at the end, return the index to the first unhandled parameter. This should fix #116. Avoid the use of C99 specific code, when possible. Handle special -- option character. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@7562 09c5ec92-17d4-0310-903a-819935f44dba src/prelude-option.c | 134 +++++++++++++++++++++++++++++++------------------- src/prelude.c | 15 ------ 2 files changed, 83 insertions(+), 66 deletions(-) commit 61d1f4709c3263b053b2e4f7608cf6066969a9b3 Author: Yoann Vandoorselaere Date: Tue Jan 3 23:41:04 2006 +0000 Clearly state that linking from a GPL compatible program is okay. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@7548 09c5ec92-17d4-0310-903a-819935f44dba LICENSE.README | 13 +++++++------ 1 files changed, 7 insertions(+), 6 deletions(-) commit b3b0413c0ac73d55fb19093783e616e8b89d2d2a Author: Yoann Vandoorselaere Date: Fri Dec 16 16:42:40 2005 +0000 Include netinet/in.h to fix OpenBSD / FreeBSD build. Thanks John R. Shannon for pointing out this. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@7528 09c5ec92-17d4-0310-903a-819935f44dba src/include/common.h | 1 + 1 files changed, 1 insertions(+), 0 deletions(-) commit 14e7b0268d4d52ca6c8683cc0ab731f56ca6c754 Author: Yoann Vandoorselaere Date: Tue Dec 13 19:50:08 2005 +0000 Update documentation, NEWS. Bump soname. Bump version number. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@7519 09c5ec92-17d4-0310-903a-819935f44dba INSTALL | 69 +++++++++++++++++++++++------------------- NEWS | 27 ++++++++++++++++ configure.in | 6 ++-- docs/api/libprelude-decl.txt | 25 ++++++++++++--- libmissing/m4/gnulib-comp.m4 | 2 +- 5 files changed, 89 insertions(+), 40 deletions(-) commit 2cfff05c5aeeeb7e308e02cf72d644e77a414391 Author: Yoann Vandoorselaere Date: Sat Dec 10 11:23:59 2005 +0000 Return if context already exist. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@7507 09c5ec92-17d4-0310-903a-819935f44dba src/prelude-client.c | 3 +++ 1 files changed, 3 insertions(+), 0 deletions(-) commit 1eb6ef8951e192eabf3c6e892d653cb70fdb31ec Author: Yoann Vandoorselaere Date: Sat Dec 10 11:06:43 2005 +0000 Buffer output for prelude_option_print(), this shall make it faster. Implement prelude_option_search_context(). No automated context creation on set. The caller might be to lookup it's own context by using prelude_option_search_context(). git-svn-id: file:///home/yoann/SVN/trunk/libprelude@7506 09c5ec92-17d4-0310-903a-819935f44dba src/include/prelude-option.h | 2 + src/prelude-option.c | 124 ++++++++++++++++++++++-------------------- 2 files changed, 66 insertions(+), 60 deletions(-) commit 535bc12940bdab4af3ccffdb8f83030e1505085d Author: Yoann Vandoorselaere Date: Thu Dec 8 12:11:44 2005 +0000 Update GnuLib code. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@7504 09c5ec92-17d4-0310-903a-819935f44dba libmissing/Makefile.am | 18 ++- libmissing/getaddrinfo.c | 62 +++++++--- libmissing/getaddrinfo.h | 73 +++++++----- libmissing/inet_ntop.c | 258 ++++++++++++++++++++++++------------------ libmissing/inet_ntop.h | 14 ++- libmissing/m4/getaddrinfo.m4 | 23 ++++- libmissing/m4/gnulib-comp.m4 | 25 +++-- libmissing/m4/inet_ntop.m4 | 2 + libmissing/m4/mbchar.m4 | 15 +-- libmissing/m4/mbiter.m4 | 5 +- libmissing/m4/mktime.m4 | 17 +-- libmissing/m4/pathmax.m4 | 4 +- libmissing/m4/regex.m4 | 57 +++++++++- libmissing/m4/stdbool.m4 | 11 ++- libmissing/m4/strcase.m4 | 5 +- libmissing/m4/strcasestr.m4 | 5 +- libmissing/pathmax.h | 4 +- libmissing/regcomp.c | 10 +- libmissing/regex_internal.c | 8 +- libmissing/regex_internal.h | 32 ++---- libmissing/regexec.c | 2 +- libmissing/strcasecmp.c | 9 ++- libmissing/strncasecmp.c | 11 ++- 23 files changed, 415 insertions(+), 255 deletions(-) commit a0e34ae98541620e7dd242d04fbf6521a1c51958 Author: Yoann Vandoorselaere Date: Sun Nov 27 12:40:05 2005 +0000 Trying to make automated build work. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@7454 09c5ec92-17d4-0310-903a-819935f44dba autogen.sh | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) commit 25f8e09271565c78526350cbe941343202d0ae3d Author: Yoann Vandoorselaere Date: Wed Nov 9 13:56:57 2005 +0000 Rename internal _idmef_message_assign_messageid() to _idmef_message_assign_missing(). Modify _idmef_message_assign_missing() so that it take care of setting IDMEF CreateTime in case it was not set. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@7396 09c5ec92-17d4-0310-903a-819935f44dba src/common.c | 22 +++++++++++++++++++++- src/include/common.h | 2 +- src/prelude-client.c | 2 +- 3 files changed, 23 insertions(+), 3 deletions(-) commit 58b2f090411b64135b2890dabe5fead2fad7456d Author: Yoann Vandoorselaere Date: Fri Nov 4 14:06:06 2005 +0000 Implement prelude_client_profile_get_tls_server_crl_filename() for future CRL handling. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@7393 09c5ec92-17d4-0310-903a-819935f44dba src/include/prelude-client-profile.h | 2 ++ src/prelude-client-profile.c | 19 +++++++++++++++++-- 2 files changed, 19 insertions(+), 2 deletions(-) commit 69477aeb8c9f8f34d5590bf8195d11e9288571d8 Author: Yoann Vandoorselaere Date: Sat Oct 29 11:01:31 2005 +0000 Fix a python assertion in case a SWIG returned analyzerID (C 64 bits) is converted to Python int in place of Python long, which can happen since SWIG will return a Python integer if the converted value is smaller than ULONG_MIN. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@7387 09c5ec92-17d4-0310-903a-819935f44dba bindings/libprelude_python.i | 7 +++++-- 1 files changed, 5 insertions(+), 2 deletions(-) commit 2c7e957df150e4b25c1e38bfdb5cb9ad4b313508 Author: Yoann Vandoorselaere Date: Sat Oct 29 10:08:25 2005 +0000 When separating option path into elements, make sure we don't handle dot in option context name as a valid option separator. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@7386 09c5ec92-17d4-0310-903a-819935f44dba src/prelude-option-wide.c | 52 +++++++++++++++++++++++++++++++++++++------- 1 files changed, 43 insertions(+), 9 deletions(-) commit 36ead377bc9cb94bb6e35c56b4d5b5f1daaf5710 Author: Yoann Vandoorselaere Date: Fri Oct 7 13:53:00 2005 +0000 Patch from Daniel Black to fix Perl bindings Makefile generated with DESTDIR appended twice. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@7360 09c5ec92-17d4-0310-903a-819935f44dba bindings/perl/Makefile.PL.in | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) commit c9cf5aede9223af8d148e7c7caa2c981017e863f Author: Yoann Vandoorselaere Date: Mon Oct 3 09:17:08 2005 +0000 Oops. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@7349 09c5ec92-17d4-0310-903a-819935f44dba bindings/Makefile.am | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) commit 5eeb657ab877acbd55c9023d1d1d40f2fa2b3b74 Author: Yoann Vandoorselaere Date: Mon Oct 3 09:08:04 2005 +0000 Patch from Daniel Black to workaround invalid library run path added through MakeMaker generated Makefile. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@7347 09c5ec92-17d4-0310-903a-819935f44dba bindings/Makefile.am | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) commit de0f51fa476d476897f2c50112e04f9cd0407713 Author: Yoann Vandoorselaere Date: Sat Oct 1 17:34:08 2005 +0000 When compiling against recent GnuTLS version, don't link prelude-adduser to libgnutls-extra since, SRP symbols were moved to libgnutls. If no SRP symbol can be found in either gnutls or gnutls-extra, abort with an error explaining the user what's going on: "Your operating system distribution provides the GnuTLS library. Unfortunately, the provided binary lacks support for the SRP protocol. If you are seeing this message, it probably mean you're running on Redhat Fedora, which distributes a stripped down version of the GnuTLS library. Unfortunately, removing part of a library's API break certain applications relying on the library. Solutions: - Install GnuTLS from http://www.gnutls.org - File a Redhat ticket on https://bugzilla.redhat.com/" git-svn-id: file:///home/yoann/SVN/trunk/libprelude@7345 09c5ec92-17d4-0310-903a-819935f44dba configure.in | 58 ++++++++++++++++++++++++++++--------- prelude-adduser/Makefile.am | 4 +- prelude-adduser/prelude-adduser.c | 3 ++ 3 files changed, 49 insertions(+), 16 deletions(-) commit 16cff1ae27175ea067c97e8f96e46c00157eb375 Author: Yoann Vandoorselaere Date: Thu Sep 29 16:06:41 2005 +0000 Set SO_KEEPALIVE. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@7343 09c5ec92-17d4-0310-903a-819935f44dba src/prelude-connection.c | 6 +++++- 1 files changed, 5 insertions(+), 1 deletions(-) commit d947799d8d96b4825f95170e5e3893b72d723c2e Author: Yoann Vandoorselaere Date: Mon Sep 26 00:27:29 2005 +0000 We can't handle __FUNCTION__ as a macro and check conditionally whether it is available. Thus revert, to an autoconf check to handle __FUNCTION__ / __func__. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@7330 09c5ec92-17d4-0310-903a-819935f44dba Makefile.am | 1 + configure.in | 30 ++++++++++++++++++++++++++++++ src/include/prelude-log.h | 15 ++++----------- 3 files changed, 35 insertions(+), 11 deletions(-) commit 76428cb6e63bb02c1df0dc14262b7863cc884198 Author: Yoann Vandoorselaere Date: Tue Sep 20 20:08:58 2005 +0000 Bump to 0.9.0. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@7225 09c5ec92-17d4-0310-903a-819935f44dba NEWS | 7 +++++++ configure.in | 2 +- docs/api/libprelude-decl.txt | 2 +- 3 files changed, 9 insertions(+), 2 deletions(-) commit fd484a81df1e2dcc60b80c3f077fcfe5b3a09548 Author: Yoann Vandoorselaere Date: Tue Sep 20 01:15:33 2005 +0000 Better GnuLib fix for GCC compiler problem with regex_internal. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@7224 09c5ec92-17d4-0310-903a-819935f44dba libmissing/regcomp.c | 10 +++++----- libmissing/regex_internal.c | 8 ++++---- libmissing/regex_internal.h | 17 ++++++++++++----- libmissing/regexec.c | 2 +- 4 files changed, 22 insertions(+), 15 deletions(-) commit 3127bf8ace4bafc33ad7f1ece193ae8bd0584b57 Author: Yoann Vandoorselaere Date: Tue Sep 20 00:22:08 2005 +0000 Workaround GCC 2.9.4 crash. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@7223 09c5ec92-17d4-0310-903a-819935f44dba libmissing/regex_internal.h | 4 ---- 1 files changed, 0 insertions(+), 4 deletions(-) commit 779ac89863b629a6b3349bf6c4b8b2164b0c7f6c Author: Yoann Vandoorselaere Date: Mon Sep 19 20:19:55 2005 +0000 Update GnuLib code. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@7219 09c5ec92-17d4-0310-903a-819935f44dba libmissing/Makefile.am | 2 +- libmissing/ftw.c | 7 +----- libmissing/getaddrinfo.c | 2 +- libmissing/inet_ntop.c | 2 +- libmissing/m4/gnulib-cache.m4 | 7 ++--- libmissing/m4/gnulib-comp.m4 | 5 ++- libmissing/m4/pathmax.m4 | 13 +++++++++++ libmissing/malloc.c | 2 +- libmissing/mktime.c | 3 +- libmissing/pathmax.h | 49 +++++++++++++++++++++++++++++++++++++++++ libmissing/regex.c | 2 +- libmissing/regex_internal.h | 14 +++++++++++ libmissing/strncasecmp.c | 2 +- libmissing/strndup.c | 2 +- libmissing/strnlen.c | 2 +- libmissing/strnlen1.c | 2 +- libmissing/strsep.c | 2 +- libmissing/time_r.c | 2 +- src/include/libmissing.h | 11 +-------- 19 files changed, 96 insertions(+), 35 deletions(-) commit 6536cfa0be91663c42083ff8ff43b98183ae6b39 Author: Yoann Vandoorselaere Date: Sat Sep 17 16:43:34 2005 +0000 Argument checking for bindings. Cleanup. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@7206 09c5ec92-17d4-0310-903a-819935f44dba bindings/libprelude.i | 98 ++++++++++++++++++++++++++++++++++++++++++ bindings/libprelude_perl.i | 54 +++-------------------- bindings/libprelude_python.i | 52 +++-------------------- 3 files changed, 112 insertions(+), 92 deletions(-) commit 75f2bee2675c41e5ff9db8f6157fe57ffe581882 Author: Yoann Vandoorselaere Date: Thu Sep 15 17:11:45 2005 +0000 Bump version number. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@7201 09c5ec92-17d4-0310-903a-819935f44dba NEWS | 15 +++++++++++++++ configure.in | 2 +- docs/api/libprelude-decl.txt | 2 +- 3 files changed, 17 insertions(+), 2 deletions(-) commit 353099aa2191387ad60d43fd3fd0fd085764252f Author: Yoann Vandoorselaere Date: Thu Sep 15 17:09:34 2005 +0000 Update GnuLib code. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@7200 09c5ec92-17d4-0310-903a-819935f44dba libmissing/gai_strerror.c | 9 ++++++++- libmissing/getaddrinfo.c | 30 +++++++++++++++++++++++------- libmissing/getaddrinfo.h | 4 ++-- libmissing/m4/getaddrinfo.m4 | 4 ++-- 4 files changed, 35 insertions(+), 12 deletions(-) commit f32374a4d80ea3b2bd9bb89b3fbb2fd215182af0 Author: Yoann Vandoorselaere Date: Thu Sep 15 13:28:19 2005 +0000 Fix warning. Implement swig_perl_raise_error(). git-svn-id: file:///home/yoann/SVN/trunk/libprelude@7195 09c5ec92-17d4-0310-903a-819935f44dba bindings/libprelude_perl.i | 13 +++++++++++-- 1 files changed, 11 insertions(+), 2 deletions(-) commit d9c640d8fed26aafbe44966cc781eb2862ea0240 Author: Yoann Vandoorselaere Date: Thu Sep 15 11:57:44 2005 +0000 Fix for system where __FUNCTION__ is not available. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@7189 09c5ec92-17d4-0310-903a-819935f44dba src/include/prelude-log.h | 9 ++++++++- 1 files changed, 8 insertions(+), 1 deletions(-) commit c6e8b87244af3a5b77dfa7d9b8c8ef6eaaf11661 Author: Yoann Vandoorselaere Date: Thu Sep 15 11:57:05 2005 +0000 Fix warnings. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@7188 09c5ec92-17d4-0310-903a-819935f44dba bindings/libprelude_perl.i | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) commit 0bb2ffb25a1a84cf66b5c2ea5d5fdbdafd84fc45 Author: Yoann Vandoorselaere Date: Thu Sep 15 11:56:33 2005 +0000 Compiler used to build Perl module might be different than compiler used to build libprelude. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@7187 09c5ec92-17d4-0310-903a-819935f44dba bindings/Makefile.am | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) commit af520cab12f2be014d48d1bea21c7eb88426fef8 Author: Yoann Vandoorselaere Date: Thu Sep 15 11:37:39 2005 +0000 Missing config.h git-svn-id: file:///home/yoann/SVN/trunk/libprelude@7186 09c5ec92-17d4-0310-903a-819935f44dba src/ntp.c | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) commit 0abb88fc2e6197625c482e25965edc96c0f69864 Author: Yoann Vandoorselaere Date: Thu Sep 15 11:35:43 2005 +0000 Include config.h where missing. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@7185 09c5ec92-17d4-0310-903a-819935f44dba src/idmef-message-read.c | Bin 77619 -> 77639 bytes src/idmef-message-write.c | 2 ++ src/idmef-value.c | 2 ++ .../GenerateIDMEFMessageReadC.pm | 1 + .../GenerateIDMEFMessageWriteC.pm | 2 ++ src/prelude-hash.c | 2 ++ src/prelude-ident.c | 2 ++ src/prelude-msg.c | 2 ++ src/prelude-msgbuf.c | 2 ++ src/prelude-timer.c | 2 ++ src/tls-auth.c | 2 ++ src/tls-util.c | 2 ++ 12 files changed, 21 insertions(+), 0 deletions(-) commit d865ac5cd299d09159cdb439cc4170ffcd9d1404 Author: Yoann Vandoorselaere Date: Thu Sep 15 11:34:33 2005 +0000 Add some cast to avoid platform dependant warnings. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@7184 09c5ec92-17d4-0310-903a-819935f44dba src/idmef-criterion-value.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) commit 97a55b891da76324af031cace0dd2cbb0fd7a1a5 Author: Yoann Vandoorselaere Date: Thu Sep 15 11:34:09 2005 +0000 Add some cast to avoid platform dependant warnings. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@7183 09c5ec92-17d4-0310-903a-819935f44dba prelude-adduser/prelude-adduser.c | 9 +++++---- 1 files changed, 5 insertions(+), 4 deletions(-) commit 4f8895deb74d5c4dec22d12f6a167b1cd8333db4 Author: Yoann Vandoorselaere Date: Wed Sep 14 23:22:38 2005 +0000 Handle idmef_additional_data_byte_string_*() correctly. Fix prelude_string_t to perl string conversion problem with the Perl bindings. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@7182 09c5ec92-17d4-0310-903a-819935f44dba bindings/libprelude_perl.i | 23 +++++++++++++++ bindings/libprelude_python.i | 63 +++++++++++++++++++++++++++++++++++++---- 2 files changed, 79 insertions(+), 7 deletions(-) commit a03caf0380d338df8d0d6d71d12fe4b73c77db4b Author: Yoann Vandoorselaere Date: Wed Sep 14 23:10:34 2005 +0000 Stop generating bindings for prelude-string. String operation are supposed to be handled by the target language. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@7181 09c5ec92-17d4-0310-903a-819935f44dba bindings/libprelude.i | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) commit 918d0ea76b05793b10de8bc3e795d1b8d2490d7b Author: Yoann Vandoorselaere Date: Wed Sep 14 14:58:20 2005 +0000 Build fixes. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@7179 09c5ec92-17d4-0310-903a-819935f44dba bindings/perl/Makefile.PL.in | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) commit 43dacaafbc660be915d03e151fe3f01d8c165ee8 Author: Yoann Vandoorselaere Date: Mon Sep 12 14:41:26 2005 +0000 Slight improvement. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@7168 09c5ec92-17d4-0310-903a-819935f44dba autogen.sh | 16 +++++++++++++++- 1 files changed, 15 insertions(+), 1 deletions(-) commit 3ab32c71f65d55ec05d716b17635a14391c2a18b Author: Yoann Vandoorselaere Date: Mon Sep 12 00:49:06 2005 +0000 Enforce a 1mb limit on input message. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@7165 09c5ec92-17d4-0310-903a-819935f44dba src/prelude-msg.c | 13 ++++++++++++- 1 files changed, 12 insertions(+), 1 deletions(-) commit af943e2c6e7597355bceca135b37965338994bdf Author: Yoann Vandoorselaere Date: Mon Sep 12 00:47:25 2005 +0000 Add some FD_SETSIZE assertion(). git-svn-id: file:///home/yoann/SVN/trunk/libprelude@7164 09c5ec92-17d4-0310-903a-819935f44dba src/prelude-connection-pool.c | 7 ++++++- 1 files changed, 6 insertions(+), 1 deletions(-) commit 436bbebb26dc06b435142be63861461a7ddf8a14 Author: Yoann Vandoorselaere Date: Sun Sep 11 22:23:50 2005 +0000 Pro-Active security work from Frank van Vliet and myself. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@7163 09c5ec92-17d4-0310-903a-819935f44dba src/prelude-string.c | 25 ++++++++++++++++++++----- 1 files changed, 20 insertions(+), 5 deletions(-) commit b9a64758856f9c52a4921fedf0d667be928a4d84 Author: Yoann Vandoorselaere Date: Sun Sep 11 18:10:53 2005 +0000 Include signal.h. Should fix #99. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@7162 09c5ec92-17d4-0310-903a-819935f44dba src/include/prelude-thread.h | 1 + 1 files changed, 1 insertions(+), 0 deletions(-) commit f2617d9d6712a4d062beb13e9534d62fe6b5c6d9 Author: Yoann Vandoorselaere Date: Sun Sep 11 18:10:25 2005 +0000 Prevent redefinition warnings. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@7161 09c5ec92-17d4-0310-903a-819935f44dba configure.in | 3 --- 1 files changed, 0 insertions(+), 3 deletions(-) commit a883f001c7494cce6e5a453ec5718ad67e6d2ee4 Author: Yoann Vandoorselaere Date: Thu Sep 8 18:48:13 2005 +0000 Bump version number. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@7154 09c5ec92-17d4-0310-903a-819935f44dba NEWS | 13 +++++++++++++ configure.in | 2 +- 2 files changed, 14 insertions(+), 1 deletions(-) commit 47ed5b9d9fc5635c3b1bece64a3cd9236f1d6663 Author: Yoann Vandoorselaere Date: Thu Sep 8 18:35:18 2005 +0000 Minor reformatting. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@7153 09c5ec92-17d4-0310-903a-819935f44dba Makefile.am | 8 ++++---- 1 files changed, 4 insertions(+), 4 deletions(-) commit 0b340266e7c2b55b6d56adc186d915e3339f6a85 Author: Yoann Vandoorselaere Date: Thu Sep 8 17:33:41 2005 +0000 Update docs. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@7152 09c5ec92-17d4-0310-903a-819935f44dba docs/api/libprelude-decl.txt | 540 ++++------------------ docs/api/libprelude-sections.txt | 153 ++++--- docs/api/tmpl/idmef-additional-data.sgml | 695 +--------------------------- docs/api/tmpl/idmef-criterion-value.sgml | 29 ++ docs/api/tmpl/idmef-data.sgml | 109 ++++-- docs/api/tmpl/idmef-path.sgml | 10 + docs/api/tmpl/idmef-tree-wrap.sgml | 28 ++ docs/api/tmpl/prelude-connection-pool.sgml | 9 + docs/api/tmpl/prelude-log.sgml | 51 ++- docs/api/tmpl/prelude.sgml | 9 + 10 files changed, 398 insertions(+), 1235 deletions(-) commit 8ba05f14cd39f0afd630f14e6d89a29fcbf4f1d9 Author: Yoann Vandoorselaere Date: Thu Sep 8 17:29:18 2005 +0000 restore idmef_data_set_char_string_constant() macro. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@7151 09c5ec92-17d4-0310-903a-819935f44dba src/include/idmef-data.h | 3 +++ 1 files changed, 3 insertions(+), 0 deletions(-) commit c479cf52039dc26a64d111bad7db0534d76984b5 Author: Yoann Vandoorselaere Date: Thu Sep 8 12:03:13 2005 +0000 Only export necessary definition to prelude-config.h. Avoid GnuLib conflicts. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@7150 09c5ec92-17d4-0310-903a-819935f44dba Makefile.am | 8 +++++--- configure.in | 5 +++-- src/include/prelude-extract.h | 1 + 3 files changed, 9 insertions(+), 5 deletions(-) commit 179c9021d56af6913cf248eb27b0fe971ee3f9d9 Author: Yoann Vandoorselaere Date: Thu Sep 8 11:02:57 2005 +0000 Replace idmef_data define by function. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@7147 09c5ec92-17d4-0310-903a-819935f44dba src/idmef-data.c | 130 +++++++++++++++++++++++++++++++++++---------- src/include/idmef-data.h | 89 ++++++++++---------------------- 2 files changed, 128 insertions(+), 91 deletions(-) commit a511ac6ecb0c2b18ebcfe2246569271b197cf543 Author: Yoann Vandoorselaere Date: Wed Sep 7 18:57:02 2005 +0000 let _ptr_ function public for backward compatibility reason. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@7144 09c5ec92-17d4-0310-903a-819935f44dba src/idmef-additional-data.c | 57 +++++++++++++++++++++++++++++++----------- 1 files changed, 42 insertions(+), 15 deletions(-) commit ab26feecb1078c7cd8aab2bdfbb2004600eb8709 Author: Yoann Vandoorselaere Date: Wed Sep 7 12:48:49 2005 +0000 Missing. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@7141 09c5ec92-17d4-0310-903a-819935f44dba src/include/libmissing.h | 11 ++++++++++- 1 files changed, 10 insertions(+), 1 deletions(-) commit 3ffb2fd06925e5a95f32e6d4df1b7596f071b69b Author: Yoann Vandoorselaere Date: Wed Sep 7 12:48:12 2005 +0000 Make sure we use --lgpl when invoking gnulib-tool. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@7140 09c5ec92-17d4-0310-903a-819935f44dba libmissing/Makefile.am | 2 +- libmissing/alloca.c | 2 +- libmissing/alloca_.h | 6 ++-- libmissing/asnprintf.c | 8 +++--- libmissing/ftw.c | 7 +++++- libmissing/gai_strerror.c | 8 +++--- libmissing/getaddrinfo.c | 8 +++--- libmissing/getaddrinfo.h | 8 +++--- libmissing/gettext.h | 8 +++--- libmissing/inet_ntop.h | 8 +++--- libmissing/m4/gnulib-cache.m4 | 5 ++- libmissing/m4/gnulib-comp.m4 | 3 -- libmissing/m4/pathmax.m4 | 13 ----------- libmissing/malloc.c | 8 +++--- libmissing/mbchar.c | 8 +++--- libmissing/mbchar.h | 8 +++--- libmissing/mbuiter.h | 8 +++--- libmissing/memchr.c | 8 +++--- libmissing/minmax.h | 8 +++--- libmissing/mktime.c | 8 +++--- libmissing/pathmax.h | 49 ----------------------------------------- libmissing/printf-args.c | 8 +++--- libmissing/printf-args.h | 8 +++--- libmissing/printf-parse.c | 8 +++--- libmissing/printf-parse.h | 8 +++--- libmissing/regcomp.c | 8 +++--- libmissing/regex.c | 8 +++--- libmissing/regex.h | 8 +++--- libmissing/regex_internal.c | 8 +++--- libmissing/regex_internal.h | 8 +++--- libmissing/regexec.c | 8 +++--- libmissing/size_max.h | 8 +++--- libmissing/snprintf.c | 8 +++--- libmissing/snprintf.h | 8 +++--- libmissing/stdbool_.h | 8 +++--- libmissing/strcase.h | 8 +++--- libmissing/strcasecmp.c | 8 +++--- libmissing/strcasestr.c | 8 +++--- libmissing/strcasestr.h | 8 +++--- libmissing/strdup.c | 8 +++--- libmissing/strdup.h | 8 +++--- libmissing/strncasecmp.c | 8 +++--- libmissing/strndup.c | 8 +++--- libmissing/strndup.h | 8 +++--- libmissing/strnlen.c | 8 +++--- libmissing/strnlen.h | 8 +++--- libmissing/strnlen1.c | 2 +- libmissing/strnlen1.h | 2 +- libmissing/strpbrk.c | 8 +++--- libmissing/strpbrk.h | 8 +++--- libmissing/strsep.c | 8 +++--- libmissing/strsep.h | 8 +++--- libmissing/time_r.c | 8 +++--- libmissing/time_r.h | 8 +++--- libmissing/timegm.c | 8 +++--- libmissing/timegm.h | 8 +++--- libmissing/vasnprintf.c | 8 +++--- libmissing/vasnprintf.h | 8 +++--- libmissing/vsnprintf.c | 8 +++--- libmissing/vsnprintf.h | 8 +++--- libmissing/xsize.h | 8 +++--- 61 files changed, 220 insertions(+), 279 deletions(-) commit 2c1c7273a89870ff187d7ce6027d6a3ffc65ca2b Author: Yoann Vandoorselaere Date: Wed Sep 7 11:29:28 2005 +0000 GnuLib update. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@7139 09c5ec92-17d4-0310-903a-819935f44dba libmissing/regcomp.c | 103 ++++++++++++++++++++--------------- libmissing/regex_internal.c | 2 +- libmissing/regex_internal.h | 126 ++++++++++++++++++++++++++++++++----------- libmissing/regexec.c | 78 +++++++++++++++------------ 4 files changed, 197 insertions(+), 112 deletions(-) commit 9161d662ef7981f702dc7fa359288e346828f003 Author: Yoann Vandoorselaere Date: Tue Sep 6 11:05:37 2005 +0000 More failover NULL check. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@7135 09c5ec92-17d4-0310-903a-819935f44dba src/prelude-connection-pool.c | 5 +++-- 1 files changed, 3 insertions(+), 2 deletions(-) commit 35b926b37775ae54128e0b9e718d13d8929b94fa Author: Yoann Vandoorselaere Date: Mon Sep 5 14:08:31 2005 +0000 Update. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@7131 09c5ec92-17d4-0310-903a-819935f44dba libmissing/m4/gnulib-tool.m4 | 33 +++++++++++++++++++++++++++++++++ 1 files changed, 33 insertions(+), 0 deletions(-) commit 9101291fbb4eacfa077835a464a3a642d52f9b98 Author: Yoann Vandoorselaere Date: Mon Sep 5 14:07:58 2005 +0000 Update. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@7130 09c5ec92-17d4-0310-903a-819935f44dba libmissing/Makefile.am | 6 ++++++ libmissing/m4/gnulib-tool.m4 | 1 - 2 files changed, 6 insertions(+), 1 deletions(-) commit d3522544ccf8753ce50df5ca358f70876dc53f8b Author: Yoann Vandoorselaere Date: Mon Sep 5 08:55:24 2005 +0000 Distribute HACKING.README / LICENSE.README. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@7126 09c5ec92-17d4-0310-903a-819935f44dba Makefile.am | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) commit a9d2620e7374adef94ac583cd3049887c1e399eb Author: Yoann Vandoorselaere Date: Mon Sep 5 08:53:06 2005 +0000 Copyright notice for potential developer, plus licensing note. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@7125 09c5ec92-17d4-0310-903a-819935f44dba HACKING.README | 16 ++++++++++++++++ LICENSE.README | 19 +++++++++++++++++++ 2 files changed, 35 insertions(+), 0 deletions(-) commit 44fd91f21369e097a8ef57a736d9c4aac65c13fa Author: Yoann Vandoorselaere Date: Sat Sep 3 06:43:15 2005 +0000 GnuLib code update. Should fix OpenBSD compilation issue. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@7116 09c5ec92-17d4-0310-903a-819935f44dba libmissing/Makefile.am | 8 +- libmissing/m4/gettext.m4 | 549 ++++++++++++++++++++++++ libmissing/m4/glibc2.m4 | 30 ++ libmissing/m4/glibc21.m4 | 30 ++ libmissing/m4/gnulib-cache.m4 | 4 +- libmissing/m4/gnulib-comp.m4 | 21 + libmissing/m4/iconv.m4 | 101 +++++ libmissing/m4/intdiv0.m4 | 70 +++ libmissing/m4/intmax.m4 | 30 ++ libmissing/m4/inttypes-pri.m4 | 30 ++ libmissing/m4/inttypes.m4 | 25 ++ libmissing/m4/isc-posix.m4 | 24 + libmissing/m4/lcmessage.m4 | 30 ++ libmissing/m4/lib-ld.m4 | 110 +++++ libmissing/m4/lib-link.m4 | 554 ++++++++++++++++++++++++ libmissing/m4/lib-prefix.m4 | 185 ++++++++ libmissing/m4/mbchar.m4 | 7 + libmissing/m4/nls.m4 | 51 +++ libmissing/m4/po.m4 | 429 +++++++++++++++++++ libmissing/m4/printf-posix.m4 | 44 ++ libmissing/m4/progtest.m4 | 92 ++++ libmissing/m4/regex.m4 | 13 +- libmissing/m4/uintmax_t.m4 | 30 ++ libmissing/m4/ulonglong.m4 | 23 + libmissing/regcomp.c | 410 +++++++++--------- libmissing/regex.h | 84 +++- libmissing/regex_internal.c | 308 +++++++------- libmissing/regex_internal.h | 224 +++++++--- libmissing/regexec.c | 949 ++++++++++++++++++++++------------------- 29 files changed, 3565 insertions(+), 900 deletions(-) commit 6b109c2a0f1e4483c7c99f13feeb57de026fe2cd Author: Yoann Vandoorselaere Date: Thu Sep 1 14:21:28 2005 +0000 Add missing LANG="". git-svn-id: file:///home/yoann/SVN/trunk/libprelude@7115 09c5ec92-17d4-0310-903a-819935f44dba src/libprelude-error/Makefile.am | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) commit e9f590bf726586bd15e47b85a4da37061316f190 Author: Yoann Vandoorselaere Date: Thu Sep 1 14:01:29 2005 +0000 Oops. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@7114 09c5ec92-17d4-0310-903a-819935f44dba src/libprelude-error/Makefile.am | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) commit 9ce23c925c6977eec5c34d2e89cb3ed7d867af40 Author: Yoann Vandoorselaere Date: Thu Sep 1 13:59:48 2005 +0000 Reset LANG before calling awk. Fix #96. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@7113 09c5ec92-17d4-0310-903a-819935f44dba src/libprelude-error/Makefile.am | 20 ++++++++++---------- 1 files changed, 10 insertions(+), 10 deletions(-) commit 3db7868c4e4c25bb29079e1e9f4db054d915a1af Author: Yoann Vandoorselaere Date: Thu Sep 1 00:23:28 2005 +0000 Fix broken comment. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@7112 09c5ec92-17d4-0310-903a-819935f44dba src/include/prelude.h.in | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) commit bceb8319860a76310c253001326c229375ba7d2c Author: Yoann Vandoorselaere Date: Thu Sep 1 00:07:47 2005 +0000 Use libmissing gettext.h git-svn-id: file:///home/yoann/SVN/trunk/libprelude@7111 09c5ec92-17d4-0310-903a-819935f44dba src/libprelude-error/Makefile.am | 4 +- src/libprelude-error/gettext.h | 69 -------------------------------------- 2 files changed, 2 insertions(+), 71 deletions(-) commit 0edb1acd4fc399b43345f010df88de29c216b6df Author: Yoann Vandoorselaere Date: Wed Aug 31 23:57:45 2005 +0000 Update GnuLib code. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@7110 09c5ec92-17d4-0310-903a-819935f44dba libmissing/Makefile.am | 3 +- libmissing/m4/gnulib-cache.m4 | 28 +++++++ libmissing/m4/gnulib-comp.m4 | 169 +++++++++++++++++++++++++++++++++++++++++ libmissing/m4/gnulib-tool.m4 | 1 + libmissing/m4/gnulib.m4 | 79 ------------------- 5 files changed, 199 insertions(+), 81 deletions(-) commit f75fe1705a46af46a52ff41990ba9bc8bcf1c2ee Author: Yoann Vandoorselaere Date: Wed Aug 31 23:39:01 2005 +0000 Make idmef-additional-data helpers function instead of define. This make the code easier to handle and Swig will generate wrapper transparantly. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@7109 09c5ec92-17d4-0310-903a-819935f44dba src/idmef-additional-data.c | 176 ++++++++++++++++------ src/include/idmef-additional-data.h | 279 ++++------------------------------- 2 files changed, 158 insertions(+), 297 deletions(-) commit 3e65bd5b6b022a538aafb3974079fc4aded683c5 Author: Yoann Vandoorselaere Date: Wed Aug 31 18:03:16 2005 +0000 Generate bindings for idmef-additional-data helper. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@7108 09c5ec92-17d4-0310-903a-819935f44dba bindings/libprelude.i | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) commit ffe5e8d12adecf8f183497b734931dbd7fe3bb91 Author: Yoann Vandoorselaere Date: Wed Aug 31 17:49:59 2005 +0000 Update GnuLib code. Fix #97. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@7107 09c5ec92-17d4-0310-903a-819935f44dba libmissing/Makefile.am | 2 +- libmissing/m4/gnulib.m4 | 20 ++++++--- libmissing/m4/minmax.m4 | 17 +++++--- libmissing/m4/regex.m4 | 62 +++++++++++++++-------------- libmissing/malloc.c | 36 +++++++++++++++++ libmissing/regcomp.c | 18 +++++---- libmissing/regex.c | 24 ----------- libmissing/regex.h | 4 +- libmissing/regex_internal.c | 16 ++++---- libmissing/regex_internal.h | 89 +++++++++++-------------------------------- libmissing/regexec.c | 63 +++++++++++++++++++----------- libmissing/strcasestr.c | 1 + 12 files changed, 175 insertions(+), 177 deletions(-) commit e3ed9de1f2a6c223d7997adcccc96face91aa26d Author: Yoann Vandoorselaere Date: Mon Aug 29 09:10:24 2005 +0000 Use locale config.h. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@7106 09c5ec92-17d4-0310-903a-819935f44dba src/libprelude-error/code-from-errno.c | 4 +--- src/libprelude-error/code-to-errno.c | 4 +--- src/libprelude-error/strerror.c | 4 +--- src/libprelude-error/strsource.c | 5 ++--- 4 files changed, 5 insertions(+), 12 deletions(-) commit bfaec7f80adb002e6519d29bd3687dd75d408984 Author: Yoann Vandoorselaere Date: Fri Aug 26 09:45:09 2005 +0000 Remove un-necessary socket.h inclusion. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@7105 09c5ec92-17d4-0310-903a-819935f44dba src/common.c | 1 - 1 files changed, 0 insertions(+), 1 deletions(-) commit c8bcb37068cd34db6c16da853b5a8c47cf19c0f9 Author: Yoann Vandoorselaere Date: Fri Aug 26 07:14:58 2005 +0000 Patch from Jim Horvath for WIN32 compile. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@7104 09c5ec92-17d4-0310-903a-819935f44dba src/include/prelude-extract.h | 7 ++++++- 1 files changed, 6 insertions(+), 1 deletions(-) commit f56bbd0cba7341e806765bbd79ecc296cb6a36c6 Author: Yoann Vandoorselaere Date: Fri Aug 26 06:31:24 2005 +0000 Removed netinet/in.h inclusion, which is not needed anymore. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@7103 09c5ec92-17d4-0310-903a-819935f44dba src/tls-auth.c | 1 - 1 files changed, 0 insertions(+), 1 deletions(-) commit c18613d1ea5de8cb132fef9b182277eb71ef24da Author: Yoann Vandoorselaere Date: Thu Aug 25 03:06:16 2005 +0000 Oops; bad renaming. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@7100 09c5ec92-17d4-0310-903a-819935f44dba src/prelude-thread.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) commit eaefb065b983aa1f24a8d97064978556dfa2012f Author: Yoann Vandoorselaere Date: Thu Aug 25 02:30:54 2005 +0000 Bump version. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@7095 09c5ec92-17d4-0310-903a-819935f44dba NEWS | 7 ++++ configure.in | 2 +- docs/api/libprelude-decl.txt | 66 +++++++++--------------------------------- src/include/libmissing.h | 1 - src/include/prelude.h.in | 2 + 5 files changed, 24 insertions(+), 54 deletions(-) commit 7e011b4a9300ee5ad715cbced3c7482b4c1f58c5 Author: Yoann Vandoorselaere Date: Thu Aug 25 01:23:51 2005 +0000 Wrap all pthread call through a prelude_pthread() interface. As of now, pthread function won't be called unless: - We detect we are not using pthread stubs at prelude_init() time. - prelude_thread_init() is explicitly called. This is done so that there are no pthread constraint applied to the caller when pthread are not used. For example, a perl module would previously have failed if the perl interpreter was compiled without being explicitly linked to pthread. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@7085 09c5ec92-17d4-0310-903a-819935f44dba configure.in | 32 +++++ docs/api/libprelude-decl.txt | 120 ++++++++++++++++++- src/Makefile.am | 1 + src/idmef-criteria-string.yac.y | 8 +- src/idmef-path.c | 64 +++++----- src/include/Makefile.am | 4 +- src/include/prelude-thread.h | 97 +++++++++++++++ src/prelude-async.c | 4 + src/prelude-client.c | 12 +- src/prelude-thread.c | 252 +++++++++++++++++++++++++++++++++++++++ src/prelude-timer.c | 26 ++--- src/prelude.c | 40 +++---- src/tls-auth.c | 7 +- 13 files changed, 579 insertions(+), 88 deletions(-) commit 79d8d74c6bf6d105c4d9b7b6f1cf129c87f0b23e Author: Yoann Vandoorselaere Date: Thu Aug 25 01:19:41 2005 +0000 Update. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@7084 09c5ec92-17d4-0310-903a-819935f44dba src/include/libmissing.h | 3 +++ 1 files changed, 3 insertions(+), 0 deletions(-) commit d6965fe601e04487b882a89d4f0a622017a5423c Author: Yoann Vandoorselaere Date: Thu Aug 25 01:16:27 2005 +0000 config.h/libmissing.h inclusion. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@7083 09c5ec92-17d4-0310-903a-819935f44dba src/idmef-tree-wrap.c | 3 +++ src/idmef-wrappers-gen/GenerateIDMEFTreeWrapC.pm | 3 +++ src/variable.c | 2 ++ 3 files changed, 8 insertions(+), 0 deletions(-) commit b134131c406635c728ff2be3eaf7aec45fc607e2 Author: Yoann Vandoorselaere Date: Thu Aug 25 01:14:02 2005 +0000 Include config.h/libmissing.h git-svn-id: file:///home/yoann/SVN/trunk/libprelude@7082 09c5ec92-17d4-0310-903a-819935f44dba src/idmef-class.c | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) commit cb781c3eb7b6773587afe089f6b96bb8f20b4ae2 Author: Yoann Vandoorselaere Date: Thu Aug 25 00:15:17 2005 +0000 Update GnuLib code. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@7081 09c5ec92-17d4-0310-903a-819935f44dba libmissing/Makefile.am | 32 ++- libmissing/m4/gnulib.m4 | 7 +- libmissing/m4/mbchar.m4 | 14 + libmissing/m4/mbiter.m4 | 14 + libmissing/m4/mbrtowc.m4 | 31 ++ libmissing/m4/memchr.m4 | 18 ++ libmissing/m4/regex.m4 | 209 +++++++------- libmissing/m4/strcase.m4 | 15 +- libmissing/m4/strcasestr.m4 | 14 +- libmissing/mbchar.c | 38 +++ libmissing/mbchar.h | 352 +++++++++++++++++++++++ libmissing/mbuiter.h | 203 ++++++++++++++ libmissing/memchr.c | 201 +++++++++++++ libmissing/regcomp.c | 652 ++++++++++++++++--------------------------- libmissing/regex.c | 4 - libmissing/regex.h | 559 +++++++++++++++++++++++-------------- libmissing/regex_internal.c | 251 +++++++---------- libmissing/regex_internal.h | 17 +- libmissing/regexec.c | 601 +++++++++++++++++---------------------- libmissing/strcase.h | 5 +- libmissing/strcasecmp.c | 98 +++++--- libmissing/strcasestr.c | 149 ++++++++-- libmissing/strcasestr.h | 22 +- libmissing/strncasecmp.c | 60 ++++- libmissing/strnlen1.c | 39 +++ libmissing/strnlen1.h | 41 +++ 26 files changed, 2317 insertions(+), 1329 deletions(-) commit 2c4b9672726116054ff492115c19f8f9d699e9ec Author: Yoann Vandoorselaere Date: Wed Aug 24 15:14:56 2005 +0000 Make sure we link correctly the Perl bindings to libprelude. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@7079 09c5ec92-17d4-0310-903a-819935f44dba bindings/Makefile.am | 2 +- bindings/perl/Makefile.PL.in | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) commit c845f956dc7eaf0b19bb0e477ba02f03fdc957da Author: Yoann Vandoorselaere Date: Tue Aug 23 10:36:00 2005 +0000 Use prelude_log(). git-svn-id: file:///home/yoann/SVN/trunk/libprelude@7078 09c5ec92-17d4-0310-903a-819935f44dba src/prelude-string.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) commit 66a7896ea333b8ee968dbaa906a35c5081bc44e2 Author: Yoann Vandoorselaere Date: Tue Aug 23 10:35:33 2005 +0000 Reset prelude-msg priority after recycle. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@7077 09c5ec92-17d4-0310-903a-819935f44dba src/prelude-msgbuf.c | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) commit ae707d6d067eab924d4267eabfc3f433b13a16c3 Author: Yoann Vandoorselaere Date: Sun Aug 21 10:59:45 2005 +0000 Don't return NULL to Perl/Python. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@7061 09c5ec92-17d4-0310-903a-819935f44dba bindings/libprelude_perl.i | 5 +++-- bindings/libprelude_python.i | 6 ++++-- 2 files changed, 7 insertions(+), 4 deletions(-) commit 8b2a4dc29ad55b1684f450825bb19a9fbfee2b81 Author: Yoann Vandoorselaere Date: Sun Aug 21 10:23:34 2005 +0000 Forgot to commit old version bump. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@7059 09c5ec92-17d4-0310-903a-819935f44dba NEWS | 6 ++++++ configure.in | 2 +- 2 files changed, 7 insertions(+), 1 deletions(-) commit a8b8779f3a6d1dce5d362f724ed3a8a01d3cb4ac Author: Yoann Vandoorselaere Date: Wed Aug 17 08:15:44 2005 +0000 Fix for system where ferror/clearerror might be defined as macro. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@7025 09c5ec92-17d4-0310-903a-819935f44dba src/prelude-io.c | 12 +++++++++--- 1 files changed, 9 insertions(+), 3 deletions(-) commit 927282a72f198d1f7ab5c08a9f325656f90a7204 Author: Yoann Vandoorselaere Date: Tue Aug 16 23:26:00 2005 +0000 Version bump. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@7017 09c5ec92-17d4-0310-903a-819935f44dba NEWS | 17 ++ configure.in | 2 +- docs/api/libprelude-decl.txt | 317 ++++++++++++++++++++++++++---- docs/api/tmpl/idmef-criteria.sgml | 16 ++- docs/api/tmpl/idmef-criterion-value.sgml | 1 + docs/api/tmpl/prelude-log.sgml | 10 +- 6 files changed, 315 insertions(+), 48 deletions(-) commit 49404386934d981355b1da371eeff795a15428ff Author: Yoann Vandoorselaere Date: Tue Aug 16 13:02:45 2005 +0000 Fix invalid return value. Kill warning. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@7004 09c5ec92-17d4-0310-903a-819935f44dba src/idmef-criterion-value.c | 7 ++++--- 1 files changed, 4 insertions(+), 3 deletions(-) commit f27f28866d053988aa513b4dbb7fbb0c2599e207 Author: Yoann Vandoorselaere Date: Mon Aug 15 18:53:20 2005 +0000 GnuLib update, add an strcasestr() module. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@6969 09c5ec92-17d4-0310-903a-819935f44dba libmissing/Makefile.am | 10 +++++- libmissing/m4/gnulib.m4 | 8 ++++- libmissing/m4/onceonly_2_57.m4 | 4 +- libmissing/m4/strcasestr.m4 | 17 ++++++++++++ libmissing/m4/strndup.m4 | 6 +--- libmissing/m4/strnlen.m4 | 10 +++++-- libmissing/strcasestr.c | 57 ++++++++++++++++++++++++++++++++++++++++ libmissing/strcasestr.h | 36 +++++++++++++++++++++++++ libmissing/strndup.c | 10 ++----- libmissing/strnlen.h | 32 ++++++++++++++++++++++ 10 files changed, 170 insertions(+), 20 deletions(-) commit 3bb6289cc18494f17f8e8d9bbf3360f55d19f3d5 Author: Yoann Vandoorselaere Date: Mon Aug 15 18:52:56 2005 +0000 New substr operator for substr : "<>". Provide the ability to do insensitive match by appending a wilcard to most (<>, =, ~) operator. Provide the ability to do negative match on <> and ~ operator. Implement lesser and greater operator for broken down time operation. Make the operator enum a bitsflags which make the code a little more easier to handle. Ability for idmef-criterion-value to print regex. Fix some bug in broken down time month/wday handling. Ability to provide a gmt offset in the criteria so that the match is not made on the local time. Watch out, libpreludedb breakage. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@6968 09c5ec92-17d4-0310-903a-819935f44dba src/idmef-criteria-string.lex.l | 18 ++- src/idmef-criteria-string.yac.y | 47 +++++-- src/idmef-criteria.c | 36 +++-- src/idmef-criterion-value.c | 258 +++++++++++++++++++++++------------ src/idmef-value-type.c | 47 ++++--- src/include/idmef-criteria.h | 38 ++++-- src/include/idmef-criterion-value.h | 15 ++- src/include/libmissing.h | 1 + src/libprelude-error/err-codes.h.in | 3 +- 9 files changed, 315 insertions(+), 148 deletions(-) commit 5c9e8d347369580a52ae9a8e25d2a650c10bffcc Author: Yoann Vandoorselaere Date: Sun Aug 14 18:50:16 2005 +0000 Fix int8 / unsigned char swig mixup. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@6963 09c5ec92-17d4-0310-903a-819935f44dba bindings/libprelude_python.i | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) commit bcd3355c987fb5759671fa4408fb0b56e9f3d349 Author: Yoann Vandoorselaere Date: Sun Aug 14 16:22:33 2005 +0000 Record the full process path, as per IDMEFv14 recommendations. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@6962 09c5ec92-17d4-0310-903a-819935f44dba src/prelude-client.c | 27 ++++++++++++++------------- 1 files changed, 14 insertions(+), 13 deletions(-) commit d461b1bda8a18e3af439dd13cf910995534c9f6a Author: Yoann Vandoorselaere Date: Fri Aug 12 00:02:46 2005 +0000 Change from old port number (5554) to IANA assignated port number (4690). git-svn-id: file:///home/yoann/SVN/trunk/libprelude@6951 09c5ec92-17d4-0310-903a-819935f44dba README | 8 ++++---- src/prelude-connection.c | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) commit cd652d84a334d085bbda4fcc1d825e4f718462d3 Author: Yoann Vandoorselaere Date: Thu Aug 11 21:08:41 2005 +0000 Fix inclusion path. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@6949 09c5ec92-17d4-0310-903a-819935f44dba bindings/perl/Makefile.PL.in | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) commit 4d4b52bb6bf72fc950db922d97beff7a922b79f3 Author: Yoann Vandoorselaere Date: Mon Aug 8 20:42:20 2005 +0000 Fixes for broken FreeBSD sh :-) git-svn-id: file:///home/yoann/SVN/trunk/libprelude@6939 09c5ec92-17d4-0310-903a-819935f44dba m4/ax_create_prelude_inttypes_h.m4 | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) commit 5840bb7a92c925b4d4df054c1f4b705d90efe0f8 Author: Yoann Vandoorselaere Date: Sat Aug 6 18:08:13 2005 +0000 Handle fread() error return correctly (check for ferror() / feof(), and return the appropriate error code). git-svn-id: file:///home/yoann/SVN/trunk/libprelude@6938 09c5ec92-17d4-0310-903a-819935f44dba src/prelude-io.c | 9 ++++++--- 1 files changed, 6 insertions(+), 3 deletions(-) commit 2c601005ab4ba4e2ace8ac549d0d52a0a3cedfc2 Author: Yoann Vandoorselaere Date: Fri Aug 5 13:53:01 2005 +0000 Implement va_copy() workaround from glib. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@6937 09c5ec92-17d4-0310-903a-819935f44dba configure.in | 79 ++++++++++++++++++++++++++++++++++++++++++++++++++ src/prelude-string.c | 20 ++++++++++++- 2 files changed, 98 insertions(+), 1 deletions(-) commit c0ae6f23a50ecc885a9777677a2f84206dddd06d Author: Yoann Vandoorselaere Date: Fri Aug 5 13:26:04 2005 +0000 Fix 64 bit conversion specifier detection: Now check for l, ll, q, I64, instead of just relying on l or ll depending on sizeof(long). Fix printf/scanf issue on old BSD system. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@6936 09c5ec92-17d4-0310-903a-819935f44dba m4/ax_create_prelude_inttypes_h.m4 | 119 +++++++++++++++++++----------------- src/include/prelude-inttypes.h.in | 38 +++++------- 2 files changed, 78 insertions(+), 79 deletions(-) commit a8141173a4596518cc35bde06fbd3ec1b99b7e51 Author: Yoann Vandoorselaere Date: Fri Aug 5 13:24:19 2005 +0000 Fix unused warning on system without pthread_atfork(). git-svn-id: file:///home/yoann/SVN/trunk/libprelude@6935 09c5ec92-17d4-0310-903a-819935f44dba src/prelude-async.c | 13 ++++++++----- src/prelude-timer.c | 3 +++ 2 files changed, 11 insertions(+), 5 deletions(-) commit 0eec40e461b2747365d03be25a87cc54ab9494e9 Author: Yoann Vandoorselaere Date: Thu Aug 4 22:49:58 2005 +0000 Ooops, check for sed and variadic macros. Should have been part of 6932. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@6934 09c5ec92-17d4-0310-903a-819935f44dba configure.in | 30 ++++++++++++++++++++++++++++++ 1 files changed, 30 insertions(+), 0 deletions(-) commit 24823df0f449a5a2b59f9469937ae5d027101980 Author: Yoann Vandoorselaere Date: Thu Aug 4 22:48:37 2005 +0000 Use TIME_WITH_SYS_TIME (through prelude-config.h). git-svn-id: file:///home/yoann/SVN/trunk/libprelude@6933 09c5ec92-17d4-0310-903a-819935f44dba src/include/idmef-time.h | 15 ++++++++++++--- 1 files changed, 12 insertions(+), 3 deletions(-) commit 36fff53e974310f5e79811847025848298053006 Author: Yoann Vandoorselaere Date: Thu Aug 4 22:45:33 2005 +0000 Workaround for system without variadic macros. Use prelude-config.h for this purpose. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@6932 09c5ec92-17d4-0310-903a-819935f44dba src/include/prelude-log.h | 50 ++++++++++++++++++++++++++++---------------- src/prelude-log.c | 25 ++++++++++++++++++++++ 2 files changed, 57 insertions(+), 18 deletions(-) commit 8ddb79eb7de6c85a795bca272d34451c0621ed1b Author: Yoann Vandoorselaere Date: Thu Aug 4 22:44:53 2005 +0000 Generate prelude-config.h, from config.h and install it. This is required so that we can keep some machine definition and use it in header file. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@6931 09c5ec92-17d4-0310-903a-819935f44dba Makefile.am | 11 +++++++++++ 1 files changed, 11 insertions(+), 0 deletions(-) commit 5a36132901f14499374833049543e94882088e56 Author: Yoann Vandoorselaere Date: Thu Aug 4 13:47:47 2005 +0000 Missing. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@6930 09c5ec92-17d4-0310-903a-819935f44dba gtk-doc.make | 153 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 files changed, 153 insertions(+), 0 deletions(-) commit 95739209270557b1bf4a8c90051cdd18669e15f8 Author: Yoann Vandoorselaere Date: Thu Aug 4 00:40:04 2005 +0000 Include gtk-doc.m4, for developer. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@6929 09c5ec92-17d4-0310-903a-819935f44dba m4/gtk-doc.m4 | 53 +++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 files changed, 53 insertions(+), 0 deletions(-) commit ad5cf4eb82303a7df6b321e0f76967d46059de4b Author: Yoann Vandoorselaere Date: Mon Aug 1 23:27:13 2005 +0000 Include some WIN32 conditional fixes by Jim Horvath . git-svn-id: file:///home/yoann/SVN/trunk/libprelude@6911 09c5ec92-17d4-0310-903a-819935f44dba src/idmef-message-write.c | 7 ++++++- .../GenerateIDMEFMessageWriteC.pm | 7 ++++++- src/include/common.h | 7 ++++++- 3 files changed, 18 insertions(+), 3 deletions(-) commit 7f6047c8f475b1f2b0c7e7cace90e256043a356b Author: Yoann Vandoorselaere Date: Mon Aug 1 21:28:30 2005 +0000 Update documentation, NEWS. Bump version number. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@6904 09c5ec92-17d4-0310-903a-819935f44dba NEWS | 15 +++++++++++++++ configure.in | 2 +- docs/api/libprelude-decl.txt | 2 +- docs/api/tmpl/idmef-additional-data.sgml | 3 +++ docs/api/tmpl/idmef-criteria.sgml | 3 +++ docs/api/tmpl/idmef-criterion-value.sgml | 3 +++ docs/api/tmpl/idmef-data.sgml | 3 +++ docs/api/tmpl/idmef-message-print.sgml | 3 +++ docs/api/tmpl/idmef-message-read.sgml | 3 +++ docs/api/tmpl/idmef-message-write.sgml | 3 +++ docs/api/tmpl/idmef-path.sgml | 3 +++ docs/api/tmpl/idmef-time.sgml | 3 +++ docs/api/tmpl/idmef-tree-wrap.sgml | 3 +++ docs/api/tmpl/idmef-value.sgml | 3 +++ docs/api/tmpl/idmef.sgml | 3 +++ docs/api/tmpl/prelude-async.sgml | 3 +++ docs/api/tmpl/prelude-client.sgml | 3 +++ docs/api/tmpl/prelude-connection-pool.sgml | 3 +++ docs/api/tmpl/prelude-connection.sgml | 3 +++ docs/api/tmpl/prelude-failover.sgml | 3 +++ docs/api/tmpl/prelude-hash.sgml | 3 +++ docs/api/tmpl/prelude-ident.sgml | 3 +++ docs/api/tmpl/prelude-inttypes.sgml | 3 +++ docs/api/tmpl/prelude-io.sgml | 3 +++ docs/api/tmpl/prelude-linked-object.sgml | 3 +++ docs/api/tmpl/prelude-list.sgml | 3 +++ docs/api/tmpl/prelude-log.sgml | 3 +++ docs/api/tmpl/prelude-msg.sgml | 3 +++ docs/api/tmpl/prelude-msgbuf.sgml | 3 +++ docs/api/tmpl/prelude-plugin.sgml | 3 +++ docs/api/tmpl/prelude-string.sgml | 3 +++ docs/api/tmpl/prelude.sgml | 3 +++ 32 files changed, 104 insertions(+), 2 deletions(-) commit 41e8a5fcacafc1cb71735e720ffb7dd15bba563d Author: Yoann Vandoorselaere Date: Mon Aug 1 21:26:24 2005 +0000 beautification. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@6903 09c5ec92-17d4-0310-903a-819935f44dba src/prelude-io.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) commit b73e285cf289748b957f2fe0e8693dfd2422a706 Author: Yoann Vandoorselaere Date: Mon Aug 1 21:22:17 2005 +0000 Try to improve error reporting in case of TLS error. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@6902 09c5ec92-17d4-0310-903a-819935f44dba src/prelude-io.c | 17 +++++++++++++---- 1 files changed, 13 insertions(+), 4 deletions(-) commit b1fde2786013278a09c90c55b230152632bae2d5 Author: Yoann Vandoorselaere Date: Mon Aug 1 19:31:37 2005 +0000 Warning improvement. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@6901 09c5ec92-17d4-0310-903a-819935f44dba src/prelude-option.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) commit 93469165a7e07bfd2df5448bfe39be34a712c795 Author: Yoann Vandoorselaere Date: Mon Aug 1 19:25:48 2005 +0000 Catch GNUTLS_E_UNEXPECTED_PACKET_LENGTH error, which often happen when the client close the connection without calling gnutls_bye(). Same for GNUTLS_E_INVALID_SESSION, which happen when calling gnutls_bye() on an already bye'd out connection. The error are still available when increasing libprelude log level. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@6900 09c5ec92-17d4-0310-903a-819935f44dba src/prelude-io.c | 10 ++++++++-- 1 files changed, 8 insertions(+), 2 deletions(-) commit 1d71b796aabc2594dbe181e2a18b8e0e4ef96014 Author: Yoann Vandoorselaere Date: Mon Aug 1 17:36:31 2005 +0000 Decrease verbosity for begnin error. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@6898 09c5ec92-17d4-0310-903a-819935f44dba src/prelude-io.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) commit 3d9f6ddd2d37f140e698a780967941dd8fd7468a Author: Yoann Vandoorselaere Date: Mon Aug 1 17:35:28 2005 +0000 More close-on-exec fix. Decrease error checking. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@6897 09c5ec92-17d4-0310-903a-819935f44dba src/daemonize.c | 4 +++- src/prelude-connection.c | 11 +++-------- 2 files changed, 6 insertions(+), 9 deletions(-) commit 6fcce0c89d2241aeb7a5ff404ad192ee76d0d3fa Author: Yoann Vandoorselaere Date: Mon Aug 1 16:57:01 2005 +0000 Correct mmap() error checking. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@6895 09c5ec92-17d4-0310-903a-819935f44dba src/prelude-client.c | 2 +- src/tls-util.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit d1774ddf49b31d242721d43c3abc58adc01cc6bc Author: Yoann Vandoorselaere Date: Mon Aug 1 16:16:15 2005 +0000 Update gnulib code. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@6890 09c5ec92-17d4-0310-903a-819935f44dba libmissing/Makefile.am | 20 +++---- libmissing/m4/gnulib.m4 | 5 +- libmissing/m4/regex.m4 | 126 ++++++++++++++++++++++------------------------ libmissing/size_max.h | 27 ++++++++++ 4 files changed, 99 insertions(+), 79 deletions(-) commit a2cb4b8b054e378ebcb00d25fcdc9b84c5fb46e0 Author: Yoann Vandoorselaere Date: Mon Aug 1 12:28:14 2005 +0000 Oops, fix mistake when looking up groupname GID. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@6885 09c5ec92-17d4-0310-903a-819935f44dba prelude-adduser/prelude-adduser.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) commit c21042d19f6904537985e9679ed9f1fc1c64f045 Author: Yoann Vandoorselaere Date: Mon Aug 1 12:07:19 2005 +0000 Resort to calling gnutls_strerror() if a TLS error happen and it is not an alert. Thanks to John R. Shannon for pointing out this. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@6884 09c5ec92-17d4-0310-903a-819935f44dba src/prelude-io.c | 7 +++++-- 1 files changed, 5 insertions(+), 2 deletions(-) commit 7bc0adcb22d91f846d7bfc5406879868f634c081 Author: Yoann Vandoorselaere Date: Mon Aug 1 12:03:49 2005 +0000 Use SWIG_TypeQuery() to ensure portability. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@6883 09c5ec92-17d4-0310-903a-819935f44dba bindings/Makefile.am | 4 +- bindings/idmef-value-class-mapping.h | 78 ------------------- bindings/idmef-value-class-mapping.i | 80 ++++++++++++++++++++ bindings/libprelude.i | 3 +- .../GenerateIDMEFValueClassSwigMapping.pm | 16 ++-- src/idmef-wrappers-gen/generator.pl | 2 +- 6 files changed, 94 insertions(+), 89 deletions(-) commit abd50bae3ad749a377b525e81f870f09ef1b65d8 Author: Yoann Vandoorselaere Date: Sat Jul 30 14:08:26 2005 +0000 Correct source_id decoding. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@6875 09c5ec92-17d4-0310-903a-819935f44dba src/prelude-option-wide.c | 7 ++++--- 1 files changed, 4 insertions(+), 3 deletions(-) commit 45f67d6bb2a998361ec6ed1e44cb202a254e707f Author: Yoann Vandoorselaere Date: Sat Jul 30 13:45:58 2005 +0000 Fill source_id on prelude_option_recv_reply(). Include an empty PRELUDE_MSG_OPTION_TARGET_INSTANCE_ID in option message. Some cleanup. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@6874 09c5ec92-17d4-0310-903a-819935f44dba src/include/prelude-message-id.h | 1 + src/prelude-option-wide.c | 22 ++++++++++------------ 2 files changed, 11 insertions(+), 12 deletions(-) commit 79fc54c5d621935d2d1c92140a6ac751a45beaa6 Author: Yoann Vandoorselaere Date: Mon Jul 25 21:58:26 2005 +0000 More error reporting. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@6827 09c5ec92-17d4-0310-903a-819935f44dba src/tls-auth.c | 23 ++++++++++++++++------- 1 files changed, 16 insertions(+), 7 deletions(-) commit 4fec527b7c13e9fc813a9886d4e44c89dca38b85 Author: Yoann Vandoorselaere Date: Mon Jul 25 17:07:27 2005 +0000 Handle case where there is no failover created. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@6826 09c5ec92-17d4-0310-903a-819935f44dba src/prelude-connection-pool.c | 9 ++++++--- 1 files changed, 6 insertions(+), 3 deletions(-) commit 85e23a81cb1bf62604faff211e051230bfae8414 Author: Yoann Vandoorselaere Date: Mon Jul 25 16:46:08 2005 +0000 Alway backup the va_list, since it's value might be undefined after the vsnprintf() call. This fix a bug on prelude_string_vprintf() recursion on some platform. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@6825 09c5ec92-17d4-0310-903a-819935f44dba src/prelude-string.c | 16 +++++++++++----- 1 files changed, 11 insertions(+), 5 deletions(-) commit 37d8257948bdea3b9ddfa509e6b19d6caa08fc42 Author: Yoann Vandoorselaere Date: Thu Jul 14 00:08:27 2005 +0000 Update NEWS, documentation. Bump version number. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@6771 09c5ec92-17d4-0310-903a-819935f44dba NEWS | 15 +++++++++++++++ configure.in | 2 +- docs/api/libprelude-decl.txt | 2 +- 3 files changed, 17 insertions(+), 2 deletions(-) commit e8b62bf2a6582106bf35b9d47b1a488dbc5b37c5 Author: Yoann Vandoorselaere Date: Wed Jul 13 23:24:22 2005 +0000 Separate normal log level / debug log level handling. Allow to have different facility for each of theses specific level. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@6766 09c5ec92-17d4-0310-903a-819935f44dba src/prelude-log.c | 44 ++++++++++++++++++++++++++------------------ 1 files changed, 26 insertions(+), 18 deletions(-) commit 7aae45b2a5f005f3b4dc1a311b5da47e73e94ad7 Author: Yoann Vandoorselaere Date: Tue Jul 12 20:12:45 2005 +0000 Handle global_logfile separatly. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@6765 09c5ec92-17d4-0310-903a-819935f44dba src/prelude-log.c | 6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-) commit 2168ec4940ff6d1a2097f97b9c8ecdffa3dd4e16 Author: Yoann Vandoorselaere Date: Tue Jul 12 18:28:34 2005 +0000 Set FD_CLOE git-svn-id: file:///home/yoann/SVN/trunk/libprelude@6762 09c5ec92-17d4-0310-903a-819935f44dba src/prelude-connection.c | 11 +++++++++-- 1 files changed, 9 insertions(+), 2 deletions(-) commit 5cd9635dda26e554142c38df14ea70dd68c1a2c3 Author: Yoann Vandoorselaere Date: Tue Jul 12 12:45:20 2005 +0000 Update function documentation. Fix #89. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@6759 09c5ec92-17d4-0310-903a-819935f44dba src/prelude-client.c | 3 +-- 1 files changed, 1 insertions(+), 2 deletions(-) commit d90372f2c226787008f3141cd00870031cca119f Author: Yoann Vandoorselaere Date: Tue Jul 12 08:23:57 2005 +0000 Slight renaming. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@6758 09c5ec92-17d4-0310-903a-819935f44dba src/common.c | 6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-) commit 53cd12a653ceb992ca601240363c46763d424a8a Author: Yoann Vandoorselaere Date: Tue Jul 12 08:21:28 2005 +0000 Correct fill_client_infos() return value. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@6757 09c5ec92-17d4-0310-903a-819935f44dba src/prelude-client.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) commit a06145fe10ddc2837411f36002d85543a5be9789 Author: Yoann Vandoorselaere Date: Mon Jul 11 15:11:07 2005 +0000 Update GnuLib code. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@6754 09c5ec92-17d4-0310-903a-819935f44dba libmissing/Makefile.am | 2 +- libmissing/getaddrinfo.h | 12 +++++++++--- libmissing/inet_ntop.h | 5 ++++- libmissing/m4/gnulib.m4 | 2 +- libmissing/m4/size_max.m4 | 10 +++++----- libmissing/regcomp.c | 7 ++++--- libmissing/time_r.h | 13 ++++++++++++- 7 files changed, 36 insertions(+), 15 deletions(-) commit 7d3f94a503d86a60849411622345b33092202d61 Author: Yoann Vandoorselaere Date: Mon Jul 11 15:07:55 2005 +0000 Don't fail on _prelude_get_file_name_and_path() error. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@6753 09c5ec92-17d4-0310-903a-819935f44dba src/prelude-client.c | 59 +++++++++++++++++++++++++++---------------------- 1 files changed, 32 insertions(+), 27 deletions(-) commit 28997e625e8a00c9287a056783060180b70aa283 Author: Yoann Vandoorselaere Date: Mon Jul 11 15:04:38 2005 +0000 More path normalization in _prelude_get_file_name_and_path(). git-svn-id: file:///home/yoann/SVN/trunk/libprelude@6752 09c5ec92-17d4-0310-903a-819935f44dba src/common.c | 71 ++++++++++++++++++++++++++++++++++++++++------------------ 1 files changed, 49 insertions(+), 22 deletions(-) commit 3f252a7278e3d9f14ddc7d6a40f629a3d79bdd19 Author: Yoann Vandoorselaere Date: Sat Jul 9 09:21:33 2005 +0000 Update to use libmissing defined PATH_MAX. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@6751 09c5ec92-17d4-0310-903a-819935f44dba src/daemonize.c | 6 +----- 1 files changed, 1 insertions(+), 5 deletions(-) commit 1eec54bc5204ce24d3915d0d05fe696c7f97790c Author: Yoann Vandoorselaere Date: Sat Jul 9 09:21:04 2005 +0000 Store CWD on prelude_init(), use it in _prelude_get_file_name_and_path(). Useful for case where the program call prelude_init() when starting but fork before the prelude_client_t creation. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@6750 09c5ec92-17d4-0310-903a-819935f44dba src/common.c | 16 +++++++++------- src/prelude.c | 7 ++++++- 2 files changed, 15 insertions(+), 8 deletions(-) commit 9d74f90aa70d1707620475623335fbbfa8d54e54 Author: Yoann Vandoorselaere Date: Fri Jul 8 17:51:19 2005 +0000 Check whether HAVE_PTHREAD_ATFORK is set. Fix #87. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@6749 09c5ec92-17d4-0310-903a-819935f44dba src/prelude-timer.c | 8 +++++--- 1 files changed, 5 insertions(+), 3 deletions(-) commit 8492048e5ecd7cf103d10e981a0669f64d3a64c3 Author: Yoann Vandoorselaere Date: Fri Jul 8 17:47:14 2005 +0000 Fix a typo that could result in an endless loop on system where _POSIX_TIMERS is defined. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@6748 09c5ec92-17d4-0310-903a-819935f44dba src/prelude-async.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) commit d73c7ec308d6f8e8a6611f5ece4b33618de48352 Author: Yoann Vandoorselaere Date: Thu Jul 7 15:37:31 2005 +0000 Update NEWS. Bump version number. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@6745 09c5ec92-17d4-0310-903a-819935f44dba NEWS | 32 ++++++++++++++++++++++++++++++++ configure.in | 2 +- 2 files changed, 33 insertions(+), 1 deletions(-) commit 8262ca9877e54ca72a32f74b0180e1d7828e0b8b Author: Yoann Vandoorselaere Date: Thu Jul 7 15:33:51 2005 +0000 Fix distcheck. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@6744 09c5ec92-17d4-0310-903a-819935f44dba bindings/python/setup.py.in | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) commit 377644924f6de6314567cc2894e20e1bb311a3a3 Author: Yoann Vandoorselaere Date: Thu Jul 7 15:33:23 2005 +0000 Big GnuLib update. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@6743 09c5ec92-17d4-0310-903a-819935f44dba libmissing/Makefile.am | 12 +- libmissing/m4/gettext.m4 | 549 --- libmissing/m4/glibc2.m4 | 30 - libmissing/m4/glibc21.m4 | 30 - libmissing/m4/gnulib.m4 | 3 +- libmissing/m4/iconv.m4 | 101 - libmissing/m4/intdiv0.m4 | 70 - libmissing/m4/intmax.m4 | 30 - libmissing/m4/inttypes-pri.m4 | 30 - libmissing/m4/inttypes.m4 | 25 - libmissing/m4/isc-posix.m4 | 24 - libmissing/m4/lcmessage.m4 | 30 - libmissing/m4/lib-ld.m4 | 110 - libmissing/m4/lib-link.m4 | 553 --- libmissing/m4/lib-prefix.m4 | 153 - libmissing/m4/nls.m4 | 51 - libmissing/m4/po.m4 | 429 --- libmissing/m4/printf-posix.m4 | 44 - libmissing/m4/progtest.m4 | 92 - libmissing/m4/regex.m4 | 88 +- libmissing/m4/uintmax_t.m4 | 30 - libmissing/m4/ulonglong.m4 | 23 - libmissing/regcomp.c | 3925 +++++++++++++++++++ libmissing/regex.c | 8325 +---------------------------------------- libmissing/regex.h | 106 +- libmissing/regex_internal.c | 1673 +++++++++ libmissing/regex_internal.h | 808 ++++ libmissing/regexec.c | 4338 +++++++++++++++++++++ 28 files changed, 10928 insertions(+), 10754 deletions(-) commit 9769b9e59bae732a27b7ee88c108642fa196ffb1 Author: Yoann Vandoorselaere Date: Thu Jul 7 15:02:47 2005 +0000 Update. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@6742 09c5ec92-17d4-0310-903a-819935f44dba docs/api/libprelude-decl.txt | 5 +++++ 1 files changed, 5 insertions(+), 0 deletions(-) commit 097cdd0d1593d99162a7a2704e42afd2d1541c62 Author: Yoann Vandoorselaere Date: Thu Jul 7 15:02:08 2005 +0000 Move libmissing/libprelude-error link to LIBADD. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@6741 09c5ec92-17d4-0310-903a-819935f44dba src/Makefile.am | 5 ++--- 1 files changed, 2 insertions(+), 3 deletions(-) commit 4963690f054f1d48eab5a922179ff7d4876d2214 Author: Yoann Vandoorselaere Date: Thu Jul 7 11:47:06 2005 +0000 Allow the user to provide the LIBPRELUDE_LOGFILE environment variable, to be used for debugging. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@6740 09c5ec92-17d4-0310-903a-819935f44dba src/prelude.c | 12 ++++++++---- 1 files changed, 8 insertions(+), 4 deletions(-) commit 85a33e97e35798e6cea34dce80cbe4ae67e1bf0b Author: Yoann Vandoorselaere Date: Thu Jul 7 10:37:42 2005 +0000 New prelude_log_set_logfile() function, that might be used to specify an explicit global logfile instead of the default syslog/stdout/stderr output. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@6739 09c5ec92-17d4-0310-903a-819935f44dba src/include/prelude-log.h | 2 ++ src/prelude-log.c | 28 ++++++++++++++++++++++++++-- 2 files changed, 28 insertions(+), 2 deletions(-) commit f70e7dcddaca2ce38b300b41fecc58a617196c4d Author: Yoann Vandoorselaere Date: Thu Jul 7 10:01:56 2005 +0000 Large modification to prelude-async fork handling due to FreeBSD incapacity of dealing with restarting a thread from the child process (which was causing an assertion in libpthread). - prelude-timer now provide it's own atfork handler. Don't restore the timer state from the prelude-async handler. - Modify prelude-async child fork handler so that the asynchronous thread is not restarted. It is up to the caller to decide whether to restart the asynchronous thread in the child by using prelude_client_set_flags(). Note that calling pthread_create() from a child process break on some architecture, namely FreeBSD, if another thread was started from the parent of the forked process. - Reinitialize mutex instead of unlocking them in all atfork child handler. Some implementation seem not to support unlocking of a mutex in the child process. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@6738 09c5ec92-17d4-0310-903a-819935f44dba src/prelude-async.c | 89 +++++++++++++++++++++++++++----------------------- src/prelude.c | 18 +++++++++- 2 files changed, 64 insertions(+), 43 deletions(-) commit b6555c111c6809cc060c96b7830074eee1972b6d Author: Yoann Vandoorselaere Date: Thu Jul 7 07:54:24 2005 +0000 Implement _prelude_timer_init() responsible for setting up an atfork handler responsible for keeping data in a consistant state accross fork() (zero the list, reset the timer mutex). git-svn-id: file:///home/yoann/SVN/trunk/libprelude@6737 09c5ec92-17d4-0310-903a-819935f44dba src/include/prelude-timer.h | 6 ++++++ src/prelude-timer.c | 25 ++++++++++++++++++++++++- 2 files changed, 30 insertions(+), 1 deletions(-) commit 1c1ca451a1199a3038acd452b871bced9fadb424 Author: Yoann Vandoorselaere Date: Wed Jul 6 23:38:07 2005 +0000 Implement _idmef_path_cache_reinit(), to be used by the atfork handler to reinitialize idmef_path_t mutex within the child (experience show unlocking a mutex locked from the atfork prepare handler in the child is not portable). git-svn-id: file:///home/yoann/SVN/trunk/libprelude@6736 09c5ec92-17d4-0310-903a-819935f44dba src/idmef-path.c | 20 +++++++++++++++++++- src/include/idmef-path.h | 2 ++ 2 files changed, 21 insertions(+), 1 deletions(-) commit af67e4bd6a96ae1dd1f3efa4857734d970e7119d Author: Yoann Vandoorselaere Date: Tue Jul 5 08:37:37 2005 +0000 Include file cleanup. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@6732 09c5ec92-17d4-0310-903a-819935f44dba src/idmef-criterion-value.c | 2 +- src/include/prelude-extract.h | 1 + 2 files changed, 2 insertions(+), 1 deletions(-) commit 483cb7a05bc332bb44aba84d3c9b719394d19644 Author: Yoann Vandoorselaere Date: Tue Jul 5 08:36:50 2005 +0000 Include file cleanup. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@6731 09c5ec92-17d4-0310-903a-819935f44dba prelude-adduser/tls-register.c | 5 +-- src/common.c | 4 +-- src/config-engine.c | 2 +- src/daemonize.c | 3 +- src/idmef-additional-data.c | 2 +- src/idmef-criteria.c | 4 ++- src/idmef-message-read.c | Bin 77688 -> 77619 bytes src/idmef-message-write.c | 3 -- src/idmef-time.c | 26 +++++++++++++------ src/idmef-value-type.c | 3 +- .../GenerateIDMEFMessageReadC.pm | 3 -- .../GenerateIDMEFMessageWriteC.pm | 3 -- src/prelude-connection-pool.c | 7 +---- src/prelude-connection.c | 2 +- src/prelude-failover.c | 2 +- src/prelude-plugin.c | 2 +- 16 files changed, 34 insertions(+), 37 deletions(-) commit 9ff0317fee08cd80ac36aeef63fa1b1ae834b1aa Author: Yoann Vandoorselaere Date: Sun Jul 3 10:53:06 2005 +0000 Missing LANG="" workaround. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@6716 09c5ec92-17d4-0310-903a-819935f44dba bindings/Makefile.am | 5 ++++- 1 files changed, 4 insertions(+), 1 deletions(-) commit c0902e5af4f4c07ac67d4b9bbe901714856d24dd Author: Yoann Vandoorselaere Date: Sun Jul 3 10:50:23 2005 +0000 Workaround MakeMaker issue where generated Perl Makefile would be invalid when UTF-8 is enabled. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@6714 09c5ec92-17d4-0310-903a-819935f44dba bindings/Makefile.am | 10 ++++++++-- 1 files changed, 8 insertions(+), 2 deletions(-) commit 2dbb2fcf708b2ccaf158a1c744956dcbc3524c55 Author: Yoann Vandoorselaere Date: Thu Jun 30 17:27:22 2005 +0000 Update. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@6699 09c5ec92-17d4-0310-903a-819935f44dba docs/api/libprelude-decl.txt | 265 ++++++++++++++++-------------- docs/api/libprelude-sections.txt | 2 +- docs/api/tmpl/idmef-additional-data.sgml | 43 +++++ docs/api/tmpl/prelude-async.sgml | 2 +- docs/api/tmpl/prelude-log.sgml | 7 +- docs/api/tmpl/prelude-plugin.sgml | 2 + 6 files changed, 196 insertions(+), 125 deletions(-) commit a579ae7a6e6887101ca706b355b6615e1b168168 Author: Yoann Vandoorselaere Date: Thu Jun 30 17:25:32 2005 +0000 Allow option argument starting with a '-' if the value immediatly following the option character cannot be looked up as an existing option. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@6698 09c5ec92-17d4-0310-903a-819935f44dba src/prelude-option.c | 7 +++++-- 1 files changed, 5 insertions(+), 2 deletions(-) commit 3f17c6d29ad24b4f820dd2708be7053b8005a400 Author: Yoann Vandoorselaere Date: Thu Jun 30 17:24:29 2005 +0000 Fix prelude_log_v prototype. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@6697 09c5ec92-17d4-0310-903a-819935f44dba bindings/libprelude.i | 2 +- src/include/prelude-log.h | 10 ++++++++-- src/prelude-log.c | 4 ++-- 3 files changed, 11 insertions(+), 5 deletions(-) commit 3d0f3d699c1529d6f3fc917947b105bbc7d90b20 Author: Yoann Vandoorselaere Date: Wed Jun 29 12:03:32 2005 +0000 Sync slight renaming. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@6694 09c5ec92-17d4-0310-903a-819935f44dba src/include/prelude-async.h | 6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-) commit be3cdb5908f1ccb7c768e08b05fd69e3140fa632 Author: Yoann Vandoorselaere Date: Wed Jun 29 11:40:53 2005 +0000 No need to round or apply a modulo to usec (!). git-svn-id: file:///home/yoann/SVN/trunk/libprelude@6689 09c5ec92-17d4-0310-903a-819935f44dba src/idmef-time.c | 3 +-- 1 files changed, 1 insertions(+), 2 deletions(-) commit 61773d9d3b591099f40b11ec2014e2fad40d417f Author: Yoann Vandoorselaere Date: Wed Jun 29 11:40:02 2005 +0000 Improvide idmef-message-print time format. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@6688 09c5ec92-17d4-0310-903a-819935f44dba src/idmef-message-print.c | 19 +++++++++++-------- .../GenerateIDMEFMessagePrintC.pm | 19 +++++++++++-------- 2 files changed, 22 insertions(+), 16 deletions(-) commit 7e874b69915f476fe53fe8230342514328d3f1ec Author: Yoann Vandoorselaere Date: Sun Jun 26 23:27:10 2005 +0000 * prelude-async.c: - Use clock_gettime() + CLOCK_MONOTONIC if available and pthread_condattr_setclock() exist. This should avoid possible race with pthread_cond_timedwait() if the system time is modified, and make the system more predictable anyway. - In case CLOCK_MONOTONIC is not applicable, revert to CLOCK_REALTIME, or to gettimeofday() if clock_gettime() is not available at all. - Simplify timer elapsed time check. - Check the predicate even if the condition return ETIMEDOUT. Pthread documentation say the predicate might be true in that condition. - Calculate the sleep time when holding the condition mutex instead of doing it previously. Avoid possible race due to the wait time. * configure.in: - Remove assignment of CFLAGS within LDFLAGS due tu a typo. - Check for pthread_condattr_setclock(). - Check for clock_gettime() possibly within librt. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@6682 09c5ec92-17d4-0310-903a-819935f44dba configure.in | 19 +++++++- src/prelude-async.c | 141 +++++++++++++++++++++++++++++++++++++-------------- 2 files changed, 120 insertions(+), 40 deletions(-) commit 7aa402c5eb6947a8235e2128ddec383eccf59f44 Author: Yoann Vandoorselaere Date: Sun Jun 26 17:35:33 2005 +0000 Move libmissing inclusion at the top. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@6681 09c5ec92-17d4-0310-903a-819935f44dba src/idmef-criteria-string.lex.l | 4 +++- 1 files changed, 3 insertions(+), 1 deletions(-) commit 42b4c409b6afb2b09fca67531c3e04693c78ff4c Author: Yoann Vandoorselaere Date: Sun Jun 26 17:31:44 2005 +0000 Make sure HAVE_CONFIG_H stay defined. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@6680 09c5ec92-17d4-0310-903a-819935f44dba src/libprelude-error/Makefile.am | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) commit 14b1deb08a879a8e79d892ddbf256a65ee575377 Author: Yoann Vandoorselaere Date: Sun Jun 26 16:14:23 2005 +0000 Update GnuLib code. Add strcasecmp fallback. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@6679 09c5ec92-17d4-0310-903a-819935f44dba libmissing/Makefile.am | 22 ++++++++++----- libmissing/m4/gnulib.m4 | 7 +++-- libmissing/m4/strcase.m4 | 37 +++++++++++++++++++++++++ libmissing/mktime.c | 23 +++++++--------- libmissing/strcase.h | 47 ++++++++++++++++++++++++++++++++ libmissing/strcasecmp.c | 66 ++++++++++++++++++++++++++++++++++++++++++++++ libmissing/strncasecmp.c | 2 + src/include/libmissing.h | 1 + 8 files changed, 181 insertions(+), 24 deletions(-) commit 00a925df413c9496096ea344d1c62bc479aeb3d7 Author: Yoann Vandoorselaere Date: Sun Jun 26 16:13:17 2005 +0000 Use C99 __VA_ARGS__ instead of GNU extension. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@6678 09c5ec92-17d4-0310-903a-819935f44dba src/include/prelude-plugin.h | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) commit 098800f603b0f39b052faedfdd00b534b3834a81 Author: Yoann Vandoorselaere Date: Sun Jun 26 16:12:09 2005 +0000 Compile Python bindings with -DHAVE_CONFIG_H. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@6677 09c5ec92-17d4-0310-903a-819935f44dba bindings/python/setup.py.in | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) commit 98ea7903cf37191c381617d471fb93a1d769f596 Author: Yoann Vandoorselaere Date: Sun Jun 26 12:48:47 2005 +0000 Be more C89 friendly. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@6676 09c5ec92-17d4-0310-903a-819935f44dba src/idmef-message-print.c | 5 ++++- src/idmef-message-read.c | Bin 77652 -> 77688 bytes .../GenerateIDMEFMessagePrintC.pm | 5 ++++- .../GenerateIDMEFMessageReadC.pm | 4 ++-- 4 files changed, 10 insertions(+), 4 deletions(-) commit f6a7c84a4514effe05334ec08ad7f8819e59a6bf Author: Yoann Vandoorselaere Date: Sun Jun 26 12:22:54 2005 +0000 More C89 compliance where possible. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@6675 09c5ec92-17d4-0310-903a-819935f44dba src/include/prelude-log.h | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) commit 4aea5b94d44bf0102fcad75fd5763b3f9962dcf9 Author: Yoann Vandoorselaere Date: Sun Jun 26 12:22:19 2005 +0000 Include libmissing.h / config.h first. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@6674 09c5ec92-17d4-0310-903a-819935f44dba prelude-adduser/prelude-adduser.c | 4 +++- prelude-adduser/server.c | 5 ++++- 2 files changed, 7 insertions(+), 2 deletions(-) commit d25aab01e79976fe872ccd57518f99d3430c4f48 Author: Yoann Vandoorselaere Date: Sun Jun 26 12:21:35 2005 +0000 Include config.h if available. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@6673 09c5ec92-17d4-0310-903a-819935f44dba src/include/prelude-list.h | 4 ++++ src/libprelude-error/prelude-error.h.in | 4 ++++ 2 files changed, 8 insertions(+), 0 deletions(-) commit 2f8706ab6f641ab9a9b84e4970461b94a43d9b6d Author: Yoann Vandoorselaere Date: Sun Jun 26 12:20:16 2005 +0000 Include config.h / libmissing.h first. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@6672 09c5ec92-17d4-0310-903a-819935f44dba src/prelude-client-profile.c | 3 +++ src/prelude-client.c | 4 +++- src/prelude-option-wide.c | 4 +++- src/prelude-string.c | 4 +++- 4 files changed, 12 insertions(+), 3 deletions(-) commit 97a004534eb80873cf4b4c13c1acdd442a663a39 Author: Yoann Vandoorselaere Date: Sun Jun 26 12:19:14 2005 +0000 Fix typo. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@6671 09c5ec92-17d4-0310-903a-819935f44dba src/idmef-value-type.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) commit 26dfc2987de726acd614145e84c80ce4232b9696 Author: Yoann Vandoorselaere Date: Sun Jun 26 12:18:53 2005 +0000 Cleanup. Use typedef for function callback. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@6670 09c5ec92-17d4-0310-903a-819935f44dba src/include/prelude-option.h | 27 +++++++++++++-------------- src/prelude-option.c | 18 ++++++++++-------- 2 files changed, 23 insertions(+), 22 deletions(-) commit d43e9789a03894687485ddece1d86c9ea4862c44 Author: Yoann Vandoorselaere Date: Sun Jun 26 12:18:03 2005 +0000 More C89 compliance where possible. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@6669 09c5ec92-17d4-0310-903a-819935f44dba src/idmef-tree-wrap.c | 2 +- src/idmef-wrappers-gen/GenerateIDMEFTreeWrapC.pm | 2 +- src/idmef-wrappers-gen/idmef-tree.h | 10 +++++----- src/include/idmef-criterion-value.h | 2 +- src/include/idmef-tree-wrap.h | 8 ++++---- src/include/prelude-async.h | 2 +- src/include/prelude-client-profile.h | 1 + src/include/prelude-connection.h | 4 ++-- src/include/prelude-msg.h | 2 +- src/include/prelude-msgbuf.h | 2 +- 10 files changed, 18 insertions(+), 17 deletions(-) commit fdaa38864149c196f3c1a6d1a1289d3e6ad637a1 Author: Yoann Vandoorselaere Date: Sun Jun 19 09:43:32 2005 +0000 Thread safety work. Unlock the timer list mutex while the expiring timer callback is called, which allow the callback to use standard timer operation that will lock the timer list if needed. This fixes possible race condition in code depending on timer, and also should reduce contention on program depending a lot on timer. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@6659 09c5ec92-17d4-0310-903a-819935f44dba src/prelude-timer.c | 59 +++++++++++++++++++++++++++++++------------------- 1 files changed, 36 insertions(+), 23 deletions(-) commit 9045c9a21a9951b3e18d9d7e6fcd6cc487d09271 Author: Yoann Vandoorselaere Date: Sat Jun 18 12:10:34 2005 +0000 Update chown help. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@6658 09c5ec92-17d4-0310-903a-819935f44dba prelude-adduser/prelude-adduser.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) commit 997fd32d4755a524ced04aa35f3dfa4020fbf74f Author: Yoann Vandoorselaere Date: Sat Jun 18 12:08:41 2005 +0000 Add a "chown" command. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@6657 09c5ec92-17d4-0310-903a-819935f44dba prelude-adduser/prelude-adduser.c | 83 +++++++++++++++++++++++++++++++++---- 1 files changed, 74 insertions(+), 9 deletions(-) commit 1166eb3d7b8f44acddff0153befb69c81378e660 Author: Yoann Vandoorselaere Date: Sat Jun 18 10:25:19 2005 +0000 In case the template configuration file already exist chown() it to the possibly new UID/GID before returning. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@6656 09c5ec92-17d4-0310-903a-819935f44dba prelude-adduser/prelude-adduser.c | 6 ++++-- 1 files changed, 4 insertions(+), 2 deletions(-) commit c739a27133b33343c07d34331225db3099664136 Author: Yoann Vandoorselaere Date: Wed Jun 15 06:51:28 2005 +0000 Modify --uid and --gid so that they can lookup user/group name directly. When started on an existing profile, keep using the existing profile UID/GID. If we're going to change the profile privilege because --uid / --gid were specified, warn the user so that he know what he is doing. GCC4 shutup. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@6637 09c5ec92-17d4-0310-903a-819935f44dba prelude-adduser/prelude-adduser.c | 135 ++++++++++++++++++++++++++++++++---- 1 files changed, 120 insertions(+), 15 deletions(-) commit 0765d4348c2e3ece96e85424ba80d5cd3e57ddd6 Author: Yoann Vandoorselaere Date: Tue Jun 14 11:01:26 2005 +0000 Cleanup. GCC4 shut up. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@6635 09c5ec92-17d4-0310-903a-819935f44dba src/config-engine.c | 47 +++++++++++++++++++++-------------------------- 1 files changed, 21 insertions(+), 26 deletions(-) commit f7e9ca15035464a5c33fe448da654ac4d5694422 Author: Yoann Vandoorselaere Date: Mon Jun 13 15:45:45 2005 +0000 Remove un-needed mutex lock. Do the list deletion while we have the mutex locked in get_next_job() rather than calling prelude_async_del() afterwise. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@6632 09c5ec92-17d4-0310-903a-819935f44dba src/prelude-async.c | 8 +++----- 1 files changed, 3 insertions(+), 5 deletions(-) commit cf8aa6519731dc99a19240e38a1666b1ebefe897 Author: Yoann Vandoorselaere Date: Mon Jun 13 07:50:28 2005 +0000 Only flush the global failover when every connection are up. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@6630 09c5ec92-17d4-0310-903a-819935f44dba src/prelude-connection-pool.c | 6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-) commit 3346e9139eba088ffa7e5ddabc2d299bf8a6521c Author: Yoann Vandoorselaere Date: Fri Jun 10 13:05:13 2005 +0000 gcc4 shut-up git-svn-id: file:///home/yoann/SVN/trunk/libprelude@6545 09c5ec92-17d4-0310-903a-819935f44dba src/idmef-message-read.c | Bin 77642 -> 77652 bytes .../GenerateIDMEFMessageReadC.pm | 4 ++-- 2 files changed, 2 insertions(+), 2 deletions(-) commit 8e1cdfd5d05fd789cf58893ccecea3ad7c2a644d Author: Yoann Vandoorselaere Date: Fri Jun 10 13:02:25 2005 +0000 Missing includes. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@6544 09c5ec92-17d4-0310-903a-819935f44dba src/idmef-criteria-string.lex.l | 5 ++++- 1 files changed, 4 insertions(+), 1 deletions(-) commit 7f261ff9b75ae4d542c16b88db5ab2c9cce99341 Author: Yoann Vandoorselaere Date: Fri Jun 10 12:33:03 2005 +0000 gcc4 shut up. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@6540 09c5ec92-17d4-0310-903a-819935f44dba prelude-adduser/tls-register.c | 32 ++++++++++++++++---------------- 1 files changed, 16 insertions(+), 16 deletions(-) commit d2cd6d029b22683659889c0e6148b467b5fabf24 Author: Yoann Vandoorselaere Date: Fri Jun 10 12:32:40 2005 +0000 Make line unsigned. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@6539 09c5ec92-17d4-0310-903a-819935f44dba src/common.c | 2 +- src/include/common.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit 727a4f3b96979b3c5283347af6de308305d3af08 Author: Yoann Vandoorselaere Date: Fri Jun 10 11:03:48 2005 +0000 gcc4 shut up. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@6536 09c5ec92-17d4-0310-903a-819935f44dba src/config-engine.c | 9 +++++---- 1 files changed, 5 insertions(+), 4 deletions(-) commit 7ed4d0253edafe2a54eb76ff34200e2b13513eb5 Author: Yoann Vandoorselaere Date: Fri Jun 10 11:02:06 2005 +0000 gcc4 shut up. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@6535 09c5ec92-17d4-0310-903a-819935f44dba src/idmef-data.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) commit 3d1526b98fd6894e58f7886b16f33b32d12d0c27 Author: Yoann Vandoorselaere Date: Fri Jun 10 11:01:19 2005 +0000 Fix bogus macro. gcc4 shut-up. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@6534 09c5ec92-17d4-0310-903a-819935f44dba src/include/idmef-additional-data.h | 182 +++++++++++++++++----------------- 1 files changed, 91 insertions(+), 91 deletions(-) commit d79368ab7ee3b2d81dc7f0b70cb08920c3df027f Author: Yoann Vandoorselaere Date: Fri Jun 10 10:36:05 2005 +0000 gcc4 shut up. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@6533 09c5ec92-17d4-0310-903a-819935f44dba src/prelude-option.c | 5 +++-- 1 files changed, 3 insertions(+), 2 deletions(-) commit a320232c5a5f2f5d2c067eae851665f378558a1a Author: Yoann Vandoorselaere Date: Fri Jun 10 10:33:49 2005 +0000 gcc4 shut up. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@6532 09c5ec92-17d4-0310-903a-819935f44dba src/idmef-time.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) commit 3f01ba288dafd11e7ff8cd4024f7b79a911a591f Author: Yoann Vandoorselaere Date: Fri Jun 10 10:17:50 2005 +0000 gcc4 shut up. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@6531 09c5ec92-17d4-0310-903a-819935f44dba src/tls-util.c | 5 +++-- 1 files changed, 3 insertions(+), 2 deletions(-) commit 73d88611c7fbf5342f89373904d9f2c528bcf462 Author: Yoann Vandoorselaere Date: Wed Jun 8 19:12:42 2005 +0000 Fix a timer assertion in case we reconnected fine, but we failed flushing the failover pool. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@6529 09c5ec92-17d4-0310-903a-819935f44dba src/prelude-connection-pool.c | 7 +++---- 1 files changed, 3 insertions(+), 4 deletions(-) commit 6200b5643a9962dacc1d1803da5bc8aba91580d4 Author: Yoann Vandoorselaere Date: Tue Jun 7 15:03:53 2005 +0000 API documentation fix from Christian Altmeier . git-svn-id: file:///home/yoann/SVN/trunk/libprelude@6527 09c5ec92-17d4-0310-903a-819935f44dba docs/api/tmpl/idmef-path.sgml | 10 +++++----- 1 files changed, 5 insertions(+), 5 deletions(-) commit e69d8ace7ccf222cb2cb9628983a254cd4fc25ed Author: Yoann Vandoorselaere Date: Mon Jun 6 15:29:05 2005 +0000 More config_set() fixes. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@6522 09c5ec92-17d4-0310-903a-819935f44dba src/config-engine.c | 45 ++++++++++++++++++++++++++++++--------------- 1 files changed, 30 insertions(+), 15 deletions(-) commit 2e84732768d7f067780df781fe9931b13374e751 Author: Yoann Vandoorselaere Date: Mon Jun 6 14:47:40 2005 +0000 Make sure prelude_string_destroy_internal() reset size and index to 0. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@6521 09c5ec92-17d4-0310-903a-819935f44dba src/prelude-string.c | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) commit bb92c53ff274c51a2350ade869ea902bed44c920 Author: Yoann Vandoorselaere Date: Mon Jun 6 14:17:46 2005 +0000 More fixes. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@6520 09c5ec92-17d4-0310-903a-819935f44dba src/config-engine.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) commit a2099b1c9cf849ad20382edc81c4f9ecb2fd43c2 Author: Yoann Vandoorselaere Date: Mon Jun 6 12:44:40 2005 +0000 Stop trying to be clever about how to insert newline. It's not our job, really. Up to the user. Make config_set() work again. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@6519 09c5ec92-17d4-0310-903a-819935f44dba src/config-engine.c | 39 ++++++++------------------------------- 1 files changed, 8 insertions(+), 31 deletions(-) commit e0e053aeefc8bf9b1c2b15c0f2a219e722555f78 Author: Yoann Vandoorselaere Date: Fri Jun 3 08:23:12 2005 +0000 Update GnuLIB code. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@6511 09c5ec92-17d4-0310-903a-819935f44dba libmissing/Makefile.am | 14 +++++++------- libmissing/m4/gnulib.m4 | 4 ++-- libmissing/pathmax.h | 11 +++-------- 3 files changed, 12 insertions(+), 17 deletions(-) commit fdcd6c694620affc2ecb3d218dd3c7fc272dcba2 Author: Yoann Vandoorselaere Date: Thu Jun 2 13:57:11 2005 +0000 Update documentation. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@6506 09c5ec92-17d4-0310-903a-819935f44dba docs/api/libprelude-decl.txt | 24 ++++++++++++++++-------- docs/api/tmpl/idmef-criterion-value.sgml | 1 + 2 files changed, 17 insertions(+), 8 deletions(-) commit 22d2969ee70593bb8fe96e97afd461baee81d0a6 Author: Yoann Vandoorselaere Date: Thu Jun 2 11:37:25 2005 +0000 Include Prelude.pm in the distribution. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@6504 09c5ec92-17d4-0310-903a-819935f44dba bindings/Makefile.am | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) commit a5371b207790797a4dea23bfa9b8e708bec96830 Author: Yoann Vandoorselaere Date: Thu Jun 2 11:37:03 2005 +0000 Fix distcheck on platform using lib64. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@6503 09c5ec92-17d4-0310-903a-819935f44dba bindings/python/setup.py.in | 9 ++++++--- 1 files changed, 6 insertions(+), 3 deletions(-) commit 6336bea02febdb64f169855bbb5805b368282ec9 Author: Yoann Vandoorselaere Date: Thu Jun 2 10:14:36 2005 +0000 Fix some 64-bit warnings. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@6501 09c5ec92-17d4-0310-903a-819935f44dba prelude-adduser/prelude-adduser.c | 9 +++++++-- prelude-adduser/server.c | 10 +++++++--- src/prelude-io.c | 11 +++++++---- src/tls-auth.c | 18 ++++++++++++++++-- 4 files changed, 37 insertions(+), 11 deletions(-) commit f064e8e49ce7782908c4fe793a610db2e1e6c76c Author: Yoann Vandoorselaere Date: Thu Jun 2 08:14:46 2005 +0000 Introduce matching of broken down time criterion value. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@6500 09c5ec92-17d4-0310-903a-819935f44dba src/idmef-criterion-value.c | 305 +++++++++++++++++++++++++++++++++++ src/include/idmef-criterion-value.h | 9 +- 2 files changed, 311 insertions(+), 3 deletions(-) commit 1e620dee96beac57d028e0906b80121e34ad6e6d Author: Yoann Vandoorselaere Date: Wed Jun 1 18:05:20 2005 +0000 Plug leak. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@6497 09c5ec92-17d4-0310-903a-819935f44dba src/config-engine.c | 9 ++++++--- 1 files changed, 6 insertions(+), 3 deletions(-) commit ef2dad8c5ed4dc3f56ed4519e217605d133d8155 Author: Yoann Vandoorselaere Date: Sat May 28 17:28:16 2005 +0000 Update NEWS, bump version number. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@6469 09c5ec92-17d4-0310-903a-819935f44dba NEWS | 7 +++++++ configure.in | 2 +- 2 files changed, 8 insertions(+), 1 deletions(-) commit 6de312bfc8398b4f5dccec6b83cddcb0e1110208 Author: Yoann Vandoorselaere Date: Fri May 27 07:18:22 2005 +0000 Update gnulib code. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@6465 09c5ec92-17d4-0310-903a-819935f44dba libmissing/m4/extensions.m4 | 4 ++++ 1 files changed, 4 insertions(+), 0 deletions(-) commit 6b66d87fa7480b837bc9ead5cb67b0846caea7bc Author: Yoann Vandoorselaere Date: Fri May 27 07:18:08 2005 +0000 Fix last line insertion. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@6464 09c5ec92-17d4-0310-903a-819935f44dba src/config-engine.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) commit 6477f541beda1bae3c274c86a92c12fbffcfff54 Author: Yoann Vandoorselaere Date: Fri May 27 06:54:26 2005 +0000 Handle "" as default. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@6463 09c5ec92-17d4-0310-903a-819935f44dba src/config-engine.c | 8 ++++++-- 1 files changed, 6 insertions(+), 2 deletions(-) commit bf59bfd923db7e83bd66f7a5da7753f57303f86c Author: Yoann Vandoorselaere Date: Fri May 27 06:37:42 2005 +0000 Fix parsing of unquoted value. Always read last line even if not \n terminated. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@6462 09c5ec92-17d4-0310-903a-819935f44dba src/config-engine.c | 49 ++++++++++++++++++++++++++++--------------------- 1 files changed, 28 insertions(+), 21 deletions(-) commit d3f4c8288faa8a29e2be3f746c67691c622275ba Author: Yoann Vandoorselaere Date: Fri May 27 05:15:53 2005 +0000 Handle optional field in PRELUDE_PLUGIN_OPTION_DECLARE_STRING_CB. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@6461 09c5ec92-17d4-0310-903a-819935f44dba src/include/prelude-plugin.h | 10 ++++++---- 1 files changed, 6 insertions(+), 4 deletions(-) commit 03e570c2e7832400b3b982d567c2e8006c97149e Author: Yoann Vandoorselaere Date: Thu May 26 13:00:21 2005 +0000 evert to using PF_UNSPEC for connection. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@6453 09c5ec92-17d4-0310-903a-819935f44dba prelude-adduser/prelude-adduser.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) commit 449b3739a10a35587831480e2525b353e2e8952f Author: Yoann Vandoorselaere Date: Thu May 26 12:19:26 2005 +0000 Bump version number, update NEWS/documentation. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@6450 09c5ec92-17d4-0310-903a-819935f44dba NEWS | 14 ++++++++++++++ configure.in | 2 +- docs/api/libprelude-decl.txt | 20 ++++++++++---------- 3 files changed, 25 insertions(+), 11 deletions(-) commit 8cc22ad14f717d0a77ebe23b8c8708d7d83673bc Author: Yoann Vandoorselaere Date: Thu May 26 12:04:18 2005 +0000 Update GnuLIB code. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@6449 09c5ec92-17d4-0310-903a-819935f44dba libmissing/m4/gnulib.m4 | 1 + libmissing/m4/minmax.m4 | 38 ++++++++++++++++++++++++++++++++++++++ libmissing/minmax.h | 13 ++++++++++--- 3 files changed, 49 insertions(+), 3 deletions(-) commit 0ff03257204006a3ed93dfcd112b4e97ecce9e28 Author: Yoann Vandoorselaere Date: Thu May 26 12:03:27 2005 +0000 Kill warning. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@6448 09c5ec92-17d4-0310-903a-819935f44dba src/idmef-criteria-string.lex.l | 1 + 1 files changed, 1 insertions(+), 0 deletions(-) commit 3a15b0ac342036ab901e53a390273ac493e6a5e4 Author: Yoann Vandoorselaere Date: Thu May 26 10:17:33 2005 +0000 Cleanup, fix more potential problem on set(). git-svn-id: file:///home/yoann/SVN/trunk/libprelude@6447 09c5ec92-17d4-0310-903a-819935f44dba src/config-engine.c | 175 ++++++++++++++++++++++++++------------------------ 1 files changed, 91 insertions(+), 84 deletions(-) commit 6b3a9472c7cc84c31be98302168a76a799e6f5ae Author: Yoann Vandoorselaere Date: Thu May 26 10:16:31 2005 +0000 More careful error checking. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@6446 09c5ec92-17d4-0310-903a-819935f44dba src/prelude-option-wide.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) commit 463a0abe040f6b54ff4428b8be9728921c5a073b Author: Yoann Vandoorselaere Date: Wed May 25 08:36:27 2005 +0000 Optional argument for IDMEF stuff. Enforce destroying the IDMEF value in case we get a NULL argument. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@6437 09c5ec92-17d4-0310-903a-819935f44dba src/prelude-client.c | 89 ++++++++++++++++++++++++------------------------- 1 files changed, 44 insertions(+), 45 deletions(-) commit fee051b694ce9e4056ab34a4e81e377ff20de675 Author: Yoann Vandoorselaere Date: Wed May 25 08:33:05 2005 +0000 Only enforce the value to be NULL instead of '\0' when the option argument is optional. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@6436 09c5ec92-17d4-0310-903a-819935f44dba src/prelude-option.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) commit 55f572e7b91f1d643ec1a00c3e07dcf29a54ca39 Author: Sebastien Tricaud Date: Wed May 25 08:16:05 2005 +0000 gtkdoc stuff git-svn-id: file:///home/yoann/SVN/trunk/libprelude@6435 09c5ec92-17d4-0310-903a-819935f44dba src/config-engine.c | 5 ++++- 1 files changed, 4 insertions(+), 1 deletions(-) commit 2a0d2206ff5b19c4e6b678cbfbf8983ad6f945b6 Author: Yoann Vandoorselaere Date: Wed May 25 00:34:04 2005 +0000 Untabify. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@6434 09c5ec92-17d4-0310-903a-819935f44dba src/idmef-tree-wrap.c | 40 +++++++++++----------- src/idmef-wrappers-gen/GenerateIDMEFTreeWrapC.pm | 10 +++--- 2 files changed, 25 insertions(+), 25 deletions(-) commit 72ab0530baf5ebb15cd126f64f4ff5d6257efab1 Author: Yoann Vandoorselaere Date: Wed May 25 00:33:33 2005 +0000 Allow resetting statically embedded IDMEF structure to NULL, as we does for referenced structure. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@6433 09c5ec92-17d4-0310-903a-819935f44dba src/idmef-tree-wrap.c | 120 ++++++++++++++------- src/idmef-wrappers-gen/GenerateIDMEFTreeWrapC.pm | 6 +- 2 files changed, 84 insertions(+), 42 deletions(-) commit fcf15fabbb7c0a4f39c680c8a5fc47cb026f20e7 Author: Yoann Vandoorselaere Date: Wed May 25 00:26:38 2005 +0000 Fix invalid merge of prelude_string_t flags when sharing a string referenced by another prelude_string_t object. This was leading to a loss of the PRELUDE_STRING_OWN_STRUCTURE flags, and this to a possible memory leak. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@6432 09c5ec92-17d4-0310-903a-819935f44dba src/prelude-string.c | 3 +-- 1 files changed, 1 insertions(+), 2 deletions(-) commit bf5aae6f66acb643557025fc40bdc6a6ac65595e Author: Yoann Vandoorselaere Date: Tue May 24 17:18:42 2005 +0000 Factorise code. Cleanup. Fix warning. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@6430 09c5ec92-17d4-0310-903a-819935f44dba src/config-engine.c | 160 ++++++++++++++++----------------------------------- 1 files changed, 50 insertions(+), 110 deletions(-) commit 43828b50fd70653b167c3ad9196eaf72ee592b20 Author: Yoann Vandoorselaere Date: Tue May 24 10:39:53 2005 +0000 Correct the way criteria value are escaped, thanks to Frédéric Motte and Sebastien Tricaud git-svn-id: file:///home/yoann/SVN/trunk/libprelude@6429 09c5ec92-17d4-0310-903a-819935f44dba src/idmef-criteria-string.lex.l | 28 +++++++++++++++++++++++++--- 1 files changed, 25 insertions(+), 3 deletions(-) commit e4048b10109c69371f1bc67ea5cdde9ba991977f Author: Yoann Vandoorselaere Date: Tue May 24 07:29:35 2005 +0000 Another flex workaround, since the previous one seem to have created problem. Don't rely on config.h at all. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@6428 09c5ec92-17d4-0310-903a-819935f44dba src/Makefile.am | 6 ------ src/idmef-criteria-string.lex.l | 26 +++++++++++++++++++++++--- 2 files changed, 23 insertions(+), 9 deletions(-) commit e25392f2d9292a7656ce29f8ee734f785e6f6bf0 Author: Yoann Vandoorselaere Date: Mon May 23 11:50:27 2005 +0000 Make some public function const. Untabify. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@6427 09c5ec92-17d4-0310-903a-819935f44dba src/idmef-value.c | 112 ++++++++++++++++++++++---------------------- src/include/idmef-value.h | 18 ++++---- 2 files changed, 65 insertions(+), 65 deletions(-) commit eb9081b017d6e5946b2a3c20ef3341b256411f04 Author: Yoann Vandoorselaere Date: Mon May 23 11:35:28 2005 +0000 Cleanup, fix memleak. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@6426 09c5ec92-17d4-0310-903a-819935f44dba src/prelude-option-wide.c | 50 ++++++++++++++++++++++++++++++-------------- 1 files changed, 34 insertions(+), 16 deletions(-) commit 153bf86054e99d86e79d4c7016aa72256edb5eb9 Author: Yoann Vandoorselaere Date: Mon May 23 09:55:08 2005 +0000 Fix option memory leak. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@6424 09c5ec92-17d4-0310-903a-819935f44dba src/prelude-option.c | 16 ++++++++++------ 1 files changed, 10 insertions(+), 6 deletions(-) commit 0ab6ac6d11f82cf3bbb74074e58ce3c8ba39a0e0 Author: Yoann Vandoorselaere Date: Fri May 20 15:45:23 2005 +0000 Fix FTW module. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@6422 09c5ec92-17d4-0310-903a-819935f44dba libmissing/ftw.c | 14 +------------- 1 files changed, 1 insertions(+), 13 deletions(-) commit e95bdbec8cb66cac7f6ab7c6c11f524868200994 Author: Yoann Vandoorselaere Date: Thu May 19 10:36:55 2005 +0000 Bump version number, update doc & NEWS. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@6417 09c5ec92-17d4-0310-903a-819935f44dba NEWS | 32 ++++++++++++++++++++++++++++++++ configure.in | 2 +- docs/api/libprelude-decl.txt | 26 +++++++++++++++++++++++--- 3 files changed, 56 insertions(+), 4 deletions(-) commit 873e2b3a39beb5c317dabab016b42ef02287df8d Author: Yoann Vandoorselaere Date: Thu May 19 10:20:54 2005 +0000 Improve error checking. Better security. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@6416 09c5ec92-17d4-0310-903a-819935f44dba src/config-engine.c | 29 ++++++++++++++++++----------- 1 files changed, 18 insertions(+), 11 deletions(-) commit 42a0daa7ce98ebb5e16ff7894a2b69b94609100a Author: Yoann Vandoorselaere Date: Thu May 19 10:19:23 2005 +0000 - If error buffer is empty, try to fill it from the option return value. - Enforce longopt on PRELUDE_OPTION_TYPE_WIDE. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@6415 09c5ec92-17d4-0310-903a-819935f44dba src/prelude-option.c | 12 ++++++++++-- 1 files changed, 10 insertions(+), 2 deletions(-) commit d75c7acaa404f51ddafe9d9c84615eff9d490594 Author: Yoann Vandoorselaere Date: Thu May 19 09:25:47 2005 +0000 FTS module has several portability problem, and some of it's dependency got issues too. Revert to FTW for now. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@6414 09c5ec92-17d4-0310-903a-819935f44dba libmissing/Makefile.am | 22 +- libmissing/cycle-check.c | 93 --- libmissing/cycle-check.h | 44 -- libmissing/dev-ino.h | 13 - libmissing/dirfd.c | 30 - libmissing/dirfd.h | 46 -- libmissing/dup-safer.c | 50 -- libmissing/error.c | 304 -------- libmissing/error.h | 66 -- libmissing/exit.h | 32 - libmissing/exitfail.c | 27 - libmissing/exitfail.h | 20 - libmissing/fd-safer.c | 61 -- libmissing/fts.c | 1441 ------------------------------------- libmissing/fts_.h | 182 ----- libmissing/ftw.c | 125 ++++ libmissing/ftw_.h | 36 + libmissing/hash.c | 1050 --------------------------- libmissing/hash.h | 88 --- libmissing/intprops.h | 65 -- libmissing/lstat.c | 23 - libmissing/m4/dirfd.m4 | 89 --- libmissing/m4/error.m4 | 22 - libmissing/m4/exitfail.m4 | 14 - libmissing/m4/fts.m4 | 36 - libmissing/m4/ftw.m4 | 14 + libmissing/m4/gnulib.m4 | 16 +- libmissing/m4/hash.m4 | 14 - libmissing/m4/lstat.m4 | 24 - libmissing/m4/pathmax.m4 | 13 + libmissing/m4/stat-macros.m4 | 14 - libmissing/m4/stat.m4 | 32 - libmissing/m4/strerror_r.m4 | 49 -- libmissing/m4/unistd-safer.m4 | 25 - libmissing/m4/xalloc.m4 | 25 - libmissing/pathmax.h | 54 ++ libmissing/stat-macros.h | 255 ------- libmissing/stat.c | 111 --- libmissing/unistd-safer.h | 22 - libmissing/xalloc-die.c | 45 -- libmissing/xalloc.h | 79 -- libmissing/xmalloc.c | 229 ------ prelude-adduser/prelude-adduser.c | 85 ++- src/include/libmissing.h | 10 +- 44 files changed, 316 insertions(+), 4779 deletions(-) commit 01f232a640d0b05fe770c852bfb30bbb2f7dd996 Author: Yoann Vandoorselaere Date: Wed May 18 19:09:23 2005 +0000 Check default family for both register/registration-server and only if input address is missing. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@6412 09c5ec92-17d4-0310-903a-819935f44dba prelude-adduser/prelude-adduser.c | 2 +- prelude-adduser/server.c | 4 ++-- prelude-adduser/server.h | 2 ++ 3 files changed, 5 insertions(+), 3 deletions(-) commit a01881bdd81b68a088dfdfed90a96ec7e43a2e0c Author: Yoann Vandoorselaere Date: Wed May 18 18:53:21 2005 +0000 Fix distcheck. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@6411 09c5ec92-17d4-0310-903a-819935f44dba libmissing/m4/fts.m4 | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) commit 8529e14fae65a5594549867be8583568810a1ddd Author: Yoann Vandoorselaere Date: Wed May 18 17:02:07 2005 +0000 More check for duplicate options, include long and short opt. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@6409 09c5ec92-17d4-0310-903a-819935f44dba src/prelude-option.c | 25 ++++++++++++++++++------- 1 files changed, 18 insertions(+), 7 deletions(-) commit 797d950f3690899de88d8f98e22eea22d4a049fd Author: Yoann Vandoorselaere Date: Wed May 18 17:01:20 2005 +0000 Quick hack so that generated lex file include config.h from the top. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@6408 09c5ec92-17d4-0310-903a-819935f44dba src/Makefile.am | 6 ++++++ 1 files changed, 6 insertions(+), 0 deletions(-) commit 6ab263c9070bc4b1f4ca5024c56d87913d6670d0 Author: Yoann Vandoorselaere Date: Wed May 18 16:06:26 2005 +0000 Modify header file that include public system header so that they check whether HAVE_CONFIG_H is defined, and include config.h if it is. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@6403 09c5ec92-17d4-0310-903a-819935f44dba src/include/common.h | 4 ++++ src/include/idmef-path.h | 4 ++++ src/include/idmef-time.h | 4 ++++ src/include/idmef.h | 6 +++++- src/include/prelude-client-profile.h | 4 ++++ src/include/prelude-extract.h | 4 ++++ src/include/prelude-inttypes.h.in | 3 +++ src/include/prelude-io.h | 4 ++++ src/include/prelude-log.h | 5 ++++- src/include/prelude-string.h | 4 ++++ 10 files changed, 40 insertions(+), 2 deletions(-) commit 71880464e6c003d31a82601ca46361ef5c5d1292 Author: Yoann Vandoorselaere Date: Wed May 18 15:15:16 2005 +0000 hash mark always on first column. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@6401 09c5ec92-17d4-0310-903a-819935f44dba src/daemonize.c | 2 +- src/include/prelude-extract.h | 4 ++-- src/include/prelude-inttypes.h.in | 27 ++++++++++++++------------- src/prelude-io.c | 4 ++-- src/prelude-timer.c | 4 ++-- 5 files changed, 21 insertions(+), 20 deletions(-) commit 981fbe168f7fd2cbf8cd14dbc226c5d42de03f81 Author: Yoann Vandoorselaere Date: Wed May 18 10:21:37 2005 +0000 More detailed error message. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@6400 09c5ec92-17d4-0310-903a-819935f44dba prelude-adduser/prelude-adduser.c | 6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-) commit d637f47a9d5b150f4df0d5134145275aac49136c Author: Yoann Vandoorselaere Date: Tue May 17 19:23:40 2005 +0000 Some more code that should help in finding the default address family on ipv6 enabled box. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@6398 09c5ec92-17d4-0310-903a-819935f44dba prelude-adduser/server.c | 105 ++++++++++++++++++++++++++++++---------- prelude-adduser/tls-register.c | 5 +- 2 files changed, 82 insertions(+), 28 deletions(-) commit 474ee3cc40116c584e73fe61789b4eb525727556 Author: Yoann Vandoorselaere Date: Tue May 17 13:44:39 2005 +0000 Include missing fts dependencie. xmalloc-die. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@6396 09c5ec92-17d4-0310-903a-819935f44dba libmissing/Makefile.am | 16 ++- libmissing/error.c | 304 +++++++++++++++++++++++++++++++++++++++++++ libmissing/error.h | 66 ++++++++++ libmissing/exit.h | 32 +++++ libmissing/exitfail.c | 27 ++++ libmissing/exitfail.h | 20 +++ libmissing/m4/error.m4 | 22 +++ libmissing/m4/exitfail.m4 | 14 ++ libmissing/m4/gnulib.m4 | 6 +- libmissing/m4/strerror_r.m4 | 49 +++++++ libmissing/xalloc-die.c | 45 +++++++ 11 files changed, 597 insertions(+), 4 deletions(-) commit db40cdfa370eea9be133012117601b0ddea0c280 Author: Yoann Vandoorselaere Date: Tue May 17 13:39:25 2005 +0000 Fix off by one. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@6395 09c5ec92-17d4-0310-903a-819935f44dba src/idmef-value-type.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) commit 1bb832c7536dd493c21b490ce23cf587c2d91952 Author: Yoann Vandoorselaere Date: Tue May 17 10:07:33 2005 +0000 Update GnuLib code. Include FTS module and dependencies. This fix #77. Thanks to Henry Culcon for his work on the GnuLib FTS module. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@6394 09c5ec92-17d4-0310-903a-819935f44dba libmissing/Makefile.am | 16 +- libmissing/alloca.c | 491 +++++++++++++ libmissing/alloca.h | 52 -- libmissing/alloca_.h | 8 +- libmissing/asnprintf.c | 10 +- libmissing/cycle-check.c | 93 +++ libmissing/cycle-check.h | 44 ++ libmissing/dev-ino.h | 13 + libmissing/dirfd.c | 30 + libmissing/dirfd.h | 46 ++ libmissing/dup-safer.c | 50 ++ libmissing/fd-safer.c | 61 ++ libmissing/fts.c | 1441 +++++++++++++++++++++++++++++++++++++ libmissing/fts_.h | 182 +++++ libmissing/gai_strerror.c | 10 +- libmissing/getaddrinfo.c | 10 +- libmissing/getaddrinfo.h | 10 +- libmissing/gettext.h | 10 +- libmissing/hash.c | 1050 +++++++++++++++++++++++++++ libmissing/hash.h | 88 +++ libmissing/inet_ntop.h | 10 +- libmissing/intprops.h | 65 ++ libmissing/lstat.c | 23 + libmissing/m4/dirfd.m4 | 89 +++ libmissing/m4/fts.m4 | 36 + libmissing/m4/gnulib.m4 | 16 +- libmissing/m4/hash.m4 | 14 + libmissing/m4/lstat.m4 | 24 + libmissing/m4/stat-macros.m4 | 14 + libmissing/m4/stat.m4 | 32 + libmissing/m4/unistd-safer.m4 | 25 + libmissing/m4/xalloc.m4 | 25 + libmissing/minmax.h | 10 +- libmissing/mktime.c | 10 +- libmissing/printf-args.c | 10 +- libmissing/printf-args.h | 10 +- libmissing/printf-parse.c | 10 +- libmissing/printf-parse.h | 10 +- libmissing/regex.c | 10 +- libmissing/regex.h | 12 +- libmissing/snprintf.c | 10 +- libmissing/snprintf.h | 10 +- libmissing/stat-macros.h | 255 +++++++ libmissing/stat.c | 111 +++ libmissing/stdbool_.h | 10 +- libmissing/strdup.c | 10 +- libmissing/strdup.h | 10 +- libmissing/strndup.c | 10 +- libmissing/strndup.h | 10 +- libmissing/strnlen.c | 10 +- libmissing/strpbrk.c | 10 +- libmissing/strpbrk.h | 10 +- libmissing/strsep.c | 33 +- libmissing/strsep.h | 33 +- libmissing/time_r.c | 10 +- libmissing/time_r.h | 10 +- libmissing/timegm.c | 10 +- libmissing/timegm.h | 10 +- libmissing/unistd-safer.h | 22 + libmissing/vasnprintf.c | 10 +- libmissing/vasnprintf.h | 10 +- libmissing/vsnprintf.c | 10 +- libmissing/vsnprintf.h | 10 +- libmissing/xalloc.h | 79 ++ libmissing/xmalloc.c | 229 ++++++ libmissing/xsize.h | 10 +- prelude-adduser/prelude-adduser.c | 1 - src/include/libmissing.h | 16 +- 68 files changed, 4874 insertions(+), 265 deletions(-) commit 7d4b3c5572fe994ac66a24741b2e462a203380a0 Author: Yoann Vandoorselaere Date: Wed May 11 23:14:55 2005 +0000 Include stdio and unistd header. Fix broken compilation on MacOSX, and make the header self sufficient. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@6354 09c5ec92-17d4-0310-903a-819935f44dba src/include/prelude-io.h | 4 +++- 1 files changed, 3 insertions(+), 1 deletions(-) commit 5a28cbca5cbc482d92ee50ead17840cd25f97af3 Author: Yoann Vandoorselaere Date: Tue May 10 17:27:56 2005 +0000 Remove debug spew. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@6342 09c5ec92-17d4-0310-903a-819935f44dba src/prelude-client.c | 6 +----- 1 files changed, 1 insertions(+), 5 deletions(-) commit 8a823ce249005b08fe9f55b5891cd27c6f494d5e Author: Yoann Vandoorselaere Date: Tue May 10 17:15:55 2005 +0000 Update gnulib getaddrinfo code. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@6341 09c5ec92-17d4-0310-903a-819935f44dba libmissing/getaddrinfo.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) commit 58550ef73c05be634138adb533c903a49c5e0a3e Author: Yoann Vandoorselaere Date: Tue May 10 17:14:34 2005 +0000 Be more descriptive about configuration file error. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@6340 09c5ec92-17d4-0310-903a-819935f44dba src/libprelude-error/err-sources.h.in | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) commit 708aea64d07c4ed3dc41c44d4284623be975e153 Author: Yoann Vandoorselaere Date: Tue May 10 17:13:59 2005 +0000 Move configuration template generation to prelude-adduser. Make more sense, and is more intuitive. Simplify code too. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@6339 09c5ec92-17d4-0310-903a-819935f44dba prelude-adduser/prelude-adduser.c | 49 ++++++++++++++++ src/prelude-client.c | 115 ++++++++++++------------------------- 2 files changed, 86 insertions(+), 78 deletions(-) commit 3c4c3ed957c9c0d57bab916e7cf19634e67b1a56 Author: Yoann Vandoorselaere Date: Tue May 10 16:24:26 2005 +0000 Set profile uid/gid as soon as _prelude_client_profile_new() is called. We might get a profile error even before prelude_client_profile_init() is called, so this is needed to get a decent 'prelude-adduser config message'. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@6337 09c5ec92-17d4-0310-903a-819935f44dba src/prelude-client-profile.c | 14 +++++++------- 1 files changed, 7 insertions(+), 7 deletions(-) commit 60cfca30be68436f8578bf75293e3cb875a22b49 Author: Yoann Vandoorselaere Date: Tue May 10 15:24:42 2005 +0000 New feature, provide the ability to get the debug level through a LIBPRELUDE_DEBUG environment variable. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@6336 09c5ec92-17d4-0310-903a-819935f44dba src/prelude.c | 12 ++++++++++-- 1 files changed, 10 insertions(+), 2 deletions(-) commit 72e2bbe5f97603cc9e79f72b9ee91048d68b7c80 Author: Yoann Vandoorselaere Date: Tue May 10 09:14:25 2005 +0000 Kill warning. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@6335 09c5ec92-17d4-0310-903a-819935f44dba src/idmef-time.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) commit ba1cd13a06bb821708cb903c1ec6a606b11c31c3 Author: Yoann Vandoorselaere Date: Tue May 10 09:12:20 2005 +0000 Update GnuLib code. Include timegm module. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@6334 09c5ec92-17d4-0310-903a-819935f44dba libmissing/Makefile.am | 29 +- libmissing/allocsa.c | 139 --------- libmissing/allocsa.h | 113 -------- libmissing/allocsa.valgrind | 7 - libmissing/inet_ntop.c | 23 ++- libmissing/inet_ntop.h | 32 ++- libmissing/m4/allocsa.m4 | 15 - libmissing/m4/eealloc.m4 | 32 -- libmissing/m4/extensions.m4 | 26 ++ libmissing/m4/gettext.m4 | 8 +- libmissing/m4/gnulib.m4 | 11 +- libmissing/m4/inet_ntop.m4 | 11 +- libmissing/m4/mktime.m4 | 200 +++++++++++++ libmissing/m4/setenv.m4 | 70 ----- libmissing/m4/time_r.m4 | 38 +++ libmissing/m4/timegm.m4 | 37 +++ libmissing/mktime.c | 668 +++++++++++++++++++++++++++++++++++++++++++ libmissing/regex.c | 3 + libmissing/setenv.c | 328 --------------------- libmissing/setenv.h | 54 ---- libmissing/time_r.c | 69 +++++ libmissing/time_r.h | 46 +++ libmissing/timegm.c | 43 +++ libmissing/timegm.h | 23 ++ libmissing/unsetenv.c | 99 ------- src/include/libmissing.h | 6 +- 26 files changed, 1235 insertions(+), 895 deletions(-) commit ee801182d9e87d46b8fcbae2e800ceca97b8c66b Author: Yoann Vandoorselaere Date: Tue May 10 09:11:56 2005 +0000 Use timegm() for GMT offset calculation. timegm() will be included from GnuLib if not available. Implement prelude_get_gmt_offset_from_time() and prelude_get_gmt_offset_from_tm(). Make idmef_time_set_from_timeval() and idmef_time_set_from_time() use prelude_get_gmt_offset_from_time() instead of prelude_get_gmt_offset(), so that creating an idmef_time_t object from a time that is not "now", will use the correct GMT offset. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@6333 09c5ec92-17d4-0310-903a-819935f44dba src/common.c | 56 +++++++++++++++++++++++++++++++------------------ src/idmef-time.c | 4 +- src/include/common.h | 4 +++ 3 files changed, 41 insertions(+), 23 deletions(-) commit f3e97c527acf079d06386258e1e9b6d27728f39b Author: Yoann Vandoorselaere Date: Tue May 10 08:14:13 2005 +0000 Include stdlib.h git-svn-id: file:///home/yoann/SVN/trunk/libprelude@6332 09c5ec92-17d4-0310-903a-819935f44dba src/idmef-value-type.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) commit c238a8e2319219fb0f5a2d9552506aa9947b077c Author: Yoann Vandoorselaere Date: Mon May 9 23:42:12 2005 +0000 Use AI_ADDRCONFIG when the system define it. This fix connection issue when resolving a host that have both ipv4 and ipv6 address but our node doesn't have one of these. Many thanks to Henry Culver for his help and testing on this issue. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@6331 09c5ec92-17d4-0310-903a-819935f44dba prelude-adduser/prelude-adduser.c | 8 ++++++-- prelude-adduser/server.c | 5 ++--- src/prelude-connection.c | 6 +++++- 3 files changed, 13 insertions(+), 6 deletions(-) commit 7f29235c7307e55e97e1ee2cb54adbace1642cf1 Author: Yoann Vandoorselaere Date: Mon May 9 08:39:02 2005 +0000 Avoid potential portability problem. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@6328 09c5ec92-17d4-0310-903a-819935f44dba src/tls-util.c | 7 ++++--- 1 files changed, 4 insertions(+), 3 deletions(-) commit 1e8a72cda7028f35dc9ede47abe21887698c47b7 Author: Yoann Vandoorselaere Date: Mon May 9 08:29:14 2005 +0000 Avoid not portable %hh convertion specifier. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@6327 09c5ec92-17d4-0310-903a-819935f44dba src/idmef-value-type.c | 62 +++++++++++++++++++++++++++++++++++++++++------- 1 files changed, 53 insertions(+), 9 deletions(-) commit b36e3a2704b6dd722e85170529250ec4bfc54b07 Author: Yoann Vandoorselaere Date: Sun May 8 21:09:03 2005 +0000 Avoid not portable %hh convertion specifier. Make idmef-message-print print GMT offset. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@6324 09c5ec92-17d4-0310-903a-819935f44dba src/idmef-data.c | 5 ++++- src/idmef-message-print.c | 11 +++++++++-- .../GenerateIDMEFMessagePrintC.pm | 11 +++++++++-- 3 files changed, 22 insertions(+), 5 deletions(-) commit e4925b85af54cc1ef46c3370fb2249f924ac9969 Author: Yoann Vandoorselaere Date: Sat May 7 14:12:55 2005 +0000 Check that connection string is not NULL. Needed since last connection-pool change. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@6318 09c5ec92-17d4-0310-903a-819935f44dba src/prelude-client.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) commit d655dd1dafac713f15c34851d8a652ff6cf55e8a Author: Yoann Vandoorselaere Date: Sat May 7 14:03:03 2005 +0000 Typo. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@6317 09c5ec92-17d4-0310-903a-819935f44dba src/prelude-client.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) commit 86a292c12e5888f4aa2307557d3292d8c80a1d5d Author: Yoann Vandoorselaere Date: Sat May 7 00:49:23 2005 +0000 oops. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@6316 09c5ec92-17d4-0310-903a-819935f44dba src/common.c | 6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-) commit cd37ac4a28a99b2d1b5d371d8a0cf13d89e2f16b Author: Yoann Vandoorselaere Date: Sat May 7 00:47:21 2005 +0000 Remove dirty prelude_timegm() hack. This version should be faster and not subject to portability issue. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@6315 09c5ec92-17d4-0310-903a-819935f44dba src/common.c | 39 ++++++++++++++++++--------------------- 1 files changed, 18 insertions(+), 21 deletions(-) commit 65bde34656393ccaf98aa609cfed40f83f6ed761 Author: Yoann Vandoorselaere Date: Fri May 6 17:16:41 2005 +0000 Only print '+' sign on the top of the GMT offset when required. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@6310 09c5ec92-17d4-0310-903a-819935f44dba src/idmef-time.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) commit 8c2e05459f4d6001eda29c9d991e54a2e7ad0449 Author: Yoann Vandoorselaere Date: Fri May 6 15:58:03 2005 +0000 Fix problem on some OS with snprintf and null value. Add a consistency check that trigger a warning when an option is already existing. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@6309 09c5ec92-17d4-0310-903a-819935f44dba src/prelude-option.c | 14 ++++++++++---- 1 files changed, 10 insertions(+), 4 deletions(-) commit ba00dd87a841f82b669164f17f5d32c41dd452ca Author: Yoann Vandoorselaere Date: Fri May 6 15:47:31 2005 +0000 Fix a Solaris issue where strptime() will zero the tm structure before the call. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@6307 09c5ec92-17d4-0310-903a-819935f44dba src/idmef-time.c | 6 +++++- 1 files changed, 5 insertions(+), 1 deletions(-) commit 63a2d1311bc3d58d3ea635305dbc526adec64afa Author: Yoann Vandoorselaere Date: Sun May 1 22:16:23 2005 +0000 Update. Bump version number. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@6286 09c5ec92-17d4-0310-903a-819935f44dba NEWS | 23 +++++++++++++++++++++++ configure.in | 2 +- docs/api/libprelude-decl.txt | 14 ++++++++++++-- docs/api/tmpl/prelude-connection-pool.sgml | 2 +- 4 files changed, 37 insertions(+), 4 deletions(-) commit f92b1c844b67bd1f97dbc15f838f2fa3b9d71a6d Author: Yoann Vandoorselaere Date: Sun May 1 21:37:54 2005 +0000 Allow sensor to disable failover by settings specific connection-pool flags before client start. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@6285 09c5ec92-17d4-0310-903a-819935f44dba src/include/prelude-connection-pool.h | 4 ++- src/prelude-client.c | 31 ++++++++----------- src/prelude-connection-pool.c | 51 +++++++++++++++++++++----------- 3 files changed, 49 insertions(+), 37 deletions(-) commit 52a02e441a0799bc62dfa9cf7cde97e1ad5ccf85 Author: Yoann Vandoorselaere Date: Fri Apr 29 08:27:57 2005 +0000 Add missing file->file_type IDMEF string. Untabify idmef-tree.h, and regenerate the code. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@6284 09c5ec92-17d4-0310-903a-819935f44dba src/idmef-message-print.c | 14 +++++ src/idmef-message-read.c | Bin 77304 -> 77642 bytes src/idmef-message-write.c | 4 ++ src/idmef-tree-wrap.c | 69 +++++++++++++++++++++++++- src/idmef-wrappers-gen/idmef-tree.h | 93 ++++++++++++++++++----------------- src/include/idmef-message-id.h | 1 + src/include/idmef-tree-data.h | 1 + src/include/idmef-tree-wrap.h | 5 ++ 8 files changed, 140 insertions(+), 47 deletions(-) commit 06ac821fa62c19ea171de0167c8cd106846473a2 Author: Yoann Vandoorselaere Date: Wed Apr 27 12:09:06 2005 +0000 Fix copyright git-svn-id: file:///home/yoann/SVN/trunk/libprelude@6269 09c5ec92-17d4-0310-903a-819935f44dba .../GenerateIDMEFValueClassSwigMapping.pm | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) commit 185d58a5e9cb669b4acb7ce68cf2145db942d551 Author: Yoann Vandoorselaere Date: Wed Apr 27 12:00:11 2005 +0000 Implement idmef_path_is_list(), so that the user might know whether a specific part of the path is listed or not. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@6266 09c5ec92-17d4-0310-903a-819935f44dba src/idmef-path.c | 11 +++++++++++ src/include/idmef-path.h | 2 ++ 2 files changed, 13 insertions(+), 0 deletions(-) commit cf8e29eab645a0e0f229ab4dd0fb9f3062185ace Author: Yoann Vandoorselaere Date: Wed Apr 27 11:59:24 2005 +0000 Provide the ability to map return from idmef_value_get_object(), so that the underlying code that use the bindings know what type of object they are accessing. This will permit Python and Perl program to access the IDMEF tree much more easily. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@6265 09c5ec92-17d4-0310-903a-819935f44dba bindings/Makefile.am | 8 +- bindings/idmef-value-class-mapping.h | 78 ++++++++++++++ bindings/libprelude.i | 3 + bindings/libprelude_perl.i | 14 +++- bindings/libprelude_python.i | 14 +++ bindings/perl/Makefile.PL.in | 2 +- bindings/python/setup.py.in | 2 +- .../GenerateIDMEFValueClassSwigMapping.pm | 108 ++++++++++++++++++++ src/idmef-wrappers-gen/generator.pl | 7 +- 9 files changed, 228 insertions(+), 8 deletions(-) commit eb6349c330625e2f209dadd11244af0f257906d6 Author: Yoann Vandoorselaere Date: Tue Apr 26 08:46:36 2005 +0000 Fix for listed value which were created with IDMEF_VALUE_TYPE_CLASS instead of IDMEF_VALUE_TYPE_LIST. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@6264 09c5ec92-17d4-0310-903a-819935f44dba src/idmef-value.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) commit 46f59252312722295697876555fc9f4ea740ed20 Author: Yoann Vandoorselaere Date: Mon Apr 25 18:38:51 2005 +0000 Don't call prelude_timer_lock_critical_region() from prelude_connection_pool_broadcast(), since this function might be called from a timer. This was causing sensor to deadlock when using PRELUDE_CLIENT_FLAGS_ASYNC_TIMER withou PRELUDE_CLIENT_FLAGS_ASYNC_SEND (example: Samhain). git-svn-id: file:///home/yoann/SVN/trunk/libprelude@6261 09c5ec92-17d4-0310-903a-819935f44dba src/include/prelude-connection-pool.h | 1 + src/prelude-connection-pool.c | 7 +++---- 2 files changed, 4 insertions(+), 4 deletions(-) commit 6242e92e8a733dd59c7089521e6b00c654af3131 Author: Yoann Vandoorselaere Date: Mon Apr 25 18:02:24 2005 +0000 Use prelude_parse_address(). git-svn-id: file:///home/yoann/SVN/trunk/libprelude@6260 09c5ec92-17d4-0310-903a-819935f44dba src/prelude-connection.c | 18 ++++++++---------- 1 files changed, 8 insertions(+), 10 deletions(-) commit a7e3344ec7218add39abf410d6616b938c27370b Author: Nicolas Delon Date: Sun Apr 24 18:46:37 2005 +0000 fix listed member initialisation when not used in a list context (i.e idmef_user_id_t in idmef_file_access_t) git-svn-id: file:///home/yoann/SVN/trunk/libprelude@6254 09c5ec92-17d4-0310-903a-819935f44dba src/idmef-tree-wrap.c | 3 ++- src/idmef-wrappers-gen/GenerateIDMEFTreeWrapC.pm | 11 +++++++++-- 2 files changed, 11 insertions(+), 3 deletions(-) commit 24c87f0b91cf38d4f8f3b1197042c2d0694188fe Author: Yoann Vandoorselaere Date: Sat Apr 23 16:02:09 2005 +0000 Remove debugging spew. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@6242 09c5ec92-17d4-0310-903a-819935f44dba prelude-adduser/server.c | 2 -- 1 files changed, 0 insertions(+), 2 deletions(-) commit f19a52af97a7458920c3e2bc5b1a78956da9c43c Author: Yoann Vandoorselaere Date: Sat Apr 23 16:01:09 2005 +0000 Use prelude_parse_address(). Make registration-server provide a --listen option, to override the default. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@6241 09c5ec92-17d4-0310-903a-819935f44dba prelude-adduser/prelude-adduser.c | 59 ++++++++++++++++++++++++------------ prelude-adduser/server.c | 47 ++++++++++++++++++++--------- prelude-adduser/server.h | 4 ++- 3 files changed, 75 insertions(+), 35 deletions(-) commit 8e72b6b15d077c43cd26a7f6bcabd2a00e45f9ce Author: Yoann Vandoorselaere Date: Sat Apr 23 15:59:34 2005 +0000 Add a function for parsing address, including IETF advised format for IPv6 of [node]:port. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@6240 09c5ec92-17d4-0310-903a-819935f44dba src/common.c | 47 ++++++++++++++++++++++++++++++++++++++++++++--- src/include/common.h | 2 ++ 2 files changed, 46 insertions(+), 3 deletions(-) commit 4393a164f2c80c60498319d93b71bf6d4a2ddd64 Author: Yoann Vandoorselaere Date: Fri Apr 22 14:46:49 2005 +0000 Remove deprecated. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@6238 09c5ec92-17d4-0310-903a-819935f44dba prelude-adduser/plaintext.c | 132 ------------------------------------------- 1 files changed, 0 insertions(+), 132 deletions(-) commit dac5c3dca24ee5983400399c658814593c71fc91 Author: Yoann Vandoorselaere Date: Fri Apr 22 14:34:37 2005 +0000 Avoid EAGAIN on blocking connection. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@6237 09c5ec92-17d4-0310-903a-819935f44dba src/prelude-msg.c | 18 +++++++++--------- 1 files changed, 9 insertions(+), 9 deletions(-) commit e7f783692167e5b356fca3ae67cef98d7e3e12fc Author: Yoann Vandoorselaere Date: Fri Apr 22 08:54:21 2005 +0000 Print error when we can't parse permission. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@6233 09c5ec92-17d4-0310-903a-819935f44dba prelude-adduser/prelude-adduser.c | 4 +++- 1 files changed, 3 insertions(+), 1 deletions(-) commit 9a9e3c4109a840159b0d3f0d1e742453e4fde435 Author: Yoann Vandoorselaere Date: Fri Apr 22 08:49:30 2005 +0000 Make permission parser more fault tolerant. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@6232 09c5ec92-17d4-0310-903a-819935f44dba src/prelude-connection.c | 43 +++++++++++++++++++++++++++---------------- 1 files changed, 27 insertions(+), 16 deletions(-) commit cc033537e559e6e422307e78be5b9bdcc5c92551 Author: Yoann Vandoorselaere Date: Sun Apr 17 23:08:46 2005 +0000 Bump version number, update documentation. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@6182 09c5ec92-17d4-0310-903a-819935f44dba NEWS | 23 +++++++++++++++++++++++ configure.in | 2 +- docs/api/libprelude-decl.txt | 8 ++++---- docs/api/libprelude-sections.txt | 4 ++-- 4 files changed, 30 insertions(+), 7 deletions(-) commit dd35a763bcf52192ace745894d1643a83fcc731c Author: Yoann Vandoorselaere Date: Sun Apr 17 18:06:51 2005 +0000 Update doc, libmissing, etc. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@6175 09c5ec92-17d4-0310-903a-819935f44dba docs/api/tmpl/prelude-client.sgml | 4 ++-- libmissing/Makefile.am | 2 +- libmissing/getaddrinfo.c | 8 +++----- libmissing/m4/gnulib.m4 | 2 +- src/include/prelude-log.h | 2 +- src/prelude-log.c | 2 +- 6 files changed, 9 insertions(+), 11 deletions(-) commit a10a3decfce176e5f61603fbcc982e86f06f2d14 Author: Yoann Vandoorselaere Date: Sun Apr 17 17:39:23 2005 +0000 Rename non conforming. Will not break anything. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@6172 09c5ec92-17d4-0310-903a-819935f44dba src/include/prelude-client.h | 4 ++-- src/prelude-client.c | 39 +++++++++++++++++++-------------------- 2 files changed, 21 insertions(+), 22 deletions(-) commit 27feec756ecef626ca9a0c13511a79e1bcdac57e Author: Yoann Vandoorselaere Date: Sun Apr 17 15:39:04 2005 +0000 Fix an issue that some people have been experiencing when "adding" the Manager profile then immediatly starting prelude-manager without running the "registration-server" command, and then registering sensor. This would result in 'authentication failed' message until the Manager was restarted. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@6169 09c5ec92-17d4-0310-903a-819935f44dba prelude-adduser/prelude-adduser.c | 21 +++++++++++++++++++-- 1 files changed, 19 insertions(+), 2 deletions(-) commit 483379f35ca4cb7b8f44bb692ee5538ebca677b2 Author: Nicolas Delon Date: Sat Apr 16 22:06:25 2005 +0000 bug fix for idmef_time_get_gmt_offset where a negative value does not mean that there is an error git-svn-id: file:///home/yoann/SVN/trunk/libprelude@6164 09c5ec92-17d4-0310-903a-819935f44dba bindings/libprelude_python.i | 3 +++ 1 files changed, 3 insertions(+), 0 deletions(-) commit 427ad7ee1f6c955919329d849242823913ca6d03 Author: Yoann Vandoorselaere Date: Sat Apr 16 15:28:58 2005 +0000 Use '0' for protocol, more portable. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@6157 09c5ec92-17d4-0310-903a-819935f44dba prelude-adduser/prelude-adduser.c | 2 +- src/prelude-connection.c | 11 +++-------- 2 files changed, 4 insertions(+), 9 deletions(-) commit f43c9912594649444c61b83af166632980373ac7 Author: Yoann Vandoorselaere Date: Sat Apr 16 15:24:31 2005 +0000 Fix backslash return. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@6156 09c5ec92-17d4-0310-903a-819935f44dba prelude-adduser/prelude-adduser.c | 3 +-- 1 files changed, 1 insertions(+), 2 deletions(-) commit 8b786cf5e26722170a95abc3e9bd08921f28b99e Author: Yoann Vandoorselaere Date: Sat Apr 16 15:01:16 2005 +0000 Correct header inclusion. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@6155 09c5ec92-17d4-0310-903a-819935f44dba src/common.c | 8 -------- src/include/common.h | 4 +++- 2 files changed, 3 insertions(+), 9 deletions(-) commit 65f5bd2ad924f79730093246e06b3ddc87ea2924 Author: Yoann Vandoorselaere Date: Sat Apr 16 15:00:25 2005 +0000 Better socklen_t check. Avoid compile error on NetBSD. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@6154 09c5ec92-17d4-0310-903a-819935f44dba configure.in | 7 ++++++- 1 files changed, 6 insertions(+), 1 deletions(-) commit 966b23fc51c5ad394b1f7518e6591655501b90b6 Author: Yoann Vandoorselaere Date: Sat Apr 16 14:59:45 2005 +0000 Use FTS in place of FTW for portability. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@6153 09c5ec92-17d4-0310-903a-819935f44dba prelude-adduser/prelude-adduser.c | 89 ++++++++++-------------------------- 1 files changed, 25 insertions(+), 64 deletions(-) commit 62538ddfdab3a5639c0a12dd77378932c8907163 Author: Yoann Vandoorselaere Date: Fri Apr 15 18:28:39 2005 +0000 Now that prelude_msg_read() can be called recursively on received fragments, we need to check that the msg was not freed by the recursive read(). git-svn-id: file:///home/yoann/SVN/trunk/libprelude@6147 09c5ec92-17d4-0310-903a-819935f44dba src/prelude-msg.c | 5 ++++- 1 files changed, 4 insertions(+), 1 deletions(-) commit 37ce841ba243d130d63f7d4c0d1aa1a82616a4d1 Author: Yoann Vandoorselaere Date: Thu Apr 14 14:15:46 2005 +0000 Change prelude_timegm() so that it use setenv/unsetenv again due to specific OpenBSD problem with the putenv() equivalent. Since that also bring back some portability issue, add the setenv module to libmissing. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@6143 09c5ec92-17d4-0310-903a-819935f44dba libmissing/Makefile.am | 17 ++- libmissing/allocsa.c | 139 ++++++++++++++++++ libmissing/allocsa.h | 113 +++++++++++++++ libmissing/allocsa.valgrind | 7 + libmissing/m4/allocsa.m4 | 15 ++ libmissing/m4/eealloc.m4 | 32 ++++ libmissing/m4/gnulib.m4 | 6 +- libmissing/m4/setenv.m4 | 70 +++++++++ libmissing/setenv.c | 328 +++++++++++++++++++++++++++++++++++++++++++ libmissing/setenv.h | 54 +++++++ libmissing/unsetenv.c | 99 +++++++++++++ src/common.c | 21 ++-- src/include/libmissing.h | 6 +- 13 files changed, 891 insertions(+), 16 deletions(-) commit 530aeef30b31cb4641995f14e4f22bb783cfa953 Author: Yoann Vandoorselaere Date: Thu Apr 14 14:13:18 2005 +0000 Fix a problem with library path ordering, fix compilation problem on some system where old version of the library where installed. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@6142 09c5ec92-17d4-0310-903a-819935f44dba configure.in | 98 ++++++++++++++++++++---------------------- prelude-adduser/Makefile.am | 2 +- 2 files changed, 48 insertions(+), 52 deletions(-) commit c4e902b4d04ffe738da9c24dcf22168c53944dd5 Author: Yoann Vandoorselaere Date: Thu Apr 14 14:12:02 2005 +0000 Only modify the error string if needed. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@6141 09c5ec92-17d4-0310-903a-819935f44dba src/prelude-option.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) commit 83f06f858c968b35d28a65dbe859ceb53860eeb2 Author: Yoann Vandoorselaere Date: Tue Apr 12 14:58:30 2005 +0000 Kill warnings. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@6113 09c5ec92-17d4-0310-903a-819935f44dba src/idmef-time.c | 8 ++++---- 1 files changed, 4 insertions(+), 4 deletions(-) commit a13fc35feb73a0fc2d98691925d3482e037b545d Author: Yoann Vandoorselaere Date: Tue Apr 12 14:56:45 2005 +0000 Add missing. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@6112 09c5ec92-17d4-0310-903a-819935f44dba libmissing/alloca_.h | 52 ++++++++++++++++++++++++++++++++++++++++++++++++++ 1 files changed, 52 insertions(+), 0 deletions(-) commit 2a5658669f00c5b877c0ed91a84ed7756bab6dd8 Author: Nicolas Delon Date: Tue Apr 12 14:49:56 2005 +0000 bug fix: compute gmt offset with current time instead of epoch change parameter from int32 to long git-svn-id: file:///home/yoann/SVN/trunk/libprelude@6111 09c5ec92-17d4-0310-903a-819935f44dba src/common.c | 15 ++++++++++----- src/include/common.h | 2 +- 2 files changed, 11 insertions(+), 6 deletions(-) commit 2b5d180636e05babefdf92f866d026513ede209a Author: Yoann Vandoorselaere Date: Sun Apr 10 15:51:30 2005 +0000 Some output beautifications... git-svn-id: file:///home/yoann/SVN/trunk/libprelude@6094 09c5ec92-17d4-0310-903a-819935f44dba src/idmef-message-print.c | 119 ++++++++++---------- .../GenerateIDMEFMessagePrintC.pm | 14 ++- 2 files changed, 67 insertions(+), 66 deletions(-) commit 837ea395372317852d9d9701de7342fd52bd9a94 Author: Yoann Vandoorselaere Date: Sun Apr 10 00:48:35 2005 +0000 Update documentation, NEWS. Bump version number. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@6084 09c5ec92-17d4-0310-903a-819935f44dba NEWS | 9 ++- configure.in | 2 +- docs/api/libprelude-decl.txt | 160 ++++++++++++++++--------------------- docs/api/libprelude-sections.txt | 37 ++++----- docs/api/tmpl/prelude-log.sgml | 7 ++ docs/api/tmpl/prelude-plugin.sgml | 84 +++++++++++++++++-- 6 files changed, 177 insertions(+), 122 deletions(-) commit d7588df398b030d962c4d10fc23ed64ff5882d07 Author: Yoann Vandoorselaere Date: Sun Apr 10 00:25:01 2005 +0000 Print the plugin name on error. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@6083 09c5ec92-17d4-0310-903a-819935f44dba src/prelude-plugin.c | 13 +++++++++---- 1 files changed, 9 insertions(+), 4 deletions(-) commit 59eac6cdf3090ed0efc7dc713ed9c8ecda23af50 Author: Yoann Vandoorselaere Date: Sat Apr 9 21:32:30 2005 +0000 Update the getaddrinfo module with some local fixes. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@6078 09c5ec92-17d4-0310-903a-819935f44dba libmissing/getaddrinfo.c | 18 +++++++++--------- libmissing/m4/getaddrinfo.m4 | 1 + 2 files changed, 10 insertions(+), 9 deletions(-) commit 2fffa77576e3a1d3810dc3e1fe649dd9cd15ac56 Author: Yoann Vandoorselaere Date: Sat Apr 9 21:20:42 2005 +0000 Remove deprecated. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@6077 09c5ec92-17d4-0310-903a-819935f44dba libmissing/alloca_.h | 52 -------------------------------------------------- 1 files changed, 0 insertions(+), 52 deletions(-) commit a5c85e94df6862f62992eaf7e259b18c5f29cb89 Author: Yoann Vandoorselaere Date: Sat Apr 9 17:02:54 2005 +0000 Slight renaming. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@6063 09c5ec92-17d4-0310-903a-819935f44dba src/include/prelude-log.h | 2 +- src/prelude-log.c | 10 +++++++++- 2 files changed, 10 insertions(+), 2 deletions(-) commit 61f699eac7a1144247a2f24019a7819b792062fe Author: Yoann Vandoorselaere Date: Sat Apr 9 13:18:02 2005 +0000 Handle option enumeration as int32, declare and send prelude_option_input_type_t. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@6060 09c5ec92-17d4-0310-903a-819935f44dba src/include/prelude-option.h | 11 +++++++++-- src/prelude-option-wide.c | 13 +++++++------ src/prelude-option.c | 28 ++++++++++++++++++++-------- 3 files changed, 36 insertions(+), 16 deletions(-) commit 52a3ba74df4a2382f410057de9bee2e6d6648e94 Author: Nicolas Delon Date: Sat Apr 9 12:11:50 2005 +0000 fix compilation errors with swig 1.3.24 git-svn-id: file:///home/yoann/SVN/trunk/libprelude@6057 09c5ec92-17d4-0310-903a-819935f44dba bindings/libprelude_perl.i | 6 +++--- bindings/libprelude_python.i | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) commit aafe681bc7b8a9a84f865693035bd6dd999ade7a Author: Yoann Vandoorselaere Date: Sat Apr 9 10:03:48 2005 +0000 Kill warning. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@6054 09c5ec92-17d4-0310-903a-819935f44dba src/prelude-option-wide.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) commit 4122324a5e5c8f5cc03b553a81fc782c0ee839d5 Author: Yoann Vandoorselaere Date: Fri Apr 8 23:15:44 2005 +0000 Provide a way for the user to specify it's own logging function. Unify syslog and standard logging. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@6053 09c5ec92-17d4-0310-903a-819935f44dba src/include/prelude-log.h | 2 + src/prelude-log.c | 81 +++++++++++++++++++------------------------- 2 files changed, 37 insertions(+), 46 deletions(-) commit 0ab2adb499276209b3d46d40995ef5b5dd2ec378 Author: Yoann Vandoorselaere Date: Fri Apr 8 23:08:58 2005 +0000 Remove now unused end of message part. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@6050 09c5ec92-17d4-0310-903a-819935f44dba src/prelude-msg.c | 27 +++++++++------------------ 1 files changed, 9 insertions(+), 18 deletions(-) commit 024994fb43a96134c7c9b98e8c9d94ed75ad769f Author: Yoann Vandoorselaere Date: Fri Apr 8 19:58:24 2005 +0000 Fix another option parsing problem introduced when merging the CLI & CFG option list. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@6043 09c5ec92-17d4-0310-903a-819935f44dba src/prelude-option.c | 42 +++++++++++++++++++++++++++--------------- 1 files changed, 27 insertions(+), 15 deletions(-) commit b09e99ebcf48341d17b2060fa44a268645f50445 Author: Yoann Vandoorselaere Date: Fri Apr 8 10:13:05 2005 +0000 Fix GnuIsm... git-svn-id: file:///home/yoann/SVN/trunk/libprelude@6037 09c5ec92-17d4-0310-903a-819935f44dba bindings/Makefile.am | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) commit 603149c60826638c2571f1488ba6f9fc8ec4c133 Author: Yoann Vandoorselaere Date: Fri Apr 8 05:57:11 2005 +0000 Doc update. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@6036 09c5ec92-17d4-0310-903a-819935f44dba docs/api/tmpl/idmef-tree-wrap.sgml | 2 +- docs/api/tmpl/prelude-plugin.sgml | 136 ++---------------------------------- 2 files changed, 8 insertions(+), 130 deletions(-) commit 0516fa895dae644d231c3d2c946b10c7880e5ce3 Author: Yoann Vandoorselaere Date: Fri Apr 8 05:50:15 2005 +0000 Make prelude-adduser del work everywhere by implementing recursive deletion. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@6035 09c5ec92-17d4-0310-903a-819935f44dba prelude-adduser/prelude-adduser.c | 85 +++++++++++++++++++++++++++++++++++-- 1 files changed, 81 insertions(+), 4 deletions(-) commit cefb0b8034eb2425e54fe81400822a6d88a606de Author: Yoann Vandoorselaere Date: Fri Apr 8 05:49:08 2005 +0000 Tell the user key generation might take a looooooooong time. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@6034 09c5ec92-17d4-0310-903a-819935f44dba prelude-adduser/tls-register.c | 8 +++++--- 1 files changed, 5 insertions(+), 3 deletions(-) commit 6a8190b36cc679dc94dfb45af56e7194ea9025a7 Author: Yoann Vandoorselaere Date: Thu Apr 7 14:14:17 2005 +0000 Fix insertion of multiple section. Fix deletion of section within another section. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@6020 09c5ec92-17d4-0310-903a-819935f44dba src/config-engine.c | 15 +++++++++------ src/include/config-engine.h | 2 +- src/prelude-option-wide.c | 17 ++++++++++------- 3 files changed, 20 insertions(+), 14 deletions(-) commit 1721bedae11912866bee6825dfb282c2843d63f5 Author: Yoann Vandoorselaere Date: Thu Apr 7 13:53:11 2005 +0000 Recycle the message anyway when there is an error return. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@6019 09c5ec92-17d4-0310-903a-819935f44dba src/prelude-msgbuf.c | 8 ++------ 1 files changed, 2 insertions(+), 6 deletions(-) commit 178b06c84bdd26d1ee30f40d2745443e1e5c1106 Author: Yoann Vandoorselaere Date: Thu Apr 7 01:19:20 2005 +0000 Give more control to the caller on option processing. Fix a leak. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@6009 09c5ec92-17d4-0310-903a-819935f44dba src/include/prelude-option-wide.h | 2 +- src/include/prelude-option.h | 2 +- src/prelude-client.c | 39 +++++++++++++++++++++++++++----- src/prelude-option-wide.c | 44 ++++-------------------------------- 4 files changed, 40 insertions(+), 47 deletions(-) commit 392bf6bffbb55d9ffaac6cd678715d5d72dcbf84 Author: Yoann Vandoorselaere Date: Wed Apr 6 18:52:38 2005 +0000 Adjust. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@6006 09c5ec92-17d4-0310-903a-819935f44dba src/prelude-plugin.c | 4 +--- 1 files changed, 1 insertions(+), 3 deletions(-) commit 260e535ee5ef29ba88b7c61ece76decbe13126ea Author: Yoann Vandoorselaere Date: Wed Apr 6 18:51:21 2005 +0000 Error out when the user attempt to destroy a plugin that does not support destruction. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@6005 09c5ec92-17d4-0310-903a-819935f44dba src/prelude-plugin.c | 5 +++++ 1 files changed, 5 insertions(+), 0 deletions(-) commit 184d7d6cd94ac19ac8fc4a5662b7760c0a422b76 Author: Yoann Vandoorselaere Date: Wed Apr 6 16:59:08 2005 +0000 Forgot this one. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@6001 09c5ec92-17d4-0310-903a-819935f44dba src/prelude.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) commit 03ddbe10048b2c455093be14e1132c10ad8308fc Author: Yoann Vandoorselaere Date: Wed Apr 6 16:54:27 2005 +0000 Make the plugin API fully reentrant. Check for a plugin version symbol, so that the user isn't confused by an older, incompatible plugin that would make the whole things crash. Prefix private API function with '_'. Remove deprecated plugin fields. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@5997 09c5ec92-17d4-0310-903a-819935f44dba src/include/prelude-option.h | 8 +- src/include/prelude-plugin.h | 102 +++++------- src/prelude-option.c | 19 ++- src/prelude-plugin.c | 352 ++++++++++++++++++++---------------------- 4 files changed, 237 insertions(+), 244 deletions(-) commit 8cbf9e7b4edb45c06a4264c1452f714417cca87d Author: Yoann Vandoorselaere Date: Wed Apr 6 16:51:42 2005 +0000 Make INFO severity rank first, so that it is more easy to use lesser/greater than criteria for matching it. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@5996 09c5ec92-17d4-0310-903a-819935f44dba src/idmef-message-read.c | Bin 77364 -> 77304 bytes src/idmef-message-write.c | 120 +++++++++++++++++----------------- src/idmef-tree-wrap.c | 72 +++++++++++----------- src/idmef-wrappers-gen/idmef-tree.h | 8 +- src/include/idmef-tree-wrap.h | 8 +- 5 files changed, 104 insertions(+), 104 deletions(-) commit ada52dd1fa30aedc3e703ba43cbfdb974d373dbe Author: Yoann Vandoorselaere Date: Wed Apr 6 01:59:45 2005 +0000 Fix a bug on matching lesser than / bigger than criteria. Value ordering is important here. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@5990 09c5ec92-17d4-0310-903a-819935f44dba src/idmef-criterion-value.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) commit 28b6852328c88eb19bbb4f540b323fe02c5eae3c Author: Yoann Vandoorselaere Date: Tue Apr 5 17:43:21 2005 +0000 Make prelude_init() / prelude_deinit() able to be called several time by using a refcount. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@5972 09c5ec92-17d4-0310-903a-819935f44dba src/prelude.c | 22 ++++++++++++++++------ 1 files changed, 16 insertions(+), 6 deletions(-) commit ce76121292d5ca28e0adcf7f1ccdb0e02b0636f8 Author: Yoann Vandoorselaere Date: Tue Apr 5 16:45:50 2005 +0000 Update. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@5968 09c5ec92-17d4-0310-903a-819935f44dba AUTHORS | 1 + README | 2 +- 2 files changed, 2 insertions(+), 1 deletions(-) commit 07dc97a4d9e0101d49b19d9817a280af23f9efb6 Author: Yoann Vandoorselaere Date: Tue Apr 5 14:30:47 2005 +0000 Update GnuLib code. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@5964 09c5ec92-17d4-0310-903a-819935f44dba libmissing/getaddrinfo.h | 7 +++---- 1 files changed, 3 insertions(+), 4 deletions(-) commit 8658bd7cf60aa9dd63d8c99cfa570a1f93d2454b Author: Yoann Vandoorselaere Date: Tue Apr 5 14:27:47 2005 +0000 Fix date. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@5963 09c5ec92-17d4-0310-903a-819935f44dba NEWS | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) commit fdd9b8942e62f75838fd5eb5d065372928f0c490 Author: Yoann Vandoorselaere Date: Tue Apr 5 14:01:55 2005 +0000 Prepare for next candidate release. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@5962 09c5ec92-17d4-0310-903a-819935f44dba NEWS | 5 +++-- docs/api/libprelude-decl.txt | 5 +++++ 2 files changed, 8 insertions(+), 2 deletions(-) commit f5bd00a8be14f2ee4069f2b8138f133cd3f7ab58 Author: Yoann Vandoorselaere Date: Tue Apr 5 13:46:37 2005 +0000 Prefix WORDS_BIGENDIAN and NEED_ALIGNED_ACCESS. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@5961 09c5ec92-17d4-0310-903a-819935f44dba configure.in | 4 ++-- src/common.c | 2 +- src/include/prelude-extract.h | 6 +++--- 3 files changed, 6 insertions(+), 6 deletions(-) commit c3b93a827fcd8363ae203feeab7a17b89c50c973 Author: Yoann Vandoorselaere Date: Tue Apr 5 13:20:22 2005 +0000 Fix IRIX warning, avoid exporting un-needed cflags. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@5959 09c5ec92-17d4-0310-903a-819935f44dba configure.in | 38 ++++++++++++++++++++++++++++++++------ prelude-adduser/Makefile.am | 4 ++-- src/Makefile.am | 7 ++++--- 3 files changed, 38 insertions(+), 11 deletions(-) commit d81447416ef8e2d8f36312873479116c5080557e Author: Yoann Vandoorselaere Date: Mon Apr 4 23:38:22 2005 +0000 Fix warning on some architecture. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@5957 09c5ec92-17d4-0310-903a-819935f44dba src/include/prelude-extract.h | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) commit fed7995be89ac24e35428f8a6815e40f98d4982f Author: Yoann Vandoorselaere Date: Mon Apr 4 21:45:11 2005 +0000 Cast uid/gid to int. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@5953 09c5ec92-17d4-0310-903a-819935f44dba prelude-adduser/tls-register.c | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) commit 46936ba5376a37233403c450e4c00796c7d761de Author: Yoann Vandoorselaere Date: Mon Apr 4 21:42:39 2005 +0000 Include unistd.h, fix a warning on IRIX 6.5, where pthread_atfork is defined there. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@5952 09c5ec92-17d4-0310-903a-819935f44dba src/prelude-async.c | 1 + src/prelude.c | 1 + 2 files changed, 2 insertions(+), 0 deletions(-) commit 7b022dfb90fe69f1e93197f89d1fa624ec50752e Author: Yoann Vandoorselaere Date: Mon Apr 4 21:07:09 2005 +0000 Fix an IRIX 6.5 compilation problem, because of a name conflict (sa_len naming). git-svn-id: file:///home/yoann/SVN/trunk/libprelude@5951 09c5ec92-17d4-0310-903a-819935f44dba src/prelude-connection.c | 12 ++++++------ 1 files changed, 6 insertions(+), 6 deletions(-) commit 44692a5e991d14625e43c95bfc892e2eb6d9eb3e Author: Nicolas Delon Date: Mon Apr 4 16:47:24 2005 +0000 fix criterion value parsing, a non-quoted string can now contain non alpha-numeric characters git-svn-id: file:///home/yoann/SVN/trunk/libprelude@5948 09c5ec92-17d4-0310-903a-819935f44dba src/idmef-criteria-string.lex.l | 63 ++++++++++++++++++++++++++------------- src/idmef-criteria-string.yac.y | 9 +++-- 2 files changed, 47 insertions(+), 25 deletions(-) commit c32c293389021e937ea322748e3a52aa53bedc37 Author: Yoann Vandoorselaere Date: Mon Apr 4 02:38:19 2005 +0000 Update git-svn-id: file:///home/yoann/SVN/trunk/libprelude@5947 09c5ec92-17d4-0310-903a-819935f44dba docs/api/libprelude-decl.txt | 6 +++++- 1 files changed, 5 insertions(+), 1 deletions(-) commit e3881c280bed128830e411046a01344873b36856 Author: Yoann Vandoorselaere Date: Mon Apr 4 00:42:00 2005 +0000 Merge option lists for correct priority handling. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@5946 09c5ec92-17d4-0310-903a-819935f44dba src/prelude-option.c | 40 +++++++++++++++++++--------------------- 1 files changed, 19 insertions(+), 21 deletions(-) commit d77858be76ace9d87900b98afd3240677239e2b0 Author: Yoann Vandoorselaere Date: Mon Apr 4 00:30:48 2005 +0000 Remove deprecated REGEX_CFLAGS. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@5945 09c5ec92-17d4-0310-903a-819935f44dba src/Makefile.am | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) commit 10c17036f20be4c07ae468bc83c4145ecd321d63 Author: Yoann Vandoorselaere Date: Mon Apr 4 00:30:19 2005 +0000 Fix some warnings due to prelude-client-profile change. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@5944 09c5ec92-17d4-0310-903a-819935f44dba src/prelude-client.c | 2 +- src/tls-auth.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit 8ae471137c4ff4929d42e8e27d6fa762247d2e01 Author: Yoann Vandoorselaere Date: Mon Apr 4 00:25:17 2005 +0000 Hide gnutls_credentials type, so that the user don't have to know GnuTLS header location to compile libprelude. Remove gnutls/gnutls.h inclusion from prelude-client-profile.h. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@5943 09c5ec92-17d4-0310-903a-819935f44dba src/include/prelude-client-profile.h | 3 +-- src/prelude-client-profile.c | 2 +- src/prelude.c | 1 + 3 files changed, 3 insertions(+), 3 deletions(-) commit 3aab6ad6d77ed62bb399a44c73e73a1b651e052e Author: Yoann Vandoorselaere Date: Sun Apr 3 23:27:08 2005 +0000 Update. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@5942 09c5ec92-17d4-0310-903a-819935f44dba NEWS | 23 +++++++++++++++++++++-- 1 files changed, 21 insertions(+), 2 deletions(-) commit d5742c9f3b46167da51f4486968aa5615fab3eb9 Author: Yoann Vandoorselaere Date: Sun Apr 3 18:37:58 2005 +0000 Stop using pcreposix and always rely on POSIX regex. The way pcreposix define it's symbol make it impossible to use it from a library if the final program isn't linked against libpcreposix (example: python / perl program using libprelude bindings). git-svn-id: file:///home/yoann/SVN/trunk/libprelude@5934 09c5ec92-17d4-0310-903a-819935f44dba configure.in | 19 ------------------- src/idmef-criterion-value.c | 7 ++----- 2 files changed, 2 insertions(+), 24 deletions(-) commit 6834cd970c6ab63f16fc561174ea000db92ec062 Author: Yoann Vandoorselaere Date: Sun Apr 3 18:35:25 2005 +0000 Make it work on win32. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@5933 09c5ec92-17d4-0310-903a-819935f44dba m4/ac_prototype_accept.m4 | 4 ++++ 1 files changed, 4 insertions(+), 0 deletions(-) commit 23e7f7ccae04255b9088ab254a530a509bf6ad13 Author: Nicolas Delon Date: Sun Apr 3 17:48:24 2005 +0000 bug fix: the previous regexp made some valid criteria invalid git-svn-id: file:///home/yoann/SVN/trunk/libprelude@5931 09c5ec92-17d4-0310-903a-819935f44dba src/idmef-criteria-string.lex.l | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) commit f25fe6989c3ce6db72c6464ecb5c21ff7c544a36 Author: Yoann Vandoorselaere Date: Sat Apr 2 18:46:18 2005 +0000 Remove deprecated header inclusion. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@5930 09c5ec92-17d4-0310-903a-819935f44dba src/prelude-msg.c | 1 - 1 files changed, 0 insertions(+), 1 deletions(-) commit 2342e1353456881f2e7ea6119d8accbbf134ac4e Author: Yoann Vandoorselaere Date: Fri Apr 1 23:21:12 2005 +0000 Don't redefine MIN if it's not needed, fix an OpenBSD warning. Make idmef-time.h include , fix an OpenBSD warning. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@5926 09c5ec92-17d4-0310-903a-819935f44dba src/include/idmef-time.h | 2 ++ src/prelude-io.c | 4 +++- 2 files changed, 5 insertions(+), 1 deletions(-) commit 2b0aed69d4c7ca154846c62503406d4934fb8468 Author: Yoann Vandoorselaere Date: Fri Apr 1 23:13:49 2005 +0000 Fix compilation failure / warnings on OpenBSD and on system without pthread_atfork(). git-svn-id: file:///home/yoann/SVN/trunk/libprelude@5925 09c5ec92-17d4-0310-903a-819935f44dba configure.in | 19 +++++++------------ libmissing/getaddrinfo.h | 6 +++--- libmissing/inet_ntop.h | 2 +- src/prelude-async.c | 7 +++++++ src/prelude.c | 5 +++++ 5 files changed, 23 insertions(+), 16 deletions(-) commit 1d043252805e30a55cd148da3293939654f53552 Author: Nicolas Delon Date: Fri Apr 1 12:40:47 2005 +0000 generate errors for invalid tokens in idmef criteria git-svn-id: file:///home/yoann/SVN/trunk/libprelude@5921 09c5ec92-17d4-0310-903a-819935f44dba src/idmef-criteria-string.lex.l | 5 +++++ src/idmef-criteria-string.yac.y | 2 ++ 2 files changed, 7 insertions(+), 0 deletions(-) commit 7c7be2c946187703942b1f56b0cc10e9e488436b Author: Yoann Vandoorselaere Date: Fri Apr 1 10:08:38 2005 +0000 Propagate IDMEF path/criteria/criterion error. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@5920 09c5ec92-17d4-0310-903a-819935f44dba src/idmef-criteria-string.yac.y | 59 ++++++++++++++++----------------------- 1 files changed, 24 insertions(+), 35 deletions(-) commit 99156a610becd48b7f0613c49ca931523a2d3302 Author: Yoann Vandoorselaere Date: Fri Apr 1 10:05:49 2005 +0000 Define an error source. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@5919 09c5ec92-17d4-0310-903a-819935f44dba src/idmef-value-type.c | 4 +++- src/libprelude-error/err-sources.h.in | 1 + 2 files changed, 4 insertions(+), 1 deletions(-) commit f489a04f7b467e8310eb5cb32f935c075ec4b795 Author: Yoann Vandoorselaere Date: Fri Apr 1 09:36:13 2005 +0000 Add an error code for unsupported operator. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@5918 09c5ec92-17d4-0310-903a-819935f44dba src/libprelude-error/err-codes.h.in | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) commit 6795196b6a312cae98e5eb7c9528bea8c9be72ec Author: Yoann Vandoorselaere Date: Fri Apr 1 09:35:41 2005 +0000 s/relation/operator/. Fix criterion operator check. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@5917 09c5ec92-17d4-0310-903a-819935f44dba src/idmef-value-type.c | 45 +++++++++++++++++++++------------------ src/idmef-value.c | 2 +- src/include/idmef-value-type.h | 2 +- 3 files changed, 26 insertions(+), 23 deletions(-) commit 531c654e500964de75bfae47c6b5cc32720eaf8c Author: Yoann Vandoorselaere Date: Fri Apr 1 08:06:41 2005 +0000 IDMEF criteria error return correction. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@5916 09c5ec92-17d4-0310-903a-819935f44dba src/idmef-criteria-string.yac.y | 2 +- src/idmef-criteria.c | 2 ++ src/libprelude-error/err-codes.h.in | 2 ++ src/libprelude-error/err-sources.h.in | 3 ++- 4 files changed, 7 insertions(+), 2 deletions(-) commit bdec2a477e01da8fdc49433f785b94c4b66d2e98 Author: Yoann Vandoorselaere Date: Thu Mar 31 17:17:56 2005 +0000 Bump version to 0.9.0-rc2. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@5897 09c5ec92-17d4-0310-903a-819935f44dba NEWS | 8 ++++++++ configure.in | 2 +- docs/api/libprelude-decl.txt | 2 +- 3 files changed, 10 insertions(+), 2 deletions(-) commit d0eef3c35cf6699238b832b49d1f8d59065b028f Author: Nicolas Delon Date: Thu Mar 31 17:02:01 2005 +0000 fix library link path order and CFLAGS propagation git-svn-id: file:///home/yoann/SVN/trunk/libprelude@5895 09c5ec92-17d4-0310-903a-819935f44dba bindings/perl/Makefile.PL.in | 6 +++--- bindings/python/setup.py.in | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) commit f13f323bab58c2adbdd411c2d034b2bef874b524 Author: Nicolas Delon Date: Thu Mar 31 16:04:25 2005 +0000 fix make clean git-svn-id: file:///home/yoann/SVN/trunk/libprelude@5894 09c5ec92-17d4-0310-903a-819935f44dba bindings/Makefile.am | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) commit 7f2878a8009de8f972c8233a620c249fd65c8c16 Author: Yoann Vandoorselaere Date: Tue Mar 29 14:52:28 2005 +0000 Bump version number. Update NEWS file. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@5872 09c5ec92-17d4-0310-903a-819935f44dba NEWS | 60 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++- configure.in | 2 +- 2 files changed, 60 insertions(+), 2 deletions(-) commit 6156542cf0f3871a72ab8926c96fdc46dd0ae8a5 Author: Yoann Vandoorselaere Date: Tue Mar 29 06:09:57 2005 +0000 Regen documentation. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@5849 09c5ec92-17d4-0310-903a-819935f44dba docs/api/libprelude-decl.txt | 180 ++++++++++++++++++++++++----------- docs/api/libprelude-sections.txt | 70 +++++++++----- docs/api/tmpl/prelude-inttypes.sgml | 178 +++++++++++++++++++++++++++++----- 3 files changed, 322 insertions(+), 106 deletions(-) commit 769841091aa7ff5a35ddc9340fd8d559dfd64257 Author: Sebastien Tricaud Date: Mon Mar 28 21:02:54 2005 +0000 gtkdoc spelling fixes git-svn-id: file:///home/yoann/SVN/trunk/libprelude@5842 09c5ec92-17d4-0310-903a-819935f44dba src/idmef-time.c | 60 +++++++++++++++++++++++++++--------------------------- 1 files changed, 30 insertions(+), 30 deletions(-) commit 46a0b1e942eb3a9bc56d587eeed747c807289f71 Author: Sebastien Tricaud Date: Mon Mar 28 20:51:48 2005 +0000 gtkdoc spelling fixes git-svn-id: file:///home/yoann/SVN/trunk/libprelude@5841 09c5ec92-17d4-0310-903a-819935f44dba src/idmef-path.c | 50 +++++++++++++++++++++++++------------------------- 1 files changed, 25 insertions(+), 25 deletions(-) commit 791f452a1d548bb44de500f1310d3ed4044e981b Author: Sebastien Tricaud Date: Mon Mar 28 20:28:17 2005 +0000 gtkdoc spelling fixes git-svn-id: file:///home/yoann/SVN/trunk/libprelude@5838 09c5ec92-17d4-0310-903a-819935f44dba src/idmef-message-write.c | 120 ++++++++++++++++++++++---------------------- 1 files changed, 60 insertions(+), 60 deletions(-) commit 2a62411a43fb6610c63c4a80b848d0f0984922d0 Author: Sebastien Tricaud Date: Mon Mar 28 20:03:55 2005 +0000 gtkdoc spelling fixes git-svn-id: file:///home/yoann/SVN/trunk/libprelude@5837 09c5ec92-17d4-0310-903a-819935f44dba src/idmef-message-read.c | Bin 77304 -> 77364 bytes 1 files changed, 0 insertions(+), 0 deletions(-) commit 3a578ee3fe85cc2cb7b8a37c51840e04de931b90 Author: Sebastien Tricaud Date: Mon Mar 28 19:51:42 2005 +0000 gtkdoc spelling fixes git-svn-id: file:///home/yoann/SVN/trunk/libprelude@5835 09c5ec92-17d4-0310-903a-819935f44dba src/idmef-data.c | 16 ++++++++-------- 1 files changed, 8 insertions(+), 8 deletions(-) commit 21ce5e6871f5d985d0beb69b47eb4eb02ec198e1 Author: Sebastien Tricaud Date: Mon Mar 28 19:48:37 2005 +0000 spelling fixes git-svn-id: file:///home/yoann/SVN/trunk/libprelude@5834 09c5ec92-17d4-0310-903a-819935f44dba src/idmef-criterion-value.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) commit fa82eebc0acfa9b6cc61570f519d8fd379fada58 Author: Sebastien Tricaud Date: Mon Mar 28 19:40:41 2005 +0000 gtkdoc spelling fixes git-svn-id: file:///home/yoann/SVN/trunk/libprelude@5832 09c5ec92-17d4-0310-903a-819935f44dba src/idmef-criteria.c | 26 +++++++++++++------------- 1 files changed, 13 insertions(+), 13 deletions(-) commit d2f3d96b7118971c81f7e8cd628263e41b012a89 Author: Sebastien Tricaud Date: Mon Mar 28 19:31:47 2005 +0000 gtkdoc spelling fixes git-svn-id: file:///home/yoann/SVN/trunk/libprelude@5831 09c5ec92-17d4-0310-903a-819935f44dba src/daemonize.c | 12 ++++++------ 1 files changed, 6 insertions(+), 6 deletions(-) commit a3702c95bb6fff90e1e19644878723b745fbc6b6 Author: Sebastien Tricaud Date: Mon Mar 28 19:29:46 2005 +0000 gtkdoc spelling fixes git-svn-id: file:///home/yoann/SVN/trunk/libprelude@5830 09c5ec92-17d4-0310-903a-819935f44dba src/config-engine.c | 50 +++++++++++++++++++++++++------------------------- 1 files changed, 25 insertions(+), 25 deletions(-) commit 6f70971eb1f7f7ca3ca7076d82724ebbea7acd8c Author: Sebastien Tricaud Date: Mon Mar 28 19:20:37 2005 +0000 gtkdoc spelling fixes git-svn-id: file:///home/yoann/SVN/trunk/libprelude@5829 09c5ec92-17d4-0310-903a-819935f44dba src/common.c | 20 ++++++++++---------- 1 files changed, 10 insertions(+), 10 deletions(-) commit 4d25ae26b3c5717d5b8f725791fa65308cc036e6 Author: Nicolas Delon Date: Mon Mar 28 16:49:16 2005 +0000 bug fix: copy the members of the container git-svn-id: file:///home/yoann/SVN/trunk/libprelude@5825 09c5ec92-17d4-0310-903a-819935f44dba src/idmef-criterion-value.c | 15 +++++++++++---- 1 files changed, 11 insertions(+), 4 deletions(-) commit 9f983c7845b2130c5e4862c44b0d2f1afe834a5c Author: Yoann Vandoorselaere Date: Mon Mar 28 03:12:32 2005 +0000 - Make it possible for 'immediate' option to take a context. - Fix a potential problem with context creation. - Fix a context leak on option destroy. - Parse prelude specific option reliably. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@5807 09c5ec92-17d4-0310-903a-819935f44dba src/prelude-option.c | 127 ++++++++++++++++++++++++++----------------------- 1 files changed, 67 insertions(+), 60 deletions(-) commit 8bf82164311d0366d44cf001b917665586fc6406 Author: Yoann Vandoorselaere Date: Mon Mar 28 03:10:42 2005 +0000 Make it safer to destroy an asynchronous client. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@5806 09c5ec92-17d4-0310-903a-819935f44dba src/prelude-connection-pool.c | 15 ++++++++++++--- 1 files changed, 12 insertions(+), 3 deletions(-) commit 48d0825e78cfa3425864b33459d4ebe609476ddf Author: Yoann Vandoorselaere Date: Mon Mar 28 03:09:02 2005 +0000 Fix a chicken and egg problem with the way we gather profile. Force profile to be provided on the command line. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@5805 09c5ec92-17d4-0310-903a-819935f44dba src/prelude-client.c | 31 ++++++++++++++++++++++++------- 1 files changed, 24 insertions(+), 7 deletions(-) commit 796417ba5ba74188129d45f02ed3b25908866639 Author: Yoann Vandoorselaere Date: Mon Mar 28 01:30:53 2005 +0000 Always destroy the heartbeat timer, this fix a problem when using the FAILURE destroy status. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@5804 09c5ec92-17d4-0310-903a-819935f44dba src/prelude-client.c | 17 +++++++++-------- 1 files changed, 9 insertions(+), 8 deletions(-) commit 8bf2fbed154e26d9776fad01f7d4de441c612836 Author: Yoann Vandoorselaere Date: Mon Mar 28 00:51:20 2005 +0000 Plug a small memleak. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@5803 09c5ec92-17d4-0310-903a-819935f44dba src/prelude-client.c | 4 ---- 1 files changed, 0 insertions(+), 4 deletions(-) commit 72ccfef16ca53805a92de80831173bc058244b4f Author: Yoann Vandoorselaere Date: Mon Mar 28 00:49:10 2005 +0000 Avoid any modification to _prelude_generic_optlist. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@5802 09c5ec92-17d4-0310-903a-819935f44dba src/prelude.c | 11 ++++++----- 1 files changed, 6 insertions(+), 5 deletions(-) commit 6dec468ecc1b9511b713ebd9acea9f918cc106cc Author: Yoann Vandoorselaere Date: Sun Mar 27 15:33:01 2005 +0000 Only goes to the prelude specific option if it is a parent. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@5801 09c5ec92-17d4-0310-903a-819935f44dba src/prelude-option.c | 4 +++- 1 files changed, 3 insertions(+), 1 deletions(-) commit 15a99d7797a43926afb05ea7de615bd56575af67 Author: Yoann Vandoorselaere Date: Sun Mar 27 15:19:33 2005 +0000 Warning fix. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@5800 09c5ec92-17d4-0310-903a-819935f44dba src/prelude-option.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) commit 43ad58693822d45f46b3ae947f2c87b70a8145ed Author: Yoann Vandoorselaere Date: Sun Mar 27 15:14:52 2005 +0000 Separate CLI and CONF options in two different list. Always parse CONF first, but allow CLI to override CONF value. Correctly warn about prelude option out of their context. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@5799 09c5ec92-17d4-0310-903a-819935f44dba src/include/prelude-option.h | 2 +- src/prelude-option.c | 58 ++++++++++++++++++++++++++---------------- 2 files changed, 37 insertions(+), 23 deletions(-) commit 9b8ddf439e5e5091fc440f1ef659a695af72385c Author: Yoann Vandoorselaere Date: Sun Mar 27 14:40:25 2005 +0000 Use a bool where needed, decrement usage count on delete. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@5797 09c5ec92-17d4-0310-903a-819935f44dba src/prelude-plugin.c | 10 ++++++---- 1 files changed, 6 insertions(+), 4 deletions(-) commit 103a29dc3954a8985e2d74bc930ed49d2154f9e7 Author: Yoann Vandoorselaere Date: Sun Mar 27 14:22:14 2005 +0000 Require that the parent option is provided for prelude specific option, in order to not mislead the user. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@5794 09c5ec92-17d4-0310-903a-819935f44dba src/prelude-client.c | 6 +++--- src/prelude.c | 14 +++++++++++--- 2 files changed, 14 insertions(+), 6 deletions(-) commit 432a6a055e1797f3c6f3e6f4bb0bbb47ab53b12d Author: Yoann Vandoorselaere Date: Sun Mar 27 00:02:08 2005 +0000 Prefix PRI* declaration with PRELUDE_, to avoid potential namespace conflict. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@5786 09c5ec92-17d4-0310-903a-819935f44dba bindings/libprelude_perl.i | 4 +- prelude-adduser/prelude-adduser.c | 14 +- prelude-adduser/tls-register.c | 11 +- src/common.c | 2 +- src/idmef-data.c | 2 +- src/idmef-message-print.c | 16 +-- src/idmef-value-type.c | 4 +- .../GenerateIDMEFMessagePrintC.pm | 16 +-- src/include/prelude-inttypes.h.in | 157 +++++++------------ src/prelude-client-profile.c | 2 +- src/prelude-client.c | 4 +- src/prelude-connection-pool.c | 4 +- src/tls-util.c | 2 +- 13 files changed, 85 insertions(+), 153 deletions(-) commit 5b77630450d9db271cc73ba86430840af01fdff8 Author: Yoann Vandoorselaere Date: Sat Mar 26 22:58:35 2005 +0000 Prefix some private function. Re-activate the code used to assign messageid. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@5783 09c5ec92-17d4-0310-903a-819935f44dba src/common.c | 152 ++++++------------- src/config-engine.c | 6 +- src/idmef-message-write.c | 2 +- .../GenerateIDMEFMessageWriteC.pm | 2 +- src/include/common.h | 18 +-- src/prelude-client.c | 5 +- src/prelude-io.c | 2 +- src/prelude-msg.c | 2 +- src/prelude-string.c | 4 +- 9 files changed, 69 insertions(+), 124 deletions(-) commit 6bf914cd8b4ae20de5329ea199f61609fd6857e9 Author: Yoann Vandoorselaere Date: Sat Mar 26 22:54:02 2005 +0000 Update. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@5782 09c5ec92-17d4-0310-903a-819935f44dba INSTALL | 52 +++++++++++++++++++++++++--------------------------- 1 files changed, 25 insertions(+), 27 deletions(-) commit 1440869db279170edfe5d652b6fbbcb28df6dedb Author: Yoann Vandoorselaere Date: Sat Mar 26 22:53:29 2005 +0000 Remove old OpenSSL license exception. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@5781 09c5ec92-17d4-0310-903a-819935f44dba COPYING | 15 --------------- 1 files changed, 0 insertions(+), 15 deletions(-) commit eb334611261b12df1cf703984499dee63b65d38d Author: Yoann Vandoorselaere Date: Sat Mar 26 19:04:47 2005 +0000 Use getaddrinfo() instead of deprecated prelude_resolve_addr(). git-svn-id: file:///home/yoann/SVN/trunk/libprelude@5779 09c5ec92-17d4-0310-903a-819935f44dba prelude-adduser/prelude-adduser.c | 37 ++++++++++++++++++++----------------- 1 files changed, 20 insertions(+), 17 deletions(-) commit 6ad97aa8f101f75c97470298359c9675faf5d0e4 Author: Yoann Vandoorselaere Date: Sat Mar 26 12:16:52 2005 +0000 Use PRIu64. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@5771 09c5ec92-17d4-0310-903a-819935f44dba bindings/libprelude.i | 9 +-------- bindings/libprelude_perl.i | 4 ++-- 2 files changed, 3 insertions(+), 10 deletions(-) commit 4694c895aa3d7f1b2aa5895e361385100ece6480 Author: Yoann Vandoorselaere Date: Sat Mar 26 12:16:30 2005 +0000 Require libgnutls-extra 1.0.17 git-svn-id: file:///home/yoann/SVN/trunk/libprelude@5770 09c5ec92-17d4-0310-903a-819935f44dba configure.in | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) commit 2698bf68f195f26716276b339f0bf37d00b09405 Author: Yoann Vandoorselaere Date: Sat Mar 26 12:16:05 2005 +0000 Use PRIu64. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@5769 09c5ec92-17d4-0310-903a-819935f44dba src/idmef-data.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) commit 932d038adeb3109853a900fc024767efb9074c69 Author: Yoann Vandoorselaere Date: Sat Mar 26 10:48:47 2005 +0000 Fix warning on 64bits arch. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@5767 09c5ec92-17d4-0310-903a-819935f44dba src/idmef-message-read.c | Bin 77302 -> 77304 bytes .../GenerateIDMEFMessageReadC.pm | 2 +- 2 files changed, 1 insertions(+), 1 deletions(-) commit 92bff567801ab7f4b206294aab259594bae195ea Author: Yoann Vandoorselaere Date: Sat Mar 26 10:41:23 2005 +0000 Fix warning on 64 bits systems. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@5766 09c5ec92-17d4-0310-903a-819935f44dba src/prelude-client.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) commit b762bba4f669af0edc6c7ae9342c069617a0c836 Author: Yoann Vandoorselaere Date: Sat Mar 26 10:14:13 2005 +0000 Fix some warnings on 64bits systems. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@5765 09c5ec92-17d4-0310-903a-819935f44dba prelude-adduser/tls-register.c | 6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-) commit bec6ff5f5e1d571c22322938364345104706b828 Author: Sebastien Tricaud Date: Sat Mar 26 08:48:02 2005 +0000 gtkdoc: fixed spelling issues git-svn-id: file:///home/yoann/SVN/trunk/libprelude@5762 09c5ec92-17d4-0310-903a-819935f44dba INSTALL | 11 ++----- src/prelude-connection-pool.c | 66 ++++++++++++++++++++--------------------- 2 files changed, 35 insertions(+), 42 deletions(-) commit f0433fd2924a80bacb31d8840718e6491773f7bc Author: Yoann Vandoorselaere Date: Sat Mar 26 04:12:07 2005 +0000 git-svn-id: file:///home/yoann/SVN/trunk/libprelude@5761 09c5ec92-17d4-0310-903a-819935f44dba libmissing/m4/inet_ntop.m4 | 1 - 1 files changed, 0 insertions(+), 1 deletions(-) commit cb3a475da271b21a31469b1e5e3fe2ae03971a1c Author: Yoann Vandoorselaere Date: Sat Mar 26 03:44:16 2005 +0000 Remove prelude-inet from the build. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@5750 09c5ec92-17d4-0310-903a-819935f44dba docs/api/libprelude-decl.txt | 15 ---- docs/api/libprelude-sections.txt | 7 -- docs/api/tmpl/prelude-inet.sgml | 47 ----------- src/Makefile.am | 1 - src/include/Makefile.am | 1 - src/include/prelude-inet.h | 41 --------- src/prelude-inet.c | 170 -------------------------------------- 7 files changed, 0 insertions(+), 282 deletions(-) commit 62d9f689047745f06fe570dcc66f0ac96e5a4a71 Author: Yoann Vandoorselaere Date: Sat Mar 26 03:43:53 2005 +0000 Use GNUlib inet_ntop() git-svn-id: file:///home/yoann/SVN/trunk/libprelude@5749 09c5ec92-17d4-0310-903a-819935f44dba prelude-adduser/server.c | 10 ++++++++-- src/include/libmissing.h | 1 + 2 files changed, 9 insertions(+), 2 deletions(-) commit 25731de0ab8711331f6be0bb8f9bbd84b8aa6d1d Author: Yoann Vandoorselaere Date: Sat Mar 26 03:43:23 2005 +0000 Remove unused prelude-inet.h inclusion. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@5748 09c5ec92-17d4-0310-903a-819935f44dba src/prelude-connection.c | 1 - 1 files changed, 0 insertions(+), 1 deletions(-) commit b5f184d804350d758387246f329726258f8a8e80 Author: Yoann Vandoorselaere Date: Sat Mar 26 03:40:31 2005 +0000 Move prelude_sockaddr_get_inaddr() from prelude-inet.c to common.c git-svn-id: file:///home/yoann/SVN/trunk/libprelude@5747 09c5ec92-17d4-0310-903a-819935f44dba src/common.c | 20 ++++++++++++++++++++ src/include/common.h | 2 ++ 2 files changed, 22 insertions(+), 0 deletions(-) commit 1547e5be5b76186ea17975c66ff009a731f3aa90 Author: Yoann Vandoorselaere Date: Sat Mar 26 03:39:17 2005 +0000 Fix warnings. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@5746 09c5ec92-17d4-0310-903a-819935f44dba src/include/idmef-path.h | 6 ++++++ src/prelude.c | 5 ----- 2 files changed, 6 insertions(+), 5 deletions(-) commit f2fb0cdbec855c05821458785a66dd31985034f5 Author: Yoann Vandoorselaere Date: Sat Mar 26 03:38:27 2005 +0000 Update GNUlib code prior release. Include an home made inet_ntop module in place of the deprecated prelude-inet API. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@5745 09c5ec92-17d4-0310-903a-819935f44dba libmissing/Makefile.am | 22 ++--- libmissing/inet_ntop.c | 194 ++++++++++++++++++++++++++++++++++++++++++++ libmissing/inet_ntop.h | 10 +++ libmissing/m4/gettext.m4 | 8 +- libmissing/m4/gnulib.m4 | 5 +- libmissing/m4/inet_ntop.m4 | 20 +++++ libmissing/m4/lib-link.m4 | 6 +- libmissing/m4/nls.m4 | 8 ++- libmissing/m4/po.m4 | 9 ++- libmissing/m4/strdup.m4 | 6 +- libmissing/m4/strndup.m4 | 6 +- libmissing/regex.c | 55 +++++++------ 12 files changed, 295 insertions(+), 54 deletions(-) commit d9bf277ab16262ffc28560e2714f7bb30e1e5fff Author: Yoann Vandoorselaere Date: Sat Mar 26 03:36:32 2005 +0000 Some reordering. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@5744 09c5ec92-17d4-0310-903a-819935f44dba configure.in | 35 ++++++++++++++++++++--------------- 1 files changed, 20 insertions(+), 15 deletions(-) commit 5c58ea6cfe502a828b787eca5ff6368657742479 Author: Yoann Vandoorselaere Date: Fri Mar 25 19:34:33 2005 +0000 Remove hack for GnuTLS prior 1.0.17 which didn't define GNUTLS_OID_X520_DN_QUALIFIER. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@5736 09c5ec92-17d4-0310-903a-819935f44dba prelude-adduser/tls-register.c | 4 ---- 1 files changed, 0 insertions(+), 4 deletions(-) commit bf2041f95f727d71dcf904282ddc18b9cd11319b Author: Yoann Vandoorselaere Date: Fri Mar 25 19:32:58 2005 +0000 Update GnuTLS minimum version requirement to 1.0.17, since there is now an incompatibility in SRP handling between 1.0.16/1.0.17 (SRP standard is still on the move). git-svn-id: file:///home/yoann/SVN/trunk/libprelude@5735 09c5ec92-17d4-0310-903a-819935f44dba configure.in | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) commit 57e28a4c034bb9f50ceb235ccb3eace6cb48dbbb Author: Nicolas Delon Date: Fri Mar 25 18:16:49 2005 +0000 fix warning git-svn-id: file:///home/yoann/SVN/trunk/libprelude@5719 09c5ec92-17d4-0310-903a-819935f44dba bindings/libprelude.i | 11 ----------- bindings/libprelude_perl.i | 11 +++++++++++ bindings/libprelude_python.i | 11 +++++++++++ 3 files changed, 22 insertions(+), 11 deletions(-) commit abcea3f66b945c26bc3078a5c2cd8495c148fe79 Author: Yoann Vandoorselaere Date: Fri Mar 25 18:04:16 2005 +0000 Remove uneeded libtool.m4 git-svn-id: file:///home/yoann/SVN/trunk/libprelude@5718 09c5ec92-17d4-0310-903a-819935f44dba m4/libtool.m4 | 6108 --------------------------------------------------------- 1 files changed, 0 insertions(+), 6108 deletions(-) commit 356d19411e625ce5fac1eaa60ee7677e7defe83b Author: Yoann Vandoorselaere Date: Fri Mar 25 18:03:22 2005 +0000 Fix distcheck. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@5717 09c5ec92-17d4-0310-903a-819935f44dba Makefile.am | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) commit 3012d3a04087309d4ff56a89c1d1cad6b71eb180 Author: Nicolas Delon Date: Fri Mar 25 17:43:53 2005 +0000 fix perl bindings git-svn-id: file:///home/yoann/SVN/trunk/libprelude@5715 09c5ec92-17d4-0310-903a-819935f44dba bindings/perl/Prelude.pm | 21 +++++++++++++++++++++ 1 files changed, 21 insertions(+), 0 deletions(-) commit eebed9e916a3ae8820b558826a187a40d1eedd5b Author: Yoann Vandoorselaere Date: Fri Mar 25 11:42:45 2005 +0000 s/Prelude program/Prelude library/ git-svn-id: file:///home/yoann/SVN/trunk/libprelude@5709 09c5ec92-17d4-0310-903a-819935f44dba ChangeLog | 5 +++++ bindings/libprelude.i | 6 +++--- bindings/libprelude_perl.i | 2 +- bindings/libprelude_python.i | 2 +- prelude-adduser/plaintext.c | 2 +- prelude-adduser/prelude-adduser.c | 2 +- prelude-adduser/server.c | 2 +- prelude-adduser/server.h | 2 +- prelude-adduser/tls-register.c | 2 +- prelude-adduser/tls-register.h | 2 +- src/common.c | 2 +- src/config-engine.c | 2 +- src/daemonize.c | 2 +- src/idmef-additional-data.c | 2 +- src/idmef-class.c | 2 +- src/idmef-criteria-string.lex.l | 2 +- src/idmef-criteria-string.yac.y | 2 +- src/idmef-criteria.c | 6 +++--- src/idmef-criterion-value.c | 2 +- src/idmef-data.c | 2 +- src/idmef-message-print.c | 2 +- src/idmef-message-read.c | Bin 77302 -> 77302 bytes src/idmef-message-write.c | 2 +- src/idmef-path.c | 2 +- src/idmef-time.c | 2 +- src/idmef-tree-wrap.c | 2 +- src/idmef-value-type.c | 2 +- src/idmef-value.c | 2 +- src/idmef-wrappers-gen/Generate.pm | 2 +- src/idmef-wrappers-gen/GenerateDebug.pm | 2 +- src/idmef-wrappers-gen/GenerateIDMEFMessageIdH.pm | 2 +- .../GenerateIDMEFMessagePrintC.pm | 4 ++-- .../GenerateIDMEFMessagePrintH.pm | 4 ++-- .../GenerateIDMEFMessageReadC.pm | 4 ++-- .../GenerateIDMEFMessageReadH.pm | 4 ++-- .../GenerateIDMEFMessageWriteC.pm | 4 ++-- .../GenerateIDMEFMessageWriteH.pm | 4 ++-- src/idmef-wrappers-gen/GenerateIDMEFTreeData.pm | 2 +- src/idmef-wrappers-gen/GenerateIDMEFTreeWrapC.pm | 4 ++-- src/idmef-wrappers-gen/GenerateIDMEFTreeWrapH.pm | 11 +++++++++-- src/idmef-wrappers-gen/IDMEFTree.pm | 2 +- src/idmef-wrappers-gen/generator.pl | 2 +- src/idmef-wrappers-gen/idmef-tree.h | 2 +- src/include/common.h | 2 +- src/include/config-engine.h | 2 +- src/include/daemonize.h | 2 +- src/include/idmef-additional-data.h | 2 +- src/include/idmef-class.h | 2 +- src/include/idmef-criteria.h | 2 +- src/include/idmef-criterion-value.h | 2 +- src/include/idmef-data.h | 2 +- src/include/idmef-message-print.h | 2 +- src/include/idmef-message-read.h | 2 +- src/include/idmef-message-write.h | 2 +- src/include/idmef-path.h | 2 +- src/include/idmef-time.h | 2 +- src/include/idmef-tree-wrap.h | 9 ++++++++- src/include/idmef-value-type.h | 2 +- src/include/idmef-value.h | 2 +- src/include/idmef.h | 2 +- src/include/libmissing.h | 2 +- src/include/prelude-async.h | 2 +- src/include/prelude-client-profile.h | 2 +- src/include/prelude-client.h | 2 +- src/include/prelude-connection-pool.h | 2 +- src/include/prelude-connection.h | 2 +- src/include/prelude-extract.h | 2 +- src/include/prelude-failover.h | 2 +- src/include/prelude-hash.h | 2 +- src/include/prelude-ident.h | 2 +- src/include/prelude-inet.h | 2 +- src/include/prelude-inttypes.h.in | 2 +- src/include/prelude-io.h | 2 +- src/include/prelude-linked-object.h | 2 +- src/include/prelude-list.h | 2 +- src/include/prelude-log.h | 2 +- src/include/prelude-message-id.h | 2 +- src/include/prelude-msg.h | 2 +- src/include/prelude-msgbuf.h | 2 +- src/include/prelude-option-wide.h | 2 +- src/include/prelude-option.h | 2 +- src/include/prelude-plugin.h | 2 +- src/include/prelude-string.h | 2 +- src/include/prelude-timer.h | 2 +- src/include/prelude.h.in | 2 +- src/include/tls-auth.h | 2 +- src/include/tls-util.h | 2 +- src/include/variable.h | 2 +- src/libprelude-error/prelude-error.h.in | 2 +- src/prelude-async.c | 2 +- src/prelude-client-profile.c | 2 +- src/prelude-client.c | 2 +- src/prelude-connection-pool.c | 2 +- src/prelude-connection.c | 2 +- src/prelude-failover.c | 2 +- src/prelude-hash.c | 2 +- src/prelude-ident.c | 2 +- src/prelude-inet.c | 2 +- src/prelude-io.c | 2 +- src/prelude-log.c | 2 +- src/prelude-msg.c | 2 +- src/prelude-msgbuf.c | 2 +- src/prelude-option-wide.c | 2 +- src/prelude-option.c | 2 +- src/prelude-plugin.c | 2 +- src/prelude-string.c | 2 +- src/prelude-timer.c | 2 +- src/prelude.c | 2 +- src/tls-auth.c | 2 +- src/tls-util.c | 2 +- src/variable.c | 2 +- 111 files changed, 140 insertions(+), 121 deletions(-) commit 1eeba60417a1a408e8509edf57f3823297815ced Author: Yoann Vandoorselaere Date: Fri Mar 25 10:41:40 2005 +0000 Update documentation, fix it in some place due to the renaming of some variable for C++ compiler friendlyness. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@5706 09c5ec92-17d4-0310-903a-819935f44dba docs/api/libprelude-decl.txt | 118 +++++++++++++++++----- docs/api/libprelude-sections.txt | 11 ++- docs/api/tmpl/idmef-criteria.sgml | 8 +- docs/api/tmpl/idmef-criterion-value.sgml | 12 ++- docs/api/tmpl/idmef-data.sgml | 7 -- docs/api/tmpl/idmef-tree-wrap.sgml | 2 + docs/api/tmpl/idmef-value.sgml | 12 ++- docs/api/tmpl/prelude-string.sgml | 14 --- src/idmef-criteria.c | 10 +- src/idmef-tree-wrap.c | 76 +++++++------- src/idmef-wrappers-gen/GenerateIDMEFTreeWrapC.pm | 8 +- src/include/prelude-inttypes.h.in | 7 ++ 12 files changed, 181 insertions(+), 104 deletions(-) commit e1d3772323cf618be7f4b67b5b491b490ee6c1c3 Author: Yoann Vandoorselaere Date: Fri Mar 25 10:08:11 2005 +0000 More C++ compiler friendlyness. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@5705 09c5ec92-17d4-0310-903a-819935f44dba src/include/idmef-message-print.h | 8 ++++++++ 1 files changed, 8 insertions(+), 0 deletions(-) commit c1fa10453009cbf78bb8afe81aadb1623d9b962d Author: Yoann Vandoorselaere Date: Fri Mar 25 10:05:14 2005 +0000 Fix so that C++ compiler don't break on our header. Include extern "C" in most place, fix some non conforming return type, rename "new" / "operator" variable. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@5704 09c5ec92-17d4-0310-903a-819935f44dba src/idmef-criteria.c | 4 ++-- src/idmef-criterion-value.c | 8 ++++---- src/idmef-value-type.c | 10 +++++----- src/idmef-value.c | 20 ++++++++++---------- .../GenerateIDMEFMessagePrintH.pm | 8 ++++++++ src/include/idmef-additional-data.h | 8 ++++++++ src/include/idmef-criteria.h | 11 +++++++++-- src/include/idmef-criterion-value.h | 15 ++++++++++++--- src/include/idmef-data.h | 13 +++++++------ src/include/idmef-path.h | 8 ++++++++ src/include/idmef-time.h | 8 ++++++++ src/include/idmef-value-type.h | 11 +++++++++-- src/include/idmef-value.h | 13 ++++++++++--- src/include/prelude-async.h | 8 ++++++++ src/include/prelude-client-profile.h | 13 +++++++++++-- src/include/prelude-client.h | 8 ++++++++ src/include/prelude-connection-pool.h | 7 +++++++ src/include/prelude-connection.h | 6 ++++++ src/include/prelude-extract.h | 2 +- src/include/prelude-failover.h | 8 ++++++++ src/include/prelude-hash.h | 8 ++++++++ src/include/prelude-ident.h | 8 ++++++++ src/include/prelude-io.h | 9 +++++++++ src/include/prelude-list.h | 2 +- src/include/prelude-log.h | 7 +++++++ src/include/prelude-msg.h | 8 ++++++++ src/include/prelude-msgbuf.h | 8 ++++++++ src/include/prelude-option.h | 10 +++++++++- src/include/prelude-plugin.h | 8 ++++++++ src/include/prelude-string.h | 12 ++++++++---- src/include/prelude-timer.h | 8 ++++++++ src/include/prelude.h.in | 7 +++++++ src/libprelude-error/prelude-error.h.in | 11 ++++++++++- src/prelude-option.c | 8 ++++---- 34 files changed, 252 insertions(+), 51 deletions(-) commit b520d4560ef47104d2c29795a8fd040ccd387065 Author: Nicolas Delon Date: Fri Mar 25 10:00:29 2005 +0000 in idmef_foo_set_bar style functions, make a special case for the class field of idmef_analyzer_t so that libprelude can be compiled by a C++ compiler git-svn-id: file:///home/yoann/SVN/trunk/libprelude@5703 09c5ec92-17d4-0310-903a-819935f44dba src/idmef-tree-wrap.c | 72 ++++++++++---------- src/idmef-wrappers-gen/GenerateIDMEFTreeWrapC.pm | 22 ++++--- src/idmef-wrappers-gen/GenerateIDMEFTreeWrapH.pm | 4 +- src/include/idmef-tree-wrap.h | 76 +++++++++++----------- 4 files changed, 89 insertions(+), 85 deletions(-) commit 38644292620f73d325a5e6ffbd5a7f56ad2f60d8 Author: Yoann Vandoorselaere Date: Fri Mar 25 03:06:33 2005 +0000 Remove deprecated. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@5702 09c5ec92-17d4-0310-903a-819935f44dba src/include/prelude-extract.h | 19 ------------------- 1 files changed, 0 insertions(+), 19 deletions(-) commit e8b1240559a1eddd3c0ccf3238cd45cf18e4604b Author: Yoann Vandoorselaere Date: Fri Mar 25 03:06:03 2005 +0000 Give priority to command line option. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@5701 09c5ec92-17d4-0310-903a-819935f44dba src/prelude-option.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) commit c53cb178df0ba6970bde19ce3bd6c3660e315271 Author: Yoann Vandoorselaere Date: Fri Mar 25 02:47:14 2005 +0000 Avoid passing a pointer to a va_list. This cause problem on some architectures. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@5700 09c5ec92-17d4-0310-903a-819935f44dba src/prelude-log.c | 14 +++++++------- 1 files changed, 7 insertions(+), 7 deletions(-) commit e6b2310d5823f36c1be39b5760318029b5f5816d Author: Yoann Vandoorselaere Date: Fri Mar 25 02:07:40 2005 +0000 Remove outdated. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@5699 09c5ec92-17d4-0310-903a-819935f44dba docs/api/tmpl/idmef-criteria-string.yac.sgml | 16 ---------------- 1 files changed, 0 insertions(+), 16 deletions(-) commit 3a961036d010b93a7ec85a3e6f44d11dd83e5020 Author: Yoann Vandoorselaere Date: Fri Mar 25 02:06:46 2005 +0000 Update documentation, remove outdated files credit file, see the website rather. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@5698 09c5ec92-17d4-0310-903a-819935f44dba AUTHORS | 2 +- CREDITS | 25 ----------- docs/api/libprelude-decl.txt | 83 ++++++++++++++++++-------------------- docs/api/libprelude-sections.txt | 3 +- docs/api/tmpl/prelude-async.sgml | 7 +++ docs/api/tmpl/prelude-hash.sgml | 9 ++++ 6 files changed, 58 insertions(+), 71 deletions(-) commit 7dfdc7d1a31fc5db046eaecad682828b416f46e7 Author: Yoann Vandoorselaere Date: Fri Mar 25 02:00:46 2005 +0000 Copyright transfer from Nicolas Delon, Krzysztof Zaraska, and myself, to PreludeIDS Technologies. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@5697 09c5ec92-17d4-0310-903a-819935f44dba README | 24 +++++++------------ bindings/libprelude_perl.i | 4 +- bindings/libprelude_python.i | 4 +- prelude-adduser/plaintext.c | 4 +- prelude-adduser/prelude-adduser.c | 4 +- prelude-adduser/server.c | 4 +- prelude-adduser/server.h | 4 +- prelude-adduser/tls-register.c | 4 +- prelude-adduser/tls-register.h | 4 +- src/idmef-criteria.c | 2 +- src/idmef-value-type.c | 2 +- src/idmef-value.c | 4 +- src/idmef-wrappers-gen/Generate.pm | 4 +- src/idmef-wrappers-gen/GenerateDebug.pm | 4 +- src/idmef-wrappers-gen/GenerateIDMEFMessageIdH.pm | 4 +- .../GenerateIDMEFMessagePrintC.pm | 4 +- .../GenerateIDMEFMessagePrintH.pm | 8 +++--- .../GenerateIDMEFMessageReadC.pm | 4 +- .../GenerateIDMEFMessageReadH.pm | 10 ++++---- .../GenerateIDMEFMessageWriteC.pm | 4 +- .../GenerateIDMEFMessageWriteH.pm | 8 +++--- src/idmef-wrappers-gen/GenerateIDMEFTreeData.pm | 4 +- src/idmef-wrappers-gen/GenerateIDMEFTreeWrapC.pm | 4 +- src/idmef-wrappers-gen/GenerateIDMEFTreeWrapH.pm | 10 ++++---- src/idmef-wrappers-gen/IDMEFTree.pm | 4 +- src/idmef-wrappers-gen/generator.pl | 4 +- src/idmef-wrappers-gen/idmef-tree.h | 4 +- src/include/common.h | 4 +- src/include/config-engine.h | 4 +- src/include/daemonize.h | 4 +- src/include/idmef-additional-data.h | 4 +- src/include/idmef-criteria.h | 4 +- src/include/idmef-criterion-value.h | 4 +- src/include/idmef-data.h | 4 +- src/include/idmef-message-print.h | 4 +- src/include/idmef-message-read.h | 6 ++-- src/include/idmef-message-write.h | 4 +- src/include/idmef-path.h | 6 +++- src/include/idmef-time.h | 4 +- src/include/idmef-tree-wrap.h | 6 ++-- src/include/idmef-value-type.h | 4 +- src/include/idmef-value.h | 6 ++-- src/include/idmef.h | 5 ++- src/include/libmissing.h | 4 +- src/include/prelude-client.h | 4 +- src/include/prelude-connection-pool.h | 4 +- src/include/prelude-connection.h | 4 +- src/include/prelude-extract.h | 20 +++++----------- src/include/prelude-failover.h | 4 +- src/include/prelude-hash.h | 4 +- src/include/prelude-ident.h | 4 +- src/include/prelude-inet.h | 4 +- src/include/prelude-inttypes.h.in | 4 +- src/include/prelude-io.h | 4 +- src/include/prelude-linked-object.h | 4 +- src/include/prelude-list.h | 2 +- src/include/prelude-log.h | 4 +- src/include/prelude-message-id.h | 4 +- src/include/prelude-msg.h | 4 +- src/include/prelude-msgbuf.h | 4 +- src/include/prelude-option-wide.h | 4 +- src/include/prelude-option.h | 4 +- src/include/prelude-plugin.h | 4 +- src/include/prelude-string.h | 4 +- src/include/prelude-timer.h | 4 +- src/include/prelude.h.in | 4 +- src/include/tls-auth.h | 4 +- src/include/tls-util.h | 4 +- src/include/variable.h | 4 +- src/libprelude-error/prelude-error.h.in | 4 +- src/variable.c | 2 - 71 files changed, 164 insertions(+), 177 deletions(-) commit 0edf59d57aa8ecce5511a2ae19937dacc481db5a Author: Yoann Vandoorselaere Date: Fri Mar 25 01:57:35 2005 +0000 Setup atfork handler. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@5696 09c5ec92-17d4-0310-903a-819935f44dba src/include/prelude-async.h | 14 +++++--- src/prelude-async.c | 74 +++++++++++++++++++++++++++++++++---------- 2 files changed, 65 insertions(+), 23 deletions(-) commit a56e588d649e45f801beb2809a887207a4f60c28 Author: Yoann Vandoorselaere Date: Fri Mar 25 00:53:12 2005 +0000 Remove debugging spew. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@5695 09c5ec92-17d4-0310-903a-819935f44dba src/prelude-string.c | 1 - 1 files changed, 0 insertions(+), 1 deletions(-) commit 47f28b87837fdc3253634b2742c4f6b9a74f0a60 Author: Yoann Vandoorselaere Date: Fri Mar 25 00:50:15 2005 +0000 Remove debugging spew. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@5694 09c5ec92-17d4-0310-903a-819935f44dba src/config-engine.c | 2 -- 1 files changed, 0 insertions(+), 2 deletions(-) commit 06dbda3735d64832cfeecfe67211e63d1c45ee15 Author: Yoann Vandoorselaere Date: Fri Mar 25 00:49:36 2005 +0000 If value is a nul character, set it to NULL for consistency. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@5693 09c5ec92-17d4-0310-903a-819935f44dba src/prelude-option.c | 3 +++ 1 files changed, 3 insertions(+), 0 deletions(-) commit 9a92764db2abd95b27d83956b33cbca75dd9684c Author: Yoann Vandoorselaere Date: Fri Mar 25 00:35:40 2005 +0000 Avoid inserting an empty line on each save. Fix a bug when inserting a value. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@5692 09c5ec92-17d4-0310-903a-819935f44dba src/config-engine.c | 28 +++++++++++++++++----------- 1 files changed, 17 insertions(+), 11 deletions(-) commit 41196e577ee768cd0c3b93e5ce7e631290fa6b77 Author: Yoann Vandoorselaere Date: Thu Mar 24 22:49:32 2005 +0000 DESTROY is still used by the an option message git-svn-id: file:///home/yoann/SVN/trunk/libprelude@5690 09c5ec92-17d4-0310-903a-819935f44dba src/include/prelude-option.h | 3 ++- src/prelude-option.c | 1 + 2 files changed, 3 insertions(+), 1 deletions(-) commit 82ac8f5fc31cbb8e50d77cb148ac5732d799c6e2 Author: Nicolas Delon Date: Thu Mar 24 22:06:35 2005 +0000 remove obsolete function git-svn-id: file:///home/yoann/SVN/trunk/libprelude@5687 09c5ec92-17d4-0310-903a-819935f44dba src/include/prelude-client-profile.h | 2 -- 1 files changed, 0 insertions(+), 2 deletions(-) commit 607371652059144c818ebc4ddc38705e4c7e8f6d Author: Yoann Vandoorselaere Date: Thu Mar 24 21:51:30 2005 +0000 Fix gathering of path with negative index. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@5686 09c5ec92-17d4-0310-903a-819935f44dba src/idmef-path.c | 12 +++++++----- 1 files changed, 7 insertions(+), 5 deletions(-) commit bf2c279565da74d0393d77e54e6b742be5ca15f5 Author: Yoann Vandoorselaere Date: Thu Mar 24 19:32:22 2005 +0000 Make NTP tables const. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@5679 09c5ec92-17d4-0310-903a-819935f44dba src/include/ntp.h | 12 ++++++------ src/ntp.c | 12 ++++++------ 2 files changed, 12 insertions(+), 12 deletions(-) commit 06eb89c6ec523e395e45bee39309207ad141bd49 Author: Yoann Vandoorselaere Date: Thu Mar 24 19:26:26 2005 +0000 Fix bug in idmef_criteria_new_from_string where the yacc mutex was declared on the stack!? Make it global, and not static so that prelude_init() can register a fork handler for this mutex. Implemented _idmef_path_cache_lock() and _idmef_path_cache_unlock(), that iterate through the list of cached idmef_path_t object, and lock/unlock all the cached path. This is to be used by the prelude_init() fork hanbdler. Remove private symbols from the header file so that they don't get documented. Setup pthread_atfork handler in prelude_init(). Lock the criteria mutex and the cached idmef_path_t object within the prepare handler, and release them in the parent/child handler. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@5678 09c5ec92-17d4-0310-903a-819935f44dba src/idmef-criteria-string.yac.y | 21 ++++++++------ src/idmef-path.c | 60 +++++++++++++++++++++++++++++++-------- src/include/idmef-path.h | 2 - src/prelude.c | 29 +++++++++++++++++++ 4 files changed, 89 insertions(+), 23 deletions(-) commit 4167d02344990089e1d1bada6ee61255e3faf356 Author: Yoann Vandoorselaere Date: Thu Mar 24 19:11:12 2005 +0000 Forgot declaration. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@5677 09c5ec92-17d4-0310-903a-819935f44dba src/include/prelude-hash.h | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) commit feff2e7c4cb74ab0ac98167dc07ecf5c29e0a943 Author: Yoann Vandoorselaere Date: Thu Mar 24 19:10:52 2005 +0000 Implemented prelude_hash_iterate(), will be used for idmef-path atfork handler. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@5676 09c5ec92-17d4-0310-903a-819935f44dba src/prelude-hash.c | 18 +++++++++++++++++- 1 files changed, 17 insertions(+), 1 deletions(-) commit a065cadc87881c1f8807b125bd15092b5e1bcf3b Author: Yoann Vandoorselaere Date: Thu Mar 24 17:13:18 2005 +0000 Remove deprecated option type (DESTROY/ALLOW_MULTIPLE_CALL). Make prelude_option_print() take an optional output fd. Always call the commit function even if there is no sub-options. Add a PRELUDE_OPTION_PRIORITY_IMMEDIATE priority. Don't merge option anymore, at least for now. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@5670 09c5ec92-17d4-0310-903a-819935f44dba src/include/prelude-option.h | 22 +++--- src/prelude-option.c | 157 ++++++++++++++++++++++-------------------- 2 files changed, 92 insertions(+), 87 deletions(-) commit e1f13fe6494369a31e6a4a6bb9596f1cc6b21975 Author: Yoann Vandoorselaere Date: Thu Mar 24 17:07:09 2005 +0000 Add some const. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@5669 09c5ec92-17d4-0310-903a-819935f44dba src/idmef-value.c | 42 +++++++++++++++++++++--------------------- src/include/idmef-value.h | 32 ++++++++++++++++---------------- 2 files changed, 37 insertions(+), 37 deletions(-) commit 666db1dd52ac99b569379065deef916c8ed8cab0 Author: Yoann Vandoorselaere Date: Wed Mar 23 16:17:55 2005 +0000 Re-order error number. Improve the way prelude profile work. Make the configuration file for created client optional. Create a default template config file in case no configuration file is provided. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@5624 09c5ec92-17d4-0310-903a-819935f44dba Makefile.am | 16 +- docs/api/libprelude-decl.txt | 7697 ++++++++++++++-------------- docs/api/libprelude-sections.txt | 82 +- docs/api/tmpl/idmef-criteria.sgml | 2 +- docs/api/tmpl/idmef-tree-wrap.sgml | 690 +++ docs/api/tmpl/prelude-client.sgml | 88 +- docs/api/tmpl/prelude-connection-pool.sgml | 14 +- docs/api/tmpl/prelude-connection.sgml | 43 +- docs/api/tmpl/prelude-list.sgml | 44 +- prelude-adduser/prelude-adduser.c | 144 +- src/include/prelude-client-profile.h | 4 + src/include/prelude-client.h | 9 +- src/libprelude-error/err-codes.h.in | 107 +- src/prelude-client-profile.c | 69 +- src/prelude-client.c | 113 +- src/prelude-connection.c | 2 +- src/tls-auth.c | 2 +- src/tls-util.c | 2 +- 18 files changed, 5046 insertions(+), 4082 deletions(-) commit 818f732a7f5d30e2f9f377778b29a0d3c4d1c84b Author: Yoann Vandoorselaere Date: Wed Mar 23 00:21:30 2005 +0000 Mark target->interface as optional. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@5606 09c5ec92-17d4-0310-903a-819935f44dba src/idmef-tree-wrap.c | 29 ++++++++++++++++++++--------- src/idmef-wrappers-gen/idmef-tree.h | 2 +- src/include/idmef-tree-wrap.h | 2 +- 3 files changed, 22 insertions(+), 11 deletions(-) commit 28504aa508365069fdde5b4befa5bcceacb9c850 Author: Yoann Vandoorselaere Date: Wed Mar 23 00:08:36 2005 +0000 API documentation generation fixes. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@5605 09c5ec92-17d4-0310-903a-819935f44dba src/idmef-criteria.c | 10 +++++----- src/include/idmef-criteria.h | 2 +- src/include/prelude-list.h | 4 +--- src/prelude-connection-pool.c | 2 +- 4 files changed, 8 insertions(+), 10 deletions(-) commit c7d6290b98c2f42219b7b8f2fe85df743ab40c6e Author: Yoann Vandoorselaere Date: Tue Mar 22 16:20:38 2005 +0000 Handle empty string. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@5598 09c5ec92-17d4-0310-903a-819935f44dba src/config-engine.c | 3 +++ 1 files changed, 3 insertions(+), 0 deletions(-) commit d12b2ebffde619a698893d76da868455b8851932 Author: Yoann Vandoorselaere Date: Tue Mar 22 16:08:54 2005 +0000 Remove deprecated function. When reading the configuration file, don't discard data when the line is not followed by a \n. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@5597 09c5ec92-17d4-0310-903a-819935f44dba src/config-engine.c | 47 +++++++++++++++++------------------------------ 1 files changed, 17 insertions(+), 30 deletions(-) commit cf5d226686a96a9a5906f0773afe7bab7c5753ab Author: Yoann Vandoorselaere Date: Tue Mar 22 16:04:40 2005 +0000 Check prelude_option_read() return value. When idmef_address_category_to_numeric() fail, return the provided error code. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@5596 09c5ec92-17d4-0310-903a-819935f44dba src/prelude-client.c | 7 +++++-- 1 files changed, 5 insertions(+), 2 deletions(-) commit e7135b2ed20b7e1411f3503b198f2b4c3cfee800 Author: Yoann Vandoorselaere Date: Tue Mar 22 16:02:23 2005 +0000 Missing commit for previous pthread fixes. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@5595 09c5ec92-17d4-0310-903a-819935f44dba prelude-adduser/Makefile.am | 1 - 1 files changed, 0 insertions(+), 1 deletions(-) commit 4b7f8b8d731d10219044e0e2abc5a90f8f31ffae Author: Yoann Vandoorselaere Date: Mon Mar 21 18:47:56 2005 +0000 Copyright transfer from Krzysztof Zaraska, Nicolas Delon, and myself, to PreludeIDS Technologies. Include file to be finished in another commit. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@5579 09c5ec92-17d4-0310-903a-819935f44dba src/common.c | 4 +- src/config-engine.c | 4 +- src/daemonize.c | 4 +- src/idmef-additional-data.c | 4 +- src/idmef-class.c | 5 +- src/idmef-criteria-string.lex.l | 6 +- src/idmef-criteria-string.yac.y | 6 +- src/idmef-criteria.c | 4 +- src/idmef-criterion-value.c | 5 +- src/idmef-data.c | 4 +- src/idmef-message-print.c | 5 +- src/idmef-message-read.c | Bin 77257 -> 77302 bytes src/idmef-message-write.c | 6 +- src/idmef-path.c | 5 +- src/idmef-time.c | 4 +- src/idmef-tree-wrap.c | 6 +- src/idmef-value-type.c | 4 +- src/idmef-value.c | 6 +- .../GenerateIDMEFMessagePrintC.pm | 5 +- .../GenerateIDMEFMessageReadC.pm | 6 +- .../GenerateIDMEFMessageWriteC.pm | 6 +- src/idmef-wrappers-gen/GenerateIDMEFTreeWrapC.pm | 6 +- src/include/prelude-list.h | 307 ++++++++++---------- src/prelude-async.c | 4 +- src/prelude-client-profile.c | 4 +- src/prelude-client.c | 4 +- src/prelude-connection-pool.c | 4 +- src/prelude-connection.c | 4 +- src/prelude-failover.c | 4 +- src/prelude-hash.c | 4 +- src/prelude-ident.c | 4 +- src/prelude-inet.c | 4 +- src/prelude-io.c | 4 +- src/prelude-log.c | 4 +- src/prelude-msg.c | 4 +- src/prelude-msgbuf.c | 4 +- src/prelude-option-wide.c | 4 +- src/prelude-option.c | 4 +- src/prelude-plugin.c | 4 +- src/prelude-string.c | 4 +- src/prelude-timer.c | 4 +- src/prelude.c | 4 +- src/tls-auth.c | 4 +- src/tls-util.c | 4 +- src/variable.c | 4 +- 45 files changed, 253 insertions(+), 247 deletions(-) commit a7d7563b9ccdb0d3cbed1341c604867670f0b0b8 Author: Yoann Vandoorselaere Date: Mon Mar 21 18:15:37 2005 +0000 Cleanup config-engine. Handle large config line. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@5578 09c5ec92-17d4-0310-903a-819935f44dba src/config-engine.c | 201 ++++++++++++++++++++++++++++++------------- src/include/config-engine.h | 6 +- src/prelude-option.c | 6 +- 3 files changed, 147 insertions(+), 66 deletions(-) commit 7414dc6f64f39c5501636328d77056a87d1d8a46 Author: Yoann Vandoorselaere Date: Mon Mar 21 16:36:16 2005 +0000 Prefix list with _, so that it is considered private. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@5577 09c5ec92-17d4-0310-903a-819935f44dba src/include/prelude-linked-object.h | 18 +++++++++++++----- src/prelude-option.c | 25 ++++++++++++------------- 2 files changed, 25 insertions(+), 18 deletions(-) commit 52f3e471e647153942cc86cabda700acf634ab35 Author: Yoann Vandoorselaere Date: Mon Mar 21 16:18:57 2005 +0000 Remove the linked property from this object, since it doesn't really make sense, and that object can be cached. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@5576 09c5ec92-17d4-0310-903a-819935f44dba src/idmef-path.c | 4 ---- 1 files changed, 0 insertions(+), 4 deletions(-) commit b247cbb3a164193de127b0f0950ef08afd125e53 Author: Yoann Vandoorselaere Date: Mon Mar 21 16:06:56 2005 +0000 Add an optional object_id attribute. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@5575 09c5ec92-17d4-0310-903a-819935f44dba src/include/prelude-linked-object.h | 18 ++++++++++++++++-- 1 files changed, 16 insertions(+), 2 deletions(-) commit 3a9821e0ca91e802de7439812c1de67e3ea4b920 Author: Yoann Vandoorselaere Date: Mon Mar 21 16:04:01 2005 +0000 Put some call to prelude_log_debug() in place. Call option list for command line option prior to read configuration file option, so that the filename is eventually set correctly. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@5574 09c5ec92-17d4-0310-903a-819935f44dba src/prelude-option.c | 12 ++++++++++-- 1 files changed, 10 insertions(+), 2 deletions(-) commit 6d0b3ce9281ef05fa2dba867beffa8bf0e06ae5e Author: Yoann Vandoorselaere Date: Mon Mar 21 10:09:27 2005 +0000 Handle the case where we need to read a second fragment directly, without handing back to the application. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@5572 09c5ec92-17d4-0310-903a-819935f44dba src/prelude-msg.c | 7 ++++--- 1 files changed, 4 insertions(+), 3 deletions(-) commit 57de8beeed59a4e0453118cba7649e2fd704f5f8 Author: Yoann Vandoorselaere Date: Sat Mar 19 20:38:32 2005 +0000 Cleanup, better thread safety. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@5571 09c5ec92-17d4-0310-903a-819935f44dba src/prelude-async.c | 37 +++++++++++++++++++++---------------- 1 files changed, 21 insertions(+), 16 deletions(-) commit b95522d18c2061cad091996eb89f410df3e08902 Author: Yoann Vandoorselaere Date: Sat Mar 19 20:37:45 2005 +0000 Fix crash when sending fragmented message. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@5570 09c5ec92-17d4-0310-903a-819935f44dba src/prelude-msg.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) commit 8a17377ff223802a368a7886fdb5059264d3bbfb Author: Yoann Vandoorselaere Date: Sat Mar 19 15:38:11 2005 +0000 Implement function for referencing a message. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@5567 09c5ec92-17d4-0310-903a-819935f44dba src/include/prelude-msg.h | 2 ++ src/prelude-msg.c | 18 ++++++++++++++++-- 2 files changed, 18 insertions(+), 2 deletions(-) commit fa6ddc1348dec84c9cf96773fdbb7a24a21ef524 Author: Yoann Vandoorselaere Date: Sat Mar 19 13:02:43 2005 +0000 Export pthread stuff wide, so that even internal library are compiled with the good CFLAGS. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@5561 09c5ec92-17d4-0310-903a-819935f44dba configure.in | 8 ++++++-- libprelude-config.in | 2 +- src/Makefile.am | 6 +++--- 3 files changed, 10 insertions(+), 6 deletions(-) commit 5fe3afbf4aabec90effd29af9b538068055047d9 Author: Yoann Vandoorselaere Date: Sat Mar 19 11:45:35 2005 +0000 Add --pthread-cflags to libprelude-config.in. Export them in @LIBPRELUDE_PTHREAD_CFLAGS@ from libprelude.m4. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@5560 09c5ec92-17d4-0310-903a-819935f44dba libprelude-config.in | 9 ++++++++- m4/libprelude.m4 | 5 ++++- 2 files changed, 12 insertions(+), 2 deletions(-) commit ab4aeaf4526f994b3325646f343050d7214e468c Author: Yoann Vandoorselaere Date: Sat Mar 19 11:44:35 2005 +0000 Updated... git-svn-id: file:///home/yoann/SVN/trunk/libprelude@5559 09c5ec92-17d4-0310-903a-819935f44dba INSTALL | 11 ++++++++--- 1 files changed, 8 insertions(+), 3 deletions(-) commit 2b9ac038657ba8ad4d9874e37794405f4b3db200 Author: Nicolas Delon Date: Fri Mar 18 11:42:44 2005 +0000 don't wrap some unneeded functions git-svn-id: file:///home/yoann/SVN/trunk/libprelude@5548 09c5ec92-17d4-0310-903a-819935f44dba bindings/libprelude.i | 4 +++- 1 files changed, 3 insertions(+), 1 deletions(-) commit 0d95868bcf462ee4b21435f409c0ec7305330a6e Author: Yoann Vandoorselaere Date: Fri Mar 18 02:24:54 2005 +0000 Implement prelude_connection_pool_get_flags(). git-svn-id: file:///home/yoann/SVN/trunk/libprelude@5544 09c5ec92-17d4-0310-903a-819935f44dba src/include/prelude-connection-pool.h | 2 ++ src/prelude-connection-pool.c | 16 +++++++++++++++- 2 files changed, 17 insertions(+), 1 deletions(-) commit 792fc5dae628532c80ecd049465948fa0d0b02c7 Author: Yoann Vandoorselaere Date: Fri Mar 18 02:21:13 2005 +0000 Preserver default flags. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@5543 09c5ec92-17d4-0310-903a-819935f44dba src/prelude-client.c | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) commit 229555bba094d5a8381a6323bafcbee0a0dab492 Author: Yoann Vandoorselaere Date: Fri Mar 18 02:17:22 2005 +0000 Ooops. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@5542 09c5ec92-17d4-0310-903a-819935f44dba src/prelude-connection-pool.c | 24 ++++++++++++++---------- 1 files changed, 14 insertions(+), 10 deletions(-) commit 9490d298c8067fb26f07892c64bbe056cb581b79 Author: Yoann Vandoorselaere Date: Fri Mar 18 02:07:49 2005 +0000 Only create the 'global' failover if needed. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@5540 09c5ec92-17d4-0310-903a-819935f44dba src/prelude-connection-pool.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) commit d0220414d468d6a4da85d88bb36840a67e650332 Author: Yoann Vandoorselaere Date: Fri Mar 18 02:06:35 2005 +0000 Call prelude_failover_save_msg() if individual failover flush fail. Print the peer_analyzerid of the connection we a re flushing to not the address (possibly NULL). New flags: PRELUDE_CONNECTION_POOL_FLAGS_GLOBAL_FAILOVER, which is set by default when creating the prelude_connection_pool_t object. Removing this flags allow the user to suppress the use of a global failover for saving data when all connection from the same AND list are dead. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@5539 09c5ec92-17d4-0310-903a-819935f44dba src/include/prelude-connection-pool.h | 1 + src/prelude-connection-pool.c | 18 ++++++++++++------ 2 files changed, 13 insertions(+), 6 deletions(-) commit a9146bc9882028786e0063180c6b86a87824d04d Author: Yoann Vandoorselaere Date: Fri Mar 18 00:17:51 2005 +0000 Set an error source for idmef-message-read. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@5538 09c5ec92-17d4-0310-903a-819935f44dba src/idmef-message-read.c | Bin 77180 -> 77257 bytes .../GenerateIDMEFMessageReadC.pm | 1 + src/libprelude-error/err-sources.h.in | 1 + 3 files changed, 2 insertions(+), 0 deletions(-) commit 33fb1f6c16a022d79b955a88ec583d208a340eba Author: Yoann Vandoorselaere Date: Thu Mar 17 23:03:29 2005 +0000 Fix prelude-adduser argument parsing. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@5537 09c5ec92-17d4-0310-903a-819935f44dba prelude-adduser/prelude-adduser.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) commit 548ea6db9b754f907a6bac915ce3abb8c4a5365d Author: Yoann Vandoorselaere Date: Thu Mar 17 20:08:33 2005 +0000 Make prelude-adduser support requesting permission. Fix some leak. Make registration-server ask approval for register an analyzer unless --no-confirm is set. Remove old certificate for the analyzer <-> manager connection if there is any. This is especially usefull now that there might be permission problem. Change prelude_client_capability_t to prelude_client_permission_t. Remove CONNECT capability, and set this as a flags for the prelude_client_t object. Remove the permission argument to prelude_client_new(), and use a default permission scheme of PRELUDE_CONNECTION_PERMISSION_IDMEF_WRITE|PRELUDE_CONNECTION_PERMISSION_ADMIN_READ. Only allocate the connection pool in prelude-client if we get the --server-addr option. Check that PRELUDE_CLIENT_FLAGS_CONNECT is set before connecting the pool. Add a prelude_client_init() function, called by prelude_client_start(), but that might be used individually by sensor needing more granularity. Registration error are now only returned by prelude_client_init() / prelude_client_start(). When destroying the pool list of connection, reset the connection list. Make prelude_connection_connect() check that we have the minimum necessary credentials for connecting. Implemented prelude_connection_parse_permission() and prelude_connection_permission_to_string(). git-svn-id: file:///home/yoann/SVN/trunk/libprelude@5524 09c5ec92-17d4-0310-903a-819935f44dba prelude-adduser/prelude-adduser.c | 67 ++++++-- prelude-adduser/server.c | 14 +- prelude-adduser/tls-register.c | 300 ++++++++++++++++++++++++++++++--- prelude-adduser/tls-register.h | 8 +- src/include/prelude-client.h | 8 +- src/include/prelude-connection-pool.h | 2 +- src/include/prelude-connection.h | 28 ++- src/include/tls-auth.h | 5 +- src/include/tls-util.h | 3 + src/libprelude-error/err-codes.h.in | 6 +- src/prelude-client.c | 276 ++++++++++++++++++------------ src/prelude-connection-pool.c | 15 +- src/prelude-connection.c | 194 ++++++++++++++++++--- src/tls-auth.c | 16 ++- src/tls-util.c | 47 +++++- 15 files changed, 776 insertions(+), 213 deletions(-) commit af51d00931a8da7147d4a685392cca1dc6868367 Author: Yoann Vandoorselaere Date: Thu Mar 17 19:32:21 2005 +0000 API documentation work. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@5523 09c5ec92-17d4-0310-903a-819935f44dba src/idmef-tree-wrap.c | 220 ++++++++++++++++------ src/idmef-wrappers-gen/GenerateIDMEFTreeWrapC.pm | 11 +- 2 files changed, 168 insertions(+), 63 deletions(-) commit 35c920d40a09bdfc469daa3573301cead57bb1f2 Author: Nicolas Delon Date: Wed Mar 16 08:37:30 2005 +0000 fix memory leak git-svn-id: file:///home/yoann/SVN/trunk/libprelude@5513 09c5ec92-17d4-0310-903a-819935f44dba src/idmef-criterion-value.c | 1 + 1 files changed, 1 insertions(+), 0 deletions(-) commit 37d9645fd2a123b66688d9cc9e25c025c0c51199 Author: Nicolas Delon Date: Wed Mar 16 08:20:39 2005 +0000 fix possible memory leak git-svn-id: file:///home/yoann/SVN/trunk/libprelude@5512 09c5ec92-17d4-0310-903a-819935f44dba src/idmef-criterion-value.c | 8 +++++++- 1 files changed, 7 insertions(+), 1 deletions(-) commit 153359d657f6cf6f8cafa0b0a8d61624ea536da8 Author: Yoann Vandoorselaere Date: Tue Mar 15 17:59:57 2005 +0000 Make _match() function always return < 0 for error, 0 for no match, or a positive value for a successful match. Criterion value and value match specifically return the number of item matched (when the path being matched is part of a list). git-svn-id: file:///home/yoann/SVN/trunk/libprelude@5505 09c5ec92-17d4-0310-903a-819935f44dba src/idmef-criteria.c | 143 ++++++++++++++++++++++++++++++++++++++++--- src/idmef-criterion-value.c | 32 ++++++++-- src/idmef-value.c | 22 +++++-- 3 files changed, 178 insertions(+), 19 deletions(-) commit 8b4bf92c21391eb79f8fbfe23e35bb07590757c6 Author: Yoann Vandoorselaere Date: Tue Mar 15 17:04:16 2005 +0000 When retrieving a list, don't destroy the whole list value in case we want a sub-element and it is not available in one of the listed object. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@5504 09c5ec92-17d4-0310-903a-819935f44dba src/idmef-path.c | 5 ++++- 1 files changed, 4 insertions(+), 1 deletions(-) commit 32afa5cb7ffaaa1e0a8c5b074a4cc0f0c2bfa23f Author: Sebastien Tricaud Date: Tue Mar 15 15:32:47 2005 +0000 gtkdocization git-svn-id: file:///home/yoann/SVN/trunk/libprelude@5503 09c5ec92-17d4-0310-903a-819935f44dba prelude-adduser/server.c | 2 +- src/prelude-client-profile.c | 68 ++++++++++++++++++++++++++---------------- 2 files changed, 43 insertions(+), 27 deletions(-) commit b9856d8377060baa2ec889ddcffa40b26bbbdc93 Author: Sebastien Tricaud Date: Tue Mar 15 02:41:47 2005 +0000 prelude-async: gtkdocization improved, fixed spelling issues, flags enumarated git-svn-id: file:///home/yoann/SVN/trunk/libprelude@5501 09c5ec92-17d4-0310-903a-819935f44dba docs/api/libprelude-decl.txt | 7644 ++++++++++++++++++------------------ docs/api/libprelude-sections.txt | 3 +- docs/api/tmpl/idmef-tree-wrap.sgml | 4 +- docs/api/tmpl/prelude-async.sgml | 14 +- src/include/prelude-async.h | 10 +- src/prelude-async.c | 33 +- src/prelude-client.c | 2 +- src/prelude-timer.c | 4 +- 8 files changed, 3859 insertions(+), 3855 deletions(-) commit 89b71b420cf3552f88d4f6e1e7f715c67b8fdd33 Author: Yoann Vandoorselaere Date: Tue Mar 15 01:40:50 2005 +0000 Honor the absence of PRELUDE_CLIENT_FLAGS_HEARTBEAT flags on prelude_client_destroy(). git-svn-id: file:///home/yoann/SVN/trunk/libprelude@5500 09c5ec92-17d4-0310-903a-819935f44dba src/prelude-client.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) commit fec1c6e15006cecb869617fdd898e0253dc65165 Author: Nicolas Delon Date: Mon Mar 14 19:07:15 2005 +0000 bug fix: handle negative list index values git-svn-id: file:///home/yoann/SVN/trunk/libprelude@5492 09c5ec92-17d4-0310-903a-819935f44dba src/idmef-criteria-string.lex.l | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) commit cbd49939b51e3e99b342fc6a88d6c6bf6e89c13d Author: Yoann Vandoorselaere Date: Mon Mar 14 15:41:50 2005 +0000 Fix enum. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@5485 09c5ec92-17d4-0310-903a-819935f44dba src/idmef-additional-data.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) commit a10790acebfb08cd3ec2bd05b9ecf73e29c8c751 Author: Yoann Vandoorselaere Date: Mon Mar 14 14:24:09 2005 +0000 Make registration-server support IPv6 connection. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@5481 09c5ec92-17d4-0310-903a-819935f44dba prelude-adduser/server.c | 23 +++++++++++++++++------ 1 files changed, 17 insertions(+), 6 deletions(-) commit 6d5fd49f28c43cee18615320ec0e008a1bfcb8ac Author: Yoann Vandoorselaere Date: Mon Mar 14 14:06:07 2005 +0000 Make 'string' the default type for AdditionalData class, as specified by IDMEF draft 14. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@5479 09c5ec92-17d4-0310-903a-819935f44dba src/idmef-tree-wrap.c | 8 ++++---- src/idmef-wrappers-gen/idmef-tree.h | 4 ++-- src/include/idmef-tree-wrap.h | 4 ++-- 3 files changed, 8 insertions(+), 8 deletions(-) commit 4cc329432af029b50621caf045f9b9f2aba6e306 Author: Yoann Vandoorselaere Date: Sat Mar 12 18:25:20 2005 +0000 Add some missing template. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@5470 09c5ec92-17d4-0310-903a-819935f44dba docs/api/tmpl/idmef-additional-data.sgml | 896 ++++++++++++++++++++++++++++ docs/api/tmpl/idmef-message-print.sgml | 294 +++++++++ docs/api/tmpl/idmef-path.sgml | 346 +++++++++++ docs/api/tmpl/prelude-connection-pool.sgml | 246 ++++++++ docs/api/tmpl/prelude-msg.sgml | 231 +++++++ docs/api/tmpl/prelude-msgbuf.sgml | 120 ++++ docs/api/tmpl/prelude-string.sgml | 351 +++++++++++ 7 files changed, 2484 insertions(+), 0 deletions(-) commit 50eb6fd816eac37317bb4d64452010587e7aea93 Author: Yoann Vandoorselaere Date: Sat Mar 12 18:21:51 2005 +0000 More documentation work. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@5469 09c5ec92-17d4-0310-903a-819935f44dba docs/api/libprelude-decl.txt | 136 +++--- docs/api/libprelude-docs.sgml | 53 ++- docs/api/libprelude-sections.txt | 77 +--- docs/api/tmpl/idmef-criterion-value.sgml | 27 ++ docs/api/tmpl/idmef-message-read.sgml | 30 ++ docs/api/tmpl/idmef-message-write.sgml | 59 +++- docs/api/tmpl/idmef-time.sgml | 139 ++++-- docs/api/tmpl/idmef-tree-wrap.sgml | 690 ------------------------------ docs/api/tmpl/prelude-client.sgml | 1 - 9 files changed, 320 insertions(+), 892 deletions(-) commit ca6b8277c24595206ba12c407cb7fcc1a43adf88 Author: Yoann Vandoorselaere Date: Sat Mar 12 18:21:24 2005 +0000 Don't define the SYSTEM constant within the enumeration, to avoid gtk-doc clash. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@5468 09c5ec92-17d4-0310-903a-819935f44dba src/libprelude-error/prelude-error.h.in | 5 +++-- 1 files changed, 3 insertions(+), 2 deletions(-) commit 750a4bc87cb32822e2c5a5acb245971fe9f8b1b6 Author: Yoann Vandoorselaere Date: Sat Mar 12 18:20:50 2005 +0000 Add some missing helper. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@5467 09c5ec92-17d4-0310-903a-819935f44dba src/idmef-time.c | 282 +++++++++++++++++++++++++++++++++++++++++----- src/include/idmef-time.h | 19 ++-- 2 files changed, 265 insertions(+), 36 deletions(-) commit f77e3477832fc3d01fa9a452bc30c034e826c994 Author: Yoann Vandoorselaere Date: Sat Mar 12 18:20:16 2005 +0000 API documentation work. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@5466 09c5ec92-17d4-0310-903a-819935f44dba src/include/prelude-connection-pool.h | 6 +- src/prelude-connection-pool.c | 215 ++++++++++++++++++++++++++++----- 2 files changed, 185 insertions(+), 36 deletions(-) commit 1f755c602a09eabc8d355b00d2f2c45f72ffddb8 Author: Yoann Vandoorselaere Date: Sat Mar 12 16:16:39 2005 +0000 API documentation work. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@5465 09c5ec92-17d4-0310-903a-819935f44dba src/idmef-message-print.c | 240 ++++ src/idmef-message-read.c | Bin 67980 -> 77180 bytes src/idmef-message-write.c | 1452 +++++++++++++++----- .../GenerateIDMEFMessagePrintC.pm | 8 + .../GenerateIDMEFMessageReadC.pm | 10 + .../GenerateIDMEFMessageWriteC.pm | 117 +- .../GenerateIDMEFMessageWriteH.pm | 4 +- src/include/idmef-message-write.h | 62 +- 8 files changed, 1450 insertions(+), 443 deletions(-) commit 30d20abcf3589f71e97549ca2ac3cca733f62179 Author: Yoann Vandoorselaere Date: Sat Mar 12 03:11:04 2005 +0000 ... Fix for snapshot generation... Hopefully it'll work this time and I can go to bed. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@5460 09c5ec92-17d4-0310-903a-819935f44dba autogen.sh | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) commit 4bf8c955a8a3e6cff9fa5ac561bd05a62e2d3262 Author: Yoann Vandoorselaere Date: Sat Mar 12 03:06:44 2005 +0000 Move gtkdocize before anything else. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@5459 09c5ec92-17d4-0310-903a-819935f44dba autogen.sh | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) commit 16d44659bdff72d05793870668ee42829f9afdfe Author: Yoann Vandoorselaere Date: Sat Mar 12 02:55:40 2005 +0000 Pass --copy to gtkdocize git-svn-id: file:///home/yoann/SVN/trunk/libprelude@5458 09c5ec92-17d4-0310-903a-819935f44dba autogen.sh | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) commit 7843ce5159367e7d2ac82f40ed06c93ae1498efc Author: Yoann Vandoorselaere Date: Sat Mar 12 02:43:37 2005 +0000 API documentation work. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@5457 09c5ec92-17d4-0310-903a-819935f44dba docs/api/libprelude-decl.txt | 30 ++++- docs/api/libprelude-docs.sgml | 12 +- docs/api/tmpl/idmef-tree-wrap.sgml | 79 +++++++++++++- docs/api/tmpl/prelude-client.sgml | 128 +++++++++++++++++++++ docs/api/tmpl/prelude.sgml | 18 +++- src/idmef-path.c | 220 ++++++++++++++++++++++++++++++++++- src/include/idmef-path.h | 16 ++-- src/include/prelude.h.in | 9 ++- src/prelude-client.c | 4 +- src/prelude.c | 32 +++++- 10 files changed, 514 insertions(+), 34 deletions(-) commit 4184f4552a004c84691f7f15009916e09f1a45c5 Author: Yoann Vandoorselaere Date: Fri Mar 11 15:38:45 2005 +0000 Allow the user to retrieve the value type and the value itself. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@5450 09c5ec92-17d4-0310-903a-819935f44dba src/idmef-criterion-value.c | 21 +++++++++++++++++++-- src/include/idmef-criterion-value.h | 11 +++++++++++ 2 files changed, 30 insertions(+), 2 deletions(-) commit 81a4c76ac03be27604484e3dfe44d3e88cac1546 Author: Yoann Vandoorselaere Date: Fri Mar 11 15:02:42 2005 +0000 Warn and exit if gtkdocize is not available. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@5449 09c5ec92-17d4-0310-903a-819935f44dba autogen.sh | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) commit 3a78202832edc08cca6c001af44f33ba5e79e569 Author: Yoann Vandoorselaere Date: Fri Mar 11 11:54:12 2005 +0000 idmef-value: Implemented idmef_value_print(). Renamed idmef-value-relation to idmef-criterion-operator. idmef-path: Change undefined and forbidden index reserved value so that they don't conflict with the specific value (-1) used to access last list member. Avoid rebuilding the whole path name when it's not needed. Fix a bug with enum value retrieval. Make most of idmef-path function take a depth argument, so that you can dichotomize a path. Fix idmef_path_compare(), and implement idmef_path_ncompare(). Remove deprecated idmef_path_get_numeric(). idmef-criterion-value: Make the API decent. Use function pointer. Implement the regex operator using pcreposix if available, or regular POSIX.2 regex. Remove non-linear time handling, since this is unused and really should be done ina separate module. libmissing: Include regex module. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@5444 09c5ec92-17d4-0310-903a-819935f44dba Makefile.am | 2 + autogen.sh | 2 + configure.in | 52 +- libmissing/Makefile.am | 10 +- libmissing/gettext.h | 12 +- libmissing/m4/gettext.m4 | 84 +- libmissing/m4/glibc2.m4 | 30 + libmissing/m4/gnulib.m4 | 5 +- libmissing/m4/intdiv0.m4 | 8 +- libmissing/m4/intmax.m4 | 12 +- libmissing/m4/inttypes-pri.m4 | 8 +- libmissing/m4/inttypes.m4 | 8 +- libmissing/m4/isc-posix.m4 | 8 +- libmissing/m4/lcmessage.m4 | 20 +- libmissing/m4/lib-link.m4 | 8 +- libmissing/m4/lib-prefix.m4 | 6 +- libmissing/m4/nls.m4 | 8 +- libmissing/m4/po.m4 | 26 +- libmissing/m4/printf-posix.m4 | 8 +- libmissing/m4/progtest.m4 | 15 +- libmissing/m4/regex.m4 | 126 + libmissing/regex.c | 8295 +++++++++++++++++++++++++++++++++++ libmissing/regex.h | 556 +++ libmissing/vasnprintf.c | 7 +- src/Makefile.am | 2 +- src/idmef-class.c | 7 +- src/idmef-criteria-string.yac.y | 34 +- src/idmef-criteria.c | 219 +- src/idmef-criterion-value.c | 817 +--- src/idmef-path.c | 288 +- src/idmef-value-type.c | 88 +- src/idmef-value.c | 115 +- src/include/idmef-criteria.h | 21 +- src/include/idmef-criterion-value.h | 59 +- src/include/idmef-message-id.h | 286 +- src/include/idmef-path.h | 44 +- src/include/idmef-value-type.h | 20 +- src/include/idmef-value.h | 16 +- 38 files changed, 9840 insertions(+), 1492 deletions(-) commit 7cea857417ea7f665ad54757d6e10e66ffd3e363 Author: Yoann Vandoorselaere Date: Fri Mar 11 11:44:04 2005 +0000 Big documentation update. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@5443 09c5ec92-17d4-0310-903a-819935f44dba docs/api/Makefile.am | 198 +- docs/api/libprelude-decl.txt | 5142 ++++++++------------------ docs/api/libprelude-docs.sgml | 140 +- docs/api/libprelude-sections.txt | 658 +--- docs/api/tmpl/client-ident.sgml | 16 - docs/api/tmpl/common-gdb.sgml | 48 - docs/api/tmpl/common.sgml | 105 - docs/api/tmpl/config-engine.sgml | 94 - docs/api/tmpl/config.sgml | 16 - docs/api/tmpl/daemonize.sgml | 25 - docs/api/tmpl/extract.sgml | 42 - docs/api/tmpl/getopt_long.sgml | 16 - docs/api/tmpl/idmef-criteria-string.sgml | 16 - docs/api/tmpl/idmef-criteria-string.yac.sgml | 104 - docs/api/tmpl/idmef-criteria.sgml | 39 +- docs/api/tmpl/idmef-criterion-value.sgml | 236 +-- docs/api/tmpl/idmef-data.sgml | 8 +- docs/api/tmpl/idmef-message-id-format.sgml | 16 - docs/api/tmpl/idmef-message-id.sgml | 1017 ----- docs/api/tmpl/idmef-msg-send.sgml | 420 --- docs/api/tmpl/idmef-string.sgml | 248 -- docs/api/tmpl/idmef-time.sgml | 16 + docs/api/tmpl/idmef-tree-data.sgml | 38 - docs/api/tmpl/idmef-tree-func.sgml | 486 --- docs/api/tmpl/idmef-tree-print.sgml | 286 -- docs/api/tmpl/idmef-tree-to-string.sgml | 16 - docs/api/tmpl/idmef-tree-wrap.sgml | 1926 +--------- docs/api/tmpl/idmef-tree.sgml | 117 - docs/api/tmpl/idmef-util.sgml | 16 - docs/api/tmpl/idmef-value-object.sgml | 26 - docs/api/tmpl/idmef-value-type.sgml | 131 - docs/api/tmpl/idmef-value.sgml | 38 +- docs/api/tmpl/libmissing.sgml | 16 - docs/api/tmpl/list.sgml | 88 - docs/api/tmpl/ntp.sgml | 144 - docs/api/tmpl/plugin-common-prv.sgml | 113 - docs/api/tmpl/plugin-common.sgml | 155 - docs/api/tmpl/prelude-async.sgml | 1 - docs/api/tmpl/prelude-auth.sgml | 82 - docs/api/tmpl/prelude-client-mgr.sgml | 55 - docs/api/tmpl/prelude-client.sgml | 10 +- docs/api/tmpl/prelude-connection-mgr.sgml | 16 - docs/api/tmpl/prelude-connection.sgml | 13 +- docs/api/tmpl/prelude-failover.sgml | 6 + docs/api/tmpl/prelude-getopt-wide.sgml | 92 - docs/api/tmpl/prelude-getopt.sgml | 470 --- docs/api/tmpl/prelude-hash.sgml | 7 + docs/api/tmpl/prelude-ident.sgml | 6 + docs/api/tmpl/prelude-inet.sgml | 1 + docs/api/tmpl/prelude-io.sgml | 7 + docs/api/tmpl/prelude-linked-object.sgml | 4 - docs/api/tmpl/prelude-list.sgml | 8 + docs/api/tmpl/prelude-log.sgml | 9 - docs/api/tmpl/prelude-message-buffered.sgml | 83 - docs/api/tmpl/prelude-message-id.sgml | 254 -- docs/api/tmpl/prelude-message.sgml | 288 -- docs/api/tmpl/prelude-path.sgml | 96 - docs/api/tmpl/prelude-plugin.sgml | 11 +- docs/api/tmpl/prelude-stdint.sgml | 16 - docs/api/tmpl/prelude-strbuf.sgml | 118 - docs/api/tmpl/prelude-timer-config.sgml | 16 - docs/api/tmpl/sensor.sgml | 110 - docs/api/tmpl/ssl-gencrypto.sgml | 29 - docs/api/tmpl/ssl-register.sgml | 27 - docs/api/tmpl/ssl-registration-msg.sgml | 179 - docs/api/tmpl/ssl-settings.sgml | 25 - docs/api/tmpl/ssl.sgml | 33 - docs/api/tmpl/string-matching.sgml | 88 - docs/api/tmpl/thread.sgml | 16 - docs/api/tmpl/threads.sgml | 16 - docs/api/tmpl/timer.sgml | 28 - docs/api/tmpl/tls-auth.sgml | 38 - docs/api/tmpl/tls-util.sgml | 55 - docs/api/tmpl/variable.sgml | 44 - 74 files changed, 1936 insertions(+), 12637 deletions(-) commit 0dd9e077465029dc2412a4f745abbb6167507be6 Author: Yoann Vandoorselaere Date: Fri Mar 11 11:42:01 2005 +0000 Prefix all IDMEF message ID with IDMEF_ git-svn-id: file:///home/yoann/SVN/trunk/libprelude@5442 09c5ec92-17d4-0310-903a-819935f44dba src/idmef-message-read.c | Bin 66888 -> 67980 bytes src/idmef-message-write.c | 342 ++++++++++---------- src/idmef-wrappers-gen/GenerateIDMEFMessageIdH.pm | 8 +- .../GenerateIDMEFMessageReadC.pm | 6 +- .../GenerateIDMEFMessageWriteC.pm | 10 +- 5 files changed, 183 insertions(+), 183 deletions(-) commit ad14fe64932202706de3940242b101b7530054db Author: Yoann Vandoorselaere Date: Fri Mar 11 11:39:39 2005 +0000 distcheck fix. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@5441 09c5ec92-17d4-0310-903a-819935f44dba bindings/Makefile.am | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) commit 163f51c11d41b7ea6bb81936748b30dce4a8c1fc Author: Yoann Vandoorselaere Date: Fri Mar 11 11:37:31 2005 +0000 distcheck fix... git-svn-id: file:///home/yoann/SVN/trunk/libprelude@5440 09c5ec92-17d4-0310-903a-819935f44dba src/libprelude-error/Makefile.am | 4 ++++ 1 files changed, 4 insertions(+), 0 deletions(-) commit 8190df81e407958b8f666644c4339e67c631cc02 Author: Yoann Vandoorselaere Date: Tue Mar 8 18:26:26 2005 +0000 Fix invalid index increment. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@5439 09c5ec92-17d4-0310-903a-819935f44dba src/idmef-tree-wrap.c | 14 +++++++------- src/idmef-wrappers-gen/GenerateIDMEFTreeWrapC.pm | 2 -- 2 files changed, 7 insertions(+), 9 deletions(-) commit 8591e285d18b3e34fe2f1a7986b1f398994df970 Author: Yoann Vandoorselaere Date: Tue Mar 8 15:00:28 2005 +0000 Remove all get_*_value() function. Theses shouldn't be public. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@5438 09c5ec92-17d4-0310-903a-819935f44dba src/idmef-tree-wrap.c | 3321 +++------------------- src/idmef-wrappers-gen/GenerateIDMEFTreeData.pm | 2 - src/idmef-wrappers-gen/GenerateIDMEFTreeWrapC.pm | 281 +-- src/idmef-wrappers-gen/GenerateIDMEFTreeWrapH.pm | 6 +- src/include/idmef-tree-data.h | 3 - src/include/idmef-tree-wrap.h | 155 - 6 files changed, 525 insertions(+), 3243 deletions(-) commit 4b19bd259e5443ac70dfcb4a4ea5661f33d87eb8 Author: Nicolas Delon Date: Sun Mar 6 13:19:10 2005 +0000 fix bad file name git-svn-id: file:///home/yoann/SVN/trunk/libprelude@5419 09c5ec92-17d4-0310-903a-819935f44dba bindings/libprelude.i | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) commit bb2dec369022a18faaaf2250b028ffd536eb9139 Author: Yoann Vandoorselaere Date: Sun Mar 6 13:11:18 2005 +0000 Make idmef-type consistant with the rest of the API since we finally decided to make it public (rename to idmef-class). Make idmef-path provide the ability to retrieve last element of a list by specifying an index of -1. Allow to retrieve a path element from a path, might be useful for application that wish to access different elements of a path separatly: implemented idmef_path_get_depth(), idmef_path_get_element(), idmef_path_get_element_value_type(), idmef_path_get_element_class(). In IDMEF destroy internal functions, always unitialize the members of a list even if we don't destroy them because of the refcount, since when destroying the object, it will lead to an invalid pointer dereference. When calling IDMEF function for setting a list member, always call prelude_list_del_init() if the provided object list is not empty. Avoid potential list mistake. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@5418 09c5ec92-17d4-0310-903a-819935f44dba bindings/Makefile.am | 2 +- docs/api/libprelude-decl.txt | 1085 ++++++++++++--------- docs/api/libprelude-docs.sgml | 12 +- docs/api/libprelude-sections.txt | 241 +++--- docs/api/tmpl/common.sgml | 9 + docs/api/tmpl/idmef-criteria-string.sgml | 10 - docs/api/tmpl/idmef-criteria.sgml | 10 + docs/api/tmpl/idmef-message-id-format.sgml | 7 - docs/api/tmpl/idmef-message-id.sgml | 26 +- docs/api/tmpl/idmef-tree-data.sgml | 2 +- docs/api/tmpl/idmef-tree-wrap.sgml | 494 +++++++--- docs/api/tmpl/idmef-tree.sgml | 8 + docs/api/tmpl/idmef-type.sgml | 160 ---- docs/api/tmpl/idmef-value-type.sgml | 2 +- docs/api/tmpl/idmef-value.sgml | 20 +- docs/api/tmpl/prelude-client.sgml | 1 + docs/api/tmpl/prelude-log.sgml | 37 +- docs/api/tmpl/tls-util.sgml | 10 + src/Makefile.am | 2 +- src/idmef-class.c | 162 ++++ src/idmef-path.c | 254 +++--- src/idmef-tree-wrap.c | 456 ++++++---- src/idmef-type.c | 198 ---- src/idmef-value.c | 56 +- src/idmef-wrappers-gen/GenerateIDMEFTreeData.pm | 26 +- src/idmef-wrappers-gen/GenerateIDMEFTreeWrapC.pm | 30 +- src/idmef-wrappers-gen/GenerateIDMEFTreeWrapH.pm | 8 +- src/include/Makefile.am | 2 +- src/include/idmef-class.h | 73 ++ src/include/idmef-path.h | 18 +- src/include/idmef-tree-data.h | 132 ++-- src/include/idmef-tree-wrap.h | 222 +++--- src/include/idmef-type.h | 60 -- src/include/idmef-value-type.h | 2 +- src/include/idmef-value.h | 12 +- src/include/idmef.h | 2 +- 36 files changed, 2144 insertions(+), 1707 deletions(-) commit 18374d1e8b89e3daf8f1e1b2d0446ffe5e073fb1 Author: Yoann Vandoorselaere Date: Sun Mar 6 11:40:49 2005 +0000 Fix a crash when sending fragmented message. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@5414 09c5ec92-17d4-0310-903a-819935f44dba src/prelude-msgbuf.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) commit 9647d24a1f5f63602ed1eac18ee40a6e3d723441 Author: Yoann Vandoorselaere Date: Fri Mar 4 15:59:02 2005 +0000 Correct option priority numbering. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@5406 09c5ec92-17d4-0310-903a-819935f44dba src/include/prelude-option.h | 6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-) commit 500184f9b30be75364081c43fdeccf0d0ba6790b Author: Yoann Vandoorselaere Date: Fri Mar 4 15:58:29 2005 +0000 Remove unused check_option_noarg(). Kill warning, remove old code. Fix prioritized option insertion ordering. Always process the whole option set together, since some option might depend on option set from another context. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@5405 09c5ec92-17d4-0310-903a-819935f44dba src/prelude-option.c | 60 ++++++++++---------------------------------------- 1 files changed, 12 insertions(+), 48 deletions(-) commit 13465007a4194de4baccb71a04c0149102007a87 Author: Yoann Vandoorselaere Date: Fri Mar 4 13:17:09 2005 +0000 Handle case were idmef_path_get() return 0 (no value retrieved). git-svn-id: file:///home/yoann/SVN/trunk/libprelude@5404 09c5ec92-17d4-0310-903a-819935f44dba src/idmef-criteria.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) commit 1255eb5898ec9fec2bdf1e3172a3179ff74da491 Author: Yoann Vandoorselaere Date: Fri Mar 4 09:42:13 2005 +0000 Fix to_string() open addressed hash table size calculation. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@5400 09c5ec92-17d4-0310-903a-819935f44dba src/idmef-tree-wrap.c | 40 +++++++++++----------- src/idmef-wrappers-gen/GenerateIDMEFTreeWrapC.pm | 2 +- 2 files changed, 21 insertions(+), 21 deletions(-) commit 3ae869c25f09299e1a4db0bb9cd5cc59f5471889 Author: Yoann Vandoorselaere Date: Fri Mar 4 09:21:47 2005 +0000 It has been decided to stop implementing recursive analyzer the way they are defined in IDMEF since it prevent to do any kind of 'dynamic' filtering since we don't know the element depth. Rather we now implement analyzer as a list, and provide compatibility when exporting to XML. This is the solution we came up with when talking with one of the IDWG chair. Also, modify list related function so that they take a 'pos' argument. You can now say whether the object should be positionned at the beginning, the end, or any relative position. Modify the _new_child() function used by idmef-path so that it error out if an user ask to create an index for which lower index have not been created. This avoid creating as much empty index as the user specified. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@5392 09c5ec92-17d4-0310-903a-819935f44dba src/idmef-message-print.c | 69 +- src/idmef-message-read.c | Bin 67012 -> 66888 bytes src/idmef-message-write.c | 32 +- src/idmef-tree-wrap.c | 3073 +++++++++----------- .../GenerateIDMEFMessageReadC.pm | 24 +- src/idmef-wrappers-gen/GenerateIDMEFTreeData.pm | 6 +- src/idmef-wrappers-gen/GenerateIDMEFTreeWrapC.pm | 135 +- src/idmef-wrappers-gen/GenerateIDMEFTreeWrapH.pm | 4 +- src/idmef-wrappers-gen/idmef-tree.h | 12 +- src/include/idmef-tree-data.h | 73 +- src/include/idmef-tree-wrap.h | 114 +- src/libprelude-error/err-codes.h.in | 20 +- src/prelude-client.c | 6 +- 13 files changed, 1659 insertions(+), 1909 deletions(-) commit 256fa6601b88d857ca65952be9ebe9466f976ab4 Author: Yoann Vandoorselaere Date: Fri Mar 4 09:15:40 2005 +0000 Make children_list_t pointer const (future checkin will make the idmef-tree-data defined object table const), so this is needed to avoid warning. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@5391 09c5ec92-17d4-0310-903a-819935f44dba src/idmef-type.c | 12 ++++++------ 1 files changed, 6 insertions(+), 6 deletions(-) commit 7925049cb9f2a6d4d1c84bd98a53ed50ba74e656 Author: Yoann Vandoorselaere Date: Fri Mar 4 09:14:44 2005 +0000 Make ops_tbl table const. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@5390 09c5ec92-17d4-0310-903a-819935f44dba src/idmef-value-type.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) commit 554c31119aafbf924f6b954ac8ce26336f4671a7 Author: Yoann Vandoorselaere Date: Fri Mar 4 09:11:32 2005 +0000 Make table const. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@5389 09c5ec92-17d4-0310-903a-819935f44dba src/idmef-additional-data.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) commit b2ec8c01b71366a253535246e504b8013ff5de07 Author: Nicolas Delon Date: Wed Mar 2 16:45:50 2005 +0000 initialize the metatype field of union members git-svn-id: file:///home/yoann/SVN/trunk/libprelude@5388 09c5ec92-17d4-0310-903a-819935f44dba src/idmef-wrappers-gen/IDMEFTree.pm | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) commit e2492d3654b84754baef6d00549ed399a428ee2f Author: Nicolas Delon Date: Wed Mar 2 11:43:15 2005 +0000 initialize source_id and request_id values git-svn-id: file:///home/yoann/SVN/trunk/libprelude@5387 09c5ec92-17d4-0310-903a-819935f44dba bindings/libprelude.i | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) commit ee9d57f4408b5a6ae0d81efbbc0accd49b729a52 Author: Yoann Vandoorselaere Date: Mon Feb 28 13:50:33 2005 +0000 Complete IDMEFv14 compliance. Add missing UserID.tty and Heartbeat.heartbeat_interval. Numeric confidence are not an optional integer (the rating is used to decide whether to use the field or not). Remove unique messageID generation from prelude-client, this is not neeeded anymore. Make all ident string, in order to conform to IDMEF (discussion for changing theses to integer has failed). This should not impact performance, since we use our own ident system on top of the IDMEF ident. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@5356 09c5ec92-17d4-0310-903a-819935f44dba src/idmef-message-print.c | 304 ++++-- src/idmef-message-read.c | Bin 66150 -> 67012 bytes src/idmef-message-write.c | 66 +- src/idmef-tree-wrap.c | 1194 +++++++++++++++------- src/idmef-wrappers-gen/GenerateIDMEFTreeWrapC.pm | 1 + src/idmef-wrappers-gen/idmef-tree.h | 47 +- src/include/idmef-message-id.h | 16 +- src/include/idmef-tree-data.h | 41 +- src/include/idmef-tree-wrap.h | 165 ++-- src/prelude-client.c | 77 +- 10 files changed, 1239 insertions(+), 672 deletions(-) commit 3304a4927827cc9901c6cb708e9c4bd44c9318e9 Author: Yoann Vandoorselaere Date: Sun Feb 27 01:12:36 2005 +0000 Remove unused. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@5349 09c5ec92-17d4-0310-903a-819935f44dba src/prelude-client.c | 1 - 1 files changed, 0 insertions(+), 1 deletions(-) commit 25682a92bbd2e84f37c1698a4f33e7a210a3eb4f Author: Nicolas Delon Date: Sat Feb 26 09:36:55 2005 +0000 set message priority according idmef impact severity git-svn-id: file:///home/yoann/SVN/trunk/libprelude@5341 09c5ec92-17d4-0310-903a-819935f44dba src/idmef-message-write.c | 61 +++++++++++++------- .../GenerateIDMEFMessageWriteC.pm | 18 ++++-- 2 files changed, 54 insertions(+), 25 deletions(-) commit 1b54179ab75875c1117af814c63bc7e2ade12a10 Author: Yoann Vandoorselaere Date: Fri Feb 25 16:39:12 2005 +0000 Rename idmef_criteria_new_string() to idmef_criteria_new_from_string() for API conformance. Remove idmef-criteria-string.h and move the definition to idmef-criteria.h. Update header copyright. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@5337 09c5ec92-17d4-0310-903a-819935f44dba bindings/Makefile.am | 2 +- bindings/libprelude.i | 1 - src/idmef-criteria-string.yac.y | 4 ++-- src/include/Makefile.am | 1 - src/include/idmef-criteria-string.h | 30 ------------------------------ src/include/idmef-criteria.h | 5 +++-- src/include/idmef.h | 1 - 7 files changed, 6 insertions(+), 38 deletions(-) commit 494d5e2da5fca337a0e950e4b42c972101cff30f Author: Yoann Vandoorselaere Date: Fri Feb 25 15:37:29 2005 +0000 Remove deprecated idmef-message-id-format.h git-svn-id: file:///home/yoann/SVN/trunk/libprelude@5334 09c5ec92-17d4-0310-903a-819935f44dba src/include/Makefile.am | 1 - src/include/idmef-message-id-format.h | 29 ----------------------------- 2 files changed, 0 insertions(+), 30 deletions(-) commit 3016df801d6bf8ff5c5b35c3d1f9c10c3a3d0c9b Author: Yoann Vandoorselaere Date: Fri Feb 25 11:26:27 2005 +0000 Implemented unset of vlan num attribute. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@5329 09c5ec92-17d4-0310-903a-819935f44dba src/prelude-client.c | 8 ++++++-- 1 files changed, 6 insertions(+), 2 deletions(-) commit 5bb11d54bd11d882b3473fc5f65c7a4719a30a63 Author: Yoann Vandoorselaere Date: Fri Feb 25 11:15:47 2005 +0000 Implemented function for un-setting optional integer. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@5328 09c5ec92-17d4-0310-903a-819935f44dba src/idmef-tree-wrap.c | 133 ++++++++++++++++++++++ src/idmef-wrappers-gen/GenerateIDMEFTreeWrapC.pm | 7 + src/idmef-wrappers-gen/GenerateIDMEFTreeWrapH.pm | 4 + src/include/idmef-tree-wrap.h | 19 +++ 4 files changed, 163 insertions(+), 0 deletions(-) commit daf2c6d1499fca08b060c299a2c619373d9d65a6 Author: Yoann Vandoorselaere Date: Thu Feb 24 19:26:14 2005 +0000 Cleanup. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@5323 09c5ec92-17d4-0310-903a-819935f44dba src/idmef-criteria.c | 5 ++--- 1 files changed, 2 insertions(+), 3 deletions(-) commit 2096d484f4a310c1b3ee3f97c20556f4538d7a29 Author: Nicolas Delon Date: Thu Feb 24 16:53:42 2005 +0000 check pointer value before attempting to clone the object destroy sub objects if the main object creation fail git-svn-id: file:///home/yoann/SVN/trunk/libprelude@5320 09c5ec92-17d4-0310-903a-819935f44dba src/idmef-criteria.c | 18 ++++++++++++++---- 1 files changed, 14 insertions(+), 4 deletions(-) commit e7ed2d55be51c1abfd365af72e16745511d3c850 Author: Yoann Vandoorselaere Date: Thu Feb 24 16:27:55 2005 +0000 Rework prelude-log API to extend DEBUG message handling. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@5318 09c5ec92-17d4-0310-903a-819935f44dba src/include/prelude-log.h | 24 +++++++---- src/prelude-log.c | 92 +++++++++++++++++++++----------------------- 2 files changed, 59 insertions(+), 57 deletions(-) commit 8f98c306d9cce167643b11660ac34287c632dd99 Author: Nicolas Delon Date: Thu Feb 24 15:49:17 2005 +0000 bug fix: check pointer values before attempting to clone objects git-svn-id: file:///home/yoann/SVN/trunk/libprelude@5316 09c5ec92-17d4-0310-903a-819935f44dba src/idmef-criteria.c | 28 ++++++++++++++++------------ 1 files changed, 16 insertions(+), 12 deletions(-) commit 0af6612721a48744871b69512aee42603dbb30c6 Author: Yoann Vandoorselaere Date: Thu Feb 24 15:41:16 2005 +0000 Fix broken idmef_criterion_value_clone() return value. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@5315 09c5ec92-17d4-0310-903a-819935f44dba src/idmef-criterion-value.c | 21 ++++++++++----------- 1 files changed, 10 insertions(+), 11 deletions(-) commit f86cd4c1bdaa705d163f14bfa7b6341a50a60d91 Author: Yoann Vandoorselaere Date: Wed Feb 23 10:46:19 2005 +0000 Fix prelude_get_file_name_and_path() so that it work when providing path including '../'. Implemented idmef_impact_severity_to_msg_priority. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@5302 09c5ec92-17d4-0310-903a-819935f44dba src/common.c | 33 ++++++++++++++++++++++++++++++--- src/include/common.h | 4 ++++ 2 files changed, 34 insertions(+), 3 deletions(-) commit e20b9ddc26c88665704f3b96f404889accd5d116 Author: Yoann Vandoorselaere Date: Wed Feb 23 10:42:04 2005 +0000 Re-ordered message priority. Add PRELUDE_MSG_PRIORITY_NONE. Modify prelude-msg code so that when a message divided into differents fragment is received, the priority can be set in any fragment. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@5301 09c5ec92-17d4-0310-903a-819935f44dba src/include/prelude-msg.h | 7 ++++--- src/prelude-msg.c | 17 ++++++++++++----- 2 files changed, 16 insertions(+), 8 deletions(-) commit 3af71d41239cdfcad2c43fe7920cba515899402a Author: Nicolas Delon Date: Tue Feb 22 16:49:33 2005 +0000 bug fix: gmt offset are signed integers NOT unsigned git-svn-id: file:///home/yoann/SVN/trunk/libprelude@5298 09c5ec92-17d4-0310-903a-819935f44dba src/common.c | 2 +- src/idmef-criterion-value.c | 6 +++--- src/idmef-time.c | 2 +- src/include/common.h | 2 +- src/include/idmef-time.h | 2 +- 5 files changed, 7 insertions(+), 7 deletions(-) commit d9998704bf8a3e088e57485bb5d5892b7b248f34 Author: Nicolas Delon Date: Tue Feb 22 16:26:13 2005 +0000 don't generate proxy classes, we don't need them git-svn-id: file:///home/yoann/SVN/trunk/libprelude@5296 09c5ec92-17d4-0310-903a-819935f44dba bindings/Makefile.am | 2 +- bindings/python/prelude.py | 11 +++++++++++ 2 files changed, 12 insertions(+), 1 deletions(-) commit 9a16bedc18686cf3246c12aa710efa29c8271b6c Author: Nicolas Delon Date: Tue Feb 22 15:08:24 2005 +0000 bug fix, forgot to increment Py_None, it led to a python exception when its refcount reach 0 git-svn-id: file:///home/yoann/SVN/trunk/libprelude@5292 09c5ec92-17d4-0310-903a-819935f44dba bindings/libprelude_python.i | 4 ++++ 1 files changed, 4 insertions(+), 0 deletions(-) commit 567593c34710ec1234e78f7e737021544be646a0 Author: Yoann Vandoorselaere Date: Tue Feb 22 14:59:01 2005 +0000 Some cleanup. Avoid computing the va_list in case we don't need it (debug not set and priority debug). git-svn-id: file:///home/yoann/SVN/trunk/libprelude@5291 09c5ec92-17d4-0310-903a-819935f44dba src/prelude-log.c | 41 +++++++++++++++++++++++++++++++---------- 1 files changed, 31 insertions(+), 10 deletions(-) commit fcb9486fccd5430d124190a7231898cf33f64744 Author: Yoann Vandoorselaere Date: Tue Feb 22 03:42:09 2005 +0000 Ooops. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@5288 09c5ec92-17d4-0310-903a-819935f44dba src/tls-util.c | 13 +++++++------ 1 files changed, 7 insertions(+), 6 deletions(-) commit 2dc7da87e2bee739b6da21b9e176989e083b8ecb Author: Yoann Vandoorselaere Date: Tue Feb 22 03:38:10 2005 +0000 Remove deprecated declare_ident(). Once the prelude-io object is setup, use it to close the connection. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@5287 09c5ec92-17d4-0310-903a-819935f44dba src/prelude-connection.c | 34 +++------------------------------- 1 files changed, 3 insertions(+), 31 deletions(-) commit b3004a91779c7842e8a99a7390861ad8d530ed83 Author: Yoann Vandoorselaere Date: Tue Feb 22 03:36:46 2005 +0000 Don't send analyzerID anymore since it is now read from the certificate. Handle gnutls_bye() returning EAGAIN. Don't deinit the session if it's hold by the prelude-io object. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@5286 09c5ec92-17d4-0310-903a-819935f44dba src/tls-auth.c | 19 ++++++++++--------- 1 files changed, 10 insertions(+), 9 deletions(-) commit f9638671810125d0b7bb2d8c64d350f9d40b81e7 Author: Yoann Vandoorselaere Date: Tue Feb 22 02:05:25 2005 +0000 When closing a TLS connection, always deinit the TLS session unless we get EAGAIN on gnutls_bye(). git-svn-id: file:///home/yoann/SVN/trunk/libprelude@5280 09c5ec92-17d4-0310-903a-819935f44dba src/prelude-io.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) commit 14cd7b94d60bd76cba9dc8d1a3230dd722a56e3b Author: Yoann Vandoorselaere Date: Mon Feb 21 23:58:57 2005 +0000 Make sure the current message is desroyed in case recovering from failover fail. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@5279 09c5ec92-17d4-0310-903a-819935f44dba src/prelude-connection-pool.c | 8 ++------ 1 files changed, 2 insertions(+), 6 deletions(-) commit 91e19b2cffdf061f1b61c06f67e71e476cbf968d Author: Yoann Vandoorselaere Date: Mon Feb 21 23:01:58 2005 +0000 New function, tls_certificate_get_peer_analyzerid() which given a gnutls_session will gather the certificate used for authentication and extract the analyzerID from it. It's more secure to always associate the analyzerID with the certificate since it remove the ability for a sensor to change analyzerID after registration. This give more control to the person administrating the manager server. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@5278 09c5ec92-17d4-0310-903a-819935f44dba src/include/tls-util.h | 2 ++ src/tls-util.c | 42 ++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 44 insertions(+), 0 deletions(-) commit ce2aeb4d58a3be3dd7efd446b2aca652d26a4ef5 Author: Yoann Vandoorselaere Date: Mon Feb 21 12:58:12 2005 +0000 If event_cb is set, don't trigger the global event handler. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@5277 09c5ec92-17d4-0310-903a-819935f44dba src/prelude-connection-pool.c | 19 ++++++++++--------- 1 files changed, 10 insertions(+), 9 deletions(-) commit 92afb94399323eef185b40164e066ab3cedc14e0 Author: Yoann Vandoorselaere Date: Mon Feb 21 11:08:13 2005 +0000 New function, prelude_connection_pool_check_event(). That will call the provided callback is available on of the connection in the pool. This obsolete prelude_connection_pool_recv(), since this one make it possible to both handle the connection in a blocking/non blocking manner. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@5273 09c5ec92-17d4-0310-903a-819935f44dba src/include/prelude-connection-pool.h | 4 +- src/prelude-connection-pool.c | 91 ++++++++++++-------------------- 2 files changed, 37 insertions(+), 58 deletions(-) commit 394bed480639648d2b32d572768a997859a89485 Author: Yoann Vandoorselaere Date: Mon Feb 21 11:02:30 2005 +0000 Move callback arguments after the callback itself for consistencie. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@5271 09c5ec92-17d4-0310-903a-819935f44dba src/idmef-value.c | 5 ++--- src/include/idmef-value.h | 2 +- 2 files changed, 3 insertions(+), 4 deletions(-) commit 4a79778822d2909f081475ded42503fe7c409af1 Author: Yoann Vandoorselaere Date: Mon Feb 21 00:30:13 2005 +0000 New client flags : PRELUDE_CLIENT_FLAGS_HEARTBEAT, which is set by default on newly created client. This allow the caller to ask for not sending heartbeat. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@5270 09c5ec92-17d4-0310-903a-819935f44dba src/include/prelude-client.h | 3 ++- src/prelude-client.c | 18 +++++++++++++----- 2 files changed, 15 insertions(+), 6 deletions(-) commit 0807a04f04629beed7750f6e1d6ae27ed6bf023c Author: Nicolas Delon Date: Sun Feb 20 16:35:27 2005 +0000 support for misc functions git-svn-id: file:///home/yoann/SVN/trunk/libprelude@5261 09c5ec92-17d4-0310-903a-819935f44dba bindings/libprelude.i | 1 + bindings/libprelude_python.i | 18 +++++++++++++++++- 2 files changed, 18 insertions(+), 1 deletions(-) commit 7c7f6e734b3c7a97a3eef942a62590e8602d3835 Author: Yoann Vandoorselaere Date: Sun Feb 20 13:40:21 2005 +0000 Update documentation. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@5260 09c5ec92-17d4-0310-903a-819935f44dba docs/api/libprelude-decl.txt | 42 +++++++++++++++----------------- docs/api/libprelude-sections.txt | 4 +-- docs/api/tmpl/prelude-connection.sgml | 3 ++ docs/api/tmpl/prelude-log.sgml | 2 + docs/api/tmpl/prelude-plugin.sgml | 4 ++- 5 files changed, 29 insertions(+), 26 deletions(-) commit 9009992867183661e3bf68b2f107d41bc2ae5fd2 Author: Yoann Vandoorselaere Date: Sun Feb 20 13:40:10 2005 +0000 Documentation generation fix. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@5259 09c5ec92-17d4-0310-903a-819935f44dba src/include/prelude-list.h | 3 +-- 1 files changed, 1 insertions(+), 2 deletions(-) commit 1f7e9128fa035d0c79a35cb84fdf63c728973e78 Author: Yoann Vandoorselaere Date: Sun Feb 20 13:37:42 2005 +0000 Documentation generation fix. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@5258 09c5ec92-17d4-0310-903a-819935f44dba src/include/prelude-connection.h | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) commit 938108c2a6e0fcaf821a98505ea12baea0fe136a Author: Yoann Vandoorselaere Date: Sun Feb 20 13:37:28 2005 +0000 Use an enumeration for message priority. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@5257 09c5ec92-17d4-0310-903a-819935f44dba src/include/prelude-msg.h | 14 ++++++++------ src/prelude-msg.c | 6 +++--- 2 files changed, 11 insertions(+), 9 deletions(-) commit 05f4f436ee3847d5a1a95d20456a491d60423826 Author: Yoann Vandoorselaere Date: Sun Feb 20 12:50:24 2005 +0000 Documentation fixes. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@5256 09c5ec92-17d4-0310-903a-819935f44dba src/include/prelude-plugin.h | 2 +- src/prelude-plugin.c | 12 ++++++------ 2 files changed, 7 insertions(+), 7 deletions(-) commit 457af25a989985b92a93599479709299877629ba Author: Yoann Vandoorselaere Date: Sun Feb 20 12:49:55 2005 +0000 Fix a warning. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@5255 09c5ec92-17d4-0310-903a-819935f44dba src/prelude-option-wide.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) commit e94a1d04b698e57543ee4eedb7b94b93081d5390 Author: Yoann Vandoorselaere Date: Sun Feb 20 12:48:56 2005 +0000 Commit missing. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@5254 09c5ec92-17d4-0310-903a-819935f44dba src/include/prelude-connection.h | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) commit a073412d52161bf24288be880dfb23042bf40c1f Author: Yoann Vandoorselaere Date: Sun Feb 20 12:48:24 2005 +0000 Change behavior so that prelude-connection is usable with blocking/non blocking connection: - prelude_connection_close() will possibly return PRELUDE_ERROR_EAGAIN if the connection is non blocking. - prelude_connection_(send|recv)() will not close the connection in case of error, but rather return the error. - prelude_connection_connect() and prelude_connection_destroy() will close the current connection in a blocking manner, even if the connection is set to non blocking. You should use prelude_io_close() manually prior to calling theses function in order to avoid this behavior. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@5253 09c5ec92-17d4-0310-903a-819935f44dba src/prelude-connection.c | 110 +++++++++++++++++++++++---------------------- 1 files changed, 56 insertions(+), 54 deletions(-) commit a34c2995bb915b3551b98a24ed6a4af8511223e1 Author: Yoann Vandoorselaere Date: Sat Feb 19 19:26:54 2005 +0000 Don't close the connection in case we hit PRELUDE_ERROR_EAGAIN on send. Necessary when the caller use a non blocking fd. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@5252 09c5ec92-17d4-0310-903a-819935f44dba src/prelude-connection.c | 3 +++ 1 files changed, 3 insertions(+), 0 deletions(-) commit 8593db893c1a9890cc414da55323087f55b4ce07 Author: Yoann Vandoorselaere Date: Sat Feb 19 19:22:19 2005 +0000 When gnutls_bye() return EAGAIN, don't uninitialize the GnuTLS session. Rather the caller should call prelude_io_close() til the close success. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@5251 09c5ec92-17d4-0310-903a-819935f44dba src/prelude-io.c | 3 +++ 1 files changed, 3 insertions(+), 0 deletions(-) commit 4ea32777aa7688b1419d6e2e13ffdf237af1ff93 Author: Yoann Vandoorselaere Date: Sat Feb 19 17:36:08 2005 +0000 Typo. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@5250 09c5ec92-17d4-0310-903a-819935f44dba src/prelude-connection-pool.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) commit 79b124fa8979a629840a276185346b21d449131e Author: Yoann Vandoorselaere Date: Sat Feb 19 17:33:40 2005 +0000 Handle EAGAIN everywhere, in case the caller use non blocking IO. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@5249 09c5ec92-17d4-0310-903a-819935f44dba src/prelude-connection-pool.c | 23 ++++++++++++++++++----- 1 files changed, 18 insertions(+), 5 deletions(-) commit 4a682c84bf25f7988152dd918cefb3316728d7db Author: Yoann Vandoorselaere Date: Sat Feb 19 17:24:26 2005 +0000 Make sure we handle EAGAIN when sending the message. It is possible that the socket is set to non blocking mode. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@5248 09c5ec92-17d4-0310-903a-819935f44dba src/prelude-connection-pool.c | 5 ++++- 1 files changed, 4 insertions(+), 1 deletions(-) commit 644e76bfa7c424dc67743195e96c2be8e3fb14ca Author: Yoann Vandoorselaere Date: Sat Feb 19 17:15:09 2005 +0000 When indicating an authentication error telling to use prelude-adduser for sensor registration, strip the port number from the destination address. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@5247 09c5ec92-17d4-0310-903a-819935f44dba src/prelude-connection.c | 14 +++++++++++++- 1 files changed, 13 insertions(+), 1 deletions(-) commit 761798deba1baa367e991b6b2627d301c6bc7b46 Author: Nicolas Delon Date: Sat Feb 19 13:59:09 2005 +0000 bug fixes git-svn-id: file:///home/yoann/SVN/trunk/libprelude@5246 09c5ec92-17d4-0310-903a-819935f44dba bindings/libprelude.i | 13 +++++-------- src/prelude-option-wide.c | 2 +- 2 files changed, 6 insertions(+), 9 deletions(-) commit 41e4694a150b37ca8642087b8878e2d53db6061f Author: Yoann Vandoorselaere Date: Fri Feb 18 16:16:14 2005 +0000 Add a PRELUDE_LOG_DEBUG priority. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@5241 09c5ec92-17d4-0310-903a-819935f44dba src/include/prelude-log.h | 10 ++++++---- src/prelude-log.c | 17 ++++++++++------- 2 files changed, 16 insertions(+), 11 deletions(-) commit c4d2a9a904fdf96fc957c41558488f45d7d31e51 Author: Yoann Vandoorselaere Date: Wed Feb 16 22:35:24 2005 +0000 Documentation generation fixes. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@5207 09c5ec92-17d4-0310-903a-819935f44dba docs/api/libprelude-decl.txt | 273 ++++++++++++----------------- docs/api/libprelude-docs.sgml | 9 +- docs/api/libprelude-sections.txt | 83 ++++----- docs/api/tmpl/idmef-time.sgml | 20 ++ docs/api/tmpl/idmef-util.sgml | 23 --- docs/api/tmpl/prelude-client.sgml | 2 + docs/api/tmpl/prelude-connection-mgr.sgml | 226 ------------------------ docs/api/tmpl/prelude-connection.sgml | 69 ++++++++ src/prelude-log.c | 4 +- 9 files changed, 247 insertions(+), 462 deletions(-) commit cbacd621ff085b3e5b0a48e21eed53f73e25e2ac Author: Yoann Vandoorselaere Date: Wed Feb 16 22:35:00 2005 +0000 Fix creating plugin instance outside of a prelude-option callback. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@5206 09c5ec92-17d4-0310-903a-819935f44dba src/prelude-plugin.c | 28 ++++++++++++++++++++++++---- 1 files changed, 24 insertions(+), 4 deletions(-) commit 2b723c03a97ab331fdc7a9463cf1b86fc239e9a3 Author: Yoann Vandoorselaere Date: Wed Feb 16 22:31:23 2005 +0000 Fix option priority handling. Stop merging options. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@5205 09c5ec92-17d4-0310-903a-819935f44dba src/prelude-option.c | 11 ++++++++--- 1 files changed, 8 insertions(+), 3 deletions(-) commit 206b2fba5c9d43401c79b75196d98ee626d30c9b Author: Yoann Vandoorselaere Date: Wed Feb 16 01:11:54 2005 +0000 Include prelude-connection-pool.h git-svn-id: file:///home/yoann/SVN/trunk/libprelude@5133 09c5ec92-17d4-0310-903a-819935f44dba src/include/prelude.h.in | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) commit 2fcb9e147c7c21c64eb6732147183d01e5dcaa6a Author: Yoann Vandoorselaere Date: Mon Feb 14 19:13:54 2005 +0000 Merge back pre-0-9-api-cleanup into trunk. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@5120 09c5ec92-17d4-0310-903a-819935f44dba bindings/Makefile.am | 6 +- bindings/libprelude.i | 281 +- bindings/libprelude_perl.i | 278 + bindings/libprelude_python.i | 338 + bindings/perl/Prelude.pm | 701 -- bindings/python/prelude.py | 769 --- docs/api/libprelude-decl.txt | 2529 ++++---- docs/api/libprelude-docs.sgml | 43 +- docs/api/libprelude-sections.txt | 93 +- docs/api/tmpl/common.sgml | 2 - docs/api/tmpl/config-engine.sgml | 6 +- docs/api/tmpl/idmef-criteria-string.sgml | 1 + docs/api/tmpl/idmef-criteria.sgml | 23 +- docs/api/tmpl/idmef-criterion-value.sgml | 29 +- docs/api/tmpl/idmef-data.sgml | 22 +- docs/api/tmpl/idmef-object-value.sgml | 87 - docs/api/tmpl/idmef-object.sgml | 207 - docs/api/tmpl/idmef-time.sgml | 20 +- docs/api/tmpl/idmef-tree-wrap.sgml | 771 +++- docs/api/tmpl/idmef-type.sgml | 4 + docs/api/tmpl/idmef-value-type.sgml | 7 +- docs/api/tmpl/idmef-value.sgml | 51 +- docs/api/tmpl/libprelude-unused.sgml | 2554 -------- docs/api/tmpl/prelude-async.sgml | 2 - docs/api/tmpl/prelude-client.sgml | 27 +- docs/api/tmpl/prelude-connection-mgr.sgml | 7 - docs/api/tmpl/prelude-connection.sgml | 76 +- docs/api/tmpl/prelude-hash.sgml | 1 + docs/api/tmpl/prelude-ident.sgml | 4 +- docs/api/tmpl/prelude-inet.sgml | 36 - docs/api/tmpl/prelude-io.sgml | 7 +- docs/api/tmpl/prelude-linked-object.sgml | 2 + docs/api/tmpl/prelude-list.sgml | 68 +- docs/api/tmpl/prelude-log.sgml | 49 +- docs/api/tmpl/prelude-plugin.sgml | 11 +- docs/api/tmpl/prelude.sgml | 2 + docs/api/tmpl/tls-auth.sgml | 4 - libmissing/Makefile.am | 74 +- libmissing/alloca.h | 14 +- libmissing/alloca_.h | 14 +- libmissing/gai_strerror.c | 71 + libmissing/getaddrinfo.c | 195 + libmissing/getaddrinfo.h | 90 + libmissing/gettext.h | 68 + libmissing/m4/alloca.m4 | 10 +- libmissing/m4/codeset.m4 | 21 + libmissing/m4/eoverflow.m4 | 8 +- libmissing/m4/getaddrinfo.m4 | 18 + libmissing/m4/gettext.m4 | 487 ++ libmissing/m4/glibc21.m4 | 30 + libmissing/m4/gnulib.m4 | 8 +- libmissing/m4/iconv.m4 | 101 + libmissing/m4/intdiv0.m4 | 72 + libmissing/m4/intmax.m4 | 32 + libmissing/m4/intmax_t.m4 | 8 +- libmissing/m4/inttypes-pri.m4 | 32 + libmissing/m4/inttypes.m4 | 27 + libmissing/m4/inttypes_h.m4 | 8 +- libmissing/m4/isc-posix.m4 | 26 + libmissing/m4/lcmessage.m4 | 32 + libmissing/m4/lib-ld.m4 | 110 + libmissing/m4/lib-link.m4 | 549 ++ libmissing/m4/lib-prefix.m4 | 153 + libmissing/m4/longdouble.m4 | 8 +- libmissing/m4/longlong.m4 | 8 +- libmissing/m4/nls.m4 | 49 + libmissing/m4/po.m4 | 426 ++ libmissing/m4/printf-posix.m4 | 46 + libmissing/m4/progtest.m4 | 91 + libmissing/m4/restrict.m4 | 38 + libmissing/m4/signed.m4 | 8 +- libmissing/m4/size_max.m4 | 8 +- libmissing/m4/snprintf.m4 | 10 +- libmissing/m4/sockpfaf.m4 | 39 + libmissing/m4/stdbool.m4 | 83 + libmissing/m4/stdint_h.m4 | 8 +- libmissing/m4/strdup.m4 | 10 +- libmissing/m4/strndup.m4 | 11 +- libmissing/m4/strnlen.m4 | 10 +- libmissing/m4/strpbrk.m4 | 8 +- libmissing/m4/strsep.m4 | 10 +- libmissing/m4/uintmax_t.m4 | 30 + libmissing/m4/ulonglong.m4 | 23 + libmissing/m4/vasnprintf.m4 | 8 +- libmissing/m4/vsnprintf.m4 | 10 +- libmissing/m4/wchar_t.m4 | 8 +- libmissing/m4/wint_t.m4 | 8 +- libmissing/m4/xsize.m4 | 8 +- libmissing/stdbool_.h | 93 + libmissing/strsep.h | 6 +- prelude-adduser/prelude-adduser.c | 63 +- src/Makefile.am | 20 +- src/common.c | 28 +- src/daemonize.c | 69 +- src/idmef-additional-data.c | 218 +- src/idmef-criteria-string.yac.y | 103 +- src/idmef-criteria.c | 262 +- src/idmef-criterion-value.c | 320 +- src/idmef-data.c | 158 +- src/idmef-message-print.c | 6 +- src/idmef-message-read.c | Bin 65383 -> 66150 bytes src/idmef-object-value.c | 173 - src/idmef-object.c | 879 --- src/idmef-path.c | 867 +++ src/idmef-time.c | 128 +- src/idmef-tree-wrap.c | 6715 +++++++++++--------- src/idmef-type.c | 71 +- src/idmef-util.c | 51 - src/idmef-value-type.c | 154 +- src/idmef-value.c | 457 +- .../GenerateIDMEFMessagePrintC.pm | 6 +- .../GenerateIDMEFMessageReadC.pm | 38 +- src/idmef-wrappers-gen/GenerateIDMEFTreeData.pm | 4 +- src/idmef-wrappers-gen/GenerateIDMEFTreeWrapC.pm | 274 +- src/idmef-wrappers-gen/GenerateIDMEFTreeWrapH.pm | 16 +- src/include/Makefile.am | 12 +- src/include/idmef-additional-data.h | 37 +- src/include/idmef-criteria-string.h | 2 +- src/include/idmef-criteria.h | 43 +- src/include/idmef-criterion-value.h | 24 +- src/include/idmef-data.h | 28 +- src/include/idmef-object-value.h | 59 - src/include/idmef-object.h | 76 - src/include/idmef-path.h | 75 + src/include/idmef-time.h | 16 +- src/include/idmef-tree-data.h | 11 +- src/include/idmef-tree-wrap.h | 790 ++-- src/include/idmef-type.h | 8 +- src/include/idmef-util.h | 60 - src/include/idmef-value-type.h | 10 +- src/include/idmef-value.h | 56 +- src/include/idmef.h | 3 +- src/include/libmissing.h | 9 +- src/include/prelude-client.h | 8 +- src/include/prelude-connection-mgr.h | 98 - src/include/prelude-connection-pool.h | 87 + src/include/prelude-connection.h | 28 +- src/include/prelude-failover.h | 4 +- src/include/prelude-hash.h | 9 +- src/include/prelude-inet.h | 31 - src/include/prelude-linked-object.h | 12 +- src/include/prelude-list.h | 217 +- src/include/prelude-log.h | 29 +- src/include/prelude-option.h | 49 +- src/include/prelude-plugin.h | 17 +- src/include/prelude-string.h | 59 +- src/include/prelude-timer.h | 3 +- src/libprelude-error/err-codes.h.in | 41 +- src/libprelude-error/err-sources.h.in | 6 +- src/libprelude-error/perror.c | 2 +- src/libprelude-error/prelude-error.h.in | 4 +- src/prelude-async.c | 27 +- src/prelude-client.c | 512 +- src/prelude-connection-mgr.c | 1046 --- src/prelude-connection-pool.c | 1080 ++++ src/prelude-connection.c | 285 +- src/prelude-failover.c | 60 +- src/prelude-hash.c | 46 +- src/prelude-inet.c | 194 +- src/prelude-io.c | 21 +- src/prelude-log.c | 56 +- src/prelude-option-wide.c | 62 +- src/prelude-option.c | 223 +- src/prelude-plugin.c | 191 +- src/prelude-string.c | 594 ++- src/prelude-timer.c | 33 +- src/prelude.c | 4 +- src/tls-auth.c | 51 +- src/tls-util.c | 4 +- src/variable.c | 12 +- 170 files changed, 15237 insertions(+), 14808 deletions(-) commit 1114f73c0f6fc0cb2205de9fc69b49377b76398b Author: Yoann Vandoorselaere Date: Mon Feb 14 01:21:37 2005 +0000 This source code has been rewritten since is original implementation. Update copyright notice. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@5103 09c5ec92-17d4-0310-903a-819935f44dba src/idmef-criteria.c | 4 +--- 1 files changed, 1 insertions(+), 3 deletions(-) commit 18ba56752e76945795246d5ad70e86595d101fd9 Author: Yoann Vandoorselaere Date: Sun Feb 13 23:57:15 2005 +0000 Missing copyright notices. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@5102 09c5ec92-17d4-0310-903a-819935f44dba src/idmef-message-print.c | 23 ++++++++++++++++++++ src/idmef-message-write.c | 2 +- .../GenerateIDMEFMessagePrintC.pm | 23 ++++++++++++++++++++ .../GenerateIDMEFMessagePrintH.pm | 23 ++++++++++++++++++++ .../GenerateIDMEFMessageWriteC.pm | 2 +- .../GenerateIDMEFMessageWriteH.pm | 23 ++++++++++++++++++++ src/include/idmef-message-print.h | 23 ++++++++++++++++++++ src/include/idmef-message-write.h | 23 ++++++++++++++++++++ src/include/prelude-client-profile.h | 23 ++++++++++++++++++++ src/prelude-client-profile.c | 23 ++++++++++++++++++++ 10 files changed, 186 insertions(+), 2 deletions(-) commit 11928dd877bbd7a680b6e5758f44aa8310b98bfa Author: Nicolas Delon Date: Sat Feb 5 04:19:34 2005 +0000 bug fixes: check value validity git-svn-id: file:///home/yoann/SVN/trunk/libprelude@5012 09c5ec92-17d4-0310-903a-819935f44dba bindings/python/prelude.py | 6 +++++- 1 files changed, 5 insertions(+), 1 deletions(-) commit 262b6c1110316e169b2597f29ade499dd503bd0c Author: Yoann Vandoorselaere Date: Sat Jan 22 17:58:31 2005 +0000 Use client as the default context. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@4897 09c5ec92-17d4-0310-903a-819935f44dba src/prelude-option-wide.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) commit 2c94056450edcb9df50b2a93b01a50f75c4f7c72 Author: Yoann Vandoorselaere Date: Fri Jan 21 19:49:51 2005 +0000 Don't check whether the option was already set from the command line in case this is a 'section'. Section need to be called anyway to restore the context, and to avoid invalid option error. Fix config option error when providing command line option. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@4895 09c5ec92-17d4-0310-903a-819935f44dba src/prelude-option.c | 5 +---- 1 files changed, 1 insertions(+), 4 deletions(-) commit 28b1e47f1e02e1088233222f961b9fd3219fde2d Author: Yoann Vandoorselaere Date: Fri Jan 21 19:45:30 2005 +0000 Fix a manager crash on config request, due to the recent change made to option handling. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@4894 09c5ec92-17d4-0310-903a-819935f44dba src/prelude-client.c | 7 +++++++ 1 files changed, 7 insertions(+), 0 deletions(-) commit 1a5f0fdd248d72b20d99777cadc99ed92c3cb782 Author: Nicolas Delon Date: Wed Jan 19 23:37:12 2005 +0000 fix memory leak git-svn-id: file:///home/yoann/SVN/trunk/libprelude@4843 09c5ec92-17d4-0310-903a-819935f44dba src/idmef-criteria-string.yac.y | 7 +++++-- 1 files changed, 5 insertions(+), 2 deletions(-) commit 0e479c09da5e849f3b865529d5c06c764d6616bb Author: Yoann Vandoorselaere Date: Tue Jan 18 19:46:55 2005 +0000 Fix uninitialized. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@4835 09c5ec92-17d4-0310-903a-819935f44dba src/prelude-connection-mgr.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) commit 757e7bcf16988e870d6ccd185198ba634f4f4598 Author: Yoann Vandoorselaere Date: Fri Jan 14 12:06:37 2005 +0000 Include prelude-error.h in libprelude.i Fix bug #51 reported by Sebastien Tricaud git-svn-id: file:///home/yoann/SVN/trunk/libprelude@4830 09c5ec92-17d4-0310-903a-819935f44dba bindings/libprelude.i | 1 + 1 files changed, 1 insertions(+), 0 deletions(-) commit 0ef271fe129727b26e3646e49acb5c2ab561a7ef Author: Nicolas Delon Date: Tue Jan 11 14:38:07 2005 +0000 bug fix: remove perl Makefile dependency git-svn-id: file:///home/yoann/SVN/trunk/libprelude@4811 09c5ec92-17d4-0310-903a-819935f44dba bindings/Makefile.am | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) commit 1b06d9adab06c67289bf01ac35c9c1f636baad59 Author: Yoann Vandoorselaere Date: Tue Jan 11 11:12:46 2005 +0000 Call reorder_argv() in case we have an argument. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@4804 09c5ec92-17d4-0310-903a-819935f44dba src/prelude-option.c | 5 ++++- 1 files changed, 4 insertions(+), 1 deletions(-) commit 90e46f1b6a2b104da70a1ab1bbe0ba4f61fd9209 Author: Yoann Vandoorselaere Date: Tue Jan 11 10:57:01 2005 +0000 Fix optional argument handling that was broken due to is_an_argument() change. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@4803 09c5ec92-17d4-0310-903a-819935f44dba src/prelude-option.c | 6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-) commit 3181773a62e642b97599efb84ae9bac611fe5106 Author: Rob Holand Date: Tue Jan 11 10:07:59 2005 +0000 missing include git-svn-id: file:///home/yoann/SVN/trunk/libprelude@4800 09c5ec92-17d4-0310-903a-819935f44dba prelude-adduser/server.c | 1 + 1 files changed, 1 insertions(+), 0 deletions(-) commit 262d283143bf780515dc3f16276023a82d6c3828 Author: Yoann Vandoorselaere Date: Tue Jan 11 09:54:07 2005 +0000 Fit new prelude_init prototype in prelude.h.in, Thanks to Rob Holland for reporting this. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@4799 09c5ec92-17d4-0310-903a-819935f44dba src/include/prelude.h.in | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) commit ba5d7024ce8a2bedd87c149f9762487fcf5a5c30 Author: Yoann Vandoorselaere Date: Tue Jan 11 08:55:47 2005 +0000 Increase array size to 1024. Was set to 8 for testing purposes. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@4797 09c5ec92-17d4-0310-903a-819935f44dba src/prelude.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) commit d9c3132df8a48ce379a1bc574e5af35494af510a Author: Yoann Vandoorselaere Date: Tue Jan 11 08:51:43 2005 +0000 Change config_engine so that it return error value. Add a config engine error source. Modify prelude_init() so that it take and slice prelude specific options out of argc and argv. prelude_client_new() doesn't use argc/argv anymore and use the internal one, provided through prelude_init(). Modified prelude_option_parse_argument so that the filename argument is a pointer, that might be modified by the user callback. Remove --set-configuration-file and --ignore-startup-error, since they really belong to the sensor. Internal error code in prelude-connection-mgr(). git-svn-id: file:///home/yoann/SVN/trunk/libprelude@4795 09c5ec92-17d4-0310-903a-819935f44dba prelude-adduser/prelude-adduser.c | 8 +- src/include/config-engine.h | 2 +- src/include/prelude-client.h | 8 +- src/include/prelude-option.h | 2 +- src/libprelude-error/err-sources.h.in | 1 + src/prelude-client.c | 239 ++++++++++++----------------- src/prelude-connection-mgr.c | 109 +++++++------- src/prelude-msgbuf.c | 1 + src/prelude-option-wide.c | 4 +- src/prelude-option.c | 275 +++++++++++++++------------------ src/prelude.c | 67 ++++++++- 11 files changed, 355 insertions(+), 361 deletions(-) commit 258e0167cb84346caa8e42e269df3ac9289481fa Author: Yoann Vandoorselaere Date: Tue Jan 11 08:45:48 2005 +0000 Always set error on return. Convert some internal function so that they return error code. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@4794 09c5ec92-17d4-0310-903a-819935f44dba src/config-engine.c | 41 ++++++++++++++++++++++++++--------------- 1 files changed, 26 insertions(+), 15 deletions(-) commit b176ee858a172ee51ec9a02cad1c17f125eb0c3c Author: Yoann Vandoorselaere Date: Mon Jan 10 00:15:58 2005 +0000 Set PRELUDE_STRING_CAN_REALLOC flags on _nodup string. Modify prelude_string_get_string_released() so that it handle the case where a string is empty (return NULL), and handle the case where a string is a reference by returning a dup of it. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@4786 09c5ec92-17d4-0310-903a-819935f44dba src/prelude-string.c | 11 ++++++++--- 1 files changed, 8 insertions(+), 3 deletions(-) commit e589964cfd98ad9701ff2fa55cabaf09604a3c86 Author: Yoann Vandoorselaere Date: Sun Jan 9 22:07:58 2005 +0000 Set fd_ptr to NULL when setting buffer IO mode. Fix a pottential crash on realloc(). git-svn-id: file:///home/yoann/SVN/trunk/libprelude@4785 09c5ec92-17d4-0310-903a-819935f44dba src/prelude-io.c | 1 + 1 files changed, 1 insertions(+), 0 deletions(-) commit b2202046202bb5cfb38682170f8170a4af8b86c7 Author: Nicolas Delon Date: Sat Jan 8 16:06:44 2005 +0000 define a new error source for libpreludedb git-svn-id: file:///home/yoann/SVN/trunk/libprelude@4779 09c5ec92-17d4-0310-903a-819935f44dba src/libprelude-error/err-sources.h.in | 1 + 1 files changed, 1 insertions(+), 0 deletions(-) commit 2d4d4789e16fd0e93588772cff5ae2fbd11bc738 Author: Yoann Vandoorselaere Date: Thu Jan 6 14:02:33 2005 +0000 Always make sure the prelude_string_t err pointer is to NULL when returning an error without error buffer. Slight cleanup. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@4768 09c5ec92-17d4-0310-903a-819935f44dba src/prelude-option.c | 14 ++++++++------ 1 files changed, 8 insertions(+), 6 deletions(-) commit 405c95c543378e38bf24590c8ca129b01dd463c7 Author: Yoann Vandoorselaere Date: Thu Jan 6 10:30:31 2005 +0000 Slight formatting fix. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@4765 09c5ec92-17d4-0310-903a-819935f44dba prelude-adduser/prelude-adduser.c | 8 ++++---- 1 files changed, 4 insertions(+), 4 deletions(-) commit ea6527129705843f8a2160919ee1533857037e0b Author: Yoann Vandoorselaere Date: Thu Jan 6 10:23:25 2005 +0000 r4609@arwen: yoann | 2005-01-05T14:17:57.521577Z Make set() / commit() / destroy() option callback take a prelude_string_t that might be used by the user to report a detailed error. Modify get() option callback so that a prelude_string_t is used. There is no size limitation anymore. Update API documentation. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@4761 09c5ec92-17d4-0310-903a-819935f44dba INSTALL | 52 +- docs/api/libprelude-decl.txt | 189 +-- docs/api/libprelude-docs.sgml | 26 +- docs/api/libprelude-sections.txt | 158 +- docs/api/tmpl/idmef-data.sgml | 6 + docs/api/tmpl/libprelude-unused.sgml | 4082 ++-------------------------------- docs/api/tmpl/prelude-io.sgml | 9 + docs/api/tmpl/prelude-plugin.sgml | 1 + prelude-adduser/prelude-adduser.c | 17 +- src/include/prelude-option.h | 28 +- src/include/prelude-plugin.h | 23 +- src/prelude-client.c | 197 +- src/prelude-option-wide.c | 74 +- src/prelude-option.c | 194 +- src/prelude-plugin.c | 44 +- 15 files changed, 576 insertions(+), 4524 deletions(-) commit 7de3ddf41265ce825c59987fdfb13664d9cd5363 Author: Yoann Vandoorselaere Date: Wed Jan 5 14:04:59 2005 +0000 Set client-profile UID/GID before an eventual error on the analyzerID file. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@4743 09c5ec92-17d4-0310-903a-819935f44dba src/prelude-client-profile.c | 6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-) commit 692fbee29e938993bd68b5df4b2dde18110aec95 Author: Nicolas Delon Date: Tue Jan 4 11:22:15 2005 +0000 check if the option value is required git-svn-id: file:///home/yoann/SVN/trunk/libprelude@4727 09c5ec92-17d4-0310-903a-819935f44dba bindings/python/prelude.py | 1 + 1 files changed, 1 insertions(+), 0 deletions(-) commit 16873159998db7898e10263660b67fbd9f789f84 Author: Yoann Vandoorselaere Date: Mon Jan 3 21:54:29 2005 +0000 Handle case where the string is a reference in prelude_string_clear(). git-svn-id: file:///home/yoann/SVN/trunk/libprelude@4726 09c5ec92-17d4-0310-903a-819935f44dba src/prelude-string.c | 8 +++++--- 1 files changed, 5 insertions(+), 3 deletions(-) commit 3cff4accd1491887e603d480f0a32e1076ddb3f2 Author: Yoann Vandoorselaere Date: Mon Jan 3 21:53:22 2005 +0000 remove deprecated. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@4725 09c5ec92-17d4-0310-903a-819935f44dba src/idmef-tree-print.c | 2250 ---------------------------------- src/idmef-tree-to-string.c | 2350 ------------------------------------ src/include/idmef-tree-print.h | 39 - src/include/idmef-tree-to-string.h | 39 - 4 files changed, 0 insertions(+), 4678 deletions(-) commit 7278356178e24a910801adb21d46bc7d6bd98c0a Author: Yoann Vandoorselaere Date: Sun Jan 2 23:46:39 2005 +0000 Always restore correct LDFLAGS. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@4723 09c5ec92-17d4-0310-903a-819935f44dba m4/libprelude.m4 | 1 + 1 files changed, 1 insertions(+), 0 deletions(-) commit 91d20b0a7bd59cccb0de8821ef13f28fc5a2d7a7 Author: Nicolas Delon Date: Sat Jan 1 23:37:34 2005 +0000 print error message git-svn-id: file:///home/yoann/SVN/trunk/libprelude@4717 09c5ec92-17d4-0310-903a-819935f44dba bindings/libprelude.i | 9 +++++++-- 1 files changed, 7 insertions(+), 2 deletions(-) commit 2d99b084c1e53e752d6843a9110431ac600c1d39 Author: Nicolas Delon Date: Fri Dec 31 00:10:37 2004 +0000 fit last libprelude C API changes git-svn-id: file:///home/yoann/SVN/trunk/libprelude@4701 09c5ec92-17d4-0310-903a-819935f44dba bindings/python/prelude.py | 46 +++++++++++++++++++++++++++++-------------- 1 files changed, 31 insertions(+), 15 deletions(-) commit 8fad70df28441fa19e40cdd42b47d152e4f46963 Author: Nicolas Delon Date: Thu Dec 30 17:37:17 2004 +0000 fix perl bindings git-svn-id: file:///home/yoann/SVN/trunk/libprelude@4698 09c5ec92-17d4-0310-903a-819935f44dba bindings/Makefile.am | 3 ++- bindings/libprelude.i | 13 ++++++++----- 2 files changed, 10 insertions(+), 6 deletions(-) commit 10234e6a340bce7b1f9a4199a6733bc4c1bc9ace Author: Yoann Vandoorselaere Date: Thu Dec 30 16:28:06 2004 +0000 Use prelude_string_t for to_string() API func. Update documentation. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@4695 09c5ec92-17d4-0310-903a-819935f44dba docs/api/libprelude-decl.txt | 2862 +++++++++++++++------------ docs/api/libprelude-docs.sgml | 10 +- docs/api/libprelude-sections.txt | 528 +++--- docs/api/tmpl/client-ident.sgml | 24 - docs/api/tmpl/extract.sgml | 42 - docs/api/tmpl/idmef-criteria.sgml | 8 +- docs/api/tmpl/idmef-criterion-value.sgml | 8 +- docs/api/tmpl/idmef-data.sgml | 384 ++++- docs/api/tmpl/idmef-message-read.sgml | 10 + docs/api/tmpl/idmef-time.sgml | 8 +- docs/api/tmpl/idmef-tree-print.sgml | 30 + docs/api/tmpl/idmef-tree-to-string.sgml | 330 --- docs/api/tmpl/idmef-tree-wrap.sgml | 3 +- docs/api/tmpl/idmef-tree.sgml | 8 - docs/api/tmpl/idmef-util.sgml | 11 - docs/api/tmpl/idmef-value-type.sgml | 6 +- docs/api/tmpl/idmef-value.sgml | 4 +- docs/api/tmpl/libprelude-unused.sgml | 1222 ++++++++++++ docs/api/tmpl/prelude-client.sgml | 187 +-- docs/api/tmpl/prelude-connection-mgr.sgml | 89 +- docs/api/tmpl/prelude-connection.sgml | 66 +- docs/api/tmpl/prelude-failover.sgml | 1 + docs/api/tmpl/prelude-getopt-wide.sgml | 4 +- docs/api/tmpl/prelude-getopt.sgml | 132 +-- docs/api/tmpl/prelude-ident.sgml | 1 + docs/api/tmpl/prelude-io.sgml | 3 + docs/api/tmpl/prelude-log.sgml | 13 + docs/api/tmpl/prelude-message-buffered.sgml | 21 +- docs/api/tmpl/prelude-message-id.sgml | 20 +- docs/api/tmpl/prelude-message.sgml | 3 +- docs/api/tmpl/prelude.sgml | 15 + docs/api/tmpl/threads.sgml | 16 - docs/api/tmpl/timer.sgml | 112 -- docs/api/tmpl/tls-auth.sgml | 10 +- src/idmef-additional-data.c | 39 +- src/idmef-data.c | 165 ++- src/include/idmef-additional-data.h | 17 +- src/include/idmef-criterion-value.h | 4 +- src/include/idmef-data.h | 102 +- src/include/idmef-tree-wrap.h | 74 +- src/include/idmef-value.h | 2 +- 41 files changed, 3973 insertions(+), 2621 deletions(-) commit 9873e76a8f58afcd0acdf3ba095645b91faadeda Author: Yoann Vandoorselaere Date: Thu Dec 30 16:27:03 2004 +0000 Use prelude_string_t for to_string() API func. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@4694 09c5ec92-17d4-0310-903a-819935f44dba src/idmef-criterion-value.c | 58 ++++++++++++++++++++++++------------------ 1 files changed, 33 insertions(+), 25 deletions(-) commit f035c2cf79a3e719eccb923391c2fb7e8cfd60b4 Author: Yoann Vandoorselaere Date: Thu Dec 30 16:25:12 2004 +0000 Use prelude_string_t for to_string() API func. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@4693 09c5ec92-17d4-0310-903a-819935f44dba src/idmef-value-type.c | 27 ++++++++++++++------------- src/idmef-value.c | 20 ++++++-------------- src/include/idmef-value-type.h | 2 +- 3 files changed, 21 insertions(+), 28 deletions(-) commit 888c23e9d0c0e03ef8b513283b8c745482bb16f9 Author: Yoann Vandoorselaere Date: Thu Dec 30 16:23:40 2004 +0000 Use prelude_string_t for to_string() API func. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@4692 09c5ec92-17d4-0310-903a-819935f44dba src/idmef-criteria.c | 42 ++++++++++++++++++------------------------ src/include/idmef-criteria.h | 4 ++-- 2 files changed, 20 insertions(+), 26 deletions(-) commit 2206fc69b8f0fa513979d30b0ebceed15be479a8 Author: Yoann Vandoorselaere Date: Thu Dec 30 16:22:27 2004 +0000 to_string function now use a prelude_string_t. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@4691 09c5ec92-17d4-0310-903a-819935f44dba src/idmef-time.c | 39 ++++++++++++++++++--------------------- src/include/idmef-time.h | 4 ++-- 2 files changed, 20 insertions(+), 23 deletions(-) commit ab615c5e105e6cea82af6ea9767e68b2754e9550 Author: Yoann Vandoorselaere Date: Thu Dec 30 16:21:24 2004 +0000 updated. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@4690 09c5ec92-17d4-0310-903a-819935f44dba src/idmef-tree-wrap.c | 72 ++++++++++++++++++++++++------------------------ 1 files changed, 36 insertions(+), 36 deletions(-) commit 14de767f9d7103c5be3bd8807ec422c73780c3e3 Author: Yoann Vandoorselaere Date: Thu Dec 30 16:21:02 2004 +0000 Fix automatic API documentation generation. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@4689 09c5ec92-17d4-0310-903a-819935f44dba src/prelude-msg.c | 11 +++++++---- 1 files changed, 7 insertions(+), 4 deletions(-) commit 86e613eb2d142f9da1ea3b0af34fc7d99af23982 Author: Yoann Vandoorselaere Date: Thu Dec 30 16:20:43 2004 +0000 Fix automatic API documentation generation. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@4688 09c5ec92-17d4-0310-903a-819935f44dba src/include/prelude-msgbuf.h | 2 +- src/prelude-msgbuf.c | 14 ++++++++------ 2 files changed, 9 insertions(+), 7 deletions(-) commit 5226d38c2903ae2e2772f2f7a7042beb97706a82 Author: Yoann Vandoorselaere Date: Thu Dec 30 16:20:22 2004 +0000 Fix automatic API documentation generation. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@4687 09c5ec92-17d4-0310-903a-819935f44dba src/include/prelude-option.h | 2 +- src/prelude-option.c | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) commit 0785ac576b71c4a46ae15e7c8946c07781763451 Author: Yoann Vandoorselaere Date: Thu Dec 30 16:19:46 2004 +0000 Fix automatic API documentation generation. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@4686 09c5ec92-17d4-0310-903a-819935f44dba src/prelude-connection-mgr.c | 6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-) commit 2565503136f956d81243d2b06d7dad96c94bf095 Author: Yoann Vandoorselaere Date: Thu Dec 30 16:18:29 2004 +0000 Remove idmef-tree-to-string. s/tree-print/message-print/ Make idmef-message-print take a prelude_io_t object as argument (which can be a file, buffer, socket, etc). Update bindings. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@4685 09c5ec92-17d4-0310-903a-819935f44dba bindings/Makefile.am | 2 +- bindings/libprelude.i | 5 +- src/Makefile.am | 7 +- src/idmef-message-print.c | 2402 ++++++++++++++++++++ .../GenerateIDMEFMessagePrintC.pm | 388 ++++ .../GenerateIDMEFMessagePrintH.pm | 63 + src/idmef-wrappers-gen/GenerateIDMEFTreePrintC.pm | 343 --- src/idmef-wrappers-gen/GenerateIDMEFTreePrintH.pm | 63 - .../GenerateIDMEFTreeToStringC.pm | 320 --- .../GenerateIDMEFTreeToStringH.pm | 63 - src/idmef-wrappers-gen/generator.pl | 26 +- src/include/Makefile.am | 7 +- src/include/idmef-message-print.h | 39 + 13 files changed, 2908 insertions(+), 820 deletions(-) commit dd6185fceb07b65be074e6ef7bd9aa8de33f3e00 Author: Yoann Vandoorselaere Date: Thu Dec 30 16:15:39 2004 +0000 call gnutls_deinit() / unload loaded plugins in prelude_deinit(). git-svn-id: file:///home/yoann/SVN/trunk/libprelude@4684 09c5ec92-17d4-0310-903a-819935f44dba src/prelude.c | 7 +++++++ 1 files changed, 7 insertions(+), 0 deletions(-) commit 402acfaaed8bc046e975cd0031dbf5d1286ab082 Author: Yoann Vandoorselaere Date: Thu Dec 30 13:54:11 2004 +0000 Implemented a backend for using prelude-io on a buffer. This will allow to drop one of idmef-tree-to-string/idmef-tree-print, and will allow application to write their own IDMEF cache implementation. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@4682 09c5ec92-17d4-0310-903a-819935f44dba src/include/prelude-io.h | 4 +- src/prelude-io.c | 90 +++++++++++++++++++++++++++++++++++++++++++++- 2 files changed, 91 insertions(+), 3 deletions(-) commit 2084ca0f6139a2c32e43b81b17a47e62e5ff88ad Author: Yoann Vandoorselaere Date: Wed Dec 29 10:57:30 2004 +0000 Fix warnings. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@4680 09c5ec92-17d4-0310-903a-819935f44dba src/idmef-criteria-string.yac.y | 8 +++++--- 1 files changed, 5 insertions(+), 3 deletions(-) commit 2a04515fb600858b8517942ec5df1810de9a5279 Author: Yoann Vandoorselaere Date: Thu Dec 23 19:18:48 2004 +0000 Don't check whether called option got a set callback. Use do_set() which already take care of it and correctly deal with context. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@4669 09c5ec92-17d4-0310-903a-819935f44dba src/prelude-option.c | 11 ++++------- 1 files changed, 4 insertions(+), 7 deletions(-) commit 3a3cce6e8b2112a22ef8a20531d37784d5a0a76b Author: Yoann Vandoorselaere Date: Thu Dec 23 11:10:41 2004 +0000 More fix to prelude specific option checking. Fix prelude_option_destroy() so that it handle root option correctly (theses option are not listed, so prelude_list_del() should not be called). git-svn-id: file:///home/yoann/SVN/trunk/libprelude@4661 09c5ec92-17d4-0310-903a-819935f44dba src/prelude-option.c | 45 +++++++++++++++++++++------------------------ 1 files changed, 21 insertions(+), 24 deletions(-) commit 964f80f7419821244848c0b779af8921a5380053 Author: Yoann Vandoorselaere Date: Thu Dec 23 11:09:36 2004 +0000 remove unused. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@4660 09c5ec92-17d4-0310-903a-819935f44dba src/prelude-client.c | 1 - 1 files changed, 0 insertions(+), 1 deletions(-) commit 195211a2a137c4e4cf002c862b8bd2ad2045c44d Author: Yoann Vandoorselaere Date: Thu Dec 23 11:06:35 2004 +0000 Tell our msgbuf when we are going to async mode. Also, make prelude_client_new preserve the client when returning a profile error since this is needed for the caller to get the prelude-adduser message. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@4659 09c5ec92-17d4-0310-903a-819935f44dba src/prelude-client.c | 51 ++++++++++++++----------------------------------- 1 files changed, 15 insertions(+), 36 deletions(-) commit 7a0c37ca1db0141931953a698b9a053a9fbea918 Author: Yoann Vandoorselaere Date: Thu Dec 23 11:04:10 2004 +0000 Add some list check. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@4658 09c5ec92-17d4-0310-903a-819935f44dba src/prelude-string.c | 8 +++++++- 1 files changed, 7 insertions(+), 1 deletions(-) commit d047f7fef1b4d2d31ab89c11e1c8b16f0fccbf21 Author: Yoann Vandoorselaere Date: Thu Dec 23 11:03:46 2004 +0000 Revert part of [4422], now we only call prelude_list_del() if the list is not marked as empty, which should fix the problem without having undefined children in the parent. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@4657 09c5ec92-17d4-0310-903a-819935f44dba src/idmef-tree-wrap.c | 294 +++++++--------------- src/idmef-wrappers-gen/GenerateIDMEFTreeWrapC.pm | 9 +- 2 files changed, 104 insertions(+), 199 deletions(-) commit 930079800f9d61d6220b7205316adc09246015e1 Author: Nicolas Delon Date: Wed Dec 22 20:27:09 2004 +0000 update tree-to-string and tree-print to last idmef-data changes git-svn-id: file:///home/yoann/SVN/trunk/libprelude@4656 09c5ec92-17d4-0310-903a-819935f44dba src/idmef-tree-print.c | 7 ++++++- src/idmef-tree-to-string.c | 6 +----- src/idmef-wrappers-gen/GenerateIDMEFTreePrintC.pm | 7 ++++++- .../GenerateIDMEFTreeToStringC.pm | 6 +----- 4 files changed, 14 insertions(+), 12 deletions(-) commit 50b6cdf33f94f33bbf913d8d7fe725d598f6e81e Author: Rob Holand Date: Wed Dec 22 19:55:46 2004 +0000 cast idmef data properly git-svn-id: file:///home/yoann/SVN/trunk/libprelude@4655 09c5ec92-17d4-0310-903a-819935f44dba src/idmef-tree-print.c | 2 +- src/idmef-tree-to-string.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit 0b34f7a20bebe2feec74c899480703542c8c80b9 Author: Rob Holand Date: Wed Dec 22 19:53:29 2004 +0000 add missing prototypes. small whitespace fix git-svn-id: file:///home/yoann/SVN/trunk/libprelude@4654 09c5ec92-17d4-0310-903a-819935f44dba src/include/idmef-additional-data.h | 15 +++++++++++---- 1 files changed, 11 insertions(+), 4 deletions(-) commit 4208d4467566f60719b4168ef1513cdce29eeaca Author: Rob Holand Date: Wed Dec 22 19:52:55 2004 +0000 remove duplicate gtk-doc option git-svn-id: file:///home/yoann/SVN/trunk/libprelude@4653 09c5ec92-17d4-0310-903a-819935f44dba configure.in | 5 ----- 1 files changed, 0 insertions(+), 5 deletions(-) commit 160ba89c2eaaecd881aac6ec18157499e1eefa74 Author: Yoann Vandoorselaere Date: Wed Dec 22 19:29:25 2004 +0000 free *prev, not prev. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@4652 09c5ec92-17d4-0310-903a-819935f44dba src/prelude-option-wide.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) commit 17b924b621ba770d6eb3c6ce6f1510c627fdad71 Author: Nicolas Delon Date: Tue Dec 21 16:10:42 2004 +0000 get more infos about instances git-svn-id: file:///home/yoann/SVN/trunk/libprelude@4645 09c5ec92-17d4-0310-903a-819935f44dba bindings/python/prelude.py | 9 ++++++--- 1 files changed, 6 insertions(+), 3 deletions(-) commit d60881e69f54ee1ca334a7af0638c9f23c18a04b Author: Nicolas Delon Date: Tue Dec 21 12:23:20 2004 +0000 the heartbeat interval must also be expressed in seconds when getting value git-svn-id: file:///home/yoann/SVN/trunk/libprelude@4642 09c5ec92-17d4-0310-903a-819935f44dba src/prelude-client.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) commit 0850c1ba9bc81f347c54e52b48f18698857f2bc2 Author: Nicolas Delon Date: Mon Dec 20 02:35:14 2004 +0000 handle binary idmef data in python bindings git-svn-id: file:///home/yoann/SVN/trunk/libprelude@4632 09c5ec92-17d4-0310-903a-819935f44dba bindings/libprelude.i | 13 +++++++++++++ bindings/python/prelude.py | 10 ++++++++-- 2 files changed, 21 insertions(+), 2 deletions(-) commit 02c4b516a706795fdcbf027fd9e25e3d175a636a Author: Nicolas Delon Date: Sun Dec 19 17:52:02 2004 +0000 bug fix in python bindings when setting an idmef-data bug fix for python typemap of unsigned 32 bits C integers, the python 'int' type only support signed 32 integers, so, a value >= 2 ^ 32 make the python 'int' become negative, we override the default swig typemap to convert C 32 bits unsigned integers into python 'long' type that can support those range of values git-svn-id: file:///home/yoann/SVN/trunk/libprelude@4631 09c5ec92-17d4-0310-903a-819935f44dba bindings/libprelude.i | 6 ++++++ bindings/python/prelude.py | 23 +++++++++++------------ 2 files changed, 17 insertions(+), 12 deletions(-) commit d27855678ef47c5c50e279b520fd6c2c10b1f8e8 Author: Nicolas Delon Date: Sun Dec 19 16:46:28 2004 +0000 fit last prelude-client API changes git-svn-id: file:///home/yoann/SVN/trunk/libprelude@4630 09c5ec92-17d4-0310-903a-819935f44dba bindings/libprelude.i | 12 +++++++++- bindings/python/prelude.py | 45 ++++++++++++++----------------------------- 2 files changed, 25 insertions(+), 32 deletions(-) commit b034198112fffc9e6a33a617d3c67d955b531890 Author: Yoann Vandoorselaere Date: Sun Dec 19 15:30:04 2004 +0000 correct check for prelude specific options. Always use a prelude_option_t as the root. Make option search compare the root as well. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@4628 09c5ec92-17d4-0310-903a-819935f44dba src/prelude-option.c | 168 ++++++++++++++++++++++++++------------------------ 1 files changed, 88 insertions(+), 80 deletions(-) commit 8ff7d5a67e59584808c47ee40dae76deaf85c2d0 Author: Nicolas Delon Date: Sun Dec 19 14:26:42 2004 +0000 remove debug message git-svn-id: file:///home/yoann/SVN/trunk/libprelude@4627 09c5ec92-17d4-0310-903a-819935f44dba src/prelude-option.c | 4 ---- 1 files changed, 0 insertions(+), 4 deletions(-) commit 3bfc82e9c10910b733a22d5234759df6bed00671 Author: Nicolas Delon Date: Sun Dec 19 13:53:51 2004 +0000 bug fix, do a correct check/interpretation of recv_reply return value git-svn-id: file:///home/yoann/SVN/trunk/libprelude@4625 09c5ec92-17d4-0310-903a-819935f44dba bindings/libprelude.i | 11 ++++------- bindings/python/prelude.py | 8 ++++---- 2 files changed, 8 insertions(+), 11 deletions(-) commit 3982276ce2ccc3e8a57fd9449c1f4739ac8e83ee Author: Yoann Vandoorselaere Date: Sun Dec 19 13:38:39 2004 +0000 More error code/source definition. Define the error source in prelude-client-profile. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@4624 09c5ec92-17d4-0310-903a-819935f44dba src/libprelude-error/err-codes.h.in | 3 ++- src/libprelude-error/err-sources.h.in | 7 ++++--- src/prelude-client-profile.c | 2 ++ 3 files changed, 8 insertions(+), 4 deletions(-) commit 3d2f8d947615f8dc41c8549dd2184704ff9aee5c Author: Nicolas Delon Date: Sat Dec 18 22:22:04 2004 +0000 some fixes git-svn-id: file:///home/yoann/SVN/trunk/libprelude@4622 09c5ec92-17d4-0310-903a-819935f44dba bindings/libprelude.i | 12 ++++++++ bindings/python/prelude.py | 64 ++++++++++++++++++++++++++----------------- 2 files changed, 51 insertions(+), 25 deletions(-) commit 7f2fb23eb02a20a4187a87d4cd23c63c9d89938d Author: Nicolas Delon Date: Sat Dec 18 21:59:41 2004 +0000 remove debug messages git-svn-id: file:///home/yoann/SVN/trunk/libprelude@4621 09c5ec92-17d4-0310-903a-819935f44dba src/prelude-connection-mgr.c | 3 --- 1 files changed, 0 insertions(+), 3 deletions(-) commit 6808886ba262b974737d49a407f0be9a05a5881b Author: Yoann Vandoorselaere Date: Sat Dec 18 20:03:47 2004 +0000 Make prelude_connection_is_alive() return a prelude_bool_t. Fix prelude-connection-mgr notification from the receive handler. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@4620 09c5ec92-17d4-0310-903a-819935f44dba src/include/prelude-connection-mgr.h | 6 +- src/include/prelude-connection.h | 2 +- src/prelude-connection-mgr.c | 106 ++++++++++++++++++---------------- src/prelude-connection.c | 4 +- 4 files changed, 63 insertions(+), 55 deletions(-) commit 7ab792ca79d1cc5e5bd982c7ca96f5c68f2dd6df Author: Yoann Vandoorselaere Date: Sat Dec 18 14:45:57 2004 +0000 revert previous modification on idmef-additional-data.h git-svn-id: file:///home/yoann/SVN/trunk/libprelude@4619 09c5ec92-17d4-0310-903a-819935f44dba src/include/idmef-additional-data.h | 20 ++++++++++---------- 1 files changed, 10 insertions(+), 10 deletions(-) commit e3f0a327fe13cf559b87389c83fa160f7ba7f7ce Author: Yoann Vandoorselaere Date: Sat Dec 18 14:20:48 2004 +0000 Do not try to extract data of type byte-string with prelude_extract_characters_safe since it will check for a ending \0. Preserve prelude_extract_* error value. Add some missing + 1 needed to include \0 in idmef-additional-data.h. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@4618 09c5ec92-17d4-0310-903a-819935f44dba src/idmef-message-read.c | Bin 65024 -> 65383 bytes .../GenerateIDMEFMessageReadC.pm | 56 +++++++++++++------ src/include/idmef-additional-data.h | 20 ++++---- 3 files changed, 48 insertions(+), 28 deletions(-) commit 2ce854b3958c49f51c714885b97620c30bf9675d Author: Yoann Vandoorselaere Date: Sat Dec 18 12:52:44 2004 +0000 Fix set() on option path where one of the option might not have a set() function, and might only be used as a context. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@4617 09c5ec92-17d4-0310-903a-819935f44dba src/prelude-option.c | 10 ++++------ 1 files changed, 4 insertions(+), 6 deletions(-) commit 2f88ae3eaa0c61998a7c10a4714d47405063cd0e Author: Yoann Vandoorselaere Date: Fri Dec 17 19:59:19 2004 +0000 Default context is now NULL. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@4613 09c5ec92-17d4-0310-903a-819935f44dba src/prelude-option-wide.c | 8 ++++---- 1 files changed, 4 insertions(+), 4 deletions(-) commit a23a4cc32f7eda086a2eac698f2d8ee8fc14037f Author: Yoann Vandoorselaere Date: Fri Dec 17 19:57:21 2004 +0000 Set connection-mgr data to point to the prelude_client_t. Set the default context for the prelude generic root option to be prelude_client_t. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@4612 09c5ec92-17d4-0310-903a-819935f44dba src/prelude-client.c | 8 ++++++-- 1 files changed, 6 insertions(+), 2 deletions(-) commit 6d9c168b6c631cebd5ba36226d8fff6248c83d9f Author: Yoann Vandoorselaere Date: Fri Dec 17 19:56:29 2004 +0000 Implemented prelude_option_new_root(). More context checking. Ability to set a default option context. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@4611 09c5ec92-17d4-0310-903a-819935f44dba src/include/prelude-option.h | 4 + src/prelude-option.c | 178 +++++++++++++++++++++++++++++------------- 2 files changed, 129 insertions(+), 53 deletions(-) commit 97c54d4adda75505a0c973cc5d7e9ec2239824f2 Author: Yoann Vandoorselaere Date: Fri Dec 17 14:44:39 2004 +0000 More timer handling fixes... git-svn-id: file:///home/yoann/SVN/trunk/libprelude@4609 09c5ec92-17d4-0310-903a-819935f44dba src/prelude-connection-mgr.c | 20 ++++++++++++-------- 1 files changed, 12 insertions(+), 8 deletions(-) commit 56606501fc26eb4b33558343dc8157ea4d4a856d Author: Yoann Vandoorselaere Date: Fri Dec 17 14:16:28 2004 +0000 Always start the event timer if an event_handler is specified. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@4608 09c5ec92-17d4-0310-903a-819935f44dba src/prelude-connection-mgr.c | 8 ++++---- 1 files changed, 4 insertions(+), 4 deletions(-) commit 867894653760966ab29dfd5d490dea6a54ea2247 Author: Yoann Vandoorselaere Date: Fri Dec 17 13:39:54 2004 +0000 On demand profile loading. To avoid error when a prelude_client_t got no TLS certificate since it's not supposed to connect. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@4607 09c5ec92-17d4-0310-903a-819935f44dba src/include/prelude-client-profile.h | 2 +- src/prelude-client-profile.c | 21 +++++++++++++++------ src/tls-auth.c | 6 +++++- 3 files changed, 21 insertions(+), 8 deletions(-) commit 70503a61b09c81c138dcbfff4fd6a60a97ea41c3 Author: Nicolas Delon Date: Fri Dec 17 06:09:32 2004 +0000 fix type-unsafe operations with idmef-data create helper functions for additional data update python bindings to last prelude-client*/prelude-connection API changes git-svn-id: file:///home/yoann/SVN/trunk/libprelude@4603 09c5ec92-17d4-0310-903a-819935f44dba bindings/libprelude.i | 67 +++-- bindings/python/prelude.py | 64 +++-- src/Makefile.am | 1 + src/idmef-additional-data.c | 362 ++++++++++++++++++++ src/idmef-data.c | 358 +++++++++++++------- src/idmef-message-read.c | Bin 63433 -> 65024 bytes src/idmef-message-write.c | 33 ++- src/idmef-time.c | 9 +- src/idmef-tree-wrap.c | 162 +++++++++- src/idmef-util.c | 79 ----- src/idmef-value-type.c | 2 +- .../GenerateIDMEFMessageReadC.pm | 85 +++++- .../GenerateIDMEFMessageWriteC.pm | 33 ++- src/idmef-wrappers-gen/idmef-tree.h | 23 +- src/include/Makefile.am | 1 + src/include/idmef-additional-data.h | 309 +++++++++++++++++ src/include/idmef-data.h | 218 +++++++------ src/include/idmef-tree-wrap.h | 89 +++--- src/include/idmef-util.h | 5 - src/include/idmef.h | 1 + src/include/prelude-client.h | 14 - src/include/prelude-connection.h | 2 - src/prelude-client.c | 15 +- 23 files changed, 1491 insertions(+), 441 deletions(-) commit c836f633a44099bec0c0010af9c93db6b744f895 Author: Yoann Vandoorselaere Date: Fri Dec 17 05:14:49 2004 +0000 More fixes. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@4602 09c5ec92-17d4-0310-903a-819935f44dba client.conf.in | 4 ++-- global.conf.in | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) commit 02086f2266185933d98d99480df1a698e2a13cea Author: Yoann Vandoorselaere Date: Fri Dec 17 04:19:54 2004 +0000 Remove deprecated prelude_client_t dependencies for issuing option request. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@4601 09c5ec92-17d4-0310-903a-819935f44dba src/include/prelude-option-wide.h | 2 +- src/prelude-option-wide.c | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) commit c91158ccb64ddc681d71c8f04571b836712b7c32 Author: Yoann Vandoorselaere Date: Fri Dec 17 04:02:18 2004 +0000 commit missing. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@4600 09c5ec92-17d4-0310-903a-819935f44dba client.conf.in | 2 ++ global.conf.in | 2 ++ 2 files changed, 4 insertions(+), 0 deletions(-) commit 2a3e2cb42f717d418653c94ed66949ab03c4a2c1 Author: Yoann Vandoorselaere Date: Fri Dec 17 02:18:55 2004 +0000 Update. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@4595 09c5ec92-17d4-0310-903a-819935f44dba docs/api/tmpl/common.sgml | 9 + docs/api/tmpl/idmef-message-id.sgml | 244 ++++- docs/api/tmpl/idmef-message-read.sgml | 50 + docs/api/tmpl/idmef-message-write.sgml | 45 + docs/api/tmpl/idmef-time.sgml | 91 ++ docs/api/tmpl/idmef-tree-print.sgml | 40 + docs/api/tmpl/idmef-tree-to-string.sgml | 55 + docs/api/tmpl/idmef-tree-wrap.sgml | 1804 ++++++++++++++++++++++++++++++- docs/api/tmpl/idmef-tree.sgml | 9 + docs/api/tmpl/idmef-value.sgml | 46 + docs/api/tmpl/libprelude-unused.sgml | 70 +- docs/api/tmpl/prelude-client.sgml | 9 + docs/api/tmpl/prelude-list.sgml | 19 + docs/api/tmpl/prelude-log.sgml | 68 +- docs/api/tmpl/prelude-message.sgml | 10 - docs/api/tmpl/prelude-plugin.sgml | 17 + 16 files changed, 2462 insertions(+), 124 deletions(-) commit 5839467772a50a91bba1c91280950bf2127cbc03 Author: Yoann Vandoorselaere Date: Fri Dec 17 02:17:44 2004 +0000 Kill client-ident dependencie. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@4594 09c5ec92-17d4-0310-903a-819935f44dba src/prelude-connection.c | 1 - 1 files changed, 0 insertions(+), 1 deletions(-) commit 56ecb0f4f16e4be91af9eb35ef1c9d574c9cbd18 Author: Yoann Vandoorselaere Date: Fri Dec 17 02:17:30 2004 +0000 Kill client-ident.h dependencie. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@4593 09c5ec92-17d4-0310-903a-819935f44dba src/prelude-client.c | 1 - 1 files changed, 0 insertions(+), 1 deletions(-) commit ec7640515285b2c52bed1920af486d74f19b7754 Author: Yoann Vandoorselaere Date: Fri Dec 17 02:17:10 2004 +0000 Make the output of prelude-option print somewhat nicer. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@4592 09c5ec92-17d4-0310-903a-819935f44dba src/prelude-option.c | 16 ++++++++-------- 1 files changed, 8 insertions(+), 8 deletions(-) commit 6576661e7a46c4efda28ded8a42d915ede4aea64 Author: Yoann Vandoorselaere Date: Fri Dec 17 02:15:53 2004 +0000 Re-work the implementation, providing the ability to specify differents kind of event handler. API cleanup. Error handling cleanup. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@4591 09c5ec92-17d4-0310-903a-819935f44dba src/include/prelude-connection-mgr.h | 37 +++- src/prelude-connection-mgr.c | 467 ++++++++++++++++++---------------- 2 files changed, 279 insertions(+), 225 deletions(-) commit f8358f45d20300feb5264a86a007973fa0abf96c Author: Yoann Vandoorselaere Date: Fri Dec 17 02:15:11 2004 +0000 Update. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@4590 09c5ec92-17d4-0310-903a-819935f44dba src/include/idmef-tree-wrap.h | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) commit 56e02952034dfcc93d9433912d7fd0417a5a0a2b Author: Yoann Vandoorselaere Date: Fri Dec 17 02:14:58 2004 +0000 Update. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@4589 09c5ec92-17d4-0310-903a-819935f44dba src/idmef-tree-wrap.c | 144 ++++++++++++++++++++++++------------------------ 1 files changed, 72 insertions(+), 72 deletions(-) commit 233c03412c08950be194ffadca5d933c82d355bd Author: Yoann Vandoorselaere Date: Fri Dec 17 02:14:25 2004 +0000 Use prelude-client-profile, some code cleanup. Only parse our own options. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@4588 09c5ec92-17d4-0310-903a-819935f44dba src/include/prelude-client.h | 46 +++++++++-------------------------------- 1 files changed, 10 insertions(+), 36 deletions(-) commit d4b893b25657a8bd4deececc5078690ee0d483d1 Author: Yoann Vandoorselaere Date: Fri Dec 17 02:13:53 2004 +0000 Use prelude-clien git-svn-id: file:///home/yoann/SVN/trunk/libprelude@4587 09c5ec92-17d4-0310-903a-819935f44dba src/prelude-client.c | 715 +++++++++++++++++++------------------------------- 1 files changed, 269 insertions(+), 446 deletions(-) commit 0d8af233e9572c26763be0cf7bc0e7929d7614bf Author: Yoann Vandoorselaere Date: Fri Dec 17 02:12:14 2004 +0000 Fit msgbuf changes. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@4586 09c5ec92-17d4-0310-903a-819935f44dba src/prelude-option-wide.c | 23 ++++++++++++----------- 1 files changed, 12 insertions(+), 11 deletions(-) commit ab3856e9d270d05cc26a9afb149dffadb11bc7d9 Author: Yoann Vandoorselaere Date: Fri Dec 17 02:11:22 2004 +0000 capability message id renaming. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@4585 09c5ec92-17d4-0310-903a-819935f44dba src/include/prelude-message-id.h | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) commit 3f09dcf22cc2ddb494f173c03d9826850b43a51e Author: Yoann Vandoorselaere Date: Fri Dec 17 02:10:49 2004 +0000 Use prelude-client-profile instead of prelude-client. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@4584 09c5ec92-17d4-0310-903a-819935f44dba prelude-adduser/prelude-adduser.c | 126 +++++++++++++++++++------------------ prelude-adduser/server.c | 21 ++++--- prelude-adduser/server.h | 2 +- prelude-adduser/tls-register.c | 68 ++++++++++---------- prelude-adduser/tls-register.h | 10 ++-- 5 files changed, 117 insertions(+), 110 deletions(-) commit c500781554dff93e60c5ef16ad909f6b695f9372 Author: Yoann Vandoorselaere Date: Fri Dec 17 02:10:27 2004 +0000 Remove unused. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@4583 09c5ec92-17d4-0310-903a-819935f44dba src/tls-util.c | 22 ---------------------- 1 files changed, 0 insertions(+), 22 deletions(-) commit 9fdeee3878733ee756ec7942bbc558f98a84df61 Author: Yoann Vandoorselaere Date: Fri Dec 17 02:09:39 2004 +0000 commit missing. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@4582 09c5ec92-17d4-0310-903a-819935f44dba src/include/tls-auth.h | 6 ++++-- 1 files changed, 4 insertions(+), 2 deletions(-) commit 11a197261e8b695012564b40eacbb3f43992b722 Author: Yoann Vandoorselaere Date: Fri Dec 17 02:09:19 2004 +0000 Initialize gcrypt for thread. Use a client-profile instead of a prelude-client. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@4581 09c5ec92-17d4-0310-903a-819935f44dba src/tls-auth.c | 22 ++++++++++++++-------- 1 files changed, 14 insertions(+), 8 deletions(-) commit 403e223e49f091a8341ee4cf0d8c1471ba4af3a6 Author: Yoann Vandoorselaere Date: Fri Dec 17 02:08:29 2004 +0000 client-ident is deprecated. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@4580 09c5ec92-17d4-0310-903a-819935f44dba src/Makefile.am | 2 +- src/client-ident.c | 100 -------------------------------------------- src/include/Makefile.am | 3 +- src/include/client-ident.h | 35 --------------- 4 files changed, 3 insertions(+), 137 deletions(-) commit 2b8a78b5398fc0a4c4d3c2e849836a38f454e0c3 Author: Yoann Vandoorselaere Date: Fri Dec 17 02:07:06 2004 +0000 Use prelude-error in some place. Store peer analyzerid. Use per connection capability instead of using prelude-client internal capability. Kill prelude-client dependencie, in favor of client-profile. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@4579 09c5ec92-17d4-0310-903a-819935f44dba src/include/prelude-connection.h | 26 ++++- src/prelude-connection.c | 249 +++++++++++++++++++++++++------------- 2 files changed, 185 insertions(+), 90 deletions(-) commit c77d8a17d1616dbb7931e13a822930b04fc1480e Author: Yoann Vandoorselaere Date: Fri Dec 17 02:05:10 2004 +0000 Make the prelude-msgbuf API prelude-error friendly. Interract with new prelude-msg API. Kill prelude-client dependencie. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@4578 09c5ec92-17d4-0310-903a-819935f44dba src/include/prelude-msgbuf.h | 26 ++++++---- src/prelude-msgbuf.c | 114 ++++++++++++++++++++++------------------- 2 files changed, 77 insertions(+), 63 deletions(-) commit c18ac0f87cb8828cbdc9afc18625eb9cd920e3ca Author: Yoann Vandoorselaere Date: Fri Dec 17 02:03:37 2004 +0000 Make the prelude-msg API prelude-error friendly. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@4577 09c5ec92-17d4-0310-903a-819935f44dba src/include/prelude-msg.h | 8 ++-- src/prelude-msg.c | 85 ++++++++++++++++++++++++++++----------------- 2 files changed, 57 insertions(+), 36 deletions(-) commit 1faacc73f7a011c09b20a1970985ded03c1ae483 Author: Yoann Vandoorselaere Date: Fri Dec 17 02:02:12 2004 +0000 Missing commit. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@4576 09c5ec92-17d4-0310-903a-819935f44dba src/include/prelude-io.h | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) commit 73b830d34fdab035da410ca21202353b22779483 Author: Yoann Vandoorselaere Date: Fri Dec 17 02:02:00 2004 +0000 Make prelude-io prelude error code friendly. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@4575 09c5ec92-17d4-0310-903a-819935f44dba src/prelude-io.c | 15 +++++++-------- 1 files changed, 7 insertions(+), 8 deletions(-) commit fc58633b075dd302d378ec716eeb629ca82b9da9 Author: Yoann Vandoorselaere Date: Fri Dec 17 02:01:20 2004 +0000 Make prelude-failover able to return prelude-error code. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@4574 09c5ec92-17d4-0310-903a-819935f44dba src/include/prelude-failover.h | 2 +- src/prelude-failover.c | 40 +++++++++++++++++----------------------- 2 files changed, 18 insertions(+), 24 deletions(-) commit cba2a84cc99d5db5e44a68d048ff11db20b13ef8 Author: Yoann Vandoorselaere Date: Fri Dec 17 02:00:40 2004 +0000 Make prelude_ident_new() able to return prelude error code. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@4573 09c5ec92-17d4-0310-903a-819935f44dba src/include/prelude-ident.h | 2 +- src/prelude-ident.c | 18 +++++++++--------- 2 files changed, 10 insertions(+), 10 deletions(-) commit 4f1e4605652c87b87a2814c010f4c4a785273e1b Author: Yoann Vandoorselaere Date: Fri Dec 17 01:59:37 2004 +0000 Remove DYNAMIC_IDENT tag for alert/heartbeat. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@4572 09c5ec92-17d4-0310-903a-819935f44dba src/idmef-wrappers-gen/idmef-tree.h | 6 ++---- 1 files changed, 2 insertions(+), 4 deletions(-) commit 55eaa64c683de3f0a25c8102627a39d84f6fcc15 Author: Yoann Vandoorselaere Date: Fri Dec 17 01:58:58 2004 +0000 Don't write the missing alert/heartbeat message ident here. This really belong to prelude-client. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@4571 09c5ec92-17d4-0310-903a-819935f44dba src/idmef-message-write.c | 24 +++---------------- .../GenerateIDMEFMessageWriteC.pm | 25 ++----------------- 2 files changed, 7 insertions(+), 42 deletions(-) commit b995199d9fb6c9a4c560efdff1c041de851b0ae2 Author: Yoann Vandoorselaere Date: Fri Dec 17 01:56:56 2004 +0000 New prelude-client-profile implementation. Will be hooked to prelude-client in a further commit. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@4570 09c5ec92-17d4-0310-903a-819935f44dba src/include/prelude-client-profile.h | 53 +++++ src/prelude-client-profile.c | 406 ++++++++++++++++++++++++++++++++++ 2 files changed, 459 insertions(+), 0 deletions(-) commit 59f959f75538a5d5d31a8c75a98565594c56a164 Author: Yoann Vandoorselaere Date: Fri Dec 17 01:55:29 2004 +0000 Updated. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@4569 09c5ec92-17d4-0310-903a-819935f44dba m4/libtool.m4 | 471 +++++++++++++++++++++++++++++++++------------------------ 1 files changed, 276 insertions(+), 195 deletions(-) commit f66d68653beead2d3b92a5e99afbac80babeb94b Author: Yoann Vandoorselaere Date: Fri Dec 17 01:54:53 2004 +0000 Define some more code. Implement prelude_perror(). git-svn-id: file:///home/yoann/SVN/trunk/libprelude@4568 09c5ec92-17d4-0310-903a-819935f44dba src/libprelude-error/Makefile.am | 3 ++- src/libprelude-error/err-sources.h.in | 4 +++- src/libprelude-error/perror.c | 18 ++++++++++++++++++ src/libprelude-error/prelude-error.h.in | 2 ++ 4 files changed, 25 insertions(+), 2 deletions(-) commit 209f5e5ea23a53437486006623091c6602481d48 Author: Yoann Vandoorselaere Date: Fri Dec 17 01:54:16 2004 +0000 Added prelude_log_v. Same as prelude_log(), but use a va_list. Make prelude_log() use prelude_log_v(). git-svn-id: file:///home/yoann/SVN/trunk/libprelude@4567 09c5ec92-17d4-0310-903a-819935f44dba src/include/prelude-log.h | 5 ++++- src/prelude-log.c | 25 ++++++++++++++++--------- 2 files changed, 20 insertions(+), 10 deletions(-) commit 0a2be00a918643486c2cc1d85e5a019d71ca6bf4 Author: Yoann Vandoorselaere Date: Tue Dec 14 14:10:51 2004 +0000 Fix non blocking message read. Cleanup. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@4563 09c5ec92-17d4-0310-903a-819935f44dba src/prelude-msg.c | 33 ++++++++++++--------------------- 1 files changed, 12 insertions(+), 21 deletions(-) commit 185f179cff24d43688bbdbabb5c71ff87e5fcb70 Author: Yoann Vandoorselaere Date: Mon Dec 13 10:44:37 2004 +0000 Send analyzerid prior to capability, since the analyzerid will be needed to apply certain capability. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@4562 09c5ec92-17d4-0310-903a-819935f44dba src/prelude-connection.c | 12 ++++++------ 1 files changed, 6 insertions(+), 6 deletions(-) commit b6723142110db84c1d8d6083c379a6dd3f27e902 Author: Yoann Vandoorselaere Date: Mon Dec 13 02:46:12 2004 +0000 Downgrade gnutls requirement from 1.0.17 to 1.0.14. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@4561 09c5ec92-17d4-0310-903a-819935f44dba configure.in | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) commit 603b1100bdb45d29d500ec3d039080ca34f8aa29 Author: Yoann Vandoorselaere Date: Sat Dec 11 19:33:05 2004 +0000 prelude_msg_write now only return success or error, and handle non blocking internally. Update function prototype and documentation. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@4560 09c5ec92-17d4-0310-903a-819935f44dba src/include/prelude-msg.h | 2 +- src/prelude-msg.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) commit 827b30cac2b81199d72d6387a28dfda450345a7a Author: Yoann Vandoorselaere Date: Sat Dec 11 19:31:31 2004 +0000 Slight cleanup. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@4559 09c5ec92-17d4-0310-903a-819935f44dba src/prelude-failover.c | 9 ++++----- 1 files changed, 4 insertions(+), 5 deletions(-) commit cc0b86f7b5866b025ba271cd9e8eb795a0437102 Author: Yoann Vandoorselaere Date: Sat Dec 11 03:52:48 2004 +0000 Free saddr on connection close, so that we don't leak memory on reconnect. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@4558 09c5ec92-17d4-0310-903a-819935f44dba src/prelude-connection.c | 3 +++ 1 files changed, 3 insertions(+), 0 deletions(-) commit eeffbc97a697fd5d99edaeec3e50fe7884a99e00 Author: Yoann Vandoorselaere Date: Sat Dec 11 03:32:19 2004 +0000 Only flush the cached element if flush_cache is positionned to TRUE. Otherwise, we should not flush since the object might still be in use. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@4557 09c5ec92-17d4-0310-903a-819935f44dba src/idmef-object.c | 15 +++++++++++++-- 1 files changed, 13 insertions(+), 2 deletions(-) commit cdcf8f02a173788cb91f94f7f5fb8f7cd59acd70 Author: Yoann Vandoorselaere Date: Fri Dec 10 17:19:21 2004 +0000 Move prelude_check_version() from common.c to prelude.c, implemented prelude_init() - which is a NOP right now - and prelude_deinit(), which will destroy the IDMEF object cache, and global option. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@4555 09c5ec92-17d4-0310-903a-819935f44dba src/Makefile.am | 1 + src/common.c | 29 ------------------ src/include/prelude.h.in | 4 ++ src/prelude.c | 74 ++++++++++++++++++++++++++++++++++++++++++++++ 4 files changed, 79 insertions(+), 29 deletions(-) commit f8be60ce3a5aa775d0db66ca8ff0afd4ff57f412 Author: Yoann Vandoorselaere Date: Fri Dec 10 17:14:34 2004 +0000 New internal _idmef_object_cache_destroy() function, to be called by prelude_deinit(). Also, provide a value destroy function callback to the prelude_hash_new() function, so that cached object can be destroyed on exit. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@4554 09c5ec92-17d4-0310-903a-819935f44dba src/idmef-object.c | 14 ++++++++++++-- src/include/idmef-object.h | 2 ++ 2 files changed, 14 insertions(+), 2 deletions(-) commit cd143c655a08fcc936d24cd5f1810f9658ebb00a Author: Yoann Vandoorselaere Date: Fri Dec 10 16:55:34 2004 +0000 Try to read the input as an ntpstamp. If that fail try to read it as a string. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@4553 09c5ec92-17d4-0310-903a-819935f44dba src/idmef-value-type.c | 10 +++++++--- 1 files changed, 7 insertions(+), 3 deletions(-) commit b7ec1b874ce674c116e9ef11dd2efa19b2b9c46f Author: Yoann Vandoorselaere Date: Thu Dec 9 14:39:51 2004 +0000 EOF to avoid commit should not be needed anymore. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@4549 09c5ec92-17d4-0310-903a-819935f44dba src/prelude-plugin.c | 5 +---- 1 files changed, 1 insertions(+), 4 deletions(-) commit 96f38d8bc8662046ee79eff02ea006585da9fffd Author: Yoann Vandoorselaere Date: Thu Dec 9 12:04:05 2004 +0000 Gather the peer analyzerID upon connection. New accessor function in prelude-client to access the peer ID. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@4545 09c5ec92-17d4-0310-903a-819935f44dba src/include/prelude-connection.h | 2 ++ src/include/tls-auth.h | 2 +- src/prelude-connection.c | 10 +++++++++- src/tls-auth.c | 22 +++++++++++++++------- 4 files changed, 27 insertions(+), 9 deletions(-) commit bb3a7da662d91b2864c5b1332a319670a5862c42 Author: Yoann Vandoorselaere Date: Thu Dec 9 07:59:47 2004 +0000 Set HOP after the target_id list. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@4544 09c5ec92-17d4-0310-903a-819935f44dba src/prelude-option-wide.c | 6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-) commit 60bc4a4f6c30a851dbe1d854211f9ffd08d4ed84 Author: Yoann Vandoorselaere Date: Thu Dec 9 02:57:25 2004 +0000 check whether we got an option onject. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@4542 09c5ec92-17d4-0310-903a-819935f44dba bindings/python/prelude.py | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) commit eeadfaa2aa09c37320608590798069b4fa4cdc35 Author: Nicolas Delon Date: Thu Dec 9 00:43:43 2004 +0000 fit libprelude C API last changes on the admin side git-svn-id: file:///home/yoann/SVN/trunk/libprelude@4540 09c5ec92-17d4-0310-903a-819935f44dba bindings/libprelude.i | 18 ++++++++++++++++++ bindings/python/prelude.py | 39 +++++++++++++++++---------------------- 2 files changed, 35 insertions(+), 22 deletions(-) commit d75375b6be99c34ccb84c2e4a6441778642b0028 Author: Yoann Vandoorselaere Date: Wed Dec 8 19:07:43 2004 +0000 Implement option message routing, very useful for error handling when issuing a request, and to avoid broadcasting message to everyone. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@4538 09c5ec92-17d4-0310-903a-819935f44dba src/include/prelude-message-id.h | 4 +- src/include/prelude-option-wide.h | 3 +- src/prelude-option-wide.c | 79 +++++++++++++++++++------------------ 3 files changed, 45 insertions(+), 41 deletions(-) commit 2b6a415bbab78d05fe11cf6cd14461787e04ea21 Author: Nicolas Delon Date: Wed Dec 8 10:31:13 2004 +0000 replace "NULL" by NULL bug fix for optional enum idmef_value retrival git-svn-id: file:///home/yoann/SVN/trunk/libprelude@4527 09c5ec92-17d4-0310-903a-819935f44dba src/idmef-tree-wrap.c | 234 +++++++++++----------- src/idmef-wrappers-gen/GenerateIDMEFTreeWrapC.pm | 18 +- 2 files changed, 124 insertions(+), 128 deletions(-) commit 9c5da6259f0a077bedfc7c2836611692859ad96f Author: Nicolas Delon Date: Mon Dec 6 18:36:30 2004 +0000 fit changes of libprelude C API git-svn-id: file:///home/yoann/SVN/trunk/libprelude@4515 09c5ec92-17d4-0310-903a-819935f44dba bindings/Makefile.am | 4 +- bindings/libprelude.i | 17 +++++++++++++ bindings/python/prelude.py | 54 +++++++++++++++++++++++++++++++------------- 3 files changed, 57 insertions(+), 18 deletions(-) commit 1d49bd9423367ee2680eb81c066d6ccf669489a4 Author: Yoann Vandoorselaere Date: Mon Dec 6 18:16:47 2004 +0000 More check in get option callback. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@4514 09c5ec92-17d4-0310-903a-819935f44dba src/prelude-client.c | 47 +++++++++++++++++++++++++++++++++++++++-------- 1 files changed, 39 insertions(+), 8 deletions(-) commit ecc2c15dd477ab355c15b3f4c16340161a5a2cf1 Author: Yoann Vandoorselaere Date: Mon Dec 6 18:16:32 2004 +0000 Implement prelude_string_get_string_or_default(), that return a provided string if content of the prelude_string_t is NULL. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@4513 09c5ec92-17d4-0310-903a-819935f44dba src/include/prelude-string.h | 2 ++ src/prelude-string.c | 6 ++++++ 2 files changed, 8 insertions(+), 0 deletions(-) commit 9c007bcdeca3564f381615767f3af31f8f278eca Author: Yoann Vandoorselaere Date: Mon Dec 6 18:15:44 2004 +0000 Cleanup. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@4512 09c5ec92-17d4-0310-903a-819935f44dba src/prelude-msg.c | 10 +++------- 1 files changed, 3 insertions(+), 7 deletions(-) commit c1035ccc21c5839d7502d08d8fb88a1465fa25ad Author: Yoann Vandoorselaere Date: Mon Dec 6 17:27:06 2004 +0000 Fix call to prelude_msg_get(). git-svn-id: file:///home/yoann/SVN/trunk/libprelude@4511 09c5ec92-17d4-0310-903a-819935f44dba src/prelude-option-wide.c | 6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-) commit 76689b3e08557c6824a8a3e38725f37af66e6a02 Author: Yoann Vandoorselaere Date: Mon Dec 6 17:13:31 2004 +0000 Return PRELUDE_ERROR_EOF when gnutls_record_recv() return 0. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@4510 09c5ec92-17d4-0310-903a-819935f44dba src/prelude-io.c | 3 +++ 1 files changed, 3 insertions(+), 0 deletions(-) commit 8c20aec86f3c3f704e45a446693439f7f65acdc9 Author: Nicolas Delon Date: Sun Dec 5 21:52:59 2004 +0000 handle uint8 and int8 type fields git-svn-id: file:///home/yoann/SVN/trunk/libprelude@4497 09c5ec92-17d4-0310-903a-819935f44dba bindings/python/prelude.py | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) commit c7d1c8f773cede6fff1ce3bd9c27aebcf8fc239f Author: Yoann Vandoorselaere Date: Sun Dec 5 17:42:45 2004 +0000 Fix duplicate declaration. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@4492 09c5ec92-17d4-0310-903a-819935f44dba src/libprelude-error/err-codes.h.in | 1 - 1 files changed, 0 insertions(+), 1 deletions(-) commit 03d84c77b6029a04d9db43d28da61374575d670d Author: Yoann Vandoorselaere Date: Sun Dec 5 13:18:30 2004 +0000 Remove modification done for error debugging. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@4490 09c5ec92-17d4-0310-903a-819935f44dba src/include/prelude-extract.h | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) commit 3d83478b1ff3ca1db21528b1ccf65c87161292bb Author: Yoann Vandoorselaere Date: Sun Dec 5 12:52:22 2004 +0000 Rename all instances of 'analyzer-name' to 'analyzer-profile'. All Prelude library command line provided option are now prefixed with 'prelude-' to avoid cluttering the caller namespace. The analyzer-name option now provide the ability to set the IDMEF analyzer name field. --prelude-profile option can be used to specify which profile to use for this analyzer. More work on error handling. More API consistancy fix, rename extract.h to prelude-extract.h and prefix all the function. Do not install ntp.h and config-engine.h header since these are not supposed to be public. Generate idmef_message_read(), which a given prelude client might want to use. It doesn't permit to deal with proprietary message tag as of now. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@4485 09c5ec92-17d4-0310-903a-819935f44dba bindings/perl/Makefile.PL.in | 2 +- bindings/python/setup.py.in | 2 +- client.conf.in | 4 +- global.conf.in | 7 +- prelude-adduser/Makefile.am | 5 +- prelude-adduser/prelude-adduser.c | 35 ++-- src/idmef-message-read.c | Bin 48078 -> 63433 bytes src/idmef-message-write.c | 1 - src/idmef-util.c | 11 +- .../GenerateIDMEFMessageReadC.pm | 78 +++---- .../GenerateIDMEFMessageReadH.pm | 7 +- src/include/Makefile.am | 6 +- src/include/extract.h | 263 -------------------- src/include/idmef-message-read.h | 60 +++--- src/include/prelude-client.h | 14 +- src/include/prelude-extract.h | 263 ++++++++++++++++++++ src/libprelude-error/err-codes.h.in | 12 +- src/libprelude-error/err-sources.h.in | 1 + src/prelude-client.c | 129 +++++++--- src/prelude-connection-mgr.c | 8 +- src/prelude-connection.c | 5 +- src/prelude-msg.c | 30 ++- src/prelude-option-wide.c | 65 +++--- 23 files changed, 523 insertions(+), 485 deletions(-) commit a50134cdf7293a5953795c48157700889634ce50 Author: Yoann Vandoorselaere Date: Sun Dec 5 12:03:29 2004 +0000 Remove deprecated headers inclusion. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@4484 09c5ec92-17d4-0310-903a-819935f44dba src/prelude-inet.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) commit 4f6c28163f5bc41164a5aff8f013711ad73ec0ea Author: Yoann Vandoorselaere Date: Sun Dec 5 12:02:54 2004 +0000 Remove deprecated headers. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@4483 09c5ec92-17d4-0310-903a-819935f44dba src/client-ident.c | 2 -- 1 files changed, 0 insertions(+), 2 deletions(-) commit 57b3d8b35de0518410d0d7b54f38402b697aedb0 Author: Yoann Vandoorselaere Date: Fri Dec 3 18:15:52 2004 +0000 Remaining of API cleanup and consistency fix: - timer.[ch] -> prelude-timer.[ch] - prelude-message.[ch] -> prelude-msg.[ch] - prelude-message-buffered.[ch] -> prelude-msgbuf.[ch] - prelude-getopt.[ch] -> prelude-option.[ch] As well as the function contained by these. Start to use prelude_error() in important place for error reporting. Fix prelude-manager relaying that was broken some time ago. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@4474 09c5ec92-17d4-0310-903a-819935f44dba bindings/Makefile.am | 2 +- bindings/libprelude.i | 15 +- docs/api/libprelude-decl.txt | 788 +++++++++++- docs/api/libprelude-docs.sgml | 2 - docs/api/libprelude-sections.txt | 658 +++++++--- prelude-adduser/prelude-adduser.c | 32 +- src/Makefile.am | 40 +- src/client-ident.c | 11 +- src/common.c | 16 +- src/idmef-message-read.c | Bin 48145 -> 48078 bytes src/idmef-message-write.c | 3 +- src/idmef-object.c | 3 +- src/idmef-tree-wrap.c | 170 ++-- .../GenerateIDMEFMessageReadC.pm | 2 - .../GenerateIDMEFMessageReadH.pm | 2 +- .../GenerateIDMEFMessageWriteC.pm | 2 - .../GenerateIDMEFMessageWriteH.pm | 2 +- src/idmef-wrappers-gen/GenerateIDMEFTreeWrapC.pm | 2 +- src/idmef-wrappers-gen/GenerateIDMEFTreeWrapH.pm | 2 +- src/include/Makefile.am | 47 +- src/include/idmef-message-read.h | 2 +- src/include/idmef-message-write.h | 2 +- src/include/idmef-tree-wrap.h | 72 +- src/include/prelude-client.h | 7 +- src/include/prelude-connection.h | 2 +- src/include/prelude-getopt-wide.h | 42 - src/include/prelude-getopt.h | 198 --- src/include/prelude-message-buffered.h | 52 - src/include/prelude-message-id.h | 2 +- src/include/prelude-message.h | 102 -- src/include/prelude-msg.h | 94 ++ src/include/prelude-msgbuf.h | 52 + src/include/prelude-option-wide.h | 42 + src/include/prelude-option.h | 180 +++ src/include/prelude-plugin.h | 8 +- src/include/prelude-timer.h | 104 ++ src/include/prelude.h.in | 8 +- src/include/threads.h | 115 -- src/include/timer.h | 104 -- src/include/tls-auth.h | 2 +- src/prelude-async.c | 6 +- src/prelude-client.c | 238 ++-- src/prelude-connection-mgr.c | 73 +- src/prelude-connection.c | 4 +- src/prelude-failover.c | 11 +- src/prelude-getopt-wide.c | 484 ------- src/prelude-getopt.c | 1395 ------------------- src/prelude-io.c | 51 +- src/prelude-message-buffered.c | 237 ---- src/prelude-message.c | 937 ------------- src/prelude-msg.c | 923 +++++++++++++ src/prelude-msgbuf.c | 237 ++++ src/prelude-option-wide.c | 483 +++++++ src/prelude-option.c | 1398 ++++++++++++++++++++ src/prelude-plugin.c | 8 +- src/prelude-timer.c | 435 ++++++ src/timer.c | 435 ------ src/tls-auth.c | 43 +- src/tls-util.c | 29 +- 59 files changed, 5685 insertions(+), 4731 deletions(-) commit e5cedf930b6fd19858673d1bdde642c35ea9d2df Author: Yoann Vandoorselaere Date: Fri Dec 3 18:08:39 2004 +0000 generate Makefile for libprelude-error. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@4473 09c5ec92-17d4-0310-903a-819935f44dba configure.in | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) commit 8d68adcfc063444aaba98c3c72585589ade2a1be Author: Yoann Vandoorselaere Date: Fri Dec 3 18:04:27 2004 +0000 Commit implementation of libprelude-error, based on libgpg-error. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@4472 09c5ec92-17d4-0310-903a-819935f44dba src/libprelude-error/Makefile.am | 58 ++++++++++ src/libprelude-error/README | 1 + src/libprelude-error/code-from-errno.c | 39 +++++++ src/libprelude-error/code-to-errno.c | 41 +++++++ src/libprelude-error/err-codes.h.in | 55 +++++++++ src/libprelude-error/err-sources.h.in | 39 +++++++ src/libprelude-error/errnos.in | 172 ++++++++++++++++++++++++++++ src/libprelude-error/gettext.h | 69 +++++++++++ src/libprelude-error/mkerrcodes.awk | 93 +++++++++++++++ src/libprelude-error/mkerrcodes.c | 78 +++++++++++++ src/libprelude-error/mkerrcodes1.awk | 90 +++++++++++++++ src/libprelude-error/mkerrcodes2.awk | 134 ++++++++++++++++++++++ src/libprelude-error/mkerrnos.awk | 97 ++++++++++++++++ src/libprelude-error/mkheader.awk | 190 +++++++++++++++++++++++++++++++ src/libprelude-error/mkstrtable.awk | 186 ++++++++++++++++++++++++++++++ src/libprelude-error/prelude-error.h.in | 113 ++++++++++++++++++ src/libprelude-error/strerror-sym.c | 54 +++++++++ src/libprelude-error/strerror.c | 50 ++++++++ src/libprelude-error/strsource-sym.c | 41 +++++++ src/libprelude-error/strsource.c | 35 ++++++ 20 files changed, 1635 insertions(+), 0 deletions(-) commit a3837387e63f4f5f195065e379cda164a9b0ddc5 Author: Yoann Vandoorselaere Date: Fri Dec 3 17:55:38 2004 +0000 Remove prelude_string_dont_own(). It's usage is flawed since the caller have no idea whether the string was reallocated on further string operation, and might have used prelude_string_get_string() first. Make prelude_string_get_string() return a const. Implemented prelude_string_get_string_released() in place of prelude_string_dont_own(). It also reallocate the string to the exact size it need. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@4471 09c5ec92-17d4-0310-903a-819935f44dba src/include/prelude-string.h | 6 +++--- src/prelude-string.c | 27 ++++++++++++++++++--------- 2 files changed, 21 insertions(+), 12 deletions(-) commit 7f6347936cffdfdca72a94961f7b1744ff2142d0 Author: Nicolas Delon Date: Fri Dec 3 16:24:53 2004 +0000 bug fix, don't forget to had the gmt offset to the UTC time git-svn-id: file:///home/yoann/SVN/trunk/libprelude@4469 09c5ec92-17d4-0310-903a-819935f44dba src/idmef-time.c | 11 +++++++++-- 1 files changed, 9 insertions(+), 2 deletions(-) commit 648bd91c5ed190ea43c4790ab71be95d3f4fbe2a Author: Nicolas Delon Date: Fri Dec 3 16:23:59 2004 +0000 fit libprelude function renaming handle correctly gmt offset git-svn-id: file:///home/yoann/SVN/trunk/libprelude@4468 09c5ec92-17d4-0310-903a-819935f44dba bindings/python/prelude.py | 13 +++++++++---- 1 files changed, 9 insertions(+), 4 deletions(-) commit a67d0bfa01e29b6f1b9524940b2413db03e36733 Author: Nicolas Delon Date: Fri Dec 3 16:05:42 2004 +0000 bug fix: gmt_offset was not copied in idmef_time_clone nor idmef_time_copy fix constness prototype git-svn-id: file:///home/yoann/SVN/trunk/libprelude@4467 09c5ec92-17d4-0310-903a-819935f44dba src/idmef-time.c | 8 ++++---- src/include/idmef-time.h | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) commit 8dd3e542283dca4373d32b5c631fd70c0fab6145 Author: Nicolas Delon Date: Fri Dec 3 15:23:37 2004 +0000 bug fix, forgot to initialize tv_sec git-svn-id: file:///home/yoann/SVN/trunk/libprelude@4466 09c5ec92-17d4-0310-903a-819935f44dba src/idmef-time.c | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) commit 03f8dc4df90beea95e698312064f4e5bf263d488 Author: Yoann Vandoorselaere Date: Thu Dec 2 18:10:40 2004 +0000 Merge idmef-v12-work change back in trunk. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@4460 09c5ec92-17d4-0310-903a-819935f44dba docs/api/libprelude-decl.txt | 1681 +++++--- docs/api/tmpl/common.sgml | 3 +- docs/api/tmpl/idmef-message-id.sgml | 133 - docs/api/tmpl/idmef-message-read.sgml | 30 - docs/api/tmpl/idmef-message-write.sgml | 27 - docs/api/tmpl/idmef-time.sgml | 118 - docs/api/tmpl/idmef-tree-print.sgml | 24 - docs/api/tmpl/idmef-tree-to-string.sgml | 33 - docs/api/tmpl/idmef-tree-wrap.sgml | 1000 +----- docs/api/tmpl/idmef-util.sgml | 14 - docs/api/tmpl/idmef-value-type.sgml | 2 + docs/api/tmpl/libprelude-unused.sgml | 1239 ++++++ docs/api/tmpl/prelude-log.sgml | 18 - docs/api/tmpl/tls-auth.sgml | 1 + src/common.c | 48 +- src/idmef-criterion-value.c | 8 +- src/idmef-message-read.c | Bin 43796 -> 48145 bytes src/idmef-message-write.c | 320 ++- src/idmef-object.c | 35 +- src/idmef-time.c | 286 +-- src/idmef-tree-print.c | 773 +++- src/idmef-tree-to-string.c | 781 +++- src/idmef-tree-wrap.c | 4306 ++++++++++++++------ src/idmef-value-type.c | 59 +- src/idmef-value.c | 4 + src/idmef-wrappers-gen/GenerateIDMEFMessageIdH.pm | 3 +- .../GenerateIDMEFMessageReadC.pm | 3 +- .../GenerateIDMEFMessageReadH.pm | 3 +- .../GenerateIDMEFMessageWriteC.pm | 46 +- .../GenerateIDMEFMessageWriteH.pm | 3 +- src/idmef-wrappers-gen/GenerateIDMEFTreeData.pm | 3 +- src/idmef-wrappers-gen/GenerateIDMEFTreePrintC.pm | 41 +- src/idmef-wrappers-gen/GenerateIDMEFTreePrintH.pm | 3 +- .../GenerateIDMEFTreeToStringC.pm | 34 +- .../GenerateIDMEFTreeToStringH.pm | 3 +- src/idmef-wrappers-gen/GenerateIDMEFTreeWrapC.pm | 72 +- src/idmef-wrappers-gen/GenerateIDMEFTreeWrapH.pm | 13 +- src/idmef-wrappers-gen/IDMEFTree.pm | 41 +- src/idmef-wrappers-gen/idmef-tree.h | 242 +- src/include/common.h | 5 +- src/include/idmef-message-id.h | 265 +- src/include/idmef-message-read.h | 12 +- src/include/idmef-message-write.h | 10 +- src/include/idmef-time.h | 27 +- src/include/idmef-tree-data.h | 79 +- src/include/idmef-tree-print.h | 10 +- src/include/idmef-tree-to-string.h | 10 +- src/include/idmef-tree-wrap.h | 673 ++-- src/include/idmef-util.h | 3 - src/include/idmef-value-type.h | 34 +- src/include/idmef-value.h | 4 + src/prelude-client.c | 9 +- 52 files changed, 7895 insertions(+), 4699 deletions(-) commit 92ba1cec7414aebdc15af0bf4d6d349b02235c7c Author: Yoann Vandoorselaere Date: Wed Dec 1 20:26:30 2004 +0000 More error checking. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@4450 09c5ec92-17d4-0310-903a-819935f44dba src/prelude-connection.c | 3 +++ 1 files changed, 3 insertions(+), 0 deletions(-) commit d27d44c44d8ea6ad371f391a04b0d0b6364406bc Author: Yoann Vandoorselaere Date: Tue Nov 23 17:18:53 2004 +0000 New function, prelude_client_send_idmef(), use the same msgbuf as for the heartbeat sending, and this is much easier for the application to use. Only allocate credentials if we have sending capability. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@4420 09c5ec92-17d4-0310-903a-819935f44dba src/include/prelude-client.h | 2 + src/prelude-client.c | 52 +++++++++++++++++++++++++++++++++-------- 2 files changed, 44 insertions(+), 10 deletions(-) commit 2362b2e35711bb6e23346d472536e5d2bfa24dd8 Author: Yoann Vandoorselaere Date: Mon Nov 22 12:25:48 2004 +0000 Add missing copyright notice. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@4415 09c5ec92-17d4-0310-903a-819935f44dba src/include/timer.h | 2 +- src/prelude-getopt-wide.c | 23 +++++++++++++++++++++++ src/tls-util.c | 23 +++++++++++++++++++++++ 3 files changed, 47 insertions(+), 1 deletions(-) commit 429dfe8925eb54fae4832c89e072eca4cbe408de Author: Yoann Vandoorselaere Date: Mon Nov 22 12:24:58 2004 +0000 Add missing copyright notice. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@4414 09c5ec92-17d4-0310-903a-819935f44dba prelude-adduser/plaintext.c | 23 +++++++++++++++++++++++ prelude-adduser/server.c | 23 +++++++++++++++++++++++ prelude-adduser/server.h | 23 +++++++++++++++++++++++ 3 files changed, 69 insertions(+), 0 deletions(-) commit f52ec41549878b86c465c207bba5324c932a7df4 Author: Yoann Vandoorselaere Date: Mon Nov 22 03:41:22 2004 +0000 type cleanup. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@4410 09c5ec92-17d4-0310-903a-819935f44dba src/include/prelude-io.h | 2 +- src/prelude-io.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) commit 1515e618b2ca037dfd01e3545d03977aaa9ee0fc Author: Yoann Vandoorselaere Date: Sun Nov 21 00:31:03 2004 +0000 Correct handling of asychronous flags signaling. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@4407 09c5ec92-17d4-0310-903a-819935f44dba src/prelude-async.c | 23 +++++++++++++++-------- 1 files changed, 15 insertions(+), 8 deletions(-) commit 6a0ae0d2b5be7303667695a24b772672cb11e8a7 Author: Yoann Vandoorselaere Date: Sat Nov 20 23:49:13 2004 +0000 Add missing initialization of fd_write_index in prelude_msg_dynamic_new(). git-svn-id: file:///home/yoann/SVN/trunk/libprelude@4406 09c5ec92-17d4-0310-903a-819935f44dba src/prelude-message.c | 1 + 1 files changed, 1 insertions(+), 0 deletions(-) commit 2cb82ed0e0ae1aed673a28d39225c31a5d2a12d4 Author: Yoann Vandoorselaere Date: Sat Nov 20 23:43:34 2004 +0000 Fix a bug introduced in [3909] (handling of non blocking write of prelude-message), that resulted in the message being sent only one time when a AND list of manager was specified. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@4405 09c5ec92-17d4-0310-903a-819935f44dba src/prelude-message.c | 17 ++++++++++++----- 1 files changed, 12 insertions(+), 5 deletions(-) commit 738c18101867c950597eefad5d672e835310ad3b Author: Yoann Vandoorselaere Date: Fri Nov 19 01:05:51 2004 +0000 Prevent NULL pointer dereference if argc is NULL. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@4401 09c5ec92-17d4-0310-903a-819935f44dba src/prelude-getopt.c | 6 ++++-- 1 files changed, 4 insertions(+), 2 deletions(-) commit 3d64af44ab5c3a6bd2063773c379e87f5cf64012 Author: Yoann Vandoorselaere Date: Wed Nov 17 16:26:03 2004 +0000 Implemented prelude_list_for_each_continue() and prelude_list_for_each_continue_safe(), allowing to iterate through listed object in several pass. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@4395 09c5ec92-17d4-0310-903a-819935f44dba src/include/prelude-list.h | 14 ++++++++++++++ 1 files changed, 14 insertions(+), 0 deletions(-) commit be5d425bb46d05d04a38596034907d40691f8b19 Author: Yoann Vandoorselaere Date: Wed Nov 17 16:22:41 2004 +0000 Implemented prelude_plugin_get_next(), provide the ability to walk through every loaded plugin, even if loaded from different point. Implemented prelude_plugin_unload(), which will unload the plugin provided as argument, or unload all plugin if the argument is NULL. Remove dead code. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@4394 09c5ec92-17d4-0310-903a-819935f44dba src/include/prelude-plugin.h | 4 ++ src/prelude-plugin.c | 73 +++++++++++++++++++++++++++++------------ 2 files changed, 55 insertions(+), 22 deletions(-) commit 854b29f86e055fc0addf889dc64fcc99ef121564 Author: Yoann Vandoorselaere Date: Tue Nov 16 19:48:41 2004 +0000 Coding styles fix. Remove some un-needed variables. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@4393 09c5ec92-17d4-0310-903a-819935f44dba src/prelude-hash.c | 100 +++++++++++++++++++++++++--------------------------- 1 files changed, 48 insertions(+), 52 deletions(-) commit 5921f4daff5b001b7975cbd7d5e0e3f2b0cb4cee Author: Yoann Vandoorselaere Date: Tue Nov 16 16:51:53 2004 +0000 No need to hide the credentials type anymore in prelude_client_t. On prelude_client_destroy(), free credentials, unique_ident, msgbuf, md5sum. Use prelude_string_new_nodup instead od prelude_string_new_ref to reference process name and path, since they are copied within an allocated buffer. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@4392 09c5ec92-17d4-0310-903a-819935f44dba src/include/tls-auth.h | 2 +- src/prelude-client.c | 24 +++++++++++++++++++----- src/tls-auth.c | 4 ++-- 3 files changed, 22 insertions(+), 8 deletions(-) commit a3786ce3b896523e866b9a915d57d0e7a6998c25 Author: Yoann Vandoorselaere Date: Tue Nov 16 16:41:43 2004 +0000 Don't leak global failover object on prelude_connection_mgr_destroy(). git-svn-id: file:///home/yoann/SVN/trunk/libprelude@4391 09c5ec92-17d4-0310-903a-819935f44dba src/prelude-connection-mgr.c | 1 + 1 files changed, 1 insertions(+), 0 deletions(-) commit c584d04fb9a93b3d4559b19a77df9c2552b6ef0f Author: Yoann Vandoorselaere Date: Tue Nov 16 16:40:36 2004 +0000 In prelude_option_destroy(), if provided option is NULL, free all global options. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@4390 09c5ec92-17d4-0310-903a-819935f44dba src/prelude-getopt.c | 23 +++++++++++++++-------- 1 files changed, 15 insertions(+), 8 deletions(-) commit 0e26699d5f7210ce0114bd00318918dfa2311956 Author: Yoann Vandoorselaere Date: Tue Nov 16 16:38:27 2004 +0000 In case fd is still open, close it in prelude_client_connect(). Fix a leak on prelude_connection_destroy() resulting of PRELUDE_CONNECTION_OWN_FD and PRELUDE_CONNECTION_ESTABLISHED flags misuse. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@4389 09c5ec92-17d4-0310-903a-819935f44dba src/prelude-connection.c | 14 ++++++-------- 1 files changed, 6 insertions(+), 8 deletions(-) commit 044788fe7394904aaa28c4a57c5e449efd0d8e62 Author: Yoann Vandoorselaere Date: Tue Nov 16 16:23:41 2004 +0000 Make prelude_string_new_nodup() call prelude_string_new_nodup_fast(), not prelude_string_new_dup_fast(). git-svn-id: file:///home/yoann/SVN/trunk/libprelude@4388 09c5ec92-17d4-0310-903a-819935f44dba src/prelude-string.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) commit 76bb239767dfde656a5c9caf72d074b9f4471e99 Author: Yoann Vandoorselaere Date: Sat Nov 13 02:13:56 2004 +0000 Include missing ctype.h. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@4387 09c5ec92-17d4-0310-903a-819935f44dba src/prelude-getopt.c | 1 + 1 files changed, 1 insertions(+), 0 deletions(-) commit 7ee8ca240e895e8b84e279f13ae48484d01d6163 Author: Yoann Vandoorselaere Date: Fri Nov 12 20:27:15 2004 +0000 Move idmef_value_new_for_object() to idmef-value.c. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@4386 09c5ec92-17d4-0310-903a-819935f44dba bindings/libprelude.i | 3 +- src/Makefile.am | 1 - src/idmef-value-object.c | 83 -------------------------------------- src/idmef-value.c | 28 +++++++++++++ src/include/Makefile.am | 1 - src/include/idmef-value-object.h | 29 ------------- src/include/idmef-value.h | 3 + src/include/idmef.h | 1 - 8 files changed, 32 insertions(+), 117 deletions(-) commit 07328aa97eb6e86158b0c8a0178259e831af3674 Author: Yoann Vandoorselaere Date: Fri Nov 12 20:25:02 2004 +0000 Don't error out when getting '-' as an argument. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@4385 09c5ec92-17d4-0310-903a-819935f44dba src/prelude-getopt.c | 3 +++ 1 files changed, 3 insertions(+), 0 deletions(-) commit 62ccb8038e8bd557a5e5e642dc92755dc4812fbb Author: Yoann Vandoorselaere Date: Fri Nov 12 18:56:48 2004 +0000 Ooops. treat LOG_ERR correctly. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@4384 09c5ec92-17d4-0310-903a-819935f44dba src/prelude-log.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) commit a1007cca23b20ff41e2ed5e565a191850f0fbeca Author: Yoann Vandoorselaere Date: Fri Nov 12 17:57:31 2004 +0000 Some API sanitization. But remain compatible before the big break. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@4383 09c5ec92-17d4-0310-903a-819935f44dba src/include/prelude-log.h | 54 ++++++++++++++++++++++++-------------------- src/prelude-log.c | 41 +++++++++++++++++++++++++-------- 2 files changed, 60 insertions(+), 35 deletions(-) commit b007f550d11b4acef89767cf1e7ebba6e45a940d Author: Yoann Vandoorselaere Date: Fri Nov 12 17:43:03 2004 +0000 Add idmef-client.conf to EXTRA_DIST. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@4379 09c5ec92-17d4-0310-903a-819935f44dba Makefile.am | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) commit 796a24bac1a8e7ade0fdc86f8882f92168b80e24 Author: Yoann Vandoorselaere Date: Fri Nov 12 17:42:39 2004 +0000 New configuration file including both global.conf and client.conf. Both of the aformentioned configuration file remain since they can be needed individually depending on the environment. idmef-client.conf is very useful for sensor that do not wish to install a configuration file for the sake of only including global.conf and client.conf. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@4378 09c5ec92-17d4-0310-903a-819935f44dba Makefile.am | 14 ++++++++++++++ configure.in | 20 ++++++++++++++++++++ idmef-client.conf.in | 2 ++ 3 files changed, 36 insertions(+), 0 deletions(-) commit 2eb64f05224b6bd315dc41f9e0ca73e6cfe12384 Author: Yoann Vandoorselaere Date: Fri Nov 12 17:25:42 2004 +0000 Fix prelude-adduser for recent prelude_option_parse_argument() change. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@4377 09c5ec92-17d4-0310-903a-819935f44dba prelude-adduser/prelude-adduser.c | 12 +++++++++--- 1 files changed, 9 insertions(+), 3 deletions(-) commit 9afa76824c927912325756d2549cfcac67a81402 Author: Yoann Vandoorselaere Date: Fri Nov 12 17:12:59 2004 +0000 set LIBPRELUDE_CONFIG_PREFIX variable. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@4375 09c5ec92-17d4-0310-903a-819935f44dba m4/libprelude.m4 | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) commit 1d9caabde5f17c327a8219690eb135866b525979 Author: Yoann Vandoorselaere Date: Fri Nov 12 17:12:42 2004 +0000 s/--prelude-config-prefix/--config-prefix/ for consistancy. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@4374 09c5ec92-17d4-0310-903a-819935f44dba libprelude-config.in | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) commit 924281283792b50f69a6205d5d52c6cb967b11de Author: Yoann Vandoorselaere Date: Fri Nov 12 15:46:22 2004 +0000 Add the OPTIONAL_INT definition, to be hooked by Nicolas in the IDMEF code generator. To be used for optionnal IDMEF integer. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@4373 09c5ec92-17d4-0310-903a-819935f44dba src/idmef-wrappers-gen/GenerateIDMEFTreeWrapC.pm | 2 ++ src/idmef-wrappers-gen/idmef-tree.h | 7 ++++--- 2 files changed, 6 insertions(+), 3 deletions(-) commit 2549c9654469b3cad823c199f7bf860c167a4001 Author: Yoann Vandoorselaere Date: Fri Nov 12 12:31:07 2004 +0000 Change prelude_client_init() so that it take a pointer to arc, this is to allow the caller to use remaining option/arguments after prelude_option_parse_argument has been called, which will modify argc and argv to remove libprelude handled options. Move all the initialisation call depending on prelude-option callback after prelude_option_parse_argument(). git-svn-id: file:///home/yoann/SVN/trunk/libprelude@4369 09c5ec92-17d4-0310-903a-819935f44dba src/include/prelude-client.h | 2 +- src/include/prelude-getopt.h | 5 +- src/prelude-client.c | 82 +++++++++++-------------- src/prelude-getopt.c | 133 +++++++++++++++++------------------------ 4 files changed, 95 insertions(+), 127 deletions(-) commit d4745d31e0319ba8e824525497dc872722eb0c80 Author: Yoann Vandoorselaere Date: Fri Nov 12 12:25:08 2004 +0000 Don't call prelude_client_installation_error() here, this is up to prelude-client API to do so in case there is a failure. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@4368 09c5ec92-17d4-0310-903a-819935f44dba src/client-ident.c | 2 -- 1 files changed, 0 insertions(+), 2 deletions(-) commit 54f4bd647a9f3bc4ef8f6d45e25e9b570f08271a Author: Yoann Vandoorselaere Date: Fri Nov 12 12:24:20 2004 +0000 Don't initialize global failover until prelude_connection_mgr_init() is called, since init is supposed to be done after option callback, this is safer. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@4367 09c5ec92-17d4-0310-903a-819935f44dba src/prelude-connection-mgr.c | 106 +++++++++++++++++++++++------------------- 1 files changed, 58 insertions(+), 48 deletions(-) commit 5ceb9ee4a0379244c3cf814735853f7fa9011de5 Author: Yoann Vandoorselaere Date: Wed Nov 10 19:39:36 2004 +0000 Use prelude_client_installation_error, instead of file_error() which was confusing in case the manager reported missing configuration. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@4364 09c5ec92-17d4-0310-903a-819935f44dba src/prelude-client.c | 25 ++++--------------------- 1 files changed, 4 insertions(+), 21 deletions(-) commit b7fdda5e114cf538eecefca86ac54d9a997295d9 Author: Yoann Vandoorselaere Date: Tue Nov 9 18:01:33 2004 +0000 Back to heartbeat value in seconds. This is more configurable. Fix a bug on prelude_client_destroy() where we would destroy an already destroyed timer. Only call prelude_connection_mgr_init() if we got sending capability. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@4360 09c5ec92-17d4-0310-903a-819935f44dba global.conf.in | 4 ++-- src/prelude-client.c | 27 +++++++++++++++++---------- 2 files changed, 19 insertions(+), 12 deletions(-) commit df1fb504e5fdb8b8eb6334b07fd8352c3f6d379b Author: Yoann Vandoorselaere Date: Tue Nov 9 17:58:53 2004 +0000 return -1 if initialization fail. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@4359 09c5ec92-17d4-0310-903a-819935f44dba src/prelude-connection-mgr.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) commit 66b651d84852ff5e023a4b22a4c2b01b520894a3 Author: Nicolas Delon Date: Tue Nov 9 16:15:16 2004 +0000 use full path of perl and python found by AC_PATH_PROG git-svn-id: file:///home/yoann/SVN/trunk/libprelude@4357 09c5ec92-17d4-0310-903a-819935f44dba configure.in | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) commit 1112f5ffeebdda3e0417bcc460d9dd519b2e00b5 Author: Nicolas Delon Date: Tue Nov 9 16:08:24 2004 +0000 restore perl and python detection code that have been removed by a bad guy (still me) git-svn-id: file:///home/yoann/SVN/trunk/libprelude@4356 09c5ec92-17d4-0310-903a-819935f44dba configure.in | 7 +++++++ 1 files changed, 7 insertions(+), 0 deletions(-) commit af24ecb34ba4b6d0afd4c048e47841cf1f25013c Author: Nicolas Delon Date: Tue Nov 9 14:04:32 2004 +0000 remove debug message git-svn-id: file:///home/yoann/SVN/trunk/libprelude@4354 09c5ec92-17d4-0310-903a-819935f44dba src/prelude-client.c | 2 -- 1 files changed, 0 insertions(+), 2 deletions(-) commit fa8df94411c1ec128e8907b7f02afbd6c8ee013d Author: Yoann Vandoorselaere Date: Tue Nov 9 11:44:16 2004 +0000 Ooops. Don't multiply heartbeat default interval twice... git-svn-id: file:///home/yoann/SVN/trunk/libprelude@4352 09c5ec92-17d4-0310-903a-819935f44dba src/prelude-client.c | 8 +++++--- 1 files changed, 5 insertions(+), 3 deletions(-) commit 92a46e70528becb95e701db9cd9df22105983a1c Author: Yoann Vandoorselaere Date: Tue Nov 9 11:43:42 2004 +0000 Document heartbeat-interval. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@4351 09c5ec92-17d4-0310-903a-819935f44dba global.conf.in | 6 ++++++ 1 files changed, 6 insertions(+), 0 deletions(-) commit ae4e335b7c8a4dd1fd7994ff129496cc0bf70a95 Author: Yoann Vandoorselaere Date: Tue Nov 9 03:08:33 2004 +0000 remove deprecated prelude-strbuf dependencie. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@4346 09c5ec92-17d4-0310-903a-819935f44dba src/include/prelude.h.in | 1 - 1 files changed, 0 insertions(+), 1 deletions(-) commit aa55f85f42fceec790494045f16842c4590910f1 Author: Yoann Vandoorselaere Date: Tue Nov 9 02:56:40 2004 +0000 fix dependencies. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@4345 09c5ec92-17d4-0310-903a-819935f44dba bindings/Makefile.am | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) commit e49ed50a7e8c4925ba790d102eaf4cae0bb7be69 Author: Yoann Vandoorselaere Date: Tue Nov 9 02:26:27 2004 +0000 Merge prelude-strbuf and idmef-string in a single prelude-string API, to be used for all string operation accross Prelude components. The prelude_string_t datatype is not opaque and still include a prelude_list_t member due to some requirement of the IDMEF API. Modification to the IDMEF API will be done to fix this issue. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@4340 09c5ec92-17d4-0310-903a-819935f44dba bindings/libprelude.i | 2 +- bindings/perl/Prelude.pm | 12 +- bindings/python/prelude.py | 14 +- docs/api/libprelude-decl.txt | 524 +++++----- docs/api/libprelude-docs.sgml | 4 - docs/api/libprelude-sections.txt | 91 +- docs/api/tmpl/common.sgml | 8 - docs/api/tmpl/idmef-value.sgml | 101 ++- docs/api/tmpl/libprelude-unused.sgml | 346 +++++++ docs/api/tmpl/prelude-connection-mgr.sgml | 40 +- docs/api/tmpl/prelude-inttypes.sgml | 8 + prelude-adduser/tls-register.c | 1 - src/Makefile.am | 3 +- src/common.c | 1 - src/idmef-message-read.c | Bin 43672 -> 43796 bytes src/idmef-message-write.c | 102 +- src/idmef-object-value.c | 2 +- src/idmef-object.c | 35 +- src/idmef-string.c | 175 ---- src/idmef-tree-print.c | 92 +- src/idmef-tree-to-string.c | 92 +- src/idmef-tree-wrap.c | 1092 ++++++++++---------- src/idmef-type.c | 6 +- src/idmef-util.c | 2 - src/idmef-value-object.c | 2 +- src/idmef-value-type.c | 17 +- src/idmef-value.c | 7 +- .../GenerateIDMEFMessageReadC.pm | 16 +- .../GenerateIDMEFMessageWriteC.pm | 8 +- .../GenerateIDMEFMessageWriteH.pm | 2 +- src/idmef-wrappers-gen/GenerateIDMEFTreeData.pm | 2 +- src/idmef-wrappers-gen/GenerateIDMEFTreePrintC.pm | 6 +- .../GenerateIDMEFTreeToStringC.pm | 4 +- src/idmef-wrappers-gen/GenerateIDMEFTreeWrapC.pm | 25 +- src/idmef-wrappers-gen/GenerateIDMEFTreeWrapH.pm | 1 + src/idmef-wrappers-gen/idmef-tree.h | 90 +- src/include/Makefile.am | 3 +- src/include/extract.h | 2 +- src/include/idmef-message-write.h | 4 +- src/include/idmef-string.h | 87 -- src/include/idmef-tree-data.h | 2 +- src/include/idmef-tree-print.h | 2 +- src/include/idmef-tree-to-string.h | 2 +- src/include/idmef-tree-wrap.h | 411 ++++---- src/include/idmef-value-type.h | 4 +- src/include/idmef-value.h | 31 +- src/include/idmef.h | 2 +- src/include/prelude-strbuf.h | 50 - src/include/prelude-string.h | 120 +++ src/prelude-client.c | 48 +- src/prelude-strbuf.c | 211 ---- src/prelude-string.c | 547 ++++++++++ 52 files changed, 2558 insertions(+), 1901 deletions(-) commit 67518ccd731d04f4e458a51306c59f78d1b4acdf Author: Yoann Vandoorselaere Date: Mon Nov 8 23:29:20 2004 +0000 Make idmef_object_new("") work again, by creating a new toplevel message object. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@4338 09c5ec92-17d4-0310-903a-819935f44dba src/idmef-object.c | 17 +++++++++++------ 1 files changed, 11 insertions(+), 6 deletions(-) commit 47bde6e0926e3ca82036acf84be9c9874bfcf3a2 Author: Yoann Vandoorselaere Date: Fri Nov 5 16:05:31 2004 +0000 Modify prelude-connection-mgr API so that an initialization function is provided in order to initialize the mgr object, and that it is possible to set the connection string using a separate function. This make it possible to change the sensor connection address from the Prelude administrative console, by having the sensor send the option reply prior to modifying the connection-mgr object. Also, declare generic prelude-option in prelude_client_new() instead of prelude_client_init() so that the user might list the option before handling them (made by prelude_client_init). Make sure we start the connection to the managers list after option parsing is finished. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@4326 09c5ec92-17d4-0310-903a-819935f44dba docs/api/libprelude-decl.txt | 143 ++++++++++------- docs/api/tmpl/idmef-criteria-string.yac.sgml | 14 ++ docs/api/tmpl/idmef-data.sgml | 7 +- docs/api/tmpl/idmef-tree-data.sgml | 14 ++- docs/api/tmpl/idmef-value-type.sgml | 4 +- docs/api/tmpl/libprelude-unused.sgml | 12 -- docs/api/tmpl/ntp.sgml | 2 +- docs/api/tmpl/prelude-async.sgml | 3 +- docs/api/tmpl/prelude-connection-mgr.sgml | 3 +- docs/api/tmpl/prelude-linked-object.sgml | 3 +- docs/api/tmpl/prelude-plugin.sgml | 3 +- docs/api/tmpl/timer.sgml | 7 +- src/include/prelude-connection-mgr.h | 16 ++- src/prelude-client.c | 107 ++++++++----- src/prelude-connection-mgr.c | 214 +++++++++++++++++--------- 15 files changed, 359 insertions(+), 193 deletions(-) commit 8eab93254d4bd6cd0db4e9e9cc957ab948295d9a Author: Yoann Vandoorselaere Date: Fri Nov 5 14:19:52 2004 +0000 Move prelude_bool_t definition to generated prelude-inttypes.h git-svn-id: file:///home/yoann/SVN/trunk/libprelude@4325 09c5ec92-17d4-0310-903a-819935f44dba src/include/common.h | 10 ---------- src/include/prelude-inttypes.h.in | 15 +++++++++++++++ 2 files changed, 15 insertions(+), 10 deletions(-) commit 2240507ce2d72d7eb953c2f286f9ef672ec479ce Author: Nicolas Delon Date: Fri Nov 5 12:51:45 2004 +0000 fix paths for make distcheck git-svn-id: file:///home/yoann/SVN/trunk/libprelude@4324 09c5ec92-17d4-0310-903a-819935f44dba bindings/Makefile.am | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) commit ca993d7bedc20a8b801a911e9981c7242533d1da Author: Nicolas Delon Date: Fri Nov 5 12:07:44 2004 +0000 * bindings/python/prelude.py: bug fix, better error handling * bindings/Makefile.am: add dependency to .h files for generated .c files git-svn-id: file:///home/yoann/SVN/trunk/libprelude@4323 09c5ec92-17d4-0310-903a-819935f44dba bindings/Makefile.am | 10 ++++++---- bindings/python/prelude.py | 22 +++++++++++++--------- 2 files changed, 19 insertions(+), 13 deletions(-) commit 4fb3639d65706ff7102ae4a8fd8b1702864cb51f Author: Nicolas Delon Date: Fri Nov 5 00:41:48 2004 +0000 support for structure fields that are not prefixed by "idmef_" git-svn-id: file:///home/yoann/SVN/trunk/libprelude@4319 09c5ec92-17d4-0310-903a-819935f44dba docs/api/libprelude-decl.txt | 128 +++++++++---------- docs/api/tmpl/idmef-criteria-string.yac.sgml | 14 -- docs/api/tmpl/idmef-data.sgml | 7 +- docs/api/tmpl/idmef-tree-data.sgml | 14 +-- docs/api/tmpl/idmef-value-type.sgml | 4 +- docs/api/tmpl/libprelude-unused.sgml | 12 ++ docs/api/tmpl/ntp.sgml | 2 +- docs/api/tmpl/prelude-async.sgml | 3 +- docs/api/tmpl/prelude-linked-object.sgml | 3 +- docs/api/tmpl/prelude-plugin.sgml | 3 +- docs/api/tmpl/timer.sgml | 7 +- src/idmef-message-read.c | 2 +- src/idmef-message-write.c | 94 +++++++------- src/idmef-tree-print.c | 2 +- src/idmef-tree-to-string.c | 2 +- src/idmef-tree-wrap.c | 136 ++++++++++---------- .../GenerateIDMEFMessageReadC.pm | 4 +- .../GenerateIDMEFMessageWriteC.pm | 14 +- src/idmef-wrappers-gen/GenerateIDMEFTreeData.pm | 4 +- src/idmef-wrappers-gen/GenerateIDMEFTreePrintC.pm | 6 +- .../GenerateIDMEFTreeToStringC.pm | 8 +- src/idmef-wrappers-gen/GenerateIDMEFTreeWrapC.pm | 39 ++++-- src/idmef-wrappers-gen/IDMEFTree.pm | 61 +++++++--- src/include/idmef-message-id.h | 2 +- src/include/idmef-message-read.h | 2 +- src/include/idmef-message-write.h | 2 +- src/include/idmef-tree-data.h | 2 +- src/include/idmef-tree-print.h | 2 +- src/include/idmef-tree-to-string.h | 2 +- src/include/idmef-tree-wrap.h | 66 +++++----- 30 files changed, 326 insertions(+), 321 deletions(-) commit 71b02dac4631123c925a9afa5f16e14f79626db7 Author: Yoann Vandoorselaere Date: Thu Nov 4 18:59:26 2004 +0000 Include dependencies fix. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@4318 09c5ec92-17d4-0310-903a-819935f44dba .../GenerateIDMEFMessageReadH.pm | 3 +++ .../GenerateIDMEFMessageWriteH.pm | 3 +++ src/idmef-wrappers-gen/GenerateIDMEFTreeWrapH.pm | 3 +++ src/include/idmef-message-read.h | 5 ++++- src/include/idmef-message-write.h | 5 ++++- src/include/idmef-object.h | 4 ++++ src/include/idmef-tree-wrap.h | 5 ++++- src/include/idmef-value-type.h | 3 +++ src/include/idmef.h | 2 ++ src/include/prelude-message-buffered.h | 4 +++- 10 files changed, 33 insertions(+), 4 deletions(-) commit cc110824fe3213bbe38178243b3b6f9d79e74571 Author: Yoann Vandoorselaere Date: Mon Nov 1 15:00:46 2004 +0000 Fix warnings. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@4295 09c5ec92-17d4-0310-903a-819935f44dba src/include/prelude-message-buffered.h | 2 +- src/prelude-message-buffered.c | 13 ++++++------- 2 files changed, 7 insertions(+), 8 deletions(-) commit fa4dfe37910f829250a5186b3bc347a86cf23687 Author: Yoann Vandoorselaere Date: Mon Nov 1 14:49:10 2004 +0000 API function rework, s/idmef_read_xxx/idmef_xxx_read/ and s/idmef_write_xxx/idmef_xxx_write/ Reorder function argument. Update documentation and API call. Fix bug #3. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@4290 09c5ec92-17d4-0310-903a-819935f44dba docs/api/libprelude-decl.txt | 226 +++++----- docs/api/libprelude-sections.txt | 121 +++--- docs/api/tmpl/idmef-message-read.sgml | 108 ++-- docs/api/tmpl/idmef-message-write.sgml | 116 +++--- docs/api/tmpl/libprelude-unused.sgml | 516 ++++++++++++++++++++ docs/api/tmpl/prelude-client.sgml | 8 + src/idmef-message-read.c | 154 ++++--- src/idmef-message-write.c | 372 ++++++++------- src/idmef-tree-wrap.c | 94 +++-- .../GenerateIDMEFMessageReadC.pm | 28 +- .../GenerateIDMEFMessageReadH.pm | 26 +- .../GenerateIDMEFMessageWriteC.pm | 62 ++- .../GenerateIDMEFMessageWriteH.pm | 4 +- src/idmef-wrappers-gen/GenerateIDMEFTreeWrapC.pm | 24 + src/idmef-wrappers-gen/GenerateIDMEFTreeWrapH.pm | 24 + src/include/idmef-message-read.h | 80 ++- src/include/idmef-message-write.h | 60 ++-- src/include/idmef-tree-wrap.h | 26 +- src/prelude-client.c | 2 +- 19 files changed, 1404 insertions(+), 647 deletions(-) commit 44cc91039b354ad6572f9ae7f11a5e3eac26eb8a Author: Yoann Vandoorselaere Date: Mon Nov 1 10:17:33 2004 +0000 Forgot to commit functions headers update. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@4288 09c5ec92-17d4-0310-903a-819935f44dba src/include/prelude-message-buffered.h | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) commit cca21122a9bb1c60484474e48b17399ce07f37d9 Author: Yoann Vandoorselaere Date: Thu Oct 28 11:48:28 2004 +0000 Check if we are sending asynchronously when our send callback is called, instead of setting a defined callback for sending asynchronously when creating the msgbuf. This fix a double free() problem happening when a msgbuf was created with a client without PRELUDE_CLIENT_FLAGS_ASYNC_SEND set, but the flags was set latter, after prelude_client_init() which send an initial heartbeat is called, since prelude_client_send_msg will always honor client flags independantly of the msgbuf configuration. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@4273 09c5ec92-17d4-0310-903a-819935f44dba src/prelude-message-buffered.c | 43 ++++++++++++++++++++++++--------------- 1 files changed, 26 insertions(+), 17 deletions(-) commit 345b8b5c0c6d6ed3637608cc17f7e60e143d1690 Author: Yoann Vandoorselaere Date: Wed Oct 27 12:30:37 2004 +0000 Update prelude_client_set_flags() documentation. Avoid calling prelude_async_init() several time in case several async flags are specified. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@4266 09c5ec92-17d4-0310-903a-819935f44dba src/prelude-client.c | 13 +++++++++---- 1 files changed, 9 insertions(+), 4 deletions(-) commit 969435973221451620562769b303e0a2b7e3df59 Author: Yoann Vandoorselaere Date: Tue Oct 26 21:42:35 2004 +0000 call _exit() rather than exit() when starting as a daemon in order to avoid atexit() hook to be called. Untabify. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@4263 09c5ec92-17d4-0310-903a-819935f44dba src/daemonize.c | 10 +++++----- 1 files changed, 5 insertions(+), 5 deletions(-) commit 266f7531a7963223356c540cdb04ab70bd478e80 Author: Yoann Vandoorselaere Date: Fri Oct 22 15:57:52 2004 +0000 Resync patch from Yann Droneaud so that make distcheck work again with newest automake. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@4262 09c5ec92-17d4-0310-903a-819935f44dba docs/api/Makefile.am | 43 ++++++++++++++++++++++++------------------- 1 files changed, 24 insertions(+), 19 deletions(-) commit f9217ae4112904c53565d6792f78d3c09fbfe709 Author: Yoann Vandoorselaere Date: Fri Oct 22 12:59:56 2004 +0000 set LIBPRELUDE_PREFIX. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@4258 09c5ec92-17d4-0310-903a-819935f44dba m4/libprelude.m4 | 4 +++- 1 files changed, 3 insertions(+), 1 deletions(-) commit 9c124b953063f5204bc342a321127f3af2d2d544 Author: Yoann Vandoorselaere Date: Thu Oct 21 11:27:42 2004 +0000 Update documentation titles... git-svn-id: file:///home/yoann/SVN/trunk/libprelude@4253 09c5ec92-17d4-0310-903a-819935f44dba docs/api/libprelude-docs.sgml | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) commit a7a2ded9fdec1eb9eeefcdd786581bb1e2742fc3 Author: Yoann Vandoorselaere Date: Thu Oct 21 11:18:06 2004 +0000 Modified idmef-tree-wrap.[ch] generation script so that generated function are documented. Updated generated idmef-tree-wrap.[ch] sources. Documentation update. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@4252 09c5ec92-17d4-0310-903a-819935f44dba docs/api/libprelude-decl.txt | 76 +- docs/api/libprelude-sections.txt | 2 - src/idmef-tree-wrap.c | 4715 +++++++++++++++++++++- src/idmef-wrappers-gen/GenerateIDMEFTreeWrapC.pm | 157 +- src/idmef-wrappers-gen/GenerateIDMEFTreeWrapH.pm | 4 +- src/include/idmef-tree-wrap.h | 78 +- 6 files changed, 4880 insertions(+), 152 deletions(-) commit f308e1389645fee79b2359cfad8af67b4c9d18d2 Author: Yoann Vandoorselaere Date: Thu Oct 21 09:53:55 2004 +0000 Update check for gtk-doc. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@4251 09c5ec92-17d4-0310-903a-819935f44dba configure.in | 39 +++++++++++++++++++++++---------------- 1 files changed, 23 insertions(+), 16 deletions(-) commit 6f56362b33f463b6c9b4447b4ae10e3083e3c4ed Author: Yoann Vandoorselaere Date: Thu Oct 21 09:37:34 2004 +0000 More API doc generation fix. Use an enumeration to provide prelude_client_t with flags. Some renaming. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@4248 09c5ec92-17d4-0310-903a-819935f44dba docs/api/libprelude-decl.txt | 4 +- src/include/prelude-client.h | 10 ++++--- src/prelude-client.c | 50 ++++++++++++++++++++-------------------- src/prelude-getopt.c | 1 + src/prelude-message-buffered.c | 2 +- 5 files changed, 35 insertions(+), 32 deletions(-) commit ef3a9d97f3d0aaf66d1b09bb71994936ec96036d Author: Yoann Vandoorselaere Date: Thu Oct 21 09:28:38 2004 +0000 More fix for API doc generation. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@4247 09c5ec92-17d4-0310-903a-819935f44dba src/common.c | 2 ++ src/prelude-connection-mgr.c | 5 ++--- src/prelude-ident.c | 4 +--- src/prelude-message.c | 6 ++---- src/prelude-plugin.c | 2 -- 5 files changed, 7 insertions(+), 12 deletions(-) commit 6db6e61bbd3765de352936d5d50489a268d9ad2a Author: Yoann Vandoorselaere Date: Thu Oct 21 09:27:28 2004 +0000 fix API doc generation. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@4246 09c5ec92-17d4-0310-903a-819935f44dba src/prelude-message-buffered.c | 6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-) commit 29e1bc79698d7fb9d9c910ad695f94ca1f6a5511 Author: Yoann Vandoorselaere Date: Thu Oct 21 09:27:13 2004 +0000 fix documentation generation. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@4245 09c5ec92-17d4-0310-903a-819935f44dba src/prelude-connection.c | 26 ++++++++++---------------- 1 files changed, 10 insertions(+), 16 deletions(-) commit 7a4e81500642ac32df7a8fb20586b590f76fce3e Author: Yoann Vandoorselaere Date: Thu Oct 21 09:26:39 2004 +0000 fix some prototypes for API documentation generation. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@4244 09c5ec92-17d4-0310-903a-819935f44dba src/include/prelude-plugin.h | 6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-) commit e1697e6fccb9142a43b3802b7f12985f9af38f0a Author: Yoann Vandoorselaere Date: Thu Oct 21 09:26:09 2004 +0000 remove definition that belong to prelude.h git-svn-id: file:///home/yoann/SVN/trunk/libprelude@4243 09c5ec92-17d4-0310-903a-819935f44dba src/include/common.h | 2 -- 1 files changed, 0 insertions(+), 2 deletions(-) commit 7e2cef02cb56eb95e11e27584e12a2ca3f132920 Author: Yoann Vandoorselaere Date: Thu Oct 21 09:24:24 2004 +0000 Documentation update. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@4242 09c5ec92-17d4-0310-903a-819935f44dba docs/api/tmpl/idmef-criteria-string.sgml | 25 + docs/api/tmpl/idmef-criteria-string.yac.sgml | 120 + docs/api/tmpl/idmef-criteria.sgml | 217 + docs/api/tmpl/idmef-criterion-value.sgml | 312 ++ docs/api/tmpl/idmef-data.sgml | 206 + docs/api/tmpl/idmef-message-id-format.sgml | 23 + docs/api/tmpl/idmef-message-read.sgml | 286 + docs/api/tmpl/idmef-message-write.sgml | 278 + docs/api/tmpl/idmef-object-value.sgml | 87 + docs/api/tmpl/idmef-object.sgml | 207 + docs/api/tmpl/idmef-string.sgml | 248 + docs/api/tmpl/idmef-time.sgml | 247 + docs/api/tmpl/idmef-tree-data.sgml | 38 + docs/api/tmpl/idmef-tree-print.sgml | 240 + docs/api/tmpl/idmef-tree-to-string.sgml | 324 ++ docs/api/tmpl/idmef-tree-wrap.sgml | 7137 ++++++++++++++++++++++++++ docs/api/tmpl/idmef-type.sgml | 156 + docs/api/tmpl/idmef-util.sgml | 64 + docs/api/tmpl/idmef-value-object.sgml | 26 + docs/api/tmpl/idmef-value-type.sgml | 130 + docs/api/tmpl/idmef-value.sgml | 369 ++ docs/api/tmpl/idmef.sgml | 16 + docs/api/tmpl/ntp.sgml | 144 + docs/api/tmpl/prelude-connection-mgr.sgml | 131 + docs/api/tmpl/prelude-connection.sgml | 187 + docs/api/tmpl/prelude-failover.sgml | 80 + docs/api/tmpl/prelude-hash.sgml | 66 + docs/api/tmpl/prelude-inet.sgml | 82 + docs/api/tmpl/prelude-inttypes.sgml | 246 + docs/api/tmpl/prelude-linked-object.sgml | 39 + docs/api/tmpl/prelude-plugin.sgml | 361 ++ docs/api/tmpl/prelude-stdint.sgml | 16 + docs/api/tmpl/prelude-strbuf.sgml | 118 + docs/api/tmpl/prelude-timer-config.sgml | 16 + docs/api/tmpl/prelude.sgml | 32 + docs/api/tmpl/tls-auth.sgml | 35 + docs/api/tmpl/tls-util.sgml | 45 + 37 files changed, 12354 insertions(+), 0 deletions(-) commit dc131db3fdbf63526912471b19b815d79acc11bc Author: Yoann Vandoorselaere Date: Thu Oct 21 09:21:09 2004 +0000 Update documentation. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@4241 09c5ec92-17d4-0310-903a-819935f44dba docs/api/Makefile.am | 76 +- docs/api/libprelude-decl.txt | 8930 ++++++++++++++++++++++----- docs/api/libprelude-docs.sgml | 100 +- docs/api/libprelude-sections.txt | 2099 +++++-- docs/api/tmpl/client-ident.sgml | 17 +- docs/api/tmpl/common.sgml | 38 + docs/api/tmpl/config-engine.sgml | 24 + docs/api/tmpl/extract.sgml | 8 + docs/api/tmpl/idmef-message-id.sgml | 261 +- docs/api/tmpl/idmef-tree.sgml | 380 +-- docs/api/tmpl/libprelude-unused.sgml | 2374 +++++++- docs/api/tmpl/prelude-async.sgml | 33 +- docs/api/tmpl/prelude-client.sgml | 237 +- docs/api/tmpl/prelude-getopt-wide.sgml | 41 +- docs/api/tmpl/prelude-getopt.sgml | 374 ++- docs/api/tmpl/prelude-ident.sgml | 3 +- docs/api/tmpl/prelude-io.sgml | 37 +- docs/api/tmpl/prelude-list.sgml | 81 +- docs/api/tmpl/prelude-log.sgml | 2 + docs/api/tmpl/prelude-message-buffered.sgml | 44 +- docs/api/tmpl/prelude-message-id.sgml | 134 +- docs/api/tmpl/prelude-message.sgml | 82 +- docs/api/tmpl/timer.sgml | 27 +- 23 files changed, 12647 insertions(+), 2755 deletions(-) commit d61bd7e6952e5a2a0a334b8c6ba13c70ffc4d7a0 Author: Yoann Vandoorselaere Date: Thu Oct 21 09:20:38 2004 +0000 Documentation work on the prelude-client API. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@4240 09c5ec92-17d4-0310-903a-819935f44dba src/prelude-client.c | 281 ++++++++++++++++++++++++++++++++++++++++++++++++-- 1 files changed, 272 insertions(+), 9 deletions(-) commit 87a4bbbd5b831c6d13063dcc41fb4ba8a61797fd Author: Nicolas Delon Date: Tue Oct 19 22:47:26 2004 +0000 support for exit status in bindings git-svn-id: file:///home/yoann/SVN/trunk/libprelude@4235 09c5ec92-17d4-0310-903a-819935f44dba bindings/perl/Prelude.pm | 13 ++++++++++++- bindings/python/prelude.py | 7 +++++++ 2 files changed, 19 insertions(+), 1 deletions(-) commit db80fca73c3db9a168bf3a93b21eae0d93854deb Author: Yoann Vandoorselaere Date: Tue Oct 19 15:27:49 2004 +0000 Add a prelude_client_exit_status_t argument to prelude_client_destroy(), so that the behavior of this function with heartbeat is easier to expect. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@4233 09c5ec92-17d4-0310-903a-819935f44dba src/include/prelude-client.h | 8 +++++++- src/prelude-client.c | 26 ++++++++++++++++++++++---- 2 files changed, 29 insertions(+), 5 deletions(-) commit 94e4dc5cdf1ef198736bb429986b3f71ff3662d3 Author: Yoann Vandoorselaere Date: Tue Oct 19 15:03:21 2004 +0000 If a client call prelude_client_destroy(), then send a heartbeat with the status 'exiting'. This is usefull for potential sensor that run periodically, and that don't want missing heartbeat to be treated as a problem. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@4231 09c5ec92-17d4-0310-903a-819935f44dba src/prelude-client.c | 49 ++++++++++++++++++++++++++++++++++++++++--------- 1 files changed, 40 insertions(+), 9 deletions(-) commit d6e61a6a2062f2ebef385d7fa3659aa3a312c653 Author: Yoann Vandoorselaere Date: Tue Oct 19 13:33:43 2004 +0000 Check wether time is NULL before dereferencing it. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@4229 09c5ec92-17d4-0310-903a-819935f44dba src/idmef-message-write.c | 5 ++++- .../GenerateIDMEFMessageWriteC.pm | 3 +++ 2 files changed, 7 insertions(+), 1 deletions(-) commit c89b40c9b63859332ae739d366208befe0045ef0 Author: Yoann Vandoorselaere Date: Tue Oct 19 13:05:09 2004 +0000 Fix idmef_time reading/writing portability issue. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@4228 09c5ec92-17d4-0310-903a-819935f44dba src/idmef-message-read.c | 13 ++++++++----- src/idmef-message-write.c | 19 +++++++++++-------- src/idmef-tree-print.c | 2 +- src/idmef-tree-to-string.c | 2 +- src/idmef-tree-wrap.c | 2 +- .../GenerateIDMEFMessageReadC.pm | 11 +++++++---- .../GenerateIDMEFMessageWriteC.pm | 17 ++++++++++------- src/include/idmef-tree-wrap.h | 2 +- 8 files changed, 40 insertions(+), 28 deletions(-) commit 620d4d8de0bf699817f7723de840dcb7858f104b Author: Nicolas Delon Date: Mon Oct 18 20:35:47 2004 +0000 remove removed file reference git-svn-id: file:///home/yoann/SVN/trunk/libprelude@4211 09c5ec92-17d4-0310-903a-819935f44dba bindings/libprelude.i | 1 - 1 files changed, 0 insertions(+), 1 deletions(-) commit 3f5148f156ce0fdc98e20e5b0c28ab0c6d22cdd7 Author: Yoann Vandoorselaere Date: Mon Oct 18 18:16:41 2004 +0000 use idmef_object_set() and idmef_object_get() in place of idmef_message_set() & idmef_message_get(). git-svn-id: file:///home/yoann/SVN/trunk/libprelude@4207 09c5ec92-17d4-0310-903a-819935f44dba bindings/perl/Prelude.pm | 4 ++-- bindings/python/prelude.py | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) commit 20ffa0dde8187d92c0f8f4a2f798a458be00f235 Author: Yoann Vandoorselaere Date: Mon Oct 18 18:13:08 2004 +0000 Move idmef-tree.h to src/idmef-wrappers-gen, make the whole IDMEF API opaque. Remove idmef_message_set() and idmef_message_get(), which now are just wrappers to idmef_object_set() and idmef_object_get(). git-svn-id: file:///home/yoann/SVN/trunk/libprelude@4206 09c5ec92-17d4-0310-903a-819935f44dba src/Makefile.am | 1 - src/idmef-criteria-string.yac.y | 11 +- src/idmef-criteria.c | 10 +- src/idmef-criterion-value.c | 7 +- src/idmef-message-read.c | 2 +- src/idmef-message-write.c | 2 +- src/idmef-message.c | 102 - src/idmef-tree-print.c | 2 +- src/idmef-tree-to-string.c | 2 +- src/idmef-tree-wrap.c | 2721 +++++++++++----------- src/idmef-util.c | 2 - src/idmef-wrappers-gen/GenerateIDMEFTreeWrapC.pm | 92 +- src/idmef-wrappers-gen/GenerateIDMEFTreeWrapH.pm | 26 +- src/idmef-wrappers-gen/IDMEFTree.pm | 19 +- src/idmef-wrappers-gen/generator.pl | 4 +- src/idmef-wrappers-gen/idmef-tree.h | 792 +++++++ src/include/Makefile.am | 2 - src/include/idmef-message-id.h | 2 +- src/include/idmef-message-read.h | 2 +- src/include/idmef-message-write.h | 2 +- src/include/idmef-message.h | 44 - src/include/idmef-tree-data.h | 2 +- src/include/idmef-tree-print.h | 2 +- src/include/idmef-tree-to-string.h | 2 +- src/include/idmef-tree-wrap.h | 216 +-- src/include/idmef-tree.h | 794 ------- src/include/idmef.h | 1 - src/prelude-message-buffered.c | 1 - 28 files changed, 2320 insertions(+), 2545 deletions(-) commit 6c957ae9e33468d2c9c86938ff1af69bc8e35f9b Author: Yoann Vandoorselaere Date: Mon Oct 18 18:12:01 2004 +0000 Remove old backward compatibility definition. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@4205 09c5ec92-17d4-0310-903a-819935f44dba src/include/idmef-data.h | 8 -------- src/include/idmef-string.h | 8 -------- 2 files changed, 0 insertions(+), 16 deletions(-) commit ec1880b2df423dc840c19b33cc0d1285e725a25b Author: Yoann Vandoorselaere Date: Sun Oct 17 12:56:57 2004 +0000 Avoid potential portability problem. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@4201 09c5ec92-17d4-0310-903a-819935f44dba Makefile.am | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) commit 9620bef10fe3825489fca70c9fa84393ba36cac4 Author: Nicolas Delon Date: Sun Oct 17 11:21:43 2004 +0000 yet another bunch of fixes to make perl binding make distcheck friendly git-svn-id: file:///home/yoann/SVN/trunk/libprelude@4200 09c5ec92-17d4-0310-903a-819935f44dba Makefile.am | 2 ++ bindings/Makefile.am | 1 - bindings/perl/Makefile.PL.in | 5 ++++- 3 files changed, 6 insertions(+), 2 deletions(-) commit ceb6f9082bfec6d48f57c7a880908cfac3d5ca13 Author: Yoann Vandoorselaere Date: Sun Oct 17 10:15:31 2004 +0000 use newer macro so that autoreconf perform expectedly. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@4199 09c5ec92-17d4-0310-903a-819935f44dba configure.in | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) commit 0c8807db5556947defa61cd10646474d13eec25c Author: Nicolas Delon Date: Sat Oct 16 23:43:46 2004 +0000 restore dropped libtoolize call git-svn-id: file:///home/yoann/SVN/trunk/libprelude@4198 09c5ec92-17d4-0310-903a-819935f44dba autogen.sh | 1 + 1 files changed, 1 insertions(+), 0 deletions(-) commit e4afa184211cb24da889053ec95e88bf9240a009 Author: Yoann Vandoorselaere Date: Sat Oct 16 16:39:37 2004 +0000 Add libtool.m4. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@4196 09c5ec92-17d4-0310-903a-819935f44dba m4/libtool.m4 | 6027 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 files changed, 6027 insertions(+), 0 deletions(-) commit 706f2e8fa871091244c8ae9e2c5984c571af5786 Author: Yoann Vandoorselaere Date: Sat Oct 16 16:38:29 2004 +0000 pass --force to autoreconf. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@4195 09c5ec92-17d4-0310-903a-819935f44dba autogen.sh | 3 +-- 1 files changed, 1 insertions(+), 2 deletions(-) commit 91b20ae20bae5ffeaa42fcd3b01d0ad705f16525 Author: Yoann Vandoorselaere Date: Sat Oct 16 16:27:48 2004 +0000 Move part of the INSTALL file to README, since INSTALL is automatically generated by autoconf tools. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@4194 09c5ec92-17d4-0310-903a-819935f44dba INSTALL | 234 +++++++++++++++++++++++--------------------------------------- README | 88 ++++++++++++++++++++++++ 2 files changed, 175 insertions(+), 147 deletions(-) commit 79999035713effaba3b46c9c60bc4096a6f162f2 Author: Yoann Vandoorselaere Date: Sat Oct 16 16:03:36 2004 +0000 call AC_LTDL_DLLIB() so that @LIBADD_DL@ is resolved to something meaningful, Thanks to Yann Droneaud for pointing this out. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@4193 09c5ec92-17d4-0310-903a-819935f44dba configure.in | 1 + 1 files changed, 1 insertions(+), 0 deletions(-) commit 38e9d5438e60f8ad538587699394d6b2472bf4cb Author: Nicolas Delon Date: Sat Oct 16 11:19:36 2004 +0000 bug fix: install Perl binding in Perl's standard paths when doing a root / system wide install git-svn-id: file:///home/yoann/SVN/trunk/libprelude@4191 09c5ec92-17d4-0310-903a-819935f44dba bindings/Makefile.am | 6 +++--- bindings/perl/Makefile.PL.in | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) commit 06bd6300ece2405449c446ceec36832f887b6da4 Author: Yoann Vandoorselaere Date: Sat Oct 16 11:18:03 2004 +0000 Add suport for idmef_data_ref(). Untabify. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@4190 09c5ec92-17d4-0310-903a-819935f44dba src/idmef-data.c | 214 ++++++++++++++++++++++++---------------------- src/include/idmef-data.h | 3 + 2 files changed, 116 insertions(+), 101 deletions(-) commit 75273ba4092aeacade6433521ce2dca606947d73 Author: Yoann Vandoorselaere Date: Sat Oct 16 11:15:39 2004 +0000 Add idmef_time_ref(). Untabify. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@4189 09c5ec92-17d4-0310-903a-819935f44dba src/idmef-time.c | 344 ++++++++++++++++++++++++---------------------- src/include/idmef-time.h | 6 +- 2 files changed, 183 insertions(+), 167 deletions(-) commit 8082a8e0933755ee761ce3e7a345f6b634ea04f7 Author: Yoann Vandoorselaere Date: Thu Oct 14 12:09:41 2004 +0000 Quote version string. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@4187 09c5ec92-17d4-0310-903a-819935f44dba src/include/prelude.h.in | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) commit c1d9d399bca38460a91b73e7c5aa2d88f601642e Author: Yoann Vandoorselaere Date: Thu Oct 14 11:52:39 2004 +0000 Add missing header file. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@4186 09c5ec92-17d4-0310-903a-819935f44dba libmissing/alloca.h | 54 +++++++++++++++++++++++++++++++++++++++++++++++++++ 1 files changed, 54 insertions(+), 0 deletions(-) commit d2bfe7eba2d5376b7f2b61882893194056b78a3d Author: Yoann Vandoorselaere Date: Thu Oct 14 11:31:02 2004 +0000 Update gnulib code. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@4179 09c5ec92-17d4-0310-903a-819935f44dba libmissing/m4/strsep.m4 | 6 ++++-- libmissing/m4/vsnprintf.m4 | 1 + libmissing/snprintf.c | 12 ++++++------ libmissing/snprintf.h | 2 +- libmissing/strsep.h | 8 ++++++-- libmissing/vsnprintf.c | 34 +++++++++++++++------------------- libmissing/vsnprintf.h | 8 +++++--- 7 files changed, 38 insertions(+), 33 deletions(-) commit 137660bb11d09a017ff397f76642072948e3b59d Author: Yoann Vandoorselaere Date: Thu Oct 14 11:30:02 2004 +0000 Generate prelude.h from prelude.h.in, and substitute LIBPRELUDE_VERSION with the version number provided to automake. This fix a configure error with SVN snapshots where the headers LIBPRELUDE_VERSION version was different from the autoconf provided version. Thanks to Jochen Schlick for pointing the problem. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@4178 09c5ec92-17d4-0310-903a-819935f44dba configure.in | 1 + src/include/Makefile.am | 2 +- src/include/prelude.h | 46 ---------------------------------------------- src/include/prelude.h.in | 46 ++++++++++++++++++++++++++++++++++++++++++++++ 4 files changed, 48 insertions(+), 47 deletions(-) commit 8355c9f9fa306ca93430d1c986c22e20ace0ef04 Author: Nicolas Delon Date: Mon Oct 11 20:45:29 2004 +0000 bug fix: do not remove _prelude.c and prelude.py in build and source directories are the same git-svn-id: file:///home/yoann/SVN/trunk/libprelude@4177 09c5ec92-17d4-0310-903a-819935f44dba bindings/python/setup.py.in | 11 ++++++++--- 1 files changed, 8 insertions(+), 3 deletions(-) commit d0361fd96ef42d42507a5daa9556bda4982d5309 Author: Yoann Vandoorselaere Date: Mon Oct 11 00:06:03 2004 +0000 Fix library ordering for static compile. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@4174 09c5ec92-17d4-0310-903a-819935f44dba configure.in | 2 +- libprelude-config.in | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit 61c831735308fbba3f1112806c058b8241ab99d7 Author: Yoann Vandoorselaere Date: Sun Oct 10 22:56:46 2004 +0000 Some more fix. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@4172 09c5ec92-17d4-0310-903a-819935f44dba configure.in | 2 -- m4/libprelude.m4 | 2 +- 2 files changed, 1 insertions(+), 3 deletions(-) commit a8c7cf57db42307f647c3e0e6ff996cb0e8f9922 Author: Yoann Vandoorselaere Date: Sun Oct 10 21:17:39 2004 +0000 Add required m4 file for libgnutls/libgnutls-extra detection. New libprelude.m4 file, to be used by application that link to libprelude. This is based on libgnutls.m4. Increment version number to 0.9.0-svn, increase the 'current' version of the library soname, reset revision and age. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@4166 09c5ec92-17d4-0310-903a-819935f44dba Makefile.am | 2 +- acinclude.m4 | 166 ------------------------------------------------ configure.in | 19 +++--- libprelude-config.in | 6 +- m4/Makefile.am | 2 + m4/libgnutls-extra.m4 | 161 ++++++++++++++++++++++++++++++++++++++++++++++ m4/libgnutls.m4 | 160 ++++++++++++++++++++++++++++++++++++++++++++++ m4/libprelude.m4 | 168 +++++++++++++++++++++++++++++++++++++++++++++++++ 8 files changed, 505 insertions(+), 179 deletions(-) commit 0342c08a4fda51e04cbed87264ac33be71a5d93f Author: Yoann Vandoorselaere Date: Sun Oct 10 21:14:53 2004 +0000 New header file including most of the prelude header defining API and defining the library version. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@4165 09c5ec92-17d4-0310-903a-819935f44dba src/include/Makefile.am | 1 + src/include/prelude.h | 46 ++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 47 insertions(+), 0 deletions(-) commit ad22bc956aadf8b70d1659e462b7f5d4060ac9d0 Author: Yoann Vandoorselaere Date: Sun Oct 10 21:13:53 2004 +0000 New prelude_check_version() function. Return the libprelude version number, and will optionally compare it to a provided version number. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@4164 09c5ec92-17d4-0310-903a-819935f44dba src/common.c | 29 +++++++++++++++++++++++++++++ src/include/common.h | 2 ++ 2 files changed, 31 insertions(+), 0 deletions(-) commit 8b93d6a2e77da8a549e76f6afb4706bba8be1f9e Author: Nicolas Delon Date: Mon Oct 4 22:16:02 2004 +0000 use the $(CC) variable for the perl binding instead of hard coded gcc git-svn-id: file:///home/yoann/SVN/trunk/libprelude@4162 09c5ec92-17d4-0310-903a-819935f44dba bindings/Makefile.am | 2 +- bindings/perl/Makefile.PL.in | 1 - 2 files changed, 1 insertions(+), 2 deletions(-) commit 7410565eb5c956fd1d33a486328fc011451cc6c4 Author: Nicolas Delon Date: Mon Oct 4 21:15:24 2004 +0000 force the use of gcc (because we must compile with gcc even on plateforms that have a native compiler) git-svn-id: file:///home/yoann/SVN/trunk/libprelude@4161 09c5ec92-17d4-0310-903a-819935f44dba bindings/perl/Makefile.PL.in | 1 + 1 files changed, 1 insertions(+), 0 deletions(-) commit 8592bd81342b06a2bc0bed13abb0fd44a3742ec8 Author: Nicolas Delon Date: Sun Oct 3 21:22:44 2004 +0000 remove unneeded code git-svn-id: file:///home/yoann/SVN/trunk/libprelude@4158 09c5ec92-17d4-0310-903a-819935f44dba Makefile.am | 2 -- 1 files changed, 0 insertions(+), 2 deletions(-) commit 6efde851e4202fbd54d34b013c32d41cf7c0b44a Author: Nicolas Delon Date: Sun Oct 3 20:37:27 2004 +0000 Yet another bunch of changes to make libprelude (especially the bindings) make distcheck friendly. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@4157 09c5ec92-17d4-0310-903a-819935f44dba Makefile.am | 1 + bindings/Makefile.am | 21 ++++++++------- bindings/perl/Makefile.PL.in | 29 ++++++++++++++++++---- bindings/python/setup.py.in | 54 ++++++++++++++++++++++++++++++++--------- 4 files changed, 77 insertions(+), 28 deletions(-) commit 104a738c043e82b8bc7426b71409374ab5dab78d Author: Yoann Vandoorselaere Date: Sat Oct 2 19:40:42 2004 +0000 Add -Wstrict-prototype. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@4151 09c5ec92-17d4-0310-903a-819935f44dba configure.in | 1 + 1 files changed, 1 insertions(+), 0 deletions(-) commit 9e1411ed4be7990748c5d962f716ca800970dde4 Author: Yoann Vandoorselaere Date: Sat Oct 2 19:37:02 2004 +0000 Include missing extract.h, and prelude-log.h dependencie. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@4150 09c5ec92-17d4-0310-903a-819935f44dba src/prelude-inet.c | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) commit 50d6f4ab9da134ca7236cb48623587ba46d565c9 Author: Yoann Vandoorselaere Date: Sat Oct 2 19:05:57 2004 +0000 Fix an alignement issue while accessing h_addr_list array of in_addr. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@4148 09c5ec92-17d4-0310-903a-819935f44dba src/prelude-inet.c | 5 ++++- 1 files changed, 4 insertions(+), 1 deletions(-) commit 1684d5c4622d9d6292f697e1b1fb64829d8cb73c Author: Yoann Vandoorselaere Date: Sat Oct 2 18:53:59 2004 +0000 Fix a bug in latest modification done to idmef-util. Additionally, idmef_additionnaldata_data_to_string() return a const. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@4146 09c5ec92-17d4-0310-903a-819935f44dba src/idmef-util.c | 5 +++-- src/include/idmef-util.h | 3 ++- 2 files changed, 5 insertions(+), 3 deletions(-) commit eb5e5e45e21e838be45b350c9629636c7b0e5ff1 Author: Nicolas Delon Date: Sat Oct 2 12:34:46 2004 +0000 * configure.in: fix bug for swig detection * bindings/python/setup.py.in: * bindings/perl/Makefile.PL.in: compare absolute path names, it solve the problem of comparing two same paths formatted differently (i.e "../.." and "../../") git-svn-id: file:///home/yoann/SVN/trunk/libprelude@4139 09c5ec92-17d4-0310-903a-819935f44dba bindings/perl/Makefile.PL.in | 3 ++- bindings/python/setup.py.in | 2 +- configure.in | 4 ++-- 3 files changed, 5 insertions(+), 4 deletions(-) commit 361c4fe87e4e114e73be78299f30d5fc7f486ab5 Author: Yoann Vandoorselaere Date: Sat Oct 2 11:18:01 2004 +0000 Only declare strsep if not available. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@4138 09c5ec92-17d4-0310-903a-819935f44dba libmissing/strsep.h | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) commit 88e405bdc05cacea6076fcbb62dc0f70d4fc6e89 Author: Yoann Vandoorselaere Date: Fri Oct 1 20:55:27 2004 +0000 Update gnulib code. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@4132 09c5ec92-17d4-0310-903a-819935f44dba libmissing/m4/snprintf.m4 | 2 +- libmissing/m4/strsep.m4 | 2 +- libmissing/snprintf.c | 35 ++++++++++------------------ libmissing/strsep.c | 55 +++++++++++++++++++++++++------------------- libmissing/strsep.h | 19 +++++++++++++-- libmissing/vasnprintf.h | 21 +++++++++++++++- libmissing/vsnprintf.c | 4 +- libmissing/vsnprintf.h | 2 +- 8 files changed, 84 insertions(+), 56 deletions(-) commit b76381ea80f2d201e58a0927d8c20ddc6529bf7d Author: Yoann Vandoorselaere Date: Fri Oct 1 20:51:30 2004 +0000 Include libmissing.h. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@4131 09c5ec92-17d4-0310-903a-819935f44dba src/prelude-strbuf.c | 1 + 1 files changed, 1 insertions(+), 0 deletions(-) commit 1eee920455b74fac644117f65c47335404f2d25d Author: Yoann Vandoorselaere Date: Fri Oct 1 20:48:22 2004 +0000 call libtoolize. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@4130 09c5ec92-17d4-0310-903a-819935f44dba autogen.sh | 1 + 1 files changed, 1 insertions(+), 0 deletions(-) commit f7beccc22b6529a2b5b0c550ae432c372e0f7c98 Author: Yoann Vandoorselaere Date: Fri Oct 1 19:23:30 2004 +0000 Hack so that application that need dlpreopening does have to deal with a libltdl dependencie (header and lib). git-svn-id: file:///home/yoann/SVN/trunk/libprelude@4125 09c5ec92-17d4-0310-903a-819935f44dba src/include/prelude-plugin.h | 13 ++++++++++++- src/prelude-plugin.c | 9 ++++++++- 2 files changed, 20 insertions(+), 2 deletions(-) commit a2609ea1f9471a0e02f8f2ef4c1825368d200e99 Author: Yoann Vandoorselaere Date: Fri Oct 1 12:31:36 2004 +0000 more fixes. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@4124 09c5ec92-17d4-0310-903a-819935f44dba bindings/Makefile.am | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) commit bb7251daafef1f32d387d63993f1f50b75d7e5af Author: Yoann Vandoorselaere Date: Fri Oct 1 12:30:11 2004 +0000 Don't call swig, perl, python directly, rather use $(SWIG), $(PERL), and $(PYTHON) variable. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@4123 09c5ec92-17d4-0310-903a-819935f44dba bindings/Makefile.am | 12 ++++++------ 1 files changed, 6 insertions(+), 6 deletions(-) commit 0a38fa1b579bb49bbbe1fa41b45b94cc39fe2f63 Author: Yoann Vandoorselaere Date: Fri Oct 1 12:23:28 2004 +0000 correct python, perl and swig detection method. Also take care if the user provide a PROGNAME=/path/to/prog variable. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@4122 09c5ec92-17d4-0310-903a-819935f44dba configure.in | 14 ++++++++++---- 1 files changed, 10 insertions(+), 4 deletions(-) commit 80507995c1252d765faf6bdfc624eb55933a85c1 Author: Yoann Vandoorselaere Date: Fri Oct 1 01:58:10 2004 +0000 cleanup. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@4121 09c5ec92-17d4-0310-903a-819935f44dba configure.in | 4 ---- 1 files changed, 0 insertions(+), 4 deletions(-) commit fc7c7b53b094cf1757f88406bf7a50ea7f33c154 Author: Yoann Vandoorselaere Date: Fri Oct 1 01:52:30 2004 +0000 Activate libmissing support in autoconf stuff. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@4120 09c5ec92-17d4-0310-903a-819935f44dba Makefile.am | 3 ++- configure.in | 37 ++++++++++++++++++++++++------------- 2 files changed, 26 insertions(+), 14 deletions(-) commit 4d71353c25e8cf1863c75537686dbe6e368a2892 Author: Yoann Vandoorselaere Date: Fri Oct 1 01:51:54 2004 +0000 Hook libmissing everywhere it's needed. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@4119 09c5ec92-17d4-0310-903a-819935f44dba prelude-adduser/Makefile.am | 4 +- prelude-adduser/prelude-adduser.c | 1 + prelude-adduser/server.c | 1 + prelude-adduser/tls-register.c | 1 + src/Makefile.am | 7 +- src/common.c | 79 +------------------- src/config-engine.c | 5 +- src/daemonize.c | 2 +- src/idmef-criteria-string.lex.l | 7 +- src/idmef-criteria.c | 1 + src/idmef-criterion-value.c | 1 + src/idmef-data.c | 1 + src/idmef-object.c | 1 + src/idmef-time.c | 1 + src/idmef-tree-to-string.c | 3 +- src/idmef-tree-wrap.c | 2 +- src/idmef-util.c | 1 + src/idmef-value-type.c | 1 + .../GenerateIDMEFTreeToStringC.pm | 1 + src/include/Makefile.am | 2 +- src/include/common.h | 6 -- src/include/idmef-message-id.h | 2 +- src/include/idmef-message-read.h | 2 +- src/include/idmef-message-write.h | 2 +- src/include/idmef-tree-data.h | 2 +- src/include/idmef-tree-print.h | 2 +- src/include/idmef-tree-to-string.h | 2 +- src/include/idmef-tree-wrap.h | 66 ++++++++-------- src/include/libmissing.h | 39 ++++++++++ src/include/prelude-client.h | 2 +- src/prelude-client.c | 1 + src/prelude-connection-mgr.c | 1 + src/prelude-connection.c | 1 + src/prelude-failover.c | 1 + src/prelude-getopt-wide.c | 5 +- src/prelude-getopt.c | 1 + src/prelude-inet.c | 1 + src/prelude-log.c | 1 + src/prelude-plugin.c | 1 + src/prelude-strbuf.c | 1 - 40 files changed, 120 insertions(+), 141 deletions(-) commit f64f3cc3da94a7bdc9cd8f1eb2d902ad388c19fc Author: Yoann Vandoorselaere Date: Fri Oct 1 01:48:57 2004 +0000 Use git-svn-id: file:///home/yoann/SVN/trunk/libprelude@4118 09c5ec92-17d4-0310-903a-819935f44dba autogen.sh | 9 +++------ 1 files changed, 3 insertions(+), 6 deletions(-) commit 753289ef2480e361aa824cddf458320758ed4a4f Author: Yoann Vandoorselaere Date: Fri Oct 1 01:48:31 2004 +0000 Add gnulib support for architecture with missing function. Currently mostly provide replacement for snprintf, vsnprintf, strsep, strndup. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@4117 09c5ec92-17d4-0310-903a-819935f44dba libmissing/Makefile.am | 59 +++ libmissing/alloca_.h | 54 +++ libmissing/asnprintf.c | 37 ++ libmissing/m4/alloca.m4 | 44 ++ libmissing/m4/eoverflow.m4 | 66 +++ libmissing/m4/gnulib.m4 | 47 +++ libmissing/m4/intmax_t.m4 | 63 +++ libmissing/m4/inttypes_h.m4 | 28 ++ libmissing/m4/longdouble.m4 | 30 ++ libmissing/m4/longlong.m4 | 25 ++ libmissing/m4/onceonly_2_57.m4 | 86 ++++ libmissing/m4/signed.m4 | 19 + libmissing/m4/size_max.m4 | 61 +++ libmissing/m4/snprintf.m4 | 17 + libmissing/m4/stdint_h.m4 | 28 ++ libmissing/m4/strdup.m4 | 17 + libmissing/m4/strndup.m4 | 24 ++ libmissing/m4/strnlen.m4 | 27 ++ libmissing/m4/strpbrk.m4 | 18 + libmissing/m4/strsep.m4 | 17 + libmissing/m4/vasnprintf.m4 | 60 +++ libmissing/m4/vsnprintf.m4 | 16 + libmissing/m4/wchar_t.m4 | 22 + libmissing/m4/wint_t.m4 | 22 + libmissing/m4/xsize.m4 | 15 + libmissing/minmax.h | 53 +++ libmissing/printf-args.c | 118 ++++++ libmissing/printf-args.h | 136 ++++++ libmissing/printf-parse.c | 536 ++++++++++++++++++++++++ libmissing/printf-parse.h | 74 ++++ libmissing/snprintf.c | 69 +++ libmissing/snprintf.h | 29 ++ libmissing/strdup.c | 56 +++ libmissing/strdup.h | 29 ++ libmissing/strndup.c | 55 +++ libmissing/strndup.h | 30 ++ libmissing/strnlen.c | 48 +++ libmissing/strpbrk.c | 42 ++ libmissing/strpbrk.h | 28 ++ libmissing/strsep.c | 49 +++ libmissing/strsep.h | 30 ++ libmissing/vasnprintf.c | 896 ++++++++++++++++++++++++++++++++++++++++ libmissing/vasnprintf.h | 60 +++ libmissing/vsnprintf.c | 62 +++ libmissing/vsnprintf.h | 29 ++ libmissing/xsize.h | 108 +++++ 46 files changed, 3439 insertions(+), 0 deletions(-) commit 2a477bde4b88dbc99aa3a6ad3240fed9ad25d756 Author: Yoann Vandoorselaere Date: Fri Oct 1 01:45:28 2004 +0000 correct enum declaration for non GCC compiler. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@4116 09c5ec92-17d4-0310-903a-819935f44dba src/include/idmef-value-type.h | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) commit 8b56a8a1eae2cb5a92eb234db3b4d4969c20fac6 Author: Yoann Vandoorselaere Date: Thu Sep 30 17:14:21 2004 +0000 Remove outdated debian package stuff from here, they are maintained separatly. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@4115 09c5ec92-17d4-0310-903a-819935f44dba debian/README.Debian | 6 -- debian/changelog | 9 --- debian/control | 46 --------------- debian/copyright | 26 -------- debian/libprelude-dev.dirs | 2 - debian/libprelude-dev.files | 3 - debian/libprelude-dev.postinst.debhelper | 7 -- debian/libprelude-dev.prerm.debhelper | 5 -- debian/libprelude1.dirs | 1 - debian/libprelude1.files | 1 - debian/libprelude1.postinst.debhelper | 7 -- debian/libprelude1.prerm.debhelper | 5 -- debian/rules | 94 ------------------------------ 13 files changed, 0 insertions(+), 212 deletions(-) commit 080bb549e1f2e48f7412b0a4b26aa227884d2208 Author: Nicolas Delon Date: Thu Sep 30 04:55:06 2004 +0000 oops... clean-am has been commented instead of uninstall-hook git-svn-id: file:///home/yoann/SVN/trunk/libprelude@4114 09c5ec92-17d4-0310-903a-819935f44dba bindings/Makefile.am | 26 +++++++++++++------------- 1 files changed, 13 insertions(+), 13 deletions(-) commit a000dc7e0074e6b966c1f4dad0a845b572c8dcf1 Author: Nicolas Delon Date: Wed Sep 29 22:57:02 2004 +0000 * bindings/perl/Makefile.PL.in: support for different source and build directories * bindings/Makefile.am: * bindings/python/setup.py.in: begin support of the uninstall target, disabled: still does not work git-svn-id: file:///home/yoann/SVN/trunk/libprelude@4113 09c5ec92-17d4-0310-903a-819935f44dba bindings/Makefile.am | 20 ++++++++++++++------ bindings/perl/Makefile.PL.in | 9 +++++++++ bindings/python/setup.py.in | 17 ++++++++++++++++- 3 files changed, 39 insertions(+), 7 deletions(-) commit 1c0d7e45a852c2fbbd61210b098b67b71b61f639 Author: Yoann Vandoorselaere Date: Tue Sep 28 22:00:17 2004 +0000 Included patch from Yann Droneaud , to avoid distributing prelude-inttypes.h that was generated on the machine making the distribution. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@4112 09c5ec92-17d4-0310-903a-819935f44dba src/include/Makefile.am | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) commit f2e142fed1cdc1e86187f6db2b475ac0307e50ea Author: Yoann Vandoorselaere Date: Tue Sep 28 21:53:21 2004 +0000 Included patch from Yann Droneaud , to fix a problem with the prelude-inttypes.h inclusion when building from a separate directory. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@4111 09c5ec92-17d4-0310-903a-819935f44dba bindings/perl/Makefile.PL.in | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) commit 1c0555d0837eff2ac71caeeee70a276e76e90690 Author: Nicolas Delon Date: Tue Sep 28 20:35:01 2004 +0000 bug fix: split the include paths string git-svn-id: file:///home/yoann/SVN/trunk/libprelude@4110 09c5ec92-17d4-0310-903a-819935f44dba bindings/python/setup.py.in | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) commit 93a685c0456fdccbd613f604948c437d9f314716 Author: Yoann Vandoorselaere Date: Tue Sep 28 19:44:46 2004 +0000 Included patch from Yann Droneaud , to fix a problem with the prelude-inttypes.h inclusion when building from a separate directory. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@4109 09c5ec92-17d4-0310-903a-819935f44dba bindings/python/setup.py.in | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) commit 065a01e8786bb360069060da562835ad5d8901f8 Author: Yoann Vandoorselaere Date: Tue Sep 28 19:35:09 2004 +0000 Included patch from Yann Droneaud , to fix a problem with the prelude-inttypes.h inclusion when building from a separate directory. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@4108 09c5ec92-17d4-0310-903a-819935f44dba prelude-adduser/Makefile.am | 4 ++-- src/Makefile.am | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) commit e2fca98cc1bd435604b6986ba6837772801fe3c3 Author: Yoann Vandoorselaere Date: Tue Sep 28 17:10:18 2004 +0000 Fix detection of broken PRIx macros in case we're on a machine that lack inttypes or stdint.h. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@4107 09c5ec92-17d4-0310-903a-819935f44dba m4/ax_create_prelude_inttypes_h.m4 | 15 +++++++++++++++ 1 files changed, 15 insertions(+), 0 deletions(-) commit 61ef4a5c2b8470e318eb74c84d74b9b6e39e7149 Author: Nicolas Delon Date: Tue Sep 28 12:01:52 2004 +0000 bug fix for python binding build system, we now copy _prelude.c and prelude.py in the build directory because the distutils of python2.3 does not seem to work with a different source dir and build dir git-svn-id: file:///home/yoann/SVN/trunk/libprelude@4106 09c5ec92-17d4-0310-903a-819935f44dba bindings/python/setup.py.in | 19 +++++++++++++++---- 1 files changed, 15 insertions(+), 4 deletions(-) commit 3582ee144139730d9752368b78ddbd4e27c11fc3 Author: Yoann Vandoorselaere Date: Tue Sep 28 09:47:38 2004 +0000 More work on the ACX_PTHREAD detection stuff. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@4105 09c5ec92-17d4-0310-903a-819935f44dba bindings/perl/Makefile.PL.in | 2 +- bindings/python/setup.py.in | 5 ++--- libprelude-config.in | 2 +- m4/acx_pthread.m4 | 1 - prelude-adduser/Makefile.am | 2 +- src/Makefile.am | 2 +- 6 files changed, 6 insertions(+), 8 deletions(-) commit 5f20776a7042eba726745be99d5467c0c9d57bbb Author: Yoann Vandoorselaere Date: Tue Sep 28 09:38:55 2004 +0000 Use AX_CFLAGS_GCC_OPTION to check for CFLAGS. Removed some debugging spew. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@4104 09c5ec92-17d4-0310-903a-819935f44dba configure.in | 14 ++++++++------ 1 files changed, 8 insertions(+), 6 deletions(-) commit 698fdb9c370c69a21baa3103ebfd0abeb22726c7 Author: Yoann Vandoorselaere Date: Tue Sep 28 09:37:34 2004 +0000 New macro from the autoconf macros archive, to test for available compiler flag. Convert ac_prototype to check for -Werror that way, since the previous check didn't seem to work. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@4103 09c5ec92-17d4-0310-903a-819935f44dba m4/ac_prototype.m4 | 7 +- m4/ax_cflags_gcc_option.m4 | 183 ++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 188 insertions(+), 2 deletions(-) commit e435b4c719a242bac469e0a60d3eb86fb4676a7a Author: Yoann Vandoorselaere Date: Tue Sep 28 09:34:59 2004 +0000 Added uninstall-local target to fix some configuration file left after install when doing a distcheck. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@4102 09c5ec92-17d4-0310-903a-819935f44dba Makefile.am | 7 +++++++ 1 files changed, 7 insertions(+), 0 deletions(-) commit 17b239e83bbd7ca2dcd4dfe82230b43ce7105e7d Author: Nicolas Delon Date: Sun Sep 26 17:11:32 2004 +0000 fix make distcheck stuff git-svn-id: file:///home/yoann/SVN/trunk/libprelude@4101 09c5ec92-17d4-0310-903a-819935f44dba bindings/Makefile.am | 2 +- bindings/python/setup.py.in | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) commit 89a8b4962ee3cb511951a3dbc51bd9029424b8e8 Author: Yoann Vandoorselaere Date: Sun Sep 26 16:34:21 2004 +0000 Fix check for PRIx64 macro. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@4100 09c5ec92-17d4-0310-903a-819935f44dba m4/ax_create_prelude_inttypes_h.m4 | 12 +++++++++++- 1 files changed, 11 insertions(+), 1 deletions(-) commit 9196da3744892af7a38b5961487291767d573bda Author: Nicolas Delon Date: Sun Sep 26 16:02:54 2004 +0000 fix some gcc warnings git-svn-id: file:///home/yoann/SVN/trunk/libprelude@4099 09c5ec92-17d4-0310-903a-819935f44dba src/idmef-criteria-string.lex.l | 4 ++++ src/idmef-criteria-string.yac.y | 5 +++-- src/idmef-message-read.c | 2 +- src/idmef-message-write.c | 2 +- src/idmef-tree-print.c | 14 +++++++------- src/idmef-tree-to-string.c | 8 ++++---- src/idmef-wrappers-gen/GenerateIDMEFTreePrintC.pm | 12 ++++++------ .../GenerateIDMEFTreeToStringC.pm | 6 +++--- src/prelude-getopt.c | 2 +- 9 files changed, 30 insertions(+), 25 deletions(-) commit 794ce6ea9b0e1901f2b13ff7c8517ffd6c6f06c1 Author: Nicolas Delon Date: Sun Sep 26 15:21:55 2004 +0000 bug fix: perl bindings now works with swig versions > 1.3.19 git-svn-id: file:///home/yoann/SVN/trunk/libprelude@4098 09c5ec92-17d4-0310-903a-819935f44dba bindings/Makefile.am | 7 ++++++- 1 files changed, 6 insertions(+), 1 deletions(-) commit 71d1dee85d2a0ef2121dd47ca4df235cea75175a Author: Yoann Vandoorselaere Date: Sun Sep 26 15:12:25 2004 +0000 More cleanup on the bindings build system. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@4097 09c5ec92-17d4-0310-903a-819935f44dba bindings/Makefile.am | 52 ++++++++++++++++++++++++++++++++++++------------- configure.in | 25 ++++++++--------------- 2 files changed, 47 insertions(+), 30 deletions(-) commit 74bff469f8e7e5e6415c5dfdf9a613e741955d27 Author: Yoann Vandoorselaere Date: Sun Sep 26 15:11:48 2004 +0000 git-svn-id: file:///home/yoann/SVN/trunk/libprelude@4096 09c5ec92-17d4-0310-903a-819935f44dba bindings/libprelude.i.in | 256 ---------------------------------------------- 1 files changed, 0 insertions(+), 256 deletions(-) commit d1308ba850edd735c31a24092305d3062cffdcaa Author: Yoann Vandoorselaere Date: Sun Sep 26 15:10:29 2004 +0000 Remove autogenerated file from the repository. Will be included in the dist. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@4095 09c5ec92-17d4-0310-903a-819935f44dba bindings/perl/Prelude.c |38530 -------------------------------------------- bindings/python/_prelude.c |24481 ---------------------------- 2 files changed, 0 insertions(+), 63011 deletions(-) commit c0960989e9e7bcbd09041d3c593df71049971aa3 Author: Yoann Vandoorselaere Date: Sun Sep 26 14:03:48 2004 +0000 Check whether swig is present before generating the bindings. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@4094 09c5ec92-17d4-0310-903a-819935f44dba bindings/Makefile.am | 5 +++++ configure.in | 16 ++++++++++++++++ 2 files changed, 21 insertions(+), 0 deletions(-) commit c6261ca666eab6d25ec94d504ff9c2806e5f4c20 Author: Yoann Vandoorselaere Date: Sun Sep 26 13:47:04 2004 +0000 Don't generate libprelude.i throught autoconf, since it is un-needed. Don't hardcode include path within libprelude.i, but rather, provide swig with -I$(top_srcdir)/src/include in the Makefile.am git-svn-id: file:///home/yoann/SVN/trunk/libprelude@4093 09c5ec92-17d4-0310-903a-819935f44dba bindings/Makefile.am | 6 +- bindings/libprelude.i | 256 +++++++++++++++++++++++++++++++++++++++++++++++++ configure.in | 1 - 3 files changed, 259 insertions(+), 4 deletions(-) commit 502a7563b3a82c102ddc0fd22195dfaf1261d9e6 Author: Nicolas Delon Date: Sun Sep 26 11:57:23 2004 +0000 new build system for langage bindings, cleaner and more portable than the previous one, the standard build system for each langage (ExtUtils::MakeMaker for Perl and distutils for Python) is now used git-svn-id: file:///home/yoann/SVN/trunk/libprelude@4092 09c5ec92-17d4-0310-903a-819935f44dba bindings/Makefile.am | 33 +- bindings/generate.sh | 5 - bindings/libprelude.i | 256 - bindings/libprelude.i.in | 256 + bindings/perl/Makefile.PL.in | 15 + bindings/perl/Makefile.am | 28 - bindings/perl/Prelude.c |11319 +++++++++++++++++++++++++----------------- bindings/perl/generate.sh | 3 - bindings/python/Makefile.am | 27 - bindings/python/_prelude.c | 286 +- bindings/python/generate.sh | 3 - bindings/python/setup.py.in | 21 + configure.in | 47 +- 13 files changed, 7194 insertions(+), 5105 deletions(-) commit bd7ee4d65f537a884a035a6bb3898cedebc52af1 Author: Yoann Vandoorselaere Date: Sat Sep 25 18:27:53 2004 +0000 Fix a warning when calling extract_characters_safe(). Some reformating. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@4091 09c5ec92-17d4-0310-903a-819935f44dba src/idmef-util.c | 33 +++++++++++++++++---------------- 1 files changed, 17 insertions(+), 16 deletions(-) commit 3759c549af330a722b45252b33c31a551ec3bae5 Author: Yoann Vandoorselaere Date: Sat Sep 25 18:03:22 2004 +0000 Modify GENERIC_ONE_BASE_RW_FUNC to take two format string as argument. We need a different format string for sscanf (%lf) and snprintf (%f) for data typed double. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@4090 09c5ec92-17d4-0310-903a-819935f44dba src/idmef-value-type.c | 17 +++++++++-------- 1 files changed, 9 insertions(+), 8 deletions(-) commit a8f5fbe42fb077c18d72c34843b3d0bad498e847 Author: Yoann Vandoorselaere Date: Sat Sep 25 17:52:22 2004 +0000 Set pthread ldflags in PTHREAD_LDFLAGS, not in PTHREAD_LIBS, for perl binding which complain about it. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@4089 09c5ec92-17d4-0310-903a-819935f44dba libprelude-config.in | 2 +- m4/acx_pthread.m4 | 3 ++- prelude-adduser/Makefile.am | 1 + src/Makefile.am | 2 +- 4 files changed, 5 insertions(+), 3 deletions(-) commit 8c240bb2e2e6be0b2ad4b38fbafa2f28323acd2e Author: Yoann Vandoorselaere Date: Sat Sep 25 16:14:41 2004 +0000 Use PATH_MAX if defined for getcwd(). git-svn-id: file:///home/yoann/SVN/trunk/libprelude@4088 09c5ec92-17d4-0310-903a-819935f44dba src/daemonize.c | 7 ++++++- 1 files changed, 6 insertions(+), 1 deletions(-) commit 531e3248f245b477dec94a37d6729b689c599ffe Author: Yoann Vandoorselaere Date: Sat Sep 25 15:49:44 2004 +0000 Fix format string for printing double. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@4087 09c5ec92-17d4-0310-903a-819935f44dba src/idmef-value-type.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) commit 2f2b8df9a5d33380f76ef973b3bdb2efb3d4294e Author: Yoann Vandoorselaere Date: Sat Sep 25 15:48:49 2004 +0000 Always include config.h first. Fix _FILE_OFFSET_BITS redefinition warning on Solaris. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@4086 09c5ec92-17d4-0310-903a-819935f44dba src/idmef-util.c | 4 ++-- src/prelude-connection.c | 4 ++-- src/prelude-inet.c | 3 ++- src/prelude-io.c | 3 ++- src/prelude-plugin.c | 3 ++- 5 files changed, 10 insertions(+), 7 deletions(-) commit dfc4698c0f02d0de1e56c84b535babfb078e8f6b Author: Yoann Vandoorselaere Date: Sat Sep 25 15:40:27 2004 +0000 Fix warning on Solaris when printing uid_t / gid_t. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@4085 09c5ec92-17d4-0310-903a-819935f44dba prelude-adduser/prelude-adduser.c | 6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-) commit cf84efa11c42705e3da83f4858360a6ff0c66e0a Author: Yoann Vandoorselaere Date: Sat Sep 25 14:59:53 2004 +0000 Fix include path. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@4084 09c5ec92-17d4-0310-903a-819935f44dba src/include/common.h | 2 +- src/include/extract.h | 2 +- src/include/idmef-tree.h | 2 +- src/include/idmef.h | 2 +- src/include/prelude-ident.h | 2 +- src/include/prelude-io.h | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) commit ced6f7829271a14444c0273e5f013141031fa05f Author: Yoann Vandoorselaere Date: Sat Sep 25 11:17:15 2004 +0000 Use socklen_t in place of size_t. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@4083 09c5ec92-17d4-0310-903a-819935f44dba src/prelude-connection.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) commit 6a50c6dedbc2ed5afa568ca00a3f284e802c1ffb Author: Yoann Vandoorselaere Date: Sat Sep 25 11:16:39 2004 +0000 Fit latest change. Some cleanup. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@4082 09c5ec92-17d4-0310-903a-819935f44dba prelude-adduser/Makefile.am | 6 +++--- src/Makefile.am | 11 +++++------ 2 files changed, 8 insertions(+), 9 deletions(-) commit f6f936b9c7c593bf0b03fc2c0367b4d83a141609 Author: Yoann Vandoorselaere Date: Sat Sep 25 11:15:53 2004 +0000 - Some re-ordering for the --cflags option. - Make --pthread-cflags work again. - Don't document pthread cflags since application are not supposed to use it anymore. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@4081 09c5ec92-17d4-0310-903a-819935f44dba libprelude-config.in | 6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-) commit 0359aad84c028fce58d5f4d860bad26477e7f90e Author: Yoann Vandoorselaere Date: Sat Sep 25 11:14:57 2004 +0000 New autoconf macro for checking function prototype. Included from the Autoconf Macro archives, and slighty modified to work on newer autoconf version. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@4080 09c5ec92-17d4-0310-903a-819935f44dba m4/ac_prototype.m4 | 189 +++++++++++++++++++++++++++++++++++++++++++++ m4/ac_prototype_accept.m4 | 31 ++++++++ 2 files changed, 220 insertions(+), 0 deletions(-) commit b251ff0477265e81e6e338fe369e46896edeb5d0 Author: Yoann Vandoorselaere Date: Sat Sep 25 11:14:12 2004 +0000 Don't export PTHREAD_CFLAGS to libprelude-config --cflags.. This is up to the application to do so if it want to support pthread. Add a supposedly better check for socklen_t, which is no defined to the same type as the 3 accept() argument is. This should fix most of the portability problem both on architecture not using socklen_t, and on architecture that doesn't use socklen_t for accept() / getsockname(). git-svn-id: file:///home/yoann/SVN/trunk/libprelude@4079 09c5ec92-17d4-0310-903a-819935f44dba configure.in | 51 ++++++++++++++++++++++++++++----------------------- 1 files changed, 28 insertions(+), 23 deletions(-) commit 4a1a8d1a492b302c124c955d6514ce815bd1b131 Author: Yoann Vandoorselaere Date: Sat Sep 25 11:10:25 2004 +0000 When gcc support a pthread flags, define it both in PTHREAD_LIBS and PTHREAD_CFLAGS. This should fix an issue encountered on Linux since the switch to ACX_PTHREAD(). git-svn-id: file:///home/yoann/SVN/trunk/libprelude@4078 09c5ec92-17d4-0310-903a-819935f44dba m4/acx_pthread.m4 | 1 + 1 files changed, 1 insertions(+), 0 deletions(-) commit 95af5d3491c1bd596e3c65a86aefe40d83716ead Author: Yoann Vandoorselaere Date: Sat Sep 25 09:21:06 2004 +0000 More warnings fix. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@4077 09c5ec92-17d4-0310-903a-819935f44dba src/idmef-time.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) commit c56bdae0edba5dfe56ff2ad2a9a660f9c9e1599e Author: Yoann Vandoorselaere Date: Sat Sep 25 09:04:14 2004 +0000 Fix warnings on some architecture. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@4076 09c5ec92-17d4-0310-903a-819935f44dba src/common.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) commit 531c02dc7601760e0042815fe096ac152f7726ad Author: Yoann Vandoorselaere Date: Sat Sep 25 09:03:33 2004 +0000 Fix warning on some architectures. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@4075 09c5ec92-17d4-0310-903a-819935f44dba src/idmef-criterion-value.c | 2 +- src/idmef-time.c | 4 ++-- src/idmef-value.c | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) commit 5123147f796f206d40cbd363ca60a9580757b9a1 Author: Yoann Vandoorselaere Date: Fri Sep 24 18:06:24 2004 +0000 Use prelude-inttypes.h. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@4074 09c5ec92-17d4-0310-903a-819935f44dba bindings/libprelude.i | 2 +- bindings/perl/Prelude.c | 2 +- bindings/python/_prelude.c | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) commit 99543ebf700e34d803adab18e1bcf65830771cca Author: Yoann Vandoorselaere Date: Fri Sep 24 18:05:54 2004 +0000 More work on ax_create_stdint_h, which was re-written and renamed to ax_create_prelude_inttypes_h. Work done by Rob Holland and myself. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@4073 09c5ec92-17d4-0310-903a-819935f44dba acinclude.m4 | 193 ---------- configure.in | 3 +- m4/ac_compile_check_sizeof.m4 | 28 ++ m4/acx_pthread.m4 | 239 ++++++++++++ m4/ax_create_prelude_inttypes_h.m4 | 111 ++++++ m4/ax_create_stdint_h.m4 | 725 ------------------------------------ src/include/prelude-inttypes.h.in | 208 +++++++++++ 7 files changed, 588 insertions(+), 919 deletions(-) commit 69ff13a508581d765810e5a8b71fca6ab2754f77 Author: Yoann Vandoorselaere Date: Thu Sep 23 16:44:26 2004 +0000 Patch from Rob Holland to fix a quote problem in AX_CREATE_STDINT() macro. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@4072 09c5ec92-17d4-0310-903a-819935f44dba m4/ax_create_stdint_h.m4 | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) commit b69aeda98bee5837d557da6b9c1f1b120dd17378 Author: Yoann Vandoorselaere Date: Thu Sep 23 14:46:21 2004 +0000 Include sys/time.h. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@4071 09c5ec92-17d4-0310-903a-819935f44dba src/prelude-connection-mgr.c | 1 + 1 files changed, 1 insertions(+), 0 deletions(-) commit 10a3a546384d332f670a74e05d43801f1364dcc2 Author: Yoann Vandoorselaere Date: Thu Sep 23 14:45:17 2004 +0000 Install the generated prelude-inttypes.h, and use it everywhere in place of inttypes.h. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@4070 09c5ec92-17d4-0310-903a-819935f44dba prelude-adduser/plaintext.c | 2 +- prelude-adduser/prelude-adduser.c | 2 +- src/client-ident.c | 3 +- src/config-engine.c | 2 +- src/idmef-criteria-string.yac.y | 2 +- src/idmef-criteria.c | 2 +- src/idmef-criterion-value.c | 2 +- src/idmef-data.c | 2 +- src/idmef-message-read.c | 4 +- src/idmef-message-write.c | 4 +- src/idmef-message.c | 2 +- src/idmef-object-value.c | 2 +- src/idmef-object.c | 2 +- src/idmef-time.c | 2 +- src/idmef-tree-print.c | 2 +- src/idmef-tree-to-string.c | 2 +- src/idmef-tree-wrap.c | 68 ++++++++++---------- src/idmef-type.c | 2 +- src/idmef-util.c | 2 +- src/idmef-value-object.c | 2 +- src/idmef-value-type.c | 2 +- src/idmef-value.c | 2 +- .../GenerateIDMEFMessageReadC.pm | 2 +- .../GenerateIDMEFMessageWriteC.pm | 2 +- src/idmef-wrappers-gen/GenerateIDMEFTreeWrapC.pm | 2 +- src/include/Makefile.am | 1 + src/include/common.h | 2 +- src/include/extract.h | 2 +- src/include/idmef-tree.h | 2 +- src/include/idmef.h | 2 +- src/include/prelude-ident.h | 2 +- src/include/prelude-io.h | 2 +- src/ntp.c | 2 +- src/prelude-async.c | 2 +- src/prelude-connection-mgr.c | 2 +- src/prelude-connection.c | 2 +- src/prelude-getopt.c | 2 +- src/prelude-ident.c | 2 +- src/prelude-inet.c | 2 +- src/prelude-io.c | 2 +- src/prelude-message-buffered.c | 2 +- src/prelude-message.c | 2 +- src/prelude-plugin.c | 2 +- 43 files changed, 79 insertions(+), 77 deletions(-) commit 61d12df9378886be50055dfab76f87e1e6b0cb55 Author: Yoann Vandoorselaere Date: Thu Sep 23 14:31:57 2004 +0000 Included autoconf macro from Rob Holland , this macro will generate an inttypes.h file suited for the architecture we're installing on. This is needed for architecture not including stdint.h or inttypes.h, as well as the PRIxxx SCNxxx macros. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@4069 09c5ec92-17d4-0310-903a-819935f44dba autogen.sh | 2 +- configure.in | 3 + m4/ax_create_stdint_h.m4 | 725 ++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 729 insertions(+), 1 deletions(-) commit 5c5085a133831ebd122c76618c188567637918c0 Author: Yoann Vandoorselaere Date: Mon Sep 20 16:02:43 2004 +0000 Fix format string when printing 64 bits integer on 64 bit system. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@4066 09c5ec92-17d4-0310-903a-819935f44dba bindings/libprelude.i | 4 +- bindings/perl/Prelude.c |11389 ++++++++++++++++++-------------------------- bindings/python/_prelude.c | 286 +- 3 files changed, 4775 insertions(+), 6904 deletions(-) commit 9084ece886d25c82af6594c9a0f6bdb64a820042 Author: Yoann Vandoorselaere Date: Mon Sep 20 15:10:21 2004 +0000 Fix format string when printing 64 bits integer on 64 bit system. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@4061 09c5ec92-17d4-0310-903a-819935f44dba prelude-adduser/prelude-adduser.c | 8 ++++---- prelude-adduser/tls-register.c | 4 ++-- src/client-ident.c | 3 +-- src/idmef-tree-print.c | 12 +++++++----- src/idmef-tree-to-string.c | 11 ++++++----- src/idmef-value-type.c | 16 ++++++++-------- src/idmef-wrappers-gen/GenerateIDMEFTreePrintC.pm | 10 ++++++---- .../GenerateIDMEFTreeToStringC.pm | 9 +++++---- 8 files changed, 39 insertions(+), 34 deletions(-) commit 681c423c7a6505514570db888c7ec98927b1bc59 Author: Yoann Vandoorselaere Date: Mon Sep 20 14:50:53 2004 +0000 Fix read failure in case we get EAGAIN, which is not handled anymore by prelude-io.c directly. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@4060 09c5ec92-17d4-0310-903a-819935f44dba src/prelude-message.c | 7 +++++++ 1 files changed, 7 insertions(+), 0 deletions(-) commit 019334343220e74dfe908e924d7edb213888863d Author: Yoann Vandoorselaere Date: Mon Sep 20 14:05:09 2004 +0000 Fix a NULL pointer dereference happening with certain type of failover. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@4059 09c5ec92-17d4-0310-903a-819935f44dba src/prelude-connection-mgr.c | 15 ++++++++------- 1 files changed, 8 insertions(+), 7 deletions(-) commit 3897ec2c45f33297981f0cc450460149bd42e93e Author: Yoann Vandoorselaere Date: Sun Sep 19 23:38:24 2004 +0000 New pthread detection mechanism covering more architectures. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@4057 09c5ec92-17d4-0310-903a-819935f44dba acinclude.m4 | 193 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ configure.in | 56 +--------------- src/Makefile.am | 6 +- 3 files changed, 200 insertions(+), 55 deletions(-) commit 9bcbb168f81446c0ef64be684ba580c435a50616 Author: Yoann Vandoorselaere Date: Sun Sep 19 17:07:25 2004 +0000 Fix socklen_t warning. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@4050 09c5ec92-17d4-0310-903a-819935f44dba prelude-adduser/server.c | 4 +++- 1 files changed, 3 insertions(+), 1 deletions(-) commit 7ad3c84d5bae6d45fb7062a0996b4e9870832d6b Author: Yoann Vandoorselaere Date: Sun Sep 19 16:32:36 2004 +0000 slight correction for make dist. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@4041 09c5ec92-17d4-0310-903a-819935f44dba Makefile.am | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) commit 6f35664e76d40311460c58b99198a4bac485f0b1 Author: Nicolas Delon Date: Sun Sep 19 09:27:04 2004 +0000 bug fix git-svn-id: file:///home/yoann/SVN/trunk/libprelude@4038 09c5ec92-17d4-0310-903a-819935f44dba bindings/python/prelude.py | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) commit 6e81ead1ecec8f8ebbc28a1aa3cb4c7029a5cf70 Author: Yoann Vandoorselaere Date: Sat Sep 18 20:44:12 2004 +0000 Link with all library libprelude is dependant uppon, to avoid portability problem on some platform like AIX. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@4037 09c5ec92-17d4-0310-903a-819935f44dba src/Makefile.am | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) commit c9b6a751d9f3523e3f56fe04960a3acaf3bde410 Author: Yoann Vandoorselaere Date: Sat Sep 18 19:08:41 2004 +0000 Include libpthread.a in the pthread library search. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@4036 09c5ec92-17d4-0310-903a-819935f44dba configure.in | 1 + 1 files changed, 1 insertions(+), 0 deletions(-) commit 346638b9c13c83fb32e8406b2d98acc7b06bed95 Author: Nicolas Delon Date: Sat Sep 18 17:35:43 2004 +0000 try to be compatible with non-GNU yacc (it need to be fully tested) git-svn-id: file:///home/yoann/SVN/trunk/libprelude@4035 09c5ec92-17d4-0310-903a-819935f44dba src/idmef-criteria-string.yac.y | 29 +++++++++++------------------ 1 files changed, 11 insertions(+), 18 deletions(-) commit b24916792d35ff0fdac469166bb5d2fc8cade7c7 Author: Yoann Vandoorselaere Date: Thu Sep 16 19:20:25 2004 +0000 Link with GnuTLS directly in order to build on platform where a shared library must be entirely self-contained. Use the -no-undefined libtool link option. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@4033 09c5ec92-17d4-0310-903a-819935f44dba src/Makefile.am | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) commit d7276d8f1c8a0409e66cb926d1923b2ffefaef03 Author: Yoann Vandoorselaere Date: Thu Sep 16 19:16:15 2004 +0000 Remove un-needed export-dynamic link option. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@4032 09c5ec92-17d4-0310-903a-819935f44dba prelude-adduser/Makefile.am | 1 - 1 files changed, 0 insertions(+), 1 deletions(-) commit f4b0e9d4ee3f8ae59a591c61ecb47f1251f33fdf Author: Yoann Vandoorselaere Date: Sun Sep 12 16:16:00 2004 +0000 Make this C99 compliant. Stop using GNU extention. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@4031 09c5ec92-17d4-0310-903a-819935f44dba src/include/idmef-util.h | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) commit 0de1aeb963ee998c8565d4fe17f76cb4f29aac54 Author: Yoann Vandoorselaere Date: Sun Sep 12 16:15:21 2004 +0000 Make this C99 compliant. Stop using GNU extention. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@4030 09c5ec92-17d4-0310-903a-819935f44dba src/include/prelude-log.h | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) commit 322835683455317232b68a30f1b8999abb1806dc Author: Nicolas Delon Date: Tue Aug 3 08:40:19 2004 +0000 regenerate bindings with swig 1.3.19, swig > 1.3.19 break the bindings git-svn-id: file:///home/yoann/SVN/trunk/libprelude@4022 09c5ec92-17d4-0310-903a-819935f44dba bindings/perl/Prelude.c |11321 ++++++++++++++++++++++++++------------------ bindings/python/_prelude.c | 288 +- 2 files changed, 6871 insertions(+), 4738 deletions(-) commit 8cc2d76f4d655304dd893e8f0d31f90670583398 Author: Nicolas Delon Date: Thu Jul 29 21:47:34 2004 +0000 support for destroy hook flag git-svn-id: file:///home/yoann/SVN/trunk/libprelude@4020 09c5ec92-17d4-0310-903a-819935f44dba bindings/python/prelude.py | 1 + 1 files changed, 1 insertions(+), 0 deletions(-) commit c600e63060de644ae4b9b67a1dcf47937bdb1a8f Author: Yoann Vandoorselaere Date: Fri Jul 23 14:48:26 2004 +0000 Fix a typo: s/dns/dnl/. Thanks to Gene Gomez for pointing this out. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@4012 09c5ec92-17d4-0310-903a-819935f44dba configure.in | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) commit 2c980844d0efcf1eed6980148d4e6e8ff37895f9 Author: Nicolas Delon Date: Fri Jul 23 06:31:18 2004 +0000 remove debug message git-svn-id: file:///home/yoann/SVN/trunk/libprelude@4011 09c5ec92-17d4-0310-903a-819935f44dba src/idmef-criteria.c | 1 - 1 files changed, 0 insertions(+), 1 deletions(-) commit 14661986bdf7ad1960b4b2310bc4a47b1068921b Author: Yoann Vandoorselaere Date: Thu Jul 22 23:19:52 2004 +0000 Handle case where delim is a null byte in prelude_strsep(). git-svn-id: file:///home/yoann/SVN/trunk/libprelude@4009 09c5ec92-17d4-0310-903a-819935f44dba src/common.c | 14 +++++++++----- 1 files changed, 9 insertions(+), 5 deletions(-) commit 2f4fd636b46e1d5776eb5f3a1d0929f9bc12647c Author: Yoann Vandoorselaere Date: Thu Jul 22 23:04:19 2004 +0000 Slight fix to parse_buffer(), don't search for "=" on last strsep to get end of the string, but rather search for "". So that it won't break entry containing an '='. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@4008 09c5ec92-17d4-0310-903a-819935f44dba src/config-engine.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) commit 9c5513e1b7f7e35165c5712f182b1e2dae70b036 Author: Yoann Vandoorselaere Date: Thu Jul 22 22:47:31 2004 +0000 Handle case where the criterion own value is NULL. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@4007 09c5ec92-17d4-0310-903a-819935f44dba src/idmef-criteria.c | 6 +++++- 1 files changed, 5 insertions(+), 1 deletions(-) commit 5e0ec6bc4833062f2f292751ee318e9f0aa2cdea Author: Yoann Vandoorselaere Date: Thu Jul 22 22:30:55 2004 +0000 Fix a double free of the option context, and an invalid pointer dereference. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@4006 09c5ec92-17d4-0310-903a-819935f44dba src/prelude-plugin.c | 12 +++--------- 1 files changed, 3 insertions(+), 9 deletions(-) commit 19133dc9e60766a10faf039df228c537d4e56625 Author: Yoann Vandoorselaere Date: Thu Jul 22 22:19:44 2004 +0000 Implement node-address destruction. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@4005 09c5ec92-17d4-0310-903a-819935f44dba src/prelude-client.c | 11 +++++++++++ 1 files changed, 11 insertions(+), 0 deletions(-) commit 0b1885ed54e749e5f5d4905dd57c4daa79e67adc Author: Nicolas Delon Date: Thu Jul 22 21:46:48 2004 +0000 add destroy method git-svn-id: file:///home/yoann/SVN/trunk/libprelude@4002 09c5ec92-17d4-0310-903a-819935f44dba bindings/python/prelude.py | 8 ++++++++ 1 files changed, 8 insertions(+), 0 deletions(-) commit 0f279b826249198d9777393f8f3be4604c2a9de7 Author: Yoann Vandoorselaere Date: Thu Jul 22 08:44:44 2004 +0000 Indentation fix. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@3997 09c5ec92-17d4-0310-903a-819935f44dba src/prelude-getopt-wide.c | 8 ++++---- 1 files changed, 4 insertions(+), 4 deletions(-) commit 346f3cb0f7ff667154e9044a29d15f85f4e73c64 Author: Yoann Vandoorselaere Date: Thu Jul 22 08:43:49 2004 +0000 Even in case of error while getting the message from the failover, keep trying with the next failover message. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@3996 09c5ec92-17d4-0310-903a-819935f44dba src/prelude-connection-mgr.c | 10 ++++------ 1 files changed, 4 insertions(+), 6 deletions(-) commit c34e2a7ba31fe926b9f4c0c7302831259771d9f7 Author: Yoann Vandoorselaere Date: Thu Jul 22 08:42:31 2004 +0000 In case of failure retrieving a message from the failover, get the raw file size in order to decrease the disk usage count, and increment older_index so that we will skip to next message on next call. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@3995 09c5ec92-17d4-0310-903a-819935f44dba src/prelude-failover.c | 27 ++++++++++++++++++++++----- 1 files changed, 22 insertions(+), 5 deletions(-) commit 86cee637e6c981d33f876acffdd5cb8aaec4bfac Author: Yoann Vandoorselaere Date: Thu Jul 22 08:08:24 2004 +0000 Better error handling. Fix a possible SIGSEGV on invalid message. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@3994 09c5ec92-17d4-0310-903a-819935f44dba src/prelude-failover.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) commit 1f8a823136fc9e76370b76dc03952af42af0ffa2 Author: Yoann Vandoorselaere Date: Wed Jul 21 22:56:56 2004 +0000 Handle commit messages. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@3991 09c5ec92-17d4-0310-903a-819935f44dba src/prelude-getopt-wide.c | 1 + 1 files changed, 1 insertions(+), 0 deletions(-) commit 6684f31d1594246df5ca9dc118b85c0a81471319 Author: Nicolas Delon Date: Wed Jul 21 21:51:56 2004 +0000 add support for commit git-svn-id: file:///home/yoann/SVN/trunk/libprelude@3989 09c5ec92-17d4-0310-903a-819935f44dba bindings/python/prelude.py | 8 ++++++++ 1 files changed, 8 insertions(+), 0 deletions(-) commit 401798c0ff59230cb8bee0258738edbcdd61dcf9 Author: Yoann Vandoorselaere Date: Wed Jul 21 19:24:50 2004 +0000 Revert [3978], this is needed for certain analyzer (prelude-manager is an example). git-svn-id: file:///home/yoann/SVN/trunk/libprelude@3988 09c5ec92-17d4-0310-903a-819935f44dba src/tls-auth.c | 13 +++++++------ 1 files changed, 7 insertions(+), 6 deletions(-) commit 932e50cbdc24d456926f5aeb7607635582ec027c Author: Yoann Vandoorselaere Date: Wed Jul 21 14:02:05 2004 +0000 Remove flex/yacc generated files. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@3983 09c5ec92-17d4-0310-903a-819935f44dba src/idmef-criteria-string.lex.c | 1700 --------------------------------------- src/idmef-criteria-string.yac.c | 1378 ------------------------------- src/idmef-criteria-string.yac.h | 31 - 3 files changed, 0 insertions(+), 3109 deletions(-) commit a3c8c48e09bb9c720c3111b8612f35c761667936 Author: Yoann Vandoorselaere Date: Wed Jul 21 13:59:31 2004 +0000 Include string.h, fix a warning. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@3982 09c5ec92-17d4-0310-903a-819935f44dba src/idmef-criteria-string.lex.l | 5 ++--- 1 files changed, 2 insertions(+), 3 deletions(-) commit 6b784cc1979cef75addcaf59a9033bd3340666a8 Author: Yoann Vandoorselaere Date: Wed Jul 21 13:55:22 2004 +0000 New ignore-startup-error option, to be used primarily by developer who wish to test an analyzer relying on successful, and complete initialisation of the library, even if all check for the analyzer specific files (needed for authentication to the manager) fail. This can be useful for debugging purpose when you are not in an environment where you can register the analyzer. The option is hidden to the user. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@3981 09c5ec92-17d4-0310-903a-819935f44dba src/prelude-client.c | 37 ++++++++++++++++++++++++++----------- 1 files changed, 26 insertions(+), 11 deletions(-) commit 6350d50ab748377404ede1a678b6094ea66004b4 Author: Yoann Vandoorselaere Date: Wed Jul 21 13:50:13 2004 +0000 Add a prelude_bool_t datatype. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@3980 09c5ec92-17d4-0310-903a-819935f44dba src/include/common.h | 10 ++++++++++ 1 files changed, 10 insertions(+), 0 deletions(-) commit 0fa1698c0187fe3683d9100c07f39de978af479f Author: Yoann Vandoorselaere Date: Wed Jul 21 13:16:37 2004 +0000 Fix duplicate error message. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@3979 09c5ec92-17d4-0310-903a-819935f44dba src/tls-auth.c | 11 +++++++---- 1 files changed, 7 insertions(+), 4 deletions(-) commit 44fd61ef9b1d566e4a3f4f4118b609795c4e6f48 Author: Yoann Vandoorselaere Date: Wed Jul 21 12:57:29 2004 +0000 Don't return the credentials struct in case accessing our certitificate filename fail. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@3978 09c5ec92-17d4-0310-903a-819935f44dba src/tls-auth.c | 12 +++++++----- 1 files changed, 7 insertions(+), 5 deletions(-) commit 0e63994ea129ddec3d6e66dd33acc897d927c31e Author: Yoann Vandoorselaere Date: Wed Jul 21 12:00:09 2004 +0000 Trigger an error on invalid error, and continue parsing our option buffer instead of returning immediatly. This fix some problem with option that are called separatly from other because of priority issue. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@3977 09c5ec92-17d4-0310-903a-819935f44dba src/prelude-getopt.c | 3 +-- 1 files changed, 1 insertions(+), 2 deletions(-) commit bc87a127c0179bf0feeaed9b8457a5b6ac51d4e6 Author: Yoann Vandoorselaere Date: Tue Jul 20 12:30:32 2004 +0000 Implement IDMEF_CLASSIFICATION_ORIGIN_OSVDB, as required by IDMEF draft version 12. Fix bug #23 git-svn-id: file:///home/yoann/SVN/trunk/libprelude@3971 09c5ec92-17d4-0310-903a-819935f44dba src/idmef-message-read.c | 2 +- src/idmef-message-write.c | 2 +- src/idmef-tree-print.c | 2 +- src/idmef-tree-to-string.c | 2 +- src/idmef-tree-wrap.c | 8 +++++++- src/include/idmef-message-id.h | 2 +- src/include/idmef-message-read.h | 2 +- src/include/idmef-message-write.h | 2 +- src/include/idmef-tree-data.h | 2 +- src/include/idmef-tree-print.h | 2 +- src/include/idmef-tree-to-string.h | 2 +- src/include/idmef-tree-wrap.h | 5 +++-- src/include/idmef-tree.h | 3 ++- 13 files changed, 22 insertions(+), 14 deletions(-) commit 9d29f2a1be182f3bb323e99b533ae981c960c7a9 Author: Yoann Vandoorselaere Date: Tue Jul 20 12:20:45 2004 +0000 Fix indentation. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@3967 09c5ec92-17d4-0310-903a-819935f44dba src/prelude-getopt-wide.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) commit 764d47df9cec59a54bcbef5aced646a00cd12d38 Author: Yoann Vandoorselaere Date: Tue Jul 20 12:20:20 2004 +0000 Fix minor leak. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@3966 09c5ec92-17d4-0310-903a-819935f44dba src/tls-auth.c | 1 + 1 files changed, 1 insertions(+), 0 deletions(-) commit 3690bd11ec6becb07d67f80edad336a12d548344 Author: Yoann Vandoorselaere Date: Tue Jul 20 12:19:51 2004 +0000 Implement new IDMEF_IMPACT_SEVERITY_INFO severity. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@3965 09c5ec92-17d4-0310-903a-819935f44dba src/idmef-message-read.c | 2 +- src/idmef-message-write.c | 2 +- src/idmef-tree-print.c | 2 +- src/idmef-tree-to-string.c | 2 +- src/idmef-tree-wrap.c | 8 +++++++- src/include/idmef-message-id.h | 2 +- src/include/idmef-message-read.h | 2 +- src/include/idmef-message-write.h | 2 +- src/include/idmef-tree-data.h | 2 +- src/include/idmef-tree-print.h | 2 +- src/include/idmef-tree-to-string.h | 2 +- src/include/idmef-tree-wrap.h | 5 +++-- src/include/idmef-tree.h | 3 ++- 13 files changed, 22 insertions(+), 14 deletions(-) commit 75fcc32056333a684f9a2baf46559ce6221f9ff0 Author: Yoann Vandoorselaere Date: Mon Jul 19 21:33:17 2004 +0000 destroy callback only take 2 args. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@3963 09c5ec92-17d4-0310-903a-819935f44dba bindings/perl/Prelude.c | 9 +++++---- bindings/python/_prelude.c | 7 ++++--- src/include/prelude-getopt.h | 2 +- src/prelude-getopt.c | 6 +++--- src/prelude-plugin.c | 2 +- 5 files changed, 14 insertions(+), 12 deletions(-) commit 174191c658da32afe2dc33892cc90fcf07fbce6d Author: Yoann Vandoorselaere Date: Mon Jul 19 21:20:55 2004 +0000 Only sent the PRELUDE_MSG_VALUE if value is not empty. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@3962 09c5ec92-17d4-0310-903a-819935f44dba src/prelude-getopt.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) commit f37c8d77f44c5f044db40f2b36e95877a50c1949 Author: Yoann Vandoorselaere Date: Mon Jul 19 17:26:43 2004 +0000 Don't exit in case of error, just return it. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@3961 09c5ec92-17d4-0310-903a-819935f44dba src/client-ident.c | 11 ++--------- 1 files changed, 2 insertions(+), 9 deletions(-) commit 73b38b3698679d857865e40b3888daf004243687 Author: Yoann Vandoorselaere Date: Mon Jul 19 17:26:22 2004 +0000 Don't exit in case of error, just return it. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@3960 09c5ec92-17d4-0310-903a-819935f44dba src/prelude-connection.c | 3 +-- 1 files changed, 1 insertions(+), 2 deletions(-) commit 1a00d2f50cf89bc4c205aa9882de6d15e95db0da Author: Yoann Vandoorselaere Date: Mon Jul 19 17:18:09 2004 +0000 More cleanup... git-svn-id: file:///home/yoann/SVN/trunk/libprelude@3959 09c5ec92-17d4-0310-903a-819935f44dba src/prelude-getopt.c | 9 ++------- 1 files changed, 2 insertions(+), 7 deletions(-) commit 7181982aff9dcef6b01d759872942ad928ee2ebb Author: Yoann Vandoorselaere Date: Mon Jul 19 17:16:06 2004 +0000 Re-introduce ALLOW_MULTIPLE_CALL because it's still needed for some stuff. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@3958 09c5ec92-17d4-0310-903a-819935f44dba src/include/prelude-getopt.h | 3 ++- src/prelude-getopt.c | 10 +++------- 2 files changed, 5 insertions(+), 8 deletions(-) commit b7181454f1be823dac017c8dd8fea947c0cd02c7 Author: Yoann Vandoorselaere Date: Mon Jul 19 17:10:41 2004 +0000 Fix call to prelude_option_parse_arguments() for standalone options. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@3957 09c5ec92-17d4-0310-903a-819935f44dba src/prelude-client.c | 12 ++++++------ 1 files changed, 6 insertions(+), 6 deletions(-) commit 47d795f62117d6949fb4227a4b9c0bbd55da7e4a Author: Yoann Vandoorselaere Date: Mon Jul 19 16:22:24 2004 +0000 Implement missing get() function for IDMEF configurable value. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@3956 09c5ec92-17d4-0310-903a-819935f44dba src/prelude-client.c | 109 +++++++++++++++++++++++++++++++++++++++++++++---- 1 files changed, 100 insertions(+), 9 deletions(-) commit e88c3e62f1b4b9fc050e0ff0a08bfe408d6e7cff Author: Yoann Vandoorselaere Date: Mon Jul 19 15:58:52 2004 +0000 Some more option description. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@3955 09c5ec92-17d4-0310-903a-819935f44dba src/prelude-client.c | 19 +++++++++++-------- 1 files changed, 11 insertions(+), 8 deletions(-) commit 780e4b934e64cc9d2b05d439842fd90b06150b25 Author: Yoann Vandoorselaere Date: Mon Jul 19 15:42:06 2004 +0000 Fix Python wrapper for administrative console. Remove debugging spew in the new code. Some function renaming. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@3954 09c5ec92-17d4-0310-903a-819935f44dba bindings/python/prelude.py | 2 +- src/prelude-getopt-wide.c | 15 ++++----------- src/prelude-getopt.c | 29 +++++++++++++++++------------ 3 files changed, 22 insertions(+), 24 deletions(-) commit 6d700b9f46470d2fef3a0a68596495defa6b3bdc Author: Yoann Vandoorselaere Date: Mon Jul 19 15:18:08 2004 +0000 Too much change to list. Full featured handling of COMMIT and DESTROY option message. Ability to save the option remotely set in the config file. Much more context checking for safety. All remote method are now implemented. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@3952 09c5ec92-17d4-0310-903a-819935f44dba bindings/perl/Prelude.c |11669 ++++++++++++++++---------------------- bindings/python/_prelude.c | 627 ++- src/include/prelude-getopt.h | 46 +- src/include/prelude-message-id.h | 2 + src/include/prelude-plugin.h | 59 +- src/prelude-client.c | 4 +- src/prelude-getopt-wide.c | 126 +- src/prelude-getopt.c | 316 +- src/prelude-plugin.c | 144 +- 9 files changed, 5667 insertions(+), 7326 deletions(-) commit 6b90ffb5138da3d4019faca7907ed9e2372bcf69 Author: Yoann Vandoorselaere Date: Mon Jul 19 14:49:50 2004 +0000 correctly check for gnutls extra, and use libgnutls-extra-config provided information to compile prelude-adduser. Fix AC_REAL_PATH_GENERIC so that it handle value with '-' characters. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@3951 09c5ec92-17d4-0310-903a-819935f44dba acinclude.m4 | 5 ++--- configure.in | 21 +++++++++++++++++++++ prelude-adduser/Makefile.am | 5 ++--- 3 files changed, 25 insertions(+), 6 deletions(-) commit 7d4da3f8f5cf38512c58860b3410811d77c07b16 Author: Yoann Vandoorselaere Date: Mon Jul 19 14:08:12 2004 +0000 Removed dependencie on deprecated libcrypt. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@3950 09c5ec92-17d4-0310-903a-819935f44dba configure.in | 11 ----------- 1 files changed, 0 insertions(+), 11 deletions(-) commit ac4e57ff5a66c2682d11302f2384b51b6b987bef Author: Yoann Vandoorselaere Date: Mon Jul 19 14:07:05 2004 +0000 Implemented function for deletion of entry or section within the configuration file. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@3949 09c5ec92-17d4-0310-903a-819935f44dba src/config-engine.c | 54 +++++++++++++++++++++++++++++++++++++++++- src/include/config-engine.h | 2 + 2 files changed, 54 insertions(+), 2 deletions(-) commit 228325325afc82d3251c6659e4c34b19fb722c41 Author: Nicolas Delon Date: Mon Jul 19 12:29:12 2004 +0000 fix bad regexp that did not match instance names with number git-svn-id: file:///home/yoann/SVN/trunk/libprelude@3948 09c5ec92-17d4-0310-903a-819935f44dba bindings/python/prelude.py | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) commit cd1da66868e748e65faa498ebd346bf8a3a2b7a7 Author: Nicolas Delon Date: Sun Jul 18 22:17:09 2004 +0000 * src/prelude-client.c: bug fix: forgot to destroy heartbeat timer * bindings/python/_prelude.c: * bindings/python/prelude.py: * bindings/libprelude.i: fixes for the python binding of admin stuff git-svn-id: file:///home/yoann/SVN/trunk/libprelude@3945 09c5ec92-17d4-0310-903a-819935f44dba bindings/libprelude.i | 7 +- bindings/perl/Prelude.c | 170 +++++- bindings/python/_prelude.c | 157 +++++- bindings/python/prelude.py | 56 ++- src/idmef-criteria-string.lex.c | 1329 +++++++++++++++++---------------------- src/idmef-criteria-string.yac.c | 1251 +++++++++++++++++-------------------- src/idmef-criteria-string.yac.h | 90 +-- src/prelude-client.c | 2 + 8 files changed, 1538 insertions(+), 1524 deletions(-) commit ca0461b563ce5c16990b44bd7f404c0858b78973 Author: Yoann Vandoorselaere Date: Sat Jul 17 13:23:37 2004 +0000 * prelude-client.c (generate_md5sum): check that the file is a regular file. (fill_client_infos): try to get the md5sum from the prelude_get_file_name_and_path() returned information. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@3944 09c5ec92-17d4-0310-903a-819935f44dba src/prelude-client.c | 20 ++++++++++---------- 1 files changed, 10 insertions(+), 10 deletions(-) commit aac91d5d61ca273c0c171a4799088752f73bb246 Author: Yoann Vandoorselaere Date: Sat Jul 17 13:04:50 2004 +0000 Oops, free the value after using it, not otherwise... git-svn-id: file:///home/yoann/SVN/trunk/libprelude@3943 09c5ec92-17d4-0310-903a-819935f44dba src/common.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) commit 1bc18c7d389b59bd5abc948fe69f645409c90e30 Author: Yoann Vandoorselaere Date: Sat Jul 17 11:11:32 2004 +0000 cleanup default configuration file git-svn-id: file:///home/yoann/SVN/trunk/libprelude@3941 09c5ec92-17d4-0310-903a-819935f44dba global.conf.in | 14 +++++++------- 1 files changed, 7 insertions(+), 7 deletions(-) commit 28112bfe5b79f752567a9a0f3f40bff12ef95351 Author: Yoann Vandoorselaere Date: Wed Jul 14 10:46:27 2004 +0000 Set default insertion point to be after include, so that configuration modification don't get overwritten by include definition on restart. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@3932 09c5ec92-17d4-0310-903a-819935f44dba src/config-engine.c | 33 ++++++++++++++++++++------------- 1 files changed, 20 insertions(+), 13 deletions(-) commit b413585c88c44bb7441e4958a2f6970c16da3059 Author: Yoann Vandoorselaere Date: Wed Jul 14 00:53:44 2004 +0000 * prelude-getopt-wide.c (parse_request): call config_save_value(). (config_save_value): implemented. Save provided value in the configuration file. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@3931 09c5ec92-17d4-0310-903a-819935f44dba src/prelude-getopt-wide.c | 62 ++++++++++++++++++++++++++++++++++++-------- 1 files changed, 50 insertions(+), 12 deletions(-) commit df23d7ad55e6d7c5e973bd65a6466be640ef8208 Author: Yoann Vandoorselaere Date: Wed Jul 14 00:53:01 2004 +0000 * prelude-client.c: ability to modify IDMEF parameters from the admin console. Use instance to handle multiple node-address parents. Implemented a function used to retrieve analyzer configuration file. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@3930 09c5ec92-17d4-0310-903a-819935f44dba src/include/prelude-client.h | 2 + src/prelude-client.c | 65 +++++++++++++++++++---------------------- 2 files changed, 32 insertions(+), 35 deletions(-) commit 018ee8a9379ef99772b2a0127a7e1a75c1ae0739 Author: Yoann Vandoorselaere Date: Wed Jul 14 00:51:09 2004 +0000 * prelude-getopt.c: Fix valgrind leak false positive by moving the list member to the top of the structure. The way the list implementation work make valgrind think the object is lost, when we still have a reference to this object through the offset + address of one of it's member. More work on option instances. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@3929 09c5ec92-17d4-0310-903a-819935f44dba src/prelude-getopt.c | 105 +++++++++++++++++++++++++++++--------------------- 1 files changed, 61 insertions(+), 44 deletions(-) commit 1f1198543d296c62c016c92dbd26356fac92cf61 Author: Yoann Vandoorselaere Date: Wed Jul 14 00:23:57 2004 +0000 Lot of bugfix, primarily for insertion of option in the configuration file. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@3928 09c5ec92-17d4-0310-903a-819935f44dba src/config-engine.c | 142 +++++++++++++++++++++++++++++---------------------- 1 files changed, 81 insertions(+), 61 deletions(-) commit f9a29cef0e6ca22d7426a9fb421b0067d89fd799 Author: Yoann Vandoorselaere Date: Wed Jul 14 00:15:15 2004 +0000 Fix return value. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@3927 09c5ec92-17d4-0310-903a-819935f44dba src/prelude-plugin.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) commit 86b36dae98589db63d6e41e29a55c3990b283032 Author: Yoann Vandoorselaere Date: Tue Jul 13 21:47:10 2004 +0000 Fix file descriptor leak. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@3924 09c5ec92-17d4-0310-903a-819935f44dba src/client-ident.c | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) commit 23cab212d35487f02e3a94ec8f8a5dbf2713ec3a Author: Yoann Vandoorselaere Date: Tue Jul 13 21:46:41 2004 +0000 Include a negative error member in every IDMEF enumeration, so that the enum is signed and we can check for error. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@3923 09c5ec92-17d4-0310-903a-819935f44dba src/idmef-message-read.c | 2 +- src/idmef-message-write.c | 2 +- src/idmef-tree-print.c | 2 +- src/idmef-tree-to-string.c | 2 +- src/idmef-tree-wrap.c | 2 +- src/include/idmef-message-id.h | 2 +- src/include/idmef-message-read.h | 2 +- src/include/idmef-message-write.h | 2 +- src/include/idmef-tree-data.h | 2 +- src/include/idmef-tree-print.h | 2 +- src/include/idmef-tree-to-string.h | 2 +- src/include/idmef-tree-wrap.h | 23 ++++- src/include/idmef-tree.h | 217 +++++++++++++++++++---------------- 13 files changed, 150 insertions(+), 112 deletions(-) commit 4dd62678031d4436c32f434b083dd6fc0ab650b4 Author: Yoann Vandoorselaere Date: Tue Jul 13 21:41:29 2004 +0000 Fix valgrind leak false positive by moving the list member to the top of the structure. The way the list implementation work make valgrind think the object is lost, when we still have a reference to this object through the offset + address of one of it's member. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@3922 09c5ec92-17d4-0310-903a-819935f44dba src/prelude-plugin.c | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) commit 37e853900867ec6213432eea94c3445fff754433 Author: Yoann Vandoorselaere Date: Sun Jul 11 23:07:18 2004 +0000 * prelude-getopt-wide.c (read_option_list): set has_arg within prelude-option. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@3921 09c5ec92-17d4-0310-903a-819935f44dba src/prelude-getopt-wide.c | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) commit af40cdfbe138dff6a1b3159c48e96113f59fe4d6 Author: Yoann Vandoorselaere Date: Sun Jul 11 17:16:36 2004 +0000 Port to prelude-getopt API change. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@3920 09c5ec92-17d4-0310-903a-819935f44dba prelude-adduser/prelude-adduser.c | 8 ++++---- 1 files changed, 4 insertions(+), 4 deletions(-) commit a6f115256719a7ecd62379d045e00916d76049b9 Author: Yoann Vandoorselaere Date: Sun Jul 11 17:16:20 2004 +0000 remove deprecated prelude_optlist_t. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@3919 09c5ec92-17d4-0310-903a-819935f44dba src/prelude-getopt.c | 130 +++++++++++++++++++------------------------------- 1 files changed, 50 insertions(+), 80 deletions(-) commit aa84bd68d87832a30d0c20877d3960f49f3a3183 Author: Nicolas Delon Date: Sun Jul 11 16:46:00 2004 +0000 bind admin console functionnality in python git-svn-id: file:///home/yoann/SVN/trunk/libprelude@3918 09c5ec92-17d4-0310-903a-819935f44dba bindings/libprelude.i | 66 +- bindings/perl/Prelude.c | 2600 +++++++++++++++++++++++++++++++++++-- bindings/python/_prelude.c | 1845 +++++++++++++++++++++++++-- bindings/python/prelude.py | 116 ++- src/include/prelude-getopt-wide.h | 5 - src/include/prelude-getopt.h | 6 +- src/prelude-client.c | 6 +- src/prelude-getopt.c | 14 + 8 files changed, 4459 insertions(+), 199 deletions(-) commit 12d50f7f9fc70425b885eaaca325a24f83f7b86f Author: Yoann Vandoorselaere Date: Sun Jul 11 14:26:06 2004 +0000 Fix crash occruing when adding a test for a NULL value. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@3917 09c5ec92-17d4-0310-903a-819935f44dba src/idmef-criteria.c | 9 ++++----- 1 files changed, 4 insertions(+), 5 deletions(-) commit 14799242fea975f3e6c1ff92e7ea9cdad72915db Author: Yoann Vandoorselaere Date: Sun Jul 11 14:15:35 2004 +0000 reset errno to 0 after logging. Don't log the error if errno is 0. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@3916 09c5ec92-17d4-0310-903a-819935f44dba src/prelude-log.c | 25 +++++++++++++++++++------ 1 files changed, 19 insertions(+), 6 deletions(-) commit cef512f729f0666c906f28a1bdd99d7bc1e42e14 Author: Yoann Vandoorselaere Date: Sun Jul 11 14:12:36 2004 +0000 Fix error handling in case where the connection break while we just reconnected and are flushing the failover. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@3915 09c5ec92-17d4-0310-903a-819935f44dba src/prelude-connection-mgr.c | 60 ++++++++++++++++++++--------------------- 1 files changed, 29 insertions(+), 31 deletions(-) commit c78fff02019d816e4a622f697861664c18f73b10 Author: Yoann Vandoorselaere Date: Sun Jul 11 01:16:04 2004 +0000 Fix argument parsing when the value contain a dot. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@3914 09c5ec92-17d4-0310-903a-819935f44dba src/prelude-getopt-wide.c | 23 +++++++++++------------ 1 files changed, 11 insertions(+), 12 deletions(-) commit 67a87789ffee688916eb3477e40df25ec28bded0 Author: Yoann Vandoorselaere Date: Sat Jul 10 23:29:05 2004 +0000 * tls-auth.c (tls_auth_connection):(read_auth_result): new function, read authentication result sent by the manager. This is needed because the TLS handshake might not fail, but the certificate verification could. In this case, we would not notice the connection closure. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@3913 09c5ec92-17d4-0310-903a-819935f44dba src/tls-auth.c | 47 +++++++++++++++++++++++++++++++++++++++++++---- 1 files changed, 43 insertions(+), 4 deletions(-) commit c47397609dda2d15e9416856165059eb5d8ca4ea Author: Yoann Vandoorselaere Date: Sat Jul 10 23:13:28 2004 +0000 Implemented handling of non blocking write in prelude-message. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@3909 09c5ec92-17d4-0310-903a-819935f44dba src/prelude-message.c | 42 +++++++++++++++++++++++++----------------- 1 files changed, 25 insertions(+), 17 deletions(-) commit 1be41454f2993b2fe3185082bd3b522901cdbf89 Author: Yoann Vandoorselaere Date: Sat Jul 10 23:11:13 2004 +0000 Fix duplicate error checking. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@3908 09c5ec92-17d4-0310-903a-819935f44dba src/prelude-connection.c | 3 --- 1 files changed, 0 insertions(+), 3 deletions(-) commit 1c5e4945397bcf953098ed06d877b93ab87c597c Author: Yoann Vandoorselaere Date: Sat Jul 10 23:09:26 2004 +0000 Fix a bug introduced in the latest 'instance' rework, where plugin with activation option settable both from prelude-getopt and the outside would not work. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@3907 09c5ec92-17d4-0310-903a-819935f44dba src/prelude-plugin.c | 11 ++++++++++- 1 files changed, 10 insertions(+), 1 deletions(-) commit 73e41646665200503731f1e53c28c09352354076 Author: Yoann Vandoorselaere Date: Sat Jul 10 23:05:01 2004 +0000 Don't handle EAGAIN on write() anymore, as we want the possibility to use this for non blocking operation. Check for TLS alert as well. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@3906 09c5ec92-17d4-0310-903a-819935f44dba src/prelude-io.c | 29 +++++++++++++++++++++++++---- 1 files changed, 25 insertions(+), 4 deletions(-) commit 86660f187aa0a4f552ddd41c492a9305472ea0b4 Author: Yoann Vandoorselaere Date: Sat Jul 10 16:34:27 2004 +0000 prelude_get_file_name_and_path() should work for most of the case now. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@3905 09c5ec92-17d4-0310-903a-819935f44dba src/common.c | 43 +++++++++++++++++++++++++------------------ 1 files changed, 25 insertions(+), 18 deletions(-) commit dceaad4ca22d82810d34a9bbba5aee1af11ea7d6 Author: Yoann Vandoorselaere Date: Sat Jul 10 16:08:17 2004 +0000 * prelude-failover.c (prelude_failover_new): fix directory permission. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@3904 09c5ec92-17d4-0310-903a-819935f44dba src/prelude-failover.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) commit 45f1fb4207033ef553b7ee1ae40ae73a1b73e804 Author: Yoann Vandoorselaere Date: Sat Jul 10 09:40:36 2004 +0000 git-svn-id: file:///home/yoann/SVN/trunk/libprelude@3901 09c5ec92-17d4-0310-903a-819935f44dba src/include/prelude-message-id.h | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) commit 98c456e2af9d47f69bcd43e65da438f295a175bd Author: Yoann Vandoorselaere Date: Sat Jul 10 09:39:15 2004 +0000 Send option flags. The frontend might want to know wether a given option have multiple instance git-svn-id: file:///home/yoann/SVN/trunk/libprelude@3900 09c5ec92-17d4-0310-903a-819935f44dba src/prelude-getopt-wide.c | 14 +++++++++++--- src/prelude-getopt.c | 1 + 2 files changed, 12 insertions(+), 3 deletions(-) commit 127cb227c355edc74fe0c27e2c540cf8f5b2c503 Author: Yoann Vandoorselaere Date: Fri Jul 9 14:20:18 2004 +0000 fix an invalid pointer dereference git-svn-id: file:///home/yoann/SVN/trunk/libprelude@3897 09c5ec92-17d4-0310-903a-819935f44dba src/prelude-getopt.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) commit 365c8c1ff094a03918a9bd3b803d9ab0e029990d Author: Yoann Vandoorselaere Date: Fri Jul 9 13:57:30 2004 +0000 remove debugging spew git-svn-id: file:///home/yoann/SVN/trunk/libprelude@3893 09c5ec92-17d4-0310-903a-819935f44dba src/prelude-io.c | 2 -- 1 files changed, 0 insertions(+), 2 deletions(-) commit 07a1c631f72aeb24f5d0b594f79c9fbe25875d7c Author: Yoann Vandoorselaere Date: Fri Jul 9 13:54:51 2004 +0000 * prelude-getopt.c: move part of the plugin instance handling here. This both simplify the code a lot, avoiding ugly hack in plugin-init.c, and allow the admin console to deal with instance. Finalized the option wide API. Also, make the callback API more sane. * prelude-getopt-wide.c: finalize the option wide API. * prelude-plugin.c: move part of the instance work out of this, as this is now handled through prelude-getopt. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@3892 09c5ec92-17d4-0310-903a-819935f44dba src/include/prelude-getopt-wide.h | 4 + src/include/prelude-getopt.h | 23 ++-- src/include/prelude-message-id.h | 1 + src/include/prelude-plugin.h | 10 +-- src/prelude-client.c | 61 +++++----- src/prelude-getopt-wide.c | 233 +++++++++++++++++++------------------ src/prelude-getopt.c | 234 +++++++++++++++++++++++++++++-------- src/prelude-io.c | 4 +- src/prelude-plugin.c | 192 +++++------------------------- 9 files changed, 387 insertions(+), 375 deletions(-) commit d400386948a22f92f30b96abcf4b049f64919fe5 Author: Yoann Vandoorselaere Date: Thu Jul 8 10:56:30 2004 +0000 * prelude-getopt.c: make prelude_option_t a PRELUDE_LINKED_OBJECT. (prelude_option_get_optlist): implemented. Return option own optlist. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@3890 09c5ec92-17d4-0310-903a-819935f44dba src/include/prelude-getopt.h | 1 + src/prelude-getopt.c | 12 ++++++++++-- 2 files changed, 11 insertions(+), 2 deletions(-) commit 85fe83264906e3fa31fd217b6adc374b450b7a3d Author: Yoann Vandoorselaere Date: Thu Jul 8 08:38:32 2004 +0000 Fix leak on error return git-svn-id: file:///home/yoann/SVN/trunk/libprelude@3887 09c5ec92-17d4-0310-903a-819935f44dba src/prelude-failover.c | 6 ++---- 1 files changed, 2 insertions(+), 4 deletions(-) commit 0c0df1062854a6dafaab024fada9199e41e4f5e1 Author: Yoann Vandoorselaere Date: Thu Jul 8 08:37:50 2004 +0000 * prelude-getopt-wide.c (read_option_request): no need to dup the message buffer. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@3886 09c5ec92-17d4-0310-903a-819935f44dba src/prelude-getopt-wide.c | 10 +++++----- 1 files changed, 5 insertions(+), 5 deletions(-) commit 5408b3b2897564d3ca857186d07a44cf78780a22 Author: Yoann Vandoorselaere Date: Thu Jul 8 08:37:04 2004 +0000 * tls-util.c (tls_certificates_load): unmap the TLS file. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@3885 09c5ec92-17d4-0310-903a-819935f44dba src/tls-util.c | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) commit 48000437ef6e937e164292131097ecde08450ec7 Author: Yoann Vandoorselaere Date: Thu Jul 8 07:41:26 2004 +0000 * common.c (prelude_get_file_name_and_path): use find_absolute_path() if needed. (find_absolute_path): implemented, try to find our binary in the PATH environement variable. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@3884 09c5ec92-17d4-0310-903a-819935f44dba src/common.c | 54 ++++++++++++++++++++++++++++++++++++++++++++---------- 1 files changed, 44 insertions(+), 10 deletions(-) commit f3282a38515d447bf49d0adb77a5754a31d774de Author: Yoann Vandoorselaere Date: Wed Jul 7 20:33:45 2004 +0000 Fix SEGV in case the analyzer is not started with an absolute path. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@3883 09c5ec92-17d4-0310-903a-819935f44dba src/prelude-client.c | 5 +++-- 1 files changed, 3 insertions(+), 2 deletions(-) commit 875e85778017e426959fd1612a12bf24c16a4474 Author: Yoann Vandoorselaere Date: Wed Jul 7 20:03:29 2004 +0000 Remove broken inclusion. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@3882 09c5ec92-17d4-0310-903a-819935f44dba src/prelude-connection-mgr.c | 1 - 1 files changed, 0 insertions(+), 1 deletions(-) commit 92171f569292d2182f8b7db227cf6b1697fcea8b Author: Yoann Vandoorselaere Date: Wed Jul 7 19:26:36 2004 +0000 * prelude-getopt.c: remove static configuration message generation. (prelude_option_invoke_get): (prelude_option_invoke_set): take a context argument. (prelude_option_get_value): (prelude_option_set_value): (prelude_option_get_get_callback): (prelude_option_set_get_callback): implemented. (construct_option_msg): dynamically construct the message, including current option value. (prelude_option_wide_send_msg): implemented. construct the wide option message and send it to the specified msgbuf. * prelude-connection-mgr.c (prelude_connection_mgr_add_connection): fix this function, broken by last big prelude-connection-mgr change. (new_connection): only init timer if use_timer is set. (process_request): handle prelude wide option API change. Correct error handling. * prelude-getopt-wide.c: complete API rework. Should be usable by any kind of frontend now. * prelude-connection.c (prelude_connection_set_fd): don't leak the existing fd. (prelude_connection_destroy): only destroy the fd if we own it. (prelude_connection_connect): call prelude_client_ident_send(). Don't send the wide option message here, as this is now done uppon request. * prelude-plugin.c: Implement basic support for get() instance interception. This is not working yet. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@3880 09c5ec92-17d4-0310-903a-819935f44dba src/include/prelude-client.h | 2 + src/include/prelude-getopt-wide.h | 19 ++-- src/include/prelude-getopt.h | 18 +++- src/include/prelude-message-id.h | 14 +-- src/prelude-connection-mgr.c | 57 +++++---- src/prelude-connection.c | 28 ++--- src/prelude-getopt-wide.c | 233 +++++++++++++++++-------------------- src/prelude-getopt.c | 122 ++++++++++---------- src/prelude-plugin.c | 25 +++- 9 files changed, 262 insertions(+), 256 deletions(-) commit 217600f8719314555d6e1473fc40226cf6a85c01 Author: Yoann Vandoorselaere Date: Wed Jul 7 19:10:23 2004 +0000 When recycling a prelude_msg_t, only reset the read index if this prelude_msg_t is used for reading. Fix an invalid free. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@3879 09c5ec92-17d4-0310-903a-819935f44dba src/prelude-message.c | 4 +++- 1 files changed, 3 insertions(+), 1 deletions(-) commit 40088c8fe0a509d4f6074792227bbd01bf6795b5 Author: Yoann Vandoorselaere Date: Wed Jul 7 19:05:40 2004 +0000 New prelude_client_set_manager_list(). This was the missing piece to allow the client to get complete control over how it want to handle send/recv to the server. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@3878 09c5ec92-17d4-0310-903a-819935f44dba src/prelude-client.c | 9 ++++++++- 1 files changed, 8 insertions(+), 1 deletions(-) commit 68746768c89a77bf50e2722f138900182118ee25 Author: Yoann Vandoorselaere Date: Wed Jul 7 17:17:29 2004 +0000 minor macro fix git-svn-id: file:///home/yoann/SVN/trunk/libprelude@3877 09c5ec92-17d4-0310-903a-819935f44dba src/include/idmef-string.h | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) commit 04cfda974d7e4fa168bcfc540b9d4f4fce1a8acc Author: Yoann Vandoorselaere Date: Wed Jul 7 17:16:44 2004 +0000 Make expire a 32 bit integer... 16 might be too short in some case. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@3876 09c5ec92-17d4-0310-903a-819935f44dba src/include/timer.h | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) commit 6a29c6ab9c9c5bb72e267eb087454893acb2a112 Author: Yoann Vandoorselaere Date: Wed Jul 7 17:14:01 2004 +0000 * prelude-client.c (prelude_client_init): (fill_client_infos): handle case where argv is NULL. (get_heartbeat_interval): implemented. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@3875 09c5ec92-17d4-0310-903a-819935f44dba src/prelude-client.c | 22 +++++++++++++++++++--- 1 files changed, 19 insertions(+), 3 deletions(-) commit f5c1b9e9bbfb5384df6a7caa26e99450f9747c02 Author: Yoann Vandoorselaere Date: Wed Jul 7 17:10:50 2004 +0000 Implement refcount support for idmef_message_t git-svn-id: file:///home/yoann/SVN/trunk/libprelude@3874 09c5ec92-17d4-0310-903a-819935f44dba src/idmef-message-read.c | 2 +- src/idmef-message-write.c | 2 +- src/idmef-message.c | 7 +++++++ src/idmef-tree-print.c | 2 +- src/idmef-tree-to-string.c | 2 +- src/idmef-tree-wrap.c | 10 +++++++++- src/include/idmef-message-id.h | 2 +- src/include/idmef-message-read.h | 2 +- src/include/idmef-message-write.h | 2 +- src/include/idmef-tree-data.h | 2 +- src/include/idmef-tree-print.h | 2 +- src/include/idmef-tree-to-string.h | 2 +- src/include/idmef-tree-wrap.h | 4 +++- src/include/idmef-tree.h | 3 ++- 14 files changed, 31 insertions(+), 13 deletions(-) commit db1649a28e7b81d8b0376d671aa50573628f5bc9 Author: Yoann Vandoorselaere Date: Wed Jul 7 05:19:14 2004 +0000 * prelude-message.c (prelude_msg_is_empty): consider header_index. (prelude_msg_recycle): make this work too to re-read a message. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@3873 09c5ec92-17d4-0310-903a-819935f44dba src/prelude-message.c | 6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-) commit acfb3c245baa9d4e350ea32ecf9d4cffd288dd5d Author: Yoann Vandoorselaere Date: Mon Jul 5 23:47:28 2004 +0000 * prelude-client.c (heartbeat_expire_cb): attach analyzer status, analyzer md5sum, analyzer heartbeat-interval to the heartbeat additional data. Fix bugs #38 and #39. (add_hb_data): new helper function, to add data to an IDMEF heartbeat. (generate_md5sum): new function, generate an md5sum from filename. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@3872 09c5ec92-17d4-0310-903a-819935f44dba src/prelude-client.c | 90 ++++++++++++++++++++++++++++++++++++++++++++++++-- 1 files changed, 87 insertions(+), 3 deletions(-) commit e071d6174d9afff72385456034dd3352e19b41fb Author: Yoann Vandoorselaere Date: Fri Jul 2 13:53:16 2004 +0000 * dev/prelude/svn/trunk/libprelude/prelude-adduser/prelude-adduser.c (register_sensor_ident): fchown the analyzerID file to the client uid & gid. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@3868 09c5ec92-17d4-0310-903a-819935f44dba prelude-adduser/prelude-adduser.c | 4 ++++ 1 files changed, 4 insertions(+), 0 deletions(-) commit 667e1278bd00d5d337bfccdcf44330e71f219dcb Author: Yoann Vandoorselaere Date: Tue Jun 29 14:44:24 2004 +0000 git-svn-id: file:///home/yoann/SVN/trunk/libprelude@3866 09c5ec92-17d4-0310-903a-819935f44dba src/include/common.h | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) commit b5b3d43bf1658173fd143ccf59633b7685321c41 Author: Yoann Vandoorselaere Date: Tue Jun 29 14:42:43 2004 +0000 * idmef-time.c (my_timegm): use putenv instead of setenv/unsetenv which are not available under solaris. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@3865 09c5ec92-17d4-0310-903a-819935f44dba src/idmef-time.c | 25 +++++++++++++------------ 1 files changed, 13 insertions(+), 12 deletions(-) commit 5f7e3a3329d43422b1176c85970dd646ffda309a Author: Yoann Vandoorselaere Date: Tue Jun 29 14:35:13 2004 +0000 * common.c (prelude_strsep): implemented. strsep() isn't portable. * config-engine.c (parse_buffer): use prelude_strsep(). git-svn-id: file:///home/yoann/SVN/trunk/libprelude@3864 09c5ec92-17d4-0310-903a-819935f44dba src/common.c | 23 +++++++++++++++++++++++ src/config-engine.c | 4 ++-- 2 files changed, 25 insertions(+), 2 deletions(-) commit 4ad7bae9dc74495ed31c7a2ca4f0f4392fb5f41c Author: Yoann Vandoorselaere Date: Tue Jun 29 14:01:21 2004 +0000 oops. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@3863 09c5ec92-17d4-0310-903a-819935f44dba src/include/prelude-inet.h | 8 ++++---- 1 files changed, 4 insertions(+), 4 deletions(-) commit 36f82ecff5dcca992adb7df087b5eb414ca9b06b Author: Yoann Vandoorselaere Date: Tue Jun 29 13:55:42 2004 +0000 Don't include config.h here, use gcc defined CFLAGS. Define AI_CANONNAME if it is undefined and MISSING_GETADDRINFO is set. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@3862 09c5ec92-17d4-0310-903a-819935f44dba src/include/prelude-inet.h | 10 +++++++--- 1 files changed, 7 insertions(+), 3 deletions(-) commit f597a6b800a97160f903039f9d43c1960734a24f Author: Yoann Vandoorselaere Date: Tue Jun 29 13:34:54 2004 +0000 Fix a compilation issue git-svn-id: file:///home/yoann/SVN/trunk/libprelude@3861 09c5ec92-17d4-0310-903a-819935f44dba src/prelude-failover.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) commit ca80d92c06606a894e273f2f84c12910701f9cfe Author: Yoann Vandoorselaere Date: Tue Jun 29 13:26:56 2004 +0000 re-ordered include file. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@3860 09c5ec92-17d4-0310-903a-819935f44dba src/prelude-io.c | 6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-) commit 6ab7b6e804d984990dbac40625f9b13f500cd417 Author: Yoann Vandoorselaere Date: Tue Jun 29 13:16:35 2004 +0000 * configure.in: check wether is available. * prelude-io.c: include if available. (sys_pending): revert to using FIONREAD, not TIOCINQ. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@3858 09c5ec92-17d4-0310-903a-819935f44dba configure.in | 4 ++++ src/prelude-io.c | 15 +++++++-------- 2 files changed, 11 insertions(+), 8 deletions(-) commit deb6a0c0ec88e076dc308692d5f42d886450adc5 Author: Yoann Vandoorselaere Date: Tue Jun 29 13:05:19 2004 +0000 * timer.c (timer_unlock_critical_region): don't lock/unlock the mutex directly, rather, do it through timer_lock_list() / timer_unlock_list() so that we don't try to lock the mutex if we're not using asynchronous timer. * prelude-async.c (get_elapsed_time): async_flags is 0 by default. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@3857 09c5ec92-17d4-0310-903a-819935f44dba src/include/prelude-client.h | 2 -- 1 files changed, 0 insertions(+), 2 deletions(-) commit 4935efb2eadfc2276497affd2d5bf1b080206c51 Author: Yoann Vandoorselaere Date: Tue Jun 29 12:40:33 2004 +0000 * dev/prelude/svn/trunk/libprelude/configure.in: set CFLAGS before calling AC_CHECK_HEADER(). git-svn-id: file:///home/yoann/SVN/trunk/libprelude@3856 09c5ec92-17d4-0310-903a-819935f44dba configure.in | 4 ++++ prelude-adduser/Makefile.am | 2 +- 2 files changed, 5 insertions(+), 1 deletions(-) commit e61245cad15f87db5d8f02e59b5f8477e30d16a7 Author: Nicolas Delon Date: Tue Jun 29 08:08:28 2004 +0000 * global.conf.in: fix bad section name * bindings/python/_prelude.c: * bindings/perl/Prelude.c: bug fix, regenerate bindings, they were not synced anymore git-svn-id: file:///home/yoann/SVN/trunk/libprelude@3853 09c5ec92-17d4-0310-903a-819935f44dba bindings/perl/Prelude.c |10741 ++++++++++++++++++++++++++------------------ bindings/python/_prelude.c | 386 +- global.conf.in | 2 +- 3 files changed, 6656 insertions(+), 4473 deletions(-) commit c298bc45decb45cc016fef06cd50dba1581b3137 Author: Yoann Vandoorselaere Date: Mon Jun 28 17:35:53 2004 +0000 * timer.c (timer_unlock_critical_region): don't lock/unlock the mutex directly, rather, do it through timer_lock_list() / timer_unlock_list() so that we don't try to lock the mutex if we're not using asynchronous timer. * prelude-async.c (get_elapsed_time): async_flags is 0 by default. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@3848 09c5ec92-17d4-0310-903a-819935f44dba src/prelude-async.c | 2 +- src/timer.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) commit 7f8b8725a8cea7ddbfb8f2826ca0d8922abf365f Author: Yoann Vandoorselaere Date: Mon Jun 28 17:27:52 2004 +0000 - Rework of the way we handle TLS, so that relaying work again. - Don't set the analyzer name in the certificate DN, as this will generate confusion in case an analyzer rename is done. Only store the analyzerID as the common name, and avoid using the Dn Qualifier attribute, which is only supported in late GnuTLS version. - Avoid prelude-adduser question about generated key size and certificate expiration time, and use a configuration file to gather theses value. Make it then possible to use prelude-adduser in batch mode. - Better TLS file hierarchy. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@3846 09c5ec92-17d4-0310-903a-819935f44dba Makefile.am | 23 ++- prelude-adduser/Makefile.am | 3 +- prelude-adduser/prelude-adduser.c | 163 +++++++++++++++--- prelude-adduser/server.c | 13 +- prelude-adduser/server.h | 2 +- prelude-adduser/tls-register.c | 343 +++++++++++++++++++------------------ prelude-adduser/tls-register.h | 14 ++- src/include/prelude-client.h | 12 +- src/include/tls-util.h | 2 +- src/prelude-client.c | 71 ++++++-- src/tls-auth.c | 26 ++-- src/tls-util.c | 44 ++--- tls.conf | 22 +++ 13 files changed, 479 insertions(+), 259 deletions(-) commit 31fc9eb75013287dd3aca2298c40f61ed4bc8a5f Author: Yoann Vandoorselaere Date: Mon Jun 28 17:19:46 2004 +0000 New --prelude-config-prefix option, returning the path where global Prelude configuration is installed. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@3845 09c5ec92-17d4-0310-903a-819935f44dba libprelude-config.in | 7 ++++++- 1 files changed, 6 insertions(+), 1 deletions(-) commit 623c6373b07256750faef89c26802198cab5054c Author: Yoann Vandoorselaere Date: Mon Jun 28 17:17:54 2004 +0000 Ignore error and continue walking the configuration file til we get the wanted entry. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@3844 09c5ec92-17d4-0310-903a-819935f44dba src/config-engine.c | 10 ++++++++-- 1 files changed, 8 insertions(+), 2 deletions(-) commit 6dd5c2065d5937cf3988984f1b1650da78ee8880 Author: Yoann Vandoorselaere Date: Mon Jun 28 13:43:53 2004 +0000 When a parent option is specified for argument parsing, backup the parent option list pointer before modifying them, and restore them once we're done so that we don't crash on prelude_option_destroy(). git-svn-id: file:///home/yoann/SVN/trunk/libprelude@3842 09c5ec92-17d4-0310-903a-819935f44dba src/prelude-getopt.c | 7 +++++++ 1 files changed, 7 insertions(+), 0 deletions(-) commit 709db906ab8cbccd1bbbd77d9f680bffa8aa0440 Author: Yoann Vandoorselaere Date: Fri Jun 25 16:30:16 2004 +0000 * prelude-client.c (prelude_client_init): call tls_auth_init only after we know the definitive analyzer name. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@3834 09c5ec92-17d4-0310-903a-819935f44dba src/prelude-client.c | 8 ++++---- 1 files changed, 4 insertions(+), 4 deletions(-) commit e4ea48f5b6fd0430b977c311a9087c71c8f86e9c Author: Yoann Vandoorselaere Date: Fri Jun 25 13:54:31 2004 +0000 regenerated bindings git-svn-id: file:///home/yoann/SVN/trunk/libprelude@3829 09c5ec92-17d4-0310-903a-819935f44dba bindings/perl/Prelude.c |10778 ++++++++++++++++++-------------------------- bindings/python/_prelude.c | 457 ++- 2 files changed, 4834 insertions(+), 6401 deletions(-) commit 98ea54766f1f77a50e79ea42427857ef64b8ba60 Author: Yoann Vandoorselaere Date: Fri Jun 25 13:53:57 2004 +0000 * tls-auth.c (tls_auth_init): avoid error in case this function is called by a manager which might not have a trusted cert file. * tls-util.c: simplify the way we handle associating certificate with key. This code is necessary because we don't want to handle certificate chains. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@3828 09c5ec92-17d4-0310-903a-819935f44dba src/include/prelude-client.h | 8 +++ src/include/tls-auth.h | 4 +- src/include/tls-util.h | 4 +- src/prelude-client.c | 16 +++++- src/prelude-connection.c | 9 ++- src/tls-auth.c | 117 ++++++++++++++------------------------- src/tls-util.c | 126 +++++++++++++++++------------------------- 7 files changed, 123 insertions(+), 161 deletions(-) commit a216f787bd36099e5e27a56bb3af885614b54acd Author: Yoann Vandoorselaere Date: Fri Jun 25 09:07:49 2004 +0000 Applied patch from Rodolphe Ortalo : Apparently, in order to build and install the latest libprelude an libpreludedb from a _separate_ build directory (as in: cd libprelude && mkdir build && cd build && ../configure && make) one needs to apply the following modifications to some Makefile.am: see attached patches. Note the distinction between $(top_srcdir), $(top_builddir), $(srcdir) and . [$(builddir) in fact] in automake. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@3825 09c5ec92-17d4-0310-903a-819935f44dba Makefile.am | 2 +- bindings/perl/Makefile.am | 5 +++-- bindings/python/Makefile.am | 5 +++-- 3 files changed, 7 insertions(+), 5 deletions(-) commit 3e5a205c15aa0ba00fe487bd9ac8d57e1eea0b32 Author: Yoann Vandoorselaere Date: Fri Jun 25 02:16:03 2004 +0000 * prelude-connection-mgr.c (prelude_connection_mgr_broadcast): remove duplicate warning. (connection_timer_expire): reset timer expiration time to it's initial value once the connection is established again. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@3824 09c5ec92-17d4-0310-903a-819935f44dba src/prelude-connection-mgr.c | 20 +++++--------------- 1 files changed, 5 insertions(+), 15 deletions(-) commit b67aec8fd7aa4ef75f0587d2a5cf9c21f1806327 Author: Yoann Vandoorselaere Date: Fri Jun 25 01:38:18 2004 +0000 git-svn-id: file:///home/yoann/SVN/trunk/libprelude@3822 09c5ec92-17d4-0310-903a-819935f44dba prelude-adduser/server.c | 301 ++++++++++++++++++++++++++++++++++++++++++++++ prelude-adduser/server.h | 2 + 2 files changed, 303 insertions(+), 0 deletions(-) commit 6a49e2743cf9bdc99e26d1004208e4f3dd1e2daa Author: Yoann Vandoorselaere Date: Fri Jun 25 01:37:22 2004 +0000 Forgot theses in the GnuTLS big commit git-svn-id: file:///home/yoann/SVN/trunk/libprelude@3821 09c5ec92-17d4-0310-903a-819935f44dba src/include/tls-auth.h | 29 +++++++ src/include/tls-util.h | 35 +++++++++ src/tls-auth.c | 198 ++++++++++++++++++++++++++++++++++++++++++++++++ src/tls-util.c | 187 +++++++++++++++++++++++++++++++++++++++++++++ 4 files changed, 449 insertions(+), 0 deletions(-) commit 30a67a9a4547bc6b1e3079bccd334818a725c5a3 Author: Yoann Vandoorselaere Date: Fri Jun 25 01:36:14 2004 +0000 Implemented prelude_strnstr function. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@3820 09c5ec92-17d4-0310-903a-819935f44dba src/common.c | 28 ++++++++++++++++++++++++++++ src/include/common.h | 2 ++ 2 files changed, 30 insertions(+), 0 deletions(-) commit 4ca9460d3f9c7bc5ec27f782e1e5b5215673dcf5 Author: Yoann Vandoorselaere Date: Thu Jun 24 23:16:22 2004 +0000 fix structure naming conflict. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@3819 09c5ec92-17d4-0310-903a-819935f44dba src/include/prelude-connection.h | 2 +- src/prelude-connection.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit 1fb12f71c7fb6bd67880cdf8b24b26acfa437bf2 Author: Yoann Vandoorselaere Date: Thu Jun 24 23:13:53 2004 +0000 * prelude-getopt.c (call_option_cb): don't check if the set callback is NULL here, we have to respect the order of option call even if this is a 'placebo' parent option. (call_option_from_cb_list): check that the set callback is set before calling it here. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@3818 09c5ec92-17d4-0310-903a-819935f44dba src/prelude-getopt.c | 19 +++++++++---------- 1 files changed, 9 insertions(+), 10 deletions(-) commit dfd1735060006253550850544bab2d15b73b0252 Author: Yoann Vandoorselaere Date: Thu Jun 24 21:46:18 2004 +0000 git-svn-id: file:///home/yoann/SVN/trunk/libprelude@3813 09c5ec92-17d4-0310-903a-819935f44dba src/include/ssl-settings.h | 29 ----------------------------- src/include/ssl.h | 34 ---------------------------------- 2 files changed, 0 insertions(+), 63 deletions(-) commit 6a2746826a052d7e62c7bde241c92229d1af5975 Author: Yoann Vandoorselaere Date: Thu Jun 24 21:41:22 2004 +0000 Replace OpenSSL in favor of GnuTLS, this fix: - OpenSSL licensing problem. - potential OpenSSL dual licensing incompatibility. - GnuTLS API is cleaner in my taste. - GnuTLS security background is much better. Complete overhaul of the certificate handling infrastructure, things are much cleaner, and much more safe now. Authentication is always ciphered, and the encryption layer is dropped if UNIX connection are used. manager-adduser / sensor-adduser are now obsoleted and replaced by a brand new tool called prelude-adduser handling the whole thing. The certificate exchange is now done using SRP, and through a certificate request. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@3812 09c5ec92-17d4-0310-903a-819935f44dba COPYING.OpenSSL | 127 ------- Makefile.am | 8 +- acinclude.m4 | 138 +++++++ configure.in | 27 +- prelude-adduser/Makefile.am | 14 + prelude-adduser/plaintext.c | 109 ++++++ prelude-adduser/prelude-adduser.c | 713 ++++++++++++++++++++++++++++++++++++ prelude-adduser/tls-register.c | 601 ++++++++++++++++++++++++++++++ prelude-adduser/tls-register.h | 29 ++ sensor-adduser/Makefile.am | 18 - sensor-adduser/plaintext.c | 109 ------ sensor-adduser/plaintext.h | 1 - sensor-adduser/sensor-adduser.c | 539 --------------------------- sensor-adduser/ssl-register.c | 261 ------------- sensor-adduser/ssl-register.h | 2 - src/Makefile.am | 13 +- src/client-ident.c | 54 +-- src/include/Makefile.am | 6 +- src/include/prelude-auth.h | 46 --- src/include/prelude-client.h | 11 +- src/include/prelude-io.h | 2 +- src/include/ssl-gencrypto.h | 30 -- src/include/ssl-registration-msg.h | 68 ---- src/prelude-auth.c | 599 ------------------------------ src/prelude-client.c | 104 +++++- src/prelude-connection.c | 257 +------------ src/prelude-io.c | 123 ++----- src/ssl-gencrypto.c | 415 --------------------- src/ssl-registration-msg.c | 308 ---------------- src/ssl-settings.c | 93 ----- src/ssl.c | 162 -------- 31 files changed, 1793 insertions(+), 3194 deletions(-) commit 728aeebd92c48e141d0ba85772cc9781815d266c Author: Yoann Vandoorselaere Date: Thu Jun 24 21:37:22 2004 +0000 remove unused function git-svn-id: file:///home/yoann/SVN/trunk/libprelude@3811 09c5ec92-17d4-0310-903a-819935f44dba src/include/prelude-failover.h | 2 -- 1 files changed, 0 insertions(+), 2 deletions(-) commit d0ea508c6ef02f617489f2159d17ce0ac5e81dce Author: Yoann Vandoorselaere Date: Thu Jun 24 21:36:52 2004 +0000 remove unused function git-svn-id: file:///home/yoann/SVN/trunk/libprelude@3810 09c5ec92-17d4-0310-903a-819935f44dba src/prelude-failover.c | 31 ------------------------------- 1 files changed, 0 insertions(+), 31 deletions(-) commit 5441bee3ab05cf9a5366b2af1a9ad08a645b07b6 Author: Yoann Vandoorselaere Date: Thu Jun 24 21:35:58 2004 +0000 remove unused function git-svn-id: file:///home/yoann/SVN/trunk/libprelude@3809 09c5ec92-17d4-0310-903a-819935f44dba src/prelude-connection-mgr.c | 22 ++-------------------- 1 files changed, 2 insertions(+), 20 deletions(-) commit 5f8048e1e2a815e105d912ba789c2fcd277c0662 Author: Yoann Vandoorselaere Date: Thu Jun 24 21:33:04 2004 +0000 call walk_children if the parent option is a placebo. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@3808 09c5ec92-17d4-0310-903a-819935f44dba src/prelude-getopt.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) commit dc4129cf027f435303e923d7fac01a2c87eae321 Author: Yoann Vandoorselaere Date: Thu Jun 24 21:32:02 2004 +0000 Include stdarg.h git-svn-id: file:///home/yoann/SVN/trunk/libprelude@3807 09c5ec92-17d4-0310-903a-819935f44dba src/include/prelude-strbuf.h | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) commit ffd57058da2c485d1637752ff8a04bfe3bc1ae4a Author: Nicolas Delon Date: Thu Jun 24 12:11:27 2004 +0000 * src/idmef-criteria-string.yac.y: fix a bug that made bison accessing a freed memory zone * src/idmef-criteria-string.yac.c: * src/idmef-criteria-string.yac.h: * src/idmef-criteria-string.lex.c: regenerated git-svn-id: file:///home/yoann/SVN/trunk/libprelude@3804 09c5ec92-17d4-0310-903a-819935f44dba src/idmef-criteria-string.lex.c | 1329 ++++++++++++++++++++++----------------- src/idmef-criteria-string.yac.c | 1273 ++++++++++++++++++++----------------- src/idmef-criteria-string.yac.h | 90 ++- src/idmef-criteria-string.yac.y | 22 +- 4 files changed, 1500 insertions(+), 1214 deletions(-) commit e3facc6b200ef6ad98657a937206d9d364aa3324 Author: Nicolas Delon Date: Thu Jun 24 07:49:59 2004 +0000 * src/idmef-time.c: functions that convert time into string must return the number of bytes written and not 0 (idmef_time_get_idmef_timestamp) bug fix, follow the previous statement and fix usage of len instead of ret git-svn-id: file:///home/yoann/SVN/trunk/libprelude@3803 09c5ec92-17d4-0310-903a-819935f44dba src/idmef-time.c | 19 +++++++++---------- 1 files changed, 9 insertions(+), 10 deletions(-) commit fa68b7c790c398e5b4be5d27c3f2f8920f1ad090 Author: Yoann Vandoorselaere Date: Mon Jun 21 14:41:23 2004 +0000 oops... git-svn-id: file:///home/yoann/SVN/trunk/libprelude@3788 09c5ec92-17d4-0310-903a-819935f44dba src/prelude-connection-mgr.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) commit 430afba23aa964c352ec4c10dbf775c6c143472f Author: Yoann Vandoorselaere Date: Mon Jun 21 14:16:04 2004 +0000 * prelude-connection-mgr.c (process_request): don't treat option setting error as regular error. (check_for_data_cb): in case an error happen while processing an option request, remove the connection from our polling set. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@3787 09c5ec92-17d4-0310-903a-819935f44dba src/prelude-connection-mgr.c | 21 +++++++++++---------- 1 files changed, 11 insertions(+), 10 deletions(-) commit 6f8e1b6e0f8ac14123f780f18528af826aaa915f Author: Yoann Vandoorselaere Date: Tue Jun 15 23:27:29 2004 +0000 git-svn-id: file:///home/yoann/SVN/trunk/libprelude@3784 09c5ec92-17d4-0310-903a-819935f44dba src/include/prelude-log.h | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) commit a60352604c6d817b6f2492c35518c9c111ba910f Author: Yoann Vandoorselaere Date: Tue Jun 15 23:26:27 2004 +0000 * prelude-connection.c: Keep the same prelude_io object accross disconnection. (do_connect): output more information about the connection. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@3783 09c5ec92-17d4-0310-903a-819935f44dba src/prelude-connection.c | 24 +++++++++++++----------- 1 files changed, 13 insertions(+), 11 deletions(-) commit f16c0845aed063530a63cd1393cbc29e312afce4 Author: Yoann Vandoorselaere Date: Tue Jun 15 16:28:36 2004 +0000 git-svn-id: file:///home/yoann/SVN/trunk/libprelude@3781 09c5ec92-17d4-0310-903a-819935f44dba .../GenerateIDMEFMessageReadC.pm | 5 +++-- .../GenerateIDMEFMessageWriteC.pm | 1 + 2 files changed, 4 insertions(+), 2 deletions(-) commit a21c8358b9fe9c2ce1b89d86bc8928e5cc26281d Author: Yoann Vandoorselaere Date: Tue Jun 15 16:28:19 2004 +0000 * idmef-time.c (idmef_time_get_idmef_timestamp): include GMT offset. Rework the function. * idmef-wrappers-gen/GenerateIDMEFMessageReadC.pm: use extraction function, not ntohl which doesn't take care of alignement issue. Extract gmt_offset. * idmef-wrappers-gen/GenerateIDMEFMessageWriteC.pm (header): take care of gmt_offset, converting it to network byte order. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@3780 09c5ec92-17d4-0310-903a-819935f44dba src/idmef-message-read.c | 7 +++-- src/idmef-message-write.c | 4 ++- src/idmef-time.c | 63 +++++++++++++++++--------------------------- src/include/idmef-time.h | 6 ++-- 4 files changed, 34 insertions(+), 46 deletions(-) commit 45060a45b303c64ae8e2b8fa08578690c4c8a936 Author: Yoann Vandoorselaere Date: Tue Jun 15 15:16:48 2004 +0000 * idmef-time.c (idmef_time_get_gmtoff): (idmef_time_set_gmtoff): implemented. (idmef_time_new_gettimeofday): store the gmt offset in the idmef-time structure. (idmef_time_set_db_timestamp): take care of the gmt offset. (idmef_time_get_db_timestamp): stop using strftime. Use snprintf, and generate the timestamp buffer, including the gmt offset now available in the idmef-time structure. (idmef_time_set_ntp_timestamp): fix a warning. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@3779 09c5ec92-17d4-0310-903a-819935f44dba src/idmef-time.c | 87 +++++++++++++++++++++++++-------------------- src/include/idmef-time.h | 3 ++ 2 files changed, 51 insertions(+), 39 deletions(-) commit f029a3e97def383ef6c4981454f405853c0b4d46 Author: Yoann Vandoorselaere Date: Tue Jun 15 10:46:14 2004 +0000 oops git-svn-id: file:///home/yoann/SVN/trunk/libprelude@3777 09c5ec92-17d4-0310-903a-819935f44dba src/prelude-failover.c | 1 - 1 files changed, 0 insertions(+), 1 deletions(-) commit f960091522a4753649d961403f11083e1b3317d2 Author: Yoann Vandoorselaere Date: Tue Jun 15 10:39:03 2004 +0000 * prelude-message.c (prelude_msg_get_time): return the timeval, for API usability purpose. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@3776 09c5ec92-17d4-0310-903a-819935f44dba src/include/prelude-message.h | 2 +- src/prelude-message.c | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) commit a4959709b18109747ece6f66b0986ef8ba7c9a63 Author: Yoann Vandoorselaere Date: Tue Jun 15 10:31:25 2004 +0000 * prelude-connection-mgr.c: Clean things up. Use the new prelude-failover implementation. Be more consistent when sending alert to a AND/OR of Manager, example with A && B || C && D: - if A and B are not both known to be dead: - send or backup to A [if send fail backup for A] - send or backup to B [if send fail backup for B] - else if C and D are not both known to be dead: - send or backup to C [if send fail backup for C] - send or backup to D [if send fail backup for D] - else if everything is known to be dead: - backup to the global failover, and flush to the first pair of manager to be available. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@3775 09c5ec92-17d4-0310-903a-819935f44dba src/prelude-connection-mgr.c | 643 +++++++++++++++++++----------------------- 1 files changed, 294 insertions(+), 349 deletions(-) commit d38e04da9b1f9af67c49fdc968b4791310c91fa2 Author: Yoann Vandoorselaere Date: Tue Jun 15 10:16:32 2004 +0000 * prelude-failover.c (prelude_failover_get_saved_msg): delete the previously failed over file. This way, if the caller fail after a call to this function, the backup won't be lost. (get_current_directory_index): Initial index is 1 (0 is unused). git-svn-id: file:///home/yoann/SVN/trunk/libprelude@3774 09c5ec92-17d4-0310-903a-819935f44dba src/prelude-failover.c | 88 +++++++++++++++++++++-------------------------- 1 files changed, 39 insertions(+), 49 deletions(-) commit ab17ce8731c08eded3e2ef9d9e08734cf3610e8a Author: Nicolas Delon Date: Mon Jun 14 14:11:32 2004 +0000 fit function renaming git-svn-id: file:///home/yoann/SVN/trunk/libprelude@3766 09c5ec92-17d4-0310-903a-819935f44dba bindings/perl/Prelude.pm | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) commit f395c003b23ea806a6c7b95ec0d0a324f25c8700 Author: Yoann Vandoorselaere Date: Mon Jun 14 13:43:12 2004 +0000 Fit function renaming git-svn-id: file:///home/yoann/SVN/trunk/libprelude@3765 09c5ec92-17d4-0310-903a-819935f44dba bindings/python/prelude.py | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) commit a779aebb316428008a37953094972801da9b44bb Author: Yoann Vandoorselaere Date: Sun Jun 13 23:21:59 2004 +0000 * prelude-message.c (prelude_msg_t): modified the message header format so that it include a timestamp, this timestamp will be used to set analyzer_time when the message is received. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@3760 09c5ec92-17d4-0310-903a-819935f44dba src/include/prelude-message.h | 2 ++ src/prelude-message.c | 31 ++++++++++++++++++++++++++----- 2 files changed, 28 insertions(+), 5 deletions(-) commit b5f4c5fe8ac83dd90cc997b9f48a0c82549df0d7 Author: Yoann Vandoorselaere Date: Sun Jun 13 21:48:14 2004 +0000 * prelude-client.c (prelude_client_new): allocate the analyzer here not in prelude_client_init(), so that the user can fill it's own data in the analyzer structure before it get initialy sent by prelude_client_init(). git-svn-id: file:///home/yoann/SVN/trunk/libprelude@3756 09c5ec92-17d4-0310-903a-819935f44dba src/prelude-client.c | 15 ++++++++------- 1 files changed, 8 insertions(+), 7 deletions(-) commit ccabd77e7b4147053176ab7177f98121d4574f2e Author: Yoann Vandoorselaere Date: Sun Jun 13 21:43:53 2004 +0000 * prelude-client.c (prelude_client_init): call timer_init with the default timer setup before calling prelude_option_parse_arguments(), as if --heartbeat-interval is used, it will have to reset the timer, which need to be initialized. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@3755 09c5ec92-17d4-0310-903a-819935f44dba src/prelude-client.c | 8 ++++---- 1 files changed, 4 insertions(+), 4 deletions(-) commit 5268b8b26adc451f45baa512eec1f72d107401da Author: Yoann Vandoorselaere Date: Sun Jun 13 21:23:33 2004 +0000 * prelude-failover.c (prelude_failover_new): create the directory if it doesn't exist. (prelude_failover_get_available_msg_count): (prelude_failover_get_deleted_msg_count): (prelude_failover_set_quota): (prelude_failover_get_saved_msg): implemented. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@3754 09c5ec92-17d4-0310-903a-819935f44dba src/include/prelude-failover.h | 12 +++++-- src/prelude-failover.c | 65 ++++++++++++++++++++++++++++++++++++++-- 2 files changed, 71 insertions(+), 6 deletions(-) commit ca800c3789bf2204fba17f0c0b389f186564632e Author: Yoann Vandoorselaere Date: Sun Jun 13 16:55:07 2004 +0000 * prelude-getopt.c: implemented prelude-getopt ability to check for a single option, not only it's children option. * prelude-client.c (setup_options): removed the hack used to check a single option, use correct prelude-getopt function now that it implement it. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@3753 09c5ec92-17d4-0310-903a-819935f44dba src/prelude-client.c | 20 +++---------- src/prelude-getopt.c | 75 ++++++++++++++++++++++++++++++------------------- 2 files changed, 51 insertions(+), 44 deletions(-) commit 3405f547dc4019c8634dc3cc5265dc02a26d966d Author: Yoann Vandoorselaere Date: Sun Jun 13 16:53:07 2004 +0000 git-svn-id: file:///home/yoann/SVN/trunk/libprelude@3752 09c5ec92-17d4-0310-903a-819935f44dba src/include/idmef-message.h | 3 +++ 1 files changed, 3 insertions(+), 0 deletions(-) commit 186038b24797477a7d26887a6fb99ed0d887fe8b Author: Yoann Vandoorselaere Date: Sun Jun 13 16:50:00 2004 +0000 * idmef-message.c (idmef_message_get_pmsg): implemented. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@3751 09c5ec92-17d4-0310-903a-819935f44dba src/idmef-message.c | 7 +++++++ 1 files changed, 7 insertions(+), 0 deletions(-) commit aacfd7398b7b106d7a5b1286edb63f1ee5809077 Author: Nicolas Delon Date: Sun Jun 13 10:36:17 2004 +0000 transform Sensor classes in Client classes, create a convenient Sensor class that inherit the Client class. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@3744 09c5ec92-17d4-0310-903a-819935f44dba bindings/perl/Prelude.pm | 37 ++++++++++++++++++---- bindings/python/prelude.py | 71 +++++++++++++++++++++++++++++-------------- 2 files changed, 78 insertions(+), 30 deletions(-) commit 070f5053aeb7a0f72cb810770d3e67f7c5ad1a50 Author: Nicolas Delon Date: Sat Jun 12 22:55:05 2004 +0000 minor fixes git-svn-id: file:///home/yoann/SVN/trunk/libprelude@3742 09c5ec92-17d4-0310-903a-819935f44dba bindings/perl/Prelude.pm | 8 +++++++- bindings/python/prelude.py | 6 +++++- 2 files changed, 12 insertions(+), 2 deletions(-) commit efd5b2fbee6f2901951e6ed72b93454a4715e880 Author: Nicolas Delon Date: Sat Jun 12 18:24:55 2004 +0000 fit function renaming in idmef-object git-svn-id: file:///home/yoann/SVN/trunk/libprelude@3741 09c5ec92-17d4-0310-903a-819935f44dba bindings/python/prelude.py | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) commit 14baf489c55a7c2f4eca85f2da4d67934dc4e2a9 Author: Nicolas Delon Date: Sat Jun 12 17:06:44 2004 +0000 * src/prelude-client.c: fix dereferencing NULL pointer * bindings/python/_prelude.c: * bindings/python/prelude.py: * bindings/perl/Prelude.c: * bindings/perl/Prelude.pm: * bindings/libprelude.i: * docs/api/examples/python/send_alert.py: * docs/api/examples/perl/send_alert.pl: port the bindings to the new sensor API git-svn-id: file:///home/yoann/SVN/trunk/libprelude@3740 09c5ec92-17d4-0310-903a-819935f44dba bindings/libprelude.i | 106 ----- bindings/perl/Prelude.c | 696 ++++---------------------------- bindings/perl/Prelude.pm | 168 +++++--- bindings/python/_prelude.c | 595 ++++----------------------- bindings/python/prelude.py | 58 +++- docs/api/examples/perl/send_alert.pl | 7 +- docs/api/examples/python/send_alert.py | 12 +- src/idmef-message-read.c | 2 +- src/idmef-message-write.c | 3 +- src/idmef-tree-print.c | 2 +- src/idmef-tree-to-string.c | 2 +- src/include/idmef-message-id.h | 2 +- src/include/idmef-message-write.h | 2 +- src/include/idmef-tree-print.h | 2 +- src/include/idmef-tree-to-string.h | 2 +- src/prelude-client.c | 2 +- 16 files changed, 348 insertions(+), 1313 deletions(-) commit 6d41b99ddc02c144d980221b0205e07e17ba2987 Author: Yoann Vandoorselaere Date: Sat Jun 12 16:30:41 2004 +0000 * prelude-failover.c: New generic failover implementation to be used by sensor or manager. This implementation also support quota and support transaction (the old implementation would try to resend everything in case of error, even data sent prior the error). git-svn-id: file:///home/yoann/SVN/trunk/libprelude@3739 09c5ec92-17d4-0310-903a-819935f44dba src/Makefile.am | 1 + src/include/Makefile.am | 1 + src/include/prelude-failover.h | 39 +++++ src/prelude-failover.c | 325 ++++++++++++++++++++++++++++++++++++++++ 4 files changed, 366 insertions(+), 0 deletions(-) commit 35966cc67c23100c0ee913e1ced525ad873f5c5d Author: Yoann Vandoorselaere Date: Sat Jun 12 15:30:47 2004 +0000 * include/prelude-client.h (Copyright): add missing copyright header. Fix definition for the header filename. * include/prelude-connection.h: Fix definition for the header filename. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@3738 09c5ec92-17d4-0310-903a-819935f44dba src/include/prelude-client.h | 27 +++++++++++++++++++++++++-- src/include/prelude-connection.h | 6 +++--- 2 files changed, 28 insertions(+), 5 deletions(-) commit e2a3609046478e227800f0907c2bda380c275f14 Author: Yoann Vandoorselaere Date: Sat Jun 12 15:28:00 2004 +0000 * idmef-wrappers-gen/GenerateIDMEFMessageWriteC.pm: remove deprecated sensor.h dependencie. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@3737 09c5ec92-17d4-0310-903a-819935f44dba src/idmef-message-write.c | 3 +-- .../GenerateIDMEFMessageWriteC.pm | 1 - 2 files changed, 1 insertions(+), 3 deletions(-) commit f5a6c8ff7f781498684bf021933b08f3e74c37dd Author: Yoann Vandoorselaere Date: Sat Jun 12 15:25:23 2004 +0000 * prelude-message-buffered.c: remove deprecated sensor.h dependencie. (prelude_msgbuf_close): only send msg if it is not NULL and not empty. Never happened, but might be safe, due to the ambiguity of the mark_end function. (prelude_msgbuf_new): don't dereference client if it is NULL. That should never happen, except with client doing very specific things (using it for other sake than sending IDMEF). git-svn-id: file:///home/yoann/SVN/trunk/libprelude@3736 09c5ec92-17d4-0310-903a-819935f44dba src/prelude-message-buffered.c | 10 +++++----- 1 files changed, 5 insertions(+), 5 deletions(-) commit b01638c599c2adab7cea92d1dbe55383333907a8 Author: Yoann Vandoorselaere Date: Sat Jun 12 15:20:37 2004 +0000 * prelude-message.c (prelude_msg_get_len): impl. return currently used length in this message. (prelude_msg_is_empty): impl. return true if the message passed as argument is empty. (prelude_msg_is_fragment): impl. return true if the message passed as argument is a fragment of message. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@3735 09c5ec92-17d4-0310-903a-819935f44dba src/include/prelude-message.h | 6 +++++ src/prelude-message.c | 44 ++++++++++++++++++++++++++++++++++++++++- 2 files changed, 49 insertions(+), 1 deletions(-) commit 4a40b46dead71ed5c32f0ebba3c4cfacf9df0afc Author: Yoann Vandoorselaere Date: Sat Jun 12 15:14:39 2004 +0000 Remove deprecated. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@3734 09c5ec92-17d4-0310-903a-819935f44dba src/include/sensor.h | 49 ---- src/sensor.c | 603 -------------------------------------------------- 2 files changed, 0 insertions(+), 652 deletions(-) commit 30835979ec1fcc0fd8ed41879d7b84f36d9bf435 Author: Yoann Vandoorselaere Date: Sat Jun 12 15:14:04 2004 +0000 * prelude-client.c (prelude_client_new): Initialize UID and GID. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@3733 09c5ec92-17d4-0310-903a-819935f44dba src/prelude-client.c | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) commit 386a599dc27d526c62fc5717c1343aed0f26aeb0 Author: Nicolas Delon Date: Sat Jun 12 11:40:36 2004 +0000 fix possible NULL pointer dereferencing bug git-svn-id: file:///home/yoann/SVN/trunk/libprelude@3732 09c5ec92-17d4-0310-903a-819935f44dba src/prelude-getopt.c | 7 +++++-- 1 files changed, 5 insertions(+), 2 deletions(-) commit 699e1476b1251ea30975a181ec7430eea87e50a2 Author: Yoann Vandoorselaere Date: Fri Jun 11 00:01:54 2004 +0000 * prelude-client.c (prelude_client_init): call the heartbeat callback if it is set, not only if we got a manager list. (heartbeat_expire_cb): even if we use a callback, construct the message ourself and pass it to the callback function and reset the timer anyway. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@3727 09c5ec92-17d4-0310-903a-819935f44dba src/include/prelude-client.h | 2 +- src/prelude-client.c | 20 ++++++++++---------- 2 files changed, 11 insertions(+), 11 deletions(-) commit 3a9cda7ecbc5088870e4acb15306b58de92c4fcc Author: Yoann Vandoorselaere Date: Thu Jun 10 23:18:33 2004 +0000 Fix analyzer-name option provided from configuration file git-svn-id: file:///home/yoann/SVN/trunk/libprelude@3726 09c5ec92-17d4-0310-903a-819935f44dba src/prelude-client.c | 34 ++++++++++++++++++++++------------ 1 files changed, 22 insertions(+), 12 deletions(-) commit 2c7273b7b0645e6a771b23c7a8821b69e95d19ae Author: Yoann Vandoorselaere Date: Thu Jun 10 23:16:34 2004 +0000 git-svn-id: file:///home/yoann/SVN/trunk/libprelude@3725 09c5ec92-17d4-0310-903a-819935f44dba src/include/prelude-getopt.h | 5 ++--- 1 files changed, 2 insertions(+), 3 deletions(-) commit 1252520f0269782bb1619a26aeecc8c62d8f9b4b Author: Yoann Vandoorselaere Date: Thu Jun 10 23:16:22 2004 +0000 * prelude-getopt.c (call_option_cb): fix priority check. * include/prelude-getopt.h (option_run_first): reassign priority properly. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@3724 09c5ec92-17d4-0310-903a-819935f44dba src/prelude-getopt.c | 24 +++++++++--------------- 1 files changed, 9 insertions(+), 15 deletions(-) commit 57072afdf8252956d9ce5e19bad2e24a81ac14e9 Author: Yoann Vandoorselaere Date: Thu Jun 10 23:15:22 2004 +0000 Remove debugging spew git-svn-id: file:///home/yoann/SVN/trunk/libprelude@3723 09c5ec92-17d4-0310-903a-819935f44dba src/prelude-connection.c | 4 ---- 1 files changed, 0 insertions(+), 4 deletions(-) commit 2476eba145e72c7ed51fcab3415ded5a77b3e4b4 Author: Yoann Vandoorselaere Date: Thu Jun 10 22:32:06 2004 +0000 git-svn-id: file:///home/yoann/SVN/trunk/libprelude@3722 09c5ec92-17d4-0310-903a-819935f44dba src/prelude-client.c | 6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-) commit 428b14c05ead978934e553c081b885a9fa715e7e Author: Yoann Vandoorselaere Date: Thu Jun 10 22:08:02 2004 +0000 git-svn-id: file:///home/yoann/SVN/trunk/libprelude@3721 09c5ec92-17d4-0310-903a-819935f44dba src/prelude-connection-mgr.c | 11 ----------- 1 files changed, 0 insertions(+), 11 deletions(-) commit f3fb11a3ffd0cf18f057613f9a2b415c148d1043 Author: Yoann Vandoorselaere Date: Thu Jun 10 21:51:45 2004 +0000 * idmef-value.c (idmef_value_get_object_type): renamed from idmef_value_get_idmef_type(). * prelude-getopt.c: When an option is specified both in the configuration file and on the command line merge it. This prevent problem when important operation are done directly in the option callback, like setting the manager address. * prelude-getopt.c: Allow recursive configuration file inclusion, close ticket #22. * prelude-async.c: use pthread_once() to make sure we only initialize once. * idmef-wrappers-gen/GenerateIDMEFTreeWrapC.pm: gather the prelude_ident_t object from the prelude_client_t. * prelude-client.c: renamed to prelude-connection.c * prelude-client-mgr.c: renamed to prelude-connection-mgr.c * prelude-client.c: New API replacing sensor.c. No global state are used. This is a big cleanup, and the API is now much more flexible. Close ticket #14. * libmissing: remove deprecated. * sensor-adduser: * prelude-auth.c: take care of the client GID. * prelude-path.c: removed, now done within the prelude-client API. Take care of the client GID, close ticket #21. * common.c (prelude_get_file_name_and_path): restore the buffer. * dev/prelude/svn/trunk/libprelude/client.conf: * dev/prelude/svn/trunk/libprelude/global.conf: splitted sensors-default.conf to two file, this is necessary as option might not be shared between a manager and a sensor. Updated everywhere for the new API. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@3717 09c5ec92-17d4-0310-903a-819935f44dba Makefile.am | 48 +- bindings/perl/Prelude.c | 717 +++++++++----- bindings/python/_prelude.c | 992 ++++++++++++------- client.conf.in | 17 + configure.in | 14 +- global.conf.in | 57 ++ libmissing/Makefile.am | 9 - libmissing/getopt_long.c | 36 - libmissing/getopt_long.h | 46 - libmissing/libmissing.h | 22 - sensor-adduser/Makefile.am | 2 +- sensor-adduser/plaintext.c | 10 +- sensor-adduser/plaintext.h | 2 +- sensor-adduser/sensor-adduser.c | 81 +- sensor-adduser/ssl-register.c | 23 +- sensor-adduser/ssl-register.h | 3 +- sensors-default.conf | 68 -- src/Makefile.am | 7 +- src/client-ident.c | 70 +- src/common.c | 12 +- src/config-engine.c | 3 +- src/idmef-message-write.c | 11 +- src/idmef-object.c | 8 +- src/idmef-value-object.c | 2 +- src/idmef-value-type.c | 4 + src/idmef-value.c | 4 +- .../GenerateIDMEFMessageWriteC.pm | 9 +- .../GenerateIDMEFMessageWriteH.pm | 3 + src/include/Makefile.am | 5 +- src/include/client-ident.h | 8 +- src/include/idmef-message-write.h | 5 +- src/include/idmef-object.h | 2 +- src/include/idmef-value-type.h | 4 +- src/include/idmef-value.h | 2 +- src/include/prelude-async.h | 4 +- src/include/prelude-auth.h | 4 +- src/include/prelude-client-mgr.h | 56 -- src/include/prelude-client.h | 101 +-- src/include/prelude-connection-mgr.h | 57 ++ src/include/prelude-connection.h | 73 ++ src/include/prelude-getopt-wide.h | 4 +- src/include/prelude-getopt.h | 8 +- src/include/prelude-ident.h | 2 + src/include/prelude-message-buffered.h | 7 +- src/include/prelude-message-id.h | 2 +- src/include/prelude-path.h | 48 - src/include/ssl-gencrypto.h | 3 +- src/include/ssl.h | 5 +- src/prelude-async.c | 36 +- src/prelude-auth.c | 16 +- src/prelude-client-mgr.c | 1016 ------------------- src/prelude-client.c | 1010 ++++++++----------- src/prelude-connection-mgr.c | 1026 ++++++++++++++++++++ src/prelude-connection.c | 867 +++++++++++++++++ src/prelude-getopt-wide.c | 35 +- src/prelude-getopt.c | 243 +++-- src/prelude-message-buffered.c | 18 +- src/prelude-path.c | 109 --- src/prelude-plugin.c | 2 + src/ssl-gencrypto.c | 32 +- src/ssl-settings.c | 1 - src/ssl.c | 8 +- 62 files changed, 4095 insertions(+), 3004 deletions(-) commit 163eccd15428790674d424ed13066dea1cdce8d4 Author: Nicolas Delon Date: Tue Jun 8 22:10:44 2004 +0000 * src/idmef-criteria.c: (idmef_criteria_to_string) bug fix, this function was not ported for the last idmef-criteria changes * src/common.c: * src/include/common.h: (prelude_strndup) provide a strndup function for all platforms * src/idmef-criteria-string.lex.l: * src/idmef-criteria-string.yac.y: backport to flex 2.5.4 (the most used version of flex) so that it does not use reentrant features of flex 2.5.31, make it thread safe by using mutex * src/idmef-criteria-string.lex.l: replace the local strndup implementation by the new prelude_strndup function * src/idmef-criteria-string.yac.c: * src/idmef-criteria-string.yac.h: * src/idmef-criteria-string.lex.c: regenerated git-svn-id: file:///home/yoann/SVN/trunk/libprelude@3711 09c5ec92-17d4-0310-903a-819935f44dba src/common.c | 21 + src/idmef-criteria-string.lex.c | 1662 +++++++++++++++------------------------ src/idmef-criteria-string.lex.l | 39 +- src/idmef-criteria-string.yac.c | 1296 ++++++++++++++----------------- src/idmef-criteria-string.yac.h | 96 +-- src/idmef-criteria-string.yac.y | 14 +- src/idmef-criteria.c | 23 +- src/include/common.h | 2 + 8 files changed, 1303 insertions(+), 1850 deletions(-) commit 58c93a8b43cb234a33fbf0e4dc07dff900f13cc6 Author: Yoann Vandoorselaere Date: Tue Jun 1 16:30:52 2004 +0000 Call option within a section in group git-svn-id: file:///home/yoann/SVN/trunk/libprelude@3702 09c5ec92-17d4-0310-903a-819935f44dba src/prelude-getopt.c | 21 +++++++++++---------- 1 files changed, 11 insertions(+), 10 deletions(-) commit fac6d02c9d11c497c14fd4cd57ced7a6b0c41725 Author: Yoann Vandoorselaere Date: Tue Jun 1 16:29:58 2004 +0000 Due to the last prelude-getopt.c change, we want error to be verbose. This will help tracking down bugs. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@3701 09c5ec92-17d4-0310-903a-819935f44dba src/sensor.c | 11 ++--------- 1 files changed, 2 insertions(+), 9 deletions(-) commit b6414940adfc7897098e3ad8e22f86fc7755ffab Author: Nicolas Delon Date: Tue Jun 1 11:09:07 2004 +0000 * src/idmef-criteria.c: remove debug * bindings/perl/Prelude.pm: bug fix, typo * bindings/perl/Prelude.c: regenerate with swig 1.3.19, swig 1.3.21 seems to break the perl binding, needs investigation git-svn-id: file:///home/yoann/SVN/trunk/libprelude@3697 09c5ec92-17d4-0310-903a-819935f44dba bindings/perl/Prelude.c |10687 +++++++++++++++++++++++---------------- bindings/perl/Prelude.pm | 2 +- src/idmef-criteria-string.lex.c | 143 +- src/idmef-criteria-string.yac.c | 61 +- src/idmef-criteria.c | 8 +- 5 files changed, 6526 insertions(+), 4375 deletions(-) commit d405f85fead332b74bf39bba410679b289f8e32e Author: Yoann Vandoorselaere Date: Tue Jun 1 10:49:58 2004 +0000 remove debugging spew git-svn-id: file:///home/yoann/SVN/trunk/libprelude@3696 09c5ec92-17d4-0310-903a-819935f44dba src/idmef-criteria-string.yac.y | 17 ----------------- 1 files changed, 0 insertions(+), 17 deletions(-) commit 043b3a85f9ac13aa38b6b898f7a20897dfd703b8 Author: Yoann Vandoorselaere Date: Tue Jun 1 07:40:18 2004 +0000 Revert some part of the previous commit that are not completly finished git-svn-id: file:///home/yoann/SVN/trunk/libprelude@3692 09c5ec92-17d4-0310-903a-819935f44dba src/prelude-getopt.c | 1 - 1 files changed, 0 insertions(+), 1 deletions(-) commit 5f459a11465a77b5e08c59ed436c9756f7fc5999 Author: Yoann Vandoorselaere Date: Tue Jun 1 07:39:58 2004 +0000 Revert some part of the previous commit that are not completly finished git-svn-id: file:///home/yoann/SVN/trunk/libprelude@3691 09c5ec92-17d4-0310-903a-819935f44dba src/include/prelude-getopt.h | 1 - 1 files changed, 0 insertions(+), 1 deletions(-) commit 31e9f0bc5dec3c43cc6d90ffe1b8fac4478c94cc Author: Yoann Vandoorselaere Date: Tue Jun 1 07:39:30 2004 +0000 Revert some part of the previous commit that are not completly finished git-svn-id: file:///home/yoann/SVN/trunk/libprelude@3690 09c5ec92-17d4-0310-903a-819935f44dba src/include/prelude-getopt.h | 2 +- src/prelude-getopt.c | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) commit 3e5efb0a1c63b076ee709a1554e764e19fce4c12 Author: Yoann Vandoorselaere Date: Mon May 31 18:22:01 2004 +0000 * prelude-getopt.c (get_missing_options): save context before walking children option, restore context when we're done. Implemented using recursion, this is needed to save several level of context. (parse_argument): ditto. * config-engine.c (parse_buffer): restore modified buffer. (config_get_next): in case we return an error, decrease line number, so that we don't go out of bound if the caller choose to ignore the error. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@3689 09c5ec92-17d4-0310-903a-819935f44dba src/config-engine.c | 12 ++- src/prelude-getopt.c | 178 +++++++++++++++++++++++++------------------------- 2 files changed, 98 insertions(+), 92 deletions(-) commit f565a0e36b708b135fdef1fe21b26798715eee54 Author: Yoann Vandoorselaere Date: Mon May 31 13:53:04 2004 +0000 * config-engine.c (parse_section_buffer): fix typo. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@3685 09c5ec92-17d4-0310-903a-819935f44dba src/config-engine.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) commit 0c079ad2513a8eebb7ab1a3b4443db0998ad7e5d Author: Yoann Vandoorselaere Date: Sat May 29 18:04:33 2004 +0000 * prelude-plugin.c (prelude_plugin_set_activation_option): remove unsubscribe option from command line hook. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@3682 09c5ec92-17d4-0310-903a-819935f44dba src/prelude-plugin.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) commit b7887a0f7917a158785091531f014f3425848208 Author: Yoann Vandoorselaere Date: Sat May 29 17:05:49 2004 +0000 * prelude-plugin.c (prelude_plugin_instance_call_init_func): (prelude_plugin_instance_have_init_func): (prelude_plugin_instance_get_private_data): (prelude_plugin_instance_set_private_data): implemented. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@3678 09c5ec92-17d4-0310-903a-819935f44dba src/include/prelude-plugin.h | 8 ++++++++ src/prelude-plugin.c | 32 ++++++++++++++++++++++++++++++++ 2 files changed, 40 insertions(+), 0 deletions(-) commit 522d15be1b2f600b00f1b7a7245c702618795d6e Author: Nicolas Delon Date: Sat May 29 12:44:46 2004 +0000 * fix a typo git-svn-id: file:///home/yoann/SVN/trunk/libprelude@3677 09c5ec92-17d4-0310-903a-819935f44dba bindings/python/prelude.py | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) commit e5c48e2d28cae0af4d348654c40d441c2bb34d2b Author: Yoann Vandoorselaere Date: Sat May 29 11:57:06 2004 +0000 oops... git-svn-id: file:///home/yoann/SVN/trunk/libprelude@3675 09c5ec92-17d4-0310-903a-819935f44dba src/prelude-plugin.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) commit b9b25cfe5a6ee315a28c54d3e34b889ab554a49d Author: Yoann Vandoorselaere Date: Sat May 29 11:52:20 2004 +0000 * prelude-plugin.c (prelude_plugin_new_instance): renamed from prelude_plugin_subscribe(). Call the activation function if any. However, don't do the subscribtion here. (prelude_plugins_subscribe): subscribe the provided instance. (intercept_plugin_activation_option): don't use an interceptor for this function. Only subscribe the plugin instance if the plugin specified no init function. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@3673 09c5ec92-17d4-0310-903a-819935f44dba src/include/prelude-plugin.h | 4 ++- src/prelude-plugin.c | 79 +++++++++++++++++++++++++---------------- 2 files changed, 51 insertions(+), 32 deletions(-) commit b6d154aeb0c909b31ce379f16979acbb553d4c24 Author: Yoann Vandoorselaere Date: Fri May 28 10:00:24 2004 +0000 * idmef-criteria-string.lex.l: regex modified from [a-zA-Z0-9_\.\-]+ to ([a-zA-Z0-9_\-]+(\([0-9]+\))?\.?)+ so that we can handle listed object. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@3671 09c5ec92-17d4-0310-903a-819935f44dba src/idmef-criteria-string.lex.l | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) commit 4a006ca98bae2d27725f670051699aae2d7c1332 Author: Yoann Vandoorselaere Date: Thu May 27 17:05:40 2004 +0000 * prelude-plugin.c: Handle case where an instance is unsubscribed and option for this instance are called after this unsubscribtion. (intercept_plugin_init_option): call destroy_instance(). (destroy_instance): don't call the unsubscribtion function here, it's already done in prelude_plugin_unsubscribe. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@3665 09c5ec92-17d4-0310-903a-819935f44dba src/prelude-plugin.c | 64 +++++++++++++++++++++++++++++++------------------ 1 files changed, 40 insertions(+), 24 deletions(-) commit 458069bb5c1ab4c055ffb7b1c76cf8ccf4651f78 Author: Yoann Vandoorselaere Date: Thu May 27 08:22:28 2004 +0000 Include prelude-message.h git-svn-id: file:///home/yoann/SVN/trunk/libprelude@3658 09c5ec92-17d4-0310-903a-819935f44dba src/include/prelude-message-buffered.h | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) commit c0184beb84f3f52f92455ece314623f5520f79be Author: Yoann Vandoorselaere Date: Thu May 27 08:21:42 2004 +0000 * prelude-message.c (prelude_msg_write): restore previous behavior. We also don't need to check whether the message is a fragment as header_index would be 0 anyway. (prelude_msg_mark_end): only mark end of the message if the message is not empty. Otherwise, prelude_msg_write() called after prelude_msg_mark_end() of an empty message wouldn't notify that the message is empty. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@3657 09c5ec92-17d4-0310-903a-819935f44dba src/prelude-message.c | 21 +++++++++++++-------- 1 files changed, 13 insertions(+), 8 deletions(-) commit 498d3d14273a9048bb7dbe5f2775cd04d1602d8f Author: Nicolas Delon Date: Wed May 26 21:48:39 2004 +0000 * bug fix: forgot to rename a function git-svn-id: file:///home/yoann/SVN/trunk/libprelude@3656 09c5ec92-17d4-0310-903a-819935f44dba bindings/python/prelude.py | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) commit 3f80ff15692b514c9b766fae6d105341f7ec3c12 Author: Yoann Vandoorselaere Date: Wed May 26 16:25:55 2004 +0000 * prelude-message.c (prelude_msg_mark_end): we don't need to increase write_index here. (msg_mark_end): rename to write_message_header. (prelude_msg_write): Check correctly whether message is empty. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@3655 09c5ec92-17d4-0310-903a-819935f44dba src/prelude-message.c | 26 +++++++++----------------- 1 files changed, 9 insertions(+), 17 deletions(-) commit 3da2c1ec051c8eae37cfbdaa6222dec20ed7476c Author: Yoann Vandoorselaere Date: Tue May 25 13:55:32 2004 +0000 * sensor.c: don't allocate an empty node unless we need it. (prelude_init): new function, to be used by manager. Parse common sensor/manager options. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@3652 09c5ec92-17d4-0310-903a-819935f44dba src/include/sensor.h | 3 + src/sensor.c | 167 +++++++++++++++++++++++++++---------------------- 2 files changed, 95 insertions(+), 75 deletions(-) commit 2624060ce91659fd7ba40d13079fe016619c4ab6 Author: Yoann Vandoorselaere Date: Tue May 25 13:09:59 2004 +0000 * include/idmef-tree.h: idmef_analyzer_t contain another idmef_analyzer_t object. (This is from the IDMEF v12 release candidate, and will allow to record an alert emission path). * idmef-wrappers-gen/IDMEFTree.pm: commit modification by Nicolas handling the case where an IDMEF object include itself. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@3651 09c5ec92-17d4-0310-903a-819935f44dba src/idmef-message-read.c | 15 +++++++++++- src/idmef-message-write.c | 3 +- src/idmef-tree-print.c | 14 ++++++++++- src/idmef-tree-to-string.c | 14 ++++++++++- src/idmef-tree-wrap.c | 43 +++++++++++++++++++++++++++++++++- src/idmef-wrappers-gen/IDMEFTree.pm | 13 +++++++++- src/include/idmef-message-id.h | 2 +- src/include/idmef-message-read.h | 2 +- src/include/idmef-message-write.h | 2 +- src/include/idmef-tree-data.h | 3 +- src/include/idmef-tree-print.h | 2 +- src/include/idmef-tree-to-string.h | 2 +- src/include/idmef-tree-wrap.h | 11 +++++++- src/include/idmef-tree.h | 4 ++- src/include/prelude-client.h | 3 ++ 15 files changed, 117 insertions(+), 16 deletions(-) commit f4aaeb466eb8d4d9a93562d73a7f68e2dffaf258 Author: Yoann Vandoorselaere Date: Tue May 25 13:07:19 2004 +0000 Include idmef.h and prelude-message.h git-svn-id: file:///home/yoann/SVN/trunk/libprelude@3650 09c5ec92-17d4-0310-903a-819935f44dba src/include/sensor.h | 3 +++ 1 files changed, 3 insertions(+), 0 deletions(-) commit e2157122767b840d6f9d70303ad80cc4b2a335ae Author: Yoann Vandoorselaere Date: Tue May 25 13:06:24 2004 +0000 don't install deprecated idmef-msg-send.h git-svn-id: file:///home/yoann/SVN/trunk/libprelude@3649 09c5ec92-17d4-0310-903a-819935f44dba src/include/Makefile.am | 1 - 1 files changed, 0 insertions(+), 1 deletions(-) commit b7f7bc6f4f408520de7941ffb7349a244aaccc39 Author: Yoann Vandoorselaere Date: Tue May 25 13:05:40 2004 +0000 Remove deprecated git-svn-id: file:///home/yoann/SVN/trunk/libprelude@3648 09c5ec92-17d4-0310-903a-819935f44dba src/idmef-msg-send.c | 798 ------------------------------------------ src/include/idmef-msg-send.h | 84 ----- 2 files changed, 0 insertions(+), 882 deletions(-) commit 4a210a3bf44c2a32bc0024ae9a752204eed06867 Author: Yoann Vandoorselaere Date: Tue May 25 11:46:24 2004 +0000 Include prelude-list.h and prelude-getopt.h git-svn-id: file:///home/yoann/SVN/trunk/libprelude@3647 09c5ec92-17d4-0310-903a-819935f44dba src/include/prelude-plugin.h | 3 +++ 1 files changed, 3 insertions(+), 0 deletions(-) commit 250fd89df0fd67327ccf140226377bb413239111 Author: Yoann Vandoorselaere Date: Tue May 25 11:45:01 2004 +0000 Include prelude-client.h git-svn-id: file:///home/yoann/SVN/trunk/libprelude@3646 09c5ec92-17d4-0310-903a-819935f44dba src/include/prelude-client-mgr.h | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) commit deea6312e235c05a5e27a1104df9c6f416b1e9bf Author: Yoann Vandoorselaere Date: Tue May 25 11:07:10 2004 +0000 include inttypes.h git-svn-id: file:///home/yoann/SVN/trunk/libprelude@3645 09c5ec92-17d4-0310-903a-819935f44dba src/include/prelude-io.h | 3 +++ 1 files changed, 3 insertions(+), 0 deletions(-) commit 3af2e30709526ef7947f18bb196adb5bbd36031a Author: Nicolas Delon Date: Mon May 24 21:28:03 2004 +0000 * bug fix: fix some errors made during the port to the last libprelude modifications git-svn-id: file:///home/yoann/SVN/trunk/libprelude@3644 09c5ec92-17d4-0310-903a-819935f44dba bindings/perl/Prelude.pm | 6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-) commit 4f93831b3e07e1bf40c8ccbe991726647f9d213a Author: Yoann Vandoorselaere Date: Mon May 24 18:12:17 2004 +0000 * prelude-io.c: include termios.h. If TIOCINQ is not defined, define it as FIONREAD. Use TIOCINQ. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@3643 09c5ec92-17d4-0310-903a-819935f44dba src/prelude-io.c | 9 +++++++-- 1 files changed, 7 insertions(+), 2 deletions(-) commit 61739169081cd4579514efadcba61584df746130 Author: Yoann Vandoorselaere Date: Sun May 23 21:29:58 2004 +0000 * include/idmef-tree.h (DYNAMIC_IDENT): new macro, telling that this ident should be auto generated if it is not set. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@3640 09c5ec92-17d4-0310-903a-819935f44dba src/idmef-message-read.c | 2 +- src/idmef-message-write.c | 6 +++--- src/idmef-tree-print.c | 2 +- src/idmef-tree-to-string.c | 2 +- src/idmef-tree-wrap.c | 6 +++--- src/include/idmef-message-id.h | 2 +- src/include/idmef-message-read.h | 2 +- src/include/idmef-message-write.h | 2 +- src/include/idmef-tree-data.h | 2 +- src/include/idmef-tree-print.h | 2 +- src/include/idmef-tree-to-string.h | 2 +- src/include/idmef-tree-wrap.h | 6 +++--- src/include/idmef-tree.h | 7 +++++-- 13 files changed, 23 insertions(+), 20 deletions(-) commit a339c9864dbf4c1e11d0914b876c9e17ea0b16fc Author: Yoann Vandoorselaere Date: Sun May 23 17:46:46 2004 +0000 * prelude-ident.c: new ident allocation shame. We don't need to keep the ident state on the disk anymore. * sensor.c (prelude_sensor_init): allocate the prelude-ident object for this sensor. * idmef-wrappers-gen/GenerateIDMEFMessageWriteC.pm: use the sensor prelude-ident object to allocate an ident if needed. * include/prelude-list.h: renamed and prefix API with prelude_. Update everything. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@3634 09c5ec92-17d4-0310-903a-819935f44dba bindings/perl/Prelude.c | 118 +++--- bindings/python/_prelude.c | 116 +++--- src/idmef-criteria-string.yac.c | 55 +- src/idmef-criteria-string.yac.h | 2 +- src/idmef-criteria-string.yac.y | 1 - src/idmef-criteria.c | 1 - src/idmef-criterion-value.c | 1 - src/idmef-data.c | 1 - src/idmef-message-read.c | 4 +- src/idmef-message-write.c | 27 +- src/idmef-message.c | 1 - src/idmef-msg-send.c | 50 +- src/idmef-object-value.c | 27 +- src/idmef-object.c | 23 +- src/idmef-tree-print.c | 2 +- src/idmef-tree-to-string.c | 2 +- src/idmef-tree-wrap.c | 524 ++++++++++---------- src/idmef-type.c | 2 +- src/idmef-util.c | 2 +- src/idmef-value-object.c | 5 +- src/idmef-value.c | 2 +- .../GenerateIDMEFMessageReadC.pm | 2 +- .../GenerateIDMEFMessageWriteC.pm | 30 +- src/idmef-wrappers-gen/GenerateIDMEFTreeWrapC.pm | 34 +- src/idmef-wrappers-gen/IDMEFTree.pm | 18 +- src/include/Makefile.am | 2 +- src/include/idmef-criteria.h | 2 +- src/include/idmef-data.h | 16 +- src/include/idmef-msg-send.h | 24 +- src/include/idmef-tree.h | 6 +- src/include/idmef-value-type.h | 2 +- src/include/idmef.h | 2 +- src/include/list.h | 210 -------- src/include/prelude-async.h | 3 + src/include/prelude-client-mgr.h | 4 +- src/include/prelude-getopt.h | 5 + src/include/prelude-ident.h | 2 +- src/include/prelude-linked-object.h | 18 +- src/include/prelude-list.h | 210 ++++++++ src/include/prelude-message.h | 17 +- src/include/prelude-plugin.h | 2 +- src/include/sensor.h | 4 +- src/include/timer.h | 6 +- src/prelude-async.c | 15 +- src/prelude-client-mgr.c | 81 ++-- src/prelude-client.c | 1 + src/prelude-getopt.c | 94 ++-- src/prelude-hash.c | 48 +- src/prelude-ident.c | 114 +---- src/prelude-message-buffered.c | 1 + src/prelude-message.c | 2 + src/prelude-plugin.c | 40 +- src/sensor.c | 11 +- src/timer.c | 40 +- src/variable.c | 16 +- 55 files changed, 1019 insertions(+), 1029 deletions(-) commit 2f5a3750ee0008600a94e91a156ec6a11a5afa1a Author: Yoann Vandoorselaere Date: Sun May 23 12:33:53 2004 +0000 cleanup prelude-linked-object API git-svn-id: file:///home/yoann/SVN/trunk/libprelude@3633 09c5ec92-17d4-0310-903a-819935f44dba src/idmef-object.c | 4 +- src/include/Makefile.am | 2 +- src/include/prelude-linked-object.h | 63 +++++++++++++++++++++++++++++++++++ src/include/prelude-list.h | 62 ---------------------------------- src/prelude-async.c | 10 +++--- src/prelude-client-mgr.c | 10 +++--- src/prelude-client.c | 3 +- src/prelude-message-buffered.c | 2 +- src/prelude-message.c | 2 +- src/prelude-plugin.c | 7 ++-- src/sensor.c | 2 +- src/timer.c | 4 +- 12 files changed, 85 insertions(+), 86 deletions(-) commit 16cf4559ec45da5a45f87976a10f464dd76cf623 Author: Yoann Vandoorselaere Date: Sun May 23 11:58:39 2004 +0000 * idmef-object.c: remove idmef_object_list related functions. Instead defined idmef-object as a prelude-linked-object. (idmef_object_get_internal): idmef_value_new_object() should take parent_type as argument, not child_type. * bindings: updated. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@3632 09c5ec92-17d4-0310-903a-819935f44dba bindings/perl/Prelude.c | 247 +++++++++----------------------------------- bindings/python/_prelude.c | 196 +++++++++-------------------------- src/idmef-object.c | 73 +------------ src/include/idmef-object.h | 12 +-- 4 files changed, 107 insertions(+), 421 deletions(-) commit fb38b6031c822a04a9784c22598e088a84063569 Author: Yoann Vandoorselaere Date: Sun May 23 11:15:22 2004 +0000 * idmef-criteria.c (idmef_criteria_clone): clone criterion also. This fix a crash in idmef_criteria_destroy happening if two criteria were sharing the same criterion. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@3630 09c5ec92-17d4-0310-903a-819935f44dba src/idmef-criteria.c | 5 +++-- 1 files changed, 3 insertions(+), 2 deletions(-) commit f31f2a9ca47d4d66c252524ed85a6349e054c9af Author: Yoann Vandoorselaere Date: Sat May 22 22:25:04 2004 +0000 * idmef-value-type.c: use sizeof(idmef_value_type_id_t), not sizeof(idmef_value_type_t). Fix a memory corruption problem on enumeration copy. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@3626 09c5ec92-17d4-0310-903a-819935f44dba src/idmef-value-type.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) commit b6a15e11137cfa84ba394efaca0f69ac86e4056d Author: Nicolas Delon Date: Sat May 22 13:52:57 2004 +0000 finish to port Prelude.pm to the last idmef-criteria changes git-svn-id: file:///home/yoann/SVN/trunk/libprelude@3625 09c5ec92-17d4-0310-903a-819935f44dba bindings/perl/Prelude.pm | 91 ++++------------------------------------------ 1 files changed, 8 insertions(+), 83 deletions(-) commit 122c4e61974d1c903e9d8b94972897760e8876e9 Author: Yoann Vandoorselaere Date: Sat May 22 13:17:21 2004 +0000 Regenerated bindings. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@3623 09c5ec92-17d4-0310-903a-819935f44dba bindings/perl/Prelude.c | 56 -------------------------------------------- bindings/python/_prelude.c | 44 +++------------------------------- src/include/idmef-time.h | 2 +- 3 files changed, 5 insertions(+), 97 deletions(-) commit 10838722a0d290fdaa59277a9084cae226f7fb92 Author: Yoann Vandoorselaere Date: Sat May 22 13:05:55 2004 +0000 Regenerated git-svn-id: file:///home/yoann/SVN/trunk/libprelude@3620 09c5ec92-17d4-0310-903a-819935f44dba src/idmef-criteria-string.yac.c | 246 ++++++++++++++++++++------------------- src/idmef-criteria-string.yac.h | 6 +- 2 files changed, 129 insertions(+), 123 deletions(-) commit 53747b2a2efc4902f9024c64de82481749e3c9fc Author: Yoann Vandoorselaere Date: Sat May 22 13:02:42 2004 +0000 Port binding to fit IDMEF namespace/API change git-svn-id: file:///home/yoann/SVN/trunk/libprelude@3619 09c5ec92-17d4-0310-903a-819935f44dba bindings/perl/Prelude.c |11228 ++++++++++++++++++-------------------------- bindings/perl/Prelude.pm | 28 +- bindings/python/_prelude.c | 890 ++-- bindings/python/prelude.py | 60 +- 4 files changed, 5254 insertions(+), 6952 deletions(-) commit 72f3ff2a65f9b0d8fc6488c5c684f9c1012f7099 Author: Yoann Vandoorselaere Date: Sat May 22 13:01:57 2004 +0000 * idmef-criteria-string.yac.y: * idmef-criteria.c: New implementation featuring a nicer algorithm. Walking a set of criteria is now O(n), and you never have to come back to a previous state while walking the tree. This also result in much cleaner code, and fix some of the old implementation bugs. The representation of a tree of test is much cleaner. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@3618 09c5ec92-17d4-0310-903a-819935f44dba src/idmef-criteria-string.yac.y | 103 +++++---- src/idmef-criteria.c | 503 ++++++++++++--------------------------- src/include/idmef-criteria.h | 40 ++-- 3 files changed, 233 insertions(+), 413 deletions(-) commit a095f9e642a30b9e45858cb45a5fa2039496fdcb Author: Yoann Vandoorselaere Date: Sat May 22 12:57:04 2004 +0000 * idmef-object.c: API modification/namespace cleanup. (idmef_object_get_numeric): call prelude_strbuf_dont_own() instead of strdup'ing the strbuf string. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@3617 09c5ec92-17d4-0310-903a-819935f44dba src/idmef-object.c | 47 ++++++++++++++++++++++++----------------------- 1 files changed, 24 insertions(+), 23 deletions(-) commit 5ff3b6a8118746e40929ada152c011bc07410124 Author: Yoann Vandoorselaere Date: Sat May 22 12:54:42 2004 +0000 * idmef-value-type.c (idmef_value_type_check_relation): new function, verify is a relation applying to a given type is valid. Each idmef_value_type should now provide their applicable relation set. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@3616 09c5ec92-17d4-0310-903a-819935f44dba src/idmef-value-type.c | 103 ++++++++++++++++++++++++++++++++--------------- 1 files changed, 70 insertions(+), 33 deletions(-) commit 56c7c4152f4e6b242c29c85c48c82be61b3a73fa Author: Yoann Vandoorselaere Date: Sat May 22 12:52:53 2004 +0000 * config-engine.c (parse_buffer): allow value containing '=' in the configuration file. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@3615 09c5ec92-17d4-0310-903a-819935f44dba src/config-engine.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) commit fb7590bc5ee26997d072d428aa71454e95d612aa Author: Yoann Vandoorselaere Date: Sat May 22 12:50:50 2004 +0000 Namespace/API consistency fix git-svn-id: file:///home/yoann/SVN/trunk/libprelude@3614 09c5ec92-17d4-0310-903a-819935f44dba src/idmef-tree-wrap.c | 116 ++++++++++++++++++++-------------------- src/include/idmef-object.h | 6 +- src/include/idmef-tree-wrap.h | 96 ++++++++++++++++---------------- src/include/idmef-value-type.h | 68 +++++++++-------------- src/include/idmef-value.h | 41 +++++++------- 5 files changed, 156 insertions(+), 171 deletions(-) commit 3fad1f11812469f0b2a1cb8b05377b233412ed9e Author: Yoann Vandoorselaere Date: Sat May 22 12:49:00 2004 +0000 Namespace/API consistency fix git-svn-id: file:///home/yoann/SVN/trunk/libprelude@3613 09c5ec92-17d4-0310-903a-819935f44dba src/idmef-criterion-value.c | 4 +- src/idmef-message-read.c | 2 +- src/idmef-message-write.c | 2 +- src/idmef-tree-print.c | 2 +- src/idmef-tree-to-string.c | 2 +- src/idmef-type.c | 32 ++-- src/idmef-value-object.c | 8 +- src/idmef-value.c | 163 ++++++++----- src/idmef-wrappers-gen/GenerateIDMEFTreeData.pm | 22 +- src/idmef-wrappers-gen/GenerateIDMEFTreeWrapC.pm | 10 +- src/idmef-wrappers-gen/GenerateIDMEFTreeWrapH.pm | 2 +- src/include/idmef-message-id.h | 2 +- src/include/idmef-message-read.h | 2 +- src/include/idmef-message-write.h | 2 +- src/include/idmef-tree-data.h | 280 +++++++++++----------- src/include/idmef-tree-print.h | 2 +- src/include/idmef-tree-to-string.h | 2 +- src/include/idmef-type.h | 30 ++-- 18 files changed, 301 insertions(+), 268 deletions(-) commit 727e1ffd60d0956c1e60017ad91cc8bc23d66d63 Author: Yoann Vandoorselaere Date: Fri May 21 18:20:54 2004 +0000 * common.c (prelude_resolve_addr): Patch from Krzysztof Zaraska : FreeBSD compatibility fix. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@3610 09c5ec92-17d4-0310-903a-819935f44dba src/common.c | 1 + 1 files changed, 1 insertions(+), 0 deletions(-) commit 82edd1155b84b841d632c1dcf86ad98faf1118b6 Author: Yoann Vandoorselaere Date: Fri May 21 17:58:58 2004 +0000 Merge back plugins-instances change into trunk git-svn-id: file:///home/yoann/SVN/trunk/libprelude@3605 09c5ec92-17d4-0310-903a-819935f44dba sensor-adduser/sensor-adduser.c | 10 +- src/Makefile.am | 2 +- src/config-engine.c | 40 ++- src/idmef-criteria-string.yac.c | 4 +- src/idmef-criteria-string.yac.y | 4 +- src/idmef-criteria.c | 8 +- src/idmef-value.c | 13 +- src/include/Makefile.am | 3 +- src/include/idmef-criteria-string.h | 2 +- src/include/idmef-criteria.h | 4 +- src/include/idmef-value.h | 2 +- src/include/plugin-common-prv.h | 139 ------ src/include/plugin-common.h | 85 ---- src/include/prelude-getopt.h | 21 +- src/include/prelude-plugin.h | 195 ++++++++ src/plugin-common.c | 511 --------------------- src/prelude-getopt-wide.c | 7 +- src/prelude-getopt.c | 215 ++++++---- src/prelude-plugin.c | 833 +++++++++++++++++++++++++++++++++++ src/sensor.c | 28 +- 20 files changed, 1257 insertions(+), 869 deletions(-) commit e1dbe5f4a7e7f12610c3c4907d2b127c07732cf8 Author: Nicolas Delon Date: Sun May 16 12:07:47 2004 +0000 fix a compilation error in the case libprelude is compiled without Perl/Python support git-svn-id: file:///home/yoann/SVN/trunk/libprelude@3588 09c5ec92-17d4-0310-903a-819935f44dba bindings/perl/Makefile.am | 4 +++- bindings/python/Makefile.am | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) commit 35c6a591b2a9cb8c0248ed264c70838c81afd769 Author: Yoann Vandoorselaere Date: Tue May 4 17:40:28 2004 +0000 * idmef-object.c (idmef_object_get_internal): Fixed a problem introduced by Nicolas modification to *_get_child() functions, which wouldn't return an idmef_value_t anymore in certain corner case. This wasn't properly handled in idmef_object_get_internal(). We now check whether the value to be returned is an idmef_value_t, or we use idmef_value_new_object() if it is not. This fix a bug spotted by John Green and Krzysztof Zaraska git-svn-id: file:///home/yoann/SVN/trunk/libprelude@3560 09c5ec92-17d4-0310-903a-819935f44dba src/idmef-object.c | 15 ++++++--------- 1 files changed, 6 insertions(+), 9 deletions(-) commit 7a4515cbc1fc515be447646312b20272b5087c72 Author: Yoann Vandoorselaere Date: Wed Mar 10 12:17:19 2004 +0000 * prelude-inet.c: define EAI error number here, with the PRELUDE_INET prefix. * include/prelude-inet.h: don't expose definition of EAI_* errors. * prelude-inet.c (gai_strerror_compat): return "Unknown error" instead of NULL if we get no match. (addrinfo_new): fix a possible leak on malloc error. Avoid possible mixup where EAI_* error where defined but we are using getaddrinfo compat. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@3505 09c5ec92-17d4-0310-903a-819935f44dba src/include/prelude-inet.h | 65 +------------------------------------------- src/prelude-inet.c | 30 +++++++++++++++----- 2 files changed, 23 insertions(+), 72 deletions(-) commit 32ea13be777f80b305ac6e6bda592144c75f2f49 Author: Yoann Vandoorselaere Date: Tue Mar 9 21:10:04 2004 +0000 commit missing git-svn-id: file:///home/yoann/SVN/trunk/libprelude@3500 09c5ec92-17d4-0310-903a-819935f44dba src/idmef-message-read.c | 2316 ++++++++++++++++++++++++++++++++++++ src/idmef-message-write.c | 760 ++++++++++++ src/idmef-tree-print.c | 2 +- src/idmef-tree-to-string.c | 2 +- src/include/idmef-message-id.h | 2 +- src/include/idmef-message-read.h | 62 + src/include/idmef-message-write.h | 37 + src/include/idmef-tree-print.h | 2 +- src/include/idmef-tree-to-string.h | 2 +- 9 files changed, 3180 insertions(+), 5 deletions(-) commit 7288a56d5f3256f0d3b9c502eab8c9977c35bc4f Author: Yoann Vandoorselaere Date: Sat Mar 6 20:40:48 2004 +0000 * include/idmef-tree.h: s/idmef_spoofed_t/idmef_source_spoofed_t/ s/idmef_decoy_t/idmef_target_decoy_t/ * update IDMEF code/bindings. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@3498 09c5ec92-17d4-0310-903a-819935f44dba bindings/perl/Prelude.c | 64 ++++++++++++++++++------------------ bindings/python/_prelude.c | 64 ++++++++++++++++++------------------ src/idmef-tree-print.c | 6 ++-- src/idmef-tree-to-string.c | 6 ++-- src/idmef-tree-wrap.c | 54 +++++++++++++++--------------- src/include/idmef-message-id.h | 2 +- src/include/idmef-tree-data.h | 10 +++--- src/include/idmef-tree-print.h | 2 +- src/include/idmef-tree-to-string.h | 2 +- src/include/idmef-tree-wrap.h | 34 +++++++++--------- src/include/idmef-tree.h | 8 ++-- 11 files changed, 126 insertions(+), 126 deletions(-) commit 73e29838d1b142b188c98157b39c7166e4bdca9a Author: Yoann Vandoorselaere Date: Fri Mar 5 19:41:25 2004 +0000 Update perl and python bindings. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@3496 09c5ec92-17d4-0310-903a-819935f44dba bindings/perl/Prelude.c | 49 ++++++++++++++++++++++--------------------- bindings/perl/Prelude.pm | 2 +- bindings/python/_prelude.c | 49 ++++++++++++++++++++++--------------------- bindings/python/prelude.py | 2 +- 4 files changed, 52 insertions(+), 50 deletions(-) commit 69655dcbe303ce927e2d72f0a008700259acb844 Author: Yoann Vandoorselaere Date: Fri Mar 5 18:55:21 2004 +0000 libprelude-idmef-namespace-cleanup branch merge. This fix all the namespace polution that libprelude used to do with non prefixed IDMEF enum. Also, the idmef-message-send/idmef-message-recv interface has been renamed to idmef-message-write/idmef-message-read for consistency reason git-svn-id: file:///home/yoann/SVN/trunk/libprelude@3484 09c5ec92-17d4-0310-903a-819935f44dba bindings/libprelude.i | 4 +- bindings/perl/Prelude.c | 770 ++++--- bindings/python/_prelude.c | 624 +++--- src/Makefile.am | 4 +- src/idmef-criteria-string.lex.c | 1 + src/idmef-criteria-string.yac.c | 1260 ++++++----- src/idmef-criteria-string.yac.h | 94 +- src/idmef-message-recv.c | 2316 -------------------- src/idmef-message-send.c | 760 ------- src/idmef-tree-print.c | 34 +- src/idmef-tree-to-string.c | 34 +- src/idmef-tree-wrap.c | 986 ++++----- src/idmef-util.c | 20 +- .../GenerateIDMEFMessageReadC.pm | 246 +++ .../GenerateIDMEFMessageReadH.pm | 64 + .../GenerateIDMEFMessageRecvC.pm | 246 --- .../GenerateIDMEFMessageRecvH.pm | 64 - .../GenerateIDMEFMessageSendC.pm | 277 --- .../GenerateIDMEFMessageSendH.pm | 61 - .../GenerateIDMEFMessageWriteC.pm | 277 +++ .../GenerateIDMEFMessageWriteH.pm | 61 + src/idmef-wrappers-gen/GenerateIDMEFTreeWrapC.pm | 41 +- src/idmef-wrappers-gen/generator.pl | 32 +- src/include/Makefile.am | 4 +- src/include/idmef-message-id.h | 2 +- src/include/idmef-message-recv.h | 62 - src/include/idmef-message-send.h | 37 - src/include/idmef-tree-data.h | 54 +- src/include/idmef-tree-print.h | 2 +- src/include/idmef-tree-to-string.h | 2 +- src/include/idmef-tree-wrap.h | 332 ++-- src/include/idmef-tree.h | 280 ++-- 32 files changed, 3126 insertions(+), 5925 deletions(-) commit eeb1abdd11c3641c66523bab3052b400182bdd5d Author: Yoann Vandoorselaere Date: Tue Mar 2 19:11:03 2004 +0000 * prelude-message.c (prelude_msg_write): return a ssize_t. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@3481 09c5ec92-17d4-0310-903a-819935f44dba src/include/prelude-message.h | 4 ++-- src/prelude-message.c | 6 ++---- 2 files changed, 4 insertions(+), 6 deletions(-) commit 7f78c371db1f0ef86107bd25d44dd7c996a57666 Author: Yoann Vandoorselaere Date: Tue Mar 2 18:59:52 2004 +0000 * prelude-getopt.c (get_missing_options): improve invalid option message. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@3480 09c5ec92-17d4-0310-903a-819935f44dba src/prelude-getopt.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) commit 28ab9cdc2b9dea7ff5904e978354084750ccace3 Author: Yoann Vandoorselaere Date: Sun Feb 29 15:41:49 2004 +0000 * include/list.h (list_get_next_safe): fix NULL pointer dereference in case of empty list. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@3466 09c5ec92-17d4-0310-903a-819935f44dba src/include/list.h | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) commit 1a51180d51e8b3204869df7e862692aecb92a1c8 Author: Yoann Vandoorselaere Date: Sun Feb 29 13:09:48 2004 +0000 * include/list.h (list_get_next_safe): implemented. Basically the same as list_get_next, but with the possibility to delete the object between two call. This macro look really ugly, but I think there is no possible way to do it cleaner. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@3464 09c5ec92-17d4-0310-903a-819935f44dba src/include/list.h | 13 ++++++++++++- 1 files changed, 12 insertions(+), 1 deletions(-) commit 57391fbb0a082f86e795c6b4b021b65879a0fafe Author: Yoann Vandoorselaere Date: Tue Feb 24 17:35:02 2004 +0000 revert test commit. Test multiline. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@3439 09c5ec92-17d4-0310-903a-819935f44dba README | 1 - 1 files changed, 0 insertions(+), 1 deletions(-) commit 3751f446c7066703a36c393cbd8d97dc9bdc4a6f Author: Yoann Vandoorselaere Date: Tue Feb 24 17:34:08 2004 +0000 test SVN cia git-svn-id: file:///home/yoann/SVN/trunk/libprelude@3438 09c5ec92-17d4-0310-903a-819935f44dba README | 1 + 1 files changed, 1 insertions(+), 0 deletions(-) commit ef9d2142f1cdb87689d2b5bea4415c1ee0504c46 Author: Yoann Vandoorselaere Date: Tue Feb 24 16:38:12 2004 +0000 revert test git-svn-id: file:///home/yoann/SVN/trunk/libprelude@3437 09c5ec92-17d4-0310-903a-819935f44dba README | 1 - 1 files changed, 0 insertions(+), 1 deletions(-) commit c841bcc69de4b61dd0c68a2fc3eaabfad645ac04 Author: Yoann Vandoorselaere Date: Tue Feb 24 15:47:05 2004 +0000 test commit git-svn-id: file:///home/yoann/SVN/trunk/libprelude@3436 09c5ec92-17d4-0310-903a-819935f44dba README | 1 + 1 files changed, 1 insertions(+), 0 deletions(-) commit 30d1d184c601b01996a560fc280ff566368b1de9 Author: Yoann Vandoorselaere Date: Sun Feb 8 14:35:33 2004 +0000 * src/common.c (prelude_get_gmt_offset): fix shadowing parameters. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@3379 09c5ec92-17d4-0310-903a-819935f44dba ChangeLog | 8 ++++++++ src/common.c | 2 +- 2 files changed, 9 insertions(+), 1 deletions(-) commit 2d0ebc8f6ec813b8d821199df51ade5bf129b302 Author: Yoann Vandoorselaere Date: Fri Feb 6 00:45:05 2004 +0000 * bindings/: regenerated. * src/include/extract.h (extract_characters_safe): check that length is at least 2 byte for safety. * src/idmef-util.c (idmef_additionaldata_data_to_string): make size a pointer. Uppon return, size is updated to fit the length of additional data. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@3376 09c5ec92-17d4-0310-903a-819935f44dba ChangeLog | 12 ++++++++++++ bindings/perl/Prelude.c | 11 ++++++++--- bindings/python/_prelude.c | 6 +++--- src/idmef-util.c | 42 +++++++++++++++++++++--------------------- src/include/extract.h | 6 +++--- src/include/idmef-util.h | 2 +- 6 files changed, 48 insertions(+), 31 deletions(-) commit 39ea39187d60b8835c74a853d18aa9c5f42511a8 Author: Yoann Vandoorselaere Date: Thu Feb 5 16:00:07 2004 +0000 * bindings/libprelude.i: Include common.h, s/prelude_get_process_name_and_path/prelude_get_file_name_and_path/ Regenerated bindings. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@3369 09c5ec92-17d4-0310-903a-819935f44dba ChangeLog | 6 ++ bindings/libprelude.i | 3 +- bindings/perl/Prelude.c | 216 +++++++++++--------------------------------- bindings/python/_prelude.c | 205 +++++++++++------------------------------- 4 files changed, 115 insertions(+), 315 deletions(-) commit 8cef1672412ebfb49a72bce57a650a2433e2902e Author: Yoann Vandoorselaere Date: Thu Feb 5 15:31:43 2004 +0000 forgot this one. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@3368 09c5ec92-17d4-0310-903a-819935f44dba src/sensor.c | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) commit a86818a7ae00f64590d05e4bc1dc24dfa2a27f71 Author: Yoann Vandoorselaere Date: Tue Feb 3 10:19:26 2004 +0000 * src/sensor.c (get_process_name): use prelude_get_file_name_and_path. * src/idmef-criterion-value.c (get_tm_and_offset): update for prelude_get_gmt_offset() API change. * src/common.c (prelude_get_gmt_offset): moved from idmef-util.c. Re-worked so that it is provided with the local time. * src/idmef-util.c (idmef_additionaldata_data_to_string): (prelude_get_process_name_and_path): moved from here. * src/common.c (prelude_get_file_name_and_path): rewrite prelude_get_process_name_and_path() and put it here. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@3360 09c5ec92-17d4-0310-903a-819935f44dba ChangeLog | 15 ++++++++ src/common.c | 56 ++++++++++++++++++++++++++++- src/idmef-criterion-value.c | 3 +- src/idmef-util.c | 85 ------------------------------------------- src/include/common.h | 6 +++- src/include/idmef-util.h | 2 - 6 files changed, 77 insertions(+), 90 deletions(-) commit 27a0394f64605cab336557c318920f4007eb7c75 Author: Yoann Vandoorselaere Date: Tue Feb 3 00:24:03 2004 +0000 update bindings. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@3358 09c5ec92-17d4-0310-903a-819935f44dba bindings/perl/Prelude.c | 163 +++++++++++++++++++++++++++----------------- bindings/python/_prelude.c | 142 +++++++++++++++++++++++--------------- 2 files changed, 187 insertions(+), 118 deletions(-) commit e77bc6377cc2ea238f49a74c1b4091c7037c8383 Author: Yoann Vandoorselaere Date: Tue Feb 3 00:17:45 2004 +0000 * src/idmef-util.c (idmef_additionaldata_data_to_string): API change. Stop using a static buffer, use the buffer provided as argument. When the additional data type is byte or character, directly return the content of the data. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@3356 09c5ec92-17d4-0310-903a-819935f44dba ChangeLog | 7 ++++ src/idmef-util.c | 87 ++++++++++------------------------------------ src/include/idmef-util.h | 5 ++- 3 files changed, 29 insertions(+), 70 deletions(-) commit 7642050d6ff1afa11adb7b5e904c17c70da3c71b Author: Nicolas Delon Date: Sat Jan 31 07:43:39 2004 +0000 * src/idmef-value.c (idmef_value_clone) bug fix, enum type was not cloned correctly (forget to copy the object_type field of idmef_value) git-svn-id: file:///home/yoann/SVN/trunk/libprelude@3339 09c5ec92-17d4-0310-903a-819935f44dba ChangeLog | 7 +++++++ src/idmef-value.c | 18 ++++++++++++++++++ 2 files changed, 25 insertions(+), 0 deletions(-) commit cb42980fddd33e5b44ab64921c306e15b80eafaa Author: Nicolas Delon Date: Wed Jan 28 07:27:02 2004 +0000 * src/idmef-criterion-value.c: add the "last" keyword for non linear time values relation '=' with this keyword will not work as expected for the moment (because it requires to be transformed into a criteria (to have a range) and not a simple criterion) btw, it can be done manually with two idmef_criterion while waiting for a correct implementation git-svn-id: file:///home/yoann/SVN/trunk/libprelude@3335 09c5ec92-17d4-0310-903a-819935f44dba ChangeLog | 11 +++++ src/idmef-criterion-value.c | 95 +++++++++++++++++++++++++++++++++++-------- 2 files changed, 89 insertions(+), 17 deletions(-) commit 918639ec06b83e0ab85f0645f71848ed04453a5c Author: Nicolas Delon Date: Sun Jan 25 17:47:06 2004 +0000 * bindings/perl/Prelude.c: regenerated * bindings/perl/Prelude.pm: fit idmef-criteria changes * bindings/python/_prelude.c: regenerated * bindings/python/prelude.py: (IDMEFMessage.__getitem__) bug fix, check if c_value != None before destroying it * src/idmef-criteria-string.yac.y: fit idmef-criteria changes bug fix, check yyparse return value * src/idmef-criteria.c: * src/include/idmef-criteria.h: perform validity checks for idmef criterion replace idmef_value in idmef_criterion by the new idmef_criterion_value abstraction layer * src/idmef-criterion-value.c: * src/include/idmef-criterion-value.h: new files create a new abtraction layer uppon the value in a idmef-criterion this allow the use of complex date description (idmef_criterion_value_non_linear_time) * src/idmef-util.c: * src/include/idmef-util.h: (prelude_get_gmt_offset) new function git-svn-id: file:///home/yoann/SVN/trunk/libprelude@3332 09c5ec92-17d4-0310-903a-819935f44dba ChangeLog | 36 ++ bindings/perl/Prelude.c | 117 +++--- bindings/perl/Prelude.pm | 4 +- bindings/python/_prelude.c | 111 +++--- bindings/python/prelude.py | 3 + src/Makefile.am | 1 + src/idmef-criteria-string.lex.c | 11 +- src/idmef-criteria-string.yac.c | 64 ++-- src/idmef-criteria-string.yac.y | 14 +- src/idmef-criteria.c | 212 ++++++++- src/idmef-criterion-value.c | 875 +++++++++++++++++++++++++++++++++++ src/idmef-util.c | 22 + src/include/Makefile.am | 1 + src/include/idmef-criteria.h | 6 +- src/include/idmef-criterion-value.h | 84 ++++ src/include/idmef-util.h | 1 + src/include/idmef.h | 1 + 17 files changed, 1388 insertions(+), 175 deletions(-) commit 4cd61920a5a526078253c5b56251ba2fd170037c Author: Yoann Vandoorselaere Date: Sat Jan 17 10:00:46 2004 +0000 * configure.in: correct python and perl check. Check that the required header file is present. Fix build failure on system missing headers file. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@3258 09c5ec92-17d4-0310-903a-819935f44dba ChangeLog | 4 +++ configure.in | 85 ++++++++++++++++++++++++++++++---------------------------- 2 files changed, 48 insertions(+), 41 deletions(-) commit fdb862398d1d578bc8435f2a03c1b26b61aa87ca Author: Yoann Vandoorselaere Date: Sat Jan 17 09:15:43 2004 +0000 * src/prelude-log.c (syslog_log, strip_return): strip '\n' character at the head and tail of the buffer when logging to syslog(). git-svn-id: file:///home/yoann/SVN/trunk/libprelude@3257 09c5ec92-17d4-0310-903a-819935f44dba ChangeLog | 4 ++++ src/prelude-log.c | 38 +++++++++++++++++++++++++++++--------- 2 files changed, 33 insertions(+), 9 deletions(-) commit c8b34f83dd15b8721a459fa310bc77f3b22c130b Author: Yoann Vandoorselaere Date: Sat Jan 17 09:02:33 2004 +0000 * src/prelude-getopt.c (get_missing_options): carry more information in the error. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@3256 09c5ec92-17d4-0310-903a-819935f44dba ChangeLog | 5 +++++ src/prelude-getopt.c | 7 ++++--- 2 files changed, 9 insertions(+), 3 deletions(-) commit b184be32679d7895c9af1220e68ab1bd90b4e284 Author: Yoann Vandoorselaere Date: Wed Jan 14 22:32:12 2004 +0000 * src/sensor.c (prelude_analyzer_fill_infos): remove crappy bugged code trying to copy the node to the analyzer, and use a simple refcount. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@3217 09c5ec92-17d4-0310-903a-819935f44dba ChangeLog | 11 +++++++++++ src/daemonize.c | 4 ++-- src/sensor.c | 41 ++++------------------------------------- 3 files changed, 17 insertions(+), 39 deletions(-) commit 0e2e6f46da9bc7711190212559b25e83bd5616b7 Author: Nicolas Delon Date: Wed Jan 14 21:47:11 2004 +0000 * src/idmef-time.c: (idmef_time_get_db_timestamp) add a space character between date and hour to make postgresql happy git-svn-id: file:///home/yoann/SVN/trunk/libprelude@3214 09c5ec92-17d4-0310-903a-819935f44dba ChangeLog | 7 +++++++ src/idmef-time.c | 2 +- 2 files changed, 8 insertions(+), 1 deletions(-) commit d701d197a7d6a3e7ce6c33451abdd84742fe0ef5 Author: Yoann Vandoorselaere Date: Sun Jan 11 04:56:35 2004 +0000 Broken coffee maker is good for bugs... git-svn-id: file:///home/yoann/SVN/trunk/libprelude@3198 09c5ec92-17d4-0310-903a-819935f44dba ChangeLog | 3 +++ src/config-engine.c | 2 +- 2 files changed, 4 insertions(+), 1 deletions(-) commit 63fe1ce092d11f80d94d1674affc9a8b81cbb842 Author: Yoann Vandoorselaere Date: Sun Jan 11 03:55:40 2004 +0000 There really are day where you should not wake up... git-svn-id: file:///home/yoann/SVN/trunk/libprelude@3197 09c5ec92-17d4-0310-903a-819935f44dba sensor-adduser/sensor-adduser.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) commit 5e721a52635e777da17da296f5d0577f5ccafdd9 Author: Yoann Vandoorselaere Date: Sun Jan 11 03:49:29 2004 +0000 * sensor-adduser/sensor-adduser.c (set_sensor_name): dup optarg. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@3196 09c5ec92-17d4-0310-903a-819935f44dba ChangeLog | 3 +++ sensor-adduser/sensor-adduser.c | 4 ++-- 2 files changed, 5 insertions(+), 2 deletions(-) commit a7e790922e08cb37d1936d8ba2c1dbd62fa9a5d7 Author: Yoann Vandoorselaere Date: Sun Jan 11 01:04:05 2004 +0000 * src/sensor.c (setup_analyzer_node_location) (setup_analyzer_node_name, setup_analyzer_node_address_address) (setup_analyzer_node_address_netmask) (setup_analyzer_node_address_vlan_name) (prelude_analyzer_fill_infos): fix invalid memory references... String coming from prelude-getopt should be strdup'd. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@3194 09c5ec92-17d4-0310-903a-819935f44dba ChangeLog | 10 ++++++++++ src/sensor.c | 22 +++++++++++----------- 2 files changed, 21 insertions(+), 11 deletions(-) commit cc40ef0ba56b511e6ab43f61324d7e6472ab3930 Author: Yoann Vandoorselaere Date: Sat Jan 10 13:10:15 2004 +0000 * src/config-engine.c (is_section): do not match a section if the '[' characters is preceded by other characters. (strip_value): handle quoted entry. (cmp_section): remove. handle tab everywhere, refactorize code. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@3186 09c5ec92-17d4-0310-903a-819935f44dba ChangeLog | 2 ++ src/config-engine.c | 18 ++++++++++++------ 2 files changed, 14 insertions(+), 6 deletions(-) commit b3578f9a06f03df7fa867d4655d05cedca61a4e3 Author: Yoann Vandoorselaere Date: Sat Jan 10 12:59:53 2004 +0000 * src/config-engine.c (is_section): do not match a section if the '[' characters is preceded by other characters. (cmp_section): remove. handle tab everywhere, refactorize code. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@3185 09c5ec92-17d4-0310-903a-819935f44dba ChangeLog | 9 ++ src/config-engine.c | 275 ++++++++++++++++++++------------------------------ 2 files changed, 119 insertions(+), 165 deletions(-) commit e649a62d4f31739829ffcdbaa04eb0668c0b3803 Author: Yoann Vandoorselaere Date: Fri Jan 9 20:42:00 2004 +0000 * src/prelude-getopt.c (search_option): use strcasecmp to search the option. (get_missing_options): complete rewrite of the code getting missing option from the configuration file, so that we don't lookup option on a per option basis, but in the order they were specified in the config file. This allow the caller to much easily deal with option that depend on each other. Mainly LML now can deal with different logfile with different format. * src/config-engine.c (is_line_commented, is_section): consistency fix, handle tab. (config_get): use new helper function. The return value now have to be freed. (config_get_next): new function. Allow the caller to parse the whole configuration file. (parse_buffer): impl. separate entry and value from the buffer. (strip_value): impl. Strip out extra value characters. (get_section): impl. Return section name. (load_file_in_memory): do not use prelude_read_multiline(), as it would cause problem when reporting line number, and we don't care about multiline handling here. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@3182 09c5ec92-17d4-0310-903a-819935f44dba ChangeLog | 30 ++++++ src/config-engine.c | 218 +++++++++++++++++++++++++++++++++++-------- src/include/config-engine.h | 7 +- src/prelude-getopt.c | 204 ++++++++++------------------------------ 4 files changed, 267 insertions(+), 192 deletions(-) commit 6a3f6eb096183ee82113df045892c0183e2a3b42 Author: Nicolas Delon Date: Wed Jan 7 16:47:05 2004 +0000 * src/idmef-message.c: * src/include/idmef-message.h: * src/include/idmef-tree.h: drop the cache feature, since idmef_object_get' rework (performance has been improved) this is no more necessary idmef_message_set do not destroy object and value anymore * bindings/perl/Prelude.c: regenerated * bindings/perl/Prelude.pm: fit idmef-message changes * bindings/python/_prelude.c: regenerated * bindings/python/prelude.py: fit idmef-message changes git-svn-id: file:///home/yoann/SVN/trunk/libprelude@3163 09c5ec92-17d4-0310-903a-819935f44dba ChangeLog | 21 ++++ bindings/perl/Prelude.c | 250 +++++++++++++++++++++--------------------- bindings/perl/Prelude.pm | 26 +---- bindings/python/_prelude.c | 225 +++++++++++++++++++++----------------- bindings/python/prelude.py | 9 +- src/idmef-message.c | 100 +----------------- src/include/idmef-message.h | 3 - src/include/idmef-tree.h | 1 - 8 files changed, 284 insertions(+), 351 deletions(-) commit 379ad59db66c0f572d681c7d2b0e6590b0f57eb7 Author: Yoann Vandoorselaere Date: Tue Jan 6 11:05:31 2004 +0000 forgot in my last commit. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@3159 09c5ec92-17d4-0310-903a-819935f44dba configure.in | 1 + 1 files changed, 1 insertions(+), 0 deletions(-) commit 12682c30a50420b5527dcb711f43af60df6cee2a Author: Yoann Vandoorselaere Date: Tue Jan 6 11:03:31 2004 +0000 * configure.in: call AC_SYS_LARGEFILE * src/prelude-client-mgr.c: include config.h 64 bits file offset are now activated for fallover files. No more 2Gb limitation. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@3158 09c5ec92-17d4-0310-903a-819935f44dba ChangeLog | 8 ++++++++ src/prelude-client-mgr.c | 8 +++++++- 2 files changed, 15 insertions(+), 1 deletions(-) commit a28203ae77950542169aa23b57e3652fc12048c8 Author: Yoann Vandoorselaere Date: Tue Jan 6 01:32:09 2004 +0000 * src/prelude-getopt.c (call_option_from_cb_list): don't leak value returned by lookup_variable_if_needed(). git-svn-id: file:///home/yoann/SVN/trunk/libprelude@3157 09c5ec92-17d4-0310-903a-819935f44dba ChangeLog | 5 +++++ src/prelude-getopt.c | 10 +++++++--- 2 files changed, 12 insertions(+), 3 deletions(-) commit 1b7dc3f35091317fb9402de1bad86b9946d2cd8f Author: Nicolas Delon Date: Fri Jan 2 21:53:44 2004 +0000 * bindings/python/prelude.py: bug fix: bad variable name * src/idmef-time.c: (idmef_time_get_idmef_timestamp) (idmef_time_get_ntp_timestamp) (idmef_time_get_timestamp) bug fix (bug was introduced the 2003-12-29): 0 was returned instead of the len of the buffer (idmef_time_set_db_timestamp) (idmef_time_new_db_timestamp) new functions, set an idmef_time_t with a datetime db field (idmef_time_set_ntp_timestamp) convert time in UTC (idmef_time_set_ntp_timestamp) convert time in localtime * src/include/idmef-time.h: cleanup git-svn-id: file:///home/yoann/SVN/trunk/libprelude@3150 09c5ec92-17d4-0310-903a-819935f44dba ChangeLog | 24 +++++++- bindings/python/prelude.py | 2 +- src/idmef-time.c | 143 +++++++++++++++++++++++++++++++++++--------- src/include/idmef-time.h | 30 +++------- 4 files changed, 147 insertions(+), 52 deletions(-) commit abae64bb86d1c18aa4f10e30aff9d5b76dae4f11 Author: Nicolas Delon Date: Thu Jan 1 23:17:42 2004 +0000 * bindings/perl/Prelude.c: * bindings/python/_prelude.c: regenerated * src/idmef-data.c: * src/include/idmef-data.h: (idmef_data_is_empty) new function * src/idmef-string.c: * src/include/idmef-string.h: (idmef_string_is_empty) new function * src/idmef-time.c: (idmef_time_get_db_timestamp) feed buffer with "NULL" if the given pointer is NULL and add simple quote to the db timestamp string * src/idmef-util.c: (idmef_additionaldata_data_to_string) instead of writing to a given buffer, return a const char * thats point to a function static buffer (if a conversion was needed) or to the data field within the additional_data given First commit of the new year ;) git-svn-id: file:///home/yoann/SVN/trunk/libprelude@3147 09c5ec92-17d4-0310-903a-819935f44dba ChangeLog | 29 +++++++++++++++ bindings/perl/Prelude.c | 83 +++++++++++++++++++++++++++++++++++++------ bindings/python/_prelude.c | 51 +++++++++++++++++++++----- src/idmef-data.c | 8 ++++ src/idmef-string.c | 7 ++++ src/idmef-time.c | 20 +++++++---- src/idmef-util.c | 39 ++++++++------------ src/include/idmef-data.h | 16 +++++--- src/include/idmef-string.h | 5 +-- src/include/idmef-util.h | 2 +- 10 files changed, 198 insertions(+), 62 deletions(-) commit 8569454341312a38ad8308404fe34259df2177e5 Author: Nicolas Delon Date: Mon Dec 29 18:29:01 2003 +0000 * src/idmef-time.c: (idmef_time_get_idmef_timestamp) (idmef_time_get_idmef_timestamp) (idmef_time_get_timestamp) bug fix: also check if the snprintf return value is not bigger than the given size * src/include/idmef-util.h: MAX_NTP_TIMESTAMP_SIZE: include the trailing nul byte in the size, it fix a bug in libpreludedb git-svn-id: file:///home/yoann/SVN/trunk/libprelude@3138 09c5ec92-17d4-0310-903a-819935f44dba ChangeLog | 13 +++++++++++++ src/idmef-time.c | 31 ++++++++++++++++++------------- src/include/idmef-util.h | 2 +- 3 files changed, 32 insertions(+), 14 deletions(-) commit 8784b583c616acc5e8a41b9f40d030b6f97d03ea Author: Nicolas Delon Date: Mon Dec 29 13:53:17 2003 +0000 * bindings/python/prelude.py: cleanup git-svn-id: file:///home/yoann/SVN/trunk/libprelude@3132 09c5ec92-17d4-0310-903a-819935f44dba ChangeLog | 5 + bindings/python/prelude.py | 228 ++++++++++++++++++++++---------------------- 2 files changed, 120 insertions(+), 113 deletions(-) commit bbebaf6be548f703c0acc00eabff49faa15639fe Author: Nicolas Delon Date: Sun Dec 28 17:34:47 2003 +0000 * bindings/libprelude.i: (prelude_alert_fill_infos) (prelude_heartbeat_fill_infos) setup process name and path with prelude_get_process_name_and_path * bindings/perl/Prelude.c: * bindings/python/_prelude.c: regenerated * bindings/perl/Prelude.pm: * bindings/python/prelude.py: fit prelude_alert_fill_infos last changes * src/idmef-util.c: * src/include/idmef-util.h: (prelude_get_process_name_and_path) new function * src/sensor.c: (get_process_name) updated to use prelude_get_process_name_and_path git-svn-id: file:///home/yoann/SVN/trunk/libprelude@3120 09c5ec92-17d4-0310-903a-819935f44dba ChangeLog | 24 +++++ bindings/libprelude.i | 66 +++++++++++++-- bindings/perl/Prelude.c | 203 +++++++++++++++++++++++++++++++++++++++++--- bindings/perl/Prelude.pm | 5 +- bindings/python/_prelude.c | 200 +++++++++++++++++++++++++++++++++++++++++-- bindings/python/prelude.py | 2 +- src/idmef-util.c | 72 ++++++++++++++++ src/include/idmef-util.h | 1 + src/sensor.c | 14 +--- 9 files changed, 547 insertions(+), 40 deletions(-) commit 98761294fc1d77f119907e92f00c8c3a8071733b Author: Yoann Vandoorselaere Date: Sun Dec 28 00:36:56 2003 +0000 *** empty log message *** git-svn-id: file:///home/yoann/SVN/trunk/libprelude@3110 09c5ec92-17d4-0310-903a-819935f44dba ChangeLog | 16 ++++++++++++++++ 1 files changed, 16 insertions(+), 0 deletions(-) commit a7e4453004bfc895ccaebd988c007a5030e64b54 Author: Yoann Vandoorselaere Date: Sun Dec 28 00:35:58 2003 +0000 * src/prelude-client.c (prelude_client_send_msg): after writing a message, check that the tcp connection is still established, otherwise, handle breakage and trigger failover. (is_tcp_connection_still_established): moved from prelude-io.c. (start_inet_connection): (start_unix_connection): s/socket_io/sys_io/ * src/prelude-io.c: remove the socket_io IO type. The check issued by this type really shouldn't be done here. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@3109 09c5ec92-17d4-0310-903a-819935f44dba src/include/prelude-io.h | 2 - src/prelude-client.c | 76 +++++++++++++++++++++++---- src/prelude-io.c | 130 +++------------------------------------------ 3 files changed, 74 insertions(+), 134 deletions(-) commit 7414753986177f002627941f7d82624ced984f2d Author: Yoann Vandoorselaere Date: Sun Dec 28 00:29:27 2003 +0000 * src/prelude-message.c (set_data, prelude_msg_forward): datatype safety. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@3108 09c5ec92-17d4-0310-903a-819935f44dba ChangeLog | 5 +++++ src/prelude-message.c | 6 +++--- 2 files changed, 8 insertions(+), 3 deletions(-) commit 4d9ffaf15f82ca2268921bbb40be32607e1e8b53 Author: Nicolas Delon Date: Sat Dec 27 18:35:57 2003 +0000 * src/idmef-value.c: (idmef_value_to_string) bug fix, enum type was not handled since idmef-value.c rework (it was not handled at idmef-value-type level but enum need the object_type field in addition of the enum value to be converted into string, so the conversion must be done at idmef-value level) git-svn-id: file:///home/yoann/SVN/trunk/libprelude@3102 09c5ec92-17d4-0310-903a-819935f44dba ChangeLog | 10 ++++++++++ src/idmef-value.c | 27 +++++++++++++++++++++++++-- src/include/idmef-util.h | 1 - 3 files changed, 35 insertions(+), 3 deletions(-) commit 5f59bcf7c90efb129319189776fdb8d7c17a8eb8 Author: Nicolas Delon Date: Sat Dec 27 15:00:11 2003 +0000 * src/prelude-strbuf.c: (prelude_strbuf_is_empty) change return value returns 1 (true/yes) if strbuf is empty and 0 (false/no) otherwise it is more natural than 0 and -1 (return values < 0 are used as error code, and we don't have any error here) moreover, it was the way libpreludedb's strbuf works, and when libpreludedb has been changed to use prelude-strbuf instead of strbuf, it has been broken by now everything works fine git-svn-id: file:///home/yoann/SVN/trunk/libprelude@3097 09c5ec92-17d4-0310-903a-819935f44dba ChangeLog | 12 ++++++++++++ src/prelude-strbuf.c | 2 +- 2 files changed, 13 insertions(+), 1 deletions(-) commit e10517f5323d966697cdfd571ac4246df6d22476 Author: Nicolas Delon Date: Sat Dec 27 00:32:40 2003 +0000 update Prelude.c git-svn-id: file:///home/yoann/SVN/trunk/libprelude@3094 09c5ec92-17d4-0310-903a-819935f44dba bindings/perl/Prelude.c | 1049 ++++++++++++++++++++++++----------------------- 1 files changed, 531 insertions(+), 518 deletions(-) commit a934039005d2308263dce1a3bc72b2d95e0255ca Author: Nicolas Delon Date: Fri Dec 26 22:33:43 2003 +0000 * src/idmef-value.c: (idmef_value_get_idmef_type) also return object_type if value's type is type_enum * bindings/libprelude.i: bind idmef-type.h * bindings/perl/Prelude.c: * bindings/python/_prelude.c: regenerated * bindings/perl/Prelude.pm: * bindings/python/prelude.py: return enums as strings git-svn-id: file:///home/yoann/SVN/trunk/libprelude@3093 09c5ec92-17d4-0310-903a-819935f44dba ChangeLog | 17 + bindings/libprelude.i | 1 + bindings/perl/Prelude.pm | 3 +- bindings/python/_prelude.c | 797 ++++++++++++++++++++++---------------------- bindings/python/prelude.py | 5 +- src/idmef-value.c | 2 +- 6 files changed, 426 insertions(+), 399 deletions(-) commit cac7201cc4c667a0327fc2db4a947be8b7df88e7 Author: Nicolas Delon Date: Fri Dec 26 21:17:04 2003 +0000 * configure.in: don't regenerate the .c source files of bindings during ./configure git-svn-id: file:///home/yoann/SVN/trunk/libprelude@3085 09c5ec92-17d4-0310-903a-819935f44dba ChangeLog | 6 ++++++ configure.in | 12 ------------ 2 files changed, 6 insertions(+), 12 deletions(-) commit 1e9bc0b724f1edc48eb6f81c57a2289f50c6b8fe Author: Nicolas Delon Date: Fri Dec 26 18:13:56 2003 +0000 * bindings/generate.sh: new script that simply call the generate.sh of perl and python directories git-svn-id: file:///home/yoann/SVN/trunk/libprelude@3080 09c5ec92-17d4-0310-903a-819935f44dba ChangeLog | 6 +++++- bindings/generate.sh | 5 +++++ 2 files changed, 10 insertions(+), 1 deletions(-) commit 04b5eb8bff2bdc1fcfe7fea2a578a560e1eaa5d5 Author: Nicolas Delon Date: Fri Dec 26 18:11:53 2003 +0000 * bindings/python/_prelude.c: regenerated * bindings/python/prelude.py: cleanup * src/idmef-criteria.c: (idmef_criteria_clone) bug fix, the way the operators were handled was buggy git-svn-id: file:///home/yoann/SVN/trunk/libprelude@3079 09c5ec92-17d4-0310-903a-819935f44dba ChangeLog | 12 + bindings/python/_prelude.c | 596 ++++++++++++++++++++++++++++++++++++++++++-- bindings/python/prelude.py | 65 +++--- src/idmef-criteria.c | 6 +- 4 files changed, 630 insertions(+), 49 deletions(-) commit 62d97a0227b89283153c5998a323874606d6734d Author: Yoann Vandoorselaere Date: Thu Dec 25 17:17:47 2003 +0000 * src/idmef-data.c (idmef_data_new): revert previous change (unsigned char pointer to void pointer), cause it was causing problem for binding. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@3049 09c5ec92-17d4-0310-903a-819935f44dba ChangeLog | 4 ++++ src/idmef-data.c | 16 ++++++++-------- src/include/idmef-data.h | 18 +++++++++--------- 3 files changed, 21 insertions(+), 17 deletions(-) commit 58562266399b9cf9e2c4f5e6c2c4d590b97dc008 Author: Yoann Vandoorselaere Date: Thu Dec 25 16:34:29 2003 +0000 * src/idmef-wrappers-gen/GenerateIDMEFMessageSendC.pm (struct): don't call prelude_msgbuf_mark_end() on idmef_message_send(). Doing so is up to the caller, which might want to add more information to the written alert. * src/idmef-data.c (idmef_data_new_dup): (idmef_data_new_nodup): (idmef_data_new_ref): (idmef_data_set_dup): (idmef_data_set_nodup): (idmef_data_set_ref): (idmef_data_get_data): * src/idmef-string.c (idmef_string_new_ref_fast): str is const. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@3046 09c5ec92-17d4-0310-903a-819935f44dba ChangeLog | 18 +++++++++++++++++ src/idmef-data.c | 18 ++++++++-------- src/idmef-message-recv.c | 2 +- src/idmef-message-send.c | 3 +- src/idmef-string.c | 2 +- src/idmef-tree-print.c | 2 +- src/idmef-tree-to-string.c | 2 +- src/idmef-tree-wrap.c | 2 +- .../GenerateIDMEFMessageSendC.pm | 5 +--- src/include/idmef-data.h | 21 ++++++++++--------- src/include/idmef-message-id.h | 2 +- src/include/idmef-message-recv.h | 2 +- src/include/idmef-message-send.h | 2 +- src/include/idmef-string.h | 2 +- src/include/idmef-tree-data.h | 2 +- src/include/idmef-tree-print.h | 2 +- src/include/idmef-tree-to-string.h | 2 +- src/include/idmef-tree-wrap.h | 2 +- 18 files changed, 53 insertions(+), 38 deletions(-) commit 9a727e7f74d0f71b0cf413a551ad6dcd70bf8b3e Author: Nicolas Delon Date: Sat Dec 20 00:12:50 2003 +0000 * bindings/libprelude.i: * bindings/perl/Prelude.pm: cleanup * bindings/perl/Prelude.c: regenerated * src/idmef-wrappers-gen/GenerateIDMEFMessageRecvC.pm: (extract_string_safe) bug fix, idmef_string_new_ref_fast was called with len + 1, but len already takes the final NULL byte in account * src/idmef-message-recv.c: regenerated git-svn-id: file:///home/yoann/SVN/trunk/libprelude@3001 09c5ec92-17d4-0310-903a-819935f44dba ChangeLog | 17 + bindings/libprelude.i | 26 +- bindings/perl/Prelude.c |35168 ++++++++++++++++++++ bindings/perl/Prelude.pm | 10 +- src/idmef-message-recv.c | 4 +- .../GenerateIDMEFMessageRecvC.pm | 2 +- 6 files changed, 35200 insertions(+), 27 deletions(-) commit a734ad32caef9755a6ac366a0a3af679263a74f1 Author: Nicolas Delon Date: Thu Dec 18 22:33:44 2003 +0000 * src/prelude-io.c: (is_tcp_connection_still_established) handle the case where poll returns 0 (which means that no fd have been selected) git-svn-id: file:///home/yoann/SVN/trunk/libprelude@2980 09c5ec92-17d4-0310-903a-819935f44dba ChangeLog | 7 +++++++ src/prelude-io.c | 8 +++++++- 2 files changed, 14 insertions(+), 1 deletions(-) commit 3319527454cf2b5ffc50a5fa9cdbdeb8ee7c9cb2 Author: Nicolas Delon Date: Wed Dec 17 23:26:12 2003 +0000 * src/prelude-strbuf.c: * src/include/prelude-strbuf.h: (prelude_strbuf_cat) (prelude_strbuf_ncat) new functions git-svn-id: file:///home/yoann/SVN/trunk/libprelude@2979 09c5ec92-17d4-0310-903a-819935f44dba ChangeLog | 8 ++++++ src/include/prelude-strbuf.h | 9 +++--- src/prelude-strbuf.c | 58 ++++++++++++++++++++++++++++++++--------- 3 files changed, 57 insertions(+), 18 deletions(-) commit eca5e3af3f45bb6cbacfbd1840192237c9dfd24c Author: Nicolas Delon Date: Tue Dec 16 13:53:01 2003 +0000 * src/idmef-value-type.c: in read functions for integer types: handle both decimal and hexadecimal value git-svn-id: file:///home/yoann/SVN/trunk/libprelude@2973 09c5ec92-17d4-0310-903a-819935f44dba ChangeLog | 6 ++++++ src/idmef-value-type.c | 39 +++++++++++++++++++++++++++------------ 2 files changed, 33 insertions(+), 12 deletions(-) commit 6e33e971c0e38dff665bd221a7b619c0eaf55b2e Author: Nicolas Delon Date: Sun Dec 14 18:00:12 2003 +0000 * src/idmef-message.c: * src/include/idmef-tree.h (idmef_message_set_pmsg) (idmef_message_destroy) add the ability to attach a prelude_msg to the corresponding idmef_message * src/idmef-wrappers-gen/GenerateIDMEFTreeWrapH.pm: do not generate _ref function prototype for function that don't have refcount * src/include/idmef-tree-wrap.h: regenerated git-svn-id: file:///home/yoann/SVN/trunk/libprelude@2966 09c5ec92-17d4-0310-903a-819935f44dba ChangeLog | 14 +++++++++ src/idmef-message-recv.c | 2 +- src/idmef-message-send.c | 2 +- src/idmef-message.c | 33 +++++++++++++++------ src/idmef-tree-print.c | 2 +- src/idmef-tree-to-string.c | 2 +- src/idmef-tree-wrap.c | 3 +- src/idmef-wrappers-gen/GenerateIDMEFTreeWrapH.pm | 2 + src/include/idmef-message-id.h | 2 +- src/include/idmef-message-recv.h | 2 +- src/include/idmef-message-send.h | 2 +- src/include/idmef-message.h | 10 +++++- src/include/idmef-tree-data.h | 2 +- src/include/idmef-tree-print.h | 2 +- src/include/idmef-tree-to-string.h | 2 +- src/include/idmef-tree-wrap.h | 6 +-- src/include/idmef-tree.h | 4 ++ 17 files changed, 65 insertions(+), 27 deletions(-) commit dbca01b98a401023a4691138c65352700765840b Author: Nicolas Delon Date: Sun Dec 14 10:03:07 2003 +0000 * src/idmef-wrappers-gen/GenerateIDMEFTreeWrapC.pm: * src/idmef-wrappers-gen/GenerateIDMEFTreeWrapH.pm: * src/idmef-wrappers-gen/IDMEFTree.pm: * src/include/idmef-tree.h: implement refcount support * src/idmef-tree-wrap.c: * src/include/idmef-tree-wrap.h: regenerated git-svn-id: file:///home/yoann/SVN/trunk/libprelude@2965 09c5ec92-17d4-0310-903a-819935f44dba ChangeLog | 12 + src/idmef-criteria-string.yac.c | 1260 ++++++++++------------ src/idmef-criteria-string.yac.h | 94 +-- src/idmef-message-recv.c | 2 +- src/idmef-message-send.c | 2 +- src/idmef-tree-print.c | 2 +- src/idmef-tree-to-string.c | 2 +- src/idmef-tree-wrap.c | 406 +++++++- src/idmef-wrappers-gen/GenerateIDMEFTreeWrapC.pm | 42 +- src/idmef-wrappers-gen/GenerateIDMEFTreeWrapH.pm | 11 + src/idmef-wrappers-gen/IDMEFTree.pm | 6 +- src/include/idmef-message-id.h | 2 +- src/include/idmef-message-recv.h | 2 +- src/include/idmef-message-send.h | 2 +- src/include/idmef-tree-data.h | 2 +- src/include/idmef-tree-print.h | 2 +- src/include/idmef-tree-to-string.h | 2 +- src/include/idmef-tree-wrap.h | 71 ++- src/include/idmef-tree.h | 45 +- 19 files changed, 1150 insertions(+), 817 deletions(-) commit 5236d6908fd6ca7dfef0d6c894514572ded2573f Author: Yoann Vandoorselaere Date: Sat Dec 13 01:58:01 2003 +0000 *** empty log message *** git-svn-id: file:///home/yoann/SVN/trunk/libprelude@2952 09c5ec92-17d4-0310-903a-819935f44dba src/include/sensor.h | 8 -------- 1 files changed, 0 insertions(+), 8 deletions(-) commit e6e5f5ebc9c41a7512bd228f26a250ac0d2518f8 Author: Yoann Vandoorselaere Date: Sat Dec 13 01:05:22 2003 +0000 *** empty log message *** git-svn-id: file:///home/yoann/SVN/trunk/libprelude@2944 09c5ec92-17d4-0310-903a-819935f44dba src/idmef-util.c | 6 +++--- src/include/prelude-getopt.h | 4 +++- 2 files changed, 6 insertions(+), 4 deletions(-) commit 3181b2a00048c83a863315f5a544220672f319ff Author: Yoann Vandoorselaere Date: Sat Dec 13 01:02:08 2003 +0000 *** empty log message *** git-svn-id: file:///home/yoann/SVN/trunk/libprelude@2943 09c5ec92-17d4-0310-903a-819935f44dba src/idmef-util.c | 16 +++++++++------- src/include/idmef-util.h | 4 ++-- 2 files changed, 11 insertions(+), 9 deletions(-) commit 9749168f9dc52cf1703930fea17eeb0e4a013ef8 Author: Yoann Vandoorselaere Date: Sat Dec 13 00:55:58 2003 +0000 *** empty log message *** git-svn-id: file:///home/yoann/SVN/trunk/libprelude@2942 09c5ec92-17d4-0310-903a-819935f44dba bindings/perl/Prelude.pm | 708 ++ bindings/python/_prelude.c |21567 ++++++++++++++++++++++++++++++++ bindings/python/prelude.py | 464 + docs/api/examples/perl/send_alert.pl | 22 + docs/api/examples/python/send_alert.py | 18 + src/idmef-tree-print.c | 1842 +++ src/idmef-tree-to-string.c | 2005 +++ src/include/Makefile.am | 1 - src/include/extract.h | 2 +- src/prelude-getopt-wide.c | 16 +- 10 files changed, 26635 insertions(+), 10 deletions(-) commit 853b3867372d2c9215672013facb0d76985e3583 Author: Yoann Vandoorselaere Date: Sat Dec 13 00:39:44 2003 +0000 *** empty log message *** git-svn-id: file:///home/yoann/SVN/trunk/libprelude@2941 09c5ec92-17d4-0310-903a-819935f44dba bindings/Makefile.am | 1 + bindings/libprelude.i | 265 ++++++++++++++++++++++++++++++++++++ src/include/Makefile.am | 1 - src/include/idmef-tree-print.h | 37 +++++ src/include/idmef-tree-to-string.h | 37 +++++ 5 files changed, 340 insertions(+), 1 deletions(-) commit 1332bc540a22c86beda597c9a298f0c2b42f0030 Author: Yoann Vandoorselaere Date: Sat Dec 13 00:35:13 2003 +0000 db-work merge in progress git-svn-id: file:///home/yoann/SVN/trunk/libprelude@2940 09c5ec92-17d4-0310-903a-819935f44dba bindings/perl/Makefile.am | 25 +++++++++++++++++++++++++ bindings/perl/generate.sh | 3 +++ bindings/python/Makefile.am | 24 ++++++++++++++++++++++++ bindings/python/generate.sh | 3 +++ 4 files changed, 55 insertions(+), 0 deletions(-) commit 914c82236509a66e19b0aa0e7c76fda16f501a19 Author: Yoann Vandoorselaere Date: Sat Dec 13 00:25:33 2003 +0000 db-work merge in progress git-svn-id: file:///home/yoann/SVN/trunk/libprelude@2939 09c5ec92-17d4-0310-903a-819935f44dba ChangeLog | 8 + Makefile.am | 2 +- NEWS | 60 + configure.in | 123 +- sensor-adduser/sensor-adduser.c | 19 +- src/Makefile.am | 27 +- src/common.c | 2 +- src/idmef-criteria-string.lex.c | 2093 +++++ src/idmef-criteria-string.lex.l | 107 + src/idmef-criteria-string.yac.c | 1512 ++++ src/idmef-criteria-string.yac.h | 81 + src/idmef-criteria-string.yac.y | 298 + src/idmef-criteria.c | 533 ++ src/idmef-data.c | 331 + src/idmef-message-recv.c | 2316 +++++ src/idmef-message-send.c | 761 ++ src/idmef-message.c | 172 + src/idmef-msg-send.c | 11 +- src/idmef-object-value.c | 172 + src/idmef-object.c | 919 ++ src/idmef-string.c | 168 + src/idmef-time.c | 549 ++ src/idmef-tree-func.c | 1033 --- src/idmef-tree-wrap.c | 9286 ++++++++++++++++++++ src/idmef-type.c | 199 + src/idmef-util.c | 175 + src/idmef-value-object.c | 80 + src/idmef-value-type.c | 454 + src/idmef-value.c | 558 ++ src/idmef-wrappers-gen/Generate.pm | 46 + src/idmef-wrappers-gen/GenerateDebug.pm | 94 + src/idmef-wrappers-gen/GenerateIDMEFMessageIdH.pm | 94 + .../GenerateIDMEFMessageRecvC.pm | 246 + .../GenerateIDMEFMessageRecvH.pm | 64 + .../GenerateIDMEFMessageSendC.pm | 280 + .../GenerateIDMEFMessageSendH.pm | 61 + src/idmef-wrappers-gen/GenerateIDMEFTreeData.pm | 163 + src/idmef-wrappers-gen/GenerateIDMEFTreePrintC.pm | 317 + src/idmef-wrappers-gen/GenerateIDMEFTreePrintH.pm | 64 + .../GenerateIDMEFTreeToStringC.pm | 308 + .../GenerateIDMEFTreeToStringH.pm | 64 + src/idmef-wrappers-gen/GenerateIDMEFTreeWrapC.pm | 857 ++ src/idmef-wrappers-gen/GenerateIDMEFTreeWrapH.pm | 263 + src/idmef-wrappers-gen/IDMEFTree.pm | 368 + src/idmef-wrappers-gen/README | 6 + src/idmef-wrappers-gen/generator.pl | 123 + src/include/Makefile.am | 29 +- src/include/extract.h | 70 +- src/include/idmef-criteria-string.h | 30 + src/include/idmef-criteria.h | 82 + src/include/idmef-data.h | 277 + src/include/idmef-message-id-format.h | 29 + src/include/idmef-message-id.h | 364 +- src/include/idmef-message-recv.h | 62 + src/include/idmef-message-send.h | 37 + src/include/idmef-message.h | 38 + src/include/idmef-object-value.h | 59 + src/include/idmef-object.h | 80 + src/include/idmef-string.h | 96 + src/include/idmef-time.h | 78 + src/include/idmef-tree-data.h | 322 + src/include/idmef-tree-func.h | 191 - src/include/idmef-tree-wrap.h | 1704 ++++ src/include/idmef-tree.h | 379 +- src/include/idmef-type.h | 60 + src/include/idmef-util.h | 67 + src/include/idmef-value-object.h | 29 + src/include/idmef-value-type.h | 113 + src/include/idmef-value.h | 106 + src/include/idmef.h | 44 + src/include/list.h | 20 + src/include/ntp.h | 129 + src/include/prelude-hash.h | 42 + src/include/prelude-io.h | 21 +- src/include/prelude-strbuf.h | 49 + src/ntp.c | 322 + src/plugin-common.c | 106 +- src/prelude-async.c | 4 +- src/prelude-client-mgr.c | 18 +- src/prelude-client.c | 6 +- src/prelude-getopt.c | 11 + src/prelude-hash.c | 242 + src/prelude-ident.c | 4 +- src/prelude-io.c | 253 +- src/prelude-message-buffered.c | 2 +- src/prelude-strbuf.c | 179 + src/sensor.c | 297 +- src/ssl-gencrypto.c | 8 +- 88 files changed, 29608 insertions(+), 1918 deletions(-) commit a6977068384bfd4f04627d3b599b2b359f5ef627 Author: Yoann Vandoorselaere Date: Fri Dec 5 01:13:13 2003 +0000 *** empty log message *** git-svn-id: file:///home/yoann/SVN/trunk/libprelude@2886 09c5ec92-17d4-0310-903a-819935f44dba autogen.sh | 1 - 1 files changed, 0 insertions(+), 1 deletions(-) commit 3ad01975a1cf3702df8cc60144013f719b3fd0a2 Author: Yoann Vandoorselaere Date: Fri Dec 5 01:07:19 2003 +0000 *** empty log message *** git-svn-id: file:///home/yoann/SVN/trunk/libprelude@2885 09c5ec92-17d4-0310-903a-819935f44dba autogen.sh | 1 + 1 files changed, 1 insertions(+), 0 deletions(-) commit 88c926b4a2540c77322f96f37b9675f0f71df33e Author: Yoann Vandoorselaere Date: Fri Dec 5 01:05:20 2003 +0000 *** empty log message *** git-svn-id: file:///home/yoann/SVN/trunk/libprelude@2884 09c5ec92-17d4-0310-903a-819935f44dba autogen.sh | 1 - 1 files changed, 0 insertions(+), 1 deletions(-) commit 1dada0e6f34e9fc9b15296a9e2d28d65289857d5 Author: Yoann Vandoorselaere Date: Fri Dec 5 01:04:04 2003 +0000 *** empty log message *** git-svn-id: file:///home/yoann/SVN/trunk/libprelude@2883 09c5ec92-17d4-0310-903a-819935f44dba autogen.sh | 1 + 1 files changed, 1 insertions(+), 0 deletions(-) commit 2b4ae24877119d523aeaca3a6c6a98a54f935a83 Author: Yoann Vandoorselaere Date: Fri Dec 5 00:27:37 2003 +0000 *** empty log message *** git-svn-id: file:///home/yoann/SVN/trunk/libprelude@2882 09c5ec92-17d4-0310-903a-819935f44dba autogen.sh | 1 - 1 files changed, 0 insertions(+), 1 deletions(-) commit e8fc2c604908e2d8e218cda26a5b4cad09e7e995 Author: Yoann Vandoorselaere Date: Fri Dec 5 00:27:09 2003 +0000 *** empty log message *** git-svn-id: file:///home/yoann/SVN/trunk/libprelude@2881 09c5ec92-17d4-0310-903a-819935f44dba autogen.sh | 1 + 1 files changed, 1 insertions(+), 0 deletions(-) commit 5dcc9a5c336f5cdf2acc00cfaaf503bc593fdf0c Author: Yoann Vandoorselaere Date: Fri Dec 5 00:26:20 2003 +0000 *** empty log message *** git-svn-id: file:///home/yoann/SVN/trunk/libprelude@2880 09c5ec92-17d4-0310-903a-819935f44dba autogen.sh | 1 - 1 files changed, 0 insertions(+), 1 deletions(-) commit 14f63fd21679d586daaeca86eb53cba99c746b01 Author: Yoann Vandoorselaere Date: Fri Dec 5 00:23:59 2003 +0000 *** empty log message *** git-svn-id: file:///home/yoann/SVN/trunk/libprelude@2879 09c5ec92-17d4-0310-903a-819935f44dba autogen.sh | 1 + 1 files changed, 1 insertions(+), 0 deletions(-) commit fa2df90c0b2f3463cd88a539bb451bd9cb978542 Author: Yoann Vandoorselaere Date: Fri Dec 5 00:21:13 2003 +0000 *** empty log message *** git-svn-id: file:///home/yoann/SVN/trunk/libprelude@2878 09c5ec92-17d4-0310-903a-819935f44dba autogen.sh | 1 - 1 files changed, 0 insertions(+), 1 deletions(-) commit 4c779ce0b53c96dfbca3fc1966f88bf6c50b60cb Author: Yoann Vandoorselaere Date: Fri Dec 5 00:20:15 2003 +0000 *** empty log message *** git-svn-id: file:///home/yoann/SVN/trunk/libprelude@2877 09c5ec92-17d4-0310-903a-819935f44dba autogen.sh | 1 + 1 files changed, 1 insertions(+), 0 deletions(-) commit ed0505c90ea49cfd94a5654da7d156eb1ef5fb5f Author: Yoann Vandoorselaere Date: Fri Dec 5 00:18:31 2003 +0000 *** empty log message *** git-svn-id: file:///home/yoann/SVN/trunk/libprelude@2876 09c5ec92-17d4-0310-903a-819935f44dba autogen.sh | 1 - 1 files changed, 0 insertions(+), 1 deletions(-) commit e6c794dfe62c41cf8849757db01f59fa5edf0271 Author: Yoann Vandoorselaere Date: Fri Dec 5 00:17:53 2003 +0000 *** empty log message *** git-svn-id: file:///home/yoann/SVN/trunk/libprelude@2875 09c5ec92-17d4-0310-903a-819935f44dba autogen.sh | 1 + 1 files changed, 1 insertions(+), 0 deletions(-) commit 07d1655e38fbc33240e9c95b9de8299a06ddf6ab Author: Yoann Vandoorselaere Date: Fri Dec 5 00:10:03 2003 +0000 *** empty log message *** git-svn-id: file:///home/yoann/SVN/trunk/libprelude@2874 09c5ec92-17d4-0310-903a-819935f44dba autogen.sh | 1 - 1 files changed, 0 insertions(+), 1 deletions(-) commit 28effdd7b82d7cd7aa627592ffaf9dea79d3436a Author: Yoann Vandoorselaere Date: Thu Dec 4 21:25:10 2003 +0000 acl... git-svn-id: file:///home/yoann/SVN/trunk/libprelude@2873 09c5ec92-17d4-0310-903a-819935f44dba autogen.sh | 1 + 1 files changed, 1 insertions(+), 0 deletions(-) commit e01194248bd3a93ede82b69b05862a562ff4a520 Author: Yoann Vandoorselaere Date: Thu Dec 4 21:21:00 2003 +0000 *** empty log message *** git-svn-id: file:///home/yoann/SVN/trunk/libprelude@2872 09c5ec92-17d4-0310-903a-819935f44dba autogen.sh | 1 - 1 files changed, 0 insertions(+), 1 deletions(-) commit 4920ad40120e1ebc5ed7320079082140bf576f8c Author: Yoann Vandoorselaere Date: Thu Dec 4 21:20:09 2003 +0000 ACL work... git-svn-id: file:///home/yoann/SVN/trunk/libprelude@2871 09c5ec92-17d4-0310-903a-819935f44dba autogen.sh | 1 + 1 files changed, 1 insertions(+), 0 deletions(-) commit 7266aeec387f0cf4faaea90b17fbbf293b7cb1f6 Author: Yoann Vandoorselaere Date: Thu Dec 4 21:17:47 2003 +0000 ACL work... git-svn-id: file:///home/yoann/SVN/trunk/libprelude@2870 09c5ec92-17d4-0310-903a-819935f44dba autogen.sh | 1 - 1 files changed, 0 insertions(+), 1 deletions(-) commit 2095c1343ab71f69b13dc0e37ec588a7d6da940f Author: Yoann Vandoorselaere Date: Thu Dec 4 21:14:47 2003 +0000 ACL work.. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@2869 09c5ec92-17d4-0310-903a-819935f44dba autogen.sh | 1 + 1 files changed, 1 insertions(+), 0 deletions(-) commit e0b1fa45af619da36dbdd9bf005a5fac01f5323f Author: Yoann Vandoorselaere Date: Thu Dec 4 21:06:35 2003 +0000 ACL works... git-svn-id: file:///home/yoann/SVN/trunk/libprelude@2868 09c5ec92-17d4-0310-903a-819935f44dba autogen.sh | 1 - 1 files changed, 0 insertions(+), 1 deletions(-) commit a2d008deeb695072c997d3e91db6584807f637ad Author: Yoann Vandoorselaere Date: Thu Dec 4 21:03:33 2003 +0000 ACL work... git-svn-id: file:///home/yoann/SVN/trunk/libprelude@2867 09c5ec92-17d4-0310-903a-819935f44dba autogen.sh | 1 - 1 files changed, 0 insertions(+), 1 deletions(-) commit 7fbac461b4fae98619de0f89d498ad399b076c1b Author: Yoann Vandoorselaere Date: Thu Dec 4 18:35:54 2003 +0000 Testing... git-svn-id: file:///home/yoann/SVN/trunk/libprelude@2864 09c5ec92-17d4-0310-903a-819935f44dba autogen.sh | 1 + 1 files changed, 1 insertions(+), 0 deletions(-) commit b538f77598983eb0421bbdfd1902abd9cac54112 Author: Yoann Vandoorselaere Date: Fri Oct 17 01:56:07 2003 +0000 *** empty log message *** git-svn-id: file:///home/yoann/SVN/trunk/libprelude@2694 09c5ec92-17d4-0310-903a-819935f44dba src/Makefile.am | 1 - src/include/Makefile.am | 1 - 2 files changed, 0 insertions(+), 2 deletions(-) commit b79e4d4088006758e372fdf87994f8e8d01d623f Author: Yoann Vandoorselaere Date: Fri Oct 17 01:48:48 2003 +0000 *** empty log message *** git-svn-id: file:///home/yoann/SVN/trunk/libprelude@2693 09c5ec92-17d4-0310-903a-819935f44dba src/include/string-matching.h | 28 ------- src/prelude-log.c | 2 +- src/string-matching.c | 156 ----------------------------------------- 3 files changed, 1 insertions(+), 185 deletions(-) commit 7371d93b5ec9ef082a10469f8dd068d6421f022f Author: Yoann Vandoorselaere Date: Fri Oct 17 01:44:48 2003 +0000 Merge libprelude-0-8 back-in. Prepare for db-work inclusion. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@2691 09c5ec92-17d4-0310-903a-819935f44dba ChangeLog | 120 ++++++++++++++++++++++++++++++++++++++- NEWS | 51 ++++++++++++++++ README | 17 +++-- configure.in | 104 ++++++++++++++++------------------ libprelude-config.in | 2 +- sensor-adduser/sensor-adduser.c | 3 +- src/daemonize.c | 2 +- src/idmef-msg-send.c | 85 +++++++++++++++++++++++++++ src/include/idmef-msg-send.h | 10 +++- src/include/timer.h | 2 +- src/prelude-client-mgr.c | 5 +- src/prelude-inet.c | 55 ++++++++++++------ src/prelude-io.c | 3 +- src/prelude-path.c | 10 ++-- src/timer.c | 20 +++---- 15 files changed, 382 insertions(+), 107 deletions(-) commit ad2940c31461f19b37999779f938e9c2391cb0ad Author: Yoann Vandoorselaere Date: Mon Jun 16 10:42:55 2003 +0000 Merge back 0-8 change to HEAD git-svn-id: file:///home/yoann/SVN/trunk/libprelude@2385 09c5ec92-17d4-0310-903a-819935f44dba ChangeLog | 205 ++++++++++++++++++++++++- Makefile.am | 18 +- configure.in | 79 +++++++++- libprelude-config.in | 6 +- sensor-adduser/sensor-adduser.c | 16 +- sensor-adduser/ssl-register.c | 2 +- sensors-default.conf | 2 +- src/Makefile.am | 3 +- src/common.c | 28 +++- src/idmef-msg-send.c | 13 +- src/include/Makefile.am | 1 + src/include/common.h | 3 +- src/include/extract.h | 21 ++- src/include/plugin-common-prv.h | 30 ++-- src/include/prelude-client-mgr.h | 3 + src/include/prelude-inet.h | 131 ++++++++++++++++ src/include/prelude-io.h | 6 +- src/include/timer.h | 20 +-- src/plugin-common.c | 9 +- src/prelude-async.c | 39 ++++- src/prelude-client-mgr.c | 146 +++++++++++++++++- src/prelude-client.c | 198 ++++++++++-------------- src/prelude-inet.c | 314 ++++++++++++++++++++++++++++++++++++++ src/prelude-io.c | 2 +- src/ssl-registration-msg.c | 2 +- src/timer.c | 133 +++++++++-------- 26 files changed, 1150 insertions(+), 280 deletions(-) commit b274e34a31eb37fee1a565e29495ba7910ef4951 Author: Yoann Vandoorselaere Date: Mon Apr 28 14:30:44 2003 +0000 *** empty log message *** git-svn-id: file:///home/yoann/SVN/trunk/libprelude@2145 09c5ec92-17d4-0310-903a-819935f44dba src/include/timer.h | 14 +++++++++++++- src/prelude-async.c | 3 +++ src/timer.c | 20 +++++++++++++++++--- 3 files changed, 33 insertions(+), 4 deletions(-) commit 0b24e91184ef50ec3b4f6d97b91964829be52926 Author: Yoann Vandoorselaere Date: Mon Apr 28 14:22:34 2003 +0000 *** empty log message *** git-svn-id: file:///home/yoann/SVN/trunk/libprelude@2144 09c5ec92-17d4-0310-903a-819935f44dba ChangeLog | 8 ++++ src/include/prelude-async.h | 11 +++++- src/prelude-async.c | 86 +++++++++++++++++++++++++++--------------- src/timer.c | 47 ++++++++++++++++------- 4 files changed, 106 insertions(+), 46 deletions(-) commit 53f5ce91aeaa2aaa8ea37f8a812299600d823595 Author: Yoann Vandoorselaere Date: Mon Apr 28 14:10:49 2003 +0000 *** empty log message *** git-svn-id: file:///home/yoann/SVN/trunk/libprelude@2143 09c5ec92-17d4-0310-903a-819935f44dba COPYING | 15 +++++++++++++++ ChangeLog | 8 ++++++++ NEWS | 43 +++++++++++++++++++++++++++++++++++++++++++ README | 13 ------------- autogen.sh | 18 ------------------ configure.in | 2 +- src/prelude-client.c | 6 +++--- src/prelude-io.c | 5 +++-- src/prelude-log.c | 5 ++++- src/ssl-gencrypto.c | 3 +++ 10 files changed, 80 insertions(+), 38 deletions(-) commit b11bf6ee9f50501a83fe249b2b6d7fd4d31e2276 Author: Yoann Vandoorselaere Date: Mon Apr 28 14:05:29 2003 +0000 Merge 0.8 change back in HEAD. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@2142 09c5ec92-17d4-0310-903a-819935f44dba src/prelude-getopt.c | 20 ++++++++++++++++---- 1 files changed, 16 insertions(+), 4 deletions(-) commit df44849a92c44f5ec6b24751a5a123c7b2f40db4 Author: Yoann Vandoorselaere Date: Thu Mar 6 01:20:52 2003 +0000 *** empty log message *** git-svn-id: file:///home/yoann/SVN/trunk/libprelude@2020 09c5ec92-17d4-0310-903a-819935f44dba Makefile.am | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) commit 7c2ad4192f8c37d316e284b83a0500622dc2fa3a Author: Yoann Vandoorselaere Date: Tue Feb 4 10:55:05 2003 +0000 Update my mail address. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@1909 09c5ec92-17d4-0310-903a-819935f44dba AUTHORS | 2 +- CREDITS | 2 +- README | 2 +- debian/copyright | 2 +- libmissing/getopt_long.c | 2 +- libmissing/getopt_long.h | 2 +- libmissing/libmissing.h | 2 +- sensor-adduser/sensor-adduser.c | 2 +- src/client-ident.c | 2 +- src/common.c | 2 +- src/config-engine.c | 2 +- src/daemonize.c | 2 +- src/idmef-msg-send.c | 2 +- src/idmef-tree-func.c | 2 +- src/include/client-ident.h | 2 +- src/include/common.h | 2 +- src/include/config-engine.h | 2 +- src/include/daemonize.h | 2 +- src/include/extract.h | 2 +- src/include/idmef-message-id.h | 2 +- src/include/idmef-msg-send.h | 2 +- src/include/idmef-tree-func.h | 2 +- src/include/idmef-tree.h | 2 +- src/include/plugin-common-prv.h | 2 +- src/include/plugin-common.h | 2 +- src/include/prelude-async.h | 2 +- src/include/prelude-auth.h | 2 +- src/include/prelude-client-mgr.h | 2 +- src/include/prelude-client.h | 2 +- src/include/prelude-getopt-wide.h | 2 +- src/include/prelude-getopt.h | 2 +- src/include/prelude-ident.h | 2 +- src/include/prelude-io.h | 2 +- src/include/prelude-list.h | 2 +- src/include/prelude-message-buffered.h | 2 +- src/include/prelude-message-id.h | 2 +- src/include/prelude-message.h | 2 +- src/include/prelude-path.h | 2 +- src/include/sensor.h | 2 +- src/include/ssl-settings.h | 2 +- src/include/ssl.h | 2 +- src/include/variable.h | 4 ++-- src/plugin-common.c | 2 +- src/prelude-async.c | 2 +- src/prelude-auth.c | 2 +- src/prelude-client-mgr.c | 2 +- src/prelude-client.c | 2 +- src/prelude-getopt.c | 2 +- src/prelude-ident.c | 2 +- src/prelude-io.c | 2 +- src/prelude-log.c | 2 +- src/prelude-message-buffered.c | 2 +- src/prelude-message.c | 2 +- src/prelude-path.c | 2 +- src/sensor.c | 2 +- src/timer.c | 2 +- src/variable.c | 4 ++-- 57 files changed, 59 insertions(+), 59 deletions(-) commit 819502362b41cb6cfd0a2ddc15b2d86e1e3730ce Author: Yoann Vandoorselaere Date: Tue Feb 4 10:38:40 2003 +0000 *** empty log message *** git-svn-id: file:///home/yoann/SVN/trunk/libprelude@1908 09c5ec92-17d4-0310-903a-819935f44dba ChangeLog | 7 +++++++ src/daemonize.c | 6 +++++- src/sensor.c | 6 +++--- 3 files changed, 15 insertions(+), 4 deletions(-) commit d827de5c9e4e81fc1c3640c4d3c7ffe8a36ad680 Author: Yoann Vandoorselaere Date: Mon Feb 3 13:42:54 2003 +0000 *** empty log message *** git-svn-id: file:///home/yoann/SVN/trunk/libprelude@1891 09c5ec92-17d4-0310-903a-819935f44dba ChangeLog | 7 +++++++ src/config-engine.c | 5 +++-- 2 files changed, 10 insertions(+), 2 deletions(-) commit b1ace2297de71eced312d744cce08541a41d1b3d Author: Yoann Vandoorselaere Date: Fri Jan 24 11:01:27 2003 +0000 *** empty log message *** git-svn-id: file:///home/yoann/SVN/trunk/libprelude@1811 09c5ec92-17d4-0310-903a-819935f44dba ChangeLog | 28 ++++++++++++++++ sensor-adduser/ssl-register.c | 10 +++--- src/include/ssl-registration-msg.h | 10 +++--- src/ssl-registration-msg.c | 64 ++++++++++++++++++++++------------- 4 files changed, 78 insertions(+), 34 deletions(-) commit 5902882956a18181998e258b230fb2e75e714cde Author: Yoann Vandoorselaere Date: Thu Jan 23 21:31:11 2003 +0000 *** empty log message *** git-svn-id: file:///home/yoann/SVN/trunk/libprelude@1809 09c5ec92-17d4-0310-903a-819935f44dba ChangeLog | 24 +++++++++++++ src/prelude-getopt.c | 94 ++++++++++++++++++++++--------------------------- 2 files changed, 66 insertions(+), 52 deletions(-) commit 7cac22cc199086e7bda338a64c390004bcb647a7 Author: Yoann Vandoorselaere Date: Tue Jan 21 21:48:51 2003 +0000 *** empty log message *** git-svn-id: file:///home/yoann/SVN/trunk/libprelude@1807 09c5ec92-17d4-0310-903a-819935f44dba ChangeLog | 5 +++++ src/ssl-gencrypto.c | 8 ++++---- 2 files changed, 9 insertions(+), 4 deletions(-) commit 69dedcd42057a14f60879237b274a4da2eb07777 Author: Yoann Vandoorselaere Date: Wed Dec 18 02:43:45 2002 +0000 *** empty log message *** git-svn-id: file:///home/yoann/SVN/trunk/libprelude@1756 09c5ec92-17d4-0310-903a-819935f44dba src/include/prelude-message-buffered.h | 5 +++++ src/include/prelude-message.h | 4 ++++ src/prelude-getopt-wide.c | 7 +++++-- src/prelude-message-buffered.c | 30 +++++++++++++++++++++++++++++- src/prelude-message.c | 27 +++++++++++++++++++++++++++ 5 files changed, 70 insertions(+), 3 deletions(-) commit 5bd0212360598094bedadbbeb26c825169db7bdf Author: Yoann Vandoorselaere Date: Wed Dec 18 02:05:15 2002 +0000 *** empty log message *** git-svn-id: file:///home/yoann/SVN/trunk/libprelude@1755 09c5ec92-17d4-0310-903a-819935f44dba src/prelude-getopt-wide.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) commit 64f7718e2b704df0d479d4480ac4610f2a543ab2 Author: Yoann Vandoorselaere Date: Wed Dec 18 01:49:49 2002 +0000 *** empty log message *** git-svn-id: file:///home/yoann/SVN/trunk/libprelude@1754 09c5ec92-17d4-0310-903a-819935f44dba ChangeLog | 18 +++++++ sensor-adduser/sensor-adduser.c | 2 +- src/include/prelude-message-buffered.h | 9 +++- src/include/prelude-message.h | 3 +- src/prelude-getopt-wide.c | 5 +- src/prelude-message-buffered.c | 85 +++++++++++++++++++------------- src/prelude-message.c | 15 ++--- 7 files changed, 85 insertions(+), 52 deletions(-) commit 147ff5256ce6a46bf66ae4e82e94d5cf05594eff Author: Yoann Vandoorselaere Date: Thu Nov 28 11:50:41 2002 +0000 2002-11-22 Yoann Vandoorselaere * src/prelude-getopt.c: input_validation_regex, not input_validation_rexex. (prelude_option_new): (prelude_option_set_longopt): (prelude_option_get_longopt): (prelude_option_set_description): (prelude_option_get_description): (prelude_option_set_has_arg): (prelude_option_get_has_arg): (prelude_option_set_help): (prelude_option_get_help): (prelude_option_set_input_validation_regex): (prelude_option_get_input_validation_regex): (prelude_option_set_input_type): (prelude_option_get_input_type): implemented. (prelude_option_wide_get_msg): make the option message carry the originating sensor ID. * src/prelude-getopt-wide.c (read_option_list): (prelude_option_send_request): (prelude_option_recv_reply): (prelude_option_read_option_list): implemented. Theses function are helper for the one who want to use the administrative console. * src/client-ident.c (declare_ident_to_manager): use prelude_hton64(). * src/common.c (prelude_hton64): new public function. * src/prelude-getopt.c (check_option_reqarg): fix a priority problem when assigning optarg. This could result in a SIGSEGV. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@1713 09c5ec92-17d4-0310-903a-819935f44dba ChangeLog | 40 ++++++ src/client-ident.c | 10 +-- src/common.c | 30 +++++ src/include/common.h | 2 + src/include/prelude-getopt-wide.h | 9 ++- src/include/prelude-getopt.h | 34 +++++- src/include/prelude-message-id.h | 24 ++--- src/prelude-getopt-wide.c | 241 +++++++++++++++++++++++++++++++++---- src/prelude-getopt.c | 155 +++++++++++++++++++++--- 9 files changed, 473 insertions(+), 72 deletions(-) commit a100f5700405a34acc5d12b8c441589b95369858 Author: Yoann Vandoorselaere Date: Wed Nov 13 18:37:38 2002 +0000 *** empty log message *** git-svn-id: file:///home/yoann/SVN/trunk/libprelude@1704 09c5ec92-17d4-0310-903a-819935f44dba src/prelude-getopt-wide.c | 20 +++++++++++--------- 1 files changed, 11 insertions(+), 9 deletions(-) commit 510d2a2844665210628949674b18606177e7d0ec Author: Yoann Vandoorselaere Date: Wed Nov 13 18:23:15 2002 +0000 *** empty log message *** git-svn-id: file:///home/yoann/SVN/trunk/libprelude@1703 09c5ec92-17d4-0310-903a-819935f44dba src/prelude-getopt-wide.c | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) commit c2fa7acfc3df051ac64dafdfc96809c77361f8f8 Author: Yoann Vandoorselaere Date: Wed Nov 13 18:03:06 2002 +0000 *** empty log message *** git-svn-id: file:///home/yoann/SVN/trunk/libprelude@1702 09c5ec92-17d4-0310-903a-819935f44dba ChangeLog | 7 ++ src/Makefile.am | 1 + src/include/prelude-client.h | 1 + src/include/prelude-getopt-wide.h | 12 +-- src/include/prelude-message-id.h | 41 +++++++-- src/prelude-getopt-wide.c | 179 +++++++++++++++++++++++++++++++++++++ src/prelude-getopt.c | 1 - 7 files changed, 224 insertions(+), 18 deletions(-) commit 55f65e9f7d4aa1b2fb52d48db82dccd82b6eec4a Author: Yoann Vandoorselaere Date: Wed Nov 13 14:42:28 2002 +0000 *** empty log message *** git-svn-id: file:///home/yoann/SVN/trunk/libprelude@1701 09c5ec92-17d4-0310-903a-819935f44dba ChangeLog | 8 +++++++ src/include/prelude-getopt.h | 4 +++ src/prelude-getopt.c | 46 ++++++++++++++++++++++++++++++++++++++--- 3 files changed, 54 insertions(+), 4 deletions(-) commit a79efe7840b4bc3145ac4b0955b3112e5c20a9c2 Author: Yoann Vandoorselaere Date: Wed Nov 13 02:03:29 2002 +0000 2002-11-13 Yoann Vandoorselaere * src/prelude-client.c (prelude_client_connect): check the return value of prelude_option_wide_get_msg(). Don't try to send option message if it return NULL. * src/prelude-getopt.c (prelude_option_wide_get_msg): return NULL if there is no root_optlist. Fix a possible SIGSEGV on client that doesn't use prelude-getopt. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@1699 09c5ec92-17d4-0310-903a-819935f44dba ChangeLog | 10 ++++++++++ src/prelude-client.c | 11 +++++------ src/prelude-getopt.c | 3 +++ 3 files changed, 18 insertions(+), 6 deletions(-) commit 4dea949e2d0bd7eff7f72fcf8fec1f985924935b Author: Yoann Vandoorselaere Date: Tue Nov 12 12:16:29 2002 +0000 *** empty log message *** git-svn-id: file:///home/yoann/SVN/trunk/libprelude@1696 09c5ec92-17d4-0310-903a-819935f44dba ChangeLog | 6 ++++++ 1 files changed, 6 insertions(+), 0 deletions(-) commit 7e6adb1074622b40be5de358e32199389c6c5afe Author: Yoann Vandoorselaere Date: Tue Nov 12 12:06:47 2002 +0000 2002-11-12 Yoann Vandoorselaere * COPYING.OpenSSL: * README: Permit linking with OpenSSL so that Debian package might be distributed. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@1694 09c5ec92-17d4-0310-903a-819935f44dba COPYING.OpenSSL | 127 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ README | 14 ++++-- 2 files changed, 137 insertions(+), 4 deletions(-) commit 1a4a5d97b4f7d53569fc58c8552c1fec06bb5845 Author: Yoann Vandoorselaere Date: Mon Nov 11 14:37:56 2002 +0000 *** empty log message *** git-svn-id: file:///home/yoann/SVN/trunk/libprelude@1666 09c5ec92-17d4-0310-903a-819935f44dba src/include/common.h | 18 ------------------ 1 files changed, 0 insertions(+), 18 deletions(-) commit 5546115f7e88b27ea2d3bac0b77b5231ae3ad92c Author: Yoann Vandoorselaere Date: Mon Nov 11 14:36:55 2002 +0000 2002-11-11 Yoann Vandoorselaere * src/include/prelude-client.h: add PRELUDE_CLIENT_TYPE_MANAGER_PARENT and PRELUDE_CLIENT_TYPE_MANAGER_CHILDREN types. * src/prelude-client.c: remove unused RECONNECT_TIME_WAIT definition. (prelude_client_set_state): (prelude_client_get_state): implemented. (prelude_client_forward): (prelude_client_is_alive): (prelude_client_send_msg): check that the CONNECTED state is set. (prelude_client_connect): allocate the file descriptor here. Make the type of the client part of the message. (prelude_client_set_fd): new function. Close currently opened file descriptor if needed, and set the client FD. By default, the client doesn't own the passed FD. (prelude_client_new): don't allocate the file descriptor here, because the caller might furnish it's own FD. Only allocate the file descriptor by ourself on prelude_client_connect(). (prelude_client_close): (prelude_client_destroy): (handle_connection_breakage): call close_client_fd(). (close_client_fd): impl. Set the CONNECTED state to zero, and destroy the client file descriptor if the CLIENT_OWN_FD bit is set. * src/prelude-client-mgr.c (add_new_client): new function, add a client to the client-mgr. (prelude_client_mgr_tell_client_alive): Tell client-mgr that a given client in the set is alive. (prelude_client_mgr_tell_client_dead): Tell client-mgr that a given client in the set is dead. (prelude_client_mgr_search_client): search a client in the client-mgr list using the address and client type criteria. (search_client): search a given client in the client-mgr list. (walk_manager_lists): return 0 if there is no client in the list. (broadcast_message): on emission failure, only initialize the timer if use_timer is set. (prelude_client_mgr_add_client): new public function, add a client to a given client-mgr, allocating a client-mgr if not already done. * acinclude.m4: remove an errnous parenthesis, leading in AC_DATATYPE_GENERIC not finding any possible replacement for socklen_t. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@1665 09c5ec92-17d4-0310-903a-819935f44dba ChangeLog | 61 +++++++++++ acinclude.m4 | 11 +- src/include/common.h | 18 +++ src/include/prelude-client-mgr.h | 11 ++ src/include/prelude-client.h | 18 +++- src/include/prelude-message-id.h | 1 + src/prelude-client-mgr.c | 213 ++++++++++++++++++++++++++++++++++--- src/prelude-client.c | 131 ++++++++++++++++------- 8 files changed, 398 insertions(+), 66 deletions(-) commit 59943c0a3183944ad130663b74011ab58ddb6034 Author: Yoann Vandoorselaere Date: Mon Oct 21 12:29:02 2002 +0000 2002-10-21 Yoann Vandoorselaere * src/string-matching.c (BoyerMoore_CI_StringMatching): (BoyerMoore_StringMatching): return the index where we matched the pattern on success and -1 on error. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@1645 09c5ec92-17d4-0310-903a-819935f44dba ChangeLog | 8 ++++++++ src/string-matching.c | 8 ++++---- 2 files changed, 12 insertions(+), 4 deletions(-) commit 001d1f51c010bd1c02b2f5a4b5521bb3bbaaf92a Author: Yoann Vandoorselaere Date: Mon Sep 23 14:43:32 2002 +0000 *** empty log message *** git-svn-id: file:///home/yoann/SVN/trunk/libprelude@1637 09c5ec92-17d4-0310-903a-819935f44dba ChangeLog | 10 ++++++++++ NEWS | 16 ++++++++++++++++ configure.in | 2 +- src/sensor.c | 3 ++- 4 files changed, 29 insertions(+), 2 deletions(-) commit b1fca8949561ea8f03e331e2cb816e8493791cd9 Author: Guillaume Pelat Date: Mon Sep 16 15:29:18 2002 +0000 2002-09-16 Guillaume Pelat * sensor-adduser/plaintext.c(setup_plaintext): * src/common.c(prelude_read_multiline): * src/config-engine.c(cmp_entry): (create_new_line): * src/prelude-client.c(handle_plaintext_connection): * src/prelude-getopt.c(check_option_optarg): (check_option_reqarg): (lookup_variable_if_needed): * src/ssl-gencrypto.c(get_full_hostname): Fix potential signed/unsigned integer problems. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@1612 09c5ec92-17d4-0310-903a-819935f44dba ChangeLog | 13 +++++++++++++ sensor-adduser/Makefile.am | 2 +- sensor-adduser/plaintext.c | 2 +- src/Makefile.am | 2 +- src/common.c | 2 +- src/config-engine.c | 5 +++-- src/prelude-client.c | 2 +- src/prelude-getopt.c | 12 ++++++------ src/ssl-gencrypto.c | 3 ++- 9 files changed, 29 insertions(+), 14 deletions(-) commit 461bb49bb22cdc83e84418dd351711900e5064d6 Author: Yoann Vandoorselaere Date: Mon Sep 16 15:04:09 2002 +0000 *** empty log message *** git-svn-id: file:///home/yoann/SVN/trunk/libprelude@1610 09c5ec92-17d4-0310-903a-819935f44dba sensor-adduser/Makefile.am | 2 +- src/Makefile.am | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit ed5f7476168be3fcdec9c766d3d31183774fa1e4 Author: Yoann Vandoorselaere Date: Sun Sep 15 17:14:15 2002 +0000 *** empty log message *** git-svn-id: file:///home/yoann/SVN/trunk/libprelude@1607 09c5ec92-17d4-0310-903a-819935f44dba acinclude.m4 | 28 ++++++++++++++++++++++++++++ 1 files changed, 28 insertions(+), 0 deletions(-) commit c084e5b852eb286bf93cdb5576fe427e545d5370 Author: Yoann Vandoorselaere Date: Sun Sep 15 17:10:48 2002 +0000 *** empty log message *** git-svn-id: file:///home/yoann/SVN/trunk/libprelude@1606 09c5ec92-17d4-0310-903a-819935f44dba ChangeLog | 18 ++++++++++++++++++ configure.in | 12 ++++++++++++ sensor-adduser/Makefile.am | 7 +++++-- sensor-adduser/ssl-register.c | 6 ------ src/Makefile.am | 13 ++++++++----- src/ssl-gencrypto.c | 15 --------------- src/ssl-registration-msg.c | 7 ------- src/ssl-settings.c | 7 ------- src/ssl.c | 6 ------ 9 files changed, 43 insertions(+), 48 deletions(-) commit 47bc3df3f603bcc44c150c50a59ecb6a736701a5 Author: Yoann Vandoorselaere Date: Tue Sep 10 08:42:26 2002 +0000 *** empty log message *** git-svn-id: file:///home/yoann/SVN/trunk/libprelude@1597 09c5ec92-17d4-0310-903a-819935f44dba ChangeLog | 6 ++++++ NEWS | 16 ++++++++++++++++ configure.in | 2 +- 3 files changed, 23 insertions(+), 1 deletions(-) commit d95abedf6dc652d549b3484c4db8c8b27e1280cd Author: Yoann Vandoorselaere Date: Mon Sep 9 13:33:27 2002 +0000 *** empty log message *** git-svn-id: file:///home/yoann/SVN/trunk/libprelude@1592 09c5ec92-17d4-0310-903a-819935f44dba ChangeLog | 11 +++++++++ sensor-adduser/sensor-adduser.c | 48 ++++++++++++++++++++++---------------- 2 files changed, 39 insertions(+), 20 deletions(-) commit faa5fedf8f5b5eee11ade99d176ec55390fa715c Author: Yoann Vandoorselaere Date: Sat Sep 7 18:30:51 2002 +0000 *** empty log message *** git-svn-id: file:///home/yoann/SVN/trunk/libprelude@1582 09c5ec92-17d4-0310-903a-819935f44dba ChangeLog | 6 ++++++ 1 files changed, 6 insertions(+), 0 deletions(-) commit feaaa7ba6ea58e1c5a2e8482b378426a7e176e84 Author: Yoann Vandoorselaere Date: Sat Sep 7 18:30:51 2002 +0000 *** empty log message *** git-svn-id: file:///home/yoann/SVN/trunk/libprelude@1581 09c5ec92-17d4-0310-903a-819935f44dba ChangeLog | 13 +++++++++++++ src/idmef-msg-send.c | 5 ++++- src/prelude-getopt.c | 21 ++++++++++++--------- 3 files changed, 29 insertions(+), 10 deletions(-) commit c591d469c48bd085b716cecb72669b9355bcceb3 Author: Guillaume Pelat Date: Tue Sep 3 20:24:36 2002 +0000 * src/config-engine.c (load_file_in_memory): Fix possible file descriptor leak. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@1580 09c5ec92-17d4-0310-903a-819935f44dba ChangeLog | 5 ++++- src/config-engine.c | 4 +++- src/daemonize.c | 2 +- 3 files changed, 8 insertions(+), 3 deletions(-) commit 086ecc35e5fad40bfb8c4230d268ad2b889bfec4 Author: Guillaume Pelat Date: Tue Sep 3 19:10:44 2002 +0000 2002-09-03 Guillaume Pelat * src/daemonize.c (lockfile_get_exclusive): Fix possible file descriptor leak. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@1571 09c5ec92-17d4-0310-903a-819935f44dba ChangeLog | 5 +++++ src/daemonize.c | 1 + 2 files changed, 6 insertions(+), 0 deletions(-) commit 98efd0ab81d3982e5cde780ff6c0c653709cd9b7 Author: Yoann Vandoorselaere Date: Thu Aug 29 11:29:24 2002 +0000 *** empty log message *** git-svn-id: file:///home/yoann/SVN/trunk/libprelude@1553 09c5ec92-17d4-0310-903a-819935f44dba ChangeLog | 4 ++ NEWS | 11 ++++ configure.in | 2 +- docs/api/tmpl/client-ident.sgml | 8 +++ docs/api/tmpl/common.sgml | 12 ++++ docs/api/tmpl/idmef-msg-send.sgml | 18 +++++++ docs/api/tmpl/idmef-tree-func.sgml | 90 +++++++++++++++++++++++++++++++++ docs/api/tmpl/idmef-tree.sgml | 7 +++ docs/api/tmpl/prelude-client.sgml | 17 ++++++ docs/api/tmpl/prelude-getopt.sgml | 35 +++++++++++++ docs/api/tmpl/prelude-message-id.sgml | 35 +++++++++++++ docs/api/tmpl/prelude-path.sgml | 24 ++++---- docs/api/tmpl/sensor.sgml | 26 +++++++++ 13 files changed, 276 insertions(+), 13 deletions(-) commit e58a8804a7dd547d5f535485c1bb175703851c92 Author: Yoann Vandoorselaere Date: Thu Aug 29 11:29:24 2002 +0000 *** empty log message *** git-svn-id: file:///home/yoann/SVN/trunk/libprelude@1552 09c5ec92-17d4-0310-903a-819935f44dba docs/api/tmpl/timer.sgml | 7 +++++++ 1 files changed, 7 insertions(+), 0 deletions(-) commit 14c29bfe74f866580f71ce15f57ca1a7c7209faa Author: Yoann Vandoorselaere Date: Thu Aug 29 01:21:55 2002 +0000 *** empty log message *** git-svn-id: file:///home/yoann/SVN/trunk/libprelude@1546 09c5ec92-17d4-0310-903a-819935f44dba ChangeLog | 15 ++++++++++++++ sensor-adduser/ssl-register.c | 2 +- src/plugin-common.c | 2 - src/prelude-getopt.c | 43 +++++++++++++++++++++++----------------- 4 files changed, 41 insertions(+), 21 deletions(-) commit 0923bdb197bb9069a854025817113c341d4b4389 Author: Yoann Vandoorselaere Date: Wed Aug 28 00:31:33 2002 +0000 *** empty log message *** git-svn-id: file:///home/yoann/SVN/trunk/libprelude@1540 09c5ec92-17d4-0310-903a-819935f44dba ChangeLog | 5 +++++ configure.in | 8 +++++--- 2 files changed, 10 insertions(+), 3 deletions(-) commit c747031a19ec02592f4cec1a0873e09aa3ad588e Author: Yoann Vandoorselaere Date: Mon Aug 26 12:15:40 2002 +0000 *** empty log message *** git-svn-id: file:///home/yoann/SVN/trunk/libprelude@1534 09c5ec92-17d4-0310-903a-819935f44dba NEWS | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) commit 8b41f924859e75d51fcb79a380fb4e67abd728c4 Author: Yoann Vandoorselaere Date: Mon Aug 26 12:06:19 2002 +0000 Sync with libprelude-0-8 git-svn-id: file:///home/yoann/SVN/trunk/libprelude@1532 09c5ec92-17d4-0310-903a-819935f44dba ChangeLog | 6 +++--- NEWS | 20 ++++++++++++++++++++ configure.in | 6 +++--- 3 files changed, 26 insertions(+), 6 deletions(-) commit 13eaeb1c9bfcc5f09a0ee9c2e156dadd058911de Author: Yoann Vandoorselaere Date: Sun Aug 25 21:24:48 2002 +0000 *** empty log message *** git-svn-id: file:///home/yoann/SVN/trunk/libprelude@1519 09c5ec92-17d4-0310-903a-819935f44dba ChangeLog | 5 +++++ src/include/Makefile.am | 2 +- 2 files changed, 6 insertions(+), 1 deletions(-) commit 48349a55a67bcc5c65235c6c5e37f9370f79fa21 Author: Yoann Vandoorselaere Date: Thu Aug 22 11:34:43 2002 +0000 2002-08-22 Yoann Vandoorselaere * src/plugin-common.c (plugin_subscribe): Walk the list in reverse order so that we work as a LIFO and a plugin loading another, both subscribing from plugin_init(), won't end up with undefined result. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@1501 09c5ec92-17d4-0310-903a-819935f44dba ChangeLog | 7 +++++++ src/plugin-common.c | 9 +++++++-- 2 files changed, 14 insertions(+), 2 deletions(-) commit ecc2b56597e0d31d6dd96c84e9f0386ca2a0dd65 Author: Krzysztof Zaraska Date: Thu Aug 22 08:47:47 2002 +0000 fixing wrong commit git-svn-id: file:///home/yoann/SVN/trunk/libprelude@1489 09c5ec92-17d4-0310-903a-819935f44dba src/Makefile.am | 2 - src/idmef-util.c | 624 ---------------------------------------------- src/include/Makefile.am | 2 - src/include/idmef-util.h | 74 ------ src/include/ntp.h | 90 ------- src/ntp.c | 185 -------------- 6 files changed, 0 insertions(+), 977 deletions(-) commit b4a9d1173b87cf3eb8ca91efde6f68fd97292fb1 Author: Krzysztof Zaraska Date: Thu Aug 22 08:37:34 2002 +0000 added idmef-util.c and dependencies git-svn-id: file:///home/yoann/SVN/trunk/libprelude@1488 09c5ec92-17d4-0310-903a-819935f44dba src/Makefile.am | 2 + src/idmef-util.c | 624 ++++++++++++++++++++++++++++++++++++++++++++++ src/include/Makefile.am | 4 +- src/include/idmef-util.h | 74 ++++++ src/include/ntp.h | 90 +++++++ src/ntp.c | 185 ++++++++++++++ 6 files changed, 978 insertions(+), 1 deletions(-) commit d0a012e8f71962cdcf76d06c295f01407ed3a906 Author: Yoann Vandoorselaere Date: Wed Aug 21 21:19:20 2002 +0000 *** empty log message *** git-svn-id: file:///home/yoann/SVN/trunk/libprelude@1484 09c5ec92-17d4-0310-903a-819935f44dba ChangeLog | 9 +++++++++ src/plugin-common.c | 3 ++- 2 files changed, 11 insertions(+), 1 deletions(-) commit 432528dac3ac099141094565c78913f595a61006 Author: Yoann Vandoorselaere Date: Fri Aug 9 10:19:36 2002 +0000 2002-08-09 Yoann Vandoorselaere Included patch from Guillaume Pelat with slight modifications : * src/ssl-settings.c: Removed ask_manager_addr() and ask_configuration() that were unused. * sensor-adduser/ssl-register.c (ask_configuration): Handle fgets() error return, fix recursive loop in case the user answer "no" to the confirmation question. * src/prelude-auth.c (ask_username): handle fgets() NULL return. (parse_auth_line): free username before returning if we got an error. (comfirm_account_creation): check buf after filling it on the first time (do while, instead of while), buf content may be random before fgets() is called. Increase buf length, because it's not clear if fgets() will stop reading after size-1 byte is read (glibc fgets won't thought, but SUSv2 specify it should). Let enough room for the user to type "yes" or "no" if he want to. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@1460 09c5ec92-17d4-0310-903a-819935f44dba ChangeLog | 29 ++++++++++++++++ docs/api/libprelude-docs.sgml | 2 +- docs/api/libprelude-sections.txt | 34 +++++++++++++++++-- sensor-adduser/ssl-register.c | 54 +++++++++++++---------------- src/prelude-auth.c | 17 ++++++--- src/ssl-settings.c | 70 ++++++-------------------------------- 6 files changed, 108 insertions(+), 98 deletions(-) commit df833556421384171b85f7627800a22c4f303ebf Author: Yoann Vandoorselaere Date: Thu Aug 8 14:08:08 2002 +0000 slight fix git-svn-id: file:///home/yoann/SVN/trunk/libprelude@1457 09c5ec92-17d4-0310-903a-819935f44dba ChangeLog | 7 +++++++ src/prelude-client.c | 6 +----- 2 files changed, 8 insertions(+), 5 deletions(-) commit 156627d70edee70886f322fe243a9741aea7fc05 Author: Yoann Vandoorselaere Date: Tue Jul 30 01:00:14 2002 +0000 (empty) git-svn-id: file:///home/yoann/SVN/trunk/libprelude@1446 09c5ec92-17d4-0310-903a-819935f44dba ChangeLog | 4 ++++ configure.in | 2 +- 2 files changed, 5 insertions(+), 1 deletions(-) commit 4369921793c080e7e7d0138692fa4d5d53381096 Author: Yoann Vandoorselaere Date: Tue Jul 30 00:53:38 2002 +0000 "warning fix..." git-svn-id: file:///home/yoann/SVN/trunk/libprelude@1445 09c5ec92-17d4-0310-903a-819935f44dba docs/api/libprelude-decl.txt | 137 +++++++++++++++++++++++++++++++------- docs/api/tmpl/config-engine.sgml | 2 + src/include/idmef-tree.h | 34 +++++----- src/include/prelude-getopt.h | 2 +- src/include/prelude-message.h | 2 +- src/prelude-client.c | 7 +- src/prelude-getopt.c | 2 +- 7 files changed, 139 insertions(+), 47 deletions(-) commit a9b32f906393a030e0d67d1b2cc6abb17a864a0b Author: Yoann Vandoorselaere Date: Mon Jul 29 01:14:59 2002 +0000 "include fix" git-svn-id: file:///home/yoann/SVN/trunk/libprelude@1440 09c5ec92-17d4-0310-903a-819935f44dba src/include/extract.h | 4 +++- 1 files changed, 3 insertions(+), 1 deletions(-) commit 40df1370e9c0d48410c262fc004ada1d1b07dea9 Author: Yoann Vandoorselaere Date: Sun Jul 28 15:25:10 2002 +0000 2002-07-28 Yoann Vandoorselaere * src/prelude-getopt.c (parse_argument): respect option priority with command line option. call_option_cb() do this for us. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@1434 09c5ec92-17d4-0310-903a-819935f44dba ChangeLog | 6 ++++++ src/prelude-getopt.c | 44 +++++++++++++------------------------------- 2 files changed, 19 insertions(+), 31 deletions(-) commit ad3ad9f9e9006227267b4ecc64db89ebe1b33376 Author: Yoann Vandoorselaere Date: Thu Jul 25 12:23:46 2002 +0000 2002-07-25 Yoann Vandoorselaere * docs/api/Makefile.am: remove check for gtk-doc on make dist... As we cannot force distcheck to pass the --enable-gtkdoc configure argument, it would fail anyway. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@1431 09c5ec92-17d4-0310-903a-819935f44dba ChangeLog | 7 +++++++ docs/api/Makefile.am | 9 +-------- 2 files changed, 8 insertions(+), 8 deletions(-) commit be28c04890f5d3cc66590c14249c77cf5a537e4a Author: Yoann Vandoorselaere Date: Tue Jul 23 13:01:21 2002 +0000 constness fix git-svn-id: file:///home/yoann/SVN/trunk/libprelude@1428 09c5ec92-17d4-0310-903a-819935f44dba src/sensor.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) commit 5551cfac72a0cdeef37c29e6120ee1b41a0ed8de Author: Yoann Vandoorselaere Date: Tue Jul 23 12:59:55 2002 +0000 2002-07-23 Yoann Vandoorselaere * src/sensor.c (setup_manager_addr): dup manager_cfg_line. (parse_argument): free manager_cfg_line. * src/prelude-getopt.c (call_option_from_cb_list): free(cb->arg). * src/prelude-client.c (prelude_client_close): new function, close a client. (prelude_client_new): set connection_broken to 1 if we are not connected. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@1427 09c5ec92-17d4-0310-903a-819935f44dba ChangeLog | 14 ++++++++++++++ src/include/prelude-client.h | 1 + src/prelude-client.c | 10 +++++++++- src/prelude-getopt.c | 5 +---- src/sensor.c | 15 +++++++-------- 5 files changed, 32 insertions(+), 13 deletions(-) commit 9c915967256b471f89e97eda9bf2a61f40b867c4 Author: Yoann Vandoorselaere Date: Mon Jul 22 18:32:29 2002 +0000 2002-07-22 Yoann Vandoorselaere * src/prelude-client.c (prelude_client_get_fd): new function, return the prelude_io_t used to talk to the client. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@1422 09c5ec92-17d4-0310-903a-819935f44dba ChangeLog | 6 ++++++ src/include/prelude-client.h | 2 ++ src/prelude-client.c | 15 +++++++++++++++ 3 files changed, 23 insertions(+), 0 deletions(-) commit 3b4fbd2c86701bdd64a3a7dd4817c7b05c2d13e8 Author: Yoann Vandoorselaere Date: Fri Jul 19 15:10:28 2002 +0000 "see the changelog" git-svn-id: file:///home/yoann/SVN/trunk/libprelude@1420 09c5ec92-17d4-0310-903a-819935f44dba ChangeLog | 12 ++++++++++++ README | 7 +++++++ 2 files changed, 19 insertions(+), 0 deletions(-) commit 9b6a96aa381590e077c5c91d8e24c8f3dc5a7b53 Author: Yoann Vandoorselaere Date: Wed Jul 17 17:53:23 2002 +0000 *** empty log message *** git-svn-id: file:///home/yoann/SVN/trunk/libprelude@1417 09c5ec92-17d4-0310-903a-819935f44dba ChangeLog | 4 ++++ src/sensor.c | 13 +++++++++---- 2 files changed, 13 insertions(+), 4 deletions(-) commit 06906d0b545c03f507f360c0d24282d2eac43781 Author: Yoann Vandoorselaere Date: Wed Jul 17 15:17:08 2002 +0000 *** empty log message *** git-svn-id: file:///home/yoann/SVN/trunk/libprelude@1415 09c5ec92-17d4-0310-903a-819935f44dba ChangeLog | 11 +++++++++++ src/prelude-getopt.c | 15 ++++++--------- 2 files changed, 17 insertions(+), 9 deletions(-) commit 986e23f6f87a7de322a5146e893996fd5e568a16 Author: Yoann Vandoorselaere Date: Thu Jul 11 09:26:03 2002 +0000 *** empty log message *** git-svn-id: file:///home/yoann/SVN/trunk/libprelude@1412 09c5ec92-17d4-0310-903a-819935f44dba ChangeLog | 7 +++++++ src/sensor.c | 13 ++++++------- 2 files changed, 13 insertions(+), 7 deletions(-) commit ff4f4756348d0634f58ba9229b25e77d3b2bebbd Author: Yoann Vandoorselaere Date: Wed Jul 3 15:20:16 2002 +0000 *** empty log message *** git-svn-id: file:///home/yoann/SVN/trunk/libprelude@1404 09c5ec92-17d4-0310-903a-819935f44dba src/prelude-getopt.c | 8 ++++---- 1 files changed, 4 insertions(+), 4 deletions(-) commit 4593032a19c12743659767cadde3d0d961df78ef Author: Yoann Vandoorselaere Date: Wed Jul 3 15:17:16 2002 +0000 *** empty log message *** git-svn-id: file:///home/yoann/SVN/trunk/libprelude@1403 09c5ec92-17d4-0310-903a-819935f44dba ChangeLog | 6 ++++++ src/prelude-getopt.c | 11 ++++++----- 2 files changed, 12 insertions(+), 5 deletions(-) commit 840d32a3d1d984ba50e5e35ed4ae677d3159bdf6 Author: Yoann Vandoorselaere Date: Mon Jul 1 20:57:26 2002 +0000 *** empty log message *** git-svn-id: file:///home/yoann/SVN/trunk/libprelude@1385 09c5ec92-17d4-0310-903a-819935f44dba ChangeLog | 26 ++++++++++++++++++++++++++ sensor-adduser/sensor-adduser.c | 10 +++++----- src/common.c | 32 ++++++++++++++++++++++++++++++++ src/config-engine.c | 4 ++-- src/include/common.h | 2 ++ src/include/prelude-getopt.h | 11 ++++++++++- src/prelude-getopt.c | 36 ++++++++++++++++++++++++++++++++---- src/sensor.c | 24 ++++++++++++------------ 8 files changed, 121 insertions(+), 24 deletions(-) commit 7911fbba9fb5587825a37f69f519fa2a36390a5b Author: Krzysztof Zaraska Date: Wed Jun 19 08:26:15 2002 +0000 *** empty log message *** git-svn-id: file:///home/yoann/SVN/trunk/libprelude@1384 09c5ec92-17d4-0310-903a-819935f44dba ChangeLog | 5 +++++ 1 files changed, 5 insertions(+), 0 deletions(-) commit 12f18f7e863a64f6e429f58c86b7a27237b2434a Author: Krzysztof Zaraska Date: Wed Jun 19 08:25:48 2002 +0000 fix crash in prelude_sensor_init git-svn-id: file:///home/yoann/SVN/trunk/libprelude@1383 09c5ec92-17d4-0310-903a-819935f44dba src/sensor.c | 35 ++++++++++++++++++++++++++--------- 1 files changed, 26 insertions(+), 9 deletions(-) commit 890e6c574ad7b06ce3c5f6d042936169a86c1570 Author: Yoann Vandoorselaere Date: Tue Jun 18 13:01:15 2002 +0000 *** empty log message *** git-svn-id: file:///home/yoann/SVN/trunk/libprelude@1382 09c5ec92-17d4-0310-903a-819935f44dba ChangeLog | 5 +++++ src/plugin-common.c | 2 +- 2 files changed, 6 insertions(+), 1 deletions(-) commit 03cd9739f74bcd43dd5cf826e61ffcf438d2c3cf Author: Yoann Vandoorselaere Date: Mon Jun 17 09:02:31 2002 +0000 *** empty log message *** git-svn-id: file:///home/yoann/SVN/trunk/libprelude@1375 09c5ec92-17d4-0310-903a-819935f44dba ChangeLog | 24 ++++ src/idmef-msg-send.c | 7 +- src/idmef-tree-func.c | 284 ++++++++++++++++++++++++++++++++++++++++- src/include/idmef-tree-func.h | 32 +++++ src/include/idmef-tree.h | 5 +- 5 files changed, 343 insertions(+), 9 deletions(-) commit 7b08408a1c3b348f651d39af6a19d28167fa739d Author: Yoann Vandoorselaere Date: Fri Jun 14 08:32:57 2002 +0000 *** empty log message *** git-svn-id: file:///home/yoann/SVN/trunk/libprelude@1371 09c5ec92-17d4-0310-903a-819935f44dba ChangeLog | 5 +++++ Makefile.am | 28 ++++++++++++++-------------- 2 files changed, 19 insertions(+), 14 deletions(-) commit bcd50580ba207d641a219b39b24feb7a168300a3 Author: Yoann Vandoorselaere Date: Mon Jun 10 10:33:00 2002 +0000 *** empty log message *** git-svn-id: file:///home/yoann/SVN/trunk/libprelude@1357 09c5ec92-17d4-0310-903a-819935f44dba ChangeLog | 4 ++++ src/prelude-getopt.c | 19 +++++++++++-------- 2 files changed, 15 insertions(+), 8 deletions(-) commit a392b35baf4ee7ec976d956f12a032052ad903f3 Author: Yoann Vandoorselaere Date: Mon Jun 10 01:36:26 2002 +0000 *** empty log message *** git-svn-id: file:///home/yoann/SVN/trunk/libprelude@1355 09c5ec92-17d4-0310-903a-819935f44dba autogen.sh | 19 +++++++++++++++++++ 1 files changed, 19 insertions(+), 0 deletions(-) commit ded70033f785e05b6f7f9bc8988b1982fbaa0128 Author: Yoann Vandoorselaere Date: Mon Jun 10 01:26:24 2002 +0000 *** empty log message *** git-svn-id: file:///home/yoann/SVN/trunk/libprelude@1354 09c5ec92-17d4-0310-903a-819935f44dba ChangeLog | 6 ++++++ 1 files changed, 6 insertions(+), 0 deletions(-) commit be4feaacd96e990f921ec3c5a6ea1bbe6fce432d Author: Yoann Vandoorselaere Date: Mon Jun 10 00:34:47 2002 +0000 *** empty log message *** git-svn-id: file:///home/yoann/SVN/trunk/libprelude@1353 09c5ec92-17d4-0310-903a-819935f44dba ChangeLog | 5 +++++ configure.in | 13 +------------ 2 files changed, 6 insertions(+), 12 deletions(-) commit 372f905f1d6bcc584fd1ed3ae5cf19c6d6bfe4fa Author: Yoann Vandoorselaere Date: Thu Jun 6 22:34:17 2002 +0000 *** empty log message *** git-svn-id: file:///home/yoann/SVN/trunk/libprelude@1345 09c5ec92-17d4-0310-903a-819935f44dba ChangeLog | 42 +++++++++ sensors-default.conf | 2 +- src/config-engine.c | 105 +++++++++++------------ src/include/config-engine.h | 6 +- src/prelude-getopt.c | 200 +++++++++++++++++++++++++++++-------------- src/sensor.c | 32 +++++--- 6 files changed, 251 insertions(+), 136 deletions(-) commit 0b57573b9c9960306c3c8d59a8ced2452ebe6802 Author: Yoann Vandoorselaere Date: Thu Jun 6 01:13:00 2002 +0000 *** empty log message *** git-svn-id: file:///home/yoann/SVN/trunk/libprelude@1341 09c5ec92-17d4-0310-903a-819935f44dba sensors-default.conf | 30 +++++++++++++++++++++++------- 1 files changed, 23 insertions(+), 7 deletions(-) commit 23f4a8eaa326c295df3f748cc482e874297202b2 Author: Yoann Vandoorselaere Date: Thu Jun 6 00:11:10 2002 +0000 *** empty log message *** git-svn-id: file:///home/yoann/SVN/trunk/libprelude@1340 09c5ec92-17d4-0310-903a-819935f44dba src/sensor.c | 116 +++++++++++++++++++++++++++++++++++++++++++++------------- 1 files changed, 90 insertions(+), 26 deletions(-) commit b3c939e1dea30203ac86270b6c4d1119ba31876c Author: Yoann Vandoorselaere Date: Wed Jun 5 17:22:22 2002 +0000 *** empty log message *** git-svn-id: file:///home/yoann/SVN/trunk/libprelude@1338 09c5ec92-17d4-0310-903a-819935f44dba ChangeLog | 6 +++ docs/api/libprelude-decl.txt | 5 +++ sensor-adduser/ssl-register.c | 1 + src/include/sensor.h | 2 +- src/prelude-client.c | 1 - src/prelude-getopt.c | 19 +++++++---- src/prelude-message-buffered.c | 1 + src/sensor.c | 70 +++++++++++++++++++++++++++------------ 8 files changed, 74 insertions(+), 31 deletions(-) commit 8a590f3b524c5fc53a3335fdb2f424ba6b9bc25d Author: Yoann Vandoorselaere Date: Wed Jun 5 16:14:39 2002 +0000 2002-06-05 Yoann Vandoorselaere * src/sensor.c (parse_argument): add node and analyzer configuration only option. (prelude_analyzer_fill_information): new function, setup an analyzer. * sensors-default.conf (manager-addr): Add commentary for generic analyzer informations. * src/sensor.c (prelude_heartbeat_register_cb): don't initialize timer and send initial heartbeat if heartbeat_repeat_time is 0. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@1337 09c5ec92-17d4-0310-903a-819935f44dba ChangeLog | 8 +++ sensors-default.conf | 35 +++++++++++ src/include/sensor.h | 2 + src/sensor.c | 158 ++++++++++++++++++++++++++++++++++++++++++++++++-- 4 files changed, 197 insertions(+), 6 deletions(-) commit 816d57d017be0d91a49b9bc022dd978503b069bd Author: Yoann Vandoorselaere Date: Wed Jun 5 10:14:45 2002 +0000 2002-06-05 Yoann Vandoorselaere * src/sensor.c (prelude_heartbeat_register_cb): don't initialize timer and send initial heartbeat if heartbeat_repeat_time is 0. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@1336 09c5ec92-17d4-0310-903a-819935f44dba ChangeLog | 13 +++++++++++++ docs/api/libprelude-decl.txt | 38 ++++++++++++++++++++++++++------------ src/sensor.c | 3 +++ 3 files changed, 42 insertions(+), 12 deletions(-) commit 774aa59a104d36c1124195a6b6a3bb9fc7e7dbf6 Author: Yoann Vandoorselaere Date: Wed Jun 5 00:01:40 2002 +0000 *** empty log message *** git-svn-id: file:///home/yoann/SVN/trunk/libprelude@1335 09c5ec92-17d4-0310-903a-819935f44dba CREDITS | 8 ++------ 1 files changed, 2 insertions(+), 6 deletions(-) commit 4ebbb07ef77077cff5e20e5c4555931fd6755acb Author: Yoann Vandoorselaere Date: Tue Jun 4 12:27:26 2002 +0000 *** empty log message *** git-svn-id: file:///home/yoann/SVN/trunk/libprelude@1332 09c5ec92-17d4-0310-903a-819935f44dba autogen.sh | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) commit 3d6e291d4b10eccb8d2a2f76339aa28611da6ed4 Author: Yoann Vandoorselaere Date: Mon Jun 3 19:33:55 2002 +0000 *** empty log message *** git-svn-id: file:///home/yoann/SVN/trunk/libprelude@1331 09c5ec92-17d4-0310-903a-819935f44dba sensor-adduser/ssl-register.c | 12 +++++++++++- 1 files changed, 11 insertions(+), 1 deletions(-) commit f65bc51f3edbf46ce05416e3a6c0e2e3b7735b4b Author: Yoann Vandoorselaere Date: Sat Jun 1 10:36:34 2002 +0000 *** empty log message *** git-svn-id: file:///home/yoann/SVN/trunk/libprelude@1323 09c5ec92-17d4-0310-903a-819935f44dba sensor-adduser/ssl-register.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) commit f94247e564c27faaf2bacdd3abd48f228c55d546 Author: Yoann Vandoorselaere Date: Sat Jun 1 02:36:24 2002 +0000 *** empty log message *** git-svn-id: file:///home/yoann/SVN/trunk/libprelude@1322 09c5ec92-17d4-0310-903a-819935f44dba src/sensor.c | 5 +++++ 1 files changed, 5 insertions(+), 0 deletions(-) commit 2c79a770853bce848c560f441da67faba942c598 Author: Yoann Vandoorselaere Date: Sat Jun 1 02:35:27 2002 +0000 2002-06-01 Yoann Vandoorselaere * src/sensor.c (parse_argument): set --manager-addr option to be ran last, so that applications that change user throught prelude-getopt don't get a message telling to run sensor-adduser with --uid 0 when it should be another uid. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@1321 09c5ec92-17d4-0310-903a-819935f44dba ChangeLog | 6 ++++++ src/sensor.c | 11 ++++++----- 2 files changed, 12 insertions(+), 5 deletions(-) commit e819201e3b49702e6ce76406ba05e764842735fe Author: Yoann Vandoorselaere Date: Sat Jun 1 02:28:07 2002 +0000 2002-06-01 Yoann Vandoorselaere * src/ssl-gencrypto.c (add_DN_object): use X509_NAME_add_entry() together with X509_NAME_ENTRY_create_by_NID() so that we work on with older OpenSSL version. * src/client-ident.c (prelude_client_set_analyzer_id): new function. * sensor-adduser/sensor-adduser.c (setup_sensor_files): don't call generate_sensor_ident here. Take the ident as argument. (main): generate the ident here, and use the prelude_client_set_analyzer_id function so that the ident will be used to generate the SSL certificate subject. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@1320 09c5ec92-17d4-0310-903a-819935f44dba ChangeLog | 18 ++++++++++++++++++ sensor-adduser/sensor-adduser.c | 25 +++++++++++++++---------- src/client-ident.c | 6 ++++++ src/include/client-ident.h | 2 ++ src/ssl-gencrypto.c | 25 ++++++++++++++----------- 5 files changed, 55 insertions(+), 21 deletions(-) commit 8e819b2bf89a50c174d2c3914c630ecf7af9c10e Author: Yoann Vandoorselaere Date: Fri May 31 20:11:05 2002 +0000 *** empty log message *** git-svn-id: file:///home/yoann/SVN/trunk/libprelude@1313 09c5ec92-17d4-0310-903a-819935f44dba src/include/sensor.h | 2 +- src/sensor.c | 16 ++++++++++++---- 2 files changed, 13 insertions(+), 5 deletions(-) commit d25982c314efa334332f88c4a00f6b4c2d51b573 Author: Yoann Vandoorselaere Date: Fri May 31 20:03:02 2002 +0000 2002-05-31 Yoann Vandoorselaere * src/sensor.c (setup_heartbeat_repeat_time): impl - set heartbeat timer timeout. (prelude_heartbeat_register_cb): new function, setup the heartbeat timer and callback, and send an initial heartbeat. (prelude_heartbeat_send): new function, send an hearbeat. (parse_argument): stop providing short option, there is much chance that we'll conflict with the apps. (parse_argument): new global option, "heartbeat-time", to set timer heartbeat timeout. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@1312 09c5ec92-17d4-0310-903a-819935f44dba ChangeLog | 16 +++++++++ src/include/sensor.h | 4 ++ src/sensor.c | 87 ++++++++++++++++++++++++++++++++++++++++++++++++- 3 files changed, 105 insertions(+), 2 deletions(-) commit 6d3401e615d6d04167f06bc6acb0ca4b9e7545a6 Author: Yoann Vandoorselaere Date: Fri May 31 11:24:31 2002 +0000 2002-05-31 Yoann Vandoorselaere * src/idmef-msg-send.c (idmef_send_alert): fix a typo, send analyzer time instead of sending twice detect time. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@1307 09c5ec92-17d4-0310-903a-819935f44dba ChangeLog | 6 ++++++ src/idmef-msg-send.c | 2 +- 2 files changed, 7 insertions(+), 1 deletions(-) commit 28cc4f1a29f6b7f0b71661fc73bb87bdc7a67ebd Author: Yoann Vandoorselaere Date: Thu May 30 16:10:21 2002 +0000 *** empty log message *** git-svn-id: file:///home/yoann/SVN/trunk/libprelude@1299 09c5ec92-17d4-0310-903a-819935f44dba ChangeLog | 10 ++++++++++ src/idmef-msg-send.c | 13 +++++++++---- 2 files changed, 19 insertions(+), 4 deletions(-) commit 477c14fce773c979987f24b9f368ed978308bab8 Author: Yoann Vandoorselaere Date: Thu May 30 15:11:05 2002 +0000 2002-05-30 Yoann Vandoorselaere * src/idmef-msg-send.c (idmef_send_create_time): don't get create time here since it prevent caller to override the value. * src/idmef-tree-func.c (idmef_alert_new): get create time here. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@1296 09c5ec92-17d4-0310-903a-819935f44dba ChangeLog | 7 +++++++ src/idmef-msg-send.c | 21 +++++++++++++-------- src/idmef-tree-func.c | 6 ++++++ src/include/idmef-msg-send.h | 2 ++ 4 files changed, 28 insertions(+), 8 deletions(-) commit a2b308668324b8d376622857c2499eaf739d801c Author: Yoann Vandoorselaere Date: Thu May 30 09:43:46 2002 +0000 2002-05-30 Yoann Vandoorselaere * src/include/idmef-tree-func.h (idmef_additional_data_set_data): new inline function. * src/idmef-msg-send.c (idmef_send_additional_data): don't use idmef_send_string for AdditionalData data field. * src/include/idmef-tree.h: AdditionalData data field is not an idmef_string_t... git-svn-id: file:///home/yoann/SVN/trunk/libprelude@1284 09c5ec92-17d4-0310-903a-819935f44dba ChangeLog | 12 ++++++++++++ docs/api/libprelude-decl.txt | 41 ++++++++++++++++++++++++++++++++++++++++- src/idmef-msg-send.c | 2 +- src/include/idmef-tree-func.h | 14 ++++++++++++++ src/include/idmef-tree.h | 7 ++++--- 5 files changed, 71 insertions(+), 5 deletions(-) commit d543b2d3d84e7cafd09321c7d509f46f7931a006 Author: Laurent Oudot Date: Thu May 30 02:27:07 2002 +0000 *** empty log message *** git-svn-id: file:///home/yoann/SVN/trunk/libprelude@1280 09c5ec92-17d4-0310-903a-819935f44dba ChangeLog | 5 +++++ sensor-adduser/sensor-adduser.c | 2 +- 2 files changed, 6 insertions(+), 1 deletions(-) commit 5f7718c3b421d651f121c7fd7a6cbd2c00c90634 Author: Yoann Vandoorselaere Date: Fri May 24 12:22:57 2002 +0000 * src/timer.c (timer_flush): new function, expire remaining timer. (walk_and_wake_up_timer): remove debugging code. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@1254 09c5ec92-17d4-0310-903a-819935f44dba ChangeLog | 7 +++++++ src/include/timer.h | 6 ++++++ src/timer.c | 34 ++++++++++++++++------------------ 3 files changed, 29 insertions(+), 18 deletions(-) commit ac52a95b33a127afffe921bd83e6f3507b560d27 Author: Krzysztof Zaraska Date: Tue May 21 20:37:39 2002 +0000 improved pthread detection code git-svn-id: file:///home/yoann/SVN/trunk/libprelude@1244 09c5ec92-17d4-0310-903a-819935f44dba ChangeLog | 5 +++++ configure.in | 30 +++++++++++++----------------- 2 files changed, 18 insertions(+), 17 deletions(-) commit 05b4159fa6047dc979f199891e712b085eeec4df Author: Yoann Vandoorselaere Date: Tue May 21 14:55:56 2002 +0000 *** empty log message *** git-svn-id: file:///home/yoann/SVN/trunk/libprelude@1240 09c5ec92-17d4-0310-903a-819935f44dba ChangeLog | 3 +++ sensor-adduser/sensor-adduser.c | 6 +++--- 2 files changed, 6 insertions(+), 3 deletions(-) commit 82ee7d5deeeb7cf0e0e9fd3e7f5e4f1d9d7cb421 Author: Yoann Vandoorselaere Date: Tue May 21 07:18:44 2002 +0000 *** empty log message *** git-svn-id: file:///home/yoann/SVN/trunk/libprelude@1235 09c5ec92-17d4-0310-903a-819935f44dba ChangeLog | 4 ++++ src/client-ident.c | 1 + src/include/idmef-tree-func.h | 2 +- src/include/string-matching.h | 2 +- 4 files changed, 7 insertions(+), 2 deletions(-) commit f35825befdc4bc23fe89407434e0e3620fc188a0 Author: Baptiste Malguy Date: Fri May 17 15:04:53 2002 +0000 * src/include/prelude-message-id.h: added some definition for counter-measure stuff. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@1210 09c5ec92-17d4-0310-903a-819935f44dba ChangeLog | 5 +++++ src/include/prelude-message-id.h | 10 ++++++++++ 2 files changed, 15 insertions(+), 0 deletions(-) commit 943f0c4c268dba1665244b074898fc028aeb36e7 Author: Yoann Vandoorselaere Date: Thu May 16 15:20:38 2002 +0000 * src/ssl-registration-msg.c (prelude_ssl_save_cert): * src/ssl-gencrypto.c (prelude_ssl_gen_crypto): * src/prelude-auth.c (open_auth_file): Show more information on error. Use -1 instead of 0 as the fchown() GID argument. This avoid problem when sensor-adduser is used by a non priviledged user. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@1192 09c5ec92-17d4-0310-903a-819935f44dba ChangeLog | 8 +++++++- docs/api/libprelude-decl.txt | 8 -------- docs/api/tmpl/libprelude-unused.sgml | 12 ++++++++++++ docs/api/tmpl/list.sgml | 7 ------- docs/api/tmpl/ssl-registration-msg.sgml | 7 ------- src/prelude-auth.c | 2 +- src/ssl-gencrypto.c | 4 ++-- src/ssl-registration-msg.c | 4 ++-- 8 files changed, 24 insertions(+), 28 deletions(-) commit 699553fc04dfa53a36d9dd3a9767881a68d10494 Author: Yoann Vandoorselaere Date: Thu May 16 15:01:37 2002 +0000 *** empty log message *** git-svn-id: file:///home/yoann/SVN/trunk/libprelude@1191 09c5ec92-17d4-0310-903a-819935f44dba ChangeLog | 5 +++++ src/prelude-auth.c | 2 +- 2 files changed, 6 insertions(+), 1 deletions(-) commit cb903a4539129df4cb8dcf08956834bd669925a1 Author: Baptiste Malguy Date: Thu May 16 10:14:17 2002 +0000 * src/include/*.h: added some #ifndef/#define and #endif in the header files for dependency inclusion purposes. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@1185 09c5ec92-17d4-0310-903a-819935f44dba ChangeLog | 6 ++++++ src/include/client-ident.h | 5 +++++ src/include/common.h | 5 +++++ src/include/config-engine.h | 4 ++++ src/include/daemonize.h | 5 +++++ src/include/extract.h | 6 +++--- src/include/idmef-message-id.h | 5 +++-- src/include/idmef-msg-send.h | 5 +++++ src/include/idmef-tree-func.h | 15 +++------------ src/include/idmef-tree.h | 6 +++--- src/include/list.h | 8 +++----- src/include/plugin-common-prv.h | 8 +++----- src/include/plugin-common.h | 6 +++--- src/include/prelude-async.h | 12 ++++-------- src/include/prelude-auth.h | 4 ++++ src/include/prelude-client-mgr.h | 4 ++++ src/include/prelude-client.h | 5 ++++- src/include/prelude-getopt-wide.h | 6 ++++++ src/include/prelude-getopt.h | 4 ++++ src/include/prelude-ident.h | 5 +++++ src/include/prelude-io.h | 5 +++++ src/include/prelude-list.h | 5 +++++ src/include/prelude-log.h | 5 +++++ src/include/prelude-message-buffered.h | 28 ++++++++++++++++++++++++++++ src/include/prelude-message-id.h | 5 +++++ src/include/prelude-message.h | 4 ++++ src/include/prelude-path.h | 6 ++++++ src/include/sensor.h | 5 +++++ src/include/ssl-gencrypto.h | 6 +++--- src/include/ssl-registration-msg.h | 7 +++---- src/include/ssl-settings.h | 4 ++++ src/include/ssl.h | 5 +++++ src/include/string-matching.h | 6 +++--- src/include/threads.h | 5 +++++ src/include/timer.h | 6 +++--- src/include/variable.h | 6 +++--- 36 files changed, 174 insertions(+), 58 deletions(-) commit ba7b2e9f3c21a7a368c4c5c45bb553ff070b9514 Author: Yoann Vandoorselaere Date: Wed May 15 17:01:39 2002 +0000 *** empty log message *** git-svn-id: file:///home/yoann/SVN/trunk/libprelude@1181 09c5ec92-17d4-0310-903a-819935f44dba src/prelude-getopt.c | 8 ++++---- 1 files changed, 4 insertions(+), 4 deletions(-) commit 70ded68163f277774198585b8258c839a950abd2 Author: Yoann Vandoorselaere Date: Wed May 15 16:48:58 2002 +0000 * src/prelude-getopt.c (parse_argument): don't lookup variable here. (check_option): take a size argument. (check_option_reqarg): (check_option_optarg): modified theses function so that option with multiple arguments are taken into account without the arguments needing to be quoted. (call_option_from_cb_list): call lookup_variable_if_needed() here. (call_option_cb): copy the argument. (lookup_variable_if_needed): ability to lookup several variable in one buffer. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@1180 09c5ec92-17d4-0310-903a-819935f44dba ChangeLog | 15 ++++++ src/prelude-getopt.c | 121 +++++++++++++++++++++++++++++++++---------------- 2 files changed, 96 insertions(+), 40 deletions(-) commit 66526dd559aaf2eb53ce2bccd9242788821d0f40 Author: Yoann Vandoorselaere Date: Wed May 15 11:30:32 2002 +0000 *** empty log message *** git-svn-id: file:///home/yoann/SVN/trunk/libprelude@1178 09c5ec92-17d4-0310-903a-819935f44dba docs/api/Makefile.am | 4 ++++ docs/api/libprelude-docs.sgml | 2 +- docs/api/tmpl/prelude-ident.sgml | 2 +- docs/api/tmpl/prelude-message.sgml | 13 +++++++------ 4 files changed, 13 insertions(+), 8 deletions(-) commit 6f28bdcf39befb4807ff5f250bd3a0e3995cc9bd Author: Yoann Vandoorselaere Date: Wed May 15 10:55:27 2002 +0000 * src/client-ident.c (declare_ident_to_manager): On big endian system, copy sensor_ident to nident so that we don't send an uninitialized value. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@1177 09c5ec92-17d4-0310-903a-819935f44dba ChangeLog | 4 ++++ src/client-ident.c | 4 +++- 2 files changed, 7 insertions(+), 1 deletions(-) commit d39c970346a035caeac163889670fdcec50df5db Author: Yoann Vandoorselaere Date: Wed May 15 08:06:33 2002 +0000 Fix last remaining prefix problem. * Makefile.am (install-data-local): create sensors_spool_dir. * src/prelude-path.c: remove BACKUP_DIR. (prelude_get_backup_filename): use SENSORS_SPOOL_DIR. * src/Makefile.am (DEFS): define SENSORS_SPOOL_DIR. * configure.in (sensors_spool_dir): configure spool directory. * src/common.c (prelude_resolve_addr): document this function. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@1174 09c5ec92-17d4-0310-903a-819935f44dba ChangeLog | 20 ++ Makefile.am | 1 + configure.in | 2 + docs/api/libprelude-decl.txt | 30 +-- docs/api/libprelude-docs.sgml | 2 - docs/api/libprelude-sections.txt | 8 - docs/api/tmpl/client-ident.sgml | 2 - docs/api/tmpl/common-gdb.sgml | 8 - docs/api/tmpl/common.sgml | 55 +--- docs/api/tmpl/extract.sgml | 2 - docs/api/tmpl/idmef-message-id.sgml | 456 +++++++++++++++++++++----- docs/api/tmpl/idmef-msg-send.sgml | 2 - docs/api/tmpl/idmef-tree-func.sgml | 2 - docs/api/tmpl/idmef-tree.sgml | 135 ++++++++- docs/api/tmpl/libprelude-unused.sgml | 40 +++ docs/api/tmpl/list.sgml | 19 ++ docs/api/tmpl/plugin-common-prv.sgml | 9 + docs/api/tmpl/prelude-auth.sgml | 27 ++ docs/api/tmpl/prelude-client.sgml | 38 +++ docs/api/tmpl/prelude-getopt-wide.sgml | 2 - docs/api/tmpl/prelude-getopt.sgml | 30 ++ docs/api/tmpl/prelude-ident.sgml | 2 - docs/api/tmpl/prelude-log.sgml | 2 - docs/api/tmpl/prelude-message-buffered.sgml | 2 - docs/api/tmpl/prelude-message-id.sgml | 2 - docs/api/tmpl/prelude-message.sgml | 54 ++++ docs/api/tmpl/prelude-path.sgml | 6 +- docs/api/tmpl/sensor.sgml | 16 + docs/api/tmpl/ssl-settings.sgml | 2 - docs/api/tmpl/threads.sgml | 2 - src/Makefile.am | 2 +- src/common.c | 9 + src/prelude-path.c | 8 +- 33 files changed, 784 insertions(+), 213 deletions(-) commit 2dc6440825f345cbf401ce4618a33e0127a53c8e Author: Yoann Vandoorselaere Date: Tue May 14 19:04:06 2002 +0000 * src/prelude-message.c (set_data): check call_alloc_cb return value. Avoid a possible NULL pointer dereference on out of memory condition. * src/prelude-message-buffered.c: remove unused send_msg_cb member. (flush_msg_cb): print an error if prelude_msg_dynamic_new() return NULL. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@1173 09c5ec92-17d4-0310-903a-819935f44dba ChangeLog | 12 ++++++++++++ src/prelude-message-buffered.c | 5 ++++- src/prelude-message.c | 2 ++ 3 files changed, 18 insertions(+), 1 deletions(-) commit a4b3c564d91728f9baf30124998b2eda05783520 Author: Vincent Glaume Date: Tue May 14 16:18:57 2002 +0000 * src/include/prelude-path.h: (prelude_get_socket_filename) has a new prototype. * src/prelude-path.c (prelude_get_socket_filename): builds a filename based on a port number for the unix socket, which allows to use several unix sockets. * src/prelude-client.c: complies to the new unix socket management. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@1171 09c5ec92-17d4-0310-903a-819935f44dba ChangeLog | 12 ++++++++++++ src/include/prelude-path.h | 4 +++- src/prelude-client.c | 13 ++++++++----- src/prelude-path.c | 4 ++-- 4 files changed, 25 insertions(+), 8 deletions(-) commit d6a1dccfdf41b94f618065ffe660637045878824 Author: Yoann Vandoorselaere Date: Mon May 13 09:29:42 2002 +0000 * src/prelude-client.c (prelude_client_connect): send ident before sending option list. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@1167 09c5ec92-17d4-0310-903a-819935f44dba ChangeLog | 5 + docs/api/libprelude-decl.txt | 10 +-- docs/api/libprelude-docs.sgml | 38 ++++-- docs/api/libprelude-sections.txt | 261 +++++++++++++++++++++++++++++--------- src/prelude-client.c | 10 +- 5 files changed, 239 insertions(+), 85 deletions(-) commit 1fdf57a7a53eebbf0ab78951ed63de9e7efe4278 Author: Yoann Vandoorselaere Date: Mon May 13 08:43:07 2002 +0000 *** empty log message *** git-svn-id: file:///home/yoann/SVN/trunk/libprelude@1165 09c5ec92-17d4-0310-903a-819935f44dba docs/api/tmpl/client-ident.sgml | 37 +++ docs/api/tmpl/common-gdb.sgml | 56 ++++ docs/api/tmpl/extract.sgml | 78 +++++ docs/api/tmpl/idmef-msg-send.sgml | 404 +++++++++++++++++++++++++++ docs/api/tmpl/idmef-tree-func.sgml | 398 ++++++++++++++++++++++++++ docs/api/tmpl/prelude-getopt-wide.sgml | 81 ++++++ docs/api/tmpl/prelude-ident.sgml | 53 ++++ docs/api/tmpl/prelude-log.sgml | 81 ++++++ docs/api/tmpl/prelude-message-buffered.sgml | 64 +++++ docs/api/tmpl/prelude-message-id.sgml | 123 ++++++++ docs/api/tmpl/prelude-path.sgml | 94 +++++++ docs/api/tmpl/ssl-settings.sgml | 27 ++ docs/api/tmpl/threads.sgml | 34 +++ 13 files changed, 1530 insertions(+), 0 deletions(-) commit 9e07615822ba43bebe331703fcc41588e151869d Author: Yoann Vandoorselaere Date: Tue May 7 23:21:05 2002 +0000 * src/include/prelude-message-id.h: remove deprecated MSG ID. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@1164 09c5ec92-17d4-0310-903a-819935f44dba ChangeLog | 3 +++ src/include/prelude-message-id.h | 4 +--- 2 files changed, 4 insertions(+), 3 deletions(-) commit 426f3c819f6e891da70fbfd39a33f263286244b0 Author: Yoann Vandoorselaere Date: Tue May 7 22:48:42 2002 +0000 * src/client-ident.c: removed code for requesting an ID to the Manager, since we now generate the ident number ourselv. (prelude_client_ident_init): read the ident generated by sensor-adduser from the ident file. * sensor-adduser/sensor-adduser.c (elf_hash): (time_hash): (generate_sensor_ident): (register_sensor_ident): (setup_sensor_files): generate, and register sensor ident. * configure.in (sensors_config_dir): declare sensor_ident_file. * Makefile.am (install-data-local): remove sensor_ident_dir. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@1161 09c5ec92-17d4-0310-903a-819935f44dba ChangeLog | 23 +++++ Makefile.am | 1 - configure.in | 4 +- sensor-adduser/Makefile.am | 2 +- sensor-adduser/sensor-adduser.c | 121 +++++++++++++++++++++++++++- src/Makefile.am | 2 +- src/client-ident.c | 172 +++++++++------------------------------ 7 files changed, 186 insertions(+), 139 deletions(-) commit a5bd288a84130fdd83d0fd4e4e69c7ae37b50e7d Author: Yoann Vandoorselaere Date: Mon May 6 14:19:38 2002 +0000 *** empty log message *** git-svn-id: file:///home/yoann/SVN/trunk/libprelude@1151 09c5ec92-17d4-0310-903a-819935f44dba Makefile.am | 2 +- configure.in | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit 8a0e7c740f3e455413bd55f334a0139eef70c6c0 Author: Yoann Vandoorselaere Date: Mon May 6 13:42:49 2002 +0000 *** empty log message *** git-svn-id: file:///home/yoann/SVN/trunk/libprelude@1149 09c5ec92-17d4-0310-903a-819935f44dba ChangeLog | 6 ++++++ docs/api/Makefile.am | 46 ++++++++++++++++++++++++---------------------- 2 files changed, 30 insertions(+), 22 deletions(-) commit 84cc13cf14a2205e557b5b51e056e16b19bbb201 Author: Yoann Vandoorselaere Date: Sun May 5 19:11:01 2002 +0000 *** empty log message *** git-svn-id: file:///home/yoann/SVN/trunk/libprelude@1140 09c5ec92-17d4-0310-903a-819935f44dba acconfig.h | 5 ----- 1 files changed, 0 insertions(+), 5 deletions(-) commit 46c43c8fff613fe57f22c660a899d8b558d683d5 Author: Yoann Vandoorselaere Date: Sun May 5 19:06:32 2002 +0000 make dist should now work. Also localstatedir is now respected. (Existing sensors / manager installation should re-create sensors account). * configure.in (sensors_config_dir): declare sensor_ident_dir. * Makefile.am (install-data-local): move authentication file to configuration dir. * configure.in: modify call to AC_DEFINE() so that we don't need acconfig.h anymore. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@1139 09c5ec92-17d4-0310-903a-819935f44dba ChangeLog | 15 +++++++++++++++ Makefile.am | 6 +++--- autogen.sh | 2 +- configure.in | 7 +++++-- docs/api/libprelude-decl.txt | 21 +++++++++++++++++++-- docs/api/tmpl/prelude-client-mgr.sgml | 1 + src/Makefile.am | 2 +- src/client-ident.c | 3 +-- src/prelude-path.c | 4 ++-- 9 files changed, 48 insertions(+), 13 deletions(-) commit f31760cc1401545f39c43299056c122add43aa82 Author: Yoann Vandoorselaere Date: Tue Apr 30 15:58:24 2002 +0000 * src/prelude-client-mgr.c (prelude_client_mgr_new): take a new type argument. For each created client, the specified type will be associated. * src/sensor.c: get rid of the is_caller_a_sensor variable. (setup_manager_addr): set client type to PRELUDE_CLIENT_TYPE_SENSOR. * src/prelude-client.c (prelude_client_new): default client type is PRELUDE_CLIENT_TYPE_OTHER. (prelude_client_connect): pass the client type to prelude_client_ident_send(). (prelude_client_set_type): new function, set client type. * src/client-ident.c (prelude_client_ident_send): now take a client_type argument. Only declare ident if type is PRELUDE_CLIENT_TYPE_SENSOR or PRELUDE_CLIENT_TYPE_MANAGER. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@1120 09c5ec92-17d4-0310-903a-819935f44dba ChangeLog | 23 +++++++++++++++++++++++ src/client-ident.c | 15 ++++++++++----- src/include/client-ident.h | 2 +- src/include/prelude-client-mgr.h | 2 +- src/include/prelude-client.h | 11 ++++++++++- src/prelude-client-mgr.c | 13 ++++++++----- src/prelude-client.c | 18 ++++++++++++++---- src/sensor.c | 7 ++----- 8 files changed, 69 insertions(+), 22 deletions(-) commit 19cd2f7a0288a4448212caaecf83b64a0e235358 Author: Yoann Vandoorselaere Date: Tue Apr 30 12:48:16 2002 +0000 *** empty log message *** git-svn-id: file:///home/yoann/SVN/trunk/libprelude@1119 09c5ec92-17d4-0310-903a-819935f44dba src/string-matching.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) commit c93bec160293c1306e74e780b2de65590780a363 Author: Yoann Vandoorselaere Date: Tue Apr 30 12:31:48 2002 +0000 * src/string-matching.c: (BoyerMoore_StringMatching): (BoyerMoore_CI_StringMatching): Fix a grave problem that could result in reading uninitialized memory. Made the code of theses function readable. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@1118 09c5ec92-17d4-0310-903a-819935f44dba ChangeLog | 10 ++++++++++ src/string-matching.c | 25 +++++++++++++------------ 2 files changed, 23 insertions(+), 12 deletions(-) commit f932c8b452443f220364459d61b4cc95db2f3268 Author: Yoann Vandoorselaere Date: Sun Apr 28 16:13:08 2002 +0000 * configure.in: autoconf 2.52 still have the AC_C_BIGENDIAN bug - require 2.53. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@1106 09c5ec92-17d4-0310-903a-819935f44dba ChangeLog | 5 +++++ configure.in | 2 +- 2 files changed, 6 insertions(+), 1 deletions(-) commit f4a6600e7aa8cff88fdefbe89cd21831cd8a781c Author: Yoann Vandoorselaere Date: Sat Apr 27 20:37:28 2002 +0000 * configure.in: use AM_PROG_LIBTOOL, for older libtool/automake installation. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@1102 09c5ec92-17d4-0310-903a-819935f44dba ChangeLog | 3 +++ configure.in | 2 +- 2 files changed, 4 insertions(+), 1 deletions(-) commit bb2242b296d6ec2ce46e3c8f1273607085adb69c Author: Yoann Vandoorselaere Date: Sat Apr 27 16:08:40 2002 +0000 (plugin_load_single): return -1 if the plugin is already loaded so that we don't count the plugin twice. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@1091 09c5ec92-17d4-0310-903a-819935f44dba ChangeLog | 2 ++ src/plugin-common.c | 2 +- 2 files changed, 3 insertions(+), 1 deletions(-) commit 65b461cd1970e2cc9da15918f5b073fc1b1aefb6 Author: Yoann Vandoorselaere Date: Sat Apr 27 00:36:28 2002 +0000 * src/plugin-common.c: remove dlfcn.h - not needed anymore with libltdl. (plugin_load_from_dir): remove the filename extension, so that libltdl decide of the best extension to use on this architecture. (plugin_load_single): use libltdl function. As there is often several file associated with a libtool plugin (from which the plugin can be loaded), and because libtool load the one that suit it best (for sake of compatibility), we have to check if we do not already have an handle for this plugin. (is_plugin_already_loaded): search a plugin by handle. * src/Makefile.am (INCLUDES): add libltdl include PATH. * configure.in: setup libltdl. * autogen.sh: libtoolize --ltdl * Makefile.am (SUBDIRS): libltdl. Theses change fix possible portability problem with dynamically loadable plugin API (OpenBSD plugin loading didn't work before this). git-svn-id: file:///home/yoann/SVN/trunk/libprelude@1086 09c5ec92-17d4-0310-903a-819935f44dba ChangeLog | 26 ++++++++++ Makefile.am | 2 +- autogen.sh | 2 +- configure.in | 18 ++++--- docs/api/libprelude-decl.txt | 72 +++++++++++++++++++++++----- docs/api/tmpl/libprelude-unused.sgml | 22 ++++++++ src/Makefile.am | 3 +- src/plugin-common.c | 89 +++++++++++++++++++++++----------- 8 files changed, 183 insertions(+), 51 deletions(-) commit 2ea57e6e49f7af5708224f421d68856cec7e0a3b Author: Yoann Vandoorselaere Date: Fri Apr 26 09:51:00 2002 +0000 *** empty log message *** git-svn-id: file:///home/yoann/SVN/trunk/libprelude@1080 09c5ec92-17d4-0310-903a-819935f44dba ChangeLog | 4 ++++ configure.in | 2 +- 2 files changed, 5 insertions(+), 1 deletions(-) commit 13e434437729a5ab0af881921e7e1701d66ccd86 Author: Yoann Vandoorselaere Date: Fri Apr 26 09:36:32 2002 +0000 *** empty log message *** git-svn-id: file:///home/yoann/SVN/trunk/libprelude@1079 09c5ec92-17d4-0310-903a-819935f44dba Makefile.am | 1 - 1 files changed, 0 insertions(+), 1 deletions(-) commit f4506aeceb268bad1c1a620ed99406cf32124ab7 Author: Yoann Vandoorselaere Date: Thu Apr 25 15:45:04 2002 +0000 *** empty log message *** git-svn-id: file:///home/yoann/SVN/trunk/libprelude@1077 09c5ec92-17d4-0310-903a-819935f44dba src/include/extract.h | 24 ++++++++++++++++++------ 1 files changed, 18 insertions(+), 6 deletions(-) commit 97dd2eb0f38d93ff5e421490728c64cfb4c55553 Author: Yoann Vandoorselaere Date: Thu Apr 25 00:33:49 2002 +0000 * src/prelude-message.c (set_data): s/unsigned char/uint8_t/ git-svn-id: file:///home/yoann/SVN/trunk/libprelude@1072 09c5ec92-17d4-0310-903a-819935f44dba ChangeLog | 5 +++++ src/prelude-message.c | 2 +- 2 files changed, 6 insertions(+), 1 deletions(-) commit e4c060b6ffd8e55f44ed7faa48da2a9d47348758 Author: Yoann Vandoorselaere Date: Wed Apr 24 21:57:00 2002 +0000 *** empty log message *** git-svn-id: file:///home/yoann/SVN/trunk/libprelude@1069 09c5ec92-17d4-0310-903a-819935f44dba ChangeLog | 7 +++++++ src/include/list.h | 2 +- src/include/prelude-path.h | 2 +- src/prelude-message.c | 6 +++--- src/prelude-path.c | 2 +- 5 files changed, 13 insertions(+), 6 deletions(-) commit b3f3490e9b495304f22b99fb42d1a81a8683f626 Author: Yoann Vandoorselaere Date: Wed Apr 24 00:45:30 2002 +0000 * src/include/extract.h: (byte): create a second byte macro conditionaly compiled depending on the byte order. (extract_uint64): do not try to translate from network byte order to host byte order if WORDS_BIGENDIAN is defined. (align_uint32): (align_uint64): (align_uint16): shift each byte. * src/idmef-msg-send.c (idmef_send_uint64): only translate analyzer ident to network byte order if we are on a little endian system. s/ntohl/htonl/. * src/client-ident.c (declare_ident_to_manager): only translate analyzer ident to network byte order if we are on a little endian system. * configure.in: prereq autoconf 2.53. use AC_C_BIGENDIAN macro to determine host byte order, libprelude-config --cflags also include this definition. * README: update. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@1064 09c5ec92-17d4-0310-903a-819935f44dba ChangeLog | 27 +++++++++++++++++++++++++++ README | 2 +- configure.in | 18 +++++++++++++----- src/client-ident.c | 4 +++- src/idmef-msg-send.c | 8 +++++--- 5 files changed, 49 insertions(+), 10 deletions(-) commit 705625ce58282b07d272896c03d19e549f12cb6c Author: Yoann Vandoorselaere Date: Tue Apr 16 11:27:19 2002 +0000 *** empty log message *** git-svn-id: file:///home/yoann/SVN/trunk/libprelude@1032 09c5ec92-17d4-0310-903a-819935f44dba src/include/extract.h | 5 +++-- 1 files changed, 3 insertions(+), 2 deletions(-) commit eb6c0a17fa03dee729ac225d07a5d1b7fcba762b Author: Yoann Vandoorselaere Date: Tue Apr 16 11:25:13 2002 +0000 * src/include/extract.h: stop using memmove for alignment care ! Checksum performance test resulted in ~ 600MB/s without alignment care, and ~ 20MB/s with it (memmove). The new version (which cast every byte of the buffer to a single 8 bits integer and OR them all) run at ~ 200MB/s, which is way better. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@1031 09c5ec92-17d4-0310-903a-819935f44dba ChangeLog | 10 ++++++++++ src/include/extract.h | 25 ++++++++----------------- 2 files changed, 18 insertions(+), 17 deletions(-) commit cb4062061cff635fb3b492b2e903e4271d601880 Author: Yoann Vandoorselaere Date: Mon Apr 15 14:10:03 2002 +0000 * src/include/list.h: included modified patch from Vincent Glaume adding function to walk the list in reverse order. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@1021 09c5ec92-17d4-0310-903a-819935f44dba ChangeLog | 6 ++++++ src/include/list.h | 8 ++++++++ 2 files changed, 14 insertions(+), 0 deletions(-) commit 954579702e2190ef7af3612b28a238863f531ab8 Author: Yoann Vandoorselaere Date: Sun Apr 14 08:34:01 2002 +0000 * src/prelude-getopt.c (process_option_cfg_hook): (get_max_char): slight cleanup. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@1018 09c5ec92-17d4-0310-903a-819935f44dba ChangeLog | 3 +++ src/prelude-getopt.c | 14 ++++++-------- 2 files changed, 9 insertions(+), 8 deletions(-) commit da26d765c5017310b1937728bbae3128e0644b0e Author: Yoann Vandoorselaere Date: Sun Apr 14 08:32:44 2002 +0000 * src/config-engine.c (config_get_section): don't check if the line is a comment here. (search_section): do it here. This fix a bug where we wouldn't find an option because a commented one would match. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@1017 09c5ec92-17d4-0310-903a-819935f44dba ChangeLog | 7 +++++++ src/config-engine.c | 11 ++++------- 2 files changed, 11 insertions(+), 7 deletions(-) commit 6ec016b08a0abb6e8b5633ce58cfa2f063d3eb65 Author: Yoann Vandoorselaere Date: Sun Apr 14 08:08:30 2002 +0000 * src/prelude-getopt.c (print_wrapped): don't print \0 at the end of the line. This fix bug #0000029 (control character at end of help lines). git-svn-id: file:///home/yoann/SVN/trunk/libprelude@1016 09c5ec92-17d4-0310-903a-819935f44dba ChangeLog | 6 ++++++ src/prelude-getopt.c | 7 ++++--- 2 files changed, 10 insertions(+), 3 deletions(-) commit b593b1daa56e64b6beade865d60deab0e158193c Author: Yoann Vandoorselaere Date: Sat Apr 13 12:35:20 2002 +0000 * src/prelude-io.c (handle_ssl_error): new function, handle SSL error nicely. (ssl_read): (ssl_write): correct SSL error handling. Should help with some SSL communication problem. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@1015 09c5ec92-17d4-0310-903a-819935f44dba ChangeLog | 9 ++++++++ src/prelude-io.c | 56 ++++++++++++++++++++++++++++++++++++++++++++--------- 2 files changed, 55 insertions(+), 10 deletions(-) commit 47aca46778dfa198db507a9646594a25db26f504 Author: Yoann Vandoorselaere Date: Thu Apr 11 12:44:15 2002 +0000 * Makefile.am (install-data-local): sensors-default.conf: should be world readable. So that non root sensor know where to reach the Prelude Manager. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@999 09c5ec92-17d4-0310-903a-819935f44dba ChangeLog | 4 ++++ Makefile.am | 4 ++-- 2 files changed, 6 insertions(+), 2 deletions(-) commit 4be55545ead7a9972111da06558f6decd30d7c3f Author: Yoann Vandoorselaere Date: Thu Apr 11 11:55:28 2002 +0000 *** empty log message *** git-svn-id: file:///home/yoann/SVN/trunk/libprelude@998 09c5ec92-17d4-0310-903a-819935f44dba ChangeLog | 10 ++++++++++ 1 files changed, 10 insertions(+), 0 deletions(-) commit 4bbb504eb1ca83ffa70b16fdb2c8ec0fa46adb9e Author: Yoann Vandoorselaere Date: Thu Apr 11 11:49:42 2002 +0000 * src/include/extract.h: (align_uint16): (align_uint32): (align_uint64): (align_ipv4_addr): network to host order translation is done in extract_xx function. Alignment is done in align_xx function. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@997 09c5ec92-17d4-0310-903a-819935f44dba src/include/extract.h | 73 +++++++++++++++++++++++++++++++++++-------------- 1 files changed, 52 insertions(+), 21 deletions(-) commit cf37ab23cbb805ae19edcd970662e0f8cdf29cb2 Author: Yoann Vandoorselaere Date: Tue Apr 9 15:51:32 2002 +0000 *** empty log message *** git-svn-id: file:///home/yoann/SVN/trunk/libprelude@984 09c5ec92-17d4-0310-903a-819935f44dba docs/api/libprelude-decl.txt | 5 +++++ 1 files changed, 5 insertions(+), 0 deletions(-) commit e9ea8979d428b6b99067155e0dafe4fa812f5b4c Author: Yoann Vandoorselaere Date: Tue Apr 9 15:46:10 2002 +0000 * configure.in: stop using profile-arcs for optimised build. GCC generate bugged code with it. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@983 09c5ec92-17d4-0310-903a-819935f44dba ChangeLog | 5 +++++ configure.in | 30 ++++-------------------------- 2 files changed, 9 insertions(+), 26 deletions(-) commit 351cbe5bd9fdcb72f337bd1b73df64c6cd6ab411 Author: Yoann Vandoorselaere Date: Mon Apr 8 11:53:43 2002 +0000 *** empty log message *** git-svn-id: file:///home/yoann/SVN/trunk/libprelude@974 09c5ec92-17d4-0310-903a-819935f44dba src/prelude-message.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) commit 42bfb93bbe7c06afdca854703c55044b9020096f Author: Yoann Vandoorselaere Date: Mon Apr 8 11:46:43 2002 +0000 * src/prelude-client-mgr.c (broadcast_saved_message): print how many bytes we flushed... * src/prelude-message.c (prelude_msg_forward): use memcpy() to copy dlen. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@973 09c5ec92-17d4-0310-903a-819935f44dba ChangeLog | 6 ++++++ src/prelude-client-mgr.c | 2 ++ src/prelude-message.c | 9 +++------ 3 files changed, 11 insertions(+), 6 deletions(-) commit ff934e656d7634580afe459b64108e00d85feb3f Author: Yoann Vandoorselaere Date: Mon Apr 8 08:13:03 2002 +0000 * src/plugin-common.c (plugin_search_by_name): new function, search a plugin by name. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@970 09c5ec92-17d4-0310-903a-819935f44dba ChangeLog | 3 +++ src/include/plugin-common-prv.h | 2 ++ src/plugin-common.c | 29 ++++++++++++++++++++++++++++- 3 files changed, 33 insertions(+), 1 deletions(-) commit dc9a7560870d4736b8f26a7f13eea8b12751b533 Author: Yoann Vandoorselaere Date: Mon Apr 8 07:32:07 2002 +0000 * Makefile.am (install-data-local): Only install default configuration file if it does not exit... If a configuration file is already present, warn the user and install in sensors-default.conf-dist. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@969 09c5ec92-17d4-0310-903a-819935f44dba ChangeLog | 7 +++++++ Makefile.am | 25 +++++++++++++++++-------- 2 files changed, 24 insertions(+), 8 deletions(-) commit 046b98ed7d6b0fcaa9f01c423c5a7cc1b7f83f44 Author: Yoann Vandoorselaere Date: Fri Apr 5 16:13:07 2002 +0000 *** empty log message *** git-svn-id: file:///home/yoann/SVN/trunk/libprelude@956 09c5ec92-17d4-0310-903a-819935f44dba docs/api/libprelude-decl.txt | 11 +++++++++-- 1 files changed, 9 insertions(+), 2 deletions(-) commit c85d80eef7183b4e89464ba80ac6b3f383087b49 Author: Yoann Vandoorselaere Date: Fri Apr 5 16:11:55 2002 +0000 * src/prelude-auth.c (parse_auth_line): stop using strtok here. strtok() was causing problem on empty password, because it wouldn't return an empty token. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@955 09c5ec92-17d4-0310-903a-819935f44dba ChangeLog | 4 ++++ src/prelude-auth.c | 37 ++++++++++++++++++++----------------- 2 files changed, 24 insertions(+), 17 deletions(-) commit 0398a8b5195942b3514b87c56531d7548075eaa6 Author: Yoann Vandoorselaere Date: Fri Apr 5 14:46:27 2002 +0000 * src/prelude-message.c (msg_mark_end): use memcpy instead of shifting dlen and copying it 8bits by 8bits. This fix problem on big endian machine. Thanks to Vincent Glaume who helped a lot on this issue. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@952 09c5ec92-17d4-0310-903a-819935f44dba ChangeLog | 10 ++++++++++ src/prelude-message.c | 6 ++---- 2 files changed, 12 insertions(+), 4 deletions(-) commit 4336d02c6fcc5287b6b5db509854738bfc8575b2 Author: Krzysztof Zaraska Date: Fri Apr 5 11:52:18 2002 +0000 added comment for idmef_alertident_t git-svn-id: file:///home/yoann/SVN/trunk/libprelude@948 09c5ec92-17d4-0310-903a-819935f44dba ChangeLog | 5 +++++ src/include/idmef-tree.h | 2 +- 2 files changed, 6 insertions(+), 1 deletions(-) commit 684581af3ee6e7d216e500d8ce0d9794c16ee83a Author: Yoann Vandoorselaere Date: Thu Apr 4 16:20:14 2002 +0000 * src/include/extract.h: include string.h for memmove. (extract_uint64): fix a problem with extract_uint64 on machine that need aligned access. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@946 09c5ec92-17d4-0310-903a-819935f44dba ChangeLog | 6 ++++++ src/include/extract.h | 9 +++++++-- 2 files changed, 13 insertions(+), 2 deletions(-) commit 4d4fe39b9e7d21990cea292784ad631f864ba307 Author: Yoann Vandoorselaere Date: Thu Apr 4 13:12:42 2002 +0000 *** empty log message *** git-svn-id: file:///home/yoann/SVN/trunk/libprelude@945 09c5ec92-17d4-0310-903a-819935f44dba sensor-adduser/sensor-adduser.c | 1 - src/prelude-client.c | 13 ++++++++++--- 2 files changed, 10 insertions(+), 4 deletions(-) commit 1510ffe942052ebadd22c6b42fa6b3969bb944f9 Author: Yoann Vandoorselaere Date: Thu Apr 4 13:07:08 2002 +0000 *** empty log message *** git-svn-id: file:///home/yoann/SVN/trunk/libprelude@944 09c5ec92-17d4-0310-903a-819935f44dba sensor-adduser/sensor-adduser.c | 13 +++++++------ 1 files changed, 7 insertions(+), 6 deletions(-) commit 4fd6273106a456b18f2e06034bc9dee39f78823a Author: Yoann Vandoorselaere Date: Thu Apr 4 13:00:46 2002 +0000 * sensor-adduser/sensor-adduser.c (get_manager_setup): don't give up until an error occur or we get prelude_msg_finished. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@942 09c5ec92-17d4-0310-903a-819935f44dba ChangeLog | 5 +++++ sensor-adduser/sensor-adduser.c | 15 +++++++++------ 2 files changed, 14 insertions(+), 6 deletions(-) commit 8a0934d6483dc854796a50ee91865936616b838e Author: Yoann Vandoorselaere Date: Fri Mar 29 09:36:31 2002 +0000 *** empty log message *** git-svn-id: file:///home/yoann/SVN/trunk/libprelude@921 09c5ec92-17d4-0310-903a-819935f44dba ChangeLog | 14 ++++++++++++++ src/prelude-getopt.c | 4 ++++ 2 files changed, 18 insertions(+), 0 deletions(-) commit 30418a0369f239e2ca140e7973d9f87f7fe6d75e Author: Yoann Vandoorselaere Date: Fri Mar 29 09:36:07 2002 +0000 * src/prelude-getopt.c (process_option_cfg_hook): handle case when there is several entry of the same name in the configuration file. Call the callback once for each entry then. * src/config-engine.c: (search_entry): (config_get): Modified so that when passed a NULL section and entry, it will try to search a different entry of the same name and within the same section as the previously searched one. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@920 09c5ec92-17d4-0310-903a-819935f44dba src/config-engine.c | 42 +++++++++++++++++++++++++++++++++++++----- src/prelude-getopt.c | 16 ++++++++++++---- 2 files changed, 49 insertions(+), 9 deletions(-) commit 3980d9b0a7abcdb4f7781ebba0b2587f363a5971 Author: Yoann Vandoorselaere Date: Thu Mar 28 18:25:59 2002 +0000 * src/include/idmef-tree-func.h (idmef_string_set): remove errornous period after while(0), new idmef_string_copy() macro. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@915 09c5ec92-17d4-0310-903a-819935f44dba ChangeLog | 6 ++++++ src/include/idmef-tree-func.h | 11 +++++++++-- 2 files changed, 15 insertions(+), 2 deletions(-) commit a02b5ba7f55132efc4c0b462c62531497b6677f8 Author: Krzysztof Zaraska Date: Thu Mar 28 10:56:11 2002 +0000 language corrections git-svn-id: file:///home/yoann/SVN/trunk/libprelude@908 09c5ec92-17d4-0310-903a-819935f44dba ChangeLog | 7 +++++++ INSTALL | 28 ++++++++++++++-------------- README | 26 ++++++++++++++------------ 3 files changed, 35 insertions(+), 26 deletions(-) commit 1b3184dbb9779956afe6662ca7576919e79ea3ca Author: Yoann Vandoorselaere Date: Wed Mar 27 11:10:32 2002 +0000 *** empty log message *** git-svn-id: file:///home/yoann/SVN/trunk/libprelude@905 09c5ec92-17d4-0310-903a-819935f44dba src/config-engine.c | 3 --- src/prelude-client-mgr.c | 2 -- 2 files changed, 0 insertions(+), 5 deletions(-) commit ed6c35ddc97f3cab343a6f9fb3e408fc7a798169 Author: Yoann Vandoorselaere Date: Tue Mar 26 00:18:43 2002 +0000 *** empty log message *** git-svn-id: file:///home/yoann/SVN/trunk/libprelude@881 09c5ec92-17d4-0310-903a-819935f44dba configure.in | 4 ++- docs/api/libprelude-decl.txt | 54 ++++++++------------------------- docs/api/tmpl/libprelude-unused.sgml | 48 ++++++++++++++++++++++++++++++ src/prelude-io.c | 4 +-- 4 files changed, 65 insertions(+), 45 deletions(-) commit eeec9b21943798a20afa632306914338fda96fd7 Author: Yoann Vandoorselaere Date: Mon Mar 25 17:42:00 2002 +0000 *** empty log message *** git-svn-id: file:///home/yoann/SVN/trunk/libprelude@873 09c5ec92-17d4-0310-903a-819935f44dba src/include/extract.h | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) commit 144559c154e272b39e17fcc72618cd5aab650d94 Author: Yoann Vandoorselaere Date: Mon Mar 25 17:36:56 2002 +0000 *** empty log message *** git-svn-id: file:///home/yoann/SVN/trunk/libprelude@872 09c5ec92-17d4-0310-903a-819935f44dba src/extract.c | 185 ------------------------------------------------- src/include/extract.h | 12 ++-- 2 files changed, 7 insertions(+), 190 deletions(-) commit 8418abfc847204d6295b8e90c48db2434976e84b Author: Yoann Vandoorselaere Date: Mon Mar 25 17:02:23 2002 +0000 * src/include/extract.h (extract_uint16): (extract_uint32): (extract_uint64): (extract_ipv4_addr): theses function are now inlined. (extract_uint8_safe): (extract_uint16_safe): (extract_uint32_safe): (extract_uint64_safe): (extract_string_safe): New function, check buffer size before doing anything. * src/prelude-message.c (slice_message_header): (prelude_msg_get): * src/client-ident.c (recv_ident): * src/extract.c: obsoleted, theses function are now inline. * configure.in: put NEED_ALIGNED_ACCESS in libprelude-config --cflags. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@869 09c5ec92-17d4-0310-903a-819935f44dba ChangeLog | 23 +++++++ configure.in | 2 +- docs/api/libprelude-decl.txt | 30 ++++++++- src/Makefile.am | 1 - src/client-ident.c | 6 +- src/include/extract.h | 147 ++++++++++++++++++++++++++++++++++++----- src/prelude-message.c | 10 +-- 7 files changed, 187 insertions(+), 32 deletions(-) commit 5bd9b12cc973d334f0c7e38d7d66e6a03b8c0d19 Author: Krzysztof Zaraska Date: Wed Mar 20 16:08:01 2002 +0000 indentation fixes git-svn-id: file:///home/yoann/SVN/trunk/libprelude@849 09c5ec92-17d4-0310-903a-819935f44dba src/include/idmef-tree-func.h | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) commit d80ffd2af64ea001fd03ab5f7aa070465967c399 Author: Krzysztof Zaraska Date: Wed Mar 20 15:28:49 2002 +0000 * src/include/idmef-tree-func.c: fixed incorrectly defined idmef_set_string, idmef_string_set_constant macros git-svn-id: file:///home/yoann/SVN/trunk/libprelude@847 09c5ec92-17d4-0310-903a-819935f44dba src/include/idmef-tree-func.h | 8 ++++++-- 1 files changed, 6 insertions(+), 2 deletions(-) commit c36f055a363862f39623d7d46dd525c438be4cb5 Author: Yoann Vandoorselaere Date: Tue Mar 19 11:58:29 2002 +0000 * src/prelude-io.c (ssl_close): avoid a leak when SSL_shutdown return 0. (ssl_close): don't close the fd two time. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@844 09c5ec92-17d4-0310-903a-819935f44dba ChangeLog | 6 ++++++ src/prelude-io.c | 13 +++---------- 2 files changed, 9 insertions(+), 10 deletions(-) commit aa8e0b93711ee9b3db9c073a14d07e40720893ae Author: Yoann Vandoorselaere Date: Tue Mar 19 11:27:48 2002 +0000 *** empty log message *** git-svn-id: file:///home/yoann/SVN/trunk/libprelude@843 09c5ec92-17d4-0310-903a-819935f44dba src/plugin-common.c | 1 - src/ssl-settings.c | 1 - 2 files changed, 0 insertions(+), 2 deletions(-) commit 49b72a26029af65f1d82673f374006bedf0e4008 Author: Yoann Vandoorselaere Date: Thu Mar 14 12:55:25 2002 +0000 * Makefile.am (install-data-hook): stop using sticky bit on directory, permission for directory are 755 now. (except for the idents directory - not changed yet). * src/ssl-registration-msg.c (prelude_ssl_save_cert): stop using the BIO API here, and use the standard IO function so that we can now stop using the umask() hack. The function now take an UID argument, and the saved certificate is owned by this userID. * src/ssl-gencrypto.c (prelude_ssl_gen_crypto): take an UID argument, use fchown() to set the created file UID. * src/prelude-client-mgr.c (file_error): new function, tell the user sensors required files are not installed. * src/prelude-auth.c (open_auth_file): fchown the created file to the specified UID. (prelude_auth_create_account): (prelude_auth_create_account_noprompt): take an UID argument. * sensor-adduser/ssl-register.c (send_own_certificate): prelude_ssl_gen_crypto take an UID argument. (recv_manager_certificate): prelude_ssl_save_cert take an UID argument. * sensor-adduser/sensor-adduser.c (setup_sensor_files): new function, create sensors related file, with the needed sensors permission. (main): ssl_add_certificate and create_plaintext_user_account take an UID argument. * sensor-adduser/plaintext.c (create_plaintext_user_account): take an uid argument, call prelude_auth_create_account with this argument. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@833 09c5ec92-17d4-0310-903a-819935f44dba ChangeLog | 45 ++++++++++++++++++++++++++ Makefile.am | 6 ++-- docs/api/libprelude-decl.txt | 48 ++++++++++++++++++++------- docs/api/tmpl/libprelude-unused.sgml | 10 ++++++ docs/api/tmpl/prelude-auth.sgml | 1 + docs/api/tmpl/ssl-gencrypto.sgml | 1 + docs/api/tmpl/ssl-registration-msg.sgml | 12 +------ sensor-adduser/plaintext.c | 4 +- sensor-adduser/plaintext.h | 2 +- sensor-adduser/sensor-adduser.c | 50 ++++++++++++++++++++++------ sensor-adduser/ssl-register.c | 21 +++++++----- sensor-adduser/ssl-register.h | 2 +- src/client-ident.c | 1 + src/include/prelude-auth.h | 6 ++- src/include/ssl-gencrypto.h | 2 +- src/include/ssl-registration-msg.h | 3 +- src/prelude-auth.c | 25 ++++++++++----- src/prelude-client-mgr.c | 36 ++++++++++++++++++-- src/ssl-gencrypto.c | 9 +++++- src/ssl-registration-msg.c | 53 ++++++++++++++++++------------- 20 files changed, 246 insertions(+), 91 deletions(-) commit 80a603b9d7fe2ab6cd16c6f33e45e8277d69982d Author: Yoann Vandoorselaere Date: Tue Mar 12 14:58:33 2002 +0000 * src/daemonize.c (get_absolute_filename): new function, get absolute filename if provided filename is relative (fix a bug on exit where the lockfile wouldn't be deleted because we chdir to /). (lockfile_write_pid): use provided pid argument, don't call getpid(). git-svn-id: file:///home/yoann/SVN/trunk/libprelude@832 09c5ec92-17d4-0310-903a-819935f44dba ChangeLog | 7 ++++++ src/daemonize.c | 58 ++++++++++++++++++++++++++++++++++++++++++------------ 2 files changed, 52 insertions(+), 13 deletions(-) commit cc46b423339318770a510fad10fd6d0752ae68d5 Author: Yoann Vandoorselaere Date: Tue Mar 12 13:49:43 2002 +0000 (prelude_option_add): parent option have option_run_last priority. (call_option_cb): fix and simplify. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@829 09c5ec92-17d4-0310-903a-819935f44dba ChangeLog | 16 ++++++++++++++++ src/prelude-getopt.c | 21 +++++++++++++-------- 2 files changed, 29 insertions(+), 8 deletions(-) commit b5b05bbac590a9bed4af0fdc32dcd6d56cf65b5c Author: Yoann Vandoorselaere Date: Tue Mar 12 00:29:08 2002 +0000 * src/prelude-getopt.c (call_option_cb): simplify, handle option_run_first and option_run_last definition. (parse_argument): reset saved_index to 0. This could trigger a bug while parsing option. (prelude_option_add): set default priority to option_run_no_order. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@827 09c5ec92-17d4-0310-903a-819935f44dba src/include/prelude-getopt.h | 9 +++++++++ src/prelude-getopt.c | 38 ++++++++++++++++++++------------------ 2 files changed, 29 insertions(+), 18 deletions(-) commit 85db944e280aafe10e696d6105507f6ae0e45e78 Author: Yoann Vandoorselaere Date: Mon Mar 11 22:08:55 2002 +0000 * src/prelude-getopt.c (get_missing_options): add missing call to call_option_from_cb_list(). git-svn-id: file:///home/yoann/SVN/trunk/libprelude@825 09c5ec92-17d4-0310-903a-819935f44dba ChangeLog | 3 +++ src/prelude-getopt.c | 10 +++++++++- 2 files changed, 12 insertions(+), 1 deletions(-) commit 5e55126d338c10c8ce1f9c7c14c0fa02672690de Author: Yoann Vandoorselaere Date: Mon Mar 11 18:02:52 2002 +0000 *** empty log message *** git-svn-id: file:///home/yoann/SVN/trunk/libprelude@822 09c5ec92-17d4-0310-903a-819935f44dba src/include/prelude-path.h | 2 ++ src/prelude-client.c | 2 +- src/prelude-path.c | 7 +++++++ 3 files changed, 10 insertions(+), 1 deletions(-) commit cfa196d031f5f8b04ce30d291545d812985f1a3a Author: Yoann Vandoorselaere Date: Mon Mar 11 17:58:19 2002 +0000 * src/extract.c (extract_ipv4_addr): only align when needed. * src/prelude-getopt.c (call_option_cb): new function, call option in priority order if needed. (parse_argument): if we meet an unknown option and we are at depth 0, continue parsing, so that it won't abort the whole process. * src/sensor.c (prelude_sensor_init): don't call prelude_async_init ourself, this is the sensor responssability. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@821 09c5ec92-17d4-0310-903a-819935f44dba ChangeLog | 16 ++++ src/extract.c | 6 +- src/include/prelude-getopt.h | 1 + src/prelude-getopt.c | 157 +++++++++++++++++++++++++++++++++++------ src/sensor.c | 10 +-- 5 files changed, 157 insertions(+), 33 deletions(-) commit 23316df63b37300cd205e27d7dbbfe43bc71d091 Author: Krzysztof Zaraska Date: Thu Mar 7 22:41:31 2002 +0000 fix warnings on compilation git-svn-id: file:///home/yoann/SVN/trunk/libprelude@810 09c5ec92-17d4-0310-903a-819935f44dba ChangeLog | 9 +++++++++ src/client-ident.c | 1 + src/extract.c | 1 + src/idmef-msg-send.c | 1 + src/prelude-io.c | 1 + src/prelude-message.c | 1 + 6 files changed, 14 insertions(+), 0 deletions(-) commit 2c040806742acf609ba41ffef11fc89b9dc4fcae Author: Krzysztof Zaraska Date: Sat Mar 2 13:45:15 2002 +0000 fixed typo from previous commit git-svn-id: file:///home/yoann/SVN/trunk/libprelude@750 09c5ec92-17d4-0310-903a-819935f44dba ChangeLog | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) commit b3546ea720c2d809cb7ed96caf80fdc4d93155d6 Author: Krzysztof Zaraska Date: Sat Mar 2 13:43:23 2002 +0000 * configure.in: fixed pthreads-related gcc flags on FreeBSD/OpenBSD git-svn-id: file:///home/yoann/SVN/trunk/libprelude@749 09c5ec92-17d4-0310-903a-819935f44dba ChangeLog | 3 +++ configure.in | 39 +++++++++++++++++++++++++++++++++++---- 2 files changed, 38 insertions(+), 4 deletions(-) commit 2da173ac59f317f4e46b45a8d329eb6724cf700b Author: Yoann Vandoorselaere Date: Fri Mar 1 18:00:03 2002 +0000 *** empty log message *** git-svn-id: file:///home/yoann/SVN/trunk/libprelude@747 09c5ec92-17d4-0310-903a-819935f44dba configure.in | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) commit be468b767694d6ff8d06eef557c3150c49757fb3 Author: Yoann Vandoorselaere Date: Thu Feb 28 16:07:00 2002 +0000 * src/prelude-client.c (inet_connect): re-enable the Nagle algorithm for now. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@742 09c5ec92-17d4-0310-903a-819935f44dba ChangeLog | 3 +++ src/prelude-client.c | 7 ++++--- 2 files changed, 7 insertions(+), 3 deletions(-) commit 45ec0bc510499fff8e8de6795e0fef62f00bf0e9 Author: Yoann Vandoorselaere Date: Thu Feb 28 13:26:31 2002 +0000 * src/idmef-tree-func.c (idmef_alert_new): set analyzerid field. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@741 09c5ec92-17d4-0310-903a-819935f44dba ChangeLog | 5 +++++ src/idmef-tree-func.c | 7 +++++-- 2 files changed, 10 insertions(+), 2 deletions(-) commit 2fb68af21b7aed61dd115d5b9d04ea8fa76486e9 Author: Yoann Vandoorselaere Date: Wed Feb 27 16:53:12 2002 +0000 *** empty log message *** git-svn-id: file:///home/yoann/SVN/trunk/libprelude@735 09c5ec92-17d4-0310-903a-819935f44dba configure.in | 13 ------------- 1 files changed, 0 insertions(+), 13 deletions(-) commit db6ba776c74c6fcc8a5ede040cbf05047fbea099 Author: Yoann Vandoorselaere Date: Wed Feb 27 16:44:46 2002 +0000 * configure.in: check for pthread in several directory, including /usr/pkg. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@733 09c5ec92-17d4-0310-903a-819935f44dba ChangeLog | 3 +++ configure.in | 30 +++++++++++++++++++++++++----- 2 files changed, 28 insertions(+), 5 deletions(-) commit 9bee00b92e41e6e0677615ad3ddc768b3b8ff079 Author: Yoann Vandoorselaere Date: Wed Feb 27 14:58:31 2002 +0000 * src/prelude-client.c: include string.h git-svn-id: file:///home/yoann/SVN/trunk/libprelude@729 09c5ec92-17d4-0310-903a-819935f44dba ChangeLog | 4 ++++ src/prelude-client.c | 1 + 2 files changed, 5 insertions(+), 0 deletions(-) commit 9172ba77969bd7adf42224b93800cd6c0fd756b7 Author: Krzysztof Zaraska Date: Thu Feb 21 22:49:05 2002 +0000 minor FreeBSD compat. fix git-svn-id: file:///home/yoann/SVN/trunk/libprelude@704 09c5ec92-17d4-0310-903a-819935f44dba ChangeLog | 3 +++ src/config-engine.c | 2 ++ 2 files changed, 5 insertions(+), 0 deletions(-) commit b1cb3773574c21562378415a0f56035167f6772d Author: Yoann Vandoorselaere Date: Thu Feb 21 20:33:30 2002 +0000 *** empty log message *** git-svn-id: file:///home/yoann/SVN/trunk/libprelude@701 09c5ec92-17d4-0310-903a-819935f44dba src/extract.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) commit eeb64ba978d8b384cc4d3a96e386f952f3de7450 Author: Yoann Vandoorselaere Date: Thu Feb 21 20:28:09 2002 +0000 *** empty log message *** git-svn-id: file:///home/yoann/SVN/trunk/libprelude@700 09c5ec92-17d4-0310-903a-819935f44dba src/extract.c | 2 +- src/include/extract.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit 9f7fed096d00ac469051cfaecc59598c4c5a7f49 Author: Yoann Vandoorselaere Date: Thu Feb 21 18:29:23 2002 +0000 *** empty log message *** git-svn-id: file:///home/yoann/SVN/trunk/libprelude@699 09c5ec92-17d4-0310-903a-819935f44dba src/extract.c | 14 ++++++++++++++ src/include/extract.h | 2 ++ 2 files changed, 16 insertions(+), 0 deletions(-) commit def29264e71403d3a24a5f6ad19c9fc4ee611dab Author: Yoann Vandoorselaere Date: Thu Feb 21 17:29:31 2002 +0000 *** empty log message *** git-svn-id: file:///home/yoann/SVN/trunk/libprelude@698 09c5ec92-17d4-0310-903a-819935f44dba src/extract.c | 20 ++++++++++---------- src/include/extract.h | 9 +++++---- 2 files changed, 15 insertions(+), 14 deletions(-) commit 62f0120c8b17be78f505a0d637c65f22a214b163 Author: Yoann Vandoorselaere Date: Thu Feb 21 15:50:59 2002 +0000 *** empty log message *** git-svn-id: file:///home/yoann/SVN/trunk/libprelude@696 09c5ec92-17d4-0310-903a-819935f44dba ChangeLog | 5 ++++ acconfig.h | 1 + configure.in | 65 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++ src/extract.c | 49 +++++++++++++++++++++++++++--------------- 4 files changed, 102 insertions(+), 18 deletions(-) commit c1c00a12a5ac3d29e470e4fe640258e1f246222c Author: Yoann Vandoorselaere Date: Wed Feb 20 16:19:48 2002 +0000 *** empty log message *** git-svn-id: file:///home/yoann/SVN/trunk/libprelude@693 09c5ec92-17d4-0310-903a-819935f44dba sensor-adduser/plaintext.c | 1 + src/common.c | 2 ++ src/prelude-message.c | 1 + 3 files changed, 4 insertions(+), 0 deletions(-) commit a2b220d25e251ff63548df143c2f0d70dfd27b53 Author: Yoann Vandoorselaere Date: Wed Feb 20 13:00:32 2002 +0000 *** empty log message *** git-svn-id: file:///home/yoann/SVN/trunk/libprelude@691 09c5ec92-17d4-0310-903a-819935f44dba ChangeLog | 23 +++++++++++++++++++++++ docs/api/libprelude-decl.txt | 5 +++++ src/common.c | 31 +++++++++++++++++++++++++++++++ src/config-engine.c | 7 ++++--- src/idmef-tree-func.c | 10 ++++++++++ src/include/common.h | 4 ++++ src/prelude-auth.c | 7 ++++--- src/prelude-message.c | 3 ++- 8 files changed, 83 insertions(+), 7 deletions(-) commit fbd3d12e735d730b475059d2f482688b5900141b Author: Yoann Vandoorselaere Date: Fri Feb 8 17:05:49 2002 +0000 * src/prelude-getopt.c (parse_argument): handle parent option that have an argument... This function really need to be cleaned up. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@663 09c5ec92-17d4-0310-903a-819935f44dba ChangeLog | 6 ++++++ configure.in | 7 ++----- src/prelude-getopt.c | 41 ++++++++++++++++++++++++++++++++++------- 3 files changed, 42 insertions(+), 12 deletions(-) commit 27553d6b2927098c15f7a24fac285244205bab09 Author: Yoann Vandoorselaere Date: Thu Feb 7 22:52:48 2002 +0000 *** empty log message *** git-svn-id: file:///home/yoann/SVN/trunk/libprelude@659 09c5ec92-17d4-0310-903a-819935f44dba ChangeLog | 4 ++++ src/plugin-common.c | 9 ++++----- 2 files changed, 8 insertions(+), 5 deletions(-) commit e253c54231c3edb2942f46b3f50429406c7c6119 Author: Yoann Vandoorselaere Date: Thu Feb 7 18:40:07 2002 +0000 *** empty log message *** git-svn-id: file:///home/yoann/SVN/trunk/libprelude@657 09c5ec92-17d4-0310-903a-819935f44dba src/prelude-client.c | 8 +++++--- 1 files changed, 5 insertions(+), 3 deletions(-) commit af852b8bd6e6083870e72c2f0c4cb9cb0df91f60 Author: Yoann Vandoorselaere Date: Thu Feb 7 18:26:06 2002 +0000 * src/prelude-getopt.c (print_options): remove an errornous putchar(). (print_options): description offset should include depth. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@655 09c5ec92-17d4-0310-903a-819935f44dba ChangeLog | 4 ++++ src/prelude-getopt.c | 9 +++------ 2 files changed, 7 insertions(+), 6 deletions(-) commit adf3183e4ce2675054c0bf243dcb913dd80a33ea Author: Yoann Vandoorselaere Date: Thu Feb 7 18:02:36 2002 +0000 * sensor-adduser/Makefile.am (sensor_adduser_LDADD): correct libprelude.so linkage. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@654 09c5ec92-17d4-0310-903a-819935f44dba ChangeLog | 3 +++ docs/api/libprelude-decl.txt | 15 ++++++++++++++- docs/api/tmpl/prelude-auth.sgml | 1 + sensor-adduser/Makefile.am | 2 +- 4 files changed, 19 insertions(+), 2 deletions(-) commit c453f2f2ea664341e0f5cbdc47974f6c033dd151 Author: Yoann Vandoorselaere Date: Thu Feb 7 16:43:45 2002 +0000 * src/prelude-client.c (read_plaintext_authentication_result): call auth_error() in case of failure authenticating. So that the user know what to do. (auth_error): call exit() here. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@651 09c5ec92-17d4-0310-903a-819935f44dba ChangeLog | 5 +++++ src/prelude-client.c | 14 +++++++------- 2 files changed, 12 insertions(+), 7 deletions(-) commit 80b100fc7e7b36d971cc326fc8c335079f3eb72f Author: Yoann Vandoorselaere Date: Thu Feb 7 15:44:37 2002 +0000 *** empty log message *** git-svn-id: file:///home/yoann/SVN/trunk/libprelude@649 09c5ec92-17d4-0310-903a-819935f44dba ChangeLog | 36 +++++++++ INSTALL | 65 +++++++++-------- sensor-adduser/Makefile.am | 2 +- sensor-adduser/plaintext.c | 6 +- sensor-adduser/sensor-adduser.c | 3 +- src/include/prelude-auth.h | 12 +++- src/include/prelude-path.h | 2 + src/prelude-auth.c | 156 ++++++++++++++++++++++++++++++-------- src/prelude-client.c | 2 +- src/prelude-getopt.c | 6 +- src/prelude-path.c | 18 ++++- 11 files changed, 231 insertions(+), 77 deletions(-) commit 31486c7c6d922d8a4de75dbd3d31a82285536428 Author: Yoann Vandoorselaere Date: Wed Feb 6 16:28:13 2002 +0000 *** empty log message *** git-svn-id: file:///home/yoann/SVN/trunk/libprelude@643 09c5ec92-17d4-0310-903a-819935f44dba src/ssl-gencrypto.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) commit 8ce79a9b3d7776a4378e89210be83ff1c0ca5d81 Author: Yoann Vandoorselaere Date: Wed Feb 6 16:22:16 2002 +0000 *** empty log message *** git-svn-id: file:///home/yoann/SVN/trunk/libprelude@642 09c5ec92-17d4-0310-903a-819935f44dba sensor-adduser/ssl-register.c | 5 ----- src/ssl-gencrypto.c | 13 ++++++++++--- 2 files changed, 10 insertions(+), 8 deletions(-) commit f8ae6d6219eff745deab4335e6628458c10daf5f Author: Yoann Vandoorselaere Date: Wed Feb 6 14:40:56 2002 +0000 *** empty log message *** git-svn-id: file:///home/yoann/SVN/trunk/libprelude@640 09c5ec92-17d4-0310-903a-819935f44dba ChangeLog | 30 +++ docs/api/libprelude-decl.txt | 36 +++- docs/api/tmpl/libprelude-unused.sgml | 12 ++ docs/api/tmpl/prelude-auth.sgml | 2 + docs/api/tmpl/ssl-gencrypto.sgml | 14 -- sensor-adduser/sensor-adduser.c | 26 ++- sensor-adduser/ssl-register.c | 15 +- sensors-default.conf | 6 +- src/include/ssl-gencrypto.h | 5 +- src/prelude-client.c | 121 +++++++++--- src/ssl-gencrypto.c | 364 ++++++++++++++++------------------ src/ssl.c | 12 +- 12 files changed, 368 insertions(+), 275 deletions(-) commit 74924eed9715245272868846a0cce1fa7b4696b0 Author: Yoann Vandoorselaere Date: Tue Feb 5 17:13:22 2002 +0000 *** empty log message *** git-svn-id: file:///home/yoann/SVN/trunk/libprelude@639 09c5ec92-17d4-0310-903a-819935f44dba sensor-adduser/sensor-adduser.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) commit 07f68cdc8096ecc65f831d3a7bf6fbdd3312deb2 Author: Yoann Vandoorselaere Date: Tue Feb 5 16:59:53 2002 +0000 * src/idmef-msg-send.c (idmef_send_web_service): (idmef_send_web_service_arg): handle web argument list. * src/idmef-tree-func.c (idmef_service_webservice_new): initialize argument list. (idmef_service_webservice_arg_new): new function return a webservice_arg. * src/prelude-message.c (prelude_msg_write): don't send empty message. * sensor-adduser/sensor-adduser.c (set_manager_addr): fix a bug when parsing provided Manager address. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@636 09c5ec92-17d4-0310-903a-819935f44dba ChangeLog | 9 +++++++++ src/idmef-msg-send.c | 21 +++++++++++++++++---- src/idmef-tree-func.c | 21 +++++++++++++++++++++ src/include/idmef-msg-send.h | 6 ++++-- src/include/idmef-tree-func.h | 1 + src/include/idmef-tree.h | 8 +++++++- 6 files changed, 59 insertions(+), 7 deletions(-) commit c3596f1222ad301889b9282e9f262ecfb33c765f Author: Yoann Vandoorselaere Date: Tue Feb 5 14:19:49 2002 +0000 * src/prelude-message.c (prelude_msg_write): don't send empty message. * sensor-adduser/sensor-adduser.c (set_manager_addr): fix a bug when parsing provided Manager address. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@634 09c5ec92-17d4-0310-903a-819935f44dba ChangeLog | 8 ++++++++ sensor-adduser/sensor-adduser.c | 2 +- src/prelude-message.c | 6 ++++++ 3 files changed, 15 insertions(+), 1 deletions(-) commit 50bb004c955097a4605f3f4aec1561e3298cb82e Author: Yoann Vandoorselaere Date: Mon Feb 4 17:14:27 2002 +0000 *** empty log message *** git-svn-id: file:///home/yoann/SVN/trunk/libprelude@633 09c5ec92-17d4-0310-903a-819935f44dba sensor-adduser/Makefile.am | 1 + 1 files changed, 1 insertions(+), 0 deletions(-) commit 88075b8c69d2dbf52a9621607cc0f6aef0a04309 Author: Yoann Vandoorselaere Date: Mon Feb 4 17:09:11 2002 +0000 *** empty log message *** git-svn-id: file:///home/yoann/SVN/trunk/libprelude@632 09c5ec92-17d4-0310-903a-819935f44dba ChangeLog | 25 +++ Makefile.am | 2 +- configure.in | 8 +- docs/api/libprelude-decl.txt | 60 ++++-- docs/api/tmpl/libprelude-unused.sgml | 17 ++ docs/api/tmpl/ssl-register.sgml | 8 - docs/api/tmpl/ssl-registration-msg.sgml | 11 - sensor-adduser/Makefile.am | 14 ++ sensor-adduser/plaintext.c | 104 ++++++++++ sensor-adduser/plaintext.h | 1 + sensor-adduser/sensor-adduser.c | 344 +++++++++++++++++++++++++++++++ sensor-adduser/ssl-register.c | 256 +++++++++++++++++++++++ sensor-adduser/ssl-register.h | 1 + sensors-default.conf | 10 +- src/Makefile.am | 2 +- src/include/Makefile.am | 2 +- src/include/prelude-auth.h | 6 +- src/include/prelude-message-id.h | 3 +- src/include/prelude-path.h | 3 + src/include/ssl-register.h | 27 --- src/include/ssl-registration-msg.h | 6 +- src/include/ssl-settings.h | 25 +++ src/prelude-auth.c | 61 +++++-- src/prelude-client.c | 21 +- src/prelude-path.c | 9 +- src/sensor.c | 39 ---- src/ssl-register.c | 339 ------------------------------ src/ssl-registration-msg.c | 36 +--- src/ssl-settings.c | 150 ++++++++++++++ 29 files changed, 1066 insertions(+), 524 deletions(-) commit 1754287dd62a4569f8e2d09c53551380dece37e0 Author: Yoann Vandoorselaere Date: Sat Feb 2 02:54:39 2002 +0000 * src/prelude-message.c: made API more consistant, and code simpler. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@631 09c5ec92-17d4-0310-903a-819935f44dba ChangeLog | 5 ++ src/idmef-msg-send.c | 7 ++- src/include/prelude-message.h | 4 +- src/prelude-message-buffered.c | 17 ++--- src/prelude-message.c | 123 ++++++++++++++++++++++----------------- 5 files changed, 89 insertions(+), 67 deletions(-) commit 1cc246c1ed46ebccb0e1d015cce8a28764489d8e Author: Yoann Vandoorselaere Date: Fri Feb 1 15:30:20 2002 +0000 *** empty log message *** git-svn-id: file:///home/yoann/SVN/trunk/libprelude@630 09c5ec92-17d4-0310-903a-819935f44dba src/prelude-message.c | 2 -- 1 files changed, 0 insertions(+), 2 deletions(-) commit 75b2d53d465d3b9138989357d591b587966484ab Author: Yoann Vandoorselaere Date: Fri Feb 1 15:17:19 2002 +0000 *** empty log message *** git-svn-id: file:///home/yoann/SVN/trunk/libprelude@629 09c5ec92-17d4-0310-903a-819935f44dba ChangeLog | 29 +++ docs/api/libprelude-decl.txt | 121 ++++++---- src/Makefile.am | 1 + src/client-ident.c | 9 +- src/common.c | 75 ++++++ src/idmef-msg-send.c | 216 ++++++++--------- src/idmef-tree-func.c | 24 +- src/include/Makefile.am | 1 + src/include/common.h | 3 + src/include/idmef-message-id.h | 2 +- src/include/idmef-msg-send.h | 82 ++++---- src/include/prelude-message-buffered.h | 11 + src/include/prelude-message.h | 9 + src/prelude-client-mgr.c | 61 +----- src/prelude-client.c | 2 +- src/prelude-message-buffered.c | 179 ++++++++++++++ src/prelude-message.c | 406 +++++++++++++++++++++++++------- 17 files changed, 863 insertions(+), 368 deletions(-) commit 648547fc5f9d6f5f57dd9362007261969fb39e86 Author: Yoann Vandoorselaere Date: Sun Jan 27 12:50:08 2002 +0000 *** empty log message *** git-svn-id: file:///home/yoann/SVN/trunk/libprelude@621 09c5ec92-17d4-0310-903a-819935f44dba src/include/client-ident.h | 2 -- src/include/prelude-client.h | 5 +++++ src/prelude-client.c | 2 +- 3 files changed, 6 insertions(+), 3 deletions(-) commit 8c829afdf7ee00e0589df94bb2e46120e75bd8ac Author: Yoann Vandoorselaere Date: Sat Jan 26 03:45:42 2002 +0000 *** empty log message *** git-svn-id: file:///home/yoann/SVN/trunk/libprelude@620 09c5ec92-17d4-0310-903a-819935f44dba docs/api/libprelude-decl.txt | 9 +++++++-- 1 files changed, 7 insertions(+), 2 deletions(-) commit 687777e03aa2c940d7adb79a9e4de4a7328d3150 Author: Yoann Vandoorselaere Date: Sat Jan 26 03:38:14 2002 +0000 *** empty log message *** git-svn-id: file:///home/yoann/SVN/trunk/libprelude@619 09c5ec92-17d4-0310-903a-819935f44dba src/client-ident.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) commit 34f85f496912183c4743de511b2db1a83b3dfb7a Author: Yoann Vandoorselaere Date: Sat Jan 26 03:35:25 2002 +0000 *** empty log message *** git-svn-id: file:///home/yoann/SVN/trunk/libprelude@618 09c5ec92-17d4-0310-903a-819935f44dba ChangeLog | 5 +++++ docs/api/libprelude-decl.txt | 7 +------ docs/api/tmpl/prelude-message.sgml | 1 + src/client-ident.c | 4 ++++ src/include/client-ident.h | 4 +++- src/include/idmef-message-id.h | 7 +++++-- src/include/list.h | 2 +- 7 files changed, 20 insertions(+), 10 deletions(-) commit 386e21ab37982078044e9f3e3d8c3cb8812662a1 Author: Yoann Vandoorselaere Date: Fri Jan 25 18:40:22 2002 +0000 *** empty log message *** git-svn-id: file:///home/yoann/SVN/trunk/libprelude@614 09c5ec92-17d4-0310-903a-819935f44dba ChangeLog | 16 ++ docs/api/libprelude-decl.txt | 431 ++++++++++++++++++++++++--------- docs/api/tmpl/idmef-tree.sgml | 25 +-- docs/api/tmpl/libprelude-unused.sgml | 18 ++- docs/api/tmpl/prelude-message.sgml | 1 + src/idmef-msg-send.c | 456 +++++++++++++++++++--------------- src/idmef-tree-func.c | 3 +- src/include/idmef-msg-send.h | 43 ++++ src/include/idmef-tree-func.h | 8 + src/include/idmef-tree.h | 211 ++++++++--------- src/include/prelude-async.h | 3 +- 11 files changed, 761 insertions(+), 454 deletions(-) commit d5ed7a2f8b457d36a74baba1e29239ebe4b1471b Author: Yoann Vandoorselaere Date: Wed Jan 23 11:38:19 2002 +0000 *** empty log message *** git-svn-id: file:///home/yoann/SVN/trunk/libprelude@610 09c5ec92-17d4-0310-903a-819935f44dba ChangeLog | 6 ++ docs/api/libprelude-decl.txt | 104 +++++++++++++++++---------------- docs/api/tmpl/libprelude-unused.sgml | 28 +++++++++ docs/api/tmpl/sensor.sgml | 8 --- src/idmef-msg-send.c | 5 +- src/idmef-tree-func.c | 6 +- src/include/sensor.h | 4 +- src/sensor.c | 8 +- 8 files changed, 102 insertions(+), 67 deletions(-) commit 46127ebdc59e1cfdbcb52863d909afbeaaa703ce Author: Yoann Vandoorselaere Date: Wed Jan 23 10:58:48 2002 +0000 *** empty log message *** git-svn-id: file:///home/yoann/SVN/trunk/libprelude@609 09c5ec92-17d4-0310-903a-819935f44dba ChangeLog | 3 +++ 1 files changed, 3 insertions(+), 0 deletions(-) commit aec31eb9e9938336badacddcb9df7e0db2b6976e Author: Yoann Vandoorselaere Date: Wed Jan 23 10:58:07 2002 +0000 * src/idmef-msg-send.c (idmef_msg_send): use prelude_msg_reset. * src/prelude-message.c (prelude_msg_reset): new function, to be used if the same message is going to be written at several time. * src/idmef-tree-func.c: * src/idmef-msg-send.c: stop trying to count number of item / len. That's just too ugly. Use a static message buffer big enough (prelude_msg_set() will error if input is > buffer size anyway). git-svn-id: file:///home/yoann/SVN/trunk/libprelude@608 09c5ec92-17d4-0310-903a-819935f44dba ChangeLog | 12 +++++++++++ src/idmef-msg-send.c | 41 ++++++++++++++++---------------------- src/idmef-tree-func.c | 43 +--------------------------------------- src/include/idmef-msg-send.h | 11 ---------- src/include/prelude-message.h | 4 +- src/prelude-client.c | 2 +- src/prelude-message.c | 16 ++++++++++++-- src/sensor.c | 18 ++++++++++++++++- 8 files changed, 64 insertions(+), 83 deletions(-) commit ca1259fa91f2c7cf9631aa9126a77683cbfeab88 Author: Yoann Vandoorselaere Date: Tue Jan 22 19:23:11 2002 +0000 *** empty log message *** git-svn-id: file:///home/yoann/SVN/trunk/libprelude@606 09c5ec92-17d4-0310-903a-819935f44dba ChangeLog | 8 + docs/api/libprelude-decl.txt | 661 ++++++++++++++++++++++++---------- docs/api/tmpl/idmef-message-id.sgml | 21 -- docs/api/tmpl/idmef-tree.sgml | 4 +- docs/api/tmpl/libprelude-unused.sgml | 18 + src/idmef-msg-send.c | 269 +++++++++++--- src/idmef-tree-func.c | 54 +++- src/include/idmef-message-id.h | 275 +++++++++------ src/include/idmef-tree-func.h | 10 +- src/include/idmef-tree.h | 219 ++++++++++-- 10 files changed, 1151 insertions(+), 388 deletions(-) commit a89701ecdc79e069eca5892c04d0c3fa07f50ab1 Author: Yoann Vandoorselaere Date: Mon Jan 21 10:51:12 2002 +0000 *** empty log message *** git-svn-id: file:///home/yoann/SVN/trunk/libprelude@602 09c5ec92-17d4-0310-903a-819935f44dba configure.in | 1 + src/plugin-common.c | 8 ++++---- 2 files changed, 5 insertions(+), 4 deletions(-) commit 3fe49ff608a109b3df221369ca98174d715c4c5a Author: Krzysztof Zaraska Date: Sun Jan 20 16:03:25 2002 +0000 * configure.in: added AC_CANONICAL_SYSTEM macro to fix autoconf 2.5x problem git-svn-id: file:///home/yoann/SVN/trunk/libprelude@600 09c5ec92-17d4-0310-903a-819935f44dba ChangeLog | 2 ++ configure.in | 1 + 2 files changed, 3 insertions(+), 0 deletions(-) commit 8b359e181d9150af642d6c494d4418d25a6e2dae Author: Krzysztof Zaraska Date: Sun Jan 20 01:34:57 2002 +0000 minor FreeBSD compat. fix git-svn-id: file:///home/yoann/SVN/trunk/libprelude@599 09c5ec92-17d4-0310-903a-819935f44dba ChangeLog | 3 +++ src/common.c | 1 + 2 files changed, 4 insertions(+), 0 deletions(-) commit f4668efdd689b550e38bd9617def932ef1a54951 Author: Yoann Vandoorselaere Date: Sat Jan 19 16:48:26 2002 +0000 *** empty log message *** git-svn-id: file:///home/yoann/SVN/trunk/libprelude@595 09c5ec92-17d4-0310-903a-819935f44dba INSTALL | 104 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ README | 96 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 200 insertions(+), 0 deletions(-) commit 5939af62eee762e56ed08f76390e4072cc266997 Author: Yoann Vandoorselaere Date: Sat Jan 19 14:47:13 2002 +0000 *** empty log message *** git-svn-id: file:///home/yoann/SVN/trunk/libprelude@591 09c5ec92-17d4-0310-903a-819935f44dba ChangeLog | 8 ++++++++ src/extract.c | 1 + 2 files changed, 9 insertions(+), 0 deletions(-) commit fb3ac34cea803ed9b41b431dfcabfeefa0be44ec Author: Yoann Vandoorselaere Date: Sat Jan 19 14:44:47 2002 +0000 * Update everything to fit header change. * src/common.c (prelude_resolve_addr): new function. * src/prelude-log.c: moved all the logging stuff here. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@590 09c5ec92-17d4-0310-903a-819935f44dba ChangeLog | 7 ++ docs/api/libprelude-decl.txt | 95 +++++++++++++------------ src/Makefile.am | 5 +- src/client-ident.c | 24 ++++++- src/common.c | 130 ++++++---------------------------- src/config-engine.c | 2 +- src/daemonize.c | 2 +- src/extract.c | 79 ++++++++++++++++++++- src/idmef-msg-send.c | 22 ++++++ src/idmef-tree-func.c | 2 +- src/include/Makefile.am | 5 +- src/include/client-ident.h | 22 ++++++ src/include/common.h | 40 +---------- src/include/extract.h | 22 ++++++ src/include/idmef-msg-send.h | 22 ++++++ src/include/prelude-getopt-wide.h | 22 ++++++ src/include/prelude-log.h | 57 +++++++++++++++ src/include/prelude-path.h | 22 ++++++ src/plugin-common.c | 2 +- src/prelude-async.c | 13 ++-- src/prelude-auth.c | 2 +- src/prelude-client-mgr.c | 2 +- src/prelude-client.c | 22 ++++--- src/prelude-getopt.c | 2 +- src/prelude-ident.c | 2 +- src/prelude-io.c | 2 +- src/prelude-log.c | 141 +++++++++++++++++++++++++++++++++++++ src/prelude-message.c | 14 ++-- src/prelude-path.c | 22 ++++++ src/sensor.c | 2 +- src/ssl-register.c | 29 +------- src/ssl-registration-msg.c | 2 +- src/ssl.c | 2 +- src/timer.c | 2 +- src/variable.c | 2 +- 35 files changed, 585 insertions(+), 258 deletions(-) commit 317a6d7673b93882e3475464279444284e40ec88 Author: Yoann Vandoorselaere Date: Fri Jan 18 15:48:02 2002 +0000 *** empty log message *** git-svn-id: file:///home/yoann/SVN/trunk/libprelude@585 09c5ec92-17d4-0310-903a-819935f44dba configure.in | 25 +++++++++++++++++++++++-- src/prelude-client-mgr.c | 3 +-- 2 files changed, 24 insertions(+), 4 deletions(-) commit 80a4353207098cb433bf957cec5d315766964c74 Author: Yoann Vandoorselaere Date: Fri Jan 18 15:22:47 2002 +0000 *** empty log message *** git-svn-id: file:///home/yoann/SVN/trunk/libprelude@584 09c5ec92-17d4-0310-903a-819935f44dba configure.in | 21 --------------------- src/prelude-client-mgr.c | 4 +++- 2 files changed, 3 insertions(+), 22 deletions(-) commit c2916bd1bfdb2f9867a5ddda9b108bd1675fd1fb Author: Yoann Vandoorselaere Date: Fri Jan 18 15:03:23 2002 +0000 *** empty log message *** git-svn-id: file:///home/yoann/SVN/trunk/libprelude@582 09c5ec92-17d4-0310-903a-819935f44dba configure.in | 6 +++++- src/Makefile.am | 2 +- 2 files changed, 6 insertions(+), 2 deletions(-) commit 278feae9356fa576b6d363e214c713089db7c593 Author: Yoann Vandoorselaere Date: Fri Jan 18 13:40:26 2002 +0000 *** empty log message *** git-svn-id: file:///home/yoann/SVN/trunk/libprelude@576 09c5ec92-17d4-0310-903a-819935f44dba ChangeLog | 3 + Makefile.am | 8 +- configure.ac | 240 --------------------------------- configure.in | 238 ++++++++++++++++++++++++++++++++ docs/api/libprelude-decl.txt | 7 +- docs/api/libprelude-sections.txt | 227 +++++++++++++++++++++++++++---- docs/api/tmpl/common.sgml | 16 +++ docs/api/tmpl/config-engine.sgml | 10 ++ docs/api/tmpl/daemonize.sgml | 9 ++ docs/api/tmpl/idmef-message-id.sgml | 147 ++++++++++++++++++++ docs/api/tmpl/idmef-tree.sgml | 75 ++++++++++ docs/api/tmpl/libprelude-unused.sgml | 41 +----- docs/api/tmpl/list.sgml | 10 ++ docs/api/tmpl/plugin-common-prv.sgml | 24 +++- docs/api/tmpl/plugin-common.sgml | 18 +++ docs/api/tmpl/prelude-auth.sgml | 23 +++ docs/api/tmpl/prelude-client-mgr.sgml | 9 ++ docs/api/tmpl/prelude-client.sgml | 45 ++++++ docs/api/tmpl/prelude-getopt.sgml | 70 ++++++++-- docs/api/tmpl/prelude-io.sgml | 41 ++++++ docs/api/tmpl/prelude-message.sgml | 40 ++++++ docs/api/tmpl/sensor.sgml | 40 ++++++ docs/api/tmpl/ssl-gencrypto.sgml | 11 -- docs/api/tmpl/ssl-register.sgml | 19 +++ src/Makefile.am | 3 +- src/include/plugin-common-prv.h | 7 +- src/include/prelude-getopt.h | 4 +- src/plugin-common.c | 7 +- src/prelude-async.c | 15 ++- src/prelude-auth.c | 2 +- src/prelude-client.c | 2 +- src/prelude-getopt.c | 5 +- 32 files changed, 1057 insertions(+), 359 deletions(-) commit afed5721702fd178b7692c7d28bf4690c696617d Author: Yoann Vandoorselaere Date: Fri Jan 18 13:17:12 2002 +0000 *** empty log message *** git-svn-id: file:///home/yoann/SVN/trunk/libprelude@575 09c5ec92-17d4-0310-903a-819935f44dba configure.ac | 10 ++++++++-- libprelude-config.in | 2 +- 2 files changed, 9 insertions(+), 3 deletions(-) commit af0ad7f92b9310fab7b4469f6e3d7b36b640532e Author: Yoann Vandoorselaere Date: Fri Jan 18 13:03:29 2002 +0000 * src/prelude-auth.c (do_auth): (ask_manager_address): (write_auth_infos): (read_auth_result): removed unused. * configure.ac: correct check for profiling. Enable -fprofile-arcs if compiler support it. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@574 09c5ec92-17d4-0310-903a-819935f44dba ChangeLog | 8 ++++ configure.ac | 30 +++++++++++++-- docs/api/libprelude-decl.txt | 54 +++++++++++++++++++------- src/idmef-msg-send.c | 1 + src/prelude-auth.c | 85 +----------------------------------------- src/ssl-register.c | 3 +- 6 files changed, 76 insertions(+), 105 deletions(-) commit 8a9370bd4c1577289a707c963d99fbbd81fef099 Author: Yoann Vandoorselaere Date: Fri Jan 18 12:15:43 2002 +0000 * src/timer.c (walk_and_wake_up_timer): set prev_remaining to a big negative value, so that the new timer algorithm debuging check won't blow at us because there is lag. (search_previous_timer): if the timer we want to insert expire at the same time as the known to be expiring last timer, replace it. (search_previous_timer): if the timer we want to insert expire at the same time as the known to be expiring first timer, replace it. (search_previous_backward): (search_previous_forward): handle case where we find an entry with the same expire time as our inserted timer. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@573 09c5ec92-17d4-0310-903a-819935f44dba ChangeLog | 18 ++++++++++++ src/timer.c | 85 ++++++++++++++++++++++++++++++++++++++++++---------------- 2 files changed, 79 insertions(+), 24 deletions(-) commit 1296eecbb9427f01c5aa014e067cad5118406a66 Author: Yoann Vandoorselaere Date: Thu Jan 17 19:44:38 2002 +0000 * src/prelude-io.c (prelude_io_read_wait): use an infinite timeout. This is a temporary workaround. Manager-adduser / sensor-adduser should use prelude_message. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@569 09c5ec92-17d4-0310-903a-819935f44dba ChangeLog | 4 ++++ src/prelude-io.c | 2 +- 2 files changed, 5 insertions(+), 1 deletions(-) commit a8ad6b315ac6f10de41063409288eece1ccc6f0d Author: Yoann Vandoorselaere Date: Thu Jan 17 19:42:52 2002 +0000 * src/prelude-client.c: prelude_client_t is a linked object. New helper function to get client informations. * src/sensor.c: wrapper for the new client-mgr function. * src/prelude-client-mgr.c: ability to return the whole client list, and to notify uppon client change throught a callback. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@568 09c5ec92-17d4-0310-903a-819935f44dba ChangeLog | 9 +++ docs/api/libprelude-decl.txt | 12 ++++ src/include/list.h | 4 + src/include/prelude-client-mgr.h | 3 + src/include/prelude-client.h | 11 +++- src/include/sensor.h | 4 + src/prelude-client-mgr.c | 48 ++++++++++++++-- src/prelude-client.c | 114 +++++++++++++++++++++++++++++++++----- src/sensor.c | 28 +++++++++ src/ssl-register.c | 4 +- 10 files changed, 211 insertions(+), 26 deletions(-) commit f4aa43131d6db6090c2080ebb7f5cec4e342f223 Author: Yoann Vandoorselaere Date: Thu Jan 17 16:19:12 2002 +0000 * libprelude-config.in: * configure.ac: updated. Libprelude is not linked to the needed library anymore. It's up to the application to do so. Also, libprelude-config --libs will list -lc_r if needed for Posix Thread so that when an application using libprelude try to link, normal libc will be overwritten by -lc_r. This change was needed because crash would happen on FreeBSD using both library at the same time. Credits goes to Krzysztof Zaraska for finding the problem git-svn-id: file:///home/yoann/SVN/trunk/libprelude@565 09c5ec92-17d4-0310-903a-819935f44dba ChangeLog | 13 ++++++++++++ configure.ac | 52 ++++++++++++++++++++++++++----------------------- libprelude-config.in | 10 ++++++++- src/Makefile.am | 3 -- 4 files changed, 50 insertions(+), 28 deletions(-) commit 8750477659ec71459af7c48283ed6d17dec82ceb Author: Yoann Vandoorselaere Date: Thu Jan 17 14:15:18 2002 +0000 * src/client-ident.c (prelude_client_ident_send): if is_caller_a_sensor is set, declare the client as being ID 0 (Relay Manager). * src/prelude-async.c (prelude_async_add): signal the condition. * src/sensor.c: global variable, telling if the caller is a sensor or not (a Manager for exemple). (prelude_sensor_init): set is_caller_a_sensor to 1. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@563 09c5ec92-17d4-0310-903a-819935f44dba ChangeLog | 13 +++++++++++++ src/client-ident.c | 17 ++++++++--------- src/prelude-async.c | 3 ++- src/sensor.c | 4 +++- 4 files changed, 26 insertions(+), 11 deletions(-) commit c4f9e366992db71f890619fb44d52945dd840eb8 Author: Yoann Vandoorselaere Date: Wed Jan 16 18:09:39 2002 +0000 (prelude_client_ident_init): handle error when reading ident file. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@562 09c5ec92-17d4-0310-903a-819935f44dba ChangeLog | 2 ++ src/client-ident.c | 8 +++++++- 2 files changed, 9 insertions(+), 1 deletions(-) commit 8d937e0f9b4ad21f9a072975e1744f7b90b2d2b7 Author: Yoann Vandoorselaere Date: Wed Jan 16 17:44:43 2002 +0000 *** empty log message *** git-svn-id: file:///home/yoann/SVN/trunk/libprelude@561 09c5ec92-17d4-0310-903a-819935f44dba src/client-ident.c | 8 +++++++- 1 files changed, 7 insertions(+), 1 deletions(-) commit 9794922a85651304a50733f6e886b523b26be07a Author: Yoann Vandoorselaere Date: Wed Jan 16 17:43:28 2002 +0000 * src/client-ident.c (save_ident): identity file should be readable for all. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@560 09c5ec92-17d4-0310-903a-819935f44dba ChangeLog | 5 ++++- src/client-ident.c | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) commit e81231f93950733fff8049838a9aefe1c8589090 Author: Yoann Vandoorselaere Date: Wed Jan 16 17:29:57 2002 +0000 * src/prelude-io.c (ssl_read): (ssl_write): handle ssl error correctly. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@558 09c5ec92-17d4-0310-903a-819935f44dba ChangeLog | 5 ++ docs/api/libprelude-decl.txt | 78 ++++++++++++++++++++------------ docs/api/tmpl/libprelude-unused.sgml | 18 ++++++++ docs/api/tmpl/prelude-auth.sgml | 7 --- docs/api/tmpl/prelude-client-mgr.sgml | 3 +- docs/api/tmpl/ssl-gencrypto.sgml | 1 + docs/api/tmpl/ssl.sgml | 14 ------ src/prelude-io.c | 27 ++++++----- 8 files changed, 90 insertions(+), 63 deletions(-) commit a59c91a3de481dfb912b5aba565ac73f3632a9d1 Author: Yoann Vandoorselaere Date: Tue Jan 15 14:59:53 2002 +0000 *** empty log message *** git-svn-id: file:///home/yoann/SVN/trunk/libprelude@553 09c5ec92-17d4-0310-903a-819935f44dba src/include/timer.h | 9 +++++---- 1 files changed, 5 insertions(+), 4 deletions(-) commit f72d71bf66a764763e2961def04c0d5396dba8c7 Author: Yoann Vandoorselaere Date: Tue Jan 15 14:58:57 2002 +0000 * src/timer.c: now work with a timer_t instead of a timeval structure. This is cleaner as we don't care about useconds anyway. Also updated the algorithm. The new algorithm use O(1) for timer insertion most of the time. And allow us to keep the timer sorted in the timer list. When waking up timer, this avoid us to look at the whole list. We can stop as soon as we meet an un-wokable timer (which is very advantaging where there is a lot of timer arround). (search_previous_timer): new function, deduce, in O(1) time, if the new timer should be the first or the last in the list. In both case insertion is O(1). If none of theses statement are true, then try to guess if the previous timer entry (in regards to the new timer) is located on the beginning or end of the list. Then call the needed insertion function. (search_previous_forward): new function. Search previous timer entry from end of the list to begining of the list. (search_previous_backward): ditto, but do it backward. (walk_and_wake_up_timer): handle wake_up_if_needed() return value. Now that the list is sorted, we can break as soon as we meet a timer we cannot wake. This is disabled for now for integrity checking. (wake_up_if_needed): return 0 if we woke the timer up, or -1 if time remaing before expiration. (time_elapsed): updated avoid some float() calculation. (time_remaining): new function. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@552 09c5ec92-17d4-0310-903a-819935f44dba ChangeLog | 34 ++++++++ src/timer.c | 267 ++++++++++++++++++++++++++++++++++++++++++++++------------ 2 files changed, 245 insertions(+), 56 deletions(-) commit bd4fe814be4d3785b48e325c1faa99ba735d4788 Author: Yoann Vandoorselaere Date: Tue Jan 15 14:35:34 2002 +0000 * src/prelude-client-mgr.c (broadcast_saved_message): (flush_backup_if_needed): Better error handling. Make the difference between communication error, and other error... (broadcast_saved_message): if there is a problem when forwarding the data to the client, then increment the count of connection dead and return a communication error. (parse_config_line): (client_timer_expire): After a successfull reconnection, check the flush_backup_if_needed() return value. If it indicate a communication error, re-init the connection timer. Else continue. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@551 09c5ec92-17d4-0310-903a-819935f44dba ChangeLog | 13 +++++++++++++ src/prelude-client-mgr.c | 35 ++++++++++++++++++++++------------- 2 files changed, 35 insertions(+), 13 deletions(-) commit 2a7a8a5b64ba65ad7996d39ec02c33eded499afe Author: Yoann Vandoorselaere Date: Tue Jan 15 14:19:22 2002 +0000 * src/prelude-client.c (prelude_client_forward): handle the case where the connection break the same way as in prelude_client_send_msg() git-svn-id: file:///home/yoann/SVN/trunk/libprelude@550 09c5ec92-17d4-0310-903a-819935f44dba ChangeLog | 4 ++++ src/prelude-client.c | 14 +++++++++++++- 2 files changed, 17 insertions(+), 1 deletions(-) commit 2b2f281382d5f96627eba88bd224112f24ce91c3 Author: Yoann Vandoorselaere Date: Tue Jan 15 14:17:53 2002 +0000 * src/prelude-message.c (read_message_data): copy size into a count variable on entering to the function. So that we don't get confused when comparing the amount of byte requested and the amount of byte we got. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@549 09c5ec92-17d4-0310-903a-819935f44dba ChangeLog | 7 +++++++ src/prelude-message.c | 5 +++-- 2 files changed, 10 insertions(+), 2 deletions(-) commit b007f62dd172e013345223bc663118d0a7c9e2ea Author: Yoann Vandoorselaere Date: Mon Jan 14 20:37:49 2002 +0000 *** empty log message *** git-svn-id: file:///home/yoann/SVN/trunk/libprelude@548 09c5ec92-17d4-0310-903a-819935f44dba configure.ac | 1 - src/ssl-register.c | 1 - 2 files changed, 0 insertions(+), 2 deletions(-) commit 0b98b886dcdfe1dd2977c5b022fe78579bbddc67 Author: Yoann Vandoorselaere Date: Mon Jan 14 20:26:50 2002 +0000 *** empty log message *** git-svn-id: file:///home/yoann/SVN/trunk/libprelude@547 09c5ec92-17d4-0310-903a-819935f44dba sensor-adduser/Makefile.am | 13 -- sensor-adduser/sensor-adduser.c | 67 -------- sensor-adduser/ssl-register.c | 320 --------------------------------------- sensor-adduser/ssl-register.h | 24 --- src/include/auth.h | 1 - 5 files changed, 0 insertions(+), 425 deletions(-) commit d00b8f9e3d1b9c4985544fe72266aebe70009cf8 Author: Yoann Vandoorselaere Date: Mon Jan 14 20:22:21 2002 +0000 * src/ssl-register.c: move here. Obsolete sensor-adduser. Sensor now provide a -c option for creating the authentication file. * I'm too lazy to list all the change. Basically created a new file, prelude-path.c, with function returning path to stuff commonly shared by Prelude Manager and Libprelude. This get rid of some of the path mess. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@546 09c5ec92-17d4-0310-903a-819935f44dba ChangeLog | 17 ++ Makefile.am | 10 +- docs/api/libprelude-decl.txt | 37 +++- src/Makefile.am | 2 + src/client-ident.c | 24 +-- src/include/Makefile.am | 4 +- src/include/auth.h | 2 +- src/include/prelude-client-mgr.h | 4 +- src/include/prelude-path.h | 11 ++ src/include/sensor.h | 4 +- src/include/ssl-gencrypto.h | 4 +- src/include/ssl-register.h | 27 +++ src/include/ssl.h | 9 +- src/prelude-client-mgr.c | 29 +-- src/prelude-client.c | 12 +- src/prelude-path.c | 69 +++++++ src/sensor.c | 53 +++++- src/ssl-gencrypto.c | 43 +----- src/ssl-register.c | 366 ++++++++++++++++++++++++++++++++++++++ src/ssl.c | 57 +++++-- 20 files changed, 649 insertions(+), 135 deletions(-) commit a72798b373b62f32ee2d60180e94fda9bd8d8bab Author: Yoann Vandoorselaere Date: Mon Jan 14 18:00:23 2002 +0000 * src/prelude-message.c: lot of cleanup, code comment. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@545 09c5ec92-17d4-0310-903a-819935f44dba ChangeLog | 2 + src/prelude-message.c | 165 ++++++++++++++++++++++++++++++++++--------------- 2 files changed, 118 insertions(+), 49 deletions(-) commit 31b288d50c462515269ca4e8c3dcc89073361464 Author: Yoann Vandoorselaere Date: Mon Jan 14 16:52:40 2002 +0000 * src/prelude-io.c (prelude_io_get_fdptr): new function. Return file or ssl pointer associated with this file descriptor. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@543 09c5ec92-17d4-0310-903a-819935f44dba ChangeLog | 6 ++++++ src/include/prelude-io.h | 2 ++ src/prelude-io.c | 18 +++++++++++++++++- 3 files changed, 25 insertions(+), 1 deletions(-) commit 162120e6b4d7201ca9516d87f0b541478c0d8e12 Author: Yoann Vandoorselaere Date: Fri Jan 11 15:02:28 2002 +0000 * src/include/idmef-tree.h: * src/idmef-tree-func.c: * src/idmef-msg-send.c: move list.h inclusion out from the header file. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@533 09c5ec92-17d4-0310-903a-819935f44dba ChangeLog | 5 +++++ src/idmef-msg-send.c | 1 + src/idmef-tree-func.c | 1 + src/include/idmef-tree.h | 1 - 4 files changed, 7 insertions(+), 1 deletions(-) commit f00e24f15ad42056a5d2da5e6145b060d9f14927 Author: Yoann Vandoorselaere Date: Fri Jan 11 14:57:50 2002 +0000 *** empty log message *** git-svn-id: file:///home/yoann/SVN/trunk/libprelude@532 09c5ec92-17d4-0310-903a-819935f44dba src/prelude-client.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) commit 5fa1c9f45d3c1ad407e58c0a51e90300059e697b Author: Yoann Vandoorselaere Date: Fri Jan 11 14:53:40 2002 +0000 * src/prelude-client.c (handle_plaintext_connection): always use PRELUDE_MSG_AUTH for header tag. use PRELUDE_MSG_AUTH_PLAINTEXT as a subtag. (start_unix_connection): read Manager setup, even in UNIX mode. (handle_plaintext_connection): call read_plaintext_authentication_result(). (read_plaintext_authentication_result): new function. Read authentication result. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@530 09c5ec92-17d4-0310-903a-819935f44dba ChangeLog | 7 ++++ sensors-default.conf | 10 +++++- src/include/prelude-message-id.h | 10 +++-- src/prelude-client.c | 75 +++++++++++++++++++++++++++++++++----- 4 files changed, 88 insertions(+), 14 deletions(-) commit f7002b27a8312e8dc77f1ac031f613f0a09db256 Author: Yoann Vandoorselaere Date: Fri Jan 11 14:06:01 2002 +0000 * src/prelude-client.c (handle_plaintext_connection): always use PRELUDE_MSG_AUTH for header tag. use PRELUDE_MSG_AUTH_PLAINTEXT as a subtag. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@527 09c5ec92-17d4-0310-903a-819935f44dba ChangeLog | 6 ++++++ src/prelude-client.c | 3 ++- 2 files changed, 8 insertions(+), 1 deletions(-) commit 409bcf186ad0223a289a5ff9e4b8759c33522a59 Author: Yoann Vandoorselaere Date: Thu Jan 10 19:10:00 2002 +0000 * src/prelude-client.c (handle_plaintext_connection): don't leak auth entry. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@523 09c5ec92-17d4-0310-903a-819935f44dba ChangeLog | 3 +++ docs/api/libprelude-decl.txt | 2 +- docs/api/tmpl/prelude-auth.sgml | 1 + src/prelude-client.c | 8 +++++--- 4 files changed, 10 insertions(+), 4 deletions(-) commit c744168c380d41fb0aba7fc47bdf9cd3e430b5b8 Author: Yoann Vandoorselaere Date: Thu Jan 10 17:03:50 2002 +0000 * src/include/prelude-message-id.h: added ID for authentication. * src/include/prelude-message.h: * src/include/prelude-io.h: add a Swig entry so that swig know how to generate a wrapper. * src/ssl.c (ssl_init_client): free unused data in case of failure. * src/prelude-io.c (sys_write): (sys_close): don't handle case where read return 0. (file_read): (file_write): theses one should never set errno to EINTR or EAGAIN. * src/prelude-client.c (handle_plaintext_connection): read authentication message. This is now done throughr prelude-message, not prelude-io directly. most of the code reworked cause we use prelude-message everywhere now. * src/prelude-auth.c: don't take care of the connecting host anymore. Act as a basic interface to the authentication file. The message reading / writing code is now in the prelude-client / Manager server interface. Keep password crypted on the Manager server. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@518 09c5ec92-17d4-0310-903a-819935f44dba ChangeLog | 28 +++++ docs/api/libprelude-decl.txt | 72 ++++++++++++- docs/api/tmpl/libprelude-unused.sgml | 20 ++++ docs/api/tmpl/prelude-auth.sgml | 22 ---- sensor-adduser/sensor-adduser.c | 2 +- src/include/prelude-auth.h | 6 +- src/include/prelude-io.h | 16 +++ src/include/prelude-message-id.h | 14 +++- src/include/prelude-message.h | 18 +++ src/prelude-auth.c | 198 ++++++++++++---------------------- src/prelude-client.c | 144 +++++++++++++++---------- src/prelude-io.c | 34 +++--- src/ssl.c | 41 ++++---- 13 files changed, 362 insertions(+), 253 deletions(-) commit ae1d1286a1cec6c8e1960294777b60e1f68fecc7 Author: Yoann Vandoorselaere Date: Thu Jan 10 07:58:34 2002 +0000 *** empty log message *** git-svn-id: file:///home/yoann/SVN/trunk/libprelude@517 09c5ec92-17d4-0310-903a-819935f44dba src/prelude-client.c | 2 +- src/prelude-io.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) commit c1a256a6cebb1e61dec1acbaad55496735cd1213 Author: Yoann Vandoorselaere Date: Thu Jan 10 07:53:00 2002 +0000 *** empty log message *** git-svn-id: file:///home/yoann/SVN/trunk/libprelude@516 09c5ec92-17d4-0310-903a-819935f44dba src/prelude-io.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) commit 5fd7107459516c3f9aa4648afafb6480e3891b0e Author: Yoann Vandoorselaere Date: Thu Jan 10 00:31:30 2002 +0000 *** empty log message *** git-svn-id: file:///home/yoann/SVN/trunk/libprelude@514 09c5ec92-17d4-0310-903a-819935f44dba src/prelude-io.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) commit 4c0c3a480524648a971acc0d543883fa4384a727 Author: Yoann Vandoorselaere Date: Thu Jan 10 00:22:42 2002 +0000 * src/prelude-io.c (prelude_io_read_delimited): return -1 on EOF. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@513 09c5ec92-17d4-0310-903a-819935f44dba ChangeLog | 5 +++++ src/prelude-io.c | 2 +- 2 files changed, 6 insertions(+), 1 deletions(-) commit 0cff8fb2d3904930a6e7cde1278c22bcef9430f1 Author: Yoann Vandoorselaere Date: Wed Jan 9 15:50:32 2002 +0000 *** empty log message *** git-svn-id: file:///home/yoann/SVN/trunk/libprelude@511 09c5ec92-17d4-0310-903a-819935f44dba docs/api/libprelude-decl.txt | 216 ++++++++++++++++++++++++++++++++++++++++- docs/api/tmpl/idmef-tree.sgml | 4 +- src/daemonize.c | 8 +- src/idmef-msg-send.c | 1 + src/idmef-tree-func.c | 3 +- src/prelude-message.c | 1 + 6 files changed, 221 insertions(+), 12 deletions(-) commit ff0c1f39e6f73533c8fcec6238480bb9479f7566 Author: Yoann Vandoorselaere Date: Mon Jan 7 17:37:39 2002 +0000 * src/config-engine.c (cmp_entry): remove space at the beginning of the line. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@510 09c5ec92-17d4-0310-903a-819935f44dba ChangeLog | 3 +++ src/config-engine.c | 8 +++++++- 2 files changed, 10 insertions(+), 1 deletions(-) commit 71c8ab9bc20dd814219374f3e747be87dd350d86 Author: Yoann Vandoorselaere Date: Mon Jan 7 16:14:50 2002 +0000 * src/idmef-msg-send.c: new interface for sending IDMEF message. This one is to be used by application that are not time critical. Other should still directly use the prelude-message API. * src/idmef-tree-func.c: moved most of the IDMEF creation function from the Manager server to libprelude. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@507 09c5ec92-17d4-0310-903a-819935f44dba ChangeLog | 11 + src/Makefile.am | 4 +- src/idmef-msg-send.c | 448 ++++++++++++++++++++++++++ src/idmef-tree-func.c | 705 +++++++++++++++++++++++++++++++++++++++++ src/include/Makefile.am | 5 +- src/include/idmef-msg-send.h | 13 + src/include/idmef-tree-func.h | 124 +++++++ src/include/idmef-tree.h | 21 +- 8 files changed, 1323 insertions(+), 8 deletions(-) commit 043355d1159301f37f0c3b9c3430266765215fce Author: Krzysztof Zaraska Date: Sun Jan 6 10:51:56 2002 +0000 includes fixed for FreeBSD git-svn-id: file:///home/yoann/SVN/trunk/libprelude@504 09c5ec92-17d4-0310-903a-819935f44dba ChangeLog | 3 +++ src/extract.c | 1 + 2 files changed, 4 insertions(+), 0 deletions(-) commit e66b49fa745749ce90ce7c98f73a30d61b1ccb0d Author: Yoann Vandoorselaere Date: Sat Jan 5 17:52:45 2002 +0000 *** empty log message *** git-svn-id: file:///home/yoann/SVN/trunk/libprelude@500 09c5ec92-17d4-0310-903a-819935f44dba Makefile.am | 6 ++-- docs/api/libprelude-decl.txt | 81 +++++++++++++++++++++++++++++++++++++++++- docs/api/tmpl/sensor.sgml | 1 + src/prelude-client-mgr.c | 41 +++++++-------------- src/prelude-io.c | 26 +++++++++++--- src/prelude-message.c | 4 +- src/sensor.c | 13 ++++--- 7 files changed, 128 insertions(+), 44 deletions(-) commit 2a526bd91e7ed74a0afea4824bced98e581f447d Author: Yoann Vandoorselaere Date: Sat Jan 5 14:17:37 2002 +0000 * src/sensor.c (parse_argument): short option for manager-addr is -m, not -a. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@497 09c5ec92-17d4-0310-903a-819935f44dba ChangeLog | 3 +++ src/sensor.c | 2 +- 2 files changed, 4 insertions(+), 1 deletions(-) commit b1efb0db7fe9871053bc30313093986f5cda2c42 Author: Yoann Vandoorselaere Date: Sat Jan 5 14:02:17 2002 +0000 (declare_ident_to_manager): put the ident in network byte order. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@493 09c5ec92-17d4-0310-903a-819935f44dba ChangeLog | 3 +++ src/client-ident.c | 19 ++++++++++++++----- src/include/client-ident.h | 2 +- src/prelude-client.c | 2 +- 4 files changed, 19 insertions(+), 7 deletions(-) commit ae0fa9734d75ffdbbeed143117aca84ea62b3505 Author: Yoann Vandoorselaere Date: Sat Jan 5 13:24:08 2002 +0000 * src/client-ident.c: new file. (prelude_client_ident_tell): when called, will tell the other peer what ID we are, unless we are a Manager ourselve. * src/extract.c: new file, contain type checking function for message extraction. * src/sensor.c (prelude_sensor_init): now take a sensor_name argument. (setup_manager_addr): identifier for client manager is the sensor name. * src/prelude-message.c (prelude_msg_read): it's possible for a message to only contain an header. handle that case well, without returning an error. * src/prelude-client.c (prelude_client_connect): better error handling. Call prelude_client_ident_tell(). * src/prelude-client-mgr.c (parse_config_line): warn if Manager emission can not work at initialisation too. (setup_backup_fd): include program UID, in the filename. This file can't be shared if two instance of the sensor run as different user. * src/include/prelude-message-id.h (PRELUDE_MSG_ID_REPLY): (PRELUDE_MSG_ID_REQUEST): new message ID. * src/sensor.c (prelude_sensor_init): stop initializing if parse_argument() return prelude_option_end or prelude_option_error. * src/prelude-getopt.c (check_option_optarg): check index before dereferencing argv. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@492 09c5ec92-17d4-0310-903a-819935f44dba ChangeLog | 38 +++++++ Makefile.am | 3 +- src/Makefile.am | 2 + src/client-ident.c | 212 ++++++++++++++++++++++++++++++++++++++ src/extract.c | 78 ++++++++++++++ src/include/Makefile.am | 5 +- src/include/client-ident.h | 4 + src/include/extract.h | 26 +++++ src/include/prelude-message-id.h | 11 ++ src/include/sensor.h | 5 +- src/prelude-client-mgr.c | 22 +++- src/prelude-client.c | 35 ++++--- src/prelude-getopt.c | 2 +- src/prelude-message.c | 2 +- src/sensor.c | 47 ++++++--- 15 files changed, 449 insertions(+), 43 deletions(-) commit bf6db92ca227d150c8b21a6928fded726563b1fc Author: Yoann Vandoorselaere Date: Fri Jan 4 17:51:51 2002 +0000 *** empty log message *** git-svn-id: file:///home/yoann/SVN/trunk/libprelude@491 09c5ec92-17d4-0310-903a-819935f44dba sensor-adduser/sensor-adduser.c | 2 -- 1 files changed, 0 insertions(+), 2 deletions(-) commit c83ed819047e1b0e80d7b8092069de78a3dac507 Author: Yoann Vandoorselaere Date: Fri Jan 4 17:27:15 2002 +0000 *** empty log message *** git-svn-id: file:///home/yoann/SVN/trunk/libprelude@490 09c5ec92-17d4-0310-903a-819935f44dba src/include/Makefile.am | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) commit a2a24d3b1a017d1a7c12fd295393f312f99e63c3 Author: Yoann Vandoorselaere Date: Fri Jan 4 17:25:54 2002 +0000 *** empty log message *** git-svn-id: file:///home/yoann/SVN/trunk/libprelude@489 09c5ec92-17d4-0310-903a-819935f44dba Makefile.am | 4 ++-- configure.ac | 5 ++--- docs/api/libprelude-decl.txt | 30 +++++++++--------------------- docs/api/tmpl/libprelude-unused.sgml | 18 ++++++++++++++++++ docs/api/tmpl/prelude-auth.sgml | 9 ++------- docs/api/tmpl/prelude-getopt.sgml | 1 + docs/api/tmpl/ssl.sgml | 14 -------------- sensor-adduser/Makefile.am | 2 +- sensor-adduser/sensor-adduser.c | 2 +- src/Makefile.am | 2 +- src/include/Makefile.am | 3 +-- src/include/auth.h | 1 + src/include/prelude-auth.h | 7 ++----- src/include/ssl.h | 8 ++------ src/prelude-auth.c | 23 +++++++++++++---------- src/prelude-client.c | 3 ++- src/sensor.c | 2 +- 17 files changed, 59 insertions(+), 75 deletions(-) commit 3e8f4d1a26ce2675a7f8c9cc938ce8ea65eb6989 Author: Yoann Vandoorselaere Date: Fri Jan 4 16:17:32 2002 +0000 *** empty log message *** git-svn-id: file:///home/yoann/SVN/trunk/libprelude@485 09c5ec92-17d4-0310-903a-819935f44dba sensors-default.conf | 15 +++++++++------ src/sensor.c | 2 +- 2 files changed, 10 insertions(+), 7 deletions(-) commit 53b50fd4b1310b0dbbad63b45d7c6ae6dffdf993 Author: Yoann Vandoorselaere Date: Fri Jan 4 16:00:35 2002 +0000 * src/config-engine.c (is_line_commented): new function. (search_entry): if the section the entry is in is commented, return an error. (config_get_section): ditto. * src/include/plugin-common.h (plugin_request_new_id): remove plugin_option API. Plugin have to use prelude-getopt API now. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@482 09c5ec92-17d4-0310-903a-819935f44dba ChangeLog | 5 +++++ src/config-engine.c | 21 ++++++++++++++++++++- 2 files changed, 25 insertions(+), 1 deletions(-) commit ac1f987a9c6f100fea5808166ffe33dfb4129020 Author: Yoann Vandoorselaere Date: Fri Jan 4 13:37:18 2002 +0000 * src/include/plugin-common.h (plugin_request_new_id): remove plugin_option API. Plugin have to use prelude-getopt API now. * src/sensor.c (parse_argument): removed --help option hook. The application have to call prelude_option_print_help() in order for the user to see library option. (parse_argument): do not use prelude_option_new (dead). (parse_argument): handle prelude_option_parse_arguments return value the right way. * src/prelude-getopt.c: include string.h (search_cli_option): correctly match short option. (check_option_optarg): remove un-necessary code. (check_option_noarg): ditto. (check_option): initialize optarg to NULL for safety. (process_option_cfg_hook): new function: Try to get value for option that weren't set on command line in the config file. Big cleanup and slight API change. * src/prelude-client.c (prelude_client_connect): directly call prelude_option_wide_get_msg(). * src/prelude-client-mgr.c (parse_config_line): remove errornous strtok() function call. * src/plugin-common.c: API change. allow asynchronous plugin subscribtion / un-subscribtion. Cleanup. * src/config-engine.c (cmp_entry): (cmp_section): make the matching case unsensitive. (config_get_section): new function, return 0 if section exist. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@479 09c5ec92-17d4-0310-903a-819935f44dba ChangeLog | 37 +++ docs/api/libprelude-decl.txt | 74 ++--- docs/api/tmpl/libprelude-unused.sgml | 55 ++++ docs/api/tmpl/plugin-common-prv.sgml | 18 +- docs/api/tmpl/plugin-common.sgml | 25 -- docs/api/tmpl/prelude-getopt.sgml | 32 +-- src/config-engine.c | 23 ++- src/include/config-engine.h | 1 + src/include/plugin-common-prv.h | 8 +- src/include/plugin-common.h | 23 +-- src/include/prelude-getopt.h | 27 +-- src/plugin-common.c | 524 ++++++++++++-------------------- src/prelude-client-mgr.c | 6 +- src/prelude-client.c | 2 +- src/prelude-getopt.c | 545 ++++++++++++++++++++-------------- src/sensor.c | 69 +---- 16 files changed, 711 insertions(+), 758 deletions(-) commit 27221f2673d01fde2eb7aa2da3e31835bcd74ae0 Author: Yoann Vandoorselaere Date: Thu Jan 3 00:07:52 2002 +0000 * src/prelude-client-mgr.c (secure_open): avoid symlink attack as much as possible. There is still a race condition because we are working with 'possibly persistant file' and there is no way to open a file that already exist securely (without truncating it or deleting it). git-svn-id: file:///home/yoann/SVN/trunk/libprelude@478 09c5ec92-17d4-0310-903a-819935f44dba ChangeLog | 8 ++++ src/prelude-client-mgr.c | 93 +++++++++++++++++++++++++++++++++------------ 2 files changed, 76 insertions(+), 25 deletions(-) commit 81bc89f0380ba6d504741dbd9529ccc21f0393ed Author: Yoann Vandoorselaere Date: Wed Jan 2 18:54:46 2002 +0000 *** empty log message *** git-svn-id: file:///home/yoann/SVN/trunk/libprelude@475 09c5ec92-17d4-0310-903a-819935f44dba sensors-default.conf | 16 ++++++++++++++++ 1 files changed, 16 insertions(+), 0 deletions(-) commit e90f4b0dfa6b45b77f7b8c07a73fb464710a4eb7 Author: Yoann Vandoorselaere Date: Wed Jan 2 18:54:11 2002 +0000 * src/sensor.c (parse_argument): cleanup. Use generic sensor configuration file when needed. * src/prelude-getopt.c (get_missing_options): cleanup. (prelude_option_parse_arguments): only try to get missing option from configuration file if filename is not NULL. * src/prelude-client-mgr.c (parse_config_line): fix case were existing backup wouldn't be flushed. * Makefile.am (install-data-hook): create the config directory, (755), spool directory (1733, for any sensor to be able to fallback to writing to a file). Install a default configuration file, to be used the application doesn't specify one. * src/prelude-getopt.c (prelude_option_parse_arguments): only try to get missing option from configuration file if filename is not NULL. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@474 09c5ec92-17d4-0310-903a-819935f44dba ChangeLog | 23 +++++++++++++ Makefile.am | 11 ++++++ src/config-engine.c | 3 -- src/prelude-client-mgr.c | 80 ++++++++++++++++++++++++++++----------------- src/prelude-getopt.c | 37 ++++++++++++-------- src/sensor.c | 65 +++++++++++++++++++++++++++---------- src/ssl.c | 2 +- 7 files changed, 155 insertions(+), 66 deletions(-) commit 1a587907de1850f5d612a71f04c83e1c0106c056 Author: Yoann Vandoorselaere Date: Wed Jan 2 15:33:11 2002 +0000 * src/sensor.c (setup_manager_addr): no need to duplicate optarg. * src/prelude-auth.c (prelude_auth_create_account): free client address string. (prelude_auth_send): ditto. * configure.ac: add -O0 -pg to CFLAGS if profiling is enabled. * src/config-engine.c (load_file_in_memory): handle fopen error correctly. * src/prelude-client-mgr.c: use two different file descriptor referencing the same backup file. One is open for writing, in O_APPEND mode. So the file won't get corrupted if different process are writing to it at the same time (write are atomic). (BACKUP_DIR): now /var/spool/prelude This forbid us to use the same file descriptor for reading. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@473 09c5ec92-17d4-0310-903a-819935f44dba ChangeLog | 23 ++++++++++ configure.ac | 2 +- docs/api/libprelude-decl.txt | 13 ++---- src/config-engine.c | 9 +++- src/prelude-auth.c | 4 +- src/prelude-client-mgr.c | 95 ++++++++++++++++++++++++++++++------------ src/sensor.c | 9 ++-- 7 files changed, 111 insertions(+), 44 deletions(-) commit f8c97c8e7df4ba8a9f0a46f1e6ae0df18ad55805 Author: Yoann Vandoorselaere Date: Sun Dec 30 12:07:27 2001 +0000 *** empty log message *** git-svn-id: file:///home/yoann/SVN/trunk/libprelude@470 09c5ec92-17d4-0310-903a-819935f44dba src/include/threads.h | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) commit b300259fc8f6c04285d4503de81eb78fdbccc0fb Author: Yoann Vandoorselaere Date: Sun Dec 30 12:05:32 2001 +0000 *** empty log message *** git-svn-id: file:///home/yoann/SVN/trunk/libprelude@469 09c5ec92-17d4-0310-903a-819935f44dba docs/api/libprelude-decl.txt | 59 +++++++++++++++++++---------------------- src/include/threads.h | 4 +- 2 files changed, 29 insertions(+), 34 deletions(-) commit 54034fc10ed657f6c1ca437d3e8ba8fac20b8295 Author: Yoann Vandoorselaere Date: Sun Dec 30 11:55:25 2001 +0000 * src/include/threads.h: workaround for thread enabled thread profiling. This code come from http://sam.zoy.org/doc/programming/gprof.html The authors is presumably Samuel Hocevar . Only enabled if --enable-profiling is given on command line * Added missing CREDITS file, taken from prelude-nids and updated with the necessary entry. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@466 09c5ec92-17d4-0310-903a-819935f44dba CREDITS | 5 ++ ChangeLog | 6 +++ acconfig.h | 1 + configure.ac | 16 ++++++- src/include/Makefile.am | 3 +- src/include/threads.h | 110 +++++++++++++++++++++++++++++++++++++++++++++++ src/prelude-async.c | 2 + 7 files changed, 141 insertions(+), 2 deletions(-) commit 9e981a42d2233a985abf523e398c330668bd2717 Author: Yoann Vandoorselaere Date: Sun Dec 30 10:08:38 2001 +0000 * Added missing CREDITS file, taken from prelude-nids and updated with the necessary entry. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@460 09c5ec92-17d4-0310-903a-819935f44dba CREDITS | 24 ++++++++++++++++++++++++ ChangeLog | 5 +++++ 2 files changed, 29 insertions(+), 0 deletions(-) commit a57a258f15e98bd5d53bb20565c3e93d656e6a76 Author: Yoann Vandoorselaere Date: Sun Dec 30 10:06:12 2001 +0000 *** empty log message *** git-svn-id: file:///home/yoann/SVN/trunk/libprelude@459 09c5ec92-17d4-0310-903a-819935f44dba AUTHORS | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) commit 2db74038f30a327f7d9b970dd60596494ae6c127 Author: Krzysztof Zaraska Date: Sun Dec 30 09:43:35 2001 +0000 FreeBSD compatibility fixes git-svn-id: file:///home/yoann/SVN/trunk/libprelude@457 09c5ec92-17d4-0310-903a-819935f44dba ChangeLog | 12 ++++++++++++ sensor-adduser/sensor-adduser.c | 1 + src/include/list.h | 16 ++++++++++++++++ src/prelude-getopt.c | 1 + src/prelude-message.c | 1 + 5 files changed, 31 insertions(+), 0 deletions(-) commit 89a3bbb9135069e0af7e7f0f7a651f4fad9bfdd8 Author: Yoann Vandoorselaere Date: Sat Dec 29 20:36:59 2001 +0000 * src/sensor.c (parse_argument): set warning flags to 0 before internally parsing argument to see if libprelude option were passed. Then restore the old warnings flags. * src/prelude-getopt.c (option_err): new function only print error if the passed flag is set in the global flags. * src/sensor.c (parse_argument): When parsing our own (libprelude) option set, don't print warning about unknow option which can be option from the sensor that initialise us. * src/prelude-getopt.c (prelude_option_set_warnings): new function. Set/Get current warning flags for option parsing. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@456 09c5ec92-17d4-0310-903a-819935f44dba ChangeLog | 16 +++++++++++ src/include/prelude-getopt.h | 5 +++ src/prelude-getopt.c | 58 ++++++++++++++++++++++++++++++++--------- src/sensor.c | 18 +++++++++++- 4 files changed, 82 insertions(+), 15 deletions(-) commit 3caf3f93fba41dc59e1e744cd45ef58c6002a5f9 Author: Yoann Vandoorselaere Date: Fri Dec 28 14:15:56 2001 +0000 *** empty log message *** git-svn-id: file:///home/yoann/SVN/trunk/libprelude@445 09c5ec92-17d4-0310-903a-819935f44dba src/common.c | 22 ++++++++++++++++++++++ src/include/prelude-ident.h | 22 ++++++++++++++++++++++ src/include/prelude-message-id.h | 22 ++++++++++++++++++++++ src/prelude-ident.c | 22 ++++++++++++++++++++++ 4 files changed, 88 insertions(+), 0 deletions(-) commit 48bfd47cc367b776fd853bc6d157e7a778c02cf3 Author: Yoann Vandoorselaere Date: Fri Dec 28 12:24:56 2001 +0000 *** empty log message *** git-svn-id: file:///home/yoann/SVN/trunk/libprelude@441 09c5ec92-17d4-0310-903a-819935f44dba docs/api/libprelude-decl.txt | 7 ++++- docs/api/tmpl/daemonize.sgml | 9 ------ docs/api/tmpl/libprelude-unused.sgml | 8 ++++++ src/daemonize.c | 2 +- src/include/sensor.h | 3 ++ src/prelude-auth.c | 46 ---------------------------------- src/prelude-client.c | 2 +- 7 files changed, 19 insertions(+), 58 deletions(-) commit f3b027d26c07e5d4c4f0b278344b200eb6a3be7a Author: Yoann Vandoorselaere Date: Fri Dec 28 12:21:24 2001 +0000 * src/plugin-common.c (plugin_print_stats): remove \t that was putting garbage in syslog logfile. * src/common.c (prelude_log_set_prefix): (standard_log): (syslog_log): new function that allow to set a global prefix to all prelude_log() call. Passing NULL to prelude_log_set_prefix() remove the prefix. * src/daemonize.c (prelude_daemonize): renamed to prelude_daemonize(). Comment the function. Also, if requested, create an exclusive lockfile held until program exit. * src/prelude-message.c (read_message_content): comment why we return prelude_msg_error if we get an EOF in the middle of a message. (prelude_msg_read): free message on error / eof. * src/prelude-client.c (handle_plaintext_connection): (handle_ssl_connection): (start_inet_connection): (start_unix_connection): fit API change. * src/prelude-client-mgr.c (setup_backup_fd): * src/prelude-io.c (prelude_io_set_file_io): now correspond to libc buffered I/O. (prelude_io_set_sys_io): renamed from set_network_io(). git-svn-id: file:///home/yoann/SVN/trunk/libprelude@440 09c5ec92-17d4-0310-903a-819935f44dba ChangeLog | 35 +++++++++++ docs/api/libprelude-decl.txt | 36 ++++------- docs/api/tmpl/libprelude-unused.sgml | 8 +++ docs/api/tmpl/prelude-io.sgml | 9 --- sensor-adduser/ssl-register.c | 2 +- src/common.c | 46 +++++++++++--- src/daemonize.c | 111 +++++++++++++++++++++++++++++----- src/include/common.h | 11 ++++ src/include/daemonize.h | 2 +- src/include/plugin-common-prv.h | 3 +- src/plugin-common.c | 15 ++--- 11 files changed, 207 insertions(+), 71 deletions(-) commit 3b6e645896478bf2a74217f3c3b7e037b6b0efc3 Author: Yoann Vandoorselaere Date: Fri Dec 28 10:14:14 2001 +0000 * src/prelude-message.c (read_message_content): comment why we return prelude_msg_error if we get an EOF in the middle of a message. (prelude_msg_read): free message on error / eof. * src/prelude-client.c (handle_plaintext_connection): (handle_ssl_connection): (start_inet_connection): (start_unix_connection): fit API change. * src/prelude-client-mgr.c (setup_backup_fd): * src/prelude-io.c (prelude_io_set_file_io): now correspond to libc buffered I/O. (prelude_io_set_sys_io): renamed from set_network_io(). git-svn-id: file:///home/yoann/SVN/trunk/libprelude@437 09c5ec92-17d4-0310-903a-819935f44dba src/include/prelude-io.h | 4 +- src/prelude-client-mgr.c | 2 +- src/prelude-client.c | 6 +- src/prelude-io.c | 123 +++++++++++++++++++++++++--------------------- src/prelude-message.c | 22 ++++++-- 5 files changed, 89 insertions(+), 68 deletions(-) commit fcf95a6f22c1f9e1f9edfc2195ce090725d22a97 Author: Yoann Vandoorselaere Date: Thu Dec 27 18:22:56 2001 +0000 * src/include/prelude-message.h: * src/prelude-message.c: new type: prelude_msg_status_t returned by prelude_msg_read. This make the handling of the return value easier. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@436 09c5ec92-17d4-0310-903a-819935f44dba ChangeLog | 7 + configure.ac | 6 +- docs/api/libprelude-decl.txt | 277 ++++++++++++++++++++++++++++----- docs/api/tmpl/idmef-message-id.sgml | 21 --- docs/api/tmpl/idmef-tree.sgml | 1 + docs/api/tmpl/libprelude-unused.sgml | 18 +++ src/include/prelude-message.h | 10 +- src/prelude-message.c | 30 ++-- 8 files changed, 288 insertions(+), 82 deletions(-) commit 6e9226cd3dc8f73f815ddc892b5937bbb036081b Author: Yoann Vandoorselaere Date: Wed Dec 26 15:58:07 2001 +0000 * src/include/idmef-tree.h: ident members are all uint64_t. Add missing IDMEF stuff. * src/include/idmef-message-id.h: more work toward full IDMEF compliance. * src/prelude-auth.c (read_auth_result): Handle case where prelude_io_read_delimited() return 0. This fix a possible crash. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@430 09c5ec92-17d4-0310-903a-819935f44dba ChangeLog | 11 ++++ src/include/idmef-message-id.h | 59 ++++++++++++++++++-- src/include/idmef-tree.h | 117 ++++++++++++++++++++++++++++------------ src/prelude-auth.c | 2 +- 4 files changed, 148 insertions(+), 41 deletions(-) commit f55c1ba809cf13d51729b5ec7346a58a59f84081 Author: Yoann Vandoorselaere Date: Wed Dec 19 16:02:31 2001 +0000 * src/sensor.c (parse_argument): manager address is a wide option. (prelude_sensor_get_option_msg): return the wide option message for our wide option set. * src/prelude-io.c (prelude_io_read_wait): use poll() in order to wait data. This also fix a bug where we were returning 0 even if we couldn't read the specified amount of bytes. * src/prelude-getopt.c (prelude_option_wide_add): (prelude_option_new): compute message len on each wide option add. (prelude_option_wide_get_msg): generate, and cache a message containing all the wide option. * src/prelude-client.c (prelude_client_connect): send wide option message on connect. * src/prelude-async.c (async_thread): don't catch signals. * configure.ac (CFLAGS): add -DREENTRANT to cflags. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@426 09c5ec92-17d4-0310-903a-819935f44dba ChangeLog | 23 +++++++++ configure.ac | 2 +- docs/api/libprelude-decl.txt | 94 ++++++++++++++++++++++++++++++++++++- src/include/Makefile.am | 2 + src/include/prelude-getopt-wide.h | 15 ++++++ src/include/prelude-getopt.h | 4 +- src/include/prelude-message-id.h | 6 ++ src/prelude-async.c | 14 ++++++ src/prelude-client.c | 6 ++- src/prelude-getopt.c | 82 +++++++++++++++++++++++++++++++- src/prelude-io.c | 11 ++++ src/prelude-message.c | 2 +- src/sensor.c | 8 ++- 13 files changed, 261 insertions(+), 8 deletions(-) commit b3b72f7726e9c9acf54a8d2eff64f048e5e793d3 Author: Yoann Vandoorselaere Date: Fri Dec 14 11:39:09 2001 +0000 * src/prelude-ident.c (setup_filedes_if_needed): new function. Correctly setup filed. Will avoid SIGBUS. * src/include/idmef-tree.h: ident is a 64 bit unsigned integer. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@422 09c5ec92-17d4-0310-903a-819935f44dba ChangeLog | 5 ++++ src/include/idmef-tree.h | 2 +- src/prelude-ident.c | 52 +++++++++++++++++++++++++++++++++++++++------ 3 files changed, 51 insertions(+), 8 deletions(-) commit c5ea2e44d4e25cbed7fec69907cbe74bde99e5ab Author: Yoann Vandoorselaere Date: Fri Dec 14 10:45:23 2001 +0000 * src/include/prelude-ident.h: * src/prelude-ident.c: new ident API. Use to generate unique 64 bits ident, remembered across program run (usage of memory mapped IO). git-svn-id: file:///home/yoann/SVN/trunk/libprelude@421 09c5ec92-17d4-0310-903a-819935f44dba ChangeLog | 6 ++ src/Makefile.am | 1 + src/include/Makefile.am | 1 + src/include/prelude-ident.h | 10 ++++ src/prelude-ident.c | 123 +++++++++++++++++++++++++++++++++++++++++++ 5 files changed, 141 insertions(+), 0 deletions(-) commit 4d7b2a39406d3ef5095d24aff8c4ad9d5aa2428f Author: Yoann Vandoorselaere Date: Thu Dec 13 14:40:33 2001 +0000 * sensor-adduser/Makefile.am: * src/Makefile.am: * configure.ac: Fix : sensor-adduser doesn't compile without OpenSSL. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@420 09c5ec92-17d4-0310-903a-819935f44dba ChangeLog | 7 +++++++ configure.ac | 9 +++++---- sensor-adduser/Makefile.am | 6 +++++- src/Makefile.am | 2 +- 4 files changed, 18 insertions(+), 6 deletions(-) commit 8d815c561029d49a7b0e4fbdbf379d547cb6aeda Author: Banux Date: Thu Dec 13 13:58:52 2001 +0000 debian package git-svn-id: file:///home/yoann/SVN/trunk/libprelude@419 09c5ec92-17d4-0310-903a-819935f44dba debian/README.Debian | 6 ++ debian/changelog | 9 +++ debian/control | 46 +++++++++++++++ debian/copyright | 26 ++++++++ debian/libprelude-dev.dirs | 2 + debian/libprelude-dev.files | 3 + debian/libprelude-dev.postinst.debhelper | 7 ++ debian/libprelude-dev.prerm.debhelper | 5 ++ debian/libprelude1.dirs | 1 + debian/libprelude1.files | 1 + debian/libprelude1.postinst.debhelper | 7 ++ debian/libprelude1.prerm.debhelper | 5 ++ debian/rules | 94 ++++++++++++++++++++++++++++++ 13 files changed, 212 insertions(+), 0 deletions(-) commit c159c816ff5b79a6365312a1160bde72d17511c3 Author: Yoann Vandoorselaere Date: Wed Dec 12 17:22:14 2001 +0000 * src/prelude-client-mgr.c (prelude_client_mgr_broadcast): (walk_manager_lists): correct warning emmission in case a Manager (or rule of Manager) goes down. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@415 09c5ec92-17d4-0310-903a-819935f44dba ChangeLog | 6 ++++++ src/prelude-client-mgr.c | 12 +++++++----- 2 files changed, 13 insertions(+), 5 deletions(-) commit 8e88dd71b7c1a42639e905765c55f951a87fa379 Author: Yoann Vandoorselaere Date: Tue Dec 11 15:20:16 2001 +0000 * src/sensor.c: include ssl.h only if HAVE_SSL is defined. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@414 09c5ec92-17d4-0310-903a-819935f44dba ChangeLog | 2 ++ src/sensor.c | 2 +- 2 files changed, 3 insertions(+), 1 deletions(-) commit bde11cdc40cd459aec0d8ac797bff51bc775afe1 Author: Yoann Vandoorselaere Date: Tue Dec 11 12:12:12 2001 +0000 *** empty log message *** git-svn-id: file:///home/yoann/SVN/trunk/libprelude@413 09c5ec92-17d4-0310-903a-819935f44dba docs/api/Makefile.am | 1 + docs/api/libprelude-decl.txt | 25 +++------------ docs/api/libprelude-sections.txt | 6 ---- docs/api/tmpl/libprelude-unused.sgml | 53 +++++++++++++++++++++++++++++++++ docs/api/tmpl/prelude-async.sgml | 3 +- docs/api/tmpl/prelude-client-mgr.sgml | 9 ----- docs/api/tmpl/prelude-client.sgml | 11 ------- docs/api/tmpl/thread.sgml | 17 ---------- src/include/Makefile.am | 3 ++ 9 files changed, 64 insertions(+), 64 deletions(-) commit b35dd8f53d05b2dd0599e039749f2a715ab79fd8 Author: Yoann Vandoorselaere Date: Tue Dec 11 11:59:06 2001 +0000 *** empty log message *** git-svn-id: file:///home/yoann/SVN/trunk/libprelude@412 09c5ec92-17d4-0310-903a-819935f44dba Makefile.am | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) commit 254501a7b67b07aef9e590b4f804860fe5fc48ef Author: Yoann Vandoorselaere Date: Tue Dec 11 11:55:43 2001 +0000 Reverting wrong commit. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@411 09c5ec92-17d4-0310-903a-819935f44dba src/Makefile.am | 3 +- src/include/Makefile.am | 3 +- src/include/prelude-async.h | 9 +--- src/include/prelude-client-mgr.h | 3 - src/include/prelude-client.h | 4 +- src/prelude-async.c | 103 +++++-------------------------------- src/prelude-client-mgr.c | 42 --------------- src/prelude-client.c | 28 +---------- src/sensor.c | 26 +--------- 9 files changed, 22 insertions(+), 199 deletions(-) commit 565e68c036086750370324d6c7aa344e9b3fcdc0 Author: Yoann Vandoorselaere Date: Tue Dec 11 11:47:01 2001 +0000 *** empty log message *** git-svn-id: file:///home/yoann/SVN/trunk/libprelude@410 09c5ec92-17d4-0310-903a-819935f44dba docs/api/libprelude-docs.sgml | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) commit e77595c71e5d665e8b00b82c6e9bcb3d0cafe552 Author: Yoann Vandoorselaere Date: Tue Dec 11 11:36:09 2001 +0000 *** empty log message *** git-svn-id: file:///home/yoann/SVN/trunk/libprelude@409 09c5ec92-17d4-0310-903a-819935f44dba docs/api/Makefile.am | 2 +- docs/api/libprelude-decl.txt | 1465 +++++++++++++++++++++++++++++++ docs/api/libprelude-docs.sgml | 65 ++ docs/api/libprelude-sections.txt | 365 ++++++++ docs/api/tmpl/common.sgml | 63 ++ docs/api/tmpl/config-engine.sgml | 58 ++ docs/api/tmpl/config.sgml | 16 + docs/api/tmpl/daemonize.sgml | 25 + docs/api/tmpl/getopt_long.sgml | 16 + docs/api/tmpl/idmef-message-id.sgml | 534 +++++++++++ docs/api/tmpl/idmef-tree.sgml | 255 ++++++ docs/api/tmpl/libmissing.sgml | 16 + docs/api/tmpl/libprelude-unused.sgml | 299 +++++++ docs/api/tmpl/list.sgml | 66 ++ docs/api/tmpl/plugin-common-prv.sgml | 100 +++ docs/api/tmpl/plugin-common.sgml | 162 ++++ docs/api/tmpl/prelude-async.sgml | 63 ++ docs/api/tmpl/prelude-auth.sgml | 61 ++ docs/api/tmpl/prelude-client-mgr.sgml | 53 ++ docs/api/tmpl/prelude-client.sgml | 75 ++ docs/api/tmpl/prelude-getopt.sgml | 128 +++ docs/api/tmpl/prelude-io.sgml | 145 +++ docs/api/tmpl/prelude-list.sgml | 38 + docs/api/tmpl/prelude-message.sgml | 184 ++++ docs/api/tmpl/sensor.sgml | 35 + docs/api/tmpl/ssl-gencrypto.sgml | 52 ++ docs/api/tmpl/ssl-register.sgml | 16 + docs/api/tmpl/ssl-registration-msg.sgml | 207 +++++ docs/api/tmpl/ssl.sgml | 61 ++ docs/api/tmpl/string-matching.sgml | 88 ++ docs/api/tmpl/thread.sgml | 33 + docs/api/tmpl/timer.sgml | 128 +++ docs/api/tmpl/variable.sgml | 44 + src/Makefile.am | 3 +- src/config-engine.c | 4 +- src/include/Makefile.am | 3 +- src/include/prelude-async.h | 9 +- src/include/prelude-client-mgr.h | 3 + src/include/prelude-client.h | 4 +- src/prelude-async.c | 103 ++- src/prelude-client-mgr.c | 42 + src/prelude-client.c | 28 +- src/sensor.c | 26 +- 43 files changed, 5118 insertions(+), 25 deletions(-) commit 8b431a22f6613cb4635fd3c4f32b3f6f4e3c3bab Author: Yoann Vandoorselaere Date: Tue Dec 11 03:25:55 2001 +0000 *** empty log message *** git-svn-id: file:///home/yoann/SVN/trunk/libprelude@407 09c5ec92-17d4-0310-903a-819935f44dba configure.ac | 2 +- docs/api/Makefile.am | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) commit 406947c1743ff82eafdc0c95f622a7e92beca5f3 Author: Yoann Vandoorselaere Date: Tue Dec 11 03:18:37 2001 +0000 *** empty log message *** git-svn-id: file:///home/yoann/SVN/trunk/libprelude@406 09c5ec92-17d4-0310-903a-819935f44dba src/common.c | 6 ++++++ src/include/common.h | 2 +- src/include/plugin-common-prv.h | 2 +- src/include/plugin-common.h | 2 +- src/include/prelude-getopt.h | 2 +- src/include/prelude-message.h | 6 +++--- src/plugin-common.c | 2 +- src/prelude-getopt.c | 23 +++++++++++++++-------- src/prelude-io.c | 13 ++++++------- 9 files changed, 35 insertions(+), 23 deletions(-) commit 917601dcd7a9005d54264868af419071b8857ed2 Author: Yoann Vandoorselaere Date: Tue Dec 11 01:09:29 2001 +0000 * configure.ac (COMMON_LIBS): applied patch from Krzysztof Zaraska ("use == operator for test in configure, but valid one is =") git-svn-id: file:///home/yoann/SVN/trunk/libprelude@404 09c5ec92-17d4-0310-903a-819935f44dba ChangeLog | 6 ++++++ configure.ac | 3 +++ 2 files changed, 9 insertions(+), 0 deletions(-) commit 4175394d7f0b122219a8ad21d0cf74976486d001 Author: Yoann Vandoorselaere Date: Mon Dec 10 15:27:16 2001 +0000 * src/common.c (syslog_log): we have to yse a buffer. (standard_log): use vfprintf(). git-svn-id: file:///home/yoann/SVN/trunk/libprelude@402 09c5ec92-17d4-0310-903a-819935f44dba ChangeLog | 5 +++++ src/common.c | 14 ++++++++++---- 2 files changed, 15 insertions(+), 4 deletions(-) commit c81779304760818b08f531679b1c934f6214af9f Author: Yoann Vandoorselaere Date: Sat Dec 8 02:09:44 2001 +0000 * src/include/plugin-common-prv.h (plugin_run_with_return_value): (plugin_run): specify the member to call in the macro call. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@395 09c5ec92-17d4-0310-903a-819935f44dba ChangeLog | 12 ++++++++++++ src/include/plugin-common-prv.h | 32 ++++++++++++++++---------------- 2 files changed, 28 insertions(+), 16 deletions(-) commit fe684d6f1eeefe61dd325ea7fb0f88faf9902fd0 Author: Yoann Vandoorselaere Date: Wed Dec 5 15:16:43 2001 +0000 * src/include/common.h (do_init_nofail): put back do_init / do_init_nofail macro. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@389 09c5ec92-17d4-0310-903a-819935f44dba ChangeLog | 3 +++ src/include/common.h | 11 +++++++++++ 2 files changed, 14 insertions(+), 0 deletions(-) commit 4dc89945e46090ba67580bccb8215c6e86739314 Author: Yoann Vandoorselaere Date: Wed Dec 5 14:54:45 2001 +0000 * src/prelude-getopt.c : Lot of work. Hierarchy of option should now work. Callback have a control over the argument parsing using their return value. A flag is now passed when adding an option, to tell if it is handled throught the command line interface or the configuration file or both. * src/prelude-getopt.c (lookup_variable_if_needed): Take the address of the optarg pointer as argument. Return 0 on success, -1 on error. * src/common.c: * src/include/common.h: Move the log macro code to the prelude_log function. The log macro still exist, and will pass the necessary parameter to prelude_log(). This avoid the logging code to be inlined in the calling function, which was bad because it was making the functions grew at the risk of not fitting the CPU cache anymore. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@385 09c5ec92-17d4-0310-903a-819935f44dba ChangeLog | 25 +++ src/Makefile.am | 3 +- src/common.c | 78 ++++++++++ src/include/common.h | 43 +----- src/include/prelude-getopt.h | 53 +++++-- src/prelude-async.c | 2 +- src/prelude-client.c | 1 + src/prelude-getopt.c | 339 ++++++++++++++++++++++++++++------------- src/sensor.c | 35 +++-- 9 files changed, 406 insertions(+), 173 deletions(-) commit 8b586ef72d335d979ddb6daf3b2ea2d6568ad5b8 Author: Yoann Vandoorselaere Date: Tue Nov 27 14:48:14 2001 +0000 * src/prelude-getopt.c (prelude_option_add): use list_add_tail (item were inserted in the wrong order). prelude_option_t now contain a list of option (prelude_optlist_t). (option_print): new function : print the option hierarchicaly. Start changing the interface in order to allow sub-options. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@379 09c5ec92-17d4-0310-903a-819935f44dba ChangeLog | 10 +++++++ src/include/prelude-getopt.h | 8 ++++-- src/prelude-getopt.c | 54 ++++++++++++++++++++++++++++------------- 3 files changed, 52 insertions(+), 20 deletions(-) commit 66a0af66215b5c99a17659997d6908fb74b8569c Author: Yoann Vandoorselaere Date: Mon Nov 26 18:15:37 2001 +0000 * src/prelude-getopt.c (handle_option): oops, reverted wrong fix, optarg is always returned and is never NULL. Removed un-needed if error prone. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@377 09c5ec92-17d4-0310-903a-819935f44dba ChangeLog | 6 ++++++ src/prelude-getopt.c | 4 +--- 2 files changed, 7 insertions(+), 3 deletions(-) commit a02989d796fce6aebd2da376bd767c8e21ff0a67 Author: Banux Date: Mon Nov 26 17:28:11 2001 +0000 oops typo require_argument must be required_argument git-svn-id: file:///home/yoann/SVN/trunk/libprelude@376 09c5ec92-17d4-0310-903a-819935f44dba src/prelude-getopt.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) commit 28231008d3df0ff9266a61e0d85b613fb7a4161b Author: Banux Date: Mon Nov 26 17:24:00 2001 +0000 fix: callback is not exec if optarg is NULL even if optitem->has_arg is no_arguments git-svn-id: file:///home/yoann/SVN/trunk/libprelude@375 09c5ec92-17d4-0310-903a-819935f44dba ChangeLog | 3 +++ src/prelude-getopt.c | 2 +- 2 files changed, 4 insertions(+), 1 deletions(-) commit 6572d6994dfdeb56e867a68b3f7efa5a74f76ae2 Author: Yoann Vandoorselaere Date: Thu Nov 22 13:46:01 2001 +0000 * src/include/idmef-tree.h: Pid is a 32 bit integer. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@374 09c5ec92-17d4-0310-903a-819935f44dba ChangeLog | 4 ++++ src/include/idmef-tree.h | 2 +- 2 files changed, 5 insertions(+), 1 deletions(-) commit cc4f2af80372db1f1ce8c7569d3cc779782e4a26 Author: Yoann Vandoorselaere Date: Wed Nov 21 16:31:25 2001 +0000 * src/prelude-message.c (prelude_msg_set): fix assert. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@373 09c5ec92-17d4-0310-903a-819935f44dba ChangeLog | 4 ++++ src/prelude-message.c | 4 ++-- 2 files changed, 6 insertions(+), 2 deletions(-) commit 19673b8b00641bd7b7f38bcbe4631b1823bddbca Author: Yoann Vandoorselaere Date: Wed Nov 21 15:10:14 2001 +0000 *** empty log message *** git-svn-id: file:///home/yoann/SVN/trunk/libprelude@372 09c5ec92-17d4-0310-903a-819935f44dba configure.ac | 18 ++++++++++++++++++ 1 files changed, 18 insertions(+), 0 deletions(-) commit ec2c3e009b84cfe1a12fda63a26272065dd76093 Author: Yoann Vandoorselaere Date: Mon Nov 19 17:18:35 2001 +0000 * src/prelude-async.c (wait_timer_and_data): use a while loop instead of tail recursivity for now as it might be the cause of a subtle bug. * configure.ac: * src/Makefile.am (libprelude_la_LIBADD): Add autoconf code to search pthread library. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@371 09c5ec92-17d4-0310-903a-819935f44dba ChangeLog | 10 ++++++++ configure.ac | 11 +++++++++ src/Makefile.am | 2 +- src/prelude-async.c | 60 +++++++++++++++++++++++++++----------------------- 4 files changed, 54 insertions(+), 29 deletions(-) commit 57ac6a7aee8279a7f9765ae759cfe12393edb5f3 Author: Yoann Vandoorselaere Date: Fri Nov 16 16:55:27 2001 +0000 *** empty log message *** git-svn-id: file:///home/yoann/SVN/trunk/libprelude@368 09c5ec92-17d4-0310-903a-819935f44dba src/include/idmef-tree.h | 40 ++++++++++++++++++++-------------------- 1 files changed, 20 insertions(+), 20 deletions(-) commit e83b3ac509d9223b39336fce2916052772a83767 Author: Yoann Vandoorselaere Date: Fri Nov 16 15:41:37 2001 +0000 *** empty log message *** git-svn-id: file:///home/yoann/SVN/trunk/libprelude@364 09c5ec92-17d4-0310-903a-819935f44dba src/include/Makefile.am | 1 - src/include/alert-id.h | 24 ------------------------ src/include/idmef-message-id.h | 5 +++++ 3 files changed, 5 insertions(+), 25 deletions(-) commit 4874f44a9ee39a42aba7039a56325a4bc56baa40 Author: Yoann Vandoorselaere Date: Fri Nov 16 13:31:39 2001 +0000 *** empty log message *** git-svn-id: file:///home/yoann/SVN/trunk/libprelude@359 09c5ec92-17d4-0310-903a-819935f44dba src/include/prelude-async.h | 22 ++++++++++++++++++++++ src/prelude-async.c | 22 ++++++++++++++++++++++ 2 files changed, 44 insertions(+), 0 deletions(-) commit 080f90096bf7eb834199e9f6859e0be4064c3b58 Author: Yoann Vandoorselaere Date: Fri Nov 16 13:28:17 2001 +0000 * src/include/idmef-tree.h: IDMEF structure. * src/include/idmef-message-id.h: ID for IDMEF based message. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@358 09c5ec92-17d4-0310-903a-819935f44dba ChangeLog | 5 + src/include/Makefile.am | 2 + src/include/idmef-message-id.h | 175 +++++++++++++++ src/include/idmef-tree.h | 455 ++++++++++++++++++++++++++++++++++++++++ 4 files changed, 637 insertions(+), 0 deletions(-) commit 350d11b024179ecd76b488e45dea7264d3468e4d Author: Yoann Vandoorselaere Date: Sat Nov 10 09:30:05 2001 +0000 * src/prelude-message.c: (read_message_header): (prelude_msg_get): (prelude_msg_write): (prelude_msg_set): use separate index for read / write. This allow us to send a just read messages. Forwarding between Manager is on it's way. * src/sensor.c (prelude_sensor_send_alert): use asynchrnous broadcasting. * src/prelude-client-mgr.c (walk_manager_lists): Never free the message ourself. This is up to the caller to do it. (broadcast_async_cb): (prelude_client_mgr_broadcast_async): When asynchronous operation are used, free the message ourself. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@348 09c5ec92-17d4-0310-903a-819935f44dba ChangeLog | 20 ++++++ src/include/prelude-client-mgr.h | 4 +- src/prelude-client-mgr.c | 37 +++++++---- src/prelude-message.c | 136 ++++++++++++++++++++++---------------- src/sensor.c | 2 +- 5 files changed, 129 insertions(+), 70 deletions(-) commit 5d64a3f307e285e3a94dd8ee62fc9bc94300049c Author: Yoann Vandoorselaere Date: Wed Nov 7 08:14:17 2001 +0000 *** empty log message *** git-svn-id: file:///home/yoann/SVN/trunk/libprelude@347 09c5ec92-17d4-0310-903a-819935f44dba src/prelude-async.c | 2 -- 1 files changed, 0 insertions(+), 2 deletions(-) commit ef2f59dbc32781064ff507d1bbf92cfe46a991cb Author: Yoann Vandoorselaere Date: Wed Nov 7 08:13:34 2001 +0000 (async_thread): Thread safety on list walking. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@346 09c5ec92-17d4-0310-903a-819935f44dba ChangeLog | 2 ++ src/prelude-async.c | 19 ++++++++++++++----- 2 files changed, 16 insertions(+), 5 deletions(-) commit 183b4c787022ec6496b675e1b520a5f866ea87b8 Author: Yoann Vandoorselaere Date: Wed Nov 7 08:06:49 2001 +0000 * src/prelude-async.c (get_elapsed_time): new function. (wait_timer_and_data): check the average time we spent waiting on the condition. (which may be > 1 second if the condition was signaled several time). * src/sensor.c: include prelude-list.h, not list.h git-svn-id: file:///home/yoann/SVN/trunk/libprelude@345 09c5ec92-17d4-0310-903a-819935f44dba ChangeLog | 9 +++++++++ src/include/timer.h | 2 +- src/prelude-async.c | 42 +++++++++++++++++++++++++++++++++++++----- src/sensor.c | 2 +- 4 files changed, 48 insertions(+), 7 deletions(-) commit b6b728ec56ca7bc94285ea3d88f460ef9b937cb3 Author: Yoann Vandoorselaere Date: Tue Nov 6 15:32:45 2001 +0000 *** empty log message *** git-svn-id: file:///home/yoann/SVN/trunk/libprelude@342 09c5ec92-17d4-0310-903a-819935f44dba src/sensor.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) commit a5f6f193832d04c4d5a0480c57cda9ee60dedc6b Author: Yoann Vandoorselaere Date: Tue Nov 6 15:32:08 2001 +0000 * src/prelude-client-mgr.c (prelude_client_mgr_broadcast_msg): make this function void. Set the message to be processed asynchronously. * src/sensor.c (prelude_sensor_init): Initialize the asynchronous subsystem. * src/prelude-message.c: prelude_message_t inherit of prelude_async_object_t capability. * src/timer.c: Thread safety. * src/prelude-async.c: New asynchronous queue implementation. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@341 09c5ec92-17d4-0310-903a-819935f44dba ChangeLog | 14 ++++ src/Makefile.am | 4 +- src/include/prelude-async.h | 42 +++++++++++++ src/include/prelude-client-mgr.h | 2 +- src/prelude-async.c | 127 ++++++++++++++++++++++++++++++++++++++ src/prelude-client-mgr.c | 87 ++++++++++++++++++-------- src/prelude-message.c | 9 ++- src/sensor.c | 16 +++-- src/timer.c | 71 ++++++++------------- 9 files changed, 288 insertions(+), 84 deletions(-) commit ad78e03cf4bc3fe4b233a94eb72217e6aab1d353 Author: Yoann Vandoorselaere Date: Mon Nov 5 13:42:07 2001 +0000 * src/prelude-client-mgr.c (prelude_client_mgr_broadcast_msg): Do not print that failsafe mode is enabled for each message. (broadcast_saved_message): print an error if message forwarding fail. (flush_backup_if_needed): ftruncate doesn't modify the file offset. Seek to the beginning of the file. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@336 09c5ec92-17d4-0310-903a-819935f44dba ChangeLog | 7 +++++++ src/prelude-client-mgr.c | 20 ++++++++++++++++---- 2 files changed, 23 insertions(+), 4 deletions(-) commit b6afb6fe1f333e57df652dd3185d28e8250a5e0d Author: Yoann Vandoorselaere Date: Mon Nov 5 13:14:38 2001 +0000 * src/prelude-client.c (prelude_client_connect): set the connection_broken member here. This'll avoid bug on reconnection. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@335 09c5ec92-17d4-0310-903a-819935f44dba ChangeLog | 4 ++++ sensor-adduser/sensor-adduser.c | 2 ++ sensor-adduser/ssl-register.c | 1 + src/prelude-client.c | 7 ++++++- 4 files changed, 13 insertions(+), 1 deletions(-) commit 7d795abcdfd3480d90105bbb5407c0e6e1e48d29 Author: Yoann Vandoorselaere Date: Mon Nov 5 12:43:23 2001 +0000 *** empty log message *** git-svn-id: file:///home/yoann/SVN/trunk/libprelude@334 09c5ec92-17d4-0310-903a-819935f44dba ChangeLog | 8 ++++++++ src/prelude-io.c | 15 ++++++++++----- 2 files changed, 18 insertions(+), 5 deletions(-) commit 2f1b7eb8c44c409a86600f889a61f1332c704e13 Author: Yoann Vandoorselaere Date: Mon Nov 5 08:59:30 2001 +0000 *** empty log message *** git-svn-id: file:///home/yoann/SVN/trunk/libprelude@333 09c5ec92-17d4-0310-903a-819935f44dba src/prelude-client.c | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) commit fbc5cd1a6c050db9dc5086602249945d4fde9248 Author: Yoann Vandoorselaere Date: Mon Nov 5 08:58:07 2001 +0000 * src/prelude-client.c Address member is not const anymore. (prelude_client_new): duplicate address string. (prelude_client_destroy): free address string. * src/prelude-io.c (copy_forward): forward data by chunk of 8192 bytes. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@332 09c5ec92-17d4-0310-903a-819935f44dba ChangeLog | 11 +++++++++++ src/prelude-client.c | 14 +++++++++++++- src/prelude-io.c | 25 +++++++++++++++++-------- 3 files changed, 41 insertions(+), 9 deletions(-) commit 91e15fb3b69c219f9fbc0e9ede5f64bfb723baad Author: Yoann Vandoorselaere Date: Tue Oct 30 18:35:06 2001 +0000 *** empty log message *** git-svn-id: file:///home/yoann/SVN/trunk/libprelude@330 09c5ec92-17d4-0310-903a-819935f44dba src/include/socket-op.h | 30 ----- src/socket-op.c | 327 ----------------------------------------------- 2 files changed, 0 insertions(+), 357 deletions(-) commit a0b05453516fd5bc7f3a2dabe17268f96723a6e5 Author: Yoann Vandoorselaere Date: Tue Oct 30 18:33:54 2001 +0000 * src/prelude-io.c: compile properly even if SSL is not available. * src/prelude-client-mgr.c (parse_config_string): new function, stop using strtok() which doesn't really fit our need. This also fix a bug where another NULL client would be added causing AND of client emission to fail. * sensor-adduser/sensor-adduser.c (main): Handle case where SSL is not installed. * src/prelude-auth.c: Modify to work with a prelude-io object. * src/prelude-client.c: Fit prelude-auth API change. * src/Makefile.am (libprelude_la_SOURCES): * src/include/Makefile.am (include_HEADERS): remove socket-op.h and socket-op.c, it is obsoleted by the prelude-io API. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@329 09c5ec92-17d4-0310-903a-819935f44dba ChangeLog | 23 ++++++++ sensor-adduser/sensor-adduser.c | 13 ++++- src/Makefile.am | 1 - src/include/Makefile.am | 1 - src/include/prelude-auth.h | 4 +- src/prelude-auth.c | 113 ++++++++++++++++++-------------------- src/prelude-client-mgr.c | 64 +++++++++++++++------- src/prelude-client.c | 18 ++++--- src/prelude-io.c | 4 ++ 9 files changed, 149 insertions(+), 92 deletions(-) commit 547e39171b1f5aed4377dbc16de4b8a6defcba43 Author: Yoann Vandoorselaere Date: Thu Oct 25 15:28:27 2001 +0000 * src/sensor.c: remove the prelude_sensor_t private structure. We don't need it anymore. Add a global pointer on a Manager list. (setup_manager_addr): fit the new clients managers API. * src/prelude-client.c: remove reconnection / failsafe (message backup) code. This is moved to prelude-client-mgr.c (prelude_client_new): Ignore the SIGPIPE signal (we'll check at the write return value thought). Support for Manager implicitly closing the connection should be improved thought. (prelude_client_new): Do not connect here. (prelude_client_connect): new function, connect here. (prelude_client_get_address): new function, get the address / port associated with a prelude_client_t object. Change Prelude Report to Prelude Manager in several place. * sensor-adduser/sensor-adduser.c: we don't need networking header here. * src/prelude-client-mgr.c: Finish the implementation of the clients manager. Have to beautify and comment the code a little more thought. Parsing of the configuration line should probably be more robust too. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@328 09c5ec92-17d4-0310-903a-819935f44dba ChangeLog | 28 +++ sensor-adduser/sensor-adduser.c | 10 +- src/include/prelude-client-mgr.h | 10 +- src/include/prelude-client.h | 8 + src/prelude-client-mgr.c | 462 ++++++++++++++++++++++++++++++++++---- src/prelude-client.c | 82 +++----- src/prelude-io.c | 2 +- src/sensor.c | 46 +--- 8 files changed, 509 insertions(+), 139 deletions(-) commit 462c524efed7d98de626b5eedfe97688c9405969 Author: Yoann Vandoorselaere Date: Tue Oct 23 14:18:23 2001 +0000 *** empty log message *** git-svn-id: file:///home/yoann/SVN/trunk/libprelude@324 09c5ec92-17d4-0310-903a-819935f44dba sensor-adduser/Makefile.am | 5 +++-- 1 files changed, 3 insertions(+), 2 deletions(-) commit a32c448911ded6707b663473262002b3c3e495dc Author: Yoann Vandoorselaere Date: Thu Oct 18 10:44:21 2001 +0000 * src/prelude-message.c (prelude_msg_read): Changed message reading API. This function shoud *never* block, even if a message isn't available for reading. * src/prelude-io.c (prelude_io_read_wait): new function. (prelude_io_read): do not wait for data to arrive. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@317 09c5ec92-17d4-0310-903a-819935f44dba ChangeLog | 9 +++ src/include/prelude-io.h | 6 ++- src/include/prelude-message.h | 14 +---- src/prelude-io.c | 108 ++++++++++++++++------------ src/prelude-message.c | 161 ++++++++++++++++++----------------------- 5 files changed, 147 insertions(+), 151 deletions(-) commit aade06b44130a41ba33c327dabb7d513dd2b00cb Author: Yoann Vandoorselaere Date: Tue Oct 16 11:02:22 2001 +0000 *** empty log message *** git-svn-id: file:///home/yoann/SVN/trunk/libprelude@316 09c5ec92-17d4-0310-903a-819935f44dba src/prelude-io.c | 7 +++++-- 1 files changed, 5 insertions(+), 2 deletions(-) commit 9eb6dab93dca5fe7c25fd6c94667379b55cb2c5b Author: Yoann Vandoorselaere Date: Tue Oct 16 10:48:17 2001 +0000 *** empty log message *** git-svn-id: file:///home/yoann/SVN/trunk/libprelude@315 09c5ec92-17d4-0310-903a-819935f44dba src/prelude-auth.c | 4 ---- src/prelude-client.c | 2 +- 2 files changed, 1 insertions(+), 5 deletions(-) commit 9fd63e5ba8629b304b73c9d237bca6b71d82f62d Author: Yoann Vandoorselaere Date: Tue Oct 16 10:21:23 2001 +0000 *** empty log message *** git-svn-id: file:///home/yoann/SVN/trunk/libprelude@313 09c5ec92-17d4-0310-903a-819935f44dba src/alert-read.c | 136 --------------- src/auth-common.c | 418 ---------------------------------------------- src/include/alert-read.h | 40 ----- 3 files changed, 0 insertions(+), 594 deletions(-) commit 6dfaa297afe7d53d2c5b1acac63fc958ec7b1792 Author: Yoann Vandoorselaere Date: Tue Oct 16 10:04:58 2001 +0000 *** empty log message *** git-svn-id: file:///home/yoann/SVN/trunk/libprelude@309 09c5ec92-17d4-0310-903a-819935f44dba sensor-adduser/ssl-register.c | 28 ++++++++++++++++++++++++++++ sensor-adduser/ssl-register.h | 23 +++++++++++++++++++++++ 2 files changed, 51 insertions(+), 0 deletions(-) commit ba3b352c8a53b831a2280a710b5fa37adf33cea3 Author: Yoann Vandoorselaere Date: Tue Oct 16 09:58:25 2001 +0000 *** empty log message *** git-svn-id: file:///home/yoann/SVN/trunk/libprelude@308 09c5ec92-17d4-0310-903a-819935f44dba sensor-adduser/Makefile.am | 8 + sensor-adduser/sensor-adduser.c | 65 ++++++++ sensor-adduser/ssl-register.c | 291 ++++++++++++++++++++++++++++++++++++ sensor-adduser/ssl-register.h | 1 + src/include/prelude-auth.h | 24 +++- src/include/prelude-client-mgr.h | 22 +++ src/include/prelude-client.h | 22 +++ src/include/prelude-getopt.h | 22 +++ src/include/prelude-io.h | 22 +++ src/include/prelude-list.h | 22 +++ src/include/sensor.h | 22 +++ src/include/ssl-registration-msg.h | 2 + src/prelude-auth.c | 2 +- src/prelude-client-mgr.c | 22 +++ src/prelude-getopt.c | 22 +++ src/prelude-io.c | 22 +++ src/sensor.c | 1 - src/ssl.c | 23 +++ 18 files changed, 612 insertions(+), 3 deletions(-) commit 5de9484fd782b294d14db0a3f125aa32c9d500d9 Author: Yoann Vandoorselaere Date: Tue Oct 16 09:40:21 2001 +0000 *** empty log message *** git-svn-id: file:///home/yoann/SVN/trunk/libprelude@307 09c5ec92-17d4-0310-903a-819935f44dba src/include/Makefile.am | 1 - src/include/auth-common.h | 61 ----- src/prelude-auth.c | 653 +++++++++++++++++++++++++++++++++++++++++++++ src/prelude-getopt.c | 346 ++++++++++++++++++++++++ src/ssl.c | 119 ++++++++ 5 files changed, 1118 insertions(+), 62 deletions(-) commit 52520ba30c3e9237ea74e173e9e6d445ee47d4aa Author: Yoann Vandoorselaere Date: Tue Oct 16 09:34:17 2001 +0000 *** empty log message *** git-svn-id: file:///home/yoann/SVN/trunk/libprelude@306 09c5ec92-17d4-0310-903a-819935f44dba src/include/prelude-auth.h | 9 + src/include/prelude-client-mgr.h | 3 + src/include/prelude-client.h | 8 + src/include/prelude-getopt.h | 38 +++ src/include/prelude-list.h | 35 +++ src/include/prelude-message.h | 77 ++++++ src/include/sensor.h | 4 + src/include/ssl-config.h | 49 ---- src/include/ssl.h | 39 +++ src/prelude-client-mgr.c | 97 ++++++++ src/prelude-client.c | 474 +++++++++++++++++++++++++++++++++++++ src/prelude-message.c | 485 ++++++++++++++++++++++++++++++++++++++ src/sensor.c | 178 ++++++++++++++ src/ssl-config.c | 94 -------- 14 files changed, 1447 insertions(+), 143 deletions(-) commit 99f92ffc5d1189f030f55d42152ef7aeaf7a7790 Author: Yoann Vandoorselaere Date: Tue Oct 16 09:11:50 2001 +0000 * A lot of modification. Complete API change, use OOP model in non time critical place for maintainability reason. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@305 09c5ec92-17d4-0310-903a-819935f44dba ChangeLog | 6 + Makefile.am | 5 +- configure.ac | 7 +- src/Makefile.am | 15 +- src/include/Makefile.am | 16 +- src/include/common.h | 5 + src/include/list.h | 1 + src/include/prelude-io.h | 18 ++- src/include/ssl-gencrypto.h | 4 +- src/include/ssl-registration-msg.h | 10 + src/prelude-io.c | 396 +++++++++++++++++++++++++++++------- src/ssl-gencrypto.c | 70 ++++++- src/ssl-registration-msg.c | 152 ++++++++++---- 13 files changed, 569 insertions(+), 136 deletions(-) commit b2acb9fd684cce8c20913c6d0cef3f9329a12b87 Author: Yoann Vandoorselaere Date: Mon Oct 8 23:14:40 2001 +0000 * src/include/prelude-io.h: * src/prelude-io.c: New standard / SSL - read / write / close abstraction. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@304 09c5ec92-17d4-0310-903a-819935f44dba ChangeLog | 8 ++ src/Makefile.am | 3 +- src/include/prelude-io.h | 26 +++++ src/prelude-io.c | 262 ++++++++++++++++++++++++++++++++++++++++++++++ 4 files changed, 298 insertions(+), 1 deletions(-) commit bb53409119ee97097aa008fae8eebdd27baaa64e Author: Yoann Vandoorselaere Date: Fri Oct 5 14:18:04 2001 +0000 * src/auth-common.c (write_account): better error reporting. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@298 09c5ec92-17d4-0310-903a-819935f44dba ChangeLog | 4 ++++ src/auth-common.c | 2 +- 2 files changed, 5 insertions(+), 1 deletions(-) commit c8a4684ff03366ed3d0d7eb18df9b382bb229da9 Author: Yoann Vandoorselaere Date: Wed Oct 3 12:22:26 2001 +0000 * src/alert-read.c (prelude_alert_read): fd is a pointer on a private structure to be passed to the read function cb. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@292 09c5ec92-17d4-0310-903a-819935f44dba ChangeLog | 6 ++++++ src/alert-read.c | 8 ++++---- src/include/alert-read.h | 4 ++-- 3 files changed, 12 insertions(+), 6 deletions(-) commit d369ccfe54760276bc2ae8c07890c3a6ab366ce7 Author: Yoann Vandoorselaere Date: Fri Sep 28 08:15:48 2001 +0000 Missing copyright notice. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@287 09c5ec92-17d4-0310-903a-819935f44dba src/include/alert-id.h | 22 ++++++++++++++++++++++ src/include/alert-read.h | 22 ++++++++++++++++++++++ 2 files changed, 44 insertions(+), 0 deletions(-) commit 29b9989779195b528caf6c4f5fef8622aada7749 Author: Yoann Vandoorselaere Date: Fri Sep 28 08:05:46 2001 +0000 *** empty log message *** git-svn-id: file:///home/yoann/SVN/trunk/libprelude@286 09c5ec92-17d4-0310-903a-819935f44dba src/ssl-gencrypto.c | 2 -- 1 files changed, 0 insertions(+), 2 deletions(-) commit c8dfb44fb6fbd0795ef0e6e6020845a732b2075e Author: Yoann Vandoorselaere Date: Fri Sep 28 07:29:04 2001 +0000 * src/ssl-config.c: Define KEY_LENGTH and CERT_DAYS moved to this file instead of ssl-config.h, they should be used directly by any SSL related sources files. Remove the ssl config structure cert_directory member and associated function, it's dependant on the user, and shouldn't be computed here. * src/include/alert-read.h: new type readfunc_t, to point on a read function to use. * src/alert-read.c (prelude_alert_read): take a readfunc_t argument identifying the read function to use. * src/include/ssl-config.h: remove manager related definitions. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@283 09c5ec92-17d4-0310-903a-819935f44dba ChangeLog | 22 ++++++++++++++++++++ src/alert-read.c | 8 +++--- src/include/alert-read.h | 5 +++- src/include/ssl-config.h | 49 +++------------------------------------------ src/ssl-config.c | 37 +++++++++++++++------------------- src/ssl-gencrypto.c | 8 ++++-- 6 files changed, 55 insertions(+), 74 deletions(-) commit 5af4d7a7999e6c9265d76b6297768f8d96a206eb Author: Yoann Vandoorselaere Date: Sun Sep 2 11:23:10 2001 +0000 * src/alert-read.c (prelude_alert_read_msg): * src/include/alert-read.h (prelude_alert_read_msg): buf is void. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@267 09c5ec92-17d4-0310-903a-819935f44dba ChangeLog | 4 ++++ src/alert-read.c | 2 +- src/include/alert-read.h | 2 +- 3 files changed, 6 insertions(+), 2 deletions(-) commit fe125ab95650d78aad57cd3344cc40260917b326 Author: Yoann Vandoorselaere Date: Sun Sep 2 11:19:12 2001 +0000 * src/include/alert-id.h (ID_PRELUDE_NIDS_ALERT): new file, define known alert ID. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@266 09c5ec92-17d4-0310-903a-819935f44dba ChangeLog | 3 +++ src/include/Makefile.am | 3 +++ src/include/alert-id.h | 2 ++ 3 files changed, 8 insertions(+), 0 deletions(-) commit 9f5b7fa4605d33672c7986c9c8c6341de38b0ae3 Author: Yoann Vandoorselaere Date: Sun Sep 2 09:52:31 2001 +0000 * src/alert-read.c (prelude_alert_read): better control of the read() return value. (prelude_alert_read): Set the message index to 0. (prelude_alert_read_msg): return 0 when end of message is reached, 1 if we got a message, -1 on error. Handle the end of message character. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@262 09c5ec92-17d4-0310-903a-819935f44dba ChangeLog | 10 ++++++++++ src/alert-read.c | 36 ++++++++++++++++++++++++------------ 2 files changed, 34 insertions(+), 12 deletions(-) commit 09a74e165f5257d8b90390d923cf436b2b7c79a9 Author: Yoann Vandoorselaere Date: Sat Sep 1 23:37:41 2001 +0000 *** empty log message *** git-svn-id: file:///home/yoann/SVN/trunk/libprelude@261 09c5ec92-17d4-0310-903a-819935f44dba configure.ac | 3 +-- 1 files changed, 1 insertions(+), 2 deletions(-) commit 53decd60fc182ea01d7b8693918984c107ddbc04 Author: Yoann Vandoorselaere Date: Sat Sep 1 23:33:54 2001 +0000 *** empty log message *** git-svn-id: file:///home/yoann/SVN/trunk/libprelude@260 09c5ec92-17d4-0310-903a-819935f44dba configure.ac | 3 +- src/alert-common.c | 182 ---------------------------------------------------- 2 files changed, 1 insertions(+), 184 deletions(-) commit fa419a5632ac7d171884c9898366a73c8af22a34 Author: Yoann Vandoorselaere Date: Sat Sep 1 21:36:42 2001 +0000 *** empty log message *** git-svn-id: file:///home/yoann/SVN/trunk/libprelude@257 09c5ec92-17d4-0310-903a-819935f44dba src/include/alert-common.h | 23 ---------- src/include/alert.h | 100 -------------------------------------------- 2 files changed, 0 insertions(+), 123 deletions(-) commit 617f2ca3cc67a41c3f29da740266a471a9d3931a Author: Yoann Vandoorselaere Date: Sat Sep 1 21:35:37 2001 +0000 * src/alert-read.c: New communication layer. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@256 09c5ec92-17d4-0310-903a-819935f44dba ChangeLog | 4 ++ src/Makefile.am | 2 +- src/alert-read.c | 124 ++++++++++++++++++++++++++++++++++++++++++++++ src/include/Makefile.am | 3 +- src/include/alert-read.h | 15 ++++++ 5 files changed, 145 insertions(+), 3 deletions(-) commit 7290f194d22fa490bfb1afc4c69865a73ea423b9 Author: Yoann Vandoorselaere Date: Tue Aug 28 18:22:11 2001 +0000 * src/include/alert.h: include a sensor_data_len member (16bits). * src/alert-common.c (read_alert): read sensor data id and sensor data len. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@244 09c5ec92-17d4-0310-903a-819935f44dba ChangeLog | 6 ++++ src/alert-common.c | 76 ++++++++++++++------------------------------------- src/include/alert.h | 7 +++++ 3 files changed, 34 insertions(+), 55 deletions(-) commit 364fa8fef717e4adb24683d7cf83462a060703f7 Author: Yoann Vandoorselaere Date: Tue Aug 28 09:57:55 2001 +0000 *** empty log message *** git-svn-id: file:///home/yoann/SVN/trunk/libprelude@243 09c5ec92-17d4-0310-903a-819935f44dba src/include/alert.h | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) commit 2f641ce63c2c05316f69718bd148f32808a564a2 Author: Yoann Vandoorselaere Date: Mon Aug 27 23:32:22 2001 +0000 * src/config-engine.c (cmp_entry): oops, badly synced with last prelude stable branch change. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@241 09c5ec92-17d4-0310-903a-819935f44dba ChangeLog | 3 +++ src/config-engine.c | 4 ++-- 2 files changed, 5 insertions(+), 2 deletions(-) commit 34b18d57bc757a2066f1a89adbcd0eda9871ab2b Author: Yoann Vandoorselaere Date: Mon Aug 27 22:32:00 2001 +0000 * src/include/alert.h: include inttypes.h alert_t now contain a pointer on the private sensor data, and a 8 bits integer representing the kind of data it is. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@235 09c5ec92-17d4-0310-903a-819935f44dba ChangeLog | 7 +++++++ src/include/alert.h | 5 ++++- 2 files changed, 11 insertions(+), 1 deletions(-) commit 1052f5cba1765a945c697aaa8da03d3f42ccf7d5 Author: Yoann Vandoorselaere Date: Mon Aug 27 21:41:36 2001 +0000 *** empty log message *** git-svn-id: file:///home/yoann/SVN/trunk/libprelude@234 09c5ec92-17d4-0310-903a-819935f44dba src/include/plugin-common-prv.h | 18 ++++++++++++++---- 1 files changed, 14 insertions(+), 4 deletions(-) commit 3d0cea2ec7b0676a3164bdef1c2fd14f4a1d4b5f Author: Yoann Vandoorselaere Date: Sun Aug 26 14:26:04 2001 +0000 * src/libprelude/config-engine.c (cmp_entry): Avoid reading past the end of our buffer when the line is blank. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@232 09c5ec92-17d4-0310-903a-819935f44dba ChangeLog | 4 ++++ src/config-engine.c | 29 ++++++++++++++++++++++------- src/include/socket-op.h | 4 ++-- src/socket-op.c | 42 +++++++++++++++++++++++++++++++----------- 4 files changed, 59 insertions(+), 20 deletions(-) commit ccfedff7d1b216fbd71fa189fe09bfb49f3889f9 Author: Yoann Vandoorselaere Date: Sat Aug 25 23:56:42 2001 +0000 Sync with prelude-0_4 branch git-svn-id: file:///home/yoann/SVN/trunk/libprelude@227 09c5ec92-17d4-0310-903a-819935f44dba ChangeLog | 25 +++++++ src/Makefile.am | 3 +- src/config-engine.c | 101 +++++++++++++++++++++-------- src/include/Makefile.am | 3 +- src/include/variable.h | 33 +++++++++ src/plugin-common.c | 33 ++++++++-- src/variable.c | 165 +++++++++++++++++++++++++++++++++++++++++++++++ 7 files changed, 330 insertions(+), 33 deletions(-) commit a896600cdc6a2956c998171e25d87c553fa6b4b2 Author: Yoann Vandoorselaere Date: Fri Aug 24 19:33:39 2001 +0000 * src/alert-common.c (read_alert): Return an error if socket_read_nowait() returned 0. This prevent a possible report server if the sensor is interupted while sending an alert. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@207 09c5ec92-17d4-0310-903a-819935f44dba ChangeLog | 7 +++++++ src/alert-common.c | 2 +- 2 files changed, 8 insertions(+), 1 deletions(-) commit 09eca2980330221d2594bf49655d5f1f4b470c3a Author: Sylvain Gil Date: Thu Aug 23 20:37:50 2001 +0000 don't put includedir/libprelude/ in -I git-svn-id: file:///home/yoann/SVN/trunk/libprelude@200 09c5ec92-17d4-0310-903a-819935f44dba libprelude-config.in | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) commit 53c8fa8f6e3f30ed032ce1cd1354e4240295a752 Author: Sylvain Gil Date: Thu Aug 23 13:27:23 2001 +0000 ifdef _FILE in include files and missing includes. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@191 09c5ec92-17d4-0310-903a-819935f44dba src/include/alert.h | 3 +++ src/include/timer.h | 23 ++++------------------- src/ssl-config.c | 1 + src/ssl-gencrypto.c | 1 + src/ssl-registration-msg.c | 1 + 5 files changed, 10 insertions(+), 19 deletions(-) commit a46860960dfbaec7f81a364e3e103f5d69837f0d Author: Sylvain Gil Date: Thu Aug 23 09:41:30 2001 +0000 works better this way ;) git-svn-id: file:///home/yoann/SVN/trunk/libprelude@186 09c5ec92-17d4-0310-903a-819935f44dba libprelude-config.in | 2 +- src/include/timer.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit 992d47c4ec046d4900e4d8602436096b577a691c Author: Sylvain Gil Date: Thu Aug 23 07:38:16 2001 +0000 libprelude-config will be used by linking programs to locate where libprelude is installed (must be in path or found by using something like --with-libprelude=DIR in linking program configure). git-svn-id: file:///home/yoann/SVN/trunk/libprelude@184 09c5ec92-17d4-0310-903a-819935f44dba Makefile.am | 2 + configure.ac | 3 +- libprelude-config.in | 59 ++++++++++++++++++++++++++++++++++++++++++++++++++ src/include/timer.h | 2 +- 4 files changed, 64 insertions(+), 2 deletions(-) commit 9619fe206e239660eb8f343a0a7f53eb448329ea Author: Yoann Vandoorselaere Date: Thu Aug 23 00:18:28 2001 +0000 *** empty log message *** git-svn-id: file:///home/yoann/SVN/trunk/libprelude@175 09c5ec92-17d4-0310-903a-819935f44dba ChangeLog | 2 ++ src/auth-common.c | 4 +++- 2 files changed, 5 insertions(+), 1 deletions(-) commit 5ef6adb67bfc76c118d0b5f7b1a4797b89d60e07 Author: Yoann Vandoorselaere Date: Thu Aug 23 00:16:50 2001 +0000 * src/auth-common.c (auth_file_exist_or_create): (auth_read_entry): (auth_create_account): Documented. Put the cpass variable into the #ifdef scope. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@174 09c5ec92-17d4-0310-903a-819935f44dba ChangeLog | 7 +++++ src/auth-common.c | 64 +++++++++++++++++++++++++++++++++++++++------------- 2 files changed, 55 insertions(+), 16 deletions(-) commit cd14cefc495cd655c59af497a4a2aeb57835f5cd Author: Yoann Vandoorselaere Date: Thu Aug 23 00:02:07 2001 +0000 *** empty log message *** git-svn-id: file:///home/yoann/SVN/trunk/libprelude@173 09c5ec92-17d4-0310-903a-819935f44dba src/plugin-common.loT | 7 ------- 1 files changed, 0 insertions(+), 7 deletions(-) commit 737fd81f708874d0c29cd4dfcbf558f6d8bd0379 Author: Sylvain Gil Date: Thu Aug 23 00:01:31 2001 +0000 config.status: error: cannot find input file: docs/Makefile.in tu l'as pas virer de configure.ac pff chui trop lame git-svn-id: file:///home/yoann/SVN/trunk/libprelude@172 09c5ec92-17d4-0310-903a-819935f44dba configure.ac | 2 -- 1 files changed, 0 insertions(+), 2 deletions(-) commit e604e39e029b8921868ac92050660d56a2ec808f Author: Sylvain Gil Date: Wed Aug 22 23:58:31 2001 +0000 include_HEADERS=config.h git-svn-id: file:///home/yoann/SVN/trunk/libprelude@171 09c5ec92-17d4-0310-903a-819935f44dba Makefile.am | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) commit 34ee79b713537cecbe85008db131e20f39aa9bf6 Author: Sylvain Gil Date: Wed Aug 22 23:50:14 2001 +0000 ... then 1st mistake git-svn-id: file:///home/yoann/SVN/trunk/libprelude@170 09c5ec92-17d4-0310-903a-819935f44dba libmissing/libmissing.h | 22 ++++++++++++++++++++++ 1 files changed, 22 insertions(+), 0 deletions(-) commit 3683ff60807c02655531eccf498319d70d0567d8 Author: Sylvain Gil Date: Wed Aug 22 23:45:33 2001 +0000 1st pass on autoconf/automake stuff git-svn-id: file:///home/yoann/SVN/trunk/libprelude@169 09c5ec92-17d4-0310-903a-819935f44dba Makefile.am | 3 +- configure.ac | 1 + libmissing/Makefile.am | 9 ++++++++ libmissing/getopt_long.c | 36 +++++++++++++++++++++++++++++++++ libmissing/getopt_long.h | 46 ++++++++++++++++++++++++++++++++++++++++++ src/Makefile.am | 9 ++----- src/compat.c | 36 --------------------------------- src/include/Makefile.am | 1 - src/include/compat.h | 50 ---------------------------------------------- src/plugin-common.c | 2 +- 10 files changed, 97 insertions(+), 96 deletions(-) commit a31b217f041a1a6a29df940f59aa8b3ed5b10c81 Author: cvs2svn Date: Wed Aug 22 22:54:29 2001 +0000 This commit was generated by cvs2svn to compensate for changes in r163, which included commits to RCS files with non-trunk default branches. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@164 09c5ec92-17d4-0310-903a-819935f44dba src/plugin-common.c | 1 + 1 files changed, 1 insertions(+), 0 deletions(-) commit 4e01eed7111fd0db4ae6c8f01e4bb11d208a3da5 Author: Yoann Vandoorselaere Date: Wed Aug 22 22:54:28 2001 +0000 Initial revision git-svn-id: file:///home/yoann/SVN/trunk/libprelude@162 09c5ec92-17d4-0310-903a-819935f44dba src/plugin-common.loT | 7 +++++++ 1 files changed, 7 insertions(+), 0 deletions(-) commit fe39c3328b664184ac3fb5bb853f52501472c21c Author: Yoann Vandoorselaere Date: Tue Aug 21 10:38:32 2001 +0000 * src/include/compat.h: if package is not defined, dump an error telling to include git-svn-id: file:///home/yoann/SVN/trunk/libprelude@155 09c5ec92-17d4-0310-903a-819935f44dba ChangeLog | 3 +++ src/include/compat.h | 4 ++++ 2 files changed, 7 insertions(+), 0 deletions(-) commit 44caebe13c0c0808ed8a4850e9500df1233416af Author: Yoann Vandoorselaere Date: Tue Aug 21 10:34:55 2001 +0000 * Makefile.am (SUBDIRS): process docs subdirectory after src. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@154 09c5ec92-17d4-0310-903a-819935f44dba ChangeLog | 3 +++ Makefile.am | 2 +- 2 files changed, 4 insertions(+), 1 deletions(-) commit b8268d7913a026bcff67fa7f8352d1444827171a Author: Yoann Vandoorselaere Date: Tue Aug 21 10:33:20 2001 +0000 * src/include/list.h (list_entry): updated to a more recent, documented version, kernel use unsigned long for pointer, we do use void *. Use the inline keyword. git-svn-id: file:///home/yoann/SVN/trunk/libprelude@153 09c5ec92-17d4-0310-903a-819935f44dba ChangeLog | 4 ++++ src/include/list.h | 26 ++++++++++++-------------- 2 files changed, 16 insertions(+), 14 deletions(-) commit 4e227465b67143bb63d062047b47cce37fa7fb14 Author: Yoann Vandoorselaere Date: Tue Aug 21 10:27:41 2001 +0000 More configuration cleanup, update to a documented version of list.h git-svn-id: file:///home/yoann/SVN/trunk/libprelude@152 09c5ec92-17d4-0310-903a-819935f44dba Makefile.am | 3 ++ acconfig.h | 3 ++ autogen.sh | 2 +- configure.ac | 62 ++++++++++++-------------------------------- src/Makefile.am | 2 +- src/auth-common.c | 4 +- src/include/list.h | 72 ++++++++++++++++++++++++++++++++++++++++----------- 7 files changed, 83 insertions(+), 65 deletions(-) commit 77d3c0396212d4e7efb1da60e62e80f310f9fbab Author: Yoann Vandoorselaere Date: Tue Aug 21 09:31:51 2001 +0000 *** empty log message *** git-svn-id: file:///home/yoann/SVN/trunk/libprelude@151 09c5ec92-17d4-0310-903a-819935f44dba Makefile.am | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) commit 7f4c4f75a7ae315a21fa0d0ecb2a2b39a29552c9 Author: Yoann Vandoorselaere Date: Tue Aug 21 09:23:15 2001 +0000 *** empty log message *** git-svn-id: file:///home/yoann/SVN/trunk/libprelude@150 09c5ec92-17d4-0310-903a-819935f44dba src/include/timer.tmp | 123 -------------------------- src/string_matching.loT | 7 -- src/timer.tmp | 221 ----------------------------------------------- 3 files changed, 0 insertions(+), 351 deletions(-) commit c832aec5e082c0cfc275725ec99573a035fa8e62 Author: Yoann Vandoorselaere Date: Tue Aug 21 09:20:30 2001 +0000 Initial revision git-svn-id: file:///home/yoann/SVN/trunk/libprelude@148 09c5ec92-17d4-0310-903a-819935f44dba AUTHORS | 1 + COPYING | 340 +++++++++++++++++++++ ChangeLog | 4 + INSTALL | 182 +++++++++++ Makefile.am | 1 + autogen.sh | 6 + configure.ac | 188 ++++++++++++ docs/Makefile.am | 1 + docs/api/Makefile.am | 183 +++++++++++ src/Makefile.am | 25 ++ src/alert-common.c | 216 +++++++++++++ src/auth-common.c | 384 ++++++++++++++++++++++++ src/compat.c | 36 +++ src/config-engine.c | 523 ++++++++++++++++++++++++++++++++ src/daemonize.c | 89 ++++++ src/include/Makefile.am | 19 ++ src/include/alert-common.h | 23 ++ src/include/alert.h | 86 ++++++ src/include/auth-common.h | 61 ++++ src/include/common.h | 63 ++++ src/include/compat.h | 46 +++ src/include/config-engine.h | 35 +++ src/include/daemonize.h | 24 ++ src/include/list.h | 114 +++++++ src/include/plugin-common-prv.h | 127 ++++++++ src/include/plugin-common.h | 100 ++++++ src/include/socket-op.h | 30 ++ src/include/ssl-config.h | 90 ++++++ src/include/ssl-gencrypto.h | 32 ++ src/include/ssl-registration-msg.h | 62 ++++ src/include/string-matching.h | 28 ++ src/include/timer.h | 116 +++++++ src/include/timer.tmp | 123 ++++++++ src/plugin-common.c | 582 ++++++++++++++++++++++++++++++++++++ src/socket-op.c | 307 +++++++++++++++++++ src/ssl-config.c | 98 ++++++ src/ssl-gencrypto.c | 409 +++++++++++++++++++++++++ src/ssl-registration-msg.c | 255 ++++++++++++++++ src/string-matching.c | 155 ++++++++++ src/string_matching.loT | 7 + src/timer.c | 220 ++++++++++++++ src/timer.tmp | 221 ++++++++++++++ 42 files changed, 5612 insertions(+), 0 deletions(-) libprelude-1.0.0/compile0000755000076400007640000000727111347714452012165 00000000000000#! /bin/sh # Wrapper for compilers which do not understand `-c -o'. scriptversion=2009-10-06.20; # UTC # Copyright (C) 1999, 2000, 2003, 2004, 2005, 2009 Free Software # Foundation, Inc. # Written by Tom Tromey . # # 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, see . # 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. # This file is maintained in Automake, please report # bugs to or send patches to # . case $1 in '') echo "$0: No command. Try \`$0 --help' for more information." 1>&2 exit 1; ;; -h | --h*) cat <<\EOF Usage: compile [--help] [--version] PROGRAM [ARGS] Wrapper for compilers which do not understand `-c -o'. Remove `-o dest.o' from ARGS, run PROGRAM with the remaining arguments, and rename the output as expected. If you are trying to build a whole package this is not the right script to run: please start by reading the file `INSTALL'. Report bugs to . EOF exit $? ;; -v | --v*) echo "compile $scriptversion" exit $? ;; esac ofile= cfile= eat= for arg do if test -n "$eat"; then eat= else case $1 in -o) # configure might choose to run compile as `compile cc -o foo foo.c'. # So we strip `-o arg' only if arg is an object. eat=1 case $2 in *.o | *.obj) ofile=$2 ;; *) set x "$@" -o "$2" shift ;; esac ;; *.c) cfile=$1 set x "$@" "$1" shift ;; *) set x "$@" "$1" shift ;; esac fi shift done if test -z "$ofile" || test -z "$cfile"; then # If no `-o' option was seen then we might have been invoked from a # pattern rule where we don't need one. That is ok -- this is a # normal compilation that the losing compiler can handle. If no # `.c' file was seen then we are probably linking. That is also # ok. exec "$@" fi # Name of file we expect compiler to create. cofile=`echo "$cfile" | sed 's|^.*[\\/]||; s|^[a-zA-Z]:||; s/\.c$/.o/'` # Create the lock directory. # Note: use `[/\\:.-]' here to ensure that we don't use the same name # that we are using for the .o file. Also, base the name on the expected # object file name, since that is what matters with a parallel build. lockdir=`echo "$cofile" | sed -e 's|[/\\:.-]|_|g'`.d while true; do if mkdir "$lockdir" >/dev/null 2>&1; then break fi sleep 1 done # FIXME: race condition here if user kills between mkdir and trap. trap "rmdir '$lockdir'; exit 1" 1 2 15 # Run the compile. "$@" ret=$? if test -f "$cofile"; then test "$cofile" = "$ofile" || mv "$cofile" "$ofile" elif test -f "${cofile}bj"; then test "${cofile}bj" = "$ofile" || mv "${cofile}bj" "$ofile" fi rmdir "$lockdir" exit $ret # Local Variables: # mode: shell-script # sh-indentation: 2 # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "scriptversion=" # time-stamp-format: "%:y-%02m-%02d.%02H" # time-stamp-time-zone: "UTC" # time-stamp-end: "; # UTC" # End: libprelude-1.0.0/libmissing/0000775000076400007640000000000011347714752013025 500000000000000libprelude-1.0.0/libmissing/setsockopt.c0000664000076400007640000000312611341220440015265 00000000000000/* setsockopt.c --- wrappers for Windows setsockopt function Copyright (C) 2008-2010 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 3 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 Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . */ /* Written by Paolo Bonzini */ #include #define WIN32_LEAN_AND_MEAN /* Get winsock2.h. */ #include /* Get struct timeval. */ #include /* Get set_winsock_errno, FD_TO_SOCKET etc. */ #include "w32sock.h" #undef setsockopt int rpl_setsockopt (int fd, int level, int optname, const void *optval, socklen_t optlen) { int r; SOCKET sock = FD_TO_SOCKET (fd); if (level == SOL_SOCKET && (optname == SO_RCVTIMEO || optname == SO_SNDTIMEO)) { const struct timeval *tv = optval; int milliseconds = tv->tv_sec * 1000 + tv->tv_usec / 1000; optval = &milliseconds; r = setsockopt (sock, level, optname, optval, sizeof (int)); } else { r = setsockopt (sock, level, optname, optval, optlen); } if (r < 0) set_winsock_errno (); return r; } libprelude-1.0.0/libmissing/localcharset.h0000664000076400007640000000257011341220435015546 00000000000000/* Determine a canonical name for the current locale's character encoding. Copyright (C) 2000-2003, 2009-2010 Free Software Foundation, Inc. This file is part of the GNU CHARSET Library. This program is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser 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 Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ #ifndef _LOCALCHARSET_H #define _LOCALCHARSET_H #ifdef __cplusplus extern "C" { #endif /* Determine the current locale's character encoding, and canonicalize it into one of the canonical names listed in config.charset. The result must not be freed; it is statically allocated. If the canonical name cannot be determined, the result is a non-canonical name. */ extern const char * locale_charset (void); #ifdef __cplusplus } #endif #endif /* _LOCALCHARSET_H */ libprelude-1.0.0/libmissing/getpass.h0000664000076400007640000000230411341220435014543 00000000000000/* getpass.h -- Read a password of arbitrary length from /dev/tty or stdin. Copyright (C) 2004, 2009-2010 Free Software Foundation, Inc. Contributed by Simon Josefsson , 2004. This program is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser 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 Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ #ifndef GETPASS_H # define GETPASS_H /* Get getpass declaration, if available. */ # include # if defined HAVE_DECL_GETPASS && !HAVE_DECL_GETPASS /* Read a password of arbitrary length from /dev/tty or stdin. */ char *getpass (const char *prompt); # endif #endif /* GETPASS_H */ libprelude-1.0.0/libmissing/getaddrinfo.c0000664000076400007640000002424011341220434015360 00000000000000/* Get address information (partial implementation). Copyright (C) 1997, 2001-2002, 2004-2010 Free Software Foundation, Inc. Contributed by Simon Josefsson . This program is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser 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 Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ #include /* Don't use __attribute__ __nonnull__ in this compilation unit. Otherwise gcc optimizes away the sa == NULL test below. */ #define _GL_ARG_NONNULL(params) #include #if HAVE_NETINET_IN_H # include #endif /* Get inet_ntop. */ #include /* Get calloc. */ #include /* Get memcpy, strdup. */ #include /* Get snprintf. */ #include #include #include "gettext.h" #define _(String) gettext (String) #define N_(String) String /* BeOS has AF_INET, but not PF_INET. */ #ifndef PF_INET # define PF_INET AF_INET #endif /* BeOS also lacks PF_UNSPEC. */ #ifndef PF_UNSPEC # define PF_UNSPEC 0 #endif #if defined _WIN32 || defined __WIN32__ # define WIN32_NATIVE #endif #ifdef WIN32_NATIVE typedef int (WSAAPI *getaddrinfo_func) (const char*, const char*, const struct addrinfo*, struct addrinfo**); typedef void (WSAAPI *freeaddrinfo_func) (struct addrinfo*); typedef int (WSAAPI *getnameinfo_func) (const struct sockaddr*, socklen_t, char*, DWORD, char*, DWORD, int); static getaddrinfo_func getaddrinfo_ptr = NULL; static freeaddrinfo_func freeaddrinfo_ptr = NULL; static getnameinfo_func getnameinfo_ptr = NULL; static int use_win32_p (void) { static int done = 0; HMODULE h; if (done) return getaddrinfo_ptr ? 1 : 0; done = 1; h = GetModuleHandle ("ws2_32.dll"); if (h) { getaddrinfo_ptr = (getaddrinfo_func) GetProcAddress (h, "getaddrinfo"); freeaddrinfo_ptr = (freeaddrinfo_func) GetProcAddress (h, "freeaddrinfo"); getnameinfo_ptr = (getnameinfo_func) GetProcAddress (h, "getnameinfo"); } /* If either is missing, something is odd. */ if (!getaddrinfo_ptr || !freeaddrinfo_ptr || !getnameinfo_ptr) { getaddrinfo_ptr = NULL; freeaddrinfo_ptr = NULL; getnameinfo_ptr = NULL; return 0; } return 1; } #endif static inline bool validate_family (int family) { /* FIXME: Support more families. */ #if HAVE_IPV4 if (family == PF_INET) return true; #endif #if HAVE_IPV6 if (family == PF_INET6) return true; #endif if (family == PF_UNSPEC) return true; return false; } /* Translate name of a service location and/or a service name to set of socket addresses. */ int getaddrinfo (const char *restrict nodename, const char *restrict servname, const struct addrinfo *restrict hints, struct addrinfo **restrict res) { struct addrinfo *tmp; int port = 0; struct hostent *he; void *storage; size_t size; #if HAVE_IPV6 struct v6_pair { struct addrinfo addrinfo; struct sockaddr_in6 sockaddr_in6; }; #endif #if HAVE_IPV4 struct v4_pair { struct addrinfo addrinfo; struct sockaddr_in sockaddr_in; }; #endif #ifdef WIN32_NATIVE if (use_win32_p ()) return getaddrinfo_ptr (nodename, servname, hints, res); #endif if (hints && (hints->ai_flags & ~(AI_CANONNAME|AI_PASSIVE))) /* FIXME: Support more flags. */ return EAI_BADFLAGS; if (hints && !validate_family (hints->ai_family)) return EAI_FAMILY; if (hints && hints->ai_socktype != SOCK_STREAM && hints->ai_socktype != SOCK_DGRAM) /* FIXME: Support other socktype. */ return EAI_SOCKTYPE; /* FIXME: Better return code? */ if (!nodename) { if (!(hints->ai_flags & AI_PASSIVE)) return EAI_NONAME; #ifdef HAVE_IPV6 nodename = (hints->ai_family == AF_INET6) ? "::" : "0.0.0.0"; #else nodename = "0.0.0.0"; #endif } if (servname) { struct servent *se = NULL; const char *proto = (hints && hints->ai_socktype == SOCK_DGRAM) ? "udp" : "tcp"; if (hints == NULL || !(hints->ai_flags & AI_NUMERICSERV)) /* FIXME: Use getservbyname_r if available. */ se = getservbyname (servname, proto); if (!se) { char *c; if (!(*servname >= '0' && *servname <= '9')) return EAI_NONAME; port = strtoul (servname, &c, 10); if (*c || port > 0xffff) return EAI_NONAME; port = htons (port); } else port = se->s_port; } /* FIXME: Use gethostbyname_r if available. */ he = gethostbyname (nodename); if (!he || he->h_addr_list[0] == NULL) return EAI_NONAME; switch (he->h_addrtype) { #if HAVE_IPV6 case PF_INET6: size = sizeof (struct v6_pair); break; #endif #if HAVE_IPV4 case PF_INET: size = sizeof (struct v4_pair); break; #endif default: return EAI_NODATA; } storage = calloc (1, size); if (!storage) return EAI_MEMORY; switch (he->h_addrtype) { #if HAVE_IPV6 case PF_INET6: { struct v6_pair *p = storage; struct sockaddr_in6 *sinp = &p->sockaddr_in6; tmp = &p->addrinfo; if (port) sinp->sin6_port = port; if (he->h_length != sizeof (sinp->sin6_addr)) { free (storage); return EAI_SYSTEM; /* FIXME: Better return code? Set errno? */ } memcpy (&sinp->sin6_addr, he->h_addr_list[0], sizeof sinp->sin6_addr); tmp->ai_addr = (struct sockaddr *) sinp; tmp->ai_addrlen = sizeof *sinp; } break; #endif #if HAVE_IPV4 case PF_INET: { struct v4_pair *p = storage; struct sockaddr_in *sinp = &p->sockaddr_in; tmp = &p->addrinfo; if (port) sinp->sin_port = port; if (he->h_length != sizeof (sinp->sin_addr)) { free (storage); return EAI_SYSTEM; /* FIXME: Better return code? Set errno? */ } memcpy (&sinp->sin_addr, he->h_addr_list[0], sizeof sinp->sin_addr); tmp->ai_addr = (struct sockaddr *) sinp; tmp->ai_addrlen = sizeof *sinp; } break; #endif default: free (storage); return EAI_NODATA; } if (hints && hints->ai_flags & AI_CANONNAME) { const char *cn; if (he->h_name) cn = he->h_name; else cn = nodename; tmp->ai_canonname = strdup (cn); if (!tmp->ai_canonname) { free (storage); return EAI_MEMORY; } } tmp->ai_protocol = (hints) ? hints->ai_protocol : 0; tmp->ai_socktype = (hints) ? hints->ai_socktype : 0; tmp->ai_addr->sa_family = he->h_addrtype; tmp->ai_family = he->h_addrtype; #ifdef HAVE_STRUCT_SOCKADDR_SA_LEN switch (he->h_addrtype) { #if HAVE_IPV4 case AF_INET: tmp->ai_addr->sa_len = sizeof (struct sockaddr_in); break; #endif #if HAVE_IPV6 case AF_INET6: tmp->ai_addr->sa_len = sizeof (struct sockaddr_in6); break; #endif } #endif /* FIXME: If more than one address, create linked list of addrinfo's. */ *res = tmp; return 0; } /* Free `addrinfo' structure AI including associated storage. */ void freeaddrinfo (struct addrinfo *ai) { #ifdef WIN32_NATIVE if (use_win32_p ()) { freeaddrinfo_ptr (ai); return; } #endif while (ai) { struct addrinfo *cur; cur = ai; ai = ai->ai_next; free (cur->ai_canonname); free (cur); } } int getnameinfo(const struct sockaddr *restrict sa, socklen_t salen, char *restrict node, socklen_t nodelen, char *restrict service, socklen_t servicelen, int flags) { #ifdef WIN32_NATIVE if (use_win32_p ()) return getnameinfo_ptr (sa, salen, node, nodelen, service, servicelen, flags); #endif /* FIXME: Support other flags. */ if ((node && nodelen > 0 && !(flags & NI_NUMERICHOST)) || (service && servicelen > 0 && !(flags & NI_NUMERICHOST)) || (flags & ~(NI_NUMERICHOST|NI_NUMERICSERV))) return EAI_BADFLAGS; if (sa == NULL || salen < sizeof (sa->sa_family)) return EAI_FAMILY; switch (sa->sa_family) { #if HAVE_IPV4 case AF_INET: if (salen < sizeof (struct sockaddr_in)) return EAI_FAMILY; break; #endif #if HAVE_IPV6 case AF_INET6: if (salen < sizeof (struct sockaddr_in6)) return EAI_FAMILY; break; #endif default: return EAI_FAMILY; } if (node && nodelen > 0 && flags & NI_NUMERICHOST) { switch (sa->sa_family) { #if HAVE_IPV4 case AF_INET: if (!inet_ntop (AF_INET, &(((const struct sockaddr_in *) sa)->sin_addr), node, nodelen)) return EAI_SYSTEM; break; #endif #if HAVE_IPV6 case AF_INET6: if (!inet_ntop (AF_INET6, &(((const struct sockaddr_in6 *) sa)->sin6_addr), node, nodelen)) return EAI_SYSTEM; break; #endif default: return EAI_FAMILY; } } if (service && servicelen > 0 && flags & NI_NUMERICSERV) switch (sa->sa_family) { #if HAVE_IPV4 case AF_INET: #endif #if HAVE_IPV6 case AF_INET6: #endif { unsigned short int port = ntohs (((const struct sockaddr_in *) sa)->sin_port); if (servicelen <= snprintf (service, servicelen, "%u", port)) return EAI_OVERFLOW; } break; } return 0; } libprelude-1.0.0/libmissing/string.in.h0000664000076400007640000005551311341220440015016 00000000000000/* A GNU-like . Copyright (C) 1995-1996, 2001-2010 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser 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 Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ #ifndef _GL_STRING_H #if __GNUC__ >= 3 @PRAGMA_SYSTEM_HEADER@ #endif /* The include_next requires a split double-inclusion guard. */ #@INCLUDE_NEXT@ @NEXT_STRING_H@ #ifndef _GL_STRING_H #define _GL_STRING_H /* NetBSD 5.0 mis-defines NULL. */ #include /* MirBSD defines mbslen as a macro. */ #if @GNULIB_MBSLEN@ && defined __MirBSD__ # include #endif #ifndef __attribute__ /* This feature is available in gcc versions 2.5 and later. */ # if __GNUC__ < 2 || (__GNUC__ == 2 && __GNUC_MINOR__ < 5) # define __attribute__(Spec) /* empty */ # endif /* The attribute __pure__ was added in gcc 2.96. */ # if __GNUC__ < 2 || (__GNUC__ == 2 && __GNUC_MINOR__ < 96) # define __pure__ /* empty */ # endif #endif /* The definition of _GL_ARG_NONNULL is copied here. */ /* The definition of _GL_WARN_ON_USE is copied here. */ #ifdef __cplusplus extern "C" { #endif /* Return the first instance of C within N bytes of S, or NULL. */ #if @GNULIB_MEMCHR@ # if @REPLACE_MEMCHR@ # define memchr rpl_memchr extern void *memchr (void const *__s, int __c, size_t __n) __attribute__ ((__pure__)) _GL_ARG_NONNULL ((1)); # endif #elif defined GNULIB_POSIXCHECK # undef memchr /* Assume memchr is always declared. */ _GL_WARN_ON_USE (memchr, "memchr has platform-specific bugs - " "use gnulib module memchr for portability" ); #endif /* Return the first occurrence of NEEDLE in HAYSTACK. */ #if @GNULIB_MEMMEM@ # if @REPLACE_MEMMEM@ # define memmem rpl_memmem # endif # if ! @HAVE_DECL_MEMMEM@ || @REPLACE_MEMMEM@ extern void *memmem (void const *__haystack, size_t __haystack_len, void const *__needle, size_t __needle_len) __attribute__ ((__pure__)) _GL_ARG_NONNULL ((1, 3)); # endif #elif defined GNULIB_POSIXCHECK # undef memmem # if HAVE_RAW_DECL_MEMMEM _GL_WARN_ON_USE (memmem, "memmem is unportable and often quadratic - " "use gnulib module memmem-simple for portability, " "and module memmem for speed" ); # endif #endif /* Copy N bytes of SRC to DEST, return pointer to bytes after the last written byte. */ #if @GNULIB_MEMPCPY@ # if ! @HAVE_MEMPCPY@ extern void *mempcpy (void *restrict __dest, void const *restrict __src, size_t __n) _GL_ARG_NONNULL ((1, 2)); # endif #elif defined GNULIB_POSIXCHECK # undef mempcpy # if HAVE_RAW_DECL_MEMPCPY _GL_WARN_ON_USE (mempcpy, "mempcpy is unportable - " "use gnulib module mempcpy for portability"); # endif #endif /* Search backwards through a block for a byte (specified as an int). */ #if @GNULIB_MEMRCHR@ # if ! @HAVE_DECL_MEMRCHR@ extern void *memrchr (void const *, int, size_t) __attribute__ ((__pure__)) _GL_ARG_NONNULL ((1)); # endif #elif defined GNULIB_POSIXCHECK # undef memrchr # if HAVE_RAW_DECL_MEMRCHR _GL_WARN_ON_USE (memrchr, "memrchr is unportable - " "use gnulib module memrchr for portability"); # endif #endif /* Find the first occurrence of C in S. More efficient than memchr(S,C,N), at the expense of undefined behavior if C does not occur within N bytes. */ #if @GNULIB_RAWMEMCHR@ # if ! @HAVE_RAWMEMCHR@ extern void *rawmemchr (void const *__s, int __c_in) __attribute__ ((__pure__)) _GL_ARG_NONNULL ((1)); # endif #elif defined GNULIB_POSIXCHECK # undef rawmemchr # if HAVE_RAW_DECL_RAWMEMCHR _GL_WARN_ON_USE (rawmemchr, "rawmemchr is unportable - " "use gnulib module rawmemchr for portability"); # endif #endif /* Copy SRC to DST, returning the address of the terminating '\0' in DST. */ #if @GNULIB_STPCPY@ # if ! @HAVE_STPCPY@ extern char *stpcpy (char *restrict __dst, char const *restrict __src) _GL_ARG_NONNULL ((1, 2)); # endif #elif defined GNULIB_POSIXCHECK # undef stpcpy # if HAVE_RAW_DECL_STPCPY _GL_WARN_ON_USE (stpcpy, "stpcpy is unportable - " "use gnulib module stpcpy for portability"); # endif #endif /* Copy no more than N bytes of SRC to DST, returning a pointer past the last non-NUL byte written into DST. */ #if @GNULIB_STPNCPY@ # if ! @HAVE_STPNCPY@ # define stpncpy gnu_stpncpy extern char *stpncpy (char *restrict __dst, char const *restrict __src, size_t __n) _GL_ARG_NONNULL ((1, 2)); # endif #elif defined GNULIB_POSIXCHECK # undef stpncpy # if HAVE_RAW_DECL_STPNCPY _GL_WARN_ON_USE (stpncpy, "stpncpy is unportable - " "use gnulib module stpncpy for portability"); # endif #endif #if defined GNULIB_POSIXCHECK /* strchr() does not work with multibyte strings if the locale encoding is GB18030 and the character to be searched is a digit. */ # undef strchr /* Assume strchr is always declared. */ _GL_WARN_ON_USE (strchr, "strchr cannot work correctly on character strings " "in some multibyte locales - " "use mbschr if you care about internationalization"); #endif /* Find the first occurrence of C in S or the final NUL byte. */ #if @GNULIB_STRCHRNUL@ # if ! @HAVE_STRCHRNUL@ extern char *strchrnul (char const *__s, int __c_in) __attribute__ ((__pure__)) _GL_ARG_NONNULL ((1)); # endif #elif defined GNULIB_POSIXCHECK # undef strchrnul # if HAVE_RAW_DECL_STRCHRNUL _GL_WARN_ON_USE (strchrnul, "strchrnul is unportable - " "use gnulib module strchrnul for portability"); # endif #endif /* Duplicate S, returning an identical malloc'd string. */ #if @GNULIB_STRDUP@ # if @REPLACE_STRDUP@ # undef strdup # define strdup rpl_strdup # endif # if !(@HAVE_DECL_STRDUP@ || defined strdup) || @REPLACE_STRDUP@ extern char *strdup (char const *__s) _GL_ARG_NONNULL ((1)); # endif #elif defined GNULIB_POSIXCHECK # undef strdup # if HAVE_RAW_DECL_STRDUP _GL_WARN_ON_USE (strdup, "strdup is unportable - " "use gnulib module strdup for portability"); # endif #endif /* Return a newly allocated copy of at most N bytes of STRING. */ #if @GNULIB_STRNDUP@ # if @REPLACE_STRNDUP@ # undef strndup # define strndup rpl_strndup # endif # if @REPLACE_STRNDUP@ || ! @HAVE_DECL_STRNDUP@ extern char *strndup (char const *__string, size_t __n) _GL_ARG_NONNULL ((1)); # endif #elif defined GNULIB_POSIXCHECK # undef strndup # if HAVE_RAW_DECL_STRNDUP _GL_WARN_ON_USE (strndup, "strndup is unportable - " "use gnulib module strndup for portability"); # endif #endif /* Find the length (number of bytes) of STRING, but scan at most MAXLEN bytes. If no '\0' terminator is found in that many bytes, return MAXLEN. */ #if @GNULIB_STRNLEN@ # if ! @HAVE_DECL_STRNLEN@ extern size_t strnlen (char const *__string, size_t __maxlen) __attribute__ ((__pure__)) _GL_ARG_NONNULL ((1)); # endif #elif defined GNULIB_POSIXCHECK # undef strnlen # if HAVE_RAW_DECL_STRNLEN _GL_WARN_ON_USE (strnlen, "strnlen is unportable - " "use gnulib module strnlen for portability"); # endif #endif #if defined GNULIB_POSIXCHECK /* strcspn() assumes the second argument is a list of single-byte characters. Even in this simple case, it does not work with multibyte strings if the locale encoding is GB18030 and one of the characters to be searched is a digit. */ # undef strcspn /* Assume strcspn is always declared. */ _GL_WARN_ON_USE (strcspn, "strcspn cannot work correctly on character strings " "in multibyte locales - " "use mbscspn if you care about internationalization"); #endif /* Find the first occurrence in S of any character in ACCEPT. */ #if @GNULIB_STRPBRK@ # if ! @HAVE_STRPBRK@ extern char *strpbrk (char const *__s, char const *__accept) __attribute__ ((__pure__)) _GL_ARG_NONNULL ((1, 2)); # endif # if defined GNULIB_POSIXCHECK /* strpbrk() assumes the second argument is a list of single-byte characters. Even in this simple case, it does not work with multibyte strings if the locale encoding is GB18030 and one of the characters to be searched is a digit. */ # undef strpbrk _GL_WARN_ON_USE (strpbrk, "strpbrk cannot work correctly on character strings " "in multibyte locales - " "use mbspbrk if you care about internationalization"); # endif #elif defined GNULIB_POSIXCHECK # undef strpbrk # if HAVE_RAW_DECL_STRPBRK _GL_WARN_ON_USE (strpbrk, "strpbrk is unportable - " "use gnulib module strpbrk for portability"); # endif #endif #if defined GNULIB_POSIXCHECK /* strspn() assumes the second argument is a list of single-byte characters. Even in this simple case, it cannot work with multibyte strings. */ # undef strspn /* Assume strspn is always declared. */ _GL_WARN_ON_USE (strspn, "strspn cannot work correctly on character strings " "in multibyte locales - " "use mbsspn if you care about internationalization"); #endif #if defined GNULIB_POSIXCHECK /* strrchr() does not work with multibyte strings if the locale encoding is GB18030 and the character to be searched is a digit. */ # undef strrchr /* Assume strrchr is always declared. */ _GL_WARN_ON_USE (strrchr, "strrchr cannot work correctly on character strings " "in some multibyte locales - " "use mbsrchr if you care about internationalization"); #endif /* Search the next delimiter (char listed in DELIM) starting at *STRINGP. If one is found, overwrite it with a NUL, and advance *STRINGP to point to the next char after it. Otherwise, set *STRINGP to NULL. If *STRINGP was already NULL, nothing happens. Return the old value of *STRINGP. This is a variant of strtok() that is multithread-safe and supports empty fields. Caveat: It modifies the original string. Caveat: These functions cannot be used on constant strings. Caveat: The identity of the delimiting character is lost. Caveat: It doesn't work with multibyte strings unless all of the delimiter characters are ASCII characters < 0x30. See also strtok_r(). */ #if @GNULIB_STRSEP@ # if ! @HAVE_STRSEP@ extern char *strsep (char **restrict __stringp, char const *restrict __delim) _GL_ARG_NONNULL ((1, 2)); # endif # if defined GNULIB_POSIXCHECK # undef strsep _GL_WARN_ON_USE (strsep, "strsep cannot work correctly on character strings " "in multibyte locales - " "use mbssep if you care about internationalization"); # endif #elif defined GNULIB_POSIXCHECK # undef strsep # if HAVE_RAW_DECL_STRSEP _GL_WARN_ON_USE (strsep, "strsep is unportable - " "use gnulib module strsep for portability"); # endif #endif #if @GNULIB_STRSTR@ # if @REPLACE_STRSTR@ # define strstr rpl_strstr extern char *strstr (const char *haystack, const char *needle) __attribute__ ((__pure__)) _GL_ARG_NONNULL ((1, 2)); # endif #elif defined GNULIB_POSIXCHECK /* strstr() does not work with multibyte strings if the locale encoding is different from UTF-8: POSIX says that it operates on "strings", and "string" in POSIX is defined as a sequence of bytes, not of characters. */ # undef strstr /* Assume strstr is always declared. */ _GL_WARN_ON_USE (strstr, "strstr is quadratic on many systems, and cannot " "work correctly on character strings in most " "multibyte locales - " "use mbsstr if you care about internationalization, " "or use strstr if you care about speed"); #endif /* Find the first occurrence of NEEDLE in HAYSTACK, using case-insensitive comparison. */ #if @GNULIB_STRCASESTR@ # if @REPLACE_STRCASESTR@ # define strcasestr rpl_strcasestr # endif # if ! @HAVE_STRCASESTR@ || @REPLACE_STRCASESTR@ extern char *strcasestr (const char *haystack, const char *needle) __attribute__ ((__pure__)) _GL_ARG_NONNULL ((1, 2)); # endif #elif defined GNULIB_POSIXCHECK /* strcasestr() does not work with multibyte strings: It is a glibc extension, and glibc implements it only for unibyte locales. */ # undef strcasestr # if HAVE_RAW_DECL_STRCASESTR _GL_WARN_ON_USE (strcasestr, "strcasestr does work correctly on character " "strings in multibyte locales - " "use mbscasestr if you care about " "internationalization, or use c-strcasestr if you want " "a locale independent function"); # endif #endif /* Parse S into tokens separated by characters in DELIM. If S is NULL, the saved pointer in SAVE_PTR is used as the next starting point. For example: char s[] = "-abc-=-def"; char *sp; x = strtok_r(s, "-", &sp); // x = "abc", sp = "=-def" x = strtok_r(NULL, "-=", &sp); // x = "def", sp = NULL x = strtok_r(NULL, "=", &sp); // x = NULL // s = "abc\0-def\0" This is a variant of strtok() that is multithread-safe. For the POSIX documentation for this function, see: http://www.opengroup.org/susv3xsh/strtok.html Caveat: It modifies the original string. Caveat: These functions cannot be used on constant strings. Caveat: The identity of the delimiting character is lost. Caveat: It doesn't work with multibyte strings unless all of the delimiter characters are ASCII characters < 0x30. See also strsep(). */ #if @GNULIB_STRTOK_R@ # if @REPLACE_STRTOK_R@ # undef strtok_r # define strtok_r rpl_strtok_r # elif @UNDEFINE_STRTOK_R@ || defined GNULIB_POSIXCHECK # undef strtok_r # endif # if ! @HAVE_DECL_STRTOK_R@ || @REPLACE_STRTOK_R@ extern char *strtok_r (char *restrict s, char const *restrict delim, char **restrict save_ptr) _GL_ARG_NONNULL ((2, 3)); # endif # if defined GNULIB_POSIXCHECK _GL_WARN_ON_USE (strtok_r, "strtok_r cannot work correctly on character " "strings in multibyte locales - " "use mbstok_r if you care about internationalization"); # endif #elif defined GNULIB_POSIXCHECK # undef strtok_r # if HAVE_RAW_DECL_STRTOK_R _GL_WARN_ON_USE (strtok_r, "strtok_r is unportable - " "use gnulib module strtok_r for portability"); # endif #endif /* The following functions are not specified by POSIX. They are gnulib extensions. */ #if @GNULIB_MBSLEN@ /* Return the number of multibyte characters in the character string STRING. This considers multibyte characters, unlike strlen, which counts bytes. */ # ifdef __MirBSD__ /* MirBSD defines mbslen as a macro. Override it. */ # undef mbslen # endif # if @HAVE_MBSLEN@ /* AIX, OSF/1, MirBSD define mbslen already in libc. */ # define mbslen rpl_mbslen # endif extern size_t mbslen (const char *string) _GL_ARG_NONNULL ((1)); #endif #if @GNULIB_MBSNLEN@ /* Return the number of multibyte characters in the character string starting at STRING and ending at STRING + LEN. */ extern size_t mbsnlen (const char *string, size_t len) _GL_ARG_NONNULL ((1)); #endif #if @GNULIB_MBSCHR@ /* Locate the first single-byte character C in the character string STRING, and return a pointer to it. Return NULL if C is not found in STRING. Unlike strchr(), this function works correctly in multibyte locales with encodings such as GB18030. */ # define mbschr rpl_mbschr /* avoid collision with HP-UX function */ extern char * mbschr (const char *string, int c) _GL_ARG_NONNULL ((1)); #endif #if @GNULIB_MBSRCHR@ /* Locate the last single-byte character C in the character string STRING, and return a pointer to it. Return NULL if C is not found in STRING. Unlike strrchr(), this function works correctly in multibyte locales with encodings such as GB18030. */ # define mbsrchr rpl_mbsrchr /* avoid collision with HP-UX function */ extern char * mbsrchr (const char *string, int c) _GL_ARG_NONNULL ((1)); #endif #if @GNULIB_MBSSTR@ /* Find the first occurrence of the character string NEEDLE in the character string HAYSTACK. Return NULL if NEEDLE is not found in HAYSTACK. Unlike strstr(), this function works correctly in multibyte locales with encodings different from UTF-8. */ extern char * mbsstr (const char *haystack, const char *needle) _GL_ARG_NONNULL ((1, 2)); #endif #if @GNULIB_MBSCASECMP@ /* Compare the character strings S1 and S2, ignoring case, returning less than, equal to or greater than zero if S1 is lexicographically less than, equal to or greater than S2. Note: This function may, in multibyte locales, return 0 for strings of different lengths! Unlike strcasecmp(), this function works correctly in multibyte locales. */ extern int mbscasecmp (const char *s1, const char *s2) _GL_ARG_NONNULL ((1, 2)); #endif #if @GNULIB_MBSNCASECMP@ /* Compare the initial segment of the character string S1 consisting of at most N characters with the initial segment of the character string S2 consisting of at most N characters, ignoring case, returning less than, equal to or greater than zero if the initial segment of S1 is lexicographically less than, equal to or greater than the initial segment of S2. Note: This function may, in multibyte locales, return 0 for initial segments of different lengths! Unlike strncasecmp(), this function works correctly in multibyte locales. But beware that N is not a byte count but a character count! */ extern int mbsncasecmp (const char *s1, const char *s2, size_t n) _GL_ARG_NONNULL ((1, 2)); #endif #if @GNULIB_MBSPCASECMP@ /* Compare the initial segment of the character string STRING consisting of at most mbslen (PREFIX) characters with the character string PREFIX, ignoring case, returning less than, equal to or greater than zero if this initial segment is lexicographically less than, equal to or greater than PREFIX. Note: This function may, in multibyte locales, return 0 if STRING is of smaller length than PREFIX! Unlike strncasecmp(), this function works correctly in multibyte locales. */ extern char * mbspcasecmp (const char *string, const char *prefix) _GL_ARG_NONNULL ((1, 2)); #endif #if @GNULIB_MBSCASESTR@ /* Find the first occurrence of the character string NEEDLE in the character string HAYSTACK, using case-insensitive comparison. Note: This function may, in multibyte locales, return success even if strlen (haystack) < strlen (needle) ! Unlike strcasestr(), this function works correctly in multibyte locales. */ extern char * mbscasestr (const char *haystack, const char *needle) _GL_ARG_NONNULL ((1, 2)); #endif #if @GNULIB_MBSCSPN@ /* Find the first occurrence in the character string STRING of any character in the character string ACCEPT. Return the number of bytes from the beginning of the string to this occurrence, or to the end of the string if none exists. Unlike strcspn(), this function works correctly in multibyte locales. */ extern size_t mbscspn (const char *string, const char *accept) _GL_ARG_NONNULL ((1, 2)); #endif #if @GNULIB_MBSPBRK@ /* Find the first occurrence in the character string STRING of any character in the character string ACCEPT. Return the pointer to it, or NULL if none exists. Unlike strpbrk(), this function works correctly in multibyte locales. */ # define mbspbrk rpl_mbspbrk /* avoid collision with HP-UX function */ extern char * mbspbrk (const char *string, const char *accept) _GL_ARG_NONNULL ((1, 2)); #endif #if @GNULIB_MBSSPN@ /* Find the first occurrence in the character string STRING of any character not in the character string REJECT. Return the number of bytes from the beginning of the string to this occurrence, or to the end of the string if none exists. Unlike strspn(), this function works correctly in multibyte locales. */ extern size_t mbsspn (const char *string, const char *reject) _GL_ARG_NONNULL ((1, 2)); #endif #if @GNULIB_MBSSEP@ /* Search the next delimiter (multibyte character listed in the character string DELIM) starting at the character string *STRINGP. If one is found, overwrite it with a NUL, and advance *STRINGP to point to the next multibyte character after it. Otherwise, set *STRINGP to NULL. If *STRINGP was already NULL, nothing happens. Return the old value of *STRINGP. This is a variant of mbstok_r() that supports empty fields. Caveat: It modifies the original string. Caveat: These functions cannot be used on constant strings. Caveat: The identity of the delimiting character is lost. See also mbstok_r(). */ extern char * mbssep (char **stringp, const char *delim) _GL_ARG_NONNULL ((1, 2)); #endif #if @GNULIB_MBSTOK_R@ /* Parse the character string STRING into tokens separated by characters in the character string DELIM. If STRING is NULL, the saved pointer in SAVE_PTR is used as the next starting point. For example: char s[] = "-abc-=-def"; char *sp; x = mbstok_r(s, "-", &sp); // x = "abc", sp = "=-def" x = mbstok_r(NULL, "-=", &sp); // x = "def", sp = NULL x = mbstok_r(NULL, "=", &sp); // x = NULL // s = "abc\0-def\0" Caveat: It modifies the original string. Caveat: These functions cannot be used on constant strings. Caveat: The identity of the delimiting character is lost. See also mbssep(). */ extern char * mbstok_r (char *string, const char *delim, char **save_ptr) _GL_ARG_NONNULL ((2, 3)); #endif /* Map any int, typically from errno, into an error message. */ #if @GNULIB_STRERROR@ # if @REPLACE_STRERROR@ # undef strerror # define strerror rpl_strerror extern char *strerror (int); # endif #elif defined GNULIB_POSIXCHECK # undef strerror /* Assume strerror is always declared. */ _GL_WARN_ON_USE (strerror, "strerror is unportable - " "use gnulib module strerror to guarantee non-NULL result"); #endif #if @GNULIB_STRSIGNAL@ # if @REPLACE_STRSIGNAL@ # define strsignal rpl_strsignal # endif # if ! @HAVE_DECL_STRSIGNAL@ || @REPLACE_STRSIGNAL@ extern char *strsignal (int __sig); # endif #elif defined GNULIB_POSIXCHECK # undef strsignal # if HAVE_RAW_DECL_STRSIGNAL _GL_WARN_ON_USE (strsignal, "strsignal is unportable - " "use gnulib module strsignal for portability"); # endif #endif #if @GNULIB_STRVERSCMP@ # if !@HAVE_STRVERSCMP@ extern int strverscmp (const char *, const char *) _GL_ARG_NONNULL ((1, 2)); # endif #elif defined GNULIB_POSIXCHECK # undef strverscmp # if HAVE_RAW_DECL_STRVERSCMP _GL_WARN_ON_USE (strverscmp, "strverscmp is unportable - " "use gnulib module strverscmp for portability"); # endif #endif #ifdef __cplusplus } #endif #endif /* _GL_STRING_H */ #endif /* _GL_STRING_H */ libprelude-1.0.0/libmissing/alignof.h0000664000076400007640000000436311341220434014522 00000000000000/* Determine alignment of types. Copyright (C) 2003-2004, 2006, 2009-2010 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser 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 Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ #ifndef _ALIGNOF_H #define _ALIGNOF_H #include /* Determine the alignment of a structure slot (field) of a given type, at compile time. Note that the result depends on the ABI. Note: The result cannot be used as a value for an 'enum' constant, due to bugs in HP-UX 10.20 cc and AIX 3.2.5 xlc. */ #if defined __cplusplus template struct alignof_helper { char __slot1; type __slot2; }; # define alignof_slot(type) offsetof (alignof_helper, __slot2) #else # define alignof_slot(type) offsetof (struct { char __slot1; type __slot2; }, __slot2) #endif /* Determine the good alignment of a object of the given type at compile time. Note that this is not necessarily the same as alignof_slot(type). For example, with GNU C on x86 platforms: alignof_type(double) = 8, but - when -malign-double is not specified: alignof_slot(double) = 4, - when -malign-double is specified: alignof_slot(double) = 8. Note: The result cannot be used as a value for an 'enum' constant, due to bugs in HP-UX 10.20 cc and AIX 3.2.5 xlc. */ #if defined __GNUC__ # define alignof_type __alignof__ #else # define alignof_type alignof_slot #endif /* alignof is an alias for alignof_slot semantics, since that's what most callers need. Note: The result cannot be used as a value for an 'enum' constant, due to bugs in HP-UX 10.20 cc and AIX 3.2.5 xlc. */ #define alignof alignof_slot #endif /* _ALIGNOF_H */ libprelude-1.0.0/libmissing/signbitf.c0000664000076400007640000000412511341220440014674 00000000000000/* signbit() macro: Determine the sign bit of a floating-point number. Copyright (C) 2007, 2009, 2010 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 3 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 Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . */ #include /* Specification. */ #include #include #include "isnanf-nolibm.h" #include "float+.h" #ifdef gl_signbitf_OPTIMIZED_MACRO # undef gl_signbitf #endif int gl_signbitf (float arg) { #if defined FLT_SIGNBIT_WORD && defined FLT_SIGNBIT_BIT /* The use of a union to extract the bits of the representation of a 'long double' is safe in practice, despite of the "aliasing rules" of C99, because the GCC docs say "Even with '-fstrict-aliasing', type-punning is allowed, provided the memory is accessed through the union type." and similarly for other compilers. */ # define NWORDS \ ((sizeof (float) + sizeof (unsigned int) - 1) / sizeof (unsigned int)) union { float value; unsigned int word[NWORDS]; } m; m.value = arg; return (m.word[FLT_SIGNBIT_WORD] >> FLT_SIGNBIT_BIT) & 1; #elif HAVE_COPYSIGNF_IN_LIBC return copysignf (1.0f, arg) < 0; #else /* This does not do the right thing for NaN, but this is irrelevant for most use cases. */ if (isnanf (arg)) return 0; if (arg < 0.0f) return 1; else if (arg == 0.0f) { /* Distinguish 0.0f and -0.0f. */ static float plus_zero = 0.0f; float arg_mem = arg; return (memcmp (&plus_zero, &arg_mem, SIZEOF_FLT) != 0); } else return 0; #endif } libprelude-1.0.0/libmissing/close-hook.c0000664000076400007640000000504411341220434015136 00000000000000/* Hook for making the close() function extensible. Copyright (C) 2009, 2010 Free Software Foundation, Inc. Written by Bruno Haible , 2009. This program is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 3 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 Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . */ #include /* Specification. */ #include "close-hook.h" #include #include #undef close /* Currently, this entire code is only needed for the handling of sockets on native Windows platforms. */ #if WINDOWS_SOCKETS /* The first and last link in the doubly linked list. Initially the list is empty. */ static struct close_hook anchor = { &anchor, &anchor, NULL }; int execute_close_hooks (int fd, const struct close_hook *remaining_list) { if (remaining_list == &anchor) /* End of list reached. */ return close (fd); else return remaining_list->private_fn (fd, remaining_list->private_next); } int execute_all_close_hooks (int fd) { return execute_close_hooks (fd, anchor.private_next); } void register_close_hook (close_hook_fn hook, struct close_hook *link) { if (link->private_next == NULL && link->private_prev == NULL) { /* Add the link to the doubly linked list. */ link->private_next = anchor.private_next; link->private_prev = &anchor; link->private_fn = hook; anchor.private_next->private_prev = link; anchor.private_next = link; } else { /* The link is already in use. */ if (link->private_fn != hook) abort (); } } void unregister_close_hook (struct close_hook *link) { struct close_hook *next = link->private_next; struct close_hook *prev = link->private_prev; if (next != NULL && prev != NULL) { /* The link is in use. Remove it from the doubly linked list. */ prev->private_next = next; next->private_prev = prev; /* Clear the link, to mark it unused. */ link->private_next = NULL; link->private_prev = NULL; link->private_fn = NULL; } } #endif libprelude-1.0.0/libmissing/snprintf.c0000664000076400007640000000366111341220440014736 00000000000000/* Formatted output to strings. Copyright (C) 2004, 2006-2010 Free Software Foundation, Inc. Written by Simon Josefsson and Paul Eggert. This program is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser 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 Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ #include /* Specification. */ #include #include #include #include #include #include #include "vasnprintf.h" /* Print formatted output to string STR. Similar to sprintf, but additional length SIZE limit how much is written into STR. Returns string length of formatted string (which may be larger than SIZE). STR may be NULL, in which case nothing will be written. On error, return a negative value. */ int snprintf (char *str, size_t size, const char *format, ...) { char *output; size_t len; size_t lenbuf = size; va_list args; va_start (args, format); output = vasnprintf (str, &lenbuf, format, args); len = lenbuf; va_end (args); if (!output) return -1; if (output != str) { if (size) { size_t pruned_len = (len < size ? len : size - 1); memcpy (str, output, pruned_len); str[pruned_len] = '\0'; } free (output); } if (INT_MAX < len) { errno = EOVERFLOW; return -1; } return len; } libprelude-1.0.0/libmissing/sockets.c0000664000076400007640000000563111341220440014545 00000000000000/* sockets.c --- wrappers for Windows socket functions Copyright (C) 2008-2010 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 3 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 Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . */ /* Written by Simon Josefsson */ #include /* Specification. */ #include "sockets.h" #if WINDOWS_SOCKETS /* This includes winsock2.h on MinGW. */ # include # include "close-hook.h" /* Get set_winsock_errno, FD_TO_SOCKET etc. */ # include "w32sock.h" static int close_fd_maybe_socket (int fd, const struct close_hook *remaining_list) { SOCKET sock; WSANETWORKEVENTS ev; /* Test whether fd refers to a socket. */ sock = FD_TO_SOCKET (fd); ev.lNetworkEvents = 0xDEADBEEF; WSAEnumNetworkEvents (sock, NULL, &ev); if (ev.lNetworkEvents != 0xDEADBEEF) { /* fd refers to a socket. */ /* FIXME: other applications, like squid, use an undocumented _free_osfhnd free function. But this is not enough: The 'osfile' flags for fd also needs to be cleared, but it is hard to access it. Instead, here we just close twice the file descriptor. */ if (closesocket (sock)) { set_winsock_errno (); return -1; } else { /* This call frees the file descriptor and does a CloseHandle ((HANDLE) _get_osfhandle (fd)), which fails. */ _close (fd); return 0; } } else /* Some other type of file descriptor. */ return execute_close_hooks (fd, remaining_list); } static struct close_hook close_sockets_hook; static int initialized_sockets_version /* = 0 */; #endif /* WINDOWS_SOCKETS */ int gl_sockets_startup (int version _GL_UNUSED) { #if WINDOWS_SOCKETS if (version > initialized_sockets_version) { WSADATA data; int err; err = WSAStartup (version, &data); if (err != 0) return 1; if (data.wVersion < version) return 2; if (initialized_sockets_version == 0) register_close_hook (close_fd_maybe_socket, &close_sockets_hook); initialized_sockets_version = version; } #endif return 0; } int gl_sockets_cleanup (void) { #if WINDOWS_SOCKETS int err; initialized_sockets_version = 0; unregister_close_hook (&close_sockets_hook); err = WSACleanup (); if (err != 0) return 1; #endif return 0; } libprelude-1.0.0/libmissing/arpa_inet.in.h0000664000076400007640000000606011341220434015446 00000000000000/* A GNU-like . Copyright (C) 2005-2006, 2008-2010 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser 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 Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ #ifndef _GL_ARPA_INET_H /* Gnulib's sys/socket.h is responsible for pulling in winsock2.h etc under MinGW. But avoid namespace pollution on glibc systems. */ #ifndef __GLIBC__ # include #endif #if @HAVE_ARPA_INET_H@ # if __GNUC__ >= 3 @PRAGMA_SYSTEM_HEADER@ # endif /* The include_next requires a split double-inclusion guard. */ # @INCLUDE_NEXT@ @NEXT_ARPA_INET_H@ #endif #ifndef _GL_ARPA_INET_H #define _GL_ARPA_INET_H /* The definition of _GL_ARG_NONNULL is copied here. */ /* The definition of _GL_WARN_ON_USE is copied here. */ #ifdef __cplusplus extern "C" { #endif #if @GNULIB_INET_NTOP@ # if !@HAVE_DECL_INET_NTOP@ /* Converts an internet address from internal format to a printable, presentable format. AF is an internet address family, such as AF_INET or AF_INET6. SRC points to a 'struct in_addr' (for AF_INET) or 'struct in6_addr' (for AF_INET6). DST points to a buffer having room for CNT bytes. The printable representation of the address (in numeric form, not surrounded by [...], no reverse DNS is done) is placed in DST, and DST is returned. If an error occurs, the return value is NULL and errno is set. If CNT bytes are not sufficient to hold the result, the return value is NULL and errno is set to ENOSPC. A good value for CNT is 46. For more details, see the POSIX:2001 specification . */ extern const char *inet_ntop (int af, const void *restrict src, char *restrict dst, socklen_t cnt) _GL_ARG_NONNULL ((2, 3)); # endif #elif defined GNULIB_POSIXCHECK # undef inet_ntop # if HAVE_RAW_DECL_INET_NTOP _GL_WARN_ON_USE (inet_ntop, "inet_ntop is unportable - " "use gnulib module inet_ntop for portability"); # endif #endif #if @GNULIB_INET_PTON@ # if !@HAVE_DECL_INET_PTON@ extern int inet_pton (int af, const char *restrict src, void *restrict dst) _GL_ARG_NONNULL ((2, 3)); # endif #elif defined GNULIB_POSIXCHECK # undef inet_pton # if HAVE_RAW_DECL_INET_PTON _GL_WARN_ON_USE (inet_pton, "inet_pton is unportable - " "use gnulib module inet_pton for portability"); # endif #endif #ifdef __cplusplus } #endif #endif /* _GL_ARPA_INET_H */ #endif /* _GL_ARPA_INET_H */ libprelude-1.0.0/libmissing/c-ctype.h0000664000076400007640000002150511341220434014444 00000000000000/* Character handling in C locale. These functions work like the corresponding functions in , except that they have the C (POSIX) locale hardwired, whereas the functions' behaviour depends on the current locale set via setlocale. Copyright (C) 2000-2003, 2006, 2008-2010 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser 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 Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ #ifndef C_CTYPE_H #define C_CTYPE_H #include #ifdef __cplusplus extern "C" { #endif /* The functions defined in this file assume the "C" locale and a character set without diacritics (ASCII-US or EBCDIC-US or something like that). Even if the "C" locale on a particular system is an extension of the ASCII character set (like on BeOS, where it is UTF-8, or on AmigaOS, where it is ISO-8859-1), the functions in this file recognize only the ASCII characters. */ /* Check whether the ASCII optimizations apply. */ /* ANSI C89 (and ISO C99 5.2.1.3 too) already guarantees that '0', '1', ..., '9' have consecutive integer values. */ #define C_CTYPE_CONSECUTIVE_DIGITS 1 #if ('A' <= 'Z') \ && ('A' + 1 == 'B') && ('B' + 1 == 'C') && ('C' + 1 == 'D') \ && ('D' + 1 == 'E') && ('E' + 1 == 'F') && ('F' + 1 == 'G') \ && ('G' + 1 == 'H') && ('H' + 1 == 'I') && ('I' + 1 == 'J') \ && ('J' + 1 == 'K') && ('K' + 1 == 'L') && ('L' + 1 == 'M') \ && ('M' + 1 == 'N') && ('N' + 1 == 'O') && ('O' + 1 == 'P') \ && ('P' + 1 == 'Q') && ('Q' + 1 == 'R') && ('R' + 1 == 'S') \ && ('S' + 1 == 'T') && ('T' + 1 == 'U') && ('U' + 1 == 'V') \ && ('V' + 1 == 'W') && ('W' + 1 == 'X') && ('X' + 1 == 'Y') \ && ('Y' + 1 == 'Z') #define C_CTYPE_CONSECUTIVE_UPPERCASE 1 #endif #if ('a' <= 'z') \ && ('a' + 1 == 'b') && ('b' + 1 == 'c') && ('c' + 1 == 'd') \ && ('d' + 1 == 'e') && ('e' + 1 == 'f') && ('f' + 1 == 'g') \ && ('g' + 1 == 'h') && ('h' + 1 == 'i') && ('i' + 1 == 'j') \ && ('j' + 1 == 'k') && ('k' + 1 == 'l') && ('l' + 1 == 'm') \ && ('m' + 1 == 'n') && ('n' + 1 == 'o') && ('o' + 1 == 'p') \ && ('p' + 1 == 'q') && ('q' + 1 == 'r') && ('r' + 1 == 's') \ && ('s' + 1 == 't') && ('t' + 1 == 'u') && ('u' + 1 == 'v') \ && ('v' + 1 == 'w') && ('w' + 1 == 'x') && ('x' + 1 == 'y') \ && ('y' + 1 == 'z') #define C_CTYPE_CONSECUTIVE_LOWERCASE 1 #endif #if (' ' == 32) && ('!' == 33) && ('"' == 34) && ('#' == 35) \ && ('%' == 37) && ('&' == 38) && ('\'' == 39) && ('(' == 40) \ && (')' == 41) && ('*' == 42) && ('+' == 43) && (',' == 44) \ && ('-' == 45) && ('.' == 46) && ('/' == 47) && ('0' == 48) \ && ('1' == 49) && ('2' == 50) && ('3' == 51) && ('4' == 52) \ && ('5' == 53) && ('6' == 54) && ('7' == 55) && ('8' == 56) \ && ('9' == 57) && (':' == 58) && (';' == 59) && ('<' == 60) \ && ('=' == 61) && ('>' == 62) && ('?' == 63) && ('A' == 65) \ && ('B' == 66) && ('C' == 67) && ('D' == 68) && ('E' == 69) \ && ('F' == 70) && ('G' == 71) && ('H' == 72) && ('I' == 73) \ && ('J' == 74) && ('K' == 75) && ('L' == 76) && ('M' == 77) \ && ('N' == 78) && ('O' == 79) && ('P' == 80) && ('Q' == 81) \ && ('R' == 82) && ('S' == 83) && ('T' == 84) && ('U' == 85) \ && ('V' == 86) && ('W' == 87) && ('X' == 88) && ('Y' == 89) \ && ('Z' == 90) && ('[' == 91) && ('\\' == 92) && (']' == 93) \ && ('^' == 94) && ('_' == 95) && ('a' == 97) && ('b' == 98) \ && ('c' == 99) && ('d' == 100) && ('e' == 101) && ('f' == 102) \ && ('g' == 103) && ('h' == 104) && ('i' == 105) && ('j' == 106) \ && ('k' == 107) && ('l' == 108) && ('m' == 109) && ('n' == 110) \ && ('o' == 111) && ('p' == 112) && ('q' == 113) && ('r' == 114) \ && ('s' == 115) && ('t' == 116) && ('u' == 117) && ('v' == 118) \ && ('w' == 119) && ('x' == 120) && ('y' == 121) && ('z' == 122) \ && ('{' == 123) && ('|' == 124) && ('}' == 125) && ('~' == 126) /* The character set is ASCII or one of its variants or extensions, not EBCDIC. Testing the value of '\n' and '\r' is not relevant. */ #define C_CTYPE_ASCII 1 #endif /* Function declarations. */ /* Unlike the functions in , which require an argument in the range of the 'unsigned char' type, the functions here operate on values that are in the 'unsigned char' range or in the 'char' range. In other words, when you have a 'char' value, you need to cast it before using it as argument to a function: const char *s = ...; if (isalpha ((unsigned char) *s)) ... but you don't need to cast it for the functions defined in this file: const char *s = ...; if (c_isalpha (*s)) ... */ extern bool c_isascii (int c); /* not locale dependent */ extern bool c_isalnum (int c); extern bool c_isalpha (int c); extern bool c_isblank (int c); extern bool c_iscntrl (int c); extern bool c_isdigit (int c); extern bool c_islower (int c); extern bool c_isgraph (int c); extern bool c_isprint (int c); extern bool c_ispunct (int c); extern bool c_isspace (int c); extern bool c_isupper (int c); extern bool c_isxdigit (int c); extern int c_tolower (int c); extern int c_toupper (int c); #if defined __GNUC__ && defined __OPTIMIZE__ && !defined __OPTIMIZE_SIZE__ && !defined NO_C_CTYPE_MACROS /* ASCII optimizations. */ #undef c_isascii #define c_isascii(c) \ ({ int __c = (c); \ (__c >= 0x00 && __c <= 0x7f); \ }) #if C_CTYPE_CONSECUTIVE_DIGITS \ && C_CTYPE_CONSECUTIVE_UPPERCASE && C_CTYPE_CONSECUTIVE_LOWERCASE #if C_CTYPE_ASCII #undef c_isalnum #define c_isalnum(c) \ ({ int __c = (c); \ ((__c >= '0' && __c <= '9') \ || ((__c & ~0x20) >= 'A' && (__c & ~0x20) <= 'Z')); \ }) #else #undef c_isalnum #define c_isalnum(c) \ ({ int __c = (c); \ ((__c >= '0' && __c <= '9') \ || (__c >= 'A' && __c <= 'Z') \ || (__c >= 'a' && __c <= 'z')); \ }) #endif #endif #if C_CTYPE_CONSECUTIVE_UPPERCASE && C_CTYPE_CONSECUTIVE_LOWERCASE #if C_CTYPE_ASCII #undef c_isalpha #define c_isalpha(c) \ ({ int __c = (c); \ ((__c & ~0x20) >= 'A' && (__c & ~0x20) <= 'Z'); \ }) #else #undef c_isalpha #define c_isalpha(c) \ ({ int __c = (c); \ ((__c >= 'A' && __c <= 'Z') || (__c >= 'a' && __c <= 'z')); \ }) #endif #endif #undef c_isblank #define c_isblank(c) \ ({ int __c = (c); \ (__c == ' ' || __c == '\t'); \ }) #if C_CTYPE_ASCII #undef c_iscntrl #define c_iscntrl(c) \ ({ int __c = (c); \ ((__c & ~0x1f) == 0 || __c == 0x7f); \ }) #endif #if C_CTYPE_CONSECUTIVE_DIGITS #undef c_isdigit #define c_isdigit(c) \ ({ int __c = (c); \ (__c >= '0' && __c <= '9'); \ }) #endif #if C_CTYPE_CONSECUTIVE_LOWERCASE #undef c_islower #define c_islower(c) \ ({ int __c = (c); \ (__c >= 'a' && __c <= 'z'); \ }) #endif #if C_CTYPE_ASCII #undef c_isgraph #define c_isgraph(c) \ ({ int __c = (c); \ (__c >= '!' && __c <= '~'); \ }) #endif #if C_CTYPE_ASCII #undef c_isprint #define c_isprint(c) \ ({ int __c = (c); \ (__c >= ' ' && __c <= '~'); \ }) #endif #if C_CTYPE_ASCII #undef c_ispunct #define c_ispunct(c) \ ({ int _c = (c); \ (c_isgraph (_c) && ! c_isalnum (_c)); \ }) #endif #undef c_isspace #define c_isspace(c) \ ({ int __c = (c); \ (__c == ' ' || __c == '\t' \ || __c == '\n' || __c == '\v' || __c == '\f' || __c == '\r'); \ }) #if C_CTYPE_CONSECUTIVE_UPPERCASE #undef c_isupper #define c_isupper(c) \ ({ int __c = (c); \ (__c >= 'A' && __c <= 'Z'); \ }) #endif #if C_CTYPE_CONSECUTIVE_DIGITS \ && C_CTYPE_CONSECUTIVE_UPPERCASE && C_CTYPE_CONSECUTIVE_LOWERCASE #if C_CTYPE_ASCII #undef c_isxdigit #define c_isxdigit(c) \ ({ int __c = (c); \ ((__c >= '0' && __c <= '9') \ || ((__c & ~0x20) >= 'A' && (__c & ~0x20) <= 'F')); \ }) #else #undef c_isxdigit #define c_isxdigit(c) \ ({ int __c = (c); \ ((__c >= '0' && __c <= '9') \ || (__c >= 'A' && __c <= 'F') \ || (__c >= 'a' && __c <= 'f')); \ }) #endif #endif #if C_CTYPE_CONSECUTIVE_UPPERCASE && C_CTYPE_CONSECUTIVE_LOWERCASE #undef c_tolower #define c_tolower(c) \ ({ int __c = (c); \ (__c >= 'A' && __c <= 'Z' ? __c - 'A' + 'a' : __c); \ }) #undef c_toupper #define c_toupper(c) \ ({ int __c = (c); \ (__c >= 'a' && __c <= 'z' ? __c - 'a' + 'A' : __c); \ }) #endif #endif /* optimizing for speed */ #ifdef __cplusplus } #endif #endif /* C_CTYPE_H */ libprelude-1.0.0/libmissing/bind.c0000664000076400007640000000223511341220434014006 00000000000000/* bind.c --- wrappers for Windows bind function Copyright (C) 2008, 2009, 2010 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 3 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 Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . */ /* Written by Paolo Bonzini */ #include #define WIN32_LEAN_AND_MEAN /* Get winsock2.h. */ #include /* Get set_winsock_errno, FD_TO_SOCKET etc. */ #include "w32sock.h" #undef bind int rpl_bind (int fd, struct sockaddr *sockaddr, int len) { SOCKET sock = FD_TO_SOCKET (fd); int r = bind (sock, sockaddr, len); if (r < 0) set_winsock_errno (); return r; } libprelude-1.0.0/libmissing/ref-add.sin0000664000076400007640000000211211341220437014740 00000000000000# Add this package to a list of references stored in a text file. # # Copyright (C) 2000, 2009, 2010 Free Software Foundation, Inc. # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU Lesser 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 Lesser General Public License for more details. # # You should have received a copy of the GNU Lesser General Public License along # with this program; if not, write to the Free Software Foundation, # Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. # # Written by Bruno Haible . # /^# Packages using this file: / { s/# Packages using this file:// ta :a s/ @PACKAGE@ / @PACKAGE@ / tb s/ $/ @PACKAGE@ / :b s/^/# Packages using this file:/ } libprelude-1.0.0/libmissing/asnprintf.c0000664000076400007640000000220511341220434015073 00000000000000/* Formatted output to strings. Copyright (C) 1999, 2002, 2006, 2009, 2010 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser 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 Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ #include /* Specification. */ #include "vasnprintf.h" #include char * asnprintf (char *resultbuf, size_t *lengthp, const char *format, ...) { va_list args; char *result; va_start (args, format); result = vasnprintf (resultbuf, lengthp, format, args); va_end (args); return result; } libprelude-1.0.0/libmissing/strsep.c0000664000076400007640000000275111341220440014412 00000000000000/* Copyright (C) 2004, 2007, 2009, 2010 Free Software Foundation, Inc. Written by Yoann Vandoorselaere . This program is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser 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 Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ #ifdef HAVE_CONFIG_H # include #endif /* Specification. */ #include char * strsep (char **stringp, const char *delim) { char *start = *stringp; char *ptr; if (start == NULL) return NULL; /* Optimize the case of no delimiters. */ if (delim[0] == '\0') { *stringp = NULL; return start; } /* Optimize the case of one delimiter. */ if (delim[1] == '\0') ptr = strchr (start, delim[0]); else /* The general case. */ ptr = strpbrk (start, delim); if (ptr == NULL) { *stringp = NULL; return start; } *ptr = '\0'; *stringp = ptr + 1; return start; } libprelude-1.0.0/libmissing/ftw.c0000664000076400007640000000631411341220434013674 00000000000000/* Copyright (C) 2005 Free Software Foundation, Inc. * Written by Yoann Vandoorselaere * * The file is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This file 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 * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this file; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 * USA. */ #ifdef HAVE_CONFIG_H #include #endif #include #include #include #include #include #include #include "ftw_.h" #include "pathmax.h" static int get_path_infos(const char *path, struct stat *st, int *flag) { int ret; ret = stat(path, st); if ( ret < 0 ) { *flag = FTW_NS; return -1; } if ( S_ISREG(st->st_mode) ) *flag = FTW_F; else if ( S_ISDIR(st->st_mode) ) *flag = FTW_D; #ifdef S_ISLNK else if ( S_ISLNK(st->st_mode) ) *flag = FTW_SL; #endif return ret; } int ftw(const char *dir, int (*fn)(const char *file, const struct stat *sb, int flag), int nopenfd) { DIR *d; size_t len; struct stat st; struct dirent *de; int flag, ret = 0; char filename[PATH_MAX]; ret = get_path_infos(dir, &st, &flag); if ( ret < 0 ) return -1; d = opendir(dir); if ( ! d ) return (errno == EACCES) ? fn(dir, &st, FTW_DNR) : -1; ret = fn(dir, &st, flag); if ( ret < 0 ) { closedir(d); return ret; } while ( (de = readdir(d)) ) { len = snprintf(filename, sizeof(filename), "%s/%s", dir, de->d_name); if ( len < 0 || len >= sizeof(filename) ) { errno = ENAMETOOLONG; return -1; } ret = get_path_infos(filename, &st, &flag); if ( ret < 0 ) break; if ( flag == FTW_D ) { if ( strcmp(de->d_name, "..") == 0 || strcmp(de->d_name, ".") == 0 ) continue; ret = ftw(filename, fn, nopenfd); if ( ret < 0 ) break; continue; } ret = fn(filename, (flag == FTW_NS) ? NULL : &st, flag); if ( ret < 0 ) break; } closedir(d); return ret; } libprelude-1.0.0/libmissing/dup2.c0000664000076400007640000000642211341220434013746 00000000000000/* Duplicate an open file descriptor to a specified file descriptor. Copyright (C) 1999, 2004-2007, 2009-2010 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 3 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 Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . */ /* written by Paul Eggert */ #include /* Specification. */ #include #include #include #if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ /* Get declarations of the Win32 API functions. */ # define WIN32_LEAN_AND_MEAN # include #endif #if HAVE_DUP2 # undef dup2 int rpl_dup2 (int fd, int desired_fd) { int result; # if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ /* If fd is closed, mingw hangs on dup2 (fd, fd). If fd is open, dup2 (fd, fd) returns 0, but all further attempts to use fd in future dup2 calls will hang. */ if (fd == desired_fd) { if ((HANDLE) _get_osfhandle (fd) == INVALID_HANDLE_VALUE) { errno = EBADF; return -1; } return fd; } /* Wine 1.0.1 return 0 when desired_fd is negative but not -1: http://bugs.winehq.org/show_bug.cgi?id=21289 */ if (desired_fd < 0) { errno = EBADF; return -1; } # endif result = dup2 (fd, desired_fd); # ifdef __linux__ /* Correct a Linux return value. */ if (fd == desired_fd && result == (unsigned int) -EBADF) { errno = EBADF; result = -1; } # endif if (result == 0) result = desired_fd; /* Correct a cygwin 1.5.x errno value. */ else if (result == -1 && errno == EMFILE) errno = EBADF; # if REPLACE_FCHDIR if (fd != desired_fd && result != -1) result = _gl_register_dup (fd, result); # endif return result; } #else /* !HAVE_DUP2 */ /* On older platforms, dup2 did not exist. */ # ifndef F_DUPFD static int dupfd (int fd, int desired_fd) { int duplicated_fd = dup (fd); if (duplicated_fd < 0 || duplicated_fd == desired_fd) return duplicated_fd; else { int r = dupfd (fd, desired_fd); int e = errno; close (duplicated_fd); errno = e; return r; } } # endif int dup2 (int fd, int desired_fd) { int result = fcntl (fd, F_GETFL) < 0 ? -1 : fd; if (result == -1 || fd == desired_fd) return result; close (desired_fd); # ifdef F_DUPFD result = fcntl (fd, F_DUPFD, desired_fd); # if REPLACE_FCHDIR if (0 <= result) result = _gl_register_dup (fd, result); # endif # else result = dupfd (fd, desired_fd); # endif if (result == -1 && (errno == EMFILE || errno == EINVAL)) errno = EBADF; return result; } #endif /* !HAVE_DUP2 */ libprelude-1.0.0/libmissing/regcomp.c0000664000076400007640000033255711341220437014546 00000000000000/* Extended regular expression matching and search library. Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Isamu Hasegawa . This program is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser 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 Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ static reg_errcode_t re_compile_internal (regex_t *preg, const char * pattern, size_t length, reg_syntax_t syntax); static void re_compile_fastmap_iter (regex_t *bufp, const re_dfastate_t *init_state, char *fastmap); static reg_errcode_t init_dfa (re_dfa_t *dfa, size_t pat_len); #ifdef RE_ENABLE_I18N static void free_charset (re_charset_t *cset); #endif /* RE_ENABLE_I18N */ static void free_workarea_compile (regex_t *preg); static reg_errcode_t create_initial_state (re_dfa_t *dfa); #ifdef RE_ENABLE_I18N static void optimize_utf8 (re_dfa_t *dfa); #endif static reg_errcode_t analyze (regex_t *preg); static reg_errcode_t preorder (bin_tree_t *root, reg_errcode_t (fn (void *, bin_tree_t *)), void *extra); static reg_errcode_t postorder (bin_tree_t *root, reg_errcode_t (fn (void *, bin_tree_t *)), void *extra); static reg_errcode_t optimize_subexps (void *extra, bin_tree_t *node); static reg_errcode_t lower_subexps (void *extra, bin_tree_t *node); static bin_tree_t *lower_subexp (reg_errcode_t *err, regex_t *preg, bin_tree_t *node); static reg_errcode_t calc_first (void *extra, bin_tree_t *node); static reg_errcode_t calc_next (void *extra, bin_tree_t *node); static reg_errcode_t link_nfa_nodes (void *extra, bin_tree_t *node); static Idx duplicate_node (re_dfa_t *dfa, Idx org_idx, unsigned int constraint); static Idx search_duplicated_node (const re_dfa_t *dfa, Idx org_node, unsigned int constraint); static reg_errcode_t calc_eclosure (re_dfa_t *dfa); static reg_errcode_t calc_eclosure_iter (re_node_set *new_set, re_dfa_t *dfa, Idx node, bool root); static reg_errcode_t calc_inveclosure (re_dfa_t *dfa); static Idx fetch_number (re_string_t *input, re_token_t *token, reg_syntax_t syntax); static int peek_token (re_token_t *token, re_string_t *input, reg_syntax_t syntax) internal_function; static bin_tree_t *parse (re_string_t *regexp, regex_t *preg, reg_syntax_t syntax, reg_errcode_t *err); static bin_tree_t *parse_reg_exp (re_string_t *regexp, regex_t *preg, re_token_t *token, reg_syntax_t syntax, Idx nest, reg_errcode_t *err); static bin_tree_t *parse_branch (re_string_t *regexp, regex_t *preg, re_token_t *token, reg_syntax_t syntax, Idx nest, reg_errcode_t *err); static bin_tree_t *parse_expression (re_string_t *regexp, regex_t *preg, re_token_t *token, reg_syntax_t syntax, Idx nest, reg_errcode_t *err); static bin_tree_t *parse_sub_exp (re_string_t *regexp, regex_t *preg, re_token_t *token, reg_syntax_t syntax, Idx nest, reg_errcode_t *err); static bin_tree_t *parse_dup_op (bin_tree_t *dup_elem, re_string_t *regexp, re_dfa_t *dfa, re_token_t *token, reg_syntax_t syntax, reg_errcode_t *err); static bin_tree_t *parse_bracket_exp (re_string_t *regexp, re_dfa_t *dfa, re_token_t *token, reg_syntax_t syntax, reg_errcode_t *err); static reg_errcode_t parse_bracket_element (bracket_elem_t *elem, re_string_t *regexp, re_token_t *token, int token_len, re_dfa_t *dfa, reg_syntax_t syntax, bool accept_hyphen); static reg_errcode_t parse_bracket_symbol (bracket_elem_t *elem, re_string_t *regexp, re_token_t *token); #ifdef RE_ENABLE_I18N static reg_errcode_t build_equiv_class (bitset_t sbcset, re_charset_t *mbcset, Idx *equiv_class_alloc, const unsigned char *name); static reg_errcode_t build_charclass (RE_TRANSLATE_TYPE trans, bitset_t sbcset, re_charset_t *mbcset, Idx *char_class_alloc, const unsigned char *class_name, reg_syntax_t syntax); #else /* not RE_ENABLE_I18N */ static reg_errcode_t build_equiv_class (bitset_t sbcset, const unsigned char *name); static reg_errcode_t build_charclass (RE_TRANSLATE_TYPE trans, bitset_t sbcset, const unsigned char *class_name, reg_syntax_t syntax); #endif /* not RE_ENABLE_I18N */ static bin_tree_t *build_charclass_op (re_dfa_t *dfa, RE_TRANSLATE_TYPE trans, const unsigned char *class_name, const unsigned char *extra, bool non_match, reg_errcode_t *err); static bin_tree_t *create_tree (re_dfa_t *dfa, bin_tree_t *left, bin_tree_t *right, re_token_type_t type); static bin_tree_t *create_token_tree (re_dfa_t *dfa, bin_tree_t *left, bin_tree_t *right, const re_token_t *token); static bin_tree_t *duplicate_tree (const bin_tree_t *src, re_dfa_t *dfa); static void free_token (re_token_t *node); static reg_errcode_t free_tree (void *extra, bin_tree_t *node); static reg_errcode_t mark_opt_subexp (void *extra, bin_tree_t *node); /* This table gives an error message for each of the error codes listed in regex.h. Obviously the order here has to be same as there. POSIX doesn't require that we do anything for REG_NOERROR, but why not be nice? */ static const char __re_error_msgid[] = { #define REG_NOERROR_IDX 0 gettext_noop ("Success") /* REG_NOERROR */ "\0" #define REG_NOMATCH_IDX (REG_NOERROR_IDX + sizeof "Success") gettext_noop ("No match") /* REG_NOMATCH */ "\0" #define REG_BADPAT_IDX (REG_NOMATCH_IDX + sizeof "No match") gettext_noop ("Invalid regular expression") /* REG_BADPAT */ "\0" #define REG_ECOLLATE_IDX (REG_BADPAT_IDX + sizeof "Invalid regular expression") gettext_noop ("Invalid collation character") /* REG_ECOLLATE */ "\0" #define REG_ECTYPE_IDX (REG_ECOLLATE_IDX + sizeof "Invalid collation character") gettext_noop ("Invalid character class name") /* REG_ECTYPE */ "\0" #define REG_EESCAPE_IDX (REG_ECTYPE_IDX + sizeof "Invalid character class name") gettext_noop ("Trailing backslash") /* REG_EESCAPE */ "\0" #define REG_ESUBREG_IDX (REG_EESCAPE_IDX + sizeof "Trailing backslash") gettext_noop ("Invalid back reference") /* REG_ESUBREG */ "\0" #define REG_EBRACK_IDX (REG_ESUBREG_IDX + sizeof "Invalid back reference") gettext_noop ("Unmatched [ or [^") /* REG_EBRACK */ "\0" #define REG_EPAREN_IDX (REG_EBRACK_IDX + sizeof "Unmatched [ or [^") gettext_noop ("Unmatched ( or \\(") /* REG_EPAREN */ "\0" #define REG_EBRACE_IDX (REG_EPAREN_IDX + sizeof "Unmatched ( or \\(") gettext_noop ("Unmatched \\{") /* REG_EBRACE */ "\0" #define REG_BADBR_IDX (REG_EBRACE_IDX + sizeof "Unmatched \\{") gettext_noop ("Invalid content of \\{\\}") /* REG_BADBR */ "\0" #define REG_ERANGE_IDX (REG_BADBR_IDX + sizeof "Invalid content of \\{\\}") gettext_noop ("Invalid range end") /* REG_ERANGE */ "\0" #define REG_ESPACE_IDX (REG_ERANGE_IDX + sizeof "Invalid range end") gettext_noop ("Memory exhausted") /* REG_ESPACE */ "\0" #define REG_BADRPT_IDX (REG_ESPACE_IDX + sizeof "Memory exhausted") gettext_noop ("Invalid preceding regular expression") /* REG_BADRPT */ "\0" #define REG_EEND_IDX (REG_BADRPT_IDX + sizeof "Invalid preceding regular expression") gettext_noop ("Premature end of regular expression") /* REG_EEND */ "\0" #define REG_ESIZE_IDX (REG_EEND_IDX + sizeof "Premature end of regular expression") gettext_noop ("Regular expression too big") /* REG_ESIZE */ "\0" #define REG_ERPAREN_IDX (REG_ESIZE_IDX + sizeof "Regular expression too big") gettext_noop ("Unmatched ) or \\)") /* REG_ERPAREN */ }; static const size_t __re_error_msgid_idx[] = { REG_NOERROR_IDX, REG_NOMATCH_IDX, REG_BADPAT_IDX, REG_ECOLLATE_IDX, REG_ECTYPE_IDX, REG_EESCAPE_IDX, REG_ESUBREG_IDX, REG_EBRACK_IDX, REG_EPAREN_IDX, REG_EBRACE_IDX, REG_BADBR_IDX, REG_ERANGE_IDX, REG_ESPACE_IDX, REG_BADRPT_IDX, REG_EEND_IDX, REG_ESIZE_IDX, REG_ERPAREN_IDX }; /* Entry points for GNU code. */ /* re_compile_pattern is the GNU regular expression compiler: it compiles PATTERN (of length LENGTH) and puts the result in BUFP. Returns 0 if the pattern was valid, otherwise an error string. Assumes the `allocated' (and perhaps `buffer') and `translate' fields are set in BUFP on entry. */ #ifdef _LIBC const char * re_compile_pattern (pattern, length, bufp) const char *pattern; size_t length; struct re_pattern_buffer *bufp; #else /* size_t might promote */ const char * re_compile_pattern (const char *pattern, size_t length, struct re_pattern_buffer *bufp) #endif { reg_errcode_t ret; /* And GNU code determines whether or not to get register information by passing null for the REGS argument to re_match, etc., not by setting no_sub, unless RE_NO_SUB is set. */ bufp->no_sub = !!(re_syntax_options & RE_NO_SUB); /* Match anchors at newline. */ bufp->newline_anchor = 1; ret = re_compile_internal (bufp, pattern, length, re_syntax_options); if (!ret) return NULL; return gettext (__re_error_msgid + __re_error_msgid_idx[(int) ret]); } #ifdef _LIBC weak_alias (__re_compile_pattern, re_compile_pattern) #endif /* Set by `re_set_syntax' to the current regexp syntax to recognize. Can also be assigned to arbitrarily: each pattern buffer stores its own syntax, so it can be changed between regex compilations. */ /* This has no initializer because initialized variables in Emacs become read-only after dumping. */ reg_syntax_t re_syntax_options; /* Specify the precise syntax of regexps for compilation. This provides for compatibility for various utilities which historically have different, incompatible syntaxes. The argument SYNTAX is a bit mask comprised of the various bits defined in regex.h. We return the old syntax. */ reg_syntax_t re_set_syntax (syntax) reg_syntax_t syntax; { reg_syntax_t ret = re_syntax_options; re_syntax_options = syntax; return ret; } #ifdef _LIBC weak_alias (__re_set_syntax, re_set_syntax) #endif int re_compile_fastmap (bufp) struct re_pattern_buffer *bufp; { re_dfa_t *dfa = (re_dfa_t *) bufp->buffer; char *fastmap = bufp->fastmap; memset (fastmap, '\0', sizeof (char) * SBC_MAX); re_compile_fastmap_iter (bufp, dfa->init_state, fastmap); if (dfa->init_state != dfa->init_state_word) re_compile_fastmap_iter (bufp, dfa->init_state_word, fastmap); if (dfa->init_state != dfa->init_state_nl) re_compile_fastmap_iter (bufp, dfa->init_state_nl, fastmap); if (dfa->init_state != dfa->init_state_begbuf) re_compile_fastmap_iter (bufp, dfa->init_state_begbuf, fastmap); bufp->fastmap_accurate = 1; return 0; } #ifdef _LIBC weak_alias (__re_compile_fastmap, re_compile_fastmap) #endif static inline void __attribute ((always_inline)) re_set_fastmap (char *fastmap, bool icase, int ch) { fastmap[ch] = 1; if (icase) fastmap[tolower (ch)] = 1; } /* Helper function for re_compile_fastmap. Compile fastmap for the initial_state INIT_STATE. */ static void re_compile_fastmap_iter (regex_t *bufp, const re_dfastate_t *init_state, char *fastmap) { re_dfa_t *dfa = (re_dfa_t *) bufp->buffer; Idx node_cnt; bool icase = (dfa->mb_cur_max == 1 && (bufp->syntax & RE_ICASE)); for (node_cnt = 0; node_cnt < init_state->nodes.nelem; ++node_cnt) { Idx node = init_state->nodes.elems[node_cnt]; re_token_type_t type = dfa->nodes[node].type; if (type == CHARACTER) { re_set_fastmap (fastmap, icase, dfa->nodes[node].opr.c); #ifdef RE_ENABLE_I18N if ((bufp->syntax & RE_ICASE) && dfa->mb_cur_max > 1) { unsigned char buf[MB_LEN_MAX]; unsigned char *p; wchar_t wc; mbstate_t state; p = buf; *p++ = dfa->nodes[node].opr.c; while (++node < dfa->nodes_len && dfa->nodes[node].type == CHARACTER && dfa->nodes[node].mb_partial) *p++ = dfa->nodes[node].opr.c; memset (&state, '\0', sizeof (state)); if (__mbrtowc (&wc, (const char *) buf, p - buf, &state) == p - buf && (__wcrtomb ((char *) buf, towlower (wc), &state) != (size_t) -1)) re_set_fastmap (fastmap, false, buf[0]); } #endif } else if (type == SIMPLE_BRACKET) { int i, ch; for (i = 0, ch = 0; i < BITSET_WORDS; ++i) { int j; bitset_word_t w = dfa->nodes[node].opr.sbcset[i]; for (j = 0; j < BITSET_WORD_BITS; ++j, ++ch) if (w & ((bitset_word_t) 1 << j)) re_set_fastmap (fastmap, icase, ch); } } #ifdef RE_ENABLE_I18N else if (type == COMPLEX_BRACKET) { re_charset_t *cset = dfa->nodes[node].opr.mbcset; Idx i; # ifdef _LIBC /* See if we have to try all bytes which start multiple collation elements. e.g. In da_DK, we want to catch 'a' since "aa" is a valid collation element, and don't catch 'b' since 'b' is the only collation element which starts from 'b' (and it is caught by SIMPLE_BRACKET). */ if (_NL_CURRENT_WORD (LC_COLLATE, _NL_COLLATE_NRULES) != 0 && (cset->ncoll_syms || cset->nranges)) { const int32_t *table = (const int32_t *) _NL_CURRENT (LC_COLLATE, _NL_COLLATE_TABLEMB); for (i = 0; i < SBC_MAX; ++i) if (table[i] < 0) re_set_fastmap (fastmap, icase, i); } # endif /* _LIBC */ /* See if we have to start the match at all multibyte characters, i.e. where we would not find an invalid sequence. This only applies to multibyte character sets; for single byte character sets, the SIMPLE_BRACKET again suffices. */ if (dfa->mb_cur_max > 1 && (cset->nchar_classes || cset->non_match || cset->nranges # ifdef _LIBC || cset->nequiv_classes # endif /* _LIBC */ )) { unsigned char c = 0; do { mbstate_t mbs; memset (&mbs, 0, sizeof (mbs)); if (__mbrtowc (NULL, (char *) &c, 1, &mbs) == (size_t) -2) re_set_fastmap (fastmap, false, (int) c); } while (++c != 0); } else { /* ... Else catch all bytes which can start the mbchars. */ for (i = 0; i < cset->nmbchars; ++i) { char buf[256]; mbstate_t state; memset (&state, '\0', sizeof (state)); if (__wcrtomb (buf, cset->mbchars[i], &state) != (size_t) -1) re_set_fastmap (fastmap, icase, *(unsigned char *) buf); if ((bufp->syntax & RE_ICASE) && dfa->mb_cur_max > 1) { if (__wcrtomb (buf, towlower (cset->mbchars[i]), &state) != (size_t) -1) re_set_fastmap (fastmap, false, *(unsigned char *) buf); } } } } #endif /* RE_ENABLE_I18N */ else if (type == OP_PERIOD #ifdef RE_ENABLE_I18N || type == OP_UTF8_PERIOD #endif /* RE_ENABLE_I18N */ || type == END_OF_RE) { memset (fastmap, '\1', sizeof (char) * SBC_MAX); if (type == END_OF_RE) bufp->can_be_null = 1; return; } } } /* Entry point for POSIX code. */ /* regcomp takes a regular expression as a string and compiles it. PREG is a regex_t *. We do not expect any fields to be initialized, since POSIX says we shouldn't. Thus, we set `buffer' to the compiled pattern; `used' to the length of the compiled pattern; `syntax' to RE_SYNTAX_POSIX_EXTENDED if the REG_EXTENDED bit in CFLAGS is set; otherwise, to RE_SYNTAX_POSIX_BASIC; `newline_anchor' to REG_NEWLINE being set in CFLAGS; `fastmap' to an allocated space for the fastmap; `fastmap_accurate' to zero; `re_nsub' to the number of subexpressions in PATTERN. PATTERN is the address of the pattern string. CFLAGS is a series of bits which affect compilation. If REG_EXTENDED is set, we use POSIX extended syntax; otherwise, we use POSIX basic syntax. If REG_NEWLINE is set, then . and [^...] don't match newline. Also, regexec will try a match beginning after every newline. If REG_ICASE is set, then we considers upper- and lowercase versions of letters to be equivalent when matching. If REG_NOSUB is set, then when PREG is passed to regexec, that routine will report only success or failure, and nothing about the registers. It returns 0 if it succeeds, nonzero if it doesn't. (See regex.h for the return codes and their meanings.) */ int regcomp (preg, pattern, cflags) regex_t *_Restrict_ preg; const char *_Restrict_ pattern; int cflags; { reg_errcode_t ret; reg_syntax_t syntax = ((cflags & REG_EXTENDED) ? RE_SYNTAX_POSIX_EXTENDED : RE_SYNTAX_POSIX_BASIC); preg->buffer = NULL; preg->allocated = 0; preg->used = 0; /* Try to allocate space for the fastmap. */ preg->fastmap = re_malloc (char, SBC_MAX); if (BE (preg->fastmap == NULL, 0)) return REG_ESPACE; syntax |= (cflags & REG_ICASE) ? RE_ICASE : 0; /* If REG_NEWLINE is set, newlines are treated differently. */ if (cflags & REG_NEWLINE) { /* REG_NEWLINE implies neither . nor [^...] match newline. */ syntax &= ~RE_DOT_NEWLINE; syntax |= RE_HAT_LISTS_NOT_NEWLINE; /* It also changes the matching behavior. */ preg->newline_anchor = 1; } else preg->newline_anchor = 0; preg->no_sub = !!(cflags & REG_NOSUB); preg->translate = NULL; ret = re_compile_internal (preg, pattern, strlen (pattern), syntax); /* POSIX doesn't distinguish between an unmatched open-group and an unmatched close-group: both are REG_EPAREN. */ if (ret == REG_ERPAREN) ret = REG_EPAREN; /* We have already checked preg->fastmap != NULL. */ if (BE (ret == REG_NOERROR, 1)) /* Compute the fastmap now, since regexec cannot modify the pattern buffer. This function never fails in this implementation. */ (void) re_compile_fastmap (preg); else { /* Some error occurred while compiling the expression. */ re_free (preg->fastmap); preg->fastmap = NULL; } return (int) ret; } #ifdef _LIBC weak_alias (__regcomp, regcomp) #endif /* Returns a message corresponding to an error code, ERRCODE, returned from either regcomp or regexec. We don't use PREG here. */ #ifdef _LIBC size_t regerror (errcode, preg, errbuf, errbuf_size) int errcode; const regex_t *_Restrict_ preg; char *_Restrict_ errbuf; size_t errbuf_size; #else /* size_t might promote */ size_t regerror (int errcode, const regex_t *_Restrict_ preg, char *_Restrict_ errbuf, size_t errbuf_size) #endif { const char *msg; size_t msg_size; if (BE (errcode < 0 || errcode >= (int) (sizeof (__re_error_msgid_idx) / sizeof (__re_error_msgid_idx[0])), 0)) /* Only error codes returned by the rest of the code should be passed to this routine. If we are given anything else, or if other regex code generates an invalid error code, then the program has a bug. Dump core so we can fix it. */ abort (); msg = gettext (__re_error_msgid + __re_error_msgid_idx[errcode]); msg_size = strlen (msg) + 1; /* Includes the null. */ if (BE (errbuf_size != 0, 1)) { size_t cpy_size = msg_size; if (BE (msg_size > errbuf_size, 0)) { cpy_size = errbuf_size - 1; errbuf[cpy_size] = '\0'; } memcpy (errbuf, msg, cpy_size); } return msg_size; } #ifdef _LIBC weak_alias (__regerror, regerror) #endif #ifdef RE_ENABLE_I18N /* This static array is used for the map to single-byte characters when UTF-8 is used. Otherwise we would allocate memory just to initialize it the same all the time. UTF-8 is the preferred encoding so this is a worthwhile optimization. */ static const bitset_t utf8_sb_map = { /* Set the first 128 bits. */ # if 4 * BITSET_WORD_BITS < ASCII_CHARS # error "bitset_word_t is narrower than 32 bits" # elif 3 * BITSET_WORD_BITS < ASCII_CHARS BITSET_WORD_MAX, BITSET_WORD_MAX, BITSET_WORD_MAX, # elif 2 * BITSET_WORD_BITS < ASCII_CHARS BITSET_WORD_MAX, BITSET_WORD_MAX, # elif 1 * BITSET_WORD_BITS < ASCII_CHARS BITSET_WORD_MAX, # endif (BITSET_WORD_MAX >> (SBC_MAX % BITSET_WORD_BITS == 0 ? 0 : BITSET_WORD_BITS - SBC_MAX % BITSET_WORD_BITS)) }; #endif static void free_dfa_content (re_dfa_t *dfa) { Idx i, j; if (dfa->nodes) for (i = 0; i < dfa->nodes_len; ++i) free_token (dfa->nodes + i); re_free (dfa->nexts); for (i = 0; i < dfa->nodes_len; ++i) { if (dfa->eclosures != NULL) re_node_set_free (dfa->eclosures + i); if (dfa->inveclosures != NULL) re_node_set_free (dfa->inveclosures + i); if (dfa->edests != NULL) re_node_set_free (dfa->edests + i); } re_free (dfa->edests); re_free (dfa->eclosures); re_free (dfa->inveclosures); re_free (dfa->nodes); if (dfa->state_table) for (i = 0; i <= dfa->state_hash_mask; ++i) { struct re_state_table_entry *entry = dfa->state_table + i; for (j = 0; j < entry->num; ++j) { re_dfastate_t *state = entry->array[j]; free_state (state); } re_free (entry->array); } re_free (dfa->state_table); #ifdef RE_ENABLE_I18N if (dfa->sb_char != utf8_sb_map) re_free (dfa->sb_char); #endif re_free (dfa->subexp_map); #ifdef DEBUG re_free (dfa->re_str); #endif re_free (dfa); } /* Free dynamically allocated space used by PREG. */ void regfree (preg) regex_t *preg; { re_dfa_t *dfa = (re_dfa_t *) preg->buffer; if (BE (dfa != NULL, 1)) free_dfa_content (dfa); preg->buffer = NULL; preg->allocated = 0; re_free (preg->fastmap); preg->fastmap = NULL; re_free (preg->translate); preg->translate = NULL; } #ifdef _LIBC weak_alias (__regfree, regfree) #endif /* Entry points compatible with 4.2 BSD regex library. We don't define them unless specifically requested. */ #if defined _REGEX_RE_COMP || defined _LIBC /* BSD has one and only one pattern buffer. */ static struct re_pattern_buffer re_comp_buf; char * # ifdef _LIBC /* Make these definitions weak in libc, so POSIX programs can redefine these names if they don't use our functions, and still use regcomp/regexec above without link errors. */ weak_function # endif re_comp (s) const char *s; { reg_errcode_t ret; char *fastmap; if (!s) { if (!re_comp_buf.buffer) return gettext ("No previous regular expression"); return 0; } if (re_comp_buf.buffer) { fastmap = re_comp_buf.fastmap; re_comp_buf.fastmap = NULL; __regfree (&re_comp_buf); memset (&re_comp_buf, '\0', sizeof (re_comp_buf)); re_comp_buf.fastmap = fastmap; } if (re_comp_buf.fastmap == NULL) { re_comp_buf.fastmap = (char *) malloc (SBC_MAX); if (re_comp_buf.fastmap == NULL) return (char *) gettext (__re_error_msgid + __re_error_msgid_idx[(int) REG_ESPACE]); } /* Since `re_exec' always passes NULL for the `regs' argument, we don't need to initialize the pattern buffer fields which affect it. */ /* Match anchors at newlines. */ re_comp_buf.newline_anchor = 1; ret = re_compile_internal (&re_comp_buf, s, strlen (s), re_syntax_options); if (!ret) return NULL; /* Yes, we're discarding `const' here if !HAVE_LIBINTL. */ return (char *) gettext (__re_error_msgid + __re_error_msgid_idx[(int) ret]); } #ifdef _LIBC libc_freeres_fn (free_mem) { __regfree (&re_comp_buf); } #endif #endif /* _REGEX_RE_COMP */ /* Internal entry point. Compile the regular expression PATTERN, whose length is LENGTH. SYNTAX indicate regular expression's syntax. */ static reg_errcode_t re_compile_internal (regex_t *preg, const char * pattern, size_t length, reg_syntax_t syntax) { reg_errcode_t err = REG_NOERROR; re_dfa_t *dfa; re_string_t regexp; /* Initialize the pattern buffer. */ preg->fastmap_accurate = 0; preg->syntax = syntax; preg->not_bol = preg->not_eol = 0; preg->used = 0; preg->re_nsub = 0; preg->can_be_null = 0; preg->regs_allocated = REGS_UNALLOCATED; /* Initialize the dfa. */ dfa = (re_dfa_t *) preg->buffer; if (BE (preg->allocated < sizeof (re_dfa_t), 0)) { /* If zero allocated, but buffer is non-null, try to realloc enough space. This loses if buffer's address is bogus, but that is the user's responsibility. If ->buffer is NULL this is a simple allocation. */ dfa = re_realloc (preg->buffer, re_dfa_t, 1); if (dfa == NULL) return REG_ESPACE; preg->allocated = sizeof (re_dfa_t); preg->buffer = (unsigned char *) dfa; } preg->used = sizeof (re_dfa_t); err = init_dfa (dfa, length); if (BE (err != REG_NOERROR, 0)) { free_dfa_content (dfa); preg->buffer = NULL; preg->allocated = 0; return err; } #ifdef DEBUG /* Note: length+1 will not overflow since it is checked in init_dfa. */ dfa->re_str = re_malloc (char, length + 1); strncpy (dfa->re_str, pattern, length + 1); #endif __libc_lock_init (dfa->lock); err = re_string_construct (®exp, pattern, length, preg->translate, (syntax & RE_ICASE) != 0, dfa); if (BE (err != REG_NOERROR, 0)) { re_compile_internal_free_return: free_workarea_compile (preg); re_string_destruct (®exp); free_dfa_content (dfa); preg->buffer = NULL; preg->allocated = 0; return err; } /* Parse the regular expression, and build a structure tree. */ preg->re_nsub = 0; dfa->str_tree = parse (®exp, preg, syntax, &err); if (BE (dfa->str_tree == NULL, 0)) goto re_compile_internal_free_return; /* Analyze the tree and create the nfa. */ err = analyze (preg); if (BE (err != REG_NOERROR, 0)) goto re_compile_internal_free_return; #ifdef RE_ENABLE_I18N /* If possible, do searching in single byte encoding to speed things up. */ if (dfa->is_utf8 && !(syntax & RE_ICASE) && preg->translate == NULL) optimize_utf8 (dfa); #endif /* Then create the initial state of the dfa. */ err = create_initial_state (dfa); /* Release work areas. */ free_workarea_compile (preg); re_string_destruct (®exp); if (BE (err != REG_NOERROR, 0)) { free_dfa_content (dfa); preg->buffer = NULL; preg->allocated = 0; } return err; } /* Initialize DFA. We use the length of the regular expression PAT_LEN as the initial length of some arrays. */ static reg_errcode_t init_dfa (re_dfa_t *dfa, size_t pat_len) { __re_size_t table_size; #ifndef _LIBC char *codeset_name; #endif #ifdef RE_ENABLE_I18N size_t max_i18n_object_size = MAX (sizeof (wchar_t), sizeof (wctype_t)); #else size_t max_i18n_object_size = 0; #endif size_t max_object_size = MAX (sizeof (struct re_state_table_entry), MAX (sizeof (re_token_t), MAX (sizeof (re_node_set), MAX (sizeof (regmatch_t), max_i18n_object_size)))); memset (dfa, '\0', sizeof (re_dfa_t)); /* Force allocation of str_tree_storage the first time. */ dfa->str_tree_storage_idx = BIN_TREE_STORAGE_SIZE; /* Avoid overflows. The extra "/ 2" is for the table_size doubling calculation below, and for similar doubling calculations elsewhere. And it's <= rather than <, because some of the doubling calculations add 1 afterwards. */ if (BE (SIZE_MAX / max_object_size / 2 <= pat_len, 0)) return REG_ESPACE; dfa->nodes_alloc = pat_len + 1; dfa->nodes = re_malloc (re_token_t, dfa->nodes_alloc); /* table_size = 2 ^ ceil(log pat_len) */ for (table_size = 1; ; table_size <<= 1) if (table_size > pat_len) break; dfa->state_table = calloc (sizeof (struct re_state_table_entry), table_size); dfa->state_hash_mask = table_size - 1; dfa->mb_cur_max = MB_CUR_MAX; #ifdef _LIBC if (dfa->mb_cur_max == 6 && strcmp (_NL_CURRENT (LC_CTYPE, _NL_CTYPE_CODESET_NAME), "UTF-8") == 0) dfa->is_utf8 = 1; dfa->map_notascii = (_NL_CURRENT_WORD (LC_CTYPE, _NL_CTYPE_MAP_TO_NONASCII) != 0); #else codeset_name = nl_langinfo (CODESET); if (strcasecmp (codeset_name, "UTF-8") == 0 || strcasecmp (codeset_name, "UTF8") == 0) dfa->is_utf8 = 1; /* We check exhaustively in the loop below if this charset is a superset of ASCII. */ dfa->map_notascii = 0; #endif #ifdef RE_ENABLE_I18N if (dfa->mb_cur_max > 1) { if (dfa->is_utf8) dfa->sb_char = (re_bitset_ptr_t) utf8_sb_map; else { int i, j, ch; dfa->sb_char = (re_bitset_ptr_t) calloc (sizeof (bitset_t), 1); if (BE (dfa->sb_char == NULL, 0)) return REG_ESPACE; /* Set the bits corresponding to single byte chars. */ for (i = 0, ch = 0; i < BITSET_WORDS; ++i) for (j = 0; j < BITSET_WORD_BITS; ++j, ++ch) { wint_t wch = __btowc (ch); if (wch != WEOF) dfa->sb_char[i] |= (bitset_word_t) 1 << j; # ifndef _LIBC if (isascii (ch) && wch != ch) dfa->map_notascii = 1; # endif } } } #endif if (BE (dfa->nodes == NULL || dfa->state_table == NULL, 0)) return REG_ESPACE; return REG_NOERROR; } /* Initialize WORD_CHAR table, which indicate which character is "word". In this case "word" means that it is the word construction character used by some operators like "\<", "\>", etc. */ static void internal_function init_word_char (re_dfa_t *dfa) { int i, j, ch; dfa->word_ops_used = 1; for (i = 0, ch = 0; i < BITSET_WORDS; ++i) for (j = 0; j < BITSET_WORD_BITS; ++j, ++ch) if (isalnum (ch) || ch == '_') dfa->word_char[i] |= (bitset_word_t) 1 << j; } /* Free the work area which are only used while compiling. */ static void free_workarea_compile (regex_t *preg) { re_dfa_t *dfa = (re_dfa_t *) preg->buffer; bin_tree_storage_t *storage, *next; for (storage = dfa->str_tree_storage; storage; storage = next) { next = storage->next; re_free (storage); } dfa->str_tree_storage = NULL; dfa->str_tree_storage_idx = BIN_TREE_STORAGE_SIZE; dfa->str_tree = NULL; re_free (dfa->org_indices); dfa->org_indices = NULL; } /* Create initial states for all contexts. */ static reg_errcode_t create_initial_state (re_dfa_t *dfa) { Idx first, i; reg_errcode_t err; re_node_set init_nodes; /* Initial states have the epsilon closure of the node which is the first node of the regular expression. */ first = dfa->str_tree->first->node_idx; dfa->init_node = first; err = re_node_set_init_copy (&init_nodes, dfa->eclosures + first); if (BE (err != REG_NOERROR, 0)) return err; /* The back-references which are in initial states can epsilon transit, since in this case all of the subexpressions can be null. Then we add epsilon closures of the nodes which are the next nodes of the back-references. */ if (dfa->nbackref > 0) for (i = 0; i < init_nodes.nelem; ++i) { Idx node_idx = init_nodes.elems[i]; re_token_type_t type = dfa->nodes[node_idx].type; Idx clexp_idx; if (type != OP_BACK_REF) continue; for (clexp_idx = 0; clexp_idx < init_nodes.nelem; ++clexp_idx) { re_token_t *clexp_node; clexp_node = dfa->nodes + init_nodes.elems[clexp_idx]; if (clexp_node->type == OP_CLOSE_SUBEXP && clexp_node->opr.idx == dfa->nodes[node_idx].opr.idx) break; } if (clexp_idx == init_nodes.nelem) continue; if (type == OP_BACK_REF) { Idx dest_idx = dfa->edests[node_idx].elems[0]; if (!re_node_set_contains (&init_nodes, dest_idx)) { reg_errcode_t merge_err = re_node_set_merge (&init_nodes, dfa->eclosures + dest_idx); if (merge_err != REG_NOERROR) return merge_err; i = 0; } } } /* It must be the first time to invoke acquire_state. */ dfa->init_state = re_acquire_state_context (&err, dfa, &init_nodes, 0); /* We don't check ERR here, since the initial state must not be NULL. */ if (BE (dfa->init_state == NULL, 0)) return err; if (dfa->init_state->has_constraint) { dfa->init_state_word = re_acquire_state_context (&err, dfa, &init_nodes, CONTEXT_WORD); dfa->init_state_nl = re_acquire_state_context (&err, dfa, &init_nodes, CONTEXT_NEWLINE); dfa->init_state_begbuf = re_acquire_state_context (&err, dfa, &init_nodes, CONTEXT_NEWLINE | CONTEXT_BEGBUF); if (BE (dfa->init_state_word == NULL || dfa->init_state_nl == NULL || dfa->init_state_begbuf == NULL, 0)) return err; } else dfa->init_state_word = dfa->init_state_nl = dfa->init_state_begbuf = dfa->init_state; re_node_set_free (&init_nodes); return REG_NOERROR; } #ifdef RE_ENABLE_I18N /* If it is possible to do searching in single byte encoding instead of UTF-8 to speed things up, set dfa->mb_cur_max to 1, clear is_utf8 and change DFA nodes where needed. */ static void optimize_utf8 (re_dfa_t *dfa) { Idx node; int i; bool mb_chars = false; bool has_period = false; for (node = 0; node < dfa->nodes_len; ++node) switch (dfa->nodes[node].type) { case CHARACTER: if (dfa->nodes[node].opr.c >= ASCII_CHARS) mb_chars = true; break; case ANCHOR: switch (dfa->nodes[node].opr.ctx_type) { case LINE_FIRST: case LINE_LAST: case BUF_FIRST: case BUF_LAST: break; default: /* Word anchors etc. cannot be handled. It's okay to test opr.ctx_type since constraints (for all DFA nodes) are created by ORing one or more opr.ctx_type values. */ return; } break; case OP_PERIOD: has_period = true; break; case OP_BACK_REF: case OP_ALT: case END_OF_RE: case OP_DUP_ASTERISK: case OP_OPEN_SUBEXP: case OP_CLOSE_SUBEXP: break; case COMPLEX_BRACKET: return; case SIMPLE_BRACKET: /* Just double check. */ { int rshift = (ASCII_CHARS % BITSET_WORD_BITS == 0 ? 0 : BITSET_WORD_BITS - ASCII_CHARS % BITSET_WORD_BITS); for (i = ASCII_CHARS / BITSET_WORD_BITS; i < BITSET_WORDS; ++i) { if (dfa->nodes[node].opr.sbcset[i] >> rshift != 0) return; rshift = 0; } } break; default: abort (); } if (mb_chars || has_period) for (node = 0; node < dfa->nodes_len; ++node) { if (dfa->nodes[node].type == CHARACTER && dfa->nodes[node].opr.c >= ASCII_CHARS) dfa->nodes[node].mb_partial = 0; else if (dfa->nodes[node].type == OP_PERIOD) dfa->nodes[node].type = OP_UTF8_PERIOD; } /* The search can be in single byte locale. */ dfa->mb_cur_max = 1; dfa->is_utf8 = 0; dfa->has_mb_node = dfa->nbackref > 0 || has_period; } #endif /* Analyze the structure tree, and calculate "first", "next", "edest", "eclosure", and "inveclosure". */ static reg_errcode_t analyze (regex_t *preg) { re_dfa_t *dfa = (re_dfa_t *) preg->buffer; reg_errcode_t ret; /* Allocate arrays. */ dfa->nexts = re_malloc (Idx, dfa->nodes_alloc); dfa->org_indices = re_malloc (Idx, dfa->nodes_alloc); dfa->edests = re_malloc (re_node_set, dfa->nodes_alloc); dfa->eclosures = re_malloc (re_node_set, dfa->nodes_alloc); if (BE (dfa->nexts == NULL || dfa->org_indices == NULL || dfa->edests == NULL || dfa->eclosures == NULL, 0)) return REG_ESPACE; dfa->subexp_map = re_malloc (Idx, preg->re_nsub); if (dfa->subexp_map != NULL) { Idx i; for (i = 0; i < preg->re_nsub; i++) dfa->subexp_map[i] = i; preorder (dfa->str_tree, optimize_subexps, dfa); for (i = 0; i < preg->re_nsub; i++) if (dfa->subexp_map[i] != i) break; if (i == preg->re_nsub) { free (dfa->subexp_map); dfa->subexp_map = NULL; } } ret = postorder (dfa->str_tree, lower_subexps, preg); if (BE (ret != REG_NOERROR, 0)) return ret; ret = postorder (dfa->str_tree, calc_first, dfa); if (BE (ret != REG_NOERROR, 0)) return ret; preorder (dfa->str_tree, calc_next, dfa); ret = preorder (dfa->str_tree, link_nfa_nodes, dfa); if (BE (ret != REG_NOERROR, 0)) return ret; ret = calc_eclosure (dfa); if (BE (ret != REG_NOERROR, 0)) return ret; /* We only need this during the prune_impossible_nodes pass in regexec.c; skip it if p_i_n will not run, as calc_inveclosure can be quadratic. */ if ((!preg->no_sub && preg->re_nsub > 0 && dfa->has_plural_match) || dfa->nbackref) { dfa->inveclosures = re_malloc (re_node_set, dfa->nodes_len); if (BE (dfa->inveclosures == NULL, 0)) return REG_ESPACE; ret = calc_inveclosure (dfa); } return ret; } /* Our parse trees are very unbalanced, so we cannot use a stack to implement parse tree visits. Instead, we use parent pointers and some hairy code in these two functions. */ static reg_errcode_t postorder (bin_tree_t *root, reg_errcode_t (fn (void *, bin_tree_t *)), void *extra) { bin_tree_t *node, *prev; for (node = root; ; ) { /* Descend down the tree, preferably to the left (or to the right if that's the only child). */ while (node->left || node->right) if (node->left) node = node->left; else node = node->right; do { reg_errcode_t err = fn (extra, node); if (BE (err != REG_NOERROR, 0)) return err; if (node->parent == NULL) return REG_NOERROR; prev = node; node = node->parent; } /* Go up while we have a node that is reached from the right. */ while (node->right == prev || node->right == NULL); node = node->right; } } static reg_errcode_t preorder (bin_tree_t *root, reg_errcode_t (fn (void *, bin_tree_t *)), void *extra) { bin_tree_t *node; for (node = root; ; ) { reg_errcode_t err = fn (extra, node); if (BE (err != REG_NOERROR, 0)) return err; /* Go to the left node, or up and to the right. */ if (node->left) node = node->left; else { bin_tree_t *prev = NULL; while (node->right == prev || node->right == NULL) { prev = node; node = node->parent; if (!node) return REG_NOERROR; } node = node->right; } } } /* Optimization pass: if a SUBEXP is entirely contained, strip it and tell re_search_internal to map the inner one's opr.idx to this one's. Adjust backreferences as well. Requires a preorder visit. */ static reg_errcode_t optimize_subexps (void *extra, bin_tree_t *node) { re_dfa_t *dfa = (re_dfa_t *) extra; if (node->token.type == OP_BACK_REF && dfa->subexp_map) { int idx = node->token.opr.idx; node->token.opr.idx = dfa->subexp_map[idx]; dfa->used_bkref_map |= 1 << node->token.opr.idx; } else if (node->token.type == SUBEXP && node->left && node->left->token.type == SUBEXP) { Idx other_idx = node->left->token.opr.idx; node->left = node->left->left; if (node->left) node->left->parent = node; dfa->subexp_map[other_idx] = dfa->subexp_map[node->token.opr.idx]; if (other_idx < BITSET_WORD_BITS) dfa->used_bkref_map &= ~((bitset_word_t) 1 << other_idx); } return REG_NOERROR; } /* Lowering pass: Turn each SUBEXP node into the appropriate concatenation of OP_OPEN_SUBEXP, the body of the SUBEXP (if any) and OP_CLOSE_SUBEXP. */ static reg_errcode_t lower_subexps (void *extra, bin_tree_t *node) { regex_t *preg = (regex_t *) extra; reg_errcode_t err = REG_NOERROR; if (node->left && node->left->token.type == SUBEXP) { node->left = lower_subexp (&err, preg, node->left); if (node->left) node->left->parent = node; } if (node->right && node->right->token.type == SUBEXP) { node->right = lower_subexp (&err, preg, node->right); if (node->right) node->right->parent = node; } return err; } static bin_tree_t * lower_subexp (reg_errcode_t *err, regex_t *preg, bin_tree_t *node) { re_dfa_t *dfa = (re_dfa_t *) preg->buffer; bin_tree_t *body = node->left; bin_tree_t *op, *cls, *tree1, *tree; if (preg->no_sub /* We do not optimize empty subexpressions, because otherwise we may have bad CONCAT nodes with NULL children. This is obviously not very common, so we do not lose much. An example that triggers this case is the sed "script" /\(\)/x. */ && node->left != NULL && (node->token.opr.idx >= BITSET_WORD_BITS || !(dfa->used_bkref_map & ((bitset_word_t) 1 << node->token.opr.idx)))) return node->left; /* Convert the SUBEXP node to the concatenation of an OP_OPEN_SUBEXP, the contents, and an OP_CLOSE_SUBEXP. */ op = create_tree (dfa, NULL, NULL, OP_OPEN_SUBEXP); cls = create_tree (dfa, NULL, NULL, OP_CLOSE_SUBEXP); tree1 = body ? create_tree (dfa, body, cls, CONCAT) : cls; tree = create_tree (dfa, op, tree1, CONCAT); if (BE (tree == NULL || tree1 == NULL || op == NULL || cls == NULL, 0)) { *err = REG_ESPACE; return NULL; } op->token.opr.idx = cls->token.opr.idx = node->token.opr.idx; op->token.opt_subexp = cls->token.opt_subexp = node->token.opt_subexp; return tree; } /* Pass 1 in building the NFA: compute FIRST and create unlinked automaton nodes. Requires a postorder visit. */ static reg_errcode_t calc_first (void *extra, bin_tree_t *node) { re_dfa_t *dfa = (re_dfa_t *) extra; if (node->token.type == CONCAT) { node->first = node->left->first; node->node_idx = node->left->node_idx; } else { node->first = node; node->node_idx = re_dfa_add_node (dfa, node->token); if (BE (node->node_idx == REG_MISSING, 0)) return REG_ESPACE; if (node->token.type == ANCHOR) dfa->nodes[node->node_idx].constraint = node->token.opr.ctx_type; } return REG_NOERROR; } /* Pass 2: compute NEXT on the tree. Preorder visit. */ static reg_errcode_t calc_next (void *extra, bin_tree_t *node) { switch (node->token.type) { case OP_DUP_ASTERISK: node->left->next = node; break; case CONCAT: node->left->next = node->right->first; node->right->next = node->next; break; default: if (node->left) node->left->next = node->next; if (node->right) node->right->next = node->next; break; } return REG_NOERROR; } /* Pass 3: link all DFA nodes to their NEXT node (any order will do). */ static reg_errcode_t link_nfa_nodes (void *extra, bin_tree_t *node) { re_dfa_t *dfa = (re_dfa_t *) extra; Idx idx = node->node_idx; reg_errcode_t err = REG_NOERROR; switch (node->token.type) { case CONCAT: break; case END_OF_RE: assert (node->next == NULL); break; case OP_DUP_ASTERISK: case OP_ALT: { Idx left, right; dfa->has_plural_match = 1; if (node->left != NULL) left = node->left->first->node_idx; else left = node->next->node_idx; if (node->right != NULL) right = node->right->first->node_idx; else right = node->next->node_idx; assert (REG_VALID_INDEX (left)); assert (REG_VALID_INDEX (right)); err = re_node_set_init_2 (dfa->edests + idx, left, right); } break; case ANCHOR: case OP_OPEN_SUBEXP: case OP_CLOSE_SUBEXP: err = re_node_set_init_1 (dfa->edests + idx, node->next->node_idx); break; case OP_BACK_REF: dfa->nexts[idx] = node->next->node_idx; if (node->token.type == OP_BACK_REF) err = re_node_set_init_1 (dfa->edests + idx, dfa->nexts[idx]); break; default: assert (!IS_EPSILON_NODE (node->token.type)); dfa->nexts[idx] = node->next->node_idx; break; } return err; } /* Duplicate the epsilon closure of the node ROOT_NODE. Note that duplicated nodes have constraint INIT_CONSTRAINT in addition to their own constraint. */ static reg_errcode_t internal_function duplicate_node_closure (re_dfa_t *dfa, Idx top_org_node, Idx top_clone_node, Idx root_node, unsigned int init_constraint) { Idx org_node, clone_node; bool ok; unsigned int constraint = init_constraint; for (org_node = top_org_node, clone_node = top_clone_node;;) { Idx org_dest, clone_dest; if (dfa->nodes[org_node].type == OP_BACK_REF) { /* If the back reference epsilon-transit, its destination must also have the constraint. Then duplicate the epsilon closure of the destination of the back reference, and store it in edests of the back reference. */ org_dest = dfa->nexts[org_node]; re_node_set_empty (dfa->edests + clone_node); clone_dest = duplicate_node (dfa, org_dest, constraint); if (BE (clone_dest == REG_MISSING, 0)) return REG_ESPACE; dfa->nexts[clone_node] = dfa->nexts[org_node]; ok = re_node_set_insert (dfa->edests + clone_node, clone_dest); if (BE (! ok, 0)) return REG_ESPACE; } else if (dfa->edests[org_node].nelem == 0) { /* In case of the node can't epsilon-transit, don't duplicate the destination and store the original destination as the destination of the node. */ dfa->nexts[clone_node] = dfa->nexts[org_node]; break; } else if (dfa->edests[org_node].nelem == 1) { /* In case of the node can epsilon-transit, and it has only one destination. */ org_dest = dfa->edests[org_node].elems[0]; re_node_set_empty (dfa->edests + clone_node); /* If the node is root_node itself, it means the epsilon closure has a loop. Then tie it to the destination of the root_node. */ if (org_node == root_node && clone_node != org_node) { ok = re_node_set_insert (dfa->edests + clone_node, org_dest); if (BE (! ok, 0)) return REG_ESPACE; break; } /* In case the node has another constraint, append it. */ constraint |= dfa->nodes[org_node].constraint; clone_dest = duplicate_node (dfa, org_dest, constraint); if (BE (clone_dest == REG_MISSING, 0)) return REG_ESPACE; ok = re_node_set_insert (dfa->edests + clone_node, clone_dest); if (BE (! ok, 0)) return REG_ESPACE; } else /* dfa->edests[org_node].nelem == 2 */ { /* In case of the node can epsilon-transit, and it has two destinations. In the bin_tree_t and DFA, that's '|' and '*'. */ org_dest = dfa->edests[org_node].elems[0]; re_node_set_empty (dfa->edests + clone_node); /* Search for a duplicated node which satisfies the constraint. */ clone_dest = search_duplicated_node (dfa, org_dest, constraint); if (clone_dest == REG_MISSING) { /* There is no such duplicated node, create a new one. */ reg_errcode_t err; clone_dest = duplicate_node (dfa, org_dest, constraint); if (BE (clone_dest == REG_MISSING, 0)) return REG_ESPACE; ok = re_node_set_insert (dfa->edests + clone_node, clone_dest); if (BE (! ok, 0)) return REG_ESPACE; err = duplicate_node_closure (dfa, org_dest, clone_dest, root_node, constraint); if (BE (err != REG_NOERROR, 0)) return err; } else { /* There is a duplicated node which satisfies the constraint, use it to avoid infinite loop. */ ok = re_node_set_insert (dfa->edests + clone_node, clone_dest); if (BE (! ok, 0)) return REG_ESPACE; } org_dest = dfa->edests[org_node].elems[1]; clone_dest = duplicate_node (dfa, org_dest, constraint); if (BE (clone_dest == REG_MISSING, 0)) return REG_ESPACE; ok = re_node_set_insert (dfa->edests + clone_node, clone_dest); if (BE (! ok, 0)) return REG_ESPACE; } org_node = org_dest; clone_node = clone_dest; } return REG_NOERROR; } /* Search for a node which is duplicated from the node ORG_NODE, and satisfies the constraint CONSTRAINT. */ static Idx search_duplicated_node (const re_dfa_t *dfa, Idx org_node, unsigned int constraint) { Idx idx; for (idx = dfa->nodes_len - 1; dfa->nodes[idx].duplicated && idx > 0; --idx) { if (org_node == dfa->org_indices[idx] && constraint == dfa->nodes[idx].constraint) return idx; /* Found. */ } return REG_MISSING; /* Not found. */ } /* Duplicate the node whose index is ORG_IDX and set the constraint CONSTRAINT. Return the index of the new node, or REG_MISSING if insufficient storage is available. */ static Idx duplicate_node (re_dfa_t *dfa, Idx org_idx, unsigned int constraint) { Idx dup_idx = re_dfa_add_node (dfa, dfa->nodes[org_idx]); if (BE (dup_idx != REG_MISSING, 1)) { dfa->nodes[dup_idx].constraint = constraint; dfa->nodes[dup_idx].constraint |= dfa->nodes[org_idx].constraint; dfa->nodes[dup_idx].duplicated = 1; /* Store the index of the original node. */ dfa->org_indices[dup_idx] = org_idx; } return dup_idx; } static reg_errcode_t calc_inveclosure (re_dfa_t *dfa) { Idx src, idx; bool ok; for (idx = 0; idx < dfa->nodes_len; ++idx) re_node_set_init_empty (dfa->inveclosures + idx); for (src = 0; src < dfa->nodes_len; ++src) { Idx *elems = dfa->eclosures[src].elems; for (idx = 0; idx < dfa->eclosures[src].nelem; ++idx) { ok = re_node_set_insert_last (dfa->inveclosures + elems[idx], src); if (BE (! ok, 0)) return REG_ESPACE; } } return REG_NOERROR; } /* Calculate "eclosure" for all the node in DFA. */ static reg_errcode_t calc_eclosure (re_dfa_t *dfa) { Idx node_idx; bool incomplete; #ifdef DEBUG assert (dfa->nodes_len > 0); #endif incomplete = false; /* For each nodes, calculate epsilon closure. */ for (node_idx = 0; ; ++node_idx) { reg_errcode_t err; re_node_set eclosure_elem; if (node_idx == dfa->nodes_len) { if (!incomplete) break; incomplete = false; node_idx = 0; } #ifdef DEBUG assert (dfa->eclosures[node_idx].nelem != REG_MISSING); #endif /* If we have already calculated, skip it. */ if (dfa->eclosures[node_idx].nelem != 0) continue; /* Calculate epsilon closure of `node_idx'. */ err = calc_eclosure_iter (&eclosure_elem, dfa, node_idx, true); if (BE (err != REG_NOERROR, 0)) return err; if (dfa->eclosures[node_idx].nelem == 0) { incomplete = true; re_node_set_free (&eclosure_elem); } } return REG_NOERROR; } /* Calculate epsilon closure of NODE. */ static reg_errcode_t calc_eclosure_iter (re_node_set *new_set, re_dfa_t *dfa, Idx node, bool root) { reg_errcode_t err; Idx i; re_node_set eclosure; bool ok; bool incomplete = false; err = re_node_set_alloc (&eclosure, dfa->edests[node].nelem + 1); if (BE (err != REG_NOERROR, 0)) return err; /* This indicates that we are calculating this node now. We reference this value to avoid infinite loop. */ dfa->eclosures[node].nelem = REG_MISSING; /* If the current node has constraints, duplicate all nodes since they must inherit the constraints. */ if (dfa->nodes[node].constraint && dfa->edests[node].nelem && !dfa->nodes[dfa->edests[node].elems[0]].duplicated) { err = duplicate_node_closure (dfa, node, node, node, dfa->nodes[node].constraint); if (BE (err != REG_NOERROR, 0)) return err; } /* Expand each epsilon destination nodes. */ if (IS_EPSILON_NODE(dfa->nodes[node].type)) for (i = 0; i < dfa->edests[node].nelem; ++i) { re_node_set eclosure_elem; Idx edest = dfa->edests[node].elems[i]; /* If calculating the epsilon closure of `edest' is in progress, return intermediate result. */ if (dfa->eclosures[edest].nelem == REG_MISSING) { incomplete = true; continue; } /* If we haven't calculated the epsilon closure of `edest' yet, calculate now. Otherwise use calculated epsilon closure. */ if (dfa->eclosures[edest].nelem == 0) { err = calc_eclosure_iter (&eclosure_elem, dfa, edest, false); if (BE (err != REG_NOERROR, 0)) return err; } else eclosure_elem = dfa->eclosures[edest]; /* Merge the epsilon closure of `edest'. */ err = re_node_set_merge (&eclosure, &eclosure_elem); if (BE (err != REG_NOERROR, 0)) return err; /* If the epsilon closure of `edest' is incomplete, the epsilon closure of this node is also incomplete. */ if (dfa->eclosures[edest].nelem == 0) { incomplete = true; re_node_set_free (&eclosure_elem); } } /* An epsilon closure includes itself. */ ok = re_node_set_insert (&eclosure, node); if (BE (! ok, 0)) return REG_ESPACE; if (incomplete && !root) dfa->eclosures[node].nelem = 0; else dfa->eclosures[node] = eclosure; *new_set = eclosure; return REG_NOERROR; } /* Functions for token which are used in the parser. */ /* Fetch a token from INPUT. We must not use this function inside bracket expressions. */ static void internal_function fetch_token (re_token_t *result, re_string_t *input, reg_syntax_t syntax) { re_string_skip_bytes (input, peek_token (result, input, syntax)); } /* Peek a token from INPUT, and return the length of the token. We must not use this function inside bracket expressions. */ static int internal_function peek_token (re_token_t *token, re_string_t *input, reg_syntax_t syntax) { unsigned char c; if (re_string_eoi (input)) { token->type = END_OF_RE; return 0; } c = re_string_peek_byte (input, 0); token->opr.c = c; token->word_char = 0; #ifdef RE_ENABLE_I18N token->mb_partial = 0; if (input->mb_cur_max > 1 && !re_string_first_byte (input, re_string_cur_idx (input))) { token->type = CHARACTER; token->mb_partial = 1; return 1; } #endif if (c == '\\') { unsigned char c2; if (re_string_cur_idx (input) + 1 >= re_string_length (input)) { token->type = BACK_SLASH; return 1; } c2 = re_string_peek_byte_case (input, 1); token->opr.c = c2; token->type = CHARACTER; #ifdef RE_ENABLE_I18N if (input->mb_cur_max > 1) { wint_t wc = re_string_wchar_at (input, re_string_cur_idx (input) + 1); token->word_char = IS_WIDE_WORD_CHAR (wc) != 0; } else #endif token->word_char = IS_WORD_CHAR (c2) != 0; switch (c2) { case '|': if (!(syntax & RE_LIMITED_OPS) && !(syntax & RE_NO_BK_VBAR)) token->type = OP_ALT; break; case '1': case '2': case '3': case '4': case '5': case '6': case '7': case '8': case '9': if (!(syntax & RE_NO_BK_REFS)) { token->type = OP_BACK_REF; token->opr.idx = c2 - '1'; } break; case '<': if (!(syntax & RE_NO_GNU_OPS)) { token->type = ANCHOR; token->opr.ctx_type = WORD_FIRST; } break; case '>': if (!(syntax & RE_NO_GNU_OPS)) { token->type = ANCHOR; token->opr.ctx_type = WORD_LAST; } break; case 'b': if (!(syntax & RE_NO_GNU_OPS)) { token->type = ANCHOR; token->opr.ctx_type = WORD_DELIM; } break; case 'B': if (!(syntax & RE_NO_GNU_OPS)) { token->type = ANCHOR; token->opr.ctx_type = NOT_WORD_DELIM; } break; case 'w': if (!(syntax & RE_NO_GNU_OPS)) token->type = OP_WORD; break; case 'W': if (!(syntax & RE_NO_GNU_OPS)) token->type = OP_NOTWORD; break; case 's': if (!(syntax & RE_NO_GNU_OPS)) token->type = OP_SPACE; break; case 'S': if (!(syntax & RE_NO_GNU_OPS)) token->type = OP_NOTSPACE; break; case '`': if (!(syntax & RE_NO_GNU_OPS)) { token->type = ANCHOR; token->opr.ctx_type = BUF_FIRST; } break; case '\'': if (!(syntax & RE_NO_GNU_OPS)) { token->type = ANCHOR; token->opr.ctx_type = BUF_LAST; } break; case '(': if (!(syntax & RE_NO_BK_PARENS)) token->type = OP_OPEN_SUBEXP; break; case ')': if (!(syntax & RE_NO_BK_PARENS)) token->type = OP_CLOSE_SUBEXP; break; case '+': if (!(syntax & RE_LIMITED_OPS) && (syntax & RE_BK_PLUS_QM)) token->type = OP_DUP_PLUS; break; case '?': if (!(syntax & RE_LIMITED_OPS) && (syntax & RE_BK_PLUS_QM)) token->type = OP_DUP_QUESTION; break; case '{': if ((syntax & RE_INTERVALS) && (!(syntax & RE_NO_BK_BRACES))) token->type = OP_OPEN_DUP_NUM; break; case '}': if ((syntax & RE_INTERVALS) && (!(syntax & RE_NO_BK_BRACES))) token->type = OP_CLOSE_DUP_NUM; break; default: break; } return 2; } token->type = CHARACTER; #ifdef RE_ENABLE_I18N if (input->mb_cur_max > 1) { wint_t wc = re_string_wchar_at (input, re_string_cur_idx (input)); token->word_char = IS_WIDE_WORD_CHAR (wc) != 0; } else #endif token->word_char = IS_WORD_CHAR (token->opr.c); switch (c) { case '\n': if (syntax & RE_NEWLINE_ALT) token->type = OP_ALT; break; case '|': if (!(syntax & RE_LIMITED_OPS) && (syntax & RE_NO_BK_VBAR)) token->type = OP_ALT; break; case '*': token->type = OP_DUP_ASTERISK; break; case '+': if (!(syntax & RE_LIMITED_OPS) && !(syntax & RE_BK_PLUS_QM)) token->type = OP_DUP_PLUS; break; case '?': if (!(syntax & RE_LIMITED_OPS) && !(syntax & RE_BK_PLUS_QM)) token->type = OP_DUP_QUESTION; break; case '{': if ((syntax & RE_INTERVALS) && (syntax & RE_NO_BK_BRACES)) token->type = OP_OPEN_DUP_NUM; break; case '}': if ((syntax & RE_INTERVALS) && (syntax & RE_NO_BK_BRACES)) token->type = OP_CLOSE_DUP_NUM; break; case '(': if (syntax & RE_NO_BK_PARENS) token->type = OP_OPEN_SUBEXP; break; case ')': if (syntax & RE_NO_BK_PARENS) token->type = OP_CLOSE_SUBEXP; break; case '[': token->type = OP_OPEN_BRACKET; break; case '.': token->type = OP_PERIOD; break; case '^': if (!(syntax & (RE_CONTEXT_INDEP_ANCHORS | RE_CARET_ANCHORS_HERE)) && re_string_cur_idx (input) != 0) { char prev = re_string_peek_byte (input, -1); if (!(syntax & RE_NEWLINE_ALT) || prev != '\n') break; } token->type = ANCHOR; token->opr.ctx_type = LINE_FIRST; break; case '$': if (!(syntax & RE_CONTEXT_INDEP_ANCHORS) && re_string_cur_idx (input) + 1 != re_string_length (input)) { re_token_t next; re_string_skip_bytes (input, 1); peek_token (&next, input, syntax); re_string_skip_bytes (input, -1); if (next.type != OP_ALT && next.type != OP_CLOSE_SUBEXP) break; } token->type = ANCHOR; token->opr.ctx_type = LINE_LAST; break; default: break; } return 1; } /* Peek a token from INPUT, and return the length of the token. We must not use this function out of bracket expressions. */ static int internal_function peek_token_bracket (re_token_t *token, re_string_t *input, reg_syntax_t syntax) { unsigned char c; if (re_string_eoi (input)) { token->type = END_OF_RE; return 0; } c = re_string_peek_byte (input, 0); token->opr.c = c; #ifdef RE_ENABLE_I18N if (input->mb_cur_max > 1 && !re_string_first_byte (input, re_string_cur_idx (input))) { token->type = CHARACTER; return 1; } #endif /* RE_ENABLE_I18N */ if (c == '\\' && (syntax & RE_BACKSLASH_ESCAPE_IN_LISTS) && re_string_cur_idx (input) + 1 < re_string_length (input)) { /* In this case, '\' escape a character. */ unsigned char c2; re_string_skip_bytes (input, 1); c2 = re_string_peek_byte (input, 0); token->opr.c = c2; token->type = CHARACTER; return 1; } if (c == '[') /* '[' is a special char in a bracket exps. */ { unsigned char c2; int token_len; if (re_string_cur_idx (input) + 1 < re_string_length (input)) c2 = re_string_peek_byte (input, 1); else c2 = 0; token->opr.c = c2; token_len = 2; switch (c2) { case '.': token->type = OP_OPEN_COLL_ELEM; break; case '=': token->type = OP_OPEN_EQUIV_CLASS; break; case ':': if (syntax & RE_CHAR_CLASSES) { token->type = OP_OPEN_CHAR_CLASS; break; } /* else fall through. */ default: token->type = CHARACTER; token->opr.c = c; token_len = 1; break; } return token_len; } switch (c) { case '-': token->type = OP_CHARSET_RANGE; break; case ']': token->type = OP_CLOSE_BRACKET; break; case '^': token->type = OP_NON_MATCH_LIST; break; default: token->type = CHARACTER; } return 1; } /* Functions for parser. */ /* Entry point of the parser. Parse the regular expression REGEXP and return the structure tree. If an error is occured, ERR is set by error code, and return NULL. This function build the following tree, from regular expression : CAT / \ / \ EOR CAT means concatenation. EOR means end of regular expression. */ static bin_tree_t * parse (re_string_t *regexp, regex_t *preg, reg_syntax_t syntax, reg_errcode_t *err) { re_dfa_t *dfa = (re_dfa_t *) preg->buffer; bin_tree_t *tree, *eor, *root; re_token_t current_token; dfa->syntax = syntax; fetch_token (¤t_token, regexp, syntax | RE_CARET_ANCHORS_HERE); tree = parse_reg_exp (regexp, preg, ¤t_token, syntax, 0, err); if (BE (*err != REG_NOERROR && tree == NULL, 0)) return NULL; eor = create_tree (dfa, NULL, NULL, END_OF_RE); if (tree != NULL) root = create_tree (dfa, tree, eor, CONCAT); else root = eor; if (BE (eor == NULL || root == NULL, 0)) { *err = REG_ESPACE; return NULL; } return root; } /* This function build the following tree, from regular expression |: ALT / \ / \ ALT means alternative, which represents the operator `|'. */ static bin_tree_t * parse_reg_exp (re_string_t *regexp, regex_t *preg, re_token_t *token, reg_syntax_t syntax, Idx nest, reg_errcode_t *err) { re_dfa_t *dfa = (re_dfa_t *) preg->buffer; bin_tree_t *tree, *branch = NULL; tree = parse_branch (regexp, preg, token, syntax, nest, err); if (BE (*err != REG_NOERROR && tree == NULL, 0)) return NULL; while (token->type == OP_ALT) { fetch_token (token, regexp, syntax | RE_CARET_ANCHORS_HERE); if (token->type != OP_ALT && token->type != END_OF_RE && (nest == 0 || token->type != OP_CLOSE_SUBEXP)) { branch = parse_branch (regexp, preg, token, syntax, nest, err); if (BE (*err != REG_NOERROR && branch == NULL, 0)) return NULL; } else branch = NULL; tree = create_tree (dfa, tree, branch, OP_ALT); if (BE (tree == NULL, 0)) { *err = REG_ESPACE; return NULL; } } return tree; } /* This function build the following tree, from regular expression : CAT / \ / \ CAT means concatenation. */ static bin_tree_t * parse_branch (re_string_t *regexp, regex_t *preg, re_token_t *token, reg_syntax_t syntax, Idx nest, reg_errcode_t *err) { bin_tree_t *tree, *expr; re_dfa_t *dfa = (re_dfa_t *) preg->buffer; tree = parse_expression (regexp, preg, token, syntax, nest, err); if (BE (*err != REG_NOERROR && tree == NULL, 0)) return NULL; while (token->type != OP_ALT && token->type != END_OF_RE && (nest == 0 || token->type != OP_CLOSE_SUBEXP)) { expr = parse_expression (regexp, preg, token, syntax, nest, err); if (BE (*err != REG_NOERROR && expr == NULL, 0)) { return NULL; } if (tree != NULL && expr != NULL) { tree = create_tree (dfa, tree, expr, CONCAT); if (tree == NULL) { *err = REG_ESPACE; return NULL; } } else if (tree == NULL) tree = expr; /* Otherwise expr == NULL, we don't need to create new tree. */ } return tree; } /* This function build the following tree, from regular expression a*: * | a */ static bin_tree_t * parse_expression (re_string_t *regexp, regex_t *preg, re_token_t *token, reg_syntax_t syntax, Idx nest, reg_errcode_t *err) { re_dfa_t *dfa = (re_dfa_t *) preg->buffer; bin_tree_t *tree; switch (token->type) { case CHARACTER: tree = create_token_tree (dfa, NULL, NULL, token); if (BE (tree == NULL, 0)) { *err = REG_ESPACE; return NULL; } #ifdef RE_ENABLE_I18N if (dfa->mb_cur_max > 1) { while (!re_string_eoi (regexp) && !re_string_first_byte (regexp, re_string_cur_idx (regexp))) { bin_tree_t *mbc_remain; fetch_token (token, regexp, syntax); mbc_remain = create_token_tree (dfa, NULL, NULL, token); tree = create_tree (dfa, tree, mbc_remain, CONCAT); if (BE (mbc_remain == NULL || tree == NULL, 0)) { *err = REG_ESPACE; return NULL; } } } #endif break; case OP_OPEN_SUBEXP: tree = parse_sub_exp (regexp, preg, token, syntax, nest + 1, err); if (BE (*err != REG_NOERROR && tree == NULL, 0)) return NULL; break; case OP_OPEN_BRACKET: tree = parse_bracket_exp (regexp, dfa, token, syntax, err); if (BE (*err != REG_NOERROR && tree == NULL, 0)) return NULL; break; case OP_BACK_REF: if (!BE (dfa->completed_bkref_map & (1 << token->opr.idx), 1)) { *err = REG_ESUBREG; return NULL; } dfa->used_bkref_map |= 1 << token->opr.idx; tree = create_token_tree (dfa, NULL, NULL, token); if (BE (tree == NULL, 0)) { *err = REG_ESPACE; return NULL; } ++dfa->nbackref; dfa->has_mb_node = 1; break; case OP_OPEN_DUP_NUM: if (syntax & RE_CONTEXT_INVALID_DUP) { *err = REG_BADRPT; return NULL; } /* FALLTHROUGH */ case OP_DUP_ASTERISK: case OP_DUP_PLUS: case OP_DUP_QUESTION: if (syntax & RE_CONTEXT_INVALID_OPS) { *err = REG_BADRPT; return NULL; } else if (syntax & RE_CONTEXT_INDEP_OPS) { fetch_token (token, regexp, syntax); return parse_expression (regexp, preg, token, syntax, nest, err); } /* else fall through */ case OP_CLOSE_SUBEXP: if ((token->type == OP_CLOSE_SUBEXP) && !(syntax & RE_UNMATCHED_RIGHT_PAREN_ORD)) { *err = REG_ERPAREN; return NULL; } /* else fall through */ case OP_CLOSE_DUP_NUM: /* We treat it as a normal character. */ /* Then we can these characters as normal characters. */ token->type = CHARACTER; /* mb_partial and word_char bits should be initialized already by peek_token. */ tree = create_token_tree (dfa, NULL, NULL, token); if (BE (tree == NULL, 0)) { *err = REG_ESPACE; return NULL; } break; case ANCHOR: if ((token->opr.ctx_type & (WORD_DELIM | NOT_WORD_DELIM | WORD_FIRST | WORD_LAST)) && dfa->word_ops_used == 0) init_word_char (dfa); if (token->opr.ctx_type == WORD_DELIM || token->opr.ctx_type == NOT_WORD_DELIM) { bin_tree_t *tree_first, *tree_last; if (token->opr.ctx_type == WORD_DELIM) { token->opr.ctx_type = WORD_FIRST; tree_first = create_token_tree (dfa, NULL, NULL, token); token->opr.ctx_type = WORD_LAST; } else { token->opr.ctx_type = INSIDE_WORD; tree_first = create_token_tree (dfa, NULL, NULL, token); token->opr.ctx_type = INSIDE_NOTWORD; } tree_last = create_token_tree (dfa, NULL, NULL, token); tree = create_tree (dfa, tree_first, tree_last, OP_ALT); if (BE (tree_first == NULL || tree_last == NULL || tree == NULL, 0)) { *err = REG_ESPACE; return NULL; } } else { tree = create_token_tree (dfa, NULL, NULL, token); if (BE (tree == NULL, 0)) { *err = REG_ESPACE; return NULL; } } /* We must return here, since ANCHORs can't be followed by repetition operators. eg. RE"^*" is invalid or "", it must not be "". */ fetch_token (token, regexp, syntax); return tree; case OP_PERIOD: tree = create_token_tree (dfa, NULL, NULL, token); if (BE (tree == NULL, 0)) { *err = REG_ESPACE; return NULL; } if (dfa->mb_cur_max > 1) dfa->has_mb_node = 1; break; case OP_WORD: case OP_NOTWORD: tree = build_charclass_op (dfa, regexp->trans, (const unsigned char *) "alnum", (const unsigned char *) "_", token->type == OP_NOTWORD, err); if (BE (*err != REG_NOERROR && tree == NULL, 0)) return NULL; break; case OP_SPACE: case OP_NOTSPACE: tree = build_charclass_op (dfa, regexp->trans, (const unsigned char *) "space", (const unsigned char *) "", token->type == OP_NOTSPACE, err); if (BE (*err != REG_NOERROR && tree == NULL, 0)) return NULL; break; case OP_ALT: case END_OF_RE: return NULL; case BACK_SLASH: *err = REG_EESCAPE; return NULL; default: /* Must not happen? */ #ifdef DEBUG assert (0); #endif return NULL; } fetch_token (token, regexp, syntax); while (token->type == OP_DUP_ASTERISK || token->type == OP_DUP_PLUS || token->type == OP_DUP_QUESTION || token->type == OP_OPEN_DUP_NUM) { tree = parse_dup_op (tree, regexp, dfa, token, syntax, err); if (BE (*err != REG_NOERROR && tree == NULL, 0)) return NULL; /* In BRE consecutive duplications are not allowed. */ if ((syntax & RE_CONTEXT_INVALID_DUP) && (token->type == OP_DUP_ASTERISK || token->type == OP_OPEN_DUP_NUM)) { *err = REG_BADRPT; return NULL; } } return tree; } /* This function build the following tree, from regular expression (): SUBEXP | */ static bin_tree_t * parse_sub_exp (re_string_t *regexp, regex_t *preg, re_token_t *token, reg_syntax_t syntax, Idx nest, reg_errcode_t *err) { re_dfa_t *dfa = (re_dfa_t *) preg->buffer; bin_tree_t *tree; size_t cur_nsub; cur_nsub = preg->re_nsub++; fetch_token (token, regexp, syntax | RE_CARET_ANCHORS_HERE); /* The subexpression may be a null string. */ if (token->type == OP_CLOSE_SUBEXP) tree = NULL; else { tree = parse_reg_exp (regexp, preg, token, syntax, nest, err); if (BE (*err == REG_NOERROR && token->type != OP_CLOSE_SUBEXP, 0)) *err = REG_EPAREN; if (BE (*err != REG_NOERROR, 0)) return NULL; } if (cur_nsub <= '9' - '1') dfa->completed_bkref_map |= 1 << cur_nsub; tree = create_tree (dfa, tree, NULL, SUBEXP); if (BE (tree == NULL, 0)) { *err = REG_ESPACE; return NULL; } tree->token.opr.idx = cur_nsub; return tree; } /* This function parse repetition operators like "*", "+", "{1,3}" etc. */ static bin_tree_t * parse_dup_op (bin_tree_t *elem, re_string_t *regexp, re_dfa_t *dfa, re_token_t *token, reg_syntax_t syntax, reg_errcode_t *err) { bin_tree_t *tree = NULL, *old_tree = NULL; Idx i, start, end, start_idx = re_string_cur_idx (regexp); re_token_t start_token = *token; if (token->type == OP_OPEN_DUP_NUM) { end = 0; start = fetch_number (regexp, token, syntax); if (start == REG_MISSING) { if (token->type == CHARACTER && token->opr.c == ',') start = 0; /* We treat "{,m}" as "{0,m}". */ else { *err = REG_BADBR; /* {} is invalid. */ return NULL; } } if (BE (start != REG_ERROR, 1)) { /* We treat "{n}" as "{n,n}". */ end = ((token->type == OP_CLOSE_DUP_NUM) ? start : ((token->type == CHARACTER && token->opr.c == ',') ? fetch_number (regexp, token, syntax) : REG_ERROR)); } if (BE (start == REG_ERROR || end == REG_ERROR, 0)) { /* Invalid sequence. */ if (BE (!(syntax & RE_INVALID_INTERVAL_ORD), 0)) { if (token->type == END_OF_RE) *err = REG_EBRACE; else *err = REG_BADBR; return NULL; } /* If the syntax bit is set, rollback. */ re_string_set_index (regexp, start_idx); *token = start_token; token->type = CHARACTER; /* mb_partial and word_char bits should be already initialized by peek_token. */ return elem; } if (BE ((end != REG_MISSING && start > end) || token->type != OP_CLOSE_DUP_NUM, 0)) { /* First number greater than second. */ *err = REG_BADBR; return NULL; } } else { start = (token->type == OP_DUP_PLUS) ? 1 : 0; end = (token->type == OP_DUP_QUESTION) ? 1 : REG_MISSING; } fetch_token (token, regexp, syntax); if (BE (elem == NULL, 0)) return NULL; if (BE (start == 0 && end == 0, 0)) { postorder (elem, free_tree, NULL); return NULL; } /* Extract "{n,m}" to "...{0,}". */ if (BE (start > 0, 0)) { tree = elem; for (i = 2; i <= start; ++i) { elem = duplicate_tree (elem, dfa); tree = create_tree (dfa, tree, elem, CONCAT); if (BE (elem == NULL || tree == NULL, 0)) goto parse_dup_op_espace; } if (start == end) return tree; /* Duplicate ELEM before it is marked optional. */ elem = duplicate_tree (elem, dfa); old_tree = tree; } else old_tree = NULL; if (elem->token.type == SUBEXP) postorder (elem, mark_opt_subexp, (void *) (long) elem->token.opr.idx); tree = create_tree (dfa, elem, NULL, (end == REG_MISSING ? OP_DUP_ASTERISK : OP_ALT)); if (BE (tree == NULL, 0)) goto parse_dup_op_espace; /* From gnulib's "intprops.h": True if the arithmetic type T is signed. */ #define TYPE_SIGNED(t) (! ((t) 0 < (t) -1)) /* This loop is actually executed only when end != REG_MISSING, to rewrite {0,n} as ((...?)?)?... We have already created the start+1-th copy. */ if (TYPE_SIGNED (Idx) || end != REG_MISSING) for (i = start + 2; i <= end; ++i) { elem = duplicate_tree (elem, dfa); tree = create_tree (dfa, tree, elem, CONCAT); if (BE (elem == NULL || tree == NULL, 0)) goto parse_dup_op_espace; tree = create_tree (dfa, tree, NULL, OP_ALT); if (BE (tree == NULL, 0)) goto parse_dup_op_espace; } if (old_tree) tree = create_tree (dfa, old_tree, tree, CONCAT); return tree; parse_dup_op_espace: *err = REG_ESPACE; return NULL; } /* Size of the names for collating symbol/equivalence_class/character_class. I'm not sure, but maybe enough. */ #define BRACKET_NAME_BUF_SIZE 32 #ifndef _LIBC /* Local function for parse_bracket_exp only used in case of NOT _LIBC. Build the range expression which starts from START_ELEM, and ends at END_ELEM. The result are written to MBCSET and SBCSET. RANGE_ALLOC is the allocated size of mbcset->range_starts, and mbcset->range_ends, is a pointer argument sinse we may update it. */ static reg_errcode_t internal_function # ifdef RE_ENABLE_I18N build_range_exp (bitset_t sbcset, re_charset_t *mbcset, Idx *range_alloc, bracket_elem_t *start_elem, bracket_elem_t *end_elem) # else /* not RE_ENABLE_I18N */ build_range_exp (bitset_t sbcset, bracket_elem_t *start_elem, bracket_elem_t *end_elem) # endif /* not RE_ENABLE_I18N */ { unsigned int start_ch, end_ch; /* Equivalence Classes and Character Classes can't be a range start/end. */ if (BE (start_elem->type == EQUIV_CLASS || start_elem->type == CHAR_CLASS || end_elem->type == EQUIV_CLASS || end_elem->type == CHAR_CLASS, 0)) return REG_ERANGE; /* We can handle no multi character collating elements without libc support. */ if (BE ((start_elem->type == COLL_SYM && strlen ((char *) start_elem->opr.name) > 1) || (end_elem->type == COLL_SYM && strlen ((char *) end_elem->opr.name) > 1), 0)) return REG_ECOLLATE; # ifdef RE_ENABLE_I18N { wchar_t wc; wint_t start_wc; wint_t end_wc; wchar_t cmp_buf[6] = {L'\0', L'\0', L'\0', L'\0', L'\0', L'\0'}; start_ch = ((start_elem->type == SB_CHAR) ? start_elem->opr.ch : ((start_elem->type == COLL_SYM) ? start_elem->opr.name[0] : 0)); end_ch = ((end_elem->type == SB_CHAR) ? end_elem->opr.ch : ((end_elem->type == COLL_SYM) ? end_elem->opr.name[0] : 0)); start_wc = ((start_elem->type == SB_CHAR || start_elem->type == COLL_SYM) ? __btowc (start_ch) : start_elem->opr.wch); end_wc = ((end_elem->type == SB_CHAR || end_elem->type == COLL_SYM) ? __btowc (end_ch) : end_elem->opr.wch); if (start_wc == WEOF || end_wc == WEOF) return REG_ECOLLATE; cmp_buf[0] = start_wc; cmp_buf[4] = end_wc; if (wcscoll (cmp_buf, cmp_buf + 4) > 0) return REG_ERANGE; /* Got valid collation sequence values, add them as a new entry. However, for !_LIBC we have no collation elements: if the character set is single byte, the single byte character set that we build below suffices. parse_bracket_exp passes no MBCSET if dfa->mb_cur_max == 1. */ if (mbcset) { /* Check the space of the arrays. */ if (BE (*range_alloc == mbcset->nranges, 0)) { /* There is not enough space, need realloc. */ wchar_t *new_array_start, *new_array_end; Idx new_nranges; /* +1 in case of mbcset->nranges is 0. */ new_nranges = 2 * mbcset->nranges + 1; /* Use realloc since mbcset->range_starts and mbcset->range_ends are NULL if *range_alloc == 0. */ new_array_start = re_realloc (mbcset->range_starts, wchar_t, new_nranges); new_array_end = re_realloc (mbcset->range_ends, wchar_t, new_nranges); if (BE (new_array_start == NULL || new_array_end == NULL, 0)) return REG_ESPACE; mbcset->range_starts = new_array_start; mbcset->range_ends = new_array_end; *range_alloc = new_nranges; } mbcset->range_starts[mbcset->nranges] = start_wc; mbcset->range_ends[mbcset->nranges++] = end_wc; } /* Build the table for single byte characters. */ for (wc = 0; wc < SBC_MAX; ++wc) { cmp_buf[2] = wc; if (wcscoll (cmp_buf, cmp_buf + 2) <= 0 && wcscoll (cmp_buf + 2, cmp_buf + 4) <= 0) bitset_set (sbcset, wc); } } # else /* not RE_ENABLE_I18N */ { unsigned int ch; start_ch = ((start_elem->type == SB_CHAR ) ? start_elem->opr.ch : ((start_elem->type == COLL_SYM) ? start_elem->opr.name[0] : 0)); end_ch = ((end_elem->type == SB_CHAR ) ? end_elem->opr.ch : ((end_elem->type == COLL_SYM) ? end_elem->opr.name[0] : 0)); if (start_ch > end_ch) return REG_ERANGE; /* Build the table for single byte characters. */ for (ch = 0; ch < SBC_MAX; ++ch) if (start_ch <= ch && ch <= end_ch) bitset_set (sbcset, ch); } # endif /* not RE_ENABLE_I18N */ return REG_NOERROR; } #endif /* not _LIBC */ #ifndef _LIBC /* Helper function for parse_bracket_exp only used in case of NOT _LIBC.. Build the collating element which is represented by NAME. The result are written to MBCSET and SBCSET. COLL_SYM_ALLOC is the allocated size of mbcset->coll_sym, is a pointer argument since we may update it. */ static reg_errcode_t internal_function build_collating_symbol (bitset_t sbcset, # ifdef RE_ENABLE_I18N re_charset_t *mbcset, Idx *coll_sym_alloc, # endif const unsigned char *name) { size_t name_len = strlen ((const char *) name); if (BE (name_len != 1, 0)) return REG_ECOLLATE; else { bitset_set (sbcset, name[0]); return REG_NOERROR; } } #endif /* not _LIBC */ /* This function parse bracket expression like "[abc]", "[a-c]", "[[.a-a.]]" etc. */ static bin_tree_t * parse_bracket_exp (re_string_t *regexp, re_dfa_t *dfa, re_token_t *token, reg_syntax_t syntax, reg_errcode_t *err) { #ifdef _LIBC const unsigned char *collseqmb; const char *collseqwc; uint32_t nrules; int32_t table_size; const int32_t *symb_table; const unsigned char *extra; /* Local function for parse_bracket_exp used in _LIBC environement. Seek the collating symbol entry correspondings to NAME. Return the index of the symbol in the SYMB_TABLE. */ auto inline int32_t __attribute ((always_inline)) seek_collating_symbol_entry (name, name_len) const unsigned char *name; size_t name_len; { int32_t hash = elem_hash ((const char *) name, name_len); int32_t elem = hash % table_size; if (symb_table[2 * elem] != 0) { int32_t second = hash % (table_size - 2) + 1; do { /* First compare the hashing value. */ if (symb_table[2 * elem] == hash /* Compare the length of the name. */ && name_len == extra[symb_table[2 * elem + 1]] /* Compare the name. */ && memcmp (name, &extra[symb_table[2 * elem + 1] + 1], name_len) == 0) { /* Yep, this is the entry. */ break; } /* Next entry. */ elem += second; } while (symb_table[2 * elem] != 0); } return elem; } /* Local function for parse_bracket_exp used in _LIBC environment. Look up the collation sequence value of BR_ELEM. Return the value if succeeded, UINT_MAX otherwise. */ auto inline unsigned int __attribute ((always_inline)) lookup_collation_sequence_value (br_elem) bracket_elem_t *br_elem; { if (br_elem->type == SB_CHAR) { /* if (MB_CUR_MAX == 1) */ if (nrules == 0) return collseqmb[br_elem->opr.ch]; else { wint_t wc = __btowc (br_elem->opr.ch); return __collseq_table_lookup (collseqwc, wc); } } else if (br_elem->type == MB_CHAR) { if (nrules != 0) return __collseq_table_lookup (collseqwc, br_elem->opr.wch); } else if (br_elem->type == COLL_SYM) { size_t sym_name_len = strlen ((char *) br_elem->opr.name); if (nrules != 0) { int32_t elem, idx; elem = seek_collating_symbol_entry (br_elem->opr.name, sym_name_len); if (symb_table[2 * elem] != 0) { /* We found the entry. */ idx = symb_table[2 * elem + 1]; /* Skip the name of collating element name. */ idx += 1 + extra[idx]; /* Skip the byte sequence of the collating element. */ idx += 1 + extra[idx]; /* Adjust for the alignment. */ idx = (idx + 3) & ~3; /* Skip the multibyte collation sequence value. */ idx += sizeof (unsigned int); /* Skip the wide char sequence of the collating element. */ idx += sizeof (unsigned int) * (1 + *(unsigned int *) (extra + idx)); /* Return the collation sequence value. */ return *(unsigned int *) (extra + idx); } else if (symb_table[2 * elem] == 0 && sym_name_len == 1) { /* No valid character. Match it as a single byte character. */ return collseqmb[br_elem->opr.name[0]]; } } else if (sym_name_len == 1) return collseqmb[br_elem->opr.name[0]]; } return UINT_MAX; } /* Local function for parse_bracket_exp used in _LIBC environement. Build the range expression which starts from START_ELEM, and ends at END_ELEM. The result are written to MBCSET and SBCSET. RANGE_ALLOC is the allocated size of mbcset->range_starts, and mbcset->range_ends, is a pointer argument sinse we may update it. */ auto inline reg_errcode_t __attribute ((always_inline)) build_range_exp (sbcset, mbcset, range_alloc, start_elem, end_elem) re_charset_t *mbcset; Idx *range_alloc; bitset_t sbcset; bracket_elem_t *start_elem, *end_elem; { unsigned int ch; uint32_t start_collseq; uint32_t end_collseq; /* Equivalence Classes and Character Classes can't be a range start/end. */ if (BE (start_elem->type == EQUIV_CLASS || start_elem->type == CHAR_CLASS || end_elem->type == EQUIV_CLASS || end_elem->type == CHAR_CLASS, 0)) return REG_ERANGE; start_collseq = lookup_collation_sequence_value (start_elem); end_collseq = lookup_collation_sequence_value (end_elem); /* Check start/end collation sequence values. */ if (BE (start_collseq == UINT_MAX || end_collseq == UINT_MAX, 0)) return REG_ECOLLATE; if (BE ((syntax & RE_NO_EMPTY_RANGES) && start_collseq > end_collseq, 0)) return REG_ERANGE; /* Got valid collation sequence values, add them as a new entry. However, if we have no collation elements, and the character set is single byte, the single byte character set that we build below suffices. */ if (nrules > 0 || dfa->mb_cur_max > 1) { /* Check the space of the arrays. */ if (BE (*range_alloc == mbcset->nranges, 0)) { /* There is not enough space, need realloc. */ uint32_t *new_array_start; uint32_t *new_array_end; Idx new_nranges; /* +1 in case of mbcset->nranges is 0. */ new_nranges = 2 * mbcset->nranges + 1; new_array_start = re_realloc (mbcset->range_starts, uint32_t, new_nranges); new_array_end = re_realloc (mbcset->range_ends, uint32_t, new_nranges); if (BE (new_array_start == NULL || new_array_end == NULL, 0)) return REG_ESPACE; mbcset->range_starts = new_array_start; mbcset->range_ends = new_array_end; *range_alloc = new_nranges; } mbcset->range_starts[mbcset->nranges] = start_collseq; mbcset->range_ends[mbcset->nranges++] = end_collseq; } /* Build the table for single byte characters. */ for (ch = 0; ch < SBC_MAX; ch++) { uint32_t ch_collseq; /* if (MB_CUR_MAX == 1) */ if (nrules == 0) ch_collseq = collseqmb[ch]; else ch_collseq = __collseq_table_lookup (collseqwc, __btowc (ch)); if (start_collseq <= ch_collseq && ch_collseq <= end_collseq) bitset_set (sbcset, ch); } return REG_NOERROR; } /* Local function for parse_bracket_exp used in _LIBC environement. Build the collating element which is represented by NAME. The result are written to MBCSET and SBCSET. COLL_SYM_ALLOC is the allocated size of mbcset->coll_sym, is a pointer argument sinse we may update it. */ auto inline reg_errcode_t __attribute ((always_inline)) build_collating_symbol (sbcset, mbcset, coll_sym_alloc, name) re_charset_t *mbcset; Idx *coll_sym_alloc; bitset_t sbcset; const unsigned char *name; { int32_t elem, idx; size_t name_len = strlen ((const char *) name); if (nrules != 0) { elem = seek_collating_symbol_entry (name, name_len); if (symb_table[2 * elem] != 0) { /* We found the entry. */ idx = symb_table[2 * elem + 1]; /* Skip the name of collating element name. */ idx += 1 + extra[idx]; } else if (symb_table[2 * elem] == 0 && name_len == 1) { /* No valid character, treat it as a normal character. */ bitset_set (sbcset, name[0]); return REG_NOERROR; } else return REG_ECOLLATE; /* Got valid collation sequence, add it as a new entry. */ /* Check the space of the arrays. */ if (BE (*coll_sym_alloc == mbcset->ncoll_syms, 0)) { /* Not enough, realloc it. */ /* +1 in case of mbcset->ncoll_syms is 0. */ Idx new_coll_sym_alloc = 2 * mbcset->ncoll_syms + 1; /* Use realloc since mbcset->coll_syms is NULL if *alloc == 0. */ int32_t *new_coll_syms = re_realloc (mbcset->coll_syms, int32_t, new_coll_sym_alloc); if (BE (new_coll_syms == NULL, 0)) return REG_ESPACE; mbcset->coll_syms = new_coll_syms; *coll_sym_alloc = new_coll_sym_alloc; } mbcset->coll_syms[mbcset->ncoll_syms++] = idx; return REG_NOERROR; } else { if (BE (name_len != 1, 0)) return REG_ECOLLATE; else { bitset_set (sbcset, name[0]); return REG_NOERROR; } } } #endif re_token_t br_token; re_bitset_ptr_t sbcset; #ifdef RE_ENABLE_I18N re_charset_t *mbcset; Idx coll_sym_alloc = 0, range_alloc = 0, mbchar_alloc = 0; Idx equiv_class_alloc = 0, char_class_alloc = 0; #endif /* not RE_ENABLE_I18N */ bool non_match = false; bin_tree_t *work_tree; int token_len; bool first_round = true; #ifdef _LIBC collseqmb = (const unsigned char *) _NL_CURRENT (LC_COLLATE, _NL_COLLATE_COLLSEQMB); nrules = _NL_CURRENT_WORD (LC_COLLATE, _NL_COLLATE_NRULES); if (nrules) { /* if (MB_CUR_MAX > 1) */ collseqwc = _NL_CURRENT (LC_COLLATE, _NL_COLLATE_COLLSEQWC); table_size = _NL_CURRENT_WORD (LC_COLLATE, _NL_COLLATE_SYMB_HASH_SIZEMB); symb_table = (const int32_t *) _NL_CURRENT (LC_COLLATE, _NL_COLLATE_SYMB_TABLEMB); extra = (const unsigned char *) _NL_CURRENT (LC_COLLATE, _NL_COLLATE_SYMB_EXTRAMB); } #endif sbcset = (re_bitset_ptr_t) calloc (sizeof (bitset_t), 1); #ifdef RE_ENABLE_I18N mbcset = (re_charset_t *) calloc (sizeof (re_charset_t), 1); #endif /* RE_ENABLE_I18N */ #ifdef RE_ENABLE_I18N if (BE (sbcset == NULL || mbcset == NULL, 0)) #else if (BE (sbcset == NULL, 0)) #endif /* RE_ENABLE_I18N */ { *err = REG_ESPACE; return NULL; } token_len = peek_token_bracket (token, regexp, syntax); if (BE (token->type == END_OF_RE, 0)) { *err = REG_BADPAT; goto parse_bracket_exp_free_return; } if (token->type == OP_NON_MATCH_LIST) { #ifdef RE_ENABLE_I18N mbcset->non_match = 1; #endif /* not RE_ENABLE_I18N */ non_match = true; if (syntax & RE_HAT_LISTS_NOT_NEWLINE) bitset_set (sbcset, '\n'); re_string_skip_bytes (regexp, token_len); /* Skip a token. */ token_len = peek_token_bracket (token, regexp, syntax); if (BE (token->type == END_OF_RE, 0)) { *err = REG_BADPAT; goto parse_bracket_exp_free_return; } } /* We treat the first ']' as a normal character. */ if (token->type == OP_CLOSE_BRACKET) token->type = CHARACTER; while (1) { bracket_elem_t start_elem, end_elem; unsigned char start_name_buf[BRACKET_NAME_BUF_SIZE]; unsigned char end_name_buf[BRACKET_NAME_BUF_SIZE]; reg_errcode_t ret; int token_len2 = 0; bool is_range_exp = false; re_token_t token2; start_elem.opr.name = start_name_buf; ret = parse_bracket_element (&start_elem, regexp, token, token_len, dfa, syntax, first_round); if (BE (ret != REG_NOERROR, 0)) { *err = ret; goto parse_bracket_exp_free_return; } first_round = false; /* Get information about the next token. We need it in any case. */ token_len = peek_token_bracket (token, regexp, syntax); /* Do not check for ranges if we know they are not allowed. */ if (start_elem.type != CHAR_CLASS && start_elem.type != EQUIV_CLASS) { if (BE (token->type == END_OF_RE, 0)) { *err = REG_EBRACK; goto parse_bracket_exp_free_return; } if (token->type == OP_CHARSET_RANGE) { re_string_skip_bytes (regexp, token_len); /* Skip '-'. */ token_len2 = peek_token_bracket (&token2, regexp, syntax); if (BE (token2.type == END_OF_RE, 0)) { *err = REG_EBRACK; goto parse_bracket_exp_free_return; } if (token2.type == OP_CLOSE_BRACKET) { /* We treat the last '-' as a normal character. */ re_string_skip_bytes (regexp, -token_len); token->type = CHARACTER; } else is_range_exp = true; } } if (is_range_exp == true) { end_elem.opr.name = end_name_buf; ret = parse_bracket_element (&end_elem, regexp, &token2, token_len2, dfa, syntax, true); if (BE (ret != REG_NOERROR, 0)) { *err = ret; goto parse_bracket_exp_free_return; } token_len = peek_token_bracket (token, regexp, syntax); #ifdef _LIBC *err = build_range_exp (sbcset, mbcset, &range_alloc, &start_elem, &end_elem); #else # ifdef RE_ENABLE_I18N *err = build_range_exp (sbcset, dfa->mb_cur_max > 1 ? mbcset : NULL, &range_alloc, &start_elem, &end_elem); # else *err = build_range_exp (sbcset, &start_elem, &end_elem); # endif #endif /* RE_ENABLE_I18N */ if (BE (*err != REG_NOERROR, 0)) goto parse_bracket_exp_free_return; } else { switch (start_elem.type) { case SB_CHAR: bitset_set (sbcset, start_elem.opr.ch); break; #ifdef RE_ENABLE_I18N case MB_CHAR: /* Check whether the array has enough space. */ if (BE (mbchar_alloc == mbcset->nmbchars, 0)) { wchar_t *new_mbchars; /* Not enough, realloc it. */ /* +1 in case of mbcset->nmbchars is 0. */ mbchar_alloc = 2 * mbcset->nmbchars + 1; /* Use realloc since array is NULL if *alloc == 0. */ new_mbchars = re_realloc (mbcset->mbchars, wchar_t, mbchar_alloc); if (BE (new_mbchars == NULL, 0)) goto parse_bracket_exp_espace; mbcset->mbchars = new_mbchars; } mbcset->mbchars[mbcset->nmbchars++] = start_elem.opr.wch; break; #endif /* RE_ENABLE_I18N */ case EQUIV_CLASS: *err = build_equiv_class (sbcset, #ifdef RE_ENABLE_I18N mbcset, &equiv_class_alloc, #endif /* RE_ENABLE_I18N */ start_elem.opr.name); if (BE (*err != REG_NOERROR, 0)) goto parse_bracket_exp_free_return; break; case COLL_SYM: *err = build_collating_symbol (sbcset, #ifdef RE_ENABLE_I18N mbcset, &coll_sym_alloc, #endif /* RE_ENABLE_I18N */ start_elem.opr.name); if (BE (*err != REG_NOERROR, 0)) goto parse_bracket_exp_free_return; break; case CHAR_CLASS: *err = build_charclass (regexp->trans, sbcset, #ifdef RE_ENABLE_I18N mbcset, &char_class_alloc, #endif /* RE_ENABLE_I18N */ start_elem.opr.name, syntax); if (BE (*err != REG_NOERROR, 0)) goto parse_bracket_exp_free_return; break; default: assert (0); break; } } if (BE (token->type == END_OF_RE, 0)) { *err = REG_EBRACK; goto parse_bracket_exp_free_return; } if (token->type == OP_CLOSE_BRACKET) break; } re_string_skip_bytes (regexp, token_len); /* Skip a token. */ /* If it is non-matching list. */ if (non_match) bitset_not (sbcset); #ifdef RE_ENABLE_I18N /* Ensure only single byte characters are set. */ if (dfa->mb_cur_max > 1) bitset_mask (sbcset, dfa->sb_char); if (mbcset->nmbchars || mbcset->ncoll_syms || mbcset->nequiv_classes || mbcset->nranges || (dfa->mb_cur_max > 1 && (mbcset->nchar_classes || mbcset->non_match))) { bin_tree_t *mbc_tree; int sbc_idx; /* Build a tree for complex bracket. */ dfa->has_mb_node = 1; br_token.type = COMPLEX_BRACKET; br_token.opr.mbcset = mbcset; mbc_tree = create_token_tree (dfa, NULL, NULL, &br_token); if (BE (mbc_tree == NULL, 0)) goto parse_bracket_exp_espace; for (sbc_idx = 0; sbc_idx < BITSET_WORDS; ++sbc_idx) if (sbcset[sbc_idx]) break; /* If there are no bits set in sbcset, there is no point of having both SIMPLE_BRACKET and COMPLEX_BRACKET. */ if (sbc_idx < BITSET_WORDS) { /* Build a tree for simple bracket. */ br_token.type = SIMPLE_BRACKET; br_token.opr.sbcset = sbcset; work_tree = create_token_tree (dfa, NULL, NULL, &br_token); if (BE (work_tree == NULL, 0)) goto parse_bracket_exp_espace; /* Then join them by ALT node. */ work_tree = create_tree (dfa, work_tree, mbc_tree, OP_ALT); if (BE (work_tree == NULL, 0)) goto parse_bracket_exp_espace; } else { re_free (sbcset); work_tree = mbc_tree; } } else #endif /* not RE_ENABLE_I18N */ { #ifdef RE_ENABLE_I18N free_charset (mbcset); #endif /* Build a tree for simple bracket. */ br_token.type = SIMPLE_BRACKET; br_token.opr.sbcset = sbcset; work_tree = create_token_tree (dfa, NULL, NULL, &br_token); if (BE (work_tree == NULL, 0)) goto parse_bracket_exp_espace; } return work_tree; parse_bracket_exp_espace: *err = REG_ESPACE; parse_bracket_exp_free_return: re_free (sbcset); #ifdef RE_ENABLE_I18N free_charset (mbcset); #endif /* RE_ENABLE_I18N */ return NULL; } /* Parse an element in the bracket expression. */ static reg_errcode_t parse_bracket_element (bracket_elem_t *elem, re_string_t *regexp, re_token_t *token, int token_len, re_dfa_t *dfa, reg_syntax_t syntax, bool accept_hyphen) { #ifdef RE_ENABLE_I18N int cur_char_size; cur_char_size = re_string_char_size_at (regexp, re_string_cur_idx (regexp)); if (cur_char_size > 1) { elem->type = MB_CHAR; elem->opr.wch = re_string_wchar_at (regexp, re_string_cur_idx (regexp)); re_string_skip_bytes (regexp, cur_char_size); return REG_NOERROR; } #endif /* RE_ENABLE_I18N */ re_string_skip_bytes (regexp, token_len); /* Skip a token. */ if (token->type == OP_OPEN_COLL_ELEM || token->type == OP_OPEN_CHAR_CLASS || token->type == OP_OPEN_EQUIV_CLASS) return parse_bracket_symbol (elem, regexp, token); if (BE (token->type == OP_CHARSET_RANGE, 0) && !accept_hyphen) { /* A '-' must only appear as anything but a range indicator before the closing bracket. Everything else is an error. */ re_token_t token2; (void) peek_token_bracket (&token2, regexp, syntax); if (token2.type != OP_CLOSE_BRACKET) /* The actual error value is not standardized since this whole case is undefined. But ERANGE makes good sense. */ return REG_ERANGE; } elem->type = SB_CHAR; elem->opr.ch = token->opr.c; return REG_NOERROR; } /* Parse a bracket symbol in the bracket expression. Bracket symbols are such as [::], [..], and [==]. */ static reg_errcode_t parse_bracket_symbol (bracket_elem_t *elem, re_string_t *regexp, re_token_t *token) { unsigned char ch, delim = token->opr.c; int i = 0; if (re_string_eoi(regexp)) return REG_EBRACK; for (;; ++i) { if (i >= BRACKET_NAME_BUF_SIZE) return REG_EBRACK; if (token->type == OP_OPEN_CHAR_CLASS) ch = re_string_fetch_byte_case (regexp); else ch = re_string_fetch_byte (regexp); if (re_string_eoi(regexp)) return REG_EBRACK; if (ch == delim && re_string_peek_byte (regexp, 0) == ']') break; elem->opr.name[i] = ch; } re_string_skip_bytes (regexp, 1); elem->opr.name[i] = '\0'; switch (token->type) { case OP_OPEN_COLL_ELEM: elem->type = COLL_SYM; break; case OP_OPEN_EQUIV_CLASS: elem->type = EQUIV_CLASS; break; case OP_OPEN_CHAR_CLASS: elem->type = CHAR_CLASS; break; default: break; } return REG_NOERROR; } /* Helper function for parse_bracket_exp. Build the equivalence class which is represented by NAME. The result are written to MBCSET and SBCSET. EQUIV_CLASS_ALLOC is the allocated size of mbcset->equiv_classes, is a pointer argument sinse we may update it. */ static reg_errcode_t #ifdef RE_ENABLE_I18N build_equiv_class (bitset_t sbcset, re_charset_t *mbcset, Idx *equiv_class_alloc, const unsigned char *name) #else /* not RE_ENABLE_I18N */ build_equiv_class (bitset_t sbcset, const unsigned char *name) #endif /* not RE_ENABLE_I18N */ { #ifdef _LIBC uint32_t nrules = _NL_CURRENT_WORD (LC_COLLATE, _NL_COLLATE_NRULES); if (nrules != 0) { const int32_t *table, *indirect; const unsigned char *weights, *extra, *cp; unsigned char char_buf[2]; int32_t idx1, idx2; unsigned int ch; size_t len; /* This #include defines a local function! */ # include /* Calculate the index for equivalence class. */ cp = name; table = (const int32_t *) _NL_CURRENT (LC_COLLATE, _NL_COLLATE_TABLEMB); weights = (const unsigned char *) _NL_CURRENT (LC_COLLATE, _NL_COLLATE_WEIGHTMB); extra = (const unsigned char *) _NL_CURRENT (LC_COLLATE, _NL_COLLATE_EXTRAMB); indirect = (const int32_t *) _NL_CURRENT (LC_COLLATE, _NL_COLLATE_INDIRECTMB); idx1 = findidx (&cp); if (BE (idx1 == 0 || cp < name + strlen ((const char *) name), 0)) /* This isn't a valid character. */ return REG_ECOLLATE; /* Build single byte matcing table for this equivalence class. */ char_buf[1] = (unsigned char) '\0'; len = weights[idx1 & 0xffffff]; for (ch = 0; ch < SBC_MAX; ++ch) { char_buf[0] = ch; cp = char_buf; idx2 = findidx (&cp); /* idx2 = table[ch]; */ if (idx2 == 0) /* This isn't a valid character. */ continue; /* Compare only if the length matches and the collation rule index is the same. */ if (len == weights[idx2 & 0xffffff] && (idx1 >> 24) == (idx2 >> 24)) { int cnt = 0; while (cnt <= len && weights[(idx1 & 0xffffff) + 1 + cnt] == weights[(idx2 & 0xffffff) + 1 + cnt]) ++cnt; if (cnt > len) bitset_set (sbcset, ch); } } /* Check whether the array has enough space. */ if (BE (*equiv_class_alloc == mbcset->nequiv_classes, 0)) { /* Not enough, realloc it. */ /* +1 in case of mbcset->nequiv_classes is 0. */ Idx new_equiv_class_alloc = 2 * mbcset->nequiv_classes + 1; /* Use realloc since the array is NULL if *alloc == 0. */ int32_t *new_equiv_classes = re_realloc (mbcset->equiv_classes, int32_t, new_equiv_class_alloc); if (BE (new_equiv_classes == NULL, 0)) return REG_ESPACE; mbcset->equiv_classes = new_equiv_classes; *equiv_class_alloc = new_equiv_class_alloc; } mbcset->equiv_classes[mbcset->nequiv_classes++] = idx1; } else #endif /* _LIBC */ { if (BE (strlen ((const char *) name) != 1, 0)) return REG_ECOLLATE; bitset_set (sbcset, *name); } return REG_NOERROR; } /* Helper function for parse_bracket_exp. Build the character class which is represented by NAME. The result are written to MBCSET and SBCSET. CHAR_CLASS_ALLOC is the allocated size of mbcset->char_classes, is a pointer argument sinse we may update it. */ static reg_errcode_t #ifdef RE_ENABLE_I18N build_charclass (RE_TRANSLATE_TYPE trans, bitset_t sbcset, re_charset_t *mbcset, Idx *char_class_alloc, const unsigned char *class_name, reg_syntax_t syntax) #else /* not RE_ENABLE_I18N */ build_charclass (RE_TRANSLATE_TYPE trans, bitset_t sbcset, const unsigned char *class_name, reg_syntax_t syntax) #endif /* not RE_ENABLE_I18N */ { int i; const char *name = (const char *) class_name; /* In case of REG_ICASE "upper" and "lower" match the both of upper and lower cases. */ if ((syntax & RE_ICASE) && (strcmp (name, "upper") == 0 || strcmp (name, "lower") == 0)) name = "alpha"; #ifdef RE_ENABLE_I18N /* Check the space of the arrays. */ if (BE (*char_class_alloc == mbcset->nchar_classes, 0)) { /* Not enough, realloc it. */ /* +1 in case of mbcset->nchar_classes is 0. */ Idx new_char_class_alloc = 2 * mbcset->nchar_classes + 1; /* Use realloc since array is NULL if *alloc == 0. */ wctype_t *new_char_classes = re_realloc (mbcset->char_classes, wctype_t, new_char_class_alloc); if (BE (new_char_classes == NULL, 0)) return REG_ESPACE; mbcset->char_classes = new_char_classes; *char_class_alloc = new_char_class_alloc; } mbcset->char_classes[mbcset->nchar_classes++] = __wctype (name); #endif /* RE_ENABLE_I18N */ #define BUILD_CHARCLASS_LOOP(ctype_func) \ do { \ if (BE (trans != NULL, 0)) \ { \ for (i = 0; i < SBC_MAX; ++i) \ if (ctype_func (i)) \ bitset_set (sbcset, trans[i]); \ } \ else \ { \ for (i = 0; i < SBC_MAX; ++i) \ if (ctype_func (i)) \ bitset_set (sbcset, i); \ } \ } while (0) if (strcmp (name, "alnum") == 0) BUILD_CHARCLASS_LOOP (isalnum); else if (strcmp (name, "cntrl") == 0) BUILD_CHARCLASS_LOOP (iscntrl); else if (strcmp (name, "lower") == 0) BUILD_CHARCLASS_LOOP (islower); else if (strcmp (name, "space") == 0) BUILD_CHARCLASS_LOOP (isspace); else if (strcmp (name, "alpha") == 0) BUILD_CHARCLASS_LOOP (isalpha); else if (strcmp (name, "digit") == 0) BUILD_CHARCLASS_LOOP (isdigit); else if (strcmp (name, "print") == 0) BUILD_CHARCLASS_LOOP (isprint); else if (strcmp (name, "upper") == 0) BUILD_CHARCLASS_LOOP (isupper); else if (strcmp (name, "blank") == 0) BUILD_CHARCLASS_LOOP (isblank); else if (strcmp (name, "graph") == 0) BUILD_CHARCLASS_LOOP (isgraph); else if (strcmp (name, "punct") == 0) BUILD_CHARCLASS_LOOP (ispunct); else if (strcmp (name, "xdigit") == 0) BUILD_CHARCLASS_LOOP (isxdigit); else return REG_ECTYPE; return REG_NOERROR; } static bin_tree_t * build_charclass_op (re_dfa_t *dfa, RE_TRANSLATE_TYPE trans, const unsigned char *class_name, const unsigned char *extra, bool non_match, reg_errcode_t *err) { re_bitset_ptr_t sbcset; #ifdef RE_ENABLE_I18N re_charset_t *mbcset; Idx alloc = 0; #endif /* not RE_ENABLE_I18N */ reg_errcode_t ret; re_token_t br_token; bin_tree_t *tree; sbcset = (re_bitset_ptr_t) calloc (sizeof (bitset_t), 1); #ifdef RE_ENABLE_I18N mbcset = (re_charset_t *) calloc (sizeof (re_charset_t), 1); #endif /* RE_ENABLE_I18N */ #ifdef RE_ENABLE_I18N if (BE (sbcset == NULL || mbcset == NULL, 0)) #else /* not RE_ENABLE_I18N */ if (BE (sbcset == NULL, 0)) #endif /* not RE_ENABLE_I18N */ { *err = REG_ESPACE; return NULL; } if (non_match) { #ifdef RE_ENABLE_I18N mbcset->non_match = 1; #endif /* not RE_ENABLE_I18N */ } /* We don't care the syntax in this case. */ ret = build_charclass (trans, sbcset, #ifdef RE_ENABLE_I18N mbcset, &alloc, #endif /* RE_ENABLE_I18N */ class_name, 0); if (BE (ret != REG_NOERROR, 0)) { re_free (sbcset); #ifdef RE_ENABLE_I18N free_charset (mbcset); #endif /* RE_ENABLE_I18N */ *err = ret; return NULL; } /* \w match '_' also. */ for (; *extra; extra++) bitset_set (sbcset, *extra); /* If it is non-matching list. */ if (non_match) bitset_not (sbcset); #ifdef RE_ENABLE_I18N /* Ensure only single byte characters are set. */ if (dfa->mb_cur_max > 1) bitset_mask (sbcset, dfa->sb_char); #endif /* Build a tree for simple bracket. */ br_token.type = SIMPLE_BRACKET; br_token.opr.sbcset = sbcset; tree = create_token_tree (dfa, NULL, NULL, &br_token); if (BE (tree == NULL, 0)) goto build_word_op_espace; #ifdef RE_ENABLE_I18N if (dfa->mb_cur_max > 1) { bin_tree_t *mbc_tree; /* Build a tree for complex bracket. */ br_token.type = COMPLEX_BRACKET; br_token.opr.mbcset = mbcset; dfa->has_mb_node = 1; mbc_tree = create_token_tree (dfa, NULL, NULL, &br_token); if (BE (mbc_tree == NULL, 0)) goto build_word_op_espace; /* Then join them by ALT node. */ tree = create_tree (dfa, tree, mbc_tree, OP_ALT); if (BE (mbc_tree != NULL, 1)) return tree; } else { free_charset (mbcset); return tree; } #else /* not RE_ENABLE_I18N */ return tree; #endif /* not RE_ENABLE_I18N */ build_word_op_espace: re_free (sbcset); #ifdef RE_ENABLE_I18N free_charset (mbcset); #endif /* RE_ENABLE_I18N */ *err = REG_ESPACE; return NULL; } /* This is intended for the expressions like "a{1,3}". Fetch a number from `input', and return the number. Return REG_MISSING if the number field is empty like "{,1}". Return REG_ERROR if an error occurred. */ static Idx fetch_number (re_string_t *input, re_token_t *token, reg_syntax_t syntax) { Idx num = REG_MISSING; unsigned char c; while (1) { fetch_token (token, input, syntax); c = token->opr.c; if (BE (token->type == END_OF_RE, 0)) return REG_ERROR; if (token->type == OP_CLOSE_DUP_NUM || c == ',') break; num = ((token->type != CHARACTER || c < '0' || '9' < c || num == REG_ERROR) ? REG_ERROR : ((num == REG_MISSING) ? c - '0' : num * 10 + c - '0')); num = (num > RE_DUP_MAX) ? REG_ERROR : num; } return num; } #ifdef RE_ENABLE_I18N static void free_charset (re_charset_t *cset) { re_free (cset->mbchars); # ifdef _LIBC re_free (cset->coll_syms); re_free (cset->equiv_classes); re_free (cset->range_starts); re_free (cset->range_ends); # endif re_free (cset->char_classes); re_free (cset); } #endif /* RE_ENABLE_I18N */ /* Functions for binary tree operation. */ /* Create a tree node. */ static bin_tree_t * create_tree (re_dfa_t *dfa, bin_tree_t *left, bin_tree_t *right, re_token_type_t type) { re_token_t t; t.type = type; return create_token_tree (dfa, left, right, &t); } static bin_tree_t * create_token_tree (re_dfa_t *dfa, bin_tree_t *left, bin_tree_t *right, const re_token_t *token) { bin_tree_t *tree; if (BE (dfa->str_tree_storage_idx == BIN_TREE_STORAGE_SIZE, 0)) { bin_tree_storage_t *storage = re_malloc (bin_tree_storage_t, 1); if (storage == NULL) return NULL; storage->next = dfa->str_tree_storage; dfa->str_tree_storage = storage; dfa->str_tree_storage_idx = 0; } tree = &dfa->str_tree_storage->data[dfa->str_tree_storage_idx++]; tree->parent = NULL; tree->left = left; tree->right = right; tree->token = *token; tree->token.duplicated = 0; tree->token.opt_subexp = 0; tree->first = NULL; tree->next = NULL; tree->node_idx = REG_MISSING; if (left != NULL) left->parent = tree; if (right != NULL) right->parent = tree; return tree; } /* Mark the tree SRC as an optional subexpression. To be called from preorder or postorder. */ static reg_errcode_t mark_opt_subexp (void *extra, bin_tree_t *node) { Idx idx = (Idx) (long) extra; if (node->token.type == SUBEXP && node->token.opr.idx == idx) node->token.opt_subexp = 1; return REG_NOERROR; } /* Free the allocated memory inside NODE. */ static void free_token (re_token_t *node) { #ifdef RE_ENABLE_I18N if (node->type == COMPLEX_BRACKET && node->duplicated == 0) free_charset (node->opr.mbcset); else #endif /* RE_ENABLE_I18N */ if (node->type == SIMPLE_BRACKET && node->duplicated == 0) re_free (node->opr.sbcset); } /* Worker function for tree walking. Free the allocated memory inside NODE and its children. */ static reg_errcode_t free_tree (void *extra, bin_tree_t *node) { free_token (&node->token); return REG_NOERROR; } /* Duplicate the node SRC, and return new node. This is a preorder visit similar to the one implemented by the generic visitor, but we need more infrastructure to maintain two parallel trees --- so, it's easier to duplicate. */ static bin_tree_t * duplicate_tree (const bin_tree_t *root, re_dfa_t *dfa) { const bin_tree_t *node; bin_tree_t *dup_root; bin_tree_t **p_new = &dup_root, *dup_node = root->parent; for (node = root; ; ) { /* Create a new tree and link it back to the current parent. */ *p_new = create_token_tree (dfa, NULL, NULL, &node->token); if (*p_new == NULL) return NULL; (*p_new)->parent = dup_node; (*p_new)->token.duplicated = 1; dup_node = *p_new; /* Go to the left node, or up and to the right. */ if (node->left) { node = node->left; p_new = &dup_node->left; } else { const bin_tree_t *prev = NULL; while (node->right == prev || node->right == NULL) { prev = node; node = node->parent; dup_node = dup_node->parent; if (!node) return dup_root; } node = node->right; p_new = &dup_node->right; } } } libprelude-1.0.0/libmissing/strerror.c0000664000076400007640000002136211341220440014753 00000000000000/* strerror.c --- POSIX compatible system error routine Copyright (C) 2007-2010 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 3 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 Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . */ #include #include #if REPLACE_STRERROR # include # include # if GNULIB_defined_ESOCK /* native Windows platforms */ # if HAVE_WINSOCK2_H # include # endif # endif # include "intprops.h" # undef strerror # if ! HAVE_DECL_STRERROR # define strerror(n) NULL # endif char * rpl_strerror (int n) { char const *msg = NULL; /* These error messages are taken from glibc/sysdeps/gnu/errlist.c. */ switch (n) { # if GNULIB_defined_ETXTBSY case ETXTBSY: msg = "Text file busy"; break; # endif # if GNULIB_defined_ESOCK /* native Windows platforms */ /* EWOULDBLOCK is the same as EAGAIN. */ case EINPROGRESS: msg = "Operation now in progress"; break; case EALREADY: msg = "Operation already in progress"; break; case ENOTSOCK: msg = "Socket operation on non-socket"; break; case EDESTADDRREQ: msg = "Destination address required"; break; case EMSGSIZE: msg = "Message too long"; break; case EPROTOTYPE: msg = "Protocol wrong type for socket"; break; case ENOPROTOOPT: msg = "Protocol not available"; break; case EPROTONOSUPPORT: msg = "Protocol not supported"; break; case ESOCKTNOSUPPORT: msg = "Socket type not supported"; break; case EOPNOTSUPP: msg = "Operation not supported"; break; case EPFNOSUPPORT: msg = "Protocol family not supported"; break; case EAFNOSUPPORT: msg = "Address family not supported by protocol"; break; case EADDRINUSE: msg = "Address already in use"; break; case EADDRNOTAVAIL: msg = "Cannot assign requested address"; break; case ENETDOWN: msg = "Network is down"; break; case ENETUNREACH: msg = "Network is unreachable"; break; case ENETRESET: msg = "Network dropped connection on reset"; break; case ECONNABORTED: msg = "Software caused connection abort"; break; case ECONNRESET: msg = "Connection reset by peer"; break; case ENOBUFS: msg = "No buffer space available"; break; case EISCONN: msg = "Transport endpoint is already connected"; break; case ENOTCONN: msg = "Transport endpoint is not connected"; break; case ESHUTDOWN: msg = "Cannot send after transport endpoint shutdown"; break; case ETOOMANYREFS: msg = "Too many references: cannot splice"; break; case ETIMEDOUT: msg = "Connection timed out"; break; case ECONNREFUSED: msg = "Connection refused"; break; case ELOOP: msg = "Too many levels of symbolic links"; break; case EHOSTDOWN: msg = "Host is down"; break; case EHOSTUNREACH: msg = "No route to host"; break; case EPROCLIM: msg = "Too many processes"; break; case EUSERS: msg = "Too many users"; break; case EDQUOT: msg = "Disk quota exceeded"; break; case ESTALE: msg = "Stale NFS file handle"; break; case EREMOTE: msg = "Object is remote"; break; # if HAVE_WINSOCK2_H /* WSA_INVALID_HANDLE maps to EBADF */ /* WSA_NOT_ENOUGH_MEMORY maps to ENOMEM */ /* WSA_INVALID_PARAMETER maps to EINVAL */ case WSA_OPERATION_ABORTED: msg = "Overlapped operation aborted"; break; case WSA_IO_INCOMPLETE: msg = "Overlapped I/O event object not in signaled state"; break; case WSA_IO_PENDING: msg = "Overlapped operations will complete later"; break; /* WSAEINTR maps to EINTR */ /* WSAEBADF maps to EBADF */ /* WSAEACCES maps to EACCES */ /* WSAEFAULT maps to EFAULT */ /* WSAEINVAL maps to EINVAL */ /* WSAEMFILE maps to EMFILE */ /* WSAEWOULDBLOCK maps to EWOULDBLOCK */ /* WSAEINPROGRESS is EINPROGRESS */ /* WSAEALREADY is EALREADY */ /* WSAENOTSOCK is ENOTSOCK */ /* WSAEDESTADDRREQ is EDESTADDRREQ */ /* WSAEMSGSIZE is EMSGSIZE */ /* WSAEPROTOTYPE is EPROTOTYPE */ /* WSAENOPROTOOPT is ENOPROTOOPT */ /* WSAEPROTONOSUPPORT is EPROTONOSUPPORT */ /* WSAESOCKTNOSUPPORT is ESOCKTNOSUPPORT */ /* WSAEOPNOTSUPP is EOPNOTSUPP */ /* WSAEPFNOSUPPORT is EPFNOSUPPORT */ /* WSAEAFNOSUPPORT is EAFNOSUPPORT */ /* WSAEADDRINUSE is EADDRINUSE */ /* WSAEADDRNOTAVAIL is EADDRNOTAVAIL */ /* WSAENETDOWN is ENETDOWN */ /* WSAENETUNREACH is ENETUNREACH */ /* WSAENETRESET is ENETRESET */ /* WSAECONNABORTED is ECONNABORTED */ /* WSAECONNRESET is ECONNRESET */ /* WSAENOBUFS is ENOBUFS */ /* WSAEISCONN is EISCONN */ /* WSAENOTCONN is ENOTCONN */ /* WSAESHUTDOWN is ESHUTDOWN */ /* WSAETOOMANYREFS is ETOOMANYREFS */ /* WSAETIMEDOUT is ETIMEDOUT */ /* WSAECONNREFUSED is ECONNREFUSED */ /* WSAELOOP is ELOOP */ /* WSAENAMETOOLONG maps to ENAMETOOLONG */ /* WSAEHOSTDOWN is EHOSTDOWN */ /* WSAEHOSTUNREACH is EHOSTUNREACH */ /* WSAENOTEMPTY maps to ENOTEMPTY */ /* WSAEPROCLIM is EPROCLIM */ /* WSAEUSERS is EUSERS */ /* WSAEDQUOT is EDQUOT */ /* WSAESTALE is ESTALE */ /* WSAEREMOTE is EREMOTE */ case WSASYSNOTREADY: msg = "Network subsystem is unavailable"; break; case WSAVERNOTSUPPORTED: msg = "Winsock.dll version out of range"; break; case WSANOTINITIALISED: msg = "Successful WSAStartup not yet performed"; break; case WSAEDISCON: msg = "Graceful shutdown in progress"; break; case WSAENOMORE: case WSA_E_NO_MORE: msg = "No more results"; break; case WSAECANCELLED: case WSA_E_CANCELLED: msg = "Call was canceled"; break; case WSAEINVALIDPROCTABLE: msg = "Procedure call table is invalid"; break; case WSAEINVALIDPROVIDER: msg = "Service provider is invalid"; break; case WSAEPROVIDERFAILEDINIT: msg = "Service provider failed to initialize"; break; case WSASYSCALLFAILURE: msg = "System call failure"; break; case WSASERVICE_NOT_FOUND: msg = "Service not found"; break; case WSATYPE_NOT_FOUND: msg = "Class type not found"; break; case WSAEREFUSED: msg = "Database query was refused"; break; case WSAHOST_NOT_FOUND: msg = "Host not found"; break; case WSATRY_AGAIN: msg = "Nonauthoritative host not found"; break; case WSANO_RECOVERY: msg = "Nonrecoverable error"; break; case WSANO_DATA: msg = "Valid name, no data record of requested type"; break; /* WSA_QOS_* omitted */ # endif # endif # if GNULIB_defined_ENOMSG case ENOMSG: msg = "No message of desired type"; break; # endif # if GNULIB_defined_EIDRM case EIDRM: msg = "Identifier removed"; break; # endif # if GNULIB_defined_ENOLINK case ENOLINK: msg = "Link has been severed"; break; # endif # if GNULIB_defined_EPROTO case EPROTO: msg = "Protocol error"; break; # endif # if GNULIB_defined_EMULTIHOP case EMULTIHOP: msg = "Multihop attempted"; break; # endif # if GNULIB_defined_EBADMSG case EBADMSG: msg = "Bad message"; break; # endif # if GNULIB_defined_EOVERFLOW case EOVERFLOW: msg = "Value too large for defined data type"; break; # endif # if GNULIB_defined_ENOTSUP case ENOTSUP: msg = "Not supported"; break; # endif # if GNULIB_defined_ESTALE case ESTALE: msg = "Stale NFS file handle"; break; # endif # if GNULIB_defined_ECANCELED case ECANCELED: msg = "Operation canceled"; break; # endif } if (msg) return (char *) msg; { char *result = strerror (n); if (result == NULL || result[0] == '\0') { static char const fmt[] = "Unknown error (%d)"; static char msg_buf[sizeof fmt + INT_STRLEN_BOUND (n)]; sprintf (msg_buf, fmt, n); return msg_buf; } return result; } } #endif libprelude-1.0.0/libmissing/fpucw.h0000664000076400007640000001103311341220434014217 00000000000000/* Manipulating the FPU control word. Copyright (C) 2007-2010 Free Software Foundation, Inc. Written by Bruno Haible , 2007. This program is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 3 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 Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . */ #ifndef _FPUCW_H #define _FPUCW_H /* The i386 floating point hardware (the 387 compatible FPU, not the modern SSE/SSE2 hardware) has a controllable rounding precision. It is specified through the 'PC' bits in the FPU control word ('fctrl' register). (See the GNU libc i386 header for details.) On some platforms, such as Linux or Solaris, the default precision setting is set to "extended precision". This means that 'long double' instructions operate correctly, but 'double' computations often produce slightly different results as on strictly IEEE 754 conforming systems. On some platforms, such as NetBSD, the default precision is set to "double precision". This means that 'long double' instructions will operate only as 'double', i.e. lead wrong results. The FPU control word is under control of the application, i.e. it is not required to be set either way by the ABI. (In fact, the i386 ABI http://refspecs.freestandards.org/elf/abi386-4.pdf page 3-12 = page 38 is not clear about it. But in any case, gcc treats the control word like a "preserved" register: it emits code that assumes that the control word is preserved across calls, and it restores the control word at the end of functions that modify it.) See Vincent Lefèvre's page http://www.vinc17.org/research/extended.en.html for a good explanation. See http://www.uwsg.iu.edu/hypermail/linux/kernel/0103.0/0453.html for some argumentation which setting should be the default. */ /* This header file provides the following facilities: fpucw_t integral type holding the value of 'fctrl' FPU_PC_MASK bit mask denoting the precision control FPU_PC_DOUBLE precision control for 53 bits mantissa FPU_PC_EXTENDED precision control for 64 bits mantissa GET_FPUCW () yields the current FPU control word SET_FPUCW (word) sets the FPU control word DECL_LONG_DOUBLE_ROUNDING variable declaration for BEGIN/END_LONG_DOUBLE_ROUNDING BEGIN_LONG_DOUBLE_ROUNDING () starts a sequence of instructions with 'long double' safe operation precision END_LONG_DOUBLE_ROUNDING () ends a sequence of instructions with 'long double' safe operation precision */ /* Inline assembler like this works only with GNU C. */ #if (defined __i386__ || defined __x86_64__) && defined __GNUC__ typedef unsigned short fpucw_t; /* glibc calls this fpu_control_t */ # define FPU_PC_MASK 0x0300 # define FPU_PC_DOUBLE 0x200 /* glibc calls this _FPU_DOUBLE */ # define FPU_PC_EXTENDED 0x300 /* glibc calls this _FPU_EXTENDED */ # define GET_FPUCW() \ ({ fpucw_t _cw; \ __asm__ __volatile__ ("fnstcw %0" : "=m" (*&_cw)); \ _cw; \ }) # define SET_FPUCW(word) \ (void)({ fpucw_t _ncw = (word); \ __asm__ __volatile__ ("fldcw %0" : : "m" (*&_ncw)); \ }) # define DECL_LONG_DOUBLE_ROUNDING \ fpucw_t oldcw; # define BEGIN_LONG_DOUBLE_ROUNDING() \ (void)(oldcw = GET_FPUCW (), \ SET_FPUCW ((oldcw & ~FPU_PC_MASK) | FPU_PC_EXTENDED)) # define END_LONG_DOUBLE_ROUNDING() \ SET_FPUCW (oldcw) #else typedef unsigned int fpucw_t; # define FPU_PC_MASK 0 # define FPU_PC_DOUBLE 0 # define FPU_PC_EXTENDED 0 # define GET_FPUCW() 0 # define SET_FPUCW(word) (void)(word) # define DECL_LONG_DOUBLE_ROUNDING # define BEGIN_LONG_DOUBLE_ROUNDING() # define END_LONG_DOUBLE_ROUNDING() #endif #endif /* _FPUCW_H */ libprelude-1.0.0/libmissing/xsize.h0000664000076400007640000000674211341220443014250 00000000000000/* xsize.h -- Checked size_t computations. Copyright (C) 2003, 2008, 2009, 2010 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser 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 Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ #ifndef _XSIZE_H #define _XSIZE_H /* Get size_t. */ #include /* Get SIZE_MAX. */ #include #if HAVE_STDINT_H # include #endif /* The size of memory objects is often computed through expressions of type size_t. Example: void* p = malloc (header_size + n * element_size). These computations can lead to overflow. When this happens, malloc() returns a piece of memory that is way too small, and the program then crashes while attempting to fill the memory. To avoid this, the functions and macros in this file check for overflow. The convention is that SIZE_MAX represents overflow. malloc (SIZE_MAX) is not guaranteed to fail -- think of a malloc implementation that uses mmap --, it's recommended to use size_overflow_p() or size_in_bounds_p() before invoking malloc(). The example thus becomes: size_t size = xsum (header_size, xtimes (n, element_size)); void *p = (size_in_bounds_p (size) ? malloc (size) : NULL); */ /* Convert an arbitrary value >= 0 to type size_t. */ #define xcast_size_t(N) \ ((N) <= SIZE_MAX ? (size_t) (N) : SIZE_MAX) /* Sum of two sizes, with overflow check. */ static inline size_t #if __GNUC__ >= 3 __attribute__ ((__pure__)) #endif xsum (size_t size1, size_t size2) { size_t sum = size1 + size2; return (sum >= size1 ? sum : SIZE_MAX); } /* Sum of three sizes, with overflow check. */ static inline size_t #if __GNUC__ >= 3 __attribute__ ((__pure__)) #endif xsum3 (size_t size1, size_t size2, size_t size3) { return xsum (xsum (size1, size2), size3); } /* Sum of four sizes, with overflow check. */ static inline size_t #if __GNUC__ >= 3 __attribute__ ((__pure__)) #endif xsum4 (size_t size1, size_t size2, size_t size3, size_t size4) { return xsum (xsum (xsum (size1, size2), size3), size4); } /* Maximum of two sizes, with overflow check. */ static inline size_t #if __GNUC__ >= 3 __attribute__ ((__pure__)) #endif xmax (size_t size1, size_t size2) { /* No explicit check is needed here, because for any n: max (SIZE_MAX, n) == SIZE_MAX and max (n, SIZE_MAX) == SIZE_MAX. */ return (size1 >= size2 ? size1 : size2); } /* Multiplication of a count with an element size, with overflow check. The count must be >= 0 and the element size must be > 0. This is a macro, not an inline function, so that it works correctly even when N is of a wider type and N > SIZE_MAX. */ #define xtimes(N, ELSIZE) \ ((N) <= SIZE_MAX / (ELSIZE) ? (size_t) (N) * (ELSIZE) : SIZE_MAX) /* Check for overflow. */ #define size_overflow_p(SIZE) \ ((SIZE) == SIZE_MAX) /* Check against overflow. */ #define size_in_bounds_p(SIZE) \ ((SIZE) != SIZE_MAX) #endif /* _XSIZE_H */ libprelude-1.0.0/libmissing/nl_langinfo.c0000664000076400007640000001446111341220437015367 00000000000000/* nl_langinfo() replacement: query locale dependent information. Copyright (C) 2007-2010 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 3 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 Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . */ #include /* Specification. */ #include #if REPLACE_NL_LANGINFO /* Override nl_langinfo with support for added nl_item values. */ # include # include # undef nl_langinfo char * rpl_nl_langinfo (nl_item item) { switch (item) { # if GNULIB_defined_CODESET case CODESET: { const char *locale; static char buf[2 + 10 + 1]; locale = setlocale (LC_CTYPE, NULL); if (locale != NULL && locale[0] != '\0') { /* If the locale name contains an encoding after the dot, return it. */ const char *dot = strchr (locale, '.'); if (dot != NULL) { const char *modifier; dot++; /* Look for the possible @... trailer and remove it, if any. */ modifier = strchr (dot, '@'); if (modifier == NULL) return dot; if (modifier - dot < sizeof (buf)) { memcpy (buf, dot, modifier - dot); buf [modifier - dot] = '\0'; return buf; } } } return ""; } # endif # if GNULIB_defined_ERA case ERA: /* The format is not standardized. In glibc it is a sequence of strings of the form "direction:offset:start_date:end_date:era_name:era_format" with an empty string at the end. */ return ""; case ERA_D_FMT: /* The %Ex conversion in strftime behaves like %x if the locale does not have an alternative time format. */ item = D_FMT; break; case ERA_D_T_FMT: /* The %Ec conversion in strftime behaves like %c if the locale does not have an alternative time format. */ item = D_T_FMT; break; case ERA_T_FMT: /* The %EX conversion in strftime behaves like %X if the locale does not have an alternative time format. */ item = T_FMT; break; case ALT_DIGITS: /* The format is not standardized. In glibc it is a sequence of 10 strings, appended in memory. */ return "\0\0\0\0\0\0\0\0\0\0"; # endif default: break; } return nl_langinfo (item); } #else /* Provide nl_langinfo from scratch. */ # if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ /* Native Windows platforms. */ # define WIN32_LEAN_AND_MEAN /* avoid including junk */ # include # include # else /* An old Unix platform without locales, such as Linux libc5 or BeOS. */ # endif # include char * nl_langinfo (nl_item item) { switch (item) { /* nl_langinfo items of the LC_CTYPE category */ case CODESET: # if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ { static char buf[2 + 10 + 1]; /* Woe32 has a function returning the locale's codepage as a number. */ sprintf (buf, "CP%u", GetACP ()); return buf; } # elif defined __BEOS__ return "UTF-8"; # else return "ISO-8859-1"; # endif /* nl_langinfo items of the LC_NUMERIC category */ case RADIXCHAR: return localeconv () ->decimal_point; case THOUSEP: return localeconv () ->thousands_sep; /* nl_langinfo items of the LC_TIME category. TODO: Really use the locale. */ case D_T_FMT: case ERA_D_T_FMT: return "%a %b %e %H:%M:%S %Y"; case D_FMT: case ERA_D_FMT: return "%m/%d/%y"; case T_FMT: case ERA_T_FMT: return "%H:%M:%S"; case T_FMT_AMPM: return "%I:%M:%S %p"; case AM_STR: return "AM"; case PM_STR: return "PM"; case DAY_1: return "Sunday"; case DAY_2: return "Monday"; case DAY_3: return "Tuesday"; case DAY_4: return "Wednesday"; case DAY_5: return "Thursday"; case DAY_6: return "Friday"; case DAY_7: return "Saturday"; case ABDAY_1: return "Sun"; case ABDAY_2: return "Mon"; case ABDAY_3: return "Tue"; case ABDAY_4: return "Wed"; case ABDAY_5: return "Thu"; case ABDAY_6: return "Fri"; case ABDAY_7: return "Sat"; case MON_1: return "January"; case MON_2: return "February"; case MON_3: return "March"; case MON_4: return "April"; case MON_5: return "May"; case MON_6: return "June"; case MON_7: return "July"; case MON_8: return "August"; case MON_9: return "September"; case MON_10: return "October"; case MON_11: return "November"; case MON_12: return "December"; case ABMON_1: return "Jan"; case ABMON_2: return "Feb"; case ABMON_3: return "Mar"; case ABMON_4: return "Apr"; case ABMON_5: return "May"; case ABMON_6: return "Jun"; case ABMON_7: return "Jul"; case ABMON_8: return "Aug"; case ABMON_9: return "Sep"; case ABMON_10: return "Oct"; case ABMON_11: return "Nov"; case ABMON_12: return "Dec"; case ERA: return ""; case ALT_DIGITS: return "\0\0\0\0\0\0\0\0\0\0"; /* nl_langinfo items of the LC_MONETARY category TODO: Really use the locale. */ case CRNCYSTR: return "-"; /* nl_langinfo items of the LC_MESSAGES category TODO: Really use the locale. */ case YESEXPR: return "^[yY]"; case NOEXPR: return "^[nN]"; default: return ""; } } #endif libprelude-1.0.0/libmissing/printf-frexp.c0000664000076400007640000001227611341220437015527 00000000000000/* Split a double into fraction and mantissa, for hexadecimal printf. Copyright (C) 2007, 2009, 2010 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 3 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 Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . */ #include /* Specification. */ #ifdef USE_LONG_DOUBLE # include "printf-frexpl.h" #else # include "printf-frexp.h" #endif #include #include #ifdef USE_LONG_DOUBLE # include "fpucw.h" #endif /* This file assumes FLT_RADIX = 2. If FLT_RADIX is a power of 2 greater than 2, or not even a power of 2, some rounding errors can occur, so that then the returned mantissa is only guaranteed to be <= 2.0, not < 2.0. */ #ifdef USE_LONG_DOUBLE # define FUNC printf_frexpl # define DOUBLE long double # define MIN_EXP LDBL_MIN_EXP # if HAVE_FREXPL_IN_LIBC && HAVE_LDEXPL_IN_LIBC # define USE_FREXP_LDEXP # define FREXP frexpl # define LDEXP ldexpl # endif # define DECL_ROUNDING DECL_LONG_DOUBLE_ROUNDING # define BEGIN_ROUNDING() BEGIN_LONG_DOUBLE_ROUNDING () # define END_ROUNDING() END_LONG_DOUBLE_ROUNDING () # define L_(literal) literal##L #else # define FUNC printf_frexp # define DOUBLE double # define MIN_EXP DBL_MIN_EXP # if HAVE_FREXP_IN_LIBC && HAVE_LDEXP_IN_LIBC # define USE_FREXP_LDEXP # define FREXP frexp # define LDEXP ldexp # endif # define DECL_ROUNDING # define BEGIN_ROUNDING() # define END_ROUNDING() # define L_(literal) literal #endif DOUBLE FUNC (DOUBLE x, int *expptr) { int exponent; DECL_ROUNDING BEGIN_ROUNDING (); #ifdef USE_FREXP_LDEXP /* frexp and ldexp are usually faster than the loop below. */ x = FREXP (x, &exponent); x = x + x; exponent -= 1; if (exponent < MIN_EXP - 1) { x = LDEXP (x, exponent - (MIN_EXP - 1)); exponent = MIN_EXP - 1; } #else { /* Since the exponent is an 'int', it fits in 64 bits. Therefore the loops are executed no more than 64 times. */ DOUBLE pow2[64]; /* pow2[i] = 2^2^i */ DOUBLE powh[64]; /* powh[i] = 2^-2^i */ int i; exponent = 0; if (x >= L_(1.0)) { /* A nonnegative exponent. */ { DOUBLE pow2_i; /* = pow2[i] */ DOUBLE powh_i; /* = powh[i] */ /* Invariants: pow2_i = 2^2^i, powh_i = 2^-2^i, x * 2^exponent = argument, x >= 1.0. */ for (i = 0, pow2_i = L_(2.0), powh_i = L_(0.5); ; i++, pow2_i = pow2_i * pow2_i, powh_i = powh_i * powh_i) { if (x >= pow2_i) { exponent += (1 << i); x *= powh_i; } else break; pow2[i] = pow2_i; powh[i] = powh_i; } } /* Here 1.0 <= x < 2^2^i. */ } else { /* A negative exponent. */ { DOUBLE pow2_i; /* = pow2[i] */ DOUBLE powh_i; /* = powh[i] */ /* Invariants: pow2_i = 2^2^i, powh_i = 2^-2^i, x * 2^exponent = argument, x < 1.0, exponent >= MIN_EXP - 1. */ for (i = 0, pow2_i = L_(2.0), powh_i = L_(0.5); ; i++, pow2_i = pow2_i * pow2_i, powh_i = powh_i * powh_i) { if (exponent - (1 << i) < MIN_EXP - 1) break; exponent -= (1 << i); x *= pow2_i; if (x >= L_(1.0)) break; pow2[i] = pow2_i; powh[i] = powh_i; } } /* Here either x < 1.0 and exponent - 2^i < MIN_EXP - 1 <= exponent, or 1.0 <= x < 2^2^i and exponent >= MIN_EXP - 1. */ if (x < L_(1.0)) /* Invariants: x * 2^exponent = argument, x < 1.0 and exponent - 2^i < MIN_EXP - 1 <= exponent. */ while (i > 0) { i--; if (exponent - (1 << i) >= MIN_EXP - 1) { exponent -= (1 << i); x *= pow2[i]; if (x >= L_(1.0)) break; } } /* Here either x < 1.0 and exponent = MIN_EXP - 1, or 1.0 <= x < 2^2^i and exponent >= MIN_EXP - 1. */ } /* Invariants: x * 2^exponent = argument, and either x < 1.0 and exponent = MIN_EXP - 1, or 1.0 <= x < 2^2^i and exponent >= MIN_EXP - 1. */ while (i > 0) { i--; if (x >= pow2[i]) { exponent += (1 << i); x *= powh[i]; } } /* Here either x < 1.0 and exponent = MIN_EXP - 1, or 1.0 <= x < 2.0 and exponent >= MIN_EXP - 1. */ } #endif END_ROUNDING (); *expptr = exponent; return x; } libprelude-1.0.0/libmissing/config.charset0000664000076400007640000005471411341220434015557 00000000000000#! /bin/sh # Output a system dependent table of character encoding aliases. # # Copyright (C) 2000-2004, 2006-2010 Free Software Foundation, Inc. # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU Lesser 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 Lesser General Public License for more details. # # You should have received a copy of the GNU Lesser General Public License along # with this program; if not, write to the Free Software Foundation, # Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. # # The table consists of lines of the form # ALIAS CANONICAL # # ALIAS is the (system dependent) result of "nl_langinfo (CODESET)". # ALIAS is compared in a case sensitive way. # # CANONICAL is the GNU canonical name for this character encoding. # It must be an encoding supported by libiconv. Support by GNU libc is # also desirable. CANONICAL is case insensitive. Usually an upper case # MIME charset name is preferred. # The current list of GNU canonical charset names is as follows. # # name MIME? used by which systems # ASCII, ANSI_X3.4-1968 glibc solaris freebsd netbsd darwin # ISO-8859-1 Y glibc aix hpux irix osf solaris freebsd netbsd openbsd darwin # ISO-8859-2 Y glibc aix hpux irix osf solaris freebsd netbsd openbsd darwin # ISO-8859-3 Y glibc solaris # ISO-8859-4 Y osf solaris freebsd netbsd openbsd darwin # ISO-8859-5 Y glibc aix hpux irix osf solaris freebsd netbsd openbsd darwin # ISO-8859-6 Y glibc aix hpux solaris # ISO-8859-7 Y glibc aix hpux irix osf solaris netbsd openbsd darwin # ISO-8859-8 Y glibc aix hpux osf solaris # ISO-8859-9 Y glibc aix hpux irix osf solaris darwin # ISO-8859-13 glibc netbsd openbsd darwin # ISO-8859-14 glibc # ISO-8859-15 glibc aix osf solaris freebsd netbsd openbsd darwin # KOI8-R Y glibc solaris freebsd netbsd openbsd darwin # KOI8-U Y glibc freebsd netbsd openbsd darwin # KOI8-T glibc # CP437 dos # CP775 dos # CP850 aix osf dos # CP852 dos # CP855 dos # CP856 aix # CP857 dos # CP861 dos # CP862 dos # CP864 dos # CP865 dos # CP866 freebsd netbsd openbsd darwin dos # CP869 dos # CP874 woe32 dos # CP922 aix # CP932 aix woe32 dos # CP943 aix # CP949 osf darwin woe32 dos # CP950 woe32 dos # CP1046 aix # CP1124 aix # CP1125 dos # CP1129 aix # CP1131 darwin # CP1250 woe32 # CP1251 glibc solaris netbsd openbsd darwin woe32 # CP1252 aix woe32 # CP1253 woe32 # CP1254 woe32 # CP1255 glibc woe32 # CP1256 woe32 # CP1257 woe32 # GB2312 Y glibc aix hpux irix solaris freebsd netbsd darwin # EUC-JP Y glibc aix hpux irix osf solaris freebsd netbsd darwin # EUC-KR Y glibc aix hpux irix osf solaris freebsd netbsd darwin # EUC-TW glibc aix hpux irix osf solaris netbsd # BIG5 Y glibc aix hpux osf solaris freebsd netbsd darwin # BIG5-HKSCS glibc solaris darwin # GBK glibc aix osf solaris darwin woe32 dos # GB18030 glibc solaris netbsd darwin # SHIFT_JIS Y hpux osf solaris freebsd netbsd darwin # JOHAB glibc solaris woe32 # TIS-620 glibc aix hpux osf solaris # VISCII Y glibc # TCVN5712-1 glibc # ARMSCII-8 glibc darwin # GEORGIAN-PS glibc # PT154 glibc # HP-ROMAN8 hpux # HP-ARABIC8 hpux # HP-GREEK8 hpux # HP-HEBREW8 hpux # HP-TURKISH8 hpux # HP-KANA8 hpux # DEC-KANJI osf # DEC-HANYU osf # UTF-8 Y glibc aix hpux osf solaris netbsd darwin # # Note: Names which are not marked as being a MIME name should not be used in # Internet protocols for information interchange (mail, news, etc.). # # Note: ASCII and ANSI_X3.4-1968 are synonymous canonical names. Applications # must understand both names and treat them as equivalent. # # The first argument passed to this file is the canonical host specification, # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM # or # CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM host="$1" os=`echo "$host" | sed -e 's/^[^-]*-[^-]*-\(.*\)$/\1/'` echo "# This file contains a table of character encoding aliases," echo "# suitable for operating system '${os}'." echo "# It was automatically generated from config.charset." # List of references, updated during installation: echo "# Packages using this file: " case "$os" in linux-gnulibc1*) # Linux libc5 doesn't have nl_langinfo(CODESET); therefore # localcharset.c falls back to using the full locale name # from the environment variables. echo "C ASCII" echo "POSIX ASCII" for l in af af_ZA ca ca_ES da da_DK de de_AT de_BE de_CH de_DE de_LU \ en en_AU en_BW en_CA en_DK en_GB en_IE en_NZ en_US en_ZA \ en_ZW es es_AR es_BO es_CL es_CO es_DO es_EC es_ES es_GT \ es_HN es_MX es_PA es_PE es_PY es_SV es_US es_UY es_VE et \ et_EE eu eu_ES fi fi_FI fo fo_FO fr fr_BE fr_CA fr_CH fr_FR \ fr_LU ga ga_IE gl gl_ES id id_ID in in_ID is is_IS it it_CH \ it_IT kl kl_GL nl nl_BE nl_NL no no_NO pt pt_BR pt_PT sv \ sv_FI sv_SE; do echo "$l ISO-8859-1" echo "$l.iso-8859-1 ISO-8859-1" echo "$l.iso-8859-15 ISO-8859-15" echo "$l.iso-8859-15@euro ISO-8859-15" echo "$l@euro ISO-8859-15" echo "$l.cp-437 CP437" echo "$l.cp-850 CP850" echo "$l.cp-1252 CP1252" echo "$l.cp-1252@euro CP1252" #echo "$l.atari-st ATARI-ST" # not a commonly used encoding echo "$l.utf-8 UTF-8" echo "$l.utf-8@euro UTF-8" done for l in cs cs_CZ hr hr_HR hu hu_HU pl pl_PL ro ro_RO sk sk_SK sl \ sl_SI sr sr_CS sr_YU; do echo "$l ISO-8859-2" echo "$l.iso-8859-2 ISO-8859-2" echo "$l.cp-852 CP852" echo "$l.cp-1250 CP1250" echo "$l.utf-8 UTF-8" done for l in mk mk_MK ru ru_RU; do echo "$l ISO-8859-5" echo "$l.iso-8859-5 ISO-8859-5" echo "$l.koi8-r KOI8-R" echo "$l.cp-866 CP866" echo "$l.cp-1251 CP1251" echo "$l.utf-8 UTF-8" done for l in ar ar_SA; do echo "$l ISO-8859-6" echo "$l.iso-8859-6 ISO-8859-6" echo "$l.cp-864 CP864" #echo "$l.cp-868 CP868" # not a commonly used encoding echo "$l.cp-1256 CP1256" echo "$l.utf-8 UTF-8" done for l in el el_GR gr gr_GR; do echo "$l ISO-8859-7" echo "$l.iso-8859-7 ISO-8859-7" echo "$l.cp-869 CP869" echo "$l.cp-1253 CP1253" echo "$l.cp-1253@euro CP1253" echo "$l.utf-8 UTF-8" echo "$l.utf-8@euro UTF-8" done for l in he he_IL iw iw_IL; do echo "$l ISO-8859-8" echo "$l.iso-8859-8 ISO-8859-8" echo "$l.cp-862 CP862" echo "$l.cp-1255 CP1255" echo "$l.utf-8 UTF-8" done for l in tr tr_TR; do echo "$l ISO-8859-9" echo "$l.iso-8859-9 ISO-8859-9" echo "$l.cp-857 CP857" echo "$l.cp-1254 CP1254" echo "$l.utf-8 UTF-8" done for l in lt lt_LT lv lv_LV; do #echo "$l BALTIC" # not a commonly used encoding, wrong encoding name echo "$l ISO-8859-13" done for l in ru_UA uk uk_UA; do echo "$l KOI8-U" done for l in zh zh_CN; do #echo "$l GB_2312-80" # not a commonly used encoding, wrong encoding name echo "$l GB2312" done for l in ja ja_JP ja_JP.EUC; do echo "$l EUC-JP" done for l in ko ko_KR; do echo "$l EUC-KR" done for l in th th_TH; do echo "$l TIS-620" done for l in fa fa_IR; do #echo "$l ISIRI-3342" # a broken encoding echo "$l.utf-8 UTF-8" done ;; linux* | *-gnu*) # With glibc-2.1 or newer, we don't need any canonicalization, # because glibc has iconv and both glibc and libiconv support all # GNU canonical names directly. Therefore, the Makefile does not # need to install the alias file at all. # The following applies only to glibc-2.0.x and older libcs. echo "ISO_646.IRV:1983 ASCII" ;; aix*) echo "ISO8859-1 ISO-8859-1" echo "ISO8859-2 ISO-8859-2" echo "ISO8859-5 ISO-8859-5" echo "ISO8859-6 ISO-8859-6" echo "ISO8859-7 ISO-8859-7" echo "ISO8859-8 ISO-8859-8" echo "ISO8859-9 ISO-8859-9" echo "ISO8859-15 ISO-8859-15" echo "IBM-850 CP850" echo "IBM-856 CP856" echo "IBM-921 ISO-8859-13" echo "IBM-922 CP922" echo "IBM-932 CP932" echo "IBM-943 CP943" echo "IBM-1046 CP1046" echo "IBM-1124 CP1124" echo "IBM-1129 CP1129" echo "IBM-1252 CP1252" echo "IBM-eucCN GB2312" echo "IBM-eucJP EUC-JP" echo "IBM-eucKR EUC-KR" echo "IBM-eucTW EUC-TW" echo "big5 BIG5" echo "GBK GBK" echo "TIS-620 TIS-620" echo "UTF-8 UTF-8" ;; hpux*) echo "iso88591 ISO-8859-1" echo "iso88592 ISO-8859-2" echo "iso88595 ISO-8859-5" echo "iso88596 ISO-8859-6" echo "iso88597 ISO-8859-7" echo "iso88598 ISO-8859-8" echo "iso88599 ISO-8859-9" echo "iso885915 ISO-8859-15" echo "roman8 HP-ROMAN8" echo "arabic8 HP-ARABIC8" echo "greek8 HP-GREEK8" echo "hebrew8 HP-HEBREW8" echo "turkish8 HP-TURKISH8" echo "kana8 HP-KANA8" echo "tis620 TIS-620" echo "big5 BIG5" echo "eucJP EUC-JP" echo "eucKR EUC-KR" echo "eucTW EUC-TW" echo "hp15CN GB2312" #echo "ccdc ?" # what is this? echo "SJIS SHIFT_JIS" echo "utf8 UTF-8" ;; irix*) echo "ISO8859-1 ISO-8859-1" echo "ISO8859-2 ISO-8859-2" echo "ISO8859-5 ISO-8859-5" echo "ISO8859-7 ISO-8859-7" echo "ISO8859-9 ISO-8859-9" echo "eucCN GB2312" echo "eucJP EUC-JP" echo "eucKR EUC-KR" echo "eucTW EUC-TW" ;; osf*) echo "ISO8859-1 ISO-8859-1" echo "ISO8859-2 ISO-8859-2" echo "ISO8859-4 ISO-8859-4" echo "ISO8859-5 ISO-8859-5" echo "ISO8859-7 ISO-8859-7" echo "ISO8859-8 ISO-8859-8" echo "ISO8859-9 ISO-8859-9" echo "ISO8859-15 ISO-8859-15" echo "cp850 CP850" echo "big5 BIG5" echo "dechanyu DEC-HANYU" echo "dechanzi GB2312" echo "deckanji DEC-KANJI" echo "deckorean EUC-KR" echo "eucJP EUC-JP" echo "eucKR EUC-KR" echo "eucTW EUC-TW" echo "GBK GBK" echo "KSC5601 CP949" echo "sdeckanji EUC-JP" echo "SJIS SHIFT_JIS" echo "TACTIS TIS-620" echo "UTF-8 UTF-8" ;; solaris*) echo "646 ASCII" echo "ISO8859-1 ISO-8859-1" echo "ISO8859-2 ISO-8859-2" echo "ISO8859-3 ISO-8859-3" echo "ISO8859-4 ISO-8859-4" echo "ISO8859-5 ISO-8859-5" echo "ISO8859-6 ISO-8859-6" echo "ISO8859-7 ISO-8859-7" echo "ISO8859-8 ISO-8859-8" echo "ISO8859-9 ISO-8859-9" echo "ISO8859-15 ISO-8859-15" echo "koi8-r KOI8-R" echo "ansi-1251 CP1251" echo "BIG5 BIG5" echo "Big5-HKSCS BIG5-HKSCS" echo "gb2312 GB2312" echo "GBK GBK" echo "GB18030 GB18030" echo "cns11643 EUC-TW" echo "5601 EUC-KR" echo "ko_KR.johap92 JOHAB" echo "eucJP EUC-JP" echo "PCK SHIFT_JIS" echo "TIS620.2533 TIS-620" #echo "sun_eu_greek ?" # what is this? echo "UTF-8 UTF-8" ;; freebsd* | os2*) # FreeBSD 4.2 doesn't have nl_langinfo(CODESET); therefore # localcharset.c falls back to using the full locale name # from the environment variables. # Likewise for OS/2. OS/2 has XFree86 just like FreeBSD. Just # reuse FreeBSD's locale data for OS/2. echo "C ASCII" echo "US-ASCII ASCII" for l in la_LN lt_LN; do echo "$l.ASCII ASCII" done for l in da_DK de_AT de_CH de_DE en_AU en_CA en_GB en_US es_ES \ fi_FI fr_BE fr_CA fr_CH fr_FR is_IS it_CH it_IT la_LN \ lt_LN nl_BE nl_NL no_NO pt_PT sv_SE; do echo "$l.ISO_8859-1 ISO-8859-1" echo "$l.DIS_8859-15 ISO-8859-15" done for l in cs_CZ hr_HR hu_HU la_LN lt_LN pl_PL sl_SI; do echo "$l.ISO_8859-2 ISO-8859-2" done for l in la_LN lt_LT; do echo "$l.ISO_8859-4 ISO-8859-4" done for l in ru_RU ru_SU; do echo "$l.KOI8-R KOI8-R" echo "$l.ISO_8859-5 ISO-8859-5" echo "$l.CP866 CP866" done echo "uk_UA.KOI8-U KOI8-U" echo "zh_TW.BIG5 BIG5" echo "zh_TW.Big5 BIG5" echo "zh_CN.EUC GB2312" echo "ja_JP.EUC EUC-JP" echo "ja_JP.SJIS SHIFT_JIS" echo "ja_JP.Shift_JIS SHIFT_JIS" echo "ko_KR.EUC EUC-KR" ;; netbsd*) echo "646 ASCII" echo "ISO8859-1 ISO-8859-1" echo "ISO8859-2 ISO-8859-2" echo "ISO8859-4 ISO-8859-4" echo "ISO8859-5 ISO-8859-5" echo "ISO8859-7 ISO-8859-7" echo "ISO8859-13 ISO-8859-13" echo "ISO8859-15 ISO-8859-15" echo "eucCN GB2312" echo "eucJP EUC-JP" echo "eucKR EUC-KR" echo "eucTW EUC-TW" echo "BIG5 BIG5" echo "SJIS SHIFT_JIS" ;; openbsd*) echo "646 ASCII" echo "ISO8859-1 ISO-8859-1" echo "ISO8859-2 ISO-8859-2" echo "ISO8859-4 ISO-8859-4" echo "ISO8859-5 ISO-8859-5" echo "ISO8859-7 ISO-8859-7" echo "ISO8859-13 ISO-8859-13" echo "ISO8859-15 ISO-8859-15" ;; darwin[56]*) # Darwin 6.8 doesn't have nl_langinfo(CODESET); therefore # localcharset.c falls back to using the full locale name # from the environment variables. echo "C ASCII" for l in en_AU en_CA en_GB en_US la_LN; do echo "$l.US-ASCII ASCII" done for l in da_DK de_AT de_CH de_DE en_AU en_CA en_GB en_US es_ES \ fi_FI fr_BE fr_CA fr_CH fr_FR is_IS it_CH it_IT nl_BE \ nl_NL no_NO pt_PT sv_SE; do echo "$l ISO-8859-1" echo "$l.ISO8859-1 ISO-8859-1" echo "$l.ISO8859-15 ISO-8859-15" done for l in la_LN; do echo "$l.ISO8859-1 ISO-8859-1" echo "$l.ISO8859-15 ISO-8859-15" done for l in cs_CZ hr_HR hu_HU la_LN pl_PL sl_SI; do echo "$l.ISO8859-2 ISO-8859-2" done for l in la_LN lt_LT; do echo "$l.ISO8859-4 ISO-8859-4" done for l in ru_RU; do echo "$l.KOI8-R KOI8-R" echo "$l.ISO8859-5 ISO-8859-5" echo "$l.CP866 CP866" done for l in bg_BG; do echo "$l.CP1251 CP1251" done echo "uk_UA.KOI8-U KOI8-U" echo "zh_TW.BIG5 BIG5" echo "zh_TW.Big5 BIG5" echo "zh_CN.EUC GB2312" echo "ja_JP.EUC EUC-JP" echo "ja_JP.SJIS SHIFT_JIS" echo "ko_KR.EUC EUC-KR" ;; darwin*) # Darwin 7.5 has nl_langinfo(CODESET), but sometimes its value is # useless: # - It returns the empty string when LANG is set to a locale of the # form ll_CC, although ll_CC/LC_CTYPE is a symlink to an UTF-8 # LC_CTYPE file. # - The environment variables LANG, LC_CTYPE, LC_ALL are not set by # the system; nl_langinfo(CODESET) returns "US-ASCII" in this case. # - The documentation says: # "... all code that calls BSD system routines should ensure # that the const *char parameters of these routines are in UTF-8 # encoding. All BSD system functions expect their string # parameters to be in UTF-8 encoding and nothing else." # It also says # "An additional caveat is that string parameters for files, # paths, and other file-system entities must be in canonical # UTF-8. In a canonical UTF-8 Unicode string, all decomposable # characters are decomposed ..." # but this is not true: You can pass non-decomposed UTF-8 strings # to file system functions, and it is the OS which will convert # them to decomposed UTF-8 before accessing the file system. # - The Apple Terminal application displays UTF-8 by default. # - However, other applications are free to use different encodings: # - xterm uses ISO-8859-1 by default. # - TextEdit uses MacRoman by default. # We prefer UTF-8 over decomposed UTF-8-MAC because one should # minimize the use of decomposed Unicode. Unfortunately, through the # Darwin file system, decomposed UTF-8 strings are leaked into user # space nevertheless. # Then there are also the locales with encodings other than US-ASCII # and UTF-8. These locales can be occasionally useful to users (e.g. # when grepping through ISO-8859-1 encoded text files), when all their # file names are in US-ASCII. echo "ISO8859-1 ISO-8859-1" echo "ISO8859-2 ISO-8859-2" echo "ISO8859-4 ISO-8859-4" echo "ISO8859-5 ISO-8859-5" echo "ISO8859-7 ISO-8859-7" echo "ISO8859-9 ISO-8859-9" echo "ISO8859-13 ISO-8859-13" echo "ISO8859-15 ISO-8859-15" echo "KOI8-R KOI8-R" echo "KOI8-U KOI8-U" echo "CP866 CP866" echo "CP949 CP949" echo "CP1131 CP1131" echo "CP1251 CP1251" echo "eucCN GB2312" echo "GB2312 GB2312" echo "eucJP EUC-JP" echo "eucKR EUC-KR" echo "Big5 BIG5" echo "Big5HKSCS BIG5-HKSCS" echo "GBK GBK" echo "GB18030 GB18030" echo "SJIS SHIFT_JIS" echo "ARMSCII-8 ARMSCII-8" echo "PT154 PT154" #echo "ISCII-DEV ?" echo "* UTF-8" ;; beos* | haiku*) # BeOS and Haiku have a single locale, and it has UTF-8 encoding. echo "* UTF-8" ;; msdosdjgpp*) # DJGPP 2.03 doesn't have nl_langinfo(CODESET); therefore # localcharset.c falls back to using the full locale name # from the environment variables. echo "#" echo "# The encodings given here may not all be correct." echo "# If you find that the encoding given for your language and" echo "# country is not the one your DOS machine actually uses, just" echo "# correct it in this file, and send a mail to" echo "# Juan Manuel Guerrero " echo "# and Bruno Haible ." echo "#" echo "C ASCII" # ISO-8859-1 languages echo "ca CP850" echo "ca_ES CP850" echo "da CP865" # not CP850 ?? echo "da_DK CP865" # not CP850 ?? echo "de CP850" echo "de_AT CP850" echo "de_CH CP850" echo "de_DE CP850" echo "en CP850" echo "en_AU CP850" # not CP437 ?? echo "en_CA CP850" echo "en_GB CP850" echo "en_NZ CP437" echo "en_US CP437" echo "en_ZA CP850" # not CP437 ?? echo "es CP850" echo "es_AR CP850" echo "es_BO CP850" echo "es_CL CP850" echo "es_CO CP850" echo "es_CR CP850" echo "es_CU CP850" echo "es_DO CP850" echo "es_EC CP850" echo "es_ES CP850" echo "es_GT CP850" echo "es_HN CP850" echo "es_MX CP850" echo "es_NI CP850" echo "es_PA CP850" echo "es_PY CP850" echo "es_PE CP850" echo "es_SV CP850" echo "es_UY CP850" echo "es_VE CP850" echo "et CP850" echo "et_EE CP850" echo "eu CP850" echo "eu_ES CP850" echo "fi CP850" echo "fi_FI CP850" echo "fr CP850" echo "fr_BE CP850" echo "fr_CA CP850" echo "fr_CH CP850" echo "fr_FR CP850" echo "ga CP850" echo "ga_IE CP850" echo "gd CP850" echo "gd_GB CP850" echo "gl CP850" echo "gl_ES CP850" echo "id CP850" # not CP437 ?? echo "id_ID CP850" # not CP437 ?? echo "is CP861" # not CP850 ?? echo "is_IS CP861" # not CP850 ?? echo "it CP850" echo "it_CH CP850" echo "it_IT CP850" echo "lt CP775" echo "lt_LT CP775" echo "lv CP775" echo "lv_LV CP775" echo "nb CP865" # not CP850 ?? echo "nb_NO CP865" # not CP850 ?? echo "nl CP850" echo "nl_BE CP850" echo "nl_NL CP850" echo "nn CP865" # not CP850 ?? echo "nn_NO CP865" # not CP850 ?? echo "no CP865" # not CP850 ?? echo "no_NO CP865" # not CP850 ?? echo "pt CP850" echo "pt_BR CP850" echo "pt_PT CP850" echo "sv CP850" echo "sv_SE CP850" # ISO-8859-2 languages echo "cs CP852" echo "cs_CZ CP852" echo "hr CP852" echo "hr_HR CP852" echo "hu CP852" echo "hu_HU CP852" echo "pl CP852" echo "pl_PL CP852" echo "ro CP852" echo "ro_RO CP852" echo "sk CP852" echo "sk_SK CP852" echo "sl CP852" echo "sl_SI CP852" echo "sq CP852" echo "sq_AL CP852" echo "sr CP852" # CP852 or CP866 or CP855 ?? echo "sr_CS CP852" # CP852 or CP866 or CP855 ?? echo "sr_YU CP852" # CP852 or CP866 or CP855 ?? # ISO-8859-3 languages echo "mt CP850" echo "mt_MT CP850" # ISO-8859-5 languages echo "be CP866" echo "be_BE CP866" echo "bg CP866" # not CP855 ?? echo "bg_BG CP866" # not CP855 ?? echo "mk CP866" # not CP855 ?? echo "mk_MK CP866" # not CP855 ?? echo "ru CP866" echo "ru_RU CP866" echo "uk CP1125" echo "uk_UA CP1125" # ISO-8859-6 languages echo "ar CP864" echo "ar_AE CP864" echo "ar_DZ CP864" echo "ar_EG CP864" echo "ar_IQ CP864" echo "ar_IR CP864" echo "ar_JO CP864" echo "ar_KW CP864" echo "ar_MA CP864" echo "ar_OM CP864" echo "ar_QA CP864" echo "ar_SA CP864" echo "ar_SY CP864" # ISO-8859-7 languages echo "el CP869" echo "el_GR CP869" # ISO-8859-8 languages echo "he CP862" echo "he_IL CP862" # ISO-8859-9 languages echo "tr CP857" echo "tr_TR CP857" # Japanese echo "ja CP932" echo "ja_JP CP932" # Chinese echo "zh_CN GBK" echo "zh_TW CP950" # not CP938 ?? # Korean echo "kr CP949" # not CP934 ?? echo "kr_KR CP949" # not CP934 ?? # Thai echo "th CP874" echo "th_TH CP874" # Other echo "eo CP850" echo "eo_EO CP850" ;; esac libprelude-1.0.0/libmissing/gettimeofday.c0000664000076400007640000000746411345707014015574 00000000000000/* Provide gettimeofday for systems that don't have it or for which it's broken. Copyright (C) 2001-2003, 2005-2007, 2009-2010 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser 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 Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ /* written by Jim Meyering */ #include /* Specification. */ #include #include #if HAVE_SYS_TIMEB_H # include #endif #if GETTIMEOFDAY_CLOBBERS_LOCALTIME || TZSET_CLOBBERS_LOCALTIME /* Work around the bug in some systems whereby gettimeofday clobbers the static buffer that localtime uses for its return value. The gettimeofday function from Mac OS X 10.0.4 (i.e., Darwin 1.3.7) has this problem. The tzset replacement is necessary for at least Solaris 2.5, 2.5.1, and 2.6. */ static struct tm tm_zero_buffer; static struct tm *localtime_buffer_addr = &tm_zero_buffer; #undef localtime extern struct tm *localtime (time_t const *); #undef gmtime extern struct tm *gmtime (time_t const *); /* This is a wrapper for localtime. It is used only on systems for which gettimeofday clobbers the static buffer used for localtime's result. On the first call, record the address of the static buffer that localtime uses for its result. */ struct tm * rpl_localtime (time_t const *timep) { struct tm *tm = localtime (timep); if (localtime_buffer_addr == &tm_zero_buffer) localtime_buffer_addr = tm; return tm; } /* Same as above, since gmtime and localtime use the same buffer. */ struct tm * rpl_gmtime (time_t const *timep) { struct tm *tm = gmtime (timep); if (localtime_buffer_addr == &tm_zero_buffer) localtime_buffer_addr = tm; return tm; } #endif /* GETTIMEOFDAY_CLOBBERS_LOCALTIME || TZSET_CLOBBERS_LOCALTIME */ #if TZSET_CLOBBERS_LOCALTIME #undef tzset extern void tzset (void); /* This is a wrapper for tzset, for systems on which tzset may clobber the static buffer used for localtime's result. */ void rpl_tzset (void) { /* Save and restore the contents of the buffer used for localtime's result around the call to tzset. */ struct tm save = *localtime_buffer_addr; tzset (); *localtime_buffer_addr = save; } #endif /* This is a wrapper for gettimeofday. It is used only on systems that lack this function, or whose implementation of this function causes problems. */ int rpl_gettimeofday (struct timeval *restrict tv, void *restrict tz) { #undef gettimeofday #if HAVE_GETTIMEOFDAY # if GETTIMEOFDAY_CLOBBERS_LOCALTIME /* Save and restore the contents of the buffer used for localtime's result around the call to gettimeofday. */ struct tm save = *localtime_buffer_addr; # endif int result = gettimeofday (tv, (struct timezone *) tz); # if GETTIMEOFDAY_CLOBBERS_LOCALTIME *localtime_buffer_addr = save; # endif return result; #else # if HAVE__FTIME struct _timeb timebuf; _ftime (&timebuf); tv->tv_sec = timebuf.time; tv->tv_usec = timebuf.millitm * 1000; # else # if !defined OK_TO_USE_1S_CLOCK # error "Only 1-second nominal clock resolution found. Is that intended?" \ "If so, compile with the -DOK_TO_USE_1S_CLOCK option." # endif tv->tv_sec = time (NULL); tv->tv_usec = 0; # endif return 0; #endif } libprelude-1.0.0/libmissing/memchr.valgrind0000664000076400007640000000065211341220437015735 00000000000000# Suppress a valgrind message about use of uninitialized memory in memchr(). # POSIX states that when the character is found, memchr must not read extra # bytes in an overestimated length (for example, where memchr is used to # implement strnlen). However, we use a safe word read to provide a speedup. { memchr-value4 Memcheck:Value4 fun:rpl_memchr } { memchr-value8 Memcheck:Value8 fun:rpl_memchr } libprelude-1.0.0/libmissing/strptime.c0000664000076400007640000010752111341220440014742 00000000000000/* Copyright (C) 2002, 2004, 2005, 2007, 2009, 2010 Free Software Foundation, Inc. This file is part of the GNU C Library. This program is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser 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 Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ #ifndef _LIBC # include #endif #include #include #include #ifdef _LIBC # include #endif #include #include #include #ifdef _LIBC # include "../locale/localeinfo.h" #endif #ifndef _LIBC enum ptime_locale_status { not, loc, raw }; #endif #define match_char(ch1, ch2) if (ch1 != ch2) return NULL #if defined _LIBC && defined __GNUC__ && __GNUC__ >= 2 # define match_string(cs1, s2) \ ({ size_t len = strlen (cs1); \ int result = __strncasecmp_l ((cs1), (s2), len, locale) == 0; \ if (result) (s2) += len; \ result; }) #else /* Oh come on. Get a reasonable compiler. */ # define match_string(cs1, s2) \ (strncasecmp ((cs1), (s2), strlen (cs1)) ? 0 : ((s2) += strlen (cs1), 1)) #endif /* We intentionally do not use isdigit() for testing because this will lead to problems with the wide character version. */ #define get_number(from, to, n) \ do { \ int __n = n; \ val = 0; \ while (*rp == ' ') \ ++rp; \ if (*rp < '0' || *rp > '9') \ return NULL; \ do { \ val *= 10; \ val += *rp++ - '0'; \ } while (--__n > 0 && val * 10 <= to && *rp >= '0' && *rp <= '9'); \ if (val < from || val > to) \ return NULL; \ } while (0) #ifdef _NL_CURRENT # define get_alt_number(from, to, n) \ ({ \ __label__ do_normal; \ \ if (*decided != raw) \ { \ val = _nl_parse_alt_digit (&rp HELPER_LOCALE_ARG); \ if (val == -1 && *decided != loc) \ { \ *decided = loc; \ goto do_normal; \ } \ if (val < from || val > to) \ return NULL; \ } \ else \ { \ do_normal: \ get_number (from, to, n); \ } \ 0; \ }) #else # define get_alt_number(from, to, n) \ /* We don't have the alternate representation. */ \ get_number(from, to, n) #endif #define recursive(new_fmt) \ (*(new_fmt) != '\0' \ && (rp = __strptime_internal (rp, (new_fmt), tm, \ decided, era_cnt LOCALE_ARG)) != NULL) #ifdef _LIBC /* This is defined in locale/C-time.c in the GNU libc. */ extern const struct locale_data _nl_C_LC_TIME attribute_hidden; # define weekday_name (&_nl_C_LC_TIME.values[_NL_ITEM_INDEX (DAY_1)].string) # define ab_weekday_name \ (&_nl_C_LC_TIME.values[_NL_ITEM_INDEX (ABDAY_1)].string) # define month_name (&_nl_C_LC_TIME.values[_NL_ITEM_INDEX (MON_1)].string) # define ab_month_name (&_nl_C_LC_TIME.values[_NL_ITEM_INDEX (ABMON_1)].string) # define HERE_D_T_FMT (_nl_C_LC_TIME.values[_NL_ITEM_INDEX (D_T_FMT)].string) # define HERE_D_FMT (_nl_C_LC_TIME.values[_NL_ITEM_INDEX (D_FMT)].string) # define HERE_AM_STR (_nl_C_LC_TIME.values[_NL_ITEM_INDEX (AM_STR)].string) # define HERE_PM_STR (_nl_C_LC_TIME.values[_NL_ITEM_INDEX (PM_STR)].string) # define HERE_T_FMT_AMPM \ (_nl_C_LC_TIME.values[_NL_ITEM_INDEX (T_FMT_AMPM)].string) # define HERE_T_FMT (_nl_C_LC_TIME.values[_NL_ITEM_INDEX (T_FMT)].string) # define strncasecmp(s1, s2, n) __strncasecmp (s1, s2, n) #else static char const weekday_name[][10] = { "Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday" }; static char const ab_weekday_name[][4] = { "Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat" }; static char const month_name[][10] = { "January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December" }; static char const ab_month_name[][4] = { "Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec" }; # define HERE_D_T_FMT "%a %b %e %H:%M:%S %Y" # define HERE_D_FMT "%m/%d/%y" # define HERE_AM_STR "AM" # define HERE_PM_STR "PM" # define HERE_T_FMT_AMPM "%I:%M:%S %p" # define HERE_T_FMT "%H:%M:%S" static const unsigned short int __mon_yday[2][13] = { /* Normal years. */ { 0, 31, 59, 90, 120, 151, 181, 212, 243, 273, 304, 334, 365 }, /* Leap years. */ { 0, 31, 60, 91, 121, 152, 182, 213, 244, 274, 305, 335, 366 } }; #endif #if defined _LIBC /* We use this code also for the extended locale handling where the function gets as an additional argument the locale which has to be used. To access the values we have to redefine the _NL_CURRENT macro. */ # define strptime __strptime_l # undef _NL_CURRENT # define _NL_CURRENT(category, item) \ (current->values[_NL_ITEM_INDEX (item)].string) # undef _NL_CURRENT_WORD # define _NL_CURRENT_WORD(category, item) \ (current->values[_NL_ITEM_INDEX (item)].word) # define LOCALE_PARAM , locale # define LOCALE_ARG , locale # define LOCALE_PARAM_PROTO , __locale_t locale # define LOCALE_PARAM_DECL __locale_t locale; # define HELPER_LOCALE_ARG , current # define ISSPACE(Ch) __isspace_l (Ch, locale) #else # define LOCALE_PARAM # define LOCALE_ARG # define LOCALE_PARAM_DECL # define LOCALE_PARAM_PROTO # define HELPER_LOCALE_ARG # define ISSPACE(Ch) isspace (Ch) #endif #ifndef __isleap /* Nonzero if YEAR is a leap year (every 4 years, except every 100th isn't, and every 400th is). */ # define __isleap(year) \ ((year) % 4 == 0 && ((year) % 100 != 0 || (year) % 400 == 0)) #endif /* Compute the day of the week. */ static void day_of_the_week (struct tm *tm) { /* We know that January 1st 1970 was a Thursday (= 4). Compute the the difference between this data in the one on TM and so determine the weekday. */ int corr_year = 1900 + tm->tm_year - (tm->tm_mon < 2); int wday = (-473 + (365 * (tm->tm_year - 70)) + (corr_year / 4) - ((corr_year / 4) / 25) + ((corr_year / 4) % 25 < 0) + (((corr_year / 4) / 25) / 4) + __mon_yday[0][tm->tm_mon] + tm->tm_mday - 1); tm->tm_wday = ((wday % 7) + 7) % 7; } /* Compute the day of the year. */ static void day_of_the_year (struct tm *tm) { tm->tm_yday = (__mon_yday[__isleap (1900 + tm->tm_year)][tm->tm_mon] + (tm->tm_mday - 1)); } #ifdef _LIBC char * internal_function #else static char * #endif __strptime_internal (rp, fmt, tm, decided, era_cnt LOCALE_PARAM) const char *rp; const char *fmt; struct tm *tm; enum ptime_locale_status *decided; int era_cnt; LOCALE_PARAM_DECL { #ifdef _LIBC struct locale_data *const current = locale->__locales[LC_TIME]; #endif const char *rp_backup; int cnt; size_t val; int have_I, is_pm; int century, want_century; int want_era; int have_wday, want_xday; int have_yday; int have_mon, have_mday; int have_uweek, have_wweek; int week_no; size_t num_eras; struct era_entry *era; have_I = is_pm = 0; century = -1; want_century = 0; want_era = 0; era = NULL; week_no = 0; have_wday = want_xday = have_yday = have_mon = have_mday = have_uweek = 0; have_wweek = 0; while (*fmt != '\0') { /* A white space in the format string matches 0 more or white space in the input string. */ if (ISSPACE (*fmt)) { while (ISSPACE (*rp)) ++rp; ++fmt; continue; } /* Any character but `%' must be matched by the same character in the iput string. */ if (*fmt != '%') { match_char (*fmt++, *rp++); continue; } ++fmt; #ifndef _NL_CURRENT /* We need this for handling the `E' modifier. */ start_over: #endif /* Make back up of current processing pointer. */ rp_backup = rp; switch (*fmt++) { case '%': /* Match the `%' character itself. */ match_char ('%', *rp++); break; case 'a': case 'A': /* Match day of week. */ for (cnt = 0; cnt < 7; ++cnt) { #ifdef _NL_CURRENT if (*decided !=raw) { if (match_string (_NL_CURRENT (LC_TIME, DAY_1 + cnt), rp)) { if (*decided == not && strcmp (_NL_CURRENT (LC_TIME, DAY_1 + cnt), weekday_name[cnt])) *decided = loc; break; } if (match_string (_NL_CURRENT (LC_TIME, ABDAY_1 + cnt), rp)) { if (*decided == not && strcmp (_NL_CURRENT (LC_TIME, ABDAY_1 + cnt), ab_weekday_name[cnt])) *decided = loc; break; } } #endif if (*decided != loc && (match_string (weekday_name[cnt], rp) || match_string (ab_weekday_name[cnt], rp))) { *decided = raw; break; } } if (cnt == 7) /* Does not match a weekday name. */ return NULL; tm->tm_wday = cnt; have_wday = 1; break; case 'b': case 'B': case 'h': /* Match month name. */ for (cnt = 0; cnt < 12; ++cnt) { #ifdef _NL_CURRENT if (*decided !=raw) { if (match_string (_NL_CURRENT (LC_TIME, MON_1 + cnt), rp)) { if (*decided == not && strcmp (_NL_CURRENT (LC_TIME, MON_1 + cnt), month_name[cnt])) *decided = loc; break; } if (match_string (_NL_CURRENT (LC_TIME, ABMON_1 + cnt), rp)) { if (*decided == not && strcmp (_NL_CURRENT (LC_TIME, ABMON_1 + cnt), ab_month_name[cnt])) *decided = loc; break; } } #endif if (match_string (month_name[cnt], rp) || match_string (ab_month_name[cnt], rp)) { *decided = raw; break; } } if (cnt == 12) /* Does not match a month name. */ return NULL; tm->tm_mon = cnt; want_xday = 1; break; case 'c': /* Match locale's date and time format. */ #ifdef _NL_CURRENT if (*decided != raw) { if (!recursive (_NL_CURRENT (LC_TIME, D_T_FMT))) { if (*decided == loc) return NULL; else rp = rp_backup; } else { if (*decided == not && strcmp (_NL_CURRENT (LC_TIME, D_T_FMT), HERE_D_T_FMT)) *decided = loc; want_xday = 1; break; } *decided = raw; } #endif if (!recursive (HERE_D_T_FMT)) return NULL; want_xday = 1; break; case 'C': /* Match century number. */ match_century: get_number (0, 99, 2); century = val; want_xday = 1; break; case 'd': case 'e': /* Match day of month. */ get_number (1, 31, 2); tm->tm_mday = val; have_mday = 1; want_xday = 1; break; case 'F': if (!recursive ("%Y-%m-%d")) return NULL; want_xday = 1; break; case 'x': #ifdef _NL_CURRENT if (*decided != raw) { if (!recursive (_NL_CURRENT (LC_TIME, D_FMT))) { if (*decided == loc) return NULL; else rp = rp_backup; } else { if (*decided == not && strcmp (_NL_CURRENT (LC_TIME, D_FMT), HERE_D_FMT)) *decided = loc; want_xday = 1; break; } *decided = raw; } #endif /* Fall through. */ case 'D': /* Match standard day format. */ if (!recursive (HERE_D_FMT)) return NULL; want_xday = 1; break; case 'k': case 'H': /* Match hour in 24-hour clock. */ get_number (0, 23, 2); tm->tm_hour = val; have_I = 0; break; case 'l': /* Match hour in 12-hour clock. GNU extension. */ case 'I': /* Match hour in 12-hour clock. */ get_number (1, 12, 2); tm->tm_hour = val % 12; have_I = 1; break; case 'j': /* Match day number of year. */ get_number (1, 366, 3); tm->tm_yday = val - 1; have_yday = 1; break; case 'm': /* Match number of month. */ get_number (1, 12, 2); tm->tm_mon = val - 1; have_mon = 1; want_xday = 1; break; case 'M': /* Match minute. */ get_number (0, 59, 2); tm->tm_min = val; break; case 'n': case 't': /* Match any white space. */ while (ISSPACE (*rp)) ++rp; break; case 'p': /* Match locale's equivalent of AM/PM. */ #ifdef _NL_CURRENT if (*decided != raw) { if (match_string (_NL_CURRENT (LC_TIME, AM_STR), rp)) { if (strcmp (_NL_CURRENT (LC_TIME, AM_STR), HERE_AM_STR)) *decided = loc; break; } if (match_string (_NL_CURRENT (LC_TIME, PM_STR), rp)) { if (strcmp (_NL_CURRENT (LC_TIME, PM_STR), HERE_PM_STR)) *decided = loc; is_pm = 1; break; } *decided = raw; } #endif if (!match_string (HERE_AM_STR, rp)) { if (match_string (HERE_PM_STR, rp)) is_pm = 1; else return NULL; } break; case 'r': #ifdef _NL_CURRENT if (*decided != raw) { if (!recursive (_NL_CURRENT (LC_TIME, T_FMT_AMPM))) { if (*decided == loc) return NULL; else rp = rp_backup; } else { if (*decided == not && strcmp (_NL_CURRENT (LC_TIME, T_FMT_AMPM), HERE_T_FMT_AMPM)) *decided = loc; break; } *decided = raw; } #endif if (!recursive (HERE_T_FMT_AMPM)) return NULL; break; case 'R': if (!recursive ("%H:%M")) return NULL; break; case 's': { /* The number of seconds may be very high so we cannot use the `get_number' macro. Instead read the number character for character and construct the result while doing this. */ time_t secs = 0; if (*rp < '0' || *rp > '9') /* We need at least one digit. */ return NULL; do { secs *= 10; secs += *rp++ - '0'; } while (*rp >= '0' && *rp <= '9'); if (localtime_r (&secs, tm) == NULL) /* Error in function. */ return NULL; } break; case 'S': get_number (0, 61, 2); tm->tm_sec = val; break; case 'X': #ifdef _NL_CURRENT if (*decided != raw) { if (!recursive (_NL_CURRENT (LC_TIME, T_FMT))) { if (*decided == loc) return NULL; else rp = rp_backup; } else { if (strcmp (_NL_CURRENT (LC_TIME, T_FMT), HERE_T_FMT)) *decided = loc; break; } *decided = raw; } #endif /* Fall through. */ case 'T': if (!recursive (HERE_T_FMT)) return NULL; break; case 'u': get_number (1, 7, 1); tm->tm_wday = val % 7; have_wday = 1; break; case 'g': get_number (0, 99, 2); /* XXX This cannot determine any field in TM. */ break; case 'G': if (*rp < '0' || *rp > '9') return NULL; /* XXX Ignore the number since we would need some more information to compute a real date. */ do ++rp; while (*rp >= '0' && *rp <= '9'); break; case 'U': get_number (0, 53, 2); week_no = val; have_uweek = 1; break; case 'W': get_number (0, 53, 2); week_no = val; have_wweek = 1; break; case 'V': get_number (0, 53, 2); /* XXX This cannot determine any field in TM without some information. */ break; case 'w': /* Match number of weekday. */ get_number (0, 6, 1); tm->tm_wday = val; have_wday = 1; break; case 'y': match_year_in_century: /* Match year within century. */ get_number (0, 99, 2); /* The "Year 2000: The Millennium Rollover" paper suggests that values in the range 69-99 refer to the twentieth century. */ tm->tm_year = val >= 69 ? val : val + 100; /* Indicate that we want to use the century, if specified. */ want_century = 1; want_xday = 1; break; case 'Y': /* Match year including century number. */ get_number (0, 9999, 4); tm->tm_year = val - 1900; want_century = 0; want_xday = 1; break; case 'Z': /* XXX How to handle this? */ break; case 'z': /* We recognize two formats: if two digits are given, these specify hours. If fours digits are used, minutes are also specified. */ { bool neg; int n; val = 0; while (*rp == ' ') ++rp; if (*rp != '+' && *rp != '-') return NULL; neg = *rp++ == '-'; n = 0; while (n < 4 && *rp >= '0' && *rp <= '9') { val = val * 10 + *rp++ - '0'; ++n; } if (n == 2) val *= 100; else if (n != 4) /* Only two or four digits recognized. */ return NULL; else { /* We have to convert the minutes into decimal. */ if (val % 100 >= 60) return NULL; val = (val / 100) * 100 + ((val % 100) * 50) / 30; } if (val > 1200) return NULL; #if defined _LIBC || HAVE_TM_GMTOFF tm->tm_gmtoff = (val * 3600) / 100; if (neg) tm->tm_gmtoff = -tm->tm_gmtoff; #endif } break; case 'E': #ifdef _NL_CURRENT switch (*fmt++) { case 'c': /* Match locale's alternate date and time format. */ if (*decided != raw) { const char *fmt = _NL_CURRENT (LC_TIME, ERA_D_T_FMT); if (*fmt == '\0') fmt = _NL_CURRENT (LC_TIME, D_T_FMT); if (!recursive (fmt)) { if (*decided == loc) return NULL; else rp = rp_backup; } else { if (strcmp (fmt, HERE_D_T_FMT)) *decided = loc; want_xday = 1; break; } *decided = raw; } /* The C locale has no era information, so use the normal representation. */ if (!recursive (HERE_D_T_FMT)) return NULL; want_xday = 1; break; case 'C': if (*decided != raw) { if (era_cnt >= 0) { era = _nl_select_era_entry (era_cnt HELPER_LOCALE_ARG); if (era != NULL && match_string (era->era_name, rp)) { *decided = loc; break; } else return NULL; } num_eras = _NL_CURRENT_WORD (LC_TIME, _NL_TIME_ERA_NUM_ENTRIES); for (era_cnt = 0; era_cnt < (int) num_eras; ++era_cnt, rp = rp_backup) { era = _nl_select_era_entry (era_cnt HELPER_LOCALE_ARG); if (era != NULL && match_string (era->era_name, rp)) { *decided = loc; break; } } if (era_cnt != (int) num_eras) break; era_cnt = -1; if (*decided == loc) return NULL; *decided = raw; } /* The C locale has no era information, so use the normal representation. */ goto match_century; case 'y': if (*decided != raw) { get_number(0, 9999, 4); tm->tm_year = val; want_era = 1; want_xday = 1; want_century = 1; if (era_cnt >= 0) { assert (*decided == loc); era = _nl_select_era_entry (era_cnt HELPER_LOCALE_ARG); bool match = false; if (era != NULL) { int delta = ((tm->tm_year - era->offset) * era->absolute_direction); match = (delta >= 0 && delta < (((int64_t) era->stop_date[0] - (int64_t) era->start_date[0]) * era->absolute_direction)); } if (! match) return NULL; break; } num_eras = _NL_CURRENT_WORD (LC_TIME, _NL_TIME_ERA_NUM_ENTRIES); for (era_cnt = 0; era_cnt < (int) num_eras; ++era_cnt) { era = _nl_select_era_entry (era_cnt HELPER_LOCALE_ARG); if (era != NULL) { int delta = ((tm->tm_year - era->offset) * era->absolute_direction); if (delta >= 0 && delta < (((int64_t) era->stop_date[0] - (int64_t) era->start_date[0]) * era->absolute_direction)) { *decided = loc; break; } } } if (era_cnt != (int) num_eras) break; era_cnt = -1; if (*decided == loc) return NULL; *decided = raw; } goto match_year_in_century; case 'Y': if (*decided != raw) { num_eras = _NL_CURRENT_WORD (LC_TIME, _NL_TIME_ERA_NUM_ENTRIES); for (era_cnt = 0; era_cnt < (int) num_eras; ++era_cnt, rp = rp_backup) { era = _nl_select_era_entry (era_cnt HELPER_LOCALE_ARG); if (era != NULL && recursive (era->era_format)) break; } if (era_cnt == (int) num_eras) { era_cnt = -1; if (*decided == loc) return NULL; else rp = rp_backup; } else { *decided = loc; era_cnt = -1; break; } *decided = raw; } get_number (0, 9999, 4); tm->tm_year = val - 1900; want_century = 0; want_xday = 1; break; case 'x': if (*decided != raw) { const char *fmt = _NL_CURRENT (LC_TIME, ERA_D_FMT); if (*fmt == '\0') fmt = _NL_CURRENT (LC_TIME, D_FMT); if (!recursive (fmt)) { if (*decided == loc) return NULL; else rp = rp_backup; } else { if (strcmp (fmt, HERE_D_FMT)) *decided = loc; break; } *decided = raw; } if (!recursive (HERE_D_FMT)) return NULL; break; case 'X': if (*decided != raw) { const char *fmt = _NL_CURRENT (LC_TIME, ERA_T_FMT); if (*fmt == '\0') fmt = _NL_CURRENT (LC_TIME, T_FMT); if (!recursive (fmt)) { if (*decided == loc) return NULL; else rp = rp_backup; } else { if (strcmp (fmt, HERE_T_FMT)) *decided = loc; break; } *decided = raw; } if (!recursive (HERE_T_FMT)) return NULL; break; default: return NULL; } break; #else /* We have no information about the era format. Just use the normal format. */ if (*fmt != 'c' && *fmt != 'C' && *fmt != 'y' && *fmt != 'Y' && *fmt != 'x' && *fmt != 'X') /* This is an illegal format. */ return NULL; goto start_over; #endif case 'O': switch (*fmt++) { case 'd': case 'e': /* Match day of month using alternate numeric symbols. */ get_alt_number (1, 31, 2); tm->tm_mday = val; have_mday = 1; want_xday = 1; break; case 'H': /* Match hour in 24-hour clock using alternate numeric symbols. */ get_alt_number (0, 23, 2); tm->tm_hour = val; have_I = 0; break; case 'I': /* Match hour in 12-hour clock using alternate numeric symbols. */ get_alt_number (1, 12, 2); tm->tm_hour = val % 12; have_I = 1; break; case 'm': /* Match month using alternate numeric symbols. */ get_alt_number (1, 12, 2); tm->tm_mon = val - 1; have_mon = 1; want_xday = 1; break; case 'M': /* Match minutes using alternate numeric symbols. */ get_alt_number (0, 59, 2); tm->tm_min = val; break; case 'S': /* Match seconds using alternate numeric symbols. */ get_alt_number (0, 61, 2); tm->tm_sec = val; break; case 'U': get_alt_number (0, 53, 2); week_no = val; have_uweek = 1; break; case 'W': get_alt_number (0, 53, 2); week_no = val; have_wweek = 1; break; case 'V': get_alt_number (0, 53, 2); /* XXX This cannot determine any field in TM without further information. */ break; case 'w': /* Match number of weekday using alternate numeric symbols. */ get_alt_number (0, 6, 1); tm->tm_wday = val; have_wday = 1; break; case 'y': /* Match year within century using alternate numeric symbols. */ get_alt_number (0, 99, 2); tm->tm_year = val >= 69 ? val : val + 100; want_xday = 1; break; default: return NULL; } break; default: return NULL; } } if (have_I && is_pm) tm->tm_hour += 12; if (century != -1) { if (want_century) tm->tm_year = tm->tm_year % 100 + (century - 19) * 100; else /* Only the century, but not the year. Strange, but so be it. */ tm->tm_year = (century - 19) * 100; } if (era_cnt != -1) { #ifdef _NL_CURRENT era = _nl_select_era_entry (era_cnt HELPER_LOCALE_ARG); if (era == NULL) return NULL; if (want_era) tm->tm_year = (era->start_date[0] + ((tm->tm_year - era->offset) * era->absolute_direction)); else /* Era start year assumed. */ tm->tm_year = era->start_date[0]; #endif } else if (want_era) { /* No era found but we have seen an E modifier. Rectify some values. */ if (want_century && century == -1 && tm->tm_year < 69) tm->tm_year += 100; } if (want_xday && !have_wday) { if ( !(have_mon && have_mday) && have_yday) { /* We don't have tm_mon and/or tm_mday, compute them. */ int t_mon = 0; while (__mon_yday[__isleap(1900 + tm->tm_year)][t_mon] <= tm->tm_yday) t_mon++; if (!have_mon) tm->tm_mon = t_mon - 1; if (!have_mday) tm->tm_mday = (tm->tm_yday - __mon_yday[__isleap(1900 + tm->tm_year)][t_mon - 1] + 1); } day_of_the_week (tm); } if (want_xday && !have_yday) day_of_the_year (tm); if ((have_uweek || have_wweek) && have_wday) { int save_wday = tm->tm_wday; int save_mday = tm->tm_mday; int save_mon = tm->tm_mon; int w_offset = have_uweek ? 0 : 1; tm->tm_mday = 1; tm->tm_mon = 0; day_of_the_week (tm); if (have_mday) tm->tm_mday = save_mday; if (have_mon) tm->tm_mon = save_mon; if (!have_yday) tm->tm_yday = ((7 - (tm->tm_wday - w_offset)) % 7 + (week_no - 1) *7 + save_wday - w_offset); if (!have_mday || !have_mon) { int t_mon = 0; while (__mon_yday[__isleap(1900 + tm->tm_year)][t_mon] <= tm->tm_yday) t_mon++; if (!have_mon) tm->tm_mon = t_mon - 1; if (!have_mday) tm->tm_mday = (tm->tm_yday - __mon_yday[__isleap(1900 + tm->tm_year)][t_mon - 1] + 1); } tm->tm_wday = save_wday; } return (char *) rp; } char * strptime (buf, format, tm LOCALE_PARAM) const char *restrict buf; const char *restrict format; struct tm *restrict tm; LOCALE_PARAM_DECL { enum ptime_locale_status decided; #ifdef _NL_CURRENT decided = not; #else decided = raw; #endif return __strptime_internal (buf, format, tm, &decided, -1 LOCALE_ARG); } #ifdef _LIBC weak_alias (__strptime_l, strptime_l) #endif libprelude-1.0.0/libmissing/memchr.c0000664000076400007640000001337311341220437014355 00000000000000/* Copyright (C) 1991, 1993, 1996-1997, 1999-2000, 2003-2004, 2006, 2008-2010 Free Software Foundation, Inc. Based on strlen implementation by Torbjorn Granlund (tege@sics.se), with help from Dan Sahlin (dan@sics.se) and commentary by Jim Blandy (jimb@ai.mit.edu); adaptation to memchr suggested by Dick Karpinski (dick@cca.ucsf.edu), and implemented by Roland McGrath (roland@ai.mit.edu). NOTE: The canonical source of this file is maintained with the GNU C Library. Bugs can be reported to bug-glibc@prep.ai.mit.edu. This program is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 3 of the License, or 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 Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . */ #ifndef _LIBC # include #endif #include #include #if defined _LIBC # include #else # define reg_char char #endif #include #if HAVE_BP_SYM_H || defined _LIBC # include #else # define BP_SYM(sym) sym #endif #undef __memchr #ifdef _LIBC # undef memchr #endif #ifndef weak_alias # define __memchr memchr #endif /* Search no more than N bytes of S for C. */ void * __memchr (void const *s, int c_in, size_t n) { /* On 32-bit hardware, choosing longword to be a 32-bit unsigned long instead of a 64-bit uintmax_t tends to give better performance. On 64-bit hardware, unsigned long is generally 64 bits already. Change this typedef to experiment with performance. */ typedef unsigned long int longword; const unsigned char *char_ptr; const longword *longword_ptr; longword repeated_one; longword repeated_c; unsigned reg_char c; c = (unsigned char) c_in; /* Handle the first few bytes by reading one byte at a time. Do this until CHAR_PTR is aligned on a longword boundary. */ for (char_ptr = (const unsigned char *) s; n > 0 && (size_t) char_ptr % sizeof (longword) != 0; --n, ++char_ptr) if (*char_ptr == c) return (void *) char_ptr; longword_ptr = (const longword *) char_ptr; /* All these elucidatory comments refer to 4-byte longwords, but the theory applies equally well to any size longwords. */ /* Compute auxiliary longword values: repeated_one is a value which has a 1 in every byte. repeated_c has c in every byte. */ repeated_one = 0x01010101; repeated_c = c | (c << 8); repeated_c |= repeated_c << 16; if (0xffffffffU < (longword) -1) { repeated_one |= repeated_one << 31 << 1; repeated_c |= repeated_c << 31 << 1; if (8 < sizeof (longword)) { size_t i; for (i = 64; i < sizeof (longword) * 8; i *= 2) { repeated_one |= repeated_one << i; repeated_c |= repeated_c << i; } } } /* Instead of the traditional loop which tests each byte, we will test a longword at a time. The tricky part is testing if *any of the four* bytes in the longword in question are equal to c. We first use an xor with repeated_c. This reduces the task to testing whether *any of the four* bytes in longword1 is zero. We compute tmp = ((longword1 - repeated_one) & ~longword1) & (repeated_one << 7). That is, we perform the following operations: 1. Subtract repeated_one. 2. & ~longword1. 3. & a mask consisting of 0x80 in every byte. Consider what happens in each byte: - If a byte of longword1 is zero, step 1 and 2 transform it into 0xff, and step 3 transforms it into 0x80. A carry can also be propagated to more significant bytes. - If a byte of longword1 is nonzero, let its lowest 1 bit be at position k (0 <= k <= 7); so the lowest k bits are 0. After step 1, the byte ends in a single bit of value 0 and k bits of value 1. After step 2, the result is just k bits of value 1: 2^k - 1. After step 3, the result is 0. And no carry is produced. So, if longword1 has only non-zero bytes, tmp is zero. Whereas if longword1 has a zero byte, call j the position of the least significant zero byte. Then the result has a zero at positions 0, ..., j-1 and a 0x80 at position j. We cannot predict the result at the more significant bytes (positions j+1..3), but it does not matter since we already have a non-zero bit at position 8*j+7. So, the test whether any byte in longword1 is zero is equivalent to testing whether tmp is nonzero. */ while (n >= sizeof (longword)) { longword longword1 = *longword_ptr ^ repeated_c; if ((((longword1 - repeated_one) & ~longword1) & (repeated_one << 7)) != 0) break; longword_ptr++; n -= sizeof (longword); } char_ptr = (const unsigned char *) longword_ptr; /* At this point, we know that either n < sizeof (longword), or one of the sizeof (longword) bytes starting at char_ptr is == c. On little-endian machines, we could determine the first such byte without any further memory accesses, just by looking at the tmp result from the last loop iteration. But this does not work on big-endian machines. Choose code that works in both cases. */ for (; n > 0; --n, ++char_ptr) { if (*char_ptr == c) return (void *) char_ptr; } return NULL; } #ifdef weak_alias weak_alias (__memchr, BP_SYM (memchr)) #endif libprelude-1.0.0/libmissing/intprops.h0000664000076400007640000000631711341220435014763 00000000000000/* intprops.h -- properties of integer types Copyright (C) 2001, 2002, 2003, 2004, 2005, 2009, 2010 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 3 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 Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . */ /* Written by Paul Eggert. */ #ifndef GL_INTPROPS_H # define GL_INTPROPS_H # include /* The extra casts in the following macros work around compiler bugs, e.g., in Cray C 5.0.3.0. */ /* True if the arithmetic type T is an integer type. bool counts as an integer. */ # define TYPE_IS_INTEGER(t) ((t) 1.5 == 1) /* True if negative values of the signed integer type T use two's complement, ones' complement, or signed magnitude representation, respectively. Much GNU code assumes two's complement, but some people like to be portable to all possible C hosts. */ # define TYPE_TWOS_COMPLEMENT(t) ((t) ~ (t) 0 == (t) -1) # define TYPE_ONES_COMPLEMENT(t) ((t) ~ (t) 0 == 0) # define TYPE_SIGNED_MAGNITUDE(t) ((t) ~ (t) 0 < (t) -1) /* True if the arithmetic type T is signed. */ # define TYPE_SIGNED(t) (! ((t) 0 < (t) -1)) /* The maximum and minimum values for the integer type T. These macros have undefined behavior if T is signed and has padding bits. If this is a problem for you, please let us know how to fix it for your host. */ # define TYPE_MINIMUM(t) \ ((t) (! TYPE_SIGNED (t) \ ? (t) 0 \ : TYPE_SIGNED_MAGNITUDE (t) \ ? ~ (t) 0 \ : ~ (t) 0 << (sizeof (t) * CHAR_BIT - 1))) # define TYPE_MAXIMUM(t) \ ((t) (! TYPE_SIGNED (t) \ ? (t) -1 \ : ~ (~ (t) 0 << (sizeof (t) * CHAR_BIT - 1)))) /* Return zero if T can be determined to be an unsigned type. Otherwise, return 1. When compiling with GCC, INT_STRLEN_BOUND uses this macro to obtain a tighter bound. Otherwise, it overestimates the true bound by one byte when applied to unsigned types of size 2, 4, 16, ... bytes. The symbol signed_type_or_expr__ is private to this header file. */ # if __GNUC__ >= 2 # define signed_type_or_expr__(t) TYPE_SIGNED (__typeof__ (t)) # else # define signed_type_or_expr__(t) 1 # endif /* Bound on length of the string representing an integer type or expression T. Subtract 1 for the sign bit if T is signed; log10 (2.0) < 146/485; add 1 for integer division truncation; add 1 more for a minus sign if needed. */ # define INT_STRLEN_BOUND(t) \ ((sizeof (t) * CHAR_BIT - signed_type_or_expr__ (t)) * 146 / 485 \ + signed_type_or_expr__ (t) + 1) /* Bound on buffer size needed to represent an integer type or expression T, including the terminating null. */ # define INT_BUFSIZE_BOUND(t) (INT_STRLEN_BOUND (t) + 1) #endif /* GL_INTPROPS_H */ libprelude-1.0.0/libmissing/getsockname.c0000664000076400007640000000230111341220435015365 00000000000000/* getsockname.c --- wrappers for Windows getsockname function Copyright (C) 2008, 2009, 2010 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 3 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 Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . */ /* Written by Paolo Bonzini */ #include #define WIN32_LEAN_AND_MEAN /* Get winsock2.h. */ #include /* Get set_winsock_errno, FD_TO_SOCKET etc. */ #include "w32sock.h" #undef getsockname int rpl_getsockname (int fd, struct sockaddr *addr, int *addrlen) { SOCKET sock = FD_TO_SOCKET (fd); int r = getsockname (sock, addr, addrlen); if (r < 0) set_winsock_errno (); return r; } libprelude-1.0.0/libmissing/uname.c0000664000076400007640000002105411341220442014176 00000000000000/* uname replacement. Copyright (C) 2009, 2010 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 3 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 Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . */ #include /* Specification. */ #include /* This file provides an implementation only for the native Windows API. */ #if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ #include #include #include #include #include /* Mingw headers don't have all the platform codes. */ #ifndef VER_PLATFORM_WIN32_CE # define VER_PLATFORM_WIN32_CE 3 #endif /* Some headers don't have all the processor architecture codes. */ #ifndef PROCESSOR_ARCHITECTURE_AMD64 # define PROCESSOR_ARCHITECTURE_AMD64 9 #endif #ifndef PROCESSOR_ARCHITECTURE_IA32_ON_WIN64 # define PROCESSOR_ARCHITECTURE_IA32_ON_WIN64 10 #endif /* Mingw headers don't have the latest processor codes. */ #ifndef PROCESSOR_AMD_X8664 # define PROCESSOR_AMD_X8664 8664 #endif int uname (struct utsname *buf) { OSVERSIONINFO version; OSVERSIONINFOEX versionex; BOOL have_versionex; /* indicates whether versionex is filled */ const char *super_version; /* Preparation: Fill version and, if possible, also versionex. But try to call GetVersionEx only once in the common case. */ versionex.dwOSVersionInfoSize = sizeof (OSVERSIONINFOEX); have_versionex = GetVersionEx ((OSVERSIONINFO *) &versionex); if (have_versionex) { /* We know that OSVERSIONINFO is a subset of OSVERSIONINFOEX. */ memcpy (&version, &versionex, sizeof (OSVERSIONINFO)); } else { version.dwOSVersionInfoSize = sizeof (OSVERSIONINFO); if (!GetVersionEx (&version)) abort (); } /* Fill in nodename. */ if (gethostname (buf->nodename, sizeof (buf->nodename)) < 0) strcpy (buf->nodename, "localhost"); /* Determine major-major Windows version. */ if (version.dwPlatformId == VER_PLATFORM_WIN32_NT) { /* Windows NT or newer. */ super_version = "NT"; } else if (version.dwPlatformId == VER_PLATFORM_WIN32_CE) { /* Windows CE or Embedded CE. */ super_version = "CE"; } else if (version.dwPlatformId == VER_PLATFORM_WIN32_WINDOWS) { /* Windows 95/98/ME. */ switch (version.dwMinorVersion) { case 0: super_version = "95"; break; case 10: super_version = "98"; break; case 90: super_version = "ME"; break; default: super_version = ""; break; } } else super_version = ""; /* Fill in sysname. */ #ifdef __MINGW32__ /* Returns a string compatible with the MSYS uname.exe program, so that no further changes are needed to GNU config.guess. For example, $ ./uname.exe -s => MINGW32_NT-5.1 */ sprintf (buf->sysname, "MINGW32_%s-%u.%u", super_version, (unsigned int) version.dwMajorVersion, (unsigned int) version.dwMinorVersion); #else sprintf (buf->sysname, "Windows%s", super_version); #endif /* Fill in release, version. */ /* The MSYS uname.exe programs uses strings from a modified Cygwin runtime: $ ./uname.exe -r => 1.0.11(0.46/3/2) $ ./uname.exe -v => 2008-08-25 23:40 There is no point in imitating this behaviour. */ if (version.dwPlatformId == VER_PLATFORM_WIN32_NT) { /* Windows NT or newer. */ struct windows_version { int major; int minor; unsigned int server_offset; const char *name; }; /* Storing the workstation and server version names in a single stream does not waste memory when they are the same. These macros abstract the representation. VERSION1 is used if version.wProductType does not matter, VERSION2 if it does. */ #define VERSION1(major, minor, name) \ { major, minor, 0, name } #define VERSION2(major, minor, workstation, server) \ { major, minor, sizeof workstation, workstation "\0" server } static const struct windows_version versions[] = { VERSION2 (3, -1, "Windows NT Workstation", "Windows NT Server"), VERSION2 (4, -1, "Windows NT Workstation", "Windows NT Server"), VERSION1 (5, 0, "Windows 2000"), VERSION1 (5, 1, "Windows XP"), VERSION1 (5, 2, "Windows Server 2003"), VERSION2 (6, 0, "Windows Vista", "Windows Server 2008"), VERSION2 (6, 1, "Windows 7", "Windows Server 2008 R2"), VERSION2 (-1, -1, "Windows", "Windows Server") }; const char *base; const struct windows_version *v = versions; /* Find a version that matches ours. The last element is a wildcard that always ends the loop. */ while ((v->major != version.dwMajorVersion && v->major != -1) || (v->minor != version.dwMinorVersion && v->minor != -1)) v++; if (have_versionex && versionex.wProductType != VER_NT_WORKSTATION) base = v->name + v->server_offset; else base = v->name; if (v->major == -1 || v->minor == -1) sprintf (buf->release, "%s %u.%u", base, (unsigned int) version.dwMajorVersion, (unsigned int) version.dwMinorVersion); else strcpy (buf->release, base); } else if (version.dwPlatformId == VER_PLATFORM_WIN32_CE) { /* Windows CE or Embedded CE. */ sprintf (buf->release, "Windows CE %u.%u", (unsigned int) version.dwMajorVersion, (unsigned int) version.dwMinorVersion); } else { /* Windows 95/98/ME. */ sprintf (buf->release, "Windows %s", super_version); } strcpy (buf->version, version.szCSDVersion); /* Fill in machine. */ { SYSTEM_INFO info; GetSystemInfo (&info); /* Check for Windows NT or CE, since the info.wProcessorLevel is garbage on Windows 95. */ if (version.dwPlatformId == VER_PLATFORM_WIN32_NT || version.dwPlatformId == VER_PLATFORM_WIN32_CE) { /* Windows NT or newer, or Windows CE or Embedded CE. */ switch (info.wProcessorArchitecture) { case PROCESSOR_ARCHITECTURE_AMD64: strcpy (buf->machine, "x86_64"); break; case PROCESSOR_ARCHITECTURE_IA64: strcpy (buf->machine, "ia64"); break; case PROCESSOR_ARCHITECTURE_INTEL: strcpy (buf->machine, "i386"); if (info.wProcessorLevel >= 3) buf->machine[1] = '0' + (info.wProcessorLevel <= 6 ? info.wProcessorLevel : 6); break; case PROCESSOR_ARCHITECTURE_IA32_ON_WIN64: strcpy (buf->machine, "i686"); break; case PROCESSOR_ARCHITECTURE_MIPS: strcpy (buf->machine, "mips"); break; case PROCESSOR_ARCHITECTURE_ALPHA: case PROCESSOR_ARCHITECTURE_ALPHA64: strcpy (buf->machine, "alpha"); break; case PROCESSOR_ARCHITECTURE_PPC: strcpy (buf->machine, "powerpc"); break; case PROCESSOR_ARCHITECTURE_SHX: strcpy (buf->machine, "sh"); break; case PROCESSOR_ARCHITECTURE_ARM: strcpy (buf->machine, "arm"); break; default: strcpy (buf->machine, "unknown"); break; } } else { /* Windows 95/98/ME. */ switch (info.dwProcessorType) { case PROCESSOR_AMD_X8664: strcpy (buf->machine, "x86_64"); break; case PROCESSOR_INTEL_IA64: strcpy (buf->machine, "ia64"); break; default: if (info.dwProcessorType % 100 == 86) sprintf (buf->machine, "i%u", (unsigned int) info.dwProcessorType); else strcpy (buf->machine, "unknown"); break; } } } return 0; } #endif libprelude-1.0.0/libmissing/m4/0000775000076400007640000000000011347714752013345 500000000000000libprelude-1.0.0/libmissing/m4/netinet_in_h.m40000664000076400007640000000176511341220436016164 00000000000000# netinet_in_h.m4 serial 4 dnl Copyright (C) 2006-2010 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. AC_DEFUN([gl_HEADER_NETINET_IN], [ AC_CACHE_CHECK([whether is self-contained], [gl_cv_header_netinet_in_h_selfcontained], [ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include ]], [[]])], [gl_cv_header_netinet_in_h_selfcontained=yes], [gl_cv_header_netinet_in_h_selfcontained=no]) ]) if test $gl_cv_header_netinet_in_h_selfcontained = yes; then NETINET_IN_H='' else NETINET_IN_H='netinet/in.h' AC_CHECK_HEADERS([netinet/in.h]) gl_CHECK_NEXT_HEADERS([netinet/in.h]) if test $ac_cv_header_netinet_in_h = yes; then HAVE_NETINET_IN_H=1 else HAVE_NETINET_IN_H=0 fi AC_SUBST([HAVE_NETINET_IN_H]) fi AC_SUBST([NETINET_IN_H]) ]) libprelude-1.0.0/libmissing/m4/relocatable-lib.m40000664000076400007640000000334511341220436016536 00000000000000# relocatable-lib.m4 serial 5 dnl Copyright (C) 2003, 2005-2007, 2009-2010 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. dnl From Bruno Haible. dnl Support for relocatable libraries. AC_DEFUN([gl_RELOCATABLE_LIBRARY], [ AC_REQUIRE([gl_RELOCATABLE_LIBRARY_BODY]) if test $RELOCATABLE = yes; then AC_LIBOBJ([relocatable]) fi ]) AC_DEFUN([gl_RELOCATABLE_LIBRARY_BODY], [ AC_REQUIRE([gl_RELOCATABLE_NOP]) dnl Easier to put this here once, instead of into the DEFS of each Makefile. if test "X$prefix" = "XNONE"; then reloc_final_prefix="$ac_default_prefix" else reloc_final_prefix="$prefix" fi AC_DEFINE_UNQUOTED([INSTALLPREFIX], ["${reloc_final_prefix}"], [Define to the value of ${prefix}, as a string.]) if test $RELOCATABLE = yes; then AC_DEFINE([ENABLE_RELOCATABLE], [1], [Define to 1 if the package shall run at any location in the file system.]) fi ]) dnl Like gl_RELOCATABLE_LIBRARY, except prepare for separate compilation dnl (no AC_LIBOBJ). AC_DEFUN([gl_RELOCATABLE_LIBRARY_SEPARATE], [ AC_REQUIRE([gl_RELOCATABLE_LIBRARY_BODY]) ]) dnl Support for relocatable packages for which it is a nop. AC_DEFUN([gl_RELOCATABLE_NOP], [ AC_MSG_CHECKING([whether to activate relocatable installation]) AC_ARG_ENABLE([relocatable], [AS_HELP_STRING([--enable-relocatable], [install a package that can be moved in the file system])], [if test "$enableval" != no; then RELOCATABLE=yes else RELOCATABLE=no fi ], RELOCATABLE=no) AC_SUBST([RELOCATABLE]) AC_MSG_RESULT([$RELOCATABLE]) ]) libprelude-1.0.0/libmissing/m4/sys_select_h.m40000664000076400007640000000611511341220437016200 00000000000000# sys_select_h.m4 serial 11 dnl Copyright (C) 2006-2010 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. AC_DEFUN([gl_HEADER_SYS_SELECT], [ AC_REQUIRE([gl_HEADER_SYS_SOCKET]) AC_REQUIRE([gl_SYS_SELECT_H_DEFAULTS]) AC_CACHE_CHECK([whether is self-contained], [gl_cv_header_sys_select_h_selfcontained], [ dnl Test against two bugs: dnl 1. On many platforms, assumes prior inclusion of dnl . dnl 2. On OSF/1 4.0, provides only a forward declaration dnl of 'struct timeval', and no definition of this type. AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include ]], [[struct timeval b;]])], [gl_cv_header_sys_select_h_selfcontained=yes], [gl_cv_header_sys_select_h_selfcontained=no]) dnl Test against another bug: dnl 3. On Solaris 10, provides an FD_ZERO implementation dnl that relies on memset(), but without including . if test $gl_cv_header_sys_select_h_selfcontained = yes; then AC_COMPILE_IFELSE( [AC_LANG_PROGRAM([[#include ]], [[int memset; int bzero;]]) ], [AC_LINK_IFELSE( [AC_LANG_PROGRAM([[#include ]], [[ #undef memset #define memset nonexistent_memset extern void *memset (void *, int, unsigned long); #undef bzero #define bzero nonexistent_bzero extern void bzero (void *, unsigned long); fd_set fds; FD_ZERO (&fds); ]]) ], [], [gl_cv_header_sys_select_h_selfcontained=no]) ]) fi ]) AC_CHECK_HEADERS_ONCE([sys/select.h]) gl_CHECK_NEXT_HEADERS([sys/select.h]) if test $ac_cv_header_sys_select_h = yes; then HAVE_SYS_SELECT_H=1 else HAVE_SYS_SELECT_H=0 fi AC_SUBST([HAVE_SYS_SELECT_H]) if test $gl_cv_header_sys_select_h_selfcontained != yes; then gl_PREREQ_SYS_H_WINSOCK2 fi dnl Check for declarations of anything we want to poison if the dnl corresponding gnulib module is not in use. gl_WARN_ON_USE_PREPARE([[ /* Some systems require prerequisite headers. */ #include #if !defined __GLIBC__ && HAVE_SYS_TIME_H # include #endif #include ]], [select]) ]) AC_DEFUN([gl_SYS_SELECT_MODULE_INDICATOR], [ dnl Use AC_REQUIRE here, so that the default settings are expanded once only. AC_REQUIRE([gl_SYS_SELECT_H_DEFAULTS]) GNULIB_[]m4_translit([$1],[abcdefghijklmnopqrstuvwxyz./-],[ABCDEFGHIJKLMNOPQRSTUVWXYZ___])=1 ]) AC_DEFUN([gl_SYS_SELECT_H_DEFAULTS], [ GNULIB_SELECT=0; AC_SUBST([GNULIB_SELECT]) dnl Assume proper GNU behavior unless another module says otherwise. REPLACE_SELECT=0; AC_SUBST([REPLACE_SELECT]) ]) libprelude-1.0.0/libmissing/m4/stddef_h.m40000664000076400007640000000277511341220436015303 00000000000000dnl A placeholder for POSIX 2008 , for platforms that have issues. # stddef_h.m4 serial 1 dnl Copyright (C) 2009, 2010 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. AC_DEFUN([gl_STDDEF_H], [ AC_REQUIRE([gl_STDDEF_H_DEFAULTS]) AC_REQUIRE([gt_TYPE_WCHAR_T]) if test $gt_cv_c_wchar_t = no; then HAVE_WCHAR_T=0 STDDEF_H=stddef.h fi AC_CACHE_CHECK([whether NULL can be used in arbitrary expressions], [gl_cv_decl_null_works], [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include int test[2 * (sizeof NULL == sizeof (void *)) -1]; ]])], [gl_cv_decl_null_works=yes], [gl_cv_decl_null_works=no])]) if test $gl_cv_decl_null_works = no; then REPLACE_NULL=1 STDDEF_H=stddef.h fi if test -n "$STDDEF_H"; then gl_CHECK_NEXT_HEADERS([stddef.h]) fi ]) AC_DEFUN([gl_STDDEF_MODULE_INDICATOR], [ dnl Use AC_REQUIRE here, so that the default settings are expanded once only. AC_REQUIRE([gl_STDDEF_H_DEFAULTS]) GNULIB_[]m4_translit([$1],[abcdefghijklmnopqrstuvwxyz./-],[ABCDEFGHIJKLMNOPQRSTUVWXYZ___])=1 ]) AC_DEFUN([gl_STDDEF_H_DEFAULTS], [ dnl Assume proper GNU behavior unless another module says otherwise. REPLACE_NULL=0; AC_SUBST([REPLACE_NULL]) HAVE_WCHAR_T=1; AC_SUBST([HAVE_WCHAR_T]) STDDEF_H=''; AC_SUBST([STDDEF_H]) ]) libprelude-1.0.0/libmissing/m4/locale-zh.m40000664000076400007640000000666711341220436015405 00000000000000# locale-zh.m4 serial 6 dnl Copyright (C) 2003, 2005-2010 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. dnl From Bruno Haible. dnl Determine the name of a chinese locale with GB18030 encoding. AC_DEFUN([gt_LOCALE_ZH_CN], [ AC_REQUIRE([AC_CANONICAL_HOST]) AC_REQUIRE([AM_LANGINFO_CODESET]) AC_CACHE_CHECK([for a transitional chinese locale], [gt_cv_locale_zh_CN], [ AC_LANG_CONFTEST([AC_LANG_SOURCE([ changequote(,)dnl #include #include #include #if HAVE_LANGINFO_CODESET # include #endif #include #include struct tm t; char buf[16]; int main () { const char *p; /* Check whether the given locale name is recognized by the system. */ if (setlocale (LC_ALL, "") == NULL) return 1; /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646". On MacOS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET) is empty, and the behaviour of Tcl 8.4 in this locale is not useful. On OpenBSD 4.0, when an unsupported locale is specified, setlocale() succeeds but then nl_langinfo(CODESET) is "646". In this situation, some unit tests fail. */ #if HAVE_LANGINFO_CODESET { const char *cs = nl_langinfo (CODESET); if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0) return 1; } #endif #ifdef __CYGWIN__ /* On Cygwin, avoid locale names without encoding suffix, because the locale_charset() function relies on the encoding suffix. Note that LC_ALL is set on the command line. */ if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1; #endif /* Check whether in a month name, no byte in the range 0x80..0x9F occurs. This excludes the UTF-8 encoding. */ t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4; if (strftime (buf, sizeof (buf), "%B", &t) < 2) return 1; for (p = buf; *p != '\0'; p++) if ((unsigned char) *p >= 0x80 && (unsigned char) *p < 0xa0) return 1; /* Check whether a typical GB18030 multibyte sequence is recognized as a single wide character. This excludes the GB2312 and GBK encodings. */ if (mblen ("\203\062\332\066", 5) != 4) return 1; return 0; } changequote([,])dnl ])]) if AC_TRY_EVAL([ac_link]) && test -s conftest$ac_exeext; then # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because # otherwise on MacOS X 10.3.5 the LC_TIME=C from the beginning of the # configure script would override the LC_ALL setting. Likewise for # LC_CTYPE, which is also set at the beginning of the configure script. # Test for the locale name without encoding suffix. if (LC_ALL=zh_CN LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then gt_cv_locale_zh_CN=zh_CN else # Test for the locale name with explicit encoding suffix. if (LC_ALL=zh_CN.GB18030 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then gt_cv_locale_zh_CN=zh_CN.GB18030 else # None found. gt_cv_locale_zh_CN=none fi fi else # If there was a link error, due to mblen(), the system is so old that # it certainly doesn't have a chinese locale. gt_cv_locale_zh_CN=none fi rm -fr conftest* ]) LOCALE_ZH_CN=$gt_cv_locale_zh_CN AC_SUBST([LOCALE_ZH_CN]) ]) libprelude-1.0.0/libmissing/m4/strcasestr.m40000664000076400007640000000562711341220436015717 00000000000000# strcasestr.m4 serial 13 dnl Copyright (C) 2005, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. dnl Check that strcasestr is present and works. AC_DEFUN([gl_FUNC_STRCASESTR_SIMPLE], [ AC_REQUIRE([gl_HEADER_STRING_H_DEFAULTS]) dnl Persuade glibc to declare strcasestr(). AC_REQUIRE([AC_USE_SYSTEM_EXTENSIONS]) AC_REQUIRE([gl_FUNC_MEMCHR]) AC_CHECK_FUNCS([strcasestr]) if test $ac_cv_func_strcasestr = no; then HAVE_STRCASESTR=0 else if test "$gl_cv_func_memchr_works" != yes; then REPLACE_STRCASESTR=1 fi fi if test $HAVE_STRCASESTR = 0 || test $REPLACE_STRCASESTR = 1; then AC_LIBOBJ([strcasestr]) gl_PREREQ_STRCASESTR fi ]) # gl_FUNC_STRCASESTR_SIMPLE dnl Additionally, check that strcasestr is efficient. AC_DEFUN([gl_FUNC_STRCASESTR], [ AC_REQUIRE([gl_FUNC_STRCASESTR_SIMPLE]) if test $HAVE_STRCASESTR = 1 && test $REPLACE_STRCASESTR = 0; then AC_CACHE_CHECK([whether strcasestr works in linear time], [gl_cv_func_strcasestr_linear], [AC_RUN_IFELSE([AC_LANG_PROGRAM([[ #include /* for signal */ #include /* for memmem */ #include /* for malloc */ #include /* for alarm */ ]], [[size_t m = 1000000; char *haystack = (char *) malloc (2 * m + 2); char *needle = (char *) malloc (m + 2); void *result = 0; /* Failure to compile this test due to missing alarm is okay, since all such platforms (mingw) also lack strcasestr. */ signal (SIGALRM, SIG_DFL); alarm (5); /* Check for quadratic performance. */ if (haystack && needle) { memset (haystack, 'A', 2 * m); haystack[2 * m] = 'B'; haystack[2 * m + 1] = 0; memset (needle, 'A', m); needle[m] = 'B'; needle[m + 1] = 0; result = strcasestr (haystack, needle); } return !result;]])], [gl_cv_func_strcasestr_linear=yes], [gl_cv_func_strcasestr_linear=no], [dnl Only glibc >= 2.9 and cygwin >= 1.7.0 are known to have a dnl strcasestr that works in linear time. AC_EGREP_CPP([Lucky user], [ #include #ifdef __GNU_LIBRARY__ #if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 9) || (__GLIBC__ > 2) Lucky user #endif #endif #ifdef __CYGWIN__ #include #if CYGWIN_VERSION_DLL_MAJOR >= 1007 Lucky user #endif #endif ], [gl_cv_func_strcasestr_linear=yes], [gl_cv_func_strcasestr_linear="guessing no"]) ]) ]) if test "$gl_cv_func_strcasestr_linear" != yes; then REPLACE_STRCASESTR=1 AC_LIBOBJ([strcasestr]) gl_PREREQ_STRCASESTR fi fi ]) # gl_FUNC_STRCASESTR # Prerequisites of lib/strcasestr.c. AC_DEFUN([gl_PREREQ_STRCASESTR], [ : ]) libprelude-1.0.0/libmissing/m4/threadlib.m40000664000076400007640000003055611341220437015460 00000000000000# threadlib.m4 serial 4 (gettext-0.18) dnl Copyright (C) 2005-2010 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. dnl From Bruno Haible. dnl gl_THREADLIB dnl ------------ dnl Tests for a multithreading library to be used. dnl Defines at most one of the macros USE_POSIX_THREADS, USE_SOLARIS_THREADS, dnl USE_PTH_THREADS, USE_WIN32_THREADS dnl Sets the variables LIBTHREAD and LTLIBTHREAD to the linker options for use dnl in a Makefile (LIBTHREAD for use without libtool, LTLIBTHREAD for use with dnl libtool). dnl Sets the variables LIBMULTITHREAD and LTLIBMULTITHREAD similarly, for dnl programs that really need multithread functionality. The difference dnl between LIBTHREAD and LIBMULTITHREAD is that on platforms supporting weak dnl symbols, typically LIBTHREAD="" whereas LIBMULTITHREAD="-lpthread". dnl Adds to CPPFLAGS the flag -D_REENTRANT or -D_THREAD_SAFE if needed for dnl multithread-safe programs. AC_DEFUN([gl_THREADLIB_EARLY], [ AC_REQUIRE([gl_THREADLIB_EARLY_BODY]) ]) dnl The guts of gl_THREADLIB_EARLY. Needs to be expanded only once. AC_DEFUN([gl_THREADLIB_EARLY_BODY], [ dnl Ordering constraints: This macro modifies CPPFLAGS in a way that dnl influences the result of the autoconf tests that test for *_unlocked dnl declarations, on AIX 5 at least. Therefore it must come early. AC_BEFORE([$0], [gl_FUNC_GLIBC_UNLOCKED_IO])dnl AC_BEFORE([$0], [gl_ARGP])dnl AC_REQUIRE([AC_CANONICAL_HOST]) dnl _GNU_SOURCE is needed for pthread_rwlock_t on glibc systems. dnl AC_USE_SYSTEM_EXTENSIONS was introduced in autoconf 2.60 and obsoletes dnl AC_GNU_SOURCE. m4_ifdef([AC_USE_SYSTEM_EXTENSIONS], [AC_REQUIRE([AC_USE_SYSTEM_EXTENSIONS])], [AC_REQUIRE([AC_GNU_SOURCE])]) dnl Check for multithreading. m4_divert_text([DEFAULTS], [gl_use_threads_default=]) AC_ARG_ENABLE([threads], AC_HELP_STRING([--enable-threads={posix|solaris|pth|win32}], [specify multithreading API]) AC_HELP_STRING([--disable-threads], [build without multithread safety]), [gl_use_threads=$enableval], [if test -n "$gl_use_threads_default"; then gl_use_threads="$gl_use_threads_default" else changequote(,)dnl case "$host_os" in dnl Disable multithreading by default on OSF/1, because it interferes dnl with fork()/exec(): When msgexec is linked with -lpthread, its dnl child process gets an endless segmentation fault inside execvp(). dnl Disable multithreading by default on Cygwin 1.5.x, because it has dnl bugs that lead to endless loops or crashes. See dnl . osf*) gl_use_threads=no ;; cygwin*) case `uname -r` in 1.[0-5].*) gl_use_threads=no ;; *) gl_use_threads=yes ;; esac ;; *) gl_use_threads=yes ;; esac changequote([,])dnl fi ]) if test "$gl_use_threads" = yes || test "$gl_use_threads" = posix; then # For using : case "$host_os" in osf*) # On OSF/1, the compiler needs the flag -D_REENTRANT so that it # groks . cc also understands the flag -pthread, but # we don't use it because 1. gcc-2.95 doesn't understand -pthread, # 2. putting a flag into CPPFLAGS that has an effect on the linker # causes the AC_TRY_LINK test below to succeed unexpectedly, # leading to wrong values of LIBTHREAD and LTLIBTHREAD. CPPFLAGS="$CPPFLAGS -D_REENTRANT" ;; esac # Some systems optimize for single-threaded programs by default, and # need special flags to disable these optimizations. For example, the # definition of 'errno' in . case "$host_os" in aix* | freebsd*) CPPFLAGS="$CPPFLAGS -D_THREAD_SAFE" ;; solaris*) CPPFLAGS="$CPPFLAGS -D_REENTRANT" ;; esac fi ]) dnl The guts of gl_THREADLIB. Needs to be expanded only once. AC_DEFUN([gl_THREADLIB_BODY], [ AC_REQUIRE([gl_THREADLIB_EARLY_BODY]) gl_threads_api=none LIBTHREAD= LTLIBTHREAD= LIBMULTITHREAD= LTLIBMULTITHREAD= if test "$gl_use_threads" != no; then dnl Check whether the compiler and linker support weak declarations. AC_MSG_CHECKING([whether imported symbols can be declared weak]) gl_have_weak=no AC_TRY_LINK([extern void xyzzy (); #pragma weak xyzzy], [xyzzy();], [gl_have_weak=yes]) AC_MSG_RESULT([$gl_have_weak]) if test "$gl_use_threads" = yes || test "$gl_use_threads" = posix; then # On OSF/1, the compiler needs the flag -pthread or -D_REENTRANT so that # it groks . It's added above, in gl_THREADLIB_EARLY_BODY. AC_CHECK_HEADER([pthread.h], [gl_have_pthread_h=yes], [gl_have_pthread_h=no]) if test "$gl_have_pthread_h" = yes; then # Other possible tests: # -lpthreads (FSU threads, PCthreads) # -lgthreads gl_have_pthread= # Test whether both pthread_mutex_lock and pthread_mutexattr_init exist # in libc. IRIX 6.5 has the first one in both libc and libpthread, but # the second one only in libpthread, and lock.c needs it. AC_TRY_LINK([#include ], [pthread_mutex_lock((pthread_mutex_t*)0); pthread_mutexattr_init((pthread_mutexattr_t*)0);], [gl_have_pthread=yes]) # Test for libpthread by looking for pthread_kill. (Not pthread_self, # since it is defined as a macro on OSF/1.) if test -n "$gl_have_pthread"; then # The program links fine without libpthread. But it may actually # need to link with libpthread in order to create multiple threads. AC_CHECK_LIB([pthread], [pthread_kill], [LIBMULTITHREAD=-lpthread LTLIBMULTITHREAD=-lpthread # On Solaris and HP-UX, most pthread functions exist also in libc. # Therefore pthread_in_use() needs to actually try to create a # thread: pthread_create from libc will fail, whereas # pthread_create will actually create a thread. case "$host_os" in solaris* | hpux*) AC_DEFINE([PTHREAD_IN_USE_DETECTION_HARD], [1], [Define if the pthread_in_use() detection is hard.]) esac ]) else # Some library is needed. Try libpthread and libc_r. AC_CHECK_LIB([pthread], [pthread_kill], [gl_have_pthread=yes LIBTHREAD=-lpthread LTLIBTHREAD=-lpthread LIBMULTITHREAD=-lpthread LTLIBMULTITHREAD=-lpthread]) if test -z "$gl_have_pthread"; then # For FreeBSD 4. AC_CHECK_LIB([c_r], [pthread_kill], [gl_have_pthread=yes LIBTHREAD=-lc_r LTLIBTHREAD=-lc_r LIBMULTITHREAD=-lc_r LTLIBMULTITHREAD=-lc_r]) fi fi if test -n "$gl_have_pthread"; then gl_threads_api=posix AC_DEFINE([USE_POSIX_THREADS], [1], [Define if the POSIX multithreading library can be used.]) if test -n "$LIBMULTITHREAD" || test -n "$LTLIBMULTITHREAD"; then if test $gl_have_weak = yes; then AC_DEFINE([USE_POSIX_THREADS_WEAK], [1], [Define if references to the POSIX multithreading library should be made weak.]) LIBTHREAD= LTLIBTHREAD= fi fi fi fi fi if test -z "$gl_have_pthread"; then if test "$gl_use_threads" = yes || test "$gl_use_threads" = solaris; then gl_have_solaristhread= gl_save_LIBS="$LIBS" LIBS="$LIBS -lthread" AC_TRY_LINK([#include #include ], [thr_self();], [gl_have_solaristhread=yes]) LIBS="$gl_save_LIBS" if test -n "$gl_have_solaristhread"; then gl_threads_api=solaris LIBTHREAD=-lthread LTLIBTHREAD=-lthread LIBMULTITHREAD="$LIBTHREAD" LTLIBMULTITHREAD="$LTLIBTHREAD" AC_DEFINE([USE_SOLARIS_THREADS], [1], [Define if the old Solaris multithreading library can be used.]) if test $gl_have_weak = yes; then AC_DEFINE([USE_SOLARIS_THREADS_WEAK], [1], [Define if references to the old Solaris multithreading library should be made weak.]) LIBTHREAD= LTLIBTHREAD= fi fi fi fi if test "$gl_use_threads" = pth; then gl_save_CPPFLAGS="$CPPFLAGS" AC_LIB_LINKFLAGS([pth]) gl_have_pth= gl_save_LIBS="$LIBS" LIBS="$LIBS -lpth" AC_TRY_LINK([#include ], [pth_self();], [gl_have_pth=yes]) LIBS="$gl_save_LIBS" if test -n "$gl_have_pth"; then gl_threads_api=pth LIBTHREAD="$LIBPTH" LTLIBTHREAD="$LTLIBPTH" LIBMULTITHREAD="$LIBTHREAD" LTLIBMULTITHREAD="$LTLIBTHREAD" AC_DEFINE([USE_PTH_THREADS], [1], [Define if the GNU Pth multithreading library can be used.]) if test -n "$LIBMULTITHREAD" || test -n "$LTLIBMULTITHREAD"; then if test $gl_have_weak = yes; then AC_DEFINE([USE_PTH_THREADS_WEAK], [1], [Define if references to the GNU Pth multithreading library should be made weak.]) LIBTHREAD= LTLIBTHREAD= fi fi else CPPFLAGS="$gl_save_CPPFLAGS" fi fi if test -z "$gl_have_pthread"; then if test "$gl_use_threads" = yes || test "$gl_use_threads" = win32; then if { case "$host_os" in mingw*) true;; *) false;; esac }; then gl_threads_api=win32 AC_DEFINE([USE_WIN32_THREADS], [1], [Define if the Win32 multithreading API can be used.]) fi fi fi fi AC_MSG_CHECKING([for multithread API to use]) AC_MSG_RESULT([$gl_threads_api]) AC_SUBST([LIBTHREAD]) AC_SUBST([LTLIBTHREAD]) AC_SUBST([LIBMULTITHREAD]) AC_SUBST([LTLIBMULTITHREAD]) ]) AC_DEFUN([gl_THREADLIB], [ AC_REQUIRE([gl_THREADLIB_EARLY]) AC_REQUIRE([gl_THREADLIB_BODY]) ]) dnl gl_DISABLE_THREADS dnl ------------------ dnl Sets the gl_THREADLIB default so that threads are not used by default. dnl The user can still override it at installation time, by using the dnl configure option '--enable-threads'. AC_DEFUN([gl_DISABLE_THREADS], [ m4_divert_text([INIT_PREPARE], [gl_use_threads_default=no]) ]) dnl Survey of platforms: dnl dnl Platform Available Compiler Supports test-lock dnl flavours option weak result dnl --------------- --------- --------- -------- --------- dnl Linux 2.4/glibc posix -lpthread Y OK dnl dnl GNU Hurd/glibc posix dnl dnl FreeBSD 5.3 posix -lc_r Y dnl posix -lkse ? Y dnl posix -lpthread ? Y dnl posix -lthr Y dnl dnl FreeBSD 5.2 posix -lc_r Y dnl posix -lkse Y dnl posix -lthr Y dnl dnl FreeBSD 4.0,4.10 posix -lc_r Y OK dnl dnl NetBSD 1.6 -- dnl dnl OpenBSD 3.4 posix -lpthread Y OK dnl dnl MacOS X 10.[123] posix -lpthread Y OK dnl dnl Solaris 7,8,9 posix -lpthread Y Sol 7,8: 0.0; Sol 9: OK dnl solaris -lthread Y Sol 7,8: 0.0; Sol 9: OK dnl dnl HP-UX 11 posix -lpthread N (cc) OK dnl Y (gcc) dnl dnl IRIX 6.5 posix -lpthread Y 0.5 dnl dnl AIX 4.3,5.1 posix -lpthread N AIX 4: 0.5; AIX 5: OK dnl dnl OSF/1 4.0,5.1 posix -pthread (cc) N OK dnl -lpthread (gcc) Y dnl dnl Cygwin posix -lpthread Y OK dnl dnl Any of the above pth -lpth 0.0 dnl dnl Mingw win32 N OK dnl dnl BeOS 5 -- dnl dnl The test-lock result shows what happens if in test-lock.c EXPLICIT_YIELD is dnl turned off: dnl OK if all three tests terminate OK, dnl 0.5 if the first test terminates OK but the second one loops endlessly, dnl 0.0 if the first test already loops endlessly. libprelude-1.0.0/libmissing/m4/size_max.m40000664000076400007640000000563011341220436015333 00000000000000# size_max.m4 serial 9 dnl Copyright (C) 2003, 2005-2006, 2008-2010 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. dnl From Bruno Haible. AC_DEFUN([gl_SIZE_MAX], [ AC_CHECK_HEADERS([stdint.h]) dnl First test whether the system already has SIZE_MAX. AC_CACHE_CHECK([for SIZE_MAX], [gl_cv_size_max], [ gl_cv_size_max= AC_EGREP_CPP([Found it], [ #include #if HAVE_STDINT_H #include #endif #ifdef SIZE_MAX Found it #endif ], [gl_cv_size_max=yes]) if test -z "$gl_cv_size_max"; then dnl Define it ourselves. Here we assume that the type 'size_t' is not wider dnl than the type 'unsigned long'. Try hard to find a definition that can dnl be used in a preprocessor #if, i.e. doesn't contain a cast. AC_COMPUTE_INT([size_t_bits_minus_1], [sizeof (size_t) * CHAR_BIT - 1], [#include #include ], [size_t_bits_minus_1=]) AC_COMPUTE_INT([fits_in_uint], [sizeof (size_t) <= sizeof (unsigned int)], [#include ], [fits_in_uint=]) if test -n "$size_t_bits_minus_1" && test -n "$fits_in_uint"; then if test $fits_in_uint = 1; then dnl Even though SIZE_MAX fits in an unsigned int, it must be of type dnl 'unsigned long' if the type 'size_t' is the same as 'unsigned long'. AC_TRY_COMPILE([#include extern size_t foo; extern unsigned long foo; ], [], [fits_in_uint=0]) fi dnl We cannot use 'expr' to simplify this expression, because 'expr' dnl works only with 'long' integers in the host environment, while we dnl might be cross-compiling from a 32-bit platform to a 64-bit platform. if test $fits_in_uint = 1; then gl_cv_size_max="(((1U << $size_t_bits_minus_1) - 1) * 2 + 1)" else gl_cv_size_max="(((1UL << $size_t_bits_minus_1) - 1) * 2 + 1)" fi else dnl Shouldn't happen, but who knows... gl_cv_size_max='((size_t)~(size_t)0)' fi fi ]) if test "$gl_cv_size_max" != yes; then AC_DEFINE_UNQUOTED([SIZE_MAX], [$gl_cv_size_max], [Define as the maximum value of type 'size_t', if the system doesn't define it.]) fi dnl Don't redefine SIZE_MAX in config.h if config.h is re-included after dnl . Remember that the #undef in AH_VERBATIM gets replaced with dnl #define by AC_DEFINE_UNQUOTED. AH_VERBATIM([SIZE_MAX], [/* Define as the maximum value of type 'size_t', if the system doesn't define it. */ #ifndef SIZE_MAX # undef SIZE_MAX #endif]) ]) dnl Autoconf >= 2.61 has AC_COMPUTE_INT built-in. dnl Remove this when we can assume autoconf >= 2.61. m4_ifdef([AC_COMPUTE_INT], [], [ AC_DEFUN([AC_COMPUTE_INT], [_AC_COMPUTE_INT([$2],[$1],[$3],[$4])]) ]) libprelude-1.0.0/libmissing/m4/isnanf.m40000664000076400007640000001202411341220436014765 00000000000000# isnanf.m4 serial 10 dnl Copyright (C) 2007-2010 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. dnl Check how to get or define isnanf(). AC_DEFUN([gl_FUNC_ISNANF], [ AC_REQUIRE([gl_MATH_H_DEFAULTS]) ISNANF_LIBM= gl_HAVE_ISNANF_NO_LIBM if test $gl_cv_func_isnanf_no_libm = no; then gl_HAVE_ISNANF_IN_LIBM if test $gl_cv_func_isnanf_in_libm = yes; then ISNANF_LIBM=-lm fi fi if test $gl_cv_func_isnanf_no_libm = yes \ || test $gl_cv_func_isnanf_in_libm = yes; then save_LIBS="$LIBS" LIBS="$LIBS $ISNANF_LIBM" gl_ISNANF_WORKS LIBS="$save_LIBS" case "$gl_cv_func_isnanf_works" in *yes) gl_func_isnanf=yes ;; *) gl_func_isnanf=no; ISNANF_LIBM= ;; esac else gl_func_isnanf=no fi if test $gl_func_isnanf != yes; then HAVE_ISNANF=0 gl_BUILD_ISNANF fi AC_SUBST([ISNANF_LIBM]) ]) dnl Check how to get or define isnanf() without linking with libm. AC_DEFUN([gl_FUNC_ISNANF_NO_LIBM], [ gl_HAVE_ISNANF_NO_LIBM if test $gl_cv_func_isnanf_no_libm = yes; then gl_ISNANF_WORKS fi if test $gl_cv_func_isnanf_no_libm = yes \ && { case "$gl_cv_func_isnanf_works" in *yes) true;; *) false;; esac }; then AC_DEFINE([HAVE_ISNANF_IN_LIBC], [1], [Define if the isnan(float) function is available in libc.]) else gl_BUILD_ISNANF fi ]) dnl Pull in replacement isnanf definition. It does not need -lm. AC_DEFUN([gl_BUILD_ISNANF], [ AC_LIBOBJ([isnanf]) gl_FLOAT_EXPONENT_LOCATION ]) dnl Test whether isnanf() can be used without libm. AC_DEFUN([gl_HAVE_ISNANF_NO_LIBM], [ AC_CACHE_CHECK([whether isnan(float) can be used without linking with libm], [gl_cv_func_isnanf_no_libm], [ AC_TRY_LINK([#include #if __GNUC__ >= 4 # undef isnanf # define isnanf(x) __builtin_isnanf ((float)(x)) #elif defined isnan # undef isnanf # define isnanf(x) isnan ((float)(x)) #endif float x;], [return isnanf (x);], [gl_cv_func_isnanf_no_libm=yes], [gl_cv_func_isnanf_no_libm=no]) ]) ]) dnl Test whether isnanf() can be used with libm. AC_DEFUN([gl_HAVE_ISNANF_IN_LIBM], [ AC_CACHE_CHECK([whether isnan(float) can be used with libm], [gl_cv_func_isnanf_in_libm], [ save_LIBS="$LIBS" LIBS="$LIBS -lm" AC_TRY_LINK([#include #if __GNUC__ >= 4 # undef isnanf # define isnanf(x) __builtin_isnanf ((float)(x)) #elif defined isnan # undef isnanf # define isnanf(x) isnan ((float)(x)) #endif float x;], [return isnanf (x);], [gl_cv_func_isnanf_in_libm=yes], [gl_cv_func_isnanf_in_libm=no]) LIBS="$save_LIBS" ]) ]) dnl Test whether isnanf() rejects Infinity (this fails on Solaris 2.5.1), dnl recognizes a NaN (this fails on IRIX 6.5 with cc), and recognizes a NaN dnl with in-memory representation 0x7fbfffff (this fails on IRIX 6.5). AC_DEFUN([gl_ISNANF_WORKS], [ AC_REQUIRE([AC_PROG_CC]) AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles AC_REQUIRE([gl_FLOAT_EXPONENT_LOCATION]) AC_CACHE_CHECK([whether isnan(float) works], [gl_cv_func_isnanf_works], [ AC_TRY_RUN([ #include #if __GNUC__ >= 4 # undef isnanf # define isnanf(x) __builtin_isnanf ((float)(x)) #elif defined isnan # undef isnanf # define isnanf(x) isnan ((float)(x)) #endif /* The Compaq (ex-DEC) C 6.4 compiler chokes on the expression 0.0 / 0.0. */ #ifdef __DECC static float NaN () { static float zero = 0.0f; return zero / zero; } #else # define NaN() (0.0f / 0.0f) #endif #define NWORDS \ ((sizeof (float) + sizeof (unsigned int) - 1) / sizeof (unsigned int)) typedef union { unsigned int word[NWORDS]; float value; } memory_float; int main() { memory_float m; if (isnanf (1.0f / 0.0f)) return 1; if (!isnanf (NaN ())) return 1; #if defined FLT_EXPBIT0_WORD && defined FLT_EXPBIT0_BIT /* The isnanf function should be immune against changes in the sign bit and in the mantissa bits. The xor operation twiddles a bit that can only be a sign bit or a mantissa bit. */ if (FLT_EXPBIT0_WORD == 0 && FLT_EXPBIT0_BIT > 0) { m.value = NaN (); /* Set the bits below the exponent to 01111...111. */ m.word[0] &= -1U << FLT_EXPBIT0_BIT; m.word[0] |= 1U << (FLT_EXPBIT0_BIT - 1) - 1; if (!isnanf (m.value)) return 1; } #endif return 0; }], [gl_cv_func_isnanf_works=yes], [gl_cv_func_isnanf_works=no], [case "$host_os" in irix* | solaris*) gl_cv_func_isnanf_works="guessing no";; *) gl_cv_func_isnanf_works="guessing yes";; esac ]) ]) ]) libprelude-1.0.0/libmissing/m4/lock.m40000664000076400007640000000231411341220436014440 00000000000000# lock.m4 serial 10 (gettext-0.18) dnl Copyright (C) 2005-2010 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. dnl From Bruno Haible. AC_DEFUN([gl_LOCK], [ AC_REQUIRE([gl_THREADLIB]) if test "$gl_threads_api" = posix; then # OSF/1 4.0 and MacOS X 10.1 lack the pthread_rwlock_t type and the # pthread_rwlock_* functions. AC_CHECK_TYPE([pthread_rwlock_t], [AC_DEFINE([HAVE_PTHREAD_RWLOCK], [1], [Define if the POSIX multithreading library has read/write locks.])], [], [#include ]) # glibc defines PTHREAD_MUTEX_RECURSIVE as enum, not as a macro. AC_TRY_COMPILE([#include ], [#if __FreeBSD__ == 4 error "No, in FreeBSD 4.0 recursive mutexes actually don't work." #else int x = (int)PTHREAD_MUTEX_RECURSIVE; return !x; #endif], [AC_DEFINE([HAVE_PTHREAD_MUTEX_RECURSIVE], [1], [Define if the defines PTHREAD_MUTEX_RECURSIVE.])]) fi gl_PREREQ_LOCK ]) # Prerequisites of lib/lock.c. AC_DEFUN([gl_PREREQ_LOCK], [ AC_REQUIRE([AC_C_INLINE]) ]) libprelude-1.0.0/libmissing/m4/mbsinit.m40000664000076400007640000000142111341220436015153 00000000000000# mbsinit.m4 serial 3 dnl Copyright (C) 2008, 2009, 2010 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. AC_DEFUN([gl_FUNC_MBSINIT], [ AC_REQUIRE([gl_WCHAR_H_DEFAULTS]) AC_REQUIRE([AC_TYPE_MBSTATE_T]) gl_MBSTATE_T_BROKEN if test $REPLACE_MBSTATE_T = 1; then REPLACE_MBSINIT=1 fi AC_CHECK_FUNCS_ONCE([mbsinit]) if test $ac_cv_func_mbsinit = no; then HAVE_MBSINIT=0 fi if test $HAVE_MBSINIT = 0 || test $REPLACE_MBSINIT = 1; then gl_REPLACE_WCHAR_H AC_LIBOBJ([mbsinit]) gl_PREREQ_MBSINIT fi ]) # Prerequisites of lib/mbsinit.c. AC_DEFUN([gl_PREREQ_MBSINIT], [ : ]) libprelude-1.0.0/libmissing/m4/math_h.m40000664000076400007640000001342511341220436014755 00000000000000# math_h.m4 serial 17 dnl Copyright (C) 2007-2010 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. AC_DEFUN([gl_MATH_H], [ AC_REQUIRE([gl_MATH_H_DEFAULTS]) gl_CHECK_NEXT_HEADERS([math.h]) AC_REQUIRE([AC_C_INLINE]) AC_CACHE_CHECK([whether NAN macro works], [gl_cv_header_math_nan_works], [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[@%:@include ]], [[/* Solaris 10 has a broken definition of NAN. Other platforms fail to provide NAN, or provide it only in C99 mode; this test only needs to fail when NAN is provided but wrong. */ float f = 1.0f; #ifdef NAN f = NAN; #endif return f == 0;]])], [gl_cv_header_math_nan_works=yes], [gl_cv_header_math_nan_works=no])]) if test $gl_cv_header_math_nan_works = no; then REPLACE_NAN=1 fi AC_CACHE_CHECK([whether HUGE_VAL works], [gl_cv_header_math_huge_val_works], [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[@%:@include ]], [[/* Solaris 10 has a broken definition of HUGE_VAL. */ double d = HUGE_VAL; return d == 0;]])], [gl_cv_header_math_huge_val_works=yes], [gl_cv_header_math_huge_val_works=no])]) if test $gl_cv_header_math_huge_val_works = no; then REPLACE_HUGE_VAL=1 fi dnl Check for declarations of anything we want to poison if the dnl corresponding gnulib module is not in use. gl_WARN_ON_USE_PREPARE([[#include ]], [acosl asinl atanl ceilf ceill cosl expl floorf floorl frexpl ldexpl logl round roundf roundl sinl sqrtl tanl trunc truncf truncl]) ]) AC_DEFUN([gl_MATH_MODULE_INDICATOR], [ dnl Use AC_REQUIRE here, so that the default settings are expanded once only. AC_REQUIRE([gl_MATH_H_DEFAULTS]) GNULIB_[]m4_translit([$1],[abcdefghijklmnopqrstuvwxyz./-],[ABCDEFGHIJKLMNOPQRSTUVWXYZ___])=1 ]) AC_DEFUN([gl_MATH_H_DEFAULTS], [ GNULIB_ACOSL=0; AC_SUBST([GNULIB_ACOSL]) GNULIB_ASINL=0; AC_SUBST([GNULIB_ASINL]) GNULIB_ATANL=0; AC_SUBST([GNULIB_ATANL]) GNULIB_CEILF=0; AC_SUBST([GNULIB_CEILF]) GNULIB_CEILL=0; AC_SUBST([GNULIB_CEILL]) GNULIB_COSL=0; AC_SUBST([GNULIB_COSL]) GNULIB_EXPL=0; AC_SUBST([GNULIB_EXPL]) GNULIB_FLOORF=0; AC_SUBST([GNULIB_FLOORF]) GNULIB_FLOORL=0; AC_SUBST([GNULIB_FLOORL]) GNULIB_FREXP=0; AC_SUBST([GNULIB_FREXP]) GNULIB_FREXPL=0; AC_SUBST([GNULIB_FREXPL]) GNULIB_ISFINITE=0; AC_SUBST([GNULIB_ISFINITE]) GNULIB_ISINF=0; AC_SUBST([GNULIB_ISINF]) GNULIB_ISNAN=0; AC_SUBST([GNULIB_ISNAN]) GNULIB_ISNANF=0; AC_SUBST([GNULIB_ISNANF]) GNULIB_ISNAND=0; AC_SUBST([GNULIB_ISNAND]) GNULIB_ISNANL=0; AC_SUBST([GNULIB_ISNANL]) GNULIB_LDEXPL=0; AC_SUBST([GNULIB_LDEXPL]) GNULIB_LOGL=0; AC_SUBST([GNULIB_LOGL]) GNULIB_ROUND=0; AC_SUBST([GNULIB_ROUND]) GNULIB_ROUNDF=0; AC_SUBST([GNULIB_ROUNDF]) GNULIB_ROUNDL=0; AC_SUBST([GNULIB_ROUNDL]) GNULIB_SIGNBIT=0; AC_SUBST([GNULIB_SIGNBIT]) GNULIB_SINL=0; AC_SUBST([GNULIB_SINL]) GNULIB_SQRTL=0; AC_SUBST([GNULIB_SQRTL]) GNULIB_TANL=0; AC_SUBST([GNULIB_TANL]) GNULIB_TRUNC=0; AC_SUBST([GNULIB_TRUNC]) GNULIB_TRUNCF=0; AC_SUBST([GNULIB_TRUNCF]) GNULIB_TRUNCL=0; AC_SUBST([GNULIB_TRUNCL]) dnl Assume proper GNU behavior unless another module says otherwise. HAVE_ACOSL=1; AC_SUBST([HAVE_ACOSL]) HAVE_ASINL=1; AC_SUBST([HAVE_ASINL]) HAVE_ATANL=1; AC_SUBST([HAVE_ATANL]) HAVE_COSL=1; AC_SUBST([HAVE_COSL]) HAVE_EXPL=1; AC_SUBST([HAVE_EXPL]) HAVE_ISNANF=1; AC_SUBST([HAVE_ISNANF]) HAVE_ISNAND=1; AC_SUBST([HAVE_ISNAND]) HAVE_ISNANL=1; AC_SUBST([HAVE_ISNANL]) HAVE_LOGL=1; AC_SUBST([HAVE_LOGL]) HAVE_SINL=1; AC_SUBST([HAVE_SINL]) HAVE_SQRTL=1; AC_SUBST([HAVE_SQRTL]) HAVE_TANL=1; AC_SUBST([HAVE_TANL]) HAVE_DECL_ACOSL=1; AC_SUBST([HAVE_DECL_ACOSL]) HAVE_DECL_ASINL=1; AC_SUBST([HAVE_DECL_ASINL]) HAVE_DECL_ATANL=1; AC_SUBST([HAVE_DECL_ATANL]) HAVE_DECL_COSL=1; AC_SUBST([HAVE_DECL_COSL]) HAVE_DECL_EXPL=1; AC_SUBST([HAVE_DECL_EXPL]) HAVE_DECL_FREXPL=1; AC_SUBST([HAVE_DECL_FREXPL]) HAVE_DECL_LDEXPL=1; AC_SUBST([HAVE_DECL_LDEXPL]) HAVE_DECL_LOGL=1; AC_SUBST([HAVE_DECL_LOGL]) HAVE_DECL_SINL=1; AC_SUBST([HAVE_DECL_SINL]) HAVE_DECL_SQRTL=1; AC_SUBST([HAVE_DECL_SQRTL]) HAVE_DECL_TANL=1; AC_SUBST([HAVE_DECL_TANL]) HAVE_DECL_TRUNC=1; AC_SUBST([HAVE_DECL_TRUNC]) HAVE_DECL_TRUNCF=1; AC_SUBST([HAVE_DECL_TRUNCF]) REPLACE_CEILF=0; AC_SUBST([REPLACE_CEILF]) REPLACE_CEILL=0; AC_SUBST([REPLACE_CEILL]) REPLACE_FLOORF=0; AC_SUBST([REPLACE_FLOORF]) REPLACE_FLOORL=0; AC_SUBST([REPLACE_FLOORL]) REPLACE_FREXP=0; AC_SUBST([REPLACE_FREXP]) REPLACE_FREXPL=0; AC_SUBST([REPLACE_FREXPL]) REPLACE_HUGE_VAL=0; AC_SUBST([REPLACE_HUGE_VAL]) REPLACE_ISFINITE=0; AC_SUBST([REPLACE_ISFINITE]) REPLACE_ISINF=0; AC_SUBST([REPLACE_ISINF]) REPLACE_ISNAN=0; AC_SUBST([REPLACE_ISNAN]) REPLACE_LDEXPL=0; AC_SUBST([REPLACE_LDEXPL]) REPLACE_NAN=0; AC_SUBST([REPLACE_NAN]) REPLACE_ROUND=0; AC_SUBST([REPLACE_ROUND]) REPLACE_ROUNDF=0; AC_SUBST([REPLACE_ROUNDF]) REPLACE_ROUNDL=0; AC_SUBST([REPLACE_ROUNDL]) REPLACE_SIGNBIT=0; AC_SUBST([REPLACE_SIGNBIT]) REPLACE_SIGNBIT_USING_GCC=0; AC_SUBST([REPLACE_SIGNBIT_USING_GCC]) REPLACE_TRUNCL=0; AC_SUBST([REPLACE_TRUNCL]) ]) libprelude-1.0.0/libmissing/m4/xsize.m40000664000076400007640000000066211341220437014657 00000000000000# xsize.m4 serial 4 dnl Copyright (C) 2003-2004, 2008-2010 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. AC_DEFUN([gl_XSIZE], [ dnl Prerequisites of lib/xsize.h. AC_REQUIRE([gl_SIZE_MAX]) AC_REQUIRE([AC_C_INLINE]) AC_CHECK_HEADERS([stdint.h]) ]) libprelude-1.0.0/libmissing/m4/gnulib-cache.m40000664000076400007640000000426411341220455016040 00000000000000# Copyright (C) 2002-2010 Free Software Foundation, Inc. # # This file is free software, distributed under the terms of the GNU # General Public License. As a special exception to the GNU General # Public License, this file may be distributed as part of a program # that contains a configuration script generated by Autoconf, under # the same distribution terms as the rest of that program. # # Generated by gnulib-tool. # # This file represents the specification of how gnulib-tool is used. # It acts as a cache: It is written and read by gnulib-tool. # In projects using CVS, this file is meant to be stored in CVS, # like the configure.ac and various Makefile.am files. # Specification in the form of a command-line invocation: # gnulib-tool --import --dir=. --lib=libmissing --source-base=libmissing --m4-base=libmissing/m4 --doc-base=libmissing/doc --tests-base=libmissing/tests --aux-dir=. --with-tests --lgpl --libtool --macro-prefix=gl --no-vc-files accept bind close cond connect dup2 fclose fopen ftw getaddrinfo getpass getsockname gettimeofday inet_ntop inet_pton ioctl listen lock lseek memmem minmax pathmax perror poll regex relocatable-lib-lgpl select setsockopt sigprocmask sleep snprintf-posix socket socklen strcase strcasestr strdup strerror strndup strptime strsep sys_stat thread time_r timegm tls uname vsnprintf-posix write # Specification in the form of a few gnulib-tool.m4 macro invocations: gl_LOCAL_DIR([]) gl_MODULES([ accept bind close cond connect dup2 fclose fopen ftw getaddrinfo getpass getsockname gettimeofday inet_ntop inet_pton ioctl listen lock lseek memmem minmax pathmax perror poll regex relocatable-lib-lgpl select setsockopt sigprocmask sleep snprintf-posix socket socklen strcase strcasestr strdup strerror strndup strptime strsep sys_stat thread time_r timegm tls uname vsnprintf-posix write ]) gl_AVOID([]) gl_SOURCE_BASE([libmissing]) gl_M4_BASE([libmissing/m4]) gl_PO_BASE([]) gl_DOC_BASE([libmissing/doc]) gl_TESTS_BASE([libmissing/tests]) gl_WITH_TESTS gl_LIB([libmissing]) gl_LGPL gl_MAKEFILE_NAME([]) gl_LIBTOOL gl_MACRO_PREFIX([gl]) gl_PO_DOMAIN([]) gl_VC_FILES([false]) libprelude-1.0.0/libmissing/m4/servent.m40000664000076400007640000000322711341220436015202 00000000000000# servent.m4 serial 1 dnl Copyright (C) 2008, 2009, 2010 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. AC_DEFUN([gl_SERVENT], [ dnl Where are getservent(), setservent(), endservent(), getservbyname(), dnl getservbyport() defined? dnl Where are getprotoent(), setprotoent(), endprotoent(), getprotobyname(), dnl getprotobynumber() defined? dnl - On Solaris, they are in libsocket. Ignore libxnet. dnl - On Haiku, they are in libnetwork. dnl - On BeOS, they are in libnet. dnl - On native Windows, they are in ws2_32.dll. dnl - Otherwise they are in libc. AC_REQUIRE([gl_HEADER_SYS_SOCKET])dnl for HAVE_SYS_SOCKET_H, HAVE_WINSOCK2_H SERVENT_LIB= gl_saved_libs="$LIBS" AC_SEARCH_LIBS([getservbyname], [socket network net], [if test "$ac_cv_search_getservbyname" != "none required"; then SERVENT_LIB="$ac_cv_search_getservbyname" fi]) LIBS="$gl_saved_libs" if test -z "$SERVENT_LIB"; then AC_CHECK_FUNCS([getservbyname], , [ AC_CACHE_CHECK([for getservbyname in winsock2.h and -lws2_32], [gl_cv_w32_getservbyname], [gl_cv_w32_getservbyname=no gl_save_LIBS="$LIBS" LIBS="$LIBS -lws2_32" AC_TRY_LINK([ #ifdef HAVE_WINSOCK2_H #include #endif #include ], [getservbyname(NULL,NULL);], [gl_cv_w32_getservbyname=yes]) LIBS="$gl_save_LIBS" ]) if test "$gl_cv_w32_getservbyname" = "yes"; then SERVENT_LIB="-lws2_32" fi ]) fi AC_SUBST([SERVENT_LIB]) ]) libprelude-1.0.0/libmissing/m4/extensions.m40000664000076400007640000001052711341220435015713 00000000000000# serial 9 -*- Autoconf -*- # Enable extensions on systems that normally disable them. # Copyright (C) 2003, 2006-2010 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 definition of AC_USE_SYSTEM_EXTENSIONS is stolen from CVS # Autoconf. Perhaps we can remove this once we can assume Autoconf # 2.62 or later everywhere, but since CVS Autoconf mutates rapidly # enough in this area it's likely we'll need to redefine # AC_USE_SYSTEM_EXTENSIONS for quite some time. # If autoconf reports a warning # warning: AC_COMPILE_IFELSE was called before AC_USE_SYSTEM_EXTENSIONS # or warning: AC_RUN_IFELSE was called before AC_USE_SYSTEM_EXTENSIONS # the fix is # 1) to ensure that AC_USE_SYSTEM_EXTENSIONS is never directly invoked # but always AC_REQUIREd, # 2) to ensure that for each occurrence of # AC_REQUIRE([AC_USE_SYSTEM_EXTENSIONS]) # or # AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS]) # the corresponding gnulib module description has 'extensions' among # its dependencies. This will ensure that the gl_USE_SYSTEM_EXTENSIONS # invocation occurs in gl_EARLY, not in gl_INIT. # AC_USE_SYSTEM_EXTENSIONS # ------------------------ # Enable extensions on systems that normally disable them, # typically due to standards-conformance issues. # Remember that #undef in AH_VERBATIM gets replaced with #define by # AC_DEFINE. The goal here is to define all known feature-enabling # macros, then, if reports of conflicts are made, disable macros that # cause problems on some platforms (such as __EXTENSIONS__). AC_DEFUN_ONCE([AC_USE_SYSTEM_EXTENSIONS], [AC_BEFORE([$0], [AC_COMPILE_IFELSE])dnl AC_BEFORE([$0], [AC_RUN_IFELSE])dnl AC_REQUIRE([AC_CANONICAL_HOST]) AC_CHECK_HEADER([minix/config.h], [MINIX=yes], [MINIX=]) if test "$MINIX" = yes; then AC_DEFINE([_POSIX_SOURCE], [1], [Define to 1 if you need to in order for `stat' and other things to work.]) AC_DEFINE([_POSIX_1_SOURCE], [2], [Define to 2 if the system does not provide POSIX.1 features except with this defined.]) AC_DEFINE([_MINIX], [1], [Define to 1 if on MINIX.]) fi dnl HP-UX 11.11 defines mbstate_t only if _XOPEN_SOURCE is defined to 500, dnl regardless of whether the flags -Ae or _D_HPUX_SOURCE=1 are already dnl provided. case "$host_os" in hpux*) AC_DEFINE([_XOPEN_SOURCE], [500], [Define to 500 only on HP-UX.]) ;; esac AH_VERBATIM([__EXTENSIONS__], [/* Enable extensions on AIX 3, Interix. */ #ifndef _ALL_SOURCE # undef _ALL_SOURCE #endif /* Enable GNU extensions on systems that have them. */ #ifndef _GNU_SOURCE # undef _GNU_SOURCE #endif /* Enable threading extensions on Solaris. */ #ifndef _POSIX_PTHREAD_SEMANTICS # undef _POSIX_PTHREAD_SEMANTICS #endif /* Enable extensions on HP NonStop. */ #ifndef _TANDEM_SOURCE # undef _TANDEM_SOURCE #endif /* Enable general extensions on Solaris. */ #ifndef __EXTENSIONS__ # undef __EXTENSIONS__ #endif ]) AC_CACHE_CHECK([whether it is safe to define __EXTENSIONS__], [ac_cv_safe_to_define___extensions__], [AC_COMPILE_IFELSE( [AC_LANG_PROGRAM([[ # define __EXTENSIONS__ 1 ]AC_INCLUDES_DEFAULT])], [ac_cv_safe_to_define___extensions__=yes], [ac_cv_safe_to_define___extensions__=no])]) test $ac_cv_safe_to_define___extensions__ = yes && AC_DEFINE([__EXTENSIONS__]) AC_DEFINE([_ALL_SOURCE]) AC_DEFINE([_GNU_SOURCE]) AC_DEFINE([_POSIX_PTHREAD_SEMANTICS]) AC_DEFINE([_TANDEM_SOURCE]) ])# AC_USE_SYSTEM_EXTENSIONS # gl_USE_SYSTEM_EXTENSIONS # ------------------------ # Enable extensions on systems that normally disable them, # typically due to standards-conformance issues. AC_DEFUN_ONCE([gl_USE_SYSTEM_EXTENSIONS], [ dnl Require this macro before AC_USE_SYSTEM_EXTENSIONS. dnl gnulib does not need it. But if it gets required by third-party macros dnl after AC_USE_SYSTEM_EXTENSIONS is required, autoconf 2.62..2.63 emit a dnl warning: "AC_COMPILE_IFELSE was called before AC_USE_SYSTEM_EXTENSIONS". dnl Note: We can do this only for one of the macros AC_AIX, AC_GNU_SOURCE, dnl AC_MINIX. If people still use AC_AIX or AC_MINIX, they are out of luck. AC_REQUIRE([AC_GNU_SOURCE]) AC_REQUIRE([AC_USE_SYSTEM_EXTENSIONS]) ]) libprelude-1.0.0/libmissing/m4/sys_socket_h.m40000664000076400007640000001307711341220437016216 00000000000000# sys_socket_h.m4 serial 14 dnl Copyright (C) 2005-2010 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. dnl From Simon Josefsson. AC_DEFUN([gl_HEADER_SYS_SOCKET], [ AC_REQUIRE([gl_SYS_SOCKET_H_DEFAULTS]) AC_REQUIRE([AC_C_INLINE]) AC_CACHE_CHECK([whether is self-contained], [gl_cv_header_sys_socket_h_selfcontained], [ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include ]], [[]])], [gl_cv_header_sys_socket_h_selfcontained=yes], [gl_cv_header_sys_socket_h_selfcontained=no]) ]) if test $gl_cv_header_sys_socket_h_selfcontained = yes; then SYS_SOCKET_H='' dnl If the shutdown function exists, should define dnl SHUT_RD, SHUT_WR, SHUT_RDWR. AC_CHECK_FUNCS([shutdown]) if test $ac_cv_func_shutdown = yes; then AC_CACHE_CHECK([whether defines the SHUT_* macros], [gl_cv_header_sys_socket_h_shut], [ AC_COMPILE_IFELSE( [AC_LANG_PROGRAM([[#include ]], [[int a[] = { SHUT_RD, SHUT_WR, SHUT_RDWR };]])], [gl_cv_header_sys_socket_h_shut=yes], [gl_cv_header_sys_socket_h_shut=no]) ]) if test $gl_cv_header_sys_socket_h_shut = no; then SYS_SOCKET_H='sys/socket.h' fi fi else SYS_SOCKET_H='sys/socket.h' fi # We need to check for ws2tcpip.h now. gl_PREREQ_SYS_H_SOCKET AC_CHECK_TYPES([struct sockaddr_storage, sa_family_t],,,[ /* sys/types.h is not needed according to POSIX, but the sys/socket.h in i386-unknown-freebsd4.10 and powerpc-apple-darwin5.5 required it. */ #include #ifdef HAVE_SYS_SOCKET_H #include #endif #ifdef HAVE_WS2TCPIP_H #include #endif ]) if test $ac_cv_type_struct_sockaddr_storage = no; then HAVE_STRUCT_SOCKADDR_STORAGE=0 SYS_SOCKET_H='sys/socket.h' fi if test $ac_cv_type_sa_family_t = no; then HAVE_SA_FAMILY_T=0 SYS_SOCKET_H='sys/socket.h' fi if test -n "$SYS_SOCKET_H"; then gl_PREREQ_SYS_H_WINSOCK2 fi AC_SUBST([SYS_SOCKET_H]) dnl Check for declarations of anything we want to poison if the dnl corresponding gnulib module is not in use. gl_WARN_ON_USE_PREPARE([[ /* Some systems require prerequisite headers. */ #include #if !defined __GLIBC__ && HAVE_SYS_TIME_H # include #endif #include ]], [socket connect accept bind getpeername getsockname getsockopt listen recv send recvfrom sendto setsockopt shutdown accept4]) ]) AC_DEFUN([gl_PREREQ_SYS_H_SOCKET], [ dnl Check prerequisites of the replacement. gl_CHECK_NEXT_HEADERS([sys/socket.h]) if test $ac_cv_header_sys_socket_h = yes; then HAVE_SYS_SOCKET_H=1 HAVE_WS2TCPIP_H=0 else HAVE_SYS_SOCKET_H=0 dnl We cannot use AC_CHECK_HEADERS_ONCE here, because that would make dnl the check for those headers unconditional; yet cygwin reports dnl that the headers are present but cannot be compiled (since on dnl cygwin, all socket information should come from sys/socket.h). AC_CHECK_HEADERS([ws2tcpip.h]) if test $ac_cv_header_ws2tcpip_h = yes; then HAVE_WS2TCPIP_H=1 else HAVE_WS2TCPIP_H=0 fi fi AC_SUBST([HAVE_SYS_SOCKET_H]) AC_SUBST([HAVE_WS2TCPIP_H]) ]) # Common prerequisites of the replacement and of the # replacement. # Sets and substitutes HAVE_WINSOCK2_H. AC_DEFUN([gl_PREREQ_SYS_H_WINSOCK2], [ m4_ifdef([gl_UNISTD_H_DEFAULTS], [AC_REQUIRE([gl_UNISTD_H_DEFAULTS])]) m4_ifdef([gl_SYS_IOCTL_H_DEFAULTS], [AC_REQUIRE([gl_SYS_IOCTL_H_DEFAULTS])]) AC_CHECK_HEADERS_ONCE([sys/socket.h]) if test $ac_cv_header_sys_socket_h != yes; then dnl We cannot use AC_CHECK_HEADERS_ONCE here, because that would make dnl the check for those headers unconditional; yet cygwin reports dnl that the headers are present but cannot be compiled (since on dnl cygwin, all socket information should come from sys/socket.h). AC_CHECK_HEADERS([winsock2.h]) fi if test "$ac_cv_header_winsock2_h" = yes; then HAVE_WINSOCK2_H=1 UNISTD_H_HAVE_WINSOCK2_H=1 SYS_IOCTL_H_HAVE_WINSOCK2_H=1 else HAVE_WINSOCK2_H=0 fi AC_SUBST([HAVE_WINSOCK2_H]) ]) AC_DEFUN([gl_SYS_SOCKET_MODULE_INDICATOR], [ dnl Use AC_REQUIRE here, so that the default settings are expanded once only. AC_REQUIRE([gl_SYS_SOCKET_H_DEFAULTS]) GNULIB_[]m4_translit([$1],[abcdefghijklmnopqrstuvwxyz./-],[ABCDEFGHIJKLMNOPQRSTUVWXYZ___])=1 ]) AC_DEFUN([gl_SYS_SOCKET_H_DEFAULTS], [ GNULIB_SOCKET=0; AC_SUBST([GNULIB_SOCKET]) GNULIB_CONNECT=0; AC_SUBST([GNULIB_CONNECT]) GNULIB_ACCEPT=0; AC_SUBST([GNULIB_ACCEPT]) GNULIB_BIND=0; AC_SUBST([GNULIB_BIND]) GNULIB_GETPEERNAME=0; AC_SUBST([GNULIB_GETPEERNAME]) GNULIB_GETSOCKNAME=0; AC_SUBST([GNULIB_GETSOCKNAME]) GNULIB_GETSOCKOPT=0; AC_SUBST([GNULIB_GETSOCKOPT]) GNULIB_LISTEN=0; AC_SUBST([GNULIB_LISTEN]) GNULIB_RECV=0; AC_SUBST([GNULIB_RECV]) GNULIB_SEND=0; AC_SUBST([GNULIB_SEND]) GNULIB_RECVFROM=0; AC_SUBST([GNULIB_RECVFROM]) GNULIB_SENDTO=0; AC_SUBST([GNULIB_SENDTO]) GNULIB_SETSOCKOPT=0; AC_SUBST([GNULIB_SETSOCKOPT]) GNULIB_SHUTDOWN=0; AC_SUBST([GNULIB_SHUTDOWN]) GNULIB_ACCEPT4=0; AC_SUBST([GNULIB_ACCEPT4]) HAVE_STRUCT_SOCKADDR_STORAGE=1; AC_SUBST([HAVE_STRUCT_SOCKADDR_STORAGE]) HAVE_SA_FAMILY_T=1; AC_SUBST([HAVE_SA_FAMILY_T]) HAVE_ACCEPT4=1; AC_SUBST([HAVE_ACCEPT4]) ]) libprelude-1.0.0/libmissing/m4/cond.m40000664000076400007640000000055211341220435014434 00000000000000# cond.m4 serial 1 dnl Copyright (C) 2008, 2009, 2010 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. AC_DEFUN([gl_COND], [ AC_REQUIRE([gl_THREADLIB]) AC_REQUIRE([AC_C_INLINE]) ]) libprelude-1.0.0/libmissing/m4/strerror.m40000664000076400007640000000442111341220436015373 00000000000000# strerror.m4 serial 9 dnl Copyright (C) 2002, 2007-2010 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. AC_DEFUN([gl_FUNC_STRERROR], [ AC_REQUIRE([gl_FUNC_STRERROR_SEPARATE]) if test $REPLACE_STRERROR = 1; then AC_LIBOBJ([strerror]) AC_DEFINE_UNQUOTED([REPLACE_STRERROR], [$REPLACE_STRERROR], [Define this to 1 if strerror is broken.]) fi ]) # Like gl_FUNC_STRERROR, except prepare for separate compilation (no AC_LIBOBJ). AC_DEFUN([gl_FUNC_STRERROR_SEPARATE], [ AC_REQUIRE([gl_HEADER_STRING_H_DEFAULTS]) AC_REQUIRE([gl_HEADER_ERRNO_H]) if test -z "$ERRNO_H"; then AC_CACHE_CHECK([for working strerror function], [gl_cv_func_working_strerror], [AC_RUN_IFELSE( [AC_LANG_PROGRAM( [[#include ]], [[return !*strerror (-2);]])], [gl_cv_func_working_strerror=yes], [gl_cv_func_working_strerror=no], [dnl Assume crossbuild works if it compiles. AC_COMPILE_IFELSE( [AC_LANG_PROGRAM( [[#include ]], [[return !*strerror (-2);]])], [gl_cv_func_working_strerror=yes], [gl_cv_func_working_strerror=no]) ]) ]) if test $gl_cv_func_working_strerror = no; then dnl The system's strerror() fails to return a string for out-of-range dnl integers. Replace it. REPLACE_STRERROR=1 fi else dnl The system's strerror() cannot know about the new errno values we add dnl to . Replace it. REPLACE_STRERROR=1 fi if test $REPLACE_STRERROR = 1; then gl_PREREQ_STRERROR fi ]) # Prerequisites of lib/strerror.c. AC_DEFUN([gl_PREREQ_STRERROR], [ AC_CHECK_DECLS([strerror]) AC_CHECK_HEADERS_ONCE([sys/socket.h]) if test $ac_cv_header_sys_socket_h != yes; then dnl We cannot use AC_CHECK_HEADERS_ONCE here, because that would make dnl the check for those headers unconditional; yet cygwin reports dnl that the headers are present but cannot be compiled (since on dnl cygwin, all socket information should come from sys/socket.h). AC_CHECK_HEADERS([winsock2.h]) fi ]) libprelude-1.0.0/libmissing/m4/float_h.m40000664000076400007640000000101511341220435015120 00000000000000# float_h.m4 serial 3 dnl Copyright (C) 2007, 2009, 2010 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. AC_DEFUN([gl_FLOAT_H], [ AC_REQUIRE([AC_PROG_CC]) AC_REQUIRE([AC_CANONICAL_HOST]) FLOAT_H= case "$host_os" in beos* | openbsd*) FLOAT_H=float.h gl_CHECK_NEXT_HEADERS([float.h]) ;; esac AC_SUBST([FLOAT_H]) ]) libprelude-1.0.0/libmissing/m4/tm_gmtoff.m40000664000076400007640000000103511341220437015472 00000000000000# tm_gmtoff.m4 serial 3 dnl Copyright (C) 2002, 2009-2010 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. AC_DEFUN([gl_TM_GMTOFF], [ AC_CHECK_MEMBER([struct tm.tm_gmtoff], [AC_DEFINE([HAVE_TM_GMTOFF], [1], [Define if struct tm has the tm_gmtoff member.])], , [#include ]) ]) libprelude-1.0.0/libmissing/m4/pathmax.m40000664000076400007640000000067111341220436015156 00000000000000# pathmax.m4 serial 8 dnl Copyright (C) 2002-2003, 2005-2006, 2009-2010 Free Software Foundation, dnl Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. AC_DEFUN([gl_PATHMAX], [ dnl Prerequisites of lib/pathmax.h. AC_CHECK_FUNCS_ONCE([pathconf]) AC_CHECK_HEADERS_ONCE([sys/param.h]) ]) libprelude-1.0.0/libmissing/m4/stdlib_h.m40000664000076400007640000001047211341220436015304 00000000000000# stdlib_h.m4 serial 22 dnl Copyright (C) 2007-2010 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. AC_DEFUN([gl_STDLIB_H], [ AC_REQUIRE([gl_STDLIB_H_DEFAULTS]) gl_CHECK_NEXT_HEADERS([stdlib.h]) AC_CHECK_HEADERS([random.h], [], [], [AC_INCLUDES_DEFAULT]) if test $ac_cv_header_random_h = yes; then HAVE_RANDOM_H=1 else HAVE_RANDOM_H=0 fi AC_SUBST([HAVE_RANDOM_H]) AC_CHECK_TYPES([struct random_data], [], [HAVE_STRUCT_RANDOM_DATA=0], [[#include #if HAVE_RANDOM_H # include #endif ]]) dnl Check for declarations of anything we want to poison if the dnl corresponding gnulib module is not in use, and which is not dnl guaranteed by C89. gl_WARN_ON_USE_PREPARE([[#include #if HAVE_SYS_LOADAVG_H # include #endif #if HAVE_RANDOM_H # include #endif ]], [atoll canonicalize_file_name getloadavg getsubopt mkdtemp mkostemp mkostemps mkstemp mkstemps random_r initstat_r srandom_r setstate_r realpath rpmatch setenv strtod strtoll strtoull unsetenv]) ]) AC_DEFUN([gl_STDLIB_MODULE_INDICATOR], [ dnl Use AC_REQUIRE here, so that the default settings are expanded once only. AC_REQUIRE([gl_STDLIB_H_DEFAULTS]) GNULIB_[]m4_translit([$1],[abcdefghijklmnopqrstuvwxyz./-],[ABCDEFGHIJKLMNOPQRSTUVWXYZ___])=1 ]) AC_DEFUN([gl_STDLIB_H_DEFAULTS], [ GNULIB_ATOLL=0; AC_SUBST([GNULIB_ATOLL]) GNULIB_CALLOC_POSIX=0; AC_SUBST([GNULIB_CALLOC_POSIX]) GNULIB_CANONICALIZE_FILE_NAME=0; AC_SUBST([GNULIB_CANONICALIZE_FILE_NAME]) GNULIB_GETLOADAVG=0; AC_SUBST([GNULIB_GETLOADAVG]) GNULIB_GETSUBOPT=0; AC_SUBST([GNULIB_GETSUBOPT]) GNULIB_MALLOC_POSIX=0; AC_SUBST([GNULIB_MALLOC_POSIX]) GNULIB_MKDTEMP=0; AC_SUBST([GNULIB_MKDTEMP]) GNULIB_MKOSTEMP=0; AC_SUBST([GNULIB_MKOSTEMP]) GNULIB_MKOSTEMPS=0; AC_SUBST([GNULIB_MKOSTEMPS]) GNULIB_MKSTEMP=0; AC_SUBST([GNULIB_MKSTEMP]) GNULIB_MKSTEMPS=0; AC_SUBST([GNULIB_MKSTEMPS]) GNULIB_PUTENV=0; AC_SUBST([GNULIB_PUTENV]) GNULIB_RANDOM_R=0; AC_SUBST([GNULIB_RANDOM_R]) GNULIB_REALLOC_POSIX=0; AC_SUBST([GNULIB_REALLOC_POSIX]) GNULIB_REALPATH=0; AC_SUBST([GNULIB_REALPATH]) GNULIB_RPMATCH=0; AC_SUBST([GNULIB_RPMATCH]) GNULIB_SETENV=0; AC_SUBST([GNULIB_SETENV]) GNULIB_STRTOD=0; AC_SUBST([GNULIB_STRTOD]) GNULIB_STRTOLL=0; AC_SUBST([GNULIB_STRTOLL]) GNULIB_STRTOULL=0; AC_SUBST([GNULIB_STRTOULL]) GNULIB_UNSETENV=0; AC_SUBST([GNULIB_UNSETENV]) dnl Assume proper GNU behavior unless another module says otherwise. HAVE_ATOLL=1; AC_SUBST([HAVE_ATOLL]) HAVE_CALLOC_POSIX=1; AC_SUBST([HAVE_CALLOC_POSIX]) HAVE_CANONICALIZE_FILE_NAME=1; AC_SUBST([HAVE_CANONICALIZE_FILE_NAME]) HAVE_DECL_GETLOADAVG=1; AC_SUBST([HAVE_DECL_GETLOADAVG]) HAVE_GETSUBOPT=1; AC_SUBST([HAVE_GETSUBOPT]) HAVE_MALLOC_POSIX=1; AC_SUBST([HAVE_MALLOC_POSIX]) HAVE_MKDTEMP=1; AC_SUBST([HAVE_MKDTEMP]) HAVE_MKOSTEMP=1; AC_SUBST([HAVE_MKOSTEMP]) HAVE_MKOSTEMPS=1; AC_SUBST([HAVE_MKOSTEMPS]) HAVE_MKSTEMPS=1; AC_SUBST([HAVE_MKSTEMPS]) HAVE_RANDOM_R=1; AC_SUBST([HAVE_RANDOM_R]) HAVE_REALLOC_POSIX=1; AC_SUBST([HAVE_REALLOC_POSIX]) HAVE_REALPATH=1; AC_SUBST([HAVE_REALPATH]) HAVE_RPMATCH=1; AC_SUBST([HAVE_RPMATCH]) HAVE_SETENV=1; AC_SUBST([HAVE_SETENV]) HAVE_STRTOD=1; AC_SUBST([HAVE_STRTOD]) HAVE_STRTOLL=1; AC_SUBST([HAVE_STRTOLL]) HAVE_STRTOULL=1; AC_SUBST([HAVE_STRTOULL]) HAVE_STRUCT_RANDOM_DATA=1; AC_SUBST([HAVE_STRUCT_RANDOM_DATA]) HAVE_SYS_LOADAVG_H=0; AC_SUBST([HAVE_SYS_LOADAVG_H]) HAVE_UNSETENV=1; AC_SUBST([HAVE_UNSETENV]) REPLACE_CANONICALIZE_FILE_NAME=0; AC_SUBST([REPLACE_CANONICALIZE_FILE_NAME]) REPLACE_MKSTEMP=0; AC_SUBST([REPLACE_MKSTEMP]) REPLACE_PUTENV=0; AC_SUBST([REPLACE_PUTENV]) REPLACE_REALPATH=0; AC_SUBST([REPLACE_REALPATH]) REPLACE_SETENV=0; AC_SUBST([REPLACE_SETENV]) REPLACE_STRTOD=0; AC_SUBST([REPLACE_STRTOD]) REPLACE_UNSETENV=0; AC_SUBST([REPLACE_UNSETENV]) ]) libprelude-1.0.0/libmissing/m4/snprintf.m40000664000076400007640000000203411341220436015352 00000000000000# snprintf.m4 serial 5 dnl Copyright (C) 2002-2004, 2007-2010 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. AC_DEFUN([gl_FUNC_SNPRINTF], [ AC_REQUIRE([gl_STDIO_H_DEFAULTS]) gl_cv_func_snprintf_usable=no AC_CHECK_FUNCS([snprintf]) if test $ac_cv_func_snprintf = yes; then gl_SNPRINTF_SIZE1 case "$gl_cv_func_snprintf_size1" in *yes) gl_cv_func_snprintf_usable=yes ;; esac fi if test $gl_cv_func_snprintf_usable = no; then gl_REPLACE_SNPRINTF fi AC_CHECK_DECLS_ONCE([snprintf]) if test $ac_cv_have_decl_snprintf = no; then HAVE_DECL_SNPRINTF=0 fi ]) AC_DEFUN([gl_REPLACE_SNPRINTF], [ AC_REQUIRE([gl_STDIO_H_DEFAULTS]) AC_LIBOBJ([snprintf]) if test $ac_cv_func_snprintf = yes; then REPLACE_SNPRINTF=1 fi gl_PREREQ_SNPRINTF ]) # Prerequisites of lib/snprintf.c. AC_DEFUN([gl_PREREQ_SNPRINTF], [:]) libprelude-1.0.0/libmissing/m4/strptime.m40000664000076400007640000000104711341220436015361 00000000000000# strptime.m4 serial 5 dnl Copyright (C) 2007, 2009, 2010 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. AC_DEFUN([gl_FUNC_STRPTIME], [ AC_REQUIRE([gl_HEADER_TIME_H_DEFAULTS]) AC_REQUIRE([AC_C_RESTRICT]) AC_REPLACE_FUNCS([strptime]) AC_REQUIRE([gl_TM_GMTOFF]) if test $ac_cv_func_strptime = yes; then REPLACE_STRPTIME=0 else REPLACE_STRPTIME=1 fi ]) libprelude-1.0.0/libmissing/m4/memchr.m40000664000076400007640000000516311341220436014770 00000000000000# memchr.m4 serial 7 dnl Copyright (C) 2002-2004, 2009-2010 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. AC_DEFUN_ONCE([gl_FUNC_MEMCHR], [ dnl Check for prerequisites for memory fence checks. gl_FUNC_MMAP_ANON AC_CHECK_HEADERS_ONCE([sys/mman.h]) AC_CHECK_FUNCS_ONCE([mprotect]) dnl These days, we assume memchr is present. But just in case... AC_REQUIRE([gl_HEADER_STRING_H_DEFAULTS]) AC_REPLACE_FUNCS([memchr]) if test $ac_cv_func_memchr = no; then gl_PREREQ_MEMCHR REPLACE_MEMCHR=1 fi if test $ac_cv_func_memchr = yes; then # Detect platform-specific bugs in some versions of glibc: # memchr should not dereference anything with length 0 # http://bugzilla.redhat.com/499689 # memchr should not dereference overestimated length after a match # http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=521737 # http://sourceware.org/bugzilla/show_bug.cgi?id=10162 # Assume that memchr works on platforms that lack mprotect. AC_CACHE_CHECK([whether memchr works], [gl_cv_func_memchr_works], [AC_RUN_IFELSE([AC_LANG_PROGRAM([[ #include #if HAVE_SYS_MMAN_H # include # include # include # include # ifndef MAP_FILE # define MAP_FILE 0 # endif #endif ]], [[ char *fence = NULL; #if HAVE_SYS_MMAN_H && HAVE_MPROTECT # if HAVE_MAP_ANONYMOUS const int flags = MAP_ANONYMOUS | MAP_PRIVATE; const int fd = -1; # else /* !HAVE_MAP_ANONYMOUS */ const int flags = MAP_FILE | MAP_PRIVATE; int fd = open ("/dev/zero", O_RDONLY, 0666); if (fd >= 0) # endif { int pagesize = getpagesize (); char *two_pages = (char *) mmap (NULL, 2 * pagesize, PROT_READ | PROT_WRITE, flags, fd, 0); if (two_pages != (char *)(-1) && mprotect (two_pages + pagesize, pagesize, PROT_NONE) == 0) fence = two_pages + pagesize; } #endif if (fence) { if (memchr (fence, 0, 0)) return 1; strcpy (fence - 9, "12345678"); if (memchr (fence - 9, 0, 79) != fence - 1) return 2; } return 0; ]])], [gl_cv_func_memchr_works=yes], [gl_cv_func_memchr_works=no], [dnl Be pessimistic for now. gl_cv_func_memchr_works="guessing no"])]) if test "$gl_cv_func_memchr_works" != yes; then gl_PREREQ_MEMCHR REPLACE_MEMCHR=1 AC_LIBOBJ([memchr]) fi fi ]) # Prerequisites of lib/memchr.c. AC_DEFUN([gl_PREREQ_MEMCHR], [ AC_CHECK_HEADERS([bp-sym.h]) ]) libprelude-1.0.0/libmissing/m4/wchar_t.m40000664000076400007640000000135311341220437015142 00000000000000# wchar_t.m4 serial 3 (gettext-0.18) dnl Copyright (C) 2002-2003, 2008-2010 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. dnl From Bruno Haible. dnl Test whether has the 'wchar_t' type. dnl Prerequisite: AC_PROG_CC AC_DEFUN([gt_TYPE_WCHAR_T], [ AC_CACHE_CHECK([for wchar_t], [gt_cv_c_wchar_t], [AC_TRY_COMPILE([#include wchar_t foo = (wchar_t)'\0';], , [gt_cv_c_wchar_t=yes], [gt_cv_c_wchar_t=no])]) if test $gt_cv_c_wchar_t = yes; then AC_DEFINE([HAVE_WCHAR_T], [1], [Define if you have the 'wchar_t' type.]) fi ]) libprelude-1.0.0/libmissing/m4/hostent.m40000664000076400007640000000303311341220435015172 00000000000000# hostent.m4 serial 1 dnl Copyright (C) 2008, 2009, 2010 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. AC_DEFUN([gl_HOSTENT], [ dnl Where are gethostent(), sethostent(), endhostent(), gethostbyname(), dnl gethostbyaddr() defined? dnl - On Solaris, they are in libnsl. Ignore libxnet. dnl - On Haiku, they are in libnetwork. dnl - On BeOS, they are in libnet. dnl - On native Windows, they are in ws2_32.dll. dnl - Otherwise they are in libc. AC_REQUIRE([gl_HEADER_SYS_SOCKET])dnl for HAVE_SYS_SOCKET_H, HAVE_WINSOCK2_H HOSTENT_LIB= gl_saved_libs="$LIBS" AC_SEARCH_LIBS([gethostbyname], [nsl network net], [if test "$ac_cv_search_gethostbyname" != "none required"; then HOSTENT_LIB="$ac_cv_search_gethostbyname" fi]) LIBS="$gl_saved_libs" if test -z "$HOSTENT_LIB"; then AC_CHECK_FUNCS([gethostbyname], , [ AC_CACHE_CHECK([for gethostbyname in winsock2.h and -lws2_32], [gl_cv_w32_gethostbyname], [gl_cv_w32_gethostbyname=no gl_save_LIBS="$LIBS" LIBS="$LIBS -lws2_32" AC_TRY_LINK([ #ifdef HAVE_WINSOCK2_H #include #endif #include ], [gethostbyname(NULL);], [gl_cv_w32_gethostbyname=yes]) LIBS="$gl_save_LIBS" ]) if test "$gl_cv_w32_gethostbyname" = "yes"; then HOSTENT_LIB="-lws2_32" fi ]) fi AC_SUBST([HOSTENT_LIB]) ]) libprelude-1.0.0/libmissing/m4/select.m40000664000076400007640000000311511341220436014767 00000000000000# select.m4 serial 3 dnl Copyright (C) 2009, 2010 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. AC_DEFUN([gl_FUNC_SELECT], [ AC_REQUIRE([gl_HEADER_SYS_SELECT]) AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles AC_REQUIRE([gl_SOCKETS]) if test "$ac_cv_header_winsock2_h" = yes; then AC_LIBOBJ([select]) else dnl On Interix 3.5, select(0, NULL, NULL, NULL, timeout) fails with error dnl EFAULT. AC_CHECK_HEADERS_ONCE([sys/select.h]) AC_CACHE_CHECK([whether select supports a 0 argument], [gl_cv_func_select_supports0], [ AC_RUN_IFELSE([AC_LANG_SOURCE([[ #include #include #if HAVE_SYS_SELECT_H #include #endif int main () { struct timeval timeout; timeout.tv_sec = 0; timeout.tv_usec = 5; return select (0, (fd_set *)0, (fd_set *)0, (fd_set *)0, &timeout) < 0; }]])], [gl_cv_func_select_supports0=yes], [gl_cv_func_select_supports0=no], [ changequote(,)dnl case "$host_os" in # Guess no on Interix. interix*) gl_cv_func_select_supports0="guessing no";; # Guess yes otherwise. *) gl_cv_func_select_supports0="guessing yes";; esac changequote([,])dnl ]) ]) case "$gl_cv_func_select_supports0" in *yes) ;; *) REPLACE_SELECT=1 AC_LIBOBJ([select]) ;; esac fi ]) libprelude-1.0.0/libmissing/m4/realloc.m40000664000076400007640000000143411341220436015133 00000000000000# realloc.m4 serial 9 dnl Copyright (C) 2007, 2009, 2010 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. # gl_FUNC_REALLOC_POSIX # --------------------- # Test whether 'realloc' is POSIX compliant (sets errno to ENOMEM when it # fails), and replace realloc if it is not. AC_DEFUN([gl_FUNC_REALLOC_POSIX], [ AC_REQUIRE([gl_CHECK_MALLOC_POSIX]) if test $gl_cv_func_malloc_posix = yes; then HAVE_REALLOC_POSIX=1 AC_DEFINE([HAVE_REALLOC_POSIX], [1], [Define if the 'realloc' function is POSIX compliant.]) else AC_LIBOBJ([realloc]) HAVE_REALLOC_POSIX=0 fi AC_SUBST([HAVE_REALLOC_POSIX]) ]) libprelude-1.0.0/libmissing/m4/time_h.m40000664000076400007640000000517011341220437014761 00000000000000# Configure a more-standard replacement for . # Copyright (C) 2000-2001, 2003-2007, 2009-2010 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. # Written by Paul Eggert and Jim Meyering. AC_DEFUN([gl_HEADER_TIME_H], [ dnl Use AC_REQUIRE here, so that the default behavior below is expanded dnl once only, before all statements that occur in other macros. AC_REQUIRE([gl_HEADER_TIME_H_BODY]) ]) AC_DEFUN([gl_HEADER_TIME_H_BODY], [ AC_REQUIRE([AC_C_RESTRICT]) AC_REQUIRE([gl_HEADER_TIME_H_DEFAULTS]) gl_CHECK_NEXT_HEADERS([time.h]) AC_REQUIRE([gl_CHECK_TYPE_STRUCT_TIMESPEC]) ]) AC_DEFUN([gl_HEADER_TIME_H_DEFAULTS], [ dnl If another module says to replace or to not replace, do that. dnl Otherwise, replace only if someone compiles with -DGNULIB_PORTCHECK; dnl this lets maintainers check for portability. REPLACE_LOCALTIME_R=GNULIB_PORTCHECK; AC_SUBST([REPLACE_LOCALTIME_R]) REPLACE_MKTIME=GNULIB_PORTCHECK; AC_SUBST([REPLACE_MKTIME]) REPLACE_NANOSLEEP=GNULIB_PORTCHECK; AC_SUBST([REPLACE_NANOSLEEP]) REPLACE_STRPTIME=GNULIB_PORTCHECK; AC_SUBST([REPLACE_STRPTIME]) REPLACE_TIMEGM=GNULIB_PORTCHECK; AC_SUBST([REPLACE_TIMEGM]) ]) dnl Define HAVE_STRUCT_TIMESPEC if `struct timespec' is declared dnl in time.h or sys/time.h. AC_DEFUN([gl_CHECK_TYPE_STRUCT_TIMESPEC], [ AC_CHECK_HEADERS_ONCE([sys/time.h]) AC_CACHE_CHECK([for struct timespec in ], [gl_cv_sys_struct_timespec_in_time_h], [AC_COMPILE_IFELSE( [AC_LANG_PROGRAM( [[#include ]], [[static struct timespec x; x.tv_sec = x.tv_nsec;]])], [gl_cv_sys_struct_timespec_in_time_h=yes], [gl_cv_sys_struct_timespec_in_time_h=no])]) TIME_H_DEFINES_STRUCT_TIMESPEC=0 SYS_TIME_H_DEFINES_STRUCT_TIMESPEC=0 if test $gl_cv_sys_struct_timespec_in_time_h = yes; then TIME_H_DEFINES_STRUCT_TIMESPEC=1 else AC_CACHE_CHECK([for struct timespec in ], [gl_cv_sys_struct_timespec_in_sys_time_h], [AC_COMPILE_IFELSE( [AC_LANG_PROGRAM( [[#include ]], [[static struct timespec x; x.tv_sec = x.tv_nsec;]])], [gl_cv_sys_struct_timespec_in_sys_time_h=yes], [gl_cv_sys_struct_timespec_in_sys_time_h=no])]) if test $gl_cv_sys_struct_timespec_in_sys_time_h = yes; then SYS_TIME_H_DEFINES_STRUCT_TIMESPEC=1 fi fi AC_SUBST([TIME_H_DEFINES_STRUCT_TIMESPEC]) AC_SUBST([SYS_TIME_H_DEFINES_STRUCT_TIMESPEC]) ]) libprelude-1.0.0/libmissing/m4/wctype.m40000664000076400007640000000515511341220437015032 00000000000000# wctype.m4 serial 4 dnl A placeholder for ISO C99 , for platforms that lack it. dnl Copyright (C) 2006-2010 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. dnl Written by Paul Eggert. AC_DEFUN([gl_WCTYPE_H], [ AC_REQUIRE([AC_PROG_CC]) AC_REQUIRE([AC_CANONICAL_HOST]) AC_CHECK_FUNCS_ONCE([iswcntrl]) if test $ac_cv_func_iswcntrl = yes; then HAVE_ISWCNTRL=1 else HAVE_ISWCNTRL=0 fi AC_SUBST([HAVE_ISWCNTRL]) AC_CHECK_HEADERS_ONCE([wctype.h]) AC_REQUIRE([AC_C_INLINE]) AC_REQUIRE([gt_TYPE_WINT_T]) if test $gt_cv_c_wint_t = yes; then HAVE_WINT_T=1 else HAVE_WINT_T=0 fi AC_SUBST([HAVE_WINT_T]) WCTYPE_H=wctype.h if test $ac_cv_header_wctype_h = yes; then if test $ac_cv_func_iswcntrl = yes; then dnl Linux libc5 has an iswprint function that returns 0 for all arguments. dnl The other functions are likely broken in the same way. AC_CACHE_CHECK([whether iswcntrl works], [gl_cv_func_iswcntrl_works], [ AC_RUN_IFELSE([AC_LANG_SOURCE([[ #include #include #include #include #include int main () { return iswprint ('x') == 0; }]])], [gl_cv_func_iswcntrl_works=yes], [gl_cv_func_iswcntrl_works=no], [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include #if __GNU_LIBRARY__ == 1 Linux libc5 i18n is broken. #endif]], [])], [gl_cv_func_iswcntrl_works=yes], [gl_cv_func_iswcntrl_works=no]) ]) ]) if test $gl_cv_func_iswcntrl_works = yes; then case "$host_os" in mingw*) dnl On mingw, towlower and towupper return random high 16 bits. ;; *) dnl iswcntrl works. towlower and towupper work as well. WCTYPE_H= ;; esac fi fi dnl Compute NEXT_WCTYPE_H even if WCTYPE_H is empty, dnl for the benefit of builds from non-distclean directories. gl_CHECK_NEXT_HEADERS([wctype.h]) HAVE_WCTYPE_H=1 else HAVE_WCTYPE_H=0 fi AC_SUBST([HAVE_WCTYPE_H]) AC_SUBST([WCTYPE_H]) if test "$gl_cv_func_iswcntrl_works" = no; then REPLACE_ISWCNTRL=1 else REPLACE_ISWCNTRL=0 fi AC_SUBST([REPLACE_ISWCNTRL]) ]) libprelude-1.0.0/libmissing/m4/signal_h.m40000664000076400007640000000367411341220436015306 00000000000000# signal_h.m4 serial 9 dnl Copyright (C) 2007, 2008, 2009, 2010 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. AC_DEFUN([gl_SIGNAL_H], [ AC_REQUIRE([gl_SIGNAL_H_DEFAULTS]) gl_CHECK_NEXT_HEADERS([signal.h]) # AIX declares sig_atomic_t to already include volatile, and C89 compilers # then choke on 'volatile sig_atomic_t'. C99 requires that it compile. AC_CHECK_TYPE([volatile sig_atomic_t], [], [HAVE_TYPE_VOLATILE_SIG_ATOMIC_T=0], [[ #include ]]) AC_REQUIRE([AC_TYPE_UID_T]) dnl Check for declarations of anything we want to poison if the dnl corresponding gnulib module is not in use. gl_WARN_ON_USE_PREPARE([[#include ]], [sigaction sigaddset sigdelset sigemptyset sigfillset sigismember sigpending sigprocmask]) ]) AC_DEFUN([gl_SIGNAL_MODULE_INDICATOR], [ dnl Use AC_REQUIRE here, so that the default settings are expanded once only. AC_REQUIRE([gl_SIGNAL_H_DEFAULTS]) GNULIB_[]m4_translit([$1],[abcdefghijklmnopqrstuvwxyz./-],[ABCDEFGHIJKLMNOPQRSTUVWXYZ___])=1 ]) AC_DEFUN([gl_SIGNAL_H_DEFAULTS], [ GNULIB_SIGNAL_H_SIGPIPE=0; AC_SUBST([GNULIB_SIGNAL_H_SIGPIPE]) GNULIB_SIGPROCMASK=0; AC_SUBST([GNULIB_SIGPROCMASK]) GNULIB_SIGACTION=0; AC_SUBST([GNULIB_SIGACTION]) dnl Assume proper GNU behavior unless another module says otherwise. HAVE_POSIX_SIGNALBLOCKING=1; AC_SUBST([HAVE_POSIX_SIGNALBLOCKING]) HAVE_SIGSET_T=1; AC_SUBST([HAVE_SIGSET_T]) HAVE_SIGINFO_T=1; AC_SUBST([HAVE_SIGINFO_T]) HAVE_SIGACTION=1; AC_SUBST([HAVE_SIGACTION]) HAVE_STRUCT_SIGACTION_SA_SIGACTION=1; AC_SUBST([HAVE_STRUCT_SIGACTION_SA_SIGACTION]) HAVE_TYPE_VOLATILE_SIG_ATOMIC_T=1; AC_SUBST([HAVE_TYPE_VOLATILE_SIG_ATOMIC_T]) ]) libprelude-1.0.0/libmissing/m4/stdio_h.m40000664000076400007640000001642711341220436015153 00000000000000# stdio_h.m4 serial 25 dnl Copyright (C) 2007-2010 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. AC_DEFUN([gl_STDIO_H], [ AC_REQUIRE([gl_STDIO_H_DEFAULTS]) AC_REQUIRE([AC_C_INLINE]) gl_CHECK_NEXT_HEADERS([stdio.h]) dnl No need to create extra modules for these functions. Everyone who uses dnl likely needs them. GNULIB_FPRINTF=1 GNULIB_PRINTF=1 GNULIB_VFPRINTF=1 GNULIB_VPRINTF=1 GNULIB_FPUTC=1 GNULIB_PUTC=1 GNULIB_PUTCHAR=1 GNULIB_FPUTS=1 GNULIB_PUTS=1 GNULIB_FWRITE=1 dnl This ifdef is just an optimization, to avoid performing a configure dnl check whose result is not used. It does not make the test of dnl GNULIB_STDIO_H_SIGPIPE or GNULIB_SIGPIPE redundant. m4_ifdef([gl_SIGNAL_SIGPIPE], [ gl_SIGNAL_SIGPIPE if test $gl_cv_header_signal_h_SIGPIPE != yes; then REPLACE_STDIO_WRITE_FUNCS=1 AC_LIBOBJ([stdio-write]) fi ]) dnl Check for declarations of anything we want to poison if the dnl corresponding gnulib module is not in use, and which is not dnl guaranteed by C89. gl_WARN_ON_USE_PREPARE([[#include ]], [dprintf fpurge fseeko ftello getdelim getline popen renameat snprintf vdprintf vsnprintf]) ]) AC_DEFUN([gl_STDIO_MODULE_INDICATOR], [ dnl Use AC_REQUIRE here, so that the default settings are expanded once only. AC_REQUIRE([gl_STDIO_H_DEFAULTS]) GNULIB_[]m4_translit([$1],[abcdefghijklmnopqrstuvwxyz./-],[ABCDEFGHIJKLMNOPQRSTUVWXYZ___])=1 ]) AC_DEFUN([gl_STDIO_H_DEFAULTS], [ GNULIB_DPRINTF=0; AC_SUBST([GNULIB_DPRINTF]) GNULIB_FCLOSE=0; AC_SUBST([GNULIB_FCLOSE]) GNULIB_FFLUSH=0; AC_SUBST([GNULIB_FFLUSH]) GNULIB_FOPEN=0; AC_SUBST([GNULIB_FOPEN]) GNULIB_FPRINTF=0; AC_SUBST([GNULIB_FPRINTF]) GNULIB_FPRINTF_POSIX=0; AC_SUBST([GNULIB_FPRINTF_POSIX]) GNULIB_FPURGE=0; AC_SUBST([GNULIB_FPURGE]) GNULIB_FPUTC=0; AC_SUBST([GNULIB_FPUTC]) GNULIB_FPUTS=0; AC_SUBST([GNULIB_FPUTS]) GNULIB_FREOPEN=0; AC_SUBST([GNULIB_FREOPEN]) GNULIB_FSEEK=0; AC_SUBST([GNULIB_FSEEK]) GNULIB_FSEEKO=0; AC_SUBST([GNULIB_FSEEKO]) GNULIB_FTELL=0; AC_SUBST([GNULIB_FTELL]) GNULIB_FTELLO=0; AC_SUBST([GNULIB_FTELLO]) GNULIB_FWRITE=0; AC_SUBST([GNULIB_FWRITE]) GNULIB_GETDELIM=0; AC_SUBST([GNULIB_GETDELIM]) GNULIB_GETLINE=0; AC_SUBST([GNULIB_GETLINE]) GNULIB_OBSTACK_PRINTF=0; AC_SUBST([GNULIB_OBSTACK_PRINTF]) GNULIB_OBSTACK_PRINTF_POSIX=0; AC_SUBST([GNULIB_OBSTACK_PRINTF_POSIX]) GNULIB_PERROR=0; AC_SUBST([GNULIB_PERROR]) GNULIB_POPEN=0; AC_SUBST([GNULIB_POPEN]) GNULIB_PRINTF=0; AC_SUBST([GNULIB_PRINTF]) GNULIB_PRINTF_POSIX=0; AC_SUBST([GNULIB_PRINTF_POSIX]) GNULIB_PUTC=0; AC_SUBST([GNULIB_PUTC]) GNULIB_PUTCHAR=0; AC_SUBST([GNULIB_PUTCHAR]) GNULIB_PUTS=0; AC_SUBST([GNULIB_PUTS]) GNULIB_REMOVE=0; AC_SUBST([GNULIB_REMOVE]) GNULIB_RENAME=0; AC_SUBST([GNULIB_RENAME]) GNULIB_RENAMEAT=0; AC_SUBST([GNULIB_RENAMEAT]) GNULIB_SNPRINTF=0; AC_SUBST([GNULIB_SNPRINTF]) GNULIB_SPRINTF_POSIX=0; AC_SUBST([GNULIB_SPRINTF_POSIX]) GNULIB_STDIO_H_SIGPIPE=0; AC_SUBST([GNULIB_STDIO_H_SIGPIPE]) GNULIB_VASPRINTF=0; AC_SUBST([GNULIB_VASPRINTF]) GNULIB_VDPRINTF=0; AC_SUBST([GNULIB_VDPRINTF]) GNULIB_VFPRINTF=0; AC_SUBST([GNULIB_VFPRINTF]) GNULIB_VFPRINTF_POSIX=0; AC_SUBST([GNULIB_VFPRINTF_POSIX]) GNULIB_VPRINTF=0; AC_SUBST([GNULIB_VPRINTF]) GNULIB_VPRINTF_POSIX=0; AC_SUBST([GNULIB_VPRINTF_POSIX]) GNULIB_VSNPRINTF=0; AC_SUBST([GNULIB_VSNPRINTF]) GNULIB_VSPRINTF_POSIX=0; AC_SUBST([GNULIB_VSPRINTF_POSIX]) dnl Assume proper GNU behavior unless another module says otherwise. HAVE_DECL_FPURGE=1; AC_SUBST([HAVE_DECL_FPURGE]) HAVE_DECL_GETDELIM=1; AC_SUBST([HAVE_DECL_GETDELIM]) HAVE_DECL_GETLINE=1; AC_SUBST([HAVE_DECL_GETLINE]) HAVE_DECL_OBSTACK_PRINTF=1; AC_SUBST([HAVE_DECL_OBSTACK_PRINTF]) HAVE_DECL_SNPRINTF=1; AC_SUBST([HAVE_DECL_SNPRINTF]) HAVE_DECL_VSNPRINTF=1; AC_SUBST([HAVE_DECL_VSNPRINTF]) HAVE_DPRINTF=1; AC_SUBST([HAVE_DPRINTF]) HAVE_RENAMEAT=1; AC_SUBST([HAVE_RENAMEAT]) HAVE_VASPRINTF=1; AC_SUBST([HAVE_VASPRINTF]) HAVE_VDPRINTF=1; AC_SUBST([HAVE_VDPRINTF]) REPLACE_DPRINTF=0; AC_SUBST([REPLACE_DPRINTF]) REPLACE_FCLOSE=0; AC_SUBST([REPLACE_FCLOSE]) REPLACE_FFLUSH=0; AC_SUBST([REPLACE_FFLUSH]) REPLACE_FOPEN=0; AC_SUBST([REPLACE_FOPEN]) REPLACE_FPRINTF=0; AC_SUBST([REPLACE_FPRINTF]) REPLACE_FPURGE=0; AC_SUBST([REPLACE_FPURGE]) REPLACE_FREOPEN=0; AC_SUBST([REPLACE_FREOPEN]) REPLACE_FSEEK=0; AC_SUBST([REPLACE_FSEEK]) REPLACE_FSEEKO=0; AC_SUBST([REPLACE_FSEEKO]) REPLACE_FTELL=0; AC_SUBST([REPLACE_FTELL]) REPLACE_FTELLO=0; AC_SUBST([REPLACE_FTELLO]) REPLACE_GETDELIM=0; AC_SUBST([REPLACE_GETDELIM]) REPLACE_GETLINE=0; AC_SUBST([REPLACE_GETLINE]) REPLACE_OBSTACK_PRINTF=0; AC_SUBST([REPLACE_OBSTACK_PRINTF]) REPLACE_PERROR=0; AC_SUBST([REPLACE_PERROR]) REPLACE_POPEN=0; AC_SUBST([REPLACE_POPEN]) REPLACE_PRINTF=0; AC_SUBST([REPLACE_PRINTF]) REPLACE_REMOVE=0; AC_SUBST([REPLACE_REMOVE]) REPLACE_RENAME=0; AC_SUBST([REPLACE_RENAME]) REPLACE_RENAMEAT=0; AC_SUBST([REPLACE_RENAMEAT]) REPLACE_SNPRINTF=0; AC_SUBST([REPLACE_SNPRINTF]) REPLACE_SPRINTF=0; AC_SUBST([REPLACE_SPRINTF]) REPLACE_STDIO_WRITE_FUNCS=0; AC_SUBST([REPLACE_STDIO_WRITE_FUNCS]) REPLACE_VASPRINTF=0; AC_SUBST([REPLACE_VASPRINTF]) REPLACE_VDPRINTF=0; AC_SUBST([REPLACE_VDPRINTF]) REPLACE_VFPRINTF=0; AC_SUBST([REPLACE_VFPRINTF]) REPLACE_VPRINTF=0; AC_SUBST([REPLACE_VPRINTF]) REPLACE_VSNPRINTF=0; AC_SUBST([REPLACE_VSNPRINTF]) REPLACE_VSPRINTF=0; AC_SUBST([REPLACE_VSPRINTF]) ]) dnl Code shared by fseeko and ftello. Determine if large files are supported, dnl but stdin does not start as a large file by default. AC_DEFUN([gl_STDIN_LARGE_OFFSET], [ AC_CACHE_CHECK([whether stdin defaults to large file offsets], [gl_cv_var_stdin_large_offset], [AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include ]], [[#if defined __SL64 && defined __SCLE /* cygwin */ /* Cygwin 1.5.24 and earlier fail to put stdin in 64-bit mode, making fseeko/ftello needlessly fail. This bug was fixed in 1.5.25, and it is easier to do a version check than building a runtime test. */ # include # if CYGWIN_VERSION_DLL_COMBINED < CYGWIN_VERSION_DLL_MAKE_COMBINED (1005, 25) choke me # endif #endif]])], [gl_cv_var_stdin_large_offset=yes], [gl_cv_var_stdin_large_offset=no])]) ]) libprelude-1.0.0/libmissing/m4/errno_h.m40000664000076400007640000000554511341220435015154 00000000000000# errno_h.m4 serial 6 dnl Copyright (C) 2004, 2006, 2008, 2009, 2010 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. AC_DEFUN_ONCE([gl_HEADER_ERRNO_H], [ AC_REQUIRE([AC_PROG_CC]) AC_CACHE_CHECK([for complete errno.h], [gl_cv_header_errno_h_complete], [ AC_EGREP_CPP([booboo],[ #include #if !defined ENOMSG booboo #endif #if !defined EIDRM booboo #endif #if !defined ENOLINK booboo #endif #if !defined EPROTO booboo #endif #if !defined EMULTIHOP booboo #endif #if !defined EBADMSG booboo #endif #if !defined EOVERFLOW booboo #endif #if !defined ENOTSUP booboo #endif #if !defined ESTALE booboo #endif #if !defined ECANCELED booboo #endif ], [gl_cv_header_errno_h_complete=no], [gl_cv_header_errno_h_complete=yes]) ]) if test $gl_cv_header_errno_h_complete = yes; then ERRNO_H='' else gl_CHECK_NEXT_HEADERS([errno.h]) ERRNO_H='errno.h' fi AC_SUBST([ERRNO_H]) gl_REPLACE_ERRNO_VALUE([EMULTIHOP]) gl_REPLACE_ERRNO_VALUE([ENOLINK]) gl_REPLACE_ERRNO_VALUE([EOVERFLOW]) ]) # Assuming $1 = EOVERFLOW. # The EOVERFLOW errno value ought to be defined in , according to # POSIX. But some systems (like OpenBSD 4.0 or AIX 3) don't define it, and # some systems (like OSF/1) define it when _XOPEN_SOURCE_EXTENDED is defined. # Check for the value of EOVERFLOW. # Set the variables EOVERFLOW_HIDDEN and EOVERFLOW_VALUE. AC_DEFUN([gl_REPLACE_ERRNO_VALUE], [ if test -n "$ERRNO_H"; then AC_CACHE_CHECK([for ]$1[ value], [gl_cv_header_errno_h_]$1, [ AC_EGREP_CPP([yes],[ #include #ifdef ]$1[ yes #endif ], [gl_cv_header_errno_h_]$1[=yes], [gl_cv_header_errno_h_]$1[=no]) if test $gl_cv_header_errno_h_]$1[ = no; then AC_EGREP_CPP([yes],[ #define _XOPEN_SOURCE_EXTENDED 1 #include #ifdef ]$1[ yes #endif ], [gl_cv_header_errno_h_]$1[=hidden]) if test $gl_cv_header_errno_h_]$1[ = hidden; then dnl The macro exists but is hidden. dnl Define it to the same value. AC_COMPUTE_INT([gl_cv_header_errno_h_]$1, $1, [ #define _XOPEN_SOURCE_EXTENDED 1 #include /* The following two lines are a workaround against an autoconf-2.52 bug. */ #include #include ]) fi fi ]) case $gl_cv_header_errno_h_]$1[ in yes | no) ]$1[_HIDDEN=0; ]$1[_VALUE= ;; *) ]$1[_HIDDEN=1; ]$1[_VALUE="$gl_cv_header_errno_h_]$1[" ;; esac AC_SUBST($1[_HIDDEN]) AC_SUBST($1[_VALUE]) fi ]) dnl Autoconf >= 2.61 has AC_COMPUTE_INT built-in. dnl Remove this when we can assume autoconf >= 2.61. m4_ifdef([AC_COMPUTE_INT], [], [ AC_DEFUN([AC_COMPUTE_INT], [_AC_COMPUTE_INT([$2],[$1],[$3],[$4])]) ]) libprelude-1.0.0/libmissing/m4/uname.m40000664000076400007640000000102011341220437014607 00000000000000# uname.m4 serial 10 dnl Copyright (C) 2009, 2010 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. AC_DEFUN([gl_FUNC_UNAME], [ AC_REQUIRE([gl_SYS_UTSNAME_H_DEFAULTS]) AC_REPLACE_FUNCS([uname]) if test $ac_cv_func_uname = no; then HAVE_UNAME=0 gl_PREREQ_UNAME fi ]) # Prerequisites of lib/uname.c. AC_DEFUN([gl_PREREQ_UNAME], [ : ]) libprelude-1.0.0/libmissing/m4/mbrtowc.m40000664000076400007640000002576311341220436015202 00000000000000# mbrtowc.m4 serial 16 dnl Copyright (C) 2001-2002, 2004-2005, 2008-2010 Free Software Foundation, dnl Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. AC_DEFUN([gl_FUNC_MBRTOWC], [ AC_REQUIRE([gl_WCHAR_H_DEFAULTS]) AC_REQUIRE([AC_TYPE_MBSTATE_T]) gl_MBSTATE_T_BROKEN if test $REPLACE_MBSTATE_T = 1; then REPLACE_MBRTOWC=1 fi AC_CHECK_FUNCS_ONCE([mbrtowc]) if test $ac_cv_func_mbrtowc = no; then HAVE_MBRTOWC=0 fi if test $HAVE_MBRTOWC != 0 && test $REPLACE_MBRTOWC != 1; then gl_MBRTOWC_NULL_ARG gl_MBRTOWC_RETVAL gl_MBRTOWC_NUL_RETVAL case "$gl_cv_func_mbrtowc_null_arg" in *yes) ;; *) AC_DEFINE([MBRTOWC_NULL_ARG_BUG], [1], [Define if the mbrtowc function has the NULL string argument bug.]) REPLACE_MBRTOWC=1 ;; esac case "$gl_cv_func_mbrtowc_retval" in *yes) ;; *) AC_DEFINE([MBRTOWC_RETVAL_BUG], [1], [Define if the mbrtowc function returns a wrong return value.]) REPLACE_MBRTOWC=1 ;; esac case "$gl_cv_func_mbrtowc_nul_retval" in *yes) ;; *) AC_DEFINE([MBRTOWC_NUL_RETVAL_BUG], [1], [Define if the mbrtowc function does not return 0 for a NUL character.]) REPLACE_MBRTOWC=1 ;; esac fi if test $HAVE_MBRTOWC = 0 || test $REPLACE_MBRTOWC = 1; then gl_REPLACE_WCHAR_H AC_LIBOBJ([mbrtowc]) gl_PREREQ_MBRTOWC fi ]) dnl Test whether mbsinit() and mbrtowc() need to be overridden in a way that dnl redefines the semantics of the given mbstate_t type. dnl Result is REPLACE_MBSTATE_T. dnl When this is set to 1, we replace both mbsinit() and mbrtowc(), in order to dnl avoid inconsistencies. AC_DEFUN([gl_MBSTATE_T_BROKEN], [ AC_REQUIRE([gl_WCHAR_H_DEFAULTS]) AC_REQUIRE([AC_TYPE_MBSTATE_T]) AC_CHECK_FUNCS_ONCE([mbsinit]) AC_CHECK_FUNCS_ONCE([mbrtowc]) if test $ac_cv_func_mbsinit = yes && test $ac_cv_func_mbrtowc = yes; then gl_MBRTOWC_INCOMPLETE_STATE gl_MBRTOWC_SANITYCHECK REPLACE_MBSTATE_T=0 case "$gl_cv_func_mbrtowc_incomplete_state" in *yes) ;; *) REPLACE_MBSTATE_T=1 ;; esac case "$gl_cv_func_mbrtowc_sanitycheck" in *yes) ;; *) REPLACE_MBSTATE_T=1 ;; esac else REPLACE_MBSTATE_T=1 fi if test $REPLACE_MBSTATE_T = 1; then gl_REPLACE_WCHAR_H fi ]) dnl Test whether mbrtowc puts the state into non-initial state when parsing an dnl incomplete multibyte character. dnl Result is gl_cv_func_mbrtowc_incomplete_state. AC_DEFUN([gl_MBRTOWC_INCOMPLETE_STATE], [ AC_REQUIRE([AC_PROG_CC]) AC_REQUIRE([gt_LOCALE_JA]) AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles AC_CACHE_CHECK([whether mbrtowc handles incomplete characters], [gl_cv_func_mbrtowc_incomplete_state], [ dnl Initial guess, used when cross-compiling or when no suitable locale dnl is present. changequote(,)dnl case "$host_os" in # Guess no on AIX and OSF/1. osf*) gl_cv_func_mbrtowc_incomplete_state="guessing no" ;; # Guess yes otherwise. *) gl_cv_func_mbrtowc_incomplete_state="guessing yes" ;; esac changequote([,])dnl if test $LOCALE_JA != none; then AC_TRY_RUN([ #include #include #include int main () { if (setlocale (LC_ALL, "$LOCALE_JA") != NULL) { const char input[] = "B\217\253\344\217\251\316er"; /* "Büßer" */ mbstate_t state; wchar_t wc; memset (&state, '\0', sizeof (mbstate_t)); if (mbrtowc (&wc, input + 1, 1, &state) == (size_t)(-2)) if (mbsinit (&state)) return 1; } return 0; }], [gl_cv_func_mbrtowc_incomplete_state=yes], [gl_cv_func_mbrtowc_incomplete_state=no], [:]) fi ]) ]) dnl Test whether mbrtowc works not worse than mbtowc. dnl Result is gl_cv_func_mbrtowc_sanitycheck. AC_DEFUN([gl_MBRTOWC_SANITYCHECK], [ AC_REQUIRE([AC_PROG_CC]) AC_REQUIRE([gt_LOCALE_ZH_CN]) AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles AC_CACHE_CHECK([whether mbrtowc works as well as mbtowc], [gl_cv_func_mbrtowc_sanitycheck], [ dnl Initial guess, used when cross-compiling or when no suitable locale dnl is present. changequote(,)dnl case "$host_os" in # Guess no on Solaris 8. solaris2.8) gl_cv_func_mbrtowc_sanitycheck="guessing no" ;; # Guess yes otherwise. *) gl_cv_func_mbrtowc_sanitycheck="guessing yes" ;; esac changequote([,])dnl if test $LOCALE_ZH_CN != none; then AC_TRY_RUN([ #include #include #include #include int main () { /* This fails on Solaris 8: mbrtowc returns 2, and sets wc to 0x00F0. mbtowc returns 4 (correct) and sets wc to 0x5EDC. */ if (setlocale (LC_ALL, "$LOCALE_ZH_CN") != NULL) { char input[] = "B\250\271\201\060\211\070er"; /* "Büßer" */ mbstate_t state; wchar_t wc; memset (&state, '\0', sizeof (mbstate_t)); if (mbrtowc (&wc, input + 3, 6, &state) != 4 && mbtowc (&wc, input + 3, 6) == 4) return 1; } return 0; }], [gl_cv_func_mbrtowc_sanitycheck=yes], [gl_cv_func_mbrtowc_sanitycheck=no], [:]) fi ]) ]) dnl Test whether mbrtowc supports a NULL string argument correctly. dnl Result is gl_cv_func_mbrtowc_null_arg. AC_DEFUN([gl_MBRTOWC_NULL_ARG], [ AC_REQUIRE([AC_PROG_CC]) AC_REQUIRE([gt_LOCALE_FR_UTF8]) AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles AC_CACHE_CHECK([whether mbrtowc handles a NULL string argument], [gl_cv_func_mbrtowc_null_arg], [ dnl Initial guess, used when cross-compiling or when no suitable locale dnl is present. changequote(,)dnl case "$host_os" in # Guess no on OSF/1. osf*) gl_cv_func_mbrtowc_null_arg="guessing no" ;; # Guess yes otherwise. *) gl_cv_func_mbrtowc_null_arg="guessing yes" ;; esac changequote([,])dnl if test $LOCALE_FR_UTF8 != none; then AC_TRY_RUN([ #include #include #include int main () { if (setlocale (LC_ALL, "$LOCALE_FR_UTF8") != NULL) { mbstate_t state; wchar_t wc; int ret; memset (&state, '\0', sizeof (mbstate_t)); wc = (wchar_t) 0xBADFACE; mbrtowc (&wc, NULL, 5, &state); /* Check that wc was not modified. */ if (wc != (wchar_t) 0xBADFACE) return 1; } return 0; }], [gl_cv_func_mbrtowc_null_arg=yes], [gl_cv_func_mbrtowc_null_arg=no], [:]) fi ]) ]) dnl Test whether mbrtowc, when parsing the end of a multibyte character, dnl correctly returns the number of bytes that were needed to complete the dnl character (not the total number of bytes of the multibyte character). dnl Result is gl_cv_func_mbrtowc_retval. AC_DEFUN([gl_MBRTOWC_RETVAL], [ AC_REQUIRE([AC_PROG_CC]) AC_REQUIRE([gt_LOCALE_FR_UTF8]) AC_REQUIRE([gt_LOCALE_JA]) AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles AC_CACHE_CHECK([whether mbrtowc has a correct return value], [gl_cv_func_mbrtowc_retval], [ dnl Initial guess, used when cross-compiling or when no suitable locale dnl is present. changequote(,)dnl case "$host_os" in # Guess no on HP-UX and Solaris. hpux* | solaris*) gl_cv_func_mbrtowc_retval="guessing no" ;; # Guess yes otherwise. *) gl_cv_func_mbrtowc_retval="guessing yes" ;; esac changequote([,])dnl if test $LOCALE_FR_UTF8 != none || test $LOCALE_JA != none; then AC_TRY_RUN([ #include #include #include int main () { /* This fails on Solaris. */ if (setlocale (LC_ALL, "$LOCALE_FR_UTF8") != NULL) { char input[] = "B\303\274\303\237er"; /* "Büßer" */ mbstate_t state; wchar_t wc; memset (&state, '\0', sizeof (mbstate_t)); if (mbrtowc (&wc, input + 1, 1, &state) == (size_t)(-2)) { input[1] = '\0'; if (mbrtowc (&wc, input + 2, 5, &state) != 1) return 1; } } /* This fails on HP-UX 11.11. */ if (setlocale (LC_ALL, "$LOCALE_JA") != NULL) { char input[] = "B\217\253\344\217\251\316er"; /* "Büßer" */ mbstate_t state; wchar_t wc; memset (&state, '\0', sizeof (mbstate_t)); if (mbrtowc (&wc, input + 1, 1, &state) == (size_t)(-2)) { input[1] = '\0'; if (mbrtowc (&wc, input + 2, 5, &state) != 2) return 1; } } return 0; }], [gl_cv_func_mbrtowc_retval=yes], [gl_cv_func_mbrtowc_retval=no], [:]) fi ]) ]) dnl Test whether mbrtowc, when parsing a NUL character, correctly returns 0. dnl Result is gl_cv_func_mbrtowc_nul_retval. AC_DEFUN([gl_MBRTOWC_NUL_RETVAL], [ AC_REQUIRE([AC_PROG_CC]) AC_REQUIRE([gt_LOCALE_ZH_CN]) AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles AC_CACHE_CHECK([whether mbrtowc returns 0 when parsing a NUL character], [gl_cv_func_mbrtowc_nul_retval], [ dnl Initial guess, used when cross-compiling or when no suitable locale dnl is present. changequote(,)dnl case "$host_os" in # Guess no on Solaris 8 and 9. solaris2.[89]) gl_cv_func_mbrtowc_nul_retval="guessing no" ;; # Guess yes otherwise. *) gl_cv_func_mbrtowc_nul_retval="guessing yes" ;; esac changequote([,])dnl if test $LOCALE_ZH_CN != none; then AC_TRY_RUN([ #include #include #include int main () { /* This fails on Solaris 8 and 9. */ if (setlocale (LC_ALL, "$LOCALE_ZH_CN") != NULL) { mbstate_t state; wchar_t wc; memset (&state, '\0', sizeof (mbstate_t)); if (mbrtowc (&wc, "", 1, &state) != 0) return 1; } return 0; }], [gl_cv_func_mbrtowc_nul_retval=yes], [gl_cv_func_mbrtowc_nul_retval=no], [:]) fi ]) ]) # Prerequisites of lib/mbrtowc.c. AC_DEFUN([gl_PREREQ_MBRTOWC], [ : ]) dnl From Paul Eggert dnl This override of an autoconf macro can be removed when autoconf 2.60 or dnl newer can be assumed everywhere. m4_if(m4_version_compare(m4_defn([m4_PACKAGE_VERSION]),[2.60]),[-1],[ AC_DEFUN([AC_FUNC_MBRTOWC], [ dnl Same as AC_FUNC_MBRTOWC in autoconf-2.60. AC_CACHE_CHECK([whether mbrtowc and mbstate_t are properly declared], gl_cv_func_mbrtowc, [AC_LINK_IFELSE( [AC_LANG_PROGRAM( [[#include ]], [[wchar_t wc; char const s[] = ""; size_t n = 1; mbstate_t state; return ! (sizeof state && (mbrtowc) (&wc, s, n, &state));]])], gl_cv_func_mbrtowc=yes, gl_cv_func_mbrtowc=no)]) if test $gl_cv_func_mbrtowc = yes; then AC_DEFINE([HAVE_MBRTOWC], [1], [Define to 1 if mbrtowc and mbstate_t are properly declared.]) fi ]) ]) libprelude-1.0.0/libmissing/m4/signbit.m40000664000076400007640000002242311341220436015152 00000000000000# signbit.m4 serial 6 dnl Copyright (C) 2007-2010 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. AC_DEFUN([gl_SIGNBIT], [ AC_REQUIRE([gl_MATH_H_DEFAULTS]) AC_CACHE_CHECK([for signbit macro], [gl_cv_func_signbit], [ AC_TRY_RUN([ #include /* If signbit is defined as a function, don't use it, since calling it for 'float' or 'long double' arguments would involve conversions. If signbit is not declared at all but exists as a library function, don't use it, since the prototype may not match. If signbit is not declared at all but exists as a compiler built-in, don't use it, since it's preferable to use __builtin_signbit* (no warnings, no conversions). */ #ifndef signbit # error "signbit should be a macro" #endif #include ]gl_SIGNBIT_TEST_PROGRAM , [gl_cv_func_signbit=yes], [gl_cv_func_signbit=no], [gl_cv_func_signbit="guessing no"]) ]) dnl GCC 4.0 and newer provides three built-ins for signbit. dnl They can be used without warnings, also in C++, regardless of . dnl But they may expand to calls to functions, which may or may not be in dnl libc. AC_CACHE_CHECK([for signbit compiler built-ins], [gl_cv_func_signbit_gcc], [ AC_TRY_RUN([ #if __GNUC__ >= 4 # define signbit(x) \ (sizeof (x) == sizeof (long double) ? __builtin_signbitl (x) : \ sizeof (x) == sizeof (double) ? __builtin_signbit (x) : \ __builtin_signbitf (x)) #else # error "signbit should be three compiler built-ins" #endif #include ]gl_SIGNBIT_TEST_PROGRAM , [gl_cv_func_signbit_gcc=yes], [gl_cv_func_signbit_gcc=no], [gl_cv_func_signbit_gcc="guessing no"]) ]) dnl Use the compiler built-ins whenever possible, because they are more dnl efficient than the system library functions (if they exist). if test "$gl_cv_func_signbit_gcc" = yes; then REPLACE_SIGNBIT_USING_GCC=1 else if test "$gl_cv_func_signbit" != yes; then REPLACE_SIGNBIT=1 AC_LIBOBJ([signbitf]) AC_LIBOBJ([signbitd]) AC_LIBOBJ([signbitl]) gl_FLOAT_SIGN_LOCATION gl_DOUBLE_SIGN_LOCATION gl_LONG_DOUBLE_SIGN_LOCATION if test "$gl_cv_cc_float_signbit" = unknown; then dnl Test whether copysignf() is declared. AC_CHECK_DECLS([copysignf], , , [#include ]) if test "$ac_cv_have_decl_copysignf" = yes; then dnl Test whether copysignf() can be used without libm. AC_CACHE_CHECK([whether copysignf can be used without linking with libm], [gl_cv_func_copysignf_no_libm], [ AC_TRY_LINK([#include float x, y;], [return copysignf (x, y) < 0;], [gl_cv_func_copysignf_no_libm=yes], [gl_cv_func_copysignf_no_libm=no]) ]) if test $gl_cv_func_copysignf_no_libm = yes; then AC_DEFINE([HAVE_COPYSIGNF_IN_LIBC], [1], [Define if the copysignf function is declared in and available in libc.]) fi fi fi if test "$gl_cv_cc_double_signbit" = unknown; then dnl Test whether copysign() is declared. AC_CHECK_DECLS([copysign], , , [#include ]) if test "$ac_cv_have_decl_copysign" = yes; then dnl Test whether copysign() can be used without libm. AC_CACHE_CHECK([whether copysign can be used without linking with libm], [gl_cv_func_copysign_no_libm], [ AC_TRY_LINK([#include double x, y;], [return copysign (x, y) < 0;], [gl_cv_func_copysign_no_libm=yes], [gl_cv_func_copysign_no_libm=no]) ]) if test $gl_cv_func_copysign_no_libm = yes; then AC_DEFINE([HAVE_COPYSIGN_IN_LIBC], [1], [Define if the copysign function is declared in and available in libc.]) fi fi fi if test "$gl_cv_cc_long_double_signbit" = unknown; then dnl Test whether copysignl() is declared. AC_CHECK_DECLS([copysignl], , , [#include ]) if test "$ac_cv_have_decl_copysignl" = yes; then dnl Test whether copysignl() can be used without libm. AC_CACHE_CHECK([whether copysignl can be used without linking with libm], [gl_cv_func_copysignl_no_libm], [ AC_TRY_LINK([#include long double x, y;], [return copysignl (x, y) < 0;], [gl_cv_func_copysignl_no_libm=yes], [gl_cv_func_copysignl_no_libm=no]) ]) if test $gl_cv_func_copysignl_no_libm = yes; then AC_DEFINE([HAVE_COPYSIGNL_IN_LIBC], [1], [Define if the copysignl function is declared in and available in libc.]) fi fi fi fi fi ]) AC_DEFUN([gl_SIGNBIT_TEST_PROGRAM], [[ /* Global variables. Needed because GCC 4 constant-folds __builtin_signbitl (literal) but cannot constant-fold __builtin_signbitl (variable). */ float vf; double vd; long double vl; int main () { /* HP cc on HP-UX 10.20 has a bug with the constant expression -0.0. So we use -p0f and -p0d instead. */ float p0f = 0.0f; float m0f = -p0f; double p0d = 0.0; double m0d = -p0d; /* On HP-UX 10.20, negating 0.0L does not yield -0.0L. So we use another constant expression instead. But that expression does not work on other platforms, such as when cross-compiling to PowerPC on MacOS X 10.5. */ long double p0l = 0.0L; #if defined __hpux || defined __sgi long double m0l = -LDBL_MIN * LDBL_MIN; #else long double m0l = -p0l; #endif if (signbit (vf)) vf++; { float plus_inf = 1.0f / p0f; float minus_inf = -1.0f / p0f; if (!(!signbit (255.0f) && signbit (-255.0f) && !signbit (p0f) && (memcmp (&m0f, &p0f, sizeof (float)) == 0 || signbit (m0f)) && !signbit (plus_inf) && signbit (minus_inf))) return 1; } if (signbit (vd)) vd++; { double plus_inf = 1.0 / p0d; double minus_inf = -1.0 / p0d; if (!(!signbit (255.0) && signbit (-255.0) && !signbit (p0d) && (memcmp (&m0d, &p0d, sizeof (double)) == 0 || signbit (m0d)) && !signbit (plus_inf) && signbit (minus_inf))) return 1; } if (signbit (vl)) vl++; { long double plus_inf = 1.0L / p0l; long double minus_inf = -1.0L / p0l; if (!(!signbit (255.0L) && signbit (-255.0L) && !signbit (p0l) && (memcmp (&m0l, &p0l, sizeof (long double)) == 0 || signbit (m0l)) && !signbit (plus_inf) && signbit (minus_inf))) return 1; } return 0; } ]]) AC_DEFUN([gl_FLOAT_SIGN_LOCATION], [ gl_FLOATTYPE_SIGN_LOCATION([float], [gl_cv_cc_float_signbit], [f], [FLT]) ]) AC_DEFUN([gl_DOUBLE_SIGN_LOCATION], [ gl_FLOATTYPE_SIGN_LOCATION([double], [gl_cv_cc_double_signbit], [], [DBL]) ]) AC_DEFUN([gl_LONG_DOUBLE_SIGN_LOCATION], [ gl_FLOATTYPE_SIGN_LOCATION([long double], [gl_cv_cc_long_double_signbit], [L], [LDBL]) ]) AC_DEFUN([gl_FLOATTYPE_SIGN_LOCATION], [ AC_CACHE_CHECK([where to find the sign bit in a '$1'], [$2], [ AC_TRY_RUN([ #include #include #define NWORDS \ ((sizeof ($1) + sizeof (unsigned int) - 1) / sizeof (unsigned int)) typedef union { $1 value; unsigned int word[NWORDS]; } memory_float; static memory_float plus = { 1.0$3 }; static memory_float minus = { -1.0$3 }; int main () { size_t j, k, i; unsigned int m; FILE *fp = fopen ("conftest.out", "w"); if (fp == NULL) return 1; /* Find the different bit. */ k = 0; m = 0; for (j = 0; j < NWORDS; j++) { unsigned int x = plus.word[j] ^ minus.word[j]; if ((x & (x - 1)) || (x && m)) { /* More than one bit difference. */ fprintf (fp, "unknown"); return 1; } if (x) { k = j; m = x; } } if (m == 0) { /* No difference. */ fprintf (fp, "unknown"); return 1; } /* Now m = plus.word[k] ^ ~minus.word[k]. */ if (plus.word[k] & ~minus.word[k]) { /* Oh? The sign bit is set in the positive and cleared in the negative numbers? */ fprintf (fp, "unknown"); return 1; } for (i = 0; ; i++) if ((m >> i) & 1) break; fprintf (fp, "word %d bit %d", (int) k, (int) i); return (fclose (fp) != 0); } ], [$2=`cat conftest.out`], [$2="unknown"], [ dnl When cross-compiling, we don't know. It depends on the dnl ABI and compiler version. There are too many cases. $2="unknown" ]) rm -f conftest.out ]) case "$]$2[" in word*bit*) word=`echo "$]$2[" | sed -e 's/word //' -e 's/ bit.*//'` bit=`echo "$]$2[" | sed -e 's/word.*bit //'` AC_DEFINE_UNQUOTED([$4][_SIGNBIT_WORD], [$word], [Define as the word index where to find the sign of '$1'.]) AC_DEFINE_UNQUOTED([$4][_SIGNBIT_BIT], [$bit], [Define as the bit index in the word where to find the sign of '$1'.]) ;; esac ]) libprelude-1.0.0/libmissing/m4/sockpfaf.m40000664000076400007640000000362711341220436015314 00000000000000# sockpfaf.m4 serial 7 dnl Copyright (C) 2004, 2006, 2009, 2010 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. dnl Test for some common socket protocol families (PF_INET, PF_INET6, ...) dnl and some common address families (AF_INET, AF_INET6, ...). dnl This test assumes that a system supports an address family if and only if dnl it supports the corresponding protocol family. dnl From Bruno Haible. AC_DEFUN([gl_SOCKET_FAMILIES], [ AC_REQUIRE([gl_HEADER_SYS_SOCKET]) AC_CHECK_HEADERS_ONCE([netinet/in.h]) AC_MSG_CHECKING([for IPv4 sockets]) AC_CACHE_VAL([gl_cv_socket_ipv4], [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include #ifdef HAVE_SYS_SOCKET_H #include #endif #ifdef HAVE_NETINET_IN_H #include #endif #ifdef HAVE_WINSOCK2_H #include #endif]], [[int x = AF_INET; struct in_addr y; struct sockaddr_in z; if (&x && &y && &z) return 0;]])], gl_cv_socket_ipv4=yes, gl_cv_socket_ipv4=no)]) AC_MSG_RESULT([$gl_cv_socket_ipv4]) if test $gl_cv_socket_ipv4 = yes; then AC_DEFINE([HAVE_IPV4], [1], [Define to 1 if defines AF_INET.]) fi AC_MSG_CHECKING([for IPv6 sockets]) AC_CACHE_VAL([gl_cv_socket_ipv6], [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include #ifdef HAVE_SYS_SOCKET_H #include #endif #ifdef HAVE_NETINET_IN_H #include #endif #ifdef HAVE_WINSOCK2_H #include #endif]], [[int x = AF_INET6; struct in6_addr y; struct sockaddr_in6 z; if (&x && &y && &z) return 0;]])], gl_cv_socket_ipv6=yes, gl_cv_socket_ipv6=no)]) AC_MSG_RESULT([$gl_cv_socket_ipv6]) if test $gl_cv_socket_ipv6 = yes; then AC_DEFINE([HAVE_IPV6], [1], [Define to 1 if defines AF_INET6.]) fi ]) libprelude-1.0.0/libmissing/m4/locale-ja.m40000664000076400007640000000774311341220436015352 00000000000000# locale-ja.m4 serial 7 dnl Copyright (C) 2003, 2005-2010 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. dnl From Bruno Haible. dnl Determine the name of a japanese locale with EUC-JP encoding. AC_DEFUN([gt_LOCALE_JA], [ AC_REQUIRE([AC_CANONICAL_HOST]) AC_REQUIRE([AM_LANGINFO_CODESET]) AC_CACHE_CHECK([for a traditional japanese locale], [gt_cv_locale_ja], [ AC_LANG_CONFTEST([AC_LANG_SOURCE([ changequote(,)dnl #include #include #if HAVE_LANGINFO_CODESET # include #endif #include #include struct tm t; char buf[16]; int main () { const char *p; /* Check whether the given locale name is recognized by the system. */ if (setlocale (LC_ALL, "") == NULL) return 1; /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646". On MacOS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET) is empty, and the behaviour of Tcl 8.4 in this locale is not useful. On OpenBSD 4.0, when an unsupported locale is specified, setlocale() succeeds but then nl_langinfo(CODESET) is "646". In this situation, some unit tests fail. */ #if HAVE_LANGINFO_CODESET { const char *cs = nl_langinfo (CODESET); if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0) return 1; } #endif #ifdef __CYGWIN__ /* On Cygwin, avoid locale names without encoding suffix, because the locale_charset() function relies on the encoding suffix. Note that LC_ALL is set on the command line. */ if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1; #endif /* Check whether MB_CUR_MAX is > 1. This excludes the dysfunctional locales on Cygwin 1.5.x. */ if (MB_CUR_MAX == 1) return 1; /* Check whether in a month name, no byte in the range 0x80..0x9F occurs. This excludes the UTF-8 encoding. */ t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4; if (strftime (buf, sizeof (buf), "%B", &t) < 2) return 1; for (p = buf; *p != '\0'; p++) if ((unsigned char) *p >= 0x80 && (unsigned char) *p < 0xa0) return 1; return 0; } changequote([,])dnl ])]) if AC_TRY_EVAL([ac_link]) && test -s conftest$ac_exeext; then # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because # otherwise on MacOS X 10.3.5 the LC_TIME=C from the beginning of the # configure script would override the LC_ALL setting. Likewise for # LC_CTYPE, which is also set at the beginning of the configure script. # Test for the AIX locale name. if (LC_ALL=ja_JP LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then gt_cv_locale_ja=ja_JP else # Test for the locale name with explicit encoding suffix. if (LC_ALL=ja_JP.EUC-JP LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then gt_cv_locale_ja=ja_JP.EUC-JP else # Test for the HP-UX, OSF/1, NetBSD locale name. if (LC_ALL=ja_JP.eucJP LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then gt_cv_locale_ja=ja_JP.eucJP else # Test for the IRIX, FreeBSD locale name. if (LC_ALL=ja_JP.EUC LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then gt_cv_locale_ja=ja_JP.EUC else # Test for the Solaris 7 locale name. if (LC_ALL=ja LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then gt_cv_locale_ja=ja else # Special test for NetBSD 1.6. if test -f /usr/share/locale/ja_JP.eucJP/LC_CTYPE; then gt_cv_locale_ja=ja_JP.eucJP else # None found. gt_cv_locale_ja=none fi fi fi fi fi fi fi rm -fr conftest* ]) LOCALE_JA=$gt_cv_locale_ja AC_SUBST([LOCALE_JA]) ]) libprelude-1.0.0/libmissing/m4/fpieee.m40000664000076400007640000000404311341220435014745 00000000000000# fpieee.m4 serial 1 dnl Copyright (C) 2007, 2009, 2010 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. dnl IEEE 754 standardized three items: dnl - The formats of single-float and double-float - nowadays commonly dnl available as 'float' and 'double' in C and C++. dnl No autoconf test needed. dnl - The overflow and division by zero behaviour: The result are values dnl '±Inf' and 'NaN', rather than exceptions as it was before. dnl This file provides an autoconf macro for ensuring this behaviour of dnl floating-point operations. dnl - A set of conditions (overflow, underflow, inexact, etc.) which can dnl be configured to trigger an exception. dnl This cannot be done in a portable way: it depends on the compiler, dnl libc, kernel, and CPU. No autoconf macro is provided for this. dnl Ensure non-trapping behaviour of floating-point overflow and dnl floating-point division by zero. dnl (For integer overflow, see gcc's -ftrapv option; for integer division by dnl zero, see the autoconf macro in intdiv0.m4.) AC_DEFUN([gl_FP_IEEE], [ AC_REQUIRE([AC_PROG_CC]) AC_REQUIRE([AC_CANONICAL_HOST]) # IEEE behaviour is the default on all CPUs except Alpha and SH # (according to the test results of Bruno Haible's ieeefp/fenv_default.m4 # and the GCC 4.1.2 manual). case "$host_cpu" in alpha*) # On Alpha systems, a compiler option provides the behaviour. # See the ieee(3) manual page, also available at # if test -n "$GCC"; then # GCC has the option -mieee. CPPFLAGS="$CPPFLAGS -mieee" else # Compaq (ex-DEC) C has the option -ieee. CPPFLAGS="$CPPFLAGS -ieee" fi ;; sh*) if test -n "$GCC"; then # GCC has the option -mieee. CPPFLAGS="$CPPFLAGS -mieee" fi ;; esac ]) libprelude-1.0.0/libmissing/m4/inttypes_h.m40000664000076400007640000000167111341220435015702 00000000000000# inttypes_h.m4 serial 9 dnl Copyright (C) 1997-2004, 2006, 2008-2010 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. dnl From Paul Eggert. # Define HAVE_INTTYPES_H_WITH_UINTMAX if exists, # doesn't clash with , and declares uintmax_t. AC_DEFUN([gl_AC_HEADER_INTTYPES_H], [ AC_CACHE_CHECK([for inttypes.h], [gl_cv_header_inttypes_h], [AC_TRY_COMPILE( [#include #include ], [uintmax_t i = (uintmax_t) -1; return !i;], [gl_cv_header_inttypes_h=yes], [gl_cv_header_inttypes_h=no])]) if test $gl_cv_header_inttypes_h = yes; then AC_DEFINE_UNQUOTED([HAVE_INTTYPES_H_WITH_UINTMAX], [1], [Define if exists, doesn't clash with , and declares uintmax_t. ]) fi ]) libprelude-1.0.0/libmissing/m4/strdup.m40000664000076400007640000000167411341220436015041 00000000000000# strdup.m4 serial 11 dnl Copyright (C) 2002-2010 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. AC_DEFUN([gl_FUNC_STRDUP], [ AC_REQUIRE([gl_HEADER_STRING_H_DEFAULTS]) AC_REPLACE_FUNCS([strdup]) AC_CHECK_DECLS_ONCE([strdup]) if test $ac_cv_have_decl_strdup = no; then HAVE_DECL_STRDUP=0 fi gl_PREREQ_STRDUP ]) AC_DEFUN([gl_FUNC_STRDUP_POSIX], [ AC_REQUIRE([gl_HEADER_STRING_H_DEFAULTS]) AC_REQUIRE([gl_CHECK_MALLOC_POSIX]) if test $gl_cv_func_malloc_posix != yes; then REPLACE_STRDUP=1 AC_LIBOBJ([strdup]) else AC_REPLACE_FUNCS([strdup]) fi AC_CHECK_DECLS_ONCE([strdup]) if test $ac_cv_have_decl_strdup = no; then HAVE_DECL_STRDUP=0 fi gl_PREREQ_STRDUP ]) # Prerequisites of lib/strdup.c. AC_DEFUN([gl_PREREQ_STRDUP], [:]) libprelude-1.0.0/libmissing/m4/wctob.m40000664000076400007640000000457611341220437014643 00000000000000# wctob.m4 serial 4 dnl Copyright (C) 2008-2010 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. AC_DEFUN([gl_FUNC_WCTOB], [ AC_REQUIRE([gl_WCHAR_H_DEFAULTS]) AC_CHECK_FUNCS_ONCE([wctob]) if test $ac_cv_func_wctob = no; then HAVE_DECL_WCTOB=0 gl_REPLACE_WCHAR_H AC_LIBOBJ([wctob]) gl_PREREQ_WCTOB else dnl Solaris 9 has the wctob() function but it does not work. AC_REQUIRE([AC_PROG_CC]) AC_REQUIRE([gt_LOCALE_FR]) AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles AC_CACHE_CHECK([whether wctob works], [gl_cv_func_wctob_works], [ dnl Initial guess, used when cross-compiling or when no suitable locale dnl is present. changequote(,)dnl case "$host_os" in # Guess no on Solaris <= 9. solaris2.[1-9] | solaris2.[1-9].*) gl_cv_func_wctob_works="guessing no" ;; # Guess yes otherwise. *) gl_cv_func_wctob_works="guessing yes" ;; esac changequote([,])dnl if test $LOCALE_FR != none; then AC_TRY_RUN([ #include #include #include int main () { if (setlocale (LC_ALL, "$LOCALE_FR") != NULL) { wchar_t wc; if (mbtowc (&wc, "\374", 1) == 1) if (wctob (wc) != (unsigned char) '\374') return 1; } return 0; }], [gl_cv_func_wctob_works=yes], [gl_cv_func_wctob_works=no], [:]) fi ]) case "$gl_cv_func_wctob_works" in *yes) ;; *) REPLACE_WCTOB=1 ;; esac if test $REPLACE_WCTOB = 1; then gl_REPLACE_WCHAR_H AC_LIBOBJ([wctob]) gl_PREREQ_WCTOB else dnl IRIX 6.5 has the wctob() function but does not declare it. AC_CHECK_DECLS([wctob], [], [], [ /* Tru64 with Desktop Toolkit C has a bug: must be included before . BSD/OS 4.0.1 has a bug: , and must be included before . */ #include #include #include #include ]) if test $ac_cv_have_decl_wctob != yes; then HAVE_DECL_WCTOB=0 gl_REPLACE_WCHAR_H fi fi fi ]) # Prerequisites of lib/wctob.c. AC_DEFUN([gl_PREREQ_WCTOB], [ : ]) libprelude-1.0.0/libmissing/m4/getaddrinfo.m40000664000076400007640000001215611341220435016002 00000000000000# getaddrinfo.m4 serial 22 dnl Copyright (C) 2004-2010 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. AC_DEFUN([gl_GETADDRINFO], [ AC_REQUIRE([gl_HEADER_SYS_SOCKET])dnl for HAVE_SYS_SOCKET_H, HAVE_WINSOCK2_H AC_REQUIRE([gl_HEADER_NETDB])dnl for HAVE_NETDB_H AC_MSG_NOTICE([checking how to do getaddrinfo, freeaddrinfo and getnameinfo]) GETADDRINFO_LIB= gai_saved_LIBS="$LIBS" dnl Where is getaddrinfo()? dnl - On Solaris, it is in libsocket. dnl - On Haiku, it is in libnetwork. dnl - On BeOS, it is in libnet. dnl - On native Windows, it is in ws2_32.dll. dnl - Otherwise it is in libc. AC_SEARCH_LIBS([getaddrinfo], [socket network net], [if test "$ac_cv_search_getaddrinfo" != "none required"; then GETADDRINFO_LIB="$ac_cv_search_getaddrinfo" fi]) LIBS="$gai_saved_LIBS $GETADDRINFO_LIB" AC_CACHE_CHECK([for getaddrinfo], [gl_cv_func_getaddrinfo], [ AC_LINK_IFELSE([AC_LANG_PROGRAM([[ #include #ifdef HAVE_SYS_SOCKET_H #include #endif #ifdef HAVE_NETDB_H #include #endif #include ]], [[getaddrinfo("", "", NULL, NULL);]])], [gl_cv_func_getaddrinfo=yes], [gl_cv_func_getaddrinfo=no])]) if test $gl_cv_func_getaddrinfo = no; then AC_CACHE_CHECK([for getaddrinfo in ws2tcpip.h and -lws2_32], gl_cv_w32_getaddrinfo, [ gl_cv_w32_getaddrinfo=no am_save_LIBS="$LIBS" LIBS="$LIBS -lws2_32" AC_LINK_IFELSE([AC_LANG_PROGRAM([[ #ifdef HAVE_WS2TCPIP_H #include #endif #include ]], [[getaddrinfo(NULL, NULL, NULL, NULL);]])], [gl_cv_w32_getaddrinfo=yes]) LIBS="$am_save_LIBS" ]) if test "$gl_cv_w32_getaddrinfo" = "yes"; then GETADDRINFO_LIB="-lws2_32" LIBS="$gai_saved_LIBS $GETADDRINFO_LIB" else AC_LIBOBJ([getaddrinfo]) fi fi # We can't use AC_REPLACE_FUNCS here because gai_strerror may be an # inline function declared in ws2tcpip.h, so we need to get that # header included somehow. AC_CACHE_CHECK([for gai_strerror (possibly via ws2tcpip.h)], gl_cv_func_gai_strerror, [ AC_LINK_IFELSE([AC_LANG_PROGRAM([[ #include #ifdef HAVE_SYS_SOCKET_H #include #endif #ifdef HAVE_NETDB_H #include #endif #ifdef HAVE_WS2TCPIP_H #include #endif #include ]], [[gai_strerror (NULL);]])], [gl_cv_func_gai_strerror=yes], [gl_cv_func_gai_strerror=no])]) if test $gl_cv_func_gai_strerror = no; then AC_LIBOBJ([gai_strerror]) fi LIBS="$gai_saved_LIBS" gl_PREREQ_GETADDRINFO AC_SUBST([GETADDRINFO_LIB]) ]) # Prerequisites of lib/netdb.in.h and lib/getaddrinfo.c. AC_DEFUN([gl_PREREQ_GETADDRINFO], [ AC_REQUIRE([gl_NETDB_H_DEFAULTS]) AC_REQUIRE([gl_HEADER_SYS_SOCKET])dnl for HAVE_SYS_SOCKET_H, HAVE_WINSOCK2_H AC_REQUIRE([gl_HOSTENT]) dnl for HOSTENT_LIB AC_REQUIRE([gl_SERVENT]) dnl for SERVENT_LIB AC_REQUIRE([gl_INET_NTOP]) dnl for INET_NTOP_LIB AC_REQUIRE([AC_C_RESTRICT]) AC_REQUIRE([gl_SOCKET_FAMILIES]) AC_REQUIRE([gl_HEADER_SYS_SOCKET]) AC_REQUIRE([AC_C_INLINE]) AC_REQUIRE([AC_USE_SYSTEM_EXTENSIONS]) dnl Including sys/socket.h is wrong for Windows, but Windows does not dnl have sa_len so the result is correct anyway. AC_CHECK_MEMBERS([struct sockaddr.sa_len], , , [#include ]) AC_CHECK_HEADERS_ONCE([netinet/in.h]) AC_CHECK_DECLS([getaddrinfo, freeaddrinfo, gai_strerror, getnameinfo],,,[ /* sys/types.h is not needed according to POSIX, but the sys/socket.h in i386-unknown-freebsd4.10 and powerpc-apple-darwin5.5 required it. */ #include #ifdef HAVE_SYS_SOCKET_H #include #endif #ifdef HAVE_NETDB_H #include #endif #ifdef HAVE_WS2TCPIP_H #include #endif ]) if test $ac_cv_have_decl_getaddrinfo = no; then HAVE_DECL_GETADDRINFO=0 fi if test $ac_cv_have_decl_freeaddrinfo = no; then HAVE_DECL_FREEADDRINFO=0 fi if test $ac_cv_have_decl_gai_strerror = no; then HAVE_DECL_GAI_STRERROR=0 fi if test $ac_cv_have_decl_getnameinfo = no; then HAVE_DECL_GETNAMEINFO=0 fi AC_CHECK_TYPES([struct addrinfo],,,[ #include #ifdef HAVE_SYS_SOCKET_H #include #endif #ifdef HAVE_NETDB_H #include #endif #ifdef HAVE_WS2TCPIP_H #include #endif ]) if test $ac_cv_type_struct_addrinfo = no; then HAVE_STRUCT_ADDRINFO=0 fi dnl Append $HOSTENT_LIB to GETADDRINFO_LIB, avoiding gratuitous duplicates. case " $GETADDRINFO_LIB " in *" $HOSTENT_LIB "*) ;; *) GETADDRINFO_LIB="$GETADDRINFO_LIB $HOSTENT_LIB" ;; esac dnl Append $SERVENT_LIB to GETADDRINFO_LIB, avoiding gratuitous duplicates. case " $GETADDRINFO_LIB " in *" $SERVENT_LIB "*) ;; *) GETADDRINFO_LIB="$GETADDRINFO_LIB $SERVENT_LIB" ;; esac dnl Append $INET_NTOP_LIB to GETADDRINFO_LIB, avoiding gratuitous duplicates. case " $GETADDRINFO_LIB " in *" $INET_NTOP_LIB "*) ;; *) GETADDRINFO_LIB="$GETADDRINFO_LIB $INET_NTOP_LIB" ;; esac ]) libprelude-1.0.0/libmissing/m4/ungetc.m40000664000076400007640000000256011341220437015001 00000000000000# ungetc.m4 serial 2 dnl Copyright (C) 2009, 2010 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. AC_DEFUN_ONCE([gl_FUNC_UNGETC_WORKS], [ AC_REQUIRE([AC_PROG_CC]) AC_CACHE_CHECK([whether ungetc works on arbitrary bytes], [gl_cv_func_ungetc_works], [AC_RUN_IFELSE([AC_LANG_PROGRAM([[ #include ]], [FILE *f; if (!(f = fopen ("conftest.tmp", "w+"))) return 1; if (fputs ("abc", f) < 0) return 2; rewind (f); if (fgetc (f) != 'a') return 3; if (fgetc (f) != 'b') return 4; if (ungetc ('d', f) != 'd') return 5; if (ftell (f) != 1) return 6; if (fgetc (f) != 'd') return 7; if (ftell (f) != 2) return 8; if (fseek (f, 0, SEEK_CUR) != 0) return 9; if (ftell (f) != 2) return 10; if (fgetc (f) != 'c') return 11; fclose (f); remove ("conftest.tmp");])], [gl_cv_func_ungetc_works=yes], [gl_cv_func_ungetc_works=no], [gl_cv_func_ungetc_works='guessing no']) ]) if test "$gl_cv_func_ungetc_works" != yes; then AC_DEFINE([FUNC_UNGETC_BROKEN], [1], [Define to 1 if ungetc is broken when used on arbitrary bytes.]) fi ]) libprelude-1.0.0/libmissing/m4/lib-ld.m40000664000076400007640000000660311341220436014660 00000000000000# lib-ld.m4 serial 4 (gettext-0.18) dnl Copyright (C) 1996-2003, 2009-2010 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. dnl Subroutines of libtool.m4, dnl with replacements s/AC_/AC_LIB/ and s/lt_cv/acl_cv/ to avoid collision dnl with libtool.m4. dnl From libtool-1.4. Sets the variable with_gnu_ld to yes or no. AC_DEFUN([AC_LIB_PROG_LD_GNU], [AC_CACHE_CHECK([if the linker ($LD) is GNU ld], [acl_cv_prog_gnu_ld], [# I'd rather use --version here, but apparently some GNU ld's only accept -v. case `$LD -v 2>&1 conf$$.sh echo "exit 0" >>conf$$.sh chmod +x conf$$.sh if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then PATH_SEPARATOR=';' else PATH_SEPARATOR=: fi rm -f conf$$.sh fi 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 GCC]) 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. [[\\/]* | [A-Za-z]:[\\/]*)] [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([acl_cv_path_LD], [if test -z "$LD"; then IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}" for ac_dir in $PATH; do test -z "$ac_dir" && ac_dir=. if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then acl_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 `"$acl_cv_path_LD" -v 2>&1 < /dev/null` in *GNU* | *'with BFD'*) test "$with_gnu_ld" != no && break ;; *) test "$with_gnu_ld" != yes && break ;; esac fi done IFS="$ac_save_ifs" else acl_cv_path_LD="$LD" # Let the user override the test with a path. fi]) LD="$acl_cv_path_LD" if test -n "$LD"; then AC_MSG_RESULT([$LD]) else AC_MSG_RESULT([no]) fi test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH]) AC_LIB_PROG_LD_GNU ]) libprelude-1.0.0/libmissing/m4/glibc21.m40000664000076400007640000000152611341220435014736 00000000000000# glibc21.m4 serial 4 dnl Copyright (C) 2000-2002, 2004, 2008-2010 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. # Test for the GNU C Library, version 2.1 or newer. # From Bruno Haible. AC_DEFUN([gl_GLIBC21], [ AC_CACHE_CHECK([whether we are using the GNU C Library 2.1 or newer], [ac_cv_gnu_library_2_1], [AC_EGREP_CPP([Lucky GNU user], [ #include #ifdef __GNU_LIBRARY__ #if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2) Lucky GNU user #endif #endif ], [ac_cv_gnu_library_2_1=yes], [ac_cv_gnu_library_2_1=no]) ] ) AC_SUBST([GLIBC21]) GLIBC21="$ac_cv_gnu_library_2_1" ] ) libprelude-1.0.0/libmissing/m4/vsnprintf.m40000664000076400007640000000205611341220437015545 00000000000000# vsnprintf.m4 serial 5 dnl Copyright (C) 2002-2004, 2007-2010 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. AC_DEFUN([gl_FUNC_VSNPRINTF], [ AC_REQUIRE([gl_STDIO_H_DEFAULTS]) gl_cv_func_vsnprintf_usable=no AC_CHECK_FUNCS([vsnprintf]) if test $ac_cv_func_vsnprintf = yes; then gl_SNPRINTF_SIZE1 case "$gl_cv_func_snprintf_size1" in *yes) gl_cv_func_vsnprintf_usable=yes ;; esac fi if test $gl_cv_func_vsnprintf_usable = no; then gl_REPLACE_VSNPRINTF fi AC_CHECK_DECLS_ONCE([vsnprintf]) if test $ac_cv_have_decl_vsnprintf = no; then HAVE_DECL_VSNPRINTF=0 fi ]) AC_DEFUN([gl_REPLACE_VSNPRINTF], [ AC_REQUIRE([gl_STDIO_H_DEFAULTS]) AC_LIBOBJ([vsnprintf]) if test $ac_cv_func_vsnprintf = yes; then REPLACE_VSNPRINTF=1 fi gl_PREREQ_VSNPRINTF ]) # Prerequisites of lib/vsnprintf.c. AC_DEFUN([gl_PREREQ_VSNPRINTF], [:]) libprelude-1.0.0/libmissing/m4/wchar.m40000664000076400007640000001307711341220437014625 00000000000000dnl A placeholder for ISO C99 , for platforms that have issues. dnl Copyright (C) 2007-2010 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. dnl Written by Eric Blake. # wchar.m4 serial 31 AC_DEFUN([gl_WCHAR_H], [ AC_REQUIRE([gl_WCHAR_H_DEFAULTS]) AC_REQUIRE([gl_WCHAR_H_INLINE_OK]) dnl Prepare for creating substitute . dnl Check for (missing in Linux uClibc when built without wide dnl character support). dnl is always overridden, because of GNULIB_POSIXCHECK. AC_CHECK_HEADERS_ONCE([wchar.h]) gl_CHECK_NEXT_HEADERS([wchar.h]) if test $ac_cv_header_wchar_h = yes; then HAVE_WCHAR_H=1 else HAVE_WCHAR_H=0 fi AC_SUBST([HAVE_WCHAR_H]) AC_REQUIRE([gt_TYPE_WINT_T]) if test $gt_cv_c_wint_t = yes; then HAVE_WINT_T=1 else HAVE_WINT_T=0 fi AC_SUBST([HAVE_WINT_T]) dnl Check for declarations of anything we want to poison if the dnl corresponding gnulib module is not in use. gl_WARN_ON_USE_PREPARE([[ /* Some systems require additional headers. */ #ifndef __GLIBC__ # include # include # include #endif #include ]], [btowc wctob mbsinit mbrtowc mbrlen mbsrtowcs mbsnrtowcs wcrtomb wcsrtombs wcsnrtombs wcwidth]) ]) dnl Check whether is usable at all. AC_DEFUN([gl_WCHAR_H_INLINE_OK], [ dnl Test whether suffers due to the transition from '__inline' to dnl 'gnu_inline'. See dnl and . In summary, dnl glibc version 2.5 or older, together with gcc version 4.3 or newer and dnl the option -std=c99 or -std=gnu99, leads to a broken . AC_CACHE_CHECK([whether uses 'inline' correctly], [gl_cv_header_wchar_h_correct_inline], [gl_cv_header_wchar_h_correct_inline=yes AC_LANG_CONFTEST([ AC_LANG_SOURCE([[#define wcstod renamed_wcstod #include extern int zero (void); int main () { return zero(); } ]])]) if AC_TRY_EVAL([ac_compile]); then mv conftest.$ac_objext conftest1.$ac_objext AC_LANG_CONFTEST([ AC_LANG_SOURCE([[#define wcstod renamed_wcstod #include int zero (void) { return 0; } ]])]) if AC_TRY_EVAL([ac_compile]); then mv conftest.$ac_objext conftest2.$ac_objext if $CC -o conftest$ac_exeext $CFLAGS $LDFLAGS conftest1.$ac_objext conftest2.$ac_objext $LIBS >&AS_MESSAGE_LOG_FD 2>&1; then : else gl_cv_header_wchar_h_correct_inline=no fi fi fi rm -f conftest1.$ac_objext conftest2.$ac_objext conftest$ac_exeext ]) if test $gl_cv_header_wchar_h_correct_inline = no; then AC_MSG_ERROR([ cannot be used with this compiler ($CC $CFLAGS $CPPFLAGS). This is a known interoperability problem of glibc <= 2.5 with gcc >= 4.3 in C99 mode. You have four options: - Add the flag -fgnu89-inline to CC and reconfigure, or - Fix your include files, using parts of , or - Use a gcc version older than 4.3, or - Don't use the flags -std=c99 or -std=gnu99. Configuration aborted.]) fi ]) dnl Unconditionally enables the replacement of . AC_DEFUN([gl_REPLACE_WCHAR_H], [ dnl This is a no-op, because is always overridden. : ]) AC_DEFUN([gl_WCHAR_MODULE_INDICATOR], [ dnl Use AC_REQUIRE here, so that the default settings are expanded once only. AC_REQUIRE([gl_WCHAR_H_DEFAULTS]) GNULIB_[]m4_translit([$1],[abcdefghijklmnopqrstuvwxyz./-],[ABCDEFGHIJKLMNOPQRSTUVWXYZ___])=1 ]) AC_DEFUN([gl_WCHAR_H_DEFAULTS], [ GNULIB_BTOWC=0; AC_SUBST([GNULIB_BTOWC]) GNULIB_WCTOB=0; AC_SUBST([GNULIB_WCTOB]) GNULIB_MBSINIT=0; AC_SUBST([GNULIB_MBSINIT]) GNULIB_MBRTOWC=0; AC_SUBST([GNULIB_MBRTOWC]) GNULIB_MBRLEN=0; AC_SUBST([GNULIB_MBRLEN]) GNULIB_MBSRTOWCS=0; AC_SUBST([GNULIB_MBSRTOWCS]) GNULIB_MBSNRTOWCS=0; AC_SUBST([GNULIB_MBSNRTOWCS]) GNULIB_WCRTOMB=0; AC_SUBST([GNULIB_WCRTOMB]) GNULIB_WCSRTOMBS=0; AC_SUBST([GNULIB_WCSRTOMBS]) GNULIB_WCSNRTOMBS=0; AC_SUBST([GNULIB_WCSNRTOMBS]) GNULIB_WCWIDTH=0; AC_SUBST([GNULIB_WCWIDTH]) dnl Assume proper GNU behavior unless another module says otherwise. HAVE_BTOWC=1; AC_SUBST([HAVE_BTOWC]) HAVE_MBSINIT=1; AC_SUBST([HAVE_MBSINIT]) HAVE_MBRTOWC=1; AC_SUBST([HAVE_MBRTOWC]) HAVE_MBRLEN=1; AC_SUBST([HAVE_MBRLEN]) HAVE_MBSRTOWCS=1; AC_SUBST([HAVE_MBSRTOWCS]) HAVE_MBSNRTOWCS=1; AC_SUBST([HAVE_MBSNRTOWCS]) HAVE_WCRTOMB=1; AC_SUBST([HAVE_WCRTOMB]) HAVE_WCSRTOMBS=1; AC_SUBST([HAVE_WCSRTOMBS]) HAVE_WCSNRTOMBS=1; AC_SUBST([HAVE_WCSNRTOMBS]) HAVE_DECL_WCTOB=1; AC_SUBST([HAVE_DECL_WCTOB]) HAVE_DECL_WCWIDTH=1; AC_SUBST([HAVE_DECL_WCWIDTH]) REPLACE_MBSTATE_T=0; AC_SUBST([REPLACE_MBSTATE_T]) REPLACE_BTOWC=0; AC_SUBST([REPLACE_BTOWC]) REPLACE_WCTOB=0; AC_SUBST([REPLACE_WCTOB]) REPLACE_MBSINIT=0; AC_SUBST([REPLACE_MBSINIT]) REPLACE_MBRTOWC=0; AC_SUBST([REPLACE_MBRTOWC]) REPLACE_MBRLEN=0; AC_SUBST([REPLACE_MBRLEN]) REPLACE_MBSRTOWCS=0; AC_SUBST([REPLACE_MBSRTOWCS]) REPLACE_MBSNRTOWCS=0; AC_SUBST([REPLACE_MBSNRTOWCS]) REPLACE_WCRTOMB=0; AC_SUBST([REPLACE_WCRTOMB]) REPLACE_WCSRTOMBS=0; AC_SUBST([REPLACE_WCSRTOMBS]) REPLACE_WCSNRTOMBS=0; AC_SUBST([REPLACE_WCSNRTOMBS]) REPLACE_WCWIDTH=0; AC_SUBST([REPLACE_WCWIDTH]) ]) libprelude-1.0.0/libmissing/m4/snprintf-posix.m40000664000076400007640000001401011341220436016507 00000000000000# snprintf-posix.m4 serial 14 dnl Copyright (C) 2007-2010 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. AC_DEFUN([gl_FUNC_SNPRINTF_POSIX], [ AC_REQUIRE([gl_PRINTF_SIZES_C99]) AC_REQUIRE([gl_PRINTF_LONG_DOUBLE]) AC_REQUIRE([gl_PRINTF_INFINITE]) AC_REQUIRE([gl_PRINTF_INFINITE_LONG_DOUBLE]) AC_REQUIRE([gl_PRINTF_DIRECTIVE_A]) AC_REQUIRE([gl_PRINTF_DIRECTIVE_F]) AC_REQUIRE([gl_PRINTF_DIRECTIVE_N]) AC_REQUIRE([gl_PRINTF_DIRECTIVE_LS]) AC_REQUIRE([gl_PRINTF_POSITIONS]) AC_REQUIRE([gl_PRINTF_FLAG_GROUPING]) AC_REQUIRE([gl_PRINTF_FLAG_LEFTADJUST]) AC_REQUIRE([gl_PRINTF_FLAG_ZERO]) AC_REQUIRE([gl_PRINTF_PRECISION]) AC_REQUIRE([gl_PRINTF_ENOMEM]) gl_cv_func_snprintf_posix=no AC_CHECK_FUNCS([snprintf]) if test $ac_cv_func_snprintf = yes; then gl_SNPRINTF_TRUNCATION_C99 gl_SNPRINTF_RETVAL_C99 gl_SNPRINTF_DIRECTIVE_N gl_SNPRINTF_SIZE1 gl_VSNPRINTF_ZEROSIZE_C99 case "$gl_cv_func_printf_sizes_c99" in *yes) case "$gl_cv_func_printf_long_double" in *yes) case "$gl_cv_func_printf_infinite" in *yes) case "$gl_cv_func_printf_infinite_long_double" in *yes) case "$gl_cv_func_printf_directive_a" in *yes) case "$gl_cv_func_printf_directive_f" in *yes) case "$gl_cv_func_printf_directive_n" in *yes) case "$gl_cv_func_printf_directive_ls" in *yes) case "$gl_cv_func_printf_positions" in *yes) case "$gl_cv_func_printf_flag_grouping" in *yes) case "$gl_cv_func_printf_flag_leftadjust" in *yes) case "$gl_cv_func_printf_flag_zero" in *yes) case "$gl_cv_func_printf_precision" in *yes) case "$gl_cv_func_printf_enomem" in *yes) case "$gl_cv_func_snprintf_truncation_c99" in *yes) case "$gl_cv_func_snprintf_retval_c99" in *yes) case "$gl_cv_func_snprintf_directive_n" in *yes) case "$gl_cv_func_snprintf_size1" in *yes) case "$gl_cv_func_vsnprintf_zerosize_c99" in *yes) # snprintf exists and is # already POSIX compliant. gl_cv_func_snprintf_posix=yes ;; esac ;; esac ;; esac ;; esac ;; esac ;; esac ;; esac ;; esac ;; esac ;; esac ;; esac ;; esac ;; esac ;; esac ;; esac ;; esac ;; esac ;; esac ;; esac fi if test $gl_cv_func_snprintf_posix = no; then gl_PREREQ_VASNPRINTF_LONG_DOUBLE gl_PREREQ_VASNPRINTF_INFINITE_DOUBLE gl_PREREQ_VASNPRINTF_INFINITE_LONG_DOUBLE gl_PREREQ_VASNPRINTF_DIRECTIVE_A gl_PREREQ_VASNPRINTF_DIRECTIVE_F gl_PREREQ_VASNPRINTF_DIRECTIVE_LS gl_PREREQ_VASNPRINTF_FLAG_GROUPING gl_PREREQ_VASNPRINTF_FLAG_LEFTADJUST gl_PREREQ_VASNPRINTF_FLAG_ZERO gl_PREREQ_VASNPRINTF_PRECISION gl_PREREQ_VASNPRINTF_ENOMEM gl_REPLACE_VASNPRINTF gl_REPLACE_SNPRINTF fi ]) libprelude-1.0.0/libmissing/m4/signalblocking.m40000664000076400007640000000274511341220436016506 00000000000000# signalblocking.m4 serial 10 dnl Copyright (C) 2001-2002, 2006-2010 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. # Determine available signal blocking primitives. Three different APIs exist: # 1) POSIX: sigemptyset, sigaddset, sigprocmask # 2) SYSV: sighold, sigrelse # 3) BSD: sigblock, sigsetmask # For simplicity, here we check only for the POSIX signal blocking. AC_DEFUN([gl_SIGNALBLOCKING], [ AC_REQUIRE([gl_SIGNAL_H_DEFAULTS]) signals_not_posix= AC_EGREP_HEADER([sigset_t], [signal.h], , [signals_not_posix=1]) if test -z "$signals_not_posix"; then AC_CHECK_FUNC([sigprocmask], [gl_cv_func_sigprocmask=1]) fi if test -z "$gl_cv_func_sigprocmask"; then HAVE_POSIX_SIGNALBLOCKING=0 AC_LIBOBJ([sigprocmask]) gl_PREREQ_SIGPROCMASK fi ]) # Prerequisites of the part of lib/signal.in.h and of lib/sigprocmask.c. AC_DEFUN([gl_PREREQ_SIGPROCMASK], [ AC_REQUIRE([gl_SIGNAL_H_DEFAULTS]) AC_CHECK_TYPES([sigset_t], [gl_cv_type_sigset_t=yes], [gl_cv_type_sigset_t=no], [#include /* Mingw defines sigset_t not in , but in . */ #include ]) if test $gl_cv_type_sigset_t != yes; then HAVE_SIGSET_T=0 fi dnl HAVE_SIGSET_T is 1 if the system lacks the sigprocmask function but has dnl the sigset_t type. AC_SUBST([HAVE_SIGSET_T]) ]) libprelude-1.0.0/libmissing/m4/langinfo_h.m40000664000076400007640000000460011341220436015614 00000000000000# langinfo_h.m4 serial 3 dnl Copyright (C) 2009, 2010 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. AC_DEFUN([gl_LANGINFO_H], [ AC_REQUIRE([gl_LANGINFO_H_DEFAULTS]) dnl Persuade glibc-2.0.6 to define CODESET. AC_REQUIRE([AC_USE_SYSTEM_EXTENSIONS]) gl_CHECK_NEXT_HEADERS([langinfo.h]) dnl Determine whether exists. It is missing on mingw and BeOS. HAVE_LANGINFO_CODESET=0 HAVE_LANGINFO_ERA=0 AC_CHECK_HEADERS_ONCE([langinfo.h]) if test $ac_cv_header_langinfo_h = yes; then HAVE_LANGINFO_H=1 dnl Determine what defines. CODESET and ERA etc. are missing dnl on OpenBSD 3.8. AC_CACHE_CHECK([whether langinfo.h defines CODESET], [gl_cv_header_langinfo_codeset], [AC_COMPILE_IFELSE( [AC_LANG_PROGRAM([[#include int a = CODESET; ]])], [gl_cv_header_langinfo_codeset=yes], [gl_cv_header_langinfo_codeset=no]) ]) if test $gl_cv_header_langinfo_codeset = yes; then HAVE_LANGINFO_CODESET=1 fi AC_CACHE_CHECK([whether langinfo.h defines ERA], [gl_cv_header_langinfo_era], [AC_COMPILE_IFELSE( [AC_LANG_PROGRAM([[#include int a = ERA; ]])], [gl_cv_header_langinfo_era=yes], [gl_cv_header_langinfo_era=no]) ]) if test $gl_cv_header_langinfo_era = yes; then HAVE_LANGINFO_ERA=1 fi else HAVE_LANGINFO_H=0 fi AC_SUBST([HAVE_LANGINFO_H]) AC_SUBST([HAVE_LANGINFO_CODESET]) AC_SUBST([HAVE_LANGINFO_ERA]) dnl Check for declarations of anything we want to poison if the dnl corresponding gnulib module is not in use. gl_WARN_ON_USE_PREPARE([[#include ]], [nl_langinfo]) ]) AC_DEFUN([gl_LANGINFO_MODULE_INDICATOR], [ dnl Use AC_REQUIRE here, so that the default settings are expanded once only. AC_REQUIRE([gl_LANGINFO_H_DEFAULTS]) GNULIB_[]m4_translit([$1],[abcdefghijklmnopqrstuvwxyz./-],[ABCDEFGHIJKLMNOPQRSTUVWXYZ___])=1 ]) AC_DEFUN([gl_LANGINFO_H_DEFAULTS], [ GNULIB_NL_LANGINFO=0; AC_SUBST([GNULIB_NL_LANGINFO]) dnl Assume proper GNU behavior unless another module says otherwise. HAVE_NL_LANGINFO=1; AC_SUBST([HAVE_NL_LANGINFO]) REPLACE_NL_LANGINFO=0; AC_SUBST([REPLACE_NL_LANGINFO]) ]) libprelude-1.0.0/libmissing/m4/btowc.m40000664000076400007640000000367111341220435014634 00000000000000# btowc.m4 serial 5 dnl Copyright (C) 2008-2010 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. AC_DEFUN([gl_FUNC_BTOWC], [ AC_REQUIRE([gl_WCHAR_H_DEFAULTS]) dnl Check whether is usable at all, first. Otherwise the test dnl program below may lead to an endless loop. See dnl . AC_REQUIRE([gl_WCHAR_H_INLINE_OK]) AC_CHECK_FUNCS_ONCE([btowc]) if test $ac_cv_func_btowc = no; then HAVE_BTOWC=0 else dnl IRIX 6.5 btowc(EOF) is 0xFF, not WEOF. AC_REQUIRE([AC_PROG_CC]) AC_REQUIRE([gt_LOCALE_FR]) AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles AC_CACHE_CHECK([whether btowc(EOF) is correct], [gl_cv_func_btowc_eof], [ dnl Initial guess, used when cross-compiling or when no suitable locale dnl is present. changequote(,)dnl case "$host_os" in # Guess no on IRIX. irix*) gl_cv_func_btowc_eof="guessing no" ;; # Guess yes otherwise. *) gl_cv_func_btowc_eof="guessing yes" ;; esac changequote([,])dnl if test $LOCALE_FR != none; then AC_TRY_RUN([ #include #include #include #include int main () { if (setlocale (LC_ALL, "$LOCALE_FR") != NULL) { if (btowc (EOF) != WEOF) return 1; } return 0; }], [gl_cv_func_btowc_eof=yes], [gl_cv_func_btowc_eof=no], [:]) fi ]) case "$gl_cv_func_btowc_eof" in *yes) ;; *) REPLACE_BTOWC=1 ;; esac fi if test $HAVE_BTOWC = 0 || test $REPLACE_BTOWC = 1; then gl_REPLACE_WCHAR_H AC_LIBOBJ([btowc]) gl_PREREQ_BTOWC fi ]) # Prerequisites of lib/btowc.c. AC_DEFUN([gl_PREREQ_BTOWC], [ : ]) libprelude-1.0.0/libmissing/m4/frexp.m40000664000076400007640000001025311341220435014634 00000000000000# frexp.m4 serial 7 dnl Copyright (C) 2007, 2008, 2009, 2010 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. AC_DEFUN([gl_FUNC_FREXP], [ AC_REQUIRE([gl_MATH_H_DEFAULTS]) FREXP_LIBM= AC_CACHE_CHECK([whether frexp() can be used without linking with libm], [gl_cv_func_frexp_no_libm], [ AC_TRY_LINK([#include double x;], [int e; return frexp (x, &e) > 0;], [gl_cv_func_frexp_no_libm=yes], [gl_cv_func_frexp_no_libm=no]) ]) if test $gl_cv_func_frexp_no_libm = no; then AC_CACHE_CHECK([whether frexp() can be used with libm], [gl_cv_func_frexp_in_libm], [ save_LIBS="$LIBS" LIBS="$LIBS -lm" AC_TRY_LINK([#include double x;], [int e; return frexp (x, &e) > 0;], [gl_cv_func_frexp_in_libm=yes], [gl_cv_func_frexp_in_libm=no]) LIBS="$save_LIBS" ]) if test $gl_cv_func_frexp_in_libm = yes; then FREXP_LIBM=-lm fi fi if test $gl_cv_func_frexp_no_libm = yes \ || test $gl_cv_func_frexp_in_libm = yes; then save_LIBS="$LIBS" LIBS="$LIBS $FREXP_LIBM" gl_FUNC_FREXP_WORKS LIBS="$save_LIBS" case "$gl_cv_func_frexp_works" in *yes) gl_func_frexp=yes ;; *) gl_func_frexp=no; REPLACE_FREXP=1; FREXP_LIBM= ;; esac else gl_func_frexp=no fi if test $gl_func_frexp = yes; then AC_DEFINE([HAVE_FREXP], [1], [Define if the frexp() function is available and works.]) else AC_LIBOBJ([frexp]) fi AC_SUBST([FREXP_LIBM]) ]) AC_DEFUN([gl_FUNC_FREXP_NO_LIBM], [ AC_REQUIRE([gl_MATH_H_DEFAULTS]) AC_CACHE_CHECK([whether frexp() can be used without linking with libm], [gl_cv_func_frexp_no_libm], [ AC_TRY_LINK([#include double x;], [int e; return frexp (x, &e) > 0;], [gl_cv_func_frexp_no_libm=yes], [gl_cv_func_frexp_no_libm=no]) ]) if test $gl_cv_func_frexp_no_libm = yes; then gl_FUNC_FREXP_WORKS case "$gl_cv_func_frexp_works" in *yes) gl_func_frexp_no_libm=yes ;; *) gl_func_frexp_no_libm=no; REPLACE_FREXP=1 ;; esac else gl_func_frexp_no_libm=no dnl Set REPLACE_FREXP here because the system may have frexp in libm. REPLACE_FREXP=1 fi if test $gl_func_frexp_no_libm = yes; then AC_DEFINE([HAVE_FREXP_IN_LIBC], [1], [Define if the frexp() function is available in libc.]) else AC_LIBOBJ([frexp]) fi ]) dnl Test whether frexp() works also on denormalized numbers (this fails e.g. on dnl NetBSD 3.0), on infinite numbers (this fails e.g. on IRIX 6.5 and mingw), dnl and on negative zero (this fails e.g. on NetBSD 4.99). AC_DEFUN([gl_FUNC_FREXP_WORKS], [ AC_REQUIRE([AC_PROG_CC]) AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles AC_CACHE_CHECK([whether frexp works], [gl_cv_func_frexp_works], [ AC_TRY_RUN([ #include #include #include int main() { int i; volatile double x; /* HP cc on HP-UX 10.20 has a bug with the constant expression -0.0. So we use -zero instead. */ double zero = 0.0; /* Test on denormalized numbers. */ for (i = 1, x = 1.0; i >= DBL_MIN_EXP; i--, x *= 0.5) ; if (x > 0.0) { int exp; double y = frexp (x, &exp); /* On machines with IEEE754 arithmetic: x = 1.11254e-308, exp = -1022. On NetBSD: y = 0.75. Correct: y = 0.5. */ if (y != 0.5) return 1; } /* Test on infinite numbers. */ x = 1.0 / 0.0; { int exp; double y = frexp (x, &exp); if (y != x) return 1; } /* Test on negative zero. */ x = -zero; { int exp; double y = frexp (x, &exp); if (memcmp (&y, &x, sizeof x)) return 1; } return 0; }], [gl_cv_func_frexp_works=yes], [gl_cv_func_frexp_works=no], [case "$host_os" in netbsd* | irix* | mingw*) gl_cv_func_frexp_works="guessing no";; *) gl_cv_func_frexp_works="guessing yes";; esac ]) ]) ]) libprelude-1.0.0/libmissing/m4/socklen.m40000664000076400007640000000431011341220436015144 00000000000000# socklen.m4 serial 7 dnl Copyright (C) 2005, 2006, 2007, 2009, 2010 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. dnl From Albert Chin, Windows fixes from Simon Josefsson. dnl Check for socklen_t: historically on BSD it is an int, and in dnl POSIX 1g it is a type of its own, but some platforms use different dnl types for the argument to getsockopt, getpeername, etc. So we dnl have to test to find something that will work. dnl On mingw32, socklen_t is in ws2tcpip.h ('int'), so we try to find dnl it there first. That file is included by gnulib's sys_socket.in.h, which dnl all users of this module should include. Cygwin must not include dnl ws2tcpip.h. AC_DEFUN([gl_TYPE_SOCKLEN_T], [AC_REQUIRE([gl_HEADER_SYS_SOCKET])dnl AC_CHECK_TYPE([socklen_t], , [AC_MSG_CHECKING([for socklen_t equivalent]) AC_CACHE_VAL([gl_cv_socklen_t_equiv], [# Systems have either "struct sockaddr *" or # "void *" as the second argument to getpeername gl_cv_socklen_t_equiv= for arg2 in "struct sockaddr" void; do for t in int size_t "unsigned int" "long int" "unsigned long int"; do AC_COMPILE_IFELSE([AC_LANG_PROGRAM( [[#include #include int getpeername (int, $arg2 *, $t *);]], [[$t len; getpeername (0, 0, &len);]])], [gl_cv_socklen_t_equiv="$t"]) test "$gl_cv_socklen_t_equiv" != "" && break done test "$gl_cv_socklen_t_equiv" != "" && break done ]) if test "$gl_cv_socklen_t_equiv" = ""; then AC_MSG_ERROR([Cannot find a type to use in place of socklen_t]) fi AC_MSG_RESULT([$gl_cv_socklen_t_equiv]) AC_DEFINE_UNQUOTED([socklen_t], [$gl_cv_socklen_t_equiv], [type to use in place of socklen_t if not defined])], [#include #if HAVE_SYS_SOCKET_H # include #elif HAVE_WS2TCPIP_H # include #endif])]) libprelude-1.0.0/libmissing/m4/gethostname.m40000664000076400007640000000633011341220435016027 00000000000000# gethostname.m4 serial 9 dnl Copyright (C) 2002, 2008, 2009, 2010 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. # Ensure # - the gethostname() function, # - the HOST_NAME_MAX macro in . AC_DEFUN([gl_FUNC_GETHOSTNAME], [ AC_REQUIRE([gl_UNISTD_H_DEFAULTS]) gl_PREREQ_SYS_H_WINSOCK2 dnl Where is gethostname() defined? dnl - On native Windows, it is in ws2_32.dll. dnl - Otherwise is is in libc. GETHOSTNAME_LIB= AC_CHECK_FUNCS([gethostname], , [ AC_CACHE_CHECK([for gethostname in winsock2.h and -lws2_32], [gl_cv_w32_gethostname], [gl_cv_w32_gethostname=no gl_save_LIBS="$LIBS" LIBS="$LIBS -lws2_32" AC_LINK_IFELSE([AC_LANG_PROGRAM([[ #ifdef HAVE_WINSOCK2_H #include #endif #include ]], [[gethostname(NULL, 0);]])], [gl_cv_w32_gethostname=yes]) LIBS="$gl_save_LIBS" ]) if test "$gl_cv_w32_gethostname" = "yes"; then GETHOSTNAME_LIB="-lws2_32" fi ]) AC_SUBST([GETHOSTNAME_LIB]) if test "$ac_cv_func_gethostname" = no; then AC_LIBOBJ([gethostname]) HAVE_GETHOSTNAME=0 gl_PREREQ_GETHOSTNAME fi dnl Also provide HOST_NAME_MAX when lacks it. dnl - On most Unix systems, use MAXHOSTNAMELEN from instead. dnl - On Solaris, Cygwin, BeOS, use MAXHOSTNAMELEN from instead. dnl - On mingw, use 256, because dnl says: dnl "if a buffer of 256 bytes is passed in the name parameter and dnl the namelen parameter is set to 256, the buffer size will always dnl be adequate." dnl With this, there is no need to use sysconf (_SC_HOST_NAME_MAX), which dnl is not a compile-time constant. dnl We cannot override using the usual technique, because dnl gl_CHECK_NEXT_HEADERS does not work for . Therefore retrieve dnl the value of HOST_NAME_MAX at configure time. AC_CHECK_HEADERS_ONCE([sys/param.h]) AC_CHECK_HEADERS_ONCE([sys/socket.h]) AC_CHECK_HEADERS_ONCE([netdb.h]) AC_CACHE_CHECK([for HOST_NAME_MAX], [gl_cv_decl_HOST_NAME_MAX], [ gl_cv_decl_HOST_NAME_MAX= AC_EGREP_CPP([lucky], [ #include #ifdef HOST_NAME_MAX lucky #endif ], [gl_cv_decl_HOST_NAME_MAX=yes]) if test -z "$gl_cv_decl_HOST_NAME_MAX"; then dnl It's not defined in . Substitute it. if test "$gl_cv_w32_gethostname" = yes; then dnl mingw. gl_cv_decl_HOST_NAME_MAX=256 else _AC_COMPUTE_INT([MAXHOSTNAMELEN], [gl_cv_decl_HOST_NAME_MAX], [ #include #if HAVE_SYS_PARAM_H # include #endif #if HAVE_SYS_SOCKET_H # include #endif #if HAVE_NETDB_H # include #endif ]) fi fi ]) if test "$gl_cv_decl_HOST_NAME_MAX" != yes; then AC_DEFINE_UNQUOTED([HOST_NAME_MAX], [$gl_cv_decl_HOST_NAME_MAX], [Define HOST_NAME_MAX when does not define it.]) fi ]) # Prerequisites of lib/gethostname.c. AC_DEFUN([gl_PREREQ_GETHOSTNAME], [ if test "$gl_cv_w32_gethostname" != "yes"; then AC_CHECK_FUNCS([uname]) fi ]) libprelude-1.0.0/libmissing/m4/inet_ntop.m40000664000076400007640000000225311341220435015510 00000000000000# inet_ntop.m4 serial 11 dnl Copyright (C) 2005, 2006, 2008, 2009, 2010 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. AC_DEFUN([gl_INET_NTOP], [ dnl Persuade Solaris to declare inet_ntop. AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS]) gl_REPLACE_ARPA_INET_H dnl Most platforms that provide inet_ntop define it in libc. dnl Solaris 8..10 provide inet_ntop in libnsl instead. gl_save_LIBS=$LIBS AC_SEARCH_LIBS([inet_ntop], [nsl], [], [AC_REPLACE_FUNCS([inet_ntop])]) LIBS=$gl_save_LIBS INET_NTOP_LIB= if test "$ac_cv_search_inet_ntop" != "no" && test "$ac_cv_search_inet_ntop" != "none required"; then INET_NTOP_LIB="$ac_cv_search_inet_ntop" fi AC_SUBST([INET_NTOP_LIB]) gl_PREREQ_INET_NTOP ]) # Prerequisites of lib/inet_ntop.c. AC_DEFUN([gl_PREREQ_INET_NTOP], [ AC_CHECK_DECLS([inet_ntop],,,[#include ]) if test $ac_cv_have_decl_inet_ntop = no; then HAVE_DECL_INET_NTOP=0 fi AC_REQUIRE([gl_SOCKET_FAMILIES]) AC_REQUIRE([AC_C_RESTRICT]) ]) libprelude-1.0.0/libmissing/m4/fcntl_h.m40000664000076400007640000000262711341220435015133 00000000000000# serial 10 # Configure fcntl.h. dnl Copyright (C) 2006, 2007, 2009, 2010 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. dnl Written by Paul Eggert. AC_DEFUN([gl_FCNTL_H], [ AC_REQUIRE([gl_FCNTL_H_DEFAULTS]) AC_REQUIRE([gl_FCNTL_O_FLAGS]) gl_CHECK_NEXT_HEADERS([fcntl.h]) dnl Check for declarations of anything we want to poison if the dnl corresponding gnulib module is not in use, if it is not common dnl enough to be declared everywhere. gl_WARN_ON_USE_PREPARE([[#include ]], [fcntl openat]) ]) AC_DEFUN([gl_FCNTL_MODULE_INDICATOR], [ dnl Use AC_REQUIRE here, so that the default settings are expanded once only. AC_REQUIRE([gl_FCNTL_H_DEFAULTS]) GNULIB_[]m4_translit([$1],[abcdefghijklmnopqrstuvwxyz./-],[ABCDEFGHIJKLMNOPQRSTUVWXYZ___])=1 ]) AC_DEFUN([gl_FCNTL_H_DEFAULTS], [ GNULIB_FCNTL=0; AC_SUBST([GNULIB_FCNTL]) GNULIB_OPEN=0; AC_SUBST([GNULIB_OPEN]) GNULIB_OPENAT=0; AC_SUBST([GNULIB_OPENAT]) dnl Assume proper GNU behavior unless another module says otherwise. HAVE_FCNTL=1; AC_SUBST([HAVE_FCNTL]) HAVE_OPENAT=1; AC_SUBST([HAVE_OPENAT]) REPLACE_FCNTL=0; AC_SUBST([REPLACE_FCNTL]) REPLACE_OPEN=0; AC_SUBST([REPLACE_OPEN]) REPLACE_OPENAT=0; AC_SUBST([REPLACE_OPENAT]) ]) libprelude-1.0.0/libmissing/m4/mktime.m40000664000076400007640000001432411341220436015002 00000000000000# serial 15 dnl Copyright (C) 2002-2003, 2005-2007, 2009-2010 Free Software Foundation, dnl Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. dnl From Jim Meyering. # Redefine AC_FUNC_MKTIME, to fix a bug in Autoconf 2.61a and earlier. # This redefinition can be removed once a new version of Autoconf is assumed. # The redefinition is taken from # . # AC_FUNC_MKTIME # -------------- AC_DEFUN([AC_FUNC_MKTIME], [AC_CHECK_HEADERS_ONCE([unistd.h]) AC_CHECK_FUNCS_ONCE([alarm]) AC_REQUIRE([gl_MULTIARCH]) if test $APPLE_UNIVERSAL_BUILD = 1; then # A universal build on Apple MacOS X platforms. # The test result would be 'yes' in 32-bit mode and 'no' in 64-bit mode. # But we need a configuration result that is valid in both modes. ac_cv_func_working_mktime=no fi AC_CACHE_CHECK([for working mktime], [ac_cv_func_working_mktime], [AC_RUN_IFELSE([AC_LANG_SOURCE( [[/* Test program from Paul Eggert and Tony Leneis. */ #include #include #include #ifdef HAVE_UNISTD_H # include #endif #ifndef HAVE_ALARM # define alarm(X) /* empty */ #endif /* Work around redefinition to rpl_putenv by other config tests. */ #undef putenv static time_t time_t_max; static time_t time_t_min; /* Values we'll use to set the TZ environment variable. */ static char *tz_strings[] = { (char *) 0, "TZ=GMT0", "TZ=JST-9", "TZ=EST+3EDT+2,M10.1.0/00:00:00,M2.3.0/00:00:00" }; #define N_STRINGS (sizeof (tz_strings) / sizeof (tz_strings[0])) /* Return 0 if mktime fails to convert a date in the spring-forward gap. Based on a problem report from Andreas Jaeger. */ static int spring_forward_gap () { /* glibc (up to about 1998-10-07) failed this test. */ struct tm tm; /* Use the portable POSIX.1 specification "TZ=PST8PDT,M4.1.0,M10.5.0" instead of "TZ=America/Vancouver" in order to detect the bug even on systems that don't support the Olson extension, or don't have the full zoneinfo tables installed. */ putenv ("TZ=PST8PDT,M4.1.0,M10.5.0"); tm.tm_year = 98; tm.tm_mon = 3; tm.tm_mday = 5; tm.tm_hour = 2; tm.tm_min = 0; tm.tm_sec = 0; tm.tm_isdst = -1; return mktime (&tm) != (time_t) -1; } static int mktime_test1 (time_t now) { struct tm *lt; return ! (lt = localtime (&now)) || mktime (lt) == now; } static int mktime_test (time_t now) { return (mktime_test1 (now) && mktime_test1 ((time_t) (time_t_max - now)) && mktime_test1 ((time_t) (time_t_min + now))); } static int irix_6_4_bug () { /* Based on code from Ariel Faigon. */ struct tm tm; tm.tm_year = 96; tm.tm_mon = 3; tm.tm_mday = 0; tm.tm_hour = 0; tm.tm_min = 0; tm.tm_sec = 0; tm.tm_isdst = -1; mktime (&tm); return tm.tm_mon == 2 && tm.tm_mday == 31; } static int bigtime_test (int j) { struct tm tm; time_t now; tm.tm_year = tm.tm_mon = tm.tm_mday = tm.tm_hour = tm.tm_min = tm.tm_sec = j; now = mktime (&tm); if (now != (time_t) -1) { struct tm *lt = localtime (&now); if (! (lt && lt->tm_year == tm.tm_year && lt->tm_mon == tm.tm_mon && lt->tm_mday == tm.tm_mday && lt->tm_hour == tm.tm_hour && lt->tm_min == tm.tm_min && lt->tm_sec == tm.tm_sec && lt->tm_yday == tm.tm_yday && lt->tm_wday == tm.tm_wday && ((lt->tm_isdst < 0 ? -1 : 0 < lt->tm_isdst) == (tm.tm_isdst < 0 ? -1 : 0 < tm.tm_isdst)))) return 0; } return 1; } static int year_2050_test () { /* The correct answer for 2050-02-01 00:00:00 in Pacific time, ignoring leap seconds. */ unsigned long int answer = 2527315200UL; struct tm tm; time_t t; tm.tm_year = 2050 - 1900; tm.tm_mon = 2 - 1; tm.tm_mday = 1; tm.tm_hour = tm.tm_min = tm.tm_sec = 0; tm.tm_isdst = -1; /* Use the portable POSIX.1 specification "TZ=PST8PDT,M4.1.0,M10.5.0" instead of "TZ=America/Vancouver" in order to detect the bug even on systems that don't support the Olson extension, or don't have the full zoneinfo tables installed. */ putenv ("TZ=PST8PDT,M4.1.0,M10.5.0"); t = mktime (&tm); /* Check that the result is either a failure, or close enough to the correct answer that we can assume the discrepancy is due to leap seconds. */ return (t == (time_t) -1 || (0 < t && answer - 120 <= t && t <= answer + 120)); } int main () { time_t t, delta; int i, j; /* This test makes some buggy mktime implementations loop. Give up after 60 seconds; a mktime slower than that isn't worth using anyway. */ alarm (60); for (;;) { t = (time_t_max << 1) + 1; if (t <= time_t_max) break; time_t_max = t; } time_t_min = - ((time_t) ~ (time_t) 0 == (time_t) -1) - time_t_max; delta = time_t_max / 997; /* a suitable prime number */ for (i = 0; i < N_STRINGS; i++) { if (tz_strings[i]) putenv (tz_strings[i]); for (t = 0; t <= time_t_max - delta; t += delta) if (! mktime_test (t)) return 1; if (! (mktime_test ((time_t) 1) && mktime_test ((time_t) (60 * 60)) && mktime_test ((time_t) (60 * 60 * 24)))) return 1; for (j = 1; ; j <<= 1) if (! bigtime_test (j)) return 1; else if (INT_MAX / 2 < j) break; if (! bigtime_test (INT_MAX)) return 1; } return ! (irix_6_4_bug () && spring_forward_gap () && year_2050_test ()); }]])], [ac_cv_func_working_mktime=yes], [ac_cv_func_working_mktime=no], [ac_cv_func_working_mktime=no])]) if test $ac_cv_func_working_mktime = no; then AC_LIBOBJ([mktime]) fi ])# AC_FUNC_MKTIME AC_DEFUN([gl_FUNC_MKTIME], [ AC_REQUIRE([gl_HEADER_TIME_H_DEFAULTS]) AC_FUNC_MKTIME dnl Note: AC_FUNC_MKTIME does AC_LIBOBJ([mktime]). if test $ac_cv_func_working_mktime = no; then REPLACE_MKTIME=1 gl_PREREQ_MKTIME else REPLACE_MKTIME=0 fi ]) # Prerequisites of lib/mktime.c. AC_DEFUN([gl_PREREQ_MKTIME], [ AC_REQUIRE([AC_C_INLINE]) ]) libprelude-1.0.0/libmissing/m4/longlong.m40000664000076400007640000001057511341220436015337 00000000000000# longlong.m4 serial 14 dnl Copyright (C) 1999-2007, 2009-2010 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. dnl From Paul Eggert. # Define HAVE_LONG_LONG_INT if 'long long int' works. # This fixes a bug in Autoconf 2.61, but can be removed once we # assume 2.62 everywhere. # Note: If the type 'long long int' exists but is only 32 bits large # (as on some very old compilers), HAVE_LONG_LONG_INT will not be # defined. In this case you can treat 'long long int' like 'long int'. AC_DEFUN([AC_TYPE_LONG_LONG_INT], [ AC_CACHE_CHECK([for long long int], [ac_cv_type_long_long_int], [AC_LINK_IFELSE( [_AC_TYPE_LONG_LONG_SNIPPET], [dnl This catches a bug in Tandem NonStop Kernel (OSS) cc -O circa 2004. dnl If cross compiling, assume the bug isn't important, since dnl nobody cross compiles for this platform as far as we know. AC_RUN_IFELSE( [AC_LANG_PROGRAM( [[@%:@include @%:@ifndef LLONG_MAX @%:@ define HALF \ (1LL << (sizeof (long long int) * CHAR_BIT - 2)) @%:@ define LLONG_MAX (HALF - 1 + HALF) @%:@endif]], [[long long int n = 1; int i; for (i = 0; ; i++) { long long int m = n << i; if (m >> i != n) return 1; if (LLONG_MAX / 2 < m) break; } return 0;]])], [ac_cv_type_long_long_int=yes], [ac_cv_type_long_long_int=no], [ac_cv_type_long_long_int=yes])], [ac_cv_type_long_long_int=no])]) if test $ac_cv_type_long_long_int = yes; then AC_DEFINE([HAVE_LONG_LONG_INT], [1], [Define to 1 if the system has the type `long long int'.]) fi ]) # Define HAVE_UNSIGNED_LONG_LONG_INT if 'unsigned long long int' works. # This fixes a bug in Autoconf 2.61, but can be removed once we # assume 2.62 everywhere. # Note: If the type 'unsigned long long int' exists but is only 32 bits # large (as on some very old compilers), AC_TYPE_UNSIGNED_LONG_LONG_INT # will not be defined. In this case you can treat 'unsigned long long int' # like 'unsigned long int'. AC_DEFUN([AC_TYPE_UNSIGNED_LONG_LONG_INT], [ AC_CACHE_CHECK([for unsigned long long int], [ac_cv_type_unsigned_long_long_int], [AC_LINK_IFELSE( [_AC_TYPE_LONG_LONG_SNIPPET], [ac_cv_type_unsigned_long_long_int=yes], [ac_cv_type_unsigned_long_long_int=no])]) if test $ac_cv_type_unsigned_long_long_int = yes; then AC_DEFINE([HAVE_UNSIGNED_LONG_LONG_INT], [1], [Define to 1 if the system has the type `unsigned long long int'.]) fi ]) # Expands to a C program that can be used to test for simultaneous support # of 'long long' and 'unsigned long long'. We don't want to say that # 'long long' is available if 'unsigned long long' is not, or vice versa, # because too many programs rely on the symmetry between signed and unsigned # integer types (excluding 'bool'). AC_DEFUN([_AC_TYPE_LONG_LONG_SNIPPET], [ AC_LANG_PROGRAM( [[/* For now, do not test the preprocessor; as of 2007 there are too many implementations with broken preprocessors. Perhaps this can be revisited in 2012. In the meantime, code should not expect #if to work with literals wider than 32 bits. */ /* Test literals. */ long long int ll = 9223372036854775807ll; long long int nll = -9223372036854775807LL; unsigned long long int ull = 18446744073709551615ULL; /* Test constant expressions. */ typedef int a[((-9223372036854775807LL < 0 && 0 < 9223372036854775807ll) ? 1 : -1)]; typedef int b[(18446744073709551615ULL <= (unsigned long long int) -1 ? 1 : -1)]; int i = 63;]], [[/* Test availability of runtime routines for shift and division. */ long long int llmax = 9223372036854775807ll; unsigned long long int ullmax = 18446744073709551615ull; return ((ll << 63) | (ll >> 63) | (ll < i) | (ll > i) | (llmax / ll) | (llmax % ll) | (ull << 63) | (ull >> 63) | (ull << i) | (ull >> i) | (ullmax / ull) | (ullmax % ull));]]) ]) libprelude-1.0.0/libmissing/m4/getline.m40000664000076400007640000000563611341220435015150 00000000000000# getline.m4 serial 21 dnl Copyright (C) 1998-2003, 2005-2007, 2009-2010 Free Software Foundation, dnl Inc. dnl dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. AC_PREREQ([2.59]) dnl See if there's a working, system-supplied version of the getline function. dnl We can't just do AC_REPLACE_FUNCS([getline]) because some systems dnl have a function by that name in -linet that doesn't have anything dnl to do with the function we need. AC_DEFUN([gl_FUNC_GETLINE], [ AC_REQUIRE([gl_STDIO_H_DEFAULTS]) dnl Persuade glibc to declare getline(). AC_REQUIRE([AC_USE_SYSTEM_EXTENSIONS]) AC_CHECK_DECLS_ONCE([getline]) gl_getline_needs_run_time_check=no AC_CHECK_FUNC([getline], [dnl Found it in some library. Verify that it works. gl_getline_needs_run_time_check=yes], [am_cv_func_working_getline=no]) if test $gl_getline_needs_run_time_check = yes; then AC_CACHE_CHECK([for working getline function], [am_cv_func_working_getline], [echo fooNbarN | tr -d '\012' | tr N '\012' > conftest.data AC_RUN_IFELSE([AC_LANG_SOURCE([[ # include # include # include int main () { FILE *in = fopen ("./conftest.data", "r"); if (!in) return 1; { /* Test result for a NULL buffer and a zero size. Based on a test program from Karl Heuer. */ char *line = NULL; size_t siz = 0; int len = getline (&line, &siz, in); if (!(len == 4 && line && strcmp (line, "foo\n") == 0)) return 1; } { /* Test result for a NULL buffer and a non-zero size. This crashes on FreeBSD 8.0. */ char *line = NULL; size_t siz = (size_t)(~0) / 4; if (getline (&line, &siz, in) == -1) return 1; } return 0; } ]])], [am_cv_func_working_getline=yes] dnl The library version works. , [am_cv_func_working_getline=no] dnl The library version does NOT work. , dnl We're cross compiling. Assume it works on glibc2 systems. [AC_EGREP_CPP([Lucky GNU user], [ #include #ifdef __GNU_LIBRARY__ #if (__GLIBC__ >= 2) Lucky GNU user #endif #endif ], [am_cv_func_working_getline=yes], [am_cv_func_working_getline=no])] )]) fi if test $ac_cv_have_decl_getline = no; then HAVE_DECL_GETLINE=0 fi if test $am_cv_func_working_getline = no; then dnl Set REPLACE_GETLINE always: Even if we have not found the broken dnl getline function among $LIBS, it may exist in libinet and the dnl executable may be linked with -linet. REPLACE_GETLINE=1 AC_LIBOBJ([getline]) gl_PREREQ_GETLINE fi ]) # Prerequisites of lib/getline.c. AC_DEFUN([gl_PREREQ_GETLINE], [ gl_FUNC_GETDELIM ]) libprelude-1.0.0/libmissing/m4/stdbool.m40000664000076400007640000001021311341220436015153 00000000000000# Check for stdbool.h that conforms to C99. dnl Copyright (C) 2002-2006, 2009-2010 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. # Prepare for substituting if it is not supported. AC_DEFUN([AM_STDBOOL_H], [ AC_REQUIRE([AC_HEADER_STDBOOL]) # Define two additional variables used in the Makefile substitution. if test "$ac_cv_header_stdbool_h" = yes; then STDBOOL_H='' else STDBOOL_H='stdbool.h' fi AC_SUBST([STDBOOL_H]) if test "$ac_cv_type__Bool" = yes; then HAVE__BOOL=1 else HAVE__BOOL=0 fi AC_SUBST([HAVE__BOOL]) ]) # AM_STDBOOL_H will be renamed to gl_STDBOOL_H in the future. AC_DEFUN([gl_STDBOOL_H], [AM_STDBOOL_H]) # This macro is only needed in autoconf <= 2.59. Newer versions of autoconf # have this macro built-in. AC_DEFUN([AC_HEADER_STDBOOL], [AC_CACHE_CHECK([for stdbool.h that conforms to C99], [ac_cv_header_stdbool_h], [AC_TRY_COMPILE( [ #include #ifndef bool "error: bool is not defined" #endif #ifndef false "error: false is not defined" #endif #if false "error: false is not 0" #endif #ifndef true "error: true is not defined" #endif #if true != 1 "error: true is not 1" #endif #ifndef __bool_true_false_are_defined "error: __bool_true_false_are_defined is not defined" #endif struct s { _Bool s: 1; _Bool t; } s; char a[true == 1 ? 1 : -1]; char b[false == 0 ? 1 : -1]; char c[__bool_true_false_are_defined == 1 ? 1 : -1]; char d[(bool) 0.5 == true ? 1 : -1]; bool e = &s; char f[(_Bool) 0.0 == false ? 1 : -1]; char g[true]; char h[sizeof (_Bool)]; char i[sizeof s.t]; enum { j = false, k = true, l = false * true, m = true * 256 }; _Bool n[m]; char o[sizeof n == m * sizeof n[0] ? 1 : -1]; char p[-1 - (_Bool) 0 < 0 && -1 - (bool) 0 < 0 ? 1 : -1]; #if defined __xlc__ || defined __GNUC__ /* Catch a bug in IBM AIX xlc compiler version 6.0.0.0 reported by James Lemley on 2005-10-05; see http://lists.gnu.org/archive/html/bug-coreutils/2005-10/msg00086.html This test is not quite right, since xlc is allowed to reject this program, as the initializer for xlcbug is not one of the forms that C requires support for. However, doing the test right would require a run-time test, and that would make cross-compilation harder. Let us hope that IBM fixes the xlc bug, and also adds support for this kind of constant expression. In the meantime, this test will reject xlc, which is OK, since our stdbool.h substitute should suffice. We also test this with GCC, where it should work, to detect more quickly whether someone messes up the test in the future. */ char digs[] = "0123456789"; int xlcbug = 1 / (&(digs + 5)[-2 + (bool) 1] == &digs[4] ? 1 : -1); #endif /* Catch a bug in an HP-UX C compiler. See http://gcc.gnu.org/ml/gcc-patches/2003-12/msg02303.html http://lists.gnu.org/archive/html/bug-coreutils/2005-11/msg00161.html */ _Bool q = true; _Bool *pq = &q; ], [ *pq |= q; *pq |= ! q; /* Refer to every declared value, to avoid compiler optimizations. */ return (!a + !b + !c + !d + !e + !f + !g + !h + !i + !!j + !k + !!l + !m + !n + !o + !p + !q + !pq); ], [ac_cv_header_stdbool_h=yes], [ac_cv_header_stdbool_h=no])]) AC_CHECK_TYPES([_Bool]) if test $ac_cv_header_stdbool_h = yes; then AC_DEFINE([HAVE_STDBOOL_H], [1], [Define to 1 if stdbool.h conforms to C99.]) fi]) libprelude-1.0.0/libmissing/m4/wint_t.m40000664000076400007640000000172611341220437015023 00000000000000# wint_t.m4 serial 4 (gettext-0.18) dnl Copyright (C) 2003, 2007-2010 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. dnl From Bruno Haible. dnl Test whether has the 'wint_t' type. dnl Prerequisite: AC_PROG_CC AC_DEFUN([gt_TYPE_WINT_T], [ AC_CACHE_CHECK([for wint_t], [gt_cv_c_wint_t], [AC_TRY_COMPILE([ /* Tru64 with Desktop Toolkit C has a bug: must be included before . BSD/OS 4.0.1 has a bug: , and must be included before . */ #include #include #include #include wint_t foo = (wchar_t)'\0';], , [gt_cv_c_wint_t=yes], [gt_cv_c_wint_t=no])]) if test $gt_cv_c_wint_t = yes; then AC_DEFINE([HAVE_WINT_T], [1], [Define if you have the 'wint_t' type.]) fi ]) libprelude-1.0.0/libmissing/m4/gnulib-common.m40000664000076400007640000001176711345707014016300 00000000000000# gnulib-common.m4 serial 12 dnl Copyright (C) 2007-2010 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. # gl_COMMON # is expanded unconditionally through gnulib-tool magic. AC_DEFUN([gl_COMMON], [ dnl Use AC_REQUIRE here, so that the code is expanded once only. AC_REQUIRE([gl_00GNULIB]) AC_REQUIRE([gl_COMMON_BODY]) ]) AC_DEFUN([gl_COMMON_BODY], [ AH_VERBATIM([isoc99_inline], [/* Work around a bug in Apple GCC 4.0.1 build 5465: In C99 mode, it supports the ISO C 99 semantics of 'extern inline' (unlike the GNU C semantics of earlier versions), but does not display it by setting __GNUC_STDC_INLINE__. __APPLE__ && __MACH__ test for MacOS X. __APPLE_CC__ tests for the Apple compiler and its version. __STDC_VERSION__ tests for the C99 mode. */ #if defined __APPLE__ && defined __MACH__ && __APPLE_CC__ >= 5465 && !defined __cplusplus && __STDC_VERSION__ >= 199901L && !defined __GNUC_STDC_INLINE__ # define __GNUC_STDC_INLINE__ 1 #endif]) AH_VERBATIM([unused_parameter], [/* Define as a marker that can be attached to declarations that might not be used. This helps to reduce warnings, such as from GCC -Wunused-parameter. */ #if __GNUC__ >= 3 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 7) # define _GL_UNUSED __attribute__ ((__unused__)) #else # define _GL_UNUSED #endif /* The name _UNUSED_PARAMETER_ is an earlier spelling, although the name is a misnomer outside of parameter lists. */ #define _UNUSED_PARAMETER_ _GL_UNUSED ]) ]) # gl_MODULE_INDICATOR([modulename]) # defines a C macro indicating the presence of the given module. AC_DEFUN([gl_MODULE_INDICATOR], [ AC_DEFINE([GNULIB_]translit([$1],[abcdefghijklmnopqrstuvwxyz./-],[ABCDEFGHIJKLMNOPQRSTUVWXYZ___]), [1], [Define to 1 when using the gnulib module ]$1[.]) ]) # m4_foreach_w # is a backport of autoconf-2.59c's m4_foreach_w. # Remove this macro when we can assume autoconf >= 2.60. m4_ifndef([m4_foreach_w], [m4_define([m4_foreach_w], [m4_foreach([$1], m4_split(m4_normalize([$2]), [ ]), [$3])])]) # AS_VAR_IF(VAR, VALUE, [IF-MATCH], [IF-NOT-MATCH]) # ---------------------------------------------------- # Backport of autoconf-2.63b's macro. # Remove this macro when we can assume autoconf >= 2.64. m4_ifndef([AS_VAR_IF], [m4_define([AS_VAR_IF], [AS_IF([test x"AS_VAR_GET([$1])" = x""$2], [$3], [$4])])]) # AC_PROG_MKDIR_P # is a backport of autoconf-2.60's AC_PROG_MKDIR_P. # Remove this macro when we can assume autoconf >= 2.60. m4_ifdef([AC_PROG_MKDIR_P], [], [ AC_DEFUN_ONCE([AC_PROG_MKDIR_P], [AC_REQUIRE([AM_PROG_MKDIR_P])dnl defined by automake MKDIR_P='$(mkdir_p)' AC_SUBST([MKDIR_P])])]) # AC_C_RESTRICT # This definition overrides the AC_C_RESTRICT macro from autoconf 2.60..2.61, # so that mixed use of GNU C and GNU C++ and mixed use of Sun C and Sun C++ # works. # This definition can be removed once autoconf >= 2.62 can be assumed. AC_DEFUN([AC_C_RESTRICT], [AC_CACHE_CHECK([for C/C++ restrict keyword], [ac_cv_c_restrict], [ac_cv_c_restrict=no # The order here caters to the fact that C++ does not require restrict. for ac_kw in __restrict __restrict__ _Restrict restrict; do AC_COMPILE_IFELSE([AC_LANG_PROGRAM( [[typedef int * int_ptr; int foo (int_ptr $ac_kw ip) { return ip[0]; }]], [[int s[1]; int * $ac_kw t = s; t[0] = 0; return foo(t)]])], [ac_cv_c_restrict=$ac_kw]) test "$ac_cv_c_restrict" != no && break done ]) AH_VERBATIM([restrict], [/* Define to the equivalent of the C99 'restrict' keyword, or to nothing if this is not supported. Do not define if restrict is supported directly. */ #undef restrict /* Work around a bug in Sun C++: it does not support _Restrict, even though the corresponding Sun C compiler does, which causes "#define restrict _Restrict" in the previous line. Perhaps some future version of Sun C++ will work with _Restrict; if so, it'll probably define __RESTRICT, just as Sun C does. */ #if defined __SUNPRO_CC && !defined __RESTRICT # define _Restrict #endif]) case $ac_cv_c_restrict in restrict) ;; no) AC_DEFINE([restrict], []) ;; *) AC_DEFINE_UNQUOTED([restrict], [$ac_cv_c_restrict]) ;; esac ]) # gl_BIGENDIAN # is like AC_C_BIGENDIAN, except that it can be AC_REQUIREd. # Note that AC_REQUIRE([AC_C_BIGENDIAN]) does not work reliably because some # macros invoke AC_C_BIGENDIAN with arguments. AC_DEFUN([gl_BIGENDIAN], [ AC_C_BIGENDIAN ]) # gl_CACHE_VAL_SILENT(cache-id, command-to-set-it) # is like AC_CACHE_VAL(cache-id, command-to-set-it), except that it does not # output a spurious "(cached)" mark in the midst of other configure output. # This macro should be used instead of AC_CACHE_VAL when it is not surrounded # by an AC_MSG_CHECKING/AC_MSG_RESULT pair. AC_DEFUN([gl_CACHE_VAL_SILENT], [ saved_as_echo_n="$as_echo_n" as_echo_n=':' AC_CACHE_VAL([$1], [$2]) as_echo_n="$saved_as_echo_n" ]) libprelude-1.0.0/libmissing/m4/sockets.m40000664000076400007640000000526611341220436015174 00000000000000# sockets.m4 serial 6 dnl Copyright (C) 2008, 2009, 2010 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. AC_DEFUN([gl_SOCKETS], [ AC_REQUIRE([AC_C_INLINE]) gl_PREREQ_SYS_H_WINSOCK2 dnl for HAVE_WINSOCK2_H LIBSOCKET= if test $HAVE_WINSOCK2_H = 1; then dnl Native Windows API (not Cygwin). AC_CACHE_CHECK([if we need to call WSAStartup in winsock2.h and -lws2_32], [gl_cv_func_wsastartup], [ gl_save_LIBS="$LIBS" LIBS="$LIBS -lws2_32" AC_LINK_IFELSE([AC_LANG_PROGRAM([[ #ifdef HAVE_WINSOCK2_H # include #endif]], [[ WORD wVersionRequested = MAKEWORD(1, 1); WSADATA wsaData; int err = WSAStartup(wVersionRequested, &wsaData); WSACleanup ();]])], gl_cv_func_wsastartup=yes, gl_cv_func_wsastartup=no) LIBS="$gl_save_LIBS" ]) if test "$gl_cv_func_wsastartup" = "yes"; then AC_DEFINE([WINDOWS_SOCKETS], [1], [Define if WSAStartup is needed.]) LIBSOCKET='-lws2_32' fi else dnl Unix API. dnl Solaris has most socket functions in libsocket. dnl Haiku has most socket functions in libnetwork. dnl BeOS has most socket functions in libnet. AC_CACHE_CHECK([for library containing setsockopt], [gl_cv_lib_socket], [ gl_cv_lib_socket= AC_LINK_IFELSE([AC_LANG_PROGRAM([[extern #ifdef __cplusplus "C" #endif char setsockopt();]], [[setsockopt();]])], [], [gl_save_LIBS="$LIBS" LIBS="$gl_save_LIBS -lsocket" AC_LINK_IFELSE([AC_LANG_PROGRAM([[extern #ifdef __cplusplus "C" #endif char setsockopt();]], [[setsockopt();]])], [gl_cv_lib_socket="-lsocket"]) if test -z "$gl_cv_lib_socket"; then LIBS="$gl_save_LIBS -lnetwork" AC_LINK_IFELSE([AC_LANG_PROGRAM([[extern #ifdef __cplusplus "C" #endif char setsockopt();]], [[setsockopt();]])], [gl_cv_lib_socket="-lnetwork"]) if test -z "$gl_cv_lib_socket"; then LIBS="$gl_save_LIBS -lnet" AC_LINK_IFELSE([AC_LANG_PROGRAM([[extern #ifdef __cplusplus "C" #endif char setsockopt();]], [[setsockopt();]])], [gl_cv_lib_socket="-lnet"]) fi fi LIBS="$gl_save_LIBS" ]) if test -z "$gl_cv_lib_socket"; then gl_cv_lib_socket="none needed" fi ]) if test "$gl_cv_lib_socket" != "none needed"; then LIBSOCKET="$gl_cv_lib_socket" fi fi AC_SUBST([LIBSOCKET]) gl_PREREQ_SOCKETS ]) # Prerequisites of lib/sockets.c. AC_DEFUN([gl_PREREQ_SOCKETS], [ : ]) libprelude-1.0.0/libmissing/m4/malloc.m40000664000076400007640000000271311341220436014762 00000000000000# malloc.m4 serial 9 dnl Copyright (C) 2007, 2009, 2010 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. # gl_FUNC_MALLOC_POSIX # -------------------- # Test whether 'malloc' is POSIX compliant (sets errno to ENOMEM when it # fails), and replace malloc if it is not. AC_DEFUN([gl_FUNC_MALLOC_POSIX], [ AC_REQUIRE([gl_CHECK_MALLOC_POSIX]) if test $gl_cv_func_malloc_posix = yes; then HAVE_MALLOC_POSIX=1 AC_DEFINE([HAVE_MALLOC_POSIX], [1], [Define if the 'malloc' function is POSIX compliant.]) else AC_LIBOBJ([malloc]) HAVE_MALLOC_POSIX=0 fi AC_SUBST([HAVE_MALLOC_POSIX]) ]) # Test whether malloc, realloc, calloc are POSIX compliant, # Set gl_cv_func_malloc_posix to yes or no accordingly. AC_DEFUN([gl_CHECK_MALLOC_POSIX], [ AC_CACHE_CHECK([whether malloc, realloc, calloc are POSIX compliant], [gl_cv_func_malloc_posix], [ dnl It is too dangerous to try to allocate a large amount of memory: dnl some systems go to their knees when you do that. So assume that dnl all Unix implementations of the function are POSIX compliant. AC_TRY_COMPILE([], [#if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ choke me #endif ], [gl_cv_func_malloc_posix=yes], [gl_cv_func_malloc_posix=no]) ]) ]) libprelude-1.0.0/libmissing/m4/time_r.m40000664000076400007640000000267411341220437015001 00000000000000dnl Reentrant time functions like localtime_r. dnl Copyright (C) 2003, 2006, 2007, 2008, 2009, 2010 Free Software Foundation, dnl Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. dnl Written by Paul Eggert. AC_DEFUN([gl_TIME_R], [ dnl Persuade glibc and Solaris to declare localtime_r. AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS]) AC_REQUIRE([gl_HEADER_TIME_H_DEFAULTS]) AC_REQUIRE([AC_C_RESTRICT]) AC_CACHE_CHECK([whether localtime_r is compatible with its POSIX signature], [gl_cv_time_r_posix], [AC_COMPILE_IFELSE([AC_LANG_PROGRAM( [[#include ]], [[/* We don't need to append 'restrict's to the argument types, even though the POSIX signature has the 'restrict's, since C99 says they can't affect type compatibility. */ struct tm * (*ptr) (time_t const *, struct tm *) = localtime_r; if (ptr) return 0; /* Check the return type is a pointer. On HP-UX 10 it is 'int'. */ *localtime_r (0, 0);]])], [gl_cv_time_r_posix=yes], [gl_cv_time_r_posix=no])]) if test $gl_cv_time_r_posix = yes; then REPLACE_LOCALTIME_R=0 else REPLACE_LOCALTIME_R=1 AC_LIBOBJ([time_r]) gl_PREREQ_TIME_R fi ]) # Prerequisites of lib/time_r.c. AC_DEFUN([gl_PREREQ_TIME_R], [ : ]) libprelude-1.0.0/libmissing/m4/nocrash.m40000664000076400007640000000705111341220436015150 00000000000000# nocrash.m4 serial 2 dnl Copyright (C) 2005, 2009, 2010 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. dnl Based on libsigsegv, from Bruno Haible and Paolo Bonzini. AC_PREREQ([2.13]) dnl Expands to some code for use in .c programs that will cause the configure dnl test to exit instead of crashing. This is useful to avoid triggering dnl action from a background debugger and to avoid core dumps. dnl Usage: ... dnl ]GL_NOCRASH[ dnl ... dnl int main() { nocrash_init(); ... } AC_DEFUN([GL_NOCRASH],[[ #include #if defined __MACH__ && defined __APPLE__ /* Avoid a crash on MacOS X. */ #include #include #include #include #include #include /* The exception port on which our thread listens. */ static mach_port_t our_exception_port; /* The main function of the thread listening for exceptions of type EXC_BAD_ACCESS. */ static void * mach_exception_thread (void *arg) { /* Buffer for a message to be received. */ struct { mach_msg_header_t head; mach_msg_body_t msgh_body; char data[1024]; } msg; mach_msg_return_t retval; /* Wait for a message on the exception port. */ retval = mach_msg (&msg.head, MACH_RCV_MSG | MACH_RCV_LARGE, 0, sizeof (msg), our_exception_port, MACH_MSG_TIMEOUT_NONE, MACH_PORT_NULL); if (retval != MACH_MSG_SUCCESS) abort (); exit (1); } static void nocrash_init (void) { mach_port_t self = mach_task_self (); /* Allocate a port on which the thread shall listen for exceptions. */ if (mach_port_allocate (self, MACH_PORT_RIGHT_RECEIVE, &our_exception_port) == KERN_SUCCESS) { /* See http://web.mit.edu/darwin/src/modules/xnu/osfmk/man/mach_port_insert_right.html. */ if (mach_port_insert_right (self, our_exception_port, our_exception_port, MACH_MSG_TYPE_MAKE_SEND) == KERN_SUCCESS) { /* The exceptions we want to catch. Only EXC_BAD_ACCESS is interesting for us. */ exception_mask_t mask = EXC_MASK_BAD_ACCESS; /* Create the thread listening on the exception port. */ pthread_attr_t attr; pthread_t thread; if (pthread_attr_init (&attr) == 0 && pthread_attr_setdetachstate (&attr, PTHREAD_CREATE_DETACHED) == 0 && pthread_create (&thread, &attr, mach_exception_thread, NULL) == 0) { pthread_attr_destroy (&attr); /* Replace the exception port info for these exceptions with our own. Note that we replace the exception port for the entire task, not only for a particular thread. This has the effect that when our exception port gets the message, the thread specific exception port has already been asked, and we don't need to bother about it. See http://web.mit.edu/darwin/src/modules/xnu/osfmk/man/task_set_exception_ports.html. */ task_set_exception_ports (self, mask, our_exception_port, EXCEPTION_DEFAULT, MACHINE_THREAD_STATE); } } } } #else /* Avoid a crash on POSIX systems. */ #include /* A POSIX signal handler. */ static void exception_handler (int sig) { exit (1); } static void nocrash_init (void) { #ifdef SIGSEGV signal (SIGSEGV, exception_handler); #endif #ifdef SIGBUS signal (SIGBUS, exception_handler); #endif } #endif ]]) libprelude-1.0.0/libmissing/m4/memmem.m40000664000076400007640000000516211341220436014771 00000000000000# memmem.m4 serial 14 dnl Copyright (C) 2002, 2003, 2004, 2007, 2008, 2009, 2010 Free Software dnl Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. dnl Check that memmem is present. AC_DEFUN([gl_FUNC_MEMMEM_SIMPLE], [ dnl Persuade glibc to declare memmem(). AC_REQUIRE([AC_USE_SYSTEM_EXTENSIONS]) AC_REQUIRE([gl_HEADER_STRING_H_DEFAULTS]) AC_REPLACE_FUNCS([memmem]) AC_CHECK_DECLS_ONCE([memmem]) if test $ac_cv_have_decl_memmem = no; then HAVE_DECL_MEMMEM=0 fi gl_PREREQ_MEMMEM ]) # gl_FUNC_MEMMEM_SIMPLE dnl Additionally, check that memmem is efficient and handles empty needles. AC_DEFUN([gl_FUNC_MEMMEM], [ AC_REQUIRE([gl_FUNC_MEMMEM_SIMPLE]) if test $ac_cv_have_decl_memmem = yes; then AC_CACHE_CHECK([whether memmem works in linear time], [gl_cv_func_memmem_works], [AC_RUN_IFELSE([AC_LANG_PROGRAM([[ #include /* for signal */ #include /* for memmem */ #include /* for malloc */ #include /* for alarm */ ]], [[size_t m = 1000000; char *haystack = (char *) malloc (2 * m + 1); char *needle = (char *) malloc (m + 1); void *result = 0; /* Failure to compile this test due to missing alarm is okay, since all such platforms (mingw) also lack memmem. */ signal (SIGALRM, SIG_DFL); alarm (5); /* Check for quadratic performance. */ if (haystack && needle) { memset (haystack, 'A', 2 * m); haystack[2 * m] = 'B'; memset (needle, 'A', m); needle[m] = 'B'; result = memmem (haystack, 2 * m + 1, needle, m + 1); } /* Check for empty needle behavior. */ return !result || !memmem ("a", 1, 0, 0);]])], [gl_cv_func_memmem_works=yes], [gl_cv_func_memmem_works=no], [dnl Only glibc >= 2.9 and cygwin >= 1.7.0 are known to have a dnl memmem that works in linear time. AC_EGREP_CPP([Lucky user], [ #include #ifdef __GNU_LIBRARY__ #if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 9) || (__GLIBC__ > 2) Lucky user #endif #endif #ifdef __CYGWIN__ #include #if CYGWIN_VERSION_DLL_MAJOR >= 1007 Lucky user #endif #endif ], [gl_cv_func_memmem_works=yes], [gl_cv_func_memmem_works="guessing no"]) ]) ]) if test "$gl_cv_func_memmem_works" != yes; then REPLACE_MEMMEM=1 AC_LIBOBJ([memmem]) fi fi ]) # gl_FUNC_MEMMEM # Prerequisites of lib/memmem.c. AC_DEFUN([gl_PREREQ_MEMMEM], [:]) libprelude-1.0.0/libmissing/m4/stdint_h.m40000664000076400007640000000164111341220436015326 00000000000000# stdint_h.m4 serial 8 dnl Copyright (C) 1997-2004, 2006, 2008-2010 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. dnl From Paul Eggert. # Define HAVE_STDINT_H_WITH_UINTMAX if exists, # doesn't clash with , and declares uintmax_t. AC_DEFUN([gl_AC_HEADER_STDINT_H], [ AC_CACHE_CHECK([for stdint.h], [gl_cv_header_stdint_h], [AC_TRY_COMPILE( [#include #include ], [uintmax_t i = (uintmax_t) -1; return !i;], [gl_cv_header_stdint_h=yes], [gl_cv_header_stdint_h=no])]) if test $gl_cv_header_stdint_h = yes; then AC_DEFINE_UNQUOTED([HAVE_STDINT_H_WITH_UINTMAX], [1], [Define if exists, doesn't clash with , and declares uintmax_t. ]) fi ]) libprelude-1.0.0/libmissing/m4/arpa_inet_h.m40000664000076400007640000000361411341220435015764 00000000000000# arpa_inet_h.m4 serial 7 dnl Copyright (C) 2006, 2008, 2009, 2010 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. dnl Written by Simon Josefsson and Bruno Haible AC_DEFUN([gl_HEADER_ARPA_INET], [ dnl Use AC_REQUIRE here, so that the default behavior below is expanded dnl once only, before all statements that occur in other macros. AC_REQUIRE([gl_ARPA_INET_H_DEFAULTS]) AC_CHECK_HEADERS_ONCE([arpa/inet.h]) if test $ac_cv_header_arpa_inet_h = yes; then HAVE_ARPA_INET_H=1 else HAVE_ARPA_INET_H=0 fi AC_SUBST([HAVE_ARPA_INET_H]) dnl is always overridden, because of GNULIB_POSIXCHECK. gl_CHECK_NEXT_HEADERS([arpa/inet.h]) dnl Check for declarations of anything we want to poison if the dnl corresponding gnulib module is not in use. gl_WARN_ON_USE_PREPARE([[ /* On some systems, this header is not self-consistent. */ #ifndef __GLIBC__ # include #endif #include ]], [inet_ntop inet_pton]) ]) dnl Unconditionally enables the replacement of . AC_DEFUN([gl_REPLACE_ARPA_INET_H], [ dnl This is a no-op, because is always overridden. : ]) AC_DEFUN([gl_ARPA_INET_MODULE_INDICATOR], [ dnl Use AC_REQUIRE here, so that the default settings are expanded once only. AC_REQUIRE([gl_ARPA_INET_H_DEFAULTS]) GNULIB_[]m4_translit([$1],[abcdefghijklmnopqrstuvwxyz./-],[ABCDEFGHIJKLMNOPQRSTUVWXYZ___])=1 ]) AC_DEFUN([gl_ARPA_INET_H_DEFAULTS], [ GNULIB_INET_NTOP=0; AC_SUBST([GNULIB_INET_NTOP]) GNULIB_INET_PTON=0; AC_SUBST([GNULIB_INET_PTON]) dnl Assume proper GNU behavior unless another module says otherwise. HAVE_DECL_INET_NTOP=1; AC_SUBST([HAVE_DECL_INET_NTOP]) HAVE_DECL_INET_PTON=1; AC_SUBST([HAVE_DECL_INET_PTON]) ]) libprelude-1.0.0/libmissing/m4/lstat.m40000664000076400007640000000156311341220436014644 00000000000000# serial 20 # Copyright (C) 1997-2001, 2003-2010 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. dnl From Jim Meyering. AC_DEFUN([gl_FUNC_LSTAT], [ AC_REQUIRE([gl_SYS_STAT_H_DEFAULTS]) dnl If lstat does not exist, the replacement does dnl "#define lstat stat", and lstat.c is a no-op. AC_CHECK_FUNCS_ONCE([lstat]) if test $ac_cv_func_lstat = yes; then AC_REQUIRE([AC_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK]) if test $ac_cv_func_lstat_dereferences_slashed_symlink = no; then dnl Note: AC_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK does AC_LIBOBJ([lstat]). REPLACE_LSTAT=1 fi # Prerequisites of lib/lstat.c. AC_REQUIRE([AC_C_INLINE]) else HAVE_LSTAT=0 fi ]) libprelude-1.0.0/libmissing/m4/yield.m40000664000076400007640000000135711341220437014625 00000000000000# yield.m4 serial 2 dnl Copyright (C) 2005-2010 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. AC_DEFUN([gl_YIELD], [ AC_REQUIRE([gl_THREADLIB]) dnl On some systems, sched_yield is in librt, rather than in libpthread. YIELD_LIB= if test $gl_threads_api = posix; then dnl Solaris has sched_yield in librt, not in libpthread or libc. AC_CHECK_LIB([rt], [sched_yield], [YIELD_LIB=-lrt], [dnl Solaris 2.5.1, 2.6 has sched_yield in libposix4, not librt. AC_CHECK_LIB([posix4], [sched_yield], [YIELD_LIB=-lposix4])]) fi AC_SUBST([YIELD_LIB]) ]) libprelude-1.0.0/libmissing/m4/frexpl.m40000664000076400007640000001337111341220435015014 00000000000000# frexpl.m4 serial 9 dnl Copyright (C) 2007-2010 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. AC_DEFUN([gl_FUNC_FREXPL], [ AC_REQUIRE([gl_MATH_H_DEFAULTS]) FREXPL_LIBM= AC_CACHE_CHECK([whether frexpl() can be used without linking with libm], [gl_cv_func_frexpl_no_libm], [ AC_TRY_LINK([#include long double x;], [int e; return frexpl (x, &e) > 0;], [gl_cv_func_frexpl_no_libm=yes], [gl_cv_func_frexpl_no_libm=no]) ]) if test $gl_cv_func_frexpl_no_libm = no; then AC_CACHE_CHECK([whether frexpl() can be used with libm], [gl_cv_func_frexpl_in_libm], [ save_LIBS="$LIBS" LIBS="$LIBS -lm" AC_TRY_LINK([#include long double x;], [int e; return frexpl (x, &e) > 0;], [gl_cv_func_frexpl_in_libm=yes], [gl_cv_func_frexpl_in_libm=no]) LIBS="$save_LIBS" ]) if test $gl_cv_func_frexpl_in_libm = yes; then FREXPL_LIBM=-lm fi fi if test $gl_cv_func_frexpl_no_libm = yes \ || test $gl_cv_func_frexpl_in_libm = yes; then save_LIBS="$LIBS" LIBS="$LIBS $FREXPL_LIBM" gl_FUNC_FREXPL_WORKS LIBS="$save_LIBS" case "$gl_cv_func_frexpl_works" in *yes) gl_func_frexpl=yes ;; *) gl_func_frexpl=no; REPLACE_FREXPL=1; FREXPL_LIBM= ;; esac else gl_func_frexpl=no fi if test $gl_func_frexpl = yes; then AC_DEFINE([HAVE_FREXPL], [1], [Define if the frexpl() function is available.]) dnl Also check whether it's declared. dnl MacOS X 10.3 has frexpl() in libc but doesn't declare it in . AC_CHECK_DECL([frexpl], , [HAVE_DECL_FREXPL=0], [#include ]) else HAVE_DECL_FREXPL=0 AC_LIBOBJ([frexpl]) fi AC_SUBST([FREXPL_LIBM]) ]) AC_DEFUN([gl_FUNC_FREXPL_NO_LIBM], [ AC_REQUIRE([gl_MATH_H_DEFAULTS]) AC_CACHE_CHECK([whether frexpl() can be used without linking with libm], [gl_cv_func_frexpl_no_libm], [ AC_TRY_LINK([#include long double x;], [int e; return frexpl (x, &e) > 0;], [gl_cv_func_frexpl_no_libm=yes], [gl_cv_func_frexpl_no_libm=no]) ]) if test $gl_cv_func_frexpl_no_libm = yes; then gl_FUNC_FREXPL_WORKS case "$gl_cv_func_frexpl_works" in *yes) gl_func_frexpl_no_libm=yes ;; *) gl_func_frexpl_no_libm=no; REPLACE_FREXPL=1 ;; esac else gl_func_frexpl_no_libm=no dnl Set REPLACE_FREXPL here because the system may have frexpl in libm. REPLACE_FREXPL=1 fi if test $gl_func_frexpl_no_libm = yes; then AC_DEFINE([HAVE_FREXPL_IN_LIBC], [1], [Define if the frexpl() function is available in libc.]) dnl Also check whether it's declared. dnl MacOS X 10.3 has frexpl() in libc but doesn't declare it in . AC_CHECK_DECL([frexpl], , [HAVE_DECL_FREXPL=0], [#include ]) else HAVE_DECL_FREXPL=0 AC_LIBOBJ([frexpl]) fi ]) dnl Test whether frexpl() works on finite numbers (this fails on dnl MacOS X 10.4/PowerPC, on AIX 5.1, and on BeOS), on denormalized numbers dnl (this fails on MacOS X 10.5/i386), and also on infinite numbers (this dnl fails e.g. on IRIX 6.5 and mingw). AC_DEFUN([gl_FUNC_FREXPL_WORKS], [ AC_REQUIRE([AC_PROG_CC]) AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles AC_CACHE_CHECK([whether frexpl works], [gl_cv_func_frexpl_works], [ AC_TRY_RUN([ #include #include /* Override the values of , like done in float.in.h. */ #if defined __i386__ && (defined __BEOS__ || defined __OpenBSD__) # undef LDBL_MIN_EXP # define LDBL_MIN_EXP (-16381) #endif extern long double frexpl (long double, int *); int main() { volatile long double x; /* Test on finite numbers that fails on AIX 5.1. */ x = 16.0L; { int exp = -9999; frexpl (x, &exp); if (exp != 5) return 1; } /* Test on finite numbers that fails on MacOS X 10.4, because its frexpl function returns an invalid (incorrectly normalized) value: it returns y = { 0x3fe028f5, 0xc28f5c28, 0x3c9eb851, 0xeb851eb8 } but the correct result is 0.505L = { 0x3fe028f5, 0xc28f5c29, 0xbc547ae1, 0x47ae1480 } */ x = 1.01L; { int exp = -9999; long double y = frexpl (x, &exp); if (!(exp == 1 && y == 0.505L)) return 1; } /* Test on large finite numbers. This fails on BeOS at i = 16322, while LDBL_MAX_EXP = 16384. In the loop end test, we test x against Infinity, rather than comparing i with LDBL_MAX_EXP, because BeOS has a wrong LDBL_MAX_EXP. */ { int i; for (i = 1, x = 1.0L; x != x + x; i++, x *= 2.0L) { int exp = -9999; frexpl (x, &exp); if (exp != i) return 1; } } /* Test on denormalized numbers. */ { int i; for (i = 1, x = 1.0L; i >= LDBL_MIN_EXP; i--, x *= 0.5L) ; if (x > 0.0L) { int exp; long double y = frexpl (x, &exp); /* On machines with IEEE854 arithmetic: x = 1.68105e-4932, exp = -16382, y = 0.5. On MacOS X 10.5: exp = -16384, y = 0.5. */ if (exp != LDBL_MIN_EXP - 1) return 1; } } /* Test on infinite numbers. */ x = 1.0L / 0.0L; { int exp; long double y = frexpl (x, &exp); if (y != x) return 1; } return 0; }], [gl_cv_func_frexpl_works=yes], [gl_cv_func_frexpl_works=no], [case "$host_os" in aix* | beos* | darwin* | irix* | mingw* | pw*) gl_cv_func_frexpl_works="guessing no";; *) gl_cv_func_frexpl_works="guessing yes";; esac ]) ]) ]) libprelude-1.0.0/libmissing/m4/fseeko.m40000664000076400007640000000206311341220435014764 00000000000000# fseeko.m4 serial 7 dnl Copyright (C) 2007-2010 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. AC_DEFUN([gl_FUNC_FSEEKO], [ AC_REQUIRE([gl_STDIO_H_DEFAULTS]) AC_REQUIRE([AC_PROG_CC]) AC_REQUIRE([gl_STDIN_LARGE_OFFSET]) dnl Persuade glibc to declare fseeko(). AC_REQUIRE([AC_USE_SYSTEM_EXTENSIONS]) AC_CACHE_CHECK([for fseeko], [gl_cv_func_fseeko], [ AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include ]], [fseeko (stdin, 0, 0);])], [gl_cv_func_fseeko=yes], [gl_cv_func_fseeko=no]) ]) if test $gl_cv_func_fseeko = no \ || test $gl_cv_var_stdin_large_offset = no; then gl_REPLACE_FSEEKO fi ]) AC_DEFUN([gl_REPLACE_FSEEKO], [ AC_LIBOBJ([fseeko]) AC_REQUIRE([gl_STDIO_H_DEFAULTS]) REPLACE_FSEEKO=1 dnl If we are also using the fseek module, then fseek needs replacing, too. m4_ifdef([gl_REPLACE_FSEEK], [gl_REPLACE_FSEEK]) ]) libprelude-1.0.0/libmissing/m4/gnulib-tool.m40000664000076400007640000000264711341220435015753 00000000000000# gnulib-tool.m4 serial 2 dnl Copyright (C) 2004-2005, 2009-2010 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. dnl The following macros need not be invoked explicitly. dnl Invoking them does nothing except to declare default arguments dnl for "gnulib-tool --import". dnl Usage: gl_LOCAL_DIR([DIR]) AC_DEFUN([gl_LOCAL_DIR], []) dnl Usage: gl_MODULES([module1 module2 ...]) AC_DEFUN([gl_MODULES], []) dnl Usage: gl_AVOID([module1 module2 ...]) AC_DEFUN([gl_AVOID], []) dnl Usage: gl_SOURCE_BASE([DIR]) AC_DEFUN([gl_SOURCE_BASE], []) dnl Usage: gl_M4_BASE([DIR]) AC_DEFUN([gl_M4_BASE], []) dnl Usage: gl_PO_BASE([DIR]) AC_DEFUN([gl_PO_BASE], []) dnl Usage: gl_DOC_BASE([DIR]) AC_DEFUN([gl_DOC_BASE], []) dnl Usage: gl_TESTS_BASE([DIR]) AC_DEFUN([gl_TESTS_BASE], []) dnl Usage: gl_WITH_TESTS AC_DEFUN([gl_WITH_TESTS], []) dnl Usage: gl_LIB([LIBNAME]) AC_DEFUN([gl_LIB], []) dnl Usage: gl_LGPL or gl_LGPL([VERSION]) AC_DEFUN([gl_LGPL], []) dnl Usage: gl_MAKEFILE_NAME([FILENAME]) AC_DEFUN([gl_MAKEFILE_NAME], []) dnl Usage: gl_LIBTOOL AC_DEFUN([gl_LIBTOOL], []) dnl Usage: gl_MACRO_PREFIX([PREFIX]) AC_DEFUN([gl_MACRO_PREFIX], []) dnl Usage: gl_PO_DOMAIN([DOMAIN]) AC_DEFUN([gl_PO_DOMAIN], []) dnl Usage: gl_VC_FILES([BOOLEAN]) AC_DEFUN([gl_VC_FILES], []) libprelude-1.0.0/libmissing/m4/onceonly.m40000664000076400007640000000753211341220436015345 00000000000000# onceonly.m4 serial 6 dnl Copyright (C) 2002-2003, 2005-2006, 2008-2010 Free Software Foundation, dnl Inc. dnl This file is free software, distributed under the terms of the GNU dnl General Public License. As a special exception to the GNU General dnl Public License, this file may be distributed as part of a program dnl that contains a configuration script generated by Autoconf, under dnl the same distribution terms as the rest of that program. dnl This file defines some "once only" variants of standard autoconf macros. dnl AC_CHECK_HEADERS_ONCE like AC_CHECK_HEADERS dnl AC_CHECK_FUNCS_ONCE like AC_CHECK_FUNCS dnl AC_CHECK_DECLS_ONCE like AC_CHECK_DECLS dnl AC_REQUIRE([AC_FUNC_STRCOLL]) like AC_FUNC_STRCOLL dnl The advantage is that the check for each of the headers/functions/decls dnl will be put only once into the 'configure' file. It keeps the size of dnl the 'configure' file down, and avoids redundant output when 'configure' dnl is run. dnl The drawback is that the checks cannot be conditionalized. If you write dnl if some_condition; then gl_CHECK_HEADERS(stdlib.h); fi dnl inside an AC_DEFUNed function, the gl_CHECK_HEADERS macro call expands to dnl empty, and the check will be inserted before the body of the AC_DEFUNed dnl function. dnl The original code implemented AC_CHECK_HEADERS_ONCE and AC_CHECK_FUNCS_ONCE dnl in terms of AC_DEFUN and AC_REQUIRE. This implementation uses diversions to dnl named sections DEFAULTS and INIT_PREPARE in order to check all requested dnl headers at once, thus reducing the size of 'configure'. It is known to work dnl with autoconf 2.57..2.62 at least . The size reduction is ca. 9%. dnl Autoconf version 2.59 plus gnulib is required; this file is not needed dnl with Autoconf 2.60 or greater. But note that autoconf's implementation of dnl AC_CHECK_DECLS_ONCE expects a comma-separated list of symbols as first dnl argument! AC_PREREQ([2.59]) # AC_CHECK_HEADERS_ONCE(HEADER1 HEADER2 ...) is a once-only variant of # AC_CHECK_HEADERS(HEADER1 HEADER2 ...). AC_DEFUN([AC_CHECK_HEADERS_ONCE], [ : m4_foreach_w([gl_HEADER_NAME], [$1], [ AC_DEFUN([gl_CHECK_HEADER_]m4_quote(translit(gl_HEADER_NAME, [./-], [___])), [ m4_divert_text([INIT_PREPARE], [gl_header_list="$gl_header_list gl_HEADER_NAME"]) gl_HEADERS_EXPANSION AH_TEMPLATE(AS_TR_CPP([HAVE_]m4_defn([gl_HEADER_NAME])), [Define to 1 if you have the <]m4_defn([gl_HEADER_NAME])[> header file.]) ]) AC_REQUIRE([gl_CHECK_HEADER_]m4_quote(translit(gl_HEADER_NAME, [./-], [___]))) ]) ]) m4_define([gl_HEADERS_EXPANSION], [ m4_divert_text([DEFAULTS], [gl_header_list=]) AC_CHECK_HEADERS([$gl_header_list]) m4_define([gl_HEADERS_EXPANSION], []) ]) # AC_CHECK_FUNCS_ONCE(FUNC1 FUNC2 ...) is a once-only variant of # AC_CHECK_FUNCS(FUNC1 FUNC2 ...). AC_DEFUN([AC_CHECK_FUNCS_ONCE], [ : m4_foreach_w([gl_FUNC_NAME], [$1], [ AC_DEFUN([gl_CHECK_FUNC_]m4_defn([gl_FUNC_NAME]), [ m4_divert_text([INIT_PREPARE], [gl_func_list="$gl_func_list gl_FUNC_NAME"]) gl_FUNCS_EXPANSION AH_TEMPLATE(AS_TR_CPP([HAVE_]m4_defn([gl_FUNC_NAME])), [Define to 1 if you have the `]m4_defn([gl_FUNC_NAME])[' function.]) ]) AC_REQUIRE([gl_CHECK_FUNC_]m4_defn([gl_FUNC_NAME])) ]) ]) m4_define([gl_FUNCS_EXPANSION], [ m4_divert_text([DEFAULTS], [gl_func_list=]) AC_CHECK_FUNCS([$gl_func_list]) m4_define([gl_FUNCS_EXPANSION], []) ]) # AC_CHECK_DECLS_ONCE(DECL1 DECL2 ...) is a once-only variant of # AC_CHECK_DECLS(DECL1, DECL2, ...). AC_DEFUN([AC_CHECK_DECLS_ONCE], [ : m4_foreach_w([gl_DECL_NAME], [$1], [ AC_DEFUN([gl_CHECK_DECL_]m4_defn([gl_DECL_NAME]), [ AC_CHECK_DECLS(m4_defn([gl_DECL_NAME])) ]) AC_REQUIRE([gl_CHECK_DECL_]m4_defn([gl_DECL_NAME])) ]) ]) libprelude-1.0.0/libmissing/m4/ftw.m40000664000076400007640000000063511341220435014313 00000000000000# strsep.m4 serial 3 dnl Copyright (C) 2002, 2003, 2004 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. AC_DEFUN([gl_FUNC_FTW], [ AC_REPLACE_FUNCS(ftw) gl_PREREQ_FTW ]) # Prerequisites of lib/ftw.c. AC_DEFUN([gl_PREREQ_FTW], [:]) libprelude-1.0.0/libmissing/m4/wcrtomb.m40000664000076400007640000000523711341220437015175 00000000000000# wcrtomb.m4 serial 4 dnl Copyright (C) 2008-2010 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. AC_DEFUN([gl_FUNC_WCRTOMB], [ AC_REQUIRE([gl_WCHAR_H_DEFAULTS]) AC_REQUIRE([AC_TYPE_MBSTATE_T]) gl_MBSTATE_T_BROKEN if test $REPLACE_MBSTATE_T = 1; then REPLACE_WCRTOMB=1 fi AC_CHECK_FUNCS_ONCE([wcrtomb]) if test $ac_cv_func_wcrtomb = no; then HAVE_WCRTOMB=0 fi if test $HAVE_WCRTOMB != 0 && test $REPLACE_WCRTOMB != 1; then dnl On AIX 4.3, OSF/1 5.1 and Solaris 10, wcrtomb (NULL, 0, NULL) sometimes dnl returns 0 instead of 1. AC_REQUIRE([AC_PROG_CC]) AC_REQUIRE([gt_LOCALE_FR]) AC_REQUIRE([gt_LOCALE_FR_UTF8]) AC_REQUIRE([gt_LOCALE_JA]) AC_REQUIRE([gt_LOCALE_ZH_CN]) AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles AC_CACHE_CHECK([whether wcrtomb return value is correct], [gl_cv_func_wcrtomb_retval], [ dnl Initial guess, used when cross-compiling or when no suitable locale dnl is present. changequote(,)dnl case "$host_os" in # Guess no on AIX 4, OSF/1 and Solaris. aix4* | osf* | solaris*) gl_cv_func_wcrtomb_retval="guessing no" ;; # Guess yes otherwise. *) gl_cv_func_wcrtomb_retval="guessing yes" ;; esac changequote([,])dnl if test $LOCALE_FR != none || test $LOCALE_FR_UTF8 != none || test $LOCALE_JA != none || test $LOCALE_ZH_CN != none; then AC_TRY_RUN([ #include #include #include #include int main () { if (setlocale (LC_ALL, "$LOCALE_FR") != NULL) { if (wcrtomb (NULL, 0, NULL) != 1) return 1; } if (setlocale (LC_ALL, "$LOCALE_FR_UTF8") != NULL) { if (wcrtomb (NULL, 0, NULL) != 1) return 1; } if (setlocale (LC_ALL, "$LOCALE_JA") != NULL) { if (wcrtomb (NULL, 0, NULL) != 1) return 1; } if (setlocale (LC_ALL, "$LOCALE_ZH_CN") != NULL) { if (wcrtomb (NULL, 0, NULL) != 1) return 1; } return 0; }], [gl_cv_func_wcrtomb_retval=yes], [gl_cv_func_wcrtomb_retval=no], [:]) fi ]) case "$gl_cv_func_wcrtomb_retval" in *yes) ;; *) REPLACE_WCRTOMB=1 ;; esac fi if test $HAVE_WCRTOMB = 0 || test $REPLACE_WCRTOMB = 1; then gl_REPLACE_WCHAR_H AC_LIBOBJ([wcrtomb]) gl_PREREQ_WCRTOMB fi ]) # Prerequisites of lib/wcrtomb.c. AC_DEFUN([gl_PREREQ_WCRTOMB], [ : ]) libprelude-1.0.0/libmissing/m4/ldexpl.m40000664000076400007640000000540511341220436015004 00000000000000# ldexpl.m4 serial 4 dnl Copyright (C) 2007-2010 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. AC_DEFUN([gl_FUNC_LDEXPL], [ AC_REQUIRE([gl_MATH_H_DEFAULTS]) LDEXPL_LIBM= AC_CACHE_CHECK([whether ldexpl() can be used without linking with libm], [gl_cv_func_ldexpl_no_libm], [ AC_TRY_LINK([#include long double x;], [return ldexpl (x, -1) > 0;], [gl_cv_func_ldexpl_no_libm=yes], [gl_cv_func_ldexpl_no_libm=no]) ]) if test $gl_cv_func_ldexpl_no_libm = no; then AC_CACHE_CHECK([whether ldexpl() can be used with libm], [gl_cv_func_ldexpl_in_libm], [ save_LIBS="$LIBS" LIBS="$LIBS -lm" AC_TRY_LINK([#include long double x;], [return ldexpl (x, -1) > 0;], [gl_cv_func_ldexpl_in_libm=yes], [gl_cv_func_ldexpl_in_libm=no]) LIBS="$save_LIBS" ]) if test $gl_cv_func_ldexpl_in_libm = yes; then LDEXPL_LIBM=-lm fi fi if test $gl_cv_func_ldexpl_no_libm = yes \ || test $gl_cv_func_ldexpl_in_libm = yes; then save_LIBS="$LIBS" LIBS="$LIBS $LDEXPL_LIBM" gl_FUNC_LDEXPL_WORKS LIBS="$save_LIBS" case "$gl_cv_func_ldexpl_works" in *yes) gl_func_ldexpl=yes ;; *) gl_func_ldexpl=no; REPLACE_LDEXPL=1; LDEXPL_LIBM= ;; esac else gl_func_ldexpl=no fi if test $gl_func_ldexpl = yes; then AC_DEFINE([HAVE_LDEXPL], [1], [Define if the ldexpl() function is available.]) dnl Also check whether it's declared. dnl MacOS X 10.3 has ldexpl() in libc but doesn't declare it in . AC_CHECK_DECL([ldexpl], , [HAVE_DECL_LDEXPL=0], [#include ]) else HAVE_DECL_LDEXPL=0 AC_LIBOBJ([ldexpl]) fi AC_SUBST([LDEXPL_LIBM]) ]) dnl Test whether ldexpl() works on finite numbers (this fails on AIX 5.1 dnl and MacOS X 10.4/PowerPC). AC_DEFUN([gl_FUNC_LDEXPL_WORKS], [ AC_REQUIRE([AC_PROG_CC]) AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles AC_CACHE_CHECK([whether ldexpl works], [gl_cv_func_ldexpl_works], [ AC_TRY_RUN([ #include extern long double ldexpl (long double, int); int main() { volatile long double x1 = 1.0; volatile long double y1 = ldexpl (x1, -1); volatile long double x2 = 1.73205L; volatile long double y2 = ldexpl (x2, 0); return (y1 != 0.5L) || (y2 != x2); }], [gl_cv_func_ldexpl_works=yes], [gl_cv_func_ldexpl_works=no], [case "$host_os" in aix*) gl_cv_func_ldexpl_works="guessing no";; *) gl_cv_func_ldexpl_works="guessing yes";; esac ]) ]) ]) libprelude-1.0.0/libmissing/m4/printf.m40000664000076400007640000015500411341220436015017 00000000000000# printf.m4 serial 33 dnl Copyright (C) 2003, 2007-2010 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. dnl Test whether the *printf family of functions supports the 'j', 'z', 't', dnl 'L' size specifiers. (ISO C99, POSIX:2001) dnl Result is gl_cv_func_printf_sizes_c99. AC_DEFUN([gl_PRINTF_SIZES_C99], [ AC_REQUIRE([AC_PROG_CC]) AC_REQUIRE([gl_AC_HEADER_STDINT_H]) AC_REQUIRE([gl_AC_HEADER_INTTYPES_H]) AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles AC_CACHE_CHECK([whether printf supports size specifiers as in C99], [gl_cv_func_printf_sizes_c99], [ AC_TRY_RUN([ #include #include #include #include #if HAVE_STDINT_H_WITH_UINTMAX # include #endif #if HAVE_INTTYPES_H_WITH_UINTMAX # include #endif static char buf[100]; int main () { #if HAVE_STDINT_H_WITH_UINTMAX || HAVE_INTTYPES_H_WITH_UINTMAX buf[0] = '\0'; if (sprintf (buf, "%ju %d", (uintmax_t) 12345671, 33, 44, 55) < 0 || strcmp (buf, "12345671 33") != 0) return 1; #endif buf[0] = '\0'; if (sprintf (buf, "%zu %d", (size_t) 12345672, 33, 44, 55) < 0 || strcmp (buf, "12345672 33") != 0) return 1; buf[0] = '\0'; if (sprintf (buf, "%tu %d", (ptrdiff_t) 12345673, 33, 44, 55) < 0 || strcmp (buf, "12345673 33") != 0) return 1; buf[0] = '\0'; if (sprintf (buf, "%Lg %d", (long double) 1.5, 33, 44, 55) < 0 || strcmp (buf, "1.5 33") != 0) return 1; return 0; }], [gl_cv_func_printf_sizes_c99=yes], [gl_cv_func_printf_sizes_c99=no], [ changequote(,)dnl case "$host_os" in # Guess yes on glibc systems. *-gnu*) gl_cv_func_printf_sizes_c99="guessing yes";; # Guess yes on FreeBSD >= 5. freebsd[1-4]*) gl_cv_func_printf_sizes_c99="guessing no";; freebsd* | kfreebsd*) gl_cv_func_printf_sizes_c99="guessing yes";; # Guess yes on MacOS X >= 10.3. darwin[1-6].*) gl_cv_func_printf_sizes_c99="guessing no";; darwin*) gl_cv_func_printf_sizes_c99="guessing yes";; # Guess yes on OpenBSD >= 3.9. openbsd[1-2].* | openbsd3.[0-8] | openbsd3.[0-8].*) gl_cv_func_printf_sizes_c99="guessing no";; openbsd*) gl_cv_func_printf_sizes_c99="guessing yes";; # Guess yes on Solaris >= 2.10. solaris2.[0-9]*) gl_cv_func_printf_sizes_c99="guessing no";; solaris*) gl_cv_func_printf_sizes_c99="guessing yes";; # Guess yes on NetBSD >= 3. netbsd[1-2]* | netbsdelf[1-2]* | netbsdaout[1-2]* | netbsdcoff[1-2]*) gl_cv_func_printf_sizes_c99="guessing no";; netbsd*) gl_cv_func_printf_sizes_c99="guessing yes";; # If we don't know, assume the worst. *) gl_cv_func_printf_sizes_c99="guessing no";; esac changequote([,])dnl ]) ]) ]) dnl Test whether the *printf family of functions supports 'long double' dnl arguments together with the 'L' size specifier. (ISO C99, POSIX:2001) dnl Result is gl_cv_func_printf_long_double. AC_DEFUN([gl_PRINTF_LONG_DOUBLE], [ AC_REQUIRE([AC_PROG_CC]) AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles AC_CACHE_CHECK([whether printf supports 'long double' arguments], [gl_cv_func_printf_long_double], [ AC_TRY_RUN([ #include #include static char buf[10000]; int main () { buf[0] = '\0'; if (sprintf (buf, "%Lf %d", 1.75L, 33, 44, 55) < 0 || strcmp (buf, "1.750000 33") != 0) return 1; buf[0] = '\0'; if (sprintf (buf, "%Le %d", 1.75L, 33, 44, 55) < 0 || strcmp (buf, "1.750000e+00 33") != 0) return 1; buf[0] = '\0'; if (sprintf (buf, "%Lg %d", 1.75L, 33, 44, 55) < 0 || strcmp (buf, "1.75 33") != 0) return 1; return 0; }], [gl_cv_func_printf_long_double=yes], [gl_cv_func_printf_long_double=no], [ changequote(,)dnl case "$host_os" in beos*) gl_cv_func_printf_long_double="guessing no";; mingw* | pw*) gl_cv_func_printf_long_double="guessing no";; *) gl_cv_func_printf_long_double="guessing yes";; esac changequote([,])dnl ]) ]) ]) dnl Test whether the *printf family of functions supports infinite and NaN dnl 'double' arguments and negative zero arguments in the %f, %e, %g dnl directives. (ISO C99, POSIX:2001) dnl Result is gl_cv_func_printf_infinite. AC_DEFUN([gl_PRINTF_INFINITE], [ AC_REQUIRE([AC_PROG_CC]) AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles AC_CACHE_CHECK([whether printf supports infinite 'double' arguments], [gl_cv_func_printf_infinite], [ AC_TRY_RUN([ #include #include static int strisnan (const char *string, size_t start_index, size_t end_index) { if (start_index < end_index) { if (string[start_index] == '-') start_index++; if (start_index + 3 <= end_index && memcmp (string + start_index, "nan", 3) == 0) { start_index += 3; if (start_index == end_index || (string[start_index] == '(' && string[end_index - 1] == ')')) return 1; } } return 0; } static int have_minus_zero () { static double plus_zero = 0.0; double minus_zero = - plus_zero; return memcmp (&plus_zero, &minus_zero, sizeof (double)) != 0; } static char buf[10000]; static double zero = 0.0; int main () { if (sprintf (buf, "%f", 1.0 / 0.0) < 0 || (strcmp (buf, "inf") != 0 && strcmp (buf, "infinity") != 0)) return 1; if (sprintf (buf, "%f", -1.0 / 0.0) < 0 || (strcmp (buf, "-inf") != 0 && strcmp (buf, "-infinity") != 0)) return 1; if (sprintf (buf, "%f", zero / zero) < 0 || !strisnan (buf, 0, strlen (buf))) return 1; if (sprintf (buf, "%e", 1.0 / 0.0) < 0 || (strcmp (buf, "inf") != 0 && strcmp (buf, "infinity") != 0)) return 1; if (sprintf (buf, "%e", -1.0 / 0.0) < 0 || (strcmp (buf, "-inf") != 0 && strcmp (buf, "-infinity") != 0)) return 1; if (sprintf (buf, "%e", zero / zero) < 0 || !strisnan (buf, 0, strlen (buf))) return 1; if (sprintf (buf, "%g", 1.0 / 0.0) < 0 || (strcmp (buf, "inf") != 0 && strcmp (buf, "infinity") != 0)) return 1; if (sprintf (buf, "%g", -1.0 / 0.0) < 0 || (strcmp (buf, "-inf") != 0 && strcmp (buf, "-infinity") != 0)) return 1; if (sprintf (buf, "%g", zero / zero) < 0 || !strisnan (buf, 0, strlen (buf))) return 1; /* This test fails on HP-UX 10.20. */ if (have_minus_zero ()) if (sprintf (buf, "%g", - zero) < 0 || strcmp (buf, "-0") != 0) return 1; return 0; }], [gl_cv_func_printf_infinite=yes], [gl_cv_func_printf_infinite=no], [ changequote(,)dnl case "$host_os" in # Guess yes on glibc systems. *-gnu*) gl_cv_func_printf_infinite="guessing yes";; # Guess yes on FreeBSD >= 6. freebsd[1-5]*) gl_cv_func_printf_infinite="guessing no";; freebsd* | kfreebsd*) gl_cv_func_printf_infinite="guessing yes";; # Guess yes on MacOS X >= 10.3. darwin[1-6].*) gl_cv_func_printf_infinite="guessing no";; darwin*) gl_cv_func_printf_infinite="guessing yes";; # Guess yes on HP-UX >= 11. hpux[7-9]* | hpux10*) gl_cv_func_printf_infinite="guessing no";; hpux*) gl_cv_func_printf_infinite="guessing yes";; # Guess yes on NetBSD >= 3. netbsd[1-2]* | netbsdelf[1-2]* | netbsdaout[1-2]* | netbsdcoff[1-2]*) gl_cv_func_printf_infinite="guessing no";; netbsd*) gl_cv_func_printf_infinite="guessing yes";; # Guess yes on BeOS. beos*) gl_cv_func_printf_infinite="guessing yes";; # If we don't know, assume the worst. *) gl_cv_func_printf_infinite="guessing no";; esac changequote([,])dnl ]) ]) ]) dnl Test whether the *printf family of functions supports infinite and NaN dnl 'long double' arguments in the %f, %e, %g directives. (ISO C99, POSIX:2001) dnl Result is gl_cv_func_printf_infinite_long_double. AC_DEFUN([gl_PRINTF_INFINITE_LONG_DOUBLE], [ AC_REQUIRE([gl_PRINTF_LONG_DOUBLE]) AC_REQUIRE([AC_PROG_CC]) AC_REQUIRE([gl_BIGENDIAN]) AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles dnl The user can set or unset the variable gl_printf_safe to indicate dnl that he wishes a safe handling of non-IEEE-754 'long double' values. if test -n "$gl_printf_safe"; then AC_DEFINE([CHECK_PRINTF_SAFE], [1], [Define if you wish *printf() functions that have a safe handling of non-IEEE-754 'long double' values.]) fi case "$gl_cv_func_printf_long_double" in *yes) AC_CACHE_CHECK([whether printf supports infinite 'long double' arguments], [gl_cv_func_printf_infinite_long_double], [ AC_TRY_RUN([ ]GL_NOCRASH[ #include #include #include static int strisnan (const char *string, size_t start_index, size_t end_index) { if (start_index < end_index) { if (string[start_index] == '-') start_index++; if (start_index + 3 <= end_index && memcmp (string + start_index, "nan", 3) == 0) { start_index += 3; if (start_index == end_index || (string[start_index] == '(' && string[end_index - 1] == ')')) return 1; } } return 0; } static char buf[10000]; static long double zeroL = 0.0L; int main () { nocrash_init(); if (sprintf (buf, "%Lf", 1.0L / 0.0L) < 0 || (strcmp (buf, "inf") != 0 && strcmp (buf, "infinity") != 0)) return 1; if (sprintf (buf, "%Lf", -1.0L / 0.0L) < 0 || (strcmp (buf, "-inf") != 0 && strcmp (buf, "-infinity") != 0)) return 1; if (sprintf (buf, "%Lf", zeroL / zeroL) < 0 || !strisnan (buf, 0, strlen (buf))) return 1; if (sprintf (buf, "%Le", 1.0L / 0.0L) < 0 || (strcmp (buf, "inf") != 0 && strcmp (buf, "infinity") != 0)) return 1; if (sprintf (buf, "%Le", -1.0L / 0.0L) < 0 || (strcmp (buf, "-inf") != 0 && strcmp (buf, "-infinity") != 0)) return 1; if (sprintf (buf, "%Le", zeroL / zeroL) < 0 || !strisnan (buf, 0, strlen (buf))) return 1; if (sprintf (buf, "%Lg", 1.0L / 0.0L) < 0 || (strcmp (buf, "inf") != 0 && strcmp (buf, "infinity") != 0)) return 1; if (sprintf (buf, "%Lg", -1.0L / 0.0L) < 0 || (strcmp (buf, "-inf") != 0 && strcmp (buf, "-infinity") != 0)) return 1; if (sprintf (buf, "%Lg", zeroL / zeroL) < 0 || !strisnan (buf, 0, strlen (buf))) return 1; #if CHECK_PRINTF_SAFE && ((defined __ia64 && LDBL_MANT_DIG == 64) || (defined __x86_64__ || defined __amd64__) || (defined __i386 || defined __i386__ || defined _I386 || defined _M_IX86 || defined _X86_)) /* Representation of an 80-bit 'long double' as an initializer for a sequence of 'unsigned int' words. */ # ifdef WORDS_BIGENDIAN # define LDBL80_WORDS(exponent,manthi,mantlo) \ { ((unsigned int) (exponent) << 16) | ((unsigned int) (manthi) >> 16), \ ((unsigned int) (manthi) << 16) | (unsigned int) (mantlo) >> 16), \ (unsigned int) (mantlo) << 16 \ } # else # define LDBL80_WORDS(exponent,manthi,mantlo) \ { mantlo, manthi, exponent } # endif { /* Quiet NaN. */ static union { unsigned int word[4]; long double value; } x = { LDBL80_WORDS (0xFFFF, 0xC3333333, 0x00000000) }; if (sprintf (buf, "%Lf", x.value) < 0 || !strisnan (buf, 0, strlen (buf))) return 1; if (sprintf (buf, "%Le", x.value) < 0 || !strisnan (buf, 0, strlen (buf))) return 1; if (sprintf (buf, "%Lg", x.value) < 0 || !strisnan (buf, 0, strlen (buf))) return 1; } { /* Signalling NaN. */ static union { unsigned int word[4]; long double value; } x = { LDBL80_WORDS (0xFFFF, 0x83333333, 0x00000000) }; if (sprintf (buf, "%Lf", x.value) < 0 || !strisnan (buf, 0, strlen (buf))) return 1; if (sprintf (buf, "%Le", x.value) < 0 || !strisnan (buf, 0, strlen (buf))) return 1; if (sprintf (buf, "%Lg", x.value) < 0 || !strisnan (buf, 0, strlen (buf))) return 1; } { /* Pseudo-NaN. */ static union { unsigned int word[4]; long double value; } x = { LDBL80_WORDS (0xFFFF, 0x40000001, 0x00000000) }; if (sprintf (buf, "%Lf", x.value) < 0 || !strisnan (buf, 0, strlen (buf))) return 1; if (sprintf (buf, "%Le", x.value) < 0 || !strisnan (buf, 0, strlen (buf))) return 1; if (sprintf (buf, "%Lg", x.value) < 0 || !strisnan (buf, 0, strlen (buf))) return 1; } { /* Pseudo-Infinity. */ static union { unsigned int word[4]; long double value; } x = { LDBL80_WORDS (0xFFFF, 0x00000000, 0x00000000) }; if (sprintf (buf, "%Lf", x.value) < 0 || !strisnan (buf, 0, strlen (buf))) return 1; if (sprintf (buf, "%Le", x.value) < 0 || !strisnan (buf, 0, strlen (buf))) return 1; if (sprintf (buf, "%Lg", x.value) < 0 || !strisnan (buf, 0, strlen (buf))) return 1; } { /* Pseudo-Zero. */ static union { unsigned int word[4]; long double value; } x = { LDBL80_WORDS (0x4004, 0x00000000, 0x00000000) }; if (sprintf (buf, "%Lf", x.value) < 0 || !strisnan (buf, 0, strlen (buf))) return 1; if (sprintf (buf, "%Le", x.value) < 0 || !strisnan (buf, 0, strlen (buf))) return 1; if (sprintf (buf, "%Lg", x.value) < 0 || !strisnan (buf, 0, strlen (buf))) return 1; } { /* Unnormalized number. */ static union { unsigned int word[4]; long double value; } x = { LDBL80_WORDS (0x4000, 0x63333333, 0x00000000) }; if (sprintf (buf, "%Lf", x.value) < 0 || !strisnan (buf, 0, strlen (buf))) return 1; if (sprintf (buf, "%Le", x.value) < 0 || !strisnan (buf, 0, strlen (buf))) return 1; if (sprintf (buf, "%Lg", x.value) < 0 || !strisnan (buf, 0, strlen (buf))) return 1; } { /* Pseudo-Denormal. */ static union { unsigned int word[4]; long double value; } x = { LDBL80_WORDS (0x0000, 0x83333333, 0x00000000) }; if (sprintf (buf, "%Lf", x.value) < 0 || !strisnan (buf, 0, strlen (buf))) return 1; if (sprintf (buf, "%Le", x.value) < 0 || !strisnan (buf, 0, strlen (buf))) return 1; if (sprintf (buf, "%Lg", x.value) < 0 || !strisnan (buf, 0, strlen (buf))) return 1; } #endif return 0; }], [gl_cv_func_printf_infinite_long_double=yes], [gl_cv_func_printf_infinite_long_double=no], [ changequote(,)dnl case "$host_cpu" in # Guess no on ia64, x86_64, i386. ia64 | x86_64 | i*86) gl_cv_func_printf_infinite_long_double="guessing no";; *) case "$host_os" in # Guess yes on glibc systems. *-gnu*) gl_cv_func_printf_infinite_long_double="guessing yes";; # Guess yes on FreeBSD >= 6. freebsd[1-5]*) gl_cv_func_printf_infinite_long_double="guessing no";; freebsd* | kfreebsd*) gl_cv_func_printf_infinite_long_double="guessing yes";; # Guess yes on MacOS X >= 10.3. darwin[1-6].*) gl_cv_func_printf_infinite_long_double="guessing no";; darwin*) gl_cv_func_printf_infinite_long_double="guessing yes";; # Guess yes on HP-UX >= 11. hpux[7-9]* | hpux10*) gl_cv_func_printf_infinite_long_double="guessing no";; hpux*) gl_cv_func_printf_infinite_long_double="guessing yes";; # Guess yes on NetBSD >= 3. netbsd[1-2]* | netbsdelf[1-2]* | netbsdaout[1-2]* | netbsdcoff[1-2]*) gl_cv_func_printf_infinite_long_double="guessing no";; netbsd*) gl_cv_func_printf_infinite_long_double="guessing yes";; # If we don't know, assume the worst. *) gl_cv_func_printf_infinite_long_double="guessing no";; esac ;; esac changequote([,])dnl ]) ]) ;; *) gl_cv_func_printf_infinite_long_double="irrelevant" ;; esac ]) dnl Test whether the *printf family of functions supports the 'a' and 'A' dnl conversion specifier for hexadecimal output of floating-point numbers. dnl (ISO C99, POSIX:2001) dnl Result is gl_cv_func_printf_directive_a. AC_DEFUN([gl_PRINTF_DIRECTIVE_A], [ AC_REQUIRE([AC_PROG_CC]) AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles AC_CACHE_CHECK([whether printf supports the 'a' and 'A' directives], [gl_cv_func_printf_directive_a], [ AC_TRY_RUN([ #include #include static char buf[100]; int main () { if (sprintf (buf, "%a %d", 3.1416015625, 33, 44, 55) < 0 || (strcmp (buf, "0x1.922p+1 33") != 0 && strcmp (buf, "0x3.244p+0 33") != 0 && strcmp (buf, "0x6.488p-1 33") != 0 && strcmp (buf, "0xc.91p-2 33") != 0)) return 1; if (sprintf (buf, "%A %d", -3.1416015625, 33, 44, 55) < 0 || (strcmp (buf, "-0X1.922P+1 33") != 0 && strcmp (buf, "-0X3.244P+0 33") != 0 && strcmp (buf, "-0X6.488P-1 33") != 0 && strcmp (buf, "-0XC.91P-2 33") != 0)) return 1; /* This catches a FreeBSD 6.1 bug: it doesn't round. */ if (sprintf (buf, "%.2a %d", 1.51, 33, 44, 55) < 0 || (strcmp (buf, "0x1.83p+0 33") != 0 && strcmp (buf, "0x3.05p-1 33") != 0 && strcmp (buf, "0x6.0ap-2 33") != 0 && strcmp (buf, "0xc.14p-3 33") != 0)) return 1; /* This catches a FreeBSD 6.1 bug. See */ if (sprintf (buf, "%010a %d", 1.0 / 0.0, 33, 44, 55) < 0 || buf[0] == '0') return 1; /* This catches a MacOS X 10.3.9 (Darwin 7.9) bug. */ if (sprintf (buf, "%.1a", 1.999) < 0 || (strcmp (buf, "0x1.0p+1") != 0 && strcmp (buf, "0x2.0p+0") != 0 && strcmp (buf, "0x4.0p-1") != 0 && strcmp (buf, "0x8.0p-2") != 0)) return 1; /* This catches the same MacOS X 10.3.9 (Darwin 7.9) bug and also a glibc 2.4 bug . */ if (sprintf (buf, "%.1La", 1.999L) < 0 || (strcmp (buf, "0x1.0p+1") != 0 && strcmp (buf, "0x2.0p+0") != 0 && strcmp (buf, "0x4.0p-1") != 0 && strcmp (buf, "0x8.0p-2") != 0)) return 1; return 0; }], [gl_cv_func_printf_directive_a=yes], [gl_cv_func_printf_directive_a=no], [ case "$host_os" in # Guess yes on glibc >= 2.5 systems. *-gnu*) AC_EGREP_CPP([BZ2908], [ #include #ifdef __GNU_LIBRARY__ #if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 5) || (__GLIBC__ > 2) BZ2908 #endif #endif ], [gl_cv_func_printf_directive_a="guessing yes"], [gl_cv_func_printf_directive_a="guessing no"]) ;; # If we don't know, assume the worst. *) gl_cv_func_printf_directive_a="guessing no";; esac ]) ]) ]) dnl Test whether the *printf family of functions supports the %F format dnl directive. (ISO C99, POSIX:2001) dnl Result is gl_cv_func_printf_directive_f. AC_DEFUN([gl_PRINTF_DIRECTIVE_F], [ AC_REQUIRE([AC_PROG_CC]) AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles AC_CACHE_CHECK([whether printf supports the 'F' directive], [gl_cv_func_printf_directive_f], [ AC_TRY_RUN([ #include #include static char buf[100]; int main () { if (sprintf (buf, "%F %d", 1234567.0, 33, 44, 55) < 0 || strcmp (buf, "1234567.000000 33") != 0) return 1; if (sprintf (buf, "%F", 1.0 / 0.0) < 0 || (strcmp (buf, "INF") != 0 && strcmp (buf, "INFINITY") != 0)) return 1; /* This catches a Cygwin 1.5.x bug. */ if (sprintf (buf, "%.F", 1234.0) < 0 || strcmp (buf, "1234") != 0) return 1; return 0; }], [gl_cv_func_printf_directive_f=yes], [gl_cv_func_printf_directive_f=no], [ changequote(,)dnl case "$host_os" in # Guess yes on glibc systems. *-gnu*) gl_cv_func_printf_directive_f="guessing yes";; # Guess yes on FreeBSD >= 6. freebsd[1-5]*) gl_cv_func_printf_directive_f="guessing no";; freebsd* | kfreebsd*) gl_cv_func_printf_directive_f="guessing yes";; # Guess yes on MacOS X >= 10.3. darwin[1-6].*) gl_cv_func_printf_directive_f="guessing no";; darwin*) gl_cv_func_printf_directive_f="guessing yes";; # Guess yes on Solaris >= 2.10. solaris2.[0-9]*) gl_cv_func_printf_directive_f="guessing no";; solaris*) gl_cv_func_printf_directive_f="guessing yes";; # If we don't know, assume the worst. *) gl_cv_func_printf_directive_f="guessing no";; esac changequote([,])dnl ]) ]) ]) dnl Test whether the *printf family of functions supports the %n format dnl directive. (ISO C99, POSIX:2001) dnl Result is gl_cv_func_printf_directive_n. AC_DEFUN([gl_PRINTF_DIRECTIVE_N], [ AC_REQUIRE([AC_PROG_CC]) AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles AC_CACHE_CHECK([whether printf supports the 'n' directive], [gl_cv_func_printf_directive_n], [ AC_TRY_RUN([ #include #include static char fmtstring[10]; static char buf[100]; int main () { int count = -1; /* Copy the format string. Some systems (glibc with _FORTIFY_SOURCE=2) support %n in format strings in read-only memory but not in writable memory. */ strcpy (fmtstring, "%d %n"); if (sprintf (buf, fmtstring, 123, &count, 33, 44, 55) < 0 || strcmp (buf, "123 ") != 0 || count != 4) return 1; return 0; }], [gl_cv_func_printf_directive_n=yes], [gl_cv_func_printf_directive_n=no], [ changequote(,)dnl case "$host_os" in *) gl_cv_func_printf_directive_n="guessing yes";; esac changequote([,])dnl ]) ]) ]) dnl Test whether the *printf family of functions supports the %ls format dnl directive and in particular, when a precision is specified, whether dnl the functions stop converting the wide string argument when the number dnl of bytes that have been produced by this conversion equals or exceeds dnl the precision. dnl Result is gl_cv_func_printf_directive_ls. AC_DEFUN([gl_PRINTF_DIRECTIVE_LS], [ AC_REQUIRE([AC_PROG_CC]) AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles AC_CACHE_CHECK([whether printf supports the 'ls' directive], [gl_cv_func_printf_directive_ls], [ AC_TRY_RUN([ /* Tru64 with Desktop Toolkit C has a bug: must be included before . BSD/OS 4.0.1 has a bug: , and must be included before . */ #include #include #include #include #include int main () { char buf[100]; /* Test whether %ls works at all. This test fails on OpenBSD 4.0, IRIX 6.5, Solaris 2.6, Haiku, but not on Cygwin 1.5. */ { static const wchar_t wstring[] = { 'a', 'b', 'c', 0 }; buf[0] = '\0'; if (sprintf (buf, "%ls", wstring) < 0 || strcmp (buf, "abc") != 0) return 1; } /* This test fails on IRIX 6.5, Solaris 2.6, Cygwin 1.5, Haiku (with an assertion failure inside libc), but not on OpenBSD 4.0. */ { static const wchar_t wstring[] = { 'a', 0 }; buf[0] = '\0'; if (sprintf (buf, "%ls", wstring) < 0 || strcmp (buf, "a") != 0) return 1; } /* Test whether precisions in %ls are supported as specified in ISO C 99 section 7.19.6.1: "If a precision is specified, no more than that many bytes are written (including shift sequences, if any), and the array shall contain a null wide character if, to equal the multibyte character sequence length given by the precision, the function would need to access a wide character one past the end of the array." This test fails on Solaris 10. */ { static const wchar_t wstring[] = { 'a', 'b', (wchar_t) 0xfdfdfdfd, 0 }; buf[0] = '\0'; if (sprintf (buf, "%.2ls", wstring) < 0 || strcmp (buf, "ab") != 0) return 1; } return 0; }], [gl_cv_func_printf_directive_ls=yes], [gl_cv_func_printf_directive_ls=no], [ changequote(,)dnl case "$host_os" in openbsd*) gl_cv_func_printf_directive_ls="guessing no";; irix*) gl_cv_func_printf_directive_ls="guessing no";; solaris*) gl_cv_func_printf_directive_ls="guessing no";; cygwin*) gl_cv_func_printf_directive_ls="guessing no";; beos* | haiku*) gl_cv_func_printf_directive_ls="guessing no";; *) gl_cv_func_printf_directive_ls="guessing yes";; esac changequote([,])dnl ]) ]) ]) dnl Test whether the *printf family of functions supports POSIX/XSI format dnl strings with positions. (POSIX:2001) dnl Result is gl_cv_func_printf_positions. AC_DEFUN([gl_PRINTF_POSITIONS], [ AC_REQUIRE([AC_PROG_CC]) AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles AC_CACHE_CHECK([whether printf supports POSIX/XSI format strings with positions], [gl_cv_func_printf_positions], [ AC_TRY_RUN([ #include #include /* The string "%2$d %1$d", with dollar characters protected from the shell's dollar expansion (possibly an autoconf bug). */ static char format[] = { '%', '2', '$', 'd', ' ', '%', '1', '$', 'd', '\0' }; static char buf[100]; int main () { sprintf (buf, format, 33, 55); return (strcmp (buf, "55 33") != 0); }], [gl_cv_func_printf_positions=yes], [gl_cv_func_printf_positions=no], [ changequote(,)dnl case "$host_os" in netbsd[1-3]* | netbsdelf[1-3]* | netbsdaout[1-3]* | netbsdcoff[1-3]*) gl_cv_func_printf_positions="guessing no";; beos*) gl_cv_func_printf_positions="guessing no";; mingw* | pw*) gl_cv_func_printf_positions="guessing no";; *) gl_cv_func_printf_positions="guessing yes";; esac changequote([,])dnl ]) ]) ]) dnl Test whether the *printf family of functions supports POSIX/XSI format dnl strings with the ' flag for grouping of decimal digits. (POSIX:2001) dnl Result is gl_cv_func_printf_flag_grouping. AC_DEFUN([gl_PRINTF_FLAG_GROUPING], [ AC_REQUIRE([AC_PROG_CC]) AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles AC_CACHE_CHECK([whether printf supports the grouping flag], [gl_cv_func_printf_flag_grouping], [ AC_TRY_RUN([ #include #include static char buf[100]; int main () { if (sprintf (buf, "%'d %d", 1234567, 99) < 0 || buf[strlen (buf) - 1] != '9') return 1; return 0; }], [gl_cv_func_printf_flag_grouping=yes], [gl_cv_func_printf_flag_grouping=no], [ changequote(,)dnl case "$host_os" in cygwin*) gl_cv_func_printf_flag_grouping="guessing no";; netbsd*) gl_cv_func_printf_flag_grouping="guessing no";; mingw* | pw*) gl_cv_func_printf_flag_grouping="guessing no";; *) gl_cv_func_printf_flag_grouping="guessing yes";; esac changequote([,])dnl ]) ]) ]) dnl Test whether the *printf family of functions supports the - flag correctly. dnl (ISO C99.) See dnl dnl Result is gl_cv_func_printf_flag_leftadjust. AC_DEFUN([gl_PRINTF_FLAG_LEFTADJUST], [ AC_REQUIRE([AC_PROG_CC]) AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles AC_CACHE_CHECK([whether printf supports the left-adjust flag correctly], [gl_cv_func_printf_flag_leftadjust], [ AC_TRY_RUN([ #include #include static char buf[100]; int main () { /* Check that a '-' flag is not annihilated by a negative width. */ if (sprintf (buf, "a%-*sc", -3, "b") < 0 || strcmp (buf, "ab c") != 0) return 1; return 0; }], [gl_cv_func_printf_flag_leftadjust=yes], [gl_cv_func_printf_flag_leftadjust=no], [ changequote(,)dnl case "$host_os" in # Guess yes on HP-UX 11. hpux11*) gl_cv_func_printf_flag_leftadjust="guessing yes";; # Guess no on HP-UX 10 and older. hpux*) gl_cv_func_printf_flag_leftadjust="guessing no";; # Guess yes otherwise. *) gl_cv_func_printf_flag_leftadjust="guessing yes";; esac changequote([,])dnl ]) ]) ]) dnl Test whether the *printf family of functions supports padding of non-finite dnl values with the 0 flag correctly. (ISO C99 + TC1 + TC2.) See dnl dnl Result is gl_cv_func_printf_flag_zero. AC_DEFUN([gl_PRINTF_FLAG_ZERO], [ AC_REQUIRE([AC_PROG_CC]) AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles AC_CACHE_CHECK([whether printf supports the zero flag correctly], [gl_cv_func_printf_flag_zero], [ AC_TRY_RUN([ #include #include static char buf[100]; int main () { if (sprintf (buf, "%010f", 1.0 / 0.0, 33, 44, 55) < 0 || (strcmp (buf, " inf") != 0 && strcmp (buf, " infinity") != 0)) return 1; return 0; }], [gl_cv_func_printf_flag_zero=yes], [gl_cv_func_printf_flag_zero=no], [ changequote(,)dnl case "$host_os" in # Guess yes on glibc systems. *-gnu*) gl_cv_func_printf_flag_zero="guessing yes";; # Guess yes on BeOS. beos*) gl_cv_func_printf_flag_zero="guessing yes";; # If we don't know, assume the worst. *) gl_cv_func_printf_flag_zero="guessing no";; esac changequote([,])dnl ]) ]) ]) dnl Test whether the *printf family of functions supports large precisions. dnl On mingw, precisions larger than 512 are treated like 512, in integer, dnl floating-point or pointer output. On BeOS, precisions larger than 1044 dnl crash the program. dnl Result is gl_cv_func_printf_precision. AC_DEFUN([gl_PRINTF_PRECISION], [ AC_REQUIRE([AC_PROG_CC]) AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles AC_CACHE_CHECK([whether printf supports large precisions], [gl_cv_func_printf_precision], [ AC_TRY_RUN([ #include #include static char buf[5000]; int main () { #ifdef __BEOS__ /* On BeOS, this would crash and show a dialog box. Avoid the crash. */ return 1; #endif if (sprintf (buf, "%.4000d %d", 1, 33, 44) < 4000 + 3) return 1; return 0; }], [gl_cv_func_printf_precision=yes], [gl_cv_func_printf_precision=no], [ changequote(,)dnl case "$host_os" in # Guess no only on native Win32 and BeOS systems. mingw* | pw*) gl_cv_func_printf_precision="guessing no" ;; beos*) gl_cv_func_printf_precision="guessing no" ;; *) gl_cv_func_printf_precision="guessing yes" ;; esac changequote([,])dnl ]) ]) ]) dnl Test whether the *printf family of functions recovers gracefully in case dnl of an out-of-memory condition, or whether it crashes the entire program. dnl Result is gl_cv_func_printf_enomem. AC_DEFUN([gl_PRINTF_ENOMEM], [ AC_REQUIRE([AC_PROG_CC]) AC_REQUIRE([gl_MULTIARCH]) AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles AC_CACHE_CHECK([whether printf survives out-of-memory conditions], [gl_cv_func_printf_enomem], [ gl_cv_func_printf_enomem="guessing no" if test "$cross_compiling" = no; then if test $APPLE_UNIVERSAL_BUILD = 0; then AC_LANG_CONFTEST([AC_LANG_SOURCE([ ]GL_NOCRASH[ changequote(,)dnl #include #include #include #include #include int main() { struct rlimit limit; int ret; nocrash_init (); /* Some printf implementations allocate temporary space with malloc. */ /* On BSD systems, malloc() is limited by RLIMIT_DATA. */ #ifdef RLIMIT_DATA if (getrlimit (RLIMIT_DATA, &limit) < 0) return 77; if (limit.rlim_max == RLIM_INFINITY || limit.rlim_max > 5000000) limit.rlim_max = 5000000; limit.rlim_cur = limit.rlim_max; if (setrlimit (RLIMIT_DATA, &limit) < 0) return 77; #endif /* On Linux systems, malloc() is limited by RLIMIT_AS. */ #ifdef RLIMIT_AS if (getrlimit (RLIMIT_AS, &limit) < 0) return 77; if (limit.rlim_max == RLIM_INFINITY || limit.rlim_max > 5000000) limit.rlim_max = 5000000; limit.rlim_cur = limit.rlim_max; if (setrlimit (RLIMIT_AS, &limit) < 0) return 77; #endif /* Some printf implementations allocate temporary space on the stack. */ #ifdef RLIMIT_STACK if (getrlimit (RLIMIT_STACK, &limit) < 0) return 77; if (limit.rlim_max == RLIM_INFINITY || limit.rlim_max > 5000000) limit.rlim_max = 5000000; limit.rlim_cur = limit.rlim_max; if (setrlimit (RLIMIT_STACK, &limit) < 0) return 77; #endif ret = printf ("%.5000000f", 1.0); return !(ret == 5000002 || (ret < 0 && errno == ENOMEM)); } changequote([,])dnl ])]) if AC_TRY_EVAL([ac_link]) && test -s conftest$ac_exeext; then (./conftest result=$? if test $result != 0 && test $result != 77; then result=1; fi exit $result ) >/dev/null 2>/dev/null case $? in 0) gl_cv_func_printf_enomem="yes" ;; 77) gl_cv_func_printf_enomem="guessing no" ;; *) gl_cv_func_printf_enomem="no" ;; esac else gl_cv_func_printf_enomem="guessing no" fi rm -fr conftest* else dnl A universal build on Apple MacOS X platforms. dnl The result would be 'no' in 32-bit mode and 'yes' in 64-bit mode. dnl But we need a configuration result that is valid in both modes. gl_cv_func_printf_enomem="guessing no" fi fi if test "$gl_cv_func_printf_enomem" = "guessing no"; then changequote(,)dnl case "$host_os" in # Guess yes on glibc systems. *-gnu*) gl_cv_func_printf_enomem="guessing yes";; # Guess yes on Solaris. solaris*) gl_cv_func_printf_enomem="guessing yes";; # Guess yes on AIX. aix*) gl_cv_func_printf_enomem="guessing yes";; # Guess yes on HP-UX/hppa. hpux*) case "$host_cpu" in hppa*) gl_cv_func_printf_enomem="guessing yes";; *) gl_cv_func_printf_enomem="guessing no";; esac ;; # Guess yes on IRIX. irix*) gl_cv_func_printf_enomem="guessing yes";; # Guess yes on OSF/1. osf*) gl_cv_func_printf_enomem="guessing yes";; # Guess yes on BeOS. beos*) gl_cv_func_printf_enomem="guessing yes";; # Guess yes on Haiku. haiku*) gl_cv_func_printf_enomem="guessing yes";; # If we don't know, assume the worst. *) gl_cv_func_printf_enomem="guessing no";; esac changequote([,])dnl fi ]) ]) dnl Test whether the snprintf function exists. (ISO C99, POSIX:2001) dnl Result is ac_cv_func_snprintf. AC_DEFUN([gl_SNPRINTF_PRESENCE], [ AC_CHECK_FUNCS_ONCE([snprintf]) ]) dnl Test whether the string produced by the snprintf function is always NUL dnl terminated. (ISO C99, POSIX:2001) dnl Result is gl_cv_func_snprintf_truncation_c99. AC_DEFUN([gl_SNPRINTF_TRUNCATION_C99], [ AC_REQUIRE([AC_PROG_CC]) AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles AC_CACHE_CHECK([whether snprintf truncates the result as in C99], [gl_cv_func_snprintf_truncation_c99], [ AC_TRY_RUN([ #include #include static char buf[100]; int main () { strcpy (buf, "ABCDEF"); snprintf (buf, 3, "%d %d", 4567, 89); if (memcmp (buf, "45\0DEF", 6) != 0) return 1; return 0; }], [gl_cv_func_snprintf_truncation_c99=yes], [gl_cv_func_snprintf_truncation_c99=no], [ changequote(,)dnl case "$host_os" in # Guess yes on glibc systems. *-gnu*) gl_cv_func_snprintf_truncation_c99="guessing yes";; # Guess yes on FreeBSD >= 5. freebsd[1-4]*) gl_cv_func_snprintf_truncation_c99="guessing no";; freebsd* | kfreebsd*) gl_cv_func_snprintf_truncation_c99="guessing yes";; # Guess yes on MacOS X >= 10.3. darwin[1-6].*) gl_cv_func_snprintf_truncation_c99="guessing no";; darwin*) gl_cv_func_snprintf_truncation_c99="guessing yes";; # Guess yes on OpenBSD >= 3.9. openbsd[1-2].* | openbsd3.[0-8] | openbsd3.[0-8].*) gl_cv_func_snprintf_truncation_c99="guessing no";; openbsd*) gl_cv_func_snprintf_truncation_c99="guessing yes";; # Guess yes on Solaris >= 2.6. solaris2.[0-5]*) gl_cv_func_snprintf_truncation_c99="guessing no";; solaris*) gl_cv_func_snprintf_truncation_c99="guessing yes";; # Guess yes on AIX >= 4. aix[1-3]*) gl_cv_func_snprintf_truncation_c99="guessing no";; aix*) gl_cv_func_snprintf_truncation_c99="guessing yes";; # Guess yes on HP-UX >= 11. hpux[7-9]* | hpux10*) gl_cv_func_snprintf_truncation_c99="guessing no";; hpux*) gl_cv_func_snprintf_truncation_c99="guessing yes";; # Guess yes on IRIX >= 6.5. irix6.5) gl_cv_func_snprintf_truncation_c99="guessing yes";; # Guess yes on OSF/1 >= 5. osf[3-4]*) gl_cv_func_snprintf_truncation_c99="guessing no";; osf*) gl_cv_func_snprintf_truncation_c99="guessing yes";; # Guess yes on NetBSD >= 3. netbsd[1-2]* | netbsdelf[1-2]* | netbsdaout[1-2]* | netbsdcoff[1-2]*) gl_cv_func_snprintf_truncation_c99="guessing no";; netbsd*) gl_cv_func_snprintf_truncation_c99="guessing yes";; # Guess yes on BeOS. beos*) gl_cv_func_snprintf_truncation_c99="guessing yes";; # If we don't know, assume the worst. *) gl_cv_func_snprintf_truncation_c99="guessing no";; esac changequote([,])dnl ]) ]) ]) dnl Test whether the return value of the snprintf function is the number dnl of bytes (excluding the terminating NUL) that would have been produced dnl if the buffer had been large enough. (ISO C99, POSIX:2001) dnl For example, this test program fails on IRIX 6.5: dnl --------------------------------------------------------------------- dnl #include dnl int main() dnl { dnl static char buf[8]; dnl int retval = snprintf (buf, 3, "%d", 12345); dnl return retval >= 0 && retval < 3; dnl } dnl --------------------------------------------------------------------- dnl Result is gl_cv_func_snprintf_retval_c99. AC_DEFUN([gl_SNPRINTF_RETVAL_C99], [ AC_REQUIRE([AC_PROG_CC]) AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles AC_CACHE_CHECK([whether snprintf returns a byte count as in C99], [gl_cv_func_snprintf_retval_c99], [ AC_TRY_RUN([ #include #include static char buf[100]; int main () { strcpy (buf, "ABCDEF"); if (snprintf (buf, 3, "%d %d", 4567, 89) != 7) return 1; return 0; }], [gl_cv_func_snprintf_retval_c99=yes], [gl_cv_func_snprintf_retval_c99=no], [ changequote(,)dnl case "$host_os" in # Guess yes on glibc systems. *-gnu*) gl_cv_func_snprintf_retval_c99="guessing yes";; # Guess yes on FreeBSD >= 5. freebsd[1-4]*) gl_cv_func_snprintf_retval_c99="guessing no";; freebsd* | kfreebsd*) gl_cv_func_snprintf_retval_c99="guessing yes";; # Guess yes on MacOS X >= 10.3. darwin[1-6].*) gl_cv_func_snprintf_retval_c99="guessing no";; darwin*) gl_cv_func_snprintf_retval_c99="guessing yes";; # Guess yes on OpenBSD >= 3.9. openbsd[1-2].* | openbsd3.[0-8] | openbsd3.[0-8].*) gl_cv_func_snprintf_retval_c99="guessing no";; openbsd*) gl_cv_func_snprintf_retval_c99="guessing yes";; # Guess yes on Solaris >= 2.6. solaris2.[0-5]*) gl_cv_func_snprintf_retval_c99="guessing no";; solaris*) gl_cv_func_snprintf_retval_c99="guessing yes";; # Guess yes on AIX >= 4. aix[1-3]*) gl_cv_func_snprintf_retval_c99="guessing no";; aix*) gl_cv_func_snprintf_retval_c99="guessing yes";; # Guess yes on NetBSD >= 3. netbsd[1-2]* | netbsdelf[1-2]* | netbsdaout[1-2]* | netbsdcoff[1-2]*) gl_cv_func_snprintf_retval_c99="guessing no";; netbsd*) gl_cv_func_snprintf_retval_c99="guessing yes";; # Guess yes on BeOS. beos*) gl_cv_func_snprintf_retval_c99="guessing yes";; # If we don't know, assume the worst. *) gl_cv_func_snprintf_retval_c99="guessing no";; esac changequote([,])dnl ]) ]) ]) dnl Test whether the snprintf function supports the %n format directive dnl also in truncated portions of the format string. (ISO C99, POSIX:2001) dnl Result is gl_cv_func_snprintf_directive_n. AC_DEFUN([gl_SNPRINTF_DIRECTIVE_N], [ AC_REQUIRE([AC_PROG_CC]) AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles AC_CACHE_CHECK([whether snprintf fully supports the 'n' directive], [gl_cv_func_snprintf_directive_n], [ AC_TRY_RUN([ #include #include static char fmtstring[10]; static char buf[100]; int main () { int count = -1; /* Copy the format string. Some systems (glibc with _FORTIFY_SOURCE=2) support %n in format strings in read-only memory but not in writable memory. */ strcpy (fmtstring, "%d %n"); snprintf (buf, 4, fmtstring, 12345, &count, 33, 44, 55); if (count != 6) return 1; return 0; }], [gl_cv_func_snprintf_directive_n=yes], [gl_cv_func_snprintf_directive_n=no], [ changequote(,)dnl case "$host_os" in # Guess yes on glibc systems. *-gnu*) gl_cv_func_snprintf_directive_n="guessing yes";; # Guess yes on FreeBSD >= 5. freebsd[1-4]*) gl_cv_func_snprintf_directive_n="guessing no";; freebsd* | kfreebsd*) gl_cv_func_snprintf_directive_n="guessing yes";; # Guess yes on MacOS X >= 10.3. darwin[1-6].*) gl_cv_func_snprintf_directive_n="guessing no";; darwin*) gl_cv_func_snprintf_directive_n="guessing yes";; # Guess yes on Solaris >= 2.6. solaris2.[0-5]*) gl_cv_func_snprintf_directive_n="guessing no";; solaris*) gl_cv_func_snprintf_directive_n="guessing yes";; # Guess yes on AIX >= 4. aix[1-3]*) gl_cv_func_snprintf_directive_n="guessing no";; aix*) gl_cv_func_snprintf_directive_n="guessing yes";; # Guess yes on IRIX >= 6.5. irix6.5) gl_cv_func_snprintf_directive_n="guessing yes";; # Guess yes on OSF/1 >= 5. osf[3-4]*) gl_cv_func_snprintf_directive_n="guessing no";; osf*) gl_cv_func_snprintf_directive_n="guessing yes";; # Guess yes on NetBSD >= 3. netbsd[1-2]* | netbsdelf[1-2]* | netbsdaout[1-2]* | netbsdcoff[1-2]*) gl_cv_func_snprintf_directive_n="guessing no";; netbsd*) gl_cv_func_snprintf_directive_n="guessing yes";; # Guess yes on BeOS. beos*) gl_cv_func_snprintf_directive_n="guessing yes";; # If we don't know, assume the worst. *) gl_cv_func_snprintf_directive_n="guessing no";; esac changequote([,])dnl ]) ]) ]) dnl Test whether the snprintf function, when passed a size = 1, writes any dnl output without bounds in this case, behaving like sprintf. This is the dnl case on Linux libc5. dnl Result is gl_cv_func_snprintf_size1. AC_DEFUN([gl_SNPRINTF_SIZE1], [ AC_REQUIRE([AC_PROG_CC]) AC_CACHE_CHECK([whether snprintf respects a size of 1], [gl_cv_func_snprintf_size1], [ AC_TRY_RUN([ #include int main() { static char buf[8] = { 'D', 'E', 'A', 'D', 'B', 'E', 'E', 'F' }; snprintf (buf, 1, "%d", 12345); return buf[1] != 'E'; }], [gl_cv_func_snprintf_size1=yes], [gl_cv_func_snprintf_size1=no], [gl_cv_func_snprintf_size1="guessing yes"]) ]) ]) dnl Test whether the vsnprintf function, when passed a zero size, produces no dnl output. (ISO C99, POSIX:2001) dnl For example, snprintf nevertheless writes a NUL byte in this case dnl on OSF/1 5.1: dnl --------------------------------------------------------------------- dnl #include dnl int main() dnl { dnl static char buf[8] = { 'D', 'E', 'A', 'D', 'B', 'E', 'E', 'F' }; dnl snprintf (buf, 0, "%d", 12345); dnl return buf[0] != 'D'; dnl } dnl --------------------------------------------------------------------- dnl And vsnprintf writes any output without bounds in this case, behaving like dnl vsprintf, on HP-UX 11 and OSF/1 5.1: dnl --------------------------------------------------------------------- dnl #include dnl #include dnl static int my_snprintf (char *buf, int size, const char *format, ...) dnl { dnl va_list args; dnl int ret; dnl va_start (args, format); dnl ret = vsnprintf (buf, size, format, args); dnl va_end (args); dnl return ret; dnl } dnl int main() dnl { dnl static char buf[8] = { 'D', 'E', 'A', 'D', 'B', 'E', 'E', 'F' }; dnl my_snprintf (buf, 0, "%d", 12345); dnl return buf[0] != 'D'; dnl } dnl --------------------------------------------------------------------- dnl Result is gl_cv_func_vsnprintf_zerosize_c99. AC_DEFUN([gl_VSNPRINTF_ZEROSIZE_C99], [ AC_REQUIRE([AC_PROG_CC]) AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles AC_CACHE_CHECK([whether vsnprintf respects a zero size as in C99], [gl_cv_func_vsnprintf_zerosize_c99], [ AC_TRY_RUN([ #include #include static int my_snprintf (char *buf, int size, const char *format, ...) { va_list args; int ret; va_start (args, format); ret = vsnprintf (buf, size, format, args); va_end (args); return ret; } int main() { static char buf[8] = { 'D', 'E', 'A', 'D', 'B', 'E', 'E', 'F' }; my_snprintf (buf, 0, "%d", 12345); return buf[0] != 'D'; }], [gl_cv_func_vsnprintf_zerosize_c99=yes], [gl_cv_func_vsnprintf_zerosize_c99=no], [ changequote(,)dnl case "$host_os" in # Guess yes on glibc systems. *-gnu*) gl_cv_func_vsnprintf_zerosize_c99="guessing yes";; # Guess yes on FreeBSD >= 5. freebsd[1-4]*) gl_cv_func_vsnprintf_zerosize_c99="guessing no";; freebsd* | kfreebsd*) gl_cv_func_vsnprintf_zerosize_c99="guessing yes";; # Guess yes on MacOS X >= 10.3. darwin[1-6].*) gl_cv_func_vsnprintf_zerosize_c99="guessing no";; darwin*) gl_cv_func_vsnprintf_zerosize_c99="guessing yes";; # Guess yes on Cygwin. cygwin*) gl_cv_func_vsnprintf_zerosize_c99="guessing yes";; # Guess yes on Solaris >= 2.6. solaris2.[0-5]*) gl_cv_func_vsnprintf_zerosize_c99="guessing no";; solaris*) gl_cv_func_vsnprintf_zerosize_c99="guessing yes";; # Guess yes on AIX >= 4. aix[1-3]*) gl_cv_func_vsnprintf_zerosize_c99="guessing no";; aix*) gl_cv_func_vsnprintf_zerosize_c99="guessing yes";; # Guess yes on IRIX >= 6.5. irix6.5) gl_cv_func_vsnprintf_zerosize_c99="guessing yes";; # Guess yes on NetBSD >= 3. netbsd[1-2]* | netbsdelf[1-2]* | netbsdaout[1-2]* | netbsdcoff[1-2]*) gl_cv_func_vsnprintf_zerosize_c99="guessing no";; netbsd*) gl_cv_func_vsnprintf_zerosize_c99="guessing yes";; # Guess yes on BeOS. beos*) gl_cv_func_vsnprintf_zerosize_c99="guessing yes";; # Guess yes on mingw. mingw* | pw*) gl_cv_func_vsnprintf_zerosize_c99="guessing yes";; # If we don't know, assume the worst. *) gl_cv_func_vsnprintf_zerosize_c99="guessing no";; esac changequote([,])dnl ]) ]) ]) dnl The results of these tests on various platforms are: dnl dnl 1 = gl_PRINTF_SIZES_C99 dnl 2 = gl_PRINTF_LONG_DOUBLE dnl 3 = gl_PRINTF_INFINITE dnl 4 = gl_PRINTF_INFINITE_LONG_DOUBLE dnl 5 = gl_PRINTF_DIRECTIVE_A dnl 6 = gl_PRINTF_DIRECTIVE_F dnl 7 = gl_PRINTF_DIRECTIVE_N dnl 8 = gl_PRINTF_DIRECTIVE_LS dnl 9 = gl_PRINTF_POSITIONS dnl 10 = gl_PRINTF_FLAG_GROUPING dnl 11 = gl_PRINTF_FLAG_LEFTADJUST dnl 12 = gl_PRINTF_FLAG_ZERO dnl 13 = gl_PRINTF_PRECISION dnl 14 = gl_PRINTF_ENOMEM dnl 15 = gl_SNPRINTF_PRESENCE dnl 16 = gl_SNPRINTF_TRUNCATION_C99 dnl 17 = gl_SNPRINTF_RETVAL_C99 dnl 18 = gl_SNPRINTF_DIRECTIVE_N dnl 19 = gl_SNPRINTF_SIZE1 dnl 20 = gl_VSNPRINTF_ZEROSIZE_C99 dnl dnl 1 = checking whether printf supports size specifiers as in C99... dnl 2 = checking whether printf supports 'long double' arguments... dnl 3 = checking whether printf supports infinite 'double' arguments... dnl 4 = checking whether printf supports infinite 'long double' arguments... dnl 5 = checking whether printf supports the 'a' and 'A' directives... dnl 6 = checking whether printf supports the 'F' directive... dnl 7 = checking whether printf supports the 'n' directive... dnl 8 = checking whether printf supports the 'ls' directive... dnl 9 = checking whether printf supports POSIX/XSI format strings with positions... dnl 10 = checking whether printf supports the grouping flag... dnl 11 = checking whether printf supports the left-adjust flag correctly... dnl 12 = checking whether printf supports the zero flag correctly... dnl 13 = checking whether printf supports large precisions... dnl 14 = checking whether printf survives out-of-memory conditions... dnl 15 = checking for snprintf... dnl 16 = checking whether snprintf truncates the result as in C99... dnl 17 = checking whether snprintf returns a byte count as in C99... dnl 18 = checking whether snprintf fully supports the 'n' directive... dnl 19 = checking whether snprintf respects a size of 1... dnl 20 = checking whether vsnprintf respects a zero size as in C99... dnl dnl . = yes, # = no. dnl dnl 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 dnl glibc 2.5 . . . . . . . . . . . . . . . . . . . . dnl glibc 2.3.6 . . . . # . . . . . . . . . . . . . . . dnl FreeBSD 5.4, 6.1 . . . . # . . . . . . # . # . . . . . . dnl MacOS X 10.3.9 . . . . # . . . . . . # . # . . . . . . dnl OpenBSD 3.9, 4.0 . . # # # # . # . # . # . # . . . . . . dnl Cygwin 1.7.0 (2009) . . . # . . . ? . . . . . ? . . . . . . dnl Cygwin 1.5.25 (2008) . . . # # . . # . . . . . # . . . . . . dnl Cygwin 1.5.19 (2006) # . . # # # . # . # . # # # . . . . . . dnl Solaris 10 . . # # # . . # . . . # . . . . . . . . dnl Solaris 2.6 ... 9 # . # # # # . # . . . # . . . . . . . . dnl Solaris 2.5.1 # . # # # # . # . . . # . . # # # # # # dnl AIX 5.2 . . # # # . . . . . . # . . . . . . . . dnl AIX 4.3.2, 5.1 # . # # # # . . . . . # . . . . . . . . dnl HP-UX 11.31 . . . . # . . . . . . # . . . . # # . . dnl HP-UX 11.{00,11,23} # . . . # # . . . . . # . . . . # # . # dnl HP-UX 10.20 # . # . # # . ? . . # # . . . . # # ? # dnl IRIX 6.5 # . # # # # . # . . . # . . . . # . . . dnl OSF/1 5.1 # . # # # # . . . . . # . . . . # . . # dnl OSF/1 4.0d # . # # # # . . . . . # . . # # # # # # dnl NetBSD 4.0 . ? ? ? ? ? . ? . ? ? ? ? ? . . . ? ? ? dnl NetBSD 3.0 . . . . # # . ? # # ? # . # . . . . . . dnl Haiku . . . # # # . # . . . . . ? . . . . . . dnl BeOS # # . # # # . ? # . ? . # ? . . . . . . dnl mingw # # # # # # . . # # . # # ? . # # # . . libprelude-1.0.0/libmissing/m4/exponentd.m40000664000076400007640000000746011341220435015522 00000000000000# exponentd.m4 serial 1 dnl Copyright (C) 2007-2010 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. AC_DEFUN([gl_DOUBLE_EXPONENT_LOCATION], [ AC_CACHE_CHECK([where to find the exponent in a 'double'], [gl_cv_cc_double_expbit0], [ AC_TRY_RUN([ #include #include #include #include #define NWORDS \ ((sizeof (double) + sizeof (unsigned int) - 1) / sizeof (unsigned int)) typedef union { double value; unsigned int word[NWORDS]; } memory_double; static unsigned int ored_words[NWORDS]; static unsigned int anded_words[NWORDS]; static void add_to_ored_words (double x) { memory_double m; size_t i; /* Clear it first, in case sizeof (double) < sizeof (memory_double). */ memset (&m, 0, sizeof (memory_double)); m.value = x; for (i = 0; i < NWORDS; i++) { ored_words[i] |= m.word[i]; anded_words[i] &= m.word[i]; } } int main () { size_t j; FILE *fp = fopen ("conftest.out", "w"); if (fp == NULL) return 1; for (j = 0; j < NWORDS; j++) anded_words[j] = ~ (unsigned int) 0; add_to_ored_words (0.25); add_to_ored_words (0.5); add_to_ored_words (1.0); add_to_ored_words (2.0); add_to_ored_words (4.0); /* Remove bits that are common (e.g. if representation of the first mantissa bit is explicit). */ for (j = 0; j < NWORDS; j++) ored_words[j] &= ~anded_words[j]; /* Now find the nonzero word. */ for (j = 0; j < NWORDS; j++) if (ored_words[j] != 0) break; if (j < NWORDS) { size_t i; for (i = j + 1; i < NWORDS; i++) if (ored_words[i] != 0) { fprintf (fp, "unknown"); return (fclose (fp) != 0); } for (i = 0; ; i++) if ((ored_words[j] >> i) & 1) { fprintf (fp, "word %d bit %d", (int) j, (int) i); return (fclose (fp) != 0); } } fprintf (fp, "unknown"); return (fclose (fp) != 0); } ], [gl_cv_cc_double_expbit0=`cat conftest.out`], [gl_cv_cc_double_expbit0="unknown"], [ dnl On ARM, there are two 'double' floating-point formats, used by dnl different sets of instructions: The older FPA instructions assume dnl that they are stored in big-endian word order, while the words dnl (like integer types) are stored in little-endian byte order. dnl The newer VFP instructions assume little-endian order consistenly. AC_EGREP_CPP([mixed_endianness], [ #if defined arm || defined __arm || defined __arm__ mixed_endianness #endif ], [gl_cv_cc_double_expbit0="unknown"], [ pushdef([AC_MSG_CHECKING],[:])dnl pushdef([AC_MSG_RESULT],[:])dnl pushdef([AC_MSG_RESULT_UNQUOTED],[:])dnl AC_C_BIGENDIAN( [gl_cv_cc_double_expbit0="word 0 bit 20"], [gl_cv_cc_double_expbit0="word 1 bit 20"], [gl_cv_cc_double_expbit0="unknown"]) popdef([AC_MSG_RESULT_UNQUOTED])dnl popdef([AC_MSG_RESULT])dnl popdef([AC_MSG_CHECKING])dnl ]) ]) rm -f conftest.out ]) case "$gl_cv_cc_double_expbit0" in word*bit*) word=`echo "$gl_cv_cc_double_expbit0" | sed -e 's/word //' -e 's/ bit.*//'` bit=`echo "$gl_cv_cc_double_expbit0" | sed -e 's/word.*bit //'` AC_DEFINE_UNQUOTED([DBL_EXPBIT0_WORD], [$word], [Define as the word index where to find the exponent of 'double'.]) AC_DEFINE_UNQUOTED([DBL_EXPBIT0_BIT], [$bit], [Define as the bit index in the word where to find bit 0 of the exponent of 'double'.]) ;; esac ]) libprelude-1.0.0/libmissing/m4/mode_t.m40000664000076400007640000000234211341220436014760 00000000000000# mode_t.m4 serial 2 dnl Copyright (C) 2009-2010 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. # For using mode_t, it's sufficient to use AC_TYPE_MODE_T and # include . # Define PROMOTED_MODE_T to the type that is the result of "default argument # promotion" (ISO C 6.5.2.2.(6)) of the type mode_t. AC_DEFUN([gl_PROMOTED_TYPE_MODE_T], [ AC_REQUIRE([AC_TYPE_MODE_T]) AC_CACHE_CHECK([for promoted mode_t type], [gl_cv_promoted_mode_t], [ dnl Assume mode_t promotes to 'int' if and only if it is smaller than 'int', dnl and to itself otherwise. This assumption is not guaranteed by the ISO C dnl standard, but we don't know of any real-world counterexamples. AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include ]], [[typedef int array[2 * (sizeof (mode_t) < sizeof (int)) - 1];]])], [gl_cv_promoted_mode_t='int'], [gl_cv_promoted_mode_t='mode_t']) ]) AC_DEFINE_UNQUOTED([PROMOTED_MODE_T], [$gl_cv_promoted_mode_t], [Define to the type that is the result of default argument promotions of type mode_t.]) ]) libprelude-1.0.0/libmissing/m4/localcharset.m40000664000076400007640000000112611341220436016154 00000000000000# localcharset.m4 serial 7 dnl Copyright (C) 2002, 2004, 2006, 2009, 2010 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. AC_DEFUN([gl_LOCALCHARSET], [ dnl Prerequisites of lib/localcharset.c. AC_REQUIRE([AM_LANGINFO_CODESET]) AC_REQUIRE([gl_FCNTL_O_FLAGS]) AC_CHECK_DECLS_ONCE([getc_unlocked]) dnl Prerequisites of the lib/Makefile.am snippet. AC_REQUIRE([AC_CANONICAL_HOST]) AC_REQUIRE([gl_GLIBC21]) ]) libprelude-1.0.0/libmissing/m4/lseek.m40000664000076400007640000000311411345707014014620 00000000000000# lseek.m4 serial 4 dnl Copyright (C) 2007, 2009, 2010 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. AC_DEFUN([gl_FUNC_LSEEK], [ AC_REQUIRE([gl_UNISTD_H_DEFAULTS]) AC_REQUIRE([AC_PROG_CC]) AC_CACHE_CHECK([whether lseek detects pipes], [gl_cv_func_lseek_pipe], [if test $cross_compiling = no; then AC_LINK_IFELSE([ #include /* for off_t */ #include /* for SEEK_CUR */ #include int main () { /* Exit with success only if stdin is seekable. */ return lseek (0, (off_t)0, SEEK_CUR) < 0; }], [if test -s conftest$ac_exeext \ && ./conftest$ac_exeext < conftest.$ac_ext \ && { echo hi | ./conftest$ac_exeext; test $? = 1; }; then gl_cv_func_lseek_pipe=yes else gl_cv_func_lseek_pipe=no fi], [gl_cv_func_lseek_pipe=no]) else AC_COMPILE_IFELSE([ #if ((defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__) || defined __BEOS__ /* mingw and BeOS mistakenly return 0 when trying to seek on pipes. */ Choke me. #endif], [gl_cv_func_lseek_pipe=yes], [gl_cv_func_lseek_pipe=no]) fi]) if test $gl_cv_func_lseek_pipe = no; then gl_REPLACE_LSEEK fi ]) AC_DEFUN([gl_REPLACE_LSEEK], [ AC_LIBOBJ([lseek]) AC_REQUIRE([gl_UNISTD_H_DEFAULTS]) REPLACE_LSEEK=1 AC_DEFINE([LSEEK_PIPE_BROKEN], [1], [Define to 1 if lseek does not detect pipes.]) ]) libprelude-1.0.0/libmissing/m4/sys_time_h.m40000664000076400007640000000425611345707014015670 00000000000000# Configure a replacement for . # serial 3 # Copyright (C) 2007, 2009, 2010 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. # Written by Paul Eggert and Martin Lambers. AC_DEFUN([gl_HEADER_SYS_TIME_H], [ dnl Use AC_REQUIRE here, so that the REPLACE_GETTIMEOFDAY=0 statement dnl below is expanded once only, before all REPLACE_GETTIMEOFDAY=1 dnl statements that occur in other macros. AC_REQUIRE([gl_HEADER_SYS_TIME_H_BODY]) ]) AC_DEFUN([gl_HEADER_SYS_TIME_H_BODY], [ AC_REQUIRE([AC_C_RESTRICT]) AC_REQUIRE([gl_HEADER_SYS_TIME_H_DEFAULTS]) AC_CHECK_HEADERS_ONCE([sys/time.h]) gl_CHECK_NEXT_HEADERS([sys/time.h]) if test $ac_cv_header_sys_time_h != yes; then HAVE_SYS_TIME_H=0 fi AC_CACHE_CHECK([for struct timeval], [gl_cv_sys_struct_timeval], [AC_COMPILE_IFELSE( [AC_LANG_PROGRAM( [[#if HAVE_SYS_TIME_H #include #endif #include ]], [[static struct timeval x; x.tv_sec = x.tv_usec;]])], [gl_cv_sys_struct_timeval=yes], [gl_cv_sys_struct_timeval=no])]) if test $gl_cv_sys_struct_timeval != yes; then HAVE_STRUCT_TIMEVAL=0 fi dnl Check for declarations of anything we want to poison if the dnl corresponding gnulib module is not in use. gl_WARN_ON_USE_PREPARE([[ #if HAVE_SYS_TIME_H # include #endif #include ]], [gettimeofday]) ]) AC_DEFUN([gl_SYS_TIME_MODULE_INDICATOR], [ dnl Use AC_REQUIRE here, so that the default settings are expanded once only. AC_REQUIRE([gl_HEADER_SYS_TIME_H_DEFAULTS]) GNULIB_[]m4_translit([$1],[abcdefghijklmnopqrstuvwxyz./-],[ABCDEFGHIJKLMNOPQRSTUVWXYZ___])=1 ]) AC_DEFUN([gl_HEADER_SYS_TIME_H_DEFAULTS], [ GNULIB_GETTIMEOFDAY=0; AC_SUBST([GNULIB_GETTIMEOFDAY]) dnl Assume POSIX behavior unless another module says otherwise. HAVE_STRUCT_TIMEVAL=1; AC_SUBST([HAVE_STRUCT_TIMEVAL]) HAVE_SYS_TIME_H=1; AC_SUBST([HAVE_SYS_TIME_H]) REPLACE_GETTIMEOFDAY=0; AC_SUBST([REPLACE_GETTIMEOFDAY]) ]) libprelude-1.0.0/libmissing/m4/lib-prefix.m40000664000076400007640000002042211341220436015551 00000000000000# lib-prefix.m4 serial 7 (gettext-0.18) dnl Copyright (C) 2001-2005, 2008-2010 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. dnl From Bruno Haible. dnl AC_LIB_ARG_WITH is synonymous to AC_ARG_WITH in autoconf-2.13, and dnl similar to AC_ARG_WITH in autoconf 2.52...2.57 except that is doesn't dnl require excessive bracketing. ifdef([AC_HELP_STRING], [AC_DEFUN([AC_LIB_ARG_WITH], [AC_ARG_WITH([$1],[[$2]],[$3],[$4])])], [AC_DEFUN([AC_][LIB_ARG_WITH], [AC_ARG_WITH([$1],[$2],[$3],[$4])])]) dnl AC_LIB_PREFIX adds to the CPPFLAGS and LDFLAGS the flags that are needed dnl to access previously installed libraries. The basic assumption is that dnl a user will want packages to use other packages he previously installed dnl with the same --prefix option. dnl This macro is not needed if only AC_LIB_LINKFLAGS is used to locate dnl libraries, but is otherwise very convenient. AC_DEFUN([AC_LIB_PREFIX], [ AC_BEFORE([$0], [AC_LIB_LINKFLAGS]) AC_REQUIRE([AC_PROG_CC]) AC_REQUIRE([AC_CANONICAL_HOST]) AC_REQUIRE([AC_LIB_PREPARE_MULTILIB]) AC_REQUIRE([AC_LIB_PREPARE_PREFIX]) dnl By default, look in $includedir and $libdir. use_additional=yes AC_LIB_WITH_FINAL_PREFIX([ eval additional_includedir=\"$includedir\" eval additional_libdir=\"$libdir\" ]) AC_LIB_ARG_WITH([lib-prefix], [ --with-lib-prefix[=DIR] search for libraries in DIR/include and DIR/lib --without-lib-prefix don't search for libraries in includedir and libdir], [ if test "X$withval" = "Xno"; then use_additional=no else if test "X$withval" = "X"; then AC_LIB_WITH_FINAL_PREFIX([ eval additional_includedir=\"$includedir\" eval additional_libdir=\"$libdir\" ]) else additional_includedir="$withval/include" additional_libdir="$withval/$acl_libdirstem" fi fi ]) if test $use_additional = yes; then dnl Potentially add $additional_includedir to $CPPFLAGS. dnl But don't add it dnl 1. if it's the standard /usr/include, dnl 2. if it's already present in $CPPFLAGS, dnl 3. if it's /usr/local/include and we are using GCC on Linux, dnl 4. if it doesn't exist as a directory. if test "X$additional_includedir" != "X/usr/include"; then haveit= for x in $CPPFLAGS; do AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"]) if test "X$x" = "X-I$additional_includedir"; then haveit=yes break fi done if test -z "$haveit"; then if test "X$additional_includedir" = "X/usr/local/include"; then if test -n "$GCC"; then case $host_os in linux* | gnu* | k*bsd*-gnu) haveit=yes;; esac fi fi if test -z "$haveit"; then if test -d "$additional_includedir"; then dnl Really add $additional_includedir to $CPPFLAGS. CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }-I$additional_includedir" fi fi fi fi dnl Potentially add $additional_libdir to $LDFLAGS. dnl But don't add it dnl 1. if it's the standard /usr/lib, dnl 2. if it's already present in $LDFLAGS, dnl 3. if it's /usr/local/lib and we are using GCC on Linux, dnl 4. if it doesn't exist as a directory. if test "X$additional_libdir" != "X/usr/$acl_libdirstem"; then haveit= for x in $LDFLAGS; do AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"]) if test "X$x" = "X-L$additional_libdir"; then haveit=yes break fi done if test -z "$haveit"; then if test "X$additional_libdir" = "X/usr/local/$acl_libdirstem"; then if test -n "$GCC"; then case $host_os in linux*) haveit=yes;; esac fi fi if test -z "$haveit"; then if test -d "$additional_libdir"; then dnl Really add $additional_libdir to $LDFLAGS. LDFLAGS="${LDFLAGS}${LDFLAGS:+ }-L$additional_libdir" fi fi fi fi fi ]) dnl AC_LIB_PREPARE_PREFIX creates variables acl_final_prefix, dnl acl_final_exec_prefix, containing the values to which $prefix and dnl $exec_prefix will expand at the end of the configure script. AC_DEFUN([AC_LIB_PREPARE_PREFIX], [ dnl Unfortunately, prefix and exec_prefix get only finally determined dnl at the end of configure. if test "X$prefix" = "XNONE"; then acl_final_prefix="$ac_default_prefix" else acl_final_prefix="$prefix" fi if test "X$exec_prefix" = "XNONE"; then acl_final_exec_prefix='${prefix}' else acl_final_exec_prefix="$exec_prefix" fi acl_save_prefix="$prefix" prefix="$acl_final_prefix" eval acl_final_exec_prefix=\"$acl_final_exec_prefix\" prefix="$acl_save_prefix" ]) dnl AC_LIB_WITH_FINAL_PREFIX([statement]) evaluates statement, with the dnl variables prefix and exec_prefix bound to the values they will have dnl at the end of the configure script. AC_DEFUN([AC_LIB_WITH_FINAL_PREFIX], [ acl_save_prefix="$prefix" prefix="$acl_final_prefix" acl_save_exec_prefix="$exec_prefix" exec_prefix="$acl_final_exec_prefix" $1 exec_prefix="$acl_save_exec_prefix" prefix="$acl_save_prefix" ]) dnl AC_LIB_PREPARE_MULTILIB creates dnl - a variable acl_libdirstem, containing the basename of the libdir, either dnl "lib" or "lib64" or "lib/64", dnl - a variable acl_libdirstem2, as a secondary possible value for dnl acl_libdirstem, either the same as acl_libdirstem or "lib/sparcv9" or dnl "lib/amd64". AC_DEFUN([AC_LIB_PREPARE_MULTILIB], [ dnl There is no formal standard regarding lib and lib64. dnl On glibc systems, the current practice is that on a system supporting dnl 32-bit and 64-bit instruction sets or ABIs, 64-bit libraries go under dnl $prefix/lib64 and 32-bit libraries go under $prefix/lib. We determine dnl the compiler's default mode by looking at the compiler's library search dnl path. If at least one of its elements ends in /lib64 or points to a dnl directory whose absolute pathname ends in /lib64, we assume a 64-bit ABI. dnl Otherwise we use the default, namely "lib". dnl On Solaris systems, the current practice is that on a system supporting dnl 32-bit and 64-bit instruction sets or ABIs, 64-bit libraries go under dnl $prefix/lib/64 (which is a symlink to either $prefix/lib/sparcv9 or dnl $prefix/lib/amd64) and 32-bit libraries go under $prefix/lib. AC_REQUIRE([AC_CANONICAL_HOST]) acl_libdirstem=lib acl_libdirstem2= case "$host_os" in solaris*) dnl See Solaris 10 Software Developer Collection > Solaris 64-bit Developer's Guide > The Development Environment dnl . dnl "Portable Makefiles should refer to any library directories using the 64 symbolic link." dnl But we want to recognize the sparcv9 or amd64 subdirectory also if the dnl symlink is missing, so we set acl_libdirstem2 too. AC_CACHE_CHECK([for 64-bit host], [gl_cv_solaris_64bit], [AC_EGREP_CPP([sixtyfour bits], [ #ifdef _LP64 sixtyfour bits #endif ], [gl_cv_solaris_64bit=yes], [gl_cv_solaris_64bit=no]) ]) if test $gl_cv_solaris_64bit = yes; then acl_libdirstem=lib/64 case "$host_cpu" in sparc*) acl_libdirstem2=lib/sparcv9 ;; i*86 | x86_64) acl_libdirstem2=lib/amd64 ;; esac fi ;; *) searchpath=`(LC_ALL=C $CC -print-search-dirs) 2>/dev/null | sed -n -e 's,^libraries: ,,p' | sed -e 's,^=,,'` if test -n "$searchpath"; then acl_save_IFS="${IFS= }"; IFS=":" for searchdir in $searchpath; do if test -d "$searchdir"; then case "$searchdir" in */lib64/ | */lib64 ) acl_libdirstem=lib64 ;; */../ | */.. ) # Better ignore directories of this form. They are misleading. ;; *) searchdir=`cd "$searchdir" && pwd` case "$searchdir" in */lib64 ) acl_libdirstem=lib64 ;; esac ;; esac fi done IFS="$acl_save_IFS" fi ;; esac test -n "$acl_libdirstem2" || acl_libdirstem2="$acl_libdirstem" ]) libprelude-1.0.0/libmissing/m4/poll.m40000664000076400007640000000460511341220436014463 00000000000000# poll.m4 serial 9 dnl Copyright (c) 2003, 2005, 2006, 2007, 2009, 2010 Free Software Foundation, dnl Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. AC_DEFUN([gl_FUNC_POLL], [ AC_CHECK_HEADERS([poll.h]) if test "$ac_cv_header_poll_h" = no; then gl_cv_func_poll=no else AC_CHECK_FUNC([poll], [# Check whether poll() works on special files (like /dev/null) and # and ttys (like /dev/tty). On MacOS X 10.4.0 and AIX 5.3, it doesn't. AC_RUN_IFELSE([AC_LANG_SOURCE([[ #include #include int main() { struct pollfd ufd; /* Try /dev/null for reading. */ ufd.fd = open ("/dev/null", O_RDONLY); if (ufd.fd < 0) /* If /dev/null does not exist, it's not MacOS X nor AIX. */ return 0; ufd.events = POLLIN; ufd.revents = 0; if (!(poll (&ufd, 1, 0) == 1 && ufd.revents == POLLIN)) return 1; /* Try /dev/null for writing. */ ufd.fd = open ("/dev/null", O_WRONLY); if (ufd.fd < 0) /* If /dev/null does not exist, it's not MacOS X nor AIX. */ return 0; ufd.events = POLLOUT; ufd.revents = 0; if (!(poll (&ufd, 1, 0) == 1 && ufd.revents == POLLOUT)) return 1; /* Trying /dev/tty may be too environment dependent. */ return 0; }]])], [gl_cv_func_poll=yes], [gl_cv_func_poll=no], [# When cross-compiling, assume that poll() works everywhere except on # MacOS X or AIX, regardless of its version. AC_EGREP_CPP([MacOSX], [ #if (defined(__APPLE__) && defined(__MACH__)) || defined(_AIX) This is MacOSX or AIX #endif ], [gl_cv_func_poll=no], [gl_cv_func_poll=yes])])]) fi if test $gl_cv_func_poll = yes; then AC_DEFINE([HAVE_POLL], [1], [Define to 1 if you have the 'poll' function and it works.]) POLL_H= else AC_LIBOBJ([poll]) AC_DEFINE([poll], [rpl_poll], [Define to poll if the replacement function should be used.]) gl_PREREQ_POLL POLL_H=poll.h fi AC_SUBST([POLL_H]) ]) # Prerequisites of lib/poll.c. AC_DEFUN([gl_PREREQ_POLL], [ AC_CHECK_HEADERS_ONCE([sys/ioctl.h sys/filio.h]) ]) libprelude-1.0.0/libmissing/m4/close.m40000664000076400007640000000146011341220435014615 00000000000000# close.m4 serial 5 dnl Copyright (C) 2008-2010 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. AC_DEFUN([gl_FUNC_CLOSE], [ m4_ifdef([gl_PREREQ_SYS_H_WINSOCK2], [ gl_PREREQ_SYS_H_WINSOCK2 if test $UNISTD_H_HAVE_WINSOCK2_H = 1; then dnl Even if the 'socket' module is not used here, another part of the dnl application may use it and pass file descriptors that refer to dnl sockets to the close() function. So enable the support for sockets. gl_REPLACE_CLOSE fi ]) ]) AC_DEFUN([gl_REPLACE_CLOSE], [ AC_REQUIRE([gl_UNISTD_H_DEFAULTS]) REPLACE_CLOSE=1 AC_LIBOBJ([close]) gl_REPLACE_FCLOSE ]) libprelude-1.0.0/libmissing/m4/string_h.m40000664000076400007640000001132211341220436015324 00000000000000# Configure a GNU-like replacement for . # Copyright (C) 2007-2010 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. # serial 11 # Written by Paul Eggert. AC_DEFUN([gl_HEADER_STRING_H], [ dnl Use AC_REQUIRE here, so that the default behavior below is expanded dnl once only, before all statements that occur in other macros. AC_REQUIRE([gl_HEADER_STRING_H_BODY]) ]) AC_DEFUN([gl_HEADER_STRING_H_BODY], [ AC_REQUIRE([AC_C_RESTRICT]) AC_REQUIRE([gl_HEADER_STRING_H_DEFAULTS]) gl_CHECK_NEXT_HEADERS([string.h]) dnl Check for declarations of anything we want to poison if the dnl corresponding gnulib module is not in use, and which is not dnl guaranteed by C89. gl_WARN_ON_USE_PREPARE([[#include ]], [memmem mempcpy memrchr rawmemchr stpcpy stpncpy strchrnul strdup strndup strnlen strpbrk strsep strcasestr strtok_r strsignal strverscmp]) ]) AC_DEFUN([gl_STRING_MODULE_INDICATOR], [ dnl Use AC_REQUIRE here, so that the default settings are expanded once only. AC_REQUIRE([gl_HEADER_STRING_H_DEFAULTS]) GNULIB_[]m4_translit([$1],[abcdefghijklmnopqrstuvwxyz./-],[ABCDEFGHIJKLMNOPQRSTUVWXYZ___])=1 ]) AC_DEFUN([gl_HEADER_STRING_H_DEFAULTS], [ GNULIB_MEMCHR=0; AC_SUBST([GNULIB_MEMCHR]) GNULIB_MEMMEM=0; AC_SUBST([GNULIB_MEMMEM]) GNULIB_MEMPCPY=0; AC_SUBST([GNULIB_MEMPCPY]) GNULIB_MEMRCHR=0; AC_SUBST([GNULIB_MEMRCHR]) GNULIB_RAWMEMCHR=0; AC_SUBST([GNULIB_RAWMEMCHR]) GNULIB_STPCPY=0; AC_SUBST([GNULIB_STPCPY]) GNULIB_STPNCPY=0; AC_SUBST([GNULIB_STPNCPY]) GNULIB_STRCHRNUL=0; AC_SUBST([GNULIB_STRCHRNUL]) GNULIB_STRDUP=0; AC_SUBST([GNULIB_STRDUP]) GNULIB_STRNDUP=0; AC_SUBST([GNULIB_STRNDUP]) GNULIB_STRNLEN=0; AC_SUBST([GNULIB_STRNLEN]) GNULIB_STRPBRK=0; AC_SUBST([GNULIB_STRPBRK]) GNULIB_STRSEP=0; AC_SUBST([GNULIB_STRSEP]) GNULIB_STRSTR=0; AC_SUBST([GNULIB_STRSTR]) GNULIB_STRCASESTR=0; AC_SUBST([GNULIB_STRCASESTR]) GNULIB_STRTOK_R=0; AC_SUBST([GNULIB_STRTOK_R]) GNULIB_MBSLEN=0; AC_SUBST([GNULIB_MBSLEN]) GNULIB_MBSNLEN=0; AC_SUBST([GNULIB_MBSNLEN]) GNULIB_MBSCHR=0; AC_SUBST([GNULIB_MBSCHR]) GNULIB_MBSRCHR=0; AC_SUBST([GNULIB_MBSRCHR]) GNULIB_MBSSTR=0; AC_SUBST([GNULIB_MBSSTR]) GNULIB_MBSCASECMP=0; AC_SUBST([GNULIB_MBSCASECMP]) GNULIB_MBSNCASECMP=0; AC_SUBST([GNULIB_MBSNCASECMP]) GNULIB_MBSPCASECMP=0; AC_SUBST([GNULIB_MBSPCASECMP]) GNULIB_MBSCASESTR=0; AC_SUBST([GNULIB_MBSCASESTR]) GNULIB_MBSCSPN=0; AC_SUBST([GNULIB_MBSCSPN]) GNULIB_MBSPBRK=0; AC_SUBST([GNULIB_MBSPBRK]) GNULIB_MBSSPN=0; AC_SUBST([GNULIB_MBSSPN]) GNULIB_MBSSEP=0; AC_SUBST([GNULIB_MBSSEP]) GNULIB_MBSTOK_R=0; AC_SUBST([GNULIB_MBSTOK_R]) GNULIB_STRERROR=0; AC_SUBST([GNULIB_STRERROR]) GNULIB_STRSIGNAL=0; AC_SUBST([GNULIB_STRSIGNAL]) GNULIB_STRVERSCMP=0; AC_SUBST([GNULIB_STRVERSCMP]) HAVE_MBSLEN=0; AC_SUBST([HAVE_MBSLEN]) dnl Assume proper GNU behavior unless another module says otherwise. HAVE_DECL_MEMMEM=1; AC_SUBST([HAVE_DECL_MEMMEM]) HAVE_MEMPCPY=1; AC_SUBST([HAVE_MEMPCPY]) HAVE_DECL_MEMRCHR=1; AC_SUBST([HAVE_DECL_MEMRCHR]) HAVE_RAWMEMCHR=1; AC_SUBST([HAVE_RAWMEMCHR]) HAVE_STPCPY=1; AC_SUBST([HAVE_STPCPY]) HAVE_STPNCPY=1; AC_SUBST([HAVE_STPNCPY]) HAVE_STRCHRNUL=1; AC_SUBST([HAVE_STRCHRNUL]) HAVE_DECL_STRDUP=1; AC_SUBST([HAVE_DECL_STRDUP]) HAVE_DECL_STRNDUP=1; AC_SUBST([HAVE_DECL_STRNDUP]) HAVE_DECL_STRNLEN=1; AC_SUBST([HAVE_DECL_STRNLEN]) HAVE_STRPBRK=1; AC_SUBST([HAVE_STRPBRK]) HAVE_STRSEP=1; AC_SUBST([HAVE_STRSEP]) HAVE_STRCASESTR=1; AC_SUBST([HAVE_STRCASESTR]) HAVE_DECL_STRTOK_R=1; AC_SUBST([HAVE_DECL_STRTOK_R]) HAVE_DECL_STRERROR=1; AC_SUBST([HAVE_DECL_STRERROR]) HAVE_DECL_STRSIGNAL=1; AC_SUBST([HAVE_DECL_STRSIGNAL]) HAVE_STRVERSCMP=1; AC_SUBST([HAVE_STRVERSCMP]) REPLACE_MEMCHR=0; AC_SUBST([REPLACE_MEMCHR]) REPLACE_MEMMEM=0; AC_SUBST([REPLACE_MEMMEM]) REPLACE_STRDUP=0; AC_SUBST([REPLACE_STRDUP]) REPLACE_STRSTR=0; AC_SUBST([REPLACE_STRSTR]) REPLACE_STRCASESTR=0; AC_SUBST([REPLACE_STRCASESTR]) REPLACE_STRERROR=0; AC_SUBST([REPLACE_STRERROR]) REPLACE_STRNDUP=0; AC_SUBST([REPLACE_STRNDUP]) REPLACE_STRSIGNAL=0; AC_SUBST([REPLACE_STRSIGNAL]) REPLACE_STRTOK_R=0; AC_SUBST([REPLACE_STRTOK_R]) UNDEFINE_STRTOK_R=0; AC_SUBST([UNDEFINE_STRTOK_R]) ]) libprelude-1.0.0/libmissing/m4/unistd_h.m40000664000076400007640000001554011341220437015333 00000000000000# unistd_h.m4 serial 39 dnl Copyright (C) 2006-2010 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. dnl Written by Simon Josefsson, Bruno Haible. AC_DEFUN([gl_UNISTD_H], [ dnl Use AC_REQUIRE here, so that the default behavior below is expanded dnl once only, before all statements that occur in other macros. AC_REQUIRE([gl_UNISTD_H_DEFAULTS]) AC_REQUIRE([AC_C_INLINE]) gl_CHECK_NEXT_HEADERS([unistd.h]) AC_CHECK_HEADERS_ONCE([unistd.h]) if test $ac_cv_header_unistd_h = yes; then HAVE_UNISTD_H=1 else HAVE_UNISTD_H=0 fi AC_SUBST([HAVE_UNISTD_H]) dnl Check for declarations of anything we want to poison if the dnl corresponding gnulib module is not in use. gl_WARN_ON_USE_PREPARE([[#include /* Some systems declare various items in the wrong headers. */ #ifndef __GLIBC__ # include # include # include # if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ # include # endif #endif ]], [chown dup2 dup3 environ euidaccess faccessat fchdir fchownat fsync ftruncate getcwd getdomainname getdtablesize getgroups gethostname getlogin getlogin_r getpagesize getusershell setusershell endusershell lchown link linkat lseek pipe2 pread readlink readlinkat rmdir sleep symlink symlinkat unlink unlinkat usleep]) ]) AC_DEFUN([gl_UNISTD_MODULE_INDICATOR], [ dnl Use AC_REQUIRE here, so that the default settings are expanded once only. AC_REQUIRE([gl_UNISTD_H_DEFAULTS]) GNULIB_[]m4_translit([$1],[abcdefghijklmnopqrstuvwxyz./-],[ABCDEFGHIJKLMNOPQRSTUVWXYZ___])=1 ]) AC_DEFUN([gl_UNISTD_H_DEFAULTS], [ GNULIB_CHOWN=0; AC_SUBST([GNULIB_CHOWN]) GNULIB_CLOSE=0; AC_SUBST([GNULIB_CLOSE]) GNULIB_DUP2=0; AC_SUBST([GNULIB_DUP2]) GNULIB_DUP3=0; AC_SUBST([GNULIB_DUP3]) GNULIB_ENVIRON=0; AC_SUBST([GNULIB_ENVIRON]) GNULIB_EUIDACCESS=0; AC_SUBST([GNULIB_EUIDACCESS]) GNULIB_FACCESSAT=0; AC_SUBST([GNULIB_FACCESSAT]) GNULIB_FCHDIR=0; AC_SUBST([GNULIB_FCHDIR]) GNULIB_FCHOWNAT=0; AC_SUBST([GNULIB_FCHOWNAT]) GNULIB_FSYNC=0; AC_SUBST([GNULIB_FSYNC]) GNULIB_FTRUNCATE=0; AC_SUBST([GNULIB_FTRUNCATE]) GNULIB_GETCWD=0; AC_SUBST([GNULIB_GETCWD]) GNULIB_GETDOMAINNAME=0; AC_SUBST([GNULIB_GETDOMAINNAME]) GNULIB_GETDTABLESIZE=0; AC_SUBST([GNULIB_GETDTABLESIZE]) GNULIB_GETGROUPS=0; AC_SUBST([GNULIB_GETGROUPS]) GNULIB_GETHOSTNAME=0; AC_SUBST([GNULIB_GETHOSTNAME]) GNULIB_GETLOGIN=0; AC_SUBST([GNULIB_GETLOGIN]) GNULIB_GETLOGIN_R=0; AC_SUBST([GNULIB_GETLOGIN_R]) GNULIB_GETPAGESIZE=0; AC_SUBST([GNULIB_GETPAGESIZE]) GNULIB_GETUSERSHELL=0; AC_SUBST([GNULIB_GETUSERSHELL]) GNULIB_LCHOWN=0; AC_SUBST([GNULIB_LCHOWN]) GNULIB_LINK=0; AC_SUBST([GNULIB_LINK]) GNULIB_LINKAT=0; AC_SUBST([GNULIB_LINKAT]) GNULIB_LSEEK=0; AC_SUBST([GNULIB_LSEEK]) GNULIB_PIPE2=0; AC_SUBST([GNULIB_PIPE2]) GNULIB_PREAD=0; AC_SUBST([GNULIB_PREAD]) GNULIB_READLINK=0; AC_SUBST([GNULIB_READLINK]) GNULIB_READLINKAT=0; AC_SUBST([GNULIB_READLINKAT]) GNULIB_RMDIR=0; AC_SUBST([GNULIB_RMDIR]) GNULIB_SLEEP=0; AC_SUBST([GNULIB_SLEEP]) GNULIB_SYMLINK=0; AC_SUBST([GNULIB_SYMLINK]) GNULIB_SYMLINKAT=0; AC_SUBST([GNULIB_SYMLINKAT]) GNULIB_UNISTD_H_GETOPT=0; AC_SUBST([GNULIB_UNISTD_H_GETOPT]) GNULIB_UNISTD_H_SIGPIPE=0; AC_SUBST([GNULIB_UNISTD_H_SIGPIPE]) GNULIB_UNLINK=0; AC_SUBST([GNULIB_UNLINK]) GNULIB_UNLINKAT=0; AC_SUBST([GNULIB_UNLINKAT]) GNULIB_USLEEP=0; AC_SUBST([GNULIB_USLEEP]) GNULIB_WRITE=0; AC_SUBST([GNULIB_WRITE]) dnl Assume proper GNU behavior unless another module says otherwise. HAVE_CHOWN=1; AC_SUBST([HAVE_CHOWN]) HAVE_DUP2=1; AC_SUBST([HAVE_DUP2]) HAVE_DUP3=1; AC_SUBST([HAVE_DUP3]) HAVE_EUIDACCESS=1; AC_SUBST([HAVE_EUIDACCESS]) HAVE_FACCESSAT=1; AC_SUBST([HAVE_FACCESSAT]) HAVE_FCHOWNAT=1; AC_SUBST([HAVE_FCHOWNAT]) HAVE_FSYNC=1; AC_SUBST([HAVE_FSYNC]) HAVE_FTRUNCATE=1; AC_SUBST([HAVE_FTRUNCATE]) HAVE_GETDOMAINNAME=1; AC_SUBST([HAVE_GETDOMAINNAME]) HAVE_GETDTABLESIZE=1; AC_SUBST([HAVE_GETDTABLESIZE]) HAVE_GETGROUPS=1; AC_SUBST([HAVE_GETGROUPS]) HAVE_GETHOSTNAME=1; AC_SUBST([HAVE_GETHOSTNAME]) HAVE_GETLOGIN=1; AC_SUBST([HAVE_GETLOGIN]) HAVE_GETPAGESIZE=1; AC_SUBST([HAVE_GETPAGESIZE]) HAVE_GETUSERSHELL=1; AC_SUBST([HAVE_GETUSERSHELL]) HAVE_LCHOWN=1; AC_SUBST([HAVE_LCHOWN]) HAVE_LINK=1; AC_SUBST([HAVE_LINK]) HAVE_LINKAT=1; AC_SUBST([HAVE_LINKAT]) HAVE_PIPE2=1; AC_SUBST([HAVE_PIPE2]) HAVE_PREAD=1; AC_SUBST([HAVE_PREAD]) HAVE_READLINK=1; AC_SUBST([HAVE_READLINK]) HAVE_READLINKAT=1; AC_SUBST([HAVE_READLINKAT]) HAVE_SLEEP=1; AC_SUBST([HAVE_SLEEP]) HAVE_SYMLINK=1; AC_SUBST([HAVE_SYMLINK]) HAVE_SYMLINKAT=1; AC_SUBST([HAVE_SYMLINKAT]) HAVE_DECL_ENVIRON=1; AC_SUBST([HAVE_DECL_ENVIRON]) HAVE_DECL_GETLOGIN_R=1; AC_SUBST([HAVE_DECL_GETLOGIN_R]) HAVE_OS_H=0; AC_SUBST([HAVE_OS_H]) HAVE_SYS_PARAM_H=0; AC_SUBST([HAVE_SYS_PARAM_H]) HAVE_UNLINKAT=1; AC_SUBST([HAVE_UNLINKAT]) HAVE_USLEEP=1; AC_SUBST([HAVE_USLEEP]) REPLACE_CHOWN=0; AC_SUBST([REPLACE_CHOWN]) REPLACE_CLOSE=0; AC_SUBST([REPLACE_CLOSE]) REPLACE_DUP=0; AC_SUBST([REPLACE_DUP]) REPLACE_DUP2=0; AC_SUBST([REPLACE_DUP2]) REPLACE_FCHDIR=0; AC_SUBST([REPLACE_FCHDIR]) REPLACE_FCHOWNAT=0; AC_SUBST([REPLACE_FCHOWNAT]) REPLACE_GETCWD=0; AC_SUBST([REPLACE_GETCWD]) REPLACE_GETGROUPS=0; AC_SUBST([REPLACE_GETGROUPS]) REPLACE_GETPAGESIZE=0; AC_SUBST([REPLACE_GETPAGESIZE]) REPLACE_LCHOWN=0; AC_SUBST([REPLACE_LCHOWN]) REPLACE_LINK=0; AC_SUBST([REPLACE_LINK]) REPLACE_LINKAT=0; AC_SUBST([REPLACE_LINKAT]) REPLACE_LSEEK=0; AC_SUBST([REPLACE_LSEEK]) REPLACE_PREAD=0; AC_SUBST([REPLACE_PREAD]) REPLACE_READLINK=0; AC_SUBST([REPLACE_READLINK]) REPLACE_RMDIR=0; AC_SUBST([REPLACE_RMDIR]) REPLACE_SLEEP=0; AC_SUBST([REPLACE_SLEEP]) REPLACE_SYMLINK=0; AC_SUBST([REPLACE_SYMLINK]) REPLACE_UNLINK=0; AC_SUBST([REPLACE_UNLINK]) REPLACE_UNLINKAT=0; AC_SUBST([REPLACE_UNLINKAT]) REPLACE_USLEEP=0; AC_SUBST([REPLACE_USLEEP]) REPLACE_WRITE=0; AC_SUBST([REPLACE_WRITE]) UNISTD_H_HAVE_WINSOCK2_H=0; AC_SUBST([UNISTD_H_HAVE_WINSOCK2_H]) UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS=0; AC_SUBST([UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS]) ]) libprelude-1.0.0/libmissing/m4/isnand.m40000664000076400007640000000526211341220435014770 00000000000000# isnand.m4 serial 6 dnl Copyright (C) 2007-2010 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. dnl Check how to get or define isnand(). AC_DEFUN([gl_FUNC_ISNAND], [ AC_REQUIRE([gl_MATH_H_DEFAULTS]) ISNAND_LIBM= gl_HAVE_ISNAND_NO_LIBM if test $gl_cv_func_isnand_no_libm = no; then gl_HAVE_ISNAND_IN_LIBM if test $gl_cv_func_isnand_in_libm = yes; then ISNAND_LIBM=-lm fi fi dnl The variable gl_func_isnand set here is used by isnan.m4. if test $gl_cv_func_isnand_no_libm = yes \ || test $gl_cv_func_isnand_in_libm = yes; then gl_func_isnand=yes else gl_func_isnand=no HAVE_ISNAND=0 gl_BUILD_ISNAND fi AC_SUBST([ISNAND_LIBM]) ]) dnl Check how to get or define isnand() without linking with libm. AC_DEFUN([gl_FUNC_ISNAND_NO_LIBM], [ gl_HAVE_ISNAND_NO_LIBM if test $gl_cv_func_isnand_no_libm = yes; then AC_DEFINE([HAVE_ISNAND_IN_LIBC], [1], [Define if the isnan(double) function is available in libc.]) else gl_BUILD_ISNAND fi ]) dnl Pull in replacement isnand definition. It does not need -lm. AC_DEFUN([gl_BUILD_ISNAND], [ AC_LIBOBJ([isnand]) gl_DOUBLE_EXPONENT_LOCATION ]) dnl Test whether isnand() can be used with libm. AC_DEFUN([gl_HAVE_ISNAND_IN_LIBM], [ AC_CACHE_CHECK([whether isnan(double) can be used with libm], [gl_cv_func_isnand_in_libm], [ save_LIBS="$LIBS" LIBS="$LIBS -lm" AC_TRY_LINK([#include #if __GNUC__ >= 4 # undef isnand # define isnand(x) __builtin_isnand ((double)(x)) #elif defined isnan # undef isnand # define isnand(x) isnan ((double)(x)) #endif double x;], [return isnand (x);], [gl_cv_func_isnand_in_libm=yes], [gl_cv_func_isnand_in_libm=no]) LIBS="$save_LIBS" ]) ]) AC_DEFUN([gl_HAVE_ISNAND_NO_LIBM], [ AC_CACHE_CHECK([whether isnan(double) can be used without linking with libm], [gl_cv_func_isnand_no_libm], [ AC_TRY_LINK([#include #if __GNUC__ >= 4 # undef isnand # define isnand(x) __builtin_isnan ((double)(x)) #else # undef isnand # define isnand(x) isnan ((double)(x)) #endif double x;], [return isnand (x);], [gl_cv_func_isnand_no_libm=yes], [gl_cv_func_isnand_no_libm=no]) ]) ]) libprelude-1.0.0/libmissing/m4/fclose.m40000664000076400007640000000064411341220435014766 00000000000000# fclose.m4 serial 2 dnl Copyright (C) 2008-2010 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. AC_DEFUN([gl_FUNC_FCLOSE], [ ]) AC_DEFUN([gl_REPLACE_FCLOSE], [ AC_REQUIRE([gl_STDIO_H_DEFAULTS]) REPLACE_FCLOSE=1 AC_LIBOBJ([fclose]) ]) libprelude-1.0.0/libmissing/m4/include_next.m40000664000076400007640000001716711341220435016204 00000000000000# include_next.m4 serial 14 dnl Copyright (C) 2006-2010 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. dnl From Paul Eggert and Derek Price. dnl Sets INCLUDE_NEXT and PRAGMA_SYSTEM_HEADER. dnl dnl INCLUDE_NEXT expands to 'include_next' if the compiler supports it, or to dnl 'include' otherwise. dnl dnl INCLUDE_NEXT_AS_FIRST_DIRECTIVE expands to 'include_next' if the compiler dnl supports it in the special case that it is the first include directive in dnl the given file, or to 'include' otherwise. dnl dnl PRAGMA_SYSTEM_HEADER can be used in files that contain #include_next, dnl so as to avoid GCC warnings when the gcc option -pedantic is used. dnl '#pragma GCC system_header' has the same effect as if the file was found dnl through the include search path specified with '-isystem' options (as dnl opposed to the search path specified with '-I' options). Namely, gcc dnl does not warn about some things, and on some systems (Solaris and Interix) dnl __STDC__ evaluates to 0 instead of to 1. The latter is an undesired side dnl effect; we are therefore careful to use 'defined __STDC__' or '1' instead dnl of plain '__STDC__'. AC_DEFUN([gl_INCLUDE_NEXT], [ AC_LANG_PREPROC_REQUIRE() AC_CACHE_CHECK([whether the preprocessor supports include_next], [gl_cv_have_include_next], [rm -rf conftestd1a conftestd1b conftestd2 mkdir conftestd1a conftestd1b conftestd2 dnl IBM C 9.0, 10.1 (original versions, prior to the 2009-01 updates) on dnl AIX 6.1 support include_next when used as first preprocessor directive dnl in a file, but not when preceded by another include directive. Check dnl for this bug by including . dnl Additionally, with this same compiler, include_next is a no-op when dnl used in a header file that was included by specifying its absolute dnl file name. Despite these two bugs, include_next is used in the dnl compiler's . By virtue of the second bug, we need to use dnl include_next as well in this case. cat < conftestd1a/conftest.h #define DEFINED_IN_CONFTESTD1 #include_next #ifdef DEFINED_IN_CONFTESTD2 int foo; #else #error "include_next doesn't work" #endif EOF cat < conftestd1b/conftest.h #define DEFINED_IN_CONFTESTD1 #include #include_next #ifdef DEFINED_IN_CONFTESTD2 int foo; #else #error "include_next doesn't work" #endif EOF cat < conftestd2/conftest.h #ifndef DEFINED_IN_CONFTESTD1 #error "include_next test doesn't work" #endif #define DEFINED_IN_CONFTESTD2 EOF gl_save_CPPFLAGS="$CPPFLAGS" CPPFLAGS="$gl_save_CPPFLAGS -Iconftestd1b -Iconftestd2" AC_COMPILE_IFELSE([#include ], [gl_cv_have_include_next=yes], [CPPFLAGS="$gl_save_CPPFLAGS -Iconftestd1a -Iconftestd2" AC_COMPILE_IFELSE([#include ], [gl_cv_have_include_next=buggy], [gl_cv_have_include_next=no]) ]) CPPFLAGS="$gl_save_CPPFLAGS" rm -rf conftestd1a conftestd1b conftestd2 ]) PRAGMA_SYSTEM_HEADER= if test $gl_cv_have_include_next = yes; then INCLUDE_NEXT=include_next INCLUDE_NEXT_AS_FIRST_DIRECTIVE=include_next if test -n "$GCC"; then PRAGMA_SYSTEM_HEADER='#pragma GCC system_header' fi else if test $gl_cv_have_include_next = buggy; then INCLUDE_NEXT=include INCLUDE_NEXT_AS_FIRST_DIRECTIVE=include_next else INCLUDE_NEXT=include INCLUDE_NEXT_AS_FIRST_DIRECTIVE=include fi fi AC_SUBST([INCLUDE_NEXT]) AC_SUBST([INCLUDE_NEXT_AS_FIRST_DIRECTIVE]) AC_SUBST([PRAGMA_SYSTEM_HEADER]) ]) # gl_CHECK_NEXT_HEADERS(HEADER1 HEADER2 ...) # ------------------------------------------ # For each arg foo.h, if #include_next works, define NEXT_FOO_H to be # ''; otherwise define it to be # '"///usr/include/foo.h"', or whatever other absolute file name is suitable. # Also, if #include_next works as first preprocessing directive in a file, # define NEXT_AS_FIRST_DIRECTIVE_FOO_H to be ''; otherwise define it to # be # '"///usr/include/foo.h"', or whatever other absolute file name is suitable. # That way, a header file with the following line: # #@INCLUDE_NEXT@ @NEXT_FOO_H@ # or # #@INCLUDE_NEXT_AS_FIRST_DIRECTIVE@ @NEXT_AS_FIRST_DIRECTIVE_FOO_H@ # behaves (after sed substitution) as if it contained # #include_next # even if the compiler does not support include_next. # The three "///" are to pacify Sun C 5.8, which otherwise would say # "warning: #include of /usr/include/... may be non-portable". # Use `""', not `<>', so that the /// cannot be confused with a C99 comment. # Note: This macro assumes that the header file is not empty after # preprocessing, i.e. it does not only define preprocessor macros but also # provides some type/enum definitions or function/variable declarations. AC_DEFUN([gl_CHECK_NEXT_HEADERS], [ AC_REQUIRE([gl_INCLUDE_NEXT]) AC_REQUIRE([AC_CANONICAL_HOST]) AC_CHECK_HEADERS_ONCE([$1]) m4_foreach_w([gl_HEADER_NAME], [$1], [AS_VAR_PUSHDEF([gl_next_header], [gl_cv_next_]m4_defn([gl_HEADER_NAME])) if test $gl_cv_have_include_next = yes; then AS_VAR_SET([gl_next_header], ['<'gl_HEADER_NAME'>']) else AC_CACHE_CHECK( [absolute name of <]m4_defn([gl_HEADER_NAME])[>], m4_defn([gl_next_header]), [AS_VAR_PUSHDEF([gl_header_exists], [ac_cv_header_]m4_defn([gl_HEADER_NAME])) if test AS_VAR_GET(gl_header_exists) = yes; then AC_LANG_CONFTEST( [AC_LANG_SOURCE( [[#include <]]m4_dquote(m4_defn([gl_HEADER_NAME]))[[>]] )]) dnl AIX "xlc -E" and "cc -E" omit #line directives for header files dnl that contain only a #include of other header files and no dnl non-comment tokens of their own. This leads to a failure to dnl detect the absolute name of , , dnl and others. The workaround is to force preservation of comments dnl through option -C. This ensures all necessary #line directives dnl are present. GCC supports option -C as well. case "$host_os" in aix*) gl_absname_cpp="$ac_cpp -C" ;; *) gl_absname_cpp="$ac_cpp" ;; esac dnl eval is necessary to expand gl_absname_cpp. dnl Ultrix and Pyramid sh refuse to redirect output of eval, dnl so use subshell. AS_VAR_SET([gl_next_header], ['"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&AS_MESSAGE_LOG_FD | sed -n '\#/]m4_defn([gl_HEADER_NAME])[#{ s#.*"\(.*/]m4_defn([gl_HEADER_NAME])[\)".*#\1# s#^/[^/]#//&# p q }'`'"']) else AS_VAR_SET([gl_next_header], ['<'gl_HEADER_NAME'>']) fi AS_VAR_POPDEF([gl_header_exists])]) fi AC_SUBST( AS_TR_CPP([NEXT_]m4_defn([gl_HEADER_NAME])), [AS_VAR_GET([gl_next_header])]) if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next' gl_next_as_first_directive='<'gl_HEADER_NAME'>' else # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include' gl_next_as_first_directive=AS_VAR_GET([gl_next_header]) fi AC_SUBST( AS_TR_CPP([NEXT_AS_FIRST_DIRECTIVE_]m4_defn([gl_HEADER_NAME])), [$gl_next_as_first_directive]) AS_VAR_POPDEF([gl_next_header])]) ]) libprelude-1.0.0/libmissing/m4/printf-frexpl.m40000664000076400007640000000444411341220436016316 00000000000000# printf-frexpl.m4 serial 6 dnl Copyright (C) 2007, 2009, 2010 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. dnl Check how to define printf_frexpl() without linking with libm. AC_DEFUN([gl_FUNC_PRINTF_FREXPL], [ AC_REQUIRE([gl_MATH_H_DEFAULTS]) dnl Subset of gl_FUNC_FREXPL_NO_LIBM. AC_CACHE_CHECK([whether frexpl can be used without linking with libm], [gl_cv_func_frexpl_no_libm], [ AC_TRY_LINK([#include long double x; int y;], [return frexpl (x, &y) < 1;], [gl_cv_func_frexpl_no_libm=yes], [gl_cv_func_frexpl_no_libm=no]) ]) if test $gl_cv_func_frexpl_no_libm = yes; then gl_FUNC_FREXPL_WORKS case "$gl_cv_func_frexpl_works" in *yes) gl_func_frexpl_no_libm=yes ;; *) gl_func_frexpl_no_libm=no; REPLACE_FREXPL=1 ;; esac else gl_func_frexpl_no_libm=no dnl Set REPLACE_FREXPL here because the system may have frexpl in libm. REPLACE_FREXPL=1 fi if test $gl_func_frexpl_no_libm = yes; then AC_DEFINE([HAVE_FREXPL_IN_LIBC], [1], [Define if the frexpl function is available in libc.]) dnl Also check whether it's declared. dnl MacOS X 10.3 has frexpl() in libc but doesn't declare it in . AC_CHECK_DECL([frexpl], , [HAVE_DECL_FREXPL=0], [#include ]) fi AC_CACHE_CHECK([whether ldexpl can be used without linking with libm], [gl_cv_func_ldexpl_no_libm], [ AC_TRY_LINK([#include long double x; int y;], [return ldexpl (x, y) < 1;], [gl_cv_func_ldexpl_no_libm=yes], [gl_cv_func_ldexpl_no_libm=no]) ]) if test $gl_cv_func_ldexpl_no_libm = yes; then gl_FUNC_LDEXPL_WORKS case "$gl_cv_func_ldexpl_works" in *yes) AC_DEFINE([HAVE_LDEXPL_IN_LIBC], [1], [Define if the ldexpl function is available in libc.]) dnl Also check whether it's declared. dnl MacOS X 10.3 has ldexpl() in libc but doesn't declare it in . AC_CHECK_DECL([ldexpl], , [HAVE_DECL_LDEXPL=0], [#include ]) ;; esac fi ]) libprelude-1.0.0/libmissing/m4/getpass.m40000664000076400007640000000312511341220435015156 00000000000000# getpass.m4 serial 11 dnl Copyright (C) 2002-2003, 2005-2006, 2009-2010 Free Software Foundation, dnl Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. # Provide a getpass() function if the system doesn't have it. AC_DEFUN([gl_FUNC_GETPASS], [ AC_REPLACE_FUNCS([getpass]) AC_CHECK_DECLS_ONCE([getpass]) if test $ac_cv_func_getpass = no; then gl_PREREQ_GETPASS fi ]) # Provide the GNU getpass() implementation. It supports passwords of # arbitrary length (not just 8 bytes as on HP-UX). AC_DEFUN([gl_FUNC_GETPASS_GNU], [ AC_CHECK_DECLS_ONCE([getpass]) dnl TODO: Detect when GNU getpass() is already found in glibc. AC_LIBOBJ([getpass]) gl_PREREQ_GETPASS dnl We must choose a different name for our function, since on ELF systems dnl an unusable getpass() in libc.so would override our getpass() if it is dnl compiled into a shared library. AC_DEFINE([getpass], [gnu_getpass], [Define to a replacement function name for getpass().]) ]) # Prerequisites of lib/getpass.c. AC_DEFUN([gl_PREREQ_GETPASS], [ AC_CHECK_HEADERS_ONCE([stdio_ext.h termios.h]) AC_CHECK_FUNCS_ONCE([__fsetlocking tcgetattr tcsetattr]) AC_CHECK_DECLS([__fsetlocking],,, [#include #if HAVE_STDIO_EXT_H #include #endif]) AC_CHECK_DECLS_ONCE([fflush_unlocked]) AC_CHECK_DECLS_ONCE([flockfile]) AC_CHECK_DECLS_ONCE([fputs_unlocked]) AC_CHECK_DECLS_ONCE([funlockfile]) AC_CHECK_DECLS_ONCE([putc_unlocked]) : ]) libprelude-1.0.0/libmissing/m4/gettimeofday.m40000664000076400007640000001021511345707014016176 00000000000000# serial 14 # Copyright (C) 2001-2003, 2005, 2007, 2009-2010 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. dnl From Jim Meyering. AC_DEFUN([gl_FUNC_GETTIMEOFDAY], [ AC_REQUIRE([AC_C_RESTRICT]) AC_REQUIRE([gl_HEADER_SYS_TIME_H]) AC_REQUIRE([gl_HEADER_SYS_TIME_H_DEFAULTS]) AC_CHECK_FUNCS_ONCE([gettimeofday]) gl_gettimeofday_timezone=void if test $ac_cv_func_gettimeofday = yes; then gl_FUNC_GETTIMEOFDAY_CLOBBER AC_CACHE_CHECK([for gettimeofday with POSIX signature], [gl_cv_func_gettimeofday_posix_signature], [AC_COMPILE_IFELSE( [AC_LANG_PROGRAM( [[#include struct timeval c; int gettimeofday (struct timeval *restrict, void *restrict); ]], [[/* glibc uses struct timezone * rather than the POSIX void * if _GNU_SOURCE is defined. However, since the only portable use of gettimeofday uses NULL as the second parameter, and since the glibc definition is actually more typesafe, it is not worth wrapping this to get a compliant signature. */ int (*f) (struct timeval *restrict, void *restrict) = gettimeofday; int x = f (&c, 0); return !(x | c.tv_sec | c.tv_usec); ]])], [gl_cv_func_gettimeofday_posix_signature=yes], [AC_COMPILE_IFELSE( [AC_LANG_PROGRAM( [[#include int gettimeofday (struct timeval *restrict, struct timezone *restrict); ]])], [gl_cv_func_gettimeofday_posix_signature=almost], [gl_cv_func_gettimeofday_posix_signature=no])])]) if test $gl_cv_func_gettimeofday_posix_signature = almost; then gl_gettimeofday_timezone='struct timezone' elif test $gl_cv_func_gettimeofday_posix_signature != yes; then REPLACE_GETTIMEOFDAY=1 AC_LIBOBJ([gettimeofday]) gl_PREREQ_GETTIMEOFDAY fi fi AC_DEFINE_UNQUOTED([GETTIMEOFDAY_TIMEZONE], [$gl_gettimeofday_timezone], [Define this to 'void' or 'struct timezone' to match the system's declaration of the second argument to gettimeofday.]) ]) dnl See if gettimeofday clobbers the static buffer that localtime uses dnl for its return value. The gettimeofday function from Mac OS X 10.0.4 dnl (i.e., Darwin 1.3.7) has this problem. dnl dnl If it does, then arrange to use gettimeofday and localtime only via dnl the wrapper functions that work around the problem. AC_DEFUN([gl_FUNC_GETTIMEOFDAY_CLOBBER], [ AC_REQUIRE([gl_HEADER_SYS_TIME_H]) AC_CACHE_CHECK([whether gettimeofday clobbers localtime buffer], [gl_cv_func_gettimeofday_clobber], [AC_RUN_IFELSE( [AC_LANG_PROGRAM( [[#include #include #include #include ]], [[ time_t t = 0; struct tm *lt; struct tm saved_lt; struct timeval tv; lt = localtime (&t); saved_lt = *lt; gettimeofday (&tv, NULL); return memcmp (lt, &saved_lt, sizeof (struct tm)) != 0; ]])], [gl_cv_func_gettimeofday_clobber=no], [gl_cv_func_gettimeofday_clobber=yes], dnl When crosscompiling, assume it is broken. [gl_cv_func_gettimeofday_clobber=yes])]) if test $gl_cv_func_gettimeofday_clobber = yes; then REPLACE_GETTIMEOFDAY=1 gl_GETTIMEOFDAY_REPLACE_LOCALTIME AC_DEFINE([GETTIMEOFDAY_CLOBBERS_LOCALTIME], [1], [Define if gettimeofday clobbers the localtime buffer.]) fi ]) AC_DEFUN([gl_GETTIMEOFDAY_REPLACE_LOCALTIME], [ AC_LIBOBJ([gettimeofday]) gl_PREREQ_GETTIMEOFDAY AC_DEFINE([gmtime], [rpl_gmtime], [Define to rpl_gmtime if the replacement function should be used.]) AC_DEFINE([localtime], [rpl_localtime], [Define to rpl_localtime if the replacement function should be used.]) ]) # Prerequisites of lib/gettimeofday.c. AC_DEFUN([gl_PREREQ_GETTIMEOFDAY], [ AC_CHECK_HEADERS([sys/timeb.h]) AC_CHECK_FUNCS([_ftime]) ]) libprelude-1.0.0/libmissing/m4/write.m40000664000076400007640000000132011341220437014637 00000000000000# write.m4 serial 1 dnl Copyright (C) 2008, 2009, 2010 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. AC_DEFUN([gl_FUNC_WRITE], [ AC_REQUIRE([gl_UNISTD_H_DEFAULTS]) dnl This ifdef is just an optimization, to avoid performing a configure dnl check whose result is not used. It does not make the test of dnl GNULIB_UNISTD_H_SIGPIPE or GNULIB_SIGPIPE redundant. m4_ifdef([gl_SIGNAL_SIGPIPE], [ gl_SIGNAL_SIGPIPE if test $gl_cv_header_signal_h_SIGPIPE != yes; then REPLACE_WRITE=1 AC_LIBOBJ([write]) fi ]) ]) libprelude-1.0.0/libmissing/m4/getdelim.m40000664000076400007640000000475211341220435015311 00000000000000# getdelim.m4 serial 6 dnl Copyright (C) 2005-2007, 2009-2010 Free Software Foundation, Inc. dnl dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. AC_PREREQ([2.59]) AC_DEFUN([gl_FUNC_GETDELIM], [ AC_REQUIRE([gl_STDIO_H_DEFAULTS]) dnl Persuade glibc to declare getdelim(). AC_REQUIRE([AC_USE_SYSTEM_EXTENSIONS]) AC_CHECK_DECLS_ONCE([getdelim]) AC_CHECK_FUNCS_ONCE([getdelim]) if test $ac_cv_func_getdelim = yes; then dnl Found it in some library. Verify that it works. AC_CACHE_CHECK([for working getdelim function], [gl_cv_func_working_getdelim], [echo fooNbarN | tr -d '\012' | tr N '\012' > conftest.data AC_RUN_IFELSE([AC_LANG_SOURCE([[ # include # include # include int main () { FILE *in = fopen ("./conftest.data", "r"); if (!in) return 1; { /* Test result for a NULL buffer and a zero size. Based on a test program from Karl Heuer. */ char *line = NULL; size_t siz = 0; int len = getdelim (&line, &siz, '\n', in); if (!(len == 4 && line && strcmp (line, "foo\n") == 0)) return 1; } { /* Test result for a NULL buffer and a non-zero size. This crashes on FreeBSD 8.0. */ char *line = NULL; size_t siz = (size_t)(~0) / 4; if (getdelim (&line, &siz, '\n', in) == -1) return 1; } return 0; } ]])], [gl_cv_func_working_getdelim=yes] dnl The library version works. , [gl_cv_func_working_getdelim=no] dnl The library version does NOT work. , dnl We're cross compiling. Assume it works on glibc2 systems. [AC_EGREP_CPP([Lucky GNU user], [ #include #ifdef __GNU_LIBRARY__ #if (__GLIBC__ >= 2) Lucky GNU user #endif #endif ], [gl_cv_func_working_getdelim=yes], [gl_cv_func_working_getdelim=no])] )]) else gl_cv_func_working_getdelim=no fi if test $ac_cv_have_decl_getdelim = no; then HAVE_DECL_GETDELIM=0 fi if test $gl_cv_func_working_getdelim = no; then if test $ac_cv_func_getdelim = yes; then REPLACE_GETDELIM=1 fi AC_LIBOBJ([getdelim]) gl_PREREQ_GETDELIM fi ]) # Prerequisites of lib/getdelim.c. AC_DEFUN([gl_PREREQ_GETDELIM], [ AC_CHECK_FUNCS([flockfile funlockfile]) AC_CHECK_DECLS([getc_unlocked]) ]) libprelude-1.0.0/libmissing/m4/nl_langinfo.m40000664000076400007640000000144611341220436016003 00000000000000# nl_langinfo.m4 serial 3 dnl Copyright (C) 2009, 2010 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. AC_DEFUN([gl_FUNC_NL_LANGINFO], [ AC_REQUIRE([gl_LANGINFO_H_DEFAULTS]) AC_REQUIRE([gl_LANGINFO_H]) AC_CHECK_FUNCS_ONCE([nl_langinfo]) if test $ac_cv_func_nl_langinfo = yes; then if test $HAVE_LANGINFO_CODESET = 1 && test $HAVE_LANGINFO_ERA = 1; then : else REPLACE_NL_LANGINFO=1 AC_DEFINE([REPLACE_NL_LANGINFO], [1], [Define if nl_langinfo exists but is overridden by gnulib.]) AC_LIBOBJ([nl_langinfo]) fi else HAVE_NL_LANGINFO=0 AC_LIBOBJ([nl_langinfo]) fi ]) libprelude-1.0.0/libmissing/m4/exponentl.m40000664000076400007640000000606111341220435015526 00000000000000# exponentl.m4 serial 2 dnl Copyright (C) 2007-2010 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. AC_DEFUN([gl_LONG_DOUBLE_EXPONENT_LOCATION], [ AC_REQUIRE([gl_BIGENDIAN]) AC_CACHE_CHECK([where to find the exponent in a 'long double'], [gl_cv_cc_long_double_expbit0], [ AC_TRY_RUN([ #include #include #include #include #define NWORDS \ ((sizeof (long double) + sizeof (unsigned int) - 1) / sizeof (unsigned int)) typedef union { long double value; unsigned int word[NWORDS]; } memory_long_double; static unsigned int ored_words[NWORDS]; static unsigned int anded_words[NWORDS]; static void add_to_ored_words (long double x) { memory_long_double m; size_t i; /* Clear it first, in case sizeof (long double) < sizeof (memory_long_double). */ memset (&m, 0, sizeof (memory_long_double)); m.value = x; for (i = 0; i < NWORDS; i++) { ored_words[i] |= m.word[i]; anded_words[i] &= m.word[i]; } } int main () { size_t j; FILE *fp = fopen ("conftest.out", "w"); if (fp == NULL) return 1; for (j = 0; j < NWORDS; j++) anded_words[j] = ~ (unsigned int) 0; add_to_ored_words (0.25L); add_to_ored_words (0.5L); add_to_ored_words (1.0L); add_to_ored_words (2.0L); add_to_ored_words (4.0L); /* Remove bits that are common (e.g. if representation of the first mantissa bit is explicit). */ for (j = 0; j < NWORDS; j++) ored_words[j] &= ~anded_words[j]; /* Now find the nonzero word. */ for (j = 0; j < NWORDS; j++) if (ored_words[j] != 0) break; if (j < NWORDS) { size_t i; for (i = j + 1; i < NWORDS; i++) if (ored_words[i] != 0) { fprintf (fp, "unknown"); return (fclose (fp) != 0); } for (i = 0; ; i++) if ((ored_words[j] >> i) & 1) { fprintf (fp, "word %d bit %d", (int) j, (int) i); return (fclose (fp) != 0); } } fprintf (fp, "unknown"); return (fclose (fp) != 0); } ], [gl_cv_cc_long_double_expbit0=`cat conftest.out`], [gl_cv_cc_long_double_expbit0="unknown"], [ dnl When cross-compiling, we don't know. It depends on the dnl ABI and compiler version. There are too many cases. gl_cv_cc_long_double_expbit0="unknown" ]) rm -f conftest.out ]) case "$gl_cv_cc_long_double_expbit0" in word*bit*) word=`echo "$gl_cv_cc_long_double_expbit0" | sed -e 's/word //' -e 's/ bit.*//'` bit=`echo "$gl_cv_cc_long_double_expbit0" | sed -e 's/word.*bit //'` AC_DEFINE_UNQUOTED([LDBL_EXPBIT0_WORD], [$word], [Define as the word index where to find the exponent of 'long double'.]) AC_DEFINE_UNQUOTED([LDBL_EXPBIT0_BIT], [$bit], [Define as the bit index in the word where to find bit 0 of the exponent of 'long double'.]) ;; esac ]) libprelude-1.0.0/libmissing/m4/strnlen.m40000664000076400007640000000202611341220436015175 00000000000000# strnlen.m4 serial 10 dnl Copyright (C) 2002-2003, 2005-2007, 2009-2010 Free Software Foundation, dnl Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. AC_DEFUN([gl_FUNC_STRNLEN], [ dnl Persuade glibc to declare strnlen(). AC_REQUIRE([AC_USE_SYSTEM_EXTENSIONS]) AC_REQUIRE([gl_HEADER_STRING_H_DEFAULTS]) AC_CHECK_DECLS_ONCE([strnlen]) if test $ac_cv_have_decl_strnlen = no; then HAVE_DECL_STRNLEN=0 fi AC_FUNC_STRNLEN if test $ac_cv_func_strnlen_working = no; then # This is necessary because automake-1.6.1 doesn't understand # that the above use of AC_FUNC_STRNLEN means we may have to use # lib/strnlen.c. #AC_LIBOBJ([strnlen]) AC_DEFINE([strnlen], [rpl_strnlen], [Define to rpl_strnlen if the replacement function should be used.]) gl_PREREQ_STRNLEN fi ]) # Prerequisites of lib/strnlen.c. AC_DEFUN([gl_PREREQ_STRNLEN], [:]) libprelude-1.0.0/libmissing/m4/fopen.m40000664000076400007640000000336011341220435014620 00000000000000# fopen.m4 serial 5 dnl Copyright (C) 2007-2010 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. AC_DEFUN([gl_FUNC_FOPEN], [ AC_REQUIRE([gl_STDIO_H_DEFAULTS]) AC_REQUIRE([AC_CANONICAL_HOST]) case "$host_os" in mingw* | pw*) dnl Replace fopen, for handling of "/dev/null". REPLACE_FOPEN=1 dnl fopen on mingw also has the trailing slash bug. gl_cv_func_fopen_slash="guessing no" ;; *) dnl fopen("foo/", "w") should not create a file when the file name has a dnl trailing slash. AC_CACHE_CHECK([whether fopen recognizes a trailing slash], [gl_cv_func_fopen_slash], [ AC_TRY_RUN([ #include #include int main () { return fopen ("conftest.sl/", "w") != NULL; }], [gl_cv_func_fopen_slash=yes], [gl_cv_func_fopen_slash=no], [ changequote(,)dnl case "$host_os" in solaris2.[0-9]*) gl_cv_func_fopen_slash="guessing no" ;; hpux*) gl_cv_func_fopen_slash="guessing no" ;; *) gl_cv_func_fopen_slash="guessing yes" ;; esac changequote([,])dnl ]) rm -f conftest.sl ]) ;; esac case "$gl_cv_func_fopen_slash" in *no) AC_DEFINE([FOPEN_TRAILING_SLASH_BUG], [1], [Define to 1 if fopen() fails to recognize a trailing slash.]) REPLACE_FOPEN=1 ;; esac if test $REPLACE_FOPEN = 1; then AC_LIBOBJ([fopen]) gl_PREREQ_FOPEN fi ]) # Prerequisites of lib/fopen.c. AC_DEFUN([gl_PREREQ_FOPEN], [ AC_REQUIRE([AC_C_INLINE]) ]) libprelude-1.0.0/libmissing/m4/lib-link.m40000664000076400007640000007711611341220436015225 00000000000000# lib-link.m4 serial 20 (gettext-0.18) dnl Copyright (C) 2001-2010 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. dnl From Bruno Haible. AC_PREREQ([2.54]) dnl AC_LIB_LINKFLAGS(name [, dependencies]) searches for libname and dnl the libraries corresponding to explicit and implicit dependencies. dnl Sets and AC_SUBSTs the LIB${NAME} and LTLIB${NAME} variables and dnl augments the CPPFLAGS variable. dnl Sets and AC_SUBSTs the LIB${NAME}_PREFIX variable to nonempty if libname dnl was found in ${LIB${NAME}_PREFIX}/$acl_libdirstem. AC_DEFUN([AC_LIB_LINKFLAGS], [ AC_REQUIRE([AC_LIB_PREPARE_PREFIX]) AC_REQUIRE([AC_LIB_RPATH]) pushdef([Name],[translit([$1],[./-], [___])]) pushdef([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-], [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])]) AC_CACHE_CHECK([how to link with lib[]$1], [ac_cv_lib[]Name[]_libs], [ AC_LIB_LINKFLAGS_BODY([$1], [$2]) ac_cv_lib[]Name[]_libs="$LIB[]NAME" ac_cv_lib[]Name[]_ltlibs="$LTLIB[]NAME" ac_cv_lib[]Name[]_cppflags="$INC[]NAME" ac_cv_lib[]Name[]_prefix="$LIB[]NAME[]_PREFIX" ]) LIB[]NAME="$ac_cv_lib[]Name[]_libs" LTLIB[]NAME="$ac_cv_lib[]Name[]_ltlibs" INC[]NAME="$ac_cv_lib[]Name[]_cppflags" LIB[]NAME[]_PREFIX="$ac_cv_lib[]Name[]_prefix" AC_LIB_APPENDTOVAR([CPPFLAGS], [$INC]NAME) AC_SUBST([LIB]NAME) AC_SUBST([LTLIB]NAME) AC_SUBST([LIB]NAME[_PREFIX]) dnl Also set HAVE_LIB[]NAME so that AC_LIB_HAVE_LINKFLAGS can reuse the dnl results of this search when this library appears as a dependency. HAVE_LIB[]NAME=yes popdef([NAME]) popdef([Name]) ]) dnl AC_LIB_HAVE_LINKFLAGS(name, dependencies, includes, testcode, [missing-message]) dnl searches for libname and the libraries corresponding to explicit and dnl implicit dependencies, together with the specified include files and dnl the ability to compile and link the specified testcode. The missing-message dnl defaults to 'no' and may contain additional hints for the user. dnl If found, it sets and AC_SUBSTs HAVE_LIB${NAME}=yes and the LIB${NAME} dnl and LTLIB${NAME} variables and augments the CPPFLAGS variable, and dnl #defines HAVE_LIB${NAME} to 1. Otherwise, it sets and AC_SUBSTs dnl HAVE_LIB${NAME}=no and LIB${NAME} and LTLIB${NAME} to empty. dnl Sets and AC_SUBSTs the LIB${NAME}_PREFIX variable to nonempty if libname dnl was found in ${LIB${NAME}_PREFIX}/$acl_libdirstem. AC_DEFUN([AC_LIB_HAVE_LINKFLAGS], [ AC_REQUIRE([AC_LIB_PREPARE_PREFIX]) AC_REQUIRE([AC_LIB_RPATH]) pushdef([Name],[translit([$1],[./-], [___])]) pushdef([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-], [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])]) dnl Search for lib[]Name and define LIB[]NAME, LTLIB[]NAME and INC[]NAME dnl accordingly. AC_LIB_LINKFLAGS_BODY([$1], [$2]) dnl Add $INC[]NAME to CPPFLAGS before performing the following checks, dnl because if the user has installed lib[]Name and not disabled its use dnl via --without-lib[]Name-prefix, he wants to use it. ac_save_CPPFLAGS="$CPPFLAGS" AC_LIB_APPENDTOVAR([CPPFLAGS], [$INC]NAME) AC_CACHE_CHECK([for lib[]$1], [ac_cv_lib[]Name], [ ac_save_LIBS="$LIBS" LIBS="$LIBS $LIB[]NAME" AC_TRY_LINK([$3], [$4], [ac_cv_lib[]Name=yes], [ac_cv_lib[]Name='m4_if([$5], [], [no], [[$5]])']) LIBS="$ac_save_LIBS" ]) if test "$ac_cv_lib[]Name" = yes; then HAVE_LIB[]NAME=yes AC_DEFINE([HAVE_LIB]NAME, 1, [Define if you have the lib][$1 library.]) AC_MSG_CHECKING([how to link with lib[]$1]) AC_MSG_RESULT([$LIB[]NAME]) else HAVE_LIB[]NAME=no dnl If $LIB[]NAME didn't lead to a usable library, we don't need dnl $INC[]NAME either. CPPFLAGS="$ac_save_CPPFLAGS" LIB[]NAME= LTLIB[]NAME= LIB[]NAME[]_PREFIX= fi AC_SUBST([HAVE_LIB]NAME) AC_SUBST([LIB]NAME) AC_SUBST([LTLIB]NAME) AC_SUBST([LIB]NAME[_PREFIX]) popdef([NAME]) popdef([Name]) ]) dnl Determine the platform dependent parameters needed to use rpath: dnl acl_libext, dnl acl_shlibext, dnl acl_hardcode_libdir_flag_spec, dnl acl_hardcode_libdir_separator, dnl acl_hardcode_direct, dnl acl_hardcode_minus_L. AC_DEFUN([AC_LIB_RPATH], [ dnl Tell automake >= 1.10 to complain if config.rpath is missing. m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([config.rpath])]) AC_REQUIRE([AC_PROG_CC]) dnl we use $CC, $GCC, $LDFLAGS AC_REQUIRE([AC_LIB_PROG_LD]) dnl we use $LD, $with_gnu_ld AC_REQUIRE([AC_CANONICAL_HOST]) dnl we use $host AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT]) dnl we use $ac_aux_dir AC_CACHE_CHECK([for shared library run path origin], [acl_cv_rpath], [ CC="$CC" GCC="$GCC" LDFLAGS="$LDFLAGS" LD="$LD" with_gnu_ld="$with_gnu_ld" \ ${CONFIG_SHELL-/bin/sh} "$ac_aux_dir/config.rpath" "$host" > conftest.sh . ./conftest.sh rm -f ./conftest.sh acl_cv_rpath=done ]) wl="$acl_cv_wl" acl_libext="$acl_cv_libext" acl_shlibext="$acl_cv_shlibext" acl_libname_spec="$acl_cv_libname_spec" acl_library_names_spec="$acl_cv_library_names_spec" acl_hardcode_libdir_flag_spec="$acl_cv_hardcode_libdir_flag_spec" acl_hardcode_libdir_separator="$acl_cv_hardcode_libdir_separator" acl_hardcode_direct="$acl_cv_hardcode_direct" acl_hardcode_minus_L="$acl_cv_hardcode_minus_L" dnl Determine whether the user wants rpath handling at all. AC_ARG_ENABLE([rpath], [ --disable-rpath do not hardcode runtime library paths], :, enable_rpath=yes) ]) dnl AC_LIB_FROMPACKAGE(name, package) dnl declares that libname comes from the given package. The configure file dnl will then not have a --with-libname-prefix option but a dnl --with-package-prefix option. Several libraries can come from the same dnl package. This declaration must occur before an AC_LIB_LINKFLAGS or similar dnl macro call that searches for libname. AC_DEFUN([AC_LIB_FROMPACKAGE], [ pushdef([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-], [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])]) define([acl_frompackage_]NAME, [$2]) popdef([NAME]) pushdef([PACK],[$2]) pushdef([PACKUP],[translit(PACK,[abcdefghijklmnopqrstuvwxyz./-], [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])]) define([acl_libsinpackage_]PACKUP, m4_ifdef([acl_libsinpackage_]PACKUP, [acl_libsinpackage_]PACKUP[[, ]],)[lib$1]) popdef([PACKUP]) popdef([PACK]) ]) dnl AC_LIB_LINKFLAGS_BODY(name [, dependencies]) searches for libname and dnl the libraries corresponding to explicit and implicit dependencies. dnl Sets the LIB${NAME}, LTLIB${NAME} and INC${NAME} variables. dnl Also, sets the LIB${NAME}_PREFIX variable to nonempty if libname was found dnl in ${LIB${NAME}_PREFIX}/$acl_libdirstem. AC_DEFUN([AC_LIB_LINKFLAGS_BODY], [ AC_REQUIRE([AC_LIB_PREPARE_MULTILIB]) pushdef([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-], [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])]) pushdef([PACK],[m4_ifdef([acl_frompackage_]NAME, [acl_frompackage_]NAME, lib[$1])]) pushdef([PACKUP],[translit(PACK,[abcdefghijklmnopqrstuvwxyz./-], [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])]) pushdef([PACKLIBS],[m4_ifdef([acl_frompackage_]NAME, [acl_libsinpackage_]PACKUP, lib[$1])]) dnl Autoconf >= 2.61 supports dots in --with options. pushdef([P_A_C_K],[m4_if(m4_version_compare(m4_defn([m4_PACKAGE_VERSION]),[2.61]),[-1],[translit(PACK,[.],[_])],PACK)]) dnl By default, look in $includedir and $libdir. use_additional=yes AC_LIB_WITH_FINAL_PREFIX([ eval additional_includedir=\"$includedir\" eval additional_libdir=\"$libdir\" ]) AC_ARG_WITH(P_A_C_K[-prefix], [[ --with-]]P_A_C_K[[-prefix[=DIR] search for ]PACKLIBS[ in DIR/include and DIR/lib --without-]]P_A_C_K[[-prefix don't search for ]PACKLIBS[ in includedir and libdir]], [ if test "X$withval" = "Xno"; then use_additional=no else if test "X$withval" = "X"; then AC_LIB_WITH_FINAL_PREFIX([ eval additional_includedir=\"$includedir\" eval additional_libdir=\"$libdir\" ]) else additional_includedir="$withval/include" additional_libdir="$withval/$acl_libdirstem" if test "$acl_libdirstem2" != "$acl_libdirstem" \ && ! test -d "$withval/$acl_libdirstem"; then additional_libdir="$withval/$acl_libdirstem2" fi fi fi ]) dnl Search the library and its dependencies in $additional_libdir and dnl $LDFLAGS. Using breadth-first-seach. LIB[]NAME= LTLIB[]NAME= INC[]NAME= LIB[]NAME[]_PREFIX= dnl HAVE_LIB${NAME} is an indicator that LIB${NAME}, LTLIB${NAME} have been dnl computed. So it has to be reset here. HAVE_LIB[]NAME= rpathdirs= ltrpathdirs= names_already_handled= names_next_round='$1 $2' while test -n "$names_next_round"; do names_this_round="$names_next_round" names_next_round= for name in $names_this_round; do already_handled= for n in $names_already_handled; do if test "$n" = "$name"; then already_handled=yes break fi done if test -z "$already_handled"; then names_already_handled="$names_already_handled $name" dnl See if it was already located by an earlier AC_LIB_LINKFLAGS dnl or AC_LIB_HAVE_LINKFLAGS call. uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'` eval value=\"\$HAVE_LIB$uppername\" if test -n "$value"; then if test "$value" = yes; then eval value=\"\$LIB$uppername\" test -z "$value" || LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$value" eval value=\"\$LTLIB$uppername\" test -z "$value" || LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }$value" else dnl An earlier call to AC_LIB_HAVE_LINKFLAGS has determined dnl that this library doesn't exist. So just drop it. : fi else dnl Search the library lib$name in $additional_libdir and $LDFLAGS dnl and the already constructed $LIBNAME/$LTLIBNAME. found_dir= found_la= found_so= found_a= eval libname=\"$acl_libname_spec\" # typically: libname=lib$name if test -n "$acl_shlibext"; then shrext=".$acl_shlibext" # typically: shrext=.so else shrext= fi if test $use_additional = yes; then dir="$additional_libdir" dnl The same code as in the loop below: dnl First look for a shared library. if test -n "$acl_shlibext"; then if test -f "$dir/$libname$shrext"; then found_dir="$dir" found_so="$dir/$libname$shrext" else if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then ver=`(cd "$dir" && \ for f in "$libname$shrext".*; do echo "$f"; done \ | sed -e "s,^$libname$shrext\\\\.,," \ | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \ | sed 1q ) 2>/dev/null` if test -n "$ver" && test -f "$dir/$libname$shrext.$ver"; then found_dir="$dir" found_so="$dir/$libname$shrext.$ver" fi else eval library_names=\"$acl_library_names_spec\" for f in $library_names; do if test -f "$dir/$f"; then found_dir="$dir" found_so="$dir/$f" break fi done fi fi fi dnl Then look for a static library. if test "X$found_dir" = "X"; then if test -f "$dir/$libname.$acl_libext"; then found_dir="$dir" found_a="$dir/$libname.$acl_libext" fi fi if test "X$found_dir" != "X"; then if test -f "$dir/$libname.la"; then found_la="$dir/$libname.la" fi fi fi if test "X$found_dir" = "X"; then for x in $LDFLAGS $LTLIB[]NAME; do AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"]) case "$x" in -L*) dir=`echo "X$x" | sed -e 's/^X-L//'` dnl First look for a shared library. if test -n "$acl_shlibext"; then if test -f "$dir/$libname$shrext"; then found_dir="$dir" found_so="$dir/$libname$shrext" else if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then ver=`(cd "$dir" && \ for f in "$libname$shrext".*; do echo "$f"; done \ | sed -e "s,^$libname$shrext\\\\.,," \ | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \ | sed 1q ) 2>/dev/null` if test -n "$ver" && test -f "$dir/$libname$shrext.$ver"; then found_dir="$dir" found_so="$dir/$libname$shrext.$ver" fi else eval library_names=\"$acl_library_names_spec\" for f in $library_names; do if test -f "$dir/$f"; then found_dir="$dir" found_so="$dir/$f" break fi done fi fi fi dnl Then look for a static library. if test "X$found_dir" = "X"; then if test -f "$dir/$libname.$acl_libext"; then found_dir="$dir" found_a="$dir/$libname.$acl_libext" fi fi if test "X$found_dir" != "X"; then if test -f "$dir/$libname.la"; then found_la="$dir/$libname.la" fi fi ;; esac if test "X$found_dir" != "X"; then break fi done fi if test "X$found_dir" != "X"; then dnl Found the library. LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-L$found_dir -l$name" if test "X$found_so" != "X"; then dnl Linking with a shared library. We attempt to hardcode its dnl directory into the executable's runpath, unless it's the dnl standard /usr/lib. if test "$enable_rpath" = no \ || test "X$found_dir" = "X/usr/$acl_libdirstem" \ || test "X$found_dir" = "X/usr/$acl_libdirstem2"; then dnl No hardcoding is needed. LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so" else dnl Use an explicit option to hardcode DIR into the resulting dnl binary. dnl Potentially add DIR to ltrpathdirs. dnl The ltrpathdirs will be appended to $LTLIBNAME at the end. haveit= for x in $ltrpathdirs; do if test "X$x" = "X$found_dir"; then haveit=yes break fi done if test -z "$haveit"; then ltrpathdirs="$ltrpathdirs $found_dir" fi dnl The hardcoding into $LIBNAME is system dependent. if test "$acl_hardcode_direct" = yes; then dnl Using DIR/libNAME.so during linking hardcodes DIR into the dnl resulting binary. LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so" else if test -n "$acl_hardcode_libdir_flag_spec" && test "$acl_hardcode_minus_L" = no; then dnl Use an explicit option to hardcode DIR into the resulting dnl binary. LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so" dnl Potentially add DIR to rpathdirs. dnl The rpathdirs will be appended to $LIBNAME at the end. haveit= for x in $rpathdirs; do if test "X$x" = "X$found_dir"; then haveit=yes break fi done if test -z "$haveit"; then rpathdirs="$rpathdirs $found_dir" fi else dnl Rely on "-L$found_dir". dnl But don't add it if it's already contained in the LDFLAGS dnl or the already constructed $LIBNAME haveit= for x in $LDFLAGS $LIB[]NAME; do AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"]) if test "X$x" = "X-L$found_dir"; then haveit=yes break fi done if test -z "$haveit"; then LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$found_dir" fi if test "$acl_hardcode_minus_L" != no; then dnl FIXME: Not sure whether we should use dnl "-L$found_dir -l$name" or "-L$found_dir $found_so" dnl here. LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so" else dnl We cannot use $acl_hardcode_runpath_var and LD_RUN_PATH dnl here, because this doesn't fit in flags passed to the dnl compiler. So give up. No hardcoding. This affects only dnl very old systems. dnl FIXME: Not sure whether we should use dnl "-L$found_dir -l$name" or "-L$found_dir $found_so" dnl here. LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-l$name" fi fi fi fi else if test "X$found_a" != "X"; then dnl Linking with a static library. LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_a" else dnl We shouldn't come here, but anyway it's good to have a dnl fallback. LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$found_dir -l$name" fi fi dnl Assume the include files are nearby. additional_includedir= case "$found_dir" in */$acl_libdirstem | */$acl_libdirstem/) basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem/"'*$,,'` if test "$name" = '$1'; then LIB[]NAME[]_PREFIX="$basedir" fi additional_includedir="$basedir/include" ;; */$acl_libdirstem2 | */$acl_libdirstem2/) basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem2/"'*$,,'` if test "$name" = '$1'; then LIB[]NAME[]_PREFIX="$basedir" fi additional_includedir="$basedir/include" ;; esac if test "X$additional_includedir" != "X"; then dnl Potentially add $additional_includedir to $INCNAME. dnl But don't add it dnl 1. if it's the standard /usr/include, dnl 2. if it's /usr/local/include and we are using GCC on Linux, dnl 3. if it's already present in $CPPFLAGS or the already dnl constructed $INCNAME, dnl 4. if it doesn't exist as a directory. if test "X$additional_includedir" != "X/usr/include"; then haveit= if test "X$additional_includedir" = "X/usr/local/include"; then if test -n "$GCC"; then case $host_os in linux* | gnu* | k*bsd*-gnu) haveit=yes;; esac fi fi if test -z "$haveit"; then for x in $CPPFLAGS $INC[]NAME; do AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"]) if test "X$x" = "X-I$additional_includedir"; then haveit=yes break fi done if test -z "$haveit"; then if test -d "$additional_includedir"; then dnl Really add $additional_includedir to $INCNAME. INC[]NAME="${INC[]NAME}${INC[]NAME:+ }-I$additional_includedir" fi fi fi fi fi dnl Look for dependencies. if test -n "$found_la"; then dnl Read the .la file. It defines the variables dnl dlname, library_names, old_library, dependency_libs, current, dnl age, revision, installed, dlopen, dlpreopen, libdir. save_libdir="$libdir" case "$found_la" in */* | *\\*) . "$found_la" ;; *) . "./$found_la" ;; esac libdir="$save_libdir" dnl We use only dependency_libs. for dep in $dependency_libs; do case "$dep" in -L*) additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'` dnl Potentially add $additional_libdir to $LIBNAME and $LTLIBNAME. dnl But don't add it dnl 1. if it's the standard /usr/lib, dnl 2. if it's /usr/local/lib and we are using GCC on Linux, dnl 3. if it's already present in $LDFLAGS or the already dnl constructed $LIBNAME, dnl 4. if it doesn't exist as a directory. if test "X$additional_libdir" != "X/usr/$acl_libdirstem" \ && test "X$additional_libdir" != "X/usr/$acl_libdirstem2"; then haveit= if test "X$additional_libdir" = "X/usr/local/$acl_libdirstem" \ || test "X$additional_libdir" = "X/usr/local/$acl_libdirstem2"; then if test -n "$GCC"; then case $host_os in linux* | gnu* | k*bsd*-gnu) haveit=yes;; esac fi fi if test -z "$haveit"; then haveit= for x in $LDFLAGS $LIB[]NAME; do AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"]) if test "X$x" = "X-L$additional_libdir"; then haveit=yes break fi done if test -z "$haveit"; then if test -d "$additional_libdir"; then dnl Really add $additional_libdir to $LIBNAME. LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$additional_libdir" fi fi haveit= for x in $LDFLAGS $LTLIB[]NAME; do AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"]) if test "X$x" = "X-L$additional_libdir"; then haveit=yes break fi done if test -z "$haveit"; then if test -d "$additional_libdir"; then dnl Really add $additional_libdir to $LTLIBNAME. LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-L$additional_libdir" fi fi fi fi ;; -R*) dir=`echo "X$dep" | sed -e 's/^X-R//'` if test "$enable_rpath" != no; then dnl Potentially add DIR to rpathdirs. dnl The rpathdirs will be appended to $LIBNAME at the end. haveit= for x in $rpathdirs; do if test "X$x" = "X$dir"; then haveit=yes break fi done if test -z "$haveit"; then rpathdirs="$rpathdirs $dir" fi dnl Potentially add DIR to ltrpathdirs. dnl The ltrpathdirs will be appended to $LTLIBNAME at the end. haveit= for x in $ltrpathdirs; do if test "X$x" = "X$dir"; then haveit=yes break fi done if test -z "$haveit"; then ltrpathdirs="$ltrpathdirs $dir" fi fi ;; -l*) dnl Handle this in the next round. names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'` ;; *.la) dnl Handle this in the next round. Throw away the .la's dnl directory; it is already contained in a preceding -L dnl option. names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'` ;; *) dnl Most likely an immediate library name. LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$dep" LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }$dep" ;; esac done fi else dnl Didn't find the library; assume it is in the system directories dnl known to the linker and runtime loader. (All the system dnl directories known to the linker should also be known to the dnl runtime loader, otherwise the system is severely misconfigured.) LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-l$name" LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-l$name" fi fi fi done done if test "X$rpathdirs" != "X"; then if test -n "$acl_hardcode_libdir_separator"; then dnl Weird platform: only the last -rpath option counts, the user must dnl pass all path elements in one option. We can arrange that for a dnl single library, but not when more than one $LIBNAMEs are used. alldirs= for found_dir in $rpathdirs; do alldirs="${alldirs}${alldirs:+$acl_hardcode_libdir_separator}$found_dir" done dnl Note: acl_hardcode_libdir_flag_spec uses $libdir and $wl. acl_save_libdir="$libdir" libdir="$alldirs" eval flag=\"$acl_hardcode_libdir_flag_spec\" libdir="$acl_save_libdir" LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$flag" else dnl The -rpath options are cumulative. for found_dir in $rpathdirs; do acl_save_libdir="$libdir" libdir="$found_dir" eval flag=\"$acl_hardcode_libdir_flag_spec\" libdir="$acl_save_libdir" LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$flag" done fi fi if test "X$ltrpathdirs" != "X"; then dnl When using libtool, the option that works for both libraries and dnl executables is -R. The -R options are cumulative. for found_dir in $ltrpathdirs; do LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-R$found_dir" done fi popdef([P_A_C_K]) popdef([PACKLIBS]) popdef([PACKUP]) popdef([PACK]) popdef([NAME]) ]) dnl AC_LIB_APPENDTOVAR(VAR, CONTENTS) appends the elements of CONTENTS to VAR, dnl unless already present in VAR. dnl Works only for CPPFLAGS, not for LIB* variables because that sometimes dnl contains two or three consecutive elements that belong together. AC_DEFUN([AC_LIB_APPENDTOVAR], [ for element in [$2]; do haveit= for x in $[$1]; do AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"]) if test "X$x" = "X$element"; then haveit=yes break fi done if test -z "$haveit"; then [$1]="${[$1]}${[$1]:+ }$element" fi done ]) dnl For those cases where a variable contains several -L and -l options dnl referring to unknown libraries and directories, this macro determines the dnl necessary additional linker options for the runtime path. dnl AC_LIB_LINKFLAGS_FROM_LIBS([LDADDVAR], [LIBSVALUE], [USE-LIBTOOL]) dnl sets LDADDVAR to linker options needed together with LIBSVALUE. dnl If USE-LIBTOOL evaluates to non-empty, linking with libtool is assumed, dnl otherwise linking without libtool is assumed. AC_DEFUN([AC_LIB_LINKFLAGS_FROM_LIBS], [ AC_REQUIRE([AC_LIB_RPATH]) AC_REQUIRE([AC_LIB_PREPARE_MULTILIB]) $1= if test "$enable_rpath" != no; then if test -n "$acl_hardcode_libdir_flag_spec" && test "$acl_hardcode_minus_L" = no; then dnl Use an explicit option to hardcode directories into the resulting dnl binary. rpathdirs= next= for opt in $2; do if test -n "$next"; then dir="$next" dnl No need to hardcode the standard /usr/lib. if test "X$dir" != "X/usr/$acl_libdirstem" \ && test "X$dir" != "X/usr/$acl_libdirstem2"; then rpathdirs="$rpathdirs $dir" fi next= else case $opt in -L) next=yes ;; -L*) dir=`echo "X$opt" | sed -e 's,^X-L,,'` dnl No need to hardcode the standard /usr/lib. if test "X$dir" != "X/usr/$acl_libdirstem" \ && test "X$dir" != "X/usr/$acl_libdirstem2"; then rpathdirs="$rpathdirs $dir" fi next= ;; *) next= ;; esac fi done if test "X$rpathdirs" != "X"; then if test -n ""$3""; then dnl libtool is used for linking. Use -R options. for dir in $rpathdirs; do $1="${$1}${$1:+ }-R$dir" done else dnl The linker is used for linking directly. if test -n "$acl_hardcode_libdir_separator"; then dnl Weird platform: only the last -rpath option counts, the user dnl must pass all path elements in one option. alldirs= for dir in $rpathdirs; do alldirs="${alldirs}${alldirs:+$acl_hardcode_libdir_separator}$dir" done acl_save_libdir="$libdir" libdir="$alldirs" eval flag=\"$acl_hardcode_libdir_flag_spec\" libdir="$acl_save_libdir" $1="$flag" else dnl The -rpath options are cumulative. for dir in $rpathdirs; do acl_save_libdir="$libdir" libdir="$dir" eval flag=\"$acl_hardcode_libdir_flag_spec\" libdir="$acl_save_libdir" $1="${$1}${$1:+ }$flag" done fi fi fi fi fi AC_SUBST([$1]) ]) libprelude-1.0.0/libmissing/m4/getpagesize.m40000664000076400007640000000151311341220435016016 00000000000000# getpagesize.m4 serial 7 dnl Copyright (C) 2002, 2004-2005, 2007, 2009-2010 Free Software Foundation, dnl Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. AC_DEFUN([gl_FUNC_GETPAGESIZE], [ AC_REQUIRE([gl_UNISTD_H_DEFAULTS]) AC_REQUIRE([AC_CANONICAL_HOST]) AC_CHECK_FUNCS([getpagesize]) if test $ac_cv_func_getpagesize = no; then HAVE_GETPAGESIZE=0 AC_CHECK_HEADERS([OS.h]) if test $ac_cv_header_OS_h = yes; then HAVE_OS_H=1 fi AC_CHECK_HEADERS([sys/param.h]) if test $ac_cv_header_sys_param_h = yes; then HAVE_SYS_PARAM_H=1 fi fi case "$host_os" in mingw*) REPLACE_GETPAGESIZE=1 AC_LIBOBJ([getpagesize]) ;; esac ]) libprelude-1.0.0/libmissing/m4/minmax.m40000664000076400007640000000235311341220436015004 00000000000000# minmax.m4 serial 3 dnl Copyright (C) 2005, 2009, 2010 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. AC_PREREQ([2.52]) AC_DEFUN([gl_MINMAX], [ AC_REQUIRE([gl_PREREQ_MINMAX]) ]) # Prerequisites of lib/minmax.h. AC_DEFUN([gl_PREREQ_MINMAX], [ gl_MINMAX_IN_HEADER([limits.h]) gl_MINMAX_IN_HEADER([sys/param.h]) ]) dnl gl_MINMAX_IN_HEADER(HEADER) dnl The parameter has to be a literal header name; it cannot be macro, dnl nor a shell variable. (Because autoheader collects only AC_DEFINE dnl invocations with a literal macro name.) AC_DEFUN([gl_MINMAX_IN_HEADER], [ m4_pushdef([header], AS_TR_SH([$1])) m4_pushdef([HEADER], AS_TR_CPP([$1])) AC_CACHE_CHECK([whether <$1> defines MIN and MAX], [gl_cv_minmax_in_]header, [AC_TRY_COMPILE([#include <$1> int x = MIN (42, 17);], [], [gl_cv_minmax_in_]header[=yes], [gl_cv_minmax_in_]header[=no])]) if test $gl_cv_minmax_in_[]header = yes; then AC_DEFINE([HAVE_MINMAX_IN_]HEADER, 1, [Define to 1 if <$1> defines the MIN and MAX macros.]) fi m4_popdef([HEADER]) m4_popdef([header]) ]) libprelude-1.0.0/libmissing/m4/mmap-anon.m40000664000076400007640000000411211341220436015371 00000000000000# mmap-anon.m4 serial 8 dnl Copyright (C) 2005, 2007, 2009-2010 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. # Detect how mmap can be used to create anonymous (not file-backed) memory # mappings. # - On Linux, AIX, OSF/1, Solaris, Cygwin, Interix, Haiku, both MAP_ANONYMOUS # and MAP_ANON exist and have the same value. # - On HP-UX, only MAP_ANONYMOUS exists. # - On MacOS X, FreeBSD, NetBSD, OpenBSD, only MAP_ANON exists. # - On IRIX, neither exists, and a file descriptor opened to /dev/zero must be # used. AC_DEFUN([gl_FUNC_MMAP_ANON], [ dnl Work around a bug of AC_EGREP_CPP in autoconf-2.57. AC_REQUIRE([AC_PROG_CPP]) AC_REQUIRE([AC_PROG_EGREP]) dnl Persuade glibc to define MAP_ANONYMOUS. AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS]) # Check for mmap(). Don't use AC_FUNC_MMAP, because it checks too much: it # fails on HP-UX 11, because MAP_FIXED mappings do not work. But this is # irrelevant for anonymous mappings. AC_CHECK_FUNC([mmap], [gl_have_mmap=yes], [gl_have_mmap=no]) # Try to allow MAP_ANONYMOUS. gl_have_mmap_anonymous=no if test $gl_have_mmap = yes; then AC_MSG_CHECKING([for MAP_ANONYMOUS]) AC_EGREP_CPP([I cant identify this map.], [ #include #ifdef MAP_ANONYMOUS I cant identify this map. #endif ], [gl_have_mmap_anonymous=yes]) if test $gl_have_mmap_anonymous != yes; then AC_EGREP_CPP([I cant identify this map.], [ #include #ifdef MAP_ANON I cant identify this map. #endif ], [AC_DEFINE([MAP_ANONYMOUS], [MAP_ANON], [Define to a substitute value for mmap()'s MAP_ANONYMOUS flag.]) gl_have_mmap_anonymous=yes]) fi AC_MSG_RESULT([$gl_have_mmap_anonymous]) if test $gl_have_mmap_anonymous = yes; then AC_DEFINE([HAVE_MAP_ANONYMOUS], [1], [Define to 1 if mmap()'s MAP_ANONYMOUS flag is available after including config.h and .]) fi fi ]) libprelude-1.0.0/libmissing/m4/locale-fr.m40000664000076400007640000001642611341220436015365 00000000000000# locale-fr.m4 serial 11 dnl Copyright (C) 2003, 2005-2010 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. dnl From Bruno Haible. dnl Determine the name of a french locale with traditional encoding. AC_DEFUN([gt_LOCALE_FR], [ AC_REQUIRE([AC_CANONICAL_HOST]) AC_REQUIRE([AM_LANGINFO_CODESET]) AC_CACHE_CHECK([for a traditional french locale], [gt_cv_locale_fr], [ AC_LANG_CONFTEST([AC_LANG_SOURCE([ changequote(,)dnl #include #include #if HAVE_LANGINFO_CODESET # include #endif #include #include struct tm t; char buf[16]; int main () { /* Check whether the given locale name is recognized by the system. */ if (setlocale (LC_ALL, "") == NULL) return 1; /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646". On MacOS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET) is empty, and the behaviour of Tcl 8.4 in this locale is not useful. On OpenBSD 4.0, when an unsupported locale is specified, setlocale() succeeds but then nl_langinfo(CODESET) is "646". In this situation, some unit tests fail. */ #if HAVE_LANGINFO_CODESET { const char *cs = nl_langinfo (CODESET); if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0) return 1; } #endif #ifdef __CYGWIN__ /* On Cygwin, avoid locale names without encoding suffix, because the locale_charset() function relies on the encoding suffix. Note that LC_ALL is set on the command line. */ if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1; #endif /* Check whether in the abbreviation of the second month, the second character (should be U+00E9: LATIN SMALL LETTER E WITH ACUTE) is only one byte long. This excludes the UTF-8 encoding. */ t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4; if (strftime (buf, sizeof (buf), "%b", &t) < 3 || buf[2] != 'v') return 1; /* Check whether the decimal separator is a comma. On NetBSD 3.0 in the fr_FR.ISO8859-1 locale, localeconv()->decimal_point are nl_langinfo(RADIXCHAR) are both ".". */ if (localeconv () ->decimal_point[0] != ',') return 1; return 0; } changequote([,])dnl ])]) if AC_TRY_EVAL([ac_link]) && test -s conftest$ac_exeext; then # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because # otherwise on MacOS X 10.3.5 the LC_TIME=C from the beginning of the # configure script would override the LC_ALL setting. Likewise for # LC_CTYPE, which is also set at the beginning of the configure script. # Test for the usual locale name. if (LC_ALL=fr_FR LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then gt_cv_locale_fr=fr_FR else # Test for the locale name with explicit encoding suffix. if (LC_ALL=fr_FR.ISO-8859-1 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then gt_cv_locale_fr=fr_FR.ISO-8859-1 else # Test for the AIX, OSF/1, FreeBSD, NetBSD, OpenBSD locale name. if (LC_ALL=fr_FR.ISO8859-1 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then gt_cv_locale_fr=fr_FR.ISO8859-1 else # Test for the HP-UX locale name. if (LC_ALL=fr_FR.iso88591 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then gt_cv_locale_fr=fr_FR.iso88591 else # Test for the Solaris 7 locale name. if (LC_ALL=fr LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then gt_cv_locale_fr=fr else # None found. gt_cv_locale_fr=none fi fi fi fi fi fi rm -fr conftest* ]) LOCALE_FR=$gt_cv_locale_fr AC_SUBST([LOCALE_FR]) ]) dnl Determine the name of a french locale with UTF-8 encoding. AC_DEFUN([gt_LOCALE_FR_UTF8], [ AC_REQUIRE([AM_LANGINFO_CODESET]) AC_CACHE_CHECK([for a french Unicode locale], [gt_cv_locale_fr_utf8], [ AC_LANG_CONFTEST([AC_LANG_SOURCE([ changequote(,)dnl #include #include #if HAVE_LANGINFO_CODESET # include #endif #include #include struct tm t; char buf[16]; int main () { /* On BeOS and Haiku, locales are not implemented in libc. Rather, libintl imitates locale dependent behaviour by looking at the environment variables, and all locales use the UTF-8 encoding. */ #if !(defined __BEOS__ || defined __HAIKU__) /* Check whether the given locale name is recognized by the system. */ if (setlocale (LC_ALL, "") == NULL) return 1; /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646". On MacOS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET) is empty, and the behaviour of Tcl 8.4 in this locale is not useful. On OpenBSD 4.0, when an unsupported locale is specified, setlocale() succeeds but then nl_langinfo(CODESET) is "646". In this situation, some unit tests fail. */ # if HAVE_LANGINFO_CODESET { const char *cs = nl_langinfo (CODESET); if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0) return 1; } # endif # ifdef __CYGWIN__ /* On Cygwin, avoid locale names without encoding suffix, because the locale_charset() function relies on the encoding suffix. Note that LC_ALL is set on the command line. */ if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1; # endif /* Check whether in the abbreviation of the second month, the second character (should be U+00E9: LATIN SMALL LETTER E WITH ACUTE) is two bytes long, with UTF-8 encoding. */ t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4; if (strftime (buf, sizeof (buf), "%b", &t) < 4 || buf[1] != (char) 0xc3 || buf[2] != (char) 0xa9 || buf[3] != 'v') return 1; #endif /* Check whether the decimal separator is a comma. On NetBSD 3.0 in the fr_FR.ISO8859-1 locale, localeconv()->decimal_point are nl_langinfo(RADIXCHAR) are both ".". */ if (localeconv () ->decimal_point[0] != ',') return 1; return 0; } changequote([,])dnl ])]) if AC_TRY_EVAL([ac_link]) && test -s conftest$ac_exeext; then # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because # otherwise on MacOS X 10.3.5 the LC_TIME=C from the beginning of the # configure script would override the LC_ALL setting. Likewise for # LC_CTYPE, which is also set at the beginning of the configure script. # Test for the usual locale name. if (LC_ALL=fr_FR LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then gt_cv_locale_fr_utf8=fr_FR else # Test for the locale name with explicit encoding suffix. if (LC_ALL=fr_FR.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then gt_cv_locale_fr_utf8=fr_FR.UTF-8 else # Test for the Solaris 7 locale name. if (LC_ALL=fr.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then gt_cv_locale_fr_utf8=fr.UTF-8 else # None found. gt_cv_locale_fr_utf8=none fi fi fi fi rm -fr conftest* ]) LOCALE_FR_UTF8=$gt_cv_locale_fr_utf8 AC_SUBST([LOCALE_FR_UTF8]) ]) libprelude-1.0.0/libmissing/m4/locale-tr.m40000664000076400007640000000742411341220436015401 00000000000000# locale-tr.m4 serial 6 dnl Copyright (C) 2003, 2005-2010 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. dnl From Bruno Haible. dnl Determine the name of a turkish locale with UTF-8 encoding. AC_DEFUN([gt_LOCALE_TR_UTF8], [ AC_REQUIRE([AM_LANGINFO_CODESET]) AC_CACHE_CHECK([for a turkish Unicode locale], [gt_cv_locale_tr_utf8], [ AC_LANG_CONFTEST([AC_LANG_SOURCE([ changequote(,)dnl #include #include #if HAVE_LANGINFO_CODESET # include #endif #include #include struct tm t; char buf[16]; int main () { /* On BeOS, locales are not implemented in libc. Rather, libintl imitates locale dependent behaviour by looking at the environment variables, and all locales use the UTF-8 encoding. But BeOS does not implement the Turkish upper-/lowercase mappings. Therefore, let this program return 1 on BeOS. */ /* Check whether the given locale name is recognized by the system. */ if (setlocale (LC_ALL, "") == NULL) return 1; /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646". On MacOS X 10.3.5 (Darwin 7.5) in the tr_TR locale, nl_langinfo(CODESET) is empty, and the behaviour of Tcl 8.4 in this locale is not useful. On OpenBSD 4.0, when an unsupported locale is specified, setlocale() succeeds but then nl_langinfo(CODESET) is "646". In this situation, some unit tests fail. */ #if HAVE_LANGINFO_CODESET { const char *cs = nl_langinfo (CODESET); if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0) return 1; } #endif #ifdef __CYGWIN__ /* On Cygwin, avoid locale names without encoding suffix, because the locale_charset() function relies on the encoding suffix. Note that LC_ALL is set on the command line. */ if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1; #endif /* Check whether in the abbreviation of the eighth month, the second character (should be U+011F: LATIN SMALL LETTER G WITH BREVE) is two bytes long, with UTF-8 encoding. */ t.tm_year = 1992 - 1900; t.tm_mon = 8 - 1; t.tm_mday = 19; if (strftime (buf, sizeof (buf), "%b", &t) < 4 || buf[1] != (char) 0xc4 || buf[2] != (char) 0x9f) return 1; /* Check whether the upper-/lowercase mappings are as expected for Turkish. */ if (towupper ('i') != 0x0130 || towlower (0x0130) != 'i' || towupper(0x0131) != 'I' || towlower ('I') != 0x0131) return 1; return 0; } changequote([,])dnl ])]) if AC_TRY_EVAL([ac_link]) && test -s conftest$ac_exeext; then # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because # otherwise on MacOS X 10.3.5 the LC_TIME=C from the beginning of the # configure script would override the LC_ALL setting. Likewise for # LC_CTYPE, which is also set at the beginning of the configure script. # Test for the usual locale name. if (LC_ALL=tr_TR LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then gt_cv_locale_tr_utf8=tr_TR else # Test for the locale name with explicit encoding suffix. if (LC_ALL=tr_TR.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then gt_cv_locale_tr_utf8=tr_TR.UTF-8 else # Test for the Solaris 7 locale name. if (LC_ALL=tr.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then gt_cv_locale_tr_utf8=tr.UTF-8 else # None found. gt_cv_locale_tr_utf8=none fi fi fi else gt_cv_locale_tr_utf8=none fi rm -fr conftest* ]) LOCALE_TR_UTF8=$gt_cv_locale_tr_utf8 AC_SUBST([LOCALE_TR_UTF8]) ]) libprelude-1.0.0/libmissing/m4/codeset.m40000664000076400007640000000141311341220435015134 00000000000000# codeset.m4 serial 4 (gettext-0.18) dnl Copyright (C) 2000-2002, 2006, 2008-2010 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. dnl From Bruno Haible. AC_DEFUN([AM_LANGINFO_CODESET], [ AC_CACHE_CHECK([for nl_langinfo and CODESET], [am_cv_langinfo_codeset], [AC_TRY_LINK([#include ], [char* cs = nl_langinfo(CODESET); return !cs;], [am_cv_langinfo_codeset=yes], [am_cv_langinfo_codeset=no]) ]) if test $am_cv_langinfo_codeset = yes; then AC_DEFINE([HAVE_LANGINFO_CODESET], [1], [Define if you have and nl_langinfo(CODESET).]) fi ]) libprelude-1.0.0/libmissing/m4/vasnprintf.m40000664000076400007640000001763311341220437015715 00000000000000# vasnprintf.m4 serial 29 dnl Copyright (C) 2002-2004, 2006-2010 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. AC_DEFUN([gl_FUNC_VASNPRINTF], [ AC_CHECK_FUNCS_ONCE([vasnprintf]) if test $ac_cv_func_vasnprintf = no; then gl_REPLACE_VASNPRINTF fi ]) AC_DEFUN([gl_REPLACE_VASNPRINTF], [ AC_CHECK_FUNCS_ONCE([vasnprintf]) AC_LIBOBJ([vasnprintf]) AC_LIBOBJ([printf-args]) AC_LIBOBJ([printf-parse]) AC_LIBOBJ([asnprintf]) if test $ac_cv_func_vasnprintf = yes; then AC_DEFINE([REPLACE_VASNPRINTF], [1], [Define if vasnprintf exists but is overridden by gnulib.]) fi gl_PREREQ_PRINTF_ARGS gl_PREREQ_PRINTF_PARSE gl_PREREQ_VASNPRINTF gl_PREREQ_ASNPRINTF ]) # Prequisites of lib/printf-args.h, lib/printf-args.c. AC_DEFUN([gl_PREREQ_PRINTF_ARGS], [ AC_REQUIRE([AC_TYPE_LONG_LONG_INT]) AC_REQUIRE([gt_TYPE_WCHAR_T]) AC_REQUIRE([gt_TYPE_WINT_T]) ]) # Prequisites of lib/printf-parse.h, lib/printf-parse.c. AC_DEFUN([gl_PREREQ_PRINTF_PARSE], [ AC_REQUIRE([AC_TYPE_LONG_LONG_INT]) AC_REQUIRE([gt_TYPE_WCHAR_T]) AC_REQUIRE([gt_TYPE_WINT_T]) AC_REQUIRE([AC_TYPE_SIZE_T]) AC_CHECK_TYPE([ptrdiff_t], , [AC_DEFINE([ptrdiff_t], [long], [Define as the type of the result of subtracting two pointers, if the system doesn't define it.]) ]) AC_REQUIRE([gt_AC_TYPE_INTMAX_T]) ]) # Prerequisites of lib/vasnprintf.c. AC_DEFUN_ONCE([gl_PREREQ_VASNPRINTF], [ AC_REQUIRE([AC_FUNC_ALLOCA]) AC_REQUIRE([AC_TYPE_LONG_LONG_INT]) AC_REQUIRE([gt_TYPE_WCHAR_T]) AC_REQUIRE([gt_TYPE_WINT_T]) AC_CHECK_FUNCS([snprintf strnlen wcslen wcsnlen mbrtowc wcrtomb]) dnl Use the _snprintf function only if it is declared (because on NetBSD it dnl is defined as a weak alias of snprintf; we prefer to use the latter). AC_CHECK_DECLS([_snprintf], , , [#include ]) ]) # Extra prerequisites of lib/vasnprintf.c for supporting 'long double' # arguments. AC_DEFUN_ONCE([gl_PREREQ_VASNPRINTF_LONG_DOUBLE], [ AC_REQUIRE([gl_PRINTF_LONG_DOUBLE]) case "$gl_cv_func_printf_long_double" in *yes) ;; *) AC_DEFINE([NEED_PRINTF_LONG_DOUBLE], [1], [Define if the vasnprintf implementation needs special code for 'long double' arguments.]) ;; esac ]) # Extra prerequisites of lib/vasnprintf.c for supporting infinite 'double' # arguments. AC_DEFUN([gl_PREREQ_VASNPRINTF_INFINITE_DOUBLE], [ AC_REQUIRE([gl_PRINTF_INFINITE]) case "$gl_cv_func_printf_infinite" in *yes) ;; *) AC_DEFINE([NEED_PRINTF_INFINITE_DOUBLE], [1], [Define if the vasnprintf implementation needs special code for infinite 'double' arguments.]) ;; esac ]) # Extra prerequisites of lib/vasnprintf.c for supporting infinite 'long double' # arguments. AC_DEFUN([gl_PREREQ_VASNPRINTF_INFINITE_LONG_DOUBLE], [ AC_REQUIRE([gl_PRINTF_INFINITE_LONG_DOUBLE]) dnl There is no need to set NEED_PRINTF_INFINITE_LONG_DOUBLE if dnl NEED_PRINTF_LONG_DOUBLE is already set. AC_REQUIRE([gl_PREREQ_VASNPRINTF_LONG_DOUBLE]) case "$gl_cv_func_printf_long_double" in *yes) case "$gl_cv_func_printf_infinite_long_double" in *yes) ;; *) AC_DEFINE([NEED_PRINTF_INFINITE_LONG_DOUBLE], [1], [Define if the vasnprintf implementation needs special code for infinite 'long double' arguments.]) ;; esac ;; esac ]) # Extra prerequisites of lib/vasnprintf.c for supporting the 'a' directive. AC_DEFUN([gl_PREREQ_VASNPRINTF_DIRECTIVE_A], [ AC_REQUIRE([gl_PRINTF_DIRECTIVE_A]) case "$gl_cv_func_printf_directive_a" in *yes) ;; *) AC_DEFINE([NEED_PRINTF_DIRECTIVE_A], [1], [Define if the vasnprintf implementation needs special code for the 'a' and 'A' directives.]) AC_CHECK_FUNCS([nl_langinfo]) ;; esac ]) # Extra prerequisites of lib/vasnprintf.c for supporting the 'F' directive. AC_DEFUN([gl_PREREQ_VASNPRINTF_DIRECTIVE_F], [ AC_REQUIRE([gl_PRINTF_DIRECTIVE_F]) case "$gl_cv_func_printf_directive_f" in *yes) ;; *) AC_DEFINE([NEED_PRINTF_DIRECTIVE_F], [1], [Define if the vasnprintf implementation needs special code for the 'F' directive.]) ;; esac ]) # Extra prerequisites of lib/vasnprintf.c for supporting the 'ls' directive. AC_DEFUN([gl_PREREQ_VASNPRINTF_DIRECTIVE_LS], [ AC_REQUIRE([gl_PRINTF_DIRECTIVE_LS]) case "$gl_cv_func_printf_directive_ls" in *yes) ;; *) AC_DEFINE([NEED_PRINTF_DIRECTIVE_LS], [1], [Define if the vasnprintf implementation needs special code for the 'ls' directive.]) ;; esac ]) # Extra prerequisites of lib/vasnprintf.c for supporting the ' flag. AC_DEFUN([gl_PREREQ_VASNPRINTF_FLAG_GROUPING], [ AC_REQUIRE([gl_PRINTF_FLAG_GROUPING]) case "$gl_cv_func_printf_flag_grouping" in *yes) ;; *) AC_DEFINE([NEED_PRINTF_FLAG_GROUPING], [1], [Define if the vasnprintf implementation needs special code for the ' flag.]) ;; esac ]) # Extra prerequisites of lib/vasnprintf.c for supporting the '-' flag. AC_DEFUN([gl_PREREQ_VASNPRINTF_FLAG_LEFTADJUST], [ AC_REQUIRE([gl_PRINTF_FLAG_LEFTADJUST]) case "$gl_cv_func_printf_flag_leftadjust" in *yes) ;; *) AC_DEFINE([NEED_PRINTF_FLAG_LEFTADJUST], [1], [Define if the vasnprintf implementation needs special code for the '-' flag.]) ;; esac ]) # Extra prerequisites of lib/vasnprintf.c for supporting the 0 flag. AC_DEFUN([gl_PREREQ_VASNPRINTF_FLAG_ZERO], [ AC_REQUIRE([gl_PRINTF_FLAG_ZERO]) case "$gl_cv_func_printf_flag_zero" in *yes) ;; *) AC_DEFINE([NEED_PRINTF_FLAG_ZERO], [1], [Define if the vasnprintf implementation needs special code for the 0 flag.]) ;; esac ]) # Extra prerequisites of lib/vasnprintf.c for supporting large precisions. AC_DEFUN([gl_PREREQ_VASNPRINTF_PRECISION], [ AC_REQUIRE([gl_PRINTF_PRECISION]) case "$gl_cv_func_printf_precision" in *yes) ;; *) AC_DEFINE([NEED_PRINTF_UNBOUNDED_PRECISION], [1], [Define if the vasnprintf implementation needs special code for supporting large precisions without arbitrary bounds.]) AC_DEFINE([NEED_PRINTF_DOUBLE], [1], [Define if the vasnprintf implementation needs special code for 'double' arguments.]) AC_DEFINE([NEED_PRINTF_LONG_DOUBLE], [1], [Define if the vasnprintf implementation needs special code for 'long double' arguments.]) ;; esac ]) # Extra prerequisites of lib/vasnprintf.c for surviving out-of-memory # conditions. AC_DEFUN([gl_PREREQ_VASNPRINTF_ENOMEM], [ AC_REQUIRE([gl_PRINTF_ENOMEM]) case "$gl_cv_func_printf_enomem" in *yes) ;; *) AC_DEFINE([NEED_PRINTF_ENOMEM], [1], [Define if the vasnprintf implementation needs special code for surviving out-of-memory conditions.]) AC_DEFINE([NEED_PRINTF_DOUBLE], [1], [Define if the vasnprintf implementation needs special code for 'double' arguments.]) AC_DEFINE([NEED_PRINTF_LONG_DOUBLE], [1], [Define if the vasnprintf implementation needs special code for 'long double' arguments.]) ;; esac ]) # Prerequisites of lib/vasnprintf.c including all extras for POSIX compliance. AC_DEFUN([gl_PREREQ_VASNPRINTF_WITH_EXTRAS], [ AC_REQUIRE([gl_PREREQ_VASNPRINTF]) gl_PREREQ_VASNPRINTF_LONG_DOUBLE gl_PREREQ_VASNPRINTF_INFINITE_DOUBLE gl_PREREQ_VASNPRINTF_INFINITE_LONG_DOUBLE gl_PREREQ_VASNPRINTF_DIRECTIVE_A gl_PREREQ_VASNPRINTF_DIRECTIVE_F gl_PREREQ_VASNPRINTF_DIRECTIVE_LS gl_PREREQ_VASNPRINTF_FLAG_GROUPING gl_PREREQ_VASNPRINTF_FLAG_LEFTADJUST gl_PREREQ_VASNPRINTF_FLAG_ZERO gl_PREREQ_VASNPRINTF_PRECISION gl_PREREQ_VASNPRINTF_ENOMEM ]) # Prerequisites of lib/asnprintf.c. AC_DEFUN([gl_PREREQ_ASNPRINTF], [ ]) libprelude-1.0.0/libmissing/m4/multiarch.m40000664000076400007640000000423611341220436015505 00000000000000# multiarch.m4 serial 5 dnl Copyright (C) 2008, 2009, 2010 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. # Determine whether the compiler is or may be producing universal binaries. # # On MacOS X 10.5 and later systems, the user can create libraries and # executables that work on multiple system types--known as "fat" or # "universal" binaries--by specifying multiple '-arch' options to the # compiler but only a single '-arch' option to the preprocessor. Like # this: # # ./configure CC="gcc -arch i386 -arch x86_64 -arch ppc -arch ppc64" \ # CXX="g++ -arch i386 -arch x86_64 -arch ppc -arch ppc64" \ # CPP="gcc -E" CXXCPP="g++ -E" # # Detect this situation and set the macro AA_APPLE_UNIVERSAL_BUILD at the # beginning of config.h and set APPLE_UNIVERSAL_BUILD accordingly. AC_DEFUN_ONCE([gl_MULTIARCH], [ dnl Code similar to autoconf-2.63 AC_C_BIGENDIAN. gl_cv_c_multiarch=no AC_COMPILE_IFELSE( [AC_LANG_SOURCE( [[#ifndef __APPLE_CC__ not a universal capable compiler #endif typedef int dummy; ]])], [ dnl Check for potential -arch flags. It is not universal unless dnl there are at least two -arch flags with different values. arch= prev= for word in ${CC} ${CFLAGS} ${CPPFLAGS} ${LDFLAGS}; do if test -n "$prev"; then case $word in i?86 | x86_64 | ppc | ppc64) if test -z "$arch" || test "$arch" = "$word"; then arch="$word" else gl_cv_c_multiarch=yes fi ;; esac prev= else if test "x$word" = "x-arch"; then prev=arch fi fi done ]) if test $gl_cv_c_multiarch = yes; then AC_DEFINE([AA_APPLE_UNIVERSAL_BUILD], [1], [Define if the compiler is building for multiple architectures of Apple platforms at once.]) APPLE_UNIVERSAL_BUILD=1 else APPLE_UNIVERSAL_BUILD=0 fi AC_SUBST([APPLE_UNIVERSAL_BUILD]) ]) libprelude-1.0.0/libmissing/m4/timegm.m40000664000076400007640000000242511341220437014776 00000000000000# timegm.m4 serial 6 dnl Copyright (C) 2003, 2007, 2009, 2010 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. AC_DEFUN([gl_FUNC_TIMEGM], [ AC_REQUIRE([gl_HEADER_TIME_H_DEFAULTS]) AC_REQUIRE([gl_FUNC_MKTIME]) if test $ac_cv_func_working_mktime = no; then # Assume that timegm is buggy if mktime is. AC_LIBOBJ([timegm]) ac_cv_func_timegm=no else AC_REPLACE_FUNCS([timegm]) fi REPLACE_TIMEGM=1 if test $ac_cv_func_timegm = yes; then AC_CHECK_DECLS([timegm], [REPLACE_TIMEGM=0], [], [#include ]) fi if test $REPLACE_TIMEGM = 1; then gl_PREREQ_TIMEGM fi ]) # Prerequisites of lib/timegm.c. AC_DEFUN([gl_PREREQ_TIMEGM], [ AC_REQUIRE([gl_TIME_R]) AC_REQUIRE([gl_FUNC_MKTIME]) if test $ac_cv_func_working_mktime = yes; then AC_CHECK_FUNC([__mktime_internal], , [# mktime works but it doesn't export __mktime_internal, # so we need to substitute our own mktime implementation. AC_LIBOBJ([mktime]) AC_DEFINE([mktime], [rpl_mktime], [Define to rpl_mktime if the replacement function should be used.]) gl_PREREQ_MKTIME]) fi ]) libprelude-1.0.0/libmissing/m4/printf-frexp.m40000664000076400007640000000270511341220436016140 00000000000000# printf-frexp.m4 serial 3 dnl Copyright (C) 2007, 2009, 2010 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. dnl Check how to define printf_frexp() without linking with libm. AC_DEFUN([gl_FUNC_PRINTF_FREXP], [ AC_CACHE_CHECK([whether frexp can be used without linking with libm], [gl_cv_func_frexp_no_libm], [ AC_TRY_LINK([#include double x; int y;], [return frexp (x, &y) < 1;], [gl_cv_func_frexp_no_libm=yes], [gl_cv_func_frexp_no_libm=no]) ]) if test $gl_cv_func_frexp_no_libm = yes; then gl_FUNC_FREXP_WORKS case "$gl_cv_func_frexp_works" in *yes) AC_DEFINE([HAVE_FREXP_IN_LIBC], [1], [Define if the frexp function is available in libc.]) ;; esac fi AC_CACHE_CHECK([whether ldexp can be used without linking with libm], [gl_cv_func_ldexp_no_libm], [ AC_TRY_LINK([#include double x; int y;], [return ldexp (x, y) < 1;], [gl_cv_func_ldexp_no_libm=yes], [gl_cv_func_ldexp_no_libm=no]) ]) if test $gl_cv_func_ldexp_no_libm = yes; then AC_DEFINE([HAVE_LDEXP_IN_LIBC], [1], [Define if the ldexp function is available in libc.]) fi ]) libprelude-1.0.0/libmissing/m4/stat.m40000664000076400007640000000452611341220436014472 00000000000000# serial 4 # Copyright (C) 2009, 2010 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. AC_DEFUN([gl_FUNC_STAT], [ AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles AC_REQUIRE([gl_AC_DOS]) AC_REQUIRE([gl_SYS_STAT_H_DEFAULTS]) AC_CHECK_FUNCS_ONCE([lstat]) dnl mingw is the only known platform where stat(".") and stat("./") differ AC_CACHE_CHECK([whether stat handles trailing slashes on directories], [gl_cv_func_stat_dir_slash], [AC_RUN_IFELSE( [AC_LANG_PROGRAM( [[#include ]], [[struct stat st; return stat (".", &st) != stat ("./", &st);]])], [gl_cv_func_stat_dir_slash=yes], [gl_cv_func_stat_dir_slash=no], [case $host_os in mingw*) gl_cv_func_stat_dir_slash="guessing no";; *) gl_cv_func_stat_dir_slash="guessing yes";; esac])]) dnl Solaris 9 mistakenly succeeds on stat("file/") dnl FreeBSD 7.2 mistakenly succeeds on stat("link-to-file/") AC_CACHE_CHECK([whether stat handles trailing slashes on files], [gl_cv_func_stat_file_slash], [touch conftest.tmp # Assume that if we have lstat, we can also check symlinks. if test $ac_cv_func_lstat = yes; then ln -s conftest.tmp conftest.lnk fi AC_RUN_IFELSE( [AC_LANG_PROGRAM( [[#include ]], [[struct stat st; if (!stat ("conftest.tmp/", &st)) return 1; #if HAVE_LSTAT if (!stat ("conftest.lnk/", &st)) return 2; #endif ]])], [gl_cv_func_stat_file_slash=yes], [gl_cv_func_stat_file_slash=no], [gl_cv_func_stat_file_slash="guessing no"]) rm -f conftest.tmp conftest.lnk]) case $gl_cv_func_stat_dir_slash in *no) REPLACE_STAT=1 AC_DEFINE([REPLACE_FUNC_STAT_DIR], [1], [Define to 1 if stat needs help when passed a directory name with a trailing slash]);; esac case $gl_cv_func_stat_file_slash in *no) REPLACE_STAT=1 AC_DEFINE([REPLACE_FUNC_STAT_FILE], [1], [Define to 1 if stat needs help when passed a file name with a trailing slash]);; esac if test $REPLACE_STAT = 1; then AC_LIBOBJ([stat]) dnl Prerequisites of lib/stat.c. AC_REQUIRE([AC_C_INLINE]) fi ]) libprelude-1.0.0/libmissing/m4/strcase.m40000664000076400007640000000201311341220436015150 00000000000000# strcase.m4 serial 10 dnl Copyright (C) 2002, 2005-2010 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. AC_DEFUN([gl_STRCASE], [ gl_FUNC_STRCASECMP gl_FUNC_STRNCASECMP ]) AC_DEFUN([gl_FUNC_STRCASECMP], [ AC_REQUIRE([gl_HEADER_STRINGS_H_DEFAULTS]) AC_REPLACE_FUNCS([strcasecmp]) if test $ac_cv_func_strcasecmp = no; then HAVE_STRCASECMP=0 gl_PREREQ_STRCASECMP fi ]) AC_DEFUN([gl_FUNC_STRNCASECMP], [ AC_REQUIRE([gl_HEADER_STRINGS_H_DEFAULTS]) AC_REPLACE_FUNCS([strncasecmp]) if test $ac_cv_func_strncasecmp = no; then gl_PREREQ_STRNCASECMP fi AC_CHECK_DECLS([strncasecmp]) if test $ac_cv_have_decl_strncasecmp = no; then HAVE_DECL_STRNCASECMP=0 fi ]) # Prerequisites of lib/strcasecmp.c. AC_DEFUN([gl_PREREQ_STRCASECMP], [ : ]) # Prerequisites of lib/strncasecmp.c. AC_DEFUN([gl_PREREQ_STRNCASECMP], [ : ]) libprelude-1.0.0/libmissing/m4/dos.m40000664000076400007640000000475311341220435014305 00000000000000#serial 11 -*- autoconf -*- # Define some macros required for proper operation of code in lib/*.c # on MSDOS/Windows systems. # Copyright (C) 2000-2001, 2004-2006, 2009-2010 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. # From Jim Meyering. AC_DEFUN([gl_AC_DOS], [ AC_CACHE_CHECK([whether system is Windows or MSDOS], [ac_cv_win_or_dos], [ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([], [[ #if !defined _WIN32 && !defined __WIN32__ && !defined __MSDOS__ && !defined __CYGWIN__ neither MSDOS nor Windows #endif]])], [ac_cv_win_or_dos=yes], [ac_cv_win_or_dos=no]) ]) if test x"$ac_cv_win_or_dos" = xyes; then ac_fs_accepts_drive_letter_prefix=1 ac_fs_backslash_is_file_name_separator=1 AC_CACHE_CHECK([whether drive letter can start relative path], [ac_cv_drive_letter_can_be_relative], [ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([], [[ #if defined __CYGWIN__ drive letters are always absolute #endif]])], [ac_cv_drive_letter_can_be_relative=yes], [ac_cv_drive_letter_can_be_relative=no]) ]) if test x"$ac_cv_drive_letter_can_be_relative" = xyes; then ac_fs_drive_letter_can_be_relative=1 else ac_fs_drive_letter_can_be_relative=0 fi else ac_fs_accepts_drive_letter_prefix=0 ac_fs_backslash_is_file_name_separator=0 ac_fs_drive_letter_can_be_relative=0 fi AC_DEFINE_UNQUOTED([FILE_SYSTEM_ACCEPTS_DRIVE_LETTER_PREFIX], $ac_fs_accepts_drive_letter_prefix, [Define on systems for which file names may have a so-called `drive letter' prefix, define this to compute the length of that prefix, including the colon.]) AH_VERBATIM(ISSLASH, [#if FILE_SYSTEM_BACKSLASH_IS_FILE_NAME_SEPARATOR # define ISSLASH(C) ((C) == '/' || (C) == '\\') #else # define ISSLASH(C) ((C) == '/') #endif]) AC_DEFINE_UNQUOTED([FILE_SYSTEM_BACKSLASH_IS_FILE_NAME_SEPARATOR], $ac_fs_backslash_is_file_name_separator, [Define if the backslash character may also serve as a file name component separator.]) AC_DEFINE_UNQUOTED([FILE_SYSTEM_DRIVE_PREFIX_CAN_BE_RELATIVE], $ac_fs_drive_letter_can_be_relative, [Define if a drive letter prefix denotes a relative path if it is not followed by a file name component separator.]) ]) libprelude-1.0.0/libmissing/m4/sleep.m40000664000076400007640000000335111341220436014622 00000000000000# sleep.m4 serial 3 dnl Copyright (C) 2007-2010 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. AC_DEFUN([gl_FUNC_SLEEP], [ AC_REQUIRE([gl_UNISTD_H_DEFAULTS]) dnl We expect to see the declaration of sleep() in a header file. dnl Older versions of mingw have a sleep() function that is an alias to dnl _sleep() in MSVCRT. It has a different signature than POSIX sleep(): dnl it takes the number of milliseconds as argument and returns void. dnl mingw does not declare this function. AC_CHECK_DECLS([sleep], , , [#include ]) AC_CHECK_FUNCS_ONCE([sleep]) if test $ac_cv_have_decl_sleep != yes; then HAVE_SLEEP=0 AC_LIBOBJ([sleep]) else dnl Cygwin 1.5.x has a bug where sleep can't exceed 49.7 days. AC_CACHE_CHECK([for working sleep], [gl_cv_func_sleep_works], [AC_RUN_IFELSE([AC_LANG_PROGRAM([[ #include #include #include static void handle_alarm (int sig) { if (sig != SIGALRM) _exit (2); } ]], [[ /* Failure to compile this test due to missing alarm is okay, since all such platforms (mingw) also lack sleep. */ unsigned int pentecost = 50 * 24 * 60 * 60; /* 50 days. */ unsigned int remaining; signal (SIGALRM, handle_alarm); alarm (1); remaining = sleep (pentecost); return !(pentecost - 10 < remaining && remaining <= pentecost);]])], [gl_cv_func_sleep_works=yes], [gl_cv_func_sleep_works=no], [gl_cv_func_sleep_works="guessing no"])]) if test "$gl_cv_func_sleep_works" != yes; then REPLACE_SLEEP=1 AC_LIBOBJ([sleep]) fi fi ]) libprelude-1.0.0/libmissing/m4/strndup.m40000664000076400007640000000307011341220436015207 00000000000000# strndup.m4 serial 17 dnl Copyright (C) 2002-2003, 2005-2010 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. AC_DEFUN([gl_FUNC_STRNDUP], [ dnl Persuade glibc to declare strndup(). AC_REQUIRE([AC_USE_SYSTEM_EXTENSIONS]) AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles AC_REQUIRE([gl_HEADER_STRING_H_DEFAULTS]) AC_CHECK_DECLS_ONCE([strndup]) AC_CHECK_FUNCS_ONCE([strndup]) if test $ac_cv_have_decl_strndup = no; then HAVE_DECL_STRNDUP=0 fi if test $ac_cv_func_strndup = yes; then # AIX 4.3.3, AIX 5.1 have a function that fails to add the terminating '\0'. AC_CACHE_CHECK([for working strndup], [gl_cv_func_strndup_works], [AC_RUN_IFELSE([ AC_LANG_PROGRAM([[#include #include ]], [[ #ifndef HAVE_DECL_STRNDUP extern char *strndup (const char *, size_t); #endif char *s; s = strndup ("some longer string", 15); free (s); s = strndup ("shorter string", 13); return s[13] != '\0';]])], [gl_cv_func_strndup_works=yes], [gl_cv_func_strndup_works=no], [case $host_os in aix*) gl_cv_func_strndup_works="guessing no";; *) gl_cv_func_strndup_works="guessing yes";; esac])]) case $gl_cv_func_strndup_works in *no) REPLACE_STRNDUP=1 AC_LIBOBJ([strndup]) ;; esac else AC_LIBOBJ([strndup]) fi ]) libprelude-1.0.0/libmissing/m4/exponentf.m40000664000076400007640000000540311341220435015517 00000000000000# exponentf.m4 serial 1 dnl Copyright (C) 2007-2010 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. AC_DEFUN([gl_FLOAT_EXPONENT_LOCATION], [ AC_CACHE_CHECK([where to find the exponent in a 'float'], [gl_cv_cc_float_expbit0], [ AC_TRY_RUN([ #include #include #include #include #define NWORDS \ ((sizeof (float) + sizeof (unsigned int) - 1) / sizeof (unsigned int)) typedef union { float value; unsigned int word[NWORDS]; } memory_float; static unsigned int ored_words[NWORDS]; static unsigned int anded_words[NWORDS]; static void add_to_ored_words (float x) { memory_float m; size_t i; /* Clear it first, in case sizeof (float) < sizeof (memory_float). */ memset (&m, 0, sizeof (memory_float)); m.value = x; for (i = 0; i < NWORDS; i++) { ored_words[i] |= m.word[i]; anded_words[i] &= m.word[i]; } } int main () { size_t j; FILE *fp = fopen ("conftest.out", "w"); if (fp == NULL) return 1; for (j = 0; j < NWORDS; j++) anded_words[j] = ~ (unsigned int) 0; add_to_ored_words (0.25f); add_to_ored_words (0.5f); add_to_ored_words (1.0f); add_to_ored_words (2.0f); add_to_ored_words (4.0f); /* Remove bits that are common (e.g. if representation of the first mantissa bit is explicit). */ for (j = 0; j < NWORDS; j++) ored_words[j] &= ~anded_words[j]; /* Now find the nonzero word. */ for (j = 0; j < NWORDS; j++) if (ored_words[j] != 0) break; if (j < NWORDS) { size_t i; for (i = j + 1; i < NWORDS; i++) if (ored_words[i] != 0) { fprintf (fp, "unknown"); return (fclose (fp) != 0); } for (i = 0; ; i++) if ((ored_words[j] >> i) & 1) { fprintf (fp, "word %d bit %d", (int) j, (int) i); return (fclose (fp) != 0); } } fprintf (fp, "unknown"); return (fclose (fp) != 0); } ], [gl_cv_cc_float_expbit0=`cat conftest.out`], [gl_cv_cc_float_expbit0="unknown"], [gl_cv_cc_float_expbit0="word 0 bit 23"]) rm -f conftest.out ]) case "$gl_cv_cc_float_expbit0" in word*bit*) word=`echo "$gl_cv_cc_float_expbit0" | sed -e 's/word //' -e 's/ bit.*//'` bit=`echo "$gl_cv_cc_float_expbit0" | sed -e 's/word.*bit //'` AC_DEFINE_UNQUOTED([FLT_EXPBIT0_WORD], [$word], [Define as the word index where to find the exponent of 'float'.]) AC_DEFINE_UNQUOTED([FLT_EXPBIT0_BIT], [$bit], [Define as the bit index in the word where to find bit 0 of the exponent of 'float'.]) ;; esac ]) libprelude-1.0.0/libmissing/m4/ssize_t.m40000664000076400007640000000137511341220436015176 00000000000000# ssize_t.m4 serial 4 (gettext-0.15) dnl Copyright (C) 2001-2003, 2006, 2009-2010 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. dnl From Bruno Haible. dnl Test whether ssize_t is defined. AC_DEFUN([gt_TYPE_SSIZE_T], [ AC_CACHE_CHECK([for ssize_t], [gt_cv_ssize_t], [AC_TRY_COMPILE([#include ], [int x = sizeof (ssize_t *) + sizeof (ssize_t); return !x;], [gt_cv_ssize_t=yes], [gt_cv_ssize_t=no])]) if test $gt_cv_ssize_t = no; then AC_DEFINE([ssize_t], [int], [Define as a signed type of the same size as size_t.]) fi ]) libprelude-1.0.0/libmissing/m4/perror.m40000664000076400007640000000107611341220436015025 00000000000000# perror.m4 serial 1 dnl Copyright (C) 2008, 2009, 2010 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. AC_DEFUN([gl_FUNC_PERROR], [ AC_REQUIRE([gl_STDIO_H_DEFAULTS]) AC_REQUIRE([gl_HEADER_ERRNO_H]) if test -n "$ERRNO_H"; then dnl The system's perror() cannot know about the new errno values we add dnl to . Replace it. REPLACE_PERROR=1 AC_LIBOBJ([perror]) fi ]) libprelude-1.0.0/libmissing/m4/fcntl-o.m40000664000076400007640000000563511341220435015062 00000000000000# fcntl-o.m4 serial 1 dnl Copyright (C) 2006, 2009, 2010 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. dnl Written by Paul Eggert. # Test whether the flags O_NOATIME and O_NOFOLLOW actually work. # Define HAVE_WORKING_O_NOATIME to 1 if O_NOATIME works, or to 0 otherwise. # Define HAVE_WORKING_O_NOFOLLOW to 1 if O_NOFOLLOW works, or to 0 otherwise. AC_DEFUN([gl_FCNTL_O_FLAGS], [ dnl Persuade glibc to define O_NOATIME and O_NOFOLLOW. AC_REQUIRE([AC_USE_SYSTEM_EXTENSIONS]) AC_CACHE_CHECK([for working fcntl.h], [gl_cv_header_working_fcntl_h], [AC_RUN_IFELSE( [AC_LANG_PROGRAM( [[#include #include #include #include #ifndef O_NOATIME #define O_NOATIME 0 #endif #ifndef O_NOFOLLOW #define O_NOFOLLOW 0 #endif static int const constants[] = { O_CREAT, O_EXCL, O_NOCTTY, O_TRUNC, O_APPEND, O_NONBLOCK, O_SYNC, O_ACCMODE, O_RDONLY, O_RDWR, O_WRONLY }; ]], [[ int status = !constants; { static char const sym[] = "conftest.sym"; if (symlink (".", sym) != 0 || close (open (sym, O_RDONLY | O_NOFOLLOW)) == 0) status |= 32; unlink (sym); } { static char const file[] = "confdefs.h"; int fd = open (file, O_RDONLY | O_NOATIME); char c; struct stat st0, st1; if (fd < 0 || fstat (fd, &st0) != 0 || sleep (1) != 0 || read (fd, &c, 1) != 1 || close (fd) != 0 || stat (file, &st1) != 0 || st0.st_atime != st1.st_atime) status |= 64; } return status;]])], [gl_cv_header_working_fcntl_h=yes], [case $? in #( 32) gl_cv_header_working_fcntl_h='no (bad O_NOFOLLOW)';; #( 64) gl_cv_header_working_fcntl_h='no (bad O_NOATIME)';; #( 96) gl_cv_header_working_fcntl_h='no (bad O_NOATIME, O_NOFOLLOW)';; #( *) gl_cv_header_working_fcntl_h='no';; esac], [gl_cv_header_working_fcntl_h=cross-compiling])]) case $gl_cv_header_working_fcntl_h in #( *O_NOATIME* | no | cross-compiling) ac_val=0;; #( *) ac_val=1;; esac AC_DEFINE_UNQUOTED([HAVE_WORKING_O_NOATIME], [$ac_val], [Define to 1 if O_NOATIME works.]) case $gl_cv_header_working_fcntl_h in #( *O_NOFOLLOW* | no | cross-compiling) ac_val=0;; #( *) ac_val=1;; esac AC_DEFINE_UNQUOTED([HAVE_WORKING_O_NOFOLLOW], [$ac_val], [Define to 1 if O_NOFOLLOW works.]) ]) libprelude-1.0.0/libmissing/m4/alloca.m40000664000076400007640000000307511341220435014747 00000000000000# alloca.m4 serial 9 dnl Copyright (C) 2002-2004, 2006-2007, 2009-2010 Free Software Foundation, dnl Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. AC_DEFUN([gl_FUNC_ALLOCA], [ dnl Work around a bug of AC_EGREP_CPP in autoconf-2.57. AC_REQUIRE([AC_PROG_CPP]) AC_REQUIRE([AC_PROG_EGREP]) AC_REQUIRE([AC_FUNC_ALLOCA]) if test $ac_cv_func_alloca_works = no; then gl_PREREQ_ALLOCA fi # Define an additional variable used in the Makefile substitution. if test $ac_cv_working_alloca_h = yes; then AC_CACHE_CHECK([for alloca as a compiler built-in], [gl_cv_rpl_alloca], [ AC_EGREP_CPP([Need own alloca], [ #if defined __GNUC__ || defined _AIX || defined _MSC_VER Need own alloca #endif ], [gl_cv_rpl_alloca=yes], [gl_cv_rpl_alloca=no]) ]) if test $gl_cv_rpl_alloca = yes; then dnl OK, alloca can be implemented through a compiler built-in. AC_DEFINE([HAVE_ALLOCA], [1], [Define to 1 if you have 'alloca' after including , a header that may be supplied by this distribution.]) ALLOCA_H=alloca.h else dnl alloca exists as a library function, i.e. it is slow and probably dnl a memory leak. Don't define HAVE_ALLOCA in this case. ALLOCA_H= fi else ALLOCA_H=alloca.h fi AC_SUBST([ALLOCA_H]) ]) # Prerequisites of lib/alloca.c. # STACK_DIRECTION is already handled by AC_FUNC_ALLOCA. AC_DEFUN([gl_PREREQ_ALLOCA], [:]) libprelude-1.0.0/libmissing/m4/intmax_t.m40000664000076400007640000000404311341220435015333 00000000000000# intmax_t.m4 serial 7 dnl Copyright (C) 1997-2004, 2006-2007, 2009-2010 Free Software Foundation, dnl Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. dnl From Paul Eggert. AC_PREREQ([2.13]) # Define intmax_t to 'long' or 'long long' # if it is not already defined in or . AC_DEFUN([gl_AC_TYPE_INTMAX_T], [ dnl For simplicity, we assume that a header file defines 'intmax_t' if and dnl only if it defines 'uintmax_t'. AC_REQUIRE([gl_AC_HEADER_INTTYPES_H]) AC_REQUIRE([gl_AC_HEADER_STDINT_H]) if test $gl_cv_header_inttypes_h = no && test $gl_cv_header_stdint_h = no; then AC_REQUIRE([AC_TYPE_LONG_LONG_INT]) test $ac_cv_type_long_long_int = yes \ && ac_type='long long' \ || ac_type='long' AC_DEFINE_UNQUOTED([intmax_t], [$ac_type], [Define to long or long long if and don't define.]) else AC_DEFINE([HAVE_INTMAX_T], [1], [Define if you have the 'intmax_t' type in or .]) fi ]) dnl An alternative would be to explicitly test for 'intmax_t'. AC_DEFUN([gt_AC_TYPE_INTMAX_T], [ AC_REQUIRE([gl_AC_HEADER_INTTYPES_H]) AC_REQUIRE([gl_AC_HEADER_STDINT_H]) AC_CACHE_CHECK([for intmax_t], [gt_cv_c_intmax_t], [AC_TRY_COMPILE([ #include #include #if HAVE_STDINT_H_WITH_UINTMAX #include #endif #if HAVE_INTTYPES_H_WITH_UINTMAX #include #endif ], [intmax_t x = -1; return !x;], gt_cv_c_intmax_t=yes, gt_cv_c_intmax_t=no)]) if test $gt_cv_c_intmax_t = yes; then AC_DEFINE([HAVE_INTMAX_T], [1], [Define if you have the 'intmax_t' type in or .]) else AC_REQUIRE([AC_TYPE_LONG_LONG_INT]) test $ac_cv_type_long_long_int = yes \ && ac_type='long long' \ || ac_type='long' AC_DEFINE_UNQUOTED([intmax_t], [$ac_type], [Define to long or long long if and don't define.]) fi ]) libprelude-1.0.0/libmissing/m4/strings_h.m40000664000076400007640000000250511341220436015512 00000000000000# Configure a replacement for . # serial 2 # Copyright (C) 2007, 2009, 2010 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. AC_DEFUN([gl_HEADER_STRINGS_H], [ dnl Use AC_REQUIRE here, so that the default behavior below is expanded dnl once only, before all statements that occur in other macros. AC_REQUIRE([gl_HEADER_STRINGS_H_BODY]) ]) AC_DEFUN([gl_HEADER_STRINGS_H_BODY], [ AC_REQUIRE([gl_HEADER_STRINGS_H_DEFAULTS]) gl_CHECK_NEXT_HEADERS([strings.h]) dnl Check for declarations of anything we want to poison if the dnl corresponding gnulib module is not in use. gl_WARN_ON_USE_PREPARE([[#include ]], [strcasecmp strncasecmp]) ]) AC_DEFUN([gl_STRINGS_MODULE_INDICATOR], [ dnl Use AC_REQUIRE here, so that the default settings are expanded once only. AC_REQUIRE([gl_HEADER_STRINGS_H_DEFAULTS]) GNULIB_[]m4_translit([$1],[abcdefghijklmnopqrstuvwxyz./-],[ABCDEFGHIJKLMNOPQRSTUVWXYZ___])=1 ]) AC_DEFUN([gl_HEADER_STRINGS_H_DEFAULTS], [ dnl Assume proper GNU behavior unless another module says otherwise. HAVE_STRCASECMP=1; AC_SUBST([HAVE_STRCASECMP]) HAVE_DECL_STRNCASECMP=1; AC_SUBST([HAVE_DECL_STRNCASECMP]) ]) libprelude-1.0.0/libmissing/m4/sys_ioctl_h.m40000664000076400007640000000465511341220437016042 00000000000000# sys_ioctl_h.m4 serial 5 dnl Copyright (C) 2008-2010 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. dnl Written by Bruno Haible. AC_DEFUN([gl_SYS_IOCTL_H], [ dnl Use AC_REQUIRE here, so that the default behavior below is expanded dnl once only, before all statements that occur in other macros. AC_REQUIRE([gl_SYS_IOCTL_H_DEFAULTS]) AC_CHECK_HEADERS_ONCE([sys/ioctl.h]) if test $ac_cv_header_sys_ioctl_h = yes; then HAVE_SYS_IOCTL_H=1 dnl Test whether declares ioctl(), or whether some other dnl header file, such as or , is needed for that. AC_CACHE_CHECK([whether declares ioctl], [gl_cv_decl_ioctl_in_sys_ioctl_h], [dnl We cannot use AC_CHECK_DECL because it produces its own messages. AC_COMPILE_IFELSE( [AC_LANG_PROGRAM( [AC_INCLUDES_DEFAULT([#include ])], [(void) ioctl;])], [gl_cv_decl_ioctl_in_sys_ioctl_h=yes], [gl_cv_decl_ioctl_in_sys_ioctl_h=no]) ]) else HAVE_SYS_IOCTL_H=0 fi AC_SUBST([HAVE_SYS_IOCTL_H]) dnl is always overridden, because of GNULIB_POSIXCHECK. gl_CHECK_NEXT_HEADERS([sys/ioctl.h]) dnl Check for declarations of anything we want to poison if the dnl corresponding gnulib module is not in use. gl_WARN_ON_USE_PREPARE([[#include /* Some platforms declare ioctl in the wrong header. */ #ifndef __GLIBC__ # include #endif ]], [ioctl]) ]) dnl Unconditionally enables the replacement of . AC_DEFUN([gl_REPLACE_SYS_IOCTL_H], [ dnl This is a no-op, because is always overridden. : ]) AC_DEFUN([gl_SYS_IOCTL_MODULE_INDICATOR], [ dnl Use AC_REQUIRE here, so that the default settings are expanded once only. AC_REQUIRE([gl_SYS_IOCTL_H_DEFAULTS]) GNULIB_[]m4_translit([$1],[abcdefghijklmnopqrstuvwxyz./-],[ABCDEFGHIJKLMNOPQRSTUVWXYZ___])=1 ]) AC_DEFUN([gl_SYS_IOCTL_H_DEFAULTS], [ GNULIB_IOCTL=0; AC_SUBST([GNULIB_IOCTL]) dnl Assume proper GNU behavior unless another module says otherwise. SYS_IOCTL_H_HAVE_WINSOCK2_H=0; AC_SUBST([SYS_IOCTL_H_HAVE_WINSOCK2_H]) SYS_IOCTL_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS=0; AC_SUBST([SYS_IOCTL_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS]) ]) libprelude-1.0.0/libmissing/m4/warn-on-use.m40000664000076400007640000000403211345707014015670 00000000000000# warn-on-use.m4 serial 1 dnl Copyright (C) 2010 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. # gl_WARN_ON_USE_PREPARE(INCLUDES, NAMES) # --------------------------------------- # For each whitespace-separated element in the list of NAMES, define # HAVE_RAW_DECL_name if the function has a declaration among INCLUDES # even after being undefined as a macro. # # See warn-on-use.h for some hints on how to poison function names, as # well as ideas on poisoning global variables and macros. NAMES may # include global variables, but remember that only functions work with # _GL_WARN_ON_USE. Typically, INCLUDES only needs to list a single # header, but if the replacement header pulls in other headers because # some systems declare functions in the wrong header, then INCLUDES # should do likewise. # # If you assume C89, then it is generally safe to assume declarations # for functions declared in that standard (such as gets) without # needing gl_WARN_ON_USE_PREPARE. AC_DEFUN([gl_WARN_ON_USE_PREPARE], [ m4_foreach_w([gl_decl], [$2], [AH_TEMPLATE([HAVE_RAW_DECL_]AS_TR_CPP(m4_defn([gl_decl])), [Define to 1 if ]m4_defn([gl_decl])[ is declared even after undefining macros.])])dnl for gl_func in m4_flatten([$2]); do AS_VAR_PUSHDEF([gl_Symbol], [gl_cv_have_raw_decl_$gl_func])dnl AC_CACHE_CHECK([whether $gl_func is declared without a macro], [gl_Symbol], [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([$1], [@%:@undef $gl_func (void) $gl_func;])], [AS_VAR_SET([gl_Symbol], [yes])], [AS_VAR_SET([gl_Symbol], [no])])]) AS_VAR_IF([gl_Symbol], [yes], [AC_DEFINE_UNQUOTED(AS_TR_CPP([HAVE_RAW_DECL_$gl_func]), [1]) dnl shortcut - if the raw declaration exists, then set a cache dnl variable to allow skipping any later AC_CHECK_DECL efforts eval ac_cv_have_decl_$gl_func=yes]) AS_VAR_POPDEF([gl_Symbol])dnl done ]) libprelude-1.0.0/libmissing/m4/sys_stat_h.m40000664000076400007640000000623011341220437015672 00000000000000# sys_stat_h.m4 serial 22 -*- Autoconf -*- dnl Copyright (C) 2006-2010 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. dnl From Eric Blake. dnl Provide a GNU-like . AC_DEFUN([gl_HEADER_SYS_STAT_H], [ AC_REQUIRE([gl_SYS_STAT_H_DEFAULTS]) dnl For the mkdir substitute. AC_REQUIRE([AC_C_INLINE]) dnl Check for broken stat macros. AC_REQUIRE([AC_HEADER_STAT]) gl_CHECK_NEXT_HEADERS([sys/stat.h]) dnl Define types that are supposed to be defined in or dnl . AC_CHECK_TYPE([nlink_t], [], [AC_DEFINE([nlink_t], [int], [Define to the type of st_nlink in struct stat, or a supertype.])], [#include #include ]) dnl Check for declarations of anything we want to poison if the dnl corresponding gnulib module is not in use. gl_WARN_ON_USE_PREPARE([[#include ]], [fchmodat fstatat futimens lchmod lstat mkdirat mkfifo mkfifoat mknod mknodat stat utimensat]) ]) # gl_HEADER_SYS_STAT_H AC_DEFUN([gl_SYS_STAT_MODULE_INDICATOR], [ dnl Use AC_REQUIRE here, so that the default settings are expanded once only. AC_REQUIRE([gl_SYS_STAT_H_DEFAULTS]) GNULIB_[]m4_translit([$1],[abcdefghijklmnopqrstuvwxyz./-],[ABCDEFGHIJKLMNOPQRSTUVWXYZ___])=1 ]) AC_DEFUN([gl_SYS_STAT_H_DEFAULTS], [ AC_REQUIRE([gl_UNISTD_H_DEFAULTS]) dnl for REPLACE_FCHDIR GNULIB_FCHMODAT=0; AC_SUBST([GNULIB_FCHMODAT]) GNULIB_FSTATAT=0; AC_SUBST([GNULIB_FSTATAT]) GNULIB_FUTIMENS=0; AC_SUBST([GNULIB_FUTIMENS]) GNULIB_LCHMOD=0; AC_SUBST([GNULIB_LCHMOD]) GNULIB_LSTAT=0; AC_SUBST([GNULIB_LSTAT]) GNULIB_MKDIRAT=0; AC_SUBST([GNULIB_MKDIRAT]) GNULIB_MKFIFO=0; AC_SUBST([GNULIB_MKFIFO]) GNULIB_MKFIFOAT=0; AC_SUBST([GNULIB_MKFIFOAT]) GNULIB_MKNOD=0; AC_SUBST([GNULIB_MKNOD]) GNULIB_MKNODAT=0; AC_SUBST([GNULIB_MKNODAT]) GNULIB_STAT=0; AC_SUBST([GNULIB_STAT]) GNULIB_UTIMENSAT=0; AC_SUBST([GNULIB_UTIMENSAT]) dnl Assume proper GNU behavior unless another module says otherwise. HAVE_FCHMODAT=1; AC_SUBST([HAVE_FCHMODAT]) HAVE_FSTATAT=1; AC_SUBST([HAVE_FSTATAT]) HAVE_FUTIMENS=1; AC_SUBST([HAVE_FUTIMENS]) HAVE_LCHMOD=1; AC_SUBST([HAVE_LCHMOD]) HAVE_LSTAT=1; AC_SUBST([HAVE_LSTAT]) HAVE_MKDIRAT=1; AC_SUBST([HAVE_MKDIRAT]) HAVE_MKFIFO=1; AC_SUBST([HAVE_MKFIFO]) HAVE_MKFIFOAT=1; AC_SUBST([HAVE_MKFIFOAT]) HAVE_MKNOD=1; AC_SUBST([HAVE_MKNOD]) HAVE_MKNODAT=1; AC_SUBST([HAVE_MKNODAT]) HAVE_UTIMENSAT=1; AC_SUBST([HAVE_UTIMENSAT]) REPLACE_FSTAT=0; AC_SUBST([REPLACE_FSTAT]) REPLACE_FSTATAT=0; AC_SUBST([REPLACE_FSTATAT]) REPLACE_FUTIMENS=0; AC_SUBST([REPLACE_FUTIMENS]) REPLACE_LSTAT=0; AC_SUBST([REPLACE_LSTAT]) REPLACE_MKDIR=0; AC_SUBST([REPLACE_MKDIR]) REPLACE_MKFIFO=0; AC_SUBST([REPLACE_MKFIFO]) REPLACE_MKNOD=0; AC_SUBST([REPLACE_MKNOD]) REPLACE_STAT=0; AC_SUBST([REPLACE_STAT]) REPLACE_UTIMENSAT=0; AC_SUBST([REPLACE_UTIMENSAT]) ]) libprelude-1.0.0/libmissing/m4/tls.m40000664000076400007640000000057111341220437014316 00000000000000# tls.m4 serial 2 (gettext-0.18) dnl Copyright (C) 2005, 2008, 2009, 2010 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. dnl From Bruno Haible. AC_DEFUN([gl_TLS], [ AC_REQUIRE([gl_THREADLIB]) ]) libprelude-1.0.0/libmissing/m4/strsep.m40000664000076400007640000000136211341220436015032 00000000000000# strsep.m4 serial 9 dnl Copyright (C) 2002, 2003, 2004, 2007, 2009, 2010 Free Software Foundation, dnl Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. AC_DEFUN([gl_FUNC_STRSEP], [ dnl Persuade glibc to declare strsep(). AC_REQUIRE([AC_USE_SYSTEM_EXTENSIONS]) dnl The strsep() declaration in lib/string.in.h uses 'restrict'. AC_REQUIRE([AC_C_RESTRICT]) AC_REQUIRE([gl_HEADER_STRING_H_DEFAULTS]) AC_REPLACE_FUNCS([strsep]) if test $ac_cv_func_strsep = no; then HAVE_STRSEP=0 gl_PREREQ_STRSEP fi ]) # Prerequisites of lib/strsep.c. AC_DEFUN([gl_PREREQ_STRSEP], [:]) libprelude-1.0.0/libmissing/m4/stdint.m40000664000076400007640000003641511341220436015026 00000000000000# stdint.m4 serial 34 dnl Copyright (C) 2001-2010 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. dnl From Paul Eggert and Bruno Haible. dnl Test whether is supported or must be substituted. AC_DEFUN([gl_STDINT_H], [ AC_PREREQ([2.59])dnl dnl Check for long long int and unsigned long long int. AC_REQUIRE([AC_TYPE_LONG_LONG_INT]) if test $ac_cv_type_long_long_int = yes; then HAVE_LONG_LONG_INT=1 else HAVE_LONG_LONG_INT=0 fi AC_SUBST([HAVE_LONG_LONG_INT]) AC_REQUIRE([AC_TYPE_UNSIGNED_LONG_LONG_INT]) if test $ac_cv_type_unsigned_long_long_int = yes; then HAVE_UNSIGNED_LONG_LONG_INT=1 else HAVE_UNSIGNED_LONG_LONG_INT=0 fi AC_SUBST([HAVE_UNSIGNED_LONG_LONG_INT]) dnl Check for . dnl AC_INCLUDES_DEFAULT defines $ac_cv_header_inttypes_h. if test $ac_cv_header_inttypes_h = yes; then HAVE_INTTYPES_H=1 else HAVE_INTTYPES_H=0 fi AC_SUBST([HAVE_INTTYPES_H]) dnl Check for . dnl AC_INCLUDES_DEFAULT defines $ac_cv_header_sys_types_h. if test $ac_cv_header_sys_types_h = yes; then HAVE_SYS_TYPES_H=1 else HAVE_SYS_TYPES_H=0 fi AC_SUBST([HAVE_SYS_TYPES_H]) gl_CHECK_NEXT_HEADERS([stdint.h]) if test $ac_cv_header_stdint_h = yes; then HAVE_STDINT_H=1 else HAVE_STDINT_H=0 fi AC_SUBST([HAVE_STDINT_H]) dnl Now see whether we need a substitute . if test $ac_cv_header_stdint_h = yes; then AC_CACHE_CHECK([whether stdint.h conforms to C99], [gl_cv_header_working_stdint_h], [gl_cv_header_working_stdint_h=no AC_COMPILE_IFELSE([ AC_LANG_PROGRAM([[ #define __STDC_LIMIT_MACROS 1 /* to make it work also in C++ mode */ #define __STDC_CONSTANT_MACROS 1 /* to make it work also in C++ mode */ #define _GL_JUST_INCLUDE_SYSTEM_STDINT_H 1 /* work if build isn't clean */ #include /* Dragonfly defines WCHAR_MIN, WCHAR_MAX only in . */ #if !(defined WCHAR_MIN && defined WCHAR_MAX) #error "WCHAR_MIN, WCHAR_MAX not defined in " #endif ] gl_STDINT_INCLUDES [ #ifdef INT8_MAX int8_t a1 = INT8_MAX; int8_t a1min = INT8_MIN; #endif #ifdef INT16_MAX int16_t a2 = INT16_MAX; int16_t a2min = INT16_MIN; #endif #ifdef INT32_MAX int32_t a3 = INT32_MAX; int32_t a3min = INT32_MIN; #endif #ifdef INT64_MAX int64_t a4 = INT64_MAX; int64_t a4min = INT64_MIN; #endif #ifdef UINT8_MAX uint8_t b1 = UINT8_MAX; #else typedef int b1[(unsigned char) -1 != 255 ? 1 : -1]; #endif #ifdef UINT16_MAX uint16_t b2 = UINT16_MAX; #endif #ifdef UINT32_MAX uint32_t b3 = UINT32_MAX; #endif #ifdef UINT64_MAX uint64_t b4 = UINT64_MAX; #endif int_least8_t c1 = INT8_C (0x7f); int_least8_t c1max = INT_LEAST8_MAX; int_least8_t c1min = INT_LEAST8_MIN; int_least16_t c2 = INT16_C (0x7fff); int_least16_t c2max = INT_LEAST16_MAX; int_least16_t c2min = INT_LEAST16_MIN; int_least32_t c3 = INT32_C (0x7fffffff); int_least32_t c3max = INT_LEAST32_MAX; int_least32_t c3min = INT_LEAST32_MIN; int_least64_t c4 = INT64_C (0x7fffffffffffffff); int_least64_t c4max = INT_LEAST64_MAX; int_least64_t c4min = INT_LEAST64_MIN; uint_least8_t d1 = UINT8_C (0xff); uint_least8_t d1max = UINT_LEAST8_MAX; uint_least16_t d2 = UINT16_C (0xffff); uint_least16_t d2max = UINT_LEAST16_MAX; uint_least32_t d3 = UINT32_C (0xffffffff); uint_least32_t d3max = UINT_LEAST32_MAX; uint_least64_t d4 = UINT64_C (0xffffffffffffffff); uint_least64_t d4max = UINT_LEAST64_MAX; int_fast8_t e1 = INT_FAST8_MAX; int_fast8_t e1min = INT_FAST8_MIN; int_fast16_t e2 = INT_FAST16_MAX; int_fast16_t e2min = INT_FAST16_MIN; int_fast32_t e3 = INT_FAST32_MAX; int_fast32_t e3min = INT_FAST32_MIN; int_fast64_t e4 = INT_FAST64_MAX; int_fast64_t e4min = INT_FAST64_MIN; uint_fast8_t f1 = UINT_FAST8_MAX; uint_fast16_t f2 = UINT_FAST16_MAX; uint_fast32_t f3 = UINT_FAST32_MAX; uint_fast64_t f4 = UINT_FAST64_MAX; #ifdef INTPTR_MAX intptr_t g = INTPTR_MAX; intptr_t gmin = INTPTR_MIN; #endif #ifdef UINTPTR_MAX uintptr_t h = UINTPTR_MAX; #endif intmax_t i = INTMAX_MAX; uintmax_t j = UINTMAX_MAX; #include /* for CHAR_BIT */ #define TYPE_MINIMUM(t) \ ((t) ((t) 0 < (t) -1 ? (t) 0 : ~ (t) 0 << (sizeof (t) * CHAR_BIT - 1))) #define TYPE_MAXIMUM(t) \ ((t) ((t) 0 < (t) -1 ? (t) -1 : ~ (~ (t) 0 << (sizeof (t) * CHAR_BIT - 1)))) struct s { int check_PTRDIFF: PTRDIFF_MIN == TYPE_MINIMUM (ptrdiff_t) && PTRDIFF_MAX == TYPE_MAXIMUM (ptrdiff_t) ? 1 : -1; /* Detect bug in FreeBSD 6.0 / ia64. */ int check_SIG_ATOMIC: SIG_ATOMIC_MIN == TYPE_MINIMUM (sig_atomic_t) && SIG_ATOMIC_MAX == TYPE_MAXIMUM (sig_atomic_t) ? 1 : -1; int check_SIZE: SIZE_MAX == TYPE_MAXIMUM (size_t) ? 1 : -1; int check_WCHAR: WCHAR_MIN == TYPE_MINIMUM (wchar_t) && WCHAR_MAX == TYPE_MAXIMUM (wchar_t) ? 1 : -1; /* Detect bug in mingw. */ int check_WINT: WINT_MIN == TYPE_MINIMUM (wint_t) && WINT_MAX == TYPE_MAXIMUM (wint_t) ? 1 : -1; /* Detect bugs in glibc 2.4 and Solaris 10 stdint.h, among others. */ int check_UINT8_C: (-1 < UINT8_C (0)) == (-1 < (uint_least8_t) 0) ? 1 : -1; int check_UINT16_C: (-1 < UINT16_C (0)) == (-1 < (uint_least16_t) 0) ? 1 : -1; /* Detect bugs in OpenBSD 3.9 stdint.h. */ #ifdef UINT8_MAX int check_uint8: (uint8_t) -1 == UINT8_MAX ? 1 : -1; #endif #ifdef UINT16_MAX int check_uint16: (uint16_t) -1 == UINT16_MAX ? 1 : -1; #endif #ifdef UINT32_MAX int check_uint32: (uint32_t) -1 == UINT32_MAX ? 1 : -1; #endif #ifdef UINT64_MAX int check_uint64: (uint64_t) -1 == UINT64_MAX ? 1 : -1; #endif int check_uint_least8: (uint_least8_t) -1 == UINT_LEAST8_MAX ? 1 : -1; int check_uint_least16: (uint_least16_t) -1 == UINT_LEAST16_MAX ? 1 : -1; int check_uint_least32: (uint_least32_t) -1 == UINT_LEAST32_MAX ? 1 : -1; int check_uint_least64: (uint_least64_t) -1 == UINT_LEAST64_MAX ? 1 : -1; int check_uint_fast8: (uint_fast8_t) -1 == UINT_FAST8_MAX ? 1 : -1; int check_uint_fast16: (uint_fast16_t) -1 == UINT_FAST16_MAX ? 1 : -1; int check_uint_fast32: (uint_fast32_t) -1 == UINT_FAST32_MAX ? 1 : -1; int check_uint_fast64: (uint_fast64_t) -1 == UINT_FAST64_MAX ? 1 : -1; int check_uintptr: (uintptr_t) -1 == UINTPTR_MAX ? 1 : -1; int check_uintmax: (uintmax_t) -1 == UINTMAX_MAX ? 1 : -1; int check_size: (size_t) -1 == SIZE_MAX ? 1 : -1; }; ]])], [dnl Determine whether the various *_MIN, *_MAX macros are usable dnl in preprocessor expression. We could do it by compiling a test dnl program for each of these macros. It is faster to run a program dnl that inspects the macro expansion. dnl This detects a bug on HP-UX 11.23/ia64. AC_RUN_IFELSE([ AC_LANG_PROGRAM([[ #define __STDC_LIMIT_MACROS 1 /* to make it work also in C++ mode */ #define __STDC_CONSTANT_MACROS 1 /* to make it work also in C++ mode */ #define _GL_JUST_INCLUDE_SYSTEM_STDINT_H 1 /* work if build isn't clean */ #include ] gl_STDINT_INCLUDES [ #include #include #define MVAL(macro) MVAL1(macro) #define MVAL1(expression) #expression static const char *macro_values[] = { #ifdef INT8_MAX MVAL (INT8_MAX), #endif #ifdef INT16_MAX MVAL (INT16_MAX), #endif #ifdef INT32_MAX MVAL (INT32_MAX), #endif #ifdef INT64_MAX MVAL (INT64_MAX), #endif #ifdef UINT8_MAX MVAL (UINT8_MAX), #endif #ifdef UINT16_MAX MVAL (UINT16_MAX), #endif #ifdef UINT32_MAX MVAL (UINT32_MAX), #endif #ifdef UINT64_MAX MVAL (UINT64_MAX), #endif NULL }; ]], [[ const char **mv; for (mv = macro_values; *mv != NULL; mv++) { const char *value = *mv; /* Test whether it looks like a cast expression. */ if (strncmp (value, "((unsigned int)"/*)*/, 15) == 0 || strncmp (value, "((unsigned short)"/*)*/, 17) == 0 || strncmp (value, "((unsigned char)"/*)*/, 16) == 0 || strncmp (value, "((int)"/*)*/, 6) == 0 || strncmp (value, "((signed short)"/*)*/, 15) == 0 || strncmp (value, "((signed char)"/*)*/, 14) == 0) return 1; } return 0; ]])], [gl_cv_header_working_stdint_h=yes], [], [dnl When cross-compiling, assume it works. gl_cv_header_working_stdint_h=yes ]) ]) ]) fi if test "$gl_cv_header_working_stdint_h" = yes; then STDINT_H= else dnl Check for , and for dnl (used in Linux libc4 >= 4.6.7 and libc5). AC_CHECK_HEADERS([sys/inttypes.h sys/bitypes.h]) if test $ac_cv_header_sys_inttypes_h = yes; then HAVE_SYS_INTTYPES_H=1 else HAVE_SYS_INTTYPES_H=0 fi AC_SUBST([HAVE_SYS_INTTYPES_H]) if test $ac_cv_header_sys_bitypes_h = yes; then HAVE_SYS_BITYPES_H=1 else HAVE_SYS_BITYPES_H=0 fi AC_SUBST([HAVE_SYS_BITYPES_H]) dnl Check for (missing in Linux uClibc when built without wide dnl character support). AC_CHECK_HEADERS_ONCE([wchar.h]) gl_STDINT_TYPE_PROPERTIES STDINT_H=stdint.h fi AC_SUBST([STDINT_H]) ]) dnl gl_STDINT_BITSIZEOF(TYPES, INCLUDES) dnl Determine the size of each of the given types in bits. AC_DEFUN([gl_STDINT_BITSIZEOF], [ dnl Use a shell loop, to avoid bloating configure, and dnl - extra AH_TEMPLATE calls, so that autoheader knows what to put into dnl config.h.in, dnl - extra AC_SUBST calls, so that the right substitutions are made. m4_foreach_w([gltype], [$1], [AH_TEMPLATE([BITSIZEOF_]translit(gltype,[abcdefghijklmnopqrstuvwxyz ],[ABCDEFGHIJKLMNOPQRSTUVWXYZ_]), [Define to the number of bits in type ']gltype['.])]) for gltype in $1 ; do AC_CACHE_CHECK([for bit size of $gltype], [gl_cv_bitsizeof_${gltype}], [AC_COMPUTE_INT([result], [sizeof ($gltype) * CHAR_BIT], [$2 #include ], [result=unknown]) eval gl_cv_bitsizeof_${gltype}=\$result ]) eval result=\$gl_cv_bitsizeof_${gltype} if test $result = unknown; then dnl Use a nonempty default, because some compilers, such as IRIX 5 cc, dnl do a syntax check even on unused #if conditions and give an error dnl on valid C code like this: dnl #if 0 dnl # if > 32 dnl # endif dnl #endif result=0 fi GLTYPE=`echo "$gltype" | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'` AC_DEFINE_UNQUOTED([BITSIZEOF_${GLTYPE}], [$result]) eval BITSIZEOF_${GLTYPE}=\$result done m4_foreach_w([gltype], [$1], [AC_SUBST([BITSIZEOF_]translit(gltype,[abcdefghijklmnopqrstuvwxyz ],[ABCDEFGHIJKLMNOPQRSTUVWXYZ_]))]) ]) dnl gl_CHECK_TYPES_SIGNED(TYPES, INCLUDES) dnl Determine the signedness of each of the given types. dnl Define HAVE_SIGNED_TYPE if type is signed. AC_DEFUN([gl_CHECK_TYPES_SIGNED], [ dnl Use a shell loop, to avoid bloating configure, and dnl - extra AH_TEMPLATE calls, so that autoheader knows what to put into dnl config.h.in, dnl - extra AC_SUBST calls, so that the right substitutions are made. m4_foreach_w([gltype], [$1], [AH_TEMPLATE([HAVE_SIGNED_]translit(gltype,[abcdefghijklmnopqrstuvwxyz ],[ABCDEFGHIJKLMNOPQRSTUVWXYZ_]), [Define to 1 if ']gltype[' is a signed integer type.])]) for gltype in $1 ; do AC_CACHE_CHECK([whether $gltype is signed], [gl_cv_type_${gltype}_signed], [AC_COMPILE_IFELSE( [AC_LANG_PROGRAM([$2[ int verify[2 * (($gltype) -1 < ($gltype) 0) - 1];]])], result=yes, result=no) eval gl_cv_type_${gltype}_signed=\$result ]) eval result=\$gl_cv_type_${gltype}_signed GLTYPE=`echo $gltype | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'` if test "$result" = yes; then AC_DEFINE_UNQUOTED([HAVE_SIGNED_${GLTYPE}], [1]) eval HAVE_SIGNED_${GLTYPE}=1 else eval HAVE_SIGNED_${GLTYPE}=0 fi done m4_foreach_w([gltype], [$1], [AC_SUBST([HAVE_SIGNED_]translit(gltype,[abcdefghijklmnopqrstuvwxyz ],[ABCDEFGHIJKLMNOPQRSTUVWXYZ_]))]) ]) dnl gl_INTEGER_TYPE_SUFFIX(TYPES, INCLUDES) dnl Determine the suffix to use for integer constants of the given types. dnl Define t_SUFFIX for each such type. AC_DEFUN([gl_INTEGER_TYPE_SUFFIX], [ dnl Use a shell loop, to avoid bloating configure, and dnl - extra AH_TEMPLATE calls, so that autoheader knows what to put into dnl config.h.in, dnl - extra AC_SUBST calls, so that the right substitutions are made. m4_foreach_w([gltype], [$1], [AH_TEMPLATE(translit(gltype,[abcdefghijklmnopqrstuvwxyz ],[ABCDEFGHIJKLMNOPQRSTUVWXYZ_])[_SUFFIX], [Define to l, ll, u, ul, ull, etc., as suitable for constants of type ']gltype['.])]) for gltype in $1 ; do AC_CACHE_CHECK([for $gltype integer literal suffix], [gl_cv_type_${gltype}_suffix], [eval gl_cv_type_${gltype}_suffix=no eval result=\$gl_cv_type_${gltype}_signed if test "$result" = yes; then glsufu= else glsufu=u fi for glsuf in "$glsufu" ${glsufu}l ${glsufu}ll ${glsufu}i64; do case $glsuf in '') gltype1='int';; l) gltype1='long int';; ll) gltype1='long long int';; i64) gltype1='__int64';; u) gltype1='unsigned int';; ul) gltype1='unsigned long int';; ull) gltype1='unsigned long long int';; ui64)gltype1='unsigned __int64';; esac AC_COMPILE_IFELSE( [AC_LANG_PROGRAM([$2[ extern $gltype foo; extern $gltype1 foo;]])], [eval gl_cv_type_${gltype}_suffix=\$glsuf]) eval result=\$gl_cv_type_${gltype}_suffix test "$result" != no && break done]) GLTYPE=`echo $gltype | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'` eval result=\$gl_cv_type_${gltype}_suffix test "$result" = no && result= eval ${GLTYPE}_SUFFIX=\$result AC_DEFINE_UNQUOTED([${GLTYPE}_SUFFIX], [$result]) done m4_foreach_w([gltype], [$1], [AC_SUBST(translit(gltype,[abcdefghijklmnopqrstuvwxyz ],[ABCDEFGHIJKLMNOPQRSTUVWXYZ_])[_SUFFIX])]) ]) dnl gl_STDINT_INCLUDES AC_DEFUN([gl_STDINT_INCLUDES], [[ /* BSD/OS 4.0.1 has a bug: , and must be included before . */ #include #include #if HAVE_WCHAR_H # include # include # include #endif ]]) dnl gl_STDINT_TYPE_PROPERTIES dnl Compute HAVE_SIGNED_t, BITSIZEOF_t and t_SUFFIX, for all the types t dnl of interest to stdint.in.h. AC_DEFUN([gl_STDINT_TYPE_PROPERTIES], [ AC_REQUIRE([gl_MULTIARCH]) if test $APPLE_UNIVERSAL_BUILD = 0; then gl_STDINT_BITSIZEOF([ptrdiff_t size_t], [gl_STDINT_INCLUDES]) fi gl_STDINT_BITSIZEOF([sig_atomic_t wchar_t wint_t], [gl_STDINT_INCLUDES]) gl_CHECK_TYPES_SIGNED([sig_atomic_t wchar_t wint_t], [gl_STDINT_INCLUDES]) gl_cv_type_ptrdiff_t_signed=yes gl_cv_type_size_t_signed=no if test $APPLE_UNIVERSAL_BUILD = 0; then gl_INTEGER_TYPE_SUFFIX([ptrdiff_t size_t], [gl_STDINT_INCLUDES]) fi gl_INTEGER_TYPE_SUFFIX([sig_atomic_t wchar_t wint_t], [gl_STDINT_INCLUDES]) ]) dnl Autoconf >= 2.61 has AC_COMPUTE_INT built-in. dnl Remove this when we can assume autoconf >= 2.61. m4_ifdef([AC_COMPUTE_INT], [], [ AC_DEFUN([AC_COMPUTE_INT], [_AC_COMPUTE_INT([$2],[$1],[$3],[$4])]) ]) # Hey Emacs! # Local Variables: # indent-tabs-mode: nil # End: libprelude-1.0.0/libmissing/m4/thread.m40000664000076400007640000000102411341220437014755 00000000000000# thread.m4 serial 2 dnl Copyright (C) 2008, 2009, 2010 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. AC_DEFUN([gl_THREAD], [ AC_REQUIRE([gl_THREADLIB]) AC_REQUIRE([AC_C_INLINE]) if test $gl_threads_api = posix; then gl_save_LIBS="$LIBS" LIBS="$LIBS $LIBMULTITHREAD" AC_CHECK_FUNCS([pthread_atfork]) LIBS="$gl_save_LIBS" fi ]) libprelude-1.0.0/libmissing/m4/isnanl.m40000664000076400007640000001675411341220436015011 00000000000000# isnanl.m4 serial 12 dnl Copyright (C) 2007-2010 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. AC_DEFUN([gl_FUNC_ISNANL], [ AC_REQUIRE([gl_MATH_H_DEFAULTS]) ISNANL_LIBM= gl_HAVE_ISNANL_NO_LIBM if test $gl_cv_func_isnanl_no_libm = no; then gl_HAVE_ISNANL_IN_LIBM if test $gl_cv_func_isnanl_in_libm = yes; then ISNANL_LIBM=-lm fi fi if test $gl_cv_func_isnanl_no_libm = yes \ || test $gl_cv_func_isnanl_in_libm = yes; then save_LIBS="$LIBS" LIBS="$LIBS $ISNANL_LIBM" gl_FUNC_ISNANL_WORKS LIBS="$save_LIBS" case "$gl_cv_func_isnanl_works" in *yes) gl_func_isnanl=yes ;; *) gl_func_isnanl=no; ISNANL_LIBM= ;; esac else gl_func_isnanl=no fi if test $gl_func_isnanl != yes; then HAVE_ISNANL=0 gl_BUILD_ISNANL fi AC_SUBST([ISNANL_LIBM]) ]) AC_DEFUN([gl_FUNC_ISNANL_NO_LIBM], [ gl_HAVE_ISNANL_NO_LIBM gl_func_isnanl_no_libm=$gl_cv_func_isnanl_no_libm if test $gl_func_isnanl_no_libm = yes; then gl_FUNC_ISNANL_WORKS case "$gl_cv_func_isnanl_works" in *yes) ;; *) gl_func_isnanl_no_libm=no ;; esac fi if test $gl_func_isnanl_no_libm = yes; then AC_DEFINE([HAVE_ISNANL_IN_LIBC], [1], [Define if the isnan(long double) function is available in libc.]) else gl_BUILD_ISNANL fi ]) dnl Pull in replacement isnanl definition. It does not need -lm. AC_DEFUN([gl_BUILD_ISNANL], [ AC_LIBOBJ([isnanl]) gl_LONG_DOUBLE_EXPONENT_LOCATION ]) dnl Test whether isnanl() can be used without libm. AC_DEFUN([gl_HAVE_ISNANL_NO_LIBM], [ AC_CACHE_CHECK([whether isnan(long double) can be used without linking with libm], [gl_cv_func_isnanl_no_libm], [ AC_TRY_LINK([#include #if __GNUC__ >= 4 # undef isnanl # define isnanl(x) __builtin_isnanl ((long double)(x)) #elif defined isnan # undef isnanl # define isnanl(x) isnan ((long double)(x)) #endif long double x;], [return isnanl (x);], [gl_cv_func_isnanl_no_libm=yes], [gl_cv_func_isnanl_no_libm=no]) ]) ]) dnl Test whether isnanl() can be used with libm. AC_DEFUN([gl_HAVE_ISNANL_IN_LIBM], [ AC_CACHE_CHECK([whether isnan(long double) can be used with libm], [gl_cv_func_isnanl_in_libm], [ save_LIBS="$LIBS" LIBS="$LIBS -lm" AC_TRY_LINK([#include #if __GNUC__ >= 4 # undef isnanl # define isnanl(x) __builtin_isnanl ((long double)(x)) #elif defined isnan # undef isnanl # define isnanl(x) isnan ((long double)(x)) #endif long double x;], [return isnanl (x);], [gl_cv_func_isnanl_in_libm=yes], [gl_cv_func_isnanl_in_libm=no]) LIBS="$save_LIBS" ]) ]) dnl Test whether isnanl() recognizes all numbers which are neither finite nor dnl infinite. This test fails e.g. on NetBSD/i386 and on glibc/ia64. dnl Also, the GCC >= 4.0 built-in __builtin_isnanl does not pass the tests dnl - for pseudo-denormals on i686 and x86_64, dnl - for pseudo-zeroes, unnormalized numbers, and pseudo-denormals on ia64. AC_DEFUN([gl_FUNC_ISNANL_WORKS], [ AC_REQUIRE([AC_PROG_CC]) AC_REQUIRE([gl_BIGENDIAN]) AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles AC_CACHE_CHECK([whether isnanl works], [gl_cv_func_isnanl_works], [ AC_TRY_RUN([ #include #include #include #if __GNUC__ >= 4 # undef isnanl # define isnanl(x) __builtin_isnanl ((long double)(x)) #elif defined isnan # undef isnanl # define isnanl(x) isnan ((long double)(x)) #endif #define NWORDS \ ((sizeof (long double) + sizeof (unsigned int) - 1) / sizeof (unsigned int)) typedef union { unsigned int word[NWORDS]; long double value; } memory_long_double; /* On Irix 6.5, gcc 3.4.3 can't compute compile-time NaN, and needs the runtime type conversion. */ #ifdef __sgi static long double NaNl () { double zero = 0.0; return zero / zero; } #else # define NaNl() (0.0L / 0.0L) #endif int main () { memory_long_double m; unsigned int i; if (!isnanl (NaNl ())) return 1; /* The isnanl function should be immune against changes in the sign bit and in the mantissa bits. The xor operation twiddles a bit that can only be a sign bit or a mantissa bit (since the exponent never extends to bit 31). */ m.value = NaNl (); m.word[NWORDS / 2] ^= (unsigned int) 1 << (sizeof (unsigned int) * CHAR_BIT - 1); for (i = 0; i < NWORDS; i++) m.word[i] |= 1; if (!isnanl (m.value)) return 1; #if ((defined __ia64 && LDBL_MANT_DIG == 64) || (defined __x86_64__ || defined __amd64__) || (defined __i386 || defined __i386__ || defined _I386 || defined _M_IX86 || defined _X86_)) /* Representation of an 80-bit 'long double' as an initializer for a sequence of 'unsigned int' words. */ # ifdef WORDS_BIGENDIAN # define LDBL80_WORDS(exponent,manthi,mantlo) \ { ((unsigned int) (exponent) << 16) | ((unsigned int) (manthi) >> 16), \ ((unsigned int) (manthi) << 16) | (unsigned int) (mantlo) >> 16), \ (unsigned int) (mantlo) << 16 \ } # else # define LDBL80_WORDS(exponent,manthi,mantlo) \ { mantlo, manthi, exponent } # endif { /* Quiet NaN. */ static memory_long_double x = { LDBL80_WORDS (0xFFFF, 0xC3333333, 0x00000000) }; if (!isnanl (x.value)) return 1; } { /* Signalling NaN. */ static memory_long_double x = { LDBL80_WORDS (0xFFFF, 0x83333333, 0x00000000) }; if (!isnanl (x.value)) return 1; } /* The isnanl function should recognize Pseudo-NaNs, Pseudo-Infinities, Pseudo-Zeroes, Unnormalized Numbers, and Pseudo-Denormals, as defined in Intel IA-64 Architecture Software Developer's Manual, Volume 1: Application Architecture. Table 5-2 "Floating-Point Register Encodings" Figure 5-6 "Memory to Floating-Point Register Data Translation" */ { /* Pseudo-NaN. */ static memory_long_double x = { LDBL80_WORDS (0xFFFF, 0x40000001, 0x00000000) }; if (!isnanl (x.value)) return 1; } { /* Pseudo-Infinity. */ static memory_long_double x = { LDBL80_WORDS (0xFFFF, 0x00000000, 0x00000000) }; if (!isnanl (x.value)) return 1; } { /* Pseudo-Zero. */ static memory_long_double x = { LDBL80_WORDS (0x4004, 0x00000000, 0x00000000) }; if (!isnanl (x.value)) return 1; } { /* Unnormalized number. */ static memory_long_double x = { LDBL80_WORDS (0x4000, 0x63333333, 0x00000000) }; if (!isnanl (x.value)) return 1; } { /* Pseudo-Denormal. */ static memory_long_double x = { LDBL80_WORDS (0x0000, 0x83333333, 0x00000000) }; if (!isnanl (x.value)) return 1; } #endif return 0; }], [gl_cv_func_isnanl_works=yes], [gl_cv_func_isnanl_works=no], [case "$host_cpu" in # Guess no on ia64, x86_64, i386. ia64 | x86_64 | i*86) gl_cv_func_isnanl_works="guessing no";; *) case "$host_os" in netbsd*) gl_cv_func_isnanl_works="guessing no";; *) gl_cv_func_isnanl_works="guessing yes";; esac ;; esac ]) ]) ]) libprelude-1.0.0/libmissing/m4/open.m40000664000076400007640000000415611341220436014457 00000000000000# open.m4 serial 8 dnl Copyright (C) 2007-2010 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. AC_DEFUN([gl_FUNC_OPEN], [ AC_REQUIRE([AC_CANONICAL_HOST]) case "$host_os" in mingw* | pw*) gl_REPLACE_OPEN ;; *) dnl open("foo/") should not create a file when the file name has a dnl trailing slash. FreeBSD only has the problem on symlinks. AC_CHECK_FUNCS_ONCE([lstat]) AC_CACHE_CHECK([whether open recognizes a trailing slash], [gl_cv_func_open_slash], [# Assume that if we have lstat, we can also check symlinks. if test $ac_cv_func_lstat = yes; then touch conftest.tmp ln -s conftest.tmp conftest.lnk fi AC_TRY_RUN([ #include #if HAVE_UNISTD_H # include #endif int main () { #if HAVE_LSTAT if (open ("conftest.lnk/", O_RDONLY) != -1) return 2; #endif return open ("conftest.sl/", O_CREAT, 0600) >= 0; }], [gl_cv_func_open_slash=yes], [gl_cv_func_open_slash=no], [ changequote(,)dnl case "$host_os" in freebsd*) gl_cv_func_open_slash="guessing no" ;; solaris2.[0-9]*) gl_cv_func_open_slash="guessing no" ;; hpux*) gl_cv_func_open_slash="guessing no" ;; *) gl_cv_func_open_slash="guessing yes" ;; esac changequote([,])dnl ]) rm -f conftest.sl conftest.tmp conftest.lnk ]) case "$gl_cv_func_open_slash" in *no) AC_DEFINE([OPEN_TRAILING_SLASH_BUG], [1], [Define to 1 if open() fails to recognize a trailing slash.]) gl_REPLACE_OPEN ;; esac ;; esac ]) AC_DEFUN([gl_REPLACE_OPEN], [ AC_REQUIRE([gl_FCNTL_H_DEFAULTS]) REPLACE_OPEN=1 AC_LIBOBJ([open]) gl_PREREQ_OPEN ]) # Prerequisites of lib/open.c. AC_DEFUN([gl_PREREQ_OPEN], [ AC_REQUIRE([AC_C_INLINE]) AC_REQUIRE([gl_PROMOTED_TYPE_MODE_T]) : ]) libprelude-1.0.0/libmissing/m4/sys_utsname_h.m40000664000076400007640000000311611341220437016373 00000000000000# sys_utsname_h.m4 serial 4 dnl Copyright (C) 2009, 2010 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. dnl Written by Bruno Haible. AC_DEFUN([gl_SYS_UTSNAME_H], [ dnl Use AC_REQUIRE here, so that the default behavior below is expanded dnl once only, before all statements that occur in other macros. AC_REQUIRE([gl_SYS_UTSNAME_H_DEFAULTS]) gl_CHECK_NEXT_HEADERS([sys/utsname.h]) AC_CHECK_HEADERS_ONCE([sys/utsname.h]) if test $ac_cv_header_sys_utsname_h != yes; then HAVE_SYS_UTSNAME_H=0 HAVE_STRUCT_UTSNAME=0 else HAVE_SYS_UTSNAME_H=1 AC_CHECK_TYPES([struct utsname], [], [HAVE_STRUCT_UTSNAME=0], [[ #include ]]) fi AC_SUBST([HAVE_SYS_UTSNAME_H]) dnl Check for declarations of anything we want to poison if the dnl corresponding gnulib module is not in use. gl_WARN_ON_USE_PREPARE([[#include ]], [uname]) ]) AC_DEFUN([gl_SYS_UTSNAME_MODULE_INDICATOR], [ dnl Use AC_REQUIRE here, so that the default settings are expanded once only. AC_REQUIRE([gl_SYS_UTSNAME_H_DEFAULTS]) GNULIB_[]m4_translit([$1],[abcdefghijklmnopqrstuvwxyz./-],[ABCDEFGHIJKLMNOPQRSTUVWXYZ___])=1 ]) AC_DEFUN([gl_SYS_UTSNAME_H_DEFAULTS], [ GNULIB_UNAME=0; AC_SUBST([GNULIB_UNAME]) dnl Assume proper GNU behavior unless another module says otherwise. HAVE_UNAME=1; AC_SUBST([HAVE_UNAME]) HAVE_STRUCT_UTSNAME=1; AC_SUBST([HAVE_STRUCT_UTSNAME]) ]) libprelude-1.0.0/libmissing/m4/netdb_h.m40000664000076400007640000000300411341220436015110 00000000000000# netdb_h.m4 serial 6 dnl Copyright (C) 2008, 2009, 2010 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. AC_DEFUN([gl_HEADER_NETDB], [ AC_REQUIRE([gl_NETDB_H_DEFAULTS]) AC_CHECK_HEADERS_ONCE([netdb.h]) gl_CHECK_NEXT_HEADERS([netdb.h]) if test $ac_cv_header_netdb_h = yes; then AC_COMPILE_IFELSE( [AC_LANG_PROGRAM([[ #include struct addrinfo a; int b = EAI_OVERFLOW; int c = AI_NUMERICSERV; ]])], [NETDB_H=''], [NETDB_H='netdb.h']) HAVE_NETDB_H=1 else NETDB_H='netdb.h' HAVE_NETDB_H=0 fi AC_SUBST([HAVE_NETDB_H]) AC_SUBST([NETDB_H]) ]) AC_DEFUN([gl_NETDB_MODULE_INDICATOR], [ dnl Use AC_REQUIRE here, so that the default settings are expanded once only. AC_REQUIRE([gl_NETDB_H_DEFAULTS]) GNULIB_[]m4_translit([$1],[abcdefghijklmnopqrstuvwxyz./-],[ABCDEFGHIJKLMNOPQRSTUVWXYZ___])=1 ]) AC_DEFUN([gl_NETDB_H_DEFAULTS], [ GNULIB_GETADDRINFO=0; AC_SUBST([GNULIB_GETADDRINFO]) dnl Assume proper GNU behavior unless another module says otherwise. HAVE_STRUCT_ADDRINFO=1; AC_SUBST([HAVE_STRUCT_ADDRINFO]) HAVE_DECL_FREEADDRINFO=1; AC_SUBST([HAVE_DECL_FREEADDRINFO]) HAVE_DECL_GAI_STRERROR=1; AC_SUBST([HAVE_DECL_GAI_STRERROR]) HAVE_DECL_GETADDRINFO=1; AC_SUBST([HAVE_DECL_GETADDRINFO]) HAVE_DECL_GETNAMEINFO=1; AC_SUBST([HAVE_DECL_GETNAMEINFO]) ]) libprelude-1.0.0/libmissing/m4/mbstate_t.m40000664000076400007640000000220611341220436015472 00000000000000# mbstate_t.m4 serial 12 dnl Copyright (C) 2000-2002, 2008-2010 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. # From Paul Eggert. # BeOS 5 has but does not define mbstate_t, # so you can't declare an object of that type. # Check for this incompatibility with Standard C. # AC_TYPE_MBSTATE_T # ----------------- AC_DEFUN([AC_TYPE_MBSTATE_T], [ AC_REQUIRE([AC_USE_SYSTEM_EXTENSIONS]) dnl for HP-UX 11.11 AC_CACHE_CHECK([for mbstate_t], [ac_cv_type_mbstate_t], [AC_COMPILE_IFELSE( [AC_LANG_PROGRAM( [AC_INCLUDES_DEFAULT[ # include ]], [[mbstate_t x; return sizeof x;]])], [ac_cv_type_mbstate_t=yes], [ac_cv_type_mbstate_t=no])]) if test $ac_cv_type_mbstate_t = yes; then AC_DEFINE([HAVE_MBSTATE_T], [1], [Define to 1 if declares mbstate_t.]) else AC_DEFINE([mbstate_t], [int], [Define to a type if does not define.]) fi ]) libprelude-1.0.0/libmissing/m4/inet_pton.m40000664000076400007640000000224411341220435015510 00000000000000# inet_pton.m4 serial 9 dnl Copyright (C) 2006, 2008, 2009, 2010 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. AC_DEFUN([gl_INET_PTON], [ dnl Persuade Solaris to declare inet_pton. AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS]) gl_REPLACE_ARPA_INET_H dnl Most platforms that provide inet_pton define it in libc. dnl Solaris 8..10 provide inet_pton in libnsl instead. gl_save_LIBS=$LIBS AC_SEARCH_LIBS([inet_pton], [nsl], [], [AC_REPLACE_FUNCS([inet_pton])]) LIBS=$gl_save_LIBS INET_PTON_LIB= if test "$ac_cv_search_inet_pton" != "no" && test "$ac_cv_search_inet_pton" != "none required"; then INET_PTON_LIB="$ac_cv_search_inet_pton" fi AC_SUBST([INET_PTON_LIB]) gl_PREREQ_INET_PTON ]) # Prerequisites of lib/inet_pton.c. AC_DEFUN([gl_PREREQ_INET_PTON], [ AC_CHECK_DECLS([inet_pton],,,[#include ]) if test $ac_cv_have_decl_inet_pton = no; then HAVE_DECL_INET_PTON=0 fi AC_REQUIRE([gl_SOCKET_FAMILIES]) AC_REQUIRE([AC_C_RESTRICT]) ]) libprelude-1.0.0/libmissing/m4/gnulib-comp.m40000664000076400007640000005340211341220461015726 00000000000000# DO NOT EDIT! GENERATED AUTOMATICALLY! # Copyright (C) 2002-2010 Free Software Foundation, Inc. # # This file is free software, distributed under the terms of the GNU # General Public License. As a special exception to the GNU General # Public License, this file may be distributed as part of a program # that contains a configuration script generated by Autoconf, under # the same distribution terms as the rest of that program. # # Generated by gnulib-tool. # # This file represents the compiled summary of the specification in # gnulib-cache.m4. It lists the computed macro invocations that need # to be invoked from configure.ac. # In projects using CVS, this file can be treated like other built files. # This macro should be invoked from ./configure.in, in the section # "Checks for programs", right after AC_PROG_CC, and certainly before # any checks for libraries, header files, types and library functions. AC_DEFUN([gl_EARLY], [ m4_pattern_forbid([^gl_[A-Z]])dnl the gnulib macro namespace m4_pattern_allow([^gl_ES$])dnl a valid locale name m4_pattern_allow([^gl_LIBOBJS$])dnl a variable m4_pattern_allow([^gl_LTLIBOBJS$])dnl a variable AC_REQUIRE([AC_PROG_RANLIB]) AC_REQUIRE([AM_PROG_CC_C_O]) AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS]) AC_REQUIRE([gl_FP_IEEE]) AC_REQUIRE([AC_FUNC_FSEEKO]) gl_THREADLIB_EARLY ]) # This macro should be invoked from ./configure.in, in the section # "Check for header files, types and library functions". AC_DEFUN([gl_INIT], [ AM_CONDITIONAL([GL_COND_LIBTOOL], [true]) gl_cond_libtool=true m4_pushdef([AC_LIBOBJ], m4_defn([gl_LIBOBJ])) m4_pushdef([AC_REPLACE_FUNCS], m4_defn([gl_REPLACE_FUNCS])) m4_pushdef([AC_LIBSOURCES], m4_defn([gl_LIBSOURCES])) m4_pushdef([gl_LIBSOURCES_LIST], []) m4_pushdef([gl_LIBSOURCES_DIR], []) gl_COMMON gl_source_base='libmissing' AC_REQUIRE([gl_HEADER_SYS_SOCKET]) if test "$ac_cv_header_winsock2_h" = yes; then AC_LIBOBJ([accept]) fi gl_SYS_SOCKET_MODULE_INDICATOR([accept]) changequote(,)dnl LTALLOCA=`echo "$ALLOCA" | sed -e 's/\.[^.]* /.lo /g;s/\.[^.]*$/.lo/'` changequote([, ])dnl AC_SUBST([LTALLOCA]) gl_FUNC_ALLOCA gl_HEADER_ARPA_INET AC_PROG_MKDIR_P AC_REQUIRE([gl_HEADER_SYS_SOCKET]) if test "$ac_cv_header_winsock2_h" = yes; then AC_LIBOBJ([bind]) fi gl_SYS_SOCKET_MODULE_INDICATOR([bind]) gl_FUNC_BTOWC gl_WCHAR_MODULE_INDICATOR([btowc]) gl_FUNC_CLOSE gl_UNISTD_MODULE_INDICATOR([close]) gl_COND AC_REQUIRE([gl_HEADER_SYS_SOCKET]) if test "$ac_cv_header_winsock2_h" = yes; then AC_LIBOBJ([connect]) fi gl_SYS_SOCKET_MODULE_INDICATOR([connect]) gl_FUNC_DUP2 gl_UNISTD_MODULE_INDICATOR([dup2]) gl_HEADER_ERRNO_H gl_FUNC_FCLOSE gl_STDIO_MODULE_INDICATOR([fclose]) gl_FLOAT_H gl_FUNC_FOPEN gl_STDIO_MODULE_INDICATOR([fopen]) gl_FUNC_FREXP_NO_LIBM gl_MATH_MODULE_INDICATOR([frexp]) gl_FUNC_FREXPL_NO_LIBM gl_MATH_MODULE_INDICATOR([frexpl]) gl_FUNC_FSEEKO gl_STDIO_MODULE_INDICATOR([fseeko]) gl_FUNC_FTW gl_GETADDRINFO gl_NETDB_MODULE_INDICATOR([getaddrinfo]) gl_FUNC_GETDELIM gl_STDIO_MODULE_INDICATOR([getdelim]) gl_FUNC_GETHOSTNAME gl_UNISTD_MODULE_INDICATOR([gethostname]) gl_FUNC_GETLINE gl_STDIO_MODULE_INDICATOR([getline]) gl_FUNC_GETPASS AC_REQUIRE([gl_HEADER_SYS_SOCKET]) if test "$ac_cv_header_winsock2_h" = yes; then AC_LIBOBJ([getsockname]) fi gl_SYS_SOCKET_MODULE_INDICATOR([getsockname]) AC_SUBST([LIBINTL]) AC_SUBST([LTLIBINTL]) gl_FUNC_GETTIMEOFDAY gl_SYS_TIME_MODULE_INDICATOR([gettimeofday]) gl_HOSTENT gl_INET_NTOP gl_ARPA_INET_MODULE_INDICATOR([inet_ntop]) gl_INET_PTON gl_ARPA_INET_MODULE_INDICATOR([inet_pton]) AC_REQUIRE([gl_HEADER_SYS_SOCKET]) if test "$ac_cv_header_winsock2_h" = yes; then dnl Even if the 'socket' module is not used here, another part of the dnl application may use it and pass file descriptors that refer to dnl sockets to the ioctl() function. So enable the support for sockets. AC_LIBOBJ([ioctl]) gl_REPLACE_SYS_IOCTL_H fi gl_SYS_IOCTL_MODULE_INDICATOR([ioctl]) gl_MODULE_INDICATOR([ioctl]) gl_FUNC_ISNAND_NO_LIBM gl_FUNC_ISNANF_NO_LIBM gl_FUNC_ISNANL_NO_LIBM gl_LANGINFO_H AC_REQUIRE([gl_HEADER_SYS_SOCKET]) if test "$ac_cv_header_winsock2_h" = yes; then AC_LIBOBJ([listen]) fi gl_SYS_SOCKET_MODULE_INDICATOR([listen]) gl_LOCALCHARSET LOCALCHARSET_TESTS_ENVIRONMENT="CHARSETALIASDIR=\"\$(top_builddir)/$gl_source_base\"" AC_SUBST([LOCALCHARSET_TESTS_ENVIRONMENT]) gl_LOCK gl_FUNC_LSEEK gl_UNISTD_MODULE_INDICATOR([lseek]) AC_FUNC_MALLOC AC_DEFINE([GNULIB_MALLOC_GNU], 1, [Define to indicate the 'malloc' module.]) gl_FUNC_MALLOC_POSIX gl_STDLIB_MODULE_INDICATOR([malloc-posix]) gl_MATH_H gl_FUNC_MBRTOWC gl_WCHAR_MODULE_INDICATOR([mbrtowc]) gl_FUNC_MBSINIT gl_WCHAR_MODULE_INDICATOR([mbsinit]) gl_FUNC_MEMCHR gl_STRING_MODULE_INDICATOR([memchr]) gl_FUNC_MEMMEM gl_FUNC_MEMMEM_SIMPLE gl_STRING_MODULE_INDICATOR([memmem]) gl_MINMAX gl_FUNC_MKTIME gl_MULTIARCH gl_HEADER_NETDB gl_HEADER_NETINET_IN AC_PROG_MKDIR_P gl_FUNC_NL_LANGINFO gl_LANGINFO_MODULE_INDICATOR([nl_langinfo]) gl_PATHMAX gl_FUNC_PERROR gl_STRING_MODULE_INDICATOR([perror]) gl_FUNC_POLL gl_FUNC_PRINTF_FREXP gl_FUNC_PRINTF_FREXPL m4_divert_text([INIT_PREPARE], [gl_printf_safe=yes]) gl_FUNC_REALLOC_POSIX gl_STDLIB_MODULE_INDICATOR([realloc-posix]) gl_REGEX gl_RELOCATABLE_LIBRARY gl_FUNC_SELECT gl_SYS_SELECT_MODULE_INDICATOR([select]) gl_SERVENT AC_REQUIRE([gl_HEADER_SYS_SOCKET]) if test "$ac_cv_header_winsock2_h" = yes; then AC_LIBOBJ([setsockopt]) fi gl_SYS_SOCKET_MODULE_INDICATOR([setsockopt]) gl_SIGNAL_H gl_SIGNBIT gl_MATH_MODULE_INDICATOR([signbit]) gl_SIGNALBLOCKING gl_SIGNAL_MODULE_INDICATOR([sigprocmask]) gl_SIZE_MAX gl_FUNC_SLEEP gl_UNISTD_MODULE_INDICATOR([sleep]) gl_FUNC_SNPRINTF gl_STDIO_MODULE_INDICATOR([snprintf]) gl_FUNC_SNPRINTF_POSIX AC_REQUIRE([gl_HEADER_SYS_SOCKET]) if test "$ac_cv_header_winsock2_h" = yes; then AC_LIBOBJ([socket]) fi # When this module is used, sockets may actually occur as file descriptors, # hence it is worth warning if the modules 'close' and 'ioctl' are not used. m4_ifdef([gl_UNISTD_H_DEFAULTS], [AC_REQUIRE([gl_UNISTD_H_DEFAULTS])]) m4_ifdef([gl_SYS_IOCTL_H_DEFAULTS], [AC_REQUIRE([gl_SYS_IOCTL_H_DEFAULTS])]) AC_REQUIRE([gl_PREREQ_SYS_H_WINSOCK2]) if test "$ac_cv_header_winsock2_h" = yes; then UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS=1 SYS_IOCTL_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS=1 fi gl_SYS_SOCKET_MODULE_INDICATOR([socket]) gl_SOCKETS gl_TYPE_SOCKLEN_T gt_TYPE_SSIZE_T gl_FUNC_STAT gl_SYS_STAT_MODULE_INDICATOR([stat]) AM_STDBOOL_H gl_STDDEF_H gl_STDINT_H gl_STDIO_H gl_STDLIB_H gl_STRCASE gl_FUNC_STRCASESTR gl_FUNC_STRCASESTR_SIMPLE gl_STRING_MODULE_INDICATOR([strcasestr]) gl_FUNC_STRDUP gl_STRING_MODULE_INDICATOR([strdup]) gl_FUNC_STRDUP_POSIX gl_STRING_MODULE_INDICATOR([strdup]) gl_FUNC_STRERROR gl_STRING_MODULE_INDICATOR([strerror]) gl_HEADER_STRING_H gl_HEADER_STRINGS_H gl_FUNC_STRNDUP gl_STRING_MODULE_INDICATOR([strndup]) gl_FUNC_STRNLEN gl_STRING_MODULE_INDICATOR([strnlen]) gl_FUNC_STRPTIME gl_FUNC_STRSEP gl_STRING_MODULE_INDICATOR([strsep]) gl_SYS_IOCTL_H AC_PROG_MKDIR_P gl_HEADER_SYS_SELECT AC_PROG_MKDIR_P gl_HEADER_SYS_SOCKET AC_PROG_MKDIR_P gl_HEADER_SYS_STAT_H AC_PROG_MKDIR_P gl_HEADER_SYS_TIME_H AC_PROG_MKDIR_P gl_SYS_UTSNAME_H AC_PROG_MKDIR_P gl_THREAD gl_THREADLIB gl_HEADER_TIME_H gl_TIME_R gl_FUNC_TIMEGM gl_TLS gl_FUNC_UNAME gl_SYS_UTSNAME_MODULE_INDICATOR([uname]) gl_UNISTD_H gl_FUNC_VASNPRINTF gl_FUNC_VSNPRINTF gl_STDIO_MODULE_INDICATOR([vsnprintf]) gl_FUNC_VSNPRINTF_POSIX gl_WCHAR_H gl_FUNC_WCRTOMB gl_WCHAR_MODULE_INDICATOR([wcrtomb]) gl_WCTYPE_H gl_FUNC_WRITE gl_UNISTD_MODULE_INDICATOR([write]) gl_XSIZE m4_ifval(gl_LIBSOURCES_LIST, [ m4_syscmd([test ! -d ]m4_defn([gl_LIBSOURCES_DIR])[ || for gl_file in ]gl_LIBSOURCES_LIST[ ; do if test ! -r ]m4_defn([gl_LIBSOURCES_DIR])[/$gl_file ; then echo "missing file ]m4_defn([gl_LIBSOURCES_DIR])[/$gl_file" >&2 exit 1 fi done])dnl m4_if(m4_sysval, [0], [], [AC_FATAL([expected source file, required through AC_LIBSOURCES, not found])]) ]) m4_popdef([gl_LIBSOURCES_DIR]) m4_popdef([gl_LIBSOURCES_LIST]) m4_popdef([AC_LIBSOURCES]) m4_popdef([AC_REPLACE_FUNCS]) m4_popdef([AC_LIBOBJ]) AC_CONFIG_COMMANDS_PRE([ gl_libobjs= gl_ltlibobjs= if test -n "$gl_LIBOBJS"; then # Remove the extension. sed_drop_objext='s/\.o$//;s/\.obj$//' for i in `for i in $gl_LIBOBJS; do echo "$i"; done | sed -e "$sed_drop_objext" | sort | uniq`; do gl_libobjs="$gl_libobjs $i.$ac_objext" gl_ltlibobjs="$gl_ltlibobjs $i.lo" done fi AC_SUBST([gl_LIBOBJS], [$gl_libobjs]) AC_SUBST([gl_LTLIBOBJS], [$gl_ltlibobjs]) ]) gltests_libdeps= gltests_ltlibdeps= m4_pushdef([AC_LIBOBJ], m4_defn([gltests_LIBOBJ])) m4_pushdef([AC_REPLACE_FUNCS], m4_defn([gltests_REPLACE_FUNCS])) m4_pushdef([AC_LIBSOURCES], m4_defn([gltests_LIBSOURCES])) m4_pushdef([gltests_LIBSOURCES_LIST], []) m4_pushdef([gltests_LIBSOURCES_DIR], []) gl_COMMON gl_source_base='libmissing/tests' gt_LOCALE_FR gt_LOCALE_FR_UTF8 gt_LOCALE_FR gt_LOCALE_TR_UTF8 gl_FCNTL_H gl_FUNC_UNGETC_WORKS gl_FUNC_GETPAGESIZE gl_UNISTD_MODULE_INDICATOR([getpagesize]) AC_REQUIRE([AC_C_INLINE]) AC_C_BIGENDIAN AC_C_BIGENDIAN gl_DOUBLE_EXPONENT_LOCATION gl_FLOAT_EXPONENT_LOCATION gl_LONG_DOUBLE_EXPONENT_LOCATION gl_FUNC_LSTAT gl_SYS_STAT_MODULE_INDICATOR([lstat]) gt_LOCALE_FR gt_LOCALE_FR_UTF8 gt_LOCALE_JA gt_LOCALE_ZH_CN gt_LOCALE_FR_UTF8 gl_FUNC_MMAP_ANON AC_CHECK_HEADERS_ONCE([sys/mman.h]) AC_CHECK_FUNCS_ONCE([mprotect]) AC_CHECK_DECLS_ONCE([alarm]) gt_LOCALE_FR gt_LOCALE_FR_UTF8 gl_FUNC_OPEN gl_MODULE_INDICATOR([open]) gl_FCNTL_MODULE_INDICATOR([open]) AC_CHECK_HEADERS_ONCE([unistd.h sys/wait.h]) AC_CHECK_HEADERS_ONCE([unistd.h sys/wait.h]) AC_REQUIRE([gl_FLOAT_EXPONENT_LOCATION]) AC_REQUIRE([gl_DOUBLE_EXPONENT_LOCATION]) AC_REQUIRE([gl_LONG_DOUBLE_EXPONENT_LOCATION]) AC_CHECK_DECLS_ONCE([alarm]) AC_DEFINE([CHECK_SNPRINTF_POSIX], 1, [Define to 1 for strict checking in test-snprintf.c.]) gt_TYPE_WCHAR_T gt_TYPE_WINT_T AC_CHECK_DECLS_ONCE([alarm]) gl_FUNC_SYMLINK gl_UNISTD_MODULE_INDICATOR([symlink]) AC_CHECK_FUNCS_ONCE([shutdown]) AC_DEFINE([CHECK_VSNPRINTF_POSIX], 1, [Define to 1 for strict checking in test-vsnprintf.c.]) gt_LOCALE_FR gt_LOCALE_FR_UTF8 gt_LOCALE_JA gt_LOCALE_ZH_CN gl_FUNC_WCTOB gl_WCHAR_MODULE_INDICATOR([wctob]) gl_YIELD m4_ifval(gltests_LIBSOURCES_LIST, [ m4_syscmd([test ! -d ]m4_defn([gltests_LIBSOURCES_DIR])[ || for gl_file in ]gltests_LIBSOURCES_LIST[ ; do if test ! -r ]m4_defn([gltests_LIBSOURCES_DIR])[/$gl_file ; then echo "missing file ]m4_defn([gltests_LIBSOURCES_DIR])[/$gl_file" >&2 exit 1 fi done])dnl m4_if(m4_sysval, [0], [], [AC_FATAL([expected source file, required through AC_LIBSOURCES, not found])]) ]) m4_popdef([gltests_LIBSOURCES_DIR]) m4_popdef([gltests_LIBSOURCES_LIST]) m4_popdef([AC_LIBSOURCES]) m4_popdef([AC_REPLACE_FUNCS]) m4_popdef([AC_LIBOBJ]) AC_CONFIG_COMMANDS_PRE([ gltests_libobjs= gltests_ltlibobjs= if test -n "$gltests_LIBOBJS"; then # Remove the extension. sed_drop_objext='s/\.o$//;s/\.obj$//' for i in `for i in $gltests_LIBOBJS; do echo "$i"; done | sed -e "$sed_drop_objext" | sort | uniq`; do gltests_libobjs="$gltests_libobjs $i.$ac_objext" gltests_ltlibobjs="$gltests_ltlibobjs $i.lo" done fi AC_SUBST([gltests_LIBOBJS], [$gltests_libobjs]) AC_SUBST([gltests_LTLIBOBJS], [$gltests_ltlibobjs]) ]) LIBTESTS_LIBDEPS="$gltests_libdeps" AC_SUBST([LIBTESTS_LIBDEPS]) ]) # Like AC_LIBOBJ, except that the module name goes # into gl_LIBOBJS instead of into LIBOBJS. AC_DEFUN([gl_LIBOBJ], [ AS_LITERAL_IF([$1], [gl_LIBSOURCES([$1.c])])dnl gl_LIBOBJS="$gl_LIBOBJS $1.$ac_objext" ]) # Like AC_REPLACE_FUNCS, except that the module name goes # into gl_LIBOBJS instead of into LIBOBJS. AC_DEFUN([gl_REPLACE_FUNCS], [ m4_foreach_w([gl_NAME], [$1], [AC_LIBSOURCES(gl_NAME[.c])])dnl AC_CHECK_FUNCS([$1], , [gl_LIBOBJ($ac_func)]) ]) # Like AC_LIBSOURCES, except the directory where the source file is # expected is derived from the gnulib-tool parameterization, # and alloca is special cased (for the alloca-opt module). # We could also entirely rely on EXTRA_lib..._SOURCES. AC_DEFUN([gl_LIBSOURCES], [ m4_foreach([_gl_NAME], [$1], [ m4_if(_gl_NAME, [alloca.c], [], [ m4_define([gl_LIBSOURCES_DIR], [libmissing]) m4_append([gl_LIBSOURCES_LIST], _gl_NAME, [ ]) ]) ]) ]) # Like AC_LIBOBJ, except that the module name goes # into gltests_LIBOBJS instead of into LIBOBJS. AC_DEFUN([gltests_LIBOBJ], [ AS_LITERAL_IF([$1], [gltests_LIBSOURCES([$1.c])])dnl gltests_LIBOBJS="$gltests_LIBOBJS $1.$ac_objext" ]) # Like AC_REPLACE_FUNCS, except that the module name goes # into gltests_LIBOBJS instead of into LIBOBJS. AC_DEFUN([gltests_REPLACE_FUNCS], [ m4_foreach_w([gl_NAME], [$1], [AC_LIBSOURCES(gl_NAME[.c])])dnl AC_CHECK_FUNCS([$1], , [gltests_LIBOBJ($ac_func)]) ]) # Like AC_LIBSOURCES, except the directory where the source file is # expected is derived from the gnulib-tool parameterization, # and alloca is special cased (for the alloca-opt module). # We could also entirely rely on EXTRA_lib..._SOURCES. AC_DEFUN([gltests_LIBSOURCES], [ m4_foreach([_gl_NAME], [$1], [ m4_if(_gl_NAME, [alloca.c], [], [ m4_define([gltests_LIBSOURCES_DIR], [libmissing/tests]) m4_append([gltests_LIBSOURCES_LIST], _gl_NAME, [ ]) ]) ]) ]) # This macro records the list of files which have been installed by # gnulib-tool and may be removed by future gnulib-tool invocations. AC_DEFUN([gl_FILE_LIST], [ build-aux/arg-nonnull.h build-aux/config.rpath build-aux/warn-on-use.h doc/relocatable.texi lib/accept.c lib/alignof.h lib/alloca.c lib/alloca.in.h lib/arpa_inet.in.h lib/asnprintf.c lib/bind.c lib/btowc.c lib/c-ctype.c lib/c-ctype.h lib/close-hook.c lib/close-hook.h lib/close.c lib/config.charset lib/connect.c lib/dup2.c lib/errno.in.h lib/fclose.c lib/float+.h lib/float.in.h lib/fopen.c lib/fpucw.h lib/frexp.c lib/frexpl.c lib/fseeko.c lib/ftw.c lib/ftw_.h lib/gai_strerror.c lib/getaddrinfo.c lib/getdelim.c lib/gethostname.c lib/getline.c lib/getpass.c lib/getpass.h lib/getsockname.c lib/gettext.h lib/gettimeofday.c lib/glthread/cond.c lib/glthread/cond.h lib/glthread/lock.c lib/glthread/lock.h lib/glthread/thread.c lib/glthread/thread.h lib/glthread/threadlib.c lib/glthread/tls.c lib/glthread/tls.h lib/inet_ntop.c lib/inet_pton.c lib/intprops.h lib/ioctl.c lib/isnan.c lib/isnand-nolibm.h lib/isnand.c lib/isnanf-nolibm.h lib/isnanf.c lib/isnanl-nolibm.h lib/isnanl.c lib/langinfo.in.h lib/listen.c lib/localcharset.c lib/localcharset.h lib/lseek.c lib/malloc.c lib/math.in.h lib/mbrtowc.c lib/mbsinit.c lib/memchr.c lib/memchr.valgrind lib/memmem.c lib/minmax.h lib/mktime-internal.h lib/mktime.c lib/netdb.in.h lib/netinet_in.in.h lib/nl_langinfo.c lib/pathmax.h lib/perror.c lib/poll.c lib/poll.in.h lib/printf-args.c lib/printf-args.h lib/printf-frexp.c lib/printf-frexp.h lib/printf-frexpl.c lib/printf-frexpl.h lib/printf-parse.c lib/printf-parse.h lib/realloc.c lib/ref-add.sin lib/ref-del.sin lib/regcomp.c lib/regex.c lib/regex.h lib/regex_internal.c lib/regex_internal.h lib/regexec.c lib/relocatable.c lib/relocatable.h lib/select.c lib/setsockopt.c lib/signal.in.h lib/signbitd.c lib/signbitf.c lib/signbitl.c lib/sigprocmask.c lib/size_max.h lib/sleep.c lib/snprintf.c lib/socket.c lib/sockets.c lib/sockets.h lib/stat.c lib/stdbool.in.h lib/stddef.in.h lib/stdint.in.h lib/stdio-impl.h lib/stdio-write.c lib/stdio.in.h lib/stdlib.in.h lib/str-two-way.h lib/strcasecmp.c lib/strcasestr.c lib/strdup.c lib/streq.h lib/strerror.c lib/string.in.h lib/strings.in.h lib/strncasecmp.c lib/strndup.c lib/strnlen.c lib/strptime.c lib/strsep.c lib/sys_ioctl.in.h lib/sys_select.in.h lib/sys_socket.in.h lib/sys_stat.in.h lib/sys_time.in.h lib/sys_utsname.in.h lib/time.in.h lib/time_r.c lib/timegm.c lib/uname.c lib/unistd.in.h lib/vasnprintf.c lib/vasnprintf.h lib/verify.h lib/vsnprintf.c lib/w32sock.h lib/wchar.in.h lib/wcrtomb.c lib/wctype.in.h lib/write.c lib/xsize.h m4/00gnulib.m4 m4/alloca.m4 m4/arpa_inet_h.m4 m4/btowc.m4 m4/close.m4 m4/codeset.m4 m4/cond.m4 m4/dos.m4 m4/dup2.m4 m4/errno_h.m4 m4/exponentd.m4 m4/exponentf.m4 m4/exponentl.m4 m4/extensions.m4 m4/fclose.m4 m4/fcntl-o.m4 m4/fcntl_h.m4 m4/float_h.m4 m4/fopen.m4 m4/fpieee.m4 m4/frexp.m4 m4/frexpl.m4 m4/fseeko.m4 m4/ftw.m4 m4/getaddrinfo.m4 m4/getdelim.m4 m4/gethostname.m4 m4/getline.m4 m4/getpagesize.m4 m4/getpass.m4 m4/gettimeofday.m4 m4/glibc21.m4 m4/gnulib-common.m4 m4/hostent.m4 m4/include_next.m4 m4/inet_ntop.m4 m4/inet_pton.m4 m4/intmax_t.m4 m4/inttypes_h.m4 m4/isnand.m4 m4/isnanf.m4 m4/isnanl.m4 m4/langinfo_h.m4 m4/ldexpl.m4 m4/lib-ld.m4 m4/lib-link.m4 m4/lib-prefix.m4 m4/localcharset.m4 m4/locale-fr.m4 m4/locale-ja.m4 m4/locale-tr.m4 m4/locale-zh.m4 m4/lock.m4 m4/longlong.m4 m4/lseek.m4 m4/lstat.m4 m4/malloc.m4 m4/math_h.m4 m4/mbrtowc.m4 m4/mbsinit.m4 m4/mbstate_t.m4 m4/memchr.m4 m4/memmem.m4 m4/minmax.m4 m4/mktime.m4 m4/mmap-anon.m4 m4/mode_t.m4 m4/multiarch.m4 m4/netdb_h.m4 m4/netinet_in_h.m4 m4/nl_langinfo.m4 m4/nocrash.m4 m4/onceonly.m4 m4/open.m4 m4/pathmax.m4 m4/perror.m4 m4/poll.m4 m4/printf-frexp.m4 m4/printf-frexpl.m4 m4/printf.m4 m4/realloc.m4 m4/regex.m4 m4/relocatable-lib.m4 m4/select.m4 m4/servent.m4 m4/signal_h.m4 m4/signalblocking.m4 m4/signbit.m4 m4/size_max.m4 m4/sleep.m4 m4/snprintf-posix.m4 m4/snprintf.m4 m4/sockets.m4 m4/socklen.m4 m4/sockpfaf.m4 m4/ssize_t.m4 m4/stat.m4 m4/stdbool.m4 m4/stddef_h.m4 m4/stdint.m4 m4/stdint_h.m4 m4/stdio_h.m4 m4/stdlib_h.m4 m4/strcase.m4 m4/strcasestr.m4 m4/strdup.m4 m4/strerror.m4 m4/string_h.m4 m4/strings_h.m4 m4/strndup.m4 m4/strnlen.m4 m4/strptime.m4 m4/strsep.m4 m4/symlink.m4 m4/sys_ioctl_h.m4 m4/sys_select_h.m4 m4/sys_socket_h.m4 m4/sys_stat_h.m4 m4/sys_time_h.m4 m4/sys_utsname_h.m4 m4/thread.m4 m4/threadlib.m4 m4/time_h.m4 m4/time_r.m4 m4/timegm.m4 m4/tls.m4 m4/tm_gmtoff.m4 m4/uname.m4 m4/ungetc.m4 m4/unistd_h.m4 m4/vasnprintf.m4 m4/vsnprintf-posix.m4 m4/vsnprintf.m4 m4/warn-on-use.m4 m4/wchar.m4 m4/wchar_t.m4 m4/wcrtomb.m4 m4/wctob.m4 m4/wctype.m4 m4/wint_t.m4 m4/write.m4 m4/xsize.m4 m4/yield.m4 tests/macros.h tests/nan.h tests/signature.h tests/test-alignof.c tests/test-alloca-opt.c tests/test-arpa_inet.c tests/test-binary-io.c tests/test-binary-io.sh tests/test-btowc.c tests/test-btowc1.sh tests/test-btowc2.sh tests/test-c-ctype.c tests/test-c-strcase.sh tests/test-c-strcasecmp.c tests/test-c-strncasecmp.c tests/test-cond.c tests/test-dup2.c tests/test-errno.c tests/test-fcntl-h.c tests/test-fopen.c tests/test-fopen.h tests/test-frexp.c tests/test-frexpl.c tests/test-fseeko.c tests/test-fseeko.sh tests/test-fseeko2.sh tests/test-getaddrinfo.c tests/test-getdelim.c tests/test-gethostname.c tests/test-getline.c tests/test-gettimeofday.c tests/test-inet_ntop.c tests/test-inet_pton.c tests/test-isnand-nolibm.c tests/test-isnand.h tests/test-isnanf-nolibm.c tests/test-isnanf.h tests/test-isnanl-nolibm.c tests/test-isnanl.h tests/test-langinfo.c tests/test-lock.c tests/test-lseek.c tests/test-lseek.sh tests/test-lstat.c tests/test-lstat.h tests/test-math.c tests/test-mbrtowc.c tests/test-mbrtowc1.sh tests/test-mbrtowc2.sh tests/test-mbrtowc3.sh tests/test-mbrtowc4.sh tests/test-mbsinit.c tests/test-mbsinit.sh tests/test-memchr.c tests/test-memmem.c tests/test-netdb.c tests/test-netinet_in.c tests/test-nl_langinfo.c tests/test-nl_langinfo.sh tests/test-open.c tests/test-open.h tests/test-perror.c tests/test-perror.sh tests/test-poll.c tests/test-printf-frexp.c tests/test-printf-frexpl.c tests/test-select-fd.c tests/test-select-in.sh tests/test-select-out.sh tests/test-select-stdin.c tests/test-select.c tests/test-signal.c tests/test-signbit.c tests/test-sleep.c tests/test-snprintf-posix.c tests/test-snprintf-posix.h tests/test-snprintf.c tests/test-sockets.c tests/test-stat.c tests/test-stat.h tests/test-stdbool.c tests/test-stddef.c tests/test-stdint.c tests/test-stdio.c tests/test-stdlib.c tests/test-strcasestr.c tests/test-strerror.c tests/test-string.c tests/test-strings.c tests/test-symlink.c tests/test-symlink.h tests/test-sys_ioctl.c tests/test-sys_select.c tests/test-sys_socket.c tests/test-sys_stat.c tests/test-sys_time.c tests/test-sys_utsname.c tests/test-time.c tests/test-tls.c tests/test-uname.c tests/test-unistd.c tests/test-vasnprintf.c tests/test-vsnprintf-posix.c tests/test-vsnprintf.c tests/test-wchar.c tests/test-wcrtomb.c tests/test-wcrtomb.sh tests/test-wctype.c tests/zerosize-ptr.h tests=lib/binary-io.h tests=lib/c-strcase.h tests=lib/c-strcasecmp.c tests=lib/c-strncasecmp.c tests=lib/fcntl.in.h tests=lib/getpagesize.c tests=lib/glthread/yield.h tests=lib/ignore-value.h tests=lib/lstat.c tests=lib/open.c tests=lib/same-inode.h tests=lib/symlink.c tests=lib/wctob.c ]) libprelude-1.0.0/libmissing/m4/regex.m40000664000076400007640000002204111341220436014621 00000000000000# serial 55 # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, 2006, # 2007, 2008, 2009, 2010 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. dnl Initially derived from code in GNU grep. dnl Mostly written by Jim Meyering. AC_PREREQ([2.50]) AC_DEFUN([gl_REGEX], [ AC_CHECK_HEADERS_ONCE([locale.h]) AC_ARG_WITH([included-regex], [AS_HELP_STRING([--without-included-regex], [don't compile regex; this is the default on systems with recent-enough versions of the GNU C Library (use with caution on other systems).])]) case $with_included_regex in #( yes|no) ac_use_included_regex=$with_included_regex ;; '') # If the system regex support is good enough that it passes the # following run test, then default to *not* using the included regex.c. # If cross compiling, assume the test would fail and use the included # regex.c. AC_CACHE_CHECK([for working re_compile_pattern], [gl_cv_func_re_compile_pattern_working], [AC_RUN_IFELSE( [AC_LANG_PROGRAM( [AC_INCLUDES_DEFAULT[ #if HAVE_LOCALE_H #include #endif #include #include ]], [[static struct re_pattern_buffer regex; unsigned char folded_chars[UCHAR_MAX + 1]; int i; const char *s; struct re_registers regs; #if HAVE_LOCALE_H /* http://sourceware.org/ml/libc-hacker/2006-09/msg00008.html This test needs valgrind to catch the bug on Debian GNU/Linux 3.1 x86, but it might catch the bug better on other platforms and it shouldn't hurt to try the test here. */ if (setlocale (LC_ALL, "en_US.UTF-8")) { static char const pat[] = "insert into"; static char const data[] = "\xFF\0\x12\xA2\xAA\xC4\xB1,K\x12\xC4\xB1*\xACK"; re_set_syntax (RE_SYNTAX_GREP | RE_HAT_LISTS_NOT_NEWLINE | RE_ICASE); memset (®ex, 0, sizeof regex); s = re_compile_pattern (pat, sizeof pat - 1, ®ex); if (s) return 1; if (re_search (®ex, data, sizeof data - 1, 0, sizeof data - 1, ®s) != -1) return 1; if (! setlocale (LC_ALL, "C")) return 1; } #endif /* This test is from glibc bug 3957, reported by Andrew Mackey. */ re_set_syntax (RE_SYNTAX_EGREP | RE_HAT_LISTS_NOT_NEWLINE); memset (®ex, 0, sizeof regex); s = re_compile_pattern ("a[^x]b", 6, ®ex); if (s) return 1; /* This should fail, but succeeds for glibc-2.5. */ if (re_search (®ex, "a\nb", 3, 0, 3, ®s) != -1) return 1; /* This regular expression is from Spencer ere test number 75 in grep-2.3. */ re_set_syntax (RE_SYNTAX_POSIX_EGREP); memset (®ex, 0, sizeof regex); for (i = 0; i <= UCHAR_MAX; i++) folded_chars[i] = i; regex.translate = folded_chars; s = re_compile_pattern ("a[[:@:>@:]]b\n", 11, ®ex); /* This should fail with _Invalid character class name_ error. */ if (!s) return 1; /* Ensure that [b-a] is diagnosed as invalid. */ re_set_syntax (RE_SYNTAX_POSIX_EGREP); memset (®ex, 0, sizeof regex); s = re_compile_pattern ("a[b-a]", 6, ®ex); if (s == 0) return 1; /* This should succeed, but does not for glibc-2.1.3. */ memset (®ex, 0, sizeof regex); s = re_compile_pattern ("{1", 2, ®ex); if (s) return 1; /* The following example is derived from a problem report against gawk from Jorge Stolfi . */ memset (®ex, 0, sizeof regex); s = re_compile_pattern ("[an\371]*n", 7, ®ex); if (s) return 1; /* This should match, but does not for glibc-2.2.1. */ if (re_match (®ex, "an", 2, 0, ®s) != 2) return 1; memset (®ex, 0, sizeof regex); s = re_compile_pattern ("x", 1, ®ex); if (s) return 1; /* glibc-2.2.93 does not work with a negative RANGE argument. */ if (re_search (®ex, "wxy", 3, 2, -2, ®s) != 1) return 1; /* The version of regex.c in older versions of gnulib ignored RE_ICASE. Detect that problem too. */ re_set_syntax (RE_SYNTAX_EMACS | RE_ICASE); memset (®ex, 0, sizeof regex); s = re_compile_pattern ("x", 1, ®ex); if (s) return 1; if (re_search (®ex, "WXY", 3, 0, 3, ®s) < 0) return 1; /* Catch a bug reported by Vin Shelton in http://lists.gnu.org/archive/html/bug-coreutils/2007-06/msg00089.html */ re_set_syntax (RE_SYNTAX_POSIX_BASIC & ~RE_CONTEXT_INVALID_DUP & ~RE_NO_EMPTY_RANGES); memset (®ex, 0, sizeof regex); s = re_compile_pattern ("[[:alnum:]_-]\\\\+$", 16, ®ex); if (s) return 1; /* REG_STARTEND was added to glibc on 2004-01-15. Reject older versions. */ if (! REG_STARTEND) return 1; /* Reject hosts whose regoff_t values are too narrow. These include glibc 2.3.5 on hosts with 64-bit ptrdiff_t and 32-bit int. */ if (sizeof (regoff_t) < sizeof (ptrdiff_t) || sizeof (regoff_t) < sizeof (ssize_t)) return 1; return 0;]])], [gl_cv_func_re_compile_pattern_working=yes], [gl_cv_func_re_compile_pattern_working=no], dnl When crosscompiling, assume it is not working. [gl_cv_func_re_compile_pattern_working=no])]) case $gl_cv_func_re_compile_pattern_working in #( yes) ac_use_included_regex=no;; #( no) ac_use_included_regex=yes;; esac ;; *) AC_MSG_ERROR([Invalid value for --with-included-regex: $with_included_regex]) ;; esac if test $ac_use_included_regex = yes; then AC_DEFINE([_REGEX_LARGE_OFFSETS], [1], [Define if you want regoff_t to be at least as wide POSIX requires.]) AC_DEFINE([re_syntax_options], [rpl_re_syntax_options], [Define to rpl_re_syntax_options if the replacement should be used.]) AC_DEFINE([re_set_syntax], [rpl_re_set_syntax], [Define to rpl_re_set_syntax if the replacement should be used.]) AC_DEFINE([re_compile_pattern], [rpl_re_compile_pattern], [Define to rpl_re_compile_pattern if the replacement should be used.]) AC_DEFINE([re_compile_fastmap], [rpl_re_compile_fastmap], [Define to rpl_re_compile_fastmap if the replacement should be used.]) AC_DEFINE([re_search], [rpl_re_search], [Define to rpl_re_search if the replacement should be used.]) AC_DEFINE([re_search_2], [rpl_re_search_2], [Define to rpl_re_search_2 if the replacement should be used.]) AC_DEFINE([re_match], [rpl_re_match], [Define to rpl_re_match if the replacement should be used.]) AC_DEFINE([re_match_2], [rpl_re_match_2], [Define to rpl_re_match_2 if the replacement should be used.]) AC_DEFINE([re_set_registers], [rpl_re_set_registers], [Define to rpl_re_set_registers if the replacement should be used.]) AC_DEFINE([re_comp], [rpl_re_comp], [Define to rpl_re_comp if the replacement should be used.]) AC_DEFINE([re_exec], [rpl_re_exec], [Define to rpl_re_exec if the replacement should be used.]) AC_DEFINE([regcomp], [rpl_regcomp], [Define to rpl_regcomp if the replacement should be used.]) AC_DEFINE([regexec], [rpl_regexec], [Define to rpl_regexec if the replacement should be used.]) AC_DEFINE([regerror], [rpl_regerror], [Define to rpl_regerror if the replacement should be used.]) AC_DEFINE([regfree], [rpl_regfree], [Define to rpl_regfree if the replacement should be used.]) AC_LIBOBJ([regex]) gl_PREREQ_REGEX fi ]) # Prerequisites of lib/regex.c and lib/regex_internal.c. AC_DEFUN([gl_PREREQ_REGEX], [ AC_REQUIRE([AC_USE_SYSTEM_EXTENSIONS]) AC_REQUIRE([AC_C_INLINE]) AC_REQUIRE([AC_C_RESTRICT]) AC_REQUIRE([AC_TYPE_MBSTATE_T]) AC_CHECK_HEADERS([libintl.h]) AC_CHECK_FUNCS_ONCE([isblank iswctype wcscoll]) AC_CHECK_DECLS([isblank], [], [], [#include ]) ]) libprelude-1.0.0/libmissing/m4/00gnulib.m40000664000076400007640000000252211341220435015130 00000000000000# 00gnulib.m4 serial 2 dnl Copyright (C) 2009-2010 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. dnl This file must be named something that sorts before all other dnl gnulib-provided .m4 files. It is needed until such time as we can dnl assume Autoconf 2.64, with its improved AC_DEFUN_ONCE semantics. # AC_DEFUN_ONCE([NAME], VALUE) # ---------------------------- # Define NAME to expand to VALUE on the first use (whether by direct # expansion, or by AC_REQUIRE), and to nothing on all subsequent uses. # Avoid bugs in AC_REQUIRE in Autoconf 2.63 and earlier. This # definition is slower than the version in Autoconf 2.64, because it # can only use interfaces that existed since 2.59; but it achieves the # same effect. Quoting is necessary to avoid confusing Automake. m4_version_prereq([2.63.263], [], [m4_define([AC][_DEFUN_ONCE], [AC][_DEFUN([$1], [AC_REQUIRE([_gl_DEFUN_ONCE([$1])], [m4_indir([_gl_DEFUN_ONCE([$1])])])])]dnl [AC][_DEFUN([_gl_DEFUN_ONCE([$1])], [$2])])]) # gl_00GNULIB # ----------- # Witness macro that this file has been included. Needed to force # Automake to include this file prior to all other gnulib .m4 files. AC_DEFUN([gl_00GNULIB]) libprelude-1.0.0/libmissing/m4/symlink.m40000664000076400007640000000257711341220437015212 00000000000000# serial 2 # See if we need to provide symlink replacement. dnl Copyright (C) 2009, 2010 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. # Written by Eric Blake. AC_DEFUN([gl_FUNC_SYMLINK], [ AC_REQUIRE([gl_UNISTD_H_DEFAULTS]) AC_CHECK_FUNCS_ONCE([symlink]) dnl The best we can do on mingw is provide a dummy that always fails, so dnl that compilation can proceed with fewer ifdefs. On Solaris 9 and dnl FreeBSD 7.2, we want to fix a bug with trailing slash handling. if test $ac_cv_func_symlink = no; then HAVE_SYMLINK=0 AC_LIBOBJ([symlink]) else AC_CACHE_CHECK([whether symlink handles trailing slash correctly], [gl_cv_func_symlink_works], [AC_RUN_IFELSE( [AC_LANG_PROGRAM( [[#include ]], [[if (!symlink ("a", "conftest.link/")) return 1; if (symlink ("conftest.f", "conftest.lnk2")) return 2; if (!symlink ("a", "conftest.lnk2/")) return 3;]])], [gl_cv_func_symlink_works=yes], [gl_cv_func_symlink_works=no], [gl_cv_func_symlink_works="guessing no"]) rm -f conftest.f conftest.link conftest.lnk2]) if test "$gl_cv_func_symlink_works" != yes; then REPLACE_SYMLINK=1 AC_LIBOBJ([symlink]) fi fi ]) libprelude-1.0.0/libmissing/m4/dup2.m40000664000076400007640000000360011341220435014360 00000000000000#serial 10 dnl Copyright (C) 2002, 2005, 2007, 2009-2010 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. AC_DEFUN([gl_FUNC_DUP2], [ AC_REQUIRE([gl_UNISTD_H_DEFAULTS]) AC_REQUIRE([AC_CANONICAL_HOST]) AC_CHECK_FUNCS_ONCE([dup2]) if test $ac_cv_func_dup2 = no; then HAVE_DUP2=0 AC_LIBOBJ([dup2]) else AC_CACHE_CHECK([whether dup2 works], [gl_cv_func_dup2_works], [AC_RUN_IFELSE([ AC_LANG_PROGRAM([[#include #include ]], [if (dup2 (1, 1) == 0) return 1; close (0); if (dup2 (0, 0) != -1) return 2; /* Many gnulib modules require POSIX conformance of EBADF. */ if (dup2 (1, 1000000) == -1 && errno != EBADF) return 3; return 0; ]) ], [gl_cv_func_dup2_works=yes], [gl_cv_func_dup2_works=no], [case "$host_os" in mingw*) # on this platform, dup2 always returns 0 for success gl_cv_func_dup2_works=no;; cygwin*) # on cygwin 1.5.x, dup2(1,1) returns 0 gl_cv_func_dup2_works=no;; linux*) # On linux between 2008-07-27 and 2009-05-11, dup2 of a # closed fd may yield -EBADF instead of -1 / errno=EBADF. gl_cv_func_dup2_works=no;; freebsd*) # on FreeBSD 6.1, dup2(1,1000000) gives EMFILE, not EBADF. gl_cv_func_dup2_works=no;; *) gl_cv_func_dup2_works=yes;; esac]) ]) if test "$gl_cv_func_dup2_works" = no; then gl_REPLACE_DUP2 fi fi ]) AC_DEFUN([gl_REPLACE_DUP2], [ AC_REQUIRE([gl_UNISTD_H_DEFAULTS]) if test $ac_cv_func_dup2 = yes; then REPLACE_DUP2=1 fi AC_LIBOBJ([dup2]) ]) libprelude-1.0.0/libmissing/m4/vsnprintf-posix.m40000664000076400007640000001412411341220437016704 00000000000000# vsnprintf-posix.m4 serial 14 dnl Copyright (C) 2007-2010 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. AC_DEFUN([gl_FUNC_VSNPRINTF_POSIX], [ AC_REQUIRE([gl_PRINTF_SIZES_C99]) AC_REQUIRE([gl_PRINTF_LONG_DOUBLE]) AC_REQUIRE([gl_PRINTF_INFINITE]) AC_REQUIRE([gl_PRINTF_INFINITE_LONG_DOUBLE]) AC_REQUIRE([gl_PRINTF_DIRECTIVE_A]) AC_REQUIRE([gl_PRINTF_DIRECTIVE_F]) AC_REQUIRE([gl_PRINTF_DIRECTIVE_N]) AC_REQUIRE([gl_PRINTF_DIRECTIVE_LS]) AC_REQUIRE([gl_PRINTF_POSITIONS]) AC_REQUIRE([gl_PRINTF_FLAG_GROUPING]) AC_REQUIRE([gl_PRINTF_FLAG_LEFTADJUST]) AC_REQUIRE([gl_PRINTF_FLAG_ZERO]) AC_REQUIRE([gl_PRINTF_PRECISION]) AC_REQUIRE([gl_PRINTF_ENOMEM]) gl_cv_func_vsnprintf_posix=no AC_CHECK_FUNCS([vsnprintf]) if test $ac_cv_func_vsnprintf = yes; then dnl Assume that if vsnprintf() exists, snprintf() also exists. gl_SNPRINTF_TRUNCATION_C99 gl_SNPRINTF_RETVAL_C99 gl_SNPRINTF_DIRECTIVE_N gl_SNPRINTF_SIZE1 gl_VSNPRINTF_ZEROSIZE_C99 case "$gl_cv_func_printf_sizes_c99" in *yes) case "$gl_cv_func_printf_long_double" in *yes) case "$gl_cv_func_printf_infinite" in *yes) case "$gl_cv_func_printf_infinite_long_double" in *yes) case "$gl_cv_func_printf_directive_a" in *yes) case "$gl_cv_func_printf_directive_f" in *yes) case "$gl_cv_func_printf_directive_n" in *yes) case "$gl_cv_func_printf_directive_ls" in *yes) case "$gl_cv_func_printf_positions" in *yes) case "$gl_cv_func_printf_flag_grouping" in *yes) case "$gl_cv_func_printf_flag_leftadjust" in *yes) case "$gl_cv_func_printf_flag_zero" in *yes) case "$gl_cv_func_printf_precision" in *yes) case "$gl_cv_func_printf_enomem" in *yes) case "$gl_cv_func_snprintf_truncation_c99" in *yes) case "$gl_cv_func_snprintf_retval_c99" in *yes) case "$gl_cv_func_snprintf_directive_n" in *yes) case "$gl_cv_func_snprintf_size1" in *yes) case "$gl_cv_func_vsnprintf_zerosize_c99" in *yes) # vsnprintf exists and is # already POSIX compliant. gl_cv_func_vsnprintf_posix=yes ;; esac ;; esac ;; esac ;; esac ;; esac ;; esac ;; esac ;; esac ;; esac ;; esac ;; esac ;; esac ;; esac ;; esac ;; esac ;; esac ;; esac ;; esac ;; esac fi if test $gl_cv_func_vsnprintf_posix = no; then gl_PREREQ_VASNPRINTF_LONG_DOUBLE gl_PREREQ_VASNPRINTF_INFINITE_DOUBLE gl_PREREQ_VASNPRINTF_INFINITE_LONG_DOUBLE gl_PREREQ_VASNPRINTF_DIRECTIVE_A gl_PREREQ_VASNPRINTF_DIRECTIVE_F gl_PREREQ_VASNPRINTF_DIRECTIVE_LS gl_PREREQ_VASNPRINTF_FLAG_GROUPING gl_PREREQ_VASNPRINTF_FLAG_LEFTADJUST gl_PREREQ_VASNPRINTF_FLAG_ZERO gl_PREREQ_VASNPRINTF_PRECISION gl_PREREQ_VASNPRINTF_ENOMEM gl_REPLACE_VASNPRINTF gl_REPLACE_VSNPRINTF fi ]) libprelude-1.0.0/libmissing/sys_socket.in.h0000664000076400007640000003250411341220440015671 00000000000000/* Provide a sys/socket header file for systems lacking it (read: MinGW) and for systems where it is incomplete. Copyright (C) 2005-2010 Free Software Foundation, Inc. Written by Simon Josefsson. This program is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser 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 Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ /* This file is supposed to be used on platforms that lack , on platforms where cannot be included standalone, and on platforms where does not provide all necessary definitions. It is intended to provide definitions and prototypes needed by an application. */ #ifndef _GL_SYS_SOCKET_H #if @HAVE_SYS_SOCKET_H@ # if __GNUC__ >= 3 @PRAGMA_SYSTEM_HEADER@ # endif /* On many platforms, assumes prior inclusion of . */ # include /* The include_next requires a split double-inclusion guard. */ # @INCLUDE_NEXT@ @NEXT_SYS_SOCKET_H@ #endif #ifndef _GL_SYS_SOCKET_H #define _GL_SYS_SOCKET_H /* The definition of _GL_ARG_NONNULL is copied here. */ #if !@HAVE_SA_FAMILY_T@ typedef unsigned short sa_family_t; #endif #if !@HAVE_STRUCT_SOCKADDR_STORAGE@ # include /* Code taken from glibc sysdeps/unix/sysv/linux/bits/socket.h on 2009-05-08, licensed under LGPLv2.1+, plus portability fixes. */ # define __ss_aligntype unsigned long int # define _SS_SIZE 256 # define _SS_PADSIZE \ (_SS_SIZE - ((sizeof (sa_family_t) >= alignof (__ss_aligntype) \ ? sizeof (sa_family_t) \ : alignof (__ss_aligntype)) \ + sizeof (__ss_aligntype))) struct sockaddr_storage { sa_family_t ss_family; /* Address family, etc. */ __ss_aligntype __ss_align; /* Force desired alignment. */ char __ss_padding[_SS_PADSIZE]; }; #endif #if @HAVE_SYS_SOCKET_H@ /* A platform that has . */ /* For shutdown(). */ # if !defined SHUT_RD # define SHUT_RD 0 # endif # if !defined SHUT_WR # define SHUT_WR 1 # endif # if !defined SHUT_RDWR # define SHUT_RDWR 2 # endif #else # ifdef __CYGWIN__ # error "Cygwin does have a sys/socket.h, doesn't it?!?" # endif /* A platform that lacks . Currently only MinGW is supported. See the gnulib manual regarding Windows sockets. MinGW has the header files winsock2.h and ws2tcpip.h that declare the sys/socket.h definitions we need. Note that you can influence which definitions you get by setting the WINVER symbol before including these two files. For example, getaddrinfo is only available if _WIN32_WINNT >= 0x0501 (that symbol is set indiriectly through WINVER). You can set this by adding AC_DEFINE(WINVER, 0x0501) to configure.ac. Note that your code may not run on older Windows releases then. My Windows 2000 box was not able to run the code, for example. The situation is slightly confusing because: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/winsock/winsock/getaddrinfo_2.asp suggests that getaddrinfo should be available on all Windows releases. */ # if @HAVE_WINSOCK2_H@ # include # endif # if @HAVE_WS2TCPIP_H@ # include # endif /* For shutdown(). */ # if !defined SHUT_RD && defined SD_RECEIVE # define SHUT_RD SD_RECEIVE # endif # if !defined SHUT_WR && defined SD_SEND # define SHUT_WR SD_SEND # endif # if !defined SHUT_RDWR && defined SD_BOTH # define SHUT_RDWR SD_BOTH # endif /* The definition of _GL_WARN_ON_USE is copied here. */ # if @HAVE_WINSOCK2_H@ /* Include headers needed by the emulation code. */ # include # include typedef int socklen_t; # endif # ifdef __cplusplus extern "C" { # endif # if @HAVE_WINSOCK2_H@ /* Re-define FD_ISSET to avoid a WSA call while we are not using network sockets. */ static inline int rpl_fd_isset (SOCKET fd, fd_set * set) { u_int i; if (set == NULL) return 0; for (i = 0; i < set->fd_count; i++) if (set->fd_array[i] == fd) return 1; return 0; } # undef FD_ISSET # define FD_ISSET(fd, set) rpl_fd_isset(fd, set) # endif /* Wrap everything else to use libc file descriptors for sockets. */ # if @HAVE_WINSOCK2_H@ && !defined _GL_UNISTD_H # undef close # define close close_used_without_including_unistd_h # endif # if @HAVE_WINSOCK2_H@ && !defined _GL_UNISTD_H # undef gethostname # define gethostname gethostname_used_without_including_unistd_h # endif # if @GNULIB_SOCKET@ # if @HAVE_WINSOCK2_H@ # undef socket # define socket rpl_socket extern int rpl_socket (int, int, int protocol); # endif # elif @HAVE_WINSOCK2_H@ # undef socket # define socket socket_used_without_requesting_gnulib_module_socket # elif defined GNULIB_POSIXCHECK # undef socket # if HAVE_RAW_DECL_SOCKET _GL_WARN_ON_USE (socket, "socket is not always POSIX compliant - " "use gnulib module socket for portability"); # endif # endif # if @GNULIB_CONNECT@ # if @HAVE_WINSOCK2_H@ # undef connect # define connect rpl_connect extern int rpl_connect (int, struct sockaddr *, int) _GL_ARG_NONNULL ((2)); # endif # elif @HAVE_WINSOCK2_H@ # undef connect # define connect socket_used_without_requesting_gnulib_module_connect # elif defined GNULIB_POSIXCHECK # undef connect # if HAVE_RAW_DECL_CONNECT _GL_WARN_ON_USE (connect, "connect is not always POSIX compliant - " "use gnulib module connect for portability"); # endif # endif # if @GNULIB_ACCEPT@ # if @HAVE_WINSOCK2_H@ # undef accept # define accept rpl_accept extern int rpl_accept (int, struct sockaddr *, int *); # endif # elif @HAVE_WINSOCK2_H@ # undef accept # define accept accept_used_without_requesting_gnulib_module_accept # elif defined GNULIB_POSIXCHECK # undef accept # if HAVE_RAW_DECL_ACCEPT _GL_WARN_ON_USE (accept, "accept is not always POSIX compliant - " "use gnulib module accept for portability"); # endif # endif # if @GNULIB_BIND@ # if @HAVE_WINSOCK2_H@ # undef bind # define bind rpl_bind extern int rpl_bind (int, struct sockaddr *, int) _GL_ARG_NONNULL ((2)); # endif # elif @HAVE_WINSOCK2_H@ # undef bind # define bind bind_used_without_requesting_gnulib_module_bind # elif defined GNULIB_POSIXCHECK # undef bind # if HAVE_RAW_DECL_BIND _GL_WARN_ON_USE (bind, "bind is not always POSIX compliant - " "use gnulib module bind for portability"); # endif # endif # if @GNULIB_GETPEERNAME@ # if @HAVE_WINSOCK2_H@ # undef getpeername # define getpeername rpl_getpeername extern int rpl_getpeername (int, struct sockaddr *, int *) _GL_ARG_NONNULL ((2, 3)); # endif # elif @HAVE_WINSOCK2_H@ # undef getpeername # define getpeername getpeername_used_without_requesting_gnulib_module_getpeername # elif defined GNULIB_POSIXCHECK # undef getpeername # if HAVE_RAW_DECL_GETPEERNAME _GL_WARN_ON_USE (getpeername, "getpeername is not always POSIX compliant - " "use gnulib module getpeername for portability"); # endif # endif # if @GNULIB_GETSOCKNAME@ # if @HAVE_WINSOCK2_H@ # undef getsockname # define getsockname rpl_getsockname extern int rpl_getsockname (int, struct sockaddr *, int *) _GL_ARG_NONNULL ((2, 3)); # endif # elif @HAVE_WINSOCK2_H@ # undef getsockname # define getsockname getsockname_used_without_requesting_gnulib_module_getsockname # elif defined GNULIB_POSIXCHECK # undef getsockname # if HAVE_RAW_DECL_GETSOCKNAME _GL_WARN_ON_USE (getsockname, "getsockname is not always POSIX compliant - " "use gnulib module getsockname for portability"); # endif # endif # if @GNULIB_GETSOCKOPT@ # if @HAVE_WINSOCK2_H@ # undef getsockopt # define getsockopt rpl_getsockopt extern int rpl_getsockopt (int, int, int, void *, socklen_t *) _GL_ARG_NONNULL ((4, 5)); # endif # elif @HAVE_WINSOCK2_H@ # undef getsockopt # define getsockopt getsockopt_used_without_requesting_gnulib_module_getsockopt # elif defined GNULIB_POSIXCHECK # undef getsockopt # if HAVE_RAW_DECL_GETSOCKOPT _GL_WARN_ON_USE (getsockopt, "getsockopt is not always POSIX compliant - " "use gnulib module getsockopt for portability"); # endif # endif # if @GNULIB_LISTEN@ # if @HAVE_WINSOCK2_H@ # undef listen # define listen rpl_listen extern int rpl_listen (int, int); # endif # elif @HAVE_WINSOCK2_H@ # undef listen # define listen listen_used_without_requesting_gnulib_module_listen # elif defined GNULIB_POSIXCHECK # undef listen # if HAVE_RAW_DECL_LISTEN _GL_WARN_ON_USE (listen, "listen is not always POSIX compliant - " "use gnulib module listen for portability"); # endif # endif # if @GNULIB_RECV@ # if @HAVE_WINSOCK2_H@ # undef recv # define recv rpl_recv extern int rpl_recv (int, void *, int, int) _GL_ARG_NONNULL ((2)); # endif # elif @HAVE_WINSOCK2_H@ # undef recv # define recv recv_used_without_requesting_gnulib_module_recv # elif defined GNULIB_POSIXCHECK # undef recv # if HAVE_RAW_DECL_RECV _GL_WARN_ON_USE (recv, "recv is not always POSIX compliant - " "use gnulib module recv for portability"); # endif # endif # if @GNULIB_SEND@ # if @HAVE_WINSOCK2_H@ # undef send # define send rpl_send extern int rpl_send (int, const void *, int, int) _GL_ARG_NONNULL ((2)); # endif # elif @HAVE_WINSOCK2_H@ # undef send # define send send_used_without_requesting_gnulib_module_send # elif defined GNULIB_POSIXCHECK # undef send # if HAVE_RAW_DECL_SEND _GL_WARN_ON_USE (send, "send is not always POSIX compliant - " "use gnulib module send for portability"); # endif # endif # if @GNULIB_RECVFROM@ # if @HAVE_WINSOCK2_H@ # undef recvfrom # define recvfrom rpl_recvfrom extern int rpl_recvfrom (int, void *, int, int, struct sockaddr *, int *) _GL_ARG_NONNULL ((2)); # endif # elif @HAVE_WINSOCK2_H@ # undef recvfrom # define recvfrom recvfrom_used_without_requesting_gnulib_module_recvfrom # elif defined GNULIB_POSIXCHECK # undef recvfrom # if HAVE_RAW_DECL_RECVFROM _GL_WARN_ON_USE (recvfrom, "recvfrom is not always POSIX compliant - " "use gnulib module recvfrom for portability"); # endif # endif # if @GNULIB_SENDTO@ # if @HAVE_WINSOCK2_H@ # undef sendto # define sendto rpl_sendto extern int rpl_sendto (int, const void *, int, int, struct sockaddr *, int) _GL_ARG_NONNULL ((2)); # endif # elif @HAVE_WINSOCK2_H@ # undef sendto # define sendto sendto_used_without_requesting_gnulib_module_sendto # elif defined GNULIB_POSIXCHECK # undef sendto # if HAVE_RAW_DECL_SENDTO _GL_WARN_ON_USE (sendto, "sendto is not always POSIX compliant - " "use gnulib module sendto for portability"); # endif # endif # if @GNULIB_SETSOCKOPT@ # if @HAVE_WINSOCK2_H@ # undef setsockopt # define setsockopt rpl_setsockopt extern int rpl_setsockopt (int, int, int, const void *, socklen_t) _GL_ARG_NONNULL ((4)); # endif # elif @HAVE_WINSOCK2_H@ # undef setsockopt # define setsockopt setsockopt_used_without_requesting_gnulib_module_setsockopt # elif defined GNULIB_POSIXCHECK # undef setsockopt # if HAVE_RAW_DECL_SETSOCKOPT _GL_WARN_ON_USE (setsockopt, "setsockopt is not always POSIX compliant - " "use gnulib module setsockopt for portability"); # endif # endif # if @GNULIB_SHUTDOWN@ # if @HAVE_WINSOCK2_H@ # undef shutdown # define shutdown rpl_shutdown extern int rpl_shutdown (int, int); # endif # elif @HAVE_WINSOCK2_H@ # undef shutdown # define shutdown shutdown_used_without_requesting_gnulib_module_shutdown # elif defined GNULIB_POSIXCHECK # undef shutdown # if HAVE_RAW_DECL_SHUTDOWN _GL_WARN_ON_USE (shutdown, "shutdown is not always POSIX compliant - " "use gnulib module shutdown for portability"); # endif # endif # if @HAVE_WINSOCK2_H@ # undef select # define select select_used_without_including_sys_select_h # endif # ifdef __cplusplus } # endif #endif /* HAVE_SYS_SOCKET_H */ #ifdef __cplusplus extern "C" { #endif #if @GNULIB_ACCEPT4@ /* Accept a connection on a socket, with specific opening flags. The flags are a bitmask, possibly including O_CLOEXEC (defined in ) and O_TEXT, O_BINARY (defined in "binary-io.h"). See also the Linux man page at . */ # if @HAVE_ACCEPT4@ # define accept4 rpl_accept4 # endif extern int accept4 (int sockfd, struct sockaddr *addr, socklen_t *addrlen, int flags); #elif defined GNULIB_POSIXCHECK # undef accept4 # if HAVE_RAW_DECL_ACCEPT4 _GL_WARN_ON_USE (accept4, "accept4 is unportable - " "use gnulib module accept4 for portability"); # endif #endif #ifdef __cplusplus } #endif #endif /* _GL_SYS_SOCKET_H */ #endif /* _GL_SYS_SOCKET_H */ libprelude-1.0.0/libmissing/glthread/0000775000076400007640000000000011347714752014617 500000000000000libprelude-1.0.0/libmissing/glthread/tls.c0000664000076400007640000000323111341220435015464 00000000000000/* Thread-local storage in multithreaded situations. Copyright (C) 2005-2010 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 3 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 Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . */ /* Written by Bruno Haible , 2005. */ #include #include "glthread/tls.h" /* ========================================================================= */ #if USE_POSIX_THREADS #endif /* ========================================================================= */ #if USE_PTH_THREADS #endif /* ========================================================================= */ #if USE_SOLARIS_THREADS /* Use the old Solaris threads library. */ /* ------------------------- gl_tls_key_t datatype ------------------------- */ void * glthread_tls_get_multithreaded (thread_key_t key) { void *value; if (thr_getspecific (key, &value) != 0) abort (); return value; } #endif /* ========================================================================= */ #if USE_WIN32_THREADS #endif /* ========================================================================= */ libprelude-1.0.0/libmissing/glthread/threadlib.c0000664000076400007640000000367411341220435016633 00000000000000/* Multithreading primitives. Copyright (C) 2005-2010 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser 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 Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ /* Written by Bruno Haible , 2005. */ #include /* ========================================================================= */ #if USE_POSIX_THREADS /* Use the POSIX threads library. */ # include # include # if PTHREAD_IN_USE_DETECTION_HARD /* The function to be executed by a dummy thread. */ static void * dummy_thread_func (void *arg) { return arg; } int glthread_in_use (void) { static int tested; static int result; /* 1: linked with -lpthread, 0: only with libc */ if (!tested) { pthread_t thread; if (pthread_create (&thread, NULL, dummy_thread_func, NULL) != 0) /* Thread creation failed. */ result = 0; else { /* Thread creation works. */ void *retval; if (pthread_join (thread, &retval) != 0) abort (); result = 1; } tested = 1; } return result; } # endif #endif /* ========================================================================= */ /* This declaration is solely to ensure that after preprocessing this file is never empty. */ typedef int dummy; libprelude-1.0.0/libmissing/glthread/cond.h0000664000076400007640000003172611341220435015624 00000000000000/* Condition variables for multithreading. Copyright (C) 2005-2010 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser 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 Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ /* Written by Yoann Vandoorselaere , 2008. Based on Bruno Haible lock.h */ /* Condition variables can be used for waiting until a condition becomes true. In this respect, they are similar to wait queues. But contrary to wait queues, condition variables have different semantics that allows events to be lost when there is no thread waiting for them. Condition variable: Type: gl_cond_t Declaration: gl_cond_define(extern, name) Initializer: gl_cond_define_initialized(, name) Initialization: gl_cond_init (name); Waiting: gl_cond_wait (name, lock); Timed wait: bool timedout = gl_cond_timedwait (name, lock, abstime); where lock is a gl_lock_t variable (cf. ) Signaling: gl_cond_signal (name); Broadcasting: gl_cond_broadcast (name); De-initialization: gl_cond_destroy (name); Equivalent functions with control of error handling: Initialization: err = glthread_cond_init (&name); Waiting: err = glthread_cond_wait (&name); Timed wait: err = glthread_cond_timedwait (&name, &lock, abstime); Signaling: err = glthread_cond_signal (&name); Broadcasting: err = glthread_cond_broadcast (&name); De-initialization: err = glthread_cond_destroy (&name); */ #ifndef _GLTHREAD_COND_H #define _GLTHREAD_COND_H #include #include #include #include #include "glthread/lock.h" /* ========================================================================= */ #if USE_POSIX_THREADS /* Use the POSIX threads library. */ # include # ifdef __cplusplus extern "C" { # endif # if PTHREAD_IN_USE_DETECTION_HARD /* The pthread_in_use() detection needs to be done at runtime. */ # define pthread_in_use() \ glthread_in_use () extern int glthread_in_use (void); # endif # if USE_POSIX_THREADS_WEAK /* Use weak references to the POSIX threads library. */ /* Weak references avoid dragging in external libraries if the other parts of the program don't use them. Here we use them, because we don't want every program that uses libintl to depend on libpthread. This assumes that libpthread would not be loaded after libintl; i.e. if libintl is loaded first, by an executable that does not depend on libpthread, and then a module is dynamically loaded that depends on libpthread, libintl will not be multithread-safe. */ /* The way to test at runtime whether libpthread is present is to test whether a function pointer's value, such as &pthread_mutex_init, is non-NULL. However, some versions of GCC have a bug through which, in PIC mode, &foo != NULL always evaluates to true if there is a direct call to foo(...) in the same function. To avoid this, we test the address of a function in libpthread that we don't use. */ # pragma weak pthread_cond_init # pragma weak pthread_cond_wait # pragma weak pthread_cond_timedwait # pragma weak pthread_cond_signal # pragma weak pthread_cond_broadcast # pragma weak pthread_cond_destroy # ifndef pthread_self # pragma weak pthread_self # endif # if !PTHREAD_IN_USE_DETECTION_HARD # pragma weak pthread_cancel # define pthread_in_use() (pthread_cancel != NULL) # endif # else # if !PTHREAD_IN_USE_DETECTION_HARD # define pthread_in_use() 1 # endif # endif /* -------------------------- gl_cond_t datatype -------------------------- */ typedef pthread_cond_t gl_cond_t; # define gl_cond_define(STORAGECLASS, NAME) \ STORAGECLASS gl_cond_t NAME; # define gl_cond_define_initialized(STORAGECLASS, NAME) \ STORAGECLASS gl_cond_t NAME = gl_cond_initializer; # define gl_cond_initializer \ PTHREAD_COND_INITIALIZER # define glthread_cond_init(COND) \ (pthread_in_use () ? pthread_cond_init (COND, NULL) : 0) # define glthread_cond_wait(COND, LOCK) \ (pthread_in_use () ? pthread_cond_wait (COND, LOCK) : 0) # define glthread_cond_timedwait(COND, LOCK, ABSTIME) \ (pthread_in_use () ? pthread_cond_timedwait (COND, LOCK, ABSTIME) : 0) # define glthread_cond_signal(COND) \ (pthread_in_use () ? pthread_cond_signal (COND) : 0) # define glthread_cond_broadcast(COND) \ (pthread_in_use () ? pthread_cond_broadcast (COND) : 0) # define glthread_cond_destroy(COND) \ (pthread_in_use () ? pthread_cond_destroy (COND) : 0) # ifdef __cplusplus } # endif #endif /* ========================================================================= */ #if USE_PTH_THREADS /* Use the GNU Pth threads library. */ # include # ifdef __cplusplus extern "C" { # endif # if USE_PTH_THREADS_WEAK /* Use weak references to the GNU Pth threads library. */ # pragma weak pth_cond_init # pragma weak pth_cond_await # pragma weak pth_cond_notify # pragma weak pth_event # pragma weak pth_timeout # pragma weak pth_cancel # define pth_in_use() (pth_cancel != NULL) # else # define pth_in_use() 1 # endif /* -------------------------- gl_cond_t datatype -------------------------- */ typedef pth_cond_t gl_cond_t; # define gl_cond_define(STORAGECLASS, NAME) \ STORAGECLASS gl_cond_t NAME; # define gl_cond_define_initialized(STORAGECLASS, NAME) \ STORAGECLASS gl_cond_t NAME = gl_cond_initializer; # define gl_cond_initializer \ PTH_COND_INIT # define glthread_cond_init(COND) \ (pth_in_use () && !pth_cond_init (COND) ? errno : 0) # define glthread_cond_wait(COND, LOCK) \ (pth_in_use () && !pth_cond_await (COND, LOCK, NULL) ? errno : 0) # define glthread_cond_timedwait(COND, LOCK, ABSTIME) \ (pth_in_use () ? glthread_cond_timedwait_multithreaded (COND, LOCK, ABSTIME) : 0) # define glthread_cond_signal(COND) \ (pth_in_use () && !pth_cond_notify (COND, FALSE) ? errno : 0) # define glthread_cond_broadcast(COND) \ (pth_in_use () && !pth_cond_notify (COND, TRUE) ? errno : 0) # define glthread_cond_destroy(COND) 0 extern int glthread_cond_timedwait_multithreaded (gl_cond_t *cond, gl_lock_t *lock, struct timespec *abstime); # ifdef __cplusplus } # endif #endif /* ========================================================================= */ #if USE_SOLARIS_THREADS /* Use the old Solaris threads library. */ # include # include # ifdef __cplusplus extern "C" { # endif # if USE_SOLARIS_THREADS_WEAK /* Use weak references to the old Solaris threads library. */ # pragma weak cond_init # pragma weak cond_wait # pragma weak cond_timedwait # pragma weak cond_signal # pragma weak cond_broadcast # pragma weak cond_destroy # pragma weak thr_suspend # define thread_in_use() (thr_suspend != NULL) # else # define thread_in_use() 1 # endif /* -------------------------- gl_cond_t datatype -------------------------- */ typedef cond_t gl_cond_t; # define gl_cond_define(STORAGECLASS, NAME) \ STORAGECLASS gl_cond_t NAME; # define gl_cond_define_initialized(STORAGECLASS, NAME) \ STORAGECLASS gl_cond_t NAME = gl_cond_initializer; # define gl_cond_initializer \ DEFAULTCV # define glthread_cond_init(COND) \ (pthread_in_use () ? cond_init (COND, USYNC_THREAD, NULL) : 0) # define glthread_cond_wait(COND, LOCK) \ (pthread_in_use () ? cond_wait (COND, LOCK) : 0) # define glthread_cond_timedwait(COND, LOCK, ABSTIME) \ (pthread_in_use () ? glthread_cond_timedwait_multithreaded (COND, LOCK, ABSTIME) : 0) # define glthread_cond_signal(COND) \ (pthread_in_use () ? cond_signal (COND) : 0) # define glthread_cond_broadcast(COND) \ (pthread_in_use () ? cond_broadcast (COND) : 0) # define glthread_cond_destroy(COND) \ (pthread_in_use () ? cond_destroy (COND) : 0) extern int glthread_cond_timedwait_multithreaded (gl_cond_t *cond, gl_lock_t *lock, struct timespec *abstime); # ifdef __cplusplus } # endif #endif /* ========================================================================= */ #if USE_WIN32_THREADS # include # ifdef __cplusplus extern "C" { # endif /* -------------------------- gl_cond_t datatype -------------------------- */ struct gl_waitqueue_link { struct gl_waitqueue_link *wql_next; struct gl_waitqueue_link *wql_prev; }; typedef struct { struct gl_waitqueue_link wq_list; /* circular list of waiting threads */ } gl_linked_waitqueue_t; typedef struct { gl_spinlock_t guard; /* protects the initialization */ CRITICAL_SECTION lock; /* protects the remaining fields */ gl_linked_waitqueue_t waiters; /* waiting threads */ } gl_cond_t; # define gl_cond_define(STORAGECLASS, NAME) \ STORAGECLASS gl_cond_t NAME; # define gl_cond_define_initialized(STORAGECLASS, NAME) \ STORAGECLASS gl_cond_t NAME = gl_cond_initializer; # define gl_cond_initializer \ { { 0, -1 } } # define glthread_cond_init(COND) \ glthread_cond_init_func (COND) # define glthread_cond_wait(COND, LOCK) \ glthread_cond_wait_func (COND, LOCK) # define glthread_cond_timedwait(COND, LOCK, ABSTIME) \ glthread_cond_timedwait_func (COND, LOCK, ABSTIME) # define glthread_cond_signal(COND) \ glthread_cond_signal_func (COND) # define glthread_cond_broadcast(COND) \ glthread_cond_broadcast_func (COND) # define glthread_cond_destroy(COND) \ glthread_cond_destroy_func (COND) extern int glthread_cond_init_func (gl_cond_t *cond); extern int glthread_cond_wait_func (gl_cond_t *cond, gl_lock_t *lock); extern int glthread_cond_timedwait_func (gl_cond_t *cond, gl_lock_t *lock, struct timespec *abstime); extern int glthread_cond_signal_func (gl_cond_t *cond); extern int glthread_cond_broadcast_func (gl_cond_t *cond); extern int glthread_cond_destroy_func (gl_cond_t *cond); # ifdef __cplusplus } # endif #endif /* ========================================================================= */ #if !(USE_POSIX_THREADS || USE_PTH_THREADS || USE_SOLARIS_THREADS || USE_WIN32_THREADS) /* Provide dummy implementation if threads are not supported. */ typedef int gl_cond_t; # define gl_cond_define(STORAGECLASS, NAME) # define gl_cond_define_initialized(STORAGECLASS, NAME) # define glthread_cond_init(COND) 0 # define glthread_cond_wait(COND, LOCK) 0 # define glthread_cond_timedwait(COND, LOCK, ABSTIME) 0 # define glthread_cond_signal(COND) 0 # define glthread_cond_broadcast(COND) 0 # define glthread_cond_destroy(COND) 0 #endif /* ========================================================================= */ /* Macros with built-in error handling. */ #ifdef __cplusplus extern "C" { #endif #define gl_cond_init(COND) \ do \ { \ if (glthread_cond_init (&COND)) \ abort (); \ } \ while (0) #define gl_cond_wait(COND, LOCK) \ do \ { \ if (glthread_cond_wait (&COND, &LOCK)) \ abort (); \ } \ while (0) #define gl_cond_timedwait(COND, LOCK, ABSTIME) \ gl_cond_timedwait_func (&COND, &LOCK, ABSTIME) static inline bool gl_cond_timedwait_func (gl_cond_t *cond, gl_lock_t *lock, struct timespec *abstime) { int err = glthread_cond_timedwait (cond, lock, abstime); if (err == ETIMEDOUT) return true; if (err != 0) abort (); return false; } #define gl_cond_signal(COND) \ do \ { \ if (glthread_cond_signal (&COND)) \ abort (); \ } \ while (0) #define gl_cond_broadcast(COND) \ do \ { \ if (glthread_cond_broadcast (&COND)) \ abort (); \ } \ while (0) #define gl_cond_destroy(COND) \ do \ { \ if (glthread_cond_destroy (&COND)) \ abort (); \ } \ while (0) #ifdef __cplusplus } #endif #endif /* _GLTHREAD_COND_H */ libprelude-1.0.0/libmissing/glthread/lock.c0000664000076400007640000006435111341220435015624 00000000000000/* Locking in multithreaded situations. Copyright (C) 2005-2010 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser 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 Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ /* Written by Bruno Haible , 2005. Based on GCC's gthr-posix.h, gthr-posix95.h, gthr-solaris.h, gthr-win32.h. */ #include #include "glthread/lock.h" /* ========================================================================= */ #if USE_POSIX_THREADS /* -------------------------- gl_lock_t datatype -------------------------- */ /* ------------------------- gl_rwlock_t datatype ------------------------- */ # if HAVE_PTHREAD_RWLOCK # if !defined PTHREAD_RWLOCK_INITIALIZER int glthread_rwlock_init_multithreaded (gl_rwlock_t *lock) { int err; err = pthread_rwlock_init (&lock->rwlock, NULL); if (err != 0) return err; lock->initialized = 1; return 0; } int glthread_rwlock_rdlock_multithreaded (gl_rwlock_t *lock) { if (!lock->initialized) { int err; err = pthread_mutex_lock (&lock->guard); if (err != 0) return err; if (!lock->initialized) { err = glthread_rwlock_init_multithreaded (lock); if (err != 0) { pthread_mutex_unlock (&lock->guard); return err; } } err = pthread_mutex_unlock (&lock->guard); if (err != 0) return err; } return pthread_rwlock_rdlock (&lock->rwlock); } int glthread_rwlock_wrlock_multithreaded (gl_rwlock_t *lock) { if (!lock->initialized) { int err; err = pthread_mutex_lock (&lock->guard); if (err != 0) return err; if (!lock->initialized) { err = glthread_rwlock_init_multithreaded (lock); if (err != 0) { pthread_mutex_unlock (&lock->guard); return err; } } err = pthread_mutex_unlock (&lock->guard); if (err != 0) return err; } return pthread_rwlock_wrlock (&lock->rwlock); } int glthread_rwlock_unlock_multithreaded (gl_rwlock_t *lock) { if (!lock->initialized) return EINVAL; return pthread_rwlock_unlock (&lock->rwlock); } int glthread_rwlock_destroy_multithreaded (gl_rwlock_t *lock) { int err; if (!lock->initialized) return EINVAL; err = pthread_rwlock_destroy (&lock->rwlock); if (err != 0) return err; lock->initialized = 0; return 0; } # endif # else int glthread_rwlock_init_multithreaded (gl_rwlock_t *lock) { int err; err = pthread_mutex_init (&lock->lock, NULL); if (err != 0) return err; err = pthread_cond_init (&lock->waiting_readers, NULL); if (err != 0) return err; err = pthread_cond_init (&lock->waiting_writers, NULL); if (err != 0) return err; lock->waiting_writers_count = 0; lock->runcount = 0; return 0; } int glthread_rwlock_rdlock_multithreaded (gl_rwlock_t *lock) { int err; err = pthread_mutex_lock (&lock->lock); if (err != 0) return err; /* Test whether only readers are currently running, and whether the runcount field will not overflow. */ /* POSIX says: "It is implementation-defined whether the calling thread acquires the lock when a writer does not hold the lock and there are writers blocked on the lock." Let's say, no: give the writers a higher priority. */ while (!(lock->runcount + 1 > 0 && lock->waiting_writers_count == 0)) { /* This thread has to wait for a while. Enqueue it among the waiting_readers. */ err = pthread_cond_wait (&lock->waiting_readers, &lock->lock); if (err != 0) { pthread_mutex_unlock (&lock->lock); return err; } } lock->runcount++; return pthread_mutex_unlock (&lock->lock); } int glthread_rwlock_wrlock_multithreaded (gl_rwlock_t *lock) { int err; err = pthread_mutex_lock (&lock->lock); if (err != 0) return err; /* Test whether no readers or writers are currently running. */ while (!(lock->runcount == 0)) { /* This thread has to wait for a while. Enqueue it among the waiting_writers. */ lock->waiting_writers_count++; err = pthread_cond_wait (&lock->waiting_writers, &lock->lock); if (err != 0) { lock->waiting_writers_count--; pthread_mutex_unlock (&lock->lock); return err; } lock->waiting_writers_count--; } lock->runcount--; /* runcount becomes -1 */ return pthread_mutex_unlock (&lock->lock); } int glthread_rwlock_unlock_multithreaded (gl_rwlock_t *lock) { int err; err = pthread_mutex_lock (&lock->lock); if (err != 0) return err; if (lock->runcount < 0) { /* Drop a writer lock. */ if (!(lock->runcount == -1)) { pthread_mutex_unlock (&lock->lock); return EINVAL; } lock->runcount = 0; } else { /* Drop a reader lock. */ if (!(lock->runcount > 0)) { pthread_mutex_unlock (&lock->lock); return EINVAL; } lock->runcount--; } if (lock->runcount == 0) { /* POSIX recommends that "write locks shall take precedence over read locks", to avoid "writer starvation". */ if (lock->waiting_writers_count > 0) { /* Wake up one of the waiting writers. */ err = pthread_cond_signal (&lock->waiting_writers); if (err != 0) { pthread_mutex_unlock (&lock->lock); return err; } } else { /* Wake up all waiting readers. */ err = pthread_cond_broadcast (&lock->waiting_readers); if (err != 0) { pthread_mutex_unlock (&lock->lock); return err; } } } return pthread_mutex_unlock (&lock->lock); } int glthread_rwlock_destroy_multithreaded (gl_rwlock_t *lock) { int err; err = pthread_mutex_destroy (&lock->lock); if (err != 0) return err; err = pthread_cond_destroy (&lock->waiting_readers); if (err != 0) return err; err = pthread_cond_destroy (&lock->waiting_writers); if (err != 0) return err; return 0; } # endif /* --------------------- gl_recursive_lock_t datatype --------------------- */ # if HAVE_PTHREAD_MUTEX_RECURSIVE # if defined PTHREAD_RECURSIVE_MUTEX_INITIALIZER || defined PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP int glthread_recursive_lock_init_multithreaded (gl_recursive_lock_t *lock) { pthread_mutexattr_t attributes; int err; err = pthread_mutexattr_init (&attributes); if (err != 0) return err; err = pthread_mutexattr_settype (&attributes, PTHREAD_MUTEX_RECURSIVE); if (err != 0) { pthread_mutexattr_destroy (&attributes); return err; } err = pthread_mutex_init (lock, &attributes); if (err != 0) { pthread_mutexattr_destroy (&attributes); return err; } err = pthread_mutexattr_destroy (&attributes); if (err != 0) return err; return 0; } # else int glthread_recursive_lock_init_multithreaded (gl_recursive_lock_t *lock) { pthread_mutexattr_t attributes; int err; err = pthread_mutexattr_init (&attributes); if (err != 0) return err; err = pthread_mutexattr_settype (&attributes, PTHREAD_MUTEX_RECURSIVE); if (err != 0) { pthread_mutexattr_destroy (&attributes); return err; } err = pthread_mutex_init (&lock->recmutex, &attributes); if (err != 0) { pthread_mutexattr_destroy (&attributes); return err; } err = pthread_mutexattr_destroy (&attributes); if (err != 0) return err; lock->initialized = 1; return 0; } int glthread_recursive_lock_lock_multithreaded (gl_recursive_lock_t *lock) { if (!lock->initialized) { int err; err = pthread_mutex_lock (&lock->guard); if (err != 0) return err; if (!lock->initialized) { err = glthread_recursive_lock_init_multithreaded (lock); if (err != 0) { pthread_mutex_unlock (&lock->guard); return err; } } err = pthread_mutex_unlock (&lock->guard); if (err != 0) return err; } return pthread_mutex_lock (&lock->recmutex); } int glthread_recursive_lock_unlock_multithreaded (gl_recursive_lock_t *lock) { if (!lock->initialized) return EINVAL; return pthread_mutex_unlock (&lock->recmutex); } int glthread_recursive_lock_destroy_multithreaded (gl_recursive_lock_t *lock) { int err; if (!lock->initialized) return EINVAL; err = pthread_mutex_destroy (&lock->recmutex); if (err != 0) return err; lock->initialized = 0; return 0; } # endif # else int glthread_recursive_lock_init_multithreaded (gl_recursive_lock_t *lock) { int err; err = pthread_mutex_init (&lock->mutex, NULL); if (err != 0) return err; lock->owner = (pthread_t) 0; lock->depth = 0; return 0; } int glthread_recursive_lock_lock_multithreaded (gl_recursive_lock_t *lock) { pthread_t self = pthread_self (); if (lock->owner != self) { int err; err = pthread_mutex_lock (&lock->mutex); if (err != 0) return err; lock->owner = self; } if (++(lock->depth) == 0) /* wraparound? */ { lock->depth--; return EAGAIN; } return 0; } int glthread_recursive_lock_unlock_multithreaded (gl_recursive_lock_t *lock) { if (lock->owner != pthread_self ()) return EPERM; if (lock->depth == 0) return EINVAL; if (--(lock->depth) == 0) { lock->owner = (pthread_t) 0; return pthread_mutex_unlock (&lock->mutex); } else return 0; } int glthread_recursive_lock_destroy_multithreaded (gl_recursive_lock_t *lock) { if (lock->owner != (pthread_t) 0) return EBUSY; return pthread_mutex_destroy (&lock->mutex); } # endif /* -------------------------- gl_once_t datatype -------------------------- */ static const pthread_once_t fresh_once = PTHREAD_ONCE_INIT; int glthread_once_singlethreaded (pthread_once_t *once_control) { /* We don't know whether pthread_once_t is an integer type, a floating-point type, a pointer type, or a structure type. */ char *firstbyte = (char *)once_control; if (*firstbyte == *(const char *)&fresh_once) { /* First time use of once_control. Invert the first byte. */ *firstbyte = ~ *(const char *)&fresh_once; return 1; } else return 0; } #endif /* ========================================================================= */ #if USE_PTH_THREADS /* Use the GNU Pth threads library. */ /* -------------------------- gl_lock_t datatype -------------------------- */ /* ------------------------- gl_rwlock_t datatype ------------------------- */ /* --------------------- gl_recursive_lock_t datatype --------------------- */ /* -------------------------- gl_once_t datatype -------------------------- */ static void glthread_once_call (void *arg) { void (**gl_once_temp_addr) (void) = (void (**) (void)) arg; void (*initfunction) (void) = *gl_once_temp_addr; initfunction (); } int glthread_once_multithreaded (pth_once_t *once_control, void (*initfunction) (void)) { void (*temp) (void) = initfunction; return (!pth_once (once_control, glthread_once_call, &temp) ? errno : 0); } int glthread_once_singlethreaded (pth_once_t *once_control) { /* We know that pth_once_t is an integer type. */ if (*once_control == PTH_ONCE_INIT) { /* First time use of once_control. Invert the marker. */ *once_control = ~ PTH_ONCE_INIT; return 1; } else return 0; } #endif /* ========================================================================= */ #if USE_SOLARIS_THREADS /* Use the old Solaris threads library. */ /* -------------------------- gl_lock_t datatype -------------------------- */ /* ------------------------- gl_rwlock_t datatype ------------------------- */ /* --------------------- gl_recursive_lock_t datatype --------------------- */ int glthread_recursive_lock_init_multithreaded (gl_recursive_lock_t *lock) { int err; err = mutex_init (&lock->mutex, USYNC_THREAD, NULL); if (err != 0) return err; lock->owner = (thread_t) 0; lock->depth = 0; return 0; } int glthread_recursive_lock_lock_multithreaded (gl_recursive_lock_t *lock) { thread_t self = thr_self (); if (lock->owner != self) { int err; err = mutex_lock (&lock->mutex); if (err != 0) return err; lock->owner = self; } if (++(lock->depth) == 0) /* wraparound? */ { lock->depth--; return EAGAIN; } return 0; } int glthread_recursive_lock_unlock_multithreaded (gl_recursive_lock_t *lock) { if (lock->owner != thr_self ()) return EPERM; if (lock->depth == 0) return EINVAL; if (--(lock->depth) == 0) { lock->owner = (thread_t) 0; return mutex_unlock (&lock->mutex); } else return 0; } int glthread_recursive_lock_destroy_multithreaded (gl_recursive_lock_t *lock) { if (lock->owner != (thread_t) 0) return EBUSY; return mutex_destroy (&lock->mutex); } /* -------------------------- gl_once_t datatype -------------------------- */ int glthread_once_multithreaded (gl_once_t *once_control, void (*initfunction) (void)) { if (!once_control->inited) { int err; /* Use the mutex to guarantee that if another thread is already calling the initfunction, this thread waits until it's finished. */ err = mutex_lock (&once_control->mutex); if (err != 0) return err; if (!once_control->inited) { once_control->inited = 1; initfunction (); } return mutex_unlock (&once_control->mutex); } else return 0; } int glthread_once_singlethreaded (gl_once_t *once_control) { /* We know that gl_once_t contains an integer type. */ if (!once_control->inited) { /* First time use of once_control. Invert the marker. */ once_control->inited = ~ 0; return 1; } else return 0; } #endif /* ========================================================================= */ #if USE_WIN32_THREADS /* -------------------------- gl_lock_t datatype -------------------------- */ void glthread_lock_init_func (gl_lock_t *lock) { InitializeCriticalSection (&lock->lock); lock->guard.done = 1; } int glthread_lock_lock_func (gl_lock_t *lock) { if (!lock->guard.done) { if (InterlockedIncrement (&lock->guard.started) == 0) /* This thread is the first one to need this lock. Initialize it. */ glthread_lock_init (lock); else /* Yield the CPU while waiting for another thread to finish initializing this lock. */ while (!lock->guard.done) Sleep (0); } EnterCriticalSection (&lock->lock); return 0; } int glthread_lock_unlock_func (gl_lock_t *lock) { if (!lock->guard.done) return EINVAL; LeaveCriticalSection (&lock->lock); return 0; } int glthread_lock_destroy_func (gl_lock_t *lock) { if (!lock->guard.done) return EINVAL; DeleteCriticalSection (&lock->lock); lock->guard.done = 0; return 0; } /* ------------------------- gl_rwlock_t datatype ------------------------- */ /* In this file, the waitqueues are implemented as circular arrays. */ #define gl_waitqueue_t gl_carray_waitqueue_t static inline void gl_waitqueue_init (gl_waitqueue_t *wq) { wq->array = NULL; wq->count = 0; wq->alloc = 0; wq->offset = 0; } /* Enqueues the current thread, represented by an event, in a wait queue. Returns INVALID_HANDLE_VALUE if an allocation failure occurs. */ static HANDLE gl_waitqueue_add (gl_waitqueue_t *wq) { HANDLE event; unsigned int index; if (wq->count == wq->alloc) { unsigned int new_alloc = 2 * wq->alloc + 1; HANDLE *new_array = (HANDLE *) realloc (wq->array, new_alloc * sizeof (HANDLE)); if (new_array == NULL) /* No more memory. */ return INVALID_HANDLE_VALUE; /* Now is a good opportunity to rotate the array so that its contents starts at offset 0. */ if (wq->offset > 0) { unsigned int old_count = wq->count; unsigned int old_alloc = wq->alloc; unsigned int old_offset = wq->offset; unsigned int i; if (old_offset + old_count > old_alloc) { unsigned int limit = old_offset + old_count - old_alloc; for (i = 0; i < limit; i++) new_array[old_alloc + i] = new_array[i]; } for (i = 0; i < old_count; i++) new_array[i] = new_array[old_offset + i]; wq->offset = 0; } wq->array = new_array; wq->alloc = new_alloc; } /* Whether the created event is a manual-reset one or an auto-reset one, does not matter, since we will wait on it only once. */ event = CreateEvent (NULL, TRUE, FALSE, NULL); if (event == INVALID_HANDLE_VALUE) /* No way to allocate an event. */ return INVALID_HANDLE_VALUE; index = wq->offset + wq->count; if (index >= wq->alloc) index -= wq->alloc; wq->array[index] = event; wq->count++; return event; } /* Notifies the first thread from a wait queue and dequeues it. */ static inline void gl_waitqueue_notify_first (gl_waitqueue_t *wq) { SetEvent (wq->array[wq->offset + 0]); wq->offset++; wq->count--; if (wq->count == 0 || wq->offset == wq->alloc) wq->offset = 0; } /* Notifies all threads from a wait queue and dequeues them all. */ static inline void gl_waitqueue_notify_all (gl_waitqueue_t *wq) { unsigned int i; for (i = 0; i < wq->count; i++) { unsigned int index = wq->offset + i; if (index >= wq->alloc) index -= wq->alloc; SetEvent (wq->array[index]); } wq->count = 0; wq->offset = 0; } void glthread_rwlock_init_func (gl_rwlock_t *lock) { InitializeCriticalSection (&lock->lock); gl_waitqueue_init (&lock->waiting_readers); gl_waitqueue_init (&lock->waiting_writers); lock->runcount = 0; lock->guard.done = 1; } int glthread_rwlock_rdlock_func (gl_rwlock_t *lock) { if (!lock->guard.done) { if (InterlockedIncrement (&lock->guard.started) == 0) /* This thread is the first one to need this lock. Initialize it. */ glthread_rwlock_init (lock); else /* Yield the CPU while waiting for another thread to finish initializing this lock. */ while (!lock->guard.done) Sleep (0); } EnterCriticalSection (&lock->lock); /* Test whether only readers are currently running, and whether the runcount field will not overflow. */ if (!(lock->runcount + 1 > 0)) { /* This thread has to wait for a while. Enqueue it among the waiting_readers. */ HANDLE event = gl_waitqueue_add (&lock->waiting_readers); if (event != INVALID_HANDLE_VALUE) { DWORD result; LeaveCriticalSection (&lock->lock); /* Wait until another thread signals this event. */ result = WaitForSingleObject (event, INFINITE); if (result == WAIT_FAILED || result == WAIT_TIMEOUT) abort (); CloseHandle (event); /* The thread which signalled the event already did the bookkeeping: removed us from the waiting_readers, incremented lock->runcount. */ if (!(lock->runcount > 0)) abort (); return 0; } else { /* Allocation failure. Weird. */ do { LeaveCriticalSection (&lock->lock); Sleep (1); EnterCriticalSection (&lock->lock); } while (!(lock->runcount + 1 > 0)); } } lock->runcount++; LeaveCriticalSection (&lock->lock); return 0; } int glthread_rwlock_wrlock_func (gl_rwlock_t *lock) { if (!lock->guard.done) { if (InterlockedIncrement (&lock->guard.started) == 0) /* This thread is the first one to need this lock. Initialize it. */ glthread_rwlock_init (lock); else /* Yield the CPU while waiting for another thread to finish initializing this lock. */ while (!lock->guard.done) Sleep (0); } EnterCriticalSection (&lock->lock); /* Test whether no readers or writers are currently running. */ if (!(lock->runcount == 0)) { /* This thread has to wait for a while. Enqueue it among the waiting_writers. */ HANDLE event = gl_waitqueue_add (&lock->waiting_writers); if (event != INVALID_HANDLE_VALUE) { DWORD result; LeaveCriticalSection (&lock->lock); /* Wait until another thread signals this event. */ result = WaitForSingleObject (event, INFINITE); if (result == WAIT_FAILED || result == WAIT_TIMEOUT) abort (); CloseHandle (event); /* The thread which signalled the event already did the bookkeeping: removed us from the waiting_writers, set lock->runcount = -1. */ if (!(lock->runcount == -1)) abort (); return 0; } else { /* Allocation failure. Weird. */ do { LeaveCriticalSection (&lock->lock); Sleep (1); EnterCriticalSection (&lock->lock); } while (!(lock->runcount == 0)); } } lock->runcount--; /* runcount becomes -1 */ LeaveCriticalSection (&lock->lock); return 0; } int glthread_rwlock_unlock_func (gl_rwlock_t *lock) { if (!lock->guard.done) return EINVAL; EnterCriticalSection (&lock->lock); if (lock->runcount < 0) { /* Drop a writer lock. */ if (!(lock->runcount == -1)) abort (); lock->runcount = 0; } else { /* Drop a reader lock. */ if (!(lock->runcount > 0)) { LeaveCriticalSection (&lock->lock); return EPERM; } lock->runcount--; } if (lock->runcount == 0) { /* POSIX recommends that "write locks shall take precedence over read locks", to avoid "writer starvation". */ if (lock->waiting_writers.count > 0) { /* Wake up one of the waiting writers. */ lock->runcount--; gl_waitqueue_notify_first (&lock->waiting_writers); } else { /* Wake up all waiting readers. */ lock->runcount += lock->waiting_readers.count; gl_waitqueue_notify_all (&lock->waiting_readers); } } LeaveCriticalSection (&lock->lock); return 0; } int glthread_rwlock_destroy_func (gl_rwlock_t *lock) { if (!lock->guard.done) return EINVAL; if (lock->runcount != 0) return EBUSY; DeleteCriticalSection (&lock->lock); if (lock->waiting_readers.array != NULL) free (lock->waiting_readers.array); if (lock->waiting_writers.array != NULL) free (lock->waiting_writers.array); lock->guard.done = 0; return 0; } /* --------------------- gl_recursive_lock_t datatype --------------------- */ void glthread_recursive_lock_init_func (gl_recursive_lock_t *lock) { lock->owner = 0; lock->depth = 0; InitializeCriticalSection (&lock->lock); lock->guard.done = 1; } int glthread_recursive_lock_lock_func (gl_recursive_lock_t *lock) { if (!lock->guard.done) { if (InterlockedIncrement (&lock->guard.started) == 0) /* This thread is the first one to need this lock. Initialize it. */ glthread_recursive_lock_init (lock); else /* Yield the CPU while waiting for another thread to finish initializing this lock. */ while (!lock->guard.done) Sleep (0); } { DWORD self = GetCurrentThreadId (); if (lock->owner != self) { EnterCriticalSection (&lock->lock); lock->owner = self; } if (++(lock->depth) == 0) /* wraparound? */ { lock->depth--; return EAGAIN; } } return 0; } int glthread_recursive_lock_unlock_func (gl_recursive_lock_t *lock) { if (lock->owner != GetCurrentThreadId ()) return EPERM; if (lock->depth == 0) return EINVAL; if (--(lock->depth) == 0) { lock->owner = 0; LeaveCriticalSection (&lock->lock); } return 0; } int glthread_recursive_lock_destroy_func (gl_recursive_lock_t *lock) { if (lock->owner != 0) return EBUSY; DeleteCriticalSection (&lock->lock); lock->guard.done = 0; return 0; } /* -------------------------- gl_once_t datatype -------------------------- */ void glthread_once_func (gl_once_t *once_control, void (*initfunction) (void)) { if (once_control->inited <= 0) { if (InterlockedIncrement (&once_control->started) == 0) { /* This thread is the first one to come to this once_control. */ InitializeCriticalSection (&once_control->lock); EnterCriticalSection (&once_control->lock); once_control->inited = 0; initfunction (); once_control->inited = 1; LeaveCriticalSection (&once_control->lock); } else { /* Undo last operation. */ InterlockedDecrement (&once_control->started); /* Some other thread has already started the initialization. Yield the CPU while waiting for the other thread to finish initializing and taking the lock. */ while (once_control->inited < 0) Sleep (0); if (once_control->inited <= 0) { /* Take the lock. This blocks until the other thread has finished calling the initfunction. */ EnterCriticalSection (&once_control->lock); LeaveCriticalSection (&once_control->lock); if (!(once_control->inited > 0)) abort (); } } } } #endif /* ========================================================================= */ libprelude-1.0.0/libmissing/glthread/thread.c0000664000076400007640000001376611341220435016147 00000000000000/* Creating and controlling threads. Copyright (C) 2005-2010 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser 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 Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ /* Written by Bruno Haible , 2005. Based on GCC's gthr-posix.h, gthr-posix95.h, gthr-solaris.h, gthr-win32.h. */ #include /* Specification. */ #include "glthread/thread.h" #include #include "glthread/lock.h" /* ========================================================================= */ #if USE_WIN32_THREADS #include /* -------------------------- gl_thread_t datatype -------------------------- */ /* The Thread-Local Storage (TLS) key that allows to access each thread's 'struct gl_thread_struct *' pointer. */ static DWORD self_key = (DWORD)-1; /* Initializes self_key. This function must only be called once. */ static void do_init_self_key (void) { self_key = TlsAlloc (); /* If this fails, we're hosed. */ if (self_key == (DWORD)-1) abort (); } /* Initializes self_key. */ static void init_self_key (void) { gl_once_define(static, once) gl_once (once, do_init_self_key); } /* This structure contains information about a thread. It is stored in TLS under key self_key. */ struct gl_thread_struct { /* Fields for managing the handle. */ HANDLE volatile handle; CRITICAL_SECTION handle_lock; /* Fields for managing the exit value. */ void * volatile result; /* Fields for managing the thread start. */ void * (*func) (void *); void *arg; }; /* Return a real HANDLE object for the current thread. */ static inline HANDLE get_current_thread_handle (void) { HANDLE this_handle; /* GetCurrentThread() returns a pseudo-handle, i.e. only a symbolic identifier, not a real handle. */ if (!DuplicateHandle (GetCurrentProcess (), GetCurrentThread (), GetCurrentProcess (), &this_handle, 0, FALSE, DUPLICATE_SAME_ACCESS)) abort (); return this_handle; } gl_thread_t gl_thread_self_func (void) { gl_thread_t thread; if (self_key == (DWORD)-1) init_self_key (); thread = TlsGetValue (self_key); if (thread == NULL) { /* This happens only in threads that have not been created through glthread_create(), such as the main thread. */ for (;;) { thread = (struct gl_thread_struct *) malloc (sizeof (struct gl_thread_struct)); if (thread != NULL) break; /* Memory allocation failed. There is not much we can do. Have to busy-loop, waiting for the availability of memory. */ Sleep (1); } thread->handle = get_current_thread_handle (); InitializeCriticalSection (&thread->handle_lock); thread->result = NULL; /* just to be deterministic */ TlsSetValue (self_key, thread); } return thread; } /* The main function of a freshly creating thread. It's a wrapper around the FUNC and ARG arguments passed to glthread_create_func. */ static unsigned int WINAPI wrapper_func (void *varg) { struct gl_thread_struct *thread = (struct gl_thread_struct *)varg; EnterCriticalSection (&thread->handle_lock); /* Create a new handle for the thread only if the parent thread did not yet fill in the handle. */ if (thread->handle == NULL) thread->handle = get_current_thread_handle (); LeaveCriticalSection (&thread->handle_lock); if (self_key == (DWORD)-1) init_self_key (); TlsSetValue (self_key, thread); /* Run the thread. Store the exit value if the thread was not terminated otherwise. */ thread->result = thread->func (thread->arg); return 0; } int glthread_create_func (gl_thread_t *threadp, void * (*func) (void *), void *arg) { struct gl_thread_struct *thread = (struct gl_thread_struct *) malloc (sizeof (struct gl_thread_struct)); if (thread == NULL) return ENOMEM; thread->handle = NULL; InitializeCriticalSection (&thread->handle_lock); thread->result = NULL; /* just to be deterministic */ thread->func = func; thread->arg = arg; { unsigned int thread_id; HANDLE thread_handle; thread_handle = (HANDLE) _beginthreadex (NULL, 100000, wrapper_func, thread, 0, &thread_id); /* calls CreateThread with the same arguments */ if (thread_handle == NULL) { DeleteCriticalSection (&thread->handle_lock); free (thread); return EAGAIN; } EnterCriticalSection (&thread->handle_lock); if (thread->handle == NULL) thread->handle = thread_handle; else /* thread->handle was already set by the thread itself. */ CloseHandle (thread_handle); LeaveCriticalSection (&thread->handle_lock); *threadp = thread; return 0; } } int glthread_join_func (gl_thread_t thread, void **retvalp) { if (thread == NULL) return EINVAL; if (thread == gl_thread_self ()) return EDEADLK; if (WaitForSingleObject (thread->handle, INFINITE) == WAIT_FAILED) return EINVAL; if (retvalp != NULL) *retvalp = thread->result; DeleteCriticalSection (&thread->handle_lock); CloseHandle (thread->handle); free (thread); return 0; } int gl_thread_exit_func (void *retval) { gl_thread_t thread = gl_thread_self (); thread->result = retval; _endthreadex (0); /* calls ExitThread (0) */ abort (); } #endif /* ========================================================================= */ libprelude-1.0.0/libmissing/glthread/thread.h0000664000076400007640000002720211341220435016142 00000000000000/* Creating and controlling threads. Copyright (C) 2005-2010 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser 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 Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ /* Written by Bruno Haible , 2005. Based on GCC's gthr-posix.h, gthr-posix95.h, gthr-solaris.h, gthr-win32.h. */ /* This file contains primitives for creating and controlling threads. Thread data type: gl_thread_t. Creating a thread: thread = gl_thread_create (func, arg); Or with control of error handling: err = glthread_create (&thread, func, arg); extern int glthread_create (gl_thread_t *result, void *(*func) (void *), void *arg); Querying and changing the signal mask of a thread (not supported on all platforms): gl_thread_sigmask (how, newmask, oldmask); Or with control of error handling: err = glthread_sigmask (how, newmask, oldmask); extern int glthread_sigmask (int how, const sigset_t *newmask, sigset_t *oldmask); Waiting for termination of another thread: gl_thread_join (thread, &return_value); Or with control of error handling: err = glthread_join (thread, &return_value); extern int glthread_join (gl_thread_t thread, void **return_value_ptr); Getting a reference to the current thread: current = gl_thread_self (); extern gl_thread_t gl_thread_self (void); Terminating the current thread: gl_thread_exit (return_value); extern void gl_thread_exit (void *return_value) __attribute__ ((noreturn)); Requesting custom code to be executed at fork() time(not supported on all platforms): gl_thread_atfork (prepare_func, parent_func, child_func); Or with control of error handling: err = glthread_atfork (prepare_func, parent_func, child_func); extern int glthread_atfork (void (*prepare_func) (void), void (*parent_func) (void), void (*child_func) (void)); Note that even on platforms where this is supported, use of fork() and threads together is problematic, see */ #ifndef _GLTHREAD_THREAD_H #define _GLTHREAD_THREAD_H #include #include /* ========================================================================= */ #if USE_POSIX_THREADS /* Use the POSIX threads library. */ # include # ifdef __cplusplus extern "C" { # endif # if PTHREAD_IN_USE_DETECTION_HARD /* The pthread_in_use() detection needs to be done at runtime. */ # define pthread_in_use() \ glthread_in_use () extern int glthread_in_use (void); # endif # if USE_POSIX_THREADS_WEAK /* Use weak references to the POSIX threads library. */ /* Weak references avoid dragging in external libraries if the other parts of the program don't use them. Here we use them, because we don't want every program that uses libintl to depend on libpthread. This assumes that libpthread would not be loaded after libintl; i.e. if libintl is loaded first, by an executable that does not depend on libpthread, and then a module is dynamically loaded that depends on libpthread, libintl will not be multithread-safe. */ /* The way to test at runtime whether libpthread is present is to test whether a function pointer's value, such as &pthread_mutex_init, is non-NULL. However, some versions of GCC have a bug through which, in PIC mode, &foo != NULL always evaluates to true if there is a direct call to foo(...) in the same function. To avoid this, we test the address of a function in libpthread that we don't use. */ # pragma weak pthread_create # pragma weak pthread_sigmask # pragma weak pthread_join # ifndef pthread_self # pragma weak pthread_self # endif # pragma weak pthread_exit # if HAVE_PTHREAD_ATFORK # pragma weak pthread_atfork # endif # if !PTHREAD_IN_USE_DETECTION_HARD # pragma weak pthread_cancel # define pthread_in_use() (pthread_cancel != NULL) # endif # else # if !PTHREAD_IN_USE_DETECTION_HARD # define pthread_in_use() 1 # endif # endif /* -------------------------- gl_thread_t datatype -------------------------- */ /* This choice of gl_thread_t assumes that pthread_equal (a, b) is equivalent to ((a) == (b)). This is the case on all platforms in use in 2008. */ typedef pthread_t gl_thread_t; # define glthread_create(THREADP, FUNC, ARG) \ (pthread_in_use () ? pthread_create (THREADP, NULL, FUNC, ARG) : ENOSYS) # define glthread_sigmask(HOW, SET, OSET) \ (pthread_in_use () ? pthread_sigmask (HOW, SET, OSET) : 0) # define glthread_join(THREAD, RETVALP) \ (pthread_in_use () ? pthread_join (THREAD, RETVALP) : 0) # define gl_thread_self() \ (pthread_in_use () ? (void *) pthread_self () : NULL) # define gl_thread_exit(RETVAL) \ (pthread_in_use () ? pthread_exit (RETVAL) : 0) # if HAVE_PTHREAD_ATFORK # define glthread_atfork(PREPARE_FUNC, PARENT_FUNC, CHILD_FUNC) \ (pthread_in_use () ? pthread_atfork (PREPARE_FUNC, PARENT_FUNC, CHILD_FUNC) : 0) # else # define glthread_atfork(PREPARE_FUNC, PARENT_FUNC, CHILD_FUNC) 0 # endif # ifdef __cplusplus } # endif #endif /* ========================================================================= */ #if USE_PTH_THREADS /* Use the GNU Pth threads library. */ # include # ifdef __cplusplus extern "C" { # endif # if USE_PTH_THREADS_WEAK /* Use weak references to the GNU Pth threads library. */ # pragma weak pth_spawn # pragma weak pth_sigmask # pragma weak pth_join # pragma weak pth_self # pragma weak pth_exit # pragma weak pth_cancel # define pth_in_use() (pth_cancel != NULL) # else # define pth_in_use() 1 # endif /* -------------------------- gl_thread_t datatype -------------------------- */ typedef pth_t gl_thread_t; # define glthread_create(THREADP, FUNC, ARG) \ (pth_in_use () ? ((*(THREADP) = pth_spawn (NULL, FUNC, ARG)) ? 0 : errno) : 0) # define glthread_sigmask(HOW, SET, OSET) \ (pth_in_use () && !pth_sigmask (HOW, SET, OSET) ? errno : 0) # define glthread_join(THREAD, RETVALP) \ (pth_in_use () && !pth_join (THREAD, RETVALP) ? errno : 0) # define gl_thread_self() \ (pth_in_use () ? (void *) pth_self () : 0) # define gl_thread_exit(RETVAL) \ (pth_in_use () ? pth_exit (RETVAL) : 0) # define glthread_atfork(PREPARE_FUNC, PARENT_FUNC, CHILD_FUNC) 0 # ifdef __cplusplus } # endif #endif /* ========================================================================= */ #if USE_SOLARIS_THREADS /* Use the old Solaris threads library. */ # include # include # ifdef __cplusplus extern "C" { # endif # if USE_SOLARIS_THREADS_WEAK /* Use weak references to the old Solaris threads library. */ # pragma weak thr_create # pragma weak thr_join # pragma weak thr_self # pragma weak thr_exit # pragma weak thr_suspend # define thread_in_use() (thr_suspend != NULL) # else # define thread_in_use() 1 # endif /* -------------------------- gl_thread_t datatype -------------------------- */ typedef thread_t gl_thread_t; # define glthread_create(THREADP, FUNC, ARG) \ (thread_in_use () ? thr_create (NULL, 0, FUNC, ARG, 0, THREADP) : 0) # define glthread_sigmask(HOW, SET, OSET) \ (thread_in_use () ? sigprocmask (HOW, SET, OSET) : 0) # define glthread_join(THREAD, RETVALP) \ (thread_in_use () ? thr_join (THREAD, NULL, RETVALP) : 0) # define gl_thread_self() \ (thread_in_use () ? (void *) thr_self () : 0) # define gl_thread_exit(RETVAL) \ (thread_in_use () ? thr_exit (RETVAL) : 0) # define glthread_atfork(PREPARE_FUNC, PARENT_FUNC, CHILD_FUNC) 0 # ifdef __cplusplus } # endif #endif /* ========================================================================= */ #if USE_WIN32_THREADS # include # ifdef __cplusplus extern "C" { # endif /* -------------------------- gl_thread_t datatype -------------------------- */ /* The gl_thread_t is a pointer to a structure in memory. Why not the thread handle? If it were the thread handle, it would be hard to implement gl_thread_self() (since GetCurrentThread () returns a pseudo- handle, DuplicateHandle (GetCurrentThread ()) returns a handle that must be closed afterwards, and there is no function for quickly retrieving a thread handle from its id). Why not the thread id? I tried it. It did not work: Sometimes ids appeared that did not belong to running threads, and glthread_join failed with ESRCH. */ typedef struct gl_thread_struct *gl_thread_t; # define glthread_create(THREADP, FUNC, ARG) \ glthread_create_func (THREADP, FUNC, ARG) # define glthread_sigmask(HOW, SET, OSET) \ /* unsupported */ 0 # define glthread_join(THREAD, RETVALP) \ glthread_join_func (THREAD, RETVALP) # define gl_thread_self() \ gl_thread_self_func () # define gl_thread_exit(RETVAL) \ gl_thread_exit_func (RETVAL) # define glthread_atfork(PREPARE_FUNC, PARENT_FUNC, CHILD_FUNC) 0 extern int glthread_create_func (gl_thread_t *threadp, void * (*func) (void *), void *arg); extern int glthread_join_func (gl_thread_t thread, void **retvalp); extern gl_thread_t gl_thread_self_func (void); extern int gl_thread_exit_func (void *retval); # ifdef __cplusplus } # endif #endif /* ========================================================================= */ #if !(USE_POSIX_THREADS || USE_PTH_THREADS || USE_SOLARIS_THREADS || USE_WIN32_THREADS) /* Provide dummy implementation if threads are not supported. */ typedef int gl_thread_t; # define glthread_create(THREADP, FUNC, ARG) ENOSYS # define glthread_sigmask(HOW, SET, OSET) 0 # define glthread_join(THREAD, RETVALP) 0 # define gl_thread_self() NULL # define gl_thread_exit(RETVAL) 0 # define glthread_atfork(PREPARE_FUNC, PARENT_FUNC, CHILD_FUNC) 0 #endif /* ========================================================================= */ /* Macros with built-in error handling. */ #ifdef __cplusplus extern "C" { #endif static inline gl_thread_t gl_thread_create (void *(*func) (void *arg), void *arg) { gl_thread_t thread; int ret; ret = glthread_create (&thread, func, arg); if (ret != 0) abort (); return thread; } #define gl_thread_sigmask(HOW, SET, OSET) \ do \ { \ if (glthread_sigmask (HOW, SET, OSET)) \ abort (); \ } \ while (0) #define gl_thread_join(THREAD, RETVAL) \ do \ { \ if (glthread_join (THREAD, RETVAL)) \ abort (); \ } \ while (0) #define gl_thread_atfork(PREPARE, PARENT, CHILD) \ do \ { \ if (glthread_atfork (PREPARE, PARENT, CHILD)) \ abort (); \ } \ while (0) #ifdef __cplusplus } #endif #endif /* _GLTHREAD_THREAD_H */ libprelude-1.0.0/libmissing/glthread/cond.c0000664000076400007640000003470011341220435015612 00000000000000/* Condition variables for multithreading. Copyright (C) 2008, 2009, 2010 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser 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 Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ /* Written by Yoann Vandoorselaere , 2008, and Bruno Haible , 2008. */ #include #include "glthread/cond.h" /* ========================================================================= */ #if USE_PTH_THREADS /* -------------------------- gl_cond_t datatype -------------------------- */ int glthread_cond_timedwait_multithreaded (gl_cond_t *cond, gl_lock_t *lock, struct timespec *abstime) { int ret, status; pth_event_t ev; ev = pth_event (PTH_EVENT_TIME, pth_time (abstime->tv_sec, abstime->tv_nsec / 1000)); ret = pth_cond_await (cond, lock, ev); status = pth_event_status (ev); pth_event_free (ev, PTH_FREE_THIS); if (status == PTH_STATUS_OCCURRED) return ETIMEDOUT; return ret; } #endif /* ========================================================================= */ #if USE_SOLARIS_THREADS /* -------------------------- gl_cond_t datatype -------------------------- */ int glthread_cond_timedwait_multithreaded (gl_cond_t *cond, gl_lock_t *lock, struct timespec *abstime) { int ret; ret = cond_timedwait (cond, lock, abstime); if (ret == ETIME) return ETIMEDOUT; return ret; } #endif /* ========================================================================= */ #if USE_WIN32_THREADS #include /* -------------------------- gl_cond_t datatype -------------------------- */ /* In this file, the waitqueues are implemented as linked lists. */ #define gl_waitqueue_t gl_linked_waitqueue_t /* All links of a circular list, except the anchor, are of this type, carrying a payload. */ struct gl_waitqueue_element { struct gl_waitqueue_link link; /* must be the first field! */ HANDLE event; /* Waiting thread, represented by an event. This field is immutable once initialized. */ }; static inline void gl_waitqueue_init (gl_waitqueue_t *wq) { wq->wq_list.wql_next = &wq->wq_list; wq->wq_list.wql_prev = &wq->wq_list; } /* Enqueues the current thread, represented by an event, in a wait queue. Returns NULL if an allocation failure occurs. */ static struct gl_waitqueue_element * gl_waitqueue_add (gl_waitqueue_t *wq) { struct gl_waitqueue_element *elt; HANDLE event; /* Allocate the memory for the waitqueue element on the heap, not on the thread's stack. If the thread exits unexpectedly, we prefer to leak some memory rather than to access unavailable memory and crash. */ elt = (struct gl_waitqueue_element *) malloc (sizeof (struct gl_waitqueue_element)); if (elt == NULL) /* No more memory. */ return NULL; /* Whether the created event is a manual-reset one or an auto-reset one, does not matter, since we will wait on it only once. */ event = CreateEvent (NULL, TRUE, FALSE, NULL); if (event == INVALID_HANDLE_VALUE) { /* No way to allocate an event. */ free (elt); return NULL; } elt->event = event; /* Insert elt at the end of the circular list. */ (elt->link.wql_prev = wq->wq_list.wql_prev)->wql_next = &elt->link; (elt->link.wql_next = &wq->wq_list)->wql_prev = &elt->link; return elt; } /* Removes the current thread, represented by a 'struct gl_waitqueue_element *', from a wait queue. Returns true if is was found and removed, false if it was not present. */ static inline bool gl_waitqueue_remove (gl_waitqueue_t *wq, struct gl_waitqueue_element *elt) { if (elt->link.wql_next != NULL && elt->link.wql_prev != NULL) { /* Remove elt from the circular list. */ struct gl_waitqueue_link *prev = elt->link.wql_prev; struct gl_waitqueue_link *next = elt->link.wql_next; prev->wql_next = next; next->wql_prev = prev; elt->link.wql_next = NULL; elt->link.wql_prev = NULL; return true; } else return false; } /* Notifies the first thread from a wait queue and dequeues it. */ static inline void gl_waitqueue_notify_first (gl_waitqueue_t *wq) { if (wq->wq_list.wql_next != &wq->wq_list) { struct gl_waitqueue_element *elt = (struct gl_waitqueue_element *) wq->wq_list.wql_next; struct gl_waitqueue_link *prev; struct gl_waitqueue_link *next; /* Remove elt from the circular list. */ prev = &wq->wq_list; /* = elt->link.wql_prev; */ next = elt->link.wql_next; prev->wql_next = next; next->wql_prev = prev; elt->link.wql_next = NULL; elt->link.wql_prev = NULL; SetEvent (elt->event); /* After the SetEvent, this thread cannot access *elt any more, because the woken-up thread will quickly call free (elt). */ } } /* Notifies all threads from a wait queue and dequeues them all. */ static inline void gl_waitqueue_notify_all (gl_waitqueue_t *wq) { struct gl_waitqueue_link *l; for (l = wq->wq_list.wql_next; l != &wq->wq_list; ) { struct gl_waitqueue_element *elt = (struct gl_waitqueue_element *) l; struct gl_waitqueue_link *prev; struct gl_waitqueue_link *next; /* Remove elt from the circular list. */ prev = &wq->wq_list; /* = elt->link.wql_prev; */ next = elt->link.wql_next; prev->wql_next = next; next->wql_prev = prev; elt->link.wql_next = NULL; elt->link.wql_prev = NULL; SetEvent (elt->event); /* After the SetEvent, this thread cannot access *elt any more, because the woken-up thread will quickly call free (elt). */ l = next; } if (!(wq->wq_list.wql_next == &wq->wq_list && wq->wq_list.wql_prev == &wq->wq_list)) abort (); } int glthread_cond_init_func (gl_cond_t *cond) { InitializeCriticalSection (&cond->lock); gl_waitqueue_init (&cond->waiters); cond->guard.done = 1; return 0; } int glthread_cond_wait_func (gl_cond_t *cond, gl_lock_t *lock) { if (!cond->guard.done) { if (InterlockedIncrement (&cond->guard.started) == 0) /* This thread is the first one to need this condition variable. Initialize it. */ glthread_cond_init (cond); else /* Yield the CPU while waiting for another thread to finish initializing this condition variable. */ while (!cond->guard.done) Sleep (0); } EnterCriticalSection (&cond->lock); { struct gl_waitqueue_element *elt = gl_waitqueue_add (&cond->waiters); LeaveCriticalSection (&cond->lock); if (elt == NULL) { /* Allocation failure. Weird. */ return EAGAIN; } else { HANDLE event = elt->event; int err; DWORD result; /* Now release the lock and let any other thread take it. */ err = glthread_lock_unlock (lock); if (err != 0) { EnterCriticalSection (&cond->lock); gl_waitqueue_remove (&cond->waiters, elt); LeaveCriticalSection (&cond->lock); CloseHandle (event); free (elt); return err; } /* POSIX says: "If another thread is able to acquire the mutex after the about-to-block thread has released it, then a subsequent call to pthread_cond_broadcast() or pthread_cond_signal() in that thread shall behave as if it were issued after the about-to-block thread has blocked." This is fulfilled here, because the thread signalling is done through SetEvent, not PulseEvent. */ /* Wait until another thread signals this event. */ result = WaitForSingleObject (event, INFINITE); if (result == WAIT_FAILED || result == WAIT_TIMEOUT) abort (); CloseHandle (event); free (elt); /* The thread which signalled the event already did the bookkeeping: removed us from the waiters. */ return glthread_lock_lock (lock); } } } int glthread_cond_timedwait_func (gl_cond_t *cond, gl_lock_t *lock, struct timespec *abstime) { struct timeval currtime; gettimeofday (&currtime, NULL); if (currtime.tv_sec > abstime->tv_sec || (currtime.tv_sec == abstime->tv_sec && currtime.tv_usec * 1000 >= abstime->tv_nsec)) return ETIMEDOUT; if (!cond->guard.done) { if (InterlockedIncrement (&cond->guard.started) == 0) /* This thread is the first one to need this condition variable. Initialize it. */ glthread_cond_init (cond); else /* Yield the CPU while waiting for another thread to finish initializing this condition variable. */ while (!cond->guard.done) Sleep (0); } EnterCriticalSection (&cond->lock); { struct gl_waitqueue_element *elt = gl_waitqueue_add (&cond->waiters); LeaveCriticalSection (&cond->lock); if (elt == NULL) { /* Allocation failure. Weird. */ return EAGAIN; } else { HANDLE event = elt->event; int err; DWORD timeout; DWORD result; /* Now release the lock and let any other thread take it. */ err = glthread_lock_unlock (lock); if (err != 0) { EnterCriticalSection (&cond->lock); gl_waitqueue_remove (&cond->waiters, elt); LeaveCriticalSection (&cond->lock); CloseHandle (event); free (elt); return err; } /* POSIX says: "If another thread is able to acquire the mutex after the about-to-block thread has released it, then a subsequent call to pthread_cond_broadcast() or pthread_cond_signal() in that thread shall behave as if it were issued after the about-to-block thread has blocked." This is fulfilled here, because the thread signalling is done through SetEvent, not PulseEvent. */ /* Wait until another thread signals this event or until the abstime passes. */ gettimeofday (&currtime, NULL); if (currtime.tv_sec > abstime->tv_sec) timeout = 0; else { unsigned long seconds = abstime->tv_sec - currtime.tv_sec; timeout = seconds * 1000; if (timeout / 1000 != seconds) /* overflow? */ timeout = INFINITE; else { long milliseconds = abstime->tv_nsec / 1000000 - currtime.tv_usec / 1000; if (milliseconds >= 0) { timeout += milliseconds; if (timeout < milliseconds) /* overflow? */ timeout = INFINITE; } else { if (timeout >= - milliseconds) timeout -= (- milliseconds); else timeout = 0; } } } result = WaitForSingleObject (event, timeout); if (result == WAIT_FAILED) abort (); if (result == WAIT_TIMEOUT) { EnterCriticalSection (&cond->lock); if (gl_waitqueue_remove (&cond->waiters, elt)) { /* The event was not signaled between the WaitForSingleObject call and the EnterCriticalSection call. */ if (!(WaitForSingleObject (event, 0) == WAIT_TIMEOUT)) abort (); } else { /* The event was signaled between the WaitForSingleObject call and the EnterCriticalSection call. */ if (!(WaitForSingleObject (event, 0) == WAIT_OBJECT_0)) abort (); /* Produce the right return value. */ result = WAIT_OBJECT_0; } LeaveCriticalSection (&cond->lock); } else { /* The thread which signalled the event already did the bookkeeping: removed us from the waiters. */ } CloseHandle (event); free (elt); /* Take the lock again. It does not matter whether this is done before or after the bookkeeping for WAIT_TIMEOUT. */ err = glthread_lock_lock (lock); return (err ? err : result == WAIT_OBJECT_0 ? 0 : result == WAIT_TIMEOUT ? ETIMEDOUT : /* WAIT_FAILED shouldn't happen */ EAGAIN); } } } int glthread_cond_signal_func (gl_cond_t *cond) { if (!cond->guard.done) return EINVAL; EnterCriticalSection (&cond->lock); /* POSIX says: "The pthread_cond_broadcast() and pthread_cond_signal() functions shall have no effect if there are no threads currently blocked on cond." */ if (cond->waiters.wq_list.wql_next != &cond->waiters.wq_list) gl_waitqueue_notify_first (&cond->waiters); LeaveCriticalSection (&cond->lock); return 0; } int glthread_cond_broadcast_func (gl_cond_t *cond) { if (!cond->guard.done) return EINVAL; EnterCriticalSection (&cond->lock); /* POSIX says: "The pthread_cond_broadcast() and pthread_cond_signal() functions shall have no effect if there are no threads currently blocked on cond." gl_waitqueue_notify_all is a nop in this case. */ gl_waitqueue_notify_all (&cond->waiters); LeaveCriticalSection (&cond->lock); return 0; } int glthread_cond_destroy_func (gl_cond_t *cond) { if (!cond->guard.done) return EINVAL; if (cond->waiters.wq_list.wql_next != &cond->waiters.wq_list) return EBUSY; DeleteCriticalSection (&cond->lock); cond->guard.done = 0; return 0; } #endif /* ========================================================================= */ libprelude-1.0.0/libmissing/glthread/tls.h0000664000076400007640000002176711341220435015507 00000000000000/* Thread-local storage in multithreaded situations. Copyright (C) 2005, 2007-2010 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 3 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 Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . */ /* Written by Bruno Haible , 2005. */ /* This file contains thread-local storage primitives for use with a given thread library. It does not contain primitives for creating threads or for other multithreading primitives. Type: gl_tls_key_t Initialization: gl_tls_key_init (name, destructor); Getting per-thread value: gl_tls_get (name) Setting per-thread value: gl_tls_set (name, pointer); De-initialization: gl_tls_key_destroy (name); Equivalent functions with control of error handling: Initialization: err = glthread_tls_key_init (&name, destructor); Setting per-thread value: err = glthread_tls_set (&name, pointer); De-initialization: err = glthread_tls_key_destroy (&name); A per-thread value is of type 'void *'. A destructor is a function pointer of type 'void (*) (void *)', called when a thread exits, and taking the last per-thread value as argument. It is unspecified whether the destructor function is called when the last per-thread value is NULL. On some platforms, the destructor function is not called at all. */ #ifndef _TLS_H #define _TLS_H #include #include /* ========================================================================= */ #if USE_POSIX_THREADS /* Use the POSIX threads library. */ # include # if PTHREAD_IN_USE_DETECTION_HARD /* The pthread_in_use() detection needs to be done at runtime. */ # define pthread_in_use() \ glthread_in_use () extern int glthread_in_use (void); # endif # if USE_POSIX_THREADS_WEAK /* Use weak references to the POSIX threads library. */ # pragma weak pthread_key_create # pragma weak pthread_getspecific # pragma weak pthread_setspecific # pragma weak pthread_key_delete # ifndef pthread_self # pragma weak pthread_self # endif # if !PTHREAD_IN_USE_DETECTION_HARD # pragma weak pthread_cancel # define pthread_in_use() (pthread_cancel != NULL) # endif # else # if !PTHREAD_IN_USE_DETECTION_HARD # define pthread_in_use() 1 # endif # endif /* ------------------------- gl_tls_key_t datatype ------------------------- */ typedef union { void *singlethread_value; pthread_key_t key; } gl_tls_key_t; # define glthread_tls_key_init(KEY, DESTRUCTOR) \ (pthread_in_use () \ ? pthread_key_create (&(KEY)->key, DESTRUCTOR) \ : ((KEY)->singlethread_value = NULL, 0)) # define gl_tls_get(NAME) \ (pthread_in_use () \ ? pthread_getspecific ((NAME).key) \ : (NAME).singlethread_value) # define glthread_tls_set(KEY, POINTER) \ (pthread_in_use () \ ? pthread_setspecific ((KEY)->key, (POINTER)) \ : ((KEY)->singlethread_value = (POINTER), 0)) # define glthread_tls_key_destroy(KEY) \ (pthread_in_use () ? pthread_key_delete ((KEY)->key) : 0) #endif /* ========================================================================= */ #if USE_PTH_THREADS /* Use the GNU Pth threads library. */ # include # if USE_PTH_THREADS_WEAK /* Use weak references to the GNU Pth threads library. */ # pragma weak pth_key_create # pragma weak pth_key_getdata # pragma weak pth_key_setdata # pragma weak pth_key_delete # pragma weak pth_cancel # define pth_in_use() (pth_cancel != NULL) # else # define pth_in_use() 1 # endif /* ------------------------- gl_tls_key_t datatype ------------------------- */ typedef union { void *singlethread_value; pth_key_t key; } gl_tls_key_t; # define glthread_tls_key_init(KEY, DESTRUCTOR) \ (pth_in_use () \ ? (!pth_key_create (&(KEY)->key, DESTRUCTOR) ? errno : 0) \ : ((KEY)->singlethread_value = NULL, 0)) # define gl_tls_get(NAME) \ (pth_in_use () \ ? pth_key_getdata ((NAME).key) \ : (NAME).singlethread_value) # define glthread_tls_set(KEY, POINTER) \ (pth_in_use () \ ? (!pth_key_setdata ((KEY)->key, (POINTER)) ? errno : 0) \ : ((KEY)->singlethread_value = (POINTER), 0)) # define glthread_tls_key_destroy(KEY) \ (pth_in_use () \ ? (!pth_key_delete ((KEY)->key) ? errno : 0) \ : 0) #endif /* ========================================================================= */ #if USE_SOLARIS_THREADS /* Use the old Solaris threads library. */ # include # if USE_SOLARIS_THREADS_WEAK /* Use weak references to the old Solaris threads library. */ # pragma weak thr_keycreate # pragma weak thr_getspecific # pragma weak thr_setspecific # pragma weak thr_suspend # define thread_in_use() (thr_suspend != NULL) # else # define thread_in_use() 1 # endif /* ------------------------- gl_tls_key_t datatype ------------------------- */ typedef union { void *singlethread_value; thread_key_t key; } gl_tls_key_t; # define glthread_tls_key_init(KEY, DESTRUCTOR) \ (thread_in_use () \ ? thr_keycreate (&(KEY)->key, DESTRUCTOR) \ : ((KEY)->singlethread_value = NULL, 0)) # define gl_tls_get(NAME) \ (thread_in_use () \ ? glthread_tls_get_multithreaded ((NAME).key) \ : (NAME).singlethread_value) extern void *glthread_tls_get_multithreaded (thread_key_t key); # define glthread_tls_set(KEY, POINTER) \ (thread_in_use () \ ? thr_setspecific ((KEY)->key, (POINTER)) \ : ((KEY)->singlethread_value = (POINTER), 0)) # define glthread_tls_key_destroy(KEY) \ /* Unsupported. */ \ 0 #endif /* ========================================================================= */ #if USE_WIN32_THREADS # include /* ------------------------- gl_tls_key_t datatype ------------------------- */ typedef DWORD gl_tls_key_t; # define glthread_tls_key_init(KEY, DESTRUCTOR) \ /* The destructor is unsupported. */ \ ((*(KEY) = TlsAlloc ()) == (DWORD)-1 ? EAGAIN : ((void) (DESTRUCTOR), 0)) # define gl_tls_get(NAME) \ TlsGetValue (NAME) # define glthread_tls_set(KEY, POINTER) \ (!TlsSetValue (*(KEY), POINTER) ? EINVAL : 0) # define glthread_tls_key_destroy(KEY) \ (!TlsFree (*(KEY)) ? EINVAL : 0) #endif /* ========================================================================= */ #if !(USE_POSIX_THREADS || USE_PTH_THREADS || USE_SOLARIS_THREADS || USE_WIN32_THREADS) /* Provide dummy implementation if threads are not supported. */ /* ------------------------- gl_tls_key_t datatype ------------------------- */ typedef struct { void *singlethread_value; } gl_tls_key_t; # define glthread_tls_key_init(KEY, DESTRUCTOR) \ ((KEY)->singlethread_value = NULL, \ (void) (DESTRUCTOR), \ 0) # define gl_tls_get(NAME) \ (NAME).singlethread_value # define glthread_tls_set(KEY, POINTER) \ ((KEY)->singlethread_value = (POINTER), 0) # define glthread_tls_key_destroy(KEY) \ 0 #endif /* ========================================================================= */ /* Macros with built-in error handling. */ /* ------------------------- gl_tls_key_t datatype ------------------------- */ #define gl_tls_key_init(NAME, DESTRUCTOR) \ do \ { \ if (glthread_tls_key_init (&NAME, DESTRUCTOR)) \ abort (); \ } \ while (0) #define gl_tls_set(NAME, POINTER) \ do \ { \ if (glthread_tls_set (&NAME, POINTER)) \ abort (); \ } \ while (0) #define gl_tls_key_destroy(NAME) \ do \ { \ if (glthread_tls_key_destroy (&NAME)) \ abort (); \ } \ while (0) /* ========================================================================= */ #endif /* _TLS_H */ libprelude-1.0.0/libmissing/glthread/lock.h0000664000076400007640000010665711341220435015637 00000000000000/* Locking in multithreaded situations. Copyright (C) 2005-2010 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser 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 Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ /* Written by Bruno Haible , 2005. Based on GCC's gthr-posix.h, gthr-posix95.h, gthr-solaris.h, gthr-win32.h. */ /* This file contains locking primitives for use with a given thread library. It does not contain primitives for creating threads or for other synchronization primitives. Normal (non-recursive) locks: Type: gl_lock_t Declaration: gl_lock_define(extern, name) Initializer: gl_lock_define_initialized(, name) Initialization: gl_lock_init (name); Taking the lock: gl_lock_lock (name); Releasing the lock: gl_lock_unlock (name); De-initialization: gl_lock_destroy (name); Equivalent functions with control of error handling: Initialization: err = glthread_lock_init (&name); Taking the lock: err = glthread_lock_lock (&name); Releasing the lock: err = glthread_lock_unlock (&name); De-initialization: err = glthread_lock_destroy (&name); Read-Write (non-recursive) locks: Type: gl_rwlock_t Declaration: gl_rwlock_define(extern, name) Initializer: gl_rwlock_define_initialized(, name) Initialization: gl_rwlock_init (name); Taking the lock: gl_rwlock_rdlock (name); gl_rwlock_wrlock (name); Releasing the lock: gl_rwlock_unlock (name); De-initialization: gl_rwlock_destroy (name); Equivalent functions with control of error handling: Initialization: err = glthread_rwlock_init (&name); Taking the lock: err = glthread_rwlock_rdlock (&name); err = glthread_rwlock_wrlock (&name); Releasing the lock: err = glthread_rwlock_unlock (&name); De-initialization: err = glthread_rwlock_destroy (&name); Recursive locks: Type: gl_recursive_lock_t Declaration: gl_recursive_lock_define(extern, name) Initializer: gl_recursive_lock_define_initialized(, name) Initialization: gl_recursive_lock_init (name); Taking the lock: gl_recursive_lock_lock (name); Releasing the lock: gl_recursive_lock_unlock (name); De-initialization: gl_recursive_lock_destroy (name); Equivalent functions with control of error handling: Initialization: err = glthread_recursive_lock_init (&name); Taking the lock: err = glthread_recursive_lock_lock (&name); Releasing the lock: err = glthread_recursive_lock_unlock (&name); De-initialization: err = glthread_recursive_lock_destroy (&name); Once-only execution: Type: gl_once_t Initializer: gl_once_define(extern, name) Execution: gl_once (name, initfunction); Equivalent functions with control of error handling: Execution: err = glthread_once (&name, initfunction); */ #ifndef _LOCK_H #define _LOCK_H #include #include /* ========================================================================= */ #if USE_POSIX_THREADS /* Use the POSIX threads library. */ # include # ifdef __cplusplus extern "C" { # endif # if PTHREAD_IN_USE_DETECTION_HARD /* The pthread_in_use() detection needs to be done at runtime. */ # define pthread_in_use() \ glthread_in_use () extern int glthread_in_use (void); # endif # if USE_POSIX_THREADS_WEAK /* Use weak references to the POSIX threads library. */ /* Weak references avoid dragging in external libraries if the other parts of the program don't use them. Here we use them, because we don't want every program that uses libintl to depend on libpthread. This assumes that libpthread would not be loaded after libintl; i.e. if libintl is loaded first, by an executable that does not depend on libpthread, and then a module is dynamically loaded that depends on libpthread, libintl will not be multithread-safe. */ /* The way to test at runtime whether libpthread is present is to test whether a function pointer's value, such as &pthread_mutex_init, is non-NULL. However, some versions of GCC have a bug through which, in PIC mode, &foo != NULL always evaluates to true if there is a direct call to foo(...) in the same function. To avoid this, we test the address of a function in libpthread that we don't use. */ # pragma weak pthread_mutex_init # pragma weak pthread_mutex_lock # pragma weak pthread_mutex_unlock # pragma weak pthread_mutex_destroy # pragma weak pthread_rwlock_init # pragma weak pthread_rwlock_rdlock # pragma weak pthread_rwlock_wrlock # pragma weak pthread_rwlock_unlock # pragma weak pthread_rwlock_destroy # pragma weak pthread_once # pragma weak pthread_cond_init # pragma weak pthread_cond_wait # pragma weak pthread_cond_signal # pragma weak pthread_cond_broadcast # pragma weak pthread_cond_destroy # pragma weak pthread_mutexattr_init # pragma weak pthread_mutexattr_settype # pragma weak pthread_mutexattr_destroy # ifndef pthread_self # pragma weak pthread_self # endif # if !PTHREAD_IN_USE_DETECTION_HARD # pragma weak pthread_cancel # define pthread_in_use() (pthread_cancel != NULL) # endif # else # if !PTHREAD_IN_USE_DETECTION_HARD # define pthread_in_use() 1 # endif # endif /* -------------------------- gl_lock_t datatype -------------------------- */ typedef pthread_mutex_t gl_lock_t; # define gl_lock_define(STORAGECLASS, NAME) \ STORAGECLASS pthread_mutex_t NAME; # define gl_lock_define_initialized(STORAGECLASS, NAME) \ STORAGECLASS pthread_mutex_t NAME = gl_lock_initializer; # define gl_lock_initializer \ PTHREAD_MUTEX_INITIALIZER # define glthread_lock_init(LOCK) \ (pthread_in_use () ? pthread_mutex_init (LOCK, NULL) : 0) # define glthread_lock_lock(LOCK) \ (pthread_in_use () ? pthread_mutex_lock (LOCK) : 0) # define glthread_lock_unlock(LOCK) \ (pthread_in_use () ? pthread_mutex_unlock (LOCK) : 0) # define glthread_lock_destroy(LOCK) \ (pthread_in_use () ? pthread_mutex_destroy (LOCK) : 0) /* ------------------------- gl_rwlock_t datatype ------------------------- */ # if HAVE_PTHREAD_RWLOCK # ifdef PTHREAD_RWLOCK_INITIALIZER typedef pthread_rwlock_t gl_rwlock_t; # define gl_rwlock_define(STORAGECLASS, NAME) \ STORAGECLASS pthread_rwlock_t NAME; # define gl_rwlock_define_initialized(STORAGECLASS, NAME) \ STORAGECLASS pthread_rwlock_t NAME = gl_rwlock_initializer; # define gl_rwlock_initializer \ PTHREAD_RWLOCK_INITIALIZER # define glthread_rwlock_init(LOCK) \ (pthread_in_use () ? pthread_rwlock_init (LOCK, NULL) : 0) # define glthread_rwlock_rdlock(LOCK) \ (pthread_in_use () ? pthread_rwlock_rdlock (LOCK) : 0) # define glthread_rwlock_wrlock(LOCK) \ (pthread_in_use () ? pthread_rwlock_wrlock (LOCK) : 0) # define glthread_rwlock_unlock(LOCK) \ (pthread_in_use () ? pthread_rwlock_unlock (LOCK) : 0) # define glthread_rwlock_destroy(LOCK) \ (pthread_in_use () ? pthread_rwlock_destroy (LOCK) : 0) # else typedef struct { int initialized; pthread_mutex_t guard; /* protects the initialization */ pthread_rwlock_t rwlock; /* read-write lock */ } gl_rwlock_t; # define gl_rwlock_define(STORAGECLASS, NAME) \ STORAGECLASS gl_rwlock_t NAME; # define gl_rwlock_define_initialized(STORAGECLASS, NAME) \ STORAGECLASS gl_rwlock_t NAME = gl_rwlock_initializer; # define gl_rwlock_initializer \ { 0, PTHREAD_MUTEX_INITIALIZER } # define glthread_rwlock_init(LOCK) \ (pthread_in_use () ? glthread_rwlock_init_multithreaded (LOCK) : 0) # define glthread_rwlock_rdlock(LOCK) \ (pthread_in_use () ? glthread_rwlock_rdlock_multithreaded (LOCK) : 0) # define glthread_rwlock_wrlock(LOCK) \ (pthread_in_use () ? glthread_rwlock_wrlock_multithreaded (LOCK) : 0) # define glthread_rwlock_unlock(LOCK) \ (pthread_in_use () ? glthread_rwlock_unlock_multithreaded (LOCK) : 0) # define glthread_rwlock_destroy(LOCK) \ (pthread_in_use () ? glthread_rwlock_destroy_multithreaded (LOCK) : 0) extern int glthread_rwlock_init_multithreaded (gl_rwlock_t *lock); extern int glthread_rwlock_rdlock_multithreaded (gl_rwlock_t *lock); extern int glthread_rwlock_wrlock_multithreaded (gl_rwlock_t *lock); extern int glthread_rwlock_unlock_multithreaded (gl_rwlock_t *lock); extern int glthread_rwlock_destroy_multithreaded (gl_rwlock_t *lock); # endif # else typedef struct { pthread_mutex_t lock; /* protects the remaining fields */ pthread_cond_t waiting_readers; /* waiting readers */ pthread_cond_t waiting_writers; /* waiting writers */ unsigned int waiting_writers_count; /* number of waiting writers */ int runcount; /* number of readers running, or -1 when a writer runs */ } gl_rwlock_t; # define gl_rwlock_define(STORAGECLASS, NAME) \ STORAGECLASS gl_rwlock_t NAME; # define gl_rwlock_define_initialized(STORAGECLASS, NAME) \ STORAGECLASS gl_rwlock_t NAME = gl_rwlock_initializer; # define gl_rwlock_initializer \ { PTHREAD_MUTEX_INITIALIZER, PTHREAD_COND_INITIALIZER, PTHREAD_COND_INITIALIZER, 0, 0 } # define glthread_rwlock_init(LOCK) \ (pthread_in_use () ? glthread_rwlock_init_multithreaded (LOCK) : 0) # define glthread_rwlock_rdlock(LOCK) \ (pthread_in_use () ? glthread_rwlock_rdlock_multithreaded (LOCK) : 0) # define glthread_rwlock_wrlock(LOCK) \ (pthread_in_use () ? glthread_rwlock_wrlock_multithreaded (LOCK) : 0) # define glthread_rwlock_unlock(LOCK) \ (pthread_in_use () ? glthread_rwlock_unlock_multithreaded (LOCK) : 0) # define glthread_rwlock_destroy(LOCK) \ (pthread_in_use () ? glthread_rwlock_destroy_multithreaded (LOCK) : 0) extern int glthread_rwlock_init_multithreaded (gl_rwlock_t *lock); extern int glthread_rwlock_rdlock_multithreaded (gl_rwlock_t *lock); extern int glthread_rwlock_wrlock_multithreaded (gl_rwlock_t *lock); extern int glthread_rwlock_unlock_multithreaded (gl_rwlock_t *lock); extern int glthread_rwlock_destroy_multithreaded (gl_rwlock_t *lock); # endif /* --------------------- gl_recursive_lock_t datatype --------------------- */ # if HAVE_PTHREAD_MUTEX_RECURSIVE # if defined PTHREAD_RECURSIVE_MUTEX_INITIALIZER || defined PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP typedef pthread_mutex_t gl_recursive_lock_t; # define gl_recursive_lock_define(STORAGECLASS, NAME) \ STORAGECLASS pthread_mutex_t NAME; # define gl_recursive_lock_define_initialized(STORAGECLASS, NAME) \ STORAGECLASS pthread_mutex_t NAME = gl_recursive_lock_initializer; # ifdef PTHREAD_RECURSIVE_MUTEX_INITIALIZER # define gl_recursive_lock_initializer \ PTHREAD_RECURSIVE_MUTEX_INITIALIZER # else # define gl_recursive_lock_initializer \ PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP # endif # define glthread_recursive_lock_init(LOCK) \ (pthread_in_use () ? glthread_recursive_lock_init_multithreaded (LOCK) : 0) # define glthread_recursive_lock_lock(LOCK) \ (pthread_in_use () ? pthread_mutex_lock (LOCK) : 0) # define glthread_recursive_lock_unlock(LOCK) \ (pthread_in_use () ? pthread_mutex_unlock (LOCK) : 0) # define glthread_recursive_lock_destroy(LOCK) \ (pthread_in_use () ? pthread_mutex_destroy (LOCK) : 0) extern int glthread_recursive_lock_init_multithreaded (gl_recursive_lock_t *lock); # else typedef struct { pthread_mutex_t recmutex; /* recursive mutex */ pthread_mutex_t guard; /* protects the initialization */ int initialized; } gl_recursive_lock_t; # define gl_recursive_lock_define(STORAGECLASS, NAME) \ STORAGECLASS gl_recursive_lock_t NAME; # define gl_recursive_lock_define_initialized(STORAGECLASS, NAME) \ STORAGECLASS gl_recursive_lock_t NAME = gl_recursive_lock_initializer; # define gl_recursive_lock_initializer \ { PTHREAD_MUTEX_INITIALIZER, PTHREAD_MUTEX_INITIALIZER, 0 } # define glthread_recursive_lock_init(LOCK) \ (pthread_in_use () ? glthread_recursive_lock_init_multithreaded (LOCK) : 0) # define glthread_recursive_lock_lock(LOCK) \ (pthread_in_use () ? glthread_recursive_lock_lock_multithreaded (LOCK) : 0) # define glthread_recursive_lock_unlock(LOCK) \ (pthread_in_use () ? glthread_recursive_lock_unlock_multithreaded (LOCK) : 0) # define glthread_recursive_lock_destroy(LOCK) \ (pthread_in_use () ? glthread_recursive_lock_destroy_multithreaded (LOCK) : 0) extern int glthread_recursive_lock_init_multithreaded (gl_recursive_lock_t *lock); extern int glthread_recursive_lock_lock_multithreaded (gl_recursive_lock_t *lock); extern int glthread_recursive_lock_unlock_multithreaded (gl_recursive_lock_t *lock); extern int glthread_recursive_lock_destroy_multithreaded (gl_recursive_lock_t *lock); # endif # else /* Old versions of POSIX threads on Solaris did not have recursive locks. We have to implement them ourselves. */ typedef struct { pthread_mutex_t mutex; pthread_t owner; unsigned long depth; } gl_recursive_lock_t; # define gl_recursive_lock_define(STORAGECLASS, NAME) \ STORAGECLASS gl_recursive_lock_t NAME; # define gl_recursive_lock_define_initialized(STORAGECLASS, NAME) \ STORAGECLASS gl_recursive_lock_t NAME = gl_recursive_lock_initializer; # define gl_recursive_lock_initializer \ { PTHREAD_MUTEX_INITIALIZER, (pthread_t) 0, 0 } # define glthread_recursive_lock_init(LOCK) \ (pthread_in_use () ? glthread_recursive_lock_init_multithreaded (LOCK) : 0) # define glthread_recursive_lock_lock(LOCK) \ (pthread_in_use () ? glthread_recursive_lock_lock_multithreaded (LOCK) : 0) # define glthread_recursive_lock_unlock(LOCK) \ (pthread_in_use () ? glthread_recursive_lock_unlock_multithreaded (LOCK) : 0) # define glthread_recursive_lock_destroy(LOCK) \ (pthread_in_use () ? glthread_recursive_lock_destroy_multithreaded (LOCK) : 0) extern int glthread_recursive_lock_init_multithreaded (gl_recursive_lock_t *lock); extern int glthread_recursive_lock_lock_multithreaded (gl_recursive_lock_t *lock); extern int glthread_recursive_lock_unlock_multithreaded (gl_recursive_lock_t *lock); extern int glthread_recursive_lock_destroy_multithreaded (gl_recursive_lock_t *lock); # endif /* -------------------------- gl_once_t datatype -------------------------- */ typedef pthread_once_t gl_once_t; # define gl_once_define(STORAGECLASS, NAME) \ STORAGECLASS pthread_once_t NAME = PTHREAD_ONCE_INIT; # define glthread_once(ONCE_CONTROL, INITFUNCTION) \ (pthread_in_use () \ ? pthread_once (ONCE_CONTROL, INITFUNCTION) \ : (glthread_once_singlethreaded (ONCE_CONTROL) ? (INITFUNCTION (), 0) : 0)) extern int glthread_once_singlethreaded (pthread_once_t *once_control); # ifdef __cplusplus } # endif #endif /* ========================================================================= */ #if USE_PTH_THREADS /* Use the GNU Pth threads library. */ # include # ifdef __cplusplus extern "C" { # endif # if USE_PTH_THREADS_WEAK /* Use weak references to the GNU Pth threads library. */ # pragma weak pth_mutex_init # pragma weak pth_mutex_acquire # pragma weak pth_mutex_release # pragma weak pth_rwlock_init # pragma weak pth_rwlock_acquire # pragma weak pth_rwlock_release # pragma weak pth_once # pragma weak pth_cancel # define pth_in_use() (pth_cancel != NULL) # else # define pth_in_use() 1 # endif /* -------------------------- gl_lock_t datatype -------------------------- */ typedef pth_mutex_t gl_lock_t; # define gl_lock_define(STORAGECLASS, NAME) \ STORAGECLASS pth_mutex_t NAME; # define gl_lock_define_initialized(STORAGECLASS, NAME) \ STORAGECLASS pth_mutex_t NAME = gl_lock_initializer; # define gl_lock_initializer \ PTH_MUTEX_INIT # define glthread_lock_init(LOCK) \ (pth_in_use() && !pth_mutex_init (LOCK) ? errno : 0) # define glthread_lock_lock(LOCK) \ (pth_in_use() && !pth_mutex_acquire (LOCK, 0, NULL) ? errno : 0) # define glthread_lock_unlock(LOCK) \ (pth_in_use() && !pth_mutex_release (LOCK) ? errno : 0) # define glthread_lock_destroy(LOCK) \ ((void)(LOCK), 0) /* ------------------------- gl_rwlock_t datatype ------------------------- */ typedef pth_rwlock_t gl_rwlock_t; # define gl_rwlock_define(STORAGECLASS, NAME) \ STORAGECLASS pth_rwlock_t NAME; # define gl_rwlock_define_initialized(STORAGECLASS, NAME) \ STORAGECLASS pth_rwlock_t NAME = gl_rwlock_initializer; # define gl_rwlock_initializer \ PTH_RWLOCK_INIT # define glthread_rwlock_init(LOCK) \ (pth_in_use() && !pth_rwlock_init (LOCK) ? errno : 0) # define glthread_rwlock_rdlock(LOCK) \ (pth_in_use() && !pth_rwlock_acquire (LOCK, PTH_RWLOCK_RD, 0, NULL) ? errno : 0) # define glthread_rwlock_wrlock(LOCK) \ (pth_in_use() && !pth_rwlock_acquire (LOCK, PTH_RWLOCK_RW, 0, NULL) ? errno : 0) # define glthread_rwlock_unlock(LOCK) \ (pth_in_use() && !pth_rwlock_release (LOCK) ? errno : 0) # define glthread_rwlock_destroy(LOCK) \ ((void)(LOCK), 0) /* --------------------- gl_recursive_lock_t datatype --------------------- */ /* In Pth, mutexes are recursive by default. */ typedef pth_mutex_t gl_recursive_lock_t; # define gl_recursive_lock_define(STORAGECLASS, NAME) \ STORAGECLASS pth_mutex_t NAME; # define gl_recursive_lock_define_initialized(STORAGECLASS, NAME) \ STORAGECLASS pth_mutex_t NAME = gl_recursive_lock_initializer; # define gl_recursive_lock_initializer \ PTH_MUTEX_INIT # define glthread_recursive_lock_init(LOCK) \ (pth_in_use() && !pth_mutex_init (LOCK) ? errno : 0) # define glthread_recursive_lock_lock(LOCK) \ (pth_in_use() && !pth_mutex_acquire (LOCK, 0, NULL) ? errno : 0) # define glthread_recursive_lock_unlock(LOCK) \ (pth_in_use() && !pth_mutex_release (LOCK) ? errno : 0) # define glthread_recursive_lock_destroy(LOCK) \ ((void)(LOCK), 0) /* -------------------------- gl_once_t datatype -------------------------- */ typedef pth_once_t gl_once_t; # define gl_once_define(STORAGECLASS, NAME) \ STORAGECLASS pth_once_t NAME = PTH_ONCE_INIT; # define glthread_once(ONCE_CONTROL, INITFUNCTION) \ (pth_in_use () \ ? glthread_once_multithreaded (ONCE_CONTROL, INITFUNCTION) \ : (glthread_once_singlethreaded (ONCE_CONTROL) ? (INITFUNCTION (), 0) : 0)) extern int glthread_once_multithreaded (pth_once_t *once_control, void (*initfunction) (void)); extern int glthread_once_singlethreaded (pth_once_t *once_control); # ifdef __cplusplus } # endif #endif /* ========================================================================= */ #if USE_SOLARIS_THREADS /* Use the old Solaris threads library. */ # include # include # ifdef __cplusplus extern "C" { # endif # if USE_SOLARIS_THREADS_WEAK /* Use weak references to the old Solaris threads library. */ # pragma weak mutex_init # pragma weak mutex_lock # pragma weak mutex_unlock # pragma weak mutex_destroy # pragma weak rwlock_init # pragma weak rw_rdlock # pragma weak rw_wrlock # pragma weak rw_unlock # pragma weak rwlock_destroy # pragma weak thr_self # pragma weak thr_suspend # define thread_in_use() (thr_suspend != NULL) # else # define thread_in_use() 1 # endif /* -------------------------- gl_lock_t datatype -------------------------- */ typedef mutex_t gl_lock_t; # define gl_lock_define(STORAGECLASS, NAME) \ STORAGECLASS mutex_t NAME; # define gl_lock_define_initialized(STORAGECLASS, NAME) \ STORAGECLASS mutex_t NAME = gl_lock_initializer; # define gl_lock_initializer \ DEFAULTMUTEX # define glthread_lock_init(LOCK) \ (thread_in_use () ? mutex_init (LOCK, USYNC_THREAD, NULL) : 0) # define glthread_lock_lock(LOCK) \ (thread_in_use () ? mutex_lock (LOCK) : 0) # define glthread_lock_unlock(LOCK) \ (thread_in_use () ? mutex_unlock (LOCK) : 0) # define glthread_lock_destroy(LOCK) \ (thread_in_use () ? mutex_destroy (LOCK) : 0) /* ------------------------- gl_rwlock_t datatype ------------------------- */ typedef rwlock_t gl_rwlock_t; # define gl_rwlock_define(STORAGECLASS, NAME) \ STORAGECLASS rwlock_t NAME; # define gl_rwlock_define_initialized(STORAGECLASS, NAME) \ STORAGECLASS rwlock_t NAME = gl_rwlock_initializer; # define gl_rwlock_initializer \ DEFAULTRWLOCK # define glthread_rwlock_init(LOCK) \ (thread_in_use () ? rwlock_init (LOCK, USYNC_THREAD, NULL) : 0) # define glthread_rwlock_rdlock(LOCK) \ (thread_in_use () ? rw_rdlock (LOCK) : 0) # define glthread_rwlock_wrlock(LOCK) \ (thread_in_use () ? rw_wrlock (LOCK) : 0) # define glthread_rwlock_unlock(LOCK) \ (thread_in_use () ? rw_unlock (LOCK) : 0) # define glthread_rwlock_destroy(LOCK) \ (thread_in_use () ? rwlock_destroy (LOCK) : 0) /* --------------------- gl_recursive_lock_t datatype --------------------- */ /* Old Solaris threads did not have recursive locks. We have to implement them ourselves. */ typedef struct { mutex_t mutex; thread_t owner; unsigned long depth; } gl_recursive_lock_t; # define gl_recursive_lock_define(STORAGECLASS, NAME) \ STORAGECLASS gl_recursive_lock_t NAME; # define gl_recursive_lock_define_initialized(STORAGECLASS, NAME) \ STORAGECLASS gl_recursive_lock_t NAME = gl_recursive_lock_initializer; # define gl_recursive_lock_initializer \ { DEFAULTMUTEX, (thread_t) 0, 0 } # define glthread_recursive_lock_init(LOCK) \ (thread_in_use () ? glthread_recursive_lock_init_multithreaded (LOCK) : 0) # define glthread_recursive_lock_lock(LOCK) \ (thread_in_use () ? glthread_recursive_lock_lock_multithreaded (LOCK) : 0) # define glthread_recursive_lock_unlock(LOCK) \ (thread_in_use () ? glthread_recursive_lock_unlock_multithreaded (LOCK) : 0) # define glthread_recursive_lock_destroy(LOCK) \ (thread_in_use () ? glthread_recursive_lock_destroy_multithreaded (LOCK) : 0) extern int glthread_recursive_lock_init_multithreaded (gl_recursive_lock_t *lock); extern int glthread_recursive_lock_lock_multithreaded (gl_recursive_lock_t *lock); extern int glthread_recursive_lock_unlock_multithreaded (gl_recursive_lock_t *lock); extern int glthread_recursive_lock_destroy_multithreaded (gl_recursive_lock_t *lock); /* -------------------------- gl_once_t datatype -------------------------- */ typedef struct { volatile int inited; mutex_t mutex; } gl_once_t; # define gl_once_define(STORAGECLASS, NAME) \ STORAGECLASS gl_once_t NAME = { 0, DEFAULTMUTEX }; # define glthread_once(ONCE_CONTROL, INITFUNCTION) \ (thread_in_use () \ ? glthread_once_multithreaded (ONCE_CONTROL, INITFUNCTION) \ : (glthread_once_singlethreaded (ONCE_CONTROL) ? (INITFUNCTION (), 0) : 0)) extern int glthread_once_multithreaded (gl_once_t *once_control, void (*initfunction) (void)); extern int glthread_once_singlethreaded (gl_once_t *once_control); # ifdef __cplusplus } # endif #endif /* ========================================================================= */ #if USE_WIN32_THREADS # include # ifdef __cplusplus extern "C" { # endif /* We can use CRITICAL_SECTION directly, rather than the Win32 Event, Mutex, Semaphore types, because - we need only to synchronize inside a single process (address space), not inter-process locking, - we don't need to support trylock operations. (TryEnterCriticalSection does not work on Windows 95/98/ME. Packages that need trylock usually define their own mutex type.) */ /* There is no way to statically initialize a CRITICAL_SECTION. It needs to be done lazily, once only. For this we need spinlocks. */ typedef struct { volatile int done; volatile long started; } gl_spinlock_t; /* -------------------------- gl_lock_t datatype -------------------------- */ typedef struct { gl_spinlock_t guard; /* protects the initialization */ CRITICAL_SECTION lock; } gl_lock_t; # define gl_lock_define(STORAGECLASS, NAME) \ STORAGECLASS gl_lock_t NAME; # define gl_lock_define_initialized(STORAGECLASS, NAME) \ STORAGECLASS gl_lock_t NAME = gl_lock_initializer; # define gl_lock_initializer \ { { 0, -1 } } # define glthread_lock_init(LOCK) \ (glthread_lock_init_func (LOCK), 0) # define glthread_lock_lock(LOCK) \ glthread_lock_lock_func (LOCK) # define glthread_lock_unlock(LOCK) \ glthread_lock_unlock_func (LOCK) # define glthread_lock_destroy(LOCK) \ glthread_lock_destroy_func (LOCK) extern void glthread_lock_init_func (gl_lock_t *lock); extern int glthread_lock_lock_func (gl_lock_t *lock); extern int glthread_lock_unlock_func (gl_lock_t *lock); extern int glthread_lock_destroy_func (gl_lock_t *lock); /* ------------------------- gl_rwlock_t datatype ------------------------- */ /* It is impossible to implement read-write locks using plain locks, without introducing an extra thread dedicated to managing read-write locks. Therefore here we need to use the low-level Event type. */ typedef struct { HANDLE *array; /* array of waiting threads, each represented by an event */ unsigned int count; /* number of waiting threads */ unsigned int alloc; /* length of allocated array */ unsigned int offset; /* index of first waiting thread in array */ } gl_carray_waitqueue_t; typedef struct { gl_spinlock_t guard; /* protects the initialization */ CRITICAL_SECTION lock; /* protects the remaining fields */ gl_carray_waitqueue_t waiting_readers; /* waiting readers */ gl_carray_waitqueue_t waiting_writers; /* waiting writers */ int runcount; /* number of readers running, or -1 when a writer runs */ } gl_rwlock_t; # define gl_rwlock_define(STORAGECLASS, NAME) \ STORAGECLASS gl_rwlock_t NAME; # define gl_rwlock_define_initialized(STORAGECLASS, NAME) \ STORAGECLASS gl_rwlock_t NAME = gl_rwlock_initializer; # define gl_rwlock_initializer \ { { 0, -1 } } # define glthread_rwlock_init(LOCK) \ (glthread_rwlock_init_func (LOCK), 0) # define glthread_rwlock_rdlock(LOCK) \ glthread_rwlock_rdlock_func (LOCK) # define glthread_rwlock_wrlock(LOCK) \ glthread_rwlock_wrlock_func (LOCK) # define glthread_rwlock_unlock(LOCK) \ glthread_rwlock_unlock_func (LOCK) # define glthread_rwlock_destroy(LOCK) \ glthread_rwlock_destroy_func (LOCK) extern void glthread_rwlock_init_func (gl_rwlock_t *lock); extern int glthread_rwlock_rdlock_func (gl_rwlock_t *lock); extern int glthread_rwlock_wrlock_func (gl_rwlock_t *lock); extern int glthread_rwlock_unlock_func (gl_rwlock_t *lock); extern int glthread_rwlock_destroy_func (gl_rwlock_t *lock); /* --------------------- gl_recursive_lock_t datatype --------------------- */ /* The Win32 documentation says that CRITICAL_SECTION already implements a recursive lock. But we need not rely on it: It's easy to implement a recursive lock without this assumption. */ typedef struct { gl_spinlock_t guard; /* protects the initialization */ DWORD owner; unsigned long depth; CRITICAL_SECTION lock; } gl_recursive_lock_t; # define gl_recursive_lock_define(STORAGECLASS, NAME) \ STORAGECLASS gl_recursive_lock_t NAME; # define gl_recursive_lock_define_initialized(STORAGECLASS, NAME) \ STORAGECLASS gl_recursive_lock_t NAME = gl_recursive_lock_initializer; # define gl_recursive_lock_initializer \ { { 0, -1 }, 0, 0 } # define glthread_recursive_lock_init(LOCK) \ (glthread_recursive_lock_init_func (LOCK), 0) # define glthread_recursive_lock_lock(LOCK) \ glthread_recursive_lock_lock_func (LOCK) # define glthread_recursive_lock_unlock(LOCK) \ glthread_recursive_lock_unlock_func (LOCK) # define glthread_recursive_lock_destroy(LOCK) \ glthread_recursive_lock_destroy_func (LOCK) extern void glthread_recursive_lock_init_func (gl_recursive_lock_t *lock); extern int glthread_recursive_lock_lock_func (gl_recursive_lock_t *lock); extern int glthread_recursive_lock_unlock_func (gl_recursive_lock_t *lock); extern int glthread_recursive_lock_destroy_func (gl_recursive_lock_t *lock); /* -------------------------- gl_once_t datatype -------------------------- */ typedef struct { volatile int inited; volatile long started; CRITICAL_SECTION lock; } gl_once_t; # define gl_once_define(STORAGECLASS, NAME) \ STORAGECLASS gl_once_t NAME = { -1, -1 }; # define glthread_once(ONCE_CONTROL, INITFUNCTION) \ (glthread_once_func (ONCE_CONTROL, INITFUNCTION), 0) extern void glthread_once_func (gl_once_t *once_control, void (*initfunction) (void)); # ifdef __cplusplus } # endif #endif /* ========================================================================= */ #if !(USE_POSIX_THREADS || USE_PTH_THREADS || USE_SOLARIS_THREADS || USE_WIN32_THREADS) /* Provide dummy implementation if threads are not supported. */ /* -------------------------- gl_lock_t datatype -------------------------- */ typedef int gl_lock_t; # define gl_lock_define(STORAGECLASS, NAME) # define gl_lock_define_initialized(STORAGECLASS, NAME) # define glthread_lock_init(NAME) 0 # define glthread_lock_lock(NAME) 0 # define glthread_lock_unlock(NAME) 0 # define glthread_lock_destroy(NAME) 0 /* ------------------------- gl_rwlock_t datatype ------------------------- */ typedef int gl_rwlock_t; # define gl_rwlock_define(STORAGECLASS, NAME) # define gl_rwlock_define_initialized(STORAGECLASS, NAME) # define glthread_rwlock_init(NAME) 0 # define glthread_rwlock_rdlock(NAME) 0 # define glthread_rwlock_wrlock(NAME) 0 # define glthread_rwlock_unlock(NAME) 0 # define glthread_rwlock_destroy(NAME) 0 /* --------------------- gl_recursive_lock_t datatype --------------------- */ typedef int gl_recursive_lock_t; # define gl_recursive_lock_define(STORAGECLASS, NAME) # define gl_recursive_lock_define_initialized(STORAGECLASS, NAME) # define glthread_recursive_lock_init(NAME) 0 # define glthread_recursive_lock_lock(NAME) 0 # define glthread_recursive_lock_unlock(NAME) 0 # define glthread_recursive_lock_destroy(NAME) 0 /* -------------------------- gl_once_t datatype -------------------------- */ typedef int gl_once_t; # define gl_once_define(STORAGECLASS, NAME) \ STORAGECLASS gl_once_t NAME = 0; # define glthread_once(ONCE_CONTROL, INITFUNCTION) \ (*(ONCE_CONTROL) == 0 ? (*(ONCE_CONTROL) = ~ 0, INITFUNCTION (), 0) : 0) #endif /* ========================================================================= */ /* Macros with built-in error handling. */ /* -------------------------- gl_lock_t datatype -------------------------- */ #define gl_lock_init(NAME) \ do \ { \ if (glthread_lock_init (&NAME)) \ abort (); \ } \ while (0) #define gl_lock_lock(NAME) \ do \ { \ if (glthread_lock_lock (&NAME)) \ abort (); \ } \ while (0) #define gl_lock_unlock(NAME) \ do \ { \ if (glthread_lock_unlock (&NAME)) \ abort (); \ } \ while (0) #define gl_lock_destroy(NAME) \ do \ { \ if (glthread_lock_destroy (&NAME)) \ abort (); \ } \ while (0) /* ------------------------- gl_rwlock_t datatype ------------------------- */ #define gl_rwlock_init(NAME) \ do \ { \ if (glthread_rwlock_init (&NAME)) \ abort (); \ } \ while (0) #define gl_rwlock_rdlock(NAME) \ do \ { \ if (glthread_rwlock_rdlock (&NAME)) \ abort (); \ } \ while (0) #define gl_rwlock_wrlock(NAME) \ do \ { \ if (glthread_rwlock_wrlock (&NAME)) \ abort (); \ } \ while (0) #define gl_rwlock_unlock(NAME) \ do \ { \ if (glthread_rwlock_unlock (&NAME)) \ abort (); \ } \ while (0) #define gl_rwlock_destroy(NAME) \ do \ { \ if (glthread_rwlock_destroy (&NAME)) \ abort (); \ } \ while (0) /* --------------------- gl_recursive_lock_t datatype --------------------- */ #define gl_recursive_lock_init(NAME) \ do \ { \ if (glthread_recursive_lock_init (&NAME)) \ abort (); \ } \ while (0) #define gl_recursive_lock_lock(NAME) \ do \ { \ if (glthread_recursive_lock_lock (&NAME)) \ abort (); \ } \ while (0) #define gl_recursive_lock_unlock(NAME) \ do \ { \ if (glthread_recursive_lock_unlock (&NAME)) \ abort (); \ } \ while (0) #define gl_recursive_lock_destroy(NAME) \ do \ { \ if (glthread_recursive_lock_destroy (&NAME)) \ abort (); \ } \ while (0) /* -------------------------- gl_once_t datatype -------------------------- */ #define gl_once(NAME, INITFUNCTION) \ do \ { \ if (glthread_once (&NAME, INITFUNCTION)) \ abort (); \ } \ while (0) /* ========================================================================= */ #endif /* _LOCK_H */ libprelude-1.0.0/libmissing/gai_strerror.c0000664000076400007640000000474311341220434015602 00000000000000/* Copyright (C) 1997, 2001, 2002, 2004, 2005, 2006, 2008, 2009, 2010 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Philip Blundell , 1997. This program is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser 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 Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ #ifndef _LIBC # include #endif #include #include #ifdef _LIBC # include #else # include "gettext.h" # define _(String) gettext (String) # define N_(String) String #endif static struct { int code; const char *msg; } values[] = { { EAI_ADDRFAMILY, N_("Address family for hostname not supported") }, { EAI_AGAIN, N_("Temporary failure in name resolution") }, { EAI_BADFLAGS, N_("Bad value for ai_flags") }, { EAI_FAIL, N_("Non-recoverable failure in name resolution") }, { EAI_FAMILY, N_("ai_family not supported") }, { EAI_MEMORY, N_("Memory allocation failure") }, { EAI_NODATA, N_("No address associated with hostname") }, { EAI_NONAME, N_("Name or service not known") }, { EAI_SERVICE, N_("Servname not supported for ai_socktype") }, { EAI_SOCKTYPE, N_("ai_socktype not supported") }, { EAI_SYSTEM, N_("System error") }, { EAI_OVERFLOW, N_("Argument buffer too small") }, #ifdef EAI_INPROGRESS { EAI_INPROGRESS, N_("Processing request in progress") }, { EAI_CANCELED, N_("Request canceled") }, { EAI_NOTCANCELED, N_("Request not canceled") }, { EAI_ALLDONE, N_("All requests done") }, { EAI_INTR, N_("Interrupted by a signal") }, { EAI_IDN_ENCODE, N_("Parameter string not correctly encoded") } #endif }; const char * gai_strerror (int code) { size_t i; for (i = 0; i < sizeof (values) / sizeof (values[0]); ++i) if (values[i].code == code) return _(values[i].msg); return _("Unknown error"); } #ifdef _LIBC libc_hidden_def (gai_strerror) #endif libprelude-1.0.0/libmissing/strcasestr.c0000664000076400007640000000607511341220440015272 00000000000000/* Case-insensitive searching in a string. Copyright (C) 2005-2010 Free Software Foundation, Inc. Written by Bruno Haible , 2005. This program is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser 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 Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ #include /* Specification. */ #include #include #include #include #define TOLOWER(Ch) (isupper (Ch) ? tolower (Ch) : (Ch)) /* Two-Way algorithm. */ #define RETURN_TYPE char * #define AVAILABLE(h, h_l, j, n_l) \ (!memchr ((h) + (h_l), '\0', (j) + (n_l) - (h_l)) \ && ((h_l) = (j) + (n_l))) #define CANON_ELEMENT(c) TOLOWER (c) #define CMP_FUNC(p1, p2, l) \ strncasecmp ((const char *) (p1), (const char *) (p2), l) #include "str-two-way.h" /* Find the first occurrence of NEEDLE in HAYSTACK, using case-insensitive comparison. This function gives unspecified results in multibyte locales. */ char * strcasestr (const char *haystack_start, const char *needle_start) { const char *haystack = haystack_start; const char *needle = needle_start; size_t needle_len; /* Length of NEEDLE. */ size_t haystack_len; /* Known minimum length of HAYSTACK. */ bool ok = true; /* True if NEEDLE is prefix of HAYSTACK. */ /* Determine length of NEEDLE, and in the process, make sure HAYSTACK is at least as long (no point processing all of a long NEEDLE if HAYSTACK is too short). */ while (*haystack && *needle) { ok &= (TOLOWER ((unsigned char) *haystack) == TOLOWER ((unsigned char) *needle)); haystack++; needle++; } if (*needle) return NULL; if (ok) return (char *) haystack_start; needle_len = needle - needle_start; haystack = haystack_start + 1; haystack_len = needle_len - 1; /* Perform the search. Abstract memory is considered to be an array of 'unsigned char' values, not an array of 'char' values. See ISO C 99 section 6.2.6.1. */ if (needle_len < LONG_NEEDLE_THRESHOLD) return two_way_short_needle ((const unsigned char *) haystack, haystack_len, (const unsigned char *) needle_start, needle_len); return two_way_long_needle ((const unsigned char *) haystack, haystack_len, (const unsigned char *) needle_start, needle_len); } #undef LONG_NEEDLE_THRESHOLD libprelude-1.0.0/libmissing/verify.h0000664000076400007640000001300311341220442014375 00000000000000/* Compile-time assert-like macros. Copyright (C) 2005-2006, 2009-2010 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 3 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 Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . */ /* Written by Paul Eggert, Bruno Haible, and Jim Meyering. */ #ifndef VERIFY_H # define VERIFY_H 1 /* Each of these macros verifies that its argument R is nonzero. To be portable, R should be an integer constant expression. Unlike assert (R), there is no run-time overhead. There are two macros, since no single macro can be used in all contexts in C. verify_true (R) is for scalar contexts, including integer constant expression contexts. verify (R) is for declaration contexts, e.g., the top level. Symbols ending in "__" are private to this header. The code below uses several ideas. * The first step is ((R) ? 1 : -1). Given an expression R, of integral or boolean or floating-point type, this yields an expression of integral type, whose value is later verified to be constant and nonnegative. * Next this expression W is wrapped in a type struct verify_type__ { unsigned int verify_error_if_negative_size__: W; }. If W is negative, this yields a compile-time error. No compiler can deal with a bit-field of negative size. One might think that an array size check would have the same effect, that is, that the type struct { unsigned int dummy[W]; } would work as well. However, inside a function, some compilers (such as C++ compilers and GNU C) allow local parameters and variables inside array size expressions. With these compilers, an array size check would not properly diagnose this misuse of the verify macro: void function (int n) { verify (n < 0); } * For the verify macro, the struct verify_type__ will need to somehow be embedded into a declaration. To be portable, this declaration must declare an object, a constant, a function, or a typedef name. If the declared entity uses the type directly, such as in struct dummy {...}; typedef struct {...} dummy; extern struct {...} *dummy; extern void dummy (struct {...} *); extern struct {...} *dummy (void); two uses of the verify macro would yield colliding declarations if the entity names are not disambiguated. A workaround is to attach the current line number to the entity name: #define GL_CONCAT0(x, y) x##y #define GL_CONCAT(x, y) GL_CONCAT0 (x, y) extern struct {...} * GL_CONCAT(dummy,__LINE__); But this has the problem that two invocations of verify from within the same macro would collide, since the __LINE__ value would be the same for both invocations. A solution is to use the sizeof operator. It yields a number, getting rid of the identity of the type. Declarations like extern int dummy [sizeof (struct {...})]; extern void dummy (int [sizeof (struct {...})]); extern int (*dummy (void)) [sizeof (struct {...})]; can be repeated. * Should the implementation use a named struct or an unnamed struct? Which of the following alternatives can be used? extern int dummy [sizeof (struct {...})]; extern int dummy [sizeof (struct verify_type__ {...})]; extern void dummy (int [sizeof (struct {...})]); extern void dummy (int [sizeof (struct verify_type__ {...})]); extern int (*dummy (void)) [sizeof (struct {...})]; extern int (*dummy (void)) [sizeof (struct verify_type__ {...})]; In the second and sixth case, the struct type is exported to the outer scope; two such declarations therefore collide. GCC warns about the first, third, and fourth cases. So the only remaining possibility is the fifth case: extern int (*dummy (void)) [sizeof (struct {...})]; * This implementation exploits the fact that GCC does not warn about the last declaration mentioned above. If a future version of GCC introduces a warning for this, the problem could be worked around by using code specialized to GCC, e.g.,: #if 4 <= __GNUC__ # define verify(R) \ extern int (* verify_function__ (void)) \ [__builtin_constant_p (R) && (R) ? 1 : -1] #endif * In C++, any struct definition inside sizeof is invalid. Use a template type to work around the problem. */ /* Verify requirement R at compile-time, as an integer constant expression. Return 1. */ # ifdef __cplusplus template struct verify_type__ { unsigned int verify_error_if_negative_size__: w; }; # define verify_true(R) \ (!!sizeof (verify_type__<(R) ? 1 : -1>)) # else # define verify_true(R) \ (!!sizeof \ (struct { unsigned int verify_error_if_negative_size__: (R) ? 1 : -1; })) # endif /* Verify requirement R at compile-time, as a declaration without a trailing ';'. */ # define verify(R) extern int (* verify_function__ (void)) [verify_true (R)] #endif libprelude-1.0.0/libmissing/mktime.c0000664000076400007640000005520211341220437014365 00000000000000/* Convert a `struct tm' to a time_t value. Copyright (C) 1993-1999, 2002-2007, 2009-2010 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Paul Eggert . This program is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser 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 Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ /* Define this to have a standalone program to test this implementation of mktime. */ /* #define DEBUG 1 */ #ifndef _LIBC # include #endif /* Assume that leap seconds are possible, unless told otherwise. If the host has a `zic' command with a `-L leapsecondfilename' option, then it supports leap seconds; otherwise it probably doesn't. */ #ifndef LEAP_SECONDS_POSSIBLE # define LEAP_SECONDS_POSSIBLE 1 #endif #include #include #include /* For the real memcpy prototype. */ #if DEBUG # include # include /* Make it work even if the system's libc has its own mktime routine. */ # define mktime my_mktime #endif /* DEBUG */ /* Shift A right by B bits portably, by dividing A by 2**B and truncating towards minus infinity. A and B should be free of side effects, and B should be in the range 0 <= B <= INT_BITS - 2, where INT_BITS is the number of useful bits in an int. GNU code can assume that INT_BITS is at least 32. ISO C99 says that A >> B is implementation-defined if A < 0. Some implementations (e.g., UNICOS 9.0 on a Cray Y-MP EL) don't shift right in the usual way when A < 0, so SHR falls back on division if ordinary A >> B doesn't seem to be the usual signed shift. */ #define SHR(a, b) \ (-1 >> 1 == -1 \ ? (a) >> (b) \ : (a) / (1 << (b)) - ((a) % (1 << (b)) < 0)) /* The extra casts in the following macros work around compiler bugs, e.g., in Cray C 5.0.3.0. */ /* True if the arithmetic type T is an integer type. bool counts as an integer. */ #define TYPE_IS_INTEGER(t) ((t) 1.5 == 1) /* True if negative values of the signed integer type T use two's complement, ones' complement, or signed magnitude representation, respectively. Much GNU code assumes two's complement, but some people like to be portable to all possible C hosts. */ #define TYPE_TWOS_COMPLEMENT(t) ((t) ~ (t) 0 == (t) -1) #define TYPE_ONES_COMPLEMENT(t) ((t) ~ (t) 0 == 0) #define TYPE_SIGNED_MAGNITUDE(t) ((t) ~ (t) 0 < (t) -1) /* True if the arithmetic type T is signed. */ #define TYPE_SIGNED(t) (! ((t) 0 < (t) -1)) /* The maximum and minimum values for the integer type T. These macros have undefined behavior if T is signed and has padding bits. If this is a problem for you, please let us know how to fix it for your host. */ #define TYPE_MINIMUM(t) \ ((t) (! TYPE_SIGNED (t) \ ? (t) 0 \ : TYPE_SIGNED_MAGNITUDE (t) \ ? ~ (t) 0 \ : ~ (t) 0 << (sizeof (t) * CHAR_BIT - 1))) #define TYPE_MAXIMUM(t) \ ((t) (! TYPE_SIGNED (t) \ ? (t) -1 \ : ~ (~ (t) 0 << (sizeof (t) * CHAR_BIT - 1)))) #ifndef TIME_T_MIN # define TIME_T_MIN TYPE_MINIMUM (time_t) #endif #ifndef TIME_T_MAX # define TIME_T_MAX TYPE_MAXIMUM (time_t) #endif #define TIME_T_MIDPOINT (SHR (TIME_T_MIN + TIME_T_MAX, 1) + 1) /* Verify a requirement at compile-time (unlike assert, which is runtime). */ #define verify(name, assertion) struct name { char a[(assertion) ? 1 : -1]; } verify (time_t_is_integer, TYPE_IS_INTEGER (time_t)); verify (twos_complement_arithmetic, TYPE_TWOS_COMPLEMENT (int)); /* The code also assumes that signed integer overflow silently wraps around, but this assumption can't be stated without causing a diagnostic on some hosts. */ #define EPOCH_YEAR 1970 #define TM_YEAR_BASE 1900 verify (base_year_is_a_multiple_of_100, TM_YEAR_BASE % 100 == 0); /* Return 1 if YEAR + TM_YEAR_BASE is a leap year. */ static inline int leapyear (long int year) { /* Don't add YEAR to TM_YEAR_BASE, as that might overflow. Also, work even if YEAR is negative. */ return ((year & 3) == 0 && (year % 100 != 0 || ((year / 100) & 3) == (- (TM_YEAR_BASE / 100) & 3))); } /* How many days come before each month (0-12). */ #ifndef _LIBC static #endif const unsigned short int __mon_yday[2][13] = { /* Normal years. */ { 0, 31, 59, 90, 120, 151, 181, 212, 243, 273, 304, 334, 365 }, /* Leap years. */ { 0, 31, 60, 91, 121, 152, 182, 213, 244, 274, 305, 335, 366 } }; #ifndef _LIBC /* Portable standalone applications should supply a that declares a POSIX-compliant localtime_r, for the benefit of older implementations that lack localtime_r or have a nonstandard one. See the gnulib time_r module for one way to implement this. */ # undef __localtime_r # define __localtime_r localtime_r # define __mktime_internal mktime_internal # include "mktime-internal.h" #endif /* Return an integer value measuring (YEAR1-YDAY1 HOUR1:MIN1:SEC1) - (YEAR0-YDAY0 HOUR0:MIN0:SEC0) in seconds, assuming that the clocks were not adjusted between the time stamps. The YEAR values uses the same numbering as TP->tm_year. Values need not be in the usual range. However, YEAR1 must not be less than 2 * INT_MIN or greater than 2 * INT_MAX. The result may overflow. It is the caller's responsibility to detect overflow. */ static inline time_t ydhms_diff (long int year1, long int yday1, int hour1, int min1, int sec1, int year0, int yday0, int hour0, int min0, int sec0) { verify (C99_integer_division, -1 / 2 == 0); #if 0 /* This assertion fails on 32-bit systems with 64-bit time_t, such as NetBSD 5 on i386. */ verify (long_int_year_and_yday_are_wide_enough, INT_MAX <= LONG_MAX / 2 || TIME_T_MAX <= UINT_MAX); #endif /* Compute intervening leap days correctly even if year is negative. Take care to avoid integer overflow here. */ int a4 = SHR (year1, 2) + SHR (TM_YEAR_BASE, 2) - ! (year1 & 3); int b4 = SHR (year0, 2) + SHR (TM_YEAR_BASE, 2) - ! (year0 & 3); int a100 = a4 / 25 - (a4 % 25 < 0); int b100 = b4 / 25 - (b4 % 25 < 0); int a400 = SHR (a100, 2); int b400 = SHR (b100, 2); int intervening_leap_days = (a4 - b4) - (a100 - b100) + (a400 - b400); /* Compute the desired time in time_t precision. Overflow might occur here. */ time_t tyear1 = year1; time_t years = tyear1 - year0; time_t days = 365 * years + yday1 - yday0 + intervening_leap_days; time_t hours = 24 * days + hour1 - hour0; time_t minutes = 60 * hours + min1 - min0; time_t seconds = 60 * minutes + sec1 - sec0; return seconds; } /* Return a time_t value corresponding to (YEAR-YDAY HOUR:MIN:SEC), assuming that *T corresponds to *TP and that no clock adjustments occurred between *TP and the desired time. If TP is null, return a value not equal to *T; this avoids false matches. If overflow occurs, yield the minimal or maximal value, except do not yield a value equal to *T. */ static time_t guess_time_tm (long int year, long int yday, int hour, int min, int sec, const time_t *t, const struct tm *tp) { if (tp) { time_t d = ydhms_diff (year, yday, hour, min, sec, tp->tm_year, tp->tm_yday, tp->tm_hour, tp->tm_min, tp->tm_sec); time_t t1 = *t + d; if ((t1 < *t) == (TYPE_SIGNED (time_t) ? d < 0 : TIME_T_MAX / 2 < d)) return t1; } /* Overflow occurred one way or another. Return the nearest result that is actually in range, except don't report a zero difference if the actual difference is nonzero, as that would cause a false match; and don't oscillate between two values, as that would confuse the spring-forward gap detector. */ return (*t < TIME_T_MIDPOINT ? (*t <= TIME_T_MIN + 1 ? *t + 1 : TIME_T_MIN) : (TIME_T_MAX - 1 <= *t ? *t - 1 : TIME_T_MAX)); } /* Use CONVERT to convert *T to a broken down time in *TP. If *T is out of range for conversion, adjust it so that it is the nearest in-range value and then convert that. */ static struct tm * ranged_convert (struct tm *(*convert) (const time_t *, struct tm *), time_t *t, struct tm *tp) { struct tm *r = convert (t, tp); if (!r && *t) { time_t bad = *t; time_t ok = 0; /* BAD is a known unconvertible time_t, and OK is a known good one. Use binary search to narrow the range between BAD and OK until they differ by 1. */ while (bad != ok + (bad < 0 ? -1 : 1)) { time_t mid = *t = (bad < 0 ? bad + ((ok - bad) >> 1) : ok + ((bad - ok) >> 1)); r = convert (t, tp); if (r) ok = mid; else bad = mid; } if (!r && ok) { /* The last conversion attempt failed; revert to the most recent successful attempt. */ *t = ok; r = convert (t, tp); } } return r; } /* Convert *TP to a time_t value, inverting the monotonic and mostly-unit-linear conversion function CONVERT. Use *OFFSET to keep track of a guess at the offset of the result, compared to what the result would be for UTC without leap seconds. If *OFFSET's guess is correct, only one CONVERT call is needed. This function is external because it is used also by timegm.c. */ time_t __mktime_internal (struct tm *tp, struct tm *(*convert) (const time_t *, struct tm *), time_t *offset) { time_t t, gt, t0, t1, t2; struct tm tm; /* The maximum number of probes (calls to CONVERT) should be enough to handle any combinations of time zone rule changes, solar time, leap seconds, and oscillations around a spring-forward gap. POSIX.1 prohibits leap seconds, but some hosts have them anyway. */ int remaining_probes = 6; /* Time requested. Copy it in case CONVERT modifies *TP; this can occur if TP is localtime's returned value and CONVERT is localtime. */ int sec = tp->tm_sec; int min = tp->tm_min; int hour = tp->tm_hour; int mday = tp->tm_mday; int mon = tp->tm_mon; int year_requested = tp->tm_year; /* Normalize the value. */ int isdst = ((tp->tm_isdst >> (8 * sizeof (tp->tm_isdst) - 1)) | (tp->tm_isdst != 0)); /* 1 if the previous probe was DST. */ int dst2; /* Ensure that mon is in range, and set year accordingly. */ int mon_remainder = mon % 12; int negative_mon_remainder = mon_remainder < 0; int mon_years = mon / 12 - negative_mon_remainder; long int lyear_requested = year_requested; long int year = lyear_requested + mon_years; /* The other values need not be in range: the remaining code handles minor overflows correctly, assuming int and time_t arithmetic wraps around. Major overflows are caught at the end. */ /* Calculate day of year from year, month, and day of month. The result need not be in range. */ int mon_yday = ((__mon_yday[leapyear (year)] [mon_remainder + 12 * negative_mon_remainder]) - 1); long int lmday = mday; long int yday = mon_yday + lmday; time_t guessed_offset = *offset; int sec_requested = sec; if (LEAP_SECONDS_POSSIBLE) { /* Handle out-of-range seconds specially, since ydhms_tm_diff assumes every minute has 60 seconds. */ if (sec < 0) sec = 0; if (59 < sec) sec = 59; } /* Invert CONVERT by probing. First assume the same offset as last time. */ t0 = ydhms_diff (year, yday, hour, min, sec, EPOCH_YEAR - TM_YEAR_BASE, 0, 0, 0, - guessed_offset); if (TIME_T_MAX / INT_MAX / 366 / 24 / 60 / 60 < 3) { /* time_t isn't large enough to rule out overflows, so check for major overflows. A gross check suffices, since if t0 has overflowed, it is off by a multiple of TIME_T_MAX - TIME_T_MIN + 1. So ignore any component of the difference that is bounded by a small value. */ /* Approximate log base 2 of the number of time units per biennium. A biennium is 2 years; use this unit instead of years to avoid integer overflow. For example, 2 average Gregorian years are 2 * 365.2425 * 24 * 60 * 60 seconds, which is 63113904 seconds, and rint (log2 (63113904)) is 26. */ int ALOG2_SECONDS_PER_BIENNIUM = 26; int ALOG2_MINUTES_PER_BIENNIUM = 20; int ALOG2_HOURS_PER_BIENNIUM = 14; int ALOG2_DAYS_PER_BIENNIUM = 10; int LOG2_YEARS_PER_BIENNIUM = 1; int approx_requested_biennia = (SHR (year_requested, LOG2_YEARS_PER_BIENNIUM) - SHR (EPOCH_YEAR - TM_YEAR_BASE, LOG2_YEARS_PER_BIENNIUM) + SHR (mday, ALOG2_DAYS_PER_BIENNIUM) + SHR (hour, ALOG2_HOURS_PER_BIENNIUM) + SHR (min, ALOG2_MINUTES_PER_BIENNIUM) + (LEAP_SECONDS_POSSIBLE ? 0 : SHR (sec, ALOG2_SECONDS_PER_BIENNIUM))); int approx_biennia = SHR (t0, ALOG2_SECONDS_PER_BIENNIUM); int diff = approx_biennia - approx_requested_biennia; int abs_diff = diff < 0 ? - diff : diff; /* IRIX 4.0.5 cc miscaculates TIME_T_MIN / 3: it erroneously gives a positive value of 715827882. Setting a variable first then doing math on it seems to work. (ghazi@caip.rutgers.edu) */ time_t time_t_max = TIME_T_MAX; time_t time_t_min = TIME_T_MIN; time_t overflow_threshold = (time_t_max / 3 - time_t_min / 3) >> ALOG2_SECONDS_PER_BIENNIUM; if (overflow_threshold < abs_diff) { /* Overflow occurred. Try repairing it; this might work if the time zone offset is enough to undo the overflow. */ time_t repaired_t0 = -1 - t0; approx_biennia = SHR (repaired_t0, ALOG2_SECONDS_PER_BIENNIUM); diff = approx_biennia - approx_requested_biennia; abs_diff = diff < 0 ? - diff : diff; if (overflow_threshold < abs_diff) return -1; guessed_offset += repaired_t0 - t0; t0 = repaired_t0; } } /* Repeatedly use the error to improve the guess. */ for (t = t1 = t2 = t0, dst2 = 0; (gt = guess_time_tm (year, yday, hour, min, sec, &t, ranged_convert (convert, &t, &tm)), t != gt); t1 = t2, t2 = t, t = gt, dst2 = tm.tm_isdst != 0) if (t == t1 && t != t2 && (tm.tm_isdst < 0 || (isdst < 0 ? dst2 <= (tm.tm_isdst != 0) : (isdst != 0) != (tm.tm_isdst != 0)))) /* We can't possibly find a match, as we are oscillating between two values. The requested time probably falls within a spring-forward gap of size GT - T. Follow the common practice in this case, which is to return a time that is GT - T away from the requested time, preferring a time whose tm_isdst differs from the requested value. (If no tm_isdst was requested and only one of the two values has a nonzero tm_isdst, prefer that value.) In practice, this is more useful than returning -1. */ goto offset_found; else if (--remaining_probes == 0) return -1; /* We have a match. Check whether tm.tm_isdst has the requested value, if any. */ if (isdst != tm.tm_isdst && 0 <= isdst && 0 <= tm.tm_isdst) { /* tm.tm_isdst has the wrong value. Look for a neighboring time with the right value, and use its UTC offset. Heuristic: probe the adjacent timestamps in both directions, looking for the desired isdst. This should work for all real time zone histories in the tz database. */ /* Distance between probes when looking for a DST boundary. In tzdata2003a, the shortest period of DST is 601200 seconds (e.g., America/Recife starting 2000-10-08 01:00), and the shortest period of non-DST surrounded by DST is 694800 seconds (Africa/Tunis starting 1943-04-17 01:00). Use the minimum of these two values, so we don't miss these short periods when probing. */ int stride = 601200; /* The longest period of DST in tzdata2003a is 536454000 seconds (e.g., America/Jujuy starting 1946-10-01 01:00). The longest period of non-DST is much longer, but it makes no real sense to search for more than a year of non-DST, so use the DST max. */ int duration_max = 536454000; /* Search in both directions, so the maximum distance is half the duration; add the stride to avoid off-by-1 problems. */ int delta_bound = duration_max / 2 + stride; int delta, direction; for (delta = stride; delta < delta_bound; delta += stride) for (direction = -1; direction <= 1; direction += 2) { time_t ot = t + delta * direction; if ((ot < t) == (direction < 0)) { struct tm otm; ranged_convert (convert, &ot, &otm); if (otm.tm_isdst == isdst) { /* We found the desired tm_isdst. Extrapolate back to the desired time. */ t = guess_time_tm (year, yday, hour, min, sec, &ot, &otm); ranged_convert (convert, &t, &tm); goto offset_found; } } } } offset_found: *offset = guessed_offset + t - t0; if (LEAP_SECONDS_POSSIBLE && sec_requested != tm.tm_sec) { /* Adjust time to reflect the tm_sec requested, not the normalized value. Also, repair any damage from a false match due to a leap second. */ int sec_adjustment = (sec == 0 && tm.tm_sec == 60) - sec; t1 = t + sec_requested; t2 = t1 + sec_adjustment; if (((t1 < t) != (sec_requested < 0)) | ((t2 < t1) != (sec_adjustment < 0)) | ! convert (&t2, &tm)) return -1; t = t2; } *tp = tm; return t; } /* FIXME: This should use a signed type wide enough to hold any UTC offset in seconds. 'int' should be good enough for GNU code. We can't fix this unilaterally though, as other modules invoke __mktime_internal. */ static time_t localtime_offset; /* Convert *TP to a time_t value. */ time_t mktime (struct tm *tp) { #ifdef _LIBC /* POSIX.1 8.1.1 requires that whenever mktime() is called, the time zone names contained in the external variable `tzname' shall be set as if the tzset() function had been called. */ __tzset (); #endif return __mktime_internal (tp, __localtime_r, &localtime_offset); } #ifdef weak_alias weak_alias (mktime, timelocal) #endif #ifdef _LIBC libc_hidden_def (mktime) libc_hidden_weak (timelocal) #endif #if DEBUG static int not_equal_tm (const struct tm *a, const struct tm *b) { return ((a->tm_sec ^ b->tm_sec) | (a->tm_min ^ b->tm_min) | (a->tm_hour ^ b->tm_hour) | (a->tm_mday ^ b->tm_mday) | (a->tm_mon ^ b->tm_mon) | (a->tm_year ^ b->tm_year) | (a->tm_yday ^ b->tm_yday) | (a->tm_isdst ^ b->tm_isdst)); } static void print_tm (const struct tm *tp) { if (tp) printf ("%04d-%02d-%02d %02d:%02d:%02d yday %03d wday %d isdst %d", tp->tm_year + TM_YEAR_BASE, tp->tm_mon + 1, tp->tm_mday, tp->tm_hour, tp->tm_min, tp->tm_sec, tp->tm_yday, tp->tm_wday, tp->tm_isdst); else printf ("0"); } static int check_result (time_t tk, struct tm tmk, time_t tl, const struct tm *lt) { if (tk != tl || !lt || not_equal_tm (&tmk, lt)) { printf ("mktime ("); print_tm (lt); printf (")\nyields ("); print_tm (&tmk); printf (") == %ld, should be %ld\n", (long int) tk, (long int) tl); return 1; } return 0; } int main (int argc, char **argv) { int status = 0; struct tm tm, tmk, tml; struct tm *lt; time_t tk, tl, tl1; char trailer; if ((argc == 3 || argc == 4) && (sscanf (argv[1], "%d-%d-%d%c", &tm.tm_year, &tm.tm_mon, &tm.tm_mday, &trailer) == 3) && (sscanf (argv[2], "%d:%d:%d%c", &tm.tm_hour, &tm.tm_min, &tm.tm_sec, &trailer) == 3)) { tm.tm_year -= TM_YEAR_BASE; tm.tm_mon--; tm.tm_isdst = argc == 3 ? -1 : atoi (argv[3]); tmk = tm; tl = mktime (&tmk); lt = localtime (&tl); if (lt) { tml = *lt; lt = &tml; } printf ("mktime returns %ld == ", (long int) tl); print_tm (&tmk); printf ("\n"); status = check_result (tl, tmk, tl, lt); } else if (argc == 4 || (argc == 5 && strcmp (argv[4], "-") == 0)) { time_t from = atol (argv[1]); time_t by = atol (argv[2]); time_t to = atol (argv[3]); if (argc == 4) for (tl = from; by < 0 ? to <= tl : tl <= to; tl = tl1) { lt = localtime (&tl); if (lt) { tmk = tml = *lt; tk = mktime (&tmk); status |= check_result (tk, tmk, tl, &tml); } else { printf ("localtime (%ld) yields 0\n", (long int) tl); status = 1; } tl1 = tl + by; if ((tl1 < tl) != (by < 0)) break; } else for (tl = from; by < 0 ? to <= tl : tl <= to; tl = tl1) { /* Null benchmark. */ lt = localtime (&tl); if (lt) { tmk = tml = *lt; tk = tl; status |= check_result (tk, tmk, tl, &tml); } else { printf ("localtime (%ld) yields 0\n", (long int) tl); status = 1; } tl1 = tl + by; if ((tl1 < tl) != (by < 0)) break; } } else printf ("Usage:\ \t%s YYYY-MM-DD HH:MM:SS [ISDST] # Test given time.\n\ \t%s FROM BY TO # Test values FROM, FROM+BY, ..., TO.\n\ \t%s FROM BY TO - # Do not test those values (for benchmark).\n", argv[0], argv[0], argv[0]); return status; } #endif /* DEBUG */ /* Local Variables: compile-command: "gcc -DDEBUG -Wall -W -O -g mktime.c -o mktime" End: */ libprelude-1.0.0/libmissing/signbitd.c0000664000076400007640000000411311341220440014667 00000000000000/* signbit() macro: Determine the sign bit of a floating-point number. Copyright (C) 2007-2010 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 3 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 Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . */ #include /* Specification. */ #include #include #include "isnand-nolibm.h" #include "float+.h" #ifdef gl_signbitd_OPTIMIZED_MACRO # undef gl_signbitd #endif int gl_signbitd (double arg) { #if defined DBL_SIGNBIT_WORD && defined DBL_SIGNBIT_BIT /* The use of a union to extract the bits of the representation of a 'long double' is safe in practice, despite of the "aliasing rules" of C99, because the GCC docs say "Even with '-fstrict-aliasing', type-punning is allowed, provided the memory is accessed through the union type." and similarly for other compilers. */ # define NWORDS \ ((sizeof (double) + sizeof (unsigned int) - 1) / sizeof (unsigned int)) union { double value; unsigned int word[NWORDS]; } m; m.value = arg; return (m.word[DBL_SIGNBIT_WORD] >> DBL_SIGNBIT_BIT) & 1; #elif HAVE_COPYSIGN_IN_LIBC return copysign (1.0, arg) < 0; #else /* This does not do the right thing for NaN, but this is irrelevant for most use cases. */ if (isnand (arg)) return 0; if (arg < 0.0) return 1; else if (arg == 0.0) { /* Distinguish 0.0 and -0.0. */ static double plus_zero = 0.0; double arg_mem = arg; return (memcmp (&plus_zero, &arg_mem, SIZEOF_DBL) != 0); } else return 0; #endif } libprelude-1.0.0/libmissing/regexec.c0000664000076400007640000037772111341220437014536 00000000000000/* Extended regular expression matching and search library. Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Isamu Hasegawa . This program is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser 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 Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ static reg_errcode_t match_ctx_init (re_match_context_t *cache, int eflags, Idx n) internal_function; static void match_ctx_clean (re_match_context_t *mctx) internal_function; static void match_ctx_free (re_match_context_t *cache) internal_function; static reg_errcode_t match_ctx_add_entry (re_match_context_t *cache, Idx node, Idx str_idx, Idx from, Idx to) internal_function; static Idx search_cur_bkref_entry (const re_match_context_t *mctx, Idx str_idx) internal_function; static reg_errcode_t match_ctx_add_subtop (re_match_context_t *mctx, Idx node, Idx str_idx) internal_function; static re_sub_match_last_t * match_ctx_add_sublast (re_sub_match_top_t *subtop, Idx node, Idx str_idx) internal_function; static void sift_ctx_init (re_sift_context_t *sctx, re_dfastate_t **sifted_sts, re_dfastate_t **limited_sts, Idx last_node, Idx last_str_idx) internal_function; static reg_errcode_t re_search_internal (const regex_t *preg, const char *string, Idx length, Idx start, Idx last_start, Idx stop, size_t nmatch, regmatch_t pmatch[], int eflags) internal_function; static regoff_t re_search_2_stub (struct re_pattern_buffer *bufp, const char *string1, Idx length1, const char *string2, Idx length2, Idx start, regoff_t range, struct re_registers *regs, Idx stop, bool ret_len) internal_function; static regoff_t re_search_stub (struct re_pattern_buffer *bufp, const char *string, Idx length, Idx start, regoff_t range, Idx stop, struct re_registers *regs, bool ret_len) internal_function; static unsigned int re_copy_regs (struct re_registers *regs, regmatch_t *pmatch, Idx nregs, int regs_allocated) internal_function; static reg_errcode_t prune_impossible_nodes (re_match_context_t *mctx) internal_function; static Idx check_matching (re_match_context_t *mctx, bool fl_longest_match, Idx *p_match_first) internal_function; static Idx check_halt_state_context (const re_match_context_t *mctx, const re_dfastate_t *state, Idx idx) internal_function; static void update_regs (const re_dfa_t *dfa, regmatch_t *pmatch, regmatch_t *prev_idx_match, Idx cur_node, Idx cur_idx, Idx nmatch) internal_function; static reg_errcode_t push_fail_stack (struct re_fail_stack_t *fs, Idx str_idx, Idx dest_node, Idx nregs, regmatch_t *regs, re_node_set *eps_via_nodes) internal_function; static reg_errcode_t set_regs (const regex_t *preg, const re_match_context_t *mctx, size_t nmatch, regmatch_t *pmatch, bool fl_backtrack) internal_function; static reg_errcode_t free_fail_stack_return (struct re_fail_stack_t *fs) internal_function; #ifdef RE_ENABLE_I18N static int sift_states_iter_mb (const re_match_context_t *mctx, re_sift_context_t *sctx, Idx node_idx, Idx str_idx, Idx max_str_idx) internal_function; #endif /* RE_ENABLE_I18N */ static reg_errcode_t sift_states_backward (const re_match_context_t *mctx, re_sift_context_t *sctx) internal_function; static reg_errcode_t build_sifted_states (const re_match_context_t *mctx, re_sift_context_t *sctx, Idx str_idx, re_node_set *cur_dest) internal_function; static reg_errcode_t update_cur_sifted_state (const re_match_context_t *mctx, re_sift_context_t *sctx, Idx str_idx, re_node_set *dest_nodes) internal_function; static reg_errcode_t add_epsilon_src_nodes (const re_dfa_t *dfa, re_node_set *dest_nodes, const re_node_set *candidates) internal_function; static bool check_dst_limits (const re_match_context_t *mctx, const re_node_set *limits, Idx dst_node, Idx dst_idx, Idx src_node, Idx src_idx) internal_function; static int check_dst_limits_calc_pos_1 (const re_match_context_t *mctx, int boundaries, Idx subexp_idx, Idx from_node, Idx bkref_idx) internal_function; static int check_dst_limits_calc_pos (const re_match_context_t *mctx, Idx limit, Idx subexp_idx, Idx node, Idx str_idx, Idx bkref_idx) internal_function; static reg_errcode_t check_subexp_limits (const re_dfa_t *dfa, re_node_set *dest_nodes, const re_node_set *candidates, re_node_set *limits, struct re_backref_cache_entry *bkref_ents, Idx str_idx) internal_function; static reg_errcode_t sift_states_bkref (const re_match_context_t *mctx, re_sift_context_t *sctx, Idx str_idx, const re_node_set *candidates) internal_function; static reg_errcode_t merge_state_array (const re_dfa_t *dfa, re_dfastate_t **dst, re_dfastate_t **src, Idx num) internal_function; static re_dfastate_t *find_recover_state (reg_errcode_t *err, re_match_context_t *mctx) internal_function; static re_dfastate_t *transit_state (reg_errcode_t *err, re_match_context_t *mctx, re_dfastate_t *state) internal_function; static re_dfastate_t *merge_state_with_log (reg_errcode_t *err, re_match_context_t *mctx, re_dfastate_t *next_state) internal_function; static reg_errcode_t check_subexp_matching_top (re_match_context_t *mctx, re_node_set *cur_nodes, Idx str_idx) internal_function; #if 0 static re_dfastate_t *transit_state_sb (reg_errcode_t *err, re_match_context_t *mctx, re_dfastate_t *pstate) internal_function; #endif #ifdef RE_ENABLE_I18N static reg_errcode_t transit_state_mb (re_match_context_t *mctx, re_dfastate_t *pstate) internal_function; #endif /* RE_ENABLE_I18N */ static reg_errcode_t transit_state_bkref (re_match_context_t *mctx, const re_node_set *nodes) internal_function; static reg_errcode_t get_subexp (re_match_context_t *mctx, Idx bkref_node, Idx bkref_str_idx) internal_function; static reg_errcode_t get_subexp_sub (re_match_context_t *mctx, const re_sub_match_top_t *sub_top, re_sub_match_last_t *sub_last, Idx bkref_node, Idx bkref_str) internal_function; static Idx find_subexp_node (const re_dfa_t *dfa, const re_node_set *nodes, Idx subexp_idx, int type) internal_function; static reg_errcode_t check_arrival (re_match_context_t *mctx, state_array_t *path, Idx top_node, Idx top_str, Idx last_node, Idx last_str, int type) internal_function; static reg_errcode_t check_arrival_add_next_nodes (re_match_context_t *mctx, Idx str_idx, re_node_set *cur_nodes, re_node_set *next_nodes) internal_function; static reg_errcode_t check_arrival_expand_ecl (const re_dfa_t *dfa, re_node_set *cur_nodes, Idx ex_subexp, int type) internal_function; static reg_errcode_t check_arrival_expand_ecl_sub (const re_dfa_t *dfa, re_node_set *dst_nodes, Idx target, Idx ex_subexp, int type) internal_function; static reg_errcode_t expand_bkref_cache (re_match_context_t *mctx, re_node_set *cur_nodes, Idx cur_str, Idx subexp_num, int type) internal_function; static bool build_trtable (const re_dfa_t *dfa, re_dfastate_t *state) internal_function; #ifdef RE_ENABLE_I18N static int check_node_accept_bytes (const re_dfa_t *dfa, Idx node_idx, const re_string_t *input, Idx idx) internal_function; # ifdef _LIBC static unsigned int find_collation_sequence_value (const unsigned char *mbs, size_t name_len) internal_function; # endif /* _LIBC */ #endif /* RE_ENABLE_I18N */ static Idx group_nodes_into_DFAstates (const re_dfa_t *dfa, const re_dfastate_t *state, re_node_set *states_node, bitset_t *states_ch) internal_function; static bool check_node_accept (const re_match_context_t *mctx, const re_token_t *node, Idx idx) internal_function; static reg_errcode_t extend_buffers (re_match_context_t *mctx) internal_function; /* Entry point for POSIX code. */ /* regexec searches for a given pattern, specified by PREG, in the string STRING. If NMATCH is zero or REG_NOSUB was set in the cflags argument to `regcomp', we ignore PMATCH. Otherwise, we assume PMATCH has at least NMATCH elements, and we set them to the offsets of the corresponding matched substrings. EFLAGS specifies `execution flags' which affect matching: if REG_NOTBOL is set, then ^ does not match at the beginning of the string; if REG_NOTEOL is set, then $ does not match at the end. We return 0 if we find a match and REG_NOMATCH if not. */ int regexec (preg, string, nmatch, pmatch, eflags) const regex_t *_Restrict_ preg; const char *_Restrict_ string; size_t nmatch; regmatch_t pmatch[_Restrict_arr_]; int eflags; { reg_errcode_t err; Idx start, length; #ifdef _LIBC re_dfa_t *dfa = (re_dfa_t *) preg->buffer; #endif if (eflags & ~(REG_NOTBOL | REG_NOTEOL | REG_STARTEND)) return REG_BADPAT; if (eflags & REG_STARTEND) { start = pmatch[0].rm_so; length = pmatch[0].rm_eo; } else { start = 0; length = strlen (string); } __libc_lock_lock (dfa->lock); if (preg->no_sub) err = re_search_internal (preg, string, length, start, length, length, 0, NULL, eflags); else err = re_search_internal (preg, string, length, start, length, length, nmatch, pmatch, eflags); __libc_lock_unlock (dfa->lock); return err != REG_NOERROR; } #ifdef _LIBC # include versioned_symbol (libc, __regexec, regexec, GLIBC_2_3_4); # if SHLIB_COMPAT (libc, GLIBC_2_0, GLIBC_2_3_4) __typeof__ (__regexec) __compat_regexec; int attribute_compat_text_section __compat_regexec (const regex_t *_Restrict_ preg, const char *_Restrict_ string, size_t nmatch, regmatch_t pmatch[], int eflags) { return regexec (preg, string, nmatch, pmatch, eflags & (REG_NOTBOL | REG_NOTEOL)); } compat_symbol (libc, __compat_regexec, regexec, GLIBC_2_0); # endif #endif /* Entry points for GNU code. */ /* re_match, re_search, re_match_2, re_search_2 The former two functions operate on STRING with length LENGTH, while the later two operate on concatenation of STRING1 and STRING2 with lengths LENGTH1 and LENGTH2, respectively. re_match() matches the compiled pattern in BUFP against the string, starting at index START. re_search() first tries matching at index START, then it tries to match starting from index START + 1, and so on. The last start position tried is START + RANGE. (Thus RANGE = 0 forces re_search to operate the same way as re_match().) The parameter STOP of re_{match,search}_2 specifies that no match exceeding the first STOP characters of the concatenation of the strings should be concerned. If REGS is not NULL, and BUFP->no_sub is not set, the offsets of the match and all groups is stored in REGS. (For the "_2" variants, the offsets are computed relative to the concatenation, not relative to the individual strings.) On success, re_match* functions return the length of the match, re_search* return the position of the start of the match. Return value -1 means no match was found and -2 indicates an internal error. */ regoff_t re_match (bufp, string, length, start, regs) struct re_pattern_buffer *bufp; const char *string; Idx length, start; struct re_registers *regs; { return re_search_stub (bufp, string, length, start, 0, length, regs, true); } #ifdef _LIBC weak_alias (__re_match, re_match) #endif regoff_t re_search (bufp, string, length, start, range, regs) struct re_pattern_buffer *bufp; const char *string; Idx length, start; regoff_t range; struct re_registers *regs; { return re_search_stub (bufp, string, length, start, range, length, regs, false); } #ifdef _LIBC weak_alias (__re_search, re_search) #endif regoff_t re_match_2 (bufp, string1, length1, string2, length2, start, regs, stop) struct re_pattern_buffer *bufp; const char *string1, *string2; Idx length1, length2, start, stop; struct re_registers *regs; { return re_search_2_stub (bufp, string1, length1, string2, length2, start, 0, regs, stop, true); } #ifdef _LIBC weak_alias (__re_match_2, re_match_2) #endif regoff_t re_search_2 (bufp, string1, length1, string2, length2, start, range, regs, stop) struct re_pattern_buffer *bufp; const char *string1, *string2; Idx length1, length2, start, stop; regoff_t range; struct re_registers *regs; { return re_search_2_stub (bufp, string1, length1, string2, length2, start, range, regs, stop, false); } #ifdef _LIBC weak_alias (__re_search_2, re_search_2) #endif static regoff_t internal_function re_search_2_stub (struct re_pattern_buffer *bufp, const char *string1, Idx length1, const char *string2, Idx length2, Idx start, regoff_t range, struct re_registers *regs, Idx stop, bool ret_len) { const char *str; regoff_t rval; Idx len = length1 + length2; char *s = NULL; if (BE (length1 < 0 || length2 < 0 || stop < 0 || len < length1, 0)) return -2; /* Concatenate the strings. */ if (length2 > 0) if (length1 > 0) { s = re_malloc (char, len); if (BE (s == NULL, 0)) return -2; #ifdef _LIBC memcpy (__mempcpy (s, string1, length1), string2, length2); #else memcpy (s, string1, length1); memcpy (s + length1, string2, length2); #endif str = s; } else str = string2; else str = string1; rval = re_search_stub (bufp, str, len, start, range, stop, regs, ret_len); re_free (s); return rval; } /* The parameters have the same meaning as those of re_search. Additional parameters: If RET_LEN is true the length of the match is returned (re_match style); otherwise the position of the match is returned. */ static regoff_t internal_function re_search_stub (struct re_pattern_buffer *bufp, const char *string, Idx length, Idx start, regoff_t range, Idx stop, struct re_registers *regs, bool ret_len) { reg_errcode_t result; regmatch_t *pmatch; Idx nregs; regoff_t rval; int eflags = 0; #ifdef _LIBC re_dfa_t *dfa = (re_dfa_t *) bufp->buffer; #endif Idx last_start = start + range; /* Check for out-of-range. */ if (BE (start < 0 || start > length, 0)) return -1; if (BE (length < last_start || (0 <= range && last_start < start), 0)) last_start = length; else if (BE (last_start < 0 || (range < 0 && start <= last_start), 0)) last_start = 0; __libc_lock_lock (dfa->lock); eflags |= (bufp->not_bol) ? REG_NOTBOL : 0; eflags |= (bufp->not_eol) ? REG_NOTEOL : 0; /* Compile fastmap if we haven't yet. */ if (start < last_start && bufp->fastmap != NULL && !bufp->fastmap_accurate) re_compile_fastmap (bufp); if (BE (bufp->no_sub, 0)) regs = NULL; /* We need at least 1 register. */ if (regs == NULL) nregs = 1; else if (BE (bufp->regs_allocated == REGS_FIXED && regs->num_regs <= bufp->re_nsub, 0)) { nregs = regs->num_regs; if (BE (nregs < 1, 0)) { /* Nothing can be copied to regs. */ regs = NULL; nregs = 1; } } else nregs = bufp->re_nsub + 1; pmatch = re_malloc (regmatch_t, nregs); if (BE (pmatch == NULL, 0)) { rval = -2; goto out; } result = re_search_internal (bufp, string, length, start, last_start, stop, nregs, pmatch, eflags); rval = 0; /* I hope we needn't fill ther regs with -1's when no match was found. */ if (result != REG_NOERROR) rval = -1; else if (regs != NULL) { /* If caller wants register contents data back, copy them. */ bufp->regs_allocated = re_copy_regs (regs, pmatch, nregs, bufp->regs_allocated); if (BE (bufp->regs_allocated == REGS_UNALLOCATED, 0)) rval = -2; } if (BE (rval == 0, 1)) { if (ret_len) { assert (pmatch[0].rm_so == start); rval = pmatch[0].rm_eo - start; } else rval = pmatch[0].rm_so; } re_free (pmatch); out: __libc_lock_unlock (dfa->lock); return rval; } static unsigned int internal_function re_copy_regs (struct re_registers *regs, regmatch_t *pmatch, Idx nregs, int regs_allocated) { int rval = REGS_REALLOCATE; Idx i; Idx need_regs = nregs + 1; /* We need one extra element beyond `num_regs' for the `-1' marker GNU code uses. */ /* Have the register data arrays been allocated? */ if (regs_allocated == REGS_UNALLOCATED) { /* No. So allocate them with malloc. */ regs->start = re_malloc (regoff_t, need_regs); if (BE (regs->start == NULL, 0)) return REGS_UNALLOCATED; regs->end = re_malloc (regoff_t, need_regs); if (BE (regs->end == NULL, 0)) { re_free (regs->start); return REGS_UNALLOCATED; } regs->num_regs = need_regs; } else if (regs_allocated == REGS_REALLOCATE) { /* Yes. If we need more elements than were already allocated, reallocate them. If we need fewer, just leave it alone. */ if (BE (need_regs > regs->num_regs, 0)) { regoff_t *new_start = re_realloc (regs->start, regoff_t, need_regs); regoff_t *new_end; if (BE (new_start == NULL, 0)) return REGS_UNALLOCATED; new_end = re_realloc (regs->end, regoff_t, need_regs); if (BE (new_end == NULL, 0)) { re_free (new_start); return REGS_UNALLOCATED; } regs->start = new_start; regs->end = new_end; regs->num_regs = need_regs; } } else { assert (regs_allocated == REGS_FIXED); /* This function may not be called with REGS_FIXED and nregs too big. */ assert (regs->num_regs >= nregs); rval = REGS_FIXED; } /* Copy the regs. */ for (i = 0; i < nregs; ++i) { regs->start[i] = pmatch[i].rm_so; regs->end[i] = pmatch[i].rm_eo; } for ( ; i < regs->num_regs; ++i) regs->start[i] = regs->end[i] = -1; return rval; } /* Set REGS to hold NUM_REGS registers, storing them in STARTS and ENDS. Subsequent matches using PATTERN_BUFFER and REGS will use this memory for recording register information. STARTS and ENDS must be allocated using the malloc library routine, and must each be at least NUM_REGS * sizeof (regoff_t) bytes long. If NUM_REGS == 0, then subsequent matches should allocate their own register data. Unless this function is called, the first search or match using PATTERN_BUFFER will allocate its own register data, without freeing the old data. */ void re_set_registers (bufp, regs, num_regs, starts, ends) struct re_pattern_buffer *bufp; struct re_registers *regs; __re_size_t num_regs; regoff_t *starts, *ends; { if (num_regs) { bufp->regs_allocated = REGS_REALLOCATE; regs->num_regs = num_regs; regs->start = starts; regs->end = ends; } else { bufp->regs_allocated = REGS_UNALLOCATED; regs->num_regs = 0; regs->start = regs->end = NULL; } } #ifdef _LIBC weak_alias (__re_set_registers, re_set_registers) #endif /* Entry points compatible with 4.2 BSD regex library. We don't define them unless specifically requested. */ #if defined _REGEX_RE_COMP || defined _LIBC int # ifdef _LIBC weak_function # endif re_exec (s) const char *s; { return 0 == regexec (&re_comp_buf, s, 0, NULL, 0); } #endif /* _REGEX_RE_COMP */ /* Internal entry point. */ /* Searches for a compiled pattern PREG in the string STRING, whose length is LENGTH. NMATCH, PMATCH, and EFLAGS have the same meaning as with regexec. LAST_START is START + RANGE, where START and RANGE have the same meaning as with re_search. Return REG_NOERROR if we find a match, and REG_NOMATCH if not, otherwise return the error code. Note: We assume front end functions already check ranges. (0 <= LAST_START && LAST_START <= LENGTH) */ static reg_errcode_t internal_function __attribute_warn_unused_result__ re_search_internal (const regex_t *preg, const char *string, Idx length, Idx start, Idx last_start, Idx stop, size_t nmatch, regmatch_t pmatch[], int eflags) { reg_errcode_t err; const re_dfa_t *dfa = (const re_dfa_t *) preg->buffer; Idx left_lim, right_lim; int incr; bool fl_longest_match; int match_kind; Idx match_first; Idx match_last = REG_MISSING; Idx extra_nmatch; bool sb; int ch; #if defined _LIBC || (defined __STDC_VERSION__ && __STDC_VERSION__ >= 199901L) re_match_context_t mctx = { .dfa = dfa }; #else re_match_context_t mctx; #endif char *fastmap = ((preg->fastmap != NULL && preg->fastmap_accurate && start != last_start && !preg->can_be_null) ? preg->fastmap : NULL); RE_TRANSLATE_TYPE t = preg->translate; #if !(defined _LIBC || (defined __STDC_VERSION__ && __STDC_VERSION__ >= 199901L)) memset (&mctx, '\0', sizeof (re_match_context_t)); mctx.dfa = dfa; #endif extra_nmatch = (nmatch > preg->re_nsub) ? nmatch - (preg->re_nsub + 1) : 0; nmatch -= extra_nmatch; /* Check if the DFA haven't been compiled. */ if (BE (preg->used == 0 || dfa->init_state == NULL || dfa->init_state_word == NULL || dfa->init_state_nl == NULL || dfa->init_state_begbuf == NULL, 0)) return REG_NOMATCH; #ifdef DEBUG /* We assume front-end functions already check them. */ assert (0 <= last_start && last_start <= length); #endif /* If initial states with non-begbuf contexts have no elements, the regex must be anchored. If preg->newline_anchor is set, we'll never use init_state_nl, so do not check it. */ if (dfa->init_state->nodes.nelem == 0 && dfa->init_state_word->nodes.nelem == 0 && (dfa->init_state_nl->nodes.nelem == 0 || !preg->newline_anchor)) { if (start != 0 && last_start != 0) return REG_NOMATCH; start = last_start = 0; } /* We must check the longest matching, if nmatch > 0. */ fl_longest_match = (nmatch != 0 || dfa->nbackref); err = re_string_allocate (&mctx.input, string, length, dfa->nodes_len + 1, preg->translate, (preg->syntax & RE_ICASE) != 0, dfa); if (BE (err != REG_NOERROR, 0)) goto free_return; mctx.input.stop = stop; mctx.input.raw_stop = stop; mctx.input.newline_anchor = preg->newline_anchor; err = match_ctx_init (&mctx, eflags, dfa->nbackref * 2); if (BE (err != REG_NOERROR, 0)) goto free_return; /* We will log all the DFA states through which the dfa pass, if nmatch > 1, or this dfa has "multibyte node", which is a back-reference or a node which can accept multibyte character or multi character collating element. */ if (nmatch > 1 || dfa->has_mb_node) { /* Avoid overflow. */ if (BE (SIZE_MAX / sizeof (re_dfastate_t *) <= mctx.input.bufs_len, 0)) { err = REG_ESPACE; goto free_return; } mctx.state_log = re_malloc (re_dfastate_t *, mctx.input.bufs_len + 1); if (BE (mctx.state_log == NULL, 0)) { err = REG_ESPACE; goto free_return; } } else mctx.state_log = NULL; match_first = start; mctx.input.tip_context = (eflags & REG_NOTBOL) ? CONTEXT_BEGBUF : CONTEXT_NEWLINE | CONTEXT_BEGBUF; /* Check incrementally whether of not the input string match. */ incr = (last_start < start) ? -1 : 1; left_lim = (last_start < start) ? last_start : start; right_lim = (last_start < start) ? start : last_start; sb = dfa->mb_cur_max == 1; match_kind = (fastmap ? ((sb || !(preg->syntax & RE_ICASE || t) ? 4 : 0) | (start <= last_start ? 2 : 0) | (t != NULL ? 1 : 0)) : 8); for (;; match_first += incr) { err = REG_NOMATCH; if (match_first < left_lim || right_lim < match_first) goto free_return; /* Advance as rapidly as possible through the string, until we find a plausible place to start matching. This may be done with varying efficiency, so there are various possibilities: only the most common of them are specialized, in order to save on code size. We use a switch statement for speed. */ switch (match_kind) { case 8: /* No fastmap. */ break; case 7: /* Fastmap with single-byte translation, match forward. */ while (BE (match_first < right_lim, 1) && !fastmap[t[(unsigned char) string[match_first]]]) ++match_first; goto forward_match_found_start_or_reached_end; case 6: /* Fastmap without translation, match forward. */ while (BE (match_first < right_lim, 1) && !fastmap[(unsigned char) string[match_first]]) ++match_first; forward_match_found_start_or_reached_end: if (BE (match_first == right_lim, 0)) { ch = match_first >= length ? 0 : (unsigned char) string[match_first]; if (!fastmap[t ? t[ch] : ch]) goto free_return; } break; case 4: case 5: /* Fastmap without multi-byte translation, match backwards. */ while (match_first >= left_lim) { ch = match_first >= length ? 0 : (unsigned char) string[match_first]; if (fastmap[t ? t[ch] : ch]) break; --match_first; } if (match_first < left_lim) goto free_return; break; default: /* In this case, we can't determine easily the current byte, since it might be a component byte of a multibyte character. Then we use the constructed buffer instead. */ for (;;) { /* If MATCH_FIRST is out of the valid range, reconstruct the buffers. */ __re_size_t offset = match_first - mctx.input.raw_mbs_idx; if (BE (offset >= (__re_size_t) mctx.input.valid_raw_len, 0)) { err = re_string_reconstruct (&mctx.input, match_first, eflags); if (BE (err != REG_NOERROR, 0)) goto free_return; offset = match_first - mctx.input.raw_mbs_idx; } /* If MATCH_FIRST is out of the buffer, leave it as '\0'. Note that MATCH_FIRST must not be smaller than 0. */ ch = (match_first >= length ? 0 : re_string_byte_at (&mctx.input, offset)); if (fastmap[ch]) break; match_first += incr; if (match_first < left_lim || match_first > right_lim) { err = REG_NOMATCH; goto free_return; } } break; } /* Reconstruct the buffers so that the matcher can assume that the matching starts from the beginning of the buffer. */ err = re_string_reconstruct (&mctx.input, match_first, eflags); if (BE (err != REG_NOERROR, 0)) goto free_return; #ifdef RE_ENABLE_I18N /* Don't consider this char as a possible match start if it part, yet isn't the head, of a multibyte character. */ if (!sb && !re_string_first_byte (&mctx.input, 0)) continue; #endif /* It seems to be appropriate one, then use the matcher. */ /* We assume that the matching starts from 0. */ mctx.state_log_top = mctx.nbkref_ents = mctx.max_mb_elem_len = 0; match_last = check_matching (&mctx, fl_longest_match, start <= last_start ? &match_first : NULL); if (match_last != REG_MISSING) { if (BE (match_last == REG_ERROR, 0)) { err = REG_ESPACE; goto free_return; } else { mctx.match_last = match_last; if ((!preg->no_sub && nmatch > 1) || dfa->nbackref) { re_dfastate_t *pstate = mctx.state_log[match_last]; mctx.last_node = check_halt_state_context (&mctx, pstate, match_last); } if ((!preg->no_sub && nmatch > 1 && dfa->has_plural_match) || dfa->nbackref) { err = prune_impossible_nodes (&mctx); if (err == REG_NOERROR) break; if (BE (err != REG_NOMATCH, 0)) goto free_return; match_last = REG_MISSING; } else break; /* We found a match. */ } } match_ctx_clean (&mctx); } #ifdef DEBUG assert (match_last != REG_MISSING); assert (err == REG_NOERROR); #endif /* Set pmatch[] if we need. */ if (nmatch > 0) { Idx reg_idx; /* Initialize registers. */ for (reg_idx = 1; reg_idx < nmatch; ++reg_idx) pmatch[reg_idx].rm_so = pmatch[reg_idx].rm_eo = -1; /* Set the points where matching start/end. */ pmatch[0].rm_so = 0; pmatch[0].rm_eo = mctx.match_last; /* FIXME: This function should fail if mctx.match_last exceeds the maximum possible regoff_t value. We need a new error code REG_OVERFLOW. */ if (!preg->no_sub && nmatch > 1) { err = set_regs (preg, &mctx, nmatch, pmatch, dfa->has_plural_match && dfa->nbackref > 0); if (BE (err != REG_NOERROR, 0)) goto free_return; } /* At last, add the offset to the each registers, since we slided the buffers so that we could assume that the matching starts from 0. */ for (reg_idx = 0; reg_idx < nmatch; ++reg_idx) if (pmatch[reg_idx].rm_so != -1) { #ifdef RE_ENABLE_I18N if (BE (mctx.input.offsets_needed != 0, 0)) { pmatch[reg_idx].rm_so = (pmatch[reg_idx].rm_so == mctx.input.valid_len ? mctx.input.valid_raw_len : mctx.input.offsets[pmatch[reg_idx].rm_so]); pmatch[reg_idx].rm_eo = (pmatch[reg_idx].rm_eo == mctx.input.valid_len ? mctx.input.valid_raw_len : mctx.input.offsets[pmatch[reg_idx].rm_eo]); } #else assert (mctx.input.offsets_needed == 0); #endif pmatch[reg_idx].rm_so += match_first; pmatch[reg_idx].rm_eo += match_first; } for (reg_idx = 0; reg_idx < extra_nmatch; ++reg_idx) { pmatch[nmatch + reg_idx].rm_so = -1; pmatch[nmatch + reg_idx].rm_eo = -1; } if (dfa->subexp_map) for (reg_idx = 0; reg_idx + 1 < nmatch; reg_idx++) if (dfa->subexp_map[reg_idx] != reg_idx) { pmatch[reg_idx + 1].rm_so = pmatch[dfa->subexp_map[reg_idx] + 1].rm_so; pmatch[reg_idx + 1].rm_eo = pmatch[dfa->subexp_map[reg_idx] + 1].rm_eo; } } free_return: re_free (mctx.state_log); if (dfa->nbackref) match_ctx_free (&mctx); re_string_destruct (&mctx.input); return err; } static reg_errcode_t internal_function __attribute_warn_unused_result__ prune_impossible_nodes (re_match_context_t *mctx) { const re_dfa_t *const dfa = mctx->dfa; Idx halt_node, match_last; reg_errcode_t ret; re_dfastate_t **sifted_states; re_dfastate_t **lim_states = NULL; re_sift_context_t sctx; #ifdef DEBUG assert (mctx->state_log != NULL); #endif match_last = mctx->match_last; halt_node = mctx->last_node; /* Avoid overflow. */ if (BE (SIZE_MAX / sizeof (re_dfastate_t *) <= match_last, 0)) return REG_ESPACE; sifted_states = re_malloc (re_dfastate_t *, match_last + 1); if (BE (sifted_states == NULL, 0)) { ret = REG_ESPACE; goto free_return; } if (dfa->nbackref) { lim_states = re_malloc (re_dfastate_t *, match_last + 1); if (BE (lim_states == NULL, 0)) { ret = REG_ESPACE; goto free_return; } while (1) { memset (lim_states, '\0', sizeof (re_dfastate_t *) * (match_last + 1)); sift_ctx_init (&sctx, sifted_states, lim_states, halt_node, match_last); ret = sift_states_backward (mctx, &sctx); re_node_set_free (&sctx.limits); if (BE (ret != REG_NOERROR, 0)) goto free_return; if (sifted_states[0] != NULL || lim_states[0] != NULL) break; do { --match_last; if (! REG_VALID_INDEX (match_last)) { ret = REG_NOMATCH; goto free_return; } } while (mctx->state_log[match_last] == NULL || !mctx->state_log[match_last]->halt); halt_node = check_halt_state_context (mctx, mctx->state_log[match_last], match_last); } ret = merge_state_array (dfa, sifted_states, lim_states, match_last + 1); re_free (lim_states); lim_states = NULL; if (BE (ret != REG_NOERROR, 0)) goto free_return; } else { sift_ctx_init (&sctx, sifted_states, lim_states, halt_node, match_last); ret = sift_states_backward (mctx, &sctx); re_node_set_free (&sctx.limits); if (BE (ret != REG_NOERROR, 0)) goto free_return; if (sifted_states[0] == NULL) { ret = REG_NOMATCH; goto free_return; } } re_free (mctx->state_log); mctx->state_log = sifted_states; sifted_states = NULL; mctx->last_node = halt_node; mctx->match_last = match_last; ret = REG_NOERROR; free_return: re_free (sifted_states); re_free (lim_states); return ret; } /* Acquire an initial state and return it. We must select appropriate initial state depending on the context, since initial states may have constraints like "\<", "^", etc.. */ static inline re_dfastate_t * __attribute ((always_inline)) internal_function acquire_init_state_context (reg_errcode_t *err, const re_match_context_t *mctx, Idx idx) { const re_dfa_t *const dfa = mctx->dfa; if (dfa->init_state->has_constraint) { unsigned int context; context = re_string_context_at (&mctx->input, idx - 1, mctx->eflags); if (IS_WORD_CONTEXT (context)) return dfa->init_state_word; else if (IS_ORDINARY_CONTEXT (context)) return dfa->init_state; else if (IS_BEGBUF_CONTEXT (context) && IS_NEWLINE_CONTEXT (context)) return dfa->init_state_begbuf; else if (IS_NEWLINE_CONTEXT (context)) return dfa->init_state_nl; else if (IS_BEGBUF_CONTEXT (context)) { /* It is relatively rare case, then calculate on demand. */ return re_acquire_state_context (err, dfa, dfa->init_state->entrance_nodes, context); } else /* Must not happen? */ return dfa->init_state; } else return dfa->init_state; } /* Check whether the regular expression match input string INPUT or not, and return the index where the matching end. Return REG_MISSING if there is no match, and return REG_ERROR in case of an error. FL_LONGEST_MATCH means we want the POSIX longest matching. If P_MATCH_FIRST is not NULL, and the match fails, it is set to the next place where we may want to try matching. Note that the matcher assume that the maching starts from the current index of the buffer. */ static Idx internal_function __attribute_warn_unused_result__ check_matching (re_match_context_t *mctx, bool fl_longest_match, Idx *p_match_first) { const re_dfa_t *const dfa = mctx->dfa; reg_errcode_t err; Idx match = 0; Idx match_last = REG_MISSING; Idx cur_str_idx = re_string_cur_idx (&mctx->input); re_dfastate_t *cur_state; bool at_init_state = p_match_first != NULL; Idx next_start_idx = cur_str_idx; err = REG_NOERROR; cur_state = acquire_init_state_context (&err, mctx, cur_str_idx); /* An initial state must not be NULL (invalid). */ if (BE (cur_state == NULL, 0)) { assert (err == REG_ESPACE); return REG_ERROR; } if (mctx->state_log != NULL) { mctx->state_log[cur_str_idx] = cur_state; /* Check OP_OPEN_SUBEXP in the initial state in case that we use them later. E.g. Processing back references. */ if (BE (dfa->nbackref, 0)) { at_init_state = false; err = check_subexp_matching_top (mctx, &cur_state->nodes, 0); if (BE (err != REG_NOERROR, 0)) return err; if (cur_state->has_backref) { err = transit_state_bkref (mctx, &cur_state->nodes); if (BE (err != REG_NOERROR, 0)) return err; } } } /* If the RE accepts NULL string. */ if (BE (cur_state->halt, 0)) { if (!cur_state->has_constraint || check_halt_state_context (mctx, cur_state, cur_str_idx)) { if (!fl_longest_match) return cur_str_idx; else { match_last = cur_str_idx; match = 1; } } } while (!re_string_eoi (&mctx->input)) { re_dfastate_t *old_state = cur_state; Idx next_char_idx = re_string_cur_idx (&mctx->input) + 1; if (BE (next_char_idx >= mctx->input.bufs_len, 0) || (BE (next_char_idx >= mctx->input.valid_len, 0) && mctx->input.valid_len < mctx->input.len)) { err = extend_buffers (mctx); if (BE (err != REG_NOERROR, 0)) { assert (err == REG_ESPACE); return REG_ERROR; } } cur_state = transit_state (&err, mctx, cur_state); if (mctx->state_log != NULL) cur_state = merge_state_with_log (&err, mctx, cur_state); if (cur_state == NULL) { /* Reached the invalid state or an error. Try to recover a valid state using the state log, if available and if we have not already found a valid (even if not the longest) match. */ if (BE (err != REG_NOERROR, 0)) return REG_ERROR; if (mctx->state_log == NULL || (match && !fl_longest_match) || (cur_state = find_recover_state (&err, mctx)) == NULL) break; } if (BE (at_init_state, 0)) { if (old_state == cur_state) next_start_idx = next_char_idx; else at_init_state = false; } if (cur_state->halt) { /* Reached a halt state. Check the halt state can satisfy the current context. */ if (!cur_state->has_constraint || check_halt_state_context (mctx, cur_state, re_string_cur_idx (&mctx->input))) { /* We found an appropriate halt state. */ match_last = re_string_cur_idx (&mctx->input); match = 1; /* We found a match, do not modify match_first below. */ p_match_first = NULL; if (!fl_longest_match) break; } } } if (p_match_first) *p_match_first += next_start_idx; return match_last; } /* Check NODE match the current context. */ static bool internal_function check_halt_node_context (const re_dfa_t *dfa, Idx node, unsigned int context) { re_token_type_t type = dfa->nodes[node].type; unsigned int constraint = dfa->nodes[node].constraint; if (type != END_OF_RE) return false; if (!constraint) return true; if (NOT_SATISFY_NEXT_CONSTRAINT (constraint, context)) return false; return true; } /* Check the halt state STATE match the current context. Return 0 if not match, if the node, STATE has, is a halt node and match the context, return the node. */ static Idx internal_function check_halt_state_context (const re_match_context_t *mctx, const re_dfastate_t *state, Idx idx) { Idx i; unsigned int context; #ifdef DEBUG assert (state->halt); #endif context = re_string_context_at (&mctx->input, idx, mctx->eflags); for (i = 0; i < state->nodes.nelem; ++i) if (check_halt_node_context (mctx->dfa, state->nodes.elems[i], context)) return state->nodes.elems[i]; return 0; } /* Compute the next node to which "NFA" transit from NODE("NFA" is a NFA corresponding to the DFA). Return the destination node, and update EPS_VIA_NODES; return REG_MISSING in case of errors. */ static Idx internal_function proceed_next_node (const re_match_context_t *mctx, Idx nregs, regmatch_t *regs, Idx *pidx, Idx node, re_node_set *eps_via_nodes, struct re_fail_stack_t *fs) { const re_dfa_t *const dfa = mctx->dfa; Idx i; bool ok; if (IS_EPSILON_NODE (dfa->nodes[node].type)) { re_node_set *cur_nodes = &mctx->state_log[*pidx]->nodes; re_node_set *edests = &dfa->edests[node]; Idx dest_node; ok = re_node_set_insert (eps_via_nodes, node); if (BE (! ok, 0)) return REG_ERROR; /* Pick up a valid destination, or return REG_MISSING if none is found. */ for (dest_node = REG_MISSING, i = 0; i < edests->nelem; ++i) { Idx candidate = edests->elems[i]; if (!re_node_set_contains (cur_nodes, candidate)) continue; if (dest_node == REG_MISSING) dest_node = candidate; else { /* In order to avoid infinite loop like "(a*)*", return the second epsilon-transition if the first was already considered. */ if (re_node_set_contains (eps_via_nodes, dest_node)) return candidate; /* Otherwise, push the second epsilon-transition on the fail stack. */ else if (fs != NULL && push_fail_stack (fs, *pidx, candidate, nregs, regs, eps_via_nodes)) return REG_ERROR; /* We know we are going to exit. */ break; } } return dest_node; } else { Idx naccepted = 0; re_token_type_t type = dfa->nodes[node].type; #ifdef RE_ENABLE_I18N if (dfa->nodes[node].accept_mb) naccepted = check_node_accept_bytes (dfa, node, &mctx->input, *pidx); else #endif /* RE_ENABLE_I18N */ if (type == OP_BACK_REF) { Idx subexp_idx = dfa->nodes[node].opr.idx + 1; naccepted = regs[subexp_idx].rm_eo - regs[subexp_idx].rm_so; if (fs != NULL) { if (regs[subexp_idx].rm_so == -1 || regs[subexp_idx].rm_eo == -1) return REG_MISSING; else if (naccepted) { char *buf = (char *) re_string_get_buffer (&mctx->input); if (memcmp (buf + regs[subexp_idx].rm_so, buf + *pidx, naccepted) != 0) return REG_MISSING; } } if (naccepted == 0) { Idx dest_node; ok = re_node_set_insert (eps_via_nodes, node); if (BE (! ok, 0)) return REG_ERROR; dest_node = dfa->edests[node].elems[0]; if (re_node_set_contains (&mctx->state_log[*pidx]->nodes, dest_node)) return dest_node; } } if (naccepted != 0 || check_node_accept (mctx, dfa->nodes + node, *pidx)) { Idx dest_node = dfa->nexts[node]; *pidx = (naccepted == 0) ? *pidx + 1 : *pidx + naccepted; if (fs && (*pidx > mctx->match_last || mctx->state_log[*pidx] == NULL || !re_node_set_contains (&mctx->state_log[*pidx]->nodes, dest_node))) return REG_MISSING; re_node_set_empty (eps_via_nodes); return dest_node; } } return REG_MISSING; } static reg_errcode_t internal_function __attribute_warn_unused_result__ push_fail_stack (struct re_fail_stack_t *fs, Idx str_idx, Idx dest_node, Idx nregs, regmatch_t *regs, re_node_set *eps_via_nodes) { reg_errcode_t err; Idx num = fs->num++; if (fs->num == fs->alloc) { struct re_fail_stack_ent_t *new_array; new_array = realloc (fs->stack, (sizeof (struct re_fail_stack_ent_t) * fs->alloc * 2)); if (new_array == NULL) return REG_ESPACE; fs->alloc *= 2; fs->stack = new_array; } fs->stack[num].idx = str_idx; fs->stack[num].node = dest_node; fs->stack[num].regs = re_malloc (regmatch_t, nregs); if (fs->stack[num].regs == NULL) return REG_ESPACE; memcpy (fs->stack[num].regs, regs, sizeof (regmatch_t) * nregs); err = re_node_set_init_copy (&fs->stack[num].eps_via_nodes, eps_via_nodes); return err; } static Idx internal_function pop_fail_stack (struct re_fail_stack_t *fs, Idx *pidx, Idx nregs, regmatch_t *regs, re_node_set *eps_via_nodes) { Idx num = --fs->num; assert (REG_VALID_INDEX (num)); *pidx = fs->stack[num].idx; memcpy (regs, fs->stack[num].regs, sizeof (regmatch_t) * nregs); re_node_set_free (eps_via_nodes); re_free (fs->stack[num].regs); *eps_via_nodes = fs->stack[num].eps_via_nodes; return fs->stack[num].node; } /* Set the positions where the subexpressions are starts/ends to registers PMATCH. Note: We assume that pmatch[0] is already set, and pmatch[i].rm_so == pmatch[i].rm_eo == -1 for 0 < i < nmatch. */ static reg_errcode_t internal_function __attribute_warn_unused_result__ set_regs (const regex_t *preg, const re_match_context_t *mctx, size_t nmatch, regmatch_t *pmatch, bool fl_backtrack) { const re_dfa_t *dfa = (const re_dfa_t *) preg->buffer; Idx idx, cur_node; re_node_set eps_via_nodes; struct re_fail_stack_t *fs; struct re_fail_stack_t fs_body = { 0, 2, NULL }; regmatch_t *prev_idx_match; bool prev_idx_match_malloced = false; #ifdef DEBUG assert (nmatch > 1); assert (mctx->state_log != NULL); #endif if (fl_backtrack) { fs = &fs_body; fs->stack = re_malloc (struct re_fail_stack_ent_t, fs->alloc); if (fs->stack == NULL) return REG_ESPACE; } else fs = NULL; cur_node = dfa->init_node; re_node_set_init_empty (&eps_via_nodes); if (__libc_use_alloca (nmatch * sizeof (regmatch_t))) prev_idx_match = (regmatch_t *) alloca (nmatch * sizeof (regmatch_t)); else { prev_idx_match = re_malloc (regmatch_t, nmatch); if (prev_idx_match == NULL) { free_fail_stack_return (fs); return REG_ESPACE; } prev_idx_match_malloced = true; } memcpy (prev_idx_match, pmatch, sizeof (regmatch_t) * nmatch); for (idx = pmatch[0].rm_so; idx <= pmatch[0].rm_eo ;) { update_regs (dfa, pmatch, prev_idx_match, cur_node, idx, nmatch); if (idx == pmatch[0].rm_eo && cur_node == mctx->last_node) { Idx reg_idx; if (fs) { for (reg_idx = 0; reg_idx < nmatch; ++reg_idx) if (pmatch[reg_idx].rm_so > -1 && pmatch[reg_idx].rm_eo == -1) break; if (reg_idx == nmatch) { re_node_set_free (&eps_via_nodes); if (prev_idx_match_malloced) re_free (prev_idx_match); return free_fail_stack_return (fs); } cur_node = pop_fail_stack (fs, &idx, nmatch, pmatch, &eps_via_nodes); } else { re_node_set_free (&eps_via_nodes); if (prev_idx_match_malloced) re_free (prev_idx_match); return REG_NOERROR; } } /* Proceed to next node. */ cur_node = proceed_next_node (mctx, nmatch, pmatch, &idx, cur_node, &eps_via_nodes, fs); if (BE (! REG_VALID_INDEX (cur_node), 0)) { if (BE (cur_node == REG_ERROR, 0)) { re_node_set_free (&eps_via_nodes); if (prev_idx_match_malloced) re_free (prev_idx_match); free_fail_stack_return (fs); return REG_ESPACE; } if (fs) cur_node = pop_fail_stack (fs, &idx, nmatch, pmatch, &eps_via_nodes); else { re_node_set_free (&eps_via_nodes); if (prev_idx_match_malloced) re_free (prev_idx_match); return REG_NOMATCH; } } } re_node_set_free (&eps_via_nodes); if (prev_idx_match_malloced) re_free (prev_idx_match); return free_fail_stack_return (fs); } static reg_errcode_t internal_function free_fail_stack_return (struct re_fail_stack_t *fs) { if (fs) { Idx fs_idx; for (fs_idx = 0; fs_idx < fs->num; ++fs_idx) { re_node_set_free (&fs->stack[fs_idx].eps_via_nodes); re_free (fs->stack[fs_idx].regs); } re_free (fs->stack); } return REG_NOERROR; } static void internal_function update_regs (const re_dfa_t *dfa, regmatch_t *pmatch, regmatch_t *prev_idx_match, Idx cur_node, Idx cur_idx, Idx nmatch) { int type = dfa->nodes[cur_node].type; if (type == OP_OPEN_SUBEXP) { Idx reg_num = dfa->nodes[cur_node].opr.idx + 1; /* We are at the first node of this sub expression. */ if (reg_num < nmatch) { pmatch[reg_num].rm_so = cur_idx; pmatch[reg_num].rm_eo = -1; } } else if (type == OP_CLOSE_SUBEXP) { Idx reg_num = dfa->nodes[cur_node].opr.idx + 1; if (reg_num < nmatch) { /* We are at the last node of this sub expression. */ if (pmatch[reg_num].rm_so < cur_idx) { pmatch[reg_num].rm_eo = cur_idx; /* This is a non-empty match or we are not inside an optional subexpression. Accept this right away. */ memcpy (prev_idx_match, pmatch, sizeof (regmatch_t) * nmatch); } else { if (dfa->nodes[cur_node].opt_subexp && prev_idx_match[reg_num].rm_so != -1) /* We transited through an empty match for an optional subexpression, like (a?)*, and this is not the subexp's first match. Copy back the old content of the registers so that matches of an inner subexpression are undone as well, like in ((a?))*. */ memcpy (pmatch, prev_idx_match, sizeof (regmatch_t) * nmatch); else /* We completed a subexpression, but it may be part of an optional one, so do not update PREV_IDX_MATCH. */ pmatch[reg_num].rm_eo = cur_idx; } } } } /* This function checks the STATE_LOG from the SCTX->last_str_idx to 0 and sift the nodes in each states according to the following rules. Updated state_log will be wrote to STATE_LOG. Rules: We throw away the Node `a' in the STATE_LOG[STR_IDX] if... 1. When STR_IDX == MATCH_LAST(the last index in the state_log): If `a' isn't the LAST_NODE and `a' can't epsilon transit to the LAST_NODE, we throw away the node `a'. 2. When 0 <= STR_IDX < MATCH_LAST and `a' accepts string `s' and transit to `b': i. If 'b' isn't in the STATE_LOG[STR_IDX+strlen('s')], we throw away the node `a'. ii. If 'b' is in the STATE_LOG[STR_IDX+strlen('s')] but 'b' is thrown away, we throw away the node `a'. 3. When 0 <= STR_IDX < MATCH_LAST and 'a' epsilon transit to 'b': i. If 'b' isn't in the STATE_LOG[STR_IDX], we throw away the node `a'. ii. If 'b' is in the STATE_LOG[STR_IDX] but 'b' is thrown away, we throw away the node `a'. */ #define STATE_NODE_CONTAINS(state,node) \ ((state) != NULL && re_node_set_contains (&(state)->nodes, node)) static reg_errcode_t internal_function sift_states_backward (const re_match_context_t *mctx, re_sift_context_t *sctx) { reg_errcode_t err; int null_cnt = 0; Idx str_idx = sctx->last_str_idx; re_node_set cur_dest; #ifdef DEBUG assert (mctx->state_log != NULL && mctx->state_log[str_idx] != NULL); #endif /* Build sifted state_log[str_idx]. It has the nodes which can epsilon transit to the last_node and the last_node itself. */ err = re_node_set_init_1 (&cur_dest, sctx->last_node); if (BE (err != REG_NOERROR, 0)) return err; err = update_cur_sifted_state (mctx, sctx, str_idx, &cur_dest); if (BE (err != REG_NOERROR, 0)) goto free_return; /* Then check each states in the state_log. */ while (str_idx > 0) { /* Update counters. */ null_cnt = (sctx->sifted_states[str_idx] == NULL) ? null_cnt + 1 : 0; if (null_cnt > mctx->max_mb_elem_len) { memset (sctx->sifted_states, '\0', sizeof (re_dfastate_t *) * str_idx); re_node_set_free (&cur_dest); return REG_NOERROR; } re_node_set_empty (&cur_dest); --str_idx; if (mctx->state_log[str_idx]) { err = build_sifted_states (mctx, sctx, str_idx, &cur_dest); if (BE (err != REG_NOERROR, 0)) goto free_return; } /* Add all the nodes which satisfy the following conditions: - It can epsilon transit to a node in CUR_DEST. - It is in CUR_SRC. And update state_log. */ err = update_cur_sifted_state (mctx, sctx, str_idx, &cur_dest); if (BE (err != REG_NOERROR, 0)) goto free_return; } err = REG_NOERROR; free_return: re_node_set_free (&cur_dest); return err; } static reg_errcode_t internal_function __attribute_warn_unused_result__ build_sifted_states (const re_match_context_t *mctx, re_sift_context_t *sctx, Idx str_idx, re_node_set *cur_dest) { const re_dfa_t *const dfa = mctx->dfa; const re_node_set *cur_src = &mctx->state_log[str_idx]->non_eps_nodes; Idx i; /* Then build the next sifted state. We build the next sifted state on `cur_dest', and update `sifted_states[str_idx]' with `cur_dest'. Note: `cur_dest' is the sifted state from `state_log[str_idx + 1]'. `cur_src' points the node_set of the old `state_log[str_idx]' (with the epsilon nodes pre-filtered out). */ for (i = 0; i < cur_src->nelem; i++) { Idx prev_node = cur_src->elems[i]; int naccepted = 0; bool ok; #ifdef DEBUG re_token_type_t type = dfa->nodes[prev_node].type; assert (!IS_EPSILON_NODE (type)); #endif #ifdef RE_ENABLE_I18N /* If the node may accept `multi byte'. */ if (dfa->nodes[prev_node].accept_mb) naccepted = sift_states_iter_mb (mctx, sctx, prev_node, str_idx, sctx->last_str_idx); #endif /* RE_ENABLE_I18N */ /* We don't check backreferences here. See update_cur_sifted_state(). */ if (!naccepted && check_node_accept (mctx, dfa->nodes + prev_node, str_idx) && STATE_NODE_CONTAINS (sctx->sifted_states[str_idx + 1], dfa->nexts[prev_node])) naccepted = 1; if (naccepted == 0) continue; if (sctx->limits.nelem) { Idx to_idx = str_idx + naccepted; if (check_dst_limits (mctx, &sctx->limits, dfa->nexts[prev_node], to_idx, prev_node, str_idx)) continue; } ok = re_node_set_insert (cur_dest, prev_node); if (BE (! ok, 0)) return REG_ESPACE; } return REG_NOERROR; } /* Helper functions. */ static reg_errcode_t internal_function clean_state_log_if_needed (re_match_context_t *mctx, Idx next_state_log_idx) { Idx top = mctx->state_log_top; if (next_state_log_idx >= mctx->input.bufs_len || (next_state_log_idx >= mctx->input.valid_len && mctx->input.valid_len < mctx->input.len)) { reg_errcode_t err; err = extend_buffers (mctx); if (BE (err != REG_NOERROR, 0)) return err; } if (top < next_state_log_idx) { memset (mctx->state_log + top + 1, '\0', sizeof (re_dfastate_t *) * (next_state_log_idx - top)); mctx->state_log_top = next_state_log_idx; } return REG_NOERROR; } static reg_errcode_t internal_function merge_state_array (const re_dfa_t *dfa, re_dfastate_t **dst, re_dfastate_t **src, Idx num) { Idx st_idx; reg_errcode_t err; for (st_idx = 0; st_idx < num; ++st_idx) { if (dst[st_idx] == NULL) dst[st_idx] = src[st_idx]; else if (src[st_idx] != NULL) { re_node_set merged_set; err = re_node_set_init_union (&merged_set, &dst[st_idx]->nodes, &src[st_idx]->nodes); if (BE (err != REG_NOERROR, 0)) return err; dst[st_idx] = re_acquire_state (&err, dfa, &merged_set); re_node_set_free (&merged_set); if (BE (err != REG_NOERROR, 0)) return err; } } return REG_NOERROR; } static reg_errcode_t internal_function update_cur_sifted_state (const re_match_context_t *mctx, re_sift_context_t *sctx, Idx str_idx, re_node_set *dest_nodes) { const re_dfa_t *const dfa = mctx->dfa; reg_errcode_t err = REG_NOERROR; const re_node_set *candidates; candidates = ((mctx->state_log[str_idx] == NULL) ? NULL : &mctx->state_log[str_idx]->nodes); if (dest_nodes->nelem == 0) sctx->sifted_states[str_idx] = NULL; else { if (candidates) { /* At first, add the nodes which can epsilon transit to a node in DEST_NODE. */ err = add_epsilon_src_nodes (dfa, dest_nodes, candidates); if (BE (err != REG_NOERROR, 0)) return err; /* Then, check the limitations in the current sift_context. */ if (sctx->limits.nelem) { err = check_subexp_limits (dfa, dest_nodes, candidates, &sctx->limits, mctx->bkref_ents, str_idx); if (BE (err != REG_NOERROR, 0)) return err; } } sctx->sifted_states[str_idx] = re_acquire_state (&err, dfa, dest_nodes); if (BE (err != REG_NOERROR, 0)) return err; } if (candidates && mctx->state_log[str_idx]->has_backref) { err = sift_states_bkref (mctx, sctx, str_idx, candidates); if (BE (err != REG_NOERROR, 0)) return err; } return REG_NOERROR; } static reg_errcode_t internal_function __attribute_warn_unused_result__ add_epsilon_src_nodes (const re_dfa_t *dfa, re_node_set *dest_nodes, const re_node_set *candidates) { reg_errcode_t err = REG_NOERROR; Idx i; re_dfastate_t *state = re_acquire_state (&err, dfa, dest_nodes); if (BE (err != REG_NOERROR, 0)) return err; if (!state->inveclosure.alloc) { err = re_node_set_alloc (&state->inveclosure, dest_nodes->nelem); if (BE (err != REG_NOERROR, 0)) return REG_ESPACE; for (i = 0; i < dest_nodes->nelem; i++) { err = re_node_set_merge (&state->inveclosure, dfa->inveclosures + dest_nodes->elems[i]); if (BE (err != REG_NOERROR, 0)) return REG_ESPACE; } } return re_node_set_add_intersect (dest_nodes, candidates, &state->inveclosure); } static reg_errcode_t internal_function sub_epsilon_src_nodes (const re_dfa_t *dfa, Idx node, re_node_set *dest_nodes, const re_node_set *candidates) { Idx ecl_idx; reg_errcode_t err; re_node_set *inv_eclosure = dfa->inveclosures + node; re_node_set except_nodes; re_node_set_init_empty (&except_nodes); for (ecl_idx = 0; ecl_idx < inv_eclosure->nelem; ++ecl_idx) { Idx cur_node = inv_eclosure->elems[ecl_idx]; if (cur_node == node) continue; if (IS_EPSILON_NODE (dfa->nodes[cur_node].type)) { Idx edst1 = dfa->edests[cur_node].elems[0]; Idx edst2 = ((dfa->edests[cur_node].nelem > 1) ? dfa->edests[cur_node].elems[1] : REG_MISSING); if ((!re_node_set_contains (inv_eclosure, edst1) && re_node_set_contains (dest_nodes, edst1)) || (REG_VALID_NONZERO_INDEX (edst2) && !re_node_set_contains (inv_eclosure, edst2) && re_node_set_contains (dest_nodes, edst2))) { err = re_node_set_add_intersect (&except_nodes, candidates, dfa->inveclosures + cur_node); if (BE (err != REG_NOERROR, 0)) { re_node_set_free (&except_nodes); return err; } } } } for (ecl_idx = 0; ecl_idx < inv_eclosure->nelem; ++ecl_idx) { Idx cur_node = inv_eclosure->elems[ecl_idx]; if (!re_node_set_contains (&except_nodes, cur_node)) { Idx idx = re_node_set_contains (dest_nodes, cur_node) - 1; re_node_set_remove_at (dest_nodes, idx); } } re_node_set_free (&except_nodes); return REG_NOERROR; } static bool internal_function check_dst_limits (const re_match_context_t *mctx, const re_node_set *limits, Idx dst_node, Idx dst_idx, Idx src_node, Idx src_idx) { const re_dfa_t *const dfa = mctx->dfa; Idx lim_idx, src_pos, dst_pos; Idx dst_bkref_idx = search_cur_bkref_entry (mctx, dst_idx); Idx src_bkref_idx = search_cur_bkref_entry (mctx, src_idx); for (lim_idx = 0; lim_idx < limits->nelem; ++lim_idx) { Idx subexp_idx; struct re_backref_cache_entry *ent; ent = mctx->bkref_ents + limits->elems[lim_idx]; subexp_idx = dfa->nodes[ent->node].opr.idx; dst_pos = check_dst_limits_calc_pos (mctx, limits->elems[lim_idx], subexp_idx, dst_node, dst_idx, dst_bkref_idx); src_pos = check_dst_limits_calc_pos (mctx, limits->elems[lim_idx], subexp_idx, src_node, src_idx, src_bkref_idx); /* In case of: ( ) ( ) ( ) */ if (src_pos == dst_pos) continue; /* This is unrelated limitation. */ else return true; } return false; } static int internal_function check_dst_limits_calc_pos_1 (const re_match_context_t *mctx, int boundaries, Idx subexp_idx, Idx from_node, Idx bkref_idx) { const re_dfa_t *const dfa = mctx->dfa; const re_node_set *eclosures = dfa->eclosures + from_node; Idx node_idx; /* Else, we are on the boundary: examine the nodes on the epsilon closure. */ for (node_idx = 0; node_idx < eclosures->nelem; ++node_idx) { Idx node = eclosures->elems[node_idx]; switch (dfa->nodes[node].type) { case OP_BACK_REF: if (bkref_idx != REG_MISSING) { struct re_backref_cache_entry *ent = mctx->bkref_ents + bkref_idx; do { Idx dst; int cpos; if (ent->node != node) continue; if (subexp_idx < BITSET_WORD_BITS && !(ent->eps_reachable_subexps_map & ((bitset_word_t) 1 << subexp_idx))) continue; /* Recurse trying to reach the OP_OPEN_SUBEXP and OP_CLOSE_SUBEXP cases below. But, if the destination node is the same node as the source node, don't recurse because it would cause an infinite loop: a regex that exhibits this behavior is ()\1*\1* */ dst = dfa->edests[node].elems[0]; if (dst == from_node) { if (boundaries & 1) return -1; else /* if (boundaries & 2) */ return 0; } cpos = check_dst_limits_calc_pos_1 (mctx, boundaries, subexp_idx, dst, bkref_idx); if (cpos == -1 /* && (boundaries & 1) */) return -1; if (cpos == 0 && (boundaries & 2)) return 0; if (subexp_idx < BITSET_WORD_BITS) ent->eps_reachable_subexps_map &= ~((bitset_word_t) 1 << subexp_idx); } while (ent++->more); } break; case OP_OPEN_SUBEXP: if ((boundaries & 1) && subexp_idx == dfa->nodes[node].opr.idx) return -1; break; case OP_CLOSE_SUBEXP: if ((boundaries & 2) && subexp_idx == dfa->nodes[node].opr.idx) return 0; break; default: break; } } return (boundaries & 2) ? 1 : 0; } static int internal_function check_dst_limits_calc_pos (const re_match_context_t *mctx, Idx limit, Idx subexp_idx, Idx from_node, Idx str_idx, Idx bkref_idx) { struct re_backref_cache_entry *lim = mctx->bkref_ents + limit; int boundaries; /* If we are outside the range of the subexpression, return -1 or 1. */ if (str_idx < lim->subexp_from) return -1; if (lim->subexp_to < str_idx) return 1; /* If we are within the subexpression, return 0. */ boundaries = (str_idx == lim->subexp_from); boundaries |= (str_idx == lim->subexp_to) << 1; if (boundaries == 0) return 0; /* Else, examine epsilon closure. */ return check_dst_limits_calc_pos_1 (mctx, boundaries, subexp_idx, from_node, bkref_idx); } /* Check the limitations of sub expressions LIMITS, and remove the nodes which are against limitations from DEST_NODES. */ static reg_errcode_t internal_function check_subexp_limits (const re_dfa_t *dfa, re_node_set *dest_nodes, const re_node_set *candidates, re_node_set *limits, struct re_backref_cache_entry *bkref_ents, Idx str_idx) { reg_errcode_t err; Idx node_idx, lim_idx; for (lim_idx = 0; lim_idx < limits->nelem; ++lim_idx) { Idx subexp_idx; struct re_backref_cache_entry *ent; ent = bkref_ents + limits->elems[lim_idx]; if (str_idx <= ent->subexp_from || ent->str_idx < str_idx) continue; /* This is unrelated limitation. */ subexp_idx = dfa->nodes[ent->node].opr.idx; if (ent->subexp_to == str_idx) { Idx ops_node = REG_MISSING; Idx cls_node = REG_MISSING; for (node_idx = 0; node_idx < dest_nodes->nelem; ++node_idx) { Idx node = dest_nodes->elems[node_idx]; re_token_type_t type = dfa->nodes[node].type; if (type == OP_OPEN_SUBEXP && subexp_idx == dfa->nodes[node].opr.idx) ops_node = node; else if (type == OP_CLOSE_SUBEXP && subexp_idx == dfa->nodes[node].opr.idx) cls_node = node; } /* Check the limitation of the open subexpression. */ /* Note that (ent->subexp_to = str_idx != ent->subexp_from). */ if (REG_VALID_INDEX (ops_node)) { err = sub_epsilon_src_nodes (dfa, ops_node, dest_nodes, candidates); if (BE (err != REG_NOERROR, 0)) return err; } /* Check the limitation of the close subexpression. */ if (REG_VALID_INDEX (cls_node)) for (node_idx = 0; node_idx < dest_nodes->nelem; ++node_idx) { Idx node = dest_nodes->elems[node_idx]; if (!re_node_set_contains (dfa->inveclosures + node, cls_node) && !re_node_set_contains (dfa->eclosures + node, cls_node)) { /* It is against this limitation. Remove it form the current sifted state. */ err = sub_epsilon_src_nodes (dfa, node, dest_nodes, candidates); if (BE (err != REG_NOERROR, 0)) return err; --node_idx; } } } else /* (ent->subexp_to != str_idx) */ { for (node_idx = 0; node_idx < dest_nodes->nelem; ++node_idx) { Idx node = dest_nodes->elems[node_idx]; re_token_type_t type = dfa->nodes[node].type; if (type == OP_CLOSE_SUBEXP || type == OP_OPEN_SUBEXP) { if (subexp_idx != dfa->nodes[node].opr.idx) continue; /* It is against this limitation. Remove it form the current sifted state. */ err = sub_epsilon_src_nodes (dfa, node, dest_nodes, candidates); if (BE (err != REG_NOERROR, 0)) return err; } } } } return REG_NOERROR; } static reg_errcode_t internal_function __attribute_warn_unused_result__ sift_states_bkref (const re_match_context_t *mctx, re_sift_context_t *sctx, Idx str_idx, const re_node_set *candidates) { const re_dfa_t *const dfa = mctx->dfa; reg_errcode_t err; Idx node_idx, node; re_sift_context_t local_sctx; Idx first_idx = search_cur_bkref_entry (mctx, str_idx); if (first_idx == REG_MISSING) return REG_NOERROR; local_sctx.sifted_states = NULL; /* Mark that it hasn't been initialized. */ for (node_idx = 0; node_idx < candidates->nelem; ++node_idx) { Idx enabled_idx; re_token_type_t type; struct re_backref_cache_entry *entry; node = candidates->elems[node_idx]; type = dfa->nodes[node].type; /* Avoid infinite loop for the REs like "()\1+". */ if (node == sctx->last_node && str_idx == sctx->last_str_idx) continue; if (type != OP_BACK_REF) continue; entry = mctx->bkref_ents + first_idx; enabled_idx = first_idx; do { Idx subexp_len; Idx to_idx; Idx dst_node; bool ok; re_dfastate_t *cur_state; if (entry->node != node) continue; subexp_len = entry->subexp_to - entry->subexp_from; to_idx = str_idx + subexp_len; dst_node = (subexp_len ? dfa->nexts[node] : dfa->edests[node].elems[0]); if (to_idx > sctx->last_str_idx || sctx->sifted_states[to_idx] == NULL || !STATE_NODE_CONTAINS (sctx->sifted_states[to_idx], dst_node) || check_dst_limits (mctx, &sctx->limits, node, str_idx, dst_node, to_idx)) continue; if (local_sctx.sifted_states == NULL) { local_sctx = *sctx; err = re_node_set_init_copy (&local_sctx.limits, &sctx->limits); if (BE (err != REG_NOERROR, 0)) goto free_return; } local_sctx.last_node = node; local_sctx.last_str_idx = str_idx; ok = re_node_set_insert (&local_sctx.limits, enabled_idx); if (BE (! ok, 0)) { err = REG_ESPACE; goto free_return; } cur_state = local_sctx.sifted_states[str_idx]; err = sift_states_backward (mctx, &local_sctx); if (BE (err != REG_NOERROR, 0)) goto free_return; if (sctx->limited_states != NULL) { err = merge_state_array (dfa, sctx->limited_states, local_sctx.sifted_states, str_idx + 1); if (BE (err != REG_NOERROR, 0)) goto free_return; } local_sctx.sifted_states[str_idx] = cur_state; re_node_set_remove (&local_sctx.limits, enabled_idx); /* mctx->bkref_ents may have changed, reload the pointer. */ entry = mctx->bkref_ents + enabled_idx; } while (enabled_idx++, entry++->more); } err = REG_NOERROR; free_return: if (local_sctx.sifted_states != NULL) { re_node_set_free (&local_sctx.limits); } return err; } #ifdef RE_ENABLE_I18N static int internal_function sift_states_iter_mb (const re_match_context_t *mctx, re_sift_context_t *sctx, Idx node_idx, Idx str_idx, Idx max_str_idx) { const re_dfa_t *const dfa = mctx->dfa; int naccepted; /* Check the node can accept `multi byte'. */ naccepted = check_node_accept_bytes (dfa, node_idx, &mctx->input, str_idx); if (naccepted > 0 && str_idx + naccepted <= max_str_idx && !STATE_NODE_CONTAINS (sctx->sifted_states[str_idx + naccepted], dfa->nexts[node_idx])) /* The node can't accept the `multi byte', or the destination was already thrown away, then the node could't accept the current input `multi byte'. */ naccepted = 0; /* Otherwise, it is sure that the node could accept `naccepted' bytes input. */ return naccepted; } #endif /* RE_ENABLE_I18N */ /* Functions for state transition. */ /* Return the next state to which the current state STATE will transit by accepting the current input byte, and update STATE_LOG if necessary. If STATE can accept a multibyte char/collating element/back reference update the destination of STATE_LOG. */ static re_dfastate_t * internal_function __attribute_warn_unused_result__ transit_state (reg_errcode_t *err, re_match_context_t *mctx, re_dfastate_t *state) { re_dfastate_t **trtable; unsigned char ch; #ifdef RE_ENABLE_I18N /* If the current state can accept multibyte. */ if (BE (state->accept_mb, 0)) { *err = transit_state_mb (mctx, state); if (BE (*err != REG_NOERROR, 0)) return NULL; } #endif /* RE_ENABLE_I18N */ /* Then decide the next state with the single byte. */ #if 0 if (0) /* don't use transition table */ return transit_state_sb (err, mctx, state); #endif /* Use transition table */ ch = re_string_fetch_byte (&mctx->input); for (;;) { trtable = state->trtable; if (BE (trtable != NULL, 1)) return trtable[ch]; trtable = state->word_trtable; if (BE (trtable != NULL, 1)) { unsigned int context; context = re_string_context_at (&mctx->input, re_string_cur_idx (&mctx->input) - 1, mctx->eflags); if (IS_WORD_CONTEXT (context)) return trtable[ch + SBC_MAX]; else return trtable[ch]; } if (!build_trtable (mctx->dfa, state)) { *err = REG_ESPACE; return NULL; } /* Retry, we now have a transition table. */ } } /* Update the state_log if we need */ static re_dfastate_t * internal_function merge_state_with_log (reg_errcode_t *err, re_match_context_t *mctx, re_dfastate_t *next_state) { const re_dfa_t *const dfa = mctx->dfa; Idx cur_idx = re_string_cur_idx (&mctx->input); if (cur_idx > mctx->state_log_top) { mctx->state_log[cur_idx] = next_state; mctx->state_log_top = cur_idx; } else if (mctx->state_log[cur_idx] == 0) { mctx->state_log[cur_idx] = next_state; } else { re_dfastate_t *pstate; unsigned int context; re_node_set next_nodes, *log_nodes, *table_nodes = NULL; /* If (state_log[cur_idx] != 0), it implies that cur_idx is the destination of a multibyte char/collating element/ back reference. Then the next state is the union set of these destinations and the results of the transition table. */ pstate = mctx->state_log[cur_idx]; log_nodes = pstate->entrance_nodes; if (next_state != NULL) { table_nodes = next_state->entrance_nodes; *err = re_node_set_init_union (&next_nodes, table_nodes, log_nodes); if (BE (*err != REG_NOERROR, 0)) return NULL; } else next_nodes = *log_nodes; /* Note: We already add the nodes of the initial state, then we don't need to add them here. */ context = re_string_context_at (&mctx->input, re_string_cur_idx (&mctx->input) - 1, mctx->eflags); next_state = mctx->state_log[cur_idx] = re_acquire_state_context (err, dfa, &next_nodes, context); /* We don't need to check errors here, since the return value of this function is next_state and ERR is already set. */ if (table_nodes != NULL) re_node_set_free (&next_nodes); } if (BE (dfa->nbackref, 0) && next_state != NULL) { /* Check OP_OPEN_SUBEXP in the current state in case that we use them later. We must check them here, since the back references in the next state might use them. */ *err = check_subexp_matching_top (mctx, &next_state->nodes, cur_idx); if (BE (*err != REG_NOERROR, 0)) return NULL; /* If the next state has back references. */ if (next_state->has_backref) { *err = transit_state_bkref (mctx, &next_state->nodes); if (BE (*err != REG_NOERROR, 0)) return NULL; next_state = mctx->state_log[cur_idx]; } } return next_state; } /* Skip bytes in the input that correspond to part of a multi-byte match, then look in the log for a state from which to restart matching. */ static re_dfastate_t * internal_function find_recover_state (reg_errcode_t *err, re_match_context_t *mctx) { re_dfastate_t *cur_state; do { Idx max = mctx->state_log_top; Idx cur_str_idx = re_string_cur_idx (&mctx->input); do { if (++cur_str_idx > max) return NULL; re_string_skip_bytes (&mctx->input, 1); } while (mctx->state_log[cur_str_idx] == NULL); cur_state = merge_state_with_log (err, mctx, NULL); } while (*err == REG_NOERROR && cur_state == NULL); return cur_state; } /* Helper functions for transit_state. */ /* From the node set CUR_NODES, pick up the nodes whose types are OP_OPEN_SUBEXP and which have corresponding back references in the regular expression. And register them to use them later for evaluating the correspoding back references. */ static reg_errcode_t internal_function check_subexp_matching_top (re_match_context_t *mctx, re_node_set *cur_nodes, Idx str_idx) { const re_dfa_t *const dfa = mctx->dfa; Idx node_idx; reg_errcode_t err; /* TODO: This isn't efficient. Because there might be more than one nodes whose types are OP_OPEN_SUBEXP and whose index is SUBEXP_IDX, we must check all nodes. E.g. RE: (a){2} */ for (node_idx = 0; node_idx < cur_nodes->nelem; ++node_idx) { Idx node = cur_nodes->elems[node_idx]; if (dfa->nodes[node].type == OP_OPEN_SUBEXP && dfa->nodes[node].opr.idx < BITSET_WORD_BITS && (dfa->used_bkref_map & ((bitset_word_t) 1 << dfa->nodes[node].opr.idx))) { err = match_ctx_add_subtop (mctx, node, str_idx); if (BE (err != REG_NOERROR, 0)) return err; } } return REG_NOERROR; } #if 0 /* Return the next state to which the current state STATE will transit by accepting the current input byte. */ static re_dfastate_t * transit_state_sb (reg_errcode_t *err, re_match_context_t *mctx, re_dfastate_t *state) { const re_dfa_t *const dfa = mctx->dfa; re_node_set next_nodes; re_dfastate_t *next_state; Idx node_cnt, cur_str_idx = re_string_cur_idx (&mctx->input); unsigned int context; *err = re_node_set_alloc (&next_nodes, state->nodes.nelem + 1); if (BE (*err != REG_NOERROR, 0)) return NULL; for (node_cnt = 0; node_cnt < state->nodes.nelem; ++node_cnt) { Idx cur_node = state->nodes.elems[node_cnt]; if (check_node_accept (mctx, dfa->nodes + cur_node, cur_str_idx)) { *err = re_node_set_merge (&next_nodes, dfa->eclosures + dfa->nexts[cur_node]); if (BE (*err != REG_NOERROR, 0)) { re_node_set_free (&next_nodes); return NULL; } } } context = re_string_context_at (&mctx->input, cur_str_idx, mctx->eflags); next_state = re_acquire_state_context (err, dfa, &next_nodes, context); /* We don't need to check errors here, since the return value of this function is next_state and ERR is already set. */ re_node_set_free (&next_nodes); re_string_skip_bytes (&mctx->input, 1); return next_state; } #endif #ifdef RE_ENABLE_I18N static reg_errcode_t internal_function transit_state_mb (re_match_context_t *mctx, re_dfastate_t *pstate) { const re_dfa_t *const dfa = mctx->dfa; reg_errcode_t err; Idx i; for (i = 0; i < pstate->nodes.nelem; ++i) { re_node_set dest_nodes, *new_nodes; Idx cur_node_idx = pstate->nodes.elems[i]; int naccepted; Idx dest_idx; unsigned int context; re_dfastate_t *dest_state; if (!dfa->nodes[cur_node_idx].accept_mb) continue; if (dfa->nodes[cur_node_idx].constraint) { context = re_string_context_at (&mctx->input, re_string_cur_idx (&mctx->input), mctx->eflags); if (NOT_SATISFY_NEXT_CONSTRAINT (dfa->nodes[cur_node_idx].constraint, context)) continue; } /* How many bytes the node can accept? */ naccepted = check_node_accept_bytes (dfa, cur_node_idx, &mctx->input, re_string_cur_idx (&mctx->input)); if (naccepted == 0) continue; /* The node can accepts `naccepted' bytes. */ dest_idx = re_string_cur_idx (&mctx->input) + naccepted; mctx->max_mb_elem_len = ((mctx->max_mb_elem_len < naccepted) ? naccepted : mctx->max_mb_elem_len); err = clean_state_log_if_needed (mctx, dest_idx); if (BE (err != REG_NOERROR, 0)) return err; #ifdef DEBUG assert (dfa->nexts[cur_node_idx] != REG_MISSING); #endif new_nodes = dfa->eclosures + dfa->nexts[cur_node_idx]; dest_state = mctx->state_log[dest_idx]; if (dest_state == NULL) dest_nodes = *new_nodes; else { err = re_node_set_init_union (&dest_nodes, dest_state->entrance_nodes, new_nodes); if (BE (err != REG_NOERROR, 0)) return err; } context = re_string_context_at (&mctx->input, dest_idx - 1, mctx->eflags); mctx->state_log[dest_idx] = re_acquire_state_context (&err, dfa, &dest_nodes, context); if (dest_state != NULL) re_node_set_free (&dest_nodes); if (BE (mctx->state_log[dest_idx] == NULL && err != REG_NOERROR, 0)) return err; } return REG_NOERROR; } #endif /* RE_ENABLE_I18N */ static reg_errcode_t internal_function transit_state_bkref (re_match_context_t *mctx, const re_node_set *nodes) { const re_dfa_t *const dfa = mctx->dfa; reg_errcode_t err; Idx i; Idx cur_str_idx = re_string_cur_idx (&mctx->input); for (i = 0; i < nodes->nelem; ++i) { Idx dest_str_idx, prev_nelem, bkc_idx; Idx node_idx = nodes->elems[i]; unsigned int context; const re_token_t *node = dfa->nodes + node_idx; re_node_set *new_dest_nodes; /* Check whether `node' is a backreference or not. */ if (node->type != OP_BACK_REF) continue; if (node->constraint) { context = re_string_context_at (&mctx->input, cur_str_idx, mctx->eflags); if (NOT_SATISFY_NEXT_CONSTRAINT (node->constraint, context)) continue; } /* `node' is a backreference. Check the substring which the substring matched. */ bkc_idx = mctx->nbkref_ents; err = get_subexp (mctx, node_idx, cur_str_idx); if (BE (err != REG_NOERROR, 0)) goto free_return; /* And add the epsilon closures (which is `new_dest_nodes') of the backreference to appropriate state_log. */ #ifdef DEBUG assert (dfa->nexts[node_idx] != REG_MISSING); #endif for (; bkc_idx < mctx->nbkref_ents; ++bkc_idx) { Idx subexp_len; re_dfastate_t *dest_state; struct re_backref_cache_entry *bkref_ent; bkref_ent = mctx->bkref_ents + bkc_idx; if (bkref_ent->node != node_idx || bkref_ent->str_idx != cur_str_idx) continue; subexp_len = bkref_ent->subexp_to - bkref_ent->subexp_from; new_dest_nodes = (subexp_len == 0 ? dfa->eclosures + dfa->edests[node_idx].elems[0] : dfa->eclosures + dfa->nexts[node_idx]); dest_str_idx = (cur_str_idx + bkref_ent->subexp_to - bkref_ent->subexp_from); context = re_string_context_at (&mctx->input, dest_str_idx - 1, mctx->eflags); dest_state = mctx->state_log[dest_str_idx]; prev_nelem = ((mctx->state_log[cur_str_idx] == NULL) ? 0 : mctx->state_log[cur_str_idx]->nodes.nelem); /* Add `new_dest_node' to state_log. */ if (dest_state == NULL) { mctx->state_log[dest_str_idx] = re_acquire_state_context (&err, dfa, new_dest_nodes, context); if (BE (mctx->state_log[dest_str_idx] == NULL && err != REG_NOERROR, 0)) goto free_return; } else { re_node_set dest_nodes; err = re_node_set_init_union (&dest_nodes, dest_state->entrance_nodes, new_dest_nodes); if (BE (err != REG_NOERROR, 0)) { re_node_set_free (&dest_nodes); goto free_return; } mctx->state_log[dest_str_idx] = re_acquire_state_context (&err, dfa, &dest_nodes, context); re_node_set_free (&dest_nodes); if (BE (mctx->state_log[dest_str_idx] == NULL && err != REG_NOERROR, 0)) goto free_return; } /* We need to check recursively if the backreference can epsilon transit. */ if (subexp_len == 0 && mctx->state_log[cur_str_idx]->nodes.nelem > prev_nelem) { err = check_subexp_matching_top (mctx, new_dest_nodes, cur_str_idx); if (BE (err != REG_NOERROR, 0)) goto free_return; err = transit_state_bkref (mctx, new_dest_nodes); if (BE (err != REG_NOERROR, 0)) goto free_return; } } } err = REG_NOERROR; free_return: return err; } /* Enumerate all the candidates which the backreference BKREF_NODE can match at BKREF_STR_IDX, and register them by match_ctx_add_entry(). Note that we might collect inappropriate candidates here. However, the cost of checking them strictly here is too high, then we delay these checking for prune_impossible_nodes(). */ static reg_errcode_t internal_function __attribute_warn_unused_result__ get_subexp (re_match_context_t *mctx, Idx bkref_node, Idx bkref_str_idx) { const re_dfa_t *const dfa = mctx->dfa; Idx subexp_num, sub_top_idx; const char *buf = (const char *) re_string_get_buffer (&mctx->input); /* Return if we have already checked BKREF_NODE at BKREF_STR_IDX. */ Idx cache_idx = search_cur_bkref_entry (mctx, bkref_str_idx); if (cache_idx != REG_MISSING) { const struct re_backref_cache_entry *entry = mctx->bkref_ents + cache_idx; do if (entry->node == bkref_node) return REG_NOERROR; /* We already checked it. */ while (entry++->more); } subexp_num = dfa->nodes[bkref_node].opr.idx; /* For each sub expression */ for (sub_top_idx = 0; sub_top_idx < mctx->nsub_tops; ++sub_top_idx) { reg_errcode_t err; re_sub_match_top_t *sub_top = mctx->sub_tops[sub_top_idx]; re_sub_match_last_t *sub_last; Idx sub_last_idx, sl_str, bkref_str_off; if (dfa->nodes[sub_top->node].opr.idx != subexp_num) continue; /* It isn't related. */ sl_str = sub_top->str_idx; bkref_str_off = bkref_str_idx; /* At first, check the last node of sub expressions we already evaluated. */ for (sub_last_idx = 0; sub_last_idx < sub_top->nlasts; ++sub_last_idx) { regoff_t sl_str_diff; sub_last = sub_top->lasts[sub_last_idx]; sl_str_diff = sub_last->str_idx - sl_str; /* The matched string by the sub expression match with the substring at the back reference? */ if (sl_str_diff > 0) { if (BE (bkref_str_off + sl_str_diff > mctx->input.valid_len, 0)) { /* Not enough chars for a successful match. */ if (bkref_str_off + sl_str_diff > mctx->input.len) break; err = clean_state_log_if_needed (mctx, bkref_str_off + sl_str_diff); if (BE (err != REG_NOERROR, 0)) return err; buf = (const char *) re_string_get_buffer (&mctx->input); } if (memcmp (buf + bkref_str_off, buf + sl_str, sl_str_diff) != 0) /* We don't need to search this sub expression any more. */ break; } bkref_str_off += sl_str_diff; sl_str += sl_str_diff; err = get_subexp_sub (mctx, sub_top, sub_last, bkref_node, bkref_str_idx); /* Reload buf, since the preceding call might have reallocated the buffer. */ buf = (const char *) re_string_get_buffer (&mctx->input); if (err == REG_NOMATCH) continue; if (BE (err != REG_NOERROR, 0)) return err; } if (sub_last_idx < sub_top->nlasts) continue; if (sub_last_idx > 0) ++sl_str; /* Then, search for the other last nodes of the sub expression. */ for (; sl_str <= bkref_str_idx; ++sl_str) { Idx cls_node; regoff_t sl_str_off; const re_node_set *nodes; sl_str_off = sl_str - sub_top->str_idx; /* The matched string by the sub expression match with the substring at the back reference? */ if (sl_str_off > 0) { if (BE (bkref_str_off >= mctx->input.valid_len, 0)) { /* If we are at the end of the input, we cannot match. */ if (bkref_str_off >= mctx->input.len) break; err = extend_buffers (mctx); if (BE (err != REG_NOERROR, 0)) return err; buf = (const char *) re_string_get_buffer (&mctx->input); } if (buf [bkref_str_off++] != buf[sl_str - 1]) break; /* We don't need to search this sub expression any more. */ } if (mctx->state_log[sl_str] == NULL) continue; /* Does this state have a ')' of the sub expression? */ nodes = &mctx->state_log[sl_str]->nodes; cls_node = find_subexp_node (dfa, nodes, subexp_num, OP_CLOSE_SUBEXP); if (cls_node == REG_MISSING) continue; /* No. */ if (sub_top->path == NULL) { sub_top->path = calloc (sizeof (state_array_t), sl_str - sub_top->str_idx + 1); if (sub_top->path == NULL) return REG_ESPACE; } /* Can the OP_OPEN_SUBEXP node arrive the OP_CLOSE_SUBEXP node in the current context? */ err = check_arrival (mctx, sub_top->path, sub_top->node, sub_top->str_idx, cls_node, sl_str, OP_CLOSE_SUBEXP); if (err == REG_NOMATCH) continue; if (BE (err != REG_NOERROR, 0)) return err; sub_last = match_ctx_add_sublast (sub_top, cls_node, sl_str); if (BE (sub_last == NULL, 0)) return REG_ESPACE; err = get_subexp_sub (mctx, sub_top, sub_last, bkref_node, bkref_str_idx); if (err == REG_NOMATCH) continue; } } return REG_NOERROR; } /* Helper functions for get_subexp(). */ /* Check SUB_LAST can arrive to the back reference BKREF_NODE at BKREF_STR. If it can arrive, register the sub expression expressed with SUB_TOP and SUB_LAST. */ static reg_errcode_t internal_function get_subexp_sub (re_match_context_t *mctx, const re_sub_match_top_t *sub_top, re_sub_match_last_t *sub_last, Idx bkref_node, Idx bkref_str) { reg_errcode_t err; Idx to_idx; /* Can the subexpression arrive the back reference? */ err = check_arrival (mctx, &sub_last->path, sub_last->node, sub_last->str_idx, bkref_node, bkref_str, OP_OPEN_SUBEXP); if (err != REG_NOERROR) return err; err = match_ctx_add_entry (mctx, bkref_node, bkref_str, sub_top->str_idx, sub_last->str_idx); if (BE (err != REG_NOERROR, 0)) return err; to_idx = bkref_str + sub_last->str_idx - sub_top->str_idx; return clean_state_log_if_needed (mctx, to_idx); } /* Find the first node which is '(' or ')' and whose index is SUBEXP_IDX. Search '(' if FL_OPEN, or search ')' otherwise. TODO: This function isn't efficient... Because there might be more than one nodes whose types are OP_OPEN_SUBEXP and whose index is SUBEXP_IDX, we must check all nodes. E.g. RE: (a){2} */ static Idx internal_function find_subexp_node (const re_dfa_t *dfa, const re_node_set *nodes, Idx subexp_idx, int type) { Idx cls_idx; for (cls_idx = 0; cls_idx < nodes->nelem; ++cls_idx) { Idx cls_node = nodes->elems[cls_idx]; const re_token_t *node = dfa->nodes + cls_node; if (node->type == type && node->opr.idx == subexp_idx) return cls_node; } return REG_MISSING; } /* Check whether the node TOP_NODE at TOP_STR can arrive to the node LAST_NODE at LAST_STR. We record the path onto PATH since it will be heavily reused. Return REG_NOERROR if it can arrive, or REG_NOMATCH otherwise. */ static reg_errcode_t internal_function __attribute_warn_unused_result__ check_arrival (re_match_context_t *mctx, state_array_t *path, Idx top_node, Idx top_str, Idx last_node, Idx last_str, int type) { const re_dfa_t *const dfa = mctx->dfa; reg_errcode_t err = REG_NOERROR; Idx subexp_num, backup_cur_idx, str_idx, null_cnt; re_dfastate_t *cur_state = NULL; re_node_set *cur_nodes, next_nodes; re_dfastate_t **backup_state_log; unsigned int context; subexp_num = dfa->nodes[top_node].opr.idx; /* Extend the buffer if we need. */ if (BE (path->alloc < last_str + mctx->max_mb_elem_len + 1, 0)) { re_dfastate_t **new_array; Idx old_alloc = path->alloc; Idx new_alloc = old_alloc + last_str + mctx->max_mb_elem_len + 1; if (BE (new_alloc < old_alloc, 0) || BE (SIZE_MAX / sizeof (re_dfastate_t *) < new_alloc, 0)) return REG_ESPACE; new_array = re_realloc (path->array, re_dfastate_t *, new_alloc); if (BE (new_array == NULL, 0)) return REG_ESPACE; path->array = new_array; path->alloc = new_alloc; memset (new_array + old_alloc, '\0', sizeof (re_dfastate_t *) * (path->alloc - old_alloc)); } str_idx = path->next_idx ? path->next_idx : top_str; /* Temporary modify MCTX. */ backup_state_log = mctx->state_log; backup_cur_idx = mctx->input.cur_idx; mctx->state_log = path->array; mctx->input.cur_idx = str_idx; /* Setup initial node set. */ context = re_string_context_at (&mctx->input, str_idx - 1, mctx->eflags); if (str_idx == top_str) { err = re_node_set_init_1 (&next_nodes, top_node); if (BE (err != REG_NOERROR, 0)) return err; err = check_arrival_expand_ecl (dfa, &next_nodes, subexp_num, type); if (BE (err != REG_NOERROR, 0)) { re_node_set_free (&next_nodes); return err; } } else { cur_state = mctx->state_log[str_idx]; if (cur_state && cur_state->has_backref) { err = re_node_set_init_copy (&next_nodes, &cur_state->nodes); if (BE (err != REG_NOERROR, 0)) return err; } else re_node_set_init_empty (&next_nodes); } if (str_idx == top_str || (cur_state && cur_state->has_backref)) { if (next_nodes.nelem) { err = expand_bkref_cache (mctx, &next_nodes, str_idx, subexp_num, type); if (BE (err != REG_NOERROR, 0)) { re_node_set_free (&next_nodes); return err; } } cur_state = re_acquire_state_context (&err, dfa, &next_nodes, context); if (BE (cur_state == NULL && err != REG_NOERROR, 0)) { re_node_set_free (&next_nodes); return err; } mctx->state_log[str_idx] = cur_state; } for (null_cnt = 0; str_idx < last_str && null_cnt <= mctx->max_mb_elem_len;) { re_node_set_empty (&next_nodes); if (mctx->state_log[str_idx + 1]) { err = re_node_set_merge (&next_nodes, &mctx->state_log[str_idx + 1]->nodes); if (BE (err != REG_NOERROR, 0)) { re_node_set_free (&next_nodes); return err; } } if (cur_state) { err = check_arrival_add_next_nodes (mctx, str_idx, &cur_state->non_eps_nodes, &next_nodes); if (BE (err != REG_NOERROR, 0)) { re_node_set_free (&next_nodes); return err; } } ++str_idx; if (next_nodes.nelem) { err = check_arrival_expand_ecl (dfa, &next_nodes, subexp_num, type); if (BE (err != REG_NOERROR, 0)) { re_node_set_free (&next_nodes); return err; } err = expand_bkref_cache (mctx, &next_nodes, str_idx, subexp_num, type); if (BE (err != REG_NOERROR, 0)) { re_node_set_free (&next_nodes); return err; } } context = re_string_context_at (&mctx->input, str_idx - 1, mctx->eflags); cur_state = re_acquire_state_context (&err, dfa, &next_nodes, context); if (BE (cur_state == NULL && err != REG_NOERROR, 0)) { re_node_set_free (&next_nodes); return err; } mctx->state_log[str_idx] = cur_state; null_cnt = cur_state == NULL ? null_cnt + 1 : 0; } re_node_set_free (&next_nodes); cur_nodes = (mctx->state_log[last_str] == NULL ? NULL : &mctx->state_log[last_str]->nodes); path->next_idx = str_idx; /* Fix MCTX. */ mctx->state_log = backup_state_log; mctx->input.cur_idx = backup_cur_idx; /* Then check the current node set has the node LAST_NODE. */ if (cur_nodes != NULL && re_node_set_contains (cur_nodes, last_node)) return REG_NOERROR; return REG_NOMATCH; } /* Helper functions for check_arrival. */ /* Calculate the destination nodes of CUR_NODES at STR_IDX, and append them to NEXT_NODES. TODO: This function is similar to the functions transit_state*(), however this function has many additional works. Can't we unify them? */ static reg_errcode_t internal_function __attribute_warn_unused_result__ check_arrival_add_next_nodes (re_match_context_t *mctx, Idx str_idx, re_node_set *cur_nodes, re_node_set *next_nodes) { const re_dfa_t *const dfa = mctx->dfa; bool ok; Idx cur_idx; #ifdef RE_ENABLE_I18N reg_errcode_t err = REG_NOERROR; #endif re_node_set union_set; re_node_set_init_empty (&union_set); for (cur_idx = 0; cur_idx < cur_nodes->nelem; ++cur_idx) { int naccepted = 0; Idx cur_node = cur_nodes->elems[cur_idx]; #ifdef DEBUG re_token_type_t type = dfa->nodes[cur_node].type; assert (!IS_EPSILON_NODE (type)); #endif #ifdef RE_ENABLE_I18N /* If the node may accept `multi byte'. */ if (dfa->nodes[cur_node].accept_mb) { naccepted = check_node_accept_bytes (dfa, cur_node, &mctx->input, str_idx); if (naccepted > 1) { re_dfastate_t *dest_state; Idx next_node = dfa->nexts[cur_node]; Idx next_idx = str_idx + naccepted; dest_state = mctx->state_log[next_idx]; re_node_set_empty (&union_set); if (dest_state) { err = re_node_set_merge (&union_set, &dest_state->nodes); if (BE (err != REG_NOERROR, 0)) { re_node_set_free (&union_set); return err; } } ok = re_node_set_insert (&union_set, next_node); if (BE (! ok, 0)) { re_node_set_free (&union_set); return REG_ESPACE; } mctx->state_log[next_idx] = re_acquire_state (&err, dfa, &union_set); if (BE (mctx->state_log[next_idx] == NULL && err != REG_NOERROR, 0)) { re_node_set_free (&union_set); return err; } } } #endif /* RE_ENABLE_I18N */ if (naccepted || check_node_accept (mctx, dfa->nodes + cur_node, str_idx)) { ok = re_node_set_insert (next_nodes, dfa->nexts[cur_node]); if (BE (! ok, 0)) { re_node_set_free (&union_set); return REG_ESPACE; } } } re_node_set_free (&union_set); return REG_NOERROR; } /* For all the nodes in CUR_NODES, add the epsilon closures of them to CUR_NODES, however exclude the nodes which are: - inside the sub expression whose number is EX_SUBEXP, if FL_OPEN. - out of the sub expression whose number is EX_SUBEXP, if !FL_OPEN. */ static reg_errcode_t internal_function check_arrival_expand_ecl (const re_dfa_t *dfa, re_node_set *cur_nodes, Idx ex_subexp, int type) { reg_errcode_t err; Idx idx, outside_node; re_node_set new_nodes; #ifdef DEBUG assert (cur_nodes->nelem); #endif err = re_node_set_alloc (&new_nodes, cur_nodes->nelem); if (BE (err != REG_NOERROR, 0)) return err; /* Create a new node set NEW_NODES with the nodes which are epsilon closures of the node in CUR_NODES. */ for (idx = 0; idx < cur_nodes->nelem; ++idx) { Idx cur_node = cur_nodes->elems[idx]; const re_node_set *eclosure = dfa->eclosures + cur_node; outside_node = find_subexp_node (dfa, eclosure, ex_subexp, type); if (outside_node == REG_MISSING) { /* There are no problematic nodes, just merge them. */ err = re_node_set_merge (&new_nodes, eclosure); if (BE (err != REG_NOERROR, 0)) { re_node_set_free (&new_nodes); return err; } } else { /* There are problematic nodes, re-calculate incrementally. */ err = check_arrival_expand_ecl_sub (dfa, &new_nodes, cur_node, ex_subexp, type); if (BE (err != REG_NOERROR, 0)) { re_node_set_free (&new_nodes); return err; } } } re_node_set_free (cur_nodes); *cur_nodes = new_nodes; return REG_NOERROR; } /* Helper function for check_arrival_expand_ecl. Check incrementally the epsilon closure of TARGET, and if it isn't problematic append it to DST_NODES. */ static reg_errcode_t internal_function __attribute_warn_unused_result__ check_arrival_expand_ecl_sub (const re_dfa_t *dfa, re_node_set *dst_nodes, Idx target, Idx ex_subexp, int type) { Idx cur_node; for (cur_node = target; !re_node_set_contains (dst_nodes, cur_node);) { bool ok; if (dfa->nodes[cur_node].type == type && dfa->nodes[cur_node].opr.idx == ex_subexp) { if (type == OP_CLOSE_SUBEXP) { ok = re_node_set_insert (dst_nodes, cur_node); if (BE (! ok, 0)) return REG_ESPACE; } break; } ok = re_node_set_insert (dst_nodes, cur_node); if (BE (! ok, 0)) return REG_ESPACE; if (dfa->edests[cur_node].nelem == 0) break; if (dfa->edests[cur_node].nelem == 2) { reg_errcode_t err; err = check_arrival_expand_ecl_sub (dfa, dst_nodes, dfa->edests[cur_node].elems[1], ex_subexp, type); if (BE (err != REG_NOERROR, 0)) return err; } cur_node = dfa->edests[cur_node].elems[0]; } return REG_NOERROR; } /* For all the back references in the current state, calculate the destination of the back references by the appropriate entry in MCTX->BKREF_ENTS. */ static reg_errcode_t internal_function __attribute_warn_unused_result__ expand_bkref_cache (re_match_context_t *mctx, re_node_set *cur_nodes, Idx cur_str, Idx subexp_num, int type) { const re_dfa_t *const dfa = mctx->dfa; reg_errcode_t err; Idx cache_idx_start = search_cur_bkref_entry (mctx, cur_str); struct re_backref_cache_entry *ent; if (cache_idx_start == REG_MISSING) return REG_NOERROR; restart: ent = mctx->bkref_ents + cache_idx_start; do { Idx to_idx, next_node; /* Is this entry ENT is appropriate? */ if (!re_node_set_contains (cur_nodes, ent->node)) continue; /* No. */ to_idx = cur_str + ent->subexp_to - ent->subexp_from; /* Calculate the destination of the back reference, and append it to MCTX->STATE_LOG. */ if (to_idx == cur_str) { /* The backreference did epsilon transit, we must re-check all the node in the current state. */ re_node_set new_dests; reg_errcode_t err2, err3; next_node = dfa->edests[ent->node].elems[0]; if (re_node_set_contains (cur_nodes, next_node)) continue; err = re_node_set_init_1 (&new_dests, next_node); err2 = check_arrival_expand_ecl (dfa, &new_dests, subexp_num, type); err3 = re_node_set_merge (cur_nodes, &new_dests); re_node_set_free (&new_dests); if (BE (err != REG_NOERROR || err2 != REG_NOERROR || err3 != REG_NOERROR, 0)) { err = (err != REG_NOERROR ? err : (err2 != REG_NOERROR ? err2 : err3)); return err; } /* TODO: It is still inefficient... */ goto restart; } else { re_node_set union_set; next_node = dfa->nexts[ent->node]; if (mctx->state_log[to_idx]) { bool ok; if (re_node_set_contains (&mctx->state_log[to_idx]->nodes, next_node)) continue; err = re_node_set_init_copy (&union_set, &mctx->state_log[to_idx]->nodes); ok = re_node_set_insert (&union_set, next_node); if (BE (err != REG_NOERROR || ! ok, 0)) { re_node_set_free (&union_set); err = err != REG_NOERROR ? err : REG_ESPACE; return err; } } else { err = re_node_set_init_1 (&union_set, next_node); if (BE (err != REG_NOERROR, 0)) return err; } mctx->state_log[to_idx] = re_acquire_state (&err, dfa, &union_set); re_node_set_free (&union_set); if (BE (mctx->state_log[to_idx] == NULL && err != REG_NOERROR, 0)) return err; } } while (ent++->more); return REG_NOERROR; } /* Build transition table for the state. Return true if successful. */ static bool internal_function build_trtable (const re_dfa_t *dfa, re_dfastate_t *state) { reg_errcode_t err; Idx i, j; int ch; bool need_word_trtable = false; bitset_word_t elem, mask; bool dests_node_malloced = false; bool dest_states_malloced = false; Idx ndests; /* Number of the destination states from `state'. */ re_dfastate_t **trtable; re_dfastate_t **dest_states = NULL, **dest_states_word, **dest_states_nl; re_node_set follows, *dests_node; bitset_t *dests_ch; bitset_t acceptable; struct dests_alloc { re_node_set dests_node[SBC_MAX]; bitset_t dests_ch[SBC_MAX]; } *dests_alloc; /* We build DFA states which corresponds to the destination nodes from `state'. `dests_node[i]' represents the nodes which i-th destination state contains, and `dests_ch[i]' represents the characters which i-th destination state accepts. */ if (__libc_use_alloca (sizeof (struct dests_alloc))) dests_alloc = (struct dests_alloc *) alloca (sizeof (struct dests_alloc)); else { dests_alloc = re_malloc (struct dests_alloc, 1); if (BE (dests_alloc == NULL, 0)) return false; dests_node_malloced = true; } dests_node = dests_alloc->dests_node; dests_ch = dests_alloc->dests_ch; /* Initialize transiton table. */ state->word_trtable = state->trtable = NULL; /* At first, group all nodes belonging to `state' into several destinations. */ ndests = group_nodes_into_DFAstates (dfa, state, dests_node, dests_ch); if (BE (! REG_VALID_NONZERO_INDEX (ndests), 0)) { if (dests_node_malloced) free (dests_alloc); if (ndests == 0) { state->trtable = (re_dfastate_t **) calloc (sizeof (re_dfastate_t *), SBC_MAX); return true; } return false; } err = re_node_set_alloc (&follows, ndests + 1); if (BE (err != REG_NOERROR, 0)) goto out_free; /* Avoid arithmetic overflow in size calculation. */ if (BE ((((SIZE_MAX - (sizeof (re_node_set) + sizeof (bitset_t)) * SBC_MAX) / (3 * sizeof (re_dfastate_t *))) < ndests), 0)) goto out_free; if (__libc_use_alloca ((sizeof (re_node_set) + sizeof (bitset_t)) * SBC_MAX + ndests * 3 * sizeof (re_dfastate_t *))) dest_states = (re_dfastate_t **) alloca (ndests * 3 * sizeof (re_dfastate_t *)); else { dest_states = (re_dfastate_t **) malloc (ndests * 3 * sizeof (re_dfastate_t *)); if (BE (dest_states == NULL, 0)) { out_free: if (dest_states_malloced) free (dest_states); re_node_set_free (&follows); for (i = 0; i < ndests; ++i) re_node_set_free (dests_node + i); if (dests_node_malloced) free (dests_alloc); return false; } dest_states_malloced = true; } dest_states_word = dest_states + ndests; dest_states_nl = dest_states_word + ndests; bitset_empty (acceptable); /* Then build the states for all destinations. */ for (i = 0; i < ndests; ++i) { Idx next_node; re_node_set_empty (&follows); /* Merge the follows of this destination states. */ for (j = 0; j < dests_node[i].nelem; ++j) { next_node = dfa->nexts[dests_node[i].elems[j]]; if (next_node != REG_MISSING) { err = re_node_set_merge (&follows, dfa->eclosures + next_node); if (BE (err != REG_NOERROR, 0)) goto out_free; } } dest_states[i] = re_acquire_state_context (&err, dfa, &follows, 0); if (BE (dest_states[i] == NULL && err != REG_NOERROR, 0)) goto out_free; /* If the new state has context constraint, build appropriate states for these contexts. */ if (dest_states[i]->has_constraint) { dest_states_word[i] = re_acquire_state_context (&err, dfa, &follows, CONTEXT_WORD); if (BE (dest_states_word[i] == NULL && err != REG_NOERROR, 0)) goto out_free; if (dest_states[i] != dest_states_word[i] && dfa->mb_cur_max > 1) need_word_trtable = true; dest_states_nl[i] = re_acquire_state_context (&err, dfa, &follows, CONTEXT_NEWLINE); if (BE (dest_states_nl[i] == NULL && err != REG_NOERROR, 0)) goto out_free; } else { dest_states_word[i] = dest_states[i]; dest_states_nl[i] = dest_states[i]; } bitset_merge (acceptable, dests_ch[i]); } if (!BE (need_word_trtable, 0)) { /* We don't care about whether the following character is a word character, or we are in a single-byte character set so we can discern by looking at the character code: allocate a 256-entry transition table. */ trtable = state->trtable = (re_dfastate_t **) calloc (sizeof (re_dfastate_t *), SBC_MAX); if (BE (trtable == NULL, 0)) goto out_free; /* For all characters ch...: */ for (i = 0; i < BITSET_WORDS; ++i) for (ch = i * BITSET_WORD_BITS, elem = acceptable[i], mask = 1; elem; mask <<= 1, elem >>= 1, ++ch) if (BE (elem & 1, 0)) { /* There must be exactly one destination which accepts character ch. See group_nodes_into_DFAstates. */ for (j = 0; (dests_ch[j][i] & mask) == 0; ++j) ; /* j-th destination accepts the word character ch. */ if (dfa->word_char[i] & mask) trtable[ch] = dest_states_word[j]; else trtable[ch] = dest_states[j]; } } else { /* We care about whether the following character is a word character, and we are in a multi-byte character set: discern by looking at the character code: build two 256-entry transition tables, one starting at trtable[0] and one starting at trtable[SBC_MAX]. */ trtable = state->word_trtable = (re_dfastate_t **) calloc (sizeof (re_dfastate_t *), 2 * SBC_MAX); if (BE (trtable == NULL, 0)) goto out_free; /* For all characters ch...: */ for (i = 0; i < BITSET_WORDS; ++i) for (ch = i * BITSET_WORD_BITS, elem = acceptable[i], mask = 1; elem; mask <<= 1, elem >>= 1, ++ch) if (BE (elem & 1, 0)) { /* There must be exactly one destination which accepts character ch. See group_nodes_into_DFAstates. */ for (j = 0; (dests_ch[j][i] & mask) == 0; ++j) ; /* j-th destination accepts the word character ch. */ trtable[ch] = dest_states[j]; trtable[ch + SBC_MAX] = dest_states_word[j]; } } /* new line */ if (bitset_contain (acceptable, NEWLINE_CHAR)) { /* The current state accepts newline character. */ for (j = 0; j < ndests; ++j) if (bitset_contain (dests_ch[j], NEWLINE_CHAR)) { /* k-th destination accepts newline character. */ trtable[NEWLINE_CHAR] = dest_states_nl[j]; if (need_word_trtable) trtable[NEWLINE_CHAR + SBC_MAX] = dest_states_nl[j]; /* There must be only one destination which accepts newline. See group_nodes_into_DFAstates. */ break; } } if (dest_states_malloced) free (dest_states); re_node_set_free (&follows); for (i = 0; i < ndests; ++i) re_node_set_free (dests_node + i); if (dests_node_malloced) free (dests_alloc); return true; } /* Group all nodes belonging to STATE into several destinations. Then for all destinations, set the nodes belonging to the destination to DESTS_NODE[i] and set the characters accepted by the destination to DEST_CH[i]. This function return the number of destinations. */ static Idx internal_function group_nodes_into_DFAstates (const re_dfa_t *dfa, const re_dfastate_t *state, re_node_set *dests_node, bitset_t *dests_ch) { reg_errcode_t err; bool ok; Idx i, j, k; Idx ndests; /* Number of the destinations from `state'. */ bitset_t accepts; /* Characters a node can accept. */ const re_node_set *cur_nodes = &state->nodes; bitset_empty (accepts); ndests = 0; /* For all the nodes belonging to `state', */ for (i = 0; i < cur_nodes->nelem; ++i) { re_token_t *node = &dfa->nodes[cur_nodes->elems[i]]; re_token_type_t type = node->type; unsigned int constraint = node->constraint; /* Enumerate all single byte character this node can accept. */ if (type == CHARACTER) bitset_set (accepts, node->opr.c); else if (type == SIMPLE_BRACKET) { bitset_merge (accepts, node->opr.sbcset); } else if (type == OP_PERIOD) { #ifdef RE_ENABLE_I18N if (dfa->mb_cur_max > 1) bitset_merge (accepts, dfa->sb_char); else #endif bitset_set_all (accepts); if (!(dfa->syntax & RE_DOT_NEWLINE)) bitset_clear (accepts, '\n'); if (dfa->syntax & RE_DOT_NOT_NULL) bitset_clear (accepts, '\0'); } #ifdef RE_ENABLE_I18N else if (type == OP_UTF8_PERIOD) { if (ASCII_CHARS % BITSET_WORD_BITS == 0) memset (accepts, -1, ASCII_CHARS / CHAR_BIT); else bitset_merge (accepts, utf8_sb_map); if (!(dfa->syntax & RE_DOT_NEWLINE)) bitset_clear (accepts, '\n'); if (dfa->syntax & RE_DOT_NOT_NULL) bitset_clear (accepts, '\0'); } #endif else continue; /* Check the `accepts' and sift the characters which are not match it the context. */ if (constraint) { if (constraint & NEXT_NEWLINE_CONSTRAINT) { bool accepts_newline = bitset_contain (accepts, NEWLINE_CHAR); bitset_empty (accepts); if (accepts_newline) bitset_set (accepts, NEWLINE_CHAR); else continue; } if (constraint & NEXT_ENDBUF_CONSTRAINT) { bitset_empty (accepts); continue; } if (constraint & NEXT_WORD_CONSTRAINT) { bitset_word_t any_set = 0; if (type == CHARACTER && !node->word_char) { bitset_empty (accepts); continue; } #ifdef RE_ENABLE_I18N if (dfa->mb_cur_max > 1) for (j = 0; j < BITSET_WORDS; ++j) any_set |= (accepts[j] &= (dfa->word_char[j] | ~dfa->sb_char[j])); else #endif for (j = 0; j < BITSET_WORDS; ++j) any_set |= (accepts[j] &= dfa->word_char[j]); if (!any_set) continue; } if (constraint & NEXT_NOTWORD_CONSTRAINT) { bitset_word_t any_set = 0; if (type == CHARACTER && node->word_char) { bitset_empty (accepts); continue; } #ifdef RE_ENABLE_I18N if (dfa->mb_cur_max > 1) for (j = 0; j < BITSET_WORDS; ++j) any_set |= (accepts[j] &= ~(dfa->word_char[j] & dfa->sb_char[j])); else #endif for (j = 0; j < BITSET_WORDS; ++j) any_set |= (accepts[j] &= ~dfa->word_char[j]); if (!any_set) continue; } } /* Then divide `accepts' into DFA states, or create a new state. Above, we make sure that accepts is not empty. */ for (j = 0; j < ndests; ++j) { bitset_t intersec; /* Intersection sets, see below. */ bitset_t remains; /* Flags, see below. */ bitset_word_t has_intersec, not_subset, not_consumed; /* Optimization, skip if this state doesn't accept the character. */ if (type == CHARACTER && !bitset_contain (dests_ch[j], node->opr.c)) continue; /* Enumerate the intersection set of this state and `accepts'. */ has_intersec = 0; for (k = 0; k < BITSET_WORDS; ++k) has_intersec |= intersec[k] = accepts[k] & dests_ch[j][k]; /* And skip if the intersection set is empty. */ if (!has_intersec) continue; /* Then check if this state is a subset of `accepts'. */ not_subset = not_consumed = 0; for (k = 0; k < BITSET_WORDS; ++k) { not_subset |= remains[k] = ~accepts[k] & dests_ch[j][k]; not_consumed |= accepts[k] = accepts[k] & ~dests_ch[j][k]; } /* If this state isn't a subset of `accepts', create a new group state, which has the `remains'. */ if (not_subset) { bitset_copy (dests_ch[ndests], remains); bitset_copy (dests_ch[j], intersec); err = re_node_set_init_copy (dests_node + ndests, &dests_node[j]); if (BE (err != REG_NOERROR, 0)) goto error_return; ++ndests; } /* Put the position in the current group. */ ok = re_node_set_insert (&dests_node[j], cur_nodes->elems[i]); if (BE (! ok, 0)) goto error_return; /* If all characters are consumed, go to next node. */ if (!not_consumed) break; } /* Some characters remain, create a new group. */ if (j == ndests) { bitset_copy (dests_ch[ndests], accepts); err = re_node_set_init_1 (dests_node + ndests, cur_nodes->elems[i]); if (BE (err != REG_NOERROR, 0)) goto error_return; ++ndests; bitset_empty (accepts); } } return ndests; error_return: for (j = 0; j < ndests; ++j) re_node_set_free (dests_node + j); return REG_MISSING; } #ifdef RE_ENABLE_I18N /* Check how many bytes the node `dfa->nodes[node_idx]' accepts. Return the number of the bytes the node accepts. STR_IDX is the current index of the input string. This function handles the nodes which can accept one character, or one collating element like '.', '[a-z]', opposite to the other nodes can only accept one byte. */ static int internal_function check_node_accept_bytes (const re_dfa_t *dfa, Idx node_idx, const re_string_t *input, Idx str_idx) { const re_token_t *node = dfa->nodes + node_idx; int char_len, elem_len; Idx i; if (BE (node->type == OP_UTF8_PERIOD, 0)) { unsigned char c = re_string_byte_at (input, str_idx), d; if (BE (c < 0xc2, 1)) return 0; if (str_idx + 2 > input->len) return 0; d = re_string_byte_at (input, str_idx + 1); if (c < 0xe0) return (d < 0x80 || d > 0xbf) ? 0 : 2; else if (c < 0xf0) { char_len = 3; if (c == 0xe0 && d < 0xa0) return 0; } else if (c < 0xf8) { char_len = 4; if (c == 0xf0 && d < 0x90) return 0; } else if (c < 0xfc) { char_len = 5; if (c == 0xf8 && d < 0x88) return 0; } else if (c < 0xfe) { char_len = 6; if (c == 0xfc && d < 0x84) return 0; } else return 0; if (str_idx + char_len > input->len) return 0; for (i = 1; i < char_len; ++i) { d = re_string_byte_at (input, str_idx + i); if (d < 0x80 || d > 0xbf) return 0; } return char_len; } char_len = re_string_char_size_at (input, str_idx); if (node->type == OP_PERIOD) { if (char_len <= 1) return 0; /* FIXME: I don't think this if is needed, as both '\n' and '\0' are char_len == 1. */ /* '.' accepts any one character except the following two cases. */ if ((!(dfa->syntax & RE_DOT_NEWLINE) && re_string_byte_at (input, str_idx) == '\n') || ((dfa->syntax & RE_DOT_NOT_NULL) && re_string_byte_at (input, str_idx) == '\0')) return 0; return char_len; } elem_len = re_string_elem_size_at (input, str_idx); if ((elem_len <= 1 && char_len <= 1) || char_len == 0) return 0; if (node->type == COMPLEX_BRACKET) { const re_charset_t *cset = node->opr.mbcset; # ifdef _LIBC const unsigned char *pin = ((const unsigned char *) re_string_get_buffer (input) + str_idx); Idx j; uint32_t nrules; # endif /* _LIBC */ int match_len = 0; wchar_t wc = ((cset->nranges || cset->nchar_classes || cset->nmbchars) ? re_string_wchar_at (input, str_idx) : 0); /* match with multibyte character? */ for (i = 0; i < cset->nmbchars; ++i) if (wc == cset->mbchars[i]) { match_len = char_len; goto check_node_accept_bytes_match; } /* match with character_class? */ for (i = 0; i < cset->nchar_classes; ++i) { wctype_t wt = cset->char_classes[i]; if (__iswctype (wc, wt)) { match_len = char_len; goto check_node_accept_bytes_match; } } # ifdef _LIBC nrules = _NL_CURRENT_WORD (LC_COLLATE, _NL_COLLATE_NRULES); if (nrules != 0) { unsigned int in_collseq = 0; const int32_t *table, *indirect; const unsigned char *weights, *extra; const char *collseqwc; int32_t idx; /* This #include defines a local function! */ # include /* match with collating_symbol? */ if (cset->ncoll_syms) extra = (const unsigned char *) _NL_CURRENT (LC_COLLATE, _NL_COLLATE_SYMB_EXTRAMB); for (i = 0; i < cset->ncoll_syms; ++i) { const unsigned char *coll_sym = extra + cset->coll_syms[i]; /* Compare the length of input collating element and the length of current collating element. */ if (*coll_sym != elem_len) continue; /* Compare each bytes. */ for (j = 0; j < *coll_sym; j++) if (pin[j] != coll_sym[1 + j]) break; if (j == *coll_sym) { /* Match if every bytes is equal. */ match_len = j; goto check_node_accept_bytes_match; } } if (cset->nranges) { if (elem_len <= char_len) { collseqwc = _NL_CURRENT (LC_COLLATE, _NL_COLLATE_COLLSEQWC); in_collseq = __collseq_table_lookup (collseqwc, wc); } else in_collseq = find_collation_sequence_value (pin, elem_len); } /* match with range expression? */ for (i = 0; i < cset->nranges; ++i) if (cset->range_starts[i] <= in_collseq && in_collseq <= cset->range_ends[i]) { match_len = elem_len; goto check_node_accept_bytes_match; } /* match with equivalence_class? */ if (cset->nequiv_classes) { const unsigned char *cp = pin; table = (const int32_t *) _NL_CURRENT (LC_COLLATE, _NL_COLLATE_TABLEMB); weights = (const unsigned char *) _NL_CURRENT (LC_COLLATE, _NL_COLLATE_WEIGHTMB); extra = (const unsigned char *) _NL_CURRENT (LC_COLLATE, _NL_COLLATE_EXTRAMB); indirect = (const int32_t *) _NL_CURRENT (LC_COLLATE, _NL_COLLATE_INDIRECTMB); int32_t idx = findidx (&cp); if (idx > 0) for (i = 0; i < cset->nequiv_classes; ++i) { int32_t equiv_class_idx = cset->equiv_classes[i]; size_t weight_len = weights[idx & 0xffffff]; if (weight_len == weights[equiv_class_idx & 0xffffff] && (idx >> 24) == (equiv_class_idx >> 24)) { Idx cnt = 0; idx &= 0xffffff; equiv_class_idx &= 0xffffff; while (cnt <= weight_len && (weights[equiv_class_idx + 1 + cnt] == weights[idx + 1 + cnt])) ++cnt; if (cnt > weight_len) { match_len = elem_len; goto check_node_accept_bytes_match; } } } } } else # endif /* _LIBC */ { /* match with range expression? */ #if __GNUC__ >= 2 && ! (__STDC_VERSION__ < 199901L && __STRICT_ANSI__) wchar_t cmp_buf[] = {L'\0', L'\0', wc, L'\0', L'\0', L'\0'}; #else wchar_t cmp_buf[] = {L'\0', L'\0', L'\0', L'\0', L'\0', L'\0'}; cmp_buf[2] = wc; #endif for (i = 0; i < cset->nranges; ++i) { cmp_buf[0] = cset->range_starts[i]; cmp_buf[4] = cset->range_ends[i]; if (wcscoll (cmp_buf, cmp_buf + 2) <= 0 && wcscoll (cmp_buf + 2, cmp_buf + 4) <= 0) { match_len = char_len; goto check_node_accept_bytes_match; } } } check_node_accept_bytes_match: if (!cset->non_match) return match_len; else { if (match_len > 0) return 0; else return (elem_len > char_len) ? elem_len : char_len; } } return 0; } # ifdef _LIBC static unsigned int internal_function find_collation_sequence_value (const unsigned char *mbs, size_t mbs_len) { uint32_t nrules = _NL_CURRENT_WORD (LC_COLLATE, _NL_COLLATE_NRULES); if (nrules == 0) { if (mbs_len == 1) { /* No valid character. Match it as a single byte character. */ const unsigned char *collseq = (const unsigned char *) _NL_CURRENT (LC_COLLATE, _NL_COLLATE_COLLSEQMB); return collseq[mbs[0]]; } return UINT_MAX; } else { int32_t idx; const unsigned char *extra = (const unsigned char *) _NL_CURRENT (LC_COLLATE, _NL_COLLATE_SYMB_EXTRAMB); int32_t extrasize = (const unsigned char *) _NL_CURRENT (LC_COLLATE, _NL_COLLATE_SYMB_EXTRAMB + 1) - extra; for (idx = 0; idx < extrasize;) { int mbs_cnt; bool found = false; int32_t elem_mbs_len; /* Skip the name of collating element name. */ idx = idx + extra[idx] + 1; elem_mbs_len = extra[idx++]; if (mbs_len == elem_mbs_len) { for (mbs_cnt = 0; mbs_cnt < elem_mbs_len; ++mbs_cnt) if (extra[idx + mbs_cnt] != mbs[mbs_cnt]) break; if (mbs_cnt == elem_mbs_len) /* Found the entry. */ found = true; } /* Skip the byte sequence of the collating element. */ idx += elem_mbs_len; /* Adjust for the alignment. */ idx = (idx + 3) & ~3; /* Skip the collation sequence value. */ idx += sizeof (uint32_t); /* Skip the wide char sequence of the collating element. */ idx = idx + sizeof (uint32_t) * (extra[idx] + 1); /* If we found the entry, return the sequence value. */ if (found) return *(uint32_t *) (extra + idx); /* Skip the collation sequence value. */ idx += sizeof (uint32_t); } return UINT_MAX; } } # endif /* _LIBC */ #endif /* RE_ENABLE_I18N */ /* Check whether the node accepts the byte which is IDX-th byte of the INPUT. */ static bool internal_function check_node_accept (const re_match_context_t *mctx, const re_token_t *node, Idx idx) { unsigned char ch; ch = re_string_byte_at (&mctx->input, idx); switch (node->type) { case CHARACTER: if (node->opr.c != ch) return false; break; case SIMPLE_BRACKET: if (!bitset_contain (node->opr.sbcset, ch)) return false; break; #ifdef RE_ENABLE_I18N case OP_UTF8_PERIOD: if (ch >= ASCII_CHARS) return false; /* FALLTHROUGH */ #endif case OP_PERIOD: if ((ch == '\n' && !(mctx->dfa->syntax & RE_DOT_NEWLINE)) || (ch == '\0' && (mctx->dfa->syntax & RE_DOT_NOT_NULL))) return false; break; default: return false; } if (node->constraint) { /* The node has constraints. Check whether the current context satisfies the constraints. */ unsigned int context = re_string_context_at (&mctx->input, idx, mctx->eflags); if (NOT_SATISFY_NEXT_CONSTRAINT (node->constraint, context)) return false; } return true; } /* Extend the buffers, if the buffers have run out. */ static reg_errcode_t internal_function __attribute_warn_unused_result__ extend_buffers (re_match_context_t *mctx) { reg_errcode_t ret; re_string_t *pstr = &mctx->input; /* Avoid overflow. */ if (BE (SIZE_MAX / 2 / sizeof (re_dfastate_t *) <= pstr->bufs_len, 0)) return REG_ESPACE; /* Double the lengthes of the buffers. */ ret = re_string_realloc_buffers (pstr, pstr->bufs_len * 2); if (BE (ret != REG_NOERROR, 0)) return ret; if (mctx->state_log != NULL) { /* And double the length of state_log. */ /* XXX We have no indication of the size of this buffer. If this allocation fail we have no indication that the state_log array does not have the right size. */ re_dfastate_t **new_array = re_realloc (mctx->state_log, re_dfastate_t *, pstr->bufs_len + 1); if (BE (new_array == NULL, 0)) return REG_ESPACE; mctx->state_log = new_array; } /* Then reconstruct the buffers. */ if (pstr->icase) { #ifdef RE_ENABLE_I18N if (pstr->mb_cur_max > 1) { ret = build_wcs_upper_buffer (pstr); if (BE (ret != REG_NOERROR, 0)) return ret; } else #endif /* RE_ENABLE_I18N */ build_upper_buffer (pstr); } else { #ifdef RE_ENABLE_I18N if (pstr->mb_cur_max > 1) build_wcs_buffer (pstr); else #endif /* RE_ENABLE_I18N */ { if (pstr->trans != NULL) re_string_translate_buffer (pstr); } } return REG_NOERROR; } /* Functions for matching context. */ /* Initialize MCTX. */ static reg_errcode_t internal_function __attribute_warn_unused_result__ match_ctx_init (re_match_context_t *mctx, int eflags, Idx n) { mctx->eflags = eflags; mctx->match_last = REG_MISSING; if (n > 0) { /* Avoid overflow. */ size_t max_object_size = MAX (sizeof (struct re_backref_cache_entry), sizeof (re_sub_match_top_t *)); if (BE (SIZE_MAX / max_object_size < n, 0)) return REG_ESPACE; mctx->bkref_ents = re_malloc (struct re_backref_cache_entry, n); mctx->sub_tops = re_malloc (re_sub_match_top_t *, n); if (BE (mctx->bkref_ents == NULL || mctx->sub_tops == NULL, 0)) return REG_ESPACE; } /* Already zero-ed by the caller. else mctx->bkref_ents = NULL; mctx->nbkref_ents = 0; mctx->nsub_tops = 0; */ mctx->abkref_ents = n; mctx->max_mb_elem_len = 1; mctx->asub_tops = n; return REG_NOERROR; } /* Clean the entries which depend on the current input in MCTX. This function must be invoked when the matcher changes the start index of the input, or changes the input string. */ static void internal_function match_ctx_clean (re_match_context_t *mctx) { Idx st_idx; for (st_idx = 0; st_idx < mctx->nsub_tops; ++st_idx) { Idx sl_idx; re_sub_match_top_t *top = mctx->sub_tops[st_idx]; for (sl_idx = 0; sl_idx < top->nlasts; ++sl_idx) { re_sub_match_last_t *last = top->lasts[sl_idx]; re_free (last->path.array); re_free (last); } re_free (top->lasts); if (top->path) { re_free (top->path->array); re_free (top->path); } free (top); } mctx->nsub_tops = 0; mctx->nbkref_ents = 0; } /* Free all the memory associated with MCTX. */ static void internal_function match_ctx_free (re_match_context_t *mctx) { /* First, free all the memory associated with MCTX->SUB_TOPS. */ match_ctx_clean (mctx); re_free (mctx->sub_tops); re_free (mctx->bkref_ents); } /* Add a new backreference entry to MCTX. Note that we assume that caller never call this function with duplicate entry, and call with STR_IDX which isn't smaller than any existing entry. */ static reg_errcode_t internal_function __attribute_warn_unused_result__ match_ctx_add_entry (re_match_context_t *mctx, Idx node, Idx str_idx, Idx from, Idx to) { if (mctx->nbkref_ents >= mctx->abkref_ents) { struct re_backref_cache_entry* new_entry; new_entry = re_realloc (mctx->bkref_ents, struct re_backref_cache_entry, mctx->abkref_ents * 2); if (BE (new_entry == NULL, 0)) { re_free (mctx->bkref_ents); return REG_ESPACE; } mctx->bkref_ents = new_entry; memset (mctx->bkref_ents + mctx->nbkref_ents, '\0', sizeof (struct re_backref_cache_entry) * mctx->abkref_ents); mctx->abkref_ents *= 2; } if (mctx->nbkref_ents > 0 && mctx->bkref_ents[mctx->nbkref_ents - 1].str_idx == str_idx) mctx->bkref_ents[mctx->nbkref_ents - 1].more = 1; mctx->bkref_ents[mctx->nbkref_ents].node = node; mctx->bkref_ents[mctx->nbkref_ents].str_idx = str_idx; mctx->bkref_ents[mctx->nbkref_ents].subexp_from = from; mctx->bkref_ents[mctx->nbkref_ents].subexp_to = to; /* This is a cache that saves negative results of check_dst_limits_calc_pos. If bit N is clear, means that this entry won't epsilon-transition to an OP_OPEN_SUBEXP or OP_CLOSE_SUBEXP for the N+1-th subexpression. If it is set, check_dst_limits_calc_pos_1 will recurse and try to find one such node. A backreference does not epsilon-transition unless it is empty, so set to all zeros if FROM != TO. */ mctx->bkref_ents[mctx->nbkref_ents].eps_reachable_subexps_map = (from == to ? -1 : 0); mctx->bkref_ents[mctx->nbkref_ents++].more = 0; if (mctx->max_mb_elem_len < to - from) mctx->max_mb_elem_len = to - from; return REG_NOERROR; } /* Return the first entry with the same str_idx, or REG_MISSING if none is found. Note that MCTX->BKREF_ENTS is already sorted by MCTX->STR_IDX. */ static Idx internal_function search_cur_bkref_entry (const re_match_context_t *mctx, Idx str_idx) { Idx left, right, mid, last; last = right = mctx->nbkref_ents; for (left = 0; left < right;) { mid = (left + right) / 2; if (mctx->bkref_ents[mid].str_idx < str_idx) left = mid + 1; else right = mid; } if (left < last && mctx->bkref_ents[left].str_idx == str_idx) return left; else return REG_MISSING; } /* Register the node NODE, whose type is OP_OPEN_SUBEXP, and which matches at STR_IDX. */ static reg_errcode_t internal_function __attribute_warn_unused_result__ match_ctx_add_subtop (re_match_context_t *mctx, Idx node, Idx str_idx) { #ifdef DEBUG assert (mctx->sub_tops != NULL); assert (mctx->asub_tops > 0); #endif if (BE (mctx->nsub_tops == mctx->asub_tops, 0)) { Idx new_asub_tops = mctx->asub_tops * 2; re_sub_match_top_t **new_array = re_realloc (mctx->sub_tops, re_sub_match_top_t *, new_asub_tops); if (BE (new_array == NULL, 0)) return REG_ESPACE; mctx->sub_tops = new_array; mctx->asub_tops = new_asub_tops; } mctx->sub_tops[mctx->nsub_tops] = calloc (1, sizeof (re_sub_match_top_t)); if (BE (mctx->sub_tops[mctx->nsub_tops] == NULL, 0)) return REG_ESPACE; mctx->sub_tops[mctx->nsub_tops]->node = node; mctx->sub_tops[mctx->nsub_tops++]->str_idx = str_idx; return REG_NOERROR; } /* Register the node NODE, whose type is OP_CLOSE_SUBEXP, and which matches at STR_IDX, whose corresponding OP_OPEN_SUBEXP is SUB_TOP. */ static re_sub_match_last_t * internal_function match_ctx_add_sublast (re_sub_match_top_t *subtop, Idx node, Idx str_idx) { re_sub_match_last_t *new_entry; if (BE (subtop->nlasts == subtop->alasts, 0)) { Idx new_alasts = 2 * subtop->alasts + 1; re_sub_match_last_t **new_array = re_realloc (subtop->lasts, re_sub_match_last_t *, new_alasts); if (BE (new_array == NULL, 0)) return NULL; subtop->lasts = new_array; subtop->alasts = new_alasts; } new_entry = calloc (1, sizeof (re_sub_match_last_t)); if (BE (new_entry != NULL, 1)) { subtop->lasts[subtop->nlasts] = new_entry; new_entry->node = node; new_entry->str_idx = str_idx; ++subtop->nlasts; } return new_entry; } static void internal_function sift_ctx_init (re_sift_context_t *sctx, re_dfastate_t **sifted_sts, re_dfastate_t **limited_sts, Idx last_node, Idx last_str_idx) { sctx->sifted_states = sifted_sts; sctx->limited_states = limited_sts; sctx->last_node = last_node; sctx->last_str_idx = last_str_idx; re_node_set_init_empty (&sctx->limits); } libprelude-1.0.0/libmissing/time_r.c0000664000076400007640000000246011341220442014350 00000000000000/* Reentrant time functions like localtime_r. Copyright (C) 2003, 2006, 2007, 2009, 2010 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser 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 Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ /* Written by Paul Eggert. */ #include #include #include static struct tm * copy_tm_result (struct tm *dest, struct tm const *src) { if (! src) return 0; *dest = *src; return dest; } struct tm * gmtime_r (time_t const * restrict t, struct tm * restrict tp) { return copy_tm_result (tp, gmtime (t)); } struct tm * localtime_r (time_t const * restrict t, struct tm * restrict tp) { return copy_tm_result (tp, localtime (t)); } libprelude-1.0.0/libmissing/printf-parse.c0000664000076400007640000005213211341220437015510 00000000000000/* Formatted output to strings. Copyright (C) 1999-2000, 2002-2003, 2006-2010 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser 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 Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ /* This file can be parametrized with the following macros: CHAR_T The element type of the format string. CHAR_T_ONLY_ASCII Set to 1 to enable verification that all characters in the format string are ASCII. DIRECTIVE Structure denoting a format directive. Depends on CHAR_T. DIRECTIVES Structure denoting the set of format directives of a format string. Depends on CHAR_T. PRINTF_PARSE Function that parses a format string. Depends on CHAR_T. STATIC Set to 'static' to declare the function static. ENABLE_UNISTDIO Set to 1 to enable the unistdio extensions. */ #ifndef PRINTF_PARSE # include #endif /* Specification. */ #ifndef PRINTF_PARSE # include "printf-parse.h" #endif /* Default parameters. */ #ifndef PRINTF_PARSE # define PRINTF_PARSE printf_parse # define CHAR_T char # define DIRECTIVE char_directive # define DIRECTIVES char_directives #endif /* Get size_t, NULL. */ #include /* Get intmax_t. */ #if defined IN_LIBINTL || defined IN_LIBASPRINTF # if HAVE_STDINT_H_WITH_UINTMAX # include # endif # if HAVE_INTTYPES_H_WITH_UINTMAX # include # endif #else # include #endif /* malloc(), realloc(), free(). */ #include /* errno. */ #include /* Checked size_t computations. */ #include "xsize.h" #if CHAR_T_ONLY_ASCII /* c_isascii(). */ # include "c-ctype.h" #endif #ifdef STATIC STATIC #endif int PRINTF_PARSE (const CHAR_T *format, DIRECTIVES *d, arguments *a) { const CHAR_T *cp = format; /* pointer into format */ size_t arg_posn = 0; /* number of regular arguments consumed */ size_t d_allocated; /* allocated elements of d->dir */ size_t a_allocated; /* allocated elements of a->arg */ size_t max_width_length = 0; size_t max_precision_length = 0; d->count = 0; d_allocated = 1; d->dir = (DIRECTIVE *) malloc (d_allocated * sizeof (DIRECTIVE)); if (d->dir == NULL) /* Out of memory. */ goto out_of_memory_1; a->count = 0; a_allocated = 0; a->arg = NULL; #define REGISTER_ARG(_index_,_type_) \ { \ size_t n = (_index_); \ if (n >= a_allocated) \ { \ size_t memory_size; \ argument *memory; \ \ a_allocated = xtimes (a_allocated, 2); \ if (a_allocated <= n) \ a_allocated = xsum (n, 1); \ memory_size = xtimes (a_allocated, sizeof (argument)); \ if (size_overflow_p (memory_size)) \ /* Overflow, would lead to out of memory. */ \ goto out_of_memory; \ memory = (argument *) (a->arg \ ? realloc (a->arg, memory_size) \ : malloc (memory_size)); \ if (memory == NULL) \ /* Out of memory. */ \ goto out_of_memory; \ a->arg = memory; \ } \ while (a->count <= n) \ a->arg[a->count++].type = TYPE_NONE; \ if (a->arg[n].type == TYPE_NONE) \ a->arg[n].type = (_type_); \ else if (a->arg[n].type != (_type_)) \ /* Ambiguous type for positional argument. */ \ goto error; \ } while (*cp != '\0') { CHAR_T c = *cp++; if (c == '%') { size_t arg_index = ARG_NONE; DIRECTIVE *dp = &d->dir[d->count]; /* pointer to next directive */ /* Initialize the next directive. */ dp->dir_start = cp - 1; dp->flags = 0; dp->width_start = NULL; dp->width_end = NULL; dp->width_arg_index = ARG_NONE; dp->precision_start = NULL; dp->precision_end = NULL; dp->precision_arg_index = ARG_NONE; dp->arg_index = ARG_NONE; /* Test for positional argument. */ if (*cp >= '0' && *cp <= '9') { const CHAR_T *np; for (np = cp; *np >= '0' && *np <= '9'; np++) ; if (*np == '$') { size_t n = 0; for (np = cp; *np >= '0' && *np <= '9'; np++) n = xsum (xtimes (n, 10), *np - '0'); if (n == 0) /* Positional argument 0. */ goto error; if (size_overflow_p (n)) /* n too large, would lead to out of memory later. */ goto error; arg_index = n - 1; cp = np + 1; } } /* Read the flags. */ for (;;) { if (*cp == '\'') { dp->flags |= FLAG_GROUP; cp++; } else if (*cp == '-') { dp->flags |= FLAG_LEFT; cp++; } else if (*cp == '+') { dp->flags |= FLAG_SHOWSIGN; cp++; } else if (*cp == ' ') { dp->flags |= FLAG_SPACE; cp++; } else if (*cp == '#') { dp->flags |= FLAG_ALT; cp++; } else if (*cp == '0') { dp->flags |= FLAG_ZERO; cp++; } else break; } /* Parse the field width. */ if (*cp == '*') { dp->width_start = cp; cp++; dp->width_end = cp; if (max_width_length < 1) max_width_length = 1; /* Test for positional argument. */ if (*cp >= '0' && *cp <= '9') { const CHAR_T *np; for (np = cp; *np >= '0' && *np <= '9'; np++) ; if (*np == '$') { size_t n = 0; for (np = cp; *np >= '0' && *np <= '9'; np++) n = xsum (xtimes (n, 10), *np - '0'); if (n == 0) /* Positional argument 0. */ goto error; if (size_overflow_p (n)) /* n too large, would lead to out of memory later. */ goto error; dp->width_arg_index = n - 1; cp = np + 1; } } if (dp->width_arg_index == ARG_NONE) { dp->width_arg_index = arg_posn++; if (dp->width_arg_index == ARG_NONE) /* arg_posn wrapped around. */ goto error; } REGISTER_ARG (dp->width_arg_index, TYPE_INT); } else if (*cp >= '0' && *cp <= '9') { size_t width_length; dp->width_start = cp; for (; *cp >= '0' && *cp <= '9'; cp++) ; dp->width_end = cp; width_length = dp->width_end - dp->width_start; if (max_width_length < width_length) max_width_length = width_length; } /* Parse the precision. */ if (*cp == '.') { cp++; if (*cp == '*') { dp->precision_start = cp - 1; cp++; dp->precision_end = cp; if (max_precision_length < 2) max_precision_length = 2; /* Test for positional argument. */ if (*cp >= '0' && *cp <= '9') { const CHAR_T *np; for (np = cp; *np >= '0' && *np <= '9'; np++) ; if (*np == '$') { size_t n = 0; for (np = cp; *np >= '0' && *np <= '9'; np++) n = xsum (xtimes (n, 10), *np - '0'); if (n == 0) /* Positional argument 0. */ goto error; if (size_overflow_p (n)) /* n too large, would lead to out of memory later. */ goto error; dp->precision_arg_index = n - 1; cp = np + 1; } } if (dp->precision_arg_index == ARG_NONE) { dp->precision_arg_index = arg_posn++; if (dp->precision_arg_index == ARG_NONE) /* arg_posn wrapped around. */ goto error; } REGISTER_ARG (dp->precision_arg_index, TYPE_INT); } else { size_t precision_length; dp->precision_start = cp - 1; for (; *cp >= '0' && *cp <= '9'; cp++) ; dp->precision_end = cp; precision_length = dp->precision_end - dp->precision_start; if (max_precision_length < precision_length) max_precision_length = precision_length; } } { arg_type type; /* Parse argument type/size specifiers. */ { int flags = 0; for (;;) { if (*cp == 'h') { flags |= (1 << (flags & 1)); cp++; } else if (*cp == 'L') { flags |= 4; cp++; } else if (*cp == 'l') { flags += 8; cp++; } else if (*cp == 'j') { if (sizeof (intmax_t) > sizeof (long)) { /* intmax_t = long long */ flags += 16; } else if (sizeof (intmax_t) > sizeof (int)) { /* intmax_t = long */ flags += 8; } cp++; } else if (*cp == 'z' || *cp == 'Z') { /* 'z' is standardized in ISO C 99, but glibc uses 'Z' because the warning facility in gcc-2.95.2 understands only 'Z' (see gcc-2.95.2/gcc/c-common.c:1784). */ if (sizeof (size_t) > sizeof (long)) { /* size_t = long long */ flags += 16; } else if (sizeof (size_t) > sizeof (int)) { /* size_t = long */ flags += 8; } cp++; } else if (*cp == 't') { if (sizeof (ptrdiff_t) > sizeof (long)) { /* ptrdiff_t = long long */ flags += 16; } else if (sizeof (ptrdiff_t) > sizeof (int)) { /* ptrdiff_t = long */ flags += 8; } cp++; } #if defined __APPLE__ && defined __MACH__ /* On MacOS X 10.3, PRIdMAX is defined as "qd". We cannot change it to "lld" because PRIdMAX must also be understood by the system's printf routines. */ else if (*cp == 'q') { if (64 / 8 > sizeof (long)) { /* int64_t = long long */ flags += 16; } else { /* int64_t = long */ flags += 8; } cp++; } #endif #if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ /* On native Win32, PRIdMAX is defined as "I64d". We cannot change it to "lld" because PRIdMAX must also be understood by the system's printf routines. */ else if (*cp == 'I' && cp[1] == '6' && cp[2] == '4') { if (64 / 8 > sizeof (long)) { /* __int64 = long long */ flags += 16; } else { /* __int64 = long */ flags += 8; } cp += 3; } #endif else break; } /* Read the conversion character. */ c = *cp++; switch (c) { case 'd': case 'i': #if HAVE_LONG_LONG_INT /* If 'long long' exists and is larger than 'long': */ if (flags >= 16 || (flags & 4)) type = TYPE_LONGLONGINT; else #endif /* If 'long long' exists and is the same as 'long', we parse "lld" into TYPE_LONGINT. */ if (flags >= 8) type = TYPE_LONGINT; else if (flags & 2) type = TYPE_SCHAR; else if (flags & 1) type = TYPE_SHORT; else type = TYPE_INT; break; case 'o': case 'u': case 'x': case 'X': #if HAVE_LONG_LONG_INT /* If 'long long' exists and is larger than 'long': */ if (flags >= 16 || (flags & 4)) type = TYPE_ULONGLONGINT; else #endif /* If 'unsigned long long' exists and is the same as 'unsigned long', we parse "llu" into TYPE_ULONGINT. */ if (flags >= 8) type = TYPE_ULONGINT; else if (flags & 2) type = TYPE_UCHAR; else if (flags & 1) type = TYPE_USHORT; else type = TYPE_UINT; break; case 'f': case 'F': case 'e': case 'E': case 'g': case 'G': case 'a': case 'A': if (flags >= 16 || (flags & 4)) type = TYPE_LONGDOUBLE; else type = TYPE_DOUBLE; break; case 'c': if (flags >= 8) #if HAVE_WINT_T type = TYPE_WIDE_CHAR; #else goto error; #endif else type = TYPE_CHAR; break; #if HAVE_WINT_T case 'C': type = TYPE_WIDE_CHAR; c = 'c'; break; #endif case 's': if (flags >= 8) #if HAVE_WCHAR_T type = TYPE_WIDE_STRING; #else goto error; #endif else type = TYPE_STRING; break; #if HAVE_WCHAR_T case 'S': type = TYPE_WIDE_STRING; c = 's'; break; #endif case 'p': type = TYPE_POINTER; break; case 'n': #if HAVE_LONG_LONG_INT /* If 'long long' exists and is larger than 'long': */ if (flags >= 16 || (flags & 4)) type = TYPE_COUNT_LONGLONGINT_POINTER; else #endif /* If 'long long' exists and is the same as 'long', we parse "lln" into TYPE_COUNT_LONGINT_POINTER. */ if (flags >= 8) type = TYPE_COUNT_LONGINT_POINTER; else if (flags & 2) type = TYPE_COUNT_SCHAR_POINTER; else if (flags & 1) type = TYPE_COUNT_SHORT_POINTER; else type = TYPE_COUNT_INT_POINTER; break; #if ENABLE_UNISTDIO /* The unistdio extensions. */ case 'U': if (flags >= 16) type = TYPE_U32_STRING; else if (flags >= 8) type = TYPE_U16_STRING; else type = TYPE_U8_STRING; break; #endif case '%': type = TYPE_NONE; break; default: /* Unknown conversion character. */ goto error; } } if (type != TYPE_NONE) { dp->arg_index = arg_index; if (dp->arg_index == ARG_NONE) { dp->arg_index = arg_posn++; if (dp->arg_index == ARG_NONE) /* arg_posn wrapped around. */ goto error; } REGISTER_ARG (dp->arg_index, type); } dp->conversion = c; dp->dir_end = cp; } d->count++; if (d->count >= d_allocated) { size_t memory_size; DIRECTIVE *memory; d_allocated = xtimes (d_allocated, 2); memory_size = xtimes (d_allocated, sizeof (DIRECTIVE)); if (size_overflow_p (memory_size)) /* Overflow, would lead to out of memory. */ goto out_of_memory; memory = (DIRECTIVE *) realloc (d->dir, memory_size); if (memory == NULL) /* Out of memory. */ goto out_of_memory; d->dir = memory; } } #if CHAR_T_ONLY_ASCII else if (!c_isascii (c)) { /* Non-ASCII character. Not supported. */ goto error; } #endif } d->dir[d->count].dir_start = cp; d->max_width_length = max_width_length; d->max_precision_length = max_precision_length; return 0; error: if (a->arg) free (a->arg); if (d->dir) free (d->dir); errno = EINVAL; return -1; out_of_memory: if (a->arg) free (a->arg); if (d->dir) free (d->dir); out_of_memory_1: errno = ENOMEM; return -1; } #undef PRINTF_PARSE #undef DIRECTIVES #undef DIRECTIVE #undef CHAR_T_ONLY_ASCII #undef CHAR_T libprelude-1.0.0/libmissing/sys_stat.in.h0000664000076400007640000003067311341220440015361 00000000000000/* Provide a more complete sys/stat header file. Copyright (C) 2005-2010 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser 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 Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ /* Written by Eric Blake, Paul Eggert, and Jim Meyering. */ /* This file is supposed to be used on platforms where is incomplete. It is intended to provide definitions and prototypes needed by an application. Start with what the system provides. */ #if __GNUC__ >= 3 @PRAGMA_SYSTEM_HEADER@ #endif #if defined __need_system_sys_stat_h /* Special invocation convention. */ #@INCLUDE_NEXT@ @NEXT_SYS_STAT_H@ #else /* Normal invocation convention. */ #ifndef _GL_SYS_STAT_H /* Get nlink_t. */ #include /* Get struct timespec. */ #include /* The include_next requires a split double-inclusion guard. */ #@INCLUDE_NEXT@ @NEXT_SYS_STAT_H@ #ifndef _GL_SYS_STAT_H #define _GL_SYS_STAT_H /* The definition of _GL_ARG_NONNULL is copied here. */ /* The definition of _GL_WARN_ON_USE is copied here. */ /* Before doing "#define mkdir rpl_mkdir" below, we need to include all headers that may declare mkdir(). */ #if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ # include #endif #ifndef S_IFMT # define S_IFMT 0170000 #endif #if STAT_MACROS_BROKEN # undef S_ISBLK # undef S_ISCHR # undef S_ISDIR # undef S_ISFIFO # undef S_ISLNK # undef S_ISNAM # undef S_ISMPB # undef S_ISMPC # undef S_ISNWK # undef S_ISREG # undef S_ISSOCK #endif #ifndef S_ISBLK # ifdef S_IFBLK # define S_ISBLK(m) (((m) & S_IFMT) == S_IFBLK) # else # define S_ISBLK(m) 0 # endif #endif #ifndef S_ISCHR # ifdef S_IFCHR # define S_ISCHR(m) (((m) & S_IFMT) == S_IFCHR) # else # define S_ISCHR(m) 0 # endif #endif #ifndef S_ISDIR # ifdef S_IFDIR # define S_ISDIR(m) (((m) & S_IFMT) == S_IFDIR) # else # define S_ISDIR(m) 0 # endif #endif #ifndef S_ISDOOR /* Solaris 2.5 and up */ # define S_ISDOOR(m) 0 #endif #ifndef S_ISFIFO # ifdef S_IFIFO # define S_ISFIFO(m) (((m) & S_IFMT) == S_IFIFO) # else # define S_ISFIFO(m) 0 # endif #endif #ifndef S_ISLNK # ifdef S_IFLNK # define S_ISLNK(m) (((m) & S_IFMT) == S_IFLNK) # else # define S_ISLNK(m) 0 # endif #endif #ifndef S_ISMPB /* V7 */ # ifdef S_IFMPB # define S_ISMPB(m) (((m) & S_IFMT) == S_IFMPB) # define S_ISMPC(m) (((m) & S_IFMT) == S_IFMPC) # else # define S_ISMPB(m) 0 # define S_ISMPC(m) 0 # endif #endif #ifndef S_ISNAM /* Xenix */ # ifdef S_IFNAM # define S_ISNAM(m) (((m) & S_IFMT) == S_IFNAM) # else # define S_ISNAM(m) 0 # endif #endif #ifndef S_ISNWK /* HP/UX */ # ifdef S_IFNWK # define S_ISNWK(m) (((m) & S_IFMT) == S_IFNWK) # else # define S_ISNWK(m) 0 # endif #endif #ifndef S_ISPORT /* Solaris 10 and up */ # define S_ISPORT(m) 0 #endif #ifndef S_ISREG # ifdef S_IFREG # define S_ISREG(m) (((m) & S_IFMT) == S_IFREG) # else # define S_ISREG(m) 0 # endif #endif #ifndef S_ISSOCK # ifdef S_IFSOCK # define S_ISSOCK(m) (((m) & S_IFMT) == S_IFSOCK) # else # define S_ISSOCK(m) 0 # endif #endif #ifndef S_TYPEISMQ # define S_TYPEISMQ(p) 0 #endif #ifndef S_TYPEISTMO # define S_TYPEISTMO(p) 0 #endif #ifndef S_TYPEISSEM # ifdef S_INSEM # define S_TYPEISSEM(p) (S_ISNAM ((p)->st_mode) && (p)->st_rdev == S_INSEM) # else # define S_TYPEISSEM(p) 0 # endif #endif #ifndef S_TYPEISSHM # ifdef S_INSHD # define S_TYPEISSHM(p) (S_ISNAM ((p)->st_mode) && (p)->st_rdev == S_INSHD) # else # define S_TYPEISSHM(p) 0 # endif #endif /* high performance ("contiguous data") */ #ifndef S_ISCTG # define S_ISCTG(p) 0 #endif /* Cray DMF (data migration facility): off line, with data */ #ifndef S_ISOFD # define S_ISOFD(p) 0 #endif /* Cray DMF (data migration facility): off line, with no data */ #ifndef S_ISOFL # define S_ISOFL(p) 0 #endif /* 4.4BSD whiteout */ #ifndef S_ISWHT # define S_ISWHT(m) 0 #endif /* If any of the following are undefined, define them to their de facto standard values. */ #if !S_ISUID # define S_ISUID 04000 #endif #if !S_ISGID # define S_ISGID 02000 #endif /* S_ISVTX is a common extension to POSIX. */ #ifndef S_ISVTX # define S_ISVTX 01000 #endif #if !S_IRUSR && S_IREAD # define S_IRUSR S_IREAD #endif #if !S_IRUSR # define S_IRUSR 00400 #endif #if !S_IRGRP # define S_IRGRP (S_IRUSR >> 3) #endif #if !S_IROTH # define S_IROTH (S_IRUSR >> 6) #endif #if !S_IWUSR && S_IWRITE # define S_IWUSR S_IWRITE #endif #if !S_IWUSR # define S_IWUSR 00200 #endif #if !S_IWGRP # define S_IWGRP (S_IWUSR >> 3) #endif #if !S_IWOTH # define S_IWOTH (S_IWUSR >> 6) #endif #if !S_IXUSR && S_IEXEC # define S_IXUSR S_IEXEC #endif #if !S_IXUSR # define S_IXUSR 00100 #endif #if !S_IXGRP # define S_IXGRP (S_IXUSR >> 3) #endif #if !S_IXOTH # define S_IXOTH (S_IXUSR >> 6) #endif #if !S_IRWXU # define S_IRWXU (S_IRUSR | S_IWUSR | S_IXUSR) #endif #if !S_IRWXG # define S_IRWXG (S_IRGRP | S_IWGRP | S_IXGRP) #endif #if !S_IRWXO # define S_IRWXO (S_IROTH | S_IWOTH | S_IXOTH) #endif /* S_IXUGO is a common extension to POSIX. */ #if !S_IXUGO # define S_IXUGO (S_IXUSR | S_IXGRP | S_IXOTH) #endif #ifndef S_IRWXUGO # define S_IRWXUGO (S_IRWXU | S_IRWXG | S_IRWXO) #endif /* Macros for futimens and utimensat. */ #ifndef UTIME_NOW # define UTIME_NOW (-1) # define UTIME_OMIT (-2) #endif #ifdef __cplusplus extern "C" { #endif #if @GNULIB_FCHMODAT@ # if !@HAVE_FCHMODAT@ extern int fchmodat (int fd, char const *file, mode_t mode, int flag) _GL_ARG_NONNULL ((2)); # endif #elif defined GNULIB_POSIXCHECK # undef fchmodat # if HAVE_RAW_DECL_FCHMODAT _GL_WARN_ON_USE (fchmodat, "fchmodat is not portable - " "use gnulib module openat for portability"); # endif #endif #if @REPLACE_FSTAT@ # define fstat rpl_fstat extern int fstat (int fd, struct stat *buf) _GL_ARG_NONNULL ((2)); #endif #if @GNULIB_FSTATAT@ # if @REPLACE_FSTATAT@ # undef fstatat # define fstatat rpl_fstatat # endif # if !@HAVE_FSTATAT@ || @REPLACE_FSTATAT@ extern int fstatat (int fd, char const *name, struct stat *st, int flags) _GL_ARG_NONNULL ((2, 3)); # endif #elif defined GNULIB_POSIXCHECK # undef fstatat # if HAVE_RAW_DECL_FSTATAT _GL_WARN_ON_USE (fstatat, "fstatat is not portable - " "use gnulib module openat for portability"); # endif #endif #if @GNULIB_FUTIMENS@ # if @REPLACE_FUTIMENS@ # undef futimens # define futimens rpl_futimens # endif # if !@HAVE_FUTIMENS@ || @REPLACE_FUTIMENS@ extern int futimens (int fd, struct timespec const times[2]); # endif #elif defined GNULIB_POSIXCHECK # undef futimens # if HAVE_RAW_DECL_FUTIMENS _GL_WARN_ON_USE (futimens, "futimens is not portable - " "use gnulib module futimens for portability"); # endif #endif #if @GNULIB_LCHMOD@ /* Change the mode of FILENAME to MODE, without dereferencing it if FILENAME denotes a symbolic link. */ # if !@HAVE_LCHMOD@ /* The lchmod replacement follows symbolic links. Callers should take this into account; lchmod should be applied only to arguments that are known to not be symbolic links. On hosts that lack lchmod, this can lead to race conditions between the check and the invocation of lchmod, but we know of no workarounds that are reliable in general. You might try requesting support for lchmod from your operating system supplier. */ # define lchmod chmod # endif # if 0 /* assume already declared */ extern int lchmod (const char *filename, mode_t mode) _GL_ARG_NONNULL ((1)); # endif #elif defined GNULIB_POSIXCHECK # undef lchmod # if HAVE_RAW_DECL_LCHMOD _GL_WARN_ON_USE (lchmod, "lchmod is unportable - " "use gnulib module lchmod for portability"); # endif #endif #if @GNULIB_LSTAT@ # if ! @HAVE_LSTAT@ /* mingw does not support symlinks, therefore it does not have lstat. But without links, stat does just fine. */ # define lstat stat # elif @REPLACE_LSTAT@ # undef lstat # define lstat rpl_lstat extern int rpl_lstat (const char *name, struct stat *buf) _GL_ARG_NONNULL ((1, 2)); # endif #elif defined GNULIB_POSIXCHECK # undef lstat # if HAVE_RAW_DECL_LSTAT _GL_WARN_ON_USE (lstat, "lstat is unportable - " "use gnulib module lstat for portability"); # endif #endif #if @REPLACE_MKDIR@ # undef mkdir # define mkdir rpl_mkdir extern int mkdir (char const *name, mode_t mode) _GL_ARG_NONNULL ((1)); #else /* mingw's _mkdir() function has 1 argument, but we pass 2 arguments. Additionally, it declares _mkdir (and depending on compile flags, an alias mkdir), only in the nonstandard , which is included above. */ # if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ static inline int rpl_mkdir (char const *name, mode_t mode) { return _mkdir (name); } # define mkdir rpl_mkdir # endif #endif #if @GNULIB_MKDIRAT@ # if !@HAVE_MKDIRAT@ extern int mkdirat (int fd, char const *file, mode_t mode) _GL_ARG_NONNULL ((2)); # endif #elif defined GNULIB_POSIXCHECK # undef mkdirat # if HAVE_RAW_DECL_MKDIRAT _GL_WARN_ON_USE (mkdirat, "mkdirat is not portable - " "use gnulib module openat for portability"); # endif #endif #if @GNULIB_MKFIFO@ # if @REPLACE_MKFIFO@ # undef mkfifo # define mkfifo rpl_mkfifo # endif # if !@HAVE_MKFIFO@ || @REPLACE_MKFIFO@ extern int mkfifo (char const *file, mode_t mode) _GL_ARG_NONNULL ((1)); # endif #elif defined GNULIB_POSIXCHECK # undef mkfifo # if HAVE_RAW_DECL_MKFIFO _GL_WARN_ON_USE (mkfifo, "mkfifo is not portable - " "use gnulib module mkfifo for portability"); # endif #endif #if @GNULIB_MKFIFOAT@ # if !@HAVE_MKFIFOAT@ extern int mkfifoat (int fd, char const *file, mode_t mode) _GL_ARG_NONNULL ((2)); # endif #elif defined GNULIB_POSIXCHECK # undef mkfifoat # if HAVE_RAW_DECL_MKFIFOAT _GL_WARN_ON_USE (mkfifoat, "mkfifoat is not portable - " "use gnulib module mkfifoat for portability"); # endif #endif #if @GNULIB_MKNOD@ # if @REPLACE_MKNOD@ # undef mknod # define mknod rpl_mknod # endif # if !@HAVE_MKNOD@ || @REPLACE_MKNOD@ extern int mknod (char const *file, mode_t mode, dev_t dev) _GL_ARG_NONNULL ((1)); # endif #elif defined GNULIB_POSIXCHECK # undef mknod # if HAVE_RAW_DECL_MKNOD _GL_WARN_ON_USE (mknod, "mknod is not portable - " "use gnulib module mknod for portability"); # endif #endif #if @GNULIB_MKNODAT@ # if !@HAVE_MKNODAT@ extern int mknodat (int fd, char const *file, mode_t mode, dev_t dev) _GL_ARG_NONNULL ((2)); # endif #elif defined GNULIB_POSIXCHECK # undef mknodat # if HAVE_RAW_DECL_MKNODAT _GL_WARN_ON_USE (mknodat, "mknodat is not portable - " "use gnulib module mkfifoat for portability"); # endif #endif #if @GNULIB_STAT@ # if @REPLACE_STAT@ /* We can't use the object-like #define stat rpl_stat, because of struct stat. This means that rpl_stat will not be used if the user does (stat)(a,b). Oh well. */ # undef stat # ifdef _LARGE_FILES /* With _LARGE_FILES defined, AIX (only) defines stat to stat64, so we have to replace stat64() instead of stat(). */ # define stat stat64 # undef stat64 # define stat64(name, st) rpl_stat (name, st) # else /* !_LARGE_FILES */ # define stat(name, st) rpl_stat (name, st) # endif /* !_LARGE_FILES */ extern int stat (const char *name, struct stat *buf) _GL_ARG_NONNULL ((1, 2)); # endif #elif defined GNULIB_POSIXCHECK # undef stat # if HAVE_RAW_DECL_STAT _GL_WARN_ON_USE (stat, "stat is unportable - " "use gnulib module stat for portability"); # endif #endif #if @GNULIB_UTIMENSAT@ # if @REPLACE_UTIMENSAT@ # undef utimensat # define utimensat rpl_utimensat # endif # if !@HAVE_UTIMENSAT@ || @REPLACE_UTIMENSAT@ extern int utimensat (int fd, char const *name, struct timespec const times[2], int flag) _GL_ARG_NONNULL ((2)); # endif #elif defined GNULIB_POSIXCHECK # undef utimensat # if HAVE_RAW_DECL_UTIMENSAT _GL_WARN_ON_USE (utimensat, "utimensat is not portable - " "use gnulib module utimensat for portability"); # endif #endif #ifdef __cplusplus } #endif #endif /* _GL_SYS_STAT_H */ #endif /* _GL_SYS_STAT_H */ #endif libprelude-1.0.0/libmissing/timegm.c0000664000076400007640000000241711341220442014355 00000000000000/* Convert UTC calendar time to simple time. Like mktime but assumes UTC. Copyright (C) 1994, 1997, 2003, 2004, 2006, 2007, 2009, 2010 Free Software Foundation, Inc. This file is part of the GNU C Library. This program is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser 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 Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ #ifndef _LIBC # include #endif #include #ifndef _LIBC # undef __gmtime_r # define __gmtime_r gmtime_r # define __mktime_internal mktime_internal # include "mktime-internal.h" #endif time_t timegm (struct tm *tmp) { static time_t gmtime_offset; tmp->tm_isdst = 0; return __mktime_internal (tmp, __gmtime_r, &gmtime_offset); } libprelude-1.0.0/libmissing/regex_internal.h0000664000076400007640000005705711341220437016124 00000000000000/* Extended regular expression matching and search library. Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Isamu Hasegawa . This program is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser 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 Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ #ifndef _REGEX_INTERNAL_H #define _REGEX_INTERNAL_H 1 #include #include #include #include #include #include #include #ifndef _LIBC # include "localcharset.h" #endif #if defined HAVE_LOCALE_H || defined _LIBC # include #endif #include #include #include #if defined _LIBC # include #else # define __libc_lock_init(NAME) do { } while (0) # define __libc_lock_lock(NAME) do { } while (0) # define __libc_lock_unlock(NAME) do { } while (0) #endif /* In case that the system doesn't have isblank(). */ #if !defined _LIBC && ! (defined isblank || (HAVE_ISBLANK && HAVE_DECL_ISBLANK)) # define isblank(ch) ((ch) == ' ' || (ch) == '\t') #endif #ifdef _LIBC # ifndef _RE_DEFINE_LOCALE_FUNCTIONS # define _RE_DEFINE_LOCALE_FUNCTIONS 1 # include # include # include # endif #endif /* This is for other GNU distributions with internationalized messages. */ #if (HAVE_LIBINTL_H && ENABLE_NLS) || defined _LIBC # include # ifdef _LIBC # undef gettext # define gettext(msgid) \ INTUSE(__dcgettext) (_libc_intl_domainname, msgid, LC_MESSAGES) # endif #else # define gettext(msgid) (msgid) #endif #ifndef gettext_noop /* This define is so xgettext can find the internationalizable strings. */ # define gettext_noop(String) String #endif /* For loser systems without the definition. */ #ifndef SIZE_MAX # define SIZE_MAX ((size_t) -1) #endif #if (defined MB_CUR_MAX && HAVE_LOCALE_H && HAVE_WCTYPE_H && HAVE_ISWCTYPE && HAVE_WCSCOLL) || _LIBC # define RE_ENABLE_I18N #endif #if __GNUC__ >= 3 # define BE(expr, val) __builtin_expect (expr, val) #else # define BE(expr, val) (expr) # ifdef _LIBC # define inline # endif #endif /* Number of ASCII characters. */ #define ASCII_CHARS 0x80 /* Number of single byte characters. */ #define SBC_MAX (UCHAR_MAX + 1) #define COLL_ELEM_LEN_MAX 8 /* The character which represents newline. */ #define NEWLINE_CHAR '\n' #define WIDE_NEWLINE_CHAR L'\n' /* Rename to standard API for using out of glibc. */ #ifndef _LIBC # define __wctype wctype # define __iswctype iswctype # define __btowc btowc # define __wcrtomb wcrtomb # define __mbrtowc mbrtowc # define __regfree regfree # define attribute_hidden #endif /* not _LIBC */ #if __GNUC__ >= 4 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 1) # define __attribute(arg) __attribute__ (arg) #else # define __attribute(arg) #endif typedef __re_idx_t Idx; /* Special return value for failure to match. */ #define REG_MISSING ((Idx) -1) /* Special return value for internal error. */ #define REG_ERROR ((Idx) -2) /* Test whether N is a valid index, and is not one of the above. */ #ifdef _REGEX_LARGE_OFFSETS # define REG_VALID_INDEX(n) ((Idx) (n) < REG_ERROR) #else # define REG_VALID_INDEX(n) (0 <= (n)) #endif /* Test whether N is a valid nonzero index. */ #ifdef _REGEX_LARGE_OFFSETS # define REG_VALID_NONZERO_INDEX(n) ((Idx) ((n) - 1) < (Idx) (REG_ERROR - 1)) #else # define REG_VALID_NONZERO_INDEX(n) (0 < (n)) #endif /* A hash value, suitable for computing hash tables. */ typedef __re_size_t re_hashval_t; /* An integer used to represent a set of bits. It must be unsigned, and must be at least as wide as unsigned int. */ typedef unsigned long int bitset_word_t; /* All bits set in a bitset_word_t. */ #define BITSET_WORD_MAX ULONG_MAX /* Number of bits in a bitset_word_t. For portability to hosts with padding bits, do not use '(sizeof (bitset_word_t) * CHAR_BIT)'; instead, deduce it directly from BITSET_WORD_MAX. Avoid greater-than-32-bit integers and unconditional shifts by more than 31 bits, as they're not portable. */ #if BITSET_WORD_MAX == 0xffffffffUL # define BITSET_WORD_BITS 32 #elif BITSET_WORD_MAX >> 31 >> 4 == 1 # define BITSET_WORD_BITS 36 #elif BITSET_WORD_MAX >> 31 >> 16 == 1 # define BITSET_WORD_BITS 48 #elif BITSET_WORD_MAX >> 31 >> 28 == 1 # define BITSET_WORD_BITS 60 #elif BITSET_WORD_MAX >> 31 >> 31 >> 1 == 1 # define BITSET_WORD_BITS 64 #elif BITSET_WORD_MAX >> 31 >> 31 >> 9 == 1 # define BITSET_WORD_BITS 72 #elif BITSET_WORD_MAX >> 31 >> 31 >> 31 >> 31 >> 3 == 1 # define BITSET_WORD_BITS 128 #elif BITSET_WORD_MAX >> 31 >> 31 >> 31 >> 31 >> 31 >> 31 >> 31 >> 31 >> 7 == 1 # define BITSET_WORD_BITS 256 #elif BITSET_WORD_MAX >> 31 >> 31 >> 31 >> 31 >> 31 >> 31 >> 31 >> 31 >> 7 > 1 # define BITSET_WORD_BITS 257 /* any value > SBC_MAX will do here */ # if BITSET_WORD_BITS <= SBC_MAX # error "Invalid SBC_MAX" # endif #else # error "Add case for new bitset_word_t size" #endif /* Number of bitset_word_t values in a bitset_t. */ #define BITSET_WORDS ((SBC_MAX + BITSET_WORD_BITS - 1) / BITSET_WORD_BITS) typedef bitset_word_t bitset_t[BITSET_WORDS]; typedef bitset_word_t *re_bitset_ptr_t; typedef const bitset_word_t *re_const_bitset_ptr_t; #define PREV_WORD_CONSTRAINT 0x0001 #define PREV_NOTWORD_CONSTRAINT 0x0002 #define NEXT_WORD_CONSTRAINT 0x0004 #define NEXT_NOTWORD_CONSTRAINT 0x0008 #define PREV_NEWLINE_CONSTRAINT 0x0010 #define NEXT_NEWLINE_CONSTRAINT 0x0020 #define PREV_BEGBUF_CONSTRAINT 0x0040 #define NEXT_ENDBUF_CONSTRAINT 0x0080 #define WORD_DELIM_CONSTRAINT 0x0100 #define NOT_WORD_DELIM_CONSTRAINT 0x0200 typedef enum { INSIDE_WORD = PREV_WORD_CONSTRAINT | NEXT_WORD_CONSTRAINT, WORD_FIRST = PREV_NOTWORD_CONSTRAINT | NEXT_WORD_CONSTRAINT, WORD_LAST = PREV_WORD_CONSTRAINT | NEXT_NOTWORD_CONSTRAINT, INSIDE_NOTWORD = PREV_NOTWORD_CONSTRAINT | NEXT_NOTWORD_CONSTRAINT, LINE_FIRST = PREV_NEWLINE_CONSTRAINT, LINE_LAST = NEXT_NEWLINE_CONSTRAINT, BUF_FIRST = PREV_BEGBUF_CONSTRAINT, BUF_LAST = NEXT_ENDBUF_CONSTRAINT, WORD_DELIM = WORD_DELIM_CONSTRAINT, NOT_WORD_DELIM = NOT_WORD_DELIM_CONSTRAINT } re_context_type; typedef struct { Idx alloc; Idx nelem; Idx *elems; } re_node_set; typedef enum { NON_TYPE = 0, /* Node type, These are used by token, node, tree. */ CHARACTER = 1, END_OF_RE = 2, SIMPLE_BRACKET = 3, OP_BACK_REF = 4, OP_PERIOD = 5, #ifdef RE_ENABLE_I18N COMPLEX_BRACKET = 6, OP_UTF8_PERIOD = 7, #endif /* RE_ENABLE_I18N */ /* We define EPSILON_BIT as a macro so that OP_OPEN_SUBEXP is used when the debugger shows values of this enum type. */ #define EPSILON_BIT 8 OP_OPEN_SUBEXP = EPSILON_BIT | 0, OP_CLOSE_SUBEXP = EPSILON_BIT | 1, OP_ALT = EPSILON_BIT | 2, OP_DUP_ASTERISK = EPSILON_BIT | 3, ANCHOR = EPSILON_BIT | 4, /* Tree type, these are used only by tree. */ CONCAT = 16, SUBEXP = 17, /* Token type, these are used only by token. */ OP_DUP_PLUS = 18, OP_DUP_QUESTION, OP_OPEN_BRACKET, OP_CLOSE_BRACKET, OP_CHARSET_RANGE, OP_OPEN_DUP_NUM, OP_CLOSE_DUP_NUM, OP_NON_MATCH_LIST, OP_OPEN_COLL_ELEM, OP_CLOSE_COLL_ELEM, OP_OPEN_EQUIV_CLASS, OP_CLOSE_EQUIV_CLASS, OP_OPEN_CHAR_CLASS, OP_CLOSE_CHAR_CLASS, OP_WORD, OP_NOTWORD, OP_SPACE, OP_NOTSPACE, BACK_SLASH } re_token_type_t; #ifdef RE_ENABLE_I18N typedef struct { /* Multibyte characters. */ wchar_t *mbchars; /* Collating symbols. */ # ifdef _LIBC int32_t *coll_syms; # endif /* Equivalence classes. */ # ifdef _LIBC int32_t *equiv_classes; # endif /* Range expressions. */ # ifdef _LIBC uint32_t *range_starts; uint32_t *range_ends; # else /* not _LIBC */ wchar_t *range_starts; wchar_t *range_ends; # endif /* not _LIBC */ /* Character classes. */ wctype_t *char_classes; /* If this character set is the non-matching list. */ unsigned int non_match : 1; /* # of multibyte characters. */ Idx nmbchars; /* # of collating symbols. */ Idx ncoll_syms; /* # of equivalence classes. */ Idx nequiv_classes; /* # of range expressions. */ Idx nranges; /* # of character classes. */ Idx nchar_classes; } re_charset_t; #endif /* RE_ENABLE_I18N */ typedef struct { union { unsigned char c; /* for CHARACTER */ re_bitset_ptr_t sbcset; /* for SIMPLE_BRACKET */ #ifdef RE_ENABLE_I18N re_charset_t *mbcset; /* for COMPLEX_BRACKET */ #endif /* RE_ENABLE_I18N */ Idx idx; /* for BACK_REF */ re_context_type ctx_type; /* for ANCHOR */ } opr; #if __GNUC__ >= 2 && !__STRICT_ANSI__ re_token_type_t type : 8; #else re_token_type_t type; #endif unsigned int constraint : 10; /* context constraint */ unsigned int duplicated : 1; unsigned int opt_subexp : 1; #ifdef RE_ENABLE_I18N unsigned int accept_mb : 1; /* These 2 bits can be moved into the union if needed (e.g. if running out of bits; move opr.c to opr.c.c and move the flags to opr.c.flags). */ unsigned int mb_partial : 1; #endif unsigned int word_char : 1; } re_token_t; #define IS_EPSILON_NODE(type) ((type) & EPSILON_BIT) struct re_string_t { /* Indicate the raw buffer which is the original string passed as an argument of regexec(), re_search(), etc.. */ const unsigned char *raw_mbs; /* Store the multibyte string. In case of "case insensitive mode" like REG_ICASE, upper cases of the string are stored, otherwise MBS points the same address that RAW_MBS points. */ unsigned char *mbs; #ifdef RE_ENABLE_I18N /* Store the wide character string which is corresponding to MBS. */ wint_t *wcs; Idx *offsets; mbstate_t cur_state; #endif /* Index in RAW_MBS. Each character mbs[i] corresponds to raw_mbs[raw_mbs_idx + i]. */ Idx raw_mbs_idx; /* The length of the valid characters in the buffers. */ Idx valid_len; /* The corresponding number of bytes in raw_mbs array. */ Idx valid_raw_len; /* The length of the buffers MBS and WCS. */ Idx bufs_len; /* The index in MBS, which is updated by re_string_fetch_byte. */ Idx cur_idx; /* length of RAW_MBS array. */ Idx raw_len; /* This is RAW_LEN - RAW_MBS_IDX + VALID_LEN - VALID_RAW_LEN. */ Idx len; /* End of the buffer may be shorter than its length in the cases such as re_match_2, re_search_2. Then, we use STOP for end of the buffer instead of LEN. */ Idx raw_stop; /* This is RAW_STOP - RAW_MBS_IDX adjusted through OFFSETS. */ Idx stop; /* The context of mbs[0]. We store the context independently, since the context of mbs[0] may be different from raw_mbs[0], which is the beginning of the input string. */ unsigned int tip_context; /* The translation passed as a part of an argument of re_compile_pattern. */ RE_TRANSLATE_TYPE trans; /* Copy of re_dfa_t's word_char. */ re_const_bitset_ptr_t word_char; /* true if REG_ICASE. */ unsigned char icase; unsigned char is_utf8; unsigned char map_notascii; unsigned char mbs_allocated; unsigned char offsets_needed; unsigned char newline_anchor; unsigned char word_ops_used; int mb_cur_max; }; typedef struct re_string_t re_string_t; struct re_dfa_t; typedef struct re_dfa_t re_dfa_t; #ifndef _LIBC # if defined __i386__ && !defined __EMX__ # define internal_function __attribute ((regparm (3), stdcall)) # else # define internal_function # endif #endif static reg_errcode_t re_string_realloc_buffers (re_string_t *pstr, Idx new_buf_len) internal_function; #ifdef RE_ENABLE_I18N static void build_wcs_buffer (re_string_t *pstr) internal_function; static reg_errcode_t build_wcs_upper_buffer (re_string_t *pstr) internal_function; #endif /* RE_ENABLE_I18N */ static void build_upper_buffer (re_string_t *pstr) internal_function; static void re_string_translate_buffer (re_string_t *pstr) internal_function; static unsigned int re_string_context_at (const re_string_t *input, Idx idx, int eflags) internal_function __attribute ((pure)); #define re_string_peek_byte(pstr, offset) \ ((pstr)->mbs[(pstr)->cur_idx + offset]) #define re_string_fetch_byte(pstr) \ ((pstr)->mbs[(pstr)->cur_idx++]) #define re_string_first_byte(pstr, idx) \ ((idx) == (pstr)->valid_len || (pstr)->wcs[idx] != WEOF) #define re_string_is_single_byte_char(pstr, idx) \ ((pstr)->wcs[idx] != WEOF && ((pstr)->valid_len == (idx) + 1 \ || (pstr)->wcs[(idx) + 1] != WEOF)) #define re_string_eoi(pstr) ((pstr)->stop <= (pstr)->cur_idx) #define re_string_cur_idx(pstr) ((pstr)->cur_idx) #define re_string_get_buffer(pstr) ((pstr)->mbs) #define re_string_length(pstr) ((pstr)->len) #define re_string_byte_at(pstr,idx) ((pstr)->mbs[idx]) #define re_string_skip_bytes(pstr,idx) ((pstr)->cur_idx += (idx)) #define re_string_set_index(pstr,idx) ((pstr)->cur_idx = (idx)) #include #ifndef _LIBC # if HAVE_ALLOCA /* The OS usually guarantees only one guard page at the bottom of the stack, and a page size can be as small as 4096 bytes. So we cannot safely allocate anything larger than 4096 bytes. Also care for the possibility of a few compiler-allocated temporary stack slots. */ # define __libc_use_alloca(n) ((n) < 4032) # else /* alloca is implemented with malloc, so just use malloc. */ # define __libc_use_alloca(n) 0 # endif #endif #ifndef MAX # define MAX(a,b) ((a) < (b) ? (b) : (a)) #endif #define re_malloc(t,n) ((t *) malloc ((n) * sizeof (t))) #define re_realloc(p,t,n) ((t *) realloc (p, (n) * sizeof (t))) #define re_free(p) free (p) struct bin_tree_t { struct bin_tree_t *parent; struct bin_tree_t *left; struct bin_tree_t *right; struct bin_tree_t *first; struct bin_tree_t *next; re_token_t token; /* `node_idx' is the index in dfa->nodes, if `type' == 0. Otherwise `type' indicate the type of this node. */ Idx node_idx; }; typedef struct bin_tree_t bin_tree_t; #define BIN_TREE_STORAGE_SIZE \ ((1024 - sizeof (void *)) / sizeof (bin_tree_t)) struct bin_tree_storage_t { struct bin_tree_storage_t *next; bin_tree_t data[BIN_TREE_STORAGE_SIZE]; }; typedef struct bin_tree_storage_t bin_tree_storage_t; #define CONTEXT_WORD 1 #define CONTEXT_NEWLINE (CONTEXT_WORD << 1) #define CONTEXT_BEGBUF (CONTEXT_NEWLINE << 1) #define CONTEXT_ENDBUF (CONTEXT_BEGBUF << 1) #define IS_WORD_CONTEXT(c) ((c) & CONTEXT_WORD) #define IS_NEWLINE_CONTEXT(c) ((c) & CONTEXT_NEWLINE) #define IS_BEGBUF_CONTEXT(c) ((c) & CONTEXT_BEGBUF) #define IS_ENDBUF_CONTEXT(c) ((c) & CONTEXT_ENDBUF) #define IS_ORDINARY_CONTEXT(c) ((c) == 0) #define IS_WORD_CHAR(ch) (isalnum (ch) || (ch) == '_') #define IS_NEWLINE(ch) ((ch) == NEWLINE_CHAR) #define IS_WIDE_WORD_CHAR(ch) (iswalnum (ch) || (ch) == L'_') #define IS_WIDE_NEWLINE(ch) ((ch) == WIDE_NEWLINE_CHAR) #define NOT_SATISFY_PREV_CONSTRAINT(constraint,context) \ ((((constraint) & PREV_WORD_CONSTRAINT) && !IS_WORD_CONTEXT (context)) \ || ((constraint & PREV_NOTWORD_CONSTRAINT) && IS_WORD_CONTEXT (context)) \ || ((constraint & PREV_NEWLINE_CONSTRAINT) && !IS_NEWLINE_CONTEXT (context))\ || ((constraint & PREV_BEGBUF_CONSTRAINT) && !IS_BEGBUF_CONTEXT (context))) #define NOT_SATISFY_NEXT_CONSTRAINT(constraint,context) \ ((((constraint) & NEXT_WORD_CONSTRAINT) && !IS_WORD_CONTEXT (context)) \ || (((constraint) & NEXT_NOTWORD_CONSTRAINT) && IS_WORD_CONTEXT (context)) \ || (((constraint) & NEXT_NEWLINE_CONSTRAINT) && !IS_NEWLINE_CONTEXT (context)) \ || (((constraint) & NEXT_ENDBUF_CONSTRAINT) && !IS_ENDBUF_CONTEXT (context))) struct re_dfastate_t { re_hashval_t hash; re_node_set nodes; re_node_set non_eps_nodes; re_node_set inveclosure; re_node_set *entrance_nodes; struct re_dfastate_t **trtable, **word_trtable; unsigned int context : 4; unsigned int halt : 1; /* If this state can accept `multi byte'. Note that we refer to multibyte characters, and multi character collating elements as `multi byte'. */ unsigned int accept_mb : 1; /* If this state has backreference node(s). */ unsigned int has_backref : 1; unsigned int has_constraint : 1; }; typedef struct re_dfastate_t re_dfastate_t; struct re_state_table_entry { Idx num; Idx alloc; re_dfastate_t **array; }; /* Array type used in re_sub_match_last_t and re_sub_match_top_t. */ typedef struct { Idx next_idx; Idx alloc; re_dfastate_t **array; } state_array_t; /* Store information about the node NODE whose type is OP_CLOSE_SUBEXP. */ typedef struct { Idx node; Idx str_idx; /* The position NODE match at. */ state_array_t path; } re_sub_match_last_t; /* Store information about the node NODE whose type is OP_OPEN_SUBEXP. And information about the node, whose type is OP_CLOSE_SUBEXP, corresponding to NODE is stored in LASTS. */ typedef struct { Idx str_idx; Idx node; state_array_t *path; Idx alasts; /* Allocation size of LASTS. */ Idx nlasts; /* The number of LASTS. */ re_sub_match_last_t **lasts; } re_sub_match_top_t; struct re_backref_cache_entry { Idx node; Idx str_idx; Idx subexp_from; Idx subexp_to; char more; char unused; unsigned short int eps_reachable_subexps_map; }; typedef struct { /* The string object corresponding to the input string. */ re_string_t input; #if defined _LIBC || (defined __STDC_VERSION__ && __STDC_VERSION__ >= 199901L) const re_dfa_t *const dfa; #else const re_dfa_t *dfa; #endif /* EFLAGS of the argument of regexec. */ int eflags; /* Where the matching ends. */ Idx match_last; Idx last_node; /* The state log used by the matcher. */ re_dfastate_t **state_log; Idx state_log_top; /* Back reference cache. */ Idx nbkref_ents; Idx abkref_ents; struct re_backref_cache_entry *bkref_ents; int max_mb_elem_len; Idx nsub_tops; Idx asub_tops; re_sub_match_top_t **sub_tops; } re_match_context_t; typedef struct { re_dfastate_t **sifted_states; re_dfastate_t **limited_states; Idx last_node; Idx last_str_idx; re_node_set limits; } re_sift_context_t; struct re_fail_stack_ent_t { Idx idx; Idx node; regmatch_t *regs; re_node_set eps_via_nodes; }; struct re_fail_stack_t { Idx num; Idx alloc; struct re_fail_stack_ent_t *stack; }; struct re_dfa_t { re_token_t *nodes; size_t nodes_alloc; size_t nodes_len; Idx *nexts; Idx *org_indices; re_node_set *edests; re_node_set *eclosures; re_node_set *inveclosures; struct re_state_table_entry *state_table; re_dfastate_t *init_state; re_dfastate_t *init_state_word; re_dfastate_t *init_state_nl; re_dfastate_t *init_state_begbuf; bin_tree_t *str_tree; bin_tree_storage_t *str_tree_storage; re_bitset_ptr_t sb_char; int str_tree_storage_idx; /* number of subexpressions `re_nsub' is in regex_t. */ re_hashval_t state_hash_mask; Idx init_node; Idx nbackref; /* The number of backreference in this dfa. */ /* Bitmap expressing which backreference is used. */ bitset_word_t used_bkref_map; bitset_word_t completed_bkref_map; unsigned int has_plural_match : 1; /* If this dfa has "multibyte node", which is a backreference or a node which can accept multibyte character or multi character collating element. */ unsigned int has_mb_node : 1; unsigned int is_utf8 : 1; unsigned int map_notascii : 1; unsigned int word_ops_used : 1; int mb_cur_max; bitset_t word_char; reg_syntax_t syntax; Idx *subexp_map; #ifdef DEBUG char* re_str; #endif #ifdef _LIBC __libc_lock_define (, lock) #endif }; #define re_node_set_init_empty(set) memset (set, '\0', sizeof (re_node_set)) #define re_node_set_remove(set,id) \ (re_node_set_remove_at (set, re_node_set_contains (set, id) - 1)) #define re_node_set_empty(p) ((p)->nelem = 0) #define re_node_set_free(set) re_free ((set)->elems) typedef enum { SB_CHAR, MB_CHAR, EQUIV_CLASS, COLL_SYM, CHAR_CLASS } bracket_elem_type; typedef struct { bracket_elem_type type; union { unsigned char ch; unsigned char *name; wchar_t wch; } opr; } bracket_elem_t; /* Inline functions for bitset_t operation. */ static inline void bitset_set (bitset_t set, Idx i) { set[i / BITSET_WORD_BITS] |= (bitset_word_t) 1 << i % BITSET_WORD_BITS; } static inline void bitset_clear (bitset_t set, Idx i) { set[i / BITSET_WORD_BITS] &= ~ ((bitset_word_t) 1 << i % BITSET_WORD_BITS); } static inline bool bitset_contain (const bitset_t set, Idx i) { return (set[i / BITSET_WORD_BITS] >> i % BITSET_WORD_BITS) & 1; } static inline void bitset_empty (bitset_t set) { memset (set, '\0', sizeof (bitset_t)); } static inline void bitset_set_all (bitset_t set) { memset (set, -1, sizeof (bitset_word_t) * (SBC_MAX / BITSET_WORD_BITS)); if (SBC_MAX % BITSET_WORD_BITS != 0) set[BITSET_WORDS - 1] = ((bitset_word_t) 1 << SBC_MAX % BITSET_WORD_BITS) - 1; } static inline void bitset_copy (bitset_t dest, const bitset_t src) { memcpy (dest, src, sizeof (bitset_t)); } static inline void bitset_not (bitset_t set) { int bitset_i; for (bitset_i = 0; bitset_i < SBC_MAX / BITSET_WORD_BITS; ++bitset_i) set[bitset_i] = ~set[bitset_i]; if (SBC_MAX % BITSET_WORD_BITS != 0) set[BITSET_WORDS - 1] = ((((bitset_word_t) 1 << SBC_MAX % BITSET_WORD_BITS) - 1) & ~set[BITSET_WORDS - 1]); } static inline void bitset_merge (bitset_t dest, const bitset_t src) { int bitset_i; for (bitset_i = 0; bitset_i < BITSET_WORDS; ++bitset_i) dest[bitset_i] |= src[bitset_i]; } static inline void bitset_mask (bitset_t dest, const bitset_t src) { int bitset_i; for (bitset_i = 0; bitset_i < BITSET_WORDS; ++bitset_i) dest[bitset_i] &= src[bitset_i]; } #ifdef RE_ENABLE_I18N /* Inline functions for re_string. */ static inline int internal_function __attribute ((pure)) re_string_char_size_at (const re_string_t *pstr, Idx idx) { int byte_idx; if (pstr->mb_cur_max == 1) return 1; for (byte_idx = 1; idx + byte_idx < pstr->valid_len; ++byte_idx) if (pstr->wcs[idx + byte_idx] != WEOF) break; return byte_idx; } static inline wint_t internal_function __attribute ((pure)) re_string_wchar_at (const re_string_t *pstr, Idx idx) { if (pstr->mb_cur_max == 1) return (wint_t) pstr->mbs[idx]; return (wint_t) pstr->wcs[idx]; } static int internal_function __attribute ((pure)) re_string_elem_size_at (const re_string_t *pstr, Idx idx) { # ifdef _LIBC const unsigned char *p, *extra; const int32_t *table, *indirect; int32_t tmp; # include uint_fast32_t nrules = _NL_CURRENT_WORD (LC_COLLATE, _NL_COLLATE_NRULES); if (nrules != 0) { table = (const int32_t *) _NL_CURRENT (LC_COLLATE, _NL_COLLATE_TABLEMB); extra = (const unsigned char *) _NL_CURRENT (LC_COLLATE, _NL_COLLATE_EXTRAMB); indirect = (const int32_t *) _NL_CURRENT (LC_COLLATE, _NL_COLLATE_INDIRECTMB); p = pstr->mbs + idx; tmp = findidx (&p); return p - pstr->mbs - idx; } else # endif /* _LIBC */ return 1; } #endif /* RE_ENABLE_I18N */ #ifndef __GNUC_PREREQ # if defined __GNUC__ && defined __GNUC_MINOR__ # define __GNUC_PREREQ(maj, min) \ ((__GNUC__ << 16) + __GNUC_MINOR__ >= ((maj) << 16) + (min)) # else # define __GNUC_PREREQ(maj, min) 0 # endif #endif #if __GNUC_PREREQ (3,4) # undef __attribute_warn_unused_result__ # define __attribute_warn_unused_result__ \ __attribute__ ((__warn_unused_result__)) #else # define __attribute_warn_unused_result__ /* empty */ #endif #endif /* _REGEX_INTERNAL_H */ libprelude-1.0.0/libmissing/regex_internal.c0000664000076400007640000013644511341220437016116 00000000000000/* Extended regular expression matching and search library. Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Isamu Hasegawa . This program is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser 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 Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ static void re_string_construct_common (const char *str, Idx len, re_string_t *pstr, RE_TRANSLATE_TYPE trans, bool icase, const re_dfa_t *dfa) internal_function; static re_dfastate_t *create_ci_newstate (const re_dfa_t *dfa, const re_node_set *nodes, re_hashval_t hash) internal_function; static re_dfastate_t *create_cd_newstate (const re_dfa_t *dfa, const re_node_set *nodes, unsigned int context, re_hashval_t hash) internal_function; /* Functions for string operation. */ /* This function allocate the buffers. It is necessary to call re_string_reconstruct before using the object. */ static reg_errcode_t internal_function __attribute_warn_unused_result__ re_string_allocate (re_string_t *pstr, const char *str, Idx len, Idx init_len, RE_TRANSLATE_TYPE trans, bool icase, const re_dfa_t *dfa) { reg_errcode_t ret; Idx init_buf_len; /* Ensure at least one character fits into the buffers. */ if (init_len < dfa->mb_cur_max) init_len = dfa->mb_cur_max; init_buf_len = (len + 1 < init_len) ? len + 1: init_len; re_string_construct_common (str, len, pstr, trans, icase, dfa); ret = re_string_realloc_buffers (pstr, init_buf_len); if (BE (ret != REG_NOERROR, 0)) return ret; pstr->word_char = dfa->word_char; pstr->word_ops_used = dfa->word_ops_used; pstr->mbs = pstr->mbs_allocated ? pstr->mbs : (unsigned char *) str; pstr->valid_len = (pstr->mbs_allocated || dfa->mb_cur_max > 1) ? 0 : len; pstr->valid_raw_len = pstr->valid_len; return REG_NOERROR; } /* This function allocate the buffers, and initialize them. */ static reg_errcode_t internal_function __attribute_warn_unused_result__ re_string_construct (re_string_t *pstr, const char *str, Idx len, RE_TRANSLATE_TYPE trans, bool icase, const re_dfa_t *dfa) { reg_errcode_t ret; memset (pstr, '\0', sizeof (re_string_t)); re_string_construct_common (str, len, pstr, trans, icase, dfa); if (len > 0) { ret = re_string_realloc_buffers (pstr, len + 1); if (BE (ret != REG_NOERROR, 0)) return ret; } pstr->mbs = pstr->mbs_allocated ? pstr->mbs : (unsigned char *) str; if (icase) { #ifdef RE_ENABLE_I18N if (dfa->mb_cur_max > 1) { while (1) { ret = build_wcs_upper_buffer (pstr); if (BE (ret != REG_NOERROR, 0)) return ret; if (pstr->valid_raw_len >= len) break; if (pstr->bufs_len > pstr->valid_len + dfa->mb_cur_max) break; ret = re_string_realloc_buffers (pstr, pstr->bufs_len * 2); if (BE (ret != REG_NOERROR, 0)) return ret; } } else #endif /* RE_ENABLE_I18N */ build_upper_buffer (pstr); } else { #ifdef RE_ENABLE_I18N if (dfa->mb_cur_max > 1) build_wcs_buffer (pstr); else #endif /* RE_ENABLE_I18N */ { if (trans != NULL) re_string_translate_buffer (pstr); else { pstr->valid_len = pstr->bufs_len; pstr->valid_raw_len = pstr->bufs_len; } } } return REG_NOERROR; } /* Helper functions for re_string_allocate, and re_string_construct. */ static reg_errcode_t internal_function __attribute_warn_unused_result__ re_string_realloc_buffers (re_string_t *pstr, Idx new_buf_len) { #ifdef RE_ENABLE_I18N if (pstr->mb_cur_max > 1) { wint_t *new_wcs; /* Avoid overflow. */ size_t max_object_size = MAX (sizeof (wint_t), sizeof (Idx)); if (BE (SIZE_MAX / max_object_size < new_buf_len, 0)) return REG_ESPACE; new_wcs = re_realloc (pstr->wcs, wint_t, new_buf_len); if (BE (new_wcs == NULL, 0)) return REG_ESPACE; pstr->wcs = new_wcs; if (pstr->offsets != NULL) { Idx *new_offsets = re_realloc (pstr->offsets, Idx, new_buf_len); if (BE (new_offsets == NULL, 0)) return REG_ESPACE; pstr->offsets = new_offsets; } } #endif /* RE_ENABLE_I18N */ if (pstr->mbs_allocated) { unsigned char *new_mbs = re_realloc (pstr->mbs, unsigned char, new_buf_len); if (BE (new_mbs == NULL, 0)) return REG_ESPACE; pstr->mbs = new_mbs; } pstr->bufs_len = new_buf_len; return REG_NOERROR; } static void internal_function re_string_construct_common (const char *str, Idx len, re_string_t *pstr, RE_TRANSLATE_TYPE trans, bool icase, const re_dfa_t *dfa) { pstr->raw_mbs = (const unsigned char *) str; pstr->len = len; pstr->raw_len = len; pstr->trans = trans; pstr->icase = icase; pstr->mbs_allocated = (trans != NULL || icase); pstr->mb_cur_max = dfa->mb_cur_max; pstr->is_utf8 = dfa->is_utf8; pstr->map_notascii = dfa->map_notascii; pstr->stop = pstr->len; pstr->raw_stop = pstr->stop; } #ifdef RE_ENABLE_I18N /* Build wide character buffer PSTR->WCS. If the byte sequence of the string are: (0), (1), (0), (1), Then wide character buffer will be: , WEOF , , WEOF , We use WEOF for padding, they indicate that the position isn't a first byte of a multibyte character. Note that this function assumes PSTR->VALID_LEN elements are already built and starts from PSTR->VALID_LEN. */ static void internal_function build_wcs_buffer (re_string_t *pstr) { #ifdef _LIBC unsigned char buf[MB_LEN_MAX]; assert (MB_LEN_MAX >= pstr->mb_cur_max); #else unsigned char buf[64]; #endif mbstate_t prev_st; Idx byte_idx, end_idx, remain_len; size_t mbclen; /* Build the buffers from pstr->valid_len to either pstr->len or pstr->bufs_len. */ end_idx = (pstr->bufs_len > pstr->len) ? pstr->len : pstr->bufs_len; for (byte_idx = pstr->valid_len; byte_idx < end_idx;) { wchar_t wc; const char *p; remain_len = end_idx - byte_idx; prev_st = pstr->cur_state; /* Apply the translation if we need. */ if (BE (pstr->trans != NULL, 0)) { int i, ch; for (i = 0; i < pstr->mb_cur_max && i < remain_len; ++i) { ch = pstr->raw_mbs [pstr->raw_mbs_idx + byte_idx + i]; buf[i] = pstr->mbs[byte_idx + i] = pstr->trans[ch]; } p = (const char *) buf; } else p = (const char *) pstr->raw_mbs + pstr->raw_mbs_idx + byte_idx; mbclen = __mbrtowc (&wc, p, remain_len, &pstr->cur_state); if (BE (mbclen == (size_t) -2, 0)) { /* The buffer doesn't have enough space, finish to build. */ pstr->cur_state = prev_st; break; } else if (BE (mbclen == (size_t) -1 || mbclen == 0, 0)) { /* We treat these cases as a singlebyte character. */ mbclen = 1; wc = (wchar_t) pstr->raw_mbs[pstr->raw_mbs_idx + byte_idx]; if (BE (pstr->trans != NULL, 0)) wc = pstr->trans[wc]; pstr->cur_state = prev_st; } /* Write wide character and padding. */ pstr->wcs[byte_idx++] = wc; /* Write paddings. */ for (remain_len = byte_idx + mbclen - 1; byte_idx < remain_len ;) pstr->wcs[byte_idx++] = WEOF; } pstr->valid_len = byte_idx; pstr->valid_raw_len = byte_idx; } /* Build wide character buffer PSTR->WCS like build_wcs_buffer, but for REG_ICASE. */ static reg_errcode_t internal_function __attribute_warn_unused_result__ build_wcs_upper_buffer (re_string_t *pstr) { mbstate_t prev_st; Idx src_idx, byte_idx, end_idx, remain_len; size_t mbclen; #ifdef _LIBC char buf[MB_LEN_MAX]; assert (MB_LEN_MAX >= pstr->mb_cur_max); #else char buf[64]; #endif byte_idx = pstr->valid_len; end_idx = (pstr->bufs_len > pstr->len) ? pstr->len : pstr->bufs_len; /* The following optimization assumes that ASCII characters can be mapped to wide characters with a simple cast. */ if (! pstr->map_notascii && pstr->trans == NULL && !pstr->offsets_needed) { while (byte_idx < end_idx) { wchar_t wc; if (isascii (pstr->raw_mbs[pstr->raw_mbs_idx + byte_idx]) && mbsinit (&pstr->cur_state)) { /* In case of a singlebyte character. */ pstr->mbs[byte_idx] = toupper (pstr->raw_mbs[pstr->raw_mbs_idx + byte_idx]); /* The next step uses the assumption that wchar_t is encoded ASCII-safe: all ASCII values can be converted like this. */ pstr->wcs[byte_idx] = (wchar_t) pstr->mbs[byte_idx]; ++byte_idx; continue; } remain_len = end_idx - byte_idx; prev_st = pstr->cur_state; mbclen = __mbrtowc (&wc, ((const char *) pstr->raw_mbs + pstr->raw_mbs_idx + byte_idx), remain_len, &pstr->cur_state); if (BE (mbclen < (size_t) -2, 1)) { wchar_t wcu = wc; if (iswlower (wc)) { size_t mbcdlen; wcu = towupper (wc); mbcdlen = wcrtomb (buf, wcu, &prev_st); if (BE (mbclen == mbcdlen, 1)) memcpy (pstr->mbs + byte_idx, buf, mbclen); else { src_idx = byte_idx; goto offsets_needed; } } else memcpy (pstr->mbs + byte_idx, pstr->raw_mbs + pstr->raw_mbs_idx + byte_idx, mbclen); pstr->wcs[byte_idx++] = wcu; /* Write paddings. */ for (remain_len = byte_idx + mbclen - 1; byte_idx < remain_len ;) pstr->wcs[byte_idx++] = WEOF; } else if (mbclen == (size_t) -1 || mbclen == 0) { /* It is an invalid character or '\0'. Just use the byte. */ int ch = pstr->raw_mbs[pstr->raw_mbs_idx + byte_idx]; pstr->mbs[byte_idx] = ch; /* And also cast it to wide char. */ pstr->wcs[byte_idx++] = (wchar_t) ch; if (BE (mbclen == (size_t) -1, 0)) pstr->cur_state = prev_st; } else { /* The buffer doesn't have enough space, finish to build. */ pstr->cur_state = prev_st; break; } } pstr->valid_len = byte_idx; pstr->valid_raw_len = byte_idx; return REG_NOERROR; } else for (src_idx = pstr->valid_raw_len; byte_idx < end_idx;) { wchar_t wc; const char *p; offsets_needed: remain_len = end_idx - byte_idx; prev_st = pstr->cur_state; if (BE (pstr->trans != NULL, 0)) { int i, ch; for (i = 0; i < pstr->mb_cur_max && i < remain_len; ++i) { ch = pstr->raw_mbs [pstr->raw_mbs_idx + src_idx + i]; buf[i] = pstr->trans[ch]; } p = (const char *) buf; } else p = (const char *) pstr->raw_mbs + pstr->raw_mbs_idx + src_idx; mbclen = __mbrtowc (&wc, p, remain_len, &pstr->cur_state); if (BE (mbclen < (size_t) -2, 1)) { wchar_t wcu = wc; if (iswlower (wc)) { size_t mbcdlen; wcu = towupper (wc); mbcdlen = wcrtomb ((char *) buf, wcu, &prev_st); if (BE (mbclen == mbcdlen, 1)) memcpy (pstr->mbs + byte_idx, buf, mbclen); else if (mbcdlen != (size_t) -1) { size_t i; if (byte_idx + mbcdlen > pstr->bufs_len) { pstr->cur_state = prev_st; break; } if (pstr->offsets == NULL) { pstr->offsets = re_malloc (Idx, pstr->bufs_len); if (pstr->offsets == NULL) return REG_ESPACE; } if (!pstr->offsets_needed) { for (i = 0; i < (size_t) byte_idx; ++i) pstr->offsets[i] = i; pstr->offsets_needed = 1; } memcpy (pstr->mbs + byte_idx, buf, mbcdlen); pstr->wcs[byte_idx] = wcu; pstr->offsets[byte_idx] = src_idx; for (i = 1; i < mbcdlen; ++i) { pstr->offsets[byte_idx + i] = src_idx + (i < mbclen ? i : mbclen - 1); pstr->wcs[byte_idx + i] = WEOF; } pstr->len += mbcdlen - mbclen; if (pstr->raw_stop > src_idx) pstr->stop += mbcdlen - mbclen; end_idx = (pstr->bufs_len > pstr->len) ? pstr->len : pstr->bufs_len; byte_idx += mbcdlen; src_idx += mbclen; continue; } else memcpy (pstr->mbs + byte_idx, p, mbclen); } else memcpy (pstr->mbs + byte_idx, p, mbclen); if (BE (pstr->offsets_needed != 0, 0)) { size_t i; for (i = 0; i < mbclen; ++i) pstr->offsets[byte_idx + i] = src_idx + i; } src_idx += mbclen; pstr->wcs[byte_idx++] = wcu; /* Write paddings. */ for (remain_len = byte_idx + mbclen - 1; byte_idx < remain_len ;) pstr->wcs[byte_idx++] = WEOF; } else if (mbclen == (size_t) -1 || mbclen == 0) { /* It is an invalid character or '\0'. Just use the byte. */ int ch = pstr->raw_mbs[pstr->raw_mbs_idx + src_idx]; if (BE (pstr->trans != NULL, 0)) ch = pstr->trans [ch]; pstr->mbs[byte_idx] = ch; if (BE (pstr->offsets_needed != 0, 0)) pstr->offsets[byte_idx] = src_idx; ++src_idx; /* And also cast it to wide char. */ pstr->wcs[byte_idx++] = (wchar_t) ch; if (BE (mbclen == (size_t) -1, 0)) pstr->cur_state = prev_st; } else { /* The buffer doesn't have enough space, finish to build. */ pstr->cur_state = prev_st; break; } } pstr->valid_len = byte_idx; pstr->valid_raw_len = src_idx; return REG_NOERROR; } /* Skip characters until the index becomes greater than NEW_RAW_IDX. Return the index. */ static Idx internal_function re_string_skip_chars (re_string_t *pstr, Idx new_raw_idx, wint_t *last_wc) { mbstate_t prev_st; Idx rawbuf_idx; size_t mbclen; wint_t wc = WEOF; /* Skip the characters which are not necessary to check. */ for (rawbuf_idx = pstr->raw_mbs_idx + pstr->valid_raw_len; rawbuf_idx < new_raw_idx;) { wchar_t wc2; Idx remain_len; remain_len = pstr->len - rawbuf_idx; prev_st = pstr->cur_state; mbclen = __mbrtowc (&wc2, (const char *) pstr->raw_mbs + rawbuf_idx, remain_len, &pstr->cur_state); if (BE (mbclen == (size_t) -2 || mbclen == (size_t) -1 || mbclen == 0, 0)) { /* We treat these cases as a single byte character. */ if (mbclen == 0 || remain_len == 0) wc = L'\0'; else wc = *(unsigned char *) (pstr->raw_mbs + rawbuf_idx); mbclen = 1; pstr->cur_state = prev_st; } else wc = wc2; /* Then proceed the next character. */ rawbuf_idx += mbclen; } *last_wc = wc; return rawbuf_idx; } #endif /* RE_ENABLE_I18N */ /* Build the buffer PSTR->MBS, and apply the translation if we need. This function is used in case of REG_ICASE. */ static void internal_function build_upper_buffer (re_string_t *pstr) { Idx char_idx, end_idx; end_idx = (pstr->bufs_len > pstr->len) ? pstr->len : pstr->bufs_len; for (char_idx = pstr->valid_len; char_idx < end_idx; ++char_idx) { int ch = pstr->raw_mbs[pstr->raw_mbs_idx + char_idx]; if (BE (pstr->trans != NULL, 0)) ch = pstr->trans[ch]; if (islower (ch)) pstr->mbs[char_idx] = toupper (ch); else pstr->mbs[char_idx] = ch; } pstr->valid_len = char_idx; pstr->valid_raw_len = char_idx; } /* Apply TRANS to the buffer in PSTR. */ static void internal_function re_string_translate_buffer (re_string_t *pstr) { Idx buf_idx, end_idx; end_idx = (pstr->bufs_len > pstr->len) ? pstr->len : pstr->bufs_len; for (buf_idx = pstr->valid_len; buf_idx < end_idx; ++buf_idx) { int ch = pstr->raw_mbs[pstr->raw_mbs_idx + buf_idx]; pstr->mbs[buf_idx] = pstr->trans[ch]; } pstr->valid_len = buf_idx; pstr->valid_raw_len = buf_idx; } /* This function re-construct the buffers. Concretely, convert to wide character in case of pstr->mb_cur_max > 1, convert to upper case in case of REG_ICASE, apply translation. */ static reg_errcode_t internal_function __attribute_warn_unused_result__ re_string_reconstruct (re_string_t *pstr, Idx idx, int eflags) { Idx offset; if (BE (pstr->raw_mbs_idx <= idx, 0)) offset = idx - pstr->raw_mbs_idx; else { /* Reset buffer. */ #ifdef RE_ENABLE_I18N if (pstr->mb_cur_max > 1) memset (&pstr->cur_state, '\0', sizeof (mbstate_t)); #endif /* RE_ENABLE_I18N */ pstr->len = pstr->raw_len; pstr->stop = pstr->raw_stop; pstr->valid_len = 0; pstr->raw_mbs_idx = 0; pstr->valid_raw_len = 0; pstr->offsets_needed = 0; pstr->tip_context = ((eflags & REG_NOTBOL) ? CONTEXT_BEGBUF : CONTEXT_NEWLINE | CONTEXT_BEGBUF); if (!pstr->mbs_allocated) pstr->mbs = (unsigned char *) pstr->raw_mbs; offset = idx; } if (BE (offset != 0, 1)) { /* Should the already checked characters be kept? */ if (BE (offset < pstr->valid_raw_len, 1)) { /* Yes, move them to the front of the buffer. */ #ifdef RE_ENABLE_I18N if (BE (pstr->offsets_needed, 0)) { Idx low = 0, high = pstr->valid_len, mid; do { mid = (high + low) / 2; if (pstr->offsets[mid] > offset) high = mid; else if (pstr->offsets[mid] < offset) low = mid + 1; else break; } while (low < high); if (pstr->offsets[mid] < offset) ++mid; pstr->tip_context = re_string_context_at (pstr, mid - 1, eflags); /* This can be quite complicated, so handle specially only the common and easy case where the character with different length representation of lower and upper case is present at or after offset. */ if (pstr->valid_len > offset && mid == offset && pstr->offsets[mid] == offset) { memmove (pstr->wcs, pstr->wcs + offset, (pstr->valid_len - offset) * sizeof (wint_t)); memmove (pstr->mbs, pstr->mbs + offset, pstr->valid_len - offset); pstr->valid_len -= offset; pstr->valid_raw_len -= offset; for (low = 0; low < pstr->valid_len; low++) pstr->offsets[low] = pstr->offsets[low + offset] - offset; } else { /* Otherwise, just find out how long the partial multibyte character at offset is and fill it with WEOF/255. */ pstr->len = pstr->raw_len - idx + offset; pstr->stop = pstr->raw_stop - idx + offset; pstr->offsets_needed = 0; while (mid > 0 && pstr->offsets[mid - 1] == offset) --mid; while (mid < pstr->valid_len) if (pstr->wcs[mid] != WEOF) break; else ++mid; if (mid == pstr->valid_len) pstr->valid_len = 0; else { pstr->valid_len = pstr->offsets[mid] - offset; if (pstr->valid_len) { for (low = 0; low < pstr->valid_len; ++low) pstr->wcs[low] = WEOF; memset (pstr->mbs, 255, pstr->valid_len); } } pstr->valid_raw_len = pstr->valid_len; } } else #endif { pstr->tip_context = re_string_context_at (pstr, offset - 1, eflags); #ifdef RE_ENABLE_I18N if (pstr->mb_cur_max > 1) memmove (pstr->wcs, pstr->wcs + offset, (pstr->valid_len - offset) * sizeof (wint_t)); #endif /* RE_ENABLE_I18N */ if (BE (pstr->mbs_allocated, 0)) memmove (pstr->mbs, pstr->mbs + offset, pstr->valid_len - offset); pstr->valid_len -= offset; pstr->valid_raw_len -= offset; #if DEBUG assert (pstr->valid_len > 0); #endif } } else { #ifdef RE_ENABLE_I18N /* No, skip all characters until IDX. */ Idx prev_valid_len = pstr->valid_len; if (BE (pstr->offsets_needed, 0)) { pstr->len = pstr->raw_len - idx + offset; pstr->stop = pstr->raw_stop - idx + offset; pstr->offsets_needed = 0; } #endif pstr->valid_len = 0; #ifdef RE_ENABLE_I18N if (pstr->mb_cur_max > 1) { Idx wcs_idx; wint_t wc = WEOF; if (pstr->is_utf8) { const unsigned char *raw, *p, *end; /* Special case UTF-8. Multi-byte chars start with any byte other than 0x80 - 0xbf. */ raw = pstr->raw_mbs + pstr->raw_mbs_idx; end = raw + (offset - pstr->mb_cur_max); if (end < pstr->raw_mbs) end = pstr->raw_mbs; p = raw + offset - 1; #ifdef _LIBC /* We know the wchar_t encoding is UCS4, so for the simple case, ASCII characters, skip the conversion step. */ if (isascii (*p) && BE (pstr->trans == NULL, 1)) { memset (&pstr->cur_state, '\0', sizeof (mbstate_t)); /* pstr->valid_len = 0; */ wc = (wchar_t) *p; } else #endif for (; p >= end; --p) if ((*p & 0xc0) != 0x80) { mbstate_t cur_state; wchar_t wc2; Idx mlen = raw + pstr->len - p; unsigned char buf[6]; size_t mbclen; if (BE (pstr->trans != NULL, 0)) { int i = mlen < 6 ? mlen : 6; while (--i >= 0) buf[i] = pstr->trans[p[i]]; } /* XXX Don't use mbrtowc, we know which conversion to use (UTF-8 -> UCS4). */ memset (&cur_state, 0, sizeof (cur_state)); mbclen = __mbrtowc (&wc2, (const char *) p, mlen, &cur_state); if (raw + offset - p <= mbclen && mbclen < (size_t) -2) { memset (&pstr->cur_state, '\0', sizeof (mbstate_t)); pstr->valid_len = mbclen - (raw + offset - p); wc = wc2; } break; } } if (wc == WEOF) pstr->valid_len = re_string_skip_chars (pstr, idx, &wc) - idx; if (wc == WEOF) pstr->tip_context = re_string_context_at (pstr, prev_valid_len - 1, eflags); else pstr->tip_context = ((BE (pstr->word_ops_used != 0, 0) && IS_WIDE_WORD_CHAR (wc)) ? CONTEXT_WORD : ((IS_WIDE_NEWLINE (wc) && pstr->newline_anchor) ? CONTEXT_NEWLINE : 0)); if (BE (pstr->valid_len, 0)) { for (wcs_idx = 0; wcs_idx < pstr->valid_len; ++wcs_idx) pstr->wcs[wcs_idx] = WEOF; if (pstr->mbs_allocated) memset (pstr->mbs, 255, pstr->valid_len); } pstr->valid_raw_len = pstr->valid_len; } else #endif /* RE_ENABLE_I18N */ { int c = pstr->raw_mbs[pstr->raw_mbs_idx + offset - 1]; pstr->valid_raw_len = 0; if (pstr->trans) c = pstr->trans[c]; pstr->tip_context = (bitset_contain (pstr->word_char, c) ? CONTEXT_WORD : ((IS_NEWLINE (c) && pstr->newline_anchor) ? CONTEXT_NEWLINE : 0)); } } if (!BE (pstr->mbs_allocated, 0)) pstr->mbs += offset; } pstr->raw_mbs_idx = idx; pstr->len -= offset; pstr->stop -= offset; /* Then build the buffers. */ #ifdef RE_ENABLE_I18N if (pstr->mb_cur_max > 1) { if (pstr->icase) { reg_errcode_t ret = build_wcs_upper_buffer (pstr); if (BE (ret != REG_NOERROR, 0)) return ret; } else build_wcs_buffer (pstr); } else #endif /* RE_ENABLE_I18N */ if (BE (pstr->mbs_allocated, 0)) { if (pstr->icase) build_upper_buffer (pstr); else if (pstr->trans != NULL) re_string_translate_buffer (pstr); } else pstr->valid_len = pstr->len; pstr->cur_idx = 0; return REG_NOERROR; } static unsigned char internal_function __attribute ((pure)) re_string_peek_byte_case (const re_string_t *pstr, Idx idx) { int ch; Idx off; /* Handle the common (easiest) cases first. */ if (BE (!pstr->mbs_allocated, 1)) return re_string_peek_byte (pstr, idx); #ifdef RE_ENABLE_I18N if (pstr->mb_cur_max > 1 && ! re_string_is_single_byte_char (pstr, pstr->cur_idx + idx)) return re_string_peek_byte (pstr, idx); #endif off = pstr->cur_idx + idx; #ifdef RE_ENABLE_I18N if (pstr->offsets_needed) off = pstr->offsets[off]; #endif ch = pstr->raw_mbs[pstr->raw_mbs_idx + off]; #ifdef RE_ENABLE_I18N /* Ensure that e.g. for tr_TR.UTF-8 BACKSLASH DOTLESS SMALL LETTER I this function returns CAPITAL LETTER I instead of first byte of DOTLESS SMALL LETTER I. The latter would confuse the parser, since peek_byte_case doesn't advance cur_idx in any way. */ if (pstr->offsets_needed && !isascii (ch)) return re_string_peek_byte (pstr, idx); #endif return ch; } static unsigned char internal_function __attribute ((pure)) re_string_fetch_byte_case (re_string_t *pstr) { if (BE (!pstr->mbs_allocated, 1)) return re_string_fetch_byte (pstr); #ifdef RE_ENABLE_I18N if (pstr->offsets_needed) { Idx off; int ch; /* For tr_TR.UTF-8 [[:islower:]] there is [[: CAPITAL LETTER I WITH DOT lower:]] in mbs. Skip in that case the whole multi-byte character and return the original letter. On the other side, with [[: DOTLESS SMALL LETTER I return [[:I, as doing anything else would complicate things too much. */ if (!re_string_first_byte (pstr, pstr->cur_idx)) return re_string_fetch_byte (pstr); off = pstr->offsets[pstr->cur_idx]; ch = pstr->raw_mbs[pstr->raw_mbs_idx + off]; if (! isascii (ch)) return re_string_fetch_byte (pstr); re_string_skip_bytes (pstr, re_string_char_size_at (pstr, pstr->cur_idx)); return ch; } #endif return pstr->raw_mbs[pstr->raw_mbs_idx + pstr->cur_idx++]; } static void internal_function re_string_destruct (re_string_t *pstr) { #ifdef RE_ENABLE_I18N re_free (pstr->wcs); re_free (pstr->offsets); #endif /* RE_ENABLE_I18N */ if (pstr->mbs_allocated) re_free (pstr->mbs); } /* Return the context at IDX in INPUT. */ static unsigned int internal_function re_string_context_at (const re_string_t *input, Idx idx, int eflags) { int c; if (BE (! REG_VALID_INDEX (idx), 0)) /* In this case, we use the value stored in input->tip_context, since we can't know the character in input->mbs[-1] here. */ return input->tip_context; if (BE (idx == input->len, 0)) return ((eflags & REG_NOTEOL) ? CONTEXT_ENDBUF : CONTEXT_NEWLINE | CONTEXT_ENDBUF); #ifdef RE_ENABLE_I18N if (input->mb_cur_max > 1) { wint_t wc; Idx wc_idx = idx; while(input->wcs[wc_idx] == WEOF) { #ifdef DEBUG /* It must not happen. */ assert (REG_VALID_INDEX (wc_idx)); #endif --wc_idx; if (! REG_VALID_INDEX (wc_idx)) return input->tip_context; } wc = input->wcs[wc_idx]; if (BE (input->word_ops_used != 0, 0) && IS_WIDE_WORD_CHAR (wc)) return CONTEXT_WORD; return (IS_WIDE_NEWLINE (wc) && input->newline_anchor ? CONTEXT_NEWLINE : 0); } else #endif { c = re_string_byte_at (input, idx); if (bitset_contain (input->word_char, c)) return CONTEXT_WORD; return IS_NEWLINE (c) && input->newline_anchor ? CONTEXT_NEWLINE : 0; } } /* Functions for set operation. */ static reg_errcode_t internal_function __attribute_warn_unused_result__ re_node_set_alloc (re_node_set *set, Idx size) { set->alloc = size; set->nelem = 0; set->elems = re_malloc (Idx, size); if (BE (set->elems == NULL, 0)) return REG_ESPACE; return REG_NOERROR; } static reg_errcode_t internal_function __attribute_warn_unused_result__ re_node_set_init_1 (re_node_set *set, Idx elem) { set->alloc = 1; set->nelem = 1; set->elems = re_malloc (Idx, 1); if (BE (set->elems == NULL, 0)) { set->alloc = set->nelem = 0; return REG_ESPACE; } set->elems[0] = elem; return REG_NOERROR; } static reg_errcode_t internal_function __attribute_warn_unused_result__ re_node_set_init_2 (re_node_set *set, Idx elem1, Idx elem2) { set->alloc = 2; set->elems = re_malloc (Idx, 2); if (BE (set->elems == NULL, 0)) return REG_ESPACE; if (elem1 == elem2) { set->nelem = 1; set->elems[0] = elem1; } else { set->nelem = 2; if (elem1 < elem2) { set->elems[0] = elem1; set->elems[1] = elem2; } else { set->elems[0] = elem2; set->elems[1] = elem1; } } return REG_NOERROR; } static reg_errcode_t internal_function __attribute_warn_unused_result__ re_node_set_init_copy (re_node_set *dest, const re_node_set *src) { dest->nelem = src->nelem; if (src->nelem > 0) { dest->alloc = dest->nelem; dest->elems = re_malloc (Idx, dest->alloc); if (BE (dest->elems == NULL, 0)) { dest->alloc = dest->nelem = 0; return REG_ESPACE; } memcpy (dest->elems, src->elems, src->nelem * sizeof (Idx)); } else re_node_set_init_empty (dest); return REG_NOERROR; } /* Calculate the intersection of the sets SRC1 and SRC2. And merge it to DEST. Return value indicate the error code or REG_NOERROR if succeeded. Note: We assume dest->elems is NULL, when dest->alloc is 0. */ static reg_errcode_t internal_function __attribute_warn_unused_result__ re_node_set_add_intersect (re_node_set *dest, const re_node_set *src1, const re_node_set *src2) { Idx i1, i2, is, id, delta, sbase; if (src1->nelem == 0 || src2->nelem == 0) return REG_NOERROR; /* We need dest->nelem + 2 * elems_in_intersection; this is a conservative estimate. */ if (src1->nelem + src2->nelem + dest->nelem > dest->alloc) { Idx new_alloc = src1->nelem + src2->nelem + dest->alloc; Idx *new_elems = re_realloc (dest->elems, Idx, new_alloc); if (BE (new_elems == NULL, 0)) return REG_ESPACE; dest->elems = new_elems; dest->alloc = new_alloc; } /* Find the items in the intersection of SRC1 and SRC2, and copy into the top of DEST those that are not already in DEST itself. */ sbase = dest->nelem + src1->nelem + src2->nelem; i1 = src1->nelem - 1; i2 = src2->nelem - 1; id = dest->nelem - 1; for (;;) { if (src1->elems[i1] == src2->elems[i2]) { /* Try to find the item in DEST. Maybe we could binary search? */ while (REG_VALID_INDEX (id) && dest->elems[id] > src1->elems[i1]) --id; if (! REG_VALID_INDEX (id) || dest->elems[id] != src1->elems[i1]) dest->elems[--sbase] = src1->elems[i1]; if (! REG_VALID_INDEX (--i1) || ! REG_VALID_INDEX (--i2)) break; } /* Lower the highest of the two items. */ else if (src1->elems[i1] < src2->elems[i2]) { if (! REG_VALID_INDEX (--i2)) break; } else { if (! REG_VALID_INDEX (--i1)) break; } } id = dest->nelem - 1; is = dest->nelem + src1->nelem + src2->nelem - 1; delta = is - sbase + 1; /* Now copy. When DELTA becomes zero, the remaining DEST elements are already in place; this is more or less the same loop that is in re_node_set_merge. */ dest->nelem += delta; if (delta > 0 && REG_VALID_INDEX (id)) for (;;) { if (dest->elems[is] > dest->elems[id]) { /* Copy from the top. */ dest->elems[id + delta--] = dest->elems[is--]; if (delta == 0) break; } else { /* Slide from the bottom. */ dest->elems[id + delta] = dest->elems[id]; if (! REG_VALID_INDEX (--id)) break; } } /* Copy remaining SRC elements. */ memcpy (dest->elems, dest->elems + sbase, delta * sizeof (Idx)); return REG_NOERROR; } /* Calculate the union set of the sets SRC1 and SRC2. And store it to DEST. Return value indicate the error code or REG_NOERROR if succeeded. */ static reg_errcode_t internal_function __attribute_warn_unused_result__ re_node_set_init_union (re_node_set *dest, const re_node_set *src1, const re_node_set *src2) { Idx i1, i2, id; if (src1 != NULL && src1->nelem > 0 && src2 != NULL && src2->nelem > 0) { dest->alloc = src1->nelem + src2->nelem; dest->elems = re_malloc (Idx, dest->alloc); if (BE (dest->elems == NULL, 0)) return REG_ESPACE; } else { if (src1 != NULL && src1->nelem > 0) return re_node_set_init_copy (dest, src1); else if (src2 != NULL && src2->nelem > 0) return re_node_set_init_copy (dest, src2); else re_node_set_init_empty (dest); return REG_NOERROR; } for (i1 = i2 = id = 0 ; i1 < src1->nelem && i2 < src2->nelem ;) { if (src1->elems[i1] > src2->elems[i2]) { dest->elems[id++] = src2->elems[i2++]; continue; } if (src1->elems[i1] == src2->elems[i2]) ++i2; dest->elems[id++] = src1->elems[i1++]; } if (i1 < src1->nelem) { memcpy (dest->elems + id, src1->elems + i1, (src1->nelem - i1) * sizeof (Idx)); id += src1->nelem - i1; } else if (i2 < src2->nelem) { memcpy (dest->elems + id, src2->elems + i2, (src2->nelem - i2) * sizeof (Idx)); id += src2->nelem - i2; } dest->nelem = id; return REG_NOERROR; } /* Calculate the union set of the sets DEST and SRC. And store it to DEST. Return value indicate the error code or REG_NOERROR if succeeded. */ static reg_errcode_t internal_function __attribute_warn_unused_result__ re_node_set_merge (re_node_set *dest, const re_node_set *src) { Idx is, id, sbase, delta; if (src == NULL || src->nelem == 0) return REG_NOERROR; if (dest->alloc < 2 * src->nelem + dest->nelem) { Idx new_alloc = 2 * (src->nelem + dest->alloc); Idx *new_buffer = re_realloc (dest->elems, Idx, new_alloc); if (BE (new_buffer == NULL, 0)) return REG_ESPACE; dest->elems = new_buffer; dest->alloc = new_alloc; } if (BE (dest->nelem == 0, 0)) { dest->nelem = src->nelem; memcpy (dest->elems, src->elems, src->nelem * sizeof (Idx)); return REG_NOERROR; } /* Copy into the top of DEST the items of SRC that are not found in DEST. Maybe we could binary search in DEST? */ for (sbase = dest->nelem + 2 * src->nelem, is = src->nelem - 1, id = dest->nelem - 1; REG_VALID_INDEX (is) && REG_VALID_INDEX (id); ) { if (dest->elems[id] == src->elems[is]) is--, id--; else if (dest->elems[id] < src->elems[is]) dest->elems[--sbase] = src->elems[is--]; else /* if (dest->elems[id] > src->elems[is]) */ --id; } if (REG_VALID_INDEX (is)) { /* If DEST is exhausted, the remaining items of SRC must be unique. */ sbase -= is + 1; memcpy (dest->elems + sbase, src->elems, (is + 1) * sizeof (Idx)); } id = dest->nelem - 1; is = dest->nelem + 2 * src->nelem - 1; delta = is - sbase + 1; if (delta == 0) return REG_NOERROR; /* Now copy. When DELTA becomes zero, the remaining DEST elements are already in place. */ dest->nelem += delta; for (;;) { if (dest->elems[is] > dest->elems[id]) { /* Copy from the top. */ dest->elems[id + delta--] = dest->elems[is--]; if (delta == 0) break; } else { /* Slide from the bottom. */ dest->elems[id + delta] = dest->elems[id]; if (! REG_VALID_INDEX (--id)) { /* Copy remaining SRC elements. */ memcpy (dest->elems, dest->elems + sbase, delta * sizeof (Idx)); break; } } } return REG_NOERROR; } /* Insert the new element ELEM to the re_node_set* SET. SET should not already have ELEM. Return true if successful. */ static bool internal_function __attribute_warn_unused_result__ re_node_set_insert (re_node_set *set, Idx elem) { Idx idx; /* In case the set is empty. */ if (set->alloc == 0) return BE (re_node_set_init_1 (set, elem) == REG_NOERROR, 1); if (BE (set->nelem, 0) == 0) { /* We already guaranteed above that set->alloc != 0. */ set->elems[0] = elem; ++set->nelem; return true; } /* Realloc if we need. */ if (set->alloc == set->nelem) { Idx *new_elems; set->alloc = set->alloc * 2; new_elems = re_realloc (set->elems, Idx, set->alloc); if (BE (new_elems == NULL, 0)) return false; set->elems = new_elems; } /* Move the elements which follows the new element. Test the first element separately to skip a check in the inner loop. */ if (elem < set->elems[0]) { idx = 0; for (idx = set->nelem; idx > 0; idx--) set->elems[idx] = set->elems[idx - 1]; } else { for (idx = set->nelem; set->elems[idx - 1] > elem; idx--) set->elems[idx] = set->elems[idx - 1]; } /* Insert the new element. */ set->elems[idx] = elem; ++set->nelem; return true; } /* Insert the new element ELEM to the re_node_set* SET. SET should not already have any element greater than or equal to ELEM. Return true if successful. */ static bool internal_function __attribute_warn_unused_result__ re_node_set_insert_last (re_node_set *set, Idx elem) { /* Realloc if we need. */ if (set->alloc == set->nelem) { Idx *new_elems; set->alloc = (set->alloc + 1) * 2; new_elems = re_realloc (set->elems, Idx, set->alloc); if (BE (new_elems == NULL, 0)) return false; set->elems = new_elems; } /* Insert the new element. */ set->elems[set->nelem++] = elem; return true; } /* Compare two node sets SET1 and SET2. Return true if SET1 and SET2 are equivalent. */ static bool internal_function __attribute ((pure)) re_node_set_compare (const re_node_set *set1, const re_node_set *set2) { Idx i; if (set1 == NULL || set2 == NULL || set1->nelem != set2->nelem) return false; for (i = set1->nelem ; REG_VALID_INDEX (--i) ; ) if (set1->elems[i] != set2->elems[i]) return false; return true; } /* Return (idx + 1) if SET contains the element ELEM, return 0 otherwise. */ static Idx internal_function __attribute ((pure)) re_node_set_contains (const re_node_set *set, Idx elem) { __re_size_t idx, right, mid; if (! REG_VALID_NONZERO_INDEX (set->nelem)) return 0; /* Binary search the element. */ idx = 0; right = set->nelem - 1; while (idx < right) { mid = (idx + right) / 2; if (set->elems[mid] < elem) idx = mid + 1; else right = mid; } return set->elems[idx] == elem ? idx + 1 : 0; } static void internal_function re_node_set_remove_at (re_node_set *set, Idx idx) { if (idx < 0 || idx >= set->nelem) return; --set->nelem; for (; idx < set->nelem; idx++) set->elems[idx] = set->elems[idx + 1]; } /* Add the token TOKEN to dfa->nodes, and return the index of the token. Or return REG_MISSING if an error occurred. */ static Idx internal_function re_dfa_add_node (re_dfa_t *dfa, re_token_t token) { if (BE (dfa->nodes_len >= dfa->nodes_alloc, 0)) { size_t new_nodes_alloc = dfa->nodes_alloc * 2; Idx *new_nexts, *new_indices; re_node_set *new_edests, *new_eclosures; re_token_t *new_nodes; size_t max_object_size = MAX (sizeof (re_token_t), MAX (sizeof (re_node_set), sizeof (Idx))); /* Avoid overflows. */ if (BE (SIZE_MAX / 2 / max_object_size < dfa->nodes_alloc, 0)) return REG_MISSING; new_nodes = re_realloc (dfa->nodes, re_token_t, new_nodes_alloc); if (BE (new_nodes == NULL, 0)) return REG_MISSING; dfa->nodes = new_nodes; new_nexts = re_realloc (dfa->nexts, Idx, new_nodes_alloc); new_indices = re_realloc (dfa->org_indices, Idx, new_nodes_alloc); new_edests = re_realloc (dfa->edests, re_node_set, new_nodes_alloc); new_eclosures = re_realloc (dfa->eclosures, re_node_set, new_nodes_alloc); if (BE (new_nexts == NULL || new_indices == NULL || new_edests == NULL || new_eclosures == NULL, 0)) return REG_MISSING; dfa->nexts = new_nexts; dfa->org_indices = new_indices; dfa->edests = new_edests; dfa->eclosures = new_eclosures; dfa->nodes_alloc = new_nodes_alloc; } dfa->nodes[dfa->nodes_len] = token; dfa->nodes[dfa->nodes_len].constraint = 0; #ifdef RE_ENABLE_I18N { int type = token.type; dfa->nodes[dfa->nodes_len].accept_mb = (type == OP_PERIOD && dfa->mb_cur_max > 1) || type == COMPLEX_BRACKET; } #endif dfa->nexts[dfa->nodes_len] = REG_MISSING; re_node_set_init_empty (dfa->edests + dfa->nodes_len); re_node_set_init_empty (dfa->eclosures + dfa->nodes_len); return dfa->nodes_len++; } static inline re_hashval_t internal_function calc_state_hash (const re_node_set *nodes, unsigned int context) { re_hashval_t hash = nodes->nelem + context; Idx i; for (i = 0 ; i < nodes->nelem ; i++) hash += nodes->elems[i]; return hash; } /* Search for the state whose node_set is equivalent to NODES. Return the pointer to the state, if we found it in the DFA. Otherwise create the new one and return it. In case of an error return NULL and set the error code in ERR. Note: - We assume NULL as the invalid state, then it is possible that return value is NULL and ERR is REG_NOERROR. - We never return non-NULL value in case of any errors, it is for optimization. */ static re_dfastate_t * internal_function __attribute_warn_unused_result__ re_acquire_state (reg_errcode_t *err, const re_dfa_t *dfa, const re_node_set *nodes) { re_hashval_t hash; re_dfastate_t *new_state; struct re_state_table_entry *spot; Idx i; #ifdef lint /* Suppress bogus uninitialized-variable warnings. */ *err = REG_NOERROR; #endif if (BE (nodes->nelem == 0, 0)) { *err = REG_NOERROR; return NULL; } hash = calc_state_hash (nodes, 0); spot = dfa->state_table + (hash & dfa->state_hash_mask); for (i = 0 ; i < spot->num ; i++) { re_dfastate_t *state = spot->array[i]; if (hash != state->hash) continue; if (re_node_set_compare (&state->nodes, nodes)) return state; } /* There are no appropriate state in the dfa, create the new one. */ new_state = create_ci_newstate (dfa, nodes, hash); if (BE (new_state == NULL, 0)) *err = REG_ESPACE; return new_state; } /* Search for the state whose node_set is equivalent to NODES and whose context is equivalent to CONTEXT. Return the pointer to the state, if we found it in the DFA. Otherwise create the new one and return it. In case of an error return NULL and set the error code in ERR. Note: - We assume NULL as the invalid state, then it is possible that return value is NULL and ERR is REG_NOERROR. - We never return non-NULL value in case of any errors, it is for optimization. */ static re_dfastate_t * internal_function __attribute_warn_unused_result__ re_acquire_state_context (reg_errcode_t *err, const re_dfa_t *dfa, const re_node_set *nodes, unsigned int context) { re_hashval_t hash; re_dfastate_t *new_state; struct re_state_table_entry *spot; Idx i; #ifdef lint /* Suppress bogus uninitialized-variable warnings. */ *err = REG_NOERROR; #endif if (nodes->nelem == 0) { *err = REG_NOERROR; return NULL; } hash = calc_state_hash (nodes, context); spot = dfa->state_table + (hash & dfa->state_hash_mask); for (i = 0 ; i < spot->num ; i++) { re_dfastate_t *state = spot->array[i]; if (state->hash == hash && state->context == context && re_node_set_compare (state->entrance_nodes, nodes)) return state; } /* There are no appropriate state in `dfa', create the new one. */ new_state = create_cd_newstate (dfa, nodes, context, hash); if (BE (new_state == NULL, 0)) *err = REG_ESPACE; return new_state; } /* Finish initialization of the new state NEWSTATE, and using its hash value HASH put in the appropriate bucket of DFA's state table. Return value indicates the error code if failed. */ static reg_errcode_t __attribute_warn_unused_result__ register_state (const re_dfa_t *dfa, re_dfastate_t *newstate, re_hashval_t hash) { struct re_state_table_entry *spot; reg_errcode_t err; Idx i; newstate->hash = hash; err = re_node_set_alloc (&newstate->non_eps_nodes, newstate->nodes.nelem); if (BE (err != REG_NOERROR, 0)) return REG_ESPACE; for (i = 0; i < newstate->nodes.nelem; i++) { Idx elem = newstate->nodes.elems[i]; if (!IS_EPSILON_NODE (dfa->nodes[elem].type)) if (BE (! re_node_set_insert_last (&newstate->non_eps_nodes, elem), 0)) return REG_ESPACE; } spot = dfa->state_table + (hash & dfa->state_hash_mask); if (BE (spot->alloc <= spot->num, 0)) { Idx new_alloc = 2 * spot->num + 2; re_dfastate_t **new_array = re_realloc (spot->array, re_dfastate_t *, new_alloc); if (BE (new_array == NULL, 0)) return REG_ESPACE; spot->array = new_array; spot->alloc = new_alloc; } spot->array[spot->num++] = newstate; return REG_NOERROR; } static void free_state (re_dfastate_t *state) { re_node_set_free (&state->non_eps_nodes); re_node_set_free (&state->inveclosure); if (state->entrance_nodes != &state->nodes) { re_node_set_free (state->entrance_nodes); re_free (state->entrance_nodes); } re_node_set_free (&state->nodes); re_free (state->word_trtable); re_free (state->trtable); re_free (state); } /* Create the new state which is independ of contexts. Return the new state if succeeded, otherwise return NULL. */ static re_dfastate_t * internal_function __attribute_warn_unused_result__ create_ci_newstate (const re_dfa_t *dfa, const re_node_set *nodes, re_hashval_t hash) { Idx i; reg_errcode_t err; re_dfastate_t *newstate; newstate = (re_dfastate_t *) calloc (sizeof (re_dfastate_t), 1); if (BE (newstate == NULL, 0)) return NULL; err = re_node_set_init_copy (&newstate->nodes, nodes); if (BE (err != REG_NOERROR, 0)) { re_free (newstate); return NULL; } newstate->entrance_nodes = &newstate->nodes; for (i = 0 ; i < nodes->nelem ; i++) { re_token_t *node = dfa->nodes + nodes->elems[i]; re_token_type_t type = node->type; if (type == CHARACTER && !node->constraint) continue; #ifdef RE_ENABLE_I18N newstate->accept_mb |= node->accept_mb; #endif /* RE_ENABLE_I18N */ /* If the state has the halt node, the state is a halt state. */ if (type == END_OF_RE) newstate->halt = 1; else if (type == OP_BACK_REF) newstate->has_backref = 1; else if (type == ANCHOR || node->constraint) newstate->has_constraint = 1; } err = register_state (dfa, newstate, hash); if (BE (err != REG_NOERROR, 0)) { free_state (newstate); newstate = NULL; } return newstate; } /* Create the new state which is depend on the context CONTEXT. Return the new state if succeeded, otherwise return NULL. */ static re_dfastate_t * internal_function __attribute_warn_unused_result__ create_cd_newstate (const re_dfa_t *dfa, const re_node_set *nodes, unsigned int context, re_hashval_t hash) { Idx i, nctx_nodes = 0; reg_errcode_t err; re_dfastate_t *newstate; newstate = (re_dfastate_t *) calloc (sizeof (re_dfastate_t), 1); if (BE (newstate == NULL, 0)) return NULL; err = re_node_set_init_copy (&newstate->nodes, nodes); if (BE (err != REG_NOERROR, 0)) { re_free (newstate); return NULL; } newstate->context = context; newstate->entrance_nodes = &newstate->nodes; for (i = 0 ; i < nodes->nelem ; i++) { re_token_t *node = dfa->nodes + nodes->elems[i]; re_token_type_t type = node->type; unsigned int constraint = node->constraint; if (type == CHARACTER && !constraint) continue; #ifdef RE_ENABLE_I18N newstate->accept_mb |= node->accept_mb; #endif /* RE_ENABLE_I18N */ /* If the state has the halt node, the state is a halt state. */ if (type == END_OF_RE) newstate->halt = 1; else if (type == OP_BACK_REF) newstate->has_backref = 1; if (constraint) { if (newstate->entrance_nodes == &newstate->nodes) { newstate->entrance_nodes = re_malloc (re_node_set, 1); if (BE (newstate->entrance_nodes == NULL, 0)) { free_state (newstate); return NULL; } if (re_node_set_init_copy (newstate->entrance_nodes, nodes) != REG_NOERROR) return NULL; nctx_nodes = 0; newstate->has_constraint = 1; } if (NOT_SATISFY_PREV_CONSTRAINT (constraint,context)) { re_node_set_remove_at (&newstate->nodes, i - nctx_nodes); ++nctx_nodes; } } } err = register_state (dfa, newstate, hash); if (BE (err != REG_NOERROR, 0)) { free_state (newstate); newstate = NULL; } return newstate; } libprelude-1.0.0/libmissing/wcrtomb.c0000664000076400007640000000275111341220442014551 00000000000000/* Convert wide character to multibyte character. Copyright (C) 2008, 2009, 2010 Free Software Foundation, Inc. Written by Bruno Haible , 2008. This program is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 3 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 Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . */ #include /* Specification. */ #include #include #include size_t wcrtomb (char *s, wchar_t wc, mbstate_t *ps) { /* This implementation of wcrtomb on top of wctomb() supports only stateless encodings. ps must be in the initial state. */ if (ps != NULL && !mbsinit (ps)) { errno = EINVAL; return (size_t)(-1); } if (s == NULL) /* We know the NUL wide character corresponds to the NUL character. */ return 1; else { int ret = wctomb (s, wc); if (ret >= 0) return ret; else { errno = EILSEQ; return (size_t)(-1); } } } libprelude-1.0.0/libmissing/alloca.in.h0000664000076400007640000000357011341220434014742 00000000000000/* Memory allocation on the stack. Copyright (C) 1995, 1999, 2001-2004, 2006-2010 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser 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 Lesser General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ /* Avoid using the symbol _ALLOCA_H here, as Bison assumes _ALLOCA_H means there is a real alloca function. */ #ifndef _GL_ALLOCA_H #define _GL_ALLOCA_H /* alloca (N) returns a pointer to N bytes of memory allocated on the stack, which will last until the function returns. Use of alloca should be avoided: - inside arguments of function calls - undefined behaviour, - in inline functions - the allocation may actually last until the calling function returns, - for huge N (say, N >= 65536) - you never know how large (or small) the stack is, and when the stack cannot fulfill the memory allocation request, the program just crashes. */ #ifndef alloca # ifdef __GNUC__ # define alloca __builtin_alloca # elif defined _AIX # define alloca __alloca # elif defined _MSC_VER # include # define alloca _alloca # elif defined __DECC && defined __VMS # define alloca __ALLOCA # else # include # ifdef __cplusplus extern "C" # endif void *alloca (size_t); # endif #endif #endif /* _GL_ALLOCA_H */ libprelude-1.0.0/libmissing/fseeko.c0000664000076400007640000001235211341220434014347 00000000000000/* An fseeko() function that, together with fflush(), is POSIX compliant. Copyright (C) 2007-2010 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser 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 Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ #include /* Specification. */ #include /* Get off_t and lseek. */ #include #include "stdio-impl.h" #undef fseeko #if !HAVE_FSEEKO # undef fseek # define fseeko fseek #endif int rpl_fseeko (FILE *fp, off_t offset, int whence) { #if LSEEK_PIPE_BROKEN /* mingw gives bogus answers rather than failure on non-seekable files. */ if (lseek (fileno (fp), 0, SEEK_CUR) == -1) return EOF; #endif /* These tests are based on fpurge.c. */ #if defined _IO_ftrylockfile || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */ if (fp->_IO_read_end == fp->_IO_read_ptr && fp->_IO_write_ptr == fp->_IO_write_base && fp->_IO_save_base == NULL) #elif defined __sferror || defined __DragonFly__ /* FreeBSD, NetBSD, OpenBSD, DragonFly, MacOS X, Cygwin */ # if defined __SL64 && defined __SCLE /* Cygwin */ if ((fp->_flags & __SL64) == 0) { /* Cygwin 1.5.0 through 1.5.24 failed to open stdin in 64-bit mode; but has an fseeko that requires 64-bit mode. */ FILE *tmp = fopen ("/dev/null", "r"); if (!tmp) return -1; fp->_flags |= __SL64; fp->_seek64 = tmp->_seek64; fclose (tmp); } # endif if (fp_->_p == fp_->_bf._base && fp_->_r == 0 && fp_->_w == ((fp_->_flags & (__SLBF | __SNBF | __SRD)) == 0 /* fully buffered and not currently reading? */ ? fp_->_bf._size : 0) && fp_ub._base == NULL) #elif defined __EMX__ /* emx+gcc */ if (fp->_ptr == fp->_buffer && fp->_rcount == 0 && fp->_wcount == 0 && fp->_ungetc_count == 0) #elif defined _IOERR /* AIX, HP-UX, IRIX, OSF/1, Solaris, OpenServer, mingw */ if (fp_->_ptr == fp_->_base && (fp_->_ptr == NULL || fp_->_cnt == 0)) #elif defined __UCLIBC__ /* uClibc */ if (((fp->__modeflags & __FLAG_WRITING) == 0 || fp->__bufpos == fp->__bufstart) && ((fp->__modeflags & (__FLAG_READONLY | __FLAG_READING)) == 0 || fp->__bufpos == fp->__bufread)) #elif defined __QNX__ /* QNX */ if ((fp->_Mode & 0x2000 /* _MWRITE */ ? fp->_Next == fp->_Buf : fp->_Next == fp->_Rend) && fp->_Rback == fp->_Back + sizeof (fp->_Back) && fp->_Rsave == NULL) #elif defined __MINT__ /* Atari FreeMiNT */ if (fp->__bufp == fp->__buffer && fp->__get_limit == fp->__bufp && fp->__put_limit == fp->__bufp && !fp->__pushed_back) #else #error "Please port gnulib fseeko.c to your platform! Look at the code in fpurge.c, then report this to bug-gnulib." #endif { /* We get here when an fflush() call immediately preceded this one. We know there are no buffers. POSIX requires us to modify the file descriptor's position. But we cannot position beyond end of file here. */ off_t pos = lseek (fileno (fp), whence == SEEK_END && offset > 0 ? 0 : offset, whence); if (pos == -1) { #if defined __sferror || defined __DragonFly__ /* FreeBSD, NetBSD, OpenBSD, DragonFly, MacOS X, Cygwin */ fp_->_flags &= ~__SOFF; #endif return -1; } #if defined _IO_ftrylockfile || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */ fp->_flags &= ~_IO_EOF_SEEN; #elif defined __sferror || defined __DragonFly__ /* FreeBSD, NetBSD, OpenBSD, DragonFly, MacOS X, Cygwin */ # if defined __CYGWIN__ /* fp_->_offset is typed as an integer. */ fp_->_offset = pos; # else /* fp_->_offset is an fpos_t. */ { /* Use a union, since on NetBSD, the compilation flags determine whether fpos_t is typedef'd to off_t or a struct containing a single off_t member. */ union { fpos_t f; off_t o; } u; u.o = pos; fp_->_offset = u.f; } # endif fp_->_flags |= __SOFF; fp_->_flags &= ~__SEOF; #elif defined __EMX__ /* emx+gcc */ fp->_flags &= ~_IOEOF; #elif defined _IOERR /* AIX, HP-UX, IRIX, OSF/1, Solaris, OpenServer, mingw */ fp->_flag &= ~_IOEOF; #elif defined __MINT__ /* Atari FreeMiNT */ fp->__offset = pos; fp->__eof = 0; #endif /* If we were not requested to position beyond end of file, we're done. */ if (!(whence == SEEK_END && offset > 0)) return 0; } return fseeko (fp, offset, whence); } libprelude-1.0.0/libmissing/sys_select.in.h0000664000076400007640000000605511345707014015675 00000000000000/* Substitute for . Copyright (C) 2007-2010 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser 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 Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ # if __GNUC__ >= 3 @PRAGMA_SYSTEM_HEADER@ # endif /* On OSF/1, and include . Simply delegate to the system's header in this case. */ #if @HAVE_SYS_SELECT_H@ && defined __osf__ && (defined _SYS_TYPES_H_ && !defined _GL_SYS_SELECT_H_REDIRECT_FROM_SYS_TYPES_H) && defined _OSF_SOURCE # define _GL_SYS_SELECT_H_REDIRECT_FROM_SYS_TYPES_H # @INCLUDE_NEXT@ @NEXT_SYS_SELECT_H@ #elif @HAVE_SYS_SELECT_H@ && defined __osf__ && (defined _SYS_TIME_H_ && !defined _GL_SYS_SELECT_H_REDIRECT_FROM_SYS_TIME_H) && defined _OSF_SOURCE # define _GL_SYS_SELECT_H_REDIRECT_FROM_SYS_TIME_H # @INCLUDE_NEXT@ @NEXT_SYS_SELECT_H@ #else #ifndef _GL_SYS_SELECT_H #if @HAVE_SYS_SELECT_H@ /* On many platforms, assumes prior inclusion of . */ # include /* On OSF/1 4.0, provides only a forward declaration of 'struct timeval', and no definition of this type. But avoid namespace pollution on glibc systems. */ # ifndef __GLIBC__ # include # endif /* On Solaris 10, provides an FD_ZERO implementation that relies on memset(), but without including . But avoid namespace pollution on glibc systems. */ # ifndef __GLIBC__ # include # endif /* The include_next requires a split double-inclusion guard. */ # @INCLUDE_NEXT@ @NEXT_SYS_SELECT_H@ #endif #ifndef _GL_SYS_SELECT_H #define _GL_SYS_SELECT_H #if !@HAVE_SYS_SELECT_H@ /* A platform that lacks . */ # include /* The definition of _GL_WARN_ON_USE is copied here. */ # ifdef __cplusplus extern "C" { # endif # if @GNULIB_SELECT@ # if @HAVE_WINSOCK2_H@ || @REPLACE_SELECT@ # undef select # define select rpl_select extern int rpl_select (int, fd_set *, fd_set *, fd_set *, struct timeval *); # endif # elif @HAVE_WINSOCK2_H@ # undef select # define select select_used_without_requesting_gnulib_module_select # elif defined GNULIB_POSIXCHECK # undef select # if HAVE_RAW_DECL_SELECT _GL_WARN_ON_USE (select, "select is not always POSIX compliant - " "use gnulib module select for portability"); # endif # endif # ifdef __cplusplus } # endif #endif #endif /* _GL_SYS_SELECT_H */ #endif /* _GL_SYS_SELECT_H */ #endif /* OSF/1 */ libprelude-1.0.0/libmissing/inet_pton.c0000664000076400007640000001513511341220435015075 00000000000000/* inet_pton.c -- convert IPv4 and IPv6 addresses from text to binary form Copyright (C) 2006, 2008, 2009, 2010 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 3 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 Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . */ /* * Copyright (c) 1996,1999 by Internet Software Consortium. * * Permission to use, copy, modify, and distribute this software for any * purpose with or without fee is hereby granted, provided that the above * copyright notice and this permission notice appear in all copies. * * THE SOFTWARE IS PROVIDED "AS IS" AND INTERNET SOFTWARE CONSORTIUM DISCLAIMS * ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES * OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL INTERNET SOFTWARE * CONSORTIUM BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS * ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS * SOFTWARE. */ #include /* Specification. */ #include #include #include #include #define NS_INADDRSZ 4 #define NS_IN6ADDRSZ 16 #define NS_INT16SZ 2 /* * WARNING: Don't even consider trying to compile this on a system where * sizeof(int) < 4. sizeof(int) > 4 is fine; all the world's not a VAX. */ static int inet_pton4 (const char *src, unsigned char *dst); #if HAVE_IPV6 static int inet_pton6 (const char *src, unsigned char *dst); #endif /* int * inet_pton(af, src, dst) * convert from presentation format (which usually means ASCII printable) * to network format (which is usually some kind of binary format). * return: * 1 if the address was valid for the specified address family * 0 if the address wasn't valid (`dst' is untouched in this case) * -1 if some other error occurred (`dst' is untouched in this case, too) * author: * Paul Vixie, 1996. */ int inet_pton (int af, const char *restrict src, void *restrict dst) { switch (af) { case AF_INET: return (inet_pton4 (src, dst)); #if HAVE_IPV6 case AF_INET6: return (inet_pton6 (src, dst)); #endif default: errno = EAFNOSUPPORT; return (-1); } /* NOTREACHED */ } /* int * inet_pton4(src, dst) * like inet_aton() but without all the hexadecimal, octal (with the * exception of 0) and shorthand. * return: * 1 if `src' is a valid dotted quad, else 0. * notice: * does not touch `dst' unless it's returning 1. * author: * Paul Vixie, 1996. */ static int inet_pton4 (const char *restrict src, unsigned char *restrict dst) { int saw_digit, octets, ch; unsigned char tmp[NS_INADDRSZ], *tp; saw_digit = 0; octets = 0; *(tp = tmp) = 0; while ((ch = *src++) != '\0') { if (ch >= '0' && ch <= '9') { unsigned new = *tp * 10 + (ch - '0'); if (saw_digit && *tp == 0) return (0); if (new > 255) return (0); *tp = new; if (!saw_digit) { if (++octets > 4) return (0); saw_digit = 1; } } else if (ch == '.' && saw_digit) { if (octets == 4) return (0); *++tp = 0; saw_digit = 0; } else return (0); } if (octets < 4) return (0); memcpy (dst, tmp, NS_INADDRSZ); return (1); } #if HAVE_IPV6 /* int * inet_pton6(src, dst) * convert presentation level address to network order binary form. * return: * 1 if `src' is a valid [RFC1884 2.2] address, else 0. * notice: * (1) does not touch `dst' unless it's returning 1. * (2) :: in a full address is silently ignored. * credit: * inspired by Mark Andrews. * author: * Paul Vixie, 1996. */ static int inet_pton6 (const char *restrict src, unsigned char *restrict dst) { static const char xdigits[] = "0123456789abcdef"; unsigned char tmp[NS_IN6ADDRSZ], *tp, *endp, *colonp; const char *curtok; int ch, saw_xdigit; unsigned val; tp = memset (tmp, '\0', NS_IN6ADDRSZ); endp = tp + NS_IN6ADDRSZ; colonp = NULL; /* Leading :: requires some special handling. */ if (*src == ':') if (*++src != ':') return (0); curtok = src; saw_xdigit = 0; val = 0; while ((ch = c_tolower (*src++)) != '\0') { const char *pch; pch = strchr (xdigits, ch); if (pch != NULL) { val <<= 4; val |= (pch - xdigits); if (val > 0xffff) return (0); saw_xdigit = 1; continue; } if (ch == ':') { curtok = src; if (!saw_xdigit) { if (colonp) return (0); colonp = tp; continue; } else if (*src == '\0') { return (0); } if (tp + NS_INT16SZ > endp) return (0); *tp++ = (u_char) (val >> 8) & 0xff; *tp++ = (u_char) val & 0xff; saw_xdigit = 0; val = 0; continue; } if (ch == '.' && ((tp + NS_INADDRSZ) <= endp) && inet_pton4 (curtok, tp) > 0) { tp += NS_INADDRSZ; saw_xdigit = 0; break; /* '\0' was seen by inet_pton4(). */ } return (0); } if (saw_xdigit) { if (tp + NS_INT16SZ > endp) return (0); *tp++ = (u_char) (val >> 8) & 0xff; *tp++ = (u_char) val & 0xff; } if (colonp != NULL) { /* * Since some memmove()'s erroneously fail to handle * overlapping regions, we'll do the shift by hand. */ const int n = tp - colonp; int i; if (tp == endp) return (0); for (i = 1; i <= n; i++) { endp[-i] = colonp[n - i]; colonp[n - i] = 0; } tp = endp; } if (tp != endp) return (0); memcpy (dst, tmp, NS_IN6ADDRSZ); return (1); } #endif libprelude-1.0.0/libmissing/poll.in.h0000664000076400007640000000367411341220437014465 00000000000000/* Header for poll(2) emulation Contributed by Paolo Bonzini. Copyright 2001, 2002, 2003, 2007, 2009, 2010 Free Software Foundation, Inc. This file is part of gnulib. This program is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser 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 Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ #ifndef _GL_POLL_H #define _GL_POLL_H /* fake a poll(2) environment */ #define POLLIN 0x0001 /* any readable data available */ #define POLLPRI 0x0002 /* OOB/Urgent readable data */ #define POLLOUT 0x0004 /* file descriptor is writeable */ #define POLLERR 0x0008 /* some poll error occurred */ #define POLLHUP 0x0010 /* file descriptor was "hung up" */ #define POLLNVAL 0x0020 /* requested events "invalid" */ #define POLLRDNORM 0x0040 #define POLLRDBAND 0x0080 #define POLLWRNORM 0x0100 #define POLLWRBAND 0x0200 struct pollfd { int fd; /* which file descriptor to poll */ short events; /* events we are interested in */ short revents; /* events found on return */ }; typedef unsigned long nfds_t; extern int poll (struct pollfd *pfd, nfds_t nfd, int timeout); /* Define INFTIM only if doing so conforms to POSIX. */ #if !defined (_POSIX_C_SOURCE) && !defined (_XOPEN_SOURCE) #define INFTIM (-1) #endif #endif /* _GL_POLL_H */ libprelude-1.0.0/libmissing/write.c0000664000076400007640000000361011341220442014221 00000000000000/* POSIX compatible write() function. Copyright (C) 2008-2010 Free Software Foundation, Inc. Written by Bruno Haible , 2008. This program is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 3 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 Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . */ #include /* Specification. */ #include /* Replace this function only if module 'sigpipe' is requested. */ #if GNULIB_SIGPIPE /* On native Windows platforms, SIGPIPE does not exist. When write() is called on a pipe with no readers, WriteFile() fails with error GetLastError() = ERROR_NO_DATA, and write() in consequence fails with error EINVAL. */ # if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ # include # include # include # define WIN32_LEAN_AND_MEAN /* avoid including junk */ # include ssize_t rpl_write (int fd, const void *buf, size_t count) #undef write { ssize_t ret = write (fd, buf, count); if (ret < 0) { if (GetLastError () == ERROR_NO_DATA && GetFileType ((HANDLE) _get_osfhandle (fd)) == FILE_TYPE_PIPE) { /* Try to raise signal SIGPIPE. */ raise (SIGPIPE); /* If it is currently blocked or ignored, change errno from EINVAL to EPIPE. */ errno = EPIPE; } } return ret; } # endif #endif libprelude-1.0.0/libmissing/printf-frexp.h0000664000076400007640000000210611341220437015523 00000000000000/* Split a double into fraction and mantissa, for hexadecimal printf. Copyright (C) 2007, 2009, 2010 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 3 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 Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . */ /* Write a finite, positive number x as x = mantissa * 2^exp where exp >= DBL_MIN_EXP - 1, mantissa < 2.0, if x is not a denormalized number then mantissa >= 1.0. Store exp in *EXPPTR and return mantissa. */ extern double printf_frexp (double x, int *expptr); libprelude-1.0.0/libmissing/isnand.c0000664000076400007640000000152311341220435014346 00000000000000/* Test for NaN that does not need libm. Copyright (C) 2008, 2009, 2010 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 3 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 Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . */ /* Written by Bruno Haible , 2008. */ #include "isnan.c" libprelude-1.0.0/libmissing/ref-del.sin0000664000076400007640000000203511341220437014760 00000000000000# Remove this package from a list of references stored in a text file. # # Copyright (C) 2000, 2009, 2010 Free Software Foundation, Inc. # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU Lesser 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 Lesser General Public License for more details. # # You should have received a copy of the GNU Lesser General Public License along # with this program; if not, write to the Free Software Foundation, # Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. # # Written by Bruno Haible . # /^# Packages using this file: / { s/# Packages using this file:// s/ @PACKAGE@ / / s/^/# Packages using this file:/ } libprelude-1.0.0/libmissing/Makefile.am0000664000076400007640000021213711345707014014776 00000000000000## DO NOT EDIT! GENERATED AUTOMATICALLY! ## Process this file with automake to produce Makefile.in. # Copyright (C) 2002-2010 Free Software Foundation, Inc. # # This file is free software, distributed under the terms of the GNU # General Public License. As a special exception to the GNU General # Public License, this file may be distributed as part of a program # that contains a configuration script generated by Autoconf, under # the same distribution terms as the rest of that program. # # Generated by gnulib-tool. # Reproduce by: gnulib-tool --import --dir=. --lib=libmissing --source-base=libmissing --m4-base=libmissing/m4 --doc-base=libmissing/doc --tests-base=libmissing/tests --aux-dir=. --with-tests --lgpl --libtool --macro-prefix=gl --no-vc-files accept bind close cond connect dup2 fclose fopen ftw getaddrinfo getpass getsockname gettimeofday inet_ntop inet_pton ioctl listen lock lseek memmem minmax pathmax perror poll regex relocatable-lib-lgpl select setsockopt sigprocmask sleep snprintf-posix socket socklen strcase strcasestr strdup strerror strndup strptime strsep sys_stat thread time_r timegm tls uname vsnprintf-posix write AUTOMAKE_OPTIONS = 1.5 gnits subdir-objects SUBDIRS = noinst_HEADERS = noinst_LIBRARIES = noinst_LTLIBRARIES = EXTRA_DIST = BUILT_SOURCES = SUFFIXES = MOSTLYCLEANFILES = core *.stackdump MOSTLYCLEANDIRS = CLEANFILES = DISTCLEANFILES = MAINTAINERCLEANFILES = SUBDIRS += tests EXTRA_DIST += m4/gnulib-cache.m4 AM_CPPFLAGS = AM_CFLAGS = noinst_LTLIBRARIES += libmissing.la libmissing_la_SOURCES = libmissing_la_LIBADD = $(gl_LTLIBOBJS) libmissing_la_DEPENDENCIES = $(gl_LTLIBOBJS) EXTRA_libmissing_la_SOURCES = libmissing_la_LDFLAGS = $(AM_LDFLAGS) ## begin gnulib module accept EXTRA_DIST += accept.c w32sock.h EXTRA_libmissing_la_SOURCES += accept.c ## end gnulib module accept ## begin gnulib module alignof EXTRA_DIST += alignof.h ## end gnulib module alignof ## begin gnulib module alloca EXTRA_DIST += alloca.c EXTRA_libmissing_la_SOURCES += alloca.c libmissing_la_LIBADD += @LTALLOCA@ libmissing_la_DEPENDENCIES += @LTALLOCA@ ## end gnulib module alloca ## begin gnulib module alloca-opt BUILT_SOURCES += $(ALLOCA_H) # We need the following in order to create when the system # doesn't have one that works with the given compiler. alloca.h: alloca.in.h $(AM_V_GEN)rm -f $@-t $@ && \ { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \ cat $(srcdir)/alloca.in.h; \ } > $@-t && \ mv -f $@-t $@ MOSTLYCLEANFILES += alloca.h alloca.h-t EXTRA_DIST += alloca.in.h ## end gnulib module alloca-opt ## begin gnulib module arg-nonnull # The BUILT_SOURCES created by this Makefile snippet are not used via #include # statements but through direct file reference. Therefore this snippet must be # present in all Makefile.am that need it. This is ensured by the applicability # 'all' defined above. BUILT_SOURCES += arg-nonnull.h # The arg-nonnull.h that gets inserted into generated .h files is the same as # build-aux/arg-nonnull.h, except that it has the copyright header cut off. arg-nonnull.h: $(top_srcdir)/./arg-nonnull.h $(AM_V_GEN)rm -f $@-t $@ && \ sed -n -e '/GL_ARG_NONNULL/,$$p' \ < $(top_srcdir)/./arg-nonnull.h \ > $@-t && \ mv $@-t $@ MOSTLYCLEANFILES += arg-nonnull.h arg-nonnull.h-t ARG_NONNULL_H=arg-nonnull.h EXTRA_DIST += $(top_srcdir)/./arg-nonnull.h ## end gnulib module arg-nonnull ## begin gnulib module arpa_inet BUILT_SOURCES += arpa/inet.h # We need the following in order to create when the system # doesn't have one. arpa/inet.h: arpa_inet.in.h $(WARN_ON_USE_H) $(ARG_NONNULL_H) $(AM_V_at)$(MKDIR_P) arpa $(AM_V_GEN)rm -f $@-t $@ && \ { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \ sed -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \ -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ -e 's|@''NEXT_ARPA_INET_H''@|$(NEXT_ARPA_INET_H)|g' \ -e 's|@''HAVE_ARPA_INET_H''@|$(HAVE_ARPA_INET_H)|g' \ -e 's|@''GNULIB_INET_NTOP''@|$(GNULIB_INET_NTOP)|g' \ -e 's|@''GNULIB_INET_PTON''@|$(GNULIB_INET_PTON)|g' \ -e 's|@''HAVE_DECL_INET_NTOP''@|$(HAVE_DECL_INET_NTOP)|g' \ -e 's|@''HAVE_DECL_INET_PTON''@|$(HAVE_DECL_INET_PTON)|g' \ -e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \ -e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)' \ < $(srcdir)/arpa_inet.in.h; \ } > $@-t && \ mv $@-t $@ MOSTLYCLEANFILES += arpa/inet.h arpa/inet.h-t MOSTLYCLEANDIRS += arpa EXTRA_DIST += arpa_inet.in.h ## end gnulib module arpa_inet ## begin gnulib module bind EXTRA_DIST += bind.c w32sock.h EXTRA_libmissing_la_SOURCES += bind.c ## end gnulib module bind ## begin gnulib module btowc EXTRA_DIST += btowc.c EXTRA_libmissing_la_SOURCES += btowc.c ## end gnulib module btowc ## begin gnulib module c-ctype libmissing_la_SOURCES += c-ctype.h c-ctype.c ## end gnulib module c-ctype ## begin gnulib module close EXTRA_DIST += close.c EXTRA_libmissing_la_SOURCES += close.c ## end gnulib module close ## begin gnulib module close-hook libmissing_la_SOURCES += close-hook.c EXTRA_DIST += close-hook.h ## end gnulib module close-hook ## begin gnulib module cond libmissing_la_SOURCES += glthread/cond.h glthread/cond.c ## end gnulib module cond ## begin gnulib module configmake # Retrieve values of the variables through 'configure' followed by # 'make', not directly through 'configure', so that a user who # sets some of these variables consistently on the 'make' command # line gets correct results. # # One advantage of this approach, compared to the classical # approach of adding -DLIBDIR=\"$(libdir)\" etc. to AM_CPPFLAGS, # is that it protects against the use of undefined variables. # If, say, $(libdir) is not set in the Makefile, LIBDIR is not # defined by this module, and code using LIBDIR gives a # compilation error. # # Another advantage is that 'make' output is shorter. # # Listed in the same order as the GNU makefile conventions. # The Automake-defined pkg* macros are appended, in the order # listed in the Automake 1.10a+ documentation. configmake.h: Makefile $(AM_V_GEN)rm -f $@-t && \ { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \ echo '#define PREFIX "$(prefix)"'; \ echo '#define EXEC_PREFIX "$(exec_prefix)"'; \ echo '#define BINDIR "$(bindir)"'; \ echo '#define SBINDIR "$(sbindir)"'; \ echo '#define LIBEXECDIR "$(libexecdir)"'; \ echo '#define DATAROOTDIR "$(datarootdir)"'; \ echo '#define DATADIR "$(datadir)"'; \ echo '#define SYSCONFDIR "$(sysconfdir)"'; \ echo '#define SHAREDSTATEDIR "$(sharedstatedir)"'; \ echo '#define LOCALSTATEDIR "$(localstatedir)"'; \ echo '#define INCLUDEDIR "$(includedir)"'; \ echo '#define OLDINCLUDEDIR "$(oldincludedir)"'; \ echo '#define DOCDIR "$(docdir)"'; \ echo '#define INFODIR "$(infodir)"'; \ echo '#define HTMLDIR "$(htmldir)"'; \ echo '#define DVIDIR "$(dvidir)"'; \ echo '#define PDFDIR "$(pdfdir)"'; \ echo '#define PSDIR "$(psdir)"'; \ echo '#define LIBDIR "$(libdir)"'; \ echo '#define LISPDIR "$(lispdir)"'; \ echo '#define LOCALEDIR "$(localedir)"'; \ echo '#define MANDIR "$(mandir)"'; \ echo '#define MANEXT "$(manext)"'; \ echo '#define PKGDATADIR "$(pkgdatadir)"'; \ echo '#define PKGINCLUDEDIR "$(pkgincludedir)"'; \ echo '#define PKGLIBDIR "$(pkglibdir)"'; \ echo '#define PKGLIBEXECDIR "$(pkglibexecdir)"'; \ } | sed '/""/d' > $@-t && \ if test -f $@ && cmp $@-t $@ > /dev/null; then \ rm -f $@-t; \ else \ rm -f $@; mv $@-t $@; \ fi BUILT_SOURCES += configmake.h CLEANFILES += configmake.h configmake.h-t ## end gnulib module configmake ## begin gnulib module connect EXTRA_DIST += connect.c w32sock.h EXTRA_libmissing_la_SOURCES += connect.c ## end gnulib module connect ## begin gnulib module dup2 EXTRA_DIST += dup2.c EXTRA_libmissing_la_SOURCES += dup2.c ## end gnulib module dup2 ## begin gnulib module errno BUILT_SOURCES += $(ERRNO_H) # We need the following in order to create when the system # doesn't have one that is POSIX compliant. errno.h: errno.in.h $(AM_V_GEN)rm -f $@-t $@ && \ { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */' && \ sed -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \ -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ -e 's|@''NEXT_ERRNO_H''@|$(NEXT_ERRNO_H)|g' \ -e 's|@''EMULTIHOP_HIDDEN''@|$(EMULTIHOP_HIDDEN)|g' \ -e 's|@''EMULTIHOP_VALUE''@|$(EMULTIHOP_VALUE)|g' \ -e 's|@''ENOLINK_HIDDEN''@|$(ENOLINK_HIDDEN)|g' \ -e 's|@''ENOLINK_VALUE''@|$(ENOLINK_VALUE)|g' \ -e 's|@''EOVERFLOW_HIDDEN''@|$(EOVERFLOW_HIDDEN)|g' \ -e 's|@''EOVERFLOW_VALUE''@|$(EOVERFLOW_VALUE)|g' \ < $(srcdir)/errno.in.h; \ } > $@-t && \ mv $@-t $@ MOSTLYCLEANFILES += errno.h errno.h-t EXTRA_DIST += errno.in.h ## end gnulib module errno ## begin gnulib module fclose EXTRA_DIST += fclose.c EXTRA_libmissing_la_SOURCES += fclose.c ## end gnulib module fclose ## begin gnulib module float BUILT_SOURCES += $(FLOAT_H) # We need the following in order to create when the system # doesn't have one that works with the given compiler. float.h: float.in.h $(AM_V_GEN)rm -f $@-t $@ && \ { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */' && \ sed -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \ -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ -e 's|@''NEXT_FLOAT_H''@|$(NEXT_FLOAT_H)|g' \ < $(srcdir)/float.in.h; \ } > $@-t && \ mv $@-t $@ MOSTLYCLEANFILES += float.h float.h-t EXTRA_DIST += float.in.h ## end gnulib module float ## begin gnulib module fopen EXTRA_DIST += fopen.c EXTRA_libmissing_la_SOURCES += fopen.c ## end gnulib module fopen ## begin gnulib module fpucw EXTRA_DIST += fpucw.h ## end gnulib module fpucw ## begin gnulib module frexp-nolibm EXTRA_DIST += frexp.c EXTRA_libmissing_la_SOURCES += frexp.c ## end gnulib module frexp-nolibm ## begin gnulib module frexpl-nolibm EXTRA_DIST += frexp.c frexpl.c EXTRA_libmissing_la_SOURCES += frexp.c frexpl.c ## end gnulib module frexpl-nolibm ## begin gnulib module fseeko EXTRA_DIST += fseeko.c stdio-impl.h EXTRA_libmissing_la_SOURCES += fseeko.c ## end gnulib module fseeko ## begin gnulib module ftw libmissing_la_SOURCES += ftw_.h EXTRA_DIST += ftw.c EXTRA_libmissing_la_SOURCES += ftw.c ## end gnulib module ftw ## begin gnulib module getaddrinfo EXTRA_DIST += gai_strerror.c getaddrinfo.c EXTRA_libmissing_la_SOURCES += gai_strerror.c getaddrinfo.c ## end gnulib module getaddrinfo ## begin gnulib module getdelim EXTRA_DIST += getdelim.c EXTRA_libmissing_la_SOURCES += getdelim.c ## end gnulib module getdelim ## begin gnulib module gethostname EXTRA_DIST += gethostname.c w32sock.h EXTRA_libmissing_la_SOURCES += gethostname.c ## end gnulib module gethostname ## begin gnulib module getline EXTRA_DIST += getline.c EXTRA_libmissing_la_SOURCES += getline.c ## end gnulib module getline ## begin gnulib module getpass EXTRA_DIST += getpass.c getpass.h EXTRA_libmissing_la_SOURCES += getpass.c ## end gnulib module getpass ## begin gnulib module getsockname EXTRA_DIST += getsockname.c w32sock.h EXTRA_libmissing_la_SOURCES += getsockname.c ## end gnulib module getsockname ## begin gnulib module gettext-h libmissing_la_SOURCES += gettext.h ## end gnulib module gettext-h ## begin gnulib module gettimeofday EXTRA_DIST += gettimeofday.c EXTRA_libmissing_la_SOURCES += gettimeofday.c ## end gnulib module gettimeofday ## begin gnulib module havelib EXTRA_DIST += $(top_srcdir)/./config.rpath ## end gnulib module havelib ## begin gnulib module inet_ntop EXTRA_DIST += inet_ntop.c EXTRA_libmissing_la_SOURCES += inet_ntop.c ## end gnulib module inet_ntop ## begin gnulib module inet_pton EXTRA_DIST += inet_pton.c EXTRA_libmissing_la_SOURCES += inet_pton.c ## end gnulib module inet_pton ## begin gnulib module intprops EXTRA_DIST += intprops.h ## end gnulib module intprops ## begin gnulib module ioctl EXTRA_DIST += ioctl.c w32sock.h EXTRA_libmissing_la_SOURCES += ioctl.c ## end gnulib module ioctl ## begin gnulib module isnand-nolibm EXTRA_DIST += float+.h isnan.c isnand-nolibm.h isnand.c EXTRA_libmissing_la_SOURCES += isnan.c isnand.c ## end gnulib module isnand-nolibm ## begin gnulib module isnanf-nolibm EXTRA_DIST += float+.h isnan.c isnanf-nolibm.h isnanf.c EXTRA_libmissing_la_SOURCES += isnan.c isnanf.c ## end gnulib module isnanf-nolibm ## begin gnulib module isnanl-nolibm EXTRA_DIST += float+.h isnan.c isnanl-nolibm.h isnanl.c EXTRA_libmissing_la_SOURCES += isnan.c isnanl.c ## end gnulib module isnanl-nolibm ## begin gnulib module langinfo BUILT_SOURCES += langinfo.h # We need the following in order to create an empty placeholder for # when the system doesn't have one. langinfo.h: langinfo.in.h $(WARN_ON_USE_H) $(AM_V_GEN)rm -f $@-t $@ && \ { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \ sed -e 's|@''HAVE_LANGINFO_H''@|$(HAVE_LANGINFO_H)|g' \ -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \ -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ -e 's|@''NEXT_LANGINFO_H''@|$(NEXT_LANGINFO_H)|g' \ -e 's|@''GNULIB_NL_LANGINFO''@|$(GNULIB_NL_LANGINFO)|g' \ -e 's|@''HAVE_LANGINFO_CODESET''@|$(HAVE_LANGINFO_CODESET)|g' \ -e 's|@''HAVE_LANGINFO_ERA''@|$(HAVE_LANGINFO_ERA)|g' \ -e 's|@''HAVE_NL_LANGINFO''@|$(HAVE_NL_LANGINFO)|g' \ -e 's|@''REPLACE_NL_LANGINFO''@|$(REPLACE_NL_LANGINFO)|g' \ -e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)' \ < $(srcdir)/langinfo.in.h; \ } > $@-t && \ mv $@-t $@ MOSTLYCLEANFILES += langinfo.h langinfo.h-t EXTRA_DIST += langinfo.in.h ## end gnulib module langinfo ## begin gnulib module listen EXTRA_DIST += listen.c w32sock.h EXTRA_libmissing_la_SOURCES += listen.c ## end gnulib module listen ## begin gnulib module localcharset libmissing_la_SOURCES += localcharset.h localcharset.c # We need the following in order to install a simple file in $(libdir) # which is shared with other installed packages. We use a list of referencing # packages so that "make uninstall" will remove the file if and only if it # is not used by another installed package. # On systems with glibc-2.1 or newer, the file is redundant, therefore we # avoid installing it. all-local: charset.alias ref-add.sed ref-del.sed charset_alias = $(DESTDIR)$(libdir)/charset.alias charset_tmp = $(DESTDIR)$(libdir)/charset.tmp install-exec-local: install-exec-localcharset install-exec-localcharset: all-local if test $(GLIBC21) = no; then \ case '$(host_os)' in \ darwin[56]*) \ need_charset_alias=true ;; \ darwin* | cygwin* | mingw* | pw32* | cegcc*) \ need_charset_alias=false ;; \ *) \ need_charset_alias=true ;; \ esac ; \ else \ need_charset_alias=false ; \ fi ; \ if $$need_charset_alias; then \ $(mkinstalldirs) $(DESTDIR)$(libdir) ; \ fi ; \ if test -f $(charset_alias); then \ sed -f ref-add.sed $(charset_alias) > $(charset_tmp) ; \ $(INSTALL_DATA) $(charset_tmp) $(charset_alias) ; \ rm -f $(charset_tmp) ; \ else \ if $$need_charset_alias; then \ sed -f ref-add.sed charset.alias > $(charset_tmp) ; \ $(INSTALL_DATA) $(charset_tmp) $(charset_alias) ; \ rm -f $(charset_tmp) ; \ fi ; \ fi uninstall-local: uninstall-localcharset uninstall-localcharset: all-local if test -f $(charset_alias); then \ sed -f ref-del.sed $(charset_alias) > $(charset_tmp); \ if grep '^# Packages using this file: $$' $(charset_tmp) \ > /dev/null; then \ rm -f $(charset_alias); \ else \ $(INSTALL_DATA) $(charset_tmp) $(charset_alias); \ fi; \ rm -f $(charset_tmp); \ fi charset.alias: config.charset $(AM_V_GEN)rm -f t-$@ $@ && \ $(SHELL) $(srcdir)/config.charset '$(host)' > t-$@ && \ mv t-$@ $@ SUFFIXES += .sed .sin .sin.sed: $(AM_V_GEN)rm -f t-$@ $@ && \ sed -e '/^#/d' -e 's/@''PACKAGE''@/$(PACKAGE)/g' $< > t-$@ && \ mv t-$@ $@ CLEANFILES += charset.alias ref-add.sed ref-del.sed EXTRA_DIST += config.charset ref-add.sin ref-del.sin ## end gnulib module localcharset ## begin gnulib module lock libmissing_la_SOURCES += glthread/lock.h glthread/lock.c ## end gnulib module lock ## begin gnulib module lseek EXTRA_DIST += lseek.c EXTRA_libmissing_la_SOURCES += lseek.c ## end gnulib module lseek ## begin gnulib module malloc EXTRA_DIST += malloc.c EXTRA_libmissing_la_SOURCES += malloc.c ## end gnulib module malloc ## begin gnulib module malloc-posix EXTRA_DIST += malloc.c EXTRA_libmissing_la_SOURCES += malloc.c ## end gnulib module malloc-posix ## begin gnulib module math BUILT_SOURCES += math.h # We need the following in order to create when the system # doesn't have one that works with the given compiler. math.h: math.in.h $(WARN_ON_USE_H) $(ARG_NONNULL_H) $(AM_V_GEN)rm -f $@-t $@ && \ { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */' && \ sed -e 's|@''INCLUDE_NEXT_AS_FIRST_DIRECTIVE''@|$(INCLUDE_NEXT_AS_FIRST_DIRECTIVE)|g' \ -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ -e 's|@''NEXT_AS_FIRST_DIRECTIVE_MATH_H''@|$(NEXT_AS_FIRST_DIRECTIVE_MATH_H)|g' \ -e 's|@''GNULIB_ACOSL''@|$(GNULIB_ACOSL)|g' \ -e 's|@''GNULIB_ASINL''@|$(GNULIB_ASINL)|g' \ -e 's|@''GNULIB_ATANL''@|$(GNULIB_ATANL)|g' \ -e 's|@''GNULIB_CEILF''@|$(GNULIB_CEILF)|g' \ -e 's|@''GNULIB_CEILL''@|$(GNULIB_CEILL)|g' \ -e 's|@''GNULIB_COSL''@|$(GNULIB_COSL)|g' \ -e 's|@''GNULIB_EXPL''@|$(GNULIB_EXPL)|g' \ -e 's|@''GNULIB_FLOORF''@|$(GNULIB_FLOORF)|g' \ -e 's|@''GNULIB_FLOORL''@|$(GNULIB_FLOORL)|g' \ -e 's|@''GNULIB_FREXP''@|$(GNULIB_FREXP)|g' \ -e 's|@''GNULIB_FREXPL''@|$(GNULIB_FREXPL)|g' \ -e 's|@''GNULIB_ISFINITE''@|$(GNULIB_ISFINITE)|g' \ -e 's|@''GNULIB_ISINF''@|$(GNULIB_ISINF)|g' \ -e 's|@''GNULIB_ISNAN''@|$(GNULIB_ISNAN)|g' \ -e 's|@''GNULIB_ISNANF''@|$(GNULIB_ISNANF)|g' \ -e 's|@''GNULIB_ISNAND''@|$(GNULIB_ISNAND)|g' \ -e 's|@''GNULIB_ISNANL''@|$(GNULIB_ISNANL)|g' \ -e 's|@''GNULIB_LDEXPL''@|$(GNULIB_LDEXPL)|g' \ -e 's|@''GNULIB_LOGL''@|$(GNULIB_LOGL)|g' \ -e 's|@''GNULIB_ROUND''@|$(GNULIB_ROUND)|g' \ -e 's|@''GNULIB_ROUNDF''@|$(GNULIB_ROUNDF)|g' \ -e 's|@''GNULIB_ROUNDL''@|$(GNULIB_ROUNDL)|g' \ -e 's|@''GNULIB_SIGNBIT''@|$(GNULIB_SIGNBIT)|g' \ -e 's|@''GNULIB_SINL''@|$(GNULIB_SINL)|g' \ -e 's|@''GNULIB_SQRTL''@|$(GNULIB_SQRTL)|g' \ -e 's|@''GNULIB_TANL''@|$(GNULIB_TANL)|g' \ -e 's|@''GNULIB_TRUNC''@|$(GNULIB_TRUNC)|g' \ -e 's|@''GNULIB_TRUNCF''@|$(GNULIB_TRUNCF)|g' \ -e 's|@''GNULIB_TRUNCL''@|$(GNULIB_TRUNCL)|g' \ -e 's|@''HAVE_ACOSL''@|$(HAVE_ACOSL)|g' \ -e 's|@''HAVE_ASINL''@|$(HAVE_ASINL)|g' \ -e 's|@''HAVE_ATANL''@|$(HAVE_ATANL)|g' \ -e 's|@''HAVE_COSL''@|$(HAVE_COSL)|g' \ -e 's|@''HAVE_EXPL''@|$(HAVE_EXPL)|g' \ -e 's|@''HAVE_ISNANF''@|$(HAVE_ISNANF)|g' \ -e 's|@''HAVE_ISNAND''@|$(HAVE_ISNAND)|g' \ -e 's|@''HAVE_ISNANL''@|$(HAVE_ISNANL)|g' \ -e 's|@''HAVE_LOGL''@|$(HAVE_LOGL)|g' \ -e 's|@''HAVE_SINL''@|$(HAVE_SINL)|g' \ -e 's|@''HAVE_SQRTL''@|$(HAVE_SQRTL)|g' \ -e 's|@''HAVE_TANL''@|$(HAVE_TANL)|g' \ -e 's|@''HAVE_DECL_ACOSL''@|$(HAVE_DECL_ACOSL)|g' \ -e 's|@''HAVE_DECL_ASINL''@|$(HAVE_DECL_ASINL)|g' \ -e 's|@''HAVE_DECL_ATANL''@|$(HAVE_DECL_ATANL)|g' \ -e 's|@''HAVE_DECL_COSL''@|$(HAVE_DECL_COSL)|g' \ -e 's|@''HAVE_DECL_EXPL''@|$(HAVE_DECL_EXPL)|g' \ -e 's|@''HAVE_DECL_FREXPL''@|$(HAVE_DECL_FREXPL)|g' \ -e 's|@''HAVE_DECL_LDEXPL''@|$(HAVE_DECL_LDEXPL)|g' \ -e 's|@''HAVE_DECL_LOGL''@|$(HAVE_DECL_LOGL)|g' \ -e 's|@''HAVE_DECL_SINL''@|$(HAVE_DECL_SINL)|g' \ -e 's|@''HAVE_DECL_SQRTL''@|$(HAVE_DECL_SQRTL)|g' \ -e 's|@''HAVE_DECL_TANL''@|$(HAVE_DECL_TANL)|g' \ -e 's|@''HAVE_DECL_TRUNC''@|$(HAVE_DECL_TRUNC)|g' \ -e 's|@''HAVE_DECL_TRUNCF''@|$(HAVE_DECL_TRUNCF)|g' \ -e 's|@''REPLACE_CEILF''@|$(REPLACE_CEILF)|g' \ -e 's|@''REPLACE_CEILL''@|$(REPLACE_CEILL)|g' \ -e 's|@''REPLACE_FLOORF''@|$(REPLACE_FLOORF)|g' \ -e 's|@''REPLACE_FLOORL''@|$(REPLACE_FLOORL)|g' \ -e 's|@''REPLACE_FREXP''@|$(REPLACE_FREXP)|g' \ -e 's|@''REPLACE_FREXPL''@|$(REPLACE_FREXPL)|g' \ -e 's|@''REPLACE_HUGE_VAL''@|$(REPLACE_HUGE_VAL)|g' \ -e 's|@''REPLACE_ISFINITE''@|$(REPLACE_ISFINITE)|g' \ -e 's|@''REPLACE_ISINF''@|$(REPLACE_ISINF)|g' \ -e 's|@''REPLACE_ISNAN''@|$(REPLACE_ISNAN)|g' \ -e 's|@''REPLACE_LDEXPL''@|$(REPLACE_LDEXPL)|g' \ -e 's|@''REPLACE_NAN''@|$(REPLACE_NAN)|g' \ -e 's|@''REPLACE_ROUND''@|$(REPLACE_ROUND)|g' \ -e 's|@''REPLACE_ROUNDF''@|$(REPLACE_ROUNDF)|g' \ -e 's|@''REPLACE_ROUNDL''@|$(REPLACE_ROUNDL)|g' \ -e 's|@''REPLACE_SIGNBIT''@|$(REPLACE_SIGNBIT)|g' \ -e 's|@''REPLACE_SIGNBIT_USING_GCC''@|$(REPLACE_SIGNBIT_USING_GCC)|g' \ -e 's|@''REPLACE_TRUNCL''@|$(REPLACE_TRUNCL)|g' \ -e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \ -e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)' \ < $(srcdir)/math.in.h; \ } > $@-t && \ mv $@-t $@ MOSTLYCLEANFILES += math.h math.h-t EXTRA_DIST += math.in.h ## end gnulib module math ## begin gnulib module mbrtowc EXTRA_DIST += mbrtowc.c EXTRA_libmissing_la_SOURCES += mbrtowc.c ## end gnulib module mbrtowc ## begin gnulib module mbsinit EXTRA_DIST += mbsinit.c EXTRA_libmissing_la_SOURCES += mbsinit.c ## end gnulib module mbsinit ## begin gnulib module memchr EXTRA_DIST += memchr.c memchr.valgrind EXTRA_libmissing_la_SOURCES += memchr.c ## end gnulib module memchr ## begin gnulib module memmem-simple EXTRA_DIST += memmem.c str-two-way.h EXTRA_libmissing_la_SOURCES += memmem.c ## end gnulib module memmem-simple ## begin gnulib module minmax libmissing_la_SOURCES += minmax.h ## end gnulib module minmax ## begin gnulib module mktime EXTRA_DIST += mktime-internal.h mktime.c EXTRA_libmissing_la_SOURCES += mktime.c ## end gnulib module mktime ## begin gnulib module netdb BUILT_SOURCES += $(NETDB_H) # We need the following in order to create when the system # doesn't have one that works with the given compiler. netdb.h: netdb.in.h $(ARG_NONNULL_H) $(AM_V_GEN)rm -f $@-t $@ && \ { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \ sed -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \ -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ -e 's|@''NEXT_NETDB_H''@|$(NEXT_NETDB_H)|g' \ -e 's|@''HAVE_NETDB_H''@|$(HAVE_NETDB_H)|g' \ -e 's|@''GNULIB_GETADDRINFO''@|$(GNULIB_GETADDRINFO)|g' \ -e 's|@''HAVE_STRUCT_ADDRINFO''@|$(HAVE_STRUCT_ADDRINFO)|g' \ -e 's|@''HAVE_DECL_FREEADDRINFO''@|$(HAVE_DECL_FREEADDRINFO)|g' \ -e 's|@''HAVE_DECL_GAI_STRERROR''@|$(HAVE_DECL_GAI_STRERROR)|g' \ -e 's|@''HAVE_DECL_GETADDRINFO''@|$(HAVE_DECL_GETADDRINFO)|g' \ -e 's|@''HAVE_DECL_GETNAMEINFO''@|$(HAVE_DECL_GETNAMEINFO)|g' \ -e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \ < $(srcdir)/netdb.in.h; \ } > $@-t && \ mv $@-t $@ MOSTLYCLEANFILES += netdb.h netdb.h-t EXTRA_DIST += netdb.in.h ## end gnulib module netdb ## begin gnulib module netinet_in BUILT_SOURCES += $(NETINET_IN_H) # We need the following in order to create when the system # doesn't have one. netinet/in.h: netinet_in.in.h $(AM_V_at)$(MKDIR_P) netinet $(AM_V_GEN)rm -f $@-t $@ && \ { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \ sed -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \ -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ -e 's|@''NEXT_NETINET_IN_H''@|$(NEXT_NETINET_IN_H)|g' \ -e 's|@''HAVE_NETINET_IN_H''@|$(HAVE_NETINET_IN_H)|g' \ < $(srcdir)/netinet_in.in.h; \ } > $@-t && \ mv $@-t $@ MOSTLYCLEANFILES += netinet/in.h netinet/in.h-t MOSTLYCLEANDIRS += netinet EXTRA_DIST += netinet_in.in.h ## end gnulib module netinet_in ## begin gnulib module nl_langinfo EXTRA_DIST += nl_langinfo.c EXTRA_libmissing_la_SOURCES += nl_langinfo.c ## end gnulib module nl_langinfo ## begin gnulib module pathmax EXTRA_DIST += pathmax.h ## end gnulib module pathmax ## begin gnulib module perror EXTRA_DIST += perror.c EXTRA_libmissing_la_SOURCES += perror.c ## end gnulib module perror ## begin gnulib module poll BUILT_SOURCES += $(POLL_H) # We need the following in order to create when the system # doesn't have one. poll.h: poll.in.h $(AM_V_GEN)rm -f $@-t $@ && \ { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \ cat $(srcdir)/poll.in.h; \ } > $@-t && \ mv -f $@-t $@ MOSTLYCLEANFILES += poll.h poll.h-t EXTRA_DIST += poll.c poll.in.h EXTRA_libmissing_la_SOURCES += poll.c ## end gnulib module poll ## begin gnulib module printf-frexp libmissing_la_SOURCES += printf-frexp.c EXTRA_DIST += printf-frexp.h ## end gnulib module printf-frexp ## begin gnulib module printf-frexpl libmissing_la_SOURCES += printf-frexpl.c EXTRA_DIST += printf-frexp.c printf-frexpl.h EXTRA_libmissing_la_SOURCES += printf-frexp.c ## end gnulib module printf-frexpl ## begin gnulib module realloc-posix EXTRA_DIST += realloc.c EXTRA_libmissing_la_SOURCES += realloc.c ## end gnulib module realloc-posix ## begin gnulib module regex EXTRA_DIST += regcomp.c regex.c regex.h regex_internal.c regex_internal.h regexec.c EXTRA_libmissing_la_SOURCES += regcomp.c regex.c regex_internal.c regexec.c ## end gnulib module regex ## begin gnulib module relocatable-lib-lgpl DEFS += -DNO_XMALLOC EXTRA_DIST += relocatable.c relocatable.h EXTRA_libmissing_la_SOURCES += relocatable.c ## end gnulib module relocatable-lib-lgpl ## begin gnulib module select EXTRA_DIST += select.c EXTRA_libmissing_la_SOURCES += select.c ## end gnulib module select ## begin gnulib module setsockopt EXTRA_DIST += setsockopt.c w32sock.h EXTRA_libmissing_la_SOURCES += setsockopt.c ## end gnulib module setsockopt ## begin gnulib module signal BUILT_SOURCES += signal.h # We need the following in order to create when the system # doesn't have a complete one. signal.h: signal.in.h $(WARN_ON_USE_H) $(ARG_NONNULL_H) $(AM_V_GEN)rm -f $@-t $@ && \ { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */' && \ sed -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \ -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ -e 's|@''NEXT_SIGNAL_H''@|$(NEXT_SIGNAL_H)|g' \ -e 's|@''GNULIB_SIGNAL_H_SIGPIPE''@|$(GNULIB_SIGNAL_H_SIGPIPE)|g' \ -e 's|@''GNULIB_SIGPROCMASK''@|$(GNULIB_SIGPROCMASK)|g' \ -e 's|@''GNULIB_SIGACTION''@|$(GNULIB_SIGACTION)|g' \ -e 's|@''HAVE_POSIX_SIGNALBLOCKING''@|$(HAVE_POSIX_SIGNALBLOCKING)|g' \ -e 's|@''HAVE_SIGSET_T''@|$(HAVE_SIGSET_T)|g' \ -e 's|@''HAVE_SIGINFO_T''@|$(HAVE_SIGINFO_T)|g' \ -e 's|@''HAVE_SIGACTION''@|$(HAVE_SIGACTION)|g' \ -e 's|@''HAVE_STRUCT_SIGACTION_SA_SIGACTION''@|$(HAVE_STRUCT_SIGACTION_SA_SIGACTION)|g' \ -e 's|@''HAVE_TYPE_VOLATILE_SIG_ATOMIC_T''@|$(HAVE_TYPE_VOLATILE_SIG_ATOMIC_T)|g' \ -e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \ -e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)' \ < $(srcdir)/signal.in.h; \ } > $@-t && \ mv $@-t $@ MOSTLYCLEANFILES += signal.h signal.h-t EXTRA_DIST += signal.in.h ## end gnulib module signal ## begin gnulib module signbit EXTRA_DIST += float+.h signbitd.c signbitf.c signbitl.c EXTRA_libmissing_la_SOURCES += signbitd.c signbitf.c signbitl.c ## end gnulib module signbit ## begin gnulib module sigprocmask EXTRA_DIST += sigprocmask.c EXTRA_libmissing_la_SOURCES += sigprocmask.c ## end gnulib module sigprocmask ## begin gnulib module size_max libmissing_la_SOURCES += size_max.h ## end gnulib module size_max ## begin gnulib module sleep EXTRA_DIST += sleep.c EXTRA_libmissing_la_SOURCES += sleep.c ## end gnulib module sleep ## begin gnulib module snprintf EXTRA_DIST += snprintf.c EXTRA_libmissing_la_SOURCES += snprintf.c ## end gnulib module snprintf ## begin gnulib module socket EXTRA_DIST += socket.c w32sock.h EXTRA_libmissing_la_SOURCES += socket.c ## end gnulib module socket ## begin gnulib module sockets libmissing_la_SOURCES += sockets.h sockets.c EXTRA_DIST += w32sock.h ## end gnulib module sockets ## begin gnulib module stat EXTRA_DIST += stat.c EXTRA_libmissing_la_SOURCES += stat.c ## end gnulib module stat ## begin gnulib module stdbool BUILT_SOURCES += $(STDBOOL_H) # We need the following in order to create when the system # doesn't have one that works. stdbool.h: stdbool.in.h $(AM_V_GEN)rm -f $@-t $@ && \ { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \ sed -e 's/@''HAVE__BOOL''@/$(HAVE__BOOL)/g' < $(srcdir)/stdbool.in.h; \ } > $@-t && \ mv $@-t $@ MOSTLYCLEANFILES += stdbool.h stdbool.h-t EXTRA_DIST += stdbool.in.h ## end gnulib module stdbool ## begin gnulib module stddef BUILT_SOURCES += $(STDDEF_H) # We need the following in order to create when the system # doesn't have one that works with the given compiler. stddef.h: stddef.in.h $(AM_V_GEN)rm -f $@-t $@ && \ { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */' && \ sed -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \ -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ -e 's|@''NEXT_STDDEF_H''@|$(NEXT_STDDEF_H)|g' \ -e 's|@''HAVE_WCHAR_T''@|$(HAVE_WCHAR_T)|g' \ -e 's|@''REPLACE_NULL''@|$(REPLACE_NULL)|g' \ < $(srcdir)/stddef.in.h; \ } > $@-t && \ mv $@-t $@ MOSTLYCLEANFILES += stddef.h stddef.h-t EXTRA_DIST += stddef.in.h ## end gnulib module stddef ## begin gnulib module stdint BUILT_SOURCES += $(STDINT_H) # We need the following in order to create when the system # doesn't have one that works with the given compiler. stdint.h: stdint.in.h $(AM_V_GEN)rm -f $@-t $@ && \ { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \ sed -e 's/@''HAVE_STDINT_H''@/$(HAVE_STDINT_H)/g' \ -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \ -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ -e 's|@''NEXT_STDINT_H''@|$(NEXT_STDINT_H)|g' \ -e 's/@''HAVE_SYS_TYPES_H''@/$(HAVE_SYS_TYPES_H)/g' \ -e 's/@''HAVE_INTTYPES_H''@/$(HAVE_INTTYPES_H)/g' \ -e 's/@''HAVE_SYS_INTTYPES_H''@/$(HAVE_SYS_INTTYPES_H)/g' \ -e 's/@''HAVE_SYS_BITYPES_H''@/$(HAVE_SYS_BITYPES_H)/g' \ -e 's/@''HAVE_LONG_LONG_INT''@/$(HAVE_LONG_LONG_INT)/g' \ -e 's/@''HAVE_UNSIGNED_LONG_LONG_INT''@/$(HAVE_UNSIGNED_LONG_LONG_INT)/g' \ -e 's/@''APPLE_UNIVERSAL_BUILD''@/$(APPLE_UNIVERSAL_BUILD)/g' \ -e 's/@''BITSIZEOF_PTRDIFF_T''@/$(BITSIZEOF_PTRDIFF_T)/g' \ -e 's/@''PTRDIFF_T_SUFFIX''@/$(PTRDIFF_T_SUFFIX)/g' \ -e 's/@''BITSIZEOF_SIG_ATOMIC_T''@/$(BITSIZEOF_SIG_ATOMIC_T)/g' \ -e 's/@''HAVE_SIGNED_SIG_ATOMIC_T''@/$(HAVE_SIGNED_SIG_ATOMIC_T)/g' \ -e 's/@''SIG_ATOMIC_T_SUFFIX''@/$(SIG_ATOMIC_T_SUFFIX)/g' \ -e 's/@''BITSIZEOF_SIZE_T''@/$(BITSIZEOF_SIZE_T)/g' \ -e 's/@''SIZE_T_SUFFIX''@/$(SIZE_T_SUFFIX)/g' \ -e 's/@''BITSIZEOF_WCHAR_T''@/$(BITSIZEOF_WCHAR_T)/g' \ -e 's/@''HAVE_SIGNED_WCHAR_T''@/$(HAVE_SIGNED_WCHAR_T)/g' \ -e 's/@''WCHAR_T_SUFFIX''@/$(WCHAR_T_SUFFIX)/g' \ -e 's/@''BITSIZEOF_WINT_T''@/$(BITSIZEOF_WINT_T)/g' \ -e 's/@''HAVE_SIGNED_WINT_T''@/$(HAVE_SIGNED_WINT_T)/g' \ -e 's/@''WINT_T_SUFFIX''@/$(WINT_T_SUFFIX)/g' \ < $(srcdir)/stdint.in.h; \ } > $@-t && \ mv $@-t $@ MOSTLYCLEANFILES += stdint.h stdint.h-t EXTRA_DIST += stdint.in.h ## end gnulib module stdint ## begin gnulib module stdio BUILT_SOURCES += stdio.h # We need the following in order to create when the system # doesn't have one that works with the given compiler. stdio.h: stdio.in.h $(WARN_ON_USE_H) $(ARG_NONNULL_H) $(AM_V_GEN)rm -f $@-t $@ && \ { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */' && \ sed -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \ -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ -e 's|@''NEXT_STDIO_H''@|$(NEXT_STDIO_H)|g' \ -e 's|@''GNULIB_DPRINTF''@|$(GNULIB_DPRINTF)|g' \ -e 's|@''GNULIB_FCLOSE''@|$(GNULIB_FCLOSE)|g' \ -e 's|@''GNULIB_FFLUSH''@|$(GNULIB_FFLUSH)|g' \ -e 's|@''GNULIB_FOPEN''@|$(GNULIB_FOPEN)|g' \ -e 's|@''GNULIB_FPRINTF''@|$(GNULIB_FPRINTF)|g' \ -e 's|@''GNULIB_FPRINTF_POSIX''@|$(GNULIB_FPRINTF_POSIX)|g' \ -e 's|@''GNULIB_FPURGE''@|$(GNULIB_FPURGE)|g' \ -e 's|@''GNULIB_FPUTC''@|$(GNULIB_FPUTC)|g' \ -e 's|@''GNULIB_FPUTS''@|$(GNULIB_FPUTS)|g' \ -e 's|@''GNULIB_FREOPEN''@|$(GNULIB_FREOPEN)|g' \ -e 's|@''GNULIB_FSEEK''@|$(GNULIB_FSEEK)|g' \ -e 's|@''GNULIB_FSEEKO''@|$(GNULIB_FSEEKO)|g' \ -e 's|@''GNULIB_FTELL''@|$(GNULIB_FTELL)|g' \ -e 's|@''GNULIB_FTELLO''@|$(GNULIB_FTELLO)|g' \ -e 's|@''GNULIB_FWRITE''@|$(GNULIB_FWRITE)|g' \ -e 's|@''GNULIB_GETDELIM''@|$(GNULIB_GETDELIM)|g' \ -e 's|@''GNULIB_GETLINE''@|$(GNULIB_GETLINE)|g' \ -e 's|@''GNULIB_OBSTACK_PRINTF''@|$(GNULIB_OBSTACK_PRINTF)|g' \ -e 's|@''GNULIB_OBSTACK_PRINTF_POSIX''@|$(GNULIB_OBSTACK_PRINTF_POSIX)|g' \ -e 's|@''GNULIB_PERROR''@|$(GNULIB_PERROR)|g' \ -e 's|@''GNULIB_POPEN''@|$(GNULIB_POPEN)|g' \ -e 's|@''GNULIB_PRINTF''@|$(GNULIB_PRINTF)|g' \ -e 's|@''GNULIB_PRINTF_POSIX''@|$(GNULIB_PRINTF_POSIX)|g' \ -e 's|@''GNULIB_PUTC''@|$(GNULIB_PUTC)|g' \ -e 's|@''GNULIB_PUTCHAR''@|$(GNULIB_PUTCHAR)|g' \ -e 's|@''GNULIB_PUTS''@|$(GNULIB_PUTS)|g' \ -e 's|@''GNULIB_REMOVE''@|$(GNULIB_REMOVE)|g' \ -e 's|@''GNULIB_RENAME''@|$(GNULIB_RENAME)|g' \ -e 's|@''GNULIB_RENAMEAT''@|$(GNULIB_RENAMEAT)|g' \ -e 's|@''GNULIB_SNPRINTF''@|$(GNULIB_SNPRINTF)|g' \ -e 's|@''GNULIB_SPRINTF_POSIX''@|$(GNULIB_SPRINTF_POSIX)|g' \ -e 's|@''GNULIB_STDIO_H_SIGPIPE''@|$(GNULIB_STDIO_H_SIGPIPE)|g' \ -e 's|@''GNULIB_VASPRINTF''@|$(GNULIB_VASPRINTF)|g' \ -e 's|@''GNULIB_VDPRINTF''@|$(GNULIB_VDPRINTF)|g' \ -e 's|@''GNULIB_VFPRINTF''@|$(GNULIB_VFPRINTF)|g' \ -e 's|@''GNULIB_VFPRINTF_POSIX''@|$(GNULIB_VFPRINTF_POSIX)|g' \ -e 's|@''GNULIB_VPRINTF''@|$(GNULIB_VPRINTF)|g' \ -e 's|@''GNULIB_VPRINTF_POSIX''@|$(GNULIB_VPRINTF_POSIX)|g' \ -e 's|@''GNULIB_VSNPRINTF''@|$(GNULIB_VSNPRINTF)|g' \ -e 's|@''GNULIB_VSPRINTF_POSIX''@|$(GNULIB_VSPRINTF_POSIX)|g' \ < $(srcdir)/stdio.in.h | \ sed -e 's|@''HAVE_DECL_FPURGE''@|$(HAVE_DECL_FPURGE)|g' \ -e 's|@''HAVE_DECL_GETDELIM''@|$(HAVE_DECL_GETDELIM)|g' \ -e 's|@''HAVE_DECL_GETLINE''@|$(HAVE_DECL_GETLINE)|g' \ -e 's|@''HAVE_DECL_OBSTACK_PRINTF''@|$(HAVE_DECL_OBSTACK_PRINTF)|g' \ -e 's|@''HAVE_DECL_SNPRINTF''@|$(HAVE_DECL_SNPRINTF)|g' \ -e 's|@''HAVE_DECL_VSNPRINTF''@|$(HAVE_DECL_VSNPRINTF)|g' \ -e 's|@''HAVE_DPRINTF''@|$(HAVE_DPRINTF)|g' \ -e 's|@''HAVE_RENAMEAT''@|$(HAVE_RENAMEAT)|g' \ -e 's|@''HAVE_VASPRINTF''@|$(HAVE_VASPRINTF)|g' \ -e 's|@''HAVE_VDPRINTF''@|$(HAVE_VDPRINTF)|g' \ -e 's|@''REPLACE_DPRINTF''@|$(REPLACE_DPRINTF)|g' \ -e 's|@''REPLACE_FCLOSE''@|$(REPLACE_FCLOSE)|g' \ -e 's|@''REPLACE_FFLUSH''@|$(REPLACE_FFLUSH)|g' \ -e 's|@''REPLACE_FOPEN''@|$(REPLACE_FOPEN)|g' \ -e 's|@''REPLACE_FPRINTF''@|$(REPLACE_FPRINTF)|g' \ -e 's|@''REPLACE_FPURGE''@|$(REPLACE_FPURGE)|g' \ -e 's|@''REPLACE_FREOPEN''@|$(REPLACE_FREOPEN)|g' \ -e 's|@''REPLACE_FSEEK''@|$(REPLACE_FSEEK)|g' \ -e 's|@''REPLACE_FSEEKO''@|$(REPLACE_FSEEKO)|g' \ -e 's|@''REPLACE_FTELL''@|$(REPLACE_FTELL)|g' \ -e 's|@''REPLACE_FTELLO''@|$(REPLACE_FTELLO)|g' \ -e 's|@''REPLACE_GETDELIM''@|$(REPLACE_GETDELIM)|g' \ -e 's|@''REPLACE_GETLINE''@|$(REPLACE_GETLINE)|g' \ -e 's|@''REPLACE_OBSTACK_PRINTF''@|$(REPLACE_OBSTACK_PRINTF)|g' \ -e 's|@''REPLACE_PERROR''@|$(REPLACE_PERROR)|g' \ -e 's|@''REPLACE_POPEN''@|$(REPLACE_POPEN)|g' \ -e 's|@''REPLACE_PRINTF''@|$(REPLACE_PRINTF)|g' \ -e 's|@''REPLACE_REMOVE''@|$(REPLACE_REMOVE)|g' \ -e 's|@''REPLACE_RENAME''@|$(REPLACE_RENAME)|g' \ -e 's|@''REPLACE_RENAMEAT''@|$(REPLACE_RENAMEAT)|g' \ -e 's|@''REPLACE_SNPRINTF''@|$(REPLACE_SNPRINTF)|g' \ -e 's|@''REPLACE_SPRINTF''@|$(REPLACE_SPRINTF)|g' \ -e 's|@''REPLACE_STDIO_WRITE_FUNCS''@|$(REPLACE_STDIO_WRITE_FUNCS)|g' \ -e 's|@''REPLACE_VASPRINTF''@|$(REPLACE_VASPRINTF)|g' \ -e 's|@''REPLACE_VDPRINTF''@|$(REPLACE_VDPRINTF)|g' \ -e 's|@''REPLACE_VFPRINTF''@|$(REPLACE_VFPRINTF)|g' \ -e 's|@''REPLACE_VPRINTF''@|$(REPLACE_VPRINTF)|g' \ -e 's|@''REPLACE_VSNPRINTF''@|$(REPLACE_VSNPRINTF)|g' \ -e 's|@''REPLACE_VSPRINTF''@|$(REPLACE_VSPRINTF)|g' \ -e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \ -e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)'; \ } > $@-t && \ mv $@-t $@ MOSTLYCLEANFILES += stdio.h stdio.h-t EXTRA_DIST += stdio-write.c stdio.in.h EXTRA_libmissing_la_SOURCES += stdio-write.c ## end gnulib module stdio ## begin gnulib module stdlib BUILT_SOURCES += stdlib.h # We need the following in order to create when the system # doesn't have one that works with the given compiler. stdlib.h: stdlib.in.h $(WARN_ON_USE_H) $(ARG_NONNULL_H) $(AM_V_GEN)rm -f $@-t $@ && \ { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */' && \ sed -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \ -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ -e 's|@''NEXT_STDLIB_H''@|$(NEXT_STDLIB_H)|g' \ -e 's|@''GNULIB_ATOLL''@|$(GNULIB_ATOLL)|g' \ -e 's|@''GNULIB_CALLOC_POSIX''@|$(GNULIB_CALLOC_POSIX)|g' \ -e 's|@''GNULIB_CANONICALIZE_FILE_NAME''@|$(GNULIB_CANONICALIZE_FILE_NAME)|g' \ -e 's|@''GNULIB_GETLOADAVG''@|$(GNULIB_GETLOADAVG)|g' \ -e 's|@''GNULIB_GETSUBOPT''@|$(GNULIB_GETSUBOPT)|g' \ -e 's|@''GNULIB_MALLOC_POSIX''@|$(GNULIB_MALLOC_POSIX)|g' \ -e 's|@''GNULIB_MKDTEMP''@|$(GNULIB_MKDTEMP)|g' \ -e 's|@''GNULIB_MKOSTEMP''@|$(GNULIB_MKOSTEMP)|g' \ -e 's|@''GNULIB_MKOSTEMPS''@|$(GNULIB_MKOSTEMPS)|g' \ -e 's|@''GNULIB_MKSTEMP''@|$(GNULIB_MKSTEMP)|g' \ -e 's|@''GNULIB_MKSTEMPS''@|$(GNULIB_MKSTEMPS)|g' \ -e 's|@''GNULIB_PUTENV''@|$(GNULIB_PUTENV)|g' \ -e 's|@''GNULIB_RANDOM_R''@|$(GNULIB_RANDOM_R)|g' \ -e 's|@''GNULIB_REALLOC_POSIX''@|$(GNULIB_REALLOC_POSIX)|g' \ -e 's|@''GNULIB_REALPATH''@|$(GNULIB_REALPATH)|g' \ -e 's|@''GNULIB_RPMATCH''@|$(GNULIB_RPMATCH)|g' \ -e 's|@''GNULIB_SETENV''@|$(GNULIB_SETENV)|g' \ -e 's|@''GNULIB_STRTOD''@|$(GNULIB_STRTOD)|g' \ -e 's|@''GNULIB_STRTOLL''@|$(GNULIB_STRTOLL)|g' \ -e 's|@''GNULIB_STRTOULL''@|$(GNULIB_STRTOULL)|g' \ -e 's|@''GNULIB_UNSETENV''@|$(GNULIB_UNSETENV)|g' \ -e 's|@''HAVE_ATOLL''@|$(HAVE_ATOLL)|g' \ -e 's|@''HAVE_CALLOC_POSIX''@|$(HAVE_CALLOC_POSIX)|g' \ -e 's|@''HAVE_CANONICALIZE_FILE_NAME''@|$(HAVE_CANONICALIZE_FILE_NAME)|g' \ -e 's|@''HAVE_DECL_GETLOADAVG''@|$(HAVE_DECL_GETLOADAVG)|g' \ -e 's|@''HAVE_GETSUBOPT''@|$(HAVE_GETSUBOPT)|g' \ -e 's|@''HAVE_MALLOC_POSIX''@|$(HAVE_MALLOC_POSIX)|g' \ -e 's|@''HAVE_MKDTEMP''@|$(HAVE_MKDTEMP)|g' \ -e 's|@''HAVE_MKOSTEMP''@|$(HAVE_MKOSTEMP)|g' \ -e 's|@''HAVE_MKOSTEMPS''@|$(HAVE_MKOSTEMPS)|g' \ -e 's|@''HAVE_MKSTEMPS''@|$(HAVE_MKSTEMPS)|g' \ -e 's|@''HAVE_RANDOM_H''@|$(HAVE_RANDOM_H)|g' \ -e 's|@''HAVE_RANDOM_R''@|$(HAVE_RANDOM_R)|g' \ -e 's|@''HAVE_REALLOC_POSIX''@|$(HAVE_REALLOC_POSIX)|g' \ -e 's|@''HAVE_REALPATH''@|$(HAVE_REALPATH)|g' \ -e 's|@''HAVE_RPMATCH''@|$(HAVE_RPMATCH)|g' \ -e 's|@''HAVE_SETENV''@|$(HAVE_SETENV)|g' \ -e 's|@''HAVE_STRTOD''@|$(HAVE_STRTOD)|g' \ -e 's|@''HAVE_STRTOLL''@|$(HAVE_STRTOLL)|g' \ -e 's|@''HAVE_STRTOULL''@|$(HAVE_STRTOULL)|g' \ -e 's|@''HAVE_STRUCT_RANDOM_DATA''@|$(HAVE_STRUCT_RANDOM_DATA)|g' \ -e 's|@''HAVE_SYS_LOADAVG_H''@|$(HAVE_SYS_LOADAVG_H)|g' \ -e 's|@''HAVE_UNSETENV''@|$(HAVE_UNSETENV)|g' \ -e 's|@''REPLACE_CANONICALIZE_FILE_NAME''@|$(REPLACE_CANONICALIZE_FILE_NAME)|g' \ -e 's|@''REPLACE_MKSTEMP''@|$(REPLACE_MKSTEMP)|g' \ -e 's|@''REPLACE_PUTENV''@|$(REPLACE_PUTENV)|g' \ -e 's|@''REPLACE_REALPATH''@|$(REPLACE_REALPATH)|g' \ -e 's|@''REPLACE_SETENV''@|$(REPLACE_SETENV)|g' \ -e 's|@''REPLACE_STRTOD''@|$(REPLACE_STRTOD)|g' \ -e 's|@''REPLACE_UNSETENV''@|$(REPLACE_UNSETENV)|g' \ -e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \ -e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)' \ < $(srcdir)/stdlib.in.h; \ } > $@-t && \ mv $@-t $@ MOSTLYCLEANFILES += stdlib.h stdlib.h-t EXTRA_DIST += stdlib.in.h ## end gnulib module stdlib ## begin gnulib module strcase EXTRA_DIST += strcasecmp.c strncasecmp.c EXTRA_libmissing_la_SOURCES += strcasecmp.c strncasecmp.c ## end gnulib module strcase ## begin gnulib module strcasestr-simple EXTRA_DIST += str-two-way.h strcasestr.c EXTRA_libmissing_la_SOURCES += strcasestr.c ## end gnulib module strcasestr-simple ## begin gnulib module strdup EXTRA_DIST += strdup.c EXTRA_libmissing_la_SOURCES += strdup.c ## end gnulib module strdup ## begin gnulib module strdup-posix EXTRA_DIST += strdup.c EXTRA_libmissing_la_SOURCES += strdup.c ## end gnulib module strdup-posix ## begin gnulib module streq EXTRA_DIST += streq.h ## end gnulib module streq ## begin gnulib module strerror EXTRA_DIST += strerror.c EXTRA_libmissing_la_SOURCES += strerror.c ## end gnulib module strerror ## begin gnulib module string BUILT_SOURCES += string.h # We need the following in order to create when the system # doesn't have one that works with the given compiler. string.h: string.in.h $(WARN_ON_USE_H) $(ARG_NONNULL_H) $(AM_V_GEN)rm -f $@-t $@ && \ { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */' && \ sed -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \ -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ -e 's|@''NEXT_STRING_H''@|$(NEXT_STRING_H)|g' \ -e 's|@''GNULIB_MBSLEN''@|$(GNULIB_MBSLEN)|g' \ -e 's|@''GNULIB_MBSNLEN''@|$(GNULIB_MBSNLEN)|g' \ -e 's|@''GNULIB_MBSCHR''@|$(GNULIB_MBSCHR)|g' \ -e 's|@''GNULIB_MBSRCHR''@|$(GNULIB_MBSRCHR)|g' \ -e 's|@''GNULIB_MBSSTR''@|$(GNULIB_MBSSTR)|g' \ -e 's|@''GNULIB_MBSCASECMP''@|$(GNULIB_MBSCASECMP)|g' \ -e 's|@''GNULIB_MBSNCASECMP''@|$(GNULIB_MBSNCASECMP)|g' \ -e 's|@''GNULIB_MBSPCASECMP''@|$(GNULIB_MBSPCASECMP)|g' \ -e 's|@''GNULIB_MBSCASESTR''@|$(GNULIB_MBSCASESTR)|g' \ -e 's|@''GNULIB_MBSCSPN''@|$(GNULIB_MBSCSPN)|g' \ -e 's|@''GNULIB_MBSPBRK''@|$(GNULIB_MBSPBRK)|g' \ -e 's|@''GNULIB_MBSSPN''@|$(GNULIB_MBSSPN)|g' \ -e 's|@''GNULIB_MBSSEP''@|$(GNULIB_MBSSEP)|g' \ -e 's|@''GNULIB_MBSTOK_R''@|$(GNULIB_MBSTOK_R)|g' \ -e 's|@''GNULIB_MEMCHR''@|$(GNULIB_MEMCHR)|g' \ -e 's|@''GNULIB_MEMMEM''@|$(GNULIB_MEMMEM)|g' \ -e 's|@''GNULIB_MEMPCPY''@|$(GNULIB_MEMPCPY)|g' \ -e 's|@''GNULIB_MEMRCHR''@|$(GNULIB_MEMRCHR)|g' \ -e 's|@''GNULIB_RAWMEMCHR''@|$(GNULIB_RAWMEMCHR)|g' \ -e 's|@''GNULIB_STPCPY''@|$(GNULIB_STPCPY)|g' \ -e 's|@''GNULIB_STPNCPY''@|$(GNULIB_STPNCPY)|g' \ -e 's|@''GNULIB_STRCHRNUL''@|$(GNULIB_STRCHRNUL)|g' \ -e 's|@''GNULIB_STRDUP''@|$(GNULIB_STRDUP)|g' \ -e 's|@''GNULIB_STRNDUP''@|$(GNULIB_STRNDUP)|g' \ -e 's|@''GNULIB_STRNLEN''@|$(GNULIB_STRNLEN)|g' \ -e 's|@''GNULIB_STRPBRK''@|$(GNULIB_STRPBRK)|g' \ -e 's|@''GNULIB_STRSEP''@|$(GNULIB_STRSEP)|g' \ -e 's|@''GNULIB_STRSTR''@|$(GNULIB_STRSTR)|g' \ -e 's|@''GNULIB_STRCASESTR''@|$(GNULIB_STRCASESTR)|g' \ -e 's|@''GNULIB_STRTOK_R''@|$(GNULIB_STRTOK_R)|g' \ -e 's|@''GNULIB_STRERROR''@|$(GNULIB_STRERROR)|g' \ -e 's|@''GNULIB_STRSIGNAL''@|$(GNULIB_STRSIGNAL)|g' \ -e 's|@''GNULIB_STRVERSCMP''@|$(GNULIB_STRVERSCMP)|g' \ < $(srcdir)/string.in.h | \ sed -e 's|@''HAVE_MBSLEN''@|$(HAVE_MBSLEN)|g' \ -e 's|@''HAVE_DECL_MEMMEM''@|$(HAVE_DECL_MEMMEM)|g' \ -e 's|@''HAVE_MEMPCPY''@|$(HAVE_MEMPCPY)|g' \ -e 's|@''HAVE_DECL_MEMRCHR''@|$(HAVE_DECL_MEMRCHR)|g' \ -e 's|@''HAVE_RAWMEMCHR''@|$(HAVE_RAWMEMCHR)|g' \ -e 's|@''HAVE_STPCPY''@|$(HAVE_STPCPY)|g' \ -e 's|@''HAVE_STPNCPY''@|$(HAVE_STPNCPY)|g' \ -e 's|@''HAVE_STRCHRNUL''@|$(HAVE_STRCHRNUL)|g' \ -e 's|@''HAVE_DECL_STRDUP''@|$(HAVE_DECL_STRDUP)|g' \ -e 's|@''HAVE_DECL_STRNDUP''@|$(HAVE_DECL_STRNDUP)|g' \ -e 's|@''HAVE_DECL_STRNLEN''@|$(HAVE_DECL_STRNLEN)|g' \ -e 's|@''HAVE_STRPBRK''@|$(HAVE_STRPBRK)|g' \ -e 's|@''HAVE_STRSEP''@|$(HAVE_STRSEP)|g' \ -e 's|@''HAVE_STRCASESTR''@|$(HAVE_STRCASESTR)|g' \ -e 's|@''HAVE_DECL_STRTOK_R''@|$(HAVE_DECL_STRTOK_R)|g' \ -e 's|@''HAVE_DECL_STRERROR''@|$(HAVE_DECL_STRERROR)|g' \ -e 's|@''HAVE_DECL_STRSIGNAL''@|$(HAVE_DECL_STRSIGNAL)|g' \ -e 's|@''HAVE_STRVERSCMP''@|$(HAVE_STRVERSCMP)|g' \ -e 's|@''REPLACE_MEMCHR''@|$(REPLACE_MEMCHR)|g' \ -e 's|@''REPLACE_MEMMEM''@|$(REPLACE_MEMMEM)|g' \ -e 's|@''REPLACE_STRCASESTR''@|$(REPLACE_STRCASESTR)|g' \ -e 's|@''REPLACE_STRDUP''@|$(REPLACE_STRDUP)|g' \ -e 's|@''REPLACE_STRSTR''@|$(REPLACE_STRSTR)|g' \ -e 's|@''REPLACE_STRERROR''@|$(REPLACE_STRERROR)|g' \ -e 's|@''REPLACE_STRNDUP''@|$(REPLACE_STRNDUP)|g' \ -e 's|@''REPLACE_STRSIGNAL''@|$(REPLACE_STRSIGNAL)|g' \ -e 's|@''REPLACE_STRTOK_R''@|$(REPLACE_STRTOK_R)|g' \ -e 's|@''UNDEFINE_STRTOK_R''@|$(UNDEFINE_STRTOK_R)|g' \ -e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \ -e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)'; \ < $(srcdir)/string.in.h; \ } > $@-t && \ mv $@-t $@ MOSTLYCLEANFILES += string.h string.h-t EXTRA_DIST += string.in.h ## end gnulib module string ## begin gnulib module strings BUILT_SOURCES += strings.h # We need the following in order to create when the system # doesn't have one that works with the given compiler. strings.h: strings.in.h $(WARN_ON_USE_H) $(ARG_NONNULL_H) $(AM_V_GEN)rm -f $@-t $@ && \ { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */' && \ sed -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \ -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ -e 's|@''NEXT_STRINGS_H''@|$(NEXT_STRINGS_H)|g' \ -e 's|@''HAVE_STRCASECMP''@|$(HAVE_STRCASECMP)|g' \ -e 's|@''HAVE_DECL_STRNCASECMP''@|$(HAVE_DECL_STRNCASECMP)|g' \ -e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \ -e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)' \ < $(srcdir)/strings.in.h; \ } > $@-t && \ mv $@-t $@ MOSTLYCLEANFILES += strings.h strings.h-t EXTRA_DIST += strings.in.h ## end gnulib module strings ## begin gnulib module strndup EXTRA_DIST += strndup.c EXTRA_libmissing_la_SOURCES += strndup.c ## end gnulib module strndup ## begin gnulib module strnlen EXTRA_DIST += strnlen.c EXTRA_libmissing_la_SOURCES += strnlen.c ## end gnulib module strnlen ## begin gnulib module strptime EXTRA_DIST += strptime.c EXTRA_libmissing_la_SOURCES += strptime.c ## end gnulib module strptime ## begin gnulib module strsep EXTRA_DIST += strsep.c EXTRA_libmissing_la_SOURCES += strsep.c ## end gnulib module strsep ## begin gnulib module sys_ioctl BUILT_SOURCES += sys/ioctl.h # We need the following in order to create when the system # does not have a complete one. sys/ioctl.h: sys_ioctl.in.h $(WARN_ON_USE_H) $(AM_V_at)$(MKDIR_P) sys $(AM_V_GEN)rm -f $@-t $@ && \ { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \ sed -e 's|@''HAVE_SYS_IOCTL_H''@|$(HAVE_SYS_IOCTL_H)|g' \ -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \ -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ -e 's|@''NEXT_SYS_IOCTL_H''@|$(NEXT_SYS_IOCTL_H)|g' \ -e 's|@''GNULIB_IOCTL''@|$(GNULIB_IOCTL)|g' \ -e 's|@''SYS_IOCTL_H_HAVE_WINSOCK2_H''@|$(SYS_IOCTL_H_HAVE_WINSOCK2_H)|g' \ -e 's|@''SYS_IOCTL_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS''@|$(SYS_IOCTL_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS)|g' \ -e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)' \ < $(srcdir)/sys_ioctl.in.h; \ } > $@-t && \ mv $@-t $@ MOSTLYCLEANFILES += sys/ioctl.h sys/ioctl.h-t MOSTLYCLEANDIRS += sys EXTRA_DIST += sys_ioctl.in.h ## end gnulib module sys_ioctl ## begin gnulib module sys_select BUILT_SOURCES += sys/select.h # We need the following in order to create when the system # doesn't have one that works with the given compiler. sys/select.h: sys_select.in.h $(WARN_ON_USE_H) $(AM_V_at)$(MKDIR_P) sys $(AM_V_GEN)rm -f $@-t $@ && \ { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \ sed -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \ -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ -e 's|@''NEXT_SYS_SELECT_H''@|$(NEXT_SYS_SELECT_H)|g' \ -e 's|@''HAVE_SYS_SELECT_H''@|$(HAVE_SYS_SELECT_H)|g' \ -e 's|@''GNULIB_SELECT''@|$(GNULIB_SELECT)|g' \ -e 's|@''HAVE_WINSOCK2_H''@|$(HAVE_WINSOCK2_H)|g' \ -e 's|@''REPLACE_SELECT''@|$(REPLACE_SELECT)|g' \ -e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)' \ < $(srcdir)/sys_select.in.h; \ } > $@-t && \ mv $@-t $@ MOSTLYCLEANFILES += sys/select.h sys/select.h-t MOSTLYCLEANDIRS += sys EXTRA_DIST += sys_select.in.h ## end gnulib module sys_select ## begin gnulib module sys_socket BUILT_SOURCES += sys/socket.h # We need the following in order to create when the system # doesn't have one that works with the given compiler. sys/socket.h: sys_socket.in.h $(WARN_ON_USE_H) $(ARG_NONNULL_H) $(AM_V_at)$(MKDIR_P) sys $(AM_V_GEN)rm -f $@-t $@ && \ { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \ sed -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \ -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ -e 's|@''NEXT_SYS_SOCKET_H''@|$(NEXT_SYS_SOCKET_H)|g' \ -e 's|@''HAVE_SYS_SOCKET_H''@|$(HAVE_SYS_SOCKET_H)|g' \ -e 's|@''GNULIB_CLOSE''@|$(GNULIB_CLOSE)|g' \ -e 's|@''GNULIB_SOCKET''@|$(GNULIB_SOCKET)|g' \ -e 's|@''GNULIB_CONNECT''@|$(GNULIB_CONNECT)|g' \ -e 's|@''GNULIB_ACCEPT''@|$(GNULIB_ACCEPT)|g' \ -e 's|@''GNULIB_BIND''@|$(GNULIB_BIND)|g' \ -e 's|@''GNULIB_GETPEERNAME''@|$(GNULIB_GETPEERNAME)|g' \ -e 's|@''GNULIB_GETSOCKNAME''@|$(GNULIB_GETSOCKNAME)|g' \ -e 's|@''GNULIB_GETSOCKOPT''@|$(GNULIB_GETSOCKOPT)|g' \ -e 's|@''GNULIB_LISTEN''@|$(GNULIB_LISTEN)|g' \ -e 's|@''GNULIB_RECV''@|$(GNULIB_RECV)|g' \ -e 's|@''GNULIB_SEND''@|$(GNULIB_SEND)|g' \ -e 's|@''GNULIB_RECVFROM''@|$(GNULIB_RECVFROM)|g' \ -e 's|@''GNULIB_SENDTO''@|$(GNULIB_SENDTO)|g' \ -e 's|@''GNULIB_SETSOCKOPT''@|$(GNULIB_SETSOCKOPT)|g' \ -e 's|@''GNULIB_SHUTDOWN''@|$(GNULIB_SHUTDOWN)|g' \ -e 's|@''GNULIB_ACCEPT4''@|$(GNULIB_ACCEPT4)|g' \ -e 's|@''HAVE_WINSOCK2_H''@|$(HAVE_WINSOCK2_H)|g' \ -e 's|@''HAVE_WS2TCPIP_H''@|$(HAVE_WS2TCPIP_H)|g' \ -e 's|@''HAVE_STRUCT_SOCKADDR_STORAGE''@|$(HAVE_STRUCT_SOCKADDR_STORAGE)|g' \ -e 's|@''HAVE_SA_FAMILY_T''@|$(HAVE_SA_FAMILY_T)|g' \ -e 's|@''HAVE_ACCEPT4''@|$(HAVE_ACCEPT4)|g' \ -e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \ -e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)' \ < $(srcdir)/sys_socket.in.h; \ } > $@-t && \ mv -f $@-t $@ MOSTLYCLEANFILES += sys/socket.h sys/socket.h-t MOSTLYCLEANDIRS += sys EXTRA_DIST += sys_socket.in.h ## end gnulib module sys_socket ## begin gnulib module sys_stat BUILT_SOURCES += sys/stat.h # We need the following in order to create when the system # has one that is incomplete. sys/stat.h: sys_stat.in.h $(WARN_ON_USE_H) $(ARG_NONNULL_H) $(AM_V_at)$(MKDIR_P) sys $(AM_V_GEN)rm -f $@-t $@ && \ { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \ sed -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \ -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ -e 's|@''NEXT_SYS_STAT_H''@|$(NEXT_SYS_STAT_H)|g' \ -e 's|@''GNULIB_FCHMODAT''@|$(GNULIB_FCHMODAT)|g' \ -e 's|@''GNULIB_FSTATAT''@|$(GNULIB_FSTATAT)|g' \ -e 's|@''GNULIB_FUTIMENS''@|$(GNULIB_FUTIMENS)|g' \ -e 's|@''GNULIB_LCHMOD''@|$(GNULIB_LCHMOD)|g' \ -e 's|@''GNULIB_LSTAT''@|$(GNULIB_LSTAT)|g' \ -e 's|@''GNULIB_MKDIRAT''@|$(GNULIB_MKDIRAT)|g' \ -e 's|@''GNULIB_MKFIFO''@|$(GNULIB_MKFIFO)|g' \ -e 's|@''GNULIB_MKFIFOAT''@|$(GNULIB_MKFIFOAT)|g' \ -e 's|@''GNULIB_MKNOD''@|$(GNULIB_MKNOD)|g' \ -e 's|@''GNULIB_MKNODAT''@|$(GNULIB_MKNODAT)|g' \ -e 's|@''GNULIB_STAT''@|$(GNULIB_STAT)|g' \ -e 's|@''GNULIB_UTIMENSAT''@|$(GNULIB_UTIMENSAT)|g' \ -e 's|@''HAVE_FCHMODAT''@|$(HAVE_FCHMODAT)|g' \ -e 's|@''HAVE_FSTATAT''@|$(HAVE_FSTATAT)|g' \ -e 's|@''HAVE_FUTIMENS''@|$(HAVE_FUTIMENS)|g' \ -e 's|@''HAVE_LCHMOD''@|$(HAVE_LCHMOD)|g' \ -e 's|@''HAVE_LSTAT''@|$(HAVE_LSTAT)|g' \ -e 's|@''HAVE_MKDIRAT''@|$(HAVE_MKDIRAT)|g' \ -e 's|@''HAVE_MKFIFO''@|$(HAVE_MKFIFO)|g' \ -e 's|@''HAVE_MKFIFOAT''@|$(HAVE_MKFIFOAT)|g' \ -e 's|@''HAVE_MKNOD''@|$(HAVE_MKNOD)|g' \ -e 's|@''HAVE_MKNODAT''@|$(HAVE_MKNODAT)|g' \ -e 's|@''HAVE_UTIMENSAT''@|$(HAVE_UTIMENSAT)|g' \ -e 's|@''REPLACE_FSTAT''@|$(REPLACE_FSTAT)|g' \ -e 's|@''REPLACE_FSTATAT''@|$(REPLACE_FSTATAT)|g' \ -e 's|@''REPLACE_FUTIMENS''@|$(REPLACE_FUTIMENS)|g' \ -e 's|@''REPLACE_LSTAT''@|$(REPLACE_LSTAT)|g' \ -e 's|@''REPLACE_MKDIR''@|$(REPLACE_MKDIR)|g' \ -e 's|@''REPLACE_MKFIFO''@|$(REPLACE_MKFIFO)|g' \ -e 's|@''REPLACE_MKNOD''@|$(REPLACE_MKNOD)|g' \ -e 's|@''REPLACE_STAT''@|$(REPLACE_STAT)|g' \ -e 's|@''REPLACE_UTIMENSAT''@|$(REPLACE_UTIMENSAT)|g' \ -e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \ -e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)' \ < $(srcdir)/sys_stat.in.h; \ } > $@-t && \ mv $@-t $@ MOSTLYCLEANFILES += sys/stat.h sys/stat.h-t MOSTLYCLEANDIRS += sys EXTRA_DIST += sys_stat.in.h ## end gnulib module sys_stat ## begin gnulib module sys_time BUILT_SOURCES += sys/time.h # We need the following in order to create when the system # doesn't have one that works with the given compiler. sys/time.h: sys_time.in.h $(WARN_ON_USE_H) $(ARG_NONNULL_H) $(AM_V_at)$(MKDIR_P) sys $(AM_V_GEN)rm -f $@-t $@ && \ { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \ sed -e 's/@''HAVE_SYS_TIME_H''@/$(HAVE_SYS_TIME_H)/g' \ -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \ -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ -e 's|@''NEXT_SYS_TIME_H''@|$(NEXT_SYS_TIME_H)|g' \ -e 's/@''GNULIB_GETTIMEOFDAY''@/$(GNULIB_GETTIMEOFDAY)/g' \ -e 's/@''HAVE_STRUCT_TIMEVAL''@/$(HAVE_STRUCT_TIMEVAL)/g' \ -e 's/@''REPLACE_GETTIMEOFDAY''@/$(REPLACE_GETTIMEOFDAY)/g' \ -e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \ -e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)' \ < $(srcdir)/sys_time.in.h; \ } > $@-t && \ mv $@-t $@ MOSTLYCLEANFILES += sys/time.h sys/time.h-t EXTRA_DIST += sys_time.in.h ## end gnulib module sys_time ## begin gnulib module sys_utsname BUILT_SOURCES += sys/utsname.h # We need the following in order to create when the system # does not have one. sys/utsname.h: sys_utsname.in.h $(WARN_ON_USE_H) $(ARG_NONNULL_H) $(AM_V_at)$(MKDIR_P) sys $(AM_V_GEN)rm -f $@-t $@ && \ { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \ sed -e 's/@''HAVE_SYS_UTSNAME_H''@/$(HAVE_SYS_UTSNAME_H)/g' \ -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \ -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ -e 's|@''NEXT_SYS_UTSNAME_H''@|$(NEXT_SYS_UTSNAME_H)|g' \ -e 's|@''GNULIB_UNAME''@|$(GNULIB_UNAME)|g' \ -e 's|@''HAVE_STRUCT_UTSNAME''@|$(HAVE_STRUCT_UTSNAME)|g' \ -e 's|@''HAVE_UNAME''@|$(HAVE_UNAME)|g' \ -e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \ -e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)' \ < $(srcdir)/sys_utsname.in.h; \ } > $@-t && \ mv $@-t $@ MOSTLYCLEANFILES += sys/utsname.h sys/utsname.h-t MOSTLYCLEANDIRS += sys EXTRA_DIST += sys_utsname.in.h ## end gnulib module sys_utsname ## begin gnulib module thread libmissing_la_SOURCES += glthread/thread.h glthread/thread.c ## end gnulib module thread ## begin gnulib module threadlib libmissing_la_SOURCES += glthread/threadlib.c EXTRA_DIST += $(top_srcdir)/./config.rpath ## end gnulib module threadlib ## begin gnulib module time BUILT_SOURCES += time.h # We need the following in order to create when the system # doesn't have one that works with the given compiler. time.h: time.in.h $(ARG_NONNULL_H) $(AM_V_GEN)rm -f $@-t $@ && \ { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */' && \ sed -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \ -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ -e 's|@NEXT_TIME_H''@|$(NEXT_TIME_H)|g' \ -e 's|@REPLACE_LOCALTIME_R''@|$(REPLACE_LOCALTIME_R)|g' \ -e 's|@REPLACE_MKTIME''@|$(REPLACE_MKTIME)|g' \ -e 's|@REPLACE_NANOSLEEP''@|$(REPLACE_NANOSLEEP)|g' \ -e 's|@REPLACE_STRPTIME''@|$(REPLACE_STRPTIME)|g' \ -e 's|@REPLACE_TIMEGM''@|$(REPLACE_TIMEGM)|g' \ -e 's|@SYS_TIME_H_DEFINES_STRUCT_TIMESPEC''@|$(SYS_TIME_H_DEFINES_STRUCT_TIMESPEC)|g' \ -e 's|@TIME_H_DEFINES_STRUCT_TIMESPEC''@|$(TIME_H_DEFINES_STRUCT_TIMESPEC)|g' \ -e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \ < $(srcdir)/time.in.h; \ } > $@-t && \ mv $@-t $@ MOSTLYCLEANFILES += time.h time.h-t EXTRA_DIST += time.in.h ## end gnulib module time ## begin gnulib module time_r EXTRA_DIST += time_r.c EXTRA_libmissing_la_SOURCES += time_r.c ## end gnulib module time_r ## begin gnulib module timegm EXTRA_DIST += mktime-internal.h timegm.c EXTRA_libmissing_la_SOURCES += timegm.c ## end gnulib module timegm ## begin gnulib module tls libmissing_la_SOURCES += glthread/tls.h glthread/tls.c ## end gnulib module tls ## begin gnulib module uname EXTRA_DIST += uname.c EXTRA_libmissing_la_SOURCES += uname.c ## end gnulib module uname ## begin gnulib module unistd BUILT_SOURCES += unistd.h # We need the following in order to create an empty placeholder for # when the system doesn't have one. unistd.h: unistd.in.h $(WARN_ON_USE_H) $(ARG_NONNULL_H) $(AM_V_GEN)rm -f $@-t $@ && \ { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \ sed -e 's|@''HAVE_UNISTD_H''@|$(HAVE_UNISTD_H)|g' \ -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \ -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ -e 's|@''NEXT_UNISTD_H''@|$(NEXT_UNISTD_H)|g' \ -e 's|@''GNULIB_CHOWN''@|$(GNULIB_CHOWN)|g' \ -e 's|@''GNULIB_CLOSE''@|$(GNULIB_CLOSE)|g' \ -e 's|@''GNULIB_DUP2''@|$(GNULIB_DUP2)|g' \ -e 's|@''GNULIB_DUP3''@|$(GNULIB_DUP3)|g' \ -e 's|@''GNULIB_ENVIRON''@|$(GNULIB_ENVIRON)|g' \ -e 's|@''GNULIB_EUIDACCESS''@|$(GNULIB_EUIDACCESS)|g' \ -e 's|@''GNULIB_FACCESSAT''@|$(GNULIB_FACCESSAT)|g' \ -e 's|@''GNULIB_FCHDIR''@|$(GNULIB_FCHDIR)|g' \ -e 's|@''GNULIB_FCHOWNAT''@|$(GNULIB_FCHOWNAT)|g' \ -e 's|@''GNULIB_FSYNC''@|$(GNULIB_FSYNC)|g' \ -e 's|@''GNULIB_FTRUNCATE''@|$(GNULIB_FTRUNCATE)|g' \ -e 's|@''GNULIB_GETCWD''@|$(GNULIB_GETCWD)|g' \ -e 's|@''GNULIB_GETDOMAINNAME''@|$(GNULIB_GETDOMAINNAME)|g' \ -e 's|@''GNULIB_GETDTABLESIZE''@|$(GNULIB_GETDTABLESIZE)|g' \ -e 's|@''GNULIB_GETGROUPS''@|$(GNULIB_GETGROUPS)|g' \ -e 's|@''GNULIB_GETHOSTNAME''@|$(GNULIB_GETHOSTNAME)|g' \ -e 's|@''GNULIB_GETLOGIN''@|$(GNULIB_GETLOGIN)|g' \ -e 's|@''GNULIB_GETLOGIN_R''@|$(GNULIB_GETLOGIN_R)|g' \ -e 's|@''GNULIB_GETPAGESIZE''@|$(GNULIB_GETPAGESIZE)|g' \ -e 's|@''GNULIB_GETUSERSHELL''@|$(GNULIB_GETUSERSHELL)|g' \ -e 's|@''GNULIB_LCHOWN''@|$(GNULIB_LCHOWN)|g' \ -e 's|@''GNULIB_LINK''@|$(GNULIB_LINK)|g' \ -e 's|@''GNULIB_LINKAT''@|$(GNULIB_LINKAT)|g' \ -e 's|@''GNULIB_LSEEK''@|$(GNULIB_LSEEK)|g' \ -e 's|@''GNULIB_PIPE2''@|$(GNULIB_PIPE2)|g' \ -e 's|@''GNULIB_PREAD''@|$(GNULIB_PREAD)|g' \ -e 's|@''GNULIB_READLINK''@|$(GNULIB_READLINK)|g' \ -e 's|@''GNULIB_READLINKAT''@|$(GNULIB_READLINKAT)|g' \ -e 's|@''GNULIB_RMDIR''@|$(GNULIB_RMDIR)|g' \ -e 's|@''GNULIB_SLEEP''@|$(GNULIB_SLEEP)|g' \ -e 's|@''GNULIB_SYMLINK''@|$(GNULIB_SYMLINK)|g' \ -e 's|@''GNULIB_SYMLINKAT''@|$(GNULIB_SYMLINKAT)|g' \ -e 's|@''GNULIB_UNISTD_H_GETOPT''@|$(GNULIB_UNISTD_H_GETOPT)|g' \ -e 's|@''GNULIB_UNISTD_H_SIGPIPE''@|$(GNULIB_UNISTD_H_SIGPIPE)|g' \ -e 's|@''GNULIB_UNLINK''@|$(GNULIB_UNLINK)|g' \ -e 's|@''GNULIB_UNLINKAT''@|$(GNULIB_UNLINKAT)|g' \ -e 's|@''GNULIB_USLEEP''@|$(GNULIB_USLEEP)|g' \ -e 's|@''GNULIB_WRITE''@|$(GNULIB_WRITE)|g' \ < $(srcdir)/unistd.in.h | \ sed -e 's|@''HAVE_CHOWN''@|$(HAVE_CHOWN)|g' \ -e 's|@''HAVE_DUP2''@|$(HAVE_DUP2)|g' \ -e 's|@''HAVE_DUP3''@|$(HAVE_DUP3)|g' \ -e 's|@''HAVE_EUIDACCESS''@|$(HAVE_EUIDACCESS)|g' \ -e 's|@''HAVE_FACCESSAT''@|$(HAVE_FACCESSAT)|g' \ -e 's|@''HAVE_FCHOWNAT''@|$(HAVE_FCHOWNAT)|g' \ -e 's|@''HAVE_FSYNC''@|$(HAVE_FSYNC)|g' \ -e 's|@''HAVE_FTRUNCATE''@|$(HAVE_FTRUNCATE)|g' \ -e 's|@''HAVE_GETDOMAINNAME''@|$(HAVE_GETDOMAINNAME)|g' \ -e 's|@''HAVE_GETDTABLESIZE''@|$(HAVE_GETDTABLESIZE)|g' \ -e 's|@''HAVE_GETGROUPS''@|$(HAVE_GETGROUPS)|g' \ -e 's|@''HAVE_GETHOSTNAME''@|$(HAVE_GETHOSTNAME)|g' \ -e 's|@''HAVE_GETLOGIN''@|$(HAVE_GETLOGIN)|g' \ -e 's|@''HAVE_GETPAGESIZE''@|$(HAVE_GETPAGESIZE)|g' \ -e 's|@''HAVE_GETUSERSHELL''@|$(HAVE_GETUSERSHELL)|g' \ -e 's|@''HAVE_LCHOWN''@|$(HAVE_LCHOWN)|g' \ -e 's|@''HAVE_LINK''@|$(HAVE_LINK)|g' \ -e 's|@''HAVE_LINKAT''@|$(HAVE_LINKAT)|g' \ -e 's|@''HAVE_PIPE2''@|$(HAVE_PIPE2)|g' \ -e 's|@''HAVE_PREAD''@|$(HAVE_PREAD)|g' \ -e 's|@''HAVE_READLINK''@|$(HAVE_READLINK)|g' \ -e 's|@''HAVE_READLINKAT''@|$(HAVE_READLINKAT)|g' \ -e 's|@''HAVE_SLEEP''@|$(HAVE_SLEEP)|g' \ -e 's|@''HAVE_SYMLINK''@|$(HAVE_SYMLINK)|g' \ -e 's|@''HAVE_SYMLINKAT''@|$(HAVE_SYMLINKAT)|g' \ -e 's|@''HAVE_UNLINKAT''@|$(HAVE_UNLINKAT)|g' \ -e 's|@''HAVE_USLEEP''@|$(HAVE_USLEEP)|g' \ -e 's|@''HAVE_DECL_ENVIRON''@|$(HAVE_DECL_ENVIRON)|g' \ -e 's|@''HAVE_DECL_GETLOGIN_R''@|$(HAVE_DECL_GETLOGIN_R)|g' \ -e 's|@''HAVE_OS_H''@|$(HAVE_OS_H)|g' \ -e 's|@''HAVE_SYS_PARAM_H''@|$(HAVE_SYS_PARAM_H)|g' \ -e 's|@''REPLACE_CHOWN''@|$(REPLACE_CHOWN)|g' \ -e 's|@''REPLACE_CLOSE''@|$(REPLACE_CLOSE)|g' \ -e 's|@''REPLACE_DUP''@|$(REPLACE_DUP)|g' \ -e 's|@''REPLACE_DUP2''@|$(REPLACE_DUP2)|g' \ -e 's|@''REPLACE_FCHDIR''@|$(REPLACE_FCHDIR)|g' \ -e 's|@''REPLACE_FCHOWNAT''@|$(REPLACE_FCHOWNAT)|g' \ -e 's|@''REPLACE_GETCWD''@|$(REPLACE_GETCWD)|g' \ -e 's|@''REPLACE_GETGROUPS''@|$(REPLACE_GETGROUPS)|g' \ -e 's|@''REPLACE_GETPAGESIZE''@|$(REPLACE_GETPAGESIZE)|g' \ -e 's|@''REPLACE_LCHOWN''@|$(REPLACE_LCHOWN)|g' \ -e 's|@''REPLACE_LINK''@|$(REPLACE_LINK)|g' \ -e 's|@''REPLACE_LINKAT''@|$(REPLACE_LINKAT)|g' \ -e 's|@''REPLACE_LSEEK''@|$(REPLACE_LSEEK)|g' \ -e 's|@''REPLACE_PREAD''@|$(REPLACE_PREAD)|g' \ -e 's|@''REPLACE_READLINK''@|$(REPLACE_READLINK)|g' \ -e 's|@''REPLACE_RMDIR''@|$(REPLACE_RMDIR)|g' \ -e 's|@''REPLACE_SLEEP''@|$(REPLACE_SLEEP)|g' \ -e 's|@''REPLACE_SYMLINK''@|$(REPLACE_SYMLINK)|g' \ -e 's|@''REPLACE_UNLINK''@|$(REPLACE_UNLINK)|g' \ -e 's|@''REPLACE_UNLINKAT''@|$(REPLACE_UNLINKAT)|g' \ -e 's|@''REPLACE_USLEEP''@|$(REPLACE_USLEEP)|g' \ -e 's|@''REPLACE_WRITE''@|$(REPLACE_WRITE)|g' \ -e 's|@''UNISTD_H_HAVE_WINSOCK2_H''@|$(UNISTD_H_HAVE_WINSOCK2_H)|g' \ -e 's|@''UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS''@|$(UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS)|g' \ -e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \ -e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)'; \ } > $@-t && \ mv $@-t $@ MOSTLYCLEANFILES += unistd.h unistd.h-t EXTRA_DIST += unistd.in.h ## end gnulib module unistd ## begin gnulib module vasnprintf EXTRA_DIST += asnprintf.c float+.h printf-args.c printf-args.h printf-parse.c printf-parse.h vasnprintf.c vasnprintf.h EXTRA_libmissing_la_SOURCES += asnprintf.c printf-args.c printf-parse.c vasnprintf.c ## end gnulib module vasnprintf ## begin gnulib module verify libmissing_la_SOURCES += verify.h ## end gnulib module verify ## begin gnulib module vsnprintf EXTRA_DIST += vsnprintf.c EXTRA_libmissing_la_SOURCES += vsnprintf.c ## end gnulib module vsnprintf ## begin gnulib module warn-on-use BUILT_SOURCES += warn-on-use.h # The warn-on-use.h that gets inserted into generated .h files is the same as # build-aux/warn-on-use.h, except that it has the copyright header cut off. warn-on-use.h: $(top_srcdir)/./warn-on-use.h $(AM_V_GEN)rm -f $@-t $@ && \ sed -n -e '/^.ifndef/,$$p' \ < $(top_srcdir)/./warn-on-use.h \ > $@-t && \ mv $@-t $@ MOSTLYCLEANFILES += warn-on-use.h warn-on-use.h-t WARN_ON_USE_H=warn-on-use.h EXTRA_DIST += $(top_srcdir)/./warn-on-use.h ## end gnulib module warn-on-use ## begin gnulib module wchar BUILT_SOURCES += wchar.h # We need the following in order to create when the system # version does not work standalone. wchar.h: wchar.in.h $(WARN_ON_USE_H) $(ARG_NONNULL_H) $(AM_V_GEN)rm -f $@-t $@ && \ { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \ sed -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \ -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ -e 's|@''NEXT_WCHAR_H''@|$(NEXT_WCHAR_H)|g' \ -e 's|@''HAVE_WCHAR_H''@|$(HAVE_WCHAR_H)|g' \ -e 's|@''GNULIB_BTOWC''@|$(GNULIB_BTOWC)|g' \ -e 's|@''GNULIB_WCTOB''@|$(GNULIB_WCTOB)|g' \ -e 's|@''GNULIB_MBSINIT''@|$(GNULIB_MBSINIT)|g' \ -e 's|@''GNULIB_MBRTOWC''@|$(GNULIB_MBRTOWC)|g' \ -e 's|@''GNULIB_MBRLEN''@|$(GNULIB_MBRLEN)|g' \ -e 's|@''GNULIB_MBSRTOWCS''@|$(GNULIB_MBSRTOWCS)|g' \ -e 's|@''GNULIB_MBSNRTOWCS''@|$(GNULIB_MBSNRTOWCS)|g' \ -e 's|@''GNULIB_WCRTOMB''@|$(GNULIB_WCRTOMB)|g' \ -e 's|@''GNULIB_WCSRTOMBS''@|$(GNULIB_WCSRTOMBS)|g' \ -e 's|@''GNULIB_WCSNRTOMBS''@|$(GNULIB_WCSNRTOMBS)|g' \ -e 's|@''GNULIB_WCWIDTH''@|$(GNULIB_WCWIDTH)|g' \ -e 's|@''HAVE_WINT_T''@|$(HAVE_WINT_T)|g' \ -e 's|@''HAVE_BTOWC''@|$(HAVE_BTOWC)|g' \ -e 's|@''HAVE_MBSINIT''@|$(HAVE_MBSINIT)|g' \ -e 's|@''HAVE_MBRTOWC''@|$(HAVE_MBRTOWC)|g' \ -e 's|@''HAVE_MBRLEN''@|$(HAVE_MBRLEN)|g' \ -e 's|@''HAVE_MBSRTOWCS''@|$(HAVE_MBSRTOWCS)|g' \ -e 's|@''HAVE_MBSNRTOWCS''@|$(HAVE_MBSNRTOWCS)|g' \ -e 's|@''HAVE_WCRTOMB''@|$(HAVE_WCRTOMB)|g' \ -e 's|@''HAVE_WCSRTOMBS''@|$(HAVE_WCSRTOMBS)|g' \ -e 's|@''HAVE_WCSNRTOMBS''@|$(HAVE_WCSNRTOMBS)|g' \ -e 's|@''HAVE_DECL_WCTOB''@|$(HAVE_DECL_WCTOB)|g' \ -e 's|@''HAVE_DECL_WCWIDTH''@|$(HAVE_DECL_WCWIDTH)|g' \ -e 's|@''REPLACE_MBSTATE_T''@|$(REPLACE_MBSTATE_T)|g' \ -e 's|@''REPLACE_BTOWC''@|$(REPLACE_BTOWC)|g' \ -e 's|@''REPLACE_WCTOB''@|$(REPLACE_WCTOB)|g' \ -e 's|@''REPLACE_MBSINIT''@|$(REPLACE_MBSINIT)|g' \ -e 's|@''REPLACE_MBRTOWC''@|$(REPLACE_MBRTOWC)|g' \ -e 's|@''REPLACE_MBRLEN''@|$(REPLACE_MBRLEN)|g' \ -e 's|@''REPLACE_MBSRTOWCS''@|$(REPLACE_MBSRTOWCS)|g' \ -e 's|@''REPLACE_MBSNRTOWCS''@|$(REPLACE_MBSNRTOWCS)|g' \ -e 's|@''REPLACE_WCRTOMB''@|$(REPLACE_WCRTOMB)|g' \ -e 's|@''REPLACE_WCSRTOMBS''@|$(REPLACE_WCSRTOMBS)|g' \ -e 's|@''REPLACE_WCSNRTOMBS''@|$(REPLACE_WCSNRTOMBS)|g' \ -e 's|@''REPLACE_WCWIDTH''@|$(REPLACE_WCWIDTH)|g' \ -e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \ -e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)' \ < $(srcdir)/wchar.in.h; \ } > $@-t && \ mv $@-t $@ MOSTLYCLEANFILES += wchar.h wchar.h-t EXTRA_DIST += wchar.in.h ## end gnulib module wchar ## begin gnulib module wcrtomb EXTRA_DIST += wcrtomb.c EXTRA_libmissing_la_SOURCES += wcrtomb.c ## end gnulib module wcrtomb ## begin gnulib module wctype BUILT_SOURCES += $(WCTYPE_H) # We need the following in order to create when the system # doesn't have one that works with the given compiler. wctype.h: wctype.in.h $(AM_V_GEN)rm -f $@-t $@ && \ { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \ sed -e 's/@''HAVE_WCTYPE_H''@/$(HAVE_WCTYPE_H)/g' \ -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \ -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ -e 's|@''NEXT_WCTYPE_H''@|$(NEXT_WCTYPE_H)|g' \ -e 's/@''HAVE_ISWCNTRL''@/$(HAVE_ISWCNTRL)/g' \ -e 's/@''HAVE_WINT_T''@/$(HAVE_WINT_T)/g' \ -e 's/@''REPLACE_ISWCNTRL''@/$(REPLACE_ISWCNTRL)/g' \ < $(srcdir)/wctype.in.h; \ } > $@-t && \ mv $@-t $@ MOSTLYCLEANFILES += wctype.h wctype.h-t EXTRA_DIST += wctype.in.h ## end gnulib module wctype ## begin gnulib module write EXTRA_DIST += write.c EXTRA_libmissing_la_SOURCES += write.c ## end gnulib module write ## begin gnulib module xsize libmissing_la_SOURCES += xsize.h ## end gnulib module xsize mostlyclean-local: mostlyclean-generic @for dir in '' $(MOSTLYCLEANDIRS); do \ if test -n "$$dir" && test -d $$dir; then \ echo "rmdir $$dir"; rmdir $$dir; \ fi; \ done; \ : libprelude-1.0.0/libmissing/gettext.h0000664000076400007640000002314111341220435014563 00000000000000/* Convenience header for conditional use of GNU . Copyright (C) 1995-1998, 2000-2002, 2004-2006, 2009-2010 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser 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 Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ #ifndef _LIBGETTEXT_H #define _LIBGETTEXT_H 1 /* NLS can be disabled through the configure --disable-nls option. */ #if ENABLE_NLS /* Get declarations of GNU message catalog functions. */ # include /* You can set the DEFAULT_TEXT_DOMAIN macro to specify the domain used by the gettext() and ngettext() macros. This is an alternative to calling textdomain(), and is useful for libraries. */ # ifdef DEFAULT_TEXT_DOMAIN # undef gettext # define gettext(Msgid) \ dgettext (DEFAULT_TEXT_DOMAIN, Msgid) # undef ngettext # define ngettext(Msgid1, Msgid2, N) \ dngettext (DEFAULT_TEXT_DOMAIN, Msgid1, Msgid2, N) # endif #else /* Solaris /usr/include/locale.h includes /usr/include/libintl.h, which chokes if dcgettext is defined as a macro. So include it now, to make later inclusions of a NOP. We don't include as well because people using "gettext.h" will not include , and also including would fail on SunOS 4, whereas is OK. */ #if defined(__sun) # include #endif /* Many header files from the libstdc++ coming with g++ 3.3 or newer include , which chokes if dcgettext is defined as a macro. So include it now, to make later inclusions of a NOP. */ #if defined(__cplusplus) && defined(__GNUG__) && (__GNUC__ >= 3) # include # if (__GLIBC__ >= 2) || _GLIBCXX_HAVE_LIBINTL_H # include # endif #endif /* Disabled NLS. The casts to 'const char *' serve the purpose of producing warnings for invalid uses of the value returned from these functions. On pre-ANSI systems without 'const', the config.h file is supposed to contain "#define const". */ # undef gettext # define gettext(Msgid) ((const char *) (Msgid)) # undef dgettext # define dgettext(Domainname, Msgid) ((void) (Domainname), gettext (Msgid)) # undef dcgettext # define dcgettext(Domainname, Msgid, Category) \ ((void) (Category), dgettext (Domainname, Msgid)) # undef ngettext # define ngettext(Msgid1, Msgid2, N) \ ((N) == 1 \ ? ((void) (Msgid2), (const char *) (Msgid1)) \ : ((void) (Msgid1), (const char *) (Msgid2))) # undef dngettext # define dngettext(Domainname, Msgid1, Msgid2, N) \ ((void) (Domainname), ngettext (Msgid1, Msgid2, N)) # undef dcngettext # define dcngettext(Domainname, Msgid1, Msgid2, N, Category) \ ((void) (Category), dngettext(Domainname, Msgid1, Msgid2, N)) # undef textdomain # define textdomain(Domainname) ((const char *) (Domainname)) # undef bindtextdomain # define bindtextdomain(Domainname, Dirname) \ ((void) (Domainname), (const char *) (Dirname)) # undef bind_textdomain_codeset # define bind_textdomain_codeset(Domainname, Codeset) \ ((void) (Domainname), (const char *) (Codeset)) #endif /* A pseudo function call that serves as a marker for the automated extraction of messages, but does not call gettext(). The run-time translation is done at a different place in the code. The argument, String, should be a literal string. Concatenated strings and other string expressions won't work. The macro's expansion is not parenthesized, so that it is suitable as initializer for static 'char[]' or 'const char[]' variables. */ #define gettext_noop(String) String /* The separator between msgctxt and msgid in a .mo file. */ #define GETTEXT_CONTEXT_GLUE "\004" /* Pseudo function calls, taking a MSGCTXT and a MSGID instead of just a MSGID. MSGCTXT and MSGID must be string literals. MSGCTXT should be short and rarely need to change. The letter 'p' stands for 'particular' or 'special'. */ #ifdef DEFAULT_TEXT_DOMAIN # define pgettext(Msgctxt, Msgid) \ pgettext_aux (DEFAULT_TEXT_DOMAIN, Msgctxt GETTEXT_CONTEXT_GLUE Msgid, Msgid, LC_MESSAGES) #else # define pgettext(Msgctxt, Msgid) \ pgettext_aux (NULL, Msgctxt GETTEXT_CONTEXT_GLUE Msgid, Msgid, LC_MESSAGES) #endif #define dpgettext(Domainname, Msgctxt, Msgid) \ pgettext_aux (Domainname, Msgctxt GETTEXT_CONTEXT_GLUE Msgid, Msgid, LC_MESSAGES) #define dcpgettext(Domainname, Msgctxt, Msgid, Category) \ pgettext_aux (Domainname, Msgctxt GETTEXT_CONTEXT_GLUE Msgid, Msgid, Category) #ifdef DEFAULT_TEXT_DOMAIN # define npgettext(Msgctxt, Msgid, MsgidPlural, N) \ npgettext_aux (DEFAULT_TEXT_DOMAIN, Msgctxt GETTEXT_CONTEXT_GLUE Msgid, Msgid, MsgidPlural, N, LC_MESSAGES) #else # define npgettext(Msgctxt, Msgid, MsgidPlural, N) \ npgettext_aux (NULL, Msgctxt GETTEXT_CONTEXT_GLUE Msgid, Msgid, MsgidPlural, N, LC_MESSAGES) #endif #define dnpgettext(Domainname, Msgctxt, Msgid, MsgidPlural, N) \ npgettext_aux (Domainname, Msgctxt GETTEXT_CONTEXT_GLUE Msgid, Msgid, MsgidPlural, N, LC_MESSAGES) #define dcnpgettext(Domainname, Msgctxt, Msgid, MsgidPlural, N, Category) \ npgettext_aux (Domainname, Msgctxt GETTEXT_CONTEXT_GLUE Msgid, Msgid, MsgidPlural, N, Category) #ifdef __GNUC__ __inline #else #ifdef __cplusplus inline #endif #endif static const char * pgettext_aux (const char *domain, const char *msg_ctxt_id, const char *msgid, int category) { const char *translation = dcgettext (domain, msg_ctxt_id, category); if (translation == msg_ctxt_id) return msgid; else return translation; } #ifdef __GNUC__ __inline #else #ifdef __cplusplus inline #endif #endif static const char * npgettext_aux (const char *domain, const char *msg_ctxt_id, const char *msgid, const char *msgid_plural, unsigned long int n, int category) { const char *translation = dcngettext (domain, msg_ctxt_id, msgid_plural, n, category); if (translation == msg_ctxt_id || translation == msgid_plural) return (n == 1 ? msgid : msgid_plural); else return translation; } /* The same thing extended for non-constant arguments. Here MSGCTXT and MSGID can be arbitrary expressions. But for string literals these macros are less efficient than those above. */ #include #define _LIBGETTEXT_HAVE_VARIABLE_SIZE_ARRAYS \ (((__GNUC__ >= 3 || __GNUG__ >= 2) && !__STRICT_ANSI__) \ /* || __STDC_VERSION__ >= 199901L */ ) #if !_LIBGETTEXT_HAVE_VARIABLE_SIZE_ARRAYS #include #endif #define pgettext_expr(Msgctxt, Msgid) \ dcpgettext_expr (NULL, Msgctxt, Msgid, LC_MESSAGES) #define dpgettext_expr(Domainname, Msgctxt, Msgid) \ dcpgettext_expr (Domainname, Msgctxt, Msgid, LC_MESSAGES) #ifdef __GNUC__ __inline #else #ifdef __cplusplus inline #endif #endif static const char * dcpgettext_expr (const char *domain, const char *msgctxt, const char *msgid, int category) { size_t msgctxt_len = strlen (msgctxt) + 1; size_t msgid_len = strlen (msgid) + 1; const char *translation; #if _LIBGETTEXT_HAVE_VARIABLE_SIZE_ARRAYS char msg_ctxt_id[msgctxt_len + msgid_len]; #else char buf[1024]; char *msg_ctxt_id = (msgctxt_len + msgid_len <= sizeof (buf) ? buf : (char *) malloc (msgctxt_len + msgid_len)); if (msg_ctxt_id != NULL) #endif { memcpy (msg_ctxt_id, msgctxt, msgctxt_len - 1); msg_ctxt_id[msgctxt_len - 1] = '\004'; memcpy (msg_ctxt_id + msgctxt_len, msgid, msgid_len); translation = dcgettext (domain, msg_ctxt_id, category); #if !_LIBGETTEXT_HAVE_VARIABLE_SIZE_ARRAYS if (msg_ctxt_id != buf) free (msg_ctxt_id); #endif if (translation != msg_ctxt_id) return translation; } return msgid; } #define npgettext_expr(Msgctxt, Msgid, MsgidPlural, N) \ dcnpgettext_expr (NULL, Msgctxt, Msgid, MsgidPlural, N, LC_MESSAGES) #define dnpgettext_expr(Domainname, Msgctxt, Msgid, MsgidPlural, N) \ dcnpgettext_expr (Domainname, Msgctxt, Msgid, MsgidPlural, N, LC_MESSAGES) #ifdef __GNUC__ __inline #else #ifdef __cplusplus inline #endif #endif static const char * dcnpgettext_expr (const char *domain, const char *msgctxt, const char *msgid, const char *msgid_plural, unsigned long int n, int category) { size_t msgctxt_len = strlen (msgctxt) + 1; size_t msgid_len = strlen (msgid) + 1; const char *translation; #if _LIBGETTEXT_HAVE_VARIABLE_SIZE_ARRAYS char msg_ctxt_id[msgctxt_len + msgid_len]; #else char buf[1024]; char *msg_ctxt_id = (msgctxt_len + msgid_len <= sizeof (buf) ? buf : (char *) malloc (msgctxt_len + msgid_len)); if (msg_ctxt_id != NULL) #endif { memcpy (msg_ctxt_id, msgctxt, msgctxt_len - 1); msg_ctxt_id[msgctxt_len - 1] = '\004'; memcpy (msg_ctxt_id + msgctxt_len, msgid, msgid_len); translation = dcngettext (domain, msg_ctxt_id, msgid_plural, n, category); #if !_LIBGETTEXT_HAVE_VARIABLE_SIZE_ARRAYS if (msg_ctxt_id != buf) free (msg_ctxt_id); #endif if (!(translation == msg_ctxt_id || translation == msgid_plural)) return translation; } return (n == 1 ? msgid : msgid_plural); } #endif /* _LIBGETTEXT_H */ libprelude-1.0.0/libmissing/poll.c0000664000076400007640000003774211341220437014056 00000000000000/* Emulation for poll(2) Contributed by Paolo Bonzini. Copyright 2001-2003, 2006-2010 Free Software Foundation, Inc. This file is part of gnulib. This program is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser 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 Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ /* Tell gcc not to warn about the (nfd < 0) tests, below. */ #if (__GNUC__ == 4 && 3 <= __GNUC_MINOR__) || 4 < __GNUC__ # pragma GCC diagnostic ignored "-Wtype-limits" #endif #include #include #include #include "poll.h" #include #include #include #if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ # define WIN32_NATIVE # include # include # include # include # include #else # include # include # include # include #endif #ifdef HAVE_SYS_IOCTL_H # include #endif #ifdef HAVE_SYS_FILIO_H # include #endif #include #ifndef INFTIM # define INFTIM (-1) #endif /* BeOS does not have MSG_PEEK. */ #ifndef MSG_PEEK # define MSG_PEEK 0 #endif #ifdef WIN32_NATIVE #define IsConsoleHandle(h) (((long) (h) & 3) == 3) static BOOL IsSocketHandle(HANDLE h) { WSANETWORKEVENTS ev; if (IsConsoleHandle (h)) return FALSE; /* Under Wine, it seems that getsockopt returns 0 for pipes too. WSAEnumNetworkEvents instead distinguishes the two correctly. */ ev.lNetworkEvents = 0xDEADBEEF; WSAEnumNetworkEvents ((SOCKET) h, NULL, &ev); return ev.lNetworkEvents != 0xDEADBEEF; } /* Declare data structures for ntdll functions. */ typedef struct _FILE_PIPE_LOCAL_INFORMATION { ULONG NamedPipeType; ULONG NamedPipeConfiguration; ULONG MaximumInstances; ULONG CurrentInstances; ULONG InboundQuota; ULONG ReadDataAvailable; ULONG OutboundQuota; ULONG WriteQuotaAvailable; ULONG NamedPipeState; ULONG NamedPipeEnd; } FILE_PIPE_LOCAL_INFORMATION, *PFILE_PIPE_LOCAL_INFORMATION; typedef struct _IO_STATUS_BLOCK { union { DWORD Status; PVOID Pointer; } u; ULONG_PTR Information; } IO_STATUS_BLOCK, *PIO_STATUS_BLOCK; typedef enum _FILE_INFORMATION_CLASS { FilePipeLocalInformation = 24 } FILE_INFORMATION_CLASS, *PFILE_INFORMATION_CLASS; typedef DWORD (WINAPI *PNtQueryInformationFile) (HANDLE, IO_STATUS_BLOCK *, VOID *, ULONG, FILE_INFORMATION_CLASS); # ifndef PIPE_BUF # define PIPE_BUF 512 # endif /* Compute revents values for file handle H. If some events cannot happen for the handle, eliminate them from *P_SOUGHT. */ static int win32_compute_revents (HANDLE h, int *p_sought) { int i, ret, happened; INPUT_RECORD *irbuffer; DWORD avail, nbuffer; BOOL bRet; IO_STATUS_BLOCK iosb; FILE_PIPE_LOCAL_INFORMATION fpli; static PNtQueryInformationFile NtQueryInformationFile; static BOOL once_only; switch (GetFileType (h)) { case FILE_TYPE_PIPE: if (!once_only) { NtQueryInformationFile = (PNtQueryInformationFile) GetProcAddress (GetModuleHandle ("ntdll.dll"), "NtQueryInformationFile"); once_only = TRUE; } happened = 0; if (PeekNamedPipe (h, NULL, 0, NULL, &avail, NULL) != 0) { if (avail) happened |= *p_sought & (POLLIN | POLLRDNORM); } else { /* It was the write-end of the pipe. Check if it is writable. If NtQueryInformationFile fails, optimistically assume the pipe is writable. This could happen on Win9x, where NtQueryInformationFile is not available, or if we inherit a pipe that doesn't permit FILE_READ_ATTRIBUTES access on the write end (I think this should not happen since WinXP SP2; WINE seems fine too). Otherwise, ensure that enough space is available for atomic writes. */ memset (&iosb, 0, sizeof (iosb)); memset (&fpli, 0, sizeof (fpli)); if (!NtQueryInformationFile || NtQueryInformationFile (h, &iosb, &fpli, sizeof (fpli), FilePipeLocalInformation) || fpli.WriteQuotaAvailable >= PIPE_BUF || (fpli.OutboundQuota < PIPE_BUF && fpli.WriteQuotaAvailable == fpli.OutboundQuota)) happened |= *p_sought & (POLLOUT | POLLWRNORM | POLLWRBAND); } return happened; case FILE_TYPE_CHAR: ret = WaitForSingleObject (h, 0); if (!IsConsoleHandle (h)) return ret == WAIT_OBJECT_0 ? *p_sought & ~(POLLPRI | POLLRDBAND) : 0; nbuffer = avail = 0; bRet = GetNumberOfConsoleInputEvents (h, &nbuffer); if (bRet) { /* Input buffer. */ *p_sought &= POLLIN | POLLRDNORM; if (nbuffer == 0) return POLLHUP; if (!*p_sought) return 0; irbuffer = (INPUT_RECORD *) alloca (nbuffer * sizeof (INPUT_RECORD)); bRet = PeekConsoleInput (h, irbuffer, nbuffer, &avail); if (!bRet || avail == 0) return POLLHUP; for (i = 0; i < avail; i++) if (irbuffer[i].EventType == KEY_EVENT) return *p_sought; return 0; } else { /* Screen buffer. */ *p_sought &= POLLOUT | POLLWRNORM | POLLWRBAND; return *p_sought; } default: ret = WaitForSingleObject (h, 0); if (ret == WAIT_OBJECT_0) return *p_sought & ~(POLLPRI | POLLRDBAND); return *p_sought & (POLLOUT | POLLWRNORM | POLLWRBAND); } } /* Convert fd_sets returned by select into revents values. */ static int win32_compute_revents_socket (SOCKET h, int sought, long lNetworkEvents) { int happened = 0; if ((lNetworkEvents & (FD_READ | FD_ACCEPT | FD_CLOSE)) == FD_ACCEPT) happened |= (POLLIN | POLLRDNORM) & sought; else if (lNetworkEvents & (FD_READ | FD_ACCEPT | FD_CLOSE)) { int r, error; char data[64]; WSASetLastError (0); r = recv (h, data, sizeof (data), MSG_PEEK); error = WSAGetLastError (); WSASetLastError (0); if (r > 0 || error == WSAENOTCONN) happened |= (POLLIN | POLLRDNORM) & sought; /* Distinguish hung-up sockets from other errors. */ else if (r == 0 || error == WSAESHUTDOWN || error == WSAECONNRESET || error == WSAECONNABORTED || error == WSAENETRESET) happened |= POLLHUP; else happened |= POLLERR; } if (lNetworkEvents & (FD_WRITE | FD_CONNECT)) happened |= (POLLOUT | POLLWRNORM | POLLWRBAND) & sought; if (lNetworkEvents & FD_OOB) happened |= (POLLPRI | POLLRDBAND) & sought; return happened; } #else /* !MinGW */ /* Convert select(2) returned fd_sets into poll(2) revents values. */ static int compute_revents (int fd, int sought, fd_set *rfds, fd_set *wfds, fd_set *efds) { int happened = 0; if (FD_ISSET (fd, rfds)) { int r; int socket_errno; # if defined __MACH__ && defined __APPLE__ /* There is a bug in Mac OS X that causes it to ignore MSG_PEEK for some kinds of descriptors. Detect if this descriptor is a connected socket, a server socket, or something else using a 0-byte recv, and use ioctl(2) to detect POLLHUP. */ r = recv (fd, NULL, 0, MSG_PEEK); socket_errno = (r < 0) ? errno : 0; if (r == 0 || socket_errno == ENOTSOCK) ioctl (fd, FIONREAD, &r); # else char data[64]; r = recv (fd, data, sizeof (data), MSG_PEEK); socket_errno = (r < 0) ? errno : 0; # endif if (r == 0) happened |= POLLHUP; /* If the event happened on an unconnected server socket, that's fine. */ else if (r > 0 || ( /* (r == -1) && */ socket_errno == ENOTCONN)) happened |= (POLLIN | POLLRDNORM) & sought; /* Distinguish hung-up sockets from other errors. */ else if (socket_errno == ESHUTDOWN || socket_errno == ECONNRESET || socket_errno == ECONNABORTED || socket_errno == ENETRESET) happened |= POLLHUP; else happened |= POLLERR; } if (FD_ISSET (fd, wfds)) happened |= (POLLOUT | POLLWRNORM | POLLWRBAND) & sought; if (FD_ISSET (fd, efds)) happened |= (POLLPRI | POLLRDBAND) & sought; return happened; } #endif /* !MinGW */ int poll (pfd, nfd, timeout) struct pollfd *pfd; nfds_t nfd; int timeout; { #ifndef WIN32_NATIVE fd_set rfds, wfds, efds; struct timeval tv; struct timeval *ptv; int maxfd, rc; nfds_t i; # ifdef _SC_OPEN_MAX static int sc_open_max = -1; if (nfd < 0 || (nfd > sc_open_max && (sc_open_max != -1 || nfd > (sc_open_max = sysconf (_SC_OPEN_MAX))))) { errno = EINVAL; return -1; } # else /* !_SC_OPEN_MAX */ # ifdef OPEN_MAX if (nfd < 0 || nfd > OPEN_MAX) { errno = EINVAL; return -1; } # endif /* OPEN_MAX -- else, no check is needed */ # endif /* !_SC_OPEN_MAX */ /* EFAULT is not necessary to implement, but let's do it in the simplest case. */ if (!pfd) { errno = EFAULT; return -1; } /* convert timeout number into a timeval structure */ if (timeout == 0) { ptv = &tv; ptv->tv_sec = 0; ptv->tv_usec = 0; } else if (timeout > 0) { ptv = &tv; ptv->tv_sec = timeout / 1000; ptv->tv_usec = (timeout % 1000) * 1000; } else if (timeout == INFTIM) /* wait forever */ ptv = NULL; else { errno = EINVAL; return -1; } /* create fd sets and determine max fd */ maxfd = -1; FD_ZERO (&rfds); FD_ZERO (&wfds); FD_ZERO (&efds); for (i = 0; i < nfd; i++) { if (pfd[i].fd < 0) continue; if (pfd[i].events & (POLLIN | POLLRDNORM)) FD_SET (pfd[i].fd, &rfds); /* see select(2): "the only exceptional condition detectable is out-of-band data received on a socket", hence we push POLLWRBAND events onto wfds instead of efds. */ if (pfd[i].events & (POLLOUT | POLLWRNORM | POLLWRBAND)) FD_SET (pfd[i].fd, &wfds); if (pfd[i].events & (POLLPRI | POLLRDBAND)) FD_SET (pfd[i].fd, &efds); if (pfd[i].fd >= maxfd && (pfd[i].events & (POLLIN | POLLOUT | POLLPRI | POLLRDNORM | POLLRDBAND | POLLWRNORM | POLLWRBAND))) { maxfd = pfd[i].fd; if (maxfd > FD_SETSIZE) { errno = EOVERFLOW; return -1; } } } /* examine fd sets */ rc = select (maxfd + 1, &rfds, &wfds, &efds, ptv); if (rc < 0) return rc; /* establish results */ rc = 0; for (i = 0; i < nfd; i++) if (pfd[i].fd < 0) pfd[i].revents = 0; else { int happened = compute_revents (pfd[i].fd, pfd[i].events, &rfds, &wfds, &efds); if (happened) { pfd[i].revents = happened; rc++; } } return rc; #else static struct timeval tv0; static HANDLE hEvent; WSANETWORKEVENTS ev; HANDLE h, handle_array[FD_SETSIZE + 2]; DWORD ret, wait_timeout, nhandles; fd_set rfds, wfds, xfds; BOOL poll_again; MSG msg; int rc = 0; nfds_t i; if (nfd < 0 || timeout < -1) { errno = EINVAL; return -1; } if (!hEvent) hEvent = CreateEvent (NULL, FALSE, FALSE, NULL); handle_array[0] = hEvent; nhandles = 1; FD_ZERO (&rfds); FD_ZERO (&wfds); FD_ZERO (&xfds); /* Classify socket handles and create fd sets. */ for (i = 0; i < nfd; i++) { int sought = pfd[i].events; pfd[i].revents = 0; if (pfd[i].fd < 0) continue; if (!(sought & (POLLIN | POLLRDNORM | POLLOUT | POLLWRNORM | POLLWRBAND | POLLPRI | POLLRDBAND))) continue; h = (HANDLE) _get_osfhandle (pfd[i].fd); assert (h != NULL); if (IsSocketHandle (h)) { int requested = FD_CLOSE; /* see above; socket handles are mapped onto select. */ if (sought & (POLLIN | POLLRDNORM)) { requested |= FD_READ | FD_ACCEPT; FD_SET ((SOCKET) h, &rfds); } if (sought & (POLLOUT | POLLWRNORM | POLLWRBAND)) { requested |= FD_WRITE | FD_CONNECT; FD_SET ((SOCKET) h, &wfds); } if (sought & (POLLPRI | POLLRDBAND)) { requested |= FD_OOB; FD_SET ((SOCKET) h, &xfds); } if (requested) WSAEventSelect ((SOCKET) h, hEvent, requested); } else { /* Poll now. If we get an event, do not poll again. Also, screen buffer handles are waitable, and they'll block until a character is available. win32_compute_revents eliminates bits for the "wrong" direction. */ pfd[i].revents = win32_compute_revents (h, &sought); if (sought) handle_array[nhandles++] = h; if (pfd[i].revents) wait_timeout = 0; } } if (select (0, &rfds, &wfds, &xfds, &tv0) > 0) { /* Do MsgWaitForMultipleObjects anyway to dispatch messages, but no need to call select again. */ poll_again = FALSE; wait_timeout = 0; } else { poll_again = TRUE; if (timeout == INFTIM) wait_timeout = INFINITE; else wait_timeout = timeout; } for (;;) { ret = MsgWaitForMultipleObjects (nhandles, handle_array, FALSE, wait_timeout, QS_ALLINPUT); if (ret == WAIT_OBJECT_0 + nhandles) { /* new input of some other kind */ BOOL bRet; while ((bRet = PeekMessage (&msg, NULL, 0, 0, PM_REMOVE)) != 0) { TranslateMessage (&msg); DispatchMessage (&msg); } } else break; } if (poll_again) select (0, &rfds, &wfds, &xfds, &tv0); /* Place a sentinel at the end of the array. */ handle_array[nhandles] = NULL; nhandles = 1; for (i = 0; i < nfd; i++) { int happened; if (pfd[i].fd < 0) continue; if (!(pfd[i].events & (POLLIN | POLLRDNORM | POLLOUT | POLLWRNORM | POLLWRBAND))) continue; h = (HANDLE) _get_osfhandle (pfd[i].fd); if (h != handle_array[nhandles]) { /* It's a socket. */ WSAEnumNetworkEvents ((SOCKET) h, NULL, &ev); WSAEventSelect ((SOCKET) h, 0, 0); /* If we're lucky, WSAEnumNetworkEvents already provided a way to distinguish FD_READ and FD_ACCEPT; this saves a recv later. */ if (FD_ISSET ((SOCKET) h, &rfds) && !(ev.lNetworkEvents & (FD_READ | FD_ACCEPT))) ev.lNetworkEvents |= FD_READ | FD_ACCEPT; if (FD_ISSET ((SOCKET) h, &wfds)) ev.lNetworkEvents |= FD_WRITE | FD_CONNECT; if (FD_ISSET ((SOCKET) h, &xfds)) ev.lNetworkEvents |= FD_OOB; happened = win32_compute_revents_socket ((SOCKET) h, pfd[i].events, ev.lNetworkEvents); } else { /* Not a socket. */ int sought = pfd[i].events; happened = win32_compute_revents (h, &sought); nhandles++; } if ((pfd[i].revents |= happened) != 0) rc++; } return rc; #endif } libprelude-1.0.0/libmissing/langinfo.in.h0000664000076400007640000001102211341220435015274 00000000000000/* Substitute for and wrapper around . Copyright (C) 2009, 2010 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser 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 Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ /* * POSIX for platforms that lack it or have an incomplete one. * */ #ifndef _GL_LANGINFO_H #if __GNUC__ >= 3 @PRAGMA_SYSTEM_HEADER@ #endif /* The include_next requires a split double-inclusion guard. */ #if @HAVE_LANGINFO_H@ # @INCLUDE_NEXT@ @NEXT_LANGINFO_H@ #endif #ifndef _GL_LANGINFO_H #define _GL_LANGINFO_H #if !@HAVE_LANGINFO_H@ /* A platform that lacks . */ /* Assume that it also lacks and the nl_item type. */ typedef int nl_item; /* nl_langinfo items of the LC_CTYPE category */ # define CODESET 10000 /* nl_langinfo items of the LC_NUMERIC category */ # define RADIXCHAR 10001 # define THOUSEP 10002 /* nl_langinfo items of the LC_TIME category */ # define D_T_FMT 10003 # define D_FMT 10004 # define T_FMT 10005 # define T_FMT_AMPM 10006 # define AM_STR 10007 # define PM_STR 10008 # define DAY_1 10009 # define DAY_2 (DAY_1 + 1) # define DAY_3 (DAY_1 + 2) # define DAY_4 (DAY_1 + 3) # define DAY_5 (DAY_1 + 4) # define DAY_6 (DAY_1 + 5) # define DAY_7 (DAY_1 + 6) # define ABDAY_1 10016 # define ABDAY_2 (ABDAY_1 + 1) # define ABDAY_3 (ABDAY_1 + 2) # define ABDAY_4 (ABDAY_1 + 3) # define ABDAY_5 (ABDAY_1 + 4) # define ABDAY_6 (ABDAY_1 + 5) # define ABDAY_7 (ABDAY_1 + 6) # define MON_1 10023 # define MON_2 (MON_1 + 1) # define MON_3 (MON_1 + 2) # define MON_4 (MON_1 + 3) # define MON_5 (MON_1 + 4) # define MON_6 (MON_1 + 5) # define MON_7 (MON_1 + 6) # define MON_8 (MON_1 + 7) # define MON_9 (MON_1 + 8) # define MON_10 (MON_1 + 9) # define MON_11 (MON_1 + 10) # define MON_12 (MON_1 + 11) # define ABMON_1 10035 # define ABMON_2 (ABMON_1 + 1) # define ABMON_3 (ABMON_1 + 2) # define ABMON_4 (ABMON_1 + 3) # define ABMON_5 (ABMON_1 + 4) # define ABMON_6 (ABMON_1 + 5) # define ABMON_7 (ABMON_1 + 6) # define ABMON_8 (ABMON_1 + 7) # define ABMON_9 (ABMON_1 + 8) # define ABMON_10 (ABMON_1 + 9) # define ABMON_11 (ABMON_1 + 10) # define ABMON_12 (ABMON_1 + 11) # define ERA 10047 # define ERA_D_FMT 10048 # define ERA_D_T_FMT 10049 # define ERA_T_FMT 10050 # define ALT_DIGITS 10051 /* nl_langinfo items of the LC_MONETARY category */ # define CRNCYSTR 10052 /* nl_langinfo items of the LC_MESSAGES category */ # define YESEXPR 10053 # define NOEXPR 10054 #else /* A platform that has . */ # if !@HAVE_LANGINFO_CODESET@ # define CODESET 10000 # define GNULIB_defined_CODESET 1 # endif # if !@HAVE_LANGINFO_ERA@ # define ERA 10047 # define ERA_D_FMT 10048 # define ERA_D_T_FMT 10049 # define ERA_T_FMT 10050 # define ALT_DIGITS 10051 # define GNULIB_defined_ERA 1 # endif #endif /* The definition of _GL_WARN_ON_USE is copied here. */ /* Declare overridden functions. */ #ifdef __cplusplus extern "C" { #endif /* Return a piece of locale dependent information. Note: The difference between nl_langinfo (CODESET) and locale_charset () is that the latter normalizes the encoding names to GNU conventions. */ #if @GNULIB_NL_LANGINFO@ # if @REPLACE_NL_LANGINFO@ # undef nl_langinfo # define nl_langinfo rpl_nl_langinfo # endif # if !@HAVE_NL_LANGINFO@ || @REPLACE_NL_LANGINFO@ extern char *nl_langinfo (nl_item item); # endif #elif defined GNULIB_POSIXCHECK # undef nl_langinfo # if HAVE_RAW_DECL_NL_LANGINFO _GL_WARN_ON_USE (nl_langinfo, "nl_langinfo is not portable - " "use gnulib module nl_langinfo for portability"); # endif #endif #ifdef __cplusplus } #endif #endif /* _GL_LANGINFO_H */ #endif /* _GL_LANGINFO_H */ libprelude-1.0.0/libmissing/strnlen.c0000664000076400007640000000233211341220440014552 00000000000000/* Find the length of STRING, but scan at most MAXLEN characters. Copyright (C) 2005, 2006, 2007, 2009, 2010 Free Software Foundation, Inc. Written by Simon Josefsson. This program is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser 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 Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ #include #include /* Find the length of STRING, but scan at most MAXLEN characters. If no '\0' terminator is found in that many characters, return MAXLEN. */ size_t strnlen (const char *string, size_t maxlen) { const char *end = memchr (string, '\0', maxlen); return end ? (size_t) (end - string) : maxlen; } libprelude-1.0.0/libmissing/w32sock.h0000664000076400007640000000336311341220442014374 00000000000000/* w32sock.h --- internal auxilliary functions for Windows socket functions Copyright (C) 2008, 2009, 2010 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 3 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 Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . */ /* Written by Paolo Bonzini */ #include /* Get O_RDWR and O_BINARY. */ #include /* Get _get_osfhandle() and _open_osfhandle(). */ #include #define FD_TO_SOCKET(fd) ((SOCKET) _get_osfhandle ((fd))) #define SOCKET_TO_FD(fh) (_open_osfhandle ((long) (fh), O_RDWR | O_BINARY)) static inline void set_winsock_errno (void) { int err = WSAGetLastError (); /* Map some WSAE* errors to the runtime library's error codes. */ switch (err) { case WSA_INVALID_HANDLE: errno = EBADF; break; case WSA_NOT_ENOUGH_MEMORY: errno = ENOMEM; break; case WSA_INVALID_PARAMETER: errno = EINVAL; break; case WSAEWOULDBLOCK: errno = EWOULDBLOCK; break; case WSAENAMETOOLONG: errno = ENAMETOOLONG; break; case WSAENOTEMPTY: errno = ENOTEMPTY; break; default: errno = (err > 10000 && err < 10025) ? err - 10000 : err; break; } } libprelude-1.0.0/libmissing/stdio-impl.h0000664000076400007640000000711311341220440015155 00000000000000/* Implementation details of FILE streams. Copyright (C) 2007-2010 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 3 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 Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . */ /* Many stdio implementations have the same logic and therefore can share the same implementation of stdio extension API, except that some fields have different naming conventions, or their access requires some casts. */ /* BSD stdio derived implementations. */ #if defined __sferror || defined __DragonFly__ /* FreeBSD, NetBSD, OpenBSD, DragonFly, MacOS X, Cygwin */ # if defined __DragonFly__ /* DragonFly */ /* See . */ # define fp_ ((struct { struct __FILE_public pub; \ struct { unsigned char *_base; int _size; } _bf; \ void *cookie; \ void *_close; \ void *_read; \ void *_seek; \ void *_write; \ struct { unsigned char *_base; int _size; } _ub; \ int _ur; \ unsigned char _ubuf[3]; \ unsigned char _nbuf[1]; \ struct { unsigned char *_base; int _size; } _lb; \ int _blksize; \ fpos_t _offset; \ /* More fields, not relevant here. */ \ } *) fp) /* See . */ # define _p pub._p # define _flags pub._flags # define _r pub._r # define _w pub._w # else # define fp_ fp # endif # if defined __NetBSD__ || defined __OpenBSD__ /* NetBSD, OpenBSD */ /* See and */ struct __sfileext { struct __sbuf _ub; /* ungetc buffer */ /* More fields, not relevant here. */ }; # define fp_ub ((struct __sfileext *) fp->_ext._base)->_ub # else /* FreeBSD, DragonFly, MacOS X, Cygwin */ # define fp_ub fp_->_ub # endif # define HASUB(fp) (fp_ub._base != NULL) #endif /* SystemV derived implementations. */ #if defined _IOERR # if defined __sun && defined _LP64 /* Solaris/{SPARC,AMD64} 64-bit */ # define fp_ ((struct { unsigned char *_ptr; \ unsigned char *_base; \ unsigned char *_end; \ long _cnt; \ int _file; \ unsigned int _flag; \ } *) fp) # else # define fp_ fp # endif # if defined _SCO_DS /* OpenServer */ # define _cnt __cnt # define _ptr __ptr # define _base __base # define _flag __flag # endif #endif libprelude-1.0.0/libmissing/stddef.in.h0000664000076400007640000000522411341220440014753 00000000000000/* A substitute for POSIX 2008 , for platforms that have issues. Copyright (C) 2009, 2010 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser 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 Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ /* Written by Eric Blake. */ /* * POSIX 2008 for platforms that have issues. * */ #if __GNUC__ >= 3 @PRAGMA_SYSTEM_HEADER@ #endif #if defined __need_wchar_t || defined __need_size_t \ || defined __need_ptrdiff_t || defined __need_NULL \ || defined __need_wint_t /* Special invocation convention inside gcc header files. In particular, gcc provides a version of that blindly redefines NULL even when __need_wint_t was defined, even though wint_t is not normally provided by . Hence, we must remember if special invocation has ever been used to obtain wint_t, in which case we need to clean up NULL yet again. */ # if !(defined _GL_STDDEF_H && defined _GL_STDDEF_WINT_T) # ifdef __need_wint_t # undef _GL_STDDEF_H # define _GL_STDDEF_WINT_T # endif # @INCLUDE_NEXT@ @NEXT_STDDEF_H@ # endif #else /* Normal invocation convention. */ # ifndef _GL_STDDEF_H /* The include_next requires a split double-inclusion guard. */ # @INCLUDE_NEXT@ @NEXT_STDDEF_H@ # ifndef _GL_STDDEF_H # define _GL_STDDEF_H /* On NetBSD 5.0, the definition of NULL lacks proper parentheses. */ #if @REPLACE_NULL@ # undef NULL # ifdef __cplusplus /* ISO C++ says that the macro NULL must expand to an integer constant expression, hence '((void *) 0)' is not allowed in C++. */ # if __GNUG__ >= 3 /* GNU C++ has a __null macro that behaves like an integer ('int' or 'long') but has the same size as a pointer. Use that, to avoid warnings. */ # define NULL __null # else # define NULL 0L # endif # else # define NULL ((void *) 0) # endif #endif /* Some platforms lack wchar_t. */ #if !@HAVE_WCHAR_T@ # define wchar_t int #endif # endif /* _GL_STDDEF_H */ # endif /* _GL_STDDEF_H */ #endif /* __need_XXX */ libprelude-1.0.0/libmissing/vasnprintf.c0000664000076400007640000066014111341220442015271 00000000000000/* vsprintf with automatic memory allocation. Copyright (C) 1999, 2002-2010 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser 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 Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ /* This file can be parametrized with the following macros: VASNPRINTF The name of the function being defined. FCHAR_T The element type of the format string. DCHAR_T The element type of the destination (result) string. FCHAR_T_ONLY_ASCII Set to 1 to enable verification that all characters in the format string are ASCII. MUST be set if FCHAR_T and DCHAR_T are not the same type. DIRECTIVE Structure denoting a format directive. Depends on FCHAR_T. DIRECTIVES Structure denoting the set of format directives of a format string. Depends on FCHAR_T. PRINTF_PARSE Function that parses a format string. Depends on FCHAR_T. DCHAR_CPY memcpy like function for DCHAR_T[] arrays. DCHAR_SET memset like function for DCHAR_T[] arrays. DCHAR_MBSNLEN mbsnlen like function for DCHAR_T[] arrays. SNPRINTF The system's snprintf (or similar) function. This may be either snprintf or swprintf. TCHAR_T The element type of the argument and result string of the said SNPRINTF function. This may be either char or wchar_t. The code exploits that sizeof (TCHAR_T) | sizeof (DCHAR_T) and alignof (TCHAR_T) <= alignof (DCHAR_T). DCHAR_IS_TCHAR Set to 1 if DCHAR_T and TCHAR_T are the same type. DCHAR_CONV_FROM_ENCODING A function to convert from char[] to DCHAR[]. DCHAR_IS_UINT8_T Set to 1 if DCHAR_T is uint8_t. DCHAR_IS_UINT16_T Set to 1 if DCHAR_T is uint16_t. DCHAR_IS_UINT32_T Set to 1 if DCHAR_T is uint32_t. */ /* Tell glibc's to provide a prototype for snprintf(). This must come before because may include , and once has been included, it's too late. */ #ifndef _GNU_SOURCE # define _GNU_SOURCE 1 #endif #ifndef VASNPRINTF # include #endif #ifndef IN_LIBINTL # include #endif /* Specification. */ #ifndef VASNPRINTF # if WIDE_CHAR_VERSION # include "vasnwprintf.h" # else # include "vasnprintf.h" # endif #endif #include /* localeconv() */ #include /* snprintf(), sprintf() */ #include /* abort(), malloc(), realloc(), free() */ #include /* memcpy(), strlen() */ #include /* errno */ #include /* CHAR_BIT */ #include /* DBL_MAX_EXP, LDBL_MAX_EXP */ #if HAVE_NL_LANGINFO # include #endif #ifndef VASNPRINTF # if WIDE_CHAR_VERSION # include "wprintf-parse.h" # else # include "printf-parse.h" # endif #endif /* Checked size_t computations. */ #include "xsize.h" #if (NEED_PRINTF_DOUBLE || NEED_PRINTF_LONG_DOUBLE) && !defined IN_LIBINTL # include # include "float+.h" #endif #if (NEED_PRINTF_DOUBLE || NEED_PRINTF_INFINITE_DOUBLE) && !defined IN_LIBINTL # include # include "isnand-nolibm.h" #endif #if (NEED_PRINTF_LONG_DOUBLE || NEED_PRINTF_INFINITE_LONG_DOUBLE) && !defined IN_LIBINTL # include # include "isnanl-nolibm.h" # include "fpucw.h" #endif #if (NEED_PRINTF_DIRECTIVE_A || NEED_PRINTF_DOUBLE) && !defined IN_LIBINTL # include # include "isnand-nolibm.h" # include "printf-frexp.h" #endif #if (NEED_PRINTF_DIRECTIVE_A || NEED_PRINTF_LONG_DOUBLE) && !defined IN_LIBINTL # include # include "isnanl-nolibm.h" # include "printf-frexpl.h" # include "fpucw.h" #endif /* Default parameters. */ #ifndef VASNPRINTF # if WIDE_CHAR_VERSION # define VASNPRINTF vasnwprintf # define FCHAR_T wchar_t # define DCHAR_T wchar_t # define TCHAR_T wchar_t # define DCHAR_IS_TCHAR 1 # define DIRECTIVE wchar_t_directive # define DIRECTIVES wchar_t_directives # define PRINTF_PARSE wprintf_parse # define DCHAR_CPY wmemcpy # define DCHAR_SET wmemset # else # define VASNPRINTF vasnprintf # define FCHAR_T char # define DCHAR_T char # define TCHAR_T char # define DCHAR_IS_TCHAR 1 # define DIRECTIVE char_directive # define DIRECTIVES char_directives # define PRINTF_PARSE printf_parse # define DCHAR_CPY memcpy # define DCHAR_SET memset # endif #endif #if WIDE_CHAR_VERSION /* TCHAR_T is wchar_t. */ # define USE_SNPRINTF 1 # if HAVE_DECL__SNWPRINTF /* On Windows, the function swprintf() has a different signature than on Unix; we use the _snwprintf() function instead. */ # define SNPRINTF _snwprintf # else /* Unix. */ # define SNPRINTF swprintf # endif #else /* TCHAR_T is char. */ /* Use snprintf if it exists under the name 'snprintf' or '_snprintf'. But don't use it on BeOS, since BeOS snprintf produces no output if the size argument is >= 0x3000000. Also don't use it on Linux libc5, since there snprintf with size = 1 writes any output without bounds, like sprintf. */ # if (HAVE_DECL__SNPRINTF || HAVE_SNPRINTF) && !defined __BEOS__ && !(__GNU_LIBRARY__ == 1) # define USE_SNPRINTF 1 # else # define USE_SNPRINTF 0 # endif # if HAVE_DECL__SNPRINTF /* Windows. */ # define SNPRINTF _snprintf # else /* Unix. */ # define SNPRINTF snprintf /* Here we need to call the native snprintf, not rpl_snprintf. */ # undef snprintf # endif #endif /* Here we need to call the native sprintf, not rpl_sprintf. */ #undef sprintf /* GCC >= 4.0 with -Wall emits unjustified "... may be used uninitialized" warnings in this file. Use -Dlint to suppress them. */ #ifdef lint # define IF_LINT(Code) Code #else # define IF_LINT(Code) /* empty */ #endif /* Avoid some warnings from "gcc -Wshadow". This file doesn't use the exp() and remainder() functions. */ #undef exp #define exp expo #undef remainder #define remainder rem #if !USE_SNPRINTF && !WIDE_CHAR_VERSION # if (HAVE_STRNLEN && !defined _AIX) # define local_strnlen strnlen # else # ifndef local_strnlen_defined # define local_strnlen_defined 1 static size_t local_strnlen (const char *string, size_t maxlen) { const char *end = memchr (string, '\0', maxlen); return end ? (size_t) (end - string) : maxlen; } # endif # endif #endif #if (!USE_SNPRINTF || (NEED_PRINTF_DIRECTIVE_LS && !defined IN_LIBINTL)) && HAVE_WCHAR_T && (WIDE_CHAR_VERSION || DCHAR_IS_TCHAR) # if HAVE_WCSLEN # define local_wcslen wcslen # else /* Solaris 2.5.1 has wcslen() in a separate library libw.so. To avoid a dependency towards this library, here is a local substitute. Define this substitute only once, even if this file is included twice in the same compilation unit. */ # ifndef local_wcslen_defined # define local_wcslen_defined 1 static size_t local_wcslen (const wchar_t *s) { const wchar_t *ptr; for (ptr = s; *ptr != (wchar_t) 0; ptr++) ; return ptr - s; } # endif # endif #endif #if !USE_SNPRINTF && HAVE_WCHAR_T && WIDE_CHAR_VERSION # if HAVE_WCSNLEN # define local_wcsnlen wcsnlen # else # ifndef local_wcsnlen_defined # define local_wcsnlen_defined 1 static size_t local_wcsnlen (const wchar_t *s, size_t maxlen) { const wchar_t *ptr; for (ptr = s; maxlen > 0 && *ptr != (wchar_t) 0; ptr++, maxlen--) ; return ptr - s; } # endif # endif #endif #if (NEED_PRINTF_DIRECTIVE_A || NEED_PRINTF_LONG_DOUBLE || NEED_PRINTF_INFINITE_LONG_DOUBLE || NEED_PRINTF_DOUBLE || NEED_PRINTF_INFINITE_DOUBLE) && !defined IN_LIBINTL /* Determine the decimal-point character according to the current locale. */ # ifndef decimal_point_char_defined # define decimal_point_char_defined 1 static char decimal_point_char (void) { const char *point; /* Determine it in a multithread-safe way. We know nl_langinfo is multithread-safe on glibc systems and MacOS X systems, but is not required to be multithread-safe by POSIX. sprintf(), however, is multithread-safe. localeconv() is rarely multithread-safe. */ # if HAVE_NL_LANGINFO && (__GLIBC__ || (defined __APPLE__ && defined __MACH__)) point = nl_langinfo (RADIXCHAR); # elif 1 char pointbuf[5]; sprintf (pointbuf, "%#.0f", 1.0); point = &pointbuf[1]; # else point = localeconv () -> decimal_point; # endif /* The decimal point is always a single byte: either '.' or ','. */ return (point[0] != '\0' ? point[0] : '.'); } # endif #endif #if NEED_PRINTF_INFINITE_DOUBLE && !NEED_PRINTF_DOUBLE && !defined IN_LIBINTL /* Equivalent to !isfinite(x) || x == 0, but does not require libm. */ static int is_infinite_or_zero (double x) { return isnand (x) || x + x == x; } #endif #if NEED_PRINTF_INFINITE_LONG_DOUBLE && !NEED_PRINTF_LONG_DOUBLE && !defined IN_LIBINTL /* Equivalent to !isfinite(x) || x == 0, but does not require libm. */ static int is_infinite_or_zerol (long double x) { return isnanl (x) || x + x == x; } #endif #if (NEED_PRINTF_LONG_DOUBLE || NEED_PRINTF_DOUBLE) && !defined IN_LIBINTL /* Converting 'long double' to decimal without rare rounding bugs requires real bignums. We use the naming conventions of GNU gmp, but vastly simpler (and slower) algorithms. */ typedef unsigned int mp_limb_t; # define GMP_LIMB_BITS 32 typedef int mp_limb_verify[2 * (sizeof (mp_limb_t) * CHAR_BIT == GMP_LIMB_BITS) - 1]; typedef unsigned long long mp_twolimb_t; # define GMP_TWOLIMB_BITS 64 typedef int mp_twolimb_verify[2 * (sizeof (mp_twolimb_t) * CHAR_BIT == GMP_TWOLIMB_BITS) - 1]; /* Representation of a bignum >= 0. */ typedef struct { size_t nlimbs; mp_limb_t *limbs; /* Bits in little-endian order, allocated with malloc(). */ } mpn_t; /* Compute the product of two bignums >= 0. Return the allocated memory in case of success, NULL in case of memory allocation failure. */ static void * multiply (mpn_t src1, mpn_t src2, mpn_t *dest) { const mp_limb_t *p1; const mp_limb_t *p2; size_t len1; size_t len2; if (src1.nlimbs <= src2.nlimbs) { len1 = src1.nlimbs; p1 = src1.limbs; len2 = src2.nlimbs; p2 = src2.limbs; } else { len1 = src2.nlimbs; p1 = src2.limbs; len2 = src1.nlimbs; p2 = src1.limbs; } /* Now 0 <= len1 <= len2. */ if (len1 == 0) { /* src1 or src2 is zero. */ dest->nlimbs = 0; dest->limbs = (mp_limb_t *) malloc (1); } else { /* Here 1 <= len1 <= len2. */ size_t dlen; mp_limb_t *dp; size_t k, i, j; dlen = len1 + len2; dp = (mp_limb_t *) malloc (dlen * sizeof (mp_limb_t)); if (dp == NULL) return NULL; for (k = len2; k > 0; ) dp[--k] = 0; for (i = 0; i < len1; i++) { mp_limb_t digit1 = p1[i]; mp_twolimb_t carry = 0; for (j = 0; j < len2; j++) { mp_limb_t digit2 = p2[j]; carry += (mp_twolimb_t) digit1 * (mp_twolimb_t) digit2; carry += dp[i + j]; dp[i + j] = (mp_limb_t) carry; carry = carry >> GMP_LIMB_BITS; } dp[i + len2] = (mp_limb_t) carry; } /* Normalise. */ while (dlen > 0 && dp[dlen - 1] == 0) dlen--; dest->nlimbs = dlen; dest->limbs = dp; } return dest->limbs; } /* Compute the quotient of a bignum a >= 0 and a bignum b > 0. a is written as a = q * b + r with 0 <= r < b. q is the quotient, r the remainder. Finally, round-to-even is performed: If r > b/2 or if r = b/2 and q is odd, q is incremented. Return the allocated memory in case of success, NULL in case of memory allocation failure. */ static void * divide (mpn_t a, mpn_t b, mpn_t *q) { /* Algorithm: First normalise a and b: a=[a[m-1],...,a[0]], b=[b[n-1],...,b[0]] with m>=0 and n>0 (in base beta = 2^GMP_LIMB_BITS). If m=n=1, perform a single-precision division: r:=0, j:=m, while j>0 do {Here (q[m-1]*beta^(m-1)+...+q[j]*beta^j) * b[0] + r*beta^j = = a[m-1]*beta^(m-1)+...+a[j]*beta^j und 0<=r=n>1, perform a multiple-precision division: We have a/b < beta^(m-n+1). s:=intDsize-1-(highest bit in b[n-1]), 0<=s=beta/2. For j=m-n,...,0: {Here 0 <= r < b*beta^(j+1).} Compute q* : q* := floor((r[j+n]*beta+r[j+n-1])/b[n-1]). In case of overflow (q* >= beta) set q* := beta-1. Compute c2 := ((r[j+n]*beta+r[j+n-1]) - q* * b[n-1])*beta + r[j+n-2] and c3 := b[n-2] * q*. {We have 0 <= c2 < 2*beta^2, even 0 <= c2 < beta^2 if no overflow occurred. Furthermore 0 <= c3 < beta^2. If there was overflow and r[j+n]*beta+r[j+n-1] - q* * b[n-1] >= beta, i.e. c2 >= beta^2, the next test can be skipped.} While c3 > c2, {Here 0 <= c2 < c3 < beta^2} Put q* := q* - 1, c2 := c2 + b[n-1]*beta, c3 := c3 - b[n-2]. If q* > 0: Put r := r - b * q* * beta^j. In detail: [r[n+j],...,r[j]] := [r[n+j],...,r[j]] - q* * [b[n-1],...,b[0]]. hence: u:=0, for i:=0 to n-1 do u := u + q* * b[i], r[j+i]:=r[j+i]-(u mod beta) (+ beta, if carry), u:=u div beta (+ 1, if carry in subtraction) r[n+j]:=r[n+j]-u. {Since always u = (q* * [b[i-1],...,b[0]] div beta^i) + 1 < q* + 1 <= beta, the carry u does not overflow.} If a negative carry occurs, put q* := q* - 1 and [r[n+j],...,r[j]] := [r[n+j],...,r[j]] + [0,b[n-1],...,b[0]]. Set q[j] := q*. Normalise [q[m-n],..,q[0]]; this yields the quotient q. Shift [r[n-1],...,r[0]] right by s bits and normalise; this yields the rest r. The room for q[j] can be allocated at the memory location of r[n+j]. Finally, round-to-even: Shift r left by 1 bit. If r > b or if r = b and q[0] is odd, q := q+1. */ const mp_limb_t *a_ptr = a.limbs; size_t a_len = a.nlimbs; const mp_limb_t *b_ptr = b.limbs; size_t b_len = b.nlimbs; mp_limb_t *roomptr; mp_limb_t *tmp_roomptr = NULL; mp_limb_t *q_ptr; size_t q_len; mp_limb_t *r_ptr; size_t r_len; /* Allocate room for a_len+2 digits. (Need a_len+1 digits for the real division and 1 more digit for the final rounding of q.) */ roomptr = (mp_limb_t *) malloc ((a_len + 2) * sizeof (mp_limb_t)); if (roomptr == NULL) return NULL; /* Normalise a. */ while (a_len > 0 && a_ptr[a_len - 1] == 0) a_len--; /* Normalise b. */ for (;;) { if (b_len == 0) /* Division by zero. */ abort (); if (b_ptr[b_len - 1] == 0) b_len--; else break; } /* Here m = a_len >= 0 and n = b_len > 0. */ if (a_len < b_len) { /* m beta^(m-2) <= a/b < beta^m */ r_ptr = roomptr; q_ptr = roomptr + 1; { mp_limb_t den = b_ptr[0]; mp_limb_t remainder = 0; const mp_limb_t *sourceptr = a_ptr + a_len; mp_limb_t *destptr = q_ptr + a_len; size_t count; for (count = a_len; count > 0; count--) { mp_twolimb_t num = ((mp_twolimb_t) remainder << GMP_LIMB_BITS) | *--sourceptr; *--destptr = num / den; remainder = num % den; } /* Normalise and store r. */ if (remainder > 0) { r_ptr[0] = remainder; r_len = 1; } else r_len = 0; /* Normalise q. */ q_len = a_len; if (q_ptr[q_len - 1] == 0) q_len--; } } else { /* n>1: multiple precision division. beta^(m-1) <= a < beta^m, beta^(n-1) <= b < beta^n ==> beta^(m-n-1) <= a/b < beta^(m-n+1). */ /* Determine s. */ size_t s; { mp_limb_t msd = b_ptr[b_len - 1]; /* = b[n-1], > 0 */ s = 31; if (msd >= 0x10000) { msd = msd >> 16; s -= 16; } if (msd >= 0x100) { msd = msd >> 8; s -= 8; } if (msd >= 0x10) { msd = msd >> 4; s -= 4; } if (msd >= 0x4) { msd = msd >> 2; s -= 2; } if (msd >= 0x2) { msd = msd >> 1; s -= 1; } } /* 0 <= s < GMP_LIMB_BITS. Copy b, shifting it left by s bits. */ if (s > 0) { tmp_roomptr = (mp_limb_t *) malloc (b_len * sizeof (mp_limb_t)); if (tmp_roomptr == NULL) { free (roomptr); return NULL; } { const mp_limb_t *sourceptr = b_ptr; mp_limb_t *destptr = tmp_roomptr; mp_twolimb_t accu = 0; size_t count; for (count = b_len; count > 0; count--) { accu += (mp_twolimb_t) *sourceptr++ << s; *destptr++ = (mp_limb_t) accu; accu = accu >> GMP_LIMB_BITS; } /* accu must be zero, since that was how s was determined. */ if (accu != 0) abort (); } b_ptr = tmp_roomptr; } /* Copy a, shifting it left by s bits, yields r. Memory layout: At the beginning: r = roomptr[0..a_len], at the end: r = roomptr[0..b_len-1], q = roomptr[b_len..a_len] */ r_ptr = roomptr; if (s == 0) { memcpy (r_ptr, a_ptr, a_len * sizeof (mp_limb_t)); r_ptr[a_len] = 0; } else { const mp_limb_t *sourceptr = a_ptr; mp_limb_t *destptr = r_ptr; mp_twolimb_t accu = 0; size_t count; for (count = a_len; count > 0; count--) { accu += (mp_twolimb_t) *sourceptr++ << s; *destptr++ = (mp_limb_t) accu; accu = accu >> GMP_LIMB_BITS; } *destptr++ = (mp_limb_t) accu; } q_ptr = roomptr + b_len; q_len = a_len - b_len + 1; /* q will have m-n+1 limbs */ { size_t j = a_len - b_len; /* m-n */ mp_limb_t b_msd = b_ptr[b_len - 1]; /* b[n-1] */ mp_limb_t b_2msd = b_ptr[b_len - 2]; /* b[n-2] */ mp_twolimb_t b_msdd = /* b[n-1]*beta+b[n-2] */ ((mp_twolimb_t) b_msd << GMP_LIMB_BITS) | b_2msd; /* Division loop, traversed m-n+1 times. j counts down, b is unchanged, beta/2 <= b[n-1] < beta. */ for (;;) { mp_limb_t q_star; mp_limb_t c1; if (r_ptr[j + b_len] < b_msd) /* r[j+n] < b[n-1] ? */ { /* Divide r[j+n]*beta+r[j+n-1] by b[n-1], no overflow. */ mp_twolimb_t num = ((mp_twolimb_t) r_ptr[j + b_len] << GMP_LIMB_BITS) | r_ptr[j + b_len - 1]; q_star = num / b_msd; c1 = num % b_msd; } else { /* Overflow, hence r[j+n]*beta+r[j+n-1] >= beta*b[n-1]. */ q_star = (mp_limb_t)~(mp_limb_t)0; /* q* = beta-1 */ /* Test whether r[j+n]*beta+r[j+n-1] - (beta-1)*b[n-1] >= beta <==> r[j+n]*beta+r[j+n-1] + b[n-1] >= beta*b[n-1]+beta <==> b[n-1] < floor((r[j+n]*beta+r[j+n-1]+b[n-1])/beta) {<= beta !}. If yes, jump directly to the subtraction loop. (Otherwise, r[j+n]*beta+r[j+n-1] - (beta-1)*b[n-1] < beta <==> floor((r[j+n]*beta+r[j+n-1]+b[n-1])/beta) = b[n-1] ) */ if (r_ptr[j + b_len] > b_msd || (c1 = r_ptr[j + b_len - 1] + b_msd) < b_msd) /* r[j+n] >= b[n-1]+1 or r[j+n] = b[n-1] and the addition r[j+n-1]+b[n-1] gives a carry. */ goto subtract; } /* q_star = q*, c1 = (r[j+n]*beta+r[j+n-1]) - q* * b[n-1] (>=0, 0, decrease it by b[n-1]*beta+b[n-2]. Because of b[n-1]*beta+b[n-2] >= beta^2/2 this can happen only twice. */ if (c3 > c2) { q_star = q_star - 1; /* q* := q* - 1 */ if (c3 - c2 > b_msdd) q_star = q_star - 1; /* q* := q* - 1 */ } } if (q_star > 0) subtract: { /* Subtract r := r - b * q* * beta^j. */ mp_limb_t cr; { const mp_limb_t *sourceptr = b_ptr; mp_limb_t *destptr = r_ptr + j; mp_twolimb_t carry = 0; size_t count; for (count = b_len; count > 0; count--) { /* Here 0 <= carry <= q*. */ carry = carry + (mp_twolimb_t) q_star * (mp_twolimb_t) *sourceptr++ + (mp_limb_t) ~(*destptr); /* Here 0 <= carry <= beta*q* + beta-1. */ *destptr++ = ~(mp_limb_t) carry; carry = carry >> GMP_LIMB_BITS; /* <= q* */ } cr = (mp_limb_t) carry; } /* Subtract cr from r_ptr[j + b_len], then forget about r_ptr[j + b_len]. */ if (cr > r_ptr[j + b_len]) { /* Subtraction gave a carry. */ q_star = q_star - 1; /* q* := q* - 1 */ /* Add b back. */ { const mp_limb_t *sourceptr = b_ptr; mp_limb_t *destptr = r_ptr + j; mp_limb_t carry = 0; size_t count; for (count = b_len; count > 0; count--) { mp_limb_t source1 = *sourceptr++; mp_limb_t source2 = *destptr; *destptr++ = source1 + source2 + carry; carry = (carry ? source1 >= (mp_limb_t) ~source2 : source1 > (mp_limb_t) ~source2); } } /* Forget about the carry and about r[j+n]. */ } } /* q* is determined. Store it as q[j]. */ q_ptr[j] = q_star; if (j == 0) break; j--; } } r_len = b_len; /* Normalise q. */ if (q_ptr[q_len - 1] == 0) q_len--; # if 0 /* Not needed here, since we need r only to compare it with b/2, and b is shifted left by s bits. */ /* Shift r right by s bits. */ if (s > 0) { mp_limb_t ptr = r_ptr + r_len; mp_twolimb_t accu = 0; size_t count; for (count = r_len; count > 0; count--) { accu = (mp_twolimb_t) (mp_limb_t) accu << GMP_LIMB_BITS; accu += (mp_twolimb_t) *--ptr << (GMP_LIMB_BITS - s); *ptr = (mp_limb_t) (accu >> GMP_LIMB_BITS); } } # endif /* Normalise r. */ while (r_len > 0 && r_ptr[r_len - 1] == 0) r_len--; } /* Compare r << 1 with b. */ if (r_len > b_len) goto increment_q; { size_t i; for (i = b_len;;) { mp_limb_t r_i = (i <= r_len && i > 0 ? r_ptr[i - 1] >> (GMP_LIMB_BITS - 1) : 0) | (i < r_len ? r_ptr[i] << 1 : 0); mp_limb_t b_i = (i < b_len ? b_ptr[i] : 0); if (r_i > b_i) goto increment_q; if (r_i < b_i) goto keep_q; if (i == 0) break; i--; } } if (q_len > 0 && ((q_ptr[0] & 1) != 0)) /* q is odd. */ increment_q: { size_t i; for (i = 0; i < q_len; i++) if (++(q_ptr[i]) != 0) goto keep_q; q_ptr[q_len++] = 1; } keep_q: if (tmp_roomptr != NULL) free (tmp_roomptr); q->limbs = q_ptr; q->nlimbs = q_len; return roomptr; } /* Convert a bignum a >= 0, multiplied with 10^extra_zeroes, to decimal representation. Destroys the contents of a. Return the allocated memory - containing the decimal digits in low-to-high order, terminated with a NUL character - in case of success, NULL in case of memory allocation failure. */ static char * convert_to_decimal (mpn_t a, size_t extra_zeroes) { mp_limb_t *a_ptr = a.limbs; size_t a_len = a.nlimbs; /* 0.03345 is slightly larger than log(2)/(9*log(10)). */ size_t c_len = 9 * ((size_t)(a_len * (GMP_LIMB_BITS * 0.03345f)) + 1); char *c_ptr = (char *) malloc (xsum (c_len, extra_zeroes)); if (c_ptr != NULL) { char *d_ptr = c_ptr; for (; extra_zeroes > 0; extra_zeroes--) *d_ptr++ = '0'; while (a_len > 0) { /* Divide a by 10^9, in-place. */ mp_limb_t remainder = 0; mp_limb_t *ptr = a_ptr + a_len; size_t count; for (count = a_len; count > 0; count--) { mp_twolimb_t num = ((mp_twolimb_t) remainder << GMP_LIMB_BITS) | *--ptr; *ptr = num / 1000000000; remainder = num % 1000000000; } /* Store the remainder as 9 decimal digits. */ for (count = 9; count > 0; count--) { *d_ptr++ = '0' + (remainder % 10); remainder = remainder / 10; } /* Normalize a. */ if (a_ptr[a_len - 1] == 0) a_len--; } /* Remove leading zeroes. */ while (d_ptr > c_ptr && d_ptr[-1] == '0') d_ptr--; /* But keep at least one zero. */ if (d_ptr == c_ptr) *d_ptr++ = '0'; /* Terminate the string. */ *d_ptr = '\0'; } return c_ptr; } # if NEED_PRINTF_LONG_DOUBLE /* Assuming x is finite and >= 0: write x as x = 2^e * m, where m is a bignum. Return the allocated memory in case of success, NULL in case of memory allocation failure. */ static void * decode_long_double (long double x, int *ep, mpn_t *mp) { mpn_t m; int exp; long double y; size_t i; /* Allocate memory for result. */ m.nlimbs = (LDBL_MANT_BIT + GMP_LIMB_BITS - 1) / GMP_LIMB_BITS; m.limbs = (mp_limb_t *) malloc (m.nlimbs * sizeof (mp_limb_t)); if (m.limbs == NULL) return NULL; /* Split into exponential part and mantissa. */ y = frexpl (x, &exp); if (!(y >= 0.0L && y < 1.0L)) abort (); /* x = 2^exp * y = 2^(exp - LDBL_MANT_BIT) * (y * LDBL_MANT_BIT), and the latter is an integer. */ /* Convert the mantissa (y * LDBL_MANT_BIT) to a sequence of limbs. I'm not sure whether it's safe to cast a 'long double' value between 2^31 and 2^32 to 'unsigned int', therefore play safe and cast only 'long double' values between 0 and 2^16 (to 'unsigned int' or 'int', doesn't matter). */ # if (LDBL_MANT_BIT % GMP_LIMB_BITS) != 0 # if (LDBL_MANT_BIT % GMP_LIMB_BITS) > GMP_LIMB_BITS / 2 { mp_limb_t hi, lo; y *= (mp_limb_t) 1 << (LDBL_MANT_BIT % (GMP_LIMB_BITS / 2)); hi = (int) y; y -= hi; if (!(y >= 0.0L && y < 1.0L)) abort (); y *= (mp_limb_t) 1 << (GMP_LIMB_BITS / 2); lo = (int) y; y -= lo; if (!(y >= 0.0L && y < 1.0L)) abort (); m.limbs[LDBL_MANT_BIT / GMP_LIMB_BITS] = (hi << (GMP_LIMB_BITS / 2)) | lo; } # else { mp_limb_t d; y *= (mp_limb_t) 1 << (LDBL_MANT_BIT % GMP_LIMB_BITS); d = (int) y; y -= d; if (!(y >= 0.0L && y < 1.0L)) abort (); m.limbs[LDBL_MANT_BIT / GMP_LIMB_BITS] = d; } # endif # endif for (i = LDBL_MANT_BIT / GMP_LIMB_BITS; i > 0; ) { mp_limb_t hi, lo; y *= (mp_limb_t) 1 << (GMP_LIMB_BITS / 2); hi = (int) y; y -= hi; if (!(y >= 0.0L && y < 1.0L)) abort (); y *= (mp_limb_t) 1 << (GMP_LIMB_BITS / 2); lo = (int) y; y -= lo; if (!(y >= 0.0L && y < 1.0L)) abort (); m.limbs[--i] = (hi << (GMP_LIMB_BITS / 2)) | lo; } #if 0 /* On FreeBSD 6.1/x86, 'long double' numbers sometimes have excess precision. */ if (!(y == 0.0L)) abort (); #endif /* Normalise. */ while (m.nlimbs > 0 && m.limbs[m.nlimbs - 1] == 0) m.nlimbs--; *mp = m; *ep = exp - LDBL_MANT_BIT; return m.limbs; } # endif # if NEED_PRINTF_DOUBLE /* Assuming x is finite and >= 0: write x as x = 2^e * m, where m is a bignum. Return the allocated memory in case of success, NULL in case of memory allocation failure. */ static void * decode_double (double x, int *ep, mpn_t *mp) { mpn_t m; int exp; double y; size_t i; /* Allocate memory for result. */ m.nlimbs = (DBL_MANT_BIT + GMP_LIMB_BITS - 1) / GMP_LIMB_BITS; m.limbs = (mp_limb_t *) malloc (m.nlimbs * sizeof (mp_limb_t)); if (m.limbs == NULL) return NULL; /* Split into exponential part and mantissa. */ y = frexp (x, &exp); if (!(y >= 0.0 && y < 1.0)) abort (); /* x = 2^exp * y = 2^(exp - DBL_MANT_BIT) * (y * DBL_MANT_BIT), and the latter is an integer. */ /* Convert the mantissa (y * DBL_MANT_BIT) to a sequence of limbs. I'm not sure whether it's safe to cast a 'double' value between 2^31 and 2^32 to 'unsigned int', therefore play safe and cast only 'double' values between 0 and 2^16 (to 'unsigned int' or 'int', doesn't matter). */ # if (DBL_MANT_BIT % GMP_LIMB_BITS) != 0 # if (DBL_MANT_BIT % GMP_LIMB_BITS) > GMP_LIMB_BITS / 2 { mp_limb_t hi, lo; y *= (mp_limb_t) 1 << (DBL_MANT_BIT % (GMP_LIMB_BITS / 2)); hi = (int) y; y -= hi; if (!(y >= 0.0 && y < 1.0)) abort (); y *= (mp_limb_t) 1 << (GMP_LIMB_BITS / 2); lo = (int) y; y -= lo; if (!(y >= 0.0 && y < 1.0)) abort (); m.limbs[DBL_MANT_BIT / GMP_LIMB_BITS] = (hi << (GMP_LIMB_BITS / 2)) | lo; } # else { mp_limb_t d; y *= (mp_limb_t) 1 << (DBL_MANT_BIT % GMP_LIMB_BITS); d = (int) y; y -= d; if (!(y >= 0.0 && y < 1.0)) abort (); m.limbs[DBL_MANT_BIT / GMP_LIMB_BITS] = d; } # endif # endif for (i = DBL_MANT_BIT / GMP_LIMB_BITS; i > 0; ) { mp_limb_t hi, lo; y *= (mp_limb_t) 1 << (GMP_LIMB_BITS / 2); hi = (int) y; y -= hi; if (!(y >= 0.0 && y < 1.0)) abort (); y *= (mp_limb_t) 1 << (GMP_LIMB_BITS / 2); lo = (int) y; y -= lo; if (!(y >= 0.0 && y < 1.0)) abort (); m.limbs[--i] = (hi << (GMP_LIMB_BITS / 2)) | lo; } if (!(y == 0.0)) abort (); /* Normalise. */ while (m.nlimbs > 0 && m.limbs[m.nlimbs - 1] == 0) m.nlimbs--; *mp = m; *ep = exp - DBL_MANT_BIT; return m.limbs; } # endif /* Assuming x = 2^e * m is finite and >= 0, and n is an integer: Returns the decimal representation of round (x * 10^n). Return the allocated memory - containing the decimal digits in low-to-high order, terminated with a NUL character - in case of success, NULL in case of memory allocation failure. */ static char * scale10_round_decimal_decoded (int e, mpn_t m, void *memory, int n) { int s; size_t extra_zeroes; unsigned int abs_n; unsigned int abs_s; mp_limb_t *pow5_ptr; size_t pow5_len; unsigned int s_limbs; unsigned int s_bits; mpn_t pow5; mpn_t z; void *z_memory; char *digits; if (memory == NULL) return NULL; /* x = 2^e * m, hence y = round (2^e * 10^n * m) = round (2^(e+n) * 5^n * m) = round (2^s * 5^n * m). */ s = e + n; extra_zeroes = 0; /* Factor out a common power of 10 if possible. */ if (s > 0 && n > 0) { extra_zeroes = (s < n ? s : n); s -= extra_zeroes; n -= extra_zeroes; } /* Here y = round (2^s * 5^n * m) * 10^extra_zeroes. Before converting to decimal, we need to compute z = round (2^s * 5^n * m). */ /* Compute 5^|n|, possibly shifted by |s| bits if n and s have the same sign. 2.322 is slightly larger than log(5)/log(2). */ abs_n = (n >= 0 ? n : -n); abs_s = (s >= 0 ? s : -s); pow5_ptr = (mp_limb_t *) malloc (((int)(abs_n * (2.322f / GMP_LIMB_BITS)) + 1 + abs_s / GMP_LIMB_BITS + 1) * sizeof (mp_limb_t)); if (pow5_ptr == NULL) { free (memory); return NULL; } /* Initialize with 1. */ pow5_ptr[0] = 1; pow5_len = 1; /* Multiply with 5^|n|. */ if (abs_n > 0) { static mp_limb_t const small_pow5[13 + 1] = { 1, 5, 25, 125, 625, 3125, 15625, 78125, 390625, 1953125, 9765625, 48828125, 244140625, 1220703125 }; unsigned int n13; for (n13 = 0; n13 <= abs_n; n13 += 13) { mp_limb_t digit1 = small_pow5[n13 + 13 <= abs_n ? 13 : abs_n - n13]; size_t j; mp_twolimb_t carry = 0; for (j = 0; j < pow5_len; j++) { mp_limb_t digit2 = pow5_ptr[j]; carry += (mp_twolimb_t) digit1 * (mp_twolimb_t) digit2; pow5_ptr[j] = (mp_limb_t) carry; carry = carry >> GMP_LIMB_BITS; } if (carry > 0) pow5_ptr[pow5_len++] = (mp_limb_t) carry; } } s_limbs = abs_s / GMP_LIMB_BITS; s_bits = abs_s % GMP_LIMB_BITS; if (n >= 0 ? s >= 0 : s <= 0) { /* Multiply with 2^|s|. */ if (s_bits > 0) { mp_limb_t *ptr = pow5_ptr; mp_twolimb_t accu = 0; size_t count; for (count = pow5_len; count > 0; count--) { accu += (mp_twolimb_t) *ptr << s_bits; *ptr++ = (mp_limb_t) accu; accu = accu >> GMP_LIMB_BITS; } if (accu > 0) { *ptr = (mp_limb_t) accu; pow5_len++; } } if (s_limbs > 0) { size_t count; for (count = pow5_len; count > 0;) { count--; pow5_ptr[s_limbs + count] = pow5_ptr[count]; } for (count = s_limbs; count > 0;) { count--; pow5_ptr[count] = 0; } pow5_len += s_limbs; } pow5.limbs = pow5_ptr; pow5.nlimbs = pow5_len; if (n >= 0) { /* Multiply m with pow5. No division needed. */ z_memory = multiply (m, pow5, &z); } else { /* Divide m by pow5 and round. */ z_memory = divide (m, pow5, &z); } } else { pow5.limbs = pow5_ptr; pow5.nlimbs = pow5_len; if (n >= 0) { /* n >= 0, s < 0. Multiply m with pow5, then divide by 2^|s|. */ mpn_t numerator; mpn_t denominator; void *tmp_memory; tmp_memory = multiply (m, pow5, &numerator); if (tmp_memory == NULL) { free (pow5_ptr); free (memory); return NULL; } /* Construct 2^|s|. */ { mp_limb_t *ptr = pow5_ptr + pow5_len; size_t i; for (i = 0; i < s_limbs; i++) ptr[i] = 0; ptr[s_limbs] = (mp_limb_t) 1 << s_bits; denominator.limbs = ptr; denominator.nlimbs = s_limbs + 1; } z_memory = divide (numerator, denominator, &z); free (tmp_memory); } else { /* n < 0, s > 0. Multiply m with 2^s, then divide by pow5. */ mpn_t numerator; mp_limb_t *num_ptr; num_ptr = (mp_limb_t *) malloc ((m.nlimbs + s_limbs + 1) * sizeof (mp_limb_t)); if (num_ptr == NULL) { free (pow5_ptr); free (memory); return NULL; } { mp_limb_t *destptr = num_ptr; { size_t i; for (i = 0; i < s_limbs; i++) *destptr++ = 0; } if (s_bits > 0) { const mp_limb_t *sourceptr = m.limbs; mp_twolimb_t accu = 0; size_t count; for (count = m.nlimbs; count > 0; count--) { accu += (mp_twolimb_t) *sourceptr++ << s_bits; *destptr++ = (mp_limb_t) accu; accu = accu >> GMP_LIMB_BITS; } if (accu > 0) *destptr++ = (mp_limb_t) accu; } else { const mp_limb_t *sourceptr = m.limbs; size_t count; for (count = m.nlimbs; count > 0; count--) *destptr++ = *sourceptr++; } numerator.limbs = num_ptr; numerator.nlimbs = destptr - num_ptr; } z_memory = divide (numerator, pow5, &z); free (num_ptr); } } free (pow5_ptr); free (memory); /* Here y = round (x * 10^n) = z * 10^extra_zeroes. */ if (z_memory == NULL) return NULL; digits = convert_to_decimal (z, extra_zeroes); free (z_memory); return digits; } # if NEED_PRINTF_LONG_DOUBLE /* Assuming x is finite and >= 0, and n is an integer: Returns the decimal representation of round (x * 10^n). Return the allocated memory - containing the decimal digits in low-to-high order, terminated with a NUL character - in case of success, NULL in case of memory allocation failure. */ static char * scale10_round_decimal_long_double (long double x, int n) { int e IF_LINT(= 0); mpn_t m; void *memory = decode_long_double (x, &e, &m); return scale10_round_decimal_decoded (e, m, memory, n); } # endif # if NEED_PRINTF_DOUBLE /* Assuming x is finite and >= 0, and n is an integer: Returns the decimal representation of round (x * 10^n). Return the allocated memory - containing the decimal digits in low-to-high order, terminated with a NUL character - in case of success, NULL in case of memory allocation failure. */ static char * scale10_round_decimal_double (double x, int n) { int e IF_LINT(= 0); mpn_t m; void *memory = decode_double (x, &e, &m); return scale10_round_decimal_decoded (e, m, memory, n); } # endif # if NEED_PRINTF_LONG_DOUBLE /* Assuming x is finite and > 0: Return an approximation for n with 10^n <= x < 10^(n+1). The approximation is usually the right n, but may be off by 1 sometimes. */ static int floorlog10l (long double x) { int exp; long double y; double z; double l; /* Split into exponential part and mantissa. */ y = frexpl (x, &exp); if (!(y >= 0.0L && y < 1.0L)) abort (); if (y == 0.0L) return INT_MIN; if (y < 0.5L) { while (y < (1.0L / (1 << (GMP_LIMB_BITS / 2)) / (1 << (GMP_LIMB_BITS / 2)))) { y *= 1.0L * (1 << (GMP_LIMB_BITS / 2)) * (1 << (GMP_LIMB_BITS / 2)); exp -= GMP_LIMB_BITS; } if (y < (1.0L / (1 << 16))) { y *= 1.0L * (1 << 16); exp -= 16; } if (y < (1.0L / (1 << 8))) { y *= 1.0L * (1 << 8); exp -= 8; } if (y < (1.0L / (1 << 4))) { y *= 1.0L * (1 << 4); exp -= 4; } if (y < (1.0L / (1 << 2))) { y *= 1.0L * (1 << 2); exp -= 2; } if (y < (1.0L / (1 << 1))) { y *= 1.0L * (1 << 1); exp -= 1; } } if (!(y >= 0.5L && y < 1.0L)) abort (); /* Compute an approximation for l = log2(x) = exp + log2(y). */ l = exp; z = y; if (z < 0.70710678118654752444) { z *= 1.4142135623730950488; l -= 0.5; } if (z < 0.8408964152537145431) { z *= 1.1892071150027210667; l -= 0.25; } if (z < 0.91700404320467123175) { z *= 1.0905077326652576592; l -= 0.125; } if (z < 0.9576032806985736469) { z *= 1.0442737824274138403; l -= 0.0625; } /* Now 0.95 <= z <= 1.01. */ z = 1 - z; /* log2(1-z) = 1/log(2) * (- z - z^2/2 - z^3/3 - z^4/4 - ...) Four terms are enough to get an approximation with error < 10^-7. */ l -= 1.4426950408889634074 * z * (1.0 + z * (0.5 + z * ((1.0 / 3) + z * 0.25))); /* Finally multiply with log(2)/log(10), yields an approximation for log10(x). */ l *= 0.30102999566398119523; /* Round down to the next integer. */ return (int) l + (l < 0 ? -1 : 0); } # endif # if NEED_PRINTF_DOUBLE /* Assuming x is finite and > 0: Return an approximation for n with 10^n <= x < 10^(n+1). The approximation is usually the right n, but may be off by 1 sometimes. */ static int floorlog10 (double x) { int exp; double y; double z; double l; /* Split into exponential part and mantissa. */ y = frexp (x, &exp); if (!(y >= 0.0 && y < 1.0)) abort (); if (y == 0.0) return INT_MIN; if (y < 0.5) { while (y < (1.0 / (1 << (GMP_LIMB_BITS / 2)) / (1 << (GMP_LIMB_BITS / 2)))) { y *= 1.0 * (1 << (GMP_LIMB_BITS / 2)) * (1 << (GMP_LIMB_BITS / 2)); exp -= GMP_LIMB_BITS; } if (y < (1.0 / (1 << 16))) { y *= 1.0 * (1 << 16); exp -= 16; } if (y < (1.0 / (1 << 8))) { y *= 1.0 * (1 << 8); exp -= 8; } if (y < (1.0 / (1 << 4))) { y *= 1.0 * (1 << 4); exp -= 4; } if (y < (1.0 / (1 << 2))) { y *= 1.0 * (1 << 2); exp -= 2; } if (y < (1.0 / (1 << 1))) { y *= 1.0 * (1 << 1); exp -= 1; } } if (!(y >= 0.5 && y < 1.0)) abort (); /* Compute an approximation for l = log2(x) = exp + log2(y). */ l = exp; z = y; if (z < 0.70710678118654752444) { z *= 1.4142135623730950488; l -= 0.5; } if (z < 0.8408964152537145431) { z *= 1.1892071150027210667; l -= 0.25; } if (z < 0.91700404320467123175) { z *= 1.0905077326652576592; l -= 0.125; } if (z < 0.9576032806985736469) { z *= 1.0442737824274138403; l -= 0.0625; } /* Now 0.95 <= z <= 1.01. */ z = 1 - z; /* log2(1-z) = 1/log(2) * (- z - z^2/2 - z^3/3 - z^4/4 - ...) Four terms are enough to get an approximation with error < 10^-7. */ l -= 1.4426950408889634074 * z * (1.0 + z * (0.5 + z * ((1.0 / 3) + z * 0.25))); /* Finally multiply with log(2)/log(10), yields an approximation for log10(x). */ l *= 0.30102999566398119523; /* Round down to the next integer. */ return (int) l + (l < 0 ? -1 : 0); } # endif /* Tests whether a string of digits consists of exactly PRECISION zeroes and a single '1' digit. */ static int is_borderline (const char *digits, size_t precision) { for (; precision > 0; precision--, digits++) if (*digits != '0') return 0; if (*digits != '1') return 0; digits++; return *digits == '\0'; } #endif DCHAR_T * VASNPRINTF (DCHAR_T *resultbuf, size_t *lengthp, const FCHAR_T *format, va_list args) { DIRECTIVES d; arguments a; if (PRINTF_PARSE (format, &d, &a) < 0) /* errno is already set. */ return NULL; #define CLEANUP() \ free (d.dir); \ if (a.arg) \ free (a.arg); if (PRINTF_FETCHARGS (args, &a) < 0) { CLEANUP (); errno = EINVAL; return NULL; } { size_t buf_neededlength; TCHAR_T *buf; TCHAR_T *buf_malloced; const FCHAR_T *cp; size_t i; DIRECTIVE *dp; /* Output string accumulator. */ DCHAR_T *result; size_t allocated; size_t length; /* Allocate a small buffer that will hold a directive passed to sprintf or snprintf. */ buf_neededlength = xsum4 (7, d.max_width_length, d.max_precision_length, 6); #if HAVE_ALLOCA if (buf_neededlength < 4000 / sizeof (TCHAR_T)) { buf = (TCHAR_T *) alloca (buf_neededlength * sizeof (TCHAR_T)); buf_malloced = NULL; } else #endif { size_t buf_memsize = xtimes (buf_neededlength, sizeof (TCHAR_T)); if (size_overflow_p (buf_memsize)) goto out_of_memory_1; buf = (TCHAR_T *) malloc (buf_memsize); if (buf == NULL) goto out_of_memory_1; buf_malloced = buf; } if (resultbuf != NULL) { result = resultbuf; allocated = *lengthp; } else { result = NULL; allocated = 0; } length = 0; /* Invariants: result is either == resultbuf or == NULL or malloc-allocated. If length > 0, then result != NULL. */ /* Ensures that allocated >= needed. Aborts through a jump to out_of_memory if needed is SIZE_MAX or otherwise too big. */ #define ENSURE_ALLOCATION(needed) \ if ((needed) > allocated) \ { \ size_t memory_size; \ DCHAR_T *memory; \ \ allocated = (allocated > 0 ? xtimes (allocated, 2) : 12); \ if ((needed) > allocated) \ allocated = (needed); \ memory_size = xtimes (allocated, sizeof (DCHAR_T)); \ if (size_overflow_p (memory_size)) \ goto out_of_memory; \ if (result == resultbuf || result == NULL) \ memory = (DCHAR_T *) malloc (memory_size); \ else \ memory = (DCHAR_T *) realloc (result, memory_size); \ if (memory == NULL) \ goto out_of_memory; \ if (result == resultbuf && length > 0) \ DCHAR_CPY (memory, result, length); \ result = memory; \ } for (cp = format, i = 0, dp = &d.dir[0]; ; cp = dp->dir_end, i++, dp++) { if (cp != dp->dir_start) { size_t n = dp->dir_start - cp; size_t augmented_length = xsum (length, n); ENSURE_ALLOCATION (augmented_length); /* This copies a piece of FCHAR_T[] into a DCHAR_T[]. Here we need that the format string contains only ASCII characters if FCHAR_T and DCHAR_T are not the same type. */ if (sizeof (FCHAR_T) == sizeof (DCHAR_T)) { DCHAR_CPY (result + length, (const DCHAR_T *) cp, n); length = augmented_length; } else { do result[length++] = (unsigned char) *cp++; while (--n > 0); } } if (i == d.count) break; /* Execute a single directive. */ if (dp->conversion == '%') { size_t augmented_length; if (!(dp->arg_index == ARG_NONE)) abort (); augmented_length = xsum (length, 1); ENSURE_ALLOCATION (augmented_length); result[length] = '%'; length = augmented_length; } else { if (!(dp->arg_index != ARG_NONE)) abort (); if (dp->conversion == 'n') { switch (a.arg[dp->arg_index].type) { case TYPE_COUNT_SCHAR_POINTER: *a.arg[dp->arg_index].a.a_count_schar_pointer = length; break; case TYPE_COUNT_SHORT_POINTER: *a.arg[dp->arg_index].a.a_count_short_pointer = length; break; case TYPE_COUNT_INT_POINTER: *a.arg[dp->arg_index].a.a_count_int_pointer = length; break; case TYPE_COUNT_LONGINT_POINTER: *a.arg[dp->arg_index].a.a_count_longint_pointer = length; break; #if HAVE_LONG_LONG_INT case TYPE_COUNT_LONGLONGINT_POINTER: *a.arg[dp->arg_index].a.a_count_longlongint_pointer = length; break; #endif default: abort (); } } #if ENABLE_UNISTDIO /* The unistdio extensions. */ else if (dp->conversion == 'U') { arg_type type = a.arg[dp->arg_index].type; int flags = dp->flags; int has_width; size_t width; int has_precision; size_t precision; has_width = 0; width = 0; if (dp->width_start != dp->width_end) { if (dp->width_arg_index != ARG_NONE) { int arg; if (!(a.arg[dp->width_arg_index].type == TYPE_INT)) abort (); arg = a.arg[dp->width_arg_index].a.a_int; if (arg < 0) { /* "A negative field width is taken as a '-' flag followed by a positive field width." */ flags |= FLAG_LEFT; width = (unsigned int) (-arg); } else width = arg; } else { const FCHAR_T *digitp = dp->width_start; do width = xsum (xtimes (width, 10), *digitp++ - '0'); while (digitp != dp->width_end); } has_width = 1; } has_precision = 0; precision = 0; if (dp->precision_start != dp->precision_end) { if (dp->precision_arg_index != ARG_NONE) { int arg; if (!(a.arg[dp->precision_arg_index].type == TYPE_INT)) abort (); arg = a.arg[dp->precision_arg_index].a.a_int; /* "A negative precision is taken as if the precision were omitted." */ if (arg >= 0) { precision = arg; has_precision = 1; } } else { const FCHAR_T *digitp = dp->precision_start + 1; precision = 0; while (digitp != dp->precision_end) precision = xsum (xtimes (precision, 10), *digitp++ - '0'); has_precision = 1; } } switch (type) { case TYPE_U8_STRING: { const uint8_t *arg = a.arg[dp->arg_index].a.a_u8_string; const uint8_t *arg_end; size_t characters; if (has_precision) { /* Use only PRECISION characters, from the left. */ arg_end = arg; characters = 0; for (; precision > 0; precision--) { int count = u8_strmblen (arg_end); if (count == 0) break; if (count < 0) { if (!(result == resultbuf || result == NULL)) free (result); if (buf_malloced != NULL) free (buf_malloced); CLEANUP (); errno = EILSEQ; return NULL; } arg_end += count; characters++; } } else if (has_width) { /* Use the entire string, and count the number of characters. */ arg_end = arg; characters = 0; for (;;) { int count = u8_strmblen (arg_end); if (count == 0) break; if (count < 0) { if (!(result == resultbuf || result == NULL)) free (result); if (buf_malloced != NULL) free (buf_malloced); CLEANUP (); errno = EILSEQ; return NULL; } arg_end += count; characters++; } } else { /* Use the entire string. */ arg_end = arg + u8_strlen (arg); /* The number of characters doesn't matter. */ characters = 0; } if (has_width && width > characters && !(dp->flags & FLAG_LEFT)) { size_t n = width - characters; ENSURE_ALLOCATION (xsum (length, n)); DCHAR_SET (result + length, ' ', n); length += n; } # if DCHAR_IS_UINT8_T { size_t n = arg_end - arg; ENSURE_ALLOCATION (xsum (length, n)); DCHAR_CPY (result + length, arg, n); length += n; } # else { /* Convert. */ DCHAR_T *converted = result + length; size_t converted_len = allocated - length; # if DCHAR_IS_TCHAR /* Convert from UTF-8 to locale encoding. */ converted = u8_conv_to_encoding (locale_charset (), iconveh_question_mark, arg, arg_end - arg, NULL, converted, &converted_len); # else /* Convert from UTF-8 to UTF-16/UTF-32. */ converted = U8_TO_DCHAR (arg, arg_end - arg, converted, &converted_len); # endif if (converted == NULL) { int saved_errno = errno; if (!(result == resultbuf || result == NULL)) free (result); if (buf_malloced != NULL) free (buf_malloced); CLEANUP (); errno = saved_errno; return NULL; } if (converted != result + length) { ENSURE_ALLOCATION (xsum (length, converted_len)); DCHAR_CPY (result + length, converted, converted_len); free (converted); } length += converted_len; } # endif if (has_width && width > characters && (dp->flags & FLAG_LEFT)) { size_t n = width - characters; ENSURE_ALLOCATION (xsum (length, n)); DCHAR_SET (result + length, ' ', n); length += n; } } break; case TYPE_U16_STRING: { const uint16_t *arg = a.arg[dp->arg_index].a.a_u16_string; const uint16_t *arg_end; size_t characters; if (has_precision) { /* Use only PRECISION characters, from the left. */ arg_end = arg; characters = 0; for (; precision > 0; precision--) { int count = u16_strmblen (arg_end); if (count == 0) break; if (count < 0) { if (!(result == resultbuf || result == NULL)) free (result); if (buf_malloced != NULL) free (buf_malloced); CLEANUP (); errno = EILSEQ; return NULL; } arg_end += count; characters++; } } else if (has_width) { /* Use the entire string, and count the number of characters. */ arg_end = arg; characters = 0; for (;;) { int count = u16_strmblen (arg_end); if (count == 0) break; if (count < 0) { if (!(result == resultbuf || result == NULL)) free (result); if (buf_malloced != NULL) free (buf_malloced); CLEANUP (); errno = EILSEQ; return NULL; } arg_end += count; characters++; } } else { /* Use the entire string. */ arg_end = arg + u16_strlen (arg); /* The number of characters doesn't matter. */ characters = 0; } if (has_width && width > characters && !(dp->flags & FLAG_LEFT)) { size_t n = width - characters; ENSURE_ALLOCATION (xsum (length, n)); DCHAR_SET (result + length, ' ', n); length += n; } # if DCHAR_IS_UINT16_T { size_t n = arg_end - arg; ENSURE_ALLOCATION (xsum (length, n)); DCHAR_CPY (result + length, arg, n); length += n; } # else { /* Convert. */ DCHAR_T *converted = result + length; size_t converted_len = allocated - length; # if DCHAR_IS_TCHAR /* Convert from UTF-16 to locale encoding. */ converted = u16_conv_to_encoding (locale_charset (), iconveh_question_mark, arg, arg_end - arg, NULL, converted, &converted_len); # else /* Convert from UTF-16 to UTF-8/UTF-32. */ converted = U16_TO_DCHAR (arg, arg_end - arg, converted, &converted_len); # endif if (converted == NULL) { int saved_errno = errno; if (!(result == resultbuf || result == NULL)) free (result); if (buf_malloced != NULL) free (buf_malloced); CLEANUP (); errno = saved_errno; return NULL; } if (converted != result + length) { ENSURE_ALLOCATION (xsum (length, converted_len)); DCHAR_CPY (result + length, converted, converted_len); free (converted); } length += converted_len; } # endif if (has_width && width > characters && (dp->flags & FLAG_LEFT)) { size_t n = width - characters; ENSURE_ALLOCATION (xsum (length, n)); DCHAR_SET (result + length, ' ', n); length += n; } } break; case TYPE_U32_STRING: { const uint32_t *arg = a.arg[dp->arg_index].a.a_u32_string; const uint32_t *arg_end; size_t characters; if (has_precision) { /* Use only PRECISION characters, from the left. */ arg_end = arg; characters = 0; for (; precision > 0; precision--) { int count = u32_strmblen (arg_end); if (count == 0) break; if (count < 0) { if (!(result == resultbuf || result == NULL)) free (result); if (buf_malloced != NULL) free (buf_malloced); CLEANUP (); errno = EILSEQ; return NULL; } arg_end += count; characters++; } } else if (has_width) { /* Use the entire string, and count the number of characters. */ arg_end = arg; characters = 0; for (;;) { int count = u32_strmblen (arg_end); if (count == 0) break; if (count < 0) { if (!(result == resultbuf || result == NULL)) free (result); if (buf_malloced != NULL) free (buf_malloced); CLEANUP (); errno = EILSEQ; return NULL; } arg_end += count; characters++; } } else { /* Use the entire string. */ arg_end = arg + u32_strlen (arg); /* The number of characters doesn't matter. */ characters = 0; } if (has_width && width > characters && !(dp->flags & FLAG_LEFT)) { size_t n = width - characters; ENSURE_ALLOCATION (xsum (length, n)); DCHAR_SET (result + length, ' ', n); length += n; } # if DCHAR_IS_UINT32_T { size_t n = arg_end - arg; ENSURE_ALLOCATION (xsum (length, n)); DCHAR_CPY (result + length, arg, n); length += n; } # else { /* Convert. */ DCHAR_T *converted = result + length; size_t converted_len = allocated - length; # if DCHAR_IS_TCHAR /* Convert from UTF-32 to locale encoding. */ converted = u32_conv_to_encoding (locale_charset (), iconveh_question_mark, arg, arg_end - arg, NULL, converted, &converted_len); # else /* Convert from UTF-32 to UTF-8/UTF-16. */ converted = U32_TO_DCHAR (arg, arg_end - arg, converted, &converted_len); # endif if (converted == NULL) { int saved_errno = errno; if (!(result == resultbuf || result == NULL)) free (result); if (buf_malloced != NULL) free (buf_malloced); CLEANUP (); errno = saved_errno; return NULL; } if (converted != result + length) { ENSURE_ALLOCATION (xsum (length, converted_len)); DCHAR_CPY (result + length, converted, converted_len); free (converted); } length += converted_len; } # endif if (has_width && width > characters && (dp->flags & FLAG_LEFT)) { size_t n = width - characters; ENSURE_ALLOCATION (xsum (length, n)); DCHAR_SET (result + length, ' ', n); length += n; } } break; default: abort (); } } #endif #if (!USE_SNPRINTF || (NEED_PRINTF_DIRECTIVE_LS && !defined IN_LIBINTL)) && HAVE_WCHAR_T else if (dp->conversion == 's' # if WIDE_CHAR_VERSION && a.arg[dp->arg_index].type != TYPE_WIDE_STRING # else && a.arg[dp->arg_index].type == TYPE_WIDE_STRING # endif ) { /* The normal handling of the 's' directive below requires allocating a temporary buffer. The determination of its length (tmp_length), in the case when a precision is specified, below requires a conversion between a char[] string and a wchar_t[] wide string. It could be done, but we have no guarantee that the implementation of sprintf will use the exactly same algorithm. Without this guarantee, it is possible to have buffer overrun bugs. In order to avoid such bugs, we implement the entire processing of the 's' directive ourselves. */ int flags = dp->flags; int has_width; size_t width; int has_precision; size_t precision; has_width = 0; width = 0; if (dp->width_start != dp->width_end) { if (dp->width_arg_index != ARG_NONE) { int arg; if (!(a.arg[dp->width_arg_index].type == TYPE_INT)) abort (); arg = a.arg[dp->width_arg_index].a.a_int; if (arg < 0) { /* "A negative field width is taken as a '-' flag followed by a positive field width." */ flags |= FLAG_LEFT; width = (unsigned int) (-arg); } else width = arg; } else { const FCHAR_T *digitp = dp->width_start; do width = xsum (xtimes (width, 10), *digitp++ - '0'); while (digitp != dp->width_end); } has_width = 1; } has_precision = 0; precision = 6; if (dp->precision_start != dp->precision_end) { if (dp->precision_arg_index != ARG_NONE) { int arg; if (!(a.arg[dp->precision_arg_index].type == TYPE_INT)) abort (); arg = a.arg[dp->precision_arg_index].a.a_int; /* "A negative precision is taken as if the precision were omitted." */ if (arg >= 0) { precision = arg; has_precision = 1; } } else { const FCHAR_T *digitp = dp->precision_start + 1; precision = 0; while (digitp != dp->precision_end) precision = xsum (xtimes (precision, 10), *digitp++ - '0'); has_precision = 1; } } # if WIDE_CHAR_VERSION /* %s in vasnwprintf. See the specification of fwprintf. */ { const char *arg = a.arg[dp->arg_index].a.a_string; const char *arg_end; size_t characters; if (has_precision) { /* Use only as many bytes as needed to produce PRECISION wide characters, from the left. */ # if HAVE_MBRTOWC mbstate_t state; memset (&state, '\0', sizeof (mbstate_t)); # endif arg_end = arg; characters = 0; for (; precision > 0; precision--) { int count; # if HAVE_MBRTOWC count = mbrlen (arg_end, MB_CUR_MAX, &state); # else count = mblen (arg_end, MB_CUR_MAX); # endif if (count == 0) /* Found the terminating NUL. */ break; if (count < 0) { /* Invalid or incomplete multibyte character. */ if (!(result == resultbuf || result == NULL)) free (result); if (buf_malloced != NULL) free (buf_malloced); CLEANUP (); errno = EILSEQ; return NULL; } arg_end += count; characters++; } } else if (has_width) { /* Use the entire string, and count the number of wide characters. */ # if HAVE_MBRTOWC mbstate_t state; memset (&state, '\0', sizeof (mbstate_t)); # endif arg_end = arg; characters = 0; for (;;) { int count; # if HAVE_MBRTOWC count = mbrlen (arg_end, MB_CUR_MAX, &state); # else count = mblen (arg_end, MB_CUR_MAX); # endif if (count == 0) /* Found the terminating NUL. */ break; if (count < 0) { /* Invalid or incomplete multibyte character. */ if (!(result == resultbuf || result == NULL)) free (result); if (buf_malloced != NULL) free (buf_malloced); CLEANUP (); errno = EILSEQ; return NULL; } arg_end += count; characters++; } } else { /* Use the entire string. */ arg_end = arg + strlen (arg); /* The number of characters doesn't matter. */ characters = 0; } if (has_width && width > characters && !(dp->flags & FLAG_LEFT)) { size_t n = width - characters; ENSURE_ALLOCATION (xsum (length, n)); DCHAR_SET (result + length, ' ', n); length += n; } if (has_precision || has_width) { /* We know the number of wide characters in advance. */ size_t remaining; # if HAVE_MBRTOWC mbstate_t state; memset (&state, '\0', sizeof (mbstate_t)); # endif ENSURE_ALLOCATION (xsum (length, characters)); for (remaining = characters; remaining > 0; remaining--) { wchar_t wc; int count; # if HAVE_MBRTOWC count = mbrtowc (&wc, arg, arg_end - arg, &state); # else count = mbtowc (&wc, arg, arg_end - arg); # endif if (count <= 0) /* mbrtowc not consistent with mbrlen, or mbtowc not consistent with mblen. */ abort (); result[length++] = wc; arg += count; } if (!(arg == arg_end)) abort (); } else { # if HAVE_MBRTOWC mbstate_t state; memset (&state, '\0', sizeof (mbstate_t)); # endif while (arg < arg_end) { wchar_t wc; int count; # if HAVE_MBRTOWC count = mbrtowc (&wc, arg, arg_end - arg, &state); # else count = mbtowc (&wc, arg, arg_end - arg); # endif if (count <= 0) /* mbrtowc not consistent with mbrlen, or mbtowc not consistent with mblen. */ abort (); ENSURE_ALLOCATION (xsum (length, 1)); result[length++] = wc; arg += count; } } if (has_width && width > characters && (dp->flags & FLAG_LEFT)) { size_t n = width - characters; ENSURE_ALLOCATION (xsum (length, n)); DCHAR_SET (result + length, ' ', n); length += n; } } # else /* %ls in vasnprintf. See the specification of fprintf. */ { const wchar_t *arg = a.arg[dp->arg_index].a.a_wide_string; const wchar_t *arg_end; size_t characters; # if !DCHAR_IS_TCHAR /* This code assumes that TCHAR_T is 'char'. */ typedef int TCHAR_T_verify[2 * (sizeof (TCHAR_T) == 1) - 1]; TCHAR_T *tmpsrc; DCHAR_T *tmpdst; size_t tmpdst_len; # endif size_t w; if (has_precision) { /* Use only as many wide characters as needed to produce at most PRECISION bytes, from the left. */ # if HAVE_WCRTOMB && !defined GNULIB_defined_mbstate_t mbstate_t state; memset (&state, '\0', sizeof (mbstate_t)); # endif arg_end = arg; characters = 0; while (precision > 0) { char cbuf[64]; /* Assume MB_CUR_MAX <= 64. */ int count; if (*arg_end == 0) /* Found the terminating null wide character. */ break; # if HAVE_WCRTOMB && !defined GNULIB_defined_mbstate_t count = wcrtomb (cbuf, *arg_end, &state); # else count = wctomb (cbuf, *arg_end); # endif if (count < 0) { /* Cannot convert. */ if (!(result == resultbuf || result == NULL)) free (result); if (buf_malloced != NULL) free (buf_malloced); CLEANUP (); errno = EILSEQ; return NULL; } if (precision < count) break; arg_end++; characters += count; precision -= count; } } # if DCHAR_IS_TCHAR else if (has_width) # else else # endif { /* Use the entire string, and count the number of bytes. */ # if HAVE_WCRTOMB && !defined GNULIB_defined_mbstate_t mbstate_t state; memset (&state, '\0', sizeof (mbstate_t)); # endif arg_end = arg; characters = 0; for (;;) { char cbuf[64]; /* Assume MB_CUR_MAX <= 64. */ int count; if (*arg_end == 0) /* Found the terminating null wide character. */ break; # if HAVE_WCRTOMB && !defined GNULIB_defined_mbstate_t count = wcrtomb (cbuf, *arg_end, &state); # else count = wctomb (cbuf, *arg_end); # endif if (count < 0) { /* Cannot convert. */ if (!(result == resultbuf || result == NULL)) free (result); if (buf_malloced != NULL) free (buf_malloced); CLEANUP (); errno = EILSEQ; return NULL; } arg_end++; characters += count; } } # if DCHAR_IS_TCHAR else { /* Use the entire string. */ arg_end = arg + local_wcslen (arg); /* The number of bytes doesn't matter. */ characters = 0; } # endif # if !DCHAR_IS_TCHAR /* Convert the string into a piece of temporary memory. */ tmpsrc = (TCHAR_T *) malloc (characters * sizeof (TCHAR_T)); if (tmpsrc == NULL) goto out_of_memory; { TCHAR_T *tmpptr = tmpsrc; size_t remaining; # if HAVE_WCRTOMB && !defined GNULIB_defined_mbstate_t mbstate_t state; memset (&state, '\0', sizeof (mbstate_t)); # endif for (remaining = characters; remaining > 0; ) { char cbuf[64]; /* Assume MB_CUR_MAX <= 64. */ int count; if (*arg == 0) abort (); # if HAVE_WCRTOMB && !defined GNULIB_defined_mbstate_t count = wcrtomb (cbuf, *arg, &state); # else count = wctomb (cbuf, *arg); # endif if (count <= 0) /* Inconsistency. */ abort (); memcpy (tmpptr, cbuf, count); tmpptr += count; arg++; remaining -= count; } if (!(arg == arg_end)) abort (); } /* Convert from TCHAR_T[] to DCHAR_T[]. */ tmpdst = DCHAR_CONV_FROM_ENCODING (locale_charset (), iconveh_question_mark, tmpsrc, characters, NULL, NULL, &tmpdst_len); if (tmpdst == NULL) { int saved_errno = errno; free (tmpsrc); if (!(result == resultbuf || result == NULL)) free (result); if (buf_malloced != NULL) free (buf_malloced); CLEANUP (); errno = saved_errno; return NULL; } free (tmpsrc); # endif if (has_width) { # if ENABLE_UNISTDIO /* Outside POSIX, it's preferrable to compare the width against the number of _characters_ of the converted value. */ w = DCHAR_MBSNLEN (result + length, characters); # else /* The width is compared against the number of _bytes_ of the converted value, says POSIX. */ w = characters; # endif } else /* w doesn't matter. */ w = 0; if (has_width && width > w && !(dp->flags & FLAG_LEFT)) { size_t n = width - w; ENSURE_ALLOCATION (xsum (length, n)); DCHAR_SET (result + length, ' ', n); length += n; } # if DCHAR_IS_TCHAR if (has_precision || has_width) { /* We know the number of bytes in advance. */ size_t remaining; # if HAVE_WCRTOMB && !defined GNULIB_defined_mbstate_t mbstate_t state; memset (&state, '\0', sizeof (mbstate_t)); # endif ENSURE_ALLOCATION (xsum (length, characters)); for (remaining = characters; remaining > 0; ) { char cbuf[64]; /* Assume MB_CUR_MAX <= 64. */ int count; if (*arg == 0) abort (); # if HAVE_WCRTOMB && !defined GNULIB_defined_mbstate_t count = wcrtomb (cbuf, *arg, &state); # else count = wctomb (cbuf, *arg); # endif if (count <= 0) /* Inconsistency. */ abort (); memcpy (result + length, cbuf, count); length += count; arg++; remaining -= count; } if (!(arg == arg_end)) abort (); } else { # if HAVE_WCRTOMB && !defined GNULIB_defined_mbstate_t mbstate_t state; memset (&state, '\0', sizeof (mbstate_t)); # endif while (arg < arg_end) { char cbuf[64]; /* Assume MB_CUR_MAX <= 64. */ int count; if (*arg == 0) abort (); # if HAVE_WCRTOMB && !defined GNULIB_defined_mbstate_t count = wcrtomb (cbuf, *arg, &state); # else count = wctomb (cbuf, *arg); # endif if (count <= 0) /* Inconsistency. */ abort (); ENSURE_ALLOCATION (xsum (length, count)); memcpy (result + length, cbuf, count); length += count; arg++; } } # else ENSURE_ALLOCATION (xsum (length, tmpdst_len)); DCHAR_CPY (result + length, tmpdst, tmpdst_len); free (tmpdst); length += tmpdst_len; # endif if (has_width && width > w && (dp->flags & FLAG_LEFT)) { size_t n = width - w; ENSURE_ALLOCATION (xsum (length, n)); DCHAR_SET (result + length, ' ', n); length += n; } } } # endif #endif #if (NEED_PRINTF_DIRECTIVE_A || NEED_PRINTF_LONG_DOUBLE || NEED_PRINTF_DOUBLE) && !defined IN_LIBINTL else if ((dp->conversion == 'a' || dp->conversion == 'A') # if !(NEED_PRINTF_DIRECTIVE_A || (NEED_PRINTF_LONG_DOUBLE && NEED_PRINTF_DOUBLE)) && (0 # if NEED_PRINTF_DOUBLE || a.arg[dp->arg_index].type == TYPE_DOUBLE # endif # if NEED_PRINTF_LONG_DOUBLE || a.arg[dp->arg_index].type == TYPE_LONGDOUBLE # endif ) # endif ) { arg_type type = a.arg[dp->arg_index].type; int flags = dp->flags; int has_width; size_t width; int has_precision; size_t precision; size_t tmp_length; DCHAR_T tmpbuf[700]; DCHAR_T *tmp; DCHAR_T *pad_ptr; DCHAR_T *p; has_width = 0; width = 0; if (dp->width_start != dp->width_end) { if (dp->width_arg_index != ARG_NONE) { int arg; if (!(a.arg[dp->width_arg_index].type == TYPE_INT)) abort (); arg = a.arg[dp->width_arg_index].a.a_int; if (arg < 0) { /* "A negative field width is taken as a '-' flag followed by a positive field width." */ flags |= FLAG_LEFT; width = (unsigned int) (-arg); } else width = arg; } else { const FCHAR_T *digitp = dp->width_start; do width = xsum (xtimes (width, 10), *digitp++ - '0'); while (digitp != dp->width_end); } has_width = 1; } has_precision = 0; precision = 0; if (dp->precision_start != dp->precision_end) { if (dp->precision_arg_index != ARG_NONE) { int arg; if (!(a.arg[dp->precision_arg_index].type == TYPE_INT)) abort (); arg = a.arg[dp->precision_arg_index].a.a_int; /* "A negative precision is taken as if the precision were omitted." */ if (arg >= 0) { precision = arg; has_precision = 1; } } else { const FCHAR_T *digitp = dp->precision_start + 1; precision = 0; while (digitp != dp->precision_end) precision = xsum (xtimes (precision, 10), *digitp++ - '0'); has_precision = 1; } } /* Allocate a temporary buffer of sufficient size. */ if (type == TYPE_LONGDOUBLE) tmp_length = (unsigned int) ((LDBL_DIG + 1) * 0.831 /* decimal -> hexadecimal */ ) + 1; /* turn floor into ceil */ else tmp_length = (unsigned int) ((DBL_DIG + 1) * 0.831 /* decimal -> hexadecimal */ ) + 1; /* turn floor into ceil */ if (tmp_length < precision) tmp_length = precision; /* Account for sign, decimal point etc. */ tmp_length = xsum (tmp_length, 12); if (tmp_length < width) tmp_length = width; tmp_length = xsum (tmp_length, 1); /* account for trailing NUL */ if (tmp_length <= sizeof (tmpbuf) / sizeof (DCHAR_T)) tmp = tmpbuf; else { size_t tmp_memsize = xtimes (tmp_length, sizeof (DCHAR_T)); if (size_overflow_p (tmp_memsize)) /* Overflow, would lead to out of memory. */ goto out_of_memory; tmp = (DCHAR_T *) malloc (tmp_memsize); if (tmp == NULL) /* Out of memory. */ goto out_of_memory; } pad_ptr = NULL; p = tmp; if (type == TYPE_LONGDOUBLE) { # if NEED_PRINTF_DIRECTIVE_A || NEED_PRINTF_LONG_DOUBLE long double arg = a.arg[dp->arg_index].a.a_longdouble; if (isnanl (arg)) { if (dp->conversion == 'A') { *p++ = 'N'; *p++ = 'A'; *p++ = 'N'; } else { *p++ = 'n'; *p++ = 'a'; *p++ = 'n'; } } else { int sign = 0; DECL_LONG_DOUBLE_ROUNDING BEGIN_LONG_DOUBLE_ROUNDING (); if (signbit (arg)) /* arg < 0.0L or negative zero */ { sign = -1; arg = -arg; } if (sign < 0) *p++ = '-'; else if (flags & FLAG_SHOWSIGN) *p++ = '+'; else if (flags & FLAG_SPACE) *p++ = ' '; if (arg > 0.0L && arg + arg == arg) { if (dp->conversion == 'A') { *p++ = 'I'; *p++ = 'N'; *p++ = 'F'; } else { *p++ = 'i'; *p++ = 'n'; *p++ = 'f'; } } else { int exponent; long double mantissa; if (arg > 0.0L) mantissa = printf_frexpl (arg, &exponent); else { exponent = 0; mantissa = 0.0L; } if (has_precision && precision < (unsigned int) ((LDBL_DIG + 1) * 0.831) + 1) { /* Round the mantissa. */ long double tail = mantissa; size_t q; for (q = precision; ; q--) { int digit = (int) tail; tail -= digit; if (q == 0) { if (digit & 1 ? tail >= 0.5L : tail > 0.5L) tail = 1 - tail; else tail = - tail; break; } tail *= 16.0L; } if (tail != 0.0L) for (q = precision; q > 0; q--) tail *= 0.0625L; mantissa += tail; } *p++ = '0'; *p++ = dp->conversion - 'A' + 'X'; pad_ptr = p; { int digit; digit = (int) mantissa; mantissa -= digit; *p++ = '0' + digit; if ((flags & FLAG_ALT) || mantissa > 0.0L || precision > 0) { *p++ = decimal_point_char (); /* This loop terminates because we assume that FLT_RADIX is a power of 2. */ while (mantissa > 0.0L) { mantissa *= 16.0L; digit = (int) mantissa; mantissa -= digit; *p++ = digit + (digit < 10 ? '0' : dp->conversion - 10); if (precision > 0) precision--; } while (precision > 0) { *p++ = '0'; precision--; } } } *p++ = dp->conversion - 'A' + 'P'; # if WIDE_CHAR_VERSION { static const wchar_t decimal_format[] = { '%', '+', 'd', '\0' }; SNPRINTF (p, 6 + 1, decimal_format, exponent); } while (*p != '\0') p++; # else if (sizeof (DCHAR_T) == 1) { sprintf ((char *) p, "%+d", exponent); while (*p != '\0') p++; } else { char expbuf[6 + 1]; const char *ep; sprintf (expbuf, "%+d", exponent); for (ep = expbuf; (*p = *ep) != '\0'; ep++) p++; } # endif } END_LONG_DOUBLE_ROUNDING (); } # else abort (); # endif } else { # if NEED_PRINTF_DIRECTIVE_A || NEED_PRINTF_DOUBLE double arg = a.arg[dp->arg_index].a.a_double; if (isnand (arg)) { if (dp->conversion == 'A') { *p++ = 'N'; *p++ = 'A'; *p++ = 'N'; } else { *p++ = 'n'; *p++ = 'a'; *p++ = 'n'; } } else { int sign = 0; if (signbit (arg)) /* arg < 0.0 or negative zero */ { sign = -1; arg = -arg; } if (sign < 0) *p++ = '-'; else if (flags & FLAG_SHOWSIGN) *p++ = '+'; else if (flags & FLAG_SPACE) *p++ = ' '; if (arg > 0.0 && arg + arg == arg) { if (dp->conversion == 'A') { *p++ = 'I'; *p++ = 'N'; *p++ = 'F'; } else { *p++ = 'i'; *p++ = 'n'; *p++ = 'f'; } } else { int exponent; double mantissa; if (arg > 0.0) mantissa = printf_frexp (arg, &exponent); else { exponent = 0; mantissa = 0.0; } if (has_precision && precision < (unsigned int) ((DBL_DIG + 1) * 0.831) + 1) { /* Round the mantissa. */ double tail = mantissa; size_t q; for (q = precision; ; q--) { int digit = (int) tail; tail -= digit; if (q == 0) { if (digit & 1 ? tail >= 0.5 : tail > 0.5) tail = 1 - tail; else tail = - tail; break; } tail *= 16.0; } if (tail != 0.0) for (q = precision; q > 0; q--) tail *= 0.0625; mantissa += tail; } *p++ = '0'; *p++ = dp->conversion - 'A' + 'X'; pad_ptr = p; { int digit; digit = (int) mantissa; mantissa -= digit; *p++ = '0' + digit; if ((flags & FLAG_ALT) || mantissa > 0.0 || precision > 0) { *p++ = decimal_point_char (); /* This loop terminates because we assume that FLT_RADIX is a power of 2. */ while (mantissa > 0.0) { mantissa *= 16.0; digit = (int) mantissa; mantissa -= digit; *p++ = digit + (digit < 10 ? '0' : dp->conversion - 10); if (precision > 0) precision--; } while (precision > 0) { *p++ = '0'; precision--; } } } *p++ = dp->conversion - 'A' + 'P'; # if WIDE_CHAR_VERSION { static const wchar_t decimal_format[] = { '%', '+', 'd', '\0' }; SNPRINTF (p, 6 + 1, decimal_format, exponent); } while (*p != '\0') p++; # else if (sizeof (DCHAR_T) == 1) { sprintf ((char *) p, "%+d", exponent); while (*p != '\0') p++; } else { char expbuf[6 + 1]; const char *ep; sprintf (expbuf, "%+d", exponent); for (ep = expbuf; (*p = *ep) != '\0'; ep++) p++; } # endif } } # else abort (); # endif } /* The generated string now extends from tmp to p, with the zero padding insertion point being at pad_ptr. */ if (has_width && p - tmp < width) { size_t pad = width - (p - tmp); DCHAR_T *end = p + pad; if (flags & FLAG_LEFT) { /* Pad with spaces on the right. */ for (; pad > 0; pad--) *p++ = ' '; } else if ((flags & FLAG_ZERO) && pad_ptr != NULL) { /* Pad with zeroes. */ DCHAR_T *q = end; while (p > pad_ptr) *--q = *--p; for (; pad > 0; pad--) *p++ = '0'; } else { /* Pad with spaces on the left. */ DCHAR_T *q = end; while (p > tmp) *--q = *--p; for (; pad > 0; pad--) *p++ = ' '; } p = end; } { size_t count = p - tmp; if (count >= tmp_length) /* tmp_length was incorrectly calculated - fix the code above! */ abort (); /* Make room for the result. */ if (count >= allocated - length) { size_t n = xsum (length, count); ENSURE_ALLOCATION (n); } /* Append the result. */ memcpy (result + length, tmp, count * sizeof (DCHAR_T)); if (tmp != tmpbuf) free (tmp); length += count; } } #endif #if (NEED_PRINTF_INFINITE_DOUBLE || NEED_PRINTF_DOUBLE || NEED_PRINTF_INFINITE_LONG_DOUBLE || NEED_PRINTF_LONG_DOUBLE) && !defined IN_LIBINTL else if ((dp->conversion == 'f' || dp->conversion == 'F' || dp->conversion == 'e' || dp->conversion == 'E' || dp->conversion == 'g' || dp->conversion == 'G' || dp->conversion == 'a' || dp->conversion == 'A') && (0 # if NEED_PRINTF_DOUBLE || a.arg[dp->arg_index].type == TYPE_DOUBLE # elif NEED_PRINTF_INFINITE_DOUBLE || (a.arg[dp->arg_index].type == TYPE_DOUBLE /* The systems (mingw) which produce wrong output for Inf, -Inf, and NaN also do so for -0.0. Therefore we treat this case here as well. */ && is_infinite_or_zero (a.arg[dp->arg_index].a.a_double)) # endif # if NEED_PRINTF_LONG_DOUBLE || a.arg[dp->arg_index].type == TYPE_LONGDOUBLE # elif NEED_PRINTF_INFINITE_LONG_DOUBLE || (a.arg[dp->arg_index].type == TYPE_LONGDOUBLE /* Some systems produce wrong output for Inf, -Inf, and NaN. Some systems in this category (IRIX 5.3) also do so for -0.0. Therefore we treat this case here as well. */ && is_infinite_or_zerol (a.arg[dp->arg_index].a.a_longdouble)) # endif )) { # if (NEED_PRINTF_DOUBLE || NEED_PRINTF_INFINITE_DOUBLE) && (NEED_PRINTF_LONG_DOUBLE || NEED_PRINTF_INFINITE_LONG_DOUBLE) arg_type type = a.arg[dp->arg_index].type; # endif int flags = dp->flags; int has_width; size_t width; int has_precision; size_t precision; size_t tmp_length; DCHAR_T tmpbuf[700]; DCHAR_T *tmp; DCHAR_T *pad_ptr; DCHAR_T *p; has_width = 0; width = 0; if (dp->width_start != dp->width_end) { if (dp->width_arg_index != ARG_NONE) { int arg; if (!(a.arg[dp->width_arg_index].type == TYPE_INT)) abort (); arg = a.arg[dp->width_arg_index].a.a_int; if (arg < 0) { /* "A negative field width is taken as a '-' flag followed by a positive field width." */ flags |= FLAG_LEFT; width = (unsigned int) (-arg); } else width = arg; } else { const FCHAR_T *digitp = dp->width_start; do width = xsum (xtimes (width, 10), *digitp++ - '0'); while (digitp != dp->width_end); } has_width = 1; } has_precision = 0; precision = 0; if (dp->precision_start != dp->precision_end) { if (dp->precision_arg_index != ARG_NONE) { int arg; if (!(a.arg[dp->precision_arg_index].type == TYPE_INT)) abort (); arg = a.arg[dp->precision_arg_index].a.a_int; /* "A negative precision is taken as if the precision were omitted." */ if (arg >= 0) { precision = arg; has_precision = 1; } } else { const FCHAR_T *digitp = dp->precision_start + 1; precision = 0; while (digitp != dp->precision_end) precision = xsum (xtimes (precision, 10), *digitp++ - '0'); has_precision = 1; } } /* POSIX specifies the default precision to be 6 for %f, %F, %e, %E, but not for %g, %G. Implementations appear to use the same default precision also for %g, %G. But for %a, %A, the default precision is 0. */ if (!has_precision) if (!(dp->conversion == 'a' || dp->conversion == 'A')) precision = 6; /* Allocate a temporary buffer of sufficient size. */ # if NEED_PRINTF_DOUBLE && NEED_PRINTF_LONG_DOUBLE tmp_length = (type == TYPE_LONGDOUBLE ? LDBL_DIG + 1 : DBL_DIG + 1); # elif NEED_PRINTF_INFINITE_DOUBLE && NEED_PRINTF_LONG_DOUBLE tmp_length = (type == TYPE_LONGDOUBLE ? LDBL_DIG + 1 : 0); # elif NEED_PRINTF_LONG_DOUBLE tmp_length = LDBL_DIG + 1; # elif NEED_PRINTF_DOUBLE tmp_length = DBL_DIG + 1; # else tmp_length = 0; # endif if (tmp_length < precision) tmp_length = precision; # if NEED_PRINTF_LONG_DOUBLE # if NEED_PRINTF_DOUBLE || NEED_PRINTF_INFINITE_DOUBLE if (type == TYPE_LONGDOUBLE) # endif if (dp->conversion == 'f' || dp->conversion == 'F') { long double arg = a.arg[dp->arg_index].a.a_longdouble; if (!(isnanl (arg) || arg + arg == arg)) { /* arg is finite and nonzero. */ int exponent = floorlog10l (arg < 0 ? -arg : arg); if (exponent >= 0 && tmp_length < exponent + precision) tmp_length = exponent + precision; } } # endif # if NEED_PRINTF_DOUBLE # if NEED_PRINTF_LONG_DOUBLE || NEED_PRINTF_INFINITE_LONG_DOUBLE if (type == TYPE_DOUBLE) # endif if (dp->conversion == 'f' || dp->conversion == 'F') { double arg = a.arg[dp->arg_index].a.a_double; if (!(isnand (arg) || arg + arg == arg)) { /* arg is finite and nonzero. */ int exponent = floorlog10 (arg < 0 ? -arg : arg); if (exponent >= 0 && tmp_length < exponent + precision) tmp_length = exponent + precision; } } # endif /* Account for sign, decimal point etc. */ tmp_length = xsum (tmp_length, 12); if (tmp_length < width) tmp_length = width; tmp_length = xsum (tmp_length, 1); /* account for trailing NUL */ if (tmp_length <= sizeof (tmpbuf) / sizeof (DCHAR_T)) tmp = tmpbuf; else { size_t tmp_memsize = xtimes (tmp_length, sizeof (DCHAR_T)); if (size_overflow_p (tmp_memsize)) /* Overflow, would lead to out of memory. */ goto out_of_memory; tmp = (DCHAR_T *) malloc (tmp_memsize); if (tmp == NULL) /* Out of memory. */ goto out_of_memory; } pad_ptr = NULL; p = tmp; # if NEED_PRINTF_LONG_DOUBLE || NEED_PRINTF_INFINITE_LONG_DOUBLE # if NEED_PRINTF_DOUBLE || NEED_PRINTF_INFINITE_DOUBLE if (type == TYPE_LONGDOUBLE) # endif { long double arg = a.arg[dp->arg_index].a.a_longdouble; if (isnanl (arg)) { if (dp->conversion >= 'A' && dp->conversion <= 'Z') { *p++ = 'N'; *p++ = 'A'; *p++ = 'N'; } else { *p++ = 'n'; *p++ = 'a'; *p++ = 'n'; } } else { int sign = 0; DECL_LONG_DOUBLE_ROUNDING BEGIN_LONG_DOUBLE_ROUNDING (); if (signbit (arg)) /* arg < 0.0L or negative zero */ { sign = -1; arg = -arg; } if (sign < 0) *p++ = '-'; else if (flags & FLAG_SHOWSIGN) *p++ = '+'; else if (flags & FLAG_SPACE) *p++ = ' '; if (arg > 0.0L && arg + arg == arg) { if (dp->conversion >= 'A' && dp->conversion <= 'Z') { *p++ = 'I'; *p++ = 'N'; *p++ = 'F'; } else { *p++ = 'i'; *p++ = 'n'; *p++ = 'f'; } } else { # if NEED_PRINTF_LONG_DOUBLE pad_ptr = p; if (dp->conversion == 'f' || dp->conversion == 'F') { char *digits; size_t ndigits; digits = scale10_round_decimal_long_double (arg, precision); if (digits == NULL) { END_LONG_DOUBLE_ROUNDING (); goto out_of_memory; } ndigits = strlen (digits); if (ndigits > precision) do { --ndigits; *p++ = digits[ndigits]; } while (ndigits > precision); else *p++ = '0'; /* Here ndigits <= precision. */ if ((flags & FLAG_ALT) || precision > 0) { *p++ = decimal_point_char (); for (; precision > ndigits; precision--) *p++ = '0'; while (ndigits > 0) { --ndigits; *p++ = digits[ndigits]; } } free (digits); } else if (dp->conversion == 'e' || dp->conversion == 'E') { int exponent; if (arg == 0.0L) { exponent = 0; *p++ = '0'; if ((flags & FLAG_ALT) || precision > 0) { *p++ = decimal_point_char (); for (; precision > 0; precision--) *p++ = '0'; } } else { /* arg > 0.0L. */ int adjusted; char *digits; size_t ndigits; exponent = floorlog10l (arg); adjusted = 0; for (;;) { digits = scale10_round_decimal_long_double (arg, (int)precision - exponent); if (digits == NULL) { END_LONG_DOUBLE_ROUNDING (); goto out_of_memory; } ndigits = strlen (digits); if (ndigits == precision + 1) break; if (ndigits < precision || ndigits > precision + 2) /* The exponent was not guessed precisely enough. */ abort (); if (adjusted) /* None of two values of exponent is the right one. Prevent an endless loop. */ abort (); free (digits); if (ndigits == precision) exponent -= 1; else exponent += 1; adjusted = 1; } /* Here ndigits = precision+1. */ if (is_borderline (digits, precision)) { /* Maybe the exponent guess was too high and a smaller exponent can be reached by turning a 10...0 into 9...9x. */ char *digits2 = scale10_round_decimal_long_double (arg, (int)precision - exponent + 1); if (digits2 == NULL) { free (digits); END_LONG_DOUBLE_ROUNDING (); goto out_of_memory; } if (strlen (digits2) == precision + 1) { free (digits); digits = digits2; exponent -= 1; } else free (digits2); } /* Here ndigits = precision+1. */ *p++ = digits[--ndigits]; if ((flags & FLAG_ALT) || precision > 0) { *p++ = decimal_point_char (); while (ndigits > 0) { --ndigits; *p++ = digits[ndigits]; } } free (digits); } *p++ = dp->conversion; /* 'e' or 'E' */ # if WIDE_CHAR_VERSION { static const wchar_t decimal_format[] = { '%', '+', '.', '2', 'd', '\0' }; SNPRINTF (p, 6 + 1, decimal_format, exponent); } while (*p != '\0') p++; # else if (sizeof (DCHAR_T) == 1) { sprintf ((char *) p, "%+.2d", exponent); while (*p != '\0') p++; } else { char expbuf[6 + 1]; const char *ep; sprintf (expbuf, "%+.2d", exponent); for (ep = expbuf; (*p = *ep) != '\0'; ep++) p++; } # endif } else if (dp->conversion == 'g' || dp->conversion == 'G') { if (precision == 0) precision = 1; /* precision >= 1. */ if (arg == 0.0L) /* The exponent is 0, >= -4, < precision. Use fixed-point notation. */ { size_t ndigits = precision; /* Number of trailing zeroes that have to be dropped. */ size_t nzeroes = (flags & FLAG_ALT ? 0 : precision - 1); --ndigits; *p++ = '0'; if ((flags & FLAG_ALT) || ndigits > nzeroes) { *p++ = decimal_point_char (); while (ndigits > nzeroes) { --ndigits; *p++ = '0'; } } } else { /* arg > 0.0L. */ int exponent; int adjusted; char *digits; size_t ndigits; size_t nzeroes; exponent = floorlog10l (arg); adjusted = 0; for (;;) { digits = scale10_round_decimal_long_double (arg, (int)(precision - 1) - exponent); if (digits == NULL) { END_LONG_DOUBLE_ROUNDING (); goto out_of_memory; } ndigits = strlen (digits); if (ndigits == precision) break; if (ndigits < precision - 1 || ndigits > precision + 1) /* The exponent was not guessed precisely enough. */ abort (); if (adjusted) /* None of two values of exponent is the right one. Prevent an endless loop. */ abort (); free (digits); if (ndigits < precision) exponent -= 1; else exponent += 1; adjusted = 1; } /* Here ndigits = precision. */ if (is_borderline (digits, precision - 1)) { /* Maybe the exponent guess was too high and a smaller exponent can be reached by turning a 10...0 into 9...9x. */ char *digits2 = scale10_round_decimal_long_double (arg, (int)(precision - 1) - exponent + 1); if (digits2 == NULL) { free (digits); END_LONG_DOUBLE_ROUNDING (); goto out_of_memory; } if (strlen (digits2) == precision) { free (digits); digits = digits2; exponent -= 1; } else free (digits2); } /* Here ndigits = precision. */ /* Determine the number of trailing zeroes that have to be dropped. */ nzeroes = 0; if ((flags & FLAG_ALT) == 0) while (nzeroes < ndigits && digits[nzeroes] == '0') nzeroes++; /* The exponent is now determined. */ if (exponent >= -4 && exponent < (long)precision) { /* Fixed-point notation: max(exponent,0)+1 digits, then the decimal point, then the remaining digits without trailing zeroes. */ if (exponent >= 0) { size_t count = exponent + 1; /* Note: count <= precision = ndigits. */ for (; count > 0; count--) *p++ = digits[--ndigits]; if ((flags & FLAG_ALT) || ndigits > nzeroes) { *p++ = decimal_point_char (); while (ndigits > nzeroes) { --ndigits; *p++ = digits[ndigits]; } } } else { size_t count = -exponent - 1; *p++ = '0'; *p++ = decimal_point_char (); for (; count > 0; count--) *p++ = '0'; while (ndigits > nzeroes) { --ndigits; *p++ = digits[ndigits]; } } } else { /* Exponential notation. */ *p++ = digits[--ndigits]; if ((flags & FLAG_ALT) || ndigits > nzeroes) { *p++ = decimal_point_char (); while (ndigits > nzeroes) { --ndigits; *p++ = digits[ndigits]; } } *p++ = dp->conversion - 'G' + 'E'; /* 'e' or 'E' */ # if WIDE_CHAR_VERSION { static const wchar_t decimal_format[] = { '%', '+', '.', '2', 'd', '\0' }; SNPRINTF (p, 6 + 1, decimal_format, exponent); } while (*p != '\0') p++; # else if (sizeof (DCHAR_T) == 1) { sprintf ((char *) p, "%+.2d", exponent); while (*p != '\0') p++; } else { char expbuf[6 + 1]; const char *ep; sprintf (expbuf, "%+.2d", exponent); for (ep = expbuf; (*p = *ep) != '\0'; ep++) p++; } # endif } free (digits); } } else abort (); # else /* arg is finite. */ if (!(arg == 0.0L)) abort (); pad_ptr = p; if (dp->conversion == 'f' || dp->conversion == 'F') { *p++ = '0'; if ((flags & FLAG_ALT) || precision > 0) { *p++ = decimal_point_char (); for (; precision > 0; precision--) *p++ = '0'; } } else if (dp->conversion == 'e' || dp->conversion == 'E') { *p++ = '0'; if ((flags & FLAG_ALT) || precision > 0) { *p++ = decimal_point_char (); for (; precision > 0; precision--) *p++ = '0'; } *p++ = dp->conversion; /* 'e' or 'E' */ *p++ = '+'; *p++ = '0'; *p++ = '0'; } else if (dp->conversion == 'g' || dp->conversion == 'G') { *p++ = '0'; if (flags & FLAG_ALT) { size_t ndigits = (precision > 0 ? precision - 1 : 0); *p++ = decimal_point_char (); for (; ndigits > 0; --ndigits) *p++ = '0'; } } else if (dp->conversion == 'a' || dp->conversion == 'A') { *p++ = '0'; *p++ = dp->conversion - 'A' + 'X'; pad_ptr = p; *p++ = '0'; if ((flags & FLAG_ALT) || precision > 0) { *p++ = decimal_point_char (); for (; precision > 0; precision--) *p++ = '0'; } *p++ = dp->conversion - 'A' + 'P'; *p++ = '+'; *p++ = '0'; } else abort (); # endif } END_LONG_DOUBLE_ROUNDING (); } } # if NEED_PRINTF_DOUBLE || NEED_PRINTF_INFINITE_DOUBLE else # endif # endif # if NEED_PRINTF_DOUBLE || NEED_PRINTF_INFINITE_DOUBLE { double arg = a.arg[dp->arg_index].a.a_double; if (isnand (arg)) { if (dp->conversion >= 'A' && dp->conversion <= 'Z') { *p++ = 'N'; *p++ = 'A'; *p++ = 'N'; } else { *p++ = 'n'; *p++ = 'a'; *p++ = 'n'; } } else { int sign = 0; if (signbit (arg)) /* arg < 0.0 or negative zero */ { sign = -1; arg = -arg; } if (sign < 0) *p++ = '-'; else if (flags & FLAG_SHOWSIGN) *p++ = '+'; else if (flags & FLAG_SPACE) *p++ = ' '; if (arg > 0.0 && arg + arg == arg) { if (dp->conversion >= 'A' && dp->conversion <= 'Z') { *p++ = 'I'; *p++ = 'N'; *p++ = 'F'; } else { *p++ = 'i'; *p++ = 'n'; *p++ = 'f'; } } else { # if NEED_PRINTF_DOUBLE pad_ptr = p; if (dp->conversion == 'f' || dp->conversion == 'F') { char *digits; size_t ndigits; digits = scale10_round_decimal_double (arg, precision); if (digits == NULL) goto out_of_memory; ndigits = strlen (digits); if (ndigits > precision) do { --ndigits; *p++ = digits[ndigits]; } while (ndigits > precision); else *p++ = '0'; /* Here ndigits <= precision. */ if ((flags & FLAG_ALT) || precision > 0) { *p++ = decimal_point_char (); for (; precision > ndigits; precision--) *p++ = '0'; while (ndigits > 0) { --ndigits; *p++ = digits[ndigits]; } } free (digits); } else if (dp->conversion == 'e' || dp->conversion == 'E') { int exponent; if (arg == 0.0) { exponent = 0; *p++ = '0'; if ((flags & FLAG_ALT) || precision > 0) { *p++ = decimal_point_char (); for (; precision > 0; precision--) *p++ = '0'; } } else { /* arg > 0.0. */ int adjusted; char *digits; size_t ndigits; exponent = floorlog10 (arg); adjusted = 0; for (;;) { digits = scale10_round_decimal_double (arg, (int)precision - exponent); if (digits == NULL) goto out_of_memory; ndigits = strlen (digits); if (ndigits == precision + 1) break; if (ndigits < precision || ndigits > precision + 2) /* The exponent was not guessed precisely enough. */ abort (); if (adjusted) /* None of two values of exponent is the right one. Prevent an endless loop. */ abort (); free (digits); if (ndigits == precision) exponent -= 1; else exponent += 1; adjusted = 1; } /* Here ndigits = precision+1. */ if (is_borderline (digits, precision)) { /* Maybe the exponent guess was too high and a smaller exponent can be reached by turning a 10...0 into 9...9x. */ char *digits2 = scale10_round_decimal_double (arg, (int)precision - exponent + 1); if (digits2 == NULL) { free (digits); goto out_of_memory; } if (strlen (digits2) == precision + 1) { free (digits); digits = digits2; exponent -= 1; } else free (digits2); } /* Here ndigits = precision+1. */ *p++ = digits[--ndigits]; if ((flags & FLAG_ALT) || precision > 0) { *p++ = decimal_point_char (); while (ndigits > 0) { --ndigits; *p++ = digits[ndigits]; } } free (digits); } *p++ = dp->conversion; /* 'e' or 'E' */ # if WIDE_CHAR_VERSION { static const wchar_t decimal_format[] = /* Produce the same number of exponent digits as the native printf implementation. */ # if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ { '%', '+', '.', '3', 'd', '\0' }; # else { '%', '+', '.', '2', 'd', '\0' }; # endif SNPRINTF (p, 6 + 1, decimal_format, exponent); } while (*p != '\0') p++; # else { static const char decimal_format[] = /* Produce the same number of exponent digits as the native printf implementation. */ # if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ "%+.3d"; # else "%+.2d"; # endif if (sizeof (DCHAR_T) == 1) { sprintf ((char *) p, decimal_format, exponent); while (*p != '\0') p++; } else { char expbuf[6 + 1]; const char *ep; sprintf (expbuf, decimal_format, exponent); for (ep = expbuf; (*p = *ep) != '\0'; ep++) p++; } } # endif } else if (dp->conversion == 'g' || dp->conversion == 'G') { if (precision == 0) precision = 1; /* precision >= 1. */ if (arg == 0.0) /* The exponent is 0, >= -4, < precision. Use fixed-point notation. */ { size_t ndigits = precision; /* Number of trailing zeroes that have to be dropped. */ size_t nzeroes = (flags & FLAG_ALT ? 0 : precision - 1); --ndigits; *p++ = '0'; if ((flags & FLAG_ALT) || ndigits > nzeroes) { *p++ = decimal_point_char (); while (ndigits > nzeroes) { --ndigits; *p++ = '0'; } } } else { /* arg > 0.0. */ int exponent; int adjusted; char *digits; size_t ndigits; size_t nzeroes; exponent = floorlog10 (arg); adjusted = 0; for (;;) { digits = scale10_round_decimal_double (arg, (int)(precision - 1) - exponent); if (digits == NULL) goto out_of_memory; ndigits = strlen (digits); if (ndigits == precision) break; if (ndigits < precision - 1 || ndigits > precision + 1) /* The exponent was not guessed precisely enough. */ abort (); if (adjusted) /* None of two values of exponent is the right one. Prevent an endless loop. */ abort (); free (digits); if (ndigits < precision) exponent -= 1; else exponent += 1; adjusted = 1; } /* Here ndigits = precision. */ if (is_borderline (digits, precision - 1)) { /* Maybe the exponent guess was too high and a smaller exponent can be reached by turning a 10...0 into 9...9x. */ char *digits2 = scale10_round_decimal_double (arg, (int)(precision - 1) - exponent + 1); if (digits2 == NULL) { free (digits); goto out_of_memory; } if (strlen (digits2) == precision) { free (digits); digits = digits2; exponent -= 1; } else free (digits2); } /* Here ndigits = precision. */ /* Determine the number of trailing zeroes that have to be dropped. */ nzeroes = 0; if ((flags & FLAG_ALT) == 0) while (nzeroes < ndigits && digits[nzeroes] == '0') nzeroes++; /* The exponent is now determined. */ if (exponent >= -4 && exponent < (long)precision) { /* Fixed-point notation: max(exponent,0)+1 digits, then the decimal point, then the remaining digits without trailing zeroes. */ if (exponent >= 0) { size_t count = exponent + 1; /* Note: count <= precision = ndigits. */ for (; count > 0; count--) *p++ = digits[--ndigits]; if ((flags & FLAG_ALT) || ndigits > nzeroes) { *p++ = decimal_point_char (); while (ndigits > nzeroes) { --ndigits; *p++ = digits[ndigits]; } } } else { size_t count = -exponent - 1; *p++ = '0'; *p++ = decimal_point_char (); for (; count > 0; count--) *p++ = '0'; while (ndigits > nzeroes) { --ndigits; *p++ = digits[ndigits]; } } } else { /* Exponential notation. */ *p++ = digits[--ndigits]; if ((flags & FLAG_ALT) || ndigits > nzeroes) { *p++ = decimal_point_char (); while (ndigits > nzeroes) { --ndigits; *p++ = digits[ndigits]; } } *p++ = dp->conversion - 'G' + 'E'; /* 'e' or 'E' */ # if WIDE_CHAR_VERSION { static const wchar_t decimal_format[] = /* Produce the same number of exponent digits as the native printf implementation. */ # if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ { '%', '+', '.', '3', 'd', '\0' }; # else { '%', '+', '.', '2', 'd', '\0' }; # endif SNPRINTF (p, 6 + 1, decimal_format, exponent); } while (*p != '\0') p++; # else { static const char decimal_format[] = /* Produce the same number of exponent digits as the native printf implementation. */ # if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ "%+.3d"; # else "%+.2d"; # endif if (sizeof (DCHAR_T) == 1) { sprintf ((char *) p, decimal_format, exponent); while (*p != '\0') p++; } else { char expbuf[6 + 1]; const char *ep; sprintf (expbuf, decimal_format, exponent); for (ep = expbuf; (*p = *ep) != '\0'; ep++) p++; } } # endif } free (digits); } } else abort (); # else /* arg is finite. */ if (!(arg == 0.0)) abort (); pad_ptr = p; if (dp->conversion == 'f' || dp->conversion == 'F') { *p++ = '0'; if ((flags & FLAG_ALT) || precision > 0) { *p++ = decimal_point_char (); for (; precision > 0; precision--) *p++ = '0'; } } else if (dp->conversion == 'e' || dp->conversion == 'E') { *p++ = '0'; if ((flags & FLAG_ALT) || precision > 0) { *p++ = decimal_point_char (); for (; precision > 0; precision--) *p++ = '0'; } *p++ = dp->conversion; /* 'e' or 'E' */ *p++ = '+'; /* Produce the same number of exponent digits as the native printf implementation. */ # if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ *p++ = '0'; # endif *p++ = '0'; *p++ = '0'; } else if (dp->conversion == 'g' || dp->conversion == 'G') { *p++ = '0'; if (flags & FLAG_ALT) { size_t ndigits = (precision > 0 ? precision - 1 : 0); *p++ = decimal_point_char (); for (; ndigits > 0; --ndigits) *p++ = '0'; } } else abort (); # endif } } } # endif /* The generated string now extends from tmp to p, with the zero padding insertion point being at pad_ptr. */ if (has_width && p - tmp < width) { size_t pad = width - (p - tmp); DCHAR_T *end = p + pad; if (flags & FLAG_LEFT) { /* Pad with spaces on the right. */ for (; pad > 0; pad--) *p++ = ' '; } else if ((flags & FLAG_ZERO) && pad_ptr != NULL) { /* Pad with zeroes. */ DCHAR_T *q = end; while (p > pad_ptr) *--q = *--p; for (; pad > 0; pad--) *p++ = '0'; } else { /* Pad with spaces on the left. */ DCHAR_T *q = end; while (p > tmp) *--q = *--p; for (; pad > 0; pad--) *p++ = ' '; } p = end; } { size_t count = p - tmp; if (count >= tmp_length) /* tmp_length was incorrectly calculated - fix the code above! */ abort (); /* Make room for the result. */ if (count >= allocated - length) { size_t n = xsum (length, count); ENSURE_ALLOCATION (n); } /* Append the result. */ memcpy (result + length, tmp, count * sizeof (DCHAR_T)); if (tmp != tmpbuf) free (tmp); length += count; } } #endif else { arg_type type = a.arg[dp->arg_index].type; int flags = dp->flags; #if !USE_SNPRINTF || !DCHAR_IS_TCHAR || ENABLE_UNISTDIO || NEED_PRINTF_FLAG_LEFTADJUST || NEED_PRINTF_FLAG_ZERO || NEED_PRINTF_UNBOUNDED_PRECISION int has_width; size_t width; #endif #if !USE_SNPRINTF || NEED_PRINTF_UNBOUNDED_PRECISION int has_precision; size_t precision; #endif #if NEED_PRINTF_UNBOUNDED_PRECISION int prec_ourselves; #else # define prec_ourselves 0 #endif #if NEED_PRINTF_FLAG_LEFTADJUST # define pad_ourselves 1 #elif !DCHAR_IS_TCHAR || ENABLE_UNISTDIO || NEED_PRINTF_FLAG_ZERO || NEED_PRINTF_UNBOUNDED_PRECISION int pad_ourselves; #else # define pad_ourselves 0 #endif TCHAR_T *fbp; unsigned int prefix_count; int prefixes[2] IF_LINT (= { 0 }); #if !USE_SNPRINTF size_t tmp_length; TCHAR_T tmpbuf[700]; TCHAR_T *tmp; #endif #if !USE_SNPRINTF || !DCHAR_IS_TCHAR || ENABLE_UNISTDIO || NEED_PRINTF_FLAG_LEFTADJUST || NEED_PRINTF_FLAG_ZERO || NEED_PRINTF_UNBOUNDED_PRECISION has_width = 0; width = 0; if (dp->width_start != dp->width_end) { if (dp->width_arg_index != ARG_NONE) { int arg; if (!(a.arg[dp->width_arg_index].type == TYPE_INT)) abort (); arg = a.arg[dp->width_arg_index].a.a_int; if (arg < 0) { /* "A negative field width is taken as a '-' flag followed by a positive field width." */ flags |= FLAG_LEFT; width = (unsigned int) (-arg); } else width = arg; } else { const FCHAR_T *digitp = dp->width_start; do width = xsum (xtimes (width, 10), *digitp++ - '0'); while (digitp != dp->width_end); } has_width = 1; } #endif #if !USE_SNPRINTF || NEED_PRINTF_UNBOUNDED_PRECISION has_precision = 0; precision = 6; if (dp->precision_start != dp->precision_end) { if (dp->precision_arg_index != ARG_NONE) { int arg; if (!(a.arg[dp->precision_arg_index].type == TYPE_INT)) abort (); arg = a.arg[dp->precision_arg_index].a.a_int; /* "A negative precision is taken as if the precision were omitted." */ if (arg >= 0) { precision = arg; has_precision = 1; } } else { const FCHAR_T *digitp = dp->precision_start + 1; precision = 0; while (digitp != dp->precision_end) precision = xsum (xtimes (precision, 10), *digitp++ - '0'); has_precision = 1; } } #endif /* Decide whether to handle the precision ourselves. */ #if NEED_PRINTF_UNBOUNDED_PRECISION switch (dp->conversion) { case 'd': case 'i': case 'u': case 'o': case 'x': case 'X': case 'p': prec_ourselves = has_precision && (precision > 0); break; default: prec_ourselves = 0; break; } #endif /* Decide whether to perform the padding ourselves. */ #if !NEED_PRINTF_FLAG_LEFTADJUST && (!DCHAR_IS_TCHAR || ENABLE_UNISTDIO || NEED_PRINTF_FLAG_ZERO || NEED_PRINTF_UNBOUNDED_PRECISION) switch (dp->conversion) { # if !DCHAR_IS_TCHAR || ENABLE_UNISTDIO /* If we need conversion from TCHAR_T[] to DCHAR_T[], we need to perform the padding after this conversion. Functions with unistdio extensions perform the padding based on character count rather than element count. */ case 'c': case 's': # endif # if NEED_PRINTF_FLAG_ZERO case 'f': case 'F': case 'e': case 'E': case 'g': case 'G': case 'a': case 'A': # endif pad_ourselves = 1; break; default: pad_ourselves = prec_ourselves; break; } #endif #if !USE_SNPRINTF /* Allocate a temporary buffer of sufficient size for calling sprintf. */ { switch (dp->conversion) { case 'd': case 'i': case 'u': # if HAVE_LONG_LONG_INT if (type == TYPE_LONGLONGINT || type == TYPE_ULONGLONGINT) tmp_length = (unsigned int) (sizeof (unsigned long long) * CHAR_BIT * 0.30103 /* binary -> decimal */ ) + 1; /* turn floor into ceil */ else # endif if (type == TYPE_LONGINT || type == TYPE_ULONGINT) tmp_length = (unsigned int) (sizeof (unsigned long) * CHAR_BIT * 0.30103 /* binary -> decimal */ ) + 1; /* turn floor into ceil */ else tmp_length = (unsigned int) (sizeof (unsigned int) * CHAR_BIT * 0.30103 /* binary -> decimal */ ) + 1; /* turn floor into ceil */ if (tmp_length < precision) tmp_length = precision; /* Multiply by 2, as an estimate for FLAG_GROUP. */ tmp_length = xsum (tmp_length, tmp_length); /* Add 1, to account for a leading sign. */ tmp_length = xsum (tmp_length, 1); break; case 'o': # if HAVE_LONG_LONG_INT if (type == TYPE_LONGLONGINT || type == TYPE_ULONGLONGINT) tmp_length = (unsigned int) (sizeof (unsigned long long) * CHAR_BIT * 0.333334 /* binary -> octal */ ) + 1; /* turn floor into ceil */ else # endif if (type == TYPE_LONGINT || type == TYPE_ULONGINT) tmp_length = (unsigned int) (sizeof (unsigned long) * CHAR_BIT * 0.333334 /* binary -> octal */ ) + 1; /* turn floor into ceil */ else tmp_length = (unsigned int) (sizeof (unsigned int) * CHAR_BIT * 0.333334 /* binary -> octal */ ) + 1; /* turn floor into ceil */ if (tmp_length < precision) tmp_length = precision; /* Add 1, to account for a leading sign. */ tmp_length = xsum (tmp_length, 1); break; case 'x': case 'X': # if HAVE_LONG_LONG_INT if (type == TYPE_LONGLONGINT || type == TYPE_ULONGLONGINT) tmp_length = (unsigned int) (sizeof (unsigned long long) * CHAR_BIT * 0.25 /* binary -> hexadecimal */ ) + 1; /* turn floor into ceil */ else # endif if (type == TYPE_LONGINT || type == TYPE_ULONGINT) tmp_length = (unsigned int) (sizeof (unsigned long) * CHAR_BIT * 0.25 /* binary -> hexadecimal */ ) + 1; /* turn floor into ceil */ else tmp_length = (unsigned int) (sizeof (unsigned int) * CHAR_BIT * 0.25 /* binary -> hexadecimal */ ) + 1; /* turn floor into ceil */ if (tmp_length < precision) tmp_length = precision; /* Add 2, to account for a leading sign or alternate form. */ tmp_length = xsum (tmp_length, 2); break; case 'f': case 'F': if (type == TYPE_LONGDOUBLE) tmp_length = (unsigned int) (LDBL_MAX_EXP * 0.30103 /* binary -> decimal */ * 2 /* estimate for FLAG_GROUP */ ) + 1 /* turn floor into ceil */ + 10; /* sign, decimal point etc. */ else tmp_length = (unsigned int) (DBL_MAX_EXP * 0.30103 /* binary -> decimal */ * 2 /* estimate for FLAG_GROUP */ ) + 1 /* turn floor into ceil */ + 10; /* sign, decimal point etc. */ tmp_length = xsum (tmp_length, precision); break; case 'e': case 'E': case 'g': case 'G': tmp_length = 12; /* sign, decimal point, exponent etc. */ tmp_length = xsum (tmp_length, precision); break; case 'a': case 'A': if (type == TYPE_LONGDOUBLE) tmp_length = (unsigned int) (LDBL_DIG * 0.831 /* decimal -> hexadecimal */ ) + 1; /* turn floor into ceil */ else tmp_length = (unsigned int) (DBL_DIG * 0.831 /* decimal -> hexadecimal */ ) + 1; /* turn floor into ceil */ if (tmp_length < precision) tmp_length = precision; /* Account for sign, decimal point etc. */ tmp_length = xsum (tmp_length, 12); break; case 'c': # if HAVE_WINT_T && !WIDE_CHAR_VERSION if (type == TYPE_WIDE_CHAR) tmp_length = MB_CUR_MAX; else # endif tmp_length = 1; break; case 's': # if HAVE_WCHAR_T if (type == TYPE_WIDE_STRING) { # if WIDE_CHAR_VERSION /* ISO C says about %ls in fwprintf: "If the precision is not specified or is greater than the size of the array, the array shall contain a null wide character." So if there is a precision, we must not use wcslen. */ const wchar_t *arg = a.arg[dp->arg_index].a.a_wide_string; if (has_precision) tmp_length = local_wcsnlen (arg, precision); else tmp_length = local_wcslen (arg); # else /* ISO C says about %ls in fprintf: "If a precision is specified, no more than that many bytes are written (including shift sequences, if any), and the array shall contain a null wide character if, to equal the multibyte character sequence length given by the precision, the function would need to access a wide character one past the end of the array." So if there is a precision, we must not use wcslen. */ /* This case has already been handled above. */ abort (); # endif } else # endif { # if WIDE_CHAR_VERSION /* ISO C says about %s in fwprintf: "If the precision is not specified or is greater than the size of the converted array, the converted array shall contain a null wide character." So if there is a precision, we must not use strlen. */ /* This case has already been handled above. */ abort (); # else /* ISO C says about %s in fprintf: "If the precision is not specified or greater than the size of the array, the array shall contain a null character." So if there is a precision, we must not use strlen. */ const char *arg = a.arg[dp->arg_index].a.a_string; if (has_precision) tmp_length = local_strnlen (arg, precision); else tmp_length = strlen (arg); # endif } break; case 'p': tmp_length = (unsigned int) (sizeof (void *) * CHAR_BIT * 0.25 /* binary -> hexadecimal */ ) + 1 /* turn floor into ceil */ + 2; /* account for leading 0x */ break; default: abort (); } if (!pad_ourselves) { # if ENABLE_UNISTDIO /* Padding considers the number of characters, therefore the number of elements after padding may be > max (tmp_length, width) but is certainly <= tmp_length + width. */ tmp_length = xsum (tmp_length, width); # else /* Padding considers the number of elements, says POSIX. */ if (tmp_length < width) tmp_length = width; # endif } tmp_length = xsum (tmp_length, 1); /* account for trailing NUL */ } if (tmp_length <= sizeof (tmpbuf) / sizeof (TCHAR_T)) tmp = tmpbuf; else { size_t tmp_memsize = xtimes (tmp_length, sizeof (TCHAR_T)); if (size_overflow_p (tmp_memsize)) /* Overflow, would lead to out of memory. */ goto out_of_memory; tmp = (TCHAR_T *) malloc (tmp_memsize); if (tmp == NULL) /* Out of memory. */ goto out_of_memory; } #endif /* Construct the format string for calling snprintf or sprintf. */ fbp = buf; *fbp++ = '%'; #if NEED_PRINTF_FLAG_GROUPING /* The underlying implementation doesn't support the ' flag. Produce no grouping characters in this case; this is acceptable because the grouping is locale dependent. */ #else if (flags & FLAG_GROUP) *fbp++ = '\''; #endif if (flags & FLAG_LEFT) *fbp++ = '-'; if (flags & FLAG_SHOWSIGN) *fbp++ = '+'; if (flags & FLAG_SPACE) *fbp++ = ' '; if (flags & FLAG_ALT) *fbp++ = '#'; if (!pad_ourselves) { if (flags & FLAG_ZERO) *fbp++ = '0'; if (dp->width_start != dp->width_end) { size_t n = dp->width_end - dp->width_start; /* The width specification is known to consist only of standard ASCII characters. */ if (sizeof (FCHAR_T) == sizeof (TCHAR_T)) { memcpy (fbp, dp->width_start, n * sizeof (TCHAR_T)); fbp += n; } else { const FCHAR_T *mp = dp->width_start; do *fbp++ = (unsigned char) *mp++; while (--n > 0); } } } if (!prec_ourselves) { if (dp->precision_start != dp->precision_end) { size_t n = dp->precision_end - dp->precision_start; /* The precision specification is known to consist only of standard ASCII characters. */ if (sizeof (FCHAR_T) == sizeof (TCHAR_T)) { memcpy (fbp, dp->precision_start, n * sizeof (TCHAR_T)); fbp += n; } else { const FCHAR_T *mp = dp->precision_start; do *fbp++ = (unsigned char) *mp++; while (--n > 0); } } } switch (type) { #if HAVE_LONG_LONG_INT case TYPE_LONGLONGINT: case TYPE_ULONGLONGINT: # if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ *fbp++ = 'I'; *fbp++ = '6'; *fbp++ = '4'; break; # else *fbp++ = 'l'; /*FALLTHROUGH*/ # endif #endif case TYPE_LONGINT: case TYPE_ULONGINT: #if HAVE_WINT_T case TYPE_WIDE_CHAR: #endif #if HAVE_WCHAR_T case TYPE_WIDE_STRING: #endif *fbp++ = 'l'; break; case TYPE_LONGDOUBLE: *fbp++ = 'L'; break; default: break; } #if NEED_PRINTF_DIRECTIVE_F if (dp->conversion == 'F') *fbp = 'f'; else #endif *fbp = dp->conversion; #if USE_SNPRINTF # if !(__GLIBC__ > 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 3) || ((defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__)) fbp[1] = '%'; fbp[2] = 'n'; fbp[3] = '\0'; # else /* On glibc2 systems from glibc >= 2.3 - probably also older ones - we know that snprintf's returns value conforms to ISO C 99: the gl_SNPRINTF_DIRECTIVE_N test passes. Therefore we can avoid using %n in this situation. On glibc2 systems from 2004-10-18 or newer, the use of %n in format strings in writable memory may crash the program (if compiled with _FORTIFY_SOURCE=2), so we should avoid it in this situation. */ /* On native Win32 systems (such as mingw), we can avoid using %n because: - Although the gl_SNPRINTF_TRUNCATION_C99 test fails, snprintf does not write more than the specified number of bytes. (snprintf (buf, 3, "%d %d", 4567, 89) writes '4', '5', '6' into buf, not '4', '5', '\0'.) - Although the gl_SNPRINTF_RETVAL_C99 test fails, snprintf allows us to recognize the case of an insufficient buffer size: it returns -1 in this case. On native Win32 systems (such as mingw) where the OS is Windows Vista, the use of %n in format strings by default crashes the program. See and So we should avoid %n in this situation. */ fbp[1] = '\0'; # endif #else fbp[1] = '\0'; #endif /* Construct the arguments for calling snprintf or sprintf. */ prefix_count = 0; if (!pad_ourselves && dp->width_arg_index != ARG_NONE) { if (!(a.arg[dp->width_arg_index].type == TYPE_INT)) abort (); prefixes[prefix_count++] = a.arg[dp->width_arg_index].a.a_int; } if (!prec_ourselves && dp->precision_arg_index != ARG_NONE) { if (!(a.arg[dp->precision_arg_index].type == TYPE_INT)) abort (); prefixes[prefix_count++] = a.arg[dp->precision_arg_index].a.a_int; } #if USE_SNPRINTF /* The SNPRINTF result is appended after result[0..length]. The latter is an array of DCHAR_T; SNPRINTF appends an array of TCHAR_T to it. This is possible because sizeof (TCHAR_T) divides sizeof (DCHAR_T) and alignof (TCHAR_T) <= alignof (DCHAR_T). */ # define TCHARS_PER_DCHAR (sizeof (DCHAR_T) / sizeof (TCHAR_T)) /* Ensure that maxlen below will be >= 2. Needed on BeOS, where an snprintf() with maxlen==1 acts like sprintf(). */ ENSURE_ALLOCATION (xsum (length, (2 + TCHARS_PER_DCHAR - 1) / TCHARS_PER_DCHAR)); /* Prepare checking whether snprintf returns the count via %n. */ *(TCHAR_T *) (result + length) = '\0'; #endif for (;;) { int count = -1; #if USE_SNPRINTF int retcount = 0; size_t maxlen = allocated - length; /* SNPRINTF can fail if its second argument is > INT_MAX. */ if (maxlen > INT_MAX / TCHARS_PER_DCHAR) maxlen = INT_MAX / TCHARS_PER_DCHAR; maxlen = maxlen * TCHARS_PER_DCHAR; # define SNPRINTF_BUF(arg) \ switch (prefix_count) \ { \ case 0: \ retcount = SNPRINTF ((TCHAR_T *) (result + length), \ maxlen, buf, \ arg, &count); \ break; \ case 1: \ retcount = SNPRINTF ((TCHAR_T *) (result + length), \ maxlen, buf, \ prefixes[0], arg, &count); \ break; \ case 2: \ retcount = SNPRINTF ((TCHAR_T *) (result + length), \ maxlen, buf, \ prefixes[0], prefixes[1], arg, \ &count); \ break; \ default: \ abort (); \ } #else # define SNPRINTF_BUF(arg) \ switch (prefix_count) \ { \ case 0: \ count = sprintf (tmp, buf, arg); \ break; \ case 1: \ count = sprintf (tmp, buf, prefixes[0], arg); \ break; \ case 2: \ count = sprintf (tmp, buf, prefixes[0], prefixes[1],\ arg); \ break; \ default: \ abort (); \ } #endif switch (type) { case TYPE_SCHAR: { int arg = a.arg[dp->arg_index].a.a_schar; SNPRINTF_BUF (arg); } break; case TYPE_UCHAR: { unsigned int arg = a.arg[dp->arg_index].a.a_uchar; SNPRINTF_BUF (arg); } break; case TYPE_SHORT: { int arg = a.arg[dp->arg_index].a.a_short; SNPRINTF_BUF (arg); } break; case TYPE_USHORT: { unsigned int arg = a.arg[dp->arg_index].a.a_ushort; SNPRINTF_BUF (arg); } break; case TYPE_INT: { int arg = a.arg[dp->arg_index].a.a_int; SNPRINTF_BUF (arg); } break; case TYPE_UINT: { unsigned int arg = a.arg[dp->arg_index].a.a_uint; SNPRINTF_BUF (arg); } break; case TYPE_LONGINT: { long int arg = a.arg[dp->arg_index].a.a_longint; SNPRINTF_BUF (arg); } break; case TYPE_ULONGINT: { unsigned long int arg = a.arg[dp->arg_index].a.a_ulongint; SNPRINTF_BUF (arg); } break; #if HAVE_LONG_LONG_INT case TYPE_LONGLONGINT: { long long int arg = a.arg[dp->arg_index].a.a_longlongint; SNPRINTF_BUF (arg); } break; case TYPE_ULONGLONGINT: { unsigned long long int arg = a.arg[dp->arg_index].a.a_ulonglongint; SNPRINTF_BUF (arg); } break; #endif case TYPE_DOUBLE: { double arg = a.arg[dp->arg_index].a.a_double; SNPRINTF_BUF (arg); } break; case TYPE_LONGDOUBLE: { long double arg = a.arg[dp->arg_index].a.a_longdouble; SNPRINTF_BUF (arg); } break; case TYPE_CHAR: { int arg = a.arg[dp->arg_index].a.a_char; SNPRINTF_BUF (arg); } break; #if HAVE_WINT_T case TYPE_WIDE_CHAR: { wint_t arg = a.arg[dp->arg_index].a.a_wide_char; SNPRINTF_BUF (arg); } break; #endif case TYPE_STRING: { const char *arg = a.arg[dp->arg_index].a.a_string; SNPRINTF_BUF (arg); } break; #if HAVE_WCHAR_T case TYPE_WIDE_STRING: { const wchar_t *arg = a.arg[dp->arg_index].a.a_wide_string; SNPRINTF_BUF (arg); } break; #endif case TYPE_POINTER: { void *arg = a.arg[dp->arg_index].a.a_pointer; SNPRINTF_BUF (arg); } break; default: abort (); } #if USE_SNPRINTF /* Portability: Not all implementations of snprintf() are ISO C 99 compliant. Determine the number of bytes that snprintf() has produced or would have produced. */ if (count >= 0) { /* Verify that snprintf() has NUL-terminated its result. */ if (count < maxlen && ((TCHAR_T *) (result + length)) [count] != '\0') abort (); /* Portability hack. */ if (retcount > count) count = retcount; } else { /* snprintf() doesn't understand the '%n' directive. */ if (fbp[1] != '\0') { /* Don't use the '%n' directive; instead, look at the snprintf() return value. */ fbp[1] = '\0'; continue; } else { /* Look at the snprintf() return value. */ if (retcount < 0) { /* HP-UX 10.20 snprintf() is doubly deficient: It doesn't understand the '%n' directive, *and* it returns -1 (rather than the length that would have been required) when the buffer is too small. */ size_t bigger_need = xsum (xtimes (allocated, 2), 12); ENSURE_ALLOCATION (bigger_need); continue; } else count = retcount; } } #endif /* Attempt to handle failure. */ if (count < 0) { if (!(result == resultbuf || result == NULL)) free (result); if (buf_malloced != NULL) free (buf_malloced); CLEANUP (); errno = EINVAL; return NULL; } #if USE_SNPRINTF /* Handle overflow of the allocated buffer. If such an overflow occurs, a C99 compliant snprintf() returns a count >= maxlen. However, a non-compliant snprintf() function returns only count = maxlen - 1. To cover both cases, test whether count >= maxlen - 1. */ if ((unsigned int) count + 1 >= maxlen) { /* If maxlen already has attained its allowed maximum, allocating more memory will not increase maxlen. Instead of looping, bail out. */ if (maxlen == INT_MAX / TCHARS_PER_DCHAR) goto overflow; else { /* Need at least (count + 1) * sizeof (TCHAR_T) bytes. (The +1 is for the trailing NUL.) But ask for (count + 2) * sizeof (TCHAR_T) bytes, so that in the next round, we likely get maxlen > (unsigned int) count + 1 and so we don't get here again. And allocate proportionally, to avoid looping eternally if snprintf() reports a too small count. */ size_t n = xmax (xsum (length, ((unsigned int) count + 2 + TCHARS_PER_DCHAR - 1) / TCHARS_PER_DCHAR), xtimes (allocated, 2)); ENSURE_ALLOCATION (n); continue; } } #endif #if NEED_PRINTF_UNBOUNDED_PRECISION if (prec_ourselves) { /* Handle the precision. */ TCHAR_T *prec_ptr = # if USE_SNPRINTF (TCHAR_T *) (result + length); # else tmp; # endif size_t prefix_count; size_t move; prefix_count = 0; /* Put the additional zeroes after the sign. */ if (count >= 1 && (*prec_ptr == '-' || *prec_ptr == '+' || *prec_ptr == ' ')) prefix_count = 1; /* Put the additional zeroes after the 0x prefix if (flags & FLAG_ALT) || (dp->conversion == 'p'). */ else if (count >= 2 && prec_ptr[0] == '0' && (prec_ptr[1] == 'x' || prec_ptr[1] == 'X')) prefix_count = 2; move = count - prefix_count; if (precision > move) { /* Insert zeroes. */ size_t insert = precision - move; TCHAR_T *prec_end; # if USE_SNPRINTF size_t n = xsum (length, (count + insert + TCHARS_PER_DCHAR - 1) / TCHARS_PER_DCHAR); length += (count + TCHARS_PER_DCHAR - 1) / TCHARS_PER_DCHAR; ENSURE_ALLOCATION (n); length -= (count + TCHARS_PER_DCHAR - 1) / TCHARS_PER_DCHAR; prec_ptr = (TCHAR_T *) (result + length); # endif prec_end = prec_ptr + count; prec_ptr += prefix_count; while (prec_end > prec_ptr) { prec_end--; prec_end[insert] = prec_end[0]; } prec_end += insert; do *--prec_end = '0'; while (prec_end > prec_ptr); count += insert; } } #endif #if !USE_SNPRINTF if (count >= tmp_length) /* tmp_length was incorrectly calculated - fix the code above! */ abort (); #endif #if !DCHAR_IS_TCHAR /* Convert from TCHAR_T[] to DCHAR_T[]. */ if (dp->conversion == 'c' || dp->conversion == 's') { /* type = TYPE_CHAR or TYPE_WIDE_CHAR or TYPE_STRING TYPE_WIDE_STRING. The result string is not certainly ASCII. */ const TCHAR_T *tmpsrc; DCHAR_T *tmpdst; size_t tmpdst_len; /* This code assumes that TCHAR_T is 'char'. */ typedef int TCHAR_T_verify [2 * (sizeof (TCHAR_T) == 1) - 1]; # if USE_SNPRINTF tmpsrc = (TCHAR_T *) (result + length); # else tmpsrc = tmp; # endif tmpdst = DCHAR_CONV_FROM_ENCODING (locale_charset (), iconveh_question_mark, tmpsrc, count, NULL, NULL, &tmpdst_len); if (tmpdst == NULL) { int saved_errno = errno; if (!(result == resultbuf || result == NULL)) free (result); if (buf_malloced != NULL) free (buf_malloced); CLEANUP (); errno = saved_errno; return NULL; } ENSURE_ALLOCATION (xsum (length, tmpdst_len)); DCHAR_CPY (result + length, tmpdst, tmpdst_len); free (tmpdst); count = tmpdst_len; } else { /* The result string is ASCII. Simple 1:1 conversion. */ # if USE_SNPRINTF /* If sizeof (DCHAR_T) == sizeof (TCHAR_T), it's a no-op conversion, in-place on the array starting at (result + length). */ if (sizeof (DCHAR_T) != sizeof (TCHAR_T)) # endif { const TCHAR_T *tmpsrc; DCHAR_T *tmpdst; size_t n; # if USE_SNPRINTF if (result == resultbuf) { tmpsrc = (TCHAR_T *) (result + length); /* ENSURE_ALLOCATION will not move tmpsrc (because it's part of resultbuf). */ ENSURE_ALLOCATION (xsum (length, count)); } else { /* ENSURE_ALLOCATION will move the array (because it uses realloc(). */ ENSURE_ALLOCATION (xsum (length, count)); tmpsrc = (TCHAR_T *) (result + length); } # else tmpsrc = tmp; ENSURE_ALLOCATION (xsum (length, count)); # endif tmpdst = result + length; /* Copy backwards, because of overlapping. */ tmpsrc += count; tmpdst += count; for (n = count; n > 0; n--) *--tmpdst = (unsigned char) *--tmpsrc; } } #endif #if DCHAR_IS_TCHAR && !USE_SNPRINTF /* Make room for the result. */ if (count > allocated - length) { /* Need at least count elements. But allocate proportionally. */ size_t n = xmax (xsum (length, count), xtimes (allocated, 2)); ENSURE_ALLOCATION (n); } #endif /* Here count <= allocated - length. */ /* Perform padding. */ #if !DCHAR_IS_TCHAR || ENABLE_UNISTDIO || NEED_PRINTF_FLAG_LEFTADJUST || NEED_PRINTF_FLAG_ZERO || NEED_PRINTF_UNBOUNDED_PRECISION if (pad_ourselves && has_width) { size_t w; # if ENABLE_UNISTDIO /* Outside POSIX, it's preferrable to compare the width against the number of _characters_ of the converted value. */ w = DCHAR_MBSNLEN (result + length, count); # else /* The width is compared against the number of _bytes_ of the converted value, says POSIX. */ w = count; # endif if (w < width) { size_t pad = width - w; /* Make room for the result. */ if (xsum (count, pad) > allocated - length) { /* Need at least count + pad elements. But allocate proportionally. */ size_t n = xmax (xsum3 (length, count, pad), xtimes (allocated, 2)); # if USE_SNPRINTF length += count; ENSURE_ALLOCATION (n); length -= count; # else ENSURE_ALLOCATION (n); # endif } /* Here count + pad <= allocated - length. */ { # if !DCHAR_IS_TCHAR || USE_SNPRINTF DCHAR_T * const rp = result + length; # else DCHAR_T * const rp = tmp; # endif DCHAR_T *p = rp + count; DCHAR_T *end = p + pad; DCHAR_T *pad_ptr; # if !DCHAR_IS_TCHAR || ENABLE_UNISTDIO if (dp->conversion == 'c' || dp->conversion == 's') /* No zero-padding for string directives. */ pad_ptr = NULL; else # endif { pad_ptr = (*rp == '-' ? rp + 1 : rp); /* No zero-padding of "inf" and "nan". */ if ((*pad_ptr >= 'A' && *pad_ptr <= 'Z') || (*pad_ptr >= 'a' && *pad_ptr <= 'z')) pad_ptr = NULL; } /* The generated string now extends from rp to p, with the zero padding insertion point being at pad_ptr. */ count = count + pad; /* = end - rp */ if (flags & FLAG_LEFT) { /* Pad with spaces on the right. */ for (; pad > 0; pad--) *p++ = ' '; } else if ((flags & FLAG_ZERO) && pad_ptr != NULL) { /* Pad with zeroes. */ DCHAR_T *q = end; while (p > pad_ptr) *--q = *--p; for (; pad > 0; pad--) *p++ = '0'; } else { /* Pad with spaces on the left. */ DCHAR_T *q = end; while (p > rp) *--q = *--p; for (; pad > 0; pad--) *p++ = ' '; } } } } #endif /* Here still count <= allocated - length. */ #if !DCHAR_IS_TCHAR || USE_SNPRINTF /* The snprintf() result did fit. */ #else /* Append the sprintf() result. */ memcpy (result + length, tmp, count * sizeof (DCHAR_T)); #endif #if !USE_SNPRINTF if (tmp != tmpbuf) free (tmp); #endif #if NEED_PRINTF_DIRECTIVE_F if (dp->conversion == 'F') { /* Convert the %f result to upper case for %F. */ DCHAR_T *rp = result + length; size_t rc; for (rc = count; rc > 0; rc--, rp++) if (*rp >= 'a' && *rp <= 'z') *rp = *rp - 'a' + 'A'; } #endif length += count; break; } } } } /* Add the final NUL. */ ENSURE_ALLOCATION (xsum (length, 1)); result[length] = '\0'; if (result != resultbuf && length + 1 < allocated) { /* Shrink the allocated memory if possible. */ DCHAR_T *memory; memory = (DCHAR_T *) realloc (result, (length + 1) * sizeof (DCHAR_T)); if (memory != NULL) result = memory; } if (buf_malloced != NULL) free (buf_malloced); CLEANUP (); *lengthp = length; /* Note that we can produce a big string of a length > INT_MAX. POSIX says that snprintf() fails with errno = EOVERFLOW in this case, but that's only because snprintf() returns an 'int'. This function does not have this limitation. */ return result; #if USE_SNPRINTF overflow: if (!(result == resultbuf || result == NULL)) free (result); if (buf_malloced != NULL) free (buf_malloced); CLEANUP (); errno = EOVERFLOW; return NULL; #endif out_of_memory: if (!(result == resultbuf || result == NULL)) free (result); if (buf_malloced != NULL) free (buf_malloced); out_of_memory_1: CLEANUP (); errno = ENOMEM; return NULL; } } #undef TCHARS_PER_DCHAR #undef SNPRINTF #undef USE_SNPRINTF #undef DCHAR_SET #undef DCHAR_CPY #undef PRINTF_PARSE #undef DIRECTIVES #undef DIRECTIVE #undef DCHAR_IS_TCHAR #undef TCHAR_T #undef DCHAR_T #undef FCHAR_T #undef VASNPRINTF libprelude-1.0.0/libmissing/streq.h0000664000076400007640000000764311341220440014242 00000000000000/* Optimized string comparison. Copyright (C) 2001-2002, 2007, 2009-2010 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 3 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 Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . */ /* Written by Bruno Haible . */ #ifndef _GL_STREQ_H #define _GL_STREQ_H #include /* STREQ allows to optimize string comparison with a small literal string. STREQ (s, "EUC-KR", 'E', 'U', 'C', '-', 'K', 'R', 0, 0, 0) is semantically equivalent to strcmp (s, "EUC-KR") == 0 just faster. */ /* Help GCC to generate good code for string comparisons with immediate strings. */ #if defined (__GNUC__) && defined (__OPTIMIZE__) static inline int streq9 (const char *s1, const char *s2) { return strcmp (s1 + 9, s2 + 9) == 0; } static inline int streq8 (const char *s1, const char *s2, char s28) { if (s1[8] == s28) { if (s28 == 0) return 1; else return streq9 (s1, s2); } else return 0; } static inline int streq7 (const char *s1, const char *s2, char s27, char s28) { if (s1[7] == s27) { if (s27 == 0) return 1; else return streq8 (s1, s2, s28); } else return 0; } static inline int streq6 (const char *s1, const char *s2, char s26, char s27, char s28) { if (s1[6] == s26) { if (s26 == 0) return 1; else return streq7 (s1, s2, s27, s28); } else return 0; } static inline int streq5 (const char *s1, const char *s2, char s25, char s26, char s27, char s28) { if (s1[5] == s25) { if (s25 == 0) return 1; else return streq6 (s1, s2, s26, s27, s28); } else return 0; } static inline int streq4 (const char *s1, const char *s2, char s24, char s25, char s26, char s27, char s28) { if (s1[4] == s24) { if (s24 == 0) return 1; else return streq5 (s1, s2, s25, s26, s27, s28); } else return 0; } static inline int streq3 (const char *s1, const char *s2, char s23, char s24, char s25, char s26, char s27, char s28) { if (s1[3] == s23) { if (s23 == 0) return 1; else return streq4 (s1, s2, s24, s25, s26, s27, s28); } else return 0; } static inline int streq2 (const char *s1, const char *s2, char s22, char s23, char s24, char s25, char s26, char s27, char s28) { if (s1[2] == s22) { if (s22 == 0) return 1; else return streq3 (s1, s2, s23, s24, s25, s26, s27, s28); } else return 0; } static inline int streq1 (const char *s1, const char *s2, char s21, char s22, char s23, char s24, char s25, char s26, char s27, char s28) { if (s1[1] == s21) { if (s21 == 0) return 1; else return streq2 (s1, s2, s22, s23, s24, s25, s26, s27, s28); } else return 0; } static inline int streq0 (const char *s1, const char *s2, char s20, char s21, char s22, char s23, char s24, char s25, char s26, char s27, char s28) { if (s1[0] == s20) { if (s20 == 0) return 1; else return streq1 (s1, s2, s21, s22, s23, s24, s25, s26, s27, s28); } else return 0; } #define STREQ(s1,s2,s20,s21,s22,s23,s24,s25,s26,s27,s28) \ streq0 (s1, s2, s20, s21, s22, s23, s24, s25, s26, s27, s28) #else #define STREQ(s1,s2,s20,s21,s22,s23,s24,s25,s26,s27,s28) \ (strcmp (s1, s2) == 0) #endif #endif /* _GL_STREQ_H */ libprelude-1.0.0/libmissing/netdb.in.h0000664000076400007640000001573311345707014014617 00000000000000/* Provide a netdb.h header file for systems lacking it (read: MinGW). Copyright (C) 2008-2010 Free Software Foundation, Inc. Written by Simon Josefsson. This program is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser 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 Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ /* This file is supposed to be used on platforms that lack . It is intended to provide definitions and prototypes needed by an application. */ #ifndef _GL_NETDB_H #if @HAVE_NETDB_H@ # if __GNUC__ >= 3 @PRAGMA_SYSTEM_HEADER@ # endif /* The include_next requires a split double-inclusion guard. */ # @INCLUDE_NEXT@ @NEXT_NETDB_H@ #endif #ifndef _GL_NETDB_H #define _GL_NETDB_H /* Get netdb.h definitions such as struct hostent for MinGW. */ #include /* The definition of _GL_ARG_NONNULL is copied here. */ /* Declarations for a platform that lacks , or where it is incomplete. */ #if @GNULIB_GETADDRINFO@ # if !@HAVE_STRUCT_ADDRINFO@ /* Structure to contain information about address of a service provider. */ struct addrinfo { int ai_flags; /* Input flags. */ int ai_family; /* Protocol family for socket. */ int ai_socktype; /* Socket type. */ int ai_protocol; /* Protocol for socket. */ socklen_t ai_addrlen; /* Length of socket address. */ struct sockaddr *ai_addr; /* Socket address for socket. */ char *ai_canonname; /* Canonical name for service location. */ struct addrinfo *ai_next; /* Pointer to next in list. */ }; # endif /* Possible values for `ai_flags' field in `addrinfo' structure. */ # ifndef AI_PASSIVE # define AI_PASSIVE 0x0001 /* Socket address is intended for `bind'. */ # endif # ifndef AI_CANONNAME # define AI_CANONNAME 0x0002 /* Request for canonical name. */ # endif # ifndef AI_NUMERICSERV # define AI_NUMERICSERV 0x0400 /* Don't use name resolution. */ # endif # if 0 /* The commented out definitions below are not yet implemented in the GNULIB getaddrinfo() replacement, so are not yet needed and may, in fact, cause conflicts on systems with a getaddrinfo() function which does not define them. If they are restored, be sure to protect the definitions with #ifndef. */ # define AI_NUMERICHOST 0x0004 /* Don't use name resolution. */ # define AI_V4MAPPED 0x0008 /* IPv4 mapped addresses are acceptable. */ # define AI_ALL 0x0010 /* Return IPv4 mapped and IPv6 addresses. */ # define AI_ADDRCONFIG 0x0020 /* Use configuration of this host to choose returned address type.. */ # endif /* 0 */ /* Error values for `getaddrinfo' function. */ # ifndef EAI_BADFLAGS # define EAI_BADFLAGS -1 /* Invalid value for `ai_flags' field. */ # define EAI_NONAME -2 /* NAME or SERVICE is unknown. */ # define EAI_AGAIN -3 /* Temporary failure in name resolution. */ # define EAI_FAIL -4 /* Non-recoverable failure in name res. */ # define EAI_NODATA -5 /* No address associated with NAME. */ # define EAI_FAMILY -6 /* `ai_family' not supported. */ # define EAI_SOCKTYPE -7 /* `ai_socktype' not supported. */ # define EAI_SERVICE -8 /* SERVICE not supported for `ai_socktype'. */ # define EAI_MEMORY -10 /* Memory allocation failure. */ # endif /* Since EAI_NODATA is deprecated by RFC3493, some systems (at least FreeBSD, which does define EAI_BADFLAGS) have removed the definition in favor of EAI_NONAME. */ # if !defined EAI_NODATA && defined EAI_NONAME # define EAI_NODATA EAI_NONAME # endif # ifndef EAI_OVERFLOW /* Not defined on mingw32 and Haiku. */ # define EAI_OVERFLOW -12 /* Argument buffer overflow. */ # endif # ifndef EAI_ADDRFAMILY /* Not defined on mingw32. */ # define EAI_ADDRFAMILY -9 /* Address family for NAME not supported. */ # endif # ifndef EAI_SYSTEM /* Not defined on mingw32. */ # define EAI_SYSTEM -11 /* System error returned in `errno'. */ # endif # if 0 /* The commented out definitions below are not yet implemented in the GNULIB getaddrinfo() replacement, so are not yet needed. If they are restored, be sure to protect the definitions with #ifndef. */ # ifndef EAI_INPROGRESS # define EAI_INPROGRESS -100 /* Processing request in progress. */ # define EAI_CANCELED -101 /* Request canceled. */ # define EAI_NOTCANCELED -102 /* Request not canceled. */ # define EAI_ALLDONE -103 /* All requests done. */ # define EAI_INTR -104 /* Interrupted by a signal. */ # define EAI_IDN_ENCODE -105 /* IDN encoding failed. */ # endif # endif # if !@HAVE_DECL_GETADDRINFO@ /* Translate name of a service location and/or a service name to set of socket addresses. For more details, see the POSIX:2001 specification . */ extern int getaddrinfo (const char *restrict nodename, const char *restrict servname, const struct addrinfo *restrict hints, struct addrinfo **restrict res) _GL_ARG_NONNULL ((4)); # endif # if !@HAVE_DECL_FREEADDRINFO@ /* Free `addrinfo' structure AI including associated storage. For more details, see the POSIX:2001 specification . */ extern void freeaddrinfo (struct addrinfo *ai) _GL_ARG_NONNULL ((1)); # endif # if !@HAVE_DECL_GAI_STRERROR@ /* Convert error return from getaddrinfo() to a string. For more details, see the POSIX:2001 specification . */ extern const char *gai_strerror (int ecode); # endif # if !@HAVE_DECL_GETNAMEINFO@ /* Convert socket address to printable node and service names. For more details, see the POSIX:2001 specification . */ extern int getnameinfo(const struct sockaddr *restrict sa, socklen_t salen, char *restrict node, socklen_t nodelen, char *restrict service, socklen_t servicelen, int flags) _GL_ARG_NONNULL ((1)); # endif /* Possible flags for getnameinfo. */ # ifndef NI_NUMERICHOST # define NI_NUMERICHOST 1 # endif # ifndef NI_NUMERICSERV # define NI_NUMERICSERV 2 # endif #endif /* @GNULIB_GETADDRINFO@ */ #endif /* _GL_NETDB_H */ #endif /* _GL_NETDB_H */ libprelude-1.0.0/libmissing/isnan.c0000664000076400007640000001367511341220435014215 00000000000000/* Test for NaN that does not need libm. Copyright (C) 2007-2010 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 3 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 Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . */ /* Written by Bruno Haible , 2007. */ #include /* Specification. */ #ifdef USE_LONG_DOUBLE /* Specification found in math.h or isnanl-nolibm.h. */ extern int rpl_isnanl (long double x); #elif ! defined USE_FLOAT /* Specification found in math.h or isnand-nolibm.h. */ extern int rpl_isnand (double x); #else /* defined USE_FLOAT */ /* Specification found in math.h or isnanf-nolibm.h. */ extern int rpl_isnanf (float x); #endif #include #include #include "float+.h" #ifdef USE_LONG_DOUBLE # define FUNC rpl_isnanl # define DOUBLE long double # define MAX_EXP LDBL_MAX_EXP # define MIN_EXP LDBL_MIN_EXP # if defined LDBL_EXPBIT0_WORD && defined LDBL_EXPBIT0_BIT # define KNOWN_EXPBIT0_LOCATION # define EXPBIT0_WORD LDBL_EXPBIT0_WORD # define EXPBIT0_BIT LDBL_EXPBIT0_BIT # endif # define SIZE SIZEOF_LDBL # define L_(literal) literal##L #elif ! defined USE_FLOAT # define FUNC rpl_isnand # define DOUBLE double # define MAX_EXP DBL_MAX_EXP # define MIN_EXP DBL_MIN_EXP # if defined DBL_EXPBIT0_WORD && defined DBL_EXPBIT0_BIT # define KNOWN_EXPBIT0_LOCATION # define EXPBIT0_WORD DBL_EXPBIT0_WORD # define EXPBIT0_BIT DBL_EXPBIT0_BIT # endif # define SIZE SIZEOF_DBL # define L_(literal) literal #else /* defined USE_FLOAT */ # define FUNC rpl_isnanf # define DOUBLE float # define MAX_EXP FLT_MAX_EXP # define MIN_EXP FLT_MIN_EXP # if defined FLT_EXPBIT0_WORD && defined FLT_EXPBIT0_BIT # define KNOWN_EXPBIT0_LOCATION # define EXPBIT0_WORD FLT_EXPBIT0_WORD # define EXPBIT0_BIT FLT_EXPBIT0_BIT # endif # define SIZE SIZEOF_FLT # define L_(literal) literal##f #endif #define EXP_MASK ((MAX_EXP - MIN_EXP) | 7) #define NWORDS \ ((sizeof (DOUBLE) + sizeof (unsigned int) - 1) / sizeof (unsigned int)) typedef union { DOUBLE value; unsigned int word[NWORDS]; } memory_double; int FUNC (DOUBLE x) { #ifdef KNOWN_EXPBIT0_LOCATION # if defined USE_LONG_DOUBLE && ((defined __ia64 && LDBL_MANT_DIG == 64) || (defined __x86_64__ || defined __amd64__) || (defined __i386 || defined __i386__ || defined _I386 || defined _M_IX86 || defined _X86_)) /* Special CPU dependent code is needed to treat bit patterns outside the IEEE 754 specification (such as Pseudo-NaNs, Pseudo-Infinities, Pseudo-Zeroes, Unnormalized Numbers, and Pseudo-Denormals) as NaNs. These bit patterns are: - exponent = 0x0001..0x7FFF, mantissa bit 63 = 0, - exponent = 0x0000, mantissa bit 63 = 1. The NaN bit pattern is: - exponent = 0x7FFF, mantissa >= 0x8000000000000001. */ memory_double m; unsigned int exponent; m.value = x; exponent = (m.word[EXPBIT0_WORD] >> EXPBIT0_BIT) & EXP_MASK; # ifdef WORDS_BIGENDIAN /* Big endian: EXPBIT0_WORD = 0, EXPBIT0_BIT = 16. */ if (exponent == 0) return 1 & (m.word[0] >> 15); else if (exponent == EXP_MASK) return (((m.word[0] ^ 0x8000U) << 16) | m.word[1] | (m.word[2] >> 16)) != 0; else return 1 & ~(m.word[0] >> 15); # else /* Little endian: EXPBIT0_WORD = 2, EXPBIT0_BIT = 0. */ if (exponent == 0) return (m.word[1] >> 31); else if (exponent == EXP_MASK) return ((m.word[1] ^ 0x80000000U) | m.word[0]) != 0; else return (m.word[1] >> 31) ^ 1; # endif # else /* Be careful to not do any floating-point operation on x, such as x == x, because x may be a signaling NaN. */ # if defined __SUNPRO_C || defined __DECC || (defined __sgi && !defined __GNUC__) /* The Sun C 5.0 compilers and the Compaq (ex-DEC) 6.4 compilers don't recognize the initializers as constant expressions. The latter compiler also fails when constant-folding 0.0 / 0.0 even when constant-folding is not required. The SGI MIPSpro C compiler complains about "floating-point operation result is out of range". */ static DOUBLE zero = L_(0.0); memory_double nan; DOUBLE plus_inf = L_(1.0) / L_(0.0); DOUBLE minus_inf = -L_(1.0) / L_(0.0); nan.value = zero / zero; # else static memory_double nan = { L_(0.0) / L_(0.0) }; static DOUBLE plus_inf = L_(1.0) / L_(0.0); static DOUBLE minus_inf = -L_(1.0) / L_(0.0); # endif { memory_double m; /* A NaN can be recognized through its exponent. But exclude +Infinity and -Infinity, which have the same exponent. */ m.value = x; if (((m.word[EXPBIT0_WORD] ^ nan.word[EXPBIT0_WORD]) & (EXP_MASK << EXPBIT0_BIT)) == 0) return (memcmp (&m.value, &plus_inf, SIZE) != 0 && memcmp (&m.value, &minus_inf, SIZE) != 0); else return 0; } # endif #else /* The configuration did not find sufficient information. Give up about the signaling NaNs, handle only the quiet NaNs. */ if (x == x) { # if defined USE_LONG_DOUBLE && ((defined __ia64 && LDBL_MANT_DIG == 64) || (defined __x86_64__ || defined __amd64__) || (defined __i386 || defined __i386__ || defined _I386 || defined _M_IX86 || defined _X86_)) /* Detect any special bit patterns that pass ==; see comment above. */ memory_double m1; memory_double m2; memset (&m1.value, 0, SIZE); memset (&m2.value, 0, SIZE); m1.value = x; m2.value = x + (x ? 0.0L : -0.0L); if (memcmp (&m1.value, &m2.value, SIZE) != 0) return 1; # endif return 0; } else return 1; #endif } libprelude-1.0.0/libmissing/getline.c0000664000076400007640000000203011341220435014513 00000000000000/* getline.c --- Implementation of replacement getline function. Copyright (C) 2005, 2006, 2007, 2009, 2010 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser 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 Lesser General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ /* Written by Simon Josefsson. */ #include #include ssize_t getline (char **lineptr, size_t *n, FILE *stream) { return getdelim (lineptr, n, '\n', stream); } libprelude-1.0.0/libmissing/isnand-nolibm.h0000664000076400007640000000224311341220435015631 00000000000000/* Test for NaN that does not need libm. Copyright (C) 2007-2010 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 3 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 Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . */ #if HAVE_ISNAND_IN_LIBC /* Get declaration of isnan macro. */ # include # if __GNUC__ >= 4 /* GCC 4.0 and newer provides three built-ins for isnan. */ # undef isnand # define isnand(x) __builtin_isnan ((double)(x)) # else # undef isnand # define isnand(x) isnan ((double)(x)) # endif #else /* Test whether X is a NaN. */ # undef isnand # define isnand rpl_isnand extern int isnand (double x); #endif libprelude-1.0.0/libmissing/stdint.in.h0000664000076400007640000004037211341220440015012 00000000000000/* Copyright (C) 2001-2002, 2004-2010 Free Software Foundation, Inc. Written by Paul Eggert, Bruno Haible, Sam Steingold, Peter Burwood. This file is part of gnulib. This program is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser 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 Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ /* * ISO C 99 for platforms that lack it. * */ #ifndef _GL_STDINT_H /* When including a system file that in turn includes , use the system , not our substitute. This avoids problems with (for example) VMS, whose includes . */ #define _GL_JUST_INCLUDE_SYSTEM_INTTYPES_H /* Get those types that are already defined in other system include files, so that we can "#define int8_t signed char" below without worrying about a later system include file containing a "typedef signed char int8_t;" that will get messed up by our macro. Our macros should all be consistent with the system versions, except for the "fast" types and macros, which we recommend against using in public interfaces due to compiler differences. */ #if @HAVE_STDINT_H@ # if defined __sgi && ! defined __c99 /* Bypass IRIX's if in C89 mode, since it merely annoys users with "This header file is to be used only for c99 mode compilations" diagnostics. */ # define __STDINT_H__ # endif /* Other systems may have an incomplete or buggy . Include it before , since any "#include " in would reinclude us, skipping our contents because _GL_STDINT_H is defined. The include_next requires a split double-inclusion guard. */ # if __GNUC__ >= 3 @PRAGMA_SYSTEM_HEADER@ # endif # @INCLUDE_NEXT@ @NEXT_STDINT_H@ #endif #if ! defined _GL_STDINT_H && ! defined _GL_JUST_INCLUDE_SYSTEM_STDINT_H #define _GL_STDINT_H /* defines some of the stdint.h types as well, on glibc, IRIX 6.5, and OpenBSD 3.8 (via ). AIX 5.2 isn't needed and causes troubles. MacOS X 10.4.6 includes (which is us), but relies on the system definitions, so include after @NEXT_STDINT_H@. */ #if @HAVE_SYS_TYPES_H@ && ! defined _AIX # include #endif /* Get LONG_MIN, LONG_MAX, ULONG_MAX. */ #include #if @HAVE_INTTYPES_H@ /* In OpenBSD 3.8, includes , which defines int{8,16,32,64}_t, uint{8,16,32,64}_t and __BIT_TYPES_DEFINED__. also defines intptr_t and uintptr_t. */ # include #elif @HAVE_SYS_INTTYPES_H@ /* Solaris 7 has the types except the *_fast*_t types, and the macros except for *_FAST*_*, INTPTR_MIN, PTRDIFF_MIN, PTRDIFF_MAX. */ # include #endif #if @HAVE_SYS_BITYPES_H@ && ! defined __BIT_TYPES_DEFINED__ /* Linux libc4 >= 4.6.7 and libc5 have a that defines int{8,16,32,64}_t and __BIT_TYPES_DEFINED__. In libc5 >= 5.2.2 it is included by . */ # include #endif #undef _GL_JUST_INCLUDE_SYSTEM_INTTYPES_H /* Minimum and maximum values for a integer type under the usual assumption. Return an unspecified value if BITS == 0, adding a check to pacify picky compilers. */ #define _STDINT_MIN(signed, bits, zero) \ ((signed) ? (- ((zero) + 1) << ((bits) ? (bits) - 1 : 0)) : (zero)) #define _STDINT_MAX(signed, bits, zero) \ ((signed) \ ? ~ _STDINT_MIN (signed, bits, zero) \ : /* The expression for the unsigned case. The subtraction of (signed) \ is a nop in the unsigned case and avoids "signed integer overflow" \ warnings in the signed case. */ \ ((((zero) + 1) << ((bits) ? (bits) - 1 - (signed) : 0)) - 1) * 2 + 1) /* 7.18.1.1. Exact-width integer types */ /* Here we assume a standard architecture where the hardware integer types have 8, 16, 32, optionally 64 bits. */ #undef int8_t #undef uint8_t typedef signed char gl_int8_t; typedef unsigned char gl_uint8_t; #define int8_t gl_int8_t #define uint8_t gl_uint8_t #undef int16_t #undef uint16_t typedef short int gl_int16_t; typedef unsigned short int gl_uint16_t; #define int16_t gl_int16_t #define uint16_t gl_uint16_t #undef int32_t #undef uint32_t typedef int gl_int32_t; typedef unsigned int gl_uint32_t; #define int32_t gl_int32_t #define uint32_t gl_uint32_t /* Do not undefine int64_t if gnulib is not being used with 64-bit types, since otherwise it breaks platforms like Tandem/NSK. */ #if LONG_MAX >> 31 >> 31 == 1 # undef int64_t typedef long int gl_int64_t; # define int64_t gl_int64_t # define GL_INT64_T #elif defined _MSC_VER # undef int64_t typedef __int64 gl_int64_t; # define int64_t gl_int64_t # define GL_INT64_T #elif @HAVE_LONG_LONG_INT@ # undef int64_t typedef long long int gl_int64_t; # define int64_t gl_int64_t # define GL_INT64_T #endif #if ULONG_MAX >> 31 >> 31 >> 1 == 1 # undef uint64_t typedef unsigned long int gl_uint64_t; # define uint64_t gl_uint64_t # define GL_UINT64_T #elif defined _MSC_VER # undef uint64_t typedef unsigned __int64 gl_uint64_t; # define uint64_t gl_uint64_t # define GL_UINT64_T #elif @HAVE_UNSIGNED_LONG_LONG_INT@ # undef uint64_t typedef unsigned long long int gl_uint64_t; # define uint64_t gl_uint64_t # define GL_UINT64_T #endif /* Avoid collision with Solaris 2.5.1 etc. */ #define _UINT8_T #define _UINT32_T #define _UINT64_T /* 7.18.1.2. Minimum-width integer types */ /* Here we assume a standard architecture where the hardware integer types have 8, 16, 32, optionally 64 bits. Therefore the leastN_t types are the same as the corresponding N_t types. */ #undef int_least8_t #undef uint_least8_t #undef int_least16_t #undef uint_least16_t #undef int_least32_t #undef uint_least32_t #undef int_least64_t #undef uint_least64_t #define int_least8_t int8_t #define uint_least8_t uint8_t #define int_least16_t int16_t #define uint_least16_t uint16_t #define int_least32_t int32_t #define uint_least32_t uint32_t #ifdef GL_INT64_T # define int_least64_t int64_t #endif #ifdef GL_UINT64_T # define uint_least64_t uint64_t #endif /* 7.18.1.3. Fastest minimum-width integer types */ /* Note: Other substitutes may define these types differently. It is not recommended to use these types in public header files. */ /* Here we assume a standard architecture where the hardware integer types have 8, 16, 32, optionally 64 bits. Therefore the fastN_t types are taken from the same list of types. Assume that 'long int' is fast enough for all narrower integers. */ #undef int_fast8_t #undef uint_fast8_t #undef int_fast16_t #undef uint_fast16_t #undef int_fast32_t #undef uint_fast32_t #undef int_fast64_t #undef uint_fast64_t typedef long int gl_int_fast8_t; typedef unsigned long int gl_uint_fast8_t; typedef long int gl_int_fast16_t; typedef unsigned long int gl_uint_fast16_t; typedef long int gl_int_fast32_t; typedef unsigned long int gl_uint_fast32_t; #define int_fast8_t gl_int_fast8_t #define uint_fast8_t gl_uint_fast8_t #define int_fast16_t gl_int_fast16_t #define uint_fast16_t gl_uint_fast16_t #define int_fast32_t gl_int_fast32_t #define uint_fast32_t gl_uint_fast32_t #ifdef GL_INT64_T # define int_fast64_t int64_t #endif #ifdef GL_UINT64_T # define uint_fast64_t uint64_t #endif /* 7.18.1.4. Integer types capable of holding object pointers */ #undef intptr_t #undef uintptr_t typedef long int gl_intptr_t; typedef unsigned long int gl_uintptr_t; #define intptr_t gl_intptr_t #define uintptr_t gl_uintptr_t /* 7.18.1.5. Greatest-width integer types */ /* Note: These types are compiler dependent. It may be unwise to use them in public header files. */ #undef intmax_t #if @HAVE_LONG_LONG_INT@ && LONG_MAX >> 30 == 1 typedef long long int gl_intmax_t; # define intmax_t gl_intmax_t #elif defined GL_INT64_T # define intmax_t int64_t #else typedef long int gl_intmax_t; # define intmax_t gl_intmax_t #endif #undef uintmax_t #if @HAVE_UNSIGNED_LONG_LONG_INT@ && ULONG_MAX >> 31 == 1 typedef unsigned long long int gl_uintmax_t; # define uintmax_t gl_uintmax_t #elif defined GL_UINT64_T # define uintmax_t uint64_t #else typedef unsigned long int gl_uintmax_t; # define uintmax_t gl_uintmax_t #endif /* Verify that intmax_t and uintmax_t have the same size. Too much code breaks if this is not the case. If this check fails, the reason is likely to be found in the autoconf macros. */ typedef int _verify_intmax_size[2 * (sizeof (intmax_t) == sizeof (uintmax_t)) - 1]; /* 7.18.2. Limits of specified-width integer types */ #if ! defined __cplusplus || defined __STDC_LIMIT_MACROS /* 7.18.2.1. Limits of exact-width integer types */ /* Here we assume a standard architecture where the hardware integer types have 8, 16, 32, optionally 64 bits. */ #undef INT8_MIN #undef INT8_MAX #undef UINT8_MAX #define INT8_MIN (~ INT8_MAX) #define INT8_MAX 127 #define UINT8_MAX 255 #undef INT16_MIN #undef INT16_MAX #undef UINT16_MAX #define INT16_MIN (~ INT16_MAX) #define INT16_MAX 32767 #define UINT16_MAX 65535 #undef INT32_MIN #undef INT32_MAX #undef UINT32_MAX #define INT32_MIN (~ INT32_MAX) #define INT32_MAX 2147483647 #define UINT32_MAX 4294967295U #undef INT64_MIN #undef INT64_MAX #ifdef GL_INT64_T /* Prefer (- INTMAX_C (1) << 63) over (~ INT64_MAX) because SunPRO C 5.0 evaluates the latter incorrectly in preprocessor expressions. */ # define INT64_MIN (- INTMAX_C (1) << 63) # define INT64_MAX INTMAX_C (9223372036854775807) #endif #undef UINT64_MAX #ifdef GL_UINT64_T # define UINT64_MAX UINTMAX_C (18446744073709551615) #endif /* 7.18.2.2. Limits of minimum-width integer types */ /* Here we assume a standard architecture where the hardware integer types have 8, 16, 32, optionally 64 bits. Therefore the leastN_t types are the same as the corresponding N_t types. */ #undef INT_LEAST8_MIN #undef INT_LEAST8_MAX #undef UINT_LEAST8_MAX #define INT_LEAST8_MIN INT8_MIN #define INT_LEAST8_MAX INT8_MAX #define UINT_LEAST8_MAX UINT8_MAX #undef INT_LEAST16_MIN #undef INT_LEAST16_MAX #undef UINT_LEAST16_MAX #define INT_LEAST16_MIN INT16_MIN #define INT_LEAST16_MAX INT16_MAX #define UINT_LEAST16_MAX UINT16_MAX #undef INT_LEAST32_MIN #undef INT_LEAST32_MAX #undef UINT_LEAST32_MAX #define INT_LEAST32_MIN INT32_MIN #define INT_LEAST32_MAX INT32_MAX #define UINT_LEAST32_MAX UINT32_MAX #undef INT_LEAST64_MIN #undef INT_LEAST64_MAX #ifdef GL_INT64_T # define INT_LEAST64_MIN INT64_MIN # define INT_LEAST64_MAX INT64_MAX #endif #undef UINT_LEAST64_MAX #ifdef GL_UINT64_T # define UINT_LEAST64_MAX UINT64_MAX #endif /* 7.18.2.3. Limits of fastest minimum-width integer types */ /* Here we assume a standard architecture where the hardware integer types have 8, 16, 32, optionally 64 bits. Therefore the fastN_t types are taken from the same list of types. */ #undef INT_FAST8_MIN #undef INT_FAST8_MAX #undef UINT_FAST8_MAX #define INT_FAST8_MIN LONG_MIN #define INT_FAST8_MAX LONG_MAX #define UINT_FAST8_MAX ULONG_MAX #undef INT_FAST16_MIN #undef INT_FAST16_MAX #undef UINT_FAST16_MAX #define INT_FAST16_MIN LONG_MIN #define INT_FAST16_MAX LONG_MAX #define UINT_FAST16_MAX ULONG_MAX #undef INT_FAST32_MIN #undef INT_FAST32_MAX #undef UINT_FAST32_MAX #define INT_FAST32_MIN LONG_MIN #define INT_FAST32_MAX LONG_MAX #define UINT_FAST32_MAX ULONG_MAX #undef INT_FAST64_MIN #undef INT_FAST64_MAX #ifdef GL_INT64_T # define INT_FAST64_MIN INT64_MIN # define INT_FAST64_MAX INT64_MAX #endif #undef UINT_FAST64_MAX #ifdef GL_UINT64_T # define UINT_FAST64_MAX UINT64_MAX #endif /* 7.18.2.4. Limits of integer types capable of holding object pointers */ #undef INTPTR_MIN #undef INTPTR_MAX #undef UINTPTR_MAX #define INTPTR_MIN LONG_MIN #define INTPTR_MAX LONG_MAX #define UINTPTR_MAX ULONG_MAX /* 7.18.2.5. Limits of greatest-width integer types */ #undef INTMAX_MIN #undef INTMAX_MAX #ifdef INT64_MAX # define INTMAX_MIN INT64_MIN # define INTMAX_MAX INT64_MAX #else # define INTMAX_MIN INT32_MIN # define INTMAX_MAX INT32_MAX #endif #undef UINTMAX_MAX #ifdef UINT64_MAX # define UINTMAX_MAX UINT64_MAX #else # define UINTMAX_MAX UINT32_MAX #endif /* 7.18.3. Limits of other integer types */ /* ptrdiff_t limits */ #undef PTRDIFF_MIN #undef PTRDIFF_MAX #if @APPLE_UNIVERSAL_BUILD@ # ifdef _LP64 # define PTRDIFF_MIN _STDINT_MIN (1, 64, 0l) # define PTRDIFF_MAX _STDINT_MAX (1, 64, 0l) # else # define PTRDIFF_MIN _STDINT_MIN (1, 32, 0) # define PTRDIFF_MAX _STDINT_MAX (1, 32, 0) # endif #else # define PTRDIFF_MIN \ _STDINT_MIN (1, @BITSIZEOF_PTRDIFF_T@, 0@PTRDIFF_T_SUFFIX@) # define PTRDIFF_MAX \ _STDINT_MAX (1, @BITSIZEOF_PTRDIFF_T@, 0@PTRDIFF_T_SUFFIX@) #endif /* sig_atomic_t limits */ #undef SIG_ATOMIC_MIN #undef SIG_ATOMIC_MAX #define SIG_ATOMIC_MIN \ _STDINT_MIN (@HAVE_SIGNED_SIG_ATOMIC_T@, @BITSIZEOF_SIG_ATOMIC_T@, \ 0@SIG_ATOMIC_T_SUFFIX@) #define SIG_ATOMIC_MAX \ _STDINT_MAX (@HAVE_SIGNED_SIG_ATOMIC_T@, @BITSIZEOF_SIG_ATOMIC_T@, \ 0@SIG_ATOMIC_T_SUFFIX@) /* size_t limit */ #undef SIZE_MAX #if @APPLE_UNIVERSAL_BUILD@ # ifdef _LP64 # define SIZE_MAX _STDINT_MAX (0, 64, 0ul) # else # define SIZE_MAX _STDINT_MAX (0, 32, 0ul) # endif #else # define SIZE_MAX _STDINT_MAX (0, @BITSIZEOF_SIZE_T@, 0@SIZE_T_SUFFIX@) #endif /* wchar_t limits */ /* Get WCHAR_MIN, WCHAR_MAX. This include is not on the top, above, because on OSF/1 4.0 we have a sequence of nested includes -> -> -> , and the latter includes and assumes its types are already defined. */ #if ! (defined WCHAR_MIN && defined WCHAR_MAX) # define _GL_JUST_INCLUDE_SYSTEM_WCHAR_H # include # undef _GL_JUST_INCLUDE_SYSTEM_WCHAR_H #endif #undef WCHAR_MIN #undef WCHAR_MAX #define WCHAR_MIN \ _STDINT_MIN (@HAVE_SIGNED_WCHAR_T@, @BITSIZEOF_WCHAR_T@, 0@WCHAR_T_SUFFIX@) #define WCHAR_MAX \ _STDINT_MAX (@HAVE_SIGNED_WCHAR_T@, @BITSIZEOF_WCHAR_T@, 0@WCHAR_T_SUFFIX@) /* wint_t limits */ #undef WINT_MIN #undef WINT_MAX #define WINT_MIN \ _STDINT_MIN (@HAVE_SIGNED_WINT_T@, @BITSIZEOF_WINT_T@, 0@WINT_T_SUFFIX@) #define WINT_MAX \ _STDINT_MAX (@HAVE_SIGNED_WINT_T@, @BITSIZEOF_WINT_T@, 0@WINT_T_SUFFIX@) #endif /* !defined __cplusplus || defined __STDC_LIMIT_MACROS */ /* 7.18.4. Macros for integer constants */ #if ! defined __cplusplus || defined __STDC_CONSTANT_MACROS /* 7.18.4.1. Macros for minimum-width integer constants */ /* According to ISO C 99 Technical Corrigendum 1 */ /* Here we assume a standard architecture where the hardware integer types have 8, 16, 32, optionally 64 bits, and int is 32 bits. */ #undef INT8_C #undef UINT8_C #define INT8_C(x) x #define UINT8_C(x) x #undef INT16_C #undef UINT16_C #define INT16_C(x) x #define UINT16_C(x) x #undef INT32_C #undef UINT32_C #define INT32_C(x) x #define UINT32_C(x) x ## U #undef INT64_C #undef UINT64_C #if LONG_MAX >> 31 >> 31 == 1 # define INT64_C(x) x##L #elif defined _MSC_VER # define INT64_C(x) x##i64 #elif @HAVE_LONG_LONG_INT@ # define INT64_C(x) x##LL #endif #if ULONG_MAX >> 31 >> 31 >> 1 == 1 # define UINT64_C(x) x##UL #elif defined _MSC_VER # define UINT64_C(x) x##ui64 #elif @HAVE_UNSIGNED_LONG_LONG_INT@ # define UINT64_C(x) x##ULL #endif /* 7.18.4.2. Macros for greatest-width integer constants */ #undef INTMAX_C #if @HAVE_LONG_LONG_INT@ && LONG_MAX >> 30 == 1 # define INTMAX_C(x) x##LL #elif defined GL_INT64_T # define INTMAX_C(x) INT64_C(x) #else # define INTMAX_C(x) x##L #endif #undef UINTMAX_C #if @HAVE_UNSIGNED_LONG_LONG_INT@ && ULONG_MAX >> 31 == 1 # define UINTMAX_C(x) x##ULL #elif defined GL_UINT64_T # define UINTMAX_C(x) UINT64_C(x) #else # define UINTMAX_C(x) x##UL #endif #endif /* !defined __cplusplus || defined __STDC_CONSTANT_MACROS */ #endif /* _GL_STDINT_H */ #endif /* !defined _GL_STDINT_H && !defined _GL_JUST_INCLUDE_SYSTEM_STDINT_H */ libprelude-1.0.0/libmissing/size_max.h0000664000076400007640000000234711341220440014717 00000000000000/* size_max.h -- declare SIZE_MAX through system headers Copyright (C) 2005-2006, 2009-2010 Free Software Foundation, Inc. Written by Simon Josefsson. This program is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser 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 Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ #ifndef GNULIB_SIZE_MAX_H #define GNULIB_SIZE_MAX_H /* Get SIZE_MAX declaration on systems like Solaris 7/8/9. */ # include /* Get SIZE_MAX declaration on systems like glibc 2. */ # if HAVE_STDINT_H # include # endif /* On systems where these include files don't define it, SIZE_MAX is defined in config.h. */ #endif /* GNULIB_SIZE_MAX_H */ libprelude-1.0.0/libmissing/sys_ioctl.in.h0000664000076400007640000000377711341220440015525 00000000000000/* Substitute for and wrapper around . Copyright (C) 2008-2010 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser 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 Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ #ifndef _GL_SYS_IOCTL_H #if __GNUC__ >= 3 @PRAGMA_SYSTEM_HEADER@ #endif /* The include_next requires a split double-inclusion guard. */ #if @HAVE_SYS_IOCTL_H@ # @INCLUDE_NEXT@ @NEXT_SYS_IOCTL_H@ #endif #ifndef _GL_SYS_IOCTL_H #define _GL_SYS_IOCTL_H /* AIX 5.1 and Solaris 10 declare ioctl() in and in , but not in . But avoid namespace pollution on glibc systems. */ #ifndef __GLIBC__ # include #endif /* The definition of _GL_WARN_ON_USE is copied here. */ /* Declare overridden functions. */ #ifdef __cplusplus extern "C" { #endif #if @GNULIB_IOCTL@ # if @SYS_IOCTL_H_HAVE_WINSOCK2_H@ # undef ioctl # define ioctl rpl_ioctl extern int ioctl (int fd, int request, ... /* {void *,char *} arg */); # endif #elif @SYS_IOCTL_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS@ # undef ioctl # define ioctl ioctl_used_without_requesting_gnulib_module_ioctl #elif defined GNULIB_POSIXCHECK # undef ioctl # if HAVE_RAW_DECL_IOCTL _GL_WARN_ON_USE (ioctl, "ioctl does not portably work on sockets - " "use gnulib module ioctl for portability"); # endif #endif #ifdef __cplusplus } #endif #endif /* _GL_SYS_IOCTL_H */ #endif /* _GL_SYS_IOCTL_H */ libprelude-1.0.0/libmissing/sys_utsname.in.h0000664000076400007640000000521511341220440016054 00000000000000/* Substitute for . Copyright (C) 2009, 2010 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser 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 Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ #ifndef _GL_SYS_UTSNAME_H #if __GNUC__ >= 3 @PRAGMA_SYSTEM_HEADER@ #endif #if @HAVE_SYS_UTSNAME_H@ # @INCLUDE_NEXT@ @NEXT_SYS_UTSNAME_H@ #endif #define _GL_SYS_UTSNAME_H /* The definition of _GL_ARG_NONNULL is copied here. */ /* The definition of _GL_WARN_ON_USE is copied here. */ #ifdef __cplusplus extern "C" { #endif #if !@HAVE_STRUCT_UTSNAME@ /* Length of the entries in 'struct utsname' is 256. */ # define _UTSNAME_LENGTH 256 # ifndef _UTSNAME_NODENAME_LENGTH # define _UTSNAME_NODENAME_LENGTH _UTSNAME_LENGTH # endif # ifndef _UTSNAME_SYSNAME_LENGTH # define _UTSNAME_SYSNAME_LENGTH _UTSNAME_LENGTH # endif # ifndef _UTSNAME_RELEASE_LENGTH # define _UTSNAME_RELEASE_LENGTH _UTSNAME_LENGTH # endif # ifndef _UTSNAME_VERSION_LENGTH # define _UTSNAME_VERSION_LENGTH _UTSNAME_LENGTH # endif # ifndef _UTSNAME_MACHINE_LENGTH # define _UTSNAME_MACHINE_LENGTH _UTSNAME_LENGTH # endif /* Structure describing the system and machine. */ struct utsname { /* Name of this node on the network. */ char nodename[_UTSNAME_NODENAME_LENGTH]; /* Name of the implementation of the operating system. */ char sysname[_UTSNAME_SYSNAME_LENGTH]; /* Current release level of this implementation. */ char release[_UTSNAME_RELEASE_LENGTH]; /* Current version level of this release. */ char version[_UTSNAME_VERSION_LENGTH]; /* Name of the hardware type the system is running on. */ char machine[_UTSNAME_MACHINE_LENGTH]; }; #endif /* !@HAVE_STRUCT_UTSNAME@ */ #if @GNULIB_UNAME@ # if !@HAVE_UNAME@ extern int uname (struct utsname *buf) _GL_ARG_NONNULL ((1)); # endif #elif defined GNULIB_POSIXCHECK # undef uname # if HAVE_RAW_DECL_UNAME _GL_WARN_ON_USE (uname, "uname is unportable - " "use gnulib module uname for portability"); # endif #endif #ifdef __cplusplus } #endif #endif /* _GL_SYS_UTSNAME_H */ libprelude-1.0.0/libmissing/select.c0000664000076400007640000003266111341220437014362 00000000000000/* Emulation for select(2) Contributed by Paolo Bonzini. Copyright 2008-2010 Free Software Foundation, Inc. This file is part of gnulib. This program is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser 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 Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ #include #include #include #if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ /* Native Win32. */ #include #include #include #include #include #include #include #include #include #include struct bitset { unsigned char in[FD_SETSIZE / CHAR_BIT]; unsigned char out[FD_SETSIZE / CHAR_BIT]; }; /* Declare data structures for ntdll functions. */ typedef struct _FILE_PIPE_LOCAL_INFORMATION { ULONG NamedPipeType; ULONG NamedPipeConfiguration; ULONG MaximumInstances; ULONG CurrentInstances; ULONG InboundQuota; ULONG ReadDataAvailable; ULONG OutboundQuota; ULONG WriteQuotaAvailable; ULONG NamedPipeState; ULONG NamedPipeEnd; } FILE_PIPE_LOCAL_INFORMATION, *PFILE_PIPE_LOCAL_INFORMATION; typedef struct _IO_STATUS_BLOCK { union { DWORD Status; PVOID Pointer; } u; ULONG_PTR Information; } IO_STATUS_BLOCK, *PIO_STATUS_BLOCK; typedef enum _FILE_INFORMATION_CLASS { FilePipeLocalInformation = 24 } FILE_INFORMATION_CLASS, *PFILE_INFORMATION_CLASS; typedef DWORD (WINAPI *PNtQueryInformationFile) (HANDLE, IO_STATUS_BLOCK *, VOID *, ULONG, FILE_INFORMATION_CLASS); #ifndef PIPE_BUF #define PIPE_BUF 512 #endif #define IsConsoleHandle(h) (((long) (h) & 3) == 3) static BOOL IsSocketHandle(HANDLE h) { WSANETWORKEVENTS ev; if (IsConsoleHandle (h)) return FALSE; /* Under Wine, it seems that getsockopt returns 0 for pipes too. WSAEnumNetworkEvents instead distinguishes the two correctly. */ ev.lNetworkEvents = 0xDEADBEEF; WSAEnumNetworkEvents ((SOCKET) h, NULL, &ev); return ev.lNetworkEvents != 0xDEADBEEF; } /* Compute output fd_sets for libc descriptor FD (whose Win32 handle is H). */ static int win32_poll_handle (HANDLE h, int fd, struct bitset *rbits, struct bitset *wbits, struct bitset *xbits) { BOOL read, write, except; int i, ret; INPUT_RECORD *irbuffer; DWORD avail, nbuffer; BOOL bRet; IO_STATUS_BLOCK iosb; FILE_PIPE_LOCAL_INFORMATION fpli; static PNtQueryInformationFile NtQueryInformationFile; static BOOL once_only; read = write = except = FALSE; switch (GetFileType (h)) { case FILE_TYPE_DISK: read = TRUE; write = TRUE; break; case FILE_TYPE_PIPE: if (!once_only) { NtQueryInformationFile = (PNtQueryInformationFile) GetProcAddress (GetModuleHandle ("ntdll.dll"), "NtQueryInformationFile"); once_only = TRUE; } if (PeekNamedPipe (h, NULL, 0, NULL, &avail, NULL) != 0) { if (avail) read = TRUE; } else { /* It was the write-end of the pipe. Check if it is writable. If NtQueryInformationFile fails, optimistically assume the pipe is writable. This could happen on Win9x, where NtQueryInformationFile is not available, or if we inherit a pipe that doesn't permit FILE_READ_ATTRIBUTES access on the write end (I think this should not happen since WinXP SP2; WINE seems fine too). Otherwise, ensure that enough space is available for atomic writes. */ memset (&iosb, 0, sizeof (iosb)); memset (&fpli, 0, sizeof (fpli)); if (!NtQueryInformationFile || NtQueryInformationFile (h, &iosb, &fpli, sizeof (fpli), FilePipeLocalInformation) || fpli.WriteQuotaAvailable >= PIPE_BUF || (fpli.OutboundQuota < PIPE_BUF && fpli.WriteQuotaAvailable == fpli.OutboundQuota)) write = TRUE; } break; case FILE_TYPE_CHAR: write = TRUE; if (!(rbits->in[fd / CHAR_BIT] & (1 << (fd & (CHAR_BIT - 1))))) break; ret = WaitForSingleObject (h, 0); if (ret == WAIT_OBJECT_0) { if (!IsConsoleHandle (h)) { read = TRUE; break; } nbuffer = avail = 0; bRet = GetNumberOfConsoleInputEvents (h, &nbuffer); /* Screen buffers handles are filtered earlier. */ assert (bRet); if (nbuffer == 0) { except = TRUE; break; } irbuffer = (INPUT_RECORD *) alloca (nbuffer * sizeof (INPUT_RECORD)); bRet = PeekConsoleInput (h, irbuffer, nbuffer, &avail); if (!bRet || avail == 0) { except = TRUE; break; } for (i = 0; i < avail; i++) if (irbuffer[i].EventType == KEY_EVENT) read = TRUE; } break; default: ret = WaitForSingleObject (h, 0); write = TRUE; if (ret == WAIT_OBJECT_0) read = TRUE; break; } ret = 0; if (read && (rbits->in[fd / CHAR_BIT] & (1 << (fd & (CHAR_BIT - 1))))) { rbits->out[fd / CHAR_BIT] |= (1 << (fd & (CHAR_BIT - 1))); ret++; } if (write && (wbits->in[fd / CHAR_BIT] & (1 << (fd & (CHAR_BIT - 1))))) { wbits->out[fd / CHAR_BIT] |= (1 << (fd & (CHAR_BIT - 1))); ret++; } if (except && (xbits->in[fd / CHAR_BIT] & (1 << (fd & (CHAR_BIT - 1))))) { xbits->out[fd / CHAR_BIT] |= (1 << (fd & (CHAR_BIT - 1))); ret++; } return ret; } int rpl_select (int nfds, fd_set *rfds, fd_set *wfds, fd_set *xfds, struct timeval *timeout) { static struct timeval tv0; static HANDLE hEvent; HANDLE h, handle_array[FD_SETSIZE + 2]; fd_set handle_rfds, handle_wfds, handle_xfds; struct bitset rbits, wbits, xbits; unsigned char anyfds_in[FD_SETSIZE / CHAR_BIT]; DWORD ret, wait_timeout, nhandles, nsock, nbuffer; MSG msg; int i, fd, rc; if (nfds > FD_SETSIZE) nfds = FD_SETSIZE; if (!timeout) wait_timeout = INFINITE; else { wait_timeout = timeout->tv_sec + timeout->tv_usec / 1000; /* select is also used as a portable usleep. */ if (!rfds && !wfds && !xfds) { Sleep (wait_timeout); return 0; } } if (!hEvent) hEvent = CreateEvent (NULL, FALSE, FALSE, NULL); handle_array[0] = hEvent; nhandles = 1; nsock = 0; /* Copy descriptors to bitsets. At the same time, eliminate bits in the "wrong" direction for console input buffers and screen buffers, because screen buffers are waitable and they will block until a character is available. */ memset (&rbits, 0, sizeof (rbits)); memset (&wbits, 0, sizeof (wbits)); memset (&xbits, 0, sizeof (xbits)); memset (anyfds_in, 0, sizeof (anyfds_in)); if (rfds) for (i = 0; i < rfds->fd_count; i++) { fd = rfds->fd_array[i]; h = (HANDLE) _get_osfhandle (fd); if (IsConsoleHandle (h) && !GetNumberOfConsoleInputEvents (h, &nbuffer)) continue; rbits.in[fd / CHAR_BIT] |= 1 << (fd & (CHAR_BIT - 1)); anyfds_in[fd / CHAR_BIT] |= 1 << (fd & (CHAR_BIT - 1)); } else rfds = (fd_set *) alloca (sizeof (fd_set)); if (wfds) for (i = 0; i < wfds->fd_count; i++) { fd = wfds->fd_array[i]; h = (HANDLE) _get_osfhandle (fd); if (IsConsoleHandle (h) && GetNumberOfConsoleInputEvents (h, &nbuffer)) continue; wbits.in[fd / CHAR_BIT] |= 1 << (fd & (CHAR_BIT - 1)); anyfds_in[fd / CHAR_BIT] |= 1 << (fd & (CHAR_BIT - 1)); } else wfds = (fd_set *) alloca (sizeof (fd_set)); if (xfds) for (i = 0; i < xfds->fd_count; i++) { fd = xfds->fd_array[i]; xbits.in[fd / CHAR_BIT] |= 1 << (fd & (CHAR_BIT - 1)); anyfds_in[fd / CHAR_BIT] |= 1 << (fd & (CHAR_BIT - 1)); } else xfds = (fd_set *) alloca (sizeof (fd_set)); /* Zero all the fd_sets, including the application's. */ FD_ZERO (rfds); FD_ZERO (wfds); FD_ZERO (xfds); FD_ZERO (&handle_rfds); FD_ZERO (&handle_wfds); FD_ZERO (&handle_xfds); /* Classify handles. Create fd sets for sockets, poll the others. */ for (i = 0; i < nfds; i++) { if ((anyfds_in[i / CHAR_BIT] & (1 << (i & (CHAR_BIT - 1)))) == 0) continue; h = (HANDLE) _get_osfhandle (i); if (!h) { errno = EBADF; return -1; } if (IsSocketHandle (h)) { int requested = FD_CLOSE; /* See above; socket handles are mapped onto select, but we need to map descriptors to handles. */ if (rbits.in[i / CHAR_BIT] & (1 << (i & (CHAR_BIT - 1)))) { requested |= FD_READ | FD_ACCEPT; FD_SET ((SOCKET) h, rfds); FD_SET ((SOCKET) h, &handle_rfds); } if (wbits.in[i / CHAR_BIT] & (1 << (i & (CHAR_BIT - 1)))) { requested |= FD_WRITE | FD_CONNECT; FD_SET ((SOCKET) h, wfds); FD_SET ((SOCKET) h, &handle_wfds); } if (xbits.in[i / CHAR_BIT] & (1 << (i & (CHAR_BIT - 1)))) { requested |= FD_OOB; FD_SET ((SOCKET) h, xfds); FD_SET ((SOCKET) h, &handle_xfds); } WSAEventSelect ((SOCKET) h, hEvent, requested); nsock++; } else { handle_array[nhandles++] = h; /* Poll now. If we get an event, do not wait below. */ if (wait_timeout != 0 && win32_poll_handle (h, i, &rbits, &wbits, &xbits)) wait_timeout = 0; } } if (wait_timeout == 0 || nsock == 0) rc = 0; else { /* See if we need to wait in the loop below. If any select is ready, do MsgWaitForMultipleObjects anyway to dispatch messages, but no need to call select again. */ rc = select (0, &handle_rfds, &handle_wfds, &handle_xfds, &tv0); if (rc == 0) { /* Restore the fd_sets for the other select we do below. */ memcpy (&handle_rfds, rfds, sizeof (fd_set)); memcpy (&handle_wfds, wfds, sizeof (fd_set)); memcpy (&handle_xfds, xfds, sizeof (fd_set)); } else wait_timeout = 0; } for (;;) { ret = MsgWaitForMultipleObjects (nhandles, handle_array, FALSE, wait_timeout, QS_ALLINPUT); if (ret == WAIT_OBJECT_0 + nhandles) { /* new input of some other kind */ BOOL bRet; while ((bRet = PeekMessage (&msg, NULL, 0, 0, PM_REMOVE)) != 0) { TranslateMessage (&msg); DispatchMessage (&msg); } } else break; } /* If we haven't done it yet, check the status of the sockets. */ if (rc == 0 && nsock > 0) rc = select (0, &handle_rfds, &handle_wfds, &handle_xfds, &tv0); /* Now fill in the results. */ FD_ZERO (rfds); FD_ZERO (wfds); FD_ZERO (xfds); /* Place a sentinel at the end of the array. */ handle_array[nhandles] = NULL; nhandles = 1; for (i = 0; i < nfds; i++) { if ((anyfds_in[i / CHAR_BIT] & (1 << (i & (CHAR_BIT - 1)))) == 0) continue; h = (HANDLE) _get_osfhandle (i); if (h != handle_array[nhandles]) { /* Perform handle->descriptor mapping. Don't update rc, as these results are counted in the return value of Winsock's select. */ WSAEventSelect ((SOCKET) h, NULL, 0); if (FD_ISSET (h, &handle_rfds)) FD_SET (i, rfds); if (FD_ISSET (h, &handle_wfds)) FD_SET (i, wfds); if (FD_ISSET (h, &handle_xfds)) FD_SET (i, xfds); } else { /* Not a socket. */ nhandles++; win32_poll_handle (h, i, &rbits, &wbits, &xbits); if (rbits.out[i / CHAR_BIT] & (1 << (i & (CHAR_BIT - 1)))) { rc++; FD_SET (i, rfds); } if (wbits.out[i / CHAR_BIT] & (1 << (i & (CHAR_BIT - 1)))) { rc++; FD_SET (i, wfds); } if (xbits.out[i / CHAR_BIT] & (1 << (i & (CHAR_BIT - 1)))) { rc++; FD_SET (i, xfds); } } } return rc; } #else /* ! Native Win32. */ #include #undef select int rpl_select (int nfds, fd_set *rfds, fd_set *wfds, fd_set *xfds, struct timeval *timeout) { /* Interix 3.5 has a bug: it does not support nfds == 0. */ if (nfds == 0) { nfds = 1; rfds = NULL; wfds = NULL; xfds = NULL; } return select (nfds, rfds, wfds, xfds, timeout); } #endif libprelude-1.0.0/libmissing/stdio-write.c0000664000076400007640000001145411341220440015344 00000000000000/* POSIX compatible FILE stream write function. Copyright (C) 2008-2010 Free Software Foundation, Inc. Written by Bruno Haible , 2008. This program is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 3 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 Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . */ #include /* Specification. */ #include /* Replace these functions only if module 'sigpipe' is requested. */ #if GNULIB_SIGPIPE /* On native Windows platforms, SIGPIPE does not exist. When write() is called on a pipe with no readers, WriteFile() fails with error GetLastError() = ERROR_NO_DATA, and write() in consequence fails with error EINVAL. This write() function is at the basis of the function which flushes the buffer of a FILE stream. */ # if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ # include # include # include # define WIN32_LEAN_AND_MEAN /* avoid including junk */ # include # define CALL_WITH_SIGPIPE_EMULATION(RETTYPE, EXPRESSION, FAILED) \ if (ferror (stream)) \ return (EXPRESSION); \ else \ { \ RETTYPE ret; \ SetLastError (0); \ ret = (EXPRESSION); \ if (FAILED && GetLastError () == ERROR_NO_DATA && ferror (stream)) \ { \ int fd = fileno (stream); \ if (fd >= 0 \ && GetFileType ((HANDLE) _get_osfhandle (fd)) == FILE_TYPE_PIPE)\ { \ /* Try to raise signal SIGPIPE. */ \ raise (SIGPIPE); \ /* If it is currently blocked or ignored, change errno from \ EINVAL to EPIPE. */ \ errno = EPIPE; \ } \ } \ return ret; \ } # if !REPLACE_PRINTF_POSIX /* avoid collision with printf.c */ # if !DEPENDS_ON_LIBINTL /* avoid collision with intl/printf.c */ int printf (const char *format, ...) { int retval; va_list args; va_start (args, format); retval = vfprintf (stdout, format, args); va_end (args); return retval; } # endif # endif # if !REPLACE_FPRINTF_POSIX /* avoid collision with fprintf.c */ int fprintf (FILE *stream, const char *format, ...) { int retval; va_list args; va_start (args, format); retval = vfprintf (stream, format, args); va_end (args); return retval; } # endif # if !REPLACE_VPRINTF_POSIX /* avoid collision with vprintf.c */ int vprintf (const char *format, va_list args) { return vfprintf (stdout, format, args); } # endif # if !REPLACE_VFPRINTF_POSIX /* avoid collision with vfprintf.c */ int vfprintf (FILE *stream, const char *format, va_list args) #undef vfprintf { CALL_WITH_SIGPIPE_EMULATION (int, vfprintf (stream, format, args), ret == EOF) } # endif int putchar (int c) { return fputc (c, stdout); } int fputc (int c, FILE *stream) #undef fputc { CALL_WITH_SIGPIPE_EMULATION (int, fputc (c, stream), ret == EOF) } int fputs (const char *string, FILE *stream) #undef fputs { CALL_WITH_SIGPIPE_EMULATION (int, fputs (string, stream), ret == EOF) } int puts (const char *string) #undef puts { FILE *stream = stdout; CALL_WITH_SIGPIPE_EMULATION (int, puts (string), ret == EOF) } size_t fwrite (const void *ptr, size_t s, size_t n, FILE *stream) #undef fwrite { CALL_WITH_SIGPIPE_EMULATION (size_t, fwrite (ptr, s, n, stream), ret < n) } # endif #endif libprelude-1.0.0/libmissing/stdio.in.h0000664000076400007640000005504111345707014014641 00000000000000/* A GNU-like . Copyright (C) 2004, 2007-2010 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser 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 Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ #if __GNUC__ >= 3 @PRAGMA_SYSTEM_HEADER@ #endif #if defined __need_FILE || defined __need___FILE /* Special invocation convention inside glibc header files. */ #@INCLUDE_NEXT@ @NEXT_STDIO_H@ #else /* Normal invocation convention. */ #ifndef _GL_STDIO_H /* The include_next requires a split double-inclusion guard. */ #@INCLUDE_NEXT@ @NEXT_STDIO_H@ #ifndef _GL_STDIO_H #define _GL_STDIO_H /* Get va_list. Needed on many systems, including glibc 2.8. */ #include #include /* Get off_t and ssize_t. Needed on many systems, including glibc 2.8. */ #include #ifndef __attribute__ /* The __attribute__ feature is available in gcc versions 2.5 and later. The __-protected variants of the attributes 'format' and 'printf' are accepted by gcc versions 2.6.4 (effectively 2.7) and later. We enable __attribute__ only if these are supported too, because gnulib and libintl do '#define printf __printf__' when they override the 'printf' function. */ # if __GNUC__ < 2 || (__GNUC__ == 2 && __GNUC_MINOR__ < 7) # define __attribute__(Spec) /* empty */ # endif #endif /* The definition of _GL_ARG_NONNULL is copied here. */ /* The definition of _GL_WARN_ON_USE is copied here. */ #ifdef __cplusplus extern "C" { #endif #if @GNULIB_DPRINTF@ # if @REPLACE_DPRINTF@ # define dprintf rpl_dprintf # endif # if @REPLACE_DPRINTF@ || !@HAVE_DPRINTF@ extern int dprintf (int fd, const char *format, ...) __attribute__ ((__format__ (__printf__, 2, 3))) _GL_ARG_NONNULL ((2)); # endif #elif defined GNULIB_POSIXCHECK # undef dprintf # if HAVE_RAW_DECL_DPRINTF _GL_WARN_ON_USE (dprintf, "dprintf is unportable - " "use gnulib module dprintf for portability"); # endif #endif #if @GNULIB_FCLOSE@ # if @REPLACE_FCLOSE@ # define fclose rpl_fclose /* Close STREAM and its underlying file descriptor. */ extern int fclose (FILE *stream) _GL_ARG_NONNULL ((1)); # endif #elif defined GNULIB_POSIXCHECK # undef fclose /* Assume fclose is always declared. */ _GL_WARN_ON_USE (fclose, "fclose is not always POSIX compliant - " "use gnulib module fclose for portable POSIX compliance"); #endif #if @GNULIB_FFLUSH@ # if @REPLACE_FFLUSH@ # define fflush rpl_fflush /* Flush all pending data on STREAM according to POSIX rules. Both output and seekable input streams are supported. Note! LOSS OF DATA can occur if fflush is applied on an input stream that is _not_seekable_ or on an update stream that is _not_seekable_ and in which the most recent operation was input. Seekability can be tested with lseek(fileno(fp),0,SEEK_CUR). */ extern int fflush (FILE *gl_stream); # endif #elif defined GNULIB_POSIXCHECK # undef fflush /* Assume fflush is always declared. */ _GL_WARN_ON_USE (fflush, "fflush is not always POSIX compliant - " "use gnulib module fflush for portable POSIX compliance"); #endif /* It is very rare that the developer ever has full control of stdin, so any use of gets warrants an unconditional warning. Assume it is always declared, since it is required by C89. */ #undef gets _GL_WARN_ON_USE (gets, "gets is a security hole - use fgets instead"); #if @GNULIB_FOPEN@ # if @REPLACE_FOPEN@ # undef fopen # define fopen rpl_fopen extern FILE * fopen (const char *filename, const char *mode) _GL_ARG_NONNULL ((1, 2)); # endif #elif defined GNULIB_POSIXCHECK # undef fopen /* Assume fopen is always declared. */ _GL_WARN_ON_USE (fopen, "fopen on Win32 platforms is not POSIX compatible - " "use gnulib module fopen for portability"); #endif #if @GNULIB_FPRINTF_POSIX@ # if @REPLACE_FPRINTF@ # define fprintf rpl_fprintf extern int fprintf (FILE *fp, const char *format, ...) __attribute__ ((__format__ (__printf__, 2, 3))) _GL_ARG_NONNULL ((1, 2)); # endif #elif @GNULIB_FPRINTF@ && @REPLACE_STDIO_WRITE_FUNCS@ && @GNULIB_STDIO_H_SIGPIPE@ # define fprintf rpl_fprintf extern int fprintf (FILE *fp, const char *format, ...) __attribute__ ((__format__ (__printf__, 2, 3))) _GL_ARG_NONNULL ((1, 2)); #elif defined GNULIB_POSIXCHECK # undef fprintf /* Assume fprintf is always declared. */ _GL_WARN_ON_USE (fprintf, "fprintf is not always POSIX compliant - " "use gnulib module fprintf-posix for portable " "POSIX compliance"); #endif #if @GNULIB_FPURGE@ # if @REPLACE_FPURGE@ # define fpurge rpl_fpurge # endif # if @REPLACE_FPURGE@ || !@HAVE_DECL_FPURGE@ /* Discard all pending buffered I/O data on STREAM. STREAM must not be wide-character oriented. When discarding pending output, the file position is set back to where it was before the write calls. When discarding pending input, the file position is advanced to match the end of the previously read input. Return 0 if successful. Upon error, return -1 and set errno. */ extern int fpurge (FILE *gl_stream) _GL_ARG_NONNULL ((1)); # endif #elif defined GNULIB_POSIXCHECK # undef fpurge # if HAVE_RAW_DECL_FPURGE _GL_WARN_ON_USE (fpurge, "fpurge is not always present - " "use gnulib module fpurge for portability"); # endif #endif #if @GNULIB_FPUTC@ && @REPLACE_STDIO_WRITE_FUNCS@ && @GNULIB_STDIO_H_SIGPIPE@ # undef fputc # define fputc rpl_fputc extern int fputc (int c, FILE *stream) _GL_ARG_NONNULL ((2)); #endif #if @GNULIB_FPUTS@ && @REPLACE_STDIO_WRITE_FUNCS@ && @GNULIB_STDIO_H_SIGPIPE@ # undef fputs # define fputs rpl_fputs extern int fputs (const char *string, FILE *stream) _GL_ARG_NONNULL ((1, 2)); #endif #if @GNULIB_FREOPEN@ # if @REPLACE_FREOPEN@ # undef freopen # define freopen rpl_freopen extern FILE * freopen (const char *filename, const char *mode, FILE *stream) _GL_ARG_NONNULL ((2, 3)); # endif #elif defined GNULIB_POSIXCHECK # undef freopen /* Assume freopen is always declared. */ _GL_WARN_ON_USE (freopen, "freopen on Win32 platforms is not POSIX compatible - " "use gnulib module freopen for portability"); #endif /* Set up the following warnings, based on which modules are in use. GNU Coding Standards discourage the use of fseek, since it imposes an arbitrary limitation on some 32-bit hosts. Remember that the fseek module depends on the fseeko module, so we only have three cases to consider: 1. The developer is not using either module. Issue a warning under GNULIB_POSIXCHECK for both functions, to remind them that both functions have bugs on some systems. _GL_NO_LARGE_FILES has no impact on this warning. 2. The developer is using both modules. They may be unaware of the arbitrary limitations of fseek, so issue a warning under GNULIB_POSIXCHECK. On the other hand, they may be using both modules intentionally, so the developer can define _GL_NO_LARGE_FILES in the compilation units where the use of fseek is safe, to silence the warning. 3. The developer is using the fseeko module, but not fseek. Gnulib guarantees that fseek will still work around platform bugs in that case, but we presume that the developer is aware of the pitfalls of fseek and was trying to avoid it, so issue a warning even when GNULIB_POSIXCHECK is undefined. Again, _GL_NO_LARGE_FILES can be defined to silence the warning in particular compilation units. Most gnulib clients that perform stream operations should fall into category three. */ #if @GNULIB_FSEEK@ # if defined GNULIB_POSIXCHECK && !defined _GL_NO_LARGE_FILES # define _GL_FSEEK_WARN /* Category 2, above. */ # undef fseek # endif # if @REPLACE_FSEEK@ # undef fseek # define fseek rpl_fseek extern int fseek (FILE *fp, long offset, int whence) _GL_ARG_NONNULL ((1)); # endif #endif #if @GNULIB_FSEEKO@ # if !@GNULIB_FSEEK@ && !defined _GL_NO_LARGE_FILES # define _GL_FSEEK_WARN /* Category 3, above. */ # undef fseek # endif # if @REPLACE_FSEEKO@ /* Provide fseek, fseeko functions that are aware of a preceding fflush(), and which detect pipes. */ # undef fseeko # define fseeko rpl_fseeko extern int fseeko (FILE *fp, off_t offset, int whence) _GL_ARG_NONNULL ((1)); # if !@GNULIB_FSEEK@ # undef fseek # define fseek rpl_fseek static inline int _GL_ARG_NONNULL ((1)) rpl_fseek (FILE *fp, long offset, int whence) { return fseeko (fp, offset, whence); } # endif # endif #elif defined GNULIB_POSIXCHECK # define _GL_FSEEK_WARN /* Category 1, above. */ # undef fseek # undef fseeko # if HAVE_RAW_DECL_FSEEKO _GL_WARN_ON_USE (fseeko, "fseeko is unportable - " "use gnulib module fseeko for portability"); # endif #endif #ifdef _GL_FSEEK_WARN # undef _GL_FSEEK_WARN /* Here, either fseek is undefined (but C89 guarantees that it is declared), or it is defined as rpl_fseek (declared above). */ _GL_WARN_ON_USE (fseek, "fseek cannot handle files larger than 4 GB " "on 32-bit platforms - " "use fseeko function for handling of large files"); #endif /* See the comments on fseek/fseeko. */ #if @GNULIB_FTELL@ # if defined GNULIB_POSIXCHECK && !defined _GL_NO_LARGE_FILES # define _GL_FTELL_WARN /* Category 2, above. */ # undef ftell # endif # if @REPLACE_FTELL@ # undef ftell # define ftell rpl_ftell extern long ftell (FILE *fp) _GL_ARG_NONNULL ((1)); # endif #endif #if @GNULIB_FTELLO@ # if !@GNULIB_FTELL@ && !defined _GL_NO_LARGE_FILES # define _GL_FTELL_WARN /* Category 3, above. */ # undef ftell # endif # if @REPLACE_FTELLO@ # undef ftello # define ftello rpl_ftello extern off_t ftello (FILE *fp) _GL_ARG_NONNULL ((1)); # if !@GNULIB_FTELL@ # undef ftell # define ftell rpl_ftell static inline long _GL_ARG_NONNULL ((1)) rpl_ftell (FILE *f) { return ftello (f); } # endif # endif #elif defined GNULIB_POSIXCHECK # define _GL_FTELL_WARN /* Category 1, above. */ # undef ftell # undef ftello # if HAVE_RAW_DECL_FTELLO _GL_WARN_ON_USE (ftello, "ftello is unportable - " "use gnulib module ftello for portability"); # endif #endif #ifdef _GL_FTELL_WARN # undef _GL_FTELL_WARN /* Here, either ftell is undefined (but C89 guarantees that it is declared), or it is defined as rpl_ftell (declared above). */ _GL_WARN_ON_USE (ftell, "ftell cannot handle files larger than 4 GB " "on 32-bit platforms - " "use ftello function for handling of large files"); #endif #if @GNULIB_FWRITE@ && @REPLACE_STDIO_WRITE_FUNCS@ && @GNULIB_STDIO_H_SIGPIPE@ # undef fwrite # define fwrite rpl_fwrite extern size_t fwrite (const void *ptr, size_t s, size_t n, FILE *stream) _GL_ARG_NONNULL ((1, 4)); #endif #if @GNULIB_GETDELIM@ # if @REPLACE_GETDELIM@ # undef getdelim # define getdelim rpl_getdelim # endif # if !@HAVE_DECL_GETDELIM@ || @REPLACE_GETDELIM@ /* Read input, up to (and including) the next occurrence of DELIMITER, from STREAM, store it in *LINEPTR (and NUL-terminate it). *LINEPTR is a pointer returned from malloc (or NULL), pointing to *LINESIZE bytes of space. It is realloc'd as necessary. Return the number of bytes read and stored at *LINEPTR (not including the NUL terminator), or -1 on error or EOF. */ extern ssize_t getdelim (char **lineptr, size_t *linesize, int delimiter, FILE *stream) _GL_ARG_NONNULL ((1, 2, 4)); # endif #elif defined GNULIB_POSIXCHECK # undef getdelim # if HAVE_RAW_DECL_GETDELIM _GL_WARN_ON_USE (getdelim, "getdelim is unportable - " "use gnulib module getdelim for portability"); # endif #endif #if @GNULIB_GETLINE@ # if @REPLACE_GETLINE@ # undef getline # define getline rpl_getline # endif # if !@HAVE_DECL_GETLINE@ || @REPLACE_GETLINE@ /* Read a line, up to (and including) the next newline, from STREAM, store it in *LINEPTR (and NUL-terminate it). *LINEPTR is a pointer returned from malloc (or NULL), pointing to *LINESIZE bytes of space. It is realloc'd as necessary. Return the number of bytes read and stored at *LINEPTR (not including the NUL terminator), or -1 on error or EOF. */ extern ssize_t getline (char **lineptr, size_t *linesize, FILE *stream) _GL_ARG_NONNULL ((1, 2, 3)); # endif #elif defined GNULIB_POSIXCHECK # undef getline # if HAVE_RAW_DECL_GETLINE _GL_WARN_ON_USE (getline, "getline is unportable - " "use gnulib module getline for portability"); # endif #endif #if @GNULIB_OBSTACK_PRINTF@ # if @REPLACE_OBSTACK_PRINTF@ # define obstack_printf rpl_osbtack_printf # define obstack_vprintf rpl_obstack_vprintf # endif # if @REPLACE_OBSTACK_PRINTF@ || !@HAVE_DECL_OBSTACK_PRINTF@ struct obstack; /* Grow an obstack with formatted output. Return the number of bytes added to OBS. No trailing nul byte is added, and the object should be closed with obstack_finish before use. Upon memory allocation error, call obstack_alloc_failed_handler. Upon other error, return -1. */ extern int obstack_printf (struct obstack *obs, const char *format, ...) __attribute__ ((__format__ (__printf__, 2, 3))) _GL_ARG_NONNULL ((1, 2)); extern int obstack_vprintf (struct obstack *obs, const char *format, va_list args) __attribute__ ((__format__ (__printf__, 2, 0))) _GL_ARG_NONNULL ((1, 2)); # endif #endif #if @GNULIB_PERROR@ # if @REPLACE_PERROR@ # define perror rpl_perror /* Print a message to standard error, describing the value of ERRNO, (if STRING is not NULL and not empty) prefixed with STRING and ": ", and terminated with a newline. */ extern void perror (const char *string); # endif #elif defined GNULIB_POSIXCHECK # undef perror /* Assume perror is always declared. */ _GL_WARN_ON_USE (perror, "perror is not always POSIX compliant - " "use gnulib module perror for portability"); #endif #if @GNULIB_POPEN@ # if @REPLACE_POPEN@ # undef popen # define popen rpl_popen extern FILE *popen (const char *cmd, const char *mode) _GL_ARG_NONNULL ((1, 2)); # endif #elif defined GNULIB_POSIXCHECK # undef popen # if HAVE_RAW_DECL_POPEN _GL_WARN_ON_USE (popen, "popen is buggy on some platforms - " "use gnulib module popen or pipe for more portability"); # endif #endif #if @GNULIB_PRINTF_POSIX@ # if @REPLACE_PRINTF@ /* Don't break __attribute__((format(printf,M,N))). */ # define printf __printf__ extern int printf (const char *format, ...) __attribute__ ((__format__ (__printf__, 1, 2))) _GL_ARG_NONNULL ((1)); # endif #elif @GNULIB_PRINTF@ && @REPLACE_STDIO_WRITE_FUNCS@ && @GNULIB_STDIO_H_SIGPIPE@ /* Don't break __attribute__((format(printf,M,N))). */ # define printf __printf__ extern int printf (const char *format, ...) __attribute__ ((__format__ (__printf__, 1, 2))) _GL_ARG_NONNULL ((1)); #elif defined GNULIB_POSIXCHECK # undef printf /* Assume printf is always declared. */ _GL_WARN_ON_USE (printf, "printf is not always POSIX compliant - " "use gnulib module printf-posix for portable " "POSIX compliance"); #endif #if @GNULIB_PUTC@ && @REPLACE_STDIO_WRITE_FUNCS@ && @GNULIB_STDIO_H_SIGPIPE@ # undef putc # define putc rpl_fputc extern int putc (int c, FILE *stream) _GL_ARG_NONNULL ((2)); #endif #if @GNULIB_PUTCHAR@ && @REPLACE_STDIO_WRITE_FUNCS@ && @GNULIB_STDIO_H_SIGPIPE@ # undef putchar # define putchar rpl_putchar extern int putchar (int c); #endif #if @GNULIB_PUTS@ && @REPLACE_STDIO_WRITE_FUNCS@ && @GNULIB_STDIO_H_SIGPIPE@ # undef puts # define puts rpl_puts extern int puts (const char *string) _GL_ARG_NONNULL ((1)); #endif #if @GNULIB_REMOVE@ # if @REPLACE_REMOVE@ # undef remove # define remove rpl_remove extern int remove (const char *name) _GL_ARG_NONNULL ((1)); # endif #elif defined GNULIB_POSIXCHECK # undef remove /* Assume remove is always declared. */ _GL_WARN_ON_USE (remove, "remove cannot handle directories on some platforms - " "use gnulib module remove for more portability"); #endif #if @GNULIB_RENAME@ # if @REPLACE_RENAME@ # undef rename # define rename rpl_rename extern int rename (const char *old_filename, const char *new_filename) _GL_ARG_NONNULL ((1, 2)); # endif #elif defined GNULIB_POSIXCHECK # undef rename /* Assume rename is always declared. */ _GL_WARN_ON_USE (rename, "rename is buggy on some platforms - " "use gnulib module rename for more portability"); #endif #if @GNULIB_RENAMEAT@ # if @REPLACE_RENAMEAT@ # undef renameat # define renameat rpl_renameat # endif # if !@HAVE_RENAMEAT@ || @REPLACE_RENAMEAT@ extern int renameat (int fd1, char const *file1, int fd2, char const *file2) _GL_ARG_NONNULL ((2, 4)); # endif #elif defined GNULIB_POSIXCHECK # undef renameat # if HAVE_RAW_DECL_RENAMEAT _GL_WARN_ON_USE (renameat, "renameat is not portable - " "use gnulib module renameat for portability"); # endif #endif #if @GNULIB_SNPRINTF@ # if @REPLACE_SNPRINTF@ # define snprintf rpl_snprintf # endif # if @REPLACE_SNPRINTF@ || !@HAVE_DECL_SNPRINTF@ extern int snprintf (char *str, size_t size, const char *format, ...) __attribute__ ((__format__ (__printf__, 3, 4))) _GL_ARG_NONNULL ((3)); # endif #elif defined GNULIB_POSIXCHECK # undef snprintf # if HAVE_RAW_DECL_SNPRINTF _GL_WARN_ON_USE (snprintf, "snprintf is unportable - " "use gnulib module snprintf for portability"); # endif #endif /* Some people would argue that sprintf should be handled like gets (for example, OpenBSD issues a link warning for both functions), since both can cause security holes due to buffer overruns. However, we believe that sprintf can be used safely, and is more efficient than snprintf in those safe cases; and as proof of our belief, we use sprintf in several gnulib modules. So this header intentionally avoids adding a warning to sprintf except when GNULIB_POSIXCHECK is defined. */ #if @GNULIB_SPRINTF_POSIX@ # if @REPLACE_SPRINTF@ # define sprintf rpl_sprintf extern int sprintf (char *str, const char *format, ...) __attribute__ ((__format__ (__printf__, 2, 3))) _GL_ARG_NONNULL ((1, 2)); # endif #elif defined GNULIB_POSIXCHECK # undef sprintf /* Assume sprintf is always declared. */ _GL_WARN_ON_USE (sprintf, "sprintf is not always POSIX compliant - " "use gnulib module sprintf-posix for portable " "POSIX compliance"); #endif #if @GNULIB_VASPRINTF@ # if @REPLACE_VASPRINTF@ # define asprintf rpl_asprintf # define vasprintf rpl_vasprintf # endif # if @REPLACE_VASPRINTF@ || !@HAVE_VASPRINTF@ /* Write formatted output to a string dynamically allocated with malloc(). If the memory allocation succeeds, store the address of the string in *RESULT and return the number of resulting bytes, excluding the trailing NUL. Upon memory allocation error, or some other error, return -1. */ extern int asprintf (char **result, const char *format, ...) __attribute__ ((__format__ (__printf__, 2, 3))) _GL_ARG_NONNULL ((1, 2)); extern int vasprintf (char **result, const char *format, va_list args) __attribute__ ((__format__ (__printf__, 2, 0))) _GL_ARG_NONNULL ((1, 2)); # endif #endif #if @GNULIB_VDPRINTF@ # if @REPLACE_VDPRINTF@ # define vdprintf rpl_vdprintf # endif # if @REPLACE_VDPRINTF@ || !@HAVE_VDPRINTF@ extern int vdprintf (int fd, const char *format, va_list args) __attribute__ ((__format__ (__printf__, 2, 0))) _GL_ARG_NONNULL ((2)); # endif #elif defined GNULIB_POSIXCHECK # undef vdprintf # if HAVE_RAW_DECL_VDPRINTF _GL_WARN_ON_USE (vdprintf, "vdprintf is unportable - " "use gnulib module vdprintf for portability"); # endif #endif #if @GNULIB_VFPRINTF_POSIX@ # if @REPLACE_VFPRINTF@ # define vfprintf rpl_vfprintf extern int vfprintf (FILE *fp, const char *format, va_list args) __attribute__ ((__format__ (__printf__, 2, 0))) _GL_ARG_NONNULL ((1, 2)); # endif #elif @GNULIB_VFPRINTF@ && @REPLACE_STDIO_WRITE_FUNCS@ && @GNULIB_STDIO_H_SIGPIPE@ # define vfprintf rpl_vfprintf extern int vfprintf (FILE *fp, const char *format, va_list args) __attribute__ ((__format__ (__printf__, 2, 0))) _GL_ARG_NONNULL ((1, 2)); #elif defined GNULIB_POSIXCHECK # undef vfprintf /* Assume vfprintf is always declared. */ _GL_WARN_ON_USE (vfprintf, "vfprintf is not always POSIX compliant - " "use gnulib module vfprintf-posix for portable " "POSIX compliance"); #endif #if @GNULIB_VPRINTF_POSIX@ # if @REPLACE_VPRINTF@ # define vprintf rpl_vprintf extern int vprintf (const char *format, va_list args) __attribute__ ((__format__ (__printf__, 1, 0))) _GL_ARG_NONNULL ((1)); # endif #elif @GNULIB_VPRINTF@ && @REPLACE_STDIO_WRITE_FUNCS@ && @GNULIB_STDIO_H_SIGPIPE@ # define vprintf rpl_vprintf extern int vprintf (const char *format, va_list args) __attribute__ ((__format__ (__printf__, 1, 0))) _GL_ARG_NONNULL ((1)); #elif defined GNULIB_POSIXCHECK # undef vprintf /* Assume vprintf is always declared. */ _GL_WARN_ON_USE (vprintf, "vprintf is not always POSIX compliant - " "use gnulib module vprintf-posix for portable " "POSIX compliance"); #endif #if @GNULIB_VSNPRINTF@ # if @REPLACE_VSNPRINTF@ # define vsnprintf rpl_vsnprintf # endif # if @REPLACE_VSNPRINTF@ || !@HAVE_DECL_VSNPRINTF@ extern int vsnprintf (char *str, size_t size, const char *format, va_list args) __attribute__ ((__format__ (__printf__, 3, 0))) _GL_ARG_NONNULL ((3)); # endif #elif defined GNULIB_POSIXCHECK # undef vsnprintf # if HAVE_RAW_DECL_VSNPRINTF _GL_WARN_ON_USE (vsnprintf, "vsnprintf is unportable - " "use gnulib module vsnprintf for portability"); # endif #endif #if @GNULIB_VSPRINTF_POSIX@ # if @REPLACE_VSPRINTF@ # define vsprintf rpl_vsprintf extern int vsprintf (char *str, const char *format, va_list args) __attribute__ ((__format__ (__printf__, 2, 0))) _GL_ARG_NONNULL ((1, 2)); # endif #elif defined GNULIB_POSIXCHECK # undef vsprintf /* Assume vsprintf is always declared. */ _GL_WARN_ON_USE (vsprintf, "vsprintf is not always POSIX compliant - " "use gnulib module vsprintf-posix for portable " "POSIX compliance"); #endif #ifdef __cplusplus } #endif #endif /* _GL_STDIO_H */ #endif /* _GL_STDIO_H */ #endif libprelude-1.0.0/libmissing/regex.c0000664000076400007640000000557411341220437014220 00000000000000/* Extended regular expression matching and search library. Copyright (C) 2002, 2003, 2005, 2006, 2009, 2010 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Isamu Hasegawa . This program is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser 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 Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ #include /* Make sure noone compiles this code with a C++ compiler. */ #if defined __cplusplus && defined _LIBC # error "This is C code, use a C compiler" #endif #ifdef _LIBC /* We have to keep the namespace clean. */ # define regfree(preg) __regfree (preg) # define regexec(pr, st, nm, pm, ef) __regexec (pr, st, nm, pm, ef) # define regcomp(preg, pattern, cflags) __regcomp (preg, pattern, cflags) # define regerror(errcode, preg, errbuf, errbuf_size) \ __regerror(errcode, preg, errbuf, errbuf_size) # define re_set_registers(bu, re, nu, st, en) \ __re_set_registers (bu, re, nu, st, en) # define re_match_2(bufp, string1, size1, string2, size2, pos, regs, stop) \ __re_match_2 (bufp, string1, size1, string2, size2, pos, regs, stop) # define re_match(bufp, string, size, pos, regs) \ __re_match (bufp, string, size, pos, regs) # define re_search(bufp, string, size, startpos, range, regs) \ __re_search (bufp, string, size, startpos, range, regs) # define re_compile_pattern(pattern, length, bufp) \ __re_compile_pattern (pattern, length, bufp) # define re_set_syntax(syntax) __re_set_syntax (syntax) # define re_search_2(bufp, st1, s1, st2, s2, startpos, range, regs, stop) \ __re_search_2 (bufp, st1, s1, st2, s2, startpos, range, regs, stop) # define re_compile_fastmap(bufp) __re_compile_fastmap (bufp) # include "../locale/localeinfo.h" #endif /* On some systems, limits.h sets RE_DUP_MAX to a lower value than GNU regex allows. Include it before , which correctly #undefs RE_DUP_MAX and sets it to the right value. */ #include #include #include "regex_internal.h" #include "regex_internal.c" #include "regcomp.c" #include "regexec.c" /* Binary backward compatibility. */ #if _LIBC # include # if SHLIB_COMPAT (libc, GLIBC_2_0, GLIBC_2_3) link_warning (re_max_failures, "the 're_max_failures' variable is obsolete and will go away.") int re_max_failures = 2000; # endif #endif libprelude-1.0.0/libmissing/printf-frexpl.c0000664000076400007640000000153511341220437015677 00000000000000/* Split a 'long double' into fraction and mantissa, for hexadecimal printf. Copyright (C) 2007, 2009, 2010 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 3 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 Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . */ #define USE_LONG_DOUBLE #include "printf-frexp.c" libprelude-1.0.0/libmissing/malloc.c0000664000076400007640000000273011341220437014344 00000000000000/* malloc() function that is glibc compatible. Copyright (C) 1997-1998, 2006-2007, 2009-2010 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser 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 Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ /* written by Jim Meyering and Bruno Haible */ #include /* Only the AC_FUNC_MALLOC macro defines 'malloc' already in config.h. */ #ifdef malloc # define NEED_MALLOC_GNU # undef malloc #endif /* Specification. */ #include #include /* Call the system's malloc below. */ #undef malloc /* Allocate an N-byte block of memory from the heap. If N is zero, allocate a 1-byte block. */ void * rpl_malloc (size_t n) { void *result; #ifdef NEED_MALLOC_GNU if (n == 0) n = 1; #endif result = malloc (n); #if !HAVE_MALLOC_POSIX if (result == NULL) errno = ENOMEM; #endif return result; } libprelude-1.0.0/libmissing/regex.h0000664000076400007640000006224511341220437014223 00000000000000/* Definitions for data structures and routines for the regular expression library. Copyright (C) 1985, 1989, 1990, 1991, 1992, 1993, 1995, 1996, 1997, 1998, 2000, 2001, 2002, 2003, 2005, 2006, 2009, 2010 Free Software Foundation, Inc. This file is part of the GNU C Library. This program is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser 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 Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ #ifndef _REGEX_H #define _REGEX_H 1 #include /* Allow the use in C++ code. */ #ifdef __cplusplus extern "C" { #endif /* Define __USE_GNU_REGEX to declare GNU extensions that violate the POSIX name space rules. */ #undef __USE_GNU_REGEX #if (defined _GNU_SOURCE \ || (!defined _POSIX_C_SOURCE && !defined _POSIX_SOURCE \ && !defined _XOPEN_SOURCE)) # define __USE_GNU_REGEX 1 #endif #ifdef _REGEX_LARGE_OFFSETS /* Use types and values that are wide enough to represent signed and unsigned byte offsets in memory. This currently works only when the regex code is used outside of the GNU C library; it is not yet supported within glibc itself, and glibc users should not define _REGEX_LARGE_OFFSETS. */ /* The type of the offset of a byte within a string. For historical reasons POSIX 1003.1-2004 requires that regoff_t be at least as wide as off_t. However, many common POSIX platforms set regoff_t to the more-sensible ssize_t and the Open Group has signalled its intention to change the requirement to be that regoff_t be at least as wide as ptrdiff_t and ssize_t; see XBD ERN 60 (2005-08-25). We don't know of any hosts where ssize_t or ptrdiff_t is wider than ssize_t, so ssize_t is safe. */ typedef ssize_t regoff_t; /* The type of nonnegative object indexes. Traditionally, GNU regex uses 'int' for these. Code that uses __re_idx_t should work regardless of whether the type is signed. */ typedef size_t __re_idx_t; /* The type of object sizes. */ typedef size_t __re_size_t; /* The type of object sizes, in places where the traditional code uses unsigned long int. */ typedef size_t __re_long_size_t; #else /* Use types that are binary-compatible with the traditional GNU regex implementation, which mishandles strings longer than INT_MAX. */ typedef int regoff_t; typedef int __re_idx_t; typedef unsigned int __re_size_t; typedef unsigned long int __re_long_size_t; #endif /* The following two types have to be signed and unsigned integer type wide enough to hold a value of a pointer. For most ANSI compilers ptrdiff_t and size_t should be likely OK. Still size of these two types is 2 for Microsoft C. Ugh... */ typedef long int s_reg_t; typedef unsigned long int active_reg_t; /* The following bits are used to determine the regexp syntax we recognize. The set/not-set meanings are chosen so that Emacs syntax remains the value 0. The bits are given in alphabetical order, and the definitions shifted by one from the previous bit; thus, when we add or remove a bit, only one other definition need change. */ typedef unsigned long int reg_syntax_t; #ifdef __USE_GNU_REGEX /* If this bit is not set, then \ inside a bracket expression is literal. If set, then such a \ quotes the following character. */ # define RE_BACKSLASH_ESCAPE_IN_LISTS ((unsigned long int) 1) /* If this bit is not set, then + and ? are operators, and \+ and \? are literals. If set, then \+ and \? are operators and + and ? are literals. */ # define RE_BK_PLUS_QM (RE_BACKSLASH_ESCAPE_IN_LISTS << 1) /* If this bit is set, then character classes are supported. They are: [:alpha:], [:upper:], [:lower:], [:digit:], [:alnum:], [:xdigit:], [:space:], [:print:], [:punct:], [:graph:], and [:cntrl:]. If not set, then character classes are not supported. */ # define RE_CHAR_CLASSES (RE_BK_PLUS_QM << 1) /* If this bit is set, then ^ and $ are always anchors (outside bracket expressions, of course). If this bit is not set, then it depends: ^ is an anchor if it is at the beginning of a regular expression or after an open-group or an alternation operator; $ is an anchor if it is at the end of a regular expression, or before a close-group or an alternation operator. This bit could be (re)combined with RE_CONTEXT_INDEP_OPS, because POSIX draft 11.2 says that * etc. in leading positions is undefined. We already implemented a previous draft which made those constructs invalid, though, so we haven't changed the code back. */ # define RE_CONTEXT_INDEP_ANCHORS (RE_CHAR_CLASSES << 1) /* If this bit is set, then special characters are always special regardless of where they are in the pattern. If this bit is not set, then special characters are special only in some contexts; otherwise they are ordinary. Specifically, * + ? and intervals are only special when not after the beginning, open-group, or alternation operator. */ # define RE_CONTEXT_INDEP_OPS (RE_CONTEXT_INDEP_ANCHORS << 1) /* If this bit is set, then *, +, ?, and { cannot be first in an re or immediately after an alternation or begin-group operator. */ # define RE_CONTEXT_INVALID_OPS (RE_CONTEXT_INDEP_OPS << 1) /* If this bit is set, then . matches newline. If not set, then it doesn't. */ # define RE_DOT_NEWLINE (RE_CONTEXT_INVALID_OPS << 1) /* If this bit is set, then . doesn't match NUL. If not set, then it does. */ # define RE_DOT_NOT_NULL (RE_DOT_NEWLINE << 1) /* If this bit is set, nonmatching lists [^...] do not match newline. If not set, they do. */ # define RE_HAT_LISTS_NOT_NEWLINE (RE_DOT_NOT_NULL << 1) /* If this bit is set, either \{...\} or {...} defines an interval, depending on RE_NO_BK_BRACES. If not set, \{, \}, {, and } are literals. */ # define RE_INTERVALS (RE_HAT_LISTS_NOT_NEWLINE << 1) /* If this bit is set, +, ? and | aren't recognized as operators. If not set, they are. */ # define RE_LIMITED_OPS (RE_INTERVALS << 1) /* If this bit is set, newline is an alternation operator. If not set, newline is literal. */ # define RE_NEWLINE_ALT (RE_LIMITED_OPS << 1) /* If this bit is set, then `{...}' defines an interval, and \{ and \} are literals. If not set, then `\{...\}' defines an interval. */ # define RE_NO_BK_BRACES (RE_NEWLINE_ALT << 1) /* If this bit is set, (...) defines a group, and \( and \) are literals. If not set, \(...\) defines a group, and ( and ) are literals. */ # define RE_NO_BK_PARENS (RE_NO_BK_BRACES << 1) /* If this bit is set, then \ matches . If not set, then \ is a back-reference. */ # define RE_NO_BK_REFS (RE_NO_BK_PARENS << 1) /* If this bit is set, then | is an alternation operator, and \| is literal. If not set, then \| is an alternation operator, and | is literal. */ # define RE_NO_BK_VBAR (RE_NO_BK_REFS << 1) /* If this bit is set, then an ending range point collating higher than the starting range point, as in [z-a], is invalid. If not set, then when ending range point collates higher than the starting range point, the range is ignored. */ # define RE_NO_EMPTY_RANGES (RE_NO_BK_VBAR << 1) /* If this bit is set, then an unmatched ) is ordinary. If not set, then an unmatched ) is invalid. */ # define RE_UNMATCHED_RIGHT_PAREN_ORD (RE_NO_EMPTY_RANGES << 1) /* If this bit is set, succeed as soon as we match the whole pattern, without further backtracking. */ # define RE_NO_POSIX_BACKTRACKING (RE_UNMATCHED_RIGHT_PAREN_ORD << 1) /* If this bit is set, do not process the GNU regex operators. If not set, then the GNU regex operators are recognized. */ # define RE_NO_GNU_OPS (RE_NO_POSIX_BACKTRACKING << 1) /* If this bit is set, turn on internal regex debugging. If not set, and debugging was on, turn it off. This only works if regex.c is compiled -DDEBUG. We define this bit always, so that all that's needed to turn on debugging is to recompile regex.c; the calling code can always have this bit set, and it won't affect anything in the normal case. */ # define RE_DEBUG (RE_NO_GNU_OPS << 1) /* If this bit is set, a syntactically invalid interval is treated as a string of ordinary characters. For example, the ERE 'a{1' is treated as 'a\{1'. */ # define RE_INVALID_INTERVAL_ORD (RE_DEBUG << 1) /* If this bit is set, then ignore case when matching. If not set, then case is significant. */ # define RE_ICASE (RE_INVALID_INTERVAL_ORD << 1) /* This bit is used internally like RE_CONTEXT_INDEP_ANCHORS but only for ^, because it is difficult to scan the regex backwards to find whether ^ should be special. */ # define RE_CARET_ANCHORS_HERE (RE_ICASE << 1) /* If this bit is set, then \{ cannot be first in an bre or immediately after an alternation or begin-group operator. */ # define RE_CONTEXT_INVALID_DUP (RE_CARET_ANCHORS_HERE << 1) /* If this bit is set, then no_sub will be set to 1 during re_compile_pattern. */ # define RE_NO_SUB (RE_CONTEXT_INVALID_DUP << 1) #endif /* defined __USE_GNU_REGEX */ /* This global variable defines the particular regexp syntax to use (for some interfaces). When a regexp is compiled, the syntax used is stored in the pattern buffer, so changing this does not affect already-compiled regexps. */ extern reg_syntax_t re_syntax_options; #ifdef __USE_GNU_REGEX /* Define combinations of the above bits for the standard possibilities. (The [[[ comments delimit what gets put into the Texinfo file, so don't delete them!) */ /* [[[begin syntaxes]]] */ # define RE_SYNTAX_EMACS 0 # define RE_SYNTAX_AWK \ (RE_BACKSLASH_ESCAPE_IN_LISTS | RE_DOT_NOT_NULL \ | RE_NO_BK_PARENS | RE_NO_BK_REFS \ | RE_NO_BK_VBAR | RE_NO_EMPTY_RANGES \ | RE_DOT_NEWLINE | RE_CONTEXT_INDEP_ANCHORS \ | RE_UNMATCHED_RIGHT_PAREN_ORD | RE_NO_GNU_OPS) # define RE_SYNTAX_GNU_AWK \ ((RE_SYNTAX_POSIX_EXTENDED | RE_BACKSLASH_ESCAPE_IN_LISTS | RE_DEBUG) \ & ~(RE_DOT_NOT_NULL | RE_INTERVALS | RE_CONTEXT_INDEP_OPS \ | RE_CONTEXT_INVALID_OPS )) # define RE_SYNTAX_POSIX_AWK \ (RE_SYNTAX_POSIX_EXTENDED | RE_BACKSLASH_ESCAPE_IN_LISTS \ | RE_INTERVALS | RE_NO_GNU_OPS) # define RE_SYNTAX_GREP \ (RE_BK_PLUS_QM | RE_CHAR_CLASSES \ | RE_HAT_LISTS_NOT_NEWLINE | RE_INTERVALS \ | RE_NEWLINE_ALT) # define RE_SYNTAX_EGREP \ (RE_CHAR_CLASSES | RE_CONTEXT_INDEP_ANCHORS \ | RE_CONTEXT_INDEP_OPS | RE_HAT_LISTS_NOT_NEWLINE \ | RE_NEWLINE_ALT | RE_NO_BK_PARENS \ | RE_NO_BK_VBAR) # define RE_SYNTAX_POSIX_EGREP \ (RE_SYNTAX_EGREP | RE_INTERVALS | RE_NO_BK_BRACES \ | RE_INVALID_INTERVAL_ORD) /* P1003.2/D11.2, section 4.20.7.1, lines 5078ff. */ # define RE_SYNTAX_ED RE_SYNTAX_POSIX_BASIC # define RE_SYNTAX_SED RE_SYNTAX_POSIX_BASIC /* Syntax bits common to both basic and extended POSIX regex syntax. */ # define _RE_SYNTAX_POSIX_COMMON \ (RE_CHAR_CLASSES | RE_DOT_NEWLINE | RE_DOT_NOT_NULL \ | RE_INTERVALS | RE_NO_EMPTY_RANGES) # define RE_SYNTAX_POSIX_BASIC \ (_RE_SYNTAX_POSIX_COMMON | RE_BK_PLUS_QM | RE_CONTEXT_INVALID_DUP) /* Differs from ..._POSIX_BASIC only in that RE_BK_PLUS_QM becomes RE_LIMITED_OPS, i.e., \? \+ \| are not recognized. Actually, this isn't minimal, since other operators, such as \`, aren't disabled. */ # define RE_SYNTAX_POSIX_MINIMAL_BASIC \ (_RE_SYNTAX_POSIX_COMMON | RE_LIMITED_OPS) # define RE_SYNTAX_POSIX_EXTENDED \ (_RE_SYNTAX_POSIX_COMMON | RE_CONTEXT_INDEP_ANCHORS \ | RE_CONTEXT_INDEP_OPS | RE_NO_BK_BRACES \ | RE_NO_BK_PARENS | RE_NO_BK_VBAR \ | RE_CONTEXT_INVALID_OPS | RE_UNMATCHED_RIGHT_PAREN_ORD) /* Differs from ..._POSIX_EXTENDED in that RE_CONTEXT_INDEP_OPS is removed and RE_NO_BK_REFS is added. */ # define RE_SYNTAX_POSIX_MINIMAL_EXTENDED \ (_RE_SYNTAX_POSIX_COMMON | RE_CONTEXT_INDEP_ANCHORS \ | RE_CONTEXT_INVALID_OPS | RE_NO_BK_BRACES \ | RE_NO_BK_PARENS | RE_NO_BK_REFS \ | RE_NO_BK_VBAR | RE_UNMATCHED_RIGHT_PAREN_ORD) /* [[[end syntaxes]]] */ #endif /* defined __USE_GNU_REGEX */ #ifdef __USE_GNU_REGEX /* Maximum number of duplicates an interval can allow. POSIX-conforming systems might define this in , but we want our value, so remove any previous define. */ # ifdef RE_DUP_MAX # undef RE_DUP_MAX # endif /* RE_DUP_MAX is 2**15 - 1 because an earlier implementation stored the counter as a 2-byte signed integer. This is no longer true, so RE_DUP_MAX could be increased to (INT_MAX / 10 - 1), or to ((SIZE_MAX - 2) / 10 - 1) if _REGEX_LARGE_OFFSETS is defined. However, there would be a huge performance problem if someone actually used a pattern like a\{214748363\}, so RE_DUP_MAX retains its historical value. */ # define RE_DUP_MAX (0x7fff) #endif /* defined __USE_GNU_REGEX */ /* POSIX `cflags' bits (i.e., information for `regcomp'). */ /* If this bit is set, then use extended regular expression syntax. If not set, then use basic regular expression syntax. */ #define REG_EXTENDED 1 /* If this bit is set, then ignore case when matching. If not set, then case is significant. */ #define REG_ICASE (1 << 1) /* If this bit is set, then anchors do not match at newline characters in the string. If not set, then anchors do match at newlines. */ #define REG_NEWLINE (1 << 2) /* If this bit is set, then report only success or fail in regexec. If not set, then returns differ between not matching and errors. */ #define REG_NOSUB (1 << 3) /* POSIX `eflags' bits (i.e., information for regexec). */ /* If this bit is set, then the beginning-of-line operator doesn't match the beginning of the string (presumably because it's not the beginning of a line). If not set, then the beginning-of-line operator does match the beginning of the string. */ #define REG_NOTBOL 1 /* Like REG_NOTBOL, except for the end-of-line. */ #define REG_NOTEOL (1 << 1) /* Use PMATCH[0] to delimit the start and end of the search in the buffer. */ #define REG_STARTEND (1 << 2) /* If any error codes are removed, changed, or added, update the `__re_error_msgid' table in regcomp.c. */ typedef enum { _REG_ENOSYS = -1, /* This will never happen for this implementation. */ _REG_NOERROR = 0, /* Success. */ _REG_NOMATCH, /* Didn't find a match (for regexec). */ /* POSIX regcomp return error codes. (In the order listed in the standard.) */ _REG_BADPAT, /* Invalid pattern. */ _REG_ECOLLATE, /* Invalid collating element. */ _REG_ECTYPE, /* Invalid character class name. */ _REG_EESCAPE, /* Trailing backslash. */ _REG_ESUBREG, /* Invalid back reference. */ _REG_EBRACK, /* Unmatched left bracket. */ _REG_EPAREN, /* Parenthesis imbalance. */ _REG_EBRACE, /* Unmatched \{. */ _REG_BADBR, /* Invalid contents of \{\}. */ _REG_ERANGE, /* Invalid range end. */ _REG_ESPACE, /* Ran out of memory. */ _REG_BADRPT, /* No preceding re for repetition op. */ /* Error codes we've added. */ _REG_EEND, /* Premature end. */ _REG_ESIZE, /* Compiled pattern bigger than 2^16 bytes. */ _REG_ERPAREN /* Unmatched ) or \); not returned from regcomp. */ } reg_errcode_t; #ifdef _XOPEN_SOURCE # define REG_ENOSYS _REG_ENOSYS #endif #define REG_NOERROR _REG_NOERROR #define REG_NOMATCH _REG_NOMATCH #define REG_BADPAT _REG_BADPAT #define REG_ECOLLATE _REG_ECOLLATE #define REG_ECTYPE _REG_ECTYPE #define REG_EESCAPE _REG_EESCAPE #define REG_ESUBREG _REG_ESUBREG #define REG_EBRACK _REG_EBRACK #define REG_EPAREN _REG_EPAREN #define REG_EBRACE _REG_EBRACE #define REG_BADBR _REG_BADBR #define REG_ERANGE _REG_ERANGE #define REG_ESPACE _REG_ESPACE #define REG_BADRPT _REG_BADRPT #define REG_EEND _REG_EEND #define REG_ESIZE _REG_ESIZE #define REG_ERPAREN _REG_ERPAREN /* struct re_pattern_buffer normally uses member names like `buffer' that POSIX does not allow. In POSIX mode these members have names with leading `re_' (e.g., `re_buffer'). */ #ifdef __USE_GNU_REGEX # define _REG_RE_NAME(id) id # define _REG_RM_NAME(id) id #else # define _REG_RE_NAME(id) re_##id # define _REG_RM_NAME(id) rm_##id #endif /* The user can specify the type of the re_translate member by defining the macro RE_TRANSLATE_TYPE, which defaults to unsigned char *. This pollutes the POSIX name space, so in POSIX mode just use unsigned char *. */ #ifdef __USE_GNU_REGEX # ifndef RE_TRANSLATE_TYPE # define RE_TRANSLATE_TYPE unsigned char * # endif # define REG_TRANSLATE_TYPE RE_TRANSLATE_TYPE #else # define REG_TRANSLATE_TYPE unsigned char * #endif /* This data structure represents a compiled pattern. Before calling the pattern compiler, the fields `buffer', `allocated', `fastmap', `translate', and `no_sub' can be set. After the pattern has been compiled, the `re_nsub' field is available. All other fields are private to the regex routines. */ struct re_pattern_buffer { /* Space that holds the compiled pattern. It is declared as `unsigned char *' because its elements are sometimes used as array indexes. */ unsigned char *_REG_RE_NAME (buffer); /* Number of bytes to which `buffer' points. */ __re_long_size_t _REG_RE_NAME (allocated); /* Number of bytes actually used in `buffer'. */ __re_long_size_t _REG_RE_NAME (used); /* Syntax setting with which the pattern was compiled. */ reg_syntax_t _REG_RE_NAME (syntax); /* Pointer to a fastmap, if any, otherwise zero. re_search uses the fastmap, if there is one, to skip over impossible starting points for matches. */ char *_REG_RE_NAME (fastmap); /* Either a translate table to apply to all characters before comparing them, or zero for no translation. The translation is applied to a pattern when it is compiled and to a string when it is matched. */ REG_TRANSLATE_TYPE _REG_RE_NAME (translate); /* Number of subexpressions found by the compiler. */ size_t re_nsub; /* Zero if this pattern cannot match the empty string, one else. Well, in truth it's used only in `re_search_2', to see whether or not we should use the fastmap, so we don't set this absolutely perfectly; see `re_compile_fastmap' (the `duplicate' case). */ unsigned int _REG_RE_NAME (can_be_null) : 1; /* If REGS_UNALLOCATED, allocate space in the `regs' structure for `max (RE_NREGS, re_nsub + 1)' groups. If REGS_REALLOCATE, reallocate space if necessary. If REGS_FIXED, use what's there. */ #ifdef __USE_GNU_REGEX # define REGS_UNALLOCATED 0 # define REGS_REALLOCATE 1 # define REGS_FIXED 2 #endif unsigned int _REG_RE_NAME (regs_allocated) : 2; /* Set to zero when `regex_compile' compiles a pattern; set to one by `re_compile_fastmap' if it updates the fastmap. */ unsigned int _REG_RE_NAME (fastmap_accurate) : 1; /* If set, `re_match_2' does not return information about subexpressions. */ unsigned int _REG_RE_NAME (no_sub) : 1; /* If set, a beginning-of-line anchor doesn't match at the beginning of the string. */ unsigned int _REG_RE_NAME (not_bol) : 1; /* Similarly for an end-of-line anchor. */ unsigned int _REG_RE_NAME (not_eol) : 1; /* If true, an anchor at a newline matches. */ unsigned int _REG_RE_NAME (newline_anchor) : 1; /* [[[end pattern_buffer]]] */ }; typedef struct re_pattern_buffer regex_t; /* This is the structure we store register match data in. See regex.texinfo for a full description of what registers match. */ struct re_registers { __re_size_t _REG_RM_NAME (num_regs); regoff_t *_REG_RM_NAME (start); regoff_t *_REG_RM_NAME (end); }; /* If `regs_allocated' is REGS_UNALLOCATED in the pattern buffer, `re_match_2' returns information about at least this many registers the first time a `regs' structure is passed. */ #if !defined RE_NREGS && defined __USE_GNU_REGEX # define RE_NREGS 30 #endif /* POSIX specification for registers. Aside from the different names than `re_registers', POSIX uses an array of structures, instead of a structure of arrays. */ typedef struct { regoff_t rm_so; /* Byte offset from string's start to substring's start. */ regoff_t rm_eo; /* Byte offset from string's start to substring's end. */ } regmatch_t; /* Declarations for routines. */ /* Sets the current default syntax to SYNTAX, and return the old syntax. You can also simply assign to the `re_syntax_options' variable. */ extern reg_syntax_t re_set_syntax (reg_syntax_t __syntax); /* Compile the regular expression PATTERN, with length LENGTH and syntax given by the global `re_syntax_options', into the buffer BUFFER. Return NULL if successful, and an error string if not. */ extern const char *re_compile_pattern (const char *__pattern, size_t __length, struct re_pattern_buffer *__buffer); /* Compile a fastmap for the compiled pattern in BUFFER; used to accelerate searches. Return 0 if successful and -2 if was an internal error. */ extern int re_compile_fastmap (struct re_pattern_buffer *__buffer); /* Search in the string STRING (with length LENGTH) for the pattern compiled into BUFFER. Start searching at position START, for RANGE characters. Return the starting position of the match, -1 for no match, or -2 for an internal error. Also return register information in REGS (if REGS and BUFFER->no_sub are nonzero). */ extern regoff_t re_search (struct re_pattern_buffer *__buffer, const char *__string, __re_idx_t __length, __re_idx_t __start, regoff_t __range, struct re_registers *__regs); /* Like `re_search', but search in the concatenation of STRING1 and STRING2. Also, stop searching at index START + STOP. */ extern regoff_t re_search_2 (struct re_pattern_buffer *__buffer, const char *__string1, __re_idx_t __length1, const char *__string2, __re_idx_t __length2, __re_idx_t __start, regoff_t __range, struct re_registers *__regs, __re_idx_t __stop); /* Like `re_search', but return how many characters in STRING the regexp in BUFFER matched, starting at position START. */ extern regoff_t re_match (struct re_pattern_buffer *__buffer, const char *__string, __re_idx_t __length, __re_idx_t __start, struct re_registers *__regs); /* Relates to `re_match' as `re_search_2' relates to `re_search'. */ extern regoff_t re_match_2 (struct re_pattern_buffer *__buffer, const char *__string1, __re_idx_t __length1, const char *__string2, __re_idx_t __length2, __re_idx_t __start, struct re_registers *__regs, __re_idx_t __stop); /* Set REGS to hold NUM_REGS registers, storing them in STARTS and ENDS. Subsequent matches using BUFFER and REGS will use this memory for recording register information. STARTS and ENDS must be allocated with malloc, and must each be at least `NUM_REGS * sizeof (regoff_t)' bytes long. If NUM_REGS == 0, then subsequent matches should allocate their own register data. Unless this function is called, the first search or match using PATTERN_BUFFER will allocate its own register data, without freeing the old data. */ extern void re_set_registers (struct re_pattern_buffer *__buffer, struct re_registers *__regs, __re_size_t __num_regs, regoff_t *__starts, regoff_t *__ends); #if defined _REGEX_RE_COMP || defined _LIBC # ifndef _CRAY /* 4.2 bsd compatibility. */ extern char *re_comp (const char *); extern int re_exec (const char *); # endif #endif /* GCC 2.95 and later have "__restrict"; C99 compilers have "restrict", and "configure" may have defined "restrict". Other compilers use __restrict, __restrict__, and _Restrict, and 'configure' might #define 'restrict' to those words, so pick a different name. */ #ifndef _Restrict_ # if 199901L <= __STDC_VERSION__ # define _Restrict_ restrict # elif 2 < __GNUC__ || (2 == __GNUC__ && 95 <= __GNUC_MINOR__) # define _Restrict_ __restrict # else # define _Restrict_ # endif #endif /* gcc 3.1 and up support the [restrict] syntax. Don't trust sys/cdefs.h's definition of __restrict_arr, though, as it mishandles gcc -ansi -pedantic. */ #ifndef _Restrict_arr_ # if ((199901L <= __STDC_VERSION__ \ || ((3 < __GNUC__ || (3 == __GNUC__ && 1 <= __GNUC_MINOR__)) \ && !__STRICT_ANSI__)) \ && !defined __GNUG__) # define _Restrict_arr_ _Restrict_ # else # define _Restrict_arr_ # endif #endif /* POSIX compatibility. */ extern int regcomp (regex_t *_Restrict_ __preg, const char *_Restrict_ __pattern, int __cflags); extern int regexec (const regex_t *_Restrict_ __preg, const char *_Restrict_ __string, size_t __nmatch, regmatch_t __pmatch[_Restrict_arr_], int __eflags); extern size_t regerror (int __errcode, const regex_t *_Restrict_ __preg, char *_Restrict_ __errbuf, size_t __errbuf_size); extern void regfree (regex_t *__preg); #ifdef __cplusplus } #endif /* C++ */ #endif /* regex.h */ libprelude-1.0.0/libmissing/sockets.h0000664000076400007640000000302311341220440014543 00000000000000/* sockets.h - wrappers for Windows socket functions Copyright (C) 2008, 2009, 2010 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 3 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 Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . */ /* Written by Simon Josefsson */ #ifndef SOCKETS_H # define SOCKETS_H 1 #define SOCKETS_1_0 0x100 /* don't use - does not work on Windows XP */ #define SOCKETS_1_1 0x101 #define SOCKETS_2_0 0x200 /* don't use - does not work on Windows XP */ #define SOCKETS_2_1 0x201 #define SOCKETS_2_2 0x202 int gl_sockets_startup (int version); int gl_sockets_cleanup (void); /* This function is useful it you create a socket using gnulib's Winsock wrappers but needs to pass on the socket handle to some other library that only accepts sockets. */ #if WINDOWS_SOCKETS #include static inline SOCKET gl_fd_to_handle (int fd) { return _get_osfhandle (fd); } #else #define gl_fd_to_handle(x) (x) #endif /* WINDOWS_SOCKETS */ #endif /* SOCKETS_H */ libprelude-1.0.0/libmissing/accept.c0000664000076400007640000000233411341220434014331 00000000000000/* accept.c --- wrappers for Windows accept function Copyright (C) 2008, 2009, 2010 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 3 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 Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . */ /* Written by Paolo Bonzini */ #include #define WIN32_LEAN_AND_MEAN /* Get winsock2.h. */ #include /* Get set_winsock_errno, FD_TO_SOCKET etc. */ #include "w32sock.h" #undef accept int rpl_accept (int fd, struct sockaddr *addr, int *addrlen) { SOCKET fh = accept (FD_TO_SOCKET (fd), addr, addrlen); if (fh == INVALID_SOCKET) { set_winsock_errno (); return -1; } else return SOCKET_TO_FD (fh); } libprelude-1.0.0/libmissing/strncasecmp.c0000664000076400007640000000371511341220440015415 00000000000000/* strncasecmp.c -- case insensitive string comparator Copyright (C) 1998-1999, 2005-2007, 2009-2010 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser 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 Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ #include /* Specification. */ #include #include #include #define TOLOWER(Ch) (isupper (Ch) ? tolower (Ch) : (Ch)) /* Compare no more than N bytes of strings S1 and S2, ignoring case, returning less than, equal to or greater than zero if S1 is lexicographically less than, equal to or greater than S2. Note: This function cannot work correctly in multibyte locales. */ int strncasecmp (const char *s1, const char *s2, size_t n) { register const unsigned char *p1 = (const unsigned char *) s1; register const unsigned char *p2 = (const unsigned char *) s2; unsigned char c1, c2; if (p1 == p2 || n == 0) return 0; do { c1 = TOLOWER (*p1); c2 = TOLOWER (*p2); if (--n == 0 || c1 == '\0') break; ++p1; ++p2; } while (c1 == c2); if (UCHAR_MAX <= INT_MAX) return c1 - c2; else /* On machines where 'char' and 'int' are types of the same size, the difference of two 'unsigned char' values - including the sign bit - doesn't fit in an 'int'. */ return (c1 > c2 ? 1 : c1 < c2 ? -1 : 0); } libprelude-1.0.0/libmissing/time.in.h0000664000076400007640000001026311341220442014441 00000000000000/* A more-standard . Copyright (C) 2007-2010 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser 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 Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ #if __GNUC__ >= 3 @PRAGMA_SYSTEM_HEADER@ #endif /* Don't get in the way of glibc when it includes time.h merely to declare a few standard symbols, rather than to declare all the symbols. Also, Solaris 8 eventually includes itself recursively; if that is happening, just include the system without adding our own declarations. */ #if (defined __need_time_t || defined __need_clock_t \ || defined __need_timespec \ || defined _GL_TIME_H) # @INCLUDE_NEXT@ @NEXT_TIME_H@ #else # define _GL_TIME_H # @INCLUDE_NEXT@ @NEXT_TIME_H@ /* NetBSD 5.0 mis-defines NULL. */ #include /* The definition of _GL_ARG_NONNULL is copied here. */ # ifdef __cplusplus extern "C" { # endif /* Some systems don't define struct timespec (e.g., AIX 4.1, Ultrix 4.3). Or they define it with the wrong member names or define it in (e.g., FreeBSD circa 1997). */ # if ! @TIME_H_DEFINES_STRUCT_TIMESPEC@ # if @SYS_TIME_H_DEFINES_STRUCT_TIMESPEC@ # include # else # undef timespec # define timespec rpl_timespec struct timespec { time_t tv_sec; long int tv_nsec; }; # endif # endif /* Sleep for at least RQTP seconds unless interrupted, If interrupted, return -1 and store the remaining time into RMTP. See . */ # if @REPLACE_NANOSLEEP@ # define nanosleep rpl_nanosleep extern int nanosleep (struct timespec const *__rqtp, struct timespec *__rmtp) _GL_ARG_NONNULL ((1)); # endif /* Return the 'time_t' representation of TP and normalize TP. */ # if @REPLACE_MKTIME@ # define mktime rpl_mktime extern time_t mktime (struct tm *__tp) _GL_ARG_NONNULL ((1)); # endif /* Convert TIMER to RESULT, assuming local time and UTC respectively. See and . */ # if @REPLACE_LOCALTIME_R@ # undef localtime_r # define localtime_r rpl_localtime_r # undef gmtime_r # define gmtime_r rpl_gmtime_r extern struct tm *localtime_r (time_t const *restrict __timer, struct tm *restrict __result) _GL_ARG_NONNULL ((1, 2)); extern struct tm *gmtime_r (time_t const *restrict __timer, struct tm *restrict __result) _GL_ARG_NONNULL ((1, 2)); # endif /* Parse BUF as a time stamp, assuming FORMAT specifies its layout, and store the resulting broken-down time into TM. See . */ # if @REPLACE_STRPTIME@ # undef strptime # define strptime rpl_strptime extern char *strptime (char const *restrict __buf, char const *restrict __format, struct tm *restrict __tm) _GL_ARG_NONNULL ((1, 2, 3)); # endif /* Convert TM to a time_t value, assuming UTC. */ # if @REPLACE_TIMEGM@ # undef timegm # define timegm rpl_timegm extern time_t timegm (struct tm *__tm) _GL_ARG_NONNULL ((1)); # endif /* Encourage applications to avoid unsafe functions that can overrun buffers when given outlandish struct tm values. Portable applications should use strftime (or even sprintf) instead. */ # if GNULIB_PORTCHECK # undef asctime # define asctime eschew_asctime # undef asctime_r # define asctime_r eschew_asctime_r # undef ctime # define ctime eschew_ctime # undef ctime_r # define ctime_r eschew_ctime_r # endif # ifdef __cplusplus } # endif #endif libprelude-1.0.0/libmissing/Makefile.in0000664000076400007640000035011511347714455015017 00000000000000# Makefile.in generated by automake 1.11.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, # Inc. # This Makefile.in 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. @SET_MAKE@ # Copyright (C) 2002-2010 Free Software Foundation, Inc. # # This file is free software, distributed under the terms of the GNU # General Public License. As a special exception to the GNU General # Public License, this file may be distributed as part of a program # that contains a configuration script generated by Autoconf, under # the same distribution terms as the rest of that program. # # Generated by gnulib-tool. # Reproduce by: gnulib-tool --import --dir=. --lib=libmissing --source-base=libmissing --m4-base=libmissing/m4 --doc-base=libmissing/doc --tests-base=libmissing/tests --aux-dir=. --with-tests --lgpl --libtool --macro-prefix=gl --no-vc-files accept bind close cond connect dup2 fclose fopen ftw getaddrinfo getpass getsockname gettimeofday inet_ntop inet_pton ioctl listen lock lseek memmem minmax pathmax perror poll regex relocatable-lib-lgpl select setsockopt sigprocmask sleep snprintf-posix socket socklen strcase strcasestr strdup strerror strndup strptime strsep sys_stat thread time_r timegm tls uname vsnprintf-posix write VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ target_triplet = @target@ subdir = libmissing DIST_COMMON = $(noinst_HEADERS) $(srcdir)/Makefile.am \ $(srcdir)/Makefile.in alloca.c ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/libmissing/m4/00gnulib.m4 \ $(top_srcdir)/libmissing/m4/alloca.m4 \ $(top_srcdir)/libmissing/m4/arpa_inet_h.m4 \ $(top_srcdir)/libmissing/m4/btowc.m4 \ $(top_srcdir)/libmissing/m4/close.m4 \ $(top_srcdir)/libmissing/m4/codeset.m4 \ $(top_srcdir)/libmissing/m4/cond.m4 \ $(top_srcdir)/libmissing/m4/dos.m4 \ $(top_srcdir)/libmissing/m4/dup2.m4 \ $(top_srcdir)/libmissing/m4/errno_h.m4 \ $(top_srcdir)/libmissing/m4/exponentd.m4 \ $(top_srcdir)/libmissing/m4/exponentf.m4 \ $(top_srcdir)/libmissing/m4/exponentl.m4 \ $(top_srcdir)/libmissing/m4/extensions.m4 \ $(top_srcdir)/libmissing/m4/fclose.m4 \ $(top_srcdir)/libmissing/m4/fcntl-o.m4 \ $(top_srcdir)/libmissing/m4/fcntl_h.m4 \ $(top_srcdir)/libmissing/m4/float_h.m4 \ $(top_srcdir)/libmissing/m4/fopen.m4 \ $(top_srcdir)/libmissing/m4/fpieee.m4 \ $(top_srcdir)/libmissing/m4/frexp.m4 \ $(top_srcdir)/libmissing/m4/frexpl.m4 \ $(top_srcdir)/libmissing/m4/fseeko.m4 \ $(top_srcdir)/libmissing/m4/ftw.m4 \ $(top_srcdir)/libmissing/m4/getaddrinfo.m4 \ $(top_srcdir)/libmissing/m4/getdelim.m4 \ $(top_srcdir)/libmissing/m4/gethostname.m4 \ $(top_srcdir)/libmissing/m4/getline.m4 \ $(top_srcdir)/libmissing/m4/getpagesize.m4 \ $(top_srcdir)/libmissing/m4/getpass.m4 \ $(top_srcdir)/libmissing/m4/gettimeofday.m4 \ $(top_srcdir)/libmissing/m4/glibc21.m4 \ $(top_srcdir)/libmissing/m4/gnulib-common.m4 \ $(top_srcdir)/libmissing/m4/gnulib-comp.m4 \ $(top_srcdir)/libmissing/m4/gnulib-tool.m4 \ $(top_srcdir)/libmissing/m4/hostent.m4 \ $(top_srcdir)/libmissing/m4/include_next.m4 \ $(top_srcdir)/libmissing/m4/inet_ntop.m4 \ $(top_srcdir)/libmissing/m4/inet_pton.m4 \ $(top_srcdir)/libmissing/m4/intmax_t.m4 \ $(top_srcdir)/libmissing/m4/inttypes_h.m4 \ $(top_srcdir)/libmissing/m4/isnand.m4 \ $(top_srcdir)/libmissing/m4/isnanf.m4 \ $(top_srcdir)/libmissing/m4/isnanl.m4 \ $(top_srcdir)/libmissing/m4/langinfo_h.m4 \ $(top_srcdir)/libmissing/m4/ldexpl.m4 \ $(top_srcdir)/libmissing/m4/lib-ld.m4 \ $(top_srcdir)/libmissing/m4/lib-link.m4 \ $(top_srcdir)/libmissing/m4/lib-prefix.m4 \ $(top_srcdir)/libmissing/m4/localcharset.m4 \ $(top_srcdir)/libmissing/m4/locale-fr.m4 \ $(top_srcdir)/libmissing/m4/locale-ja.m4 \ $(top_srcdir)/libmissing/m4/locale-tr.m4 \ $(top_srcdir)/libmissing/m4/locale-zh.m4 \ $(top_srcdir)/libmissing/m4/lock.m4 \ $(top_srcdir)/libmissing/m4/longlong.m4 \ $(top_srcdir)/libmissing/m4/lseek.m4 \ $(top_srcdir)/libmissing/m4/lstat.m4 \ $(top_srcdir)/libmissing/m4/malloc.m4 \ $(top_srcdir)/libmissing/m4/math_h.m4 \ $(top_srcdir)/libmissing/m4/mbrtowc.m4 \ $(top_srcdir)/libmissing/m4/mbsinit.m4 \ $(top_srcdir)/libmissing/m4/mbstate_t.m4 \ $(top_srcdir)/libmissing/m4/memchr.m4 \ $(top_srcdir)/libmissing/m4/memmem.m4 \ $(top_srcdir)/libmissing/m4/minmax.m4 \ $(top_srcdir)/libmissing/m4/mktime.m4 \ $(top_srcdir)/libmissing/m4/mmap-anon.m4 \ $(top_srcdir)/libmissing/m4/mode_t.m4 \ $(top_srcdir)/libmissing/m4/multiarch.m4 \ $(top_srcdir)/libmissing/m4/netdb_h.m4 \ $(top_srcdir)/libmissing/m4/netinet_in_h.m4 \ $(top_srcdir)/libmissing/m4/nl_langinfo.m4 \ $(top_srcdir)/libmissing/m4/nocrash.m4 \ $(top_srcdir)/libmissing/m4/onceonly.m4 \ $(top_srcdir)/libmissing/m4/open.m4 \ $(top_srcdir)/libmissing/m4/pathmax.m4 \ $(top_srcdir)/libmissing/m4/perror.m4 \ $(top_srcdir)/libmissing/m4/poll.m4 \ $(top_srcdir)/libmissing/m4/printf-frexp.m4 \ $(top_srcdir)/libmissing/m4/printf-frexpl.m4 \ $(top_srcdir)/libmissing/m4/printf.m4 \ $(top_srcdir)/libmissing/m4/realloc.m4 \ $(top_srcdir)/libmissing/m4/regex.m4 \ $(top_srcdir)/libmissing/m4/relocatable-lib.m4 \ $(top_srcdir)/libmissing/m4/select.m4 \ $(top_srcdir)/libmissing/m4/servent.m4 \ $(top_srcdir)/libmissing/m4/signal_h.m4 \ $(top_srcdir)/libmissing/m4/signalblocking.m4 \ $(top_srcdir)/libmissing/m4/signbit.m4 \ $(top_srcdir)/libmissing/m4/size_max.m4 \ $(top_srcdir)/libmissing/m4/sleep.m4 \ $(top_srcdir)/libmissing/m4/snprintf-posix.m4 \ $(top_srcdir)/libmissing/m4/snprintf.m4 \ $(top_srcdir)/libmissing/m4/sockets.m4 \ $(top_srcdir)/libmissing/m4/socklen.m4 \ $(top_srcdir)/libmissing/m4/sockpfaf.m4 \ $(top_srcdir)/libmissing/m4/ssize_t.m4 \ $(top_srcdir)/libmissing/m4/stat.m4 \ $(top_srcdir)/libmissing/m4/stdbool.m4 \ $(top_srcdir)/libmissing/m4/stddef_h.m4 \ $(top_srcdir)/libmissing/m4/stdint.m4 \ $(top_srcdir)/libmissing/m4/stdint_h.m4 \ $(top_srcdir)/libmissing/m4/stdio_h.m4 \ $(top_srcdir)/libmissing/m4/stdlib_h.m4 \ $(top_srcdir)/libmissing/m4/strcase.m4 \ $(top_srcdir)/libmissing/m4/strcasestr.m4 \ $(top_srcdir)/libmissing/m4/strdup.m4 \ $(top_srcdir)/libmissing/m4/strerror.m4 \ $(top_srcdir)/libmissing/m4/string_h.m4 \ $(top_srcdir)/libmissing/m4/strings_h.m4 \ $(top_srcdir)/libmissing/m4/strndup.m4 \ $(top_srcdir)/libmissing/m4/strnlen.m4 \ $(top_srcdir)/libmissing/m4/strptime.m4 \ $(top_srcdir)/libmissing/m4/strsep.m4 \ $(top_srcdir)/libmissing/m4/symlink.m4 \ $(top_srcdir)/libmissing/m4/sys_ioctl_h.m4 \ $(top_srcdir)/libmissing/m4/sys_select_h.m4 \ $(top_srcdir)/libmissing/m4/sys_socket_h.m4 \ $(top_srcdir)/libmissing/m4/sys_stat_h.m4 \ $(top_srcdir)/libmissing/m4/sys_time_h.m4 \ $(top_srcdir)/libmissing/m4/sys_utsname_h.m4 \ $(top_srcdir)/libmissing/m4/thread.m4 \ $(top_srcdir)/libmissing/m4/threadlib.m4 \ $(top_srcdir)/libmissing/m4/time_h.m4 \ $(top_srcdir)/libmissing/m4/time_r.m4 \ $(top_srcdir)/libmissing/m4/timegm.m4 \ $(top_srcdir)/libmissing/m4/tls.m4 \ $(top_srcdir)/libmissing/m4/tm_gmtoff.m4 \ $(top_srcdir)/libmissing/m4/uname.m4 \ $(top_srcdir)/libmissing/m4/ungetc.m4 \ $(top_srcdir)/libmissing/m4/unistd_h.m4 \ $(top_srcdir)/libmissing/m4/vasnprintf.m4 \ $(top_srcdir)/libmissing/m4/vsnprintf-posix.m4 \ $(top_srcdir)/libmissing/m4/vsnprintf.m4 \ $(top_srcdir)/libmissing/m4/warn-on-use.m4 \ $(top_srcdir)/libmissing/m4/wchar.m4 \ $(top_srcdir)/libmissing/m4/wchar_t.m4 \ $(top_srcdir)/libmissing/m4/wcrtomb.m4 \ $(top_srcdir)/libmissing/m4/wctob.m4 \ $(top_srcdir)/libmissing/m4/wctype.m4 \ $(top_srcdir)/libmissing/m4/wint_t.m4 \ $(top_srcdir)/libmissing/m4/write.m4 \ $(top_srcdir)/libmissing/m4/xsize.m4 \ $(top_srcdir)/libmissing/m4/yield.m4 \ $(top_srcdir)/m4/ac_compile_check_sizeof.m4 \ $(top_srcdir)/m4/am_path_ruby.m4 $(top_srcdir)/m4/argz.m4 \ $(top_srcdir)/m4/as-ac-expand.m4 \ $(top_srcdir)/m4/ax_c_check_flag.m4 \ $(top_srcdir)/m4/ax_check_aligned_access_required.m4 \ $(top_srcdir)/m4/ax_create_prelude_inttypes_h.m4 \ $(top_srcdir)/m4/ax_ld_check_flag.m4 \ $(top_srcdir)/m4/gtk-doc.m4 $(top_srcdir)/m4/libgcrypt.m4 \ $(top_srcdir)/m4/libgnutls-extra.m4 \ $(top_srcdir)/m4/libgnutls.m4 $(top_srcdir)/m4/libtool.m4 \ $(top_srcdir)/m4/ltdl.m4 $(top_srcdir)/m4/ltoptions.m4 \ $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/m4/pkg.m4 \ $(top_srcdir)/configure.in am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = LIBRARIES = $(noinst_LIBRARIES) LTLIBRARIES = $(noinst_LTLIBRARIES) am__DEPENDENCIES_1 = am__dirstamp = $(am__leading_dot)dirstamp am_libmissing_la_OBJECTS = c-ctype.lo close-hook.lo glthread/cond.lo \ localcharset.lo glthread/lock.lo printf-frexp.lo \ printf-frexpl.lo sockets.lo glthread/thread.lo \ glthread/threadlib.lo glthread/tls.lo libmissing_la_OBJECTS = $(am_libmissing_la_OBJECTS) libmissing_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(libmissing_la_LDFLAGS) $(LDFLAGS) -o $@ DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) CCLD = $(CC) LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ $(LDFLAGS) -o $@ SOURCES = $(libmissing_la_SOURCES) $(EXTRA_libmissing_la_SOURCES) DIST_SOURCES = $(libmissing_la_SOURCES) $(EXTRA_libmissing_la_SOURCES) RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \ html-recursive info-recursive install-data-recursive \ install-dvi-recursive install-exec-recursive \ install-html-recursive install-info-recursive \ install-pdf-recursive install-ps-recursive install-recursive \ installcheck-recursive installdirs-recursive pdf-recursive \ ps-recursive uninstall-recursive HEADERS = $(noinst_HEADERS) RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ distclean-recursive maintainer-clean-recursive AM_RECURSIVE_TARGETS = $(RECURSIVE_TARGETS:-recursive=) \ $(RECURSIVE_CLEAN_TARGETS:-recursive=) tags TAGS ctags CTAGS \ distdir ETAGS = etags CTAGS = ctags DIST_SUBDIRS = $(SUBDIRS) DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) am__relativize = \ dir0=`pwd`; \ sed_first='s,^\([^/]*\)/.*$$,\1,'; \ sed_rest='s,^[^/]*/*,,'; \ sed_last='s,^.*/\([^/]*\)$$,\1,'; \ sed_butlast='s,/*[^/]*$$,,'; \ while test -n "$$dir1"; do \ first=`echo "$$dir1" | sed -e "$$sed_first"`; \ if test "$$first" != "."; then \ if test "$$first" = ".."; then \ dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \ dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \ else \ first2=`echo "$$dir2" | sed -e "$$sed_first"`; \ if test "$$first2" = "$$first"; then \ dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \ else \ dir2="../$$dir2"; \ fi; \ dir0="$$dir0"/"$$first"; \ fi; \ fi; \ dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \ done; \ reldir="$$dir2" ACLOCAL = @ACLOCAL@ ALLOCA = @ALLOCA@ ALLOCA_H = @ALLOCA_H@ AMTAR = @AMTAR@ APPLE_UNIVERSAL_BUILD = @APPLE_UNIVERSAL_BUILD@ AR = @AR@ ARGZ_H = @ARGZ_H@ AS = @AS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ BINDINGS_CC = @BINDINGS_CC@ BINDIR = @BINDIR@ BITSIZEOF_PTRDIFF_T = @BITSIZEOF_PTRDIFF_T@ BITSIZEOF_SIG_ATOMIC_T = @BITSIZEOF_SIG_ATOMIC_T@ BITSIZEOF_SIZE_T = @BITSIZEOF_SIZE_T@ BITSIZEOF_WCHAR_T = @BITSIZEOF_WCHAR_T@ BITSIZEOF_WINT_T = @BITSIZEOF_WINT_T@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CC_FOR_BUILD = @CC_FOR_BUILD@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ -DNO_XMALLOC DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EMULTIHOP_HIDDEN = @EMULTIHOP_HIDDEN@ EMULTIHOP_VALUE = @EMULTIHOP_VALUE@ ENOLINK_HIDDEN = @ENOLINK_HIDDEN@ ENOLINK_VALUE = @ENOLINK_VALUE@ EOVERFLOW_HIDDEN = @EOVERFLOW_HIDDEN@ EOVERFLOW_VALUE = @EOVERFLOW_VALUE@ ERRNO_H = @ERRNO_H@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ FLOAT_H = @FLOAT_H@ GETADDRINFO_LIB = @GETADDRINFO_LIB@ GETHOSTNAME_LIB = @GETHOSTNAME_LIB@ GLIBC21 = @GLIBC21@ GNULIB_ACCEPT = @GNULIB_ACCEPT@ GNULIB_ACCEPT4 = @GNULIB_ACCEPT4@ GNULIB_ACOSL = @GNULIB_ACOSL@ GNULIB_ASINL = @GNULIB_ASINL@ GNULIB_ATANL = @GNULIB_ATANL@ GNULIB_ATOLL = @GNULIB_ATOLL@ GNULIB_BIND = @GNULIB_BIND@ GNULIB_BTOWC = @GNULIB_BTOWC@ GNULIB_CALLOC_POSIX = @GNULIB_CALLOC_POSIX@ GNULIB_CANONICALIZE_FILE_NAME = @GNULIB_CANONICALIZE_FILE_NAME@ GNULIB_CEILF = @GNULIB_CEILF@ GNULIB_CEILL = @GNULIB_CEILL@ GNULIB_CHOWN = @GNULIB_CHOWN@ GNULIB_CLOSE = @GNULIB_CLOSE@ GNULIB_CONNECT = @GNULIB_CONNECT@ GNULIB_COSL = @GNULIB_COSL@ GNULIB_DPRINTF = @GNULIB_DPRINTF@ GNULIB_DUP2 = @GNULIB_DUP2@ GNULIB_DUP3 = @GNULIB_DUP3@ GNULIB_ENVIRON = @GNULIB_ENVIRON@ GNULIB_EUIDACCESS = @GNULIB_EUIDACCESS@ GNULIB_EXPL = @GNULIB_EXPL@ GNULIB_FACCESSAT = @GNULIB_FACCESSAT@ GNULIB_FCHDIR = @GNULIB_FCHDIR@ GNULIB_FCHMODAT = @GNULIB_FCHMODAT@ GNULIB_FCHOWNAT = @GNULIB_FCHOWNAT@ GNULIB_FCLOSE = @GNULIB_FCLOSE@ GNULIB_FCNTL = @GNULIB_FCNTL@ GNULIB_FFLUSH = @GNULIB_FFLUSH@ GNULIB_FLOORF = @GNULIB_FLOORF@ GNULIB_FLOORL = @GNULIB_FLOORL@ GNULIB_FOPEN = @GNULIB_FOPEN@ GNULIB_FPRINTF = @GNULIB_FPRINTF@ GNULIB_FPRINTF_POSIX = @GNULIB_FPRINTF_POSIX@ GNULIB_FPURGE = @GNULIB_FPURGE@ GNULIB_FPUTC = @GNULIB_FPUTC@ GNULIB_FPUTS = @GNULIB_FPUTS@ GNULIB_FREOPEN = @GNULIB_FREOPEN@ GNULIB_FREXP = @GNULIB_FREXP@ GNULIB_FREXPL = @GNULIB_FREXPL@ GNULIB_FSEEK = @GNULIB_FSEEK@ GNULIB_FSEEKO = @GNULIB_FSEEKO@ GNULIB_FSTATAT = @GNULIB_FSTATAT@ GNULIB_FSYNC = @GNULIB_FSYNC@ GNULIB_FTELL = @GNULIB_FTELL@ GNULIB_FTELLO = @GNULIB_FTELLO@ GNULIB_FTRUNCATE = @GNULIB_FTRUNCATE@ GNULIB_FUTIMENS = @GNULIB_FUTIMENS@ GNULIB_FWRITE = @GNULIB_FWRITE@ GNULIB_GETADDRINFO = @GNULIB_GETADDRINFO@ GNULIB_GETCWD = @GNULIB_GETCWD@ GNULIB_GETDELIM = @GNULIB_GETDELIM@ GNULIB_GETDOMAINNAME = @GNULIB_GETDOMAINNAME@ GNULIB_GETDTABLESIZE = @GNULIB_GETDTABLESIZE@ GNULIB_GETGROUPS = @GNULIB_GETGROUPS@ GNULIB_GETHOSTNAME = @GNULIB_GETHOSTNAME@ GNULIB_GETLINE = @GNULIB_GETLINE@ GNULIB_GETLOADAVG = @GNULIB_GETLOADAVG@ GNULIB_GETLOGIN = @GNULIB_GETLOGIN@ GNULIB_GETLOGIN_R = @GNULIB_GETLOGIN_R@ GNULIB_GETPAGESIZE = @GNULIB_GETPAGESIZE@ GNULIB_GETPEERNAME = @GNULIB_GETPEERNAME@ GNULIB_GETSOCKNAME = @GNULIB_GETSOCKNAME@ GNULIB_GETSOCKOPT = @GNULIB_GETSOCKOPT@ GNULIB_GETSUBOPT = @GNULIB_GETSUBOPT@ GNULIB_GETTIMEOFDAY = @GNULIB_GETTIMEOFDAY@ GNULIB_GETUSERSHELL = @GNULIB_GETUSERSHELL@ GNULIB_INET_NTOP = @GNULIB_INET_NTOP@ GNULIB_INET_PTON = @GNULIB_INET_PTON@ GNULIB_IOCTL = @GNULIB_IOCTL@ GNULIB_ISFINITE = @GNULIB_ISFINITE@ GNULIB_ISINF = @GNULIB_ISINF@ GNULIB_ISNAN = @GNULIB_ISNAN@ GNULIB_ISNAND = @GNULIB_ISNAND@ GNULIB_ISNANF = @GNULIB_ISNANF@ GNULIB_ISNANL = @GNULIB_ISNANL@ GNULIB_LCHMOD = @GNULIB_LCHMOD@ GNULIB_LCHOWN = @GNULIB_LCHOWN@ GNULIB_LDEXPL = @GNULIB_LDEXPL@ GNULIB_LINK = @GNULIB_LINK@ GNULIB_LINKAT = @GNULIB_LINKAT@ GNULIB_LISTEN = @GNULIB_LISTEN@ GNULIB_LOGL = @GNULIB_LOGL@ GNULIB_LSEEK = @GNULIB_LSEEK@ GNULIB_LSTAT = @GNULIB_LSTAT@ GNULIB_MALLOC_POSIX = @GNULIB_MALLOC_POSIX@ GNULIB_MBRLEN = @GNULIB_MBRLEN@ GNULIB_MBRTOWC = @GNULIB_MBRTOWC@ GNULIB_MBSCASECMP = @GNULIB_MBSCASECMP@ GNULIB_MBSCASESTR = @GNULIB_MBSCASESTR@ GNULIB_MBSCHR = @GNULIB_MBSCHR@ GNULIB_MBSCSPN = @GNULIB_MBSCSPN@ GNULIB_MBSINIT = @GNULIB_MBSINIT@ GNULIB_MBSLEN = @GNULIB_MBSLEN@ GNULIB_MBSNCASECMP = @GNULIB_MBSNCASECMP@ GNULIB_MBSNLEN = @GNULIB_MBSNLEN@ GNULIB_MBSNRTOWCS = @GNULIB_MBSNRTOWCS@ GNULIB_MBSPBRK = @GNULIB_MBSPBRK@ GNULIB_MBSPCASECMP = @GNULIB_MBSPCASECMP@ GNULIB_MBSRCHR = @GNULIB_MBSRCHR@ GNULIB_MBSRTOWCS = @GNULIB_MBSRTOWCS@ GNULIB_MBSSEP = @GNULIB_MBSSEP@ GNULIB_MBSSPN = @GNULIB_MBSSPN@ GNULIB_MBSSTR = @GNULIB_MBSSTR@ GNULIB_MBSTOK_R = @GNULIB_MBSTOK_R@ GNULIB_MEMCHR = @GNULIB_MEMCHR@ GNULIB_MEMMEM = @GNULIB_MEMMEM@ GNULIB_MEMPCPY = @GNULIB_MEMPCPY@ GNULIB_MEMRCHR = @GNULIB_MEMRCHR@ GNULIB_MKDIRAT = @GNULIB_MKDIRAT@ GNULIB_MKDTEMP = @GNULIB_MKDTEMP@ GNULIB_MKFIFO = @GNULIB_MKFIFO@ GNULIB_MKFIFOAT = @GNULIB_MKFIFOAT@ GNULIB_MKNOD = @GNULIB_MKNOD@ GNULIB_MKNODAT = @GNULIB_MKNODAT@ GNULIB_MKOSTEMP = @GNULIB_MKOSTEMP@ GNULIB_MKOSTEMPS = @GNULIB_MKOSTEMPS@ GNULIB_MKSTEMP = @GNULIB_MKSTEMP@ GNULIB_MKSTEMPS = @GNULIB_MKSTEMPS@ GNULIB_NL_LANGINFO = @GNULIB_NL_LANGINFO@ GNULIB_OBSTACK_PRINTF = @GNULIB_OBSTACK_PRINTF@ GNULIB_OBSTACK_PRINTF_POSIX = @GNULIB_OBSTACK_PRINTF_POSIX@ GNULIB_OPEN = @GNULIB_OPEN@ GNULIB_OPENAT = @GNULIB_OPENAT@ GNULIB_PERROR = @GNULIB_PERROR@ GNULIB_PIPE2 = @GNULIB_PIPE2@ GNULIB_POPEN = @GNULIB_POPEN@ GNULIB_PREAD = @GNULIB_PREAD@ GNULIB_PRINTF = @GNULIB_PRINTF@ GNULIB_PRINTF_POSIX = @GNULIB_PRINTF_POSIX@ GNULIB_PUTC = @GNULIB_PUTC@ GNULIB_PUTCHAR = @GNULIB_PUTCHAR@ GNULIB_PUTENV = @GNULIB_PUTENV@ GNULIB_PUTS = @GNULIB_PUTS@ GNULIB_RANDOM_R = @GNULIB_RANDOM_R@ GNULIB_RAWMEMCHR = @GNULIB_RAWMEMCHR@ GNULIB_READLINK = @GNULIB_READLINK@ GNULIB_READLINKAT = @GNULIB_READLINKAT@ GNULIB_REALLOC_POSIX = @GNULIB_REALLOC_POSIX@ GNULIB_REALPATH = @GNULIB_REALPATH@ GNULIB_RECV = @GNULIB_RECV@ GNULIB_RECVFROM = @GNULIB_RECVFROM@ GNULIB_REMOVE = @GNULIB_REMOVE@ GNULIB_RENAME = @GNULIB_RENAME@ GNULIB_RENAMEAT = @GNULIB_RENAMEAT@ GNULIB_RMDIR = @GNULIB_RMDIR@ GNULIB_ROUND = @GNULIB_ROUND@ GNULIB_ROUNDF = @GNULIB_ROUNDF@ GNULIB_ROUNDL = @GNULIB_ROUNDL@ GNULIB_RPMATCH = @GNULIB_RPMATCH@ GNULIB_SELECT = @GNULIB_SELECT@ GNULIB_SEND = @GNULIB_SEND@ GNULIB_SENDTO = @GNULIB_SENDTO@ GNULIB_SETENV = @GNULIB_SETENV@ GNULIB_SETSOCKOPT = @GNULIB_SETSOCKOPT@ GNULIB_SHUTDOWN = @GNULIB_SHUTDOWN@ GNULIB_SIGACTION = @GNULIB_SIGACTION@ GNULIB_SIGNAL_H_SIGPIPE = @GNULIB_SIGNAL_H_SIGPIPE@ GNULIB_SIGNBIT = @GNULIB_SIGNBIT@ GNULIB_SIGPROCMASK = @GNULIB_SIGPROCMASK@ GNULIB_SINL = @GNULIB_SINL@ GNULIB_SLEEP = @GNULIB_SLEEP@ GNULIB_SNPRINTF = @GNULIB_SNPRINTF@ GNULIB_SOCKET = @GNULIB_SOCKET@ GNULIB_SPRINTF_POSIX = @GNULIB_SPRINTF_POSIX@ GNULIB_SQRTL = @GNULIB_SQRTL@ GNULIB_STAT = @GNULIB_STAT@ GNULIB_STDIO_H_SIGPIPE = @GNULIB_STDIO_H_SIGPIPE@ GNULIB_STPCPY = @GNULIB_STPCPY@ GNULIB_STPNCPY = @GNULIB_STPNCPY@ GNULIB_STRCASESTR = @GNULIB_STRCASESTR@ GNULIB_STRCHRNUL = @GNULIB_STRCHRNUL@ GNULIB_STRDUP = @GNULIB_STRDUP@ GNULIB_STRERROR = @GNULIB_STRERROR@ GNULIB_STRNDUP = @GNULIB_STRNDUP@ GNULIB_STRNLEN = @GNULIB_STRNLEN@ GNULIB_STRPBRK = @GNULIB_STRPBRK@ GNULIB_STRSEP = @GNULIB_STRSEP@ GNULIB_STRSIGNAL = @GNULIB_STRSIGNAL@ GNULIB_STRSTR = @GNULIB_STRSTR@ GNULIB_STRTOD = @GNULIB_STRTOD@ GNULIB_STRTOK_R = @GNULIB_STRTOK_R@ GNULIB_STRTOLL = @GNULIB_STRTOLL@ GNULIB_STRTOULL = @GNULIB_STRTOULL@ GNULIB_STRVERSCMP = @GNULIB_STRVERSCMP@ GNULIB_SYMLINK = @GNULIB_SYMLINK@ GNULIB_SYMLINKAT = @GNULIB_SYMLINKAT@ GNULIB_TANL = @GNULIB_TANL@ GNULIB_TRUNC = @GNULIB_TRUNC@ GNULIB_TRUNCF = @GNULIB_TRUNCF@ GNULIB_TRUNCL = @GNULIB_TRUNCL@ GNULIB_UNAME = @GNULIB_UNAME@ GNULIB_UNISTD_H_GETOPT = @GNULIB_UNISTD_H_GETOPT@ GNULIB_UNISTD_H_SIGPIPE = @GNULIB_UNISTD_H_SIGPIPE@ GNULIB_UNLINK = @GNULIB_UNLINK@ GNULIB_UNLINKAT = @GNULIB_UNLINKAT@ GNULIB_UNSETENV = @GNULIB_UNSETENV@ GNULIB_USLEEP = @GNULIB_USLEEP@ GNULIB_UTIMENSAT = @GNULIB_UTIMENSAT@ GNULIB_VASPRINTF = @GNULIB_VASPRINTF@ GNULIB_VDPRINTF = @GNULIB_VDPRINTF@ GNULIB_VFPRINTF = @GNULIB_VFPRINTF@ GNULIB_VFPRINTF_POSIX = @GNULIB_VFPRINTF_POSIX@ GNULIB_VPRINTF = @GNULIB_VPRINTF@ GNULIB_VPRINTF_POSIX = @GNULIB_VPRINTF_POSIX@ GNULIB_VSNPRINTF = @GNULIB_VSNPRINTF@ GNULIB_VSPRINTF_POSIX = @GNULIB_VSPRINTF_POSIX@ GNULIB_WCRTOMB = @GNULIB_WCRTOMB@ GNULIB_WCSNRTOMBS = @GNULIB_WCSNRTOMBS@ GNULIB_WCSRTOMBS = @GNULIB_WCSRTOMBS@ GNULIB_WCTOB = @GNULIB_WCTOB@ GNULIB_WCWIDTH = @GNULIB_WCWIDTH@ GNULIB_WRITE = @GNULIB_WRITE@ GREP = @GREP@ GTKDOC_CHECK = @GTKDOC_CHECK@ HAVE_ACCEPT4 = @HAVE_ACCEPT4@ HAVE_ACOSL = @HAVE_ACOSL@ HAVE_ARPA_INET_H = @HAVE_ARPA_INET_H@ HAVE_ASINL = @HAVE_ASINL@ HAVE_ATANL = @HAVE_ATANL@ HAVE_ATOLL = @HAVE_ATOLL@ HAVE_BTOWC = @HAVE_BTOWC@ HAVE_CALLOC_POSIX = @HAVE_CALLOC_POSIX@ HAVE_CANONICALIZE_FILE_NAME = @HAVE_CANONICALIZE_FILE_NAME@ HAVE_CHOWN = @HAVE_CHOWN@ HAVE_COSL = @HAVE_COSL@ HAVE_CXX = @HAVE_CXX@ HAVE_DECL_ACOSL = @HAVE_DECL_ACOSL@ HAVE_DECL_ASINL = @HAVE_DECL_ASINL@ HAVE_DECL_ATANL = @HAVE_DECL_ATANL@ HAVE_DECL_COSL = @HAVE_DECL_COSL@ HAVE_DECL_ENVIRON = @HAVE_DECL_ENVIRON@ HAVE_DECL_EXPL = @HAVE_DECL_EXPL@ HAVE_DECL_FPURGE = @HAVE_DECL_FPURGE@ HAVE_DECL_FREEADDRINFO = @HAVE_DECL_FREEADDRINFO@ HAVE_DECL_FREXPL = @HAVE_DECL_FREXPL@ HAVE_DECL_GAI_STRERROR = @HAVE_DECL_GAI_STRERROR@ HAVE_DECL_GETADDRINFO = @HAVE_DECL_GETADDRINFO@ HAVE_DECL_GETDELIM = @HAVE_DECL_GETDELIM@ HAVE_DECL_GETLINE = @HAVE_DECL_GETLINE@ HAVE_DECL_GETLOADAVG = @HAVE_DECL_GETLOADAVG@ HAVE_DECL_GETLOGIN_R = @HAVE_DECL_GETLOGIN_R@ HAVE_DECL_GETNAMEINFO = @HAVE_DECL_GETNAMEINFO@ HAVE_DECL_INET_NTOP = @HAVE_DECL_INET_NTOP@ HAVE_DECL_INET_PTON = @HAVE_DECL_INET_PTON@ HAVE_DECL_LDEXPL = @HAVE_DECL_LDEXPL@ HAVE_DECL_LOGL = @HAVE_DECL_LOGL@ HAVE_DECL_MEMMEM = @HAVE_DECL_MEMMEM@ HAVE_DECL_MEMRCHR = @HAVE_DECL_MEMRCHR@ HAVE_DECL_OBSTACK_PRINTF = @HAVE_DECL_OBSTACK_PRINTF@ HAVE_DECL_SINL = @HAVE_DECL_SINL@ HAVE_DECL_SNPRINTF = @HAVE_DECL_SNPRINTF@ HAVE_DECL_SQRTL = @HAVE_DECL_SQRTL@ HAVE_DECL_STRDUP = @HAVE_DECL_STRDUP@ HAVE_DECL_STRERROR = @HAVE_DECL_STRERROR@ HAVE_DECL_STRNCASECMP = @HAVE_DECL_STRNCASECMP@ HAVE_DECL_STRNDUP = @HAVE_DECL_STRNDUP@ HAVE_DECL_STRNLEN = @HAVE_DECL_STRNLEN@ HAVE_DECL_STRSIGNAL = @HAVE_DECL_STRSIGNAL@ HAVE_DECL_STRTOK_R = @HAVE_DECL_STRTOK_R@ HAVE_DECL_TANL = @HAVE_DECL_TANL@ HAVE_DECL_TRUNC = @HAVE_DECL_TRUNC@ HAVE_DECL_TRUNCF = @HAVE_DECL_TRUNCF@ HAVE_DECL_VSNPRINTF = @HAVE_DECL_VSNPRINTF@ HAVE_DECL_WCTOB = @HAVE_DECL_WCTOB@ HAVE_DECL_WCWIDTH = @HAVE_DECL_WCWIDTH@ HAVE_DPRINTF = @HAVE_DPRINTF@ HAVE_DUP2 = @HAVE_DUP2@ HAVE_DUP3 = @HAVE_DUP3@ HAVE_EUIDACCESS = @HAVE_EUIDACCESS@ HAVE_EXPL = @HAVE_EXPL@ HAVE_FACCESSAT = @HAVE_FACCESSAT@ HAVE_FCHMODAT = @HAVE_FCHMODAT@ HAVE_FCHOWNAT = @HAVE_FCHOWNAT@ HAVE_FCNTL = @HAVE_FCNTL@ HAVE_FSTATAT = @HAVE_FSTATAT@ HAVE_FSYNC = @HAVE_FSYNC@ HAVE_FTRUNCATE = @HAVE_FTRUNCATE@ HAVE_FUTIMENS = @HAVE_FUTIMENS@ HAVE_GETDOMAINNAME = @HAVE_GETDOMAINNAME@ HAVE_GETDTABLESIZE = @HAVE_GETDTABLESIZE@ HAVE_GETGROUPS = @HAVE_GETGROUPS@ HAVE_GETHOSTNAME = @HAVE_GETHOSTNAME@ HAVE_GETLOGIN = @HAVE_GETLOGIN@ HAVE_GETPAGESIZE = @HAVE_GETPAGESIZE@ HAVE_GETSUBOPT = @HAVE_GETSUBOPT@ HAVE_GETUSERSHELL = @HAVE_GETUSERSHELL@ HAVE_INTTYPES_H = @HAVE_INTTYPES_H@ HAVE_ISNAND = @HAVE_ISNAND@ HAVE_ISNANF = @HAVE_ISNANF@ HAVE_ISNANL = @HAVE_ISNANL@ HAVE_ISWCNTRL = @HAVE_ISWCNTRL@ HAVE_LANGINFO_CODESET = @HAVE_LANGINFO_CODESET@ HAVE_LANGINFO_ERA = @HAVE_LANGINFO_ERA@ HAVE_LANGINFO_H = @HAVE_LANGINFO_H@ HAVE_LCHMOD = @HAVE_LCHMOD@ HAVE_LCHOWN = @HAVE_LCHOWN@ HAVE_LINK = @HAVE_LINK@ HAVE_LINKAT = @HAVE_LINKAT@ HAVE_LOGL = @HAVE_LOGL@ HAVE_LONG_LONG_INT = @HAVE_LONG_LONG_INT@ HAVE_LSTAT = @HAVE_LSTAT@ HAVE_MALLOC_POSIX = @HAVE_MALLOC_POSIX@ HAVE_MBRLEN = @HAVE_MBRLEN@ HAVE_MBRTOWC = @HAVE_MBRTOWC@ HAVE_MBSINIT = @HAVE_MBSINIT@ HAVE_MBSLEN = @HAVE_MBSLEN@ HAVE_MBSNRTOWCS = @HAVE_MBSNRTOWCS@ HAVE_MBSRTOWCS = @HAVE_MBSRTOWCS@ HAVE_MEMPCPY = @HAVE_MEMPCPY@ HAVE_MKDIRAT = @HAVE_MKDIRAT@ HAVE_MKDTEMP = @HAVE_MKDTEMP@ HAVE_MKFIFO = @HAVE_MKFIFO@ HAVE_MKFIFOAT = @HAVE_MKFIFOAT@ HAVE_MKNOD = @HAVE_MKNOD@ HAVE_MKNODAT = @HAVE_MKNODAT@ HAVE_MKOSTEMP = @HAVE_MKOSTEMP@ HAVE_MKOSTEMPS = @HAVE_MKOSTEMPS@ HAVE_MKSTEMPS = @HAVE_MKSTEMPS@ HAVE_NETDB_H = @HAVE_NETDB_H@ HAVE_NETINET_IN_H = @HAVE_NETINET_IN_H@ HAVE_NL_LANGINFO = @HAVE_NL_LANGINFO@ HAVE_OPENAT = @HAVE_OPENAT@ HAVE_OS_H = @HAVE_OS_H@ HAVE_PIPE2 = @HAVE_PIPE2@ HAVE_POSIX_SIGNALBLOCKING = @HAVE_POSIX_SIGNALBLOCKING@ HAVE_PREAD = @HAVE_PREAD@ HAVE_RANDOM_H = @HAVE_RANDOM_H@ HAVE_RANDOM_R = @HAVE_RANDOM_R@ HAVE_RAWMEMCHR = @HAVE_RAWMEMCHR@ HAVE_READLINK = @HAVE_READLINK@ HAVE_READLINKAT = @HAVE_READLINKAT@ HAVE_REALLOC_POSIX = @HAVE_REALLOC_POSIX@ HAVE_REALPATH = @HAVE_REALPATH@ HAVE_RENAMEAT = @HAVE_RENAMEAT@ HAVE_RPMATCH = @HAVE_RPMATCH@ HAVE_SA_FAMILY_T = @HAVE_SA_FAMILY_T@ HAVE_SETENV = @HAVE_SETENV@ HAVE_SIGACTION = @HAVE_SIGACTION@ HAVE_SIGINFO_T = @HAVE_SIGINFO_T@ HAVE_SIGNED_SIG_ATOMIC_T = @HAVE_SIGNED_SIG_ATOMIC_T@ HAVE_SIGNED_WCHAR_T = @HAVE_SIGNED_WCHAR_T@ HAVE_SIGNED_WINT_T = @HAVE_SIGNED_WINT_T@ HAVE_SIGSET_T = @HAVE_SIGSET_T@ HAVE_SINL = @HAVE_SINL@ HAVE_SLEEP = @HAVE_SLEEP@ HAVE_SQRTL = @HAVE_SQRTL@ HAVE_STDINT_H = @HAVE_STDINT_H@ HAVE_STPCPY = @HAVE_STPCPY@ HAVE_STPNCPY = @HAVE_STPNCPY@ HAVE_STRCASECMP = @HAVE_STRCASECMP@ HAVE_STRCASESTR = @HAVE_STRCASESTR@ HAVE_STRCHRNUL = @HAVE_STRCHRNUL@ HAVE_STRPBRK = @HAVE_STRPBRK@ HAVE_STRSEP = @HAVE_STRSEP@ HAVE_STRTOD = @HAVE_STRTOD@ HAVE_STRTOLL = @HAVE_STRTOLL@ HAVE_STRTOULL = @HAVE_STRTOULL@ HAVE_STRUCT_ADDRINFO = @HAVE_STRUCT_ADDRINFO@ HAVE_STRUCT_RANDOM_DATA = @HAVE_STRUCT_RANDOM_DATA@ HAVE_STRUCT_SIGACTION_SA_SIGACTION = @HAVE_STRUCT_SIGACTION_SA_SIGACTION@ HAVE_STRUCT_SOCKADDR_STORAGE = @HAVE_STRUCT_SOCKADDR_STORAGE@ HAVE_STRUCT_TIMEVAL = @HAVE_STRUCT_TIMEVAL@ HAVE_STRUCT_UTSNAME = @HAVE_STRUCT_UTSNAME@ HAVE_STRVERSCMP = @HAVE_STRVERSCMP@ HAVE_SYMLINK = @HAVE_SYMLINK@ HAVE_SYMLINKAT = @HAVE_SYMLINKAT@ HAVE_SYS_BITYPES_H = @HAVE_SYS_BITYPES_H@ HAVE_SYS_INTTYPES_H = @HAVE_SYS_INTTYPES_H@ HAVE_SYS_IOCTL_H = @HAVE_SYS_IOCTL_H@ HAVE_SYS_LOADAVG_H = @HAVE_SYS_LOADAVG_H@ HAVE_SYS_PARAM_H = @HAVE_SYS_PARAM_H@ HAVE_SYS_SELECT_H = @HAVE_SYS_SELECT_H@ HAVE_SYS_SOCKET_H = @HAVE_SYS_SOCKET_H@ HAVE_SYS_TIME_H = @HAVE_SYS_TIME_H@ HAVE_SYS_TYPES_H = @HAVE_SYS_TYPES_H@ HAVE_SYS_UTSNAME_H = @HAVE_SYS_UTSNAME_H@ HAVE_TANL = @HAVE_TANL@ HAVE_TYPE_VOLATILE_SIG_ATOMIC_T = @HAVE_TYPE_VOLATILE_SIG_ATOMIC_T@ HAVE_UNAME = @HAVE_UNAME@ HAVE_UNISTD_H = @HAVE_UNISTD_H@ HAVE_UNLINKAT = @HAVE_UNLINKAT@ HAVE_UNSETENV = @HAVE_UNSETENV@ HAVE_UNSIGNED_LONG_LONG_INT = @HAVE_UNSIGNED_LONG_LONG_INT@ HAVE_USLEEP = @HAVE_USLEEP@ HAVE_UTIMENSAT = @HAVE_UTIMENSAT@ HAVE_VASPRINTF = @HAVE_VASPRINTF@ HAVE_VDPRINTF = @HAVE_VDPRINTF@ HAVE_WCHAR_H = @HAVE_WCHAR_H@ HAVE_WCHAR_T = @HAVE_WCHAR_T@ HAVE_WCRTOMB = @HAVE_WCRTOMB@ HAVE_WCSNRTOMBS = @HAVE_WCSNRTOMBS@ HAVE_WCSRTOMBS = @HAVE_WCSRTOMBS@ HAVE_WCTYPE_H = @HAVE_WCTYPE_H@ HAVE_WINSOCK2_H = @HAVE_WINSOCK2_H@ HAVE_WINT_T = @HAVE_WINT_T@ HAVE_WS2TCPIP_H = @HAVE_WS2TCPIP_H@ HAVE__BOOL = @HAVE__BOOL@ HOSTENT_LIB = @HOSTENT_LIB@ HTML_DIR = @HTML_DIR@ INCLTDL = @INCLTDL@ INCLUDE_NEXT = @INCLUDE_NEXT@ INCLUDE_NEXT_AS_FIRST_DIRECTIVE = @INCLUDE_NEXT_AS_FIRST_DIRECTIVE@ INET_NTOP_LIB = @INET_NTOP_LIB@ INET_PTON_LIB = @INET_PTON_LIB@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LD = @LD@ LDFLAGS = @LDFLAGS@ LEX = @LEX@ LEXLIB = @LEXLIB@ LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@ LIBADD_DL = @LIBADD_DL@ LIBADD_DLD_LINK = @LIBADD_DLD_LINK@ LIBADD_DLOPEN = @LIBADD_DLOPEN@ LIBADD_SHL_LOAD = @LIBADD_SHL_LOAD@ LIBDIR = @LIBDIR@ LIBGCRYPT_CFLAGS = @LIBGCRYPT_CFLAGS@ LIBGCRYPT_CONFIG = @LIBGCRYPT_CONFIG@ LIBGCRYPT_LIBS = @LIBGCRYPT_LIBS@ LIBGNUTLS_CFLAGS = @LIBGNUTLS_CFLAGS@ LIBGNUTLS_CONFIG = @LIBGNUTLS_CONFIG@ LIBGNUTLS_EXTRA_CFLAGS = @LIBGNUTLS_EXTRA_CFLAGS@ LIBGNUTLS_EXTRA_CONFIG = @LIBGNUTLS_EXTRA_CONFIG@ LIBGNUTLS_EXTRA_LIBS = @LIBGNUTLS_EXTRA_LIBS@ LIBGNUTLS_LIBS = @LIBGNUTLS_LIBS@ LIBINTL = @LIBINTL@ LIBLTDL = @LIBLTDL@ LIBMULTITHREAD = @LIBMULTITHREAD@ LIBOBJS = @LIBOBJS@ LIBPRELUDECPP_SONAME = @LIBPRELUDECPP_SONAME@ LIBPRELUDE_CFLAGS = @LIBPRELUDE_CFLAGS@ LIBPRELUDE_LIBS = @LIBPRELUDE_LIBS@ LIBPRELUDE_SONAME = @LIBPRELUDE_SONAME@ LIBPTH = @LIBPTH@ LIBPTH_PREFIX = @LIBPTH_PREFIX@ LIBS = @LIBS@ LIBSOCKET = @LIBSOCKET@ LIBTESTS_LIBDEPS = @LIBTESTS_LIBDEPS@ LIBTHREAD = @LIBTHREAD@ LIBTOOL = @LIBTOOL@ LIPO = @LIPO@ LN_S = @LN_S@ LOCALCHARSET_TESTS_ENVIRONMENT = @LOCALCHARSET_TESTS_ENVIRONMENT@ LOCALE_FR = @LOCALE_FR@ LOCALE_FR_UTF8 = @LOCALE_FR_UTF8@ LOCALE_JA = @LOCALE_JA@ LOCALE_TR_UTF8 = @LOCALE_TR_UTF8@ LOCALE_ZH_CN = @LOCALE_ZH_CN@ LOCALSTATEDIR = @LOCALSTATEDIR@ LTALLOCA = @LTALLOCA@ LTDLDEPS = @LTDLDEPS@ LTDLINCL = @LTDLINCL@ LTDLOPEN = @LTDLOPEN@ LTLIBINTL = @LTLIBINTL@ LTLIBMULTITHREAD = @LTLIBMULTITHREAD@ LTLIBOBJS = @LTLIBOBJS@ LTLIBPTH = @LTLIBPTH@ LTLIBTHREAD = @LTLIBTHREAD@ LT_CONFIG_H = @LT_CONFIG_H@ LT_DLLOADERS = @LT_DLLOADERS@ LT_DLPREOPEN = @LT_DLPREOPEN@ LUA_CFLAGS = @LUA_CFLAGS@ LUA_CONFIG = @LUA_CONFIG@ LUA_LIBS = @LUA_LIBS@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MKDIR_P = @MKDIR_P@ NETDB_H = @NETDB_H@ NETINET_IN_H = @NETINET_IN_H@ NEXT_ARPA_INET_H = @NEXT_ARPA_INET_H@ NEXT_AS_FIRST_DIRECTIVE_ARPA_INET_H = @NEXT_AS_FIRST_DIRECTIVE_ARPA_INET_H@ NEXT_AS_FIRST_DIRECTIVE_ERRNO_H = @NEXT_AS_FIRST_DIRECTIVE_ERRNO_H@ NEXT_AS_FIRST_DIRECTIVE_FCNTL_H = @NEXT_AS_FIRST_DIRECTIVE_FCNTL_H@ NEXT_AS_FIRST_DIRECTIVE_FLOAT_H = @NEXT_AS_FIRST_DIRECTIVE_FLOAT_H@ NEXT_AS_FIRST_DIRECTIVE_LANGINFO_H = @NEXT_AS_FIRST_DIRECTIVE_LANGINFO_H@ NEXT_AS_FIRST_DIRECTIVE_MATH_H = @NEXT_AS_FIRST_DIRECTIVE_MATH_H@ NEXT_AS_FIRST_DIRECTIVE_NETDB_H = @NEXT_AS_FIRST_DIRECTIVE_NETDB_H@ NEXT_AS_FIRST_DIRECTIVE_NETINET_IN_H = @NEXT_AS_FIRST_DIRECTIVE_NETINET_IN_H@ NEXT_AS_FIRST_DIRECTIVE_SIGNAL_H = @NEXT_AS_FIRST_DIRECTIVE_SIGNAL_H@ NEXT_AS_FIRST_DIRECTIVE_STDDEF_H = @NEXT_AS_FIRST_DIRECTIVE_STDDEF_H@ NEXT_AS_FIRST_DIRECTIVE_STDINT_H = @NEXT_AS_FIRST_DIRECTIVE_STDINT_H@ NEXT_AS_FIRST_DIRECTIVE_STDIO_H = @NEXT_AS_FIRST_DIRECTIVE_STDIO_H@ NEXT_AS_FIRST_DIRECTIVE_STDLIB_H = @NEXT_AS_FIRST_DIRECTIVE_STDLIB_H@ NEXT_AS_FIRST_DIRECTIVE_STRINGS_H = @NEXT_AS_FIRST_DIRECTIVE_STRINGS_H@ NEXT_AS_FIRST_DIRECTIVE_STRING_H = @NEXT_AS_FIRST_DIRECTIVE_STRING_H@ NEXT_AS_FIRST_DIRECTIVE_SYS_IOCTL_H = @NEXT_AS_FIRST_DIRECTIVE_SYS_IOCTL_H@ NEXT_AS_FIRST_DIRECTIVE_SYS_SELECT_H = @NEXT_AS_FIRST_DIRECTIVE_SYS_SELECT_H@ NEXT_AS_FIRST_DIRECTIVE_SYS_SOCKET_H = @NEXT_AS_FIRST_DIRECTIVE_SYS_SOCKET_H@ NEXT_AS_FIRST_DIRECTIVE_SYS_STAT_H = @NEXT_AS_FIRST_DIRECTIVE_SYS_STAT_H@ NEXT_AS_FIRST_DIRECTIVE_SYS_TIME_H = @NEXT_AS_FIRST_DIRECTIVE_SYS_TIME_H@ NEXT_AS_FIRST_DIRECTIVE_SYS_UTSNAME_H = @NEXT_AS_FIRST_DIRECTIVE_SYS_UTSNAME_H@ NEXT_AS_FIRST_DIRECTIVE_TIME_H = @NEXT_AS_FIRST_DIRECTIVE_TIME_H@ NEXT_AS_FIRST_DIRECTIVE_UNISTD_H = @NEXT_AS_FIRST_DIRECTIVE_UNISTD_H@ NEXT_AS_FIRST_DIRECTIVE_WCHAR_H = @NEXT_AS_FIRST_DIRECTIVE_WCHAR_H@ NEXT_AS_FIRST_DIRECTIVE_WCTYPE_H = @NEXT_AS_FIRST_DIRECTIVE_WCTYPE_H@ NEXT_ERRNO_H = @NEXT_ERRNO_H@ NEXT_FCNTL_H = @NEXT_FCNTL_H@ NEXT_FLOAT_H = @NEXT_FLOAT_H@ NEXT_LANGINFO_H = @NEXT_LANGINFO_H@ NEXT_MATH_H = @NEXT_MATH_H@ NEXT_NETDB_H = @NEXT_NETDB_H@ NEXT_NETINET_IN_H = @NEXT_NETINET_IN_H@ NEXT_SIGNAL_H = @NEXT_SIGNAL_H@ NEXT_STDDEF_H = @NEXT_STDDEF_H@ NEXT_STDINT_H = @NEXT_STDINT_H@ NEXT_STDIO_H = @NEXT_STDIO_H@ NEXT_STDLIB_H = @NEXT_STDLIB_H@ NEXT_STRINGS_H = @NEXT_STRINGS_H@ NEXT_STRING_H = @NEXT_STRING_H@ NEXT_SYS_IOCTL_H = @NEXT_SYS_IOCTL_H@ NEXT_SYS_SELECT_H = @NEXT_SYS_SELECT_H@ NEXT_SYS_SOCKET_H = @NEXT_SYS_SOCKET_H@ NEXT_SYS_STAT_H = @NEXT_SYS_STAT_H@ NEXT_SYS_TIME_H = @NEXT_SYS_TIME_H@ NEXT_SYS_UTSNAME_H = @NEXT_SYS_UTSNAME_H@ NEXT_TIME_H = @NEXT_TIME_H@ NEXT_UNISTD_H = @NEXT_UNISTD_H@ NEXT_WCHAR_H = @NEXT_WCHAR_H@ NEXT_WCTYPE_H = @NEXT_WCTYPE_H@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PCFLAGS = @PCFLAGS@ PERL = @PERL@ PERL_EXTRA_PARAMS = @PERL_EXTRA_PARAMS@ PKG_CONFIG = @PKG_CONFIG@ POLL_H = @POLL_H@ PRAGMA_SYSTEM_HEADER = @PRAGMA_SYSTEM_HEADER@ PRELUDE_ADMIN_CFLAGS = @PRELUDE_ADMIN_CFLAGS@ PRELUDE_ADMIN_LIBS = @PRELUDE_ADMIN_LIBS@ PRELUDE_CONFIG_DIR = @PRELUDE_CONFIG_DIR@ PRELUDE_SPOOL_DIR = @PRELUDE_SPOOL_DIR@ PTHREAD_CFLAGS = @PTHREAD_CFLAGS@ PTHREAD_LDFLAGS = @PTHREAD_LDFLAGS@ PTHREAD_LIBS = @PTHREAD_LIBS@ PTRDIFF_T_SUFFIX = @PTRDIFF_T_SUFFIX@ PYTHON = @PYTHON@ RANLIB = @RANLIB@ RELOCATABLE = @RELOCATABLE@ REPLACE_BTOWC = @REPLACE_BTOWC@ REPLACE_CANONICALIZE_FILE_NAME = @REPLACE_CANONICALIZE_FILE_NAME@ REPLACE_CEILF = @REPLACE_CEILF@ REPLACE_CEILL = @REPLACE_CEILL@ REPLACE_CHOWN = @REPLACE_CHOWN@ REPLACE_CLOSE = @REPLACE_CLOSE@ REPLACE_DPRINTF = @REPLACE_DPRINTF@ REPLACE_DUP = @REPLACE_DUP@ REPLACE_DUP2 = @REPLACE_DUP2@ REPLACE_FCHDIR = @REPLACE_FCHDIR@ REPLACE_FCHOWNAT = @REPLACE_FCHOWNAT@ REPLACE_FCLOSE = @REPLACE_FCLOSE@ REPLACE_FCNTL = @REPLACE_FCNTL@ REPLACE_FFLUSH = @REPLACE_FFLUSH@ REPLACE_FLOORF = @REPLACE_FLOORF@ REPLACE_FLOORL = @REPLACE_FLOORL@ REPLACE_FOPEN = @REPLACE_FOPEN@ REPLACE_FPRINTF = @REPLACE_FPRINTF@ REPLACE_FPURGE = @REPLACE_FPURGE@ REPLACE_FREOPEN = @REPLACE_FREOPEN@ REPLACE_FREXP = @REPLACE_FREXP@ REPLACE_FREXPL = @REPLACE_FREXPL@ REPLACE_FSEEK = @REPLACE_FSEEK@ REPLACE_FSEEKO = @REPLACE_FSEEKO@ REPLACE_FSTAT = @REPLACE_FSTAT@ REPLACE_FSTATAT = @REPLACE_FSTATAT@ REPLACE_FTELL = @REPLACE_FTELL@ REPLACE_FTELLO = @REPLACE_FTELLO@ REPLACE_FUTIMENS = @REPLACE_FUTIMENS@ REPLACE_GETCWD = @REPLACE_GETCWD@ REPLACE_GETDELIM = @REPLACE_GETDELIM@ REPLACE_GETGROUPS = @REPLACE_GETGROUPS@ REPLACE_GETLINE = @REPLACE_GETLINE@ REPLACE_GETPAGESIZE = @REPLACE_GETPAGESIZE@ REPLACE_GETTIMEOFDAY = @REPLACE_GETTIMEOFDAY@ REPLACE_HUGE_VAL = @REPLACE_HUGE_VAL@ REPLACE_ISFINITE = @REPLACE_ISFINITE@ REPLACE_ISINF = @REPLACE_ISINF@ REPLACE_ISNAN = @REPLACE_ISNAN@ REPLACE_ISWCNTRL = @REPLACE_ISWCNTRL@ REPLACE_LCHOWN = @REPLACE_LCHOWN@ REPLACE_LDEXPL = @REPLACE_LDEXPL@ REPLACE_LINK = @REPLACE_LINK@ REPLACE_LINKAT = @REPLACE_LINKAT@ REPLACE_LOCALTIME_R = @REPLACE_LOCALTIME_R@ REPLACE_LSEEK = @REPLACE_LSEEK@ REPLACE_LSTAT = @REPLACE_LSTAT@ REPLACE_MBRLEN = @REPLACE_MBRLEN@ REPLACE_MBRTOWC = @REPLACE_MBRTOWC@ REPLACE_MBSINIT = @REPLACE_MBSINIT@ REPLACE_MBSNRTOWCS = @REPLACE_MBSNRTOWCS@ REPLACE_MBSRTOWCS = @REPLACE_MBSRTOWCS@ REPLACE_MBSTATE_T = @REPLACE_MBSTATE_T@ REPLACE_MEMCHR = @REPLACE_MEMCHR@ REPLACE_MEMMEM = @REPLACE_MEMMEM@ REPLACE_MKDIR = @REPLACE_MKDIR@ REPLACE_MKFIFO = @REPLACE_MKFIFO@ REPLACE_MKNOD = @REPLACE_MKNOD@ REPLACE_MKSTEMP = @REPLACE_MKSTEMP@ REPLACE_MKTIME = @REPLACE_MKTIME@ REPLACE_NAN = @REPLACE_NAN@ REPLACE_NANOSLEEP = @REPLACE_NANOSLEEP@ REPLACE_NL_LANGINFO = @REPLACE_NL_LANGINFO@ REPLACE_NULL = @REPLACE_NULL@ REPLACE_OBSTACK_PRINTF = @REPLACE_OBSTACK_PRINTF@ REPLACE_OPEN = @REPLACE_OPEN@ REPLACE_OPENAT = @REPLACE_OPENAT@ REPLACE_PERROR = @REPLACE_PERROR@ REPLACE_POPEN = @REPLACE_POPEN@ REPLACE_PREAD = @REPLACE_PREAD@ REPLACE_PRINTF = @REPLACE_PRINTF@ REPLACE_PUTENV = @REPLACE_PUTENV@ REPLACE_READLINK = @REPLACE_READLINK@ REPLACE_REALPATH = @REPLACE_REALPATH@ REPLACE_REMOVE = @REPLACE_REMOVE@ REPLACE_RENAME = @REPLACE_RENAME@ REPLACE_RENAMEAT = @REPLACE_RENAMEAT@ REPLACE_RMDIR = @REPLACE_RMDIR@ REPLACE_ROUND = @REPLACE_ROUND@ REPLACE_ROUNDF = @REPLACE_ROUNDF@ REPLACE_ROUNDL = @REPLACE_ROUNDL@ REPLACE_SELECT = @REPLACE_SELECT@ REPLACE_SETENV = @REPLACE_SETENV@ REPLACE_SIGNBIT = @REPLACE_SIGNBIT@ REPLACE_SIGNBIT_USING_GCC = @REPLACE_SIGNBIT_USING_GCC@ REPLACE_SLEEP = @REPLACE_SLEEP@ REPLACE_SNPRINTF = @REPLACE_SNPRINTF@ REPLACE_SPRINTF = @REPLACE_SPRINTF@ REPLACE_STAT = @REPLACE_STAT@ REPLACE_STDIO_WRITE_FUNCS = @REPLACE_STDIO_WRITE_FUNCS@ REPLACE_STRCASESTR = @REPLACE_STRCASESTR@ REPLACE_STRDUP = @REPLACE_STRDUP@ REPLACE_STRERROR = @REPLACE_STRERROR@ REPLACE_STRNDUP = @REPLACE_STRNDUP@ REPLACE_STRPTIME = @REPLACE_STRPTIME@ REPLACE_STRSIGNAL = @REPLACE_STRSIGNAL@ REPLACE_STRSTR = @REPLACE_STRSTR@ REPLACE_STRTOD = @REPLACE_STRTOD@ REPLACE_STRTOK_R = @REPLACE_STRTOK_R@ REPLACE_SYMLINK = @REPLACE_SYMLINK@ REPLACE_TIMEGM = @REPLACE_TIMEGM@ REPLACE_TRUNCL = @REPLACE_TRUNCL@ REPLACE_UNLINK = @REPLACE_UNLINK@ REPLACE_UNLINKAT = @REPLACE_UNLINKAT@ REPLACE_UNSETENV = @REPLACE_UNSETENV@ REPLACE_USLEEP = @REPLACE_USLEEP@ REPLACE_UTIMENSAT = @REPLACE_UTIMENSAT@ REPLACE_VASPRINTF = @REPLACE_VASPRINTF@ REPLACE_VDPRINTF = @REPLACE_VDPRINTF@ REPLACE_VFPRINTF = @REPLACE_VFPRINTF@ REPLACE_VPRINTF = @REPLACE_VPRINTF@ REPLACE_VSNPRINTF = @REPLACE_VSNPRINTF@ REPLACE_VSPRINTF = @REPLACE_VSPRINTF@ REPLACE_WCRTOMB = @REPLACE_WCRTOMB@ REPLACE_WCSNRTOMBS = @REPLACE_WCSNRTOMBS@ REPLACE_WCSRTOMBS = @REPLACE_WCSRTOMBS@ REPLACE_WCTOB = @REPLACE_WCTOB@ REPLACE_WCWIDTH = @REPLACE_WCWIDTH@ REPLACE_WRITE = @REPLACE_WRITE@ RUBY = @RUBY@ RUBY_CCFLAGS = @RUBY_CCFLAGS@ RUBY_EXEC_PREFIX = @RUBY_EXEC_PREFIX@ RUBY_INCLUDES = @RUBY_INCLUDES@ RUBY_LIBS = @RUBY_LIBS@ RUBY_PLATFORM = @RUBY_PLATFORM@ RUBY_PREFIX = @RUBY_PREFIX@ RUBY_VERSION = @RUBY_VERSION@ SED = @SED@ SERVENT_LIB = @SERVENT_LIB@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ SIG_ATOMIC_T_SUFFIX = @SIG_ATOMIC_T_SUFFIX@ SIZE_T_SUFFIX = @SIZE_T_SUFFIX@ STDBOOL_H = @STDBOOL_H@ STDDEF_H = @STDDEF_H@ STDINT_H = @STDINT_H@ STRIP = @STRIP@ SWIG = @SWIG@ SYSCONFDIR = @SYSCONFDIR@ SYS_IOCTL_H_HAVE_WINSOCK2_H = @SYS_IOCTL_H_HAVE_WINSOCK2_H@ SYS_IOCTL_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS = @SYS_IOCTL_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS@ SYS_SOCKET_H = @SYS_SOCKET_H@ SYS_TIME_H_DEFINES_STRUCT_TIMESPEC = @SYS_TIME_H_DEFINES_STRUCT_TIMESPEC@ TIME_H_DEFINES_STRUCT_TIMESPEC = @TIME_H_DEFINES_STRUCT_TIMESPEC@ UNDEFINE_STRTOK_R = @UNDEFINE_STRTOK_R@ UNISTD_H_HAVE_WINSOCK2_H = @UNISTD_H_HAVE_WINSOCK2_H@ UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS = @UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS@ VALGRIND = @VALGRIND@ VERSION = @VERSION@ WCHAR_T_SUFFIX = @WCHAR_T_SUFFIX@ WCTYPE_H = @WCTYPE_H@ WINT_T_SUFFIX = @WINT_T_SUFFIX@ YACC = @YACC@ YFLAGS = @YFLAGS@ YIELD_LIB = @YIELD_LIB@ __PRELUDE_64BIT_FORMAT_PREFIX = @__PRELUDE_64BIT_FORMAT_PREFIX@ __PRELUDE_HAVE_64BIT_LONG = @__PRELUDE_HAVE_64BIT_LONG@ __PRELUDE_HAVE_INTTYPES_H = @__PRELUDE_HAVE_INTTYPES_H@ __PRELUDE_HAVE_STDINT_H = @__PRELUDE_HAVE_STDINT_H@ __PRELUDE_STDINT_HAVE_UINT16 = @__PRELUDE_STDINT_HAVE_UINT16@ __PRELUDE_STDINT_HAVE_UINT32 = @__PRELUDE_STDINT_HAVE_UINT32@ __PRELUDE_STDINT_HAVE_UINT64 = @__PRELUDE_STDINT_HAVE_UINT64@ __PRELUDE_STDINT_HAVE_UINT8 = @__PRELUDE_STDINT_HAVE_UINT8@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ gl_LIBOBJS = @gl_LIBOBJS@ gl_LTLIBOBJS = @gl_LTLIBOBJS@ gltests_LIBOBJS = @gltests_LIBOBJS@ gltests_LTLIBOBJS = @gltests_LTLIBOBJS@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ lt_ECHO = @lt_ECHO@ ltdl_LIBOBJS = @ltdl_LIBOBJS@ ltdl_LTLIBOBJS = @ltdl_LTLIBOBJS@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ pkgrbexecdir = @pkgrbexecdir@ pkgrubydir = @pkgrubydir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ rbexecdir = @rbexecdir@ rubydir = @rubydir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sys_symbol_underscore = @sys_symbol_underscore@ sysconfdir = @sysconfdir@ target = @target@ target_alias = @target_alias@ target_cpu = @target_cpu@ target_os = @target_os@ target_vendor = @target_vendor@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ AUTOMAKE_OPTIONS = 1.5 gnits subdir-objects SUBDIRS = tests noinst_HEADERS = noinst_LIBRARIES = noinst_LTLIBRARIES = libmissing.la EXTRA_DIST = m4/gnulib-cache.m4 accept.c w32sock.h alignof.h alloca.c \ alloca.in.h $(top_srcdir)/./arg-nonnull.h arpa_inet.in.h \ bind.c w32sock.h btowc.c close.c close-hook.h connect.c \ w32sock.h dup2.c errno.in.h fclose.c float.in.h fopen.c \ fpucw.h frexp.c frexp.c frexpl.c fseeko.c stdio-impl.h ftw.c \ gai_strerror.c getaddrinfo.c getdelim.c gethostname.c \ w32sock.h getline.c getpass.c getpass.h getsockname.c \ w32sock.h gettimeofday.c $(top_srcdir)/./config.rpath \ inet_ntop.c inet_pton.c intprops.h ioctl.c w32sock.h float+.h \ isnan.c isnand-nolibm.h isnand.c float+.h isnan.c \ isnanf-nolibm.h isnanf.c float+.h isnan.c isnanl-nolibm.h \ isnanl.c langinfo.in.h listen.c w32sock.h config.charset \ ref-add.sin ref-del.sin lseek.c malloc.c malloc.c math.in.h \ mbrtowc.c mbsinit.c memchr.c memchr.valgrind memmem.c \ str-two-way.h mktime-internal.h mktime.c netdb.in.h \ netinet_in.in.h nl_langinfo.c pathmax.h perror.c poll.c \ poll.in.h printf-frexp.h printf-frexp.c printf-frexpl.h \ realloc.c regcomp.c regex.c regex.h regex_internal.c \ regex_internal.h regexec.c relocatable.c relocatable.h \ select.c setsockopt.c w32sock.h signal.in.h float+.h \ signbitd.c signbitf.c signbitl.c sigprocmask.c sleep.c \ snprintf.c socket.c w32sock.h w32sock.h stat.c stdbool.in.h \ stddef.in.h stdint.in.h stdio-write.c stdio.in.h stdlib.in.h \ strcasecmp.c strncasecmp.c str-two-way.h strcasestr.c strdup.c \ strdup.c streq.h strerror.c string.in.h strings.in.h strndup.c \ strnlen.c strptime.c strsep.c sys_ioctl.in.h sys_select.in.h \ sys_socket.in.h sys_stat.in.h sys_time.in.h sys_utsname.in.h \ $(top_srcdir)/./config.rpath time.in.h time_r.c \ mktime-internal.h timegm.c uname.c unistd.in.h asnprintf.c \ float+.h printf-args.c printf-args.h printf-parse.c \ printf-parse.h vasnprintf.c vasnprintf.h vsnprintf.c \ $(top_srcdir)/./warn-on-use.h wchar.in.h wcrtomb.c wctype.in.h \ write.c # The BUILT_SOURCES created by this Makefile snippet are not used via #include # statements but through direct file reference. Therefore this snippet must be # present in all Makefile.am that need it. This is ensured by the applicability # 'all' defined above. BUILT_SOURCES = $(ALLOCA_H) arg-nonnull.h arpa/inet.h configmake.h \ $(ERRNO_H) $(FLOAT_H) langinfo.h math.h $(NETDB_H) \ $(NETINET_IN_H) $(POLL_H) signal.h $(STDBOOL_H) $(STDDEF_H) \ $(STDINT_H) stdio.h stdlib.h string.h strings.h sys/ioctl.h \ sys/select.h sys/socket.h sys/stat.h sys/time.h sys/utsname.h \ time.h unistd.h warn-on-use.h wchar.h $(WCTYPE_H) SUFFIXES = .sed .sin MOSTLYCLEANFILES = core *.stackdump alloca.h alloca.h-t arg-nonnull.h \ arg-nonnull.h-t arpa/inet.h arpa/inet.h-t errno.h errno.h-t \ float.h float.h-t langinfo.h langinfo.h-t math.h math.h-t \ netdb.h netdb.h-t netinet/in.h netinet/in.h-t poll.h poll.h-t \ signal.h signal.h-t stdbool.h stdbool.h-t stddef.h stddef.h-t \ stdint.h stdint.h-t stdio.h stdio.h-t stdlib.h stdlib.h-t \ string.h string.h-t strings.h strings.h-t sys/ioctl.h \ sys/ioctl.h-t sys/select.h sys/select.h-t sys/socket.h \ sys/socket.h-t sys/stat.h sys/stat.h-t sys/time.h sys/time.h-t \ sys/utsname.h sys/utsname.h-t time.h time.h-t unistd.h \ unistd.h-t warn-on-use.h warn-on-use.h-t wchar.h wchar.h-t \ wctype.h wctype.h-t MOSTLYCLEANDIRS = arpa netinet sys sys sys sys sys CLEANFILES = configmake.h configmake.h-t charset.alias ref-add.sed \ ref-del.sed DISTCLEANFILES = MAINTAINERCLEANFILES = AM_CPPFLAGS = AM_CFLAGS = libmissing_la_SOURCES = c-ctype.h c-ctype.c close-hook.c \ glthread/cond.h glthread/cond.c ftw_.h gettext.h \ localcharset.h localcharset.c glthread/lock.h glthread/lock.c \ minmax.h printf-frexp.c printf-frexpl.c size_max.h sockets.h \ sockets.c glthread/thread.h glthread/thread.c \ glthread/threadlib.c glthread/tls.h glthread/tls.c verify.h \ xsize.h libmissing_la_LIBADD = $(gl_LTLIBOBJS) @LTALLOCA@ libmissing_la_DEPENDENCIES = $(gl_LTLIBOBJS) @LTALLOCA@ EXTRA_libmissing_la_SOURCES = accept.c alloca.c bind.c btowc.c close.c \ connect.c dup2.c fclose.c fopen.c frexp.c frexp.c frexpl.c \ fseeko.c ftw.c gai_strerror.c getaddrinfo.c getdelim.c \ gethostname.c getline.c getpass.c getsockname.c gettimeofday.c \ inet_ntop.c inet_pton.c ioctl.c isnan.c isnand.c isnan.c \ isnanf.c isnan.c isnanl.c listen.c lseek.c malloc.c malloc.c \ mbrtowc.c mbsinit.c memchr.c memmem.c mktime.c nl_langinfo.c \ perror.c poll.c printf-frexp.c realloc.c regcomp.c regex.c \ regex_internal.c regexec.c relocatable.c select.c setsockopt.c \ signbitd.c signbitf.c signbitl.c sigprocmask.c sleep.c \ snprintf.c socket.c stat.c stdio-write.c strcasecmp.c \ strncasecmp.c strcasestr.c strdup.c strdup.c strerror.c \ strndup.c strnlen.c strptime.c strsep.c time_r.c timegm.c \ uname.c asnprintf.c printf-args.c printf-parse.c vasnprintf.c \ vsnprintf.c wcrtomb.c write.c libmissing_la_LDFLAGS = $(AM_LDFLAGS) ARG_NONNULL_H = arg-nonnull.h charset_alias = $(DESTDIR)$(libdir)/charset.alias charset_tmp = $(DESTDIR)$(libdir)/charset.tmp WARN_ON_USE_H = warn-on-use.h all: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) all-recursive .SUFFIXES: .SUFFIXES: .sed .sin .c .lo .o .obj $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnits libmissing/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnits libmissing/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): clean-noinstLIBRARIES: -test -z "$(noinst_LIBRARIES)" || rm -f $(noinst_LIBRARIES) clean-noinstLTLIBRARIES: -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) @list='$(noinst_LTLIBRARIES)'; for p in $$list; do \ dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ test "$$dir" != "$$p" || dir=.; \ echo "rm -f \"$${dir}/so_locations\""; \ rm -f "$${dir}/so_locations"; \ done glthread/$(am__dirstamp): @$(MKDIR_P) glthread @: > glthread/$(am__dirstamp) glthread/$(DEPDIR)/$(am__dirstamp): @$(MKDIR_P) glthread/$(DEPDIR) @: > glthread/$(DEPDIR)/$(am__dirstamp) glthread/cond.lo: glthread/$(am__dirstamp) \ glthread/$(DEPDIR)/$(am__dirstamp) glthread/lock.lo: glthread/$(am__dirstamp) \ glthread/$(DEPDIR)/$(am__dirstamp) glthread/thread.lo: glthread/$(am__dirstamp) \ glthread/$(DEPDIR)/$(am__dirstamp) glthread/threadlib.lo: glthread/$(am__dirstamp) \ glthread/$(DEPDIR)/$(am__dirstamp) glthread/tls.lo: glthread/$(am__dirstamp) \ glthread/$(DEPDIR)/$(am__dirstamp) libmissing.la: $(libmissing_la_OBJECTS) $(libmissing_la_DEPENDENCIES) $(libmissing_la_LINK) $(libmissing_la_OBJECTS) $(libmissing_la_LIBADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) -rm -f glthread/cond.$(OBJEXT) -rm -f glthread/cond.lo -rm -f glthread/lock.$(OBJEXT) -rm -f glthread/lock.lo -rm -f glthread/thread.$(OBJEXT) -rm -f glthread/thread.lo -rm -f glthread/threadlib.$(OBJEXT) -rm -f glthread/threadlib.lo -rm -f glthread/tls.$(OBJEXT) -rm -f glthread/tls.lo distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/alloca.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/accept.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/alloca.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/asnprintf.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/bind.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/btowc.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/c-ctype.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/close-hook.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/close.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/connect.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dup2.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fclose.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fopen.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/frexp.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/frexpl.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fseeko.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ftw.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gai_strerror.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/getaddrinfo.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/getdelim.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gethostname.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/getline.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/getpass.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/getsockname.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gettimeofday.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/inet_ntop.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/inet_pton.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ioctl.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/isnan.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/isnand.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/isnanf.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/isnanl.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/listen.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/localcharset.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lseek.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/malloc.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mbrtowc.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mbsinit.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/memchr.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/memmem.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mktime.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/nl_langinfo.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/perror.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/poll.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/printf-args.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/printf-frexp.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/printf-frexpl.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/printf-parse.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/realloc.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/regcomp.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/regex.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/regex_internal.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/regexec.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/relocatable.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/select.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/setsockopt.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/signbitd.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/signbitf.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/signbitl.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sigprocmask.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sleep.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/snprintf.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/socket.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sockets.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/stat.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/stdio-write.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/strcasecmp.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/strcasestr.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/strdup.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/strerror.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/strncasecmp.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/strndup.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/strnlen.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/strptime.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/strsep.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/time_r.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/timegm.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/uname.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/vasnprintf.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/vsnprintf.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/wcrtomb.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/write.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@glthread/$(DEPDIR)/cond.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@glthread/$(DEPDIR)/lock.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@glthread/$(DEPDIR)/thread.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@glthread/$(DEPDIR)/threadlib.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@glthread/$(DEPDIR)/tls.Plo@am__quote@ .c.o: @am__fastdepCC_TRUE@ depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.o$$||'`;\ @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\ @am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(COMPILE) -c -o $@ $< .c.obj: @am__fastdepCC_TRUE@ depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.obj$$||'`;\ @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ `$(CYGPATH_W) '$<'` &&\ @am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` .c.lo: @am__fastdepCC_TRUE@ depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.lo$$||'`;\ @am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\ @am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs -rm -rf glthread/.libs glthread/_libs # This directory's subdirectories are mostly independent; you can cd # into them and run `make' without going through this Makefile. # To change the values of `make' variables: instead of editing Makefiles, # (1) if the variable is set in `config.status', edit `config.status' # (which will cause the Makefiles to be regenerated when you run `make'); # (2) otherwise, pass the desired values on the `make' command line. $(RECURSIVE_TARGETS): @fail= failcom='exit 1'; \ for f in x $$MAKEFLAGS; do \ case $$f in \ *=* | --[!k]*);; \ *k*) failcom='fail=yes';; \ esac; \ done; \ dot_seen=no; \ target=`echo $@ | sed s/-recursive//`; \ list='$(SUBDIRS)'; for subdir in $$list; do \ echo "Making $$target in $$subdir"; \ if test "$$subdir" = "."; then \ dot_seen=yes; \ local_target="$$target-am"; \ else \ local_target="$$target"; \ fi; \ ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ || eval $$failcom; \ done; \ if test "$$dot_seen" = "no"; then \ $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ fi; test -z "$$fail" $(RECURSIVE_CLEAN_TARGETS): @fail= failcom='exit 1'; \ for f in x $$MAKEFLAGS; do \ case $$f in \ *=* | --[!k]*);; \ *k*) failcom='fail=yes';; \ esac; \ done; \ dot_seen=no; \ case "$@" in \ distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ *) list='$(SUBDIRS)' ;; \ esac; \ rev=''; for subdir in $$list; do \ if test "$$subdir" = "."; then :; else \ rev="$$subdir $$rev"; \ fi; \ done; \ rev="$$rev ."; \ target=`echo $@ | sed s/-recursive//`; \ for subdir in $$rev; do \ echo "Making $$target in $$subdir"; \ if test "$$subdir" = "."; then \ local_target="$$target-am"; \ else \ local_target="$$target"; \ fi; \ ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ || eval $$failcom; \ done && test -z "$$fail" tags-recursive: list='$(SUBDIRS)'; for subdir in $$list; do \ test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \ done ctags-recursive: list='$(SUBDIRS)'; for subdir in $$list; do \ test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \ done ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ mkid -fID $$unique tags: TAGS TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) set x; \ here=`pwd`; \ if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ include_option=--etags-include; \ empty_fix=.; \ else \ include_option=--include; \ empty_fix=; \ fi; \ list='$(SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ test ! -f $$subdir/TAGS || \ set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \ fi; \ done; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: CTAGS CTAGS: ctags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ test -d "$(distdir)/$$subdir" \ || $(MKDIR_P) "$(distdir)/$$subdir" \ || exit 1; \ fi; \ done @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ dir1=$$subdir; dir2="$(distdir)/$$subdir"; \ $(am__relativize); \ new_distdir=$$reldir; \ dir1=$$subdir; dir2="$(top_distdir)"; \ $(am__relativize); \ new_top_distdir=$$reldir; \ echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \ echo " am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \ ($(am__cd) $$subdir && \ $(MAKE) $(AM_MAKEFLAGS) \ top_distdir="$$new_top_distdir" \ distdir="$$new_distdir" \ am__remove_distdir=: \ am__skip_length_check=: \ am__skip_mode_fix=: \ distdir) \ || exit 1; \ fi; \ done check-am: all-am check: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) check-recursive all-am: Makefile $(LIBRARIES) $(LTLIBRARIES) $(HEADERS) all-local installdirs: installdirs-recursive installdirs-am: install: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) install-recursive install-exec: install-exec-recursive install-data: install-data-recursive uninstall: uninstall-recursive install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-recursive install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: -test -z "$(MOSTLYCLEANFILES)" || rm -f $(MOSTLYCLEANFILES) clean-generic: -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES) distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) -rm -f glthread/$(DEPDIR)/$(am__dirstamp) -rm -f glthread/$(am__dirstamp) -test -z "$(DISTCLEANFILES)" || rm -f $(DISTCLEANFILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." -test -z "$(BUILT_SOURCES)" || rm -f $(BUILT_SOURCES) -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES) clean: clean-recursive clean-am: clean-generic clean-libtool clean-noinstLIBRARIES \ clean-noinstLTLIBRARIES mostlyclean-am distclean: distclean-recursive -rm -rf $(DEPDIR) ./$(DEPDIR) glthread/$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-recursive dvi-am: html: html-recursive html-am: info: info-recursive info-am: install-data-am: install-dvi: install-dvi-recursive install-dvi-am: install-exec-am: install-exec-local install-html: install-html-recursive install-html-am: install-info: install-info-recursive install-info-am: install-man: install-pdf: install-pdf-recursive install-pdf-am: install-ps: install-ps-recursive install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-recursive -rm -rf $(DEPDIR) ./$(DEPDIR) glthread/$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-recursive mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool mostlyclean-local pdf: pdf-recursive pdf-am: ps: ps-recursive ps-am: uninstall-am: uninstall-local .MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) all check \ ctags-recursive install install-am install-strip \ tags-recursive .PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \ all all-am all-local check check-am clean clean-generic \ clean-libtool clean-noinstLIBRARIES clean-noinstLTLIBRARIES \ ctags ctags-recursive distclean distclean-compile \ distclean-generic distclean-libtool distclean-tags distdir dvi \ dvi-am html html-am info info-am install install-am \ install-data install-data-am install-dvi install-dvi-am \ install-exec install-exec-am install-exec-local install-html \ install-html-am install-info install-info-am install-man \ install-pdf install-pdf-am install-ps install-ps-am \ install-strip installcheck installcheck-am installdirs \ installdirs-am maintainer-clean maintainer-clean-generic \ mostlyclean mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool mostlyclean-local pdf pdf-am ps ps-am tags \ tags-recursive uninstall uninstall-am uninstall-local # We need the following in order to create when the system # doesn't have one that works with the given compiler. alloca.h: alloca.in.h $(AM_V_GEN)rm -f $@-t $@ && \ { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \ cat $(srcdir)/alloca.in.h; \ } > $@-t && \ mv -f $@-t $@ # The arg-nonnull.h that gets inserted into generated .h files is the same as # build-aux/arg-nonnull.h, except that it has the copyright header cut off. arg-nonnull.h: $(top_srcdir)/./arg-nonnull.h $(AM_V_GEN)rm -f $@-t $@ && \ sed -n -e '/GL_ARG_NONNULL/,$$p' \ < $(top_srcdir)/./arg-nonnull.h \ > $@-t && \ mv $@-t $@ # We need the following in order to create when the system # doesn't have one. arpa/inet.h: arpa_inet.in.h $(WARN_ON_USE_H) $(ARG_NONNULL_H) $(AM_V_at)$(MKDIR_P) arpa $(AM_V_GEN)rm -f $@-t $@ && \ { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \ sed -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \ -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ -e 's|@''NEXT_ARPA_INET_H''@|$(NEXT_ARPA_INET_H)|g' \ -e 's|@''HAVE_ARPA_INET_H''@|$(HAVE_ARPA_INET_H)|g' \ -e 's|@''GNULIB_INET_NTOP''@|$(GNULIB_INET_NTOP)|g' \ -e 's|@''GNULIB_INET_PTON''@|$(GNULIB_INET_PTON)|g' \ -e 's|@''HAVE_DECL_INET_NTOP''@|$(HAVE_DECL_INET_NTOP)|g' \ -e 's|@''HAVE_DECL_INET_PTON''@|$(HAVE_DECL_INET_PTON)|g' \ -e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \ -e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)' \ < $(srcdir)/arpa_inet.in.h; \ } > $@-t && \ mv $@-t $@ # Retrieve values of the variables through 'configure' followed by # 'make', not directly through 'configure', so that a user who # sets some of these variables consistently on the 'make' command # line gets correct results. # # One advantage of this approach, compared to the classical # approach of adding -DLIBDIR=\"$(libdir)\" etc. to AM_CPPFLAGS, # is that it protects against the use of undefined variables. # If, say, $(libdir) is not set in the Makefile, LIBDIR is not # defined by this module, and code using LIBDIR gives a # compilation error. # # Another advantage is that 'make' output is shorter. # # Listed in the same order as the GNU makefile conventions. # The Automake-defined pkg* macros are appended, in the order # listed in the Automake 1.10a+ documentation. configmake.h: Makefile $(AM_V_GEN)rm -f $@-t && \ { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \ echo '#define PREFIX "$(prefix)"'; \ echo '#define EXEC_PREFIX "$(exec_prefix)"'; \ echo '#define BINDIR "$(bindir)"'; \ echo '#define SBINDIR "$(sbindir)"'; \ echo '#define LIBEXECDIR "$(libexecdir)"'; \ echo '#define DATAROOTDIR "$(datarootdir)"'; \ echo '#define DATADIR "$(datadir)"'; \ echo '#define SYSCONFDIR "$(sysconfdir)"'; \ echo '#define SHAREDSTATEDIR "$(sharedstatedir)"'; \ echo '#define LOCALSTATEDIR "$(localstatedir)"'; \ echo '#define INCLUDEDIR "$(includedir)"'; \ echo '#define OLDINCLUDEDIR "$(oldincludedir)"'; \ echo '#define DOCDIR "$(docdir)"'; \ echo '#define INFODIR "$(infodir)"'; \ echo '#define HTMLDIR "$(htmldir)"'; \ echo '#define DVIDIR "$(dvidir)"'; \ echo '#define PDFDIR "$(pdfdir)"'; \ echo '#define PSDIR "$(psdir)"'; \ echo '#define LIBDIR "$(libdir)"'; \ echo '#define LISPDIR "$(lispdir)"'; \ echo '#define LOCALEDIR "$(localedir)"'; \ echo '#define MANDIR "$(mandir)"'; \ echo '#define MANEXT "$(manext)"'; \ echo '#define PKGDATADIR "$(pkgdatadir)"'; \ echo '#define PKGINCLUDEDIR "$(pkgincludedir)"'; \ echo '#define PKGLIBDIR "$(pkglibdir)"'; \ echo '#define PKGLIBEXECDIR "$(pkglibexecdir)"'; \ } | sed '/""/d' > $@-t && \ if test -f $@ && cmp $@-t $@ > /dev/null; then \ rm -f $@-t; \ else \ rm -f $@; mv $@-t $@; \ fi # We need the following in order to create when the system # doesn't have one that is POSIX compliant. errno.h: errno.in.h $(AM_V_GEN)rm -f $@-t $@ && \ { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */' && \ sed -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \ -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ -e 's|@''NEXT_ERRNO_H''@|$(NEXT_ERRNO_H)|g' \ -e 's|@''EMULTIHOP_HIDDEN''@|$(EMULTIHOP_HIDDEN)|g' \ -e 's|@''EMULTIHOP_VALUE''@|$(EMULTIHOP_VALUE)|g' \ -e 's|@''ENOLINK_HIDDEN''@|$(ENOLINK_HIDDEN)|g' \ -e 's|@''ENOLINK_VALUE''@|$(ENOLINK_VALUE)|g' \ -e 's|@''EOVERFLOW_HIDDEN''@|$(EOVERFLOW_HIDDEN)|g' \ -e 's|@''EOVERFLOW_VALUE''@|$(EOVERFLOW_VALUE)|g' \ < $(srcdir)/errno.in.h; \ } > $@-t && \ mv $@-t $@ # We need the following in order to create when the system # doesn't have one that works with the given compiler. float.h: float.in.h $(AM_V_GEN)rm -f $@-t $@ && \ { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */' && \ sed -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \ -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ -e 's|@''NEXT_FLOAT_H''@|$(NEXT_FLOAT_H)|g' \ < $(srcdir)/float.in.h; \ } > $@-t && \ mv $@-t $@ # We need the following in order to create an empty placeholder for # when the system doesn't have one. langinfo.h: langinfo.in.h $(WARN_ON_USE_H) $(AM_V_GEN)rm -f $@-t $@ && \ { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \ sed -e 's|@''HAVE_LANGINFO_H''@|$(HAVE_LANGINFO_H)|g' \ -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \ -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ -e 's|@''NEXT_LANGINFO_H''@|$(NEXT_LANGINFO_H)|g' \ -e 's|@''GNULIB_NL_LANGINFO''@|$(GNULIB_NL_LANGINFO)|g' \ -e 's|@''HAVE_LANGINFO_CODESET''@|$(HAVE_LANGINFO_CODESET)|g' \ -e 's|@''HAVE_LANGINFO_ERA''@|$(HAVE_LANGINFO_ERA)|g' \ -e 's|@''HAVE_NL_LANGINFO''@|$(HAVE_NL_LANGINFO)|g' \ -e 's|@''REPLACE_NL_LANGINFO''@|$(REPLACE_NL_LANGINFO)|g' \ -e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)' \ < $(srcdir)/langinfo.in.h; \ } > $@-t && \ mv $@-t $@ # We need the following in order to install a simple file in $(libdir) # which is shared with other installed packages. We use a list of referencing # packages so that "make uninstall" will remove the file if and only if it # is not used by another installed package. # On systems with glibc-2.1 or newer, the file is redundant, therefore we # avoid installing it. all-local: charset.alias ref-add.sed ref-del.sed install-exec-local: install-exec-localcharset install-exec-localcharset: all-local if test $(GLIBC21) = no; then \ case '$(host_os)' in \ darwin[56]*) \ need_charset_alias=true ;; \ darwin* | cygwin* | mingw* | pw32* | cegcc*) \ need_charset_alias=false ;; \ *) \ need_charset_alias=true ;; \ esac ; \ else \ need_charset_alias=false ; \ fi ; \ if $$need_charset_alias; then \ $(mkinstalldirs) $(DESTDIR)$(libdir) ; \ fi ; \ if test -f $(charset_alias); then \ sed -f ref-add.sed $(charset_alias) > $(charset_tmp) ; \ $(INSTALL_DATA) $(charset_tmp) $(charset_alias) ; \ rm -f $(charset_tmp) ; \ else \ if $$need_charset_alias; then \ sed -f ref-add.sed charset.alias > $(charset_tmp) ; \ $(INSTALL_DATA) $(charset_tmp) $(charset_alias) ; \ rm -f $(charset_tmp) ; \ fi ; \ fi uninstall-local: uninstall-localcharset uninstall-localcharset: all-local if test -f $(charset_alias); then \ sed -f ref-del.sed $(charset_alias) > $(charset_tmp); \ if grep '^# Packages using this file: $$' $(charset_tmp) \ > /dev/null; then \ rm -f $(charset_alias); \ else \ $(INSTALL_DATA) $(charset_tmp) $(charset_alias); \ fi; \ rm -f $(charset_tmp); \ fi charset.alias: config.charset $(AM_V_GEN)rm -f t-$@ $@ && \ $(SHELL) $(srcdir)/config.charset '$(host)' > t-$@ && \ mv t-$@ $@ .sin.sed: $(AM_V_GEN)rm -f t-$@ $@ && \ sed -e '/^#/d' -e 's/@''PACKAGE''@/$(PACKAGE)/g' $< > t-$@ && \ mv t-$@ $@ # We need the following in order to create when the system # doesn't have one that works with the given compiler. math.h: math.in.h $(WARN_ON_USE_H) $(ARG_NONNULL_H) $(AM_V_GEN)rm -f $@-t $@ && \ { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */' && \ sed -e 's|@''INCLUDE_NEXT_AS_FIRST_DIRECTIVE''@|$(INCLUDE_NEXT_AS_FIRST_DIRECTIVE)|g' \ -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ -e 's|@''NEXT_AS_FIRST_DIRECTIVE_MATH_H''@|$(NEXT_AS_FIRST_DIRECTIVE_MATH_H)|g' \ -e 's|@''GNULIB_ACOSL''@|$(GNULIB_ACOSL)|g' \ -e 's|@''GNULIB_ASINL''@|$(GNULIB_ASINL)|g' \ -e 's|@''GNULIB_ATANL''@|$(GNULIB_ATANL)|g' \ -e 's|@''GNULIB_CEILF''@|$(GNULIB_CEILF)|g' \ -e 's|@''GNULIB_CEILL''@|$(GNULIB_CEILL)|g' \ -e 's|@''GNULIB_COSL''@|$(GNULIB_COSL)|g' \ -e 's|@''GNULIB_EXPL''@|$(GNULIB_EXPL)|g' \ -e 's|@''GNULIB_FLOORF''@|$(GNULIB_FLOORF)|g' \ -e 's|@''GNULIB_FLOORL''@|$(GNULIB_FLOORL)|g' \ -e 's|@''GNULIB_FREXP''@|$(GNULIB_FREXP)|g' \ -e 's|@''GNULIB_FREXPL''@|$(GNULIB_FREXPL)|g' \ -e 's|@''GNULIB_ISFINITE''@|$(GNULIB_ISFINITE)|g' \ -e 's|@''GNULIB_ISINF''@|$(GNULIB_ISINF)|g' \ -e 's|@''GNULIB_ISNAN''@|$(GNULIB_ISNAN)|g' \ -e 's|@''GNULIB_ISNANF''@|$(GNULIB_ISNANF)|g' \ -e 's|@''GNULIB_ISNAND''@|$(GNULIB_ISNAND)|g' \ -e 's|@''GNULIB_ISNANL''@|$(GNULIB_ISNANL)|g' \ -e 's|@''GNULIB_LDEXPL''@|$(GNULIB_LDEXPL)|g' \ -e 's|@''GNULIB_LOGL''@|$(GNULIB_LOGL)|g' \ -e 's|@''GNULIB_ROUND''@|$(GNULIB_ROUND)|g' \ -e 's|@''GNULIB_ROUNDF''@|$(GNULIB_ROUNDF)|g' \ -e 's|@''GNULIB_ROUNDL''@|$(GNULIB_ROUNDL)|g' \ -e 's|@''GNULIB_SIGNBIT''@|$(GNULIB_SIGNBIT)|g' \ -e 's|@''GNULIB_SINL''@|$(GNULIB_SINL)|g' \ -e 's|@''GNULIB_SQRTL''@|$(GNULIB_SQRTL)|g' \ -e 's|@''GNULIB_TANL''@|$(GNULIB_TANL)|g' \ -e 's|@''GNULIB_TRUNC''@|$(GNULIB_TRUNC)|g' \ -e 's|@''GNULIB_TRUNCF''@|$(GNULIB_TRUNCF)|g' \ -e 's|@''GNULIB_TRUNCL''@|$(GNULIB_TRUNCL)|g' \ -e 's|@''HAVE_ACOSL''@|$(HAVE_ACOSL)|g' \ -e 's|@''HAVE_ASINL''@|$(HAVE_ASINL)|g' \ -e 's|@''HAVE_ATANL''@|$(HAVE_ATANL)|g' \ -e 's|@''HAVE_COSL''@|$(HAVE_COSL)|g' \ -e 's|@''HAVE_EXPL''@|$(HAVE_EXPL)|g' \ -e 's|@''HAVE_ISNANF''@|$(HAVE_ISNANF)|g' \ -e 's|@''HAVE_ISNAND''@|$(HAVE_ISNAND)|g' \ -e 's|@''HAVE_ISNANL''@|$(HAVE_ISNANL)|g' \ -e 's|@''HAVE_LOGL''@|$(HAVE_LOGL)|g' \ -e 's|@''HAVE_SINL''@|$(HAVE_SINL)|g' \ -e 's|@''HAVE_SQRTL''@|$(HAVE_SQRTL)|g' \ -e 's|@''HAVE_TANL''@|$(HAVE_TANL)|g' \ -e 's|@''HAVE_DECL_ACOSL''@|$(HAVE_DECL_ACOSL)|g' \ -e 's|@''HAVE_DECL_ASINL''@|$(HAVE_DECL_ASINL)|g' \ -e 's|@''HAVE_DECL_ATANL''@|$(HAVE_DECL_ATANL)|g' \ -e 's|@''HAVE_DECL_COSL''@|$(HAVE_DECL_COSL)|g' \ -e 's|@''HAVE_DECL_EXPL''@|$(HAVE_DECL_EXPL)|g' \ -e 's|@''HAVE_DECL_FREXPL''@|$(HAVE_DECL_FREXPL)|g' \ -e 's|@''HAVE_DECL_LDEXPL''@|$(HAVE_DECL_LDEXPL)|g' \ -e 's|@''HAVE_DECL_LOGL''@|$(HAVE_DECL_LOGL)|g' \ -e 's|@''HAVE_DECL_SINL''@|$(HAVE_DECL_SINL)|g' \ -e 's|@''HAVE_DECL_SQRTL''@|$(HAVE_DECL_SQRTL)|g' \ -e 's|@''HAVE_DECL_TANL''@|$(HAVE_DECL_TANL)|g' \ -e 's|@''HAVE_DECL_TRUNC''@|$(HAVE_DECL_TRUNC)|g' \ -e 's|@''HAVE_DECL_TRUNCF''@|$(HAVE_DECL_TRUNCF)|g' \ -e 's|@''REPLACE_CEILF''@|$(REPLACE_CEILF)|g' \ -e 's|@''REPLACE_CEILL''@|$(REPLACE_CEILL)|g' \ -e 's|@''REPLACE_FLOORF''@|$(REPLACE_FLOORF)|g' \ -e 's|@''REPLACE_FLOORL''@|$(REPLACE_FLOORL)|g' \ -e 's|@''REPLACE_FREXP''@|$(REPLACE_FREXP)|g' \ -e 's|@''REPLACE_FREXPL''@|$(REPLACE_FREXPL)|g' \ -e 's|@''REPLACE_HUGE_VAL''@|$(REPLACE_HUGE_VAL)|g' \ -e 's|@''REPLACE_ISFINITE''@|$(REPLACE_ISFINITE)|g' \ -e 's|@''REPLACE_ISINF''@|$(REPLACE_ISINF)|g' \ -e 's|@''REPLACE_ISNAN''@|$(REPLACE_ISNAN)|g' \ -e 's|@''REPLACE_LDEXPL''@|$(REPLACE_LDEXPL)|g' \ -e 's|@''REPLACE_NAN''@|$(REPLACE_NAN)|g' \ -e 's|@''REPLACE_ROUND''@|$(REPLACE_ROUND)|g' \ -e 's|@''REPLACE_ROUNDF''@|$(REPLACE_ROUNDF)|g' \ -e 's|@''REPLACE_ROUNDL''@|$(REPLACE_ROUNDL)|g' \ -e 's|@''REPLACE_SIGNBIT''@|$(REPLACE_SIGNBIT)|g' \ -e 's|@''REPLACE_SIGNBIT_USING_GCC''@|$(REPLACE_SIGNBIT_USING_GCC)|g' \ -e 's|@''REPLACE_TRUNCL''@|$(REPLACE_TRUNCL)|g' \ -e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \ -e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)' \ < $(srcdir)/math.in.h; \ } > $@-t && \ mv $@-t $@ # We need the following in order to create when the system # doesn't have one that works with the given compiler. netdb.h: netdb.in.h $(ARG_NONNULL_H) $(AM_V_GEN)rm -f $@-t $@ && \ { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \ sed -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \ -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ -e 's|@''NEXT_NETDB_H''@|$(NEXT_NETDB_H)|g' \ -e 's|@''HAVE_NETDB_H''@|$(HAVE_NETDB_H)|g' \ -e 's|@''GNULIB_GETADDRINFO''@|$(GNULIB_GETADDRINFO)|g' \ -e 's|@''HAVE_STRUCT_ADDRINFO''@|$(HAVE_STRUCT_ADDRINFO)|g' \ -e 's|@''HAVE_DECL_FREEADDRINFO''@|$(HAVE_DECL_FREEADDRINFO)|g' \ -e 's|@''HAVE_DECL_GAI_STRERROR''@|$(HAVE_DECL_GAI_STRERROR)|g' \ -e 's|@''HAVE_DECL_GETADDRINFO''@|$(HAVE_DECL_GETADDRINFO)|g' \ -e 's|@''HAVE_DECL_GETNAMEINFO''@|$(HAVE_DECL_GETNAMEINFO)|g' \ -e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \ < $(srcdir)/netdb.in.h; \ } > $@-t && \ mv $@-t $@ # We need the following in order to create when the system # doesn't have one. netinet/in.h: netinet_in.in.h $(AM_V_at)$(MKDIR_P) netinet $(AM_V_GEN)rm -f $@-t $@ && \ { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \ sed -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \ -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ -e 's|@''NEXT_NETINET_IN_H''@|$(NEXT_NETINET_IN_H)|g' \ -e 's|@''HAVE_NETINET_IN_H''@|$(HAVE_NETINET_IN_H)|g' \ < $(srcdir)/netinet_in.in.h; \ } > $@-t && \ mv $@-t $@ # We need the following in order to create when the system # doesn't have one. poll.h: poll.in.h $(AM_V_GEN)rm -f $@-t $@ && \ { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \ cat $(srcdir)/poll.in.h; \ } > $@-t && \ mv -f $@-t $@ # We need the following in order to create when the system # doesn't have a complete one. signal.h: signal.in.h $(WARN_ON_USE_H) $(ARG_NONNULL_H) $(AM_V_GEN)rm -f $@-t $@ && \ { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */' && \ sed -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \ -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ -e 's|@''NEXT_SIGNAL_H''@|$(NEXT_SIGNAL_H)|g' \ -e 's|@''GNULIB_SIGNAL_H_SIGPIPE''@|$(GNULIB_SIGNAL_H_SIGPIPE)|g' \ -e 's|@''GNULIB_SIGPROCMASK''@|$(GNULIB_SIGPROCMASK)|g' \ -e 's|@''GNULIB_SIGACTION''@|$(GNULIB_SIGACTION)|g' \ -e 's|@''HAVE_POSIX_SIGNALBLOCKING''@|$(HAVE_POSIX_SIGNALBLOCKING)|g' \ -e 's|@''HAVE_SIGSET_T''@|$(HAVE_SIGSET_T)|g' \ -e 's|@''HAVE_SIGINFO_T''@|$(HAVE_SIGINFO_T)|g' \ -e 's|@''HAVE_SIGACTION''@|$(HAVE_SIGACTION)|g' \ -e 's|@''HAVE_STRUCT_SIGACTION_SA_SIGACTION''@|$(HAVE_STRUCT_SIGACTION_SA_SIGACTION)|g' \ -e 's|@''HAVE_TYPE_VOLATILE_SIG_ATOMIC_T''@|$(HAVE_TYPE_VOLATILE_SIG_ATOMIC_T)|g' \ -e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \ -e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)' \ < $(srcdir)/signal.in.h; \ } > $@-t && \ mv $@-t $@ # We need the following in order to create when the system # doesn't have one that works. stdbool.h: stdbool.in.h $(AM_V_GEN)rm -f $@-t $@ && \ { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \ sed -e 's/@''HAVE__BOOL''@/$(HAVE__BOOL)/g' < $(srcdir)/stdbool.in.h; \ } > $@-t && \ mv $@-t $@ # We need the following in order to create when the system # doesn't have one that works with the given compiler. stddef.h: stddef.in.h $(AM_V_GEN)rm -f $@-t $@ && \ { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */' && \ sed -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \ -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ -e 's|@''NEXT_STDDEF_H''@|$(NEXT_STDDEF_H)|g' \ -e 's|@''HAVE_WCHAR_T''@|$(HAVE_WCHAR_T)|g' \ -e 's|@''REPLACE_NULL''@|$(REPLACE_NULL)|g' \ < $(srcdir)/stddef.in.h; \ } > $@-t && \ mv $@-t $@ # We need the following in order to create when the system # doesn't have one that works with the given compiler. stdint.h: stdint.in.h $(AM_V_GEN)rm -f $@-t $@ && \ { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \ sed -e 's/@''HAVE_STDINT_H''@/$(HAVE_STDINT_H)/g' \ -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \ -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ -e 's|@''NEXT_STDINT_H''@|$(NEXT_STDINT_H)|g' \ -e 's/@''HAVE_SYS_TYPES_H''@/$(HAVE_SYS_TYPES_H)/g' \ -e 's/@''HAVE_INTTYPES_H''@/$(HAVE_INTTYPES_H)/g' \ -e 's/@''HAVE_SYS_INTTYPES_H''@/$(HAVE_SYS_INTTYPES_H)/g' \ -e 's/@''HAVE_SYS_BITYPES_H''@/$(HAVE_SYS_BITYPES_H)/g' \ -e 's/@''HAVE_LONG_LONG_INT''@/$(HAVE_LONG_LONG_INT)/g' \ -e 's/@''HAVE_UNSIGNED_LONG_LONG_INT''@/$(HAVE_UNSIGNED_LONG_LONG_INT)/g' \ -e 's/@''APPLE_UNIVERSAL_BUILD''@/$(APPLE_UNIVERSAL_BUILD)/g' \ -e 's/@''BITSIZEOF_PTRDIFF_T''@/$(BITSIZEOF_PTRDIFF_T)/g' \ -e 's/@''PTRDIFF_T_SUFFIX''@/$(PTRDIFF_T_SUFFIX)/g' \ -e 's/@''BITSIZEOF_SIG_ATOMIC_T''@/$(BITSIZEOF_SIG_ATOMIC_T)/g' \ -e 's/@''HAVE_SIGNED_SIG_ATOMIC_T''@/$(HAVE_SIGNED_SIG_ATOMIC_T)/g' \ -e 's/@''SIG_ATOMIC_T_SUFFIX''@/$(SIG_ATOMIC_T_SUFFIX)/g' \ -e 's/@''BITSIZEOF_SIZE_T''@/$(BITSIZEOF_SIZE_T)/g' \ -e 's/@''SIZE_T_SUFFIX''@/$(SIZE_T_SUFFIX)/g' \ -e 's/@''BITSIZEOF_WCHAR_T''@/$(BITSIZEOF_WCHAR_T)/g' \ -e 's/@''HAVE_SIGNED_WCHAR_T''@/$(HAVE_SIGNED_WCHAR_T)/g' \ -e 's/@''WCHAR_T_SUFFIX''@/$(WCHAR_T_SUFFIX)/g' \ -e 's/@''BITSIZEOF_WINT_T''@/$(BITSIZEOF_WINT_T)/g' \ -e 's/@''HAVE_SIGNED_WINT_T''@/$(HAVE_SIGNED_WINT_T)/g' \ -e 's/@''WINT_T_SUFFIX''@/$(WINT_T_SUFFIX)/g' \ < $(srcdir)/stdint.in.h; \ } > $@-t && \ mv $@-t $@ # We need the following in order to create when the system # doesn't have one that works with the given compiler. stdio.h: stdio.in.h $(WARN_ON_USE_H) $(ARG_NONNULL_H) $(AM_V_GEN)rm -f $@-t $@ && \ { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */' && \ sed -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \ -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ -e 's|@''NEXT_STDIO_H''@|$(NEXT_STDIO_H)|g' \ -e 's|@''GNULIB_DPRINTF''@|$(GNULIB_DPRINTF)|g' \ -e 's|@''GNULIB_FCLOSE''@|$(GNULIB_FCLOSE)|g' \ -e 's|@''GNULIB_FFLUSH''@|$(GNULIB_FFLUSH)|g' \ -e 's|@''GNULIB_FOPEN''@|$(GNULIB_FOPEN)|g' \ -e 's|@''GNULIB_FPRINTF''@|$(GNULIB_FPRINTF)|g' \ -e 's|@''GNULIB_FPRINTF_POSIX''@|$(GNULIB_FPRINTF_POSIX)|g' \ -e 's|@''GNULIB_FPURGE''@|$(GNULIB_FPURGE)|g' \ -e 's|@''GNULIB_FPUTC''@|$(GNULIB_FPUTC)|g' \ -e 's|@''GNULIB_FPUTS''@|$(GNULIB_FPUTS)|g' \ -e 's|@''GNULIB_FREOPEN''@|$(GNULIB_FREOPEN)|g' \ -e 's|@''GNULIB_FSEEK''@|$(GNULIB_FSEEK)|g' \ -e 's|@''GNULIB_FSEEKO''@|$(GNULIB_FSEEKO)|g' \ -e 's|@''GNULIB_FTELL''@|$(GNULIB_FTELL)|g' \ -e 's|@''GNULIB_FTELLO''@|$(GNULIB_FTELLO)|g' \ -e 's|@''GNULIB_FWRITE''@|$(GNULIB_FWRITE)|g' \ -e 's|@''GNULIB_GETDELIM''@|$(GNULIB_GETDELIM)|g' \ -e 's|@''GNULIB_GETLINE''@|$(GNULIB_GETLINE)|g' \ -e 's|@''GNULIB_OBSTACK_PRINTF''@|$(GNULIB_OBSTACK_PRINTF)|g' \ -e 's|@''GNULIB_OBSTACK_PRINTF_POSIX''@|$(GNULIB_OBSTACK_PRINTF_POSIX)|g' \ -e 's|@''GNULIB_PERROR''@|$(GNULIB_PERROR)|g' \ -e 's|@''GNULIB_POPEN''@|$(GNULIB_POPEN)|g' \ -e 's|@''GNULIB_PRINTF''@|$(GNULIB_PRINTF)|g' \ -e 's|@''GNULIB_PRINTF_POSIX''@|$(GNULIB_PRINTF_POSIX)|g' \ -e 's|@''GNULIB_PUTC''@|$(GNULIB_PUTC)|g' \ -e 's|@''GNULIB_PUTCHAR''@|$(GNULIB_PUTCHAR)|g' \ -e 's|@''GNULIB_PUTS''@|$(GNULIB_PUTS)|g' \ -e 's|@''GNULIB_REMOVE''@|$(GNULIB_REMOVE)|g' \ -e 's|@''GNULIB_RENAME''@|$(GNULIB_RENAME)|g' \ -e 's|@''GNULIB_RENAMEAT''@|$(GNULIB_RENAMEAT)|g' \ -e 's|@''GNULIB_SNPRINTF''@|$(GNULIB_SNPRINTF)|g' \ -e 's|@''GNULIB_SPRINTF_POSIX''@|$(GNULIB_SPRINTF_POSIX)|g' \ -e 's|@''GNULIB_STDIO_H_SIGPIPE''@|$(GNULIB_STDIO_H_SIGPIPE)|g' \ -e 's|@''GNULIB_VASPRINTF''@|$(GNULIB_VASPRINTF)|g' \ -e 's|@''GNULIB_VDPRINTF''@|$(GNULIB_VDPRINTF)|g' \ -e 's|@''GNULIB_VFPRINTF''@|$(GNULIB_VFPRINTF)|g' \ -e 's|@''GNULIB_VFPRINTF_POSIX''@|$(GNULIB_VFPRINTF_POSIX)|g' \ -e 's|@''GNULIB_VPRINTF''@|$(GNULIB_VPRINTF)|g' \ -e 's|@''GNULIB_VPRINTF_POSIX''@|$(GNULIB_VPRINTF_POSIX)|g' \ -e 's|@''GNULIB_VSNPRINTF''@|$(GNULIB_VSNPRINTF)|g' \ -e 's|@''GNULIB_VSPRINTF_POSIX''@|$(GNULIB_VSPRINTF_POSIX)|g' \ < $(srcdir)/stdio.in.h | \ sed -e 's|@''HAVE_DECL_FPURGE''@|$(HAVE_DECL_FPURGE)|g' \ -e 's|@''HAVE_DECL_GETDELIM''@|$(HAVE_DECL_GETDELIM)|g' \ -e 's|@''HAVE_DECL_GETLINE''@|$(HAVE_DECL_GETLINE)|g' \ -e 's|@''HAVE_DECL_OBSTACK_PRINTF''@|$(HAVE_DECL_OBSTACK_PRINTF)|g' \ -e 's|@''HAVE_DECL_SNPRINTF''@|$(HAVE_DECL_SNPRINTF)|g' \ -e 's|@''HAVE_DECL_VSNPRINTF''@|$(HAVE_DECL_VSNPRINTF)|g' \ -e 's|@''HAVE_DPRINTF''@|$(HAVE_DPRINTF)|g' \ -e 's|@''HAVE_RENAMEAT''@|$(HAVE_RENAMEAT)|g' \ -e 's|@''HAVE_VASPRINTF''@|$(HAVE_VASPRINTF)|g' \ -e 's|@''HAVE_VDPRINTF''@|$(HAVE_VDPRINTF)|g' \ -e 's|@''REPLACE_DPRINTF''@|$(REPLACE_DPRINTF)|g' \ -e 's|@''REPLACE_FCLOSE''@|$(REPLACE_FCLOSE)|g' \ -e 's|@''REPLACE_FFLUSH''@|$(REPLACE_FFLUSH)|g' \ -e 's|@''REPLACE_FOPEN''@|$(REPLACE_FOPEN)|g' \ -e 's|@''REPLACE_FPRINTF''@|$(REPLACE_FPRINTF)|g' \ -e 's|@''REPLACE_FPURGE''@|$(REPLACE_FPURGE)|g' \ -e 's|@''REPLACE_FREOPEN''@|$(REPLACE_FREOPEN)|g' \ -e 's|@''REPLACE_FSEEK''@|$(REPLACE_FSEEK)|g' \ -e 's|@''REPLACE_FSEEKO''@|$(REPLACE_FSEEKO)|g' \ -e 's|@''REPLACE_FTELL''@|$(REPLACE_FTELL)|g' \ -e 's|@''REPLACE_FTELLO''@|$(REPLACE_FTELLO)|g' \ -e 's|@''REPLACE_GETDELIM''@|$(REPLACE_GETDELIM)|g' \ -e 's|@''REPLACE_GETLINE''@|$(REPLACE_GETLINE)|g' \ -e 's|@''REPLACE_OBSTACK_PRINTF''@|$(REPLACE_OBSTACK_PRINTF)|g' \ -e 's|@''REPLACE_PERROR''@|$(REPLACE_PERROR)|g' \ -e 's|@''REPLACE_POPEN''@|$(REPLACE_POPEN)|g' \ -e 's|@''REPLACE_PRINTF''@|$(REPLACE_PRINTF)|g' \ -e 's|@''REPLACE_REMOVE''@|$(REPLACE_REMOVE)|g' \ -e 's|@''REPLACE_RENAME''@|$(REPLACE_RENAME)|g' \ -e 's|@''REPLACE_RENAMEAT''@|$(REPLACE_RENAMEAT)|g' \ -e 's|@''REPLACE_SNPRINTF''@|$(REPLACE_SNPRINTF)|g' \ -e 's|@''REPLACE_SPRINTF''@|$(REPLACE_SPRINTF)|g' \ -e 's|@''REPLACE_STDIO_WRITE_FUNCS''@|$(REPLACE_STDIO_WRITE_FUNCS)|g' \ -e 's|@''REPLACE_VASPRINTF''@|$(REPLACE_VASPRINTF)|g' \ -e 's|@''REPLACE_VDPRINTF''@|$(REPLACE_VDPRINTF)|g' \ -e 's|@''REPLACE_VFPRINTF''@|$(REPLACE_VFPRINTF)|g' \ -e 's|@''REPLACE_VPRINTF''@|$(REPLACE_VPRINTF)|g' \ -e 's|@''REPLACE_VSNPRINTF''@|$(REPLACE_VSNPRINTF)|g' \ -e 's|@''REPLACE_VSPRINTF''@|$(REPLACE_VSPRINTF)|g' \ -e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \ -e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)'; \ } > $@-t && \ mv $@-t $@ # We need the following in order to create when the system # doesn't have one that works with the given compiler. stdlib.h: stdlib.in.h $(WARN_ON_USE_H) $(ARG_NONNULL_H) $(AM_V_GEN)rm -f $@-t $@ && \ { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */' && \ sed -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \ -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ -e 's|@''NEXT_STDLIB_H''@|$(NEXT_STDLIB_H)|g' \ -e 's|@''GNULIB_ATOLL''@|$(GNULIB_ATOLL)|g' \ -e 's|@''GNULIB_CALLOC_POSIX''@|$(GNULIB_CALLOC_POSIX)|g' \ -e 's|@''GNULIB_CANONICALIZE_FILE_NAME''@|$(GNULIB_CANONICALIZE_FILE_NAME)|g' \ -e 's|@''GNULIB_GETLOADAVG''@|$(GNULIB_GETLOADAVG)|g' \ -e 's|@''GNULIB_GETSUBOPT''@|$(GNULIB_GETSUBOPT)|g' \ -e 's|@''GNULIB_MALLOC_POSIX''@|$(GNULIB_MALLOC_POSIX)|g' \ -e 's|@''GNULIB_MKDTEMP''@|$(GNULIB_MKDTEMP)|g' \ -e 's|@''GNULIB_MKOSTEMP''@|$(GNULIB_MKOSTEMP)|g' \ -e 's|@''GNULIB_MKOSTEMPS''@|$(GNULIB_MKOSTEMPS)|g' \ -e 's|@''GNULIB_MKSTEMP''@|$(GNULIB_MKSTEMP)|g' \ -e 's|@''GNULIB_MKSTEMPS''@|$(GNULIB_MKSTEMPS)|g' \ -e 's|@''GNULIB_PUTENV''@|$(GNULIB_PUTENV)|g' \ -e 's|@''GNULIB_RANDOM_R''@|$(GNULIB_RANDOM_R)|g' \ -e 's|@''GNULIB_REALLOC_POSIX''@|$(GNULIB_REALLOC_POSIX)|g' \ -e 's|@''GNULIB_REALPATH''@|$(GNULIB_REALPATH)|g' \ -e 's|@''GNULIB_RPMATCH''@|$(GNULIB_RPMATCH)|g' \ -e 's|@''GNULIB_SETENV''@|$(GNULIB_SETENV)|g' \ -e 's|@''GNULIB_STRTOD''@|$(GNULIB_STRTOD)|g' \ -e 's|@''GNULIB_STRTOLL''@|$(GNULIB_STRTOLL)|g' \ -e 's|@''GNULIB_STRTOULL''@|$(GNULIB_STRTOULL)|g' \ -e 's|@''GNULIB_UNSETENV''@|$(GNULIB_UNSETENV)|g' \ -e 's|@''HAVE_ATOLL''@|$(HAVE_ATOLL)|g' \ -e 's|@''HAVE_CALLOC_POSIX''@|$(HAVE_CALLOC_POSIX)|g' \ -e 's|@''HAVE_CANONICALIZE_FILE_NAME''@|$(HAVE_CANONICALIZE_FILE_NAME)|g' \ -e 's|@''HAVE_DECL_GETLOADAVG''@|$(HAVE_DECL_GETLOADAVG)|g' \ -e 's|@''HAVE_GETSUBOPT''@|$(HAVE_GETSUBOPT)|g' \ -e 's|@''HAVE_MALLOC_POSIX''@|$(HAVE_MALLOC_POSIX)|g' \ -e 's|@''HAVE_MKDTEMP''@|$(HAVE_MKDTEMP)|g' \ -e 's|@''HAVE_MKOSTEMP''@|$(HAVE_MKOSTEMP)|g' \ -e 's|@''HAVE_MKOSTEMPS''@|$(HAVE_MKOSTEMPS)|g' \ -e 's|@''HAVE_MKSTEMPS''@|$(HAVE_MKSTEMPS)|g' \ -e 's|@''HAVE_RANDOM_H''@|$(HAVE_RANDOM_H)|g' \ -e 's|@''HAVE_RANDOM_R''@|$(HAVE_RANDOM_R)|g' \ -e 's|@''HAVE_REALLOC_POSIX''@|$(HAVE_REALLOC_POSIX)|g' \ -e 's|@''HAVE_REALPATH''@|$(HAVE_REALPATH)|g' \ -e 's|@''HAVE_RPMATCH''@|$(HAVE_RPMATCH)|g' \ -e 's|@''HAVE_SETENV''@|$(HAVE_SETENV)|g' \ -e 's|@''HAVE_STRTOD''@|$(HAVE_STRTOD)|g' \ -e 's|@''HAVE_STRTOLL''@|$(HAVE_STRTOLL)|g' \ -e 's|@''HAVE_STRTOULL''@|$(HAVE_STRTOULL)|g' \ -e 's|@''HAVE_STRUCT_RANDOM_DATA''@|$(HAVE_STRUCT_RANDOM_DATA)|g' \ -e 's|@''HAVE_SYS_LOADAVG_H''@|$(HAVE_SYS_LOADAVG_H)|g' \ -e 's|@''HAVE_UNSETENV''@|$(HAVE_UNSETENV)|g' \ -e 's|@''REPLACE_CANONICALIZE_FILE_NAME''@|$(REPLACE_CANONICALIZE_FILE_NAME)|g' \ -e 's|@''REPLACE_MKSTEMP''@|$(REPLACE_MKSTEMP)|g' \ -e 's|@''REPLACE_PUTENV''@|$(REPLACE_PUTENV)|g' \ -e 's|@''REPLACE_REALPATH''@|$(REPLACE_REALPATH)|g' \ -e 's|@''REPLACE_SETENV''@|$(REPLACE_SETENV)|g' \ -e 's|@''REPLACE_STRTOD''@|$(REPLACE_STRTOD)|g' \ -e 's|@''REPLACE_UNSETENV''@|$(REPLACE_UNSETENV)|g' \ -e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \ -e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)' \ < $(srcdir)/stdlib.in.h; \ } > $@-t && \ mv $@-t $@ # We need the following in order to create when the system # doesn't have one that works with the given compiler. string.h: string.in.h $(WARN_ON_USE_H) $(ARG_NONNULL_H) $(AM_V_GEN)rm -f $@-t $@ && \ { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */' && \ sed -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \ -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ -e 's|@''NEXT_STRING_H''@|$(NEXT_STRING_H)|g' \ -e 's|@''GNULIB_MBSLEN''@|$(GNULIB_MBSLEN)|g' \ -e 's|@''GNULIB_MBSNLEN''@|$(GNULIB_MBSNLEN)|g' \ -e 's|@''GNULIB_MBSCHR''@|$(GNULIB_MBSCHR)|g' \ -e 's|@''GNULIB_MBSRCHR''@|$(GNULIB_MBSRCHR)|g' \ -e 's|@''GNULIB_MBSSTR''@|$(GNULIB_MBSSTR)|g' \ -e 's|@''GNULIB_MBSCASECMP''@|$(GNULIB_MBSCASECMP)|g' \ -e 's|@''GNULIB_MBSNCASECMP''@|$(GNULIB_MBSNCASECMP)|g' \ -e 's|@''GNULIB_MBSPCASECMP''@|$(GNULIB_MBSPCASECMP)|g' \ -e 's|@''GNULIB_MBSCASESTR''@|$(GNULIB_MBSCASESTR)|g' \ -e 's|@''GNULIB_MBSCSPN''@|$(GNULIB_MBSCSPN)|g' \ -e 's|@''GNULIB_MBSPBRK''@|$(GNULIB_MBSPBRK)|g' \ -e 's|@''GNULIB_MBSSPN''@|$(GNULIB_MBSSPN)|g' \ -e 's|@''GNULIB_MBSSEP''@|$(GNULIB_MBSSEP)|g' \ -e 's|@''GNULIB_MBSTOK_R''@|$(GNULIB_MBSTOK_R)|g' \ -e 's|@''GNULIB_MEMCHR''@|$(GNULIB_MEMCHR)|g' \ -e 's|@''GNULIB_MEMMEM''@|$(GNULIB_MEMMEM)|g' \ -e 's|@''GNULIB_MEMPCPY''@|$(GNULIB_MEMPCPY)|g' \ -e 's|@''GNULIB_MEMRCHR''@|$(GNULIB_MEMRCHR)|g' \ -e 's|@''GNULIB_RAWMEMCHR''@|$(GNULIB_RAWMEMCHR)|g' \ -e 's|@''GNULIB_STPCPY''@|$(GNULIB_STPCPY)|g' \ -e 's|@''GNULIB_STPNCPY''@|$(GNULIB_STPNCPY)|g' \ -e 's|@''GNULIB_STRCHRNUL''@|$(GNULIB_STRCHRNUL)|g' \ -e 's|@''GNULIB_STRDUP''@|$(GNULIB_STRDUP)|g' \ -e 's|@''GNULIB_STRNDUP''@|$(GNULIB_STRNDUP)|g' \ -e 's|@''GNULIB_STRNLEN''@|$(GNULIB_STRNLEN)|g' \ -e 's|@''GNULIB_STRPBRK''@|$(GNULIB_STRPBRK)|g' \ -e 's|@''GNULIB_STRSEP''@|$(GNULIB_STRSEP)|g' \ -e 's|@''GNULIB_STRSTR''@|$(GNULIB_STRSTR)|g' \ -e 's|@''GNULIB_STRCASESTR''@|$(GNULIB_STRCASESTR)|g' \ -e 's|@''GNULIB_STRTOK_R''@|$(GNULIB_STRTOK_R)|g' \ -e 's|@''GNULIB_STRERROR''@|$(GNULIB_STRERROR)|g' \ -e 's|@''GNULIB_STRSIGNAL''@|$(GNULIB_STRSIGNAL)|g' \ -e 's|@''GNULIB_STRVERSCMP''@|$(GNULIB_STRVERSCMP)|g' \ < $(srcdir)/string.in.h | \ sed -e 's|@''HAVE_MBSLEN''@|$(HAVE_MBSLEN)|g' \ -e 's|@''HAVE_DECL_MEMMEM''@|$(HAVE_DECL_MEMMEM)|g' \ -e 's|@''HAVE_MEMPCPY''@|$(HAVE_MEMPCPY)|g' \ -e 's|@''HAVE_DECL_MEMRCHR''@|$(HAVE_DECL_MEMRCHR)|g' \ -e 's|@''HAVE_RAWMEMCHR''@|$(HAVE_RAWMEMCHR)|g' \ -e 's|@''HAVE_STPCPY''@|$(HAVE_STPCPY)|g' \ -e 's|@''HAVE_STPNCPY''@|$(HAVE_STPNCPY)|g' \ -e 's|@''HAVE_STRCHRNUL''@|$(HAVE_STRCHRNUL)|g' \ -e 's|@''HAVE_DECL_STRDUP''@|$(HAVE_DECL_STRDUP)|g' \ -e 's|@''HAVE_DECL_STRNDUP''@|$(HAVE_DECL_STRNDUP)|g' \ -e 's|@''HAVE_DECL_STRNLEN''@|$(HAVE_DECL_STRNLEN)|g' \ -e 's|@''HAVE_STRPBRK''@|$(HAVE_STRPBRK)|g' \ -e 's|@''HAVE_STRSEP''@|$(HAVE_STRSEP)|g' \ -e 's|@''HAVE_STRCASESTR''@|$(HAVE_STRCASESTR)|g' \ -e 's|@''HAVE_DECL_STRTOK_R''@|$(HAVE_DECL_STRTOK_R)|g' \ -e 's|@''HAVE_DECL_STRERROR''@|$(HAVE_DECL_STRERROR)|g' \ -e 's|@''HAVE_DECL_STRSIGNAL''@|$(HAVE_DECL_STRSIGNAL)|g' \ -e 's|@''HAVE_STRVERSCMP''@|$(HAVE_STRVERSCMP)|g' \ -e 's|@''REPLACE_MEMCHR''@|$(REPLACE_MEMCHR)|g' \ -e 's|@''REPLACE_MEMMEM''@|$(REPLACE_MEMMEM)|g' \ -e 's|@''REPLACE_STRCASESTR''@|$(REPLACE_STRCASESTR)|g' \ -e 's|@''REPLACE_STRDUP''@|$(REPLACE_STRDUP)|g' \ -e 's|@''REPLACE_STRSTR''@|$(REPLACE_STRSTR)|g' \ -e 's|@''REPLACE_STRERROR''@|$(REPLACE_STRERROR)|g' \ -e 's|@''REPLACE_STRNDUP''@|$(REPLACE_STRNDUP)|g' \ -e 's|@''REPLACE_STRSIGNAL''@|$(REPLACE_STRSIGNAL)|g' \ -e 's|@''REPLACE_STRTOK_R''@|$(REPLACE_STRTOK_R)|g' \ -e 's|@''UNDEFINE_STRTOK_R''@|$(UNDEFINE_STRTOK_R)|g' \ -e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \ -e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)'; \ < $(srcdir)/string.in.h; \ } > $@-t && \ mv $@-t $@ # We need the following in order to create when the system # doesn't have one that works with the given compiler. strings.h: strings.in.h $(WARN_ON_USE_H) $(ARG_NONNULL_H) $(AM_V_GEN)rm -f $@-t $@ && \ { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */' && \ sed -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \ -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ -e 's|@''NEXT_STRINGS_H''@|$(NEXT_STRINGS_H)|g' \ -e 's|@''HAVE_STRCASECMP''@|$(HAVE_STRCASECMP)|g' \ -e 's|@''HAVE_DECL_STRNCASECMP''@|$(HAVE_DECL_STRNCASECMP)|g' \ -e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \ -e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)' \ < $(srcdir)/strings.in.h; \ } > $@-t && \ mv $@-t $@ # We need the following in order to create when the system # does not have a complete one. sys/ioctl.h: sys_ioctl.in.h $(WARN_ON_USE_H) $(AM_V_at)$(MKDIR_P) sys $(AM_V_GEN)rm -f $@-t $@ && \ { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \ sed -e 's|@''HAVE_SYS_IOCTL_H''@|$(HAVE_SYS_IOCTL_H)|g' \ -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \ -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ -e 's|@''NEXT_SYS_IOCTL_H''@|$(NEXT_SYS_IOCTL_H)|g' \ -e 's|@''GNULIB_IOCTL''@|$(GNULIB_IOCTL)|g' \ -e 's|@''SYS_IOCTL_H_HAVE_WINSOCK2_H''@|$(SYS_IOCTL_H_HAVE_WINSOCK2_H)|g' \ -e 's|@''SYS_IOCTL_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS''@|$(SYS_IOCTL_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS)|g' \ -e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)' \ < $(srcdir)/sys_ioctl.in.h; \ } > $@-t && \ mv $@-t $@ # We need the following in order to create when the system # doesn't have one that works with the given compiler. sys/select.h: sys_select.in.h $(WARN_ON_USE_H) $(AM_V_at)$(MKDIR_P) sys $(AM_V_GEN)rm -f $@-t $@ && \ { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \ sed -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \ -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ -e 's|@''NEXT_SYS_SELECT_H''@|$(NEXT_SYS_SELECT_H)|g' \ -e 's|@''HAVE_SYS_SELECT_H''@|$(HAVE_SYS_SELECT_H)|g' \ -e 's|@''GNULIB_SELECT''@|$(GNULIB_SELECT)|g' \ -e 's|@''HAVE_WINSOCK2_H''@|$(HAVE_WINSOCK2_H)|g' \ -e 's|@''REPLACE_SELECT''@|$(REPLACE_SELECT)|g' \ -e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)' \ < $(srcdir)/sys_select.in.h; \ } > $@-t && \ mv $@-t $@ # We need the following in order to create when the system # doesn't have one that works with the given compiler. sys/socket.h: sys_socket.in.h $(WARN_ON_USE_H) $(ARG_NONNULL_H) $(AM_V_at)$(MKDIR_P) sys $(AM_V_GEN)rm -f $@-t $@ && \ { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \ sed -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \ -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ -e 's|@''NEXT_SYS_SOCKET_H''@|$(NEXT_SYS_SOCKET_H)|g' \ -e 's|@''HAVE_SYS_SOCKET_H''@|$(HAVE_SYS_SOCKET_H)|g' \ -e 's|@''GNULIB_CLOSE''@|$(GNULIB_CLOSE)|g' \ -e 's|@''GNULIB_SOCKET''@|$(GNULIB_SOCKET)|g' \ -e 's|@''GNULIB_CONNECT''@|$(GNULIB_CONNECT)|g' \ -e 's|@''GNULIB_ACCEPT''@|$(GNULIB_ACCEPT)|g' \ -e 's|@''GNULIB_BIND''@|$(GNULIB_BIND)|g' \ -e 's|@''GNULIB_GETPEERNAME''@|$(GNULIB_GETPEERNAME)|g' \ -e 's|@''GNULIB_GETSOCKNAME''@|$(GNULIB_GETSOCKNAME)|g' \ -e 's|@''GNULIB_GETSOCKOPT''@|$(GNULIB_GETSOCKOPT)|g' \ -e 's|@''GNULIB_LISTEN''@|$(GNULIB_LISTEN)|g' \ -e 's|@''GNULIB_RECV''@|$(GNULIB_RECV)|g' \ -e 's|@''GNULIB_SEND''@|$(GNULIB_SEND)|g' \ -e 's|@''GNULIB_RECVFROM''@|$(GNULIB_RECVFROM)|g' \ -e 's|@''GNULIB_SENDTO''@|$(GNULIB_SENDTO)|g' \ -e 's|@''GNULIB_SETSOCKOPT''@|$(GNULIB_SETSOCKOPT)|g' \ -e 's|@''GNULIB_SHUTDOWN''@|$(GNULIB_SHUTDOWN)|g' \ -e 's|@''GNULIB_ACCEPT4''@|$(GNULIB_ACCEPT4)|g' \ -e 's|@''HAVE_WINSOCK2_H''@|$(HAVE_WINSOCK2_H)|g' \ -e 's|@''HAVE_WS2TCPIP_H''@|$(HAVE_WS2TCPIP_H)|g' \ -e 's|@''HAVE_STRUCT_SOCKADDR_STORAGE''@|$(HAVE_STRUCT_SOCKADDR_STORAGE)|g' \ -e 's|@''HAVE_SA_FAMILY_T''@|$(HAVE_SA_FAMILY_T)|g' \ -e 's|@''HAVE_ACCEPT4''@|$(HAVE_ACCEPT4)|g' \ -e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \ -e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)' \ < $(srcdir)/sys_socket.in.h; \ } > $@-t && \ mv -f $@-t $@ # We need the following in order to create when the system # has one that is incomplete. sys/stat.h: sys_stat.in.h $(WARN_ON_USE_H) $(ARG_NONNULL_H) $(AM_V_at)$(MKDIR_P) sys $(AM_V_GEN)rm -f $@-t $@ && \ { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \ sed -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \ -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ -e 's|@''NEXT_SYS_STAT_H''@|$(NEXT_SYS_STAT_H)|g' \ -e 's|@''GNULIB_FCHMODAT''@|$(GNULIB_FCHMODAT)|g' \ -e 's|@''GNULIB_FSTATAT''@|$(GNULIB_FSTATAT)|g' \ -e 's|@''GNULIB_FUTIMENS''@|$(GNULIB_FUTIMENS)|g' \ -e 's|@''GNULIB_LCHMOD''@|$(GNULIB_LCHMOD)|g' \ -e 's|@''GNULIB_LSTAT''@|$(GNULIB_LSTAT)|g' \ -e 's|@''GNULIB_MKDIRAT''@|$(GNULIB_MKDIRAT)|g' \ -e 's|@''GNULIB_MKFIFO''@|$(GNULIB_MKFIFO)|g' \ -e 's|@''GNULIB_MKFIFOAT''@|$(GNULIB_MKFIFOAT)|g' \ -e 's|@''GNULIB_MKNOD''@|$(GNULIB_MKNOD)|g' \ -e 's|@''GNULIB_MKNODAT''@|$(GNULIB_MKNODAT)|g' \ -e 's|@''GNULIB_STAT''@|$(GNULIB_STAT)|g' \ -e 's|@''GNULIB_UTIMENSAT''@|$(GNULIB_UTIMENSAT)|g' \ -e 's|@''HAVE_FCHMODAT''@|$(HAVE_FCHMODAT)|g' \ -e 's|@''HAVE_FSTATAT''@|$(HAVE_FSTATAT)|g' \ -e 's|@''HAVE_FUTIMENS''@|$(HAVE_FUTIMENS)|g' \ -e 's|@''HAVE_LCHMOD''@|$(HAVE_LCHMOD)|g' \ -e 's|@''HAVE_LSTAT''@|$(HAVE_LSTAT)|g' \ -e 's|@''HAVE_MKDIRAT''@|$(HAVE_MKDIRAT)|g' \ -e 's|@''HAVE_MKFIFO''@|$(HAVE_MKFIFO)|g' \ -e 's|@''HAVE_MKFIFOAT''@|$(HAVE_MKFIFOAT)|g' \ -e 's|@''HAVE_MKNOD''@|$(HAVE_MKNOD)|g' \ -e 's|@''HAVE_MKNODAT''@|$(HAVE_MKNODAT)|g' \ -e 's|@''HAVE_UTIMENSAT''@|$(HAVE_UTIMENSAT)|g' \ -e 's|@''REPLACE_FSTAT''@|$(REPLACE_FSTAT)|g' \ -e 's|@''REPLACE_FSTATAT''@|$(REPLACE_FSTATAT)|g' \ -e 's|@''REPLACE_FUTIMENS''@|$(REPLACE_FUTIMENS)|g' \ -e 's|@''REPLACE_LSTAT''@|$(REPLACE_LSTAT)|g' \ -e 's|@''REPLACE_MKDIR''@|$(REPLACE_MKDIR)|g' \ -e 's|@''REPLACE_MKFIFO''@|$(REPLACE_MKFIFO)|g' \ -e 's|@''REPLACE_MKNOD''@|$(REPLACE_MKNOD)|g' \ -e 's|@''REPLACE_STAT''@|$(REPLACE_STAT)|g' \ -e 's|@''REPLACE_UTIMENSAT''@|$(REPLACE_UTIMENSAT)|g' \ -e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \ -e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)' \ < $(srcdir)/sys_stat.in.h; \ } > $@-t && \ mv $@-t $@ # We need the following in order to create when the system # doesn't have one that works with the given compiler. sys/time.h: sys_time.in.h $(WARN_ON_USE_H) $(ARG_NONNULL_H) $(AM_V_at)$(MKDIR_P) sys $(AM_V_GEN)rm -f $@-t $@ && \ { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \ sed -e 's/@''HAVE_SYS_TIME_H''@/$(HAVE_SYS_TIME_H)/g' \ -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \ -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ -e 's|@''NEXT_SYS_TIME_H''@|$(NEXT_SYS_TIME_H)|g' \ -e 's/@''GNULIB_GETTIMEOFDAY''@/$(GNULIB_GETTIMEOFDAY)/g' \ -e 's/@''HAVE_STRUCT_TIMEVAL''@/$(HAVE_STRUCT_TIMEVAL)/g' \ -e 's/@''REPLACE_GETTIMEOFDAY''@/$(REPLACE_GETTIMEOFDAY)/g' \ -e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \ -e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)' \ < $(srcdir)/sys_time.in.h; \ } > $@-t && \ mv $@-t $@ # We need the following in order to create when the system # does not have one. sys/utsname.h: sys_utsname.in.h $(WARN_ON_USE_H) $(ARG_NONNULL_H) $(AM_V_at)$(MKDIR_P) sys $(AM_V_GEN)rm -f $@-t $@ && \ { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \ sed -e 's/@''HAVE_SYS_UTSNAME_H''@/$(HAVE_SYS_UTSNAME_H)/g' \ -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \ -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ -e 's|@''NEXT_SYS_UTSNAME_H''@|$(NEXT_SYS_UTSNAME_H)|g' \ -e 's|@''GNULIB_UNAME''@|$(GNULIB_UNAME)|g' \ -e 's|@''HAVE_STRUCT_UTSNAME''@|$(HAVE_STRUCT_UTSNAME)|g' \ -e 's|@''HAVE_UNAME''@|$(HAVE_UNAME)|g' \ -e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \ -e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)' \ < $(srcdir)/sys_utsname.in.h; \ } > $@-t && \ mv $@-t $@ # We need the following in order to create when the system # doesn't have one that works with the given compiler. time.h: time.in.h $(ARG_NONNULL_H) $(AM_V_GEN)rm -f $@-t $@ && \ { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */' && \ sed -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \ -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ -e 's|@NEXT_TIME_H''@|$(NEXT_TIME_H)|g' \ -e 's|@REPLACE_LOCALTIME_R''@|$(REPLACE_LOCALTIME_R)|g' \ -e 's|@REPLACE_MKTIME''@|$(REPLACE_MKTIME)|g' \ -e 's|@REPLACE_NANOSLEEP''@|$(REPLACE_NANOSLEEP)|g' \ -e 's|@REPLACE_STRPTIME''@|$(REPLACE_STRPTIME)|g' \ -e 's|@REPLACE_TIMEGM''@|$(REPLACE_TIMEGM)|g' \ -e 's|@SYS_TIME_H_DEFINES_STRUCT_TIMESPEC''@|$(SYS_TIME_H_DEFINES_STRUCT_TIMESPEC)|g' \ -e 's|@TIME_H_DEFINES_STRUCT_TIMESPEC''@|$(TIME_H_DEFINES_STRUCT_TIMESPEC)|g' \ -e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \ < $(srcdir)/time.in.h; \ } > $@-t && \ mv $@-t $@ # We need the following in order to create an empty placeholder for # when the system doesn't have one. unistd.h: unistd.in.h $(WARN_ON_USE_H) $(ARG_NONNULL_H) $(AM_V_GEN)rm -f $@-t $@ && \ { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \ sed -e 's|@''HAVE_UNISTD_H''@|$(HAVE_UNISTD_H)|g' \ -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \ -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ -e 's|@''NEXT_UNISTD_H''@|$(NEXT_UNISTD_H)|g' \ -e 's|@''GNULIB_CHOWN''@|$(GNULIB_CHOWN)|g' \ -e 's|@''GNULIB_CLOSE''@|$(GNULIB_CLOSE)|g' \ -e 's|@''GNULIB_DUP2''@|$(GNULIB_DUP2)|g' \ -e 's|@''GNULIB_DUP3''@|$(GNULIB_DUP3)|g' \ -e 's|@''GNULIB_ENVIRON''@|$(GNULIB_ENVIRON)|g' \ -e 's|@''GNULIB_EUIDACCESS''@|$(GNULIB_EUIDACCESS)|g' \ -e 's|@''GNULIB_FACCESSAT''@|$(GNULIB_FACCESSAT)|g' \ -e 's|@''GNULIB_FCHDIR''@|$(GNULIB_FCHDIR)|g' \ -e 's|@''GNULIB_FCHOWNAT''@|$(GNULIB_FCHOWNAT)|g' \ -e 's|@''GNULIB_FSYNC''@|$(GNULIB_FSYNC)|g' \ -e 's|@''GNULIB_FTRUNCATE''@|$(GNULIB_FTRUNCATE)|g' \ -e 's|@''GNULIB_GETCWD''@|$(GNULIB_GETCWD)|g' \ -e 's|@''GNULIB_GETDOMAINNAME''@|$(GNULIB_GETDOMAINNAME)|g' \ -e 's|@''GNULIB_GETDTABLESIZE''@|$(GNULIB_GETDTABLESIZE)|g' \ -e 's|@''GNULIB_GETGROUPS''@|$(GNULIB_GETGROUPS)|g' \ -e 's|@''GNULIB_GETHOSTNAME''@|$(GNULIB_GETHOSTNAME)|g' \ -e 's|@''GNULIB_GETLOGIN''@|$(GNULIB_GETLOGIN)|g' \ -e 's|@''GNULIB_GETLOGIN_R''@|$(GNULIB_GETLOGIN_R)|g' \ -e 's|@''GNULIB_GETPAGESIZE''@|$(GNULIB_GETPAGESIZE)|g' \ -e 's|@''GNULIB_GETUSERSHELL''@|$(GNULIB_GETUSERSHELL)|g' \ -e 's|@''GNULIB_LCHOWN''@|$(GNULIB_LCHOWN)|g' \ -e 's|@''GNULIB_LINK''@|$(GNULIB_LINK)|g' \ -e 's|@''GNULIB_LINKAT''@|$(GNULIB_LINKAT)|g' \ -e 's|@''GNULIB_LSEEK''@|$(GNULIB_LSEEK)|g' \ -e 's|@''GNULIB_PIPE2''@|$(GNULIB_PIPE2)|g' \ -e 's|@''GNULIB_PREAD''@|$(GNULIB_PREAD)|g' \ -e 's|@''GNULIB_READLINK''@|$(GNULIB_READLINK)|g' \ -e 's|@''GNULIB_READLINKAT''@|$(GNULIB_READLINKAT)|g' \ -e 's|@''GNULIB_RMDIR''@|$(GNULIB_RMDIR)|g' \ -e 's|@''GNULIB_SLEEP''@|$(GNULIB_SLEEP)|g' \ -e 's|@''GNULIB_SYMLINK''@|$(GNULIB_SYMLINK)|g' \ -e 's|@''GNULIB_SYMLINKAT''@|$(GNULIB_SYMLINKAT)|g' \ -e 's|@''GNULIB_UNISTD_H_GETOPT''@|$(GNULIB_UNISTD_H_GETOPT)|g' \ -e 's|@''GNULIB_UNISTD_H_SIGPIPE''@|$(GNULIB_UNISTD_H_SIGPIPE)|g' \ -e 's|@''GNULIB_UNLINK''@|$(GNULIB_UNLINK)|g' \ -e 's|@''GNULIB_UNLINKAT''@|$(GNULIB_UNLINKAT)|g' \ -e 's|@''GNULIB_USLEEP''@|$(GNULIB_USLEEP)|g' \ -e 's|@''GNULIB_WRITE''@|$(GNULIB_WRITE)|g' \ < $(srcdir)/unistd.in.h | \ sed -e 's|@''HAVE_CHOWN''@|$(HAVE_CHOWN)|g' \ -e 's|@''HAVE_DUP2''@|$(HAVE_DUP2)|g' \ -e 's|@''HAVE_DUP3''@|$(HAVE_DUP3)|g' \ -e 's|@''HAVE_EUIDACCESS''@|$(HAVE_EUIDACCESS)|g' \ -e 's|@''HAVE_FACCESSAT''@|$(HAVE_FACCESSAT)|g' \ -e 's|@''HAVE_FCHOWNAT''@|$(HAVE_FCHOWNAT)|g' \ -e 's|@''HAVE_FSYNC''@|$(HAVE_FSYNC)|g' \ -e 's|@''HAVE_FTRUNCATE''@|$(HAVE_FTRUNCATE)|g' \ -e 's|@''HAVE_GETDOMAINNAME''@|$(HAVE_GETDOMAINNAME)|g' \ -e 's|@''HAVE_GETDTABLESIZE''@|$(HAVE_GETDTABLESIZE)|g' \ -e 's|@''HAVE_GETGROUPS''@|$(HAVE_GETGROUPS)|g' \ -e 's|@''HAVE_GETHOSTNAME''@|$(HAVE_GETHOSTNAME)|g' \ -e 's|@''HAVE_GETLOGIN''@|$(HAVE_GETLOGIN)|g' \ -e 's|@''HAVE_GETPAGESIZE''@|$(HAVE_GETPAGESIZE)|g' \ -e 's|@''HAVE_GETUSERSHELL''@|$(HAVE_GETUSERSHELL)|g' \ -e 's|@''HAVE_LCHOWN''@|$(HAVE_LCHOWN)|g' \ -e 's|@''HAVE_LINK''@|$(HAVE_LINK)|g' \ -e 's|@''HAVE_LINKAT''@|$(HAVE_LINKAT)|g' \ -e 's|@''HAVE_PIPE2''@|$(HAVE_PIPE2)|g' \ -e 's|@''HAVE_PREAD''@|$(HAVE_PREAD)|g' \ -e 's|@''HAVE_READLINK''@|$(HAVE_READLINK)|g' \ -e 's|@''HAVE_READLINKAT''@|$(HAVE_READLINKAT)|g' \ -e 's|@''HAVE_SLEEP''@|$(HAVE_SLEEP)|g' \ -e 's|@''HAVE_SYMLINK''@|$(HAVE_SYMLINK)|g' \ -e 's|@''HAVE_SYMLINKAT''@|$(HAVE_SYMLINKAT)|g' \ -e 's|@''HAVE_UNLINKAT''@|$(HAVE_UNLINKAT)|g' \ -e 's|@''HAVE_USLEEP''@|$(HAVE_USLEEP)|g' \ -e 's|@''HAVE_DECL_ENVIRON''@|$(HAVE_DECL_ENVIRON)|g' \ -e 's|@''HAVE_DECL_GETLOGIN_R''@|$(HAVE_DECL_GETLOGIN_R)|g' \ -e 's|@''HAVE_OS_H''@|$(HAVE_OS_H)|g' \ -e 's|@''HAVE_SYS_PARAM_H''@|$(HAVE_SYS_PARAM_H)|g' \ -e 's|@''REPLACE_CHOWN''@|$(REPLACE_CHOWN)|g' \ -e 's|@''REPLACE_CLOSE''@|$(REPLACE_CLOSE)|g' \ -e 's|@''REPLACE_DUP''@|$(REPLACE_DUP)|g' \ -e 's|@''REPLACE_DUP2''@|$(REPLACE_DUP2)|g' \ -e 's|@''REPLACE_FCHDIR''@|$(REPLACE_FCHDIR)|g' \ -e 's|@''REPLACE_FCHOWNAT''@|$(REPLACE_FCHOWNAT)|g' \ -e 's|@''REPLACE_GETCWD''@|$(REPLACE_GETCWD)|g' \ -e 's|@''REPLACE_GETGROUPS''@|$(REPLACE_GETGROUPS)|g' \ -e 's|@''REPLACE_GETPAGESIZE''@|$(REPLACE_GETPAGESIZE)|g' \ -e 's|@''REPLACE_LCHOWN''@|$(REPLACE_LCHOWN)|g' \ -e 's|@''REPLACE_LINK''@|$(REPLACE_LINK)|g' \ -e 's|@''REPLACE_LINKAT''@|$(REPLACE_LINKAT)|g' \ -e 's|@''REPLACE_LSEEK''@|$(REPLACE_LSEEK)|g' \ -e 's|@''REPLACE_PREAD''@|$(REPLACE_PREAD)|g' \ -e 's|@''REPLACE_READLINK''@|$(REPLACE_READLINK)|g' \ -e 's|@''REPLACE_RMDIR''@|$(REPLACE_RMDIR)|g' \ -e 's|@''REPLACE_SLEEP''@|$(REPLACE_SLEEP)|g' \ -e 's|@''REPLACE_SYMLINK''@|$(REPLACE_SYMLINK)|g' \ -e 's|@''REPLACE_UNLINK''@|$(REPLACE_UNLINK)|g' \ -e 's|@''REPLACE_UNLINKAT''@|$(REPLACE_UNLINKAT)|g' \ -e 's|@''REPLACE_USLEEP''@|$(REPLACE_USLEEP)|g' \ -e 's|@''REPLACE_WRITE''@|$(REPLACE_WRITE)|g' \ -e 's|@''UNISTD_H_HAVE_WINSOCK2_H''@|$(UNISTD_H_HAVE_WINSOCK2_H)|g' \ -e 's|@''UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS''@|$(UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS)|g' \ -e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \ -e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)'; \ } > $@-t && \ mv $@-t $@ # The warn-on-use.h that gets inserted into generated .h files is the same as # build-aux/warn-on-use.h, except that it has the copyright header cut off. warn-on-use.h: $(top_srcdir)/./warn-on-use.h $(AM_V_GEN)rm -f $@-t $@ && \ sed -n -e '/^.ifndef/,$$p' \ < $(top_srcdir)/./warn-on-use.h \ > $@-t && \ mv $@-t $@ # We need the following in order to create when the system # version does not work standalone. wchar.h: wchar.in.h $(WARN_ON_USE_H) $(ARG_NONNULL_H) $(AM_V_GEN)rm -f $@-t $@ && \ { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \ sed -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \ -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ -e 's|@''NEXT_WCHAR_H''@|$(NEXT_WCHAR_H)|g' \ -e 's|@''HAVE_WCHAR_H''@|$(HAVE_WCHAR_H)|g' \ -e 's|@''GNULIB_BTOWC''@|$(GNULIB_BTOWC)|g' \ -e 's|@''GNULIB_WCTOB''@|$(GNULIB_WCTOB)|g' \ -e 's|@''GNULIB_MBSINIT''@|$(GNULIB_MBSINIT)|g' \ -e 's|@''GNULIB_MBRTOWC''@|$(GNULIB_MBRTOWC)|g' \ -e 's|@''GNULIB_MBRLEN''@|$(GNULIB_MBRLEN)|g' \ -e 's|@''GNULIB_MBSRTOWCS''@|$(GNULIB_MBSRTOWCS)|g' \ -e 's|@''GNULIB_MBSNRTOWCS''@|$(GNULIB_MBSNRTOWCS)|g' \ -e 's|@''GNULIB_WCRTOMB''@|$(GNULIB_WCRTOMB)|g' \ -e 's|@''GNULIB_WCSRTOMBS''@|$(GNULIB_WCSRTOMBS)|g' \ -e 's|@''GNULIB_WCSNRTOMBS''@|$(GNULIB_WCSNRTOMBS)|g' \ -e 's|@''GNULIB_WCWIDTH''@|$(GNULIB_WCWIDTH)|g' \ -e 's|@''HAVE_WINT_T''@|$(HAVE_WINT_T)|g' \ -e 's|@''HAVE_BTOWC''@|$(HAVE_BTOWC)|g' \ -e 's|@''HAVE_MBSINIT''@|$(HAVE_MBSINIT)|g' \ -e 's|@''HAVE_MBRTOWC''@|$(HAVE_MBRTOWC)|g' \ -e 's|@''HAVE_MBRLEN''@|$(HAVE_MBRLEN)|g' \ -e 's|@''HAVE_MBSRTOWCS''@|$(HAVE_MBSRTOWCS)|g' \ -e 's|@''HAVE_MBSNRTOWCS''@|$(HAVE_MBSNRTOWCS)|g' \ -e 's|@''HAVE_WCRTOMB''@|$(HAVE_WCRTOMB)|g' \ -e 's|@''HAVE_WCSRTOMBS''@|$(HAVE_WCSRTOMBS)|g' \ -e 's|@''HAVE_WCSNRTOMBS''@|$(HAVE_WCSNRTOMBS)|g' \ -e 's|@''HAVE_DECL_WCTOB''@|$(HAVE_DECL_WCTOB)|g' \ -e 's|@''HAVE_DECL_WCWIDTH''@|$(HAVE_DECL_WCWIDTH)|g' \ -e 's|@''REPLACE_MBSTATE_T''@|$(REPLACE_MBSTATE_T)|g' \ -e 's|@''REPLACE_BTOWC''@|$(REPLACE_BTOWC)|g' \ -e 's|@''REPLACE_WCTOB''@|$(REPLACE_WCTOB)|g' \ -e 's|@''REPLACE_MBSINIT''@|$(REPLACE_MBSINIT)|g' \ -e 's|@''REPLACE_MBRTOWC''@|$(REPLACE_MBRTOWC)|g' \ -e 's|@''REPLACE_MBRLEN''@|$(REPLACE_MBRLEN)|g' \ -e 's|@''REPLACE_MBSRTOWCS''@|$(REPLACE_MBSRTOWCS)|g' \ -e 's|@''REPLACE_MBSNRTOWCS''@|$(REPLACE_MBSNRTOWCS)|g' \ -e 's|@''REPLACE_WCRTOMB''@|$(REPLACE_WCRTOMB)|g' \ -e 's|@''REPLACE_WCSRTOMBS''@|$(REPLACE_WCSRTOMBS)|g' \ -e 's|@''REPLACE_WCSNRTOMBS''@|$(REPLACE_WCSNRTOMBS)|g' \ -e 's|@''REPLACE_WCWIDTH''@|$(REPLACE_WCWIDTH)|g' \ -e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \ -e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)' \ < $(srcdir)/wchar.in.h; \ } > $@-t && \ mv $@-t $@ # We need the following in order to create when the system # doesn't have one that works with the given compiler. wctype.h: wctype.in.h $(AM_V_GEN)rm -f $@-t $@ && \ { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \ sed -e 's/@''HAVE_WCTYPE_H''@/$(HAVE_WCTYPE_H)/g' \ -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \ -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ -e 's|@''NEXT_WCTYPE_H''@|$(NEXT_WCTYPE_H)|g' \ -e 's/@''HAVE_ISWCNTRL''@/$(HAVE_ISWCNTRL)/g' \ -e 's/@''HAVE_WINT_T''@/$(HAVE_WINT_T)/g' \ -e 's/@''REPLACE_ISWCNTRL''@/$(REPLACE_ISWCNTRL)/g' \ < $(srcdir)/wctype.in.h; \ } > $@-t && \ mv $@-t $@ mostlyclean-local: mostlyclean-generic @for dir in '' $(MOSTLYCLEANDIRS); do \ if test -n "$$dir" && test -d $$dir; then \ echo "rmdir $$dir"; rmdir $$dir; \ fi; \ done; \ : # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: libprelude-1.0.0/libmissing/relocatable.c0000664000076400007640000003672011341220437015360 00000000000000/* Provide relocatable packages. Copyright (C) 2003-2006, 2008-2010 Free Software Foundation, Inc. Written by Bruno Haible , 2003. This program is free software; you can redistribute it and/or modify it under the terms of the GNU Library 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 Library General Public License for more details. You should have received a copy of the GNU Library General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ /* Tell glibc's to provide a prototype for getline(). This must come before because may include , and once has been included, it's too late. */ #ifndef _GNU_SOURCE # define _GNU_SOURCE 1 #endif #include /* Specification. */ #include "relocatable.h" #if ENABLE_RELOCATABLE #include #include #include #include #ifdef NO_XMALLOC # define xmalloc malloc #else # include "xalloc.h" #endif #if defined _WIN32 || defined __WIN32__ || defined __CYGWIN__ # define WIN32_LEAN_AND_MEAN # include #endif #if DEPENDS_ON_LIBCHARSET # include #endif #if DEPENDS_ON_LIBICONV && HAVE_ICONV # include #endif #if DEPENDS_ON_LIBINTL && ENABLE_NLS # include #endif /* Faked cheap 'bool'. */ #undef bool #undef false #undef true #define bool int #define false 0 #define true 1 /* Pathname support. ISSLASH(C) tests whether C is a directory separator character. IS_PATH_WITH_DIR(P) tests whether P contains a directory specification. */ #if defined _WIN32 || defined __WIN32__ || defined __CYGWIN__ || defined __EMX__ || defined __DJGPP__ /* Win32, Cygwin, OS/2, DOS */ # define ISSLASH(C) ((C) == '/' || (C) == '\\') # define HAS_DEVICE(P) \ ((((P)[0] >= 'A' && (P)[0] <= 'Z') || ((P)[0] >= 'a' && (P)[0] <= 'z')) \ && (P)[1] == ':') # define IS_PATH_WITH_DIR(P) \ (strchr (P, '/') != NULL || strchr (P, '\\') != NULL || HAS_DEVICE (P)) # define FILE_SYSTEM_PREFIX_LEN(P) (HAS_DEVICE (P) ? 2 : 0) #else /* Unix */ # define ISSLASH(C) ((C) == '/') # define IS_PATH_WITH_DIR(P) (strchr (P, '/') != NULL) # define FILE_SYSTEM_PREFIX_LEN(P) 0 #endif /* Original installation prefix. */ static char *orig_prefix; static size_t orig_prefix_len; /* Current installation prefix. */ static char *curr_prefix; static size_t curr_prefix_len; /* These prefixes do not end in a slash. Anything that will be concatenated to them must start with a slash. */ /* Sets the original and the current installation prefix of this module. Relocation simply replaces a pathname starting with the original prefix by the corresponding pathname with the current prefix instead. Both prefixes should be directory names without trailing slash (i.e. use "" instead of "/"). */ static void set_this_relocation_prefix (const char *orig_prefix_arg, const char *curr_prefix_arg) { if (orig_prefix_arg != NULL && curr_prefix_arg != NULL /* Optimization: if orig_prefix and curr_prefix are equal, the relocation is a nop. */ && strcmp (orig_prefix_arg, curr_prefix_arg) != 0) { /* Duplicate the argument strings. */ char *memory; orig_prefix_len = strlen (orig_prefix_arg); curr_prefix_len = strlen (curr_prefix_arg); memory = (char *) xmalloc (orig_prefix_len + 1 + curr_prefix_len + 1); #ifdef NO_XMALLOC if (memory != NULL) #endif { memcpy (memory, orig_prefix_arg, orig_prefix_len + 1); orig_prefix = memory; memory += orig_prefix_len + 1; memcpy (memory, curr_prefix_arg, curr_prefix_len + 1); curr_prefix = memory; return; } } orig_prefix = NULL; curr_prefix = NULL; /* Don't worry about wasted memory here - this function is usually only called once. */ } /* Sets the original and the current installation prefix of the package. Relocation simply replaces a pathname starting with the original prefix by the corresponding pathname with the current prefix instead. Both prefixes should be directory names without trailing slash (i.e. use "" instead of "/"). */ void set_relocation_prefix (const char *orig_prefix_arg, const char *curr_prefix_arg) { set_this_relocation_prefix (orig_prefix_arg, curr_prefix_arg); /* Now notify all dependent libraries. */ #if DEPENDS_ON_LIBCHARSET libcharset_set_relocation_prefix (orig_prefix_arg, curr_prefix_arg); #endif #if DEPENDS_ON_LIBICONV && HAVE_ICONV && _LIBICONV_VERSION >= 0x0109 libiconv_set_relocation_prefix (orig_prefix_arg, curr_prefix_arg); #endif #if DEPENDS_ON_LIBINTL && ENABLE_NLS && defined libintl_set_relocation_prefix libintl_set_relocation_prefix (orig_prefix_arg, curr_prefix_arg); #endif } #if !defined IN_LIBRARY || (defined PIC && defined INSTALLDIR) /* Convenience function: Computes the current installation prefix, based on the original installation prefix, the original installation directory of a particular file, and the current pathname of this file. Returns it, freshly allocated. Returns NULL upon failure. */ #ifdef IN_LIBRARY #define compute_curr_prefix local_compute_curr_prefix static #endif char * compute_curr_prefix (const char *orig_installprefix, const char *orig_installdir, const char *curr_pathname) { char *curr_installdir; const char *rel_installdir; if (curr_pathname == NULL) return NULL; /* Determine the relative installation directory, relative to the prefix. This is simply the difference between orig_installprefix and orig_installdir. */ if (strncmp (orig_installprefix, orig_installdir, strlen (orig_installprefix)) != 0) /* Shouldn't happen - nothing should be installed outside $(prefix). */ return NULL; rel_installdir = orig_installdir + strlen (orig_installprefix); /* Determine the current installation directory. */ { const char *p_base = curr_pathname + FILE_SYSTEM_PREFIX_LEN (curr_pathname); const char *p = curr_pathname + strlen (curr_pathname); char *q; while (p > p_base) { p--; if (ISSLASH (*p)) break; } q = (char *) xmalloc (p - curr_pathname + 1); #ifdef NO_XMALLOC if (q == NULL) return NULL; #endif memcpy (q, curr_pathname, p - curr_pathname); q[p - curr_pathname] = '\0'; curr_installdir = q; } /* Compute the current installation prefix by removing the trailing rel_installdir from it. */ { const char *rp = rel_installdir + strlen (rel_installdir); const char *cp = curr_installdir + strlen (curr_installdir); const char *cp_base = curr_installdir + FILE_SYSTEM_PREFIX_LEN (curr_installdir); while (rp > rel_installdir && cp > cp_base) { bool same = false; const char *rpi = rp; const char *cpi = cp; while (rpi > rel_installdir && cpi > cp_base) { rpi--; cpi--; if (ISSLASH (*rpi) || ISSLASH (*cpi)) { if (ISSLASH (*rpi) && ISSLASH (*cpi)) same = true; break; } /* Do case-insensitive comparison if the file system is always or often case-insensitive. It's better to accept the comparison if the difference is only in case, rather than to fail. */ #if defined _WIN32 || defined __WIN32__ || defined __CYGWIN__ || defined __EMX__ || defined __DJGPP__ /* Win32, Cygwin, OS/2, DOS - case insignificant file system */ if ((*rpi >= 'a' && *rpi <= 'z' ? *rpi - 'a' + 'A' : *rpi) != (*cpi >= 'a' && *cpi <= 'z' ? *cpi - 'a' + 'A' : *cpi)) break; #else if (*rpi != *cpi) break; #endif } if (!same) break; /* The last pathname component was the same. opi and cpi now point to the slash before it. */ rp = rpi; cp = cpi; } if (rp > rel_installdir) { /* Unexpected: The curr_installdir does not end with rel_installdir. */ free (curr_installdir); return NULL; } { size_t curr_prefix_len = cp - curr_installdir; char *curr_prefix; curr_prefix = (char *) xmalloc (curr_prefix_len + 1); #ifdef NO_XMALLOC if (curr_prefix == NULL) { free (curr_installdir); return NULL; } #endif memcpy (curr_prefix, curr_installdir, curr_prefix_len); curr_prefix[curr_prefix_len] = '\0'; free (curr_installdir); return curr_prefix; } } } #endif /* !IN_LIBRARY || PIC */ #if defined PIC && defined INSTALLDIR /* Full pathname of shared library, or NULL. */ static char *shared_library_fullname; #if defined _WIN32 || defined __WIN32__ || defined __CYGWIN__ /* Determine the full pathname of the shared library when it is loaded. */ BOOL WINAPI DllMain (HINSTANCE module_handle, DWORD event, LPVOID reserved) { (void) reserved; if (event == DLL_PROCESS_ATTACH) { /* The DLL is being loaded into an application's address range. */ static char location[MAX_PATH]; if (!GetModuleFileName (module_handle, location, sizeof (location))) /* Shouldn't happen. */ return FALSE; if (!IS_PATH_WITH_DIR (location)) /* Shouldn't happen. */ return FALSE; { #if defined __CYGWIN__ /* On Cygwin, we need to convert paths coming from Win32 system calls to the Unix-like slashified notation. */ static char location_as_posix_path[2 * MAX_PATH]; /* There's no error return defined for cygwin_conv_to_posix_path. See cygwin-api/func-cygwin-conv-to-posix-path.html. Does it overflow the buffer of expected size MAX_PATH or does it truncate the path? I don't know. Let's catch both. */ cygwin_conv_to_posix_path (location, location_as_posix_path); location_as_posix_path[MAX_PATH - 1] = '\0'; if (strlen (location_as_posix_path) >= MAX_PATH - 1) /* A sign of buffer overflow or path truncation. */ return FALSE; shared_library_fullname = strdup (location_as_posix_path); #else shared_library_fullname = strdup (location); #endif } } return TRUE; } #else /* Unix except Cygwin */ static void find_shared_library_fullname () { #if defined __linux__ && __GLIBC__ >= 2 /* Linux has /proc/self/maps. glibc 2 has the getline() function. */ FILE *fp; /* Open the current process' maps file. It describes one VMA per line. */ fp = fopen ("/proc/self/maps", "r"); if (fp) { unsigned long address = (unsigned long) &find_shared_library_fullname; for (;;) { unsigned long start, end; int c; if (fscanf (fp, "%lx-%lx", &start, &end) != 2) break; if (address >= start && address <= end - 1) { /* Found it. Now see if this line contains a filename. */ while (c = getc (fp), c != EOF && c != '\n' && c != '/') continue; if (c == '/') { size_t size; int len; ungetc (c, fp); shared_library_fullname = NULL; size = 0; len = getline (&shared_library_fullname, &size, fp); if (len >= 0) { /* Success: filled shared_library_fullname. */ if (len > 0 && shared_library_fullname[len - 1] == '\n') shared_library_fullname[len - 1] = '\0'; } } break; } while (c = getc (fp), c != EOF && c != '\n') continue; } fclose (fp); } #endif } #endif /* (WIN32 or Cygwin) / (Unix except Cygwin) */ /* Return the full pathname of the current shared library. Return NULL if unknown. Guaranteed to work only on Linux, Cygwin and Woe32. */ static char * get_shared_library_fullname () { #if !(defined _WIN32 || defined __WIN32__ || defined __CYGWIN__) static bool tried_find_shared_library_fullname; if (!tried_find_shared_library_fullname) { find_shared_library_fullname (); tried_find_shared_library_fullname = true; } #endif return shared_library_fullname; } #endif /* PIC */ /* Returns the pathname, relocated according to the current installation directory. The returned string is either PATHNAME unmodified or a freshly allocated string that you can free with free() after casting it to 'char *'. */ const char * relocate (const char *pathname) { #if defined PIC && defined INSTALLDIR static int initialized; /* Initialization code for a shared library. */ if (!initialized) { /* At this point, orig_prefix and curr_prefix likely have already been set through the main program's set_program_name_and_installdir function. This is sufficient in the case that the library has initially been installed in the same orig_prefix. But we can do better, to also cover the cases that 1. it has been installed in a different prefix before being moved to orig_prefix and (later) to curr_prefix, 2. unlike the program, it has not moved away from orig_prefix. */ const char *orig_installprefix = INSTALLPREFIX; const char *orig_installdir = INSTALLDIR; char *curr_prefix_better; curr_prefix_better = compute_curr_prefix (orig_installprefix, orig_installdir, get_shared_library_fullname ()); set_relocation_prefix (orig_installprefix, curr_prefix_better != NULL ? curr_prefix_better : curr_prefix); if (curr_prefix_better != NULL) free (curr_prefix_better); initialized = 1; } #endif /* Note: It is not necessary to perform case insensitive comparison here, even for DOS-like file systems, because the pathname argument was typically created from the same Makefile variable as orig_prefix came from. */ if (orig_prefix != NULL && curr_prefix != NULL && strncmp (pathname, orig_prefix, orig_prefix_len) == 0) { if (pathname[orig_prefix_len] == '\0') { /* pathname equals orig_prefix. */ char *result = (char *) xmalloc (strlen (curr_prefix) + 1); #ifdef NO_XMALLOC if (result != NULL) #endif { strcpy (result, curr_prefix); return result; } } else if (ISSLASH (pathname[orig_prefix_len])) { /* pathname starts with orig_prefix. */ const char *pathname_tail = &pathname[orig_prefix_len]; char *result = (char *) xmalloc (curr_prefix_len + strlen (pathname_tail) + 1); #ifdef NO_XMALLOC if (result != NULL) #endif { memcpy (result, curr_prefix, curr_prefix_len); strcpy (result + curr_prefix_len, pathname_tail); return result; } } } /* Nothing to relocate. */ return pathname; } #endif libprelude-1.0.0/libmissing/c-ctype.c0000664000076400007640000002547411341220434014450 00000000000000/* Character handling in C locale. Copyright 2000-2003, 2006, 2009-2010 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser 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 Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ #include /* Specification. */ #define NO_C_CTYPE_MACROS #include "c-ctype.h" /* The function isascii is not locale dependent. Its use in EBCDIC is questionable. */ bool c_isascii (int c) { return (c >= 0x00 && c <= 0x7f); } bool c_isalnum (int c) { #if C_CTYPE_CONSECUTIVE_DIGITS \ && C_CTYPE_CONSECUTIVE_UPPERCASE && C_CTYPE_CONSECUTIVE_LOWERCASE #if C_CTYPE_ASCII return ((c >= '0' && c <= '9') || ((c & ~0x20) >= 'A' && (c & ~0x20) <= 'Z')); #else return ((c >= '0' && c <= '9') || (c >= 'A' && c <= 'Z') || (c >= 'a' && c <= 'z')); #endif #else switch (c) { case '0': case '1': case '2': case '3': case '4': case '5': case '6': case '7': case '8': case '9': case 'A': case 'B': case 'C': case 'D': case 'E': case 'F': case 'G': case 'H': case 'I': case 'J': case 'K': case 'L': case 'M': case 'N': case 'O': case 'P': case 'Q': case 'R': case 'S': case 'T': case 'U': case 'V': case 'W': case 'X': case 'Y': case 'Z': case 'a': case 'b': case 'c': case 'd': case 'e': case 'f': case 'g': case 'h': case 'i': case 'j': case 'k': case 'l': case 'm': case 'n': case 'o': case 'p': case 'q': case 'r': case 's': case 't': case 'u': case 'v': case 'w': case 'x': case 'y': case 'z': return 1; default: return 0; } #endif } bool c_isalpha (int c) { #if C_CTYPE_CONSECUTIVE_UPPERCASE && C_CTYPE_CONSECUTIVE_LOWERCASE #if C_CTYPE_ASCII return ((c & ~0x20) >= 'A' && (c & ~0x20) <= 'Z'); #else return ((c >= 'A' && c <= 'Z') || (c >= 'a' && c <= 'z')); #endif #else switch (c) { case 'A': case 'B': case 'C': case 'D': case 'E': case 'F': case 'G': case 'H': case 'I': case 'J': case 'K': case 'L': case 'M': case 'N': case 'O': case 'P': case 'Q': case 'R': case 'S': case 'T': case 'U': case 'V': case 'W': case 'X': case 'Y': case 'Z': case 'a': case 'b': case 'c': case 'd': case 'e': case 'f': case 'g': case 'h': case 'i': case 'j': case 'k': case 'l': case 'm': case 'n': case 'o': case 'p': case 'q': case 'r': case 's': case 't': case 'u': case 'v': case 'w': case 'x': case 'y': case 'z': return 1; default: return 0; } #endif } bool c_isblank (int c) { return (c == ' ' || c == '\t'); } bool c_iscntrl (int c) { #if C_CTYPE_ASCII return ((c & ~0x1f) == 0 || c == 0x7f); #else switch (c) { case ' ': case '!': case '"': case '#': case '$': case '%': case '&': case '\'': case '(': case ')': case '*': case '+': case ',': case '-': case '.': case '/': case '0': case '1': case '2': case '3': case '4': case '5': case '6': case '7': case '8': case '9': case ':': case ';': case '<': case '=': case '>': case '?': case '@': case 'A': case 'B': case 'C': case 'D': case 'E': case 'F': case 'G': case 'H': case 'I': case 'J': case 'K': case 'L': case 'M': case 'N': case 'O': case 'P': case 'Q': case 'R': case 'S': case 'T': case 'U': case 'V': case 'W': case 'X': case 'Y': case 'Z': case '[': case '\\': case ']': case '^': case '_': case '`': case 'a': case 'b': case 'c': case 'd': case 'e': case 'f': case 'g': case 'h': case 'i': case 'j': case 'k': case 'l': case 'm': case 'n': case 'o': case 'p': case 'q': case 'r': case 's': case 't': case 'u': case 'v': case 'w': case 'x': case 'y': case 'z': case '{': case '|': case '}': case '~': return 0; default: return 1; } #endif } bool c_isdigit (int c) { #if C_CTYPE_CONSECUTIVE_DIGITS return (c >= '0' && c <= '9'); #else switch (c) { case '0': case '1': case '2': case '3': case '4': case '5': case '6': case '7': case '8': case '9': return 1; default: return 0; } #endif } bool c_islower (int c) { #if C_CTYPE_CONSECUTIVE_LOWERCASE return (c >= 'a' && c <= 'z'); #else switch (c) { case 'a': case 'b': case 'c': case 'd': case 'e': case 'f': case 'g': case 'h': case 'i': case 'j': case 'k': case 'l': case 'm': case 'n': case 'o': case 'p': case 'q': case 'r': case 's': case 't': case 'u': case 'v': case 'w': case 'x': case 'y': case 'z': return 1; default: return 0; } #endif } bool c_isgraph (int c) { #if C_CTYPE_ASCII return (c >= '!' && c <= '~'); #else switch (c) { case '!': case '"': case '#': case '$': case '%': case '&': case '\'': case '(': case ')': case '*': case '+': case ',': case '-': case '.': case '/': case '0': case '1': case '2': case '3': case '4': case '5': case '6': case '7': case '8': case '9': case ':': case ';': case '<': case '=': case '>': case '?': case '@': case 'A': case 'B': case 'C': case 'D': case 'E': case 'F': case 'G': case 'H': case 'I': case 'J': case 'K': case 'L': case 'M': case 'N': case 'O': case 'P': case 'Q': case 'R': case 'S': case 'T': case 'U': case 'V': case 'W': case 'X': case 'Y': case 'Z': case '[': case '\\': case ']': case '^': case '_': case '`': case 'a': case 'b': case 'c': case 'd': case 'e': case 'f': case 'g': case 'h': case 'i': case 'j': case 'k': case 'l': case 'm': case 'n': case 'o': case 'p': case 'q': case 'r': case 's': case 't': case 'u': case 'v': case 'w': case 'x': case 'y': case 'z': case '{': case '|': case '}': case '~': return 1; default: return 0; } #endif } bool c_isprint (int c) { #if C_CTYPE_ASCII return (c >= ' ' && c <= '~'); #else switch (c) { case ' ': case '!': case '"': case '#': case '$': case '%': case '&': case '\'': case '(': case ')': case '*': case '+': case ',': case '-': case '.': case '/': case '0': case '1': case '2': case '3': case '4': case '5': case '6': case '7': case '8': case '9': case ':': case ';': case '<': case '=': case '>': case '?': case '@': case 'A': case 'B': case 'C': case 'D': case 'E': case 'F': case 'G': case 'H': case 'I': case 'J': case 'K': case 'L': case 'M': case 'N': case 'O': case 'P': case 'Q': case 'R': case 'S': case 'T': case 'U': case 'V': case 'W': case 'X': case 'Y': case 'Z': case '[': case '\\': case ']': case '^': case '_': case '`': case 'a': case 'b': case 'c': case 'd': case 'e': case 'f': case 'g': case 'h': case 'i': case 'j': case 'k': case 'l': case 'm': case 'n': case 'o': case 'p': case 'q': case 'r': case 's': case 't': case 'u': case 'v': case 'w': case 'x': case 'y': case 'z': case '{': case '|': case '}': case '~': return 1; default: return 0; } #endif } bool c_ispunct (int c) { #if C_CTYPE_ASCII return ((c >= '!' && c <= '~') && !((c >= '0' && c <= '9') || ((c & ~0x20) >= 'A' && (c & ~0x20) <= 'Z'))); #else switch (c) { case '!': case '"': case '#': case '$': case '%': case '&': case '\'': case '(': case ')': case '*': case '+': case ',': case '-': case '.': case '/': case ':': case ';': case '<': case '=': case '>': case '?': case '@': case '[': case '\\': case ']': case '^': case '_': case '`': case '{': case '|': case '}': case '~': return 1; default: return 0; } #endif } bool c_isspace (int c) { return (c == ' ' || c == '\t' || c == '\n' || c == '\v' || c == '\f' || c == '\r'); } bool c_isupper (int c) { #if C_CTYPE_CONSECUTIVE_UPPERCASE return (c >= 'A' && c <= 'Z'); #else switch (c) { case 'A': case 'B': case 'C': case 'D': case 'E': case 'F': case 'G': case 'H': case 'I': case 'J': case 'K': case 'L': case 'M': case 'N': case 'O': case 'P': case 'Q': case 'R': case 'S': case 'T': case 'U': case 'V': case 'W': case 'X': case 'Y': case 'Z': return 1; default: return 0; } #endif } bool c_isxdigit (int c) { #if C_CTYPE_CONSECUTIVE_DIGITS \ && C_CTYPE_CONSECUTIVE_UPPERCASE && C_CTYPE_CONSECUTIVE_LOWERCASE #if C_CTYPE_ASCII return ((c >= '0' && c <= '9') || ((c & ~0x20) >= 'A' && (c & ~0x20) <= 'F')); #else return ((c >= '0' && c <= '9') || (c >= 'A' && c <= 'F') || (c >= 'a' && c <= 'f')); #endif #else switch (c) { case '0': case '1': case '2': case '3': case '4': case '5': case '6': case '7': case '8': case '9': case 'A': case 'B': case 'C': case 'D': case 'E': case 'F': case 'a': case 'b': case 'c': case 'd': case 'e': case 'f': return 1; default: return 0; } #endif } int c_tolower (int c) { #if C_CTYPE_CONSECUTIVE_UPPERCASE && C_CTYPE_CONSECUTIVE_LOWERCASE return (c >= 'A' && c <= 'Z' ? c - 'A' + 'a' : c); #else switch (c) { case 'A': return 'a'; case 'B': return 'b'; case 'C': return 'c'; case 'D': return 'd'; case 'E': return 'e'; case 'F': return 'f'; case 'G': return 'g'; case 'H': return 'h'; case 'I': return 'i'; case 'J': return 'j'; case 'K': return 'k'; case 'L': return 'l'; case 'M': return 'm'; case 'N': return 'n'; case 'O': return 'o'; case 'P': return 'p'; case 'Q': return 'q'; case 'R': return 'r'; case 'S': return 's'; case 'T': return 't'; case 'U': return 'u'; case 'V': return 'v'; case 'W': return 'w'; case 'X': return 'x'; case 'Y': return 'y'; case 'Z': return 'z'; default: return c; } #endif } int c_toupper (int c) { #if C_CTYPE_CONSECUTIVE_UPPERCASE && C_CTYPE_CONSECUTIVE_LOWERCASE return (c >= 'a' && c <= 'z' ? c - 'a' + 'A' : c); #else switch (c) { case 'a': return 'A'; case 'b': return 'B'; case 'c': return 'C'; case 'd': return 'D'; case 'e': return 'E'; case 'f': return 'F'; case 'g': return 'G'; case 'h': return 'H'; case 'i': return 'I'; case 'j': return 'J'; case 'k': return 'K'; case 'l': return 'L'; case 'm': return 'M'; case 'n': return 'N'; case 'o': return 'O'; case 'p': return 'P'; case 'q': return 'Q'; case 'r': return 'R'; case 's': return 'S'; case 't': return 'T'; case 'u': return 'U'; case 'v': return 'V'; case 'w': return 'W'; case 'x': return 'X'; case 'y': return 'Y'; case 'z': return 'Z'; default: return c; } #endif } libprelude-1.0.0/libmissing/listen.c0000664000076400007640000000221211341220435014364 00000000000000/* listen.c --- wrappers for Windows listen function Copyright (C) 2008, 2009, 2010 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 3 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 Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . */ /* Written by Paolo Bonzini */ #include #define WIN32_LEAN_AND_MEAN /* Get winsock2.h. */ #include /* Get set_winsock_errno, FD_TO_SOCKET etc. */ #include "w32sock.h" #undef listen int rpl_listen (int fd, int backlog) { SOCKET sock = FD_TO_SOCKET (fd); int r = listen (sock, backlog); if (r < 0) set_winsock_errno (); return r; } libprelude-1.0.0/libmissing/strdup.c0000664000076400007640000000264611341220440014416 00000000000000/* Copyright (C) 1991, 1996, 1997, 1998, 2002, 2003, 2004, 2006, 2007, 2009, 2010 Free Software Foundation, Inc. This file is part of the GNU C Library. This program is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser 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 Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ #ifndef _LIBC # include #endif /* Get specification. */ #include #include #undef __strdup #ifdef _LIBC # undef strdup #endif #ifndef weak_alias # define __strdup strdup #endif /* Duplicate S, returning an identical malloc'd string. */ char * __strdup (const char *s) { size_t len = strlen (s) + 1; void *new = malloc (len); if (new == NULL) return NULL; return (char *) memcpy (new, s, len); } #ifdef libc_hidden_def libc_hidden_def (__strdup) #endif #ifdef weak_alias weak_alias (__strdup, strdup) #endif libprelude-1.0.0/libmissing/errno.in.h0000664000076400007640000001104311341220434014626 00000000000000/* A POSIX-like . Copyright (C) 2008-2010 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser 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 Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ #ifndef _GL_ERRNO_H #if __GNUC__ >= 3 @PRAGMA_SYSTEM_HEADER@ #endif /* The include_next requires a split double-inclusion guard. */ #@INCLUDE_NEXT@ @NEXT_ERRNO_H@ #ifndef _GL_ERRNO_H #define _GL_ERRNO_H /* On native Windows platforms, many macros are not defined. */ # if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ /* POSIX says that EAGAIN and EWOULDBLOCK may have the same value. */ # define EWOULDBLOCK EAGAIN /* Values >= 100 seem safe to use. */ # define ETXTBSY 100 # define GNULIB_defined_ETXTBSY 1 /* These are intentionally the same values as the WSA* error numbers, defined in . */ # define EINPROGRESS 10036 # define EALREADY 10037 # define ENOTSOCK 10038 # define EDESTADDRREQ 10039 # define EMSGSIZE 10040 # define EPROTOTYPE 10041 # define ENOPROTOOPT 10042 # define EPROTONOSUPPORT 10043 # define ESOCKTNOSUPPORT 10044 /* not required by POSIX */ # define EOPNOTSUPP 10045 # define EPFNOSUPPORT 10046 /* not required by POSIX */ # define EAFNOSUPPORT 10047 # define EADDRINUSE 10048 # define EADDRNOTAVAIL 10049 # define ENETDOWN 10050 # define ENETUNREACH 10051 # define ENETRESET 10052 # define ECONNABORTED 10053 # define ECONNRESET 10054 # define ENOBUFS 10055 # define EISCONN 10056 # define ENOTCONN 10057 # define ESHUTDOWN 10058 /* not required by POSIX */ # define ETOOMANYREFS 10059 /* not required by POSIX */ # define ETIMEDOUT 10060 # define ECONNREFUSED 10061 # define ELOOP 10062 # define EHOSTDOWN 10064 /* not required by POSIX */ # define EHOSTUNREACH 10065 # define EPROCLIM 10067 /* not required by POSIX */ # define EUSERS 10068 /* not required by POSIX */ # define EDQUOT 10069 # define ESTALE 10070 # define EREMOTE 10071 /* not required by POSIX */ # define GNULIB_defined_ESOCK 1 # endif /* On OSF/1 5.1, when _XOPEN_SOURCE_EXTENDED is not defined, the macros EMULTIHOP, ENOLINK, EOVERFLOW are not defined. */ # if @EMULTIHOP_HIDDEN@ # define EMULTIHOP @EMULTIHOP_VALUE@ # define GNULIB_defined_EMULTIHOP 1 # endif # if @ENOLINK_HIDDEN@ # define ENOLINK @ENOLINK_VALUE@ # define GNULIB_defined_ENOLINK 1 # endif # if @EOVERFLOW_HIDDEN@ # define EOVERFLOW @EOVERFLOW_VALUE@ # define GNULIB_defined_EOVERFLOW 1 # endif /* On OpenBSD 4.0 and on native Windows, the macros ENOMSG, EIDRM, ENOLINK, EPROTO, EMULTIHOP, EBADMSG, EOVERFLOW, ENOTSUP, ECANCELED are not defined. Define them here. Values >= 2000 seem safe to use: Solaris ESTALE = 151, HP-UX EWOULDBLOCK = 246, IRIX EDQUOT = 1133. Note: When one of these systems defines some of these macros some day, binaries will have to be recompiled so that they recognizes the new errno values from the system. */ # ifndef ENOMSG # define ENOMSG 2000 # define GNULIB_defined_ENOMSG 1 # endif # ifndef EIDRM # define EIDRM 2001 # define GNULIB_defined_EIDRM 1 # endif # ifndef ENOLINK # define ENOLINK 2002 # define GNULIB_defined_ENOLINK 1 # endif # ifndef EPROTO # define EPROTO 2003 # define GNULIB_defined_EPROTO 1 # endif # ifndef EMULTIHOP # define EMULTIHOP 2004 # define GNULIB_defined_EMULTIHOP 1 # endif # ifndef EBADMSG # define EBADMSG 2005 # define GNULIB_defined_EBADMSG 1 # endif # ifndef EOVERFLOW # define EOVERFLOW 2006 # define GNULIB_defined_EOVERFLOW 1 # endif # ifndef ENOTSUP # define ENOTSUP 2007 # define GNULIB_defined_ENOTSUP 1 # endif # ifndef ESTALE # define ESTALE 2009 # define GNULIB_defined_ESTALE 1 # endif # ifndef ECANCELED # define ECANCELED 2008 # define GNULIB_defined_ECANCELED 1 # endif #endif /* _GL_ERRNO_H */ #endif /* _GL_ERRNO_H */ libprelude-1.0.0/libmissing/float+.h0000664000076400007640000001310511341220434014255 00000000000000/* Supplemental information about the floating-point formats. Copyright (C) 2007, 2009, 2010 Free Software Foundation, Inc. Written by Bruno Haible , 2007. This program is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser 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 Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ #ifndef _FLOATPLUS_H #define _FLOATPLUS_H #include #include /* Number of bits in the mantissa of a floating-point number, including the "hidden bit". */ #if FLT_RADIX == 2 # define FLT_MANT_BIT FLT_MANT_DIG # define DBL_MANT_BIT DBL_MANT_DIG # define LDBL_MANT_BIT LDBL_MANT_DIG #elif FLT_RADIX == 4 # define FLT_MANT_BIT (FLT_MANT_DIG * 2) # define DBL_MANT_BIT (DBL_MANT_DIG * 2) # define LDBL_MANT_BIT (LDBL_MANT_DIG * 2) #elif FLT_RADIX == 16 # define FLT_MANT_BIT (FLT_MANT_DIG * 4) # define DBL_MANT_BIT (DBL_MANT_DIG * 4) # define LDBL_MANT_BIT (LDBL_MANT_DIG * 4) #endif /* Bit mask that can be used to mask the exponent, as an unsigned number. */ #define FLT_EXP_MASK ((FLT_MAX_EXP - FLT_MIN_EXP) | 7) #define DBL_EXP_MASK ((DBL_MAX_EXP - DBL_MIN_EXP) | 7) #define LDBL_EXP_MASK ((LDBL_MAX_EXP - LDBL_MIN_EXP) | 7) /* Number of bits used for the exponent of a floating-point number, including the exponent's sign. */ #define FLT_EXP_BIT \ (FLT_EXP_MASK < 0x100 ? 8 : \ FLT_EXP_MASK < 0x200 ? 9 : \ FLT_EXP_MASK < 0x400 ? 10 : \ FLT_EXP_MASK < 0x800 ? 11 : \ FLT_EXP_MASK < 0x1000 ? 12 : \ FLT_EXP_MASK < 0x2000 ? 13 : \ FLT_EXP_MASK < 0x4000 ? 14 : \ FLT_EXP_MASK < 0x8000 ? 15 : \ FLT_EXP_MASK < 0x10000 ? 16 : \ FLT_EXP_MASK < 0x20000 ? 17 : \ FLT_EXP_MASK < 0x40000 ? 18 : \ FLT_EXP_MASK < 0x80000 ? 19 : \ FLT_EXP_MASK < 0x100000 ? 20 : \ FLT_EXP_MASK < 0x200000 ? 21 : \ FLT_EXP_MASK < 0x400000 ? 22 : \ FLT_EXP_MASK < 0x800000 ? 23 : \ FLT_EXP_MASK < 0x1000000 ? 24 : \ FLT_EXP_MASK < 0x2000000 ? 25 : \ FLT_EXP_MASK < 0x4000000 ? 26 : \ FLT_EXP_MASK < 0x8000000 ? 27 : \ FLT_EXP_MASK < 0x10000000 ? 28 : \ FLT_EXP_MASK < 0x20000000 ? 29 : \ FLT_EXP_MASK < 0x40000000 ? 30 : \ FLT_EXP_MASK <= 0x7fffffff ? 31 : \ 32) #define DBL_EXP_BIT \ (DBL_EXP_MASK < 0x100 ? 8 : \ DBL_EXP_MASK < 0x200 ? 9 : \ DBL_EXP_MASK < 0x400 ? 10 : \ DBL_EXP_MASK < 0x800 ? 11 : \ DBL_EXP_MASK < 0x1000 ? 12 : \ DBL_EXP_MASK < 0x2000 ? 13 : \ DBL_EXP_MASK < 0x4000 ? 14 : \ DBL_EXP_MASK < 0x8000 ? 15 : \ DBL_EXP_MASK < 0x10000 ? 16 : \ DBL_EXP_MASK < 0x20000 ? 17 : \ DBL_EXP_MASK < 0x40000 ? 18 : \ DBL_EXP_MASK < 0x80000 ? 19 : \ DBL_EXP_MASK < 0x100000 ? 20 : \ DBL_EXP_MASK < 0x200000 ? 21 : \ DBL_EXP_MASK < 0x400000 ? 22 : \ DBL_EXP_MASK < 0x800000 ? 23 : \ DBL_EXP_MASK < 0x1000000 ? 24 : \ DBL_EXP_MASK < 0x2000000 ? 25 : \ DBL_EXP_MASK < 0x4000000 ? 26 : \ DBL_EXP_MASK < 0x8000000 ? 27 : \ DBL_EXP_MASK < 0x10000000 ? 28 : \ DBL_EXP_MASK < 0x20000000 ? 29 : \ DBL_EXP_MASK < 0x40000000 ? 30 : \ DBL_EXP_MASK <= 0x7fffffff ? 31 : \ 32) #define LDBL_EXP_BIT \ (LDBL_EXP_MASK < 0x100 ? 8 : \ LDBL_EXP_MASK < 0x200 ? 9 : \ LDBL_EXP_MASK < 0x400 ? 10 : \ LDBL_EXP_MASK < 0x800 ? 11 : \ LDBL_EXP_MASK < 0x1000 ? 12 : \ LDBL_EXP_MASK < 0x2000 ? 13 : \ LDBL_EXP_MASK < 0x4000 ? 14 : \ LDBL_EXP_MASK < 0x8000 ? 15 : \ LDBL_EXP_MASK < 0x10000 ? 16 : \ LDBL_EXP_MASK < 0x20000 ? 17 : \ LDBL_EXP_MASK < 0x40000 ? 18 : \ LDBL_EXP_MASK < 0x80000 ? 19 : \ LDBL_EXP_MASK < 0x100000 ? 20 : \ LDBL_EXP_MASK < 0x200000 ? 21 : \ LDBL_EXP_MASK < 0x400000 ? 22 : \ LDBL_EXP_MASK < 0x800000 ? 23 : \ LDBL_EXP_MASK < 0x1000000 ? 24 : \ LDBL_EXP_MASK < 0x2000000 ? 25 : \ LDBL_EXP_MASK < 0x4000000 ? 26 : \ LDBL_EXP_MASK < 0x8000000 ? 27 : \ LDBL_EXP_MASK < 0x10000000 ? 28 : \ LDBL_EXP_MASK < 0x20000000 ? 29 : \ LDBL_EXP_MASK < 0x40000000 ? 30 : \ LDBL_EXP_MASK <= 0x7fffffff ? 31 : \ 32) /* Number of bits used for a floating-point number: the mantissa (not counting the "hidden bit", since it may or may not be explicit), the exponent, and the sign. */ #define FLT_TOTAL_BIT ((FLT_MANT_BIT - 1) + FLT_EXP_BIT + 1) #define DBL_TOTAL_BIT ((DBL_MANT_BIT - 1) + DBL_EXP_BIT + 1) #define LDBL_TOTAL_BIT ((LDBL_MANT_BIT - 1) + LDBL_EXP_BIT + 1) /* Number of bytes used for a floating-point number. This can be smaller than the 'sizeof'. For example, on i386 systems, 'long double' most often have LDBL_MANT_BIT = 64, LDBL_EXP_BIT = 16, hence LDBL_TOTAL_BIT = 80 bits, i.e. 10 bytes of consecutive memory, but sizeof (long double) = 12 or = 16. */ #define SIZEOF_FLT ((FLT_TOTAL_BIT + CHAR_BIT - 1) / CHAR_BIT) #define SIZEOF_DBL ((DBL_TOTAL_BIT + CHAR_BIT - 1) / CHAR_BIT) #define SIZEOF_LDBL ((LDBL_TOTAL_BIT + CHAR_BIT - 1) / CHAR_BIT) /* Verify that SIZEOF_FLT <= sizeof (float) etc. */ typedef int verify_sizeof_flt[2 * (SIZEOF_FLT <= sizeof (float)) - 1]; typedef int verify_sizeof_dbl[2 * (SIZEOF_DBL <= sizeof (double)) - 1]; typedef int verify_sizeof_ldbl[2 * (SIZEOF_LDBL <= sizeof (long double)) - 1]; #endif /* _FLOATPLUS_H */ libprelude-1.0.0/libmissing/printf-frexpl.h0000664000076400007640000000213111341220437015675 00000000000000/* Split a 'long double' into fraction and mantissa, for hexadecimal printf. Copyright (C) 2007, 2009, 2010 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 3 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 Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . */ /* Write a finite, positive number x as x = mantissa * 2^exp where exp >= LDBL_MIN_EXP - 1, mantissa < 2.0, if x is not a denormalized number then mantissa >= 1.0. Store exp in *EXPPTR and return mantissa. */ extern long double printf_frexpl (long double x, int *expptr); libprelude-1.0.0/libmissing/gethostname.c0000664000076400007640000000543011341220435015411 00000000000000/* gethostname emulation for SysV and POSIX.1. Copyright (C) 1992, 2003, 2006, 2008, 2009, 2010 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 3 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 Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . */ /* David MacKenzie Windows port by Simon Josefsson */ #include #if !((defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__) /* Unix API. */ /* Specification. */ #include #ifdef HAVE_UNAME # include #endif #include /* Put up to LEN chars of the host name into NAME. Null terminate it if the name is shorter than LEN. Return 0 if ok, -1 if error. */ #include int gethostname (char *name, size_t len) { #ifdef HAVE_UNAME struct utsname uts; if (uname (&uts) == -1) return -1; if (len > sizeof (uts.nodename)) { /* More space than we need is available. */ name[sizeof (uts.nodename)] = '\0'; len = sizeof (uts.nodename); } strncpy (name, uts.nodename, len); #else strcpy (name, ""); /* Hardcode your system name if you want. */ #endif return 0; } #else /* Native Windows API. Which primitive to choose? - gethostname() requires linking with -lws2_32. - GetComputerName() does not return the right kind of hostname. - GetComputerNameEx(ComputerNameDnsHostname,...) returns the right hostname, but it is hard to use portably: - It requires defining _WIN32_WINNT to at least 0x0500. - With mingw, it also requires "#define GetComputerNameEx GetComputerNameExA". - With older versions of mingw, none of the declarations are present at all, not even of the enum value ComputerNameDnsHostname. So we use gethostname(). Linking with -lws2_32 is the least evil. */ #define WIN32_LEAN_AND_MEAN /* Get winsock2.h. */ #include /* Get INT_MAX. */ #include /* Get set_winsock_errno. */ #include "w32sock.h" #include "sockets.h" #undef gethostname int rpl_gethostname (char *name, size_t len) { int r; if (len > INT_MAX) len = INT_MAX; gl_sockets_startup (SOCKETS_1_1); r = gethostname (name, (int) len); if (r < 0) set_winsock_errno (); return r; } #endif libprelude-1.0.0/libmissing/socket.c0000664000076400007640000000261111341220440014355 00000000000000/* socket.c --- wrappers for Windows socket function Copyright (C) 2008-2010 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 3 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 Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . */ /* Written by Paolo Bonzini */ #include #define WIN32_LEAN_AND_MEAN /* Get winsock2.h. */ #include /* Get set_winsock_errno, FD_TO_SOCKET etc. */ #include "w32sock.h" #include "sockets.h" int rpl_socket (int domain, int type, int protocol) { SOCKET fh; gl_sockets_startup (SOCKETS_1_1); /* We have to use WSASocket() to create non-overlapped IO sockets. Overlapped IO sockets cannot be used with read/write. */ fh = WSASocket (domain, type, protocol, NULL, 0, 0); if (fh == INVALID_SOCKET) { set_winsock_errno (); return -1; } else return SOCKET_TO_FD (fh); } libprelude-1.0.0/libmissing/inet_ntop.c0000664000076400007640000001442411341220435015075 00000000000000/* inet_ntop.c -- convert IPv4 and IPv6 addresses from binary to text form Copyright (C) 2005-2006, 2008-2010 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser 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 Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ /* * Copyright (c) 1996-1999 by Internet Software Consortium. * * Permission to use, copy, modify, and distribute this software for any * purpose with or without fee is hereby granted, provided that the above * copyright notice and this permission notice appear in all copies. * * THE SOFTWARE IS PROVIDED "AS IS" AND INTERNET SOFTWARE CONSORTIUM DISCLAIMS * ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES * OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL INTERNET SOFTWARE * CONSORTIUM BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS * ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS * SOFTWARE. */ #include /* Specification. */ #include #include #include #include #define NS_IN6ADDRSZ 16 #define NS_INT16SZ 2 /* * WARNING: Don't even consider trying to compile this on a system where * sizeof(int) < 4. sizeof(int) > 4 is fine; all the world's not a VAX. */ typedef int verify_int_size[2 * sizeof (int) - 7]; static const char *inet_ntop4 (const unsigned char *src, char *dst, socklen_t size); #if HAVE_IPV6 static const char *inet_ntop6 (const unsigned char *src, char *dst, socklen_t size); #endif /* char * * inet_ntop(af, src, dst, size) * convert a network format address to presentation format. * return: * pointer to presentation format address (`dst'), or NULL (see errno). * author: * Paul Vixie, 1996. */ const char * inet_ntop (int af, const void *restrict src, char *restrict dst, socklen_t cnt) { switch (af) { #if HAVE_IPV4 case AF_INET: return (inet_ntop4 (src, dst, cnt)); #endif #if HAVE_IPV6 case AF_INET6: return (inet_ntop6 (src, dst, cnt)); #endif default: errno = EAFNOSUPPORT; return (NULL); } /* NOTREACHED */ } /* const char * * inet_ntop4(src, dst, size) * format an IPv4 address * return: * `dst' (as a const) * notes: * (1) uses no statics * (2) takes a u_char* not an in_addr as input * author: * Paul Vixie, 1996. */ static const char * inet_ntop4 (const unsigned char *src, char *dst, socklen_t size) { char tmp[sizeof "255.255.255.255"]; int len; len = sprintf (tmp, "%u.%u.%u.%u", src[0], src[1], src[2], src[3]); if (len < 0) return NULL; if (len > size) { errno = ENOSPC; return NULL; } return strcpy (dst, tmp); } #if HAVE_IPV6 /* const char * * inet_ntop6(src, dst, size) * convert IPv6 binary address into presentation (printable) format * author: * Paul Vixie, 1996. */ static const char * inet_ntop6 (const unsigned char *src, char *dst, socklen_t size) { /* * Note that int32_t and int16_t need only be "at least" large enough * to contain a value of the specified size. On some systems, like * Crays, there is no such thing as an integer variable with 16 bits. * Keep this in mind if you think this function should have been coded * to use pointer overlays. All the world's not a VAX. */ char tmp[sizeof "ffff:ffff:ffff:ffff:ffff:ffff:255.255.255.255"], *tp; struct { int base, len; } best, cur; unsigned int words[NS_IN6ADDRSZ / NS_INT16SZ]; int i; /* * Preprocess: * Copy the input (bytewise) array into a wordwise array. * Find the longest run of 0x00's in src[] for :: shorthanding. */ memset (words, '\0', sizeof words); for (i = 0; i < NS_IN6ADDRSZ; i += 2) words[i / 2] = (src[i] << 8) | src[i + 1]; best.base = -1; cur.base = -1; for (i = 0; i < (NS_IN6ADDRSZ / NS_INT16SZ); i++) { if (words[i] == 0) { if (cur.base == -1) cur.base = i, cur.len = 1; else cur.len++; } else { if (cur.base != -1) { if (best.base == -1 || cur.len > best.len) best = cur; cur.base = -1; } } } if (cur.base != -1) { if (best.base == -1 || cur.len > best.len) best = cur; } if (best.base != -1 && best.len < 2) best.base = -1; /* * Format the result. */ tp = tmp; for (i = 0; i < (NS_IN6ADDRSZ / NS_INT16SZ); i++) { /* Are we inside the best run of 0x00's? */ if (best.base != -1 && i >= best.base && i < (best.base + best.len)) { if (i == best.base) *tp++ = ':'; continue; } /* Are we following an initial run of 0x00s or any real hex? */ if (i != 0) *tp++ = ':'; /* Is this address an encapsulated IPv4? */ if (i == 6 && best.base == 0 && (best.len == 6 || (best.len == 5 && words[5] == 0xffff))) { if (!inet_ntop4 (src + 12, tp, sizeof tmp - (tp - tmp))) return (NULL); tp += strlen (tp); break; } { int len = sprintf (tp, "%x", words[i]); if (len < 0) return NULL; tp += len; } } /* Was it a trailing run of 0x00's? */ if (best.base != -1 && (best.base + best.len) == (NS_IN6ADDRSZ / NS_INT16SZ)) *tp++ = ':'; *tp++ = '\0'; /* * Check for overflow, copy, and we're done. */ if ((socklen_t) (tp - tmp) > size) { errno = ENOSPC; return NULL; } return strcpy (dst, tmp); } #endif libprelude-1.0.0/libmissing/unistd.in.h0000664000076400007640000006733111341220442015021 00000000000000/* Substitute for and wrapper around . Copyright (C) 2003-2010 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser 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 Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ #ifndef _GL_UNISTD_H #if __GNUC__ >= 3 @PRAGMA_SYSTEM_HEADER@ #endif /* The include_next requires a split double-inclusion guard. */ #if @HAVE_UNISTD_H@ # @INCLUDE_NEXT@ @NEXT_UNISTD_H@ #endif #ifndef _GL_UNISTD_H #define _GL_UNISTD_H /* NetBSD 5.0 mis-defines NULL. Also get size_t. */ #include /* mingw doesn't define the SEEK_* or *_FILENO macros in . */ /* Cygwin 1.7.1 declares symlinkat in , not in . */ /* But avoid namespace pollution on glibc systems. */ #if (!(defined SEEK_CUR && defined SEEK_END && defined SEEK_SET) \ || (@GNULIB_SYMLINKAT@ || defined GNULIB_POSIXCHECK)) \ && ! defined __GLIBC__ # include #endif /* Cygwin 1.7.1 declares unlinkat in , not in . */ /* But avoid namespace pollution on glibc systems. */ #if (@GNULIB_UNLINKAT@ || defined GNULIB_POSIXCHECK) && ! defined __GLIBC__ # include #endif /* mingw fails to declare _exit in . */ /* mingw, BeOS, Haiku declare environ in , not in . */ /* Solaris declares getcwd not only in but also in . */ /* But avoid namespace pollution on glibc systems. */ #ifndef __GLIBC__ # include #endif /* mingw declares getcwd in , not in . */ #if ((@GNULIB_GETCWD@ || defined GNULIB_POSIXCHECK) \ && ((defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__)) # include #endif #if (@GNULIB_WRITE@ || @GNULIB_READLINK@ || @GNULIB_READLINKAT@ \ || @GNULIB_PREAD@ || defined GNULIB_POSIXCHECK) /* Get ssize_t. */ # include #endif /* Get getopt(), optarg, optind, opterr, optopt. But avoid namespace pollution on glibc systems. */ #if @GNULIB_UNISTD_H_GETOPT@ && !defined __GLIBC__ && !defined _GL_SYSTEM_GETOPT # include #endif #if @GNULIB_GETHOSTNAME@ /* Get all possible declarations of gethostname(). */ # if @UNISTD_H_HAVE_WINSOCK2_H@ # include # if !defined _GL_SYS_SOCKET_H # undef socket # define socket socket_used_without_including_sys_socket_h # undef connect # define connect connect_used_without_including_sys_socket_h # undef accept # define accept accept_used_without_including_sys_socket_h # undef bind # define bind bind_used_without_including_sys_socket_h # undef getpeername # define getpeername getpeername_used_without_including_sys_socket_h # undef getsockname # define getsockname getsockname_used_without_including_sys_socket_h # undef getsockopt # define getsockopt getsockopt_used_without_including_sys_socket_h # undef listen # define listen listen_used_without_including_sys_socket_h # undef recv # define recv recv_used_without_including_sys_socket_h # undef send # define send send_used_without_including_sys_socket_h # undef recvfrom # define recvfrom recvfrom_used_without_including_sys_socket_h # undef sendto # define sendto sendto_used_without_including_sys_socket_h # undef setsockopt # define setsockopt setsockopt_used_without_including_sys_socket_h # undef shutdown # define shutdown shutdown_used_without_including_sys_socket_h # endif # if !defined _GL_SYS_SELECT_H # undef select # define select select_used_without_including_sys_select_h # endif # endif #endif /* The definition of _GL_ARG_NONNULL is copied here. */ /* The definition of _GL_WARN_ON_USE is copied here. */ /* OS/2 EMX lacks these macros. */ #ifndef STDIN_FILENO # define STDIN_FILENO 0 #endif #ifndef STDOUT_FILENO # define STDOUT_FILENO 1 #endif #ifndef STDERR_FILENO # define STDERR_FILENO 2 #endif /* Ensure *_OK macros exist. */ #ifndef F_OK # define F_OK 0 # define X_OK 1 # define W_OK 2 # define R_OK 4 #endif /* Declare overridden functions. */ #ifdef __cplusplus extern "C" { #endif #if @GNULIB_CHOWN@ # if @REPLACE_CHOWN@ # undef chown # define chown rpl_chown # endif # if !@HAVE_CHOWN@ || @REPLACE_CHOWN@ /* Change the owner of FILE to UID (if UID is not -1) and the group of FILE to GID (if GID is not -1). Follow symbolic links. Return 0 if successful, otherwise -1 and errno set. See the POSIX:2001 specification . */ extern int chown (const char *file, uid_t uid, gid_t gid) _GL_ARG_NONNULL ((1)); # endif #elif defined GNULIB_POSIXCHECK # undef chown # if HAVE_RAW_DECL_CHOWN _GL_WARN_ON_USE (chown, "chown fails to follow symlinks on some systems and " "doesn't treat a uid or gid of -1 on some systems - " "use gnulib module chown for portability"); # endif #endif #if @GNULIB_CLOSE@ # if @REPLACE_CLOSE@ /* Automatically included by modules that need a replacement for close. */ # undef close # define close rpl_close extern int close (int); # endif #elif @UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS@ # undef close # define close close_used_without_requesting_gnulib_module_close #elif defined GNULIB_POSIXCHECK # undef close /* Assume close is always declared. */ _GL_WARN_ON_USE (close, "close does not portably work on sockets - " "use gnulib module close for portability"); #endif #if @REPLACE_DUP@ # define dup rpl_dup extern int dup (int); #endif #if @GNULIB_DUP2@ # if @REPLACE_DUP2@ # define dup2 rpl_dup2 # endif # if !@HAVE_DUP2@ || @REPLACE_DUP2@ /* Copy the file descriptor OLDFD into file descriptor NEWFD. Do nothing if NEWFD = OLDFD, otherwise close NEWFD first if it is open. Return newfd if successful, otherwise -1 and errno set. See the POSIX:2001 specification . */ extern int dup2 (int oldfd, int newfd); # endif #elif defined GNULIB_POSIXCHECK # undef dup2 # if HAVE_RAW_DECL_DUP2 _GL_WARN_ON_USE (dup2, "dup2 is unportable - " "use gnulib module dup2 for portability"); # endif #endif #if @GNULIB_DUP3@ /* Copy the file descriptor OLDFD into file descriptor NEWFD, with the specified flags. The flags are a bitmask, possibly including O_CLOEXEC (defined in ) and O_TEXT, O_BINARY (defined in "binary-io.h"). Close NEWFD first if it is open. Return newfd if successful, otherwise -1 and errno set. See the Linux man page at . */ # if @HAVE_DUP3@ # define dup3 rpl_dup3 # endif extern int dup3 (int oldfd, int newfd, int flags); #elif defined GNULIB_POSIXCHECK # undef dup3 # if HAVE_RAW_DECL_DUP3 _GL_WARN_ON_USE (dup3, "dup3 is unportable - " "use gnulib module dup3 for portability"); # endif #endif #if @GNULIB_ENVIRON@ # if !@HAVE_DECL_ENVIRON@ /* Set of environment variables and values. An array of strings of the form "VARIABLE=VALUE", terminated with a NULL. */ # if defined __APPLE__ && defined __MACH__ # include # define environ (*_NSGetEnviron ()) # else extern char **environ; # endif # endif #elif defined GNULIB_POSIXCHECK # if HAVE_RAW_DECL_ENVIRON static inline char *** rpl_environ (void) { return &environ; } _GL_WARN_ON_USE (rpl_environ, "environ is unportable - " "use gnulib module environ for portability"); # undef environ # define environ (*rpl_environ ()) # endif #endif #if @GNULIB_EUIDACCESS@ # if !@HAVE_EUIDACCESS@ /* Like access(), except that it uses the effective user id and group id of the current process. */ extern int euidaccess (const char *filename, int mode) _GL_ARG_NONNULL ((1)); # endif #elif defined GNULIB_POSIXCHECK # undef euidaccess # if HAVE_RAW_DECL_EUIDACCESS _GL_WARN_ON_USE (euidaccess, "euidaccess is unportable - " "use gnulib module euidaccess for portability"); # endif #endif #if @GNULIB_FACCESSAT@ # if !@HAVE_FACCESSAT@ extern int faccessat (int fd, char const *file, int mode, int flag) _GL_ARG_NONNULL ((2)); # endif #elif defined GNULIB_POSIXCHECK # undef faccessat # if HAVE_RAW_DECL_FACCESSAT _GL_WARN_ON_USE (faccessat, "faccessat is not portable - " "use gnulib module faccessat for portability"); # endif #endif #if @GNULIB_FCHDIR@ # if @REPLACE_FCHDIR@ /* Change the process' current working directory to the directory on which the given file descriptor is open. Return 0 if successful, otherwise -1 and errno set. See the POSIX:2001 specification . */ extern int fchdir (int /*fd*/); /* Gnulib internal hooks needed to maintain the fchdir metadata. */ extern int _gl_register_fd (int fd, const char *filename) _GL_ARG_NONNULL ((2)); extern void _gl_unregister_fd (int fd); extern int _gl_register_dup (int oldfd, int newfd); extern const char *_gl_directory_name (int fd); # endif #elif defined GNULIB_POSIXCHECK # undef fchdir # if HAVE_RAW_DECL_FCHDIR _GL_WARN_ON_USE (fchdir, "fchdir is unportable - " "use gnulib module fchdir for portability"); # endif #endif #if @GNULIB_FCHOWNAT@ # if @REPLACE_FCHOWNAT@ # undef fchownat # define fchownat rpl_fchownat # endif # if !@HAVE_FCHOWNAT@ || @REPLACE_FCHOWNAT@ extern int fchownat (int fd, char const *file, uid_t owner, gid_t group, int flag) _GL_ARG_NONNULL ((2)); # endif #elif defined GNULIB_POSIXCHECK # undef fchownat # if HAVE_RAW_DECL_FCHOWNAT _GL_WARN_ON_USE (fchownat, "fchownat is not portable - " "use gnulib module openat for portability"); # endif #endif #if @GNULIB_FSYNC@ /* Synchronize changes to a file. Return 0 if successful, otherwise -1 and errno set. See POSIX:2001 specification . */ # if !@HAVE_FSYNC@ extern int fsync (int fd); # endif #elif defined GNULIB_POSIXCHECK # undef fsync # if HAVE_RAW_DECL_FSYNC _GL_WARN_ON_USE (fsync, "fsync is unportable - " "use gnulib module fsync for portability"); # endif #endif #if @GNULIB_FTRUNCATE@ # if !@HAVE_FTRUNCATE@ /* Change the size of the file to which FD is opened to become equal to LENGTH. Return 0 if successful, otherwise -1 and errno set. See the POSIX:2001 specification . */ extern int ftruncate (int fd, off_t length); # endif #elif defined GNULIB_POSIXCHECK # undef ftruncate # if HAVE_RAW_DECL_FTRUNCATE _GL_WARN_ON_USE (ftruncate, "ftruncate is unportable - " "use gnulib module ftruncate for portability"); # endif #endif #if @GNULIB_GETCWD@ # if @REPLACE_GETCWD@ /* Get the name of the current working directory, and put it in SIZE bytes of BUF. Return BUF if successful, or NULL if the directory couldn't be determined or SIZE was too small. See the POSIX:2001 specification . Additionally, the gnulib module 'getcwd' guarantees the following GNU extension: If BUF is NULL, an array is allocated with 'malloc'; the array is SIZE bytes long, unless SIZE == 0, in which case it is as big as necessary. */ # define getcwd rpl_getcwd extern char * getcwd (char *buf, size_t size); # endif #elif defined GNULIB_POSIXCHECK # undef getcwd # if HAVE_RAW_DECL_GETCWD _GL_WARN_ON_USE (getcwd, "getcwd is unportable - " "use gnulib module getcwd for portability"); # endif #endif #if @GNULIB_GETDOMAINNAME@ /* Return the NIS domain name of the machine. WARNING! The NIS domain name is unrelated to the fully qualified host name of the machine. It is also unrelated to email addresses. WARNING! The NIS domain name is usually the empty string or "(none)" when not using NIS. Put up to LEN bytes of the NIS domain name into NAME. Null terminate it if the name is shorter than LEN. If the NIS domain name is longer than LEN, set errno = EINVAL and return -1. Return 0 if successful, otherwise set errno and return -1. */ # if !@HAVE_GETDOMAINNAME@ extern int getdomainname(char *name, size_t len) _GL_ARG_NONNULL ((1)); # endif #elif defined GNULIB_POSIXCHECK # undef getdomainname # if HAVE_RAW_DECL_GETDOMAINNAME _GL_WARN_ON_USE (getdomainname, "getdomainname is unportable - " "use gnulib module getdomainname for portability"); # endif #endif #if @GNULIB_GETDTABLESIZE@ # if !@HAVE_GETDTABLESIZE@ /* Return the maximum number of file descriptors in the current process. In POSIX, this is same as sysconf (_SC_OPEN_MAX). */ extern int getdtablesize (void); # endif #elif defined GNULIB_POSIXCHECK # undef getdtablesize # if HAVE_RAW_DECL_GETDTABLESIZE _GL_WARN_ON_USE (getdtablesize, "getdtablesize is unportable - " "use gnulib module getdtablesize for portability"); # endif #endif #if @GNULIB_GETGROUPS@ # if @REPLACE_GETGROUPS@ # undef getgroups # define getgroups rpl_getgroups # endif # if !@HAVE_GETGROUPS@ || @REPLACE_GETGROUPS@ /* Return the supplemental groups that the current process belongs to. It is unspecified whether the effective group id is in the list. If N is 0, return the group count; otherwise, N describes how many entries are available in GROUPS. Return -1 and set errno if N is not 0 and not large enough. Fails with ENOSYS on some systems. */ int getgroups (int n, gid_t *groups); # endif #elif defined GNULIB_POSIXCHECK # undef getgroups # if HAVE_RAW_DECL_GETGROUPS _GL_WARN_ON_USE (getgroups, "getgroups is unportable - " "use gnulib module getgroups for portability"); # endif #endif #if @GNULIB_GETHOSTNAME@ /* Return the standard host name of the machine. WARNING! The host name may or may not be fully qualified. Put up to LEN bytes of the host name into NAME. Null terminate it if the name is shorter than LEN. If the host name is longer than LEN, set errno = EINVAL and return -1. Return 0 if successful, otherwise set errno and return -1. */ # if @UNISTD_H_HAVE_WINSOCK2_H@ # undef gethostname # define gethostname rpl_gethostname # endif # if @UNISTD_H_HAVE_WINSOCK2_H@ || !@HAVE_GETHOSTNAME@ extern int gethostname(char *name, size_t len) _GL_ARG_NONNULL ((1)); # endif #elif @UNISTD_H_HAVE_WINSOCK2_H@ # undef gethostname # define gethostname gethostname_used_without_requesting_gnulib_module_gethostname #elif defined GNULIB_POSIXCHECK # undef gethostname # if HAVE_RAW_DECL_GETHOSTNAME _GL_WARN_ON_USE (gethostname, "gethostname is unportable - " "use gnulib module gethostname for portability"); # endif #endif #if @GNULIB_GETLOGIN@ /* Returns the user's login name, or NULL if it cannot be found. Upon error, returns NULL with errno set. See . Most programs don't need to use this function, because the information is available through environment variables: ${LOGNAME-$USER} on Unix platforms, $USERNAME on native Windows platforms. */ # if !@HAVE_GETLOGIN@ extern char *getlogin (void); # endif #elif defined GNULIB_POSIXCHECK # undef getlogin # if HAVE_RAW_DECL_GETLOGIN _GL_WARN_ON_USE (getlogin, "getlogin is unportable - " "use gnulib module getlogin for portability"); # endif #endif #if @GNULIB_GETLOGIN_R@ /* Copies the user's login name to NAME. The array pointed to by NAME has room for SIZE bytes. Returns 0 if successful. Upon error, an error number is returned, or -1 in the case that the login name cannot be found but no specific error is provided (this case is hopefully rare but is left open by the POSIX spec). See . Most programs don't need to use this function, because the information is available through environment variables: ${LOGNAME-$USER} on Unix platforms, $USERNAME on native Windows platforms. */ # if !@HAVE_DECL_GETLOGIN_R@ extern int getlogin_r (char *name, size_t size) _GL_ARG_NONNULL ((1)); # endif #elif defined GNULIB_POSIXCHECK # undef getlogin_r # if HAVE_RAW_DECL_GETLOGIN_R _GL_WARN_ON_USE (getlogin_r, "getlogin_r is unportable - " "use gnulib module getlogin_r for portability"); # endif #endif #if @GNULIB_GETPAGESIZE@ # if @REPLACE_GETPAGESIZE@ # define getpagesize rpl_getpagesize extern int getpagesize (void); # elif !@HAVE_GETPAGESIZE@ /* This is for POSIX systems. */ # if !defined getpagesize && defined _SC_PAGESIZE # if ! (defined __VMS && __VMS_VER < 70000000) # define getpagesize() sysconf (_SC_PAGESIZE) # endif # endif /* This is for older VMS. */ # if !defined getpagesize && defined __VMS # ifdef __ALPHA # define getpagesize() 8192 # else # define getpagesize() 512 # endif # endif /* This is for BeOS. */ # if !defined getpagesize && @HAVE_OS_H@ # include # if defined B_PAGE_SIZE # define getpagesize() B_PAGE_SIZE # endif # endif /* This is for AmigaOS4.0. */ # if !defined getpagesize && defined __amigaos4__ # define getpagesize() 2048 # endif /* This is for older Unix systems. */ # if !defined getpagesize && @HAVE_SYS_PARAM_H@ # include # ifdef EXEC_PAGESIZE # define getpagesize() EXEC_PAGESIZE # else # ifdef NBPG # ifndef CLSIZE # define CLSIZE 1 # endif # define getpagesize() (NBPG * CLSIZE) # else # ifdef NBPC # define getpagesize() NBPC # endif # endif # endif # endif # endif #elif defined GNULIB_POSIXCHECK # undef getpagesize # if HAVE_RAW_DECL_GETPAGESIZE _GL_WARN_ON_USE (getpagesize, "getpagesize is unportable - " "use gnulib module getpagesize for portability"); # endif #endif #if @GNULIB_GETUSERSHELL@ # if !@HAVE_GETUSERSHELL@ /* Return the next valid login shell on the system, or NULL when the end of the list has been reached. */ extern char *getusershell (void); /* Rewind to pointer that is advanced at each getusershell() call. */ extern void setusershell (void); /* Free the pointer that is advanced at each getusershell() call and associated resources. */ extern void endusershell (void); # endif #elif defined GNULIB_POSIXCHECK # undef getusershell # if HAVE_RAW_DECL_GETUSERSHELL _GL_WARN_ON_USE (getusershell, "getusershell is unportable - " "use gnulib module getusershell for portability"); # endif # undef setusershell # if HAVE_RAW_DECL_SETUSERSHELL _GL_WARN_ON_USE (setusershell, "setusershell is unportable - " "use gnulib module getusershell for portability"); # endif # undef endusershell # if HAVE_RAW_DECL_ENDUSERSHELL _GL_WARN_ON_USE (endusershell, "endusershell is unportable - " "use gnulib module getusershell for portability"); # endif #endif #if @GNULIB_LCHOWN@ # if @REPLACE_LCHOWN@ # undef lchown # define lchown rpl_lchown # endif # if !@HAVE_LCHOWN@ || @REPLACE_LCHOWN@ /* Change the owner of FILE to UID (if UID is not -1) and the group of FILE to GID (if GID is not -1). Do not follow symbolic links. Return 0 if successful, otherwise -1 and errno set. See the POSIX:2001 specification . */ extern int lchown (char const *file, uid_t owner, gid_t group) _GL_ARG_NONNULL ((1)); # endif #elif defined GNULIB_POSIXCHECK # undef lchown # if HAVE_RAW_DECL_LCHOWN _GL_WARN_ON_USE (lchown, "lchown is unportable to pre-POSIX.1-2001 systems - " "use gnulib module lchown for portability"); # endif #endif #if @GNULIB_LINK@ # if @REPLACE_LINK@ # define link rpl_link # endif /* Create a new hard link for an existing file. Return 0 if successful, otherwise -1 and errno set. See POSIX:2001 specification . */ # if !@HAVE_LINK@ || @REPLACE_LINK@ extern int link (const char *path1, const char *path2) _GL_ARG_NONNULL ((1, 2)); # endif #elif defined GNULIB_POSIXCHECK # undef link # if HAVE_RAW_DECL_LINK _GL_WARN_ON_USE (link, "link is unportable - " "use gnulib module link for portability"); # endif #endif #if @GNULIB_LINKAT@ # if @REPLACE_LINKAT@ # undef linkat # define linkat rpl_linkat # endif /* Create a new hard link for an existing file, relative to two directories. FLAG controls whether symlinks are followed. Return 0 if successful, otherwise -1 and errno set. */ # if !@HAVE_LINKAT@ || @REPLACE_LINKAT@ extern int linkat (int fd1, const char *path1, int fd2, const char *path2, int flag) _GL_ARG_NONNULL ((2, 4)); # endif #elif defined GNULIB_POSIXCHECK # undef linkat # if HAVE_RAW_DECL_LINKAT _GL_WARN_ON_USE (linkat, "linkat is unportable - " "use gnulib module linkat for portability"); # endif #endif #if @GNULIB_LSEEK@ # if @REPLACE_LSEEK@ /* Set the offset of FD relative to SEEK_SET, SEEK_CUR, or SEEK_END. Return the new offset if successful, otherwise -1 and errno set. See the POSIX:2001 specification . */ # define lseek rpl_lseek extern off_t lseek (int fd, off_t offset, int whence); # endif #elif defined GNULIB_POSIXCHECK # undef lseek # if HAVE_RAW_DECL_LSEEK _GL_WARN_ON_USE (lseek, "lseek does not fail with ESPIPE on pipes on some " "systems - use gnulib module lseek for portability"); # endif #endif #if @GNULIB_PIPE2@ /* Create a pipe, applying the given flags when opening the read-end of the pipe and the write-end of the pipe. The flags are a bitmask, possibly including O_CLOEXEC (defined in ) and O_TEXT, O_BINARY (defined in "binary-io.h"). Store the read-end as fd[0] and the write-end as fd[1]. Return 0 upon success, or -1 with errno set upon failure. See also the Linux man page at . */ # if @HAVE_PIPE2@ # define pipe2 rpl_pipe2 # endif extern int pipe2 (int fd[2], int flags) _GL_ARG_NONNULL ((1)); #elif defined GNULIB_POSIXCHECK # undef pipe2 # if HAVE_RAW_DECL_PIPE2 _GL_WARN_ON_USE (pipe2, "pipe2 is unportable - " "use gnulib module pipe2 for portability"); # endif #endif #if @GNULIB_PREAD@ # if @REPLACE_PREAD@ # define pread rpl_pread # endif /* Read at most BUFSIZE bytes from FD into BUF, starting at OFFSET. Return the number of bytes placed into BUF if successful, otherwise set errno and return -1. 0 indicates EOF. See the POSIX:2001 specification . */ # if !@HAVE_PREAD@ || @REPLACE_PREAD@ extern ssize_t pread (int fd, void *buf, size_t bufsize, off_t offset) _GL_ARG_NONNULL ((2)); # endif #elif defined GNULIB_POSIXCHECK # undef pread # if HAVE_RAW_DECL_PREAD _GL_WARN_ON_USE (pread, "pread is unportable - " "use gnulib module pread for portability"); # endif #endif #if @GNULIB_READLINK@ # if @REPLACE_READLINK@ # define readlink rpl_readlink # endif /* Read the contents of the symbolic link FILE and place the first BUFSIZE bytes of it into BUF. Return the number of bytes placed into BUF if successful, otherwise -1 and errno set. See the POSIX:2001 specification . */ # if !@HAVE_READLINK@ || @REPLACE_READLINK@ extern ssize_t readlink (const char *file, char *buf, size_t bufsize) _GL_ARG_NONNULL ((1, 2)); # endif #elif defined GNULIB_POSIXCHECK # undef readlink # if HAVE_RAW_DECL_READLINK _GL_WARN_ON_USE (readlink, "readlink is unportable - " "use gnulib module readlink for portability"); # endif #endif #if @GNULIB_READLINKAT@ # if !@HAVE_READLINKAT@ extern ssize_t readlinkat (int fd, char const *file, char *buf, size_t len) _GL_ARG_NONNULL ((2, 3)); # endif #elif defined GNULIB_POSIXCHECK # undef readlinkat # if HAVE_RAW_DECL_READLINKAT _GL_WARN_ON_USE (readlinkat, "readlinkat is not portable - " "use gnulib module symlinkat for portability"); # endif #endif #if @GNULIB_RMDIR@ # if @REPLACE_RMDIR@ # define rmdir rpl_rmdir /* Remove the directory DIR. */ extern int rmdir (char const *name) _GL_ARG_NONNULL ((1)); # endif #elif defined GNULIB_POSIXCHECK # undef rmdir # if HAVE_RAW_DECL_RMDIR _GL_WARN_ON_USE (rmdir, "rmdir is unportable - " "use gnulib module rmdir for portability"); # endif #endif #if @GNULIB_SLEEP@ # if @REPLACE_SLEEP@ # undef sleep # define sleep rpl_sleep # endif /* Pause the execution of the current thread for N seconds. Returns the number of seconds left to sleep. See the POSIX:2001 specification . */ # if !@HAVE_SLEEP@ || @REPLACE_SLEEP@ extern unsigned int sleep (unsigned int n); # endif #elif defined GNULIB_POSIXCHECK # undef sleep # if HAVE_RAW_DECL_SLEEP _GL_WARN_ON_USE (sleep, "sleep is unportable - " "use gnulib module sleep for portability"); # endif #endif #if @GNULIB_SYMLINK@ # if @REPLACE_SYMLINK@ # undef symlink # define symlink rpl_symlink # endif # if !@HAVE_SYMLINK@ || @REPLACE_SYMLINK@ extern int symlink (char const *contents, char const *file) _GL_ARG_NONNULL ((1, 2)); # endif #elif defined GNULIB_POSIXCHECK # undef symlink # if HAVE_RAW_DECL_SYMLINK _GL_WARN_ON_USE (symlink, "symlink is not portable - " "use gnulib module symlink for portability"); # endif #endif #if @GNULIB_SYMLINKAT@ # if !@HAVE_SYMLINKAT@ extern int symlinkat (char const *contents, int fd, char const *file) _GL_ARG_NONNULL ((1, 3)); # endif #elif defined GNULIB_POSIXCHECK # undef symlinkat # if HAVE_RAW_DECL_SYMLINKAT _GL_WARN_ON_USE (symlinkat, "symlinkat is not portable - " "use gnulib module symlinkat for portability"); # endif #endif #if @GNULIB_UNLINK@ # if @REPLACE_UNLINK@ # undef unlink # define unlink rpl_unlink extern int unlink (char const *file) _GL_ARG_NONNULL ((1)); # endif #elif defined GNULIB_POSIXCHECK # undef unlink # if HAVE_RAW_DECL_UNLINK _GL_WARN_ON_USE (unlink, "unlink is not portable - " "use gnulib module unlink for portability"); # endif #endif #if @GNULIB_UNLINKAT@ # if @REPLACE_UNLINKAT@ # undef unlinkat # define unlinkat rpl_unlinkat # endif # if !@HAVE_UNLINKAT@ || @REPLACE_UNLINKAT@ extern int unlinkat (int fd, char const *file, int flag) _GL_ARG_NONNULL ((2)); # endif #elif defined GNULIB_POSIXCHECK # undef unlinkat # if HAVE_RAW_DECL_UNLINKAT _GL_WARN_ON_USE (unlinkat, "unlinkat is not portable - " "use gnulib module openat for portability"); # endif #endif #if @GNULIB_USLEEP@ # if @REPLACE_USLEEP@ # undef usleep # define usleep rpl_usleep # endif # if !@HAVE_USLEEP@ || @REPLACE_USLEEP@ /* Pause the execution of the current thread for N microseconds. Returns 0 on completion, or -1 on range error. See the POSIX:2001 specification . */ extern int usleep (useconds_t n); # endif #elif defined GNULIB_POSIXCHECK # undef usleep # if HAVE_RAW_DECL_USLEEP _GL_WARN_ON_USE (usleep, "usleep is unportable - " "use gnulib module usleep for portability"); # endif #endif #if @GNULIB_WRITE@ && @REPLACE_WRITE@ && @GNULIB_UNISTD_H_SIGPIPE@ /* Write up to COUNT bytes starting at BUF to file descriptor FD. See the POSIX:2001 specification . */ # undef write # define write rpl_write extern ssize_t write (int fd, const void *buf, size_t count) _GL_ARG_NONNULL ((2)); #endif #ifdef __cplusplus } #endif #endif /* _GL_UNISTD_H */ #endif /* _GL_UNISTD_H */ libprelude-1.0.0/libmissing/isnanf.c0000664000076400007640000000154511341220435014354 00000000000000/* Test for NaN that does not need libm. Copyright (C) 2007, 2009, 2010 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 3 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 Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . */ /* Written by Bruno Haible , 2007. */ #define USE_FLOAT #include "isnan.c" libprelude-1.0.0/libmissing/netinet_in.in.h0000664000076400007640000000251711341220437015646 00000000000000/* Substitute for . Copyright (C) 2007-2010 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser 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 Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ #ifndef _GL_NETINET_IN_H #if @HAVE_NETINET_IN_H@ # if __GNUC__ >= 3 @PRAGMA_SYSTEM_HEADER@ # endif /* On many platforms, assumes prior inclusion of . */ # include /* The include_next requires a split double-inclusion guard. */ # @INCLUDE_NEXT@ @NEXT_NETINET_IN_H@ #endif #ifndef _GL_NETINET_IN_H #define _GL_NETINET_IN_H #if !@HAVE_NETINET_IN_H@ /* A platform that lacks . */ # include #endif #endif /* _GL_NETINET_IN_H */ #endif /* _GL_NETINET_IN_H */ libprelude-1.0.0/libmissing/isnanl-nolibm.h0000664000076400007640000000233411341220435015642 00000000000000/* Test for NaN that does not need libm. Copyright (C) 2007-2010 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 3 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 Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . */ #if HAVE_ISNANL_IN_LIBC /* Get declaration of isnan macro or (older) isnanl function. */ # include # if __GNUC__ >= 4 /* GCC 4.0 and newer provides three built-ins for isnan. */ # undef isnanl # define isnanl(x) __builtin_isnanl ((long double)(x)) # elif defined isnan # undef isnanl # define isnanl(x) isnan ((long double)(x)) # endif #else /* Test whether X is a NaN. */ # undef isnanl # define isnanl rpl_isnanl extern int isnanl (long double x); #endif libprelude-1.0.0/libmissing/signal.in.h0000664000076400007640000001635011341220440014761 00000000000000/* A GNU-like . Copyright (C) 2006-2010 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 3 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 Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . */ #if __GNUC__ >= 3 @PRAGMA_SYSTEM_HEADER@ #endif #if defined __need_sig_atomic_t || defined __need_sigset_t /* Special invocation convention inside glibc header files. */ # @INCLUDE_NEXT@ @NEXT_SIGNAL_H@ #else /* Normal invocation convention. */ #ifndef _GL_SIGNAL_H /* The include_next requires a split double-inclusion guard. */ #@INCLUDE_NEXT@ @NEXT_SIGNAL_H@ #ifndef _GL_SIGNAL_H #define _GL_SIGNAL_H /* The definition of _GL_ARG_NONNULL is copied here. */ /* The definition of _GL_WARN_ON_USE is copied here. */ /* Define pid_t, uid_t. Also, mingw defines sigset_t not in , but in . */ #include /* On AIX, sig_atomic_t already includes volatile. C99 requires that 'volatile sig_atomic_t' ignore the extra modifier, but C89 did not. Hence, redefine this to a non-volatile type as needed. */ #if ! @HAVE_TYPE_VOLATILE_SIG_ATOMIC_T@ typedef int rpl_sig_atomic_t; # undef sig_atomic_t # define sig_atomic_t rpl_sig_atomic_t #endif /* A set or mask of signals. */ #if !@HAVE_SIGSET_T@ typedef unsigned int sigset_t; #endif #ifdef __cplusplus extern "C" { #endif #if @GNULIB_SIGNAL_H_SIGPIPE@ # ifndef SIGPIPE /* Define SIGPIPE to a value that does not overlap with other signals. */ # define SIGPIPE 13 # define GNULIB_defined_SIGPIPE 1 /* To actually use SIGPIPE, you also need the gnulib modules 'sigprocmask', 'write', 'stdio'. */ # endif #endif #if @GNULIB_SIGPROCMASK@ # if !@HAVE_POSIX_SIGNALBLOCKING@ /* Maximum signal number + 1. */ # ifndef NSIG # define NSIG 32 # endif /* This code supports only 32 signals. */ typedef int verify_NSIG_constraint[2 * (NSIG <= 32) - 1]; /* Test whether a given signal is contained in a signal set. */ extern int sigismember (const sigset_t *set, int sig) _GL_ARG_NONNULL ((1)); /* Initialize a signal set to the empty set. */ extern int sigemptyset (sigset_t *set) _GL_ARG_NONNULL ((1)); /* Add a signal to a signal set. */ extern int sigaddset (sigset_t *set, int sig) _GL_ARG_NONNULL ((1)); /* Remove a signal from a signal set. */ extern int sigdelset (sigset_t *set, int sig) _GL_ARG_NONNULL ((1)); /* Fill a signal set with all possible signals. */ extern int sigfillset (sigset_t *set) _GL_ARG_NONNULL ((1)); /* Return the set of those blocked signals that are pending. */ extern int sigpending (sigset_t *set) _GL_ARG_NONNULL ((1)); /* If OLD_SET is not NULL, put the current set of blocked signals in *OLD_SET. Then, if SET is not NULL, affect the current set of blocked signals by combining it with *SET as indicated in OPERATION. In this implementation, you are not allowed to change a signal handler while the signal is blocked. */ # define SIG_BLOCK 0 /* blocked_set = blocked_set | *set; */ # define SIG_SETMASK 1 /* blocked_set = *set; */ # define SIG_UNBLOCK 2 /* blocked_set = blocked_set & ~*set; */ extern int sigprocmask (int operation, const sigset_t *set, sigset_t *old_set); # define signal rpl_signal /* Install the handler FUNC for signal SIG, and return the previous handler. */ extern void (*signal (int sig, void (*func) (int))) (int); # if GNULIB_defined_SIGPIPE /* Raise signal SIG. */ # undef raise # define raise rpl_raise extern int raise (int sig); # endif # endif /* !@HAVE_POSIX_SIGNALBLOCKING@ */ #elif defined GNULIB_POSIXCHECK # undef sigaddset # if HAVE_RAW_DECL_SIGADDSET _GL_WARN_ON_USE (sigaddset, "sigaddset is unportable - " "use the gnulib module sigprocmask for portability"); # endif # undef sigdelset # if HAVE_RAW_DECL_SIGDELSET _GL_WARN_ON_USE (sigdelset, "sigdelset is unportable - " "use the gnulib module sigprocmask for portability"); # endif # undef sigemptyset # if HAVE_RAW_DECL_SIGEMPTYSET _GL_WARN_ON_USE (sigemptyset, "sigemptyset is unportable - " "use the gnulib module sigprocmask for portability"); # endif # undef sigfillset # if HAVE_RAW_DECL_SIGFILLSET _GL_WARN_ON_USE (sigfillset, "sigfillset is unportable - " "use the gnulib module sigprocmask for portability"); # endif # undef sigismember # if HAVE_RAW_DECL_SIGISMEMBER _GL_WARN_ON_USE (sigismember, "sigismember is unportable - " "use the gnulib module sigprocmask for portability"); # endif # undef sigpending # if HAVE_RAW_DECL_SIGPENDING _GL_WARN_ON_USE (sigpending, "sigpending is unportable - " "use the gnulib module sigprocmask for portability"); # endif # undef sigprocmask # if HAVE_RAW_DECL_SIGPROCMASK _GL_WARN_ON_USE (sigprocmask, "sigprocmask is unportable - " "use the gnulib module sigprocmask for portability"); # endif #endif /* @GNULIB_SIGPROCMASK@ */ #if @GNULIB_SIGACTION@ # if !@HAVE_SIGACTION@ # if !@HAVE_SIGINFO_T@ /* Present to allow compilation, but unsupported by gnulib. */ union sigval { int sival_int; void *sival_ptr; }; /* Present to allow compilation, but unsupported by gnulib. */ struct siginfo_t { int si_signo; int si_code; int si_errno; pid_t si_pid; uid_t si_uid; void *si_addr; int si_status; long si_band; union sigval si_value; }; typedef struct siginfo_t siginfo_t; # endif /* !@HAVE_SIGINFO_T@ */ /* We assume that platforms which lack the sigaction() function also lack the 'struct sigaction' type, and vice versa. */ struct sigaction { union { void (*_sa_handler) (int); /* Present to allow compilation, but unsupported by gnulib. POSIX says that implementations may, but not must, make sa_sigaction overlap with sa_handler, but we know of no implementation where they do not overlap. */ void (*_sa_sigaction) (int, siginfo_t *, void *); } _sa_func; sigset_t sa_mask; /* Not all POSIX flags are supported. */ int sa_flags; }; # define sa_handler _sa_func._sa_handler # define sa_sigaction _sa_func._sa_sigaction /* Unsupported flags are not present. */ # define SA_RESETHAND 1 # define SA_NODEFER 2 # define SA_RESTART 4 extern int sigaction (int, const struct sigaction *restrict, struct sigaction *restrict); # elif !@HAVE_STRUCT_SIGACTION_SA_SIGACTION@ # define sa_sigaction sa_handler # endif /* !@HAVE_SIGACTION@, !@HAVE_STRUCT_SIGACTION_SA_SIGACTION@ */ #elif defined GNULIB_POSIXCHECK # undef sigaction # if HAVE_RAW_DECL_SIGACTION _GL_WARN_ON_USE (sigaction, "sigaction is unportable - " "use the gnulib module sigaction for portability"); # endif #endif /* Some systems don't have SA_NODEFER. */ #ifndef SA_NODEFER # define SA_NODEFER 0 #endif #ifdef __cplusplus } #endif #endif /* _GL_SIGNAL_H */ #endif /* _GL_SIGNAL_H */ #endif libprelude-1.0.0/libmissing/wchar.in.h0000664000076400007640000002166511341220442014617 00000000000000/* A substitute for ISO C99 , for platforms that have issues. Copyright (C) 2007-2010 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser 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 Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ /* Written by Eric Blake. */ /* * ISO C 99 for platforms that have issues. * * * For now, this just ensures proper prerequisite inclusion order and * the declaration of wcwidth(). */ #if __GNUC__ >= 3 @PRAGMA_SYSTEM_HEADER@ #endif #if defined __need_mbstate_t || defined __need_wint_t || (defined __hpux && ((defined _INTTYPES_INCLUDED && !defined strtoimax) || defined _GL_JUST_INCLUDE_SYSTEM_WCHAR_H)) || defined _GL_ALREADY_INCLUDING_WCHAR_H /* Special invocation convention: - Inside glibc and uClibc header files. - On HP-UX 11.00 we have a sequence of nested includes -> -> , and the latter includes , once indirectly -> -> -> and once directly. In both situations 'wint_t' is not yet defined, therefore we cannot provide the function overrides; instead include only the system's . - On IRIX 6.5, similarly, we have an include -> , and the latter includes . But here, we have no way to detect whether is completely included or is still being included. */ #@INCLUDE_NEXT@ @NEXT_WCHAR_H@ #else /* Normal invocation convention. */ #ifndef _GL_WCHAR_H #define _GL_ALREADY_INCLUDING_WCHAR_H /* Tru64 with Desktop Toolkit C has a bug: must be included before . BSD/OS 4.0.1 has a bug: , and must be included before . But avoid namespace pollution on glibc systems. */ #ifndef __GLIBC__ # include # include # include #endif /* Include the original if it exists. Some builds of uClibc lack it. */ /* The include_next requires a split double-inclusion guard. */ #if @HAVE_WCHAR_H@ # @INCLUDE_NEXT@ @NEXT_WCHAR_H@ #endif #undef _GL_ALREADY_INCLUDING_WCHAR_H #ifndef _GL_WCHAR_H #define _GL_WCHAR_H /* The definition of _GL_ARG_NONNULL is copied here. */ /* The definition of _GL_WARN_ON_USE is copied here. */ #ifdef __cplusplus extern "C" { #endif /* Define wint_t. (Also done in wctype.in.h.) */ #if !@HAVE_WINT_T@ && !defined wint_t # define wint_t int # ifndef WEOF # define WEOF -1 # endif #endif /* Override mbstate_t if it is too small. On IRIX 6.5, sizeof (mbstate_t) == 1, which is not sufficient for implementing mbrtowc for encodings like UTF-8. */ #if !(@HAVE_MBSINIT@ && @HAVE_MBRTOWC@) || @REPLACE_MBSTATE_T@ typedef int rpl_mbstate_t; # undef mbstate_t # define mbstate_t rpl_mbstate_t # define GNULIB_defined_mbstate_t 1 #endif /* Convert a single-byte character to a wide character. */ #if @GNULIB_BTOWC@ # if @REPLACE_BTOWC@ # undef btowc # define btowc rpl_btowc # endif # if !@HAVE_BTOWC@ || @REPLACE_BTOWC@ extern wint_t btowc (int c); # endif #elif defined GNULIB_POSIXCHECK # undef btowc # if HAVE_RAW_DECL_BTOWC _GL_WARN_ON_USE (btowc, "btowc is unportable - " "use gnulib module btowc for portability"); # endif #endif /* Convert a wide character to a single-byte character. */ #if @GNULIB_WCTOB@ # if @REPLACE_WCTOB@ # undef wctob # define wctob rpl_wctob # endif # if (!defined wctob && !@HAVE_DECL_WCTOB@) || @REPLACE_WCTOB@ /* wctob is provided by gnulib, or wctob exists but is not declared. */ extern int wctob (wint_t wc); # endif #elif defined GNULIB_POSIXCHECK # undef wctob # if HAVE_RAW_DECL_WCTOB _GL_WARN_ON_USE (wctob, "wctob is unportable - " "use gnulib module wctob for portability"); # endif #endif /* Test whether *PS is in the initial state. */ #if @GNULIB_MBSINIT@ # if @REPLACE_MBSINIT@ # undef mbsinit # define mbsinit rpl_mbsinit # endif # if !@HAVE_MBSINIT@ || @REPLACE_MBSINIT@ extern int mbsinit (const mbstate_t *ps); # endif #elif defined GNULIB_POSIXCHECK # undef mbsinit # if HAVE_RAW_DECL_MBSINIT _GL_WARN_ON_USE (mbsinit, "mbsinit is unportable - " "use gnulib module mbsinit for portability"); # endif #endif /* Convert a multibyte character to a wide character. */ #if @GNULIB_MBRTOWC@ # if @REPLACE_MBRTOWC@ # undef mbrtowc # define mbrtowc rpl_mbrtowc # endif # if !@HAVE_MBRTOWC@ || @REPLACE_MBRTOWC@ extern size_t mbrtowc (wchar_t *pwc, const char *s, size_t n, mbstate_t *ps); # endif #elif defined GNULIB_POSIXCHECK # undef mbrtowc # if HAVE_RAW_DECL_MBRTOWC _GL_WARN_ON_USE (mbrtowc, "mbrtowc is unportable - " "use gnulib module mbrtowc for portability"); # endif #endif /* Recognize a multibyte character. */ #if @GNULIB_MBRLEN@ # if @REPLACE_MBRLEN@ # undef mbrlen # define mbrlen rpl_mbrlen # endif # if !@HAVE_MBRLEN@ || @REPLACE_MBRLEN@ extern size_t mbrlen (const char *s, size_t n, mbstate_t *ps); # endif #elif defined GNULIB_POSIXCHECK # undef mbrlen # if HAVE_RAW_DECL_MBRLEN _GL_WARN_ON_USE (mbrlen, "mbrlen is unportable - " "use gnulib module mbrlen for portability"); # endif #endif /* Convert a string to a wide string. */ #if @GNULIB_MBSRTOWCS@ # if @REPLACE_MBSRTOWCS@ # undef mbsrtowcs # define mbsrtowcs rpl_mbsrtowcs # endif # if !@HAVE_MBSRTOWCS@ || @REPLACE_MBSRTOWCS@ extern size_t mbsrtowcs (wchar_t *dest, const char **srcp, size_t len, mbstate_t *ps) _GL_ARG_NONNULL ((2)); # endif #elif defined GNULIB_POSIXCHECK # undef mbsrtowcs # if HAVE_RAW_DECL_MBSRTOWCS _GL_WARN_ON_USE (mbsrtowcs, "mbsrtowcs is unportable - " "use gnulib module mbsrtowcs for portability"); # endif #endif /* Convert a string to a wide string. */ #if @GNULIB_MBSNRTOWCS@ # if @REPLACE_MBSNRTOWCS@ # undef mbsnrtowcs # define mbsnrtowcs rpl_mbsnrtowcs # endif # if !@HAVE_MBSNRTOWCS@ || @REPLACE_MBSNRTOWCS@ extern size_t mbsnrtowcs (wchar_t *dest, const char **srcp, size_t srclen, size_t len, mbstate_t *ps) _GL_ARG_NONNULL ((2)); # endif #elif defined GNULIB_POSIXCHECK # undef mbsnrtowcs # if HAVE_RAW_DECL_MBSNRTOWCS _GL_WARN_ON_USE (mbsnrtowcs, "mbsnrtowcs is unportable - " "use gnulib module mbsnrtowcs for portability"); # endif #endif /* Convert a wide character to a multibyte character. */ #if @GNULIB_WCRTOMB@ # if @REPLACE_WCRTOMB@ # undef wcrtomb # define wcrtomb rpl_wcrtomb # endif # if !@HAVE_WCRTOMB@ || @REPLACE_WCRTOMB@ extern size_t wcrtomb (char *s, wchar_t wc, mbstate_t *ps); # endif #elif defined GNULIB_POSIXCHECK # undef wcrtomb # if HAVE_RAW_DECL_WCRTOMB _GL_WARN_ON_USE (wcrtomb, "wcrtomb is unportable - " "use gnulib module wcrtomb for portability"); # endif #endif /* Convert a wide string to a string. */ #if @GNULIB_WCSRTOMBS@ # if @REPLACE_WCSRTOMBS@ # undef wcsrtombs # define wcsrtombs rpl_wcsrtombs # endif # if !@HAVE_WCSRTOMBS@ || @REPLACE_WCSRTOMBS@ extern size_t wcsrtombs (char *dest, const wchar_t **srcp, size_t len, mbstate_t *ps) _GL_ARG_NONNULL ((2)); # endif #elif defined GNULIB_POSIXCHECK # undef wcsrtombs # if HAVE_RAW_DECL_WCSRTOMBS _GL_WARN_ON_USE (wcsrtombs, "wcsrtombs is unportable - " "use gnulib module wcsrtombs for portability"); # endif #endif /* Convert a wide string to a string. */ #if @GNULIB_WCSNRTOMBS@ # if @REPLACE_WCSNRTOMBS@ # undef wcsnrtombs # define wcsnrtombs rpl_wcsnrtombs # endif # if !@HAVE_WCSNRTOMBS@ || @REPLACE_WCSNRTOMBS@ extern size_t wcsnrtombs (char *dest, const wchar_t **srcp, size_t srclen, size_t len, mbstate_t *ps) _GL_ARG_NONNULL ((2)); # endif #elif defined GNULIB_POSIXCHECK # undef wcsnrtombs # if HAVE_RAW_DECL_WCSNRTOMBS _GL_WARN_ON_USE (wcsnrtombs, "wcsnrtombs is unportable - " "use gnulib module wcsnrtombs for portability"); # endif #endif /* Return the number of screen columns needed for WC. */ #if @GNULIB_WCWIDTH@ # if @REPLACE_WCWIDTH@ # undef wcwidth # define wcwidth rpl_wcwidth extern int wcwidth (wchar_t); # else # if !defined wcwidth && !@HAVE_DECL_WCWIDTH@ /* wcwidth exists but is not declared. */ extern int wcwidth (int /* actually wchar_t */); # endif # endif #elif defined GNULIB_POSIXCHECK # undef wcwidth # if HAVE_RAW_DECL_WCWIDTH _GL_WARN_ON_USE (wcwidth, "wcwidth is unportable - " "use gnulib module wcwidth for portability"); # endif #endif #ifdef __cplusplus } #endif #endif /* _GL_WCHAR_H */ #endif /* _GL_WCHAR_H */ #endif libprelude-1.0.0/libmissing/lseek.c0000664000076400007640000000336111341220435014177 00000000000000/* An lseek() function that detects pipes. Copyright (C) 2007, 2009, 2010 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser 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 Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ #include /* Specification. */ #include #if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ /* Windows platforms. */ /* Get GetFileType. */ # include #else # include #endif #include #undef lseek off_t rpl_lseek (int fd, off_t offset, int whence) { #if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ /* mingw lseek mistakenly succeeds on pipes, sockets, and terminals. */ HANDLE h = (HANDLE) _get_osfhandle (fd); if (h == INVALID_HANDLE_VALUE) { errno = EBADF; return -1; } if (GetFileType (h) != FILE_TYPE_DISK) { errno = ESPIPE; return -1; } #else /* BeOS lseek mistakenly succeeds on pipes... */ struct stat statbuf; if (fstat (fd, &statbuf) < 0) return -1; if (!S_ISREG (statbuf.st_mode)) { errno = ESPIPE; return -1; } #endif return lseek (fd, offset, whence); } libprelude-1.0.0/libmissing/stdbool.in.h0000664000076400007640000001147711341220440015157 00000000000000/* Copyright (C) 2001-2003, 2006-2010 Free Software Foundation, Inc. Written by Bruno Haible , 2001. This program is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser 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 Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ #ifndef _GL_STDBOOL_H #define _GL_STDBOOL_H /* ISO C 99 for platforms that lack it. */ /* Usage suggestions: Programs that use should be aware of some limitations and standards compliance issues. Standards compliance: - must be #included before 'bool', 'false', 'true' can be used. - You cannot assume that sizeof (bool) == 1. - Programs should not undefine the macros bool, true, and false, as C99 lists that as an "obsolescent feature". Limitations of this substitute, when used in a C89 environment: - must be #included before the '_Bool' type can be used. - You cannot assume that _Bool is a typedef; it might be a macro. - Bit-fields of type 'bool' are not supported. Portable code should use 'unsigned int foo : 1;' rather than 'bool foo : 1;'. - In C99, casts and automatic conversions to '_Bool' or 'bool' are performed in such a way that every nonzero value gets converted to 'true', and zero gets converted to 'false'. This doesn't work with this substitute. With this substitute, only the values 0 and 1 give the expected result when converted to _Bool' or 'bool'. Also, it is suggested that programs use 'bool' rather than '_Bool'; this isn't required, but 'bool' is more common. */ /* 7.16. Boolean type and values */ /* BeOS already #defines false 0, true 1. We use the same definitions below, but temporarily we have to #undef them. */ #if defined __BEOS__ && !defined __HAIKU__ # include /* defines bool but not _Bool */ # undef false # undef true #endif /* For the sake of symbolic names in gdb, we define true and false as enum constants, not only as macros. It is tempting to write typedef enum { false = 0, true = 1 } _Bool; so that gdb prints values of type 'bool' symbolically. But if we do this, values of type '_Bool' may promote to 'int' or 'unsigned int' (see ISO C 99 6.7.2.2.(4)); however, '_Bool' must promote to 'int' (see ISO C 99 6.3.1.1.(2)). So we add a negative value to the enum; this ensures that '_Bool' promotes to 'int'. */ #if defined __cplusplus || (defined __BEOS__ && !defined __HAIKU__) /* A compiler known to have 'bool'. */ /* If the compiler already has both 'bool' and '_Bool', we can assume they are the same types. */ # if !@HAVE__BOOL@ typedef bool _Bool; # endif #else # if !defined __GNUC__ /* If @HAVE__BOOL@: Some HP-UX cc and AIX IBM C compiler versions have compiler bugs when the built-in _Bool type is used. See http://gcc.gnu.org/ml/gcc-patches/2003-12/msg02303.html http://lists.gnu.org/archive/html/bug-coreutils/2005-11/msg00161.html http://lists.gnu.org/archive/html/bug-coreutils/2005-10/msg00086.html Similar bugs are likely with other compilers as well; this file wouldn't be used if was working. So we override the _Bool type. If !@HAVE__BOOL@: Need to define _Bool ourselves. As 'signed char' or as an enum type? Use of a typedef, with SunPRO C, leads to a stupid "warning: _Bool is a keyword in ISO C99". Use of an enum type, with IRIX cc, leads to a stupid "warning(1185): enumerated type mixed with another type". Even the existence of an enum type, without a typedef, "Invalid enumerator. (badenum)" with HP-UX cc on Tru64. The only benefit of the enum, debuggability, is not important with these compilers. So use 'signed char' and no enum. */ # define _Bool signed char # else /* With this compiler, trust the _Bool type if the compiler has it. */ # if !@HAVE__BOOL@ typedef enum { _Bool_must_promote_to_int = -1, false = 0, true = 1 } _Bool; # endif # endif #endif #define bool _Bool /* The other macros must be usable in preprocessor directives. */ #define false 0 #define true 1 #define __bool_true_false_are_defined 1 #endif /* _GL_STDBOOL_H */ libprelude-1.0.0/libmissing/alloca.c0000664000076400007640000003512611341220434014332 00000000000000/* alloca.c -- allocate automatically reclaimed memory (Mostly) portable public-domain implementation -- D A Gwyn This implementation of the PWB library alloca function, which is used to allocate space off the run-time stack so that it is automatically reclaimed upon procedure exit, was inspired by discussions with J. Q. Johnson of Cornell. J.Otto Tennant contributed the Cray support. There are some preprocessor constants that can be defined when compiling for your specific system, for improved efficiency; however, the defaults should be okay. The general concept of this implementation is to keep track of all alloca-allocated blocks, and reclaim any that are found to be deeper in the stack than the current invocation. This heuristic does not reclaim storage as soon as it becomes invalid, but it will do so eventually. As a special case, alloca(0) reclaims storage without allocating any. It is a good idea to use alloca(0) in your main control loop, etc. to force garbage collection. */ #include #include #include #include #ifdef emacs # include "lisp.h" # include "blockinput.h" # ifdef EMACS_FREE # undef free # define free EMACS_FREE # endif #else # define memory_full() abort () #endif /* If compiling with GCC 2, this file's not needed. */ #if !defined (__GNUC__) || __GNUC__ < 2 /* If someone has defined alloca as a macro, there must be some other way alloca is supposed to work. */ # ifndef alloca # ifdef emacs # ifdef static /* actually, only want this if static is defined as "" -- this is for usg, in which emacs must undefine static in order to make unexec workable */ # ifndef STACK_DIRECTION you lose -- must know STACK_DIRECTION at compile-time /* Using #error here is not wise since this file should work for old and obscure compilers. */ # endif /* STACK_DIRECTION undefined */ # endif /* static */ # endif /* emacs */ /* If your stack is a linked list of frames, you have to provide an "address metric" ADDRESS_FUNCTION macro. */ # if defined (CRAY) && defined (CRAY_STACKSEG_END) long i00afunc (); # define ADDRESS_FUNCTION(arg) (char *) i00afunc (&(arg)) # else # define ADDRESS_FUNCTION(arg) &(arg) # endif /* Define STACK_DIRECTION if you know the direction of stack growth for your system; otherwise it will be automatically deduced at run-time. STACK_DIRECTION > 0 => grows toward higher addresses STACK_DIRECTION < 0 => grows toward lower addresses STACK_DIRECTION = 0 => direction of growth unknown */ # ifndef STACK_DIRECTION # define STACK_DIRECTION 0 /* Direction unknown. */ # endif # if STACK_DIRECTION != 0 # define STACK_DIR STACK_DIRECTION /* Known at compile-time. */ # else /* STACK_DIRECTION == 0; need run-time code. */ static int stack_dir; /* 1 or -1 once known. */ # define STACK_DIR stack_dir static void find_stack_direction (void) { static char *addr = NULL; /* Address of first `dummy', once known. */ auto char dummy; /* To get stack address. */ if (addr == NULL) { /* Initial entry. */ addr = ADDRESS_FUNCTION (dummy); find_stack_direction (); /* Recurse once. */ } else { /* Second entry. */ if (ADDRESS_FUNCTION (dummy) > addr) stack_dir = 1; /* Stack grew upward. */ else stack_dir = -1; /* Stack grew downward. */ } } # endif /* STACK_DIRECTION == 0 */ /* An "alloca header" is used to: (a) chain together all alloca'ed blocks; (b) keep track of stack depth. It is very important that sizeof(header) agree with malloc alignment chunk size. The following default should work okay. */ # ifndef ALIGN_SIZE # define ALIGN_SIZE sizeof(double) # endif typedef union hdr { char align[ALIGN_SIZE]; /* To force sizeof(header). */ struct { union hdr *next; /* For chaining headers. */ char *deep; /* For stack depth measure. */ } h; } header; static header *last_alloca_header = NULL; /* -> last alloca header. */ /* Return a pointer to at least SIZE bytes of storage, which will be automatically reclaimed upon exit from the procedure that called alloca. Originally, this space was supposed to be taken from the current stack frame of the caller, but that method cannot be made to work for some implementations of C, for example under Gould's UTX/32. */ void * alloca (size_t size) { auto char probe; /* Probes stack depth: */ register char *depth = ADDRESS_FUNCTION (probe); # if STACK_DIRECTION == 0 if (STACK_DIR == 0) /* Unknown growth direction. */ find_stack_direction (); # endif /* Reclaim garbage, defined as all alloca'd storage that was allocated from deeper in the stack than currently. */ { register header *hp; /* Traverses linked list. */ # ifdef emacs BLOCK_INPUT; # endif for (hp = last_alloca_header; hp != NULL;) if ((STACK_DIR > 0 && hp->h.deep > depth) || (STACK_DIR < 0 && hp->h.deep < depth)) { register header *np = hp->h.next; free (hp); /* Collect garbage. */ hp = np; /* -> next header. */ } else break; /* Rest are not deeper. */ last_alloca_header = hp; /* -> last valid storage. */ # ifdef emacs UNBLOCK_INPUT; # endif } if (size == 0) return NULL; /* No allocation required. */ /* Allocate combined header + user data storage. */ { /* Address of header. */ register header *new; size_t combined_size = sizeof (header) + size; if (combined_size < sizeof (header)) memory_full (); new = malloc (combined_size); if (! new) memory_full (); new->h.next = last_alloca_header; new->h.deep = depth; last_alloca_header = new; /* User storage begins just after header. */ return (void *) (new + 1); } } # if defined (CRAY) && defined (CRAY_STACKSEG_END) # ifdef DEBUG_I00AFUNC # include # endif # ifndef CRAY_STACK # define CRAY_STACK # ifndef CRAY2 /* Stack structures for CRAY-1, CRAY X-MP, and CRAY Y-MP */ struct stack_control_header { long shgrow:32; /* Number of times stack has grown. */ long shaseg:32; /* Size of increments to stack. */ long shhwm:32; /* High water mark of stack. */ long shsize:32; /* Current size of stack (all segments). */ }; /* The stack segment linkage control information occurs at the high-address end of a stack segment. (The stack grows from low addresses to high addresses.) The initial part of the stack segment linkage control information is 0200 (octal) words. This provides for register storage for the routine which overflows the stack. */ struct stack_segment_linkage { long ss[0200]; /* 0200 overflow words. */ long sssize:32; /* Number of words in this segment. */ long ssbase:32; /* Offset to stack base. */ long:32; long sspseg:32; /* Offset to linkage control of previous segment of stack. */ long:32; long sstcpt:32; /* Pointer to task common address block. */ long sscsnm; /* Private control structure number for microtasking. */ long ssusr1; /* Reserved for user. */ long ssusr2; /* Reserved for user. */ long sstpid; /* Process ID for pid based multi-tasking. */ long ssgvup; /* Pointer to multitasking thread giveup. */ long sscray[7]; /* Reserved for Cray Research. */ long ssa0; long ssa1; long ssa2; long ssa3; long ssa4; long ssa5; long ssa6; long ssa7; long sss0; long sss1; long sss2; long sss3; long sss4; long sss5; long sss6; long sss7; }; # else /* CRAY2 */ /* The following structure defines the vector of words returned by the STKSTAT library routine. */ struct stk_stat { long now; /* Current total stack size. */ long maxc; /* Amount of contiguous space which would be required to satisfy the maximum stack demand to date. */ long high_water; /* Stack high-water mark. */ long overflows; /* Number of stack overflow ($STKOFEN) calls. */ long hits; /* Number of internal buffer hits. */ long extends; /* Number of block extensions. */ long stko_mallocs; /* Block allocations by $STKOFEN. */ long underflows; /* Number of stack underflow calls ($STKRETN). */ long stko_free; /* Number of deallocations by $STKRETN. */ long stkm_free; /* Number of deallocations by $STKMRET. */ long segments; /* Current number of stack segments. */ long maxs; /* Maximum number of stack segments so far. */ long pad_size; /* Stack pad size. */ long current_address; /* Current stack segment address. */ long current_size; /* Current stack segment size. This number is actually corrupted by STKSTAT to include the fifteen word trailer area. */ long initial_address; /* Address of initial segment. */ long initial_size; /* Size of initial segment. */ }; /* The following structure describes the data structure which trails any stack segment. I think that the description in 'asdef' is out of date. I only describe the parts that I am sure about. */ struct stk_trailer { long this_address; /* Address of this block. */ long this_size; /* Size of this block (does not include this trailer). */ long unknown2; long unknown3; long link; /* Address of trailer block of previous segment. */ long unknown5; long unknown6; long unknown7; long unknown8; long unknown9; long unknown10; long unknown11; long unknown12; long unknown13; long unknown14; }; # endif /* CRAY2 */ # endif /* not CRAY_STACK */ # ifdef CRAY2 /* Determine a "stack measure" for an arbitrary ADDRESS. I doubt that "lint" will like this much. */ static long i00afunc (long *address) { struct stk_stat status; struct stk_trailer *trailer; long *block, size; long result = 0; /* We want to iterate through all of the segments. The first step is to get the stack status structure. We could do this more quickly and more directly, perhaps, by referencing the $LM00 common block, but I know that this works. */ STKSTAT (&status); /* Set up the iteration. */ trailer = (struct stk_trailer *) (status.current_address + status.current_size - 15); /* There must be at least one stack segment. Therefore it is a fatal error if "trailer" is null. */ if (trailer == 0) abort (); /* Discard segments that do not contain our argument address. */ while (trailer != 0) { block = (long *) trailer->this_address; size = trailer->this_size; if (block == 0 || size == 0) abort (); trailer = (struct stk_trailer *) trailer->link; if ((block <= address) && (address < (block + size))) break; } /* Set the result to the offset in this segment and add the sizes of all predecessor segments. */ result = address - block; if (trailer == 0) { return result; } do { if (trailer->this_size <= 0) abort (); result += trailer->this_size; trailer = (struct stk_trailer *) trailer->link; } while (trailer != 0); /* We are done. Note that if you present a bogus address (one not in any segment), you will get a different number back, formed from subtracting the address of the first block. This is probably not what you want. */ return (result); } # else /* not CRAY2 */ /* Stack address function for a CRAY-1, CRAY X-MP, or CRAY Y-MP. Determine the number of the cell within the stack, given the address of the cell. The purpose of this routine is to linearize, in some sense, stack addresses for alloca. */ static long i00afunc (long address) { long stkl = 0; long size, pseg, this_segment, stack; long result = 0; struct stack_segment_linkage *ssptr; /* Register B67 contains the address of the end of the current stack segment. If you (as a subprogram) store your registers on the stack and find that you are past the contents of B67, you have overflowed the segment. B67 also points to the stack segment linkage control area, which is what we are really interested in. */ stkl = CRAY_STACKSEG_END (); ssptr = (struct stack_segment_linkage *) stkl; /* If one subtracts 'size' from the end of the segment, one has the address of the first word of the segment. If this is not the first segment, 'pseg' will be nonzero. */ pseg = ssptr->sspseg; size = ssptr->sssize; this_segment = stkl - size; /* It is possible that calling this routine itself caused a stack overflow. Discard stack segments which do not contain the target address. */ while (!(this_segment <= address && address <= stkl)) { # ifdef DEBUG_I00AFUNC fprintf (stderr, "%011o %011o %011o\n", this_segment, address, stkl); # endif if (pseg == 0) break; stkl = stkl - pseg; ssptr = (struct stack_segment_linkage *) stkl; size = ssptr->sssize; pseg = ssptr->sspseg; this_segment = stkl - size; } result = address - this_segment; /* If you subtract pseg from the current end of the stack, you get the address of the previous stack segment's end. This seems a little convoluted to me, but I'll bet you save a cycle somewhere. */ while (pseg != 0) { # ifdef DEBUG_I00AFUNC fprintf (stderr, "%011o %011o\n", pseg, size); # endif stkl = stkl - pseg; ssptr = (struct stack_segment_linkage *) stkl; size = ssptr->sssize; pseg = ssptr->sspseg; result += size; } return (result); } # endif /* not CRAY2 */ # endif /* CRAY */ # endif /* no alloca */ #endif /* not GCC version 2 */ libprelude-1.0.0/libmissing/mbrtowc.c0000664000076400007640000002450211341220437014553 00000000000000/* Convert multibyte character to wide character. Copyright (C) 1999-2002, 2005-2010 Free Software Foundation, Inc. Written by Bruno Haible , 2008. This program is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 3 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 Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . */ #include /* Specification. */ #include #if GNULIB_defined_mbstate_t /* Implement mbrtowc() on top of mbtowc(). */ # include # include # include "localcharset.h" # include "streq.h" # include "verify.h" verify (sizeof (mbstate_t) >= 4); static char internal_state[4]; size_t mbrtowc (wchar_t *pwc, const char *s, size_t n, mbstate_t *ps) { char *pstate = (char *)ps; if (pstate == NULL) pstate = internal_state; if (s == NULL) { pwc = NULL; s = ""; n = 1; } if (n == 0) return (size_t)(-2); /* Here n > 0. */ { size_t nstate = pstate[0]; char buf[4]; const char *p; size_t m; switch (nstate) { case 0: p = s; m = n; break; case 3: buf[2] = pstate[3]; /*FALLTHROUGH*/ case 2: buf[1] = pstate[2]; /*FALLTHROUGH*/ case 1: buf[0] = pstate[1]; p = buf; m = nstate; buf[m++] = s[0]; if (n >= 2 && m < 4) { buf[m++] = s[1]; if (n >= 3 && m < 4) buf[m++] = s[2]; } break; default: errno = EINVAL; return (size_t)(-1); } /* Here m > 0. */ # if __GLIBC__ /* Work around bug */ mbtowc (NULL, NULL, 0); # endif { int res = mbtowc (pwc, p, m); if (res >= 0) { if (pwc != NULL && ((*pwc == 0) != (res == 0))) abort (); if (nstate >= (res > 0 ? res : 1)) abort (); res -= nstate; pstate[0] = 0; return res; } /* mbtowc does not distinguish between invalid and incomplete multibyte sequences. But mbrtowc needs to make this distinction. There are two possible approaches: - Use iconv() and its return value. - Use built-in knowledge about the possible encodings. Given the low quality of implementation of iconv() on the systems that lack mbrtowc(), we use the second approach. The possible encodings are: - 8-bit encodings, - EUC-JP, EUC-KR, GB2312, EUC-TW, BIG5, GB18030, SJIS, - UTF-8. Use specialized code for each. */ if (m >= 4 || m >= MB_CUR_MAX) goto invalid; /* Here MB_CUR_MAX > 1 and 0 < m < 4. */ { const char *encoding = locale_charset (); if (STREQ (encoding, "UTF-8", 'U', 'T', 'F', '-', '8', 0, 0, 0, 0)) { /* Cf. unistr/u8-mblen.c. */ unsigned char c = (unsigned char) p[0]; if (c >= 0xc2) { if (c < 0xe0) { if (m == 1) goto incomplete; } else if (c < 0xf0) { if (m == 1) goto incomplete; if (m == 2) { unsigned char c2 = (unsigned char) p[1]; if ((c2 ^ 0x80) < 0x40 && (c >= 0xe1 || c2 >= 0xa0) && (c != 0xed || c2 < 0xa0)) goto incomplete; } } else if (c <= 0xf4) { if (m == 1) goto incomplete; else /* m == 2 || m == 3 */ { unsigned char c2 = (unsigned char) p[1]; if ((c2 ^ 0x80) < 0x40 && (c >= 0xf1 || c2 >= 0x90) && (c < 0xf4 || (c == 0xf4 && c2 < 0x90))) { if (m == 2) goto incomplete; else /* m == 3 */ { unsigned char c3 = (unsigned char) p[2]; if ((c3 ^ 0x80) < 0x40) goto incomplete; } } } } } goto invalid; } /* As a reference for this code, you can use the GNU libiconv implementation. Look for uses of the RET_TOOFEW macro. */ if (STREQ (encoding, "EUC-JP", 'E', 'U', 'C', '-', 'J', 'P', 0, 0, 0)) { if (m == 1) { unsigned char c = (unsigned char) p[0]; if ((c >= 0xa1 && c < 0xff) || c == 0x8e || c == 0x8f) goto incomplete; } if (m == 2) { unsigned char c = (unsigned char) p[0]; if (c == 0x8f) { unsigned char c2 = (unsigned char) p[1]; if (c2 >= 0xa1 && c2 < 0xff) goto incomplete; } } goto invalid; } if (STREQ (encoding, "EUC-KR", 'E', 'U', 'C', '-', 'K', 'R', 0, 0, 0) || STREQ (encoding, "GB2312", 'G', 'B', '2', '3', '1', '2', 0, 0, 0) || STREQ (encoding, "BIG5", 'B', 'I', 'G', '5', 0, 0, 0, 0, 0)) { if (m == 1) { unsigned char c = (unsigned char) p[0]; if (c >= 0xa1 && c < 0xff) goto incomplete; } goto invalid; } if (STREQ (encoding, "EUC-TW", 'E', 'U', 'C', '-', 'T', 'W', 0, 0, 0)) { if (m == 1) { unsigned char c = (unsigned char) p[0]; if ((c >= 0xa1 && c < 0xff) || c == 0x8e) goto incomplete; } else /* m == 2 || m == 3 */ { unsigned char c = (unsigned char) p[0]; if (c == 0x8e) goto incomplete; } goto invalid; } if (STREQ (encoding, "GB18030", 'G', 'B', '1', '8', '0', '3', '0', 0, 0)) { if (m == 1) { unsigned char c = (unsigned char) p[0]; if ((c >= 0x90 && c <= 0xe3) || (c >= 0xf8 && c <= 0xfe)) goto incomplete; } else /* m == 2 || m == 3 */ { unsigned char c = (unsigned char) p[0]; if (c >= 0x90 && c <= 0xe3) { unsigned char c2 = (unsigned char) p[1]; if (c2 >= 0x30 && c2 <= 0x39) { if (m == 2) goto incomplete; else /* m == 3 */ { unsigned char c3 = (unsigned char) p[2]; if (c3 >= 0x81 && c3 <= 0xfe) goto incomplete; } } } } goto invalid; } if (STREQ (encoding, "SJIS", 'S', 'J', 'I', 'S', 0, 0, 0, 0, 0)) { if (m == 1) { unsigned char c = (unsigned char) p[0]; if ((c >= 0x81 && c <= 0x9f) || (c >= 0xe0 && c <= 0xea) || (c >= 0xf0 && c <= 0xf9)) goto incomplete; } goto invalid; } /* An unknown multibyte encoding. */ goto incomplete; } incomplete: { size_t k = nstate; /* Here 0 <= k < m < 4. */ pstate[++k] = s[0]; if (k < m) { pstate[++k] = s[1]; if (k < m) pstate[++k] = s[2]; } if (k != m) abort (); } pstate[0] = m; return (size_t)(-2); invalid: errno = EILSEQ; /* The conversion state is undefined, says POSIX. */ return (size_t)(-1); } } } #else /* Override the system's mbrtowc() function. */ # undef mbrtowc size_t rpl_mbrtowc (wchar_t *pwc, const char *s, size_t n, mbstate_t *ps) { # if MBRTOWC_NULL_ARG_BUG || MBRTOWC_RETVAL_BUG if (s == NULL) { pwc = NULL; s = ""; n = 1; } # endif # if MBRTOWC_RETVAL_BUG { static mbstate_t internal_state; /* Override mbrtowc's internal state. We can not call mbsinit() on the hidden internal state, but we can call it on our variable. */ if (ps == NULL) ps = &internal_state; if (!mbsinit (ps)) { /* Parse the rest of the multibyte character byte for byte. */ size_t count = 0; for (; n > 0; s++, n--) { wchar_t wc; size_t ret = mbrtowc (&wc, s, 1, ps); if (ret == (size_t)(-1)) return (size_t)(-1); count++; if (ret != (size_t)(-2)) { /* The multibyte character has been completed. */ if (pwc != NULL) *pwc = wc; return (wc == 0 ? 0 : count); } } return (size_t)(-2); } } # endif # if MBRTOWC_NUL_RETVAL_BUG { wchar_t wc; size_t ret = mbrtowc (&wc, s, n, ps); if (ret != (size_t)(-1) && ret != (size_t)(-2)) { if (pwc != NULL) *pwc = wc; if (wc == 0) ret = 0; } return ret; } # else return mbrtowc (pwc, s, n, ps); # endif } #endif libprelude-1.0.0/libmissing/btowc.c0000664000076400007640000000211111341220434014201 00000000000000/* Convert unibyte character to wide character. Copyright (C) 2008, 2009, 2010 Free Software Foundation, Inc. Written by Bruno Haible , 2008. This program is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 3 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 Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . */ #include /* Specification. */ #include #include wint_t btowc (int c) { if (c != EOF) { char buf[1]; wchar_t wc; buf[0] = c; if (mbtowc (&wc, buf, 1) >= 0) return wc; } return WEOF; } libprelude-1.0.0/libmissing/sleep.c0000664000076400007640000000425211341220440014200 00000000000000/* Pausing execution of the current thread. Copyright (C) 2007, 2009, 2010 Free Software Foundation, Inc. Written by Bruno Haible , 2007. This program is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 3 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 Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . */ #include /* Specification. */ #include #include #include "verify.h" #if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ # define WIN32_LEAN_AND_MEAN /* avoid including junk */ # include unsigned int sleep (unsigned int seconds) { unsigned int remaining; /* Sleep for 1 second many times, because 1. Sleep is not interruptiple by Ctrl-C, 2. we want to avoid arithmetic overflow while multiplying with 1000. */ for (remaining = seconds; remaining > 0; remaining--) Sleep (1000); return remaining; } #elif HAVE_SLEEP # undef sleep /* Guarantee unlimited sleep and a reasonable return value. Cygwin 1.5.x rejects attempts to sleep more than 49.7 days (2**32 milliseconds), but uses uninitialized memory which results in a garbage answer. */ unsigned int rpl_sleep (unsigned int seconds) { /* This requires int larger than 16 bits. */ verify (UINT_MAX / 49 / 24 / 60 / 60); const unsigned int limit = 49 * 24 * 60 * 60; while (limit < seconds) { unsigned int result; seconds -= limit; result = sleep (limit); if (result) return seconds + result; } return sleep (seconds); } #else /* !HAVE_SLEEP */ #error "Please port gnulib sleep.c to your platform, possibly using usleep() or select(), then report this to bug-gnulib." #endif libprelude-1.0.0/libmissing/close-hook.h0000664000076400007640000000461411341220434015145 00000000000000/* Hook for making the close() function extensible. Copyright (C) 2009, 2010 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 3 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 Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . */ #ifndef CLOSE_HOOK_H #define CLOSE_HOOK_H #ifdef __cplusplus extern "C" { #endif /* Currently, this entire code is only needed for the handling of sockets on native Windows platforms. */ #if WINDOWS_SOCKETS /* An element of the list of close hooks. The fields of this structure are considered private. */ struct close_hook { /* Doubly linked list. */ struct close_hook *private_next; struct close_hook *private_prev; /* Function that treats the types of FD that it knows about and calls execute_close_hooks (FD, REMAINING_LIST) as a fallback. */ int (*private_fn) (int fd, const struct close_hook *remaining_list); }; /* This type of function closes FD, applying special knowledge for the FD types it knows about, and calls execute_close_hooks (FD, REMAINING_LIST) for the other FD types. */ typedef int (*close_hook_fn) (int fd, const struct close_hook *remaining_list); /* Execute the close hooks in REMAINING_LIST. Return 0 or -1, like close() would do. */ extern int execute_close_hooks (int fd, const struct close_hook *remaining_list); /* Execute all close hooks. Return 0 or -1, like close() would do. */ extern int execute_all_close_hooks (int fd); /* Add a function to the list of close hooks. The LINK variable points to a piece of memory which is guaranteed to be accessible until the corresponding call to unregister_close_hook. */ extern void register_close_hook (close_hook_fn hook, struct close_hook *link); /* Removes a function from the list of close hooks. */ extern void unregister_close_hook (struct close_hook *link); #endif #ifdef __cplusplus } #endif #endif /* CLOSE_HOOK_H */ libprelude-1.0.0/libmissing/mktime-internal.h0000664000076400007640000000024111341220437016175 00000000000000#include time_t mktime_internal (struct tm *, struct tm * (*) (time_t const *, struct tm *), time_t *); libprelude-1.0.0/libmissing/stat.c0000664000076400007640000000654211341220440014047 00000000000000/* Work around platform bugs in stat. Copyright (C) 2009, 2010 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 3 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 Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . */ /* written by Eric Blake */ #include /* Get the original definition of stat. It might be defined as a macro. */ #define __need_system_sys_stat_h #include #include #undef __need_system_sys_stat_h static inline int orig_stat (const char *filename, struct stat *buf) { return stat (filename, buf); } /* Specification. */ #include #include #include #include #include /* Store information about NAME into ST. Work around bugs with trailing slashes. Mingw has other bugs (such as st_ino always being 0 on success) which this wrapper does not work around. But at least this implementation provides the ability to emulate fchdir correctly. */ int rpl_stat (char const *name, struct stat *st) { int result = orig_stat (name, st); #if REPLACE_FUNC_STAT_FILE /* Solaris 9 mistakenly succeeds when given a non-directory with a trailing slash. */ if (result == 0 && !S_ISDIR (st->st_mode)) { size_t len = strlen (name); if (ISSLASH (name[len - 1])) { errno = ENOTDIR; return -1; } } #endif /* REPLACE_FUNC_STAT_FILE */ #if REPLACE_FUNC_STAT_DIR if (result == -1 && errno == ENOENT) { /* Due to mingw's oddities, there are some directories (like c:\) where stat() only succeeds with a trailing slash, and other directories (like c:\windows) where stat() only succeeds without a trailing slash. But we want the two to be synonymous, since chdir() manages either style. Likewise, Mingw also reports ENOENT for names longer than PATH_MAX, when we want ENAMETOOLONG, and for stat("file/"), when we want ENOTDIR. Fortunately, mingw PATH_MAX is small enough for stack allocation. */ char fixed_name[PATH_MAX + 1] = {0}; size_t len = strlen (name); bool check_dir = false; if (PATH_MAX <= len) errno = ENAMETOOLONG; else if (len) { strcpy (fixed_name, name); if (ISSLASH (fixed_name[len - 1])) { check_dir = true; while (len && ISSLASH (fixed_name[len - 1])) fixed_name[--len] = '\0'; if (!len) fixed_name[0] = '/'; } else fixed_name[len++] = '/'; result = orig_stat (fixed_name, st); if (result == 0 && check_dir && !S_ISDIR (st->st_mode)) { result = -1; errno = ENOTDIR; } } } #endif /* REPLACE_FUNC_STAT_DIR */ return result; } libprelude-1.0.0/libmissing/frexpl.c0000664000076400007640000000147611341220434014400 00000000000000/* Split a 'long double' into fraction and mantissa. Copyright (C) 2007, 2009, 2010 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 3 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 Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . */ #define USE_LONG_DOUBLE #include "frexp.c" libprelude-1.0.0/libmissing/signbitl.c0000664000076400007640000000417011341220440014702 00000000000000/* signbit() macro: Determine the sign bit of a floating-point number. Copyright (C) 2007, 2009, 2010 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 3 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 Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . */ #include /* Specification. */ #include #include #include "isnanl-nolibm.h" #include "float+.h" #ifdef gl_signbitl_OPTIMIZED_MACRO # undef gl_signbitl #endif int gl_signbitl (long double arg) { #if defined LDBL_SIGNBIT_WORD && defined LDBL_SIGNBIT_BIT /* The use of a union to extract the bits of the representation of a 'long double' is safe in practice, despite of the "aliasing rules" of C99, because the GCC docs say "Even with '-fstrict-aliasing', type-punning is allowed, provided the memory is accessed through the union type." and similarly for other compilers. */ # define NWORDS \ ((sizeof (long double) + sizeof (unsigned int) - 1) / sizeof (unsigned int)) union { long double value; unsigned int word[NWORDS]; } m; m.value = arg; return (m.word[LDBL_SIGNBIT_WORD] >> LDBL_SIGNBIT_BIT) & 1; #elif HAVE_COPYSIGNL_IN_LIBC return copysignl (1.0L, arg) < 0; #else /* This does not do the right thing for NaN, but this is irrelevant for most use cases. */ if (isnanl (arg)) return 0; if (arg < 0.0L) return 1; else if (arg == 0.0L) { /* Distinguish 0.0L and -0.0L. */ static long double plus_zero = 0.0L; long double arg_mem = arg; return (memcmp (&plus_zero, &arg_mem, SIZEOF_LDBL) != 0); } else return 0; #endif } libprelude-1.0.0/libmissing/realloc.c0000664000076400007640000000453211341220437014520 00000000000000/* realloc() function that is glibc compatible. Copyright (C) 1997, 2003-2004, 2006-2007, 2009-2010 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 3 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 Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . */ /* written by Jim Meyering and Bruno Haible */ #include /* Only the AC_FUNC_REALLOC macro defines 'realloc' already in config.h. */ #ifdef realloc # define NEED_REALLOC_GNU 1 #endif /* Infer the properties of the system's malloc function. Only the AC_FUNC_MALLOC macro defines 'malloc' already in config.h. */ #if GNULIB_MALLOC_GNU && !defined malloc # define SYSTEM_MALLOC_GLIBC_COMPATIBLE 1 #endif /* Below we want to call the system's malloc and realloc. Undefine the symbols here so that including provides a declaration of malloc(), not of rpl_malloc(), and likewise for realloc. */ #undef malloc #undef realloc /* Specification. */ #include #include /* Below we want to call the system's malloc and realloc. Undefine the symbols, if they were defined by gnulib's replacement. */ #undef malloc #undef realloc /* Change the size of an allocated block of memory P to N bytes, with error checking. If N is zero, change it to 1. If P is NULL, use malloc. */ void * rpl_realloc (void *p, size_t n) { void *result; #if NEED_REALLOC_GNU if (n == 0) { n = 1; /* In theory realloc might fail, so don't rely on it to free. */ free (p); p = NULL; } #endif if (p == NULL) { #if GNULIB_REALLOC_GNU && !NEED_REALLOC_GNU && !SYSTEM_MALLOC_GLIBC_COMPATIBLE if (n == 0) n = 1; #endif result = malloc (n); } else result = realloc (p, n); #if !HAVE_REALLOC_POSIX if (result == NULL) errno = ENOMEM; #endif return result; } libprelude-1.0.0/libmissing/vsnprintf.c0000664000076400007640000000367611341220442015134 00000000000000/* Formatted output to strings. Copyright (C) 2004, 2006-2010 Free Software Foundation, Inc. Written by Simon Josefsson and Yoann Vandoorselaere . This program is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser 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 Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ #ifdef HAVE_CONFIG_H # include #endif /* Specification. */ #include #include #include #include #include #include #include "vasnprintf.h" /* Print formatted output to string STR. Similar to vsprintf, but additional length SIZE limit how much is written into STR. Returns string length of formatted string (which may be larger than SIZE). STR may be NULL, in which case nothing will be written. On error, return a negative value. */ int vsnprintf (char *str, size_t size, const char *format, va_list args) { char *output; size_t len; size_t lenbuf = size; output = vasnprintf (str, &lenbuf, format, args); len = lenbuf; if (!output) return -1; if (output != str) { if (size) { size_t pruned_len = (len < size ? len : size - 1); memcpy (str, output, pruned_len); str[pruned_len] = '\0'; } free (output); } if (len > INT_MAX) { errno = EOVERFLOW; return -1; } return len; } libprelude-1.0.0/libmissing/float.in.h0000664000076400007640000000425311341220434014613 00000000000000/* A correct . Copyright (C) 2007-2010 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 3 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 Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . */ #ifndef _GL_FLOAT_H #if __GNUC__ >= 3 @PRAGMA_SYSTEM_HEADER@ #endif /* The include_next requires a split double-inclusion guard. */ #@INCLUDE_NEXT@ @NEXT_FLOAT_H@ #ifndef _GL_FLOAT_H #define _GL_FLOAT_H /* 'long double' properties. */ #if defined __i386__ && (defined __BEOS__ || defined __OpenBSD__) /* Number of mantissa units, in base FLT_RADIX. */ # undef LDBL_MANT_DIG # define LDBL_MANT_DIG 64 /* Number of decimal digits that is sufficient for representing a number. */ # undef LDBL_DIG # define LDBL_DIG 18 /* x-1 where x is the smallest representable number > 1. */ # undef LDBL_EPSILON # define LDBL_EPSILON 1.0842021724855044340E-19L /* Minimum e such that FLT_RADIX^(e-1) is a normalized number. */ # undef LDBL_MIN_EXP # define LDBL_MIN_EXP (-16381) /* Maximum e such that FLT_RADIX^(e-1) is a representable finite number. */ # undef LDBL_MAX_EXP # define LDBL_MAX_EXP 16384 /* Minimum positive normalized number. */ # undef LDBL_MIN # define LDBL_MIN 3.3621031431120935063E-4932L /* Maximum representable finite number. */ # undef LDBL_MAX # define LDBL_MAX 1.1897314953572317650E+4932L /* Minimum e such that 10^e is in the range of normalized numbers. */ # undef LDBL_MIN_10_EXP # define LDBL_MIN_10_EXP (-4931) /* Maximum e such that 10^e is in the range of representable finite numbers. */ # undef LDBL_MAX_10_EXP # define LDBL_MAX_10_EXP 4932 #endif #endif /* _GL_FLOAT_H */ #endif /* _GL_FLOAT_H */ libprelude-1.0.0/libmissing/tests/0000775000076400007640000000000011347714753014170 500000000000000libprelude-1.0.0/libmissing/tests/c-strncasecmp.c0000664000076400007640000000321711341220440016774 00000000000000/* c-strncasecmp.c -- case insensitive string comparator in C locale Copyright (C) 1998-1999, 2005-2006, 2009-2010 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 3, 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ #include /* Specification. */ #include "c-strcase.h" #include #include "c-ctype.h" int c_strncasecmp (const char *s1, const char *s2, size_t n) { register const unsigned char *p1 = (const unsigned char *) s1; register const unsigned char *p2 = (const unsigned char *) s2; unsigned char c1, c2; if (p1 == p2 || n == 0) return 0; do { c1 = c_tolower (*p1); c2 = c_tolower (*p2); if (--n == 0 || c1 == '\0') break; ++p1; ++p2; } while (c1 == c2); if (UCHAR_MAX <= INT_MAX) return c1 - c2; else /* On machines where 'char' and 'int' are types of the same size, the difference of two 'unsigned char' values - including the sign bit - doesn't fit in an 'int'. */ return (c1 > c2 ? 1 : c1 < c2 ? -1 : 0); } libprelude-1.0.0/libmissing/tests/test-perror.sh0000775000076400007640000000152511341220442016715 00000000000000#!/bin/sh tmpfiles="" trap 'rm -fr $tmpfiles' 1 2 3 15 # Test NULL prefix. Result should not contain a number. tmpfiles="$tmpfiles t-perror.tmp" ./test-perror${EXEEXT} 2>&1 >/dev/null | LC_ALL=C tr -d '\r' > t-perror.tmp if grep '[0-9]' t-perror.tmp > /dev/null; then rm -fr $tmpfiles; exit 1 fi # Test empty prefix. Result should be the same. tmpfiles="$tmpfiles t-perror1.tmp" ./test-perror${EXEEXT} '' 2>&1 >/dev/null | LC_ALL=C tr -d '\r' > t-perror1.tmp diff t-perror.tmp t-perror1.tmp test $? = 0 || { rm -fr $tmpfiles; exit 1; } # Test non-empty prefix. tmpfiles="$tmpfiles t-perror2.tmp t-perror3.tmp" ./test-perror${EXEEXT} 'foo' 2>&1 >/dev/null | LC_ALL=C tr -d '\r' > t-perror3.tmp sed -e 's/^/foo: /' < t-perror.tmp > t-perror2.tmp diff t-perror2.tmp t-perror3.tmp test $? = 0 || { rm -fr $tmpfiles; exit 1; } rm -fr $tmpfiles exit 0 libprelude-1.0.0/libmissing/tests/test-isnand-nolibm.c0000664000076400007640000000145511341220441017744 00000000000000/* Test of isnand() substitute. Copyright (C) 2007-2010 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 3 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, see . */ #include #include "isnand-nolibm.h" #include "test-isnand.h" libprelude-1.0.0/libmissing/tests/test-stdio.c0000664000076400007640000000232211341220442016327 00000000000000/* Test of substitute. Copyright (C) 2007, 2009-2010 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 3 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, see . */ /* Written by Bruno Haible , 2007. */ #include #include #include "verify.h" /* Check that the various SEEK_* macros are defined. */ int sk[] = { SEEK_CUR, SEEK_END, SEEK_SET }; /* Check that NULL can be passed through varargs as a pointer type, per POSIX 2008. */ verify (sizeof NULL == sizeof (void *)); /* Check that the types are all defined. */ fpos_t t1; off_t t2; size_t t3; ssize_t t4; va_list t5; int main (void) { return 0; } libprelude-1.0.0/libmissing/tests/test-memchr.c0000664000076400007640000000616311341220441016466 00000000000000/* * Copyright (C) 2008-2010 Free Software Foundation, Inc. * Written by Eric Blake and Bruno Haible * * 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 3 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, see . */ #include #include #include "signature.h" SIGNATURE_CHECK (memchr, void *, (void const *, int, size_t)); #include #include "zerosize-ptr.h" #include "macros.h" /* Calculating void * + int is not portable, so this wrapper converts to char * to make the tests easier to write. */ #define MEMCHR (char *) memchr int main (void) { size_t n = 0x100000; char *input = malloc (n); ASSERT (input); input[0] = 'a'; input[1] = 'b'; memset (input + 2, 'c', 1024); memset (input + 1026, 'd', n - 1028); input[n - 2] = 'e'; input[n - 1] = 'a'; /* Basic behavior tests. */ ASSERT (MEMCHR (input, 'a', n) == input); ASSERT (MEMCHR (input, 'a', 0) == NULL); ASSERT (MEMCHR (zerosize_ptr (), 'a', 0) == NULL); ASSERT (MEMCHR (input, 'b', n) == input + 1); ASSERT (MEMCHR (input, 'c', n) == input + 2); ASSERT (MEMCHR (input, 'd', n) == input + 1026); ASSERT (MEMCHR (input + 1, 'a', n - 1) == input + n - 1); ASSERT (MEMCHR (input + 1, 'e', n - 1) == input + n - 2); ASSERT (MEMCHR (input, 'f', n) == NULL); ASSERT (MEMCHR (input, '\0', n) == NULL); /* Check that a very long haystack is handled quickly if the byte is found near the beginning. */ { size_t repeat = 10000; for (; repeat > 0; repeat--) { ASSERT (MEMCHR (input, 'c', n) == input + 2); } } /* Alignment tests. */ { int i, j; for (i = 0; i < 32; i++) { for (j = 0; j < 256; j++) input[i + j] = j; for (j = 0; j < 256; j++) { ASSERT (MEMCHR (input + i, j, 256) == input + i + j); } } } /* Check that memchr() does not read past the first occurrence of the byte being searched. See the Austin Group's clarification . */ { char *page_boundary = (char *) zerosize_ptr (); if (page_boundary != NULL) { for (n = 1; n <= 500; n++) { char *mem = page_boundary - n; memset (mem, 'X', n); ASSERT (MEMCHR (mem, 'U', n) == NULL); { size_t i; for (i = 0; i < n; i++) { mem[i] = 'U'; ASSERT (MEMCHR (mem, 'U', 4000) == mem + i); mem[i] = 'X'; } } } } } free (input); return 0; } libprelude-1.0.0/libmissing/tests/symlink.c0000664000076400007640000000263211341220440015720 00000000000000/* Stub for symlink(). Copyright (C) 2009, 2010 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 3 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, see . */ #include /* Specification. */ #include #include #include #include #if HAVE_SYMLINK # undef symlink /* Create a symlink, but reject trailing slash. */ int rpl_symlink (char const *contents, char const *name) { size_t len = strlen (name); if (len && name[len - 1] == '/') { struct stat st; if (lstat (name, &st) == 0) errno = EEXIST; return -1; } return symlink (contents, name); } #else /* !HAVE_SYMLINK */ /* The system does not support symlinks. */ int symlink (char const *contents _GL_UNUSED, char const *name _GL_UNUSED) { errno = ENOSYS; return -1; } #endif /* !HAVE_SYMLINK */ libprelude-1.0.0/libmissing/tests/getpagesize.c0000664000076400007640000000227211341220440016541 00000000000000/* getpagesize emulation for systems where it cannot be done in a C macro. Copyright (C) 2007, 2009-2010 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 3 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, see . */ /* Written by Bruno Haible and Martin Lambers. */ #include /* Specification. */ #include /* This implementation is only for native Win32 systems. */ #if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ # define WIN32_LEAN_AND_MEAN # include int getpagesize (void) { SYSTEM_INFO system_info; GetSystemInfo (&system_info); return system_info.dwPageSize; } #endif libprelude-1.0.0/libmissing/tests/test-inet_pton.c0000664000076400007640000000333011341220441017203 00000000000000/* Test of inet_pton function. Copyright (C) 2009, 2010 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 3 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, see . */ /* Written by Bruno Haible , 2009. */ #include #include #include "signature.h" SIGNATURE_CHECK (inet_pton, int, (int, const char *, void *)); #include #include #include "macros.h" int main (void) { #if defined AF_INET /* HAVE_IPV4 */ { /* This machine was for a long time known as ma2s2.mathematik.uni-karlsruhe.de. */ const char printable[] = "129.13.115.2"; struct in_addr internal; int ret; ret = inet_pton (AF_INET, printable, &internal); ASSERT (ret == 1); /* Verify that internal is filled in network byte order. */ ASSERT (((unsigned char *) &internal)[0] == 0x81); ASSERT (((unsigned char *) &internal)[1] == 0x0D); ASSERT (((unsigned char *) &internal)[2] == 0x73); ASSERT (((unsigned char *) &internal)[3] == 0x02); # ifdef WORDS_BIGENDIAN ASSERT (internal.s_addr == 0x810D7302); # else ASSERT (internal.s_addr == 0x02730D81); # endif } #endif return 0; } libprelude-1.0.0/libmissing/tests/fcntl.in.h0000664000076400007640000001345711341220440015761 00000000000000/* Like , but with non-working flags defined to 0. Copyright (C) 2006-2010 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 3 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, see . */ /* written by Paul Eggert */ #if __GNUC__ >= 3 @PRAGMA_SYSTEM_HEADER@ #endif #if defined __need_system_fcntl_h /* Special invocation convention. */ #include #ifndef __GLIBC__ /* Avoid namespace pollution on glibc systems. */ # include #endif #@INCLUDE_NEXT@ @NEXT_FCNTL_H@ #else /* Normal invocation convention. */ #ifndef _GL_FCNTL_H #include #ifndef __GLIBC__ /* Avoid namespace pollution on glibc systems. */ # include #endif /* The include_next requires a split double-inclusion guard. */ #@INCLUDE_NEXT@ @NEXT_FCNTL_H@ #ifndef _GL_FCNTL_H #define _GL_FCNTL_H #ifndef __GLIBC__ /* Avoid namespace pollution on glibc systems. */ # include #endif /* The definition of _GL_ARG_NONNULL is copied here. */ /* The definition of _GL_WARN_ON_USE is copied here. */ /* Declare overridden functions. */ #ifdef __cplusplus extern "C" { #endif #if @GNULIB_FCNTL@ # if @REPLACE_FCNTL@ # undef fcntl # define fcntl rpl_fcntl # endif # if !@HAVE_FCNTL@ || @REPLACE_FCNTL@ extern int fcntl (int fd, int action, ...); # endif #elif defined GNULIB_POSIXCHECK # undef fcntl # if HAVE_RAW_DECL_FCNTL _GL_WARN_ON_USE (fcntl, "fcntl is not always POSIX compliant - " "use gnulib module fcntl for portability"); # endif #endif #if @GNULIB_OPEN@ # if @REPLACE_OPEN@ # undef open # define open rpl_open extern int open (const char *filename, int flags, ...) _GL_ARG_NONNULL ((1)); # endif #elif defined GNULIB_POSIXCHECK # undef open /* Assume open is always declared. */ _GL_WARN_ON_USE (open, "open is not always POSIX compliant - " "use gnulib module open for portability"); #endif #if @GNULIB_OPENAT@ # if @REPLACE_OPENAT@ # undef openat # define openat rpl_openat # endif # if !@HAVE_OPENAT@ || @REPLACE_OPENAT@ extern int openat (int fd, char const *file, int flags, /* mode_t mode */ ...) _GL_ARG_NONNULL ((2)); # endif #elif defined GNULIB_POSIXCHECK # undef openat # if HAVE_RAW_DECL_OPENAT _GL_WARN_ON_USE (openat, "openat is not portable - " "use gnulib module openat for portability"); # endif #endif #ifdef __cplusplus } #endif /* Fix up the FD_* macros, only known to be missing on mingw. */ #ifndef FD_CLOEXEC # define FD_CLOEXEC 1 #endif /* Fix up the supported F_* macros. Intentionally leave other F_* macros undefined. Only known to be missing on mingw. */ #ifndef F_DUPFD_CLOEXEC # define F_DUPFD_CLOEXEC 0x40000000 /* Witness variable: 1 if gnulib defined F_DUPFD_CLOEXEC, 0 otherwise. */ # define GNULIB_defined_F_DUPFD_CLOEXEC 1 #else # define GNULIB_defined_F_DUPFD_CLOEXEC 0 #endif #ifndef F_DUPFD # define F_DUPFD 1 #endif #ifndef F_GETFD # define F_GETFD 2 #endif /* Fix up the O_* macros. */ #if !defined O_DIRECT && defined O_DIRECTIO /* Tru64 spells it `O_DIRECTIO'. */ # define O_DIRECT O_DIRECTIO #endif #if !defined O_CLOEXEC && defined O_NOINHERIT /* Mingw spells it `O_NOINHERIT'. Intentionally leave it undefined if not available. */ # define O_CLOEXEC O_NOINHERIT #endif #ifndef O_DIRECT # define O_DIRECT 0 #endif #ifndef O_DIRECTORY # define O_DIRECTORY 0 #endif #ifndef O_DSYNC # define O_DSYNC 0 #endif #ifndef O_NDELAY # define O_NDELAY 0 #endif #ifndef O_NOATIME # define O_NOATIME 0 #endif #ifndef O_NONBLOCK # define O_NONBLOCK O_NDELAY #endif #ifndef O_NOCTTY # define O_NOCTTY 0 #endif #ifndef O_NOFOLLOW # define O_NOFOLLOW 0 #endif #ifndef O_NOLINKS # define O_NOLINKS 0 #endif #ifndef O_RSYNC # define O_RSYNC 0 #endif #ifndef O_SYNC # define O_SYNC 0 #endif #ifndef O_TTY_INIT # define O_TTY_INIT 0 #endif /* For systems that distinguish between text and binary I/O. O_BINARY is usually declared in fcntl.h */ #if !defined O_BINARY && defined _O_BINARY /* For MSC-compatible compilers. */ # define O_BINARY _O_BINARY # define O_TEXT _O_TEXT #endif #if defined __BEOS__ || defined __HAIKU__ /* BeOS 5 and Haiku have O_BINARY and O_TEXT, but they have no effect. */ # undef O_BINARY # undef O_TEXT #endif #ifndef O_BINARY # define O_BINARY 0 # define O_TEXT 0 #endif /* Fix up the AT_* macros. */ /* Work around a bug in Solaris 9 and 10: AT_FDCWD is positive. Its value exceeds INT_MAX, so its use as an int doesn't conform to the C standard, and GCC and Sun C complain in some cases. If the bug is present, undef AT_FDCWD here, so it can be redefined below. */ #if 0 < AT_FDCWD && AT_FDCWD == 0xffd19553 # undef AT_FDCWD #endif /* Use the same bit pattern as Solaris 9, but with the proper signedness. The bit pattern is important, in case this actually is Solaris with the above workaround. */ #ifndef AT_FDCWD # define AT_FDCWD (-3041965) #endif /* Use the same values as Solaris 9. This shouldn't matter, but there's no real reason to differ. */ #ifndef AT_SYMLINK_NOFOLLOW # define AT_SYMLINK_NOFOLLOW 4096 #endif #ifndef AT_REMOVEDIR # define AT_REMOVEDIR 1 #endif /* Solaris 9 lacks these two, so just pick unique values. */ #ifndef AT_SYMLINK_FOLLOW # define AT_SYMLINK_FOLLOW 2 #endif #ifndef AT_EACCESS # define AT_EACCESS 4 #endif #endif /* _GL_FCNTL_H */ #endif /* _GL_FCNTL_H */ #endif libprelude-1.0.0/libmissing/tests/test-nl_langinfo.sh0000775000076400007640000000066511341220441017675 00000000000000#!/bin/sh LC_ALL=C ./test-nl_langinfo${EXEEXT} 0 || exit 1 # Test whether a specific traditional locale is installed. : ${LOCALE_FR=fr_FR} if test $LOCALE_FR != none; then LC_ALL=$LOCALE_FR ./test-nl_langinfo${EXEEXT} 1 || exit 1 fi # Test whether a specific UTF-8 locale is installed. : ${LOCALE_FR_UTF8=fr_FR.UTF-8} if test $LOCALE_FR_UTF8 != none; then LC_ALL=$LOCALE_FR_UTF8 ./test-nl_langinfo${EXEEXT} 2 || exit 1 fi exit 0 libprelude-1.0.0/libmissing/tests/test-btowc1.sh0000775000076400007640000000054311341220441016601 00000000000000#!/bin/sh # Test in an ISO-8859-1 or ISO-8859-15 locale. : ${LOCALE_FR=fr_FR} if test $LOCALE_FR = none; then if test -f /usr/bin/localedef; then echo "Skipping test: no traditional french locale is installed" else echo "Skipping test: no traditional french locale is supported" fi exit 77 fi LC_ALL=$LOCALE_FR \ ./test-btowc${EXEEXT} 1 libprelude-1.0.0/libmissing/tests/test-arpa_inet.c0000664000076400007640000000156411341220440017154 00000000000000/* Test of substitute. Copyright (C) 2007, 2009, 2010 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 3 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, see . */ /* Written by Bruno Haible , 2007. */ #include #include int main (void) { return 0; } libprelude-1.0.0/libmissing/tests/test-signbit.c0000664000076400007640000001325111341220442016647 00000000000000/* Test of signbit() substitute. Copyright (C) 2007, 2008, 2009, 2010 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 3 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, see . */ /* Written by Bruno Haible , 2007. */ #include #include /* signbit must be a macro. */ #ifndef signbit # error missing declaration #endif #include #include #include "macros.h" float zerof = 0.0f; double zerod = 0.0; long double zerol = 0.0L; /* HP cc on HP-UX 10.20 has a bug with the constant expression -0.0f. So we use -zerof instead. */ /* HP cc on HP-UX 10.20 has a bug with the constant expression -0.0. So we use -zerod instead. */ /* On HP-UX 10.20, negating 0.0L does not yield -0.0L. So we use minus_zerol instead. IRIX cc can't put -0.0L into .data, but can compute at runtime. Note that the expression -LDBL_MIN * LDBL_MIN does not work on other platforms, such as when cross-compiling to PowerPC on MacOS X 10.5. */ #if defined __hpux || defined __sgi static long double compute_minus_zerol (void) { return -LDBL_MIN * LDBL_MIN; } # define minus_zerol compute_minus_zerol () #else long double minus_zerol = -0.0L; #endif static void test_signbitf () { /* Finite values. */ ASSERT (!signbit (3.141f)); ASSERT (!signbit (3.141e30f)); ASSERT (!signbit (3.141e-30f)); ASSERT (signbit (-2.718f)); ASSERT (signbit (-2.718e30f)); ASSERT (signbit (-2.718e-30f)); /* Zeros. */ ASSERT (!signbit (0.0f)); if (1.0f / -zerof < 0) ASSERT (signbit (-zerof)); else ASSERT (!signbit (-zerof)); /* Infinite values. */ ASSERT (!signbit (1.0f / 0.0f)); ASSERT (signbit (-1.0f / 0.0f)); /* Quiet NaN. */ (void) signbit (zerof / zerof); #if defined FLT_EXPBIT0_WORD && defined FLT_EXPBIT0_BIT /* Signalling NaN. */ { #define NWORDS \ ((sizeof (float) + sizeof (unsigned int) - 1) / sizeof (unsigned int)) typedef union { float value; unsigned int word[NWORDS]; } memory_float; memory_float m; m.value = zerof / zerof; # if FLT_EXPBIT0_BIT > 0 m.word[FLT_EXPBIT0_WORD] ^= (unsigned int) 1 << (FLT_EXPBIT0_BIT - 1); # else m.word[FLT_EXPBIT0_WORD + (FLT_EXPBIT0_WORD < NWORDS / 2 ? 1 : - 1)] ^= (unsigned int) 1 << (sizeof (unsigned int) * CHAR_BIT - 1); # endif if (FLT_EXPBIT0_WORD < NWORDS / 2) m.word[FLT_EXPBIT0_WORD + 1] |= (unsigned int) 1 << FLT_EXPBIT0_BIT; else m.word[0] |= (unsigned int) 1; (void) signbit (m.value); #undef NWORDS } #endif } static void test_signbitd () { /* Finite values. */ ASSERT (!signbit (3.141)); ASSERT (!signbit (3.141e30)); ASSERT (!signbit (3.141e-30)); ASSERT (signbit (-2.718)); ASSERT (signbit (-2.718e30)); ASSERT (signbit (-2.718e-30)); /* Zeros. */ ASSERT (!signbit (0.0)); if (1.0 / -zerod < 0) ASSERT (signbit (-zerod)); else ASSERT (!signbit (-zerod)); /* Infinite values. */ ASSERT (!signbit (1.0 / 0.0)); ASSERT (signbit (-1.0 / 0.0)); /* Quiet NaN. */ (void) signbit (zerod / zerod); #if defined DBL_EXPBIT0_WORD && defined DBL_EXPBIT0_BIT /* Signalling NaN. */ { #define NWORDS \ ((sizeof (double) + sizeof (unsigned int) - 1) / sizeof (unsigned int)) typedef union { double value; unsigned int word[NWORDS]; } memory_double; memory_double m; m.value = zerod / zerod; # if DBL_EXPBIT0_BIT > 0 m.word[DBL_EXPBIT0_WORD] ^= (unsigned int) 1 << (DBL_EXPBIT0_BIT - 1); # else m.word[DBL_EXPBIT0_WORD + (DBL_EXPBIT0_WORD < NWORDS / 2 ? 1 : - 1)] ^= (unsigned int) 1 << (sizeof (unsigned int) * CHAR_BIT - 1); # endif m.word[DBL_EXPBIT0_WORD + (DBL_EXPBIT0_WORD < NWORDS / 2 ? 1 : - 1)] |= (unsigned int) 1 << DBL_EXPBIT0_BIT; (void) signbit (m.value); #undef NWORDS } #endif } static void test_signbitl () { /* Finite values. */ ASSERT (!signbit (3.141L)); ASSERT (!signbit (3.141e30L)); ASSERT (!signbit (3.141e-30L)); ASSERT (signbit (-2.718L)); ASSERT (signbit (-2.718e30L)); ASSERT (signbit (-2.718e-30L)); /* Zeros. */ ASSERT (!signbit (0.0L)); if (1.0L / minus_zerol < 0) ASSERT (signbit (minus_zerol)); else ASSERT (!signbit (minus_zerol)); /* Infinite values. */ ASSERT (!signbit (1.0L / 0.0L)); ASSERT (signbit (-1.0L / 0.0L)); /* Quiet NaN. */ (void) signbit (zerol / zerol); #if defined LDBL_EXPBIT0_WORD && defined LDBL_EXPBIT0_BIT /* Signalling NaN. */ { #define NWORDS \ ((sizeof (long double) + sizeof (unsigned int) - 1) / sizeof (unsigned int)) typedef union { long double value; unsigned int word[NWORDS]; } memory_long_double; memory_long_double m; m.value = zerol / zerol; # if LDBL_EXPBIT0_BIT > 0 m.word[LDBL_EXPBIT0_WORD] ^= (unsigned int) 1 << (LDBL_EXPBIT0_BIT - 1); # else m.word[LDBL_EXPBIT0_WORD + (LDBL_EXPBIT0_WORD < NWORDS / 2 ? 1 : - 1)] ^= (unsigned int) 1 << (sizeof (unsigned int) * CHAR_BIT - 1); # endif m.word[LDBL_EXPBIT0_WORD + (LDBL_EXPBIT0_WORD < NWORDS / 2 ? 1 : - 1)] |= (unsigned int) 1 << LDBL_EXPBIT0_BIT; (void) signbit (m.value); #undef NWORDS } #endif } int main () { test_signbitf (); test_signbitd (); test_signbitl (); return 0; } libprelude-1.0.0/libmissing/tests/test-stat.h0000664000076400007640000000604511341220442016173 00000000000000/* Tests of stat. Copyright (C) 2009, 2010 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 3 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, see . */ /* Written by Eric Blake , 2009. */ /* This file is designed to test both stat(n,buf) and fstatat(AT_FDCWD,n,buf,0). FUNC is the function to test. Assumes that BASE and ASSERT are already defined, and that appropriate headers are already included. If PRINT, warn before skipping symlink tests with status 77. */ static int test_stat_func (int (*func) (char const *, struct stat *), bool print) { struct stat st1; struct stat st2; char cwd[PATH_MAX]; ASSERT (getcwd (cwd, PATH_MAX) == cwd); ASSERT (func (".", &st1) == 0); ASSERT (func ("./", &st2) == 0); ASSERT (SAME_INODE (st1, st2)); ASSERT (func (cwd, &st2) == 0); ASSERT (SAME_INODE (st1, st2)); ASSERT (func ("/", &st1) == 0); ASSERT (func ("///", &st2) == 0); ASSERT (SAME_INODE (st1, st2)); errno = 0; ASSERT (func ("", &st1) == -1); ASSERT (errno == ENOENT); errno = 0; ASSERT (func ("nosuch", &st1) == -1); ASSERT (errno == ENOENT); errno = 0; ASSERT (func ("nosuch/", &st1) == -1); ASSERT (errno == ENOENT); ASSERT (close (creat (BASE "file", 0600)) == 0); ASSERT (func (BASE "file", &st1) == 0); errno = 0; ASSERT (func (BASE "file/", &st1) == -1); ASSERT (errno == ENOTDIR); /* Now for some symlink tests, where supported. We set up: link1 -> directory link2 -> file link3 -> dangling link4 -> loop then test behavior with trailing slash. */ if (symlink (".", BASE "link1") != 0) { ASSERT (unlink (BASE "file") == 0); if (print) fputs ("skipping test: symlinks not supported on this file system\n", stderr); return 77; } ASSERT (symlink (BASE "file", BASE "link2") == 0); ASSERT (symlink (BASE "nosuch", BASE "link3") == 0); ASSERT (symlink (BASE "link4", BASE "link4") == 0); ASSERT (func (BASE "link1/", &st1) == 0); ASSERT (S_ISDIR (st1.st_mode)); errno = 0; ASSERT (func (BASE "link2/", &st1) == -1); ASSERT (errno == ENOTDIR); errno = 0; ASSERT (func (BASE "link3/", &st1) == -1); ASSERT (errno == ENOENT); errno = 0; ASSERT (func (BASE "link4/", &st1) == -1); ASSERT (errno == ELOOP); /* Cleanup. */ ASSERT (unlink (BASE "file") == 0); ASSERT (unlink (BASE "link1") == 0); ASSERT (unlink (BASE "link2") == 0); ASSERT (unlink (BASE "link3") == 0); ASSERT (unlink (BASE "link4") == 0); return 0; } libprelude-1.0.0/libmissing/tests/test-string.c0000664000076400007640000000201011341220442016505 00000000000000/* Test of substitute. Copyright (C) 2007, 2009, 2010 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 3 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, see . */ /* Written by Bruno Haible , 2007. */ #include #include #include "verify.h" /* Check that NULL can be passed through varargs as a pointer type, per POSIX 2008. */ verify (sizeof NULL == sizeof (void *)); int main (void) { return 0; } libprelude-1.0.0/libmissing/tests/test-fopen.c0000664000076400007640000000177711341220441016330 00000000000000/* Test of opening a file stream. Copyright (C) 2007-2010 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 3 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, see . */ /* Written by Bruno Haible , 2007. */ #include #include #include "signature.h" SIGNATURE_CHECK (fopen, FILE *, (char const *, char const *)); #define BASE "test-fopen.t" #include "test-fopen.h" int main (void) { return test_fopen (); } libprelude-1.0.0/libmissing/tests/test-wcrtomb.sh0000775000076400007640000000136111341220442017057 00000000000000#!/bin/sh # Test in an ISO-8859-1 or ISO-8859-15 locale. : ${LOCALE_FR=fr_FR} if test $LOCALE_FR != none; then LC_ALL=$LOCALE_FR \ ./test-wcrtomb${EXEEXT} 1 \ || exit 1 fi # Test whether a specific UTF-8 locale is installed. : ${LOCALE_FR_UTF8=fr_FR.UTF-8} if test $LOCALE_FR_UTF8 != none; then LC_ALL=$LOCALE_FR_UTF8 \ ./test-wcrtomb${EXEEXT} 2 \ || exit 1 fi # Test whether a specific EUC-JP locale is installed. : ${LOCALE_JA=ja_JP} if test $LOCALE_JA != none; then LC_ALL=$LOCALE_JA \ ./test-wcrtomb${EXEEXT} 3 \ || exit 1 fi # Test whether a specific GB18030 locale is installed. : ${LOCALE_ZH_CN=zh_CN.GB18030} if test $LOCALE_ZH_CN != none; then LC_ALL=$LOCALE_ZH_CN \ ./test-wcrtomb${EXEEXT} 4 \ || exit 1 fi exit 0 libprelude-1.0.0/libmissing/tests/test-mbsinit.sh0000775000076400007640000000056611341220441017054 00000000000000#!/bin/sh # Test whether a specific UTF-8 locale is installed. : ${LOCALE_FR_UTF8=fr_FR.UTF-8} if test $LOCALE_FR_UTF8 = none; then if test -f /usr/bin/localedef; then echo "Skipping test: no french Unicode locale is installed" else echo "Skipping test: no french Unicode locale is supported" fi exit 77 fi LC_ALL=$LOCALE_FR_UTF8 \ ./test-mbsinit${EXEEXT} libprelude-1.0.0/libmissing/tests/test-stdlib.c0000664000076400007640000000230011341220442016462 00000000000000/* Test of substitute. Copyright (C) 2007, 2009, 2010 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 3 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, see . */ /* Written by Bruno Haible , 2007. */ #include #include #include "verify.h" int exitcode; /* Check that NULL can be passed through varargs as a pointer type, per POSIX 2008. */ verify (sizeof NULL == sizeof (void *)); int main (void) { /* Check that some macros are defined and different integer constants. */ switch (exitcode) { case EXIT_SUCCESS: case EXIT_FAILURE: break; } return 0; } libprelude-1.0.0/libmissing/tests/test-btowc.c0000664000076400007640000000331711341220441016327 00000000000000/* Test of conversion of unibyte character to wide character. Copyright (C) 2008, 2009, 2010 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 3 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, see . */ /* Written by Bruno Haible , 2008. */ #include #include #include "signature.h" SIGNATURE_CHECK (btowc, wint_t, (int)); #include #include #include "macros.h" int main (int argc, char *argv[]) { int c; /* configure should already have checked that the locale is supported. */ if (setlocale (LC_ALL, "") == NULL) return 1; ASSERT (btowc (EOF) == WEOF); if (argc > 1) switch (argv[1][0]) { case '1': /* Locale encoding is ISO-8859-1 or ISO-8859-15. */ for (c = 0; c < 0x80; c++) ASSERT (btowc (c) == c); for (c = 0xA0; c < 0x100; c++) ASSERT (btowc (c) != WEOF); return 0; case '2': /* Locale encoding is UTF-8. */ for (c = 0; c < 0x80; c++) ASSERT (btowc (c) == c); for (c = 0x80; c < 0x100; c++) ASSERT (btowc (c) == WEOF); return 0; } return 1; } libprelude-1.0.0/libmissing/tests/test-alloca-opt.c0000664000076400007640000000276211341220440017246 00000000000000/* Test of optional automatic memory allocation. Copyright (C) 2005, 2007, 2009, 2010 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 3 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, see . */ /* Written by Bruno Haible , 2007. */ #include #include #if HAVE_ALLOCA static void do_allocation (int n) { void *ptr = alloca (n); (void) ptr; } void (*func) (int) = do_allocation; #endif int main () { #if HAVE_ALLOCA int i; /* Repeat a lot of times, to make sure there's no memory leak. */ for (i = 0; i < 100000; i++) { /* Try various values. n = 0 gave a crash on Alpha with gcc-2.5.8. Some versions of MacOS X have a stack size limit of 512 KB. */ func (34); func (134); func (399); func (510823); func (129321); func (0); func (4070); func (4095); func (1); func (16582); } #endif return 0; } libprelude-1.0.0/libmissing/tests/test-netinet_in.c0000664000076400007640000000156611341220441017351 00000000000000/* Test of substitute. Copyright (C) 2007, 2009, 2010 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 3 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, see . */ /* Written by Bruno Haible , 2007. */ #include #include int main (void) { return 0; } libprelude-1.0.0/libmissing/tests/test-getline.c0000664000076400007640000000474011341220441016641 00000000000000/* Test of getline() function. Copyright (C) 2007-2010 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 3, 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ /* Written by Eric Blake , 2007. */ #include #include #include "signature.h" SIGNATURE_CHECK (getline, ssize_t, (char **, size_t *, FILE *)); #include #include #include "macros.h" int main (void) { FILE *f; char *line; size_t len; ssize_t result; /* Create test file. */ f = fopen ("test-getline.txt", "wb"); if (!f || fwrite ("a\nA\nbc\nd\0f", 1, 10, f) != 10 || fclose (f) != 0) { fputs ("Failed to create sample file.\n", stderr); remove ("test-getline.txt"); return 1; } f = fopen ("test-getline.txt", "rb"); if (!f) { fputs ("Failed to reopen sample file.\n", stderr); remove ("test-getline.txt"); return 1; } /* Test initial allocation, which must include trailing NUL. */ line = NULL; len = 0; result = getline (&line, &len, f); ASSERT (result == 2); ASSERT (strcmp (line, "a\n") == 0); ASSERT (2 < len); free (line); /* Test initial allocation again, with line = NULL and len != 0. */ line = NULL; len = (size_t)(~0) / 4; result = getline (&line, &len, f); ASSERT (result == 2); ASSERT (strcmp (line, "A\n") == 0); ASSERT (2 < len); free (line); /* Test growth of buffer, must not leak. */ line = malloc (1); len = 0; result = getline (&line, &len, f); ASSERT (result == 3); ASSERT (strcmp (line, "bc\n") == 0); ASSERT (3 < len); /* Test embedded NULs and EOF behavior. */ result = getline (&line, &len, f); ASSERT (result == 3); ASSERT (memcmp (line, "d\0f", 4) == 0); ASSERT (3 < len); result = getline (&line, &len, f); ASSERT (result == -1); free (line); fclose (f); remove ("test-getline.txt"); return 0; } libprelude-1.0.0/libmissing/tests/test-fcntl-h.c0000664000076400007640000000240511341220441016541 00000000000000/* Test of substitute. Copyright (C) 2007, 2009, 2010 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 3 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, see . */ /* Written by Bruno Haible , 2007. */ #include #include /* Check that the various O_* macros are defined. */ int o = O_DIRECT | O_DIRECTORY | O_DSYNC | O_NDELAY | O_NOATIME | O_NONBLOCK | O_NOCTTY | O_NOFOLLOW | O_NOLINKS | O_RSYNC | O_SYNC | O_TTY_INIT | O_BINARY | O_TEXT; /* Check that the various SEEK_* macros are defined. */ int sk[] = { SEEK_CUR, SEEK_END, SEEK_SET }; /* Check that the FD_* macros are defined. */ int fd = FD_CLOEXEC; int main (void) { return 0; } libprelude-1.0.0/libmissing/tests/test-unistd.c0000664000076400007640000000305011341220442016512 00000000000000/* Test of substitute. Copyright (C) 2007, 2009, 2010 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 3 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, see . */ /* Written by Bruno Haible , 2007. */ #include #include #include "verify.h" /* Check that NULL can be passed through varargs as a pointer type, per POSIX 2008. */ verify (sizeof NULL == sizeof (void *)); /* Check that the various SEEK_* macros are defined. */ int sk[] = { SEEK_CUR, SEEK_END, SEEK_SET }; /* Check that the various *_FILENO macros are defined. */ #if ! (defined STDIN_FILENO \ && (STDIN_FILENO + STDOUT_FILENO + STDERR_FILENO == 3)) missing or broken *_FILENO macros #endif /* Check that the types are all defined. */ size_t t1; ssize_t t2; #ifdef TODO /* Not implemented in gnulib yet */ uid_t t3; gid_t t4; #endif off_t t5; pid_t t6; #ifdef TODO useconds_t t7; intptr_t t8; #endif int main (void) { return 0; } libprelude-1.0.0/libmissing/tests/test-select-fd.c0000664000076400007640000000443411341220442017061 00000000000000/* Test of select() substitute, reading or writing from a given file descriptor. Copyright (C) 2008, 2009, 2010 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 3 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, see . */ /* Written by Bruno Haible , 2008. */ #include #include #include #include int main (int argc, char *argv[]) { if (argc == 4) { char mode = argv[1][0]; if (mode == 'r' || mode == 'w') { int fd = atoi (argv[2]); if (fd >= 0) { const char *result_file_name = argv[3]; FILE *result_file = fopen (result_file_name, "wb"); if (result_file != NULL) { fd_set fds; struct timeval timeout; int ret; FD_ZERO (&fds); FD_SET (fd, &fds); timeout.tv_sec = 0; timeout.tv_usec = 10000; ret = (mode == 'r' ? select (fd + 1, &fds, NULL, NULL, &timeout) : select (fd + 1, NULL, &fds, NULL, &timeout)); if (ret < 0) { perror ("select failed"); exit (1); } if ((ret == 0) != ! FD_ISSET (fd, &fds)) { fprintf (stderr, "incorrect return value\n"); exit (1); } fprintf (result_file, "%d\n", ret); exit (0); } } } } fprintf (stderr, "Usage: test-select-fd mode fd result-file-name\n"); exit (1); } libprelude-1.0.0/libmissing/tests/test-symlink.h0000664000076400007640000000607111341220442016705 00000000000000/* Tests of symlink. Copyright (C) 2009, 2010 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 3 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, see . */ /* Written by Eric Blake , 2009. */ /* This file is designed to test both symlink(a,b) and symlinkat(a,AT_FDCWD,b). FUNC is the function to test. Assumes that BASE and ASSERT are already defined, and that appropriate headers are already included. If PRINT, warn before skipping symlink tests with status 77. */ static int test_symlink (int (*func) (char const *, char const *), bool print) { if (func ("nowhere", BASE "link1")) { if (print) fputs ("skipping test: symlinks not supported on this file system\n", stderr); return 77; } /* Some systems allow the creation of 0-length symlinks as a synonym for "."; but most reject it. */ { int status; errno = 0; status = func ("", BASE "link2"); if (status == -1) ASSERT (errno == ENOENT || errno == EINVAL); else { ASSERT (status == 0); ASSERT (unlink (BASE "link2") == 0); } } /* Sanity checks of failures. */ errno = 0; ASSERT (func ("nowhere", "") == -1); ASSERT (errno == ENOENT); errno = 0; ASSERT (func ("nowhere", ".") == -1); ASSERT (errno == EEXIST || errno == EINVAL); errno = 0; ASSERT (func ("somewhere", BASE "link1") == -1); ASSERT (errno == EEXIST); errno = 0; ASSERT (func ("nowhere", BASE "link2/") == -1); ASSERT (errno == ENOTDIR || errno == ENOENT); ASSERT (mkdir (BASE "dir", 0700) == 0); errno = 0; ASSERT (func ("nowhere", BASE "dir") == -1); ASSERT (errno == EEXIST); errno = 0; ASSERT (func ("nowhere", BASE "dir/") == -1); ASSERT (errno == EEXIST || errno == EINVAL); ASSERT (close (creat (BASE "file", 0600)) == 0); errno = 0; ASSERT (func ("nowhere", BASE "file") == -1); ASSERT (errno == EEXIST); errno = 0; ASSERT (func ("nowhere", BASE "file/") == -1); ASSERT (errno == EEXIST || errno == ENOTDIR || errno == ENOENT); /* Trailing slash must always be rejected. */ ASSERT (unlink (BASE "link1") == 0); ASSERT (func (BASE "link2", BASE "link1") == 0); errno = 0; ASSERT (func (BASE "nowhere", BASE "link1/") == -1); ASSERT (errno == EEXIST || errno == ENOTDIR || errno == ENOENT); errno = 0; ASSERT (unlink (BASE "link2") == -1); ASSERT (errno == ENOENT); /* Cleanup. */ ASSERT (rmdir (BASE "dir") == 0); ASSERT (unlink (BASE "file") == 0); ASSERT (unlink (BASE "link1") == 0); return 0; } libprelude-1.0.0/libmissing/tests/test-wctype.c0000664000076400007640000000401611341220442016522 00000000000000/* Test of substitute. Copyright (C) 2007-2010 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 3 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, see . */ /* Written by Bruno Haible , 2007. */ #include #include #include "macros.h" /* Check that the type wint_t is defined. */ wint_t a = 'x'; /* Check that WEOF is defined. */ wint_t e = WEOF; int main (void) { /* Check that the isw* functions exist as functions or as macros. */ (void) iswalnum (0); (void) iswalpha (0); #if 0 /* not portable: missing on mingw */ (void) iswblank (0); #endif (void) iswcntrl (0); (void) iswdigit (0); (void) iswgraph (0); (void) iswlower (0); (void) iswprint (0); (void) iswpunct (0); (void) iswspace (0); (void) iswupper (0); (void) iswxdigit (0); /* Check that the isw* functions map WEOF to 0. */ ASSERT (!iswalnum (e)); ASSERT (!iswalpha (e)); #if 0 /* not portable: missing on mingw */ ASSERT (!iswblank (e)); #endif ASSERT (!iswcntrl (e)); ASSERT (!iswdigit (e)); ASSERT (!iswgraph (e)); ASSERT (!iswlower (e)); ASSERT (!iswprint (e)); ASSERT (!iswpunct (e)); ASSERT (!iswspace (e)); ASSERT (!iswupper (e)); ASSERT (!iswxdigit (e)); /* Check that the tow* functions exist as functions or as macros. */ (void) towlower (0); (void) towupper (0); /* Check that the tow* functions map WEOF to WEOF. */ ASSERT (towlower (e) == e); ASSERT (towupper (e) == e); return 0; } libprelude-1.0.0/libmissing/tests/test-lseek.sh0000775000076400007640000000047311341220441016507 00000000000000#!/bin/sh tmpfiles= trap 'rm -fr $tmpfiles' 1 2 3 15 tmpfiles=t-lseek.tmp # seekable files ./test-lseek${EXEEXT} 0 < "$srcdir/test-lseek.sh" > t-lseek.tmp || exit 1 # pipes echo hi | ./test-lseek${EXEEXT} 1 | cat || exit 1 # closed descriptors ./test-lseek${EXEEXT} 2 <&- >&- || exit 1 rm -rf $tmpfiles exit 0 libprelude-1.0.0/libmissing/tests/test-isnanl.h0000664000076400007640000001135011341220441016476 00000000000000/* Test of isnanl() substitute. Copyright (C) 2007-2010 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 3 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, see . */ /* Written by Bruno Haible , 2007. */ #include #include #include "nan.h" #include "macros.h" /* On HP-UX 10.20, negating 0.0L does not yield -0.0L. So we use minus_zero instead. IRIX cc can't put -0.0L into .data, but can compute at runtime. Note that the expression -LDBL_MIN * LDBL_MIN does not work on other platforms, such as when cross-compiling to PowerPC on MacOS X 10.5. */ #if defined __hpux || defined __sgi static long double compute_minus_zero (void) { return -LDBL_MIN * LDBL_MIN; } # define minus_zero compute_minus_zero () #else long double minus_zero = -0.0L; #endif int main () { #define NWORDS \ ((sizeof (long double) + sizeof (unsigned int) - 1) / sizeof (unsigned int)) typedef union { unsigned int word[NWORDS]; long double value; } memory_long_double; /* Finite values. */ ASSERT (!isnanl (3.141L)); ASSERT (!isnanl (3.141e30L)); ASSERT (!isnanl (3.141e-30L)); ASSERT (!isnanl (-2.718L)); ASSERT (!isnanl (-2.718e30L)); ASSERT (!isnanl (-2.718e-30L)); ASSERT (!isnanl (0.0L)); ASSERT (!isnanl (minus_zero)); /* Infinite values. */ ASSERT (!isnanl (1.0L / 0.0L)); ASSERT (!isnanl (-1.0L / 0.0L)); /* Quiet NaN. */ ASSERT (isnanl (NaNl ())); #if defined LDBL_EXPBIT0_WORD && defined LDBL_EXPBIT0_BIT /* A bit pattern that is different from a Quiet NaN. With a bit of luck, it's a Signalling NaN. */ { memory_long_double m; m.value = NaNl (); # if LDBL_EXPBIT0_BIT > 0 m.word[LDBL_EXPBIT0_WORD] ^= (unsigned int) 1 << (LDBL_EXPBIT0_BIT - 1); # else m.word[LDBL_EXPBIT0_WORD + (LDBL_EXPBIT0_WORD < NWORDS / 2 ? 1 : - 1)] ^= (unsigned int) 1 << (sizeof (unsigned int) * CHAR_BIT - 1); # endif m.word[LDBL_EXPBIT0_WORD + (LDBL_EXPBIT0_WORD < NWORDS / 2 ? 1 : - 1)] |= (unsigned int) 1 << LDBL_EXPBIT0_BIT; ASSERT (isnanl (m.value)); } #endif #if ((defined __ia64 && LDBL_MANT_DIG == 64) || (defined __x86_64__ || defined __amd64__) || (defined __i386 || defined __i386__ || defined _I386 || defined _M_IX86 || defined _X86_)) /* Representation of an 80-bit 'long double' as an initializer for a sequence of 'unsigned int' words. */ # ifdef WORDS_BIGENDIAN # define LDBL80_WORDS(exponent,manthi,mantlo) \ { ((unsigned int) (exponent) << 16) | ((unsigned int) (manthi) >> 16), \ ((unsigned int) (manthi) << 16) | (unsigned int) (mantlo) >> 16), \ (unsigned int) (mantlo) << 16 \ } # else # define LDBL80_WORDS(exponent,manthi,mantlo) \ { mantlo, manthi, exponent } # endif { /* Quiet NaN. */ static memory_long_double x = { LDBL80_WORDS (0xFFFF, 0xC3333333, 0x00000000) }; ASSERT (isnanl (x.value)); } { /* Signalling NaN. */ static memory_long_double x = { LDBL80_WORDS (0xFFFF, 0x83333333, 0x00000000) }; ASSERT (isnanl (x.value)); } /* The isnanl function should recognize Pseudo-NaNs, Pseudo-Infinities, Pseudo-Zeroes, Unnormalized Numbers, and Pseudo-Denormals, as defined in Intel IA-64 Architecture Software Developer's Manual, Volume 1: Application Architecture. Table 5-2 "Floating-Point Register Encodings" Figure 5-6 "Memory to Floating-Point Register Data Translation" */ { /* Pseudo-NaN. */ static memory_long_double x = { LDBL80_WORDS (0xFFFF, 0x40000001, 0x00000000) }; ASSERT (isnanl (x.value)); } { /* Pseudo-Infinity. */ static memory_long_double x = { LDBL80_WORDS (0xFFFF, 0x00000000, 0x00000000) }; ASSERT (isnanl (x.value)); } { /* Pseudo-Zero. */ static memory_long_double x = { LDBL80_WORDS (0x4004, 0x00000000, 0x00000000) }; ASSERT (isnanl (x.value)); } { /* Unnormalized number. */ static memory_long_double x = { LDBL80_WORDS (0x4000, 0x63333333, 0x00000000) }; ASSERT (isnanl (x.value)); } { /* Pseudo-Denormal. */ static memory_long_double x = { LDBL80_WORDS (0x0000, 0x83333333, 0x00000000) }; ASSERT (isnanl (x.value)); } #endif return 0; } libprelude-1.0.0/libmissing/tests/test-wchar.c0000664000076400007640000000213511341220442016313 00000000000000/* Test of substitute. Copyright (C) 2007-2010 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 3 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, see . */ /* Written by Bruno Haible , 2007. */ #include #include #include "verify.h" /* Check that the types wchar_t and wint_t are defined. */ wchar_t a = 'c'; wint_t b = 'x'; /* Check that NULL can be passed through varargs as a pointer type, per POSIX 2008. */ verify (sizeof NULL == sizeof (void *)); int main (void) { return 0; } libprelude-1.0.0/libmissing/tests/test-isnanf.h0000664000076400007640000000420311341220441016467 00000000000000/* Test of isnanf() substitute. Copyright (C) 2007-2010 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 3 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, see . */ /* Written by Bruno Haible , 2007. */ #include #include "nan.h" #include "macros.h" /* HP cc on HP-UX 10.20 has a bug with the constant expression -0.0f. So we use -zero instead. */ float zero = 0.0f; int main () { /* Finite values. */ ASSERT (!isnanf (3.141f)); ASSERT (!isnanf (3.141e30f)); ASSERT (!isnanf (3.141e-30f)); ASSERT (!isnanf (-2.718f)); ASSERT (!isnanf (-2.718e30f)); ASSERT (!isnanf (-2.718e-30f)); ASSERT (!isnanf (0.0f)); ASSERT (!isnanf (-zero)); /* Infinite values. */ ASSERT (!isnanf (1.0f / 0.0f)); ASSERT (!isnanf (-1.0f / 0.0f)); /* Quiet NaN. */ ASSERT (isnanf (NaNf ())); #if defined FLT_EXPBIT0_WORD && defined FLT_EXPBIT0_BIT /* Signalling NaN. */ { #define NWORDS \ ((sizeof (float) + sizeof (unsigned int) - 1) / sizeof (unsigned int)) typedef union { float value; unsigned int word[NWORDS]; } memory_float; memory_float m; m.value = NaNf (); # if FLT_EXPBIT0_BIT > 0 m.word[FLT_EXPBIT0_WORD] ^= (unsigned int) 1 << (FLT_EXPBIT0_BIT - 1); # else m.word[FLT_EXPBIT0_WORD + (FLT_EXPBIT0_WORD < NWORDS / 2 ? 1 : - 1)] ^= (unsigned int) 1 << (sizeof (unsigned int) * CHAR_BIT - 1); # endif if (FLT_EXPBIT0_WORD < NWORDS / 2) m.word[FLT_EXPBIT0_WORD + 1] |= (unsigned int) 1 << FLT_EXPBIT0_BIT; else m.word[0] |= (unsigned int) 1; ASSERT (isnanf (m.value)); } #endif return 0; } libprelude-1.0.0/libmissing/tests/test-mbsinit.c0000664000076400007640000000265111341220441016656 00000000000000/* Test of test for initial conversion state. Copyright (C) 2008, 2009, 2010 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 3 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, see . */ /* Written by Bruno Haible , 2008. */ #include #include #include "signature.h" SIGNATURE_CHECK (mbsinit, int, (const mbstate_t *)); #include #include "macros.h" int main (int argc, char *argv[]) { static mbstate_t state; ASSERT (mbsinit (&state)); if (argc > 1) { static const char input[1] = "\303"; wchar_t wc; size_t ret; /* configure should already have checked that the locale is supported. */ if (setlocale (LC_ALL, "") == NULL) return 1; ret = mbrtowc (&wc, input, 1, &state); ASSERT (ret == (size_t)(-2)); ASSERT (!mbsinit (&state)); } return 0; } libprelude-1.0.0/libmissing/tests/test-btowc2.sh0000775000076400007640000000056611341220441016607 00000000000000#!/bin/sh # Test whether a specific UTF-8 locale is installed. : ${LOCALE_FR_UTF8=fr_FR.UTF-8} if test $LOCALE_FR_UTF8 = none; then if test -f /usr/bin/localedef; then echo "Skipping test: no french Unicode locale is installed" else echo "Skipping test: no french Unicode locale is supported" fi exit 77 fi LC_ALL=$LOCALE_FR_UTF8 \ ./test-btowc${EXEEXT} 2 libprelude-1.0.0/libmissing/tests/test-gethostname.c0000664000076400007640000000321011341220441017517 00000000000000/* * Copyright (C) 2008, 2009, 2010 Free Software Foundation, Inc. * Written by Simon Josefsson. * * 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 3 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, see . */ #include /* Get gethostname() declaration. */ #include #include "signature.h" SIGNATURE_CHECK (gethostname, int, (char *, size_t)); /* Get HOST_NAME_MAX definition. */ #include #include #include #include #define NOHOSTNAME "magic-gnulib-test-string" int main (int argc, char *argv[] _GL_UNUSED) { char buf[HOST_NAME_MAX]; int rc; if (strlen (NOHOSTNAME) >= HOST_NAME_MAX) { printf ("HOST_NAME_MAX impossibly small?! %d\n", HOST_NAME_MAX); return 2; } strcpy (buf, NOHOSTNAME); rc = gethostname (buf, sizeof (buf)); if (rc != 0) { printf ("gethostname failed, rc %d errno %d\n", rc, errno); return 1; } if (strcmp (buf, NOHOSTNAME) == 0) { printf ("gethostname left buffer untouched.\n"); return 1; } if (argc > 1) printf ("hostname: %s\n", buf); return 0; } libprelude-1.0.0/libmissing/tests/test-sleep.c0000664000076400007640000000263211341220442016321 00000000000000/* Test of sleep() function. Copyright (C) 2007-2010 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 3 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, see . */ /* Written by Bruno Haible , 2007. */ #include #include #include "signature.h" SIGNATURE_CHECK (sleep, unsigned int, (unsigned int)); #include #include "macros.h" #if HAVE_DECL_ALARM static void handle_alarm (int sig) { if (sig != SIGALRM) _exit (1); } #endif int main (void) { ASSERT (sleep (1) <= 1); ASSERT (sleep (0) == 0); #if HAVE_DECL_ALARM { const unsigned int pentecost = 50 * 24 * 60 * 60; /* 50 days. */ unsigned int remaining; signal (SIGALRM, handle_alarm); alarm (1); remaining = sleep (pentecost); ASSERT (pentecost - 10 < remaining && remaining <= pentecost); } #endif return 0; } libprelude-1.0.0/libmissing/tests/test-uname.c0000664000076400007640000000375111341220442016321 00000000000000/* Test of system information. Copyright (C) 2009, 2010 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 3 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, see . */ /* Written by Bruno Haible , 2009. */ #include #include #include "signature.h" SIGNATURE_CHECK (uname, int, (struct utsname *)); #include #include #include "macros.h" /* This program can be called with no arguments, then it performs a unit test. Or it can be called with 1 argument, then it prints the uname contents to standard output. */ int main (int argc, char *argv[]) { struct utsname buf; memset (&buf, '?', sizeof (buf)); ASSERT (uname (&buf) >= 0); /* Verify that every field's value is NUL terminated. */ ASSERT (strlen (buf.sysname) < sizeof (buf.sysname)); ASSERT (strlen (buf.nodename) < sizeof (buf.nodename)); ASSERT (strlen (buf.release) < sizeof (buf.release)); ASSERT (strlen (buf.version) < sizeof (buf.version)); ASSERT (strlen (buf.machine) < sizeof (buf.machine)); if (argc > 1) { /* Show the result. */ printf ("uname -n = nodename = %s\n", buf.nodename); printf ("uname -s = sysname = %s\n", buf.sysname); printf ("uname -r = release = %s\n", buf.release); printf ("uname -v = version = %s\n", buf.version); printf ("uname -m = machine or cpu = %s\n", buf.machine); } return 0; } libprelude-1.0.0/libmissing/tests/test-mbrtowc1.sh0000775000076400007640000000054511341220441017142 00000000000000#!/bin/sh # Test in an ISO-8859-1 or ISO-8859-15 locale. : ${LOCALE_FR=fr_FR} if test $LOCALE_FR = none; then if test -f /usr/bin/localedef; then echo "Skipping test: no traditional french locale is installed" else echo "Skipping test: no traditional french locale is supported" fi exit 77 fi LC_ALL=$LOCALE_FR \ ./test-mbrtowc${EXEEXT} 1 libprelude-1.0.0/libmissing/tests/glthread/0000775000076400007640000000000011347714753015762 500000000000000libprelude-1.0.0/libmissing/tests/glthread/yield.h0000664000076400007640000000476311341220440017146 00000000000000/* Yielding the processor to other threads and processes. Copyright (C) 2005-2010 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 3, 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ /* This file contains a primitive for yielding the processor to other threads. extern void gl_thread_yield (void); */ #ifndef _GLTHREAD_YIELD_H #define _GLTHREAD_YIELD_H #include /* ========================================================================= */ #if USE_POSIX_THREADS /* Use the POSIX threads library. */ # include # ifdef __cplusplus extern "C" { # endif # define gl_thread_yield() \ sched_yield () # ifdef __cplusplus } # endif #endif /* ========================================================================= */ #if USE_PTH_THREADS /* Use the GNU Pth threads library. */ # include # ifdef __cplusplus extern "C" { # endif # define gl_thread_yield() \ pth_yield (NULL) # ifdef __cplusplus } # endif #endif /* ========================================================================= */ #if USE_SOLARIS_THREADS /* Use the old Solaris threads library. */ # include # ifdef __cplusplus extern "C" { # endif # define gl_thread_yield() \ thr_yield () # ifdef __cplusplus } # endif #endif /* ========================================================================= */ #if USE_WIN32_THREADS # include # ifdef __cplusplus extern "C" { # endif # define gl_thread_yield() \ Sleep (0) # ifdef __cplusplus } # endif #endif /* ========================================================================= */ #if !(USE_POSIX_THREADS || USE_PTH_THREADS || USE_SOLARIS_THREADS || USE_WIN32_THREADS) /* Provide dummy implementation if threads are not supported. */ # define gl_thread_yield() 0 #endif /* ========================================================================= */ #endif /* _GLTHREAD_YIELD_H */ libprelude-1.0.0/libmissing/tests/signature.h0000664000076400007640000000367711341220440016252 00000000000000/* Macro for checking that a function declaration is compliant. Copyright (C) 2009, 2010 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 3 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, see . */ #ifndef SIGNATURE_CHECK /* Check that the function FN takes the specified arguments ARGS with a return type of RET. This header is designed to be included after and the one system header that is supposed to contain the function being checked, but prior to any other system headers that are necessary for the unit test. Therefore, this file does not include any system headers, nor reference anything outside of the macro arguments. For an example, if foo.h should provide: extern int foo (char, float); then the unit test named test-foo.c would start out with: #include #include #include "signature.h" SIGNATURE_CHECK (foo, int, (char, float)); #include ... */ # define SIGNATURE_CHECK(fn, ret, args) \ SIGNATURE_CHECK1 (fn, ret, args, __LINE__) /* Necessary to allow multiple SIGNATURE_CHECK lines in a unit test. Note that the checks must not occupy the same line. */ # define SIGNATURE_CHECK1(fn, ret, args, id) \ SIGNATURE_CHECK2 (fn, ret, args, id) /* macroexpand line */ # define SIGNATURE_CHECK2(fn, ret, args, id) \ static ret (* _GL_UNUSED signature_check ## id) args = fn #endif /* SIGNATURE_CHECK */ libprelude-1.0.0/libmissing/tests/open.c0000664000076400007640000001234311341220440015173 00000000000000/* Open a descriptor to a file. Copyright (C) 2007-2010 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 3 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, see . */ /* Written by Bruno Haible , 2007. */ #include /* Get the original definition of open. It might be defined as a macro. */ #define __need_system_fcntl_h #include #undef __need_system_fcntl_h #include static inline int orig_open (const char *filename, int flags, mode_t mode) { return open (filename, flags, mode); } /* Specification. */ #include #include #include #include #include #include #include #ifndef REPLACE_OPEN_DIRECTORY # define REPLACE_OPEN_DIRECTORY 0 #endif int open (const char *filename, int flags, ...) { mode_t mode; int fd; mode = 0; if (flags & O_CREAT) { va_list arg; va_start (arg, flags); /* We have to use PROMOTED_MODE_T instead of mode_t, otherwise GCC 4 creates crashing code when 'mode_t' is smaller than 'int'. */ mode = va_arg (arg, PROMOTED_MODE_T); va_end (arg); } #if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ if (strcmp (filename, "/dev/null") == 0) filename = "NUL"; #endif #if OPEN_TRAILING_SLASH_BUG /* If the filename ends in a slash and one of O_CREAT, O_WRONLY, O_RDWR is specified, then fail. Rationale: POSIX says that "A pathname that contains at least one non-slash character and that ends with one or more trailing slashes shall be resolved as if a single dot character ( '.' ) were appended to the pathname." and "The special filename dot shall refer to the directory specified by its predecessor." If the named file already exists as a directory, then - if O_CREAT is specified, open() must fail because of the semantics of O_CREAT, - if O_WRONLY or O_RDWR is specified, open() must fail because POSIX says that it fails with errno = EISDIR in this case. If the named file does not exist or does not name a directory, then - if O_CREAT is specified, open() must fail since open() cannot create directories, - if O_WRONLY or O_RDWR is specified, open() must fail because the file does not contain a '.' directory. */ if (flags & (O_CREAT | O_WRONLY | O_RDWR)) { size_t len = strlen (filename); if (len > 0 && filename[len - 1] == '/') { errno = EISDIR; return -1; } } #endif fd = orig_open (filename, flags, mode); #if REPLACE_FCHDIR /* Implementing fchdir and fdopendir requires the ability to open a directory file descriptor. If open doesn't support that (as on mingw), we use a dummy file that behaves the same as directories on Linux (ie. always reports EOF on attempts to read()), and override fstat() in fchdir.c to hide the fact that we have a dummy. */ if (REPLACE_OPEN_DIRECTORY && fd < 0 && errno == EACCES && (flags & O_ACCMODE) == O_RDONLY) { struct stat statbuf; if (stat (filename, &statbuf) == 0 && S_ISDIR (statbuf.st_mode)) { /* Maximum recursion depth of 1. */ fd = open ("/dev/null", flags, mode); if (0 <= fd) fd = _gl_register_fd (fd, filename); } else errno = EACCES; } #endif #if OPEN_TRAILING_SLASH_BUG /* If the filename ends in a slash and fd does not refer to a directory, then fail. Rationale: POSIX says that "A pathname that contains at least one non-slash character and that ends with one or more trailing slashes shall be resolved as if a single dot character ( '.' ) were appended to the pathname." and "The special filename dot shall refer to the directory specified by its predecessor." If the named file without the slash is not a directory, open() must fail with ENOTDIR. */ if (fd >= 0) { /* We know len is positive, since open did not fail with ENOENT. */ size_t len = strlen (filename); if (filename[len - 1] == '/') { struct stat statbuf; if (fstat (fd, &statbuf) >= 0 && !S_ISDIR (statbuf.st_mode)) { close (fd); errno = ENOTDIR; return -1; } } } #endif #if REPLACE_FCHDIR if (!REPLACE_OPEN_DIRECTORY && 0 <= fd) fd = _gl_register_fd (fd, filename); #endif return fd; } libprelude-1.0.0/libmissing/tests/test-sys_stat.c0000664000076400007640000001472711341220442017072 00000000000000/* Test of substitute. Copyright (C) 2007-2010 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 3 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, see . */ /* Written by Bruno Haible , 2007. */ #include #include #include "verify.h" /* Check the existence of some macros. */ int a[] = { S_IFMT, S_IFBLK, S_IFCHR, S_IFDIR, S_IFIFO, S_IFREG, #ifdef S_IFLNK /* missing on mingw and djgpp */ S_IFLNK, #endif #ifdef S_IFSOCK /* missing on mingw and djgpp */ S_IFSOCK, #endif S_IRWXU, S_IRUSR, S_IWUSR, S_IXUSR, S_IRWXG, S_IRGRP, S_IWGRP, S_IXGRP, S_IRWXO, S_IROTH, S_IWOTH, S_IXOTH, S_ISUID, S_ISGID, S_ISVTX, S_ISBLK (S_IFREG), S_ISCHR (S_IFREG), S_ISDIR (S_IFREG), S_ISFIFO (S_IFREG), S_ISREG (S_IFREG), S_ISLNK (S_IFREG), S_ISSOCK (S_IFREG), S_ISDOOR (S_IFREG), S_ISMPB (S_IFREG), S_ISNAM (S_IFREG), S_ISNWK (S_IFREG), S_ISPORT (S_IFREG), S_ISCTG (S_IFREG), S_ISOFD (S_IFREG), S_ISOFL (S_IFREG), S_ISWHT (S_IFREG) }; /* Sanity checks. */ verify (S_IRWXU == (S_IRUSR | S_IWUSR | S_IXUSR)); verify (S_IRWXG == (S_IRGRP | S_IWGRP | S_IXGRP)); verify (S_IRWXO == (S_IROTH | S_IWOTH | S_IXOTH)); verify (S_ISBLK (S_IFBLK)); verify (!S_ISBLK (S_IFCHR)); verify (!S_ISBLK (S_IFDIR)); verify (!S_ISBLK (S_IFIFO)); verify (!S_ISBLK (S_IFREG)); #ifdef S_IFLNK verify (!S_ISBLK (S_IFLNK)); #endif #ifdef S_IFSOCK verify (!S_ISBLK (S_IFSOCK)); #endif verify (!S_ISCHR (S_IFBLK)); verify (S_ISCHR (S_IFCHR)); verify (!S_ISCHR (S_IFDIR)); verify (!S_ISCHR (S_IFIFO)); verify (!S_ISCHR (S_IFREG)); #ifdef S_IFLNK verify (!S_ISCHR (S_IFLNK)); #endif #ifdef S_IFSOCK verify (!S_ISCHR (S_IFSOCK)); #endif verify (!S_ISDIR (S_IFBLK)); verify (!S_ISDIR (S_IFCHR)); verify (S_ISDIR (S_IFDIR)); verify (!S_ISDIR (S_IFIFO)); verify (!S_ISDIR (S_IFREG)); #ifdef S_IFLNK verify (!S_ISDIR (S_IFLNK)); #endif #ifdef S_IFSOCK verify (!S_ISDIR (S_IFSOCK)); #endif verify (!S_ISFIFO (S_IFBLK)); verify (!S_ISFIFO (S_IFCHR)); verify (!S_ISFIFO (S_IFDIR)); verify (S_ISFIFO (S_IFIFO)); verify (!S_ISFIFO (S_IFREG)); #ifdef S_IFLNK verify (!S_ISFIFO (S_IFLNK)); #endif #ifdef S_IFSOCK verify (!S_ISFIFO (S_IFSOCK)); #endif verify (!S_ISREG (S_IFBLK)); verify (!S_ISREG (S_IFCHR)); verify (!S_ISREG (S_IFDIR)); verify (!S_ISREG (S_IFIFO)); verify (S_ISREG (S_IFREG)); #ifdef S_IFLNK verify (!S_ISREG (S_IFLNK)); #endif #ifdef S_IFSOCK verify (!S_ISREG (S_IFSOCK)); #endif verify (!S_ISLNK (S_IFBLK)); verify (!S_ISLNK (S_IFCHR)); verify (!S_ISLNK (S_IFDIR)); verify (!S_ISLNK (S_IFIFO)); verify (!S_ISLNK (S_IFREG)); #ifdef S_IFLNK verify (S_ISLNK (S_IFLNK)); #endif #ifdef S_IFSOCK verify (!S_ISLNK (S_IFSOCK)); #endif verify (!S_ISSOCK (S_IFBLK)); verify (!S_ISSOCK (S_IFCHR)); verify (!S_ISSOCK (S_IFDIR)); verify (!S_ISSOCK (S_IFIFO)); verify (!S_ISSOCK (S_IFREG)); #ifdef S_IFLNK verify (!S_ISSOCK (S_IFLNK)); #endif #ifdef S_IFSOCK verify (S_ISSOCK (S_IFSOCK)); #endif verify (!S_ISDOOR (S_IFBLK)); verify (!S_ISDOOR (S_IFCHR)); verify (!S_ISDOOR (S_IFDIR)); verify (!S_ISDOOR (S_IFIFO)); verify (!S_ISDOOR (S_IFREG)); #ifdef S_IFLNK verify (!S_ISDOOR (S_IFLNK)); #endif #ifdef S_IFSOCK verify (!S_ISDOOR (S_IFSOCK)); #endif verify (!S_ISMPB (S_IFBLK)); verify (!S_ISMPB (S_IFCHR)); verify (!S_ISMPB (S_IFDIR)); verify (!S_ISMPB (S_IFIFO)); verify (!S_ISMPB (S_IFREG)); #ifdef S_IFLNK verify (!S_ISMPB (S_IFLNK)); #endif #ifdef S_IFSOCK verify (!S_ISMPB (S_IFSOCK)); #endif verify (!S_ISNAM (S_IFBLK)); verify (!S_ISNAM (S_IFCHR)); verify (!S_ISNAM (S_IFDIR)); verify (!S_ISNAM (S_IFIFO)); verify (!S_ISNAM (S_IFREG)); #ifdef S_IFLNK verify (!S_ISNAM (S_IFLNK)); #endif #ifdef S_IFSOCK verify (!S_ISNAM (S_IFSOCK)); #endif verify (!S_ISNWK (S_IFBLK)); verify (!S_ISNWK (S_IFCHR)); verify (!S_ISNWK (S_IFDIR)); verify (!S_ISNWK (S_IFIFO)); verify (!S_ISNWK (S_IFREG)); #ifdef S_IFLNK verify (!S_ISNWK (S_IFLNK)); #endif #ifdef S_IFSOCK verify (!S_ISNWK (S_IFSOCK)); #endif verify (!S_ISPORT (S_IFBLK)); verify (!S_ISPORT (S_IFCHR)); verify (!S_ISPORT (S_IFDIR)); verify (!S_ISPORT (S_IFIFO)); verify (!S_ISPORT (S_IFREG)); #ifdef S_IFLNK verify (!S_ISPORT (S_IFLNK)); #endif #ifdef S_IFSOCK verify (!S_ISPORT (S_IFSOCK)); #endif verify (!S_ISCTG (S_IFBLK)); verify (!S_ISCTG (S_IFCHR)); verify (!S_ISCTG (S_IFDIR)); verify (!S_ISCTG (S_IFIFO)); verify (!S_ISCTG (S_IFREG)); #ifdef S_IFLNK verify (!S_ISCTG (S_IFLNK)); #endif #ifdef S_IFSOCK verify (!S_ISCTG (S_IFSOCK)); #endif verify (!S_ISOFD (S_IFBLK)); verify (!S_ISOFD (S_IFCHR)); verify (!S_ISOFD (S_IFDIR)); verify (!S_ISOFD (S_IFIFO)); verify (!S_ISOFD (S_IFREG)); #ifdef S_IFLNK verify (!S_ISOFD (S_IFLNK)); #endif #ifdef S_IFSOCK verify (!S_ISOFD (S_IFSOCK)); #endif verify (!S_ISOFL (S_IFBLK)); verify (!S_ISOFL (S_IFCHR)); verify (!S_ISOFL (S_IFDIR)); verify (!S_ISOFL (S_IFIFO)); verify (!S_ISOFL (S_IFREG)); #ifdef S_IFLNK verify (!S_ISOFL (S_IFLNK)); #endif #ifdef S_IFSOCK verify (!S_ISOFL (S_IFSOCK)); #endif verify (!S_ISWHT (S_IFBLK)); verify (!S_ISWHT (S_IFCHR)); verify (!S_ISWHT (S_IFDIR)); verify (!S_ISWHT (S_IFIFO)); verify (!S_ISWHT (S_IFREG)); #ifdef S_IFLNK verify (!S_ISWHT (S_IFLNK)); #endif #ifdef S_IFSOCK verify (!S_ISWHT (S_IFSOCK)); #endif /* POSIX 2008 requires traditional encoding of permission constants. */ verify (S_IRWXU == 00700); verify (S_IRUSR == 00400); verify (S_IWUSR == 00200); verify (S_IXUSR == 00100); verify (S_IRWXG == 00070); verify (S_IRGRP == 00040); verify (S_IWGRP == 00020); verify (S_IXGRP == 00010); verify (S_IRWXO == 00007); verify (S_IROTH == 00004); verify (S_IWOTH == 00002); verify (S_IXOTH == 00001); verify (S_ISUID == 04000); verify (S_ISGID == 02000); verify (S_ISVTX == 01000); #if ((0 <= UTIME_NOW && UTIME_NOW < 1000000000) \ || (0 <= UTIME_OMIT && UTIME_OMIT < 1000000000) \ || UTIME_NOW == UTIME_OMIT) invalid UTIME macros #endif /* Check the existence of some types. */ nlink_t t1; struct timespec t2; int main (void) { return 0; } libprelude-1.0.0/libmissing/tests/test-vsnprintf-posix.c0000664000076400007640000000244711341220442020406 00000000000000/* Test of POSIX compatible vsnprintf() function. Copyright (C) 2007-2010 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 3 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, see . */ /* Written by Bruno Haible , 2007. */ #include #include #include #include #include #include #include #include #include "macros.h" #include "test-snprintf-posix.h" static int my_snprintf (char *str, size_t size, const char *format, ...) { va_list args; int ret; va_start (args, format); ret = vsnprintf (str, size, format, args); va_end (args); return ret; } int main (int argc, char *argv[]) { test_function (my_snprintf); return 0; } libprelude-1.0.0/libmissing/tests/test-isnanf-nolibm.c0000664000076400007640000000145411341220441017745 00000000000000/* Test of isnanf() substitute. Copyright (C) 2007-2010 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 3 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, see . */ #include #include "isnanf-nolibm.h" #include "test-isnanf.h" libprelude-1.0.0/libmissing/tests/test-printf-frexp.c0000664000076400007640000000705511341220442017641 00000000000000/* Test of splitting a double into fraction and mantissa. Copyright (C) 2007-2010 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 3 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, see . */ /* Written by Bruno Haible , 2007. */ #include #include "printf-frexp.h" #include #include "macros.h" static double my_ldexp (double x, int d) { for (; d > 0; d--) x *= 2.0; for (; d < 0; d++) x *= 0.5; return x; } int main () { int i; /* The use of 'volatile' guarantees that excess precision bits are dropped when dealing with denormalized numbers. It is necessary on x86 systems where double-floats are not IEEE compliant by default, to avoid that the results become platform and compiler option dependent. 'volatile' is a portable alternative to gcc's -ffloat-store option. */ volatile double x; for (i = 1, x = 1.0; i <= DBL_MAX_EXP; i++, x *= 2.0) { int exp = -9999; double mantissa = printf_frexp (x, &exp); ASSERT (exp == i - 1); ASSERT (mantissa == 1.0); } for (i = 1, x = 1.0; i >= DBL_MIN_EXP; i--, x *= 0.5) { int exp = -9999; double mantissa = printf_frexp (x, &exp); ASSERT (exp == i - 1); ASSERT (mantissa == 1.0); } for (; i >= DBL_MIN_EXP - 100 && x > 0.0; i--, x *= 0.5) { int exp = -9999; double mantissa = printf_frexp (x, &exp); ASSERT (exp == DBL_MIN_EXP - 1); ASSERT (mantissa == my_ldexp (1.0, i - DBL_MIN_EXP)); } for (i = 1, x = 1.01; i <= DBL_MAX_EXP; i++, x *= 2.0) { int exp = -9999; double mantissa = printf_frexp (x, &exp); ASSERT (exp == i - 1); ASSERT (mantissa == 1.01); } for (i = 1, x = 1.01; i >= DBL_MIN_EXP; i--, x *= 0.5) { int exp = -9999; double mantissa = printf_frexp (x, &exp); ASSERT (exp == i - 1); ASSERT (mantissa == 1.01); } for (; i >= DBL_MIN_EXP - 100 && x > 0.0; i--, x *= 0.5) { int exp = -9999; double mantissa = printf_frexp (x, &exp); ASSERT (exp == DBL_MIN_EXP - 1); ASSERT (mantissa >= my_ldexp (1.0, i - DBL_MIN_EXP)); ASSERT (mantissa <= my_ldexp (2.0, i - DBL_MIN_EXP)); ASSERT (mantissa == my_ldexp (x, - exp)); } for (i = 1, x = 1.73205; i <= DBL_MAX_EXP; i++, x *= 2.0) { int exp = -9999; double mantissa = printf_frexp (x, &exp); ASSERT (exp == i - 1); ASSERT (mantissa == 1.73205); } for (i = 1, x = 1.73205; i >= DBL_MIN_EXP; i--, x *= 0.5) { int exp = -9999; double mantissa = printf_frexp (x, &exp); ASSERT (exp == i - 1); ASSERT (mantissa == 1.73205); } for (; i >= DBL_MIN_EXP - 100 && x > 0.0; i--, x *= 0.5) { int exp = -9999; double mantissa = printf_frexp (x, &exp); ASSERT (exp == DBL_MIN_EXP - 1); ASSERT (mantissa >= my_ldexp (1.0, i - DBL_MIN_EXP)); ASSERT (mantissa <= my_ldexp (2.0, i - DBL_MIN_EXP)); ASSERT (mantissa == my_ldexp (x, - exp)); } return 0; } libprelude-1.0.0/libmissing/tests/test-inet_ntop.c0000664000076400007640000000310011341220441017176 00000000000000/* Test of inet_ntop function. Copyright (C) 2009, 2010 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 3 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, see . */ /* Written by Bruno Haible , 2009. */ #include #include #include "signature.h" SIGNATURE_CHECK (inet_ntop, char const *, (int, void const *, char *, socklen_t)); #include #include #include #include "macros.h" int main (void) { #if defined AF_INET /* HAVE_IPV4 */ { struct in_addr internal; char printable[16]; const char *result; /* This machine was for a long time known as ma2s2.mathematik.uni-karlsruhe.de. */ # ifdef WORDS_BIGENDIAN internal.s_addr = 0x810D7302; # else internal.s_addr = 0x02730D81; # endif result = inet_ntop (AF_INET, &internal, printable, sizeof (printable)); ASSERT (result != NULL); ASSERT (strcmp (result, "129.13.115.2") == 0); } #endif return 0; } libprelude-1.0.0/libmissing/tests/test-signal.c0000664000076400007640000000453611341220442016473 00000000000000/* Test of substitute. Copyright (C) 2009, 2010 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 3 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, see . */ /* Written by Eric Blake , 2009. */ #include #include /* Check for required types. */ struct { size_t a; uid_t b; volatile sig_atomic_t c; sigset_t d; pid_t e; #if 0 /* Not guaranteed by gnulib. */ pthread_t f; struct timespec g; #endif } s; int main (void) { switch (0) { /* The following are guaranteed by C. */ case 0: case SIGABRT: case SIGFPE: case SIGILL: case SIGINT: case SIGSEGV: case SIGTERM: /* The following is guaranteed by gnulib. */ #if GNULIB_SIGPIPE || defined SIGPIPE case SIGPIPE: #endif /* Ensure no conflict with other standardized names. */ #ifdef SIGALRM case SIGALRM: #endif #ifdef SIGBUS case SIGBUS: #endif #ifdef SIGCHLD case SIGCHLD: #endif #ifdef SIGCONT case SIGCONT: #endif #ifdef SIGHUP case SIGHUP: #endif #ifdef SIGKILL case SIGKILL: #endif #ifdef SIGQUIT case SIGQUIT: #endif #ifdef SIGSTOP case SIGSTOP: #endif #ifdef SIGTSTP case SIGTSTP: #endif #ifdef SIGTTIN case SIGTTIN: #endif #ifdef SIGTTOU case SIGTTOU: #endif #ifdef SIGUSR1 case SIGUSR1: #endif #ifdef SIGUSR2 case SIGUSR2: #endif #ifdef SIGSYS case SIGSYS: #endif #ifdef SIGTRAP case SIGTRAP: #endif #ifdef SIGURG case SIGURG: #endif #ifdef SIGVTALRM case SIGVTALRM: #endif #ifdef SIGXCPU case SIGXCPU: #endif #ifdef SIGXFSZ case SIGXFSZ: #endif /* SIGRTMIN and SIGRTMAX need not be compile-time constants. */ #if 0 # ifdef SIGRTMIN case SIGRTMIN: # endif # ifdef SIGRTMAX case SIGRTMAX: # endif #endif ; } return s.a + s.b + s.c + s.e; } libprelude-1.0.0/libmissing/tests/test-cond.c0000664000076400007640000000761711341220441016143 00000000000000/* Test of condition variables in multithreaded situations. Copyright (C) 2008, 2009, 2010 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 3 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, see . */ #include #if USE_POSIX_THREADS || USE_SOLARIS_THREADS || USE_PTH_THREADS || USE_WIN32_THREADS /* Which tests to perform. Uncomment some of these, to verify that all tests crash if no locking is enabled. */ #define DO_TEST_COND 1 #define DO_TEST_TIMEDCOND 1 /* Whether to help the scheduler through explicit yield(). Uncomment this to see if the operating system has a fair scheduler. */ #define EXPLICIT_YIELD 1 /* Whether to print debugging messages. */ #define ENABLE_DEBUGGING 0 #include #include #include #include #include "glthread/cond.h" #include "glthread/lock.h" #include "glthread/thread.h" #include "glthread/yield.h" #if ENABLE_DEBUGGING # define dbgprintf printf #else # define dbgprintf if (0) printf #endif #if EXPLICIT_YIELD # define yield() gl_thread_yield () #else # define yield() #endif /* * Condition check */ #include static int cond_value = 0; gl_cond_define_initialized(static, condtest) gl_lock_define_initialized(static, lockcond) static void * cond_routine (void *arg) { gl_lock_lock (lockcond); while (!cond_value) { gl_cond_wait (condtest, lockcond); } gl_lock_unlock (lockcond); cond_value = 2; return NULL; } void test_cond () { int remain = 2; gl_thread_t thread; cond_value = 0; thread = gl_thread_create (cond_routine, NULL); do { yield (); remain = sleep (remain); } while (remain); /* signal condition */ gl_lock_lock (lockcond); cond_value = 1; gl_cond_signal (condtest); gl_lock_unlock (lockcond); gl_thread_join (thread, NULL); if (cond_value != 2) abort (); } /* * Timed Condition check */ static int cond_timeout; static void get_ts (struct timespec *ts) { struct timeval now; gettimeofday (&now, NULL); ts->tv_sec = now.tv_sec + 1; ts->tv_nsec = now.tv_usec * 1000; } static void * timedcond_routine (void *arg) { int ret; struct timespec ts; gl_lock_lock (lockcond); while (!cond_value) { get_ts (&ts); ret = glthread_cond_timedwait (&condtest, &lockcond, &ts); if (ret == ETIMEDOUT) cond_timeout = 1; } gl_lock_unlock (lockcond); return NULL; } static void test_timedcond (void) { int remain = 2; gl_thread_t thread; cond_value = cond_timeout = 0; thread = gl_thread_create (timedcond_routine, NULL); remain = 2; do { yield (); remain = sleep (remain); } while (remain); /* signal condition */ gl_lock_lock (lockcond); cond_value = 1; gl_cond_signal (condtest); gl_lock_unlock (lockcond); gl_thread_join (thread, NULL); if (!cond_timeout) abort (); } int main () { #if TEST_PTH_THREADS if (!pth_init ()) abort (); #endif #if DO_TEST_COND printf ("Starting test_cond ..."); fflush (stdout); test_cond (); printf (" OK\n"); fflush (stdout); #endif #if DO_TEST_TIMEDCOND printf ("Starting test_timedcond ..."); fflush (stdout); test_timedcond (); printf (" OK\n"); fflush (stdout); #endif return 0; } #else /* No multithreading available. */ int main () { fputs ("Skipping test: multithreading not enabled\n", stderr); return 77; } #endif libprelude-1.0.0/libmissing/tests/test-sys_time.c0000664000076400007640000000160511341220442017044 00000000000000/* Test of substitute. Copyright (C) 2007, 2009, 2010 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 3 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, see . */ /* Written by Bruno Haible , 2007. */ #include #include struct timeval a; int main (void) { return 0; } libprelude-1.0.0/libmissing/tests/test-lstat.c0000664000076400007640000000341411341220441016336 00000000000000/* Test of lstat() function. Copyright (C) 2008, 2009, 2010 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 3 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, see . */ /* Written by Simon Josefsson, 2008; and Eric Blake, 2009. */ #include #include /* Caution: lstat may be a function-like macro. Although this signature check must pass, it may be the signature of the real (and broken) lstat rather than rpl_lstat. Most code should not use the address of lstat. */ #include "signature.h" SIGNATURE_CHECK (lstat, int, (char const *, struct stat *)); #include #include #include #include #include #include #include "same-inode.h" #include "ignore-value.h" #include "macros.h" #define BASE "test-lstat.t" #include "test-lstat.h" /* Wrapper around lstat, which works even if lstat is a function-like macro, where test_lstat_func(lstat) would do the wrong thing. */ static int do_lstat (char const *name, struct stat *st) { return lstat (name, st); } int main (void) { /* Remove any leftovers from a previous partial run. */ ignore_value (system ("rm -rf " BASE "*")); return test_lstat_func (do_lstat, true); } libprelude-1.0.0/libmissing/tests/test-lock.c0000664000076400007640000003570411341220441016146 00000000000000/* Test of locking in multithreaded situations. Copyright (C) 2005, 2008, 2009, 2010 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 3 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, see . */ /* Written by Bruno Haible , 2005. */ #include #if USE_POSIX_THREADS || USE_SOLARIS_THREADS || USE_PTH_THREADS || USE_WIN32_THREADS #if USE_POSIX_THREADS # define TEST_POSIX_THREADS 1 #endif #if USE_SOLARIS_THREADS # define TEST_SOLARIS_THREADS 1 #endif #if USE_PTH_THREADS # define TEST_PTH_THREADS 1 #endif #if USE_WIN32_THREADS # define TEST_WIN32_THREADS 1 #endif /* Whether to enable locking. Uncomment this to get a test program without locking, to verify that it crashes. */ #define ENABLE_LOCKING 1 /* Which tests to perform. Uncomment some of these, to verify that all tests crash if no locking is enabled. */ #define DO_TEST_LOCK 1 #define DO_TEST_RWLOCK 1 #define DO_TEST_RECURSIVE_LOCK 1 #define DO_TEST_ONCE 1 /* Whether to help the scheduler through explicit yield(). Uncomment this to see if the operating system has a fair scheduler. */ #define EXPLICIT_YIELD 1 /* Whether to print debugging messages. */ #define ENABLE_DEBUGGING 0 /* Number of simultaneous threads. */ #define THREAD_COUNT 10 /* Number of operations performed in each thread. This is quite high, because with a smaller count, say 5000, we often get an "OK" result even without ENABLE_LOCKING (on Linux/x86). */ #define REPEAT_COUNT 50000 #include #include #include #if !ENABLE_LOCKING # undef USE_POSIX_THREADS # undef USE_SOLARIS_THREADS # undef USE_PTH_THREADS # undef USE_WIN32_THREADS #endif #include "glthread/lock.h" #if !ENABLE_LOCKING # if TEST_POSIX_THREADS # define USE_POSIX_THREADS 1 # endif # if TEST_SOLARIS_THREADS # define USE_SOLARIS_THREADS 1 # endif # if TEST_PTH_THREADS # define USE_PTH_THREADS 1 # endif # if TEST_WIN32_THREADS # define USE_WIN32_THREADS 1 # endif #endif #include "glthread/thread.h" #include "glthread/yield.h" #if ENABLE_DEBUGGING # define dbgprintf printf #else # define dbgprintf if (0) printf #endif #if EXPLICIT_YIELD # define yield() gl_thread_yield () #else # define yield() #endif #define ACCOUNT_COUNT 4 static int account[ACCOUNT_COUNT]; static int random_account (void) { return ((unsigned int) rand() >> 3) % ACCOUNT_COUNT; } static void check_accounts (void) { int i, sum; sum = 0; for (i = 0; i < ACCOUNT_COUNT; i++) sum += account[i]; if (sum != ACCOUNT_COUNT * 1000) abort (); } /* ------------------- Test normal (non-recursive) locks ------------------- */ /* Test normal locks by having several bank accounts and several threads which shuffle around money between the accounts and another thread checking that all the money is still there. */ gl_lock_define_initialized(static, my_lock) static void * lock_mutator_thread (void *arg) { int repeat; for (repeat = REPEAT_COUNT; repeat > 0; repeat--) { int i1, i2, value; dbgprintf ("Mutator %p before lock\n", gl_thread_self ()); gl_lock_lock (my_lock); dbgprintf ("Mutator %p after lock\n", gl_thread_self ()); i1 = random_account (); i2 = random_account (); value = ((unsigned int) rand() >> 3) % 10; account[i1] += value; account[i2] -= value; dbgprintf ("Mutator %p before unlock\n", gl_thread_self ()); gl_lock_unlock (my_lock); dbgprintf ("Mutator %p after unlock\n", gl_thread_self ()); dbgprintf ("Mutator %p before check lock\n", gl_thread_self ()); gl_lock_lock (my_lock); check_accounts (); gl_lock_unlock (my_lock); dbgprintf ("Mutator %p after check unlock\n", gl_thread_self ()); yield (); } dbgprintf ("Mutator %p dying.\n", gl_thread_self ()); return NULL; } static volatile int lock_checker_done; static void * lock_checker_thread (void *arg) { while (!lock_checker_done) { dbgprintf ("Checker %p before check lock\n", gl_thread_self ()); gl_lock_lock (my_lock); check_accounts (); gl_lock_unlock (my_lock); dbgprintf ("Checker %p after check unlock\n", gl_thread_self ()); yield (); } dbgprintf ("Checker %p dying.\n", gl_thread_self ()); return NULL; } static void test_lock (void) { int i; gl_thread_t checkerthread; gl_thread_t threads[THREAD_COUNT]; /* Initialization. */ for (i = 0; i < ACCOUNT_COUNT; i++) account[i] = 1000; lock_checker_done = 0; /* Spawn the threads. */ checkerthread = gl_thread_create (lock_checker_thread, NULL); for (i = 0; i < THREAD_COUNT; i++) threads[i] = gl_thread_create (lock_mutator_thread, NULL); /* Wait for the threads to terminate. */ for (i = 0; i < THREAD_COUNT; i++) gl_thread_join (threads[i], NULL); lock_checker_done = 1; gl_thread_join (checkerthread, NULL); check_accounts (); } /* ----------------- Test read-write (non-recursive) locks ----------------- */ /* Test read-write locks by having several bank accounts and several threads which shuffle around money between the accounts and several other threads that check that all the money is still there. */ gl_rwlock_define_initialized(static, my_rwlock) static void * rwlock_mutator_thread (void *arg) { int repeat; for (repeat = REPEAT_COUNT; repeat > 0; repeat--) { int i1, i2, value; dbgprintf ("Mutator %p before wrlock\n", gl_thread_self ()); gl_rwlock_wrlock (my_rwlock); dbgprintf ("Mutator %p after wrlock\n", gl_thread_self ()); i1 = random_account (); i2 = random_account (); value = ((unsigned int) rand() >> 3) % 10; account[i1] += value; account[i2] -= value; dbgprintf ("Mutator %p before unlock\n", gl_thread_self ()); gl_rwlock_unlock (my_rwlock); dbgprintf ("Mutator %p after unlock\n", gl_thread_self ()); yield (); } dbgprintf ("Mutator %p dying.\n", gl_thread_self ()); return NULL; } static volatile int rwlock_checker_done; static void * rwlock_checker_thread (void *arg) { while (!rwlock_checker_done) { dbgprintf ("Checker %p before check rdlock\n", gl_thread_self ()); gl_rwlock_rdlock (my_rwlock); check_accounts (); gl_rwlock_unlock (my_rwlock); dbgprintf ("Checker %p after check unlock\n", gl_thread_self ()); yield (); } dbgprintf ("Checker %p dying.\n", gl_thread_self ()); return NULL; } static void test_rwlock (void) { int i; gl_thread_t checkerthreads[THREAD_COUNT]; gl_thread_t threads[THREAD_COUNT]; /* Initialization. */ for (i = 0; i < ACCOUNT_COUNT; i++) account[i] = 1000; rwlock_checker_done = 0; /* Spawn the threads. */ for (i = 0; i < THREAD_COUNT; i++) checkerthreads[i] = gl_thread_create (rwlock_checker_thread, NULL); for (i = 0; i < THREAD_COUNT; i++) threads[i] = gl_thread_create (rwlock_mutator_thread, NULL); /* Wait for the threads to terminate. */ for (i = 0; i < THREAD_COUNT; i++) gl_thread_join (threads[i], NULL); rwlock_checker_done = 1; for (i = 0; i < THREAD_COUNT; i++) gl_thread_join (checkerthreads[i], NULL); check_accounts (); } /* -------------------------- Test recursive locks -------------------------- */ /* Test recursive locks by having several bank accounts and several threads which shuffle around money between the accounts (recursively) and another thread checking that all the money is still there. */ gl_recursive_lock_define_initialized(static, my_reclock) static void recshuffle (void) { int i1, i2, value; dbgprintf ("Mutator %p before lock\n", gl_thread_self ()); gl_recursive_lock_lock (my_reclock); dbgprintf ("Mutator %p after lock\n", gl_thread_self ()); i1 = random_account (); i2 = random_account (); value = ((unsigned int) rand() >> 3) % 10; account[i1] += value; account[i2] -= value; /* Recursive with probability 0.5. */ if (((unsigned int) rand() >> 3) % 2) recshuffle (); dbgprintf ("Mutator %p before unlock\n", gl_thread_self ()); gl_recursive_lock_unlock (my_reclock); dbgprintf ("Mutator %p after unlock\n", gl_thread_self ()); } static void * reclock_mutator_thread (void *arg) { int repeat; for (repeat = REPEAT_COUNT; repeat > 0; repeat--) { recshuffle (); dbgprintf ("Mutator %p before check lock\n", gl_thread_self ()); gl_recursive_lock_lock (my_reclock); check_accounts (); gl_recursive_lock_unlock (my_reclock); dbgprintf ("Mutator %p after check unlock\n", gl_thread_self ()); yield (); } dbgprintf ("Mutator %p dying.\n", gl_thread_self ()); return NULL; } static volatile int reclock_checker_done; static void * reclock_checker_thread (void *arg) { while (!reclock_checker_done) { dbgprintf ("Checker %p before check lock\n", gl_thread_self ()); gl_recursive_lock_lock (my_reclock); check_accounts (); gl_recursive_lock_unlock (my_reclock); dbgprintf ("Checker %p after check unlock\n", gl_thread_self ()); yield (); } dbgprintf ("Checker %p dying.\n", gl_thread_self ()); return NULL; } static void test_recursive_lock (void) { int i; gl_thread_t checkerthread; gl_thread_t threads[THREAD_COUNT]; /* Initialization. */ for (i = 0; i < ACCOUNT_COUNT; i++) account[i] = 1000; reclock_checker_done = 0; /* Spawn the threads. */ checkerthread = gl_thread_create (reclock_checker_thread, NULL); for (i = 0; i < THREAD_COUNT; i++) threads[i] = gl_thread_create (reclock_mutator_thread, NULL); /* Wait for the threads to terminate. */ for (i = 0; i < THREAD_COUNT; i++) gl_thread_join (threads[i], NULL); reclock_checker_done = 1; gl_thread_join (checkerthread, NULL); check_accounts (); } /* ------------------------ Test once-only execution ------------------------ */ /* Test once-only execution by having several threads attempt to grab a once-only task simultaneously (triggered by releasing a read-write lock). */ gl_once_define(static, fresh_once) static int ready[THREAD_COUNT]; static gl_lock_t ready_lock[THREAD_COUNT]; #if ENABLE_LOCKING static gl_rwlock_t fire_signal[REPEAT_COUNT]; #else static volatile int fire_signal_state; #endif static gl_once_t once_control; static int performed; gl_lock_define_initialized(static, performed_lock) static void once_execute (void) { gl_lock_lock (performed_lock); performed++; gl_lock_unlock (performed_lock); } static void * once_contender_thread (void *arg) { int id = (int) (long) arg; int repeat; for (repeat = 0; repeat <= REPEAT_COUNT; repeat++) { /* Tell the main thread that we're ready. */ gl_lock_lock (ready_lock[id]); ready[id] = 1; gl_lock_unlock (ready_lock[id]); if (repeat == REPEAT_COUNT) break; dbgprintf ("Contender %p waiting for signal for round %d\n", gl_thread_self (), repeat); #if ENABLE_LOCKING /* Wait for the signal to go. */ gl_rwlock_rdlock (fire_signal[repeat]); /* And don't hinder the others (if the scheduler is unfair). */ gl_rwlock_unlock (fire_signal[repeat]); #else /* Wait for the signal to go. */ while (fire_signal_state <= repeat) yield (); #endif dbgprintf ("Contender %p got the signal for round %d\n", gl_thread_self (), repeat); /* Contend for execution. */ gl_once (once_control, once_execute); } return NULL; } static void test_once (void) { int i, repeat; gl_thread_t threads[THREAD_COUNT]; /* Initialize all variables. */ for (i = 0; i < THREAD_COUNT; i++) { ready[i] = 0; gl_lock_init (ready_lock[i]); } #if ENABLE_LOCKING for (i = 0; i < REPEAT_COUNT; i++) gl_rwlock_init (fire_signal[i]); #else fire_signal_state = 0; #endif /* Block all fire_signals. */ for (i = REPEAT_COUNT-1; i >= 0; i--) gl_rwlock_wrlock (fire_signal[i]); /* Spawn the threads. */ for (i = 0; i < THREAD_COUNT; i++) threads[i] = gl_thread_create (once_contender_thread, (void *) (long) i); for (repeat = 0; repeat <= REPEAT_COUNT; repeat++) { /* Wait until every thread is ready. */ dbgprintf ("Main thread before synchonizing for round %d\n", repeat); for (;;) { int ready_count = 0; for (i = 0; i < THREAD_COUNT; i++) { gl_lock_lock (ready_lock[i]); ready_count += ready[i]; gl_lock_unlock (ready_lock[i]); } if (ready_count == THREAD_COUNT) break; yield (); } dbgprintf ("Main thread after synchonizing for round %d\n", repeat); if (repeat > 0) { /* Check that exactly one thread executed the once_execute() function. */ if (performed != 1) abort (); } if (repeat == REPEAT_COUNT) break; /* Preparation for the next round: Initialize once_control. */ memcpy (&once_control, &fresh_once, sizeof (gl_once_t)); /* Preparation for the next round: Reset the performed counter. */ performed = 0; /* Preparation for the next round: Reset the ready flags. */ for (i = 0; i < THREAD_COUNT; i++) { gl_lock_lock (ready_lock[i]); ready[i] = 0; gl_lock_unlock (ready_lock[i]); } /* Signal all threads simultaneously. */ dbgprintf ("Main thread giving signal for round %d\n", repeat); #if ENABLE_LOCKING gl_rwlock_unlock (fire_signal[repeat]); #else fire_signal_state = repeat + 1; #endif } /* Wait for the threads to terminate. */ for (i = 0; i < THREAD_COUNT; i++) gl_thread_join (threads[i], NULL); } /* -------------------------------------------------------------------------- */ int main () { #if TEST_PTH_THREADS if (!pth_init ()) abort (); #endif #if DO_TEST_LOCK printf ("Starting test_lock ..."); fflush (stdout); test_lock (); printf (" OK\n"); fflush (stdout); #endif #if DO_TEST_RWLOCK printf ("Starting test_rwlock ..."); fflush (stdout); test_rwlock (); printf (" OK\n"); fflush (stdout); #endif #if DO_TEST_RECURSIVE_LOCK printf ("Starting test_recursive_lock ..."); fflush (stdout); test_recursive_lock (); printf (" OK\n"); fflush (stdout); #endif #if DO_TEST_ONCE printf ("Starting test_once ..."); fflush (stdout); test_once (); printf (" OK\n"); fflush (stdout); #endif return 0; } #else /* No multithreading available. */ #include int main () { fputs ("Skipping test: multithreading not enabled\n", stderr); return 77; } #endif libprelude-1.0.0/libmissing/tests/test-time.c0000664000076400007640000000203011341220442016137 00000000000000/* Test of substitute. Copyright (C) 2007, 2009, 2010 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 3 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, see . */ /* Written by Bruno Haible , 2007. */ #include #include #include "verify.h" struct timespec a; /* Check that NULL can be passed through varargs as a pointer type, per POSIX 2008. */ verify (sizeof NULL == sizeof (void *)); int main (void) { return 0; } libprelude-1.0.0/libmissing/tests/test-select.c0000664000076400007640000001765611341220442016504 00000000000000/* Test of select() substitute. Copyright (C) 2008-2010 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 3 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, see . */ /* Written by Paolo Bonzini, 2008. */ #include #include #include "signature.h" SIGNATURE_CHECK (select, int, (int, fd_set *, fd_set *, fd_set *, struct timeval *)); /* The following may be macros without underlying functions, so only check signature if they are not macros. */ #ifndef FD_CLR SIGNATURE_CHECK (FD_CLR, void, (int, fd_set *)); #endif #ifndef FD_ISSET SIGNATURE_CHECK (FD_ISSET, void, (int, fd_set *)); #endif #ifndef FD_SET SIGNATURE_CHECK (FD_SET, int, (int, fd_set *)); #endif #ifndef FD_ZERO SIGNATURE_CHECK (FD_ZERO, void, (fd_set *)); #endif #include #include #include #include #include #include #include #include #include enum { SEL_IN = 1, SEL_OUT = 2, SEL_EXC = 4 }; #if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ # define WIN32_NATIVE #endif #ifdef WIN32_NATIVE #include #define pipe(x) _pipe(x, 256, O_BINARY) #endif #ifdef HAVE_UNISTD_H #include #endif #ifdef HAVE_SYS_WAIT_H #include #endif #ifndef SO_REUSEPORT #define SO_REUSEPORT SO_REUSEADDR #endif #define TEST_PORT 12345 /* Minimal testing infrastructure. */ static int failures; static void failed (const char *reason) { if (++failures > 1) printf (" "); printf ("failed (%s)\n", reason); } static int test (void (*fn) (void), const char *msg) { failures = 0; printf ("%s... ", msg); fflush (stdout); fn (); if (!failures) printf ("passed\n"); return failures; } /* Funny socket code. */ static int open_server_socket (void) { int s, x; struct sockaddr_in ia; s = socket (AF_INET, SOCK_STREAM, 0); memset (&ia, 0, sizeof (ia)); ia.sin_family = AF_INET; inet_pton (AF_INET, "127.0.0.1", &ia.sin_addr); ia.sin_port = htons (TEST_PORT); if (bind (s, (struct sockaddr *) &ia, sizeof (ia)) < 0) { perror ("bind"); exit (77); } x = 1; setsockopt (s, SOL_SOCKET, SO_REUSEPORT, &x, sizeof (x)); if (listen (s, 1) < 0) { perror ("listen"); exit (77); } return s; } static int connect_to_socket (int blocking) { int s; struct sockaddr_in ia; s = socket (AF_INET, SOCK_STREAM, 0); memset (&ia, 0, sizeof (ia)); ia.sin_family = AF_INET; inet_pton (AF_INET, "127.0.0.1", &ia.sin_addr); ia.sin_port = htons (TEST_PORT); if (!blocking) { #ifdef WIN32_NATIVE unsigned long iMode = 1; ioctl (s, FIONBIO, (char *) &iMode); #elif defined F_GETFL int oldflags = fcntl (s, F_GETFL, NULL); if (!(oldflags & O_NONBLOCK)) fcntl (s, F_SETFL, oldflags | O_NONBLOCK); #endif } if (connect (s, (struct sockaddr *) &ia, sizeof (ia)) < 0 && (blocking || errno != EINPROGRESS)) { perror ("connect"); exit (77); } return s; } /* A slightly more convenient interface to select(2). */ static int do_select (int fd, int ev, struct timeval *tv) { fd_set rfds, wfds, xfds; int r, rev; FD_ZERO (&rfds); FD_ZERO (&wfds); FD_ZERO (&xfds); if (ev & SEL_IN) FD_SET (fd, &rfds); if (ev & SEL_OUT) FD_SET (fd, &wfds); if (ev & SEL_EXC) FD_SET (fd, &xfds); r = select (fd + 1, &rfds, &wfds, &xfds, tv); if (r < 0) return r; rev = 0; if (FD_ISSET (fd, &rfds)) rev |= SEL_IN; if (FD_ISSET (fd, &wfds)) rev |= SEL_OUT; if (FD_ISSET (fd, &xfds)) rev |= SEL_EXC; if (rev && r == 0) failed ("select returned 0"); if (rev & ~ev) failed ("select returned unrequested events"); return rev; } static int do_select_nowait (int fd, int ev) { static struct timeval tv0; return do_select (fd, ev, &tv0); } static int do_select_wait (int fd, int ev) { return do_select (fd, ev, NULL); } /* Test poll(2) for TTYs. */ #ifdef INTERACTIVE static void test_tty (void) { if (do_select_nowait (0, SEL_IN) != 0) failed ("can read"); if (do_select_nowait (0, SEL_OUT) == 0) failed ("cannot write"); if (do_select_wait (0, SEL_IN) == 0) failed ("return with infinite timeout"); getchar (); if (do_select_nowait (0, SEL_IN) != 0) failed ("can read after getc"); } #endif /* Test poll(2) for unconnected nonblocking sockets. */ static void test_connect_first (void) { int s = open_server_socket (); struct sockaddr_in ia; socklen_t addrlen; int c1, c2; if (do_select_nowait (s, SEL_IN | SEL_EXC) != 0) failed ("can read, socket not connected"); c1 = connect_to_socket (false); if (do_select_wait (s, SEL_IN | SEL_EXC) != SEL_IN) failed ("expecting readability on passive socket"); if (do_select_nowait (s, SEL_IN | SEL_EXC) != SEL_IN) failed ("expecting readability on passive socket"); addrlen = sizeof (ia); c2 = accept (s, (struct sockaddr *) &ia, &addrlen); close (s); close (c1); close (c2); } /* Test poll(2) for unconnected blocking sockets. */ static void test_accept_first (void) { #ifndef WIN32_NATIVE int s = open_server_socket (); struct sockaddr_in ia; socklen_t addrlen; char buf[3]; int c, pid; pid = fork (); if (pid < 0) return; if (pid == 0) { addrlen = sizeof (ia); c = accept (s, (struct sockaddr *) &ia, &addrlen); close (s); write (c, "foo", 3); read (c, buf, 3); shutdown (c, SHUT_RD); close (c); exit (0); } else { close (s); c = connect_to_socket (true); if (do_select_nowait (c, SEL_OUT) != SEL_OUT) failed ("cannot write after blocking connect"); write (c, "foo", 3); wait (&pid); if (do_select_wait (c, SEL_IN) != SEL_IN) failed ("cannot read data left in the socket by closed process"); read (c, buf, 3); write (c, "foo", 3); close (c); } #endif } /* Common code for pipes and connected sockets. */ static void test_pair (int rd, int wd) { char buf[3]; if (do_select_wait (wd, SEL_IN | SEL_OUT | SEL_EXC) != SEL_OUT) failed ("expecting writability before writing"); if (do_select_nowait (wd, SEL_IN | SEL_OUT | SEL_EXC) != SEL_OUT) failed ("expecting writability before writing"); write (wd, "foo", 3); if (do_select_wait (rd, SEL_IN) != SEL_IN) failed ("expecting readability after writing"); if (do_select_nowait (rd, SEL_IN) != SEL_IN) failed ("expecting readability after writing"); read (rd, buf, 3); } /* Test poll(2) on connected sockets. */ static void test_socket_pair (void) { struct sockaddr_in ia; socklen_t addrlen = sizeof (ia); int s = open_server_socket (); int c1 = connect_to_socket (false); int c2 = accept (s, (struct sockaddr *) &ia, &addrlen); close (s); test_pair (c1, c2); close (c1); write (c2, "foo", 3); close (c2); } /* Test poll(2) on pipes. */ static void test_pipe (void) { int fd[2]; pipe (fd); test_pair (fd[0], fd[1]); close (fd[0]); close (fd[1]); } /* Do them all. */ int main (void) { int result; #ifdef INTERACTIVE printf ("Please press Enter\n"); test (test_tty, "TTY"); #endif result = test (test_connect_first, "Unconnected socket test"); result += test (test_socket_pair, "Connected sockets test"); result += test (test_accept_first, "General socket test with fork"); result += test (test_pipe, "Pipe test"); exit (result); } libprelude-1.0.0/libmissing/tests/test-fopen.h0000664000076400007640000000411311341220441016320 00000000000000/* Test of opening a file stream. Copyright (C) 2007-2010 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 3 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, see . */ /* Written by Bruno Haible , 2007. */ /* Include and a form of first. */ #include #include #include "macros.h" /* Test fopen. Assumes BASE is defined. */ static int test_fopen (void) { FILE *f; /* Remove anything from prior partial run. */ unlink (BASE "file"); /* Read requires existing file. */ errno = 0; ASSERT (fopen (BASE "file", "r") == NULL); ASSERT (errno == ENOENT); /* Write can create a file. */ f = fopen (BASE "file", "w"); ASSERT (f); ASSERT (fclose (f) == 0); /* Trailing slash is invalid on non-directory. */ errno = 0; ASSERT (fopen (BASE "file/", "r") == NULL); ASSERT (errno == ENOTDIR || errno == EISDIR || errno == EINVAL); /* Cannot create a directory. */ errno = 0; ASSERT (fopen ("nonexist.ent/", "w") == NULL); ASSERT (errno == ENOTDIR || errno == EISDIR || errno == ENOENT || errno == EINVAL); /* Directories cannot be opened for writing. */ errno = 0; ASSERT (fopen (".", "w") == NULL); ASSERT (errno == EISDIR || errno == EINVAL || errno == EACCES); /* /dev/null must exist, and be writable. */ f = fopen ("/dev/null", "r"); ASSERT (f); ASSERT (fclose (f) == 0); f = fopen ("/dev/null", "w"); ASSERT (f); ASSERT (fclose (f) == 0); /* Cleanup. */ ASSERT (unlink (BASE "file") == 0); return 0; } libprelude-1.0.0/libmissing/tests/test-memmem.c0000664000076400007640000001157111341220441016467 00000000000000/* * Copyright (C) 2004, 2007-2010 Free Software Foundation, Inc. * Written by Bruno Haible and Eric Blake * * 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 3 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, see . */ #include #include #include "signature.h" SIGNATURE_CHECK (memmem, void *, (void const *, size_t, void const *, size_t)); #include #include #include #include "zerosize-ptr.h" #include "macros.h" static void * null_ptr (void) { return NULL; } int main (int argc, char *argv[]) { #if HAVE_DECL_ALARM /* Declare failure if test takes too long, by using default abort caused by SIGALRM. All known platforms that lack alarm also lack memmem, and the replacement memmem is known to not take too long. */ signal (SIGALRM, SIG_DFL); alarm (100); #endif { const char input[] = "foo"; const char *result = memmem (input, strlen (input), "", 0); ASSERT (result == input); } { const char input[] = "foo"; const char *result = memmem (input, strlen (input), "o", 1); ASSERT (result == input + 1); } { const char input[] = "ABC ABCDAB ABCDABCDABDE"; const char *result = memmem (input, strlen (input), "ABCDABD", 7); ASSERT (result == input + 15); } { const char input[] = "ABC ABCDAB ABCDABCDABDE"; const char *result = memmem (input, strlen (input), "ABCDABE", 7); ASSERT (result == NULL); } { const char input[] = "ABC ABCDAB ABCDABCDABDE"; const char *result = memmem (input, strlen (input), "ABCDABCD", 8); ASSERT (result == input + 11); } /* Check that length 0 does not dereference the pointer. */ { const char *result = memmem (zerosize_ptr (), 0, "foo", 3); ASSERT (result == NULL); } { const char input[] = "foo"; const char *result = memmem (input, strlen (input), null_ptr (), 0); ASSERT (result == input); } /* Check that a very long haystack is handled quickly if the needle is short and occurs near the beginning. */ { size_t repeat = 10000; size_t m = 1000000; char *needle = "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"; size_t n = strlen (needle); char *haystack = (char *) malloc (m + 1); if (haystack != NULL) { memset (haystack, 'A', m); haystack[0] = 'B'; for (; repeat > 0; repeat--) { ASSERT (memmem (haystack, m, needle, n) == haystack + 1); } free (haystack); } } /* Check that a very long needle is discarded quickly if the haystack is short. */ { size_t repeat = 10000; size_t m = 1000000; char *haystack = "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" "ABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABAB"; size_t n = strlen (haystack); char *needle = (char *) malloc (m + 1); if (needle != NULL) { memset (needle, 'A', m); for (; repeat > 0; repeat--) { ASSERT (memmem (haystack, n, needle, m) == NULL); } free (needle); } } /* Check that the asymptotic worst-case complexity is not quadratic. */ { size_t m = 1000000; char *haystack = (char *) malloc (2 * m + 1); char *needle = (char *) malloc (m + 1); if (haystack != NULL && needle != NULL) { const char *result; memset (haystack, 'A', 2 * m); haystack[2 * m] = 'B'; memset (needle, 'A', m); needle[m] = 'B'; result = memmem (haystack, 2 * m + 1, needle, m + 1); ASSERT (result == haystack + m); } free (needle); free (haystack); } /* Check that long needles not present in a haystack can be handled with sublinear speed. */ { size_t repeat = 10000; size_t m = 1000000; size_t n = 1000; char *haystack = (char *) malloc (m); char *needle = (char *) malloc (n); if (haystack != NULL && needle != NULL) { const char *result; memset (haystack, 'A', m); memset (needle, 'B', n); for (; repeat > 0; repeat--) { result = memmem (haystack, m, needle, n); ASSERT (result == NULL); } } free (haystack); free (needle); } return 0; } libprelude-1.0.0/libmissing/tests/test-isnanl-nolibm.c0000664000076400007640000000155411341220441017754 00000000000000/* Test of isnanl() substitute. Copyright (C) 2007, 2009, 2010 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 3 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, see . */ /* Written by Bruno Haible , 2007. */ #include #include "isnanl-nolibm.h" #include "test-isnanl.h" libprelude-1.0.0/libmissing/tests/macros.h0000664000076400007640000000610211341220440015517 00000000000000/* Common macros used by gnulib tests. Copyright (C) 2006-2010 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 3 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, see . */ /* This file contains macros that are used by many gnulib tests. Put here only frequently used macros, say, used by 10 tests or more. */ #include #include /* Define ASSERT_STREAM before including this file if ASSERT must target a stream other than stderr. */ #ifndef ASSERT_STREAM # define ASSERT_STREAM stderr #endif /* ASSERT (condition); verifies that the specified condition is fulfilled. If not, a message is printed to ASSERT_STREAM if defined (defaulting to stderr if undefined) and the program is terminated with an error code. This macro has the following properties: - The programmer specifies the expected condition, not the failure condition. This simplifies thinking. - The condition is tested always, regardless of compilation flags. (Unlike the macro from .) - On Unix platforms, the tester can debug the test program with a debugger (provided core dumps are enabled: "ulimit -c unlimited"). - For the sake of platforms where no debugger is available (such as some mingw systems), an error message is printed on the error stream that includes the source location of the ASSERT invocation. */ #define ASSERT(expr) \ do \ { \ if (!(expr)) \ { \ fprintf (ASSERT_STREAM, "%s:%d: assertion failed\n", \ __FILE__, __LINE__); \ fflush (ASSERT_STREAM); \ abort (); \ } \ } \ while (0) /* SIZEOF (array) returns the number of elements of an array. It works for arrays that are declared outside functions and for local variables of array type. It does *not* work for function parameters of array type, because they are actually parameters of pointer type. */ #define SIZEOF(array) (sizeof (array) / sizeof (array[0])) libprelude-1.0.0/libmissing/tests/Makefile.am0000664000076400007640000005042011341220464016126 00000000000000## DO NOT EDIT! GENERATED AUTOMATICALLY! ## Process this file with automake to produce Makefile.in. # Copyright (C) 2002-2010 Free Software Foundation, Inc. # # This file is free software, distributed under the terms of the GNU # General Public License. As a special exception to the GNU General # Public License, this file may be distributed as part of a program # that contains a configuration script generated by Autoconf, under # the same distribution terms as the rest of that program. # # Generated by gnulib-tool. AUTOMAKE_OPTIONS = 1.5 foreign SUBDIRS = TESTS = XFAIL_TESTS = TESTS_ENVIRONMENT = noinst_PROGRAMS = check_PROGRAMS = noinst_HEADERS = noinst_LIBRARIES = check_LIBRARIES = libtests.a EXTRA_DIST = BUILT_SOURCES = SUFFIXES = MOSTLYCLEANFILES = core *.stackdump MOSTLYCLEANDIRS = CLEANFILES = DISTCLEANFILES = MAINTAINERCLEANFILES = AM_CPPFLAGS = \ -I. -I$(srcdir) \ -I../.. -I$(srcdir)/../.. \ -I../../libmissing -I$(srcdir)/../../libmissing LDADD = libtests.a ../../libmissing/libmissing.la libtests.a $(LIBTESTS_LIBDEPS) libtests_a_SOURCES = libtests_a_LIBADD = $(gltests_LIBOBJS) libtests_a_DEPENDENCIES = $(gltests_LIBOBJS) EXTRA_libtests_a_SOURCES = AM_LIBTOOLFLAGS = --preserve-dup-deps TESTS_ENVIRONMENT += EXEEXT='@EXEEXT@' srcdir='$(srcdir)' ## begin gnulib module alignof-tests TESTS += test-alignof check_PROGRAMS += test-alignof EXTRA_DIST += test-alignof.c ## end gnulib module alignof-tests ## begin gnulib module alloca-opt-tests TESTS += test-alloca-opt check_PROGRAMS += test-alloca-opt EXTRA_DIST += test-alloca-opt.c ## end gnulib module alloca-opt-tests ## begin gnulib module arg-nonnull # The BUILT_SOURCES created by this Makefile snippet are not used via #include # statements but through direct file reference. Therefore this snippet must be # present in all Makefile.am that need it. This is ensured by the applicability # 'all' defined above. BUILT_SOURCES += arg-nonnull.h # The arg-nonnull.h that gets inserted into generated .h files is the same as # build-aux/arg-nonnull.h, except that it has the copyright header cut off. arg-nonnull.h: $(top_srcdir)/./arg-nonnull.h $(AM_V_GEN)rm -f $@-t $@ && \ sed -n -e '/GL_ARG_NONNULL/,$$p' \ < $(top_srcdir)/./arg-nonnull.h \ > $@-t && \ mv $@-t $@ MOSTLYCLEANFILES += arg-nonnull.h arg-nonnull.h-t ARG_NONNULL_H=arg-nonnull.h EXTRA_DIST += $(top_srcdir)/./arg-nonnull.h ## end gnulib module arg-nonnull ## begin gnulib module arpa_inet-tests TESTS += test-arpa_inet check_PROGRAMS += test-arpa_inet EXTRA_DIST += test-arpa_inet.c ## end gnulib module arpa_inet-tests ## begin gnulib module binary-io libtests_a_SOURCES += binary-io.h ## end gnulib module binary-io ## begin gnulib module binary-io-tests TESTS += test-binary-io.sh check_PROGRAMS += test-binary-io EXTRA_DIST += test-binary-io.sh test-binary-io.c macros.h ## end gnulib module binary-io-tests ## begin gnulib module btowc-tests TESTS += test-btowc1.sh test-btowc2.sh TESTS_ENVIRONMENT += LOCALE_FR='@LOCALE_FR@' LOCALE_FR_UTF8='@LOCALE_FR_UTF8@' check_PROGRAMS += test-btowc EXTRA_DIST += test-btowc1.sh test-btowc2.sh test-btowc.c signature.h macros.h ## end gnulib module btowc-tests ## begin gnulib module c-ctype-tests TESTS += test-c-ctype check_PROGRAMS += test-c-ctype EXTRA_DIST += test-c-ctype.c macros.h ## end gnulib module c-ctype-tests ## begin gnulib module c-strcase libtests_a_SOURCES += c-strcase.h c-strcasecmp.c c-strncasecmp.c ## end gnulib module c-strcase ## begin gnulib module c-strcase-tests TESTS += test-c-strcase.sh TESTS_ENVIRONMENT += LOCALE_FR='@LOCALE_FR@' LOCALE_TR_UTF8='@LOCALE_TR_UTF8@' check_PROGRAMS += test-c-strcasecmp test-c-strncasecmp EXTRA_DIST += test-c-strcase.sh test-c-strcasecmp.c test-c-strncasecmp.c macros.h ## end gnulib module c-strcase-tests ## begin gnulib module cond-tests TESTS += test-cond check_PROGRAMS += test-cond test_cond_LDADD = $(LDADD) @LIBMULTITHREAD@ @YIELD_LIB@ EXTRA_DIST += test-cond.c ## end gnulib module cond-tests ## begin gnulib module dup2-tests TESTS += test-dup2 check_PROGRAMS += test-dup2 EXTRA_DIST += test-dup2.c signature.h macros.h ## end gnulib module dup2-tests ## begin gnulib module errno-tests TESTS += test-errno check_PROGRAMS += test-errno EXTRA_DIST += test-errno.c ## end gnulib module errno-tests ## begin gnulib module fcntl-h BUILT_SOURCES += fcntl.h # We need the following in order to create when the system # doesn't have one that works with the given compiler. fcntl.h: fcntl.in.h $(WARN_ON_USE_H) $(ARG_NONNULL_H) $(AM_V_GEN)rm -f $@-t $@ && \ { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \ sed -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \ -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ -e 's|@''NEXT_FCNTL_H''@|$(NEXT_FCNTL_H)|g' \ -e 's|@''GNULIB_FCNTL''@|$(GNULIB_FCNTL)|g' \ -e 's|@''GNULIB_OPEN''@|$(GNULIB_OPEN)|g' \ -e 's|@''GNULIB_OPENAT''@|$(GNULIB_OPENAT)|g' \ -e 's|@''HAVE_FCNTL''@|$(HAVE_FCNTL)|g' \ -e 's|@''HAVE_OPENAT''@|$(HAVE_OPENAT)|g' \ -e 's|@''REPLACE_FCNTL''@|$(REPLACE_FCNTL)|g' \ -e 's|@''REPLACE_OPEN''@|$(REPLACE_OPEN)|g' \ -e 's|@''REPLACE_OPENAT''@|$(REPLACE_OPENAT)|g' \ -e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \ -e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)' \ < $(srcdir)/fcntl.in.h; \ } > $@-t && \ mv $@-t $@ MOSTLYCLEANFILES += fcntl.h fcntl.h-t EXTRA_DIST += fcntl.in.h ## end gnulib module fcntl-h ## begin gnulib module fcntl-h-tests TESTS += test-fcntl-h check_PROGRAMS += test-fcntl-h EXTRA_DIST += test-fcntl-h.c ## end gnulib module fcntl-h-tests ## begin gnulib module fopen-tests TESTS += test-fopen check_PROGRAMS += test-fopen EXTRA_DIST += test-fopen.h test-fopen.c signature.h macros.h ## end gnulib module fopen-tests ## begin gnulib module frexp-nolibm-tests TESTS += test-frexp-nolibm check_PROGRAMS += test-frexp-nolibm test_frexp_nolibm_SOURCES = test-frexp.c EXTRA_DIST += test-frexp.c signature.h macros.h ## end gnulib module frexp-nolibm-tests ## begin gnulib module frexpl-nolibm-tests TESTS += test-frexpl-nolibm check_PROGRAMS += test-frexpl-nolibm test_frexpl_nolibm_SOURCES = test-frexpl.c EXTRA_DIST += test-frexpl.c signature.h macros.h ## end gnulib module frexpl-nolibm-tests ## begin gnulib module fseeko-tests TESTS += test-fseeko.sh test-fseeko2.sh check_PROGRAMS += test-fseeko EXTRA_DIST += test-fseeko.c test-fseeko.sh test-fseeko2.sh signature.h macros.h ## end gnulib module fseeko-tests ## begin gnulib module getaddrinfo-tests TESTS += test-getaddrinfo check_PROGRAMS += test-getaddrinfo test_getaddrinfo_LDADD = $(LDADD) @GETADDRINFO_LIB@ @LIBINTL@ EXTRA_DIST += signature.h test-getaddrinfo.c ## end gnulib module getaddrinfo-tests ## begin gnulib module getdelim-tests TESTS += test-getdelim check_PROGRAMS += test-getdelim MOSTLYCLEANFILES += test-getdelim.txt EXTRA_DIST += test-getdelim.c signature.h macros.h ## end gnulib module getdelim-tests ## begin gnulib module gethostname-tests TESTS += test-gethostname check_PROGRAMS += test-gethostname test_gethostname_LDADD = $(LDADD) @GETHOSTNAME_LIB@ EXTRA_DIST += signature.h test-gethostname.c ## end gnulib module gethostname-tests ## begin gnulib module getline-tests TESTS += test-getline check_PROGRAMS += test-getline MOSTLYCLEANFILES += test-getline.txt EXTRA_DIST += test-getline.c signature.h macros.h ## end gnulib module getline-tests ## begin gnulib module getpagesize EXTRA_DIST += getpagesize.c EXTRA_libtests_a_SOURCES += getpagesize.c ## end gnulib module getpagesize ## begin gnulib module gettimeofday-tests TESTS += test-gettimeofday check_PROGRAMS += test-gettimeofday EXTRA_DIST += signature.h test-gettimeofday.c ## end gnulib module gettimeofday-tests ## begin gnulib module ignore-value libtests_a_SOURCES += ignore-value.h ## end gnulib module ignore-value ## begin gnulib module inet_ntop-tests TESTS += test-inet_ntop check_PROGRAMS += test-inet_ntop test_inet_ntop_LDADD = $(LDADD) @INET_NTOP_LIB@ EXTRA_DIST += test-inet_ntop.c signature.h macros.h ## end gnulib module inet_ntop-tests ## begin gnulib module inet_pton-tests TESTS += test-inet_pton check_PROGRAMS += test-inet_pton test_inet_pton_LDADD = $(LDADD) @INET_PTON_LIB@ EXTRA_DIST += test-inet_pton.c signature.h macros.h ## end gnulib module inet_pton-tests ## begin gnulib module isnand-nolibm-tests TESTS += test-isnand-nolibm check_PROGRAMS += test-isnand-nolibm EXTRA_DIST += test-isnand-nolibm.c test-isnand.h nan.h macros.h ## end gnulib module isnand-nolibm-tests ## begin gnulib module isnanf-nolibm-tests TESTS += test-isnanf-nolibm check_PROGRAMS += test-isnanf-nolibm EXTRA_DIST += test-isnanf-nolibm.c test-isnanf.h nan.h macros.h ## end gnulib module isnanf-nolibm-tests ## begin gnulib module isnanl-nolibm-tests TESTS += test-isnanl-nolibm check_PROGRAMS += test-isnanl-nolibm EXTRA_DIST += test-isnanl-nolibm.c test-isnanl.h nan.h macros.h ## end gnulib module isnanl-nolibm-tests ## begin gnulib module langinfo-tests TESTS += test-langinfo check_PROGRAMS += test-langinfo EXTRA_DIST += test-langinfo.c ## end gnulib module langinfo-tests ## begin gnulib module lock-tests TESTS += test-lock check_PROGRAMS += test-lock test_lock_LDADD = $(LDADD) @LIBMULTITHREAD@ @YIELD_LIB@ EXTRA_DIST += test-lock.c ## end gnulib module lock-tests ## begin gnulib module lseek-tests TESTS += test-lseek.sh check_PROGRAMS += test-lseek EXTRA_DIST += test-lseek.c test-lseek.sh signature.h macros.h ## end gnulib module lseek-tests ## begin gnulib module lstat EXTRA_DIST += lstat.c EXTRA_libtests_a_SOURCES += lstat.c ## end gnulib module lstat ## begin gnulib module lstat-tests TESTS += test-lstat check_PROGRAMS += test-lstat EXTRA_DIST += test-lstat.h test-lstat.c signature.h macros.h ## end gnulib module lstat-tests ## begin gnulib module math-tests TESTS += test-math check_PROGRAMS += test-math EXTRA_DIST += test-math.c ## end gnulib module math-tests ## begin gnulib module mbrtowc-tests TESTS += test-mbrtowc1.sh test-mbrtowc2.sh test-mbrtowc3.sh test-mbrtowc4.sh TESTS_ENVIRONMENT += \ LOCALE_FR='@LOCALE_FR@' \ LOCALE_FR_UTF8='@LOCALE_FR_UTF8@' \ LOCALE_JA='@LOCALE_JA@' \ LOCALE_ZH_CN='@LOCALE_ZH_CN@' check_PROGRAMS += test-mbrtowc EXTRA_DIST += test-mbrtowc1.sh test-mbrtowc2.sh test-mbrtowc3.sh test-mbrtowc4.sh test-mbrtowc.c signature.h macros.h ## end gnulib module mbrtowc-tests ## begin gnulib module mbsinit-tests TESTS += test-mbsinit.sh TESTS_ENVIRONMENT += LOCALE_FR_UTF8='@LOCALE_FR_UTF8@' check_PROGRAMS += test-mbsinit EXTRA_DIST += test-mbsinit.sh test-mbsinit.c signature.h macros.h ## end gnulib module mbsinit-tests ## begin gnulib module memchr-tests TESTS += test-memchr check_PROGRAMS += test-memchr EXTRA_DIST += test-memchr.c zerosize-ptr.h signature.h macros.h ## end gnulib module memchr-tests ## begin gnulib module memmem-tests TESTS += test-memmem check_PROGRAMS += test-memmem EXTRA_DIST += test-memmem.c zerosize-ptr.h signature.h macros.h ## end gnulib module memmem-tests ## begin gnulib module netdb-tests TESTS += test-netdb check_PROGRAMS += test-netdb EXTRA_DIST += test-netdb.c ## end gnulib module netdb-tests ## begin gnulib module netinet_in-tests TESTS += test-netinet_in check_PROGRAMS += test-netinet_in EXTRA_DIST += test-netinet_in.c ## end gnulib module netinet_in-tests ## begin gnulib module nl_langinfo-tests TESTS += test-nl_langinfo.sh TESTS_ENVIRONMENT += LOCALE_FR='@LOCALE_FR@' LOCALE_FR_UTF8='@LOCALE_FR_UTF8@' check_PROGRAMS += test-nl_langinfo EXTRA_DIST += test-nl_langinfo.sh test-nl_langinfo.c signature.h macros.h ## end gnulib module nl_langinfo-tests ## begin gnulib module open EXTRA_DIST += open.c EXTRA_libtests_a_SOURCES += open.c ## end gnulib module open ## begin gnulib module open-tests TESTS += test-open check_PROGRAMS += test-open EXTRA_DIST += test-open.h test-open.c signature.h macros.h ## end gnulib module open-tests ## begin gnulib module perror-tests TESTS += test-perror.sh check_PROGRAMS += test-perror EXTRA_DIST += signature.h test-perror.c test-perror.sh ## end gnulib module perror-tests ## begin gnulib module poll-tests TESTS += test-poll check_PROGRAMS += test-poll test_poll_LDADD = $(LDADD) @LIBSOCKET@ $(INET_PTON_LIB) EXTRA_DIST += signature.h test-poll.c ## end gnulib module poll-tests ## begin gnulib module printf-frexp-tests TESTS += test-printf-frexp check_PROGRAMS += test-printf-frexp EXTRA_DIST += test-printf-frexp.c macros.h ## end gnulib module printf-frexp-tests ## begin gnulib module printf-frexpl-tests TESTS += test-printf-frexpl check_PROGRAMS += test-printf-frexpl EXTRA_DIST += test-printf-frexpl.c macros.h ## end gnulib module printf-frexpl-tests ## begin gnulib module same-inode EXTRA_DIST += same-inode.h ## end gnulib module same-inode ## begin gnulib module select-tests TESTS += test-select test-select-in.sh test-select-out.sh # test-select-stdin has to be run by hand. check_PROGRAMS += test-select test-select-fd test-select-stdin test_select_LDADD = $(LDADD) @LIBSOCKET@ $(INET_PTON_LIB) test_select_fd_LDADD = $(LDADD) @LIBSOCKET@ test_select_stdin_LDADD = $(LDADD) @LIBSOCKET@ EXTRA_DIST += signature.h test-select.c test-select-fd.c test-select-in.sh test-select-out.sh test-select-stdin.c ## end gnulib module select-tests ## begin gnulib module signal-tests TESTS += test-signal check_PROGRAMS += test-signal EXTRA_DIST += test-signal.c ## end gnulib module signal-tests ## begin gnulib module signbit-tests TESTS += test-signbit check_PROGRAMS += test-signbit EXTRA_DIST += test-signbit.c macros.h ## end gnulib module signbit-tests ## begin gnulib module sleep-tests TESTS += test-sleep check_PROGRAMS += test-sleep EXTRA_DIST += test-sleep.c signature.h macros.h ## end gnulib module sleep-tests ## begin gnulib module snprintf-posix-tests TESTS += test-snprintf-posix test-snprintf check_PROGRAMS += test-snprintf-posix test-snprintf EXTRA_DIST += test-snprintf-posix.c test-snprintf-posix.h test-snprintf.c nan.h signature.h macros.h ## end gnulib module snprintf-posix-tests ## begin gnulib module snprintf-tests TESTS += test-snprintf check_PROGRAMS += test-snprintf EXTRA_DIST += test-snprintf.c signature.h macros.h ## end gnulib module snprintf-tests ## begin gnulib module sockets-tests TESTS += test-sockets check_PROGRAMS += test-sockets test_sockets_LDADD = $(LDADD) @LIBSOCKET@ EXTRA_DIST += test-sockets.c ## end gnulib module sockets-tests ## begin gnulib module stat-tests TESTS += test-stat check_PROGRAMS += test-stat EXTRA_DIST += test-stat.h test-stat.c signature.h macros.h ## end gnulib module stat-tests ## begin gnulib module stdbool-tests TESTS += test-stdbool check_PROGRAMS += test-stdbool EXTRA_DIST += test-stdbool.c ## end gnulib module stdbool-tests ## begin gnulib module stddef-tests TESTS += test-stddef check_PROGRAMS += test-stddef EXTRA_DIST += test-stddef.c ## end gnulib module stddef-tests ## begin gnulib module stdint-tests TESTS += test-stdint check_PROGRAMS += test-stdint EXTRA_DIST += test-stdint.c ## end gnulib module stdint-tests ## begin gnulib module stdio-tests TESTS += test-stdio check_PROGRAMS += test-stdio EXTRA_DIST += test-stdio.c ## end gnulib module stdio-tests ## begin gnulib module stdlib-tests TESTS += test-stdlib check_PROGRAMS += test-stdlib EXTRA_DIST += test-stdlib.c ## end gnulib module stdlib-tests ## begin gnulib module strcasestr-tests TESTS += test-strcasestr check_PROGRAMS += test-strcasestr EXTRA_DIST += test-strcasestr.c signature.h macros.h ## end gnulib module strcasestr-tests ## begin gnulib module strerror-tests TESTS += test-strerror check_PROGRAMS += test-strerror EXTRA_DIST += test-strerror.c signature.h macros.h ## end gnulib module strerror-tests ## begin gnulib module string-tests TESTS += test-string check_PROGRAMS += test-string EXTRA_DIST += test-string.c ## end gnulib module string-tests ## begin gnulib module strings-tests TESTS += test-strings check_PROGRAMS += test-strings EXTRA_DIST += test-strings.c ## end gnulib module strings-tests ## begin gnulib module symlink EXTRA_DIST += symlink.c EXTRA_libtests_a_SOURCES += symlink.c ## end gnulib module symlink ## begin gnulib module symlink-tests TESTS += test-symlink check_PROGRAMS += test-symlink EXTRA_DIST += test-symlink.h test-symlink.c signature.h macros.h ## end gnulib module symlink-tests ## begin gnulib module sys_ioctl-tests TESTS += test-sys_ioctl check_PROGRAMS += test-sys_ioctl EXTRA_DIST += test-sys_ioctl.c ## end gnulib module sys_ioctl-tests ## begin gnulib module sys_select-tests TESTS += test-sys_select check_PROGRAMS += test-sys_select EXTRA_DIST += test-sys_select.c ## end gnulib module sys_select-tests ## begin gnulib module sys_socket-tests TESTS += test-sys_socket check_PROGRAMS += test-sys_socket EXTRA_DIST += test-sys_socket.c ## end gnulib module sys_socket-tests ## begin gnulib module sys_stat-tests TESTS += test-sys_stat check_PROGRAMS += test-sys_stat EXTRA_DIST += test-sys_stat.c ## end gnulib module sys_stat-tests ## begin gnulib module sys_time-tests TESTS += test-sys_time check_PROGRAMS += test-sys_time EXTRA_DIST += test-sys_time.c ## end gnulib module sys_time-tests ## begin gnulib module sys_utsname-tests TESTS += test-sys_utsname check_PROGRAMS += test-sys_utsname EXTRA_DIST += test-sys_utsname.c ## end gnulib module sys_utsname-tests ## begin gnulib module time-tests TESTS += test-time check_PROGRAMS += test-time EXTRA_DIST += test-time.c ## end gnulib module time-tests ## begin gnulib module tls-tests TESTS += test-tls check_PROGRAMS += test-tls test_tls_LDADD = $(LDADD) @LIBMULTITHREAD@ @YIELD_LIB@ EXTRA_DIST += test-tls.c ## end gnulib module tls-tests ## begin gnulib module uname-tests TESTS += test-uname check_PROGRAMS += test-uname test_uname_LDADD = $(LDADD) @GETHOSTNAME_LIB@ EXTRA_DIST += test-uname.c signature.h macros.h ## end gnulib module uname-tests ## begin gnulib module unistd-tests TESTS += test-unistd check_PROGRAMS += test-unistd EXTRA_DIST += test-unistd.c ## end gnulib module unistd-tests ## begin gnulib module vasnprintf-tests TESTS += test-vasnprintf check_PROGRAMS += test-vasnprintf EXTRA_DIST += test-vasnprintf.c macros.h ## end gnulib module vasnprintf-tests ## begin gnulib module vsnprintf-posix-tests TESTS += test-vsnprintf-posix test-vsnprintf check_PROGRAMS += test-vsnprintf-posix test-vsnprintf EXTRA_DIST += test-vsnprintf-posix.c test-snprintf-posix.h test-vsnprintf.c nan.h signature.h macros.h ## end gnulib module vsnprintf-posix-tests ## begin gnulib module vsnprintf-tests TESTS += test-vsnprintf check_PROGRAMS += test-vsnprintf EXTRA_DIST += test-vsnprintf.c signature.h macros.h ## end gnulib module vsnprintf-tests ## begin gnulib module warn-on-use BUILT_SOURCES += warn-on-use.h # The warn-on-use.h that gets inserted into generated .h files is the same as # build-aux/warn-on-use.h, except that it has the copyright header cut off. warn-on-use.h: $(top_srcdir)/./warn-on-use.h $(AM_V_GEN)rm -f $@-t $@ && \ sed -n -e '/^.ifndef/,$$p' \ < $(top_srcdir)/./warn-on-use.h \ > $@-t && \ mv $@-t $@ MOSTLYCLEANFILES += warn-on-use.h warn-on-use.h-t WARN_ON_USE_H=warn-on-use.h EXTRA_DIST += $(top_srcdir)/./warn-on-use.h ## end gnulib module warn-on-use ## begin gnulib module wchar-tests TESTS += test-wchar check_PROGRAMS += test-wchar EXTRA_DIST += test-wchar.c ## end gnulib module wchar-tests ## begin gnulib module wcrtomb-tests TESTS += test-wcrtomb.sh TESTS_ENVIRONMENT += \ LOCALE_FR='@LOCALE_FR@' \ LOCALE_FR_UTF8='@LOCALE_FR_UTF8@' \ LOCALE_JA='@LOCALE_JA@' \ LOCALE_ZH_CN='@LOCALE_ZH_CN@' check_PROGRAMS += test-wcrtomb EXTRA_DIST += test-wcrtomb.sh test-wcrtomb.c signature.h macros.h ## end gnulib module wcrtomb-tests ## begin gnulib module wctob EXTRA_DIST += wctob.c EXTRA_libtests_a_SOURCES += wctob.c ## end gnulib module wctob ## begin gnulib module wctype-tests TESTS += test-wctype check_PROGRAMS += test-wctype EXTRA_DIST += test-wctype.c macros.h ## end gnulib module wctype-tests ## begin gnulib module yield libtests_a_SOURCES += glthread/yield.h ## end gnulib module yield # Clean up after Solaris cc. clean-local: rm -rf SunWS_cache mostlyclean-local: mostlyclean-generic @for dir in '' $(MOSTLYCLEANDIRS); do \ if test -n "$$dir" && test -d $$dir; then \ echo "rmdir $$dir"; rmdir $$dir; \ fi; \ done; \ : libprelude-1.0.0/libmissing/tests/test-stddef.c0000664000076400007640000000213711341220442016462 00000000000000/* Test of substitute. Copyright (C) 2009, 2010 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 3 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, see . */ /* Written by Eric Blake , 2009. */ #include #include #include "verify.h" /* Check that appropriate types are defined. */ wchar_t a = 'c'; ptrdiff_t b = 1; size_t c = 2; /* Check that NULL can be passed through varargs as a pointer type, per POSIX 2008. */ verify (sizeof NULL == sizeof (void *)); int main (void) { return 0; } libprelude-1.0.0/libmissing/tests/test-c-strcase.sh0000775000076400007640000000114311341220441017263 00000000000000#!/bin/sh # Test in the C locale. ./test-c-strcasecmp${EXEEXT} || exit 1 ./test-c-strncasecmp${EXEEXT} || exit 1 # Test in an ISO-8859-1 or ISO-8859-15 locale. : ${LOCALE_FR=fr_FR} if test $LOCALE_FR != none; then LC_ALL=$LOCALE_FR ./test-c-strcasecmp${EXEEXT} locale || exit 1 LC_ALL=$LOCALE_FR ./test-c-strncasecmp${EXEEXT} locale || exit 1 fi # Test in a Turkish UTF-8 locale. : ${LOCALE_TR_UTF8=tr_TR.UTF-8} if test $LOCALE_TR_UTF8 != none; then LC_ALL=$LOCALE_TR_UTF8 ./test-c-strcasecmp${EXEEXT} locale || exit 1 LC_ALL=$LOCALE_TR_UTF8 ./test-c-strncasecmp${EXEEXT} locale || exit 1 fi exit 0 libprelude-1.0.0/libmissing/tests/test-select-out.sh0000775000076400007640000000157011341220442017470 00000000000000#!/bin/sh # Test select() on file descriptors opened for writing. tmpfiles="" trap 'rm -fr $tmpfiles' 1 2 3 15 tmpfiles="$tmpfiles t-select-out.out t-select-out.tmp" # Regular files. rm -f t-select-out.tmp ./test-select-fd${EXEEXT} w 1 t-select-out.tmp > t-select-out.out test `cat t-select-out.tmp` = "1" || exit 1 # Pipes. if false; then # This test fails on some platforms. rm -f t-select-out.tmp ( { echo abc; ./test-select-fd${EXEEXT} w 1 t-select-out.tmp; } | { sleep 1; cat; } ) > /dev/null test `cat t-select-out.tmp` = "0" || exit 1 fi rm -f t-select-out.tmp ( { sleep 1; echo abc; ./test-select-fd${EXEEXT} w 1 t-select-out.tmp; } | cat) > /dev/null test `cat t-select-out.tmp` = "1" || exit 1 # Special files. rm -f t-select-out.tmp ./test-select-fd${EXEEXT} w 1 t-select-out.tmp > /dev/null test `cat t-select-out.tmp` = "1" || exit 1 rm -fr $tmpfiles exit 0 libprelude-1.0.0/libmissing/tests/test-select-in.sh0000775000076400007640000000162711341220442017272 00000000000000#!/bin/sh # Test select() on file descriptors opened for reading. # This test is known to fail on Solaris 2.6 and older, due to its handling # of /dev/null. tmpfiles="" trap 'rm -fr $tmpfiles' 1 2 3 15 tmpfiles="$tmpfiles t-select-in.tmp" # Regular files. rm -f t-select-in.tmp ./test-select-fd${EXEEXT} r 0 t-select-in.tmp < ./test-select-fd${EXEEXT} test `cat t-select-in.tmp` = "1" || exit 1 # Pipes. rm -f t-select-in.tmp { sleep 1; echo abc; } | ./test-select-fd${EXEEXT} r 0 t-select-in.tmp test `cat t-select-in.tmp` = "0" || exit 1 rm -f t-select-in.tmp echo abc | { sleep 1; ./test-select-fd${EXEEXT} r 0 t-select-in.tmp; } test `cat t-select-in.tmp` = "1" || exit 1 # Special files. # This part of the test is known to fail on Solaris 2.6 and older. rm -f t-select-in.tmp ./test-select-fd${EXEEXT} r 0 t-select-in.tmp < /dev/null test `cat t-select-in.tmp` = "1" || exit 1 rm -fr $tmpfiles exit 0 libprelude-1.0.0/libmissing/tests/test-fseeko.c0000664000076400007640000000461111341220441016463 00000000000000/* Test of fseeko() function. Copyright (C) 2007, 2008, 2009, 2010 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 3 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, see . */ /* Written by Bruno Haible , 2007. */ #include /* None of the files accessed by this test are large, so disable the fseek link warning if we are not using the gnulib fseek module. */ #define _GL_NO_LARGE_FILES #include #include "signature.h" SIGNATURE_CHECK (fseeko, int, (FILE *, off_t, int)); #include "macros.h" #ifndef FUNC_UNGETC_BROKEN # define FUNC_UNGETC_BROKEN 0 #endif int main (int argc, char **argv _GL_UNUSED) { /* Assume stdin is non-empty, seekable, and starts with '#!/bin/sh' iff argc > 1. */ int expected = argc > 1 ? 0 : -1; /* Exit with success only if fseek/fseeko agree. */ int r1 = fseeko (stdin, 0, SEEK_CUR); int r2 = fseek (stdin, 0, SEEK_CUR); ASSERT (r1 == r2 && r1 == expected); if (argc > 1) { /* Test that fseek discards previously read ungetc data. */ int ch = fgetc (stdin); ASSERT (ch == '#'); ASSERT (ungetc (ch, stdin) == ch); ASSERT (fseeko (stdin, 2, SEEK_SET) == 0); ch = fgetc (stdin); ASSERT (ch == '/'); if (2 < argc) { if (FUNC_UNGETC_BROKEN) { fputs ("Skipping test: ungetc cannot handle arbitrary bytes\n", stderr); return 77; } /* Test that fseek discards random ungetc data. */ ASSERT (ungetc (ch ^ 0xff, stdin) == (ch ^ 0xff)); } ASSERT (fseeko (stdin, 0, SEEK_END) == 0); ASSERT (fgetc (stdin) == EOF); /* Test that fseek resets end-of-file marker. */ ASSERT (feof (stdin)); ASSERT (fseeko (stdin, 0, SEEK_END) == 0); ASSERT (!feof (stdin)); } return 0; } libprelude-1.0.0/libmissing/tests/test-netdb.c0000664000076400007640000000166711341220441016313 00000000000000/* Test of substitute. Copyright (C) 2007-2010 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 3 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, see . */ /* Written by Simon Josefsson , 2008. */ #include #include /* Check that the 'struct hostent' type is defined. */ struct hostent t1; int main (void) { return 0; } libprelude-1.0.0/libmissing/tests/nan.h0000664000076400007640000000300711341220440015010 00000000000000/* Macros for not-a-number. Copyright (C) 2007-2010 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 3 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, see . */ /* NaNf () returns a 'float' not-a-number. */ /* The Compaq (ex-DEC) C 6.4 compiler chokes on the expression 0.0 / 0.0. */ #ifdef __DECC static float NaNf () { static float zero = 0.0f; return zero / zero; } #else # define NaNf() (0.0f / 0.0f) #endif /* NaNd () returns a 'double' not-a-number. */ /* The Compaq (ex-DEC) C 6.4 compiler chokes on the expression 0.0 / 0.0. */ #ifdef __DECC static double NaNd () { static double zero = 0.0; return zero / zero; } #else # define NaNd() (0.0 / 0.0) #endif /* NaNl () returns a 'long double' not-a-number. */ /* On Irix 6.5, gcc 3.4.3 can't compute compile-time NaN, and needs the runtime type conversion. */ #ifdef __sgi static long double NaNl () { double zero = 0.0; return zero / zero; } #else # define NaNl() (0.0L / 0.0L) #endif libprelude-1.0.0/libmissing/tests/test-sys_utsname.c0000664000076400007640000000211111341220442017553 00000000000000/* Test of substitute. Copyright (C) 2009, 2010 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 3 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, see . */ /* Written by Bruno Haible , 2009. */ #include #include #include int main () { struct utsname buf; strcpy (buf.sysname, "Linux"); strcpy (buf.nodename, "hobbybox"); strcpy (buf.release, "3.141.592"); strcpy (buf.version, "GENERIC"); strcpy (buf.machine, "i586"); return 0; } libprelude-1.0.0/libmissing/tests/test-snprintf-posix.c0000664000076400007640000000207611341220442020216 00000000000000/* Test of POSIX compatible snprintf() function. Copyright (C) 2007-2010 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 3 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, see . */ /* Written by Bruno Haible , 2007. */ #include #include #include #include #include #include #include #include "macros.h" #include "test-snprintf-posix.h" int main (int argc, char *argv[]) { test_function (snprintf); return 0; } libprelude-1.0.0/libmissing/tests/test-getdelim.c0000664000076400007640000000476511341220441017013 00000000000000/* Test of getdelim() function. Copyright (C) 2007-2010 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 3, 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ /* Written by Eric Blake , 2007. */ #include #include #include "signature.h" SIGNATURE_CHECK (getdelim, ssize_t, (char **, size_t *, int, FILE *)); #include #include #include "macros.h" int main (void) { FILE *f; char *line; size_t len; ssize_t result; /* Create test file. */ f = fopen ("test-getdelim.txt", "wb"); if (!f || fwrite ("anAnbcnd\0f", 1, 10, f) != 10 || fclose (f) != 0) { fputs ("Failed to create sample file.\n", stderr); remove ("test-getdelim.txt"); return 1; } f = fopen ("test-getdelim.txt", "rb"); if (!f) { fputs ("Failed to reopen sample file.\n", stderr); remove ("test-getdelim.txt"); return 1; } /* Test initial allocation, which must include trailing NUL. */ line = NULL; len = 0; result = getdelim (&line, &len, 'n', f); ASSERT (result == 2); ASSERT (strcmp (line, "an") == 0); ASSERT (2 < len); free (line); /* Test initial allocation again, with line = NULL and len != 0. */ line = NULL; len = (size_t)(~0) / 4; result = getdelim (&line, &len, 'n', f); ASSERT (result == 2); ASSERT (strcmp (line, "An") == 0); ASSERT (2 < len); free (line); /* Test growth of buffer. */ line = malloc (1); len = 1; result = getdelim (&line, &len, 'n', f); ASSERT (result == 3); ASSERT (strcmp (line, "bcn") == 0); ASSERT (3 < len); /* Test embedded NULs and EOF behavior. */ result = getdelim (&line, &len, 'n', f); ASSERT (result == 3); ASSERT (memcmp (line, "d\0f", 4) == 0); ASSERT (3 < len); result = getdelim (&line, &len, 'n', f); ASSERT (result == -1); free (line); fclose (f); remove ("test-getdelim.txt"); return 0; } libprelude-1.0.0/libmissing/tests/test-vasnprintf.c0000664000076400007640000000550111341220442017401 00000000000000/* Test of vasnprintf() and asnprintf() functions. Copyright (C) 2007-2010 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 3 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, see . */ /* Written by Bruno Haible , 2007. */ #include #include "vasnprintf.h" #include #include #include #include "macros.h" static char * my_asnprintf (char *resultbuf, size_t *lengthp, const char *format, ...) { va_list args; char *ret; va_start (args, format); ret = vasnprintf (resultbuf, lengthp, format, args); va_end (args); return ret; } static void test_vasnprintf () { char buf[8]; int size; for (size = 0; size <= 8; size++) { size_t length = size; char *result = my_asnprintf (NULL, &length, "%d", 12345); ASSERT (result != NULL); ASSERT (strcmp (result, "12345") == 0); ASSERT (length == 5); free (result); } for (size = 0; size <= 8; size++) { size_t length; char *result; memcpy (buf, "DEADBEEF", 8); length = size; result = my_asnprintf (buf, &length, "%d", 12345); ASSERT (result != NULL); ASSERT (strcmp (result, "12345") == 0); ASSERT (length == 5); if (size < 6) ASSERT (result != buf); ASSERT (memcmp (buf + size, "DEADBEEF" + size, 8 - size) == 0); if (result != buf) free (result); } } static void test_asnprintf () { char buf[8]; int size; for (size = 0; size <= 8; size++) { size_t length = size; char *result = asnprintf (NULL, &length, "%d", 12345); ASSERT (result != NULL); ASSERT (strcmp (result, "12345") == 0); ASSERT (length == 5); free (result); } for (size = 0; size <= 8; size++) { size_t length; char *result; memcpy (buf, "DEADBEEF", 8); length = size; result = asnprintf (buf, &length, "%d", 12345); ASSERT (result != NULL); ASSERT (strcmp (result, "12345") == 0); ASSERT (length == 5); if (size < 6) ASSERT (result != buf); ASSERT (memcmp (buf + size, "DEADBEEF" + size, 8 - size) == 0); if (result != buf) free (result); } } int main (int argc, char *argv[]) { test_vasnprintf (); test_asnprintf (); return 0; } libprelude-1.0.0/libmissing/tests/test-isnand.h0000664000076400007640000000412211341220441016465 00000000000000/* Test of isnand() substitute. Copyright (C) 2007-2010 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 3 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, see . */ /* Written by Bruno Haible , 2007. */ #include #include "nan.h" #include "macros.h" /* HP cc on HP-UX 10.20 has a bug with the constant expression -0.0. So we use -zero instead. */ double zero = 0.0; int main () { /* Finite values. */ ASSERT (!isnand (3.141)); ASSERT (!isnand (3.141e30)); ASSERT (!isnand (3.141e-30)); ASSERT (!isnand (-2.718)); ASSERT (!isnand (-2.718e30)); ASSERT (!isnand (-2.718e-30)); ASSERT (!isnand (0.0)); ASSERT (!isnand (-zero)); /* Infinite values. */ ASSERT (!isnand (1.0 / 0.0)); ASSERT (!isnand (-1.0 / 0.0)); /* Quiet NaN. */ ASSERT (isnand (NaNd ())); #if defined DBL_EXPBIT0_WORD && defined DBL_EXPBIT0_BIT /* Signalling NaN. */ { #define NWORDS \ ((sizeof (double) + sizeof (unsigned int) - 1) / sizeof (unsigned int)) typedef union { double value; unsigned int word[NWORDS]; } memory_double; memory_double m; m.value = NaNd (); # if DBL_EXPBIT0_BIT > 0 m.word[DBL_EXPBIT0_WORD] ^= (unsigned int) 1 << (DBL_EXPBIT0_BIT - 1); # else m.word[DBL_EXPBIT0_WORD + (DBL_EXPBIT0_WORD < NWORDS / 2 ? 1 : - 1)] ^= (unsigned int) 1 << (sizeof (unsigned int) * CHAR_BIT - 1); # endif m.word[DBL_EXPBIT0_WORD + (DBL_EXPBIT0_WORD < NWORDS / 2 ? 1 : - 1)] |= (unsigned int) 1 << DBL_EXPBIT0_BIT; ASSERT (isnand (m.value)); } #endif return 0; } libprelude-1.0.0/libmissing/tests/test-stdbool.c0000664000076400007640000000605011341220442016655 00000000000000/* Test of substitute. Copyright (C) 2002-2007, 2009-2010 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 3 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, see . */ /* Written by Bruno Haible , 2007. */ #include #include #ifndef bool "error: bool is not defined" #endif #ifndef false "error: false is not defined" #endif #if false "error: false is not 0" #endif #ifndef true "error: true is not defined" #endif #if true != 1 "error: true is not 1" #endif #ifndef __bool_true_false_are_defined "error: __bool_true_false_are_defined is not defined" #endif #if 0 /* Cannot be guaranteed with gnulib's . */ struct s { _Bool s: 1; _Bool t; } s; #endif char a[true == 1 ? 1 : -1]; char b[false == 0 ? 1 : -1]; char c[__bool_true_false_are_defined == 1 ? 1 : -1]; #if 0 /* Cannot be guaranteed with gnulib's . */ char d[(bool) 0.5 == true ? 1 : -1]; bool e = &s; #endif char f[(_Bool) 0.0 == false ? 1 : -1]; char g[true]; char h[sizeof (_Bool)]; #if 0 /* See above. */ char i[sizeof s.t]; #endif enum { j = false, k = true, l = false * true, m = true * 256 }; _Bool n[m]; char o[sizeof n == m * sizeof n[0] ? 1 : -1]; char p[-1 - (_Bool) 0 < 0 && -1 - (bool) 0 < 0 ? 1 : -1]; #if 0 /* Cannot be guaranteed with gnulib's . */ #if defined __xlc__ || defined __GNUC__ /* Catch a bug in IBM AIX xlc compiler version 6.0.0.0 reported by James Lemley on 2005-10-05; see http://lists.gnu.org/archive/html/bug-coreutils/2005-10/msg00086.html This test is not quite right, since xlc is allowed to reject this program, as the initializer for xlcbug is not one of the forms that C requires support for. However, doing the test right would require a run-time test, and that would make cross-compilation harder. Let us hope that IBM fixes the xlc bug, and also adds support for this kind of constant expression. In the meantime, this test will reject xlc, which is OK, since our stdbool.h substitute should suffice. We also test this with GCC, where it should work, to detect more quickly whether someone messes up the test in the future. */ char digs[] = "0123456789"; int xlcbug = 1 / (&(digs + 5)[-2 + (bool) 1] == &digs[4] ? 1 : -1); #endif #endif /* Catch a bug in an HP-UX C compiler. See http://gcc.gnu.org/ml/gcc-patches/2003-12/msg02303.html http://lists.gnu.org/archive/html/bug-coreutils/2005-11/msg00161.html */ _Bool q = true; _Bool *pq = &q; int main () { return 0; } libprelude-1.0.0/libmissing/tests/Makefile.in0000664000076400007640000032326211347714456016165 00000000000000# Makefile.in generated by automake 1.11.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, # Inc. # This Makefile.in 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. @SET_MAKE@ # Copyright (C) 2002-2010 Free Software Foundation, Inc. # # This file is free software, distributed under the terms of the GNU # General Public License. As a special exception to the GNU General # Public License, this file may be distributed as part of a program # that contains a configuration script generated by Autoconf, under # the same distribution terms as the rest of that program. # # Generated by gnulib-tool. VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ target_triplet = @target@ TESTS = test-alignof$(EXEEXT) test-alloca-opt$(EXEEXT) \ test-arpa_inet$(EXEEXT) test-binary-io.sh test-btowc1.sh \ test-btowc2.sh test-c-ctype$(EXEEXT) test-c-strcase.sh \ test-cond$(EXEEXT) test-dup2$(EXEEXT) test-errno$(EXEEXT) \ test-fcntl-h$(EXEEXT) test-fopen$(EXEEXT) \ test-frexp-nolibm$(EXEEXT) test-frexpl-nolibm$(EXEEXT) \ test-fseeko.sh test-fseeko2.sh test-getaddrinfo$(EXEEXT) \ test-getdelim$(EXEEXT) test-gethostname$(EXEEXT) \ test-getline$(EXEEXT) test-gettimeofday$(EXEEXT) \ test-inet_ntop$(EXEEXT) test-inet_pton$(EXEEXT) \ test-isnand-nolibm$(EXEEXT) test-isnanf-nolibm$(EXEEXT) \ test-isnanl-nolibm$(EXEEXT) test-langinfo$(EXEEXT) \ test-lock$(EXEEXT) test-lseek.sh test-lstat$(EXEEXT) \ test-math$(EXEEXT) test-mbrtowc1.sh test-mbrtowc2.sh \ test-mbrtowc3.sh test-mbrtowc4.sh test-mbsinit.sh \ test-memchr$(EXEEXT) test-memmem$(EXEEXT) test-netdb$(EXEEXT) \ test-netinet_in$(EXEEXT) test-nl_langinfo.sh \ test-open$(EXEEXT) test-perror.sh test-poll$(EXEEXT) \ test-printf-frexp$(EXEEXT) test-printf-frexpl$(EXEEXT) \ test-select$(EXEEXT) test-select-in.sh test-select-out.sh \ test-signal$(EXEEXT) test-signbit$(EXEEXT) test-sleep$(EXEEXT) \ test-snprintf-posix$(EXEEXT) test-snprintf$(EXEEXT) \ test-snprintf$(EXEEXT) test-sockets$(EXEEXT) \ test-stat$(EXEEXT) test-stdbool$(EXEEXT) test-stddef$(EXEEXT) \ test-stdint$(EXEEXT) test-stdio$(EXEEXT) test-stdlib$(EXEEXT) \ test-strcasestr$(EXEEXT) test-strerror$(EXEEXT) \ test-string$(EXEEXT) test-strings$(EXEEXT) \ test-symlink$(EXEEXT) test-sys_ioctl$(EXEEXT) \ test-sys_select$(EXEEXT) test-sys_socket$(EXEEXT) \ test-sys_stat$(EXEEXT) test-sys_time$(EXEEXT) \ test-sys_utsname$(EXEEXT) test-time$(EXEEXT) test-tls$(EXEEXT) \ test-uname$(EXEEXT) test-unistd$(EXEEXT) \ test-vasnprintf$(EXEEXT) test-vsnprintf-posix$(EXEEXT) \ test-vsnprintf$(EXEEXT) test-vsnprintf$(EXEEXT) \ test-wchar$(EXEEXT) test-wcrtomb.sh test-wctype$(EXEEXT) XFAIL_TESTS = noinst_PROGRAMS = check_PROGRAMS = test-alignof$(EXEEXT) test-alloca-opt$(EXEEXT) \ test-arpa_inet$(EXEEXT) test-binary-io$(EXEEXT) \ test-btowc$(EXEEXT) test-c-ctype$(EXEEXT) \ test-c-strcasecmp$(EXEEXT) test-c-strncasecmp$(EXEEXT) \ test-cond$(EXEEXT) test-dup2$(EXEEXT) test-errno$(EXEEXT) \ test-fcntl-h$(EXEEXT) test-fopen$(EXEEXT) \ test-frexp-nolibm$(EXEEXT) test-frexpl-nolibm$(EXEEXT) \ test-fseeko$(EXEEXT) test-getaddrinfo$(EXEEXT) \ test-getdelim$(EXEEXT) test-gethostname$(EXEEXT) \ test-getline$(EXEEXT) test-gettimeofday$(EXEEXT) \ test-inet_ntop$(EXEEXT) test-inet_pton$(EXEEXT) \ test-isnand-nolibm$(EXEEXT) test-isnanf-nolibm$(EXEEXT) \ test-isnanl-nolibm$(EXEEXT) test-langinfo$(EXEEXT) \ test-lock$(EXEEXT) test-lseek$(EXEEXT) test-lstat$(EXEEXT) \ test-math$(EXEEXT) test-mbrtowc$(EXEEXT) test-mbsinit$(EXEEXT) \ test-memchr$(EXEEXT) test-memmem$(EXEEXT) test-netdb$(EXEEXT) \ test-netinet_in$(EXEEXT) test-nl_langinfo$(EXEEXT) \ test-open$(EXEEXT) test-perror$(EXEEXT) test-poll$(EXEEXT) \ test-printf-frexp$(EXEEXT) test-printf-frexpl$(EXEEXT) \ test-select$(EXEEXT) test-select-fd$(EXEEXT) \ test-select-stdin$(EXEEXT) test-signal$(EXEEXT) \ test-signbit$(EXEEXT) test-sleep$(EXEEXT) \ test-snprintf-posix$(EXEEXT) test-snprintf$(EXEEXT) \ test-snprintf$(EXEEXT) test-sockets$(EXEEXT) \ test-stat$(EXEEXT) test-stdbool$(EXEEXT) test-stddef$(EXEEXT) \ test-stdint$(EXEEXT) test-stdio$(EXEEXT) test-stdlib$(EXEEXT) \ test-strcasestr$(EXEEXT) test-strerror$(EXEEXT) \ test-string$(EXEEXT) test-strings$(EXEEXT) \ test-symlink$(EXEEXT) test-sys_ioctl$(EXEEXT) \ test-sys_select$(EXEEXT) test-sys_socket$(EXEEXT) \ test-sys_stat$(EXEEXT) test-sys_time$(EXEEXT) \ test-sys_utsname$(EXEEXT) test-time$(EXEEXT) test-tls$(EXEEXT) \ test-uname$(EXEEXT) test-unistd$(EXEEXT) \ test-vasnprintf$(EXEEXT) test-vsnprintf-posix$(EXEEXT) \ test-vsnprintf$(EXEEXT) test-vsnprintf$(EXEEXT) \ test-wchar$(EXEEXT) test-wcrtomb$(EXEEXT) test-wctype$(EXEEXT) subdir = libmissing/tests DIST_COMMON = $(noinst_HEADERS) $(srcdir)/Makefile.am \ $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/libmissing/m4/00gnulib.m4 \ $(top_srcdir)/libmissing/m4/alloca.m4 \ $(top_srcdir)/libmissing/m4/arpa_inet_h.m4 \ $(top_srcdir)/libmissing/m4/btowc.m4 \ $(top_srcdir)/libmissing/m4/close.m4 \ $(top_srcdir)/libmissing/m4/codeset.m4 \ $(top_srcdir)/libmissing/m4/cond.m4 \ $(top_srcdir)/libmissing/m4/dos.m4 \ $(top_srcdir)/libmissing/m4/dup2.m4 \ $(top_srcdir)/libmissing/m4/errno_h.m4 \ $(top_srcdir)/libmissing/m4/exponentd.m4 \ $(top_srcdir)/libmissing/m4/exponentf.m4 \ $(top_srcdir)/libmissing/m4/exponentl.m4 \ $(top_srcdir)/libmissing/m4/extensions.m4 \ $(top_srcdir)/libmissing/m4/fclose.m4 \ $(top_srcdir)/libmissing/m4/fcntl-o.m4 \ $(top_srcdir)/libmissing/m4/fcntl_h.m4 \ $(top_srcdir)/libmissing/m4/float_h.m4 \ $(top_srcdir)/libmissing/m4/fopen.m4 \ $(top_srcdir)/libmissing/m4/fpieee.m4 \ $(top_srcdir)/libmissing/m4/frexp.m4 \ $(top_srcdir)/libmissing/m4/frexpl.m4 \ $(top_srcdir)/libmissing/m4/fseeko.m4 \ $(top_srcdir)/libmissing/m4/ftw.m4 \ $(top_srcdir)/libmissing/m4/getaddrinfo.m4 \ $(top_srcdir)/libmissing/m4/getdelim.m4 \ $(top_srcdir)/libmissing/m4/gethostname.m4 \ $(top_srcdir)/libmissing/m4/getline.m4 \ $(top_srcdir)/libmissing/m4/getpagesize.m4 \ $(top_srcdir)/libmissing/m4/getpass.m4 \ $(top_srcdir)/libmissing/m4/gettimeofday.m4 \ $(top_srcdir)/libmissing/m4/glibc21.m4 \ $(top_srcdir)/libmissing/m4/gnulib-common.m4 \ $(top_srcdir)/libmissing/m4/gnulib-comp.m4 \ $(top_srcdir)/libmissing/m4/gnulib-tool.m4 \ $(top_srcdir)/libmissing/m4/hostent.m4 \ $(top_srcdir)/libmissing/m4/include_next.m4 \ $(top_srcdir)/libmissing/m4/inet_ntop.m4 \ $(top_srcdir)/libmissing/m4/inet_pton.m4 \ $(top_srcdir)/libmissing/m4/intmax_t.m4 \ $(top_srcdir)/libmissing/m4/inttypes_h.m4 \ $(top_srcdir)/libmissing/m4/isnand.m4 \ $(top_srcdir)/libmissing/m4/isnanf.m4 \ $(top_srcdir)/libmissing/m4/isnanl.m4 \ $(top_srcdir)/libmissing/m4/langinfo_h.m4 \ $(top_srcdir)/libmissing/m4/ldexpl.m4 \ $(top_srcdir)/libmissing/m4/lib-ld.m4 \ $(top_srcdir)/libmissing/m4/lib-link.m4 \ $(top_srcdir)/libmissing/m4/lib-prefix.m4 \ $(top_srcdir)/libmissing/m4/localcharset.m4 \ $(top_srcdir)/libmissing/m4/locale-fr.m4 \ $(top_srcdir)/libmissing/m4/locale-ja.m4 \ $(top_srcdir)/libmissing/m4/locale-tr.m4 \ $(top_srcdir)/libmissing/m4/locale-zh.m4 \ $(top_srcdir)/libmissing/m4/lock.m4 \ $(top_srcdir)/libmissing/m4/longlong.m4 \ $(top_srcdir)/libmissing/m4/lseek.m4 \ $(top_srcdir)/libmissing/m4/lstat.m4 \ $(top_srcdir)/libmissing/m4/malloc.m4 \ $(top_srcdir)/libmissing/m4/math_h.m4 \ $(top_srcdir)/libmissing/m4/mbrtowc.m4 \ $(top_srcdir)/libmissing/m4/mbsinit.m4 \ $(top_srcdir)/libmissing/m4/mbstate_t.m4 \ $(top_srcdir)/libmissing/m4/memchr.m4 \ $(top_srcdir)/libmissing/m4/memmem.m4 \ $(top_srcdir)/libmissing/m4/minmax.m4 \ $(top_srcdir)/libmissing/m4/mktime.m4 \ $(top_srcdir)/libmissing/m4/mmap-anon.m4 \ $(top_srcdir)/libmissing/m4/mode_t.m4 \ $(top_srcdir)/libmissing/m4/multiarch.m4 \ $(top_srcdir)/libmissing/m4/netdb_h.m4 \ $(top_srcdir)/libmissing/m4/netinet_in_h.m4 \ $(top_srcdir)/libmissing/m4/nl_langinfo.m4 \ $(top_srcdir)/libmissing/m4/nocrash.m4 \ $(top_srcdir)/libmissing/m4/onceonly.m4 \ $(top_srcdir)/libmissing/m4/open.m4 \ $(top_srcdir)/libmissing/m4/pathmax.m4 \ $(top_srcdir)/libmissing/m4/perror.m4 \ $(top_srcdir)/libmissing/m4/poll.m4 \ $(top_srcdir)/libmissing/m4/printf-frexp.m4 \ $(top_srcdir)/libmissing/m4/printf-frexpl.m4 \ $(top_srcdir)/libmissing/m4/printf.m4 \ $(top_srcdir)/libmissing/m4/realloc.m4 \ $(top_srcdir)/libmissing/m4/regex.m4 \ $(top_srcdir)/libmissing/m4/relocatable-lib.m4 \ $(top_srcdir)/libmissing/m4/select.m4 \ $(top_srcdir)/libmissing/m4/servent.m4 \ $(top_srcdir)/libmissing/m4/signal_h.m4 \ $(top_srcdir)/libmissing/m4/signalblocking.m4 \ $(top_srcdir)/libmissing/m4/signbit.m4 \ $(top_srcdir)/libmissing/m4/size_max.m4 \ $(top_srcdir)/libmissing/m4/sleep.m4 \ $(top_srcdir)/libmissing/m4/snprintf-posix.m4 \ $(top_srcdir)/libmissing/m4/snprintf.m4 \ $(top_srcdir)/libmissing/m4/sockets.m4 \ $(top_srcdir)/libmissing/m4/socklen.m4 \ $(top_srcdir)/libmissing/m4/sockpfaf.m4 \ $(top_srcdir)/libmissing/m4/ssize_t.m4 \ $(top_srcdir)/libmissing/m4/stat.m4 \ $(top_srcdir)/libmissing/m4/stdbool.m4 \ $(top_srcdir)/libmissing/m4/stddef_h.m4 \ $(top_srcdir)/libmissing/m4/stdint.m4 \ $(top_srcdir)/libmissing/m4/stdint_h.m4 \ $(top_srcdir)/libmissing/m4/stdio_h.m4 \ $(top_srcdir)/libmissing/m4/stdlib_h.m4 \ $(top_srcdir)/libmissing/m4/strcase.m4 \ $(top_srcdir)/libmissing/m4/strcasestr.m4 \ $(top_srcdir)/libmissing/m4/strdup.m4 \ $(top_srcdir)/libmissing/m4/strerror.m4 \ $(top_srcdir)/libmissing/m4/string_h.m4 \ $(top_srcdir)/libmissing/m4/strings_h.m4 \ $(top_srcdir)/libmissing/m4/strndup.m4 \ $(top_srcdir)/libmissing/m4/strnlen.m4 \ $(top_srcdir)/libmissing/m4/strptime.m4 \ $(top_srcdir)/libmissing/m4/strsep.m4 \ $(top_srcdir)/libmissing/m4/symlink.m4 \ $(top_srcdir)/libmissing/m4/sys_ioctl_h.m4 \ $(top_srcdir)/libmissing/m4/sys_select_h.m4 \ $(top_srcdir)/libmissing/m4/sys_socket_h.m4 \ $(top_srcdir)/libmissing/m4/sys_stat_h.m4 \ $(top_srcdir)/libmissing/m4/sys_time_h.m4 \ $(top_srcdir)/libmissing/m4/sys_utsname_h.m4 \ $(top_srcdir)/libmissing/m4/thread.m4 \ $(top_srcdir)/libmissing/m4/threadlib.m4 \ $(top_srcdir)/libmissing/m4/time_h.m4 \ $(top_srcdir)/libmissing/m4/time_r.m4 \ $(top_srcdir)/libmissing/m4/timegm.m4 \ $(top_srcdir)/libmissing/m4/tls.m4 \ $(top_srcdir)/libmissing/m4/tm_gmtoff.m4 \ $(top_srcdir)/libmissing/m4/uname.m4 \ $(top_srcdir)/libmissing/m4/ungetc.m4 \ $(top_srcdir)/libmissing/m4/unistd_h.m4 \ $(top_srcdir)/libmissing/m4/vasnprintf.m4 \ $(top_srcdir)/libmissing/m4/vsnprintf-posix.m4 \ $(top_srcdir)/libmissing/m4/vsnprintf.m4 \ $(top_srcdir)/libmissing/m4/warn-on-use.m4 \ $(top_srcdir)/libmissing/m4/wchar.m4 \ $(top_srcdir)/libmissing/m4/wchar_t.m4 \ $(top_srcdir)/libmissing/m4/wcrtomb.m4 \ $(top_srcdir)/libmissing/m4/wctob.m4 \ $(top_srcdir)/libmissing/m4/wctype.m4 \ $(top_srcdir)/libmissing/m4/wint_t.m4 \ $(top_srcdir)/libmissing/m4/write.m4 \ $(top_srcdir)/libmissing/m4/xsize.m4 \ $(top_srcdir)/libmissing/m4/yield.m4 \ $(top_srcdir)/m4/ac_compile_check_sizeof.m4 \ $(top_srcdir)/m4/am_path_ruby.m4 $(top_srcdir)/m4/argz.m4 \ $(top_srcdir)/m4/as-ac-expand.m4 \ $(top_srcdir)/m4/ax_c_check_flag.m4 \ $(top_srcdir)/m4/ax_check_aligned_access_required.m4 \ $(top_srcdir)/m4/ax_create_prelude_inttypes_h.m4 \ $(top_srcdir)/m4/ax_ld_check_flag.m4 \ $(top_srcdir)/m4/gtk-doc.m4 $(top_srcdir)/m4/libgcrypt.m4 \ $(top_srcdir)/m4/libgnutls-extra.m4 \ $(top_srcdir)/m4/libgnutls.m4 $(top_srcdir)/m4/libtool.m4 \ $(top_srcdir)/m4/ltdl.m4 $(top_srcdir)/m4/ltoptions.m4 \ $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/m4/pkg.m4 \ $(top_srcdir)/configure.in am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = LIBRARIES = $(noinst_LIBRARIES) ARFLAGS = cru libtests_a_AR = $(AR) $(ARFLAGS) am__DEPENDENCIES_1 = am_libtests_a_OBJECTS = c-strcasecmp.$(OBJEXT) c-strncasecmp.$(OBJEXT) libtests_a_OBJECTS = $(am_libtests_a_OBJECTS) PROGRAMS = $(noinst_PROGRAMS) test_alignof_SOURCES = test-alignof.c test_alignof_OBJECTS = test-alignof.$(OBJEXT) test_alignof_LDADD = $(LDADD) test_alignof_DEPENDENCIES = libtests.a ../../libmissing/libmissing.la \ libtests.a $(am__DEPENDENCIES_1) test_alloca_opt_SOURCES = test-alloca-opt.c test_alloca_opt_OBJECTS = test-alloca-opt.$(OBJEXT) test_alloca_opt_LDADD = $(LDADD) test_alloca_opt_DEPENDENCIES = libtests.a \ ../../libmissing/libmissing.la libtests.a \ $(am__DEPENDENCIES_1) test_arpa_inet_SOURCES = test-arpa_inet.c test_arpa_inet_OBJECTS = test-arpa_inet.$(OBJEXT) test_arpa_inet_LDADD = $(LDADD) test_arpa_inet_DEPENDENCIES = libtests.a \ ../../libmissing/libmissing.la libtests.a \ $(am__DEPENDENCIES_1) test_binary_io_SOURCES = test-binary-io.c test_binary_io_OBJECTS = test-binary-io.$(OBJEXT) test_binary_io_LDADD = $(LDADD) test_binary_io_DEPENDENCIES = libtests.a \ ../../libmissing/libmissing.la libtests.a \ $(am__DEPENDENCIES_1) test_btowc_SOURCES = test-btowc.c test_btowc_OBJECTS = test-btowc.$(OBJEXT) test_btowc_LDADD = $(LDADD) test_btowc_DEPENDENCIES = libtests.a ../../libmissing/libmissing.la \ libtests.a $(am__DEPENDENCIES_1) test_c_ctype_SOURCES = test-c-ctype.c test_c_ctype_OBJECTS = test-c-ctype.$(OBJEXT) test_c_ctype_LDADD = $(LDADD) test_c_ctype_DEPENDENCIES = libtests.a ../../libmissing/libmissing.la \ libtests.a $(am__DEPENDENCIES_1) test_c_strcasecmp_SOURCES = test-c-strcasecmp.c test_c_strcasecmp_OBJECTS = test-c-strcasecmp.$(OBJEXT) test_c_strcasecmp_LDADD = $(LDADD) test_c_strcasecmp_DEPENDENCIES = libtests.a \ ../../libmissing/libmissing.la libtests.a \ $(am__DEPENDENCIES_1) test_c_strncasecmp_SOURCES = test-c-strncasecmp.c test_c_strncasecmp_OBJECTS = test-c-strncasecmp.$(OBJEXT) test_c_strncasecmp_LDADD = $(LDADD) test_c_strncasecmp_DEPENDENCIES = libtests.a \ ../../libmissing/libmissing.la libtests.a \ $(am__DEPENDENCIES_1) test_cond_SOURCES = test-cond.c test_cond_OBJECTS = test-cond.$(OBJEXT) am__DEPENDENCIES_2 = libtests.a ../../libmissing/libmissing.la \ libtests.a $(am__DEPENDENCIES_1) test_cond_DEPENDENCIES = $(am__DEPENDENCIES_2) test_dup2_SOURCES = test-dup2.c test_dup2_OBJECTS = test-dup2.$(OBJEXT) test_dup2_LDADD = $(LDADD) test_dup2_DEPENDENCIES = libtests.a ../../libmissing/libmissing.la \ libtests.a $(am__DEPENDENCIES_1) test_errno_SOURCES = test-errno.c test_errno_OBJECTS = test-errno.$(OBJEXT) test_errno_LDADD = $(LDADD) test_errno_DEPENDENCIES = libtests.a ../../libmissing/libmissing.la \ libtests.a $(am__DEPENDENCIES_1) test_fcntl_h_SOURCES = test-fcntl-h.c test_fcntl_h_OBJECTS = test-fcntl-h.$(OBJEXT) test_fcntl_h_LDADD = $(LDADD) test_fcntl_h_DEPENDENCIES = libtests.a ../../libmissing/libmissing.la \ libtests.a $(am__DEPENDENCIES_1) test_fopen_SOURCES = test-fopen.c test_fopen_OBJECTS = test-fopen.$(OBJEXT) test_fopen_LDADD = $(LDADD) test_fopen_DEPENDENCIES = libtests.a ../../libmissing/libmissing.la \ libtests.a $(am__DEPENDENCIES_1) am_test_frexp_nolibm_OBJECTS = test-frexp.$(OBJEXT) test_frexp_nolibm_OBJECTS = $(am_test_frexp_nolibm_OBJECTS) test_frexp_nolibm_LDADD = $(LDADD) test_frexp_nolibm_DEPENDENCIES = libtests.a \ ../../libmissing/libmissing.la libtests.a \ $(am__DEPENDENCIES_1) am_test_frexpl_nolibm_OBJECTS = test-frexpl.$(OBJEXT) test_frexpl_nolibm_OBJECTS = $(am_test_frexpl_nolibm_OBJECTS) test_frexpl_nolibm_LDADD = $(LDADD) test_frexpl_nolibm_DEPENDENCIES = libtests.a \ ../../libmissing/libmissing.la libtests.a \ $(am__DEPENDENCIES_1) test_fseeko_SOURCES = test-fseeko.c test_fseeko_OBJECTS = test-fseeko.$(OBJEXT) test_fseeko_LDADD = $(LDADD) test_fseeko_DEPENDENCIES = libtests.a ../../libmissing/libmissing.la \ libtests.a $(am__DEPENDENCIES_1) test_getaddrinfo_SOURCES = test-getaddrinfo.c test_getaddrinfo_OBJECTS = test-getaddrinfo.$(OBJEXT) test_getaddrinfo_DEPENDENCIES = $(am__DEPENDENCIES_2) test_getdelim_SOURCES = test-getdelim.c test_getdelim_OBJECTS = test-getdelim.$(OBJEXT) test_getdelim_LDADD = $(LDADD) test_getdelim_DEPENDENCIES = libtests.a ../../libmissing/libmissing.la \ libtests.a $(am__DEPENDENCIES_1) test_gethostname_SOURCES = test-gethostname.c test_gethostname_OBJECTS = test-gethostname.$(OBJEXT) test_gethostname_DEPENDENCIES = $(am__DEPENDENCIES_2) test_getline_SOURCES = test-getline.c test_getline_OBJECTS = test-getline.$(OBJEXT) test_getline_LDADD = $(LDADD) test_getline_DEPENDENCIES = libtests.a ../../libmissing/libmissing.la \ libtests.a $(am__DEPENDENCIES_1) test_gettimeofday_SOURCES = test-gettimeofday.c test_gettimeofday_OBJECTS = test-gettimeofday.$(OBJEXT) test_gettimeofday_LDADD = $(LDADD) test_gettimeofday_DEPENDENCIES = libtests.a \ ../../libmissing/libmissing.la libtests.a \ $(am__DEPENDENCIES_1) test_inet_ntop_SOURCES = test-inet_ntop.c test_inet_ntop_OBJECTS = test-inet_ntop.$(OBJEXT) test_inet_ntop_DEPENDENCIES = $(am__DEPENDENCIES_2) test_inet_pton_SOURCES = test-inet_pton.c test_inet_pton_OBJECTS = test-inet_pton.$(OBJEXT) test_inet_pton_DEPENDENCIES = $(am__DEPENDENCIES_2) test_isnand_nolibm_SOURCES = test-isnand-nolibm.c test_isnand_nolibm_OBJECTS = test-isnand-nolibm.$(OBJEXT) test_isnand_nolibm_LDADD = $(LDADD) test_isnand_nolibm_DEPENDENCIES = libtests.a \ ../../libmissing/libmissing.la libtests.a \ $(am__DEPENDENCIES_1) test_isnanf_nolibm_SOURCES = test-isnanf-nolibm.c test_isnanf_nolibm_OBJECTS = test-isnanf-nolibm.$(OBJEXT) test_isnanf_nolibm_LDADD = $(LDADD) test_isnanf_nolibm_DEPENDENCIES = libtests.a \ ../../libmissing/libmissing.la libtests.a \ $(am__DEPENDENCIES_1) test_isnanl_nolibm_SOURCES = test-isnanl-nolibm.c test_isnanl_nolibm_OBJECTS = test-isnanl-nolibm.$(OBJEXT) test_isnanl_nolibm_LDADD = $(LDADD) test_isnanl_nolibm_DEPENDENCIES = libtests.a \ ../../libmissing/libmissing.la libtests.a \ $(am__DEPENDENCIES_1) test_langinfo_SOURCES = test-langinfo.c test_langinfo_OBJECTS = test-langinfo.$(OBJEXT) test_langinfo_LDADD = $(LDADD) test_langinfo_DEPENDENCIES = libtests.a ../../libmissing/libmissing.la \ libtests.a $(am__DEPENDENCIES_1) test_lock_SOURCES = test-lock.c test_lock_OBJECTS = test-lock.$(OBJEXT) test_lock_DEPENDENCIES = $(am__DEPENDENCIES_2) test_lseek_SOURCES = test-lseek.c test_lseek_OBJECTS = test-lseek.$(OBJEXT) test_lseek_LDADD = $(LDADD) test_lseek_DEPENDENCIES = libtests.a ../../libmissing/libmissing.la \ libtests.a $(am__DEPENDENCIES_1) test_lstat_SOURCES = test-lstat.c test_lstat_OBJECTS = test-lstat.$(OBJEXT) test_lstat_LDADD = $(LDADD) test_lstat_DEPENDENCIES = libtests.a ../../libmissing/libmissing.la \ libtests.a $(am__DEPENDENCIES_1) test_math_SOURCES = test-math.c test_math_OBJECTS = test-math.$(OBJEXT) test_math_LDADD = $(LDADD) test_math_DEPENDENCIES = libtests.a ../../libmissing/libmissing.la \ libtests.a $(am__DEPENDENCIES_1) test_mbrtowc_SOURCES = test-mbrtowc.c test_mbrtowc_OBJECTS = test-mbrtowc.$(OBJEXT) test_mbrtowc_LDADD = $(LDADD) test_mbrtowc_DEPENDENCIES = libtests.a ../../libmissing/libmissing.la \ libtests.a $(am__DEPENDENCIES_1) test_mbsinit_SOURCES = test-mbsinit.c test_mbsinit_OBJECTS = test-mbsinit.$(OBJEXT) test_mbsinit_LDADD = $(LDADD) test_mbsinit_DEPENDENCIES = libtests.a ../../libmissing/libmissing.la \ libtests.a $(am__DEPENDENCIES_1) test_memchr_SOURCES = test-memchr.c test_memchr_OBJECTS = test-memchr.$(OBJEXT) test_memchr_LDADD = $(LDADD) test_memchr_DEPENDENCIES = libtests.a ../../libmissing/libmissing.la \ libtests.a $(am__DEPENDENCIES_1) test_memmem_SOURCES = test-memmem.c test_memmem_OBJECTS = test-memmem.$(OBJEXT) test_memmem_LDADD = $(LDADD) test_memmem_DEPENDENCIES = libtests.a ../../libmissing/libmissing.la \ libtests.a $(am__DEPENDENCIES_1) test_netdb_SOURCES = test-netdb.c test_netdb_OBJECTS = test-netdb.$(OBJEXT) test_netdb_LDADD = $(LDADD) test_netdb_DEPENDENCIES = libtests.a ../../libmissing/libmissing.la \ libtests.a $(am__DEPENDENCIES_1) test_netinet_in_SOURCES = test-netinet_in.c test_netinet_in_OBJECTS = test-netinet_in.$(OBJEXT) test_netinet_in_LDADD = $(LDADD) test_netinet_in_DEPENDENCIES = libtests.a \ ../../libmissing/libmissing.la libtests.a \ $(am__DEPENDENCIES_1) test_nl_langinfo_SOURCES = test-nl_langinfo.c test_nl_langinfo_OBJECTS = test-nl_langinfo.$(OBJEXT) test_nl_langinfo_LDADD = $(LDADD) test_nl_langinfo_DEPENDENCIES = libtests.a \ ../../libmissing/libmissing.la libtests.a \ $(am__DEPENDENCIES_1) test_open_SOURCES = test-open.c test_open_OBJECTS = test-open.$(OBJEXT) test_open_LDADD = $(LDADD) test_open_DEPENDENCIES = libtests.a ../../libmissing/libmissing.la \ libtests.a $(am__DEPENDENCIES_1) test_perror_SOURCES = test-perror.c test_perror_OBJECTS = test-perror.$(OBJEXT) test_perror_LDADD = $(LDADD) test_perror_DEPENDENCIES = libtests.a ../../libmissing/libmissing.la \ libtests.a $(am__DEPENDENCIES_1) test_poll_SOURCES = test-poll.c test_poll_OBJECTS = test-poll.$(OBJEXT) test_poll_DEPENDENCIES = $(am__DEPENDENCIES_2) $(am__DEPENDENCIES_1) test_printf_frexp_SOURCES = test-printf-frexp.c test_printf_frexp_OBJECTS = test-printf-frexp.$(OBJEXT) test_printf_frexp_LDADD = $(LDADD) test_printf_frexp_DEPENDENCIES = libtests.a \ ../../libmissing/libmissing.la libtests.a \ $(am__DEPENDENCIES_1) test_printf_frexpl_SOURCES = test-printf-frexpl.c test_printf_frexpl_OBJECTS = test-printf-frexpl.$(OBJEXT) test_printf_frexpl_LDADD = $(LDADD) test_printf_frexpl_DEPENDENCIES = libtests.a \ ../../libmissing/libmissing.la libtests.a \ $(am__DEPENDENCIES_1) test_select_SOURCES = test-select.c test_select_OBJECTS = test-select.$(OBJEXT) test_select_DEPENDENCIES = $(am__DEPENDENCIES_2) $(am__DEPENDENCIES_1) test_select_fd_SOURCES = test-select-fd.c test_select_fd_OBJECTS = test-select-fd.$(OBJEXT) test_select_fd_DEPENDENCIES = $(am__DEPENDENCIES_2) test_select_stdin_SOURCES = test-select-stdin.c test_select_stdin_OBJECTS = test-select-stdin.$(OBJEXT) test_select_stdin_DEPENDENCIES = $(am__DEPENDENCIES_2) test_signal_SOURCES = test-signal.c test_signal_OBJECTS = test-signal.$(OBJEXT) test_signal_LDADD = $(LDADD) test_signal_DEPENDENCIES = libtests.a ../../libmissing/libmissing.la \ libtests.a $(am__DEPENDENCIES_1) test_signbit_SOURCES = test-signbit.c test_signbit_OBJECTS = test-signbit.$(OBJEXT) test_signbit_LDADD = $(LDADD) test_signbit_DEPENDENCIES = libtests.a ../../libmissing/libmissing.la \ libtests.a $(am__DEPENDENCIES_1) test_sleep_SOURCES = test-sleep.c test_sleep_OBJECTS = test-sleep.$(OBJEXT) test_sleep_LDADD = $(LDADD) test_sleep_DEPENDENCIES = libtests.a ../../libmissing/libmissing.la \ libtests.a $(am__DEPENDENCIES_1) test_snprintf_SOURCES = test-snprintf.c test_snprintf_OBJECTS = test-snprintf.$(OBJEXT) test_snprintf_LDADD = $(LDADD) test_snprintf_DEPENDENCIES = libtests.a ../../libmissing/libmissing.la \ libtests.a $(am__DEPENDENCIES_1) test_snprintf_posix_SOURCES = test-snprintf-posix.c test_snprintf_posix_OBJECTS = test-snprintf-posix.$(OBJEXT) test_snprintf_posix_LDADD = $(LDADD) test_snprintf_posix_DEPENDENCIES = libtests.a \ ../../libmissing/libmissing.la libtests.a \ $(am__DEPENDENCIES_1) test_sockets_SOURCES = test-sockets.c test_sockets_OBJECTS = test-sockets.$(OBJEXT) test_sockets_DEPENDENCIES = $(am__DEPENDENCIES_2) test_stat_SOURCES = test-stat.c test_stat_OBJECTS = test-stat.$(OBJEXT) test_stat_LDADD = $(LDADD) test_stat_DEPENDENCIES = libtests.a ../../libmissing/libmissing.la \ libtests.a $(am__DEPENDENCIES_1) test_stdbool_SOURCES = test-stdbool.c test_stdbool_OBJECTS = test-stdbool.$(OBJEXT) test_stdbool_LDADD = $(LDADD) test_stdbool_DEPENDENCIES = libtests.a ../../libmissing/libmissing.la \ libtests.a $(am__DEPENDENCIES_1) test_stddef_SOURCES = test-stddef.c test_stddef_OBJECTS = test-stddef.$(OBJEXT) test_stddef_LDADD = $(LDADD) test_stddef_DEPENDENCIES = libtests.a ../../libmissing/libmissing.la \ libtests.a $(am__DEPENDENCIES_1) test_stdint_SOURCES = test-stdint.c test_stdint_OBJECTS = test-stdint.$(OBJEXT) test_stdint_LDADD = $(LDADD) test_stdint_DEPENDENCIES = libtests.a ../../libmissing/libmissing.la \ libtests.a $(am__DEPENDENCIES_1) test_stdio_SOURCES = test-stdio.c test_stdio_OBJECTS = test-stdio.$(OBJEXT) test_stdio_LDADD = $(LDADD) test_stdio_DEPENDENCIES = libtests.a ../../libmissing/libmissing.la \ libtests.a $(am__DEPENDENCIES_1) test_stdlib_SOURCES = test-stdlib.c test_stdlib_OBJECTS = test-stdlib.$(OBJEXT) test_stdlib_LDADD = $(LDADD) test_stdlib_DEPENDENCIES = libtests.a ../../libmissing/libmissing.la \ libtests.a $(am__DEPENDENCIES_1) test_strcasestr_SOURCES = test-strcasestr.c test_strcasestr_OBJECTS = test-strcasestr.$(OBJEXT) test_strcasestr_LDADD = $(LDADD) test_strcasestr_DEPENDENCIES = libtests.a \ ../../libmissing/libmissing.la libtests.a \ $(am__DEPENDENCIES_1) test_strerror_SOURCES = test-strerror.c test_strerror_OBJECTS = test-strerror.$(OBJEXT) test_strerror_LDADD = $(LDADD) test_strerror_DEPENDENCIES = libtests.a ../../libmissing/libmissing.la \ libtests.a $(am__DEPENDENCIES_1) test_string_SOURCES = test-string.c test_string_OBJECTS = test-string.$(OBJEXT) test_string_LDADD = $(LDADD) test_string_DEPENDENCIES = libtests.a ../../libmissing/libmissing.la \ libtests.a $(am__DEPENDENCIES_1) test_strings_SOURCES = test-strings.c test_strings_OBJECTS = test-strings.$(OBJEXT) test_strings_LDADD = $(LDADD) test_strings_DEPENDENCIES = libtests.a ../../libmissing/libmissing.la \ libtests.a $(am__DEPENDENCIES_1) test_symlink_SOURCES = test-symlink.c test_symlink_OBJECTS = test-symlink.$(OBJEXT) test_symlink_LDADD = $(LDADD) test_symlink_DEPENDENCIES = libtests.a ../../libmissing/libmissing.la \ libtests.a $(am__DEPENDENCIES_1) test_sys_ioctl_SOURCES = test-sys_ioctl.c test_sys_ioctl_OBJECTS = test-sys_ioctl.$(OBJEXT) test_sys_ioctl_LDADD = $(LDADD) test_sys_ioctl_DEPENDENCIES = libtests.a \ ../../libmissing/libmissing.la libtests.a \ $(am__DEPENDENCIES_1) test_sys_select_SOURCES = test-sys_select.c test_sys_select_OBJECTS = test-sys_select.$(OBJEXT) test_sys_select_LDADD = $(LDADD) test_sys_select_DEPENDENCIES = libtests.a \ ../../libmissing/libmissing.la libtests.a \ $(am__DEPENDENCIES_1) test_sys_socket_SOURCES = test-sys_socket.c test_sys_socket_OBJECTS = test-sys_socket.$(OBJEXT) test_sys_socket_LDADD = $(LDADD) test_sys_socket_DEPENDENCIES = libtests.a \ ../../libmissing/libmissing.la libtests.a \ $(am__DEPENDENCIES_1) test_sys_stat_SOURCES = test-sys_stat.c test_sys_stat_OBJECTS = test-sys_stat.$(OBJEXT) test_sys_stat_LDADD = $(LDADD) test_sys_stat_DEPENDENCIES = libtests.a ../../libmissing/libmissing.la \ libtests.a $(am__DEPENDENCIES_1) test_sys_time_SOURCES = test-sys_time.c test_sys_time_OBJECTS = test-sys_time.$(OBJEXT) test_sys_time_LDADD = $(LDADD) test_sys_time_DEPENDENCIES = libtests.a ../../libmissing/libmissing.la \ libtests.a $(am__DEPENDENCIES_1) test_sys_utsname_SOURCES = test-sys_utsname.c test_sys_utsname_OBJECTS = test-sys_utsname.$(OBJEXT) test_sys_utsname_LDADD = $(LDADD) test_sys_utsname_DEPENDENCIES = libtests.a \ ../../libmissing/libmissing.la libtests.a \ $(am__DEPENDENCIES_1) test_time_SOURCES = test-time.c test_time_OBJECTS = test-time.$(OBJEXT) test_time_LDADD = $(LDADD) test_time_DEPENDENCIES = libtests.a ../../libmissing/libmissing.la \ libtests.a $(am__DEPENDENCIES_1) test_tls_SOURCES = test-tls.c test_tls_OBJECTS = test-tls.$(OBJEXT) test_tls_DEPENDENCIES = $(am__DEPENDENCIES_2) test_uname_SOURCES = test-uname.c test_uname_OBJECTS = test-uname.$(OBJEXT) test_uname_DEPENDENCIES = $(am__DEPENDENCIES_2) test_unistd_SOURCES = test-unistd.c test_unistd_OBJECTS = test-unistd.$(OBJEXT) test_unistd_LDADD = $(LDADD) test_unistd_DEPENDENCIES = libtests.a ../../libmissing/libmissing.la \ libtests.a $(am__DEPENDENCIES_1) test_vasnprintf_SOURCES = test-vasnprintf.c test_vasnprintf_OBJECTS = test-vasnprintf.$(OBJEXT) test_vasnprintf_LDADD = $(LDADD) test_vasnprintf_DEPENDENCIES = libtests.a \ ../../libmissing/libmissing.la libtests.a \ $(am__DEPENDENCIES_1) test_vsnprintf_SOURCES = test-vsnprintf.c test_vsnprintf_OBJECTS = test-vsnprintf.$(OBJEXT) test_vsnprintf_LDADD = $(LDADD) test_vsnprintf_DEPENDENCIES = libtests.a \ ../../libmissing/libmissing.la libtests.a \ $(am__DEPENDENCIES_1) test_vsnprintf_posix_SOURCES = test-vsnprintf-posix.c test_vsnprintf_posix_OBJECTS = test-vsnprintf-posix.$(OBJEXT) test_vsnprintf_posix_LDADD = $(LDADD) test_vsnprintf_posix_DEPENDENCIES = libtests.a \ ../../libmissing/libmissing.la libtests.a \ $(am__DEPENDENCIES_1) test_wchar_SOURCES = test-wchar.c test_wchar_OBJECTS = test-wchar.$(OBJEXT) test_wchar_LDADD = $(LDADD) test_wchar_DEPENDENCIES = libtests.a ../../libmissing/libmissing.la \ libtests.a $(am__DEPENDENCIES_1) test_wcrtomb_SOURCES = test-wcrtomb.c test_wcrtomb_OBJECTS = test-wcrtomb.$(OBJEXT) test_wcrtomb_LDADD = $(LDADD) test_wcrtomb_DEPENDENCIES = libtests.a ../../libmissing/libmissing.la \ libtests.a $(am__DEPENDENCIES_1) test_wctype_SOURCES = test-wctype.c test_wctype_OBJECTS = test-wctype.$(OBJEXT) test_wctype_LDADD = $(LDADD) test_wctype_DEPENDENCIES = libtests.a ../../libmissing/libmissing.la \ libtests.a $(am__DEPENDENCIES_1) DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) CCLD = $(CC) LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ $(LDFLAGS) -o $@ SOURCES = $(libtests_a_SOURCES) $(EXTRA_libtests_a_SOURCES) \ test-alignof.c test-alloca-opt.c test-arpa_inet.c \ test-binary-io.c test-btowc.c test-c-ctype.c \ test-c-strcasecmp.c test-c-strncasecmp.c test-cond.c \ test-dup2.c test-errno.c test-fcntl-h.c test-fopen.c \ $(test_frexp_nolibm_SOURCES) $(test_frexpl_nolibm_SOURCES) \ test-fseeko.c test-getaddrinfo.c test-getdelim.c \ test-gethostname.c test-getline.c test-gettimeofday.c \ test-inet_ntop.c test-inet_pton.c test-isnand-nolibm.c \ test-isnanf-nolibm.c test-isnanl-nolibm.c test-langinfo.c \ test-lock.c test-lseek.c test-lstat.c test-math.c \ test-mbrtowc.c test-mbsinit.c test-memchr.c test-memmem.c \ test-netdb.c test-netinet_in.c test-nl_langinfo.c test-open.c \ test-perror.c test-poll.c test-printf-frexp.c \ test-printf-frexpl.c test-select.c test-select-fd.c \ test-select-stdin.c test-signal.c test-signbit.c test-sleep.c \ test-snprintf.c test-snprintf-posix.c test-sockets.c \ test-stat.c test-stdbool.c test-stddef.c test-stdint.c \ test-stdio.c test-stdlib.c test-strcasestr.c test-strerror.c \ test-string.c test-strings.c test-symlink.c test-sys_ioctl.c \ test-sys_select.c test-sys_socket.c test-sys_stat.c \ test-sys_time.c test-sys_utsname.c test-time.c test-tls.c \ test-uname.c test-unistd.c test-vasnprintf.c test-vsnprintf.c \ test-vsnprintf-posix.c test-wchar.c test-wcrtomb.c \ test-wctype.c DIST_SOURCES = $(libtests_a_SOURCES) $(EXTRA_libtests_a_SOURCES) \ test-alignof.c test-alloca-opt.c test-arpa_inet.c \ test-binary-io.c test-btowc.c test-c-ctype.c \ test-c-strcasecmp.c test-c-strncasecmp.c test-cond.c \ test-dup2.c test-errno.c test-fcntl-h.c test-fopen.c \ $(test_frexp_nolibm_SOURCES) $(test_frexpl_nolibm_SOURCES) \ test-fseeko.c test-getaddrinfo.c test-getdelim.c \ test-gethostname.c test-getline.c test-gettimeofday.c \ test-inet_ntop.c test-inet_pton.c test-isnand-nolibm.c \ test-isnanf-nolibm.c test-isnanl-nolibm.c test-langinfo.c \ test-lock.c test-lseek.c test-lstat.c test-math.c \ test-mbrtowc.c test-mbsinit.c test-memchr.c test-memmem.c \ test-netdb.c test-netinet_in.c test-nl_langinfo.c test-open.c \ test-perror.c test-poll.c test-printf-frexp.c \ test-printf-frexpl.c test-select.c test-select-fd.c \ test-select-stdin.c test-signal.c test-signbit.c test-sleep.c \ test-snprintf.c test-snprintf-posix.c test-sockets.c \ test-stat.c test-stdbool.c test-stddef.c test-stdint.c \ test-stdio.c test-stdlib.c test-strcasestr.c test-strerror.c \ test-string.c test-strings.c test-symlink.c test-sys_ioctl.c \ test-sys_select.c test-sys_socket.c test-sys_stat.c \ test-sys_time.c test-sys_utsname.c test-time.c test-tls.c \ test-uname.c test-unistd.c test-vasnprintf.c test-vsnprintf.c \ test-vsnprintf-posix.c test-wchar.c test-wcrtomb.c \ test-wctype.c RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \ html-recursive info-recursive install-data-recursive \ install-dvi-recursive install-exec-recursive \ install-html-recursive install-info-recursive \ install-pdf-recursive install-ps-recursive install-recursive \ installcheck-recursive installdirs-recursive pdf-recursive \ ps-recursive uninstall-recursive HEADERS = $(noinst_HEADERS) RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ distclean-recursive maintainer-clean-recursive AM_RECURSIVE_TARGETS = $(RECURSIVE_TARGETS:-recursive=) \ $(RECURSIVE_CLEAN_TARGETS:-recursive=) tags TAGS ctags CTAGS \ distdir ETAGS = etags CTAGS = ctags am__tty_colors = \ red=; grn=; lgn=; blu=; std= DIST_SUBDIRS = $(SUBDIRS) DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) am__relativize = \ dir0=`pwd`; \ sed_first='s,^\([^/]*\)/.*$$,\1,'; \ sed_rest='s,^[^/]*/*,,'; \ sed_last='s,^.*/\([^/]*\)$$,\1,'; \ sed_butlast='s,/*[^/]*$$,,'; \ while test -n "$$dir1"; do \ first=`echo "$$dir1" | sed -e "$$sed_first"`; \ if test "$$first" != "."; then \ if test "$$first" = ".."; then \ dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \ dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \ else \ first2=`echo "$$dir2" | sed -e "$$sed_first"`; \ if test "$$first2" = "$$first"; then \ dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \ else \ dir2="../$$dir2"; \ fi; \ dir0="$$dir0"/"$$first"; \ fi; \ fi; \ dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \ done; \ reldir="$$dir2" ACLOCAL = @ACLOCAL@ ALLOCA = @ALLOCA@ ALLOCA_H = @ALLOCA_H@ AMTAR = @AMTAR@ APPLE_UNIVERSAL_BUILD = @APPLE_UNIVERSAL_BUILD@ AR = @AR@ ARGZ_H = @ARGZ_H@ AS = @AS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ BINDINGS_CC = @BINDINGS_CC@ BINDIR = @BINDIR@ BITSIZEOF_PTRDIFF_T = @BITSIZEOF_PTRDIFF_T@ BITSIZEOF_SIG_ATOMIC_T = @BITSIZEOF_SIG_ATOMIC_T@ BITSIZEOF_SIZE_T = @BITSIZEOF_SIZE_T@ BITSIZEOF_WCHAR_T = @BITSIZEOF_WCHAR_T@ BITSIZEOF_WINT_T = @BITSIZEOF_WINT_T@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CC_FOR_BUILD = @CC_FOR_BUILD@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EMULTIHOP_HIDDEN = @EMULTIHOP_HIDDEN@ EMULTIHOP_VALUE = @EMULTIHOP_VALUE@ ENOLINK_HIDDEN = @ENOLINK_HIDDEN@ ENOLINK_VALUE = @ENOLINK_VALUE@ EOVERFLOW_HIDDEN = @EOVERFLOW_HIDDEN@ EOVERFLOW_VALUE = @EOVERFLOW_VALUE@ ERRNO_H = @ERRNO_H@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ FLOAT_H = @FLOAT_H@ GETADDRINFO_LIB = @GETADDRINFO_LIB@ GETHOSTNAME_LIB = @GETHOSTNAME_LIB@ GLIBC21 = @GLIBC21@ GNULIB_ACCEPT = @GNULIB_ACCEPT@ GNULIB_ACCEPT4 = @GNULIB_ACCEPT4@ GNULIB_ACOSL = @GNULIB_ACOSL@ GNULIB_ASINL = @GNULIB_ASINL@ GNULIB_ATANL = @GNULIB_ATANL@ GNULIB_ATOLL = @GNULIB_ATOLL@ GNULIB_BIND = @GNULIB_BIND@ GNULIB_BTOWC = @GNULIB_BTOWC@ GNULIB_CALLOC_POSIX = @GNULIB_CALLOC_POSIX@ GNULIB_CANONICALIZE_FILE_NAME = @GNULIB_CANONICALIZE_FILE_NAME@ GNULIB_CEILF = @GNULIB_CEILF@ GNULIB_CEILL = @GNULIB_CEILL@ GNULIB_CHOWN = @GNULIB_CHOWN@ GNULIB_CLOSE = @GNULIB_CLOSE@ GNULIB_CONNECT = @GNULIB_CONNECT@ GNULIB_COSL = @GNULIB_COSL@ GNULIB_DPRINTF = @GNULIB_DPRINTF@ GNULIB_DUP2 = @GNULIB_DUP2@ GNULIB_DUP3 = @GNULIB_DUP3@ GNULIB_ENVIRON = @GNULIB_ENVIRON@ GNULIB_EUIDACCESS = @GNULIB_EUIDACCESS@ GNULIB_EXPL = @GNULIB_EXPL@ GNULIB_FACCESSAT = @GNULIB_FACCESSAT@ GNULIB_FCHDIR = @GNULIB_FCHDIR@ GNULIB_FCHMODAT = @GNULIB_FCHMODAT@ GNULIB_FCHOWNAT = @GNULIB_FCHOWNAT@ GNULIB_FCLOSE = @GNULIB_FCLOSE@ GNULIB_FCNTL = @GNULIB_FCNTL@ GNULIB_FFLUSH = @GNULIB_FFLUSH@ GNULIB_FLOORF = @GNULIB_FLOORF@ GNULIB_FLOORL = @GNULIB_FLOORL@ GNULIB_FOPEN = @GNULIB_FOPEN@ GNULIB_FPRINTF = @GNULIB_FPRINTF@ GNULIB_FPRINTF_POSIX = @GNULIB_FPRINTF_POSIX@ GNULIB_FPURGE = @GNULIB_FPURGE@ GNULIB_FPUTC = @GNULIB_FPUTC@ GNULIB_FPUTS = @GNULIB_FPUTS@ GNULIB_FREOPEN = @GNULIB_FREOPEN@ GNULIB_FREXP = @GNULIB_FREXP@ GNULIB_FREXPL = @GNULIB_FREXPL@ GNULIB_FSEEK = @GNULIB_FSEEK@ GNULIB_FSEEKO = @GNULIB_FSEEKO@ GNULIB_FSTATAT = @GNULIB_FSTATAT@ GNULIB_FSYNC = @GNULIB_FSYNC@ GNULIB_FTELL = @GNULIB_FTELL@ GNULIB_FTELLO = @GNULIB_FTELLO@ GNULIB_FTRUNCATE = @GNULIB_FTRUNCATE@ GNULIB_FUTIMENS = @GNULIB_FUTIMENS@ GNULIB_FWRITE = @GNULIB_FWRITE@ GNULIB_GETADDRINFO = @GNULIB_GETADDRINFO@ GNULIB_GETCWD = @GNULIB_GETCWD@ GNULIB_GETDELIM = @GNULIB_GETDELIM@ GNULIB_GETDOMAINNAME = @GNULIB_GETDOMAINNAME@ GNULIB_GETDTABLESIZE = @GNULIB_GETDTABLESIZE@ GNULIB_GETGROUPS = @GNULIB_GETGROUPS@ GNULIB_GETHOSTNAME = @GNULIB_GETHOSTNAME@ GNULIB_GETLINE = @GNULIB_GETLINE@ GNULIB_GETLOADAVG = @GNULIB_GETLOADAVG@ GNULIB_GETLOGIN = @GNULIB_GETLOGIN@ GNULIB_GETLOGIN_R = @GNULIB_GETLOGIN_R@ GNULIB_GETPAGESIZE = @GNULIB_GETPAGESIZE@ GNULIB_GETPEERNAME = @GNULIB_GETPEERNAME@ GNULIB_GETSOCKNAME = @GNULIB_GETSOCKNAME@ GNULIB_GETSOCKOPT = @GNULIB_GETSOCKOPT@ GNULIB_GETSUBOPT = @GNULIB_GETSUBOPT@ GNULIB_GETTIMEOFDAY = @GNULIB_GETTIMEOFDAY@ GNULIB_GETUSERSHELL = @GNULIB_GETUSERSHELL@ GNULIB_INET_NTOP = @GNULIB_INET_NTOP@ GNULIB_INET_PTON = @GNULIB_INET_PTON@ GNULIB_IOCTL = @GNULIB_IOCTL@ GNULIB_ISFINITE = @GNULIB_ISFINITE@ GNULIB_ISINF = @GNULIB_ISINF@ GNULIB_ISNAN = @GNULIB_ISNAN@ GNULIB_ISNAND = @GNULIB_ISNAND@ GNULIB_ISNANF = @GNULIB_ISNANF@ GNULIB_ISNANL = @GNULIB_ISNANL@ GNULIB_LCHMOD = @GNULIB_LCHMOD@ GNULIB_LCHOWN = @GNULIB_LCHOWN@ GNULIB_LDEXPL = @GNULIB_LDEXPL@ GNULIB_LINK = @GNULIB_LINK@ GNULIB_LINKAT = @GNULIB_LINKAT@ GNULIB_LISTEN = @GNULIB_LISTEN@ GNULIB_LOGL = @GNULIB_LOGL@ GNULIB_LSEEK = @GNULIB_LSEEK@ GNULIB_LSTAT = @GNULIB_LSTAT@ GNULIB_MALLOC_POSIX = @GNULIB_MALLOC_POSIX@ GNULIB_MBRLEN = @GNULIB_MBRLEN@ GNULIB_MBRTOWC = @GNULIB_MBRTOWC@ GNULIB_MBSCASECMP = @GNULIB_MBSCASECMP@ GNULIB_MBSCASESTR = @GNULIB_MBSCASESTR@ GNULIB_MBSCHR = @GNULIB_MBSCHR@ GNULIB_MBSCSPN = @GNULIB_MBSCSPN@ GNULIB_MBSINIT = @GNULIB_MBSINIT@ GNULIB_MBSLEN = @GNULIB_MBSLEN@ GNULIB_MBSNCASECMP = @GNULIB_MBSNCASECMP@ GNULIB_MBSNLEN = @GNULIB_MBSNLEN@ GNULIB_MBSNRTOWCS = @GNULIB_MBSNRTOWCS@ GNULIB_MBSPBRK = @GNULIB_MBSPBRK@ GNULIB_MBSPCASECMP = @GNULIB_MBSPCASECMP@ GNULIB_MBSRCHR = @GNULIB_MBSRCHR@ GNULIB_MBSRTOWCS = @GNULIB_MBSRTOWCS@ GNULIB_MBSSEP = @GNULIB_MBSSEP@ GNULIB_MBSSPN = @GNULIB_MBSSPN@ GNULIB_MBSSTR = @GNULIB_MBSSTR@ GNULIB_MBSTOK_R = @GNULIB_MBSTOK_R@ GNULIB_MEMCHR = @GNULIB_MEMCHR@ GNULIB_MEMMEM = @GNULIB_MEMMEM@ GNULIB_MEMPCPY = @GNULIB_MEMPCPY@ GNULIB_MEMRCHR = @GNULIB_MEMRCHR@ GNULIB_MKDIRAT = @GNULIB_MKDIRAT@ GNULIB_MKDTEMP = @GNULIB_MKDTEMP@ GNULIB_MKFIFO = @GNULIB_MKFIFO@ GNULIB_MKFIFOAT = @GNULIB_MKFIFOAT@ GNULIB_MKNOD = @GNULIB_MKNOD@ GNULIB_MKNODAT = @GNULIB_MKNODAT@ GNULIB_MKOSTEMP = @GNULIB_MKOSTEMP@ GNULIB_MKOSTEMPS = @GNULIB_MKOSTEMPS@ GNULIB_MKSTEMP = @GNULIB_MKSTEMP@ GNULIB_MKSTEMPS = @GNULIB_MKSTEMPS@ GNULIB_NL_LANGINFO = @GNULIB_NL_LANGINFO@ GNULIB_OBSTACK_PRINTF = @GNULIB_OBSTACK_PRINTF@ GNULIB_OBSTACK_PRINTF_POSIX = @GNULIB_OBSTACK_PRINTF_POSIX@ GNULIB_OPEN = @GNULIB_OPEN@ GNULIB_OPENAT = @GNULIB_OPENAT@ GNULIB_PERROR = @GNULIB_PERROR@ GNULIB_PIPE2 = @GNULIB_PIPE2@ GNULIB_POPEN = @GNULIB_POPEN@ GNULIB_PREAD = @GNULIB_PREAD@ GNULIB_PRINTF = @GNULIB_PRINTF@ GNULIB_PRINTF_POSIX = @GNULIB_PRINTF_POSIX@ GNULIB_PUTC = @GNULIB_PUTC@ GNULIB_PUTCHAR = @GNULIB_PUTCHAR@ GNULIB_PUTENV = @GNULIB_PUTENV@ GNULIB_PUTS = @GNULIB_PUTS@ GNULIB_RANDOM_R = @GNULIB_RANDOM_R@ GNULIB_RAWMEMCHR = @GNULIB_RAWMEMCHR@ GNULIB_READLINK = @GNULIB_READLINK@ GNULIB_READLINKAT = @GNULIB_READLINKAT@ GNULIB_REALLOC_POSIX = @GNULIB_REALLOC_POSIX@ GNULIB_REALPATH = @GNULIB_REALPATH@ GNULIB_RECV = @GNULIB_RECV@ GNULIB_RECVFROM = @GNULIB_RECVFROM@ GNULIB_REMOVE = @GNULIB_REMOVE@ GNULIB_RENAME = @GNULIB_RENAME@ GNULIB_RENAMEAT = @GNULIB_RENAMEAT@ GNULIB_RMDIR = @GNULIB_RMDIR@ GNULIB_ROUND = @GNULIB_ROUND@ GNULIB_ROUNDF = @GNULIB_ROUNDF@ GNULIB_ROUNDL = @GNULIB_ROUNDL@ GNULIB_RPMATCH = @GNULIB_RPMATCH@ GNULIB_SELECT = @GNULIB_SELECT@ GNULIB_SEND = @GNULIB_SEND@ GNULIB_SENDTO = @GNULIB_SENDTO@ GNULIB_SETENV = @GNULIB_SETENV@ GNULIB_SETSOCKOPT = @GNULIB_SETSOCKOPT@ GNULIB_SHUTDOWN = @GNULIB_SHUTDOWN@ GNULIB_SIGACTION = @GNULIB_SIGACTION@ GNULIB_SIGNAL_H_SIGPIPE = @GNULIB_SIGNAL_H_SIGPIPE@ GNULIB_SIGNBIT = @GNULIB_SIGNBIT@ GNULIB_SIGPROCMASK = @GNULIB_SIGPROCMASK@ GNULIB_SINL = @GNULIB_SINL@ GNULIB_SLEEP = @GNULIB_SLEEP@ GNULIB_SNPRINTF = @GNULIB_SNPRINTF@ GNULIB_SOCKET = @GNULIB_SOCKET@ GNULIB_SPRINTF_POSIX = @GNULIB_SPRINTF_POSIX@ GNULIB_SQRTL = @GNULIB_SQRTL@ GNULIB_STAT = @GNULIB_STAT@ GNULIB_STDIO_H_SIGPIPE = @GNULIB_STDIO_H_SIGPIPE@ GNULIB_STPCPY = @GNULIB_STPCPY@ GNULIB_STPNCPY = @GNULIB_STPNCPY@ GNULIB_STRCASESTR = @GNULIB_STRCASESTR@ GNULIB_STRCHRNUL = @GNULIB_STRCHRNUL@ GNULIB_STRDUP = @GNULIB_STRDUP@ GNULIB_STRERROR = @GNULIB_STRERROR@ GNULIB_STRNDUP = @GNULIB_STRNDUP@ GNULIB_STRNLEN = @GNULIB_STRNLEN@ GNULIB_STRPBRK = @GNULIB_STRPBRK@ GNULIB_STRSEP = @GNULIB_STRSEP@ GNULIB_STRSIGNAL = @GNULIB_STRSIGNAL@ GNULIB_STRSTR = @GNULIB_STRSTR@ GNULIB_STRTOD = @GNULIB_STRTOD@ GNULIB_STRTOK_R = @GNULIB_STRTOK_R@ GNULIB_STRTOLL = @GNULIB_STRTOLL@ GNULIB_STRTOULL = @GNULIB_STRTOULL@ GNULIB_STRVERSCMP = @GNULIB_STRVERSCMP@ GNULIB_SYMLINK = @GNULIB_SYMLINK@ GNULIB_SYMLINKAT = @GNULIB_SYMLINKAT@ GNULIB_TANL = @GNULIB_TANL@ GNULIB_TRUNC = @GNULIB_TRUNC@ GNULIB_TRUNCF = @GNULIB_TRUNCF@ GNULIB_TRUNCL = @GNULIB_TRUNCL@ GNULIB_UNAME = @GNULIB_UNAME@ GNULIB_UNISTD_H_GETOPT = @GNULIB_UNISTD_H_GETOPT@ GNULIB_UNISTD_H_SIGPIPE = @GNULIB_UNISTD_H_SIGPIPE@ GNULIB_UNLINK = @GNULIB_UNLINK@ GNULIB_UNLINKAT = @GNULIB_UNLINKAT@ GNULIB_UNSETENV = @GNULIB_UNSETENV@ GNULIB_USLEEP = @GNULIB_USLEEP@ GNULIB_UTIMENSAT = @GNULIB_UTIMENSAT@ GNULIB_VASPRINTF = @GNULIB_VASPRINTF@ GNULIB_VDPRINTF = @GNULIB_VDPRINTF@ GNULIB_VFPRINTF = @GNULIB_VFPRINTF@ GNULIB_VFPRINTF_POSIX = @GNULIB_VFPRINTF_POSIX@ GNULIB_VPRINTF = @GNULIB_VPRINTF@ GNULIB_VPRINTF_POSIX = @GNULIB_VPRINTF_POSIX@ GNULIB_VSNPRINTF = @GNULIB_VSNPRINTF@ GNULIB_VSPRINTF_POSIX = @GNULIB_VSPRINTF_POSIX@ GNULIB_WCRTOMB = @GNULIB_WCRTOMB@ GNULIB_WCSNRTOMBS = @GNULIB_WCSNRTOMBS@ GNULIB_WCSRTOMBS = @GNULIB_WCSRTOMBS@ GNULIB_WCTOB = @GNULIB_WCTOB@ GNULIB_WCWIDTH = @GNULIB_WCWIDTH@ GNULIB_WRITE = @GNULIB_WRITE@ GREP = @GREP@ GTKDOC_CHECK = @GTKDOC_CHECK@ HAVE_ACCEPT4 = @HAVE_ACCEPT4@ HAVE_ACOSL = @HAVE_ACOSL@ HAVE_ARPA_INET_H = @HAVE_ARPA_INET_H@ HAVE_ASINL = @HAVE_ASINL@ HAVE_ATANL = @HAVE_ATANL@ HAVE_ATOLL = @HAVE_ATOLL@ HAVE_BTOWC = @HAVE_BTOWC@ HAVE_CALLOC_POSIX = @HAVE_CALLOC_POSIX@ HAVE_CANONICALIZE_FILE_NAME = @HAVE_CANONICALIZE_FILE_NAME@ HAVE_CHOWN = @HAVE_CHOWN@ HAVE_COSL = @HAVE_COSL@ HAVE_CXX = @HAVE_CXX@ HAVE_DECL_ACOSL = @HAVE_DECL_ACOSL@ HAVE_DECL_ASINL = @HAVE_DECL_ASINL@ HAVE_DECL_ATANL = @HAVE_DECL_ATANL@ HAVE_DECL_COSL = @HAVE_DECL_COSL@ HAVE_DECL_ENVIRON = @HAVE_DECL_ENVIRON@ HAVE_DECL_EXPL = @HAVE_DECL_EXPL@ HAVE_DECL_FPURGE = @HAVE_DECL_FPURGE@ HAVE_DECL_FREEADDRINFO = @HAVE_DECL_FREEADDRINFO@ HAVE_DECL_FREXPL = @HAVE_DECL_FREXPL@ HAVE_DECL_GAI_STRERROR = @HAVE_DECL_GAI_STRERROR@ HAVE_DECL_GETADDRINFO = @HAVE_DECL_GETADDRINFO@ HAVE_DECL_GETDELIM = @HAVE_DECL_GETDELIM@ HAVE_DECL_GETLINE = @HAVE_DECL_GETLINE@ HAVE_DECL_GETLOADAVG = @HAVE_DECL_GETLOADAVG@ HAVE_DECL_GETLOGIN_R = @HAVE_DECL_GETLOGIN_R@ HAVE_DECL_GETNAMEINFO = @HAVE_DECL_GETNAMEINFO@ HAVE_DECL_INET_NTOP = @HAVE_DECL_INET_NTOP@ HAVE_DECL_INET_PTON = @HAVE_DECL_INET_PTON@ HAVE_DECL_LDEXPL = @HAVE_DECL_LDEXPL@ HAVE_DECL_LOGL = @HAVE_DECL_LOGL@ HAVE_DECL_MEMMEM = @HAVE_DECL_MEMMEM@ HAVE_DECL_MEMRCHR = @HAVE_DECL_MEMRCHR@ HAVE_DECL_OBSTACK_PRINTF = @HAVE_DECL_OBSTACK_PRINTF@ HAVE_DECL_SINL = @HAVE_DECL_SINL@ HAVE_DECL_SNPRINTF = @HAVE_DECL_SNPRINTF@ HAVE_DECL_SQRTL = @HAVE_DECL_SQRTL@ HAVE_DECL_STRDUP = @HAVE_DECL_STRDUP@ HAVE_DECL_STRERROR = @HAVE_DECL_STRERROR@ HAVE_DECL_STRNCASECMP = @HAVE_DECL_STRNCASECMP@ HAVE_DECL_STRNDUP = @HAVE_DECL_STRNDUP@ HAVE_DECL_STRNLEN = @HAVE_DECL_STRNLEN@ HAVE_DECL_STRSIGNAL = @HAVE_DECL_STRSIGNAL@ HAVE_DECL_STRTOK_R = @HAVE_DECL_STRTOK_R@ HAVE_DECL_TANL = @HAVE_DECL_TANL@ HAVE_DECL_TRUNC = @HAVE_DECL_TRUNC@ HAVE_DECL_TRUNCF = @HAVE_DECL_TRUNCF@ HAVE_DECL_VSNPRINTF = @HAVE_DECL_VSNPRINTF@ HAVE_DECL_WCTOB = @HAVE_DECL_WCTOB@ HAVE_DECL_WCWIDTH = @HAVE_DECL_WCWIDTH@ HAVE_DPRINTF = @HAVE_DPRINTF@ HAVE_DUP2 = @HAVE_DUP2@ HAVE_DUP3 = @HAVE_DUP3@ HAVE_EUIDACCESS = @HAVE_EUIDACCESS@ HAVE_EXPL = @HAVE_EXPL@ HAVE_FACCESSAT = @HAVE_FACCESSAT@ HAVE_FCHMODAT = @HAVE_FCHMODAT@ HAVE_FCHOWNAT = @HAVE_FCHOWNAT@ HAVE_FCNTL = @HAVE_FCNTL@ HAVE_FSTATAT = @HAVE_FSTATAT@ HAVE_FSYNC = @HAVE_FSYNC@ HAVE_FTRUNCATE = @HAVE_FTRUNCATE@ HAVE_FUTIMENS = @HAVE_FUTIMENS@ HAVE_GETDOMAINNAME = @HAVE_GETDOMAINNAME@ HAVE_GETDTABLESIZE = @HAVE_GETDTABLESIZE@ HAVE_GETGROUPS = @HAVE_GETGROUPS@ HAVE_GETHOSTNAME = @HAVE_GETHOSTNAME@ HAVE_GETLOGIN = @HAVE_GETLOGIN@ HAVE_GETPAGESIZE = @HAVE_GETPAGESIZE@ HAVE_GETSUBOPT = @HAVE_GETSUBOPT@ HAVE_GETUSERSHELL = @HAVE_GETUSERSHELL@ HAVE_INTTYPES_H = @HAVE_INTTYPES_H@ HAVE_ISNAND = @HAVE_ISNAND@ HAVE_ISNANF = @HAVE_ISNANF@ HAVE_ISNANL = @HAVE_ISNANL@ HAVE_ISWCNTRL = @HAVE_ISWCNTRL@ HAVE_LANGINFO_CODESET = @HAVE_LANGINFO_CODESET@ HAVE_LANGINFO_ERA = @HAVE_LANGINFO_ERA@ HAVE_LANGINFO_H = @HAVE_LANGINFO_H@ HAVE_LCHMOD = @HAVE_LCHMOD@ HAVE_LCHOWN = @HAVE_LCHOWN@ HAVE_LINK = @HAVE_LINK@ HAVE_LINKAT = @HAVE_LINKAT@ HAVE_LOGL = @HAVE_LOGL@ HAVE_LONG_LONG_INT = @HAVE_LONG_LONG_INT@ HAVE_LSTAT = @HAVE_LSTAT@ HAVE_MALLOC_POSIX = @HAVE_MALLOC_POSIX@ HAVE_MBRLEN = @HAVE_MBRLEN@ HAVE_MBRTOWC = @HAVE_MBRTOWC@ HAVE_MBSINIT = @HAVE_MBSINIT@ HAVE_MBSLEN = @HAVE_MBSLEN@ HAVE_MBSNRTOWCS = @HAVE_MBSNRTOWCS@ HAVE_MBSRTOWCS = @HAVE_MBSRTOWCS@ HAVE_MEMPCPY = @HAVE_MEMPCPY@ HAVE_MKDIRAT = @HAVE_MKDIRAT@ HAVE_MKDTEMP = @HAVE_MKDTEMP@ HAVE_MKFIFO = @HAVE_MKFIFO@ HAVE_MKFIFOAT = @HAVE_MKFIFOAT@ HAVE_MKNOD = @HAVE_MKNOD@ HAVE_MKNODAT = @HAVE_MKNODAT@ HAVE_MKOSTEMP = @HAVE_MKOSTEMP@ HAVE_MKOSTEMPS = @HAVE_MKOSTEMPS@ HAVE_MKSTEMPS = @HAVE_MKSTEMPS@ HAVE_NETDB_H = @HAVE_NETDB_H@ HAVE_NETINET_IN_H = @HAVE_NETINET_IN_H@ HAVE_NL_LANGINFO = @HAVE_NL_LANGINFO@ HAVE_OPENAT = @HAVE_OPENAT@ HAVE_OS_H = @HAVE_OS_H@ HAVE_PIPE2 = @HAVE_PIPE2@ HAVE_POSIX_SIGNALBLOCKING = @HAVE_POSIX_SIGNALBLOCKING@ HAVE_PREAD = @HAVE_PREAD@ HAVE_RANDOM_H = @HAVE_RANDOM_H@ HAVE_RANDOM_R = @HAVE_RANDOM_R@ HAVE_RAWMEMCHR = @HAVE_RAWMEMCHR@ HAVE_READLINK = @HAVE_READLINK@ HAVE_READLINKAT = @HAVE_READLINKAT@ HAVE_REALLOC_POSIX = @HAVE_REALLOC_POSIX@ HAVE_REALPATH = @HAVE_REALPATH@ HAVE_RENAMEAT = @HAVE_RENAMEAT@ HAVE_RPMATCH = @HAVE_RPMATCH@ HAVE_SA_FAMILY_T = @HAVE_SA_FAMILY_T@ HAVE_SETENV = @HAVE_SETENV@ HAVE_SIGACTION = @HAVE_SIGACTION@ HAVE_SIGINFO_T = @HAVE_SIGINFO_T@ HAVE_SIGNED_SIG_ATOMIC_T = @HAVE_SIGNED_SIG_ATOMIC_T@ HAVE_SIGNED_WCHAR_T = @HAVE_SIGNED_WCHAR_T@ HAVE_SIGNED_WINT_T = @HAVE_SIGNED_WINT_T@ HAVE_SIGSET_T = @HAVE_SIGSET_T@ HAVE_SINL = @HAVE_SINL@ HAVE_SLEEP = @HAVE_SLEEP@ HAVE_SQRTL = @HAVE_SQRTL@ HAVE_STDINT_H = @HAVE_STDINT_H@ HAVE_STPCPY = @HAVE_STPCPY@ HAVE_STPNCPY = @HAVE_STPNCPY@ HAVE_STRCASECMP = @HAVE_STRCASECMP@ HAVE_STRCASESTR = @HAVE_STRCASESTR@ HAVE_STRCHRNUL = @HAVE_STRCHRNUL@ HAVE_STRPBRK = @HAVE_STRPBRK@ HAVE_STRSEP = @HAVE_STRSEP@ HAVE_STRTOD = @HAVE_STRTOD@ HAVE_STRTOLL = @HAVE_STRTOLL@ HAVE_STRTOULL = @HAVE_STRTOULL@ HAVE_STRUCT_ADDRINFO = @HAVE_STRUCT_ADDRINFO@ HAVE_STRUCT_RANDOM_DATA = @HAVE_STRUCT_RANDOM_DATA@ HAVE_STRUCT_SIGACTION_SA_SIGACTION = @HAVE_STRUCT_SIGACTION_SA_SIGACTION@ HAVE_STRUCT_SOCKADDR_STORAGE = @HAVE_STRUCT_SOCKADDR_STORAGE@ HAVE_STRUCT_TIMEVAL = @HAVE_STRUCT_TIMEVAL@ HAVE_STRUCT_UTSNAME = @HAVE_STRUCT_UTSNAME@ HAVE_STRVERSCMP = @HAVE_STRVERSCMP@ HAVE_SYMLINK = @HAVE_SYMLINK@ HAVE_SYMLINKAT = @HAVE_SYMLINKAT@ HAVE_SYS_BITYPES_H = @HAVE_SYS_BITYPES_H@ HAVE_SYS_INTTYPES_H = @HAVE_SYS_INTTYPES_H@ HAVE_SYS_IOCTL_H = @HAVE_SYS_IOCTL_H@ HAVE_SYS_LOADAVG_H = @HAVE_SYS_LOADAVG_H@ HAVE_SYS_PARAM_H = @HAVE_SYS_PARAM_H@ HAVE_SYS_SELECT_H = @HAVE_SYS_SELECT_H@ HAVE_SYS_SOCKET_H = @HAVE_SYS_SOCKET_H@ HAVE_SYS_TIME_H = @HAVE_SYS_TIME_H@ HAVE_SYS_TYPES_H = @HAVE_SYS_TYPES_H@ HAVE_SYS_UTSNAME_H = @HAVE_SYS_UTSNAME_H@ HAVE_TANL = @HAVE_TANL@ HAVE_TYPE_VOLATILE_SIG_ATOMIC_T = @HAVE_TYPE_VOLATILE_SIG_ATOMIC_T@ HAVE_UNAME = @HAVE_UNAME@ HAVE_UNISTD_H = @HAVE_UNISTD_H@ HAVE_UNLINKAT = @HAVE_UNLINKAT@ HAVE_UNSETENV = @HAVE_UNSETENV@ HAVE_UNSIGNED_LONG_LONG_INT = @HAVE_UNSIGNED_LONG_LONG_INT@ HAVE_USLEEP = @HAVE_USLEEP@ HAVE_UTIMENSAT = @HAVE_UTIMENSAT@ HAVE_VASPRINTF = @HAVE_VASPRINTF@ HAVE_VDPRINTF = @HAVE_VDPRINTF@ HAVE_WCHAR_H = @HAVE_WCHAR_H@ HAVE_WCHAR_T = @HAVE_WCHAR_T@ HAVE_WCRTOMB = @HAVE_WCRTOMB@ HAVE_WCSNRTOMBS = @HAVE_WCSNRTOMBS@ HAVE_WCSRTOMBS = @HAVE_WCSRTOMBS@ HAVE_WCTYPE_H = @HAVE_WCTYPE_H@ HAVE_WINSOCK2_H = @HAVE_WINSOCK2_H@ HAVE_WINT_T = @HAVE_WINT_T@ HAVE_WS2TCPIP_H = @HAVE_WS2TCPIP_H@ HAVE__BOOL = @HAVE__BOOL@ HOSTENT_LIB = @HOSTENT_LIB@ HTML_DIR = @HTML_DIR@ INCLTDL = @INCLTDL@ INCLUDE_NEXT = @INCLUDE_NEXT@ INCLUDE_NEXT_AS_FIRST_DIRECTIVE = @INCLUDE_NEXT_AS_FIRST_DIRECTIVE@ INET_NTOP_LIB = @INET_NTOP_LIB@ INET_PTON_LIB = @INET_PTON_LIB@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LD = @LD@ LDFLAGS = @LDFLAGS@ LEX = @LEX@ LEXLIB = @LEXLIB@ LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@ LIBADD_DL = @LIBADD_DL@ LIBADD_DLD_LINK = @LIBADD_DLD_LINK@ LIBADD_DLOPEN = @LIBADD_DLOPEN@ LIBADD_SHL_LOAD = @LIBADD_SHL_LOAD@ LIBDIR = @LIBDIR@ LIBGCRYPT_CFLAGS = @LIBGCRYPT_CFLAGS@ LIBGCRYPT_CONFIG = @LIBGCRYPT_CONFIG@ LIBGCRYPT_LIBS = @LIBGCRYPT_LIBS@ LIBGNUTLS_CFLAGS = @LIBGNUTLS_CFLAGS@ LIBGNUTLS_CONFIG = @LIBGNUTLS_CONFIG@ LIBGNUTLS_EXTRA_CFLAGS = @LIBGNUTLS_EXTRA_CFLAGS@ LIBGNUTLS_EXTRA_CONFIG = @LIBGNUTLS_EXTRA_CONFIG@ LIBGNUTLS_EXTRA_LIBS = @LIBGNUTLS_EXTRA_LIBS@ LIBGNUTLS_LIBS = @LIBGNUTLS_LIBS@ LIBINTL = @LIBINTL@ LIBLTDL = @LIBLTDL@ LIBMULTITHREAD = @LIBMULTITHREAD@ LIBOBJS = @LIBOBJS@ LIBPRELUDECPP_SONAME = @LIBPRELUDECPP_SONAME@ LIBPRELUDE_CFLAGS = @LIBPRELUDE_CFLAGS@ LIBPRELUDE_LIBS = @LIBPRELUDE_LIBS@ LIBPRELUDE_SONAME = @LIBPRELUDE_SONAME@ LIBPTH = @LIBPTH@ LIBPTH_PREFIX = @LIBPTH_PREFIX@ LIBS = @LIBS@ LIBSOCKET = @LIBSOCKET@ LIBTESTS_LIBDEPS = @LIBTESTS_LIBDEPS@ LIBTHREAD = @LIBTHREAD@ LIBTOOL = @LIBTOOL@ LIPO = @LIPO@ LN_S = @LN_S@ LOCALCHARSET_TESTS_ENVIRONMENT = @LOCALCHARSET_TESTS_ENVIRONMENT@ LOCALE_FR = @LOCALE_FR@ LOCALE_FR_UTF8 = @LOCALE_FR_UTF8@ LOCALE_JA = @LOCALE_JA@ LOCALE_TR_UTF8 = @LOCALE_TR_UTF8@ LOCALE_ZH_CN = @LOCALE_ZH_CN@ LOCALSTATEDIR = @LOCALSTATEDIR@ LTALLOCA = @LTALLOCA@ LTDLDEPS = @LTDLDEPS@ LTDLINCL = @LTDLINCL@ LTDLOPEN = @LTDLOPEN@ LTLIBINTL = @LTLIBINTL@ LTLIBMULTITHREAD = @LTLIBMULTITHREAD@ LTLIBOBJS = @LTLIBOBJS@ LTLIBPTH = @LTLIBPTH@ LTLIBTHREAD = @LTLIBTHREAD@ LT_CONFIG_H = @LT_CONFIG_H@ LT_DLLOADERS = @LT_DLLOADERS@ LT_DLPREOPEN = @LT_DLPREOPEN@ LUA_CFLAGS = @LUA_CFLAGS@ LUA_CONFIG = @LUA_CONFIG@ LUA_LIBS = @LUA_LIBS@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MKDIR_P = @MKDIR_P@ NETDB_H = @NETDB_H@ NETINET_IN_H = @NETINET_IN_H@ NEXT_ARPA_INET_H = @NEXT_ARPA_INET_H@ NEXT_AS_FIRST_DIRECTIVE_ARPA_INET_H = @NEXT_AS_FIRST_DIRECTIVE_ARPA_INET_H@ NEXT_AS_FIRST_DIRECTIVE_ERRNO_H = @NEXT_AS_FIRST_DIRECTIVE_ERRNO_H@ NEXT_AS_FIRST_DIRECTIVE_FCNTL_H = @NEXT_AS_FIRST_DIRECTIVE_FCNTL_H@ NEXT_AS_FIRST_DIRECTIVE_FLOAT_H = @NEXT_AS_FIRST_DIRECTIVE_FLOAT_H@ NEXT_AS_FIRST_DIRECTIVE_LANGINFO_H = @NEXT_AS_FIRST_DIRECTIVE_LANGINFO_H@ NEXT_AS_FIRST_DIRECTIVE_MATH_H = @NEXT_AS_FIRST_DIRECTIVE_MATH_H@ NEXT_AS_FIRST_DIRECTIVE_NETDB_H = @NEXT_AS_FIRST_DIRECTIVE_NETDB_H@ NEXT_AS_FIRST_DIRECTIVE_NETINET_IN_H = @NEXT_AS_FIRST_DIRECTIVE_NETINET_IN_H@ NEXT_AS_FIRST_DIRECTIVE_SIGNAL_H = @NEXT_AS_FIRST_DIRECTIVE_SIGNAL_H@ NEXT_AS_FIRST_DIRECTIVE_STDDEF_H = @NEXT_AS_FIRST_DIRECTIVE_STDDEF_H@ NEXT_AS_FIRST_DIRECTIVE_STDINT_H = @NEXT_AS_FIRST_DIRECTIVE_STDINT_H@ NEXT_AS_FIRST_DIRECTIVE_STDIO_H = @NEXT_AS_FIRST_DIRECTIVE_STDIO_H@ NEXT_AS_FIRST_DIRECTIVE_STDLIB_H = @NEXT_AS_FIRST_DIRECTIVE_STDLIB_H@ NEXT_AS_FIRST_DIRECTIVE_STRINGS_H = @NEXT_AS_FIRST_DIRECTIVE_STRINGS_H@ NEXT_AS_FIRST_DIRECTIVE_STRING_H = @NEXT_AS_FIRST_DIRECTIVE_STRING_H@ NEXT_AS_FIRST_DIRECTIVE_SYS_IOCTL_H = @NEXT_AS_FIRST_DIRECTIVE_SYS_IOCTL_H@ NEXT_AS_FIRST_DIRECTIVE_SYS_SELECT_H = @NEXT_AS_FIRST_DIRECTIVE_SYS_SELECT_H@ NEXT_AS_FIRST_DIRECTIVE_SYS_SOCKET_H = @NEXT_AS_FIRST_DIRECTIVE_SYS_SOCKET_H@ NEXT_AS_FIRST_DIRECTIVE_SYS_STAT_H = @NEXT_AS_FIRST_DIRECTIVE_SYS_STAT_H@ NEXT_AS_FIRST_DIRECTIVE_SYS_TIME_H = @NEXT_AS_FIRST_DIRECTIVE_SYS_TIME_H@ NEXT_AS_FIRST_DIRECTIVE_SYS_UTSNAME_H = @NEXT_AS_FIRST_DIRECTIVE_SYS_UTSNAME_H@ NEXT_AS_FIRST_DIRECTIVE_TIME_H = @NEXT_AS_FIRST_DIRECTIVE_TIME_H@ NEXT_AS_FIRST_DIRECTIVE_UNISTD_H = @NEXT_AS_FIRST_DIRECTIVE_UNISTD_H@ NEXT_AS_FIRST_DIRECTIVE_WCHAR_H = @NEXT_AS_FIRST_DIRECTIVE_WCHAR_H@ NEXT_AS_FIRST_DIRECTIVE_WCTYPE_H = @NEXT_AS_FIRST_DIRECTIVE_WCTYPE_H@ NEXT_ERRNO_H = @NEXT_ERRNO_H@ NEXT_FCNTL_H = @NEXT_FCNTL_H@ NEXT_FLOAT_H = @NEXT_FLOAT_H@ NEXT_LANGINFO_H = @NEXT_LANGINFO_H@ NEXT_MATH_H = @NEXT_MATH_H@ NEXT_NETDB_H = @NEXT_NETDB_H@ NEXT_NETINET_IN_H = @NEXT_NETINET_IN_H@ NEXT_SIGNAL_H = @NEXT_SIGNAL_H@ NEXT_STDDEF_H = @NEXT_STDDEF_H@ NEXT_STDINT_H = @NEXT_STDINT_H@ NEXT_STDIO_H = @NEXT_STDIO_H@ NEXT_STDLIB_H = @NEXT_STDLIB_H@ NEXT_STRINGS_H = @NEXT_STRINGS_H@ NEXT_STRING_H = @NEXT_STRING_H@ NEXT_SYS_IOCTL_H = @NEXT_SYS_IOCTL_H@ NEXT_SYS_SELECT_H = @NEXT_SYS_SELECT_H@ NEXT_SYS_SOCKET_H = @NEXT_SYS_SOCKET_H@ NEXT_SYS_STAT_H = @NEXT_SYS_STAT_H@ NEXT_SYS_TIME_H = @NEXT_SYS_TIME_H@ NEXT_SYS_UTSNAME_H = @NEXT_SYS_UTSNAME_H@ NEXT_TIME_H = @NEXT_TIME_H@ NEXT_UNISTD_H = @NEXT_UNISTD_H@ NEXT_WCHAR_H = @NEXT_WCHAR_H@ NEXT_WCTYPE_H = @NEXT_WCTYPE_H@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PCFLAGS = @PCFLAGS@ PERL = @PERL@ PERL_EXTRA_PARAMS = @PERL_EXTRA_PARAMS@ PKG_CONFIG = @PKG_CONFIG@ POLL_H = @POLL_H@ PRAGMA_SYSTEM_HEADER = @PRAGMA_SYSTEM_HEADER@ PRELUDE_ADMIN_CFLAGS = @PRELUDE_ADMIN_CFLAGS@ PRELUDE_ADMIN_LIBS = @PRELUDE_ADMIN_LIBS@ PRELUDE_CONFIG_DIR = @PRELUDE_CONFIG_DIR@ PRELUDE_SPOOL_DIR = @PRELUDE_SPOOL_DIR@ PTHREAD_CFLAGS = @PTHREAD_CFLAGS@ PTHREAD_LDFLAGS = @PTHREAD_LDFLAGS@ PTHREAD_LIBS = @PTHREAD_LIBS@ PTRDIFF_T_SUFFIX = @PTRDIFF_T_SUFFIX@ PYTHON = @PYTHON@ RANLIB = @RANLIB@ RELOCATABLE = @RELOCATABLE@ REPLACE_BTOWC = @REPLACE_BTOWC@ REPLACE_CANONICALIZE_FILE_NAME = @REPLACE_CANONICALIZE_FILE_NAME@ REPLACE_CEILF = @REPLACE_CEILF@ REPLACE_CEILL = @REPLACE_CEILL@ REPLACE_CHOWN = @REPLACE_CHOWN@ REPLACE_CLOSE = @REPLACE_CLOSE@ REPLACE_DPRINTF = @REPLACE_DPRINTF@ REPLACE_DUP = @REPLACE_DUP@ REPLACE_DUP2 = @REPLACE_DUP2@ REPLACE_FCHDIR = @REPLACE_FCHDIR@ REPLACE_FCHOWNAT = @REPLACE_FCHOWNAT@ REPLACE_FCLOSE = @REPLACE_FCLOSE@ REPLACE_FCNTL = @REPLACE_FCNTL@ REPLACE_FFLUSH = @REPLACE_FFLUSH@ REPLACE_FLOORF = @REPLACE_FLOORF@ REPLACE_FLOORL = @REPLACE_FLOORL@ REPLACE_FOPEN = @REPLACE_FOPEN@ REPLACE_FPRINTF = @REPLACE_FPRINTF@ REPLACE_FPURGE = @REPLACE_FPURGE@ REPLACE_FREOPEN = @REPLACE_FREOPEN@ REPLACE_FREXP = @REPLACE_FREXP@ REPLACE_FREXPL = @REPLACE_FREXPL@ REPLACE_FSEEK = @REPLACE_FSEEK@ REPLACE_FSEEKO = @REPLACE_FSEEKO@ REPLACE_FSTAT = @REPLACE_FSTAT@ REPLACE_FSTATAT = @REPLACE_FSTATAT@ REPLACE_FTELL = @REPLACE_FTELL@ REPLACE_FTELLO = @REPLACE_FTELLO@ REPLACE_FUTIMENS = @REPLACE_FUTIMENS@ REPLACE_GETCWD = @REPLACE_GETCWD@ REPLACE_GETDELIM = @REPLACE_GETDELIM@ REPLACE_GETGROUPS = @REPLACE_GETGROUPS@ REPLACE_GETLINE = @REPLACE_GETLINE@ REPLACE_GETPAGESIZE = @REPLACE_GETPAGESIZE@ REPLACE_GETTIMEOFDAY = @REPLACE_GETTIMEOFDAY@ REPLACE_HUGE_VAL = @REPLACE_HUGE_VAL@ REPLACE_ISFINITE = @REPLACE_ISFINITE@ REPLACE_ISINF = @REPLACE_ISINF@ REPLACE_ISNAN = @REPLACE_ISNAN@ REPLACE_ISWCNTRL = @REPLACE_ISWCNTRL@ REPLACE_LCHOWN = @REPLACE_LCHOWN@ REPLACE_LDEXPL = @REPLACE_LDEXPL@ REPLACE_LINK = @REPLACE_LINK@ REPLACE_LINKAT = @REPLACE_LINKAT@ REPLACE_LOCALTIME_R = @REPLACE_LOCALTIME_R@ REPLACE_LSEEK = @REPLACE_LSEEK@ REPLACE_LSTAT = @REPLACE_LSTAT@ REPLACE_MBRLEN = @REPLACE_MBRLEN@ REPLACE_MBRTOWC = @REPLACE_MBRTOWC@ REPLACE_MBSINIT = @REPLACE_MBSINIT@ REPLACE_MBSNRTOWCS = @REPLACE_MBSNRTOWCS@ REPLACE_MBSRTOWCS = @REPLACE_MBSRTOWCS@ REPLACE_MBSTATE_T = @REPLACE_MBSTATE_T@ REPLACE_MEMCHR = @REPLACE_MEMCHR@ REPLACE_MEMMEM = @REPLACE_MEMMEM@ REPLACE_MKDIR = @REPLACE_MKDIR@ REPLACE_MKFIFO = @REPLACE_MKFIFO@ REPLACE_MKNOD = @REPLACE_MKNOD@ REPLACE_MKSTEMP = @REPLACE_MKSTEMP@ REPLACE_MKTIME = @REPLACE_MKTIME@ REPLACE_NAN = @REPLACE_NAN@ REPLACE_NANOSLEEP = @REPLACE_NANOSLEEP@ REPLACE_NL_LANGINFO = @REPLACE_NL_LANGINFO@ REPLACE_NULL = @REPLACE_NULL@ REPLACE_OBSTACK_PRINTF = @REPLACE_OBSTACK_PRINTF@ REPLACE_OPEN = @REPLACE_OPEN@ REPLACE_OPENAT = @REPLACE_OPENAT@ REPLACE_PERROR = @REPLACE_PERROR@ REPLACE_POPEN = @REPLACE_POPEN@ REPLACE_PREAD = @REPLACE_PREAD@ REPLACE_PRINTF = @REPLACE_PRINTF@ REPLACE_PUTENV = @REPLACE_PUTENV@ REPLACE_READLINK = @REPLACE_READLINK@ REPLACE_REALPATH = @REPLACE_REALPATH@ REPLACE_REMOVE = @REPLACE_REMOVE@ REPLACE_RENAME = @REPLACE_RENAME@ REPLACE_RENAMEAT = @REPLACE_RENAMEAT@ REPLACE_RMDIR = @REPLACE_RMDIR@ REPLACE_ROUND = @REPLACE_ROUND@ REPLACE_ROUNDF = @REPLACE_ROUNDF@ REPLACE_ROUNDL = @REPLACE_ROUNDL@ REPLACE_SELECT = @REPLACE_SELECT@ REPLACE_SETENV = @REPLACE_SETENV@ REPLACE_SIGNBIT = @REPLACE_SIGNBIT@ REPLACE_SIGNBIT_USING_GCC = @REPLACE_SIGNBIT_USING_GCC@ REPLACE_SLEEP = @REPLACE_SLEEP@ REPLACE_SNPRINTF = @REPLACE_SNPRINTF@ REPLACE_SPRINTF = @REPLACE_SPRINTF@ REPLACE_STAT = @REPLACE_STAT@ REPLACE_STDIO_WRITE_FUNCS = @REPLACE_STDIO_WRITE_FUNCS@ REPLACE_STRCASESTR = @REPLACE_STRCASESTR@ REPLACE_STRDUP = @REPLACE_STRDUP@ REPLACE_STRERROR = @REPLACE_STRERROR@ REPLACE_STRNDUP = @REPLACE_STRNDUP@ REPLACE_STRPTIME = @REPLACE_STRPTIME@ REPLACE_STRSIGNAL = @REPLACE_STRSIGNAL@ REPLACE_STRSTR = @REPLACE_STRSTR@ REPLACE_STRTOD = @REPLACE_STRTOD@ REPLACE_STRTOK_R = @REPLACE_STRTOK_R@ REPLACE_SYMLINK = @REPLACE_SYMLINK@ REPLACE_TIMEGM = @REPLACE_TIMEGM@ REPLACE_TRUNCL = @REPLACE_TRUNCL@ REPLACE_UNLINK = @REPLACE_UNLINK@ REPLACE_UNLINKAT = @REPLACE_UNLINKAT@ REPLACE_UNSETENV = @REPLACE_UNSETENV@ REPLACE_USLEEP = @REPLACE_USLEEP@ REPLACE_UTIMENSAT = @REPLACE_UTIMENSAT@ REPLACE_VASPRINTF = @REPLACE_VASPRINTF@ REPLACE_VDPRINTF = @REPLACE_VDPRINTF@ REPLACE_VFPRINTF = @REPLACE_VFPRINTF@ REPLACE_VPRINTF = @REPLACE_VPRINTF@ REPLACE_VSNPRINTF = @REPLACE_VSNPRINTF@ REPLACE_VSPRINTF = @REPLACE_VSPRINTF@ REPLACE_WCRTOMB = @REPLACE_WCRTOMB@ REPLACE_WCSNRTOMBS = @REPLACE_WCSNRTOMBS@ REPLACE_WCSRTOMBS = @REPLACE_WCSRTOMBS@ REPLACE_WCTOB = @REPLACE_WCTOB@ REPLACE_WCWIDTH = @REPLACE_WCWIDTH@ REPLACE_WRITE = @REPLACE_WRITE@ RUBY = @RUBY@ RUBY_CCFLAGS = @RUBY_CCFLAGS@ RUBY_EXEC_PREFIX = @RUBY_EXEC_PREFIX@ RUBY_INCLUDES = @RUBY_INCLUDES@ RUBY_LIBS = @RUBY_LIBS@ RUBY_PLATFORM = @RUBY_PLATFORM@ RUBY_PREFIX = @RUBY_PREFIX@ RUBY_VERSION = @RUBY_VERSION@ SED = @SED@ SERVENT_LIB = @SERVENT_LIB@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ SIG_ATOMIC_T_SUFFIX = @SIG_ATOMIC_T_SUFFIX@ SIZE_T_SUFFIX = @SIZE_T_SUFFIX@ STDBOOL_H = @STDBOOL_H@ STDDEF_H = @STDDEF_H@ STDINT_H = @STDINT_H@ STRIP = @STRIP@ SWIG = @SWIG@ SYSCONFDIR = @SYSCONFDIR@ SYS_IOCTL_H_HAVE_WINSOCK2_H = @SYS_IOCTL_H_HAVE_WINSOCK2_H@ SYS_IOCTL_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS = @SYS_IOCTL_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS@ SYS_SOCKET_H = @SYS_SOCKET_H@ SYS_TIME_H_DEFINES_STRUCT_TIMESPEC = @SYS_TIME_H_DEFINES_STRUCT_TIMESPEC@ TIME_H_DEFINES_STRUCT_TIMESPEC = @TIME_H_DEFINES_STRUCT_TIMESPEC@ UNDEFINE_STRTOK_R = @UNDEFINE_STRTOK_R@ UNISTD_H_HAVE_WINSOCK2_H = @UNISTD_H_HAVE_WINSOCK2_H@ UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS = @UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS@ VALGRIND = @VALGRIND@ VERSION = @VERSION@ WCHAR_T_SUFFIX = @WCHAR_T_SUFFIX@ WCTYPE_H = @WCTYPE_H@ WINT_T_SUFFIX = @WINT_T_SUFFIX@ YACC = @YACC@ YFLAGS = @YFLAGS@ YIELD_LIB = @YIELD_LIB@ __PRELUDE_64BIT_FORMAT_PREFIX = @__PRELUDE_64BIT_FORMAT_PREFIX@ __PRELUDE_HAVE_64BIT_LONG = @__PRELUDE_HAVE_64BIT_LONG@ __PRELUDE_HAVE_INTTYPES_H = @__PRELUDE_HAVE_INTTYPES_H@ __PRELUDE_HAVE_STDINT_H = @__PRELUDE_HAVE_STDINT_H@ __PRELUDE_STDINT_HAVE_UINT16 = @__PRELUDE_STDINT_HAVE_UINT16@ __PRELUDE_STDINT_HAVE_UINT32 = @__PRELUDE_STDINT_HAVE_UINT32@ __PRELUDE_STDINT_HAVE_UINT64 = @__PRELUDE_STDINT_HAVE_UINT64@ __PRELUDE_STDINT_HAVE_UINT8 = @__PRELUDE_STDINT_HAVE_UINT8@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ gl_LIBOBJS = @gl_LIBOBJS@ gl_LTLIBOBJS = @gl_LTLIBOBJS@ gltests_LIBOBJS = @gltests_LIBOBJS@ gltests_LTLIBOBJS = @gltests_LTLIBOBJS@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ lt_ECHO = @lt_ECHO@ ltdl_LIBOBJS = @ltdl_LIBOBJS@ ltdl_LTLIBOBJS = @ltdl_LTLIBOBJS@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ pkgrbexecdir = @pkgrbexecdir@ pkgrubydir = @pkgrubydir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ rbexecdir = @rbexecdir@ rubydir = @rubydir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sys_symbol_underscore = @sys_symbol_underscore@ sysconfdir = @sysconfdir@ target = @target@ target_alias = @target_alias@ target_cpu = @target_cpu@ target_os = @target_os@ target_vendor = @target_vendor@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ AUTOMAKE_OPTIONS = 1.5 foreign SUBDIRS = TESTS_ENVIRONMENT = EXEEXT='@EXEEXT@' srcdir='$(srcdir)' \ LOCALE_FR='@LOCALE_FR@' LOCALE_FR_UTF8='@LOCALE_FR_UTF8@' \ LOCALE_FR='@LOCALE_FR@' LOCALE_TR_UTF8='@LOCALE_TR_UTF8@' \ LOCALE_FR='@LOCALE_FR@' LOCALE_FR_UTF8='@LOCALE_FR_UTF8@' \ LOCALE_JA='@LOCALE_JA@' LOCALE_ZH_CN='@LOCALE_ZH_CN@' \ LOCALE_FR_UTF8='@LOCALE_FR_UTF8@' LOCALE_FR='@LOCALE_FR@' \ LOCALE_FR_UTF8='@LOCALE_FR_UTF8@' LOCALE_FR='@LOCALE_FR@' \ LOCALE_FR_UTF8='@LOCALE_FR_UTF8@' LOCALE_JA='@LOCALE_JA@' \ LOCALE_ZH_CN='@LOCALE_ZH_CN@' noinst_HEADERS = noinst_LIBRARIES = check_LIBRARIES = libtests.a EXTRA_DIST = test-alignof.c test-alloca-opt.c \ $(top_srcdir)/./arg-nonnull.h test-arpa_inet.c \ test-binary-io.sh test-binary-io.c macros.h test-btowc1.sh \ test-btowc2.sh test-btowc.c signature.h macros.h \ test-c-ctype.c macros.h test-c-strcase.sh test-c-strcasecmp.c \ test-c-strncasecmp.c macros.h test-cond.c test-dup2.c \ signature.h macros.h test-errno.c fcntl.in.h test-fcntl-h.c \ test-fopen.h test-fopen.c signature.h macros.h test-frexp.c \ signature.h macros.h test-frexpl.c signature.h macros.h \ test-fseeko.c test-fseeko.sh test-fseeko2.sh signature.h \ macros.h signature.h test-getaddrinfo.c test-getdelim.c \ signature.h macros.h signature.h test-gethostname.c \ test-getline.c signature.h macros.h getpagesize.c signature.h \ test-gettimeofday.c test-inet_ntop.c signature.h macros.h \ test-inet_pton.c signature.h macros.h test-isnand-nolibm.c \ test-isnand.h nan.h macros.h test-isnanf-nolibm.c \ test-isnanf.h nan.h macros.h test-isnanl-nolibm.c \ test-isnanl.h nan.h macros.h test-langinfo.c test-lock.c \ test-lseek.c test-lseek.sh signature.h macros.h lstat.c \ test-lstat.h test-lstat.c signature.h macros.h test-math.c \ test-mbrtowc1.sh test-mbrtowc2.sh test-mbrtowc3.sh \ test-mbrtowc4.sh test-mbrtowc.c signature.h macros.h \ test-mbsinit.sh test-mbsinit.c signature.h macros.h \ test-memchr.c zerosize-ptr.h signature.h macros.h \ test-memmem.c zerosize-ptr.h signature.h macros.h test-netdb.c \ test-netinet_in.c test-nl_langinfo.sh test-nl_langinfo.c \ signature.h macros.h open.c test-open.h test-open.c \ signature.h macros.h signature.h test-perror.c test-perror.sh \ signature.h test-poll.c test-printf-frexp.c macros.h \ test-printf-frexpl.c macros.h same-inode.h signature.h \ test-select.c test-select-fd.c test-select-in.sh \ test-select-out.sh test-select-stdin.c test-signal.c \ test-signbit.c macros.h test-sleep.c signature.h macros.h \ test-snprintf-posix.c test-snprintf-posix.h test-snprintf.c \ nan.h signature.h macros.h test-snprintf.c signature.h \ macros.h test-sockets.c test-stat.h test-stat.c signature.h \ macros.h test-stdbool.c test-stddef.c test-stdint.c \ test-stdio.c test-stdlib.c test-strcasestr.c signature.h \ macros.h test-strerror.c signature.h macros.h test-string.c \ test-strings.c symlink.c test-symlink.h test-symlink.c \ signature.h macros.h test-sys_ioctl.c test-sys_select.c \ test-sys_socket.c test-sys_stat.c test-sys_time.c \ test-sys_utsname.c test-time.c test-tls.c test-uname.c \ signature.h macros.h test-unistd.c test-vasnprintf.c macros.h \ test-vsnprintf-posix.c test-snprintf-posix.h test-vsnprintf.c \ nan.h signature.h macros.h test-vsnprintf.c signature.h \ macros.h $(top_srcdir)/./warn-on-use.h test-wchar.c \ test-wcrtomb.sh test-wcrtomb.c signature.h macros.h wctob.c \ test-wctype.c macros.h # The BUILT_SOURCES created by this Makefile snippet are not used via #include # statements but through direct file reference. Therefore this snippet must be # present in all Makefile.am that need it. This is ensured by the applicability # 'all' defined above. BUILT_SOURCES = arg-nonnull.h fcntl.h warn-on-use.h SUFFIXES = MOSTLYCLEANFILES = core *.stackdump arg-nonnull.h arg-nonnull.h-t \ fcntl.h fcntl.h-t test-getdelim.txt test-getline.txt \ warn-on-use.h warn-on-use.h-t MOSTLYCLEANDIRS = CLEANFILES = DISTCLEANFILES = MAINTAINERCLEANFILES = AM_CPPFLAGS = \ -I. -I$(srcdir) \ -I../.. -I$(srcdir)/../.. \ -I../../libmissing -I$(srcdir)/../../libmissing LDADD = libtests.a ../../libmissing/libmissing.la libtests.a $(LIBTESTS_LIBDEPS) libtests_a_SOURCES = binary-io.h c-strcase.h c-strcasecmp.c \ c-strncasecmp.c ignore-value.h glthread/yield.h libtests_a_LIBADD = $(gltests_LIBOBJS) libtests_a_DEPENDENCIES = $(gltests_LIBOBJS) EXTRA_libtests_a_SOURCES = getpagesize.c lstat.c open.c symlink.c \ wctob.c AM_LIBTOOLFLAGS = --preserve-dup-deps ARG_NONNULL_H = arg-nonnull.h test_cond_LDADD = $(LDADD) @LIBMULTITHREAD@ @YIELD_LIB@ test_frexp_nolibm_SOURCES = test-frexp.c test_frexpl_nolibm_SOURCES = test-frexpl.c test_getaddrinfo_LDADD = $(LDADD) @GETADDRINFO_LIB@ @LIBINTL@ test_gethostname_LDADD = $(LDADD) @GETHOSTNAME_LIB@ test_inet_ntop_LDADD = $(LDADD) @INET_NTOP_LIB@ test_inet_pton_LDADD = $(LDADD) @INET_PTON_LIB@ test_lock_LDADD = $(LDADD) @LIBMULTITHREAD@ @YIELD_LIB@ test_poll_LDADD = $(LDADD) @LIBSOCKET@ $(INET_PTON_LIB) test_select_LDADD = $(LDADD) @LIBSOCKET@ $(INET_PTON_LIB) test_select_fd_LDADD = $(LDADD) @LIBSOCKET@ test_select_stdin_LDADD = $(LDADD) @LIBSOCKET@ test_sockets_LDADD = $(LDADD) @LIBSOCKET@ test_tls_LDADD = $(LDADD) @LIBMULTITHREAD@ @YIELD_LIB@ test_uname_LDADD = $(LDADD) @GETHOSTNAME_LIB@ WARN_ON_USE_H = warn-on-use.h all: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) all-recursive .SUFFIXES: .SUFFIXES: .c .lo .o .obj $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign libmissing/tests/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --foreign libmissing/tests/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): clean-checkLIBRARIES: -test -z "$(check_LIBRARIES)" || rm -f $(check_LIBRARIES) clean-noinstLIBRARIES: -test -z "$(noinst_LIBRARIES)" || rm -f $(noinst_LIBRARIES) libtests.a: $(libtests_a_OBJECTS) $(libtests_a_DEPENDENCIES) -rm -f libtests.a $(libtests_a_AR) libtests.a $(libtests_a_OBJECTS) $(libtests_a_LIBADD) $(RANLIB) libtests.a clean-checkPROGRAMS: @list='$(check_PROGRAMS)'; test -n "$$list" || exit 0; \ echo " rm -f" $$list; \ rm -f $$list || exit $$?; \ test -n "$(EXEEXT)" || exit 0; \ list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ echo " rm -f" $$list; \ rm -f $$list clean-noinstPROGRAMS: @list='$(noinst_PROGRAMS)'; test -n "$$list" || exit 0; \ echo " rm -f" $$list; \ rm -f $$list || exit $$?; \ test -n "$(EXEEXT)" || exit 0; \ list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ echo " rm -f" $$list; \ rm -f $$list test-alignof$(EXEEXT): $(test_alignof_OBJECTS) $(test_alignof_DEPENDENCIES) @rm -f test-alignof$(EXEEXT) $(LINK) $(test_alignof_OBJECTS) $(test_alignof_LDADD) $(LIBS) test-alloca-opt$(EXEEXT): $(test_alloca_opt_OBJECTS) $(test_alloca_opt_DEPENDENCIES) @rm -f test-alloca-opt$(EXEEXT) $(LINK) $(test_alloca_opt_OBJECTS) $(test_alloca_opt_LDADD) $(LIBS) test-arpa_inet$(EXEEXT): $(test_arpa_inet_OBJECTS) $(test_arpa_inet_DEPENDENCIES) @rm -f test-arpa_inet$(EXEEXT) $(LINK) $(test_arpa_inet_OBJECTS) $(test_arpa_inet_LDADD) $(LIBS) test-binary-io$(EXEEXT): $(test_binary_io_OBJECTS) $(test_binary_io_DEPENDENCIES) @rm -f test-binary-io$(EXEEXT) $(LINK) $(test_binary_io_OBJECTS) $(test_binary_io_LDADD) $(LIBS) test-btowc$(EXEEXT): $(test_btowc_OBJECTS) $(test_btowc_DEPENDENCIES) @rm -f test-btowc$(EXEEXT) $(LINK) $(test_btowc_OBJECTS) $(test_btowc_LDADD) $(LIBS) test-c-ctype$(EXEEXT): $(test_c_ctype_OBJECTS) $(test_c_ctype_DEPENDENCIES) @rm -f test-c-ctype$(EXEEXT) $(LINK) $(test_c_ctype_OBJECTS) $(test_c_ctype_LDADD) $(LIBS) test-c-strcasecmp$(EXEEXT): $(test_c_strcasecmp_OBJECTS) $(test_c_strcasecmp_DEPENDENCIES) @rm -f test-c-strcasecmp$(EXEEXT) $(LINK) $(test_c_strcasecmp_OBJECTS) $(test_c_strcasecmp_LDADD) $(LIBS) test-c-strncasecmp$(EXEEXT): $(test_c_strncasecmp_OBJECTS) $(test_c_strncasecmp_DEPENDENCIES) @rm -f test-c-strncasecmp$(EXEEXT) $(LINK) $(test_c_strncasecmp_OBJECTS) $(test_c_strncasecmp_LDADD) $(LIBS) test-cond$(EXEEXT): $(test_cond_OBJECTS) $(test_cond_DEPENDENCIES) @rm -f test-cond$(EXEEXT) $(LINK) $(test_cond_OBJECTS) $(test_cond_LDADD) $(LIBS) test-dup2$(EXEEXT): $(test_dup2_OBJECTS) $(test_dup2_DEPENDENCIES) @rm -f test-dup2$(EXEEXT) $(LINK) $(test_dup2_OBJECTS) $(test_dup2_LDADD) $(LIBS) test-errno$(EXEEXT): $(test_errno_OBJECTS) $(test_errno_DEPENDENCIES) @rm -f test-errno$(EXEEXT) $(LINK) $(test_errno_OBJECTS) $(test_errno_LDADD) $(LIBS) test-fcntl-h$(EXEEXT): $(test_fcntl_h_OBJECTS) $(test_fcntl_h_DEPENDENCIES) @rm -f test-fcntl-h$(EXEEXT) $(LINK) $(test_fcntl_h_OBJECTS) $(test_fcntl_h_LDADD) $(LIBS) test-fopen$(EXEEXT): $(test_fopen_OBJECTS) $(test_fopen_DEPENDENCIES) @rm -f test-fopen$(EXEEXT) $(LINK) $(test_fopen_OBJECTS) $(test_fopen_LDADD) $(LIBS) test-frexp-nolibm$(EXEEXT): $(test_frexp_nolibm_OBJECTS) $(test_frexp_nolibm_DEPENDENCIES) @rm -f test-frexp-nolibm$(EXEEXT) $(LINK) $(test_frexp_nolibm_OBJECTS) $(test_frexp_nolibm_LDADD) $(LIBS) test-frexpl-nolibm$(EXEEXT): $(test_frexpl_nolibm_OBJECTS) $(test_frexpl_nolibm_DEPENDENCIES) @rm -f test-frexpl-nolibm$(EXEEXT) $(LINK) $(test_frexpl_nolibm_OBJECTS) $(test_frexpl_nolibm_LDADD) $(LIBS) test-fseeko$(EXEEXT): $(test_fseeko_OBJECTS) $(test_fseeko_DEPENDENCIES) @rm -f test-fseeko$(EXEEXT) $(LINK) $(test_fseeko_OBJECTS) $(test_fseeko_LDADD) $(LIBS) test-getaddrinfo$(EXEEXT): $(test_getaddrinfo_OBJECTS) $(test_getaddrinfo_DEPENDENCIES) @rm -f test-getaddrinfo$(EXEEXT) $(LINK) $(test_getaddrinfo_OBJECTS) $(test_getaddrinfo_LDADD) $(LIBS) test-getdelim$(EXEEXT): $(test_getdelim_OBJECTS) $(test_getdelim_DEPENDENCIES) @rm -f test-getdelim$(EXEEXT) $(LINK) $(test_getdelim_OBJECTS) $(test_getdelim_LDADD) $(LIBS) test-gethostname$(EXEEXT): $(test_gethostname_OBJECTS) $(test_gethostname_DEPENDENCIES) @rm -f test-gethostname$(EXEEXT) $(LINK) $(test_gethostname_OBJECTS) $(test_gethostname_LDADD) $(LIBS) test-getline$(EXEEXT): $(test_getline_OBJECTS) $(test_getline_DEPENDENCIES) @rm -f test-getline$(EXEEXT) $(LINK) $(test_getline_OBJECTS) $(test_getline_LDADD) $(LIBS) test-gettimeofday$(EXEEXT): $(test_gettimeofday_OBJECTS) $(test_gettimeofday_DEPENDENCIES) @rm -f test-gettimeofday$(EXEEXT) $(LINK) $(test_gettimeofday_OBJECTS) $(test_gettimeofday_LDADD) $(LIBS) test-inet_ntop$(EXEEXT): $(test_inet_ntop_OBJECTS) $(test_inet_ntop_DEPENDENCIES) @rm -f test-inet_ntop$(EXEEXT) $(LINK) $(test_inet_ntop_OBJECTS) $(test_inet_ntop_LDADD) $(LIBS) test-inet_pton$(EXEEXT): $(test_inet_pton_OBJECTS) $(test_inet_pton_DEPENDENCIES) @rm -f test-inet_pton$(EXEEXT) $(LINK) $(test_inet_pton_OBJECTS) $(test_inet_pton_LDADD) $(LIBS) test-isnand-nolibm$(EXEEXT): $(test_isnand_nolibm_OBJECTS) $(test_isnand_nolibm_DEPENDENCIES) @rm -f test-isnand-nolibm$(EXEEXT) $(LINK) $(test_isnand_nolibm_OBJECTS) $(test_isnand_nolibm_LDADD) $(LIBS) test-isnanf-nolibm$(EXEEXT): $(test_isnanf_nolibm_OBJECTS) $(test_isnanf_nolibm_DEPENDENCIES) @rm -f test-isnanf-nolibm$(EXEEXT) $(LINK) $(test_isnanf_nolibm_OBJECTS) $(test_isnanf_nolibm_LDADD) $(LIBS) test-isnanl-nolibm$(EXEEXT): $(test_isnanl_nolibm_OBJECTS) $(test_isnanl_nolibm_DEPENDENCIES) @rm -f test-isnanl-nolibm$(EXEEXT) $(LINK) $(test_isnanl_nolibm_OBJECTS) $(test_isnanl_nolibm_LDADD) $(LIBS) test-langinfo$(EXEEXT): $(test_langinfo_OBJECTS) $(test_langinfo_DEPENDENCIES) @rm -f test-langinfo$(EXEEXT) $(LINK) $(test_langinfo_OBJECTS) $(test_langinfo_LDADD) $(LIBS) test-lock$(EXEEXT): $(test_lock_OBJECTS) $(test_lock_DEPENDENCIES) @rm -f test-lock$(EXEEXT) $(LINK) $(test_lock_OBJECTS) $(test_lock_LDADD) $(LIBS) test-lseek$(EXEEXT): $(test_lseek_OBJECTS) $(test_lseek_DEPENDENCIES) @rm -f test-lseek$(EXEEXT) $(LINK) $(test_lseek_OBJECTS) $(test_lseek_LDADD) $(LIBS) test-lstat$(EXEEXT): $(test_lstat_OBJECTS) $(test_lstat_DEPENDENCIES) @rm -f test-lstat$(EXEEXT) $(LINK) $(test_lstat_OBJECTS) $(test_lstat_LDADD) $(LIBS) test-math$(EXEEXT): $(test_math_OBJECTS) $(test_math_DEPENDENCIES) @rm -f test-math$(EXEEXT) $(LINK) $(test_math_OBJECTS) $(test_math_LDADD) $(LIBS) test-mbrtowc$(EXEEXT): $(test_mbrtowc_OBJECTS) $(test_mbrtowc_DEPENDENCIES) @rm -f test-mbrtowc$(EXEEXT) $(LINK) $(test_mbrtowc_OBJECTS) $(test_mbrtowc_LDADD) $(LIBS) test-mbsinit$(EXEEXT): $(test_mbsinit_OBJECTS) $(test_mbsinit_DEPENDENCIES) @rm -f test-mbsinit$(EXEEXT) $(LINK) $(test_mbsinit_OBJECTS) $(test_mbsinit_LDADD) $(LIBS) test-memchr$(EXEEXT): $(test_memchr_OBJECTS) $(test_memchr_DEPENDENCIES) @rm -f test-memchr$(EXEEXT) $(LINK) $(test_memchr_OBJECTS) $(test_memchr_LDADD) $(LIBS) test-memmem$(EXEEXT): $(test_memmem_OBJECTS) $(test_memmem_DEPENDENCIES) @rm -f test-memmem$(EXEEXT) $(LINK) $(test_memmem_OBJECTS) $(test_memmem_LDADD) $(LIBS) test-netdb$(EXEEXT): $(test_netdb_OBJECTS) $(test_netdb_DEPENDENCIES) @rm -f test-netdb$(EXEEXT) $(LINK) $(test_netdb_OBJECTS) $(test_netdb_LDADD) $(LIBS) test-netinet_in$(EXEEXT): $(test_netinet_in_OBJECTS) $(test_netinet_in_DEPENDENCIES) @rm -f test-netinet_in$(EXEEXT) $(LINK) $(test_netinet_in_OBJECTS) $(test_netinet_in_LDADD) $(LIBS) test-nl_langinfo$(EXEEXT): $(test_nl_langinfo_OBJECTS) $(test_nl_langinfo_DEPENDENCIES) @rm -f test-nl_langinfo$(EXEEXT) $(LINK) $(test_nl_langinfo_OBJECTS) $(test_nl_langinfo_LDADD) $(LIBS) test-open$(EXEEXT): $(test_open_OBJECTS) $(test_open_DEPENDENCIES) @rm -f test-open$(EXEEXT) $(LINK) $(test_open_OBJECTS) $(test_open_LDADD) $(LIBS) test-perror$(EXEEXT): $(test_perror_OBJECTS) $(test_perror_DEPENDENCIES) @rm -f test-perror$(EXEEXT) $(LINK) $(test_perror_OBJECTS) $(test_perror_LDADD) $(LIBS) test-poll$(EXEEXT): $(test_poll_OBJECTS) $(test_poll_DEPENDENCIES) @rm -f test-poll$(EXEEXT) $(LINK) $(test_poll_OBJECTS) $(test_poll_LDADD) $(LIBS) test-printf-frexp$(EXEEXT): $(test_printf_frexp_OBJECTS) $(test_printf_frexp_DEPENDENCIES) @rm -f test-printf-frexp$(EXEEXT) $(LINK) $(test_printf_frexp_OBJECTS) $(test_printf_frexp_LDADD) $(LIBS) test-printf-frexpl$(EXEEXT): $(test_printf_frexpl_OBJECTS) $(test_printf_frexpl_DEPENDENCIES) @rm -f test-printf-frexpl$(EXEEXT) $(LINK) $(test_printf_frexpl_OBJECTS) $(test_printf_frexpl_LDADD) $(LIBS) test-select$(EXEEXT): $(test_select_OBJECTS) $(test_select_DEPENDENCIES) @rm -f test-select$(EXEEXT) $(LINK) $(test_select_OBJECTS) $(test_select_LDADD) $(LIBS) test-select-fd$(EXEEXT): $(test_select_fd_OBJECTS) $(test_select_fd_DEPENDENCIES) @rm -f test-select-fd$(EXEEXT) $(LINK) $(test_select_fd_OBJECTS) $(test_select_fd_LDADD) $(LIBS) test-select-stdin$(EXEEXT): $(test_select_stdin_OBJECTS) $(test_select_stdin_DEPENDENCIES) @rm -f test-select-stdin$(EXEEXT) $(LINK) $(test_select_stdin_OBJECTS) $(test_select_stdin_LDADD) $(LIBS) test-signal$(EXEEXT): $(test_signal_OBJECTS) $(test_signal_DEPENDENCIES) @rm -f test-signal$(EXEEXT) $(LINK) $(test_signal_OBJECTS) $(test_signal_LDADD) $(LIBS) test-signbit$(EXEEXT): $(test_signbit_OBJECTS) $(test_signbit_DEPENDENCIES) @rm -f test-signbit$(EXEEXT) $(LINK) $(test_signbit_OBJECTS) $(test_signbit_LDADD) $(LIBS) test-sleep$(EXEEXT): $(test_sleep_OBJECTS) $(test_sleep_DEPENDENCIES) @rm -f test-sleep$(EXEEXT) $(LINK) $(test_sleep_OBJECTS) $(test_sleep_LDADD) $(LIBS) test-snprintf$(EXEEXT): $(test_snprintf_OBJECTS) $(test_snprintf_DEPENDENCIES) @rm -f test-snprintf$(EXEEXT) $(LINK) $(test_snprintf_OBJECTS) $(test_snprintf_LDADD) $(LIBS) test-snprintf-posix$(EXEEXT): $(test_snprintf_posix_OBJECTS) $(test_snprintf_posix_DEPENDENCIES) @rm -f test-snprintf-posix$(EXEEXT) $(LINK) $(test_snprintf_posix_OBJECTS) $(test_snprintf_posix_LDADD) $(LIBS) test-sockets$(EXEEXT): $(test_sockets_OBJECTS) $(test_sockets_DEPENDENCIES) @rm -f test-sockets$(EXEEXT) $(LINK) $(test_sockets_OBJECTS) $(test_sockets_LDADD) $(LIBS) test-stat$(EXEEXT): $(test_stat_OBJECTS) $(test_stat_DEPENDENCIES) @rm -f test-stat$(EXEEXT) $(LINK) $(test_stat_OBJECTS) $(test_stat_LDADD) $(LIBS) test-stdbool$(EXEEXT): $(test_stdbool_OBJECTS) $(test_stdbool_DEPENDENCIES) @rm -f test-stdbool$(EXEEXT) $(LINK) $(test_stdbool_OBJECTS) $(test_stdbool_LDADD) $(LIBS) test-stddef$(EXEEXT): $(test_stddef_OBJECTS) $(test_stddef_DEPENDENCIES) @rm -f test-stddef$(EXEEXT) $(LINK) $(test_stddef_OBJECTS) $(test_stddef_LDADD) $(LIBS) test-stdint$(EXEEXT): $(test_stdint_OBJECTS) $(test_stdint_DEPENDENCIES) @rm -f test-stdint$(EXEEXT) $(LINK) $(test_stdint_OBJECTS) $(test_stdint_LDADD) $(LIBS) test-stdio$(EXEEXT): $(test_stdio_OBJECTS) $(test_stdio_DEPENDENCIES) @rm -f test-stdio$(EXEEXT) $(LINK) $(test_stdio_OBJECTS) $(test_stdio_LDADD) $(LIBS) test-stdlib$(EXEEXT): $(test_stdlib_OBJECTS) $(test_stdlib_DEPENDENCIES) @rm -f test-stdlib$(EXEEXT) $(LINK) $(test_stdlib_OBJECTS) $(test_stdlib_LDADD) $(LIBS) test-strcasestr$(EXEEXT): $(test_strcasestr_OBJECTS) $(test_strcasestr_DEPENDENCIES) @rm -f test-strcasestr$(EXEEXT) $(LINK) $(test_strcasestr_OBJECTS) $(test_strcasestr_LDADD) $(LIBS) test-strerror$(EXEEXT): $(test_strerror_OBJECTS) $(test_strerror_DEPENDENCIES) @rm -f test-strerror$(EXEEXT) $(LINK) $(test_strerror_OBJECTS) $(test_strerror_LDADD) $(LIBS) test-string$(EXEEXT): $(test_string_OBJECTS) $(test_string_DEPENDENCIES) @rm -f test-string$(EXEEXT) $(LINK) $(test_string_OBJECTS) $(test_string_LDADD) $(LIBS) test-strings$(EXEEXT): $(test_strings_OBJECTS) $(test_strings_DEPENDENCIES) @rm -f test-strings$(EXEEXT) $(LINK) $(test_strings_OBJECTS) $(test_strings_LDADD) $(LIBS) test-symlink$(EXEEXT): $(test_symlink_OBJECTS) $(test_symlink_DEPENDENCIES) @rm -f test-symlink$(EXEEXT) $(LINK) $(test_symlink_OBJECTS) $(test_symlink_LDADD) $(LIBS) test-sys_ioctl$(EXEEXT): $(test_sys_ioctl_OBJECTS) $(test_sys_ioctl_DEPENDENCIES) @rm -f test-sys_ioctl$(EXEEXT) $(LINK) $(test_sys_ioctl_OBJECTS) $(test_sys_ioctl_LDADD) $(LIBS) test-sys_select$(EXEEXT): $(test_sys_select_OBJECTS) $(test_sys_select_DEPENDENCIES) @rm -f test-sys_select$(EXEEXT) $(LINK) $(test_sys_select_OBJECTS) $(test_sys_select_LDADD) $(LIBS) test-sys_socket$(EXEEXT): $(test_sys_socket_OBJECTS) $(test_sys_socket_DEPENDENCIES) @rm -f test-sys_socket$(EXEEXT) $(LINK) $(test_sys_socket_OBJECTS) $(test_sys_socket_LDADD) $(LIBS) test-sys_stat$(EXEEXT): $(test_sys_stat_OBJECTS) $(test_sys_stat_DEPENDENCIES) @rm -f test-sys_stat$(EXEEXT) $(LINK) $(test_sys_stat_OBJECTS) $(test_sys_stat_LDADD) $(LIBS) test-sys_time$(EXEEXT): $(test_sys_time_OBJECTS) $(test_sys_time_DEPENDENCIES) @rm -f test-sys_time$(EXEEXT) $(LINK) $(test_sys_time_OBJECTS) $(test_sys_time_LDADD) $(LIBS) test-sys_utsname$(EXEEXT): $(test_sys_utsname_OBJECTS) $(test_sys_utsname_DEPENDENCIES) @rm -f test-sys_utsname$(EXEEXT) $(LINK) $(test_sys_utsname_OBJECTS) $(test_sys_utsname_LDADD) $(LIBS) test-time$(EXEEXT): $(test_time_OBJECTS) $(test_time_DEPENDENCIES) @rm -f test-time$(EXEEXT) $(LINK) $(test_time_OBJECTS) $(test_time_LDADD) $(LIBS) test-tls$(EXEEXT): $(test_tls_OBJECTS) $(test_tls_DEPENDENCIES) @rm -f test-tls$(EXEEXT) $(LINK) $(test_tls_OBJECTS) $(test_tls_LDADD) $(LIBS) test-uname$(EXEEXT): $(test_uname_OBJECTS) $(test_uname_DEPENDENCIES) @rm -f test-uname$(EXEEXT) $(LINK) $(test_uname_OBJECTS) $(test_uname_LDADD) $(LIBS) test-unistd$(EXEEXT): $(test_unistd_OBJECTS) $(test_unistd_DEPENDENCIES) @rm -f test-unistd$(EXEEXT) $(LINK) $(test_unistd_OBJECTS) $(test_unistd_LDADD) $(LIBS) test-vasnprintf$(EXEEXT): $(test_vasnprintf_OBJECTS) $(test_vasnprintf_DEPENDENCIES) @rm -f test-vasnprintf$(EXEEXT) $(LINK) $(test_vasnprintf_OBJECTS) $(test_vasnprintf_LDADD) $(LIBS) test-vsnprintf$(EXEEXT): $(test_vsnprintf_OBJECTS) $(test_vsnprintf_DEPENDENCIES) @rm -f test-vsnprintf$(EXEEXT) $(LINK) $(test_vsnprintf_OBJECTS) $(test_vsnprintf_LDADD) $(LIBS) test-vsnprintf-posix$(EXEEXT): $(test_vsnprintf_posix_OBJECTS) $(test_vsnprintf_posix_DEPENDENCIES) @rm -f test-vsnprintf-posix$(EXEEXT) $(LINK) $(test_vsnprintf_posix_OBJECTS) $(test_vsnprintf_posix_LDADD) $(LIBS) test-wchar$(EXEEXT): $(test_wchar_OBJECTS) $(test_wchar_DEPENDENCIES) @rm -f test-wchar$(EXEEXT) $(LINK) $(test_wchar_OBJECTS) $(test_wchar_LDADD) $(LIBS) test-wcrtomb$(EXEEXT): $(test_wcrtomb_OBJECTS) $(test_wcrtomb_DEPENDENCIES) @rm -f test-wcrtomb$(EXEEXT) $(LINK) $(test_wcrtomb_OBJECTS) $(test_wcrtomb_LDADD) $(LIBS) test-wctype$(EXEEXT): $(test_wctype_OBJECTS) $(test_wctype_DEPENDENCIES) @rm -f test-wctype$(EXEEXT) $(LINK) $(test_wctype_OBJECTS) $(test_wctype_LDADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/c-strcasecmp.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/c-strncasecmp.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/getpagesize.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lstat.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/open.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/symlink.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-alignof.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-alloca-opt.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-arpa_inet.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-binary-io.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-btowc.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-c-ctype.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-c-strcasecmp.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-c-strncasecmp.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-cond.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-dup2.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-errno.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-fcntl-h.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-fopen.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-frexp.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-frexpl.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-fseeko.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-getaddrinfo.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-getdelim.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-gethostname.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-getline.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-gettimeofday.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-inet_ntop.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-inet_pton.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-isnand-nolibm.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-isnanf-nolibm.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-isnanl-nolibm.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-langinfo.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-lock.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-lseek.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-lstat.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-math.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-mbrtowc.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-mbsinit.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-memchr.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-memmem.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-netdb.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-netinet_in.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-nl_langinfo.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-open.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-perror.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-poll.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-printf-frexp.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-printf-frexpl.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-select-fd.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-select-stdin.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-select.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-signal.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-signbit.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-sleep.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-snprintf-posix.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-snprintf.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-sockets.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-stat.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-stdbool.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-stddef.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-stdint.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-stdio.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-stdlib.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-strcasestr.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-strerror.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-string.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-strings.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-symlink.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-sys_ioctl.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-sys_select.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-sys_socket.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-sys_stat.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-sys_time.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-sys_utsname.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-time.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-tls.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-uname.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-unistd.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-vasnprintf.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-vsnprintf-posix.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-vsnprintf.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-wchar.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-wcrtomb.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-wctype.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/wctob.Po@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(COMPILE) -c $< .c.obj: @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` .c.lo: @am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs # This directory's subdirectories are mostly independent; you can cd # into them and run `make' without going through this Makefile. # To change the values of `make' variables: instead of editing Makefiles, # (1) if the variable is set in `config.status', edit `config.status' # (which will cause the Makefiles to be regenerated when you run `make'); # (2) otherwise, pass the desired values on the `make' command line. $(RECURSIVE_TARGETS): @fail= failcom='exit 1'; \ for f in x $$MAKEFLAGS; do \ case $$f in \ *=* | --[!k]*);; \ *k*) failcom='fail=yes';; \ esac; \ done; \ dot_seen=no; \ target=`echo $@ | sed s/-recursive//`; \ list='$(SUBDIRS)'; for subdir in $$list; do \ echo "Making $$target in $$subdir"; \ if test "$$subdir" = "."; then \ dot_seen=yes; \ local_target="$$target-am"; \ else \ local_target="$$target"; \ fi; \ ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ || eval $$failcom; \ done; \ if test "$$dot_seen" = "no"; then \ $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ fi; test -z "$$fail" $(RECURSIVE_CLEAN_TARGETS): @fail= failcom='exit 1'; \ for f in x $$MAKEFLAGS; do \ case $$f in \ *=* | --[!k]*);; \ *k*) failcom='fail=yes';; \ esac; \ done; \ dot_seen=no; \ case "$@" in \ distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ *) list='$(SUBDIRS)' ;; \ esac; \ rev=''; for subdir in $$list; do \ if test "$$subdir" = "."; then :; else \ rev="$$subdir $$rev"; \ fi; \ done; \ rev="$$rev ."; \ target=`echo $@ | sed s/-recursive//`; \ for subdir in $$rev; do \ echo "Making $$target in $$subdir"; \ if test "$$subdir" = "."; then \ local_target="$$target-am"; \ else \ local_target="$$target"; \ fi; \ ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ || eval $$failcom; \ done && test -z "$$fail" tags-recursive: list='$(SUBDIRS)'; for subdir in $$list; do \ test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \ done ctags-recursive: list='$(SUBDIRS)'; for subdir in $$list; do \ test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \ done ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ mkid -fID $$unique tags: TAGS TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) set x; \ here=`pwd`; \ if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ include_option=--etags-include; \ empty_fix=.; \ else \ include_option=--include; \ empty_fix=; \ fi; \ list='$(SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ test ! -f $$subdir/TAGS || \ set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \ fi; \ done; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: CTAGS CTAGS: ctags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags check-TESTS: $(TESTS) @failed=0; all=0; xfail=0; xpass=0; skip=0; \ srcdir=$(srcdir); export srcdir; \ list=' $(TESTS) '; \ $(am__tty_colors); \ if test -n "$$list"; then \ for tst in $$list; do \ if test -f ./$$tst; then dir=./; \ elif test -f $$tst; then dir=; \ else dir="$(srcdir)/"; fi; \ if $(TESTS_ENVIRONMENT) $${dir}$$tst; then \ all=`expr $$all + 1`; \ case " $(XFAIL_TESTS) " in \ *[\ \ ]$$tst[\ \ ]*) \ xpass=`expr $$xpass + 1`; \ failed=`expr $$failed + 1`; \ col=$$red; res=XPASS; \ ;; \ *) \ col=$$grn; res=PASS; \ ;; \ esac; \ elif test $$? -ne 77; then \ all=`expr $$all + 1`; \ case " $(XFAIL_TESTS) " in \ *[\ \ ]$$tst[\ \ ]*) \ xfail=`expr $$xfail + 1`; \ col=$$lgn; res=XFAIL; \ ;; \ *) \ failed=`expr $$failed + 1`; \ col=$$red; res=FAIL; \ ;; \ esac; \ else \ skip=`expr $$skip + 1`; \ col=$$blu; res=SKIP; \ fi; \ echo "$${col}$$res$${std}: $$tst"; \ done; \ if test "$$all" -eq 1; then \ tests="test"; \ All=""; \ else \ tests="tests"; \ All="All "; \ fi; \ if test "$$failed" -eq 0; then \ if test "$$xfail" -eq 0; then \ banner="$$All$$all $$tests passed"; \ else \ if test "$$xfail" -eq 1; then failures=failure; else failures=failures; fi; \ banner="$$All$$all $$tests behaved as expected ($$xfail expected $$failures)"; \ fi; \ else \ if test "$$xpass" -eq 0; then \ banner="$$failed of $$all $$tests failed"; \ else \ if test "$$xpass" -eq 1; then passes=pass; else passes=passes; fi; \ banner="$$failed of $$all $$tests did not behave as expected ($$xpass unexpected $$passes)"; \ fi; \ fi; \ dashes="$$banner"; \ skipped=""; \ if test "$$skip" -ne 0; then \ if test "$$skip" -eq 1; then \ skipped="($$skip test was not run)"; \ else \ skipped="($$skip tests were not run)"; \ fi; \ test `echo "$$skipped" | wc -c` -le `echo "$$banner" | wc -c` || \ dashes="$$skipped"; \ fi; \ report=""; \ if test "$$failed" -ne 0 && test -n "$(PACKAGE_BUGREPORT)"; then \ report="Please report to $(PACKAGE_BUGREPORT)"; \ test `echo "$$report" | wc -c` -le `echo "$$banner" | wc -c` || \ dashes="$$report"; \ fi; \ dashes=`echo "$$dashes" | sed s/./=/g`; \ if test "$$failed" -eq 0; then \ echo "$$grn$$dashes"; \ else \ echo "$$red$$dashes"; \ fi; \ echo "$$banner"; \ test -z "$$skipped" || echo "$$skipped"; \ test -z "$$report" || echo "$$report"; \ echo "$$dashes$$std"; \ test "$$failed" -eq 0; \ else :; fi distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ test -d "$(distdir)/$$subdir" \ || $(MKDIR_P) "$(distdir)/$$subdir" \ || exit 1; \ fi; \ done @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ dir1=$$subdir; dir2="$(distdir)/$$subdir"; \ $(am__relativize); \ new_distdir=$$reldir; \ dir1=$$subdir; dir2="$(top_distdir)"; \ $(am__relativize); \ new_top_distdir=$$reldir; \ echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \ echo " am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \ ($(am__cd) $$subdir && \ $(MAKE) $(AM_MAKEFLAGS) \ top_distdir="$$new_top_distdir" \ distdir="$$new_distdir" \ am__remove_distdir=: \ am__skip_length_check=: \ am__skip_mode_fix=: \ distdir) \ || exit 1; \ fi; \ done check-am: all-am $(MAKE) $(AM_MAKEFLAGS) $(check_LIBRARIES) $(check_PROGRAMS) $(MAKE) $(AM_MAKEFLAGS) check-TESTS check: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) check-recursive all-am: Makefile $(LIBRARIES) $(PROGRAMS) $(HEADERS) installdirs: installdirs-recursive installdirs-am: install: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) install-recursive install-exec: install-exec-recursive install-data: install-data-recursive uninstall: uninstall-recursive install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-recursive install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: -test -z "$(MOSTLYCLEANFILES)" || rm -f $(MOSTLYCLEANFILES) clean-generic: -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES) distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) -test -z "$(DISTCLEANFILES)" || rm -f $(DISTCLEANFILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." -test -z "$(BUILT_SOURCES)" || rm -f $(BUILT_SOURCES) -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES) clean: clean-recursive clean-am: clean-checkLIBRARIES clean-checkPROGRAMS clean-generic \ clean-libtool clean-local clean-noinstLIBRARIES \ clean-noinstPROGRAMS mostlyclean-am distclean: distclean-recursive -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-recursive dvi-am: html: html-recursive html-am: info: info-recursive info-am: install-data-am: install-dvi: install-dvi-recursive install-dvi-am: install-exec-am: install-html: install-html-recursive install-html-am: install-info: install-info-recursive install-info-am: install-man: install-pdf: install-pdf-recursive install-pdf-am: install-ps: install-ps-recursive install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-recursive -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-recursive mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool mostlyclean-local pdf: pdf-recursive pdf-am: ps: ps-recursive ps-am: uninstall-am: .MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) all check \ check-am ctags-recursive install install-am install-strip \ tags-recursive .PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \ all all-am check check-TESTS check-am clean \ clean-checkLIBRARIES clean-checkPROGRAMS clean-generic \ clean-libtool clean-local clean-noinstLIBRARIES \ clean-noinstPROGRAMS ctags ctags-recursive distclean \ distclean-compile distclean-generic distclean-libtool \ distclean-tags distdir dvi dvi-am html html-am info info-am \ install install-am install-data install-data-am install-dvi \ install-dvi-am install-exec install-exec-am install-html \ install-html-am install-info install-info-am install-man \ install-pdf install-pdf-am install-ps install-ps-am \ install-strip installcheck installcheck-am installdirs \ installdirs-am maintainer-clean maintainer-clean-generic \ mostlyclean mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool mostlyclean-local pdf pdf-am ps ps-am tags \ tags-recursive uninstall uninstall-am # The arg-nonnull.h that gets inserted into generated .h files is the same as # build-aux/arg-nonnull.h, except that it has the copyright header cut off. arg-nonnull.h: $(top_srcdir)/./arg-nonnull.h $(AM_V_GEN)rm -f $@-t $@ && \ sed -n -e '/GL_ARG_NONNULL/,$$p' \ < $(top_srcdir)/./arg-nonnull.h \ > $@-t && \ mv $@-t $@ # We need the following in order to create when the system # doesn't have one that works with the given compiler. fcntl.h: fcntl.in.h $(WARN_ON_USE_H) $(ARG_NONNULL_H) $(AM_V_GEN)rm -f $@-t $@ && \ { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \ sed -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \ -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ -e 's|@''NEXT_FCNTL_H''@|$(NEXT_FCNTL_H)|g' \ -e 's|@''GNULIB_FCNTL''@|$(GNULIB_FCNTL)|g' \ -e 's|@''GNULIB_OPEN''@|$(GNULIB_OPEN)|g' \ -e 's|@''GNULIB_OPENAT''@|$(GNULIB_OPENAT)|g' \ -e 's|@''HAVE_FCNTL''@|$(HAVE_FCNTL)|g' \ -e 's|@''HAVE_OPENAT''@|$(HAVE_OPENAT)|g' \ -e 's|@''REPLACE_FCNTL''@|$(REPLACE_FCNTL)|g' \ -e 's|@''REPLACE_OPEN''@|$(REPLACE_OPEN)|g' \ -e 's|@''REPLACE_OPENAT''@|$(REPLACE_OPENAT)|g' \ -e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \ -e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)' \ < $(srcdir)/fcntl.in.h; \ } > $@-t && \ mv $@-t $@ # The warn-on-use.h that gets inserted into generated .h files is the same as # build-aux/warn-on-use.h, except that it has the copyright header cut off. warn-on-use.h: $(top_srcdir)/./warn-on-use.h $(AM_V_GEN)rm -f $@-t $@ && \ sed -n -e '/^.ifndef/,$$p' \ < $(top_srcdir)/./warn-on-use.h \ > $@-t && \ mv $@-t $@ # Clean up after Solaris cc. clean-local: rm -rf SunWS_cache mostlyclean-local: mostlyclean-generic @for dir in '' $(MOSTLYCLEANDIRS); do \ if test -n "$$dir" && test -d $$dir; then \ echo "rmdir $$dir"; rmdir $$dir; \ fi; \ done; \ : # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: libprelude-1.0.0/libmissing/tests/test-open.c0000664000076400007640000000214711341220441016152 00000000000000/* Test of opening a file descriptor. Copyright (C) 2007-2010 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 3 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, see . */ /* Written by Bruno Haible , 2007. */ #include #include #include "signature.h" SIGNATURE_CHECK (open, int, (char const *, int, ...)); #include #include #include #include #include "macros.h" #define BASE "test-open.t" #include "test-open.h" int main (void) { return test_open (open, true); } libprelude-1.0.0/libmissing/tests/test-math.c0000664000076400007640000000253711341220441016145 00000000000000/* Test of substitute. Copyright (C) 2007, 2008, 2009, 2010 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 3 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, see . */ /* Written by Bruno Haible , 2007. */ #include #include #ifndef NAN # error NAN should be defined choke me #endif #if 0 /* Check that NAN expands into a constant expression. */ static float n = NAN; #endif /* Compare two numbers with ==. This is a separate function because IRIX 6.5 "cc -O" miscompiles an 'x == x' test. */ static int numeric_equal (double x, double y) { return x == y; } int main (void) { double d = NAN; double zero = 0.0; if (numeric_equal (d, d)) return 1; d = HUGE_VAL; if (!numeric_equal (d, 1.0 / zero)) return 1; return 0; } libprelude-1.0.0/libmissing/tests/test-select-stdin.c0000664000076400007640000000424611341220442017612 00000000000000/* Test of select() substitute, reading from stdin. Copyright (C) 2008, 2009, 2010 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 3 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, see . */ /* Written by Bruno Haible , 2008. */ #include #include #include #include #include #include int main (void) { printf ("Applying select() from standard input. Press Ctrl-C to abort.\n"); for (;;) { struct timeval before; struct timeval after; unsigned long spent_usec; fd_set readfds; struct timeval timeout; int ret; gettimeofday (&before, NULL); FD_ZERO (&readfds); FD_SET (0, &readfds); timeout.tv_sec = 0; timeout.tv_usec = 500000; ret = select (1, &readfds, NULL, NULL, &timeout); gettimeofday (&after, NULL); spent_usec = (after.tv_sec - before.tv_sec) * 1000000 + after.tv_usec - before.tv_usec; if (ret < 0) { perror ("select failed"); exit (1); } if ((ret == 0) != ! FD_ISSET (0, &readfds)) { fprintf (stderr, "incorrect return value\n"); exit (1); } if (ret == 0) { if (spent_usec < 250000) { fprintf (stderr, "returned too early\n"); exit (1); } /* Timeout */ printf ("."); fflush (stdout); } else { char c; printf ("Input available! Trying to read 1 byte...\n"); read (0, &c, 1); } } } libprelude-1.0.0/libmissing/tests/test-stat.c0000664000076400007640000000313511341220442016163 00000000000000/* Tests of stat. Copyright (C) 2009, 2010 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 3 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, see . */ /* Written by Eric Blake , 2009. */ #include #include /* Caution: stat may be a function-like macro. Although this signature check must pass, it may be the signature of the real (and broken) stat rather than rpl_stat. Most code should not use the address of stat. */ #include "signature.h" SIGNATURE_CHECK (stat, int, (char const *, struct stat *)); #include #include #include #include #include #include "pathmax.h" #include "same-inode.h" #include "macros.h" #define BASE "test-stat.t" #include "test-stat.h" /* Wrapper around stat, which works even if stat is a function-like macro, where test_stat_func(stat) would do the wrong thing. */ static int do_stat (char const *name, struct stat *st) { return stat (name, st); } int main (void) { return test_stat_func (do_stat, true); } libprelude-1.0.0/libmissing/tests/wctob.c0000664000076400007640000000211111341220442015342 00000000000000/* Convert wide character to unibyte character. Copyright (C) 2008, 2009, 2010 Free Software Foundation, Inc. Written by Bruno Haible , 2008. 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 3 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, see . */ #include /* Specification. */ #include #include #include int wctob (wint_t wc) { char buf[64]; if (!(MB_CUR_MAX <= sizeof (buf))) abort (); if (wctomb (buf, wc) == 1) return (unsigned char) buf[0]; else return EOF; } libprelude-1.0.0/libmissing/tests/test-frexp.c0000664000076400007640000001206711341220441016337 00000000000000/* Test of splitting a double into fraction and mantissa. Copyright (C) 2007-2010 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 3 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, see . */ /* Written by Bruno Haible , 2007. */ #include #include #include "signature.h" SIGNATURE_CHECK (frexp, double, (double, int *)); #include #include "isnand-nolibm.h" #include "nan.h" #include "macros.h" /* Avoid some warnings from "gcc -Wshadow". This file doesn't use the exp() function. */ #undef exp #define exp exponent /* HP cc on HP-UX 10.20 has a bug with the constant expression -0.0. So we use -zero instead. */ double zero = 0.0; static double my_ldexp (double x, int d) { for (; d > 0; d--) x *= 2.0; for (; d < 0; d++) x *= 0.5; return x; } int main () { int i; /* The use of 'volatile' guarantees that excess precision bits are dropped when dealing with denormalized numbers. It is necessary on x86 systems where double-floats are not IEEE compliant by default, to avoid that the results become platform and compiler option dependent. 'volatile' is a portable alternative to gcc's -ffloat-store option. */ volatile double x; { /* NaN. */ int exp = -9999; double mantissa; x = NaNd (); mantissa = frexp (x, &exp); ASSERT (isnand (mantissa)); } { /* Positive infinity. */ int exp = -9999; double mantissa; x = 1.0 / 0.0; mantissa = frexp (x, &exp); ASSERT (mantissa == x); } { /* Negative infinity. */ int exp = -9999; double mantissa; x = -1.0 / 0.0; mantissa = frexp (x, &exp); ASSERT (mantissa == x); } { /* Positive zero. */ int exp = -9999; double mantissa; x = 0.0; mantissa = frexp (x, &exp); ASSERT (exp == 0); ASSERT (mantissa == x); ASSERT (!signbit (mantissa)); } { /* Negative zero. */ int exp = -9999; double mantissa; x = -zero; mantissa = frexp (x, &exp); ASSERT (exp == 0); ASSERT (mantissa == x); ASSERT (signbit (mantissa)); } for (i = 1, x = 1.0; i <= DBL_MAX_EXP; i++, x *= 2.0) { int exp = -9999; double mantissa = frexp (x, &exp); ASSERT (exp == i); ASSERT (mantissa == 0.5); } for (i = 1, x = 1.0; i >= DBL_MIN_EXP; i--, x *= 0.5) { int exp = -9999; double mantissa = frexp (x, &exp); ASSERT (exp == i); ASSERT (mantissa == 0.5); } for (; i >= DBL_MIN_EXP - 100 && x > 0.0; i--, x *= 0.5) { int exp = -9999; double mantissa = frexp (x, &exp); ASSERT (exp == i); ASSERT (mantissa == 0.5); } for (i = 1, x = -1.0; i <= DBL_MAX_EXP; i++, x *= 2.0) { int exp = -9999; double mantissa = frexp (x, &exp); ASSERT (exp == i); ASSERT (mantissa == -0.5); } for (i = 1, x = -1.0; i >= DBL_MIN_EXP; i--, x *= 0.5) { int exp = -9999; double mantissa = frexp (x, &exp); ASSERT (exp == i); ASSERT (mantissa == -0.5); } for (; i >= DBL_MIN_EXP - 100 && x < 0.0; i--, x *= 0.5) { int exp = -9999; double mantissa = frexp (x, &exp); ASSERT (exp == i); ASSERT (mantissa == -0.5); } for (i = 1, x = 1.01; i <= DBL_MAX_EXP; i++, x *= 2.0) { int exp = -9999; double mantissa = frexp (x, &exp); ASSERT (exp == i); ASSERT (mantissa == 0.505); } for (i = 1, x = 1.01; i >= DBL_MIN_EXP; i--, x *= 0.5) { int exp = -9999; double mantissa = frexp (x, &exp); ASSERT (exp == i); ASSERT (mantissa == 0.505); } for (; i >= DBL_MIN_EXP - 100 && x > 0.0; i--, x *= 0.5) { int exp = -9999; double mantissa = frexp (x, &exp); ASSERT (exp == i); ASSERT (mantissa >= 0.5); ASSERT (mantissa < 1.0); ASSERT (mantissa == my_ldexp (x, - exp)); } for (i = 1, x = 1.73205; i <= DBL_MAX_EXP; i++, x *= 2.0) { int exp = -9999; double mantissa = frexp (x, &exp); ASSERT (exp == i); ASSERT (mantissa == 0.866025); } for (i = 1, x = 1.73205; i >= DBL_MIN_EXP; i--, x *= 0.5) { int exp = -9999; double mantissa = frexp (x, &exp); ASSERT (exp == i); ASSERT (mantissa == 0.866025); } for (; i >= DBL_MIN_EXP - 100 && x > 0.0; i--, x *= 0.5) { int exp = -9999; double mantissa = frexp (x, &exp); ASSERT (exp == i || exp == i + 1); ASSERT (mantissa >= 0.5); ASSERT (mantissa < 1.0); ASSERT (mantissa == my_ldexp (x, - exp)); } return 0; } libprelude-1.0.0/libmissing/tests/test-symlink.c0000664000076400007640000000242311341220442016675 00000000000000/* Tests of symlink. Copyright (C) 2009, 2010 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 3 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, see . */ /* Written by Eric Blake , 2009. */ #include #include #include "signature.h" SIGNATURE_CHECK (symlink, int, (char const *, char const *)); #include #include #include #include #include #include #include "ignore-value.h" #include "macros.h" #define BASE "test-symlink.t" #include "test-symlink.h" int main (void) { /* Remove any leftovers from a previous partial run. */ ignore_value (system ("rm -rf " BASE "*")); return test_symlink (symlink, true); } libprelude-1.0.0/libmissing/tests/test-nl_langinfo.c0000664000076400007640000001041511341220441017474 00000000000000/* Test of nl_langinfo replacement. Copyright (C) 2009, 2010 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 3 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, see . */ /* Written by Bruno Haible , 2009. */ #include #include #include "signature.h" SIGNATURE_CHECK (nl_langinfo, char *, (nl_item)); #include #include #include #include "c-strcase.h" #include "macros.h" int main (int argc, char *argv[]) { int pass = atoi (argv[1]); /* pass locale 0 C 1 traditional French locale 2 French UTF-8 locale */ setlocale (LC_ALL, ""); /* nl_langinfo items of the LC_CTYPE category */ ASSERT (strlen (nl_langinfo (CODESET)) > 0); if (pass == 2) { const char *codeset = nl_langinfo (CODESET); ASSERT (c_strcasecmp (codeset, "UTF-8") == 0 || c_strcasecmp (codeset, "UTF8") == 0); } /* nl_langinfo items of the LC_NUMERIC category */ ASSERT (strlen (nl_langinfo (RADIXCHAR)) > 0); ASSERT (strlen (nl_langinfo (THOUSEP)) >= 0); /* nl_langinfo items of the LC_TIME category */ ASSERT (strlen (nl_langinfo (D_T_FMT)) > 0); ASSERT (strlen (nl_langinfo (D_FMT)) > 0); ASSERT (strlen (nl_langinfo (T_FMT)) > 0); ASSERT (strlen (nl_langinfo (T_FMT_AMPM)) >= (pass == 0 ? 1 : 0)); ASSERT (strlen (nl_langinfo (AM_STR)) >= (pass == 0 ? 1 : 0)); ASSERT (strlen (nl_langinfo (PM_STR)) >= (pass == 0 ? 1 : 0)); ASSERT (strlen (nl_langinfo (DAY_1)) > 0); ASSERT (strlen (nl_langinfo (DAY_2)) > 0); ASSERT (strlen (nl_langinfo (DAY_3)) > 0); ASSERT (strlen (nl_langinfo (DAY_4)) > 0); ASSERT (strlen (nl_langinfo (DAY_5)) > 0); ASSERT (strlen (nl_langinfo (DAY_6)) > 0); ASSERT (strlen (nl_langinfo (DAY_7)) > 0); ASSERT (strlen (nl_langinfo (ABDAY_1)) > 0); ASSERT (strlen (nl_langinfo (ABDAY_2)) > 0); ASSERT (strlen (nl_langinfo (ABDAY_3)) > 0); ASSERT (strlen (nl_langinfo (ABDAY_4)) > 0); ASSERT (strlen (nl_langinfo (ABDAY_5)) > 0); ASSERT (strlen (nl_langinfo (ABDAY_6)) > 0); ASSERT (strlen (nl_langinfo (ABDAY_7)) > 0); ASSERT (strlen (nl_langinfo (MON_1)) > 0); ASSERT (strlen (nl_langinfo (MON_2)) > 0); ASSERT (strlen (nl_langinfo (MON_3)) > 0); ASSERT (strlen (nl_langinfo (MON_4)) > 0); ASSERT (strlen (nl_langinfo (MON_5)) > 0); ASSERT (strlen (nl_langinfo (MON_6)) > 0); ASSERT (strlen (nl_langinfo (MON_7)) > 0); ASSERT (strlen (nl_langinfo (MON_8)) > 0); ASSERT (strlen (nl_langinfo (MON_9)) > 0); ASSERT (strlen (nl_langinfo (MON_10)) > 0); ASSERT (strlen (nl_langinfo (MON_11)) > 0); ASSERT (strlen (nl_langinfo (MON_12)) > 0); ASSERT (strlen (nl_langinfo (ABMON_1)) > 0); ASSERT (strlen (nl_langinfo (ABMON_2)) > 0); ASSERT (strlen (nl_langinfo (ABMON_3)) > 0); ASSERT (strlen (nl_langinfo (ABMON_4)) > 0); ASSERT (strlen (nl_langinfo (ABMON_5)) > 0); ASSERT (strlen (nl_langinfo (ABMON_6)) > 0); ASSERT (strlen (nl_langinfo (ABMON_7)) > 0); ASSERT (strlen (nl_langinfo (ABMON_8)) > 0); ASSERT (strlen (nl_langinfo (ABMON_9)) > 0); ASSERT (strlen (nl_langinfo (ABMON_10)) > 0); ASSERT (strlen (nl_langinfo (ABMON_11)) > 0); ASSERT (strlen (nl_langinfo (ABMON_12)) > 0); ASSERT (strlen (nl_langinfo (ERA)) >= 0); ASSERT (strlen (nl_langinfo (ERA_D_FMT)) >= 0); ASSERT (strlen (nl_langinfo (ERA_D_T_FMT)) >= 0); ASSERT (strlen (nl_langinfo (ERA_T_FMT)) >= 0); ASSERT (nl_langinfo (ALT_DIGITS) != NULL); /* nl_langinfo items of the LC_MONETARY category */ { const char *currency = nl_langinfo (CRNCYSTR); ASSERT (strlen (currency) >= (pass > 0 ? 1 : 0)); } /* nl_langinfo items of the LC_MESSAGES category */ ASSERT (strlen (nl_langinfo (YESEXPR)) > 0); ASSERT (strlen (nl_langinfo (NOEXPR)) > 0); return 0; } libprelude-1.0.0/libmissing/tests/test-strings.c0000664000076400007640000000155411341220442016704 00000000000000/* Test of substitute. Copyright (C) 2007, 2009, 2010 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 3 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, see . */ /* Written by Bruno Haible , 2007. */ #include #include int main () { return 0; } libprelude-1.0.0/libmissing/tests/lstat.c0000664000076400007640000000616711341220440015370 00000000000000/* Work around a bug of lstat on some systems Copyright (C) 1997-2006, 2008-2010 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 3 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, see . */ /* written by Jim Meyering */ #include #if !HAVE_LSTAT /* On systems that lack symlinks, our replacement already defined lstat as stat, so there is nothing further to do other than avoid an empty file. */ typedef int dummy; #else /* HAVE_LSTAT */ /* Get the original definition of lstat. It might be defined as a macro. */ # define __need_system_sys_stat_h # include # include # undef __need_system_sys_stat_h static inline int orig_lstat (const char *filename, struct stat *buf) { return lstat (filename, buf); } /* Specification. */ # include # include # include /* lstat works differently on Linux and Solaris systems. POSIX (see `pathname resolution' in the glossary) requires that programs like `ls' take into consideration the fact that FILE has a trailing slash when FILE is a symbolic link. On Linux and Solaris 10 systems, the lstat function already has the desired semantics (in treating `lstat ("symlink/", sbuf)' just like `lstat ("symlink/.", sbuf)', but on Solaris 9 and earlier it does not. If FILE has a trailing slash and specifies a symbolic link, then use stat() to get more info on the referent of FILE. If the referent is a non-directory, then set errno to ENOTDIR and return -1. Otherwise, return stat's result. */ int rpl_lstat (const char *file, struct stat *sbuf) { size_t len; int lstat_result = orig_lstat (file, sbuf); if (lstat_result != 0) return lstat_result; /* This replacement file can blindly check against '/' rather than using the ISSLASH macro, because all platforms with '\\' either lack symlinks (mingw) or have working lstat (cygwin) and thus do not compile this file. 0 len should have already been filtered out above, with a failure return of ENOENT. */ len = strlen (file); if (file[len - 1] != '/' || S_ISDIR (sbuf->st_mode)) return 0; /* At this point, a trailing slash is only permitted on symlink-to-dir; but it should have found information on the directory, not the symlink. Call stat() to get info about the link's referent. Our replacement stat guarantees valid results, even if the symlink is not pointing to a directory. */ if (!S_ISLNK (sbuf->st_mode)) { errno = ENOTDIR; return -1; } return stat (file, sbuf); } #endif /* HAVE_LSTAT */ libprelude-1.0.0/libmissing/tests/test-errno.c0000664000076400007640000000550011341220441016332 00000000000000/* Test of substitute. Copyright (C) 2008, 2009, 2010 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 3 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, see . */ /* Written by Bruno Haible , 2008. */ #include #include /* Verify that the POSIX mandated errno values exist and can be used as initializers outside of a function. The variable names happen to match the Linux/x86 error numbers. */ int e1 = EPERM; int e2 = ENOENT; int e3 = ESRCH; int e4 = EINTR; int e5 = EIO; int e6 = ENXIO; int e7 = E2BIG; int e8 = ENOEXEC; int e9 = EBADF; int e10 = ECHILD; int e11 = EAGAIN; int e11a = EWOULDBLOCK; int e12 = ENOMEM; int e13 = EACCES; int e14 = EFAULT; int e16 = EBUSY; int e17 = EEXIST; int e18 = EXDEV; int e19 = ENODEV; int e20 = ENOTDIR; int e21 = EISDIR; int e22 = EINVAL; int e23 = ENFILE; int e24 = EMFILE; int e25 = ENOTTY; int e26 = ETXTBSY; int e27 = EFBIG; int e28 = ENOSPC; int e29 = ESPIPE; int e30 = EROFS; int e31 = EMLINK; int e32 = EPIPE; int e33 = EDOM; int e34 = ERANGE; int e35 = EDEADLK; int e36 = ENAMETOOLONG; int e37 = ENOLCK; int e38 = ENOSYS; int e39 = ENOTEMPTY; int e40 = ELOOP; int e42 = ENOMSG; int e43 = EIDRM; int e67 = ENOLINK; int e71 = EPROTO; int e72 = EMULTIHOP; int e74 = EBADMSG; int e75 = EOVERFLOW; int e84 = EILSEQ; int e88 = ENOTSOCK; int e89 = EDESTADDRREQ; int e90 = EMSGSIZE; int e91 = EPROTOTYPE; int e92 = ENOPROTOOPT; int e93 = EPROTONOSUPPORT; int e95 = EOPNOTSUPP; int e95a = ENOTSUP; int e97 = EAFNOSUPPORT; int e98 = EADDRINUSE; int e99 = EADDRNOTAVAIL; int e100 = ENETDOWN; int e101 = ENETUNREACH; int e102 = ENETRESET; int e103 = ECONNABORTED; int e104 = ECONNRESET; int e105 = ENOBUFS; int e106 = EISCONN; int e107 = ENOTCONN; int e110 = ETIMEDOUT; int e111 = ECONNREFUSED; int e113 = EHOSTUNREACH; int e114 = EALREADY; int e115 = EINPROGRESS; int e116 = ESTALE; int e122 = EDQUOT; int e125 = ECANCELED; /* Don't verify that these errno values are all different, except for possibly EWOULDBLOCK == EAGAIN. Even Linux/x86 does not pass this check: it has ENOTSUP == EOPNOTSUPP. */ int main () { /* Verify that errno can be assigned. */ errno = EOVERFLOW; /* snprintf() callers want to distinguish EINVAL and EOVERFLOW. */ if (errno == EINVAL) return 1; return 0; } libprelude-1.0.0/libmissing/tests/test-mbrtowc4.sh0000775000076400007640000000060211341220441017137 00000000000000#!/bin/sh # Test whether a specific GB18030 locale is installed. : ${LOCALE_ZH_CN=zh_CN.GB18030} if test $LOCALE_ZH_CN = none; then if test -f /usr/bin/localedef; then echo "Skipping test: no transitional chinese locale is installed" else echo "Skipping test: no transitional chinese locale is supported" fi exit 77 fi LC_ALL=$LOCALE_ZH_CN \ ./test-mbrtowc${EXEEXT} 4 libprelude-1.0.0/libmissing/tests/test-fseeko.sh0000775000076400007640000000017311341220441016655 00000000000000#!/bin/sh ./test-fseeko${EXEEXT} 1 < "$srcdir/test-fseeko.sh" || exit 1 echo hi | ./test-fseeko${EXEEXT} || exit 1 exit 0 libprelude-1.0.0/libmissing/tests/test-fseeko2.sh0000775000076400007640000000010711341220441016734 00000000000000#!/bin/sh exec ./test-fseeko${EXEEXT} 1 2 < "$srcdir/test-fseeko2.sh" libprelude-1.0.0/libmissing/tests/test-c-ctype.c0000664000076400007640000002605311341220441016557 00000000000000/* Test of character handling in C locale. Copyright (C) 2005, 2007-2010 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 3 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, see . */ /* Written by Bruno Haible , 2005. */ #include #include "c-ctype.h" #include #include "macros.h" static void test_all (void) { int c; for (c = -0x80; c < 0x100; c++) { ASSERT (c_isascii (c) == (c >= 0 && c < 0x80)); switch (c) { case 'A': case 'B': case 'C': case 'D': case 'E': case 'F': case 'G': case 'H': case 'I': case 'J': case 'K': case 'L': case 'M': case 'N': case 'O': case 'P': case 'Q': case 'R': case 'S': case 'T': case 'U': case 'V': case 'W': case 'X': case 'Y': case 'Z': case 'a': case 'b': case 'c': case 'd': case 'e': case 'f': case 'g': case 'h': case 'i': case 'j': case 'k': case 'l': case 'm': case 'n': case 'o': case 'p': case 'q': case 'r': case 's': case 't': case 'u': case 'v': case 'w': case 'x': case 'y': case 'z': case '0': case '1': case '2': case '3': case '4': case '5': case '6': case '7': case '8': case '9': ASSERT (c_isalnum (c) == 1); break; default: ASSERT (c_isalnum (c) == 0); break; } switch (c) { case 'A': case 'B': case 'C': case 'D': case 'E': case 'F': case 'G': case 'H': case 'I': case 'J': case 'K': case 'L': case 'M': case 'N': case 'O': case 'P': case 'Q': case 'R': case 'S': case 'T': case 'U': case 'V': case 'W': case 'X': case 'Y': case 'Z': case 'a': case 'b': case 'c': case 'd': case 'e': case 'f': case 'g': case 'h': case 'i': case 'j': case 'k': case 'l': case 'm': case 'n': case 'o': case 'p': case 'q': case 'r': case 's': case 't': case 'u': case 'v': case 'w': case 'x': case 'y': case 'z': ASSERT (c_isalpha (c) == 1); break; default: ASSERT (c_isalpha (c) == 0); break; } switch (c) { case '\t': case ' ': ASSERT (c_isblank (c) == 1); break; default: ASSERT (c_isblank (c) == 0); break; } ASSERT (c_iscntrl (c) == ((c >= 0 && c < 0x20) || c == 0x7f)); switch (c) { case '0': case '1': case '2': case '3': case '4': case '5': case '6': case '7': case '8': case '9': ASSERT (c_isdigit (c) == 1); break; default: ASSERT (c_isdigit (c) == 0); break; } switch (c) { case 'a': case 'b': case 'c': case 'd': case 'e': case 'f': case 'g': case 'h': case 'i': case 'j': case 'k': case 'l': case 'm': case 'n': case 'o': case 'p': case 'q': case 'r': case 's': case 't': case 'u': case 'v': case 'w': case 'x': case 'y': case 'z': ASSERT (c_islower (c) == 1); break; default: ASSERT (c_islower (c) == 0); break; } ASSERT (c_isgraph (c) == ((c >= 0x20 && c < 0x7f) && c != ' ')); ASSERT (c_isprint (c) == (c >= 0x20 && c < 0x7f)); ASSERT (c_ispunct (c) == (c_isgraph (c) && !c_isalnum (c))); switch (c) { case ' ': case '\t': case '\n': case '\v': case '\f': case '\r': ASSERT (c_isspace (c) == 1); break; default: ASSERT (c_isspace (c) == 0); break; } switch (c) { case 'A': case 'B': case 'C': case 'D': case 'E': case 'F': case 'G': case 'H': case 'I': case 'J': case 'K': case 'L': case 'M': case 'N': case 'O': case 'P': case 'Q': case 'R': case 'S': case 'T': case 'U': case 'V': case 'W': case 'X': case 'Y': case 'Z': ASSERT (c_isupper (c) == 1); break; default: ASSERT (c_isupper (c) == 0); break; } switch (c) { case '0': case '1': case '2': case '3': case '4': case '5': case '6': case '7': case '8': case '9': case 'A': case 'B': case 'C': case 'D': case 'E': case 'F': case 'a': case 'b': case 'c': case 'd': case 'e': case 'f': ASSERT (c_isxdigit (c) == 1); break; default: ASSERT (c_isxdigit (c) == 0); break; } switch (c) { case 'A': ASSERT (c_tolower (c) == 'a'); ASSERT (c_toupper (c) == c); break; case 'B': ASSERT (c_tolower (c) == 'b'); ASSERT (c_toupper (c) == c); break; case 'C': ASSERT (c_tolower (c) == 'c'); ASSERT (c_toupper (c) == c); break; case 'D': ASSERT (c_tolower (c) == 'd'); ASSERT (c_toupper (c) == c); break; case 'E': ASSERT (c_tolower (c) == 'e'); ASSERT (c_toupper (c) == c); break; case 'F': ASSERT (c_tolower (c) == 'f'); ASSERT (c_toupper (c) == c); break; case 'G': ASSERT (c_tolower (c) == 'g'); ASSERT (c_toupper (c) == c); break; case 'H': ASSERT (c_tolower (c) == 'h'); ASSERT (c_toupper (c) == c); break; case 'I': ASSERT (c_tolower (c) == 'i'); ASSERT (c_toupper (c) == c); break; case 'J': ASSERT (c_tolower (c) == 'j'); ASSERT (c_toupper (c) == c); break; case 'K': ASSERT (c_tolower (c) == 'k'); ASSERT (c_toupper (c) == c); break; case 'L': ASSERT (c_tolower (c) == 'l'); ASSERT (c_toupper (c) == c); break; case 'M': ASSERT (c_tolower (c) == 'm'); ASSERT (c_toupper (c) == c); break; case 'N': ASSERT (c_tolower (c) == 'n'); ASSERT (c_toupper (c) == c); break; case 'O': ASSERT (c_tolower (c) == 'o'); ASSERT (c_toupper (c) == c); break; case 'P': ASSERT (c_tolower (c) == 'p'); ASSERT (c_toupper (c) == c); break; case 'Q': ASSERT (c_tolower (c) == 'q'); ASSERT (c_toupper (c) == c); break; case 'R': ASSERT (c_tolower (c) == 'r'); ASSERT (c_toupper (c) == c); break; case 'S': ASSERT (c_tolower (c) == 's'); ASSERT (c_toupper (c) == c); break; case 'T': ASSERT (c_tolower (c) == 't'); ASSERT (c_toupper (c) == c); break; case 'U': ASSERT (c_tolower (c) == 'u'); ASSERT (c_toupper (c) == c); break; case 'V': ASSERT (c_tolower (c) == 'v'); ASSERT (c_toupper (c) == c); break; case 'W': ASSERT (c_tolower (c) == 'w'); ASSERT (c_toupper (c) == c); break; case 'X': ASSERT (c_tolower (c) == 'x'); ASSERT (c_toupper (c) == c); break; case 'Y': ASSERT (c_tolower (c) == 'y'); ASSERT (c_toupper (c) == c); break; case 'Z': ASSERT (c_tolower (c) == 'z'); ASSERT (c_toupper (c) == c); break; case 'a': ASSERT (c_tolower (c) == c); ASSERT (c_toupper (c) == 'A'); break; case 'b': ASSERT (c_tolower (c) == c); ASSERT (c_toupper (c) == 'B'); break; case 'c': ASSERT (c_tolower (c) == c); ASSERT (c_toupper (c) == 'C'); break; case 'd': ASSERT (c_tolower (c) == c); ASSERT (c_toupper (c) == 'D'); break; case 'e': ASSERT (c_tolower (c) == c); ASSERT (c_toupper (c) == 'E'); break; case 'f': ASSERT (c_tolower (c) == c); ASSERT (c_toupper (c) == 'F'); break; case 'g': ASSERT (c_tolower (c) == c); ASSERT (c_toupper (c) == 'G'); break; case 'h': ASSERT (c_tolower (c) == c); ASSERT (c_toupper (c) == 'H'); break; case 'i': ASSERT (c_tolower (c) == c); ASSERT (c_toupper (c) == 'I'); break; case 'j': ASSERT (c_tolower (c) == c); ASSERT (c_toupper (c) == 'J'); break; case 'k': ASSERT (c_tolower (c) == c); ASSERT (c_toupper (c) == 'K'); break; case 'l': ASSERT (c_tolower (c) == c); ASSERT (c_toupper (c) == 'L'); break; case 'm': ASSERT (c_tolower (c) == c); ASSERT (c_toupper (c) == 'M'); break; case 'n': ASSERT (c_tolower (c) == c); ASSERT (c_toupper (c) == 'N'); break; case 'o': ASSERT (c_tolower (c) == c); ASSERT (c_toupper (c) == 'O'); break; case 'p': ASSERT (c_tolower (c) == c); ASSERT (c_toupper (c) == 'P'); break; case 'q': ASSERT (c_tolower (c) == c); ASSERT (c_toupper (c) == 'Q'); break; case 'r': ASSERT (c_tolower (c) == c); ASSERT (c_toupper (c) == 'R'); break; case 's': ASSERT (c_tolower (c) == c); ASSERT (c_toupper (c) == 'S'); break; case 't': ASSERT (c_tolower (c) == c); ASSERT (c_toupper (c) == 'T'); break; case 'u': ASSERT (c_tolower (c) == c); ASSERT (c_toupper (c) == 'U'); break; case 'v': ASSERT (c_tolower (c) == c); ASSERT (c_toupper (c) == 'V'); break; case 'w': ASSERT (c_tolower (c) == c); ASSERT (c_toupper (c) == 'W'); break; case 'x': ASSERT (c_tolower (c) == c); ASSERT (c_toupper (c) == 'X'); break; case 'y': ASSERT (c_tolower (c) == c); ASSERT (c_toupper (c) == 'Y'); break; case 'z': ASSERT (c_tolower (c) == c); ASSERT (c_toupper (c) == 'Z'); break; default: ASSERT (c_tolower (c) == c); ASSERT (c_toupper (c) == c); break; } } } int main () { test_all (); setlocale (LC_ALL, "de_DE"); test_all (); setlocale (LC_ALL, "ja_JP.EUC-JP"); test_all (); return 0; } libprelude-1.0.0/libmissing/tests/test-snprintf.c0000664000076400007640000000333711341220442017057 00000000000000/* Test of snprintf() function. Copyright (C) 2007-2010 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 3 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, see . */ /* Written by Bruno Haible , 2007. */ #include #include #include "signature.h" SIGNATURE_CHECK (snprintf, int, (char *, size_t, char const *, ...)); #include #include "macros.h" int main (int argc, char *argv[]) { char buf[8]; int size; int retval; for (size = 0; size <= 8; size++) { memcpy (buf, "DEADBEEF", 8); retval = snprintf (buf, size, "%d", 12345); if (size < 6) { #if CHECK_SNPRINTF_POSIX ASSERT (retval < 0 || retval >= size); #endif if (size > 0) { ASSERT (memcmp (buf, "12345", size - 1) == 0); ASSERT (buf[size - 1] == '\0' || buf[size - 1] == '0' + size); } #if !CHECK_SNPRINTF_POSIX if (size > 0) #endif ASSERT (memcmp (buf + size, "DEADBEEF" + size, 8 - size) == 0); } else { ASSERT (retval == 5); ASSERT (memcmp (buf, "12345\0EF", 8) == 0); } } return 0; } libprelude-1.0.0/libmissing/tests/test-sockets.c0000664000076400007640000000217211341220442016663 00000000000000/* * Copyright (C) 2008, 2009, 2010 Free Software Foundation, Inc. * Written by Simon Josefsson. * * 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 3 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, see . */ #include #include #include "sockets.h" int main (void) { int err; err = gl_sockets_startup (SOCKETS_1_1); if (err != 0) { printf ("wsastartup failed %d\n", err); return 1; } err = gl_sockets_cleanup (); if (err != 0) { printf ("wsacleanup failed %d\n", err); return 1; } (void) gl_fd_to_handle (0); return 0; } libprelude-1.0.0/libmissing/tests/test-getaddrinfo.c0000664000076400007640000001171111341220441017474 00000000000000/* Test the getaddrinfo module. Copyright (C) 2006-2010 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 3 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, see . */ /* Written by Simon Josefsson. */ #include #include #include "signature.h" SIGNATURE_CHECK (freeaddrinfo, void, (struct addrinfo *)); SIGNATURE_CHECK (gai_strerror, char const *, (int)); SIGNATURE_CHECK (getaddrinfo, int, (char const *, char const *, struct addrinfo const *, struct addrinfo **)); #include #include #include #include #include /* Whether to print debugging messages. */ #define ENABLE_DEBUGGING 0 #if ENABLE_DEBUGGING # define dbgprintf printf #else # define dbgprintf if (0) printf #endif /* BeOS does not have AF_UNSPEC. */ #ifndef AF_UNSPEC # define AF_UNSPEC 0 #endif #ifndef EAI_SERVICE # define EAI_SERVICE 0 #endif static int simple (char const *host, char const *service) { char buf[BUFSIZ]; static int skip = 0; struct addrinfo hints; struct addrinfo *ai0, *ai; int res; int err; /* Once we skipped the test, do not try anything else */ if (skip) return 0; dbgprintf ("Finding %s service %s...\n", host, service); /* This initializes "hints" but does not use it. Is there a reason for this? If so, please fix this comment. */ memset (&hints, 0, sizeof (hints)); hints.ai_flags = AI_CANONNAME; hints.ai_family = AF_UNSPEC; hints.ai_socktype = SOCK_STREAM; res = getaddrinfo (host, service, 0, &ai0); err = errno; dbgprintf ("res %d: %s\n", res, gai_strerror (res)); if (res != 0) { /* EAI_AGAIN is returned if no network is available. Don't fail the test merely because someone is down the country on their in-law's farm. */ if (res == EAI_AGAIN) { skip++; fprintf (stderr, "skipping getaddrinfo test: no network?\n"); return 77; } /* IRIX reports EAI_NONAME for "https". Don't fail the test merely because of this. */ if (res == EAI_NONAME) return 0; /* Solaris reports EAI_SERVICE for "http" and "https". Don't fail the test merely because of this. */ if (res == EAI_SERVICE) return 0; #ifdef EAI_NODATA /* AIX reports EAI_NODATA for "https". Don't fail the test merely because of this. */ if (res == EAI_NODATA) return 0; #endif /* Provide details if errno was set. */ if (res == EAI_SYSTEM) dbgprintf ("system error: %s\n", strerror (err)); return 1; } for (ai = ai0; ai; ai = ai->ai_next) { dbgprintf ("\tflags %x\n", ai->ai_flags); dbgprintf ("\tfamily %x\n", ai->ai_family); dbgprintf ("\tsocktype %x\n", ai->ai_socktype); dbgprintf ("\tprotocol %x\n", ai->ai_protocol); dbgprintf ("\taddrlen %ld: ", (unsigned long) ai->ai_addrlen); dbgprintf ("\tFound %s\n", inet_ntop (ai->ai_family, &((struct sockaddr_in *) ai->ai_addr)->sin_addr, buf, sizeof (buf) - 1)); if (ai->ai_canonname) dbgprintf ("\tFound %s...\n", ai->ai_canonname); { char ipbuf[BUFSIZ]; char portbuf[BUFSIZ]; res = getnameinfo (ai->ai_addr, ai->ai_addrlen, ipbuf, sizeof (ipbuf) - 1, portbuf, sizeof (portbuf) - 1, NI_NUMERICHOST|NI_NUMERICSERV); dbgprintf ("\t\tgetnameinfo %d: %s\n", res, gai_strerror (res)); if (res == 0) { dbgprintf ("\t\tip %s\n", ipbuf); dbgprintf ("\t\tport %s\n", portbuf); } } } freeaddrinfo (ai0); return 0; } #define HOST1 "www.gnu.org" #define SERV1 "http" #define HOST2 "www.ibm.com" #define SERV2 "https" #define HOST3 "microsoft.com" #define SERV3 "http" #define HOST4 "google.org" #define SERV4 "ldap" int main (void) { #if _WIN32 { WORD requested; WSADATA data; int err; requested = MAKEWORD (1, 1); err = WSAStartup (requested, &data); if (err != 0) return 1; if (data.wVersion < requested) { WSACleanup (); return 2; } } #endif return simple (HOST1, SERV1) + simple (HOST2, SERV2) + simple (HOST3, SERV3) + simple (HOST4, SERV4); } libprelude-1.0.0/libmissing/tests/test-binary-io.c0000664000076400007640000000313611341220440017100 00000000000000/* Test of binary mode I/O. Copyright (C) 2005, 2007-2010 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 3 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, see . */ /* Written by Bruno Haible , 2005. */ #include #include "binary-io.h" #include #include #include #include #include #include #include "macros.h" int main () { /* Test the O_BINARY macro. */ { int fd = open ("t-bin-out2.tmp", O_CREAT | O_TRUNC | O_RDWR | O_BINARY, 0600); if (write (fd, "Hello\n", 6) < 0) exit (1); close (fd); } { struct stat statbuf; if (stat ("t-bin-out2.tmp", &statbuf) < 0) exit (1); ASSERT (statbuf.st_size == 6); } unlink ("t-bin-out2.tmp"); /* Test the SET_BINARY macro. */ SET_BINARY (1); fputs ("Hello\n", stdout); fclose (stdout); fclose (stderr); { struct stat statbuf; if (stat ("t-bin-out1.tmp", &statbuf) < 0) exit (1); ASSERT (statbuf.st_size == 6); } return 0; } libprelude-1.0.0/libmissing/tests/test-vsnprintf.c0000664000076400007640000000371411341220442017244 00000000000000/* Test of vsnprintf() function. Copyright (C) 2007-2010 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 3 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, see . */ /* Written by Bruno Haible , 2007. */ #include #include #include "signature.h" SIGNATURE_CHECK (vsnprintf, int, (char *, size_t, char const *, va_list)); #include #include #include "macros.h" static int my_snprintf (char *buf, int size, const char *format, ...) { va_list args; int ret; va_start (args, format); ret = vsnprintf (buf, size, format, args); va_end (args); return ret; } int main (int argc, char *argv[]) { char buf[8]; int size; int retval; for (size = 0; size <= 8; size++) { memcpy (buf, "DEADBEEF", 8); retval = my_snprintf (buf, size, "%d", 12345); if (size < 6) { #if CHECK_VSNPRINTF_POSIX ASSERT (retval < 0 || retval >= size); #endif if (size > 0) { ASSERT (memcmp (buf, "12345", size - 1) == 0); ASSERT (buf[size - 1] == '\0' || buf[size - 1] == '0' + size); } #if !CHECK_VSNPRINTF_POSIX if (size > 0) #endif ASSERT (memcmp (buf + size, "DEADBEEF" + size, 8 - size) == 0); } else { ASSERT (retval == 5); ASSERT (memcmp (buf, "12345\0EF", 8) == 0); } } return 0; } libprelude-1.0.0/libmissing/tests/test-sys_socket.c0000664000076400007640000000244511341220442017401 00000000000000/* Test of substitute. Copyright (C) 2007, 2009, 2010 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 3 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, see . */ /* Written by Bruno Haible , 2007. */ #include #include #include #if HAVE_SHUTDOWN /* Check some integer constant expressions. */ int a[] = { SHUT_RD, SHUT_WR, SHUT_RDWR }; #endif int main (void) { struct sockaddr_storage x; sa_family_t i; /* Check some errno values. */ switch (0) { case ENOTSOCK: case EADDRINUSE: case ENETRESET: case ECONNABORTED: case ECONNRESET: case ENOTCONN: case ESHUTDOWN: break; } x.ss_family = 42; i = 42; return 0; } libprelude-1.0.0/libmissing/tests/test-strcasestr.c0000664000076400007640000000773511341220442017417 00000000000000/* Test of case-insensitive searching in a string. Copyright (C) 2007, 2008, 2009, 2010 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 3 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, see . */ /* Written by Bruno Haible , 2007. */ #include #include #include "signature.h" SIGNATURE_CHECK (strcasestr, char *, (char const *, char const *)); #include #include #include #include "macros.h" int main () { #if HAVE_DECL_ALARM /* Declare failure if test takes too long, by using default abort caused by SIGALRM. All known platforms that lack alarm also lack strcasestr, and the replacement strcasestr is known to not take too long. */ signal (SIGALRM, SIG_DFL); alarm (50); #endif { const char input[] = "foo"; const char *result = strcasestr (input, ""); ASSERT (result == input); } { const char input[] = "foo"; const char *result = strcasestr (input, "O"); ASSERT (result == input + 1); } { const char input[] = "ABC ABCDAB ABCDABCDABDE"; const char *result = strcasestr (input, "ABCDaBD"); ASSERT (result == input + 15); } { const char input[] = "ABC ABCDAB ABCDABCDABDE"; const char *result = strcasestr (input, "ABCDaBE"); ASSERT (result == NULL); } { const char input[] = "ABC ABCDAB ABCDABCDABDE"; const char *result = strcasestr (input, "ABCDaBCD"); ASSERT (result == input + 11); } /* Check that a very long haystack is handled quickly if the needle is short and occurs near the beginning. */ { size_t repeat = 10000; size_t m = 1000000; char *needle = "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaAaaaaaaAAAAaaaaaaa" "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"; char *haystack = (char *) malloc (m + 1); if (haystack != NULL) { memset (haystack, 'A', m); haystack[0] = 'B'; haystack[m] = '\0'; for (; repeat > 0; repeat--) { ASSERT (strcasestr (haystack, needle) == haystack + 1); } free (haystack); } } /* Check that a very long needle is discarded quickly if the haystack is short. */ { size_t repeat = 10000; size_t m = 1000000; char *haystack = "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" "ABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABAB"; char *needle = (char *) malloc (m + 1); if (needle != NULL) { memset (needle, 'A', m); needle[m] = '\0'; for (; repeat > 0; repeat--) { ASSERT (strcasestr (haystack, needle) == NULL); } free (needle); } } /* Check that the asymptotic worst-case complexity is not quadratic. */ { size_t m = 1000000; char *haystack = (char *) malloc (2 * m + 2); char *needle = (char *) malloc (m + 2); if (haystack != NULL && needle != NULL) { const char *result; memset (haystack, 'A', 2 * m); haystack[2 * m] = 'B'; haystack[2 * m + 1] = '\0'; memset (needle, 'a', m); needle[m] = 'B'; needle[m + 1] = '\0'; result = strcasestr (haystack, needle); ASSERT (result == haystack + m); } free (needle); free (haystack); } return 0; } libprelude-1.0.0/libmissing/tests/c-strcase.h0000664000076400007640000000405511341220440016124 00000000000000/* Case-insensitive string comparison functions in C locale. Copyright (C) 1995-1996, 2001, 2003, 2005, 2009-2010 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 3, 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ #ifndef C_STRCASE_H #define C_STRCASE_H #include /* The functions defined in this file assume the "C" locale and a character set without diacritics (ASCII-US or EBCDIC-US or something like that). Even if the "C" locale on a particular system is an extension of the ASCII character set (like on BeOS, where it is UTF-8, or on AmigaOS, where it is ISO-8859-1), the functions in this file recognize only the ASCII characters. More precisely, one of the string arguments must be an ASCII string; the other one can also contain non-ASCII characters (but then the comparison result will be nonzero). */ #ifdef __cplusplus extern "C" { #endif /* Compare strings S1 and S2, ignoring case, returning less than, equal to or greater than zero if S1 is lexicographically less than, equal to or greater than S2. */ extern int c_strcasecmp (const char *s1, const char *s2); /* Compare no more than N characters of strings S1 and S2, ignoring case, returning less than, equal to or greater than zero if S1 is lexicographically less than, equal to or greater than S2. */ extern int c_strncasecmp (const char *s1, const char *s2, size_t n); #ifdef __cplusplus } #endif #endif /* C_STRCASE_H */ libprelude-1.0.0/libmissing/tests/test-wcrtomb.c0000664000076400007640000001051111341220442016661 00000000000000/* Test of conversion of wide character to multibyte character. Copyright (C) 2008, 2009, 2010 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 3 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, see . */ /* Written by Bruno Haible , 2008. */ #include #include #include "signature.h" SIGNATURE_CHECK (wcrtomb, size_t, (char *, wchar_t, mbstate_t *)); #include #include #include #include "macros.h" /* Check the multibyte character s[0..n-1]. */ static void check_character (const char *s, size_t n) { wchar_t wc; char buf[64]; int iret; size_t ret; wc = (wchar_t) 0xBADFACE; iret = mbtowc (&wc, s, n); ASSERT (iret == n); ret = wcrtomb (buf, wc, NULL); ASSERT (ret == n); ASSERT (memcmp (buf, s, n) == 0); /* Test special calling convention, passing a NULL pointer. */ ret = wcrtomb (NULL, wc, NULL); ASSERT (ret == 1); } int main (int argc, char *argv[]) { char buf[64]; size_t ret; /* configure should already have checked that the locale is supported. */ if (setlocale (LC_ALL, "") == NULL) return 1; /* Test NUL character. */ { buf[0] = 'x'; ret = wcrtomb (buf, 0, NULL); ASSERT (ret == 1); ASSERT (buf[0] == '\0'); } /* Test single bytes. */ { int c; for (c = 0; c < 0x100; c++) switch (c) { case '\t': case '\v': case '\f': case ' ': case '!': case '"': case '#': case '%': case '&': case '\'': case '(': case ')': case '*': case '+': case ',': case '-': case '.': case '/': case '0': case '1': case '2': case '3': case '4': case '5': case '6': case '7': case '8': case '9': case ':': case ';': case '<': case '=': case '>': case '?': case 'A': case 'B': case 'C': case 'D': case 'E': case 'F': case 'G': case 'H': case 'I': case 'J': case 'K': case 'L': case 'M': case 'N': case 'O': case 'P': case 'Q': case 'R': case 'S': case 'T': case 'U': case 'V': case 'W': case 'X': case 'Y': case 'Z': case '[': case '\\': case ']': case '^': case '_': case 'a': case 'b': case 'c': case 'd': case 'e': case 'f': case 'g': case 'h': case 'i': case 'j': case 'k': case 'l': case 'm': case 'n': case 'o': case 'p': case 'q': case 'r': case 's': case 't': case 'u': case 'v': case 'w': case 'x': case 'y': case 'z': case '{': case '|': case '}': case '~': /* c is in the ISO C "basic character set". */ ret = wcrtomb (buf, btowc (c), NULL); ASSERT (ret == 1); ASSERT (buf[0] == (char) c); break; } } if (argc > 1) switch (argv[1][0]) { case '1': /* Locale encoding is ISO-8859-1 or ISO-8859-15. */ { const char input[] = "B\374\337er"; /* "Büßer" */ check_character (input + 1, 1); check_character (input + 2, 1); } return 0; case '2': /* Locale encoding is UTF-8. */ { const char input[] = "B\303\274\303\237er"; /* "Büßer" */ check_character (input + 1, 2); check_character (input + 3, 2); } return 0; case '3': /* Locale encoding is EUC-JP. */ { const char input[] = "<\306\374\313\334\270\354>"; /* "<日本語>" */ check_character (input + 1, 2); check_character (input + 3, 2); check_character (input + 5, 2); } return 0; case '4': /* Locale encoding is GB18030. */ { const char input[] = "B\250\271\201\060\211\070er"; /* "Büßer" */ check_character (input + 1, 2); check_character (input + 3, 4); } return 0; } return 1; } libprelude-1.0.0/libmissing/tests/test-tls.c0000664000076400007640000001263711341220442016021 00000000000000/* Test of thread-local storage in multithreaded situations. Copyright (C) 2005, 2008, 2009, 2010 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 3 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, see . */ /* Written by Bruno Haible , 2005. */ #include #if USE_POSIX_THREADS || USE_SOLARIS_THREADS || USE_PTH_THREADS || USE_WIN32_THREADS #if USE_POSIX_THREADS # define TEST_POSIX_THREADS 1 #endif #if USE_SOLARIS_THREADS # define TEST_SOLARIS_THREADS 1 #endif #if USE_PTH_THREADS # define TEST_PTH_THREADS 1 #endif #if USE_WIN32_THREADS # define TEST_WIN32_THREADS 1 #endif /* Whether to help the scheduler through explicit yield(). Uncomment this to see if the operating system has a fair scheduler. */ #define EXPLICIT_YIELD 1 /* Whether to print debugging messages. */ #define ENABLE_DEBUGGING 0 /* Number of simultaneous threads. */ #define THREAD_COUNT 16 /* Number of operations performed in each thread. */ #define REPEAT_COUNT 50000 #include #include #include #include "glthread/tls.h" #include "glthread/thread.h" #include "glthread/yield.h" #if ENABLE_DEBUGGING # define dbgprintf printf #else # define dbgprintf if (0) printf #endif #if EXPLICIT_YIELD # define yield() gl_thread_yield () #else # define yield() #endif static inline void perhaps_yield (void) { /* Call yield () only with a certain probability, otherwise with GNU Pth the sequence of thread activations is too predictable. */ if ((((unsigned int) rand () >> 3) % 4) == 0) yield (); } /* ----------------------- Test thread-local storage ----------------------- */ #define KEYS_COUNT 4 static gl_tls_key_t mykeys[KEYS_COUNT]; static void * worker_thread (void *arg) { unsigned int id = (unsigned int) (unsigned long) arg; int i, j, repeat; unsigned int values[KEYS_COUNT]; dbgprintf ("Worker %p started\n", gl_thread_self ()); /* Initialize the per-thread storage. */ for (i = 0; i < KEYS_COUNT; i++) { values[i] = (((unsigned int) rand() >> 3) % 1000000) * THREAD_COUNT + id; /* Hopefully no arithmetic overflow. */ if ((values[i] % THREAD_COUNT) != id) abort (); } perhaps_yield (); /* Verify that the initial value is NULL. */ dbgprintf ("Worker %p before initial verify\n", gl_thread_self ()); for (i = 0; i < KEYS_COUNT; i++) if (gl_tls_get (mykeys[i]) != NULL) abort (); dbgprintf ("Worker %p after initial verify\n", gl_thread_self ()); perhaps_yield (); /* Initialize the per-thread storage. */ dbgprintf ("Worker %p before first tls_set\n", gl_thread_self ()); for (i = 0; i < KEYS_COUNT; i++) { unsigned int *ptr = (unsigned int *) malloc (sizeof (unsigned int)); *ptr = values[i]; gl_tls_set (mykeys[i], ptr); } dbgprintf ("Worker %p after first tls_set\n", gl_thread_self ()); perhaps_yield (); /* Shuffle around the pointers. */ for (repeat = REPEAT_COUNT; repeat > 0; repeat--) { dbgprintf ("Worker %p doing value swapping\n", gl_thread_self ()); i = ((unsigned int) rand() >> 3) % KEYS_COUNT; j = ((unsigned int) rand() >> 3) % KEYS_COUNT; if (i != j) { void *vi = gl_tls_get (mykeys[i]); void *vj = gl_tls_get (mykeys[j]); gl_tls_set (mykeys[i], vj); gl_tls_set (mykeys[j], vi); } perhaps_yield (); } /* Verify that all the values are from this thread. */ dbgprintf ("Worker %p before final verify\n", gl_thread_self ()); for (i = 0; i < KEYS_COUNT; i++) if ((*(unsigned int *) gl_tls_get (mykeys[i]) % THREAD_COUNT) != id) abort (); dbgprintf ("Worker %p after final verify\n", gl_thread_self ()); perhaps_yield (); dbgprintf ("Worker %p dying.\n", gl_thread_self ()); return NULL; } static void test_tls (void) { int pass, i; for (pass = 0; pass < 2; pass++) { gl_thread_t threads[THREAD_COUNT]; if (pass == 0) for (i = 0; i < KEYS_COUNT; i++) gl_tls_key_init (mykeys[i], free); else for (i = KEYS_COUNT - 1; i >= 0; i--) gl_tls_key_init (mykeys[i], free); /* Spawn the threads. */ for (i = 0; i < THREAD_COUNT; i++) threads[i] = gl_thread_create (worker_thread, NULL); /* Wait for the threads to terminate. */ for (i = 0; i < THREAD_COUNT; i++) gl_thread_join (threads[i], NULL); for (i = 0; i < KEYS_COUNT; i++) gl_tls_key_destroy (mykeys[i]); } } /* -------------------------------------------------------------------------- */ int main () { #if TEST_PTH_THREADS if (!pth_init ()) abort (); #endif printf ("Starting test_tls ..."); fflush (stdout); test_tls (); printf (" OK\n"); fflush (stdout); return 0; } #else /* No multithreading available. */ #include int main () { fputs ("Skipping test: multithreading not enabled\n", stderr); return 77; } #endif libprelude-1.0.0/libmissing/tests/test-printf-frexpl.c0000664000076400007640000001010511341220442020003 00000000000000/* Test of splitting a 'long double' into fraction and mantissa. Copyright (C) 2007-2010 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 3 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, see . */ /* Written by Bruno Haible , 2007. */ #include #include "printf-frexpl.h" #include #include "fpucw.h" #include "macros.h" /* On MIPS IRIX machines, LDBL_MIN_EXP is -1021, but the smallest reliable exponent for 'long double' is -964. Similarly, on PowerPC machines, LDBL_MIN_EXP is -1021, but the smallest reliable exponent for 'long double' is -968. For exponents below that, the precision may be truncated to the precision used for 'double'. */ #ifdef __sgi # define MIN_NORMAL_EXP (LDBL_MIN_EXP + 57) # define MIN_SUBNORMAL_EXP MIN_NORMAL_EXP #elif defined __ppc || defined __ppc__ || defined __powerpc || defined __powerpc__ # define MIN_NORMAL_EXP (LDBL_MIN_EXP + 53) # define MIN_SUBNORMAL_EXP MIN_NORMAL_EXP #else # define MIN_NORMAL_EXP LDBL_MIN_EXP # define MIN_SUBNORMAL_EXP (LDBL_MIN_EXP - 100) #endif static long double my_ldexp (long double x, int d) { for (; d > 0; d--) x *= 2.0L; for (; d < 0; d++) x *= 0.5L; return x; } int main () { int i; long double x; DECL_LONG_DOUBLE_ROUNDING BEGIN_LONG_DOUBLE_ROUNDING (); for (i = 1, x = 1.0L; i <= LDBL_MAX_EXP; i++, x *= 2.0L) { int exp = -9999; long double mantissa = printf_frexpl (x, &exp); ASSERT (exp == i - 1); ASSERT (mantissa == 1.0L); } for (i = 1, x = 1.0L; i >= MIN_NORMAL_EXP; i--, x *= 0.5L) { int exp = -9999; long double mantissa = printf_frexpl (x, &exp); ASSERT (exp == i - 1); ASSERT (mantissa == 1.0L); } for (; i >= MIN_SUBNORMAL_EXP && x > 0.0L; i--, x *= 0.5L) { int exp = -9999; long double mantissa = printf_frexpl (x, &exp); ASSERT (exp == LDBL_MIN_EXP - 1); ASSERT (mantissa == my_ldexp (1.0L, i - LDBL_MIN_EXP)); } for (i = 1, x = 1.01L; i <= LDBL_MAX_EXP; i++, x *= 2.0L) { int exp = -9999; long double mantissa = printf_frexpl (x, &exp); ASSERT (exp == i - 1); ASSERT (mantissa == 1.01L); } for (i = 1, x = 1.01L; i >= MIN_NORMAL_EXP; i--, x *= 0.5L) { int exp = -9999; long double mantissa = printf_frexpl (x, &exp); ASSERT (exp == i - 1); ASSERT (mantissa == 1.01L); } for (; i >= MIN_SUBNORMAL_EXP && x > 0.0L; i--, x *= 0.5L) { int exp = -9999; long double mantissa = printf_frexpl (x, &exp); ASSERT (exp == LDBL_MIN_EXP - 1); ASSERT (mantissa >= my_ldexp (1.0L, i - LDBL_MIN_EXP)); ASSERT (mantissa <= my_ldexp (2.0L, i - LDBL_MIN_EXP)); ASSERT (mantissa == my_ldexp (x, - exp)); } for (i = 1, x = 1.73205L; i <= LDBL_MAX_EXP; i++, x *= 2.0L) { int exp = -9999; long double mantissa = printf_frexpl (x, &exp); ASSERT (exp == i - 1); ASSERT (mantissa == 1.73205L); } for (i = 1, x = 1.73205L; i >= MIN_NORMAL_EXP; i--, x *= 0.5L) { int exp = -9999; long double mantissa = printf_frexpl (x, &exp); ASSERT (exp == i - 1); ASSERT (mantissa == 1.73205L); } for (; i >= MIN_SUBNORMAL_EXP && x > 0.0L; i--, x *= 0.5L) { int exp = -9999; long double mantissa = printf_frexpl (x, &exp); ASSERT (exp == LDBL_MIN_EXP - 1); ASSERT (mantissa >= my_ldexp (1.0L, i - LDBL_MIN_EXP)); ASSERT (mantissa <= my_ldexp (2.0L, i - LDBL_MIN_EXP)); ASSERT (mantissa == my_ldexp (x, - exp)); } return 0; } libprelude-1.0.0/libmissing/tests/test-mbrtowc.c0000664000076400007640000002361611341220441016672 00000000000000/* Test of conversion of multibyte character to wide character. Copyright (C) 2008, 2009, 2010 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 3 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, see . */ /* Written by Bruno Haible , 2008. */ #include #include #include "signature.h" SIGNATURE_CHECK (mbrtowc, size_t, (wchar_t *, char const *, size_t, mbstate_t *)); #include #include #include #include "macros.h" int main (int argc, char *argv[]) { mbstate_t state; wchar_t wc; size_t ret; /* configure should already have checked that the locale is supported. */ if (setlocale (LC_ALL, "") == NULL) return 1; /* Test zero-length input. */ { memset (&state, '\0', sizeof (mbstate_t)); wc = (wchar_t) 0xBADFACE; ret = mbrtowc (&wc, "x", 0, &state); /* gnulib's implementation returns (size_t)(-2). The AIX 5.1 implementation returns (size_t)(-1). glibc's implementation returns 0. */ ASSERT (ret == (size_t)(-2) || ret == (size_t)(-1) || ret == 0); ASSERT (mbsinit (&state)); } /* Test NUL byte input. */ { memset (&state, '\0', sizeof (mbstate_t)); wc = (wchar_t) 0xBADFACE; ret = mbrtowc (&wc, "", 1, &state); ASSERT (ret == 0); ASSERT (wc == 0); ASSERT (mbsinit (&state)); ret = mbrtowc (NULL, "", 1, &state); ASSERT (ret == 0); ASSERT (mbsinit (&state)); } /* Test single-byte input. */ { int c; char buf[1]; memset (&state, '\0', sizeof (mbstate_t)); for (c = 0; c < 0x100; c++) switch (c) { case '\t': case '\v': case '\f': case ' ': case '!': case '"': case '#': case '%': case '&': case '\'': case '(': case ')': case '*': case '+': case ',': case '-': case '.': case '/': case '0': case '1': case '2': case '3': case '4': case '5': case '6': case '7': case '8': case '9': case ':': case ';': case '<': case '=': case '>': case '?': case 'A': case 'B': case 'C': case 'D': case 'E': case 'F': case 'G': case 'H': case 'I': case 'J': case 'K': case 'L': case 'M': case 'N': case 'O': case 'P': case 'Q': case 'R': case 'S': case 'T': case 'U': case 'V': case 'W': case 'X': case 'Y': case 'Z': case '[': case '\\': case ']': case '^': case '_': case 'a': case 'b': case 'c': case 'd': case 'e': case 'f': case 'g': case 'h': case 'i': case 'j': case 'k': case 'l': case 'm': case 'n': case 'o': case 'p': case 'q': case 'r': case 's': case 't': case 'u': case 'v': case 'w': case 'x': case 'y': case 'z': case '{': case '|': case '}': case '~': /* c is in the ISO C "basic character set". */ buf[0] = c; wc = (wchar_t) 0xBADFACE; ret = mbrtowc (&wc, buf, 1, &state); ASSERT (ret == 1); ASSERT (wc == c); ASSERT (mbsinit (&state)); ret = mbrtowc (NULL, buf, 1, &state); ASSERT (ret == 1); ASSERT (mbsinit (&state)); break; } } /* Test special calling convention, passing a NULL pointer. */ { memset (&state, '\0', sizeof (mbstate_t)); wc = (wchar_t) 0xBADFACE; ret = mbrtowc (&wc, NULL, 5, &state); ASSERT (ret == 0); ASSERT (wc == (wchar_t) 0xBADFACE); ASSERT (mbsinit (&state)); } if (argc > 1) switch (argv[1][0]) { case '1': /* Locale encoding is ISO-8859-1 or ISO-8859-15. */ { char input[] = "B\374\337er"; /* "Büßer" */ memset (&state, '\0', sizeof (mbstate_t)); wc = (wchar_t) 0xBADFACE; ret = mbrtowc (&wc, input, 1, &state); ASSERT (ret == 1); ASSERT (wc == 'B'); ASSERT (mbsinit (&state)); input[0] = '\0'; wc = (wchar_t) 0xBADFACE; ret = mbrtowc (&wc, input + 1, 1, &state); ASSERT (ret == 1); ASSERT (wctob (wc) == (unsigned char) '\374'); ASSERT (mbsinit (&state)); input[1] = '\0'; wc = (wchar_t) 0xBADFACE; ret = mbrtowc (&wc, input + 2, 3, &state); ASSERT (ret == 1); ASSERT (wctob (wc) == (unsigned char) '\337'); ASSERT (mbsinit (&state)); input[2] = '\0'; wc = (wchar_t) 0xBADFACE; ret = mbrtowc (&wc, input + 3, 2, &state); ASSERT (ret == 1); ASSERT (wc == 'e'); ASSERT (mbsinit (&state)); input[3] = '\0'; wc = (wchar_t) 0xBADFACE; ret = mbrtowc (&wc, input + 4, 1, &state); ASSERT (ret == 1); ASSERT (wc == 'r'); ASSERT (mbsinit (&state)); } return 0; case '2': /* Locale encoding is UTF-8. */ { char input[] = "B\303\274\303\237er"; /* "Büßer" */ memset (&state, '\0', sizeof (mbstate_t)); wc = (wchar_t) 0xBADFACE; ret = mbrtowc (&wc, input, 1, &state); ASSERT (ret == 1); ASSERT (wc == 'B'); ASSERT (mbsinit (&state)); input[0] = '\0'; wc = (wchar_t) 0xBADFACE; ret = mbrtowc (&wc, input + 1, 1, &state); ASSERT (ret == (size_t)(-2)); ASSERT (wc == (wchar_t) 0xBADFACE); ASSERT (!mbsinit (&state)); input[1] = '\0'; wc = (wchar_t) 0xBADFACE; ret = mbrtowc (&wc, input + 2, 5, &state); ASSERT (ret == 1); ASSERT (wctob (wc) == EOF); ASSERT (mbsinit (&state)); input[2] = '\0'; wc = (wchar_t) 0xBADFACE; ret = mbrtowc (&wc, input + 3, 4, &state); ASSERT (ret == 2); ASSERT (wctob (wc) == EOF); ASSERT (mbsinit (&state)); input[3] = '\0'; input[4] = '\0'; wc = (wchar_t) 0xBADFACE; ret = mbrtowc (&wc, input + 5, 2, &state); ASSERT (ret == 1); ASSERT (wc == 'e'); ASSERT (mbsinit (&state)); input[5] = '\0'; wc = (wchar_t) 0xBADFACE; ret = mbrtowc (&wc, input + 6, 1, &state); ASSERT (ret == 1); ASSERT (wc == 'r'); ASSERT (mbsinit (&state)); } return 0; case '3': /* Locale encoding is EUC-JP. */ { char input[] = "<\306\374\313\334\270\354>"; /* "<日本語>" */ memset (&state, '\0', sizeof (mbstate_t)); wc = (wchar_t) 0xBADFACE; ret = mbrtowc (&wc, input, 1, &state); ASSERT (ret == 1); ASSERT (wc == '<'); ASSERT (mbsinit (&state)); input[0] = '\0'; wc = (wchar_t) 0xBADFACE; ret = mbrtowc (&wc, input + 1, 2, &state); ASSERT (ret == 2); ASSERT (wctob (wc) == EOF); ASSERT (mbsinit (&state)); input[1] = '\0'; input[2] = '\0'; wc = (wchar_t) 0xBADFACE; ret = mbrtowc (&wc, input + 3, 1, &state); ASSERT (ret == (size_t)(-2)); ASSERT (wc == (wchar_t) 0xBADFACE); ASSERT (!mbsinit (&state)); input[3] = '\0'; wc = (wchar_t) 0xBADFACE; ret = mbrtowc (&wc, input + 4, 4, &state); ASSERT (ret == 1); ASSERT (wctob (wc) == EOF); ASSERT (mbsinit (&state)); input[4] = '\0'; wc = (wchar_t) 0xBADFACE; ret = mbrtowc (&wc, input + 5, 3, &state); ASSERT (ret == 2); ASSERT (wctob (wc) == EOF); ASSERT (mbsinit (&state)); input[5] = '\0'; input[6] = '\0'; wc = (wchar_t) 0xBADFACE; ret = mbrtowc (&wc, input + 7, 1, &state); ASSERT (ret == 1); ASSERT (wc == '>'); ASSERT (mbsinit (&state)); } return 0; case '4': /* Locale encoding is GB18030. */ { char input[] = "B\250\271\201\060\211\070er"; /* "Büßer" */ memset (&state, '\0', sizeof (mbstate_t)); wc = (wchar_t) 0xBADFACE; ret = mbrtowc (&wc, input, 1, &state); ASSERT (ret == 1); ASSERT (wc == 'B'); ASSERT (mbsinit (&state)); input[0] = '\0'; wc = (wchar_t) 0xBADFACE; ret = mbrtowc (&wc, input + 1, 1, &state); ASSERT (ret == (size_t)(-2)); ASSERT (wc == (wchar_t) 0xBADFACE); ASSERT (!mbsinit (&state)); input[1] = '\0'; wc = (wchar_t) 0xBADFACE; ret = mbrtowc (&wc, input + 2, 7, &state); ASSERT (ret == 1); ASSERT (wctob (wc) == EOF); ASSERT (mbsinit (&state)); input[2] = '\0'; wc = (wchar_t) 0xBADFACE; ret = mbrtowc (&wc, input + 3, 6, &state); ASSERT (ret == 4); ASSERT (wctob (wc) == EOF); ASSERT (mbsinit (&state)); input[3] = '\0'; input[4] = '\0'; input[5] = '\0'; input[6] = '\0'; wc = (wchar_t) 0xBADFACE; ret = mbrtowc (&wc, input + 7, 2, &state); ASSERT (ret == 1); ASSERT (wc == 'e'); ASSERT (mbsinit (&state)); input[5] = '\0'; wc = (wchar_t) 0xBADFACE; ret = mbrtowc (&wc, input + 8, 1, &state); ASSERT (ret == 1); ASSERT (wc == 'r'); ASSERT (mbsinit (&state)); } return 0; } return 1; } libprelude-1.0.0/libmissing/tests/zerosize-ptr.h0000664000076400007640000000471711341220442016724 00000000000000/* Return a pointer to a zero-size object in memory. Copyright (C) 2009, 2010 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 3 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, see . */ /* ISO C 99 does not allow memcmp(), memchr() etc. to be invoked with a NULL argument. Therefore this file produces a non-NULL pointer which cannot be dereferenced, if possible. */ #include /* Test whether mmap() and mprotect() are available. We don't use HAVE_MMAP, because AC_FUNC_MMAP would not define it on HP-UX. HAVE_MPROTECT is not enough, because mingw does not have mmap() but has an mprotect() function in libgcc.a. */ #if HAVE_SYS_MMAN_H && HAVE_MPROTECT # include # include # include # include /* Define MAP_FILE when it isn't otherwise. */ # ifndef MAP_FILE # define MAP_FILE 0 # endif #endif /* Return a pointer to a zero-size object in memory (that is, actually, a pointer to a page boundary where the previous page is readable and writable and the next page is neither readable not writable), if possible. Return NULL otherwise. */ static void * zerosize_ptr (void) { /* Use mmap and mprotect when they exist. Don't test HAVE_MMAP, because it is not defined on HP-UX 11 (since it does not support MAP_FIXED). */ #if HAVE_SYS_MMAN_H && HAVE_MPROTECT # if HAVE_MAP_ANONYMOUS const int flags = MAP_ANONYMOUS | MAP_PRIVATE; const int fd = -1; # else /* !HAVE_MAP_ANONYMOUS */ const int flags = MAP_FILE | MAP_PRIVATE; int fd = open ("/dev/zero", O_RDONLY, 0666); if (fd >= 0) # endif { int pagesize = getpagesize (); char *two_pages = (char *) mmap (NULL, 2 * pagesize, PROT_READ | PROT_WRITE, flags, fd, 0); if (two_pages != (char *)(-1) && mprotect (two_pages + pagesize, pagesize, PROT_NONE) == 0) return two_pages + pagesize; } #endif return NULL; } libprelude-1.0.0/libmissing/tests/test-lstat.h0000664000076400007640000000727711341220441016356 00000000000000/* Test of lstat() function. Copyright (C) 2008, 2009, 2010 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 3 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, see . */ /* Written by Simon Josefsson, 2008; and Eric Blake, 2009. */ /* This file is designed to test both lstat(n,buf) and fstatat(AT_FDCWD,n,buf,AT_SYMLINK_NOFOLLOW). FUNC is the function to test. Assumes that BASE and ASSERT are already defined, and that appropriate headers are already included. If PRINT, warn before skipping symlink tests with status 77. */ static int test_lstat_func (int (*func) (char const *, struct stat *), bool print) { struct stat st1; struct stat st2; /* Test for common directories. */ ASSERT (func (".", &st1) == 0); ASSERT (func ("./", &st2) == 0); ASSERT (SAME_INODE (st1, st2)); ASSERT (S_ISDIR (st1.st_mode)); ASSERT (S_ISDIR (st2.st_mode)); ASSERT (func ("/", &st1) == 0); ASSERT (func ("///", &st2) == 0); ASSERT (SAME_INODE (st1, st2)); ASSERT (S_ISDIR (st1.st_mode)); ASSERT (S_ISDIR (st2.st_mode)); ASSERT (func ("..", &st1) == 0); ASSERT (S_ISDIR (st1.st_mode)); /* Test for error conditions. */ errno = 0; ASSERT (func ("", &st1) == -1); ASSERT (errno == ENOENT); errno = 0; ASSERT (func ("nosuch", &st1) == -1); ASSERT (errno == ENOENT); errno = 0; ASSERT (func ("nosuch/", &st1) == -1); ASSERT (errno == ENOENT); ASSERT (close (creat (BASE "file", 0600)) == 0); ASSERT (func (BASE "file", &st1) == 0); ASSERT (S_ISREG (st1.st_mode)); errno = 0; ASSERT (func (BASE "file/", &st1) == -1); ASSERT (errno == ENOTDIR); /* Now for some symlink tests, where supported. We set up: link1 -> directory link2 -> file link3 -> dangling link4 -> loop then test behavior both with and without trailing slash. */ if (symlink (".", BASE "link1") != 0) { ASSERT (unlink (BASE "file") == 0); if (print) fputs ("skipping test: symlinks not supported on this file system\n", stderr); return 77; } ASSERT (symlink (BASE "file", BASE "link2") == 0); ASSERT (symlink (BASE "nosuch", BASE "link3") == 0); ASSERT (symlink (BASE "link4", BASE "link4") == 0); ASSERT (func (BASE "link1", &st1) == 0); ASSERT (S_ISLNK (st1.st_mode)); ASSERT (func (BASE "link1/", &st1) == 0); ASSERT (stat (BASE "link1", &st2) == 0); ASSERT (S_ISDIR (st1.st_mode)); ASSERT (S_ISDIR (st2.st_mode)); ASSERT (SAME_INODE (st1, st2)); ASSERT (func (BASE "link2", &st1) == 0); ASSERT (S_ISLNK (st1.st_mode)); errno = 0; ASSERT (func (BASE "link2/", &st1) == -1); ASSERT (errno == ENOTDIR); ASSERT (func (BASE "link3", &st1) == 0); ASSERT (S_ISLNK (st1.st_mode)); errno = 0; ASSERT (func (BASE "link3/", &st1) == -1); ASSERT (errno == ENOENT); ASSERT (func (BASE "link4", &st1) == 0); ASSERT (S_ISLNK (st1.st_mode)); errno = 0; ASSERT (func (BASE "link4/", &st1) == -1); ASSERT (errno == ELOOP); /* Cleanup. */ ASSERT (unlink (BASE "file") == 0); ASSERT (unlink (BASE "link1") == 0); ASSERT (unlink (BASE "link2") == 0); ASSERT (unlink (BASE "link3") == 0); ASSERT (unlink (BASE "link4") == 0); return 0; } libprelude-1.0.0/libmissing/tests/test-open.h0000664000076400007640000000535611341220442016165 00000000000000/* Test of opening a file descriptor. Copyright (C) 2007-2010 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 3 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, see . */ /* Written by Bruno Haible , 2007. */ /* This file is designed to test both open(n,buf[,mode]) and openat(AT_FDCWD,n,buf[,mode]). FUNC is the function to test. Assumes that BASE and ASSERT are already defined, and that appropriate headers are already included. If PRINT, warn before skipping symlink tests with status 77. */ static int test_open (int (*func) (char const *, int, ...), bool print) { int fd; /* Remove anything from prior partial run. */ unlink (BASE "file"); /* Cannot create directory. */ errno = 0; ASSERT (func ("nonexist.ent/", O_CREAT | O_RDONLY, 0600) == -1); ASSERT (errno == ENOTDIR || errno == EISDIR || errno == ENOENT || errno == EINVAL); /* Create a regular file. */ fd = func (BASE "file", O_CREAT | O_RDONLY, 0600); ASSERT (0 <= fd); ASSERT (close (fd) == 0); /* Trailing slash handling. */ errno = 0; ASSERT (func (BASE "file/", O_RDONLY) == -1); ASSERT (errno == ENOTDIR || errno == EISDIR || errno == EINVAL); /* Directories cannot be opened for writing. */ errno = 0; ASSERT (func (".", O_WRONLY) == -1); ASSERT (errno == EISDIR || errno == EACCES); /* /dev/null must exist, and be writable. */ fd = func ("/dev/null", O_RDONLY); ASSERT (0 <= fd); { char c; ASSERT (read (fd, &c, 1) == 0); } ASSERT (close (fd) == 0); fd = func ("/dev/null", O_WRONLY); ASSERT (0 <= fd); ASSERT (write (fd, "c", 1) == 1); ASSERT (close (fd) == 0); /* Symlink handling, where supported. */ if (symlink (BASE "file", BASE "link") != 0) { ASSERT (unlink (BASE "file") == 0); if (print) fputs ("skipping test: symlinks not supported on this file system\n", stderr); return 77; } errno = 0; ASSERT (func (BASE "link/", O_RDONLY) == -1); ASSERT (errno == ENOTDIR); fd = func (BASE "link", O_RDONLY); ASSERT (0 <= fd); ASSERT (close (fd) == 0); /* Cleanup. */ ASSERT (unlink (BASE "file") == 0); ASSERT (unlink (BASE "link") == 0); return 0; } libprelude-1.0.0/libmissing/tests/test-gettimeofday.c0000664000076400007640000000245111341220441017670 00000000000000/* * Copyright (C) 2005, 2007, 2009, 2010 Free Software Foundation, Inc. * Written by Jim Meyering. * * 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 3 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, see . */ #include #include #include "signature.h" SIGNATURE_CHECK (gettimeofday, int, (struct timeval *, GETTIMEOFDAY_TIMEZONE *)); #include #include #include int main (void) { time_t t = 0; struct tm *lt; struct tm saved_lt; struct timeval tv; lt = localtime (&t); saved_lt = *lt; gettimeofday (&tv, NULL); if (memcmp (lt, &saved_lt, sizeof (struct tm)) != 0) { fprintf (stderr, "gettimeofday still clobbers the localtime buffer!\n"); return 1; } return 0; } libprelude-1.0.0/libmissing/tests/binary-io.h0000664000076400007640000000431111341220440016124 00000000000000/* Binary mode I/O. Copyright (C) 2001, 2003, 2005, 2008, 2009, 2010 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 3 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, see . */ #ifndef _BINARY_H #define _BINARY_H /* For systems that distinguish between text and binary I/O. O_BINARY is usually declared in . */ #include /* The MSVC7 doesn't like to be included after '#define fileno ...', so we include it here first. */ #include #if !defined O_BINARY && defined _O_BINARY /* For MSC-compatible compilers. */ # define O_BINARY _O_BINARY # define O_TEXT _O_TEXT #endif #if defined __BEOS__ || defined __HAIKU__ /* BeOS 5 and Haiku have O_BINARY and O_TEXT, but they have no effect. */ # undef O_BINARY # undef O_TEXT #endif /* SET_BINARY (fd); changes the file descriptor fd to perform binary I/O. */ #if O_BINARY # if defined __EMX__ || defined __DJGPP__ || defined __CYGWIN__ # include /* declares setmode() */ # else # define setmode _setmode # undef fileno # define fileno _fileno # endif # ifdef __DJGPP__ # include /* declares isatty() */ /* Avoid putting stdin/stdout in binary mode if it is connected to the console, because that would make it impossible for the user to interrupt the program through Ctrl-C or Ctrl-Break. */ # define SET_BINARY(fd) ((void) (!isatty (fd) ? (setmode (fd, O_BINARY), 0) : 0)) # else # define SET_BINARY(fd) ((void) setmode (fd, O_BINARY)) # endif #else /* On reasonable systems, binary I/O is the default. */ # undef O_BINARY # define O_BINARY 0 # define SET_BINARY(fd) /* do nothing */ ((void) 0) #endif #endif /* _BINARY_H */ libprelude-1.0.0/libmissing/tests/test-snprintf-posix.h0000664000076400007640000033725611341220442020236 00000000000000/* Test of POSIX compatible vsnprintf() and snprintf() functions. Copyright (C) 2007-2010 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 3 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, see . */ /* Written by Bruno Haible , 2007. */ #include "nan.h" /* The SGI MIPS floating-point format does not distinguish 0.0 and -0.0. */ static int have_minus_zero () { static double plus_zero = 0.0; double minus_zero = - plus_zero; return memcmp (&plus_zero, &minus_zero, sizeof (double)) != 0; } /* HP cc on HP-UX 10.20 has a bug with the constant expression -0.0. So we use -zerod instead. */ double zerod = 0.0; /* On HP-UX 10.20, negating 0.0L does not yield -0.0L. So we use minus_zerol instead. IRIX cc can't put -0.0L into .data, but can compute at runtime. Note that the expression -LDBL_MIN * LDBL_MIN does not work on other platforms, such as when cross-compiling to PowerPC on MacOS X 10.5. */ #if defined __hpux || defined __sgi static long double compute_minus_zerol (void) { return -LDBL_MIN * LDBL_MIN; } # define minus_zerol compute_minus_zerol () #else long double minus_zerol = -0.0L; #endif /* Representation of an 80-bit 'long double' as an initializer for a sequence of 'unsigned int' words. */ #ifdef WORDS_BIGENDIAN # define LDBL80_WORDS(exponent,manthi,mantlo) \ { ((unsigned int) (exponent) << 16) | ((unsigned int) (manthi) >> 16), \ ((unsigned int) (manthi) << 16) | (unsigned int) (mantlo) >> 16), \ (unsigned int) (mantlo) << 16 \ } #else # define LDBL80_WORDS(exponent,manthi,mantlo) \ { mantlo, manthi, exponent } #endif static int strmatch (const char *pattern, const char *string) { if (strlen (pattern) != strlen (string)) return 0; for (; *pattern != '\0'; pattern++, string++) if (*pattern != '*' && *string != *pattern) return 0; return 1; } /* Test whether string[start_index..end_index-1] is a valid textual representation of NaN. */ static int strisnan (const char *string, size_t start_index, size_t end_index, int uppercase) { if (start_index < end_index) { if (string[start_index] == '-') start_index++; if (start_index + 3 <= end_index && memcmp (string + start_index, uppercase ? "NAN" : "nan", 3) == 0) { start_index += 3; if (start_index == end_index || (string[start_index] == '(' && string[end_index - 1] == ')')) return 1; } } return 0; } static void test_function (int (*my_snprintf) (char *, size_t, const char *, ...)) { char buf[8]; int size; /* Test return value convention. */ for (size = 0; size <= 8; size++) { int retval; memcpy (buf, "DEADBEEF", 8); retval = my_snprintf (buf, size, "%d", 12345); ASSERT (retval == 5); if (size < 6) { if (size > 0) { ASSERT (memcmp (buf, "12345", size - 1) == 0); ASSERT (buf[size - 1] == '\0'); } ASSERT (memcmp (buf + size, "DEADBEEF" + size, 8 - size) == 0); } else { ASSERT (memcmp (buf, "12345\0EF", 8) == 0); } } /* Test support of size specifiers as in C99. */ { char result[100]; int retval = my_snprintf (result, sizeof (result), "%ju %d", (uintmax_t) 12345671, 33, 44, 55); ASSERT (strcmp (result, "12345671 33") == 0); ASSERT (retval == strlen (result)); } { char result[100]; int retval = my_snprintf (result, sizeof (result), "%zu %d", (size_t) 12345672, 33, 44, 55); ASSERT (strcmp (result, "12345672 33") == 0); ASSERT (retval == strlen (result)); } { char result[100]; int retval = my_snprintf (result, sizeof (result), "%tu %d", (ptrdiff_t) 12345673, 33, 44, 55); ASSERT (strcmp (result, "12345673 33") == 0); ASSERT (retval == strlen (result)); } { char result[100]; int retval = my_snprintf (result, sizeof (result), "%Lg %d", (long double) 1.5, 33, 44, 55); ASSERT (strcmp (result, "1.5 33") == 0); ASSERT (retval == strlen (result)); } /* Test the support of the 'a' and 'A' conversion specifier for hexadecimal output of floating-point numbers. */ { /* A positive number. */ char result[100]; int retval = my_snprintf (result, sizeof (result), "%a %d", 3.1416015625, 33, 44, 55); ASSERT (strcmp (result, "0x1.922p+1 33") == 0 || strcmp (result, "0x3.244p+0 33") == 0 || strcmp (result, "0x6.488p-1 33") == 0 || strcmp (result, "0xc.91p-2 33") == 0); ASSERT (retval == strlen (result)); } { /* A negative number. */ char result[100]; int retval = my_snprintf (result, sizeof (result), "%A %d", -3.1416015625, 33, 44, 55); ASSERT (strcmp (result, "-0X1.922P+1 33") == 0 || strcmp (result, "-0X3.244P+0 33") == 0 || strcmp (result, "-0X6.488P-1 33") == 0 || strcmp (result, "-0XC.91P-2 33") == 0); ASSERT (retval == strlen (result)); } { /* Positive zero. */ char result[100]; int retval = my_snprintf (result, sizeof (result), "%a %d", 0.0, 33, 44, 55); ASSERT (strcmp (result, "0x0p+0 33") == 0); ASSERT (retval == strlen (result)); } { /* Negative zero. */ char result[100]; int retval = my_snprintf (result, sizeof (result), "%a %d", -zerod, 33, 44, 55); if (have_minus_zero ()) ASSERT (strcmp (result, "-0x0p+0 33") == 0); ASSERT (retval == strlen (result)); } { /* Positive infinity. */ char result[100]; int retval = my_snprintf (result, sizeof (result), "%a %d", 1.0 / 0.0, 33, 44, 55); ASSERT (strcmp (result, "inf 33") == 0); ASSERT (retval == strlen (result)); } { /* Negative infinity. */ char result[100]; int retval = my_snprintf (result, sizeof (result), "%a %d", -1.0 / 0.0, 33, 44, 55); ASSERT (strcmp (result, "-inf 33") == 0); ASSERT (retval == strlen (result)); } { /* NaN. */ char result[100]; int retval = my_snprintf (result, sizeof (result), "%a %d", NaNd (), 33, 44, 55); ASSERT (strlen (result) >= 3 + 3 && strisnan (result, 0, strlen (result) - 3, 0) && strcmp (result + strlen (result) - 3, " 33") == 0); ASSERT (retval == strlen (result)); } { /* Rounding near the decimal point. */ char result[100]; int retval = my_snprintf (result, sizeof (result), "%.0a %d", 1.5, 33, 44, 55); ASSERT (strcmp (result, "0x2p+0 33") == 0 || strcmp (result, "0x3p-1 33") == 0 || strcmp (result, "0x6p-2 33") == 0 || strcmp (result, "0xcp-3 33") == 0); ASSERT (retval == strlen (result)); } { /* Rounding with precision 0. */ char result[100]; int retval = my_snprintf (result, sizeof (result), "%.0a %d", 1.51, 33, 44, 55); ASSERT (strcmp (result, "0x2p+0 33") == 0 || strcmp (result, "0x3p-1 33") == 0 || strcmp (result, "0x6p-2 33") == 0 || strcmp (result, "0xcp-3 33") == 0); ASSERT (retval == strlen (result)); } { /* Rounding with precision 1. */ char result[100]; int retval = my_snprintf (result, sizeof (result), "%.1a %d", 1.51, 33, 44, 55); ASSERT (strcmp (result, "0x1.8p+0 33") == 0 || strcmp (result, "0x3.0p-1 33") == 0 || strcmp (result, "0x6.1p-2 33") == 0 || strcmp (result, "0xc.1p-3 33") == 0); ASSERT (retval == strlen (result)); } { /* Rounding with precision 2. */ char result[100]; int retval = my_snprintf (result, sizeof (result), "%.2a %d", 1.51, 33, 44, 55); ASSERT (strcmp (result, "0x1.83p+0 33") == 0 || strcmp (result, "0x3.05p-1 33") == 0 || strcmp (result, "0x6.0ap-2 33") == 0 || strcmp (result, "0xc.14p-3 33") == 0); ASSERT (retval == strlen (result)); } { /* Rounding with precision 3. */ char result[100]; int retval = my_snprintf (result, sizeof (result), "%.3a %d", 1.51, 33, 44, 55); ASSERT (strcmp (result, "0x1.829p+0 33") == 0 || strcmp (result, "0x3.052p-1 33") == 0 || strcmp (result, "0x6.0a4p-2 33") == 0 || strcmp (result, "0xc.148p-3 33") == 0); ASSERT (retval == strlen (result)); } { /* Rounding can turn a ...FFF into a ...000. */ char result[100]; int retval = my_snprintf (result, sizeof (result), "%.3a %d", 1.49999, 33, 44, 55); ASSERT (strcmp (result, "0x1.800p+0 33") == 0 || strcmp (result, "0x3.000p-1 33") == 0 || strcmp (result, "0x6.000p-2 33") == 0 || strcmp (result, "0xc.000p-3 33") == 0); ASSERT (retval == strlen (result)); } { /* Rounding can turn a ...FFF into a ...000. This shows a MacOS X 10.3.9 (Darwin 7.9) bug. */ char result[100]; int retval = my_snprintf (result, sizeof (result), "%.1a %d", 1.999, 33, 44, 55); ASSERT (strcmp (result, "0x1.0p+1 33") == 0 || strcmp (result, "0x2.0p+0 33") == 0 || strcmp (result, "0x4.0p-1 33") == 0 || strcmp (result, "0x8.0p-2 33") == 0); ASSERT (retval == strlen (result)); } { /* Width. */ char result[100]; int retval = my_snprintf (result, sizeof (result), "%10a %d", 1.75, 33, 44, 55); ASSERT (strcmp (result, " 0x1.cp+0 33") == 0 || strcmp (result, " 0x3.8p-1 33") == 0 || strcmp (result, " 0x7p-2 33") == 0 || strcmp (result, " 0xep-3 33") == 0); ASSERT (retval == strlen (result)); } { /* Small precision. */ char result[100]; int retval = my_snprintf (result, sizeof (result), "%.10a %d", 1.75, 33, 44, 55); ASSERT (strcmp (result, "0x1.c000000000p+0 33") == 0 || strcmp (result, "0x3.8000000000p-1 33") == 0 || strcmp (result, "0x7.0000000000p-2 33") == 0 || strcmp (result, "0xe.0000000000p-3 33") == 0); ASSERT (retval == strlen (result)); } { /* Large precision. */ char result[100]; int retval = my_snprintf (result, sizeof (result), "%.50a %d", 1.75, 33, 44, 55); ASSERT (strcmp (result, "0x1.c0000000000000000000000000000000000000000000000000p+0 33") == 0 || strcmp (result, "0x3.80000000000000000000000000000000000000000000000000p-1 33") == 0 || strcmp (result, "0x7.00000000000000000000000000000000000000000000000000p-2 33") == 0 || strcmp (result, "0xe.00000000000000000000000000000000000000000000000000p-3 33") == 0); ASSERT (retval == strlen (result)); } { /* FLAG_LEFT. */ char result[100]; int retval = my_snprintf (result, sizeof (result), "%-10a %d", 1.75, 33, 44, 55); ASSERT (strcmp (result, "0x1.cp+0 33") == 0 || strcmp (result, "0x3.8p-1 33") == 0 || strcmp (result, "0x7p-2 33") == 0 || strcmp (result, "0xep-3 33") == 0); ASSERT (retval == strlen (result)); } { /* FLAG_SHOWSIGN. */ char result[100]; int retval = my_snprintf (result, sizeof (result), "%+a %d", 1.75, 33, 44, 55); ASSERT (strcmp (result, "+0x1.cp+0 33") == 0 || strcmp (result, "+0x3.8p-1 33") == 0 || strcmp (result, "+0x7p-2 33") == 0 || strcmp (result, "+0xep-3 33") == 0); ASSERT (retval == strlen (result)); } { /* FLAG_SPACE. */ char result[100]; int retval = my_snprintf (result, sizeof (result), "% a %d", 1.75, 33, 44, 55); ASSERT (strcmp (result, " 0x1.cp+0 33") == 0 || strcmp (result, " 0x3.8p-1 33") == 0 || strcmp (result, " 0x7p-2 33") == 0 || strcmp (result, " 0xep-3 33") == 0); ASSERT (retval == strlen (result)); } { /* FLAG_ALT. */ char result[100]; int retval = my_snprintf (result, sizeof (result), "%#a %d", 1.75, 33, 44, 55); ASSERT (strcmp (result, "0x1.cp+0 33") == 0 || strcmp (result, "0x3.8p-1 33") == 0 || strcmp (result, "0x7.p-2 33") == 0 || strcmp (result, "0xe.p-3 33") == 0); ASSERT (retval == strlen (result)); } { /* FLAG_ALT. */ char result[100]; int retval = my_snprintf (result, sizeof (result), "%#a %d", 1.0, 33, 44, 55); ASSERT (strcmp (result, "0x1.p+0 33") == 0 || strcmp (result, "0x2.p-1 33") == 0 || strcmp (result, "0x4.p-2 33") == 0 || strcmp (result, "0x8.p-3 33") == 0); ASSERT (retval == strlen (result)); } { /* FLAG_ZERO with finite number. */ char result[100]; int retval = my_snprintf (result, sizeof (result), "%010a %d", 1.75, 33, 44, 55); ASSERT (strcmp (result, "0x001.cp+0 33") == 0 || strcmp (result, "0x003.8p-1 33") == 0 || strcmp (result, "0x00007p-2 33") == 0 || strcmp (result, "0x0000ep-3 33") == 0); ASSERT (retval == strlen (result)); } { /* FLAG_ZERO with infinite number. */ char result[100]; int retval = my_snprintf (result, sizeof (result), "%010a %d", 1.0 / 0.0, 33, 44, 55); /* "0000000inf 33" is not a valid result; see */ ASSERT (strcmp (result, " inf 33") == 0); ASSERT (retval == strlen (result)); } { /* FLAG_ZERO with NaN. */ char result[100]; int retval = my_snprintf (result, sizeof (result), "%050a %d", NaNd (), 33, 44, 55); /* "0000000nan 33" is not a valid result; see */ ASSERT (strlen (result) == 50 + 3 && strisnan (result, strspn (result, " "), strlen (result) - 3, 0) && strcmp (result + strlen (result) - 3, " 33") == 0); ASSERT (retval == strlen (result)); } { /* A positive number. */ char result[100]; int retval = my_snprintf (result, sizeof (result), "%La %d", 3.1416015625L, 33, 44, 55); ASSERT (strcmp (result, "0x1.922p+1 33") == 0 || strcmp (result, "0x3.244p+0 33") == 0 || strcmp (result, "0x6.488p-1 33") == 0 || strcmp (result, "0xc.91p-2 33") == 0); ASSERT (retval == strlen (result)); } { /* A negative number. */ char result[100]; int retval = my_snprintf (result, sizeof (result), "%LA %d", -3.1416015625L, 33, 44, 55); ASSERT (strcmp (result, "-0X1.922P+1 33") == 0 || strcmp (result, "-0X3.244P+0 33") == 0 || strcmp (result, "-0X6.488P-1 33") == 0 || strcmp (result, "-0XC.91P-2 33") == 0); ASSERT (retval == strlen (result)); } { /* Positive zero. */ char result[100]; int retval = my_snprintf (result, sizeof (result), "%La %d", 0.0L, 33, 44, 55); ASSERT (strcmp (result, "0x0p+0 33") == 0); ASSERT (retval == strlen (result)); } { /* Negative zero. */ char result[100]; int retval = my_snprintf (result, sizeof (result), "%La %d", minus_zerol, 33, 44, 55); if (have_minus_zero ()) ASSERT (strcmp (result, "-0x0p+0 33") == 0); ASSERT (retval == strlen (result)); } { /* Positive infinity. */ char result[100]; int retval = my_snprintf (result, sizeof (result), "%La %d", 1.0L / 0.0L, 33, 44, 55); ASSERT (strcmp (result, "inf 33") == 0); ASSERT (retval == strlen (result)); } { /* Negative infinity. */ char result[100]; int retval = my_snprintf (result, sizeof (result), "%La %d", -1.0L / 0.0L, 33, 44, 55); ASSERT (strcmp (result, "-inf 33") == 0); ASSERT (retval == strlen (result)); } { /* NaN. */ char result[100]; int retval = my_snprintf (result, sizeof (result), "%La %d", NaNl (), 33, 44, 55); ASSERT (strlen (result) >= 3 + 3 && strisnan (result, 0, strlen (result) - 3, 0) && strcmp (result + strlen (result) - 3, " 33") == 0); ASSERT (retval == strlen (result)); } #if CHECK_PRINTF_SAFE && ((defined __ia64 && LDBL_MANT_DIG == 64) || (defined __x86_64__ || defined __amd64__) || (defined __i386 || defined __i386__ || defined _I386 || defined _M_IX86 || defined _X86_)) { /* Quiet NaN. */ static union { unsigned int word[4]; long double value; } x = { LDBL80_WORDS (0xFFFF, 0xC3333333, 0x00000000) }; char result[100]; int retval = my_snprintf (result, sizeof (result), "%La %d", x.value, 33, 44, 55); ASSERT (strlen (result) >= 3 + 3 && strisnan (result, 0, strlen (result) - 3, 0) && strcmp (result + strlen (result) - 3, " 33") == 0); ASSERT (retval == strlen (result)); } { /* Signalling NaN. */ static union { unsigned int word[4]; long double value; } x = { LDBL80_WORDS (0xFFFF, 0x83333333, 0x00000000) }; char result[100]; int retval = my_snprintf (result, sizeof (result), "%La %d", x.value, 33, 44, 55); ASSERT (strlen (result) >= 3 + 3 && strisnan (result, 0, strlen (result) - 3, 0) && strcmp (result + strlen (result) - 3, " 33") == 0); ASSERT (retval == strlen (result)); } /* The isnanl function should recognize Pseudo-NaNs, Pseudo-Infinities, Pseudo-Zeroes, Unnormalized Numbers, and Pseudo-Denormals, as defined in Intel IA-64 Architecture Software Developer's Manual, Volume 1: Application Architecture. Table 5-2 "Floating-Point Register Encodings" Figure 5-6 "Memory to Floating-Point Register Data Translation" */ { /* Pseudo-NaN. */ static union { unsigned int word[4]; long double value; } x = { LDBL80_WORDS (0xFFFF, 0x40000001, 0x00000000) }; char result[100]; int retval = my_snprintf (result, sizeof (result), "%La %d", x.value, 33, 44, 55); ASSERT (strlen (result) >= 3 + 3 && strisnan (result, 0, strlen (result) - 3, 0) && strcmp (result + strlen (result) - 3, " 33") == 0); ASSERT (retval == strlen (result)); } { /* Pseudo-Infinity. */ static union { unsigned int word[4]; long double value; } x = { LDBL80_WORDS (0xFFFF, 0x00000000, 0x00000000) }; char result[100]; int retval = my_snprintf (result, sizeof (result), "%La %d", x.value, 33, 44, 55); ASSERT (strlen (result) >= 3 + 3 && strisnan (result, 0, strlen (result) - 3, 0) && strcmp (result + strlen (result) - 3, " 33") == 0); ASSERT (retval == strlen (result)); } { /* Pseudo-Zero. */ static union { unsigned int word[4]; long double value; } x = { LDBL80_WORDS (0x4004, 0x00000000, 0x00000000) }; char result[100]; int retval = my_snprintf (result, sizeof (result), "%La %d", x.value, 33, 44, 55); ASSERT (strlen (result) >= 3 + 3 && strisnan (result, 0, strlen (result) - 3, 0) && strcmp (result + strlen (result) - 3, " 33") == 0); ASSERT (retval == strlen (result)); } { /* Unnormalized number. */ static union { unsigned int word[4]; long double value; } x = { LDBL80_WORDS (0x4000, 0x63333333, 0x00000000) }; char result[100]; int retval = my_snprintf (result, sizeof (result), "%La %d", x.value, 33, 44, 55); ASSERT (strlen (result) >= 3 + 3 && strisnan (result, 0, strlen (result) - 3, 0) && strcmp (result + strlen (result) - 3, " 33") == 0); ASSERT (retval == strlen (result)); } { /* Pseudo-Denormal. */ static union { unsigned int word[4]; long double value; } x = { LDBL80_WORDS (0x0000, 0x83333333, 0x00000000) }; char result[100]; int retval = my_snprintf (result, sizeof (result), "%La %d", x.value, 33, 44, 55); ASSERT (strlen (result) >= 3 + 3 && strisnan (result, 0, strlen (result) - 3, 0) && strcmp (result + strlen (result) - 3, " 33") == 0); ASSERT (retval == strlen (result)); } #endif { /* Rounding near the decimal point. */ char result[100]; int retval = my_snprintf (result, sizeof (result), "%.0La %d", 1.5L, 33, 44, 55); ASSERT (strcmp (result, "0x2p+0 33") == 0 || strcmp (result, "0x3p-1 33") == 0 || strcmp (result, "0x6p-2 33") == 0 || strcmp (result, "0xcp-3 33") == 0); ASSERT (retval == strlen (result)); } { /* Rounding with precision 0. */ char result[100]; int retval = my_snprintf (result, sizeof (result), "%.0La %d", 1.51L, 33, 44, 55); ASSERT (strcmp (result, "0x2p+0 33") == 0 || strcmp (result, "0x3p-1 33") == 0 || strcmp (result, "0x6p-2 33") == 0 || strcmp (result, "0xcp-3 33") == 0); ASSERT (retval == strlen (result)); } { /* Rounding with precision 1. */ char result[100]; int retval = my_snprintf (result, sizeof (result), "%.1La %d", 1.51L, 33, 44, 55); ASSERT (strcmp (result, "0x1.8p+0 33") == 0 || strcmp (result, "0x3.0p-1 33") == 0 || strcmp (result, "0x6.1p-2 33") == 0 || strcmp (result, "0xc.1p-3 33") == 0); ASSERT (retval == strlen (result)); } { /* Rounding with precision 2. */ char result[100]; int retval = my_snprintf (result, sizeof (result), "%.2La %d", 1.51L, 33, 44, 55); ASSERT (strcmp (result, "0x1.83p+0 33") == 0 || strcmp (result, "0x3.05p-1 33") == 0 || strcmp (result, "0x6.0ap-2 33") == 0 || strcmp (result, "0xc.14p-3 33") == 0); ASSERT (retval == strlen (result)); } { /* Rounding with precision 3. */ char result[100]; int retval = my_snprintf (result, sizeof (result), "%.3La %d", 1.51L, 33, 44, 55); ASSERT (strcmp (result, "0x1.829p+0 33") == 0 || strcmp (result, "0x3.052p-1 33") == 0 || strcmp (result, "0x6.0a4p-2 33") == 0 || strcmp (result, "0xc.148p-3 33") == 0); ASSERT (retval == strlen (result)); } { /* Rounding can turn a ...FFF into a ...000. */ char result[100]; int retval = my_snprintf (result, sizeof (result), "%.3La %d", 1.49999L, 33, 44, 55); ASSERT (strcmp (result, "0x1.800p+0 33") == 0 || strcmp (result, "0x3.000p-1 33") == 0 || strcmp (result, "0x6.000p-2 33") == 0 || strcmp (result, "0xc.000p-3 33") == 0); ASSERT (retval == strlen (result)); } { /* Rounding can turn a ...FFF into a ...000. This shows a MacOS X 10.3.9 (Darwin 7.9) bug and a glibc 2.4 bug . */ char result[100]; int retval = my_snprintf (result, sizeof (result), "%.1La %d", 1.999L, 33, 44, 55); ASSERT (strcmp (result, "0x1.0p+1 33") == 0 || strcmp (result, "0x2.0p+0 33") == 0 || strcmp (result, "0x4.0p-1 33") == 0 || strcmp (result, "0x8.0p-2 33") == 0); ASSERT (retval == strlen (result)); } { /* Width. */ char result[100]; int retval = my_snprintf (result, sizeof (result), "%10La %d", 1.75L, 33, 44, 55); ASSERT (strcmp (result, " 0x1.cp+0 33") == 0 || strcmp (result, " 0x3.8p-1 33") == 0 || strcmp (result, " 0x7p-2 33") == 0 || strcmp (result, " 0xep-3 33") == 0); ASSERT (retval == strlen (result)); } { /* Small precision. */ char result[100]; int retval = my_snprintf (result, sizeof (result), "%.10La %d", 1.75L, 33, 44, 55); ASSERT (strcmp (result, "0x1.c000000000p+0 33") == 0 || strcmp (result, "0x3.8000000000p-1 33") == 0 || strcmp (result, "0x7.0000000000p-2 33") == 0 || strcmp (result, "0xe.0000000000p-3 33") == 0); ASSERT (retval == strlen (result)); } { /* Large precision. */ char result[100]; int retval = my_snprintf (result, sizeof (result), "%.50La %d", 1.75L, 33, 44, 55); ASSERT (strcmp (result, "0x1.c0000000000000000000000000000000000000000000000000p+0 33") == 0 || strcmp (result, "0x3.80000000000000000000000000000000000000000000000000p-1 33") == 0 || strcmp (result, "0x7.00000000000000000000000000000000000000000000000000p-2 33") == 0 || strcmp (result, "0xe.00000000000000000000000000000000000000000000000000p-3 33") == 0); ASSERT (retval == strlen (result)); } { /* FLAG_LEFT. */ char result[100]; int retval = my_snprintf (result, sizeof (result), "%-10La %d", 1.75L, 33, 44, 55); ASSERT (strcmp (result, "0x1.cp+0 33") == 0 || strcmp (result, "0x3.8p-1 33") == 0 || strcmp (result, "0x7p-2 33") == 0 || strcmp (result, "0xep-3 33") == 0); ASSERT (retval == strlen (result)); } { /* FLAG_SHOWSIGN. */ char result[100]; int retval = my_snprintf (result, sizeof (result), "%+La %d", 1.75L, 33, 44, 55); ASSERT (strcmp (result, "+0x1.cp+0 33") == 0 || strcmp (result, "+0x3.8p-1 33") == 0 || strcmp (result, "+0x7p-2 33") == 0 || strcmp (result, "+0xep-3 33") == 0); ASSERT (retval == strlen (result)); } { /* FLAG_SPACE. */ char result[100]; int retval = my_snprintf (result, sizeof (result), "% La %d", 1.75L, 33, 44, 55); ASSERT (strcmp (result, " 0x1.cp+0 33") == 0 || strcmp (result, " 0x3.8p-1 33") == 0 || strcmp (result, " 0x7p-2 33") == 0 || strcmp (result, " 0xep-3 33") == 0); ASSERT (retval == strlen (result)); } { /* FLAG_ALT. */ char result[100]; int retval = my_snprintf (result, sizeof (result), "%#La %d", 1.75L, 33, 44, 55); ASSERT (strcmp (result, "0x1.cp+0 33") == 0 || strcmp (result, "0x3.8p-1 33") == 0 || strcmp (result, "0x7.p-2 33") == 0 || strcmp (result, "0xe.p-3 33") == 0); ASSERT (retval == strlen (result)); } { /* FLAG_ALT. */ char result[100]; int retval = my_snprintf (result, sizeof (result), "%#La %d", 1.0L, 33, 44, 55); ASSERT (strcmp (result, "0x1.p+0 33") == 0 || strcmp (result, "0x2.p-1 33") == 0 || strcmp (result, "0x4.p-2 33") == 0 || strcmp (result, "0x8.p-3 33") == 0); ASSERT (retval == strlen (result)); } { /* FLAG_ZERO with finite number. */ char result[100]; int retval = my_snprintf (result, sizeof (result), "%010La %d", 1.75L, 33, 44, 55); ASSERT (strcmp (result, "0x001.cp+0 33") == 0 || strcmp (result, "0x003.8p-1 33") == 0 || strcmp (result, "0x00007p-2 33") == 0 || strcmp (result, "0x0000ep-3 33") == 0); ASSERT (retval == strlen (result)); } { /* FLAG_ZERO with infinite number. */ char result[100]; int retval = my_snprintf (result, sizeof (result), "%010La %d", 1.0L / 0.0L, 33, 44, 55); /* "0000000inf 33" is not a valid result; see */ ASSERT (strcmp (result, " inf 33") == 0); ASSERT (retval == strlen (result)); } { /* FLAG_ZERO with NaN. */ char result[100]; int retval = my_snprintf (result, sizeof (result), "%050La %d", NaNl (), 33, 44, 55); /* "0000000nan 33" is not a valid result; see */ ASSERT (strlen (result) == 50 + 3 && strisnan (result, strspn (result, " "), strlen (result) - 3, 0) && strcmp (result + strlen (result) - 3, " 33") == 0); ASSERT (retval == strlen (result)); } /* Test the support of the %f format directive. */ { /* A positive number. */ char result[100]; int retval = my_snprintf (result, sizeof (result), "%f %d", 12.75, 33, 44, 55); ASSERT (strcmp (result, "12.750000 33") == 0); ASSERT (retval == strlen (result)); } { /* A larger positive number. */ char result[100]; int retval = my_snprintf (result, sizeof (result), "%f %d", 1234567.0, 33, 44, 55); ASSERT (strcmp (result, "1234567.000000 33") == 0); ASSERT (retval == strlen (result)); } { /* Small and large positive numbers. */ static struct { double value; const char *string; } data[] = { { 1.234321234321234e-37, "0.000000" }, { 1.234321234321234e-36, "0.000000" }, { 1.234321234321234e-35, "0.000000" }, { 1.234321234321234e-34, "0.000000" }, { 1.234321234321234e-33, "0.000000" }, { 1.234321234321234e-32, "0.000000" }, { 1.234321234321234e-31, "0.000000" }, { 1.234321234321234e-30, "0.000000" }, { 1.234321234321234e-29, "0.000000" }, { 1.234321234321234e-28, "0.000000" }, { 1.234321234321234e-27, "0.000000" }, { 1.234321234321234e-26, "0.000000" }, { 1.234321234321234e-25, "0.000000" }, { 1.234321234321234e-24, "0.000000" }, { 1.234321234321234e-23, "0.000000" }, { 1.234321234321234e-22, "0.000000" }, { 1.234321234321234e-21, "0.000000" }, { 1.234321234321234e-20, "0.000000" }, { 1.234321234321234e-19, "0.000000" }, { 1.234321234321234e-18, "0.000000" }, { 1.234321234321234e-17, "0.000000" }, { 1.234321234321234e-16, "0.000000" }, { 1.234321234321234e-15, "0.000000" }, { 1.234321234321234e-14, "0.000000" }, { 1.234321234321234e-13, "0.000000" }, { 1.234321234321234e-12, "0.000000" }, { 1.234321234321234e-11, "0.000000" }, { 1.234321234321234e-10, "0.000000" }, { 1.234321234321234e-9, "0.000000" }, { 1.234321234321234e-8, "0.000000" }, { 1.234321234321234e-7, "0.000000" }, { 1.234321234321234e-6, "0.000001" }, { 1.234321234321234e-5, "0.000012" }, { 1.234321234321234e-4, "0.000123" }, { 1.234321234321234e-3, "0.001234" }, { 1.234321234321234e-2, "0.012343" }, { 1.234321234321234e-1, "0.123432" }, { 1.234321234321234, "1.234321" }, { 1.234321234321234e1, "12.343212" }, { 1.234321234321234e2, "123.432123" }, { 1.234321234321234e3, "1234.321234" }, { 1.234321234321234e4, "12343.212343" }, { 1.234321234321234e5, "123432.123432" }, { 1.234321234321234e6, "1234321.234321" }, { 1.234321234321234e7, "12343212.343212" }, { 1.234321234321234e8, "123432123.432123" }, { 1.234321234321234e9, "1234321234.321234" }, { 1.234321234321234e10, "12343212343.2123**" }, { 1.234321234321234e11, "123432123432.123***" }, { 1.234321234321234e12, "1234321234321.23****" }, { 1.234321234321234e13, "12343212343212.3*****" }, { 1.234321234321234e14, "123432123432123.******" }, { 1.234321234321234e15, "1234321234321234.000000" }, { 1.234321234321234e16, "123432123432123**.000000" }, { 1.234321234321234e17, "123432123432123***.000000" }, { 1.234321234321234e18, "123432123432123****.000000" }, { 1.234321234321234e19, "123432123432123*****.000000" }, { 1.234321234321234e20, "123432123432123******.000000" }, { 1.234321234321234e21, "123432123432123*******.000000" }, { 1.234321234321234e22, "123432123432123********.000000" }, { 1.234321234321234e23, "123432123432123*********.000000" }, { 1.234321234321234e24, "123432123432123**********.000000" }, { 1.234321234321234e25, "123432123432123***********.000000" }, { 1.234321234321234e26, "123432123432123************.000000" }, { 1.234321234321234e27, "123432123432123*************.000000" }, { 1.234321234321234e28, "123432123432123**************.000000" }, { 1.234321234321234e29, "123432123432123***************.000000" }, { 1.234321234321234e30, "123432123432123****************.000000" }, { 1.234321234321234e31, "123432123432123*****************.000000" }, { 1.234321234321234e32, "123432123432123******************.000000" }, { 1.234321234321234e33, "123432123432123*******************.000000" }, { 1.234321234321234e34, "123432123432123********************.000000" }, { 1.234321234321234e35, "123432123432123*********************.000000" }, { 1.234321234321234e36, "123432123432123**********************.000000" } }; size_t k; for (k = 0; k < SIZEOF (data); k++) { char result[100]; int retval = my_snprintf (result, sizeof (result), "%f", data[k].value); ASSERT (strmatch (data[k].string, result)); ASSERT (retval == strlen (result)); } } { /* A negative number. */ char result[100]; int retval = my_snprintf (result, sizeof (result), "%f %d", -0.03125, 33, 44, 55); ASSERT (strcmp (result, "-0.031250 33") == 0); ASSERT (retval == strlen (result)); } { /* Positive zero. */ char result[100]; int retval = my_snprintf (result, sizeof (result), "%f %d", 0.0, 33, 44, 55); ASSERT (strcmp (result, "0.000000 33") == 0); ASSERT (retval == strlen (result)); } { /* Negative zero. */ char result[100]; int retval = my_snprintf (result, sizeof (result), "%f %d", -zerod, 33, 44, 55); if (have_minus_zero ()) ASSERT (strcmp (result, "-0.000000 33") == 0); ASSERT (retval == strlen (result)); } { /* Positive infinity. */ char result[100]; int retval = my_snprintf (result, sizeof (result), "%f %d", 1.0 / 0.0, 33, 44, 55); ASSERT (strcmp (result, "inf 33") == 0 || strcmp (result, "infinity 33") == 0); ASSERT (retval == strlen (result)); } { /* Negative infinity. */ char result[100]; int retval = my_snprintf (result, sizeof (result), "%f %d", -1.0 / 0.0, 33, 44, 55); ASSERT (strcmp (result, "-inf 33") == 0 || strcmp (result, "-infinity 33") == 0); ASSERT (retval == strlen (result)); } { /* NaN. */ char result[100]; int retval = my_snprintf (result, sizeof (result), "%f %d", NaNd (), 33, 44, 55); ASSERT (strlen (result) >= 3 + 3 && strisnan (result, 0, strlen (result) - 3, 0) && strcmp (result + strlen (result) - 3, " 33") == 0); ASSERT (retval == strlen (result)); } { /* Width. */ char result[100]; int retval = my_snprintf (result, sizeof (result), "%10f %d", 1.75, 33, 44, 55); ASSERT (strcmp (result, " 1.750000 33") == 0); ASSERT (retval == strlen (result)); } { /* FLAG_LEFT. */ char result[100]; int retval = my_snprintf (result, sizeof (result), "%-10f %d", 1.75, 33, 44, 55); ASSERT (strcmp (result, "1.750000 33") == 0); ASSERT (retval == strlen (result)); } { /* FLAG_SHOWSIGN. */ char result[100]; int retval = my_snprintf (result, sizeof (result), "%+f %d", 1.75, 33, 44, 55); ASSERT (strcmp (result, "+1.750000 33") == 0); ASSERT (retval == strlen (result)); } { /* FLAG_SPACE. */ char result[100]; int retval = my_snprintf (result, sizeof (result), "% f %d", 1.75, 33, 44, 55); ASSERT (strcmp (result, " 1.750000 33") == 0); ASSERT (retval == strlen (result)); } { /* FLAG_ALT. */ char result[100]; int retval = my_snprintf (result, sizeof (result), "%#f %d", 1.75, 33, 44, 55); ASSERT (strcmp (result, "1.750000 33") == 0); ASSERT (retval == strlen (result)); } { /* FLAG_ALT. */ char result[100]; int retval = my_snprintf (result, sizeof (result), "%#.f %d", 1.75, 33, 44, 55); ASSERT (strcmp (result, "2. 33") == 0); ASSERT (retval == strlen (result)); } { /* FLAG_ZERO with finite number. */ char result[100]; int retval = my_snprintf (result, sizeof (result), "%015f %d", 1234.0, 33, 44, 55); ASSERT (strcmp (result, "00001234.000000 33") == 0); ASSERT (retval == strlen (result)); } { /* FLAG_ZERO with infinite number. */ char result[100]; int retval = my_snprintf (result, sizeof (result), "%015f %d", -1.0 / 0.0, 33, 44, 55); ASSERT (strcmp (result, " -inf 33") == 0 || strcmp (result, " -infinity 33") == 0); ASSERT (retval == strlen (result)); } { /* FLAG_ZERO with NaN. */ char result[100]; int retval = my_snprintf (result, sizeof (result), "%050f %d", NaNd (), 33, 44, 55); ASSERT (strlen (result) == 50 + 3 && strisnan (result, strspn (result, " "), strlen (result) - 3, 0) && strcmp (result + strlen (result) - 3, " 33") == 0); ASSERT (retval == strlen (result)); } { /* Precision. */ char result[100]; int retval = my_snprintf (result, sizeof (result), "%.f %d", 1234.0, 33, 44, 55); ASSERT (strcmp (result, "1234 33") == 0); ASSERT (retval == strlen (result)); } { /* Precision with no rounding. */ char result[100]; int retval = my_snprintf (result, sizeof (result), "%.2f %d", 999.951, 33, 44, 55); ASSERT (strcmp (result, "999.95 33") == 0); ASSERT (retval == strlen (result)); } { /* Precision with rounding. */ char result[100]; int retval = my_snprintf (result, sizeof (result), "%.2f %d", 999.996, 33, 44, 55); ASSERT (strcmp (result, "1000.00 33") == 0); ASSERT (retval == strlen (result)); } { /* A positive number. */ char result[100]; int retval = my_snprintf (result, sizeof (result), "%Lf %d", 12.75L, 33, 44, 55); ASSERT (strcmp (result, "12.750000 33") == 0); ASSERT (retval == strlen (result)); } { /* A larger positive number. */ char result[100]; int retval = my_snprintf (result, sizeof (result), "%Lf %d", 1234567.0L, 33, 44, 55); ASSERT (strcmp (result, "1234567.000000 33") == 0); ASSERT (retval == strlen (result)); } { /* Small and large positive numbers. */ static struct { long double value; const char *string; } data[] = { { 1.234321234321234e-37L, "0.000000" }, { 1.234321234321234e-36L, "0.000000" }, { 1.234321234321234e-35L, "0.000000" }, { 1.234321234321234e-34L, "0.000000" }, { 1.234321234321234e-33L, "0.000000" }, { 1.234321234321234e-32L, "0.000000" }, { 1.234321234321234e-31L, "0.000000" }, { 1.234321234321234e-30L, "0.000000" }, { 1.234321234321234e-29L, "0.000000" }, { 1.234321234321234e-28L, "0.000000" }, { 1.234321234321234e-27L, "0.000000" }, { 1.234321234321234e-26L, "0.000000" }, { 1.234321234321234e-25L, "0.000000" }, { 1.234321234321234e-24L, "0.000000" }, { 1.234321234321234e-23L, "0.000000" }, { 1.234321234321234e-22L, "0.000000" }, { 1.234321234321234e-21L, "0.000000" }, { 1.234321234321234e-20L, "0.000000" }, { 1.234321234321234e-19L, "0.000000" }, { 1.234321234321234e-18L, "0.000000" }, { 1.234321234321234e-17L, "0.000000" }, { 1.234321234321234e-16L, "0.000000" }, { 1.234321234321234e-15L, "0.000000" }, { 1.234321234321234e-14L, "0.000000" }, { 1.234321234321234e-13L, "0.000000" }, { 1.234321234321234e-12L, "0.000000" }, { 1.234321234321234e-11L, "0.000000" }, { 1.234321234321234e-10L, "0.000000" }, { 1.234321234321234e-9L, "0.000000" }, { 1.234321234321234e-8L, "0.000000" }, { 1.234321234321234e-7L, "0.000000" }, { 1.234321234321234e-6L, "0.000001" }, { 1.234321234321234e-5L, "0.000012" }, { 1.234321234321234e-4L, "0.000123" }, { 1.234321234321234e-3L, "0.001234" }, { 1.234321234321234e-2L, "0.012343" }, { 1.234321234321234e-1L, "0.123432" }, { 1.234321234321234L, "1.234321" }, { 1.234321234321234e1L, "12.343212" }, { 1.234321234321234e2L, "123.432123" }, { 1.234321234321234e3L, "1234.321234" }, { 1.234321234321234e4L, "12343.212343" }, { 1.234321234321234e5L, "123432.123432" }, { 1.234321234321234e6L, "1234321.234321" }, { 1.234321234321234e7L, "12343212.343212" }, { 1.234321234321234e8L, "123432123.432123" }, { 1.234321234321234e9L, "1234321234.321234" }, { 1.234321234321234e10L, "12343212343.2123**" }, { 1.234321234321234e11L, "123432123432.123***" }, { 1.234321234321234e12L, "1234321234321.23****" }, { 1.234321234321234e13L, "12343212343212.3*****" }, { 1.234321234321234e14L, "123432123432123.******" }, { 1.234321234321234e15L, "1234321234321234.000000" }, { 1.234321234321234e16L, "123432123432123**.000000" }, { 1.234321234321234e17L, "123432123432123***.000000" }, { 1.234321234321234e18L, "123432123432123****.000000" }, { 1.234321234321234e19L, "123432123432123*****.000000" }, { 1.234321234321234e20L, "123432123432123******.000000" }, { 1.234321234321234e21L, "123432123432123*******.000000" }, { 1.234321234321234e22L, "123432123432123********.000000" }, { 1.234321234321234e23L, "123432123432123*********.000000" }, { 1.234321234321234e24L, "123432123432123**********.000000" }, { 1.234321234321234e25L, "123432123432123***********.000000" }, { 1.234321234321234e26L, "123432123432123************.000000" }, { 1.234321234321234e27L, "123432123432123*************.000000" }, { 1.234321234321234e28L, "123432123432123**************.000000" }, { 1.234321234321234e29L, "123432123432123***************.000000" }, { 1.234321234321234e30L, "123432123432123****************.000000" }, { 1.234321234321234e31L, "123432123432123*****************.000000" }, { 1.234321234321234e32L, "123432123432123******************.000000" }, { 1.234321234321234e33L, "123432123432123*******************.000000" }, { 1.234321234321234e34L, "123432123432123********************.000000" }, { 1.234321234321234e35L, "123432123432123*********************.000000" }, { 1.234321234321234e36L, "123432123432123**********************.000000" } }; size_t k; for (k = 0; k < SIZEOF (data); k++) { char result[100]; int retval = my_snprintf (result, sizeof (result), "%Lf", data[k].value); ASSERT (strmatch (data[k].string, result)); ASSERT (retval == strlen (result)); } } { /* A negative number. */ char result[100]; int retval = my_snprintf (result, sizeof (result), "%Lf %d", -0.03125L, 33, 44, 55); ASSERT (strcmp (result, "-0.031250 33") == 0); ASSERT (retval == strlen (result)); } { /* Positive zero. */ char result[100]; int retval = my_snprintf (result, sizeof (result), "%Lf %d", 0.0L, 33, 44, 55); ASSERT (strcmp (result, "0.000000 33") == 0); ASSERT (retval == strlen (result)); } { /* Negative zero. */ char result[100]; int retval = my_snprintf (result, sizeof (result), "%Lf %d", minus_zerol, 33, 44, 55); if (have_minus_zero ()) ASSERT (strcmp (result, "-0.000000 33") == 0); ASSERT (retval == strlen (result)); } { /* Positive infinity. */ char result[100]; int retval = my_snprintf (result, sizeof (result), "%Lf %d", 1.0L / 0.0L, 33, 44, 55); ASSERT (strcmp (result, "inf 33") == 0 || strcmp (result, "infinity 33") == 0); ASSERT (retval == strlen (result)); } { /* Negative infinity. */ char result[100]; int retval = my_snprintf (result, sizeof (result), "%Lf %d", -1.0L / 0.0L, 33, 44, 55); ASSERT (strcmp (result, "-inf 33") == 0 || strcmp (result, "-infinity 33") == 0); ASSERT (retval == strlen (result)); } { /* NaN. */ char result[100]; int retval = my_snprintf (result, sizeof (result), "%Lf %d", NaNl (), 33, 44, 55); ASSERT (strlen (result) >= 3 + 3 && strisnan (result, 0, strlen (result) - 3, 0) && strcmp (result + strlen (result) - 3, " 33") == 0); ASSERT (retval == strlen (result)); } #if CHECK_PRINTF_SAFE && ((defined __ia64 && LDBL_MANT_DIG == 64) || (defined __x86_64__ || defined __amd64__) || (defined __i386 || defined __i386__ || defined _I386 || defined _M_IX86 || defined _X86_)) { /* Quiet NaN. */ static union { unsigned int word[4]; long double value; } x = { LDBL80_WORDS (0xFFFF, 0xC3333333, 0x00000000) }; char result[100]; int retval = my_snprintf (result, sizeof (result), "%Lf %d", x.value, 33, 44, 55); ASSERT (strlen (result) >= 3 + 3 && strisnan (result, 0, strlen (result) - 3, 0) && strcmp (result + strlen (result) - 3, " 33") == 0); ASSERT (retval == strlen (result)); } { /* Signalling NaN. */ static union { unsigned int word[4]; long double value; } x = { LDBL80_WORDS (0xFFFF, 0x83333333, 0x00000000) }; char result[100]; int retval = my_snprintf (result, sizeof (result), "%Lf %d", x.value, 33, 44, 55); ASSERT (strlen (result) >= 3 + 3 && strisnan (result, 0, strlen (result) - 3, 0) && strcmp (result + strlen (result) - 3, " 33") == 0); ASSERT (retval == strlen (result)); } /* The isnanl function should recognize Pseudo-NaNs, Pseudo-Infinities, Pseudo-Zeroes, Unnormalized Numbers, and Pseudo-Denormals, as defined in Intel IA-64 Architecture Software Developer's Manual, Volume 1: Application Architecture. Table 5-2 "Floating-Point Register Encodings" Figure 5-6 "Memory to Floating-Point Register Data Translation" */ { /* Pseudo-NaN. */ static union { unsigned int word[4]; long double value; } x = { LDBL80_WORDS (0xFFFF, 0x40000001, 0x00000000) }; char result[100]; int retval = my_snprintf (result, sizeof (result), "%Lf %d", x.value, 33, 44, 55); ASSERT (strlen (result) >= 3 + 3 && strisnan (result, 0, strlen (result) - 3, 0) && strcmp (result + strlen (result) - 3, " 33") == 0); ASSERT (retval == strlen (result)); } { /* Pseudo-Infinity. */ static union { unsigned int word[4]; long double value; } x = { LDBL80_WORDS (0xFFFF, 0x00000000, 0x00000000) }; char result[100]; int retval = my_snprintf (result, sizeof (result), "%Lf %d", x.value, 33, 44, 55); ASSERT (strlen (result) >= 3 + 3 && strisnan (result, 0, strlen (result) - 3, 0) && strcmp (result + strlen (result) - 3, " 33") == 0); ASSERT (retval == strlen (result)); } { /* Pseudo-Zero. */ static union { unsigned int word[4]; long double value; } x = { LDBL80_WORDS (0x4004, 0x00000000, 0x00000000) }; char result[100]; int retval = my_snprintf (result, sizeof (result), "%Lf %d", x.value, 33, 44, 55); ASSERT (strlen (result) >= 3 + 3 && strisnan (result, 0, strlen (result) - 3, 0) && strcmp (result + strlen (result) - 3, " 33") == 0); ASSERT (retval == strlen (result)); } { /* Unnormalized number. */ static union { unsigned int word[4]; long double value; } x = { LDBL80_WORDS (0x4000, 0x63333333, 0x00000000) }; char result[100]; int retval = my_snprintf (result, sizeof (result), "%Lf %d", x.value, 33, 44, 55); ASSERT (strlen (result) >= 3 + 3 && strisnan (result, 0, strlen (result) - 3, 0) && strcmp (result + strlen (result) - 3, " 33") == 0); ASSERT (retval == strlen (result)); } { /* Pseudo-Denormal. */ static union { unsigned int word[4]; long double value; } x = { LDBL80_WORDS (0x0000, 0x83333333, 0x00000000) }; char result[100]; int retval = my_snprintf (result, sizeof (result), "%Lf %d", x.value, 33, 44, 55); ASSERT (strlen (result) >= 3 + 3 && strisnan (result, 0, strlen (result) - 3, 0) && strcmp (result + strlen (result) - 3, " 33") == 0); ASSERT (retval == strlen (result)); } #endif { /* Width. */ char result[100]; int retval = my_snprintf (result, sizeof (result), "%10Lf %d", 1.75L, 33, 44, 55); ASSERT (strcmp (result, " 1.750000 33") == 0); ASSERT (retval == strlen (result)); } { /* FLAG_LEFT. */ char result[100]; int retval = my_snprintf (result, sizeof (result), "%-10Lf %d", 1.75L, 33, 44, 55); ASSERT (strcmp (result, "1.750000 33") == 0); ASSERT (retval == strlen (result)); } { /* FLAG_SHOWSIGN. */ char result[100]; int retval = my_snprintf (result, sizeof (result), "%+Lf %d", 1.75L, 33, 44, 55); ASSERT (strcmp (result, "+1.750000 33") == 0); ASSERT (retval == strlen (result)); } { /* FLAG_SPACE. */ char result[100]; int retval = my_snprintf (result, sizeof (result), "% Lf %d", 1.75L, 33, 44, 55); ASSERT (strcmp (result, " 1.750000 33") == 0); ASSERT (retval == strlen (result)); } { /* FLAG_ALT. */ char result[100]; int retval = my_snprintf (result, sizeof (result), "%#Lf %d", 1.75L, 33, 44, 55); ASSERT (strcmp (result, "1.750000 33") == 0); ASSERT (retval == strlen (result)); } { /* FLAG_ALT. */ char result[100]; int retval = my_snprintf (result, sizeof (result), "%#.Lf %d", 1.75L, 33, 44, 55); ASSERT (strcmp (result, "2. 33") == 0); ASSERT (retval == strlen (result)); } { /* FLAG_ZERO with finite number. */ char result[100]; int retval = my_snprintf (result, sizeof (result), "%015Lf %d", 1234.0L, 33, 44, 55); ASSERT (strcmp (result, "00001234.000000 33") == 0); ASSERT (retval == strlen (result)); } { /* FLAG_ZERO with infinite number. */ char result[100]; int retval = my_snprintf (result, sizeof (result), "%015Lf %d", -1.0L / 0.0L, 33, 44, 55); ASSERT (strcmp (result, " -inf 33") == 0 || strcmp (result, " -infinity 33") == 0); ASSERT (retval == strlen (result)); } { /* FLAG_ZERO with NaN. */ char result[100]; int retval = my_snprintf (result, sizeof (result), "%050Lf %d", NaNl (), 33, 44, 55); ASSERT (strlen (result) == 50 + 3 && strisnan (result, strspn (result, " "), strlen (result) - 3, 0) && strcmp (result + strlen (result) - 3, " 33") == 0); ASSERT (retval == strlen (result)); } { /* Precision. */ char result[100]; int retval = my_snprintf (result, sizeof (result), "%.Lf %d", 1234.0L, 33, 44, 55); ASSERT (strcmp (result, "1234 33") == 0); ASSERT (retval == strlen (result)); } { /* Precision with no rounding. */ char result[100]; int retval = my_snprintf (result, sizeof (result), "%.2Lf %d", 999.951L, 33, 44, 55); ASSERT (strcmp (result, "999.95 33") == 0); ASSERT (retval == strlen (result)); } { /* Precision with rounding. */ char result[100]; int retval = my_snprintf (result, sizeof (result), "%.2Lf %d", 999.996L, 33, 44, 55); ASSERT (strcmp (result, "1000.00 33") == 0); ASSERT (retval == strlen (result)); } /* Test the support of the %F format directive. */ { /* A positive number. */ char result[100]; int retval = my_snprintf (result, sizeof (result), "%F %d", 12.75, 33, 44, 55); ASSERT (strcmp (result, "12.750000 33") == 0); ASSERT (retval == strlen (result)); } { /* A larger positive number. */ char result[100]; int retval = my_snprintf (result, sizeof (result), "%F %d", 1234567.0, 33, 44, 55); ASSERT (strcmp (result, "1234567.000000 33") == 0); ASSERT (retval == strlen (result)); } { /* A negative number. */ char result[100]; int retval = my_snprintf (result, sizeof (result), "%F %d", -0.03125, 33, 44, 55); ASSERT (strcmp (result, "-0.031250 33") == 0); ASSERT (retval == strlen (result)); } { /* Positive zero. */ char result[100]; int retval = my_snprintf (result, sizeof (result), "%F %d", 0.0, 33, 44, 55); ASSERT (strcmp (result, "0.000000 33") == 0); ASSERT (retval == strlen (result)); } { /* Negative zero. */ char result[100]; int retval = my_snprintf (result, sizeof (result), "%F %d", -zerod, 33, 44, 55); if (have_minus_zero ()) ASSERT (strcmp (result, "-0.000000 33") == 0); ASSERT (retval == strlen (result)); } { /* Positive infinity. */ char result[100]; int retval = my_snprintf (result, sizeof (result), "%F %d", 1.0 / 0.0, 33, 44, 55); ASSERT (strcmp (result, "INF 33") == 0 || strcmp (result, "INFINITY 33") == 0); ASSERT (retval == strlen (result)); } { /* Negative infinity. */ char result[100]; int retval = my_snprintf (result, sizeof (result), "%F %d", -1.0 / 0.0, 33, 44, 55); ASSERT (strcmp (result, "-INF 33") == 0 || strcmp (result, "-INFINITY 33") == 0); ASSERT (retval == strlen (result)); } { /* NaN. */ char result[100]; int retval = my_snprintf (result, sizeof (result), "%F %d", NaNd (), 33, 44, 55); ASSERT (strlen (result) >= 3 + 3 && strisnan (result, 0, strlen (result) - 3, 1) && strcmp (result + strlen (result) - 3, " 33") == 0); ASSERT (retval == strlen (result)); } { /* FLAG_ZERO. */ char result[100]; int retval = my_snprintf (result, sizeof (result), "%015F %d", 1234.0, 33, 44, 55); ASSERT (strcmp (result, "00001234.000000 33") == 0); ASSERT (retval == strlen (result)); } { /* FLAG_ZERO with infinite number. */ char result[100]; int retval = my_snprintf (result, sizeof (result), "%015F %d", -1.0 / 0.0, 33, 44, 55); ASSERT (strcmp (result, " -INF 33") == 0 || strcmp (result, " -INFINITY 33") == 0); ASSERT (retval == strlen (result)); } { /* Precision. */ char result[100]; int retval = my_snprintf (result, sizeof (result), "%.F %d", 1234.0, 33, 44, 55); ASSERT (strcmp (result, "1234 33") == 0); ASSERT (retval == strlen (result)); } { /* Precision with no rounding. */ char result[100]; int retval = my_snprintf (result, sizeof (result), "%.2F %d", 999.951, 33, 44, 55); ASSERT (strcmp (result, "999.95 33") == 0); ASSERT (retval == strlen (result)); } { /* Precision with rounding. */ char result[100]; int retval = my_snprintf (result, sizeof (result), "%.2F %d", 999.996, 33, 44, 55); ASSERT (strcmp (result, "1000.00 33") == 0); ASSERT (retval == strlen (result)); } { /* A positive number. */ char result[100]; int retval = my_snprintf (result, sizeof (result), "%LF %d", 12.75L, 33, 44, 55); ASSERT (strcmp (result, "12.750000 33") == 0); ASSERT (retval == strlen (result)); } { /* A larger positive number. */ char result[100]; int retval = my_snprintf (result, sizeof (result), "%LF %d", 1234567.0L, 33, 44, 55); ASSERT (strcmp (result, "1234567.000000 33") == 0); ASSERT (retval == strlen (result)); } { /* A negative number. */ char result[100]; int retval = my_snprintf (result, sizeof (result), "%LF %d", -0.03125L, 33, 44, 55); ASSERT (strcmp (result, "-0.031250 33") == 0); ASSERT (retval == strlen (result)); } { /* Positive zero. */ char result[100]; int retval = my_snprintf (result, sizeof (result), "%LF %d", 0.0L, 33, 44, 55); ASSERT (strcmp (result, "0.000000 33") == 0); ASSERT (retval == strlen (result)); } { /* Negative zero. */ char result[100]; int retval = my_snprintf (result, sizeof (result), "%LF %d", minus_zerol, 33, 44, 55); if (have_minus_zero ()) ASSERT (strcmp (result, "-0.000000 33") == 0); ASSERT (retval == strlen (result)); } { /* Positive infinity. */ char result[100]; int retval = my_snprintf (result, sizeof (result), "%LF %d", 1.0L / 0.0L, 33, 44, 55); ASSERT (strcmp (result, "INF 33") == 0 || strcmp (result, "INFINITY 33") == 0); ASSERT (retval == strlen (result)); } { /* Negative infinity. */ char result[100]; int retval = my_snprintf (result, sizeof (result), "%LF %d", -1.0L / 0.0L, 33, 44, 55); ASSERT (strcmp (result, "-INF 33") == 0 || strcmp (result, "-INFINITY 33") == 0); ASSERT (retval == strlen (result)); } { /* NaN. */ char result[100]; int retval = my_snprintf (result, sizeof (result), "%LF %d", NaNl (), 33, 44, 55); ASSERT (strlen (result) >= 3 + 3 && strisnan (result, 0, strlen (result) - 3, 1) && strcmp (result + strlen (result) - 3, " 33") == 0); ASSERT (retval == strlen (result)); } { /* FLAG_ZERO. */ char result[100]; int retval = my_snprintf (result, sizeof (result), "%015LF %d", 1234.0L, 33, 44, 55); ASSERT (strcmp (result, "00001234.000000 33") == 0); ASSERT (retval == strlen (result)); } { /* FLAG_ZERO with infinite number. */ char result[100]; int retval = my_snprintf (result, sizeof (result), "%015LF %d", -1.0L / 0.0L, 33, 44, 55); ASSERT (strcmp (result, " -INF 33") == 0 || strcmp (result, " -INFINITY 33") == 0); ASSERT (retval == strlen (result)); } { /* Precision. */ char result[100]; int retval = my_snprintf (result, sizeof (result), "%.LF %d", 1234.0L, 33, 44, 55); ASSERT (strcmp (result, "1234 33") == 0); ASSERT (retval == strlen (result)); } { /* Precision with no rounding. */ char result[100]; int retval = my_snprintf (result, sizeof (result), "%.2LF %d", 999.951L, 33, 44, 55); ASSERT (strcmp (result, "999.95 33") == 0); ASSERT (retval == strlen (result)); } { /* Precision with rounding. */ char result[100]; int retval = my_snprintf (result, sizeof (result), "%.2LF %d", 999.996L, 33, 44, 55); ASSERT (strcmp (result, "1000.00 33") == 0); ASSERT (retval == strlen (result)); } /* Test the support of the %e format directive. */ { /* A positive number. */ char result[100]; int retval = my_snprintf (result, sizeof (result), "%e %d", 12.75, 33, 44, 55); ASSERT (strcmp (result, "1.275000e+01 33") == 0 || strcmp (result, "1.275000e+001 33") == 0); ASSERT (retval == strlen (result)); } { /* A larger positive number. */ char result[100]; int retval = my_snprintf (result, sizeof (result), "%e %d", 1234567.0, 33, 44, 55); ASSERT (strcmp (result, "1.234567e+06 33") == 0 || strcmp (result, "1.234567e+006 33") == 0); ASSERT (retval == strlen (result)); } { /* Small and large positive numbers. */ static struct { double value; const char *string; } data[] = { { 1.234321234321234e-37, "1.234321e-37" }, { 1.234321234321234e-36, "1.234321e-36" }, { 1.234321234321234e-35, "1.234321e-35" }, { 1.234321234321234e-34, "1.234321e-34" }, { 1.234321234321234e-33, "1.234321e-33" }, { 1.234321234321234e-32, "1.234321e-32" }, { 1.234321234321234e-31, "1.234321e-31" }, { 1.234321234321234e-30, "1.234321e-30" }, { 1.234321234321234e-29, "1.234321e-29" }, { 1.234321234321234e-28, "1.234321e-28" }, { 1.234321234321234e-27, "1.234321e-27" }, { 1.234321234321234e-26, "1.234321e-26" }, { 1.234321234321234e-25, "1.234321e-25" }, { 1.234321234321234e-24, "1.234321e-24" }, { 1.234321234321234e-23, "1.234321e-23" }, { 1.234321234321234e-22, "1.234321e-22" }, { 1.234321234321234e-21, "1.234321e-21" }, { 1.234321234321234e-20, "1.234321e-20" }, { 1.234321234321234e-19, "1.234321e-19" }, { 1.234321234321234e-18, "1.234321e-18" }, { 1.234321234321234e-17, "1.234321e-17" }, { 1.234321234321234e-16, "1.234321e-16" }, { 1.234321234321234e-15, "1.234321e-15" }, { 1.234321234321234e-14, "1.234321e-14" }, { 1.234321234321234e-13, "1.234321e-13" }, { 1.234321234321234e-12, "1.234321e-12" }, { 1.234321234321234e-11, "1.234321e-11" }, { 1.234321234321234e-10, "1.234321e-10" }, { 1.234321234321234e-9, "1.234321e-09" }, { 1.234321234321234e-8, "1.234321e-08" }, { 1.234321234321234e-7, "1.234321e-07" }, { 1.234321234321234e-6, "1.234321e-06" }, { 1.234321234321234e-5, "1.234321e-05" }, { 1.234321234321234e-4, "1.234321e-04" }, { 1.234321234321234e-3, "1.234321e-03" }, { 1.234321234321234e-2, "1.234321e-02" }, { 1.234321234321234e-1, "1.234321e-01" }, { 1.234321234321234, "1.234321e+00" }, { 1.234321234321234e1, "1.234321e+01" }, { 1.234321234321234e2, "1.234321e+02" }, { 1.234321234321234e3, "1.234321e+03" }, { 1.234321234321234e4, "1.234321e+04" }, { 1.234321234321234e5, "1.234321e+05" }, { 1.234321234321234e6, "1.234321e+06" }, { 1.234321234321234e7, "1.234321e+07" }, { 1.234321234321234e8, "1.234321e+08" }, { 1.234321234321234e9, "1.234321e+09" }, { 1.234321234321234e10, "1.234321e+10" }, { 1.234321234321234e11, "1.234321e+11" }, { 1.234321234321234e12, "1.234321e+12" }, { 1.234321234321234e13, "1.234321e+13" }, { 1.234321234321234e14, "1.234321e+14" }, { 1.234321234321234e15, "1.234321e+15" }, { 1.234321234321234e16, "1.234321e+16" }, { 1.234321234321234e17, "1.234321e+17" }, { 1.234321234321234e18, "1.234321e+18" }, { 1.234321234321234e19, "1.234321e+19" }, { 1.234321234321234e20, "1.234321e+20" }, { 1.234321234321234e21, "1.234321e+21" }, { 1.234321234321234e22, "1.234321e+22" }, { 1.234321234321234e23, "1.234321e+23" }, { 1.234321234321234e24, "1.234321e+24" }, { 1.234321234321234e25, "1.234321e+25" }, { 1.234321234321234e26, "1.234321e+26" }, { 1.234321234321234e27, "1.234321e+27" }, { 1.234321234321234e28, "1.234321e+28" }, { 1.234321234321234e29, "1.234321e+29" }, { 1.234321234321234e30, "1.234321e+30" }, { 1.234321234321234e31, "1.234321e+31" }, { 1.234321234321234e32, "1.234321e+32" }, { 1.234321234321234e33, "1.234321e+33" }, { 1.234321234321234e34, "1.234321e+34" }, { 1.234321234321234e35, "1.234321e+35" }, { 1.234321234321234e36, "1.234321e+36" } }; size_t k; for (k = 0; k < SIZEOF (data); k++) { char result[100]; int retval = my_snprintf (result, sizeof (result), "%e", data[k].value); const char *expected = data[k].string; ASSERT (strcmp (result, expected) == 0 /* Some implementations produce exponents with 3 digits. */ || (strlen (result) == strlen (expected) + 1 && memcmp (result, expected, strlen (expected) - 2) == 0 && result[strlen (expected) - 2] == '0' && strcmp (result + strlen (expected) - 1, expected + strlen (expected) - 2) == 0)); ASSERT (retval == strlen (result)); } } { /* A negative number. */ char result[100]; int retval = my_snprintf (result, sizeof (result), "%e %d", -0.03125, 33, 44, 55); ASSERT (strcmp (result, "-3.125000e-02 33") == 0 || strcmp (result, "-3.125000e-002 33") == 0); ASSERT (retval == strlen (result)); } { /* Positive zero. */ char result[100]; int retval = my_snprintf (result, sizeof (result), "%e %d", 0.0, 33, 44, 55); ASSERT (strcmp (result, "0.000000e+00 33") == 0 || strcmp (result, "0.000000e+000 33") == 0); ASSERT (retval == strlen (result)); } { /* Negative zero. */ char result[100]; int retval = my_snprintf (result, sizeof (result), "%e %d", -zerod, 33, 44, 55); if (have_minus_zero ()) ASSERT (strcmp (result, "-0.000000e+00 33") == 0 || strcmp (result, "-0.000000e+000 33") == 0); ASSERT (retval == strlen (result)); } { /* Positive infinity. */ char result[100]; int retval = my_snprintf (result, sizeof (result), "%e %d", 1.0 / 0.0, 33, 44, 55); ASSERT (strcmp (result, "inf 33") == 0 || strcmp (result, "infinity 33") == 0); ASSERT (retval == strlen (result)); } { /* Negative infinity. */ char result[100]; int retval = my_snprintf (result, sizeof (result), "%e %d", -1.0 / 0.0, 33, 44, 55); ASSERT (strcmp (result, "-inf 33") == 0 || strcmp (result, "-infinity 33") == 0); ASSERT (retval == strlen (result)); } { /* NaN. */ char result[100]; int retval = my_snprintf (result, sizeof (result), "%e %d", NaNd (), 33, 44, 55); ASSERT (strlen (result) >= 3 + 3 && strisnan (result, 0, strlen (result) - 3, 0) && strcmp (result + strlen (result) - 3, " 33") == 0); ASSERT (retval == strlen (result)); } { /* Width. */ char result[100]; int retval = my_snprintf (result, sizeof (result), "%15e %d", 1.75, 33, 44, 55); ASSERT (strcmp (result, " 1.750000e+00 33") == 0 || strcmp (result, " 1.750000e+000 33") == 0); ASSERT (retval == strlen (result)); } { /* FLAG_LEFT. */ char result[100]; int retval = my_snprintf (result, sizeof (result), "%-15e %d", 1.75, 33, 44, 55); ASSERT (strcmp (result, "1.750000e+00 33") == 0 || strcmp (result, "1.750000e+000 33") == 0); ASSERT (retval == strlen (result)); } { /* FLAG_SHOWSIGN. */ char result[100]; int retval = my_snprintf (result, sizeof (result), "%+e %d", 1.75, 33, 44, 55); ASSERT (strcmp (result, "+1.750000e+00 33") == 0 || strcmp (result, "+1.750000e+000 33") == 0); ASSERT (retval == strlen (result)); } { /* FLAG_SPACE. */ char result[100]; int retval = my_snprintf (result, sizeof (result), "% e %d", 1.75, 33, 44, 55); ASSERT (strcmp (result, " 1.750000e+00 33") == 0 || strcmp (result, " 1.750000e+000 33") == 0); ASSERT (retval == strlen (result)); } { /* FLAG_ALT. */ char result[100]; int retval = my_snprintf (result, sizeof (result), "%#e %d", 1.75, 33, 44, 55); ASSERT (strcmp (result, "1.750000e+00 33") == 0 || strcmp (result, "1.750000e+000 33") == 0); ASSERT (retval == strlen (result)); } { /* FLAG_ALT. */ char result[100]; int retval = my_snprintf (result, sizeof (result), "%#.e %d", 1.75, 33, 44, 55); ASSERT (strcmp (result, "2.e+00 33") == 0 || strcmp (result, "2.e+000 33") == 0); ASSERT (retval == strlen (result)); } { /* FLAG_ALT. */ char result[100]; int retval = my_snprintf (result, sizeof (result), "%#.e %d", 9.75, 33, 44, 55); ASSERT (strcmp (result, "1.e+01 33") == 0 || strcmp (result, "1.e+001 33") == 0); ASSERT (retval == strlen (result)); } { /* FLAG_ZERO with finite number. */ char result[100]; int retval = my_snprintf (result, sizeof (result), "%015e %d", 1234.0, 33, 44, 55); ASSERT (strcmp (result, "0001.234000e+03 33") == 0 || strcmp (result, "001.234000e+003 33") == 0); ASSERT (retval == strlen (result)); } { /* FLAG_ZERO with infinite number. */ char result[100]; int retval = my_snprintf (result, sizeof (result), "%015e %d", -1.0 / 0.0, 33, 44, 55); ASSERT (strcmp (result, " -inf 33") == 0 || strcmp (result, " -infinity 33") == 0); ASSERT (retval == strlen (result)); } { /* FLAG_ZERO with NaN. */ char result[100]; int retval = my_snprintf (result, sizeof (result), "%050e %d", NaNd (), 33, 44, 55); ASSERT (strlen (result) == 50 + 3 && strisnan (result, strspn (result, " "), strlen (result) - 3, 0) && strcmp (result + strlen (result) - 3, " 33") == 0); ASSERT (retval == strlen (result)); } { /* Precision. */ char result[100]; int retval = my_snprintf (result, sizeof (result), "%.e %d", 1234.0, 33, 44, 55); ASSERT (strcmp (result, "1e+03 33") == 0 || strcmp (result, "1e+003 33") == 0); ASSERT (retval == strlen (result)); } { /* Precision with no rounding. */ char result[100]; int retval = my_snprintf (result, sizeof (result), "%.4e %d", 999.951, 33, 44, 55); ASSERT (strcmp (result, "9.9995e+02 33") == 0 || strcmp (result, "9.9995e+002 33") == 0); ASSERT (retval == strlen (result)); } { /* Precision with rounding. */ char result[100]; int retval = my_snprintf (result, sizeof (result), "%.4e %d", 999.996, 33, 44, 55); ASSERT (strcmp (result, "1.0000e+03 33") == 0 || strcmp (result, "1.0000e+003 33") == 0); ASSERT (retval == strlen (result)); } { /* A positive number. */ char result[100]; int retval = my_snprintf (result, sizeof (result), "%Le %d", 12.75L, 33, 44, 55); ASSERT (strcmp (result, "1.275000e+01 33") == 0 || strcmp (result, "1.275000e+001 33") == 0); ASSERT (retval == strlen (result)); } { /* A larger positive number. */ char result[100]; int retval = my_snprintf (result, sizeof (result), "%Le %d", 1234567.0L, 33, 44, 55); ASSERT (strcmp (result, "1.234567e+06 33") == 0 || strcmp (result, "1.234567e+006 33") == 0); ASSERT (retval == strlen (result)); } { /* Small and large positive numbers. */ static struct { long double value; const char *string; } data[] = { { 1.234321234321234e-37L, "1.234321e-37" }, { 1.234321234321234e-36L, "1.234321e-36" }, { 1.234321234321234e-35L, "1.234321e-35" }, { 1.234321234321234e-34L, "1.234321e-34" }, { 1.234321234321234e-33L, "1.234321e-33" }, { 1.234321234321234e-32L, "1.234321e-32" }, { 1.234321234321234e-31L, "1.234321e-31" }, { 1.234321234321234e-30L, "1.234321e-30" }, { 1.234321234321234e-29L, "1.234321e-29" }, { 1.234321234321234e-28L, "1.234321e-28" }, { 1.234321234321234e-27L, "1.234321e-27" }, { 1.234321234321234e-26L, "1.234321e-26" }, { 1.234321234321234e-25L, "1.234321e-25" }, { 1.234321234321234e-24L, "1.234321e-24" }, { 1.234321234321234e-23L, "1.234321e-23" }, { 1.234321234321234e-22L, "1.234321e-22" }, { 1.234321234321234e-21L, "1.234321e-21" }, { 1.234321234321234e-20L, "1.234321e-20" }, { 1.234321234321234e-19L, "1.234321e-19" }, { 1.234321234321234e-18L, "1.234321e-18" }, { 1.234321234321234e-17L, "1.234321e-17" }, { 1.234321234321234e-16L, "1.234321e-16" }, { 1.234321234321234e-15L, "1.234321e-15" }, { 1.234321234321234e-14L, "1.234321e-14" }, { 1.234321234321234e-13L, "1.234321e-13" }, { 1.234321234321234e-12L, "1.234321e-12" }, { 1.234321234321234e-11L, "1.234321e-11" }, { 1.234321234321234e-10L, "1.234321e-10" }, { 1.234321234321234e-9L, "1.234321e-09" }, { 1.234321234321234e-8L, "1.234321e-08" }, { 1.234321234321234e-7L, "1.234321e-07" }, { 1.234321234321234e-6L, "1.234321e-06" }, { 1.234321234321234e-5L, "1.234321e-05" }, { 1.234321234321234e-4L, "1.234321e-04" }, { 1.234321234321234e-3L, "1.234321e-03" }, { 1.234321234321234e-2L, "1.234321e-02" }, { 1.234321234321234e-1L, "1.234321e-01" }, { 1.234321234321234L, "1.234321e+00" }, { 1.234321234321234e1L, "1.234321e+01" }, { 1.234321234321234e2L, "1.234321e+02" }, { 1.234321234321234e3L, "1.234321e+03" }, { 1.234321234321234e4L, "1.234321e+04" }, { 1.234321234321234e5L, "1.234321e+05" }, { 1.234321234321234e6L, "1.234321e+06" }, { 1.234321234321234e7L, "1.234321e+07" }, { 1.234321234321234e8L, "1.234321e+08" }, { 1.234321234321234e9L, "1.234321e+09" }, { 1.234321234321234e10L, "1.234321e+10" }, { 1.234321234321234e11L, "1.234321e+11" }, { 1.234321234321234e12L, "1.234321e+12" }, { 1.234321234321234e13L, "1.234321e+13" }, { 1.234321234321234e14L, "1.234321e+14" }, { 1.234321234321234e15L, "1.234321e+15" }, { 1.234321234321234e16L, "1.234321e+16" }, { 1.234321234321234e17L, "1.234321e+17" }, { 1.234321234321234e18L, "1.234321e+18" }, { 1.234321234321234e19L, "1.234321e+19" }, { 1.234321234321234e20L, "1.234321e+20" }, { 1.234321234321234e21L, "1.234321e+21" }, { 1.234321234321234e22L, "1.234321e+22" }, { 1.234321234321234e23L, "1.234321e+23" }, { 1.234321234321234e24L, "1.234321e+24" }, { 1.234321234321234e25L, "1.234321e+25" }, { 1.234321234321234e26L, "1.234321e+26" }, { 1.234321234321234e27L, "1.234321e+27" }, { 1.234321234321234e28L, "1.234321e+28" }, { 1.234321234321234e29L, "1.234321e+29" }, { 1.234321234321234e30L, "1.234321e+30" }, { 1.234321234321234e31L, "1.234321e+31" }, { 1.234321234321234e32L, "1.234321e+32" }, { 1.234321234321234e33L, "1.234321e+33" }, { 1.234321234321234e34L, "1.234321e+34" }, { 1.234321234321234e35L, "1.234321e+35" }, { 1.234321234321234e36L, "1.234321e+36" } }; size_t k; for (k = 0; k < SIZEOF (data); k++) { char result[100]; int retval = my_snprintf (result, sizeof (result), "%Le", data[k].value); const char *expected = data[k].string; ASSERT (strcmp (result, expected) == 0 /* Some implementations produce exponents with 3 digits. */ || (strlen (result) == strlen (expected) + 1 && memcmp (result, expected, strlen (expected) - 2) == 0 && result[strlen (expected) - 2] == '0' && strcmp (result + strlen (expected) - 1, expected + strlen (expected) - 2) == 0)); ASSERT (retval == strlen (result)); } } { /* A negative number. */ char result[100]; int retval = my_snprintf (result, sizeof (result), "%Le %d", -0.03125L, 33, 44, 55); ASSERT (strcmp (result, "-3.125000e-02 33") == 0 || strcmp (result, "-3.125000e-002 33") == 0); ASSERT (retval == strlen (result)); } { /* Positive zero. */ char result[100]; int retval = my_snprintf (result, sizeof (result), "%Le %d", 0.0L, 33, 44, 55); ASSERT (strcmp (result, "0.000000e+00 33") == 0 || strcmp (result, "0.000000e+000 33") == 0); ASSERT (retval == strlen (result)); } { /* Negative zero. */ char result[100]; int retval = my_snprintf (result, sizeof (result), "%Le %d", minus_zerol, 33, 44, 55); if (have_minus_zero ()) ASSERT (strcmp (result, "-0.000000e+00 33") == 0 || strcmp (result, "-0.000000e+000 33") == 0); ASSERT (retval == strlen (result)); } { /* Positive infinity. */ char result[100]; int retval = my_snprintf (result, sizeof (result), "%Le %d", 1.0L / 0.0L, 33, 44, 55); ASSERT (strcmp (result, "inf 33") == 0 || strcmp (result, "infinity 33") == 0); ASSERT (retval == strlen (result)); } { /* Negative infinity. */ char result[100]; int retval = my_snprintf (result, sizeof (result), "%Le %d", -1.0L / 0.0L, 33, 44, 55); ASSERT (strcmp (result, "-inf 33") == 0 || strcmp (result, "-infinity 33") == 0); ASSERT (retval == strlen (result)); } { /* NaN. */ char result[100]; int retval = my_snprintf (result, sizeof (result), "%Le %d", NaNl (), 33, 44, 55); ASSERT (strlen (result) >= 3 + 3 && strisnan (result, 0, strlen (result) - 3, 0) && strcmp (result + strlen (result) - 3, " 33") == 0); ASSERT (retval == strlen (result)); } #if CHECK_PRINTF_SAFE && ((defined __ia64 && LDBL_MANT_DIG == 64) || (defined __x86_64__ || defined __amd64__) || (defined __i386 || defined __i386__ || defined _I386 || defined _M_IX86 || defined _X86_)) { /* Quiet NaN. */ static union { unsigned int word[4]; long double value; } x = { LDBL80_WORDS (0xFFFF, 0xC3333333, 0x00000000) }; char result[100]; int retval = my_snprintf (result, sizeof (result), "%Le %d", x.value, 33, 44, 55); ASSERT (strlen (result) >= 3 + 3 && strisnan (result, 0, strlen (result) - 3, 0) && strcmp (result + strlen (result) - 3, " 33") == 0); ASSERT (retval == strlen (result)); } { /* Signalling NaN. */ static union { unsigned int word[4]; long double value; } x = { LDBL80_WORDS (0xFFFF, 0x83333333, 0x00000000) }; char result[100]; int retval = my_snprintf (result, sizeof (result), "%Le %d", x.value, 33, 44, 55); ASSERT (strlen (result) >= 3 + 3 && strisnan (result, 0, strlen (result) - 3, 0) && strcmp (result + strlen (result) - 3, " 33") == 0); ASSERT (retval == strlen (result)); } /* The isnanl function should recognize Pseudo-NaNs, Pseudo-Infinities, Pseudo-Zeroes, Unnormalized Numbers, and Pseudo-Denormals, as defined in Intel IA-64 Architecture Software Developer's Manual, Volume 1: Application Architecture. Table 5-2 "Floating-Point Register Encodings" Figure 5-6 "Memory to Floating-Point Register Data Translation" */ { /* Pseudo-NaN. */ static union { unsigned int word[4]; long double value; } x = { LDBL80_WORDS (0xFFFF, 0x40000001, 0x00000000) }; char result[100]; int retval = my_snprintf (result, sizeof (result), "%Le %d", x.value, 33, 44, 55); ASSERT (strlen (result) >= 3 + 3 && strisnan (result, 0, strlen (result) - 3, 0) && strcmp (result + strlen (result) - 3, " 33") == 0); ASSERT (retval == strlen (result)); } { /* Pseudo-Infinity. */ static union { unsigned int word[4]; long double value; } x = { LDBL80_WORDS (0xFFFF, 0x00000000, 0x00000000) }; char result[100]; int retval = my_snprintf (result, sizeof (result), "%Le %d", x.value, 33, 44, 55); ASSERT (strlen (result) >= 3 + 3 && strisnan (result, 0, strlen (result) - 3, 0) && strcmp (result + strlen (result) - 3, " 33") == 0); ASSERT (retval == strlen (result)); } { /* Pseudo-Zero. */ static union { unsigned int word[4]; long double value; } x = { LDBL80_WORDS (0x4004, 0x00000000, 0x00000000) }; char result[100]; int retval = my_snprintf (result, sizeof (result), "%Le %d", x.value, 33, 44, 55); ASSERT (strlen (result) >= 3 + 3 && strisnan (result, 0, strlen (result) - 3, 0) && strcmp (result + strlen (result) - 3, " 33") == 0); ASSERT (retval == strlen (result)); } { /* Unnormalized number. */ static union { unsigned int word[4]; long double value; } x = { LDBL80_WORDS (0x4000, 0x63333333, 0x00000000) }; char result[100]; int retval = my_snprintf (result, sizeof (result), "%Le %d", x.value, 33, 44, 55); ASSERT (strlen (result) >= 3 + 3 && strisnan (result, 0, strlen (result) - 3, 0) && strcmp (result + strlen (result) - 3, " 33") == 0); ASSERT (retval == strlen (result)); } { /* Pseudo-Denormal. */ static union { unsigned int word[4]; long double value; } x = { LDBL80_WORDS (0x0000, 0x83333333, 0x00000000) }; char result[100]; int retval = my_snprintf (result, sizeof (result), "%Le %d", x.value, 33, 44, 55); ASSERT (strlen (result) >= 3 + 3 && strisnan (result, 0, strlen (result) - 3, 0) && strcmp (result + strlen (result) - 3, " 33") == 0); ASSERT (retval == strlen (result)); } #endif { /* Width. */ char result[100]; int retval = my_snprintf (result, sizeof (result), "%15Le %d", 1.75L, 33, 44, 55); ASSERT (strcmp (result, " 1.750000e+00 33") == 0 || strcmp (result, " 1.750000e+000 33") == 0); ASSERT (retval == strlen (result)); } { /* FLAG_LEFT. */ char result[100]; int retval = my_snprintf (result, sizeof (result), "%-15Le %d", 1.75L, 33, 44, 55); ASSERT (strcmp (result, "1.750000e+00 33") == 0 || strcmp (result, "1.750000e+000 33") == 0); ASSERT (retval == strlen (result)); } { /* FLAG_SHOWSIGN. */ char result[100]; int retval = my_snprintf (result, sizeof (result), "%+Le %d", 1.75L, 33, 44, 55); ASSERT (strcmp (result, "+1.750000e+00 33") == 0 || strcmp (result, "+1.750000e+000 33") == 0); ASSERT (retval == strlen (result)); } { /* FLAG_SPACE. */ char result[100]; int retval = my_snprintf (result, sizeof (result), "% Le %d", 1.75L, 33, 44, 55); ASSERT (strcmp (result, " 1.750000e+00 33") == 0 || strcmp (result, " 1.750000e+000 33") == 0); ASSERT (retval == strlen (result)); } { /* FLAG_ALT. */ char result[100]; int retval = my_snprintf (result, sizeof (result), "%#Le %d", 1.75L, 33, 44, 55); ASSERT (strcmp (result, "1.750000e+00 33") == 0 || strcmp (result, "1.750000e+000 33") == 0); ASSERT (retval == strlen (result)); } { /* FLAG_ALT. */ char result[100]; int retval = my_snprintf (result, sizeof (result), "%#.Le %d", 1.75L, 33, 44, 55); ASSERT (strcmp (result, "2.e+00 33") == 0 || strcmp (result, "2.e+000 33") == 0); ASSERT (retval == strlen (result)); } { /* FLAG_ALT. */ char result[100]; int retval = my_snprintf (result, sizeof (result), "%#.Le %d", 9.75L, 33, 44, 55); ASSERT (strcmp (result, "1.e+01 33") == 0 || strcmp (result, "1.e+001 33") == 0); ASSERT (retval == strlen (result)); } { /* FLAG_ZERO with finite number. */ char result[100]; int retval = my_snprintf (result, sizeof (result), "%015Le %d", 1234.0L, 33, 44, 55); ASSERT (strcmp (result, "0001.234000e+03 33") == 0 || strcmp (result, "001.234000e+003 33") == 0); ASSERT (retval == strlen (result)); } { /* FLAG_ZERO with infinite number. */ char result[100]; int retval = my_snprintf (result, sizeof (result), "%015Le %d", -1.0L / 0.0L, 33, 44, 55); ASSERT (strcmp (result, " -inf 33") == 0 || strcmp (result, " -infinity 33") == 0); ASSERT (retval == strlen (result)); } { /* FLAG_ZERO with NaN. */ char result[100]; int retval = my_snprintf (result, sizeof (result), "%050Le %d", NaNl (), 33, 44, 55); ASSERT (strlen (result) == 50 + 3 && strisnan (result, strspn (result, " "), strlen (result) - 3, 0) && strcmp (result + strlen (result) - 3, " 33") == 0); ASSERT (retval == strlen (result)); } { /* Precision. */ char result[100]; int retval = my_snprintf (result, sizeof (result), "%.Le %d", 1234.0L, 33, 44, 55); ASSERT (strcmp (result, "1e+03 33") == 0 || strcmp (result, "1e+003 33") == 0); ASSERT (retval == strlen (result)); } { /* Precision with no rounding. */ char result[100]; int retval = my_snprintf (result, sizeof (result), "%.4Le %d", 999.951L, 33, 44, 55); ASSERT (strcmp (result, "9.9995e+02 33") == 0 || strcmp (result, "9.9995e+002 33") == 0); ASSERT (retval == strlen (result)); } { /* Precision with rounding. */ char result[100]; int retval = my_snprintf (result, sizeof (result), "%.4Le %d", 999.996L, 33, 44, 55); ASSERT (strcmp (result, "1.0000e+03 33") == 0 || strcmp (result, "1.0000e+003 33") == 0); ASSERT (retval == strlen (result)); } /* Test the support of the %g format directive. */ { /* A positive number. */ char result[100]; int retval = my_snprintf (result, sizeof (result), "%g %d", 12.75, 33, 44, 55); ASSERT (strcmp (result, "12.75 33") == 0); ASSERT (retval == strlen (result)); } { /* A larger positive number. */ char result[100]; int retval = my_snprintf (result, sizeof (result), "%g %d", 1234567.0, 33, 44, 55); ASSERT (strcmp (result, "1.23457e+06 33") == 0 || strcmp (result, "1.23457e+006 33") == 0); ASSERT (retval == strlen (result)); } { /* Small and large positive numbers. */ static struct { double value; const char *string; } data[] = { { 1.234321234321234e-37, "1.23432e-37" }, { 1.234321234321234e-36, "1.23432e-36" }, { 1.234321234321234e-35, "1.23432e-35" }, { 1.234321234321234e-34, "1.23432e-34" }, { 1.234321234321234e-33, "1.23432e-33" }, { 1.234321234321234e-32, "1.23432e-32" }, { 1.234321234321234e-31, "1.23432e-31" }, { 1.234321234321234e-30, "1.23432e-30" }, { 1.234321234321234e-29, "1.23432e-29" }, { 1.234321234321234e-28, "1.23432e-28" }, { 1.234321234321234e-27, "1.23432e-27" }, { 1.234321234321234e-26, "1.23432e-26" }, { 1.234321234321234e-25, "1.23432e-25" }, { 1.234321234321234e-24, "1.23432e-24" }, { 1.234321234321234e-23, "1.23432e-23" }, { 1.234321234321234e-22, "1.23432e-22" }, { 1.234321234321234e-21, "1.23432e-21" }, { 1.234321234321234e-20, "1.23432e-20" }, { 1.234321234321234e-19, "1.23432e-19" }, { 1.234321234321234e-18, "1.23432e-18" }, { 1.234321234321234e-17, "1.23432e-17" }, { 1.234321234321234e-16, "1.23432e-16" }, { 1.234321234321234e-15, "1.23432e-15" }, { 1.234321234321234e-14, "1.23432e-14" }, { 1.234321234321234e-13, "1.23432e-13" }, { 1.234321234321234e-12, "1.23432e-12" }, { 1.234321234321234e-11, "1.23432e-11" }, { 1.234321234321234e-10, "1.23432e-10" }, { 1.234321234321234e-9, "1.23432e-09" }, { 1.234321234321234e-8, "1.23432e-08" }, { 1.234321234321234e-7, "1.23432e-07" }, { 1.234321234321234e-6, "1.23432e-06" }, { 1.234321234321234e-5, "1.23432e-05" }, { 1.234321234321234e-4, "0.000123432" }, { 1.234321234321234e-3, "0.00123432" }, { 1.234321234321234e-2, "0.0123432" }, { 1.234321234321234e-1, "0.123432" }, { 1.234321234321234, "1.23432" }, { 1.234321234321234e1, "12.3432" }, { 1.234321234321234e2, "123.432" }, { 1.234321234321234e3, "1234.32" }, { 1.234321234321234e4, "12343.2" }, { 1.234321234321234e5, "123432" }, { 1.234321234321234e6, "1.23432e+06" }, { 1.234321234321234e7, "1.23432e+07" }, { 1.234321234321234e8, "1.23432e+08" }, { 1.234321234321234e9, "1.23432e+09" }, { 1.234321234321234e10, "1.23432e+10" }, { 1.234321234321234e11, "1.23432e+11" }, { 1.234321234321234e12, "1.23432e+12" }, { 1.234321234321234e13, "1.23432e+13" }, { 1.234321234321234e14, "1.23432e+14" }, { 1.234321234321234e15, "1.23432e+15" }, { 1.234321234321234e16, "1.23432e+16" }, { 1.234321234321234e17, "1.23432e+17" }, { 1.234321234321234e18, "1.23432e+18" }, { 1.234321234321234e19, "1.23432e+19" }, { 1.234321234321234e20, "1.23432e+20" }, { 1.234321234321234e21, "1.23432e+21" }, { 1.234321234321234e22, "1.23432e+22" }, { 1.234321234321234e23, "1.23432e+23" }, { 1.234321234321234e24, "1.23432e+24" }, { 1.234321234321234e25, "1.23432e+25" }, { 1.234321234321234e26, "1.23432e+26" }, { 1.234321234321234e27, "1.23432e+27" }, { 1.234321234321234e28, "1.23432e+28" }, { 1.234321234321234e29, "1.23432e+29" }, { 1.234321234321234e30, "1.23432e+30" }, { 1.234321234321234e31, "1.23432e+31" }, { 1.234321234321234e32, "1.23432e+32" }, { 1.234321234321234e33, "1.23432e+33" }, { 1.234321234321234e34, "1.23432e+34" }, { 1.234321234321234e35, "1.23432e+35" }, { 1.234321234321234e36, "1.23432e+36" } }; size_t k; for (k = 0; k < SIZEOF (data); k++) { char result[100]; int retval = my_snprintf (result, sizeof (result), "%g", data[k].value); const char *expected = data[k].string; ASSERT (strcmp (result, expected) == 0 /* Some implementations produce exponents with 3 digits. */ || (expected[strlen (expected) - 4] == 'e' && strlen (result) == strlen (expected) + 1 && memcmp (result, expected, strlen (expected) - 2) == 0 && result[strlen (expected) - 2] == '0' && strcmp (result + strlen (expected) - 1, expected + strlen (expected) - 2) == 0)); ASSERT (retval == strlen (result)); } } { /* A negative number. */ char result[100]; int retval = my_snprintf (result, sizeof (result), "%g %d", -0.03125, 33, 44, 55); ASSERT (strcmp (result, "-0.03125 33") == 0); ASSERT (retval == strlen (result)); } { /* Positive zero. */ char result[100]; int retval = my_snprintf (result, sizeof (result), "%g %d", 0.0, 33, 44, 55); ASSERT (strcmp (result, "0 33") == 0); ASSERT (retval == strlen (result)); } { /* Negative zero. */ char result[100]; int retval = my_snprintf (result, sizeof (result), "%g %d", -zerod, 33, 44, 55); if (have_minus_zero ()) ASSERT (strcmp (result, "-0 33") == 0); ASSERT (retval == strlen (result)); } { /* Positive infinity. */ char result[100]; int retval = my_snprintf (result, sizeof (result), "%g %d", 1.0 / 0.0, 33, 44, 55); ASSERT (strcmp (result, "inf 33") == 0 || strcmp (result, "infinity 33") == 0); ASSERT (retval == strlen (result)); } { /* Negative infinity. */ char result[100]; int retval = my_snprintf (result, sizeof (result), "%g %d", -1.0 / 0.0, 33, 44, 55); ASSERT (strcmp (result, "-inf 33") == 0 || strcmp (result, "-infinity 33") == 0); ASSERT (retval == strlen (result)); } { /* NaN. */ char result[100]; int retval = my_snprintf (result, sizeof (result), "%g %d", NaNd (), 33, 44, 55); ASSERT (strlen (result) >= 3 + 3 && strisnan (result, 0, strlen (result) - 3, 0) && strcmp (result + strlen (result) - 3, " 33") == 0); ASSERT (retval == strlen (result)); } { /* Width. */ char result[100]; int retval = my_snprintf (result, sizeof (result), "%10g %d", 1.75, 33, 44, 55); ASSERT (strcmp (result, " 1.75 33") == 0); ASSERT (retval == strlen (result)); } { /* FLAG_LEFT. */ char result[100]; int retval = my_snprintf (result, sizeof (result), "%-10g %d", 1.75, 33, 44, 55); ASSERT (strcmp (result, "1.75 33") == 0); ASSERT (retval == strlen (result)); } { /* FLAG_SHOWSIGN. */ char result[100]; int retval = my_snprintf (result, sizeof (result), "%+g %d", 1.75, 33, 44, 55); ASSERT (strcmp (result, "+1.75 33") == 0); ASSERT (retval == strlen (result)); } { /* FLAG_SPACE. */ char result[100]; int retval = my_snprintf (result, sizeof (result), "% g %d", 1.75, 33, 44, 55); ASSERT (strcmp (result, " 1.75 33") == 0); ASSERT (retval == strlen (result)); } { /* FLAG_ALT. */ char result[100]; int retval = my_snprintf (result, sizeof (result), "%#g %d", 1.75, 33, 44, 55); ASSERT (strcmp (result, "1.75000 33") == 0); ASSERT (retval == strlen (result)); } { /* FLAG_ALT. */ char result[100]; int retval = my_snprintf (result, sizeof (result), "%#.g %d", 1.75, 33, 44, 55); ASSERT (strcmp (result, "2. 33") == 0); ASSERT (retval == strlen (result)); } { /* FLAG_ALT. */ char result[100]; int retval = my_snprintf (result, sizeof (result), "%#.g %d", 9.75, 33, 44, 55); ASSERT (strcmp (result, "1.e+01 33") == 0 || strcmp (result, "1.e+001 33") == 0); ASSERT (retval == strlen (result)); } { /* FLAG_ZERO with finite number. */ char result[100]; int retval = my_snprintf (result, sizeof (result), "%010g %d", 1234.0, 33, 44, 55); ASSERT (strcmp (result, "0000001234 33") == 0); ASSERT (retval == strlen (result)); } { /* FLAG_ZERO with infinite number. */ char result[100]; int retval = my_snprintf (result, sizeof (result), "%015g %d", -1.0 / 0.0, 33, 44, 55); ASSERT (strcmp (result, " -inf 33") == 0 || strcmp (result, " -infinity 33") == 0); ASSERT (retval == strlen (result)); } { /* FLAG_ZERO with NaN. */ char result[100]; int retval = my_snprintf (result, sizeof (result), "%050g %d", NaNd (), 33, 44, 55); ASSERT (strlen (result) == 50 + 3 && strisnan (result, strspn (result, " "), strlen (result) - 3, 0) && strcmp (result + strlen (result) - 3, " 33") == 0); ASSERT (retval == strlen (result)); } { /* Precision. */ char result[100]; int retval = my_snprintf (result, sizeof (result), "%.g %d", 1234.0, 33, 44, 55); ASSERT (strcmp (result, "1e+03 33") == 0 || strcmp (result, "1e+003 33") == 0); ASSERT (retval == strlen (result)); } { /* Precision with no rounding. */ char result[100]; int retval = my_snprintf (result, sizeof (result), "%.5g %d", 999.951, 33, 44, 55); ASSERT (strcmp (result, "999.95 33") == 0); ASSERT (retval == strlen (result)); } { /* Precision with rounding. */ char result[100]; int retval = my_snprintf (result, sizeof (result), "%.5g %d", 999.996, 33, 44, 55); ASSERT (strcmp (result, "1000 33") == 0); ASSERT (retval == strlen (result)); } { /* A positive number. */ char result[100]; int retval = my_snprintf (result, sizeof (result), "%Lg %d", 12.75L, 33, 44, 55); ASSERT (strcmp (result, "12.75 33") == 0); ASSERT (retval == strlen (result)); } { /* A larger positive number. */ char result[100]; int retval = my_snprintf (result, sizeof (result), "%Lg %d", 1234567.0L, 33, 44, 55); ASSERT (strcmp (result, "1.23457e+06 33") == 0 || strcmp (result, "1.23457e+006 33") == 0); ASSERT (retval == strlen (result)); } { /* Small and large positive numbers. */ static struct { long double value; const char *string; } data[] = { { 1.234321234321234e-37L, "1.23432e-37" }, { 1.234321234321234e-36L, "1.23432e-36" }, { 1.234321234321234e-35L, "1.23432e-35" }, { 1.234321234321234e-34L, "1.23432e-34" }, { 1.234321234321234e-33L, "1.23432e-33" }, { 1.234321234321234e-32L, "1.23432e-32" }, { 1.234321234321234e-31L, "1.23432e-31" }, { 1.234321234321234e-30L, "1.23432e-30" }, { 1.234321234321234e-29L, "1.23432e-29" }, { 1.234321234321234e-28L, "1.23432e-28" }, { 1.234321234321234e-27L, "1.23432e-27" }, { 1.234321234321234e-26L, "1.23432e-26" }, { 1.234321234321234e-25L, "1.23432e-25" }, { 1.234321234321234e-24L, "1.23432e-24" }, { 1.234321234321234e-23L, "1.23432e-23" }, { 1.234321234321234e-22L, "1.23432e-22" }, { 1.234321234321234e-21L, "1.23432e-21" }, { 1.234321234321234e-20L, "1.23432e-20" }, { 1.234321234321234e-19L, "1.23432e-19" }, { 1.234321234321234e-18L, "1.23432e-18" }, { 1.234321234321234e-17L, "1.23432e-17" }, { 1.234321234321234e-16L, "1.23432e-16" }, { 1.234321234321234e-15L, "1.23432e-15" }, { 1.234321234321234e-14L, "1.23432e-14" }, { 1.234321234321234e-13L, "1.23432e-13" }, { 1.234321234321234e-12L, "1.23432e-12" }, { 1.234321234321234e-11L, "1.23432e-11" }, { 1.234321234321234e-10L, "1.23432e-10" }, { 1.234321234321234e-9L, "1.23432e-09" }, { 1.234321234321234e-8L, "1.23432e-08" }, { 1.234321234321234e-7L, "1.23432e-07" }, { 1.234321234321234e-6L, "1.23432e-06" }, { 1.234321234321234e-5L, "1.23432e-05" }, { 1.234321234321234e-4L, "0.000123432" }, { 1.234321234321234e-3L, "0.00123432" }, { 1.234321234321234e-2L, "0.0123432" }, { 1.234321234321234e-1L, "0.123432" }, { 1.234321234321234L, "1.23432" }, { 1.234321234321234e1L, "12.3432" }, { 1.234321234321234e2L, "123.432" }, { 1.234321234321234e3L, "1234.32" }, { 1.234321234321234e4L, "12343.2" }, { 1.234321234321234e5L, "123432" }, { 1.234321234321234e6L, "1.23432e+06" }, { 1.234321234321234e7L, "1.23432e+07" }, { 1.234321234321234e8L, "1.23432e+08" }, { 1.234321234321234e9L, "1.23432e+09" }, { 1.234321234321234e10L, "1.23432e+10" }, { 1.234321234321234e11L, "1.23432e+11" }, { 1.234321234321234e12L, "1.23432e+12" }, { 1.234321234321234e13L, "1.23432e+13" }, { 1.234321234321234e14L, "1.23432e+14" }, { 1.234321234321234e15L, "1.23432e+15" }, { 1.234321234321234e16L, "1.23432e+16" }, { 1.234321234321234e17L, "1.23432e+17" }, { 1.234321234321234e18L, "1.23432e+18" }, { 1.234321234321234e19L, "1.23432e+19" }, { 1.234321234321234e20L, "1.23432e+20" }, { 1.234321234321234e21L, "1.23432e+21" }, { 1.234321234321234e22L, "1.23432e+22" }, { 1.234321234321234e23L, "1.23432e+23" }, { 1.234321234321234e24L, "1.23432e+24" }, { 1.234321234321234e25L, "1.23432e+25" }, { 1.234321234321234e26L, "1.23432e+26" }, { 1.234321234321234e27L, "1.23432e+27" }, { 1.234321234321234e28L, "1.23432e+28" }, { 1.234321234321234e29L, "1.23432e+29" }, { 1.234321234321234e30L, "1.23432e+30" }, { 1.234321234321234e31L, "1.23432e+31" }, { 1.234321234321234e32L, "1.23432e+32" }, { 1.234321234321234e33L, "1.23432e+33" }, { 1.234321234321234e34L, "1.23432e+34" }, { 1.234321234321234e35L, "1.23432e+35" }, { 1.234321234321234e36L, "1.23432e+36" } }; size_t k; for (k = 0; k < SIZEOF (data); k++) { char result[100]; int retval = my_snprintf (result, sizeof (result), "%Lg", data[k].value); const char *expected = data[k].string; ASSERT (strcmp (result, expected) == 0 /* Some implementations produce exponents with 3 digits. */ || (expected[strlen (expected) - 4] == 'e' && strlen (result) == strlen (expected) + 1 && memcmp (result, expected, strlen (expected) - 2) == 0 && result[strlen (expected) - 2] == '0' && strcmp (result + strlen (expected) - 1, expected + strlen (expected) - 2) == 0)); ASSERT (retval == strlen (result)); } } { /* A negative number. */ char result[100]; int retval = my_snprintf (result, sizeof (result), "%Lg %d", -0.03125L, 33, 44, 55); ASSERT (strcmp (result, "-0.03125 33") == 0); ASSERT (retval == strlen (result)); } { /* Positive zero. */ char result[100]; int retval = my_snprintf (result, sizeof (result), "%Lg %d", 0.0L, 33, 44, 55); ASSERT (strcmp (result, "0 33") == 0); ASSERT (retval == strlen (result)); } { /* Negative zero. */ char result[100]; int retval = my_snprintf (result, sizeof (result), "%Lg %d", minus_zerol, 33, 44, 55); if (have_minus_zero ()) ASSERT (strcmp (result, "-0 33") == 0); ASSERT (retval == strlen (result)); } { /* Positive infinity. */ char result[100]; int retval = my_snprintf (result, sizeof (result), "%Lg %d", 1.0L / 0.0L, 33, 44, 55); ASSERT (strcmp (result, "inf 33") == 0 || strcmp (result, "infinity 33") == 0); ASSERT (retval == strlen (result)); } { /* Negative infinity. */ char result[100]; int retval = my_snprintf (result, sizeof (result), "%Lg %d", -1.0L / 0.0L, 33, 44, 55); ASSERT (strcmp (result, "-inf 33") == 0 || strcmp (result, "-infinity 33") == 0); ASSERT (retval == strlen (result)); } { /* NaN. */ char result[100]; int retval = my_snprintf (result, sizeof (result), "%Lg %d", NaNl (), 33, 44, 55); ASSERT (strlen (result) >= 3 + 3 && strisnan (result, 0, strlen (result) - 3, 0) && strcmp (result + strlen (result) - 3, " 33") == 0); ASSERT (retval == strlen (result)); } #if CHECK_PRINTF_SAFE && ((defined __ia64 && LDBL_MANT_DIG == 64) || (defined __x86_64__ || defined __amd64__) || (defined __i386 || defined __i386__ || defined _I386 || defined _M_IX86 || defined _X86_)) { /* Quiet NaN. */ static union { unsigned int word[4]; long double value; } x = { LDBL80_WORDS (0xFFFF, 0xC3333333, 0x00000000) }; char result[100]; int retval = my_snprintf (result, sizeof (result), "%Lg %d", x.value, 33, 44, 55); ASSERT (strlen (result) >= 3 + 3 && strisnan (result, 0, strlen (result) - 3, 0) && strcmp (result + strlen (result) - 3, " 33") == 0); ASSERT (retval == strlen (result)); } { /* Signalling NaN. */ static union { unsigned int word[4]; long double value; } x = { LDBL80_WORDS (0xFFFF, 0x83333333, 0x00000000) }; char result[100]; int retval = my_snprintf (result, sizeof (result), "%Lg %d", x.value, 33, 44, 55); ASSERT (strlen (result) >= 3 + 3 && strisnan (result, 0, strlen (result) - 3, 0) && strcmp (result + strlen (result) - 3, " 33") == 0); ASSERT (retval == strlen (result)); } /* The isnanl function should recognize Pseudo-NaNs, Pseudo-Infinities, Pseudo-Zeroes, Unnormalized Numbers, and Pseudo-Denormals, as defined in Intel IA-64 Architecture Software Developer's Manual, Volume 1: Application Architecture. Table 5-2 "Floating-Point Register Encodings" Figure 5-6 "Memory to Floating-Point Register Data Translation" */ { /* Pseudo-NaN. */ static union { unsigned int word[4]; long double value; } x = { LDBL80_WORDS (0xFFFF, 0x40000001, 0x00000000) }; char result[100]; int retval = my_snprintf (result, sizeof (result), "%Lg %d", x.value, 33, 44, 55); ASSERT (strlen (result) >= 3 + 3 && strisnan (result, 0, strlen (result) - 3, 0) && strcmp (result + strlen (result) - 3, " 33") == 0); ASSERT (retval == strlen (result)); } { /* Pseudo-Infinity. */ static union { unsigned int word[4]; long double value; } x = { LDBL80_WORDS (0xFFFF, 0x00000000, 0x00000000) }; char result[100]; int retval = my_snprintf (result, sizeof (result), "%Lg %d", x.value, 33, 44, 55); ASSERT (strlen (result) >= 3 + 3 && strisnan (result, 0, strlen (result) - 3, 0) && strcmp (result + strlen (result) - 3, " 33") == 0); ASSERT (retval == strlen (result)); } { /* Pseudo-Zero. */ static union { unsigned int word[4]; long double value; } x = { LDBL80_WORDS (0x4004, 0x00000000, 0x00000000) }; char result[100]; int retval = my_snprintf (result, sizeof (result), "%Lg %d", x.value, 33, 44, 55); ASSERT (strlen (result) >= 3 + 3 && strisnan (result, 0, strlen (result) - 3, 0) && strcmp (result + strlen (result) - 3, " 33") == 0); ASSERT (retval == strlen (result)); } { /* Unnormalized number. */ static union { unsigned int word[4]; long double value; } x = { LDBL80_WORDS (0x4000, 0x63333333, 0x00000000) }; char result[100]; int retval = my_snprintf (result, sizeof (result), "%Lg %d", x.value, 33, 44, 55); ASSERT (strlen (result) >= 3 + 3 && strisnan (result, 0, strlen (result) - 3, 0) && strcmp (result + strlen (result) - 3, " 33") == 0); ASSERT (retval == strlen (result)); } { /* Pseudo-Denormal. */ static union { unsigned int word[4]; long double value; } x = { LDBL80_WORDS (0x0000, 0x83333333, 0x00000000) }; char result[100]; int retval = my_snprintf (result, sizeof (result), "%Lg %d", x.value, 33, 44, 55); ASSERT (strlen (result) >= 3 + 3 && strisnan (result, 0, strlen (result) - 3, 0) && strcmp (result + strlen (result) - 3, " 33") == 0); ASSERT (retval == strlen (result)); } #endif { /* Width. */ char result[100]; int retval = my_snprintf (result, sizeof (result), "%10Lg %d", 1.75L, 33, 44, 55); ASSERT (strcmp (result, " 1.75 33") == 0); ASSERT (retval == strlen (result)); } { /* FLAG_LEFT. */ char result[100]; int retval = my_snprintf (result, sizeof (result), "%-10Lg %d", 1.75L, 33, 44, 55); ASSERT (strcmp (result, "1.75 33") == 0); ASSERT (retval == strlen (result)); } { /* FLAG_SHOWSIGN. */ char result[100]; int retval = my_snprintf (result, sizeof (result), "%+Lg %d", 1.75L, 33, 44, 55); ASSERT (strcmp (result, "+1.75 33") == 0); ASSERT (retval == strlen (result)); } { /* FLAG_SPACE. */ char result[100]; int retval = my_snprintf (result, sizeof (result), "% Lg %d", 1.75L, 33, 44, 55); ASSERT (strcmp (result, " 1.75 33") == 0); ASSERT (retval == strlen (result)); } { /* FLAG_ALT. */ char result[100]; int retval = my_snprintf (result, sizeof (result), "%#Lg %d", 1.75L, 33, 44, 55); ASSERT (strcmp (result, "1.75000 33") == 0); ASSERT (retval == strlen (result)); } { /* FLAG_ALT. */ char result[100]; int retval = my_snprintf (result, sizeof (result), "%#.Lg %d", 1.75L, 33, 44, 55); ASSERT (strcmp (result, "2. 33") == 0); ASSERT (retval == strlen (result)); } { /* FLAG_ALT. */ char result[100]; int retval = my_snprintf (result, sizeof (result), "%#.Lg %d", 9.75L, 33, 44, 55); ASSERT (strcmp (result, "1.e+01 33") == 0 || strcmp (result, "1.e+001 33") == 0); ASSERT (retval == strlen (result)); } { /* FLAG_ZERO with finite number. */ char result[100]; int retval = my_snprintf (result, sizeof (result), "%010Lg %d", 1234.0L, 33, 44, 55); ASSERT (strcmp (result, "0000001234 33") == 0); ASSERT (retval == strlen (result)); } { /* FLAG_ZERO with infinite number. */ char result[100]; int retval = my_snprintf (result, sizeof (result), "%015Lg %d", -1.0L / 0.0L, 33, 44, 55); ASSERT (strcmp (result, " -inf 33") == 0 || strcmp (result, " -infinity 33") == 0); ASSERT (retval == strlen (result)); } { /* FLAG_ZERO with NaN. */ char result[100]; int retval = my_snprintf (result, sizeof (result), "%050Lg %d", NaNl (), 33, 44, 55); ASSERT (strlen (result) == 50 + 3 && strisnan (result, strspn (result, " "), strlen (result) - 3, 0) && strcmp (result + strlen (result) - 3, " 33") == 0); ASSERT (retval == strlen (result)); } { /* Precision. */ char result[100]; int retval = my_snprintf (result, sizeof (result), "%.Lg %d", 1234.0L, 33, 44, 55); ASSERT (strcmp (result, "1e+03 33") == 0 || strcmp (result, "1e+003 33") == 0); ASSERT (retval == strlen (result)); } { /* Precision with no rounding. */ char result[100]; int retval = my_snprintf (result, sizeof (result), "%.5Lg %d", 999.951L, 33, 44, 55); ASSERT (strcmp (result, "999.95 33") == 0); ASSERT (retval == strlen (result)); } { /* Precision with rounding. */ char result[100]; int retval = my_snprintf (result, sizeof (result), "%.5Lg %d", 999.996L, 33, 44, 55); ASSERT (strcmp (result, "1000 33") == 0); ASSERT (retval == strlen (result)); } /* Test the support of the %n format directive. */ { int count = -1; char result[100]; int retval = my_snprintf (result, sizeof (result), "%d %n", 123, &count, 33, 44, 55); ASSERT (strcmp (result, "123 ") == 0); ASSERT (retval == strlen (result)); ASSERT (count == 4); } /* Test the support of the POSIX/XSI format strings with positions. */ { char result[100]; int retval = my_snprintf (result, sizeof (result), "%2$d %1$d", 33, 55); ASSERT (strcmp (result, "55 33") == 0); ASSERT (retval == strlen (result)); } /* Test the support of the grouping flag. */ { char result[100]; int retval = my_snprintf (result, sizeof (result), "%'d %d", 1234567, 99); ASSERT (result[strlen (result) - 1] == '9'); ASSERT (retval == strlen (result)); } /* Test the support of the left-adjust flag. */ { char result[100]; int retval = my_snprintf (result, sizeof (result), "a%*sc", -3, "b"); ASSERT (strcmp (result, "ab c") == 0); ASSERT (retval == strlen (result)); } { char result[100]; int retval = my_snprintf (result, sizeof (result), "a%-*sc", 3, "b"); ASSERT (strcmp (result, "ab c") == 0); ASSERT (retval == strlen (result)); } { char result[100]; int retval = my_snprintf (result, sizeof (result), "a%-*sc", -3, "b"); ASSERT (strcmp (result, "ab c") == 0); ASSERT (retval == strlen (result)); } /* Test the support of large precision. */ { char result[5000]; int retval = my_snprintf (result, sizeof (result), "%.4000d %d", 1234567, 99); size_t i; for (i = 0; i < 4000 - 7; i++) ASSERT (result[i] == '0'); ASSERT (strcmp (result + 4000 - 7, "1234567 99") == 0); ASSERT (retval == strlen (result)); } { char result[5000]; int retval = my_snprintf (result, sizeof (result), "%.*d %d", 4000, 1234567, 99); size_t i; for (i = 0; i < 4000 - 7; i++) ASSERT (result[i] == '0'); ASSERT (strcmp (result + 4000 - 7, "1234567 99") == 0); ASSERT (retval == strlen (result)); } { char result[5000]; int retval = my_snprintf (result, sizeof (result), "%.4000d %d", -1234567, 99); size_t i; ASSERT (result[0] == '-'); for (i = 0; i < 4000 - 7; i++) ASSERT (result[1 + i] == '0'); ASSERT (strcmp (result + 1 + 4000 - 7, "1234567 99") == 0); ASSERT (retval == strlen (result)); } { char result[5000]; int retval = my_snprintf (result, sizeof (result), "%.4000u %d", 1234567, 99); size_t i; for (i = 0; i < 4000 - 7; i++) ASSERT (result[i] == '0'); ASSERT (strcmp (result + 4000 - 7, "1234567 99") == 0); ASSERT (retval == strlen (result)); } { char result[5000]; int retval = my_snprintf (result, sizeof (result), "%.4000o %d", 1234567, 99); size_t i; for (i = 0; i < 4000 - 7; i++) ASSERT (result[i] == '0'); ASSERT (strcmp (result + 4000 - 7, "4553207 99") == 0); ASSERT (retval == strlen (result)); } { char result[5000]; int retval = my_snprintf (result, sizeof (result), "%.4000x %d", 1234567, 99); size_t i; for (i = 0; i < 4000 - 6; i++) ASSERT (result[i] == '0'); ASSERT (strcmp (result + 4000 - 6, "12d687 99") == 0); ASSERT (retval == strlen (result)); } { char result[5000]; int retval = my_snprintf (result, sizeof (result), "%#.4000x %d", 1234567, 99); size_t i; ASSERT (result[0] == '0'); ASSERT (result[1] == 'x'); for (i = 0; i < 4000 - 6; i++) ASSERT (result[2 + i] == '0'); ASSERT (strcmp (result + 2 + 4000 - 6, "12d687 99") == 0); ASSERT (retval == strlen (result)); } { char input[5000]; char result[5000]; int retval; size_t i; for (i = 0; i < sizeof (input) - 1; i++) input[i] = 'a' + ((1000000 / (i + 1)) % 26); input[i] = '\0'; retval = my_snprintf (result, sizeof (result), "%.4000s %d", input, 99); ASSERT (memcmp (result, input, 4000) == 0); ASSERT (strcmp (result + 4000, " 99") == 0); ASSERT (retval == strlen (result)); } /* Test the support of the %s format directive. */ /* To verify that these tests succeed, it is necessary to run them under a tool that checks against invalid memory accesses, such as ElectricFence or "valgrind --tool=memcheck". */ { size_t i; for (i = 1; i <= 8; i++) { char *block; char result[5000]; int retval; block = (char *) malloc (i); memcpy (block, "abcdefgh", i); retval = my_snprintf (result, sizeof (result), "%.*s", (int) i, block); ASSERT (memcmp (result, block, i) == 0); ASSERT (result[i] == '\0'); ASSERT (retval == strlen (result)); free (block); } } #if HAVE_WCHAR_T { size_t i; for (i = 1; i <= 8; i++) { wchar_t *block; size_t j; char result[5000]; int retval; block = (wchar_t *) malloc (i * sizeof (wchar_t)); for (j = 0; j < i; j++) block[j] = "abcdefgh"[j]; retval = my_snprintf (result, sizeof (result), "%.*ls", (int) i, block); ASSERT (memcmp (result, "abcdefgh", i) == 0); ASSERT (result[i] == '\0'); ASSERT (retval == strlen (result)); free (block); } } #endif } libprelude-1.0.0/libmissing/tests/test-lseek.c0000664000076400007640000000566711341220441016326 00000000000000/* Test of lseek() function. Copyright (C) 2007-2010 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 3 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, see . */ /* Written by Eric Blake, 2007. */ #include #include #include "signature.h" SIGNATURE_CHECK (lseek, off_t, (int, off_t, int)); #include #include "macros.h" /* ARGC must be 2; *ARGV[1] is '0' if stdin and stdout are files, '1' if they are pipes, and '2' if they are closed. Check for proper semantics of lseek. */ int main (int argc, char **argv) { if (argc != 2) return 2; switch (*argv[1]) { case '0': /* regular files */ ASSERT (lseek (0, (off_t)2, SEEK_SET) == 2); ASSERT (lseek (0, (off_t)-4, SEEK_CUR) == -1); ASSERT (errno == EINVAL); errno = 0; #if ! defined __BEOS__ /* POSIX says that the last lseek call, when failing, does not change the current offset. But BeOS sets it to 0. */ ASSERT (lseek (0, (off_t)0, SEEK_CUR) == 2); #endif #if 0 /* leads to SIGSYS on IRIX 6.5 */ ASSERT (lseek (0, (off_t)0, (SEEK_SET | SEEK_CUR | SEEK_END) + 1) == -1); ASSERT (errno == EINVAL); #endif ASSERT (lseek (1, (off_t)2, SEEK_SET) == 2); errno = 0; ASSERT (lseek (1, (off_t)-4, SEEK_CUR) == -1); ASSERT (errno == EINVAL); errno = 0; #if ! defined __BEOS__ /* POSIX says that the last lseek call, when failing, does not change the current offset. But BeOS sets it to 0. */ ASSERT (lseek (1, (off_t)0, SEEK_CUR) == 2); #endif #if 0 /* leads to SIGSYS on IRIX 6.5 */ ASSERT (lseek (1, (off_t)0, (SEEK_SET | SEEK_CUR | SEEK_END) + 1) == -1); ASSERT (errno == EINVAL); #endif break; case '1': /* pipes */ errno = 0; ASSERT (lseek (0, (off_t)0, SEEK_CUR) == -1); ASSERT (errno == ESPIPE); errno = 0; ASSERT (lseek (1, (off_t)0, SEEK_CUR) == -1); ASSERT (errno == ESPIPE); break; case '2': /* closed */ /* Explicitly close file descriptors 0 and 1. The <&- and >&- in the invoking shell are not enough on HP-UX. */ close (0); close (1); errno = 0; ASSERT (lseek (0, (off_t)0, SEEK_CUR) == -1); ASSERT (errno == EBADF); errno = 0; ASSERT (lseek (1, (off_t)0, SEEK_CUR) == -1); ASSERT (errno == EBADF); break; default: return 1; } return 0; } libprelude-1.0.0/libmissing/tests/test-alignof.c0000664000076400007640000000306111341220440016623 00000000000000/* Test of . Copyright (C) 2009, 2010 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 3 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, see . */ /* Written by Bruno Haible , 2009. */ #include #include #include #include #include "verify.h" typedef long double longdouble; typedef struct { char a[1]; } struct1; typedef struct { char a[2]; } struct2; typedef struct { char a[3]; } struct3; typedef struct { char a[4]; } struct4; #define CHECK(type) \ typedef struct { char slot1; type slot2; } type##_helper; \ verify (alignof_slot (type) == offsetof (type##_helper, slot2)); \ const int type##_slot_alignment = alignof_slot (type); \ const int type##_type_alignment = alignof_type (type); CHECK (char) CHECK (short) CHECK (int) CHECK (long) CHECK (float) CHECK (double) CHECK (longdouble) #ifdef INT64_MAX CHECK (int64_t) #endif CHECK (struct1) CHECK (struct2) CHECK (struct3) CHECK (struct4) int main () { return 0; } libprelude-1.0.0/libmissing/tests/c-strcasecmp.c0000664000076400007640000000315511341220440016617 00000000000000/* c-strcasecmp.c -- case insensitive string comparator in C locale Copyright (C) 1998-1999, 2005-2006, 2009-2010 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 3, 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ #include /* Specification. */ #include "c-strcase.h" #include #include "c-ctype.h" int c_strcasecmp (const char *s1, const char *s2) { register const unsigned char *p1 = (const unsigned char *) s1; register const unsigned char *p2 = (const unsigned char *) s2; unsigned char c1, c2; if (p1 == p2) return 0; do { c1 = c_tolower (*p1); c2 = c_tolower (*p2); if (c1 == '\0') break; ++p1; ++p2; } while (c1 == c2); if (UCHAR_MAX <= INT_MAX) return c1 - c2; else /* On machines where 'char' and 'int' are types of the same size, the difference of two 'unsigned char' values - including the sign bit - doesn't fit in an 'int'. */ return (c1 > c2 ? 1 : c1 < c2 ? -1 : 0); } libprelude-1.0.0/libmissing/tests/test-dup2.c0000664000076400007640000001251211341220441016060 00000000000000/* Test duplicating file descriptors. Copyright (C) 2009, 2010 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 3 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, see . */ /* Written by Eric Blake , 2009. */ #include #include #include "signature.h" SIGNATURE_CHECK (dup2, int, (int, int)); #include #include #include "binary-io.h" #if GNULIB_CLOEXEC # include "cloexec.h" #endif #if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ /* Get declarations of the Win32 API functions. */ # define WIN32_LEAN_AND_MEAN # include #endif #include "macros.h" /* Return non-zero if FD is open. */ static int is_open (int fd) { #if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ /* On Win32, the initial state of unassigned standard file descriptors is that they are open but point to an INVALID_HANDLE_VALUE, and there is no fcntl. */ return (HANDLE) _get_osfhandle (fd) != INVALID_HANDLE_VALUE; #else # ifndef F_GETFL # error Please port fcntl to your platform # endif return 0 <= fcntl (fd, F_GETFL); #endif } #if GNULIB_CLOEXEC /* Return non-zero if FD is open and inheritable across exec/spawn. */ static int is_inheritable (int fd) { # if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ /* On Win32, the initial state of unassigned standard file descriptors is that they are open but point to an INVALID_HANDLE_VALUE, and there is no fcntl. */ HANDLE h = (HANDLE) _get_osfhandle (fd); DWORD flags; if (h == INVALID_HANDLE_VALUE || GetHandleInformation (h, &flags) == 0) return 0; return (flags & HANDLE_FLAG_INHERIT) != 0; # else # ifndef F_GETFD # error Please port fcntl to your platform # endif int i = fcntl (fd, F_GETFD); return 0 <= i && (i & FD_CLOEXEC) == 0; # endif } #endif /* GNULIB_CLOEXEC */ #if !O_BINARY # define setmode(f,m) zero () static int zero (void) { return 0; } #endif /* Return non-zero if FD is open in the given MODE, which is either O_TEXT or O_BINARY. */ static int is_mode (int fd, int mode) { int value = setmode (fd, O_BINARY); setmode (fd, value); return mode == value; } int main (void) { const char *file = "test-dup2.tmp"; char buffer[1]; int fd = open (file, O_CREAT | O_TRUNC | O_RDWR, 0600); /* Assume std descriptors were provided by invoker. */ ASSERT (STDERR_FILENO < fd); ASSERT (is_open (fd)); /* Ignore any other fd's leaked into this process. */ close (fd + 1); close (fd + 2); ASSERT (!is_open (fd + 1)); ASSERT (!is_open (fd + 2)); /* Assigning to self must be a no-op. */ ASSERT (dup2 (fd, fd) == fd); ASSERT (is_open (fd)); /* The source must be valid. */ errno = 0; ASSERT (dup2 (-1, fd) == -1); ASSERT (errno == EBADF); errno = 0; ASSERT (dup2 (AT_FDCWD, fd) == -1); ASSERT (errno == EBADF); ASSERT (is_open (fd)); /* If the source is not open, then the destination is unaffected. */ errno = 0; ASSERT (dup2 (fd + 1, fd + 1) == -1); ASSERT (errno == EBADF); ASSERT (!is_open (fd + 1)); errno = 0; ASSERT (dup2 (fd + 1, fd) == -1); ASSERT (errno == EBADF); ASSERT (is_open (fd)); /* The destination must be valid. */ errno = 0; ASSERT (dup2 (fd, -2) == -1); ASSERT (errno == EBADF); errno = 0; ASSERT (dup2 (fd, 10000000) == -1); ASSERT (errno == EBADF); /* Using dup2 can skip fds. */ ASSERT (dup2 (fd, fd + 2) == fd + 2); ASSERT (is_open (fd)); ASSERT (!is_open (fd + 1)); ASSERT (is_open (fd + 2)); /* Verify that dup2 closes the previous occupant of a fd. */ ASSERT (open ("/dev/null", O_WRONLY, 0600) == fd + 1); ASSERT (dup2 (fd + 1, fd) == fd); ASSERT (close (fd + 1) == 0); ASSERT (write (fd, "1", 1) == 1); ASSERT (dup2 (fd + 2, fd) == fd); ASSERT (lseek (fd, 0, SEEK_END) == 0); ASSERT (write (fd + 2, "2", 1) == 1); ASSERT (lseek (fd, 0, SEEK_SET) == 0); ASSERT (read (fd, buffer, 1) == 1); ASSERT (*buffer == '2'); #if GNULIB_CLOEXEC /* Any new fd created by dup2 must not be cloexec. */ ASSERT (close (fd + 2) == 0); ASSERT (dup_cloexec (fd) == fd + 1); ASSERT (!is_inheritable (fd + 1)); ASSERT (dup2 (fd + 1, fd + 1) == fd + 1); ASSERT (!is_inheritable (fd + 1)); ASSERT (dup2 (fd + 1, fd + 2) == fd + 2); ASSERT (is_inheritable (fd + 2)); #endif /* On systems that distinguish between text and binary mode, dup2 reuses the mode of the source. */ setmode (fd, O_BINARY); ASSERT (is_mode (fd, O_BINARY)); ASSERT (dup2 (fd, fd + 1) == fd + 1); ASSERT (is_mode (fd + 1, O_BINARY)); setmode (fd, O_TEXT); ASSERT (is_mode (fd, O_TEXT)); ASSERT (dup2 (fd, fd + 1) == fd + 1); ASSERT (is_mode (fd + 1, O_TEXT)); /* Clean up. */ ASSERT (close (fd + 2) == 0); ASSERT (close (fd + 1) == 0); ASSERT (close (fd) == 0); ASSERT (unlink (file) == 0); return 0; } libprelude-1.0.0/libmissing/tests/test-stdint.c0000664000076400007640000002630311341220442016517 00000000000000/* Test of substitute. Copyright (C) 2006-2010 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 3 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, see . */ /* Written by Bruno Haible , 2006. */ #include /* Whether to enable pedantic checks. */ #define DO_PEDANTIC 0 #define __STDC_LIMIT_MACROS 1 /* to make it work also in C++ mode */ #include #include "verify.h" #include "intprops.h" #if __GNUC__ >= 2 && DO_PEDANTIC # define verify_same_types(expr1,expr2) \ extern void _verify_func(__LINE__) (__typeof__ (expr1) *); \ extern void _verify_func(__LINE__) (__typeof__ (expr2) *); # define _verify_func(line) _verify_func2(line) # define _verify_func2(line) verify_func_ ## line #else # define verify_same_types(expr1,expr2) extern void verify_func (int) #endif /* 7.18.1.1. Exact-width integer types */ /* 7.18.2.1. Limits of exact-width integer types */ int8_t a1[3] = { INT8_C (17), INT8_MIN, INT8_MAX }; verify (TYPE_MINIMUM (int8_t) == INT8_MIN); verify (TYPE_MAXIMUM (int8_t) == INT8_MAX); verify_same_types (INT8_MIN, (int8_t) 0 + 0); verify_same_types (INT8_MAX, (int8_t) 0 + 0); int16_t a2[3] = { INT16_C (17), INT16_MIN, INT16_MAX }; verify (TYPE_MINIMUM (int16_t) == INT16_MIN); verify (TYPE_MAXIMUM (int16_t) == INT16_MAX); verify_same_types (INT16_MIN, (int16_t) 0 + 0); verify_same_types (INT16_MAX, (int16_t) 0 + 0); int32_t a3[3] = { INT32_C (17), INT32_MIN, INT32_MAX }; verify (TYPE_MINIMUM (int32_t) == INT32_MIN); verify (TYPE_MAXIMUM (int32_t) == INT32_MAX); verify_same_types (INT32_MIN, (int32_t) 0 + 0); verify_same_types (INT32_MAX, (int32_t) 0 + 0); #ifdef INT64_MAX int64_t a4[3] = { INT64_C (17), INT64_MIN, INT64_MAX }; verify (TYPE_MINIMUM (int64_t) == INT64_MIN); verify (TYPE_MAXIMUM (int64_t) == INT64_MAX); verify_same_types (INT64_MIN, (int64_t) 0 + 0); verify_same_types (INT64_MAX, (int64_t) 0 + 0); #endif uint8_t b1[2] = { UINT8_C (17), UINT8_MAX }; verify (TYPE_MAXIMUM (uint8_t) == UINT8_MAX); verify_same_types (UINT8_MAX, (uint8_t) 0 + 0); uint16_t b2[2] = { UINT16_C (17), UINT16_MAX }; verify (TYPE_MAXIMUM (uint16_t) == UINT16_MAX); verify_same_types (UINT16_MAX, (uint16_t) 0 + 0); uint32_t b3[2] = { UINT32_C (17), UINT32_MAX }; verify (TYPE_MAXIMUM (uint32_t) == UINT32_MAX); verify_same_types (UINT32_MAX, (uint32_t) 0 + 0); #ifdef UINT64_MAX uint64_t b4[2] = { UINT64_C (17), UINT64_MAX }; verify (TYPE_MAXIMUM (uint64_t) == UINT64_MAX); verify_same_types (UINT64_MAX, (uint64_t) 0 + 0); #endif #if INT8_MIN && INT8_MAX && INT16_MIN && INT16_MAX && INT32_MIN && INT32_MAX /* ok */ #else err or; #endif #if UINT8_MAX && UINT16_MAX && UINT32_MAX /* ok */ #else err or; #endif /* 7.18.1.2. Minimum-width integer types */ /* 7.18.2.2. Limits of minimum-width integer types */ int_least8_t c1[3] = { 17, INT_LEAST8_MIN, INT_LEAST8_MAX }; verify (TYPE_MINIMUM (int_least8_t) == INT_LEAST8_MIN); verify (TYPE_MAXIMUM (int_least8_t) == INT_LEAST8_MAX); verify_same_types (INT_LEAST8_MIN, (int_least8_t) 0 + 0); verify_same_types (INT_LEAST8_MAX, (int_least8_t) 0 + 0); int_least16_t c2[3] = { 17, INT_LEAST16_MIN, INT_LEAST16_MAX }; verify (TYPE_MINIMUM (int_least16_t) == INT_LEAST16_MIN); verify (TYPE_MAXIMUM (int_least16_t) == INT_LEAST16_MAX); verify_same_types (INT_LEAST16_MIN, (int_least16_t) 0 + 0); verify_same_types (INT_LEAST16_MAX, (int_least16_t) 0 + 0); int_least32_t c3[3] = { 17, INT_LEAST32_MIN, INT_LEAST32_MAX }; verify (TYPE_MINIMUM (int_least32_t) == INT_LEAST32_MIN); verify (TYPE_MAXIMUM (int_least32_t) == INT_LEAST32_MAX); verify_same_types (INT_LEAST32_MIN, (int_least32_t) 0 + 0); verify_same_types (INT_LEAST32_MAX, (int_least32_t) 0 + 0); #ifdef INT_LEAST64_MAX int_least64_t c4[3] = { 17, INT_LEAST64_MIN, INT_LEAST64_MAX }; verify (TYPE_MINIMUM (int_least64_t) == INT_LEAST64_MIN); verify (TYPE_MAXIMUM (int_least64_t) == INT_LEAST64_MAX); verify_same_types (INT_LEAST64_MIN, (int_least64_t) 0 + 0); verify_same_types (INT_LEAST64_MAX, (int_least64_t) 0 + 0); #endif uint_least8_t d1[2] = { 17, UINT_LEAST8_MAX }; verify (TYPE_MAXIMUM (uint_least8_t) == UINT_LEAST8_MAX); verify_same_types (UINT_LEAST8_MAX, (uint_least8_t) 0 + 0); uint_least16_t d2[2] = { 17, UINT_LEAST16_MAX }; verify (TYPE_MAXIMUM (uint_least16_t) == UINT_LEAST16_MAX); verify_same_types (UINT_LEAST16_MAX, (uint_least16_t) 0 + 0); uint_least32_t d3[2] = { 17, UINT_LEAST32_MAX }; verify (TYPE_MAXIMUM (uint_least32_t) == UINT_LEAST32_MAX); verify_same_types (UINT_LEAST32_MAX, (uint_least32_t) 0 + 0); #ifdef UINT_LEAST64_MAX uint_least64_t d4[2] = { 17, UINT_LEAST64_MAX }; verify (TYPE_MAXIMUM (uint_least64_t) == UINT_LEAST64_MAX); verify_same_types (UINT_LEAST64_MAX, (uint_least64_t) 0 + 0); #endif #if INT_LEAST8_MIN && INT_LEAST8_MAX && INT_LEAST16_MIN && INT_LEAST16_MAX && INT_LEAST32_MIN && INT_LEAST32_MAX /* ok */ #else err or; #endif #if UINT_LEAST8_MAX && UINT_LEAST16_MAX && UINT_LEAST32_MAX /* ok */ #else err or; #endif /* 7.18.1.3. Fastest minimum-width integer types */ /* 7.18.2.3. Limits of fastest minimum-width integer types */ int_fast8_t e1[3] = { 17, INT_FAST8_MIN, INT_FAST8_MAX }; verify (TYPE_MINIMUM (int_fast8_t) == INT_FAST8_MIN); verify (TYPE_MAXIMUM (int_fast8_t) == INT_FAST8_MAX); verify_same_types (INT_FAST8_MIN, (int_fast8_t) 0 + 0); verify_same_types (INT_FAST8_MAX, (int_fast8_t) 0 + 0); int_fast16_t e2[3] = { 17, INT_FAST16_MIN, INT_FAST16_MAX }; verify (TYPE_MINIMUM (int_fast16_t) == INT_FAST16_MIN); verify (TYPE_MAXIMUM (int_fast16_t) == INT_FAST16_MAX); verify_same_types (INT_FAST16_MIN, (int_fast16_t) 0 + 0); verify_same_types (INT_FAST16_MAX, (int_fast16_t) 0 + 0); int_fast32_t e3[3] = { 17, INT_FAST32_MIN, INT_FAST32_MAX }; verify (TYPE_MINIMUM (int_fast32_t) == INT_FAST32_MIN); verify (TYPE_MAXIMUM (int_fast32_t) == INT_FAST32_MAX); verify_same_types (INT_FAST32_MIN, (int_fast32_t) 0 + 0); verify_same_types (INT_FAST32_MAX, (int_fast32_t) 0 + 0); #ifdef INT_FAST64_MAX int_fast64_t e4[3] = { 17, INT_FAST64_MIN, INT_FAST64_MAX }; verify (TYPE_MINIMUM (int_fast64_t) == INT_FAST64_MIN); verify (TYPE_MAXIMUM (int_fast64_t) == INT_FAST64_MAX); verify_same_types (INT_FAST64_MIN, (int_fast64_t) 0 + 0); verify_same_types (INT_FAST64_MAX, (int_fast64_t) 0 + 0); #endif uint_fast8_t f1[2] = { 17, UINT_FAST8_MAX }; verify (TYPE_MAXIMUM (uint_fast8_t) == UINT_FAST8_MAX); verify_same_types (UINT_FAST8_MAX, (uint_fast8_t) 0 + 0); uint_fast16_t f2[2] = { 17, UINT_FAST16_MAX }; verify (TYPE_MAXIMUM (uint_fast16_t) == UINT_FAST16_MAX); verify_same_types (UINT_FAST16_MAX, (uint_fast16_t) 0 + 0); uint_fast32_t f3[2] = { 17, UINT_FAST32_MAX }; verify (TYPE_MAXIMUM (uint_fast32_t) == UINT_FAST32_MAX); verify_same_types (UINT_FAST32_MAX, (uint_fast32_t) 0 + 0); #ifdef UINT_FAST64_MAX uint_fast64_t f4[2] = { 17, UINT_FAST64_MAX }; verify (TYPE_MAXIMUM (uint_fast64_t) == UINT_FAST64_MAX); verify_same_types (UINT_FAST64_MAX, (uint_fast64_t) 0 + 0); #endif #if INT_FAST8_MIN && INT_FAST8_MAX && INT_FAST16_MIN && INT_FAST16_MAX && INT_FAST32_MIN && INT_FAST32_MAX /* ok */ #else err or; #endif #if UINT_FAST8_MAX && UINT_FAST16_MAX && UINT_FAST32_MAX /* ok */ #else err or; #endif /* 7.18.1.4. Integer types capable of holding object pointers */ /* 7.18.2.4. Limits of integer types capable of holding object pointers */ intptr_t g[3] = { 17, INTPTR_MIN, INTPTR_MAX }; verify (TYPE_MINIMUM (intptr_t) == INTPTR_MIN); verify (TYPE_MAXIMUM (intptr_t) == INTPTR_MAX); verify_same_types (INTPTR_MIN, (intptr_t) 0 + 0); verify_same_types (INTPTR_MAX, (intptr_t) 0 + 0); uintptr_t h[2] = { 17, UINTPTR_MAX }; verify (TYPE_MAXIMUM (uintptr_t) == UINTPTR_MAX); verify_same_types (UINTPTR_MAX, (uintptr_t) 0 + 0); #if INTPTR_MIN && INTPTR_MAX && UINTPTR_MAX /* ok */ #else err or; #endif /* 7.18.1.5. Greatest-width integer types */ /* 7.18.2.5. Limits of greatest-width integer types */ intmax_t i[3] = { INTMAX_C (17), INTMAX_MIN, INTMAX_MAX }; verify (TYPE_MINIMUM (intmax_t) == INTMAX_MIN); verify (TYPE_MAXIMUM (intmax_t) == INTMAX_MAX); verify_same_types (INTMAX_MIN, (intmax_t) 0 + 0); verify_same_types (INTMAX_MAX, (intmax_t) 0 + 0); uintmax_t j[2] = { UINTMAX_C (17), UINTMAX_MAX }; verify (TYPE_MAXIMUM (uintmax_t) == UINTMAX_MAX); verify_same_types (UINTMAX_MAX, (uintmax_t) 0 + 0); /* As of 2007, Sun C and HP-UX 10.20 cc don't support 'long long' constants in the preprocessor. */ #if !(defined __SUNPRO_C || (defined __hpux && !defined __GNUC__)) #if INTMAX_MIN && INTMAX_MAX && UINTMAX_MAX /* ok */ #else err or; #endif #endif /* 7.18.3. Limits of other integer types */ #include verify (TYPE_MINIMUM (ptrdiff_t) == PTRDIFF_MIN); verify (TYPE_MAXIMUM (ptrdiff_t) == PTRDIFF_MAX); verify_same_types (PTRDIFF_MIN, (ptrdiff_t) 0 + 0); verify_same_types (PTRDIFF_MAX, (ptrdiff_t) 0 + 0); #if PTRDIFF_MIN && PTRDIFF_MAX /* ok */ #else err or; #endif #include verify (TYPE_MINIMUM (sig_atomic_t) == SIG_ATOMIC_MIN); verify (TYPE_MAXIMUM (sig_atomic_t) == SIG_ATOMIC_MAX); verify_same_types (SIG_ATOMIC_MIN, (sig_atomic_t) 0 + 0); verify_same_types (SIG_ATOMIC_MAX, (sig_atomic_t) 0 + 0); #if SIG_ATOMIC_MIN != 17 && SIG_ATOMIC_MAX /* ok */ #else err or; #endif verify (TYPE_MAXIMUM (size_t) == SIZE_MAX); verify_same_types (SIZE_MAX, (size_t) 0 + 0); #if SIZE_MAX /* ok */ #else err or; #endif #if HAVE_WCHAR_T verify (TYPE_MINIMUM (wchar_t) == WCHAR_MIN); verify (TYPE_MAXIMUM (wchar_t) == WCHAR_MAX); verify_same_types (WCHAR_MIN, (wchar_t) 0 + 0); verify_same_types (WCHAR_MAX, (wchar_t) 0 + 0); # if WCHAR_MIN != 17 && WCHAR_MAX /* ok */ # else err or; # endif #endif #if HAVE_WINT_T # include verify (TYPE_MINIMUM (wint_t) == WINT_MIN); verify (TYPE_MAXIMUM (wint_t) == WINT_MAX); verify_same_types (WINT_MIN, (wint_t) 0 + 0); verify_same_types (WINT_MAX, (wint_t) 0 + 0); # if WINT_MIN != 17 && WINT_MAX /* ok */ # else err or; # endif #endif /* 7.18.4. Macros for integer constants */ verify (INT8_C (17) == 17); verify_same_types (INT8_C (17), (int_least8_t)0 + 0); verify (UINT8_C (17) == 17); verify_same_types (UINT8_C (17), (uint_least8_t)0 + 0); verify (INT16_C (17) == 17); verify_same_types (INT16_C (17), (int_least16_t)0 + 0); verify (UINT16_C (17) == 17); verify_same_types (UINT16_C (17), (uint_least16_t)0 + 0); verify (INT32_C (17) == 17); verify_same_types (INT32_C (17), (int_least32_t)0 + 0); verify (UINT32_C (17) == 17); verify_same_types (UINT32_C (17), (uint_least32_t)0 + 0); #ifdef INT64_C verify (INT64_C (17) == 17); verify_same_types (INT64_C (17), (int_least64_t)0 + 0); #endif #ifdef UINT64_C verify (UINT64_C (17) == 17); verify_same_types (UINT64_C (17), (uint_least64_t)0 + 0); #endif verify (INTMAX_C (17) == 17); verify_same_types (INTMAX_C (17), (intmax_t)0 + 0); verify (UINTMAX_C (17) == 17); verify_same_types (UINTMAX_C (17), (uintmax_t)0 + 0); int main (void) { return 0; } libprelude-1.0.0/libmissing/tests/ignore-value.h0000664000076400007640000000332011341220440016627 00000000000000/* ignore a function return without a compiler warning Copyright (C) 2008-2010 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 3 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, see . */ /* Written by Jim Meyering. */ /* Use these functions to avoid a warning when using a function declared with gcc's warn_unused_result attribute, but for which you really do want to ignore the result. Traditionally, people have used a "(void)" cast to indicate that a function's return value is deliberately unused. However, if the function is declared with __attribute__((warn_unused_result)), gcc issues a warning even with the cast. Caution: most of the time, you really should heed gcc's warning, and check the return value. However, in those exceptional cases in which you're sure you know what you're doing, use this function. For the record, here's one of the ignorable warnings: "copy.c:233: warning: ignoring return value of 'fchown', declared with attribute warn_unused_result". */ static inline void ignore_value (int i) { (void) i; } static inline void ignore_ptr (void* p) { (void) p; } /* FIXME: what about aggregate types? */ libprelude-1.0.0/libmissing/tests/test-poll.c0000664000076400007640000002002211341220442016150 00000000000000/* Test of poll() function. Copyright (C) 2008-2010 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 3, 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ /* Written by Paolo Bonzini. */ #include #include #include "signature.h" SIGNATURE_CHECK (poll, int, (struct pollfd[], nfds_t, int)); #include #include #include #include #include #include #include #include #include #include #if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ # define WIN32_NATIVE #endif #ifdef WIN32_NATIVE #include #define pipe(x) _pipe(x, 256, O_BINARY) #endif #ifdef HAVE_UNISTD_H #include #endif #ifdef HAVE_SYS_WAIT_H #include #endif #ifndef SO_REUSEPORT #define SO_REUSEPORT SO_REUSEADDR #endif #define TEST_PORT 12345 /* Minimal testing infrastructure. */ static int failures; static void failed (const char *reason) { if (++failures > 1) printf (" "); printf ("failed (%s)\n", reason); } static int test (void (*fn) (void), const char *msg) { failures = 0; printf ("%s... ", msg); fflush (stdout); fn (); if (!failures) printf ("passed\n"); return failures; } /* Funny socket code. */ static int open_server_socket () { int s, x; struct sockaddr_in ia; s = socket (AF_INET, SOCK_STREAM, 0); memset (&ia, 0, sizeof (ia)); ia.sin_family = AF_INET; inet_pton (AF_INET, "127.0.0.1", &ia.sin_addr); ia.sin_port = htons (TEST_PORT); if (bind (s, (struct sockaddr *) &ia, sizeof (ia)) < 0) { perror ("bind"); exit (77); } x = 1; setsockopt (s, SOL_SOCKET, SO_REUSEPORT, &x, sizeof (x)); if (listen (s, 1) < 0) { perror ("listen"); exit (77); } return s; } static int connect_to_socket (int blocking) { int s; struct sockaddr_in ia; s = socket (AF_INET, SOCK_STREAM, 0); memset (&ia, 0, sizeof (ia)); ia.sin_family = AF_INET; inet_pton (AF_INET, "127.0.0.1", &ia.sin_addr); ia.sin_port = htons (TEST_PORT); if (!blocking) { #ifdef WIN32_NATIVE unsigned long iMode = 1; ioctl (s, FIONBIO, (char *) &iMode); #elif defined F_GETFL int oldflags = fcntl (s, F_GETFL, NULL); if (!(oldflags & O_NONBLOCK)) fcntl (s, F_SETFL, oldflags | O_NONBLOCK); #endif } if (connect (s, (struct sockaddr *) &ia, sizeof (ia)) < 0 && (blocking || errno != EINPROGRESS)) { perror ("connect"); exit (77); } return s; } /* A slightly more convenient interface to poll(2). */ static int poll1 (int fd, int ev, int time) { struct pollfd pfd; int r; pfd.fd = fd; pfd.events = ev; pfd.revents = 0; r = poll (&pfd, 1, time); if (r < 0) return r; if (pfd.revents & ~(POLLHUP | POLLERR | POLLNVAL | ev)) failed ("invalid flag combination (unrequested events)"); return pfd.revents; } static int poll1_nowait (int fd, int ev) { return poll1 (fd, ev, 0); } static int poll1_wait (int fd, int ev) { return poll1 (fd, ev, -1); } /* Test poll(2) for TTYs. */ #ifdef INTERACTIVE static void test_tty (void) { if (poll1_nowait (0, POLLIN | POLLRDNORM) != 0) failed ("can read"); if (poll1_nowait (0, POLLOUT) == 0) failed ("cannot write"); if (poll1_wait (0, POLLIN | POLLRDNORM) == 0) failed ("return with infinite timeout"); getchar (); if (poll1_nowait (0, POLLIN | POLLRDNORM) != 0) failed ("can read after getc"); } #endif /* Test poll(2) for unconnected nonblocking sockets. */ static void test_connect_first (void) { int s = open_server_socket (); struct sockaddr_in ia; socklen_t addrlen; int c1, c2; if (poll1_nowait (s, POLLIN | POLLRDNORM | POLLRDBAND) != 0) failed ("can read, socket not connected"); c1 = connect_to_socket (false); if (poll1_wait (s, POLLIN | POLLRDNORM | POLLRDBAND) != (POLLIN | POLLRDNORM)) failed ("expecting POLLIN | POLLRDNORM on passive socket"); if (poll1_nowait (s, POLLIN | POLLRDBAND) != POLLIN) failed ("expecting POLLIN on passive socket"); if (poll1_nowait (s, POLLRDNORM | POLLRDBAND) != POLLRDNORM) failed ("expecting POLLRDNORM on passive socket"); addrlen = sizeof (ia); c2 = accept (s, (struct sockaddr *) &ia, &addrlen); close (s); close (c1); close (c2); } /* Test poll(2) for unconnected blocking sockets. */ static void test_accept_first (void) { #ifndef WIN32_NATIVE int s = open_server_socket (); struct sockaddr_in ia; socklen_t addrlen; char buf[3]; int c, pid; pid = fork (); if (pid < 0) return; if (pid == 0) { addrlen = sizeof (ia); c = accept (s, (struct sockaddr *) &ia, &addrlen); close (s); write (c, "foo", 3); read (c, buf, 3); shutdown (c, SHUT_RD); close (c); exit (0); } else { close (s); c = connect_to_socket (true); if (poll1_nowait (c, POLLOUT | POLLWRNORM | POLLRDBAND) != (POLLOUT | POLLWRNORM)) failed ("cannot write after blocking connect"); write (c, "foo", 3); wait (&pid); if (poll1_wait (c, POLLIN) != POLLIN) failed ("cannot read data left in the socket by closed process"); read (c, buf, 3); write (c, "foo", 3); if ((poll1_wait (c, POLLIN | POLLOUT) & (POLLHUP | POLLERR)) == 0) failed ("expecting POLLHUP after shutdown"); close (c); } #endif } /* Common code for pipes and connected sockets. */ static void test_pair (int rd, int wd) { char buf[3]; if (poll1_wait (wd, POLLIN | POLLRDNORM | POLLOUT | POLLWRNORM | POLLRDBAND) != (POLLOUT | POLLWRNORM)) failed ("expecting POLLOUT | POLLWRNORM before writing"); if (poll1_nowait (wd, POLLIN | POLLRDNORM | POLLOUT | POLLRDBAND) != POLLOUT) failed ("expecting POLLOUT before writing"); if (poll1_nowait (wd, POLLIN | POLLRDNORM | POLLWRNORM | POLLRDBAND) != POLLWRNORM) failed ("expecting POLLWRNORM before writing"); write (wd, "foo", 3); if (poll1_wait (rd, POLLIN | POLLRDNORM) != (POLLIN | POLLRDNORM)) failed ("expecting POLLIN | POLLRDNORM after writing"); if (poll1_nowait (rd, POLLIN) != POLLIN) failed ("expecting POLLIN after writing"); if (poll1_nowait (rd, POLLRDNORM) != POLLRDNORM) failed ("expecting POLLRDNORM after writing"); read (rd, buf, 3); } /* Test poll(2) on connected sockets. */ static void test_socket_pair (void) { struct sockaddr_in ia; socklen_t addrlen = sizeof (ia); int s = open_server_socket (); int c1 = connect_to_socket (false); int c2 = accept (s, (struct sockaddr *) &ia, &addrlen); close (s); test_pair (c1, c2); close (c1); write (c2, "foo", 3); if ((poll1_nowait (c2, POLLIN | POLLOUT) & (POLLHUP | POLLERR)) == 0) failed ("expecting POLLHUP after shutdown"); close (c2); } /* Test poll(2) on pipes. */ static void test_pipe (void) { int fd[2]; pipe (fd); test_pair (fd[0], fd[1]); close (fd[0]); if ((poll1_wait (fd[1], POLLIN | POLLOUT) & (POLLHUP | POLLERR)) == 0) failed ("expecting POLLHUP after shutdown"); close (fd[1]); } /* Do them all. */ int main () { int result; #ifdef INTERACTIVE printf ("Please press Enter\n"); test (test_tty, "TTY"); #endif result = test (test_connect_first, "Unconnected socket test"); result += test (test_socket_pair, "Connected sockets test"); result += test (test_accept_first, "General socket test with fork"); result += test (test_pipe, "Pipe test"); exit (result); } libprelude-1.0.0/libmissing/tests/test-sys_ioctl.c0000664000076400007640000000155111341220442017220 00000000000000/* Test of substitute. Copyright (C) 2009, 2010 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 3 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, see . */ /* Written by Eric Blake , 2009. */ #include #include int main (void) { return 0; } libprelude-1.0.0/libmissing/tests/same-inode.h0000664000076400007640000000171711341220440016263 00000000000000/* Determine whether two stat buffers refer to the same file. Copyright (C) 2006, 2009-2010 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 3 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, see . */ #ifndef SAME_INODE_H # define SAME_INODE_H 1 # define SAME_INODE(Stat_buf_1, Stat_buf_2) \ ((Stat_buf_1).st_ino == (Stat_buf_2).st_ino \ && (Stat_buf_1).st_dev == (Stat_buf_2).st_dev) #endif libprelude-1.0.0/libmissing/tests/test-langinfo.c0000664000076400007640000000357211341220441017011 00000000000000/* Test of substitute. Copyright (C) 2009, 2010 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 3 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, see . */ /* Written by Bruno Haible , 2009. */ #include #include /* Check that all the nl_item values are defined. */ int items[] = { /* nl_langinfo items of the LC_CTYPE category */ CODESET, /* nl_langinfo items of the LC_NUMERIC category */ RADIXCHAR, THOUSEP, /* nl_langinfo items of the LC_TIME category */ D_T_FMT, D_FMT, T_FMT, T_FMT_AMPM, AM_STR, PM_STR, DAY_1, DAY_2, DAY_3, DAY_4, DAY_5, DAY_6, DAY_7, ABDAY_1, ABDAY_2, ABDAY_3, ABDAY_4, ABDAY_5, ABDAY_6, ABDAY_7, MON_1, MON_2, MON_3, MON_4, MON_5, MON_6, MON_7, MON_8, MON_9, MON_10, MON_11, MON_12, ABMON_1, ABMON_2, ABMON_3, ABMON_4, ABMON_5, ABMON_6, ABMON_7, ABMON_8, ABMON_9, ABMON_10, ABMON_11, ABMON_12, ERA, ERA_D_FMT, ERA_D_T_FMT, ERA_T_FMT, ALT_DIGITS, /* nl_langinfo items of the LC_MONETARY category */ CRNCYSTR, /* nl_langinfo items of the LC_MESSAGES category */ YESEXPR, NOEXPR }; int main (void) { return 0; } libprelude-1.0.0/libmissing/tests/test-c-strcasecmp.c0000664000076400007640000000414411341220441017574 00000000000000/* Test of case-insensitive string comparison function. Copyright (C) 2007-2010 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 3 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, see . */ /* Written by Bruno Haible , 2007. */ #include #include "c-strcase.h" #include #include #include "macros.h" int main (int argc, char *argv[]) { if (argc > 1) { /* configure should already have checked that the locale is supported. */ if (setlocale (LC_ALL, "") == NULL) return 1; } ASSERT (c_strcasecmp ("paragraph", "Paragraph") == 0); ASSERT (c_strcasecmp ("paragrapH", "parAgRaph") == 0); ASSERT (c_strcasecmp ("paragraph", "paraLyzed") < 0); ASSERT (c_strcasecmp ("paraLyzed", "paragraph") > 0); ASSERT (c_strcasecmp ("para", "paragraph") < 0); ASSERT (c_strcasecmp ("paragraph", "para") > 0); /* The following tests shows how c_strcasecmp() is different from strcasecmp(). */ ASSERT (c_strcasecmp ("\311mile", "\351mile") < 0); ASSERT (c_strcasecmp ("\351mile", "\311mile") > 0); /* The following tests shows how c_strcasecmp() is different from mbscasecmp(). */ ASSERT (c_strcasecmp ("\303\266zg\303\274r", "\303\226ZG\303\234R") > 0); /* özgür */ ASSERT (c_strcasecmp ("\303\226ZG\303\234R", "\303\266zg\303\274r") < 0); /* özgür */ /* This test shows how strings of different size cannot compare equal. */ ASSERT (c_strcasecmp ("turkish", "TURK\304\260SH") < 0); ASSERT (c_strcasecmp ("TURK\304\260SH", "turkish") > 0); return 0; } libprelude-1.0.0/libmissing/tests/test-sys_select.c0000664000076400007640000000215111341220442017362 00000000000000/* Test of substitute. Copyright (C) 2007-2010 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 3 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, see . */ /* Written by Bruno Haible , 2007. */ #include #include /* Check that the 'struct timeval' type is defined. */ struct timeval t1; int main (void) { /* Check that FD_ZERO can be used. This should not yield a warning such as "warning: implicit declaration of function 'memset'". */ fd_set fds; FD_ZERO (&fds); return 0; } libprelude-1.0.0/libmissing/tests/test-binary-io.sh0000775000076400007640000000027311341220441017273 00000000000000#!/bin/sh tmpfiles="" trap 'rm -fr $tmpfiles' 1 2 3 15 tmpfiles="$tmpfiles t-bin-out1.tmp t-bin-out2.tmp" ./test-binary-io${EXEEXT} > t-bin-out1.tmp || exit 1 rm -fr $tmpfiles exit 0 libprelude-1.0.0/libmissing/tests/test-mbrtowc2.sh0000775000076400007640000000057011341220441017141 00000000000000#!/bin/sh # Test whether a specific UTF-8 locale is installed. : ${LOCALE_FR_UTF8=fr_FR.UTF-8} if test $LOCALE_FR_UTF8 = none; then if test -f /usr/bin/localedef; then echo "Skipping test: no french Unicode locale is installed" else echo "Skipping test: no french Unicode locale is supported" fi exit 77 fi LC_ALL=$LOCALE_FR_UTF8 \ ./test-mbrtowc${EXEEXT} 2 libprelude-1.0.0/libmissing/tests/test-c-strncasecmp.c0000664000076400007640000000573211341220441017756 00000000000000/* Test of case-insensitive string comparison function. Copyright (C) 2007-2010 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 3 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, see . */ /* Written by Bruno Haible , 2007. */ #include #include "c-strcase.h" #include #include #include "macros.h" int main (int argc, char *argv[]) { if (argc > 1) { /* configure should already have checked that the locale is supported. */ if (setlocale (LC_ALL, "") == NULL) return 1; } ASSERT (c_strncasecmp ("paragraph", "Paragraph", 1000000) == 0); ASSERT (c_strncasecmp ("paragraph", "Paragraph", 9) == 0); ASSERT (c_strncasecmp ("paragrapH", "parAgRaph", 1000000) == 0); ASSERT (c_strncasecmp ("paragrapH", "parAgRaph", 9) == 0); ASSERT (c_strncasecmp ("paragraph", "paraLyzed", 10) < 0); ASSERT (c_strncasecmp ("paragraph", "paraLyzed", 9) < 0); ASSERT (c_strncasecmp ("paragraph", "paraLyzed", 5) < 0); ASSERT (c_strncasecmp ("paragraph", "paraLyzed", 4) == 0); ASSERT (c_strncasecmp ("paraLyzed", "paragraph", 10) > 0); ASSERT (c_strncasecmp ("paraLyzed", "paragraph", 9) > 0); ASSERT (c_strncasecmp ("paraLyzed", "paragraph", 5) > 0); ASSERT (c_strncasecmp ("paraLyzed", "paragraph", 4) == 0); ASSERT (c_strncasecmp ("para", "paragraph", 10) < 0); ASSERT (c_strncasecmp ("para", "paragraph", 9) < 0); ASSERT (c_strncasecmp ("para", "paragraph", 5) < 0); ASSERT (c_strncasecmp ("para", "paragraph", 4) == 0); ASSERT (c_strncasecmp ("paragraph", "para", 10) > 0); ASSERT (c_strncasecmp ("paragraph", "para", 9) > 0); ASSERT (c_strncasecmp ("paragraph", "para", 5) > 0); ASSERT (c_strncasecmp ("paragraph", "para", 4) == 0); /* The following tests shows how c_strncasecmp() is different from strncasecmp(). */ ASSERT (c_strncasecmp ("\311mily", "\351mile", 4) < 0); ASSERT (c_strncasecmp ("\351mile", "\311mily", 4) > 0); /* The following tests shows how c_strncasecmp() is different from mbsncasecmp(). */ ASSERT (c_strncasecmp ("\303\266zg\303\274r", "\303\226ZG\303\234R", 99) > 0); /* özgür */ ASSERT (c_strncasecmp ("\303\226ZG\303\234R", "\303\266zg\303\274r", 99) < 0); /* özgür */ /* This test shows how strings of different size cannot compare equal. */ ASSERT (c_strncasecmp ("turkish", "TURK\304\260SH", 7) < 0); ASSERT (c_strncasecmp ("TURK\304\260SH", "turkish", 7) > 0); return 0; } libprelude-1.0.0/libmissing/tests/test-mbrtowc3.sh0000775000076400007640000000056011341220441017141 00000000000000#!/bin/sh # Test whether a specific EUC-JP locale is installed. : ${LOCALE_JA=ja_JP} if test $LOCALE_JA = none; then if test -f /usr/bin/localedef; then echo "Skipping test: no traditional japanese locale is installed" else echo "Skipping test: no traditional japanese locale is supported" fi exit 77 fi LC_ALL=$LOCALE_JA \ ./test-mbrtowc${EXEEXT} 3 libprelude-1.0.0/libmissing/tests/test-strerror.c0000664000076400007640000000250111341220442017066 00000000000000/* Test of strerror() function. Copyright (C) 2007-2010 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 3, 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ /* Written by Eric Blake , 2007. */ #include #include #include "signature.h" SIGNATURE_CHECK (strerror, char *, (int)); #include #include "macros.h" int main (void) { char *str; str = strerror (EACCES); ASSERT (str); ASSERT (*str); str = strerror (ETIMEDOUT); ASSERT (str); ASSERT (*str); str = strerror (EOVERFLOW); ASSERT (str); ASSERT (*str); str = strerror (0); ASSERT (str); ASSERT (*str); str = strerror (-3); ASSERT (str); ASSERT (*str); return 0; } libprelude-1.0.0/libmissing/tests/test-frexpl.c0000664000076400007640000001363111341220441016511 00000000000000/* Test of splitting a 'long double' into fraction and mantissa. Copyright (C) 2007-2010 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 3 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, see . */ /* Written by Bruno Haible , 2007. */ #include #include #include "signature.h" SIGNATURE_CHECK (frexpl, long double, (long double, int *)); #include #include "fpucw.h" #include "isnanl-nolibm.h" #include "nan.h" #include "macros.h" /* Avoid some warnings from "gcc -Wshadow". This file doesn't use the exp() function. */ #undef exp #define exp exponent /* On MIPS IRIX machines, LDBL_MIN_EXP is -1021, but the smallest reliable exponent for 'long double' is -964. Similarly, on PowerPC machines, LDBL_MIN_EXP is -1021, but the smallest reliable exponent for 'long double' is -968. For exponents below that, the precision may be truncated to the precision used for 'double'. */ #ifdef __sgi # define MIN_NORMAL_EXP (LDBL_MIN_EXP + 57) #elif defined __ppc || defined __ppc__ || defined __powerpc || defined __powerpc__ # define MIN_NORMAL_EXP (LDBL_MIN_EXP + 53) #else # define MIN_NORMAL_EXP LDBL_MIN_EXP #endif /* On HP-UX 10.20, negating 0.0L does not yield -0.0L. So we use minus_zero instead. IRIX cc can't put -0.0L into .data, but can compute at runtime. Note that the expression -LDBL_MIN * LDBL_MIN does not work on other platforms, such as when cross-compiling to PowerPC on MacOS X 10.5. */ #if defined __hpux || defined __sgi static long double compute_minus_zero (void) { return -LDBL_MIN * LDBL_MIN; } # define minus_zero compute_minus_zero () #else long double minus_zero = -0.0L; #endif static long double my_ldexp (long double x, int d) { for (; d > 0; d--) x *= 2.0L; for (; d < 0; d++) x *= 0.5L; return x; } int main () { int i; long double x; DECL_LONG_DOUBLE_ROUNDING BEGIN_LONG_DOUBLE_ROUNDING (); { /* NaN. */ int exp = -9999; long double mantissa; x = NaNl (); mantissa = frexpl (x, &exp); ASSERT (isnanl (mantissa)); } { /* Positive infinity. */ int exp = -9999; long double mantissa; x = 1.0L / 0.0L; mantissa = frexpl (x, &exp); ASSERT (mantissa == x); } { /* Negative infinity. */ int exp = -9999; long double mantissa; x = -1.0L / 0.0L; mantissa = frexpl (x, &exp); ASSERT (mantissa == x); } { /* Positive zero. */ int exp = -9999; long double mantissa; x = 0.0L; mantissa = frexpl (x, &exp); ASSERT (exp == 0); ASSERT (mantissa == x); ASSERT (!signbit (mantissa)); } { /* Negative zero. */ int exp = -9999; long double mantissa; x = minus_zero; mantissa = frexpl (x, &exp); ASSERT (exp == 0); ASSERT (mantissa == x); ASSERT (signbit (mantissa)); } for (i = 1, x = 1.0L; i <= LDBL_MAX_EXP; i++, x *= 2.0L) { int exp = -9999; long double mantissa = frexpl (x, &exp); ASSERT (exp == i); ASSERT (mantissa == 0.5L); } for (i = 1, x = 1.0L; i >= MIN_NORMAL_EXP; i--, x *= 0.5L) { int exp = -9999; long double mantissa = frexpl (x, &exp); ASSERT (exp == i); ASSERT (mantissa == 0.5L); } for (; i >= LDBL_MIN_EXP - 100 && x > 0.0L; i--, x *= 0.5L) { int exp = -9999; long double mantissa = frexpl (x, &exp); ASSERT (exp == i); ASSERT (mantissa == 0.5L); } for (i = 1, x = -1.0L; i <= LDBL_MAX_EXP; i++, x *= 2.0L) { int exp = -9999; long double mantissa = frexpl (x, &exp); ASSERT (exp == i); ASSERT (mantissa == -0.5L); } for (i = 1, x = -1.0L; i >= MIN_NORMAL_EXP; i--, x *= 0.5L) { int exp = -9999; long double mantissa = frexpl (x, &exp); ASSERT (exp == i); ASSERT (mantissa == -0.5L); } for (; i >= LDBL_MIN_EXP - 100 && x < 0.0L; i--, x *= 0.5L) { int exp = -9999; long double mantissa = frexpl (x, &exp); ASSERT (exp == i); ASSERT (mantissa == -0.5L); } for (i = 1, x = 1.01L; i <= LDBL_MAX_EXP; i++, x *= 2.0L) { int exp = -9999; long double mantissa = frexpl (x, &exp); ASSERT (exp == i); ASSERT (mantissa == 0.505L); } for (i = 1, x = 1.01L; i >= MIN_NORMAL_EXP; i--, x *= 0.5L) { int exp = -9999; long double mantissa = frexpl (x, &exp); ASSERT (exp == i); ASSERT (mantissa == 0.505L); } for (; i >= LDBL_MIN_EXP - 100 && x > 0.0L; i--, x *= 0.5L) { int exp = -9999; long double mantissa = frexpl (x, &exp); ASSERT (exp == i); ASSERT (mantissa >= 0.5L); ASSERT (mantissa < 1.0L); ASSERT (mantissa == my_ldexp (x, - exp)); } for (i = 1, x = 1.73205L; i <= LDBL_MAX_EXP; i++, x *= 2.0L) { int exp = -9999; long double mantissa = frexpl (x, &exp); ASSERT (exp == i); ASSERT (mantissa == 0.866025L); } for (i = 1, x = 1.73205L; i >= MIN_NORMAL_EXP; i--, x *= 0.5L) { int exp = -9999; long double mantissa = frexpl (x, &exp); ASSERT (exp == i); ASSERT (mantissa == 0.866025L); } for (; i >= LDBL_MIN_EXP - 100 && x > 0.0L; i--, x *= 0.5L) { int exp = -9999; long double mantissa = frexpl (x, &exp); ASSERT (exp == i || exp == i + 1); ASSERT (mantissa >= 0.5L); ASSERT (mantissa < 1.0L); ASSERT (mantissa == my_ldexp (x, - exp)); } return 0; } libprelude-1.0.0/libmissing/tests/test-perror.c0000664000076400007640000000217611341220442016525 00000000000000/* Test of perror() function. Copyright (C) 2008, 2009, 2010 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 3, 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ #include #include #include "signature.h" SIGNATURE_CHECK (perror, void, (char const *)); #include int main (int argc, char **argv) { const char *prefix = (argc > 1 ? argv[1] : NULL); errno = EACCES; perror (prefix); errno = ETIMEDOUT; perror (prefix); errno = EOVERFLOW; perror (prefix); return 0; } libprelude-1.0.0/libmissing/math.in.h0000664000076400007640000004432211341220437014443 00000000000000/* A GNU-like . Copyright (C) 2002-2003, 2007-2010 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 3 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 Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . */ #ifndef _GL_MATH_H #if __GNUC__ >= 3 @PRAGMA_SYSTEM_HEADER@ #endif /* The include_next requires a split double-inclusion guard. */ #@INCLUDE_NEXT_AS_FIRST_DIRECTIVE@ @NEXT_AS_FIRST_DIRECTIVE_MATH_H@ #ifndef _GL_MATH_H #define _GL_MATH_H /* The definition of _GL_ARG_NONNULL is copied here. */ /* The definition of _GL_WARN_ON_USE is copied here. */ /* Helper macros to define a portability warning for the classification macro FUNC called with VALUE. POSIX declares the classification macros with an argument of real-floating (that is, one of float, double, or long double). */ #define _GL_WARN_REAL_FLOATING_DECL(func) \ static inline int \ rpl_ ## func ## f (float f) \ { \ return func (f); \ } \ static inline int \ rpl_ ## func ## d (double d) \ { \ return func (d); \ } \ static inline int \ rpl_ ## func ## l (long double l) \ { \ return func (l); \ } \ _GL_WARN_ON_USE (rpl_ ## func ## f, #func " is unportable - " \ "use gnulib module " #func " for portability"); \ _GL_WARN_ON_USE (rpl_ ## func ## d, #func " is unportable - " \ "use gnulib module " #func " for portability"); \ _GL_WARN_ON_USE (rpl_ ## func ## l, #func " is unportable - " \ "use gnulib module " #func " for portability") #define _GL_WARN_REAL_FLOATING_IMPL(func, value) \ (sizeof (value) == sizeof (float) ? rpl_ ## func ## f (value) \ : sizeof (value) == sizeof (double) ? rpl_ ## func ## d (value) \ : rpl_ ## func ## l (value)) #ifdef __cplusplus extern "C" { #endif /* POSIX allows platforms that don't support NAN. But all major machines in the past 15 years have supported something close to IEEE NaN, so we define this unconditionally. We also must define it on platforms like Solaris 10, where NAN is present but defined as a function pointer rather than a floating point constant. */ #if !defined NAN || @REPLACE_NAN@ # undef NAN /* The Compaq (ex-DEC) C 6.4 compiler chokes on the expression 0.0 / 0.0. */ # ifdef __DECC static float _NaN () { static float zero = 0.0f; return zero / zero; } # define NAN (_NaN()) # else # define NAN (0.0f / 0.0f) # endif #endif /* Solaris 10 defines HUGE_VAL, but as a function pointer rather than a floating point constant. */ #if @REPLACE_HUGE_VAL@ # undef HUGE_VAL # define HUGE_VAL (1.0 / 0.0) #endif /* Write x as x = mantissa * 2^exp where If x finite and nonzero: 0.5 <= |mantissa| < 1.0. If x is zero: mantissa = x, exp = 0. If x is infinite or NaN: mantissa = x, exp unspecified. Store exp in *EXPPTR and return mantissa. */ #if @GNULIB_FREXP@ # if @REPLACE_FREXP@ # define frexp rpl_frexp extern double frexp (double x, int *expptr) _GL_ARG_NONNULL ((2)); # endif #elif defined GNULIB_POSIXCHECK # undef frexp /* Assume frexp is always declared. */ _GL_WARN_ON_USE (frexp, "frexp is unportable - " "use gnulib module frexp for portability"); #endif #if @GNULIB_ACOSL@ # if !@HAVE_ACOSL@ || !@HAVE_DECL_ACOSL@ extern long double acosl (long double x); # endif #elif defined GNULIB_POSIXCHECK # undef acosl # if HAVE_RAW_DECL_ACOSL _GL_WARN_ON_USE (acosl, "acosl is unportable - " "use gnulib module mathl for portability"); # endif #endif #if @GNULIB_ASINL@ # if !@HAVE_ASINL@ || !@HAVE_DECL_ASINL@ extern long double asinl (long double x); # endif #elif defined GNULIB_POSIXCHECK # undef asinl # if HAVE_RAW_DECL_ASINL _GL_WARN_ON_USE (asinl, "asinl is unportable - " "use gnulib module mathl for portability"); # endif #endif #if @GNULIB_ATANL@ # if !@HAVE_ATANL@ || !@HAVE_DECL_ATANL@ extern long double atanl (long double x); # endif #elif defined GNULIB_POSIXCHECK # undef atanl # if HAVE_RAW_DECL_ATANL _GL_WARN_ON_USE (atanl, "atanl is unportable - " "use gnulib module mathl for portability"); # endif #endif #if @GNULIB_CEILF@ # if @REPLACE_CEILF@ # define ceilf rpl_ceilf extern float ceilf (float x); # endif #elif defined GNULIB_POSIXCHECK # undef ceilf # if HAVE_RAW_DECL_CEILF _GL_WARN_ON_USE (ceilf, "ceilf is unportable - " "use gnulib module ceilf for portability"); # endif #endif #if @GNULIB_CEILL@ # if @REPLACE_CEILL@ # define ceill rpl_ceill extern long double ceill (long double x); # endif #elif defined GNULIB_POSIXCHECK # undef ceill # if HAVE_RAW_DECL_CEILL _GL_WARN_ON_USE (ceill, "ceill is unportable - " "use gnulib module ceill for portability"); # endif #endif #if @GNULIB_COSL@ # if !@HAVE_COSL@ # undef cosl # define cosl rpl_cosl # endif # if !@HAVE_COSL@ || !@HAVE_DECL_COSL@ extern long double cosl (long double x); # endif #elif defined GNULIB_POSIXCHECK # undef cosl # if HAVE_RAW_DECL_COSL _GL_WARN_ON_USE (cosl, "cosl is unportable - " "use gnulib module mathl for portability"); # endif #endif #if @GNULIB_EXPL@ # if !@HAVE_EXPL@ || !@HAVE_DECL_EXPL@ extern long double expl (long double x); # endif #elif defined GNULIB_POSIXCHECK # undef expl # if HAVE_RAW_DECL_EXPL _GL_WARN_ON_USE (expl, "expl is unportable - " "use gnulib module mathl for portability"); # endif #endif #if @GNULIB_FLOORF@ # if @REPLACE_FLOORF@ # define floorf rpl_floorf extern float floorf (float x); # endif #elif defined GNULIB_POSIXCHECK # undef floorf # if HAVE_RAW_DECL_FLOORF _GL_WARN_ON_USE (floorf, "floorf is unportable - " "use gnulib module floorf for portability"); # endif #endif #if @GNULIB_FLOORL@ # if @REPLACE_FLOORL@ # define floorl rpl_floorl extern long double floorl (long double x); # endif #elif defined GNULIB_POSIXCHECK # undef floorl # if HAVE_RAW_DECL_FLOORL _GL_WARN_ON_USE (floorl, "floorl is unportable - " "use gnulib module floorl for portability"); # endif #endif /* Write x as x = mantissa * 2^exp where If x finite and nonzero: 0.5 <= |mantissa| < 1.0. If x is zero: mantissa = x, exp = 0. If x is infinite or NaN: mantissa = x, exp unspecified. Store exp in *EXPPTR and return mantissa. */ #if @GNULIB_FREXPL@ && @REPLACE_FREXPL@ # define frexpl rpl_frexpl #endif #if (@GNULIB_FREXPL@ && @REPLACE_FREXPL@) || !@HAVE_DECL_FREXPL@ extern long double frexpl (long double x, int *expptr) _GL_ARG_NONNULL ((2)); #endif #if !@GNULIB_FREXPL@ && defined GNULIB_POSIXCHECK # undef frexpl # if HAVE_RAW_DECL_FREXPL _GL_WARN_ON_USE (frexpl, "frexpl is unportable - " "use gnulib module frexpl for portability"); # endif #endif /* Return x * 2^exp. */ #if @GNULIB_LDEXPL@ && @REPLACE_LDEXPL@ # define ldexpl rpl_ldexpl #endif #if (@GNULIB_LDEXPL@ && @REPLACE_LDEXPL@) || !@HAVE_DECL_LDEXPL@ extern long double ldexpl (long double x, int exp); #endif #if !@GNULIB_LDEXPL@ && defined GNULIB_POSIXCHECK # undef ldexpl # if HAVE_RAW_DECL_LDEXPL _GL_WARN_ON_USE (ldexpl, "ldexpl is unportable - " "use gnulib module ldexpl for portability"); # endif #endif #if @GNULIB_LOGL@ # if !@HAVE_LOGL@ # undef logl # define logl rpl_logl # endif # if !@HAVE_LOGL@ || !@HAVE_DECL_LOGL@ extern long double logl (long double x); # endif #elif defined GNULIB_POSIXCHECK # undef logl # if HAVE_RAW_DECL_LOGL _GL_WARN_ON_USE (logl, "logl is unportable - " "use gnulib module mathl for portability"); # endif #endif #if @GNULIB_ROUNDF@ # if @REPLACE_ROUNDF@ # undef roundf # define roundf rpl_roundf extern float roundf (float x); # endif #elif defined GNULIB_POSIXCHECK # undef roundf # if HAVE_RAW_DECL_ROUNDF _GL_WARN_ON_USE (roundf, "roundf is unportable - " "use gnulib module roundf for portability"); # endif #endif #if @GNULIB_ROUND@ # if @REPLACE_ROUND@ # undef round # define round rpl_round extern double round (double x); # endif #elif defined GNULIB_POSIXCHECK # undef round # if HAVE_RAW_DECL_ROUND _GL_WARN_ON_USE (round, "round is unportable - " "use gnulib module round for portability"); # endif #endif #if @GNULIB_ROUNDL@ # if @REPLACE_ROUNDL@ # undef roundl # define roundl rpl_roundl extern long double roundl (long double x); # endif #elif defined GNULIB_POSIXCHECK # undef roundl # if HAVE_RAW_DECL_ROUNDL _GL_WARN_ON_USE (roundl, "roundl is unportable - " "use gnulib module roundl for portability"); # endif #endif #if @GNULIB_SINL@ # if !@HAVE_SINL@ # undef sinl # define sinl rpl_sinl # endif # if !@HAVE_SINL@ || !@HAVE_DECL_SINL@ extern long double sinl (long double x); # endif #elif defined GNULIB_POSIXCHECK # undef sinl # if HAVE_RAW_DECL_SINL _GL_WARN_ON_USE (sinl, "sinl is unportable - " "use gnulib module mathl for portability"); # endif #endif #if @GNULIB_SQRTL@ # if !@HAVE_SQRTL@ || !@HAVE_DECL_SQRTL@ extern long double sqrtl (long double x); # endif #elif defined GNULIB_POSIXCHECK # undef sqrtl # if HAVE_RAW_DECL_SQRTL _GL_WARN_ON_USE (sqrtl, "sqrtl is unportable - " "use gnulib module mathl for portability"); # endif #endif #if @GNULIB_TANL@ # if !@HAVE_TANL@ || !@HAVE_DECL_TANL@ extern long double tanl (long double x); # endif #elif defined GNULIB_POSIXCHECK # undef tanl # if HAVE_RAW_DECL_TANL _GL_WARN_ON_USE (tanl, "tanl is unportable - " "use gnulib module mathl for portability"); # endif #endif #if @GNULIB_TRUNCF@ # if !@HAVE_DECL_TRUNCF@ # define truncf rpl_truncf extern float truncf (float x); # endif #elif defined GNULIB_POSIXCHECK # undef truncf # if HAVE_RAW_DECL_TRUNCF _GL_WARN_ON_USE (truncf, "truncf is unportable - " "use gnulib module truncf for portability"); # endif #endif #if @GNULIB_TRUNC@ # if !@HAVE_DECL_TRUNC@ # define trunc rpl_trunc extern double trunc (double x); # endif #elif defined GNULIB_POSIXCHECK # undef trunc # if HAVE_RAW_DECL_TRUNC _GL_WARN_ON_USE (trunc, "trunc is unportable - " "use gnulib module trunc for portability"); # endif #endif #if @GNULIB_TRUNCL@ # if @REPLACE_TRUNCL@ # undef truncl # define truncl rpl_truncl extern long double truncl (long double x); # endif #elif defined GNULIB_POSIXCHECK # undef truncl # if HAVE_RAW_DECL_TRUNCL _GL_WARN_ON_USE (truncl, "truncl is unportable - " "use gnulib module truncl for portability"); # endif #endif #if @GNULIB_ISFINITE@ # if @REPLACE_ISFINITE@ extern int gl_isfinitef (float x); extern int gl_isfinited (double x); extern int gl_isfinitel (long double x); # undef isfinite # define isfinite(x) \ (sizeof (x) == sizeof (long double) ? gl_isfinitel (x) : \ sizeof (x) == sizeof (double) ? gl_isfinited (x) : \ gl_isfinitef (x)) # endif #elif defined GNULIB_POSIXCHECK # if defined isfinite _GL_WARN_REAL_FLOATING_DECL (isfinite); # undef isfinite # define isfinite(x) _GL_WARN_REAL_FLOATING_IMPL (isfinite, x) # endif #endif #if @GNULIB_ISINF@ # if @REPLACE_ISINF@ extern int gl_isinff (float x); extern int gl_isinfd (double x); extern int gl_isinfl (long double x); # undef isinf # define isinf(x) \ (sizeof (x) == sizeof (long double) ? gl_isinfl (x) : \ sizeof (x) == sizeof (double) ? gl_isinfd (x) : \ gl_isinff (x)) # endif #elif defined GNULIB_POSIXCHECK # if defined isinf _GL_WARN_REAL_FLOATING_DECL (isinf); # undef isinf # define isinf(x) _GL_WARN_REAL_FLOATING_IMPL (isinf, x) # endif #endif #if @GNULIB_ISNANF@ /* Test for NaN for 'float' numbers. */ # if @HAVE_ISNANF@ /* The original included above provides a declaration of isnan macro or (older) isnanf function. */ # if __GNUC__ >= 4 /* GCC 4.0 and newer provides three built-ins for isnan. */ # undef isnanf # define isnanf(x) __builtin_isnanf ((float)(x)) # elif defined isnan # undef isnanf # define isnanf(x) isnan ((float)(x)) # endif # else /* Test whether X is a NaN. */ # undef isnanf # define isnanf rpl_isnanf extern int isnanf (float x); # endif #endif #if @GNULIB_ISNAND@ /* Test for NaN for 'double' numbers. This function is a gnulib extension, unlike isnan() which applied only to 'double' numbers earlier but now is a type-generic macro. */ # if @HAVE_ISNAND@ /* The original included above provides a declaration of isnan macro. */ # if __GNUC__ >= 4 /* GCC 4.0 and newer provides three built-ins for isnan. */ # undef isnand # define isnand(x) __builtin_isnan ((double)(x)) # else # undef isnand # define isnand(x) isnan ((double)(x)) # endif # else /* Test whether X is a NaN. */ # undef isnand # define isnand rpl_isnand extern int isnand (double x); # endif #endif #if @GNULIB_ISNANL@ /* Test for NaN for 'long double' numbers. */ # if @HAVE_ISNANL@ /* The original included above provides a declaration of isnan macro or (older) isnanl function. */ # if __GNUC__ >= 4 /* GCC 4.0 and newer provides three built-ins for isnan. */ # undef isnanl # define isnanl(x) __builtin_isnanl ((long double)(x)) # elif defined isnan # undef isnanl # define isnanl(x) isnan ((long double)(x)) # endif # else /* Test whether X is a NaN. */ # undef isnanl # define isnanl rpl_isnanl extern int isnanl (long double x); # endif #endif /* This must come *after* the snippets for GNULIB_ISNANF and GNULIB_ISNANL! */ #if @GNULIB_ISNAN@ # if @REPLACE_ISNAN@ /* We can't just use the isnanf macro (e.g.) as exposed by isnanf.h (e.g.) here, because those may end up being macros that recursively expand back to isnan. So use the gnulib replacements for them directly. */ # if @HAVE_ISNANF@ && __GNUC__ >= 4 # define gl_isnan_f(x) __builtin_isnan ((float)(x)) # else extern int rpl_isnanf (float x); # define gl_isnan_f(x) rpl_isnanf (x) # endif # if @HAVE_ISNAND@ && __GNUC__ >= 4 # define gl_isnan_d(x) __builtin_isnan ((double)(x)) # else extern int rpl_isnand (double x); # define gl_isnan_d(x) rpl_isnand (x) # endif # if @HAVE_ISNANL@ && __GNUC__ >= 4 # define gl_isnan_l(x) __builtin_isnan ((long double)(x)) # else extern int rpl_isnanl (long double x); # define gl_isnan_l(x) rpl_isnanl (x) # endif # undef isnan # define isnan(x) \ (sizeof (x) == sizeof (long double) ? gl_isnan_l (x) : \ sizeof (x) == sizeof (double) ? gl_isnan_d (x) : \ gl_isnan_f (x)) # endif #elif defined GNULIB_POSIXCHECK # if defined isnan _GL_WARN_REAL_FLOATING_DECL (isnan); # undef isnan # define isnan(x) _GL_WARN_REAL_FLOATING_IMPL (isnan, x) # endif #endif #if @GNULIB_SIGNBIT@ # if @REPLACE_SIGNBIT_USING_GCC@ # undef signbit /* GCC 4.0 and newer provides three built-ins for signbit. */ # define signbit(x) \ (sizeof (x) == sizeof (long double) ? __builtin_signbitl (x) : \ sizeof (x) == sizeof (double) ? __builtin_signbit (x) : \ __builtin_signbitf (x)) # endif # if @REPLACE_SIGNBIT@ # undef signbit extern int gl_signbitf (float arg); extern int gl_signbitd (double arg); extern int gl_signbitl (long double arg); # if __GNUC__ >= 2 && !__STRICT_ANSI__ # if defined FLT_SIGNBIT_WORD && defined FLT_SIGNBIT_BIT && !defined gl_signbitf # define gl_signbitf_OPTIMIZED_MACRO # define gl_signbitf(arg) \ ({ union { float _value; \ unsigned int _word[(sizeof (float) + sizeof (unsigned int) - 1) / sizeof (unsigned int)]; \ } _m; \ _m._value = (arg); \ (_m._word[FLT_SIGNBIT_WORD] >> FLT_SIGNBIT_BIT) & 1; \ }) # endif # if defined DBL_SIGNBIT_WORD && defined DBL_SIGNBIT_BIT && !defined gl_signbitd # define gl_signbitd_OPTIMIZED_MACRO # define gl_signbitd(arg) \ ({ union { double _value; \ unsigned int _word[(sizeof (double) + sizeof (unsigned int) - 1) / sizeof (unsigned int)]; \ } _m; \ _m._value = (arg); \ (_m._word[DBL_SIGNBIT_WORD] >> DBL_SIGNBIT_BIT) & 1; \ }) # endif # if defined LDBL_SIGNBIT_WORD && defined LDBL_SIGNBIT_BIT && !defined gl_signbitl # define gl_signbitl_OPTIMIZED_MACRO # define gl_signbitl(arg) \ ({ union { long double _value; \ unsigned int _word[(sizeof (long double) + sizeof (unsigned int) - 1) / sizeof (unsigned int)]; \ } _m; \ _m._value = (arg); \ (_m._word[LDBL_SIGNBIT_WORD] >> LDBL_SIGNBIT_BIT) & 1; \ }) # endif # endif # define signbit(x) \ (sizeof (x) == sizeof (long double) ? gl_signbitl (x) : \ sizeof (x) == sizeof (double) ? gl_signbitd (x) : \ gl_signbitf (x)) # endif #elif defined GNULIB_POSIXCHECK # if defined signbit _GL_WARN_REAL_FLOATING_DECL (signbit); # undef signbit # define signbit(x) _GL_WARN_REAL_FLOATING_IMPL (signbit, x) # endif #endif #ifdef __cplusplus } #endif #endif /* _GL_MATH_H */ #endif /* _GL_MATH_H */ libprelude-1.0.0/libmissing/getpass.c0000664000076400007640000001221611341220435014541 00000000000000/* Copyright (C) 1992-2001, 2003-2007, 2009-2010 Free Software Foundation, Inc. This file is part of the GNU C Library. This program is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser 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 Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ #ifndef _LIBC # include #endif #include "getpass.h" #include #if !((defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__) #include #if HAVE_DECL___FSETLOCKING && HAVE___FSETLOCKING # if HAVE_STDIO_EXT_H # include # endif #else # define __fsetlocking(stream, type) /* empty */ #endif #if HAVE_TERMIOS_H # include #endif #if USE_UNLOCKED_IO # include "unlocked-io.h" #else # if !HAVE_DECL_FFLUSH_UNLOCKED # undef fflush_unlocked # define fflush_unlocked(x) fflush (x) # endif # if !HAVE_DECL_FLOCKFILE # undef flockfile # define flockfile(x) ((void) 0) # endif # if !HAVE_DECL_FUNLOCKFILE # undef funlockfile # define funlockfile(x) ((void) 0) # endif # if !HAVE_DECL_FPUTS_UNLOCKED # undef fputs_unlocked # define fputs_unlocked(str,stream) fputs (str, stream) # endif # if !HAVE_DECL_PUTC_UNLOCKED # undef putc_unlocked # define putc_unlocked(c,stream) putc (c, stream) # endif #endif /* It is desirable to use this bit on systems that have it. The only bit of terminal state we want to twiddle is echoing, which is done in software; there is no need to change the state of the terminal hardware. */ #ifndef TCSASOFT # define TCSASOFT 0 #endif static void call_fclose (void *arg) { if (arg != NULL) fclose (arg); } char * getpass (const char *prompt) { FILE *tty; FILE *in, *out; struct termios s, t; bool tty_changed = false; static char *buf; static size_t bufsize; ssize_t nread; /* Try to write to and read from the terminal if we can. If we can't open the terminal, use stderr and stdin. */ tty = fopen ("/dev/tty", "w+"); if (tty == NULL) { in = stdin; out = stderr; } else { /* We do the locking ourselves. */ __fsetlocking (tty, FSETLOCKING_BYCALLER); out = in = tty; } flockfile (out); /* Turn echoing off if it is on now. */ #if HAVE_TCGETATTR if (tcgetattr (fileno (in), &t) == 0) { /* Save the old one. */ s = t; /* Tricky, tricky. */ t.c_lflag &= ~(ECHO | ISIG); tty_changed = (tcsetattr (fileno (in), TCSAFLUSH | TCSASOFT, &t) == 0); } #endif /* Write the prompt. */ fputs_unlocked (prompt, out); fflush_unlocked (out); /* Read the password. */ nread = getline (&buf, &bufsize, in); /* According to the C standard, input may not be followed by output on the same stream without an intervening call to a file positioning function. Suppose in == out; then without this fseek call, on Solaris, HP-UX, AIX, OSF/1, the previous input gets echoed, whereas on IRIX, the following newline is not output as it should be. POSIX imposes similar restrictions if fileno (in) == fileno (out). The POSIX restrictions are tricky and change from POSIX version to POSIX version, so play it safe and invoke fseek even if in != out. */ fseeko (out, 0, SEEK_CUR); if (buf != NULL) { if (nread < 0) buf[0] = '\0'; else if (buf[nread - 1] == '\n') { /* Remove the newline. */ buf[nread - 1] = '\0'; if (tty_changed) { /* Write the newline that was not echoed. */ putc_unlocked ('\n', out); } } } /* Restore the original setting. */ #if HAVE_TCSETATTR if (tty_changed) tcsetattr (fileno (in), TCSAFLUSH | TCSASOFT, &s); #endif funlockfile (out); call_fclose (tty); return buf; } #else /* W32 native */ /* Windows implementation by Martin Lambers , improved by Simon Josefsson. */ /* For PASS_MAX. */ #include /* For _getch(). */ #include /* For strdup(). */ #include #ifndef PASS_MAX # define PASS_MAX 512 #endif char * getpass (const char *prompt) { char getpassbuf[PASS_MAX + 1]; size_t i = 0; int c; if (prompt) { fputs (prompt, stderr); fflush (stderr); } for (;;) { c = _getch (); if (c == '\r') { getpassbuf[i] = '\0'; break; } else if (i < PASS_MAX) { getpassbuf[i++] = c; } if (i >= PASS_MAX) { getpassbuf[i] = '\0'; break; } } if (prompt) { fputs ("\r\n", stderr); fflush (stderr); } return strdup (getpassbuf); } #endif libprelude-1.0.0/libmissing/minmax.h0000664000076400007640000000462711341220437014402 00000000000000/* MIN, MAX macros. Copyright (C) 1995, 1998, 2001, 2003, 2005, 2009, 2010 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser 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 Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ #ifndef _MINMAX_H #define _MINMAX_H /* Note: MIN, MAX are also defined in on some systems (glibc, IRIX, HP-UX, OSF/1). Therefore you might get warnings about MIN, MAX macro redefinitions on some systems; the workaround is to #include this file as the last one among the #include list. */ /* Before we define the following symbols we get the file since otherwise we get redefinitions on some systems if is included after this file. Likewise for . If more than one of these system headers define MIN and MAX, pick just one of the headers (because the definitions most likely are the same). */ #if HAVE_MINMAX_IN_LIMITS_H # include #elif HAVE_MINMAX_IN_SYS_PARAM_H # include #endif /* Note: MIN and MAX should be used with two arguments of the same type. They might not return the minimum and maximum of their two arguments, if the arguments have different types or have unusual floating-point values. For example, on a typical host with 32-bit 'int', 64-bit 'long long', and 64-bit IEEE 754 'double' types: MAX (-1, 2147483648) returns 4294967295. MAX (9007199254740992.0, 9007199254740993) returns 9007199254740992.0. MAX (NaN, 0.0) returns 0.0. MAX (+0.0, -0.0) returns -0.0. and in each case the answer is in some sense bogus. */ /* MAX(a,b) returns the maximum of A and B. */ #ifndef MAX # define MAX(a,b) ((a) > (b) ? (a) : (b)) #endif /* MIN(a,b) returns the minimum of A and B. */ #ifndef MIN # define MIN(a,b) ((a) < (b) ? (a) : (b)) #endif #endif /* _MINMAX_H */ libprelude-1.0.0/libmissing/connect.c0000664000076400007640000000262111341220434014522 00000000000000/* connect.c --- wrappers for Windows connect function Copyright (C) 2008, 2009, 2010 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 3 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 Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . */ /* Written by Paolo Bonzini */ #include #define WIN32_LEAN_AND_MEAN /* Get winsock2.h. */ #include /* Get set_winsock_errno, FD_TO_SOCKET etc. */ #include "w32sock.h" #undef connect int rpl_connect (int fd, struct sockaddr *sockaddr, int len) { SOCKET sock = FD_TO_SOCKET (fd); int r = connect (sock, sockaddr, len); if (r < 0) { /* EINPROGRESS is not returned by WinSock 2.0; for backwards compatibility, connect(2) uses EWOULDBLOCK. */ if (WSAGetLastError () == WSAEWOULDBLOCK) WSASetLastError (WSAEINPROGRESS); set_winsock_errno (); } return r; } libprelude-1.0.0/libmissing/close.c0000664000076400007640000000215711341220434014202 00000000000000/* close replacement. Copyright (C) 2008-2010 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 3 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 Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . */ #include /* Specification. */ #include #include "close-hook.h" /* Override close() to call into other gnulib modules. */ int rpl_close (int fd) #undef close { #if WINDOWS_SOCKETS int retval = execute_all_close_hooks (fd); #else int retval = close (fd); #endif #if REPLACE_FCHDIR if (retval >= 0) _gl_unregister_fd (fd); #endif return retval; } libprelude-1.0.0/libmissing/sys_time.in.h0000664000076400007640000000364311345707014015354 00000000000000/* Provide a more complete sys/time.h. Copyright (C) 2007-2010 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser 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 Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ /* Written by Paul Eggert. */ #if __GNUC__ >= 3 @PRAGMA_SYSTEM_HEADER@ #endif #if defined _GL_SYS_TIME_H /* Simply delegate to the system's header, without adding anything. */ # if @HAVE_SYS_TIME_H@ # @INCLUDE_NEXT@ @NEXT_SYS_TIME_H@ # endif #else # define _GL_SYS_TIME_H # if @HAVE_SYS_TIME_H@ # @INCLUDE_NEXT@ @NEXT_SYS_TIME_H@ # else # include # endif /* The definition of _GL_ARG_NONNULL is copied here. */ /* The definition of _GL_WARN_ON_USE is copied here. */ #ifdef __cplusplus extern "C" { #endif # if ! @HAVE_STRUCT_TIMEVAL@ struct timeval { time_t tv_sec; long int tv_usec; }; # endif # if @GNULIB_GETTIMEOFDAY@ # if @REPLACE_GETTIMEOFDAY@ # undef gettimeofday # define gettimeofday rpl_gettimeofday extern int gettimeofday (struct timeval *restrict, void *restrict) _GL_ARG_NONNULL ((1)); # endif # elif defined GNULIB_POSIXCHECK # undef gettimeofday # if HAVE_RAW_DECL_GETTIMEOFDAY _GL_WARN_ON_USE (gettimeofday, "gettimeofday is unportable - " "use gnulib module gettimeofday for portability"); # endif # endif #ifdef __cplusplus } #endif #endif /* _GL_SYS_TIME_H */ libprelude-1.0.0/libmissing/ioctl.c0000664000076400007640000000244011341220435014203 00000000000000/* ioctl.c --- wrappers for Windows ioctl function Copyright (C) 2008, 2009, 2010 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 3 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 Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . */ /* Written by Paolo Bonzini */ #include #include #include #define WIN32_LEAN_AND_MEAN /* Get winsock2.h. */ #include /* Get set_winsock_errno, FD_TO_SOCKET etc. */ #include "w32sock.h" int rpl_ioctl (int fd, int req, ...) { void *buf; va_list args; SOCKET sock; int r; va_start (args, req); buf = va_arg (args, void *); va_end (args); sock = FD_TO_SOCKET (fd); r = ioctlsocket (sock, req, buf); if (r < 0) set_winsock_errno (); return r; } libprelude-1.0.0/libmissing/printf-args.h0000664000076400007640000000743211341220437015342 00000000000000/* Decomposed printf argument list. Copyright (C) 1999, 2002-2003, 2006-2007, 2009-2010 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser 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 Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ #ifndef _PRINTF_ARGS_H #define _PRINTF_ARGS_H /* This file can be parametrized with the following macros: ENABLE_UNISTDIO Set to 1 to enable the unistdio extensions. PRINTF_FETCHARGS Name of the function to be declared. STATIC Set to 'static' to declare the function static. */ /* Default parameters. */ #ifndef PRINTF_FETCHARGS # define PRINTF_FETCHARGS printf_fetchargs #endif /* Get size_t. */ #include /* Get wchar_t. */ #if HAVE_WCHAR_T # include #endif /* Get wint_t. */ #if HAVE_WINT_T # include #endif /* Get va_list. */ #include /* Argument types */ typedef enum { TYPE_NONE, TYPE_SCHAR, TYPE_UCHAR, TYPE_SHORT, TYPE_USHORT, TYPE_INT, TYPE_UINT, TYPE_LONGINT, TYPE_ULONGINT, #if HAVE_LONG_LONG_INT TYPE_LONGLONGINT, TYPE_ULONGLONGINT, #endif TYPE_DOUBLE, TYPE_LONGDOUBLE, TYPE_CHAR, #if HAVE_WINT_T TYPE_WIDE_CHAR, #endif TYPE_STRING, #if HAVE_WCHAR_T TYPE_WIDE_STRING, #endif TYPE_POINTER, TYPE_COUNT_SCHAR_POINTER, TYPE_COUNT_SHORT_POINTER, TYPE_COUNT_INT_POINTER, TYPE_COUNT_LONGINT_POINTER #if HAVE_LONG_LONG_INT , TYPE_COUNT_LONGLONGINT_POINTER #endif #if ENABLE_UNISTDIO /* The unistdio extensions. */ , TYPE_U8_STRING , TYPE_U16_STRING , TYPE_U32_STRING #endif } arg_type; /* Polymorphic argument */ typedef struct { arg_type type; union { signed char a_schar; unsigned char a_uchar; short a_short; unsigned short a_ushort; int a_int; unsigned int a_uint; long int a_longint; unsigned long int a_ulongint; #if HAVE_LONG_LONG_INT long long int a_longlongint; unsigned long long int a_ulonglongint; #endif float a_float; double a_double; long double a_longdouble; int a_char; #if HAVE_WINT_T wint_t a_wide_char; #endif const char* a_string; #if HAVE_WCHAR_T const wchar_t* a_wide_string; #endif void* a_pointer; signed char * a_count_schar_pointer; short * a_count_short_pointer; int * a_count_int_pointer; long int * a_count_longint_pointer; #if HAVE_LONG_LONG_INT long long int * a_count_longlongint_pointer; #endif #if ENABLE_UNISTDIO /* The unistdio extensions. */ const uint8_t * a_u8_string; const uint16_t * a_u16_string; const uint32_t * a_u32_string; #endif } a; } argument; typedef struct { size_t count; argument *arg; } arguments; /* Fetch the arguments, putting them into a. */ #ifdef STATIC STATIC #else extern #endif int PRINTF_FETCHARGS (va_list args, arguments *a); #endif /* _PRINTF_ARGS_H */ libprelude-1.0.0/libmissing/relocatable.h0000664000076400007640000000620611341220437015361 00000000000000/* Provide relocatable packages. Copyright (C) 2003, 2005, 2008, 2009, 2010 Free Software Foundation, Inc. Written by Bruno Haible , 2003. This program is free software; you can redistribute it and/or modify it under the terms of the GNU Library 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 Library General Public License for more details. You should have received a copy of the GNU Library General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ #ifndef _RELOCATABLE_H #define _RELOCATABLE_H #ifdef __cplusplus extern "C" { #endif /* This can be enabled through the configure --enable-relocatable option. */ #if ENABLE_RELOCATABLE /* When building a DLL, we must export some functions. Note that because this is a private .h file, we don't need to use __declspec(dllimport) in any case. */ #if HAVE_VISIBILITY && BUILDING_DLL # define RELOCATABLE_DLL_EXPORTED __attribute__((__visibility__("default"))) #elif defined _MSC_VER && BUILDING_DLL # define RELOCATABLE_DLL_EXPORTED __declspec(dllexport) #else # define RELOCATABLE_DLL_EXPORTED #endif /* Sets the original and the current installation prefix of the package. Relocation simply replaces a pathname starting with the original prefix by the corresponding pathname with the current prefix instead. Both prefixes should be directory names without trailing slash (i.e. use "" instead of "/"). */ extern RELOCATABLE_DLL_EXPORTED void set_relocation_prefix (const char *orig_prefix, const char *curr_prefix); /* Returns the pathname, relocated according to the current installation directory. The returned string is either PATHNAME unmodified or a freshly allocated string that you can free with free() after casting it to 'char *'. */ extern const char * relocate (const char *pathname); /* Memory management: relocate() potentially allocates memory, because it has to construct a fresh pathname. If this is a problem because your program calls relocate() frequently, think about caching the result. Or free the return value if it was different from the argument pathname. */ /* Convenience function: Computes the current installation prefix, based on the original installation prefix, the original installation directory of a particular file, and the current pathname of this file. Returns it, freshly allocated. Returns NULL upon failure. */ extern char * compute_curr_prefix (const char *orig_installprefix, const char *orig_installdir, const char *curr_pathname); #else /* By default, we use the hardwired pathnames. */ #define relocate(pathname) (pathname) #endif #ifdef __cplusplus } #endif #endif /* _RELOCATABLE_H */ libprelude-1.0.0/libmissing/printf-args.c0000664000076400007640000001477011341220437015340 00000000000000/* Decomposed printf argument list. Copyright (C) 1999, 2002-2003, 2005-2007, 2009-2010 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser 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 Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ /* This file can be parametrized with the following macros: ENABLE_UNISTDIO Set to 1 to enable the unistdio extensions. PRINTF_FETCHARGS Name of the function to be defined. STATIC Set to 'static' to declare the function static. */ #ifndef PRINTF_FETCHARGS # include #endif /* Specification. */ #ifndef PRINTF_FETCHARGS # include "printf-args.h" #endif #ifdef STATIC STATIC #endif int PRINTF_FETCHARGS (va_list args, arguments *a) { size_t i; argument *ap; for (i = 0, ap = &a->arg[0]; i < a->count; i++, ap++) switch (ap->type) { case TYPE_SCHAR: ap->a.a_schar = va_arg (args, /*signed char*/ int); break; case TYPE_UCHAR: ap->a.a_uchar = va_arg (args, /*unsigned char*/ int); break; case TYPE_SHORT: ap->a.a_short = va_arg (args, /*short*/ int); break; case TYPE_USHORT: ap->a.a_ushort = va_arg (args, /*unsigned short*/ int); break; case TYPE_INT: ap->a.a_int = va_arg (args, int); break; case TYPE_UINT: ap->a.a_uint = va_arg (args, unsigned int); break; case TYPE_LONGINT: ap->a.a_longint = va_arg (args, long int); break; case TYPE_ULONGINT: ap->a.a_ulongint = va_arg (args, unsigned long int); break; #if HAVE_LONG_LONG_INT case TYPE_LONGLONGINT: ap->a.a_longlongint = va_arg (args, long long int); break; case TYPE_ULONGLONGINT: ap->a.a_ulonglongint = va_arg (args, unsigned long long int); break; #endif case TYPE_DOUBLE: ap->a.a_double = va_arg (args, double); break; case TYPE_LONGDOUBLE: ap->a.a_longdouble = va_arg (args, long double); break; case TYPE_CHAR: ap->a.a_char = va_arg (args, int); break; #if HAVE_WINT_T case TYPE_WIDE_CHAR: /* Although ISO C 99 7.24.1.(2) says that wint_t is "unchanged by default argument promotions", this is not the case in mingw32, where wint_t is 'unsigned short'. */ ap->a.a_wide_char = (sizeof (wint_t) < sizeof (int) ? (wint_t) va_arg (args, int) : va_arg (args, wint_t)); break; #endif case TYPE_STRING: ap->a.a_string = va_arg (args, const char *); /* A null pointer is an invalid argument for "%s", but in practice it occurs quite frequently in printf statements that produce debug output. Use a fallback in this case. */ if (ap->a.a_string == NULL) ap->a.a_string = "(NULL)"; break; #if HAVE_WCHAR_T case TYPE_WIDE_STRING: ap->a.a_wide_string = va_arg (args, const wchar_t *); /* A null pointer is an invalid argument for "%ls", but in practice it occurs quite frequently in printf statements that produce debug output. Use a fallback in this case. */ if (ap->a.a_wide_string == NULL) { static const wchar_t wide_null_string[] = { (wchar_t)'(', (wchar_t)'N', (wchar_t)'U', (wchar_t)'L', (wchar_t)'L', (wchar_t)')', (wchar_t)0 }; ap->a.a_wide_string = wide_null_string; } break; #endif case TYPE_POINTER: ap->a.a_pointer = va_arg (args, void *); break; case TYPE_COUNT_SCHAR_POINTER: ap->a.a_count_schar_pointer = va_arg (args, signed char *); break; case TYPE_COUNT_SHORT_POINTER: ap->a.a_count_short_pointer = va_arg (args, short *); break; case TYPE_COUNT_INT_POINTER: ap->a.a_count_int_pointer = va_arg (args, int *); break; case TYPE_COUNT_LONGINT_POINTER: ap->a.a_count_longint_pointer = va_arg (args, long int *); break; #if HAVE_LONG_LONG_INT case TYPE_COUNT_LONGLONGINT_POINTER: ap->a.a_count_longlongint_pointer = va_arg (args, long long int *); break; #endif #if ENABLE_UNISTDIO /* The unistdio extensions. */ case TYPE_U8_STRING: ap->a.a_u8_string = va_arg (args, const uint8_t *); /* A null pointer is an invalid argument for "%U", but in practice it occurs quite frequently in printf statements that produce debug output. Use a fallback in this case. */ if (ap->a.a_u8_string == NULL) { static const uint8_t u8_null_string[] = { '(', 'N', 'U', 'L', 'L', ')', 0 }; ap->a.a_u8_string = u8_null_string; } break; case TYPE_U16_STRING: ap->a.a_u16_string = va_arg (args, const uint16_t *); /* A null pointer is an invalid argument for "%lU", but in practice it occurs quite frequently in printf statements that produce debug output. Use a fallback in this case. */ if (ap->a.a_u16_string == NULL) { static const uint16_t u16_null_string[] = { '(', 'N', 'U', 'L', 'L', ')', 0 }; ap->a.a_u16_string = u16_null_string; } break; case TYPE_U32_STRING: ap->a.a_u32_string = va_arg (args, const uint32_t *); /* A null pointer is an invalid argument for "%llU", but in practice it occurs quite frequently in printf statements that produce debug output. Use a fallback in this case. */ if (ap->a.a_u32_string == NULL) { static const uint32_t u32_null_string[] = { '(', 'N', 'U', 'L', 'L', ')', 0 }; ap->a.a_u32_string = u32_null_string; } break; #endif default: /* Unknown type. */ return -1; } return 0; } libprelude-1.0.0/libmissing/fopen.c0000664000076400007640000000620611341220434014203 00000000000000/* Open a stream to a file. Copyright (C) 2007-2010 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 3 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 Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . */ /* Written by Bruno Haible , 2007. */ #include /* Get the original definition of fopen. It might be defined as a macro. */ #define __need_FILE #include #undef __need_FILE static inline FILE * orig_fopen (const char *filename, const char *mode) { return fopen (filename, mode); } /* Specification. */ #include #include #include #include #include #include #include FILE * rpl_fopen (const char *filename, const char *mode) { #if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ if (strcmp (filename, "/dev/null") == 0) filename = "NUL"; #endif #if FOPEN_TRAILING_SLASH_BUG /* If the filename ends in a slash and a mode that requires write access is specified, then fail. Rationale: POSIX says that "A pathname that contains at least one non-slash character and that ends with one or more trailing slashes shall be resolved as if a single dot character ( '.' ) were appended to the pathname." and "The special filename dot shall refer to the directory specified by its predecessor." If the named file already exists as a directory, then if a mode that requires write access is specified, fopen() must fail because POSIX says that it fails with errno = EISDIR in this case. If the named file does not exist or does not name a directory, then fopen() must fail since the file does not contain a '.' directory. */ { size_t len = strlen (filename); if (len > 0 && filename[len - 1] == '/') { int fd; struct stat statbuf; FILE *fp; if (mode[0] == 'w' || mode[0] == 'a') { errno = EISDIR; return NULL; } fd = open (filename, O_RDONLY); if (fd < 0) return NULL; if (fstat (fd, &statbuf) >= 0 && !S_ISDIR (statbuf.st_mode)) { close (fd); errno = ENOTDIR; return NULL; } fp = fdopen (fd, mode); if (fp == NULL) { int saved_errno = errno; close (fd); errno = saved_errno; } return fp; } } # endif return orig_fopen (filename, mode); } libprelude-1.0.0/libmissing/sigprocmask.c0000664000076400007640000002020611341220440015407 00000000000000/* POSIX compatible signal blocking. Copyright (C) 2006-2010 Free Software Foundation, Inc. Written by Bruno Haible , 2006. This program is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 3 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 Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . */ #include /* Specification. */ #include #include #include #include /* We assume that a platform without POSIX signal blocking functions also does not have the POSIX sigaction() function, only the signal() function. We also assume signal() has SysV semantics, where any handler is uninstalled prior to being invoked. This is true for Woe32 platforms. */ /* We use raw signal(), but also provide a wrapper rpl_signal() so that applications can query or change a blocked signal. */ #undef signal /* Provide invalid signal numbers as fallbacks if the uncatchable signals are not defined. */ #ifndef SIGKILL # define SIGKILL (-1) #endif #ifndef SIGSTOP # define SIGSTOP (-1) #endif /* On native Windows, as of 2008, the signal SIGABRT_COMPAT is an alias for the signal SIGABRT. Only one signal handler is stored for both SIGABRT and SIGABRT_COMPAT. SIGABRT_COMPAT is not a signal of its own. */ #if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ # undef SIGABRT_COMPAT # define SIGABRT_COMPAT 6 #endif #ifdef SIGABRT_COMPAT # define SIGABRT_COMPAT_MASK (1U << SIGABRT_COMPAT) #else # define SIGABRT_COMPAT_MASK 0 #endif typedef void (*handler_t) (int); /* Handling of gnulib defined signals. */ #if GNULIB_defined_SIGPIPE static handler_t SIGPIPE_handler = SIG_DFL; #endif #if GNULIB_defined_SIGPIPE static handler_t ext_signal (int sig, handler_t handler) { switch (sig) { case SIGPIPE: { handler_t old_handler = SIGPIPE_handler; SIGPIPE_handler = handler; return old_handler; } default: /* System defined signal */ return signal (sig, handler); } } # define signal ext_signal #endif int sigismember (const sigset_t *set, int sig) { if (sig >= 0 && sig < NSIG) { #ifdef SIGABRT_COMPAT if (sig == SIGABRT_COMPAT) sig = SIGABRT; #endif return (*set >> sig) & 1; } else return 0; } int sigemptyset (sigset_t *set) { *set = 0; return 0; } int sigaddset (sigset_t *set, int sig) { if (sig >= 0 && sig < NSIG) { #ifdef SIGABRT_COMPAT if (sig == SIGABRT_COMPAT) sig = SIGABRT; #endif *set |= 1U << sig; return 0; } else { errno = EINVAL; return -1; } } int sigdelset (sigset_t *set, int sig) { if (sig >= 0 && sig < NSIG) { #ifdef SIGABRT_COMPAT if (sig == SIGABRT_COMPAT) sig = SIGABRT; #endif *set &= ~(1U << sig); return 0; } else { errno = EINVAL; return -1; } } int sigfillset (sigset_t *set) { *set = ((2U << (NSIG - 1)) - 1) & ~ SIGABRT_COMPAT_MASK; return 0; } /* Set of currently blocked signals. */ static volatile sigset_t blocked_set /* = 0 */; /* Set of currently blocked and pending signals. */ static volatile sig_atomic_t pending_array[NSIG] /* = { 0 } */; /* Signal handler that is installed for blocked signals. */ static void blocked_handler (int sig) { /* Reinstall the handler, in case the signal occurs multiple times while blocked. There is an inherent race where an asynchronous signal in between when the kernel uninstalled the handler and when we reinstall it will trigger the default handler; oh well. */ signal (sig, blocked_handler); if (sig >= 0 && sig < NSIG) pending_array[sig] = 1; } int sigpending (sigset_t *set) { sigset_t pending = 0; int sig; for (sig = 0; sig < NSIG; sig++) if (pending_array[sig]) pending |= 1U << sig; *set = pending; return 0; } /* The previous signal handlers. Only the array elements corresponding to blocked signals are relevant. */ static volatile handler_t old_handlers[NSIG]; int sigprocmask (int operation, const sigset_t *set, sigset_t *old_set) { if (old_set != NULL) *old_set = blocked_set; if (set != NULL) { sigset_t new_blocked_set; sigset_t to_unblock; sigset_t to_block; switch (operation) { case SIG_BLOCK: new_blocked_set = blocked_set | *set; break; case SIG_SETMASK: new_blocked_set = *set; break; case SIG_UNBLOCK: new_blocked_set = blocked_set & ~*set; break; default: errno = EINVAL; return -1; } to_unblock = blocked_set & ~new_blocked_set; to_block = new_blocked_set & ~blocked_set; if (to_block != 0) { int sig; for (sig = 0; sig < NSIG; sig++) if ((to_block >> sig) & 1) { pending_array[sig] = 0; if ((old_handlers[sig] = signal (sig, blocked_handler)) != SIG_ERR) blocked_set |= 1U << sig; } } if (to_unblock != 0) { sig_atomic_t received[NSIG]; int sig; for (sig = 0; sig < NSIG; sig++) if ((to_unblock >> sig) & 1) { if (signal (sig, old_handlers[sig]) != blocked_handler) /* The application changed a signal handler while the signal was blocked, bypassing our rpl_signal replacement. We don't support this. */ abort (); received[sig] = pending_array[sig]; blocked_set &= ~(1U << sig); pending_array[sig] = 0; } else received[sig] = 0; for (sig = 0; sig < NSIG; sig++) if (received[sig]) raise (sig); } } return 0; } /* Install the handler FUNC for signal SIG, and return the previous handler. */ handler_t rpl_signal (int sig, handler_t handler) { /* We must provide a wrapper, so that a user can query what handler they installed even if that signal is currently blocked. */ if (sig >= 0 && sig < NSIG && sig != SIGKILL && sig != SIGSTOP && handler != SIG_ERR) { #ifdef SIGABRT_COMPAT if (sig == SIGABRT_COMPAT) sig = SIGABRT; #endif if (blocked_set & (1U << sig)) { /* POSIX states that sigprocmask and signal are both async-signal-safe. This is not true of our implementation - there is a slight data race where an asynchronous interrupt on signal A can occur after we install blocked_handler but before we have updated old_handlers for signal B, such that handler A can see stale information if it calls signal(B). Oh well - signal handlers really shouldn't try to manipulate the installed handlers of unrelated signals. */ handler_t result = old_handlers[sig]; old_handlers[sig] = handler; return result; } else return signal (sig, handler); } else { errno = EINVAL; return SIG_ERR; } } #if GNULIB_defined_SIGPIPE /* Raise the signal SIG. */ int rpl_raise (int sig) # undef raise { switch (sig) { case SIGPIPE: if (blocked_set & (1U << sig)) pending_array[sig] = 1; else { handler_t handler = SIGPIPE_handler; if (handler == SIG_DFL) exit (128 + SIGPIPE); else if (handler != SIG_IGN) (*handler) (sig); } return 0; default: /* System defined signal */ return raise (sig); } } #endif libprelude-1.0.0/libmissing/stdlib.in.h0000664000076400007640000004067711341220440014776 00000000000000/* A GNU-like . Copyright (C) 1995, 2001-2004, 2006-2010 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 3 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 Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . */ #if __GNUC__ >= 3 @PRAGMA_SYSTEM_HEADER@ #endif #if defined __need_malloc_and_calloc /* Special invocation convention inside glibc header files. */ #@INCLUDE_NEXT@ @NEXT_STDLIB_H@ #else /* Normal invocation convention. */ #ifndef _GL_STDLIB_H /* The include_next requires a split double-inclusion guard. */ #@INCLUDE_NEXT@ @NEXT_STDLIB_H@ #ifndef _GL_STDLIB_H #define _GL_STDLIB_H /* NetBSD 5.0 mis-defines NULL. */ #include /* Solaris declares getloadavg() in . */ #if (@GNULIB_GETLOADAVG@ || defined GNULIB_POSIXCHECK) && @HAVE_SYS_LOADAVG_H@ # include #endif /* OSF/1 5.1 declares 'struct random_data' in , which is included from if _REENTRANT is defined. Include it always. */ #if @HAVE_RANDOM_H@ # include #endif #if !@HAVE_STRUCT_RANDOM_DATA@ || (@GNULIB_RANDOM_R@ && !@HAVE_RANDOM_R@) \ || defined GNULIB_POSIXCHECK # include #endif #if !@HAVE_STRUCT_RANDOM_DATA@ struct random_data { int32_t *fptr; /* Front pointer. */ int32_t *rptr; /* Rear pointer. */ int32_t *state; /* Array of state values. */ int rand_type; /* Type of random number generator. */ int rand_deg; /* Degree of random number generator. */ int rand_sep; /* Distance between front and rear. */ int32_t *end_ptr; /* Pointer behind state table. */ }; #endif #if (@GNULIB_MKSTEMP@ || @GNULIB_GETSUBOPT@ || defined GNULIB_POSIXCHECK) && ! defined __GLIBC__ /* On MacOS X 10.3, only declares mkstemp. */ /* On Cygwin 1.7.1, only declares getsubopt. */ /* But avoid namespace pollution on glibc systems. */ # include #endif /* The definition of _GL_ARG_NONNULL is copied here. */ /* The definition of _GL_WARN_ON_USE is copied here. */ /* Some systems do not define EXIT_*, despite otherwise supporting C89. */ #ifndef EXIT_SUCCESS # define EXIT_SUCCESS 0 #endif /* Tandem/NSK and other platforms that define EXIT_FAILURE as -1 interfere with proper operation of xargs. */ #ifndef EXIT_FAILURE # define EXIT_FAILURE 1 #elif EXIT_FAILURE != 1 # undef EXIT_FAILURE # define EXIT_FAILURE 1 #endif #ifdef __cplusplus extern "C" { #endif #if @GNULIB_ATOLL@ # if !@HAVE_ATOLL@ /* Parse a signed decimal integer. Returns the value of the integer. Errors are not detected. */ extern long long atoll (const char *string) _GL_ARG_NONNULL ((1)); # endif #elif defined GNULIB_POSIXCHECK # undef atoll # if HAVE_RAW_DECL_ATOLL _GL_WARN_ON_USE (atoll, "atoll is unportable - " "use gnulib module atoll for portability"); # endif #endif #if @GNULIB_CALLOC_POSIX@ # if !@HAVE_CALLOC_POSIX@ # undef calloc # define calloc rpl_calloc extern void * calloc (size_t nmemb, size_t size); # endif #elif defined GNULIB_POSIXCHECK # undef calloc /* Assume calloc is always declared. */ _GL_WARN_ON_USE (calloc, "calloc is not POSIX compliant everywhere - " "use gnulib module calloc-posix for portability"); #endif #if @GNULIB_CANONICALIZE_FILE_NAME@ # if @REPLACE_CANONICALIZE_FILE_NAME@ # define canonicalize_file_name rpl_canonicalize_file_name # endif # if !@HAVE_CANONICALIZE_FILE_NAME@ || @REPLACE_CANONICALIZE_FILE_NAME@ extern char *canonicalize_file_name (const char *name) _GL_ARG_NONNULL ((1)); # endif #elif defined GNULIB_POSIXCHECK # undef canonicalize_file_name # if HAVE_RAW_DECL_CANONICALIZE_FILE_NAME _GL_WARN_ON_USE (canonicalize_file_name, "canonicalize_file_name is unportable - " "use gnulib module canonicalize-lgpl for portability"); # endif #endif #if @GNULIB_GETLOADAVG@ # if !@HAVE_DECL_GETLOADAVG@ /* Store max(NELEM,3) load average numbers in LOADAVG[]. The three numbers are the load average of the last 1 minute, the last 5 minutes, and the last 15 minutes, respectively. LOADAVG is an array of NELEM numbers. */ extern int getloadavg (double loadavg[], int nelem) _GL_ARG_NONNULL ((1)); # endif #elif defined GNULIB_POSIXCHECK # undef getloadavg # if HAVE_RAW_DECL_GETLOADAVG _GL_WARN_ON_USE (getloadavg, "getloadavg is not portable - " "use gnulib module getloadavg for portability"); # endif #endif #if @GNULIB_GETSUBOPT@ /* Assuming *OPTIONP is a comma separated list of elements of the form "token" or "token=value", getsubopt parses the first of these elements. If the first element refers to a "token" that is member of the given NULL-terminated array of tokens: - It replaces the comma with a NUL byte, updates *OPTIONP to point past the first option and the comma, sets *VALUEP to the value of the element (or NULL if it doesn't contain an "=" sign), - It returns the index of the "token" in the given array of tokens. Otherwise it returns -1, and *OPTIONP and *VALUEP are undefined. For more details see the POSIX:2001 specification. http://www.opengroup.org/susv3xsh/getsubopt.html */ # if !@HAVE_GETSUBOPT@ extern int getsubopt (char **optionp, char *const *tokens, char **valuep) _GL_ARG_NONNULL ((1, 2, 3)); # endif #elif defined GNULIB_POSIXCHECK # undef getsubopt # if HAVE_RAW_DECL_GETSUBOPT _GL_WARN_ON_USE (getsubopt, "getsubopt is unportable - " "use gnulib module getsubopt for portability"); # endif #endif #if @GNULIB_MALLOC_POSIX@ # if !@HAVE_MALLOC_POSIX@ # undef malloc # define malloc rpl_malloc extern void * malloc (size_t size); # endif #elif defined GNULIB_POSIXCHECK # undef malloc /* Assume malloc is always declared. */ _GL_WARN_ON_USE (malloc, "malloc is not POSIX compliant everywhere - " "use gnulib module malloc-posix for portability"); #endif #if @GNULIB_MKDTEMP@ # if !@HAVE_MKDTEMP@ /* Create a unique temporary directory from TEMPLATE. The last six characters of TEMPLATE must be "XXXXXX"; they are replaced with a string that makes the directory name unique. Returns TEMPLATE, or a null pointer if it cannot get a unique name. The directory is created mode 700. */ extern char * mkdtemp (char * /*template*/) _GL_ARG_NONNULL ((1)); # endif #elif defined GNULIB_POSIXCHECK # undef mkdtemp # if HAVE_RAW_DECL_MKDTEMP _GL_WARN_ON_USE (mkdtemp, "mkdtemp is unportable - " "use gnulib module mkdtemp for portability"); # endif #endif #if @GNULIB_MKOSTEMP@ # if !@HAVE_MKOSTEMP@ /* Create a unique temporary file from TEMPLATE. The last six characters of TEMPLATE must be "XXXXXX"; they are replaced with a string that makes the file name unique. The flags are a bitmask, possibly including O_CLOEXEC (defined in ) and O_TEXT, O_BINARY (defined in "binary-io.h"). The file is then created, with the specified flags, ensuring it didn't exist before. The file is created read-write (mask at least 0600 & ~umask), but it may be world-readable and world-writable (mask 0666 & ~umask), depending on the implementation. Returns the open file descriptor if successful, otherwise -1 and errno set. */ extern int mkostemp (char * /*template*/, int /*flags*/) _GL_ARG_NONNULL ((1)); # endif #elif defined GNULIB_POSIXCHECK # undef mkostemp # if HAVE_RAW_DECL_MKOSTEMP _GL_WARN_ON_USE (mkostemp, "mkostemp is unportable - " "use gnulib module mkostemp for portability"); # endif #endif #if @GNULIB_MKOSTEMPS@ # if !@HAVE_MKOSTEMPS@ /* Create a unique temporary file from TEMPLATE. The last six characters of TEMPLATE before a suffix of length SUFFIXLEN must be "XXXXXX"; they are replaced with a string that makes the file name unique. The flags are a bitmask, possibly including O_CLOEXEC (defined in ) and O_TEXT, O_BINARY (defined in "binary-io.h"). The file is then created, with the specified flags, ensuring it didn't exist before. The file is created read-write (mask at least 0600 & ~umask), but it may be world-readable and world-writable (mask 0666 & ~umask), depending on the implementation. Returns the open file descriptor if successful, otherwise -1 and errno set. */ extern int mkostemps (char * /*template*/, int /*suffixlen*/, int /*flags*/) _GL_ARG_NONNULL ((1)); # endif #elif defined GNULIB_POSIXCHECK # undef mkostemps # if HAVE_RAW_DECL_MKOSTEMPS _GL_WARN_ON_USE (mkostemps, "mkostemps is unportable - " "use gnulib module mkostemps for portability"); # endif #endif #if @GNULIB_MKSTEMP@ # if @REPLACE_MKSTEMP@ /* Create a unique temporary file from TEMPLATE. The last six characters of TEMPLATE must be "XXXXXX"; they are replaced with a string that makes the file name unique. The file is then created, ensuring it didn't exist before. The file is created read-write (mask at least 0600 & ~umask), but it may be world-readable and world-writable (mask 0666 & ~umask), depending on the implementation. Returns the open file descriptor if successful, otherwise -1 and errno set. */ # define mkstemp rpl_mkstemp extern int mkstemp (char * /*template*/) _GL_ARG_NONNULL ((1)); # endif #elif defined GNULIB_POSIXCHECK # undef mkstemp # if HAVE_RAW_DECL_MKSTEMP _GL_WARN_ON_USE (mkstemp, "mkstemp is unportable - " "use gnulib module mkstemp for portability"); # endif #endif #if @GNULIB_MKSTEMPS@ # if !@HAVE_MKSTEMPS@ /* Create a unique temporary file from TEMPLATE. The last six characters of TEMPLATE prior to a suffix of length SUFFIXLEN must be "XXXXXX"; they are replaced with a string that makes the file name unique. The file is then created, ensuring it didn't exist before. The file is created read-write (mask at least 0600 & ~umask), but it may be world-readable and world-writable (mask 0666 & ~umask), depending on the implementation. Returns the open file descriptor if successful, otherwise -1 and errno set. */ extern int mkstemps (char * /*template*/, int /*suffixlen*/) _GL_ARG_NONNULL ((1)); # endif #elif defined GNULIB_POSIXCHECK # undef mkstemps # if HAVE_RAW_DECL_MKSTEMPS _GL_WARN_ON_USE (mkstemps, "mkstemps is unportable - " "use gnulib module mkstemps for portability"); # endif #endif #if @GNULIB_PUTENV@ # if @REPLACE_PUTENV@ # undef putenv # define putenv rpl_putenv extern int putenv (char *string) _GL_ARG_NONNULL ((1)); # endif #endif #if @GNULIB_RANDOM_R@ # if !@HAVE_RANDOM_R@ # ifndef RAND_MAX # define RAND_MAX 2147483647 # endif int srandom_r (unsigned int seed, struct random_data *rand_state) _GL_ARG_NONNULL ((2)); int initstate_r (unsigned int seed, char *buf, size_t buf_size, struct random_data *rand_state) _GL_ARG_NONNULL ((2, 4)); int setstate_r (char *arg_state, struct random_data *rand_state) _GL_ARG_NONNULL ((1, 2)); int random_r (struct random_data *buf, int32_t *result) _GL_ARG_NONNULL ((1, 2)); # endif #elif defined GNULIB_POSIXCHECK # undef random_r # if HAVE_RAW_DECL_RANDOM_R _GL_WARN_ON_USE (random_r, "random_r is unportable - " "use gnulib module random_r for portability"); # endif # undef initstate_r # if HAVE_RAW_DECL_INITSTATE_R _GL_WARN_ON_USE (initstate_r, "initstate_r is unportable - " "use gnulib module random_r for portability"); # endif # undef srandom_r # if HAVE_RAW_DECL_SRANDOM_R _GL_WARN_ON_USE (srandom_r, "srandom_r is unportable - " "use gnulib module random_r for portability"); # endif # undef setstate_r # if HAVE_RAW_DECL_SETSTATE_R _GL_WARN_ON_USE (setstate_r, "setstate_r is unportable - " "use gnulib module random_r for portability"); # endif #endif #if @GNULIB_REALLOC_POSIX@ # if !@HAVE_REALLOC_POSIX@ # undef realloc # define realloc rpl_realloc extern void * realloc (void *ptr, size_t size); # endif #elif defined GNULIB_POSIXCHECK # undef realloc /* Assume realloc is always declared. */ _GL_WARN_ON_USE (realloc, "realloc is not POSIX compliant everywhere - " "use gnulib module realloc-posix for portability"); #endif #if @GNULIB_REALPATH@ # if @REPLACE_REALPATH@ # define realpath rpl_realpath # endif # if !@HAVE_REALPATH@ || @REPLACE_REALPATH@ extern char *realpath (const char *name, char *resolved) _GL_ARG_NONNULL ((1)); # endif #elif defined GNULIB_POSIXCHECK # undef realpath # if HAVE_RAW_DECL_REALPATH _GL_WARN_ON_USE (realpath, "realpath is unportable - use gnulib module " "canonicalize or canonicalize-lgpl for portability"); # endif #endif #if @GNULIB_RPMATCH@ # if !@HAVE_RPMATCH@ /* Test a user response to a question. Return 1 if it is affirmative, 0 if it is negative, or -1 if not clear. */ extern int rpmatch (const char *response) _GL_ARG_NONNULL ((1)); # endif #elif defined GNULIB_POSIXCHECK # undef rpmatch # if HAVE_RAW_DECL_RPMATCH _GL_WARN_ON_USE (rpmatch, "rpmatch is unportable - " "use gnulib module rpmatch for portability"); # endif #endif #if @GNULIB_SETENV@ # if @REPLACE_SETENV@ # undef setenv # define setenv rpl_setenv # endif # if !@HAVE_SETENV@ || @REPLACE_SETENV@ /* Set NAME to VALUE in the environment. If REPLACE is nonzero, overwrite an existing value. */ extern int setenv (const char *name, const char *value, int replace) _GL_ARG_NONNULL ((1)); # endif #elif defined GNULIB_POSIXCHECK # undef setenv # if HAVE_RAW_DECL_SETENV _GL_WARN_ON_USE (setenv, "setenv is unportable - " "use gnulib module setenv for portability"); # endif #endif #if @GNULIB_STRTOD@ # if @REPLACE_STRTOD@ # define strtod rpl_strtod # endif # if !@HAVE_STRTOD@ || @REPLACE_STRTOD@ /* Parse a double from STRING, updating ENDP if appropriate. */ extern double strtod (const char *str, char **endp) _GL_ARG_NONNULL ((1)); # endif #elif defined GNULIB_POSIXCHECK # undef strtod # if HAVE_RAW_DECL_STRTOD _GL_WARN_ON_USE (strtod, "strtod is unportable - " "use gnulib module strtod for portability"); # endif #endif #if @GNULIB_STRTOLL@ # if !@HAVE_STRTOLL@ /* Parse a signed integer whose textual representation starts at STRING. The integer is expected to be in base BASE (2 <= BASE <= 36); if BASE == 0, it may be decimal or octal (with prefix "0") or hexadecimal (with prefix "0x"). If ENDPTR is not NULL, the address of the first byte after the integer is stored in *ENDPTR. Upon overflow, the return value is LLONG_MAX or LLONG_MIN, and errno is set to ERANGE. */ extern long long strtoll (const char *string, char **endptr, int base) _GL_ARG_NONNULL ((1)); # endif #elif defined GNULIB_POSIXCHECK # undef strtoll # if HAVE_RAW_DECL_STRTOLL _GL_WARN_ON_USE (strtoll, "strtoll is unportable - " "use gnulib module strtoll for portability"); # endif #endif #if @GNULIB_STRTOULL@ # if !@HAVE_STRTOULL@ /* Parse an unsigned integer whose textual representation starts at STRING. The integer is expected to be in base BASE (2 <= BASE <= 36); if BASE == 0, it may be decimal or octal (with prefix "0") or hexadecimal (with prefix "0x"). If ENDPTR is not NULL, the address of the first byte after the integer is stored in *ENDPTR. Upon overflow, the return value is ULLONG_MAX, and errno is set to ERANGE. */ extern unsigned long long strtoull (const char *string, char **endptr, int base) _GL_ARG_NONNULL ((1)); # endif #elif defined GNULIB_POSIXCHECK # undef strtoull # if HAVE_RAW_DECL_STRTOULL _GL_WARN_ON_USE (strtoull, "strtoull is unportable - " "use gnulib module strtoull for portability"); # endif #endif #if @GNULIB_UNSETENV@ # if @REPLACE_UNSETENV@ # undef unsetenv # define unsetenv rpl_unsetenv # endif # if !@HAVE_UNSETENV@ || @REPLACE_UNSETENV@ /* Remove the variable NAME from the environment. */ extern int unsetenv (const char *name) _GL_ARG_NONNULL ((1)); # endif #elif defined GNULIB_POSIXCHECK # undef unsetenv # if HAVE_RAW_DECL_UNSETENV _GL_WARN_ON_USE (unsetenv, "unsetenv is unportable - " "use gnulib module unsetenv for portability"); # endif #endif #ifdef __cplusplus } #endif #endif /* _GL_STDLIB_H */ #endif /* _GL_STDLIB_H */ #endif libprelude-1.0.0/libmissing/memmem.c0000664000076400007640000000554311341220437014357 00000000000000/* Copyright (C) 1991, 1992, 1993, 1994, 1996, 1997, 1998, 2000, 2004, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. This file is part of the GNU C Library. This program is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser 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 Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ /* This particular implementation was written by Eric Blake, 2008. */ #ifndef _LIBC # include #endif /* Specification of memmem. */ #include #ifndef _LIBC # define __builtin_expect(expr, val) (expr) #endif #define RETURN_TYPE void * #define AVAILABLE(h, h_l, j, n_l) ((j) <= (h_l) - (n_l)) #include "str-two-way.h" /* Return the first occurrence of NEEDLE in HAYSTACK. Return HAYSTACK if NEEDLE_LEN is 0, otherwise NULL if NEEDLE is not found in HAYSTACK. */ void * memmem (const void *haystack_start, size_t haystack_len, const void *needle_start, size_t needle_len) { /* Abstract memory is considered to be an array of 'unsigned char' values, not an array of 'char' values. See ISO C 99 section 6.2.6.1. */ const unsigned char *haystack = (const unsigned char *) haystack_start; const unsigned char *needle = (const unsigned char *) needle_start; if (needle_len == 0) /* The first occurrence of the empty string is deemed to occur at the beginning of the string. */ return (void *) haystack; /* Sanity check, otherwise the loop might search through the whole memory. */ if (__builtin_expect (haystack_len < needle_len, 0)) return NULL; /* Use optimizations in memchr when possible, to reduce the search size of haystack using a linear algorithm with a smaller coefficient. However, avoid memchr for long needles, since we can often achieve sublinear performance. */ if (needle_len < LONG_NEEDLE_THRESHOLD) { haystack = memchr (haystack, *needle, haystack_len); if (!haystack || __builtin_expect (needle_len == 1, 0)) return (void *) haystack; haystack_len -= haystack - (const unsigned char *) haystack_start; if (haystack_len < needle_len) return NULL; return two_way_short_needle (haystack, haystack_len, needle, needle_len); } else return two_way_long_needle (haystack, haystack_len, needle, needle_len); } #undef LONG_NEEDLE_THRESHOLD libprelude-1.0.0/libmissing/getdelim.c0000664000076400007640000000723611341220435014673 00000000000000/* getdelim.c --- Implementation of replacement getdelim function. Copyright (C) 1994, 1996, 1997, 1998, 2001, 2003, 2005, 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser 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 Lesser General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ /* Ported from glibc by Simon Josefsson. */ #include /* Don't use __attribute__ __nonnull__ in this compilation unit. Otherwise gcc optimizes away the lineptr == NULL || n == NULL || fp == NULL tests below. */ #define _GL_ARG_NONNULL(params) #include #include #include #include #include #ifndef SSIZE_MAX # define SSIZE_MAX ((ssize_t) (SIZE_MAX / 2)) #endif #if USE_UNLOCKED_IO # include "unlocked-io.h" # define getc_maybe_unlocked(fp) getc(fp) #elif !HAVE_FLOCKFILE || !HAVE_FUNLOCKFILE || !HAVE_DECL_GETC_UNLOCKED # undef flockfile # undef funlockfile # define flockfile(x) ((void) 0) # define funlockfile(x) ((void) 0) # define getc_maybe_unlocked(fp) getc(fp) #else # define getc_maybe_unlocked(fp) getc_unlocked(fp) #endif /* Read up to (and including) a DELIMITER from FP into *LINEPTR (and NUL-terminate it). *LINEPTR is a pointer returned from malloc (or NULL), pointing to *N characters of space. It is realloc'ed as necessary. Returns the number of characters read (not including the null terminator), or -1 on error or EOF. */ ssize_t getdelim (char **lineptr, size_t *n, int delimiter, FILE *fp) { ssize_t result; size_t cur_len = 0; if (lineptr == NULL || n == NULL || fp == NULL) { errno = EINVAL; return -1; } flockfile (fp); if (*lineptr == NULL || *n == 0) { char *new_lineptr; *n = 120; new_lineptr = (char *) realloc (*lineptr, *n); if (new_lineptr == NULL) { result = -1; goto unlock_return; } *lineptr = new_lineptr; } for (;;) { int i; i = getc_maybe_unlocked (fp); if (i == EOF) { result = -1; break; } /* Make enough space for len+1 (for final NUL) bytes. */ if (cur_len + 1 >= *n) { size_t needed_max = SSIZE_MAX < SIZE_MAX ? (size_t) SSIZE_MAX + 1 : SIZE_MAX; size_t needed = 2 * *n + 1; /* Be generous. */ char *new_lineptr; if (needed_max < needed) needed = needed_max; if (cur_len + 1 >= needed) { result = -1; errno = EOVERFLOW; goto unlock_return; } new_lineptr = (char *) realloc (*lineptr, needed); if (new_lineptr == NULL) { result = -1; goto unlock_return; } *lineptr = new_lineptr; *n = needed; } (*lineptr)[cur_len] = i; cur_len++; if (i == delimiter) break; } (*lineptr)[cur_len] = '\0'; result = cur_len ? cur_len : result; unlock_return: funlockfile (fp); /* doesn't set errno */ return result; } libprelude-1.0.0/libmissing/pathmax.h0000664000076400007640000000301211341220437014536 00000000000000/* Define PATH_MAX somehow. Requires sys/types.h. Copyright (C) 1992, 1999, 2001, 2003, 2005, 2009-2010 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser 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 Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ #ifndef _PATHMAX_H # define _PATHMAX_H # include # include # ifndef _POSIX_PATH_MAX # define _POSIX_PATH_MAX 256 # endif # if !defined PATH_MAX && defined _PC_PATH_MAX && defined HAVE_PATHCONF # define PATH_MAX (pathconf ("/", _PC_PATH_MAX) < 1 ? 1024 \ : pathconf ("/", _PC_PATH_MAX)) # endif /* Don't include sys/param.h if it already has been. */ # if defined HAVE_SYS_PARAM_H && !defined PATH_MAX && !defined MAXPATHLEN # include # endif # if !defined PATH_MAX && defined MAXPATHLEN # define PATH_MAX MAXPATHLEN # endif # ifndef PATH_MAX # define PATH_MAX _POSIX_PATH_MAX # endif #endif /* _PATHMAX_H */ libprelude-1.0.0/libmissing/localcharset.c0000664000076400007640000004321611341220435015543 00000000000000/* Determine a canonical name for the current locale's character encoding. Copyright (C) 2000-2006, 2008-2010 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser 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 Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ /* Written by Bruno Haible . */ #include /* Specification. */ #include "localcharset.h" #include #include #include #include #include #if defined __APPLE__ && defined __MACH__ && HAVE_LANGINFO_CODESET # define DARWIN7 /* Darwin 7 or newer, i.e. MacOS X 10.3 or newer */ #endif #if defined _WIN32 || defined __WIN32__ # define WIN32_NATIVE #endif #if defined __EMX__ /* Assume EMX program runs on OS/2, even if compiled under DOS. */ # ifndef OS2 # define OS2 # endif #endif #if !defined WIN32_NATIVE # include # if HAVE_LANGINFO_CODESET # include # else # if 0 /* see comment below */ # include # endif # endif # ifdef __CYGWIN__ # define WIN32_LEAN_AND_MEAN # include # endif #elif defined WIN32_NATIVE # define WIN32_LEAN_AND_MEAN # include #endif #if defined OS2 # define INCL_DOS # include #endif #if ENABLE_RELOCATABLE # include "relocatable.h" #else # define relocate(pathname) (pathname) #endif /* Get LIBDIR. */ #ifndef LIBDIR # include "configmake.h" #endif /* Define O_NOFOLLOW to 0 on platforms where it does not exist. */ #ifndef O_NOFOLLOW # define O_NOFOLLOW 0 #endif #if defined _WIN32 || defined __WIN32__ || defined __CYGWIN__ || defined __EMX__ || defined __DJGPP__ /* Win32, Cygwin, OS/2, DOS */ # define ISSLASH(C) ((C) == '/' || (C) == '\\') #endif #ifndef DIRECTORY_SEPARATOR # define DIRECTORY_SEPARATOR '/' #endif #ifndef ISSLASH # define ISSLASH(C) ((C) == DIRECTORY_SEPARATOR) #endif #if HAVE_DECL_GETC_UNLOCKED # undef getc # define getc getc_unlocked #endif /* The following static variable is declared 'volatile' to avoid a possible multithread problem in the function get_charset_aliases. If we are running in a threaded environment, and if two threads initialize 'charset_aliases' simultaneously, both will produce the same value, and everything will be ok if the two assignments to 'charset_aliases' are atomic. But I don't know what will happen if the two assignments mix. */ #if __STDC__ != 1 # define volatile /* empty */ #endif /* Pointer to the contents of the charset.alias file, if it has already been read, else NULL. Its format is: ALIAS_1 '\0' CANONICAL_1 '\0' ... ALIAS_n '\0' CANONICAL_n '\0' '\0' */ static const char * volatile charset_aliases; /* Return a pointer to the contents of the charset.alias file. */ static const char * get_charset_aliases (void) { const char *cp; cp = charset_aliases; if (cp == NULL) { #if !(defined DARWIN7 || defined VMS || defined WIN32_NATIVE || defined __CYGWIN__) const char *dir; const char *base = "charset.alias"; char *file_name; /* Make it possible to override the charset.alias location. This is necessary for running the testsuite before "make install". */ dir = getenv ("CHARSETALIASDIR"); if (dir == NULL || dir[0] == '\0') dir = relocate (LIBDIR); /* Concatenate dir and base into freshly allocated file_name. */ { size_t dir_len = strlen (dir); size_t base_len = strlen (base); int add_slash = (dir_len > 0 && !ISSLASH (dir[dir_len - 1])); file_name = (char *) malloc (dir_len + add_slash + base_len + 1); if (file_name != NULL) { memcpy (file_name, dir, dir_len); if (add_slash) file_name[dir_len] = DIRECTORY_SEPARATOR; memcpy (file_name + dir_len + add_slash, base, base_len + 1); } } if (file_name == NULL) /* Out of memory. Treat the file as empty. */ cp = ""; else { int fd; /* Open the file. Reject symbolic links on platforms that support O_NOFOLLOW. This is a security feature. Without it, an attacker could retrieve parts of the contents (namely, the tail of the first line that starts with "* ") of an arbitrary file by placing a symbolic link to that file under the name "charset.alias" in some writable directory and defining the environment variable CHARSETALIASDIR to point to that directory. */ fd = open (file_name, O_RDONLY | (HAVE_WORKING_O_NOFOLLOW ? O_NOFOLLOW : 0)); if (fd < 0) /* File not found. Treat it as empty. */ cp = ""; else { FILE *fp; fp = fdopen (fd, "r"); if (fp == NULL) { /* Out of memory. Treat the file as empty. */ close (fd); cp = ""; } else { /* Parse the file's contents. */ char *res_ptr = NULL; size_t res_size = 0; for (;;) { int c; char buf1[50+1]; char buf2[50+1]; size_t l1, l2; char *old_res_ptr; c = getc (fp); if (c == EOF) break; if (c == '\n' || c == ' ' || c == '\t') continue; if (c == '#') { /* Skip comment, to end of line. */ do c = getc (fp); while (!(c == EOF || c == '\n')); if (c == EOF) break; continue; } ungetc (c, fp); if (fscanf (fp, "%50s %50s", buf1, buf2) < 2) break; l1 = strlen (buf1); l2 = strlen (buf2); old_res_ptr = res_ptr; if (res_size == 0) { res_size = l1 + 1 + l2 + 1; res_ptr = (char *) malloc (res_size + 1); } else { res_size += l1 + 1 + l2 + 1; res_ptr = (char *) realloc (res_ptr, res_size + 1); } if (res_ptr == NULL) { /* Out of memory. */ res_size = 0; if (old_res_ptr != NULL) free (old_res_ptr); break; } strcpy (res_ptr + res_size - (l2 + 1) - (l1 + 1), buf1); strcpy (res_ptr + res_size - (l2 + 1), buf2); } fclose (fp); if (res_size == 0) cp = ""; else { *(res_ptr + res_size) = '\0'; cp = res_ptr; } } } free (file_name); } #else # if defined DARWIN7 /* To avoid the trouble of installing a file that is shared by many GNU packages -- many packaging systems have problems with this --, simply inline the aliases here. */ cp = "ISO8859-1" "\0" "ISO-8859-1" "\0" "ISO8859-2" "\0" "ISO-8859-2" "\0" "ISO8859-4" "\0" "ISO-8859-4" "\0" "ISO8859-5" "\0" "ISO-8859-5" "\0" "ISO8859-7" "\0" "ISO-8859-7" "\0" "ISO8859-9" "\0" "ISO-8859-9" "\0" "ISO8859-13" "\0" "ISO-8859-13" "\0" "ISO8859-15" "\0" "ISO-8859-15" "\0" "KOI8-R" "\0" "KOI8-R" "\0" "KOI8-U" "\0" "KOI8-U" "\0" "CP866" "\0" "CP866" "\0" "CP949" "\0" "CP949" "\0" "CP1131" "\0" "CP1131" "\0" "CP1251" "\0" "CP1251" "\0" "eucCN" "\0" "GB2312" "\0" "GB2312" "\0" "GB2312" "\0" "eucJP" "\0" "EUC-JP" "\0" "eucKR" "\0" "EUC-KR" "\0" "Big5" "\0" "BIG5" "\0" "Big5HKSCS" "\0" "BIG5-HKSCS" "\0" "GBK" "\0" "GBK" "\0" "GB18030" "\0" "GB18030" "\0" "SJIS" "\0" "SHIFT_JIS" "\0" "ARMSCII-8" "\0" "ARMSCII-8" "\0" "PT154" "\0" "PT154" "\0" /*"ISCII-DEV" "\0" "?" "\0"*/ "*" "\0" "UTF-8" "\0"; # endif # if defined VMS /* To avoid the troubles of an extra file charset.alias_vms in the sources of many GNU packages, simply inline the aliases here. */ /* The list of encodings is taken from the OpenVMS 7.3-1 documentation "Compaq C Run-Time Library Reference Manual for OpenVMS systems" section 10.7 "Handling Different Character Sets". */ cp = "ISO8859-1" "\0" "ISO-8859-1" "\0" "ISO8859-2" "\0" "ISO-8859-2" "\0" "ISO8859-5" "\0" "ISO-8859-5" "\0" "ISO8859-7" "\0" "ISO-8859-7" "\0" "ISO8859-8" "\0" "ISO-8859-8" "\0" "ISO8859-9" "\0" "ISO-8859-9" "\0" /* Japanese */ "eucJP" "\0" "EUC-JP" "\0" "SJIS" "\0" "SHIFT_JIS" "\0" "DECKANJI" "\0" "DEC-KANJI" "\0" "SDECKANJI" "\0" "EUC-JP" "\0" /* Chinese */ "eucTW" "\0" "EUC-TW" "\0" "DECHANYU" "\0" "DEC-HANYU" "\0" "DECHANZI" "\0" "GB2312" "\0" /* Korean */ "DECKOREAN" "\0" "EUC-KR" "\0"; # endif # if defined WIN32_NATIVE || defined __CYGWIN__ /* To avoid the troubles of installing a separate file in the same directory as the DLL and of retrieving the DLL's directory at runtime, simply inline the aliases here. */ cp = "CP936" "\0" "GBK" "\0" "CP1361" "\0" "JOHAB" "\0" "CP20127" "\0" "ASCII" "\0" "CP20866" "\0" "KOI8-R" "\0" "CP20936" "\0" "GB2312" "\0" "CP21866" "\0" "KOI8-RU" "\0" "CP28591" "\0" "ISO-8859-1" "\0" "CP28592" "\0" "ISO-8859-2" "\0" "CP28593" "\0" "ISO-8859-3" "\0" "CP28594" "\0" "ISO-8859-4" "\0" "CP28595" "\0" "ISO-8859-5" "\0" "CP28596" "\0" "ISO-8859-6" "\0" "CP28597" "\0" "ISO-8859-7" "\0" "CP28598" "\0" "ISO-8859-8" "\0" "CP28599" "\0" "ISO-8859-9" "\0" "CP28605" "\0" "ISO-8859-15" "\0" "CP38598" "\0" "ISO-8859-8" "\0" "CP51932" "\0" "EUC-JP" "\0" "CP51936" "\0" "GB2312" "\0" "CP51949" "\0" "EUC-KR" "\0" "CP51950" "\0" "EUC-TW" "\0" "CP54936" "\0" "GB18030" "\0" "CP65001" "\0" "UTF-8" "\0"; # endif #endif charset_aliases = cp; } return cp; } /* Determine the current locale's character encoding, and canonicalize it into one of the canonical names listed in config.charset. The result must not be freed; it is statically allocated. If the canonical name cannot be determined, the result is a non-canonical name. */ #ifdef STATIC STATIC #endif const char * locale_charset (void) { const char *codeset; const char *aliases; #if !(defined WIN32_NATIVE || defined OS2) # if HAVE_LANGINFO_CODESET /* Most systems support nl_langinfo (CODESET) nowadays. */ codeset = nl_langinfo (CODESET); # ifdef __CYGWIN__ /* Cygwin 1.5.x does not have locales. nl_langinfo (CODESET) always returns "US-ASCII". As long as this is not fixed, return the suffix of the locale name from the environment variables (if present) or the codepage as a number. */ if (codeset != NULL && strcmp (codeset, "US-ASCII") == 0) { const char *locale; static char buf[2 + 10 + 1]; locale = getenv ("LC_ALL"); if (locale == NULL || locale[0] == '\0') { locale = getenv ("LC_CTYPE"); if (locale == NULL || locale[0] == '\0') locale = getenv ("LANG"); } if (locale != NULL && locale[0] != '\0') { /* If the locale name contains an encoding after the dot, return it. */ const char *dot = strchr (locale, '.'); if (dot != NULL) { const char *modifier; dot++; /* Look for the possible @... trailer and remove it, if any. */ modifier = strchr (dot, '@'); if (modifier == NULL) return dot; if (modifier - dot < sizeof (buf)) { memcpy (buf, dot, modifier - dot); buf [modifier - dot] = '\0'; return buf; } } } /* Woe32 has a function returning the locale's codepage as a number: GetACP(). This encoding is used by Cygwin, unless the user has set the environment variable CYGWIN=codepage:oem (which very few people do). Output directed to console windows needs to be converted (to GetOEMCP() if the console is using a raster font, or to GetConsoleOutputCP() if it is using a TrueType font). Cygwin does this conversion transparently (see winsup/cygwin/fhandler_console.cc), converting to GetConsoleOutputCP(). This leads to correct results, except when SetConsoleOutputCP has been called and a raster font is in use. */ sprintf (buf, "CP%u", GetACP ()); codeset = buf; } # endif # else /* On old systems which lack it, use setlocale or getenv. */ const char *locale = NULL; /* But most old systems don't have a complete set of locales. Some (like SunOS 4 or DJGPP) have only the C locale. Therefore we don't use setlocale here; it would return "C" when it doesn't support the locale name the user has set. */ # if 0 locale = setlocale (LC_CTYPE, NULL); # endif if (locale == NULL || locale[0] == '\0') { locale = getenv ("LC_ALL"); if (locale == NULL || locale[0] == '\0') { locale = getenv ("LC_CTYPE"); if (locale == NULL || locale[0] == '\0') locale = getenv ("LANG"); } } /* On some old systems, one used to set locale = "iso8859_1". On others, you set it to "language_COUNTRY.charset". In any case, we resolve it through the charset.alias file. */ codeset = locale; # endif #elif defined WIN32_NATIVE static char buf[2 + 10 + 1]; /* Woe32 has a function returning the locale's codepage as a number: GetACP(). When the output goes to a console window, it needs to be provided in GetOEMCP() encoding if the console is using a raster font, or in GetConsoleOutputCP() encoding if it is using a TrueType font. But in GUI programs and for output sent to files and pipes, GetACP() encoding is the best bet. */ sprintf (buf, "CP%u", GetACP ()); codeset = buf; #elif defined OS2 const char *locale; static char buf[2 + 10 + 1]; ULONG cp[3]; ULONG cplen; /* Allow user to override the codeset, as set in the operating system, with standard language environment variables. */ locale = getenv ("LC_ALL"); if (locale == NULL || locale[0] == '\0') { locale = getenv ("LC_CTYPE"); if (locale == NULL || locale[0] == '\0') locale = getenv ("LANG"); } if (locale != NULL && locale[0] != '\0') { /* If the locale name contains an encoding after the dot, return it. */ const char *dot = strchr (locale, '.'); if (dot != NULL) { const char *modifier; dot++; /* Look for the possible @... trailer and remove it, if any. */ modifier = strchr (dot, '@'); if (modifier == NULL) return dot; if (modifier - dot < sizeof (buf)) { memcpy (buf, dot, modifier - dot); buf [modifier - dot] = '\0'; return buf; } } /* Resolve through the charset.alias file. */ codeset = locale; } else { /* OS/2 has a function returning the locale's codepage as a number. */ if (DosQueryCp (sizeof (cp), cp, &cplen)) codeset = ""; else { sprintf (buf, "CP%u", cp[0]); codeset = buf; } } #endif if (codeset == NULL) /* The canonical name cannot be determined. */ codeset = ""; /* Resolve alias. */ for (aliases = get_charset_aliases (); *aliases != '\0'; aliases += strlen (aliases) + 1, aliases += strlen (aliases) + 1) if (strcmp (codeset, aliases) == 0 || (aliases[0] == '*' && aliases[1] == '\0')) { codeset = aliases + strlen (aliases) + 1; break; } /* Don't return an empty string. GNU libc and GNU libiconv interpret the empty string as denoting "the locale's character encoding", thus GNU libiconv would call this function a second time. */ if (codeset[0] == '\0') codeset = "ASCII"; return codeset; } libprelude-1.0.0/libmissing/frexp.c0000664000076400007640000001034011341220434014212 00000000000000/* Split a double into fraction and mantissa. Copyright (C) 2007-2010 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 3 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 Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . */ /* Written by Paolo Bonzini , 2003, and Bruno Haible , 2007. */ #include /* Specification. */ #include #include #ifdef USE_LONG_DOUBLE # include "isnanl-nolibm.h" # include "fpucw.h" #else # include "isnand-nolibm.h" #endif /* This file assumes FLT_RADIX = 2. If FLT_RADIX is a power of 2 greater than 2, or not even a power of 2, some rounding errors can occur, so that then the returned mantissa is only guaranteed to be <= 1.0, not < 1.0. */ #ifdef USE_LONG_DOUBLE # define FUNC frexpl # define DOUBLE long double # define ISNAN isnanl # define DECL_ROUNDING DECL_LONG_DOUBLE_ROUNDING # define BEGIN_ROUNDING() BEGIN_LONG_DOUBLE_ROUNDING () # define END_ROUNDING() END_LONG_DOUBLE_ROUNDING () # define L_(literal) literal##L #else # define FUNC frexp # define DOUBLE double # define ISNAN isnand # define DECL_ROUNDING # define BEGIN_ROUNDING() # define END_ROUNDING() # define L_(literal) literal #endif DOUBLE FUNC (DOUBLE x, int *expptr) { int sign; int exponent; DECL_ROUNDING /* Test for NaN, infinity, and zero. */ if (ISNAN (x) || x + x == x) { *expptr = 0; return x; } sign = 0; if (x < 0) { x = - x; sign = -1; } BEGIN_ROUNDING (); { /* Since the exponent is an 'int', it fits in 64 bits. Therefore the loops are executed no more than 64 times. */ DOUBLE pow2[64]; /* pow2[i] = 2^2^i */ DOUBLE powh[64]; /* powh[i] = 2^-2^i */ int i; exponent = 0; if (x >= L_(1.0)) { /* A positive exponent. */ DOUBLE pow2_i; /* = pow2[i] */ DOUBLE powh_i; /* = powh[i] */ /* Invariants: pow2_i = 2^2^i, powh_i = 2^-2^i, x * 2^exponent = argument, x >= 1.0. */ for (i = 0, pow2_i = L_(2.0), powh_i = L_(0.5); ; i++, pow2_i = pow2_i * pow2_i, powh_i = powh_i * powh_i) { if (x >= pow2_i) { exponent += (1 << i); x *= powh_i; } else break; pow2[i] = pow2_i; powh[i] = powh_i; } /* Avoid making x too small, as it could become a denormalized number and thus lose precision. */ while (i > 0 && x < pow2[i - 1]) { i--; powh_i = powh[i]; } exponent += (1 << i); x *= powh_i; /* Here 2^-2^i <= x < 1.0. */ } else { /* A negative or zero exponent. */ DOUBLE pow2_i; /* = pow2[i] */ DOUBLE powh_i; /* = powh[i] */ /* Invariants: pow2_i = 2^2^i, powh_i = 2^-2^i, x * 2^exponent = argument, x < 1.0. */ for (i = 0, pow2_i = L_(2.0), powh_i = L_(0.5); ; i++, pow2_i = pow2_i * pow2_i, powh_i = powh_i * powh_i) { if (x < powh_i) { exponent -= (1 << i); x *= pow2_i; } else break; pow2[i] = pow2_i; powh[i] = powh_i; } /* Here 2^-2^i <= x < 1.0. */ } /* Invariants: x * 2^exponent = argument, and 2^-2^i <= x < 1.0. */ while (i > 0) { i--; if (x < powh[i]) { exponent -= (1 << i); x *= pow2[i]; } } /* Here 0.5 <= x < 1.0. */ } if (sign < 0) x = - x; END_ROUNDING (); *expptr = exponent; return x; } libprelude-1.0.0/libmissing/fclose.c0000664000076400007640000000234411341220434014346 00000000000000/* fclose replacement. Copyright (C) 2008, 2009, 2010 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 3 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 Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . */ #include /* Specification. */ #include #include #include /* Override fclose() to call the overridden close(). */ int rpl_fclose (FILE *fp) #undef fclose { int saved_errno = 0; if (fflush (fp)) saved_errno = errno; if (close (fileno (fp)) < 0 && saved_errno == 0) saved_errno = errno; fclose (fp); /* will fail with errno = EBADF */ if (saved_errno != 0) { errno = saved_errno; return EOF; } return 0; } libprelude-1.0.0/libmissing/str-two-way.h0000664000076400007640000003771111341220440015320 00000000000000/* Byte-wise substring search, using the Two-Way algorithm. Copyright (C) 2008, 2009, 2010 Free Software Foundation, Inc. This file is part of the GNU C Library. Written by Eric Blake , 2008. This program is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser 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 Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ /* Before including this file, you need to include and , and define: RESULT_TYPE A macro that expands to the return type. AVAILABLE(h, h_l, j, n_l) A macro that returns nonzero if there are at least N_L bytes left starting at H[J]. H is 'unsigned char *', H_L, J, and N_L are 'size_t'; H_L is an lvalue. For NUL-terminated searches, H_L can be modified each iteration to avoid having to compute the end of H up front. For case-insensitivity, you may optionally define: CMP_FUNC(p1, p2, l) A macro that returns 0 iff the first L characters of P1 and P2 are equal. CANON_ELEMENT(c) A macro that canonicalizes an element right after it has been fetched from one of the two strings. The argument is an 'unsigned char'; the result must be an 'unsigned char' as well. This file undefines the macros documented above, and defines LONG_NEEDLE_THRESHOLD. */ #include #include /* We use the Two-Way string matching algorithm, which guarantees linear complexity with constant space. Additionally, for long needles, we also use a bad character shift table similar to the Boyer-Moore algorithm to achieve improved (potentially sub-linear) performance. See http://www-igm.univ-mlv.fr/~lecroq/string/node26.html#SECTION00260 and http://en.wikipedia.org/wiki/Boyer-Moore_string_search_algorithm */ /* Point at which computing a bad-byte shift table is likely to be worthwhile. Small needles should not compute a table, since it adds (1 << CHAR_BIT) + NEEDLE_LEN computations of preparation for a speedup no greater than a factor of NEEDLE_LEN. The larger the needle, the better the potential performance gain. On the other hand, on non-POSIX systems with CHAR_BIT larger than eight, the memory required for the table is prohibitive. */ #if CHAR_BIT < 10 # define LONG_NEEDLE_THRESHOLD 32U #else # define LONG_NEEDLE_THRESHOLD SIZE_MAX #endif #ifndef MAX # define MAX(a, b) ((a < b) ? (b) : (a)) #endif #ifndef CANON_ELEMENT # define CANON_ELEMENT(c) c #endif #ifndef CMP_FUNC # define CMP_FUNC memcmp #endif /* Perform a critical factorization of NEEDLE, of length NEEDLE_LEN. Return the index of the first byte in the right half, and set *PERIOD to the global period of the right half. The global period of a string is the smallest index (possibly its length) at which all remaining bytes in the string are repetitions of the prefix (the last repetition may be a subset of the prefix). When NEEDLE is factored into two halves, a local period is the length of the smallest word that shares a suffix with the left half and shares a prefix with the right half. All factorizations of a non-empty NEEDLE have a local period of at least 1 and no greater than NEEDLE_LEN. A critical factorization has the property that the local period equals the global period. All strings have at least one critical factorization with the left half smaller than the global period. Given an ordered alphabet, a critical factorization can be computed in linear time, with 2 * NEEDLE_LEN comparisons, by computing the larger of two ordered maximal suffixes. The ordered maximal suffixes are determined by lexicographic comparison of periodicity. */ static size_t critical_factorization (const unsigned char *needle, size_t needle_len, size_t *period) { /* Index of last byte of left half, or SIZE_MAX. */ size_t max_suffix, max_suffix_rev; size_t j; /* Index into NEEDLE for current candidate suffix. */ size_t k; /* Offset into current period. */ size_t p; /* Intermediate period. */ unsigned char a, b; /* Current comparison bytes. */ /* Invariants: 0 <= j < NEEDLE_LEN - 1 -1 <= max_suffix{,_rev} < j (treating SIZE_MAX as if it were signed) min(max_suffix, max_suffix_rev) < global period of NEEDLE 1 <= p <= global period of NEEDLE p == global period of the substring NEEDLE[max_suffix{,_rev}+1...j] 1 <= k <= p */ /* Perform lexicographic search. */ max_suffix = SIZE_MAX; j = 0; k = p = 1; while (j + k < needle_len) { a = CANON_ELEMENT (needle[j + k]); b = CANON_ELEMENT (needle[max_suffix + k]); if (a < b) { /* Suffix is smaller, period is entire prefix so far. */ j += k; k = 1; p = j - max_suffix; } else if (a == b) { /* Advance through repetition of the current period. */ if (k != p) ++k; else { j += p; k = 1; } } else /* b < a */ { /* Suffix is larger, start over from current location. */ max_suffix = j++; k = p = 1; } } *period = p; /* Perform reverse lexicographic search. */ max_suffix_rev = SIZE_MAX; j = 0; k = p = 1; while (j + k < needle_len) { a = CANON_ELEMENT (needle[j + k]); b = CANON_ELEMENT (needle[max_suffix_rev + k]); if (b < a) { /* Suffix is smaller, period is entire prefix so far. */ j += k; k = 1; p = j - max_suffix_rev; } else if (a == b) { /* Advance through repetition of the current period. */ if (k != p) ++k; else { j += p; k = 1; } } else /* a < b */ { /* Suffix is larger, start over from current location. */ max_suffix_rev = j++; k = p = 1; } } /* Choose the longer suffix. Return the first byte of the right half, rather than the last byte of the left half. */ if (max_suffix_rev + 1 < max_suffix + 1) return max_suffix + 1; *period = p; return max_suffix_rev + 1; } /* Return the first location of non-empty NEEDLE within HAYSTACK, or NULL. HAYSTACK_LEN is the minimum known length of HAYSTACK. This method is optimized for NEEDLE_LEN < LONG_NEEDLE_THRESHOLD. Performance is guaranteed to be linear, with an initialization cost of 2 * NEEDLE_LEN comparisons. If AVAILABLE does not modify HAYSTACK_LEN (as in memmem), then at most 2 * HAYSTACK_LEN - NEEDLE_LEN comparisons occur in searching. If AVAILABLE modifies HAYSTACK_LEN (as in strstr), then at most 3 * HAYSTACK_LEN - NEEDLE_LEN comparisons occur in searching. */ static RETURN_TYPE two_way_short_needle (const unsigned char *haystack, size_t haystack_len, const unsigned char *needle, size_t needle_len) { size_t i; /* Index into current byte of NEEDLE. */ size_t j; /* Index into current window of HAYSTACK. */ size_t period; /* The period of the right half of needle. */ size_t suffix; /* The index of the right half of needle. */ /* Factor the needle into two halves, such that the left half is smaller than the global period, and the right half is periodic (with a period as large as NEEDLE_LEN - suffix). */ suffix = critical_factorization (needle, needle_len, &period); /* Perform the search. Each iteration compares the right half first. */ if (CMP_FUNC (needle, needle + period, suffix) == 0) { /* Entire needle is periodic; a mismatch can only advance by the period, so use memory to avoid rescanning known occurrences of the period. */ size_t memory = 0; j = 0; while (AVAILABLE (haystack, haystack_len, j, needle_len)) { /* Scan for matches in right half. */ i = MAX (suffix, memory); while (i < needle_len && (CANON_ELEMENT (needle[i]) == CANON_ELEMENT (haystack[i + j]))) ++i; if (needle_len <= i) { /* Scan for matches in left half. */ i = suffix - 1; while (memory < i + 1 && (CANON_ELEMENT (needle[i]) == CANON_ELEMENT (haystack[i + j]))) --i; if (i + 1 < memory + 1) return (RETURN_TYPE) (haystack + j); /* No match, so remember how many repetitions of period on the right half were scanned. */ j += period; memory = needle_len - period; } else { j += i - suffix + 1; memory = 0; } } } else { /* The two halves of needle are distinct; no extra memory is required, and any mismatch results in a maximal shift. */ period = MAX (suffix, needle_len - suffix) + 1; j = 0; while (AVAILABLE (haystack, haystack_len, j, needle_len)) { /* Scan for matches in right half. */ i = suffix; while (i < needle_len && (CANON_ELEMENT (needle[i]) == CANON_ELEMENT (haystack[i + j]))) ++i; if (needle_len <= i) { /* Scan for matches in left half. */ i = suffix - 1; while (i != SIZE_MAX && (CANON_ELEMENT (needle[i]) == CANON_ELEMENT (haystack[i + j]))) --i; if (i == SIZE_MAX) return (RETURN_TYPE) (haystack + j); j += period; } else j += i - suffix + 1; } } return NULL; } /* Return the first location of non-empty NEEDLE within HAYSTACK, or NULL. HAYSTACK_LEN is the minimum known length of HAYSTACK. This method is optimized for LONG_NEEDLE_THRESHOLD <= NEEDLE_LEN. Performance is guaranteed to be linear, with an initialization cost of 3 * NEEDLE_LEN + (1 << CHAR_BIT) operations. If AVAILABLE does not modify HAYSTACK_LEN (as in memmem), then at most 2 * HAYSTACK_LEN - NEEDLE_LEN comparisons occur in searching, and sublinear performance O(HAYSTACK_LEN / NEEDLE_LEN) is possible. If AVAILABLE modifies HAYSTACK_LEN (as in strstr), then at most 3 * HAYSTACK_LEN - NEEDLE_LEN comparisons occur in searching, and sublinear performance is not possible. */ static RETURN_TYPE two_way_long_needle (const unsigned char *haystack, size_t haystack_len, const unsigned char *needle, size_t needle_len) { size_t i; /* Index into current byte of NEEDLE. */ size_t j; /* Index into current window of HAYSTACK. */ size_t period; /* The period of the right half of needle. */ size_t suffix; /* The index of the right half of needle. */ size_t shift_table[1U << CHAR_BIT]; /* See below. */ /* Factor the needle into two halves, such that the left half is smaller than the global period, and the right half is periodic (with a period as large as NEEDLE_LEN - suffix). */ suffix = critical_factorization (needle, needle_len, &period); /* Populate shift_table. For each possible byte value c, shift_table[c] is the distance from the last occurrence of c to the end of NEEDLE, or NEEDLE_LEN if c is absent from the NEEDLE. shift_table[NEEDLE[NEEDLE_LEN - 1]] contains the only 0. */ for (i = 0; i < 1U << CHAR_BIT; i++) shift_table[i] = needle_len; for (i = 0; i < needle_len; i++) shift_table[CANON_ELEMENT (needle[i])] = needle_len - i - 1; /* Perform the search. Each iteration compares the right half first. */ if (CMP_FUNC (needle, needle + period, suffix) == 0) { /* Entire needle is periodic; a mismatch can only advance by the period, so use memory to avoid rescanning known occurrences of the period. */ size_t memory = 0; size_t shift; j = 0; while (AVAILABLE (haystack, haystack_len, j, needle_len)) { /* Check the last byte first; if it does not match, then shift to the next possible match location. */ shift = shift_table[CANON_ELEMENT (haystack[j + needle_len - 1])]; if (0 < shift) { if (memory && shift < period) { /* Since needle is periodic, but the last period has a byte out of place, there can be no match until after the mismatch. */ shift = needle_len - period; memory = 0; } j += shift; continue; } /* Scan for matches in right half. The last byte has already been matched, by virtue of the shift table. */ i = MAX (suffix, memory); while (i < needle_len - 1 && (CANON_ELEMENT (needle[i]) == CANON_ELEMENT (haystack[i + j]))) ++i; if (needle_len - 1 <= i) { /* Scan for matches in left half. */ i = suffix - 1; while (memory < i + 1 && (CANON_ELEMENT (needle[i]) == CANON_ELEMENT (haystack[i + j]))) --i; if (i + 1 < memory + 1) return (RETURN_TYPE) (haystack + j); /* No match, so remember how many repetitions of period on the right half were scanned. */ j += period; memory = needle_len - period; } else { j += i - suffix + 1; memory = 0; } } } else { /* The two halves of needle are distinct; no extra memory is required, and any mismatch results in a maximal shift. */ size_t shift; period = MAX (suffix, needle_len - suffix) + 1; j = 0; while (AVAILABLE (haystack, haystack_len, j, needle_len)) { /* Check the last byte first; if it does not match, then shift to the next possible match location. */ shift = shift_table[CANON_ELEMENT (haystack[j + needle_len - 1])]; if (0 < shift) { j += shift; continue; } /* Scan for matches in right half. The last byte has already been matched, by virtue of the shift table. */ i = suffix; while (i < needle_len - 1 && (CANON_ELEMENT (needle[i]) == CANON_ELEMENT (haystack[i + j]))) ++i; if (needle_len - 1 <= i) { /* Scan for matches in left half. */ i = suffix - 1; while (i != SIZE_MAX && (CANON_ELEMENT (needle[i]) == CANON_ELEMENT (haystack[i + j]))) --i; if (i == SIZE_MAX) return (RETURN_TYPE) (haystack + j); j += period; } else j += i - suffix + 1; } } return NULL; } #undef AVAILABLE #undef CANON_ELEMENT #undef CMP_FUNC #undef MAX #undef RETURN_TYPE libprelude-1.0.0/libmissing/wctype.in.h0000664000076400007640000001366611341220442015030 00000000000000/* A substitute for ISO C99 , for platforms that lack it. Copyright (C) 2006-2010 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser 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 Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ /* Written by Bruno Haible and Paul Eggert. */ /* * ISO C 99 for platforms that lack it. * * * iswctype, towctrans, towlower, towupper, wctrans, wctype, * wctrans_t, and wctype_t are not yet implemented. */ #ifndef _GL_WCTYPE_H #if __GNUC__ >= 3 @PRAGMA_SYSTEM_HEADER@ #endif #if @HAVE_WINT_T@ /* Solaris 2.5 has a bug: must be included before . Tru64 with Desktop Toolkit C has a bug: must be included before . BSD/OS 4.0.1 has a bug: , and must be included before . */ # include # include # include # include #endif /* Include the original if it exists. BeOS 5 has the functions but no . */ /* The include_next requires a split double-inclusion guard. */ #if @HAVE_WCTYPE_H@ # @INCLUDE_NEXT@ @NEXT_WCTYPE_H@ #endif #ifndef _GL_WCTYPE_H #define _GL_WCTYPE_H /* Define wint_t. (Also done in wchar.in.h.) */ #if !@HAVE_WINT_T@ && !defined wint_t # define wint_t int # ifndef WEOF # define WEOF -1 # endif #endif #ifdef __cplusplus extern "C" { #endif /* FreeBSD 4.4 to 4.11 has but lacks the functions. Linux libc5 has and the functions but they are broken. Assume all 12 functions are implemented the same way, or not at all. */ #if ! @HAVE_ISWCNTRL@ || @REPLACE_ISWCNTRL@ /* IRIX 5.3 has macros but no functions, its isw* macros refer to an undefined variable _ctmp_ and to macros like _P, and they refer to system functions like _iswctype that are not in the standard C library. Rather than try to get ancient buggy implementations like this to work, just disable them. */ # undef iswalnum # undef iswalpha # undef iswblank # undef iswcntrl # undef iswdigit # undef iswgraph # undef iswlower # undef iswprint # undef iswpunct # undef iswspace # undef iswupper # undef iswxdigit # undef towlower # undef towupper /* Linux libc5 has and the functions but they are broken. */ # if @REPLACE_ISWCNTRL@ # define iswalnum rpl_iswalnum # define iswalpha rpl_iswalpha # define iswblank rpl_iswblank # define iswcntrl rpl_iswcntrl # define iswdigit rpl_iswdigit # define iswgraph rpl_iswgraph # define iswlower rpl_iswlower # define iswprint rpl_iswprint # define iswpunct rpl_iswpunct # define iswspace rpl_iswspace # define iswupper rpl_iswupper # define iswxdigit rpl_iswxdigit # define towlower rpl_towlower # define towupper rpl_towupper # endif static inline int iswalnum (wint_t wc) { return ((wc >= '0' && wc <= '9') || ((wc & ~0x20) >= 'A' && (wc & ~0x20) <= 'Z')); } static inline int iswalpha (wint_t wc) { return (wc & ~0x20) >= 'A' && (wc & ~0x20) <= 'Z'; } static inline int iswblank (wint_t wc) { return wc == ' ' || wc == '\t'; } static inline int iswcntrl (wint_t wc) { return (wc & ~0x1f) == 0 || wc == 0x7f; } static inline int iswdigit (wint_t wc) { return wc >= '0' && wc <= '9'; } static inline int iswgraph (wint_t wc) { return wc >= '!' && wc <= '~'; } static inline int iswlower (wint_t wc) { return wc >= 'a' && wc <= 'z'; } static inline int iswprint (wint_t wc) { return wc >= ' ' && wc <= '~'; } static inline int iswpunct (wint_t wc) { return (wc >= '!' && wc <= '~' && !((wc >= '0' && wc <= '9') || ((wc & ~0x20) >= 'A' && (wc & ~0x20) <= 'Z'))); } static inline int iswspace (wint_t wc) { return (wc == ' ' || wc == '\t' || wc == '\n' || wc == '\v' || wc == '\f' || wc == '\r'); } static inline int iswupper (wint_t wc) { return wc >= 'A' && wc <= 'Z'; } static inline int iswxdigit (wint_t wc) { return ((wc >= '0' && wc <= '9') || ((wc & ~0x20) >= 'A' && (wc & ~0x20) <= 'F')); } static inline wint_t towlower (wint_t wc) { return (wc >= 'A' && wc <= 'Z' ? wc - 'A' + 'a' : wc); } static inline wint_t towupper (wint_t wc) { return (wc >= 'a' && wc <= 'z' ? wc - 'a' + 'A' : wc); } #endif /* ! HAVE_ISWCNTRL || REPLACE_ISWCNTRL */ #if defined __MINGW32__ /* On native Windows, wchar_t is uint16_t, and wint_t is uint32_t. The functions towlower and towupper are implemented in the MSVCRT library to take a wchar_t argument and return a wchar_t result. mingw declares these functions to take a wint_t argument and return a wint_t result. This means that: 1. When the user passes an argument outside the range 0x0000..0xFFFF, the function will look only at the lower 16 bits. This is allowed according to POSIX. 2. The return value is returned in the lower 16 bits of the result register. The upper 16 bits are random: whatever happened to be in that part of the result register. We need to fix this by adding a zero-extend from wchar_t to wint_t after the call. */ static inline wint_t rpl_towlower (wint_t wc) { return (wint_t) (wchar_t) towlower (wc); } # define towlower rpl_towlower static inline wint_t rpl_towupper (wint_t wc) { return (wint_t) (wchar_t) towupper (wc); } # define towupper rpl_towupper #endif /* __MINGW32__ */ #ifdef __cplusplus } #endif #endif /* _GL_WCTYPE_H */ #endif /* _GL_WCTYPE_H */ libprelude-1.0.0/libmissing/mbsinit.c0000664000076400007640000000337011341220437014543 00000000000000/* Test for initial conversion state. Copyright (C) 2008, 2009, 2010 Free Software Foundation, Inc. Written by Bruno Haible , 2008. This program is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 3 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 Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . */ #include /* Specification. */ #include #include "verify.h" /* Platforms that lack mbsinit() also lack mbrlen(), mbrtowc(), mbsrtowcs() and wcrtomb(), wcsrtombs(). We assume that - sizeof (mbstate_t) >= 4, - only stateless encodings are supported (such as UTF-8 and EUC-JP, but not ISO-2022 variants), - for each encoding, the number of bytes for a wide character is <= 4. (This maximum is attained for UTF-8, GB18030, EUC-TW.) We define the meaning of mbstate_t as follows: - In mb -> wc direction, mbstate_t's first byte contains the number of buffered bytes (in the range 0..3), followed by up to 3 buffered bytes. - In wc -> mb direction, mbstate_t contains no information. In other words, it is always in the initial state. */ verify (sizeof (mbstate_t) >= 4); int mbsinit (const mbstate_t *ps) { const char *pstate = (const char *)ps; return pstate[0] == 0; } libprelude-1.0.0/libmissing/isnanl.c0000664000076400007640000000155311341220435014361 00000000000000/* Test for NaN that does not need libm. Copyright (C) 2007, 2009, 2010 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 3 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 Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . */ /* Written by Bruno Haible , 2007. */ #define USE_LONG_DOUBLE #include "isnan.c" libprelude-1.0.0/libmissing/printf-parse.h0000664000076400007640000001125311341220437015514 00000000000000/* Parse printf format string. Copyright (C) 1999, 2002-2003, 2005, 2007, 2009-2010 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser 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 Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ #ifndef _PRINTF_PARSE_H #define _PRINTF_PARSE_H /* This file can be parametrized with the following macros: ENABLE_UNISTDIO Set to 1 to enable the unistdio extensions. STATIC Set to 'static' to declare the function static. */ #include "printf-args.h" /* Flags */ #define FLAG_GROUP 1 /* ' flag */ #define FLAG_LEFT 2 /* - flag */ #define FLAG_SHOWSIGN 4 /* + flag */ #define FLAG_SPACE 8 /* space flag */ #define FLAG_ALT 16 /* # flag */ #define FLAG_ZERO 32 /* arg_index value indicating that no argument is consumed. */ #define ARG_NONE (~(size_t)0) /* xxx_directive: A parsed directive. xxx_directives: A parsed format string. */ /* A parsed directive. */ typedef struct { const char* dir_start; const char* dir_end; int flags; const char* width_start; const char* width_end; size_t width_arg_index; const char* precision_start; const char* precision_end; size_t precision_arg_index; char conversion; /* d i o u x X f F e E g G a A c s p n U % but not C S */ size_t arg_index; } char_directive; /* A parsed format string. */ typedef struct { size_t count; char_directive *dir; size_t max_width_length; size_t max_precision_length; } char_directives; #if ENABLE_UNISTDIO /* A parsed directive. */ typedef struct { const uint8_t* dir_start; const uint8_t* dir_end; int flags; const uint8_t* width_start; const uint8_t* width_end; size_t width_arg_index; const uint8_t* precision_start; const uint8_t* precision_end; size_t precision_arg_index; uint8_t conversion; /* d i o u x X f F e E g G a A c s p n U % but not C S */ size_t arg_index; } u8_directive; /* A parsed format string. */ typedef struct { size_t count; u8_directive *dir; size_t max_width_length; size_t max_precision_length; } u8_directives; /* A parsed directive. */ typedef struct { const uint16_t* dir_start; const uint16_t* dir_end; int flags; const uint16_t* width_start; const uint16_t* width_end; size_t width_arg_index; const uint16_t* precision_start; const uint16_t* precision_end; size_t precision_arg_index; uint16_t conversion; /* d i o u x X f F e E g G a A c s p n U % but not C S */ size_t arg_index; } u16_directive; /* A parsed format string. */ typedef struct { size_t count; u16_directive *dir; size_t max_width_length; size_t max_precision_length; } u16_directives; /* A parsed directive. */ typedef struct { const uint32_t* dir_start; const uint32_t* dir_end; int flags; const uint32_t* width_start; const uint32_t* width_end; size_t width_arg_index; const uint32_t* precision_start; const uint32_t* precision_end; size_t precision_arg_index; uint32_t conversion; /* d i o u x X f F e E g G a A c s p n U % but not C S */ size_t arg_index; } u32_directive; /* A parsed format string. */ typedef struct { size_t count; u32_directive *dir; size_t max_width_length; size_t max_precision_length; } u32_directives; #endif /* Parses the format string. Fills in the number N of directives, and fills in directives[0], ..., directives[N-1], and sets directives[N].dir_start to the end of the format string. Also fills in the arg_type fields of the arguments and the needed count of arguments. */ #if ENABLE_UNISTDIO extern int ulc_printf_parse (const char *format, char_directives *d, arguments *a); extern int u8_printf_parse (const uint8_t *format, u8_directives *d, arguments *a); extern int u16_printf_parse (const uint16_t *format, u16_directives *d, arguments *a); extern int u32_printf_parse (const uint32_t *format, u32_directives *d, arguments *a); #else # ifdef STATIC STATIC # else extern # endif int printf_parse (const char *format, char_directives *d, arguments *a); #endif #endif /* _PRINTF_PARSE_H */ libprelude-1.0.0/libmissing/isnanf-nolibm.h0000664000076400007640000000231211341220435015630 00000000000000/* Test for NaN that does not need libm. Copyright (C) 2007-2010 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 3 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 Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . */ #if HAVE_ISNANF_IN_LIBC /* Get declaration of isnan macro or (older) isnanf function. */ # include # if __GNUC__ >= 4 /* GCC 4.0 and newer provides three built-ins for isnan. */ # undef isnanf # define isnanf(x) __builtin_isnanf ((float)(x)) # elif defined isnan # undef isnanf # define isnanf(x) isnan ((float)(x)) # endif #else /* Test whether X is a NaN. */ # undef isnanf # define isnanf rpl_isnanf extern int isnanf (float x); #endif libprelude-1.0.0/libmissing/perror.c0000664000076400007640000000222711341220437014407 00000000000000/* Print a message describing error code. Copyright (C) 2008, 2009, 2010 Free Software Foundation, Inc. Written by Bruno Haible and Simon Josefsson. This program is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 3 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 Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . */ #include /* Specification. */ #include #include #include void perror (const char *string) { const char *errno_description = strerror (errno); if (string != NULL && *string != '\0') fprintf (stderr, "%s: %s\n", string, errno_description); else fprintf (stderr, "%s\n", errno_description); } libprelude-1.0.0/libmissing/vasnprintf.h0000664000076400007640000000566111341220442015276 00000000000000/* vsprintf with automatic memory allocation. Copyright (C) 2002-2004, 2007-2010 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser 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 Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ #ifndef _VASNPRINTF_H #define _VASNPRINTF_H /* Get va_list. */ #include /* Get size_t. */ #include #ifndef __attribute__ /* The __attribute__ feature is available in gcc versions 2.5 and later. The __-protected variants of the attributes 'format' and 'printf' are accepted by gcc versions 2.6.4 (effectively 2.7) and later. We enable __attribute__ only if these are supported too, because gnulib and libintl do '#define printf __printf__' when they override the 'printf' function. */ # if __GNUC__ < 2 || (__GNUC__ == 2 && __GNUC_MINOR__ < 7) # define __attribute__(Spec) /* empty */ # endif #endif #ifdef __cplusplus extern "C" { #endif /* Write formatted output to a string dynamically allocated with malloc(). You can pass a preallocated buffer for the result in RESULTBUF and its size in *LENGTHP; otherwise you pass RESULTBUF = NULL. If successful, return the address of the string (this may be = RESULTBUF if no dynamic memory allocation was necessary) and set *LENGTHP to the number of resulting bytes, excluding the trailing NUL. Upon error, set errno and return NULL. When dynamic memory allocation occurs, the preallocated buffer is left alone (with possibly modified contents). This makes it possible to use a statically allocated or stack-allocated buffer, like this: char buf[100]; size_t len = sizeof (buf); char *output = vasnprintf (buf, &len, format, args); if (output == NULL) ... error handling ...; else { ... use the output string ...; if (output != buf) free (output); } */ #if REPLACE_VASNPRINTF # define asnprintf rpl_asnprintf # define vasnprintf rpl_vasnprintf #endif extern char * asnprintf (char *resultbuf, size_t *lengthp, const char *format, ...) __attribute__ ((__format__ (__printf__, 3, 4))); extern char * vasnprintf (char *resultbuf, size_t *lengthp, const char *format, va_list args) __attribute__ ((__format__ (__printf__, 3, 0))); #ifdef __cplusplus } #endif #endif /* _VASNPRINTF_H */ libprelude-1.0.0/libmissing/strndup.c0000664000076400007640000000221011341220440014557 00000000000000/* A replacement function, for systems that lack strndup. Copyright (C) 1996, 1997, 1998, 2001, 2002, 2003, 2005, 2006, 2007, 2009, 2010 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser 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 Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ #include #include #include char * strndup (char const *s, size_t n) { size_t len = strnlen (s, n); char *new = malloc (len + 1); if (new == NULL) return NULL; new[len] = '\0'; return memcpy (new, s, len); } libprelude-1.0.0/libmissing/ftw_.h0000664000076400007640000000221011341220434014027 00000000000000/* Copyright (C) 2005 Free Software Foundation, Inc. * Written by Yoann Vandoorselaere * * The file is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This file 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 * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this file; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 * USA. */ #include #include #include #if HAVE_FTW # include #else #define FTW_F 1 #define FTW_D 2 #define FTW_DNR 3 #define FTW_SL 4 #define FTW_NS 5 extern int ftw(const char *dir, int (*fn)(const char *file, const struct stat *sb, int flag), int nopenfd); #endif libprelude-1.0.0/libmissing/strings.in.h0000664000076400007640000000634611341220440015201 00000000000000/* A substitute . Copyright (C) 2007-2010 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser 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 Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ #ifndef _GL_STRINGS_H #if __GNUC__ >= 3 @PRAGMA_SYSTEM_HEADER@ #endif /* The include_next requires a split double-inclusion guard. */ #@INCLUDE_NEXT@ @NEXT_STRINGS_H@ #ifndef _GL_STRINGS_H #define _GL_STRINGS_H /* The definition of _GL_ARG_NONNULL is copied here. */ /* The definition of _GL_WARN_ON_USE is copied here. */ #ifdef __cplusplus extern "C" { #endif /* Compare strings S1 and S2, ignoring case, returning less than, equal to or greater than zero if S1 is lexicographically less than, equal to or greater than S2. Note: This function does not work in multibyte locales. */ #if ! @HAVE_STRCASECMP@ extern int strcasecmp (char const *s1, char const *s2) _GL_ARG_NONNULL ((1, 2)); #endif #if defined GNULIB_POSIXCHECK /* strcasecmp() does not work with multibyte strings: POSIX says that it operates on "strings", and "string" in POSIX is defined as a sequence of bytes, not of characters. */ # undef strcasecmp # if HAVE_RAW_DECL_STRCASECMP _GL_WARN_ON_USE (strcasecmp, "strcasecmp cannot work correctly on character " "strings in multibyte locales - " "use mbscasecmp if you care about " "internationalization, or use c_strcasecmp , " "gnulib module c-strcase) if you want a locale " "independent function"); # endif #endif /* Compare no more than N bytes of strings S1 and S2, ignoring case, returning less than, equal to or greater than zero if S1 is lexicographically less than, equal to or greater than S2. Note: This function cannot work correctly in multibyte locales. */ #if ! @HAVE_DECL_STRNCASECMP@ extern int strncasecmp (char const *s1, char const *s2, size_t n) _GL_ARG_NONNULL ((1, 2)); #endif #if defined GNULIB_POSIXCHECK /* strncasecmp() does not work with multibyte strings: POSIX says that it operates on "strings", and "string" in POSIX is defined as a sequence of bytes, not of characters. */ # undef strncasecmp # if HAVE_RAW_DECL_STRNCASECMP _GL_WARN_ON_USE (strncasecmp, "strncasecmp cannot work correctly on character " "strings in multibyte locales - " "use mbsncasecmp or mbspcasecmp if you care about " "internationalization, or use c_strncasecmp , " "gnulib module c-strcase) if you want a locale " "independent function"); # endif #endif #ifdef __cplusplus } #endif #endif /* _GL_STRING_H */ #endif /* _GL_STRING_H */ libprelude-1.0.0/libmissing/strcasecmp.c0000664000076400007640000000356511341220440015242 00000000000000/* Case-insensitive string comparison function. Copyright (C) 1998-1999, 2005-2007, 2009-2010 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser 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 Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ #include /* Specification. */ #include #include #include #define TOLOWER(Ch) (isupper (Ch) ? tolower (Ch) : (Ch)) /* Compare strings S1 and S2, ignoring case, returning less than, equal to or greater than zero if S1 is lexicographically less than, equal to or greater than S2. Note: This function does not work with multibyte strings! */ int strcasecmp (const char *s1, const char *s2) { const unsigned char *p1 = (const unsigned char *) s1; const unsigned char *p2 = (const unsigned char *) s2; unsigned char c1, c2; if (p1 == p2) return 0; do { c1 = TOLOWER (*p1); c2 = TOLOWER (*p2); if (c1 == '\0') break; ++p1; ++p2; } while (c1 == c2); if (UCHAR_MAX <= INT_MAX) return c1 - c2; else /* On machines where 'char' and 'int' are types of the same size, the difference of two 'unsigned char' values - including the sign bit - doesn't fit in an 'int'. */ return (c1 > c2 ? 1 : c1 < c2 ? -1 : 0); } libprelude-1.0.0/gtk-doc.make0000644000076400007640000001364211347714317012775 00000000000000# -*- mode: makefile -*- #################################### # Everything below here is generic # #################################### if GTK_DOC_USE_LIBTOOL GTKDOC_CC = $(LIBTOOL) --mode=compile $(CC) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) GTKDOC_LD = $(LIBTOOL) --mode=link $(CC) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) GTKDOC_RUN = $(LIBTOOL) --mode=execute else GTKDOC_CC = $(CC) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) GTKDOC_LD = $(CC) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) GTKDOC_RUN = sh -c endif # We set GPATH here; this gives us semantics for GNU make # which are more like other make's VPATH, when it comes to # whether a source that is a target of one rule is then # searched for in VPATH/GPATH. # GPATH = $(srcdir) TARGET_DIR=$(HTML_DIR)/$(DOC_MODULE) EXTRA_DIST = \ $(content_files) \ $(HTML_IMAGES) \ $(DOC_MAIN_SGML_FILE) \ $(DOC_MODULE)-sections.txt \ $(DOC_MODULE)-overrides.txt DOC_STAMPS=scan-build.stamp tmpl-build.stamp sgml-build.stamp html-build.stamp \ $(srcdir)/tmpl.stamp $(srcdir)/sgml.stamp $(srcdir)/html.stamp SCANOBJ_FILES = \ $(DOC_MODULE).args \ $(DOC_MODULE).hierarchy \ $(DOC_MODULE).interfaces \ $(DOC_MODULE).prerequisites \ $(DOC_MODULE).signals REPORT_FILES = \ $(DOC_MODULE)-undocumented.txt \ $(DOC_MODULE)-undeclared.txt \ $(DOC_MODULE)-unused.txt CLEANFILES = $(SCANOBJ_FILES) $(REPORT_FILES) $(DOC_STAMPS) if ENABLE_GTK_DOC all-local: html-build.stamp else all-local: endif docs: html-build.stamp $(REPORT_FILES): sgml-build.stamp #### scan #### scan-build.stamp: $(HFILE_GLOB) $(CFILE_GLOB) @echo 'gtk-doc: Scanning header files' @-chmod -R u+w $(srcdir) cd $(srcdir) && \ gtkdoc-scan --module=$(DOC_MODULE) --source-dir=$(DOC_SOURCE_DIR) --ignore-headers="$(IGNORE_HFILES)" $(SCAN_OPTIONS) $(EXTRA_HFILES) if grep -l '^..*$$' $(srcdir)/$(DOC_MODULE).types > /dev/null 2>&1 ; then \ CC="$(GTKDOC_CC)" LD="$(GTKDOC_LD)" RUN="$(GTKDOC_RUN)" CFLAGS="$(GTKDOC_CFLAGS) $(CFLAGS)" LDFLAGS="$(GTKDOC_LIBS) $(LDFLAGS)" gtkdoc-scangobj $(SCANGOBJ_OPTIONS) --module=$(DOC_MODULE) --output-dir=$(srcdir) ; \ else \ cd $(srcdir) ; \ for i in $(SCANOBJ_FILES) ; do \ test -f $$i || touch $$i ; \ done \ fi touch scan-build.stamp $(DOC_MODULE)-decl.txt $(SCANOBJ_FILES) $(DOC_MODULE)-sections.txt $(DOC_MODULE)-overrides.txt: scan-build.stamp @true #### templates #### tmpl-build.stamp: $(DOC_MODULE)-decl.txt $(SCANOBJ_FILES) $(DOC_MODULE)-sections.txt $(DOC_MODULE)-overrides.txt @echo 'gtk-doc: Rebuilding template files' @-chmod -R u+w $(srcdir) cd $(srcdir) && gtkdoc-mktmpl --module=$(DOC_MODULE) $(MKTMPL_OPTIONS) touch tmpl-build.stamp tmpl.stamp: tmpl-build.stamp @true tmpl/*.sgml: @true #### xml #### sgml-build.stamp: tmpl.stamp $(HFILE_GLOB) $(CFILE_GLOB) $(DOC_MODULE)-sections.txt $(srcdir)/tmpl/*.sgml $(expand_content_files) @echo 'gtk-doc: Building XML' @-chmod -R u+w $(srcdir) cd $(srcdir) && \ gtkdoc-mkdb --module=$(DOC_MODULE) --source-dir=$(DOC_SOURCE_DIR) --output-format=xml --expand-content-files="$(expand_content_files)" --main-sgml-file=$(DOC_MAIN_SGML_FILE) $(MKDB_OPTIONS) touch sgml-build.stamp sgml.stamp: sgml-build.stamp @true #### html #### html-build.stamp: sgml.stamp $(DOC_MAIN_SGML_FILE) $(content_files) @echo 'gtk-doc: Building HTML' @-chmod -R u+w $(srcdir) rm -rf $(srcdir)/html mkdir $(srcdir)/html mkhtml_options=""; \ gtkdoc-mkhtml 2>&1 --help | grep >/dev/null "\-\-path"; \ if test "$(?)" = "0"; then \ mkhtml_options=--path="$(srcdir)"; \ fi cd $(srcdir)/html && gtkdoc-mkhtml $(mkhtml_options) $(MKHTML_OPTIONS) $(DOC_MODULE) ../$(DOC_MAIN_SGML_FILE) test "x$(HTML_IMAGES)" = "x" || ( cd $(srcdir) && cp $(HTML_IMAGES) html ) @echo 'gtk-doc: Fixing cross-references' cd $(srcdir) && gtkdoc-fixxref --module-dir=html --html-dir=$(HTML_DIR) $(FIXXREF_OPTIONS) touch html-build.stamp ############## clean-local: rm -f *~ *.bak rm -rf .libs distclean-local: cd $(srcdir) && \ rm -rf xml $(REPORT_FILES) \ $(DOC_MODULE)-decl-list.txt $(DOC_MODULE)-decl.txt maintainer-clean-local: clean cd $(srcdir) && rm -rf xml html install-data-local: installfiles=`echo $(srcdir)/html/*`; \ if test "$$installfiles" = '$(srcdir)/html/*'; \ then echo '-- Nothing to install' ; \ else \ if test -n "$(DOC_MODULE_VERSION)"; then \ installdir="$(DESTDIR)$(TARGET_DIR)-$(DOC_MODULE_VERSION)"; \ else \ installdir="$(DESTDIR)$(TARGET_DIR)"; \ fi; \ $(mkinstalldirs) $${installdir} ; \ for i in $$installfiles; do \ echo '-- Installing '$$i ; \ $(INSTALL_DATA) $$i $${installdir}; \ done; \ if test -n "$(DOC_MODULE_VERSION)"; then \ mv -f $${installdir}/$(DOC_MODULE).devhelp2 \ $${installdir}/$(DOC_MODULE)-$(DOC_MODULE_VERSION).devhelp2; \ mv -f $${installdir}/$(DOC_MODULE).devhelp \ $${installdir}/$(DOC_MODULE)-$(DOC_MODULE_VERSION).devhelp; \ fi; \ ! which gtkdoc-rebase >/dev/null 2>&1 || \ gtkdoc-rebase --relative --dest-dir=$(DESTDIR) --html-dir=$${installdir} ; \ fi uninstall-local: if test -n "$(DOC_MODULE_VERSION)"; then \ installdir="$(DESTDIR)$(TARGET_DIR)-$(DOC_MODULE_VERSION)"; \ else \ installdir="$(DESTDIR)$(TARGET_DIR)"; \ fi; \ rm -rf $${installdir} # # Require gtk-doc when making dist # if ENABLE_GTK_DOC dist-check-gtkdoc: else dist-check-gtkdoc: @echo "*** gtk-doc must be installed and enabled in order to make dist" @false endif dist-hook: dist-check-gtkdoc dist-hook-local mkdir $(distdir)/tmpl mkdir $(distdir)/xml mkdir $(distdir)/html -cp $(srcdir)/tmpl/*.sgml $(distdir)/tmpl -cp $(srcdir)/xml/*.xml $(distdir)/xml cp $(srcdir)/html/* $(distdir)/html -cp $(srcdir)/$(DOC_MODULE).types $(distdir)/ -cp $(srcdir)/$(DOC_MODULE)-sections.txt $(distdir)/ cd $(distdir) && rm -f $(DISTCLEANFILES) ! which gtkdoc-rebase >/dev/null 2>&1 || \ gtkdoc-rebase --online --relative --html-dir=$(distdir)/html .PHONY : dist-hook-local docs libprelude-1.0.0/tls.conf0000664000076400007640000000112011325615317012241 00000000000000# # Default size of the client/server generated private key # generated-key-size = 2048 # # Number of days the authority certificates (server side) will # remain valid. Theses certificate are only used in order to # sign client certificate. # # Use 0 for the maximum possible value. # authority-certificate-lifetime = 0 # # Number of days the generated certificates (client side) will # remain valid. Theses certificate are only used in order to # authenticate and encrypt client <-> server communication. # # Use 0 for the maximum possible value. # generated-certificate-lifetime = 0 libprelude-1.0.0/NEWS0000664000076400007640000013772311347714313011312 00000000000000* 2010-03-16, libprelude-1.0.0: - C99 specifics formats are now available for public function using string formatting. * 2010-01-29, libprelude-1.0.0rc1: - Libprelude EasyBindings are now enabled by default - Default to generating 2048 bits TLS keys - Fix a potential IDMEF object copy/clone error return that could occur if the caller had freed a required children from the copied object. - Prevent unsafe modification of the Libprelude returned Analyzer object - When retrieving a list of IDMEF object, return a Python list containing one IDMEFValue for each object. This behavior is more consistant than retrieving a single IDMEFValue carrying the whole list, and might permit the user to play with the object directly if we extand the API in the future. - Fix argv memory leak on bindings initialization - Fixes some warnings uncovered by GCC -Wextra - Thanks to Steve Grubb for reporting Flexelint output! This allowed fixing the following issues: [prelude-admin]: fix possible leak on getpass() failure. [idmef-data]: fix potential invalid read on architecture where sizeof(char) > 1. [idmef-path]: idmef_path_set_index() would accept an off by one depth, protect the caller. [prelude-connection]: fix invalid pointer dereference in case of malloc() failure. * 2009-01-11, libprelude-0.9.25: - Sent message priority will now be correctly assigned depending on the input IDMEF message. - Fix critical warnings on destroy when assigning NULL value to IDMEF union. - Fix Ruby include path detection on certain systems - Fix idmef_data_t (type CHAR_STRING) mapping to high level language string, this prevent enclosing the terminating \0 when mapping an idmef_data_t of carrying a string to an high level language string (example: Python, Perl). - Prevent a possible double free when a C++ IDMEFTime object was referenced from multiples place. - Increase maximum protocol message size, the old size (1mb) could be a problem for systems sending very large alerts (example: CorrelationAlert with a lot of sources/targets). In the future, this limitation might be completly removed. * 2009-07-08, libprelude-0.9.24.1: - Use SWIG 1.3.39 to generate bindings code, fixes Prewikka compatibility problem because of SWIG version mismatch between libprelude/libpreludedb modules. * 2009-07-08, libprelude-0.9.24: - Initial prelude-log C++/Python/Ruby/Perl/Lua bindings support. This implement language bindings for the PreludeLog interface. - Make the created profile permission fully respect required ownership. The analyzerid file within the created profile was incorrectly created with current ownership, rather than using specified uid/gid. - Ruby and Python bindings were not properly checking whether the argument was a file descriptor in case the left/right shift IDMEF operator were used. - Fix prelude-client initialization problem with empty argv[0], which sometime happen when called from certain high level language. - Fix error in case of multiple initialization. - Fix possible Lua module crash on initialization. - Various bug fixes * 2009-06-08, libprelude-0.9.23: - New API functions to retrieve operators applicable to a given idmef_path_t, idmef_value_t or idmef_value_type_t. - Return an error when a character are provided as input for a 8 bit integer value. - Make it possible to compare an enumeration path with a string by using the standard substring operator (<> or <>*). - Automatically set IDMEFAnalyzer before sending IDMEF messages. - Various bug fixes. * 2009-04-22, libprelude-0.9.22: - Fix C++ headers installation. - Automatic, detailed ChangeLog generation (from http://live.gnome.org/Git/ChangeLog). - Prefix C++ enumeration, implement IDMEFValue::Match() method, and provide IDMEFCriterion operator to be used by this method. - Old behavior when returning an IDMEFValue was to map it's internal type to a type understood by the target language. Preserve this behavior unless the value contain an IDMEF class, in which case we now return the raw IDMEFValue (IDMEF class object are not handled by higher level language, but the value containing the class can be useful). - Use pkg-config for GnuTLS and GnuTLS extra detection, and provide our own libprelude pkg-config file. - Various bug fixes. * 2008-11-14, libprelude-0.9.21.3: - Update to libtool / libltdl 2.2.x - Workaround libtool/libltdl 1.5 -> 2.x ABI compatibility issues. This introduce two fixes: Fix a crash when an application use a different libtool version than the libtool/libltdl version used to compile libprelude. In order to prevent this problem, we automatically rewrite the symbol table provided by libtool 1.5 applications, and make it compatible with libltdl 2.2 (we will now ship libtool/ltdl 2.2 as the default with libprelude). Automatic handling of symbol renaming between libtool 1.5 -> 2.x, which solve application linking problem. (fix #294). - Cygwin compilation fixes. - Fix compilation when IPv6 is not available. - Fix possible compilation problem with some GCC version (fix #325). * 2008-10-13, libprelude-0.9.21.2: - Fix regression introduced in 0.9.21.1, that would lead to a 'prelude-admin list' crash (#320). * 2008-10-06, libprelude-0.9.21.1: - Fix an assertion warning upon sensor start in case the address for the local machine could not be found. - Consistency rework of EasyBindings IDMEFCriteria API. - Add refcount support for prelude_client_t and prelude_client_profile_t, and update EasyBindings destructor to use them. - Fix a bug where EasyBindings would be built although they were not enabled. - Fix path issue in case libprelude was configured with specific path outside of $prefix (fix #319). * 2008-09-19, libprelude-0.9.21: - libprelude now compile and run under Win32 native! - Fix file descriptor closure problem after daemonizing (#311). - New API functions allowing to specify the libprelude working prefix, the prefix can be set using the LIBPRELUDE_PREFIX environment variable as well (#255). - libprelude is now relocatable (use --enable-relocatable configure option). - libgcrypt initialization fixes. - Complete WIN32 glthread backend. - Various bug fixes. * 2008-09-09, libprelude-0.9.20.2: - Fix possible invalid read when looking up IDMEF path. - Fix error handling before library initialization. * 2008-09-05, libprelude-0.9.20.1: - Fix endless loop in prelude-async, due to the glthread API changes. - Fix libtool usage for unit-testing. * 2008-09-03, libprelude-0.9.20: - Multithreading API independance: support for posix, solaris, pth, and win32 backend. - Automatic Node name and address detection, if the user did not provides custom parameters. - When copying the value prior doing the cast, set the copy to not own the value data. - When casting an IDMEF-Value fail, return the un-modified IDMEF-Value. - Fixed non working uint32 and uint64 to time cast. - Honor 'own_data' boolean when casting from/to a string (possible double free). - Include unit tests. - Correct C++ headers installation path. - Fix Perl EasyBindings IDMEF->Read() method infinite loop. - Handle new IDMEF value as new IDMEF object: return the old value if one already exist. * 2008-08-04, libprelude-0.9.19: - EasyBindings inclusion! EasyBindings provide simple C++, Python, Perl, Ruby, and Lua bindings for using libprelude. They are still considered experimental, thus you need to use (--enable-easy-bindings) to activate them. Thanks to Sebastien Tricaud and Pierre Chifflier for their contribution to this project! - Use automake/autoconf for building/installing Python extension. - Fix 0.9.18 regression (alert created with empty CreateTime). - Implement reference counting for the idmef-criteria and prelude-connection API. - Automatic casting when setting IDMEF Value to a field that is of different type. Until now, if an user tried to set a path of a specific type with an idmef_value_t object containing another type, idmef_path_set() would return an error. - Various bug fixes. * 2008-07-21, libprelude-0.9.18.1: - Temporarily disable mutex locking while calling event handler, since we really need recursive mutex support for this task. - Fix possible application compilation breakage when including prelude-timer.h: include time.h for time_t definition, fix #301. - Fix compilation error with GnuTLS < 2.2.0 (fix #302). * 2008-07-18, libprelude-0.9.18: - Add support for newer GnuTLS 2.2.0 session priority functions. When the option is available, the user might specify TLS settings through the "tls-options" configuration entry. - Workaround a GnuTLS issue where the client wouldn't be able to negotiate a supported compression protocol with the server (#299). - Implement variable substitution in Prelude configuration files. - Allow IDMEF criteria with multiples values for a single path, as can be seen in the following example: alert.classification.text = (A || B || C || D) This will be internally translated to the original criteria language: alert.classification.text = A || alert.classification.text = B || alert.classification.text = C || alert.classification.text = D - Implement negation of idmef-criteria, allowing to write criteria like: ! (alert.classification.text = A || alert.classification.text = B) - Fix an IDMEF-Criteria matching problem, where the match function would not attempt to match a OR after multiple consecutive AND that failed. Thanks Alexander Afonyashin for pointing out the problem. - Never use non-pointer field, always use the "required" keyword. Fix API consistency issue, that could lead to unexpected behavior. - Fix multiples problem with prelude_read_multiline / prelude_read_multiline2, (fix a problem with prelude-manager idmef-criteria that wouldn't read external ruleset). - Error out if GnuTLS initialization fail. * 2008-05-06, libprelude-0.9.17.2: - Fix unresolved symbols on some architecture, thanks Robin Gruyters for pointing out this issue. * 2008-04-28, libprelude-0.9.17.1: - Remove debug spew, thanks Pierre Chifflier for pointing that out. * 2008-04-24, libprelude-0.9.17: - Implement RFC 4122 UUIDv1 identifier generation, more resistant to duplicate than our previous implementation in case of clock skew, or multiple client with the same analyzerid sending alert in parallel. - You can now provide NULL value to idmef_path_set() in order to destroy existing value within an IDMEF message. - Unify memory handling of value retrieval through idmef_path_t. This allow the user to retrieve and keep any values, even through the associated IDMEF message is freed. - Build system cleanup, enable RELRO when possible. - Implement PRELUDE_CLIENT_FLAGS_AUTOCONFIG, which is set by default, but that applications might unset in order for their client not to read the default profile/global configuration. - Fix possible assertion when destroying un-started prelude-client. - Improvement to the prelude-io API, the user might now hook its own handling function. - Fix dumping of (not) NULL criteria operator to string. Remove gratuitous space insertion when dumping criteria. - Headers fixes for C++ build. - Fix printing and cloning of empty IDMEF string. - In IDMEF to string convertion code, print in place of NULL on invalid enumeration value. - Bindings fixes for optional integer retrieval, by Pierre Chifflier - Various bug fixes. * 2008-01-23, libprelude-0.9.16.2: - Fix bindings for IDMEF 'get_next' functions. - Make sure we use no additional GnuLib compiler flags when building bindings, this fix bindings compilation failure on some architecture (Solaris). - FreeBSD compilation fixes. - Solaris compilation fixes. * 2007-11-22, libprelude-0.9.16.1: - Heartbeat are now sent as high priority messages. - Fix compilation issue on system with old GnuTLS version (close #268). - Propagate the CC environment variable for bindings compilation (fix #264), by Pierre Chifflier . - More explicit assertion on invalid API usage, thanks to Sebastien Tricaud . - Appropriatly set the process umask before creating analyzer profile / failover files and directories (Fix possible loading problem with certain umask). - Various bug fixes and minor enhancements. * 2007-10-01, libprelude-0.9.16: - Implement prelude-admin list [-l] command, which provide the ability to list existing profile name, permission, registration permission, analyzerID, and Issuer analyzerid. - Implement multiple analyzer deletion in prelude-admin. - Correct printing of IDMEF time field using non local GMT offset. - Patch to avoid struct typespec redefinition, due to variable mispelling. This fixes a compilation problem on OpenBSD 3.8. - Various bug fixes. * 2007-09-04, libprelude-0.9.15.2: - Write the children PID into specified pidfile (fixes #257). - Fix double free on idmef_criterion_value_t cloned regexp object (thanks to Helmut Azbest ). - Allow Python thread to run, while entering libprelude C function. - Return PRELUDE_ERROR_ASSERTION when API check fail, in place of PRELUDE_ERROR_GENERIC. - Make prelude_plugin_unsubcribe() work as expected (call the plugin instance destroy function). - Various bug fixes, minor enhancements. * 2007-08-29, libprelude-0.9.15.1: - Fix build error on system that use native awk implementation in place of GNU awk (Pierre Chifflier ), fix #256. - Avoid a prelude-string fatal assertion, by denying copy/cloning of an empty prelude-string. - Correction to the 'prelude-admin send' help message. - Convert prelude-string to use prelude_return_if_fail() in place of prelude_log(). * 2007-08-23, libprelude-0.9.15: - prelude-adduser has been renamed to prelude-admin, and now include command to print or send files containing binary IDMEF data. - Brand new failover implementation, Feature a real 'journaling' log, allowing to restart where we were interupted. Allow multiple process to write to the same failover, and is chroot safe. - prelude-admin manpage, thanks to Frederic Motte . - Use SHA1 in place of MD5 for Analyzer checksum. - Do not set TCP option on UNIX socket, avoid un-necessary warning. - New measure all over the public interface to protect against bad API usage, when a function is not used correctly, a critical warning is triggered. - [logging]: New PRELUDE_LOG_CRIT logging priority. - [logging]: Correctly map Prelude log level to Syslog priority. - [logging]: Improved logging format (include timestamp, level, process pid). - [logging]: New LIBPRELUDE_ABORT variable, useful if you'd like libprelude to abord on critical assertion. - [logging]: Automatically switch to syslog mode if we detect stdout/stderr closure. - [IDMEF-Criteria]: When we try to match a value against a path that is not part of a message using a 'not' operator, the match should succeed (Example: alert.classification.text != 'stuff' should match if the message has no classification object). - [IDMEF-Criteria]: When matching multiple listed values within the same path using a 'not' operator, return an explicit 'no match' if the provided comparison value was found at least once. - [IDMEF-Path] (fix #251): Fixes NULL pointer dereference when the last element of an IDMEF path to an enumeration is not the enumeration itself (Sébastien Tricaud - Fix a possible race condition with the internal libprelude reference to the program idmef_analyzer_t when asynchronous timer were used. - Workaround possible deadlock at exit on OpenBSD, Linux Glibc. - Only configure libltdl if it is required. - Various bug fixes, minor enhancements. * 2007-05-15, libprelude-0.9.14: - Implement TCP keepalive settings on platform that support it, check client.conf for details. - When reading prelude-adduser password from a file, remove newline at the end of the string (fix #221). - When we fail to read an IDMEF message, provide more information about the place where the error happened. - Fix an issue with idmef_path_get() on empty path (pointing to the root message). - Various bug fixes and minor API improvements. * 2007-03-30, libprelude-0.9.13.2: - Improve error reporting with the central option interface. - Fix a bug when comparing IDMEF object with optional fields. - Fix a problem with the logger, where large log entry wouldn't be logged. - Fix distclean target. * 2007-03-15, libprelude-0.9.13.1: - Implement substring and regexp matching for IDMEF AdditionalData type. - When the compiler support it, add format string check capability to variable number of arguments function declaration. - Fix prelude-adduser regression introduced in libprelude-0.9.13. - Fix a regression introduced in [8381] preventing broken down time and regex match to work. - Fix a bug when manually setting an IDMEF path index. - Prevent invalid pointer dereference when passed invalid enumeration class. - Initialize GMT offset when setting a time from an NTP string. - Various bug fixes. * 2007-02-20, libprelude-0.9.13: - Fix a crash with Python bindings upon signal reception (Fix #200). - New --with-system-ltdl configure switch. The default is now to use the system wide ltdl library if it is available, unless specified otherwise (Fix #199). - Prevent NULL pointer dereference if no permission is specified after the permission type (Fix #197). - Upon IDMEFCriteria parsing error, recover from broken parser stater (Fix #195). - Detailed error reporting on IDMEFCriteria parsing error. - Fix string and possible criteria leak on IDMEFCriteria syntax error. - Prefer anonymous authentication rather than SRP. We do this because there are compatibility issue with SRP between different GnuTLS version (Should fix #187). - When dumping AdditionalData of type byte-string to string, encode the data using base64. - Win32 compatibility fixes. - Cross compilation fixes. * 2007-01-08, libprelude-0.9.12.2: - Fix make installation error when Perl bindings are disabled. * 2007-01-05, libprelude-0.9.12.1: - Ability to debug TLS communication through a new LIBPRELUDE_TLS_DEBUG environment variable. - Prevent binding generation error when using old SWIG version. - Generate bindings for the error handling API. - Small Perl/Python detection improvement. Fix #182. - Fix bindings compilation when using make -j. - New configure --with-perl-installdirs flags: might be used to override default site perl installation. * 2006-12-20, libprelude-0.9.12: - Correctly pack and unpack float value when sending/receiving. - More error checking on IDMEF object copy. - Fix a crash that occured when destroying a copied object. - Correct registration warning when using AF_UNIX socket. - Compile on systems lacking poll(). - IpV6 compatibility fixes. - Fix OS X compilation issues. - Various portability fixes. * 2006-10-10, libprelude-0.9.11: - Hook class comparison function. Accept NULL, equal, not equal operator. - Introduce better error checking in the idmef-class API, which is now considered public and might be used by external application. Rename error code to reflect the API. - Change to the way IDMEF listed element are handled. Specifying negative number as the position of the element from the low level API now allow to position the element at the specified (reversed) index. Using the high level API a negative index permit to address a list of element backward (replace an element). - Build fixes for SWIG > 1.3.27. - Modify idmef_value_match() so that it always unroll listed value (do it for both val1 and val2. Remove assertion, and let idmef_value_type_compare() return an error code in case there is an issue. - Handle path using IDMEF_LIST_APPEND or IDMEF_LIST_PREPEND as path using an undefined list index on idmef_path_get() call. - Make criteria parser accept (*) list index. - Implement comparison function for all IDMEF object. * 2006-07-28, libprelude-0.9.10.2: - Fix undefined assert() reference. - Fix FreeBSD warnings. - Fix possible bindings compilation warnings/problem. * 2006-07-25, libprelude-0.9.10.1: - Fix checking for swig/perl/python when full path to the application is specified. - Fix OpenBSD getaddrinfo() AI_ADDRCONFIG issue (apply to some other system as well). - Fix workaround for system with broken libtool, that prevented the use of plugin (#168). * 2006-07-12, libprelude-0.9.10: - Fix memory leak with some specific criteria. - Fix IDMEF path integrity problem when using listed (*) path. - Multiple error reporting improvement. - API improvement: implement copy and clone function for all IDMEF object. - API improvement: allow overwriting/prepending/appending list of value through IDMEF path. - API improvement: allow refcounting IDMEF Alert and Heartbeat object. - API improvement: Make idmef-value memory handling more intuitive by automating IDMEF object refcounting. * 2006-06-06, libprelude-0.9.9: - Correct IDMEF v16 checksum algorithms letter case. - Fix FreeBSD build. - Detailed, verbose error reporting when failing to read IDMEF message. - Detailed, verbose error reporting for unsupported value operation. * 2006-05-03, libprelude-0.9.8: - Improve idmef-path error reporting. - Rework configure script so that it use --with[out] in place of --(en|dis)able where we deal with external dependencies. - Rework configure script so that --with[out] work as expected (enabling and disabling the feature, explicit error if "with" feature is explicitly specified but the feature it is unavailable, etc). - Rework SNMPService class for IDMEF draft 16 compliance. - Make sure we set alert CreateTime if the caller did not do it for us. - Fix handling of \r\n terminated line. - Ignore character that are part of the option value when comparing option specified using --option=value. Fix handling of parent option. (#150). * 2006-03-24, libprelude-0.9.7.2: - Fix regression introduced in prelude-msgbuf. * 2006-03-21, libprelude-0.9.7.1: - Fix Perl/Python bindings uint64 handling on 32 bits machine. - Handle EAGAIN error from the asynchronous callback. - Better prelude-message buffer allocation scheme, which might prevent some memory fragmentation problem. * 2006-03-09, libprelude-0.9.7: - Fix an issue with system using both IP v4 and v6 interfaces which doesn't allow binding both 0.0.0.0 and :: . - Add autoconf detection for libgcrypt: this fix a build issue for distribution shipping with broken libgnutls-config script. - Generate Perl and Python bindings for the prelude-timer API. - Fix for upcoming plugin that doesn't provide an activation option. - Various bug fixes. * 2006-03-03, libprelude-0.9.6.1: - Flex generated file build fix for FreeBSD / NetBSD. * 2006-03-02, libprelude-0.9.6: - Implement workaround for buggy libtool that will fail looking up symbol with preopening enabled in case the libtool archive is missing. Lot of distribution package seem to suffer from this. - idmef-path API improvement, allow user to specify negative index to address the list in reverse. Developer are now supposed to use IDMEF_LIST_APPEND (in place of index -1) and IDMEF_LIST_PREPEND (in place of 0) on listed object operation. - idmef-path API improvement: support for (<<) and (>>) listed object index, meaning to prepend the object / to append it, as well as (*) meaning to retrieve all object from a list. This deprecate the usage of (-1) previously used for appending. - Fix deconnection problem in client reading mode. - Improve option parsing: option value can now be provided using --option=value. This format is now a requirement for option that use an optional argument. Provide arguments information in the option help. - Fix deadlock on asynchronous prelude-client destruction. - Definitely fix the problem where prelude-adduser will, on some system, listen to Ipv6 IP address as the default: we now bind every address returned by getaddrinfo(). - Fix crash in case of successive call to prelude_init(), prelude_deinit(), then prelude_init() again. - Introduce --passwd and --passwd-file option for prelude-adduser register and registration-server mode, allowing to specify one shot password on the command line, from a file, or from stdin. - Verbose error handling for prelude-adduser. - Fix perl bindings, make them more robust by adding type checking, and fix memory leak. - Fix parsing of string based broken down time criterion. - Handle configuration file containing \r. - Fix prelude_read_multiline2() return value (fix Prelude-Manager idmef-criteria-filter plugin). - Fix a bug in per thread error handling code which resulted in NULL error to be returned in case an application thread exited. - Various bug fixes. * 2006-02-06, libprelude-0.9.5: - More TLS cleanup. - Application can now report error without using specific prelude_client error reporting function. - More work and improved verbose error reporting. - Fix compilation problem with prelude_error_is_verbose() (#130). - Fix OpenBSD compilation problem. * 2006-01-30, libprelude-0.9.4: - Some useful API addition. - Much improved, verbose error reporting. - Cleaned up TLS handling, various bugfix. - In case an error occur when verifying the peer certificate, notify the peer about the failure. * 2005-01-09, libprelude-0.9.3: - Implement analyzer revocation in prelude-adduser. This will require an upcoming prelude-manager update so that revoked analyzer are denied to connect. - Make prelude-adduser use GnuTLS anonymous authentication in case SRP is not available. This is becoming a requirement since some distribution disable SRP support because of patent issue. We keep using SRP by default if both prelude-adduser instance has it. - Fix 0.9.2 regression, with a crash when providing prelude-adduser with option. - Fix potential OpenBSD compilation issue due to a missing dependencie in the GnuLib inet_ntop module. * 2005-01-06, libprelude-0.9.2: - Fix FreeBSD and OpenBSD build. - Avoid modifying the argv array, move unhandled option at the end (#116). - Handle special '--' option code. - Fix license notice, stating clearly that linking from a program using a GPL compatible license is allowed. Required for Debian package inclusion. - Various bugfix. * 2005-12-13, libprelude-0.9.1: - Take care of assigning a default CreateTime field if the caller did not already take care of it. - Workaround invalid library run path added through MakeMaker generated Makefile. - Fix Perl bindings Makefile generated with DESTDIR appended twice. - When compiling against recent GnuTLS version, don't link prelude-adduser to libgnutls-extra since, SRP symbols were moved to libgnutls. - If the user is running a modified GnuTLS version with the SRP API removed (namely, this happen on Fedora), warn the user that he should install GnuTLS from source, and that he might want to open a ticket on RedHat bug tracker about it. - Fix a problem where "MissingFunctionMacros" was reported instead of the function name on error. - Set keepalive option for the Prelude client socket. - Make option printing buffered. - Various bugfix. * 2005-09-20, libprelude-0.9.0: - 0.9.0 final. - Make Perl/Python bindings more fault tolerant. * 2005-09-15, libprelude-0.9.0-rc16: - Fix compilation issue on system where __FUNCTION__ is missing (Example: Solaris 9). - Perl bindings would fail to compile if perl was compiled using the platform (non gcc) compiler. - Fix a lot of bugs with Perl bindings. - Fix compilation failure on Solaris 9 (#99) - Fix warnings. * 2005-09-08, libprelude-0.9.0-rc15: - Fix OpenBSD compilation issue. - Fix crash when using connection pool with no failover. - Fix libprelude-error source generation issue under some locale. - Make IDMEF AdditionalData helper available from the SWIG bindings. - Filter out prelude-config.h exported definition. * 2005-08-25, libprelude-0.9.0-rc14: - Fix Python exception on NULL data. - Only use pthread when needed (Example: avoid Perl interpreter failure). * 2005-08-17, libprelude-0.9.0-rc13: - Fix compilation problem on system where ferror/clearerror are declared as macro. * 2005-08-17, libprelude-0.9.0-rc12: - Workaround for system without variadic macros. - 64 bit conversion specifier detection: fix integer truncation issue on system that did not support %llu. - Fix compilation issue on system without va_copy(). - Change connection port number (5554) to IANA reserved Prelude port number (4690). - Record full analyzer process path, as per IDMEFv14 recommandation. - More IDMEF Criteria operator. Allow case insensitive match. * 2005-08-01, libprelude-0.9.0-rc11: - Better TLS error reporting. - SWIG API usage correction for portability. - Fix crash on destroy in case no failover was created. - Fix memory issue with prelude_string_vprintf() on some platform with specific va_list handling. - prelude-adduser --gid did not lookup the group name GID correctly. * 2005-07-14, libprelude-0.9.0-rc10: - Fix a typo that could lead to 100% application CPU usage on Linux that was introduced in rc9 when using the monotonic clock. - Avoid failing if we can not lookup the path of the calling program. - Better path resolution for the calling program. - Fix compilation failure on system without pthread_atfork introduced in rc9. * 2005-07-07, libprelude-0.9.0-rc9: - Improve prelude-async and prelude-timer thread safety. Use a monotonic clock if available. Fix pthread problem due to broken behavior with fork handler on FreeBSD. - Ability for the user to set the LIBPRELUDE_LOGFILE environment variable, defining a place where all prelude log goes. - Add the prelude-adduser "chown" command, allowing to change an existing analyzer UID/GID. - Make prelude-adduser not reset the profile UID/GID when used on an existing profile (example: you are not required to specify --uid and --gid anymore for each call to registration-server). - Fix a timer assertion in case we reconnected fine, but we failed flushing the failover pool. Only flush the global failover when all connection are up. - Include missing Prelude.pm in the distributed tarball. - Introduce broken down time criteria. - GCC4 warning fixes, 64 bits warnings fix, distcheck fix on 64 bits platform using lib64. More C89 friendlyness. - Fix printing of usecond. - Various bugfix. * 2005-05-27, libprelude-0.9.0-rc8: - Avoid AI family mixup on prelude-adduser connection registration. - Fix some bug in the configuration parser. * 2005-05-26, libprelude-0.9.0-rc7: - Correct IDMEF criteria value escaping. Criteria containing single or double quote should now behave as expected. - Make it possible to unset implicitly embedded IDMEF structure. - Fix GnuLib FTW module for architecture lacking it. - Fix some memory leak. - Various bugfix. * 2005-05-18, libprelude-0.9.0-rc6: - Fix compilation problem on system lacking the FTS interface. - Fix compilation problem on some MacOSX system. - Move generation of the Prelude configuration template from sensor first launch to prelude-adduser. More intuitive to the user. - You can now use the LIBPRELUDE_DEBUG environment variable to specify a libprelude debug level. - Fix problem with prelude-adduser register/registration-server on machine where ipv6 is enabled but no interface actually use it. It happened that prelude-adduser would use an incorrect address family. - Make idmef_message_print report GMT offset. - Avoid unportable convertion specifier, this was causing issue mainly on Solaris system. - Fix handling of GMT time. Stop messing with environment variable. People who has been experiencing issue with GMT offset or time should try this release. - Fix parsing time on Solaris. This resulted in wrong database query from Prewikka. - Various bugfix * 2005-05-01, libprelude-0.9.0-rc5: - Make permission parser more tolerant. - Make prelude-adduser dump an error when permission can not be parsed. - Allow address formated using [address]:port, this is especially usefull for people on IPv6 network. - Make prelude-adduser's registration server provide a --listen option so that the user can specify where to listen for registration. - Fix a potential deadlock for sensor using asynchronous heartbeat without asynchronous message. - Map value returned by idmef_value_get_object() so that they can be accessed directly by the perl/python binding. - Add missing file->file_type IDMEFv14 field. - Various bugfix. * 2005-04-17, libprelude-0.9.0-rc4: - Fix an issue with the prelude-adduser 'add' command not creating all files needed for a Manager. Resulting in later client authentication failure. - Don't treat negative GMT offset as an error in Python bindings. - Better socklen_t datatype check. Fix compilation on NetBSD system. - Use fts in place of ftw for portability (Fix prelude-adduser on MacOSX). - Fix possible double free on recursive message read error (fragmented message). - Fix GMT offset issue on OpenBSD machine. Include compatibility code for machine that does not support setenv/unsetenv. - Fix compilation problem on system where libprelude-0.8 is installed due to the library inclusion path. - IDMEF text output beautification. * 2005-04-09, libprelude-0.9.0-rc3: - Change to the plugin infrastructure to check the API version a given plugin was compiled with. - Make analyzer deletion work on all architecture. - Fix bindings Makefile so that they can be used with BSD make. - Stop using pcreposix for IDMEF criteria matching, always rely on POSIX regex. The way pcreposix define it's symbol make it impossible to use it from a library if the final program isn't linked against libpcreposix (example: python / perl program using libprelude bindings). - Better incorrect IDMEF criteria detection. - Fix some compilation warnings. - Fix OpenBSD/MacOSX/Irix compilation. - Fix compilation on system that lack pthread_atfork(). - Correct IDMEF value operator check. - Better IDMEF criteria error return value. * 2005-03-31, libprelude-0.9.0-rc2: - Fix Python/Perl bindings linking order. Was linking to old version of the library on system where old libprelude-0.8 was installed. - Fix an issue with the Perl bindings on make clean. * 2005-03-29, libprelude-0.9.0-rc1: Note: due to several years of work and the habit of working with the new version, it is hard to remind all the enhancement made in this release. Please bear with us and try it for yourself :-) - The Prelude framework has been stabilized, and a lot of consistency work has been going on. The C API should remain mostly stable at this point, and we now offer Python and Perl bindings for interacting with Prelude. - C++ applications should now be able to compile with the library. New and powerful API like idmef-path (defining a path within an IDMEF message tree, assigning / retrieving it) and IDMEF criteria filtering has been introduced. - IDMEF draft 14 compliance. - Support for IDMEF optionnal integer in events. - A lot of work happened with the the IDWG to fix known IDMEF issue. - Message routing across distributed Manager for remote sensors administration. - The failover subsystem, used when the communication with a Prelude-Manager goes down, now support transaction and quota. - Message unique identity generation now done on the sensor side, and fully optional per IDMEF specifications. - Support Ipv6 for client/manager connectivity. - Use GnuTLS instead of OpenSSL. Authentication is now always done through TLS, and the encryption later can be dropped if the connection is local. - Usage of a single tool for sensor registration using SRP (Secure Remote Passwor protocol). - Allow multiple analyzer instance through the use of profiles. - Clean error handling. Application can now check the return value using prelude_perror(), prelude_strerror(), and prelude_strsource(). - It is now possible to remotely query and set sensors options. - Make the plugin API allow different instance of one plugin to be loaded. - Allow recursive configuration file inclusion. - You can now define filesystem quota for failover. - Changed the way AND of manager work: When using {{ manager_addr = x.x.x.x && y.y.y.y }}, the emission used to stop if emission to x.x.x.x failed. However, from a practical point of view, people who use AND of manager for redondancy want both manager to receive exactly the same messages, even if one of the Manager fail. Thus, in case emission x.x.x.x fail, we still want to emit the message to y.y.y.y, and save the failed message associating them to x.x.x.x manager, for later emission. - Heartbeat now carry a status and an interval. - Use GnuLib for enhenced portability. * 2003-12-09, libprelude-0.8.10: - Yoann Vandoorselaere : use a newer libtool version (fix an OpenBSD) problem. * 2003-12-05, libprelude-0.8.9: - Yoann Vandoorselaere : Use version-info to set library soname to something meaningful. - Yoann Vandoorselaere : Implement prelude_io_pending() function that return wether there are byte waiting to be read or not. Take care of the OpenSSL internal buffer. - Nicolas Delon : Add a new prelude-io type dedicated to socket operation. Enable checking of connection state with theses. This fix a bug where a connection breakage would only be noticed on the second alert send. - Yoann Vandoorselaere : Make sensor-adduser work if not called by root. - Yoann Vandoorselaere : Allow sensor-adduser to be called without the --uid option, but print a big warning telling that sensor added without a provided UID will have to be run using the registration UID. - Yoann Vandoorselaere : Set generated certificate to start being valid one day before of the current time. This can avoid problem in case one of the machine involved in the communication doesn't have it's time set right. - Yoann Vandoorselaere : Allow a children option to access it's parent option through a new function in the prelude-getopt API. - Yoann Vandoorselaere : Fix yet another plugin loading problem on OpenBSD. * 2003-10-21, libprelude-0.8.8: - Yoann Vandoorselaere : Work around problem with desynchronized ident that people were getting in case of machine or manager crash. - Nicolas Delon : Fix a memory leak affecting prelude-lml. - Yoann Vandoorselaere : Fix a bug that could result in linking to the wrong version of libprelude being linked when dual libprelude version were installed. - Stephane Loeuillet : README update. * 2003-09-30, libprelude-0.8.7: - Yoann Vandoorselaere Fix a crash on system without getaddrinfo(). * 2003-09-21, libprelude-0.8.6: - Yoann Vandoorselaere Re-establish post 0.8.5 behavior of defaulting to enable asynchronous timer. - Yoann Vandoorselaere Handle tool, overflow, and correlation alert. - Yoann Vandoorselaere Make the operation of gathering/executing a timer atomic. Merge part of the HEAD code and avoid locking in case asynchronous timer aren't used. - Krzysztof Zaraska Add AC_PROG_CPP so the preprocessor is detected before the OpenSSL presence test, so the OpenSSL detection works correctly. - Yoann Vandoorselaere Use pthread_join() instead of pthread_cancel(). The behavior of pthread_cancel too much depend on the architecture. - Yoann Vandoorselaere Add a --pthread-cflags option to libprelude-config in order to avoid non threaded program to compile with pthread related option which might slow down program execution due to extra locking used by libc. - Sylvain Gil Fix libprelude compilation under MacOSX. - Yoann Vandoorselaere Forbid multiline comment. (Fix #0000078). - Yoann Vandoorselaere Fix GCC strict-aliasing warning. - Yoann Vandoorselaere Provide the ability for a prelude-client to connect using both IPv4 and IPv6. Also, the prelude-client code has been reworked so that connection using UNIX and TCP socket share more code. - Yoann Vandoorselaere Implementation of the prelude_inet API providing IPv4/IPv6 lookup function, as well as their fallback if IPv6 support is not present. * 2003-04-28, libprelude-0.8.5: - Yoann Vandoorselaere Explicitly permit linking with OpenSSL so that Debian package might be distributed. - Yoann Vandoorselaere Fix AC_DATATYPE_GENERIC so that it can find valid socklen_t replacement. - Yoann Vandoorselaere Fix a possible SIGSEGV on client that doesn't use prelude-getopt. - Yoann Vandoorselaere Fix a priority problem when assigning a variable, that could lead to a SIGSEGV. - Yoann Vandoorselaere Fix compilation with OpenSSL 0.9.7. - Yoann Vandoorselaere prelude-getopt doesn't need to modify the argv array anymore. The application might want to still use it. - Yoann Vandoorselaere Fix a bug where option would not be printed if option flags was set to zero. - Yoann Vandoorselaere Fix a possible NULL strcmp that would result in a SIGSEGV for option without longname. - Yoann Vandoorselaere Fix a possible NULL pointer dereference in the Prelude configuration engine. - Yoann Vandoorselaere When starting as a deamon close stdin, stdout, and stderr. - Krzysztof Zaraska Make arbitrary length certificate work correctly, and fix a possible sensor-adduser SIGSEGV. * 2002-09-23, libprelude-0.8.4: - Correct the way we enable/disable OpenSSL support. (Yoann Vandoorselaere). - Workaround system that doesn't define socklen_t. This make libprelude compile on Solaris. (Yoann Vandoorselaere). - Fix a possible NULL free in case the manager client creation fail. (Yoann Vandoorselaere). - Fix potential signed/unsigned integer problems. (Guillaume Pelat). * 2002-09-10, libprelude-0.8.3: - Make sensor-adduser do exact compareason on sensor name, so that two sensor with the same prefix can't be confused. (Yoann Vandoorselaere). - If we're running on a big endian system, don't send uninitialized 64bits value. (Yoann Vandoorselaere). - Handle error correctly when processing option from the config file. Assorted cleanup. (Yoann Vandoorselaere) - Fix possible file descriptor leak when handling error. (Guillaume Pelat). * 2002-08-29, libprelude-0.8.2: - Correct check for OpenSSL, and profiling, so that you won't end up disabling OpenSSL with --enable-ssl=yes. (Yoann Vandoorselaere). - Fix an infinite loop when asking for SSL setup confirmation. (Sebastien Guilbaud). - Don't provide an empty string to option callback when there is no argument. (Yoann Vandoorselaere). * 2002-08-26, libprelude-0.8.1: - Act as a LIFO when subscribing a plugin, so that a plugin loading another, both subscribing from plugin_init() won't end up with undefined result (Yoann Vandoorselaere). - Delete plugin entry on plugin loading error. Fix a possible SIGSEGV. (Yoann Vandoorselaere). - Fix possible NULL pointer dereference when searching for a plugin. (Yoann Vandoorselaere). - Remove some unused function (Guillaume Pelat). - Fix possible recursive loop when asking information to the user in sensor-adduser. (Guillaume Pelat). - Free username on error when authenticating. (Guillaume Pelat). - Always nul terminate socket filename (handle case where the filename is too long). (Guillaume Pelat).